Bug 1140508 - "Update Shumway to version 0.10.225". r=till
authorYury Delendik <ydelendik>
Fri, 06 Mar 2015 11:45:00 +0100
changeset 232472 b7dfd398210f927f6388efa4c47e92abb76b1462
parent 232471 335d3dc298d6606e1858bab3710ef837efbeee1f
child 232473 a9e7d74b9f5bde74251f9a826868341b3729c177
push id11648
push usercbook@mozilla.com
push dateMon, 09 Mar 2015 10:24:09 +0000
treeherderfx-team@a9e7d74b9f5b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstill
bugs1140508
milestone39.0a1
Bug 1140508 - "Update Shumway to version 0.10.225". r=till
browser/extensions/shumway/chrome/RtmpUtils.jsm
browser/extensions/shumway/chrome/ShumwayCom.jsm
browser/extensions/shumway/chrome/SpecialInflate.jsm
browser/extensions/shumway/chrome/SpecialStorage.jsm
browser/extensions/shumway/chrome/bootstrap-content.js
browser/extensions/shumway/chrome/content.js
browser/extensions/shumway/chrome/viewerWrapper.js
browser/extensions/shumway/content/ShumwayBootstrapUtils.jsm
browser/extensions/shumway/content/ShumwayStreamConverter.jsm
browser/extensions/shumway/content/shumway.gfx.js
browser/extensions/shumway/content/shumway.player.js
browser/extensions/shumway/content/version.txt
browser/extensions/shumway/content/web/viewer.html
browser/extensions/shumway/content/web/viewer.js
browser/extensions/shumway/content/web/viewer.player.html
browser/extensions/shumway/content/web/viewerPlayer.js
--- a/browser/extensions/shumway/chrome/RtmpUtils.jsm
+++ b/browser/extensions/shumway/chrome/RtmpUtils.jsm
@@ -28,165 +28,132 @@ var RtmpUtils = {
     try {
       return Services.prefs.getBoolPref('shumway.rtmp.enabled');
     } catch (ex) {
       return false;
     }
   },
 
   createSocket: function (sandbox, params) {
+    function genPropDesc(value) {
+      return {
+        enumerable: true, configurable: true, writable: true, value: value
+      };
+    }
+
     var host = params.host, port = params.port, ssl = params.ssl;
 
     var baseSocket = Cc["@mozilla.org/tcp-socket;1"].createInstance(Ci.nsIDOMTCPSocket);
     var socket = baseSocket.open(host, port, {useSecureTransport: ssl, binaryType: 'arraybuffer'});
     if (!socket) {
       return null;
     }
 
-    var wrapperOnOpen = null, wrapperOnData = null, wrapperOnDrain = null;
-    var wrapperOnError = null, wrapperOnClose = null;
     socket.onopen = function () {
-      if (wrapperOnOpen) {
-        wrapperOnOpen.call(wrapper, new sandbox.Object());
+      if (wrapper.onopen) {
+        wrapper.onopen.call(wrapper, new sandbox.Object());
       }
     };
     socket.ondata = function (e) {
-      if (wrapperOnData) {
+      if (wrapper.ondata) {
         var wrappedE = new sandbox.Object();
         wrappedE.data = Components.utils.cloneInto(e.data, sandbox);
-        wrapperOnData.call(wrapper, wrappedE);
+        wrapper.ondata.call(wrapper, wrappedE);
       }
     };
     socket.ondrain = function () {
-      if (wrapperOnDrain) {
-        wrapperOnDrain.call(wrapper, new sandbox.Object());
+      if (wrapper.ondrain) {
+        wrapper.ondrain.call(wrapper, new sandbox.Object());
       }
     };
     socket.onerror = function (e) {
-      if (wrapperOnError) {
+      if (wrapper.onerror) {
         var wrappedE = new sandbox.Object();
         wrappedE.data = Components.utils.cloneInto(e.data, sandbox);
-        wrapperOnError.call(wrapper, wrappedE);
+        wrapper.onerror.call(wrapper, wrappedE);
       }
     };
     socket.onclose = function () {
-      if (wrapperOnClose) {
-        wrapperOnClose.call(wrapper, new sandbox.Object());
+      if (wrapper.onclose) {
+        wrapper.onclose.call(wrapper, new sandbox.Object());
       }
     };
 
-    var wrapper = new sandbox.Object();
-    var waived = Components.utils.waiveXrays(wrapper);
-    Object.defineProperties(waived, {
-      onopen: {
-        get: function () { return wrapperOnOpen; },
-        set: function (value) { wrapperOnOpen = value; },
-        enumerable: true
-      },
-      ondata: {
-        get: function () { return wrapperOnData; },
-        set: function (value) { wrapperOnData = value; },
-        enumerable: true
-      },
-      ondrain: {
-        get: function () { return wrapperOnDrain; },
-        set: function (value) { wrapperOnDrain = value; },
-        enumerable: true
-      },
-      onerror: {
-        get: function () { return wrapperOnError; },
-        set: function (value) { wrapperOnError = value; },
-        enumerable: true
-      },
-      onclose: {
-        get: function () { return wrapperOnClose; },
-        set: function (value) { wrapperOnClose = value; },
-        enumerable: true
-      },
+    var wrapper = Cu.createObjectIn(sandbox);
+    Object.defineProperties(wrapper, {
+      onopen: genPropDesc(null),
+      ondata: genPropDesc(null),
+      ondrain: genPropDesc(null),
+      onerror: genPropDesc(null),
+      onclose: genPropDesc(null),
 
-      send: {
-        value: function (buffer, offset, count) {
-          return socket.send(buffer, offset, count);
-        }
-      },
+      send: genPropDesc(function (buffer, offset, count) {
+        return socket.send(buffer, offset, count);
+      }),
 
-      close: {
-        value: function () {
-          socket.close();
-        }
-      }
+      close: genPropDesc(function () {
+        socket.close();
+      })
     });
+    Components.utils.makeObjectPropsNormal(wrapper);
     return wrapper;
   },
 
   createXHR: function (sandbox) {
+    function genPropDesc(value) {
+      return {
+        enumerable: true, configurable: true, writable: true, value: value
+      };
+    }
+
     var xhr = Cc["@mozilla.org/xmlextras/xmlhttprequest;1"]
                 .createInstance(Ci.nsIXMLHttpRequest);
-    var wrapperOnLoad = null, wrapperOnError = null;
+
     xhr.onload = function () {
-      if (wrapperOnLoad) {
-        wrapperOnLoad.call(wrapper, new sandbox.Object());
+      wrapper.status = xhr.status;
+      wrapper.response = Components.utils.cloneInto(xhr.response, sandbox);
+      if (wrapper.onload) {
+        wrapper.onload.call(wrapper, new sandbox.Object());
       }
     };
     xhr.onerror = function () {
-      if (wrappedOnError) {
-        wrappedOnError.call(wrapper, new sandbox.Object());
+      wrapper.status = xhr.status;
+      if (wrapper.onerror) {
+        wrapper.onerror.call(wrapper, new sandbox.Object());
       }
     };
 
-    var wrapper = new sandbox.Object();
-    var waived = Components.utils.waiveXrays(wrapper);
-    Object.defineProperties(waived, {
-      status: {
-        get: function () { return xhr.status; },
-        enumerable: true
-      },
-      response: {
-        get: function () { return Components.utils.cloneInto(xhr.response, sandbox); },
-        enumerable: true
-      },
-      responseType: {
-        get: function () { return xhr.responseType; },
-        set: function (value) {
-          if (value !== 'arraybuffer') {
-            throw new Error('Invalid responseType.');
-          }
-        },
-        enumerable: true
-      },
-      onload: {
-        get: function () { return wrapperOnLoad; },
-        set: function (value) { wrapperOnLoad = value; },
-        enumerable: true
-      },
-      onerror: {
-        get: function () { return wrapperOnError; },
-        set: function (value) { wrapperOnError = value; },
-        enumerable: true
-      },
-      open: {
-        value: function (method, path, async) {
-          if (method !== 'POST' || !path || (async !== undefined && !async)) {
-            throw new Error('invalid open() arguments');
-          }
-          // TODO check path
-          xhr.open('POST', path, true);
-          xhr.responseType = 'arraybuffer';
-          xhr.setRequestHeader('Content-Type', 'application/x-fcs');
+    var wrapper = Components.utils.createObjectIn(sandbox);
+    Object.defineProperties(wrapper, {
+      status: genPropDesc(0),
+      response: genPropDesc(undefined),
+      responseType: genPropDesc('text'),
+
+      onload: genPropDesc(null),
+      onerror: genPropDesc(null),
+
+      open: genPropDesc(function (method, path, async) {
+        if (method !== 'POST' || !path || (async !== undefined && !async)) {
+          throw new Error('invalid open() arguments');
         }
-      },
-      setRequestHeader: {
-        value: function (header, value) {
-          if (header !== 'Content-Type' || value !== 'application/x-fcs') {
-            throw new Error('invalid setRequestHeader() arguments');
-          }
+        // TODO check path
+        xhr.open('POST', path, true);
+        xhr.responseType = 'arraybuffer';
+        xhr.setRequestHeader('Content-Type', 'application/x-fcs');
+      }),
+
+      setRequestHeader: genPropDesc(function (header, value) {
+        if (header !== 'Content-Type' || value !== 'application/x-fcs') {
+          throw new Error('invalid setRequestHeader() arguments');
         }
-      },
+      }),
 
-      send: {
-        value: function (data) {
-          xhr.send(data);
+      send: genPropDesc(function (data) {
+        if (this.responseType !== 'arraybuffer') {
+          throw new Error('Invalid responseType.');
         }
-      }
+        xhr.send(data);
+      })
     });
+    Components.utils.makeObjectPropsNormal(wrapper);
     return wrapper;
   }
 };
new file mode 100644
--- /dev/null
+++ b/browser/extensions/shumway/chrome/ShumwayCom.jsm
@@ -0,0 +1,782 @@
+/*
+ * Copyright 2015 Mozilla Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+var EXPORTED_SYMBOLS = ['ShumwayCom'];
+
+Components.utils.import('resource://gre/modules/XPCOMUtils.jsm');
+Components.utils.import('resource://gre/modules/Services.jsm');
+Components.utils.import('resource://gre/modules/Promise.jsm');
+Components.utils.import('resource://gre/modules/NetUtil.jsm');
+
+Components.utils.import('chrome://shumway/content/SpecialInflate.jsm');
+Components.utils.import('chrome://shumway/content/SpecialStorage.jsm');
+Components.utils.import('chrome://shumway/content/RtmpUtils.jsm');
+
+XPCOMUtils.defineLazyModuleGetter(this, 'ShumwayTelemetry',
+  'resource://shumway/ShumwayTelemetry.jsm');
+
+const MAX_USER_INPUT_TIMEOUT = 250; // ms
+
+function getBoolPref(pref, def) {
+  try {
+    return Services.prefs.getBoolPref(pref);
+  } catch (ex) {
+    return def;
+  }
+}
+
+function getStringPref(pref, def) {
+  try {
+    return Services.prefs.getComplexValue(pref, Components.interfaces.nsISupportsString).data;
+  } catch (ex) {
+    return def;
+  }
+}
+
+function log(aMsg) {
+  let msg = 'ShumwayCom.js: ' + (aMsg.join ? aMsg.join('') : aMsg);
+  Services.console.logStringMessage(msg);
+  dump(msg + '\n');
+}
+
+var ShumwayCom = {
+  createAdapter: function (content, callbacks) {
+
+    function setupComBridge(playerWindow) {
+      // Creates secondary ShumwayCom adapter and sets up the forwarders from
+      // the callbacks to primary adapter.
+      var playerContent = playerWindow.contentWindow;
+      var secondaryAdapter = ShumwayCom.createAdapter(playerContent, callbacks);
+      shumwayComAdapter.onLoadFileCallback = function (arg) {
+        if (secondaryAdapter.onLoadFileCallback) {
+          secondaryAdapter.onLoadFileCallback(Components.utils.cloneInto(arg, playerContent));
+        }
+      };
+      shumwayComAdapter.onExternalCallback = function (call) {
+        if (secondaryAdapter.onExternalCallback) {
+          return secondaryAdapter.onExternalCallback(Components.utils.cloneInto(call, playerContent));
+        }
+      };
+      shumwayComAdapter.onSystemResourceCallback = function (id, data) {
+        if (secondaryAdapter.onSystemResourceCallback) {
+          secondaryAdapter.onSystemResourceCallback(id, Components.utils.cloneInto(data, playerContent));
+        }
+      };
+      // Sets up the _onSyncMessage helper that is used from postSyncMessage of
+      // the secondary adapter.
+      secondaryAdapter._onSyncMessage = function (msg) {
+        if (shumwayComAdapter.onSyncMessage) {
+          var waivedMsg = Components.utils.waiveXrays(msg); // for cloneInto
+          return shumwayComAdapter.onSyncMessage(Components.utils.cloneInto(waivedMsg, content));
+        }
+      };
+    }
+
+    function genPropDesc(value) {
+      return {
+        enumerable: true, configurable: true, writable: true, value: value
+      };
+    }
+
+    // Exposing ShumwayCom object/adapter to the unprivileged content -- setting
+    // up Xray wrappers.
+    var shumwayComAdapter = Components.utils.createObjectIn(content, {defineAs: 'ShumwayCom'});
+    Object.defineProperties(shumwayComAdapter, {
+      enableDebug: genPropDesc(function enableDebug() {
+        callbacks.enableDebug()
+      }),
+      setFullscreen: genPropDesc(function setFullscreen(value) {
+        callbacks.sendMessage('setFullscreen', value, false);
+      }),
+      endActivation: genPropDesc(function endActivation() {
+        callbacks.sendMessage('endActivation', null, false);
+      }),
+      fallback: genPropDesc(function fallback() {
+        callbacks.sendMessage('fallback', null, false);
+      }),
+      getSettings: genPropDesc(function getSettings() {
+        return Components.utils.cloneInto(
+          callbacks.sendMessage('getSettings', null, true), content);
+      }),
+      getPluginParams: genPropDesc(function getPluginParams() {
+        return Components.utils.cloneInto(
+          callbacks.sendMessage('getPluginParams', null, true), content);
+      }),
+      reportIssue: genPropDesc(function reportIssue() {
+        callbacks.sendMessage('reportIssue', null, false);
+      }),
+      externalCom: genPropDesc(function externalCom(args) {
+        var result = String(callbacks.sendMessage('externalCom', args, true));
+        return Components.utils.cloneInto(result, content);
+      }),
+      loadFile: genPropDesc(function loadFile(args) {
+        callbacks.sendMessage('loadFile', args, false);
+      }),
+      reportTelemetry: genPropDesc(function reportTelemetry(args) {
+        callbacks.sendMessage('reportTelemetry', args, false);
+      }),
+      setClipboard: genPropDesc(function setClipboard(args) {
+        callbacks.sendMessage('setClipboard', args, false);
+      }),
+      navigateTo: genPropDesc(function navigateTo(args) {
+        callbacks.sendMessage('navigateTo', args, false);
+      }),
+      userInput: genPropDesc(function userInput() {
+        callbacks.sendMessage('userInput', null, true);
+      }),
+      loadSystemResource: genPropDesc(function loadSystemResource(id) {
+        loadShumwaySystemResource(id).then(function (data) {
+          if (shumwayComAdapter.onSystemResourceCallback) {
+            shumwayComAdapter.onSystemResourceCallback(id,
+              Components.utils.cloneInto(data, content));
+          }
+        });
+      }),
+      setupComBridge: genPropDesc(setupComBridge),
+      postSyncMessage: genPropDesc(function postSyncMessage(msg) {
+        return Components.utils.cloneInto(shumwayComAdapter._onSyncMessage(msg), content);
+      })
+    });
+
+    Object.defineProperties(shumwayComAdapter, {
+      onLoadFileCallback: genPropDesc(null),
+      onExternalCallback: genPropDesc(null),
+      onSystemResourceCallback: genPropDesc(null),
+      onSyncMessage: genPropDesc(null)
+    });
+
+    Object.defineProperties(shumwayComAdapter, {
+      createSpecialStorage: genPropDesc(function () {
+        var environment = callbacks.getEnvironment();
+        return SpecialStorageUtils.createWrappedSpecialStorage(content,
+          environment.swfUrl, environment.privateBrowsing);
+      })
+    });
+
+    // Exposing createSpecialInflate function for DEFLATE stream decoding using
+    // Gecko API.
+    if (SpecialInflateUtils.isSpecialInflateEnabled) {
+      Object.defineProperties(shumwayComAdapter, {
+        createSpecialInflate: genPropDesc(function () {
+          return SpecialInflateUtils.createWrappedSpecialInflate(content);
+        })
+      });
+    }
+
+    // Exposing createRtmpSocket/createRtmpXHR functions to support RTMP stream
+    // functionality.
+    if (RtmpUtils.isRtmpEnabled) {
+      Object.defineProperties(shumwayComAdapter, {
+        createRtmpSocket: genPropDesc(function (params) {
+          return RtmpUtils.createSocket(content, params);
+        }),
+        createRtmpXHR: genPropDesc(function () {
+          return RtmpUtils.createXHR(content);
+        })
+      });
+    }
+
+    Components.utils.makeObjectPropsNormal(shumwayComAdapter);
+    return shumwayComAdapter;
+  },
+
+  createActions: function (startupInfo, window, document) {
+    return new ShumwayChromeActions(startupInfo, window, document);
+  }
+};
+
+function loadShumwaySystemResource(id) {
+  var url, type;
+  switch (id) {
+    case 0: // BuiltinAbc
+      url = 'resource://shumway/libs/builtin.abc';
+      type = 'arraybuffer';
+      break;
+    case 1: // PlayerglobalAbcs
+      url = 'resource://shumway/playerglobal/playerglobal.abcs';
+      type = 'arraybuffer';
+      break;
+    case 2: // PlayerglobalManifest
+      url = 'resource://shumway/playerglobal/playerglobal.json';
+      type = 'json';
+      break;
+    default:
+      return Promise.reject('Unsupported system resource id');
+  }
+
+  var deferred = Promise.defer();
+
+  var xhr = Components.classes["@mozilla.org/xmlextras/xmlhttprequest;1"]
+                              .createInstance(Components.interfaces.nsIXMLHttpRequest);
+  xhr.open('GET', url, true);
+  xhr.responseType = type;
+  xhr.onload = function () {
+    deferred.resolve(xhr.response);
+  };
+  xhr.send(null);
+
+  return deferred.promise;
+}
+
+// All the privileged actions.
+function ShumwayChromeActions(startupInfo, window, document) {
+  this.url = startupInfo.url;
+  this.objectParams = startupInfo.objectParams;
+  this.movieParams = startupInfo.movieParams;
+  this.baseUrl = startupInfo.baseUrl;
+  this.isOverlay = startupInfo.isOverlay;
+  this.embedTag = startupInfo.embedTag;
+  this.isPausedAtStart = startupInfo.isPausedAtStart;
+  this.window = window;
+  this.document = document;
+  this.externalComInitialized = false;
+  this.allowScriptAccess = startupInfo.allowScriptAccess;
+  this.lastUserInput = 0;
+  this.crossdomainRequestsCache = Object.create(null);
+  this.telemetry = {
+    startTime: Date.now(),
+    features: [],
+    errors: []
+  };
+
+  this.onLoadFileCallback = null;
+  this.onExternalCallback = null;
+}
+
+ShumwayChromeActions.prototype = {
+  // The method is created for convenience of routing messages from the OOP
+  // handler or remote debugger adapter. All method calls are originated from
+  // the ShumwayCom adapter (see above), or from the debugger adapter.
+  // See viewerWrapper.js for these usages near sendMessage calls.
+  invoke: function (name, args) {
+    return this[name].call(this, args);
+  },
+
+  getBoolPref: function (data) {
+    if (!/^shumway\./.test(data.pref)) {
+      return null;
+    }
+    return getBoolPref(data.pref, data.def);
+  },
+
+  getSettings: function getSettings() {
+    return {
+      compilerSettings: {
+        appCompiler: getBoolPref('shumway.appCompiler', true),
+        sysCompiler: getBoolPref('shumway.sysCompiler', false),
+        verifier: getBoolPref('shumway.verifier', true)
+      },
+      playerSettings: {
+        turboMode: getBoolPref('shumway.turboMode', false),
+        hud: getBoolPref('shumway.hud', false),
+        forceHidpi: getBoolPref('shumway.force_hidpi', false)
+      }
+    }
+  },
+
+  getPluginParams: function getPluginParams() {
+    return {
+      url: this.url,
+      baseUrl : this.baseUrl,
+      movieParams: this.movieParams,
+      objectParams: this.objectParams,
+      isOverlay: this.isOverlay,
+      isPausedAtStart: this.isPausedAtStart,
+      isDebuggerEnabled: getBoolPref('shumway.debug.enabled', false)
+    };
+  },
+
+  loadFile: function loadFile(data) {
+    function notifyLoadFileListener(data) {
+      if (!actions.onLoadFileCallback) {
+        return;
+      }
+      actions.onLoadFileCallback(data);
+    }
+
+    var actions = this;
+    var url = data.url;
+    var checkPolicyFile = data.checkPolicyFile;
+    var sessionId = data.sessionId;
+    var limit = data.limit || 0;
+    var method = data.method || "GET";
+    var mimeType = data.mimeType;
+    var postData = data.postData || null;
+
+    var win = this.window;
+    var baseUrl = this.baseUrl;
+
+    var performXHR = function () {
+      var xhr = Components.classes["@mozilla.org/xmlextras/xmlhttprequest;1"]
+                                  .createInstance(Components.interfaces.nsIXMLHttpRequest);
+      xhr.open(method, url, true);
+      xhr.responseType = "moz-chunked-arraybuffer";
+
+      if (baseUrl) {
+        // Setting the referer uri, some site doing checks if swf is embedded
+        // on the original page.
+        xhr.setRequestHeader("Referer", baseUrl);
+      }
+
+      // TODO apply range request headers if limit is specified
+
+      var lastPosition = 0;
+      xhr.onprogress = function (e) {
+        var position = e.loaded;
+        var data = new Uint8Array(xhr.response);
+        notifyLoadFileListener({callback:"loadFile", sessionId: sessionId,
+          topic: "progress", array: data, loaded: position, total: e.total});
+        lastPosition = position;
+        if (limit && e.total >= limit) {
+          xhr.abort();
+        }
+      };
+      xhr.onreadystatechange = function(event) {
+        if (xhr.readyState === 4) {
+          if (xhr.status !== 200 && xhr.status !== 0) {
+            notifyLoadFileListener({callback:"loadFile", sessionId: sessionId, topic: "error", error: xhr.statusText});
+          }
+          notifyLoadFileListener({callback:"loadFile", sessionId: sessionId, topic: "close"});
+        }
+      };
+      if (mimeType)
+        xhr.setRequestHeader("Content-Type", mimeType);
+      xhr.send(postData);
+      notifyLoadFileListener({callback:"loadFile", sessionId: sessionId, topic: "open"});
+    };
+
+    canDownloadFile(url, checkPolicyFile, this.url, this.crossdomainRequestsCache).then(function () {
+      performXHR();
+    }, function (reason) {
+      log("data access is prohibited to " + url + " from " + baseUrl);
+      notifyLoadFileListener({callback:"loadFile", sessionId: sessionId, topic: "error",
+        error: "only original swf file or file from the same origin loading supported"});
+    });
+  },
+
+  navigateTo: function (data) {
+    var embedTag = this.embedTag.wrappedJSObject;
+    var window = embedTag ? embedTag.ownerDocument.defaultView : this.window;
+    window.open(data.url, data.target || '_self');
+  },
+
+  fallback: function(automatic) {
+    automatic = !!automatic;
+    var event = this.document.createEvent('CustomEvent');
+    event.initCustomEvent('shumwayFallback', true, true, {
+      automatic: automatic
+    });
+    this.window.dispatchEvent(event);
+  },
+
+  userInput: function() {
+    var win = this.window;
+    var winUtils = win.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
+                      .getInterface(Components.interfaces.nsIDOMWindowUtils);
+    if (winUtils.isHandlingUserInput) {
+      this.lastUserInput = Date.now();
+    }
+  },
+
+  isUserInputInProgress: function () {
+    // TODO userInput does not work for OOP
+    if (!getBoolPref('shumway.userInputSecurity', true)) {
+      return true;
+    }
+
+    // We don't trust our Shumway non-privileged code just yet to verify the
+    // user input -- using userInput function above to track that.
+    if ((Date.now() - this.lastUserInput) > MAX_USER_INPUT_TIMEOUT) {
+      return false;
+    }
+    // TODO other security checks?
+    return true;
+  },
+
+  setClipboard: function (data) {
+    if (typeof data !== 'string' || !this.isUserInputInProgress()) {
+      return;
+    }
+
+    let clipboard = Components.classes["@mozilla.org/widget/clipboardhelper;1"]
+                                      .getService(Components.interfaces.nsIClipboardHelper);
+    clipboard.copyString(data);
+  },
+
+  setFullscreen: function (enabled) {
+    enabled = !!enabled;
+
+    if (!this.isUserInputInProgress()) {
+      return;
+    }
+
+    var target = this.embedTag || this.document.body;
+    if (enabled) {
+      target.mozRequestFullScreen();
+    } else {
+      target.ownerDocument.mozCancelFullScreen();
+    }
+  },
+
+  endActivation: function () {
+    var event = this.document.createEvent('CustomEvent');
+    event.initCustomEvent('shumwayActivated', true, true, null);
+    this.window.dispatchEvent(event);
+  },
+
+  reportTelemetry: function (data) {
+    var topic = data.topic;
+    switch (topic) {
+      case 'firstFrame':
+        var time = Date.now() - this.telemetry.startTime;
+        ShumwayTelemetry.onFirstFrame(time);
+        break;
+      case 'parseInfo':
+        ShumwayTelemetry.onParseInfo({
+          parseTime: +data.parseTime,
+          size: +data.bytesTotal,
+          swfVersion: data.swfVersion|0,
+          frameRate: +data.frameRate,
+          width: data.width|0,
+          height: data.height|0,
+          bannerType: data.bannerType|0,
+          isAvm2: !!data.isAvm2
+        });
+        break;
+      case 'feature':
+        var featureType = data.feature|0;
+        var MIN_FEATURE_TYPE = 0, MAX_FEATURE_TYPE = 999;
+        if (featureType >= MIN_FEATURE_TYPE && featureType <= MAX_FEATURE_TYPE &&
+          !this.telemetry.features[featureType]) {
+          this.telemetry.features[featureType] = true; // record only one feature per SWF
+          ShumwayTelemetry.onFeature(featureType);
+        }
+        break;
+      case 'error':
+        var errorType = data.error|0;
+        var MIN_ERROR_TYPE = 0, MAX_ERROR_TYPE = 2;
+        if (errorType >= MIN_ERROR_TYPE && errorType <= MAX_ERROR_TYPE &&
+          !this.telemetry.errors[errorType]) {
+          this.telemetry.errors[errorType] = true; // record only one report per SWF
+          ShumwayTelemetry.onError(errorType);
+        }
+        break;
+    }
+  },
+
+  reportIssue: function (exceptions) {
+    var urlTemplate = "https://bugzilla.mozilla.org/enter_bug.cgi?op_sys=All&priority=--" +
+      "&rep_platform=All&target_milestone=---&version=Trunk&product=Firefox" +
+      "&component=Shumway&short_desc=&comment={comment}" +
+      "&bug_file_loc={url}";
+    var windowUrl = this.window.parent.wrappedJSObject.location + '';
+    var url = urlTemplate.split('{url}').join(encodeURIComponent(windowUrl));
+    var params = {
+      swf: encodeURIComponent(this.url)
+    };
+    getVersionInfo().then(function (versions) {
+      params.versions = versions;
+    }).then(function () {
+      var ffbuild = params.versions.geckoVersion + ' (' + params.versions.geckoBuildID + ')';
+      //params.exceptions = encodeURIComponent(exceptions);
+      var comment = '+++ Initially filed via the problem reporting functionality in Shumway +++\n' +
+        'Please add any further information that you deem helpful here:\n\n\n\n' +
+        '----------------------\n\n' +
+        'Technical Information:\n' +
+        'Firefox version: ' + ffbuild + '\n' +
+        'Shumway version: ' + params.versions.shumwayVersion;
+      url = url.split('{comment}').join(encodeURIComponent(comment));
+      this.window.open(url);
+    }.bind(this));
+  },
+
+  externalCom: function (data) {
+    if (!this.allowScriptAccess)
+      return;
+
+    // TODO check security ?
+    var parentWindow = this.window.parent.wrappedJSObject;
+    var embedTag = this.embedTag.wrappedJSObject;
+    switch (data.action) {
+      case 'init':
+        if (this.externalComInitialized)
+          return;
+
+        this.externalComInitialized = true;
+        initExternalCom(parentWindow, embedTag, this);
+        return;
+      case 'getId':
+        return embedTag.id;
+      case 'eval':
+        return parentWindow.__flash__eval(data.expression);
+      case 'call':
+        return parentWindow.__flash__call(data.request);
+      case 'register':
+        return embedTag.__flash__registerCallback(data.functionName);
+      case 'unregister':
+        return embedTag.__flash__unregisterCallback(data.functionName);
+    }
+  }
+};
+
+function disableXHRRedirect(xhr) {
+  var listener = {
+    asyncOnChannelRedirect: function(oldChannel, newChannel, flags, callback) {
+      // TODO perform URL check?
+      callback.onRedirectVerifyCallback(Components.results.NS_ERROR_ABORT);
+    },
+    getInterface: function(iid) {
+      return this.QueryInterface(iid);
+    },
+    QueryInterface: XPCOMUtils.generateQI([Components.interfaces.nsIChannelEventSink])
+  };
+  xhr.channel.notificationCallbacks = listener;
+}
+
+function canDownloadFile(url, checkPolicyFile, swfUrl, cache) {
+  // TODO flash cross-origin request
+  if (url === swfUrl) {
+    // Allows downloading for the original file.
+    return Promise.resolve(undefined);
+  }
+
+  // Allows downloading from the same origin.
+  var parsedUrl, parsedBaseUrl;
+  try {
+    parsedUrl = NetUtil.newURI(url);
+  } catch (ex) { /* skipping invalid urls */ }
+  try {
+    parsedBaseUrl = NetUtil.newURI(swfUrl);
+  } catch (ex) { /* skipping invalid urls */ }
+
+  if (parsedUrl && parsedBaseUrl &&
+    parsedUrl.prePath === parsedBaseUrl.prePath) {
+    return Promise.resolve(undefined);
+  }
+
+  // Additionally using internal whitelist.
+  var whitelist = getStringPref('shumway.whitelist', '');
+  if (whitelist && parsedUrl) {
+    var whitelisted = whitelist.split(',').some(function (i) {
+      return domainMatches(parsedUrl.host, i);
+    });
+    if (whitelisted) {
+      return Promise.resolve();
+    }
+  }
+
+  if (!parsedUrl || !parsedBaseUrl) {
+    return Promise.reject('Invalid or non-specified URL or Base URL.');
+  }
+
+  if (!checkPolicyFile) {
+    return Promise.reject('Check of the policy file is not allowed.');
+  }
+
+  // We can request crossdomain.xml.
+  return fetchPolicyFile(parsedUrl.prePath + '/crossdomain.xml', cache).
+    then(function (policy) {
+
+      if (policy.siteControl === 'none') {
+        throw 'Site control is set to \"none\"';
+      }
+      // TODO assuming master-only, there are also 'by-content-type', 'all', etc.
+
+      var allowed = policy.allowAccessFrom.some(function (i) {
+        return domainMatches(parsedBaseUrl.host, i.domain) &&
+          (!i.secure || parsedBaseUrl.scheme.toLowerCase() === 'https');
+      });
+      if (!allowed) {
+        throw 'crossdomain.xml does not contain source URL.';
+      }
+      return undefined;
+    });
+}
+
+function domainMatches(host, pattern) {
+  if (!pattern) return false;
+  if (pattern === '*') return true;
+  host = host.toLowerCase();
+  var parts = pattern.toLowerCase().split('*');
+  if (host.indexOf(parts[0]) !== 0) return false;
+  var p = parts[0].length;
+  for (var i = 1; i < parts.length; i++) {
+    var j = host.indexOf(parts[i], p);
+    if (j === -1) return false;
+    p = j + parts[i].length;
+  }
+  return parts[parts.length - 1] === '' || p === host.length;
+}
+
+function fetchPolicyFile(url, cache) {
+  if (url in cache) {
+    return cache[url];
+  }
+
+  var deferred = Promise.defer();
+
+  log('Fetching policy file at ' + url);
+  var MAX_POLICY_SIZE = 8192;
+  var xhr =  Components.classes["@mozilla.org/xmlextras/xmlhttprequest;1"]
+                               .createInstance(Components.interfaces.nsIXMLHttpRequest);
+  xhr.open('GET', url, true);
+  disableXHRRedirect(xhr);
+  xhr.overrideMimeType('text/xml');
+  xhr.onprogress = function (e) {
+    if (e.loaded >= MAX_POLICY_SIZE) {
+      xhr.abort();
+      cache[url] = false;
+      deferred.reject('Max policy size');
+    }
+  };
+  xhr.onreadystatechange = function(event) {
+    if (xhr.readyState === 4) {
+      // TODO disable redirects
+      var doc = xhr.responseXML;
+      if (xhr.status !== 200 || !doc) {
+        deferred.reject('Invalid HTTP status: ' + xhr.statusText);
+        return;
+      }
+      // parsing params
+      var params = doc.documentElement.childNodes;
+      var policy = { siteControl: null, allowAccessFrom: []};
+      for (var i = 0; i < params.length; i++) {
+        switch (params[i].localName) {
+          case 'site-control':
+            policy.siteControl = params[i].getAttribute('permitted-cross-domain-policies');
+            break;
+          case 'allow-access-from':
+            var access = {
+              domain: params[i].getAttribute('domain'),
+              security: params[i].getAttribute('security') === 'true'
+            };
+            policy.allowAccessFrom.push(access);
+            break;
+          default:
+            // TODO allow-http-request-headers-from and other
+            break;
+        }
+      }
+      deferred.resolve(policy);
+    }
+  };
+  xhr.send(null);
+  return (cache[url] = deferred.promise);
+}
+
+function getVersionInfo() {
+  var deferred = Promise.defer();
+  var versionInfo = {
+    geckoVersion: 'unknown',
+    geckoBuildID: 'unknown',
+    shumwayVersion: 'unknown'
+  };
+  try {
+    var appInfo = Components.classes["@mozilla.org/xre/app-info;1"]
+                                    .getService(Components.interfaces.nsIXULAppInfo);
+    versionInfo.geckoVersion = appInfo.version;
+    versionInfo.geckoBuildID = appInfo.appBuildID;
+  } catch (e) {
+    log('Error encountered while getting platform version info: ' + e);
+  }
+  var xhr = Components.classes["@mozilla.org/xmlextras/xmlhttprequest;1"]
+                              .createInstance(Components.interfaces.nsIXMLHttpRequest);
+  xhr.open('GET', 'resource://shumway/version.txt', true);
+  xhr.overrideMimeType('text/plain');
+  xhr.onload = function () {
+    try {
+      // Trying to merge version.txt lines into something like:
+      //   "version (sha) details"
+      var lines = xhr.responseText.split(/\n/g);
+      lines[1] = '(' + lines[1] + ')';
+      versionInfo.shumwayVersion = lines.join(' ');
+    } catch (e) {
+      log('Error while parsing version info: ' + e);
+    }
+    deferred.resolve(versionInfo);
+  };
+  xhr.onerror = function () {
+    log('Error while reading version info: ' + xhr.error);
+    deferred.resolve(versionInfo);
+  };
+  xhr.send();
+
+  return deferred.promise;
+}
+
+function initExternalCom(wrappedWindow, wrappedObject, actions) {
+  var traceExternalInterface = getBoolPref('shumway.externalInterface.trace', false);
+  if (!wrappedWindow.__flash__initialized) {
+    wrappedWindow.__flash__initialized = true;
+    wrappedWindow.__flash__toXML = function __flash__toXML(obj) {
+      switch (typeof obj) {
+        case 'boolean':
+          return obj ? '<true/>' : '<false/>';
+        case 'number':
+          return '<number>' + obj + '</number>';
+        case 'object':
+          if (obj === null) {
+            return '<null/>';
+          }
+          if ('hasOwnProperty' in obj && obj.hasOwnProperty('length')) {
+            // array
+            var xml = '<array>';
+            for (var i = 0; i < obj.length; i++) {
+              xml += '<property id="' + i + '">' + __flash__toXML(obj[i]) + '</property>';
+            }
+            return xml + '</array>';
+          }
+          var xml = '<object>';
+          for (var i in obj) {
+            xml += '<property id="' + i + '">' + __flash__toXML(obj[i]) + '</property>';
+          }
+          return xml + '</object>';
+        case 'string':
+          return '<string>' + obj.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;') + '</string>';
+        case 'undefined':
+          return '<undefined/>';
+      }
+    };
+    wrappedWindow.__flash__eval = function (expr) {
+      traceExternalInterface && this.console.log('__flash__eval: ' + expr);
+      // allowScriptAccess protects page from unwanted swf scripts,
+      // we can execute script in the page context without restrictions.
+      var result = this.eval(expr);
+      traceExternalInterface && this.console.log('__flash__eval (result): ' + result);
+      return result;
+    }.bind(wrappedWindow);
+    wrappedWindow.__flash__call = function (expr) {
+      traceExternalInterface && this.console.log('__flash__call (ignored): ' + expr);
+    };
+  }
+  wrappedObject.__flash__registerCallback = function (functionName) {
+    traceExternalInterface && wrappedWindow.console.log('__flash__registerCallback: ' + functionName);
+    Components.utils.exportFunction(function () {
+      var args = Array.prototype.slice.call(arguments, 0);
+      traceExternalInterface && wrappedWindow.console.log('__flash__callIn: ' + functionName);
+      var result;
+      if (actions.onExternalCallback) {
+        result = actions.onExternalCallback({functionName: functionName, args: args});
+        traceExternalInterface && wrappedWindow.console.log('__flash__callIn (result): ' + result);
+      }
+      return wrappedWindow.eval(result);
+    }, this, { defineAs: functionName });
+  };
+  wrappedObject.__flash__unregisterCallback = function (functionName) {
+    traceExternalInterface && wrappedWindow.console.log('__flash__unregisterCallback: ' + functionName);
+    delete this[functionName];
+  };
+}
--- a/browser/extensions/shumway/chrome/SpecialInflate.jsm
+++ b/browser/extensions/shumway/chrome/SpecialInflate.jsm
@@ -91,42 +91,41 @@ var SpecialInflateUtils = {
     try {
       return Services.prefs.getBoolPref('shumway.specialInflate');
     } catch (ex) {
       return false; // TODO true;
     }
   },
 
   createWrappedSpecialInflate: function (sandbox) {
+    function genPropDesc(value) {
+      return {
+        enumerable: true, configurable: true, writable: true, value: value
+      };
+    }
+
     var wrapped = new SpecialInflate();
-    var wrapperOnData = null;
     wrapped.onData = function(data) {
-      if (wrapperOnData) {
-        wrapperOnData.call(wrapper, Components.utils.cloneInto(data, sandbox));
+      if (wrapper.onData) {
+        wrapper.onData.call(wrapper, Components.utils.cloneInto(data, sandbox));
       }
     };
+
     // We will return object created in the sandbox/content, with some exposed
     // properties/methods, so we can send data between wrapped object and
     // and sandbox/content.
-    var wrapper = new sandbox.Object();
-    var waived = Components.utils.waiveXrays(wrapper);
-    Object.defineProperties(waived, {
-      onData: {
-        get: function () { return wrapperOnData; },
-        set: function (value) { wrapperOnData = value; },
-        enumerable: true
-      },
-      push: {
-        value: function (data) {
-          // Uint8Array is expected in the data parameter.
-          // SpecialInflate.push() fails with other argument types.
-          return wrapped.push(data);
-        }
-      },
-      close: {
-        value: function () {
-          return wrapped.close();
-        }
-      }
+    var wrapper = Components.utils.createObjectIn(sandbox);
+    Object.defineProperties(wrapper, {
+      onData: genPropDesc(null),
+
+      push: genPropDesc(function (data) {
+        // Uint8Array is expected in the data parameter.
+        // SpecialInflate.push() fails with other argument types.
+        return wrapped.push(data);
+      }),
+      close: genPropDesc(function () {
+        return wrapped.close();
+      })
     });
+    Components.utils.makeObjectPropsNormal(wrapper);
     return wrapper;
   }
 };
new file mode 100644
--- /dev/null
+++ b/browser/extensions/shumway/chrome/SpecialStorage.jsm
@@ -0,0 +1,57 @@
+/*
+ * Copyright 2015 Mozilla Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+var EXPORTED_SYMBOLS = ['SpecialStorageUtils'];
+
+Components.utils.import('resource://gre/modules/Services.jsm');
+Components.utils.import('resource://gre/modules/Services.jsm');
+
+var SpecialStorageUtils = {
+  createWrappedSpecialStorage: function (sandbox, swfUrl, privateBrowsing) {
+    function genPropDesc(value) {
+      return {
+        enumerable: true, configurable: true, writable: true, value: value
+      };
+    }
+
+    // Creating internal localStorage object based on url and privateBrowsing setting.
+    var uri = Services.io.newURI(swfUrl, null, null);
+    var principal = Components.classes["@mozilla.org/scriptsecuritymanager;1"]
+                              .getService(Components.interfaces.nsIScriptSecurityManager)
+                              .getNoAppCodebasePrincipal(uri);
+    var dsm = Components.classes["@mozilla.org/dom/localStorage-manager;1"]
+                                .getService(Components.interfaces.nsIDOMStorageManager);
+    var storage = dsm.createStorage(null, principal, privateBrowsing);
+
+    // We will return object created in the sandbox/content, with some exposed
+    // properties/methods, so we can send data between wrapped object and
+    // and sandbox/content.
+    var wrapper = Components.utils.createObjectIn(sandbox);
+    Object.defineProperties(wrapper, {
+      getItem: genPropDesc(function (key) {
+        return storage.getItem(key);
+      }),
+      setItem: genPropDesc(function (key, value) {
+        storage.setItem(key, value);
+      }),
+      removeItem: genPropDesc(function (key) {
+        storage.removeItem(key);
+      })
+    });
+    Components.utils.makeObjectPropsNormal(wrapper);
+    return wrapper;
+  }
+};
--- a/browser/extensions/shumway/chrome/bootstrap-content.js
+++ b/browser/extensions/shumway/chrome/bootstrap-content.js
@@ -61,16 +61,22 @@
 
     if (isEnabled) {
       startup();
     } else {
       shutdown();
     }
   }
 
+  if (isRemote && typeof ShumwayBootstrapUtils !== 'undefined') {
+    // Treat content as non-remote when bootstrap.js or ShumwayUtils.jsm
+    // already registered the Shumway components for current content scope.
+    isRemote = false;
+  }
+
   if (isRemote) {
     addMessageListener('Shumway:Child:refreshSettings', updateSettings);
     updateSettings();
 
     addMessageListener('Shumway:Child:shutdown', function shutdownListener(e) {
       removeMessageListener('Shumway:Child:refreshSettings', updateSettings);
       removeMessageListener('Shumway:Child:shutdown', shutdownListener);
 
--- a/browser/extensions/shumway/chrome/content.js
+++ b/browser/extensions/shumway/chrome/content.js
@@ -10,94 +10,61 @@
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
 
 Components.utils.import('resource://gre/modules/Services.jsm');
-Components.utils.import('chrome://shumway/content/SpecialInflate.jsm');
-Components.utils.import('chrome://shumway/content/RtmpUtils.jsm');
+Components.utils.import('chrome://shumway/content/ShumwayCom.jsm');
 
 var externalInterfaceWrapper = {
   callback: function (call) {
     if (!shumwayComAdapter.onExternalCallback) {
       return undefined;
     }
     return shumwayComAdapter.onExternalCallback(
       Components.utils.cloneInto(JSON.parse(call), content));
   }
 };
 
 // The object allows resending of external interface, clipboard and other
 // control messages between unprivileged content and ShumwayStreamConverter.
 var shumwayComAdapter;
 
-function sendMessage(action, data, sync, callbackCookie) {
+function sendMessage(action, data, sync) {
   var detail = {action: action, data: data, sync: sync};
-  if (callbackCookie !== undefined) {
-    detail.callback = true;
-    detail.cookie = callbackCookie;
-  }
   if (!sync) {
     sendAsyncMessage('Shumway:message', detail);
     return;
   }
-  var result = sendSyncMessage('Shumway:message', detail);
+  var result = String(sendSyncMessage('Shumway:message', detail));
+  result = result == 'undefined' ? undefined : JSON.parse(result);
   return Components.utils.cloneInto(result, content);
 }
 
 function enableDebug() {
   sendAsyncMessage('Shumway:enableDebug', null);
 }
 
 addMessageListener('Shumway:init', function (message) {
+  var environment = message.data;
+
   sendAsyncMessage('Shumway:running', {}, {
     externalInterface: externalInterfaceWrapper
   });
 
-  // Exposing ShumwayCom object/adapter to the unprivileged content -- setting
-  // up Xray wrappers.
-  shumwayComAdapter = Components.utils.createObjectIn(content, {defineAs: 'ShumwayCom'});
-  Components.utils.exportFunction(sendMessage, shumwayComAdapter, {defineAs: 'sendMessage'});
-  Components.utils.exportFunction(enableDebug, shumwayComAdapter, {defineAs: 'enableDebug'});
-  Object.defineProperties(shumwayComAdapter, {
-    onLoadFileCallback: { value: null, writable: true },
-    onExternalCallback: { value: null, writable: true },
-    onMessageCallback: { value: null, writable: true }
+  shumwayComAdapter = ShumwayCom.createAdapter(content, {
+    sendMessage: sendMessage,
+    enableDebug: enableDebug,
+    getEnvironment: function () { return environment; }
   });
-  Components.utils.makeObjectPropsNormal(shumwayComAdapter);
-
-  // Exposing createSpecialInflate function for DEFLATE stream decoding using
-  // Gecko API.
-  if (SpecialInflateUtils.isSpecialInflateEnabled) {
-    Components.utils.exportFunction(function () {
-      return SpecialInflateUtils.createWrappedSpecialInflate(content);
-    }, content, {defineAs: 'createSpecialInflate'});
-  }
-
-  if (RtmpUtils.isRtmpEnabled) {
-    Components.utils.exportFunction(function (params) {
-      return RtmpUtils.createSocket(content, params);
-    }, content, {defineAs: 'createRtmpSocket'});
-    Components.utils.exportFunction(function () {
-      return RtmpUtils.createXHR(content);
-    }, content, {defineAs: 'createRtmpXHR'});
-  }
 
   content.wrappedJSObject.runViewer();
 });
 
 addMessageListener('Shumway:loadFile', function (message) {
   if (!shumwayComAdapter.onLoadFileCallback) {
     return;
   }
   shumwayComAdapter.onLoadFileCallback(Components.utils.cloneInto(message.data, content));
 });
-
-addMessageListener('Shumway:messageCallback', function (message) {
-  if (!shumwayComAdapter.onMessageCallback) {
-    return;
-  }
-  shumwayComAdapter.onMessageCallback(message.data.cookie,
-    Components.utils.cloneInto(message.data.response, content));
-});
--- a/browser/extensions/shumway/chrome/viewerWrapper.js
+++ b/browser/extensions/shumway/chrome/viewerWrapper.js
@@ -9,89 +9,49 @@
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
 
-window.notifyShumwayMessage = function (detail) { };
-window.onExternalCallback = null;
-window.onMessageCallback = null;
-window.onLoadFileCallback = null;
-
 var viewer = document.getElementById('viewer'), onLoaded;
 var promise = new Promise(function (resolve) {
   onLoaded = resolve;
 });
 viewer.addEventListener('load', function () {
   onLoaded(false);
 });
 viewer.addEventListener('mozbrowserloadend', function () {
   onLoaded(true);
 });
 
-Components.utils.import('chrome://shumway/content/SpecialInflate.jsm');
-Components.utils.import('chrome://shumway/content/RtmpUtils.jsm');
+Components.utils.import('chrome://shumway/content/ShumwayCom.jsm');
 
 function runViewer() {
   function handler() {
-    function sendMessage(action, data, sync, callbackCookie) {
-      var detail = {action: action, data: data, sync: sync};
-      if (callbackCookie !== undefined) {
-        detail.callback = true;
-        detail.cookie = callbackCookie;
-      }
-      var result = window.notifyShumwayMessage(detail);
+    function sendMessage(action, data, sync) {
+      var result = shumwayActions.invoke(action, data);
       return Components.utils.cloneInto(result, childWindow);
     }
 
     var childWindow = viewer.contentWindow.wrappedJSObject;
 
-    // Exposing ShumwayCom object/adapter to the unprivileged content -- setting
-    // up Xray wrappers. This allows resending of external interface, clipboard
-    // and other control messages between unprivileged content and
-    // ShumwayStreamConverter.
-    var shumwayComAdapter = Components.utils.createObjectIn(childWindow, {defineAs: 'ShumwayCom'});
-    Components.utils.exportFunction(sendMessage, shumwayComAdapter, {defineAs: 'sendMessage'});
-    Components.utils.exportFunction(enableDebug, shumwayComAdapter, {defineAs: 'enableDebug'});
-    Object.defineProperties(shumwayComAdapter, {
-      onLoadFileCallback: { value: null, writable: true },
-      onExternalCallback: { value: null, writable: true },
-      onMessageCallback: { value: null, writable: true }
+    var shumwayComAdapter = ShumwayCom.createAdapter(childWindow, {
+      sendMessage: sendMessage,
+      enableDebug: enableDebug,
+      getEnvironment: getEnvironment,
     });
-    Components.utils.makeObjectPropsNormal(shumwayComAdapter);
 
-    // Exposing createSpecialInflate function for DEFLATE stream decoding using
-    // Gecko API.
-    if (SpecialInflateUtils.isSpecialInflateEnabled) {
-      Components.utils.exportFunction(function () {
-        return SpecialInflateUtils.createWrappedSpecialInflate(childWindow);
-      }, childWindow, {defineAs: 'createSpecialInflate'});
-    }
-
-    if (RtmpUtils.isRtmpEnabled) {
-      Components.utils.exportFunction(function (params) {
-        return RtmpUtils.createSocket(childWindow, params);
-      }, childWindow, {defineAs: 'createRtmpSocket'});
-      Components.utils.exportFunction(function () {
-        return RtmpUtils.createXHR(childWindow);
-      }, childWindow, {defineAs: 'createRtmpXHR'});
-    }
-
-    window.onExternalCallback = function (call) {
+    shumwayActions.onExternalCallback = function (call) {
       return shumwayComAdapter.onExternalCallback(Components.utils.cloneInto(call, childWindow));
     };
 
-    window.onMessageCallback = function (response) {
-      shumwayComAdapter.onMessageCallback(Components.utils.cloneInto(response, childWindow));
-    };
-
-    window.onLoadFileCallback = function (args) {
+    shumwayActions.onLoadFileCallback = function (args) {
       shumwayComAdapter.onLoadFileCallback(Components.utils.cloneInto(args, childWindow));
     };
 
     childWindow.runViewer();
   }
 
   function handlerOOP() {
     var frameLoader = viewer.QueryInterface(Components.interfaces.nsIFrameLoaderOwner).frameLoader;
@@ -100,110 +60,95 @@ function runViewer() {
 
     var externalInterface;
 
     messageManager.addMessageListener('Shumway:running', function (message) {
       externalInterface = message.objects.externalInterface;
     });
 
     messageManager.addMessageListener('Shumway:message', function (message) {
-      var detail = {
-        action: message.data.action,
-        data: message.data.data,
-        sync: message.data.sync
-      };
-      if (message.data.callback) {
-        detail.callback = true;
-        detail.cookie = message.data.cookie;
+      var data = message.data;
+      var result = shumwayActions.invoke(data.action, data.data);
+      if (message.sync) {
+        return result === undefined ? 'undefined' : JSON.stringify(result);
       }
-
-      return window.notifyShumwayMessage(detail);
     });
 
     messageManager.addMessageListener('Shumway:enableDebug', function (message) {
       enableDebug();
     });
 
-    window.onExternalCallback = function (call) {
+    shumwayActions.onExternalCallback = function (call) {
       return externalInterface.callback(JSON.stringify(call));
     };
 
-    window.onMessageCallback = function (response) {
-      messageManager.sendAsyncMessage('Shumway:messageCallback', {
-        cookie: response.cookie,
-        response: response.response
-      });
-    };
-
-    window.onLoadFileCallback = function (args) {
+    shumwayActions.onLoadFileCallback = function (args) {
       messageManager.sendAsyncMessage('Shumway:loadFile', args);
     };
 
-    messageManager.sendAsyncMessage('Shumway:init', {});
+    messageManager.sendAsyncMessage('Shumway:init', getEnvironment());
   }
 
 
   function handleDebug(connection) {
     viewer.parentNode.removeChild(viewer); // we don't need viewer anymore
     document.body.className = 'remoteDebug';
 
     function sendMessage(data) {
-      var detail = {
-        action: data.action,
-        data: data.data,
-        sync: data.sync
-      };
-      if (data.callback) {
-        detail.callback = true;
-        detail.cookie = data.cookie;
-      }
-      return window.notifyShumwayMessage(detail);
+      return shumwayActions.invoke(data.id, data.data);
     }
 
     connection.onData = function (data) {
       switch (data.action) {
         case 'sendMessage':
-          return sendMessage(data.detail);
+          return sendMessage(data);
         case 'reload':
           document.body.className = 'remoteReload';
           setTimeout(function () {
             window.top.location.reload();
           }, 1000);
           return;
       }
     };
 
-    window.onExternalCallback = function (call) {
+    shumwayActions.onExternalCallback = function (call) {
       return connection.send({action: 'onExternalCallback', detail: call});
     };
 
-    window.onMessageCallback = function (response) {
-      return connection.send({action: 'onMessageCallback', detail: response});
-    };
-
-    window.onLoadFileCallback = function (args) {
+    shumwayActions.onLoadFileCallback = function (args) {
       if (args.array) {
         args.array = Array.prototype.slice.call(args.array, 0);
       }
       return connection.send({action: 'onLoadFileCallback', detail: args}, true);
     };
 
     connection.send({action: 'runViewer'}, true);
   }
 
+  function getEnvironment() {
+    return {
+      swfUrl: window.shumwayStartupInfo.url,
+      privateBrowsing: window.shumwayStartupInfo.privateBrowsing
+    };
+  }
+
   function enableDebug() {
-    DebugUtils.enableDebug(window.swfUrlLoading);
+    DebugUtils.enableDebug(window.shumwayStartupInfo.url);
     setTimeout(function () {
       window.top.location.reload();
     }, 1000);
   }
 
+  var startupInfo = window.shumwayStartupInfo;
+  var shumwayActions = ShumwayCom.createActions(startupInfo, window, document);
+
   promise.then(function (oop) {
     if (DebugUtils.isEnabled) {
-      DebugUtils.createDebuggerConnection(window.swfUrlLoading).then(function (debuggerConnection) {
+      DebugUtils.createDebuggerConnection(window.shumwayStartupInfo.url).then(
+          function (debuggerConnection) {
         if (debuggerConnection) {
           handleDebug(debuggerConnection);
         } else if (oop) {
           handlerOOP();
         } else {
           handler();
         }
       });
--- a/browser/extensions/shumway/content/ShumwayBootstrapUtils.jsm
+++ b/browser/extensions/shumway/content/ShumwayBootstrapUtils.jsm
@@ -90,17 +90,21 @@ function allowedPlatformForMedia() {
   if (oscpu.indexOf('Intel Mac OS X') === 0) {
     return true;
   }
   // Other platforms are not supported yet.
   return false;
 }
 
 var ShumwayBootstrapUtils = {
+  isRegistered: false,
+
   register: function () {
+    this.isRegistered = true;
+
     // Register the components.
     converterFactory.register(ShumwayStreamConverter);
     overlayConverterFactory.register(ShumwayStreamOverlayConverter);
 
     if (registerOverlayPreview) {
       var ignoreCTP = getBoolPref(PREF_IGNORE_CTP, true);
       var whitelist = getStringPref(PREF_WHITELIST);
       // Some platforms cannot support video playback, and our whitelist targets
@@ -112,16 +116,18 @@ var ShumwayBootstrapUtils = {
         whitelist = 'http://www.areweflashyet.com/*.swf';
       }
       Ph.registerPlayPreviewMimeType(SWF_CONTENT_TYPE, ignoreCTP,
                                      undefined, whitelist);
     }
   },
 
   unregister: function () {
+    this.isRegistered = false;
+
     // Remove the contract/component.
     converterFactory.unregister();
     overlayConverterFactory.unregister();
 
     if (registerOverlayPreview) {
       Ph.unregisterPlayPreviewMimeType(SWF_CONTENT_TYPE);
     }
   }
--- a/browser/extensions/shumway/content/ShumwayStreamConverter.jsm
+++ b/browser/extensions/shumway/content/ShumwayStreamConverter.jsm
@@ -25,85 +25,47 @@ const Cu = Components.utils;
 
 const SHUMWAY_CONTENT_TYPE = 'application/x-shockwave-flash';
 const EXPECTED_PLAYPREVIEW_URI_PREFIX = 'data:application/x-moz-playpreview;,' +
                                         SHUMWAY_CONTENT_TYPE;
 
 const FIREFOX_ID = '{ec8030f7-c20a-464f-9b0e-13a3a9e97384}';
 const SEAMONKEY_ID = '{92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}';
 
-const MAX_CLIPBOARD_DATA_SIZE = 8000;
-const MAX_USER_INPUT_TIMEOUT = 250; // ms
-
 Cu.import('resource://gre/modules/XPCOMUtils.jsm');
 Cu.import('resource://gre/modules/Services.jsm');
 Cu.import('resource://gre/modules/NetUtil.jsm');
-Cu.import('resource://gre/modules/Promise.jsm');
 
 XPCOMUtils.defineLazyModuleGetter(this, 'PrivateBrowsingUtils',
   'resource://gre/modules/PrivateBrowsingUtils.jsm');
 
-XPCOMUtils.defineLazyModuleGetter(this, 'AddonManager',
-  'resource://gre/modules/AddonManager.jsm');
-
 XPCOMUtils.defineLazyModuleGetter(this, 'ShumwayTelemetry',
   'resource://shumway/ShumwayTelemetry.jsm');
 
-let Svc = {};
-XPCOMUtils.defineLazyServiceGetter(Svc, 'mime',
-                                   '@mozilla.org/mime;1', 'nsIMIMEService');
-
-let StringInputStream = Cc["@mozilla.org/io/string-input-stream;1"];
-let MimeInputStream = Cc["@mozilla.org/network/mime-input-stream;1"];
-
 function getBoolPref(pref, def) {
   try {
     return Services.prefs.getBoolPref(pref);
   } catch (ex) {
     return def;
   }
 }
 
-function getStringPref(pref, def) {
-  try {
-    return Services.prefs.getComplexValue(pref, Ci.nsISupportsString).data;
-  } catch (ex) {
-    return def;
-  }
-}
-
 function log(aMsg) {
   let msg = 'ShumwayStreamConverter.js: ' + (aMsg.join ? aMsg.join('') : aMsg);
   Services.console.logStringMessage(msg);
   dump(msg + '\n');
 }
 
 function getDOMWindow(aChannel) {
   var requestor = aChannel.notificationCallbacks ||
                   aChannel.loadGroup.notificationCallbacks;
   var win = requestor.getInterface(Components.interfaces.nsIDOMWindow);
   return win;
 }
 
-function makeContentReadable(obj, window) {
-  if (Cu.cloneInto) {
-    return Cu.cloneInto(obj, window);
-  }
-  // TODO remove for Firefox 32+
-  if (typeof obj !== 'object' || obj === null) {
-    return obj;
-  }
-  var expose = {};
-  for (let k in obj) {
-    expose[k] = "rw";
-  }
-  obj.__exposedProps__ = expose;
-  return obj;
-}
-
 function parseQueryString(qs) {
   if (!qs)
     return {};
 
   if (qs.charAt(0) == '?')
     qs = qs.slice(1);
 
   var values = qs.split('&');
@@ -112,585 +74,104 @@ function parseQueryString(qs) {
     var kv = values[i].split('=');
     var key = kv[0], value = kv[1];
     obj[decodeURIComponent(key)] = decodeURIComponent(value);
   }
 
   return obj;
 }
 
-function domainMatches(host, pattern) {
-  if (!pattern) return false;
-  if (pattern === '*') return true;
-  host = host.toLowerCase();
-  var parts = pattern.toLowerCase().split('*');
-  if (host.indexOf(parts[0]) !== 0) return false;
-  var p = parts[0].length;
-  for (var i = 1; i < parts.length; i++) {
-    var j = host.indexOf(parts[i], p);
-    if (j === -1) return false;
-    p = j + parts[i].length;
-  }
-  return parts[parts.length - 1] === '' || p === host.length;
-}
-
-function fetchPolicyFile(url, cache, callback) {
-  if (url in cache) {
-    return callback(cache[url]);
-  }
-
-  log('Fetching policy file at ' + url);
-  var MAX_POLICY_SIZE = 8192;
-  var xhr =  Components.classes["@mozilla.org/xmlextras/xmlhttprequest;1"]
-                               .createInstance(Ci.nsIXMLHttpRequest);
-  xhr.open('GET', url, true);
-  xhr.overrideMimeType('text/xml');
-  xhr.onprogress = function (e) {
-    if (e.loaded >= MAX_POLICY_SIZE) {
-      xhr.abort();
-      cache[url] = false;
-      callback(null, 'Max policy size');
-    }
-  };
-  xhr.onreadystatechange = function(event) {
-    if (xhr.readyState === 4) {
-      // TODO disable redirects
-      var doc = xhr.responseXML;
-      if (xhr.status !== 200 || !doc) {
-        cache[url] = false;
-        return callback(null, 'Invalid HTTP status: ' + xhr.statusText);
-      }
-      // parsing params
-      var params = doc.documentElement.childNodes;
-      var policy = { siteControl: null, allowAccessFrom: []};
-      for (var i = 0; i < params.length; i++) {
-        switch (params[i].localName) {
-        case 'site-control':
-          policy.siteControl = params[i].getAttribute('permitted-cross-domain-policies');
-          break;
-        case 'allow-access-from':
-          var access = {
-            domain: params[i].getAttribute('domain'),
-            security: params[i].getAttribute('security') === 'true'
-          };
-          policy.allowAccessFrom.push(access);
-          break;
-        default:
-          // TODO allow-http-request-headers-from and other
-          break;
-        }
-      }
-      callback(cache[url] = policy);
-    }
-  };
-  xhr.send(null);
-}
-
 function isContentWindowPrivate(win) {
   if (!('isContentWindowPrivate' in PrivateBrowsingUtils)) {
     return PrivateBrowsingUtils.isWindowPrivate(win);
   }
   return PrivateBrowsingUtils.isContentWindowPrivate(win);
 }
 
-function isShumwayEnabledFor(actions) {
+function isShumwayEnabledFor(startupInfo) {
   // disabled for PrivateBrowsing windows
-  if (isContentWindowPrivate(actions.window) &&
+  if (isContentWindowPrivate(startupInfo.window) &&
       !getBoolPref('shumway.enableForPrivate', false)) {
     return false;
   }
   // disabled if embed tag specifies shumwaymode (for testing purpose)
-  if (actions.objectParams['shumwaymode'] === 'off') {
+  if (startupInfo.objectParams['shumwaymode'] === 'off') {
     return false;
   }
 
-  var url = actions.url;
-  var baseUrl = actions.baseUrl;
+  var url = startupInfo.url;
+  var baseUrl = startupInfo.baseUrl;
 
   // blacklisting well known sites with issues
   if (/\.ytimg\.com\//i.test(url) /* youtube movies */ ||
     /\/vui.swf\b/i.test(url) /* vidyo manager */  ||
     /soundcloud\.com\/player\/assets\/swf/i.test(url) /* soundcloud */ ||
     /sndcdn\.com\/assets\/swf/.test(url) /* soundcloud */ ||
     /vimeocdn\.com/.test(url) /* vimeo */) {
     return false;
   }
 
   return true;
 }
 
-function getVersionInfo() {
-  var deferred = Promise.defer();
-  var versionInfo = {
-    geckoVersion: 'unknown',
-    geckoBuildID: 'unknown',
-    shumwayVersion: 'unknown'
-  };
-  try {
-    var appInfo = Components.classes["@mozilla.org/xre/app-info;1"]
-        .getService(Components.interfaces.nsIXULAppInfo);
-    versionInfo.geckoVersion = appInfo.version;
-    versionInfo.geckoBuildID = appInfo.appBuildID;
-  } catch (e) {
-    log('Error encountered while getting platform version info: ' + e);
-  }
-  var xhr = Components.classes["@mozilla.org/xmlextras/xmlhttprequest;1"]
-    .createInstance(Ci.nsIXMLHttpRequest);
-  xhr.open('GET', 'resource://shumway/version.txt', true);
-  xhr.overrideMimeType('text/plain');
-  xhr.onload = function () {
-    try {
-      // Trying to merge version.txt lines into something like:
-      //   "version (sha) details"
-      var lines = xhr.responseText.split(/\n/g);
-      lines[1] = '(' + lines[1] + ')';
-      versionInfo.shumwayVersion = lines.join(' ');
-    } catch (e) {
-      log('Error while parsing version info: ' + e);
-    }
-    deferred.resolve(versionInfo);
-  };
-  xhr.onerror = function () {
-    log('Error while reading version info: ' + xhr.error);
-    deferred.resolve(versionInfo);
-  };
-  xhr.send();
-
-  return deferred.promise;
-}
-
-function fallbackToNativePlugin(window, userAction, activateCTP) {
-  var obj = window.frameElement;
-  var doc = obj.ownerDocument;
-  var e = doc.createEvent("CustomEvent");
-  e.initCustomEvent("MozPlayPlugin", true, true, activateCTP);
-  obj.dispatchEvent(e);
-
-  ShumwayTelemetry.onFallback(userAction);
-}
-
-// All the priviledged actions.
-function ChromeActions(url, window, document) {
-  this.url = url;
-  this.objectParams = null;
-  this.movieParams = null;
-  this.baseUrl = url;
-  this.isOverlay = false;
-  this.isPausedAtStart = false;
-  this.window = window;
-  this.document = document;
-  this.externalComInitialized = false;
-  this.allowScriptAccess = false;
-  this.lastUserInput = 0;
-  this.crossdomainRequestsCache = Object.create(null);
-  this.telemetry = {
-    startTime: Date.now(),
-    features: [],
-    errors: [],
-    pageIndex: 0
-  };
-}
-
-ChromeActions.prototype = {
-  getBoolPref: function (data) {
-    if (!/^shumway\./.test(data.pref)) {
-      return null;
-    }
-    return getBoolPref(data.pref, data.def);
-  },
-  getCompilerSettings: function getCompilerSettings() {
-    return {
-      appCompiler: getBoolPref('shumway.appCompiler', true),
-      sysCompiler: getBoolPref('shumway.sysCompiler', false),
-      verifier: getBoolPref('shumway.verifier', true)
-    };
-  },
-  addProfilerMarker: function (marker) {
-    if ('nsIProfiler' in Ci) {
-      let profiler = Cc["@mozilla.org/tools/profiler;1"].getService(Ci.nsIProfiler);
-      profiler.AddMarker(marker);
-    }
-  },
-  getPluginParams: function getPluginParams() {
-    return {
-      url: this.url,
-      baseUrl : this.baseUrl,
-      movieParams: this.movieParams,
-      objectParams: this.objectParams,
-      isOverlay: this.isOverlay,
-      isPausedAtStart: this.isPausedAtStart
-     };
-  },
-  _canDownloadFile: function canDownloadFile(data, callback) {
-    var url = data.url, checkPolicyFile = data.checkPolicyFile;
-
-    // TODO flash cross-origin request
-    if (url === this.url) {
-      // allow downloading for the original file
-      return callback({success: true});
-    }
-
-    // allows downloading from the same origin
-    var parsedUrl, parsedBaseUrl;
-    try {
-      parsedUrl = NetUtil.newURI(url);
-    } catch (ex) { /* skipping invalid urls */ }
-    try {
-      parsedBaseUrl = NetUtil.newURI(this.url);
-    } catch (ex) { /* skipping invalid urls */ }
-
-    if (parsedUrl && parsedBaseUrl &&
-        parsedUrl.prePath === parsedBaseUrl.prePath) {
-      return callback({success: true});
-    }
-
-    // additionally using internal whitelist
-    var whitelist = getStringPref('shumway.whitelist', '');
-    if (whitelist && parsedUrl) {
-      var whitelisted = whitelist.split(',').some(function (i) {
-        return domainMatches(parsedUrl.host, i);
-      });
-      if (whitelisted) {
-        return callback({success: true});
-      }
-    }
-
-    if (!checkPolicyFile || !parsedUrl || !parsedBaseUrl) {
-      return callback({success: false});
-    }
-
-    // we can request crossdomain.xml
-    fetchPolicyFile(parsedUrl.prePath + '/crossdomain.xml', this.crossdomainRequestsCache,
-      function (policy, error) {
-
-      if (!policy || policy.siteControl === 'none') {
-        return callback({success: false});
-      }
-      // TODO assuming master-only, there are also 'by-content-type', 'all', etc.
-
-      var allowed = policy.allowAccessFrom.some(function (i) {
-        return domainMatches(parsedBaseUrl.host, i.domain) &&
-          (!i.secure || parsedBaseUrl.scheme.toLowerCase() === 'https');
-      });
-      return callback({success: allowed});
-    }.bind(this));
-  },
-  loadFile: function loadFile(data) {
-    function notifyLoadFileListener(data) {
-      if (!win.wrappedJSObject.onLoadFileCallback) {
-        return;
-      }
-      win.wrappedJSObject.onLoadFileCallback(data);
-    }
-
-    var url = data.url;
-    var checkPolicyFile = data.checkPolicyFile;
-    var sessionId = data.sessionId;
-    var limit = data.limit || 0;
-    var method = data.method || "GET";
-    var mimeType = data.mimeType;
-    var postData = data.postData || null;
-
-    var win = this.window;
-    var baseUrl = this.baseUrl;
-
-    var performXHR = function () {
-      var xhr = Components.classes["@mozilla.org/xmlextras/xmlhttprequest;1"]
-                                  .createInstance(Ci.nsIXMLHttpRequest);
-      xhr.open(method, url, true);
-      xhr.responseType = "moz-chunked-arraybuffer";
-
-      if (baseUrl) {
-        // Setting the referer uri, some site doing checks if swf is embedded
-        // on the original page.
-        xhr.setRequestHeader("Referer", baseUrl);
-      }
-
-      // TODO apply range request headers if limit is specified
-
-      var lastPosition = 0;
-      xhr.onprogress = function (e) {
-        var position = e.loaded;
-        var data = new Uint8Array(xhr.response);
-        notifyLoadFileListener({callback:"loadFile", sessionId: sessionId,
-             topic: "progress", array: data, loaded: position, total: e.total});
-        lastPosition = position;
-        if (limit && e.total >= limit) {
-          xhr.abort();
-        }
-      };
-      xhr.onreadystatechange = function(event) {
-        if (xhr.readyState === 4) {
-          if (xhr.status !== 200 && xhr.status !== 0) {
-            notifyLoadFileListener({callback:"loadFile", sessionId: sessionId, topic: "error", error: xhr.statusText});
-          }
-          notifyLoadFileListener({callback:"loadFile", sessionId: sessionId, topic: "close"});
-        }
-      };
-      if (mimeType)
-        xhr.setRequestHeader("Content-Type", mimeType);
-      xhr.send(postData);
-      notifyLoadFileListener({callback:"loadFile", sessionId: sessionId, topic: "open"});
-    };
-
-    this._canDownloadFile({url: url, checkPolicyFile: checkPolicyFile}, function (data) {
-      if (data.success) {
-        performXHR();
-      } else {
-        log("data access id prohibited to " + url + " from " + baseUrl);
-        notifyLoadFileListener({callback:"loadFile", sessionId: sessionId, topic: "error",
-          error: "only original swf file or file from the same origin loading supported"});
-      }
-    });
-  },
-  navigateTo: function (data) {
-    var embedTag = this.embedTag.wrappedJSObject;
-    var window = embedTag ? embedTag.ownerDocument.defaultView : this.window;
-    window.open(data.url, data.target || '_self');
-  },
-  fallback: function(automatic) {
-    automatic = !!automatic;
-    fallbackToNativePlugin(this.window, !automatic, automatic);
-  },
-  userInput: function() {
-    var win = this.window;
-    var winUtils = win.QueryInterface(Components.interfaces.nsIInterfaceRequestor).
-                       getInterface(Components.interfaces.nsIDOMWindowUtils);
-    if (winUtils.isHandlingUserInput) {
-      this.lastUserInput = Date.now();
-    }
-  },
-  isUserInputInProgress: function () {
-    // TODO userInput does not work for OOP
-    if (!getBoolPref('shumway.userInputSecurity', true)) {
-      return true;
-    }
-
-    // We don't trust our Shumway non-privileged code just yet to verify the
-    // user input -- using userInput function above to track that.
-    if ((Date.now() - this.lastUserInput) > MAX_USER_INPUT_TIMEOUT) {
-      return false;
-    }
-    // TODO other security checks?
-    return true;
-  },
-  setClipboard: function (data) {
-    if (typeof data !== 'string' || !this.isUserInputInProgress()) {
-      return;
-    }
-
-    let clipboard = Cc["@mozilla.org/widget/clipboardhelper;1"]
-                      .getService(Ci.nsIClipboardHelper);
-    clipboard.copyString(data);
-  },
-  setFullscreen: function (enabled) {
-    enabled = !!enabled;
-
-    if (!this.isUserInputInProgress()) {
-      return;
-    }
-
-    var target = this.embedTag || this.document.body;
-    if (enabled) {
-      target.mozRequestFullScreen();
-    } else {
-      target.ownerDocument.mozCancelFullScreen();
-    }
-  },
-  endActivation: function () {
-    if (ActivationQueue.currentNonActive === this) {
-      ActivationQueue.activateNext();
-    }
-  },
-  reportTelemetry: function (data) {
-    var topic = data.topic;
-    switch (topic) {
-    case 'firstFrame':
-      var time = Date.now() - this.telemetry.startTime;
-      ShumwayTelemetry.onFirstFrame(time);
-      break;
-    case 'parseInfo':
-      ShumwayTelemetry.onParseInfo({
-        parseTime: +data.parseTime,
-        size: +data.bytesTotal,
-        swfVersion: data.swfVersion|0,
-        frameRate: +data.frameRate,
-        width: data.width|0,
-        height: data.height|0,
-        bannerType: data.bannerType|0,
-        isAvm2: !!data.isAvm2
-      });
-      break;
-    case 'feature':
-      var featureType = data.feature|0;
-      var MIN_FEATURE_TYPE = 0, MAX_FEATURE_TYPE = 999;
-      if (featureType >= MIN_FEATURE_TYPE && featureType <= MAX_FEATURE_TYPE &&
-          !this.telemetry.features[featureType]) {
-        this.telemetry.features[featureType] = true; // record only one feature per SWF
-        ShumwayTelemetry.onFeature(featureType);
-      }
-      break;
-    case 'error':
-      var errorType = data.error|0;
-      var MIN_ERROR_TYPE = 0, MAX_ERROR_TYPE = 2;
-      if (errorType >= MIN_ERROR_TYPE && errorType <= MAX_ERROR_TYPE &&
-          !this.telemetry.errors[errorType]) {
-        this.telemetry.errors[errorType] = true; // record only one report per SWF
-        ShumwayTelemetry.onError(errorType);
-      }
-      break;
-    }
-  },
-  reportIssue: function(exceptions) {
-    var urlTemplate = "https://bugzilla.mozilla.org/enter_bug.cgi?op_sys=All&priority=--" +
-                      "&rep_platform=All&target_milestone=---&version=Trunk&product=Firefox" +
-                      "&component=Shumway&short_desc=&comment={comment}" +
-                      "&bug_file_loc={url}";
-    var windowUrl = this.window.parent.wrappedJSObject.location + '';
-    var url = urlTemplate.split('{url}').join(encodeURIComponent(windowUrl));
-    var params = {
-      swf: encodeURIComponent(this.url)
-    };
-    getVersionInfo().then(function (versions) {
-      params.versions = versions;
-    }).then(function () {
-      var ffbuild = params.versions.geckoVersion + ' (' + params.versions.geckoBuildID + ')';
-      //params.exceptions = encodeURIComponent(exceptions);
-      var comment = '+++ Initially filed via the problem reporting functionality in Shumway +++\n' +
-                    'Please add any further information that you deem helpful here:\n\n\n\n' +
-                    '----------------------\n\n' +
-                    'Technical Information:\n' +
-                    'Firefox version: ' + ffbuild + '\n' +
-                    'Shumway version: ' + params.versions.shumwayVersion;
-      url = url.split('{comment}').join(encodeURIComponent(comment));
-      this.window.open(url);
-    }.bind(this));
-  },
-  externalCom: function (data) {
-    if (!this.allowScriptAccess)
-      return;
-
-    // TODO check security ?
-    var parentWindow = this.window.parent.wrappedJSObject;
-    var embedTag = this.embedTag.wrappedJSObject;
-    switch (data.action) {
-    case 'init':
-      if (this.externalComInitialized)
-        return;
-
-      this.externalComInitialized = true;
-      initExternalCom(parentWindow, embedTag, this.window);
-      return;
-    case 'getId':
-      return embedTag.id;
-    case 'eval':
-      return parentWindow.__flash__eval(data.expression);
-    case 'call':
-      return parentWindow.__flash__call(data.request);
-    case 'register':
-      return embedTag.__flash__registerCallback(data.functionName);
-    case 'unregister':
-      return embedTag.__flash__unregisterCallback(data.functionName);
-    }
-  },
-  getWindowUrl: function() {
-    return this.window.parent.wrappedJSObject.location + '';
-  }
-};
-
-// Event listener to trigger chrome privedged code.
-function RequestListener(actions) {
-  this.actions = actions;
-}
-// Receive an event and synchronously or asynchronously responds.
-RequestListener.prototype.receive = function(detail) {
-  var action = detail.action;
-  var data = detail.data;
-  var sync = detail.sync;
-  var actions = this.actions;
-  if (!(action in actions)) {
-    log('Unknown action: ' + action);
-    return;
-  }
-  if (sync) {
-    var response = actions[action].call(this.actions, data);
-    return response === undefined ? undefined : JSON.stringify(response);
-  }
-
-  var responseCallback;
-  if (detail.callback) {
-    var cookie = detail.cookie;
-    response = function sendResponse(response) {
-      var win = actions.window;
-      if (win.wrappedJSObject.onMessageCallback) {
-        win.wrappedJSObject.onMessageCallback({
-          response: response === undefined ? undefined : JSON.stringify(response),
-          cookie: cookie
-        });
-      }
-    };
-  }
-  actions[action].call(this.actions, data, responseCallback);
-};
-
 var ActivationQueue = {
   nonActive: [],
   initializing: -1,
   activationTimeout: null,
   get currentNonActive() {
-    return this.nonActive[this.initializing];
+    return this.nonActive[this.initializing].startupInfo;
   },
-  enqueue: function ActivationQueue_enqueue(actions) {
-    this.nonActive.push(actions);
+  enqueue: function ActivationQueue_enqueue(startupInfo, callback) {
+    this.nonActive.push({startupInfo: startupInfo, callback: callback});
     if (this.nonActive.length === 1) {
       this.activateNext();
     }
   },
   findLastOnPage: function ActivationQueue_findLastOnPage(baseUrl) {
     for (var i = this.nonActive.length - 1; i >= 0; i--) {
-      if (this.nonActive[i].baseUrl === baseUrl) {
-        return this.nonActive[i];
+      if (this.nonActive[i].startupInfo.baseUrl === baseUrl) {
+        return this.nonActive[i].startupInfo;
       }
     }
     return null;
   },
   activateNext: function ActivationQueue_activateNext() {
-    function weightInstance(actions) {
+    function weightInstance(startupInfo) {
       // set of heuristics for find the most important instance to load
       var weight = 0;
       // using linear distance to the top-left of the view area
-      if (actions.embedTag) {
-        var window = actions.window;
-        var clientRect = actions.embedTag.getBoundingClientRect();
+      if (startupInfo.embedTag) {
+        var window = startupInfo.window;
+        var clientRect = startupInfo.embedTag.getBoundingClientRect();
         weight -= Math.abs(clientRect.left - window.scrollX) +
                   Math.abs(clientRect.top - window.scrollY);
       }
-      var doc = actions.document;
+      var doc = startupInfo.window.document;
       if (!doc.hidden) {
         weight += 100000; // might not be that important if hidden
       }
-      if (actions.embedTag &&
-          actions.embedTag.ownerDocument.hasFocus()) {
+      if (startupInfo.embedTag &&
+          startupInfo.embedTag.ownerDocument.hasFocus()) {
         weight += 10000; // parent document is focused
       }
       return weight;
     }
 
     if (this.activationTimeout) {
       this.activationTimeout.cancel();
       this.activationTimeout = null;
     }
 
     if (this.initializing >= 0) {
       this.nonActive.splice(this.initializing, 1);
     }
     var weights = [];
     for (var i = 0; i < this.nonActive.length; i++) {
       try {
-        var weight = weightInstance(this.nonActive[i]);
+        var weight = weightInstance(this.nonActive[i].startupInfo);
         weights.push(weight);
       } catch (ex) {
         // unable to calc weight the instance, removing
         log('Shumway instance weight calculation failed: ' + ex);
         this.nonActive.splice(i, 1);
         i--;
       }
     }
@@ -706,17 +187,17 @@ var ActivationQueue = {
       for (var i = 1; i < weights.length; i++) {
         if (maxWeight < weights[i]) {
           maxWeight = weights[i];
           maxWeightIndex = i;
         }
       }
       try {
         this.initializing = maxWeightIndex;
-        this.nonActive[maxWeightIndex].activationCallback();
+        this.nonActive[maxWeightIndex].callback();
         break;
       } catch (ex) {
         // unable to initialize the instance, trying another one
         log('Shumway instance initialization failed: ' + ex);
         this.nonActive.splice(maxWeightIndex, 1);
         weights.splice(maxWeightIndex, 1);
       }
     } while (true);
@@ -725,40 +206,18 @@ var ActivationQueue = {
     this.activationTimeout = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
     this.activationTimeout.initWithCallback(function () {
       log('Timeout during shumway instance initialization');
       this.activateNext();
     }.bind(this), ACTIVATION_TIMEOUT, Ci.nsITimer.TYPE_ONE_SHOT);
   }
 };
 
-function activateShumwayScripts(window, requestListener) {
-  function loadScripts(scripts, callback) {
-    function loadScript(i) {
-      if (i >= scripts.length) {
-        callback();
-        return;
-      }
-      var script = document.createElement('script');
-      script.type = "text/javascript";
-      script.src = scripts[i];
-      script.onload = function () {
-        loadScript(i + 1);
-      };
-      head.appendChild(script);
-    }
-    var document = window.document.wrappedJSObject;
-    var head = document.getElementsByTagName('head')[0];
-    loadScript(0);
-  }
-
+function activateShumwayScripts(window) {
   function initScripts() {
-    window.wrappedJSObject.notifyShumwayMessage = function () {
-      return requestListener.receive.apply(requestListener, arguments);
-    };
     window.wrappedJSObject.runViewer();
 
     var parentWindow = window.parent;
     var viewerWindow = window.viewer.contentWindow;
 
     function activate(e) {
       e.preventDefault();
       viewerWindow.removeEventListener('mousedown', activate, true);
@@ -802,89 +261,49 @@ function activateShumwayScripts(window, 
     }
 
     function sendFocusEvent(type) {
       var event = viewerWindow.document.createEvent("UIEvent");
       event.initEvent(type, false, true);
       viewerWindow.dispatchEvent(event);
     }
 
-    viewerWindow.addEventListener('mousedown', activate, true);
+    if (viewerWindow) {
+      viewerWindow.addEventListener('mousedown', activate, true);
+    }
+
+    window.addEventListener('shumwayFallback', function (e) {
+      var automatic = !!e.detail.automatic;
+      fallbackToNativePlugin(window, !automatic, automatic);
+    });
+
+    window.addEventListener('shumwayActivated', function (e) {
+      if (ActivationQueue.currentNonActive &&
+          ActivationQueue.currentNonActive.window === window) {
+        ActivationQueue.activateNext();
+      }
+    });
   }
 
   if (window.document.readyState === "interactive" ||
       window.document.readyState === "complete") {
     initScripts();
   } else {
     window.document.addEventListener('DOMContentLoaded', initScripts);
   }
 }
 
-function initExternalCom(wrappedWindow, wrappedObject, targetWindow) {
-  var traceExternalInterface = getBoolPref('shumway.externalInterface.trace', false);
-  if (!wrappedWindow.__flash__initialized) {
-    wrappedWindow.__flash__initialized = true;
-    wrappedWindow.__flash__toXML = function __flash__toXML(obj) {
-      switch (typeof obj) {
-      case 'boolean':
-        return obj ? '<true/>' : '<false/>';
-      case 'number':
-        return '<number>' + obj + '</number>';
-      case 'object':
-        if (obj === null) {
-          return '<null/>';
-        }
-        if ('hasOwnProperty' in obj && obj.hasOwnProperty('length')) {
-          // array
-          var xml = '<array>';
-          for (var i = 0; i < obj.length; i++) {
-            xml += '<property id="' + i + '">' + __flash__toXML(obj[i]) + '</property>';
-          }
-          return xml + '</array>';
-        }
-        var xml = '<object>';
-        for (var i in obj) {
-          xml += '<property id="' + i + '">' + __flash__toXML(obj[i]) + '</property>';
-        }
-        return xml + '</object>';
-      case 'string':
-        return '<string>' + obj.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;') + '</string>';
-      case 'undefined':
-        return '<undefined/>';
-      }
-    };
-    wrappedWindow.__flash__eval = function (expr) {
-      traceExternalInterface && this.console.log('__flash__eval: ' + expr);
-      // allowScriptAccess protects page from unwanted swf scripts,
-      // we can execute script in the page context without restrictions.
-      var result = this.eval(expr);
-      traceExternalInterface && this.console.log('__flash__eval (result): ' + result);
-      return result;
-    }.bind(wrappedWindow);
-    wrappedWindow.__flash__call = function (expr) {
-      traceExternalInterface && this.console.log('__flash__call (ignored): ' + expr);
-    };
-  }
-  wrappedObject.__flash__registerCallback = function (functionName) {
-    traceExternalInterface && wrappedWindow.console.log('__flash__registerCallback: ' + functionName);
-    Components.utils.exportFunction(function () {
-      var args = Array.prototype.slice.call(arguments, 0);
-      traceExternalInterface && wrappedWindow.console.log('__flash__callIn: ' + functionName);
-      var result;
-      if (targetWindow.wrappedJSObject.onExternalCallback) {
-        result = targetWindow.wrappedJSObject.onExternalCallback({functionName: functionName, args: args});
-        traceExternalInterface && wrappedWindow.console.log('__flash__callIn (result): ' + result);
-      }
-      return wrappedWindow.eval(result);
-    }, this, { defineAs: functionName });
-  };
-  wrappedObject.__flash__unregisterCallback = function (functionName) {
-    traceExternalInterface && wrappedWindow.console.log('__flash__unregisterCallback: ' + functionName);
-    delete this[functionName];
-  };
+function fallbackToNativePlugin(window, userAction, activateCTP) {
+  var obj = window.frameElement;
+  var doc = obj.ownerDocument;
+  var e = doc.createEvent("CustomEvent");
+  e.initCustomEvent("MozPlayPlugin", true, true, activateCTP);
+  obj.dispatchEvent(e);
+
+  ShumwayTelemetry.onFallback(userAction);
 }
 
 function ShumwayStreamConverterBase() {
 }
 
 ShumwayStreamConverterBase.prototype = {
   QueryInterface: XPCOMUtils.generateQI([
       Ci.nsISupports,
@@ -907,17 +326,17 @@ ShumwayStreamConverterBase.prototype = {
   convert: function(aFromStream, aFromType, aToType, aCtxt) {
     throw Cr.NS_ERROR_NOT_IMPLEMENTED;
   },
 
   getUrlHint: function(requestUrl) {
     return requestUrl.spec;
   },
 
-  createChromeActions: function(window, document, urlHint) {
+  getStartupInfo: function(window, urlHint) {
     var url = urlHint;
     var baseUrl;
     var pageUrl;
     var element = window.frameElement;
     var isOverlay = false;
     var objectParams = {};
     if (element) {
       // PlayPreview overlay "belongs" to the embed/object tag and consists of
@@ -1013,25 +432,29 @@ ShumwayStreamConverterBase.prototype = {
         // checking if page is in same domain (? same protocol and port)
         allowScriptAccess =
           Services.io.newURI('/', null, Services.io.newURI(pageUrl, null, null)).spec ==
           Services.io.newURI('/', null, Services.io.newURI(url, null, null)).spec;
       } catch (ex) {}
       break;
     }
 
-    var actions = new ChromeActions(url, window, document);
-    actions.objectParams = objectParams;
-    actions.movieParams = movieParams;
-    actions.baseUrl = baseUrl || url;
-    actions.isOverlay = isOverlay;
-    actions.embedTag = element;
-    actions.isPausedAtStart = /\bpaused=true$/.test(urlHint);
-    actions.allowScriptAccess = allowScriptAccess;
-    return actions;
+    var startupInfo = {};
+    startupInfo.window = window;
+    startupInfo.url = url;
+    startupInfo.privateBrowsing = isContentWindowPrivate(window);
+    startupInfo.objectParams = objectParams;
+    startupInfo.movieParams = movieParams;
+    startupInfo.baseUrl = baseUrl || url;
+    startupInfo.isOverlay = isOverlay;
+    startupInfo.embedTag = element;
+    startupInfo.isPausedAtStart = /\bpaused=true$/.test(urlHint);
+    startupInfo.allowScriptAccess = allowScriptAccess;
+    startupInfo.pageIndex = 0;
+    return startupInfo;
   },
 
   // nsIStreamConverter::asyncConvertData
   asyncConvertData: function(aFromType, aToType, aListener, aCtxt) {
     // Store the listener passed to us
     this.listener = aListener;
   },
 
@@ -1073,45 +496,39 @@ ShumwayStreamConverterBase.prototype = {
         listener.onDataAvailable(aRequest, context, inputStream, offset, count);
       },
       onStopRequest: function(request, context, statusCode) {
         // Cancel the request so the viewer can handle it.
         aRequest.resume();
         aRequest.cancel(Cr.NS_BINDING_ABORTED);
 
         var domWindow = getDOMWindow(channel);
-        let actions = converter.createChromeActions(domWindow,
-                                                    domWindow.document,
-                                                    converter.getUrlHint(originalURI));
-
-        if (!isShumwayEnabledFor(actions)) {
+        let startupInfo = converter.getStartupInfo(domWindow,
+                                                   converter.getUrlHint(originalURI));
+        if (!isShumwayEnabledFor(startupInfo)) {
           fallbackToNativePlugin(domWindow, false, true);
           return;
         }
 
-        domWindow.swfUrlLoading = actions.url;
+        domWindow.shumwayStartupInfo = startupInfo;
 
         // Report telemetry on amount of swfs on the page
-        if (actions.isOverlay) {
+        if (startupInfo.isOverlay) {
           // Looking for last actions with same baseUrl
-          var prevPageActions = ActivationQueue.findLastOnPage(actions.baseUrl);
-          var pageIndex = !prevPageActions ? 1 : (prevPageActions.telemetry.pageIndex + 1);
-          actions.telemetry.pageIndex = pageIndex;
+          var prevPageStartupInfo = ActivationQueue.findLastOnPage(startupInfo.baseUrl);
+          var pageIndex = !prevPageStartupInfo ? 1 : (prevPageStartupInfo.pageIndex + 1);
+          startupInfo.pageIndex = pageIndex;
           ShumwayTelemetry.onPageIndex(pageIndex);
         } else {
           ShumwayTelemetry.onPageIndex(0);
         }
 
-        let requestListener = new RequestListener(actions);
-
-        actions.activationCallback = function(domWindow, requestListener) {
-          delete this.activationCallback;
-          activateShumwayScripts(domWindow, requestListener);
-        }.bind(actions, domWindow, requestListener);
-        ActivationQueue.enqueue(actions);
+        ActivationQueue.enqueue(startupInfo, function(domWindow) {
+          activateShumwayScripts(domWindow);
+        }.bind(null, domWindow));
 
         listener.onStopRequest(aRequest, context, statusCode);
       }
     };
 
     // Keep the URL the same so the browser sees it as the same.
     channel.originalURI = aRequest.URI;
     channel.loadGroup = aRequest.loadGroup;
--- a/browser/extensions/shumway/content/shumway.gfx.js
+++ b/browser/extensions/shumway/content/shumway.gfx.js
@@ -11,5472 +11,5475 @@
  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
 */
 console.time("Load Shared Dependencies");
 var Shumway, Shumway$$inline_0 = Shumway || (Shumway = {});
-Shumway$$inline_0.version = "0.10.182";
-Shumway$$inline_0.build = "0195a96";
+Shumway$$inline_0.version = "0.10.225";
+Shumway$$inline_0.build = "510390b";
 var jsGlobal = function() {
   return this || (0,eval)("this//# sourceURL=jsGlobal-getter");
 }(), inBrowser = "undefined" !== typeof window && "document" in window && "plugins" in window.document, inFirefox = "undefined" !== typeof navigator && 0 <= navigator.userAgent.indexOf("Firefox");
 function dumpLine(k) {
 }
 jsGlobal.performance || (jsGlobal.performance = {});
 jsGlobal.performance.now || (jsGlobal.performance.now = "undefined" !== typeof dateNow ? dateNow : Date.now);
-function lazyInitializer(k, p, g) {
-  Object.defineProperty(k, p, {get:function() {
-    var b = g();
-    Object.defineProperty(k, p, {value:b, configurable:!0, enumerable:!0});
-    return b;
+function lazyInitializer(k, r, f) {
+  Object.defineProperty(k, r, {get:function() {
+    var c = f();
+    Object.defineProperty(k, r, {value:c, configurable:!0, enumerable:!0});
+    return c;
   }, configurable:!0, enumerable:!0});
 }
 var START_TIME = performance.now();
 (function(k) {
-  function p(a) {
-    return(a | 0) === a;
+  function r(d) {
+    return(d | 0) === d;
   }
-  function g(a) {
-    return "object" === typeof a || "function" === typeof a;
+  function f(d) {
+    return "object" === typeof d || "function" === typeof d;
   }
-  function b(a) {
-    return String(Number(a)) === a;
+  function c(d) {
+    return String(Number(d)) === d;
   }
-  function u(a) {
-    var l = 0;
-    if ("number" === typeof a) {
-      return l = a | 0, a === l && 0 <= l ? !0 : a >>> 0 === a;
+  function t(d) {
+    var e = 0;
+    if ("number" === typeof d) {
+      return e = d | 0, d === e && 0 <= e ? !0 : d >>> 0 === d;
     }
-    if ("string" !== typeof a) {
+    if ("string" !== typeof d) {
       return!1;
     }
-    var c = a.length;
-    if (0 === c) {
+    var b = d.length;
+    if (0 === b) {
       return!1;
     }
-    if ("0" === a) {
+    if ("0" === d) {
       return!0;
     }
-    if (c > k.UINT32_CHAR_BUFFER_LENGTH) {
+    if (b > k.UINT32_CHAR_BUFFER_LENGTH) {
       return!1;
     }
-    var e = 0, l = a.charCodeAt(e++) - 48;
-    if (1 > l || 9 < l) {
+    var g = 0, e = d.charCodeAt(g++) - 48;
+    if (1 > e || 9 < e) {
       return!1;
     }
-    for (var q = 0, s = 0;e < c;) {
-      s = a.charCodeAt(e++) - 48;
-      if (0 > s || 9 < s) {
+    for (var p = 0, u = 0;g < b;) {
+      u = d.charCodeAt(g++) - 48;
+      if (0 > u || 9 < u) {
         return!1;
       }
-      q = l;
-      l = 10 * l + s;
+      p = e;
+      e = 10 * e + u;
     }
-    return q < k.UINT32_MAX_DIV_10 || q === k.UINT32_MAX_DIV_10 && s <= k.UINT32_MAX_MOD_10 ? !0 : !1;
+    return p < k.UINT32_MAX_DIV_10 || p === k.UINT32_MAX_DIV_10 && u <= k.UINT32_MAX_MOD_10 ? !0 : !1;
   }
-  (function(a) {
-    a[a._0 = 48] = "_0";
-    a[a._1 = 49] = "_1";
-    a[a._2 = 50] = "_2";
-    a[a._3 = 51] = "_3";
-    a[a._4 = 52] = "_4";
-    a[a._5 = 53] = "_5";
-    a[a._6 = 54] = "_6";
-    a[a._7 = 55] = "_7";
-    a[a._8 = 56] = "_8";
-    a[a._9 = 57] = "_9";
+  (function(d) {
+    d[d._0 = 48] = "_0";
+    d[d._1 = 49] = "_1";
+    d[d._2 = 50] = "_2";
+    d[d._3 = 51] = "_3";
+    d[d._4 = 52] = "_4";
+    d[d._5 = 53] = "_5";
+    d[d._6 = 54] = "_6";
+    d[d._7 = 55] = "_7";
+    d[d._8 = 56] = "_8";
+    d[d._9 = 57] = "_9";
   })(k.CharacterCodes || (k.CharacterCodes = {}));
   k.UINT32_CHAR_BUFFER_LENGTH = 10;
   k.UINT32_MAX = 4294967295;
   k.UINT32_MAX_DIV_10 = 429496729;
   k.UINT32_MAX_MOD_10 = 5;
-  k.isString = function(a) {
-    return "string" === typeof a;
+  k.isString = function(d) {
+    return "string" === typeof d;
   };
-  k.isFunction = function(a) {
-    return "function" === typeof a;
+  k.isFunction = function(d) {
+    return "function" === typeof d;
   };
-  k.isNumber = function(a) {
-    return "number" === typeof a;
+  k.isNumber = function(d) {
+    return "number" === typeof d;
   };
-  k.isInteger = p;
-  k.isArray = function(a) {
-    return a instanceof Array;
+  k.isInteger = r;
+  k.isArray = function(d) {
+    return d instanceof Array;
   };
-  k.isNumberOrString = function(a) {
-    return "number" === typeof a || "string" === typeof a;
+  k.isNumberOrString = function(d) {
+    return "number" === typeof d || "string" === typeof d;
   };
-  k.isObject = g;
-  k.toNumber = function(a) {
-    return+a;
+  k.isObject = f;
+  k.toNumber = function(d) {
+    return+d;
   };
-  k.isNumericString = b;
-  k.isNumeric = function(a) {
-    if ("number" === typeof a) {
+  k.isNumericString = c;
+  k.isNumeric = function(d) {
+    if ("number" === typeof d) {
       return!0;
     }
-    if ("string" === typeof a) {
-      var l = a.charCodeAt(0);
-      return 65 <= l && 90 >= l || 97 <= l && 122 >= l || 36 === l || 95 === l ? !1 : u(a) || b(a);
+    if ("string" === typeof d) {
+      var e = d.charCodeAt(0);
+      return 65 <= e && 90 >= e || 97 <= e && 122 >= e || 36 === e || 95 === e ? !1 : t(d) || c(d);
     }
     return!1;
   };
-  k.isIndex = u;
-  k.isNullOrUndefined = function(a) {
-    return void 0 == a;
+  k.isIndex = t;
+  k.isNullOrUndefined = function(d) {
+    return void 0 == d;
   };
-  var h;
-  (function(a) {
-    a.error = function(c) {
-      console.error(c);
-      throw Error(c);
-    };
-    a.assert = function(c, e) {
-      void 0 === e && (e = "assertion failed");
-      "" === c && (c = !0);
-      if (!c) {
+  var n;
+  (function(d) {
+    d.error = function(b) {
+      console.error(b);
+      throw Error(b);
+    };
+    d.assert = function(b, g) {
+      void 0 === g && (g = "assertion failed");
+      "" === b && (b = !0);
+      if (!b) {
         if ("undefined" !== typeof console && "assert" in console) {
-          throw console.assert(!1, e), Error(e);
-        }
-        a.error(e.toString());
-      }
-    };
-    a.assertUnreachable = function(c) {
-      throw Error("Reached unreachable location " + Error().stack.split("\n")[1] + c);
-    };
-    a.assertNotImplemented = function(c, e) {
-      c || a.error("notImplemented: " + e);
-    };
-    a.warning = function(c, e, q) {
-    };
-    a.notUsed = function(c) {
-    };
-    a.notImplemented = function(c) {
-    };
-    a.dummyConstructor = function(c) {
-    };
-    a.abstractMethod = function(c) {
-    };
-    var l = {};
-    a.somewhatImplemented = function(c) {
-      l[c] || (l[c] = !0);
-    };
-    a.unexpected = function(c) {
-      a.assert(!1, "Unexpected: " + c);
-    };
-    a.unexpectedCase = function(c) {
-      a.assert(!1, "Unexpected Case: " + c);
-    };
-  })(h = k.Debug || (k.Debug = {}));
+          throw console.assert(!1, g), Error(g);
+        }
+        d.error(g.toString());
+      }
+    };
+    d.assertUnreachable = function(b) {
+      throw Error("Reached unreachable location " + Error().stack.split("\n")[1] + b);
+    };
+    d.assertNotImplemented = function(b, g) {
+      b || d.error("notImplemented: " + g);
+    };
+    d.warning = function(b, g, p) {
+    };
+    d.notUsed = function(b) {
+    };
+    d.notImplemented = function(b) {
+    };
+    d.dummyConstructor = function(b) {
+    };
+    d.abstractMethod = function(b) {
+    };
+    var e = {};
+    d.somewhatImplemented = function(b) {
+      e[b] || (e[b] = !0);
+    };
+    d.unexpected = function(b) {
+      d.assert(!1, "Unexpected: " + b);
+    };
+    d.unexpectedCase = function(b) {
+      d.assert(!1, "Unexpected Case: " + b);
+    };
+  })(n = k.Debug || (k.Debug = {}));
   k.getTicks = function() {
     return performance.now();
   };
-  (function(a) {
-    function l(e, q) {
-      for (var c = 0, a = e.length;c < a;c++) {
-        if (e[c] === q) {
-          return c;
-        }
-      }
-      e.push(q);
-      return e.length - 1;
+  (function(d) {
+    function e(g, p) {
+      for (var b = 0, e = g.length;b < e;b++) {
+        if (g[b] === p) {
+          return b;
+        }
+      }
+      g.push(p);
+      return g.length - 1;
     }
-    a.popManyInto = function(e, q, c) {
-      for (var a = q - 1;0 <= a;a--) {
-        c[a] = e.pop();
-      }
-      c.length = q;
-    };
-    a.popMany = function(e, q) {
-      var c = e.length - q, a = e.slice(c, this.length);
-      e.length = c;
-      return a;
-    };
-    a.popManyIntoVoid = function(e, q) {
-      e.length -= q;
-    };
-    a.pushMany = function(e, q) {
-      for (var c = 0;c < q.length;c++) {
-        e.push(q[c]);
-      }
-    };
-    a.top = function(e) {
-      return e.length && e[e.length - 1];
-    };
-    a.last = function(e) {
-      return e.length && e[e.length - 1];
-    };
-    a.peek = function(e) {
-      return e[e.length - 1];
-    };
-    a.indexOf = function(e, q) {
-      for (var c = 0, a = e.length;c < a;c++) {
-        if (e[c] === q) {
-          return c;
+    d.popManyInto = function(g, b, u) {
+      for (var e = b - 1;0 <= e;e--) {
+        u[e] = g.pop();
+      }
+      u.length = b;
+    };
+    d.popMany = function(g, b) {
+      var u = g.length - b, e = g.slice(u, this.length);
+      g.length = u;
+      return e;
+    };
+    d.popManyIntoVoid = function(g, b) {
+      g.length -= b;
+    };
+    d.pushMany = function(g, b) {
+      for (var u = 0;u < b.length;u++) {
+        g.push(b[u]);
+      }
+    };
+    d.top = function(g) {
+      return g.length && g[g.length - 1];
+    };
+    d.last = function(g) {
+      return g.length && g[g.length - 1];
+    };
+    d.peek = function(g) {
+      return g[g.length - 1];
+    };
+    d.indexOf = function(g, b) {
+      for (var u = 0, e = g.length;u < e;u++) {
+        if (g[u] === b) {
+          return u;
         }
       }
       return-1;
     };
-    a.equals = function(e, c) {
-      if (e.length !== c.length) {
+    d.equals = function(g, b) {
+      if (g.length !== b.length) {
         return!1;
       }
-      for (var s = 0;s < e.length;s++) {
-        if (e[s] !== c[s]) {
+      for (var u = 0;u < g.length;u++) {
+        if (g[u] !== b[u]) {
           return!1;
         }
       }
       return!0;
     };
-    a.pushUnique = l;
-    a.unique = function(e) {
-      for (var c = [], s = 0;s < e.length;s++) {
-        l(c, e[s]);
-      }
-      return c;
-    };
-    a.copyFrom = function(e, c) {
-      e.length = 0;
-      a.pushMany(e, c);
-    };
-    a.ensureTypedArrayCapacity = function(e, c) {
-      if (e.length < c) {
-        var s = e;
-        e = new e.constructor(k.IntegerUtilities.nearestPowerOfTwo(c));
-        e.set(s, 0);
-      }
-      return e;
-    };
-    var c = function() {
-      function e(e) {
-        void 0 === e && (e = 16);
+    d.pushUnique = e;
+    d.unique = function(g) {
+      for (var b = [], u = 0;u < g.length;u++) {
+        e(b, g[u]);
+      }
+      return b;
+    };
+    d.copyFrom = function(g, b) {
+      g.length = 0;
+      d.pushMany(g, b);
+    };
+    d.ensureTypedArrayCapacity = function(g, b) {
+      if (g.length < b) {
+        var u = g;
+        g = new g.constructor(k.IntegerUtilities.nearestPowerOfTwo(b));
+        g.set(u, 0);
+      }
+      return g;
+    };
+    var b = function() {
+      function b(g) {
+        void 0 === g && (g = 16);
         this._f32 = this._i32 = this._u16 = this._u8 = null;
         this._offset = 0;
-        this.ensureCapacity(e);
-      }
-      e.prototype.reset = function() {
+        this.ensureCapacity(g);
+      }
+      b.prototype.reset = function() {
         this._offset = 0;
       };
-      Object.defineProperty(e.prototype, "offset", {get:function() {
+      Object.defineProperty(b.prototype, "offset", {get:function() {
         return this._offset;
       }, enumerable:!0, configurable:!0});
-      e.prototype.getIndex = function(e) {
-        return this._offset / e;
-      };
-      e.prototype.ensureAdditionalCapacity = function() {
+      b.prototype.getIndex = function(b) {
+        return this._offset / b;
+      };
+      b.prototype.ensureAdditionalCapacity = function() {
         this.ensureCapacity(this._offset + 68);
       };
-      e.prototype.ensureCapacity = function(e) {
+      b.prototype.ensureCapacity = function(b) {
         if (!this._u8) {
-          this._u8 = new Uint8Array(e);
+          this._u8 = new Uint8Array(b);
         } else {
-          if (this._u8.length > e) {
+          if (this._u8.length > b) {
             return;
           }
         }
-        var c = 2 * this._u8.length;
-        c < e && (c = e);
-        e = new Uint8Array(c);
-        e.set(this._u8, 0);
-        this._u8 = e;
-        this._u16 = new Uint16Array(e.buffer);
-        this._i32 = new Int32Array(e.buffer);
-        this._f32 = new Float32Array(e.buffer);
-      };
-      e.prototype.writeInt = function(e) {
+        var g = 2 * this._u8.length;
+        g < b && (g = b);
+        b = new Uint8Array(g);
+        b.set(this._u8, 0);
+        this._u8 = b;
+        this._u16 = new Uint16Array(b.buffer);
+        this._i32 = new Int32Array(b.buffer);
+        this._f32 = new Float32Array(b.buffer);
+      };
+      b.prototype.writeInt = function(b) {
         this.ensureCapacity(this._offset + 4);
-        this.writeIntUnsafe(e);
-      };
-      e.prototype.writeIntAt = function(e, c) {
-        this.ensureCapacity(c + 4);
-        this._i32[c >> 2] = e;
-      };
-      e.prototype.writeIntUnsafe = function(e) {
-        this._i32[this._offset >> 2] = e;
+        this.writeIntUnsafe(b);
+      };
+      b.prototype.writeIntAt = function(b, g) {
+        this.ensureCapacity(g + 4);
+        this._i32[g >> 2] = b;
+      };
+      b.prototype.writeIntUnsafe = function(b) {
+        this._i32[this._offset >> 2] = b;
         this._offset += 4;
       };
-      e.prototype.writeFloat = function(e) {
+      b.prototype.writeFloat = function(b) {
         this.ensureCapacity(this._offset + 4);
-        this.writeFloatUnsafe(e);
-      };
-      e.prototype.writeFloatUnsafe = function(e) {
-        this._f32[this._offset >> 2] = e;
+        this.writeFloatUnsafe(b);
+      };
+      b.prototype.writeFloatUnsafe = function(b) {
+        this._f32[this._offset >> 2] = b;
         this._offset += 4;
       };
-      e.prototype.write4Floats = function(e, c, a, l) {
+      b.prototype.write4Floats = function(b, g, e, d) {
         this.ensureCapacity(this._offset + 16);
-        this.write4FloatsUnsafe(e, c, a, l);
-      };
-      e.prototype.write4FloatsUnsafe = function(e, c, a, l) {
-        var d = this._offset >> 2;
-        this._f32[d + 0] = e;
-        this._f32[d + 1] = c;
-        this._f32[d + 2] = a;
-        this._f32[d + 3] = l;
+        this.write4FloatsUnsafe(b, g, e, d);
+      };
+      b.prototype.write4FloatsUnsafe = function(b, g, e, d) {
+        var a = this._offset >> 2;
+        this._f32[a + 0] = b;
+        this._f32[a + 1] = g;
+        this._f32[a + 2] = e;
+        this._f32[a + 3] = d;
         this._offset += 16;
       };
-      e.prototype.write6Floats = function(e, c, a, l, d, t) {
+      b.prototype.write6Floats = function(b, g, e, d, a, h) {
         this.ensureCapacity(this._offset + 24);
-        this.write6FloatsUnsafe(e, c, a, l, d, t);
-      };
-      e.prototype.write6FloatsUnsafe = function(e, c, a, l, d, t) {
-        var n = this._offset >> 2;
-        this._f32[n + 0] = e;
-        this._f32[n + 1] = c;
-        this._f32[n + 2] = a;
-        this._f32[n + 3] = l;
-        this._f32[n + 4] = d;
-        this._f32[n + 5] = t;
+        this.write6FloatsUnsafe(b, g, e, d, a, h);
+      };
+      b.prototype.write6FloatsUnsafe = function(b, g, e, d, a, h) {
+        var q = this._offset >> 2;
+        this._f32[q + 0] = b;
+        this._f32[q + 1] = g;
+        this._f32[q + 2] = e;
+        this._f32[q + 3] = d;
+        this._f32[q + 4] = a;
+        this._f32[q + 5] = h;
         this._offset += 24;
       };
-      e.prototype.subF32View = function() {
+      b.prototype.subF32View = function() {
         return this._f32.subarray(0, this._offset >> 2);
       };
-      e.prototype.subI32View = function() {
+      b.prototype.subI32View = function() {
         return this._i32.subarray(0, this._offset >> 2);
       };
-      e.prototype.subU16View = function() {
+      b.prototype.subU16View = function() {
         return this._u16.subarray(0, this._offset >> 1);
       };
-      e.prototype.subU8View = function() {
+      b.prototype.subU8View = function() {
         return this._u8.subarray(0, this._offset);
       };
-      e.prototype.hashWords = function(e, c, a) {
-        c = this._i32;
-        for (var l = 0;l < a;l++) {
-          e = (31 * e | 0) + c[l] | 0;
-        }
-        return e;
-      };
-      e.prototype.reserve = function(e) {
-        e = e + 3 & -4;
-        this.ensureCapacity(this._offset + e);
-        this._offset += e;
-      };
-      return e;
+      b.prototype.hashWords = function(b, g, e) {
+        g = this._i32;
+        for (var d = 0;d < e;d++) {
+          b = (31 * b | 0) + g[d] | 0;
+        }
+        return b;
+      };
+      b.prototype.reserve = function(b) {
+        b = b + 3 & -4;
+        this.ensureCapacity(this._offset + b);
+        this._offset += b;
+      };
+      return b;
     }();
-    a.ArrayWriter = c;
+    d.ArrayWriter = b;
   })(k.ArrayUtilities || (k.ArrayUtilities = {}));
   var a = function() {
-    function a(l) {
-      this._u8 = new Uint8Array(l);
-      this._u16 = new Uint16Array(l);
-      this._i32 = new Int32Array(l);
-      this._f32 = new Float32Array(l);
+    function d(e) {
+      this._u8 = new Uint8Array(e);
+      this._u16 = new Uint16Array(e);
+      this._i32 = new Int32Array(e);
+      this._f32 = new Float32Array(e);
       this._offset = 0;
     }
-    Object.defineProperty(a.prototype, "offset", {get:function() {
+    Object.defineProperty(d.prototype, "offset", {get:function() {
       return this._offset;
     }, enumerable:!0, configurable:!0});
-    a.prototype.isEmpty = function() {
+    d.prototype.isEmpty = function() {
       return this._offset === this._u8.length;
     };
-    a.prototype.readInt = function() {
-      var a = this._i32[this._offset >> 2];
+    d.prototype.readInt = function() {
+      var e = this._i32[this._offset >> 2];
       this._offset += 4;
-      return a;
-    };
-    a.prototype.readFloat = function() {
-      var a = this._f32[this._offset >> 2];
+      return e;
+    };
+    d.prototype.readFloat = function() {
+      var e = this._f32[this._offset >> 2];
       this._offset += 4;
-      return a;
-    };
-    return a;
+      return e;
+    };
+    return d;
   }();
   k.ArrayReader = a;
-  (function(a) {
-    function l(e, c) {
-      return Object.prototype.hasOwnProperty.call(e, c);
+  (function(d) {
+    function e(b, p) {
+      return Object.prototype.hasOwnProperty.call(b, p);
     }
-    function c(e, c) {
-      for (var a in c) {
-        l(c, a) && (e[a] = c[a]);
+    function b(b, p) {
+      for (var u in p) {
+        e(p, u) && (b[u] = p[u]);
       }
     }
-    a.boxValue = function(e) {
-      return void 0 == e || g(e) ? e : Object(e);
-    };
-    a.toKeyValueArray = function(e) {
-      var c = Object.prototype.hasOwnProperty, a = [], l;
-      for (l in e) {
-        c.call(e, l) && a.push([l, e[l]]);
-      }
-      return a;
-    };
-    a.isPrototypeWriteable = function(e) {
-      return Object.getOwnPropertyDescriptor(e, "prototype").writable;
-    };
-    a.hasOwnProperty = l;
-    a.propertyIsEnumerable = function(e, c) {
-      return Object.prototype.propertyIsEnumerable.call(e, c);
-    };
-    a.getOwnPropertyDescriptor = function(e, c) {
-      return Object.getOwnPropertyDescriptor(e, c);
-    };
-    a.hasOwnGetter = function(e, c) {
-      var a = Object.getOwnPropertyDescriptor(e, c);
-      return!(!a || !a.get);
-    };
-    a.getOwnGetter = function(e, c) {
-      var a = Object.getOwnPropertyDescriptor(e, c);
-      return a ? a.get : null;
-    };
-    a.hasOwnSetter = function(e, c) {
-      var a = Object.getOwnPropertyDescriptor(e, c);
-      return!(!a || !a.set);
-    };
-    a.createMap = function() {
+    d.boxValue = function(b) {
+      return void 0 == b || f(b) ? b : Object(b);
+    };
+    d.toKeyValueArray = function(b) {
+      var p = Object.prototype.hasOwnProperty, u = [], e;
+      for (e in b) {
+        p.call(b, e) && u.push([e, b[e]]);
+      }
+      return u;
+    };
+    d.isPrototypeWriteable = function(b) {
+      return Object.getOwnPropertyDescriptor(b, "prototype").writable;
+    };
+    d.hasOwnProperty = e;
+    d.propertyIsEnumerable = function(b, p) {
+      return Object.prototype.propertyIsEnumerable.call(b, p);
+    };
+    d.getOwnPropertyDescriptor = function(b, p) {
+      return Object.getOwnPropertyDescriptor(b, p);
+    };
+    d.hasOwnGetter = function(b, p) {
+      var e = Object.getOwnPropertyDescriptor(b, p);
+      return!(!e || !e.get);
+    };
+    d.getOwnGetter = function(b, p) {
+      var e = Object.getOwnPropertyDescriptor(b, p);
+      return e ? e.get : null;
+    };
+    d.hasOwnSetter = function(b, p) {
+      var e = Object.getOwnPropertyDescriptor(b, p);
+      return!(!e || !e.set);
+    };
+    d.createMap = function() {
       return Object.create(null);
     };
-    a.createArrayMap = function() {
+    d.createArrayMap = function() {
       return[];
     };
-    a.defineReadOnlyProperty = function(e, c, a) {
-      Object.defineProperty(e, c, {value:a, writable:!1, configurable:!0, enumerable:!1});
-    };
-    a.getOwnPropertyDescriptors = function(e) {
-      for (var c = a.createMap(), s = Object.getOwnPropertyNames(e), l = 0;l < s.length;l++) {
-        c[s[l]] = Object.getOwnPropertyDescriptor(e, s[l]);
-      }
-      return c;
-    };
-    a.cloneObject = function(e) {
-      var q = Object.create(Object.getPrototypeOf(e));
-      c(q, e);
-      return q;
-    };
-    a.copyProperties = function(e, c) {
-      for (var a in c) {
-        e[a] = c[a];
-      }
-    };
-    a.copyOwnProperties = c;
-    a.copyOwnPropertyDescriptors = function(e, c, a) {
-      void 0 === a && (a = !0);
-      for (var y in c) {
-        if (l(c, y)) {
-          var d = Object.getOwnPropertyDescriptor(c, y);
-          if (a || !l(e, y)) {
+    d.defineReadOnlyProperty = function(b, p, e) {
+      Object.defineProperty(b, p, {value:e, writable:!1, configurable:!0, enumerable:!1});
+    };
+    d.getOwnPropertyDescriptors = function(b) {
+      for (var p = d.createMap(), e = Object.getOwnPropertyNames(b), a = 0;a < e.length;a++) {
+        p[e[a]] = Object.getOwnPropertyDescriptor(b, e[a]);
+      }
+      return p;
+    };
+    d.cloneObject = function(g) {
+      var p = Object.create(Object.getPrototypeOf(g));
+      b(p, g);
+      return p;
+    };
+    d.copyProperties = function(b, p) {
+      for (var e in p) {
+        b[e] = p[e];
+      }
+    };
+    d.copyOwnProperties = b;
+    d.copyOwnPropertyDescriptors = function(b, p, u) {
+      void 0 === u && (u = !0);
+      for (var d in p) {
+        if (e(p, d)) {
+          var a = Object.getOwnPropertyDescriptor(p, d);
+          if (u || !e(b, d)) {
             try {
-              Object.defineProperty(e, y, d);
-            } catch (t) {
-            }
-          }
-        }
-      }
-    };
-    a.getLatestGetterOrSetterPropertyDescriptor = function(e, c) {
-      for (var a = {};e;) {
-        var l = Object.getOwnPropertyDescriptor(e, c);
-        l && (a.get = a.get || l.get, a.set = a.set || l.set);
-        if (a.get && a.set) {
+              Object.defineProperty(b, d, a);
+            } catch (h) {
+            }
+          }
+        }
+      }
+    };
+    d.getLatestGetterOrSetterPropertyDescriptor = function(b, p) {
+      for (var e = {};b;) {
+        var d = Object.getOwnPropertyDescriptor(b, p);
+        d && (e.get = e.get || d.get, e.set = e.set || d.set);
+        if (e.get && e.set) {
           break;
         }
-        e = Object.getPrototypeOf(e);
-      }
-      return a;
-    };
-    a.defineNonEnumerableGetterOrSetter = function(e, c, l, y) {
-      var d = a.getLatestGetterOrSetterPropertyDescriptor(e, c);
-      d.configurable = !0;
-      d.enumerable = !1;
-      y ? d.get = l : d.set = l;
-      Object.defineProperty(e, c, d);
-    };
-    a.defineNonEnumerableGetter = function(c, q, a) {
-      Object.defineProperty(c, q, {get:a, configurable:!0, enumerable:!1});
-    };
-    a.defineNonEnumerableSetter = function(c, q, a) {
-      Object.defineProperty(c, q, {set:a, configurable:!0, enumerable:!1});
-    };
-    a.defineNonEnumerableProperty = function(c, q, a) {
-      Object.defineProperty(c, q, {value:a, writable:!0, configurable:!0, enumerable:!1});
-    };
-    a.defineNonEnumerableForwardingProperty = function(c, q, a) {
-      Object.defineProperty(c, q, {get:d.makeForwardingGetter(a), set:d.makeForwardingSetter(a), writable:!0, configurable:!0, enumerable:!1});
-    };
-    a.defineNewNonEnumerableProperty = function(c, q, l) {
-      a.defineNonEnumerableProperty(c, q, l);
-    };
-    a.createPublicAliases = function(c, q) {
-      for (var a = {value:null, writable:!0, configurable:!0, enumerable:!1}, l = 0;l < q.length;l++) {
-        var d = q[l];
-        a.value = c[d];
-        Object.defineProperty(c, "$Bg" + d, a);
+        b = Object.getPrototypeOf(b);
+      }
+      return e;
+    };
+    d.defineNonEnumerableGetterOrSetter = function(b, p, e, a) {
+      var h = d.getLatestGetterOrSetterPropertyDescriptor(b, p);
+      h.configurable = !0;
+      h.enumerable = !1;
+      a ? h.get = e : h.set = e;
+      Object.defineProperty(b, p, h);
+    };
+    d.defineNonEnumerableGetter = function(b, p, e) {
+      Object.defineProperty(b, p, {get:e, configurable:!0, enumerable:!1});
+    };
+    d.defineNonEnumerableSetter = function(b, p, e) {
+      Object.defineProperty(b, p, {set:e, configurable:!0, enumerable:!1});
+    };
+    d.defineNonEnumerableProperty = function(b, p, e) {
+      Object.defineProperty(b, p, {value:e, writable:!0, configurable:!0, enumerable:!1});
+    };
+    d.defineNonEnumerableForwardingProperty = function(b, p, e) {
+      Object.defineProperty(b, p, {get:h.makeForwardingGetter(e), set:h.makeForwardingSetter(e), writable:!0, configurable:!0, enumerable:!1});
+    };
+    d.defineNewNonEnumerableProperty = function(b, p, e) {
+      d.defineNonEnumerableProperty(b, p, e);
+    };
+    d.createPublicAliases = function(b, p) {
+      for (var e = {value:null, writable:!0, configurable:!0, enumerable:!1}, d = 0;d < p.length;d++) {
+        var a = p[d];
+        e.value = b[a];
+        Object.defineProperty(b, "$Bg" + a, e);
       }
     };
   })(k.ObjectUtilities || (k.ObjectUtilities = {}));
-  var d;
-  (function(a) {
-    a.makeForwardingGetter = function(a) {
-      return new Function('return this["' + a + '"]//# sourceURL=fwd-get-' + a + ".as");
-    };
-    a.makeForwardingSetter = function(a) {
-      return new Function("value", 'this["' + a + '"] = value;//# sourceURL=fwd-set-' + a + ".as");
-    };
-    a.bindSafely = function(a, c) {
-      function e() {
-        return a.apply(c, arguments);
-      }
-      e.boundTo = c;
-      return e;
-    };
-  })(d = k.FunctionUtilities || (k.FunctionUtilities = {}));
-  (function(a) {
-    function l(c) {
-      return "string" === typeof c ? '"' + c + '"' : "number" === typeof c || "boolean" === typeof c ? String(c) : c instanceof Array ? "[] " + c.length : typeof c;
+  var h;
+  (function(d) {
+    d.makeForwardingGetter = function(e) {
+      return new Function('return this["' + e + '"]//# sourceURL=fwd-get-' + e + ".as");
+    };
+    d.makeForwardingSetter = function(e) {
+      return new Function("value", 'this["' + e + '"] = value;//# sourceURL=fwd-set-' + e + ".as");
+    };
+    d.bindSafely = function(e, b) {
+      function g() {
+        return e.apply(b, arguments);
+      }
+      g.boundTo = b;
+      return g;
+    };
+  })(h = k.FunctionUtilities || (k.FunctionUtilities = {}));
+  (function(d) {
+    function e(b) {
+      return "string" === typeof b ? '"' + b + '"' : "number" === typeof b || "boolean" === typeof b ? String(b) : b instanceof Array ? "[] " + b.length : typeof b;
     }
-    a.repeatString = function(c, e) {
-      for (var q = "", a = 0;a < e;a++) {
-        q += c;
-      }
-      return q;
-    };
-    a.memorySizeToString = function(c) {
-      c |= 0;
-      return 1024 > c ? c + " B" : 1048576 > c ? (c / 1024).toFixed(2) + "KB" : (c / 1048576).toFixed(2) + "MB";
-    };
-    a.toSafeString = l;
-    a.toSafeArrayString = function(c) {
-      for (var e = [], q = 0;q < c.length;q++) {
-        e.push(l(c[q]));
-      }
-      return e.join(", ");
-    };
-    a.utf8decode = function(c) {
-      for (var e = new Uint8Array(4 * c.length), q = 0, a = 0, l = c.length;a < l;a++) {
-        var s = c.charCodeAt(a);
-        if (127 >= s) {
-          e[q++] = s;
+    d.repeatString = function(b, g) {
+      for (var p = "", e = 0;e < g;e++) {
+        p += b;
+      }
+      return p;
+    };
+    d.memorySizeToString = function(b) {
+      b |= 0;
+      return 1024 > b ? b + " B" : 1048576 > b ? (b / 1024).toFixed(2) + "KB" : (b / 1048576).toFixed(2) + "MB";
+    };
+    d.toSafeString = e;
+    d.toSafeArrayString = function(b) {
+      for (var g = [], p = 0;p < b.length;p++) {
+        g.push(e(b[p]));
+      }
+      return g.join(", ");
+    };
+    d.utf8decode = function(b) {
+      for (var g = new Uint8Array(4 * b.length), p = 0, e = 0, u = b.length;e < u;e++) {
+        var d = b.charCodeAt(e);
+        if (127 >= d) {
+          g[p++] = d;
         } else {
-          if (55296 <= s && 56319 >= s) {
-            var y = c.charCodeAt(a + 1);
-            56320 <= y && 57343 >= y && (s = ((s & 1023) << 10) + (y & 1023) + 65536, ++a);
-          }
-          0 !== (s & 4292870144) ? (e[q++] = 248 | s >>> 24 & 3, e[q++] = 128 | s >>> 18 & 63, e[q++] = 128 | s >>> 12 & 63, e[q++] = 128 | s >>> 6 & 63) : 0 !== (s & 4294901760) ? (e[q++] = 240 | s >>> 18 & 7, e[q++] = 128 | s >>> 12 & 63, e[q++] = 128 | s >>> 6 & 63) : 0 !== (s & 4294965248) ? (e[q++] = 224 | s >>> 12 & 15, e[q++] = 128 | s >>> 6 & 63) : e[q++] = 192 | s >>> 6 & 31;
-          e[q++] = 128 | s & 63;
-        }
-      }
-      return e.subarray(0, q);
-    };
-    a.utf8encode = function(c) {
-      for (var e = 0, q = "";e < c.length;) {
-        var a = c[e++] & 255;
-        if (127 >= a) {
-          q += String.fromCharCode(a);
+          if (55296 <= d && 56319 >= d) {
+            var a = b.charCodeAt(e + 1);
+            56320 <= a && 57343 >= a && (d = ((d & 1023) << 10) + (a & 1023) + 65536, ++e);
+          }
+          0 !== (d & 4292870144) ? (g[p++] = 248 | d >>> 24 & 3, g[p++] = 128 | d >>> 18 & 63, g[p++] = 128 | d >>> 12 & 63, g[p++] = 128 | d >>> 6 & 63) : 0 !== (d & 4294901760) ? (g[p++] = 240 | d >>> 18 & 7, g[p++] = 128 | d >>> 12 & 63, g[p++] = 128 | d >>> 6 & 63) : 0 !== (d & 4294965248) ? (g[p++] = 224 | d >>> 12 & 15, g[p++] = 128 | d >>> 6 & 63) : g[p++] = 192 | d >>> 6 & 31;
+          g[p++] = 128 | d & 63;
+        }
+      }
+      return g.subarray(0, p);
+    };
+    d.utf8encode = function(b) {
+      for (var g = 0, p = "";g < b.length;) {
+        var e = b[g++] & 255;
+        if (127 >= e) {
+          p += String.fromCharCode(e);
         } else {
-          var l = 192, s = 5;
+          var u = 192, d = 5;
           do {
-            if ((a & (l >> 1 | 128)) === l) {
+            if ((e & (u >> 1 | 128)) === u) {
               break;
             }
-            l = l >> 1 | 128;
-            --s;
-          } while (0 <= s);
-          if (0 >= s) {
-            q += String.fromCharCode(a);
+            u = u >> 1 | 128;
+            --d;
+          } while (0 <= d);
+          if (0 >= d) {
+            p += String.fromCharCode(e);
           } else {
-            for (var a = a & (1 << s) - 1, l = !1, y = 5;y >= s;--y) {
-              var d = c[e++];
-              if (128 != (d & 192)) {
-                l = !0;
+            for (var e = e & (1 << d) - 1, u = !1, a = 5;a >= d;--a) {
+              var h = b[g++];
+              if (128 != (h & 192)) {
+                u = !0;
                 break;
               }
-              a = a << 6 | d & 63;
-            }
-            if (l) {
-              for (s = e - (7 - y);s < e;++s) {
-                q += String.fromCharCode(c[s] & 255);
+              e = e << 6 | h & 63;
+            }
+            if (u) {
+              for (d = g - (7 - a);d < g;++d) {
+                p += String.fromCharCode(b[d] & 255);
               }
             } else {
-              q = 65536 <= a ? q + String.fromCharCode(a - 65536 >> 10 & 1023 | 55296, a & 1023 | 56320) : q + String.fromCharCode(a);
-            }
-          }
-        }
-      }
-      return q;
-    };
-    a.base64ArrayBuffer = function(c) {
-      var e = "";
-      c = new Uint8Array(c);
-      for (var q = c.byteLength, a = q % 3, q = q - a, l, s, y, d, t = 0;t < q;t += 3) {
-        d = c[t] << 16 | c[t + 1] << 8 | c[t + 2], l = (d & 16515072) >> 18, s = (d & 258048) >> 12, y = (d & 4032) >> 6, d &= 63, e += "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[l] + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[s] + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[y] + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[d];
-      }
-      1 == a ? (d = c[q], e += "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(d & 252) >> 2] + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(d & 3) << 4] + "==") : 2 == a && (d = c[q] << 8 | c[q + 1], e += "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(d & 64512) >> 10] + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(d & 1008) >> 4] + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(d & 15) << 
+              p = 65536 <= e ? p + String.fromCharCode(e - 65536 >> 10 & 1023 | 55296, e & 1023 | 56320) : p + String.fromCharCode(e);
+            }
+          }
+        }
+      }
+      return p;
+    };
+    d.base64ArrayBuffer = function(b) {
+      var g = "";
+      b = new Uint8Array(b);
+      for (var p = b.byteLength, e = p % 3, p = p - e, d, u, a, h, G = 0;G < p;G += 3) {
+        h = b[G] << 16 | b[G + 1] << 8 | b[G + 2], d = (h & 16515072) >> 18, u = (h & 258048) >> 12, a = (h & 4032) >> 6, h &= 63, g += "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[d] + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[u] + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[a] + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[h];
+      }
+      1 == e ? (h = b[p], g += "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(h & 252) >> 2] + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(h & 3) << 4] + "==") : 2 == e && (h = b[p] << 8 | b[p + 1], g += "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(h & 64512) >> 10] + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(h & 1008) >> 4] + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(h & 15) << 
       2] + "=");
-      return e;
-    };
-    a.escapeString = function(c) {
-      void 0 !== c && (c = c.replace(/[^\w$]/gi, "$"), /^\d/.test(c) && (c = "$" + c));
-      return c;
-    };
-    a.fromCharCodeArray = function(c) {
-      for (var e = "", q = 0;q < c.length;q += 16384) {
-        var a = Math.min(c.length - q, 16384), e = e + String.fromCharCode.apply(null, c.subarray(q, q + a))
-      }
-      return e;
-    };
-    a.variableLengthEncodeInt32 = function(c) {
-      for (var e = 32 - Math.clz32(c), q = Math.ceil(e / 6), e = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789$_"[q], q = q - 1;0 <= q;q--) {
-        e += "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789$_"[c >> 6 * q & 63];
-      }
-      return e;
-    };
-    a.toEncoding = function(c) {
-      return "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789$_"[c];
-    };
-    a.fromEncoding = function(c) {
-      if (65 <= c && 90 >= c) {
-        return c - 65;
-      }
-      if (97 <= c && 122 >= c) {
-        return c - 71;
-      }
-      if (48 <= c && 57 >= c) {
-        return c + 4;
-      }
-      if (36 === c) {
+      return g;
+    };
+    d.escapeString = function(b) {
+      void 0 !== b && (b = b.replace(/[^\w$]/gi, "$"), /^\d/.test(b) && (b = "$" + b));
+      return b;
+    };
+    d.fromCharCodeArray = function(b) {
+      for (var g = "", p = 0;p < b.length;p += 16384) {
+        var e = Math.min(b.length - p, 16384), g = g + String.fromCharCode.apply(null, b.subarray(p, p + e))
+      }
+      return g;
+    };
+    d.variableLengthEncodeInt32 = function(b) {
+      for (var g = 32 - Math.clz32(b), p = Math.ceil(g / 6), g = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789$_"[p], p = p - 1;0 <= p;p--) {
+        g += "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789$_"[b >> 6 * p & 63];
+      }
+      return g;
+    };
+    d.toEncoding = function(b) {
+      return "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789$_"[b];
+    };
+    d.fromEncoding = function(b) {
+      if (65 <= b && 90 >= b) {
+        return b - 65;
+      }
+      if (97 <= b && 122 >= b) {
+        return b - 71;
+      }
+      if (48 <= b && 57 >= b) {
+        return b + 4;
+      }
+      if (36 === b) {
         return 62;
       }
-      if (95 === c) {
+      if (95 === b) {
         return 63;
       }
     };
-    a.variableLengthDecodeInt32 = function(c) {
-      for (var e = a.fromEncoding(c.charCodeAt(0)), q = 0, l = 0;l < e;l++) {
-        var s = 6 * (e - l - 1), q = q | a.fromEncoding(c.charCodeAt(1 + l)) << s
-      }
-      return q;
-    };
-    a.trimMiddle = function(c, e) {
-      if (c.length <= e) {
-        return c;
-      }
-      var q = e >> 1, a = e - q - 1;
-      return c.substr(0, q) + "\u2026" + c.substr(c.length - a, a);
-    };
-    a.multiple = function(c, e) {
-      for (var q = "", a = 0;a < e;a++) {
-        q += c;
-      }
-      return q;
-    };
-    a.indexOfAny = function(c, e, q) {
-      for (var a = c.length, l = 0;l < e.length;l++) {
-        var s = c.indexOf(e[l], q);
-        0 <= s && (a = Math.min(a, s));
-      }
-      return a === c.length ? -1 : a;
-    };
-    var c = Array(3), e = Array(4), q = Array(5), s = Array(6), y = Array(7), d = Array(8), n = Array(9);
-    a.concat3 = function(e, q, a) {
-      c[0] = e;
-      c[1] = q;
-      c[2] = a;
-      return c.join("");
-    };
-    a.concat4 = function(c, q, a, l) {
-      e[0] = c;
-      e[1] = q;
-      e[2] = a;
-      e[3] = l;
-      return e.join("");
-    };
-    a.concat5 = function(c, e, a, l, s) {
-      q[0] = c;
-      q[1] = e;
-      q[2] = a;
-      q[3] = l;
-      q[4] = s;
+    d.variableLengthDecodeInt32 = function(b) {
+      for (var g = d.fromEncoding(b.charCodeAt(0)), p = 0, e = 0;e < g;e++) {
+        var u = 6 * (g - e - 1), p = p | d.fromEncoding(b.charCodeAt(1 + e)) << u
+      }
+      return p;
+    };
+    d.trimMiddle = function(b, g) {
+      if (b.length <= g) {
+        return b;
+      }
+      var p = g >> 1, e = g - p - 1;
+      return b.substr(0, p) + "\u2026" + b.substr(b.length - e, e);
+    };
+    d.multiple = function(b, g) {
+      for (var p = "", e = 0;e < g;e++) {
+        p += b;
+      }
+      return p;
+    };
+    d.indexOfAny = function(b, g, p) {
+      for (var e = b.length, u = 0;u < g.length;u++) {
+        var d = b.indexOf(g[u], p);
+        0 <= d && (e = Math.min(e, d));
+      }
+      return e === b.length ? -1 : e;
+    };
+    var b = Array(3), g = Array(4), p = Array(5), u = Array(6), a = Array(7), h = Array(8), q = Array(9);
+    d.concat3 = function(g, p, e) {
+      b[0] = g;
+      b[1] = p;
+      b[2] = e;
+      return b.join("");
+    };
+    d.concat4 = function(b, p, e, u) {
+      g[0] = b;
+      g[1] = p;
+      g[2] = e;
+      g[3] = u;
+      return g.join("");
+    };
+    d.concat5 = function(b, g, e, u, d) {
+      p[0] = b;
+      p[1] = g;
+      p[2] = e;
+      p[3] = u;
+      p[4] = d;
+      return p.join("");
+    };
+    d.concat6 = function(b, g, p, e, d, a) {
+      u[0] = b;
+      u[1] = g;
+      u[2] = p;
+      u[3] = e;
+      u[4] = d;
+      u[5] = a;
+      return u.join("");
+    };
+    d.concat7 = function(b, g, p, e, u, d, h) {
+      a[0] = b;
+      a[1] = g;
+      a[2] = p;
+      a[3] = e;
+      a[4] = u;
+      a[5] = d;
+      a[6] = h;
+      return a.join("");
+    };
+    d.concat8 = function(b, g, p, e, u, d, a, G) {
+      h[0] = b;
+      h[1] = g;
+      h[2] = p;
+      h[3] = e;
+      h[4] = u;
+      h[5] = d;
+      h[6] = a;
+      h[7] = G;
+      return h.join("");
+    };
+    d.concat9 = function(b, g, p, e, u, d, a, h, G) {
+      q[0] = b;
+      q[1] = g;
+      q[2] = p;
+      q[3] = e;
+      q[4] = u;
+      q[5] = d;
+      q[6] = a;
+      q[7] = h;
+      q[8] = G;
       return q.join("");
     };
-    a.concat6 = function(c, e, q, a, l, y) {
-      s[0] = c;
-      s[1] = e;
-      s[2] = q;
-      s[3] = a;
-      s[4] = l;
-      s[5] = y;
-      return s.join("");
-    };
-    a.concat7 = function(c, e, q, a, l, s, d) {
-      y[0] = c;
-      y[1] = e;
-      y[2] = q;
-      y[3] = a;
-      y[4] = l;
-      y[5] = s;
-      y[6] = d;
-      return y.join("");
-    };
-    a.concat8 = function(c, e, q, a, l, s, y, t) {
-      d[0] = c;
-      d[1] = e;
-      d[2] = q;
-      d[3] = a;
-      d[4] = l;
-      d[5] = s;
-      d[6] = y;
-      d[7] = t;
-      return d.join("");
-    };
-    a.concat9 = function(c, e, q, a, l, s, y, d, t) {
-      n[0] = c;
-      n[1] = e;
-      n[2] = q;
-      n[3] = a;
-      n[4] = l;
-      n[5] = s;
-      n[6] = y;
-      n[7] = d;
-      n[8] = t;
-      return n.join("");
-    };
   })(k.StringUtilities || (k.StringUtilities = {}));
-  (function(a) {
-    var l = new Uint8Array([7, 12, 17, 22, 7, 12, 17, 22, 7, 12, 17, 22, 7, 12, 17, 22, 5, 9, 14, 20, 5, 9, 14, 20, 5, 9, 14, 20, 5, 9, 14, 20, 4, 11, 16, 23, 4, 11, 16, 23, 4, 11, 16, 23, 4, 11, 16, 23, 6, 10, 15, 21, 6, 10, 15, 21, 6, 10, 15, 21, 6, 10, 15, 21]), c = new Int32Array([-680876936, -389564586, 606105819, -1044525330, -176418897, 1200080426, -1473231341, -45705983, 1770035416, -1958414417, -42063, -1990404162, 1804603682, -40341101, -1502002290, 1236535329, -165796510, -1069501632, 
+  (function(d) {
+    var e = new Uint8Array([7, 12, 17, 22, 7, 12, 17, 22, 7, 12, 17, 22, 7, 12, 17, 22, 5, 9, 14, 20, 5, 9, 14, 20, 5, 9, 14, 20, 5, 9, 14, 20, 4, 11, 16, 23, 4, 11, 16, 23, 4, 11, 16, 23, 4, 11, 16, 23, 6, 10, 15, 21, 6, 10, 15, 21, 6, 10, 15, 21, 6, 10, 15, 21]), b = new Int32Array([-680876936, -389564586, 606105819, -1044525330, -176418897, 1200080426, -1473231341, -45705983, 1770035416, -1958414417, -42063, -1990404162, 1804603682, -40341101, -1502002290, 1236535329, -165796510, -1069501632, 
     643717713, -373897302, -701558691, 38016083, -660478335, -405537848, 568446438, -1019803690, -187363961, 1163531501, -1444681467, -51403784, 1735328473, -1926607734, -378558, -2022574463, 1839030562, -35309556, -1530992060, 1272893353, -155497632, -1094730640, 681279174, -358537222, -722521979, 76029189, -640364487, -421815835, 530742520, -995338651, -198630844, 1126891415, -1416354905, -57434055, 1700485571, -1894986606, -1051523, -2054922799, 1873313359, -30611744, -1560198380, 1309151649, 
     -145523070, -1120210379, 718787259, -343485551]);
-    a.hashBytesTo32BitsMD5 = function(e, q, a) {
-      var y = 1732584193, d = -271733879, t = -1732584194, n = 271733878, b = a + 72 & -64, f = new Uint8Array(b), h;
-      for (h = 0;h < a;++h) {
-        f[h] = e[q++];
-      }
-      f[h++] = 128;
-      for (e = b - 8;h < e;) {
-        f[h++] = 0;
-      }
-      f[h++] = a << 3 & 255;
-      f[h++] = a >> 5 & 255;
-      f[h++] = a >> 13 & 255;
-      f[h++] = a >> 21 & 255;
-      f[h++] = a >>> 29 & 255;
-      f[h++] = 0;
-      f[h++] = 0;
-      f[h++] = 0;
-      e = new Int32Array(16);
-      for (h = 0;h < b;) {
-        for (a = 0;16 > a;++a, h += 4) {
-          e[a] = f[h] | f[h + 1] << 8 | f[h + 2] << 16 | f[h + 3] << 24;
-        }
-        var m = y;
-        q = d;
-        var v = t, r = n, g, w;
-        for (a = 0;64 > a;++a) {
-          16 > a ? (g = q & v | ~q & r, w = a) : 32 > a ? (g = r & q | ~r & v, w = 5 * a + 1 & 15) : 48 > a ? (g = q ^ v ^ r, w = 3 * a + 5 & 15) : (g = v ^ (q | ~r), w = 7 * a & 15);
-          var k = r, m = m + g + c[a] + e[w] | 0;
-          g = l[a];
-          r = v;
-          v = q;
-          q = q + (m << g | m >>> 32 - g) | 0;
-          m = k;
-        }
-        y = y + m | 0;
-        d = d + q | 0;
-        t = t + v | 0;
-        n = n + r | 0;
-      }
-      return y;
-    };
-    a.hashBytesTo32BitsAdler = function(c, q, a) {
-      var l = 1, d = 0;
-      for (a = q + a;q < a;++q) {
-        l = (l + (c[q] & 255)) % 65521, d = (d + l) % 65521;
-      }
-      return d << 16 | l;
+    d.hashBytesTo32BitsMD5 = function(g, p, u) {
+      var d = 1732584193, a = -271733879, h = -1732584194, q = 271733878, c = u + 72 & -64, m = new Uint8Array(c), l;
+      for (l = 0;l < u;++l) {
+        m[l] = g[p++];
+      }
+      m[l++] = 128;
+      for (g = c - 8;l < g;) {
+        m[l++] = 0;
+      }
+      m[l++] = u << 3 & 255;
+      m[l++] = u >> 5 & 255;
+      m[l++] = u >> 13 & 255;
+      m[l++] = u >> 21 & 255;
+      m[l++] = u >>> 29 & 255;
+      m[l++] = 0;
+      m[l++] = 0;
+      m[l++] = 0;
+      g = new Int32Array(16);
+      for (l = 0;l < c;) {
+        for (u = 0;16 > u;++u, l += 4) {
+          g[u] = m[l] | m[l + 1] << 8 | m[l + 2] << 16 | m[l + 3] << 24;
+        }
+        var n = d;
+        p = a;
+        var s = h, v = q, w, f;
+        for (u = 0;64 > u;++u) {
+          16 > u ? (w = p & s | ~p & v, f = u) : 32 > u ? (w = v & p | ~v & s, f = 5 * u + 1 & 15) : 48 > u ? (w = p ^ s ^ v, f = 3 * u + 5 & 15) : (w = s ^ (p | ~v), f = 7 * u & 15);
+          var k = v, n = n + w + b[u] + g[f] | 0;
+          w = e[u];
+          v = s;
+          s = p;
+          p = p + (n << w | n >>> 32 - w) | 0;
+          n = k;
+        }
+        d = d + n | 0;
+        a = a + p | 0;
+        h = h + s | 0;
+        q = q + v | 0;
+      }
+      return d;
+    };
+    d.hashBytesTo32BitsAdler = function(b, p, e) {
+      var d = 1, a = 0;
+      for (e = p + e;p < e;++p) {
+        d = (d + (b[p] & 255)) % 65521, a = (a + d) % 65521;
+      }
+      return a << 16 | d;
     };
   })(k.HashUtilities || (k.HashUtilities = {}));
-  var n = function() {
-    function a() {
+  var q = function() {
+    function d() {
     }
-    a.seed = function(l) {
-      a._state[0] = l;
-      a._state[1] = l;
-    };
-    a.next = function() {
-      var a = this._state, c = Math.imul(18273, a[0] & 65535) + (a[0] >>> 16) | 0;
-      a[0] = c;
-      var e = Math.imul(36969, a[1] & 65535) + (a[1] >>> 16) | 0;
-      a[1] = e;
-      a = (c << 16) + (e & 65535) | 0;
-      return 2.3283064365386963E-10 * (0 > a ? a + 4294967296 : a);
-    };
-    a._state = new Uint32Array([57005, 48879]);
-    return a;
+    d.seed = function(e) {
+      d._state[0] = e;
+      d._state[1] = e;
+    };
+    d.next = function() {
+      var e = this._state, b = Math.imul(18273, e[0] & 65535) + (e[0] >>> 16) | 0;
+      e[0] = b;
+      var g = Math.imul(36969, e[1] & 65535) + (e[1] >>> 16) | 0;
+      e[1] = g;
+      e = (b << 16) + (g & 65535) | 0;
+      return 2.3283064365386963E-10 * (0 > e ? e + 4294967296 : e);
+    };
+    d._state = new Uint32Array([57005, 48879]);
+    return d;
   }();
-  k.Random = n;
+  k.Random = q;
   Math.random = function() {
-    return n.next();
+    return q.next();
   };
   (function() {
-    function a() {
-      this.id = "$weakmap" + l++;
+    function d() {
+      this.id = "$weakmap" + e++;
     }
     if ("function" !== typeof jsGlobal.WeakMap) {
-      var l = 0;
-      a.prototype = {has:function(c) {
-        return c.hasOwnProperty(this.id);
-      }, get:function(c, e) {
-        return c.hasOwnProperty(this.id) ? c[this.id] : e;
-      }, set:function(c, e) {
-        Object.defineProperty(c, this.id, {value:e, enumerable:!1, configurable:!0});
-      }, delete:function(c) {
-        delete c[this.id];
+      var e = 0;
+      d.prototype = {has:function(b) {
+        return b.hasOwnProperty(this.id);
+      }, get:function(b, g) {
+        return b.hasOwnProperty(this.id) ? b[this.id] : g;
+      }, set:function(b, g) {
+        Object.defineProperty(b, this.id, {value:g, enumerable:!1, configurable:!0});
+      }, delete:function(b) {
+        delete b[this.id];
       }};
-      jsGlobal.WeakMap = a;
+      jsGlobal.WeakMap = d;
     }
   })();
   a = function() {
-    function a() {
+    function d() {
       "undefined" !== typeof netscape && netscape.security.PrivilegeManager ? this._map = new WeakMap : this._list = [];
     }
-    a.prototype.clear = function() {
+    d.prototype.clear = function() {
       this._map ? this._map.clear() : this._list.length = 0;
     };
-    a.prototype.push = function(a) {
-      this._map ? this._map.set(a, null) : this._list.push(a);
-    };
-    a.prototype.remove = function(a) {
-      this._map ? this._map.delete(a) : this._list[this._list.indexOf(a)] = null;
-    };
-    a.prototype.forEach = function(a) {
+    d.prototype.push = function(e) {
+      this._map ? this._map.set(e, null) : this._list.push(e);
+    };
+    d.prototype.remove = function(e) {
+      this._map ? this._map.delete(e) : this._list[this._list.indexOf(e)] = null;
+    };
+    d.prototype.forEach = function(e) {
       if (this._map) {
-        "undefined" !== typeof netscape && netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"), Components.utils.nondeterministicGetWeakMapKeys(this._map).forEach(function(c) {
-          0 !== c._referenceCount && a(c);
+        "undefined" !== typeof netscape && netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"), Components.utils.nondeterministicGetWeakMapKeys(this._map).forEach(function(b) {
+          0 !== b._referenceCount && e(b);
         });
       } else {
-        for (var c = this._list, e = 0, q = 0;q < c.length;q++) {
-          var s = c[q];
-          s && (0 === s._referenceCount ? (c[q] = null, e++) : a(s));
-        }
-        if (16 < e && e > c.length >> 2) {
-          e = [];
-          for (q = 0;q < c.length;q++) {
-            (s = c[q]) && 0 < s._referenceCount && e.push(s);
-          }
-          this._list = e;
-        }
-      }
-    };
-    Object.defineProperty(a.prototype, "length", {get:function() {
+        for (var b = this._list, g = 0, p = 0;p < b.length;p++) {
+          var d = b[p];
+          d && (0 === d._referenceCount ? (b[p] = null, g++) : e(d));
+        }
+        if (16 < g && g > b.length >> 2) {
+          g = [];
+          for (p = 0;p < b.length;p++) {
+            (d = b[p]) && 0 < d._referenceCount && g.push(d);
+          }
+          this._list = g;
+        }
+      }
+    };
+    Object.defineProperty(d.prototype, "length", {get:function() {
       return this._map ? -1 : this._list.length;
     }, enumerable:!0, configurable:!0});
-    return a;
+    return d;
   }();
   k.WeakList = a;
-  var f;
-  (function(a) {
-    a.pow2 = function(a) {
-      return a === (a | 0) ? 0 > a ? 1 / (1 << -a) : 1 << a : Math.pow(2, a);
-    };
-    a.clamp = function(a, c, e) {
-      return Math.max(c, Math.min(e, a));
-    };
-    a.roundHalfEven = function(a) {
-      if (.5 === Math.abs(a % 1)) {
-        var c = Math.floor(a);
-        return 0 === c % 2 ? c : Math.ceil(a);
-      }
-      return Math.round(a);
-    };
-    a.altTieBreakRound = function(a, c) {
-      return.5 !== Math.abs(a % 1) || c ? Math.round(a) : a | 0;
-    };
-    a.epsilonEquals = function(a, c) {
-      return 1E-7 > Math.abs(a - c);
-    };
-  })(f = k.NumberUtilities || (k.NumberUtilities = {}));
-  (function(a) {
-    a[a.MaxU16 = 65535] = "MaxU16";
-    a[a.MaxI16 = 32767] = "MaxI16";
-    a[a.MinI16 = -32768] = "MinI16";
+  var l;
+  (function(d) {
+    d.pow2 = function(e) {
+      return e === (e | 0) ? 0 > e ? 1 / (1 << -e) : 1 << e : Math.pow(2, e);
+    };
+    d.clamp = function(e, b, g) {
+      return Math.max(b, Math.min(g, e));
+    };
+    d.roundHalfEven = function(e) {
+      if (.5 === Math.abs(e % 1)) {
+        var b = Math.floor(e);
+        return 0 === b % 2 ? b : Math.ceil(e);
+      }
+      return Math.round(e);
+    };
+    d.altTieBreakRound = function(e, b) {
+      return.5 !== Math.abs(e % 1) || b ? Math.round(e) : e | 0;
+    };
+    d.epsilonEquals = function(e, b) {
+      return 1E-7 > Math.abs(e - b);
+    };
+  })(l = k.NumberUtilities || (k.NumberUtilities = {}));
+  (function(d) {
+    d[d.MaxU16 = 65535] = "MaxU16";
+    d[d.MaxI16 = 32767] = "MaxI16";
+    d[d.MinI16 = -32768] = "MinI16";
   })(k.Numbers || (k.Numbers = {}));
   var v;
-  (function(a) {
-    function l(c) {
-      return 256 * c << 16 >> 16;
+  (function(d) {
+    function e(b) {
+      return 256 * b << 16 >> 16;
     }
-    var c = new ArrayBuffer(8);
-    a.i8 = new Int8Array(c);
-    a.u8 = new Uint8Array(c);
-    a.i32 = new Int32Array(c);
-    a.f32 = new Float32Array(c);
-    a.f64 = new Float64Array(c);
-    a.nativeLittleEndian = 1 === (new Int8Array((new Int32Array([1])).buffer))[0];
-    a.floatToInt32 = function(c) {
-      a.f32[0] = c;
-      return a.i32[0];
-    };
-    a.int32ToFloat = function(c) {
-      a.i32[0] = c;
-      return a.f32[0];
-    };
-    a.swap16 = function(c) {
-      return(c & 255) << 8 | c >> 8 & 255;
-    };
-    a.swap32 = function(c) {
-      return(c & 255) << 24 | (c & 65280) << 8 | c >> 8 & 65280 | c >> 24 & 255;
-    };
-    a.toS8U8 = l;
-    a.fromS8U8 = function(c) {
-      return c / 256;
-    };
-    a.clampS8U8 = function(c) {
-      return l(c) / 256;
-    };
-    a.toS16 = function(c) {
-      return c << 16 >> 16;
-    };
-    a.bitCount = function(c) {
-      c -= c >> 1 & 1431655765;
-      c = (c & 858993459) + (c >> 2 & 858993459);
-      return 16843009 * (c + (c >> 4) & 252645135) >> 24;
-    };
-    a.ones = function(c) {
-      c -= c >> 1 & 1431655765;
-      c = (c & 858993459) + (c >> 2 & 858993459);
-      return 16843009 * (c + (c >> 4) & 252645135) >> 24;
-    };
-    a.trailingZeros = function(c) {
-      return a.ones((c & -c) - 1);
-    };
-    a.getFlags = function(c, q) {
-      var a = "";
-      for (c = 0;c < q.length;c++) {
-        c & 1 << c && (a += q[c] + " ");
-      }
-      return 0 === a.length ? "" : a.trim();
-    };
-    a.isPowerOfTwo = function(c) {
-      return c && 0 === (c & c - 1);
-    };
-    a.roundToMultipleOfFour = function(c) {
-      return c + 3 & -4;
-    };
-    a.nearestPowerOfTwo = function(c) {
-      c--;
-      c |= c >> 1;
-      c |= c >> 2;
-      c |= c >> 4;
-      c |= c >> 8;
-      c |= c >> 16;
-      c++;
-      return c;
-    };
-    a.roundToMultipleOfPowerOfTwo = function(c, q) {
-      var a = (1 << q) - 1;
-      return c + a & ~a;
-    };
-    Math.imul || (Math.imul = function(c, q) {
-      var a = c & 65535, l = q & 65535;
-      return a * l + ((c >>> 16 & 65535) * l + a * (q >>> 16 & 65535) << 16 >>> 0) | 0;
+    var b = new ArrayBuffer(8);
+    d.i8 = new Int8Array(b);
+    d.u8 = new Uint8Array(b);
+    d.i32 = new Int32Array(b);
+    d.f32 = new Float32Array(b);
+    d.f64 = new Float64Array(b);
+    d.nativeLittleEndian = 1 === (new Int8Array((new Int32Array([1])).buffer))[0];
+    d.floatToInt32 = function(b) {
+      d.f32[0] = b;
+      return d.i32[0];
+    };
+    d.int32ToFloat = function(b) {
+      d.i32[0] = b;
+      return d.f32[0];
+    };
+    d.swap16 = function(b) {
+      return(b & 255) << 8 | b >> 8 & 255;
+    };
+    d.swap32 = function(b) {
+      return(b & 255) << 24 | (b & 65280) << 8 | b >> 8 & 65280 | b >> 24 & 255;
+    };
+    d.toS8U8 = e;
+    d.fromS8U8 = function(b) {
+      return b / 256;
+    };
+    d.clampS8U8 = function(b) {
+      return e(b) / 256;
+    };
+    d.toS16 = function(b) {
+      return b << 16 >> 16;
+    };
+    d.bitCount = function(b) {
+      b -= b >> 1 & 1431655765;
+      b = (b & 858993459) + (b >> 2 & 858993459);
+      return 16843009 * (b + (b >> 4) & 252645135) >> 24;
+    };
+    d.ones = function(b) {
+      b -= b >> 1 & 1431655765;
+      b = (b & 858993459) + (b >> 2 & 858993459);
+      return 16843009 * (b + (b >> 4) & 252645135) >> 24;
+    };
+    d.trailingZeros = function(b) {
+      return d.ones((b & -b) - 1);
+    };
+    d.getFlags = function(b, p) {
+      var e = "";
+      for (b = 0;b < p.length;b++) {
+        b & 1 << b && (e += p[b] + " ");
+      }
+      return 0 === e.length ? "" : e.trim();
+    };
+    d.isPowerOfTwo = function(b) {
+      return b && 0 === (b & b - 1);
+    };
+    d.roundToMultipleOfFour = function(b) {
+      return b + 3 & -4;
+    };
+    d.nearestPowerOfTwo = function(b) {
+      b--;
+      b |= b >> 1;
+      b |= b >> 2;
+      b |= b >> 4;
+      b |= b >> 8;
+      b |= b >> 16;
+      b++;
+      return b;
+    };
+    d.roundToMultipleOfPowerOfTwo = function(b, p) {
+      var e = (1 << p) - 1;
+      return b + e & ~e;
+    };
+    Math.imul || (Math.imul = function(b, p) {
+      var e = b & 65535, d = p & 65535;
+      return e * d + ((b >>> 16 & 65535) * d + e * (p >>> 16 & 65535) << 16 >>> 0) | 0;
     });
-    Math.clz32 || (Math.clz32 = function(c) {
-      c |= c >> 1;
-      c |= c >> 2;
-      c |= c >> 4;
-      c |= c >> 8;
-      return 32 - a.ones(c | c >> 16);
+    Math.clz32 || (Math.clz32 = function(b) {
+      b |= b >> 1;
+      b |= b >> 2;
+      b |= b >> 4;
+      b |= b >> 8;
+      return 32 - d.ones(b | b >> 16);
     });
   })(v = k.IntegerUtilities || (k.IntegerUtilities = {}));
-  (function(a) {
-    function l(c, e, q, a, l, d) {
-      return(q - c) * (d - e) - (a - e) * (l - c);
+  (function(d) {
+    function e(b, g, p, e, d, a) {
+      return(p - b) * (a - g) - (e - g) * (d - b);
     }
-    a.pointInPolygon = function(c, e, q) {
-      for (var a = 0, l = q.length - 2, d = 0;d < l;d += 2) {
-        var t = q[d + 0], n = q[d + 1], f = q[d + 2], b = q[d + 3];
-        (n <= e && b > e || n > e && b <= e) && c < t + (e - n) / (b - n) * (f - t) && a++;
-      }
-      return 1 === (a & 1);
-    };
-    a.signedArea = l;
-    a.counterClockwise = function(c, e, q, a, d, I) {
-      return 0 < l(c, e, q, a, d, I);
-    };
-    a.clockwise = function(c, e, q, a, d, I) {
-      return 0 > l(c, e, q, a, d, I);
-    };
-    a.pointInPolygonInt32 = function(c, e, q) {
-      c |= 0;
-      e |= 0;
-      for (var a = 0, l = q.length - 2, d = 0;d < l;d += 2) {
-        var t = q[d + 0], n = q[d + 1], f = q[d + 2], b = q[d + 3];
-        (n <= e && b > e || n > e && b <= e) && c < t + (e - n) / (b - n) * (f - t) && a++;
-      }
-      return 1 === (a & 1);
+    d.pointInPolygon = function(b, g, p) {
+      for (var e = 0, d = p.length - 2, a = 0;a < d;a += 2) {
+        var h = p[a + 0], q = p[a + 1], m = p[a + 2], c = p[a + 3];
+        (q <= g && c > g || q > g && c <= g) && b < h + (g - q) / (c - q) * (m - h) && e++;
+      }
+      return 1 === (e & 1);
+    };
+    d.signedArea = e;
+    d.counterClockwise = function(b, g, p, d, a, h) {
+      return 0 < e(b, g, p, d, a, h);
+    };
+    d.clockwise = function(b, g, p, d, a, h) {
+      return 0 > e(b, g, p, d, a, h);
+    };
+    d.pointInPolygonInt32 = function(b, g, p) {
+      b |= 0;
+      g |= 0;
+      for (var e = 0, d = p.length - 2, a = 0;a < d;a += 2) {
+        var h = p[a + 0], q = p[a + 1], m = p[a + 2], c = p[a + 3];
+        (q <= g && c > g || q > g && c <= g) && b < h + (g - q) / (c - q) * (m - h) && e++;
+      }
+      return 1 === (e & 1);
     };
   })(k.GeometricUtilities || (k.GeometricUtilities = {}));
-  (function(a) {
-    a[a.Error = 1] = "Error";
-    a[a.Warn = 2] = "Warn";
-    a[a.Debug = 4] = "Debug";
-    a[a.Log = 8] = "Log";
-    a[a.Info = 16] = "Info";
-    a[a.All = 31] = "All";
+  (function(d) {
+    d[d.Error = 1] = "Error";
+    d[d.Warn = 2] = "Warn";
+    d[d.Debug = 4] = "Debug";
+    d[d.Log = 8] = "Log";
+    d[d.Info = 16] = "Info";
+    d[d.All = 31] = "All";
   })(k.LogLevel || (k.LogLevel = {}));
   a = function() {
-    function a(l, c) {
-      void 0 === l && (l = !1);
+    function d(e, b) {
+      void 0 === e && (e = !1);
       this._tab = "  ";
       this._padding = "";
-      this._suppressOutput = l;
-      this._out = c || a._consoleOut;
-      this._outNoNewline = c || a._consoleOutNoNewline;
+      this._suppressOutput = e;
+      this._out = b || d._consoleOut;
+      this._outNoNewline = b || d._consoleOutNoNewline;
     }
-    a.prototype.write = function(a, c) {
-      void 0 === a && (a = "");
-      void 0 === c && (c = !1);
-      this._suppressOutput || this._outNoNewline((c ? this._padding : "") + a);
-    };
-    a.prototype.writeLn = function(a) {
-      void 0 === a && (a = "");
-      this._suppressOutput || this._out(this._padding + a);
-    };
-    a.prototype.writeObject = function(a, c) {
-      void 0 === a && (a = "");
-      this._suppressOutput || this._out(this._padding + a, c);
-    };
-    a.prototype.writeTimeLn = function(a) {
-      void 0 === a && (a = "");
-      this._suppressOutput || this._out(this._padding + performance.now().toFixed(2) + " " + a);
-    };
-    a.prototype.writeComment = function(a) {
-      a = a.split("\n");
-      if (1 === a.length) {
-        this.writeLn("// " + a[0]);
+    d.prototype.write = function(e, b) {
+      void 0 === e && (e = "");
+      void 0 === b && (b = !1);
+      this._suppressOutput || this._outNoNewline((b ? this._padding : "") + e);
+    };
+    d.prototype.writeLn = function(e) {
+      void 0 === e && (e = "");
+      this._suppressOutput || this._out(this._padding + e);
+    };
+    d.prototype.writeObject = function(e, b) {
+      void 0 === e && (e = "");
+      this._suppressOutput || this._out(this._padding + e, b);
+    };
+    d.prototype.writeTimeLn = function(e) {
+      void 0 === e && (e = "");
+      this._suppressOutput || this._out(this._padding + performance.now().toFixed(2) + " " + e);
+    };
+    d.prototype.writeComment = function(e) {
+      e = e.split("\n");
+      if (1 === e.length) {
+        this.writeLn("// " + e[0]);
       } else {
         this.writeLn("/**");
-        for (var c = 0;c < a.length;c++) {
-          this.writeLn(" * " + a[c]);
+        for (var b = 0;b < e.length;b++) {
+          this.writeLn(" * " + e[b]);
         }
         this.writeLn(" */");
       }
     };
-    a.prototype.writeLns = function(a) {
-      a = a.split("\n");
-      for (var c = 0;c < a.length;c++) {
-        this.writeLn(a[c]);
-      }
-    };
-    a.prototype.errorLn = function(l) {
-      a.logLevel & 1 && this.boldRedLn(l);
-    };
-    a.prototype.warnLn = function(l) {
-      a.logLevel & 2 && this.yellowLn(l);
-    };
-    a.prototype.debugLn = function(l) {
-      a.logLevel & 4 && this.purpleLn(l);
-    };
-    a.prototype.logLn = function(l) {
-      a.logLevel & 8 && this.writeLn(l);
-    };
-    a.prototype.infoLn = function(l) {
-      a.logLevel & 16 && this.writeLn(l);
-    };
-    a.prototype.yellowLn = function(l) {
-      this.colorLn(a.YELLOW, l);
-    };
-    a.prototype.greenLn = function(l) {
-      this.colorLn(a.GREEN, l);
-    };
-    a.prototype.boldRedLn = function(l) {
-      this.colorLn(a.BOLD_RED, l);
-    };
-    a.prototype.redLn = function(l) {
-      this.colorLn(a.RED, l);
-    };
-    a.prototype.purpleLn = function(l) {
-      this.colorLn(a.PURPLE, l);
-    };
-    a.prototype.colorLn = function(l, c) {
-      this._suppressOutput || (inBrowser ? this._out(this._padding + c) : this._out(this._padding + l + c + a.ENDC));
-    };
-    a.prototype.redLns = function(l) {
-      this.colorLns(a.RED, l);
-    };
-    a.prototype.colorLns = function(a, c) {
-      for (var e = c.split("\n"), q = 0;q < e.length;q++) {
-        this.colorLn(a, e[q]);
-      }
-    };
-    a.prototype.enter = function(a) {
-      this._suppressOutput || this._out(this._padding + a);
+    d.prototype.writeLns = function(e) {
+      e = e.split("\n");
+      for (var b = 0;b < e.length;b++) {
+        this.writeLn(e[b]);
+      }
+    };
+    d.prototype.errorLn = function(e) {
+      d.logLevel & 1 && this.boldRedLn(e);
+    };
+    d.prototype.warnLn = function(e) {
+      d.logLevel & 2 && this.yellowLn(e);
+    };
+    d.prototype.debugLn = function(e) {
+      d.logLevel & 4 && this.purpleLn(e);
+    };
+    d.prototype.logLn = function(e) {
+      d.logLevel & 8 && this.writeLn(e);
+    };
+    d.prototype.infoLn = function(e) {
+      d.logLevel & 16 && this.writeLn(e);
+    };
+    d.prototype.yellowLn = function(e) {
+      this.colorLn(d.YELLOW, e);
+    };
+    d.prototype.greenLn = function(e) {
+      this.colorLn(d.GREEN, e);
+    };
+    d.prototype.boldRedLn = function(e) {
+      this.colorLn(d.BOLD_RED, e);
+    };
+    d.prototype.redLn = function(e) {
+      this.colorLn(d.RED, e);
+    };
+    d.prototype.purpleLn = function(e) {
+      this.colorLn(d.PURPLE, e);
+    };
+    d.prototype.colorLn = function(e, b) {
+      this._suppressOutput || (inBrowser ? this._out(this._padding + b) : this._out(this._padding + e + b + d.ENDC));
+    };
+    d.prototype.redLns = function(e) {
+      this.colorLns(d.RED, e);
+    };
+    d.prototype.colorLns = function(e, b) {
+      for (var g = b.split("\n"), p = 0;p < g.length;p++) {
+        this.colorLn(e, g[p]);
+      }
+    };
+    d.prototype.enter = function(e) {
+      this._suppressOutput || this._out(this._padding + e);
       this.indent();
     };
-    a.prototype.leaveAndEnter = function(a) {
-      this.leave(a);
+    d.prototype.leaveAndEnter = function(e) {
+      this.leave(e);
       this.indent();
     };
-    a.prototype.leave = function(a) {
+    d.prototype.leave = function(e) {
       this.outdent();
-      !this._suppressOutput && a && this._out(this._padding + a);
-    };
-    a.prototype.indent = function() {
+      !this._suppressOutput && e && this._out(this._padding + e);
+    };
+    d.prototype.indent = function() {
       this._padding += this._tab;
     };
-    a.prototype.outdent = function() {
+    d.prototype.outdent = function() {
       0 < this._padding.length && (this._padding = this._padding.substring(0, this._padding.length - this._tab.length));
     };
-    a.prototype.writeArray = function(a, c, e) {
-      void 0 === c && (c = !1);
-      void 0 === e && (e = !1);
-      c = c || !1;
-      for (var q = 0, s = a.length;q < s;q++) {
-        var d = "";
-        c && (d = null === a[q] ? "null" : void 0 === a[q] ? "undefined" : a[q].constructor.name, d += " ");
-        var I = e ? "" : ("" + q).padRight(" ", 4);
-        this.writeLn(I + d + a[q]);
-      }
-    };
-    a.PURPLE = "\u001b[94m";
-    a.YELLOW = "\u001b[93m";
-    a.GREEN = "\u001b[92m";
-    a.RED = "\u001b[91m";
-    a.BOLD_RED = "\u001b[1;91m";
-    a.ENDC = "\u001b[0m";
-    a.logLevel = 31;
-    a._consoleOut = console.info.bind(console);
-    a._consoleOutNoNewline = console.info.bind(console);
-    return a;
+    d.prototype.writeArray = function(e, b, g) {
+      void 0 === b && (b = !1);
+      void 0 === g && (g = !1);
+      b = b || !1;
+      for (var p = 0, d = e.length;p < d;p++) {
+        var a = "";
+        b && (a = null === e[p] ? "null" : void 0 === e[p] ? "undefined" : e[p].constructor.name, a += " ");
+        var h = g ? "" : ("" + p).padRight(" ", 4);
+        this.writeLn(h + a + e[p]);
+      }
+    };
+    d.PURPLE = "\u001b[94m";
+    d.YELLOW = "\u001b[93m";
+    d.GREEN = "\u001b[92m";
+    d.RED = "\u001b[91m";
+    d.BOLD_RED = "\u001b[1;91m";
+    d.ENDC = "\u001b[0m";
+    d.logLevel = 31;
+    d._consoleOut = console.info.bind(console);
+    d._consoleOutNoNewline = console.info.bind(console);
+    return d;
   }();
   k.IndentingWriter = a;
   var m = function() {
-    return function(a, l) {
-      this.value = a;
-      this.next = l;
+    return function(d, e) {
+      this.value = d;
+      this.next = e;
     };
   }(), a = function() {
-    function a(l) {
-      this._compare = l;
+    function d(e) {
+      this._compare = e;
       this._head = null;
       this._length = 0;
     }
-    a.prototype.push = function(a) {
+    d.prototype.push = function(e) {
       this._length++;
       if (this._head) {
-        var c = this._head, e = null;
-        a = new m(a, null);
-        for (var q = this._compare;c;) {
-          if (0 < q(c.value, a.value)) {
-            e ? (a.next = c, e.next = a) : (a.next = this._head, this._head = a);
+        var b = this._head, g = null;
+        e = new m(e, null);
+        for (var p = this._compare;b;) {
+          if (0 < p(b.value, e.value)) {
+            g ? (e.next = b, g.next = e) : (e.next = this._head, this._head = e);
             return;
           }
-          e = c;
-          c = c.next;
-        }
-        e.next = a;
+          g = b;
+          b = b.next;
+        }
+        g.next = e;
       } else {
-        this._head = new m(a, null);
-      }
-    };
-    a.prototype.forEach = function(l) {
-      for (var c = this._head, e = null;c;) {
-        var q = l(c.value);
-        if (q === a.RETURN) {
+        this._head = new m(e, null);
+      }
+    };
+    d.prototype.forEach = function(e) {
+      for (var b = this._head, g = null;b;) {
+        var p = e(b.value);
+        if (p === d.RETURN) {
           break;
         } else {
-          q === a.DELETE ? c = e ? e.next = c.next : this._head = this._head.next : (e = c, c = c.next);
-        }
-      }
-    };
-    a.prototype.isEmpty = function() {
+          p === d.DELETE ? b = g ? g.next = b.next : this._head = this._head.next : (g = b, b = b.next);
+        }
+      }
+    };
+    d.prototype.isEmpty = function() {
       return!this._head;
     };
-    a.prototype.pop = function() {
+    d.prototype.pop = function() {
       if (this._head) {
         this._length--;
-        var a = this._head;
+        var e = this._head;
         this._head = this._head.next;
-        return a.value;
-      }
-    };
-    a.prototype.contains = function(a) {
-      for (var c = this._head;c;) {
-        if (c.value === a) {
+        return e.value;
+      }
+    };
+    d.prototype.contains = function(e) {
+      for (var b = this._head;b;) {
+        if (b.value === e) {
           return!0;
         }
-        c = c.next;
+        b = b.next;
       }
       return!1;
     };
-    a.prototype.toString = function() {
-      for (var a = "[", c = this._head;c;) {
-        a += c.value.toString(), (c = c.next) && (a += ",");
-      }
-      return a + "]";
-    };
-    a.RETURN = 1;
-    a.DELETE = 2;
-    return a;
+    d.prototype.toString = function() {
+      for (var e = "[", b = this._head;b;) {
+        e += b.value.toString(), (b = b.next) && (e += ",");
+      }
+      return e + "]";
+    };
+    d.RETURN = 1;
+    d.DELETE = 2;
+    return d;
   }();
   k.SortedList = a;
   a = function() {
-    function a(l, c) {
-      void 0 === c && (c = 12);
+    function d(e, b) {
+      void 0 === b && (b = 12);
       this.start = this.index = 0;
-      this._size = 1 << c;
+      this._size = 1 << b;
       this._mask = this._size - 1;
-      this.array = new l(this._size);
+      this.array = new e(this._size);
     }
-    a.prototype.get = function(a) {
-      return this.array[a];
-    };
-    a.prototype.forEachInReverse = function(a) {
+    d.prototype.get = function(e) {
+      return this.array[e];
+    };
+    d.prototype.forEachInReverse = function(e) {
       if (!this.isEmpty()) {
-        for (var c = 0 === this.index ? this._size - 1 : this.index - 1, e = this.start - 1 & this._mask;c !== e && !a(this.array[c], c);) {
-          c = 0 === c ? this._size - 1 : c - 1;
-        }
-      }
-    };
-    a.prototype.write = function(a) {
-      this.array[this.index] = a;
+        for (var b = 0 === this.index ? this._size - 1 : this.index - 1, g = this.start - 1 & this._mask;b !== g && !e(this.array[b], b);) {
+          b = 0 === b ? this._size - 1 : b - 1;
+        }
+      }
+    };
+    d.prototype.write = function(e) {
+      this.array[this.index] = e;
       this.index = this.index + 1 & this._mask;
       this.index === this.start && (this.start = this.start + 1 & this._mask);
     };
-    a.prototype.isFull = function() {
+    d.prototype.isFull = function() {
       return(this.index + 1 & this._mask) === this.start;
     };
-    a.prototype.isEmpty = function() {
+    d.prototype.isEmpty = function() {
       return this.index === this.start;
     };
-    a.prototype.reset = function() {
+    d.prototype.reset = function() {
       this.start = this.index = 0;
     };
-    return a;
+    return d;
   }();
   k.CircularBuffer = a;
-  (function(a) {
-    function l(c) {
-      return c + (a.BITS_PER_WORD - 1) >> a.ADDRESS_BITS_PER_WORD << a.ADDRESS_BITS_PER_WORD;
+  (function(d) {
+    function e(b) {
+      return b + (d.BITS_PER_WORD - 1) >> d.ADDRESS_BITS_PER_WORD << d.ADDRESS_BITS_PER_WORD;
     }
-    function c(c, a) {
-      c = c || "1";
-      a = a || "0";
-      for (var e = "", q = 0;q < length;q++) {
-        e += this.get(q) ? c : a;
-      }
-      return e;
+    function b(b, p) {
+      b = b || "1";
+      p = p || "0";
+      for (var g = "", e = 0;e < length;e++) {
+        g += this.get(e) ? b : p;
+      }
+      return g;
     }
-    function e(c) {
-      for (var a = [], e = 0;e < length;e++) {
-        this.get(e) && a.push(c ? c[e] : e);
-      }
-      return a.join(", ");
+    function g(b) {
+      for (var p = [], g = 0;g < length;g++) {
+        this.get(g) && p.push(b ? b[g] : g);
+      }
+      return p.join(", ");
     }
-    a.ADDRESS_BITS_PER_WORD = 5;
-    a.BITS_PER_WORD = 1 << a.ADDRESS_BITS_PER_WORD;
-    a.BIT_INDEX_MASK = a.BITS_PER_WORD - 1;
-    var q = function() {
-      function c(e) {
-        this.size = l(e);
+    d.ADDRESS_BITS_PER_WORD = 5;
+    d.BITS_PER_WORD = 1 << d.ADDRESS_BITS_PER_WORD;
+    d.BIT_INDEX_MASK = d.BITS_PER_WORD - 1;
+    var p = function() {
+      function b(p) {
+        this.size = e(p);
         this.dirty = this.count = 0;
-        this.length = e;
-        this.bits = new Uint32Array(this.size >> a.ADDRESS_BITS_PER_WORD);
-      }
-      c.prototype.recount = function() {
+        this.length = p;
+        this.bits = new Uint32Array(this.size >> d.ADDRESS_BITS_PER_WORD);
+      }
+      b.prototype.recount = function() {
         if (this.dirty) {
-          for (var c = this.bits, a = 0, e = 0, q = c.length;e < q;e++) {
-            var s = c[e], s = s - (s >> 1 & 1431655765), s = (s & 858993459) + (s >> 2 & 858993459), a = a + (16843009 * (s + (s >> 4) & 252645135) >> 24)
-          }
-          this.count = a;
+          for (var b = this.bits, p = 0, g = 0, e = b.length;g < e;g++) {
+            var d = b[g], d = d - (d >> 1 & 1431655765), d = (d & 858993459) + (d >> 2 & 858993459), p = p + (16843009 * (d + (d >> 4) & 252645135) >> 24)
+          }
+          this.count = p;
           this.dirty = 0;
         }
       };
-      c.prototype.set = function(c) {
-        var e = c >> a.ADDRESS_BITS_PER_WORD, q = this.bits[e];
-        c = q | 1 << (c & a.BIT_INDEX_MASK);
-        this.bits[e] = c;
-        this.dirty |= q ^ c;
-      };
-      c.prototype.setAll = function() {
-        for (var c = this.bits, a = 0, e = c.length;a < e;a++) {
-          c[a] = 4294967295;
+      b.prototype.set = function(b) {
+        var p = b >> d.ADDRESS_BITS_PER_WORD, g = this.bits[p];
+        b = g | 1 << (b & d.BIT_INDEX_MASK);
+        this.bits[p] = b;
+        this.dirty |= g ^ b;
+      };
+      b.prototype.setAll = function() {
+        for (var b = this.bits, p = 0, g = b.length;p < g;p++) {
+          b[p] = 4294967295;
         }
         this.count = this.size;
         this.dirty = 0;
       };
-      c.prototype.assign = function(c) {
-        this.count = c.count;
-        this.dirty = c.dirty;
-        this.size = c.size;
-        for (var a = 0, e = this.bits.length;a < e;a++) {
-          this.bits[a] = c.bits[a];
-        }
-      };
-      c.prototype.clear = function(c) {
-        var e = c >> a.ADDRESS_BITS_PER_WORD, q = this.bits[e];
-        c = q & ~(1 << (c & a.BIT_INDEX_MASK));
-        this.bits[e] = c;
-        this.dirty |= q ^ c;
-      };
-      c.prototype.get = function(c) {
-        return 0 !== (this.bits[c >> a.ADDRESS_BITS_PER_WORD] & 1 << (c & a.BIT_INDEX_MASK));
-      };
-      c.prototype.clearAll = function() {
-        for (var c = this.bits, a = 0, e = c.length;a < e;a++) {
-          c[a] = 0;
+      b.prototype.assign = function(b) {
+        this.count = b.count;
+        this.dirty = b.dirty;
+        this.size = b.size;
+        for (var p = 0, g = this.bits.length;p < g;p++) {
+          this.bits[p] = b.bits[p];
+        }
+      };
+      b.prototype.clear = function(b) {
+        var p = b >> d.ADDRESS_BITS_PER_WORD, g = this.bits[p];
+        b = g & ~(1 << (b & d.BIT_INDEX_MASK));
+        this.bits[p] = b;
+        this.dirty |= g ^ b;
+      };
+      b.prototype.get = function(b) {
+        return 0 !== (this.bits[b >> d.ADDRESS_BITS_PER_WORD] & 1 << (b & d.BIT_INDEX_MASK));
+      };
+      b.prototype.clearAll = function() {
+        for (var b = this.bits, p = 0, g = b.length;p < g;p++) {
+          b[p] = 0;
         }
         this.dirty = this.count = 0;
       };
-      c.prototype._union = function(c) {
-        var a = this.dirty, e = this.bits;
-        c = c.bits;
-        for (var q = 0, s = e.length;q < s;q++) {
-          var l = e[q], d = l | c[q];
-          e[q] = d;
-          a |= l ^ d;
-        }
-        this.dirty = a;
-      };
-      c.prototype.intersect = function(c) {
-        var a = this.dirty, e = this.bits;
-        c = c.bits;
-        for (var q = 0, s = e.length;q < s;q++) {
-          var l = e[q], d = l & c[q];
-          e[q] = d;
-          a |= l ^ d;
-        }
-        this.dirty = a;
-      };
-      c.prototype.subtract = function(c) {
-        var a = this.dirty, e = this.bits;
-        c = c.bits;
-        for (var q = 0, s = e.length;q < s;q++) {
-          var l = e[q], d = l & ~c[q];
-          e[q] = d;
-          a |= l ^ d;
-        }
-        this.dirty = a;
-      };
-      c.prototype.negate = function() {
-        for (var c = this.dirty, a = this.bits, e = 0, q = a.length;e < q;e++) {
-          var s = a[e], l = ~s;
-          a[e] = l;
-          c |= s ^ l;
-        }
-        this.dirty = c;
-      };
-      c.prototype.forEach = function(c) {
-        for (var e = this.bits, q = 0, s = e.length;q < s;q++) {
-          var l = e[q];
-          if (l) {
-            for (var d = 0;d < a.BITS_PER_WORD;d++) {
-              l & 1 << d && c(q * a.BITS_PER_WORD + d);
-            }
-          }
-        }
-      };
-      c.prototype.toArray = function() {
-        for (var c = [], e = this.bits, q = 0, s = e.length;q < s;q++) {
-          var l = e[q];
-          if (l) {
-            for (var d = 0;d < a.BITS_PER_WORD;d++) {
-              l & 1 << d && c.push(q * a.BITS_PER_WORD + d);
-            }
-          }
-        }
-        return c;
-      };
-      c.prototype.equals = function(c) {
-        if (this.size !== c.size) {
+      b.prototype._union = function(b) {
+        var p = this.dirty, g = this.bits;
+        b = b.bits;
+        for (var e = 0, d = g.length;e < d;e++) {
+          var a = g[e], u = a | b[e];
+          g[e] = u;
+          p |= a ^ u;
+        }
+        this.dirty = p;
+      };
+      b.prototype.intersect = function(b) {
+        var p = this.dirty, g = this.bits;
+        b = b.bits;
+        for (var e = 0, d = g.length;e < d;e++) {
+          var a = g[e], u = a & b[e];
+          g[e] = u;
+          p |= a ^ u;
+        }
+        this.dirty = p;
+      };
+      b.prototype.subtract = function(b) {
+        var p = this.dirty, g = this.bits;
+        b = b.bits;
+        for (var e = 0, d = g.length;e < d;e++) {
+          var a = g[e], u = a & ~b[e];
+          g[e] = u;
+          p |= a ^ u;
+        }
+        this.dirty = p;
+      };
+      b.prototype.negate = function() {
+        for (var b = this.dirty, p = this.bits, g = 0, e = p.length;g < e;g++) {
+          var d = p[g], a = ~d;
+          p[g] = a;
+          b |= d ^ a;
+        }
+        this.dirty = b;
+      };
+      b.prototype.forEach = function(b) {
+        for (var p = this.bits, g = 0, e = p.length;g < e;g++) {
+          var a = p[g];
+          if (a) {
+            for (var u = 0;u < d.BITS_PER_WORD;u++) {
+              a & 1 << u && b(g * d.BITS_PER_WORD + u);
+            }
+          }
+        }
+      };
+      b.prototype.toArray = function() {
+        for (var b = [], p = this.bits, g = 0, e = p.length;g < e;g++) {
+          var a = p[g];
+          if (a) {
+            for (var u = 0;u < d.BITS_PER_WORD;u++) {
+              a & 1 << u && b.push(g * d.BITS_PER_WORD + u);
+            }
+          }
+        }
+        return b;
+      };
+      b.prototype.equals = function(b) {
+        if (this.size !== b.size) {
           return!1;
         }
-        var a = this.bits;
-        c = c.bits;
-        for (var e = 0, q = a.length;e < q;e++) {
-          if (a[e] !== c[e]) {
+        var p = this.bits;
+        b = b.bits;
+        for (var g = 0, e = p.length;g < e;g++) {
+          if (p[g] !== b[g]) {
             return!1;
           }
         }
         return!0;
       };
-      c.prototype.contains = function(c) {
-        if (this.size !== c.size) {
+      b.prototype.contains = function(b) {
+        if (this.size !== b.size) {
           return!1;
         }
-        var a = this.bits;
-        c = c.bits;
-        for (var e = 0, q = a.length;e < q;e++) {
-          if ((a[e] | c[e]) !== a[e]) {
+        var p = this.bits;
+        b = b.bits;
+        for (var g = 0, e = p.length;g < e;g++) {
+          if ((p[g] | b[g]) !== p[g]) {
             return!1;
           }
         }
         return!0;
       };
-      c.prototype.isEmpty = function() {
+      b.prototype.isEmpty = function() {
         this.recount();
         return 0 === this.count;
       };
-      c.prototype.clone = function() {
-        var a = new c(this.length);
-        a._union(this);
-        return a;
-      };
-      return c;
+      b.prototype.clone = function() {
+        var p = new b(this.length);
+        p._union(this);
+        return p;
+      };
+      return b;
     }();
-    a.Uint32ArrayBitSet = q;
-    var s = function() {
-      function c(a) {
+    d.Uint32ArrayBitSet = p;
+    var a = function() {
+      function b(p) {
         this.dirty = this.count = 0;
-        this.size = l(a);
+        this.size = e(p);
         this.bits = 0;
         this.singleWord = !0;
-        this.length = a;
-      }
-      c.prototype.recount = function() {
+        this.length = p;
+      }
+      b.prototype.recount = function() {
         if (this.dirty) {
-          var c = this.bits, c = c - (c >> 1 & 1431655765), c = (c & 858993459) + (c >> 2 & 858993459);
-          this.count = 0 + (16843009 * (c + (c >> 4) & 252645135) >> 24);
+          var b = this.bits, b = b - (b >> 1 & 1431655765), b = (b & 858993459) + (b >> 2 & 858993459);
+          this.count = 0 + (16843009 * (b + (b >> 4) & 252645135) >> 24);
           this.dirty = 0;
         }
       };
-      c.prototype.set = function(c) {
-        var e = this.bits;
-        this.bits = c = e | 1 << (c & a.BIT_INDEX_MASK);
-        this.dirty |= e ^ c;
-      };
-      c.prototype.setAll = function() {
+      b.prototype.set = function(b) {
+        var p = this.bits;
+        this.bits = b = p | 1 << (b & d.BIT_INDEX_MASK);
+        this.dirty |= p ^ b;
+      };
+      b.prototype.setAll = function() {
         this.bits = 4294967295;
         this.count = this.size;
         this.dirty = 0;
       };
-      c.prototype.assign = function(c) {
-        this.count = c.count;
-        this.dirty = c.dirty;
-        this.size = c.size;
-        this.bits = c.bits;
-      };
-      c.prototype.clear = function(c) {
-        var e = this.bits;
-        this.bits = c = e & ~(1 << (c & a.BIT_INDEX_MASK));
-        this.dirty |= e ^ c;
-      };
-      c.prototype.get = function(c) {
-        return 0 !== (this.bits & 1 << (c & a.BIT_INDEX_MASK));
-      };
-      c.prototype.clearAll = function() {
+      b.prototype.assign = function(b) {
+        this.count = b.count;
+        this.dirty = b.dirty;
+        this.size = b.size;
+        this.bits = b.bits;
+      };
+      b.prototype.clear = function(b) {
+        var p = this.bits;
+        this.bits = b = p & ~(1 << (b & d.BIT_INDEX_MASK));
+        this.dirty |= p ^ b;
+      };
+      b.prototype.get = function(b) {
+        return 0 !== (this.bits & 1 << (b & d.BIT_INDEX_MASK));
+      };
+      b.prototype.clearAll = function() {
         this.dirty = this.count = this.bits = 0;
       };
-      c.prototype._union = function(c) {
-        var a = this.bits;
-        this.bits = c = a | c.bits;
-        this.dirty = a ^ c;
-      };
-      c.prototype.intersect = function(c) {
-        var a = this.bits;
-        this.bits = c = a & c.bits;
-        this.dirty = a ^ c;
-      };
-      c.prototype.subtract = function(c) {
-        var a = this.bits;
-        this.bits = c = a & ~c.bits;
-        this.dirty = a ^ c;
-      };
-      c.prototype.negate = function() {
-        var c = this.bits, a = ~c;
-        this.bits = a;
-        this.dirty = c ^ a;
-      };
-      c.prototype.forEach = function(c) {
-        var e = this.bits;
-        if (e) {
-          for (var q = 0;q < a.BITS_PER_WORD;q++) {
-            e & 1 << q && c(q);
-          }
-        }
-      };
-      c.prototype.toArray = function() {
-        var c = [], e = this.bits;
-        if (e) {
-          for (var q = 0;q < a.BITS_PER_WORD;q++) {
-            e & 1 << q && c.push(q);
-          }
-        }
-        return c;
-      };
-      c.prototype.equals = function(c) {
-        return this.bits === c.bits;
-      };
-      c.prototype.contains = function(c) {
-        var a = this.bits;
-        return(a | c.bits) === a;
-      };
-      c.prototype.isEmpty = function() {
+      b.prototype._union = function(b) {
+        var p = this.bits;
+        this.bits = b = p | b.bits;
+        this.dirty = p ^ b;
+      };
+      b.prototype.intersect = function(b) {
+        var p = this.bits;
+        this.bits = b = p & b.bits;
+        this.dirty = p ^ b;
+      };
+      b.prototype.subtract = function(b) {
+        var p = this.bits;
+        this.bits = b = p & ~b.bits;
+        this.dirty = p ^ b;
+      };
+      b.prototype.negate = function() {
+        var b = this.bits, p = ~b;
+        this.bits = p;
+        this.dirty = b ^ p;
+      };
+      b.prototype.forEach = function(b) {
+        var p = this.bits;
+        if (p) {
+          for (var g = 0;g < d.BITS_PER_WORD;g++) {
+            p & 1 << g && b(g);
+          }
+        }
+      };
+      b.prototype.toArray = function() {
+        var b = [], p = this.bits;
+        if (p) {
+          for (var g = 0;g < d.BITS_PER_WORD;g++) {
+            p & 1 << g && b.push(g);
+          }
+        }
+        return b;
+      };
+      b.prototype.equals = function(b) {
+        return this.bits === b.bits;
+      };
+      b.prototype.contains = function(b) {
+        var p = this.bits;
+        return(p | b.bits) === p;
+      };
+      b.prototype.isEmpty = function() {
         this.recount();
         return 0 === this.count;
       };
-      c.prototype.clone = function() {
-        var a = new c(this.length);
-        a._union(this);
-        return a;
-      };
-      return c;
+      b.prototype.clone = function() {
+        var p = new b(this.length);
+        p._union(this);
+        return p;
+      };
+      return b;
     }();
-    a.Uint32BitSet = s;
-    s.prototype.toString = e;
-    s.prototype.toBitString = c;
-    q.prototype.toString = e;
-    q.prototype.toBitString = c;
-    a.BitSetFunctor = function(c) {
-      var e = 1 === l(c) >> a.ADDRESS_BITS_PER_WORD ? s : q;
+    d.Uint32BitSet = a;
+    a.prototype.toString = g;
+    a.prototype.toBitString = b;
+    p.prototype.toString = g;
+    p.prototype.toBitString = b;
+    d.BitSetFunctor = function(b) {
+      var g = 1 === e(b) >> d.ADDRESS_BITS_PER_WORD ? a : p;
       return function() {
-        return new e(c);
+        return new g(b);
       };
     };
   })(k.BitSets || (k.BitSets = {}));
   a = function() {
-    function a() {
+    function d() {
     }
-    a.randomStyle = function() {
-      a._randomStyleCache || (a._randomStyleCache = "#ff5e3a #ff9500 #ffdb4c #87fc70 #52edc7 #1ad6fd #c644fc #ef4db6 #4a4a4a #dbddde #ff3b30 #ff9500 #ffcc00 #4cd964 #34aadc #007aff #5856d6 #ff2d55 #8e8e93 #c7c7cc #5ad427 #c86edf #d1eefc #e0f8d8 #fb2b69 #f7f7f7 #1d77ef #d6cec3 #55efcb #ff4981 #ffd3e0 #f7f7f7 #ff1300 #1f1f21 #bdbec2 #ff3a2d".split(" "));
-      return a._randomStyleCache[a._nextStyle++ % a._randomStyleCache.length];
-    };
-    a.gradientColor = function(l) {
-      return a._gradient[a._gradient.length * f.clamp(l, 0, 1) | 0];
-    };
-    a.contrastStyle = function(a) {
-      a = parseInt(a.substr(1), 16);
-      return 128 <= (299 * (a >> 16) + 587 * (a >> 8 & 255) + 114 * (a & 255)) / 1E3 ? "#000000" : "#ffffff";
-    };
-    a.reset = function() {
-      a._nextStyle = 0;
-    };
-    a.TabToolbar = "#252c33";
-    a.Toolbars = "#343c45";
-    a.HighlightBlue = "#1d4f73";
-    a.LightText = "#f5f7fa";
-    a.ForegroundText = "#b6babf";
-    a.Black = "#000000";
-    a.VeryDark = "#14171a";
-    a.Dark = "#181d20";
-    a.Light = "#a9bacb";
-    a.Grey = "#8fa1b2";
-    a.DarkGrey = "#5f7387";
-    a.Blue = "#46afe3";
-    a.Purple = "#6b7abb";
-    a.Pink = "#df80ff";
-    a.Red = "#eb5368";
-    a.Orange = "#d96629";
-    a.LightOrange = "#d99b28";
-    a.Green = "#70bf53";
-    a.BlueGrey = "#5e88b0";
-    a._nextStyle = 0;
-    a._gradient = "#FF0000 #FF1100 #FF2300 #FF3400 #FF4600 #FF5700 #FF6900 #FF7B00 #FF8C00 #FF9E00 #FFAF00 #FFC100 #FFD300 #FFE400 #FFF600 #F7FF00 #E5FF00 #D4FF00 #C2FF00 #B0FF00 #9FFF00 #8DFF00 #7CFF00 #6AFF00 #58FF00 #47FF00 #35FF00 #24FF00 #12FF00 #00FF00".split(" ");
-    return a;
+    d.randomStyle = function() {
+      d._randomStyleCache || (d._randomStyleCache = "#ff5e3a #ff9500 #ffdb4c #87fc70 #52edc7 #1ad6fd #c644fc #ef4db6 #4a4a4a #dbddde #ff3b30 #ff9500 #ffcc00 #4cd964 #34aadc #007aff #5856d6 #ff2d55 #8e8e93 #c7c7cc #5ad427 #c86edf #d1eefc #e0f8d8 #fb2b69 #f7f7f7 #1d77ef #d6cec3 #55efcb #ff4981 #ffd3e0 #f7f7f7 #ff1300 #1f1f21 #bdbec2 #ff3a2d".split(" "));
+      return d._randomStyleCache[d._nextStyle++ % d._randomStyleCache.length];
+    };
+    d.gradientColor = function(e) {
+      return d._gradient[d._gradient.length * l.clamp(e, 0, 1) | 0];
+    };
+    d.contrastStyle = function(e) {
+      e = parseInt(e.substr(1), 16);
+      return 128 <= (299 * (e >> 16) + 587 * (e >> 8 & 255) + 114 * (e & 255)) / 1E3 ? "#000000" : "#ffffff";
+    };
+    d.reset = function() {
+      d._nextStyle = 0;
+    };
+    d.TabToolbar = "#252c33";
+    d.Toolbars = "#343c45";
+    d.HighlightBlue = "#1d4f73";
+    d.LightText = "#f5f7fa";
+    d.ForegroundText = "#b6babf";
+    d.Black = "#000000";
+    d.VeryDark = "#14171a";
+    d.Dark = "#181d20";
+    d.Light = "#a9bacb";
+    d.Grey = "#8fa1b2";
+    d.DarkGrey = "#5f7387";
+    d.Blue = "#46afe3";
+    d.Purple = "#6b7abb";
+    d.Pink = "#df80ff";
+    d.Red = "#eb5368";
+    d.Orange = "#d96629";
+    d.LightOrange = "#d99b28";
+    d.Green = "#70bf53";
+    d.BlueGrey = "#5e88b0";
+    d._nextStyle = 0;
+    d._gradient = "#FF0000 #FF1100 #FF2300 #FF3400 #FF4600 #FF5700 #FF6900 #FF7B00 #FF8C00 #FF9E00 #FFAF00 #FFC100 #FFD300 #FFE400 #FFF600 #F7FF00 #E5FF00 #D4FF00 #C2FF00 #B0FF00 #9FFF00 #8DFF00 #7CFF00 #6AFF00 #58FF00 #47FF00 #35FF00 #24FF00 #12FF00 #00FF00".split(" ");
+    return d;
   }();
   k.ColorStyle = a;
   a = function() {
-    function a(l, c, e, q) {
-      this.xMin = l | 0;
-      this.yMin = c | 0;
-      this.xMax = e | 0;
-      this.yMax = q | 0;
+    function d(e, b, g, p) {
+      this.xMin = e | 0;
+      this.yMin = b | 0;
+      this.xMax = g | 0;
+      this.yMax = p | 0;
     }
-    a.FromUntyped = function(l) {
-      return new a(l.xMin, l.yMin, l.xMax, l.yMax);
-    };
-    a.FromRectangle = function(l) {
-      return new a(20 * l.x | 0, 20 * l.y | 0, 20 * (l.x + l.width) | 0, 20 * (l.y + l.height) | 0);
-    };
-    a.prototype.setElements = function(a, c, e, q) {
-      this.xMin = a;
-      this.yMin = c;
-      this.xMax = e;
-      this.yMax = q;
-    };
-    a.prototype.copyFrom = function(a) {
-      this.setElements(a.xMin, a.yMin, a.xMax, a.yMax);
-    };
-    a.prototype.contains = function(a, c) {
-      return a < this.xMin !== a < this.xMax && c < this.yMin !== c < this.yMax;
-    };
-    a.prototype.unionInPlace = function(a) {
-      a.isEmpty() || (this.extendByPoint(a.xMin, a.yMin), this.extendByPoint(a.xMax, a.yMax));
-    };
-    a.prototype.extendByPoint = function(a, c) {
-      this.extendByX(a);
-      this.extendByY(c);
-    };
-    a.prototype.extendByX = function(a) {
-      134217728 === this.xMin ? this.xMin = this.xMax = a : (this.xMin = Math.min(this.xMin, a), this.xMax = Math.max(this.xMax, a));
-    };
-    a.prototype.extendByY = function(a) {
-      134217728 === this.yMin ? this.yMin = this.yMax = a : (this.yMin = Math.min(this.yMin, a), this.yMax = Math.max(this.yMax, a));
-    };
-    a.prototype.intersects = function(a) {
-      return this.contains(a.xMin, a.yMin) || this.contains(a.xMax, a.yMax);
-    };
-    a.prototype.isEmpty = function() {
+    d.FromUntyped = function(e) {
+      return new d(e.xMin, e.yMin, e.xMax, e.yMax);
+    };
+    d.FromRectangle = function(e) {
+      return new d(20 * e.x | 0, 20 * e.y | 0, 20 * (e.x + e.width) | 0, 20 * (e.y + e.height) | 0);
+    };
+    d.prototype.setElements = function(e, b, g, p) {
+      this.xMin = e;
+      this.yMin = b;
+      this.xMax = g;
+      this.yMax = p;
+    };
+    d.prototype.copyFrom = function(e) {
+      this.setElements(e.xMin, e.yMin, e.xMax, e.yMax);
+    };
+    d.prototype.contains = function(e, b) {
+      return e < this.xMin !== e < this.xMax && b < this.yMin !== b < this.yMax;
+    };
+    d.prototype.unionInPlace = function(e) {
+      e.isEmpty() || (this.extendByPoint(e.xMin, e.yMin), this.extendByPoint(e.xMax, e.yMax));
+    };
+    d.prototype.extendByPoint = function(e, b) {
+      this.extendByX(e);
+      this.extendByY(b);
+    };
+    d.prototype.extendByX = function(e) {
+      134217728 === this.xMin ? this.xMin = this.xMax = e : (this.xMin = Math.min(this.xMin, e), this.xMax = Math.max(this.xMax, e));
+    };
+    d.prototype.extendByY = function(e) {
+      134217728 === this.yMin ? this.yMin = this.yMax = e : (this.yMin = Math.min(this.yMin, e), this.yMax = Math.max(this.yMax, e));
+    };
+    d.prototype.intersects = function(e) {
+      return this.contains(e.xMin, e.yMin) || this.contains(e.xMax, e.yMax);
+    };
+    d.prototype.isEmpty = function() {
       return this.xMax <= this.xMin || this.yMax <= this.yMin;
     };
-    Object.defineProperty(a.prototype, "width", {get:function() {
+    Object.defineProperty(d.prototype, "width", {get:function() {
       return this.xMax - this.xMin;
-    }, set:function(a) {
-      this.xMax = this.xMin + a;
+    }, set:function(e) {
+      this.xMax = this.xMin + e;
     }, enumerable:!0, configurable:!0});
-    Object.defineProperty(a.prototype, "height", {get:function() {
+    Object.defineProperty(d.prototype, "height", {get:function() {
       return this.yMax - this.yMin;
-    }, set:function(a) {
-      this.yMax = this.yMin + a;
+    }, set:function(e) {
+      this.yMax = this.yMin + e;
     }, enumerable:!0, configurable:!0});
-    a.prototype.getBaseWidth = function(a) {
-      return Math.abs(Math.cos(a)) * (this.xMax - this.xMin) + Math.abs(Math.sin(a)) * (this.yMax - this.yMin);
-    };
-    a.prototype.getBaseHeight = function(a) {
-      return Math.abs(Math.sin(a)) * (this.xMax - this.xMin) + Math.abs(Math.cos(a)) * (this.yMax - this.yMin);
-    };
-    a.prototype.setEmpty = function() {
+    d.prototype.getBaseWidth = function(e) {
+      return Math.abs(Math.cos(e)) * (this.xMax - this.xMin) + Math.abs(Math.sin(e)) * (this.yMax - this.yMin);
+    };
+    d.prototype.getBaseHeight = function(e) {
+      return Math.abs(Math.sin(e)) * (this.xMax - this.xMin) + Math.abs(Math.cos(e)) * (this.yMax - this.yMin);
+    };
+    d.prototype.setEmpty = function() {
       this.xMin = this.yMin = this.xMax = this.yMax = 0;
     };
-    a.prototype.setToSentinels = function() {
+    d.prototype.setToSentinels = function() {
       this.xMin = this.yMin = this.xMax = this.yMax = 134217728;
     };
-    a.prototype.clone = function() {
-      return new a(this.xMin, this.yMin, this.xMax, this.yMax);
-    };
-    a.prototype.toString = function() {
+    d.prototype.clone = function() {
+      return new d(this.xMin, this.yMin, this.xMax, this.yMax);
+    };
+    d.prototype.toString = function() {
       return "{ xMin: " + this.xMin + ", xMin: " + this.yMin + ", xMax: " + this.xMax + ", xMax: " + this.yMax + " }";
     };
-    return a;
+    return d;
   }();
   k.Bounds = a;
   a = function() {
-    function a(l, c, e, q) {
-      h.assert(p(l));
-      h.assert(p(c));
-      h.assert(p(e));
-      h.assert(p(q));
-      this._xMin = l | 0;
-      this._yMin = c | 0;
-      this._xMax = e | 0;
-      this._yMax = q | 0;
+    function d(e, b, g, p) {
+      n.assert(r(e));
+      n.assert(r(b));
+      n.assert(r(g));
+      n.assert(r(p));
+      this._xMin = e | 0;
+      this._yMin = b | 0;
+      this._xMax = g | 0;
+      this._yMax = p | 0;
     }
-    a.FromUntyped = function(l) {
-      return new a(l.xMin, l.yMin, l.xMax, l.yMax);
-    };
-    a.FromRectangle = function(l) {
-      return new a(20 * l.x | 0, 20 * l.y | 0, 20 * (l.x + l.width) | 0, 20 * (l.y + l.height) | 0);
-    };
-    a.prototype.setElements = function(a, c, e, q) {
-      this.xMin = a;
-      this.yMin = c;
-      this.xMax = e;
-      this.yMax = q;
-    };
-    a.prototype.copyFrom = function(a) {
-      this.setElements(a.xMin, a.yMin, a.xMax, a.yMax);
-    };
-    a.prototype.contains = function(a, c) {
-      return a < this.xMin !== a < this.xMax && c < this.yMin !== c < this.yMax;
-    };
-    a.prototype.unionInPlace = function(a) {
-      a.isEmpty() || (this.extendByPoint(a.xMin, a.yMin), this.extendByPoint(a.xMax, a.yMax));
-    };
-    a.prototype.extendByPoint = function(a, c) {
-      this.extendByX(a);
-      this.extendByY(c);
-    };
-    a.prototype.extendByX = function(a) {
-      134217728 === this.xMin ? this.xMin = this.xMax = a : (this.xMin = Math.min(this.xMin, a), this.xMax = Math.max(this.xMax, a));
-    };
-    a.prototype.extendByY = function(a) {
-      134217728 === this.yMin ? this.yMin = this.yMax = a : (this.yMin = Math.min(this.yMin, a), this.yMax = Math.max(this.yMax, a));
-    };
-    a.prototype.intersects = function(a) {
-      return this.contains(a._xMin, a._yMin) || this.contains(a._xMax, a._yMax);
-    };
-    a.prototype.isEmpty = function() {
+    d.FromUntyped = function(e) {
+      return new d(e.xMin, e.yMin, e.xMax, e.yMax);
+    };
+    d.FromRectangle = function(e) {
+      return new d(20 * e.x | 0, 20 * e.y | 0, 20 * (e.x + e.width) | 0, 20 * (e.y + e.height) | 0);
+    };
+    d.prototype.setElements = function(e, b, g, p) {
+      this.xMin = e;
+      this.yMin = b;
+      this.xMax = g;
+      this.yMax = p;
+    };
+    d.prototype.copyFrom = function(e) {
+      this.setElements(e.xMin, e.yMin, e.xMax, e.yMax);
+    };
+    d.prototype.contains = function(e, b) {
+      return e < this.xMin !== e < this.xMax && b < this.yMin !== b < this.yMax;
+    };
+    d.prototype.unionInPlace = function(e) {
+      e.isEmpty() || (this.extendByPoint(e.xMin, e.yMin), this.extendByPoint(e.xMax, e.yMax));
+    };
+    d.prototype.extendByPoint = function(e, b) {
+      this.extendByX(e);
+      this.extendByY(b);
+    };
+    d.prototype.extendByX = function(e) {
+      134217728 === this.xMin ? this.xMin = this.xMax = e : (this.xMin = Math.min(this.xMin, e), this.xMax = Math.max(this.xMax, e));
+    };
+    d.prototype.extendByY = function(e) {
+      134217728 === this.yMin ? this.yMin = this.yMax = e : (this.yMin = Math.min(this.yMin, e), this.yMax = Math.max(this.yMax, e));
+    };
+    d.prototype.intersects = function(e) {
+      return this.contains(e._xMin, e._yMin) || this.contains(e._xMax, e._yMax);
+    };
+    d.prototype.isEmpty = function() {
       return this._xMax <= this._xMin || this._yMax <= this._yMin;
     };
-    Object.defineProperty(a.prototype, "xMin", {get:function() {
+    Object.defineProperty(d.prototype, "xMin", {get:function() {
       return this._xMin;
-    }, set:function(a) {
-      h.assert(p(a));
-      this._xMin = a;
+    }, set:function(e) {
+      n.assert(r(e));
+      this._xMin = e;
     }, enumerable:!0, configurable:!0});
-    Object.defineProperty(a.prototype, "yMin", {get:function() {
+    Object.defineProperty(d.prototype, "yMin", {get:function() {
       return this._yMin;
-    }, set:function(a) {
-      h.assert(p(a));
-      this._yMin = a | 0;
+    }, set:function(e) {
+      n.assert(r(e));
+      this._yMin = e | 0;
     }, enumerable:!0, configurable:!0});
-    Object.defineProperty(a.prototype, "xMax", {get:function() {
+    Object.defineProperty(d.prototype, "xMax", {get:function() {
       return this._xMax;
-    }, set:function(a) {
-      h.assert(p(a));
-      this._xMax = a | 0;
+    }, set:function(e) {
+      n.assert(r(e));
+      this._xMax = e | 0;
     }, enumerable:!0, configurable:!0});
-    Object.defineProperty(a.prototype, "width", {get:function() {
+    Object.defineProperty(d.prototype, "width", {get:function() {
       return this._xMax - this._xMin;
     }, enumerable:!0, configurable:!0});
-    Object.defineProperty(a.prototype, "yMax", {get:function() {
+    Object.defineProperty(d.prototype, "yMax", {get:function() {
       return this._yMax;
-    }, set:function(a) {
-      h.assert(p(a));
-      this._yMax = a | 0;
+    }, set:function(e) {
+      n.assert(r(e));
+      this._yMax = e | 0;
     }, enumerable:!0, configurable:!0});
-    Object.defineProperty(a.prototype, "height", {get:function() {
+    Object.defineProperty(d.prototype, "height", {get:function() {
       return this._yMax - this._yMin;
     }, enumerable:!0, configurable:!0});
-    a.prototype.getBaseWidth = function(a) {
-      return Math.abs(Math.cos(a)) * (this._xMax - this._xMin) + Math.abs(Math.sin(a)) * (this._yMax - this._yMin);
-    };
-    a.prototype.getBaseHeight = function(a) {
-      return Math.abs(Math.sin(a)) * (this._xMax - this._xMin) + Math.abs(Math.cos(a)) * (this._yMax - this._yMin);
-    };
-    a.prototype.setEmpty = function() {
+    d.prototype.getBaseWidth = function(e) {
+      return Math.abs(Math.cos(e)) * (this._xMax - this._xMin) + Math.abs(Math.sin(e)) * (this._yMax - this._yMin);
+    };
+    d.prototype.getBaseHeight = function(e) {
+      return Math.abs(Math.sin(e)) * (this._xMax - this._xMin) + Math.abs(Math.cos(e)) * (this._yMax - this._yMin);
+    };
+    d.prototype.setEmpty = function() {
       this._xMin = this._yMin = this._xMax = this._yMax = 0;
     };
-    a.prototype.clone = function() {
-      return new a(this.xMin, this.yMin, this.xMax, this.yMax);
-    };
-    a.prototype.toString = function() {
+    d.prototype.clone = function() {
+      return new d(this.xMin, this.yMin, this.xMax, this.yMax);
+    };
+    d.prototype.toString = function() {
       return "{ xMin: " + this._xMin + ", xMin: " + this._yMin + ", xMax: " + this._xMax + ", yMax: " + this._yMax + " }";
     };
-    a.prototype.assertValid = function() {
-    };
-    return a;
+    d.prototype.assertValid = function() {
+    };
+    return d;
   }();
   k.DebugBounds = a;
   a = function() {
-    function a(d, c, e, q) {
-      this.r = d;
-      this.g = c;
-      this.b = e;
-      this.a = q;
+    function d(e, b, g, p) {
+      this.r = e;
+      this.g = b;
+      this.b = g;
+      this.a = p;
     }
-    a.FromARGB = function(d) {
-      return new a((d >> 16 & 255) / 255, (d >> 8 & 255) / 255, (d >> 0 & 255) / 255, (d >> 24 & 255) / 255);
-    };
-    a.FromRGBA = function(d) {
-      return a.FromARGB(r.RGBAToARGB(d));
-    };
-    a.prototype.toRGBA = function() {
+    d.FromARGB = function(e) {
+      return new d((e >> 16 & 255) / 255, (e >> 8 & 255) / 255, (e >> 0 & 255) / 255, (e >> 24 & 255) / 255);
+    };
+    d.FromRGBA = function(e) {
+      return d.FromARGB(s.RGBAToARGB(e));
+    };
+    d.prototype.toRGBA = function() {
       return 255 * this.r << 24 | 255 * this.g << 16 | 255 * this.b << 8 | 255 * this.a;
     };
-    a.prototype.toCSSStyle = function() {
-      return r.rgbaToCSSStyle(this.toRGBA());
-    };
-    a.prototype.set = function(a) {
-      this.r = a.r;
-      this.g = a.g;
-      this.b = a.b;
-      this.a = a.a;
-    };
-    a.randomColor = function() {
-      var d = .4;
-      void 0 === d && (d = 1);
-      return new a(Math.random(), Math.random(), Math.random(), d);
-    };
-    a.parseColor = function(d) {
-      a.colorCache || (a.colorCache = Object.create(null));
-      if (a.colorCache[d]) {
-        return a.colorCache[d];
-      }
-      var c = document.createElement("span");
-      document.body.appendChild(c);
-      c.style.backgroundColor = d;
-      var e = getComputedStyle(c).backgroundColor;
-      document.body.removeChild(c);
-      (c = /^rgb\((\d+), (\d+), (\d+)\)$/.exec(e)) || (c = /^rgba\((\d+), (\d+), (\d+), ([\d.]+)\)$/.exec(e));
-      e = new a(0, 0, 0, 0);
-      e.r = parseFloat(c[1]) / 255;
-      e.g = parseFloat(c[2]) / 255;
-      e.b = parseFloat(c[3]) / 255;
-      e.a = c[4] ? parseFloat(c[4]) / 255 : 1;
-      return a.colorCache[d] = e;
-    };
-    a.Red = new a(1, 0, 0, 1);
-    a.Green = new a(0, 1, 0, 1);
-    a.Blue = new a(0, 0, 1, 1);
-    a.None = new a(0, 0, 0, 0);
-    a.White = new a(1, 1, 1, 1);
-    a.Black = new a(0, 0, 0, 1);
-    a.colorCache = {};
-    return a;
+    d.prototype.toCSSStyle = function() {
+      return s.rgbaToCSSStyle(this.toRGBA());
+    };
+    d.prototype.set = function(e) {
+      this.r = e.r;
+      this.g = e.g;
+      this.b = e.b;
+      this.a = e.a;
+    };
+    d.randomColor = function() {
+      var e = .4;
+      void 0 === e && (e = 1);
+      return new d(Math.random(), Math.random(), Math.random(), e);
+    };
+    d.parseColor = function(e) {
+      d.colorCache || (d.colorCache = Object.create(null));
+      if (d.colorCache[e]) {
+        return d.colorCache[e];
+      }
+      var b = document.createElement("span");
+      document.body.appendChild(b);
+      b.style.backgroundColor = e;
+      var g = getComputedStyle(b).backgroundColor;
+      document.body.removeChild(b);
+      (b = /^rgb\((\d+), (\d+), (\d+)\)$/.exec(g)) || (b = /^rgba\((\d+), (\d+), (\d+), ([\d.]+)\)$/.exec(g));
+      g = new d(0, 0, 0, 0);
+      g.r = parseFloat(b[1]) / 255;
+      g.g = parseFloat(b[2]) / 255;
+      g.b = parseFloat(b[3]) / 255;
+      g.a = b[4] ? parseFloat(b[4]) / 255 : 1;
+      return d.colorCache[e] = g;
+    };
+    d.Red = new d(1, 0, 0, 1);
+    d.Green = new d(0, 1, 0, 1);
+    d.Blue = new d(0, 0, 1, 1);
+    d.None = new d(0, 0, 0, 0);
+    d.White = new d(1, 1, 1, 1);
+    d.Black = new d(0, 0, 0, 1);
+    d.colorCache = {};
+    return d;
   }();
   k.Color = a;
-  var r;
-  (function(a) {
-    function d(c) {
-      var a, e, l = c >> 24 & 255;
-      e = (Math.imul(c >> 16 & 255, l) + 127) / 255 | 0;
-      a = (Math.imul(c >> 8 & 255, l) + 127) / 255 | 0;
-      c = (Math.imul(c >> 0 & 255, l) + 127) / 255 | 0;
-      return l << 24 | e << 16 | a << 8 | c;
+  var s;
+  (function(d) {
+    function e(b) {
+      var g, e, d = b >> 24 & 255;
+      e = (Math.imul(b >> 16 & 255, d) + 127) / 255 | 0;
+      g = (Math.imul(b >> 8 & 255, d) + 127) / 255 | 0;
+      b = (Math.imul(b >> 0 & 255, d) + 127) / 255 | 0;
+      return d << 24 | e << 16 | g << 8 | b;
     }
-    a.RGBAToARGB = function(c) {
-      return c >> 8 & 16777215 | (c & 255) << 24;
-    };
-    a.ARGBToRGBA = function(c) {
-      return c << 8 | c >> 24 & 255;
-    };
-    a.rgbaToCSSStyle = function(c) {
-      return k.StringUtilities.concat9("rgba(", c >> 24 & 255, ",", c >> 16 & 255, ",", c >> 8 & 255, ",", (c & 255) / 255, ")");
-    };
-    a.cssStyleToRGBA = function(c) {
-      if ("#" === c[0]) {
-        if (7 === c.length) {
-          return parseInt(c.substring(1), 16) << 8 | 255;
+    d.RGBAToARGB = function(b) {
+      return b >> 8 & 16777215 | (b & 255) << 24;
+    };
+    d.ARGBToRGBA = function(b) {
+      return b << 8 | b >> 24 & 255;
+    };
+    d.rgbaToCSSStyle = function(b) {
+      return k.StringUtilities.concat9("rgba(", b >> 24 & 255, ",", b >> 16 & 255, ",", b >> 8 & 255, ",", (b & 255) / 255, ")");
+    };
+    d.cssStyleToRGBA = function(b) {
+      if ("#" === b[0]) {
+        if (7 === b.length) {
+          return parseInt(b.substring(1), 16) << 8 | 255;
         }
       } else {
-        if ("r" === c[0]) {
-          return c = c.substring(5, c.length - 1).split(","), (parseInt(c[0]) & 255) << 24 | (parseInt(c[1]) & 255) << 16 | (parseInt(c[2]) & 255) << 8 | 255 * parseFloat(c[3]) & 255;
+        if ("r" === b[0]) {
+          return b = b.substring(5, b.length - 1).split(","), (parseInt(b[0]) & 255) << 24 | (parseInt(b[1]) & 255) << 16 | (parseInt(b[2]) & 255) << 8 | 255 * parseFloat(b[3]) & 255;
         }
       }
       return 4278190335;
     };
-    a.hexToRGB = function(c) {
-      return parseInt(c.slice(1), 16);
-    };
-    a.rgbToHex = function(c) {
-      return "#" + ("000000" + (c >>> 0).toString(16)).slice(-6);
-    };
-    a.isValidHexColor = function(c) {
-      return/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(c);
-    };
-    a.clampByte = function(c) {
-      return Math.max(0, Math.min(255, c));
-    };
-    a.unpremultiplyARGB = function(c) {
-      var a, e, d = c >> 24 & 255;
-      e = Math.imul(255, c >> 16 & 255) / d & 255;
-      a = Math.imul(255, c >> 8 & 255) / d & 255;
-      c = Math.imul(255, c >> 0 & 255) / d & 255;
-      return d << 24 | e << 16 | a << 8 | c;
-    };
-    a.premultiplyARGB = d;
-    var c;
-    a.ensureUnpremultiplyTable = function() {
-      if (!c) {
-        c = new Uint8Array(65536);
-        for (var a = 0;256 > a;a++) {
-          for (var e = 0;256 > e;e++) {
-            c[(e << 8) + a] = Math.imul(255, a) / e;
-          }
-        }
-      }
-    };
-    a.tableLookupUnpremultiplyARGB = function(a) {
-      a |= 0;
-      var e = a >> 24 & 255;
-      if (0 === e) {
+    d.hexToRGB = function(b) {
+      return parseInt(b.slice(1), 16);
+    };
+    d.rgbToHex = function(b) {
+      return "#" + ("000000" + (b >>> 0).toString(16)).slice(-6);
+    };
+    d.isValidHexColor = function(b) {
+      return/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(b);
+    };
+    d.clampByte = function(b) {
+      return Math.max(0, Math.min(255, b));
+    };
+    d.unpremultiplyARGB = function(b) {
+      var g, e, d = b >> 24 & 255;
+      e = Math.imul(255, b >> 16 & 255) / d & 255;
+      g = Math.imul(255, b >> 8 & 255) / d & 255;
+      b = Math.imul(255, b >> 0 & 255) / d & 255;
+      return d << 24 | e << 16 | g << 8 | b;
+    };
+    d.premultiplyARGB = e;
+    var b;
+    d.ensureUnpremultiplyTable = function() {
+      if (!b) {
+        b = new Uint8Array(65536);
+        for (var p = 0;256 > p;p++) {
+          for (var g = 0;256 > g;g++) {
+            b[(g << 8) + p] = Math.imul(255, p) / g;
+          }
+        }
+      }
+    };
+    d.tableLookupUnpremultiplyARGB = function(p) {
+      p |= 0;
+      var g = p >> 24 & 255;
+      if (0 === g) {
         return 0;
       }
-      if (255 === e) {
-        return a;
-      }
-      var d, l, n = e << 8, f = c;
-      l = f[n + (a >> 16 & 255)];
-      d = f[n + (a >> 8 & 255)];
-      a = f[n + (a >> 0 & 255)];
-      return e << 24 | l << 16 | d << 8 | a;
-    };
-    a.blendPremultipliedBGRA = function(c, a) {
+      if (255 === g) {
+        return p;
+      }
+      var e, d, a = g << 8, h = b;
+      d = h[a + (p >> 16 & 255)];
+      e = h[a + (p >> 8 & 255)];
+      p = h[a + (p >> 0 & 255)];
+      return g << 24 | d << 16 | e << 8 | p;
+    };
+    d.blendPremultipliedBGRA = function(b, g) {
       var e, d;
-      d = 256 - (a & 255);
-      e = Math.imul(c & 16711935, d) >> 8;
-      d = Math.imul(c >> 8 & 16711935, d) >> 8;
-      return((a >> 8 & 16711935) + d & 16711935) << 8 | (a & 16711935) + e & 16711935;
-    };
-    var e = v.swap32;
-    a.convertImage = function(a, s, y, n) {
-      var f = y.length;
-      if (a === s) {
-        if (y !== n) {
-          for (a = 0;a < f;a++) {
-            n[a] = y[a];
+      d = 256 - (g & 255);
+      e = Math.imul(b & 16711935, d) >> 8;
+      d = Math.imul(b >> 8 & 16711935, d) >> 8;
+      return((g >> 8 & 16711935) + d & 16711935) << 8 | (g & 16711935) + e & 16711935;
+    };
+    var g = v.swap32;
+    d.convertImage = function(p, d, a, h) {
+      var q = a.length;
+      if (p === d) {
+        if (a !== h) {
+          for (p = 0;p < q;p++) {
+            h[p] = a[p];
           }
         }
       } else {
-        if (1 === a && 3 === s) {
-          for (k.ColorUtilities.ensureUnpremultiplyTable(), a = 0;a < f;a++) {
-            var b = y[a];
-            s = b & 255;
-            if (0 === s) {
-              n[a] = 0;
+        if (1 === p && 3 === d) {
+          for (k.ColorUtilities.ensureUnpremultiplyTable(), p = 0;p < q;p++) {
+            var m = a[p];
+            d = m & 255;
+            if (0 === d) {
+              h[p] = 0;
             } else {
-              if (255 === s) {
-                n[a] = 4278190080 | b >> 8 & 16777215;
+              if (255 === d) {
+                h[p] = 4278190080 | m >> 8 & 16777215;
               } else {
-                var t = b >> 24 & 255, m = b >> 16 & 255, b = b >> 8 & 255, v = s << 8, r = c, b = r[v + b], m = r[v + m], t = r[v + t];
-                n[a] = s << 24 | t << 16 | m << 8 | b;
+                var c = m >> 24 & 255, l = m >> 16 & 255, m = m >> 8 & 255, s = d << 8, v = b, m = v[s + m], l = v[s + l], c = v[s + c];
+                h[p] = d << 24 | c << 16 | l << 8 | m;
               }
             }
           }
         } else {
-          if (2 === a && 3 === s) {
-            for (a = 0;a < f;a++) {
-              n[a] = e(y[a]);
+          if (2 === p && 3 === d) {
+            for (p = 0;p < q;p++) {
+              h[p] = g(a[p]);
             }
           } else {
-            if (3 === a && 1 === s) {
-              for (a = 0;a < f;a++) {
-                s = y[a], n[a] = e(d(s & 4278255360 | s >> 16 & 255 | (s & 255) << 16));
+            if (3 === p && 1 === d) {
+              for (p = 0;p < q;p++) {
+                d = a[p], h[p] = g(e(d & 4278255360 | d >> 16 & 255 | (d & 255) << 16));
               }
             } else {
-              for (h.somewhatImplemented("Image Format Conversion: " + w[a] + " -> " + w[s]), a = 0;a < f;a++) {
-                n[a] = y[a];
+              for (n.somewhatImplemented("Image Format Conversion: " + w[p] + " -> " + w[d]), p = 0;p < q;p++) {
+                h[p] = a[p];
               }
             }
           }
         }
       }
     };
-  })(r = k.ColorUtilities || (k.ColorUtilities = {}));
+  })(s = k.ColorUtilities || (k.ColorUtilities = {}));
   a = function() {
-    function a(d) {
-      void 0 === d && (d = 32);
+    function d(e) {
+      void 0 === e && (e = 32);
       this._list = [];
-      this._maxSize = d;
+      this._maxSize = e;
     }
-    a.prototype.acquire = function(d) {
-      if (a._enabled) {
-        for (var c = this._list, e = 0;e < c.length;e++) {
-          var q = c[e];
-          if (q.byteLength >= d) {
-            return c.splice(e, 1), q;
-          }
-        }
-      }
-      return new ArrayBuffer(d);
-    };
-    a.prototype.release = function(d) {
-      if (a._enabled) {
-        var c = this._list;
-        c.length === this._maxSize && c.shift();
-        c.push(d);
-      }
-    };
-    a.prototype.ensureUint8ArrayLength = function(a, c) {
-      if (a.length >= c) {
-        return a;
-      }
-      var e = Math.max(a.length + c, (3 * a.length >> 1) + 1), e = new Uint8Array(this.acquire(e), 0, e);
-      e.set(a);
-      this.release(a.buffer);
-      return e;
-    };
-    a.prototype.ensureFloat64ArrayLength = function(a, c) {
-      if (a.length >= c) {
-        return a;
-      }
-      var e = Math.max(a.length + c, (3 * a.length >> 1) + 1), e = new Float64Array(this.acquire(e * Float64Array.BYTES_PER_ELEMENT), 0, e);
-      e.set(a);
-      this.release(a.buffer);
-      return e;
-    };
-    a._enabled = !0;
-    return a;
+    d.prototype.acquire = function(e) {
+      if (d._enabled) {
+        for (var b = this._list, g = 0;g < b.length;g++) {
+          var p = b[g];
+          if (p.byteLength >= e) {
+            return b.splice(g, 1), p;
+          }
+        }
+      }
+      return new ArrayBuffer(e);
+    };
+    d.prototype.release = function(e) {
+      if (d._enabled) {
+        var b = this._list;
+        b.length === this._maxSize && b.shift();
+        b.push(e);
+      }
+    };
+    d.prototype.ensureUint8ArrayLength = function(e, b) {
+      if (e.length >= b) {
+        return e;
+      }
+      var g = Math.max(e.length + b, (3 * e.length >> 1) + 1), g = new Uint8Array(this.acquire(g), 0, g);
+      g.set(e);
+      this.release(e.buffer);
+      return g;
+    };
+    d.prototype.ensureFloat64ArrayLength = function(e, b) {
+      if (e.length >= b) {
+        return e;
+      }
+      var g = Math.max(e.length + b, (3 * e.length >> 1) + 1), g = new Float64Array(this.acquire(g * Float64Array.BYTES_PER_ELEMENT), 0, g);
+      g.set(e);
+      this.release(e.buffer);
+      return g;
+    };
+    d._enabled = !0;
+    return d;
   }();
   k.ArrayBufferPool = a;
-  (function(a) {
-    (function(a) {
-      a[a.EXTERNAL_INTERFACE_FEATURE = 1] = "EXTERNAL_INTERFACE_FEATURE";
-      a[a.CLIPBOARD_FEATURE = 2] = "CLIPBOARD_FEATURE";
-      a[a.SHAREDOBJECT_FEATURE = 3] = "SHAREDOBJECT_FEATURE";
-      a[a.VIDEO_FEATURE = 4] = "VIDEO_FEATURE";
-      a[a.SOUND_FEATURE = 5] = "SOUND_FEATURE";
-      a[a.NETCONNECTION_FEATURE = 6] = "NETCONNECTION_FEATURE";
-    })(a.Feature || (a.Feature = {}));
-    (function(a) {
-      a[a.AVM1_ERROR = 1] = "AVM1_ERROR";
-      a[a.AVM2_ERROR = 2] = "AVM2_ERROR";
-    })(a.ErrorTypes || (a.ErrorTypes = {}));
-    a.instance;
+  (function(d) {
+    (function(e) {
+      e[e.EXTERNAL_INTERFACE_FEATURE = 1] = "EXTERNAL_INTERFACE_FEATURE";
+      e[e.CLIPBOARD_FEATURE = 2] = "CLIPBOARD_FEATURE";
+      e[e.SHAREDOBJECT_FEATURE = 3] = "SHAREDOBJECT_FEATURE";
+      e[e.VIDEO_FEATURE = 4] = "VIDEO_FEATURE";
+      e[e.SOUND_FEATURE = 5] = "SOUND_FEATURE";
+      e[e.NETCONNECTION_FEATURE = 6] = "NETCONNECTION_FEATURE";
+    })(d.Feature || (d.Feature = {}));
+    (function(e) {
+      e[e.AVM1_ERROR = 1] = "AVM1_ERROR";
+      e[e.AVM2_ERROR = 2] = "AVM2_ERROR";
+    })(d.ErrorTypes || (d.ErrorTypes = {}));
+    d.instance;
   })(k.Telemetry || (k.Telemetry = {}));
-  (function(a) {
-    a.instance;
+  (function(d) {
+    d.instance;
   })(k.FileLoadingService || (k.FileLoadingService = {}));
-  k.registerCSSFont = function(a, d, c) {
+  (function(d) {
+    d[d.BuiltinAbc = 0] = "BuiltinAbc";
+    d[d.PlayerglobalAbcs = 1] = "PlayerglobalAbcs";
+    d[d.PlayerglobalManifest = 2] = "PlayerglobalManifest";
+    d[d.ShellAbc = 3] = "ShellAbc";
+  })(k.SystemResourceId || (k.SystemResourceId = {}));
+  (function(d) {
+    d.instance;
+  })(k.SystemResourcesLoadingService || (k.SystemResourcesLoadingService = {}));
+  k.registerCSSFont = function(d, e, b) {
     if (inBrowser) {
-      var e = document.head;
-      e.insertBefore(document.createElement("style"), e.firstChild);
-      e = document.styleSheets[0];
-      d = "@font-face{font-family:swffont" + a + ";src:url(data:font/opentype;base64," + k.StringUtilities.base64ArrayBuffer(d) + ")}";
-      e.insertRule(d, e.cssRules.length);
-      c && (c = document.createElement("div"), c.style.fontFamily = "swffont" + a, c.innerHTML = "hello", document.body.appendChild(c), document.body.removeChild(c));
+      var g = document.head;
+      g.insertBefore(document.createElement("style"), g.firstChild);
+      g = document.styleSheets[0];
+      e = "@font-face{font-family:swffont" + d + ";src:url(data:font/opentype;base64," + k.StringUtilities.base64ArrayBuffer(e) + ")}";
+      g.insertRule(e, g.cssRules.length);
+      b && (b = document.createElement("div"), b.style.fontFamily = "swffont" + d, b.innerHTML = "hello", document.body.appendChild(b), document.body.removeChild(b));
     }
   };
-  (function(a) {
-    a.instance = {enabled:!1, initJS:function(a) {
-    }, registerCallback:function(a) {
-    }, unregisterCallback:function(a) {
-    }, eval:function(a) {
-    }, call:function(a) {
+  (function(d) {
+    d.instance = {enabled:!1, initJS:function(e) {
+    }, registerCallback:function(e) {
+    }, unregisterCallback:function(e) {
+    }, eval:function(e) {
+    }, call:function(e) {
     }, getId:function() {
       return null;
     }};
   })(k.ExternalInterfaceService || (k.ExternalInterfaceService = {}));
+  (function(d) {
+    d.instance = {setClipboard:function(e) {
+    }};
+  })(k.ClipboardService || (k.ClipboardService = {}));
   a = function() {
-    function a() {
-    }
-    a.prototype.setClipboard = function(a) {
-    };
-    a.instance = null;
-    return a;
-  }();
-  k.ClipboardService = a;
-  a = function() {
-    function a() {
+    function d() {
       this._queues = {};
     }
-    a.prototype.register = function(a, c) {
-      h.assert(a);
-      h.assert(c);
-      var e = this._queues[a];
-      if (e) {
-        if (-1 < e.indexOf(c)) {
+    d.prototype.register = function(e, b) {
+      n.assert(e);
+      n.assert(b);
+      var g = this._queues[e];
+      if (g) {
+        if (-1 < g.indexOf(b)) {
           return;
         }
       } else {
-        e = this._queues[a] = [];
-      }
-      e.push(c);
-    };
-    a.prototype.unregister = function(a, c) {
-      h.assert(a);
-      h.assert(c);
-      var e = this._queues[a];
-      if (e) {
-        var q = e.indexOf(c);
-        -1 !== q && e.splice(q, 1);
-        0 === e.length && (this._queues[a] = null);
-      }
-    };
-    a.prototype.notify = function(a, c) {
-      var e = this._queues[a];
-      if (e) {
-        e = e.slice();
-        c = Array.prototype.slice.call(arguments, 0);
-        for (var q = 0;q < e.length;q++) {
-          e[q].apply(null, c);
-        }
-      }
-    };
-    a.prototype.notify1 = function(a, c) {
-      var e = this._queues[a];
-      if (e) {
-        for (var e = e.slice(), q = 0;q < e.length;q++) {
-          (0,e[q])(a, c);
-        }
-      }
-    };
-    return a;
+        g = this._queues[e] = [];
+      }
+      g.push(b);
+    };
+    d.prototype.unregister = function(e, b) {
+      n.assert(e);
+      n.assert(b);
+      var g = this._queues[e];
+      if (g) {
+        var p = g.indexOf(b);
+        -1 !== p && g.splice(p, 1);
+        0 === g.length && (this._queues[e] = null);
+      }
+    };
+    d.prototype.notify = function(e, b) {
+      var g = this._queues[e];
+      if (g) {
+        g = g.slice();
+        b = Array.prototype.slice.call(arguments, 0);
+        for (var p = 0;p < g.length;p++) {
+          g[p].apply(null, b);
+        }
+      }
+    };
+    d.prototype.notify1 = function(e, b) {
+      var g = this._queues[e];
+      if (g) {
+        for (var g = g.slice(), p = 0;p < g.length;p++) {
+          (0,g[p])(e, b);
+        }
+      }
+    };
+    return d;
   }();
   k.Callback = a;
-  (function(a) {
-    a[a.None = 0] = "None";
-    a[a.PremultipliedAlphaARGB = 1] = "PremultipliedAlphaARGB";
-    a[a.StraightAlphaARGB = 2] = "StraightAlphaARGB";
-    a[a.StraightAlphaRGBA = 3] = "StraightAlphaRGBA";
-    a[a.JPEG = 4] = "JPEG";
-    a[a.PNG = 5] = "PNG";
-    a[a.GIF = 6] = "GIF";
+  (function(d) {
+    d[d.None = 0] = "None";
+    d[d.PremultipliedAlphaARGB = 1] = "PremultipliedAlphaARGB";
+    d[d.StraightAlphaARGB = 2] = "StraightAlphaARGB";
+    d[d.StraightAlphaRGBA = 3] = "StraightAlphaRGBA";
+    d[d.JPEG = 4] = "JPEG";
+    d[d.PNG = 5] = "PNG";
+    d[d.GIF = 6] = "GIF";
   })(k.ImageType || (k.ImageType = {}));
   var w = k.ImageType;
-  k.getMIMETypeForImageType = function(a) {
-    switch(a) {
+  k.getMIMETypeForImageType = function(d) {
+    switch(d) {
       case 4:
         return "image/jpeg";
       case 5:
         return "image/png";
       case 6:
         return "image/gif";
       default:
         return "text/plain";
     }
   };
-  (function(a) {
-    a.toCSSCursor = function(a) {
-      switch(a) {
+  (function(d) {
+    d.toCSSCursor = function(e) {
+      switch(e) {
         case 0:
           return "auto";
         case 2:
           return "pointer";
         case 3:
           return "grab";
         case 4:
           return "text";
         default:
           return "default";
       }
     };
   })(k.UI || (k.UI = {}));
   a = function() {
-    function a() {
-      this.promise = new Promise(function(a, c) {
-        this.resolve = a;
-        this.reject = c;
+    function d() {
+      this.promise = new Promise(function(e, b) {
+        this.resolve = e;
+        this.reject = b;
       }.bind(this));
     }
-    a.prototype.then = function(a, c) {
-      return this.promise.then(a, c);
-    };
-    return a;
+    d.prototype.then = function(e, b) {
+      return this.promise.then(e, b);
+    };
+    return d;
   }();
   k.PromiseWrapper = a;
 })(Shumway || (Shumway = {}));
 (function() {
-  function k(a) {
-    if ("function" !== typeof a) {
+  function k(b) {
+    if ("function" !== typeof b) {
       throw new TypeError("Invalid deferred constructor");
     }
-    var c = r();
-    a = new a(c);
-    var e = c.resolve;
+    var g = s();
+    b = new b(g);
+    var e = g.resolve;
     if ("function" !== typeof e) {
       throw new TypeError("Invalid resolve construction function");
     }
-    c = c.reject;
-    if ("function" !== typeof c) {
+    g = g.reject;
+    if ("function" !== typeof g) {
       throw new TypeError("Invalid reject construction function");
     }
-    return{promise:a, resolve:e, reject:c};
+    return{promise:b, resolve:e, reject:g};
   }
-  function p(a, c) {
-    if ("object" !== typeof a || null === a) {
+  function r(b, g) {
+    if ("object" !== typeof b || null === b) {
       return!1;
     }
     try {
-      var e = a.then;
+      var e = b.then;
       if ("function" !== typeof e) {
         return!1;
       }
-      e.call(a, c.resolve, c.reject);
+      e.call(b, g.resolve, g.reject);
     } catch (d) {
-      e = c.reject, e(d);
+      e = g.reject, e(d);
     }
     return!0;
   }
-  function g(a) {
-    return "object" === typeof a && null !== a && "undefined" !== typeof a.promiseStatus;
+  function f(b) {
+    return "object" === typeof b && null !== b && "undefined" !== typeof b.promiseStatus;
   }
-  function b(a, c) {
-    if ("unresolved" === a.promiseStatus) {
-      var e = a.rejectReactions;
-      a.result = c;
-      a.resolveReactions = void 0;
-      a.rejectReactions = void 0;
-      a.promiseStatus = "has-rejection";
-      u(e, c);
+  function c(b, g) {
+    if ("unresolved" === b.promiseStatus) {
+      var e = b.rejectReactions;
+      b.result = g;
+      b.resolveReactions = void 0;
+      b.rejectReactions = void 0;
+      b.promiseStatus = "has-rejection";
+      t(e, g);
     }
   }
-  function u(a, c) {
-    for (var e = 0;e < a.length;e++) {
-      h({reaction:a[e], argument:c});
+  function t(b, g) {
+    for (var e = 0;e < b.length;e++) {
+      n({reaction:b[e], argument:g});
     }
   }
-  function h(a) {
-    0 === e.length && setTimeout(d, 0);
-    e.push(a);
+  function n(b) {
+    0 === g.length && setTimeout(h, 0);
+    g.push(b);
   }
-  function a(a, c) {
-    var e = a.deferred, d = a.handler, l, n;
+  function a(b, g) {
+    var e = b.deferred, d = b.handler, a, h;
     try {
-      l = d(c);
-    } catch (f) {
-      return e = e.reject, e(f);
+      a = d(g);
+    } catch (q) {
+      return e = e.reject, e(q);
     }
-    if (l === e.promise) {
+    if (a === e.promise) {
       return e = e.reject, e(new TypeError("Self resolution"));
     }
     try {
-      if (n = p(l, e), !n) {
-        var b = e.resolve;
-        return b(l);
-      }
-    } catch (h) {
-      return e = e.reject, e(h);
+      if (h = r(a, e), !h) {
+        var m = e.resolve;
+        return m(a);
+      }
+    } catch (c) {
+      return e = e.reject, e(c);
     }
   }
-  function d() {
-    for (;0 < e.length;) {
-      var c = e[0];
+  function h() {
+    for (;0 < g.length;) {
+      var b = g[0];
       try {
-        a(c.reaction, c.argument);
+        a(b.reaction, b.argument);
       } catch (d) {
-        if ("function" === typeof l.onerror) {
-          l.onerror(d);
-        }
-      }
-      e.shift();
+        if ("function" === typeof e.onerror) {
+          e.onerror(d);
+        }
+      }
+      g.shift();
     }
   }
-  function n(a) {
-    throw a;
+  function q(b) {
+    throw b;
   }
-  function f(a) {
-    return a;
+  function l(b) {
+    return b;
   }
-  function v(a) {
-    return function(c) {
-      b(a, c);
+  function v(b) {
+    return function(g) {
+      c(b, g);
     };
   }
-  function m(a) {
-    return function(c) {
-      if ("unresolved" === a.promiseStatus) {
-        var e = a.resolveReactions;
-        a.result = c;
-        a.resolveReactions = void 0;
-        a.rejectReactions = void 0;
-        a.promiseStatus = "has-resolution";
-        u(e, c);
+  function m(b) {
+    return function(g) {
+      if ("unresolved" === b.promiseStatus) {
+        var e = b.resolveReactions;
+        b.result = g;
+        b.resolveReactions = void 0;
+        b.rejectReactions = void 0;
+        b.promiseStatus = "has-resolution";
+        t(e, g);
       }
     };
   }
-  function r() {
-    function a(c, e) {
-      a.resolve = c;
-      a.reject = e;
+  function s() {
+    function b(g, e) {
+      b.resolve = g;
+      b.reject = e;
     }
-    return a;
+    return b;
   }
-  function w(a, c, e) {
+  function w(b, g, e) {
     return function(d) {
-      if (d === a) {
+      if (d === b) {
         return e(new TypeError("Self resolution"));
       }
-      var l = a.promiseConstructor;
-      if (g(d) && d.promiseConstructor === l) {
-        return d.then(c, e);
-      }
-      l = k(l);
-      return p(d, l) ? l.promise.then(c, e) : c(d);
+      var a = b.promiseConstructor;
+      if (f(d) && d.promiseConstructor === a) {
+        return d.then(g, e);
+      }
+      a = k(a);
+      return r(d, a) ? a.promise.then(g, e) : g(d);
     };
   }
-  function t(a, c, e, d) {
-    return function(l) {
-      c[a] = l;
+  function d(b, g, e, d) {
+    return function(a) {
+      g[b] = a;
       d.countdown--;
-      0 === d.countdown && e.resolve(c);
+      0 === d.countdown && e.resolve(g);
     };
   }
-  function l(a) {
-    if ("function" !== typeof a) {
+  function e(b) {
+    if ("function" !== typeof b) {
       throw new TypeError("resolver is not a function");
     }
     if ("object" !== typeof this) {
       throw new TypeError("Promise to initialize is not an object");
     }
     this.promiseStatus = "unresolved";
     this.resolveReactions = [];
     this.rejectReactions = [];
     this.result = void 0;
-    var c = m(this), e = v(this);
+    var g = m(this), d = v(this);
     try {
-      a(c, e);
-    } catch (d) {
-      b(this, d);
+      b(g, d);
+    } catch (a) {
+      c(this, a);
     }
-    this.promiseConstructor = l;
+    this.promiseConstructor = e;
     return this;
   }
-  var c = Function("return this")();
-  if (c.Promise) {
-    "function" !== typeof c.Promise.all && (c.Promise.all = function(a) {
-      var e = 0, d = [], l, n, f = new c.Promise(function(a, c) {
-        l = a;
-        n = c;
+  var b = Function("return this")();
+  if (b.Promise) {
+    "function" !== typeof b.Promise.all && (b.Promise.all = function(g) {
+      var e = 0, d = [], a, h, q = new b.Promise(function(b, g) {
+        a = b;
+        h = g;
       });
-      a.forEach(function(a, c) {
+      g.forEach(function(b, g) {
         e++;
-        a.then(function(a) {
-          d[c] = a;
+        b.then(function(b) {
+          d[g] = b;
           e--;
-          0 === e && l(d);
-        }, n);
+          0 === e && a(d);
+        }, h);
       });
-      0 === e && l(d);
-      return f;
-    }), "function" !== typeof c.Promise.resolve && (c.Promise.resolve = function(a) {
-      return new c.Promise(function(c) {
-        c(a);
+      0 === e && a(d);
+      return q;
+    }), "function" !== typeof b.Promise.resolve && (b.Promise.resolve = function(g) {
+      return new b.Promise(function(b) {
+        b(g);
       });
     });
   } else {
-    var e = [];
-    l.all = function(a) {
-      var c = k(this), e = [], d = {countdown:0}, l = 0;
-      a.forEach(function(a) {
-        this.cast(a).then(t(l, e, c, d), c.reject);
-        l++;
-        d.countdown++;
+    var g = [];
+    e.all = function(b) {
+      var g = k(this), e = [], a = {countdown:0}, h = 0;
+      b.forEach(function(b) {
+        this.cast(b).then(d(h, e, g, a), g.reject);
+        h++;
+        a.countdown++;
       }, this);
-      0 === l && c.resolve(e);
-      return c.promise;
-    };
-    l.cast = function(a) {
-      if (g(a)) {
-        return a;
-      }
-      var c = k(this);
-      c.resolve(a);
-      return c.promise;
-    };
-    l.reject = function(a) {
-      var c = k(this);
-      c.reject(a);
-      return c.promise;
-    };
-    l.resolve = function(a) {
-      var c = k(this);
-      c.resolve(a);
-      return c.promise;
-    };
-    l.prototype = {"catch":function(a) {
-      this.then(void 0, a);
-    }, then:function(a, c) {
-      if (!g(this)) {
+      0 === h && g.resolve(e);
+      return g.promise;
+    };
+    e.cast = function(b) {
+      if (f(b)) {
+        return b;
+      }
+      var g = k(this);
+      g.resolve(b);
+      return g.promise;
+    };
+    e.reject = function(b) {
+      var g = k(this);
+      g.reject(b);
+      return g.promise;
+    };
+    e.resolve = function(b) {
+      var g = k(this);
+      g.resolve(b);
+      return g.promise;
+    };
+    e.prototype = {"catch":function(b) {
+      this.then(void 0, b);
+    }, then:function(b, g) {
+      if (!f(this)) {
         throw new TypeError("this is not a Promises");
       }
-      var e = k(this.promiseConstructor), d = "function" === typeof c ? c : n, l = {deferred:e, handler:w(this, "function" === typeof a ? a : f, d)}, d = {deferred:e, handler:d};
+      var e = k(this.promiseConstructor), d = "function" === typeof g ? g : q, a = {deferred:e, handler:w(this, "function" === typeof b ? b : l, d)}, d = {deferred:e, handler:d};
       switch(this.promiseStatus) {
         case "unresolved":
-          this.resolveReactions.push(l);
+          this.resolveReactions.push(a);
           this.rejectReactions.push(d);
           break;
         case "has-resolution":
-          h({reaction:l, argument:this.result});
+          n({reaction:a, argument:this.result});
           break;
         case "has-rejection":
-          h({reaction:d, argument:this.result});
+          n({reaction:d, argument:this.result});
       }
       return e.promise;
     }};
-    c.Promise = l;
+    b.Promise = e;
   }
 })();
 "undefined" !== typeof exports && (exports.Shumway = Shumway);
 (function() {
-  function k(k, g, b) {
-    k[g] || Object.defineProperty(k, g, {value:b, writable:!0, configurable:!0, enumerable:!1});
+  function k(k, f, c) {
+    k[f] || Object.defineProperty(k, f, {value:c, writable:!0, configurable:!0, enumerable:!1});
   }
-  k(String.prototype, "padRight", function(k, g) {
-    var b = this, u = b.replace(/\033\[[0-9]*m/g, "").length;
-    if (!k || u >= g) {
-      return b;
+  k(String.prototype, "padRight", function(k, f) {
+    var c = this, t = c.replace(/\033\[[0-9]*m/g, "").length;
+    if (!k || t >= f) {
+      return c;
     }
-    for (var u = (g - u) / k.length, h = 0;h < u;h++) {
-      b += k;
+    for (var t = (f - t) / k.length, n = 0;n < t;n++) {
+      c += k;
     }
-    return b;
+    return c;
   });
-  k(String.prototype, "padLeft", function(k, g) {
-    var b = this, u = b.length;
-    if (!k || u >= g) {
-      return b;
+  k(String.prototype, "padLeft", function(k, f) {
+    var c = this, t = c.length;
+    if (!k || t >= f) {
+      return c;
     }
-    for (var u = (g - u) / k.length, h = 0;h < u;h++) {
-      b = k + b;
+    for (var t = (f - t) / k.length, n = 0;n < t;n++) {
+      c = k + c;
     }
-    return b;
+    return c;
   });
   k(String.prototype, "trim", function() {
     return this.replace(/^\s+|\s+$/g, "");
   });
   k(String.prototype, "endsWith", function(k) {
     return-1 !== this.indexOf(k, this.length - k.length);
   });
-  k(Array.prototype, "replace", function(k, g) {
-    if (k === g) {
+  k(Array.prototype, "replace", function(k, f) {
+    if (k === f) {
       return 0;
     }
-    for (var b = 0, u = 0;u < this.length;u++) {
-      this[u] === k && (this[u] = g, b++);
+    for (var c = 0, t = 0;t < this.length;t++) {
+      this[t] === k && (this[t] = f, c++);
     }
-    return b;
+    return c;
   });
 })();
 (function(k) {
-  (function(p) {
-    var g = k.isObject, b = function() {
-      function a(a, n, f, b) {
+  (function(r) {
+    var f = k.isObject, c = function() {
+      function a(a, q, c, n) {
         this.shortName = a;
-        this.longName = n;
-        this.type = f;
-        b = b || {};
-        this.positional = b.positional;
-        this.parseFn = b.parse;
-        this.value = b.defaultValue;
+        this.longName = q;
+        this.type = c;
+        n = n || {};
+        this.positional = n.positional;
+        this.parseFn = n.parse;
+        this.value = n.defaultValue;
       }
       a.prototype.parse = function(a) {
         this.value = "boolean" === this.type ? a : "number" === this.type ? parseInt(a, 10) : a;
         this.parseFn && this.parseFn(this.value);
       };
       return a;
     }();
-    p.Argument = b;
-    var u = function() {
+    r.Argument = c;
+    var t = function() {
       function a() {
         this.args = [];
       }
-      a.prototype.addArgument = function(a, n, f, h) {
-        a = new b(a, n, f, h);
+      a.prototype.addArgument = function(a, q, l, n) {
+        a = new c(a, q, l, n);
         this.args.push(a);
         return a;
       };
       a.prototype.addBoundOption = function(a) {
-        this.args.push(new b(a.shortName, a.longName, a.type, {parse:function(n) {
-          a.value = n;
+        this.args.push(new c(a.shortName, a.longName, a.type, {parse:function(q) {
+          a.value = q;
         }}));
       };
       a.prototype.addBoundOptionSet = function(a) {
-        var n = this;
+        var q = this;
         a.options.forEach(function(a) {
-          a instanceof h ? n.addBoundOptionSet(a) : n.addBoundOption(a);
+          a instanceof n ? q.addBoundOptionSet(a) : q.addBoundOption(a);
         });
       };
       a.prototype.getUsage = function() {
         var a = "";
-        this.args.forEach(function(n) {
-          a = n.positional ? a + n.longName : a + ("[-" + n.shortName + "|--" + n.longName + ("boolean" === n.type ? "" : " " + n.type[0].toUpperCase()) + "]");
+        this.args.forEach(function(q) {
+          a = q.positional ? a + q.longName : a + ("[-" + q.shortName + "|--" + q.longName + ("boolean" === q.type ? "" : " " + q.type[0].toUpperCase()) + "]");
           a += " ";
         });
         return a;
       };
       a.prototype.parse = function(a) {
-        var n = {}, b = [];
-        this.args.forEach(function(a) {
-          a.positional ? b.push(a) : (n["-" + a.shortName] = a, n["--" + a.longName] = a);
+        var q = {}, c = [];
+        this.args.forEach(function(d) {
+          d.positional ? c.push(d) : (q["-" + d.shortName] = d, q["--" + d.longName] = d);
         });
-        for (var h = [];a.length;) {
-          var m = a.shift(), r = null, g = m;
+        for (var n = [];a.length;) {
+          var m = a.shift(), s = null, w = m;
           if ("--" == m) {
-            h = h.concat(a);
+            n = n.concat(a);
             break;
           } else {
             if ("-" == m.slice(0, 1) || "--" == m.slice(0, 2)) {
-              r = n[m];
-              if (!r) {
+              s = q[m];
+              if (!s) {
                 continue;
               }
-              g = "boolean" !== r.type ? a.shift() : !0;
+              w = "boolean" !== s.type ? a.shift() : !0;
             } else {
-              b.length ? r = b.shift() : h.push(g);
-            }
-          }
-          r && r.parse(g);
-        }
-        return h;
+              c.length ? s = c.shift() : n.push(w);
+            }
+          }
+          s && s.parse(w);
+        }
+        return n;
       };
       return a;
     }();
-    p.ArgumentParser = u;
-    var h = function() {
-      function a(a, n) {
-        void 0 === n && (n = null);
+    r.ArgumentParser = t;
+    var n = function() {
+      function a(a, q) {
+        void 0 === q && (q = null);
         this.open = !1;
         this.name = a;
-        this.settings = n || {};
+        this.settings = q || {};
         this.options = [];
       }
-      a.prototype.register = function(d) {
-        if (d instanceof a) {
-          for (var n = 0;n < this.options.length;n++) {
-            var b = this.options[n];
-            if (b instanceof a && b.name === d.name) {
-              return b;
-            }
-          }
-        }
-        this.options.push(d);
+      a.prototype.register = function(h) {
+        if (h instanceof a) {
+          for (var q = 0;q < this.options.length;q++) {
+            var c = this.options[q];
+            if (c instanceof a && c.name === h.name) {
+              return c;
+            }
+          }
+        }
+        this.options.push(h);
         if (this.settings) {
-          if (d instanceof a) {
-            n = this.settings[d.name], g(n) && (d.settings = n.settings, d.open = n.open);
+          if (h instanceof a) {
+            q = this.settings[h.name], f(q) && (h.settings = q.settings, h.open = q.open);
           } else {
-            if ("undefined" !== typeof this.settings[d.longName]) {
-              switch(d.type) {
+            if ("undefined" !== typeof this.settings[h.longName]) {
+              switch(h.type) {
                 case "boolean":
-                  d.value = !!this.settings[d.longName];
+                  h.value = !!this.settings[h.longName];
                   break;
                 case "number":
-                  d.value = +this.settings[d.longName];
+                  h.value = +this.settings[h.longName];
                   break;
                 default:
-                  d.value = this.settings[d.longName];
+                  h.value = this.settings[h.longName];
               }
             }
           }
         }
-        return d;
+        return h;
       };
       a.prototype.trace = function(a) {
         a.enter(this.name + " {");
-        this.options.forEach(function(n) {
-          n.trace(a);
+        this.options.forEach(function(q) {
+          q.trace(a);
         });
         a.leave("}");
       };
       a.prototype.getSettings = function() {
-        var d = {};
-        this.options.forEach(function(n) {
-          n instanceof a ? d[n.name] = {settings:n.getSettings(), open:n.open} : d[n.longName] = n.value;
+        var h = {};
+        this.options.forEach(function(q) {
+          q instanceof a ? h[q.name] = {settings:q.getSettings(), open:q.open} : h[q.longName] = q.value;
         });
-        return d;
-      };
-      a.prototype.setSettings = function(d) {
-        d && this.options.forEach(function(n) {
-          n instanceof a ? n.name in d && n.setSettings(d[n.name].settings) : n.longName in d && (n.value = d[n.longName]);
+        return h;
+      };
+      a.prototype.setSettings = function(h) {
+        h && this.options.forEach(function(q) {
+          q instanceof a ? q.name in h && q.setSettings(h[q.name].settings) : q.longName in h && (q.value = h[q.longName]);
         });
       };
       return a;
     }();
-    p.OptionSet = h;
-    u = function() {
-      function a(a, n, b, h, m, r) {
-        void 0 === r && (r = null);
-        this.longName = n;
+    r.OptionSet = n;
+    t = function() {
+      function a(a, q, c, n, m, s) {
+        void 0 === s && (s = null);
+        this.longName = q;
         this.shortName = a;
-        this.type = b;
-        this.value = this.defaultValue = h;
+        this.type = c;
+        this.value = this.defaultValue = n;
         this.description = m;
-        this.config = r;
+        this.config = s;
       }
       a.prototype.parse = function(a) {
         this.value = a;
       };
       a.prototype.trace = function(a) {
         a.writeLn(("-" + this.shortName + "|--" + this.longName).padRight(" ", 30) + " = " + this.type + " " + this.value + " [" + this.defaultValue + "] (" + this.description + ")");
       };
       return a;
     }();
-    p.Option = u;
+    r.Option = t;
   })(k.Options || (k.Options = {}));
 })(Shumway || (Shumway = {}));
 (function(k) {
-  (function(p) {
-    function g() {
+  (function(r) {
+    function f() {
       try {
         return "undefined" !== typeof window && "localStorage" in window && null !== window.localStorage;
-      } catch (b) {
+      } catch (c) {
         return!1;
       }
     }
-    function b(b) {
-      void 0 === b && (b = p.ROOT);
-      var h = {};
-      if (g() && (b = window.localStorage[b])) {
+    r.ROOT = "Shumway Options";
+    r.shumwayOptions = new k.Options.OptionSet(r.ROOT);
+    r.isStorageSupported = f;
+    r.load = function(c) {
+      void 0 === c && (c = r.ROOT);
+      var k = {};
+      if (f() && (c = window.localStorage[c])) {
         try {
-          h = JSON.parse(b);
-        } catch (a) {
-        }
-      }
-      return h;
-    }
-    p.ROOT = "Shumway Options";
-    p.shumwayOptions = new k.Options.OptionSet(p.ROOT, b());
-    p.isStorageSupported = g;
-    p.load = b;
-    p.save = function(b, h) {
-      void 0 === b && (b = null);
-      void 0 === h && (h = p.ROOT);
-      if (g()) {
+          k = JSON.parse(c);
+        } catch (n) {
+        }
+      }
+      return k;
+    };
+    r.save = function(c, k) {
+      void 0 === c && (c = null);
+      void 0 === k && (k = r.ROOT);
+      if (f()) {
         try {
-          window.localStorage[h] = JSON.stringify(b ? b : p.shumwayOptions.getSettings());
-        } catch (a) {
-        }
-      }
-    };
-    p.setSettings = function(b) {
-      p.shumwayOptions.setSettings(b);
-    };
-    p.getSettings = function(b) {
-      return p.shumwayOptions.getSettings();
+          window.localStorage[k] = JSON.stringify(c ? c : r.shumwayOptions.getSettings());
+        } catch (n) {
+        }
+      }
+    };
+    r.setSettings = function(c) {
+      r.shumwayOptions.setSettings(c);
+    };
+    r.getSettings = function(c) {
+      return r.shumwayOptions.getSettings();
     };
   })(k.Settings || (k.Settings = {}));
 })(Shumway || (Shumway = {}));
 (function(k) {
-  (function(p) {
-    var g = function() {
-      function b(b, h) {
-        this._parent = b;
+  (function(r) {
+    var f = function() {
+      function c(c, n) {
+        this._parent = c;
         this._timers = k.ObjectUtilities.createMap();
-        this._name = h;
+        this._name = n;
         this._count = this._total = this._last = this._begin = 0;
       }
-      b.time = function(g, h) {
-        b.start(g);
-        h();
-        b.stop();
-      };
-      b.start = function(g) {
-        b._top = b._top._timers[g] || (b._top._timers[g] = new b(b._top, g));
-        b._top.start();
-        g = b._flat._timers[g] || (b._flat._timers[g] = new b(b._flat, g));
-        g.start();
-        b._flatStack.push(g);
-      };
-      b.stop = function() {
-        b._top.stop();
-        b._top = b._top._parent;
-        b._flatStack.pop().stop();
-      };
-      b.stopStart = function(g) {
-        b.stop();
-        b.start(g);
-      };
-      b.prototype.start = function() {
+      c.time = function(f, n) {
+        c.start(f);
+        n();
+        c.stop();
+      };
+      c.start = function(f) {
+        c._top = c._top._timers[f] || (c._top._timers[f] = new c(c._top, f));
+        c._top.start();
+        f = c._flat._timers[f] || (c._flat._timers[f] = new c(c._flat, f));
+        f.start();
+        c._flatStack.push(f);
+      };
+      c.stop = function() {
+        c._top.stop();
+        c._top = c._top._parent;
+        c._flatStack.pop().stop();
+      };
+      c.stopStart = function(f) {
+        c.stop();
+        c.start(f);
+      };
+      c.prototype.start = function() {
         this._begin = k.getTicks();
       };
-      b.prototype.stop = function() {
+      c.prototype.stop = function() {
         this._last = k.getTicks() - this._begin;
         this._total += this._last;
         this._count += 1;
       };
-      b.prototype.toJSON = function() {
+      c.prototype.toJSON = function() {
         return{name:this._name, total:this._total, timers:this._timers};
       };
-      b.prototype.trace = function(b) {
-        b.enter(this._name + ": " + this._total.toFixed(2) + " ms, count: " + this._count + ", average: " + (this._total / this._count).toFixed(2) + " ms");
-        for (var h in this._timers) {
-          this._timers[h].trace(b);
-        }
-        b.outdent();
-      };
-      b.trace = function(g) {
-        b._base.trace(g);
-        b._flat.trace(g);
-      };
-      b._base = new b(null, "Total");
-      b._top = b._base;
-      b._flat = new b(null, "Flat");
-      b._flatStack = [];
-      return b;
+      c.prototype.trace = function(c) {
+        c.enter(this._name + ": " + this._total.toFixed(2) + " ms, count: " + this._count + ", average: " + (this._total / this._count).toFixed(2) + " ms");
+        for (var n in this._timers) {
+          this._timers[n].trace(c);
+        }
+        c.outdent();
+      };
+      c.trace = function(f) {
+        c._base.trace(f);
+        c._flat.trace(f);
+      };
+      c._base = new c(null, "Total");
+      c._top = c._base;
+      c._flat = new c(null, "Flat");
+      c._flatStack = [];
+      return c;
     }();
-    p.Timer = g;
-    g = function() {
-      function b(b) {
-        this._enabled = b;
+    r.Timer = f;
+    f = function() {
+      function c(c) {
+        this._enabled = c;
         this.clear();
       }
-      Object.defineProperty(b.prototype, "counts", {get:function() {
+      Object.defineProperty(c.prototype, "counts", {get:function() {
         return this._counts;
       }, enumerable:!0, configurable:!0});
-      b.prototype.setEnabled = function(b) {
-        this._enabled = b;
-      };
-      b.prototype.clear = function() {
+      c.prototype.setEnabled = function(c) {
+        this._enabled = c;
+      };
+      c.prototype.clear = function() {
         this._counts = k.ObjectUtilities.createMap();
         this._times = k.ObjectUtilities.createMap();
       };
-      b.prototype.toJSON = function() {
+      c.prototype.toJSON = function() {
         return{counts:this._counts, times:this._times};
       };
-      b.prototype.count = function(b, h, a) {
-        void 0 === h && (h = 1);
+      c.prototype.count = function(c, n, a) {
+        void 0 === n && (n = 1);
         void 0 === a && (a = 0);
         if (this._enabled) {
-          return void 0 === this._counts[b] && (this._counts[b] = 0, this._times[b] = 0), this._counts[b] += h, this._times[b] += a, this._counts[b];
-        }
-      };
-      b.prototype.trace = function(b) {
-        for (var h in this._counts) {
-          b.writeLn(h + ": " + this._counts[h]);
-        }
-      };
-      b.prototype._pairToString = function(b, h) {
-        var a = h[0], d = h[1], n = b[a], a = a + ": " + d;
-        n && (a += ", " + n.toFixed(4), 1 < d && (a += " (" + (n / d).toFixed(4) + ")"));
+          return void 0 === this._counts[c] && (this._counts[c] = 0, this._times[c] = 0), this._counts[c] += n, this._times[c] += a, this._counts[c];
+        }
+      };
+      c.prototype.trace = function(c) {
+        for (var n in this._counts) {
+          c.writeLn(n + ": " + this._counts[n]);
+        }
+      };
+      c.prototype._pairToString = function(c, n) {
+        var a = n[0], h = n[1], q = c[a], a = a + ": " + h;
+        q && (a += ", " + q.toFixed(4), 1 < h && (a += " (" + (q / h).toFixed(4) + ")"));
         return a;
       };
-      b.prototype.toStringSorted = function() {
-        var b = this, h = this._times, a = [], d;
-        for (d in this._counts) {
-          a.push([d, this._counts[d]]);
-        }
-        a.sort(function(a, d) {
-          return d[1] - a[1];
+      c.prototype.toStringSorted = function() {
+        var c = this, n = this._times, a = [], h;
+        for (h in this._counts) {
+          a.push([h, this._counts[h]]);
+        }
+        a.sort(function(a, h) {
+          return h[1] - a[1];
         });
         return a.map(function(a) {
-          return b._pairToString(h, a);
+          return c._pairToString(n, a);
         }).join(", ");
       };
-      b.prototype.traceSorted = function(b, h) {
-        void 0 === h && (h = !1);
-        var a = this, d = this._times, n = [], f;
-        for (f in this._counts) {
-          n.push([f, this._counts[f]]);
-        }
-        n.sort(function(a, d) {
-          return d[1] - a[1];
+      c.prototype.traceSorted = function(c, n) {
+        void 0 === n && (n = !1);
+        var a = this, h = this._times, q = [], l;
+        for (l in this._counts) {
+          q.push([l, this._counts[l]]);
+        }
+        q.sort(function(a, h) {
+          return h[1] - a[1];
         });
-        h ? b.writeLn(n.map(function(n) {
-          return a._pairToString(d, n);
-        }).join(", ")) : n.forEach(function(n) {
-          b.writeLn(a._pairToString(d, n));
+        n ? c.writeLn(q.map(function(q) {
+          return a._pairToString(h, q);
+        }).join(", ")) : q.forEach(function(q) {
+          c.writeLn(a._pairToString(h, q));
         });
       };
-      b.instance = new b(!0);
-      return b;
+      c.instance = new c(!0);
+      return c;
     }();
-    p.Counter = g;
-    g = function() {
-      function b(b) {
-        this._samples = new Float64Array(b);
+    r.Counter = f;
+    f = function() {
+      function c(c) {
+        this._samples = new Float64Array(c);
         this._index = this._count = 0;
       }
-      b.prototype.push = function(b) {
+      c.prototype.push = function(c) {
         this._count < this._samples.length && this._count++;
         this._index++;
-        this._samples[this._index % this._samples.length] = b;
-      };
-      b.prototype.average = function() {
-        for (var b = 0, h = 0;h < this._count;h++) {
-          b += this._samples[h];
-        }
-        return b / this._count;
-      };
-      return b;
+        this._samples[this._index % this._samples.length] = c;
+      };
+      c.prototype.average = function() {
+        for (var c = 0, n = 0;n < this._count;n++) {
+          c += this._samples[n];
+        }
+        return c / this._count;
+      };
+      return c;
     }();
-    p.Average = g;
+    r.Average = f;
   })(k.Metrics || (k.Metrics = {}));
 })(Shumway || (Shumway = {}));
-var __extends = this.__extends || function(k, p) {
-  function g() {
+var __extends = this.__extends || function(k, r) {
+  function f() {
     this.constructor = k;
   }
-  for (var b in p) {
-    p.hasOwnProperty(b) && (k[b] = p[b]);
+  for (var c in r) {
+    r.hasOwnProperty(c) && (k[c] = r[c]);
   }
-  g.prototype = p.prototype;
-  k.prototype = new g;
+  f.prototype = r.prototype;
+  k.prototype = new f;
 };
 (function(k) {
   (function(k) {
-    function g(a) {
-      for (var e = Math.max.apply(null, a), q = a.length, d = 1 << e, l = new Uint32Array(d), n = e << 16 | 65535, b = 0;b < d;b++) {
-        l[b] = n;
-      }
-      for (var n = 0, b = 1, f = 2;b <= e;n <<= 1, ++b, f <<= 1) {
-        for (var h = 0;h < q;++h) {
-          if (a[h] === b) {
-            for (var m = 0, t = 0;t < b;++t) {
-              m = 2 * m + (n >> t & 1);
-            }
-            for (t = m;t < d;t += f) {
-              l[t] = b << 16 | h;
-            }
-            ++n;
-          }
-        }
-      }
-      return{codes:l, maxBits:e};
+    function f(b) {
+      for (var g = Math.max.apply(null, b), p = b.length, e = 1 << g, d = new Uint32Array(e), a = g << 16 | 65535, h = 0;h < e;h++) {
+        d[h] = a;
+      }
+      for (var a = 0, h = 1, q = 2;h <= g;a <<= 1, ++h, q <<= 1) {
+        for (var c = 0;c < p;++c) {
+          if (b[c] === h) {
+            for (var m = 0, l = 0;l < h;++l) {
+              m = 2 * m + (a >> l & 1);
+            }
+            for (l = m;l < e;l += q) {
+              d[l] = h << 16 | c;
+            }
+            ++a;
+          }
+        }
+      }
+      return{codes:d, maxBits:g};
     }
-    var b;
-    (function(a) {
-      a[a.INIT = 0] = "INIT";
-      a[a.BLOCK_0 = 1] = "BLOCK_0";
-      a[a.BLOCK_1 = 2] = "BLOCK_1";
-      a[a.BLOCK_2_PRE = 3] = "BLOCK_2_PRE";
-      a[a.BLOCK_2 = 4] = "BLOCK_2";
-      a[a.DONE = 5] = "DONE";
-      a[a.ERROR = 6] = "ERROR";
-      a[a.VERIFY_HEADER = 7] = "VERIFY_HEADER";
-    })(b || (b = {}));
-    b = function() {
-      function a(c) {
-      }
-      a.prototype.push = function(a) {
-      };
-      a.prototype.close = function() {
-      };
-      a.create = function(a) {
-        return "undefined" !== typeof SpecialInflate ? new w(a) : new u(a);
-      };
-      a.prototype._processZLibHeader = function(a, c, d) {
-        if (c + 2 > d) {
+    var c;
+    (function(b) {
+      b[b.INIT = 0] = "INIT";
+      b[b.BLOCK_0 = 1] = "BLOCK_0";
+      b[b.BLOCK_1 = 2] = "BLOCK_1";
+      b[b.BLOCK_2_PRE = 3] = "BLOCK_2_PRE";
+      b[b.BLOCK_2 = 4] = "BLOCK_2";
+      b[b.DONE = 5] = "DONE";
+      b[b.ERROR = 6] = "ERROR";
+      b[b.VERIFY_HEADER = 7] = "VERIFY_HEADER";
+    })(c || (c = {}));
+    c = function() {
+      function b(b) {
+      }
+      b.prototype.push = function(b) {
+      };
+      b.prototype.close = function() {
+      };
+      b.create = function(b) {
+        return "undefined" !== typeof ShumwayCom && ShumwayCom.createSpecialInflate ? new w(b, ShumwayCom.createSpecialInflate) : new t(b);
+      };
+      b.prototype._processZLibHeader = function(b, p, e) {
+        if (p + 2 > e) {
           return 0;
         }
-        a = a[c] << 8 | a[c + 1];
-        c = null;
-        2048 !== (a & 3840) ? c = "inflate: unknown compression method" : 0 !== a % 31 ? c = "inflate: bad FCHECK" : 0 !== (a & 32) && (c = "inflate: FDICT bit set");
-        if (c) {
+        b = b[p] << 8 | b[p + 1];
+        p = null;
+        2048 !== (b & 3840) ? p = "inflate: unknown compression method" : 0 !== b % 31 ? p = "inflate: bad FCHECK" : 0 !== (b & 32) && (p = "inflate: FDICT bit set");
+        if (p) {
           if (this.onError) {
-            this.onError(c);
+            this.onError(p);
           }
           return-1;
         }
         return 2;
       };
-      a.inflate = function(e, q, d) {
-        var l = new Uint8Array(q), n = 0;
-        q = a.create(d);
-        q.onData = function(a) {
-          l.set(a, n);
-          n += a.length;
-        };
-        q.push(e);
-        q.close();
-        return l;
-      };
-      return a;
+      b.inflate = function(g, p, e) {
+        var d = new Uint8Array(p), a = 0;
+        p = b.create(e);
+        p.onData = function(b) {
+          d.set(b, a);
+          a += b.length;
+        };
+        p.push(g);
+        p.close();
+        return d;
+      };
+      return b;
     }();
-    k.Inflate = b;
-    var u = function(c) {
-      function e(e) {
-        c.call(this, e);
+    k.Inflate = c;
+    var t = function(b) {
+      function g(g) {
+        b.call(this, g);
         this._buffer = null;
         this._bitLength = this._bitBuffer = this._bufferPosition = this._bufferSize = 0;
         this._window = new Uint8Array(65794);
         this._windowPosition = 0;
-        this._state = e ? 7 : 0;
+        this._state = g ? 7 : 0;
         this._isFinalBlock = !1;
         this._distanceTable = this._literalTable = null;
         this._block0Read = 0;
         this._block2State = null;
         this._copyState = {state:0, len:0, lenBits:0, dist:0, distBits:0};
-        if (!r) {
-          h = new Uint8Array([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]);
+        if (!s) {
+          n = new Uint8Array([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]);
           a = new Uint16Array(30);
-          d = new Uint8Array(30);
-          for (var s = e = 0, l = 1;30 > e;++e) {
-            a[e] = l, l += 1 << (d[e] = ~~((s += 2 < e ? 1 : 0) / 2));
-          }
-          var b = new Uint8Array(288);
-          for (e = 0;32 > e;++e) {
-            b[e] = 5;
-          }
-          n = g(b.subarray(0, 32));
-          f = new Uint16Array(29);
+          h = new Uint8Array(30);
+          for (var e = g = 0, d = 1;30 > g;++g) {
+            a[g] = d, d += 1 << (h[g] = ~~((e += 2 < g ? 1 : 0) / 2));
+          }
+          var c = new Uint8Array(288);
+          for (g = 0;32 > g;++g) {
+            c[g] = 5;
+          }
+          q = f(c.subarray(0, 32));
+          l = new Uint16Array(29);
           v = new Uint8Array(29);
-          s = e = 0;
-          for (l = 3;29 > e;++e) {
-            f[e] = l - (28 == e ? 1 : 0), l += 1 << (v[e] = ~~((s += 4 < e ? 1 : 0) / 4 % 6));
-          }
-          for (e = 0;288 > e;++e) {
-            b[e] = 144 > e || 279 < e ? 8 : 256 > e ? 9 : 7;
-          }
-          m = g(b);
-          r = !0;
-        }
-      }
-      __extends(e, c);
-      e.prototype.push = function(a) {
-        if (!this._buffer || this._buffer.length < this._bufferSize + a.length) {
-          var c = new Uint8Array(this._bufferSize + a.length);
-          this._buffer && c.set(this._buffer);
-          this._buffer = c;
-        }
-        this._buffer.set(a, this._bufferSize);
-        this._bufferSize += a.length;
+          e = g = 0;
+          for (d = 3;29 > g;++g) {
+            l[g] = d - (28 == g ? 1 : 0), d += 1 << (v[g] = ~~((e += 4 < g ? 1 : 0) / 4 % 6));
+          }
+          for (g = 0;288 > g;++g) {
+            c[g] = 144 > g || 279 < g ? 8 : 256 > g ? 9 : 7;
+          }
+          m = f(c);
+          s = !0;
+        }
+      }
+      __extends(g, b);
+      g.prototype.push = function(b) {
+        if (!this._buffer || this._buffer.length < this._bufferSize + b.length) {
+          var g = new Uint8Array(this._bufferSize + b.length);
+          this._buffer && g.set(this._buffer);
+          this._buffer = g;
+        }
+        this._buffer.set(b, this._bufferSize);
+        this._bufferSize += b.length;
         this._bufferPosition = 0;
-        a = !1;
+        b = !1;
         do {
-          c = this._windowPosition;
-          if (0 === this._state && (a = this._decodeInitState())) {
+          g = this._windowPosition;
+          if (0 === this._state && (b = this._decodeInitState())) {
             break;
           }
           switch(this._state) {
             case 1:
-              a = this._decodeBlock0();
+              b = this._decodeBlock0();
               break;
             case 3:
-              if (a = this._decodeBlock2Pre()) {
+              if (b = this._decodeBlock2Pre()) {
                 break;
               }
             ;
             case 2:
             ;
             case 4:
-              a = this._decodeBlock();
+              b = this._decodeBlock();
               break;
             case 6:
             ;
             case 5:
               this._bufferPosition = this._bufferSize;
               break;
             case 7:
               var e = this._processZLibHeader(this._buffer, this._bufferPosition, this._bufferSize);
-              0 < e ? (this._bufferPosition += e, this._state = 0) : 0 === e ? a = !0 : this._state = 6;
-          }
-          if (0 < this._windowPosition - c) {
-            this.onData(this._window.subarray(c, this._windowPosition));
+              0 < e ? (this._bufferPosition += e, this._state = 0) : 0 === e ? b = !0 : this._state = 6;
+          }
+          if (0 < this._windowPosition - g) {
+            this.onData(this._window.subarray(g, this._windowPosition));
           }
           65536 <= this._windowPosition && ("copyWithin" in this._buffer ? this._window.copyWithin(0, this._windowPosition - 32768, this._windowPosition) : this._window.set(this._window.subarray(this._windowPosition - 32768, this._windowPosition)), this._windowPosition = 32768);
-        } while (!a && this._bufferPosition < this._bufferSize);
+        } while (!b && this._bufferPosition < this._bufferSize);
         this._bufferPosition < this._bufferSize ? ("copyWithin" in this._buffer ? this._buffer.copyWithin(0, this._bufferPosition, this._bufferSize) : this._buffer.set(this._buffer.subarray(this._bufferPosition, this._bufferSize)), this._bufferSize -= this._bufferPosition) : this._bufferSize = 0;
       };
-      e.prototype._decodeInitState = function() {
+      g.prototype._decodeInitState = function() {
         if (this._isFinalBlock) {
           return this._state = 5, !1;
         }
-        var a = this._buffer, c = this._bufferSize, e = this._bitBuffer, d = this._bitLength, l = this._bufferPosition;
-        if (3 > (c - l << 3) + d) {
+        var b = this._buffer, g = this._bufferSize, e = this._bitBuffer, d = this._bitLength, a = this._bufferPosition;
+        if (3 > (g - a << 3) + d) {
           return!0;
         }
-        3 > d && (e |= a[l++] << d, d += 8);
-        var b = e & 7, e = e >> 3, d = d - 3;
-        switch(b >> 1) {
+        3 > d && (e |= b[a++] << d, d += 8);
+        var h = e & 7, e = e >> 3, d = d - 3;
+        switch(h >> 1) {
           case 0:
             d = e = 0;
-            if (4 > c - l) {
+            if (4 > g - a) {
               return!0;
             }
-            var f = a[l] | a[l + 1] << 8, a = a[l + 2] | a[l + 3] << 8, l = l + 4;
-            if (65535 !== (f ^ a)) {
+            var c = b[a] | b[a + 1] << 8, b = b[a + 2] | b[a + 3] << 8, a = a + 4;
+            if (65535 !== (c ^ b)) {
               this._error("inflate: invalid block 0 length");
-              a = 6;
+              b = 6;
               break;
             }
-            0 === f ? a = 0 : (this._block0Read = f, a = 1);
+            0 === c ? b = 0 : (this._block0Read = c, b = 1);
             break;
           case 1:
-            a = 2;
+            b = 2;
             this._literalTable = m;
-            this._distanceTable = n;
+            this._distanceTable = q;
             break;
           case 2:
-            if (26 > (c - l << 3) + d) {
+            if (26 > (g - a << 3) + d) {
               return!0;
             }
             for (;14 > d;) {
-              e |= a[l++] << d, d += 8;
-            }
-            f = (e >> 10 & 15) + 4;
-            if ((c - l << 3) + d < 14 + 3 * f) {
+              e |= b[a++] << d, d += 8;
+            }
+            c = (e >> 10 & 15) + 4;
+            if ((g - a << 3) + d < 14 + 3 * c) {
               return!0;
             }
-            for (var c = {numLiteralCodes:(e & 31) + 257, numDistanceCodes:(e >> 5 & 31) + 1, codeLengthTable:void 0, bitLengths:void 0, codesRead:0, dupBits:0}, e = e >> 14, d = d - 14, t = new Uint8Array(19), v = 0;v < f;++v) {
-              3 > d && (e |= a[l++] << d, d += 8), t[h[v]] = e & 7, e >>= 3, d -= 3;
-            }
-            for (;19 > v;v++) {
-              t[h[v]] = 0;
-            }
-            c.bitLengths = new Uint8Array(c.numLiteralCodes + c.numDistanceCodes);
-            c.codeLengthTable = g(t);
-            this._block2State = c;
-            a = 3;
+            for (var g = {numLiteralCodes:(e & 31) + 257, numDistanceCodes:(e >> 5 & 31) + 1, codeLengthTable:void 0, bitLengths:void 0, codesRead:0, dupBits:0}, e = e >> 14, d = d - 14, l = new Uint8Array(19), s = 0;s < c;++s) {
+              3 > d && (e |= b[a++] << d, d += 8), l[n[s]] = e & 7, e >>= 3, d -= 3;
+            }
+            for (;19 > s;s++) {
+              l[n[s]] = 0;
+            }
+            g.bitLengths = new Uint8Array(g.numLiteralCodes + g.numDistanceCodes);
+            g.codeLengthTable = f(l);
+            this._block2State = g;
+            b = 3;
             break;
           default:
             return this._error("inflate: unsupported block type"), !1;
         }
-        this._isFinalBlock = !!(b & 1);
-        this._state = a;
-        this._bufferPosition = l;
+        this._isFinalBlock = !!(h & 1);
+        this._state = b;
+        this._bufferPosition = a;
         this._bitBuffer = e;
         this._bitLength = d;
         return!1;
       };
-      e.prototype._error = function(a) {
+      g.prototype._error = function(b) {
         if (this.onError) {
-          this.onError(a);
-        }
-      };
-      e.prototype._decodeBlock0 = function() {
-        var a = this._bufferPosition, c = this._windowPosition, e = this._block0Read, d = 65794 - c, l = this._bufferSize - a, n = l < e, b = Math.min(d, l, e);
-        this._window.set(this._buffer.subarray(a, a + b), c);
-        this._windowPosition = c + b;
-        this._bufferPosition = a + b;
-        this._block0Read = e - b;
-        return e === b ? (this._state = 0, !1) : n && d < l;
-      };
-      e.prototype._readBits = function(a) {
-        var c = this._bitBuffer, e = this._bitLength;
-        if (a > e) {
-          var d = this._bufferPosition, l = this._bufferSize;
+          this.onError(b);
+        }
+      };
+      g.prototype._decodeBlock0 = function() {
+        var b = this._bufferPosition, g = this._windowPosition, e = this._block0Read, d = 65794 - g, a = this._bufferSize - b, h = a < e, q = Math.min(d, a, e);
+        this._window.set(this._buffer.subarray(b, b + q), g);
+        this._windowPosition = g + q;
+        this._bufferPosition = b + q;
+        this._block0Read = e - q;
+        return e === q ? (this._state = 0, !1) : h && d < a;
+      };
+      g.prototype._readBits = function(b) {
+        var g = this._bitBuffer, e = this._bitLength;
+        if (b > e) {
+          var d = this._bufferPosition, a = this._bufferSize;
           do {
-            if (d >= l) {
-              return this._bufferPosition = d, this._bitBuffer = c, this._bitLength = e, -1;
-            }
-            c |= this._buffer[d++] << e;
+            if (d >= a) {
+              return this._bufferPosition = d, this._bitBuffer = g, this._bitLength = e, -1;
+            }
+            g |= this._buffer[d++] << e;
             e += 8;
-          } while (a > e);
+          } while (b > e);
           this._bufferPosition = d;
         }
-        this._bitBuffer = c >> a;
-        this._bitLength = e - a;
-        return c & (1 << a) - 1;
-      };
-      e.prototype._readCode = function(a) {
-        var c = this._bitBuffer, e = this._bitLength, d = a.maxBits;
+        this._bitBuffer = g >> b;
+        this._bitLength = e - b;
+        return g & (1 << b) - 1;
+      };
+      g.prototype._readCode = function(b) {
+        var g = this._bitBuffer, e = this._bitLength, d = b.maxBits;
         if (d > e) {
-          var l = this._bufferPosition, n = this._bufferSize;
+          var a = this._bufferPosition, h = this._bufferSize;
           do {
-            if (l >= n) {
-              return this._bufferPosition = l, this._bitBuffer = c, this._bitLength = e, -1;
-            }
-            c |= this._buffer[l++] << e;
+            if (a >= h) {
+              return this._bufferPosition = a, this._bitBuffer = g, this._bitLength = e, -1;
+            }
+            g |= this._buffer[a++] << e;
             e += 8;
           } while (d > e);
-          this._bufferPosition = l;
-        }
-        a = a.codes[c & (1 << d) - 1];
-        d = a >> 16;
-        if (a & 32768) {
+          this._bufferPosition = a;
+        }
+        b = b.codes[g & (1 << d) - 1];
+        d = b >> 16;
+        if (b & 32768) {
           return this._error("inflate: invalid encoding"), this._state = 6, -1;
         }
-        this._bitBuffer = c >> d;
+        this._bitBuffer = g >> d;
         this._bitLength = e - d;
-        return a & 65535;
-      };
-      e.prototype._decodeBlock2Pre = function() {
-        var a = this._block2State, c = a.numLiteralCodes + a.numDistanceCodes, e = a.bitLengths, d = a.codesRead, l = 0 < d ? e[d - 1] : 0, n = a.codeLengthTable, b;
-        if (0 < a.dupBits) {
-          b = this._readBits(a.dupBits);
-          if (0 > b) {
+        return b & 65535;
+      };
+      g.prototype._decodeBlock2Pre = function() {
+        var b = this._block2State, g = b.numLiteralCodes + b.numDistanceCodes, e = b.bitLengths, d = b.codesRead, a = 0 < d ? e[d - 1] : 0, h = b.codeLengthTable, q;
+        if (0 < b.dupBits) {
+          q = this._readBits(b.dupBits);
+          if (0 > q) {
             return!0;
           }
-          for (;b--;) {
-            e[d++] = l;
-          }
-          a.dupBits = 0;
-        }
-        for (;d < c;) {
-          var f = this._readCode(n);
-          if (0 > f) {
-            return a.codesRead = d, !0;
-          }
-          if (16 > f) {
-            e[d++] = l = f;
+          for (;q--;) {
+            e[d++] = a;
+          }
+          b.dupBits = 0;
+        }
+        for (;d < g;) {
+          var c = this._readCode(h);
+          if (0 > c) {
+            return b.codesRead = d, !0;
+          }
+          if (16 > c) {
+            e[d++] = a = c;
           } else {
-            var h;
-            switch(f) {
+            var m;
+            switch(c) {
               case 16:
-                h = 2;
-                b = 3;
-                f = l;
+                m = 2;
+                q = 3;
+                c = a;
                 break;
               case 17:
-                b = h = 3;
-                f = 0;
+                q = m = 3;
+                c = 0;
                 break;
               case 18:
-                h = 7, b = 11, f = 0;
-            }
-            for (;b--;) {
-              e[d++] = f;
-            }
-            b = this._readBits(h);
-            if (0 > b) {
-              return a.codesRead = d, a.dupBits = h, !0;
-            }
-            for (;b--;) {
-              e[d++] = f;
-            }
-            l = f;
-          }
-        }
-        this._literalTable = g(e.subarray(0, a.numLiteralCodes));
-        this._distanceTable = g(e.subarray(a.numLiteralCodes));
+                m = 7, q = 11, c = 0;
+            }
+            for (;q--;) {
+              e[d++] = c;
+            }
+            q = this._readBits(m);
+            if (0 > q) {
+              return b.codesRead = d, b.dupBits = m, !0;
+            }
+            for (;q--;) {
+              e[d++] = c;
+            }
+            a = c;
+          }
+        }
+        this._literalTable = f(e.subarray(0, b.numLiteralCodes));
+        this._distanceTable = f(e.subarray(b.numLiteralCodes));
         this._state = 4;
         this._block2State = null;
         return!1;
       };
-      e.prototype._decodeBlock = function() {
-        var c = this._literalTable, e = this._distanceTable, l = this._window, n = this._windowPosition, b = this._copyState, h, m, t, r;
-        if (0 !== b.state) {
-          switch(b.state) {
+      g.prototype._decodeBlock = function() {
+        var b = this._literalTable, g = this._distanceTable, e = this._window, d = this._windowPosition, q = this._copyState, c, m, n, s;
+        if (0 !== q.state) {
+          switch(q.state) {
             case 1:
-              if (0 > (h = this._readBits(b.lenBits))) {
+              if (0 > (c = this._readBits(q.lenBits))) {
                 return!0;
               }
-              b.len += h;
-              b.state = 2;
+              q.len += c;
+              q.state = 2;
             case 2:
-              if (0 > (h = this._readCode(e))) {
+              if (0 > (c = this._readCode(g))) {
                 return!0;
               }
-              b.distBits = d[h];
-              b.dist = a[h];
-              b.state = 3;
+              q.distBits = h[c];
+              q.dist = a[c];
+              q.state = 3;
             case 3:
-              h = 0;
-              if (0 < b.distBits && 0 > (h = this._readBits(b.distBits))) {
+              c = 0;
+              if (0 < q.distBits && 0 > (c = this._readBits(q.distBits))) {
                 return!0;
               }
-              r = b.dist + h;
-              m = b.len;
-              for (h = n - r;m--;) {
-                l[n++] = l[h++];
+              s = q.dist + c;
+              m = q.len;
+              for (c = d - s;m--;) {
+                e[d++] = e[c++];
               }
-              b.state = 0;
-              if (65536 <= n) {
-                return this._windowPosition = n, !1;
+              q.state = 0;
+              if (65536 <= d) {
+                return this._windowPosition = d, !1;
               }
               break;
           }
         }
         do {
-          h = this._readCode(c);
-          if (0 > h) {
-            return this._windowPosition = n, !0;
-          }
-          if (256 > h) {
-            l[n++] = h;
+          c = this._readCode(b);
+          if (0 > c) {
+            return this._windowPosition = d, !0;
+          }
+          if (256 > c) {
+            e[d++] = c;
           } else {
-            if (256 < h) {
-              this._windowPosition = n;
-              h -= 257;
-              t = v[h];
-              m = f[h];
-              h = 0 === t ? 0 : this._readBits(t);
-              if (0 > h) {
-                return b.state = 1, b.len = m, b.lenBits = t, !0;
+            if (256 < c) {
+              this._windowPosition = d;
+              c -= 257;
+              n = v[c];
+              m = l[c];
+              c = 0 === n ? 0 : this._readBits(n);
+              if (0 > c) {
+                return q.state = 1, q.len = m, q.lenBits = n, !0;
               }
-              m += h;
-              h = this._readCode(e);
-              if (0 > h) {
-                return b.state = 2, b.len = m, !0;
+              m += c;
+              c = this._readCode(g);
+              if (0 > c) {
+                return q.state = 2, q.len = m, !0;
               }
-              t = d[h];
-              r = a[h];
-              h = 0 === t ? 0 : this._readBits(t);
-              if (0 > h) {
-                return b.state = 3, b.len = m, b.dist = r, b.distBits = t, !0;
+              n = h[c];
+              s = a[c];
+              c = 0 === n ? 0 : this._readBits(n);
+              if (0 > c) {
+                return q.state = 3, q.len = m, q.dist = s, q.distBits = n, !0;
               }
-              r += h;
-              for (h = n - r;m--;) {
-                l[n++] = l[h++];
+              s += c;
+              for (c = d - s;m--;) {
+                e[d++] = e[c++];
               }
             } else {
               this._state = 0;
               break;
             }
           }
-        } while (65536 > n);
-        this._windowPosition = n;
+        } while (65536 > d);
+        this._windowPosition = d;
         return!1;
       };
-      return e;
-    }(b), h, a, d, n, f, v, m, r = !1, w = function(a) {
-      function e(e) {
-        a.call(this, e);
-        this._verifyHeader = e;
-        this._specialInflate = new SpecialInflate;
-        this._specialInflate.onData = function(a) {
-          this.onData(a);
+      return g;
+    }(c), n, a, h, q, l, v, m, s = !1, w = function(b) {
+      function g(g, e) {
+        b.call(this, g);
+        this._verifyHeader = g;
+        this._specialInflate = e();
+        this._specialInflate.onData = function(b) {
+          this.onData(b);
         }.bind(this);
       }
-      __extends(e, a);
-      e.prototype.push = function(a) {
+      __extends(g, b);
+      g.prototype.push = function(b) {
         if (this._verifyHeader) {
-          var c;
-          this._buffer ? (c = new Uint8Array(this._buffer.length + a.length), c.set(this._buffer), c.set(a, this._buffer.length), this._buffer = null) : c = new Uint8Array(a);
-          var e = this._processZLibHeader(c, 0, c.length);
+          var g;
+          this._buffer ? (g = new Uint8Array(this._buffer.length + b.length), g.set(this._buffer), g.set(b, this._buffer.length), this._buffer = null) : g = new Uint8Array(b);
+          var e = this._processZLibHeader(g, 0, g.length);
           if (0 === e) {
-            this._buffer = c;
+            this._buffer = g;
             return;
           }
           this._verifyHeader = !0;
-          0 < e && (a = c.subarray(e));
-        }
-        this._specialInflate.push(a);
-      };
-      e.prototype.close = function() {
+          0 < e && (b = g.subarray(e));
+        }
+        this._specialInflate.push(b);
+      };
+      g.prototype.close = function() {
         this._specialInflate && (this._specialInflate.close(), this._specialInflate = null);
       };
-      return e;
-    }(b), t;
-    (function(a) {
-      a[a.WRITE = 0] = "WRITE";
-      a[a.DONE = 1] = "DONE";
-      a[a.ZLIB_HEADER = 2] = "ZLIB_HEADER";
-    })(t || (t = {}));
-    var l = function() {
-      function a() {
+      return g;
+    }(c), d;
+    (function(b) {
+      b[b.WRITE = 0] = "WRITE";
+      b[b.DONE = 1] = "DONE";
+      b[b.ZLIB_HEADER = 2] = "ZLIB_HEADER";
+    })(d || (d = {}));
+    var e = function() {
+      function b() {
         this.a = 1;
         this.b = 0;
       }
-      a.prototype.update = function(a, c, d) {
-        for (var l = this.a, n = this.b;c < d;++c) {
-          l = (l + (a[c] & 255)) % 65521, n = (n + l) % 65521;
-        }
-        this.a = l;
-        this.b = n;
-      };
-      a.prototype.getChecksum = function() {
+      b.prototype.update = function(b, e, d) {
+        for (var a = this.a, h = this.b;e < d;++e) {
+          a = (a + (b[e] & 255)) % 65521, h = (h + a) % 65521;
+        }
+        this.a = a;
+        this.b = h;
+      };
+      b.prototype.getChecksum = function() {
         return this.b << 16 | this.a;
       };
-      return a;
+      return b;
     }();
-    k.Adler32 = l;
-    t = function() {
-      function a(c) {
-        this._state = (this._writeZlibHeader = c) ? 2 : 0;
-        this._adler32 = c ? new l : null;
-      }
-      a.prototype.push = function(a) {
+    k.Adler32 = e;
+    d = function() {
+      function b(b) {
+        this._state = (this._writeZlibHeader = b) ? 2 : 0;
+        this._adler32 = b ? new e : null;
+      }
+      b.prototype.push = function(b) {
         2 === this._state && (this.onData(new Uint8Array([120, 156])), this._state = 0);
-        for (var c = a.length, d = new Uint8Array(c + 5 * Math.ceil(c / 65535)), l = 0, n = 0;65535 < c;) {
-          d.set(new Uint8Array([0, 255, 255, 0, 0]), l), l += 5, d.set(a.subarray(n, n + 65535), l), n += 65535, l += 65535, c -= 65535;
-        }
-        d.set(new Uint8Array([0, c & 255, c >> 8 & 255, ~c & 255, ~c >> 8 & 255]), l);
-        d.set(a.subarray(n, c), l + 5);
+        for (var e = b.length, d = new Uint8Array(e + 5 * Math.ceil(e / 65535)), a = 0, h = 0;65535 < e;) {
+          d.set(new Uint8Array([0, 255, 255, 0, 0]), a), a += 5, d.set(b.subarray(h, h + 65535), a), h += 65535, a += 65535, e -= 65535;
+        }
+        d.set(new Uint8Array([0, e & 255, e >> 8 & 255, ~e & 255, ~e >> 8 & 255]), a);
+        d.set(b.subarray(h, e), a + 5);
         this.onData(d);
-        this._adler32 && this._adler32.update(a, 0, c);
-      };
-      a.prototype.close = function() {
+        this._adler32 && this._adler32.update(b, 0, e);
+      };
+      b.prototype.close = function() {
         this._state = 1;
         this.onData(new Uint8Array([1, 0, 0, 255, 255]));
         if (this._adler32) {
-          var a = this._adler32.getChecksum();
-          this.onData(new Uint8Array([a & 255, a >> 8 & 255, a >> 16 & 255, a >>> 24 & 255]));
-        }
-      };
-      return a;
+          var b = this._adler32.getChecksum();
+          this.onData(new Uint8Array([b & 255, b >> 8 & 255, b >> 16 & 255, b >>> 24 & 255]));
+        }
+      };
+      return b;
     }();
-    k.Deflate = t;
+    k.Deflate = d;
   })(k.ArrayUtilities || (k.ArrayUtilities = {}));
 })(Shumway || (Shumway = {}));
 (function(k) {
   (function(k) {
-    function g(a) {
-      for (var c = new Uint16Array(a), d = 0;d < a;d++) {
-        c[d] = 1024;
-      }
-      return c;
+    function f(b) {
+      for (var e = new Uint16Array(b), d = 0;d < b;d++) {
+        e[d] = 1024;
+      }
+      return e;
     }
-    function b(a, c, d, l) {
-      for (var n = 1, b = 0, h = 0;h < d;h++) {
-        var f = l.decodeBit(a, n + c), n = (n << 1) + f, b = b | f << h
-      }
-      return b;
+    function c(b, e, d, a) {
+      for (var h = 1, q = 0, c = 0;c < d;c++) {
+        var m = a.decodeBit(b, h + e), h = (h << 1) + m, q = q | m << c
+      }
+      return q;
     }
-    function u(a, c) {
+    function t(b, e) {
       var d = [];
-      d.length = c;
-      for (var l = 0;l < c;l++) {
-        d[l] = new f(a);
+      d.length = e;
+      for (var a = 0;a < e;a++) {
+        d[a] = new l(b);
       }
       return d;
     }
-    var h = function() {
-      function a() {
+    var n = function() {
+      function b() {
         this.pos = this.available = 0;
         this.buffer = new Uint8Array(2E3);
       }
-      a.prototype.append = function(a) {
-        var c = this.pos + this.available, e = c + a.length;
+      b.prototype.append = function(b) {
+        var g = this.pos + this.available, e = g + b.length;
         if (e > this.buffer.length) {
           for (var d = 2 * this.buffer.length;d < e;) {
             d *= 2;
           }
           e = new Uint8Array(d);
           e.set(this.buffer);
           this.buffer = e;
         }
-        this.buffer.set(a, c);
-        this.available += a.length;
-      };
-      a.prototype.compact = function() {
+        this.buffer.set(b, g);
+        this.available += b.length;
+      };
+      b.prototype.compact = function() {
         0 !== this.available && (this.buffer.set(this.buffer.subarray(this.pos, this.pos + this.available), 0), this.pos = 0);
       };
-      a.prototype.readByte = function() {
+      b.prototype.readByte = function() {
         if (0 >= this.available) {
           throw Error("Unexpected end of file");
         }
         this.available--;
         return this.buffer[this.pos++];
       };
-      return a;
+      return b;
     }(), a = function() {
-      function a(c) {
-        this.onData = c;
+      function b(g) {
+        this.onData = g;
         this.processed = 0;
       }
-      a.prototype.writeBytes = function(a) {
-        this.onData.call(null, a);
-        this.processed += a.length;
-      };
-      return a;
-    }(), d = function() {
-      function a(c) {
-        this.outStream = c;
+      b.prototype.writeBytes = function(b) {
+        this.onData.call(null, b);
+        this.processed += b.length;
+      };
+      return b;
+    }(), h = function() {
+      function b(g) {
+        this.outStream = g;
         this.buf = null;
         this.size = this.pos = 0;
         this.isFull = !1;
         this.totalPos = this.writePos = 0;
       }
-      a.prototype.create = function(a) {
-        this.buf = new Uint8Array(a);
+      b.prototype.create = function(b) {
+        this.buf = new Uint8Array(b);
         this.pos = 0;
-        this.size = a;
+        this.size = b;
         this.isFull = !1;
         this.totalPos = this.writePos = 0;
       };
-      a.prototype.putByte = function(a) {
+      b.prototype.putByte = function(b) {
         this.totalPos++;
-        this.buf[this.pos++] = a;
+        this.buf[this.pos++] = b;
         this.pos === this.size && (this.flush(), this.pos = 0, this.isFull = !0);
       };
-      a.prototype.getByte = function(a) {
-        return this.buf[a <= this.pos ? this.pos - a : this.size - a + this.pos];
-      };
-      a.prototype.flush = function() {
+      b.prototype.getByte = function(b) {
+        return this.buf[b <= this.pos ? this.pos - b : this.size - b + this.pos];
+      };
+      b.prototype.flush = function() {
         this.writePos < this.pos && (this.outStream.writeBytes(this.buf.subarray(this.writePos, this.pos)), this.writePos = this.pos === this.size ? 0 : this.pos);
       };
-      a.prototype.copyMatch = function(a, c) {
-        for (var e = this.pos, d = this.size, l = this.buf, n = a <= e ? e - a : d - a + e, b = c;0 < b;) {
-          for (var h = Math.min(Math.min(b, d - e), d - n), f = 0;f < h;f++) {
-            var m = l[n++];
-            l[e++] = m;
+      b.prototype.copyMatch = function(b, g) {
+        for (var e = this.pos, d = this.size, a = this.buf, h = b <= e ? e - b : d - b + e, q = g;0 < q;) {
+          for (var c = Math.min(Math.min(q, d - e), d - h), m = 0;m < c;m++) {
+            var l = a[h++];
+            a[e++] = l;
           }
           e === d && (this.pos = e, this.flush(), e = 0, this.isFull = !0);
-          n === d && (n = 0);
-          b -= h;
+          h === d && (h = 0);
+          q -= c;
         }
         this.pos = e;
-        this.totalPos += c;
-      };
-      a.prototype.checkDistance = function(a) {
-        return a <= this.pos || this.isFull;
-      };
-      a.prototype.isEmpty = function() {
+        this.totalPos += g;
+      };
+      b.prototype.checkDistance = function(b) {
+        return b <= this.pos || this.isFull;
+      };
+      b.prototype.isEmpty = function() {
         return 0 === this.pos && !this.isFull;
       };
-      return a;
-    }(), n = function() {
-      function a(c) {
-        this.inStream = c;
+      return b;
+    }(), q = function() {
+      function b(g) {
+        this.inStream = g;
         this.code = this.range = 0;
         this.corrupted = !1;
       }
-      a.prototype.init = function() {
+      b.prototype.init = function() {
         0 !== this.inStream.readByte() && (this.corrupted = !0);
         this.range = -1;
-        for (var a = 0, c = 0;4 > c;c++) {
-          a = a << 8 | this.inStream.readByte();
-        }
-        a === this.range && (this.corrupted = !0);
-        this.code = a;
-      };
-      a.prototype.isFinishedOK = function() {
+        for (var b = 0, g = 0;4 > g;g++) {
+          b = b << 8 | this.inStream.readByte();
+        }
+        b === this.range && (this.corrupted = !0);
+        this.code = b;
+      };
+      b.prototype.isFinishedOK = function() {
         return 0 === this.code;
       };
-      a.prototype.decodeDirectBits = function(a) {
-        var c = 0, e = this.range, d = this.code;
+      b.prototype.decodeDirectBits = function(b) {
+        var g = 0, e = this.range, d = this.code;
         do {
-          var e = e >>> 1 | 0, d = d - e | 0, l = d >> 31, d = d + (e & l) | 0;
+          var e = e >>> 1 | 0, d = d - e | 0, a = d >> 31, d = d + (e & a) | 0;
           d === e && (this.corrupted = !0);
           0 <= e && 16777216 > e && (e <<= 8, d = d << 8 | this.inStream.readByte());
-          c = (c << 1) + l + 1 | 0;
-        } while (--a);
+          g = (g << 1) + a + 1 | 0;
+        } while (--b);
         this.range = e;
         this.code = d;
-        return c;
-      };
-      a.prototype.decodeBit = function(a, c) {
-        var e = this.range, d = this.code, l = a[c], n = (e >>> 11) * l;
-        d >>> 0 < n ? (l = l + (2048 - l >> 5) | 0, e = n | 0, n = 0) : (l = l - (l >> 5) | 0, d = d - n | 0, e = e - n | 0, n = 1);
-        a[c] = l & 65535;
+        return g;
+      };
+      b.prototype.decodeBit = function(b, g) {
+        var e = this.range, d = this.code, a = b[g], h = (e >>> 11) * a;
+        d >>> 0 < h ? (a = a + (2048 - a >> 5) | 0, e = h | 0, h = 0) : (a = a - (a >> 5) | 0, d = d - h | 0, e = e - h | 0, h = 1);
+        b[g] = a & 65535;
         0 <= e && 16777216 > e && (e <<= 8, d = d << 8 | this.inStream.readByte());
         this.range = e;
         this.code = d;
-        return n;
-      };
-      return a;
-    }(), f = function() {
-      function a(c) {
-        this.numBits = c;
-        this.probs = g(1 << c);
-      }
-      a.prototype.decode = function(a) {
-        for (var c = 1, e = 0;e < this.numBits;e++) {
-          c = (c << 1) + a.decodeBit(this.probs, c);
-        }
-        return c - (1 << this.numBits);
-      };
-      a.prototype.reverseDecode = function(a) {
-        return b(this.probs, 0, this.numBits, a);
-      };
-      return a;
+        return h;
+      };
+      return b;
+    }(), l = function() {
+      function b(g) {
+        this.numBits = g;
+        this.probs = f(1 << g);
+      }
+      b.prototype.decode = function(b) {
+        for (var g = 1, e = 0;e < this.numBits;e++) {
+          g = (g << 1) + b.decodeBit(this.probs, g);
+        }
+        return g - (1 << this.numBits);
+      };
+      b.prototype.reverseDecode = function(b) {
+        return c(this.probs, 0, this.numBits, b);
+      };
+      return b;
     }(), v = function() {
-      function a() {
-        this.choice = g(2);
-        this.lowCoder = u(3, 16);
-        this.midCoder = u(3, 16);
-        this.highCoder = new f(8);
-      }
-      a.prototype.decode = function(a, c) {
-        return 0 === a.decodeBit(this.choice, 0) ? this.lowCoder[c].decode(a) : 0 === a.decodeBit(this.choice, 1) ? 8 + this.midCoder[c].decode(a) : 16 + this.highCoder.decode(a);
-      };
-      return a;
+      function b() {
+        this.choice = f(2);
+        this.lowCoder = t(3, 16);
+        this.midCoder = t(3, 16);
+        this.highCoder = new l(8);
+      }
+      b.prototype.decode = function(b, g) {
+        return 0 === b.decodeBit(this.choice, 0) ? this.lowCoder[g].decode(b) : 0 === b.decodeBit(this.choice, 1) ? 8 + this.midCoder[g].decode(b) : 16 + this.highCoder.decode(b);
+      };
+      return b;
     }(), m = function() {
-      function a(c, e) {
-        this.rangeDec = new n(c);
-        this.outWindow = new d(e);
+      function b(g, e) {
+        this.rangeDec = new q(g);
+        this.outWindow = new h(e);
         this.markerIsMandatory = !1;
         this.dictSizeInProperties = this.dictSize = this.lp = this.pb = this.lc = 0;
         this.leftToUnpack = this.unpackSize = void 0;
         this.reps = new Int32Array(4);
         this.state = 0;
       }
-      a.prototype.decodeProperties = function(a) {
-        var c = a[0];
-        if (225 <= c) {
+      b.prototype.decodeProperties = function(b) {
+        var g = b[0];
+        if (225 <= g) {
           throw Error("Incorrect LZMA properties");
         }
-        this.lc = c % 9;
-        c = c / 9 | 0;
-        this.pb = c / 5 | 0;
-        this.lp = c % 5;
-        for (c = this.dictSizeInProperties = 0;4 > c;c++) {
-          this.dictSizeInProperties |= a[c + 1] << 8 * c;
+        this.lc = g % 9;
+        g = g / 9 | 0;
+        this.pb = g / 5 | 0;
+        this.lp = g % 5;
+        for (g = this.dictSizeInProperties = 0;4 > g;g++) {
+          this.dictSizeInProperties |= b[g + 1] << 8 * g;
         }
         this.dictSize = this.dictSizeInProperties;
         4096 > this.dictSize && (this.dictSize = 4096);
       };
-      a.prototype.create = function() {
+      b.prototype.create = function() {
         this.outWindow.create(this.dictSize);
         this.init();
         this.rangeDec.init();
         this.reps[0] = 0;
         this.reps[1] = 0;
         this.reps[2] = 0;
         this.state = this.reps[3] = 0;
         this.leftToUnpack = this.unpackSize;
       };
-      a.prototype.decodeLiteral = function(a, c) {
-        var e = this.outWindow, d = this.rangeDec, l = 0;
-        e.isEmpty() || (l = e.getByte(1));
-        var n = 1, l = 768 * (((e.totalPos & (1 << this.lp) - 1) << this.lc) + (l >> 8 - this.lc));
-        if (7 <= a) {
-          e = e.getByte(c + 1);
+      b.prototype.decodeLiteral = function(b, g) {
+        var e = this.outWindow, d = this.rangeDec, a = 0;
+        e.isEmpty() || (a = e.getByte(1));
+        var h = 1, a = 768 * (((e.totalPos & (1 << this.lp) - 1) << this.lc) + (a >> 8 - this.lc));
+        if (7 <= b) {
+          e = e.getByte(g + 1);
           do {
-            var b = e >> 7 & 1, e = e << 1, h = d.decodeBit(this.litProbs, l + ((1 + b << 8) + n)), n = n << 1 | h;
-            if (b !== h) {
+            var q = e >> 7 & 1, e = e << 1, c = d.decodeBit(this.litProbs, a + ((1 + q << 8) + h)), h = h << 1 | c;
+            if (q !== c) {
               break;
             }
-          } while (256 > n);
-        }
-        for (;256 > n;) {
-          n = n << 1 | d.decodeBit(this.litProbs, l + n);
-        }
-        return n - 256 & 255;
-      };
-      a.prototype.decodeDistance = function(a) {
-        var c = a;
-        3 < c && (c = 3);
-        a = this.rangeDec;
-        c = this.posSlotDecoder[c].decode(a);
-        if (4 > c) {
-          return c;
-        }
-        var e = (c >> 1) - 1, d = (2 | c & 1) << e;
-        14 > c ? d = d + b(this.posDecoders, d - c, e, a) | 0 : (d = d + (a.decodeDirectBits(e - 4) << 4) | 0, d = d + this.alignDecoder.reverseDecode(a) | 0);
+          } while (256 > h);
+        }
+        for (;256 > h;) {
+          h = h << 1 | d.decodeBit(this.litProbs, a + h);
+        }
+        return h - 256 & 255;
+      };
+      b.prototype.decodeDistance = function(b) {
+        var g = b;
+        3 < g && (g = 3);
+        b = this.rangeDec;
+        g = this.posSlotDecoder[g].decode(b);
+        if (4 > g) {
+          return g;
+        }
+        var e = (g >> 1) - 1, d = (2 | g & 1) << e;
+        14 > g ? d = d + c(this.posDecoders, d - g, e, b) | 0 : (d = d + (b.decodeDirectBits(e - 4) << 4) | 0, d = d + this.alignDecoder.reverseDecode(b) | 0);
         return d;
       };
-      a.prototype.init = function() {
-        this.litProbs = g(768 << this.lc + this.lp);
-        this.posSlotDecoder = u(6, 4);
-        this.alignDecoder = new f(4);
-        this.posDecoders = g(115);
-        this.isMatch = g(192);
-        this.isRep = g(12);
-        this.isRepG0 = g(12);
-        this.isRepG1 = g(12);
-        this.isRepG2 = g(12);
-        this.isRep0Long = g(192);
+      b.prototype.init = function() {
+        this.litProbs = f(768 << this.lc + this.lp);
+        this.posSlotDecoder = t(6, 4);
+        this.alignDecoder = new l(4);
+        this.posDecoders = f(115);
+        this.isMatch = f(192);
+        this.isRep = f(12);
+        this.isRepG0 = f(12);
+        this.isRepG1 = f(12);
+        this.isRepG2 = f(12);
+        this.isRep0Long = f(192);
         this.lenDecoder = new v;
         this.repLenDecoder = new v;
       };
-      a.prototype.decode = function(a) {
-        for (var c = this.rangeDec, e = this.outWindow, d = this.pb, n = this.dictSize, b = this.markerIsMandatory, h = this.leftToUnpack, f = this.isMatch, m = this.isRep, v = this.isRepG0, g = this.isRepG1, k = this.isRepG2, p = this.isRep0Long, u = this.lenDecoder, z = this.repLenDecoder, A = this.reps[0], C = this.reps[1], x = this.reps[2], F = this.reps[3], B = this.state;;) {
-          if (a && 48 > c.inStream.available) {
+      b.prototype.decode = function(b) {
+        for (var g = this.rangeDec, a = this.outWindow, h = this.pb, q = this.dictSize, c = this.markerIsMandatory, m = this.leftToUnpack, l = this.isMatch, n = this.isRep, v = this.isRepG0, f = this.isRepG1, k = this.isRepG2, r = this.isRep0Long, t = this.lenDecoder, y = this.repLenDecoder, z = this.reps[0], C = this.reps[1], x = this.reps[2], E = this.reps[3], B = this.state;;) {
+          if (b && 48 > g.inStream.available) {
             this.outWindow.flush();
             break;
           }
-          if (0 === h && !b && (this.outWindow.flush(), c.isFinishedOK())) {
-            return t;
-          }
-          var E = e.totalPos & (1 << d) - 1;
-          if (0 === c.decodeBit(f, (B << 4) + E)) {
-            if (0 === h) {
-              return r;
-            }
-            e.putByte(this.decodeLiteral(B, A));
+          if (0 === m && !c && (this.outWindow.flush(), g.isFinishedOK())) {
+            return d;
+          }
+          var D = a.totalPos & (1 << h) - 1;
+          if (0 === g.decodeBit(l, (B << 4) + D)) {
+            if (0 === m) {
+              return s;
+            }
+            a.putByte(this.decodeLiteral(B, z));
             B = 4 > B ? 0 : 10 > B ? B - 3 : B - 6;
-            h--;
+            m--;
           } else {
-            if (0 !== c.decodeBit(m, B)) {
-              if (0 === h || e.isEmpty()) {
-                return r;
+            if (0 !== g.decodeBit(n, B)) {
+              if (0 === m || a.isEmpty()) {
+                return s;
               }
-              if (0 === c.decodeBit(v, B)) {
-                if (0 === c.decodeBit(p, (B << 4) + E)) {
+              if (0 === g.decodeBit(v, B)) {
+                if (0 === g.decodeBit(r, (B << 4) + D)) {
                   B = 7 > B ? 9 : 11;
-                  e.putByte(e.getByte(A + 1));
-                  h--;
+                  a.putByte(a.getByte(z + 1));
+                  m--;
                   continue;
                 }
               } else {
-                var G;
-                0 === c.decodeBit(g, B) ? G = C : (0 === c.decodeBit(k, B) ? G = x : (G = F, F = x), x = C);
-                C = A;
-                A = G;
+                var F;
+                0 === g.decodeBit(f, B) ? F = C : (0 === g.decodeBit(k, B) ? F = x : (F = E, E = x), x = C);
+                C = z;
+                z = F;
               }
-              E = z.decode(c, E);
+              D = y.decode(g, D);
               B = 7 > B ? 8 : 11;
             } else {
-              F = x;
+              E = x;
               x = C;
-              C = A;
-              E = u.decode(c, E);
+              C = z;
+              D = t.decode(g, D);
               B = 7 > B ? 7 : 10;
-              A = this.decodeDistance(E);
-              if (-1 === A) {
-                return this.outWindow.flush(), c.isFinishedOK() ? w : r;
+              z = this.decodeDistance(D);
+              if (-1 === z) {
+                return this.outWindow.flush(), g.isFinishedOK() ? w : s;
               }
-              if (0 === h || A >= n || !e.checkDistance(A)) {
-                return r;
+              if (0 === m || z >= q || !a.checkDistance(z)) {
+                return s;
               }
             }
-            E += 2;
-            G = !1;
-            void 0 !== h && h < E && (E = h, G = !0);
-            e.copyMatch(A + 1, E);
-            h -= E;
-            if (G) {
-              return r;
+            D += 2;
+            F = !1;
+            void 0 !== m && m < D && (D = m, F = !0);
+            a.copyMatch(z + 1, D);
+            m -= D;
+            if (F) {
+              return s;
             }
           }
         }
         this.state = B;
-        this.reps[0] = A;
+        this.reps[0] = z;
         this.reps[1] = C;
         this.reps[2] = x;
-        this.reps[3] = F;
-        this.leftToUnpack = h;
-        return l;
-      };
-      return a;
-    }(), r = 0, w = 1, t = 2, l = 3, c;
-    (function(a) {
-      a[a.WAIT_FOR_LZMA_HEADER = 0] = "WAIT_FOR_LZMA_HEADER";
-      a[a.WAIT_FOR_SWF_HEADER = 1] = "WAIT_FOR_SWF_HEADER";
-      a[a.PROCESS_DATA = 2] = "PROCESS_DATA";
-      a[a.CLOSED = 3] = "CLOSED";
-    })(c || (c = {}));
-    c = function() {
-      function c(a) {
-        void 0 === a && (a = !1);
-        this._state = a ? 1 : 0;
+        this.reps[3] = E;
+        this.leftToUnpack = m;
+        return e;
+      };
+      return b;
+    }(), s = 0, w = 1, d = 2, e = 3, b;
+    (function(b) {
+      b[b.WAIT_FOR_LZMA_HEADER = 0] = "WAIT_FOR_LZMA_HEADER";
+      b[b.WAIT_FOR_SWF_HEADER = 1] = "WAIT_FOR_SWF_HEADER";
+      b[b.PROCESS_DATA = 2] = "PROCESS_DATA";
+      b[b.CLOSED = 3] = "CLOSED";
+    })(b || (b = {}));
+    b = function() {
+      function b(g) {
+        void 0 === g && (g = !1);
+        this._state = g ? 1 : 0;
         this.buffer = null;
       }
-      c.prototype.push = function(c) {
+      b.prototype.push = function(b) {
         if (2 > this._state) {
-          var e = this.buffer ? this.buffer.length : 0, d = (1 === this._state ? 17 : 13) + 5;
-          if (e + c.length < d) {
-            d = new Uint8Array(e + c.length);
-            0 < e && d.set(this.buffer);
-            d.set(c, e);
+          var g = this.buffer ? this.buffer.length : 0, d = (1 === this._state ? 17 : 13) + 5;
+          if (g + b.length < d) {
+            d = new Uint8Array(g + b.length);
+            0 < g && d.set(this.buffer);
+            d.set(b, g);
             this.buffer = d;
             return;
           }
-          var n = new Uint8Array(d);
-          0 < e && n.set(this.buffer);
-          n.set(c.subarray(0, d - e), e);
-          this._inStream = new h;
-          this._inStream.append(n.subarray(d - 5));
-          this._outStream = new a(function(a) {
-            this.onData.call(null, a);
+          var h = new Uint8Array(d);
+          0 < g && h.set(this.buffer);
+          h.set(b.subarray(0, d - g), g);
+          this._inStream = new n;
+          this._inStream.append(h.subarray(d - 5));
+          this._outStream = new a(function(b) {
+            this.onData.call(null, b);
           }.bind(this));
           this._decoder = new m(this._inStream, this._outStream);
           if (1 === this._state) {
-            this._decoder.decodeProperties(n.subarray(12, 17)), this._decoder.markerIsMandatory = !1, this._decoder.unpackSize = ((n[4] | n[5] << 8 | n[6] << 16 | n[7] << 24) >>> 0) - 8;
+            this._decoder.decodeProperties(h.subarray(12, 17)), this._decoder.markerIsMandatory = !1, this._decoder.unpackSize = ((h[4] | h[5] << 8 | h[6] << 16 | h[7] << 24) >>> 0) - 8;
           } else {
-            this._decoder.decodeProperties(n.subarray(0, 5));
-            for (var e = 0, b = !1, f = 0;8 > f;f++) {
-              var t = n[5 + f];
-              255 !== t && (b = !0);
-              e |= t << 8 * f;
-            }
-            this._decoder.markerIsMandatory = !b;
-            this._decoder.unpackSize = b ? e : void 0;
+            this._decoder.decodeProperties(h.subarray(0, 5));
+            for (var g = 0, q = !1, c = 0;8 > c;c++) {
+              var l = h[5 + c];
+              255 !== l && (q = !0);
+              g |= l << 8 * c;
+            }
+            this._decoder.markerIsMandatory = !q;
+            this._decoder.unpackSize = q ? g : void 0;
           }
           this._decoder.create();
-          c = c.subarray(d);
+          b = b.subarray(d);
           this._state = 2;
         }
-        this._inStream.append(c);
-        c = this._decoder.decode(!0);
+        this._inStream.append(b);
+        b = this._decoder.decode(!0);
         this._inStream.compact();
-        c !== l && this._checkError(c);
-      };
-      c.prototype.close = function() {
+        b !== e && this._checkError(b);
+      };
+      b.prototype.close = function() {
         this._state = 3;
-        var a = this._decoder.decode(!1);
-        this._checkError(a);
+        var b = this._decoder.decode(!1);
+        this._checkError(b);
         this._decoder = null;
       };
-      c.prototype._checkError = function(a) {
-        var c;
-        a === r ? c = "LZMA decoding error" : a === l ? c = "Decoding is not complete" : a === w ? void 0 !== this._decoder.unpackSize && this._decoder.unpackSize !== this._outStream.processed && (c = "Finished with end marker before than specified size") : c = "Internal LZMA Error";
-        if (c && this.onError) {
-          this.onError(c);
-        }
-      };
-      return c;
+      b.prototype._checkError = function(b) {
+        var g;
+        b === s ? g = "LZMA decoding error" : b === e ? g = "Decoding is not complete" : b === w ? void 0 !== this._decoder.unpackSize && this._decoder.unpackSize !== this._outStream.processed && (g = "Finished with end marker before than specified size") : g = "Internal LZMA Error";
+        if (g && this.onError) {
+          this.onError(g);
+        }
+      };
+      return b;
     }();
-    k.LzmaDecoder = c;
+    k.LzmaDecoder = b;
   })(k.ArrayUtilities || (k.ArrayUtilities = {}));
 })(Shumway || (Shumway = {}));
 (function(k) {
-  (function(p) {
-    function g(a, n) {
-      a !== d(a, 0, n) && throwError("RangeError", Errors.ParamRangeError);
+  (function(r) {
+    function f(a, d) {
+      a !== h(a, 0, d) && throwError("RangeError", Errors.ParamRangeError);
     }
-    function b(a) {
+    function c(a) {
       return "string" === typeof a ? a : void 0 == a ? null : a + "";
     }
-    var u = k.Debug.notImplemented, h = k.StringUtilities.utf8decode, a = k.StringUtilities.utf8encode, d = k.NumberUtilities.clamp, n = function() {
-      return function(a, d, l) {
+    var t = k.Debug.notImplemented, n = k.StringUtilities.utf8decode, a = k.StringUtilities.utf8encode, h = k.NumberUtilities.clamp, q = function() {
+      return function(a, d, e) {
         this.buffer = a;
         this.length = d;
-        this.littleEndian = l;
+        this.littleEndian = e;
       };
     }();
-    p.PlainObjectDataBuffer = n;
-    for (var f = new Uint32Array(33), v = 1, m = 0;32 >= v;v++) {
-      f[v] = m = m << 1 | 1;
+    r.PlainObjectDataBuffer = q;
+    for (var l = new Uint32Array(33), v = 1, m = 0;32 >= v;v++) {
+      l[v] = m = m << 1 | 1;
     }
-    var r;
+    var s;
     (function(a) {
       a[a.U8 = 1] = "U8";
       a[a.I32 = 2] = "I32";
       a[a.F32 = 4] = "F32";
-    })(r || (r = {}));
+    })(s || (s = {}));
     v = function() {
-      function m(a) {
-        void 0 === a && (a = m.INITIAL_SIZE);
-        this._buffer || (this._buffer = new ArrayBuffer(a), this._position = this._length = 0, this._resetViews(), this._littleEndian = m._nativeLittleEndian, this._bitLength = this._bitBuffer = 0);
-      }
-      m.FromArrayBuffer = function(a, d) {
-        void 0 === d && (d = -1);
-        var c = Object.create(m.prototype);
-        c._buffer = a;
-        c._length = -1 === d ? a.byteLength : d;
-        c._position = 0;
-        c._resetViews();
-        c._littleEndian = m._nativeLittleEndian;
-        c._bitBuffer = 0;
-        c._bitLength = 0;
-        return c;
-      };
-      m.FromPlainObject = function(a) {
-        var d = m.FromArrayBuffer(a.buffer, a.length);
-        d._littleEndian = a.littleEndian;
-        return d;
+      function m(d) {
+        void 0 === d && (d = m.INITIAL_SIZE);
+        this._buffer || (this._buffer = new ArrayBuffer(d), this._position = this._length = 0, this._resetViews(), this._littleEndian = m._nativeLittleEndian, this._bitLength = this._bitBuffer = 0);
+      }
+      m.FromArrayBuffer = function(d, e) {
+        void 0 === e && (e = -1);
+        var b = Object.create(m.prototype);
+        b._buffer = d;
+        b._length = -1 === e ? d.byteLength : e;
+        b._position = 0;
+        b._resetViews();
+        b._littleEndian = m._nativeLittleEndian;
+        b._bitBuffer = 0;
+        b._bitLength = 0;
+        return b;
+      };
+      m.FromPlainObject = function(d) {
+        var e = m.FromArrayBuffer(d.buffer, d.length);
+        e._littleEndian = d.littleEndian;
+        return e;
       };
       m.prototype.toPlainObject = function() {
-        return new n(this._buffer, this._length, this._littleEndian);
+        return new q(this._buffer, this._length, this._littleEndian);
       };
       m.prototype._resetViews = function() {
         this._u8 = new Uint8Array(this._buffer);
         this._f32 = this._i32 = null;
       };
-      m.prototype._requestViews = function(a) {
-        0 === (this._buffer.byteLength & 3) && (null === this._i32 && a & 2 && (this._i32 = new Int32Array(this._buffer)), null === this._f32 && a & 4 && (this._f32 = new Float32Array(this._buffer)));
+      m.prototype._requestViews = function(d) {
+        0 === (this._buffer.byteLength & 3) && (null === this._i32 && d & 2 && (this._i32 = new Int32Array(this._buffer)), null === this._f32 && d & 4 && (this._f32 = new Float32Array(this._buffer)));
       };
       m.prototype.getBytes = function() {
         return new Uint8Array(this._buffer, 0, this._length);
       };
-      m.prototype._ensureCapacity = function(a) {
-        var d = this._buffer;
-        if (d.byteLength < a) {
-          for (var c = Math.max(d.byteLength, 1);c < a;) {
-            c *= 2;
-          }
-          a = m._arrayBufferPool.acquire(c);
-          c = this._u8;
-          this._buffer = a;
+      m.prototype._ensureCapacity = function(d) {
+        var e = this._buffer;
+        if (e.byteLength < d) {
+          for (var b = Math.max(e.byteLength, 1);b < d;) {
+            b *= 2;
+          }
+          d = m._arrayBufferPool.acquire(b);
+          b = this._u8;
+          this._buffer = d;
           this._resetViews();
-          this._u8.set(c);
-          m._arrayBufferPool.release(d);
+          this._u8.set(b);
+          m._arrayBufferPool.release(e);
         }
       };
       m.prototype.clear = function() {
         this._position = this._length = 0;
       };
       m.prototype.readBoolean = function() {
         return 0 !== this.readUnsignedByte();
       };
       m.prototype.readByte = function() {
         return this.readUnsignedByte() << 24 >> 24;
       };
       m.prototype.readUnsignedByte = function() {
         this._position + 1 > this._length && throwError("EOFError", Errors.EOFError);
         return this._u8[this._position++];
       };
-      m.prototype.readBytes = function(a, d) {
-        var c = 0;
-        void 0 === c && (c = 0);
-        void 0 === d && (d = 0);
-        var e = this._position;
-        c || (c = 0);
-        d || (d = this._length - e);
-        e + d > this._length && throwError("EOFError", Errors.EOFError);
-        a.length < c + d && (a._ensureCapacity(c + d), a.length = c + d);
-        a._u8.set(new Uint8Array(this._buffer, e, d), c);
-        this._position += d;
+      m.prototype.readBytes = function(d, e) {
+        var b = 0;
+        void 0 === b && (b = 0);
+        void 0 === e && (e = 0);
+        var g = this._position;
+        b || (b = 0);
+        e || (e = this._length - g);
+        g + e > this._length && throwError("EOFError", Errors.EOFError);
+        d.length < b + e && (d._ensureCapacity(b + e), d.length = b + e);
+        d._u8.set(new Uint8Array(this._buffer, g, e), b);
+        this._position += e;
       };
       m.prototype.readShort = function() {
         return this.readUnsignedShort() << 16 >> 16;
       };
       m.prototype.readUnsignedShort = function() {
-        var a = this._u8, d = this._position;
-        d + 2 > this._length && throwError("EOFError", Errors.EOFError);
-        var c = a[d + 0], a = a[d + 1];
-        this._position = d + 2;
-        return this._littleEndian ? a << 8 | c : c << 8 | a;
+        var d = this._u8, e = this._position;
+        e + 2 > this._length && throwError("EOFError", Errors.EOFError);
+        var b = d[e + 0], d = d[e + 1];
+        this._position = e + 2;
+        return this._littleEndian ? d << 8 | b : b << 8 | d;
       };
       m.prototype.readInt = function() {
-        var a = this._u8, d = this._position;
-        d + 4 > this._length && throwError("EOFError", Errors.EOFError);
-        var c = a[d + 0], e = a[d + 1], q = a[d + 2], a = a[d + 3];
-        this._position = d + 4;
-        return this._littleEndian ? a << 24 | q << 16 | e << 8 | c : c << 24 | e << 16 | q << 8 | a;
+        var d = this._u8, e = this._position;
+        e + 4 > this._length && throwError("EOFError", Errors.EOFError);
+        var b = d[e + 0], g = d[e + 1], p = d[e + 2], d = d[e + 3];
+        this._position = e + 4;
+        return this._littleEndian ? d << 24 | p << 16 | g << 8 | b : b << 24 | g << 16 | p << 8 | d;
       };
       m.prototype.readUnsignedInt = function() {
         return this.readInt() >>> 0;
       };
       m.prototype.readFloat = function() {
-        var a = this._position;
-        a + 4 > this._length && throwError("EOFError", Errors.EOFError);
-        this._position = a + 4;
+        var d = this._position;
+        d + 4 > this._length && throwError("EOFError", Errors.EOFError);
+        this._position = d + 4;
         this._requestViews(4);
-        if (this._littleEndian && 0 === (a & 3) && this._f32) {
-          return this._f32[a >> 2];
-        }
-        var d = this._u8, c = k.IntegerUtilities.u8;
-        this._littleEndian ? (c[0] = d[a + 0], c[1] = d[a + 1], c[2] = d[a + 2], c[3] = d[a + 3]) : (c[3] = d[a + 0], c[2] = d[a + 1], c[1] = d[a + 2], c[0] = d[a + 3]);
+        if (this._littleEndian && 0 === (d & 3) && this._f32) {
+          return this._f32[d >> 2];
+        }
+        var e = this._u8, b = k.IntegerUtilities.u8;
+        this._littleEndian ? (b[0] = e[d + 0], b[1] = e[d + 1], b[2] = e[d + 2], b[3] = e[d + 3]) : (b[3] = e[d + 0], b[2] = e[d + 1], b[1] = e[d + 2], b[0] = e[d + 3]);
         return k.IntegerUtilities.f32[0];
       };
       m.prototype.readDouble = function() {
-        var a = this._u8, d = this._position;
-        d + 8 > this._length && throwError("EOFError", Errors.EOFError);
-        var c = k.IntegerUtilities.u8;
-        this._littleEndian ? (c[0] = a[d + 0], c[1] = a[d + 1], c[2] = a[d + 2], c[3] = a[d + 3], c[4] = a[d + 4], c[5] = a[d + 5], c[6] = a[d + 6], c[7] = a[d + 7]) : (c[0] = a[d + 7], c[1] = a[d + 6], c[2] = a[d + 5], c[3] = a[d + 4], c[4] = a[d + 3], c[5] = a[d + 2], c[6] = a[d + 1], c[7] = a[d + 0]);
-        this._position = d + 8;
+        var d = this._u8, e = this._position;
+        e + 8 > this._length && throwError("EOFError", Errors.EOFError);
+        var b = k.IntegerUtilities.u8;
+        this._littleEndian ? (b[0] = d[e + 0], b[1] = d[e + 1], b[2] = d[e + 2], b[3] = d[e + 3], b[4] = d[e + 4], b[5] = d[e + 5], b[6] = d[e + 6], b[7] = d[e + 7]) : (b[0] = d[e + 7], b[1] = d[e + 6], b[2] = d[e + 5], b[3] = d[e + 4], b[4] = d[e + 3], b[5] = d[e + 2], b[6] = d[e + 1], b[7] = d[e + 0]);
+        this._position = e + 8;
         return k.IntegerUtilities.f64[0];
       };
-      m.prototype.writeBoolean = function(a) {
-        this.writeByte(a ? 1 : 0);
-      };
-      m.prototype.writeByte = function(a) {
-        var d = this._position + 1;
-        this._ensureCapacity(d);
-        this._u8[this._position++] = a;
-        d > this._length && (this._length = d);
-      };
-      m.prototype.writeUnsignedByte = function(a) {
-        var d = this._position + 1;
-        this._ensureCapacity(d);
-        this._u8[this._position++] = a;
-        d > this._length && (this._length = d);
-      };
-      m.prototype.writeRawBytes = function(a) {
-        var d = this._position + a.length;
-        this._ensureCapacity(d);
-        this._u8.set(a, this._position);
-        this._position = d;
-        d > this._length && (this._length = d);
-      };
-      m.prototype.writeBytes = function(a, d, c) {
-        void 0 === d && (d = 0);
-        void 0 === c && (c = 0);
-        k.isNullOrUndefined(a) && throwError("TypeError", Errors.NullPointerError, "bytes");
-        2 > arguments.length && (d = 0);
-        3 > arguments.length && (c = 0);
-        g(d, a.length);
-        g(d + c, a.length);
-        0 === c && (c = a.length - d);
-        this.writeRawBytes(new Int8Array(a._buffer, d, c));
-      };
-      m.prototype.writeShort = function(a) {
-        this.writeUnsignedShort(a);
-      };
-      m.prototype.writeUnsignedShort = function(a) {
-        var d = this._position;
-        this._ensureCapacity(d + 2);
-        var c = this._u8;
-        this._littleEndian ? (c[d + 0] = a, c[d + 1] = a >> 8) : (c[d + 0] = a >> 8, c[d + 1] = a);
-        this._position = d += 2;
-        d > this._length && (this._length = d);
-      };
-      m.prototype.writeInt = function(a) {
-        this.writeUnsignedInt(a);
-      };
-      m.prototype.write2Ints = function(a, d) {
-        this.write2UnsignedInts(a, d);
-      };
-      m.prototype.write4Ints = function(a, d, c, e) {
-        this.write4UnsignedInts(a, d, c, e);
-      };
-      m.prototype.writeUnsignedInt = function(a) {
-        var d = this._position;
-        this._ensureCapacity(d + 4);
+      m.prototype.writeBoolean = function(d) {
+        this.writeByte(d ? 1 : 0);
+      };
+      m.prototype.writeByte = function(d) {
+        var e = this._position + 1;
+        this._ensureCapacity(e);
+        this._u8[this._position++] = d;
+        e > this._length && (this._length = e);
+      };
+      m.prototype.writeUnsignedByte = function(d) {
+        var e = this._position + 1;
+        this._ensureCapacity(e);
+        this._u8[this._position++] = d;
+        e > this._length && (this._length = e);
+      };
+      m.prototype.writeRawBytes = function(d) {
+        var e = this._position + d.length;
+        this._ensureCapacity(e);
+        this._u8.set(d, this._position);
+        this._position = e;
+        e > this._length && (this._length = e);
+      };
+      m.prototype.writeBytes = function(d, e, b) {
+        void 0 === e && (e = 0);
+        void 0 === b && (b = 0);
+        k.isNullOrUndefined(d) && throwError("TypeError", Errors.NullPointerError, "bytes");
+        2 > arguments.length && (e = 0);
+        3 > arguments.length && (b = 0);
+        f(e, d.length);
+        f(e + b, d.length);
+        0 === b && (b = d.length - e);
+        this.writeRawBytes(new Int8Array(d._buffer, e, b));
+      };
+      m.prototype.writeShort = function(d) {
+        this.writeUnsignedShort(d);
+      };
+      m.prototype.writeUnsignedShort = function(d) {
+        var e = this._position;
+        this._ensureCapacity(e + 2);
+        var b = this._u8;
+        this._littleEndian ? (b[e + 0] = d, b[e + 1] = d >> 8) : (b[e + 0] = d >> 8, b[e + 1] = d);
+        this._position = e += 2;
+        e > this._length && (this._length = e);
+      };
+      m.prototype.writeInt = function(d) {
+        this.writeUnsignedInt(d);
+      };
+      m.prototype.write2Ints = function(d, e) {
+        this.write2UnsignedInts(d, e);
+      };
+      m.prototype.write4Ints = function(d, e, b, g) {
+        this.write4UnsignedInts(d, e, b, g);
+      };
+      m.prototype.writeUnsignedInt = function(d) {
+        var e = this._position;
+        this._ensureCapacity(e + 4);
         this._requestViews(2);
-        if (this._littleEndian === m._nativeLittleEndian && 0 === (d & 3) && this._i32) {
-          this._i32[d >> 2] = a;
+        if (this._littleEndian === m._nativeLittleEndian && 0 === (e & 3) && this._i32) {
+          this._i32[e >> 2] = d;
         } else {
-          var c = this._u8;
-          this._littleEndian ? (c[d + 0] = a, c[d + 1] = a >> 8, c[d + 2] = a >> 16, c[d + 3] = a >> 24) : (c[d + 0] = a >> 24, c[d + 1] = a >> 16, c[d + 2] = a >> 8, c[d + 3] = a);
-        }
-        this._position = d += 4;
-        d > this._length && (this._length = d);
-      };
-      m.prototype.write2UnsignedInts = function(a, d) {
-        var c = this._position;
-        this._ensureCapacity(c + 8);
+          var b = this._u8;
+          this._littleEndian ? (b[e + 0] = d, b[e + 1] = d >> 8, b[e + 2] = d >> 16, b[e + 3] = d >> 24) : (b[e + 0] = d >> 24, b[e + 1] = d >> 16, b[e + 2] = d >> 8, b[e + 3] = d);
+        }
+        this._position = e += 4;
+        e > this._length && (this._length = e);
+      };
+      m.prototype.write2UnsignedInts = function(d, e) {
+        var b = this._position;
+        this._ensureCapacity(b + 8);
         this._requestViews(2);
-        this._littleEndian === m._nativeLittleEndian && 0 === (c & 3) && this._i32 ? (this._i32[(c >> 2) + 0] = a, this._i32[(c >> 2) + 1] = d, this._position = c += 8, c > this._length && (this._length = c)) : (this.writeUnsignedInt(a), this.writeUnsignedInt(d));
-      };
-      m.prototype.write4UnsignedInts = function(a, d, c, e) {
-        var q = this._position;
-        this._ensureCapacity(q + 16);
+        this._littleEndian === m._nativeLittleEndian && 0 === (b & 3) && this._i32 ? (this._i32[(b >> 2) + 0] = d, this._i32[(b >> 2) + 1] = e, this._position = b += 8, b > this._length && (this._length = b)) : (this.writeUnsignedInt(d), this.writeUnsignedInt(e));
+      };
+      m.prototype.write4UnsignedInts = function(d, e, b, g) {
+        var p = this._position;
+        this._ensureCapacity(p + 16);
         this._requestViews(2);
-        this._littleEndian === m._nativeLittleEndian && 0 === (q & 3) && this._i32 ? (this._i32[(q >> 2) + 0] = a, this._i32[(q >> 2) + 1] = d, this._i32[(q >> 2) + 2] = c, this._i32[(q >> 2) + 3] = e, this._position = q += 16, q > this._length && (this._length = q)) : (this.writeUnsignedInt(a), this.writeUnsignedInt(d), this.writeUnsignedInt(c), this.writeUnsignedInt(e));
-      };
-      m.prototype.writeFloat = function(a) {
-        var d = this._position;
-        this._ensureCapacity(d + 4);
+        this._littleEndian === m._nativeLittleEndian && 0 === (p & 3) && this._i32 ? (this._i32[(p >> 2) + 0] = d, this._i32[(p >> 2) + 1] = e, this._i32[(p >> 2) + 2] = b, this._i32[(p >> 2) + 3] = g, this._position = p += 16, p > this._length && (this._length = p)) : (this.writeUnsignedInt(d), this.writeUnsignedInt(e), this.writeUnsignedInt(b), this.writeUnsignedInt(g));
+      };
+      m.prototype.writeFloat = function(d) {
+        var e = this._position;
+        this._ensureCapacity(e + 4);
         this._requestViews(4);
-        if (this._littleEndian === m._nativeLittleEndian && 0 === (d & 3) && this._f32) {
-          this._f32[d >> 2] = a;
+        if (this._littleEndian === m._nativeLittleEndian && 0 === (e & 3) && this._f32) {
+          this._f32[e >> 2] = d;
         } else {
-          var c = this._u8;
-          k.IntegerUtilities.f32[0] = a;
-          a = k.IntegerUtilities.u8;
-          this._littleEndian ? (c[d + 0] = a[0], c[d + 1] = a[1], c[d + 2] = a[2], c[d + 3] = a[3]) : (c[d + 0] = a[3], c[d + 1] = a[2], c[d + 2] = a[1], c[d + 3] = a[0]);
-        }
-        this._position = d += 4;
-        d > this._length && (this._length = d);
-      };
-      m.prototype.write6Floats = function(a, d, c, e, q, s) {
-        var n = this._position;
-        this._ensureCapacity(n + 24);
+          var b = this._u8;
+          k.IntegerUtilities.f32[0] = d;
+          d = k.IntegerUtilities.u8;
+          this._littleEndian ? (b[e + 0] = d[0], b[e + 1] = d[1], b[e + 2] = d[2], b[e + 3] = d[3]) : (b[e + 0] = d[3], b[e + 1] = d[2], b[e + 2] = d[1], b[e + 3] = d[0]);
+        }
+        this._position = e += 4;
+        e > this._length && (this._length = e);
+      };
+      m.prototype.write6Floats = function(d, e, b, g, p, a) {
+        var h = this._position;
+        this._ensureCapacity(h + 24);
         this._requestViews(4);
-        this._littleEndian === m._nativeLittleEndian && 0 === (n & 3) && this._f32 ? (this._f32[(n >> 2) + 0] = a, this._f32[(n >> 2) + 1] = d, this._f32[(n >> 2) + 2] = c, this._f32[(n >> 2) + 3] = e, this._f32[(n >> 2) + 4] = q, this._f32[(n >> 2) + 5] = s, this._position = n += 24, n > this._length && (this._length = n)) : (this.writeFloat(a), this.writeFloat(d), this.writeFloat(c), this.writeFloat(e), this.writeFloat(q), this.writeFloat(s));
-      };
-      m.prototype.writeDouble = function(a) {
-        var d = this._position;
-        this._ensureCapacity(d + 8);
-        var c = this._u8;
-        k.IntegerUtilities.f64[0] = a;
-        a = k.IntegerUtilities.u8;
-        this._littleEndian ? (c[d + 0] = a[0], c[d + 1] = a[1], c[d + 2] = a[2], c[d + 3] = a[3], c[d + 4] = a[4], c[d + 5] = a[5], c[d + 6] = a[6], c[d + 7] = a[7]) : (c[d + 0] = a[7], c[d + 1] = a[6], c[d + 2] = a[5], c[d + 3] = a[4], c[d + 4] = a[3], c[d + 5] = a[2], c[d + 6] = a[1], c[d + 7] = a[0]);
-        this._position = d += 8;
-        d > this._length && (this._length = d);
+        this._littleEndian === m._nativeLittleEndian && 0 === (h & 3) && this._f32 ? (this._f32[(h >> 2) + 0] = d, this._f32[(h >> 2) + 1] = e, this._f32[(h >> 2) + 2] = b, this._f32[(h >> 2) + 3] = g, this._f32[(h >> 2) + 4] = p, this._f32[(h >> 2) + 5] = a, this._position = h += 24, h > this._length && (this._length = h)) : (this.writeFloat(d), this.writeFloat(e), this.writeFloat(b), this.writeFloat(g), this.writeFloat(p), this.writeFloat(a));
+      };
+      m.prototype.writeDouble = function(d) {
+        var e = this._position;
+        this._ensureCapacity(e + 8);
+        var b = this._u8;
+        k.IntegerUtilities.f64[0] = d;
+        d = k.IntegerUtilities.u8;
+        this._littleEndian ? (b[e + 0] = d[0], b[e + 1] = d[1], b[e + 2] = d[2], b[e + 3] = d[3], b[e + 4] = d[4], b[e + 5] = d[5], b[e + 6] = d[6], b[e + 7] = d[7]) : (b[e + 0] = d[7], b[e + 1] = d[6], b[e + 2] = d[5], b[e + 3] = d[4], b[e + 4] = d[3], b[e + 5] = d[2], b[e + 6] = d[1], b[e + 7] = d[0]);
+        this._position = e += 8;
+        e > this._length && (this._length = e);
       };
       m.prototype.readRawBytes = function() {
         return new Int8Array(this._buffer, 0, this._length);
       };
-      m.prototype.writeUTF = function(a) {
-        a = b(a);
-        a = h(a);
-        this.writeShort(a.length);
-        this.writeRawBytes(a);
-      };
-      m.prototype.writeUTFBytes = function(a) {
-        a = b(a);
-        a = h(a);
-        this.writeRawBytes(a);
+      m.prototype.writeUTF = function(d) {
+        d = c(d);
+        d = n(d);
+        this.writeShort(d.length);
+        this.writeRawBytes(d);
+      };
+      m.prototype.writeUTFBytes = function(d) {
+        d = c(d);
+        d = n(d);
+        this.writeRawBytes(d);
       };
       m.prototype.readUTF = function() {
         return this.readUTFBytes(this.readShort());
       };
       m.prototype.readUTFBytes = function(d) {
         d >>>= 0;
-        var l = this._position;
-        l + d > this._length && throwError("EOFError", Errors.EOFError);
+        var e = this._position;
+        e + d > this._length && throwError("EOFError", Errors.EOFError);
         this._position += d;
-        return a(new Int8Array(this._buffer, l, d));
+        return a(new Int8Array(this._buffer, e, d));
       };
       Object.defineProperty(m.prototype, "length", {get:function() {
         return this._length;
-      }, set:function(a) {
-        a >>>= 0;
-        a > this._buffer.byteLength && this._ensureCapacity(a);
-        this._length = a;
-        this._position = d(this._position, 0, this._length);
+      }, set:function(d) {
+        d >>>= 0;
+        d > this._buffer.byteLength && this._ensureCapacity(d);
+        this._length = d;
+        this._position = h(this._position, 0, this._length);
       }, enumerable:!0, configurable:!0});
       Object.defineProperty(m.prototype, "bytesAvailable", {get:function() {
         return this._length - this._position;
       }, enumerable:!0, configurable:!0});
       Object.defineProperty(m.prototype, "position", {get:function() {
         return this._position;
-      }, set:function(a) {
-        this._position = a >>> 0;
+      }, set:function(d) {
+        this._position = d >>> 0;
       }, enumerable:!0, configurable:!0});
       Object.defineProperty(m.prototype, "buffer", {get:function() {
         return this._buffer;
       }, enumerable:!0, configurable:!0});
       Object.defineProperty(m.prototype, "bytes", {get:function() {
         return this._u8;
       }, enumerable:!0, configurable:!0});
       Object.defineProperty(m.prototype, "ints", {get:function() {
         this._requestViews(2);
         return this._i32;
       }, enumerable:!0, configurable:!0});
       Object.defineProperty(m.prototype, "objectEncoding", {get:function() {
         return this._objectEncoding;
-      }, set:function(a) {
-        this._objectEncoding = a >>> 0;
+      }, set:function(d) {
+        this._objectEncoding = d >>> 0;
       }, enumerable:!0, configurable:!0});
       Object.defineProperty(m.prototype, "endian", {get:function() {
         return this._littleEndian ? "littleEndian" : "bigEndian";
-      }, set:function(a) {
-        a = b(a);
-        this._littleEndian = "auto" === a ? m._nativeLittleEndian : "littleEndian" === a;
+      }, set:function(d) {
+        d = c(d);
+        this._littleEndian = "auto" === d ? m._nativeLittleEndian : "littleEndian" === d;
       }, enumerable:!0, configurable:!0});
       m.prototype.toString = function() {
         return a(new Int8Array(this._buffer, 0, this._length));
       };
-      m.prototype.toBlob = function(a) {
-        return new Blob([new Int8Array(this._buffer, this._position, this._length)], {type:a});
-      };
-      m.prototype.writeMultiByte = function(a, d) {
-        u("packageInternal flash.utils.ObjectOutput::writeMultiByte");
-      };
-      m.prototype.readMultiByte = function(a, d) {
-        u("packageInternal flash.utils.ObjectInput::readMultiByte");
-      };
-      m.prototype.getValue = function(a) {
-        a |= 0;
-        return a >= this._length ? void 0 : this._u8[a];
-      };
-      m.prototype.setValue = function(a, d) {
-        a |= 0;
-        var c = a + 1;
-        this._ensureCapacity(c);
-        this._u8[a] = d;
-        c > this._length && (this._length = c);
+      m.prototype.toBlob = function(d) {
+        return new Blob([new Int8Array(this._buffer, this._position, this._length)], {type:d});
+      };
+      m.prototype.writeMultiByte = function(d, e) {
+        t("packageInternal flash.utils.ObjectOutput::writeMultiByte");
+      };
+      m.prototype.readMultiByte = function(d, e) {
+        t("packageInternal flash.utils.ObjectInput::readMultiByte");
+      };
+      m.prototype.getValue = function(d) {
+        d |= 0;
+        return d >= this._length ? void 0 : this._u8[d];
+      };
+      m.prototype.setValue = function(d, e) {
+        d |= 0;
+        var b = d + 1;
+        this._ensureCapacity(b);
+        this._u8[d] = e;
+        b > this._length && (this._length = b);
       };
       m.prototype.readFixed = function() {
         return this.readInt() / 65536;
       };
       m.prototype.readFixed8 = function() {
         return this.readShort() / 256;
       };
       m.prototype.readFloat16 = function() {
-        var a = this.readUnsignedShort(), d = a >> 15 ? -1 : 1, c = (a & 31744) >> 10, a = a & 1023;
-        return c ? 31 === c ? a ? NaN : Infinity * d : d * Math.pow(2, c - 15) * (1 + a / 1024) : a / 1024 * Math.pow(2, -14) * d;
+        var d = this.readUnsignedShort(), e = d >> 15 ? -1 : 1, b = (d & 31744) >> 10, d = d & 1023;
+        return b ? 31 === b ? d ? NaN : Infinity * e : e * Math.pow(2, b - 15) * (1 + d / 1024) : d / 1024 * Math.pow(2, -14) * e;
       };
       m.prototype.readEncodedU32 = function() {
-        var a = this.readUnsignedByte();
-        if (!(a & 128)) {
-          return a;
-        }
-        a = a & 127 | this.readUnsignedByte() << 7;
-        if (!(a & 16384)) {
-          return a;
-        }
-        a = a & 16383 | this.readUnsignedByte() << 14;
-        if (!(a & 2097152)) {
-          return a;
-        }
-        a = a & 2097151 | this.readUnsignedByte() << 21;
-        return a & 268435456 ? a & 268435455 | this.readUnsignedByte() << 28 : a;
-      };
-      m.prototype.readBits = function(a) {
-        return this.readUnsignedBits(a) << 32 - a >> 32 - a;
-      };
-      m.prototype.readUnsignedBits = function(a) {
-        for (var d = this._bitBuffer, c = this._bitLength;a > c;) {
-          d = d << 8 | this.readUnsignedByte(), c += 8;
-        }
-        c -= a;
-        a = d >>> c & f[a];
-        this._bitBuffer = d;
-        this._bitLength = c;
-        return a;
-      };
-      m.prototype.readFixedBits = function(a) {
-        return this.readBits(a) / 65536;
+        var d = this.readUnsignedByte();
+        if (!(d & 128)) {
+          return d;
+        }
+        d = d & 127 | this.readUnsignedByte() << 7;
+        if (!(d & 16384)) {
+          return d;
+        }
+        d = d & 16383 | this.readUnsignedByte() << 14;
+        if (!(d & 2097152)) {
+          return d;
+        }
+        d = d & 2097151 | this.readUnsignedByte() << 21;
+        return d & 268435456 ? d & 268435455 | this.readUnsignedByte() << 28 : d;
+      };
+      m.prototype.readBits = function(d) {
+        return this.readUnsignedBits(d) << 32 - d >> 32 - d;
+      };
+      m.prototype.readUnsignedBits = function(d) {
+        for (var e = this._bitBuffer, b = this._bitLength;d > b;) {
+          e = e << 8 | this.readUnsignedByte(), b += 8;
+        }
+        b -= d;
+        d = e >>> b & l[d];
+        this._bitBuffer = e;
+        this._bitLength = b;
+        return d;
+      };
+      m.prototype.readFixedBits = function(d) {
+        return this.readBits(d) / 65536;
       };
       m.prototype.readString = function(d) {
-        var l = this._position;
+        var e = this._position;
         if (d) {
-          l + d > this._length && throwError("EOFError", Errors.EOFError), this._position += d;
+          e + d > this._length && throwError("EOFError", Errors.EOFError), this._position += d;
         } else {
           d = 0;
-          for (var c = l;c < this._length && this._u8[c];c++) {
+          for (var b = e;b < this._length && this._u8[b];b++) {
             d++;
           }
           this._position += d + 1;
         }
-        return a(new Int8Array(this._buffer, l, d));
+        return a(new Int8Array(this._buffer, e, d));
       };
       m.prototype.align = function() {
         this._bitLength = this._bitBuffer = 0;
       };
       m.prototype.deflate = function() {
         this.compress("deflate");
       };
       m.prototype.inflate = function() {
         this.uncompress("deflate");
       };
-      m.prototype.compress = function(a) {
-        a = 0 === arguments.length ? "zlib" : b(a);
-        var d;
-        switch(a) {
+      m.prototype.compress = function(d) {
+        d = 0 === arguments.length ? "zlib" : c(d);
+        var e;
+        switch(d) {
           case "zlib":
-            d = new p.Deflate(!0);
+            e = new r.Deflate(!0);
             break;
           case "deflate":
-            d = new p.Deflate(!1);
+            e = new r.Deflate(!1);
             break;
           default:
             return;
         }
-        var c = new m;
-        d.onData = c.writeRawBytes.bind(c);
-        d.push(this._u8.subarray(0, this._length));
-        d.close();
-        this._ensureCapacity(c._u8.length);
-        this._u8.set(c._u8);
-        this.length = c.length;
+        var b = new m;
+        e.onData = b.writeRawBytes.bind(b);
+        e.push(this._u8.subarray(0, this._length));
+        e.close();
+        this._ensureCapacity(b._u8.length);
+        this._u8.set(b._u8);
+        this.length = b.length;
         this._position = 0;
       };
-      m.prototype.uncompress = function(a) {
-        a = 0 === arguments.length ? "zlib" : b(a);
-        var d;
-        switch(a) {
+      m.prototype.uncompress = function(d) {
+        d = 0 === arguments.length ? "zlib" : c(d);
+        var e;
+        switch(d) {
           case "zlib":
-            d = p.Inflate.create(!0);
+            e = r.Inflate.create(!0);
             break;
           case "deflate":
-            d = p.Inflate.create(!1);
+            e = r.Inflate.create(!1);
             break;
           case "lzma":
-            d = new p.LzmaDecoder(!1);
+            e = new r.LzmaDecoder(!1);
             break;
           default:
             return;
         }
-        var c = new m, e;
-        d.onData = c.writeRawBytes.bind(c);
-        d.onError = function(a) {
-          return e = a;
-        };
-        d.push(this._u8.subarray(0, this._length));
-        e && throwError("IOError", Errors.CompressedDataError);
-        d.close();
-        this._ensureCapacity(c._u8.length);
-        this._u8.set(c._u8);
-        this.length = c.length;
+        var b = new m, g;
+        e.onData = b.writeRawBytes.bind(b);
+        e.onError = function(b) {
+          return g = b;
+        };
+        e.push(this._u8.subarray(0, this._length));
+        g && throwError("IOError", Errors.CompressedDataError);
+        e.close();
+        this._ensureCapacity(b._u8.length);
+        this._u8.set(b._u8);
+        this.length = b.length;
         this._position = 0;
       };
       m._nativeLittleEndian = 1 === (new Int8Array((new Int32Array([1])).buffer))[0];
       m.INITIAL_SIZE = 128;
       m._arrayBufferPool = new k.ArrayBufferPool;
       return m;
     }();
-    p.DataBuffer = v;
+    r.DataBuffer = v;
   })(k.ArrayUtilities || (k.ArrayUtilities = {}));
 })(Shumway || (Shumway = {}));
 (function(k) {
-  var p = k.ArrayUtilities.DataBuffer, g = k.ArrayUtilities.ensureTypedArrayCapacity;
-  (function(b) {
-    b[b.BeginSolidFill = 1] = "BeginSolidFill";
-    b[b.BeginGradientFill = 2] = "BeginGradientFill";
-    b[b.BeginBitmapFill = 3] = "BeginBitmapFill";
-    b[b.EndFill = 4] = "EndFill";
-    b[b.LineStyleSolid = 5] = "LineStyleSolid";
-    b[b.LineStyleGradient = 6] = "LineStyleGradient";
-    b[b.LineStyleBitmap = 7] = "LineStyleBitmap";
-    b[b.LineEnd = 8] = "LineEnd";
-    b[b.MoveTo = 9] = "MoveTo";
-    b[b.LineTo = 10] = "LineTo";
-    b[b.CurveTo = 11] = "CurveTo";
-    b[b.CubicCurveTo = 12] = "CubicCurveTo";
+  var r = k.ArrayUtilities.DataBuffer, f = k.ArrayUtilities.ensureTypedArrayCapacity;
+  (function(c) {
+    c[c.BeginSolidFill = 1] = "BeginSolidFill";
+    c[c.BeginGradientFill = 2] = "BeginGradientFill";
+    c[c.BeginBitmapFill = 3] = "BeginBitmapFill";
+    c[c.EndFill = 4] = "EndFill";
+    c[c.LineStyleSolid = 5] = "LineStyleSolid";
+    c[c.LineStyleGradient = 6] = "LineStyleGradient";
+    c[c.LineStyleBitmap = 7] = "LineStyleBitmap";
+    c[c.LineEnd = 8] = "LineEnd";
+    c[c.MoveTo = 9] = "MoveTo";
+    c[c.LineTo = 10] = "LineTo";
+    c[c.CurveTo = 11] = "CurveTo";
+    c[c.CubicCurveTo = 12] = "CubicCurveTo";
   })(k.PathCommand || (k.PathCommand = {}));
-  (function(b) {
-    b[b.Linear = 16] = "Linear";
-    b[b.Radial = 18] = "Radial";
+  (function(c) {
+    c[c.Linear = 16] = "Linear";
+    c[c.Radial = 18] = "Radial";
   })(k.GradientType || (k.GradientType = {}));
-  (function(b) {
-    b[b.Pad = 0] = "Pad";
-    b[b.Reflect = 1] = "Reflect";
-    b[b.Repeat = 2] = "Repeat";
+  (function(c) {
+    c[c.Pad = 0] = "Pad";
+    c[c.Reflect = 1] = "Reflect";
+    c[c.Repeat = 2] = "Repeat";
   })(k.GradientSpreadMethod || (k.GradientSpreadMethod = {}));
-  (function(b) {
-    b[b.RGB = 0] = "RGB";
-    b[b.LinearRGB = 1] = "LinearRGB";
+  (function(c) {
+    c[c.RGB = 0] = "RGB";
+    c[c.LinearRGB = 1] = "LinearRGB";
   })(k.GradientInterpolationMethod || (k.GradientInterpolationMethod = {}));
-  (function(b) {
-    b[b.None = 0] = "None";
-    b[b.Normal = 1] = "Normal";
-    b[b.Vertical = 2] = "Vertical";
-    b[b.Horizontal = 3] = "Horizontal";
+  (function(c) {
+    c[c.None = 0] = "None";
+    c[c.Normal = 1] = "Normal";
+    c[c.Vertical = 2] = "Vertical";
+    c[c.Horizontal = 3] = "Horizontal";
   })(k.LineScaleMode || (k.LineScaleMode = {}));
-  var b = function() {
-    return function(b, a, d, n, f, v, m, r, g, k, l) {
-      this.commands = b;
+  var c = function() {
+    return function(c, a, h, q, l, v, m, s, f, d, e) {
+      this.commands = c;
       this.commandsPosition = a;
-      this.coordinates = d;
-      this.morphCoordinates = n;
-      this.coordinatesPosition = f;
+      this.coordinates = h;
+      this.morphCoordinates = q;
+      this.coordinatesPosition = l;
       this.styles = v;
       this.stylesLength = m;
-      this.morphStyles = r;
-      this.morphStylesLength = g;
-      this.hasFills = k;
-      this.hasLines = l;
+      this.morphStyles = s;
+      this.morphStylesLength = f;
+      this.hasFills = d;
+      this.hasLines = e;
     };
   }();
-  k.PlainObjectShapeData = b;
-  var u;
-  (function(b) {
-    b[b.Commands = 32] = "Commands";
-    b[b.Coordinates = 128] = "Coordinates";
-    b[b.Styles = 16] = "Styles";
-  })(u || (u = {}));
-  u = function() {
-    function h(a) {
+  k.PlainObjectShapeData = c;
+  var t;
+  (function(c) {
+    c[c.Commands = 32] = "Commands";
+    c[c.Coordinates = 128] = "Coordinates";
+    c[c.Styles = 16] = "Styles";
+  })(t || (t = {}));
+  t = function() {
+    function n(a) {
       void 0 === a && (a = !0);
       a && this.clear();
     }
-    h.FromPlainObject = function(a) {
-      var d = new h(!1);
-      d.commands = a.commands;
-      d.coordinates = a.coordinates;
-      d.morphCoordinates = a.morphCoordinates;
-      d.commandsPosition = a.commandsPosition;
-      d.coordinatesPosition = a.coordinatesPosition;
-      d.styles = p.FromArrayBuffer(a.styles, a.stylesLength);
-      d.styles.endian = "auto";
-      a.morphStyles && (d.morphStyles = p.FromArrayBuffer(a.morphStyles, a.morphStylesLength), d.morphStyles.endian = "auto");
-      d.hasFills = a.hasFills;
-      d.hasLines = a.hasLines;
-      return d;
-    };
-    h.prototype.moveTo = function(a, d) {
+    n.FromPlainObject = function(a) {
+      var h = new n(!1);
+      h.commands = a.commands;
+      h.coordinates = a.coordinates;
+      h.morphCoordinates = a.morphCoordinates;
+      h.commandsPosition = a.commandsPosition;
+      h.coordinatesPosition = a.coordinatesPosition;
+      h.styles = r.FromArrayBuffer(a.styles, a.stylesLength);
+      h.styles.endian = "auto";
+      a.morphStyles && (h.morphStyles = r.FromArrayBuffer(a.morphStyles, a.morphStylesLength), h.morphStyles.endian = "auto");
+      h.hasFills = a.hasFills;
+      h.hasLines = a.hasLines;
+      return h;
+    };
+    n.prototype.moveTo = function(a, h) {
       this.ensurePathCapacities(1, 2);
       this.commands[this.commandsPosition++] = 9;
       this.coordinates[this.coordinatesPosition++] = a;
-      this.coordinates[this.coordinatesPosition++] = d;
-    };
-    h.prototype.lineTo = function(a, d) {
+      this.coordinates[this.coordinatesPosition++] = h;
+    };
+    n.prototype.lineTo = function(a, h) {
       this.ensurePathCapacities(1, 2);
       this.commands[this.commandsPosition++] = 10;
       this.coordinates[this.coordinatesPosition++] = a;
-      this.coordinates[this.coordinatesPosition++] = d;
-    };
-    h.prototype.curveTo = function(a, d, b, f) {
+      this.coordinates[this.coordinatesPosition++] = h;
+    };
+    n.prototype.curveTo = function(a, h, c, l) {
       this.ensurePathCapacities(1, 4);
       this.commands[this.commandsPosition++] = 11;
       this.coordinates[this.coordinatesPosition++] = a;
-      this.coordinates[this.coordinatesPosition++] = d;
-      this.coordinates[this.coordinatesPosition++] = b;
-      this.coordinates[this.coordinatesPosition++] = f;
-    };
-    h.prototype.cubicCurveTo = function(a, d, b, f, h, m) {
+      this.coordinates[this.coordinatesPosition++] = h;
+      this.coordinates[this.coordinatesPosition++] = c;
+      this.coordinates[this.coordinatesPosition++] = l;
+    };
+    n.prototype.cubicCurveTo = function(a, h, c, l, n, m) {
       this.ensurePathCapacities(1, 6);
       this.commands[this.commandsPosition++] = 12;
       this.coordinates[this.coordinatesPosition++] = a;
-      this.coordinates[this.coordinatesPosition++] = d;
-      this.coordinates[this.coordinatesPosition++] = b;
-      this.coordinates[this.coordinatesPosition++] = f;
       this.coordinates[this.coordinatesPosition++] = h;
+      this.coordinates[this.coordinatesPosition++] = c;
+      this.coordinates[this.coordinatesPosition++] = l;
+      this.coordinates[this.coordinatesPosition++] = n;
       this.coordinates[this.coordinatesPosition++] = m;
     };
-    h.prototype.beginFill = function(a) {
+    n.prototype.beginFill = function(a) {
       this.ensurePathCapacities(1, 0);
       this.commands[this.commandsPosition++] = 1;
       this.styles.writeUnsignedInt(a);
       this.hasFills = !0;
     };
-    h.prototype.writeMorphFill = function(a) {
+    n.prototype.writeMorphFill = function(a) {
       this.morphStyles.writeUnsignedInt(a);
     };
-    h.prototype.endFill = function() {
+    n.prototype.endFill = function() {
       this.ensurePathCapacities(1, 0);
       this.commands[this.commandsPosition++] = 4;
     };
-    h.prototype.endLine = function() {
+    n.prototype.endLine = function() {
       this.ensurePathCapacities(1, 0);
       this.commands[this.commandsPosition++] = 8;
     };
-    h.prototype.lineStyle = function(a, d, b, f, h, m, r) {
+    n.prototype.lineStyle = function(a, h, c, l, n, m, s) {
       this.ensurePathCapacities(2, 0);
       this.commands[this.commandsPosition++] = 5;
       this.coordinates[this.coordinatesPosition++] = a;
       a = this.styles;
-      a.writeUnsignedInt(d);
-      a.writeBoolean(b);
-      a.writeUnsignedByte(f);
-      a.writeUnsignedByte(h);
+      a.writeUnsignedInt(h);
+      a.writeBoolean(c);
+      a.writeUnsignedByte(l);
+      a.writeUnsignedByte(n);
       a.writeUnsignedByte(m);
-      a.writeUnsignedByte(r);
+      a.writeUnsignedByte(s);
       this.hasLines = !0;
     };
-    h.prototype.writeMorphLineStyle = function(a, d) {
+    n.prototype.writeMorphLineStyle = function(a, h) {
       this.morphCoordinates[this.coordinatesPosition - 1] = a;
-      this.morphStyles.writeUnsignedInt(d);
-    };
-    h.prototype.beginBitmap = function(a, d, b, f, h) {
+      this.morphStyles.writeUnsignedInt(h);
+    };
+    n.prototype.beginBitmap = function(a, h, c, l, n) {
       this.ensurePathCapacities(1, 0);
       this.commands[this.commandsPosition++] = a;
       a = this.styles;
-      a.writeUnsignedInt(d);
-      this._writeStyleMatrix(b, !1);
-      a.writeBoolean(f);
-      a.writeBoolean(h);
+      a.writeUnsignedInt(h);
+      this._writeStyleMatrix(c, !1);
+      a.writeBoolean(l);
+      a.writeBoolean(n);
       this.hasFills = !0;
     };
-    h.prototype.writeMorphBitmap = function(a) {
+    n.prototype.writeMorphBitmap = function(a) {
       this._writeStyleMatrix(a, !0);
     };
-    h.prototype.beginGradient = function(a, d, b, f, h, m, r, g) {
+    n.prototype.beginGradient = function(a, h, c, l, n, m, s, f) {
       this.ensurePathCapacities(1, 0);
       this.commands[this.commandsPosition++] = a;
       a = this.styles;
-      a.writeUnsignedByte(f);
-      a.writeShort(g);
-      this._writeStyleMatrix(h, !1);
-      f = d.length;
-      a.writeByte(f);
-      for (h = 0;h < f;h++) {
-        a.writeUnsignedByte(b[h]), a.writeUnsignedInt(d[h]);
+      a.writeUnsignedByte(l);
+      a.writeShort(f);
+      this._writeStyleMatrix(n, !1);
+      l = h.length;
+      a.writeByte(l);
+      for (n = 0;n < l;n++) {
+        a.writeUnsignedByte(c[n]), a.writeUnsignedInt(h[n]);
       }
       a.writeUnsignedByte(m);
-      a.writeUnsignedByte(r);
+      a.writeUnsignedByte(s);
       this.hasFills = !0;
     };
-    h.prototype.writeMorphGradient = function(a, d, b) {
-      this._writeStyleMatrix(b, !0);
-      b = this.morphStyles;
-      for (var f = 0;f < a.length;f++) {
-        b.writeUnsignedByte(d[f]), b.writeUnsignedInt(a[f]);
-      }
-    };
-    h.prototype.writeCommandAndCoordinates = function(a, d, b) {
+    n.prototype.writeMorphGradient = function(a, h, c) {
+      this._writeStyleMatrix(c, !0);
+      c = this.morphStyles;
+      for (var l = 0;l < a.length;l++) {
+        c.writeUnsignedByte(h[l]), c.writeUnsignedInt(a[l]);
+      }
+    };
+    n.prototype.writeCommandAndCoordinates = function(a, h, c) {
       this.ensurePathCapacities(1, 2);
       this.commands[this.commandsPosition++] = a;
-      this.coordinates[this.coordinatesPosition++] = d;
-      this.coordinates[this.coordinatesPosition++] = b;
-    };
-    h.prototype.writeCoordinates = function(a, d) {
+      this.coordinates[this.coordinatesPosition++] = h;