aboutsummaryrefslogtreecommitdiff
path: root/extension/lib
diff options
context:
space:
mode:
Diffstat (limited to 'extension/lib')
-rw-r--r--extension/lib/commonHelpers.ts (renamed from extension/lib/commonHelpers.js)12
-rwxr-xr-xextension/lib/decl/chrome/chrome.d.ts8231
-rw-r--r--extension/lib/decl/filesystem/filesystem.d.ts548
-rw-r--r--extension/lib/decl/filewriter/filewriter.d.ts176
-rw-r--r--extension/lib/decl/handlebars/handlebars-1.0.0.d.ts184
-rw-r--r--extension/lib/decl/handlebars/handlebars.d.ts227
-rw-r--r--extension/lib/decl/jquery/jquery.d.ts3190
-rw-r--r--extension/lib/decl/lib.es6.d.ts18634
-rw-r--r--extension/lib/decl/systemjs/systemjs.d.ts20
-rw-r--r--extension/lib/decl/urijs/URIjs.d.ts236
-rw-r--r--extension/lib/decl/webrtc/MediaStream.d.ts199
-rw-r--r--extension/lib/emscripten/emsc.d.ts41
-rw-r--r--extension/lib/emscripten/libwrapper.js24
-rw-r--r--extension/lib/polyfill-react.js16
-rw-r--r--extension/lib/refs.ts6
-rw-r--r--extension/lib/util.js49
-rw-r--r--extension/lib/util.ts2
-rw-r--r--extension/lib/vendor/URI.js (renamed from extension/lib/URI.js)0
-rw-r--r--extension/lib/vendor/handlebars-v4.0.5.js (renamed from extension/lib/handlebars-v4.0.5.js)0
-rw-r--r--extension/lib/vendor/system.src.js4843
-rw-r--r--extension/lib/wallet/checkable.ts136
-rw-r--r--extension/lib/wallet/db.ts97
-rw-r--r--extension/lib/wallet/emscriptif.ts938
-rw-r--r--extension/lib/wallet/http.ts85
-rw-r--r--extension/lib/wallet/query.ts283
-rw-r--r--extension/lib/wallet/timerThread.ts10
-rw-r--r--extension/lib/wallet/types.ts109
-rw-r--r--extension/lib/wallet/wallet.ts697
-rw-r--r--extension/lib/wallet/wxmessaging.js144
-rw-r--r--extension/lib/wallet/wxmessaging.ts138
30 files changed, 39202 insertions, 73 deletions
diff --git a/extension/lib/commonHelpers.js b/extension/lib/commonHelpers.ts
index fbaadee92..5c32e47c1 100644
--- a/extension/lib/commonHelpers.js
+++ b/extension/lib/commonHelpers.ts
@@ -1,6 +1,6 @@
/*
This file is part of TALER
- (C) 2015 GNUnet e.V.
+ (C) 2016 GNUnet e.V.
TALER is free software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
@@ -14,16 +14,14 @@
TALER; see the file COPYING. If not, If not, see <http://www.gnu.org/licenses/>
*/
-"use strict";
-
Handlebars.registerHelper('prettyAmount', function (amount) {
- let v = amount.value + amount.fraction / 1e6;
- return v.toFixed(2) + " " + amount.currency;
+ let v = amount.value + amount.fraction / 1e6;
+ return v.toFixed(2) + " " + amount.currency;
});
Handlebars.registerHelper('prettyAmountNoCurrency', function (amount) {
- let v = amount.value + amount.fraction / 1e6;
- return v.toFixed(2);
+ let v = amount.value + amount.fraction / 1e6;
+ return v.toFixed(2);
});
Handlebars.registerHelper('objectStringifier', function (o) {
diff --git a/extension/lib/decl/chrome/chrome.d.ts b/extension/lib/decl/chrome/chrome.d.ts
new file mode 100755
index 000000000..77d2898fd
--- /dev/null
+++ b/extension/lib/decl/chrome/chrome.d.ts
@@ -0,0 +1,8231 @@
+// Type definitions for Chrome extension development
+// Project: http://developer.chrome.com/extensions/
+// Definitions by: Matthew Kimber <https://github.com/matthewkimber>, otiai10 <https://github.com/otiai10>, couven92 <https://github.com/couven92>
+// Definitions: https://github.com/borisyankov/DefinitelyTyped
+
+/// <reference path='../webrtc/MediaStream.d.ts'/>
+/// <reference path='../filesystem/filesystem.d.ts' />
+
+////////////////////
+// Global object
+////////////////////
+interface Window {
+ chrome: typeof chrome;
+}
+
+////////////////////
+// Accessibility Features
+////////////////////
+/**
+ * Use the chrome.accessibilityFeatures API to manage Chrome's accessibility features. This API relies on the ChromeSetting prototype of the type API for getting and setting individual accessibility features. In order to get feature states the extension must request accessibilityFeatures.read permission. For modifying feature state, the extension needs accessibilityFeatures.modify permission. Note that accessibilityFeatures.modify does not imply accessibilityFeatures.read permission.
+ * Availability: Since Chrome 37.
+ * Permissions: "accessibilityFeatures.read"
+ * Important: This API works only on Chrome OS.
+ */
+declare module chrome.accessibilityFeatures {
+ interface AccessibilityFeaturesGetArg {
+ /** Optional. Whether to return the value that applies to the incognito session (default false). */
+ incognito?: boolean;
+ }
+
+ interface AccessibilityFeaturesCallbackArg {
+ /** The value of the setting. */
+ value: any;
+ /**
+ * One of
+ * • not_controllable: cannot be controlled by any extension
+ * • controlled_by_other_extensions: controlled by extensions with higher precedence
+ * • controllable_by_this_extension: can be controlled by this extension
+ * • controlled_by_this_extension: controlled by this extension
+ */
+ levelOfControl: string;
+ /** Optional. Whether the effective value is specific to the incognito session. This property will only be present if the incognito property in the details parameter of get() was true. */
+ incognitoSpecific?: boolean;
+ }
+
+ interface AccessibilityFeaturesSetArg {
+ /**
+ * The value of the setting.
+ * Note that every setting has a specific value type, which is described together with the setting. An extension should not set a value of a different type.
+ */
+ value: any;
+ /**
+ * Optional.
+ * The scope of the ChromeSetting. One of
+ * • regular: setting for the regular profile (which is inherited by the incognito profile if not overridden elsewhere),
+ * • regular_only: setting for the regular profile only (not inherited by the incognito profile),
+ * • incognito_persistent: setting for the incognito profile that survives browser restarts (overrides regular preferences),
+ * • incognito_session_only: setting for the incognito profile that can only be set during an incognito session and is deleted when the incognito session ends (overrides regular and incognito_persistent preferences).
+ */
+ scope?: string;
+ }
+
+ interface AccessibilityFeaturesClearArg {
+ /**
+ * Optional.
+ * The scope of the ChromeSetting. One of
+ * • regular: setting for the regular profile (which is inherited by the incognito profile if not overridden elsewhere),
+ * • regular_only: setting for the regular profile only (not inherited by the incognito profile),
+ * • incognito_persistent: setting for the incognito profile that survives browser restarts (overrides regular preferences),
+ * • incognito_session_only: setting for the incognito profile that can only be set during an incognito session and is deleted when the incognito session ends (overrides regular and incognito_persistent preferences).
+ */
+ scope?: string;
+ }
+
+ interface AccessibilityFeaturesSetting {
+ /**
+ * Gets the value of a setting.
+ * @param details Which setting to consider.
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(object details) {...};
+ */
+ get(details: AccessibilityFeaturesGetArg, callback: (details: AccessibilityFeaturesCallbackArg) => void): void;
+ /**
+ * Sets the value of a setting.
+ * @param details Which setting to change.
+ * @param callback Called at the completion of the set operation.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
+ */
+ set(details: AccessibilityFeaturesSetArg, callback?: () => void): void;
+ /**
+ * Clears the setting, restoring any default value.
+ * @param details Which setting to clear.
+ * @param callback Called at the completion of the clear operation.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
+ */
+ clear(details: AccessibilityFeaturesClearArg, callback?: () => void): void;
+ }
+
+ var spokenFeedback: AccessibilityFeaturesSetting;
+ var largeCursor: AccessibilityFeaturesSetting;
+ var stickyKeys: AccessibilityFeaturesSetting;
+ var highContrast: AccessibilityFeaturesSetting;
+ var screenMagnifier: AccessibilityFeaturesSetting;
+ var autoclick: AccessibilityFeaturesSetting;
+ var virtualKeyboard: AccessibilityFeaturesSetting;
+ var animationPolicy: AccessibilityFeaturesSetting;
+}
+
+////////////////////
+// Alarms
+////////////////////
+/**
+ * Use the chrome.alarms API to schedule code to run periodically or at a specified time in the future.
+ * Availability: Since Chrome 22.
+ * Permissions: "alarms"
+ */
+declare module chrome.alarms {
+ interface AlarmCreateInfo {
+ /** Optional. Length of time in minutes after which the onAlarm event should fire. */
+ delayInMinutes?: number;
+ /** Optional. If set, the onAlarm event should fire every periodInMinutes minutes after the initial event specified by when or delayInMinutes. If not set, the alarm will only fire once. */
+ periodInMinutes?: number;
+ /** Optional. Time at which the alarm should fire, in milliseconds past the epoch (e.g. Date.now() + n). */
+ when?: number;
+ }
+
+ interface Alarm {
+ /** Optional. If not null, the alarm is a repeating alarm and will fire again in periodInMinutes minutes. */
+ periodInMinutes?: number;
+ /** Time at which this alarm was scheduled to fire, in milliseconds past the epoch (e.g. Date.now() + n). For performance reasons, the alarm may have been delayed an arbitrary amount beyond this. */
+ scheduledTime: number;
+ /** Name of this alarm. */
+ name: string;
+ }
+
+ interface AlarmEvent extends chrome.events.Event {
+ /**
+ * The callback parameter should be a function that looks like this:
+ * function( Alarm alarm) {...};
+ */
+ addListener(callback: (alarm: Alarm) => void): void;
+ }
+
+ /**
+ * Creates an alarm. Near the time(s) specified by alarmInfo, the onAlarm event is fired. If there is another alarm with the same name (or no name if none is specified), it will be cancelled and replaced by this alarm.
+ * In order to reduce the load on the user's machine, Chrome limits alarms to at most once every 1 minute but may delay them an arbitrary amount more. That is, setting delayInMinutes or periodInMinutes to less than 1 will not be honored and will cause a warning. when can be set to less than 1 minute after "now" without warning but won't actually cause the alarm to fire for at least 1 minute.
+ * To help you debug your app or extension, when you've loaded it unpacked, there's no limit to how often the alarm can fire.
+ * @param alarmInfo Describes when the alarm should fire. The initial time must be specified by either when or delayInMinutes (but not both). If periodInMinutes is set, the alarm will repeat every periodInMinutes minutes after the initial event. If neither when or delayInMinutes is set for a repeating alarm, periodInMinutes is used as the default for delayInMinutes.
+ */
+ export function create(alarmInfo: AlarmCreateInfo): void;
+ /**
+ * Creates an alarm. Near the time(s) specified by alarmInfo, the onAlarm event is fired. If there is another alarm with the same name (or no name if none is specified), it will be cancelled and replaced by this alarm.
+ * In order to reduce the load on the user's machine, Chrome limits alarms to at most once every 1 minute but may delay them an arbitrary amount more. That is, setting delayInMinutes or periodInMinutes to less than 1 will not be honored and will cause a warning. when can be set to less than 1 minute after "now" without warning but won't actually cause the alarm to fire for at least 1 minute.
+ * To help you debug your app or extension, when you've loaded it unpacked, there's no limit to how often the alarm can fire.
+ * @param name Optional name to identify this alarm. Defaults to the empty string.
+ * @param alarmInfo Describes when the alarm should fire. The initial time must be specified by either when or delayInMinutes (but not both). If periodInMinutes is set, the alarm will repeat every periodInMinutes minutes after the initial event. If neither when or delayInMinutes is set for a repeating alarm, periodInMinutes is used as the default for delayInMinutes.
+ */
+ export function create(name: string, alarmInfo: AlarmCreateInfo): void;
+ /**
+ * Gets an array of all the alarms.
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(array of Alarm alarms) {...};
+ */
+ export function getAll(callback: (alarms: Alarm[]) => void): void;
+ /**
+ * Clears all alarms.
+ * @param callback If you specify the callback parameter, it should be a function that looks like this:
+ * function(boolean wasCleared) {...};
+ */
+ export function clearAll(callback?: (wasCleared: boolean) => void): void;
+ /**
+ * Clears the alarm with the given name.
+ * @param name The name of the alarm to clear. Defaults to the empty string.
+ * @param callback If you specify the callback parameter, it should be a function that looks like this:
+ * function(boolean wasCleared) {...};
+ */
+ export function clear(name?: string, callback?: (wasCleared: boolean) => void): void;
+ /**
+ * Clears the alarm without a name.
+ * @param callback If you specify the callback parameter, it should be a function that looks like this:
+ * function(boolean wasCleared) {...};
+ */
+ export function clear(callback: (wasCleared: boolean) => void): void;
+ /**
+ * Retrieves details about the specified alarm.
+ * @param callback The callback parameter should be a function that looks like this:
+ * function( Alarm alarm) {...};
+ */
+ export function get(callback: (alarm: Alarm) => void): void;
+ /**
+ * Retrieves details about the specified alarm.
+ * @param name The name of the alarm to get. Defaults to the empty string.
+ * @param callback The callback parameter should be a function that looks like this:
+ * function( Alarm alarm) {...};
+ */
+ export function get(name: string, callback: (alarm: Alarm) => void): void;
+
+ /** Fired when an alarm has elapsed. Useful for event pages. */
+ var onAlarm: AlarmEvent;
+}
+
+/**
+ * Use the chrome.browser API to interact with the Chrome browser associated with
+ * the current application and Chrome profile.
+ */
+declare module chrome.browser {
+ interface Options {
+ /** The URL to navigate to when the new tab is initially opened. */
+ url: string;
+ }
+
+ /**
+ * Opens a new tab in a browser window associated with the current application
+ * and Chrome profile. If no browser window for the Chrome profile is opened,
+ * a new one is opened prior to creating the new tab.
+ * @param options Configures how the tab should be opened.
+ * @param callback Called when the tab was successfully
+ * created, or failed to be created. If failed, runtime.lastError will be set.
+ */
+ export function openTab(options: Options, callback: () => void): void;
+
+ /**
+ * Opens a new tab in a browser window associated with the current application
+ * and Chrome profile. If no browser window for the Chrome profile is opened,
+ * a new one is opened prior to creating the new tab. Since Chrome 42 only.
+ * @param options Configures how the tab should be opened.
+ */
+ export function openTab(options: Options): void;
+}
+
+////////////////////
+// Bookmarks
+////////////////////
+/**
+ * Use the chrome.bookmarks API to create, organize, and otherwise manipulate bookmarks. Also see Override Pages, which you can use to create a custom Bookmark Manager page.
+ * Availability: Since Chrome 5.
+ * Permissions: "bookmarks"
+ */
+declare module chrome.bookmarks {
+ /** A node (either a bookmark or a folder) in the bookmark tree. Child nodes are ordered within their parent folder. */
+ interface BookmarkTreeNode {
+ /** Optional. The 0-based position of this node within its parent folder. */
+ index?: number;
+ /** Optional. When this node was created, in milliseconds since the epoch (new Date(dateAdded)). */
+ dateAdded?: number;
+ /** The text displayed for the node. */
+ title: string;
+ /** Optional. The URL navigated to when a user clicks the bookmark. Omitted for folders. */
+ url?: string;
+ /** Optional. When the contents of this folder last changed, in milliseconds since the epoch. */
+ dateGroupModified?: number;
+ /** The unique identifier for the node. IDs are unique within the current profile, and they remain valid even after the browser is restarted. */
+ id: string;
+ /** Optional. The id of the parent folder. Omitted for the root node. */
+ parentId?: string;
+ /** Optional. An ordered list of children of this node. */
+ children?: BookmarkTreeNode[];
+ /**
+ * Optional.
+ * Since Chrome 37.
+ * Indicates the reason why this node is unmodifiable. The managed value indicates that this node was configured by the system administrator or by the custodian of a supervised user. Omitted if the node can be modified by the user and the extension (default).
+ */
+ unmodifiable?: any;
+ }
+
+ interface BookmarkRemoveInfo {
+ index: number;
+ parentId: string;
+ }
+
+ interface BookmarkMoveInfo {
+ index: number;
+ oldIndex: number;
+ parentId: string;
+ oldParentId: string;
+ }
+
+ interface BookmarkChangeInfo {
+ url?: string;
+ title: string;
+ }
+
+ interface BookmarkReorderInfo {
+ childIds: string[];
+ }
+
+ interface BookmarkRemovedEvent extends chrome.events.Event {
+ /**
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(string id, object removeInfo) {...};
+ */
+ addListener(callback: (id: string, removeInfo: BookmarkRemoveInfo) => void): void;
+ }
+
+ interface BookmarkImportEndedEvent extends chrome.events.Event {
+ /**
+ * @param callback The callback parameter should be a function that looks like this:
+ * function() {...};
+ */
+ addListener(callback: () => void): void;
+ }
+
+ interface BookmarkMovedEvent extends chrome.events.Event {
+ /**
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(string id, object moveInfo) {...};
+ */
+ addListener(callback: (id: string, moveInfo: BookmarkMoveInfo) => void): void;
+ }
+
+ interface BookmarkImportBeganEvent extends chrome.events.Event {
+ /**
+ * @param callback The callback parameter should be a function that looks like this:
+ * function() {...};
+ */
+ addListener(callback: () => void): void;
+ }
+
+ interface BookmarkChangedEvent extends chrome.events.Event {
+ /**
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(string id, object changeInfo) {...};
+ */
+ addListener(callback: (id: string, changeInfo: BookmarkChangeInfo) => void): void;
+ }
+
+ interface BookmarkCreatedEvent extends chrome.events.Event {
+ /**
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(string id, BookmarkTreeNode bookmark) {...};
+ */
+ addListener(callback: (id: string, bookmark: BookmarkTreeNode) => void): void;
+ }
+
+ interface BookmarkChildrenReordered extends chrome.events.Event {
+ /**
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(string id, object reorderInfo) {...};
+ */
+ addListener(callback: (id: string, reorderInfo: BookmarkReorderInfo) => void): void;
+ }
+
+ interface BookmarkSearchQuery {
+ query?: string;
+ url?: string;
+ title?: string;
+ }
+
+ interface BookmarkCreateArg {
+ /** Optional. Defaults to the Other Bookmarks folder. */
+ parentId?: string;
+ index?: number;
+ title?: string;
+ url?: string;
+ }
+
+ interface BookmarkDestinationArg {
+ parentId?: string;
+ index?: number;
+ }
+
+ interface BookmarkChangesArg {
+ title?: string;
+ url?: string;
+ }
+
+ /** @deprecated since Chrome 38. Bookmark write operations are no longer limited by Chrome. */
+ var MAX_WRITE_OPERATIONS_PER_HOUR: number;
+ /** @deprecated since Chrome 38. Bookmark write operations are no longer limited by Chrome. */
+ var MAX_SUSTAINED_WRITE_OPERATIONS_PER_MINUTE: number;
+
+ /**
+ * Searches for BookmarkTreeNodes matching the given query. Queries specified with an object produce BookmarkTreeNodes matching all specified properties.
+ * @param query A string of words and quoted phrases that are matched against bookmark URLs and titles.
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(array of BookmarkTreeNode results) {...};
+ */
+ export function search(query: string, callback: (results: BookmarkTreeNode[]) => void): void;
+ /**
+ * Searches for BookmarkTreeNodes matching the given query. Queries specified with an object produce BookmarkTreeNodes matching all specified properties.
+ * @param query An object with one or more of the properties query, url, and title specified. Bookmarks matching all specified properties will be produced.
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(array of BookmarkTreeNode results) {...};
+ */
+ export function search(query: BookmarkSearchQuery, callback: (results: BookmarkTreeNode[]) => void): void;
+ /**
+ * Retrieves the entire Bookmarks hierarchy.
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(array of BookmarkTreeNode results) {...};
+ */
+ export function getTree(callback: (results: BookmarkTreeNode[]) => void): void;
+ /**
+ * Retrieves the recently added bookmarks.
+ * @param numberOfItems The maximum number of items to return.
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(array of BookmarkTreeNode results) {...};
+ */
+ export function getRecent(numberOfItems: number, callback: (results: BookmarkTreeNode[]) => void): void;
+ /**
+ * Retrieves the specified BookmarkTreeNode.
+ * @param id A single string-valued id
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(array of BookmarkTreeNode results) {...};
+ */
+ export function get(id: string, callback: (results: BookmarkTreeNode[]) => void): void;
+ /**
+ * Retrieves the specified BookmarkTreeNode.
+ * @param idList An array of string-valued ids
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(array of BookmarkTreeNode results) {...};
+ */
+ export function get(idList: string[], callback: (results: BookmarkTreeNode[]) => void): void;
+ /**
+ * Creates a bookmark or folder under the specified parentId. If url is NULL or missing, it will be a folder.
+ * @param callback If you specify the callback parameter, it should be a function that looks like this:
+ * function( BookmarkTreeNode result) {...};
+ */
+ export function create(bookmark: BookmarkCreateArg, callback?: (result: BookmarkTreeNode) => void): void;
+ /**
+ * Moves the specified BookmarkTreeNode to the provided location.
+ * @param callback If you specify the callback parameter, it should be a function that looks like this:
+ * function( BookmarkTreeNode result) {...};
+ */
+ export function move(id: string, destination: BookmarkDestinationArg, callback?: (result: BookmarkTreeNode) => void): void;
+ /**
+ * Updates the properties of a bookmark or folder. Specify only the properties that you want to change; unspecified properties will be left unchanged. Note: Currently, only 'title' and 'url' are supported.
+ * @param callback If you specify the callback parameter, it should be a function that looks like this:
+ * function( BookmarkTreeNode result) {...};
+ */
+ export function update(id: string, changes: BookmarkChangesArg, callback?: (result: BookmarkTreeNode) => void): void;
+ /**
+ * Removes a bookmark or an empty bookmark folder.
+ * @param callback If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
+ */
+ export function remove(id: string, callback?: Function): void;
+ /**
+ * Retrieves the children of the specified BookmarkTreeNode id.
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(array of BookmarkTreeNode results) {...};
+ */
+ export function getChildren(id: string, callback: (results: BookmarkTreeNode[]) => void): void;
+ /**
+ * Since Chrome 14.
+ * Retrieves part of the Bookmarks hierarchy, starting at the specified node.
+ * @param id The ID of the root of the subtree to retrieve.
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(array of BookmarkTreeNode results) {...};
+ */
+ export function getSubTree(id: string, callback: (results: BookmarkTreeNode[]) => void): void;
+ /**
+ * Recursively removes a bookmark folder.
+ * @param callback If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
+ */
+ export function removeTree(id: string, callback?: Function): void;
+
+ /** Fired when a bookmark or folder is removed. When a folder is removed recursively, a single notification is fired for the folder, and none for its contents. */
+ var onRemoved: BookmarkRemovedEvent;
+ /** Fired when a bookmark import session is ended. */
+ var onImportEnded: BookmarkImportEndedEvent;
+ /** Fired when a bookmark import session is begun. Expensive observers should ignore onCreated updates until onImportEnded is fired. Observers should still handle other notifications immediately. */
+ var onImportBegan: BookmarkImportBeganEvent;
+ /** Fired when a bookmark or folder changes. Note: Currently, only title and url changes trigger this. */
+ var onChanged: BookmarkChangedEvent;
+ /** Fired when a bookmark or folder is moved to a different parent folder. */
+ var onMoved: BookmarkMovedEvent;
+ /** Fired when a bookmark or folder is created. */
+ var onCreated: BookmarkCreatedEvent;
+ /** Fired when the children of a folder have changed their order due to the order being sorted in the UI. This is not called as a result of a move(). */
+ var onChildrenReordered: BookmarkChildrenReordered;
+}
+
+////////////////////
+// Browser Action
+////////////////////
+/**
+ * Use browser actions to put icons in the main Google Chrome toolbar, to the right of the address bar. In addition to its icon, a browser action can also have a tooltip, a badge, and a popup.
+ * Availability: Since Chrome 5.
+ * Manifest: "browser_action": {...}
+ */
+declare module chrome.browserAction {
+ interface BadgeBackgroundColorDetails {
+ /** An array of four integers in the range [0,255] that make up the RGBA color of the badge. For example, opaque red is [255, 0, 0, 255]. Can also be a string with a CSS value, with opaque red being #FF0000 or #F00. */
+ color: any;
+ /** Optional. Limits the change to when a particular tab is selected. Automatically resets when the tab is closed. */
+ tabId?: number;
+ }
+
+ interface BadgeTextDetails {
+ /** Any number of characters can be passed, but only about four can fit in the space. */
+ text: string;
+ /** Optional. Limits the change to when a particular tab is selected. Automatically resets when the tab is closed. */
+ tabId?: number;
+ }
+
+ interface TitleDetails {
+ /** The string the browser action should display when moused over. */
+ title: string;
+ /** Optional. Limits the change to when a particular tab is selected. Automatically resets when the tab is closed. */
+ tabId?: number;
+ }
+
+ interface TabDetails {
+ /** Optional. Specify the tab to get the information. If no tab is specified, the non-tab-specific information is returned. */
+ tabId?: number;
+ }
+
+ interface TabIconDetails {
+ /** Optional. Either a relative image path or a dictionary {size -> relative image path} pointing to icon to be set. If the icon is specified as a dictionary, the actual image to be used is chosen depending on screen's pixel density. If the number of image pixels that fit into one screen space unit equals scale, then image with size scale * 19 will be selected. Initially only scales 1 and 2 will be supported. At least one image must be specified. Note that 'details.path = foo' is equivalent to 'details.imageData = {'19': foo}' */
+ path?: any;
+ /** Optional. Limits the change to when a particular tab is selected. Automatically resets when the tab is closed. */
+ tabId?: number;
+ /** Optional. Either an ImageData object or a dictionary {size -> ImageData} representing icon to be set. If the icon is specified as a dictionary, the actual image to be used is chosen depending on screen's pixel density. If the number of image pixels that fit into one screen space unit equals scale, then image with size scale * 19 will be selected. Initially only scales 1 and 2 will be supported. At least one image must be specified. Note that 'details.imageData = foo' is equivalent to 'details.imageData = {'19': foo}' */
+ imageData?: ImageData;
+ }
+
+ interface PopupDetails {
+ /** Optional. Limits the change to when a particular tab is selected. Automatically resets when the tab is closed. */
+ tabId?: number;
+ /** The html file to show in a popup. If set to the empty string (''), no popup is shown. */
+ popup: string;
+ }
+
+ interface BrowserClickedEvent extends chrome.events.Event {
+ /**
+ * @param callback The callback parameter should be a function that looks like this:
+ * function( tabs.Tab tab) {...};
+ */
+ addListener(callback: (tab: chrome.tabs.Tab) => void): void;
+ }
+
+ /**
+ * Since Chrome 22.
+ * Enables the browser action for a tab. By default, browser actions are enabled.
+ * @param tabId The id of the tab for which you want to modify the browser action.
+ */
+ export function enable(tabId?: number): void;
+ /** Sets the background color for the badge. */
+ export function setBadgeBackgroundColor(details: BadgeBackgroundColorDetails): void;
+ /** Sets the badge text for the browser action. The badge is displayed on top of the icon. */
+ export function setBadgeText(details: BadgeTextDetails): void;
+ /** Sets the title of the browser action. This shows up in the tooltip. */
+ export function setTitle(details: TitleDetails): void;
+ /**
+ * Since Chrome 19.
+ * Gets the badge text of the browser action. If no tab is specified, the non-tab-specific badge text is returned.
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(string result) {...};
+ */
+ export function getBadgeText(details: TabDetails, callback: (result: string) => void): void;
+ /** Sets the html document to be opened as a popup when the user clicks on the browser action's icon. */
+ export function setPopup(details: PopupDetails): void;
+ /**
+ * Since Chrome 22.
+ * Disables the browser action for a tab.
+ * @param tabId The id of the tab for which you want to modify the browser action.
+ */
+ export function disable(tabId?: number): void;
+ /**
+ * Since Chrome 19.
+ * Gets the title of the browser action.
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(string result) {...};
+ */
+ export function getTitle(details: TabDetails, callback: (result: string) => void): void;
+ /**
+ * Since Chrome 19.
+ * Gets the background color of the browser action.
+ * @param callback The callback parameter should be a function that looks like this:
+ * function( ColorArray result) {...};
+ */
+ export function getBadgeBackgroundColor(details: TabDetails, callback: (result: number[]) => void): void;
+ /**
+ * Since Chrome 19.
+ * Gets the html document set as the popup for this browser action.
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(string result) {...};
+ */
+ export function getPopup(details: TabDetails, callback: (result: string) => void): void;
+ /**
+ * Sets the icon for the browser action. The icon can be specified either as the path to an image file or as the pixel data from a canvas element, or as dictionary of either one of those. Either the path or the imageData property must be specified.
+ * @param callback If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
+ */
+ export function setIcon(details: TabIconDetails, callback?: Function): void;
+
+ /** Fired when a browser action icon is clicked. This event will not fire if the browser action has a popup. */
+ var onClicked: BrowserClickedEvent;
+}
+
+////////////////////
+// Browsing Data
+////////////////////
+/**
+ * Use the chrome.browsingData API to remove browsing data from a user's local profile.
+ * Availability: Since Chrome 19.
+ * Permissions: "browsingData"
+ */
+declare module chrome.browsingData {
+ interface OriginTypes {
+ /** Optional. Websites that have been installed as hosted applications (be careful!). */
+ protectedWeb?: boolean;
+ /** Optional. Extensions and packaged applications a user has installed (be _really_ careful!). */
+ extension?: boolean;
+ /** Optional. Normal websites. */
+ unprotectedWeb?: boolean;
+ }
+
+ /** Options that determine exactly what data will be removed. */
+ interface RemovalOptions {
+ /**
+ * Optional.
+ * Since Chrome 21.
+ * An object whose properties specify which origin types ought to be cleared. If this object isn't specified, it defaults to clearing only "unprotected" origins. Please ensure that you really want to remove application data before adding 'protectedWeb' or 'extensions'.
+ */
+ originTypes?: OriginTypes;
+ /** Optional. Remove data accumulated on or after this date, represented in milliseconds since the epoch (accessible via the getTime method of the JavaScript Date object). If absent, defaults to 0 (which would remove all browsing data). */
+ since?: number;
+ }
+
+ /**
+ * Since Chrome 27.
+ * A set of data types. Missing data types are interpreted as false.
+ */
+ interface DataTypeSet {
+ /** Optional. Websites' WebSQL data. */
+ webSQL?: boolean;
+ /** Optional. Websites' IndexedDB data. */
+ indexedDB?: boolean;
+ /** Optional. The browser's cookies. */
+ cookies?: boolean;
+ /** Optional. Stored passwords. */
+ passwords?: boolean;
+ /** Optional. Server-bound certificates. */
+ serverBoundCertificates?: boolean;
+ /** Optional. The browser's download list. */
+ downloads?: boolean;
+ /** Optional. The browser's cache. Note: when removing data, this clears the entire cache: it is not limited to the range you specify. */
+ cache?: boolean;
+ /** Optional. Websites' appcaches. */
+ appcache?: boolean;
+ /** Optional. Websites' file systems. */
+ fileSystems?: boolean;
+ /** Optional. Plugins' data. */
+ pluginData?: boolean;
+ /** Optional. Websites' local storage data. */
+ localStorage?: boolean;
+ /** Optional. The browser's stored form data. */
+ formData?: boolean;
+ /** Optional. The browser's history. */
+ history?: boolean;
+ /**
+ * Optional.
+ * Since Chrome 39.
+ * Service Workers.
+ */
+ serviceWorkers?: boolean;
+ }
+
+ interface SettingsCallback {
+ options: RemovalOptions;
+ /** All of the types will be present in the result, with values of true if they are both selected to be removed and permitted to be removed, otherwise false. */
+ dataToRemove: DataTypeSet;
+ /** All of the types will be present in the result, with values of true if they are permitted to be removed (e.g., by enterprise policy) and false if not. */
+ dataRemovalPermitted: DataTypeSet;
+ }
+
+ /**
+ * Since Chrome 26.
+ * Reports which types of data are currently selected in the 'Clear browsing data' settings UI. Note: some of the data types included in this API are not available in the settings UI, and some UI settings control more than one data type listed here.
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(object result) {...};
+ */
+ export function settings(callback: (result: SettingsCallback) => void): void;
+ /**
+ * Clears plugins' data.
+ * @param callback Called when plugins' data has been cleared.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
+ */
+ export function removePluginData(options: RemovalOptions, callback?: () => void): void;
+ /**
+ * Clears the browser's stored form data (autofill).
+ * @param callback Called when the browser's form data has been cleared.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
+ */
+ export function removeFormData(options: RemovalOptions, callback?: () => void): void;
+ /**
+ * Clears websites' file system data.
+ * @param callback Called when websites' file systems have been cleared.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
+ */
+ export function removeFileSystems(options: RemovalOptions, callback?: () => void): void;
+ /**
+ * Clears various types of browsing data stored in a user's profile.
+ * @param dataToRemove The set of data types to remove.
+ * @param callback Called when deletion has completed.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
+ */
+ export function remove(options: RemovalOptions, dataToRemove: DataTypeSet, callback?: () => void): void;
+ /**
+ * Clears the browser's stored passwords.
+ * @param callback Called when the browser's passwords have been cleared.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
+ */
+ export function removePasswords(options: RemovalOptions, callback?: () => void): void;
+ /**
+ * Clears the browser's cookies and server-bound certificates modified within a particular timeframe.
+ * @param callback Called when the browser's cookies and server-bound certificates have been cleared.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
+ */
+ export function removeCookies(options: RemovalOptions, callback?: () => void): void;
+ /**
+ * Clears websites' WebSQL data.
+ * @param callback Called when websites' WebSQL databases have been cleared.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
+ */
+ export function removeWebSQL(options: RemovalOptions, callback?: () => void): void;
+ /**
+ * Clears websites' appcache data.
+ * @param callback Called when websites' appcache data has been cleared.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
+ */
+ export function removeAppcache(options: RemovalOptions, callback?: () => void): void;
+ /**
+ * Clears the browser's list of downloaded files (not the downloaded files themselves).
+ * @param callback Called when the browser's list of downloaded files has been cleared.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
+ */
+ export function removeDownloads(options: RemovalOptions, callback?: () => void): void;
+ /**
+ * Clears websites' local storage data.
+ * @param callback Called when websites' local storage has been cleared.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
+ */
+ export function removeLocalStorage(options: RemovalOptions, callback?: () => void): void;
+ /**
+ * Clears the browser's cache.
+ * @param callback Called when the browser's cache has been cleared.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
+ */
+ export function removeCache(options: RemovalOptions, callback?: () => void): void;
+ /**
+ * Clears the browser's history.
+ * @param callback Called when the browser's history has cleared.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
+ */
+ export function removeHistory(options: RemovalOptions, callback?: () => void): void;
+ /**
+ * Clears websites' IndexedDB data.
+ * @param callback Called when websites' IndexedDB data has been cleared.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
+ */
+ export function removeIndexedDB(options: RemovalOptions, callback?: () => void): void;
+}
+
+////////////////////
+// Commands
+////////////////////
+/**
+ * Use the commands API to add keyboard shortcuts that trigger actions in your extension, for example, an action to open the browser action or send a command to the extension.
+ * Availability: Since Chrome 25.
+ * Manifest: "commands": {...}
+ */
+declare module chrome.commands {
+ interface Command {
+ /** Optional. The name of the Extension Command */
+ name?: string;
+ /** Optional. The Extension Command description */
+ description?: string;
+ /** Optional. The shortcut active for this command, or blank if not active. */
+ shortcut?: string;
+ }
+
+ interface CommandEvent extends chrome.events.Event {
+ /**
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(string command) {...};
+ */
+ addListener(callback: (command: string) => void): void;
+ }
+
+ /**
+ * Returns all the registered extension commands for this extension and their shortcut (if active).
+ * @param callback Called to return the registered commands.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function(array of Command commands) {...};
+ */
+ export function getAll(callback: (commands: Command[]) => void): void;
+
+ /** Fired when a registered command is activated using a keyboard shortcut. */
+ var onCommand: CommandEvent;
+}
+
+////////////////////
+// Content Settings
+////////////////////
+/**
+ * Use the chrome.contentSettings API to change settings that control whether websites can use features such as cookies, JavaScript, and plugins. More generally speaking, content settings allow you to customize Chrome's behavior on a per-site basis instead of globally.
+ * Availability: Since Chrome 16.
+ * Permissions: "contentSettings"
+ */
+declare module chrome.contentSettings {
+ interface ClearDetails {
+ /**
+ * Optional.
+ * Where to clear the setting (default: regular).
+ * The scope of the ContentSetting. One of
+ * * regular: setting for regular profile (which is inherited by the incognito profile if not overridden elsewhere),
+ * * incognito_session_only: setting for incognito profile that can only be set during an incognito session and is deleted when the incognito session ends (overrides regular settings).
+ */
+ scope?: string;
+ }
+
+ interface SetDetails {
+ /** Optional. The resource identifier for the content type. */
+ resourceIdentifier?: ResourceIdentifier;
+ /** The setting applied by this rule. See the description of the individual ContentSetting objects for the possible values. */
+ setting: any;
+ /** Optional. The pattern for the secondary URL. Defaults to matching all URLs. For details on the format of a pattern, see Content Setting Patterns. */
+ secondaryPattern?: string;
+ /** Optional. Where to set the setting (default: regular). */
+ scope?: string;
+ /** The pattern for the primary URL. For details on the format of a pattern, see Content Setting Patterns. */
+ primaryPattern: string;
+ }
+
+ interface GetDetails {
+ /** Optional. The secondary URL for which the content setting should be retrieved. Defaults to the primary URL. Note that the meaning of a secondary URL depends on the content type, and not all content types use secondary URLs. */
+ secondaryUrl?: string;
+ /** Optional. A more specific identifier of the type of content for which the settings should be retrieved. */
+ resourceIdentifier?: ResourceIdentifier;
+ /** Optional. Whether to check the content settings for an incognito session. (default false) */
+ incognito?: boolean;
+ /** The primary URL for which the content setting should be retrieved. Note that the meaning of a primary URL depends on the content type. */
+ primaryUrl: string;
+ }
+
+ interface ReturnedDetails {
+ /** The content setting. See the description of the individual ContentSetting objects for the possible values. */
+ setting: any;
+ }
+
+ interface ContentSetting {
+ /**
+ * Clear all content setting rules set by this extension.
+ * @param callback If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
+ */
+ clear(details: ClearDetails, callback?: () => void): void;
+ /**
+ * Applies a new content setting rule.
+ * @param callback If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
+ */
+ set(details: SetDetails, callback?: () => void): void;
+ /**
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(array of ResourceIdentifier resourceIdentifiers) {...};
+ * Parameter resourceIdentifiers: A list of resource identifiers for this content type, or undefined if this content type does not use resource identifiers.
+ */
+ getResourceIdentifiers(callback: (resourceIdentifiers?: ResourceIdentifier[]) => void): void;
+ /**
+ * Gets the current content setting for a given pair of URLs.
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(object details) {...};
+ */
+ get(details: GetDetails, callback: (details: ReturnedDetails) => void): void;
+ }
+
+ /** The only content type using resource identifiers is contentSettings.plugins. For more information, see Resource Identifiers. */
+ interface ResourceIdentifier {
+ /** The resource identifier for the given content type. */
+ id: string;
+ /** Optional. A human readable description of the resource. */
+ description?: string;
+ }
+
+ /**
+ * Whether to allow cookies and other local data to be set by websites. One of
+ * allow: Accept cookies,
+ * block: Block cookies,
+ * session_only: Accept cookies only for the current session.
+ * Default is allow.
+ * The primary URL is the URL representing the cookie origin. The secondary URL is the URL of the top-level frame.
+ */
+ var cookies: ContentSetting;
+ /**
+ * Whether to allow sites to show pop-ups. One of
+ * allow: Allow sites to show pop-ups,
+ * block: Don't allow sites to show pop-ups.
+ * Default is block.
+ * The primary URL is the URL of the top-level frame. The secondary URL is not used.
+ */
+ var popups: ContentSetting;
+ /**
+ * Whether to run JavaScript. One of
+ * allow: Run JavaScript,
+ * block: Don't run JavaScript.
+ * Default is allow.
+ * The primary URL is the URL of the top-level frame. The secondary URL is not used.
+ */
+ var javascript: ContentSetting;
+ /**
+ * Whether to allow sites to show desktop notifications. One of
+ * allow: Allow sites to show desktop notifications,
+ * block: Don't allow sites to show desktop notifications,
+ * ask: Ask when a site wants to show desktop notifications.
+ * Default is ask.
+ * The primary URL is the URL of the document which wants to show the notification. The secondary URL is not used.
+ */
+ var notifications: ContentSetting;
+ /**
+ * Whether to run plugins. One of
+ * allow: Run plugins automatically,
+ * block: Don't run plugins automatically,
+ * detect_important_content: Only run automatically those plugins that are detected as the website's main content.
+ * Default is allow.
+ * The primary URL is the URL of the top-level frame. The secondary URL is not used.
+ */
+ var plugins: ContentSetting;
+ /**
+ * Whether to show images. One of
+ * allow: Show images,
+ * block: Don't show images.
+ * Default is allow.
+ * The primary URL is the URL of the top-level frame. The secondary URL is the URL of the image.
+ */
+ var images: ContentSetting;
+ /**
+ * Since Chrome 42.
+ * Whether to allow Geolocation. One of
+ * allow: Allow sites to track your physical location,
+ * block: Don't allow sites to track your physical location,
+ * ask: Ask before allowing sites to track your physical location.
+ * Default is ask.
+ * The primary URL is the URL of the document which requested location data. The secondary URL is the URL of the top-level frame (which may or may not differ from the requesting URL).
+ */
+ var location: ContentSetting;
+ /**
+ * Since Chrome 42.
+ * Whether to allow sites to toggle the fullscreen mode. One of
+ * allow: Allow sites to toggle the fullscreen mode,
+ * ask: Ask when a site wants to toggle the fullscreen mode.
+ * Default is ask.
+ * The primary URL is the URL of the document which requested to toggle the fullscreen mode. The secondary URL is the URL of the top-level frame (which may or may not differ from the requesting URL).
+ */
+ var fullscreen: ContentSetting;
+ /**
+ * Since Chrome 42.
+ * Whether to allow sites to disable the mouse cursor. One of
+ * allow: Allow sites to disable the mouse cursor,
+ * block: Don't allow sites to disable the mouse cursor,
+ * ask: Ask when a site wants to disable the mouse cursor.
+ * Default is ask.
+ * The primary URL is the URL of the top-level frame. The secondary URL is not used.
+ */
+ var mouselock: ContentSetting;
+ /**
+ * Since Chrome 42.
+ * Whether to allow sites to run plugins unsandboxed. One of
+ * allow: Allow sites to run plugins unsandboxed,
+ * block: Don't allow sites to run plugins unsandboxed,
+ * ask: Ask when a site wants to run a plugin unsandboxed.
+ * Default is ask.
+ * The primary URL is the URL of the top-level frame. The secondary URL is not used.
+ */
+ var unsandboxedPlugins: ContentSetting;
+ /**
+ * Since Chrome 42.
+ * Whether to allow sites to download multiple files automatically. One of
+ * allow: Allow sites to download multiple files automatically,
+ * block: Don't allow sites to download multiple files automatically,
+ * ask: Ask when a site wants to download files automatically after the first file.
+ * Default is ask.
+ * The primary URL is the URL of the top-level frame. The secondary URL is not used.
+ */
+ var automaticDownloads: ContentSetting;
+}
+
+////////////////////
+// Context Menus
+////////////////////
+/**
+ * Use the chrome.contextMenus API to add items to Google Chrome's context menu. You can choose what types of objects your context menu additions apply to, such as images, hyperlinks, and pages.
+ * Availability: Since Chrome 6.
+ * Permissions: "contextMenus"
+ */
+declare module chrome.contextMenus {
+ interface OnClickData {
+ /**
+ * Optional.
+ * Since Chrome 35.
+ * The text for the context selection, if any.
+ */
+ selectionText?: string;
+ /**
+ * Optional.
+ * Since Chrome 35.
+ * A flag indicating the state of a checkbox or radio item after it is clicked.
+ */
+ checked?: boolean;
+ /**
+ * Since Chrome 35.
+ * The ID of the menu item that was clicked.
+ */
+ menuItemId: any;
+ /**
+ * Optional.
+ * Since Chrome 35.
+ * The URL of the frame of the element where the context menu was clicked, if it was in a frame.
+ */
+ frameUrl?: string;
+ /**
+ * Since Chrome 35.
+ * A flag indicating whether the element is editable (text input, textarea, etc.).
+ */
+ editable: boolean;
+ /**
+ * Optional.
+ * Since Chrome 35.
+ * One of 'image', 'video', or 'audio' if the context menu was activated on one of these types of elements.
+ */
+ mediaType?: string;
+ /**
+ * Optional.
+ * Since Chrome 35.
+ * A flag indicating the state of a checkbox or radio item before it was clicked.
+ */
+ wasChecked?: boolean;
+ /**
+ * Since Chrome 35.
+ * The URL of the page where the menu item was clicked. This property is not set if the click occured in a context where there is no current page, such as in a launcher context menu.
+ */
+ pageUrl: string;
+ /**
+ * Optional.
+ * Since Chrome 35.
+ * If the element is a link, the URL it points to.
+ */
+ linkUrl?: string;
+ /**
+ * Optional.
+ * Since Chrome 35.
+ * The parent ID, if any, for the item clicked.
+ */
+ parentMenuItemId?: any;
+ /**
+ * Optional.
+ * Since Chrome 35.
+ * Will be present for elements with a 'src' URL.
+ */
+ srcUrl?: string;
+ }
+
+ interface CreateProperties {
+ /** Optional. Lets you restrict the item to apply only to documents whose URL matches one of the given patterns. (This applies to frames as well.) For details on the format of a pattern, see Match Patterns. */
+ documentUrlPatterns?: string[];
+ /** Optional. The initial state of a checkbox or radio item: true for selected and false for unselected. Only one radio item can be selected at a time in a given group of radio items. */
+ checked?: boolean;
+ /** Optional. The text to be displayed in the item; this is required unless type is 'separator'. When the context is 'selection', you can use %s within the string to show the selected text. For example, if this parameter's value is "Translate '%s' to Pig Latin" and the user selects the word "cool", the context menu item for the selection is "Translate 'cool' to Pig Latin". */
+ title?: string;
+ /** Optional. List of contexts this menu item will appear in. Defaults to ['page'] if not specified. */
+ contexts?: string[];
+ /**
+ * Optional.
+ * Since Chrome 20.
+ * Whether this context menu item is enabled or disabled. Defaults to true.
+ */
+ enabled?: boolean;
+ /** Optional. Similar to documentUrlPatterns, but lets you filter based on the src attribute of img/audio/video tags and the href of anchor tags. */
+ targetUrlPatterns?: string[];
+ /**
+ * Optional.
+ * A function that will be called back when the menu item is clicked. Event pages cannot use this; instead, they should register a listener for chrome.contextMenus.onClicked.
+ * @param info Information sent when a context menu item is clicked.
+ * @param tab The details of the tab where the click took place. Note: this parameter only present for extensions.
+ */
+ onclick?: (info: OnClickData, tab: chrome.tabs.Tab) => void;
+ /** Optional. The ID of a parent menu item; this makes the item a child of a previously added item. */
+ parentId?: any;
+ /** Optional. The type of menu item. Defaults to 'normal' if not specified. */
+ type?: string;
+ /**
+ * Optional.
+ * Since Chrome 21.
+ * The unique ID to assign to this item. Mandatory for event pages. Cannot be the same as another ID for this extension.
+ */
+ id?: string;
+ }
+
+ interface UpdateProperties {
+ documentUrlPatterns?: string[];
+ checked?: boolean;
+ title?: string;
+ contexts?: string[];
+ /** Optional. Since Chrome 20. */
+ enabled?: boolean;
+ targetUrlPatterns?: string[];
+ onclick?: Function;
+ /** Optional. Note: You cannot change an item to be a child of one of its own descendants. */
+ parentId?: any;
+ type?: string;
+ }
+
+ interface MenuClickedEvent extends chrome.events.Event {
+ /**
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(object info, tabs.Tab tab) {...};
+ * Parameter info: Information sent when a context menu item is clicked.
+ * Parameter tab: The details of the tab where the click took place. If the click did not take place in a tab, this parameter will be missing.
+ */
+ addListener(callback: (info: OnClickData, tab?: chrome.tabs.Tab) => void): void;
+ }
+
+ /**
+ * Since Chrome 38.
+ * The maximum number of top level extension items that can be added to an extension action context menu. Any items beyond this limit will be ignored.
+ */
+ var ACTION_MENU_TOP_LEVEL_LIMIT: number;
+
+ /**
+ * Removes all context menu items added by this extension.
+ * @param callback Called when removal is complete.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
+ */
+ export function removeAll(callback?: () => void): void;
+ /**
+ * Creates a new context menu item. Note that if an error occurs during creation, you may not find out until the creation callback fires (the details will be in chrome.runtime.lastError).
+ * @param callback Called when the item has been created in the browser. If there were any problems creating the item, details will be available in chrome.runtime.lastError.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
+ */
+ export function create(createProperties: CreateProperties, callback?: () => void): void;
+ /**
+ * Updates a previously created context menu item.
+ * @param id The ID of the item to update.
+ * @param updateProperties The properties to update. Accepts the same values as the create function.
+ * @param callback Called when the context menu has been updated.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
+ */
+ export function update(id: string, updateProperties: UpdateProperties, callback?: () => void): void;
+ /**
+ * Updates a previously created context menu item.
+ * @param id The ID of the item to update.
+ * @param updateProperties The properties to update. Accepts the same values as the create function.
+ * @param callback Called when the context menu has been updated.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
+ */
+ export function update(id: number, updateProperties: UpdateProperties, callback?: () => void): void;
+ /**
+ * Removes a context menu item.
+ * @param menuItemId The ID of the context menu item to remove.
+ * @param callback Called when the context menu has been removed.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
+ */
+ export function remove(menuItemId: string, callback?: () => void): void;
+ /**
+ * Removes a context menu item.
+ * @param menuItemId The ID of the context menu item to remove.
+ * @param callback Called when the context menu has been removed.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
+ */
+ export function remove(menuItemId: number, callback?: () => void): void;
+
+ /**
+ * Since Chrome 21.
+ * Fired when a context menu item is clicked.
+ */
+ var onClicked: MenuClickedEvent;
+}
+
+////////////////////
+// Cookies
+////////////////////
+/**
+ * Use the chrome.cookies API to query and modify cookies, and to be notified when they change.
+ * Availability: Since Chrome 6.
+ * Permissions: "cookies", host permissions
+ */
+declare module chrome.cookies {
+ /** Represents information about an HTTP cookie. */
+ interface Cookie {
+ /** The domain of the cookie (e.g. "www.google.com", "example.com"). */
+ domain: string;
+ /** The name of the cookie. */
+ name: string;
+ /** The ID of the cookie store containing this cookie, as provided in getAllCookieStores(). */
+ storeId: string;
+ /** The value of the cookie. */
+ value: string;
+ /** True if the cookie is a session cookie, as opposed to a persistent cookie with an expiration date. */
+ session: boolean;
+ /** True if the cookie is a host-only cookie (i.e. a request's host must exactly match the domain of the cookie). */
+ hostOnly: boolean;
+ /** Optional. The expiration date of the cookie as the number of seconds since the UNIX epoch. Not provided for session cookies. */
+ expirationDate?: number;
+ /** The path of the cookie. */
+ path: string;
+ /** True if the cookie is marked as HttpOnly (i.e. the cookie is inaccessible to client-side scripts). */
+ httpOnly: boolean;
+ /** True if the cookie is marked as Secure (i.e. its scope is limited to secure channels, typically HTTPS). */
+ secure: boolean;
+ }
+
+ /** Represents a cookie store in the browser. An incognito mode window, for instance, uses a separate cookie store from a non-incognito window. */
+ interface CookieStore {
+ /** The unique identifier for the cookie store. */
+ id: string;
+ /** Identifiers of all the browser tabs that share this cookie store. */
+ tabIds: number[];
+ }
+
+ interface GetAllDetails {
+ /** Optional. Restricts the retrieved cookies to those whose domains match or are subdomains of this one. */
+ domain?: string;
+ /** Optional. Filters the cookies by name. */
+ name?: string;
+ /** Optional. Restricts the retrieved cookies to those that would match the given URL. */
+ url?: string;
+ /** Optional. The cookie store to retrieve cookies from. If omitted, the current execution context's cookie store will be used. */
+ storeId?: string;
+ /** Optional. Filters out session vs. persistent cookies. */
+ session?: boolean;
+ /** Optional. Restricts the retrieved cookies to those whose path exactly matches this string. */
+ path?: string;
+ /** Optional. Filters the cookies by their Secure property. */
+ secure?: boolean;
+ }
+
+ interface SetDetails {
+ /** Optional. The domain of the cookie. If omitted, the cookie becomes a host-only cookie. */
+ domain?: string;
+ /** Optional. The name of the cookie. Empty by default if omitted. */
+ name?: string;
+ /** The request-URI to associate with the setting of the cookie. This value can affect the default domain and path values of the created cookie. If host permissions for this URL are not specified in the manifest file, the API call will fail. */
+ url: string;
+ /** Optional. The ID of the cookie store in which to set the cookie. By default, the cookie is set in the current execution context's cookie store. */
+ storeId?: string;
+ /** Optional. The value of the cookie. Empty by default if omitted. */
+ value?: string;
+ /** Optional. The expiration date of the cookie as the number of seconds since the UNIX epoch. If omitted, the cookie becomes a session cookie. */
+ expirationDate?: number;
+ /** Optional. The path of the cookie. Defaults to the path portion of the url parameter. */
+ path?: string;
+ /** Optional. Whether the cookie should be marked as HttpOnly. Defaults to false. */
+ httpOnly?: boolean;
+ /** Optional. Whether the cookie should be marked as Secure. Defaults to false. */
+ secure?: boolean;
+ }
+
+ interface Details {
+ name: string;
+ url: string;
+ storeId?: string;
+ }
+
+ interface CookieChangeInfo {
+ /** Information about the cookie that was set or removed. */
+ cookie: Cookie;
+ /** True if a cookie was removed. */
+ removed: boolean;
+ /**
+ * Since Chrome 12.
+ * The underlying reason behind the cookie's change.
+ */
+ cause: string;
+ }
+
+ interface CookieChangedEvent extends chrome.events.Event {
+ /**
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(object changeInfo) {...};
+ */
+ addListener(callback: (changeInfo: CookieChangeInfo) => void): void;
+ }
+
+ /**
+ * Lists all existing cookie stores.
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(array of CookieStore cookieStores) {...};
+ * Parameter cookieStores: All the existing cookie stores.
+ */
+ export function getAllCookieStores(callback: (cookieStores: CookieStore[]) => void): void;
+ /**
+ * Retrieves all cookies from a single cookie store that match the given information. The cookies returned will be sorted, with those with the longest path first. If multiple cookies have the same path length, those with the earliest creation time will be first.
+ * @param details Information to filter the cookies being retrieved.
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(array of Cookie cookies) {...};
+ * Parameter cookies: All the existing, unexpired cookies that match the given cookie info.
+ */
+ export function getAll(details: GetAllDetails, callback: (cookies: Cookie[]) => void): void;
+ /**
+ * Sets a cookie with the given cookie data; may overwrite equivalent cookies if they exist.
+ * @param details Details about the cookie being set.
+ * @param callback If you specify the callback parameter, it should be a function that looks like this:
+ * function( Cookie cookie) {...};
+ * Optional parameter cookie: Contains details about the cookie that's been set. If setting failed for any reason, this will be "null", and "chrome.runtime.lastError" will be set.
+ */
+ export function set(details: SetDetails, callback?: (cookie?: Cookie) => void): void;
+ /**
+ * Deletes a cookie by name.
+ * @param details Information to identify the cookie to remove.
+ * @param callback If you specify the callback parameter, it should be a function that looks like this:
+ * function(object details) {...};
+ */
+ export function remove(details: Details, callback?: (details: Details) => void): void;
+ /**
+ * Retrieves information about a single cookie. If more than one cookie of the same name exists for the given URL, the one with the longest path will be returned. For cookies with the same path length, the cookie with the earliest creation time will be returned.
+ * @param details Details to identify the cookie being retrieved.
+ * @param callback The callback parameter should be a function that looks like this:
+ * function( Cookie cookie) {...};
+ * Parameter cookie: Contains details about the cookie. This parameter is null if no such cookie was found.
+ */
+ export function get(details: Details, callback: (cookie?: Cookie) => void): void;
+
+ /** Fired when a cookie is set or removed. As a special case, note that updating a cookie's properties is implemented as a two step process: the cookie to be updated is first removed entirely, generating a notification with "cause" of "overwrite" . Afterwards, a new cookie is written with the updated values, generating a second notification with "cause" "explicit". */
+ var onChanged: CookieChangedEvent;
+}
+
+////////////////////
+// Debugger
+////////////////////
+/**
+ * The chrome.debugger API serves as an alternate transport for Chrome's remote debugging protocol. Use chrome.debugger to attach to one or more tabs to instrument network interaction, debug JavaScript, mutate the DOM and CSS, etc. Use the Debuggee tabId to target tabs with sendCommand and route events by tabId from onEvent callbacks.
+ * Availability: Since Chrome 18.
+ * Permissions: "debugger"
+ */
+declare module "chrome.debugger" {
+ /** Debuggee identifier. Either tabId or extensionId must be specified */
+ interface Debuggee {
+ /** Optional. The id of the tab which you intend to debug. */
+ tabId?: number;
+ /**
+ * Optional.
+ * Since Chrome 27.
+ * The id of the extension which you intend to debug. Attaching to an extension background page is only possible when 'silent-debugger-extension-api' flag is enabled on the target browser.
+ */
+ extensionId?: string;
+ /**
+ * Optional.
+ * Since Chrome 28.
+ * The opaque id of the debug target.
+ */
+ targetId?: string;
+ }
+
+ /**
+ * Since Chrome 28.
+ * Debug target information
+ */
+ interface TargetInfo {
+ /** Target type. */
+ type: string;
+ /** Target id. */
+ id: string;
+ /**
+ * Optional.
+ * Since Chrome 30.
+ * The tab id, defined if type == 'page'.
+ */
+ tabId?: number;
+ /**
+ * Optional.
+ * Since Chrome 30.
+ * The extension id, defined if type = 'background_page'.
+ */
+ extensionId?: string;
+ /** True if debugger is already attached. */
+ attached: boolean;
+ /** Target page title. */
+ title: string;
+ /** Target URL. */
+ url: string;
+ /** Optional. Target favicon URL. */
+ faviconUrl?: string;
+ }
+
+ interface DebuggerDetachedEvent extends chrome.events.Event {
+ /**
+ * @param callback The callback parameter should be a function that looks like this:
+ * function( Debuggee source, DetachReason reason) {...};
+ * Parameter source: The debuggee that was detached.
+ * Parameter reason: Since Chrome 24. Connection termination reason.
+ */
+ addListener(callback: (source: Debuggee, reason: string) => void): void;
+ }
+
+ interface DebuggerEventEvent extends chrome.events.Event {
+ /**
+ * @param callback The callback parameter should be a function that looks like this:
+ * function( Debuggee source, string method, object params) {...};
+ * Parameter source: The debuggee that generated this event.
+ * Parameter method: Method name. Should be one of the notifications defined by the remote debugging protocol.
+ * Parameter params: JSON object with the parameters. Structure of the parameters varies depending on the method name and is defined by the 'parameters' attribute of the event description in the remote debugging protocol.
+ */
+ addListener(callback: (source: Debuggee, method: string, params?: Object) => void): void;
+ }
+
+ /**
+ * Attaches debugger to the given target.
+ * @param target Debugging target to which you want to attach.
+ * @param requiredVersion Required debugging protocol version ("0.1"). One can only attach to the debuggee with matching major version and greater or equal minor version. List of the protocol versions can be obtained in the documentation pages.
+ * @param callback Called once the attach operation succeeds or fails. Callback receives no arguments. If the attach fails, runtime.lastError will be set to the error message.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
+ */
+ export function attach(target: Debuggee, requiredVersion: string, callback?: () => void): void;
+ /**
+ * Detaches debugger from the given target.
+ * @param target Debugging target from which you want to detach.
+ * @param callback Called once the detach operation succeeds or fails. Callback receives no arguments. If the detach fails, runtime.lastError will be set to the error message.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
+ */
+ export function detach(target: Debuggee, callback?: () => void): void;
+ /**
+ * Sends given command to the debugging target.
+ * @param target Debugging target to which you want to send the command.
+ * @param method Method name. Should be one of the methods defined by the remote debugging protocol.
+ * @param commandParams Since Chrome 22.
+ * JSON object with request parameters. This object must conform to the remote debugging params scheme for given method.
+ * @param callback Response body. If an error occurs while posting the message, the callback will be called with no arguments and runtime.lastError will be set to the error message.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function(object result) {...};
+ */
+ export function sendCommand(target: Debuggee, method: string, commandParams?: Object, callback?: (result?: Object) => void): void;
+ /**
+ * Since Chrome 28.
+ * Returns the list of available debug targets.
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(array of TargetInfo result) {...};
+ * Parameter result: Array of TargetInfo objects corresponding to the available debug targets.
+ */
+ export function getTargets(callback: (result: TargetInfo[]) => void): void;
+
+ /** Fired when browser terminates debugging session for the tab. This happens when either the tab is being closed or Chrome DevTools is being invoked for the attached tab. */
+ var onDetach: DebuggerDetachedEvent;
+ /** Fired whenever debugging target issues instrumentation event. */
+ var onEvent: DebuggerEventEvent;
+}
+
+////////////////////
+// Declarative Content
+////////////////////
+/**
+ * Use the chrome.declarativeContent API to take actions depending on the content of a page, without requiring permission to read the page's content.
+ * Availability: Since Chrome 33.
+ * Permissions: "declarativeContent"
+ */
+declare module chrome.declarativeContent {
+ interface PageStateUrlDetails {
+ /** Optional. Matches if the host name of the URL contains a specified string. To test whether a host name component has a prefix 'foo', use hostContains: '.foo'. This matches 'www.foobar.com' and 'foo.com', because an implicit dot is added at the beginning of the host name. Similarly, hostContains can be used to match against component suffix ('foo.') and to exactly match against components ('.foo.'). Suffix- and exact-matching for the last components need to be done separately using hostSuffix, because no implicit dot is added at the end of the host name. */
+ hostContains?: string;
+ /** Optional. Matches if the host name of the URL is equal to a specified string. */
+ hostEquals?: string;
+ /** Optional. Matches if the host name of the URL starts with a specified string. */
+ hostPrefix?: string;
+ /** Optional. Matches if the host name of the URL ends with a specified string. */
+ hostSuffix?: string;
+ /** Optional. Matches if the path segment of the URL contains a specified string. */
+ pathContains?: string;
+ /** Optional. Matches if the path segment of the URL is equal to a specified string. */
+ pathEquals?: string;
+ /** Optional. Matches if the path segment of the URL starts with a specified string. */
+ pathPrefix?: string;
+ /** Optional. Matches if the path segment of the URL ends with a specified string. */
+ pathSuffix?: string;
+ /** Optional. Matches if the query segment of the URL contains a specified string. */
+ queryContains?: string;
+ /** Optional. Matches if the query segment of the URL is equal to a specified string. */
+ queryEquals?: string;
+ /** Optional. Matches if the query segment of the URL starts with a specified string. */
+ queryPrefix?: string;
+ /** Optional. Matches if the query segment of the URL ends with a specified string. */
+ querySuffix?: string;
+ /** Optional. Matches if the URL (without fragment identifier) contains a specified string. Port numbers are stripped from the URL if they match the default port number. */
+ urlContains?: string;
+ /** Optional. Matches if the URL (without fragment identifier) is equal to a specified string. Port numbers are stripped from the URL if they match the default port number. */
+ urlEquals?: string;
+ /** Optional. Matches if the URL (without fragment identifier) matches a specified regular expression. Port numbers are stripped from the URL if they match the default port number. The regular expressions use the RE2 syntax. */
+ urlMatches?: string;
+ /** Optional. Matches if the URL without query segment and fragment identifier matches a specified regular expression. Port numbers are stripped from the URL if they match the default port number. The regular expressions use the RE2 syntax. */
+ originAndPathMatches?: string;
+ /** Optional. Matches if the URL (without fragment identifier) starts with a specified string. Port numbers are stripped from the URL if they match the default port number. */
+ urlPrefix?: string;
+ /** Optional. Matches if the URL (without fragment identifier) ends with a specified string. Port numbers are stripped from the URL if they match the default port number. */
+ urlSuffix?: string;
+ /** Optional. Matches if the scheme of the URL is equal to any of the schemes specified in the array. */
+ schemes?: string[];
+ /** Optional. Matches if the port of the URL is contained in any of the specified port lists. For example [80, 443, [1000, 1200]] matches all requests on port 80, 443 and in the range 1000-1200. */
+ port?: any[];
+ }
+
+ /** Matches the state of a web page by various criteria. */
+ interface PageStateMatcher {
+ /** Optional. Filters URLs for various criteria. See event filtering. All criteria are case sensitive. */
+ pageUrl?: PageStateUrlDetails;
+ /** Optional. Matches if all of the CSS selectors in the array match displayed elements in a frame with the same origin as the page's main frame. All selectors in this array must be compound selectors to speed up matching. Note that listing hundreds of CSS selectors or CSS selectors that match hundreds of times per page can still slow down web sites. */
+ css?: string[];
+ /**
+ * Optional.
+ * Since Chrome 45. Warning: this is the current Beta channel. More information available on the API documentation pages.
+ * Matches if the bookmarked state of the page is equal to the specified value. Requres the bookmarks permission.
+ */
+ isBookmarked?: boolean;
+ }
+}
+
+////////////////////
+// Declarative Web Request
+////////////////////
+declare module chrome.declarativeWebRequest {
+ interface HeaderFilter {
+ nameEquals?: string;
+ valueContains?: any;
+ nameSuffix?: string;
+ valueSuffix?: string;
+ valuePrefix?: string;
+ nameContains?: any;
+ valueEquals?: string;
+ namePrefix?: string;
+ }
+
+ interface AddResponseHeader {
+ name: string;
+ value: string;
+ }
+
+ interface RemoveResponseCookie {
+ filter: ResponseCookie;
+ }
+
+ interface RemoveResponseHeader {
+ name: string;
+ value?: string;
+ }
+
+ interface RequestMatcher {
+ contentType?: string[];
+ url?: chrome.events.UrlFilter;
+ excludeContentType?: string[];
+ excludeResponseHeader?: HeaderFilter[];
+ resourceType?: string;
+ responseHeaders?: HeaderFilter[];
+ }
+
+ interface IgnoreRules {
+ lowerPriorityThan: number;
+ }
+
+ interface RedirectToEmptyDocument { }
+
+ interface RedirectRequest {
+ redirectUrl: string;
+ }
+
+ interface ResponseCookie {
+ domain?: string;
+ name?: string;
+ expires?: string;
+ maxAge?: number;
+ value?: string;
+ path?: string;
+ httpOnly?: string;
+ secure?: string;
+ }
+
+ interface AddResponseCookie {
+ cookie: ResponseCookie;
+ }
+
+ interface EditResponseCookie {
+ filter: ResponseCookie;
+ modification: ResponseCookie;
+ }
+
+ interface CancelRequest { }
+
+ interface RemoveRequestHeader {
+ name: string;
+ }
+
+ interface EditRequestCookie {
+ filter: RequestCookie;
+ modification: RequestCookie;
+ }
+
+ interface SetRequestHeader {
+ name: string;
+ value: string;
+ }
+
+ interface RequestCookie {
+ name?: string;
+ value?: string;
+ }
+
+ interface RedirectByRegEx {
+ to: string;
+ from: string;
+ }
+
+ interface RedirectToTransparentImage { }
+
+ interface AddRequestCookie {
+ cookie: RequestCookie;
+ }
+
+ interface RemoveRequestCookie {
+ filter: RequestCookie;
+ }
+
+ interface RequestedEvent extends chrome.events.Event {
+ addListener(callback: Function): void;
+ }
+
+ var onRequest: RequestedEvent;
+}
+
+////////////////////
+// DesktopCapture
+////////////////////
+/**
+ * Desktop Capture API that can be used to capture content of screen, individual windows or tabs.
+ * Availability: Since Chrome 34.
+ * Permissions: "desktopCapture"
+ */
+declare module chrome.desktopCapture {
+ /**
+ * Shows desktop media picker UI with the specified set of sources.
+ * @param sources Set of sources that should be shown to the user.
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(string streamId) {...};
+ * Parameter streamId: An opaque string that can be passed to getUserMedia() API to generate media stream that corresponds to the source selected by the user. If user didn't select any source (i.e. canceled the prompt) then the callback is called with an empty streamId. The created streamId can be used only once and expires after a few seconds when it is not used.
+ */
+ export function chooseDesktopMedia(sources: string[], callback: (streamId: string) => void): number;
+ /**
+ * Shows desktop media picker UI with the specified set of sources.
+ * @param sources Set of sources that should be shown to the user.
+ * @param targetTab Optional tab for which the stream is created. If not specified then the resulting stream can be used only by the calling extension. The stream can only be used by frames in the given tab whose security origin matches tab.url.
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(string streamId) {...};
+ * Parameter streamId: An opaque string that can be passed to getUserMedia() API to generate media stream that corresponds to the source selected by the user. If user didn't select any source (i.e. canceled the prompt) then the callback is called with an empty streamId. The created streamId can be used only once and expires after a few seconds when it is not used.
+ */
+ export function chooseDesktopMedia(sources: string[], targetTab: chrome.tabs.Tab, callback: (streamId: string) => void): number;
+ /**
+ * Hides desktop media picker dialog shown by chooseDesktopMedia().
+ * @param desktopMediaRequestId Id returned by chooseDesktopMedia()
+ */
+ export function cancelChooseDesktopMedia(desktopMediaRequestId: number): void;
+}
+
+////////////////////
+// Dev Tools - Inspected Window
+////////////////////
+/**
+ * Use the chrome.devtools.inspectedWindow API to interact with the inspected window: obtain the tab ID for the inspected page, evaluate the code in the context of the inspected window, reload the page, or obtain the list of resources within the page.
+ * Availability: Since Chrome 18.
+ */
+declare module chrome.devtools.inspectedWindow {
+ /** A resource within the inspected page, such as a document, a script, or an image. */
+ interface Resource {
+ /** The URL of the resource. */
+ url: string;
+ /**
+ * Gets the content of the resource.
+ * @param callback A function that receives resource content when the request completes.
+ * The callback parameter should be a function that looks like this:
+ * function(string content, string encoding) {...};
+ * Parameter content: Content of the resource (potentially encoded).
+ * Parameter encoding: Empty if content is not encoded, encoding name otherwise. Currently, only base64 is supported.
+ */
+ getContent(callback: (content: string, encoding: string) => void): void;
+ /**
+ * Sets the content of the resource.
+ * @param content New content of the resource. Only resources with the text type are currently supported.
+ * @param commit True if the user has finished editing the resource, and the new content of the resource should be persisted; false if this is a minor change sent in progress of the user editing the resource.
+ * @param callback A function called upon request completion.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function(object error) {...};
+ * Optional parameter error: Set to undefined if the resource content was set successfully; describes error otherwise.
+ */
+ setContent(content: string, commit: boolean, callback?: (error: Object) => void): void;
+ }
+
+ interface ReloadOptions {
+ /** Optional. If specified, the string will override the value of the User-Agent HTTP header that's sent while loading the resources of the inspected page. The string will also override the value of the navigator.userAgent property that's returned to any scripts that are running within the inspected page. */
+ userAgent?: string;
+ /** Optional. When true, the loader will ignore the cache for all inspected page resources loaded before the load event is fired. The effect is similar to pressing Ctrl+Shift+R in the inspected window or within the Developer Tools window. */
+ ignoreCache?: boolean;
+ /** Optional. If specified, the script will be injected into every frame of the inspected page immediately upon load, before any of the frame's scripts. The script will not be injected after subsequent reloads—for example, if the user presses Ctrl+R. */
+ injectedScript?: boolean;
+ /**
+ * Optional.
+ * If specified, this script evaluates into a function that accepts three string arguments: the source to preprocess, the URL of the source, and a function name if the source is an DOM event handler. The preprocessorerScript function should return a string to be compiled by Chrome in place of the input source. In the case that the source is a DOM event handler, the returned source must compile to a single JS function.
+ * @deprecated Deprecated since Chrome 41. Please avoid using this parameter, it will be removed soon.
+ */
+ preprocessorScript?: string;
+ }
+
+ interface EvaluationExceptionInfo {
+ /** Set if the error occurred on the DevTools side before the expression is evaluated. */
+ isError: boolean;
+ /** Set if the error occurred on the DevTools side before the expression is evaluated. */
+ code: string;
+ /** Set if the error occurred on the DevTools side before the expression is evaluated. */
+ description: string;
+ /** Set if the error occurred on the DevTools side before the expression is evaluated, contains the array of the values that may be substituted into the description string to provide more information about the cause of the error. */
+ details: any[];
+ /** Set if the evaluated code produces an unhandled exception. */
+ isException: boolean;
+ /** Set if the evaluated code produces an unhandled exception. */
+ value: string;
+ }
+
+ interface ResourceAddedEvent extends chrome.events.Event {
+ /**
+ * @param callback The callback parameter should be a function that looks like this:
+ * function( Resource resource) {...};
+ */
+ addListener(callback: (resource: Resource) => void): void;
+ }
+
+ interface ResourceContentCommittedEvent extends chrome.events.Event {
+ /**
+ * @param callback The callback parameter should be a function that looks like this:
+ * function( Resource resource, string content) {...};
+ * Parameter content: New content of the resource.
+ */
+ addListener(callback: (resource: Resource, content: string) => void): void;
+ }
+
+ /** The ID of the tab being inspected. This ID may be used with chrome.tabs.* API. */
+ var tabId: number;
+
+ /** Reloads the inspected page. */
+ export function reload(reloadOptions: ReloadOptions): void;
+ /**
+ * Evaluates a JavaScript expression in the context of the main frame of the inspected page. The expression must evaluate to a JSON-compliant object, otherwise an exception is thrown. The eval function can report either a DevTools-side error or a JavaScript exception that occurs during evaluation. In either case, the result parameter of the callback is undefined. In the case of a DevTools-side error, the isException parameter is non-null and has isError set to true and code set to an error code. In the case of a JavaScript error, isException is set to true and value is set to the string value of thrown object.
+ * @param expression An expression to evaluate.
+ * @param callback A function called when evaluation completes.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function(object result, object exceptionInfo) {...};
+ * Parameter result: The result of evaluation.
+ * Parameter exceptionInfo: An object providing details if an exception occurred while evaluating the expression.
+ */
+ export function eval(expression: string, callback?: (result: Object, exceptionInfo: EvaluationExceptionInfo) => void): void;
+ /**
+ * Retrieves the list of resources from the inspected page.
+ * @param callback A function that receives the list of resources when the request completes.
+ * The callback parameter should be a function that looks like this:
+ * function(array of Resource resources) {...};
+ */
+ export function getResources(callback: (resources: Resource[]) => void): void;
+
+ /** Fired when a new resource is added to the inspected page. */
+ var onResourceAdded: ResourceAddedEvent;
+ /** Fired when a new revision of the resource is committed (e.g. user saves an edited version of the resource in the Developer Tools). */
+ var onResourceContentCommitted: ResourceContentCommittedEvent;
+}
+
+////////////////////
+// Dev Tools - Network
+////////////////////
+/**
+ * Use the chrome.devtools.network API to retrieve the information about network requests displayed by the Developer Tools in the Network panel.
+ * Availability: Since Chrome 18.
+ */
+declare module chrome.devtools.network {
+ /** Represents a network request for a document resource (script, image and so on). See HAR Specification for reference. */
+ interface Request {
+ /**
+ * Returns content of the response body.
+ * @param callback A function that receives the response body when the request completes.
+ * The callback parameter should be a function that looks like this:
+ * function(string content, string encoding) {...};
+ * Parameter content: Content of the response body (potentially encoded).
+ * Parameter encoding: Empty if content is not encoded, encoding name otherwise. Currently, only base64 is supported.
+ */
+ getContent(callback: (content: string, encoding: string) => void): void;
+ }
+
+ interface RequestFinishedEvent extends chrome.events.Event {
+ /**
+ * @param callback The callback parameter should be a function that looks like this:
+ * function( Request request) {...};
+ * Parameter request: Description of a network request in the form of a HAR entry. See HAR specification for details.
+ */
+ addListener(callback: (request: Request) => void): void;
+ }
+
+ interface NavigatedEvent extends chrome.events.Event {
+ /**
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(string url) {...};
+ * Parameter url: URL of the new page.
+ */
+ addListener(callback: (url: string) => void): void;
+ }
+
+ /**
+ * Returns HAR log that contains all known network requests.
+ * @param callback A function that receives the HAR log when the request completes.
+ * The callback parameter should be a function that looks like this:
+ * function(object harLog) {...};
+ * Parameter harLog: A HAR log. See HAR specification for details.
+ */
+ export function getHAR(callback: (harLog: Object) => void): void;
+
+ /** Fired when a network request is finished and all request data are available. */
+ var onRequestFinished: RequestFinishedEvent;
+ /** Fired when the inspected window navigates to a new page. */
+ var onNavigated: NavigatedEvent;
+}
+
+////////////////////
+// Dev Tools - Panels
+////////////////////
+/**
+ * Use the chrome.devtools.panels API to integrate your extension into Developer Tools window UI: create your own panels, access existing panels, and add sidebars.
+ * Availability: Since Chrome 18.
+ */
+declare module chrome.devtools.panels {
+ interface PanelShownEvent extends chrome.events.Event {
+ /**
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(global window) {...};
+ * Parameter window: The JavaScript window object of panel's page.
+ */
+ addListener(callback: (window: chrome.windows.Window) => void): void;
+ }
+
+ interface PanelHiddenEvent extends chrome.events.Event {
+ /**
+ * @param callback The callback parameter should be a function that looks like this:
+ * function() {...};
+ */
+ addListener(callback: () => void): void;
+ }
+
+ interface PanelSearchEvent extends chrome.events.Event {
+ /**
+ * The callback parameter should be a function that looks like this:
+ * function(string action, string queryString) {...};
+ * Parameter action: Type of search action being performed.
+ * Optional parameter queryString: Query string (only for 'performSearch').
+ */
+ addListener(callback: (action: string, queryString?: string) => void): void;
+ }
+
+ /** Represents a panel created by extension. */
+ interface ExtensionPanel {
+ /**
+ * Appends a button to the status bar of the panel.
+ * @param iconPath Path to the icon of the button. The file should contain a 64x24-pixel image composed of two 32x24 icons. The left icon is used when the button is inactive; the right icon is displayed when the button is pressed.
+ * @param tooltipText Text shown as a tooltip when user hovers the mouse over the button.
+ * @param disabled Whether the button is disabled.
+ */
+ createStatusBarButton(iconPath: string, tooltipText: string, disabled: boolean): Button;
+ /** Fired when the user switches to the panel. */
+ onShown: PanelShownEvent;
+ /** Fired when the user switches away from the panel. */
+ onHidden: PanelHiddenEvent;
+ /** Fired upon a search action (start of a new search, search result navigation, or search being canceled). */
+ onSearch: PanelSearchEvent;
+ }
+
+ interface ButtonClickedEvent extends chrome.events.Event {
+ /**
+ * @param callback The callback parameter should be a function that looks like this:
+ * function() {...};
+ */
+ addListener(callback: () => void): void;
+ }
+
+ /** A button created by the extension. */
+ interface Button {
+ /**
+ * Updates the attributes of the button. If some of the arguments are omitted or null, the corresponding attributes are not updated.
+ * @param iconPath Path to the new icon of the button.
+ * @param tooltipText Text shown as a tooltip when user hovers the mouse over the button.
+ * @param disabled Whether the button is disabled.
+ */
+ update(iconPath?: string, tooltipText?: string, disabled?: boolean): void;
+ /** Fired when the button is clicked. */
+ onClicked: ButtonClickedEvent;
+ }
+
+ interface SelectionChangedEvent extends chrome.events.Event {
+ /**
+ * @param callback The callback parameter should be a function that looks like this:
+ * function() {...};
+ */
+ addListener(callback: () => void): void;
+ }
+
+ /** Represents the Elements panel. */
+ interface ElementsPanel {
+ /**
+ * Creates a pane within panel's sidebar.
+ * @param title Text that is displayed in sidebar caption.
+ * @param callback A callback invoked when the sidebar is created.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function( ExtensionSidebarPane result) {...};
+ * Parameter result: An ExtensionSidebarPane object for created sidebar pane.
+ */
+ createSidebarPane(title: string, callback?: (result: ExtensionSidebarPane) => void): void;
+ /** Fired when an object is selected in the panel. */
+ onSelectionChanged: SelectionChangedEvent;
+ }
+
+ /**
+ * Since Chrome 41.
+ * Represents the Sources panel.
+ */
+ interface SourcesPanel {
+ /**
+ * Creates a pane within panel's sidebar.
+ * @param title Text that is displayed in sidebar caption.
+ * @param callback A callback invoked when the sidebar is created.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function( ExtensionSidebarPane result) {...};
+ * Parameter result: An ExtensionSidebarPane object for created sidebar pane.
+ */
+ createSidebarPane(title: string, callback?: (result: ExtensionSidebarPane) => void): void;
+ /** Fired when an object is selected in the panel. */
+ onSelectionChanged: SelectionChangedEvent;
+ }
+
+ interface ExtensionSidebarPaneShownEvent extends chrome.events.Event {
+ /**
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(global window) {...};
+ * Parameter window: The JavaScript window object of the sidebar page, if one was set with the setPage() method.
+ */
+ addListener(callback: (window: chrome.windows.Window) => void): void;
+ }
+
+ interface ExtensionSidebarPaneHiddenEvent extends chrome.events.Event {
+ /**
+ * @param callback The callback parameter should be a function that looks like this:
+ * function() {...};
+ */
+ addListener(callback: () => void): void;
+ }
+
+ /** A sidebar created by the extension. */
+ interface ExtensionSidebarPane {
+ /**
+ * Sets the height of the sidebar.
+ * @param height A CSS-like size specification, such as '100px' or '12ex'.
+ */
+ setHeight(height: string): void;
+ /**
+ * Sets an expression that is evaluated within the inspected page. The result is displayed in the sidebar pane.
+ * @param expression An expression to be evaluated in context of the inspected page. JavaScript objects and DOM nodes are displayed in an expandable tree similar to the console/watch.
+ * @param rootTitle An optional title for the root of the expression tree.
+ * @param callback A callback invoked after the sidebar pane is updated with the expression evaluation results.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
+ */
+ setExpression(expression: string, rootTitle?: string, callback?: () => void): void;
+ /**
+ * Sets an expression that is evaluated within the inspected page. The result is displayed in the sidebar pane.
+ * @param expression An expression to be evaluated in context of the inspected page. JavaScript objects and DOM nodes are displayed in an expandable tree similar to the console/watch.
+ * @param callback A callback invoked after the sidebar pane is updated with the expression evaluation results.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
+ */
+ setExpression(expression: string, callback?: () => void): void;
+ /**
+ * Sets a JSON-compliant object to be displayed in the sidebar pane.
+ * @param jsonObject An object to be displayed in context of the inspected page. Evaluated in the context of the caller (API client).
+ * @param rootTitle An optional title for the root of the expression tree.
+ * @param callback A callback invoked after the sidebar is updated with the object.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
+ */
+ setObject(jsonObject: string, rootTitle?: string, callback?: () => void): void;
+ /**
+ * Sets a JSON-compliant object to be displayed in the sidebar pane.
+ * @param jsonObject An object to be displayed in context of the inspected page. Evaluated in the context of the caller (API client).
+ * @param callback A callback invoked after the sidebar is updated with the object.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
+ */
+ setObject(jsonObject: string, callback?: () => void): void;
+ /**
+ * Sets an HTML page to be displayed in the sidebar pane.
+ * @param path Relative path of an extension page to display within the sidebar.
+ */
+ setPage(path: string): void;
+ /** Fired when the sidebar pane becomes visible as a result of user switching to the panel that hosts it. */
+ onShown: ExtensionSidebarPaneShownEvent;
+ /** Fired when the sidebar pane becomes hidden as a result of the user switching away from the panel that hosts the sidebar pane. */
+ onHidden: ExtensionSidebarPaneHiddenEvent;
+ }
+
+ /** Elements panel. */
+ var elements: ElementsPanel;
+ /**
+ * Since Chrome 38.
+ * Sources panel.
+ */
+ var sources: SourcesPanel;
+
+ /**
+ * Creates an extension panel.
+ * @param title Title that is displayed next to the extension icon in the Developer Tools toolbar.
+ * @param iconPath Path of the panel's icon relative to the extension directory.
+ * @param pagePath Path of the panel's HTML page relative to the extension directory.
+ * @param callback A function that is called when the panel is created.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function( ExtensionPanel panel) {...};
+ * Parameter panel: An ExtensionPanel object representing the created panel.
+ */
+ export function create(title: string, iconPath: string, pagePath: string, callback?: (panel: ExtensionPanel) => void): void;
+ /**
+ * Specifies the function to be called when the user clicks a resource link in the Developer Tools window. To unset the handler, either call the method with no parameters or pass null as the parameter.
+ * @param callback A function that is called when the user clicks on a valid resource link in Developer Tools window. Note that if the user clicks an invalid URL or an XHR, this function is not called.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function( devtools.inspectedWindow.Resource resource) {...};
+ * Parameter resource: A devtools.inspectedWindow.Resource object for the resource that was clicked.
+ */
+ export function setOpenResourceHandler(callback?: (resource: chrome.devtools.inspectedWindow.Resource) => void): void;
+ /**
+ * Since Chrome 38.
+ * Requests DevTools to open a URL in a Developer Tools panel.
+ * @param url The URL of the resource to open.
+ * @param lineNumber Specifies the line number to scroll to when the resource is loaded.
+ * @param callback A function that is called when the resource has been successfully loaded.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
+ */
+ export function openResource(url: string, lineNumber: number, callback: () => void): void;
+}
+
+////////////////////
+// Document Scan
+////////////////////
+/**
+ * Use the chrome.documentScan API to discover and retrieve images from attached paper document scanners.
+ * Availability: Since Chrome 44.
+ * Permissions: "documentScan"
+ * Important: This API works only on Chrome OS.
+ */
+declare module chrome.documentScan {
+ interface DocumentScanOptions {
+ /** Optional. The MIME types that are accepted by the caller. */
+ mimeTypes?: string[];
+ /** Optional. The number of scanned images allowed (defaults to 1). */
+ maxImages?: number;
+ }
+
+ interface DocumentScanCallbackArg {
+ /** The data image URLs in a form that can be passed as the "src" value to an image tag. */
+ dataUrls: string[];
+ /** The MIME type of dataUrls. */
+ mimeType: string;
+ }
+
+ /**
+ * Performs a document scan. On success, the PNG data will be sent to the callback.
+ * @param options Object containing scan parameters.
+ * @param callback Called with the result and data from the scan.
+ * The callback parameter should be a function that looks like this:
+ * function(object result) {...};
+ */
+ export function scan(options: DocumentScanOptions, callback: (result: DocumentScanCallbackArg) => void): void;
+}
+
+////////////////////
+// Dev Tools - Downloads
+////////////////////
+/**
+ * Use the chrome.downloads API to programmatically initiate, monitor, manipulate, and search for downloads.
+ * Availability: Since Chrome 31.
+ * Permissions: "downloads"
+ */
+declare module chrome.downloads {
+ interface HeaderNameValuePair {
+ /** Name of the HTTP header. */
+ name: string;
+ /** Value of the HTTP header. */
+ value: string;
+ }
+
+ interface DownloadOptions {
+ /** Optional. Post body. */
+ body?: string;
+ /** Optional. Use a file-chooser to allow the user to select a filename regardless of whether filename is set or already exists. */
+ saveAs?: boolean;
+ /** The URL to download. */
+ url: string;
+ /** Optional. A file path relative to the Downloads directory to contain the downloaded file, possibly containing subdirectories. Absolute paths, empty paths, and paths containing back-references ".." will cause an error. onDeterminingFilename allows suggesting a filename after the file's MIME type and a tentative filename have been determined. */
+ filename?: string;
+ /** Optional. Extra HTTP headers to send with the request if the URL uses the HTTP[s] protocol. Each header is represented as a dictionary containing the keys name and either value or binaryValue, restricted to those allowed by XMLHttpRequest. */
+ headers?: HeaderNameValuePair[];
+ /** Optional. The HTTP method to use if the URL uses the HTTP[S] protocol. */
+ method?: string;
+ /** Optional. The action to take if filename already exists. */
+ conflictAction?: string;
+ }
+
+ interface DownloadDelta {
+ /** Optional. The change in danger, if any. */
+ danger?: StringDelta;
+ /** Optional. The change in url, if any. */
+ url?: StringDelta;
+ /** Optional. The change in totalBytes, if any. */
+ totalBytes?: DoubleDelta;
+ /** Optional. The change in filename, if any. */
+ filename?: StringDelta;
+ /** Optional. The change in paused, if any. */
+ paused?: BooleanDelta;
+ /** Optional. The change in state, if any. */
+ state?: StringDelta;
+ /** Optional. The change in mime, if any. */
+ mime?: StringDelta;
+ /** Optional. The change in fileSize, if any. */
+ fileSize?: DoubleDelta;
+ /** Optional. The change in startTime, if any. */
+ startTime?: DoubleDelta;
+ /** Optional. The change in error, if any. */
+ error?: StringDelta;
+ /** Optional. The change in endTime, if any. */
+ endTime?: DoubleDelta;
+ /** The id of the DownloadItem that changed. */
+ id: number;
+ /** Optional. The change in canResume, if any. */
+ canResume?: BooleanDelta;
+ /** Optional. The change in exists, if any. */
+ exists?: BooleanDelta;
+ }
+
+ interface BooleanDelta {
+ current?: boolean;
+ previous?: boolean;
+ }
+
+ /** Since Chrome 34. */
+ interface DoubleDelta {
+ current?: number;
+ previous?: number;
+ }
+
+ interface StringDelta {
+ current?: string;
+ previous?: string;
+ }
+
+ interface DownloadItem {
+ /** Number of bytes received so far from the host, without considering file compression. */
+ bytesReceived: number;
+ /** Indication of whether this download is thought to be safe or known to be suspicious. */
+ danger: string;
+ /** Absolute URL. */
+ url: string;
+ /** Number of bytes in the whole file, without considering file compression, or -1 if unknown. */
+ totalBytes: number;
+ /** Absolute local path. */
+ filename: string;
+ /** True if the download has stopped reading data from the host, but kept the connection open. */
+ paused: boolean;
+ /** Indicates whether the download is progressing, interrupted, or complete. */
+ state: string;
+ /** The file's MIME type. */
+ mime: string;
+ /** Number of bytes in the whole file post-decompression, or -1 if unknown. */
+ fileSize: number;
+ /** The time when the download began in ISO 8601 format. May be passed directly to the Date constructor: chrome.downloads.search({}, function(items){items.forEach(function(item){console.log(new Date(item.startTime))})}) */
+ startTime: string;
+ /** Optional. Why the download was interrupted. Several kinds of HTTP errors may be grouped under one of the errors beginning with SERVER_. Errors relating to the network begin with NETWORK_, errors relating to the process of writing the file to the file system begin with FILE_, and interruptions initiated by the user begin with USER_. */
+ error?: string;
+ /** Optional. The time when the download ended in ISO 8601 format. May be passed directly to the Date constructor: chrome.downloads.search({}, function(items){items.forEach(function(item){if (item.endTime) console.log(new Date(item.endTime))})}) */
+ endTime?: string;
+ /** An identifier that is persistent across browser sessions. */
+ id: number;
+ /** False if this download is recorded in the history, true if it is not recorded. */
+ incognito: boolean;
+ /** Absolute URL. */
+ referrer: string;
+ /** Optional. Estimated time when the download will complete in ISO 8601 format. May be passed directly to the Date constructor: chrome.downloads.search({}, function(items){items.forEach(function(item){if (item.estimatedEndTime) console.log(new Date(item.estimatedEndTime))})}) */
+ estimatedEndTime?: string;
+ /** True if the download is in progress and paused, or else if it is interrupted and can be resumed starting from where it was interrupted. */
+ canResume: boolean;
+ /** Whether the downloaded file still exists. This information may be out of date because Chrome does not automatically watch for file removal. Call search() in order to trigger the check for file existence. When the existence check completes, if the file has been deleted, then an onChanged event will fire. Note that search() does not wait for the existence check to finish before returning, so results from search() may not accurately reflect the file system. Also, search() may be called as often as necessary, but will not check for file existence any more frequently than once every 10 seconds. */
+ exists: boolean;
+ /** Optional. The identifier for the extension that initiated this download if this download was initiated by an extension. Does not change once it is set. */
+ byExtensionId?: string;
+ /** Optional. The localized name of the extension that initiated this download if this download was initiated by an extension. May change if the extension changes its name or if the user changes their locale. */
+ byExtensionName?: string;
+ }
+
+ interface GetFileIconOptions {
+ /** Optional. * The size of the returned icon. The icon will be square with dimensions size * size pixels. The default and largest size for the icon is 32x32 pixels. The only supported sizes are 16 and 32. It is an error to specify any other size.
+ */
+ size?: number;
+ }
+
+ interface DownloadQuery {
+ /** Optional. Set elements of this array to DownloadItem properties in order to sort search results. For example, setting orderBy=['startTime'] sorts the DownloadItem by their start time in ascending order. To specify descending order, prefix with a hyphen: '-startTime'. */
+ orderBy?: string[];
+ /** Optional. Limits results to DownloadItem whose url matches the given regular expression. */
+ urlRegex?: string;
+ /** Optional. Limits results to DownloadItem that ended before the given ms since the epoch. */
+ endedBefore?: number;
+ /** Optional. Limits results to DownloadItem whose totalBytes is greater than the given integer. */
+ totalBytesGreater?: number;
+ /** Optional. Indication of whether this download is thought to be safe or known to be suspicious. */
+ danger?: string;
+ /** Optional. Number of bytes in the whole file, without considering file compression, or -1 if unknown. */
+ totalBytes?: number;
+ /** Optional. True if the download has stopped reading data from the host, but kept the connection open. */
+ paused?: boolean;
+ /** Optional. Limits results to DownloadItem whose filename matches the given regular expression. */
+ filenameRegex?: string;
+ /** Optional. This array of search terms limits results to DownloadItem whose filename or url contain all of the search terms that do not begin with a dash '-' and none of the search terms that do begin with a dash. */
+ query?: string[];
+ /** Optional. Limits results to DownloadItem whose totalBytes is less than the given integer. */
+ totalBytesLess?: number;
+ /** Optional. The id of the DownloadItem to query. */
+ id?: number;
+ /** Optional. Number of bytes received so far from the host, without considering file compression. */
+ bytesReceived?: number;
+ /** Optional. Limits results to DownloadItem that ended after the given ms since the epoch. */
+ endedAfter?: number;
+ /** Optional. Absolute local path. */
+ filename?: string;
+ /** Optional. Indicates whether the download is progressing, interrupted, or complete. */
+ state?: string;
+ /** Optional. Limits results to DownloadItem that started after the given ms since the epoch. */
+ startedAfter?: number;
+ /** Optional. The file's MIME type. */
+ mime?: string;
+ /** Optional. Number of bytes in the whole file post-decompression, or -1 if unknown. */
+ fileSize?: number;
+ /** Optional. The time when the download began in ISO 8601 format. */
+ startTime?: number;
+ /** Optional. Absolute URL. */
+ url?: string;
+ /** Optional. Limits results to DownloadItem that started before the given ms since the epoch. */
+ startedBefore?: number;
+ /** Optional. The maximum number of matching DownloadItem returned. Defaults to 1000. Set to 0 in order to return all matching DownloadItem. See search for how to page through results. */
+ limit?: number;
+ /** Optional. Why a download was interrupted. */
+ error?: number;
+ /** Optional. The time when the download ended in ISO 8601 format. */
+ endTime?: number;
+ /** Optional. Whether the downloaded file exists; */
+ exists?: boolean;
+ }
+
+ interface DownloadFilenameSuggestion {
+ /** The DownloadItem's new target DownloadItem.filename, as a path relative to the user's default Downloads directory, possibly containing subdirectories. Absolute paths, empty paths, and paths containing back-references ".." will be ignored. */
+ filename: string;
+ /** Optional. The action to take if filename already exists. */
+ conflictAction?: string;
+ }
+
+ interface DownloadChangedEvent extends chrome.events.Event {
+ /**
+ * When any of a DownloadItem's properties except bytesReceived and estimatedEndTime changes, this event fires with the downloadId and an object containing the properties that changed.
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(object downloadDelta) {...};
+ */
+ addListener(callback: (downloadDelta: DownloadDelta) => void): void;
+ }
+
+ interface DownloadCreatedEvent extends chrome.events.Event {
+ /**
+ * @param callback The callback parameter should be a function that looks like this:
+ * function( DownloadItem downloadItem) {...};
+ */
+ addListener(callback: (downloadItem: DownloadItem) => void): void;
+ }
+
+ interface DownloadErasedEvent extends chrome.events.Event {
+ /**
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(integer downloadId) {...};
+ * Parameter downloadId: The id of the DownloadItem that was erased.
+ */
+ addListener(callback: (downloadId: number) => void): void;
+ }
+
+ interface DownloadDeterminingFilenameEvent extends chrome.events.Event {
+ /**
+ * @param callback The callback parameter should be a function that looks like this:
+ * function( DownloadItem downloadItem, function suggest) {...};
+ */
+ addListener(callback: (downloadItem: DownloadItem, suggest: (suggestion?: DownloadFilenameSuggestion) => void) => void): void;
+ }
+
+ /**
+ * Find DownloadItem. Set query to the empty object to get all DownloadItem. To get a specific DownloadItem, set only the id field. To page through a large number of items, set orderBy: ['-startTime'], set limit to the number of items per page, and set startedAfter to the startTime of the last item from the last page.
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(array of DownloadItem results) {...};
+ */
+ export function search(query: DownloadQuery, callback: (results: DownloadItem[]) => void): void;
+ /**
+ * Pause the download. If the request was successful the download is in a paused state. Otherwise runtime.lastError contains an error message. The request will fail if the download is not active.
+ * @param downloadId The id of the download to pause.
+ * @param callback Called when the pause request is completed.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
+ */
+ export function pause(downloadId: number, callback?: () => void): void;
+ /**
+ * Retrieve an icon for the specified download. For new downloads, file icons are available after the onCreated event has been received. The image returned by this function while a download is in progress may be different from the image returned after the download is complete. Icon retrieval is done by querying the underlying operating system or toolkit depending on the platform. The icon that is returned will therefore depend on a number of factors including state of the download, platform, registered file types and visual theme. If a file icon cannot be determined, runtime.lastError will contain an error message.
+ * @param downloadId The identifier for the download.
+ * @param callback A URL to an image that represents the download.
+ * The callback parameter should be a function that looks like this:
+ * function(string iconURL) {...};
+ */
+ export function getFileIcon(downloadId: number, callback: (iconURL: string) => void): void;
+ /**
+ * Retrieve an icon for the specified download. For new downloads, file icons are available after the onCreated event has been received. The image returned by this function while a download is in progress may be different from the image returned after the download is complete. Icon retrieval is done by querying the underlying operating system or toolkit depending on the platform. The icon that is returned will therefore depend on a number of factors including state of the download, platform, registered file types and visual theme. If a file icon cannot be determined, runtime.lastError will contain an error message.
+ * @param downloadId The identifier for the download.
+ * @param callback A URL to an image that represents the download.
+ * The callback parameter should be a function that looks like this:
+ * function(string iconURL) {...};
+ */
+ export function getFileIcon(downloadId: number, options: GetFileIconOptions, callback: (iconURL: string) => void): void;
+ /**
+ * Resume a paused download. If the request was successful the download is in progress and unpaused. Otherwise runtime.lastError contains an error message. The request will fail if the download is not active.
+ * @param downloadId The id of the download to resume.
+ * @param callback Called when the resume request is completed.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
+ */
+ export function resume(downloadId: number, callback?: () => void): void;
+ /**
+ * Cancel a download. When callback is run, the download is cancelled, completed, interrupted or doesn't exist anymore.
+ * @param downloadId The id of the download to cancel.
+ * @param callback Called when the cancel request is completed.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
+ */
+ export function cancel(downloadId: number, callback?: () => void): void;
+ /**
+ * Download a URL. If the URL uses the HTTP[S] protocol, then the request will include all cookies currently set for its hostname. If both filename and saveAs are specified, then the Save As dialog will be displayed, pre-populated with the specified filename. If the download started successfully, callback will be called with the new DownloadItem's downloadId. If there was an error starting the download, then callback will be called with downloadId=undefined and runtime.lastError will contain a descriptive string. The error strings are not guaranteed to remain backwards compatible between releases. Extensions must not parse it.
+ * @param options What to download and how.
+ * @param callback Called with the id of the new DownloadItem.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function(integer downloadId) {...};
+ */
+ export function download(options: DownloadOptions, callback?: (downloadId: number) => void): void;
+ /**
+ * Open the downloaded file now if the DownloadItem is complete; otherwise returns an error through runtime.lastError. Requires the "downloads.open" permission in addition to the "downloads" permission. An onChanged event will fire when the item is opened for the first time.
+ * @param downloadId The identifier for the downloaded file.
+ */
+ export function open(downloadId: number): void;
+ /**
+ * Show the downloaded file in its folder in a file manager.
+ * @param downloadId The identifier for the downloaded file.
+ */
+ export function show(downloadId: number): void;
+ /** Show the default Downloads folder in a file manager. */
+ export function showDefaultFolder(): void;
+ /**
+ * Erase matching DownloadItem from history without deleting the downloaded file. An onErased event will fire for each DownloadItem that matches query, then callback will be called.
+ * @param callback If you specify the callback parameter, it should be a function that looks like this:
+ * function(array of integer erasedIds) {...};
+ */
+ export function erase(query: DownloadQuery, callback: (erasedIds: number[]) => void): void;
+ /**
+ * Remove the downloaded file if it exists and the DownloadItem is complete; otherwise return an error through runtime.lastError.
+ * @param callback If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
+ */
+ export function removeFile(downloadId: number, callback?: () => void): void;
+ /**
+ * Prompt the user to accept a dangerous download. Can only be called from a visible context (tab, window, or page/browser action popup). Does not automatically accept dangerous downloads. If the download is accepted, then an onChanged event will fire, otherwise nothing will happen. When all the data is fetched into a temporary file and either the download is not dangerous or the danger has been accepted, then the temporary file is renamed to the target filename, the |state| changes to 'complete', and onChanged fires.
+ * @param downloadId The identifier for the DownloadItem.
+ * @param callback Called when the danger prompt dialog closes.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
+ */
+ export function acceptDanger(downloadId: number, callback: () => void): void;
+ /** Initiate dragging the downloaded file to another application. Call in a javascript ondragstart handler. */
+ export function drag(downloadId: number): void;
+ /** Enable or disable the gray shelf at the bottom of every window associated with the current browser profile. The shelf will be disabled as long as at least one extension has disabled it. Enabling the shelf while at least one other extension has disabled it will return an error through runtime.lastError. Requires the "downloads.shelf" permission in addition to the "downloads" permission. */
+ export function setShelfEnabled(enabled: boolean): void;
+
+ /** When any of a DownloadItem's properties except bytesReceived and estimatedEndTime changes, this event fires with the downloadId and an object containing the properties that changed. */
+ var onChanged: DownloadChangedEvent;
+ /** This event fires with the DownloadItem object when a download begins. */
+ var onCreated: DownloadCreatedEvent;
+ /** Fires with the downloadId when a download is erased from history. */
+ var onErased: DownloadErasedEvent;
+ /** During the filename determination process, extensions will be given the opportunity to override the target DownloadItem.filename. Each extension may not register more than one listener for this event. Each listener must call suggest exactly once, either synchronously or asynchronously. If the listener calls suggest asynchronously, then it must return true. If the listener neither calls suggest synchronously nor returns true, then suggest will be called automatically. The DownloadItem will not complete until all listeners have called suggest. Listeners may call suggest without any arguments in order to allow the download to use downloadItem.filename for its filename, or pass a suggestion object to suggest in order to override the target filename. If more than one extension overrides the filename, then the last extension installed whose listener passes a suggestion object to suggest wins. In order to avoid confusion regarding which extension will win, users should not install extensions that may conflict. If the download is initiated by download and the target filename is known before the MIME type and tentative filename have been determined, pass filename to download instead. */
+ var onDeterminingFilename: DownloadDeterminingFilenameEvent;
+}
+
+////////////////////
+// Enterprise Platform Keys
+////////////////////
+/**
+ * Use the chrome.enterprise.platformKeys API to generate hardware-backed keys and to install certificates for these keys. The certificates will be managed by the platform and can be used for TLS authentication, network access or by other extension through chrome.platformKeys.
+ * Availability: Since Chrome 37.
+ * Permissions: "enterprise.platformKeys"
+ * Important: This API works only on Chrome OS.
+ * Note: This API is only for extensions pre-installed by policy.
+ */
+declare module chrome.enterprise.platformKeys {
+ interface Token {
+ /**
+ * Uniquely identifies this Token.
+ * Static IDs are "user" and "system", referring to the platform's user-specific and the system-wide hardware token, respectively. Any other tokens (with other identifiers) might be returned by enterprise.platformKeys.getTokens.
+ */
+ id: string;
+ /**
+ * Implements the WebCrypto's SubtleCrypto interface. The cryptographic operations, including key generation, are hardware-backed.
+ * Only non-extractable RSASSA-PKCS1-V1_5 keys with modulusLength up to 2048 can be generated. Each key can be used for signing data at most once.
+ * Keys generated on a specific Token cannot be used with any other Tokens, nor can they be used with window.crypto.subtle. Equally, Key objects created with window.crypto.subtle cannot be used with this interface.
+ */
+ subtleCrypto: SubtleCrypto;
+ }
+
+ /**
+ * Returns the available Tokens. In a regular user's session the list will always contain the user's token with id "user". If a system-wide TPM token is available, the returned list will also contain the system-wide token with id "system". The system-wide token will be the same for all sessions on this device (device in the sense of e.g. a Chromebook).
+ * @param callback Invoked by getTokens with the list of available Tokens.
+ * The callback parameter should be a function that looks like this:
+ * function(array of Token tokens) {...};
+ * Parameter tokens: The list of available tokens.
+ */
+ export function getToken(callback: (tokens: Token[]) => void): void;
+ /**
+ * Returns the list of all client certificates available from the given token. Can be used to check for the existence and expiration of client certificates that are usable for a certain authentication.
+ * @param tokenId The id of a Token returned by getTokens.
+ * @param callback Called back with the list of the available certificates.
+ * The callback parameter should be a function that looks like this:
+ * function(array of ArrayBuffer certificates) {...};
+ * Parameter certificates: The list of certificates, each in DER encoding of a X.509 certificate.
+ */
+ export function getCertificates(tokenId: string, callback: (certificates: ArrayBuffer) => void): void;
+ /**
+ * Imports certificate to the given token if the certified key is already stored in this token. After a successful certification request, this function should be used to store the obtained certificate and to make it available to the operating system and browser for authentication.
+ * @param tokenId The id of a Token returned by getTokens.
+ * @param certificate The DER encoding of a X.509 certificate.
+ * @param callback Called back when this operation is finished.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
+ */
+ export function importCertificate(tokenId: string, certificate: ArrayBuffer, callback?: () => void): void;
+ /**
+ * Removes certificate from the given token if present. Should be used to remove obsolete certificates so that they are not considered during authentication and do not clutter the certificate choice. Should be used to free storage in the certificate store.
+ * @param tokenId The id of a Token returned by getTokens.
+ * @param certificate The DER encoding of a X.509 certificate.
+ * @param callback Called back when this operation is finished.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
+ */
+ export function removeCertificate(tokenId: string, certificate: ArrayBuffer, callback?: () => void): void;
+}
+
+////////////////////
+// Events
+////////////////////
+/**
+ * The chrome.events namespace contains common types used by APIs dispatching events to notify you when something interesting happens.
+ * Availability: Since Chrome 21.
+ */
+declare module chrome.events {
+ /** Filters URLs for various criteria. See event filtering. All criteria are case sensitive. */
+ interface UrlFilter {
+ /** Optional. Matches if the scheme of the URL is equal to any of the schemes specified in the array. */
+ schemes?: string[];
+ /**
+ * Optional.
+ * Since Chrome 23.
+ * Matches if the URL (without fragment identifier) matches a specified regular expression. Port numbers are stripped from the URL if they match the default port number. The regular expressions use the RE2 syntax.
+ */
+ urlMatches?: string;
+ /** Optional. Matches if the path segment of the URL contains a specified string. */
+ pathContains?: string;
+ /** Optional. Matches if the host name of the URL ends with a specified string. */
+ hostSuffix?: string;
+ /** Optional. Matches if the host name of the URL starts with a specified string. */
+ hostPrefix?: string;
+ /** Optional. Matches if the host name of the URL contains a specified string. To test whether a host name component has a prefix 'foo', use hostContains: '.foo'. This matches 'www.foobar.com' and 'foo.com', because an implicit dot is added at the beginning of the host name. Similarly, hostContains can be used to match against component suffix ('foo.') and to exactly match against components ('.foo.'). Suffix- and exact-matching for the last components need to be done separately using hostSuffix, because no implicit dot is added at the end of the host name. */
+ hostContains?: string;
+ /** Optional. Matches if the URL (without fragment identifier) contains a specified string. Port numbers are stripped from the URL if they match the default port number. */
+ urlContains?: string;
+ /** Optional. Matches if the query segment of the URL ends with a specified string. */
+ querySuffix?: string;
+ /** Optional. Matches if the URL (without fragment identifier) starts with a specified string. Port numbers are stripped from the URL if they match the default port number. */
+ urlPrefix?: string;
+ /** Optional. Matches if the host name of the URL is equal to a specified string. */
+ hostEquals?: string;
+ /** Optional. Matches if the URL (without fragment identifier) is equal to a specified string. Port numbers are stripped from the URL if they match the default port number. */
+ urlEquals?: string;
+ /** Optional. Matches if the query segment of the URL contains a specified string. */
+ queryContains?: string;
+ /** Optional. Matches if the path segment of the URL starts with a specified string. */
+ pathPrefix?: string;
+ /** Optional. Matches if the path segment of the URL is equal to a specified string. */
+ pathEquals?: string;
+ /** Optional. Matches if the path segment of the URL ends with a specified string. */
+ pathSuffix?: string;
+ /** Optional. Matches if the query segment of the URL is equal to a specified string. */
+ queryEquals?: string;
+ /** Optional. Matches if the query segment of the URL starts with a specified string. */
+ queryPrefix?: string;
+ /** Optional. Matches if the URL (without fragment identifier) ends with a specified string. Port numbers are stripped from the URL if they match the default port number. */
+ urlSuffix?: string;
+ /** Optional. Matches if the port of the URL is contained in any of the specified port lists. For example [80, 443, [1000, 1200]] matches all requests on port 80, 443 and in the range 1000-1200. */
+ ports?: any[];
+ /**
+ * Optional.
+ * Since Chrome 28.
+ * Matches if the URL without query segment and fragment identifier matches a specified regular expression. Port numbers are stripped from the URL if they match the default port number. The regular expressions use the RE2 syntax.
+ */
+ originAndPathMatches?: string;
+ }
+
+ /** An object which allows the addition and removal of listeners for a Chrome event. */
+ interface Event {
+ /**
+ * Registers an event listener callback to an event.
+ * @param callback Called when an event occurs. The parameters of this function depend on the type of event.
+ * The callback parameter should be a function that looks like this:
+ * function() {...};
+ */
+ addListener(callback: Function): void;
+ /**
+ * Returns currently registered rules.
+ * @param callback Called with registered rules.
+ * The callback parameter should be a function that looks like this:
+ * function(array of Rule rules) {...};
+ * Parameter rules: Rules that were registered, the optional parameters are filled with values.
+ */
+ getRules(callback: (rules: Rule[]) => void): void;
+ /**
+ * Returns currently registered rules.
+ * @param ruleIdentifiers If an array is passed, only rules with identifiers contained in this array are returned.
+ * @param callback Called with registered rules.
+ * The callback parameter should be a function that looks like this:
+ * function(array of Rule rules) {...};
+ * Parameter rules: Rules that were registered, the optional parameters are filled with values.
+ */
+ getRules(ruleIdentifiers: string[], callback: (rules: Rule[]) => void): void;
+ /**
+ * @param callback Listener whose registration status shall be tested.
+ */
+ hasListener(callback: Function): boolean;
+ /**
+ * Unregisters currently registered rules.
+ * @param ruleIdentifiers If an array is passed, only rules with identifiers contained in this array are unregistered.
+ * @param callback Called when rules were unregistered.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
+ */
+ removeRules(ruleIdentifiers?: string[], callback?: () => void): void;
+ /**
+ * Unregisters currently registered rules.
+ * @param callback Called when rules were unregistered.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
+ */
+ removeRules(callback?: () => void): void;
+ /**
+ * Registers rules to handle events.
+ * @param rules Rules to be registered. These do not replace previously registered rules.
+ * @param callback Called with registered rules.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function(array of Rule rules) {...};
+ * Parameter rules: Rules that were registered, the optional parameters are filled with values.
+ */
+ addRules(rules: Rule[], callback?: (rules: Rule[]) => void): void;
+ /**
+ * Deregisters an event listener callback from an event.
+ * @param callback Listener that shall be unregistered.
+ * The callback parameter should be a function that looks like this:
+ * function() {...};
+ */
+ removeListener(callback: () => void): void;
+ hasListeners(): boolean;
+ }
+
+ /** Description of a declarative rule for handling events. */
+ interface Rule {
+ /** Optional. Optional priority of this rule. Defaults to 100. */
+ priority?: number;
+ /** List of conditions that can trigger the actions. */
+ conditions: any[];
+ /** Optional. Optional identifier that allows referencing this rule. */
+ id?: string;
+ /** List of actions that are triggered if one of the condtions is fulfilled. */
+ actions: any[];
+ /**
+ * Optional.
+ * Since Chrome 28.
+ * Tags can be used to annotate rules and perform operations on sets of rules.
+ */
+ tags?: string[];
+ }
+}
+
+////////////////////
+// Extension
+////////////////////
+/**
+ * The chrome.extension API has utilities that can be used by any extension page. It includes support for exchanging messages between an extension and its content scripts or between extensions, as described in detail in Message Passing.
+ * Availability: Since Chrome 5.
+ */
+declare module chrome.extension {
+ interface FetchProperties {
+ /** Optional. The window to restrict the search to. If omitted, returns all views. */
+ windowId?: number;
+ /** Optional. The type of view to get. If omitted, returns all views (including background pages and tabs). Valid values: 'tab', 'notification', 'popup'. */
+ type?: string;
+ }
+
+ interface LastError {
+ /** Description of the error that has taken place. */
+ message: string;
+ }
+
+ interface OnRequestEvent extends chrome.events.Event {
+ /**
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(any request, runtime.MessageSender sender, function sendResponse) {...};
+ * Parameter request: The request sent by the calling script.
+ * Parameter sendResponse: Function to call (at most once) when you have a response. The argument should be any JSON-ifiable object, or undefined if there is no response. If you have more than one onRequest listener in the same document, then only one may send a response.
+ */
+ addListener(callback: (request: any, sender: runtime.MessageSender, sendResponse: () => void) => void): void;
+ /**
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(runtime.MessageSender sender, function sendResponse) {...};
+ * Parameter sendResponse: Function to call (at most once) when you have a response. The argument should be any JSON-ifiable object, or undefined if there is no response. If you have more than one onRequest listener in the same document, then only one may send a response.
+ */
+ addListener(callback: (sender: runtime.MessageSender, sendResponse: () => void) => void): void;
+ }
+
+ /**
+ * Since Chrome 7.
+ * True for content scripts running inside incognito tabs, and for extension pages running inside an incognito process. The latter only applies to extensions with 'split' incognito_behavior.
+ */
+ var inIncognitoContext: boolean;
+ /** Set for the lifetime of a callback if an ansychronous extension api has resulted in an error. If no error has occured lastError will be undefined. */
+ var lastError: LastError;
+
+ /** Returns the JavaScript 'window' object for the background page running inside the current extension. Returns null if the extension has no background page. */
+ export function getBackgroundPage(): Window;
+ /**
+ * Converts a relative path within an extension install directory to a fully-qualified URL.
+ * @param path A path to a resource within an extension expressed relative to its install directory.
+ */
+ export function getURL(path: string): string;
+ /**
+ * Sets the value of the ap CGI parameter used in the extension's update URL. This value is ignored for extensions that are hosted in the Chrome Extension Gallery.
+ * Since Chrome 9.
+ */
+ export function setUpdateUrlData(data: string): void;
+ /** Returns an array of the JavaScript 'window' objects for each of the pages running inside the current extension. */
+ export function getViews(fetchProperties?: FetchProperties): Window[];
+ /**
+ * Retrieves the state of the extension's access to the 'file://' scheme (as determined by the user-controlled 'Allow access to File URLs' checkbox.
+ * Since Chrome 12.
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(boolean isAllowedAccess) {...};
+ * Parameter isAllowedAccess: True if the extension can access the 'file://' scheme, false otherwise.
+ */
+ export function isAllowedFileSchemeAccess(callback: (isAllowedAccess: boolean) => void): void;
+ /**
+ * Retrieves the state of the extension's access to Incognito-mode (as determined by the user-controlled 'Allowed in Incognito' checkbox.
+ * Since Chrome 12.
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(boolean isAllowedAccess) {...};
+ * Parameter isAllowedAccess: True if the extension has access to Incognito mode, false otherwise.
+ */
+ export function isAllowedIncognitoAccess(callback: (isAllowedAccess: boolean) => void): void;
+ /**
+ * Sends a single request to other listeners within the extension. Similar to runtime.connect, but only sends a single request with an optional response. The extension.onRequest event is fired in each page of the extension.
+ * @deprecated Deprecated since Chrome 33. Please use runtime.sendMessage.
+ * @param extensionId The extension ID of the extension you want to connect to. If omitted, default is your own extension.
+ * @param responseCallback If you specify the responseCallback parameter, it should be a function that looks like this:
+ * function(any response) {...};
+ * Parameter response: The JSON response object sent by the handler of the request. If an error occurs while connecting to the extension, the callback will be called with no arguments and runtime.lastError will be set to the error message.
+ */
+ export function sendRequest(extensionId: string, request: any, responseCallback?: (response: any) => void): void;
+ /**
+ * Sends a single request to other listeners within the extension. Similar to runtime.connect, but only sends a single request with an optional response. The extension.onRequest event is fired in each page of the extension.
+ * @deprecated Deprecated since Chrome 33. Please use runtime.sendMessage.
+ * @param responseCallback If you specify the responseCallback parameter, it should be a function that looks like this:
+ * function(any response) {...};
+ * Parameter response: The JSON response object sent by the handler of the request. If an error occurs while connecting to the extension, the callback will be called with no arguments and runtime.lastError will be set to the error message.
+ */
+ export function sendRequest(request: any, responseCallback?: (response: any) => void): void;
+ /**
+ * Returns an array of the JavaScript 'window' objects for each of the tabs running inside the current extension. If windowId is specified, returns only the 'window' objects of tabs attached to the specified window.
+ * @deprecated Deprecated since Chrome 33. Please use extension.getViews {type: "tab"}.
+ */
+ export function getExtensionTabs(windowId?: number): Window[];
+
+ /**
+ * Fired when a request is sent from either an extension process or a content script.
+ * @deprecated Deprecated since Chrome 33. Please use runtime.onMessage.
+ */
+ var onRequest: OnRequestEvent;
+ /**
+ * Fired when a request is sent from another extension.
+ * @deprecated Deprecated since Chrome 33. Please use runtime.onMessageExternal.
+ */
+ var onRequestExternal: OnRequestEvent;
+}
+
+////////////////////
+// File Browser Handler
+////////////////////
+/**
+ * Use the chrome.fileBrowserHandler API to extend the Chrome OS file browser. For example, you can use this API to enable users to upload files to your website.
+ * Availability: Since Chrome 12.
+ * Permissions: "fileBrowserHandler"
+ * Important: This API works only on Chrome OS.
+ */
+declare module chrome.fileBrowserHandler {
+ interface SelectionParams {
+ /**
+ * Optional.
+ * List of file extensions that the selected file can have. The list is also used to specify what files to be shown in the select file dialog. Files with the listed extensions are only shown in the dialog. Extensions should not include the leading '.'. Example: ['jpg', 'png']
+ * Since Chrome 23.
+ */
+ allowedFileExtensions?: string[];
+ /** Suggested name for the file. */
+ suggestedName: string;
+ }
+
+ interface SelectionResult {
+ /** Optional. Selected file entry. It will be null if a file hasn't been selected. */
+ entry?: Object;
+ /** Whether the file has been selected. */
+ success: boolean;
+ }
+
+ /** Event details payload for fileBrowserHandler.onExecute event. */
+ interface FileHandlerExecuteEventDetails {
+ /** Optional. The ID of the tab that raised this event. Tab IDs are unique within a browser session. */
+ tab_id?: number;
+ /** Array of Entry instances representing files that are targets of this action (selected in ChromeOS file browser). */
+ entries: any[];
+ }
+
+ interface FileBrowserHandlerExecuteEvent extends chrome.events.Event {
+ /**
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(string id, FileHandlerExecuteEventDetails details) {...};
+ * Parameter id: File browser action id as specified in the listener component's manifest.
+ * Parameter details: File handler execute event details.
+ */
+ addListener(callback: (id: string, details: FileHandlerExecuteEventDetails) => void): void;
+ }
+
+ /**
+ * Prompts user to select file path under which file should be saved. When the file is selected, file access permission required to use the file (read, write and create) are granted to the caller. The file will not actually get created during the function call, so function caller must ensure its existence before using it. The function has to be invoked with a user gesture.
+ * Since Chrome 21.
+ * @param selectionParams Parameters that will be used while selecting the file.
+ * @param callback Function called upon completion.
+ * The callback parameter should be a function that looks like this:
+ * function(object result) {...};
+ * Parameter result: Result of the method.
+ */
+ export function selectFile(selectionParams: SelectionParams, callback: (result: SelectionResult) => void): void;
+
+ /** Fired when file system action is executed from ChromeOS file browser. */
+ var onExecute: FileBrowserHandlerExecuteEvent;
+}
+
+////////////////////
+// File System Provider
+////////////////////
+/**
+ * Use the chrome.fileSystemProvider API to create file systems, that can be accessible from the file manager on Chrome OS.
+ * Availability: Since Chrome 40.
+ * Permissions: "fileSystemProvider"
+ * Important: This API works only on Chrome OS.
+ */
+declare module chrome.fileSystemProvider {
+ interface OpenedFileInfo {
+ /** A request ID to be be used by consecutive read/write and close requests. */
+ openRequestId: number;
+ /** The path of the opened file. */
+ filePath: string;
+ /** Whether the file was opened for reading or writing. */
+ mode: string;
+ }
+
+ interface FileWatchersInfo {
+ /** The path of the entry being observed. */
+ entryPath: string;
+ /** Whether watching should include all child entries recursively. It can be true for directories only. */
+ recursive: boolean;
+ /** Optional. Tag used by the last notification for the watcher. */
+ lastTag?: string;
+ }
+
+ interface EntryMetadata {
+ /** True if it is a directory. */
+ isDirectory: boolean;
+ /** Name of this entry (not full path name). Must not contain '/'. For root it must be empty. */
+ name: string;
+ /** File size in bytes. */
+ size: number;
+ /** The last modified time of this entry. */
+ modificationTime: Date;
+ /** Optional. Mime type for the entry. */
+ mimeType?: string;
+ /** Optional. Thumbnail image as a data URI in either PNG, JPEG or WEBP format, at most 32 KB in size. Optional, but can be provided only when explicitly requested by the onGetMetadataRequested event. */
+ thumbnail?: string;
+ }
+
+ interface FileSystemInfo {
+ /** The identifier of the file system. */
+ fileSystemId: string;
+ /** A human-readable name for the file system. */
+ displayName: string;
+ /** Whether the file system supports operations which may change contents of the file system (such as creating, deleting or writing to files). */
+ writable: boolean;
+ /**
+ * The maximum number of files that can be opened at once. If 0, then not limited.
+ * @since Since Chrome 42.
+ */
+ openedFilesLimit: number;
+ /**
+ * List of currently opened files.
+ * @since Since Chrome 42.
+ */
+ openedFiles: OpenedFileInfo[];
+ /**
+ * Optional.
+ * Whether the file system supports the tag field for observing directories.
+ * @since Since Chrome 45. Warning: this is the current Beta channel.
+ */
+ supportsNotifyTag?: boolean;
+ /**
+ * List of watchers.
+ * @since Since Chrome 45. Warning: this is the current Beta channel.
+ */
+ watchers: FileWatchersInfo[];
+ }
+
+ /** @since Since Chrome 45. Warning: this is the current Beta channel. */
+ interface GetActionsRequestedOptions {
+ /** The identifier of the file system related to this operation. */
+ fileSystemId: string;
+ /** The unique identifier of this request. */
+ requestId: number;
+ /** The path of the entry to return the list of actions for. */
+ entryPath: string;
+ }
+
+ /** @since Since Chrome 45. Warning: this is the current Beta channel. */
+ interface Action {
+ /** The identifier of the action. Any string or CommonActionId for common actions. */
+ id: string;
+ /** Optional. The title of the action. It may be ignored for common actions. */
+ title?: string;
+ }
+
+ /** @since Since Chrome 45. Warning: this is the current Beta channel. */
+ interface ExecuteActionRequestedOptions {
+ /** The identifier of the file system related to this operation. */
+ fileSystemId: string;
+ /** The unique identifier of this request. */
+ requestId: number;
+ /** The path of the entry to be used for the action. */
+ entryPath: string;
+ /** The identifier of the action to be executed. */
+ actionId: string;
+ }
+
+ interface MountOptions {
+ /** The string indentifier of the file system. Must be unique per each extension. */
+ fileSystemId: string;
+ /** A human-readable name for the file system. */
+ displayName: string;
+ /** Optional. Whether the file system supports operations which may change contents of the file system (such as creating, deleting or writing to files). */
+ writable?: boolean;
+ /**
+ * Optional.
+ * The maximum number of files that can be opened at once. If not specified, or 0, then not limited.
+ * @since Since Chrome 41.
+ */
+ openedFilesLimit?: number;
+ /**
+ * Optional.
+ * Whether the file system supports the tag field for observed directories.
+ * @since Since Chrome 45. Warning: this is the current Beta channel.
+ */
+ supportsNotifyTag?: boolean;
+ }
+
+ interface UnmountOptions {
+ /** The identifier of the file system to be unmounted. */
+ fileSystemId: string;
+ }
+
+ interface NotificationChange {
+ /** The path of the changed entry. */
+ entryPath: string;
+ /** The type of the change which happened to the entry. */
+ changeType: string;
+ }
+
+ interface NotificationOptions {
+ /** The identifier of the file system related to this change. */
+ fileSystemId: string;
+ /** The path of the observed entry. */
+ observedPath: string;
+ /** Mode of the observed entry. */
+ recursive: boolean;
+ /** The type of the change which happened to the observed entry. If it is DELETED, then the observed entry will be automatically removed from the list of observed entries. */
+ changeType: string;
+ /** Optional. List of changes to entries within the observed directory (including the entry itself) */
+ changes?: NotificationChange[];
+ /** Optional. Tag for the notification. Required if the file system was mounted with the supportsNotifyTag option. Note, that this flag is necessary to provide notifications about changes which changed even when the system was shutdown. */
+ tag?: string;
+ }
+
+ interface RequestedEventOptions {
+ /** The identifier of the file system related to this operation. */
+ fileSystemId: string;
+ /** The unique identifier of this request. */
+ requestId: number;
+ }
+
+ interface EntryPathRequestedEventOptions extends RequestedEventOptions {
+ /** The path of the entry to which this operation is related to. */
+ entryPath: string;
+ }
+
+ interface MetadataRequestedEventOptions extends EntryPathRequestedEventOptions {
+ /** Set to true if the thumbnail is requested. */
+ thumbnail: boolean;
+ }
+
+ interface DirectoryPathRequestedEventOptions extends RequestedEventOptions {
+ /** The path of the directory which is to be operated on. */
+ directoryPath: string;
+ }
+
+ interface FilePathRequestedEventOptions extends RequestedEventOptions {
+ /** The path of the entry for the operation */
+ filePath: string;
+ }
+
+ interface OpenFileRequestedEventOptions extends FilePathRequestedEventOptions {
+ /** Whether the file will be used for reading or writing. */
+ mode: string;
+ }
+
+ interface OpenedFileRequestedEventOptions extends RequestedEventOptions {
+ /** A request ID used to open the file. */
+ openRequestId: number;
+ }
+
+ interface OpenedFileOffsetRequestedEventOptions extends OpenedFileRequestedEventOptions {
+ /** Position in the file (in bytes) to start reading from. */
+ offset: number;
+ /** Number of bytes to be returned. */
+ length: number;
+ }
+
+ interface DirectoryPathRecursiveRequestedEventOptions extends DirectoryPathRequestedEventOptions {
+ /** Whether the operation is recursive (for directories only). */
+ recursive: boolean;
+ }
+
+ interface EntryPathRecursiveRequestedEventOptions extends EntryPathRequestedEventOptions {
+ /** Whether the operation is recursive (for directories only). */
+ recursive: boolean;
+ }
+
+ interface SourceTargetPathRequestedEventOptions extends RequestedEventOptions {
+ /** The source path for the operation. */
+ sourcePath: string;
+ /** The destination path for the operation. */
+ targetPath: string;
+ }
+
+ interface FilePathLengthRequestedEventOptions extends FilePathRequestedEventOptions {
+ /** Number of bytes to be retained after the operation completes. */
+ length: number;
+ }
+
+ interface OpenedFileIoRequestedEventOptions extends OpenedFileRequestedEventOptions {
+ /** Position in the file (in bytes) to start operating from. */
+ offset: number;
+ /** Buffer of bytes to be operated on the file. */
+ data: ArrayBuffer;
+ }
+
+ interface OperationRequestedEventOptions extends RequestedEventOptions {
+ /** An ID of the request to which this operation is related. */
+ operationRequestId: number;
+ }
+
+ interface RequestedEvent extends chrome.events.Event {
+ /**
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(object options, function successCallback, function errorCallback) {...};
+ */
+ addListener(callback: (options: RequestedEventOptions, successCallback: Function, errorCallback: (error: string) => void) => void): void;
+ }
+
+ interface MetadataRequestedEvent extends chrome.events.Event {
+ /**
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(object options, function successCallback, function errorCallback) {...};
+ */
+ addListener(callback: (options: MetadataRequestedEventOptions, successCallback: (metadata: EntryMetadata) => void, errorCallback: (error: string) => void) => void): void;
+ }
+
+ interface DirectoryPathRequestedEvent extends chrome.events.Event {
+ /**
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(object options, function successCallback, function errorCallback) {...};
+ */
+ addListener(callback: (options: DirectoryPathRequestedEventOptions, successCallback: (entries: EntryMetadata[], hasMore: boolean) => void, errorCallback: (error: string) => void) => void): void;
+ }
+
+ interface OpenFileRequestedEvent extends chrome.events.Event {
+ /**
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(object options, function successCallback, function errorCallback) {...};
+ */
+ addListener(callback: (options: OpenFileRequestedEventOptions, successCallback: Function, errorCallback: (error: string) => void) => void): void;
+ }
+
+ interface OpenedFileRequestedEvent extends chrome.events.Event {
+ /**
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(object options, function successCallback, function errorCallback) {...};
+ */
+ addListener(callback: (options: OpenedFileRequestedEventOptions, successCallback: Function, errorCallback: (error: string) => void) => void): void;
+ }
+
+ interface OpenedFileOffsetRequestedEvent extends chrome.events.Event {
+ /**
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(object options, function successCallback, function errorCallback) {...};
+ */
+ addListener(callback: (options: OpenedFileOffsetRequestedEventOptions, successCallback: (data: ArrayBuffer, hasMore: boolean) => void, errorCallback: (error: string) => void) => void): void;
+ }
+
+ interface DirectoryPathRecursiveRequestedEvent extends chrome.events.Event {
+ /**
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(object options, function successCallback, function errorCallback) {...};
+ */
+ addListener(callback: (options: DirectoryPathRecursiveRequestedEventOptions, successCallback: Function, errorCallback: (error: string) => void) => void): void;
+ }
+
+ interface EntryPathRecursiveRequestedEvent extends chrome.events.Event {
+ /**
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(object options, function successCallback, function errorCallback) {...};
+ */
+ addListener(callback: (options: EntryPathRecursiveRequestedEventOptions, successCallback: Function, errorCallback: (error: string) => void) => void): void;
+ }
+
+ interface FilePathRequestedEvent extends chrome.events.Event {
+ /**
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(object options, function successCallback, function errorCallback) {...};
+ */
+ addListener(callback: (options: FilePathRequestedEventOptions, successCallback: Function, errorCallback: (error: string) => void) => void): void;
+ }
+
+ interface SourceTargetPathRequestedEvent extends chrome.events.Event {
+ /**
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(object options, function successCallback, function errorCallback) {...};
+ */
+ addListener(callback: (options: SourceTargetPathRequestedEventOptions, successCallback: Function, errorCallback: (error: string) => void) => void): void;
+ }
+
+ interface FilePathLengthRequestedEvent extends chrome.events.Event {
+ /**
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(object options, function successCallback, function errorCallback) {...};
+ */
+ addListener(callback: (options: FilePathLengthRequestedEventOptions, successCallback: Function, errorCallback: (error: string) => void) => void): void;
+ }
+
+ interface OpenedFileIoRequestedEvent extends chrome.events.Event {
+ /**
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(object options, function successCallback, function errorCallback) {...};
+ */
+ addListener(callback: (options: OpenedFileIoRequestedEventOptions, successCallback: Function, errorCallback: (error: string) => void) => void): void;
+ }
+
+ interface OperationRequestedEvent extends chrome.events.Event {
+ /**
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(object options, function successCallback, function errorCallback) {...};
+ */
+ addListener(callback: (options: OperationRequestedEventOptions, successCallback: Function, errorCallback: (error: string) => void) => void): void;
+ }
+
+ interface OptionlessRequestedEvent extends chrome.events.Event {
+ /**
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(function successCallback, function errorCallback) {...};
+ */
+ addListener(callback: (successCallback: Function, errorCallback: (error: string) => void) => void): void;
+ }
+
+ /**
+ * Mounts a file system with the given fileSystemId and displayName. displayName will be shown in the left panel of Files.app. displayName can contain any characters including '/', but cannot be an empty string. displayName must be descriptive but doesn't have to be unique. The fileSystemId must not be an empty string.
+ * Depending on the type of the file system being mounted, the source option must be set appropriately.
+ * In case of an error, runtime.lastError will be set with a corresponding error code.
+ * @param callback A generic result callback to indicate success or failure.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
+ */
+ export function mount(options: MountOptions, callback?: () => void): void;
+ /**
+ * Unmounts a file system with the given fileSystemId. It must be called after onUnmountRequested is invoked. Also, the providing extension can decide to perform unmounting if not requested (eg. in case of lost connection, or a file error).
+ * In case of an error, runtime.lastError will be set with a corresponding error code.
+ * @param callback A generic result callback to indicate success or failure.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
+ */
+ export function unmount(options: UnmountOptions, callback?: () => void): void;
+ /**
+ * Returns all file systems mounted by the extension.
+ * @param callback Callback to receive the result of getAll function.
+ * The callback parameter should be a function that looks like this:
+ * function(array of FileSystemInfo fileSystems) {...};
+ */
+ export function getAll(callback: (fileSystems: FileSystemInfo[]) => void): void;
+ /**
+ * Returns information about a file system with the passed fileSystemId.
+ * @since Since Chrome 42.
+ * @param callback Callback to receive the result of get function.
+ * The callback parameter should be a function that looks like this:
+ * function(FileSystemInfo fileSystem) {...};
+ */
+ export function get(fileSystemId: string, callback: (fileSystem: FileSystemInfo) => void): void;
+ /**
+ * Notifies about changes in the watched directory at observedPath in recursive mode. If the file system is mounted with supportsNofityTag, then tag must be provided, and all changes since the last notification always reported, even if the system was shutdown. The last tag can be obtained with getAll.
+ * To use, the file_system_provider.notify manifest option must be set to true.
+ * Value of tag can be any string which is unique per call, so it's possible to identify the last registered notification. Eg. if the providing extension starts after a reboot, and the last registered notification's tag is equal to "123", then it should call notify for all changes which happened since the change tagged as "123". It cannot be an empty string.
+ * Not all providers are able to provide a tag, but if the file system has a changelog, then the tag can be eg. a change number, or a revision number.
+ * Note that if a parent directory is removed, then all descendant entries are also removed, and if they are watched, then the API must be notified about the fact. Also, if a directory is renamed, then all descendant entries are in fact removed, as there is no entry under their original paths anymore.
+ * In case of an error, runtime.lastError will be set will a corresponding error code.
+ * @param callback A generic result callback to indicate success or failure.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
+ */
+ export function notify(options: NotificationOptions, callback: () => void): void;
+
+ /** Raised when unmounting for the file system with the fileSystemId identifier is requested. In the response, the unmount API method must be called together with successCallback. If unmounting is not possible (eg. due to a pending operation), then errorCallback must be called. */
+ var onUnmountRequested: RequestedEvent;
+ /** Raised when metadata of a file or a directory at entryPath is requested. The metadata must be returned with the successCallback call. In case of an error, errorCallback must be called. */
+ var onGetMetadataRequested: MetadataRequestedEvent;
+ /** Raised when contents of a directory at directoryPath are requested. The results must be returned in chunks by calling the successCallback several times. In case of an error, errorCallback must be called. */
+ var onReadDirectoryRequested: DirectoryPathRequestedEvent;
+ /** Raised when opening a file at filePath is requested. If the file does not exist, then the operation must fail. Maximum number of files opened at once can be specified with MountOptions. */
+ var onOpenFileRequested: OpenFileRequestedEvent;
+ /** Raised when opening a file previously opened with openRequestId is requested to be closed. */
+ var onCloseFileRequested: OpenedFileRequestedEvent;
+ /** Raised when reading contents of a file opened previously with openRequestId is requested. The results must be returned in chunks by calling successCallback several times. In case of an error, errorCallback must be called. */
+ var onReadFileRequested: OpenedFileOffsetRequestedEvent;
+ /** Raised when creating a directory is requested. The operation must fail with the EXISTS error if the target directory already exists. If recursive is true, then all of the missing directories on the directory path must be created. */
+ var onCreateDirectoryRequested: DirectoryPathRecursiveRequestedEvent;
+ /** Raised when deleting an entry is requested. If recursive is true, and the entry is a directory, then all of the entries inside must be recursively deleted as well. */
+ var onDeleteEntryRequested: EntryPathRecursiveRequestedEvent;
+ /** Raised when creating a file is requested. If the file already exists, then errorCallback must be called with the "EXISTS" error code. */
+ var onCreateFileRequested: FilePathRequestedEvent;
+ /** Raised when copying an entry (recursively if a directory) is requested. If an error occurs, then errorCallback must be called. */
+ var onCopyEntryRequested: SourceTargetPathRequestedEvent;
+ /** Raised when moving an entry (recursively if a directory) is requested. If an error occurs, then errorCallback must be called. */
+ var onMoveEntryRequested: SourceTargetPathRequestedEvent;
+ /** Raised when truncating a file to a desired length is requested. If an error occurs, then errorCallback must be called. */
+ var onTruncateRequested: FilePathLengthRequestedEvent;
+ /** Raised when writing contents to a file opened previously with openRequestId is requested. */
+ var onWriteFileRequested: OpenedFileIoRequestedEvent;
+ /** Raised when aborting an operation with operationRequestId is requested. The operation executed with operationRequestId must be immediately stopped and successCallback of this abort request executed. If aborting fails, then errorCallback must be called. Note, that callbacks of the aborted operation must not be called, as they will be ignored. Despite calling errorCallback, the request may be forcibly aborted. */
+ var onAbortRequested: OperationRequestedEvent;
+ /**
+ * Raised when showing a configuration dialog for fileSystemId is requested. If it's handled, the file_system_provider.configurable manfiest option must be set to true.
+ * @since Since Chrome 44.
+ */
+ var onConfigureRequested: RequestedEvent;
+ /**
+ * Raised when showing a dialog for mounting a new file system is requested. If the extension/app is a file handler, then this event shouldn't be handled. Instead app.runtime.onLaunched should be handled in order to mount new file systems when a file is opened. For multiple mounts, the file_system_provider.multiple_mounts manifest option must be set to true.
+ * @since Since Chrome 44.
+ */
+ var onMountRequested: OptionlessRequestedEvent;
+ /**
+ * Raised when setting a new directory watcher is requested. If an error occurs, then errorCallback must be called.
+ * @since Since Chrome 45. Warning: this is the current Beta channel.
+ */
+ var onAddWatcherRequested: EntryPathRecursiveRequestedEvent;
+ /**
+ * Raised when the watcher should be removed. If an error occurs, then errorCallback must be called.
+ * @since Since Chrome 45. Warning: this is the current Beta channel.
+ */
+ var onRemoveWatcherRequested: EntryPathRecursiveRequestedEvent;
+}
+
+////////////////////
+// Font Settings
+////////////////////
+/**
+ * Use the chrome.fontSettings API to manage Chrome's font settings.
+ * Availability: Since Chrome 22.
+ * Permissions: "fontSettings"
+ */
+declare module chrome.fontSettings {
+ /** Represents a font name. */
+ interface FontName {
+ /** The display name of the font. */
+ displayName: string;
+ /** The font ID. */
+ fontId: string;
+ }
+
+ interface DefaultFontSizeDetails {
+ /** The font size in pixels. */
+ pixelSize: number;
+ }
+
+ interface FontDetails {
+ /** The generic font family for the font. */
+ genericFamily: string;
+ /** Optional. The script for the font. If omitted, the global script font setting is affected. */
+ script?: string;
+ }
+
+ interface FullFontDetails {
+ /** The generic font family for which the font setting has changed. */
+ genericFamily: string;
+ /** The level of control this extension has over the setting. */
+ levelOfControl: string;
+ /** Optional. The script code for which the font setting has changed. */
+ script?: string;
+ /** The font ID. See the description in getFont. */
+ fontId: string;
+ }
+
+ interface FontDetailsResult {
+ /** The level of control this extension has over the setting. */
+ levelOfControl: string;
+ /** The font ID. Rather than the literal font ID preference value, this may be the ID of the font that the system resolves the preference value to. So, fontId can differ from the font passed to setFont, if, for example, the font is not available on the system. The empty string signifies fallback to the global script font setting. */
+ fontId: string;
+ }
+
+ interface FontSizeDetails {
+ /** The font size in pixels. */
+ pixelSize: number;
+ /** The level of control this extension has over the setting. */
+ levelOfControl: string;
+ }
+
+ interface SetFontSizeDetails {
+ /** The font size in pixels. */
+ pixelSize: number;
+ }
+
+ interface SetFontDetails extends FontDetails {
+ /** The font ID. The empty string means to fallback to the global script font setting. */
+ fontId: string;
+ }
+
+ interface DefaultFixedFontSizeChangedEvent extends chrome.events.Event {
+ /**
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(object details) {...};
+ */
+ addListener(callback: (details: FontSizeDetails) => void): void;
+ }
+
+ interface DefaultFontSizeChangedEvent extends chrome.events.Event {
+ /**
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(object details) {...};
+ */
+ addListener(callback: (details: FontSizeDetails) => void): void;
+ }
+
+ interface MinimumFontSizeChangedEvent extends chrome.events.Event {
+ /**
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(object details) {...};
+ */
+ addListener(callback: (details: FontSizeDetails) => void): void;
+ }
+
+ interface FontChangedEvent extends chrome.events.Event {
+ /**
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(object details) {...};
+ */
+ addListener(callback: (details: FullFontDetails) => void): void;
+ }
+
+ /**
+ * Sets the default font size.
+ * @param callback If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
+ */
+ export function setDefaultFontSize(details: DefaultFontSizeDetails, callback?: Function): void;
+ /**
+ * Gets the font for a given script and generic font family.
+ * @param callback If you specify the callback parameter, it should be a function that looks like this:
+ * function(object details) {...};
+ */
+ export function getFont(details: FontDetails, callback?: (details: FontDetailsResult) => void): void;
+ /**
+ * Gets the default font size.
+ * @param details This parameter is currently unused.
+ * @param callback If you specify the callback parameter, it should be a function that looks like this:
+ * function(object details) {...};
+ */
+ export function getDefaultFontSize(details?: Object, callback?: (options: FontSizeDetails) => void): void;
+ /**
+ * Gets the minimum font size.
+ * @param details This parameter is currently unused.
+ * @param callback If you specify the callback parameter, it should be a function that looks like this:
+ * function(object details) {...};
+ */
+ export function getMinimumFontSize(details?: FontSizeDetails, callback?: (options: FontSizeDetails) => void): void;
+ /**
+ * Sets the minimum font size.
+ * @param callback If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
+ */
+ export function setMinimumFontSize(details: SetFontSizeDetails, callback?: Function): void;
+ /**
+ * Gets the default size for fixed width fonts.
+ * @param details This parameter is currently unused.
+ * @param callback If you specify the callback parameter, it should be a function that looks like this:
+ * function(object details) {...};
+ */
+ export function getDefaultFixedFontSize(details?: Object, callback?: (details: FontSizeDetails) => void): void;
+ /**
+ * Clears the default font size set by this extension, if any.
+ * @param details This parameter is currently unused.
+ * @param callback If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
+ */
+ export function clearDefaultFontSize(details?: Object, callback?: Function): void;
+ /**
+ * Sets the default size for fixed width fonts.
+ * @param callback If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
+ */
+ export function setDefaultFixedFontSize(details: SetFontSizeDetails, callback?: Function): void;
+ /**
+ * Clears the font set by this extension, if any.
+ * @param callback If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
+ */
+ export function clearFont(details: FontDetails, callback?: Function): void;
+ /**
+ * Sets the font for a given script and generic font family.
+ * @param callback If you specify the callback parameter, it should be a function that looks like this:
+ * function(object details) {...};
+ */
+ export function setFont(details: SetFontDetails, callback?: Function): void;
+ /**
+ * Clears the minimum font size set by this extension, if any.
+ * @param details This parameter is currently unused.
+ * @param callback If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
+ */
+ export function clearMinimumFontSize(details?: Object, callback?: Function): void;
+ /**
+ * Gets a list of fonts on the system.
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(array of FontName results) {...};
+ */
+ export function getFontList(callback: (results: FontName[]) => void): void;
+ /**
+ * Clears the default fixed font size set by this extension, if any.
+ * @param details This parameter is currently unused.
+ * @param callback If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
+ */
+ export function clearDefaultFixedFontSize(details: Object, callback?: Function): void;
+
+ /** Fired when the default fixed font size setting changes. */
+ var onDefaultFixedFontSizeChanged: DefaultFixedFontSizeChangedEvent;
+ /** Fired when the default font size setting changes. */
+ var onDefaultFontSizeChanged: DefaultFontSizeChangedEvent;
+ /** Fired when the minimum font size setting changes. */
+ var onMinimumFontSizeChanged: MinimumFontSizeChangedEvent;
+ /** Fired when a font setting changes. */
+ var onFontChanged: FontChangedEvent;
+}
+
+////////////////////
+// Google Cloud Messaging
+////////////////////
+/**
+ * Use chrome.gcm to enable apps and extensions to send and receive messages through the Google Cloud Messaging Service.
+ * Availability: Since Chrome 35.
+ * Permissions: "gcm"
+ */
+declare module chrome.gcm {
+ interface OutgoingMessage {
+ /** The ID of the server to send the message to as assigned by Google API Console. */
+ destinationId: string;
+ /** The ID of the message. It must be unique for each message in scope of the applications. See the Cloud Messaging documentation for advice for picking and handling an ID. */
+ messageId: string;
+ /** Optional. Time-to-live of the message in seconds. If it is not possible to send the message within that time, an onSendError event will be raised. A time-to-live of 0 indicates that the message should be sent immediately or fail if it's not possible. The maximum and a default value of time-to-live is 86400 seconds (1 day). */
+ timeToLive?: number;
+ /** Message data to send to the server. Case-insensitive goog. and google, as well as case-sensitive collapse_key are disallowed as key prefixes. Sum of all key/value pairs should not exceed gcm.MAX_MESSAGE_SIZE. */
+ data: Object;
+ }
+
+ interface IncomingMessage {
+ /** The message data. */
+ data: Object;
+ /**
+ * Optional.
+ * The sender who issued the message.
+ * @since Since Chrome 41.
+ */
+ from?: string;
+ /**
+ * Optional.
+ * The collapse key of a message. See Collapsible Messages section of Cloud Messaging documentation for details.
+ */
+ collapseKey?: string;
+ }
+
+ interface GcmError {
+ /** The error message describing the problem. */
+ errorMessage: string;
+ /** Optional. The ID of the message with this error, if error is related to a specific message. */
+ messageId?: string;
+ /** Additional details related to the error, when available. */
+ detail: Object;
+ }
+
+ interface MessageReceptionEvent extends chrome.events.Event {
+ /**
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(object message) {...};
+ * Parameter message: A message received from another party via GCM.
+ */
+ addListener(callback: (message: IncomingMessage) => void): void;
+ }
+
+ interface MessageDeletionEvent extends chrome.events.Event {
+ /**
+ * @param callback The callback parameter should be a function that looks like this:
+ * function() {...};
+ */
+ addListener(callback: () => void): void;
+ }
+
+ interface GcmErrorEvent extends chrome.events.Event {
+ /**
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(object error) {...};
+ * Parameter error: An error that occured while trying to send the message either in Chrome or on the GCM server. Application can retry sending the message with a reasonable backoff and possibly longer time-to-live.
+ */
+ addListener(callback: (error: GcmError) => void): void;
+ }
+
+ /** The maximum size (in bytes) of all key/value pairs in a message. */
+ var MAX_MESSAGE_SIZE: number;
+
+ /**
+ * Registers the application with GCM. The registration ID will be returned by the callback. If register is called again with the same list of senderIds, the same registration ID will be returned.
+ * @param senderIds A list of server IDs that are allowed to send messages to the application. It should contain at least one and no more than 100 sender IDs.
+ * @param callback Function called when registration completes. It should check runtime.lastError for error when registrationId is empty.
+ * The callback parameter should be a function that looks like this:
+ * function(string registrationId) {...};
+ * Parameter registrationId: A registration ID assigned to the application by the GCM.
+ */
+ export function register(senderIds: string[], callback: (registrationId: string) => void): void;
+ /**
+ * Unregisters the application from GCM.
+ * @param callback A function called after the unregistration completes. Unregistration was successful if runtime.lastError is not set.
+ * The callback parameter should be a function that looks like this:
+ * function() {...};
+ */
+ export function unregister(callback: () => void): void;
+ /**
+ * Sends a message according to its contents.
+ * @param message A message to send to the other party via GCM.
+ * @param callback A function called after the message is successfully queued for sending. runtime.lastError should be checked, to ensure a message was sent without problems.
+ * The callback parameter should be a function that looks like this:
+ * function(string messageId) {...};
+ * Parameter messageId: The ID of the message that the callback was issued for.
+ */
+ export function send(message: OutgoingMessage, callback: (messageId: string) => void): void;
+
+ /** Fired when a message is received through GCM. */
+ var onMessage: MessageReceptionEvent;
+ /** Fired when a GCM server had to delete messages sent by an app server to the application. See Messages deleted event section of Cloud Messaging documentation for details on handling this event. */
+ var onMessagesDeleted: MessageDeletionEvent;
+ /** Fired when it was not possible to send a message to the GCM server. */
+ var onSendError: GcmErrorEvent;
+}
+
+////////////////////
+// History
+////////////////////
+/**
+ * Use the chrome.history API to interact with the browser's record of visited pages. You can add, remove, and query for URLs in the browser's history. To override the history page with your own version, see Override Pages.
+ * Availability: Since Chrome 5.
+ * Permissions: "history"
+ */
+declare module chrome.history {
+ /** An object encapsulating one visit to a URL. */
+ interface VisitItem {
+ /** The transition type for this visit from its referrer. */
+ transition: string;
+ /** Optional. When this visit occurred, represented in milliseconds since the epoch. */
+ visitTime?: number;
+ /** The unique identifier for this visit. */
+ visitId: string;
+ /** The visit ID of the referrer. */
+ referringVisitId: string;
+ /** The unique identifier for the item. */
+ id: string;
+ }
+
+ /** An object encapsulating one result of a history query. */
+ interface HistoryItem {
+ /** Optional. The number of times the user has navigated to this page by typing in the address. */
+ typedCount?: number;
+ /** Optional. The title of the page when it was last loaded. */
+ title?: string;
+ /** Optional. The URL navigated to by a user. */
+ url?: string;
+ /** Optional. When this page was last loaded, represented in milliseconds since the epoch. */
+ lastVisitTime?: number;
+ /** Optional. The number of times the user has navigated to this page. */
+ visitCount?: number;
+ /** The unique identifier for the item. */
+ id: string;
+ }
+
+ interface HistoryQuery {
+ /** A free-text query to the history service. Leave empty to retrieve all pages. */
+ text: string;
+ /** Optional. The maximum number of results to retrieve. Defaults to 100. */
+ maxResults?: number;
+ /** Optional. Limit results to those visited after this date, represented in milliseconds since the epoch. */
+ startTime?: number;
+ /** Optional. Limit results to those visited before this date, represented in milliseconds since the epoch. */
+ endTime?: number;
+ }
+
+ interface Url {
+ /** The URL for the operation. It must be in the format as returned from a call to history.search. */
+ url: string;
+ }
+
+ interface Range {
+ /** Items added to history before this date, represented in milliseconds since the epoch. */
+ endTime: number;
+ /** Items added to history after this date, represented in milliseconds since the epoch. */
+ startTime: number;
+ }
+
+ interface RemovedResult {
+ /** True if all history was removed. If true, then urls will be empty. */
+ allHistory: boolean;
+ /** Optional. */
+ urls?: string[];
+ }
+
+ interface HistoryVisitedEvent extends chrome.events.Event {
+ /**
+ * @param callback The callback parameter should be a function that looks like this:
+ * function( HistoryItem result) {...};
+ */
+ addListener(callback: (result: HistoryItem) => void): void;
+ }
+
+ interface HistoryVisitRemovedEvent extends chrome.events.Event {
+ /**
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(object removed) {...};
+ */
+ addListener(callback: (removed: RemovedResult) => void): void;
+ }
+
+ /**
+ * Searches the history for the last visit time of each page matching the query.
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(array of HistoryItem results) {...};
+ */
+ export function search(query: HistoryQuery, callback: (results: HistoryItem[]) => void): void;
+ /**
+ * Adds a URL to the history at the current time with a transition type of "link".
+ * @param callback If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
+ */
+ export function addUrl(details: Url, callback?: () => void): void;
+ /**
+ * Removes all items within the specified date range from the history. Pages will not be removed from the history unless all visits fall within the range.
+ * @param callback The callback parameter should be a function that looks like this:
+ * function() {...};
+ */
+ export function deleteRange(range: Range, callback: () => void): void;
+ /**
+ * Deletes all items from the history.
+ * @param callback The callback parameter should be a function that looks like this:
+ * function() {...};
+ */
+ export function deleteAll(callback: () => void): void;
+ /**
+ * Retrieves information about visits to a URL.
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(array of VisitItem results) {...};
+ */
+ export function getVisits(details: Url, callback: (results: VisitItem[]) => void): void;
+ /**
+ * Removes all occurrences of the given URL from the history.
+ * @param callback If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
+ */
+ export function deleteUrl(details: Url, callback?: () => void): void;
+
+ /** Fired when a URL is visited, providing the HistoryItem data for that URL. This event fires before the page has loaded. */
+ var onVisited: HistoryVisitedEvent;
+ /** Fired when one or more URLs are removed from the history service. When all visits have been removed the URL is purged from history. */
+ var onVisitRemoved: HistoryVisitRemovedEvent;
+}
+
+////////////////////
+// i18n
+////////////////////
+/**
+ * Use the chrome.i18n infrastructure to implement internationalization across your whole app or extension.
+ * @since Chrome 5.
+ */
+declare module chrome.i18n {
+ /**
+ * Gets the accept-languages of the browser. This is different from the locale used by the browser; to get the locale, use i18n.getUILanguage.
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(array of string languages) {...};
+ * Parameter languages: Array of the accept languages of the browser, such as en-US,en,zh-CN
+ */
+ export function getAcceptLanguages(callback: (languages: string[]) => void): void;
+ /**
+ * Gets the localized string for the specified message. If the message is missing, this method returns an empty string (''). If the format of the getMessage() call is wrong — for example, messageName is not a string or the substitutions array has more than 9 elements — this method returns undefined.
+ * @param messageName The name of the message, as specified in the messages.json file.
+ * @param substitutions Optional. Up to 9 substitution strings, if the message requires any.
+ */
+ export function getMessage(messageName: string, substitutions?: any): string;
+ /**
+ * Gets the browser UI language of the browser. This is different from i18n.getAcceptLanguages which returns the preferred user languages.
+ * @since Chrome 35.
+ */
+ export function getUILanguage(): string;
+}
+
+////////////////////
+// Identity
+////////////////////
+/**
+ * Use the chrome.identity API to get OAuth2 access tokens.
+ * Permissions: "identity"
+ * @since Chrome 29.
+ */
+declare module chrome.identity {
+ /** @since Chrome 32. */
+ interface AccountInfo {
+ /** A unique identifier for the account. This ID will not change for the lifetime of the account. */
+ id: string;
+ }
+
+ interface TokenDetails {
+ /**
+ * Optional.
+ * Fetching a token may require the user to sign-in to Chrome, or approve the application's requested scopes. If the interactive flag is true, getAuthToken will prompt the user as necessary. When the flag is false or omitted, getAuthToken will return failure any time a prompt would be required.
+ */
+ interactive?: boolean;
+ /**
+ * Optional.
+ * The account ID whose token should be returned. If not specified, the primary account for the profile will be used.
+ * account is only supported when the "enable-new-profile-management" flag is set.
+ * @since Chrome 37.
+ */
+ account?: AccountInfo;
+ /**
+ * Optional.
+ * A list of OAuth2 scopes to request.
+ * When the scopes field is present, it overrides the list of scopes specified in manifest.json.
+ * @since Chrome 37.
+ */
+ scopes?: string[];
+ }
+
+ interface UserInfo {
+ /** An email address for the user account signed into the current profile. Empty if the user is not signed in or the identity.email manifest permission is not specified. */
+ email: string;
+ /** A unique identifier for the account. This ID will not change for the lifetime of the account. Empty if the user is not signed in or (in M41+) the identity.email manifest permission is not specified. */
+ id: string;
+ }
+
+ interface TokenInformation {
+ /** The specific token that should be removed from the cache. */
+ token: string;
+ }
+
+ interface WebAuthFlowOptions {
+ /** The URL that initiates the auth flow. */
+ url: string;
+ /**
+ * Optional.
+ * Whether to launch auth flow in interactive mode.
+ * Since some auth flows may immediately redirect to a result URL, launchWebAuthFlow hides its web view until the first navigation either redirects to the final URL, or finishes loading a page meant to be displayed.
+ * If the interactive flag is true, the window will be displayed when a page load completes. If the flag is false or omitted, launchWebAuthFlow will return with an error if the initial navigation does not complete the flow.
+ */
+ interactive?: boolean;
+ }
+
+ interface SignInChangeEvent extends chrome.events.Event {
+ /**
+ * @param callback The callback parameter should be a function that looks like this:
+ * function( AccountInfo account, boolean signedIn) {...};
+ */
+ addListener(callback: (account: AccountInfo, signedIn: boolean) => void): void;
+ }
+
+ /**
+ * Retrieves a list of AccountInfo objects describing the accounts present on the profile.
+ * getAccounts is only supported on dev channel.
+ * Dev channel only.
+ */
+ export function getAccounts(callback: (accounts: AccountInfo[]) => void): void;
+ /**
+ * Gets an OAuth2 access token using the client ID and scopes specified in the oauth2 section of manifest.json.
+ * The Identity API caches access tokens in memory, so it's ok to call getAuthToken non-interactively any time a token is required. The token cache automatically handles expiration.
+ * For a good user experience it is important interactive token requests are initiated by UI in your app explaining what the authorization is for. Failing to do this will cause your users to get authorization requests, or Chrome sign in screens if they are not signed in, with with no context. In particular, do not use getAuthToken interactively when your app is first launched.
+ * @param details Token options.
+ * @param callback Called with an OAuth2 access token as specified by the manifest, or undefined if there was an error.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function(string token) {...};
+ */
+ export function getAuthToken(details: TokenDetails, callback?: (token: string) => void): void;
+ /**
+ * Retrieves email address and obfuscated gaia id of the user signed into a profile.
+ * This API is different from identity.getAccounts in two ways. The information returned is available offline, and it only applies to the primary account for the profile.
+ * @since Chrome 37.
+ */
+ export function getProfileUserInfo(callback: (userInfo: UserInfo) => void): void;
+ /**
+ * Removes an OAuth2 access token from the Identity API's token cache.
+ * If an access token is discovered to be invalid, it should be passed to removeCachedAuthToken to remove it from the cache. The app may then retrieve a fresh token with getAuthToken.
+ * @param details Token information.
+ * @param callback Called when the token has been removed from the cache.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
+ */
+ export function removeCachedAuthToken(details: TokenInformation, callback?: () => void): void;
+ /**
+ * Starts an auth flow at the specified URL.
+ * This method enables auth flows with non-Google identity providers by launching a web view and navigating it to the first URL in the provider's auth flow. When the provider redirects to a URL matching the pattern https://<app-id>.chromiumapp.org/*, the window will close, and the final redirect URL will be passed to the callback function.
+ * For a good user experience it is important interactive auth flows are initiated by UI in your app explaining what the authorization is for. Failing to do this will cause your users to get authorization requests with no context. In particular, do not launch an interactive auth flow when your app is first launched.
+ * @param details WebAuth flow options.
+ * @param callback Called with the URL redirected back to your application.
+ * The callback parameter should be a function that looks like this:
+ * function(string responseUrl) {...};
+ */
+ export function launchWebAuthFlow(details: WebAuthFlowOptions, callback: (responseUrl?: string) => void): void;
+ /**
+ * Generates a redirect URL to be used in launchWebAuthFlow.
+ * The generated URLs match the pattern https://<app-id>.chromiumapp.org/*.
+ * @since Chrome 33.
+ * @param path Optional. The path appended to the end of the generated URL.
+ */
+ export function getRedirectURL(path?: string): void;
+
+ /**
+ * Fired when signin state changes for an account on the user's profile.
+ * @since Chrome 33.
+ */
+ var onSignInChanged: SignInChangeEvent;
+}
+
+////////////////////
+// Idle
+////////////////////
+/**
+ * Use the chrome.idle API to detect when the machine's idle state changes.
+ * Permissions: "idle"
+ * @since Chrome 6.
+ */
+declare module chrome.idle {
+ interface IdleStateChangedEvent extends chrome.events.Event {
+ /**
+ * @param callback The callback parameter should be a function that looks like this:
+ * function( IdleState newState) {...};
+ */
+ addListener(callback: (newState: string) => void): void;
+ }
+
+ /**
+ * Returns "locked" if the system is locked, "idle" if the user has not generated any input for a specified number of seconds, or "active" otherwise.
+ * @param detectionIntervalInSeconds The system is considered idle if detectionIntervalInSeconds seconds have elapsed since the last user input detected.
+ * Since Chrome 25.
+ * @param callback The callback parameter should be a function that looks like this:
+ * function( IdleState newState) {...};
+ */
+ export function queryState(detectionIntervalInSeconds: number, callback: (newState: string) => void): void;
+ /**
+ * Sets the interval, in seconds, used to determine when the system is in an idle state for onStateChanged events. The default interval is 60 seconds.
+ * @since Chrome 25.
+ * @param intervalInSeconds Threshold, in seconds, used to determine when the system is in an idle state.
+ */
+ export function setDetectionInterval(intervalInSeconds: number): void;
+
+ /** Fired when the system changes to an active, idle or locked state. The event fires with "locked" if the screen is locked or the screensaver activates, "idle" if the system is unlocked and the user has not generated any input for a specified number of seconds, and "active" when the user generates input on an idle system. */
+ var onStateChanged: IdleStateChangedEvent;
+}
+
+////////////////////
+// Input - IME
+////////////////////
+/**
+ * Use the chrome.input.ime API to implement a custom IME for Chrome OS. This allows your extension to handle keystrokes, set the composition, and manage the candidate window.
+ * Permissions: "input"
+ * @since Chrome 21.
+ */
+declare module chrome.input.ime {
+ /** See http://www.w3.org/TR/DOM-Level-3-Events/#events-KeyboardEvent */
+ interface KeyboardEvent {
+ /**
+ * Optional.
+ * Whether or not the SHIFT key is pressed.
+ */
+ shiftKey?: boolean;
+ /**
+ * Optional.
+ * Whether or not the ALT key is pressed.
+ */
+ altKey?: boolean;
+ /** The ID of the request. */
+ requestId: string;
+ /** Value of the key being pressed */
+ key: string;
+ /**
+ * Optional.
+ * Whether or not the CTRL key is pressed.
+ */
+ ctrlKey?: boolean;
+ /** One of keyup or keydown. */
+ type: string;
+ /**
+ * Optional.
+ * The extension ID of the sender of this keyevent.
+ * @since Chrome 34.
+ */
+ extensionId?: string;
+ /**
+ * Optional.
+ * Value of the physical key being pressed. The value is not affected by current keyboard layout or modifier state.
+ * @since Chrome 26.
+ */
+ code: string;
+ /**
+ * Optional.
+ * The deprecated HTML keyCode, which is system- and implementation-dependent numerical code signifying the unmodified identifier associated with the key pressed.
+ * @since Chrome 37.
+ */
+ keyCode?: number;
+ /**
+ * Optional.
+ * Whether or not the CAPS_LOCK is enabled.
+ * @since Chrome 29.
+ */
+ capsLock?: boolean;
+ }
+
+ /** Describes an input Context */
+ interface InputContext {
+ /** This is used to specify targets of text field operations. This ID becomes invalid as soon as onBlur is called. */
+ contextID: number;
+ /** Type of value this text field edits, (Text, Number, URL, etc) */
+ type: string;
+ /**
+ * Whether the text field wants auto-correct.
+ * @since Chrome 40.
+ */
+ autoCorrect: boolean;
+ /**
+ * Whether the text field wants auto-complete.
+ * @since Chrome 40.
+ */
+ autoComplete: boolean;
+ /**
+ * Whether the text field wants spell-check.
+ * @since Chrome 40.
+ */
+ spellCheck: boolean;
+ }
+
+ /**
+ * A menu item used by an input method to interact with the user from the language menu.
+ * @since Chrome 30.
+ */
+ interface MenuItem {
+ /** String that will be passed to callbacks referencing this MenuItem. */
+ id: string;
+ /** Optional. Text displayed in the menu for this item. */
+ label?: string;
+ /** Optional. The type of menu item. */
+ style?: string;
+ /** Optional. Indicates this item is visible. */
+ visible?: boolean;
+ /** Indicates this item should be drawn with a check. */
+ checked?: boolean;
+ /** Indicates this item is enabled. */
+ enabled?: boolean;
+ }
+
+ interface ImeParameters {
+ /** MenuItems to use. */
+ items: MenuItem[];
+ /** ID of the engine to use */
+ engineID: string;
+ }
+
+ interface CommitTextParameters {
+ /** The text to commit */
+ text: string;
+ /** ID of the context where the text will be committed */
+ contextID: number;
+ }
+
+ interface CandidateUsage {
+ /** The title string of details description. */
+ title: string;
+ /** The body string of detail description. */
+ body: string;
+ }
+
+ interface CandidateTemplate {
+ /** The candidate */
+ candidate: string;
+ /** The candidate's id */
+ id: number;
+ /**
+ * Optional.
+ * The id to add these candidates under
+ */
+ parentId?: number;
+ /**
+ * Optional.
+ * Short string displayed to next to the candidate, often the shortcut key or index
+ */
+ label?: string;
+ /**
+ * Optional.
+ * Additional text describing the candidate
+ */
+ annotation?: string;
+ /**
+ * Optional.
+ * The usage or detail description of word.
+ */
+ usage?: CandidateUsage;
+ }
+
+ interface CandidatesParameters {
+ /** ID of the context that owns the candidate window. */
+ contextID: number;
+ /** List of candidates to show in the candidate window */
+ candidates: CandidateTemplate[];
+ }
+
+ interface CompositionParameterSegment {
+ /** Index of the character to start this segment at */
+ start: number;
+ /** Index of the character to end this segment after. */
+ end: number;
+ /** The type of the underline to modify this segment. */
+ style: string;
+ }
+
+ interface CompositionParameters {
+ /** ID of the context where the composition text will be set */
+ contextID: number;
+ /** Text to set */
+ text: string;
+ /** Optional. List of segments and their associated types. */
+ segments: CompositionParameterSegment[];
+ /** Position in the text of the cursor. */
+ cursor: number;
+ /** Optional. Position in the text that the selection starts at. */
+ selectionStart?: number;
+ /** Optional. Position in the text that the selection ends at. */
+ selectionEnd?: number;
+ }
+
+ interface MenuItemParameters {
+ items: Object[];
+ engineId: string;
+ }
+
+ interface CandidateWindowParameterProperties {
+ /**
+ * Optional.
+ * True to show the cursor, false to hide it.
+ */
+ cursorVisible?: boolean;
+ /**
+ * Optional.
+ * True if the candidate window should be rendered vertical, false to make it horizontal.
+ */
+ vertical?: boolean;
+ /**
+ * Optional.
+ * The number of candidates to display per page.
+ */
+ pageSize?: number;
+ /**
+ * Optional.
+ * True to display the auxiliary text, false to hide it.
+ */
+ auxiliaryTextVisible?: boolean;
+ /**
+ * Optional.
+ * Text that is shown at the bottom of the candidate window.
+ */
+ auxiliaryText?: string;
+ /**
+ * Optional.
+ * True to show the Candidate window, false to hide it.
+ */
+ visible?: boolean;
+ /**
+ * Optional.
+ * Where to display the candidate window.
+ * @since Chrome 28.
+ */
+ windowPosition?: string;
+ }
+
+ interface CandidateWindowParameter {
+ /** ID of the engine to set properties on. */
+ engineID: string;
+ properties: CandidateWindowParameterProperties;
+ }
+
+ interface ClearCompositionParameters {
+ /** ID of the context where the composition will be cleared */
+ contextID: number;
+ }
+
+ interface CursorPositionParameters {
+ /** ID of the candidate to select. */
+ candidateID: number;
+ /** ID of the context that owns the candidate window. */
+ contextID: number;
+ }
+
+ interface SendKeyEventParameters {
+ /** ID of the context where the key events will be sent, or zero to send key events to non-input field. */
+ contextID: number;
+ /** Data on the key event. */
+ keyData: KeyboardEvent[];
+ }
+
+ interface DeleteSurroundingTextParameters {
+ /** ID of the engine receiving the event. */
+ engineID: string;
+ /** ID of the context where the surrounding text will be deleted. */
+ contextID: number;
+ /** The offset from the caret position where deletion will start. This value can be negative. */
+ offset: number;
+ /** The number of characters to be deleted */
+ length: number;
+ }
+
+ interface SurroundingTextInfo {
+ /** The text around cursor. */
+ text: string;
+ /** The ending position of the selection. This value indicates caret position if there is no selection. */
+ focus: number;
+ /** The beginning position of the selection. This value indicates caret position if is no selection. */
+ anchor: number;
+ }
+
+ interface BlurEvent extends chrome.events.Event {
+ /**
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(integer contextID) {...};
+ * Parameter contextID: The ID of the text field that has lost focus. The ID is invalid after this call
+ */
+ addListener(callback: (contextID: number) => void): void;
+ }
+
+ interface CandidateClickedEvent extends chrome.events.Event {
+ /**
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(string engineID, integer candidateID, MouseButton button) {...};
+ * Parameter engineID: ID of the engine receiving the event
+ * Parameter candidateID: ID of the candidate that was clicked.
+ * Parameter button: Which mouse buttons was clicked.
+ */
+ addListener(callback: (engineID: string, candidateID: number, button: string) => void): void;
+ }
+
+ interface KeyEventEvent extends chrome.events.Event {
+ /**
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(string engineID, KeyboardEvent keyData) {...};
+ * Parameter engineID: ID of the engine receiving the event
+ * Parameter keyData: Data on the key event
+ */
+ addListener(callback: (engineID: string, keyData: KeyboardEvent) => void): void;
+ }
+
+ interface DeactivatedEvent extends chrome.events.Event {
+ /**
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(string engineID) {...};
+ * Parameter engineID: ID of the engine receiving the event
+ */
+ addListener(callback: (engineID: string) => void): void;
+ }
+
+ interface InputContextUpdateEvent extends chrome.events.Event {
+ /**
+ * @param callback The callback parameter should be a function that looks like this:
+ * function( InputContext context) {...};
+ * Parameter context: An InputContext object describing the text field that has changed.
+ */
+ addListener(callback: (context: InputContext) => void): void;
+ }
+
+ interface ActivateEvent extends chrome.events.Event {
+ /**
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(string engineID, ScreenType screen) {...};
+ * Parameter engineID: ID of the engine receiving the event
+ * Parameter The screen type under which the IME is activated.
+ */
+ addListener(callback: (engineID: string, screen: string) => void): void;
+ }
+
+ interface FocusEvent extends chrome.events.Event {
+ /**
+ * @param callback The callback parameter should be a function that looks like this:
+ * function( InputContext context) {...};
+ * Parameter context: Describes the text field that has acquired focus.
+ */
+ addListener(callback: (context: InputContext) => void): void;
+ }
+
+ interface MenuItemActivatedEvent extends chrome.events.Event {
+ /**
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(string engineID, string name) {...};
+ * Parameter engineID: ID of the engine receiving the event
+ * Parameter name: Name of the MenuItem which was activated
+ */
+ addListener(callback: (engineID: string, name: string) => void): void;
+ }
+
+ interface SurroundingTextChangedEvent extends chrome.events.Event {
+ /**
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(string engineID, object surroundingInfo) {...};
+ * Parameter engineID: ID of the engine receiving the event
+ * Parameter surroundingInfo: The surrounding information.
+ */
+ addListener(callback: (engineID: string, surroundingInfo: SurroundingTextInfo) => void): void;
+ }
+
+ interface InputResetEvent extends chrome.events.Event {
+ /**
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(string engineID) {...};
+ * Parameter engineID: ID of the engine receiving the event
+ */
+ addListener(callback: (engineID: string) => void): void;
+ }
+
+ /**
+ * Adds the provided menu items to the language menu when this IME is active.
+ * @param callback If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
+ */
+ export function setMenuItems(parameters: ImeParameters, callback?: () => void): void;
+ /**
+ * Commits the provided text to the current input.
+ * @param callback Called when the operation completes with a boolean indicating if the text was accepted or not. On failure, chrome.runtime.lastError is set.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function(boolean success) {...};
+ */
+ export function commitText(parameters: CommitTextParameters, callback?: (success: boolean) => void): void;
+ /**
+ * Sets the current candidate list. This fails if this extension doesn't own the active IME
+ * @param callback Called when the operation completes.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function(boolean success) {...};
+ */
+ export function setCandidates(parameters: CandidatesParameters, callback?: (success: boolean) => void): void;
+ /**
+ * Set the current composition. If this extension does not own the active IME, this fails.
+ * @param callback Called when the operation completes with a boolean indicating if the text was accepted or not. On failure, chrome.runtime.lastError is set.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function(boolean success) {...};
+ */
+ export function setComposition(parameters: CompositionParameters, callback?: (success: boolean) => void): void;
+ /**
+ * Updates the state of the MenuItems specified
+ * @param callback Called when the operation completes
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
+ */
+ export function updateMenuItems(parameters: MenuItemParameters, callback?: () => void): void;
+ /**
+ * Sets the properties of the candidate window. This fails if the extension doesn't own the active IME
+ * @param callback Called when the operation completes.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function(boolean success) {...};
+ */
+ export function setCandidateWindowProperties(parameters: CandidateWindowParameter, callback?: (success: boolean) => void): void;
+ /**
+ * Clear the current composition. If this extension does not own the active IME, this fails.
+ * @param callback Called when the operation completes with a boolean indicating if the text was accepted or not. On failure, chrome.runtime.lastError is set.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function(boolean success) {...};
+ */
+ export function clearComposition(parameters: ClearCompositionParameters, callback?: (success: boolean) => void): void;
+ /**
+ * Set the position of the cursor in the candidate window. This is a no-op if this extension does not own the active IME.
+ * @param callback Called when the operation completes
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function(boolean success) {...};
+ */
+ export function setCursorPosition(parameters: CursorPositionParameters, callback?: (success: boolean) => void): void;
+ /**
+ * Sends the key events. This function is expected to be used by virtual keyboards. When key(s) on a virtual keyboard is pressed by a user, this function is used to propagate that event to the system.
+ * @since Chrome 33.
+ * @param callback Called when the operation completes.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
+ */
+ export function sendKeyEvents(parameters: SendKeyEventParameters, callback?: () => void): void;
+ /**
+ * Hides the input view window, which is popped up automatically by system. If the input view window is already hidden, this function will do nothing.
+ * @since Chrome 34.
+ */
+ export function hideInputView(): void;
+ /**
+ * Deletes the text around the caret.
+ * @since Chrome 27.
+ */
+ export function deleteSurroundingText(parameters: DeleteSurroundingTextParameters, callback?: () => void): void;
+ /**
+ * Indicates that the key event received by onKeyEvent is handled. This should only be called if the onKeyEvent listener is asynchronous.
+ * @since Chrome 25.
+ * @param requestId Request id of the event that was handled. This should come from keyEvent.requestId
+ * @param response True if the keystroke was handled, false if not
+ */
+ export function keyEventHandled(requestId: string, response: boolean): void;
+
+ /** This event is sent when focus leaves a text box. It is sent to all extensions that are listening to this event, and enabled by the user. */
+ var onBlur: BlurEvent;
+ /** This event is sent if this extension owns the active IME. */
+ var onCandidateClicked: CandidateClickedEvent;
+ /** This event is sent if this extension owns the active IME. */
+ var onKeyEvent: KeyEventEvent;
+ /** This event is sent when an IME is deactivated. It signals that the IME will no longer be receiving onKeyPress events. */
+ var onDeactivated: DeactivatedEvent;
+ /** This event is sent when the properties of the current InputContext change, such as the the type. It is sent to all extensions that are listening to this event, and enabled by the user. */
+ var onInputContextUpdate: InputContextUpdateEvent;
+ /** This event is sent when an IME is activated. It signals that the IME will be receiving onKeyPress events. */
+ var onActivate: ActivateEvent;
+ /** This event is sent when focus enters a text box. It is sent to all extensions that are listening to this event, and enabled by the user. */
+ var onFocus: FocusEvent;
+ /** Called when the user selects a menu item */
+ var onMenuItemActivated: MenuItemActivatedEvent;
+ /**
+ * Called when the editable string around caret is changed or when the caret position is moved. The text length is limited to 100 characters for each back and forth direction.
+ * @since Chrome 27.
+ */
+ var onSurroundingTextChanged: SurroundingTextChangedEvent;
+ /**
+ * This event is sent when chrome terminates ongoing text input session.
+ * @since Chrome 29.
+ */
+ var onReset: InputResetEvent;
+}
+
+////////////////////
+// Management
+////////////////////
+/**
+ * The chrome.management API provides ways to manage the list of extensions/apps that are installed and running. It is particularly useful for extensions that override the built-in New Tab page.
+ * Permissions: "management"
+ * @since Chrome 8.
+ */
+declare module chrome.management {
+ /** Information about an installed extension, app, or theme. */
+ interface ExtensionInfo {
+ /**
+ * Optional.
+ * A reason the item is disabled.
+ * @since Chrome 17.
+ */
+ disabledReason?: string;
+ /** Optional. The launch url (only present for apps). */
+ appLaunchUrl?: string;
+ /**
+ * The description of this extension, app, or theme.
+ * @since Chrome 9.
+ */
+ description: string;
+ /**
+ * Returns a list of API based permissions.
+ * @since Chrome 9.
+ */
+ permissions: string[];
+ /**
+ * Optional.
+ * A list of icon information. Note that this just reflects what was declared in the manifest, and the actual image at that url may be larger or smaller than what was declared, so you might consider using explicit width and height attributes on img tags referencing these images. See the manifest documentation on icons for more details.
+ */
+ icons?: IconInfo[];
+ /**
+ * Returns a list of host based permissions.
+ * @since Chrome 9.
+ */
+ hostPermissions: string[];
+ /** Whether it is currently enabled or disabled. */
+ enabled: boolean;
+ /**
+ * Optional.
+ * The URL of the homepage of this extension, app, or theme.
+ * @since Chrome 11.
+ */
+ homepageUrl?: string;
+ /**
+ * Whether this extension can be disabled or uninstalled by the user.
+ * @since Chrome 12.
+ */
+ mayDisable: boolean;
+ /**
+ * How the extension was installed.
+ * @since Chrome 22.
+ */
+ installType: string;
+ /** The version of this extension, app, or theme. */
+ version: string;
+ /** The extension's unique identifier. */
+ id: string;
+ /**
+ * Whether the extension, app, or theme declares that it supports offline.
+ * @since Chrome 15.
+ */
+ offlineEnabled: boolean;
+ /**
+ * Optional.
+ * The update URL of this extension, app, or theme.
+ * @since Chrome 16.
+ */
+ updateUrl?: string;
+ /**
+ * The type of this extension, app, or theme.
+ * @since Chrome 23.
+ */
+ type: string;
+ /** The url for the item's options page, if it has one. */
+ optionsUrl: string;
+ /** The name of this extension, app, or theme. */
+ name: string;
+ /**
+ * A short version of the name of this extension, app, or theme.
+ * @since Chrome 31.
+ */
+ shortName: string;
+ /**
+ * True if this is an app.
+ * @deprecated since Chrome 33. Please use management.ExtensionInfo.type.
+ */
+ isApp: boolean;
+ /**
+ * Optional.
+ * The app launch type (only present for apps).
+ * @since Chrome 37.
+ */
+ launchType?: string;
+ /**
+ * Optional.
+ * The currently available launch types (only present for apps).
+ * @since Chrome 37.
+ */
+ availableLaunchTypes?: string[];
+ }
+
+ /** Information about an icon belonging to an extension, app, or theme. */
+ interface IconInfo {
+ /** The URL for this icon image. To display a grayscale version of the icon (to indicate that an extension is disabled, for example), append ?grayscale=true to the URL. */
+ url: string;
+ /** A number representing the width and height of the icon. Likely values include (but are not limited to) 128, 48, 24, and 16. */
+ size: number;
+ }
+
+ interface UninstallOptions {
+ /**
+ * Optional.
+ * Whether or not a confirm-uninstall dialog should prompt the user. Defaults to false for self uninstalls. If an extension uninstalls another extension, this parameter is ignored and the dialog is always shown.
+ */
+ showConfirmDialog?: boolean;
+ }
+
+ interface ManagementDisabledEvent extends chrome.events.Event {
+ /**
+ * @param callback The callback parameter should be a function that looks like this:
+ * function( ExtensionInfo info) {...};
+ */
+ addListener(callback: (info: ExtensionInfo) => void): void;
+ }
+
+ interface ManagementUninstalledEvent extends chrome.events.Event {
+ /**
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(string id) {...};
+ * Parameter id: The id of the extension, app, or theme that was uninstalled.
+ */
+ addListener(callback: (id: string) => void): void;
+ }
+
+ interface ManagementInstalledEvent extends chrome.events.Event {
+ /**
+ * @param callback The callback parameter should be a function that looks like this:
+ * function( ExtensionInfo info) {...};
+ */
+ addListener(callback: (info: ExtensionInfo) => void): void;
+ }
+
+ interface ManagementEnabledEvent extends chrome.events.Event {
+ /**
+ * @param callback The callback parameter should be a function that looks like this:
+ * function( ExtensionInfo info) {...};
+ */
+ addListener(callback: (info: ExtensionInfo) => void): void;
+ }
+
+ /**
+ * Enables or disables an app or extension.
+ * @param id This should be the id from an item of management.ExtensionInfo.
+ * @param enabled Whether this item should be enabled or disabled.
+ * @param callback If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
+ */
+ export function setEnabled(id: string, enabled: boolean, callback?: () => void): void;
+ /**
+ * Returns a list of permission warnings for the given extension id.
+ * @since Chrome 15.
+ * @param id The ID of an already installed extension.
+ * @param callback If you specify the callback parameter, it should be a function that looks like this:
+ * function(array of string permissionWarnings) {...};
+ */
+ export function getPermissionWarningsById(id: string, callback?: (permissionWarnings: string[]) => void): void;
+ /**
+ * Returns information about the installed extension, app, or theme that has the given ID.
+ * @since Chrome 9.
+ * @param id The ID from an item of management.ExtensionInfo.
+ * @param callback If you specify the callback parameter, it should be a function that looks like this:
+ * function( ExtensionInfo result) {...};
+ */
+ export function get(id: string, callback?: (result: ExtensionInfo) => void): void;
+ /**
+ * Returns a list of information about installed extensions and apps.
+ * @param callback If you specify the callback parameter, it should be a function that looks like this:
+ * function(array of ExtensionInfo result) {...};
+ */
+ export function getAll(callback?: (result: ExtensionInfo[]) => void): void;
+ /**
+ * Returns a list of permission warnings for the given extension manifest string. Note: This function can be used without requesting the 'management' permission in the manifest.
+ * @since Chrome 15.
+ * @param manifestStr Extension manifest JSON string.
+ * @param callback If you specify the callback parameter, it should be a function that looks like this:
+ * function(array of string permissionWarnings) {...};
+ */
+ export function getPermissionWarningsByManifest(manifestStr: string, callback?: (permissionwarnings: string[]) => void): void;
+ /**
+ * Launches an application.
+ * @param id The extension id of the application.
+ * @param callback If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
+ */
+ export function launchApp(id: string, callback?: () => void): void;
+ /**
+ * Uninstalls a currently installed app or extension.
+ * @since Chrome 21.
+ * @param id This should be the id from an item of management.ExtensionInfo.
+ * @param callback If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
+ */
+ export function uninstall(id: string, options?: UninstallOptions, callback?: () => void): void;
+ /**
+ * Uninstalls a currently installed app or extension.
+ * @deprecated since Chrome 21. The options parameter was added to this function.
+ * @param id This should be the id from an item of management.ExtensionInfo.
+ * @param callback If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
+ */
+ export function uninstall(id: string, callback?: () => void): void;
+ /**
+ * Returns information about the calling extension, app, or theme. Note: This function can be used without requesting the 'management' permission in the manifest.
+ * @since Chrome 39.
+ * @param callback If you specify the callback parameter, it should be a function that looks like this:
+ * function( ExtensionInfo result) {...};
+ */
+ export function getSelf(callback?: (result: ExtensionInfo) => void): void;
+ /**
+ * Uninstalls the calling extension.
+ * Note: This function can be used without requesting the 'management' permission in the manifest.
+ * @since Chrome 26.
+ * @param callback If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
+ */
+ export function uninstallSelf(options?: UninstallOptions, callback?: () => void): void;
+ /**
+ * Uninstalls the calling extension.
+ * Note: This function can be used without requesting the 'management' permission in the manifest.
+ * @since Chrome 26.
+ * @param callback If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
+ */
+ export function uninstallSelf(callback?: () => void): void;
+ /**
+ * Display options to create shortcuts for an app. On Mac, only packaged app shortcuts can be created.
+ * @since Chrome 37.
+ * @param callback If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
+ */
+ export function createAppShortcut(id: string, callback?: () => void): void;
+ /**
+ * Set the launch type of an app.
+ * @since Chrome 37.
+ * @param id This should be the id from an app item of management.ExtensionInfo.
+ * @param launchType The target launch type. Always check and make sure this launch type is in ExtensionInfo.availableLaunchTypes, because the available launch types vary on different platforms and configurations.
+ * @param callback If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
+ */
+ export function setLaunchType(id: string, launchType: string, callback?: () => void): void;
+ /**
+ * Generate an app for a URL. Returns the generated bookmark app.
+ * @since Chrome 37.
+ * @param url The URL of a web page. The scheme of the URL can only be "http" or "https".
+ * @param title The title of the generated app.
+ * @param callback If you specify the callback parameter, it should be a function that looks like this:
+ * function( ExtensionInfo result) {...};
+ */
+ export function generateAppForLink(url: string, title: string, callback?: (result: ExtensionInfo) => void): void;
+
+ /** Fired when an app or extension has been disabled. */
+ var onDisabled: ManagementDisabledEvent;
+ /** Fired when an app or extension has been uninstalled. */
+ var onUninstalled: ManagementUninstalledEvent;
+ /** Fired when an app or extension has been installed. */
+ var onInstalled: ManagementInstalledEvent;
+ /** Fired when an app or extension has been enabled. */
+ var onEnabled: ManagementEnabledEvent;
+}
+
+////////////////////
+// Notifications
+////////////////////
+/**
+ * Use the networking.config API to authenticate to captive portals.
+ * Permissions: "networking.config"
+ * Important: This API works only on Chrome OS.
+ * @since Chrome 43.
+ */
+declare module chrome.networking.config {
+ interface NetworkInfo {
+ /** Currently only WiFi supported. */
+ Type: string;
+ /** Optional. A unique identifier of the network. */
+ GUID?: string;
+ /** Optional. A hex-encoded byte sequence. */
+ HexSSID?: string;
+ /** Optional. The decoded SSID of the network (default encoding is UTF-8). To filter for non-UTF-8 SSIDs, use HexSSID instead. */
+ SSID?: string;
+ /** Optional. The basic service set identification (BSSID) uniquely identifying the basic service set. BSSID is represented as a human readable, hex-encoded string with bytes separated by colons, e.g. 45:67:89:ab:cd:ef. */
+ BSSID?: string;
+ /** Optional. Identifier indicating the security type of the network. Valid values are None, WEP-PSK, WPA-PSK and WPA-EAP. */
+ Security?: string;
+ }
+
+ interface CaptivePorttalDetectedEvent extends chrome.events.Event {
+ /**
+ * @param callback The callback parameter should be a function that looks like this:
+ * function( NetworkInfo networkInfo) {...};
+ * Parameter networkInfo: Information about the network on which a captive portal was detected.
+ */
+ addListener(callback: (networkInfo: NetworkInfo) => void): void;
+ }
+
+ /**
+ * Allows an extension to define network filters for the networks it can handle. A call to this function will remove all filters previously installed by the extension before setting the new list.
+ * @param networks Network filters to set. Every NetworkInfo must either have the SSID or HexSSID set. Other fields will be ignored.
+ * @param callback Called back when this operation is finished.
+ * The callback parameter should be a function that looks like this:
+ * function() {...};
+ */
+ export function setNetworkFilter(networks: NetworkInfo[], callback: () => void): void;
+ /**
+ * Called by the extension to notify the network config API that it finished a captive portal authentication attempt and hand over the result of the attempt. This function must only be called with the GUID of the latest onCaptivePortalDetected event.
+ * @param GUID Unique network identifier obtained from onCaptivePortalDetected.
+ * @param result The result of the authentication attempt.
+ * unhandled: The extension does not handle this network or captive portal (e.g. server end-point not found or not compatible).
+ * succeeded: The extension handled this network and authenticated successfully.
+ * rejected: The extension handled this network, tried to authenticate, however was rejected by the server.
+ * failed: The extension handled this network, tried to authenticate, however failed due to an unspecified error.
+ * @param callback Called back when this operation is finished.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
+ */
+ export function finishAuthentication(GUID: string, result: string, callback?: () => void): void;
+
+ /** This event fires everytime a captive portal is detected on a network matching any of the currently registered network filters and the user consents to use the extension for authentication. Network filters may be set using the setNetworkFilter. Upon receiving this event the extension should start its authentication attempt with the captive portal. When the extension finishes its attempt, it must call finishAuthentication with the GUID received with this event and the appropriate authentication result. */
+ var onCaptivePortalDetected: CaptivePorttalDetectedEvent;
+}
+
+////////////////////
+// Notifications
+// https://developer.chrome.com/extensions/notifications
+////////////////////
+/**
+ * Use the chrome.notifications API to create rich notifications using templates and show these notifications to users in the system tray.
+ * Permissions: "notifications"
+ * @since Chrome 28.
+ */
+declare module chrome.notifications {
+ interface ButtonOptions {
+ title: string;
+ iconUrl?: string;
+ }
+
+ interface ItemOptions {
+ /** Title of one item of a list notification. */
+ title: string;
+ /** Additional details about this item. */
+ message: string;
+ }
+
+ interface NotificationOptions {
+ /** Optional. Which type of notification to display. Required for notifications.create method. */
+ type?: string;
+ /**
+ * Optional.
+ * A URL to the sender's avatar, app icon, or a thumbnail for image notifications.
+ * URLs can be a data URL, a blob URL, or a URL relative to a resource within this extension's .crx file Required for notifications.create method.
+ */
+ iconUrl?: string;
+ /** Optional. Title of the notification (e.g. sender name for email). Required for notifications.create method. */
+ title?: string;
+ /** Optional. Main notification content. Required for notifications.create method. */
+ message?: string;
+ /**
+ * Optional.
+ * Alternate notification content with a lower-weight font.
+ * @since Chrome 31.
+ */
+ contextMessage?: string;
+ /** Optional. Priority ranges from -2 to 2. -2 is lowest priority. 2 is highest. Zero is default. */
+ priority?: number;
+ /** Optional. A timestamp associated with the notification, in milliseconds past the epoch (e.g. Date.now() + n). */
+ eventTime?: number;
+ /** Optional. Text and icons for up to two notification action buttons. */
+ buttons?: ButtonOptions[];
+ /** Optional. Items for multi-item notifications. */
+ items?: ItemOptions[];
+ /**
+ * Optional.
+ * Current progress ranges from 0 to 100.
+ * @since Chrome 30.
+ */
+ progress?: number;
+ /**
+ * Optional.
+ * Whether to show UI indicating that the app will visibly respond to clicks on the body of a notification.
+ * @since Chrome 32.
+ */
+ isClickable?: boolean;
+ /**
+ * Optional.
+ * A URL to the app icon mask. URLs have the same restrictions as iconUrl. The app icon mask should be in alpha channel, as only the alpha channel of the image will be considered.
+ * @since Chrome 38.
+ */
+ appIconMaskUrl?: string;
+ /** Optional. A URL to the image thumbnail for image-type notifications. URLs have the same restrictions as iconUrl. */
+ imageUrl?: string;
+ }
+
+ interface NotificationClosedEvent extends chrome.events.Event {
+ /**
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(string notificationId, boolean byUser) {...};
+ */
+ addListener(callback: (notificationId: string, byUser: boolean) => void): void;
+ }
+
+ interface NotificationClickedEvent extends chrome.events.Event {
+ /**
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(string notificationId) {...};
+ */
+ addListener(callback: (notificationId: string) => void): void;
+ }
+
+ interface NotificationButtonClickedEvent extends chrome.events.Event {
+ /**
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(string notificationId, integer buttonIndex) {...};
+ */
+ addListener(callback: (notificationId: string, buttonIndex: number) => void): void;
+ }
+
+ interface NotificationPermissionLevelChangedEvent extends chrome.events.Event {
+ /**
+ * @param callback The callback parameter should be a function that looks like this:
+ * function( PermissionLevel level) {...};
+ */
+ addListener(callback: (level: string) => void): void;
+ }
+
+ interface NotificationShowSettingsEvent extends chrome.events.Event {
+ /**
+ * @param callback The callback parameter should be a function that looks like this:
+ * function() {...};
+ */
+ addListener(callback: () => void): void;
+ }
+
+ /** The notification closed, either by the system or by user action. */
+ export var onClosed: NotificationClosedEvent;
+ /** The user clicked in a non-button area of the notification. */
+ export var onClicked: NotificationClickedEvent;
+ /** The user pressed a button in the notification. */
+ export var onButtonClicked: NotificationButtonClickedEvent;
+ /**
+ * The user changes the permission level.
+ * @since Chrome 32.
+ */
+ export var onPermissionLevelChanged: NotificationPermissionLevelChangedEvent;
+ /**
+ * The user clicked on a link for the app's notification settings.
+ * @since Chrome 32.
+ */
+ export var onShowSettings: NotificationShowSettingsEvent;
+
+ /**
+ * Creates and displays a notification.
+ * @param notificationId Identifier of the notification. If not set or empty, an ID will automatically be generated. If it matches an existing notification, this method first clears that notification before proceeding with the create operation.
+ * The notificationId parameter is required before Chrome 42.
+ * @param options Contents of the notification.
+ * @param callback Returns the notification id (either supplied or generated) that represents the created notification.
+ * The callback is required before Chrome 42.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function(string notificationId) {...};
+ */
+ export function create(notificationId: string, options: NotificationOptions, callback?: (notificationId: string) => void): void;
+ /**
+ * Creates and displays a notification.
+ * @param notificationId Identifier of the notification. If not set or empty, an ID will automatically be generated. If it matches an existing notification, this method first clears that notification before proceeding with the create operation.
+ * The notificationId parameter is required before Chrome 42.
+ * @param options Contents of the notification.
+ * @param callback Returns the notification id (either supplied or generated) that represents the created notification.
+ * The callback is required before Chrome 42.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function(string notificationId) {...};
+ */
+ export function create(options: NotificationOptions, callback?: (notificationId: string) => void): void;
+ /**
+ * Updates an existing notification.
+ * @param notificationId The id of the notification to be updated. This is returned by notifications.create method.
+ * @param options Contents of the notification to update to.
+ * @param callback Called to indicate whether a matching notification existed.
+ * The callback is required before Chrome 42.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function(boolean wasUpdated) {...};
+ */
+ export function update(notificationId: string, options: NotificationOptions, callback?: (wasUpdated: boolean) => void): void;
+ /**
+ * Clears the specified notification.
+ * @param notificationId The id of the notification to be cleared. This is returned by notifications.create method.
+ * @param callback Called to indicate whether a matching notification existed.
+ * The callback is required before Chrome 42.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function(boolean wasCleared) {...};
+ */
+ export function clear(notificationId: string, callback?: (wasCleared: boolean) => void): void;
+ /**
+ * Retrieves all the notifications.
+ * @since Chrome 29.
+ * @param callback Returns the set of notification_ids currently in the system.
+ * The callback parameter should be a function that looks like this:
+ * function(object notifications) {...};
+ */
+ export function getAll(callback: (notifications: Object) => void): void;
+ /**
+ * Retrieves whether the user has enabled notifications from this app or extension.
+ * @since Chrome 32.
+ * @param callback Returns the current permission level.
+ * The callback parameter should be a function that looks like this:
+ * function( PermissionLevel level) {...};
+ */
+ export function getPermissionLevel(callback: (level: string) => void): void;
+}
+
+////////////////////
+// Omnibox
+////////////////////
+/**
+ * The omnibox API allows you to register a keyword with Google Chrome's address bar, which is also known as the omnibox.
+ * Manifest: "omnibox": {...}
+ * @since Chrome 9.
+ */
+declare module chrome.omnibox {
+ /** A suggest result. */
+ interface SuggestResult {
+ /** The text that is put into the URL bar, and that is sent to the extension when the user chooses this entry. */
+ content: string;
+ /** The text that is displayed in the URL dropdown. Can contain XML-style markup for styling. The supported tags are 'url' (for a literal URL), 'match' (for highlighting text that matched what the user's query), and 'dim' (for dim helper text). The styles can be nested, eg. dimmed match. You must escape the five predefined entities to display them as text: stackoverflow.com/a/1091953/89484 */
+ description: string;
+ }
+
+ interface Suggestion {
+ /** The text that is displayed in the URL dropdown. Can contain XML-style markup for styling. The supported tags are 'url' (for a literal URL), 'match' (for highlighting text that matched what the user's query), and 'dim' (for dim helper text). The styles can be nested, eg. dimmed match. */
+ description: string;
+ }
+
+ interface OmniboxInputEnteredEvent extends chrome.events.Event {
+ /**
+ * The callback parameter should be a function that looks like this:
+ * function(string text, OnInputEnteredDisposition disposition) {...};
+ */
+ addListener(callback: (text: string) => void): void;
+ }
+
+ interface OmniboxInputChangedEvent extends chrome.events.Event {
+ /**
+ * The callback parameter should be a function that looks like this:
+ * function(string text, function suggest) {...};
+ * Parameter suggest: A callback passed to the onInputChanged event used for sending suggestions back to the browser.
+ * The suggest parameter should be a function that looks like this:
+ * function(array of SuggestResult suggestResults) {...};
+ */
+ addListener(callback: (text: string, suggest: (suggestResults: SuggestResult[]) => void) => void): void;
+ }
+
+ interface OmniboxInputStartedEvent extends chrome.events.Event {
+ /**
+ * The callback parameter should be a function that looks like this:
+ * function() {...};
+ */
+ addListener(callback: () => void): void;
+ }
+
+ interface OmniboxInputCancelledEvent extends chrome.events.Event {
+ /**
+ * The callback parameter should be a function that looks like this:
+ * function() {...};
+ */
+ addListener(callback: () => void): void;
+ }
+
+ /**
+ * Sets the description and styling for the default suggestion. The default suggestion is the text that is displayed in the first suggestion row underneath the URL bar.
+ * @param suggestion A partial SuggestResult object, without the 'content' parameter.
+ */
+ export function setDefaultSuggestion(suggestion: Suggestion): void;
+
+ /** User has accepted what is typed into the omnibox. */
+ var onInputEntered: OmniboxInputEnteredEvent;
+ /** User has changed what is typed into the omnibox. */
+ var onInputChanged: OmniboxInputChangedEvent;
+ /** User has started a keyword input session by typing the extension's keyword. This is guaranteed to be sent exactly once per input session, and before any onInputChanged events. */
+ var onInputStarted: OmniboxInputStartedEvent;
+ /** User has ended the keyword input session without accepting the input. */
+ var onInputCancelled: OmniboxInputCancelledEvent;
+}
+
+////////////////////
+// Page Action
+////////////////////
+/**
+ * Use the chrome.pageAction API to put icons inside the address bar. Page actions represent actions that can be taken on the current page, but that aren't applicable to all pages.
+ * Manifest: "page_action": {...}
+ * @since Chrome 5.
+ */
+declare module chrome.pageAction {
+ interface PageActionClickedEvent extends chrome.events.Event {
+ /**
+ * @param callback The callback parameter should be a function that looks like this:
+ * function( tabs.Tab tab) {...};
+ */
+ addListener(callback: (tab: chrome.tabs.Tab) => void): void;
+ }
+
+ interface TitleDetails {
+ /** The id of the tab for which you want to modify the page action. */
+ tabId: number;
+ /** The tooltip string. */
+ title: string;
+ }
+
+ interface GetDetails {
+ /** Specify the tab to get the title from. */
+ tabId: number;
+ }
+
+ interface PopupDetails {
+ /** The id of the tab for which you want to modify the page action. */
+ tabId: number;
+ /** The html file to show in a popup. If set to the empty string (''), no popup is shown. */
+ popup: string;
+ }
+
+ interface IconDetails {
+ /** The id of the tab for which you want to modify the page action. */
+ tabId: number;
+ /**
+ * Optional.
+ * @deprecated This argument is ignored.
+ */
+ iconIndex?: number;
+ /**
+ * Optional.
+ * Either an ImageData object or a dictionary {size -> ImageData} representing icon to be set. If the icon is specified as a dictionary, the actual image to be used is chosen depending on screen's pixel density. If the number of image pixels that fit into one screen space unit equals scale, then image with size scale * 19 will be selected. Initially only scales 1 and 2 will be supported. At least one image must be specified. Note that 'details.imageData = foo' is equivalent to 'details.imageData = {'19': foo}'
+ */
+ imageData?: ImageData;
+ /**
+ * Optional.
+ * Either a relative image path or a dictionary {size -> relative image path} pointing to icon to be set. If the icon is specified as a dictionary, the actual image to be used is chosen depending on screen's pixel density. If the number of image pixels that fit into one screen space unit equals scale, then image with size scale * 19 will be selected. Initially only scales 1 and 2 will be supported. At least one image must be specified. Note that 'details.path = foo' is equivalent to 'details.imageData = {'19': foo}'
+ */
+ path?: any;
+ }
+
+ /**
+ * Shows the page action. The page action is shown whenever the tab is selected.
+ * @param tabId The id of the tab for which you want to modify the page action.
+ */
+ export function hide(tabId: number): void;
+ /**
+ * Shows the page action. The page action is shown whenever the tab is selected.
+ * @param tabId The id of the tab for which you want to modify the page action.
+ */
+ export function show(tabId: number): void;
+ /** Sets the title of the page action. This is displayed in a tooltip over the page action. */
+ export function setTitle(details: TitleDetails): void;
+ /** Sets the html document to be opened as a popup when the user clicks on the page action's icon. */
+ export function setPopup(details: PopupDetails): void;
+ /**
+ * Gets the title of the page action.
+ * @since Chrome 19.
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(string result) {...};
+ */
+ export function getTitle(details: GetDetails, callback: (result: string) => void): void;
+ /**
+ * Gets the html document set as the popup for this page action.
+ * @since Chrome 19.
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(string result) {...};
+ */
+ export function getPopup(details: GetDetails, callback: (result: string) => void): void;
+ /**
+ * Sets the icon for the page action. The icon can be specified either as the path to an image file or as the pixel data from a canvas element, or as dictionary of either one of those. Either the path or the imageData property must be specified.
+ * @param callback If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
+ */
+ export function setIcon(details: IconDetails, callback?: () => void): void;
+
+ /** Fired when a page action icon is clicked. This event will not fire if the page action has a popup. */
+ var onClicked: PageActionClickedEvent;
+}
+
+////////////////////
+// Page Capture
+////////////////////
+/**
+ * Use the chrome.pageCapture API to save a tab as MHTML.
+ * Permissions: "pageCapture"
+ * @since Chrome 18.
+ */
+declare module chrome.pageCapture {
+ interface SaveDetails {
+ /** The id of the tab to save as MHTML. */
+ tabId: number;
+ }
+
+ /**
+ * Saves the content of the tab with given id as MHTML.
+ * @param callback Called when the MHTML has been generated.
+ * The callback parameter should be a function that looks like this:
+ * function(binary mhtmlData) {...};
+ * Parameter mhtmlData: The MHTML data as a Blob.
+ */
+ export function saveAsMHTML(details: SaveDetails, callback: (mhtmlData: any) => void): void;
+}
+
+////////////////////
+// Permissions
+////////////////////
+/**
+ * Use the chrome.permissions API to request declared optional permissions at run time rather than install time, so users understand why the permissions are needed and grant only those that are necessary.
+ * @since Chrome 16.
+ */
+declare module chrome.permissions {
+ interface Permissions {
+ /**
+ * Optional.
+ * List of named permissions (does not include hosts or origins). Anything listed here must appear in the optional_permissions list in the manifest.
+ */
+ origins?: string[];
+ /**
+ * Optional.
+ * List of origin permissions. Anything listed here must be a subset of a host that appears in the optional_permissions list in the manifest. For example, if http://*.example.com/ or http://* appears in optional_permissions, you can request an origin of http://help.example.com/. Any path is ignored.
+ */
+ permissions?: string[];
+ }
+
+ interface PermissionsRemovedEvent {
+ /**
+ * @param callback The callback parameter should be a function that looks like this:
+ * function( Permissions permissions) {...};
+ * Parameter permissions: The permissions that have been removed.
+ */
+ addListener(callback: (permissions: Permissions) => void): void;
+ }
+
+ interface PermissionsAddedEvent {
+ /**
+ * @param callback The callback parameter should be a function that looks like this:
+ * function( Permissions permissions) {...};
+ * Parameter permissions: The newly acquired permissions.
+ */
+ addListener(callback: (permissions: Permissions) => void): void;
+ }
+
+ /**
+ * Checks if the extension has the specified permissions.
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(boolean result) {...};
+ * Parameter result: True if the extension has the specified permissions.
+ */
+ export function contains(permissions: Permissions, callback: (result: boolean) => void): void;
+ /**
+ * Gets the extension's current set of permissions.
+ * @param callback The callback parameter should be a function that looks like this:
+ * function( Permissions permissions) {...};
+ * Parameter permissions: The extension's active permissions.
+ */
+ export function getAll(callback: (permissions: Permissions) => void): void;
+ /**
+ * Requests access to the specified permissions. These permissions must be defined in the optional_permissions field of the manifest. If there are any problems requesting the permissions, runtime.lastError will be set.
+ * @param callback If you specify the callback parameter, it should be a function that looks like this:
+ * function(boolean granted) {...};
+ * Parameter granted: True if the user granted the specified permissions.
+ */
+ export function request(permissions: Permissions, callback?: (granted: boolean) => void): void;
+ /**
+ * Removes access to the specified permissions. If there are any problems removing the permissions, runtime.lastError will be set.
+ * @param callback If you specify the callback parameter, it should be a function that looks like this:
+ * function(boolean removed) {...};
+ * Parameter removed: True if the permissions were removed.
+ */
+ export function remove(permissions: Permissions, callback?: (removed: boolean) => void): void;
+
+ /** Fired when access to permissions has been removed from the extension. */
+ var onRemoved: PermissionsRemovedEvent;
+ /** Fired when the extension acquires new permissions. */
+ var onAdded: PermissionsAddedEvent;
+}
+
+////////////////////
+// Platform Keys
+////////////////////
+/**
+ * Use the chrome.platformKeys API to access client certificates managed by the platform. If the user or policy grants the permission, an extension can use such a certficate in its custom authentication protocol. E.g. this allows usage of platform managed certificates in third party VPNs (see chrome.vpnProvider).
+ * Permissions: "platformKeys"
+ * Important: This API works only on Chrome OS.
+ * @since Chrome 45.
+ */
+declare module chrome.platformKeys {
+ interface Match {
+ /** The DER encoding of a X.509 certificate. */
+ certificate: ArrayBuffer;
+ /** The KeyAlgorithm of the certified key. This contains algorithm parameters that are inherent to the key of the certificate (e.g. the key length). Other parameters like the hash function used by the sign function are not included. */
+ keyAlgorithm: KeyAlgorithm;
+ }
+
+ interface ClientCertificateSelectRequestDetails {
+ /** This field is a list of the types of certificates requested, sorted in order of the server's preference. Only certificates of a type contained in this list will be retrieved. If certificateTypes is the empty list, however, certificates of any type will be returned. */
+ certificateTypes: string[];
+ /** List of distinguished names of certificate authorities allowed by the server. Each entry must be a DER-encoded X.509 DistinguishedName. */
+ certificateAuthorities: ArrayBuffer[];
+ }
+
+ interface ClientCertificateSelectDetails {
+ /** Only certificates that match this request will be returned. */
+ request: ClientCertificateSelectRequestDetails;
+ /**
+ * Optional.
+ * If given, the selectClientCertificates operates on this list. Otherwise, obtains the list of all certificates from the platform's certificate stores that are available to this extensions. Entries that the extension doesn't have permission for or which doesn't match the request, are removed.
+ */
+ clientCerts?: ArrayBuffer[];
+ /** If true, the filtered list is presented to the user to manually select a certificate and thereby granting the extension access to the certificate(s) and key(s). Only the selected certificate(s) will be returned. If is false, the list is reduced to all certificates that the extension has been granted access to (automatically or manually). */
+ interactive: boolean;
+ }
+
+ interface ServerCertificateVerificationDetails {
+ /** Each chain entry must be the DER encoding of a X.509 certificate, the first entry must be the server certificate and each entry must certify the entry preceding it. */
+ serverCertificateChain: ArrayBuffer[];
+ /** The hostname of the server to verify the certificate for, e.g. the server that presented the serverCertificateChain. */
+ hostname: string;
+ }
+
+ interface ServerCertificateVerificationResult {
+ /** The result of the trust verification: true if trust for the given verification details could be established and false if trust is rejected for any reason. */
+ trusted: boolean;
+ /**
+ * If the trust verification failed, this array contains the errors reported by the underlying network layer. Otherwise, this array is empty.
+ * Note: This list is meant for debugging only and may not contain all relevant errors. The errors returned may change in future revisions of this API, and are not guaranteed to be forwards or backwards compatible.
+ */
+ debug_errors: string[];
+ }
+
+ /**
+ * This function filters from a list of client certificates the ones that are known to the platform, match request and for which the extension has permission to access the certificate and its private key. If interactive is true, the user is presented a dialog where he can select from matching certificates and grant the extension access to the certificate. The selected/filtered client certificates will be passed to callback.
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(array of Match matches) {...};
+ * Parameter matches: The list of certificates that match the request, that the extension has permission for and, if interactive is true, that were selected by the user.
+ */
+ export function selectClientCertificates(details: ClientCertificateSelectDetails, callback: (matches: Match[]) => void): void;
+ /**
+ * Passes the key pair of certificate for usage with platformKeys.subtleCrypto to callback.
+ * @param certificate The certificate of a Match returned by selectClientCertificates.
+ * @param parameters Determines signature/hash algorithm parameters additionally to the parameters fixed by the key itself. The same parameters are accepted as by WebCrypto's importKey function, e.g. RsaHashedImportParams for a RSASSA-PKCS1-v1_5 key. For RSASSA-PKCS1-v1_5 keys, additionally the parameters { 'hash': { 'name': 'none' } } are supported. The sign function will then apply PKCS#1 v1.5 padding and but not hash the given data.
+ * @param callback The public and private CryptoKey of a certificate which can only be used with platformKeys.subtleCrypto.
+ * The callback parameter should be a function that looks like this:
+ * function(object publicKey, object privateKey) {...};
+ * Optional parameter privateKey: Might be null if this extension does not have access to it.
+ */
+ export function getKeyPair(certificate: ArrayBuffer, parameters: Object, callback: (publicKey: CryptoKey, privateKey?: CryptoKey) => void): void;
+ /** An implementation of WebCrypto's SubtleCrypto that allows crypto operations on keys of client certificates that are available to this extension. */
+ export function subtleCrypto(): SubtleCrypto;
+ /**
+ * Checks whether details.serverCertificateChain can be trusted for details.hostname according to the trust settings of the platform. Note: The actual behavior of the trust verification is not fully specified and might change in the future. The API implementation verifies certificate expiration, validates the certification path and checks trust by a known CA. The implementation is supposed to respect the EKU serverAuth and to support subject alternative names.
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(object result) {...};
+ */
+ export function verifyTLSServerCertificate(details: ServerCertificateVerificationDetails, callback: (result: ServerCertificateVerificationResult) => void): void;
+}
+
+////////////////////
+// Power
+////////////////////
+/**
+ * Use the chrome.power API to override the system's power management features.
+ * Permissions: "power"
+ * @since Chrome 27.
+ */
+declare module chrome.power {
+ /** Requests that power management be temporarily disabled. |level| describes the degree to which power management should be disabled. If a request previously made by the same app is still active, it will be replaced by the new request. */
+ export function requestKeepAwake(level: string): void;
+ /** Releases a request previously made via requestKeepAwake(). */
+ export function releaseKeepAwake(): void;
+}
+
+////////////////////
+// Printer Provider
+////////////////////
+/**
+ * The chrome.printerProvider API exposes events used by print manager to query printers controlled by extensions, to query their capabilities and to submit print jobs to these printers.
+ * Permissions: "printerProvider"
+ * @since Chrome 44.
+ */
+declare module chrome.printerProvider {
+ interface PrinterInfo {
+ /** Unique printer ID. */
+ id: string;
+ /** Printer's human readable name. */
+ name: string;
+ /** Optional. Printer's human readable description. */
+ description?: string;
+ }
+
+ interface PrinterCapabilities {
+ /** Device capabilities in CDD format. */
+ capabilities: any;
+ }
+
+ interface PrintJob {
+ /** ID of the printer which should handle the job. */
+ printerId: string;
+ /** The print job title. */
+ title: string;
+ /** Print ticket in CJT format. */
+ ticket: Object;
+ /** The document content type. Supported formats are "application/pdf" and "image/pwg-raster". */
+ contentType: string;
+ /** Blob containing the document data to print. Format must match |contentType|. */
+ document: Blob;
+ }
+
+ interface PrinterRequestedEvent extends chrome.events.Event {
+ /**
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(function resultCallback) {...};
+ * Parameter resultCallback: Callback to return printer list. Every listener must call callback exactly once.
+ */
+ addListener(callback: (resultCallback: (printerInfo: PrinterInfo[]) => void) => void): void;
+ }
+
+ interface PrinterInfoRequestedEvent extends chrome.events.Event {
+ /**
+ * @param callback The callback parameter should be a function that looks like this:
+ * function( usb.Device device, function resultCallback) {...};
+ * Parameter device: The USB device.
+ * Parameter resultCallback: Callback to return printer info. The receiving listener must call callback exactly once. If the parameter to this callback is undefined that indicates that the application has determined that the device is not supported.
+ */
+ addListener(callback: (device: any, resultCallback: (printerInfo?: PrinterInfo) => void) => void): void;
+ }
+
+ interface CapabilityRequestedEvent extends chrome.events.Event {
+ /**
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(string printerId, function resultCallback) {...};
+ * Parameter printerId: Unique ID of the printer whose capabilities are requested.
+ * Parameter resultCallback: Callback to return device capabilities in CDD format. The receiving listener must call callback exectly once.
+ */
+ addListener(callback: (printerId: string, resultCallback: (capabilities: PrinterCapabilities) => void) => void): void;
+ }
+
+ interface PrintRequestedEvent extends chrome.events.Event {
+ /**
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(object printJob, function resultCallback) {...};
+ * Parameter printJob: The printing request parameters.
+ * Parameter resultCallback: Callback that should be called when the printing request is completed.
+ * Parameter result (for resultCallback): OK: Operation completed successfully. FAILED: General failure. INVALID_TICKET: Print ticket is invalid. For example, ticket is inconsistent with capabilities or extension is not able to handle all settings from the ticket. INVALID_DATA: Document is invalid. For example, data may be corrupted or the format is incompatible with the extension.
+ */
+ addListener(callback: (printJob: PrintJob, resultCallback: (result: string) => void) => void): void;
+ }
+
+ /** Event fired when print manager requests printers provided by extensions. */
+ export var onGetPrintersRequested: PrinterRequestedEvent;
+ /**
+ * Event fired when print manager requests information about a USB device that may be a printer.
+ * Note: An application should not rely on this event being fired more than once per device. If a connected device is supported it should be returned in the onGetPrintersRequested event.
+ * @since Chrome 45.
+ */
+ export var onGetUsbPrinterInfoRequested: PrinterInfoRequestedEvent;
+ /** Event fired when print manager requests printer capabilities. */
+ export var onGetCapabilityRequested: CapabilityRequestedEvent;
+ /** Event fired when print manager requests printing. */
+ export var onPrintRequested: PrintRequestedEvent;
+}
+
+////////////////////
+// Privacy
+////////////////////
+/**
+ * Use the chrome.privacy API to control usage of the features in Chrome that can affect a user's privacy. This API relies on the ChromeSetting prototype of the type API for getting and setting Chrome's configuration.
+ * Permissions: "privacy"
+ * The Chrome Privacy Whitepaper gives background detail regarding the features which this API can control.
+ * @since Chrome 18.
+ */
+declare module chrome.privacy {
+ interface Services {
+ /** since Chrome 20. */
+ spellingServiceEnabled: chrome.types.ChromeSetting;
+ searchSuggestEnabled: chrome.types.ChromeSetting;
+ instantEnabled: chrome.types.ChromeSetting;
+ alternateErrorPagesEnabled: chrome.types.ChromeSetting;
+ safeBrowsingEnabled: chrome.types.ChromeSetting;
+ autofillEnabled: chrome.types.ChromeSetting;
+ translationServiceEnabled: chrome.types.ChromeSetting;
+ /** @since Chrome 38. */
+ passwordSavingEnabled: chrome.types.ChromeSetting;
+ /** @since Chrome 42. */
+ hotwordSearchEnabled: chrome.types.ChromeSetting;
+ /** @since Chrome 42. */
+ safeBrowsingExtendedReportingEnabled: chrome.types.ChromeSetting;
+ }
+
+ interface Network {
+ networkPredictionEnabled: chrome.types.ChromeSetting;
+ /** @since Chrome 42. */
+ webRTCMultipleRoutesEnabled: chrome.types.ChromeSetting;
+ /** @since Chrome 47. Warning: this is the current Dev channel. */
+ webRTCNonProxiedUdpEnabled: chrome.types.ChromeSetting;
+ }
+
+ interface Websites {
+ thirdPartyCookiesAllowed: chrome.types.ChromeSetting;
+ referrersEnabled: chrome.types.ChromeSetting;
+ hyperlinkAuditingEnabled: chrome.types.ChromeSetting;
+ /** @since Chrome 21. */
+ protectedContentEnabled: chrome.types.ChromeSetting;
+ }
+
+ /** Settings that enable or disable features that require third-party network services provided by Google and your default search provider. */
+ var services: Services;
+ /** Settings that influence Chrome's handling of network connections in general. */
+ var network: Network;
+ /** Settings that determine what information Chrome makes available to websites. */
+ var websites: Websites;
+}
+
+////////////////////
+// Proxy
+////////////////////
+/**
+ * Use the chrome.proxy API to manage Chrome's proxy settings. This API relies on the ChromeSetting prototype of the type API for getting and setting the proxy configuration.
+ * Permissions: "proxy"
+ * @since Chrome 13.
+ */
+declare module chrome.proxy {
+ /** An object holding proxy auto-config information. Exactly one of the fields should be non-empty. */
+ interface PacScript {
+ /** Optional. URL of the PAC file to be used. */
+ url?: string;
+ /** Optional. If true, an invalid PAC script will prevent the network stack from falling back to direct connections. Defaults to false. */
+ mandatory?: boolean;
+ /** Optional. A PAC script. */
+ data?: string;
+ }
+
+ /** An object encapsulating a complete proxy configuration. */
+ interface ProxyConfig {
+ /** Optional. The proxy rules describing this configuration. Use this for 'fixed_servers' mode. */
+ rules?: ProxyRules;
+ /** Optional. The proxy auto-config (PAC) script for this configuration. Use this for 'pac_script' mode. */
+ pacScript?: PacScript;
+ /**
+ * 'direct' = Never use a proxy
+ * 'auto_detect' = Auto detect proxy settings
+ * 'pac_script' = Use specified PAC script
+ * 'fixed_servers' = Manually specify proxy servers
+ * 'system' = Use system proxy settings
+ */
+ mode: string;
+ }
+
+ /** An object encapsulating a single proxy server's specification. */
+ interface ProxyServer {
+ /** The URI of the proxy server. This must be an ASCII hostname (in Punycode format). IDNA is not supported, yet. */
+ host: string;
+ /** Optional. The scheme (protocol) of the proxy server itself. Defaults to 'http'. */
+ scheme?: string;
+ /** Optional. The port of the proxy server. Defaults to a port that depends on the scheme. */
+ port?: number;
+ }
+
+ /** An object encapsulating the set of proxy rules for all protocols. Use either 'singleProxy' or (a subset of) 'proxyForHttp', 'proxyForHttps', 'proxyForFtp' and 'fallbackProxy'. */
+ interface ProxyRules {
+ /** Optional. The proxy server to be used for FTP requests. */
+ proxyForFtp?: ProxyServer;
+ /** Optional. The proxy server to be used for HTTP requests. */
+ proxyForHttp?: ProxyServer;
+ /** Optional. The proxy server to be used for everthing else or if any of the specific proxyFor... is not specified. */
+ fallbackProxy?: ProxyServer;
+ /** Optional. The proxy server to be used for all per-URL requests (that is http, https, and ftp). */
+ singleProxy?: ProxyServer;
+ /** Optional. The proxy server to be used for HTTPS requests. */
+ proxyForHttps?: ProxyServer;
+ /** Optional. List of servers to connect to without a proxy server. */
+ bypassList?: string[];
+ }
+
+ interface ErrorDetails {
+ /** Additional details about the error such as a JavaScript runtime error. */
+ details: string;
+ /** The error description. */
+ error: string;
+ /** If true, the error was fatal and the network transaction was aborted. Otherwise, a direct connection is used instead. */
+ fatal: boolean;
+ }
+
+ interface ProxyErrorEvent extends chrome.events.Event {
+ /**
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(object details) {...};
+ */
+ addListener(callback: (details: ErrorDetails) => void): void;
+ }
+
+ var settings: chrome.types.ChromeSetting;
+ /** Notifies about proxy errors. */
+ var onProxyError: ProxyErrorEvent;
+}
+
+////////////////////
+// Runtime
+////////////////////
+/**
+ * Use the chrome.runtime API to retrieve the background page, return details about the manifest, and listen for and respond to events in the app or extension lifecycle. You can also use this API to convert the relative path of URLs to fully-qualified URLs.
+ * @since Chrome 22
+ */
+declare module chrome.runtime {
+ /** This will be defined during an API method callback if there was an error */
+ var lastError: LastError;
+ /** The ID of the extension/app. */
+ var id: string;
+
+ interface LastError {
+ /** Optional. Details about the error which occurred. */
+ message?: string;
+ }
+
+ interface ConnectInfo {
+ name?: string;
+ }
+
+ interface InstalledDetails {
+ /**
+ * The reason that this event is being dispatched.
+ * One of: "install", "update", "chrome_update", or "shared_module_update"
+ */
+ reason: string;
+ /**
+ * Optional.
+ * Indicates the previous version of the extension, which has just been updated. This is present only if 'reason' is 'update'.
+ */
+ previousVersion?: string;
+ /**
+ * Optional.
+ * Indicates the ID of the imported shared module extension which updated. This is present only if 'reason' is 'shared_module_update'.
+ * @since Chrome 29.
+ */
+ id?: string;
+ }
+
+ interface MessageOptions {
+ /** Whether the TLS channel ID will be passed into onMessageExternal for processes that are listening for the connection event. */
+ includeTlsChannelId?: boolean;
+ }
+
+ /**
+ * An object containing information about the script context that sent a message or request.
+ * @since Chrome 26.
+ */
+ interface MessageSender {
+ /** The ID of the extension or app that opened the connection, if any. */
+ id?: string;
+ /** The tabs.Tab which opened the connection, if any. This property will only be present when the connection was opened from a tab (including content scripts), and only if the receiver is an extension, not an app. */
+ tab?: chrome.tabs.Tab;
+ /**
+ * The frame that opened the connection. 0 for top-level frames, positive for child frames. This will only be set when tab is set.
+ * @since Chrome 41.
+ */
+ frameId?: number;
+ /**
+ * The URL of the page or frame that opened the connection. If the sender is in an iframe, it will be iframe's URL not the URL of the page which hosts it.
+ * @since Chrome 28.
+ */
+ url?: string;
+ /**
+ * The TLS channel ID of the page or frame that opened the connection, if requested by the extension or app, and if available.
+ * @since Chrome 32.
+ */
+ tlsChannelId?: string;
+ }
+
+ /**
+ * An object containing information about the current platform.
+ * @since Chrome 36.
+ */
+ interface PlatformInfo {
+ /**
+ * The operating system chrome is running on.
+ * One of: "mac", "win", "android", "cros", "linux", or "openbsd"
+ */
+ os: string;
+ /**
+ * The machine's processor architecture.
+ * One of: "arm", "x86-32", or "x86-64"
+ */
+ arch: string;
+ /**
+ * The native client architecture. This may be different from arch on some platforms.
+ * One of: "arm", "x86-32", or "x86-64"
+ */
+ nacl_arch: string;
+ }
+
+ /**
+ * An object which allows two way communication with other pages.
+ * @since Chrome 26.
+ */
+ interface Port {
+ postMessage: (message: Object) => void;
+ disconnect: () => void;
+ /**
+ * Optional.
+ * This property will only be present on ports passed to onConnect/onConnectExternal listeners.
+ */
+ sender?: MessageSender;
+ /** An object which allows the addition and removal of listeners for a Chrome event. */
+ onDisconnect: chrome.events.Event;
+ /** An object which allows the addition and removal of listeners for a Chrome event. */
+ onMessage: PortMessageEvent;
+ name: string;
+ }
+
+ interface UpdateAvailableDetails {
+ /** The version number of the available update. */
+ version: string;
+ }
+
+ interface UpdateCheckDetails {
+ /** The version of the available update. */
+ version: string;
+ }
+
+ interface PortMessageEvent extends chrome.events.Event {
+ addListener(callback: (message: Object, port: Port) => void): void;
+ }
+
+ interface ExtensionMessageEvent extends chrome.events.Event {
+ /**
+ * @param callback
+ * Optional parameter message: The message sent by the calling script.
+ * Parameter sendResponse: Function to call (at most once) when you have a response. The argument should be any JSON-ifiable object. If you have more than one onMessage listener in the same document, then only one may send a response. This function becomes invalid when the event listener returns, unless you return true from the event listener to indicate you wish to send a response asynchronously (this will keep the message channel open to the other end until sendResponse is called).
+ */
+ addListener(callback: (message: any, sender: MessageSender, sendResponse: Function) => void): void;
+ }
+
+ interface ExtensionConnectEvent extends chrome.events.Event {
+ addListener(callback: (port: Port) => void): void;
+ }
+
+ interface RuntimeInstalledEvent extends chrome.events.Event {
+ addListener(callback: (details: InstalledDetails) => void): void;
+ }
+
+ interface RuntimeEvent extends chrome.events.Event {
+ addListener(callback: () => void): void;
+ }
+
+ interface RuntimeRestartRequiredEvent extends chrome.events.Event {
+ /**
+ * @param callback
+ * Parameter reason: The reason that the event is being dispatched. One of: "app_update", "os_update", or "periodic"
+ */
+ addListener(callback: (reason: string) => void): void;
+ }
+
+ interface RuntimeUpdateAvailableEvent extends chrome.events.Event {
+ /**
+ * @param callback
+ * Parameter details: The manifest details of the available update.
+ */
+ addListener(callback: (details: UpdateAvailableDetails) => void): void;
+ }
+
+ /**
+ * Attempts to connect to connect listeners within an extension/app (such as the background page), or other extensions/apps. This is useful for content scripts connecting to their extension processes, inter-app/extension communication, and web messaging. Note that this does not connect to any listeners in a content script. Extensions may connect to content scripts embedded in tabs via tabs.connect.
+ * @since Chrome 26.
+ */
+ export function connect(connectInfo?: ConnectInfo): Port;
+ /**
+ * Attempts to connect to connect listeners within an extension/app (such as the background page), or other extensions/apps. This is useful for content scripts connecting to their extension processes, inter-app/extension communication, and web messaging. Note that this does not connect to any listeners in a content script. Extensions may connect to content scripts embedded in tabs via tabs.connect.
+ * @since Chrome 26.
+ * @param extensionId Optional.
+ * The ID of the extension or app to connect to. If omitted, a connection will be attempted with your own extension. Required if sending messages from a web page for web messaging.
+ */
+ export function connect(extensionId: string, connectInfo?: ConnectInfo): Port;
+ /**
+ * Connects to a native application in the host machine.
+ * @since Chrome 28.
+ * @param application The name of the registered application to connect to.
+ */
+ export function connectNative(application: string): Port;
+ /** Retrieves the JavaScript 'window' object for the background page running inside the current extension/app. If the background page is an event page, the system will ensure it is loaded before calling the callback. If there is no background page, an error is set. */
+ export function getBackgroundPage(callback: (backgroundPage?: Window) => void): void;
+ /**
+ * Returns details about the app or extension from the manifest. The object returned is a serialization of the full manifest file.
+ * @returns The manifest details.
+ */
+ export function getManifest(): Object;
+ /**
+ * Returns a DirectoryEntry for the package directory.
+ * @since Chrome 29.
+ */
+ export function getPackageDirectoryEntry(callback: (directoryEntry: DirectoryEntry) => void): void;
+ /**
+ * Returns information about the current platform.
+ * @since Chrome 29.
+ * @param callback Called with results
+ */
+ export function getPlatformInfo(callback: (platformInfo: PlatformInfo) => void): void;
+ /**
+ * Converts a relative path within an app/extension install directory to a fully-qualified URL.
+ * @param path A path to a resource within an app/extension expressed relative to its install directory.
+ */
+ export function getURL(path: string): string;
+ /**
+ * Reloads the app or extension.
+ * @since Chrome 25.
+ */
+ export function reload(): void;
+ /**
+ * Requests an update check for this app/extension.
+ * @since Chrome 25.
+ * @param callback
+ * Parameter status: Result of the update check. One of: "throttled", "no_update", or "update_available"
+ * Optional parameter details: If an update is available, this contains more information about the available update.
+ */
+ export function requestUpdateCheck(callback: (status: string, details?: UpdateCheckDetails) => void): void;
+ /**
+ * Restart the ChromeOS device when the app runs in kiosk mode. Otherwise, it's no-op.
+ * @since Chrome 32.
+ */
+ export function restart(): void;
+ /**
+ * Sends a single message to event listeners within your extension/app or a different extension/app. Similar to runtime.connect but only sends a single message, with an optional response. If sending to your extension, the runtime.onMessage event will be fired in each page, or runtime.onMessageExternal, if a different extension. Note that extensions cannot send messages to content scripts using this method. To send messages to content scripts, use tabs.sendMessage.
+ * @since Chrome 26.
+ * @param responseCallback Optional
+ * Parameter response: The JSON response object sent by the handler of the message. If an error occurs while connecting to the extension, the callback will be called with no arguments and runtime.lastError will be set to the error message.
+ */
+ export function sendMessage(message: any, responseCallback?: (response: any) => void): void;
+ /**
+ * Sends a single message to event listeners within your extension/app or a different extension/app. Similar to runtime.connect but only sends a single message, with an optional response. If sending to your extension, the runtime.onMessage event will be fired in each page, or runtime.onMessageExternal, if a different extension. Note that extensions cannot send messages to content scripts using this method. To send messages to content scripts, use tabs.sendMessage.
+ * @since Chrome 32.
+ * @param responseCallback Optional
+ * Parameter response: The JSON response object sent by the handler of the message. If an error occurs while connecting to the extension, the callback will be called with no arguments and runtime.lastError will be set to the error message.
+ */
+ export function sendMessage(message: any, options: MessageOptions, responseCallback?: (response: any) => void): void;
+ /**
+ * Sends a single message to event listeners within your extension/app or a different extension/app. Similar to runtime.connect but only sends a single message, with an optional response. If sending to your extension, the runtime.onMessage event will be fired in each page, or runtime.onMessageExternal, if a different extension. Note that extensions cannot send messages to content scripts using this method. To send messages to content scripts, use tabs.sendMessage.
+ * @since Chrome 26.
+ * @param extensionId The ID of the extension/app to send the message to. If omitted, the message will be sent to your own extension/app. Required if sending messages from a web page for web messaging.
+ * @param responseCallback Optional
+ * Parameter response: The JSON response object sent by the handler of the message. If an error occurs while connecting to the extension, the callback will be called with no arguments and runtime.lastError will be set to the error message.
+ */
+ export function sendMessage(extensionId: string, message: any, responseCallback?: (response: any) => void): void;
+ /**
+ * Sends a single message to event listeners within your extension/app or a different extension/app. Similar to runtime.connect but only sends a single message, with an optional response. If sending to your extension, the runtime.onMessage event will be fired in each page, or runtime.onMessageExternal, if a different extension. Note that extensions cannot send messages to content scripts using this method. To send messages to content scripts, use tabs.sendMessage.
+ * @since Chrome 32.
+ * @param extensionId The ID of the extension/app to send the message to. If omitted, the message will be sent to your own extension/app. Required if sending messages from a web page for web messaging.
+ * @param responseCallback Optional
+ * Parameter response: The JSON response object sent by the handler of the message. If an error occurs while connecting to the extension, the callback will be called with no arguments and runtime.lastError will be set to the error message.
+ */
+ export function sendMessage(extensionId: string, message: any, options: MessageOptions, responseCallback?: (response: any) => void): void;
+ /**
+ * Send a single message to a native application.
+ * @since Chrome 28.
+ * @param application The of the native messaging host.
+ * @param message The message that will be passed to the native messaging host.
+ * @param responseCallback Optional.
+ * Parameter response: The response message sent by the native messaging host. If an error occurs while connecting to the native messaging host, the callback will be called with no arguments and runtime.lastError will be set to the error message.
+ */
+ export function sendNativeMessage(application: string, message: Object, responseCallback?: (response: any) => void): void;
+ /**
+ * Sets the URL to be visited upon uninstallation. This may be used to clean up server-side data, do analytics, and implement surveys. Maximum 255 characters.
+ * @since Chrome 41.
+ * @param url Since Chrome 34.
+ * URL to be opened after the extension is uninstalled. This URL must have an http: or https: scheme. Set an empty string to not open a new tab upon uninstallation.
+ * @param callback Called when the uninstall URL is set. If the given URL is invalid, runtime.lastError will be set.
+ */
+ export function setUninstallURL(url: string, callback?: () => void): void;
+ /**
+ * Open your Extension's options page, if possible.
+ * The precise behavior may depend on your manifest's options_ui or options_page key, or what Chrome happens to support at the time. For example, the page may be opened in a new tab, within chrome://extensions, within an App, or it may just focus an open options page. It will never cause the caller page to reload.
+ * If your Extension does not declare an options page, or Chrome failed to create one for some other reason, the callback will set lastError.
+ * @since Chrome 42.
+ */
+ export function openOptionsPage(callback?: () => void): void;
+
+ /**
+ * Fired when a connection is made from either an extension process or a content script.
+ * @since Chrome 26.
+ */
+ var onConnect: ExtensionConnectEvent;
+ /**
+ * Fired when a connection is made from another extension.
+ * @since Chrome 26.
+ */
+ var onConnectExternal: RuntimeEvent;
+ /** Sent to the event page just before it is unloaded. This gives the extension opportunity to do some clean up. Note that since the page is unloading, any asynchronous operations started while handling this event are not guaranteed to complete. If more activity for the event page occurs before it gets unloaded the onSuspendCanceled event will be sent and the page won't be unloaded. */
+ var onSuspend: RuntimeEvent;
+ /**
+ * Fired when a profile that has this extension installed first starts up. This event is not fired when an incognito profile is started, even if this extension is operating in 'split' incognito mode.
+ * @since Chrome 23.
+ */
+ var onStartup: RuntimeEvent;
+ /** Fired when the extension is first installed, when the extension is updated to a new version, and when Chrome is updated to a new version. */
+ var onInstalled: RuntimeInstalledEvent;
+ /** Sent after onSuspend to indicate that the app won't be unloaded after all. */
+ var onSuspendCanceled: RuntimeEvent;
+ /**
+ * Fired when a message is sent from either an extension process or a content script.
+ * @since Chrome 26.
+ */
+ var onMessage: ExtensionMessageEvent;
+ /**
+ * Fired when a message is sent from another extension/app. Cannot be used in a content script.
+ * @since Chrome 26.
+ */
+ var onMessageExternal: ExtensionMessageEvent;
+ /**
+ * Fired when an app or the device that it runs on needs to be restarted. The app should close all its windows at its earliest convenient time to let the restart to happen. If the app does nothing, a restart will be enforced after a 24-hour grace period has passed. Currently, this event is only fired for Chrome OS kiosk apps.
+ * @since Chrome 29.
+ */
+ var onRestartRequired: RuntimeRestartRequiredEvent;
+ /**
+ * Fired when an update is available, but isn't installed immediately because the app is currently running. If you do nothing, the update will be installed the next time the background page gets unloaded, if you want it to be installed sooner you can explicitly call chrome.runtime.reload(). If your extension is using a persistent background page, the background page of course never gets unloaded, so unless you call chrome.runtime.reload() manually in response to this event the update will not get installed until the next time chrome itself restarts. If no handlers are listening for this event, and your extension has a persistent background page, it behaves as if chrome.runtime.reload() is called in response to this event.
+ * @since Chrome 25.
+ */
+ var onUpdateAvailable: RuntimeUpdateAvailableEvent;
+ /**
+ * @deprecated since Chrome 33. Please use chrome.runtime.onRestartRequired.
+ * Fired when a Chrome update is available, but isn't installed immediately because a browser restart is required.
+ */
+ var onBrowserUpdateAvailable: RuntimeEvent;
+}
+
+////////////////////
+// Script Badge
+////////////////////
+declare module chrome.scriptBadge {
+ interface GetPopupDetails {
+ tabId: number;
+ }
+
+ interface AttentionDetails {
+ tabId: number;
+ }
+
+ interface SetPopupDetails {
+ tabId: number;
+ popup: string;
+ }
+
+ interface ScriptBadgeClickedEvent extends chrome.events.Event {
+ addListener(callback: (tab: chrome.tabs.Tab) => void): void;
+ }
+
+ export function getPopup(details: GetPopupDetails, callback: Function): void;
+ export function getAttention(details: AttentionDetails): void;
+ export function setPopup(details: SetPopupDetails): void;
+
+ var onClicked: ScriptBadgeClickedEvent;
+}
+
+////////////////////
+// Sessions
+////////////////////
+/**
+ * Use the chrome.sessions API to query and restore tabs and windows from a browsing session.
+ * Permissions: "sessions"
+ * @since Chrome 37.
+ */
+declare module chrome.sessions {
+ interface Filter {
+ /**
+ * Optional.
+ * The maximum number of entries to be fetched in the requested list. Omit this parameter to fetch the maximum number of entries (sessions.MAX_SESSION_RESULTS).
+ */
+ maxResults?: number;
+ }
+
+ interface Session {
+ /** The time when the window or tab was closed or modified, represented in milliseconds since the epoch. */
+ lastModified: number;
+ /**
+ * Optional.
+ * The tabs.Tab, if this entry describes a tab. Either this or sessions.Session.window will be set.
+ */
+ tab?: tabs.Tab;
+ /**
+ * Optional.
+ * The windows.Window, if this entry describes a window. Either this or sessions.Session.tab will be set.
+ */
+ window?: windows.Window;
+ }
+
+ interface Device {
+ /** The name of the foreign device. */
+ deviceName: string;
+ /** A list of open window sessions for the foreign device, sorted from most recently to least recently modified session. */
+ sessions: Session[];
+ }
+
+ interface SessionChangedEvent extends chrome.events.Event {
+ addListener(callback: () => void): void;
+ }
+
+ /** The maximum number of sessions.Session that will be included in a requested list. */
+ export var MAX_SESSION_RESULTS: number;
+
+ /**
+ * Gets the list of recently closed tabs and/or windows.
+ * @param callback
+ * Parameter sessions: The list of closed entries in reverse order that they were closed (the most recently closed tab or window will be at index 0). The entries may contain either tabs or windows.
+ */
+ export function getRecentlyClosed(filter: Filter, callback: (sessions: Session[]) => void): void;
+ /**
+ * Gets the list of recently closed tabs and/or windows.
+ * @param callback
+ * Parameter sessions: The list of closed entries in reverse order that they were closed (the most recently closed tab or window will be at index 0). The entries may contain either tabs or windows.
+ */
+ export function getRecentlyClosed(callback: (sessions: Session[]) => void): void;
+ /**
+ * Retrieves all devices with synced sessions.
+ * @param callback
+ * Parameter devices: The list of sessions.Device objects for each synced session, sorted in order from device with most recently modified session to device with least recently modified session. tabs.Tab objects are sorted by recency in the windows.Window of the sessions.Session objects.
+ */
+ export function getDevices(filter: Filter, callback: (devices: Device[]) => void): void;
+ /**
+ * Retrieves all devices with synced sessions.
+ * @param callback
+ * Parameter devices: The list of sessions.Device objects for each synced session, sorted in order from device with most recently modified session to device with least recently modified session. tabs.Tab objects are sorted by recency in the windows.Window of the sessions.Session objects.
+ */
+ export function getDevices(callback: (devices: Device[]) => void): void;
+ /**
+ * Reopens a windows.Window or tabs.Tab, with an optional callback to run when the entry has been restored.
+ * @param sessionId Optional.
+ * The windows.Window.sessionId, or tabs.Tab.sessionId to restore. If this parameter is not specified, the most recently closed session is restored.
+ * @param callback Optional.
+ * Parameter restoredSession: A sessions.Session containing the restored windows.Window or tabs.Tab object.
+ */
+ export function restore(sessionId?: string, callback?: (restoredSession: Session) => void): void;
+
+ /** Fired when recently closed tabs and/or windows are changed. This event does not monitor synced sessions changes. */
+ export var onChanged: SessionChangedEvent;
+}
+
+////////////////////
+// Storage
+////////////////////
+/**
+ * Use the chrome.storage API to store, retrieve, and track changes to user data.
+ * Permissions: "storage"
+ * @since Chrome 20.
+ */
+declare module chrome.storage {
+ interface StorageArea {
+ /**
+ * Gets the amount of space (in bytes) being used by one or more items.
+ * @param callback Callback with the amount of space being used by storage, or on failure (in which case runtime.lastError will be set).
+ * Parameter bytesInUse: Amount of space being used in storage, in bytes.
+ */
+ getBytesInUse(callback: (bytesInUse: number) => void): void;
+ /**
+ * Gets the amount of space (in bytes) being used by one or more items.
+ * @param key A single key to get the total usage for. Pass in null to get the total usage of all of storage.
+ * @param callback Callback with the amount of space being used by storage, or on failure (in which case runtime.lastError will be set).
+ * Parameter bytesInUse: Amount of space being used in storage, in bytes.
+ */
+ getBytesInUse(key: string, callback: (bytesInUse: number) => void): void;
+ /**
+ * Gets the amount of space (in bytes) being used by one or more items.
+ * @param keys A list of keys to get the total usage for. An empty list will return 0. Pass in null to get the total usage of all of storage.
+ * @param callback Callback with the amount of space being used by storage, or on failure (in which case runtime.lastError will be set).
+ * Parameter bytesInUse: Amount of space being used in storage, in bytes.
+ */
+ getBytesInUse(keys: string[], callback: (bytesInUse: number) => void): void;
+ /**
+ * Removes all items from storage.
+ * @param callback Optional.
+ * Callback on success, or on failure (in which case runtime.lastError will be set).
+ */
+ clear(callback?: () => void): void;
+ /**
+ * Sets multiple items.
+ * @param items An object which gives each key/value pair to update storage with. Any other key/value pairs in storage will not be affected.
+ * Primitive values such as numbers will serialize as expected. Values with a typeof "object" and "function" will typically serialize to {}, with the exception of Array (serializes as expected), Date, and Regex (serialize using their String representation).
+ * @param callback Optional.
+ * Callback on success, or on failure (in which case runtime.lastError will be set).
+ */
+ set(items: Object, callback?: () => void): void;
+ /**
+ * Removes one item from storage.
+ * @param key A single key for items to remove.
+ * @param callback Optional.
+ * Callback on success, or on failure (in which case runtime.lastError will be set).
+ */
+ remove(key: string, callback?: () => void): void;
+ /**
+ * Removes items from storage.
+ * @param keys A list of keys for items to remove.
+ * @param callback Optional.
+ * Callback on success, or on failure (in which case runtime.lastError will be set).
+ */
+ remove(keys: string[], callback?: () => void): void;
+ /**
+ * Gets one or more items from storage.
+ * @param callback Callback with storage items, or on failure (in which case runtime.lastError will be set).
+ * Parameter items: Object with items in their key-value mappings.
+ */
+ get(callback: (items: { [key: string]: any }) => void): void;
+ /**
+ * Gets one or more items from storage.
+ * @param key A single key to get. Pass in null to get the entire contents of storage.
+ * @param callback Callback with storage items, or on failure (in which case runtime.lastError will be set).
+ * Parameter items: Object with items in their key-value mappings.
+ */
+ get(key: string, callback: (items: { [key: string]: any }) => void): void;
+ /**
+ * Gets one or more items from storage.
+ * @param keys A list of keys to get. An empty list or object will return an empty result object. Pass in null to get the entire contents of storage.
+ * @param callback Callback with storage items, or on failure (in which case runtime.lastError will be set).
+ * Parameter items: Object with items in their key-value mappings.
+ */
+ get(keys: string[], callback: (items: { [key: string]: any }) => void): void;
+ /**
+ * Gets one or more items from storage.
+ * @param keys A dictionary specifying default values. Pass in null to get the entire contents of storage.
+ * @param callback Callback with storage items, or on failure (in which case runtime.lastError will be set).
+ * Parameter items: Object with items in their key-value mappings.
+ */
+ get(keys: Object, callback: (items: { [key: string]: any }) => void): void;
+ }
+
+ interface StorageChange {
+ /** Optional. The new value of the item, if there is a new value. */
+ newValue?: any;
+ /** Optional. The old value of the item, if there was an old value. */
+ oldValue?: any;
+ }
+
+ interface LocalStorageArea extends StorageArea {
+ /** The maximum amount (in bytes) of data that can be stored in local storage, as measured by the JSON stringification of every value plus every key's length. This value will be ignored if the extension has the unlimitedStorage permission. Updates that would cause this limit to be exceeded fail immediately and set runtime.lastError. */
+ QUOTA_BYTES: number;
+ }
+
+ interface SyncStorageArea extends StorageArea {
+ /** @deprecated since Chrome 40. The storage.sync API no longer has a sustained write operation quota. */
+ MAX_SUSTAINED_WRITE_OPERATIONS_PER_MINUTE: number;
+ /** The maximum total amount (in bytes) of data that can be stored in sync storage, as measured by the JSON stringification of every value plus every key's length. Updates that would cause this limit to be exceeded fail immediately and set runtime.lastError. */
+ QUOTA_BYTES: number;
+ /** The maximum size (in bytes) of each individual item in sync storage, as measured by the JSON stringification of its value plus its key length. Updates containing items larger than this limit will fail immediately and set runtime.lastError. */
+ QUOTA_BYTES_PER_ITEM: number;
+ /** The maximum number of items that can be stored in sync storage. Updates that would cause this limit to be exceeded will fail immediately and set runtime.lastError. */
+ MAX_ITEMS: number;
+ /**
+ * The maximum number of set, remove, or clear operations that can be performed each hour. This is 1 every 2 seconds, a lower ceiling than the short term higher writes-per-minute limit.
+ * Updates that would cause this limit to be exceeded fail immediately and set runtime.lastError.
+ */
+ MAX_WRITE_OPERATIONS_PER_HOUR: number;
+ /**
+ * The maximum number of set, remove, or clear operations that can be performed each minute. This is 2 per second, providing higher throughput than writes-per-hour over a shorter period of time.
+ * Updates that would cause this limit to be exceeded fail immediately and set runtime.lastError.
+ * @since Chrome 40.
+ */
+ MAX_WRITE_OPERATIONS_PER_MINUTE: number;
+ }
+
+ interface StorageChangedEvent extends chrome.events.Event {
+ /**
+ * @param callback
+ * Parameter changes: Object mapping each key that changed to its corresponding storage.StorageChange for that item.
+ * Parameter areaName: Since Chrome 22. The name of the storage area ("sync", "local" or "managed") the changes are for.
+ */
+ addListener(callback: (changes: { [key: string]: StorageChange }, areaName: string) => void): void;
+ }
+
+ /** Items in the local storage area are local to each machine. */
+ var local: LocalStorageArea;
+ /** Items in the sync storage area are synced using Chrome Sync. */
+ var sync: SyncStorageArea;
+
+ /**
+ * Items in the managed storage area are set by the domain administrator, and are read-only for the extension; trying to modify this namespace results in an error.
+ * @since Chrome 33.
+ */
+ var managed: StorageArea;
+
+ /** Fired when one or more items change. */
+ var onChanged: StorageChangedEvent;
+}
+
+////////////////////
+// Socket
+////////////////////
+declare module chrome.socket {
+ interface CreateInfo {
+ socketId: number;
+ }
+
+ interface AcceptInfo {
+ resultCode: number;
+ socketId?: number;
+ }
+
+ interface ReadInfo {
+ resultCode: number;
+ data: ArrayBuffer;
+ }
+
+ interface WriteInfo {
+ bytesWritten: number;
+ }
+
+ interface RecvFromInfo {
+ resultCode: number;
+ data: ArrayBuffer;
+ port: number;
+ address: string;
+ }
+
+ interface SocketInfo {
+ socketType: string;
+ localPort?: number;
+ peerAddress?: string;
+ peerPort?: number;
+ localAddress?: string;
+ connected: boolean;
+ }
+
+ interface NetworkInterface {
+ name: string;
+ address: string;
+ }
+
+ export function create(type: string, options?: Object, callback?: (createInfo: CreateInfo) => void): void;
+ export function destroy(socketId: number): void;
+ export function connect(socketId: number, hostname: string, port: number, callback: (result: number) => void): void;
+ export function bind(socketId: number, address: string, port: number, callback: (result: number) => void): void;
+ export function disconnect(socketId: number): void;
+ export function read(socketId: number, bufferSize?: number, callback?: (readInfo: ReadInfo) => void): void;
+ export function write(socketId: number, data: ArrayBuffer, callback?: (writeInfo: WriteInfo) => void): void;
+ export function recvFrom(socketId: number, bufferSize?: number, callback?: (recvFromInfo: RecvFromInfo) => void): void;
+ export function sendTo(socketId: number, data: ArrayBuffer, address: string, port: number, callback?: (writeInfo: WriteInfo) => void): void;
+ export function listen(socketId: number, address: string, port: number, backlog?: number, callback?: (result: number) => void): void;
+ export function accept(socketId: number, callback?: (acceptInfo: AcceptInfo) => void): void;
+ export function setKeepAlive(socketId: number, enable: boolean, delay?: number, callback?: (result: boolean) => void): void;
+ export function setNoDelay(socketId: number, noDelay: boolean, callback?: (result: boolean) => void): void;
+ export function getInfo(socketId: number, callback: (result: SocketInfo) => void): void;
+ export function getNetworkList(callback: (result: NetworkInterface[]) => void): void;
+}
+
+////////////////////
+// System CPU
+////////////////////
+/**
+ * Use the system.cpu API to query CPU metadata.
+ * Permissions: "system.cpu"
+ * @since Chrome 32.
+ */
+declare module chrome.system.cpu {
+ interface ProcessorUsage {
+ /** The cumulative time used by userspace programs on this processor. */
+ user: number;
+ /** The cumulative time used by kernel programs on this processor. */
+ kernel: number;
+ /** The cumulative time spent idle by this processor. */
+ idle: number;
+ /** The total cumulative time for this processor. This value is equal to user + kernel + idle. */
+ total: number;
+ }
+
+ interface ProcessorInfo {
+ /** Cumulative usage info for this logical processor. */
+ usage: ProcessorUsage;
+ }
+
+ interface CpuInfo {
+ /** The number of logical processors. */
+ numOfProcessors: number;
+ /** The architecture name of the processors. */
+ archName: string;
+ /** The model name of the processors. */
+ modelName: string;
+ /**
+ * A set of feature codes indicating some of the processor's capabilities.
+ * The currently supported codes are "mmx", "sse", "sse2", "sse3", "ssse3", "sse4_1", "sse4_2", and "avx".
+ */
+ features: string[];
+ /** Information about each logical processor. */
+ processors: ProcessorInfo[];
+ }
+
+ /** Queries basic CPU information of the system. */
+ export function getInfo(callback: (info: CpuInfo) => void): void;
+}
+
+////////////////////
+// System Memory
+////////////////////
+/**
+ * The chrome.system.memory API.
+ * Permissions: "system.memory"
+ * @since Chrome 32.
+ */
+declare module chrome.system.memory {
+ interface MemoryInfo {
+ /** The total amount of physical memory capacity, in bytes. */
+ capacity: number;
+ /** The amount of available capacity, in bytes. */
+ availableCapacity: number;
+ }
+
+ /** Get physical memory information. */
+ export function getInfo(callback: (info: MemoryInfo) => void): void;
+}
+
+////////////////////
+// System Storage
+////////////////////
+/**
+ * Use the chrome.system.storage API to query storage device information and be notified when a removable storage device is attached and detached.
+ * Permissions: "system.storage"
+ * @since Chrome 30.
+ */
+declare module chrome.system.storage {
+ interface StorageUnitInfo {
+ /** The transient ID that uniquely identifies the storage device. This ID will be persistent within the same run of a single application. It will not be a persistent identifier between different runs of an application, or between different applications. */
+ id: string;
+ /** The name of the storage unit. */
+ name: string;
+ /**
+ * The media type of the storage unit.
+ * fixed: The storage has fixed media, e.g. hard disk or SSD.
+ * removable: The storage is removable, e.g. USB flash drive.
+ * unknown: The storage type is unknown.
+ */
+ type: string;
+ /** The total amount of the storage space, in bytes. */
+ capacity: number;
+ }
+
+ interface StorageCapacityInfo {
+ /** A copied |id| of getAvailableCapacity function parameter |id|. */
+ id: string;
+ /** The available capacity of the storage device, in bytes. */
+ availableCapacity: number;
+ }
+
+ interface SystemStorageAttachedEvent extends chrome.events.Event {
+ addListener(callback: (info: StorageUnitInfo) => void): void;
+ }
+
+ interface SystemStorageDetachedEvent extends chrome.events.Event {
+ addListener(callback: (id: string) => void): void;
+ }
+
+ /** Get the storage information from the system. The argument passed to the callback is an array of StorageUnitInfo objects. */
+ export function getInfo(callback: (info: StorageUnitInfo[]) => void): void;
+ /**
+ * Ejects a removable storage device.
+ * @param callback
+ * Parameter result: success: The ejection command is successful -- the application can prompt the user to remove the device; in_use: The device is in use by another application. The ejection did not succeed; the user should not remove the device until the other application is done with the device; no_such_device: There is no such device known. failure: The ejection command failed.
+ */
+ export function ejectDevice(id: string, callback: (result: string) => void): void;
+ /**
+ * Get the available capacity of a specified |id| storage device. The |id| is the transient device ID from StorageUnitInfo.
+ * @since Dev channel only.
+ */
+ export function getAvailableCapacity(id: string, callback: (info: StorageCapacityInfo) => void): void;
+
+ /** Fired when a new removable storage is attached to the system. */
+ export var onAttached: SystemStorageAttachedEvent;
+ /** Fired when a removable storage is detached from the system. */
+ export var onDetached: SystemStorageDetachedEvent;
+}
+
+////////////////////
+// TabCapture
+////////////////////
+/**
+ * Use the chrome.tabCapture API to interact with tab media streams.
+ * Permissions: "tabCapture"
+ * @since Chrome 31.
+ */
+declare module chrome.tabCapture {
+ interface CaptureInfo {
+ /** The id of the tab whose status changed. */
+ tabId: number;
+ /**
+ * The new capture status of the tab.
+ * One of: "pending", "active", "stopped", or "error"
+ */
+ status: string;
+ /** Whether an element in the tab being captured is in fullscreen mode. */
+ fullscreen: boolean;
+ }
+
+ interface CaptureOptions {
+ /** Optional. */
+ audio?: boolean;
+ /** Optional. */
+ video?: boolean;
+ /** Optional. */
+ audioConstraints?: MediaStreamConstraints;
+ /** Optional. */
+ videoConstraints?: MediaStreamConstraints;
+ }
+
+ interface CaptureStatusChangedEvent extends chrome.events.Event {
+ /**
+ * @param callback
+ * Parameter info: CaptureInfo with new capture status for the tab.
+ */
+ addListener(callback: (info: CaptureInfo) => void): void;
+ }
+
+ /**
+ * Captures the visible area of the currently active tab. Capture can only be started on the currently active tab after the extension has been invoked. Capture is maintained across page navigations within the tab, and stops when the tab is closed, or the media stream is closed by the extension.
+ * @param options Configures the returned media stream.
+ * @param callback Callback with either the tab capture stream or null.
+ */
+ export function capture(options: CaptureOptions, callback: (stream: MediaStream) => void): void;
+ /**
+ * Returns a list of tabs that have requested capture or are being captured, i.e. status != stopped and status != error. This allows extensions to inform the user that there is an existing tab capture that would prevent a new tab capture from succeeding (or to prevent redundant requests for the same tab).
+ * @param callback Callback invoked with CaptureInfo[] for captured tabs.
+ */
+ export function getCapturedTabs(callback: (result: CaptureInfo[]) => void): void;
+
+ /** Event fired when the capture status of a tab changes. This allows extension authors to keep track of the capture status of tabs to keep UI elements like page actions in sync. */
+ var onStatusChanged: CaptureStatusChangedEvent;
+}
+
+////////////////////
+// Tabs
+////////////////////
+/**
+ * Use the chrome.tabs API to interact with the browser's tab system. You can use this API to create, modify, and rearrange tabs in the browser.
+ * Permissions: The majority of the chrome.tabs API can be used without declaring any permission. However, the "tabs" permission is required in order to populate the url, title, and favIconUrl properties of Tab.
+ * @since Chrome 5.
+ */
+declare module chrome.tabs {
+ /**
+ * Tab muted state and the reason for the last state change.
+ * @since Chrome 46. Warning: this is the current Beta channel.
+ */
+ interface MutedInfo {
+ /** Whether the tab is prevented from playing sound (but hasn't necessarily recently produced sound). Equivalent to whether the muted audio indicator is showing. */
+ muted: boolean;
+ /**
+ * Optional.
+ * The reason the tab was muted or unmuted. Not set if the tab's mute state has never been changed.
+ * "user": A user input action has set/overridden the muted state.
+ * "capture": Tab capture started, forcing a muted state change.
+ * "extension": An extension, identified by the extensionId field, set the muted state.
+ */
+ reason?: string;
+ /**
+ * Optional.
+ * The ID of the extension that changed the muted state. Not set if an extension was not the reason the muted state last changed.
+ */
+ extensionId?: string;
+ }
+
+ interface Tab {
+ /**
+ * Optional.
+ * Either loading or complete.
+ */
+ status?: string;
+ /** The zero-based index of the tab within its window. */
+ index: number;
+ /**
+ * Optional.
+ * The ID of the tab that opened this tab, if any. This property is only present if the opener tab still exists.
+ * @since Chrome 18.
+ */
+ openerTabId?: number;
+ /**
+ * Optional.
+ * The title of the tab. This property is only present if the extension's manifest includes the "tabs" permission.
+ */
+ title?: string;
+ /**
+ * Optional.
+ * The URL the tab is displaying. This property is only present if the extension's manifest includes the "tabs" permission.
+ */
+ url?: string;
+ /**
+ * Whether the tab is pinned.
+ * @since Chrome 9.
+ */
+ pinned: boolean;
+ /**
+ * Whether the tab is highlighted.
+ * @since Chrome 16.
+ */
+ highlighted: boolean;
+ /** The ID of the window the tab is contained within. */
+ windowId: number;
+ /**
+ * Whether the tab is active in its window. (Does not necessarily mean the window is focused.)
+ * @since Chrome 16.
+ */
+ active: boolean;
+ /**
+ * Optional.
+ * The URL of the tab's favicon. This property is only present if the extension's manifest includes the "tabs" permission. It may also be an empty string if the tab is loading.
+ */
+ favIconUrl?: string;
+ /**
+ * Optional.
+ * The ID of the tab. Tab IDs are unique within a browser session. Under some circumstances a Tab may not be assigned an ID, for example when querying foreign tabs using the sessions API, in which case a session ID may be present. Tab ID can also be set to chrome.tabs.TAB_ID_NONE for apps and devtools windows.
+ */
+ id?: number;
+ /** Whether the tab is in an incognito window. */
+ incognito: boolean;
+ /**
+ * Whether the tab is selected.
+ * @deprecated since Chrome 33. Please use tabs.Tab.highlighted.
+ */
+ selected: boolean;
+ /**
+ * Optional.
+ * Whether the tab has produced sound over the past couple of seconds (but it might not be heard if also muted). Equivalent to whether the speaker audio indicator is showing.
+ * @since Chrome 45.
+ */
+ audible?: boolean;
+ /**
+ * Optional.
+ * Current tab muted state and the reason for the last state change.
+ * @since Chrome 46. Warning: this is the current Beta channel.
+ */
+ mutedInfo?: MutedInfo;
+ /**
+ * Optional. The width of the tab in pixels.
+ * @since Chrome 31.
+ */
+ width?: number;
+ /**
+ * Optional. The height of the tab in pixels.
+ * @since Chrome 31.
+ */
+ height?: number;
+ /**
+ * Optional. The session ID used to uniquely identify a Tab obtained from the sessions API.
+ * @since Chrome 31.
+ */
+ sessionId?: string;
+ }
+
+ /**
+ * Defines how zoom changes in a tab are handled and at what scope.
+ * @since Chrome 38.
+ */
+ interface ZoomSettings {
+ /**
+ * Optional.
+ * Defines how zoom changes are handled, i.e. which entity is responsible for the actual scaling of the page; defaults to "automatic".
+ * "automatic": Zoom changes are handled automatically by the browser.
+ * "manual": Overrides the automatic handling of zoom changes. The onZoomChange event will still be dispatched, and it is the responsibility of the extension to listen for this event and manually scale the page. This mode does not support per-origin zooming, and will thus ignore the scope zoom setting and assume per-tab.
+ * "disabled": Disables all zooming in the tab. The tab will revert to the default zoom level, and all attempted zoom changes will be ignored.
+ */
+ mode?: string;
+ /**
+ * Optional.
+ * Defines whether zoom changes will persist for the page's origin, or only take effect in this tab; defaults to per-origin when in automatic mode, and per-tab otherwise.
+ * "per-origin": Zoom changes will persist in the zoomed page's origin, i.e. all other tabs navigated to that same origin will be zoomed as well. Moreover, per-origin zoom changes are saved with the origin, meaning that when navigating to other pages in the same origin, they will all be zoomed to the same zoom factor. The per-origin scope is only available in the automatic mode.
+ * "per-tab": Zoom changes only take effect in this tab, and zoom changes in other tabs will not affect the zooming of this tab. Also, per-tab zoom changes are reset on navigation; navigating a tab will always load pages with their per-origin zoom factors.
+ */
+ scope?: string;
+ /**
+ * Optional.
+ * Used to return the default zoom level for the current tab in calls to tabs.getZoomSettings.
+ * @since Chrome 43.
+ */
+ defaultZoomFactor?: number;
+ }
+
+ interface InjectDetails {
+ /**
+ * Optional.
+ * If allFrames is true, implies that the JavaScript or CSS should be injected into all frames of current page. By default, it's false and is only injected into the top frame.
+ */
+ allFrames?: boolean;
+ /**
+ * Optional. JavaScript or CSS code to inject.
+ * Warning: Be careful using the code parameter. Incorrect use of it may open your extension to cross site scripting attacks.
+ */
+ code?: string;
+ /**
+ * Optional. The soonest that the JavaScript or CSS will be injected into the tab.
+ * One of: "document_start", "document_end", or "document_idle"
+ * @since Chrome 20.
+ */
+ runAt?: string;
+ /** Optional. JavaScript or CSS file to inject. */
+ file?: string;
+ /**
+ * Optional.
+ * If matchAboutBlank is true, then the code is also injected in about:blank and about:srcdoc frames if your extension has access to its parent document. Code cannot be inserted in top-level about:-frames. By default it is false.
+ * @since Chrome 39.
+ */
+ matchAboutBlank?: boolean;
+ }
+
+ interface CreateProperties {
+ /** Optional. The position the tab should take in the window. The provided value will be clamped to between zero and the number of tabs in the window. */
+ index?: number;
+ /**
+ * Optional.
+ * The ID of the tab that opened this tab. If specified, the opener tab must be in the same window as the newly created tab.
+ * @since Chrome 18.
+ */
+ openerTabId?: number;
+ /**
+ * Optional.
+ * The URL to navigate the tab to initially. Fully-qualified URLs must include a scheme (i.e. 'http://www.google.com', not 'www.google.com'). Relative URLs will be relative to the current page within the extension. Defaults to the New Tab Page.
+ */
+ url?: string;
+ /**
+ * Optional. Whether the tab should be pinned. Defaults to false
+ * @since Chrome 9.
+ */
+ pinned?: boolean;
+ /** Optional. The window to create the new tab in. Defaults to the current window. */
+ windowId?: number;
+ /**
+ * Optional.
+ * Whether the tab should become the active tab in the window. Does not affect whether the window is focused (see windows.update). Defaults to true.
+ * @since Chrome 16.
+ */
+ active?: boolean;
+ /**
+ * Optional. Whether the tab should become the selected tab in the window. Defaults to true
+ * @deprecated since Chrome 33. Please use active.
+ */
+ selected?: boolean;
+ }
+
+ interface MoveProperties {
+ /** The position to move the window to. -1 will place the tab at the end of the window. */
+ index: number;
+ /** Optional. Defaults to the window the tab is currently in. */
+ windowId?: number;
+ }
+
+ interface UpdateProperties {
+ /**
+ * Optional. Whether the tab should be pinned.
+ * @since Chrome 9.
+ */
+ pinned?: boolean;
+ /**
+ * Optional. The ID of the tab that opened this tab. If specified, the opener tab must be in the same window as this tab.
+ * @since Chrome 18.
+ */
+ openerTabId?: number;
+ /** Optional. A URL to navigate the tab to. */
+ url?: string;
+ /**
+ * Optional. Adds or removes the tab from the current selection.
+ * @since Chrome 16.
+ */
+ highlighted?: boolean;
+ /**
+ * Optional. Whether the tab should be active. Does not affect whether the window is focused (see windows.update).
+ * @since Chrome 16.
+ */
+ active?: boolean;
+ /**
+ * Optional. Whether the tab should be selected.
+ * @deprecated since Chrome 33. Please use highlighted.
+ */
+ selected?: boolean;
+ /**
+ * Optional. Whether the tab should be muted.
+ * @since Chrome 45.
+ */
+ muted?: boolean;
+ }
+
+ interface CaptureVisibleTabOptions {
+ /**
+ * Optional.
+ * When format is "jpeg", controls the quality of the resulting image. This value is ignored for PNG images. As quality is decreased, the resulting image will have more visual artifacts, and the number of bytes needed to store it will decrease.
+ */
+ quality?: number;
+ /**
+ * Optional. The format of an image.
+ * One of: "jpeg", or "png"
+ */
+ format?: string;
+ }
+
+ interface ReloadProperties {
+ /** Optional. Whether using any local cache. Default is false. */
+ bypassCache?: boolean;
+ }
+
+ interface ConnectInfo {
+ /** Optional. Will be passed into onConnect for content scripts that are listening for the connection event. */
+ name?: string;
+ /**
+ * Open a port to a specific frame identified by frameId instead of all frames in the tab.
+ * @since Chrome 41.
+ */
+ frameId?: number;
+ }
+
+ interface MessageSendOptions {
+ /** Optional. Send a message to a specific frame identified by frameId instead of all frames in the tab. */
+ frameId?: number;
+ }
+
+ interface HighlightInfo {
+ /** One or more tab indices to highlight. */
+ tabs: number | number[];
+ /** Optional. The window that contains the tabs. */
+ windowId?: number;
+ }
+
+ interface QueryInfo {
+ /**
+ * Optional. Whether the tabs have completed loading.
+ * One of: "loading", or "complete"
+ */
+ status?: string;
+ /**
+ * Optional. Whether the tabs are in the last focused window.
+ * @since Chrome 19.
+ */
+ lastFocusedWindow?: boolean;
+ /** Optional. The ID of the parent window, or windows.WINDOW_ID_CURRENT for the current window. */
+ windowId?: number;
+ /**
+ * Optional. The type of window the tabs are in.
+ * One of: "normal", "popup", "panel", "app", or "devtools"
+ */
+ windowType?: string;
+ /** Optional. Whether the tabs are active in their windows. */
+ active?: boolean;
+ /**
+ * Optional. The position of the tabs within their windows.
+ * @since Chrome 18.
+ */
+ index?: number;
+ /** Optional. Match page titles against a pattern. */
+ title?: string;
+ /** Optional. Match tabs against one or more URL patterns. Note that fragment identifiers are not matched. */
+ url?: string | string[];
+ /**
+ * Optional. Whether the tabs are in the current window.
+ * @since Chrome 19.
+ */
+ currentWindow?: boolean;
+ /** Optional. Whether the tabs are highlighted. */
+ highlighted?: boolean;
+ /** Optional. Whether the tabs are pinned. */
+ pinned?: boolean;
+ /**
+ * Optional. Whether the tabs are audible.
+ * @since Chrome 45.
+ */
+ audible?: boolean;
+ /**
+ * Optional. Whether the tabs are muted.
+ * @since Chrome 45.
+ */
+ muted?: boolean;
+ }
+
+ interface TabHighlightInfo {
+ windowId: number;
+ tabIds: number[];
+ }
+
+ interface TabRemoveInfo {
+ /**
+ * The window whose tab is closed.
+ * @since Chrome 25.
+ */
+ windowId: number;
+ /** True when the tab is being closed because its window is being closed. */
+ isWindowClosing: boolean;
+ }
+
+ interface TabAttachInfo {
+ newPosition: number;
+ newWindowId: number;
+ }
+
+ interface TabChangeInfo {
+ /** Optional. The status of the tab. Can be either loading or complete. */
+ status?: string;
+ /**
+ * The tab's new pinned state.
+ * @since Chrome 9.
+ */
+ pinned?: boolean;
+ /** Optional. The tab's URL if it has changed. */
+ url?: string;
+ /**
+ * The tab's new audible state.
+ * @since Chrome 45.
+ */
+ audible?: boolean;
+ /**
+ * The tab's new muted state and the reason for the change.
+ * @since Chrome 46. Warning: this is the current Beta channel.
+ */
+ mutedInfo?: MutedInfo;
+ /**
+ * The tab's new favicon URL.
+ * @since Chrome 27.
+ */
+ faviconUrl?: string;
+ }
+
+ interface TabMoveInfo {
+ toIndex: number;
+ windowId: number;
+ fromIndex: number;
+ }
+
+ interface TabDetachInfo {
+ oldWindowId: number;
+ oldPosition: number;
+ }
+
+ interface TabActiveInfo {
+ /** The ID of the tab that has become active. */
+ tabId: number;
+ /** The ID of the window the active tab changed inside of. */
+ windowId: number;
+ }
+
+ interface TabWindowInfo {
+ /** The ID of the window of where the tab is located. */
+ windowId: number;
+ }
+
+ interface ZoomChangeInfo {
+ tabId: number;
+ oldZoomFactor: number;
+ newZoomFactor: number;
+ zoomSettings: ZoomSettings;
+ }
+
+ interface TabHighlightedEvent extends chrome.events.Event {
+ addListener(callback: (highlightInfo: HighlightInfo) => void): void;
+ }
+
+ interface TabRemovedEvent extends chrome.events.Event {
+ addListener(callback: (tabId: number, removeInfo: TabRemoveInfo) => void): void;
+ }
+
+ interface TabUpdatedEvent extends chrome.events.Event {
+ /**
+ * @param callback
+ * Parameter changeInfo: Lists the changes to the state of the tab that was updated.
+ * Parameter tab: Gives the state of the tab that was updated.
+ */
+ addListener(callback: (tabId: number, changeInfo: TabChangeInfo, tab: Tab) => void): void;
+ }
+
+ interface TabAttachedEvent extends chrome.events.Event {
+ addListener(callback: (tabId: number, attachInfo: TabAttachInfo) => void): void;
+ }
+
+ interface TabMovedEvent extends chrome.events.Event {
+ addListener(callback: (tabId: number, moveInfo: TabMoveInfo) => void): void;
+ }
+
+ interface TabDetachedEvent extends chrome.events.Event {
+ addListener(callback: (tabId: number, detachInfo: TabDetachInfo) => void): void;
+ }
+
+ interface TabCreatedEvent extends chrome.events.Event {
+ /**
+ * @param callback
+ * Parameter tab: Details of the tab that was created.
+ */
+ addListener(callback: (tab: Tab) => void): void;
+ }
+
+ interface TabActivatedEvent extends chrome.events.Event {
+ addListener(callback: (activeInfo: TabActiveInfo) => void): void;
+ }
+
+ interface TabReplacedEvent extends chrome.events.Event {
+ addListener(callback: (addedTabId: number, removedTabId: number) => void): void;
+ }
+
+ interface TabSelectedEvent extends chrome.events.Event {
+ addListener(callback: (tabId: number, selectInfo: TabWindowInfo) => void): void;
+ }
+
+ interface TabZoomChangeEvent extends chrome.events.Event {
+ addListener(callback: (ZoomChangeInfo: ZoomChangeInfo) => void): void;
+ }
+
+ /**
+ * Injects JavaScript code into a page. For details, see the programmatic injection section of the content scripts doc.
+ * @param details Details of the script or CSS to inject. Either the code or the file property must be set, but both may not be set at the same time.
+ * @param callback Optional. Called after all the JavaScript has been executed.
+ * Parameter result: The result of the script in every injected frame.
+ */
+ export function executeScript(details: InjectDetails, callback?: (result: any[]) => void): void;
+ /**
+ * Injects JavaScript code into a page. For details, see the programmatic injection section of the content scripts doc.
+ * @param tabId Optional. The ID of the tab in which to run the script; defaults to the active tab of the current window.
+ * @param details Details of the script or CSS to inject. Either the code or the file property must be set, but both may not be set at the same time.
+ * @param callback Optional. Called after all the JavaScript has been executed.
+ * Parameter result: The result of the script in every injected frame.
+ */
+ export function executeScript(tabId: number, details: InjectDetails, callback?: (result: any[]) => void): void;
+ /** Retrieves details about the specified tab. */
+ export function get(tabId: number, callback: (tab: Tab) => void): void;
+ /**
+ * Gets details about all tabs in the specified window.
+ * @deprecated since Chrome 33. Please use tabs.query {windowId: windowId}.
+ */
+ export function getAllInWindow(callback: (tab: Tab) => void): void;
+ /**
+ * Gets details about all tabs in the specified window.
+ * @deprecated since Chrome 33. Please use tabs.query {windowId: windowId}.
+ * @param windowId Optional. Defaults to the current window.
+ */
+ export function getAllInWindow(windowId: number, callback: (tab: Tab) => void): void;
+ /** Gets the tab that this script call is being made from. May be undefined if called from a non-tab context (for example: a background page or popup view). */
+ export function getCurrent(callback: (tab?: Tab) => void): void;
+ /**
+ * Gets the tab that is selected in the specified window.
+ * @deprecated since Chrome 33. Please use tabs.query {active: true}.
+ */
+ export function getSelected(callback: (tab: Tab) => void): void;
+ /**
+ * Gets the tab that is selected in the specified window.
+ * @deprecated since Chrome 33. Please use tabs.query {active: true}.
+ * @param windowId Optional. Defaults to the current window.
+ */
+ export function getSelected(windowId: number, callback: (tab: Tab) => void): void;
+ /**
+ * Creates a new tab.
+ * @param callback Optional.
+ * Parameter tab: Details about the created tab. Will contain the ID of the new tab.
+ */
+ export function create(createProperties: CreateProperties, callback?: (tab: Tab) => void): void;
+ /**
+ * Moves one or more tabs to a new position within its window, or to a new window. Note that tabs can only be moved to and from normal (window.type === "normal") windows.
+ * @param tabId The tab to move.
+ * @param callback Optional.
+ * Parameter tab: Details about the moved tab.
+ */
+ export function move(tabId: number, moveProperties: MoveProperties, callback?: (tab: Tab) => void): void;
+ /**
+ * Moves one or more tabs to a new position within its window, or to a new window. Note that tabs can only be moved to and from normal (window.type === "normal") windows.
+ * @param tabIds The tabs to move.
+ * @param callback Optional.
+ * Parameter tabs: Details about the moved tabs.
+ */
+ export function move(tabIds: number[], moveProperties: MoveProperties, callback?: (tabs: Tab[]) => void): void;
+ /**
+ * Modifies the properties of a tab. Properties that are not specified in updateProperties are not modified.
+ * @param callback Optional.
+ * Optional parameter tab: Details about the updated tab. The tabs.Tab object doesn't contain url, title and favIconUrl if the "tabs" permission has not been requested.
+ */
+ export function update(updateProperties: UpdateProperties, callback?: (tab?: Tab) => void): void;
+ /**
+ * Modifies the properties of a tab. Properties that are not specified in updateProperties are not modified.
+ * @param tabId Defaults to the selected tab of the current window.
+ * @param callback Optional.
+ * Optional parameter tab: Details about the updated tab. The tabs.Tab object doesn't contain url, title and favIconUrl if the "tabs" permission has not been requested.
+ */
+ export function update(tabId: number, updateProperties: UpdateProperties, callback?: (tab?: Tab) => void): void;
+ /**
+ * Closes a tab.
+ * @param tabId The tab to close.
+ */
+ export function remove(tabId: number, callback?: Function): void;
+ /**
+ * Closes several tabs.
+ * @param tabIds The list of tabs to close.
+ */
+ export function remove(tabIds: number[], callback?: Function): void;
+ /**
+ * Captures the visible area of the currently active tab in the specified window. You must have <all_urls> permission to use this method.
+ * @param callback
+ * Parameter dataUrl: A data URL which encodes an image of the visible area of the captured tab. May be assigned to the 'src' property of an HTML Image element for display.
+ */
+ export function captureVisibleTab(callback: (dataUrl: string) => void): void;
+ /**
+ * Captures the visible area of the currently active tab in the specified window. You must have <all_urls> permission to use this method.
+ * @param windowId Optional. The target window. Defaults to the current window.
+ * @param callback
+ * Parameter dataUrl: A data URL which encodes an image of the visible area of the captured tab. May be assigned to the 'src' property of an HTML Image element for display.
+ */
+ export function captureVisibleTab(windowId: number, callback: (dataUrl: string) => void): void;
+ /**
+ * Captures the visible area of the currently active tab in the specified window. You must have <all_urls> permission to use this method.
+ * @param options Optional. Details about the format and quality of an image.
+ * @param callback
+ * Parameter dataUrl: A data URL which encodes an image of the visible area of the captured tab. May be assigned to the 'src' property of an HTML Image element for display.
+ */
+ export function captureVisibleTab(options: CaptureVisibleTabOptions, callback: (dataUrl: string) => void): void;
+ /**
+ * Captures the visible area of the currently active tab in the specified window. You must have <all_urls> permission to use this method.
+ * @param windowId Optional. The target window. Defaults to the current window.
+ * @param options Optional. Details about the format and quality of an image.
+ * @param callback
+ * Parameter dataUrl: A data URL which encodes an image of the visible area of the captured tab. May be assigned to the 'src' property of an HTML Image element for display.
+ */
+ export function captureVisibleTab(windowId: number, options: CaptureVisibleTabOptions, callback: (dataUrl: string) => void): void;
+ /**
+ * Reload a tab.
+ * @since Chrome 16.
+ * @param tabId The ID of the tab to reload; defaults to the selected tab of the current window.
+ */
+ export function reload(tabId: number, reloadProperties?: ReloadProperties, callback?: () => void): void;
+ /**
+ * Reload the selected tab of the current window.
+ * @since Chrome 16.
+ */
+ export function reload(reloadProperties: ReloadProperties, callback?: () => void): void;
+ /**
+ * Reload the selected tab of the current window.
+ * @since Chrome 16.
+ */
+ export function reload(callback?: () => void): void;
+ /**
+ * Duplicates a tab.
+ * @since Chrome 23.
+ * @param tabId The ID of the tab which is to be duplicated.
+ * @param callback Optional.
+ * Optional parameter tab: Details about the duplicated tab. The tabs.Tab object doesn't contain url, title and favIconUrl if the "tabs" permission has not been requested.
+ */
+ export function duplicate(tabId: number, callback?: (tab?: Tab) => void): void;
+ /**
+ * Sends a single message to the content script(s) in the specified tab, with an optional callback to run when a response is sent back. The runtime.onMessage event is fired in each content script running in the specified tab for the current extension.
+ * @since Chrome 20.
+ */
+ export function sendMessage(tabId: number, message: any, responseCallback?: (response: any) => void): void;
+ /**
+ * Sends a single message to the content script(s) in the specified tab, with an optional callback to run when a response is sent back. The runtime.onMessage event is fired in each content script running in the specified tab for the current extension.
+ * @since Chrome 41.
+ * @param responseCallback Optional.
+ * Parameter response: The JSON response object sent by the handler of the message. If an error occurs while connecting to the specified tab, the callback will be called with no arguments and runtime.lastError will be set to the error message.
+ */
+ export function sendMessage(tabId: number, message: any, options: MessageSendOptions, responseCallback?: (response: any) => void): void;
+ /**
+ * Sends a single request to the content script(s) in the specified tab, with an optional callback to run when a response is sent back. The extension.onRequest event is fired in each content script running in the specified tab for the current extension.
+ * @deprecated since Chrome 33. Please use runtime.sendMessage.
+ * @param responseCallback Optional.
+ * Parameter response: The JSON response object sent by the handler of the request. If an error occurs while connecting to the specified tab, the callback will be called with no arguments and runtime.lastError will be set to the error message.
+ */
+ export function sendRequest(tabId: number, request: any, responseCallback?: (response: any) => void): void;
+ /** Connects to the content script(s) in the specified tab. The runtime.onConnect event is fired in each content script running in the specified tab for the current extension. */
+ export function connect(tabId: number, connectInfo?: ConnectInfo): runtime.Port;
+ /**
+ * Injects CSS into a page. For details, see the programmatic injection section of the content scripts doc.
+ * @param details Details of the script or CSS to inject. Either the code or the file property must be set, but both may not be set at the same time.
+ * @param callback Optional. Called when all the CSS has been inserted.
+ */
+ export function insertCSS(details: InjectDetails, callback?: Function): void;
+ /**
+ * Injects CSS into a page. For details, see the programmatic injection section of the content scripts doc.
+ * @param tabId Optional. The ID of the tab in which to insert the CSS; defaults to the active tab of the current window.
+ * @param details Details of the script or CSS to inject. Either the code or the file property must be set, but both may not be set at the same time.
+ * @param callback Optional. Called when all the CSS has been inserted.
+ */
+ export function insertCSS(tabId: number, details: InjectDetails, callback?: Function): void;
+ /**
+ * Highlights the given tabs.
+ * @since Chrome 16.
+ * @param callback Optional.
+ * Parameter window: Contains details about the window whose tabs were highlighted.
+ */
+ export function highlight(highlightInfo: HighlightInfo, callback: (window: chrome.windows.Window) => void): void;
+ /**
+ * Gets all tabs that have the specified properties, or all tabs if no properties are specified.
+ * @since Chrome 16.
+ */
+ export function query(queryInfo: QueryInfo, callback: (result: Tab[]) => void): void;
+ /**
+ * Detects the primary language of the content in a tab.
+ * @param callback
+ * Parameter language: An ISO language code such as en or fr. For a complete list of languages supported by this method, see kLanguageInfoTable. The 2nd to 4th columns will be checked and the first non-NULL value will be returned except for Simplified Chinese for which zh-CN will be returned. For an unknown language, und will be returned.
+ */
+ export function detectLanguage(callback: (language: string) => void): void;
+ /**
+ * Detects the primary language of the content in a tab.
+ * @param tabId Optional. Defaults to the active tab of the current window.
+ * @param callback
+ * Parameter language: An ISO language code such as en or fr. For a complete list of languages supported by this method, see kLanguageInfoTable. The 2nd to 4th columns will be checked and the first non-NULL value will be returned except for Simplified Chinese for which zh-CN will be returned. For an unknown language, und will be returned.
+ */
+ export function detectLanguage(tabId: number, callback: (language: string) => void): void;
+ /**
+ * Zooms a specified tab.
+ * @since Chrome 42.
+ * @param zoomFactor The new zoom factor. Use a value of 0 here to set the tab to its current default zoom factor. Values greater than zero specify a (possibly non-default) zoom factor for the tab.
+ * @param callback Optional. Called after the zoom factor has been changed.
+ */
+ export function setZoom(zoomFactor: number, callback?: () => void): void;
+ /**
+ * Zooms a specified tab.
+ * @since Chrome 42.
+ * @param tabId Optional. The ID of the tab to zoom; defaults to the active tab of the current window.
+ * @param zoomFactor The new zoom factor. Use a value of 0 here to set the tab to its current default zoom factor. Values greater than zero specify a (possibly non-default) zoom factor for the tab.
+ * @param callback Optional. Called after the zoom factor has been changed.
+ */
+ export function setZoom(tabId: number, zoomFactor: number, callback?: () => void): void;
+ /**
+ * Gets the current zoom factor of a specified tab.
+ * @since Chrome 42.
+ * @param callback Called with the tab's current zoom factor after it has been fetched.
+ * Parameter zoomFactor: The tab's current zoom factor.
+ */
+ export function getZoom(callback: (zoomFactor: number) => void): void;
+ /**
+ * Gets the current zoom factor of a specified tab.
+ * @since Chrome 42.
+ * @param tabId Optional. The ID of the tab to get the current zoom factor from; defaults to the active tab of the current window.
+ * @param callback Called with the tab's current zoom factor after it has been fetched.
+ * Parameter zoomFactor: The tab's current zoom factor.
+ */
+ export function getZoom(tabId: number, callback: (zoomFactor: number) => void): void;
+ /**
+ * Sets the zoom settings for a specified tab, which define how zoom changes are handled. These settings are reset to defaults upon navigating the tab.
+ * @since Chrome 42.
+ * @param zoomSettings Defines how zoom changes are handled and at what scope.
+ * @param callback Optional. Called after the zoom settings have been changed.
+ */
+ export function setZoomSettings(zoomSettings: ZoomSettings, callback?: () => void): void;
+ /**
+ * Sets the zoom settings for a specified tab, which define how zoom changes are handled. These settings are reset to defaults upon navigating the tab.
+ * @since Chrome 42.
+ * @param tabId Optional. The ID of the tab to change the zoom settings for; defaults to the active tab of the current window.
+ * @param zoomSettings Defines how zoom changes are handled and at what scope.
+ * @param callback Optional. Called after the zoom settings have been changed.
+ */
+ export function setZoomSettings(tabId: number, zoomSettings: ZoomSettings, callback?: () => void): void;
+ /**
+ * Gets the current zoom settings of a specified tab.
+ * @since Chrome 42.
+ * @param callback Called with the tab's current zoom settings.
+ * Paramater zoomSettings: The tab's current zoom settings.
+ */
+ export function getZoomSettings(callback: (zoomSettings: ZoomSettings) => void): void;
+ /**
+ * Gets the current zoom settings of a specified tab.
+ * @since Chrome 42.
+ * @param tabId Optional. The ID of the tab to get the current zoom settings from; defaults to the active tab of the current window.
+ * @param callback Called with the tab's current zoom settings.
+ * Paramater zoomSettings: The tab's current zoom settings.
+ */
+ export function getZoomSettings(tabId: number, callback: (zoomSettings: ZoomSettings) => void): void;
+
+ /**
+ * Fired when the highlighted or selected tabs in a window changes.
+ * @since Chrome 18.
+ */
+ var onHighlighted: TabHighlightedEvent;
+ /** Fired when a tab is closed. */
+ var onRemoved: TabRemovedEvent;
+ /** Fired when a tab is updated. */
+ var onUpdated: TabUpdatedEvent;
+ /** Fired when a tab is attached to a window, for example because it was moved between windows. */
+ var onAttached: TabAttachedEvent;
+ /**
+ * Fired when a tab is moved within a window. Only one move event is fired, representing the tab the user directly moved. Move events are not fired for the other tabs that must move in response. This event is not fired when a tab is moved between windows. For that, see tabs.onDetached.
+ */
+ var onMoved: TabMovedEvent;
+ /** Fired when a tab is detached from a window, for example because it is being moved between windows. */
+ var onDetached: TabDetachedEvent;
+ /** Fired when a tab is created. Note that the tab's URL may not be set at the time this event fired, but you can listen to onUpdated events to be notified when a URL is set. */
+ var onCreated: TabCreatedEvent;
+ /**
+ * Fires when the active tab in a window changes. Note that the tab's URL may not be set at the time this event fired, but you can listen to onUpdated events to be notified when a URL is set.
+ * @since Chrome 18.
+ */
+ var onActivated: TabActivatedEvent;
+ /**
+ * Fired when a tab is replaced with another tab due to prerendering or instant.
+ * @since Chrome 26.
+ */
+ var onReplaced: TabReplacedEvent;
+ /**
+ * @deprecated since Chrome 33. Please use tabs.onActivated.
+ * Fires when the selected tab in a window changes.
+ */
+ var onSelectionChanged: TabSelectedEvent;
+ /**
+ * @deprecated since Chrome 33. Please use tabs.onActivated.
+ * Fires when the selected tab in a window changes. Note that the tab's URL may not be set at the time this event fired, but you can listen to tabs.onUpdated events to be notified when a URL is set.
+ */
+ var onActiveChanged: TabSelectedEvent;
+ /**
+ * @deprecated since Chrome 33. Please use tabs.onHighlighted.
+ * Fired when the highlighted or selected tabs in a window changes.
+ */
+ var onHighlightChanged: TabHighlightedEvent;
+ /**
+ * Fired when a tab is zoomed.
+ * @since Chrome 38.
+ */
+ var onZoomChange: TabZoomChangeEvent;
+}
+
+////////////////////
+// Top Sites
+////////////////////
+/**
+ * Use the chrome.topSites API to access the top sites that are displayed on the new tab page.
+ * Permissions: "topSites"
+ * @since Chrome 19.
+ */
+declare module chrome.topSites {
+ /** An object encapsulating a most visited URL, such as the URLs on the new tab page. */
+ interface MostVisitedURL {
+ /** The most visited URL. */
+ url: string;
+ /** The title of the page */
+ title: string;
+ }
+
+ /** Gets a list of top sites. */
+ export function get(callback: (data: MostVisitedURL[]) => void): void;
+}
+
+////////////////////
+// Text to Speech
+////////////////////
+/**
+ * Use the chrome.tts API to play synthesized text-to-speech (TTS). See also the related ttsEngine API, which allows an extension to implement a speech engine.
+ * Permissions: "tts"
+ * @since Chrome 14.
+ */
+declare module chrome.tts {
+ /** An event from the TTS engine to communicate the status of an utterance. */
+ interface TtsEvent {
+ /** Optional. The index of the current character in the utterance. */
+ charIndex?: number;
+ /** Optional. The error description, if the event type is 'error'. */
+ errorMessage?: string;
+ /**
+ * The type can be 'start' as soon as speech has started, 'word' when a word boundary is reached, 'sentence' when a sentence boundary is reached, 'marker' when an SSML mark element is reached, 'end' when the end of the utterance is reached, 'interrupted' when the utterance is stopped or interrupted before reaching the end, 'cancelled' when it's removed from the queue before ever being synthesized, or 'error' when any other error occurs. When pausing speech, a 'pause' event is fired if a particular utterance is paused in the middle, and 'resume' if an utterance resumes speech. Note that pause and resume events may not fire if speech is paused in-between utterances.
+ * One of: "start", "end", "word", "sentence", "marker", "interrupted", "cancelled", "error", "pause", or "resume"
+ */
+ type: string;
+ }
+
+ /** A description of a voice available for speech synthesis. */
+ interface TtsVoice {
+ /** Optional. The language that this voice supports, in the form language-region. Examples: 'en', 'en-US', 'en-GB', 'zh-CN'. */
+ lang?: string;
+ /**
+ * Optional. This voice's gender.
+ * One of: "male", or "female"
+ */
+ gender?: string;
+ /** Optional. The name of the voice. */
+ voiceName?: string;
+ /** The ID of the extension providing this voice. */
+ extensionsId?: string;
+ /** All of the callback event types that this voice is capable of sending. */
+ eventTypes?: string[];
+ /**
+ * If true, the synthesis engine is a remote network resource. It may be higher latency and may incur bandwidth costs.
+ * @since Chrome 33.
+ */
+ remote?: boolean;
+ }
+
+ interface SpeakOptions {
+ /** Optional. Speaking volume between 0 and 1 inclusive, with 0 being lowest and 1 being highest, with a default of 1.0. */
+ volume?: number;
+ /**
+ * Optional.
+ * If true, enqueues this utterance if TTS is already in progress. If false (the default), interrupts any current speech and flushes the speech queue before speaking this new utterance.
+ */
+ enqueue?: boolean;
+ /**
+ * Optional.
+ * Speaking rate relative to the default rate for this voice. 1.0 is the default rate, normally around 180 to 220 words per minute. 2.0 is twice as fast, and 0.5 is half as fast. Values below 0.1 or above 10.0 are strictly disallowed, but many voices will constrain the minimum and maximum rates further—for example a particular voice may not actually speak faster than 3 times normal even if you specify a value larger than 3.0.
+ */
+ rate?: number;
+ /**
+ * Optional. This function is called with events that occur in the process of speaking the utterance.
+ * @param event The update event from the text-to-speech engine indicating the status of this utterance.
+ */
+ onEvent?: (event: TtsEvent) => void;
+ /**
+ * Optional.
+ * Speaking pitch between 0 and 2 inclusive, with 0 being lowest and 2 being highest. 1.0 corresponds to a voice's default pitch.
+ */
+ pitch?: number;
+ /** Optional. The language to be used for synthesis, in the form language-region. Examples: 'en', 'en-US', 'en-GB', 'zh-CN'. */
+ lang?: string;
+ /** Optional. The name of the voice to use for synthesis. If empty, uses any available voice. */
+ voiceName?: string;
+ /** Optional. The extension ID of the speech engine to use, if known. */
+ extensionId?: string;
+ /**
+ * Optional. Gender of voice for synthesized speech.
+ * One of: "male", or "female"
+ */
+ gender?: string;
+ /** Optional. The TTS event types the voice must support. */
+ requiredEventTypes?: string[];
+ /** Optional. The TTS event types that you are interested in listening to. If missing, all event types may be sent. */
+ desiredEventTypes?: string[];
+ }
+
+ /** Checks whether the engine is currently speaking. On Mac OS X, the result is true whenever the system speech engine is speaking, even if the speech wasn't initiated by Chrome. */
+ export function isSpeaking(callback?: (speaking: boolean) => void): void;
+ /** Stops any current speech and flushes the queue of any pending utterances. In addition, if speech was paused, it will now be un-paused for the next call to speak. */
+ export function stop(): void;
+ /** Gets an array of all available voices. */
+ export function getVoices(callback?: (voices: TtsVoice[]) => void): void;
+ /**
+ * Speaks text using a text-to-speech engine.
+ * @param utterance The text to speak, either plain text or a complete, well-formed SSML document. Speech engines that do not support SSML will strip away the tags and speak the text. The maximum length of the text is 32,768 characters.
+ * @param callback Optional. Called right away, before speech finishes. Check chrome.runtime.lastError to make sure there were no errors. Use options.onEvent to get more detailed feedback.
+ */
+ export function speak(utterance: string, callback?: Function): void;
+ /**
+ * Speaks text using a text-to-speech engine.
+ * @param utterance The text to speak, either plain text or a complete, well-formed SSML document. Speech engines that do not support SSML will strip away the tags and speak the text. The maximum length of the text is 32,768 characters.
+ * @param options Optional. The speech options.
+ * @param callback Optional. Called right away, before speech finishes. Check chrome.runtime.lastError to make sure there were no errors. Use options.onEvent to get more detailed feedback.
+ */
+ export function speak(utterance: string, options: SpeakOptions, callback?: Function): void;
+ /**
+ * Pauses speech synthesis, potentially in the middle of an utterance. A call to resume or stop will un-pause speech.
+ * @since Chrome 29.
+ */
+ export function pause(): void;
+ /**
+ * If speech was paused, resumes speaking where it left off.
+ * @since Chrome 29.
+ */
+ export function resume(): void;
+}
+
+////////////////////
+// Text to Speech Engine
+////////////////////
+/**
+ * Use the chrome.ttsEngine API to implement a text-to-speech(TTS) engine using an extension. If your extension registers using this API, it will receive events containing an utterance to be spoken and other parameters when any extension or Chrome App uses the tts API to generate speech. Your extension can then use any available web technology to synthesize and output the speech, and send events back to the calling function to report the status.
+ * Permissions: "ttsEngine"
+ * @since Chrome 14.
+ */
+declare module chrome.ttsEngine {
+ interface SpeakOptions {
+ /** Optional. The language to be used for synthesis, in the form language-region. Examples: 'en', 'en-US', 'en-GB', 'zh-CN'. */
+ lang?: string;
+ /** Optional. The name of the voice to use for synthesis. */
+ voiceName?: string;
+ /**
+ * Optional. Gender of voice for synthesized speech.
+ * One of: "male", or "female"
+ */
+ gender?: string;
+ /** Optional. Speaking volume between 0 and 1 inclusive, with 0 being lowest and 1 being highest, with a default of 1.0. */
+ volume?: number;
+ /**
+ * Optional.
+ * Speaking rate relative to the default rate for this voice. 1.0 is the default rate, normally around 180 to 220 words per minute. 2.0 is twice as fast, and 0.5 is half as fast. This value is guaranteed to be between 0.1 and 10.0, inclusive. When a voice does not support this full range of rates, don't return an error. Instead, clip the rate to the range the voice supports.
+ */
+ rate?: number;
+ /** Optional. Speaking pitch between 0 and 2 inclusive, with 0 being lowest and 2 being highest. 1.0 corresponds to this voice's default pitch. */
+ pitch?: number;
+ }
+
+ interface TtsEngineSpeakEvent extends chrome.events.Event {
+ /**
+ * @param callback
+ * Parameter utterance: The text to speak, specified as either plain text or an SSML document. If your engine does not support SSML, you should strip out all XML markup and synthesize only the underlying text content. The value of this parameter is guaranteed to be no more than 32,768 characters. If this engine does not support speaking that many characters at a time, the utterance should be split into smaller chunks and queued internally without returning an error.
+ * Parameter options: Options specified to the tts.speak() method.
+ * Parameter sendTtsEvent: Call this function with events that occur in the process of speaking the utterance.
+ */
+ addListener(callback: (utterance: string, options: SpeakOptions, sendTtsEvent: (event: chrome.tts.TtsEvent) => void) => void): void;
+ }
+
+ /** Called when the user makes a call to tts.speak() and one of the voices from this extension's manifest is the first to match the options object. */
+ var onSpeak: TtsEngineSpeakEvent;
+ /** Fired when a call is made to tts.stop and this extension may be in the middle of speaking. If an extension receives a call to onStop and speech is already stopped, it should do nothing (not raise an error). If speech is in the paused state, this should cancel the paused state. */
+ var onStop: chrome.events.Event;
+ /**
+ * Optional: if an engine supports the pause event, it should pause the current utterance being spoken, if any, until it receives a resume event or stop event. Note that a stop event should also clear the paused state.
+ * @since Chrome 29.
+ */
+ var onPause: chrome.events.Event;
+ /**
+ * Optional: if an engine supports the pause event, it should also support the resume event, to continue speaking the current utterance, if any. Note that a stop event should also clear the paused state.
+ * @since Chrome 29.
+ */
+ var onResume: chrome.events.Event;
+}
+
+////////////////////
+// Types
+////////////////////
+/**
+ * The chrome.types API contains type declarations for Chrome.
+ * @since Chrome 13.
+ */
+declare module chrome.types {
+ interface ChromeSettingClearDetails {
+ /**
+ * Optional.
+ * The scope of the ChromeSetting. One of
+ * • regular: setting for the regular profile (which is inherited by the incognito profile if not overridden elsewhere),
+ * • regular_only: setting for the regular profile only (not inherited by the incognito profile),
+ * • incognito_persistent: setting for the incognito profile that survives browser restarts (overrides regular preferences),
+ * • incognito_session_only: setting for the incognito profile that can only be set during an incognito session and is deleted when the incognito session ends (overrides regular and incognito_persistent preferences).
+ */
+ scope?: string;
+ }
+
+ interface ChromeSettingSetDetails extends ChromeSettingClearDetails {
+ /**
+ * The value of the setting.
+ * Note that every setting has a specific value type, which is described together with the setting. An extension should not set a value of a different type.
+ */
+ value: any;
+ /**
+ * Optional.
+ * The scope of the ChromeSetting. One of
+ * • regular: setting for the regular profile (which is inherited by the incognito profile if not overridden elsewhere),
+ * • regular_only: setting for the regular profile only (not inherited by the incognito profile),
+ * • incognito_persistent: setting for the incognito profile that survives browser restarts (overrides regular preferences),
+ * • incognito_session_only: setting for the incognito profile that can only be set during an incognito session and is deleted when the incognito session ends (overrides regular and incognito_persistent preferences).
+ */
+ scope?: string;
+ }
+
+ interface ChromeSettingGetDetails {
+ /** Optional. Whether to return the value that applies to the incognito session (default false). */
+ incognito?: boolean;
+ }
+
+ /**
+ * @param details Details of the currently effective value.
+ */
+ type DetailsCallback = (details: ChromeSettingGetResultDetails) => void;
+
+ interface ChromeSettingGetResultDetails {
+ /**
+ * One of
+ * • not_controllable: cannot be controlled by any extension
+ * • controlled_by_other_extensions: controlled by extensions with higher precedence
+ * • controllable_by_this_extension: can be controlled by this extension
+ * • controlled_by_this_extension: controlled by this extension
+ */
+ levelOfControl: string;
+ /** The value of the setting. */
+ value: any;
+ /**
+ * Optional.
+ * Whether the effective value is specific to the incognito session.
+ * This property will only be present if the incognito property in the details parameter of get() was true.
+ */
+ incognitoSpecific?: boolean;
+ }
+
+ interface ChromeSettingChangedEvent extends chrome.events.Event {
+ addListener(callback: DetailsCallback): void;
+ }
+
+ /** An interface that allows access to a Chrome browser setting. See accessibilityFeatures for an example. */
+ interface ChromeSetting {
+ /**
+ * Sets the value of a setting.
+ * @param details Which setting to change.
+ * @param callback Optional. Called at the completion of the set operation.
+ */
+ set(details: ChromeSettingSetDetails, callback?: Function): void;
+ /**
+ * Gets the value of a setting.
+ * @param details Which setting to consider.
+ */
+ get(details: ChromeSettingGetDetails, callback?: DetailsCallback): void;
+ /**
+ * Clears the setting, restoring any default value.
+ * @param details Which setting to clear.
+ * @param callback Optional. Called at the completion of the clear operation.
+ */
+ clear(details: ChromeSettingClearDetails, callback?: Function): void;
+ /** Fired after the setting changes. */
+ onChange: ChromeSettingChangedEvent;
+ }
+}
+
+////////////////////
+// VPN Provider
+////////////////////
+/**
+ * Use the chrome.vpnProvider API to implement a VPN client.
+ * Permissions: "vpnProvider"
+ * Important: This API works only on Chrome OS.
+ * @since Chrome 43.
+ */
+declare module chrome.vpnProvider {
+ interface VpnSessionParameters {
+ /** IP address for the VPN interface in CIDR notation. IPv4 is currently the only supported mode. */
+ address: string;
+ /** Optional. Broadcast address for the VPN interface. (default: deduced from IP address and mask) */
+ broadcastAddress?: string;
+ /** Optional. MTU setting for the VPN interface. (default: 1500 bytes) */
+ mtu?: string;
+ /**
+ * Exclude network traffic to the list of IP blocks in CIDR notation from the tunnel. This can be used to bypass traffic to and from the VPN server. When many rules match a destination, the rule with the longest matching prefix wins. Entries that correspond to the same CIDR block are treated as duplicates. Such duplicates in the collated (exclusionList + inclusionList) list are eliminated and the exact duplicate entry that will be eliminated is undefined.
+ */
+ exclusionList: string[];
+ /**
+ * Include network traffic to the list of IP blocks in CIDR notation to the tunnel. This parameter can be used to set up a split tunnel. By default no traffic is directed to the tunnel. Adding the entry "0.0.0.0/0" to this list gets all the user traffic redirected to the tunnel. When many rules match a destination, the rule with the longest matching prefix wins. Entries that correspond to the same CIDR block are treated as duplicates. Such duplicates in the collated (exclusionList + inclusionList) list are eliminated and the exact duplicate entry that will be eliminated is undefined.
+ */
+ inclusionList: string[];
+ /** Optional. A list of search domains. (default: no search domain) */
+ domainSearch?: string[];
+ /** A list of IPs for the DNS servers. */
+ dnsServer: string[];
+ }
+
+ interface VpnPlatformMessageEvent extends chrome.events.Event {
+ /**
+ * @param callback
+ * Parameter id: ID of the configuration the message is intended for.
+ * Parameter message: The message received from the platform.
+ * * connected: VPN configuration connected.
+ * * disconnected: VPN configuration disconnected.
+ * * error: An error occurred in VPN connection, for example a timeout. A description of the error is give as the error argument to onPlatformMessage.
+ * Parameter error: Error message when there is an error.
+ */
+ addListener(callback: (id: string, message: string, error: string) => void): void;
+ }
+
+ interface VpnPacketReceptionEvent extends chrome.events.Event {
+ /**
+ * @param callback
+ * Parameter data: The IP packet received from the platform.
+ */
+ addListener(callback: (data: ArrayBuffer) => void): void;
+ }
+
+ interface VpnConfigRemovalEvent extends chrome.events.Event {
+ /**
+ * @param callback
+ * Parameter id: ID of the removed configuration.
+ */
+ addListener(callback: (id: string) => void): void;
+ }
+
+ interface VpnConfigCreationEvent extends chrome.events.Event {
+ /**
+ * @param callback
+ * Parameter id: ID of the configuration created.
+ * Parameter name: Name of the configuration created.
+ * Parameter data: Configuration data provided by the administrator.
+ */
+ addListener(callback: (id: string, name: string, data: Object) => void): void;
+ }
+
+ interface VpnUiEvent extends chrome.events.Event {
+ /**
+ * @param callback
+ * Parameter event: The UI event that is triggered.
+ * * showAddDialog: Request the VPN client to show add configuration dialog to the user.
+ * * showConfigureDialog: Request the VPN client to show configuration settings dialog to the user.
+ * Optional parameter id: ID of the configuration for which the UI event was triggered.
+ */
+ addListener(callback: (event: string, id?: string) => void): void;
+ }
+
+ /**
+ * Creates a new VPN configuration that persists across multiple login sessions of the user.
+ * @param name The name of the VPN configuration.
+ * @param callback Called when the configuration is created or if there is an error.
+ * Parameter id: A unique ID for the created configuration, empty string on failure.
+ */
+ export function createConfig(name: string, callback: (id: string) => void): void;
+ /**
+ * Destroys a VPN configuration created by the extension.
+ * @param id ID of the VPN configuration to destroy.
+ * @param callback Optional. Called when the configuration is destroyed or if there is an error.
+ */
+ export function destroyConfig(id: string, callback?: Function): void;
+ /**
+ * Sets the parameters for the VPN session. This should be called immediately after "connected" is received from the platform. This will succeed only when the VPN session is owned by the extension.
+ * @param parameters The parameters for the VPN session.
+ * @param callback Called when the parameters are set or if there is an error.
+ */
+ export function setParameters(parameters: VpnSessionParameters, callback: Function): void;
+ /**
+ * Sends an IP packet through the tunnel created for the VPN session. This will succeed only when the VPN session is owned by the extension.
+ * @param data The IP packet to be sent to the platform.
+ * @param callback Optional. Called when the packet is sent or if there is an error.
+ */
+ export function sendPacket(data: ArrayBuffer, callback?: Function): void;
+ /**
+ * Notifies the VPN session state to the platform. This will succeed only when the VPN session is owned by the extension.
+ * @param state The VPN session state of the VPN client.
+ * connected: VPN connection was successful.
+ * failure: VPN connection failed.
+ * @param callback Optional. Called when the notification is complete or if there is an error.
+ */
+ export function notifyConnectionStateChanged(state: string, callback?: Function): void;
+
+ /** Triggered when a message is received from the platform for a VPN configuration owned by the extension. */
+ var onPlatformMessage: VpnPlatformMessageEvent;
+ /** Triggered when an IP packet is received via the tunnel for the VPN session owned by the extension. */
+ var onPacketReceived: VpnPacketReceptionEvent;
+ /** Triggered when a configuration created by the extension is removed by the platform. */
+ var onConfigRemoved: VpnConfigRemovalEvent;
+ /** Triggered when a configuration is created by the platform for the extension. */
+ var onConfigCreated: VpnConfigCreationEvent;
+ /** Triggered when there is a UI event for the extension. UI events are signals from the platform that indicate to the app that a UI dialog needs to be shown to the user. */
+ var onUIEvent: VpnUiEvent;
+}
+
+////////////////////
+// Wallpaper
+////////////////////
+/**
+ * Use the chrome.wallpaper API to change the ChromeOS wallpaper.
+ * Permissions: "wallpaper"
+ * Important: This API works only on Chrome OS.
+ * @since Chrome 43.
+ */
+declare module chrome.wallpaper {
+ interface WallpaperDetails {
+ /** Optional. The jpeg or png encoded wallpaper image. */
+ data?: any;
+ /** Optional. The URL of the wallpaper to be set. */
+ url?: string;
+ /**
+ * The supported wallpaper layouts.
+ * One of: "STRETCH", "CENTER", or "CENTER_CROPPED"
+ */
+ layout: string;
+ /** The file name of the saved wallpaper. */
+ filename: string;
+ /** Optional. True if a 128x60 thumbnail should be generated. */
+ thumbnail?: boolean;
+ }
+
+ /**
+ * Sets wallpaper to the image at url or wallpaperData with the specified layout
+ * @param callback
+ * Optional parameter thumbnail: The jpeg encoded wallpaper thumbnail. It is generated by resizing the wallpaper to 128x60.
+ */
+ export function setWallpaper(details: WallpaperDetails, callback: (thumbnail: any) => void): void;
+}
+
+////////////////////
+// Web Navigation
+////////////////////
+/**
+ * Use the chrome.webNavigation API to receive notifications about the status of navigation requests in-flight.
+ * Permissions: "webNavigation"
+ * @since Chrome 16.
+ */
+declare module chrome.webNavigation {
+ interface GetFrameDetails {
+ /**
+ * The ID of the process runs the renderer for this tab.
+ * @since Chrome 22.
+ */
+ processId: number;
+ /** The ID of the tab in which the frame is. */
+ tabId: number;
+ /** The ID of the frame in the given tab. */
+ frameId: number;
+ }
+
+ interface GetFrameResultDetails {
+ /** The URL currently associated with this frame, if the frame identified by the frameId existed at one point in the given tab. The fact that an URL is associated with a given frameId does not imply that the corresponding frame still exists. */
+ url: string;
+ /** True if the last navigation in this frame was interrupted by an error, i.e. the onErrorOccurred event fired. */
+ errorOccurred: boolean;
+ /** ID of frame that wraps the frame. Set to -1 of no parent frame exists. */
+ parentFrameId: number;
+ }
+
+ interface GetAllFrameDetails {
+ /** The ID of the tab. */
+ tabId: number;
+ }
+
+ interface GetAllFrameResultDetails extends GetFrameResultDetails {
+ /** The ID of the process runs the renderer for this tab. */
+ processId: number;
+ /** The ID of the frame. 0 indicates that this is the main frame; a positive value indicates the ID of a subframe. */
+ frameId: number;
+ }
+
+ interface WebNavigationCallbackDetails {
+ /** The ID of the tab in which the navigation is about to occur. */
+ tabId: number;
+ /** The time when the browser was about to start the navigation, in milliseconds since the epoch. */
+ timeStamp: number;
+ }
+
+ interface WebNavigationUrlCallbackDetails extends WebNavigationCallbackDetails {
+ url: string;
+ }
+
+ interface WebNavigationReplacementCallbackDetails extends WebNavigationCallbackDetails {
+ /** The ID of the tab that was replaced. */
+ replacedTabId: number;
+ }
+
+ interface WebNavigationFramedCallbackDetails extends WebNavigationUrlCallbackDetails {
+ /** 0 indicates the navigation happens in the tab content window; a positive value indicates navigation in a subframe. Frame IDs are unique for a given tab and process. */
+ frameId: number;
+ /**
+ * The ID of the process runs the renderer for this tab.
+ * @since Chrome 22.
+ */
+ processId: number;
+ }
+
+ interface WebNavigationFramedErrorCallbackDetails extends WebNavigationFramedCallbackDetails {
+ /** The error description. */
+ error: string;
+ }
+
+ interface WebNavigationSourceCallbackDetails extends WebNavigationUrlCallbackDetails {
+ /** The ID of the tab in which the navigation is triggered. */
+ sourceTabId: number;
+ /**
+ * The ID of the process runs the renderer for the source tab.
+ * @since Chrome 22.
+ */
+ sourceProcessId: number;
+ /** The ID of the frame with sourceTabId in which the navigation is triggered. 0 indicates the main frame. */
+ sourceFrameId: number;
+ }
+
+ interface WebNavigationParentedCallbackDetails extends WebNavigationFramedCallbackDetails {
+ /**
+ * ID of frame that wraps the frame. Set to -1 of no parent frame exists.
+ * @since Chrome 24.
+ */
+ parentFrameId: number;
+ }
+
+ interface WebNavigationTransitionCallbackDetails extends WebNavigationFramedCallbackDetails {
+ /**
+ * Cause of the navigation.
+ * One of: "link", "typed", "auto_bookmark", "auto_subframe", "manual_subframe", "generated", "start_page", "form_submit", "reload", "keyword", or "keyword_generated"
+ */
+ transitionType: string;
+ /**
+ * A list of transition qualifiers.
+ * Each element one of: "client_redirect", "server_redirect", "forward_back", or "from_address_bar"
+ */
+ transitionQualifiers: string[];
+ }
+
+ interface WebNavigationEventFilter {
+ /** Conditions that the URL being navigated to must satisfy. The 'schemes' and 'ports' fields of UrlFilter are ignored for this event. */
+ url: chrome.events.UrlFilter[];
+ }
+
+ interface WebNavigationEvent extends chrome.events.Event {
+ addListener(callback: (details: WebNavigationCallbackDetails, filters?: WebNavigationEventFilter) => void): void;
+ }
+
+ interface WebNavigationFramedEvent extends WebNavigationEvent {
+ addListener(callback: (details: WebNavigationFramedCallbackDetails, filters?: WebNavigationEventFilter) => void): void;
+ }
+
+ interface WebNavigationFramedErrorEvent extends WebNavigationFramedEvent {
+ addListener(callback: (details: WebNavigationFramedErrorCallbackDetails, filters?: WebNavigationEventFilter) => void): void;
+ }
+
+ interface WebNavigationSourceEvent extends WebNavigationEvent {
+ addListener(callback: (details: WebNavigationSourceCallbackDetails, filters?: WebNavigationEventFilter) => void): void;
+ }
+
+ interface WebNavigationParentedEvent extends WebNavigationEvent {
+ addListener(callback: (details: WebNavigationParentedCallbackDetails, filters?: WebNavigationEventFilter) => void): void;
+ }
+
+ interface WebNavigationTransitionalEvent extends WebNavigationEvent {
+ addListener(callback: (details: WebNavigationTransitionCallbackDetails, filters?: WebNavigationEventFilter) => void): void;
+ }
+
+ interface WebNavigationReplacementEvent extends WebNavigationEvent {
+ addListener(callback: (details: WebNavigationReplacementCallbackDetails, filters?: WebNavigationEventFilter) => void): void;
+ }
+
+ /**
+ * Retrieves information about the given frame. A frame refers to an <iframe> or a <frame> of a web page and is identified by a tab ID and a frame ID.
+ * @param details Information about the frame to retrieve information about.
+ * @param callback
+ * Optional parameter details: Information about the requested frame, null if the specified frame ID and/or tab ID are invalid.
+ */
+ export function getFrame(details: GetFrameDetails, callback: (details?: GetFrameResultDetails) => void): void;
+ /**
+ * Retrieves information about all frames of a given tab.
+ * @param details Information about the tab to retrieve all frames from.
+ * @param callback
+ * Optional parameter details: A list of frames in the given tab, null if the specified tab ID is invalid.
+ */
+ export function getAllFrames(details: GetAllFrameDetails, callback: (details?: GetAllFrameResultDetails[]) => void): void;
+
+ /** Fired when the reference fragment of a frame was updated. All future events for that frame will use the updated URL. */
+ var onReferenceFragmentUpdated: WebNavigationTransitionalEvent;
+ /** Fired when a document, including the resources it refers to, is completely loaded and initialized. */
+ var onCompleted: WebNavigationFramedEvent;
+ /**
+ * Fired when the frame's history was updated to a new URL. All future events for that frame will use the updated URL.
+ * @since Chrome 22.
+ */
+ var onHistoryStateUpdated: WebNavigationTransitionalEvent;
+ /** Fired when a new window, or a new tab in an existing window, is created to host a navigation. */
+ var onCreatedNavigationTarget: WebNavigationSourceEvent;
+ /**
+ * Fired when the contents of the tab is replaced by a different (usually previously pre-rendered) tab.
+ * @since Chrome 22.
+ */
+ var onTabReplaced: WebNavigationReplacementEvent;
+ /** Fired when a navigation is about to occur. */
+ var onBeforeNavigate: WebNavigationParentedEvent;
+ /** Fired when a navigation is committed. The document (and the resources it refers to, such as images and subframes) might still be downloading, but at least part of the document has been received from the server and the browser has decided to switch to the new document. */
+ var onCommitted: WebNavigationTransitionalEvent;
+ /** Fired when the page's DOM is fully constructed, but the referenced resources may not finish loading. */
+ var onDOMContentLoaded: WebNavigationFramedEvent;
+ /** Fired when an error occurs and the navigation is aborted. This can happen if either a network error occurred, or the user aborted the navigation. */
+ var onErrorOccurred: WebNavigationFramedErrorEvent;
+}
+
+////////////////////
+// Web Request
+////////////////////
+/**
+ * Use the chrome.webRequest API to observe and analyze traffic and to intercept, block, or modify requests in-flight.
+ * Permissions: "webRequest", host permissions
+ * @since Chrome 17.
+ */
+declare module chrome.webRequest {
+ interface AuthCredentials {
+ username: string;
+ password: string;
+ }
+
+ /** An HTTP Header, represented as an object containing a key and either a value or a binaryValue. */
+ interface HttpHeader {
+ name: string;
+ value?: string;
+ binaryValue?: ArrayBuffer;
+ }
+
+ /** Returns value for event handlers that have the 'blocking' extraInfoSpec applied. Allows the event handler to modify network requests. */
+ interface BlockingResponse {
+ /** Optional. If true, the request is cancelled. Used in onBeforeRequest, this prevents the request from being sent. */
+ cancel?: boolean;
+ /**
+ * Optional.
+ * Only used as a response to the onBeforeRequest and onHeadersReceived events. If set, the original request is prevented from being sent/completed and is instead redirected to the given URL. Redirections to non-HTTP schemes such as data: are allowed. Redirects initiated by a redirect action use the original request method for the redirect, with one exception: If the redirect is initiated at the onHeadersReceived stage, then the redirect will be issued using the GET method.
+ */
+ redirectUrl?: string;
+ /**
+ * Optional.
+ * Only used as a response to the onHeadersReceived event. If set, the server is assumed to have responded with these response headers instead. Only return responseHeaders if you really want to modify the headers in order to limit the number of conflicts (only one extension may modify responseHeaders for each request).
+ */
+ responseHeaders?: HttpHeader[];
+ /** Optional. Only used as a response to the onAuthRequired event. If set, the request is made using the supplied credentials. */
+ authCredentials?: AuthCredentials;
+ /**
+ * Optional.
+ * Only used as a response to the onBeforeSendHeaders event. If set, the request is made with these request headers instead.
+ */
+ requestHeaders?: HttpHeader[];
+ }
+
+ /** An object describing filters to apply to webRequest events. */
+ interface RequestFilter {
+ /** Optional. */
+ tabId?: number;
+ /**
+ * A list of request types. Requests that cannot match any of the types will be filtered out.
+ * Each element one of: "main_frame", "sub_frame", "stylesheet", "script", "image", "object", "xmlhttprequest", or "other"
+ */
+ types?: string[];
+ /** A list of URLs or URL patterns. Requests that cannot match any of the URLs will be filtered out. */
+ urls: string[];
+ /** Optional. */
+ windowId?: number;
+ }
+
+ /**
+ * Contains data uploaded in a URL request.
+ * @since Chrome 23.
+ */
+ interface UploadData {
+ /** Optional. An ArrayBuffer with a copy of the data. */
+ bytes?: ArrayBuffer;
+ /** Optional. A string with the file's path and name. */
+ file?: string;
+ }
+
+ interface WebRequestBody {
+ /** Optional. Errors when obtaining request body data. */
+ error?: string;
+ /**
+ * Optional.
+ * If the request method is POST and the body is a sequence of key-value pairs encoded in UTF8, encoded as either multipart/form-data, or application/x-www-form-urlencoded, this dictionary is present and for each key contains the list of all values for that key. If the data is of another media type, or if it is malformed, the dictionary is not present. An example value of this dictionary is {'key': ['value1', 'value2']}.
+ */
+ formData?: Object;
+ /**
+ * Optional.
+ * If the request method is PUT or POST, and the body is not already parsed in formData, then the unparsed request body elements are contained in this array.
+ */
+ raw?: UploadData[];
+ }
+
+ interface WebAuthChallenger {
+ host: string;
+ port: number;
+ }
+
+ interface ResourceRequest {
+ /** The ID of the request. Request IDs are unique within a browser session. As a result, they could be used to relate different events of the same request. */
+ requestId: string;
+ /** The value 0 indicates that the request happens in the main frame; a positive value indicates the ID of a subframe in which the request happens. If the document of a (sub-)frame is loaded (type is main_frame or sub_frame), frameId indicates the ID of this frame, not the ID of the outer frame. Frame IDs are unique within a tab. */
+ frameId: number;
+ /** ID of frame that wraps the frame which sent the request. Set to -1 if no parent frame exists. */
+ parentFrameId: number;
+ /** The ID of the tab in which the request takes place. Set to -1 if the request isn't related to a tab. */
+ tabId: number;
+ /**
+ * How the requested resource will be used.
+ * One of: "main_frame", "sub_frame", "stylesheet", "script", "image", "object", "xmlhttprequest", or "other"
+ */
+ type: string;
+ /** The time when this signal is triggered, in milliseconds since the epoch. */
+ timeStamp: number;
+ }
+
+ interface WebRequestDetails extends ResourceRequest {
+ url: string;
+ /** Standard HTTP method. */
+ method: string;
+ }
+
+ interface WebRequestHeadersDetails extends WebRequestDetails {
+ /** Optional. The HTTP request headers that are going to be sent out with this request. */
+ requestHeaders?: HttpHeader[];
+ }
+
+ interface WebRequestBodyDetails extends WebRequestDetails {
+ /**
+ * Contains the HTTP request body data. Only provided if extraInfoSpec contains 'requestBody'.
+ * @since Chrome 23.
+ */
+ requestBody: WebRequestBody;
+ }
+
+ interface WebRequestFullDetails extends WebRequestHeadersDetails, WebRequestBodyDetails {
+ }
+
+ interface WebResponseDetails extends ResourceRequest {
+ /** HTTP status line of the response or the 'HTTP/0.9 200 OK' string for HTTP/0.9 responses (i.e., responses that lack a status line). */
+ statusLine: string;
+ /**
+ * Standard HTTP status code returned by the server.
+ * @since Chrome 43.
+ */
+ statusCode: number;
+ }
+
+ interface WebResponseHeadersDetails extends WebResponseDetails {
+ /** Optional. The HTTP response headers that have been received with this response. */
+ responseHeaders?: HttpHeader[];
+ }
+
+ interface WebResponseCacheDetails extends WebResponseHeadersDetails {
+ /**
+ * Optional.
+ * The server IP address that the request was actually sent to. Note that it may be a literal IPv6 address.
+ */
+ ip?: string;
+ /** Indicates if this response was fetched from disk cache. */
+ fromCache: boolean;
+ }
+
+ interface WebRedirectionResponseDetails extends WebResponseCacheDetails {
+ /** The new URL. */
+ redirectUrl: string;
+ }
+
+ interface WebAuthenticationChallengeDetails extends WebResponseHeadersDetails {
+ /** The authentication scheme, e.g. Basic or Digest. */
+ schema: string;
+ /** The authentication realm provided by the server, if there is one. */
+ realm?: string;
+ /** The server requesting authentication. */
+ challenger: WebAuthChallenger;
+ /** True for Proxy-Authenticate, false for WWW-Authenticate. */
+ isProxy: boolean;
+ }
+
+ interface WebResponseErrorDetails extends WebResponseCacheDetails {
+ /** The error description. This string is not guaranteed to remain backwards compatible between releases. You must not parse and act based upon its content. */
+ error: string;
+ }
+
+ interface WebRequestBodyEvent extends chrome.events.Event {
+ addListener(callback: (details: WebRequestBodyDetails) => void, filter?: RequestFilter, opt_extraInfoSpec?: string[]): void;
+ }
+
+ interface WebRequestHeadersEvent extends chrome.events.Event {
+ addListener(callback: (details: WebRequestHeadersDetails) => void, filter?: RequestFilter, opt_extraInfoSpec?: string[]): void;
+ }
+
+ interface WebResponseHeadersEvent extends chrome.events.Event {
+ addListener(callback: (details: WebResponseHeadersDetails) => void, filter?: RequestFilter, opt_extraInfoSpec?: string[]): void;
+ }
+
+ interface WebResponseCacheEvent extends WebResponseHeadersEvent {
+ addListener(callback: (details: WebResponseCacheDetails) => void, filter?: RequestFilter, opt_extraInfoSpec?: string[]): void;
+ }
+
+ interface WebRedirectionResponseEvent extends WebResponseCacheEvent {
+ addListener(callback: (details: WebRedirectionResponseDetails) => void, filter?: RequestFilter, opt_extraInfoSpec?: string[]): void;
+ }
+
+ interface WebAuthenticationChallengeEvent extends chrome.events.Event {
+ addListener(callback: (details: WebAuthenticationChallengeDetails, callback?: (response: BlockingResponse) => void) => void): void;
+ }
+
+ interface WebResponseErrorEvent extends WebResponseCacheEvent {
+ addListener(callback: (details: WebResponseErrorDetails) => void, filter?: RequestFilter, opt_extraInfoSpec?: string[]): void;
+ }
+
+ /**
+ * The maximum number of times that handlerBehaviorChanged can be called per 10 minute sustained interval. handlerBehaviorChanged is an expensive function call that shouldn't be called often.
+ * @since Chrome 23.
+ */
+ var MAX_HANDLER_BEHAVIOR_CHANGED_CALLS_PER_10_MINUTES: number;
+
+ /** Needs to be called when the behavior of the webRequest handlers has changed to prevent incorrect handling due to caching. This function call is expensive. Don't call it often. */
+ export function handlerBehaviorChanged(callback?: Function): void;
+
+ /** Fired when a request is about to occur. */
+ var onBeforeRequest: WebRequestBodyEvent;
+ /** Fired before sending an HTTP request, once the request headers are available. This may occur after a TCP connection is made to the server, but before any HTTP data is sent. */
+ var onBeforeSendHeaders: WebRequestHeadersEvent;
+ /** Fired just before a request is going to be sent to the server (modifications of previous onBeforeSendHeaders callbacks are visible by the time onSendHeaders is fired). */
+ var onSendHeaders: WebRequestHeadersEvent;
+ /** Fired when HTTP response headers of a request have been received. */
+ var onHeadersReceived: WebResponseHeadersEvent;
+ /** Fired when an authentication failure is received. The listener has three options: it can provide authentication credentials, it can cancel the request and display the error page, or it can take no action on the challenge. If bad user credentials are provided, this may be called multiple times for the same request. */
+ var onAuthRequired: WebAuthenticationChallengeEvent;
+ /** Fired when the first byte of the response body is received. For HTTP requests, this means that the status line and response headers are available. */
+ var onResponseStarted: WebResponseCacheEvent;
+ /** Fired when a server-initiated redirect is about to occur. */
+ var onBeforeRedirect: WebRedirectionResponseEvent;
+ /** Fired when a request is completed. */
+ var onCompleted: WebResponseCacheEvent;
+ /** Fired when an error occurs. */
+ var onErrorOccurred: WebResponseErrorEvent;
+}
+
+////////////////////
+// Web Store
+////////////////////
+/**
+ * Use the chrome.webstore API to initiate app and extension installations "inline" from your site.
+ * @since Chrome 15.
+ */
+declare module chrome.webstore {
+ /**
+ * @param url Optional. If you have more than one <link> tag on your page with the chrome-webstore-item relation, you can choose which item you'd like to install by passing in its URL here. If it is omitted, then the first (or only) link will be used. An exception will be thrown if the passed in URL does not exist on the page.
+ * @param successCallback Optional. This function is invoked when inline installation successfully completes (after the dialog is shown and the user agrees to add the item to Chrome). You may wish to use this to hide the user interface element that prompted the user to install the app or extension.
+ * @param failureCallback Optional. This function is invoked when inline installation does not successfully complete. Possible reasons for this include the user canceling the dialog, the linked item not being found in the store, or the install being initiated from a non-verified site.
+ * Parameter error: The failure detail. You may wish to inspect or log this for debugging purposes, but you should not rely on specific strings being passed back.
+ * Optional parameter errorCode: The error code from the stable set of possible errors.
+ * * Enum of the possible install results, including error codes sent back in the event that an inline installation has failed.
+ * * * "otherError": An uncommon, unrecognized, or unexpected error. In some cases, the readable error string can provide more information.
+ * * * "aborted": The operation was aborted as the requestor is no longer alive.
+ * * * "installInProgress": An installation of the same extension is in progress.
+ * * * "notPermitted": The installation is not permitted.
+ * * * "invalidId": Invalid Chrome Web Store item ID.
+ * * * "webstoreRequestError": Failed to retrieve extension metadata from the Web Store.
+ * * * "invalidWebstoreResponse": The extension metadata retrieved from the Web Store was invalid.
+ * * * "invalidManifest": An error occurred while parsing the extension manifest retrieved from the Web Store.
+ * * * "iconError": Failed to retrieve the extension's icon from the Web Store, or the icon was invalid.
+ * * * "userCanceled": The user canceled the operation.
+ * * * "blacklisted": The extension is blacklisted.
+ * * * "missingDependencies": Unsatisfied dependencies, such as shared modules.
+ * * * "requirementViolations": Unsatisfied requirements, such as webgl.
+ * * * "blockedByPolicy": The extension is blocked by management policies.
+ * * * "launchFeatureDisabled": The launch feature is not available.
+ * * * "launchUnsupportedExtensionType": The launch feature is not supported for the extension type.
+ * * * "launchInProgress": A launch of the same extension is in progress.
+ */
+ export function install(url: string, successCallback?: Function, failureCallback?: (error: string, errorCode?: string) => void): void;
+ /**
+ * @param successCallback Optional. This function is invoked when inline installation successfully completes (after the dialog is shown and the user agrees to add the item to Chrome). You may wish to use this to hide the user interface element that prompted the user to install the app or extension.
+ * @param failureCallback Optional. This function is invoked when inline installation does not successfully complete. Possible reasons for this include the user canceling the dialog, the linked item not being found in the store, or the install being initiated from a non-verified site.
+ * Parameter error: The failure detail. You may wish to inspect or log this for debugging purposes, but you should not rely on specific strings being passed back.
+ * Optional parameter errorCode: The error code from the stable set of possible errors.
+ * * Enum of the possible install results, including error codes sent back in the event that an inline installation has failed.
+ * * * "otherError": An uncommon, unrecognized, or unexpected error. In some cases, the readable error string can provide more information.
+ * * * "aborted": The operation was aborted as the requestor is no longer alive.
+ * * * "installInProgress": An installation of the same extension is in progress.
+ * * * "notPermitted": The installation is not permitted.
+ * * * "invalidId": Invalid Chrome Web Store item ID.
+ * * * "webstoreRequestError": Failed to retrieve extension metadata from the Web Store.
+ * * * "invalidWebstoreResponse": The extension metadata retrieved from the Web Store was invalid.
+ * * * "invalidManifest": An error occurred while parsing the extension manifest retrieved from the Web Store.
+ * * * "iconError": Failed to retrieve the extension's icon from the Web Store, or the icon was invalid.
+ * * * "userCanceled": The user canceled the operation.
+ * * * "blacklisted": The extension is blacklisted.
+ * * * "missingDependencies": Unsatisfied dependencies, such as shared modules.
+ * * * "requirementViolations": Unsatisfied requirements, such as webgl.
+ * * * "blockedByPolicy": The extension is blocked by management policies.
+ * * * "launchFeatureDisabled": The launch feature is not available.
+ * * * "launchUnsupportedExtensionType": The launch feature is not supported for the extension type.
+ * * * "launchInProgress": A launch of the same extension is in progress.
+ */
+ export function install(successCallback: Function, failureCallback?: (error: string, errorCode?: string) => void): void;
+ /**
+ * @param failureCallback Optional. This function is invoked when inline installation does not successfully complete. Possible reasons for this include the user canceling the dialog, the linked item not being found in the store, or the install being initiated from a non-verified site.
+ * Parameter error: The failure detail. You may wish to inspect or log this for debugging purposes, but you should not rely on specific strings being passed back.
+ * Optional parameter errorCode: The error code from the stable set of possible errors.
+ * * Enum of the possible install results, including error codes sent back in the event that an inline installation has failed.
+ * * * "otherError": An uncommon, unrecognized, or unexpected error. In some cases, the readable error string can provide more information.
+ * * * "aborted": The operation was aborted as the requestor is no longer alive.
+ * * * "installInProgress": An installation of the same extension is in progress.
+ * * * "notPermitted": The installation is not permitted.
+ * * * "invalidId": Invalid Chrome Web Store item ID.
+ * * * "webstoreRequestError": Failed to retrieve extension metadata from the Web Store.
+ * * * "invalidWebstoreResponse": The extension metadata retrieved from the Web Store was invalid.
+ * * * "invalidManifest": An error occurred while parsing the extension manifest retrieved from the Web Store.
+ * * * "iconError": Failed to retrieve the extension's icon from the Web Store, or the icon was invalid.
+ * * * "userCanceled": The user canceled the operation.
+ * * * "blacklisted": The extension is blacklisted.
+ * * * "missingDependencies": Unsatisfied dependencies, such as shared modules.
+ * * * "requirementViolations": Unsatisfied requirements, such as webgl.
+ * * * "blockedByPolicy": The extension is blocked by management policies.
+ * * * "launchFeatureDisabled": The launch feature is not available.
+ * * * "launchUnsupportedExtensionType": The launch feature is not supported for the extension type.
+ * * * "launchInProgress": A launch of the same extension is in progress.
+ */
+ export function install(failureCallback?: (error: string, errorCode?: string) => void): void;
+
+ interface InstallationStageEvent extends chrome.events.Event {
+ /**
+ * @param callback
+ * Parameter stage: The InstallStage that just began.
+ * * One of: "installing", or "downloading"
+ */
+ addListener(callback: (stage: string) => void): void;
+ }
+
+ interface DownloadProgressEvent extends chrome.events.Event {
+ /**
+ * @param callback
+ * Parameter percentDownloaded: The progress of the download, between 0 and 1. 0 indicates no progress; 1.0 indicates complete.
+ */
+ addListener(callback: (percentDownloaded: number) => void): void;
+ }
+
+ /**
+ * Fired when an inline installation enters a new InstallStage. In order to receive notifications about this event, listeners must be registered before the inline installation begins.
+ * @since Chrome 35.
+ */
+ var onInstallStageChanged: InstallationStageEvent;
+ /**
+ * Fired periodically with the download progress of an inline install. In order to receive notifications about this event, listeners must be registered before the inline installation begins.
+ * @since Chrome 35.
+ */
+ var onDownloadProgress: DownloadProgressEvent;
+}
+
+////////////////////
+// Windows
+////////////////////
+/**
+ * Use the chrome.windows API to interact with browser windows. You can use this API to create, modify, and rearrange windows in the browser.
+ * Permissions: The chrome.windows API can be used without declaring any permission. However, the "tabs" permission is required in order to populate the url, title, and favIconUrl properties of Tab objects.
+ * @since Chrome 5.
+ */
+declare module chrome.windows {
+ interface Window {
+ /** Array of tabs.Tab objects representing the current tabs in the window. */
+ tabs?: chrome.tabs.Tab[];
+ /** Optional. The offset of the window from the top edge of the screen in pixels. Under some circumstances a Window may not be assigned top property, for example when querying closed windows from the sessions API. */
+ top?: number;
+ /** Optional. The height of the window, including the frame, in pixels. Under some circumstances a Window may not be assigned height property, for example when querying closed windows from the sessions API. */
+ height?: number;
+ /** Optional. The width of the window, including the frame, in pixels. Under some circumstances a Window may not be assigned width property, for example when querying closed windows from the sessions API. */
+ width?: number;
+ /**
+ * The state of this browser window.
+ * One of: "normal", "minimized", "maximized", "fullscreen", or "docked"
+ * @since Chrome 17.
+ */
+ state: string;
+ /** Whether the window is currently the focused window. */
+ focused: boolean;
+ /**
+ * Whether the window is set to be always on top.
+ * @since Chrome 19.
+ */
+ alwaysOnTop: boolean;
+ /** Whether the window is incognito. */
+ incognito: boolean;
+ /**
+ * The type of browser window this is.
+ * One of: "normal", "popup", "panel", "app", or "devtools"
+ */
+ type: string;
+ /** Optional. The ID of the window. Window IDs are unique within a browser session. Under some circumstances a Window may not be assigned an ID, for example when querying windows using the sessions API, in which case a session ID may be present. */
+ id: number;
+ /** Optional. The offset of the window from the left edge of the screen in pixels. Under some circumstances a Window may not be assigned left property, for example when querying closed windows from the sessions API. */
+ left?: number;
+ /**
+ * The session ID used to uniquely identify a Window obtained from the sessions API.
+ * @since Chrome 31.
+ */
+ sessionId?: string;
+ }
+
+ interface GetInfo {
+ /**
+ * Optional.
+ * If true, the windows.Window object will have a tabs property that contains a list of the tabs.Tab objects. The Tab objects only contain the url, title and favIconUrl properties if the extension's manifest file includes the "tabs" permission.
+ */
+ populate?: boolean;
+ /**
+ * If set, the windows.Window returned will be filtered based on its type. If unset the default filter is set to ['app', 'normal', 'panel', 'popup'], with 'app' and 'panel' window types limited to the extension's own windows.
+ * Each one of: "normal", "popup", "panel", "app", or "devtools"
+ * @since Chrome 46. Warning: this is the current Beta channel.
+ */
+ windowTypes?: string[];
+ }
+
+ interface CreateData {
+ /**
+ * Optional. The id of the tab for which you want to adopt to the new window.
+ * @since Chrome 10.
+ */
+ tabId?: number;
+ /**
+ * Optional.
+ * A URL or array of URLs to open as tabs in the window. Fully-qualified URLs must include a scheme (i.e. 'http://www.google.com', not 'www.google.com'). Relative URLs will be relative to the current page within the extension. Defaults to the New Tab Page.
+ */
+ url?: string | string[];
+ /**
+ * Optional.
+ * The number of pixels to position the new window from the top edge of the screen. If not specified, the new window is offset naturally from the last focused window. This value is ignored for panels.
+ */
+ top?: number;
+ /**
+ * Optional.
+ * The height in pixels of the new window, including the frame. If not specified defaults to a natural height.
+ */
+ height?: number;
+ /**
+ * Optional.
+ * The width in pixels of the new window, including the frame. If not specified defaults to a natural width.
+ */
+ width?: number;
+ /**
+ * Optional. If true, opens an active window. If false, opens an inactive window.
+ * @since Chrome 12.
+ */
+ focused?: boolean;
+ /** Optional. Whether the new window should be an incognito window. */
+ incognito?: boolean;
+ /**
+ * Optional. Specifies what type of browser window to create. The 'panel' and 'detached_panel' types create a popup unless the '--enable-panels' flag is set.
+ * One of: "normal", "popup", "panel", or "detached_panel"
+ */
+ type?: string;
+ /**
+ * Optional.
+ * The number of pixels to position the new window from the left edge of the screen. If not specified, the new window is offset naturally from the last focused window. This value is ignored for panels.
+ */
+ left?: number;
+ /**
+ * Optional. The initial state of the window. The 'minimized', 'maximized' and 'fullscreen' states cannot be combined with 'left', 'top', 'width' or 'height'.
+ * One of: "normal", "minimized", "maximized", "fullscreen", or "docked"
+ * @since Chrome 44.
+ */
+ state?: string;
+ }
+
+ interface UpdateInfo {
+ /** Optional. The offset from the top edge of the screen to move the window to in pixels. This value is ignored for panels. */
+ top?: number;
+ /**
+ * Optional. If true, causes the window to be displayed in a manner that draws the user's attention to the window, without changing the focused window. The effect lasts until the user changes focus to the window. This option has no effect if the window already has focus. Set to false to cancel a previous draw attention request.
+ * @since Chrome 14.
+ */
+ drawAttention?: boolean;
+ /** Optional. The height to resize the window to in pixels. This value is ignored for panels. */
+ height?: number;
+ /** Optional. The width to resize the window to in pixels. This value is ignored for panels. */
+ width?: number;
+ /**
+ * Optional. The new state of the window. The 'minimized', 'maximized' and 'fullscreen' states cannot be combined with 'left', 'top', 'width' or 'height'.
+ * One of: "normal", "minimized", "maximized", "fullscreen", or "docked"
+ * @since Chrome 17.
+ */
+ state?: string;
+ /**
+ * Optional. If true, brings the window to the front. If false, brings the next window in the z-order to the front.
+ * @since Chrome 8.
+ */
+ focused?: boolean;
+ /** Optional. The offset from the left edge of the screen to move the window to in pixels. This value is ignored for panels. */
+ left?: number;
+ }
+
+ interface WindowEventFilter {
+ /**
+ * Conditions that the window's type being created must satisfy. By default it will satisfy ['app', 'normal', 'panel', 'popup'], with 'app' and 'panel' window types limited to the extension's own windows.
+ * Each one of: "normal", "popup", "panel", "app", or "devtools"
+ */
+ windowTypes: string[];
+ }
+
+ interface WindowIdEvent extends chrome.events.Event {
+ /**
+ * @param callback
+ * Parameter windowId: The id of the window associated with this event.
+ */
+ addListener(callback: (windowId: number, filters?: WindowEventFilter) => void): void;
+ }
+
+ interface WindowReferenceEvent extends chrome.events.Event {
+ /**
+ * @param callback
+ * Parameter window: The window object associated with this event.
+ */
+ addListener(callback: (window: Window, filters?: WindowEventFilter) => void): void;
+ }
+
+ /**
+ * The windowId value that represents the current window.
+ * @since Chrome 18.
+ */
+ var WINDOW_ID_CURRENT: number;
+ /**
+ * The windowId value that represents the absence of a chrome browser window.
+ * @since Chrome 6.
+ */
+ var WINDOW_ID_NONE: number;
+
+ /** Gets details about a window. */
+ export function get(windowId: number, callback: (window: chrome.windows.Window) => void): void;
+ /**
+ * Gets details about a window.
+ * @since Chrome 18.
+ */
+ export function get(windowId: number, getInfo: GetInfo, callback: (window: chrome.windows.Window) => void): void;
+ /**
+ * Gets the current window.
+ */
+ export function getCurrent(callback: (window: chrome.windows.Window) => void): void;
+ /**
+ * Gets the current window.
+ * @since Chrome 18.
+ */
+ export function getCurrent(getInfo: GetInfo, callback: (window: chrome.windows.Window) => void): void;
+ /**
+ * Creates (opens) a new browser with any optional sizing, position or default URL provided.
+ * @param callback
+ * Optional parameter window: Contains details about the created window.
+ */
+ export function create(callback?: (window?: chrome.windows.Window) => void): void;
+ /**
+ * Creates (opens) a new browser with any optional sizing, position or default URL provided.
+ * @param callback
+ * Optional parameter window: Contains details about the created window.
+ */
+ export function create(createData: CreateData, callback?: (window?: chrome.windows.Window) => void): void;
+ /**
+ * Gets all windows.
+ */
+ export function getAll(callback: (windows: chrome.windows.Window[]) => void): void;
+ /**
+ * Gets all windows.
+ * @since Chrome 18.
+ */
+ export function getAll(getInfo: GetInfo, callback: (windows: chrome.windows.Window[]) => void): void;
+ /** Updates the properties of a window. Specify only the properties that you want to change; unspecified properties will be left unchanged. */
+ export function update(windowId: number, updateInfo: UpdateInfo, callback?: (window: chrome.windows.Window) => void): void;
+ /** Removes (closes) a window, and all the tabs inside it. */
+ export function remove(windowId: number, callback?: Function): void;
+ /**
+ * Gets the window that was most recently focused — typically the window 'on top'.
+ */
+ export function getLastFocused(callback: (window: chrome.windows.Window) => void): void;
+ /**
+ * Gets the window that was most recently focused — typically the window 'on top'.
+ * @since Chrome 18.
+ */
+ export function getLastFocused(getInfo: GetInfo, callback: (window: chrome.windows.Window) => void): void;
+
+ /** Fired when a window is removed (closed). */
+ var onRemoved: WindowIdEvent;
+ /** Fired when a window is created. */
+ var onCreated: WindowReferenceEvent;
+ /**
+ * Fired when the currently focused window changes. Will be chrome.windows.WINDOW_ID_NONE if all chrome windows have lost focus.
+ * Note: On some Linux window managers, WINDOW_ID_NONE will always be sent immediately preceding a switch from one chrome window to another.
+ */
+ var onFocusChanged: WindowIdEvent;
+}
diff --git a/extension/lib/decl/filesystem/filesystem.d.ts b/extension/lib/decl/filesystem/filesystem.d.ts
new file mode 100644
index 000000000..1b76846b4
--- /dev/null
+++ b/extension/lib/decl/filesystem/filesystem.d.ts
@@ -0,0 +1,548 @@
+// Type definitions for File System API
+// Project: http://www.w3.org/TR/file-system-api/
+// Definitions by: Kon <http://phyzkit.net/>
+// Definitions: https://github.com/borisyankov/DefinitelyTyped
+
+/// <reference path="../filewriter/filewriter.d.ts" />
+
+interface LocalFileSystem {
+
+ /**
+ * Used for storage with no guarantee of persistence.
+ */
+ TEMPORARY:number;
+
+ /**
+ * Used for storage that should not be removed by the user agent without application or user permission.
+ */
+ PERSISTENT:number;
+
+ /**
+ * Requests a filesystem in which to store application data.
+ * @param type Whether the filesystem requested should be persistent, as defined above. Use one of TEMPORARY or PERSISTENT.
+ * @param size This is an indicator of how much storage space, in bytes, the application expects to need.
+ * @param successCallback The callback that is called when the user agent provides a filesystem.
+ * @param errorCallback A callback that is called when errors happen, or when the request to obtain the filesystem is denied.
+ */
+ requestFileSystem(type:number, size:number, successCallback:FileSystemCallback, errorCallback?:ErrorCallback):void;
+
+ /**
+ * Allows the user to look up the Entry for a file or directory referred to by a local URL.
+ * @param url A URL referring to a local file in a filesystem accessable via this API.
+ * @param successCallback A callback that is called to report the Entry to which the supplied URL refers.
+ * @param errorCallback A callback that is called when errors happen, or when the request to obtain the Entry is denied.
+ */
+ resolveLocalFileSystemURL(url:string, successCallback:EntryCallback, errorCallback?:ErrorCallback):void;
+
+ /**
+ * see requestFileSystem.
+ */
+ webkitRequestFileSystem(type:number, size:number, successCallback:FileSystemCallback, errorCallback?:ErrorCallback):void;
+}
+
+interface LocalFileSystemSync {
+ /**
+ * Used for storage with no guarantee of persistence.
+ */
+ TEMPORARY:number;
+
+ /**
+ * Used for storage that should not be removed by the user agent without application or user permission.
+ */
+ PERSISTENT:number;
+
+ /**
+ * Requests a filesystem in which to store application data.
+ * @param type Whether the filesystem requested should be persistent, as defined above. Use one of TEMPORARY or PERSISTENT.
+ * @param size This is an indicator of how much storage space, in bytes, the application expects to need.
+ */
+ requestFileSystemSync(type:number, size:number):FileSystemSync;
+
+ /**
+ * Allows the user to look up the Entry for a file or directory referred to by a local URL.
+ * @param url A URL referring to a local file in a filesystem accessable via this API.
+ */
+ resolveLocalFileSystemSyncURL(url:string):EntrySync;
+
+ /**
+ * see requestFileSystemSync
+ */
+ webkitRequestFileSystemSync(type:number, size:number):FileSystemSync;
+}
+
+interface Metadata {
+ /**
+ * This is the time at which the file or directory was last modified.
+ * @readonly
+ */
+ modificationTime:Date;
+
+ /**
+ * The size of the file, in bytes. This must return 0 for directories.
+ * @readonly
+ */
+ size:number;
+}
+
+interface Flags {
+ /**
+ * Used to indicate that the user wants to create a file or directory if it was not previously there.
+ */
+ create?:boolean;
+
+ /**
+ * By itself, exclusive must have no effect. Used with create, it must cause getFile and getDirectory to fail if the target path already exists.
+ */
+ exclusive?:boolean;
+}
+
+/**
+ * This interface represents a file system.
+ */
+interface FileSystem{
+ /**
+ * This is the name of the file system. The specifics of naming filesystems is unspecified, but a name must be unique across the list of exposed file systems.
+ * @readonly
+ */
+ name: string;
+
+ /**
+ * The root directory of the file system.
+ * @readonly
+ */
+ root: DirectoryEntry;
+}
+
+interface Entry {
+
+ /**
+ * Entry is a file.
+ */
+ isFile:boolean;
+
+ /**
+ * Entry is a directory.
+ */
+ isDirectory:boolean;
+
+ /**
+ * Look up metadata about this entry.
+ * @param successCallback A callback that is called with the time of the last modification.
+ * @param errorCallback ErrorCallback A callback that is called when errors happen.
+ */
+ getMetadata(successCallback:MetadataCallback, errorCallback?:ErrorCallback):void;
+
+ /**
+ * The name of the entry, excluding the path leading to it.
+ */
+ name:string;
+
+ /**
+ * The full absolute path from the root to the entry.
+ */
+ fullPath:string;
+
+ /**
+ * The file system on which the entry resides.
+ */
+ filesystem:FileSystem;
+
+ /**
+ * Move an entry to a different location on the file system. It is an error to try to:
+ *
+ * <ui>
+ * <li>move a directory inside itself or to any child at any depth;</li>
+ * <li>move an entry into its parent if a name different from its current one isn't provided;</li>
+ * <li>move a file to a path occupied by a directory;</li>
+ * <li>move a directory to a path occupied by a file;</li>
+ * <li>move any element to a path occupied by a directory which is not empty.</li>
+ * <ul>
+ *
+ * A move of a file on top of an existing file must attempt to delete and replace that file.
+ * A move of a directory on top of an existing empty directory must attempt to delete and replace that directory.
+ */
+ moveTo(parent:DirectoryEntry, newName?:string, successCallback?:EntryCallback, errorCallback?:ErrorCallback):string;
+
+ /**
+ * Copy an entry to a different location on the file system. It is an error to try to:
+ *
+ * <ul>
+ * <li> copy a directory inside itself or to any child at any depth;</li>
+ * <li> copy an entry into its parent if a name different from its current one isn't provided;</li>
+ * <li> copy a file to a path occupied by a directory;</li>
+ * <li> copy a directory to a path occupied by a file;</li>
+ * <li> copy any element to a path occupied by a directory which is not empty.</li>
+ * <li> A copy of a file on top of an existing file must attempt to delete and replace that file.</li>
+ * <li> A copy of a directory on top of an existing empty directory must attempt to delete and replace that directory.</li>
+ * </ul>
+ *
+ * Directory copies are always recursive--that is, they copy all contents of the directory.
+ */
+ copyTo(parent:DirectoryEntry, newName?:string, successCallback?:EntryCallback, errorCallback?:ErrorCallback):string;
+
+ /**
+ * Returns a URL that can be used to identify this entry. Unlike the URN defined in [FILE-API-ED], it has no specific expiration; as it describes a location on disk, it should be valid at least as long as that location exists.
+ */
+ toURL():string;
+
+ /**
+ * Deletes a file or directory. It is an error to attempt to delete a directory that is not empty. It is an error to attempt to delete the root directory of a filesystem.
+ * @param successCallback A callback that is called on success.
+ * @param errorCallback A callback that is called when errors happen.
+ */
+ remove(successCallback:VoidCallback, errorCallback?:ErrorCallback):void;
+
+ /**
+ * Look up the parent DirectoryEntry containing this Entry. If this Entry is the root of its filesystem, its parent is itself.
+ * @param successCallback A callback that is called to return the parent Entry.
+ * @param errorCallback A callback that is called when errors happen.
+ */
+ getParent(successCallback:DirectoryEntryCallback, errorCallback?:ErrorCallback):void;
+}
+
+/**
+ * This interface represents a directory on a file system.
+ */
+interface DirectoryEntry extends Entry {
+ /**
+ * Creates a new DirectoryReader to read Entries from this Directory.
+ */
+ createReader():DirectoryReader;
+
+ /**
+ * Creates or looks up a file.
+ * @param path Either an absolute path or a relative path from this DirectoryEntry to the file to be looked up or created. It is an error to attempt to create a file whose immediate parent does not yet exist.
+ * @param options
+ * <ul>
+ * <li>If create and exclusive are both true, and the path already exists, getFile must fail.</li>
+ * <li>If create is true, the path doesn't exist, and no other error occurs, getFile must create it as a zero-length file and return a corresponding FileEntry.</li>
+ * <li>If create is not true and the path doesn't exist, getFile must fail.</li>
+ * <li>If create is not true and the path exists, but is a directory, getFile must fail.</li>
+ * <li>Otherwise, if no other error occurs, getFile must return a FileEntry corresponding to path.</li>
+ * </ul>
+ * @param successCallback A callback that is called to return the File selected or created.
+ * @param errorCallback A callback that is called when errors happen.
+ */
+ getFile(path:string, options?:Flags, successCallback?:FileEntryCallback, errorCallback?:ErrorCallback):void;
+
+ /**
+ * Creates or looks up a directory.
+ * @param path Either an absolute path or a relative path from this DirectoryEntry to the directory to be looked up or created. It is an error to attempt to create a directory whose immediate parent does not yet exist.
+ * @param options
+ * <ul>
+ * <li>If create and exclusive are both true and the path already exists, getDirectory must fail.</li>
+ * <li>If create is true, the path doesn't exist, and no other error occurs, getDirectory must create and return a corresponding DirectoryEntry.</li>
+ * <li>If create is not true and the path doesn't exist, getDirectory must fail.</li>
+ * <li>If create is not true and the path exists, but is a file, getDirectory must fail.</li>
+ * <li>Otherwise, if no other error occurs, getDirectory must return a DirectoryEntry corresponding to path.</li>
+ * </ul>
+ * @param successCallback A callback that is called to return the DirectoryEntry selected or created.
+ * @param errorCallback A callback that is called when errors happen.
+ *
+ */
+ getDirectory(path:string, options?:Flags, successCallback?:DirectoryEntryCallback, errorCallback?:ErrorCallback):void;
+
+ /**
+ * Deletes a directory and all of its contents, if any. In the event of an error [e.g. trying to delete a directory that contains a file that cannot be removed], some of the contents of the directory may be deleted. It is an error to attempt to delete the root directory of a filesystem.
+ * @param successCallback A callback that is called on success.
+ * @param errorCallback A callback that is called when errors happen.
+ */
+ removeRecursively(successCallback:VoidCallback, errorCallback?:ErrorCallback):void;
+}
+
+/**
+ * This interface lets a user list files and directories in a directory. If there are no additions to or deletions from a directory between the first and last call to readEntries, and no errors occur, then:
+ * <ul>
+ * <li> A series of calls to readEntries must return each entry in the directory exactly once.</li>
+ * <li> Once all entries have been returned, the next call to readEntries must produce an empty array.</li>
+ * <li> If not all entries have been returned, the array produced by readEntries must not be empty.</li>
+ * <li> The entries produced by readEntries must not include the directory itself ["."] or its parent [".."].</li>
+ * </ul>
+ */
+interface DirectoryReader {
+ /**
+ * Read the next block of entries from this directory.
+ * @param successCallback Called once per successful call to readEntries to deliver the next previously-unreported set of Entries in the associated Directory. If all Entries have already been returned from previous invocations of readEntries, successCallback must be called with a zero-length array as an argument.
+ * @param errorCallback A callback indicating that there was an error reading from the Directory.
+ */
+ readEntries(successCallback:EntriesCallback, errorCallback?:ErrorCallback):void;
+}
+
+/**
+ * This interface represents a file on a file system.
+ */
+interface FileEntry extends Entry {
+ /**
+ * Creates a new FileWriter associated with the file that this FileEntry represents.
+ * @param successCallback A callback that is called with the new FileWriter.
+ * @param errorCallback A callback that is called when errors happen.
+ */
+ createWriter(successCallback:FileWriterCallback, errorCallback?:ErrorCallback):void;
+
+ /**
+ * Returns a File that represents the current state of the file that this FileEntry represents.
+ * @param successCallback A callback that is called with the File.
+ * @param errorCallback A callback that is called when errors happen.
+ */
+ file(successCallback:FileCallback, errorCallback?:ErrorCallback):void;
+}
+
+/**
+ * When requestFileSystem() succeeds, the following callback is made.
+ */
+interface FileSystemCallback {
+ /**
+ * @param filesystem The file systems to which the app is granted access.
+ */
+ (filesystem:FileSystem):void;
+}
+
+/**
+ * This interface is the callback used to look up Entry objects.
+ */
+interface EntryCallback {
+ /**
+ * @param entry
+ */
+ (entry:Entry):void;
+}
+
+/**
+ * This interface is the callback used to look up FileEntry objects.
+ */
+interface FileEntryCallback {
+ /**
+ * @param entry
+ */
+ (entry:FileEntry):void;
+}
+
+/**
+ * This interface is the callback used to look up DirectoryEntry objects.
+ */
+interface DirectoryEntryCallback {
+ /**
+ * @param entry
+ */
+ (entry:DirectoryEntry):void;
+}
+
+/**
+ * When readEntries() succeeds, the following callback is made.
+ */
+interface EntriesCallback {
+ (entries:Entry[]):void;
+}
+
+/**
+ * This interface is the callback used to look up file and directory metadata.
+ */
+interface MetadataCallback {
+ (metadata:Metadata):void;
+}
+
+/**
+ * This interface is the callback used to create a FileWriter.
+ */
+interface FileWriterCallback {
+ (fileWriter:FileWriter):void;
+}
+
+/**
+ * This interface is the callback used to obtain a File.
+ */
+interface FileCallback {
+ (file:File):void;
+}
+
+/**
+ * This interface is the generic callback used to indicate success of an asynchronous method.
+ */
+interface VoidCallback {
+ ():void;
+}
+
+/**
+ * When an error occurs, the following callback is made.
+ */
+interface ErrorCallback {
+ (err:DOMError):void;
+}
+
+
+/**
+ * This interface represents a file system.
+ */
+interface FileSystemSync {
+ /**
+ * This is the name of the file system. The specifics of naming filesystems is unspecified, but a name must be unique across the list of exposed file systems.
+ */
+ name:string;
+
+ /**
+ * root The root directory of the file system.
+ */
+ root:DirectoryEntrySync;
+}
+
+/**
+ * An abstract interface representing entries in a file system, each of which may be a FileEntrySync or DirectoryEntrySync.
+ */
+interface EntrySync{
+ /**
+ * EntrySync is a file.
+ * @readonly
+ */
+ isFile:boolean;
+
+ /**
+ * EntrySync is a directory.
+ * @readonly
+ */
+ isDirectory:boolean;
+
+ /**
+ * Look up metadata about this entry.
+ */
+ getMetadata():Metadata;
+
+ /**
+ * The name of the entry, excluding the path leading to it.
+ */
+ name:string;
+
+ /**
+ * The full absolute path from the root to the entry.
+ */
+ fullPath:string;
+
+ /**
+ * The file system on which the entry resides.
+ */
+ filesystem:FileSystemSync;
+
+ /**
+ * Move an entry to a different location on the file system. It is an error to try to:
+ * <ul>
+ * <li> move a directory inside itself or to any child at any depth;</li>
+ * <li> move an entry into its parent if a name different from its current one isn't provided;</li>
+ * <li> move a file to a path occupied by a directory;</li>
+ * <li> move a directory to a path occupied by a file;</li>
+ * <li> move any element to a path occupied by a directory which is not empty.</li>
+ * </ui>
+ * A move of a file on top of an existing file must attempt to delete and replace that file. A move of a directory on top of an existing empty directory must attempt to delete and replace that directory.
+ * @param parent The directory to which to move the entry.
+ * @param newName The new name of the entry. Defaults to the EntrySync's current name if unspecified.
+ */
+ moveTo(parent:DirectoryEntrySync, newName?:string):EntrySync;
+
+ /**
+ * Copy an entry to a different location on the file system. It is an error to try to:
+ * <ul>
+ * <li> copy a directory inside itself or to any child at any depth;</li>
+ * <li> copy an entry into its parent if a name different from its current one isn't provided;</li>
+ * <li> copy a file to a path occupied by a directory;</li>
+ * <li> copy a directory to a path occupied by a file;</li>
+ * <li> copy any element to a path occupied by a directory which is not empty.</li>
+ * </ui>
+ * A copy of a file on top of an existing file must attempt to delete and replace that file.
+ * A copy of a directory on top of an existing empty directory must attempt to delete and replace that directory.
+ * Directory copies are always recursive--that is, they copy all contents of the directory.
+ */
+ copyTo(parent:DirectoryEntrySync, newName?:string):EntrySync;
+
+ /**
+ * Returns a URL that can be used to identify this entry. Unlike the URN defined in [FILE-API-ED], it has no specific expiration; as it describes a location on disk, it should be valid at least as long as that location exists.
+ */
+ toURL():string;
+
+ /**
+ * Deletes a file or directory. It is an error to attempt to delete a directory that is not empty. It is an error to attempt to delete the root directory of a filesystem.
+ */
+ remove ():void;
+
+ /**
+ * Look up the parent DirectoryEntrySync containing this Entry. If this EntrySync is the root of its filesystem, its parent is itself.
+ */
+ getParent():DirectoryEntrySync;
+}
+
+/**
+ * This interface represents a directory on a file system.
+ */
+interface DirectoryEntrySync extends EntrySync {
+ /**
+ * Creates a new DirectoryReaderSync to read EntrySyncs from this DirectorySync.
+ */
+ createReader():DirectoryReaderSync;
+
+ /**
+ * Creates or looks up a directory.
+ * @param path Either an absolute path or a relative path from this DirectoryEntrySync to the file to be looked up or created. It is an error to attempt to create a file whose immediate parent does not yet exist.
+ * @param options
+ * <ul>
+ * <li> If create and exclusive are both true and the path already exists, getFile must fail.</li>
+ * <li> If create is true, the path doesn't exist, and no other error occurs, getFile must create it as a zero-length file and return a corresponding FileEntry.</li>
+ * <li> If create is not true and the path doesn't exist, getFile must fail.</li>
+ * <li> If create is not true and the path exists, but is a directory, getFile must fail.</li>
+ * <li> Otherwise, if no other error occurs, getFile must return a FileEntrySync corresponding to path.</li>
+ * </ul>
+ */
+ getFile(path:string, options?:Flags):FileEntrySync;
+
+ /**
+ * Creates or looks up a directory.
+ * @param path Either an absolute path or a relative path from this DirectoryEntrySync to the directory to be looked up or created. It is an error to attempt to create a directory whose immediate parent does not yet exist.
+ * @param options
+ * <ul>
+ * <li> If create and exclusive are both true and the path already exists, getDirectory must fail.</li>
+ * <li> If create is true, the path doesn't exist, and no other error occurs, getDirectory must create and return a corresponding DirectoryEntry.</li>
+ * <li> If create is not true and the path doesn't exist, getDirectory must fail.</li>
+ * <li> If create is not true and the path exists, but is a file, getDirectory must fail.</li>
+ * <li> Otherwise, if no other error occurs, getDirectory must return a DirectoryEntrySync corresponding to path.</li>
+ * </ul>
+ */
+ getDirectory(path:string, options?:Flags):DirectoryEntrySync;
+
+ /**
+ * Deletes a directory and all of its contents, if any. In the event of an error [e.g. trying to delete a directory that contains a file that cannot be removed], some of the contents of the directory may be deleted. It is an error to attempt to delete the root directory of a filesystem.
+ */
+ removeRecursively():void;
+}
+
+/**
+ * This interface lets a user list files and directories in a directory. If there are no additions to or deletions from a directory between the first and last call to readEntries, and no errors occur, then:
+ * <ul>
+ * <li> A series of calls to readEntries must return each entry in the directory exactly once.</li>
+ * <li> Once all entries have been returned, the next call to readEntries must produce an empty array.</li>
+ * <li> If not all entries have been returned, the array produced by readEntries must not be empty.</li>
+ * <li> The entries produced by readEntries must not include the directory itself ["."] or its parent [".."].</li>
+ * </ul>
+ */
+interface DirectoryReaderSync {
+ /**
+ * Read the next block of entries from this directory.
+ */
+ readEntries():EntrySync[];
+}
+
+/**
+ * This interface represents a file on a file system.
+ */
+interface FileEntrySync extends EntrySync {
+ /**
+ * Creates a new FileWriterSync associated with the file that this FileEntrySync represents.
+ */
+ createWriter():FileWriterSync;
+
+ /**
+ * Returns a File that represents the current state of the file that this FileEntrySync represents.
+ */
+ file():File;
+}
+
+interface Window extends LocalFileSystem, LocalFileSystemSync{
+}
+
+interface WorkerGlobalScope extends LocalFileSystem, LocalFileSystemSync{
+}
diff --git a/extension/lib/decl/filewriter/filewriter.d.ts b/extension/lib/decl/filewriter/filewriter.d.ts
new file mode 100644
index 000000000..a4910d0b1
--- /dev/null
+++ b/extension/lib/decl/filewriter/filewriter.d.ts
@@ -0,0 +1,176 @@
+// Type definitions for File API: Writer
+// Project: http://www.w3.org/TR/file-writer-api/
+// Definitions by: Kon <http://phyzkit.net/>
+// Definitions: https://github.com/borisyankov/DefinitelyTyped
+
+/**
+ * This interface provides methods to monitor the asynchronous writing of blobs to disk using progress events [PROGRESS-EVENTS] and event handler attributes.
+ * This interface is specified to be used within the context of the global object (Window [HTML5]) and within Web Workers (WorkerUtils [WEBWORKERS-ED]).
+ */
+interface FileSaver extends EventTarget {
+ /**
+ * When the abort method is called, user agents must run the steps below:
+ * <ol>
+ * <li> If readyState == DONE or readyState == INIT, terminate this overall series of steps without doing anything else. </li>
+ * <li> Set readyState to DONE. </li>
+ * <li> If there are any tasks from the object's FileSaver task source in one of the task queues, then remove those tasks. </li>
+ * <li> Terminate the write algorithm being processed. </li>
+ * <li> Set the error attribute to a DOMError object of type "AbortError". </li>
+ * <li> Fire a progress event called abort </li>
+ * <li> Fire a progress event called writeend </li>
+ * <li> Terminate this algorithm. </li>
+ * </ol>
+ */
+ abort():void;
+
+ /**
+ * The blob is being written.
+ * @readonly
+ */
+ INIT:number;
+
+ /**
+ * The object has been constructed, but there is no pending write.
+ * @readonly
+ */
+ WRITING:number;
+
+ /**
+ * The entire Blob has been written to the file, an error occurred during the write, or the write was aborted using abort(). The FileSaver is no longer writing the blob.
+ * @readonly
+ */
+ DONE:number;
+
+ /**
+ * The FileSaver object can be in one of 3 states. The readyState attribute, on getting, must return the current state, which must be one of the following values:
+ * <ul>
+ * <li>INIT</li>
+ * <li>WRITING</li>
+ * <li>DONE</li>
+ * <ul>
+ * @readonly
+ */
+ readyState:number;
+
+ /**
+ * The last error that occurred on the FileSaver.
+ * @readonly
+ */
+ error:DOMError;
+
+ /**
+ * Handler for writestart events
+ */
+ onwritestart:Function;
+
+ /**
+ * Handler for progress events.
+ */
+ onprogress:Function;
+
+ /**
+ * Handler for write events.
+ */
+ onwrite:Function;
+
+ /**
+ * Handler for abort events.
+ */
+ onabort:Function;
+
+ /**
+ * Handler for error events.
+ */
+ onerror:Function;
+
+ /**
+ * Handler for writeend events.
+ */
+ onwriteend:Function;
+}
+
+declare var FileSaver: {
+ /**
+ * When the FileSaver constructor is called, the user agent must return a new FileSaver object with readyState set to INIT.
+ * This constructor must be visible when the script's global object is either a Window object or an object implementing the WorkerUtils interface.
+ */
+ new(data:Blob): FileSaver;
+}
+
+/**
+ * This interface expands on the FileSaver interface to allow for multiple write actions, rather than just saving a single Blob.
+ */
+interface FileWriter extends FileSaver {
+ /**
+ * The byte offset at which the next write to the file will occur. This must be no greater than length.
+ * A newly-created FileWriter must have position set to 0.
+ */
+ position:number;
+
+ /**
+ * The length of the file. If the user does not have read access to the file, this must be the highest byte offset at which the user has written.
+ */
+ length:number;
+
+ /**
+ * Write the supplied data to the file at position.
+ * @param data The blob to write.
+ */
+ write(data:Blob):void;
+
+ /**
+ * Seek sets the file position at which the next write will occur.
+ * @param offset If nonnegative, an absolute byte offset into the file. If negative, an offset back from the end of the file.
+ */
+ seek(offset:number):void;
+
+ /**
+ * Changes the length of the file to that specified. If shortening the file, data beyond the new length must be discarded. If extending the file, the existing data must be zero-padded up to the new length.
+ * @param size The size to which the length of the file is to be adjusted, measured in bytes.
+ */
+ truncate(size:number):void;
+}
+
+/**
+ * This interface lets users write, truncate, and append to files using simple synchronous calls.
+ * This interface is specified to be used only within Web Workers (WorkerUtils [WEBWORKERS]).
+ */
+interface FileWriterSync {
+ /**
+ * The byte offset at which the next write to the file will occur. This must be no greater than length.
+ */
+ position:number;
+
+ /**
+ * The length of the file. If the user does not have read access to the file, this must be the highest byte offset at which the user has written.
+ */
+ length:number;
+
+ /**
+ * Write the supplied data to the file at position. Upon completion, position will increase by data.size.
+ * @param data The blob to write.
+ */
+ write(data:Blob):void;
+
+ /**
+ * Seek sets the file position at which the next write will occur.
+ * @param offset An absolute byte offset into the file. If offset is greater than length, length is used instead. If offset is less than zero, length is added to it, so that it is treated as an offset back from the end of the file. If it is still less than zero, zero is used.
+ */
+ seek(offset:number):void;
+
+ /**
+ * Changes the length of the file to that specified. If shortening the file, data beyond the new length must be discarded. If extending the file, the existing data must be zero-padded up to the new length.
+ * Upon successful completion:
+ * <ul>
+ * <li>length must be equal to size.</li>
+ * <li>position must be the lesser of
+ * <ul>
+ * <li>its pre-truncate value,</li>
+ * <li>size.</li>
+ * </ul>
+ * </li>
+ * </ul>
+ * @param size The size to which the length of the file is to be adjusted, measured in bytes.
+ */
+ truncate(size:number):void;
+}
diff --git a/extension/lib/decl/handlebars/handlebars-1.0.0.d.ts b/extension/lib/decl/handlebars/handlebars-1.0.0.d.ts
new file mode 100644
index 000000000..c118760c5
--- /dev/null
+++ b/extension/lib/decl/handlebars/handlebars-1.0.0.d.ts
@@ -0,0 +1,184 @@
+// Type definitions for Handlebars 1.0
+// Project: http://handlebarsjs.com/
+// Definitions by: Boris Yankov <https://github.com/borisyankov/>
+// Definitions: https://github.com/borisyankov/DefinitelyTyped
+
+
+// Use either HandlebarsStatic or HandlebarsRuntimeStatic
+declare var Handlebars: HandlebarsStatic;
+//declare var Handlebars: HandlebarsRuntimeStatic;
+
+/**
+* Implement this interface on your MVW/MVVM/MVC views such as Backbone.View
+**/
+interface HandlebarsTemplatable {
+ template: HandlebarsTemplateDelegate;
+}
+
+interface HandlebarsTemplateDelegate {
+ (context: any, options?: any): string;
+}
+
+interface HandlebarsCommon {
+ registerHelper(name: string, fn: Function, inverse?: boolean): void;
+ registerPartial(name: string, str: any): void;
+ K(): void;
+ createFrame(object: any): any;
+
+ Exception(message: string): void;
+ SafeString: typeof hbs.SafeString;
+ Utils: typeof hbs.Utils;
+
+ logger: Logger;
+ log(level: number, obj: any): void;
+}
+
+interface HandlebarsStatic extends HandlebarsCommon {
+ parse(input: string): hbs.AST.ProgramNode;
+ compile(input: any, options?: any): HandlebarsTemplateDelegate;
+}
+
+interface HandlebarsTemplates {
+ [index: string]: HandlebarsTemplateDelegate;
+}
+
+interface HandlebarsRuntimeStatic extends HandlebarsCommon {
+ // Handlebars.templates is the default template namespace in precompiler.
+ templates: HandlebarsTemplates;
+}
+
+declare module hbs {
+ class SafeString {
+ constructor(str: string);
+ static toString(): string;
+ }
+
+ module Utils {
+ function escapeExpression(str: string): string;
+ }
+}
+
+interface Logger {
+ DEBUG: number;
+ INFO: number;
+ WARN: number;
+ ERROR: number;
+ level: number;
+
+ methodMap: { [level: number]: string };
+
+ log(level: number, obj: string): void;
+}
+
+declare module hbs {
+ module AST {
+ interface IStripInfo {
+ left?: boolean;
+ right?: boolean;
+ inlineStandalone?: boolean;
+ }
+
+ class NodeBase {
+ firstColumn: number;
+ firstLine: number;
+ lastColumn: number;
+ lastLine: number;
+ type: string;
+ }
+
+ class ProgramNode extends NodeBase {
+ statements: NodeBase[];
+ }
+
+ class IdNode extends NodeBase {
+ original: string;
+ parts: string[];
+ string: string;
+ depth: number;
+ idName: string;
+ isSimple: boolean;
+ stringModeValue: string;
+ }
+
+ class HashNode extends NodeBase {
+ pairs: {0: string;
+ 1: NodeBase}[];
+ }
+
+ class SexprNode extends NodeBase {
+ hash: HashNode;
+ id: NodeBase;
+ params: NodeBase[];
+ isHelper: boolean;
+ eligibleHelper: boolean;
+ }
+
+ class MustacheNode extends NodeBase {
+ strip: IStripInfo;
+ escaped: boolean;
+ sexpr: SexprNode;
+
+ }
+
+ class BlockNode extends NodeBase {
+ mustache: MustacheNode;
+ program: ProgramNode;
+ inverse: ProgramNode;
+ strip: IStripInfo;
+ isInverse: boolean;
+ }
+
+ class PartialNameNode extends NodeBase {
+ name: string;
+ }
+
+ class PartialNode extends NodeBase {
+ partialName: PartialNameNode;
+ context: NodeBase;
+ hash: HashNode;
+ strip: IStripInfo;
+ }
+
+ class RawBlockNode extends NodeBase {
+ mustache: MustacheNode;
+ program: ProgramNode;
+ }
+
+ class ContentNode extends NodeBase {
+ original: string;
+ string: string;
+ }
+
+ class DataNode extends NodeBase {
+ id: IdNode;
+ stringModeValue: string;
+ idName: string;
+ }
+
+ class StringNode extends NodeBase {
+ original: string;
+ string: string;
+ stringModeValue: string;
+ }
+
+ class NumberNode extends NodeBase {
+ original: string;
+ number: string;
+ stringModeValue: number;
+ }
+
+ class BooleanNode extends NodeBase {
+ bool: string;
+ stringModeValue: boolean;
+ }
+
+ class CommentNode extends NodeBase {
+ comment: string;
+ strip: IStripInfo;
+ }
+ }
+}
+
+declare module "handlebars" {
+ export = Handlebars;
+}
diff --git a/extension/lib/decl/handlebars/handlebars.d.ts b/extension/lib/decl/handlebars/handlebars.d.ts
new file mode 100644
index 000000000..54dc7e9ae
--- /dev/null
+++ b/extension/lib/decl/handlebars/handlebars.d.ts
@@ -0,0 +1,227 @@
+// Type definitions for Handlebars v3.0.3
+// Project: http://handlebarsjs.com/
+// Definitions by: Boris Yankov <https://github.com/borisyankov/>
+// Definitions: https://github.com/borisyankov/DefinitelyTyped
+
+
+declare module Handlebars {
+ export function registerHelper(name: string, fn: Function, inverse?: boolean): void;
+ export function registerPartial(name: string, str: any): void;
+ export function unregisterHelper(name: string): void;
+ export function unregisterPartial(name: string): void;
+ export function K(): void;
+ export function createFrame(object: any): any;
+ export function Exception(message: string): void;
+ export function log(level: number, obj: any): void;
+ export function parse(input: string): hbs.AST.Program;
+ export function compile(input: any, options?: any): HandlebarsTemplateDelegate;
+
+ export var SafeString: typeof hbs.SafeString;
+ export var Utils: typeof hbs.Utils;
+ export var logger: Logger;
+ export var templates: HandlebarsTemplates;
+ export var helpers: any;
+
+ export module AST {
+ export var helpers: hbs.AST.helpers;
+ }
+
+ interface ICompiler {
+ accept(node: hbs.AST.Node): void;
+ Program(program: hbs.AST.Program): void;
+ BlockStatement(block: hbs.AST.BlockStatement): void;
+ PartialStatement(partial: hbs.AST.PartialStatement): void;
+ MustacheStatement(mustache: hbs.AST.MustacheStatement): void;
+ ContentStatement(content: hbs.AST.ContentStatement): void;
+ CommentStatement(comment?: hbs.AST.CommentStatement): void;
+ SubExpression(sexpr: hbs.AST.SubExpression): void;
+ PathExpression(path: hbs.AST.PathExpression): void;
+ StringLiteral(str: hbs.AST.StringLiteral): void;
+ NumberLiteral(num: hbs.AST.NumberLiteral): void;
+ BooleanLiteral(bool: hbs.AST.BooleanLiteral): void;
+ UndefinedLiteral(): void;
+ NullLiteral(): void;
+ Hash(hash: hbs.AST.Hash): void;
+ }
+
+ export class Visitor implements ICompiler {
+ accept(node: hbs.AST.Node): void;
+ acceptKey(node: hbs.AST.Node, name: string): void;
+ acceptArray(arr: hbs.AST.Expression[]): void;
+ Program(program: hbs.AST.Program): void;
+ BlockStatement(block: hbs.AST.BlockStatement): void;
+ PartialStatement(partial: hbs.AST.PartialStatement): void;
+ MustacheStatement(mustache: hbs.AST.MustacheStatement): void;
+ ContentStatement(content: hbs.AST.ContentStatement): void;
+ CommentStatement(comment?: hbs.AST.CommentStatement): void;
+ SubExpression(sexpr: hbs.AST.SubExpression): void;
+ PathExpression(path: hbs.AST.PathExpression): void;
+ StringLiteral(str: hbs.AST.StringLiteral): void;
+ NumberLiteral(num: hbs.AST.NumberLiteral): void;
+ BooleanLiteral(bool: hbs.AST.BooleanLiteral): void;
+ UndefinedLiteral(): void;
+ NullLiteral(): void;
+ Hash(hash: hbs.AST.Hash): void;
+ }
+}
+
+/**
+* Implement this interface on your MVW/MVVM/MVC views such as Backbone.View
+**/
+interface HandlebarsTemplatable {
+ template: HandlebarsTemplateDelegate;
+}
+
+interface HandlebarsTemplateDelegate {
+ (context: any, options?: any): string;
+}
+
+interface HandlebarsTemplates {
+ [index: string]: HandlebarsTemplateDelegate;
+}
+
+declare module hbs {
+ class SafeString {
+ constructor(str: string);
+ static toString(): string;
+ }
+
+ module Utils {
+ function escapeExpression(str: string): string;
+ }
+}
+
+interface Logger {
+ DEBUG: number;
+ INFO: number;
+ WARN: number;
+ ERROR: number;
+ level: number;
+
+ methodMap: { [level: number]: string };
+
+ log(level: number, obj: string): void;
+}
+
+declare module hbs {
+ module AST {
+ interface Node {
+ type: string;
+ loc: SourceLocation;
+ }
+
+ interface SourceLocation {
+ source: string;
+ start: Position;
+ end: Position;
+ }
+
+ interface Position {
+ line: number;
+ column: number;
+ }
+
+ interface Program extends Node {
+ body: Statement[];
+ blockParams: string[];
+ }
+
+ interface Statement extends Node {}
+
+ interface MustacheStatement extends Statement {
+ path: PathExpression | Literal;
+ params: Expression[];
+ hash: Hash;
+ escaped: boolean;
+ strip: StripFlags;
+ }
+
+ interface BlockStatement extends Statement {
+ path: PathExpression;
+ params: Expression[];
+ hash: Hash;
+ program: Program;
+ inverse: Program;
+ openStrip: StripFlags;
+ inverseStrip: StripFlags;
+ closeStrip: StripFlags;
+ }
+
+ interface PartialStatement extends Statement {
+ name: PathExpression | SubExpression;
+ params: Expression[];
+ hash: Hash;
+ indent: string;
+ strip: StripFlags;
+ }
+
+ interface ContentStatement extends Statement {
+ value: string;
+ original: StripFlags;
+ }
+
+ interface CommentStatement extends Statement {
+ value: string;
+ strip: StripFlags;
+ }
+
+ interface Expression extends Node {}
+
+ interface SubExpression extends Expression {
+ path: PathExpression;
+ params: Expression[];
+ hash: Hash;
+ }
+
+ interface PathExpression extends Expression {
+ data: boolean;
+ depth: number;
+ parts: string[];
+ original: string;
+ }
+
+ interface Literal extends Expression {}
+ interface StringLiteral extends Literal {
+ value: string;
+ original: string;
+ }
+
+ interface BooleanLiteral extends Literal {
+ value: boolean;
+ original: boolean;
+ }
+
+ interface NumberLiteral extends Literal {
+ value: number;
+ original: number;
+ }
+
+ interface UndefinedLiteral extends Literal {}
+
+ interface NullLiteral extends Literal {}
+
+ interface Hash extends Node {
+ pairs: HashPair[];
+ }
+
+ interface HashPair extends Node {
+ key: string;
+ value: Expression;
+ }
+
+ interface StripFlags {
+ open: boolean;
+ close: boolean;
+ }
+
+ interface helpers {
+ helperExpression(node: Node): boolean;
+ scopeId(path: PathExpression): boolean;
+ simpleId(path: PathExpression): boolean;
+ }
+ }
+}
+
+declare module "handlebars" {
+ export = Handlebars;
+}
diff --git a/extension/lib/decl/jquery/jquery.d.ts b/extension/lib/decl/jquery/jquery.d.ts
new file mode 100644
index 000000000..8401753e3
--- /dev/null
+++ b/extension/lib/decl/jquery/jquery.d.ts
@@ -0,0 +1,3190 @@
+// Type definitions for jQuery 1.10.x / 2.0.x
+// Project: http://jquery.com/
+// Definitions by: Boris Yankov <https://github.com/borisyankov/>, Christian Hoffmeister <https://github.com/choffmeister>, Steve Fenton <https://github.com/Steve-Fenton>, Diullei Gomes <https://github.com/Diullei>, Tass Iliopoulos <https://github.com/tasoili>, Jason Swearingen <https://github.com/jasons-novaleaf>, Sean Hill <https://github.com/seanski>, Guus Goossens <https://github.com/Guuz>, Kelly Summerlin <https://github.com/ksummerlin>, Basarat Ali Syed <https://github.com/basarat>, Nicholas Wolverson <https://github.com/nwolverson>, Derek Cicerone <https://github.com/derekcicerone>, Andrew Gaspar <https://github.com/AndrewGaspar>, James Harrison Fisher <https://github.com/jameshfisher>, Seikichi Kondo <https://github.com/seikichi>, Benjamin Jackman <https://github.com/benjaminjackman>, Poul Sorensen <https://github.com/s093294>, Josh Strobl <https://github.com/JoshStrobl>, John Reilly <https://github.com/johnnyreilly/>, Dick van den Brink <https://github.com/DickvdBrink>
+// Definitions: https://github.com/borisyankov/DefinitelyTyped
+
+/* *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+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
+
+THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+/**
+ * Interface for the AJAX setting that will configure the AJAX request
+ */
+interface JQueryAjaxSettings {
+ /**
+ * The content type sent in the request header that tells the server what kind of response it will accept in return. If the accepts setting needs modification, it is recommended to do so once in the $.ajaxSetup() method.
+ */
+ accepts?: any;
+ /**
+ * By default, all requests are sent asynchronously (i.e. this is set to true by default). If you need synchronous requests, set this option to false. Cross-domain requests and dataType: "jsonp" requests do not support synchronous operation. Note that synchronous requests may temporarily lock the browser, disabling any actions while the request is active. As of jQuery 1.8, the use of async: false with jqXHR ($.Deferred) is deprecated; you must use the success/error/complete callback options instead of the corresponding methods of the jqXHR object such as jqXHR.done() or the deprecated jqXHR.success().
+ */
+ async?: boolean;
+ /**
+ * A pre-request callback function that can be used to modify the jqXHR (in jQuery 1.4.x, XMLHTTPRequest) object before it is sent. Use this to set custom headers, etc. The jqXHR and settings objects are passed as arguments. This is an Ajax Event. Returning false in the beforeSend function will cancel the request. As of jQuery 1.5, the beforeSend option will be called regardless of the type of request.
+ */
+ beforeSend? (jqXHR: JQueryXHR, settings: JQueryAjaxSettings): any;
+ /**
+ * If set to false, it will force requested pages not to be cached by the browser. Note: Setting cache to false will only work correctly with HEAD and GET requests. It works by appending "_={timestamp}" to the GET parameters. The parameter is not needed for other types of requests, except in IE8 when a POST is made to a URL that has already been requested by a GET.
+ */
+ cache?: boolean;
+ /**
+ * A function to be called when the request finishes (after success and error callbacks are executed). The function gets passed two arguments: The jqXHR (in jQuery 1.4.x, XMLHTTPRequest) object and a string categorizing the status of the request ("success", "notmodified", "error", "timeout", "abort", or "parsererror"). As of jQuery 1.5, the complete setting can accept an array of functions. Each function will be called in turn. This is an Ajax Event.
+ */
+ complete? (jqXHR: JQueryXHR, textStatus: string): any;
+ /**
+ * An object of string/regular-expression pairs that determine how jQuery will parse the response, given its content type. (version added: 1.5)
+ */
+ contents?: { [key: string]: any; };
+ //According to jQuery.ajax source code, ajax's option actually allows contentType to set to "false"
+ // https://github.com/borisyankov/DefinitelyTyped/issues/742
+ /**
+ * When sending data to the server, use this content type. Default is "application/x-www-form-urlencoded; charset=UTF-8", which is fine for most cases. If you explicitly pass in a content-type to $.ajax(), then it is always sent to the server (even if no data is sent). The W3C XMLHttpRequest specification dictates that the charset is always UTF-8; specifying another charset will not force the browser to change the encoding.
+ */
+ contentType?: any;
+ /**
+ * This object will be made the context of all Ajax-related callbacks. By default, the context is an object that represents the ajax settings used in the call ($.ajaxSettings merged with the settings passed to $.ajax).
+ */
+ context?: any;
+ /**
+ * An object containing dataType-to-dataType converters. Each converter's value is a function that returns the transformed value of the response. (version added: 1.5)
+ */
+ converters?: { [key: string]: any; };
+ /**
+ * If you wish to force a crossDomain request (such as JSONP) on the same domain, set the value of crossDomain to true. This allows, for example, server-side redirection to another domain. (version added: 1.5)
+ */
+ crossDomain?: boolean;
+ /**
+ * Data to be sent to the server. It is converted to a query string, if not already a string. It's appended to the url for GET-requests. See processData option to prevent this automatic processing. Object must be Key/Value pairs. If value is an Array, jQuery serializes multiple values with same key based on the value of the traditional setting (described below).
+ */
+ data?: any;
+ /**
+ * A function to be used to handle the raw response data of XMLHttpRequest.This is a pre-filtering function to sanitize the response. You should return the sanitized data. The function accepts two arguments: The raw data returned from the server and the 'dataType' parameter.
+ */
+ dataFilter? (data: any, ty: any): any;
+ /**
+ * The type of data that you're expecting back from the server. If none is specified, jQuery will try to infer it based on the MIME type of the response (an XML MIME type will yield XML, in 1.4 JSON will yield a JavaScript object, in 1.4 script will execute the script, and anything else will be returned as a string).
+ */
+ dataType?: string;
+ /**
+ * A function to be called if the request fails. The function receives three arguments: The jqXHR (in jQuery 1.4.x, XMLHttpRequest) object, a string describing the type of error that occurred and an optional exception object, if one occurred. Possible values for the second argument (besides null) are "timeout", "error", "abort", and "parsererror". When an HTTP error occurs, errorThrown receives the textual portion of the HTTP status, such as "Not Found" or "Internal Server Error." As of jQuery 1.5, the error setting can accept an array of functions. Each function will be called in turn. Note: This handler is not called for cross-domain script and cross-domain JSONP requests. This is an Ajax Event.
+ */
+ error? (jqXHR: JQueryXHR, textStatus: string, errorThrown: string): any;
+ /**
+ * Whether to trigger global Ajax event handlers for this request. The default is true. Set to false to prevent the global handlers like ajaxStart or ajaxStop from being triggered. This can be used to control various Ajax Events.
+ */
+ global?: boolean;
+ /**
+ * An object of additional header key/value pairs to send along with requests using the XMLHttpRequest transport. The header X-Requested-With: XMLHttpRequest is always added, but its default XMLHttpRequest value can be changed here. Values in the headers setting can also be overwritten from within the beforeSend function. (version added: 1.5)
+ */
+ headers?: { [key: string]: any; };
+ /**
+ * Allow the request to be successful only if the response has changed since the last request. This is done by checking the Last-Modified header. Default value is false, ignoring the header. In jQuery 1.4 this technique also checks the 'etag' specified by the server to catch unmodified data.
+ */
+ ifModified?: boolean;
+ /**
+ * Allow the current environment to be recognized as "local," (e.g. the filesystem), even if jQuery does not recognize it as such by default. The following protocols are currently recognized as local: file, *-extension, and widget. If the isLocal setting needs modification, it is recommended to do so once in the $.ajaxSetup() method. (version added: 1.5.1)
+ */
+ isLocal?: boolean;
+ /**
+ * Override the callback function name in a jsonp request. This value will be used instead of 'callback' in the 'callback=?' part of the query string in the url. So {jsonp:'onJSONPLoad'} would result in 'onJSONPLoad=?' passed to the server. As of jQuery 1.5, setting the jsonp option to false prevents jQuery from adding the "?callback" string to the URL or attempting to use "=?" for transformation. In this case, you should also explicitly set the jsonpCallback setting. For example, { jsonp: false, jsonpCallback: "callbackName" }
+ */
+ jsonp?: any;
+ /**
+ * Specify the callback function name for a JSONP request. This value will be used instead of the random name automatically generated by jQuery. It is preferable to let jQuery generate a unique name as it'll make it easier to manage the requests and provide callbacks and error handling. You may want to specify the callback when you want to enable better browser caching of GET requests. As of jQuery 1.5, you can also use a function for this setting, in which case the value of jsonpCallback is set to the return value of that function.
+ */
+ jsonpCallback?: any;
+ /**
+ * The HTTP method to use for the request (e.g. "POST", "GET", "PUT"). (version added: 1.9.0)
+ */
+ method?: string;
+ /**
+ * A mime type to override the XHR mime type. (version added: 1.5.1)
+ */
+ mimeType?: string;
+ /**
+ * A password to be used with XMLHttpRequest in response to an HTTP access authentication request.
+ */
+ password?: string;
+ /**
+ * By default, data passed in to the data option as an object (technically, anything other than a string) will be processed and transformed into a query string, fitting to the default content-type "application/x-www-form-urlencoded". If you want to send a DOMDocument, or other non-processed data, set this option to false.
+ */
+ processData?: boolean;
+ /**
+ * Only applies when the "script" transport is used (e.g., cross-domain requests with "jsonp" or "script" dataType and "GET" type). Sets the charset attribute on the script tag used in the request. Used when the character set on the local page is not the same as the one on the remote script.
+ */
+ scriptCharset?: string;
+ /**
+ * An object of numeric HTTP codes and functions to be called when the response has the corresponding code. f the request is successful, the status code functions take the same parameters as the success callback; if it results in an error (including 3xx redirect), they take the same parameters as the error callback. (version added: 1.5)
+ */
+ statusCode?: { [key: string]: any; };
+ /**
+ * A function to be called if the request succeeds. The function gets passed three arguments: The data returned from the server, formatted according to the dataType parameter; a string describing the status; and the jqXHR (in jQuery 1.4.x, XMLHttpRequest) object. As of jQuery 1.5, the success setting can accept an array of functions. Each function will be called in turn. This is an Ajax Event.
+ */
+ success? (data: any, textStatus: string, jqXHR: JQueryXHR): any;
+ /**
+ * Set a timeout (in milliseconds) for the request. This will override any global timeout set with $.ajaxSetup(). The timeout period starts at the point the $.ajax call is made; if several other requests are in progress and the browser has no connections available, it is possible for a request to time out before it can be sent. In jQuery 1.4.x and below, the XMLHttpRequest object will be in an invalid state if the request times out; accessing any object members may throw an exception. In Firefox 3.0+ only, script and JSONP requests cannot be cancelled by a timeout; the script will run even if it arrives after the timeout period.
+ */
+ timeout?: number;
+ /**
+ * Set this to true if you wish to use the traditional style of param serialization.
+ */
+ traditional?: boolean;
+ /**
+ * The type of request to make ("POST" or "GET"), default is "GET". Note: Other HTTP request methods, such as PUT and DELETE, can also be used here, but they are not supported by all browsers.
+ */
+ type?: string;
+ /**
+ * A string containing the URL to which the request is sent.
+ */
+ url?: string;
+ /**
+ * A username to be used with XMLHttpRequest in response to an HTTP access authentication request.
+ */
+ username?: string;
+ /**
+ * Callback for creating the XMLHttpRequest object. Defaults to the ActiveXObject when available (IE), the XMLHttpRequest otherwise. Override to provide your own implementation for XMLHttpRequest or enhancements to the factory.
+ */
+ xhr?: any;
+ /**
+ * An object of fieldName-fieldValue pairs to set on the native XHR object. For example, you can use it to set withCredentials to true for cross-domain requests if needed. In jQuery 1.5, the withCredentials property was not propagated to the native XHR and thus CORS requests requiring it would ignore this flag. For this reason, we recommend using jQuery 1.5.1+ should you require the use of it. (version added: 1.5.1)
+ */
+ xhrFields?: { [key: string]: any; };
+}
+
+/**
+ * Interface for the jqXHR object
+ */
+interface JQueryXHR extends XMLHttpRequest, JQueryPromise<any> {
+ /**
+ * The .overrideMimeType() method may be used in the beforeSend() callback function, for example, to modify the response content-type header. As of jQuery 1.5.1, the jqXHR object also contains the overrideMimeType() method (it was available in jQuery 1.4.x, as well, but was temporarily removed in jQuery 1.5).
+ */
+ overrideMimeType(mimeType: string): any;
+ /**
+ * Cancel the request.
+ *
+ * @param statusText A string passed as the textStatus parameter for the done callback. Default value: "canceled"
+ */
+ abort(statusText?: string): void;
+ /**
+ * Incorporates the functionality of the .done() and .fail() methods, allowing (as of jQuery 1.8) the underlying Promise to be manipulated. Refer to deferred.then() for implementation details.
+ */
+ then(doneCallback: (data: any, textStatus: string, jqXHR: JQueryXHR) => void, failCallback?: (jqXHR: JQueryXHR, textStatus: string, errorThrown: any) => void): JQueryPromise<any>;
+ /**
+ * Property containing the parsed response if the response Content-Type is json
+ */
+ responseJSON?: any;
+ /**
+ * A function to be called if the request fails.
+ */
+ error(xhr: JQueryXHR, textStatus: string, errorThrown: string): void;
+}
+
+/**
+ * Interface for the JQuery callback
+ */
+interface JQueryCallback {
+ /**
+ * Add a callback or a collection of callbacks to a callback list.
+ *
+ * @param callbacks A function, or array of functions, that are to be added to the callback list.
+ */
+ add(callbacks: Function): JQueryCallback;
+ /**
+ * Add a callback or a collection of callbacks to a callback list.
+ *
+ * @param callbacks A function, or array of functions, that are to be added to the callback list.
+ */
+ add(callbacks: Function[]): JQueryCallback;
+
+ /**
+ * Disable a callback list from doing anything more.
+ */
+ disable(): JQueryCallback;
+
+ /**
+ * Determine if the callbacks list has been disabled.
+ */
+ disabled(): boolean;
+
+ /**
+ * Remove all of the callbacks from a list.
+ */
+ empty(): JQueryCallback;
+
+ /**
+ * Call all of the callbacks with the given arguments
+ *
+ * @param arguments The argument or list of arguments to pass back to the callback list.
+ */
+ fire(...arguments: any[]): JQueryCallback;
+
+ /**
+ * Determine if the callbacks have already been called at least once.
+ */
+ fired(): boolean;
+
+ /**
+ * Call all callbacks in a list with the given context and arguments.
+ *
+ * @param context A reference to the context in which the callbacks in the list should be fired.
+ * @param arguments An argument, or array of arguments, to pass to the callbacks in the list.
+ */
+ fireWith(context?: any, args?: any[]): JQueryCallback;
+
+ /**
+ * Determine whether a supplied callback is in a list
+ *
+ * @param callback The callback to search for.
+ */
+ has(callback: Function): boolean;
+
+ /**
+ * Lock a callback list in its current state.
+ */
+ lock(): JQueryCallback;
+
+ /**
+ * Determine if the callbacks list has been locked.
+ */
+ locked(): boolean;
+
+ /**
+ * Remove a callback or a collection of callbacks from a callback list.
+ *
+ * @param callbacks A function, or array of functions, that are to be removed from the callback list.
+ */
+ remove(callbacks: Function): JQueryCallback;
+ /**
+ * Remove a callback or a collection of callbacks from a callback list.
+ *
+ * @param callbacks A function, or array of functions, that are to be removed from the callback list.
+ */
+ remove(callbacks: Function[]): JQueryCallback;
+}
+
+/**
+ * Allows jQuery Promises to interop with non-jQuery promises
+ */
+interface JQueryGenericPromise<T> {
+ /**
+ * Add handlers to be called when the Deferred object is resolved, rejected, or still in progress.
+ *
+ * @param doneFilter A function that is called when the Deferred is resolved.
+ * @param failFilter An optional function that is called when the Deferred is rejected.
+ */
+ then<U>(doneFilter: (value?: T, ...values: any[]) => U|JQueryPromise<U>, failFilter?: (...reasons: any[]) => any, progressFilter?: (...progression: any[]) => any): JQueryPromise<U>;
+
+ /**
+ * Add handlers to be called when the Deferred object is resolved, rejected, or still in progress.
+ *
+ * @param doneFilter A function that is called when the Deferred is resolved.
+ * @param failFilter An optional function that is called when the Deferred is rejected.
+ */
+ then(doneFilter: (value?: T, ...values: any[]) => void, failFilter?: (...reasons: any[]) => any, progressFilter?: (...progression: any[]) => any): JQueryPromise<void>;
+}
+
+/**
+ * Interface for the JQuery promise/deferred callbacks
+ */
+interface JQueryPromiseCallback<T> {
+ (value?: T, ...args: any[]): void;
+}
+
+interface JQueryPromiseOperator<T, U> {
+ (callback1: JQueryPromiseCallback<T>|JQueryPromiseCallback<T>[], ...callbacksN: Array<JQueryPromiseCallback<any>|JQueryPromiseCallback<any>[]>): JQueryPromise<U>;
+}
+
+/**
+ * Interface for the JQuery promise, part of callbacks
+ */
+interface JQueryPromise<T> extends JQueryGenericPromise<T> {
+ /**
+ * Determine the current state of a Deferred object.
+ */
+ state(): string;
+ /**
+ * Add handlers to be called when the Deferred object is either resolved or rejected.
+ *
+ * @param alwaysCallbacks1 A function, or array of functions, that is called when the Deferred is resolved or rejected.
+ * @param alwaysCallbacks2 Optional additional functions, or arrays of functions, that are called when the Deferred is resolved or rejected.
+ */
+ always(alwaysCallback1?: JQueryPromiseCallback<any>|JQueryPromiseCallback<any>[], ...alwaysCallbacksN: Array<JQueryPromiseCallback<any>|JQueryPromiseCallback<any>[]>): JQueryPromise<T>;
+ /**
+ * Add handlers to be called when the Deferred object is resolved.
+ *
+ * @param doneCallbacks1 A function, or array of functions, that are called when the Deferred is resolved.
+ * @param doneCallbacks2 Optional additional functions, or arrays of functions, that are called when the Deferred is resolved.
+ */
+ done(doneCallback1?: JQueryPromiseCallback<T>|JQueryPromiseCallback<T>[], ...doneCallbackN: Array<JQueryPromiseCallback<T>|JQueryPromiseCallback<T>[]>): JQueryPromise<T>;
+ /**
+ * Add handlers to be called when the Deferred object is rejected.
+ *
+ * @param failCallbacks1 A function, or array of functions, that are called when the Deferred is rejected.
+ * @param failCallbacks2 Optional additional functions, or arrays of functions, that are called when the Deferred is rejected.
+ */
+ fail(failCallback1?: JQueryPromiseCallback<any>|JQueryPromiseCallback<any>[], ...failCallbacksN: Array<JQueryPromiseCallback<any>|JQueryPromiseCallback<any>[]>): JQueryPromise<T>;
+ /**
+ * Add handlers to be called when the Deferred object generates progress notifications.
+ *
+ * @param progressCallbacks A function, or array of functions, to be called when the Deferred generates progress notifications.
+ */
+ progress(progressCallback1?: JQueryPromiseCallback<any>|JQueryPromiseCallback<any>[], ...progressCallbackN: Array<JQueryPromiseCallback<any>|JQueryPromiseCallback<any>[]>): JQueryPromise<T>;
+
+ // Deprecated - given no typings
+ pipe(doneFilter?: (x: any) => any, failFilter?: (x: any) => any, progressFilter?: (x: any) => any): JQueryPromise<any>;
+}
+
+/**
+ * Interface for the JQuery deferred, part of callbacks
+ */
+interface JQueryDeferred<T> extends JQueryGenericPromise<T> {
+ /**
+ * Determine the current state of a Deferred object.
+ */
+ state(): string;
+ /**
+ * Add handlers to be called when the Deferred object is either resolved or rejected.
+ *
+ * @param alwaysCallbacks1 A function, or array of functions, that is called when the Deferred is resolved or rejected.
+ * @param alwaysCallbacks2 Optional additional functions, or arrays of functions, that are called when the Deferred is resolved or rejected.
+ */
+ always(alwaysCallback1?: JQueryPromiseCallback<any>|JQueryPromiseCallback<any>[], ...alwaysCallbacksN: Array<JQueryPromiseCallback<any>|JQueryPromiseCallback<any>[]>): JQueryDeferred<T>;
+ /**
+ * Add handlers to be called when the Deferred object is resolved.
+ *
+ * @param doneCallbacks1 A function, or array of functions, that are called when the Deferred is resolved.
+ * @param doneCallbacks2 Optional additional functions, or arrays of functions, that are called when the Deferred is resolved.
+ */
+ done(doneCallback1?: JQueryPromiseCallback<T>|JQueryPromiseCallback<T>[], ...doneCallbackN: Array<JQueryPromiseCallback<T>|JQueryPromiseCallback<T>[]>): JQueryDeferred<T>;
+ /**
+ * Add handlers to be called when the Deferred object is rejected.
+ *
+ * @param failCallbacks1 A function, or array of functions, that are called when the Deferred is rejected.
+ * @param failCallbacks2 Optional additional functions, or arrays of functions, that are called when the Deferred is rejected.
+ */
+ fail(failCallback1?: JQueryPromiseCallback<any>|JQueryPromiseCallback<any>[], ...failCallbacksN: Array<JQueryPromiseCallback<any>|JQueryPromiseCallback<any>[]>): JQueryDeferred<T>;
+ /**
+ * Add handlers to be called when the Deferred object generates progress notifications.
+ *
+ * @param progressCallbacks A function, or array of functions, to be called when the Deferred generates progress notifications.
+ */
+ progress(progressCallback1?: JQueryPromiseCallback<any>|JQueryPromiseCallback<any>[], ...progressCallbackN: Array<JQueryPromiseCallback<any>|JQueryPromiseCallback<any>[]>): JQueryDeferred<T>;
+
+ /**
+ * Call the progressCallbacks on a Deferred object with the given args.
+ *
+ * @param args Optional arguments that are passed to the progressCallbacks.
+ */
+ notify(value?: any, ...args: any[]): JQueryDeferred<T>;
+
+ /**
+ * Call the progressCallbacks on a Deferred object with the given context and args.
+ *
+ * @param context Context passed to the progressCallbacks as the this object.
+ * @param args Optional arguments that are passed to the progressCallbacks.
+ */
+ notifyWith(context: any, value?: any[]): JQueryDeferred<T>;
+
+ /**
+ * Reject a Deferred object and call any failCallbacks with the given args.
+ *
+ * @param args Optional arguments that are passed to the failCallbacks.
+ */
+ reject(value?: any, ...args: any[]): JQueryDeferred<T>;
+ /**
+ * Reject a Deferred object and call any failCallbacks with the given context and args.
+ *
+ * @param context Context passed to the failCallbacks as the this object.
+ * @param args An optional array of arguments that are passed to the failCallbacks.
+ */
+ rejectWith(context: any, value?: any[]): JQueryDeferred<T>;
+
+ /**
+ * Resolve a Deferred object and call any doneCallbacks with the given args.
+ *
+ * @param value First argument passed to doneCallbacks.
+ * @param args Optional subsequent arguments that are passed to the doneCallbacks.
+ */
+ resolve(value?: T, ...args: any[]): JQueryDeferred<T>;
+
+ /**
+ * Resolve a Deferred object and call any doneCallbacks with the given context and args.
+ *
+ * @param context Context passed to the doneCallbacks as the this object.
+ * @param args An optional array of arguments that are passed to the doneCallbacks.
+ */
+ resolveWith(context: any, value?: T[]): JQueryDeferred<T>;
+
+ /**
+ * Return a Deferred's Promise object.
+ *
+ * @param target Object onto which the promise methods have to be attached
+ */
+ promise(target?: any): JQueryPromise<T>;
+
+ // Deprecated - given no typings
+ pipe(doneFilter?: (x: any) => any, failFilter?: (x: any) => any, progressFilter?: (x: any) => any): JQueryPromise<any>;
+}
+
+/**
+ * Interface of the JQuery extension of the W3C event object
+ */
+interface BaseJQueryEventObject extends Event {
+ data: any;
+ delegateTarget: Element;
+ isDefaultPrevented(): boolean;
+ isImmediatePropagationStopped(): boolean;
+ isPropagationStopped(): boolean;
+ namespace: string;
+ originalEvent: Event;
+ preventDefault(): any;
+ relatedTarget: Element;
+ result: any;
+ stopImmediatePropagation(): void;
+ stopPropagation(): void;
+ target: Element;
+ pageX: number;
+ pageY: number;
+ which: number;
+ metaKey: boolean;
+}
+
+interface JQueryInputEventObject extends BaseJQueryEventObject {
+ altKey: boolean;
+ ctrlKey: boolean;
+ metaKey: boolean;
+ shiftKey: boolean;
+}
+
+interface JQueryMouseEventObject extends JQueryInputEventObject {
+ button: number;
+ clientX: number;
+ clientY: number;
+ offsetX: number;
+ offsetY: number;
+ pageX: number;
+ pageY: number;
+ screenX: number;
+ screenY: number;
+}
+
+interface JQueryKeyEventObject extends JQueryInputEventObject {
+ char: any;
+ charCode: number;
+ key: any;
+ keyCode: number;
+}
+
+interface JQueryEventObject extends BaseJQueryEventObject, JQueryInputEventObject, JQueryMouseEventObject, JQueryKeyEventObject{
+}
+
+/*
+ Collection of properties of the current browser
+*/
+
+interface JQuerySupport {
+ ajax?: boolean;
+ boxModel?: boolean;
+ changeBubbles?: boolean;
+ checkClone?: boolean;
+ checkOn?: boolean;
+ cors?: boolean;
+ cssFloat?: boolean;
+ hrefNormalized?: boolean;
+ htmlSerialize?: boolean;
+ leadingWhitespace?: boolean;
+ noCloneChecked?: boolean;
+ noCloneEvent?: boolean;
+ opacity?: boolean;
+ optDisabled?: boolean;
+ optSelected?: boolean;
+ scriptEval? (): boolean;
+ style?: boolean;
+ submitBubbles?: boolean;
+ tbody?: boolean;
+}
+
+interface JQueryParam {
+ /**
+ * Create a serialized representation of an array or object, suitable for use in a URL query string or Ajax request.
+ *
+ * @param obj An array or object to serialize.
+ */
+ (obj: any): string;
+
+ /**
+ * Create a serialized representation of an array or object, suitable for use in a URL query string or Ajax request.
+ *
+ * @param obj An array or object to serialize.
+ * @param traditional A Boolean indicating whether to perform a traditional "shallow" serialization.
+ */
+ (obj: any, traditional: boolean): string;
+}
+
+/**
+ * The interface used to construct jQuery events (with $.Event). It is
+ * defined separately instead of inline in JQueryStatic to allow
+ * overriding the construction function with specific strings
+ * returning specific event objects.
+ */
+interface JQueryEventConstructor {
+ (name: string, eventProperties?: any): JQueryEventObject;
+ new (name: string, eventProperties?: any): JQueryEventObject;
+}
+
+/**
+ * The interface used to specify coordinates.
+ */
+interface JQueryCoordinates {
+ left: number;
+ top: number;
+}
+
+/**
+ * Elements in the array returned by serializeArray()
+ */
+interface JQuerySerializeArrayElement {
+ name: string;
+ value: string;
+}
+
+interface JQueryAnimationOptions {
+ /**
+ * A string or number determining how long the animation will run.
+ */
+ duration?: any;
+ /**
+ * A string indicating which easing function to use for the transition.
+ */
+ easing?: string;
+ /**
+ * A function to call once the animation is complete.
+ */
+ complete?: Function;
+ /**
+ * A function to be called for each animated property of each animated element. This function provides an opportunity to modify the Tween object to change the value of the property before it is set.
+ */
+ step?: (now: number, tween: any) => any;
+ /**
+ * A function to be called after each step of the animation, only once per animated element regardless of the number of animated properties. (version added: 1.8)
+ */
+ progress?: (animation: JQueryPromise<any>, progress: number, remainingMs: number) => any;
+ /**
+ * A function to call when the animation begins. (version added: 1.8)
+ */
+ start?: (animation: JQueryPromise<any>) => any;
+ /**
+ * A function to be called when the animation completes (its Promise object is resolved). (version added: 1.8)
+ */
+ done?: (animation: JQueryPromise<any>, jumpedToEnd: boolean) => any;
+ /**
+ * A function to be called when the animation fails to complete (its Promise object is rejected). (version added: 1.8)
+ */
+ fail?: (animation: JQueryPromise<any>, jumpedToEnd: boolean) => any;
+ /**
+ * A function to be called when the animation completes or stops without completing (its Promise object is either resolved or rejected). (version added: 1.8)
+ */
+ always?: (animation: JQueryPromise<any>, jumpedToEnd: boolean) => any;
+ /**
+ * A Boolean indicating whether to place the animation in the effects queue. If false, the animation will begin immediately. As of jQuery 1.7, the queue option can also accept a string, in which case the animation is added to the queue represented by that string. When a custom queue name is used the animation does not automatically start; you must call .dequeue("queuename") to start it.
+ */
+ queue?: any;
+ /**
+ * A map of one or more of the CSS properties defined by the properties argument and their corresponding easing functions. (version added: 1.4)
+ */
+ specialEasing?: Object;
+}
+
+/**
+ * Static members of jQuery (those on $ and jQuery themselves)
+ */
+interface JQueryStatic {
+
+ /**
+ * Perform an asynchronous HTTP (Ajax) request.
+ *
+ * @param settings A set of key/value pairs that configure the Ajax request. All settings are optional. A default can be set for any option with $.ajaxSetup().
+ */
+ ajax(settings: JQueryAjaxSettings): JQueryXHR;
+ /**
+ * Perform an asynchronous HTTP (Ajax) request.
+ *
+ * @param url A string containing the URL to which the request is sent.
+ * @param settings A set of key/value pairs that configure the Ajax request. All settings are optional. A default can be set for any option with $.ajaxSetup().
+ */
+ ajax(url: string, settings?: JQueryAjaxSettings): JQueryXHR;
+
+ /**
+ * Handle custom Ajax options or modify existing options before each request is sent and before they are processed by $.ajax().
+ *
+ * @param dataTypes An optional string containing one or more space-separated dataTypes
+ * @param handler A handler to set default values for future Ajax requests.
+ */
+ ajaxPrefilter(dataTypes: string, handler: (opts: any, originalOpts: JQueryAjaxSettings, jqXHR: JQueryXHR) => any): void;
+ /**
+ * Handle custom Ajax options or modify existing options before each request is sent and before they are processed by $.ajax().
+ *
+ * @param handler A handler to set default values for future Ajax requests.
+ */
+ ajaxPrefilter(handler: (opts: any, originalOpts: JQueryAjaxSettings, jqXHR: JQueryXHR) => any): void;
+
+ ajaxSettings: JQueryAjaxSettings;
+
+ /**
+ * Set default values for future Ajax requests. Its use is not recommended.
+ *
+ * @param options A set of key/value pairs that configure the default Ajax request. All options are optional.
+ */
+ ajaxSetup(options: JQueryAjaxSettings): void;
+
+ /**
+ * Load data from the server using a HTTP GET request.
+ *
+ * @param url A string containing the URL to which the request is sent.
+ * @param success A callback function that is executed if the request succeeds.
+ * @param dataType The type of data expected from the server. Default: Intelligent Guess (xml, json, script, or html).
+ */
+ get(url: string, success?: (data: any, textStatus: string, jqXHR: JQueryXHR) => any, dataType?: string): JQueryXHR;
+ /**
+ * Load data from the server using a HTTP GET request.
+ *
+ * @param url A string containing the URL to which the request is sent.
+ * @param data A plain object or string that is sent to the server with the request.
+ * @param success A callback function that is executed if the request succeeds.
+ * @param dataType The type of data expected from the server. Default: Intelligent Guess (xml, json, script, or html).
+ */
+ get(url: string, data?: Object|string, success?: (data: any, textStatus: string, jqXHR: JQueryXHR) => any, dataType?: string): JQueryXHR;
+ /**
+ * Load JSON-encoded data from the server using a GET HTTP request.
+ *
+ * @param url A string containing the URL to which the request is sent.
+ * @param success A callback function that is executed if the request succeeds.
+ */
+ getJSON(url: string, success?: (data: any, textStatus: string, jqXHR: JQueryXHR) => any): JQueryXHR;
+ /**
+ * Load JSON-encoded data from the server using a GET HTTP request.
+ *
+ * @param url A string containing the URL to which the request is sent.
+ * @param data A plain object or string that is sent to the server with the request.
+ * @param success A callback function that is executed if the request succeeds.
+ */
+ getJSON(url: string, data?: Object|string, success?: (data: any, textStatus: string, jqXHR: JQueryXHR) => any): JQueryXHR;
+ /**
+ * Load a JavaScript file from the server using a GET HTTP request, then execute it.
+ *
+ * @param url A string containing the URL to which the request is sent.
+ * @param success A callback function that is executed if the request succeeds.
+ */
+ getScript(url: string, success?: (script: string, textStatus: string, jqXHR: JQueryXHR) => any): JQueryXHR;
+
+ /**
+ * Create a serialized representation of an array or object, suitable for use in a URL query string or Ajax request.
+ */
+ param: JQueryParam;
+
+ /**
+ * Load data from the server using a HTTP POST request.
+ *
+ * @param url A string containing the URL to which the request is sent.
+ * @param success A callback function that is executed if the request succeeds. Required if dataType is provided, but can be null in that case.
+ * @param dataType The type of data expected from the server. Default: Intelligent Guess (xml, json, script, text, html).
+ */
+ post(url: string, success?: (data: any, textStatus: string, jqXHR: JQueryXHR) => any, dataType?: string): JQueryXHR;
+ /**
+ * Load data from the server using a HTTP POST request.
+ *
+ * @param url A string containing the URL to which the request is sent.
+ * @param data A plain object or string that is sent to the server with the request.
+ * @param success A callback function that is executed if the request succeeds. Required if dataType is provided, but can be null in that case.
+ * @param dataType The type of data expected from the server. Default: Intelligent Guess (xml, json, script, text, html).
+ */
+ post(url: string, data?: Object|string, success?: (data: any, textStatus: string, jqXHR: JQueryXHR) => any, dataType?: string): JQueryXHR;
+
+ /**
+ * A multi-purpose callbacks list object that provides a powerful way to manage callback lists.
+ *
+ * @param flags An optional list of space-separated flags that change how the callback list behaves.
+ */
+ Callbacks(flags?: string): JQueryCallback;
+
+ /**
+ * Holds or releases the execution of jQuery's ready event.
+ *
+ * @param hold Indicates whether the ready hold is being requested or released
+ */
+ holdReady(hold: boolean): void;
+
+ /**
+ * Accepts a string containing a CSS selector which is then used to match a set of elements.
+ *
+ * @param selector A string containing a selector expression
+ * @param context A DOM Element, Document, or jQuery to use as context
+ */
+ (selector: string, context?: Element|JQuery): JQuery;
+
+ /**
+ * Accepts a string containing a CSS selector which is then used to match a set of elements.
+ *
+ * @param element A DOM element to wrap in a jQuery object.
+ */
+ (element: Element): JQuery;
+
+ /**
+ * Accepts a string containing a CSS selector which is then used to match a set of elements.
+ *
+ * @param elementArray An array containing a set of DOM elements to wrap in a jQuery object.
+ */
+ (elementArray: Element[]): JQuery;
+
+ /**
+ * Binds a function to be executed when the DOM has finished loading.
+ *
+ * @param callback A function to execute after the DOM is ready.
+ */
+ (callback: (jQueryAlias?: JQueryStatic) => any): JQuery;
+
+ /**
+ * Accepts a string containing a CSS selector which is then used to match a set of elements.
+ *
+ * @param object A plain object to wrap in a jQuery object.
+ */
+ (object: {}): JQuery;
+
+ /**
+ * Accepts a string containing a CSS selector which is then used to match a set of elements.
+ *
+ * @param object An existing jQuery object to clone.
+ */
+ (object: JQuery): JQuery;
+
+ /**
+ * Specify a function to execute when the DOM is fully loaded.
+ */
+ (): JQuery;
+
+ /**
+ * Creates DOM elements on the fly from the provided string of raw HTML.
+ *
+ * @param html A string of HTML to create on the fly. Note that this parses HTML, not XML.
+ * @param ownerDocument A document in which the new elements will be created.
+ */
+ (html: string, ownerDocument?: Document): JQuery;
+
+ /**
+ * Creates DOM elements on the fly from the provided string of raw HTML.
+ *
+ * @param html A string defining a single, standalone, HTML element (e.g. <div/> or <div></div>).
+ * @param attributes An object of attributes, events, and methods to call on the newly-created element.
+ */
+ (html: string, attributes: Object): JQuery;
+
+ /**
+ * Relinquish jQuery's control of the $ variable.
+ *
+ * @param removeAll A Boolean indicating whether to remove all jQuery variables from the global scope (including jQuery itself).
+ */
+ noConflict(removeAll?: boolean): Object;
+
+ /**
+ * Provides a way to execute callback functions based on one or more objects, usually Deferred objects that represent asynchronous events.
+ *
+ * @param deferreds One or more Deferred objects, or plain JavaScript objects.
+ */
+ when<T>(...deferreds: Array<T|JQueryPromise<T>/* as JQueryDeferred<T> */>): JQueryPromise<T>;
+
+ /**
+ * Hook directly into jQuery to override how particular CSS properties are retrieved or set, normalize CSS property naming, or create custom properties.
+ */
+ cssHooks: { [key: string]: any; };
+ cssNumber: any;
+
+ /**
+ * Store arbitrary data associated with the specified element. Returns the value that was set.
+ *
+ * @param element The DOM element to associate with the data.
+ * @param key A string naming the piece of data to set.
+ * @param value The new data value.
+ */
+ data<T>(element: Element, key: string, value: T): T;
+ /**
+ * Returns value at named data store for the element, as set by jQuery.data(element, name, value), or the full data store for the element.
+ *
+ * @param element The DOM element to associate with the data.
+ * @param key A string naming the piece of data to set.
+ */
+ data(element: Element, key: string): any;
+ /**
+ * Returns value at named data store for the element, as set by jQuery.data(element, name, value), or the full data store for the element.
+ *
+ * @param element The DOM element to associate with the data.
+ */
+ data(element: Element): any;
+
+ /**
+ * Execute the next function on the queue for the matched element.
+ *
+ * @param element A DOM element from which to remove and execute a queued function.
+ * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue.
+ */
+ dequeue(element: Element, queueName?: string): void;
+
+ /**
+ * Determine whether an element has any jQuery data associated with it.
+ *
+ * @param element A DOM element to be checked for data.
+ */
+ hasData(element: Element): boolean;
+
+ /**
+ * Show the queue of functions to be executed on the matched element.
+ *
+ * @param element A DOM element to inspect for an attached queue.
+ * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue.
+ */
+ queue(element: Element, queueName?: string): any[];
+ /**
+ * Manipulate the queue of functions to be executed on the matched element.
+ *
+ * @param element A DOM element where the array of queued functions is attached.
+ * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue.
+ * @param newQueue An array of functions to replace the current queue contents.
+ */
+ queue(element: Element, queueName: string, newQueue: Function[]): JQuery;
+ /**
+ * Manipulate the queue of functions to be executed on the matched element.
+ *
+ * @param element A DOM element on which to add a queued function.
+ * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue.
+ * @param callback The new function to add to the queue.
+ */
+ queue(element: Element, queueName: string, callback: Function): JQuery;
+
+ /**
+ * Remove a previously-stored piece of data.
+ *
+ * @param element A DOM element from which to remove data.
+ * @param name A string naming the piece of data to remove.
+ */
+ removeData(element: Element, name?: string): JQuery;
+
+ /**
+ * A constructor function that returns a chainable utility object with methods to register multiple callbacks into callback queues, invoke callback queues, and relay the success or failure state of any synchronous or asynchronous function.
+ *
+ * @param beforeStart A function that is called just before the constructor returns.
+ */
+ Deferred<T>(beforeStart?: (deferred: JQueryDeferred<T>) => any): JQueryDeferred<T>;
+
+ /**
+ * Effects
+ */
+ fx: {
+ tick: () => void;
+ /**
+ * The rate (in milliseconds) at which animations fire.
+ */
+ interval: number;
+ stop: () => void;
+ speeds: { slow: number; fast: number; };
+ /**
+ * Globally disable all animations.
+ */
+ off: boolean;
+ step: any;
+ };
+
+ /**
+ * Takes a function and returns a new one that will always have a particular context.
+ *
+ * @param fnction The function whose context will be changed.
+ * @param context The object to which the context (this) of the function should be set.
+ * @param additionalArguments Any number of arguments to be passed to the function referenced in the function argument.
+ */
+ proxy(fnction: (...args: any[]) => any, context: Object, ...additionalArguments: any[]): any;
+ /**
+ * Takes a function and returns a new one that will always have a particular context.
+ *
+ * @param context The object to which the context (this) of the function should be set.
+ * @param name The name of the function whose context will be changed (should be a property of the context object).
+ * @param additionalArguments Any number of arguments to be passed to the function named in the name argument.
+ */
+ proxy(context: Object, name: string, ...additionalArguments: any[]): any;
+
+ Event: JQueryEventConstructor;
+
+ /**
+ * Takes a string and throws an exception containing it.
+ *
+ * @param message The message to send out.
+ */
+ error(message: any): JQuery;
+
+ expr: any;
+ fn: any; //TODO: Decide how we want to type this
+
+ isReady: boolean;
+
+ // Properties
+ support: JQuerySupport;
+
+ /**
+ * Check to see if a DOM element is a descendant of another DOM element.
+ *
+ * @param container The DOM element that may contain the other element.
+ * @param contained The DOM element that may be contained by (a descendant of) the other element.
+ */
+ contains(container: Element, contained: Element): boolean;
+
+ /**
+ * A generic iterator function, which can be used to seamlessly iterate over both objects and arrays. Arrays and array-like objects with a length property (such as a function's arguments object) are iterated by numeric index, from 0 to length-1. Other objects are iterated via their named properties.
+ *
+ * @param collection The object or array to iterate over.
+ * @param callback The function that will be executed on every object.
+ */
+ each<T>(
+ collection: T[],
+ callback: (indexInArray: number, valueOfElement: T) => any
+ ): any;
+
+ /**
+ * A generic iterator function, which can be used to seamlessly iterate over both objects and arrays. Arrays and array-like objects with a length property (such as a function's arguments object) are iterated by numeric index, from 0 to length-1. Other objects are iterated via their named properties.
+ *
+ * @param collection The object or array to iterate over.
+ * @param callback The function that will be executed on every object.
+ */
+ each(
+ collection: any,
+ callback: (indexInArray: any, valueOfElement: any) => any
+ ): any;
+
+ /**
+ * Merge the contents of two or more objects together into the first object.
+ *
+ * @param target An object that will receive the new properties if additional objects are passed in or that will extend the jQuery namespace if it is the sole argument.
+ * @param object1 An object containing additional properties to merge in.
+ * @param objectN Additional objects containing properties to merge in.
+ */
+ extend(target: any, object1?: any, ...objectN: any[]): any;
+ /**
+ * Merge the contents of two or more objects together into the first object.
+ *
+ * @param deep If true, the merge becomes recursive (aka. deep copy).
+ * @param target The object to extend. It will receive the new properties.
+ * @param object1 An object containing additional properties to merge in.
+ * @param objectN Additional objects containing properties to merge in.
+ */
+ extend(deep: boolean, target: any, object1?: any, ...objectN: any[]): any;
+
+ /**
+ * Execute some JavaScript code globally.
+ *
+ * @param code The JavaScript code to execute.
+ */
+ globalEval(code: string): any;
+
+ /**
+ * Finds the elements of an array which satisfy a filter function. The original array is not affected.
+ *
+ * @param array The array to search through.
+ * @param func The function to process each item against. The first argument to the function is the item, and the second argument is the index. The function should return a Boolean value. this will be the global window object.
+ * @param invert If "invert" is false, or not provided, then the function returns an array consisting of all elements for which "callback" returns true. If "invert" is true, then the function returns an array consisting of all elements for which "callback" returns false.
+ */
+ grep<T>(array: T[], func: (elementOfArray: T, indexInArray: number) => boolean, invert?: boolean): T[];
+
+ /**
+ * Search for a specified value within an array and return its index (or -1 if not found).
+ *
+ * @param value The value to search for.
+ * @param array An array through which to search.
+ * @param fromIndex he index of the array at which to begin the search. The default is 0, which will search the whole array.
+ */
+ inArray<T>(value: T, array: T[], fromIndex?: number): number;
+
+ /**
+ * Determine whether the argument is an array.
+ *
+ * @param obj Object to test whether or not it is an array.
+ */
+ isArray(obj: any): boolean;
+ /**
+ * Check to see if an object is empty (contains no enumerable properties).
+ *
+ * @param obj The object that will be checked to see if it's empty.
+ */
+ isEmptyObject(obj: any): boolean;
+ /**
+ * Determine if the argument passed is a Javascript function object.
+ *
+ * @param obj Object to test whether or not it is a function.
+ */
+ isFunction(obj: any): boolean;
+ /**
+ * Determines whether its argument is a number.
+ *
+ * @param obj The value to be tested.
+ */
+ isNumeric(value: any): boolean;
+ /**
+ * Check to see if an object is a plain object (created using "{}" or "new Object").
+ *
+ * @param obj The object that will be checked to see if it's a plain object.
+ */
+ isPlainObject(obj: any): boolean;
+ /**
+ * Determine whether the argument is a window.
+ *
+ * @param obj Object to test whether or not it is a window.
+ */
+ isWindow(obj: any): boolean;
+ /**
+ * Check to see if a DOM node is within an XML document (or is an XML document).
+ *
+ * @param node he DOM node that will be checked to see if it's in an XML document.
+ */
+ isXMLDoc(node: Node): boolean;
+
+ /**
+ * Convert an array-like object into a true JavaScript array.
+ *
+ * @param obj Any object to turn into a native Array.
+ */
+ makeArray(obj: any): any[];
+
+ /**
+ * Translate all items in an array or object to new array of items.
+ *
+ * @param array The Array to translate.
+ * @param callback The function to process each item against. The first argument to the function is the array item, the second argument is the index in array The function can return any value. Within the function, this refers to the global (window) object.
+ */
+ map<T, U>(array: T[], callback: (elementOfArray: T, indexInArray: number) => U): U[];
+ /**
+ * Translate all items in an array or object to new array of items.
+ *
+ * @param arrayOrObject The Array or Object to translate.
+ * @param callback The function to process each item against. The first argument to the function is the value; the second argument is the index or key of the array or object property. The function can return any value to add to the array. A returned array will be flattened into the resulting array. Within the function, this refers to the global (window) object.
+ */
+ map(arrayOrObject: any, callback: (value: any, indexOrKey: any) => any): any;
+
+ /**
+ * Merge the contents of two arrays together into the first array.
+ *
+ * @param first The first array to merge, the elements of second added.
+ * @param second The second array to merge into the first, unaltered.
+ */
+ merge<T>(first: T[], second: T[]): T[];
+
+ /**
+ * An empty function.
+ */
+ noop(): any;
+
+ /**
+ * Return a number representing the current time.
+ */
+ now(): number;
+
+ /**
+ * Takes a well-formed JSON string and returns the resulting JavaScript object.
+ *
+ * @param json The JSON string to parse.
+ */
+ parseJSON(json: string): any;
+
+ /**
+ * Parses a string into an XML document.
+ *
+ * @param data a well-formed XML string to be parsed
+ */
+ parseXML(data: string): XMLDocument;
+
+ /**
+ * Remove the whitespace from the beginning and end of a string.
+ *
+ * @param str Remove the whitespace from the beginning and end of a string.
+ */
+ trim(str: string): string;
+
+ /**
+ * Determine the internal JavaScript [[Class]] of an object.
+ *
+ * @param obj Object to get the internal JavaScript [[Class]] of.
+ */
+ type(obj: any): string;
+
+ /**
+ * Sorts an array of DOM elements, in place, with the duplicates removed. Note that this only works on arrays of DOM elements, not strings or numbers.
+ *
+ * @param array The Array of DOM elements.
+ */
+ unique(array: Element[]): Element[];
+
+ /**
+ * Parses a string into an array of DOM nodes.
+ *
+ * @param data HTML string to be parsed
+ * @param context DOM element to serve as the context in which the HTML fragment will be created
+ * @param keepScripts A Boolean indicating whether to include scripts passed in the HTML string
+ */
+ parseHTML(data: string, context?: HTMLElement, keepScripts?: boolean): any[];
+
+ /**
+ * Parses a string into an array of DOM nodes.
+ *
+ * @param data HTML string to be parsed
+ * @param context DOM element to serve as the context in which the HTML fragment will be created
+ * @param keepScripts A Boolean indicating whether to include scripts passed in the HTML string
+ */
+ parseHTML(data: string, context?: Document, keepScripts?: boolean): any[];
+}
+
+/**
+ * The jQuery instance members
+ */
+interface JQuery {
+ /**
+ * Register a handler to be called when Ajax requests complete. This is an AjaxEvent.
+ *
+ * @param handler The function to be invoked.
+ */
+ ajaxComplete(handler: (event: JQueryEventObject, XMLHttpRequest: XMLHttpRequest, ajaxOptions: any) => any): JQuery;
+ /**
+ * Register a handler to be called when Ajax requests complete with an error. This is an Ajax Event.
+ *
+ * @param handler The function to be invoked.
+ */
+ ajaxError(handler: (event: JQueryEventObject, jqXHR: JQueryXHR, ajaxSettings: JQueryAjaxSettings, thrownError: any) => any): JQuery;
+ /**
+ * Attach a function to be executed before an Ajax request is sent. This is an Ajax Event.
+ *
+ * @param handler The function to be invoked.
+ */
+ ajaxSend(handler: (event: JQueryEventObject, jqXHR: JQueryXHR, ajaxOptions: JQueryAjaxSettings) => any): JQuery;
+ /**
+ * Register a handler to be called when the first Ajax request begins. This is an Ajax Event.
+ *
+ * @param handler The function to be invoked.
+ */
+ ajaxStart(handler: () => any): JQuery;
+ /**
+ * Register a handler to be called when all Ajax requests have completed. This is an Ajax Event.
+ *
+ * @param handler The function to be invoked.
+ */
+ ajaxStop(handler: () => any): JQuery;
+ /**
+ * Attach a function to be executed whenever an Ajax request completes successfully. This is an Ajax Event.
+ *
+ * @param handler The function to be invoked.
+ */
+ ajaxSuccess(handler: (event: JQueryEventObject, XMLHttpRequest: XMLHttpRequest, ajaxOptions: JQueryAjaxSettings) => any): JQuery;
+
+ /**
+ * Load data from the server and place the returned HTML into the matched element.
+ *
+ * @param url A string containing the URL to which the request is sent.
+ * @param data A plain object or string that is sent to the server with the request.
+ * @param complete A callback function that is executed when the request completes.
+ */
+ load(url: string, data?: string|Object, complete?: (responseText: string, textStatus: string, XMLHttpRequest: XMLHttpRequest) => any): JQuery;
+
+ /**
+ * Encode a set of form elements as a string for submission.
+ */
+ serialize(): string;
+ /**
+ * Encode a set of form elements as an array of names and values.
+ */
+ serializeArray(): JQuerySerializeArrayElement[];
+
+ /**
+ * Adds the specified class(es) to each of the set of matched elements.
+ *
+ * @param className One or more space-separated classes to be added to the class attribute of each matched element.
+ */
+ addClass(className: string): JQuery;
+ /**
+ * Adds the specified class(es) to each of the set of matched elements.
+ *
+ * @param function A function returning one or more space-separated class names to be added to the existing class name(s). Receives the index position of the element in the set and the existing class name(s) as arguments. Within the function, this refers to the current element in the set.
+ */
+ addClass(func: (index: number, className: string) => string): JQuery;
+
+ /**
+ * Add the previous set of elements on the stack to the current set, optionally filtered by a selector.
+ */
+ addBack(selector?: string): JQuery;
+
+ /**
+ * Get the value of an attribute for the first element in the set of matched elements.
+ *
+ * @param attributeName The name of the attribute to get.
+ */
+ attr(attributeName: string): string;
+ /**
+ * Set one or more attributes for the set of matched elements.
+ *
+ * @param attributeName The name of the attribute to set.
+ * @param value A value to set for the attribute.
+ */
+ attr(attributeName: string, value: string|number): JQuery;
+ /**
+ * Set one or more attributes for the set of matched elements.
+ *
+ * @param attributeName The name of the attribute to set.
+ * @param func A function returning the value to set. this is the current element. Receives the index position of the element in the set and the old attribute value as arguments.
+ */
+ attr(attributeName: string, func: (index: number, attr: string) => string|number): JQuery;
+ /**
+ * Set one or more attributes for the set of matched elements.
+ *
+ * @param attributes An object of attribute-value pairs to set.
+ */
+ attr(attributes: Object): JQuery;
+
+ /**
+ * Determine whether any of the matched elements are assigned the given class.
+ *
+ * @param className The class name to search for.
+ */
+ hasClass(className: string): boolean;
+
+ /**
+ * Get the HTML contents of the first element in the set of matched elements.
+ */
+ html(): string;
+ /**
+ * Set the HTML contents of each element in the set of matched elements.
+ *
+ * @param htmlString A string of HTML to set as the content of each matched element.
+ */
+ html(htmlString: string): JQuery;
+ /**
+ * Set the HTML contents of each element in the set of matched elements.
+ *
+ * @param func A function returning the HTML content to set. Receives the index position of the element in the set and the old HTML value as arguments. jQuery empties the element before calling the function; use the oldhtml argument to reference the previous content. Within the function, this refers to the current element in the set.
+ */
+ html(func: (index: number, oldhtml: string) => string): JQuery;
+ /**
+ * Set the HTML contents of each element in the set of matched elements.
+ *
+ * @param func A function returning the HTML content to set. Receives the index position of the element in the set and the old HTML value as arguments. jQuery empties the element before calling the function; use the oldhtml argument to reference the previous content. Within the function, this refers to the current element in the set.
+ */
+
+ /**
+ * Get the value of a property for the first element in the set of matched elements.
+ *
+ * @param propertyName The name of the property to get.
+ */
+ prop(propertyName: string): any;
+ /**
+ * Set one or more properties for the set of matched elements.
+ *
+ * @param propertyName The name of the property to set.
+ * @param value A value to set for the property.
+ */
+ prop(propertyName: string, value: string|number|boolean): JQuery;
+ /**
+ * Set one or more properties for the set of matched elements.
+ *
+ * @param properties An object of property-value pairs to set.
+ */
+ prop(properties: Object): JQuery;
+ /**
+ * Set one or more properties for the set of matched elements.
+ *
+ * @param propertyName The name of the property to set.
+ * @param func A function returning the value to set. Receives the index position of the element in the set and the old property value as arguments. Within the function, the keyword this refers to the current element.
+ */
+ prop(propertyName: string, func: (index: number, oldPropertyValue: any) => any): JQuery;
+
+ /**
+ * Remove an attribute from each element in the set of matched elements.
+ *
+ * @param attributeName An attribute to remove; as of version 1.7, it can be a space-separated list of attributes.
+ */
+ removeAttr(attributeName: string): JQuery;
+
+ /**
+ * Remove a single class, multiple classes, or all classes from each element in the set of matched elements.
+ *
+ * @param className One or more space-separated classes to be removed from the class attribute of each matched element.
+ */
+ removeClass(className?: string): JQuery;
+ /**
+ * Remove a single class, multiple classes, or all classes from each element in the set of matched elements.
+ *
+ * @param function A function returning one or more space-separated class names to be removed. Receives the index position of the element in the set and the old class value as arguments.
+ */
+ removeClass(func: (index: number, className: string) => string): JQuery;
+
+ /**
+ * Remove a property for the set of matched elements.
+ *
+ * @param propertyName The name of the property to remove.
+ */
+ removeProp(propertyName: string): JQuery;
+
+ /**
+ * Add or remove one or more classes from each element in the set of matched elements, depending on either the class's presence or the value of the switch argument.
+ *
+ * @param className One or more class names (separated by spaces) to be toggled for each element in the matched set.
+ * @param swtch A Boolean (not just truthy/falsy) value to determine whether the class should be added or removed.
+ */
+ toggleClass(className: string, swtch?: boolean): JQuery;
+ /**
+ * Add or remove one or more classes from each element in the set of matched elements, depending on either the class's presence or the value of the switch argument.
+ *
+ * @param swtch A boolean value to determine whether the class should be added or removed.
+ */
+ toggleClass(swtch?: boolean): JQuery;
+ /**
+ * Add or remove one or more classes from each element in the set of matched elements, depending on either the class's presence or the value of the switch argument.
+ *
+ * @param func A function that returns class names to be toggled in the class attribute of each element in the matched set. Receives the index position of the element in the set, the old class value, and the switch as arguments.
+ * @param swtch A boolean value to determine whether the class should be added or removed.
+ */
+ toggleClass(func: (index: number, className: string, swtch: boolean) => string, swtch?: boolean): JQuery;
+
+ /**
+ * Get the current value of the first element in the set of matched elements.
+ */
+ val(): any;
+ /**
+ * Set the value of each element in the set of matched elements.
+ *
+ * @param value A string of text or an array of strings corresponding to the value of each matched element to set as selected/checked.
+ */
+ val(value: string|string[]): JQuery;
+ /**
+ * Set the value of each element in the set of matched elements.
+ *
+ * @param func A function returning the value to set. this is the current element. Receives the index position of the element in the set and the old value as arguments.
+ */
+ val(func: (index: number, value: string) => string): JQuery;
+
+
+ /**
+ * Get the value of style properties for the first element in the set of matched elements.
+ *
+ * @param propertyName A CSS property.
+ */
+ css(propertyName: string): string;
+ /**
+ * Set one or more CSS properties for the set of matched elements.
+ *
+ * @param propertyName A CSS property name.
+ * @param value A value to set for the property.
+ */
+ css(propertyName: string, value: string|number): JQuery;
+ /**
+ * Set one or more CSS properties for the set of matched elements.
+ *
+ * @param propertyName A CSS property name.
+ * @param value A function returning the value to set. this is the current element. Receives the index position of the element in the set and the old value as arguments.
+ */
+ css(propertyName: string, value: (index: number, value: string) => string|number): JQuery;
+ /**
+ * Set one or more CSS properties for the set of matched elements.
+ *
+ * @param properties An object of property-value pairs to set.
+ */
+ css(properties: Object): JQuery;
+
+ /**
+ * Get the current computed height for the first element in the set of matched elements.
+ */
+ height(): number;
+ /**
+ * Set the CSS height of every matched element.
+ *
+ * @param value An integer representing the number of pixels, or an integer with an optional unit of measure appended (as a string).
+ */
+ height(value: number|string): JQuery;
+ /**
+ * Set the CSS height of every matched element.
+ *
+ * @param func A function returning the height to set. Receives the index position of the element in the set and the old height as arguments. Within the function, this refers to the current element in the set.
+ */
+ height(func: (index: number, height: number) => number|string): JQuery;
+
+ /**
+ * Get the current computed height for the first element in the set of matched elements, including padding but not border.
+ */
+ innerHeight(): number;
+
+ /**
+ * Sets the inner height on elements in the set of matched elements, including padding but not border.
+ *
+ * @param value An integer representing the number of pixels, or an integer along with an optional unit of measure appended (as a string).
+ */
+ innerHeight(height: number|string): JQuery;
+
+ /**
+ * Get the current computed width for the first element in the set of matched elements, including padding but not border.
+ */
+ innerWidth(): number;
+
+ /**
+ * Sets the inner width on elements in the set of matched elements, including padding but not border.
+ *
+ * @param value An integer representing the number of pixels, or an integer along with an optional unit of measure appended (as a string).
+ */
+ innerWidth(width: number|string): JQuery;
+
+ /**
+ * Get the current coordinates of the first element in the set of matched elements, relative to the document.
+ */
+ offset(): JQueryCoordinates;
+ /**
+ * An object containing the properties top and left, which are integers indicating the new top and left coordinates for the elements.
+ *
+ * @param coordinates An object containing the properties top and left, which are integers indicating the new top and left coordinates for the elements.
+ */
+ offset(coordinates: JQueryCoordinates): JQuery;
+ /**
+ * An object containing the properties top and left, which are integers indicating the new top and left coordinates for the elements.
+ *
+ * @param func A function to return the coordinates to set. Receives the index of the element in the collection as the first argument and the current coordinates as the second argument. The function should return an object with the new top and left properties.
+ */
+ offset(func: (index: number, coords: JQueryCoordinates) => JQueryCoordinates): JQuery;
+
+ /**
+ * Get the current computed height for the first element in the set of matched elements, including padding, border, and optionally margin. Returns an integer (without "px") representation of the value or null if called on an empty set of elements.
+ *
+ * @param includeMargin A Boolean indicating whether to include the element's margin in the calculation.
+ */
+ outerHeight(includeMargin?: boolean): number;
+
+ /**
+ * Sets the outer height on elements in the set of matched elements, including padding and border.
+ *
+ * @param value An integer representing the number of pixels, or an integer along with an optional unit of measure appended (as a string).
+ */
+ outerHeight(height: number|string): JQuery;
+
+ /**
+ * Get the current computed width for the first element in the set of matched elements, including padding and border.
+ *
+ * @param includeMargin A Boolean indicating whether to include the element's margin in the calculation.
+ */
+ outerWidth(includeMargin?: boolean): number;
+
+ /**
+ * Sets the outer width on elements in the set of matched elements, including padding and border.
+ *
+ * @param value An integer representing the number of pixels, or an integer along with an optional unit of measure appended (as a string).
+ */
+ outerWidth(width: number|string): JQuery;
+
+ /**
+ * Get the current coordinates of the first element in the set of matched elements, relative to the offset parent.
+ */
+ position(): JQueryCoordinates;
+
+ /**
+ * Get the current horizontal position of the scroll bar for the first element in the set of matched elements or set the horizontal position of the scroll bar for every matched element.
+ */
+ scrollLeft(): number;
+ /**
+ * Set the current horizontal position of the scroll bar for each of the set of matched elements.
+ *
+ * @param value An integer indicating the new position to set the scroll bar to.
+ */
+ scrollLeft(value: number): JQuery;
+
+ /**
+ * Get the current vertical position of the scroll bar for the first element in the set of matched elements or set the vertical position of the scroll bar for every matched element.
+ */
+ scrollTop(): number;
+ /**
+ * Set the current vertical position of the scroll bar for each of the set of matched elements.
+ *
+ * @param value An integer indicating the new position to set the scroll bar to.
+ */
+ scrollTop(value: number): JQuery;
+
+ /**
+ * Get the current computed width for the first element in the set of matched elements.
+ */
+ width(): number;
+ /**
+ * Set the CSS width of each element in the set of matched elements.
+ *
+ * @param value An integer representing the number of pixels, or an integer along with an optional unit of measure appended (as a string).
+ */
+ width(value: number|string): JQuery;
+ /**
+ * Set the CSS width of each element in the set of matched elements.
+ *
+ * @param func A function returning the width to set. Receives the index position of the element in the set and the old width as arguments. Within the function, this refers to the current element in the set.
+ */
+ width(func: (index: number, width: number) => number|string): JQuery;
+
+ /**
+ * Remove from the queue all items that have not yet been run.
+ *
+ * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue.
+ */
+ clearQueue(queueName?: string): JQuery;
+
+ /**
+ * Store arbitrary data associated with the matched elements.
+ *
+ * @param key A string naming the piece of data to set.
+ * @param value The new data value; it can be any Javascript type including Array or Object.
+ */
+ data(key: string, value: any): JQuery;
+ /**
+ * Return the value at the named data store for the first element in the jQuery collection, as set by data(name, value) or by an HTML5 data-* attribute.
+ *
+ * @param key Name of the data stored.
+ */
+ data(key: string): any;
+ /**
+ * Store arbitrary data associated with the matched elements.
+ *
+ * @param obj An object of key-value pairs of data to update.
+ */
+ data(obj: { [key: string]: any; }): JQuery;
+ /**
+ * Return the value at the named data store for the first element in the jQuery collection, as set by data(name, value) or by an HTML5 data-* attribute.
+ */
+ data(): any;
+
+ /**
+ * Execute the next function on the queue for the matched elements.
+ *
+ * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue.
+ */
+ dequeue(queueName?: string): JQuery;
+
+ /**
+ * Remove a previously-stored piece of data.
+ *
+ * @param name A string naming the piece of data to delete or space-separated string naming the pieces of data to delete.
+ */
+ removeData(name: string): JQuery;
+ /**
+ * Remove a previously-stored piece of data.
+ *
+ * @param list An array of strings naming the pieces of data to delete.
+ */
+ removeData(list: string[]): JQuery;
+ /**
+ * Remove all previously-stored piece of data.
+ */
+ removeData(): JQuery;
+
+ /**
+ * Return a Promise object to observe when all actions of a certain type bound to the collection, queued or not, have finished.
+ *
+ * @param type The type of queue that needs to be observed. (default: fx)
+ * @param target Object onto which the promise methods have to be attached
+ */
+ promise(type?: string, target?: Object): JQueryPromise<any>;
+
+ /**
+ * Perform a custom animation of a set of CSS properties.
+ *
+ * @param properties An object of CSS properties and values that the animation will move toward.
+ * @param duration A string or number determining how long the animation will run.
+ * @param complete A function to call once the animation is complete.
+ */
+ animate(properties: Object, duration?: string|number, complete?: Function): JQuery;
+ /**
+ * Perform a custom animation of a set of CSS properties.
+ *
+ * @param properties An object of CSS properties and values that the animation will move toward.
+ * @param duration A string or number determining how long the animation will run.
+ * @param easing A string indicating which easing function to use for the transition. (default: swing)
+ * @param complete A function to call once the animation is complete.
+ */
+ animate(properties: Object, duration?: string|number, easing?: string, complete?: Function): JQuery;
+ /**
+ * Perform a custom animation of a set of CSS properties.
+ *
+ * @param properties An object of CSS properties and values that the animation will move toward.
+ * @param options A map of additional options to pass to the method.
+ */
+ animate(properties: Object, options: JQueryAnimationOptions): JQuery;
+
+ /**
+ * Set a timer to delay execution of subsequent items in the queue.
+ *
+ * @param duration An integer indicating the number of milliseconds to delay execution of the next item in the queue.
+ * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue.
+ */
+ delay(duration: number, queueName?: string): JQuery;
+
+ /**
+ * Display the matched elements by fading them to opaque.
+ *
+ * @param duration A string or number determining how long the animation will run.
+ * @param complete A function to call once the animation is complete.
+ */
+ fadeIn(duration?: number|string, complete?: Function): JQuery;
+ /**
+ * Display the matched elements by fading them to opaque.
+ *
+ * @param duration A string or number determining how long the animation will run.
+ * @param easing A string indicating which easing function to use for the transition.
+ * @param complete A function to call once the animation is complete.
+ */
+ fadeIn(duration?: number|string, easing?: string, complete?: Function): JQuery;
+ /**
+ * Display the matched elements by fading them to opaque.
+ *
+ * @param options A map of additional options to pass to the method.
+ */
+ fadeIn(options: JQueryAnimationOptions): JQuery;
+
+ /**
+ * Hide the matched elements by fading them to transparent.
+ *
+ * @param duration A string or number determining how long the animation will run.
+ * @param complete A function to call once the animation is complete.
+ */
+ fadeOut(duration?: number|string, complete?: Function): JQuery;
+ /**
+ * Hide the matched elements by fading them to transparent.
+ *
+ * @param duration A string or number determining how long the animation will run.
+ * @param easing A string indicating which easing function to use for the transition.
+ * @param complete A function to call once the animation is complete.
+ */
+ fadeOut(duration?: number|string, easing?: string, complete?: Function): JQuery;
+ /**
+ * Hide the matched elements by fading them to transparent.
+ *
+ * @param options A map of additional options to pass to the method.
+ */
+ fadeOut(options: JQueryAnimationOptions): JQuery;
+
+ /**
+ * Adjust the opacity of the matched elements.
+ *
+ * @param duration A string or number determining how long the animation will run.
+ * @param opacity A number between 0 and 1 denoting the target opacity.
+ * @param complete A function to call once the animation is complete.
+ */
+ fadeTo(duration: string|number, opacity: number, complete?: Function): JQuery;
+ /**
+ * Adjust the opacity of the matched elements.
+ *
+ * @param duration A string or number determining how long the animation will run.
+ * @param opacity A number between 0 and 1 denoting the target opacity.
+ * @param easing A string indicating which easing function to use for the transition.
+ * @param complete A function to call once the animation is complete.
+ */
+ fadeTo(duration: string|number, opacity: number, easing?: string, complete?: Function): JQuery;
+
+ /**
+ * Display or hide the matched elements by animating their opacity.
+ *
+ * @param duration A string or number determining how long the animation will run.
+ * @param complete A function to call once the animation is complete.
+ */
+ fadeToggle(duration?: number|string, complete?: Function): JQuery;
+ /**
+ * Display or hide the matched elements by animating their opacity.
+ *
+ * @param duration A string or number determining how long the animation will run.
+ * @param easing A string indicating which easing function to use for the transition.
+ * @param complete A function to call once the animation is complete.
+ */
+ fadeToggle(duration?: number|string, easing?: string, complete?: Function): JQuery;
+ /**
+ * Display or hide the matched elements by animating their opacity.
+ *
+ * @param options A map of additional options to pass to the method.
+ */
+ fadeToggle(options: JQueryAnimationOptions): JQuery;
+
+ /**
+ * Stop the currently-running animation, remove all queued animations, and complete all animations for the matched elements.
+ *
+ * @param queue The name of the queue in which to stop animations.
+ */
+ finish(queue?: string): JQuery;
+
+ /**
+ * Hide the matched elements.
+ *
+ * @param duration A string or number determining how long the animation will run.
+ * @param complete A function to call once the animation is complete.
+ */
+ hide(duration?: number|string, complete?: Function): JQuery;
+ /**
+ * Hide the matched elements.
+ *
+ * @param duration A string or number determining how long the animation will run.
+ * @param easing A string indicating which easing function to use for the transition.
+ * @param complete A function to call once the animation is complete.
+ */
+ hide(duration?: number|string, easing?: string, complete?: Function): JQuery;
+ /**
+ * Hide the matched elements.
+ *
+ * @param options A map of additional options to pass to the method.
+ */
+ hide(options: JQueryAnimationOptions): JQuery;
+
+ /**
+ * Display the matched elements.
+ *
+ * @param duration A string or number determining how long the animation will run.
+ * @param complete A function to call once the animation is complete.
+ */
+ show(duration?: number|string, complete?: Function): JQuery;
+ /**
+ * Display the matched elements.
+ *
+ * @param duration A string or number determining how long the animation will run.
+ * @param easing A string indicating which easing function to use for the transition.
+ * @param complete A function to call once the animation is complete.
+ */
+ show(duration?: number|string, easing?: string, complete?: Function): JQuery;
+ /**
+ * Display the matched elements.
+ *
+ * @param options A map of additional options to pass to the method.
+ */
+ show(options: JQueryAnimationOptions): JQuery;
+
+ /**
+ * Display the matched elements with a sliding motion.
+ *
+ * @param duration A string or number determining how long the animation will run.
+ * @param complete A function to call once the animation is complete.
+ */
+ slideDown(duration?: number|string, complete?: Function): JQuery;
+ /**
+ * Display the matched elements with a sliding motion.
+ *
+ * @param duration A string or number determining how long the animation will run.
+ * @param easing A string indicating which easing function to use for the transition.
+ * @param complete A function to call once the animation is complete.
+ */
+ slideDown(duration?: number|string, easing?: string, complete?: Function): JQuery;
+ /**
+ * Display the matched elements with a sliding motion.
+ *
+ * @param options A map of additional options to pass to the method.
+ */
+ slideDown(options: JQueryAnimationOptions): JQuery;
+
+ /**
+ * Display or hide the matched elements with a sliding motion.
+ *
+ * @param duration A string or number determining how long the animation will run.
+ * @param complete A function to call once the animation is complete.
+ */
+ slideToggle(duration?: number|string, complete?: Function): JQuery;
+ /**
+ * Display or hide the matched elements with a sliding motion.
+ *
+ * @param duration A string or number determining how long the animation will run.
+ * @param easing A string indicating which easing function to use for the transition.
+ * @param complete A function to call once the animation is complete.
+ */
+ slideToggle(duration?: number|string, easing?: string, complete?: Function): JQuery;
+ /**
+ * Display or hide the matched elements with a sliding motion.
+ *
+ * @param options A map of additional options to pass to the method.
+ */
+ slideToggle(options: JQueryAnimationOptions): JQuery;
+
+ /**
+ * Hide the matched elements with a sliding motion.
+ *
+ * @param duration A string or number determining how long the animation will run.
+ * @param complete A function to call once the animation is complete.
+ */
+ slideUp(duration?: number|string, complete?: Function): JQuery;
+ /**
+ * Hide the matched elements with a sliding motion.
+ *
+ * @param duration A string or number determining how long the animation will run.
+ * @param easing A string indicating which easing function to use for the transition.
+ * @param complete A function to call once the animation is complete.
+ */
+ slideUp(duration?: number|string, easing?: string, complete?: Function): JQuery;
+ /**
+ * Hide the matched elements with a sliding motion.
+ *
+ * @param options A map of additional options to pass to the method.
+ */
+ slideUp(options: JQueryAnimationOptions): JQuery;
+
+ /**
+ * Stop the currently-running animation on the matched elements.
+ *
+ * @param clearQueue A Boolean indicating whether to remove queued animation as well. Defaults to false.
+ * @param jumpToEnd A Boolean indicating whether to complete the current animation immediately. Defaults to false.
+ */
+ stop(clearQueue?: boolean, jumpToEnd?: boolean): JQuery;
+ /**
+ * Stop the currently-running animation on the matched elements.
+ *
+ * @param queue The name of the queue in which to stop animations.
+ * @param clearQueue A Boolean indicating whether to remove queued animation as well. Defaults to false.
+ * @param jumpToEnd A Boolean indicating whether to complete the current animation immediately. Defaults to false.
+ */
+ stop(queue?: string, clearQueue?: boolean, jumpToEnd?: boolean): JQuery;
+
+ /**
+ * Display or hide the matched elements.
+ *
+ * @param duration A string or number determining how long the animation will run.
+ * @param complete A function to call once the animation is complete.
+ */
+ toggle(duration?: number|string, complete?: Function): JQuery;
+ /**
+ * Display or hide the matched elements.
+ *
+ * @param duration A string or number determining how long the animation will run.
+ * @param easing A string indicating which easing function to use for the transition.
+ * @param complete A function to call once the animation is complete.
+ */
+ toggle(duration?: number|string, easing?: string, complete?: Function): JQuery;
+ /**
+ * Display or hide the matched elements.
+ *
+ * @param options A map of additional options to pass to the method.
+ */
+ toggle(options: JQueryAnimationOptions): JQuery;
+ /**
+ * Display or hide the matched elements.
+ *
+ * @param showOrHide A Boolean indicating whether to show or hide the elements.
+ */
+ toggle(showOrHide: boolean): JQuery;
+
+ /**
+ * Attach a handler to an event for the elements.
+ *
+ * @param eventType A string containing one or more DOM event types, such as "click" or "submit," or custom event names.
+ * @param eventData An object containing data that will be passed to the event handler.
+ * @param handler A function to execute each time the event is triggered.
+ */
+ bind(eventType: string, eventData: any, handler: (eventObject: JQueryEventObject) => any): JQuery;
+ /**
+ * Attach a handler to an event for the elements.
+ *
+ * @param eventType A string containing one or more DOM event types, such as "click" or "submit," or custom event names.
+ * @param handler A function to execute each time the event is triggered.
+ */
+ bind(eventType: string, handler: (eventObject: JQueryEventObject) => any): JQuery;
+ /**
+ * Attach a handler to an event for the elements.
+ *
+ * @param eventType A string containing one or more DOM event types, such as "click" or "submit," or custom event names.
+ * @param eventData An object containing data that will be passed to the event handler.
+ * @param preventBubble Setting the third argument to false will attach a function that prevents the default action from occurring and stops the event from bubbling. The default is true.
+ */
+ bind(eventType: string, eventData: any, preventBubble: boolean): JQuery;
+ /**
+ * Attach a handler to an event for the elements.
+ *
+ * @param eventType A string containing one or more DOM event types, such as "click" or "submit," or custom event names.
+ * @param preventBubble Setting the third argument to false will attach a function that prevents the default action from occurring and stops the event from bubbling. The default is true.
+ */
+ bind(eventType: string, preventBubble: boolean): JQuery;
+ /**
+ * Attach a handler to an event for the elements.
+ *
+ * @param events An object containing one or more DOM event types and functions to execute for them.
+ */
+ bind(events: any): JQuery;
+
+ /**
+ * Trigger the "blur" event on an element
+ */
+ blur(): JQuery;
+ /**
+ * Bind an event handler to the "blur" JavaScript event
+ *
+ * @param handler A function to execute each time the event is triggered.
+ */
+ blur(handler: (eventObject: JQueryEventObject) => any): JQuery;
+ /**
+ * Bind an event handler to the "blur" JavaScript event
+ *
+ * @param eventData An object containing data that will be passed to the event handler.
+ * @param handler A function to execute each time the event is triggered.
+ */
+ blur(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery;
+
+ /**
+ * Trigger the "change" event on an element.
+ */
+ change(): JQuery;
+ /**
+ * Bind an event handler to the "change" JavaScript event
+ *
+ * @param handler A function to execute each time the event is triggered.
+ */
+ change(handler: (eventObject: JQueryEventObject) => any): JQuery;
+ /**
+ * Bind an event handler to the "change" JavaScript event
+ *
+ * @param eventData An object containing data that will be passed to the event handler.
+ * @param handler A function to execute each time the event is triggered.
+ */
+ change(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery;
+
+ /**
+ * Trigger the "click" event on an element.
+ */
+ click(): JQuery;
+ /**
+ * Bind an event handler to the "click" JavaScript event
+ *
+ * @param eventData An object containing data that will be passed to the event handler.
+ */
+ click(handler: (eventObject: JQueryEventObject) => any): JQuery;
+ /**
+ * Bind an event handler to the "click" JavaScript event
+ *
+ * @param eventData An object containing data that will be passed to the event handler.
+ * @param handler A function to execute each time the event is triggered.
+ */
+ click(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery;
+
+ /**
+ * Trigger the "dblclick" event on an element.
+ */
+ dblclick(): JQuery;
+ /**
+ * Bind an event handler to the "dblclick" JavaScript event
+ *
+ * @param handler A function to execute each time the event is triggered.
+ */
+ dblclick(handler: (eventObject: JQueryEventObject) => any): JQuery;
+ /**
+ * Bind an event handler to the "dblclick" JavaScript event
+ *
+ * @param eventData An object containing data that will be passed to the event handler.
+ * @param handler A function to execute each time the event is triggered.
+ */
+ dblclick(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery;
+
+ delegate(selector: any, eventType: string, handler: (eventObject: JQueryEventObject) => any): JQuery;
+ delegate(selector: any, eventType: string, eventData: any, handler: (eventObject: JQueryEventObject) => any): JQuery;
+
+ /**
+ * Trigger the "focus" event on an element.
+ */
+ focus(): JQuery;
+ /**
+ * Bind an event handler to the "focus" JavaScript event
+ *
+ * @param handler A function to execute each time the event is triggered.
+ */
+ focus(handler: (eventObject: JQueryEventObject) => any): JQuery;
+ /**
+ * Bind an event handler to the "focus" JavaScript event
+ *
+ * @param eventData An object containing data that will be passed to the event handler.
+ * @param handler A function to execute each time the event is triggered.
+ */
+ focus(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery;
+
+ /**
+ * Trigger the "focusin" event on an element.
+ */
+ focusin(): JQuery;
+ /**
+ * Bind an event handler to the "focusin" JavaScript event
+ *
+ * @param handler A function to execute each time the event is triggered.
+ */
+ focusin(handler: (eventObject: JQueryEventObject) => any): JQuery;
+ /**
+ * Bind an event handler to the "focusin" JavaScript event
+ *
+ * @param eventData An object containing data that will be passed to the event handler.
+ * @param handler A function to execute each time the event is triggered.
+ */
+ focusin(eventData: Object, handler: (eventObject: JQueryEventObject) => any): JQuery;
+
+ /**
+ * Trigger the "focusout" event on an element.
+ */
+ focusout(): JQuery;
+ /**
+ * Bind an event handler to the "focusout" JavaScript event
+ *
+ * @param handler A function to execute each time the event is triggered.
+ */
+ focusout(handler: (eventObject: JQueryEventObject) => any): JQuery;
+ /**
+ * Bind an event handler to the "focusout" JavaScript event
+ *
+ * @param eventData An object containing data that will be passed to the event handler.
+ * @param handler A function to execute each time the event is triggered.
+ */
+ focusout(eventData: Object, handler: (eventObject: JQueryEventObject) => any): JQuery;
+
+ /**
+ * Bind two handlers to the matched elements, to be executed when the mouse pointer enters and leaves the elements.
+ *
+ * @param handlerIn A function to execute when the mouse pointer enters the element.
+ * @param handlerOut A function to execute when the mouse pointer leaves the element.
+ */
+ hover(handlerIn: (eventObject: JQueryEventObject) => any, handlerOut: (eventObject: JQueryEventObject) => any): JQuery;
+ /**
+ * Bind a single handler to the matched elements, to be executed when the mouse pointer enters or leaves the elements.
+ *
+ * @param handlerInOut A function to execute when the mouse pointer enters or leaves the element.
+ */
+ hover(handlerInOut: (eventObject: JQueryEventObject) => any): JQuery;
+
+ /**
+ * Trigger the "keydown" event on an element.
+ */
+ keydown(): JQuery;
+ /**
+ * Bind an event handler to the "keydown" JavaScript event
+ *
+ * @param handler A function to execute each time the event is triggered.
+ */
+ keydown(handler: (eventObject: JQueryKeyEventObject) => any): JQuery;
+ /**
+ * Bind an event handler to the "keydown" JavaScript event
+ *
+ * @param eventData An object containing data that will be passed to the event handler.
+ * @param handler A function to execute each time the event is triggered.
+ */
+ keydown(eventData?: any, handler?: (eventObject: JQueryKeyEventObject) => any): JQuery;
+
+ /**
+ * Trigger the "keypress" event on an element.
+ */
+ keypress(): JQuery;
+ /**
+ * Bind an event handler to the "keypress" JavaScript event
+ *
+ * @param handler A function to execute each time the event is triggered.
+ */
+ keypress(handler: (eventObject: JQueryKeyEventObject) => any): JQuery;
+ /**
+ * Bind an event handler to the "keypress" JavaScript event
+ *
+ * @param eventData An object containing data that will be passed to the event handler.
+ * @param handler A function to execute each time the event is triggered.
+ */
+ keypress(eventData?: any, handler?: (eventObject: JQueryKeyEventObject) => any): JQuery;
+
+ /**
+ * Trigger the "keyup" event on an element.
+ */
+ keyup(): JQuery;
+ /**
+ * Bind an event handler to the "keyup" JavaScript event
+ *
+ * @param handler A function to execute each time the event is triggered.
+ */
+ keyup(handler: (eventObject: JQueryKeyEventObject) => any): JQuery;
+ /**
+ * Bind an event handler to the "keyup" JavaScript event
+ *
+ * @param eventData An object containing data that will be passed to the event handler.
+ * @param handler A function to execute each time the event is triggered.
+ */
+ keyup(eventData?: any, handler?: (eventObject: JQueryKeyEventObject) => any): JQuery;
+
+ /**
+ * Bind an event handler to the "load" JavaScript event.
+ *
+ * @param handler A function to execute when the event is triggered.
+ */
+ load(handler: (eventObject: JQueryEventObject) => any): JQuery;
+ /**
+ * Bind an event handler to the "load" JavaScript event.
+ *
+ * @param eventData An object containing data that will be passed to the event handler.
+ * @param handler A function to execute when the event is triggered.
+ */
+ load(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery;
+
+ /**
+ * Trigger the "mousedown" event on an element.
+ */
+ mousedown(): JQuery;
+ /**
+ * Bind an event handler to the "mousedown" JavaScript event.
+ *
+ * @param handler A function to execute when the event is triggered.
+ */
+ mousedown(handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
+ /**
+ * Bind an event handler to the "mousedown" JavaScript event.
+ *
+ * @param eventData An object containing data that will be passed to the event handler.
+ * @param handler A function to execute when the event is triggered.
+ */
+ mousedown(eventData: Object, handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
+
+ /**
+ * Trigger the "mouseenter" event on an element.
+ */
+ mouseenter(): JQuery;
+ /**
+ * Bind an event handler to be fired when the mouse enters an element.
+ *
+ * @param handler A function to execute when the event is triggered.
+ */
+ mouseenter(handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
+ /**
+ * Bind an event handler to be fired when the mouse enters an element.
+ *
+ * @param eventData An object containing data that will be passed to the event handler.
+ * @param handler A function to execute when the event is triggered.
+ */
+ mouseenter(eventData: Object, handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
+
+ /**
+ * Trigger the "mouseleave" event on an element.
+ */
+ mouseleave(): JQuery;
+ /**
+ * Bind an event handler to be fired when the mouse leaves an element.
+ *
+ * @param handler A function to execute when the event is triggered.
+ */
+ mouseleave(handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
+ /**
+ * Bind an event handler to be fired when the mouse leaves an element.
+ *
+ * @param eventData An object containing data that will be passed to the event handler.
+ * @param handler A function to execute when the event is triggered.
+ */
+ mouseleave(eventData: Object, handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
+
+ /**
+ * Trigger the "mousemove" event on an element.
+ */
+ mousemove(): JQuery;
+ /**
+ * Bind an event handler to the "mousemove" JavaScript event.
+ *
+ * @param handler A function to execute when the event is triggered.
+ */
+ mousemove(handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
+ /**
+ * Bind an event handler to the "mousemove" JavaScript event.
+ *
+ * @param eventData An object containing data that will be passed to the event handler.
+ * @param handler A function to execute when the event is triggered.
+ */
+ mousemove(eventData: Object, handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
+
+ /**
+ * Trigger the "mouseout" event on an element.
+ */
+ mouseout(): JQuery;
+ /**
+ * Bind an event handler to the "mouseout" JavaScript event.
+ *
+ * @param handler A function to execute when the event is triggered.
+ */
+ mouseout(handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
+ /**
+ * Bind an event handler to the "mouseout" JavaScript event.
+ *
+ * @param eventData An object containing data that will be passed to the event handler.
+ * @param handler A function to execute when the event is triggered.
+ */
+ mouseout(eventData: Object, handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
+
+ /**
+ * Trigger the "mouseover" event on an element.
+ */
+ mouseover(): JQuery;
+ /**
+ * Bind an event handler to the "mouseover" JavaScript event.
+ *
+ * @param handler A function to execute when the event is triggered.
+ */
+ mouseover(handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
+ /**
+ * Bind an event handler to the "mouseover" JavaScript event.
+ *
+ * @param eventData An object containing data that will be passed to the event handler.
+ * @param handler A function to execute when the event is triggered.
+ */
+ mouseover(eventData: Object, handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
+
+ /**
+ * Trigger the "mouseup" event on an element.
+ */
+ mouseup(): JQuery;
+ /**
+ * Bind an event handler to the "mouseup" JavaScript event.
+ *
+ * @param handler A function to execute when the event is triggered.
+ */
+ mouseup(handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
+ /**
+ * Bind an event handler to the "mouseup" JavaScript event.
+ *
+ * @param eventData An object containing data that will be passed to the event handler.
+ * @param handler A function to execute when the event is triggered.
+ */
+ mouseup(eventData: Object, handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
+
+ /**
+ * Remove an event handler.
+ */
+ off(): JQuery;
+ /**
+ * Remove an event handler.
+ *
+ * @param events One or more space-separated event types and optional namespaces, or just namespaces, such as "click", "keydown.myPlugin", or ".myPlugin".
+ * @param selector A selector which should match the one originally passed to .on() when attaching event handlers.
+ * @param handler A handler function previously attached for the event(s), or the special value false.
+ */
+ off(events: string, selector?: string, handler?: (eventObject: JQueryEventObject) => any): JQuery;
+ /**
+ * Remove an event handler.
+ *
+ * @param events One or more space-separated event types and optional namespaces, or just namespaces, such as "click", "keydown.myPlugin", or ".myPlugin".
+ * @param handler A handler function previously attached for the event(s), or the special value false.
+ */
+ off(events: string, handler: (eventObject: JQueryEventObject) => any): JQuery;
+ /**
+ * Remove an event handler.
+ *
+ * @param events An object where the string keys represent one or more space-separated event types and optional namespaces, and the values represent handler functions previously attached for the event(s).
+ * @param selector A selector which should match the one originally passed to .on() when attaching event handlers.
+ */
+ off(events: { [key: string]: any; }, selector?: string): JQuery;
+
+ /**
+ * Attach an event handler function for one or more events to the selected elements.
+ *
+ * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin".
+ * @param handler A function to execute when the event is triggered. The value false is also allowed as a shorthand for a function that simply does return false. Rest parameter args is for optional parameters passed to jQuery.trigger(). Note that the actual parameters on the event handler function must be marked as optional (? syntax).
+ */
+ on(events: string, handler: (eventObject: JQueryEventObject, ...args: any[]) => any): JQuery;
+ /**
+ * Attach an event handler function for one or more events to the selected elements.
+ *
+ * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin".
+ * @param data Data to be passed to the handler in event.data when an event is triggered.
+ * @param handler A function to execute when the event is triggered. The value false is also allowed as a shorthand for a function that simply does return false.
+ */
+ on(events: string, data : any, handler: (eventObject: JQueryEventObject, ...args: any[]) => any): JQuery;
+ /**
+ * Attach an event handler function for one or more events to the selected elements.
+ *
+ * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin".
+ * @param selector A selector string to filter the descendants of the selected elements that trigger the event. If the selector is null or omitted, the event is always triggered when it reaches the selected element.
+ * @param handler A function to execute when the event is triggered. The value false is also allowed as a shorthand for a function that simply does return false.
+ */
+ on(events: string, selector: string, handler: (eventObject: JQueryEventObject, ...eventData: any[]) => any): JQuery;
+ /**
+ * Attach an event handler function for one or more events to the selected elements.
+ *
+ * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin".
+ * @param selector A selector string to filter the descendants of the selected elements that trigger the event. If the selector is null or omitted, the event is always triggered when it reaches the selected element.
+ * @param data Data to be passed to the handler in event.data when an event is triggered.
+ * @param handler A function to execute when the event is triggered. The value false is also allowed as a shorthand for a function that simply does return false.
+ */
+ on(events: string, selector: string, data: any, handler: (eventObject: JQueryEventObject, ...eventData: any[]) => any): JQuery;
+ /**
+ * Attach an event handler function for one or more events to the selected elements.
+ *
+ * @param events An object in which the string keys represent one or more space-separated event types and optional namespaces, and the values represent a handler function to be called for the event(s).
+ * @param selector A selector string to filter the descendants of the selected elements that will call the handler. If the selector is null or omitted, the handler is always called when it reaches the selected element.
+ * @param data Data to be passed to the handler in event.data when an event occurs.
+ */
+ on(events: { [key: string]: any; }, selector?: string, data?: any): JQuery;
+ /**
+ * Attach an event handler function for one or more events to the selected elements.
+ *
+ * @param events An object in which the string keys represent one or more space-separated event types and optional namespaces, and the values represent a handler function to be called for the event(s).
+ * @param data Data to be passed to the handler in event.data when an event occurs.
+ */
+ on(events: { [key: string]: any; }, data?: any): JQuery;
+
+ /**
+ * Attach a handler to an event for the elements. The handler is executed at most once per element per event type.
+ *
+ * @param events A string containing one or more JavaScript event types, such as "click" or "submit," or custom event names.
+ * @param handler A function to execute at the time the event is triggered.
+ */
+ one(events: string, handler: (eventObject: JQueryEventObject) => any): JQuery;
+ /**
+ * Attach a handler to an event for the elements. The handler is executed at most once per element per event type.
+ *
+ * @param events A string containing one or more JavaScript event types, such as "click" or "submit," or custom event names.
+ * @param data An object containing data that will be passed to the event handler.
+ * @param handler A function to execute at the time the event is triggered.
+ */
+ one(events: string, data: Object, handler: (eventObject: JQueryEventObject) => any): JQuery;
+
+ /**
+ * Attach a handler to an event for the elements. The handler is executed at most once per element per event type.
+ *
+ * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin".
+ * @param selector A selector string to filter the descendants of the selected elements that trigger the event. If the selector is null or omitted, the event is always triggered when it reaches the selected element.
+ * @param handler A function to execute when the event is triggered. The value false is also allowed as a shorthand for a function that simply does return false.
+ */
+ one(events: string, selector: string, handler: (eventObject: JQueryEventObject) => any): JQuery;
+ /**
+ * Attach a handler to an event for the elements. The handler is executed at most once per element per event type.
+ *
+ * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin".
+ * @param selector A selector string to filter the descendants of the selected elements that trigger the event. If the selector is null or omitted, the event is always triggered when it reaches the selected element.
+ * @param data Data to be passed to the handler in event.data when an event is triggered.
+ * @param handler A function to execute when the event is triggered. The value false is also allowed as a shorthand for a function that simply does return false.
+ */
+ one(events: string, selector: string, data: any, handler: (eventObject: JQueryEventObject) => any): JQuery;
+
+ /**
+ * Attach a handler to an event for the elements. The handler is executed at most once per element per event type.
+ *
+ * @param events An object in which the string keys represent one or more space-separated event types and optional namespaces, and the values represent a handler function to be called for the event(s).
+ * @param selector A selector string to filter the descendants of the selected elements that will call the handler. If the selector is null or omitted, the handler is always called when it reaches the selected element.
+ * @param data Data to be passed to the handler in event.data when an event occurs.
+ */
+ one(events: { [key: string]: any; }, selector?: string, data?: any): JQuery;
+
+ /**
+ * Attach a handler to an event for the elements. The handler is executed at most once per element per event type.
+ *
+ * @param events An object in which the string keys represent one or more space-separated event types and optional namespaces, and the values represent a handler function to be called for the event(s).
+ * @param data Data to be passed to the handler in event.data when an event occurs.
+ */
+ one(events: { [key: string]: any; }, data?: any): JQuery;
+
+
+ /**
+ * Specify a function to execute when the DOM is fully loaded.
+ *
+ * @param handler A function to execute after the DOM is ready.
+ */
+ ready(handler: (jQueryAlias?: JQueryStatic) => any): JQuery;
+
+ /**
+ * Trigger the "resize" event on an element.
+ */
+ resize(): JQuery;
+ /**
+ * Bind an event handler to the "resize" JavaScript event.
+ *
+ * @param handler A function to execute each time the event is triggered.
+ */
+ resize(handler: (eventObject: JQueryEventObject) => any): JQuery;
+ /**
+ * Bind an event handler to the "resize" JavaScript event.
+ *
+ * @param eventData An object containing data that will be passed to the event handler.
+ * @param handler A function to execute each time the event is triggered.
+ */
+ resize(eventData: Object, handler: (eventObject: JQueryEventObject) => any): JQuery;
+
+ /**
+ * Trigger the "scroll" event on an element.
+ */
+ scroll(): JQuery;
+ /**
+ * Bind an event handler to the "scroll" JavaScript event.
+ *
+ * @param handler A function to execute each time the event is triggered.
+ */
+ scroll(handler: (eventObject: JQueryEventObject) => any): JQuery;
+ /**
+ * Bind an event handler to the "scroll" JavaScript event.
+ *
+ * @param eventData An object containing data that will be passed to the event handler.
+ * @param handler A function to execute each time the event is triggered.
+ */
+ scroll(eventData: Object, handler: (eventObject: JQueryEventObject) => any): JQuery;
+
+ /**
+ * Trigger the "select" event on an element.
+ */
+ select(): JQuery;
+ /**
+ * Bind an event handler to the "select" JavaScript event.
+ *
+ * @param handler A function to execute each time the event is triggered.
+ */
+ select(handler: (eventObject: JQueryEventObject) => any): JQuery;
+ /**
+ * Bind an event handler to the "select" JavaScript event.
+ *
+ * @param eventData An object containing data that will be passed to the event handler.
+ * @param handler A function to execute each time the event is triggered.
+ */
+ select(eventData: Object, handler: (eventObject: JQueryEventObject) => any): JQuery;
+
+ /**
+ * Trigger the "submit" event on an element.
+ */
+ submit(): JQuery;
+ /**
+ * Bind an event handler to the "submit" JavaScript event
+ *
+ * @param handler A function to execute each time the event is triggered.
+ */
+ submit(handler: (eventObject: JQueryEventObject) => any): JQuery;
+ /**
+ * Bind an event handler to the "submit" JavaScript event
+ *
+ * @param eventData An object containing data that will be passed to the event handler.
+ * @param handler A function to execute each time the event is triggered.
+ */
+ submit(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery;
+
+ /**
+ * Execute all handlers and behaviors attached to the matched elements for the given event type.
+ *
+ * @param eventType A string containing a JavaScript event type, such as click or submit.
+ * @param extraParameters Additional parameters to pass along to the event handler.
+ */
+ trigger(eventType: string, extraParameters?: any[]|Object): JQuery;
+ /**
+ * Execute all handlers and behaviors attached to the matched elements for the given event type.
+ *
+ * @param event A jQuery.Event object.
+ * @param extraParameters Additional parameters to pass along to the event handler.
+ */
+ trigger(event: JQueryEventObject, extraParameters?: any[]|Object): JQuery;
+
+ /**
+ * Execute all handlers attached to an element for an event.
+ *
+ * @param eventType A string containing a JavaScript event type, such as click or submit.
+ * @param extraParameters An array of additional parameters to pass along to the event handler.
+ */
+ triggerHandler(eventType: string, ...extraParameters: any[]): Object;
+
+ /**
+ * Execute all handlers attached to an element for an event.
+ *
+ * @param event A jQuery.Event object.
+ * @param extraParameters An array of additional parameters to pass along to the event handler.
+ */
+ triggerHandler(event: JQueryEventObject, ...extraParameters: any[]): Object;
+
+ /**
+ * Remove a previously-attached event handler from the elements.
+ *
+ * @param eventType A string containing a JavaScript event type, such as click or submit.
+ * @param handler The function that is to be no longer executed.
+ */
+ unbind(eventType?: string, handler?: (eventObject: JQueryEventObject) => any): JQuery;
+ /**
+ * Remove a previously-attached event handler from the elements.
+ *
+ * @param eventType A string containing a JavaScript event type, such as click or submit.
+ * @param fls Unbinds the corresponding 'return false' function that was bound using .bind( eventType, false ).
+ */
+ unbind(eventType: string, fls: boolean): JQuery;
+ /**
+ * Remove a previously-attached event handler from the elements.
+ *
+ * @param evt A JavaScript event object as passed to an event handler.
+ */
+ unbind(evt: any): JQuery;
+
+ /**
+ * Remove a handler from the event for all elements which match the current selector, based upon a specific set of root elements.
+ */
+ undelegate(): JQuery;
+ /**
+ * Remove a handler from the event for all elements which match the current selector, based upon a specific set of root elements.
+ *
+ * @param selector A selector which will be used to filter the event results.
+ * @param eventType A string containing a JavaScript event type, such as "click" or "keydown"
+ * @param handler A function to execute at the time the event is triggered.
+ */
+ undelegate(selector: string, eventType: string, handler?: (eventObject: JQueryEventObject) => any): JQuery;
+ /**
+ * Remove a handler from the event for all elements which match the current selector, based upon a specific set of root elements.
+ *
+ * @param selector A selector which will be used to filter the event results.
+ * @param events An object of one or more event types and previously bound functions to unbind from them.
+ */
+ undelegate(selector: string, events: Object): JQuery;
+ /**
+ * Remove a handler from the event for all elements which match the current selector, based upon a specific set of root elements.
+ *
+ * @param namespace A string containing a namespace to unbind all events from.
+ */
+ undelegate(namespace: string): JQuery;
+
+ /**
+ * Bind an event handler to the "unload" JavaScript event. (DEPRECATED from v1.8)
+ *
+ * @param handler A function to execute when the event is triggered.
+ */
+ unload(handler: (eventObject: JQueryEventObject) => any): JQuery;
+ /**
+ * Bind an event handler to the "unload" JavaScript event. (DEPRECATED from v1.8)
+ *
+ * @param eventData A plain object of data that will be passed to the event handler.
+ * @param handler A function to execute when the event is triggered.
+ */
+ unload(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery;
+
+ /**
+ * The DOM node context originally passed to jQuery(); if none was passed then context will likely be the document. (DEPRECATED from v1.10)
+ */
+ context: Element;
+
+ jquery: string;
+
+ /**
+ * Bind an event handler to the "error" JavaScript event. (DEPRECATED from v1.8)
+ *
+ * @param handler A function to execute when the event is triggered.
+ */
+ error(handler: (eventObject: JQueryEventObject) => any): JQuery;
+ /**
+ * Bind an event handler to the "error" JavaScript event. (DEPRECATED from v1.8)
+ *
+ * @param eventData A plain object of data that will be passed to the event handler.
+ * @param handler A function to execute when the event is triggered.
+ */
+ error(eventData: any, handler: (eventObject: JQueryEventObject) => any): JQuery;
+
+ /**
+ * Add a collection of DOM elements onto the jQuery stack.
+ *
+ * @param elements An array of elements to push onto the stack and make into a new jQuery object.
+ */
+ pushStack(elements: any[]): JQuery;
+ /**
+ * Add a collection of DOM elements onto the jQuery stack.
+ *
+ * @param elements An array of elements to push onto the stack and make into a new jQuery object.
+ * @param name The name of a jQuery method that generated the array of elements.
+ * @param arguments The arguments that were passed in to the jQuery method (for serialization).
+ */
+ pushStack(elements: any[], name: string, arguments: any[]): JQuery;
+
+ /**
+ * Insert content, specified by the parameter, after each element in the set of matched elements.
+ *
+ * param content1 HTML string, DOM element, array of elements, or jQuery object to insert after each element in the set of matched elements.
+ * param content2 One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert after each element in the set of matched elements.
+ */
+ after(content1: JQuery|any[]|Element|Text|string, ...content2: any[]): JQuery;
+ /**
+ * Insert content, specified by the parameter, after each element in the set of matched elements.
+ *
+ * param func A function that returns an HTML string, DOM element(s), or jQuery object to insert after each element in the set of matched elements. Receives the index position of the element in the set as an argument. Within the function, this refers to the current element in the set.
+ */
+ after(func: (index: number, html: string) => string|Element|JQuery): JQuery;
+
+ /**
+ * Insert content, specified by the parameter, to the end of each element in the set of matched elements.
+ *
+ * param content1 DOM element, array of elements, HTML string, or jQuery object to insert at the end of each element in the set of matched elements.
+ * param content2 One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert at the end of each element in the set of matched elements.
+ */
+ append(content1: JQuery|any[]|Element|Text|string, ...content2: any[]): JQuery;
+ /**
+ * Insert content, specified by the parameter, to the end of each element in the set of matched elements.
+ *
+ * param func A function that returns an HTML string, DOM element(s), or jQuery object to insert at the end of each element in the set of matched elements. Receives the index position of the element in the set and the old HTML value of the element as arguments. Within the function, this refers to the current element in the set.
+ */
+ append(func: (index: number, html: string) => string|Element|JQuery): JQuery;
+
+ /**
+ * Insert every element in the set of matched elements to the end of the target.
+ *
+ * @param target A selector, element, HTML string, array of elements, or jQuery object; the matched set of elements will be inserted at the end of the element(s) specified by this parameter.
+ */
+ appendTo(target: JQuery|any[]|Element|string): JQuery;
+
+ /**
+ * Insert content, specified by the parameter, before each element in the set of matched elements.
+ *
+ * param content1 HTML string, DOM element, array of elements, or jQuery object to insert before each element in the set of matched elements.
+ * param content2 One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert before each element in the set of matched elements.
+ */
+ before(content1: JQuery|any[]|Element|Text|string, ...content2: any[]): JQuery;
+ /**
+ * Insert content, specified by the parameter, before each element in the set of matched elements.
+ *
+ * param func A function that returns an HTML string, DOM element(s), or jQuery object to insert before each element in the set of matched elements. Receives the index position of the element in the set as an argument. Within the function, this refers to the current element in the set.
+ */
+ before(func: (index: number, html: string) => string|Element|JQuery): JQuery;
+
+ /**
+ * Create a deep copy of the set of matched elements.
+ *
+ * param withDataAndEvents A Boolean indicating whether event handlers and data should be copied along with the elements. The default value is false.
+ * param deepWithDataAndEvents A Boolean indicating whether event handlers and data for all children of the cloned element should be copied. By default its value matches the first argument's value (which defaults to false).
+ */
+ clone(withDataAndEvents?: boolean, deepWithDataAndEvents?: boolean): JQuery;
+
+ /**
+ * Remove the set of matched elements from the DOM.
+ *
+ * param selector A selector expression that filters the set of matched elements to be removed.
+ */
+ detach(selector?: string): JQuery;
+
+ /**
+ * Remove all child nodes of the set of matched elements from the DOM.
+ */
+ empty(): JQuery;
+
+ /**
+ * Insert every element in the set of matched elements after the target.
+ *
+ * param target A selector, element, array of elements, HTML string, or jQuery object; the matched set of elements will be inserted after the element(s) specified by this parameter.
+ */
+ insertAfter(target: JQuery|any[]|Element|Text|string): JQuery;
+
+ /**
+ * Insert every element in the set of matched elements before the target.
+ *
+ * param target A selector, element, array of elements, HTML string, or jQuery object; the matched set of elements will be inserted before the element(s) specified by this parameter.
+ */
+ insertBefore(target: JQuery|any[]|Element|Text|string): JQuery;
+
+ /**
+ * Insert content, specified by the parameter, to the beginning of each element in the set of matched elements.
+ *
+ * param content1 DOM element, array of elements, HTML string, or jQuery object to insert at the beginning of each element in the set of matched elements.
+ * param content2 One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert at the beginning of each element in the set of matched elements.
+ */
+ prepend(content1: JQuery|any[]|Element|Text|string, ...content2: any[]): JQuery;
+ /**
+ * Insert content, specified by the parameter, to the beginning of each element in the set of matched elements.
+ *
+ * param func A function that returns an HTML string, DOM element(s), or jQuery object to insert at the beginning of each element in the set of matched elements. Receives the index position of the element in the set and the old HTML value of the element as arguments. Within the function, this refers to the current element in the set.
+ */
+ prepend(func: (index: number, html: string) => string|Element|JQuery): JQuery;
+
+ /**
+ * Insert every element in the set of matched elements to the beginning of the target.
+ *
+ * @param target A selector, element, HTML string, array of elements, or jQuery object; the matched set of elements will be inserted at the beginning of the element(s) specified by this parameter.
+ */
+ prependTo(target: JQuery|any[]|Element|string): JQuery;
+
+ /**
+ * Remove the set of matched elements from the DOM.
+ *
+ * @param selector A selector expression that filters the set of matched elements to be removed.
+ */
+ remove(selector?: string): JQuery;
+
+ /**
+ * Replace each target element with the set of matched elements.
+ *
+ * @param target A selector string, jQuery object, DOM element, or array of elements indicating which element(s) to replace.
+ */
+ replaceAll(target: JQuery|any[]|Element|string): JQuery;
+
+ /**
+ * Replace each element in the set of matched elements with the provided new content and return the set of elements that was removed.
+ *
+ * param newContent The content to insert. May be an HTML string, DOM element, array of DOM elements, or jQuery object.
+ */
+ replaceWith(newContent: JQuery|any[]|Element|Text|string): JQuery;
+ /**
+ * Replace each element in the set of matched elements with the provided new content and return the set of elements that was removed.
+ *
+ * param func A function that returns content with which to replace the set of matched elements.
+ */
+ replaceWith(func: () => Element|JQuery): JQuery;
+
+ /**
+ * Get the combined text contents of each element in the set of matched elements, including their descendants.
+ */
+ text(): string;
+ /**
+ * Set the content of each element in the set of matched elements to the specified text.
+ *
+ * @param text The text to set as the content of each matched element. When Number or Boolean is supplied, it will be converted to a String representation.
+ */
+ text(text: string|number|boolean): JQuery;
+ /**
+ * Set the content of each element in the set of matched elements to the specified text.
+ *
+ * @param func A function returning the text content to set. Receives the index position of the element in the set and the old text value as arguments.
+ */
+ text(func: (index: number, text: string) => string): JQuery;
+
+ /**
+ * Retrieve all the elements contained in the jQuery set, as an array.
+ */
+ toArray(): any[];
+
+ /**
+ * Remove the parents of the set of matched elements from the DOM, leaving the matched elements in their place.
+ */
+ unwrap(): JQuery;
+
+ /**
+ * Wrap an HTML structure around each element in the set of matched elements.
+ *
+ * @param wrappingElement A selector, element, HTML string, or jQuery object specifying the structure to wrap around the matched elements.
+ */
+ wrap(wrappingElement: JQuery|Element|string): JQuery;
+ /**
+ * Wrap an HTML structure around each element in the set of matched elements.
+ *
+ * @param func A callback function returning the HTML content or jQuery object to wrap around the matched elements. Receives the index position of the element in the set as an argument. Within the function, this refers to the current element in the set.
+ */
+ wrap(func: (index: number) => string|JQuery): JQuery;
+
+ /**
+ * Wrap an HTML structure around all elements in the set of matched elements.
+ *
+ * @param wrappingElement A selector, element, HTML string, or jQuery object specifying the structure to wrap around the matched elements.
+ */
+ wrapAll(wrappingElement: JQuery|Element|string): JQuery;
+ wrapAll(func: (index: number) => string): JQuery;
+
+ /**
+ * Wrap an HTML structure around the content of each element in the set of matched elements.
+ *
+ * @param wrappingElement An HTML snippet, selector expression, jQuery object, or DOM element specifying the structure to wrap around the content of the matched elements.
+ */
+ wrapInner(wrappingElement: JQuery|Element|string): JQuery;
+ /**
+ * Wrap an HTML structure around the content of each element in the set of matched elements.
+ *
+ * @param func A callback function which generates a structure to wrap around the content of the matched elements. Receives the index position of the element in the set as an argument. Within the function, this refers to the current element in the set.
+ */
+ wrapInner(func: (index: number) => string): JQuery;
+
+ /**
+ * Iterate over a jQuery object, executing a function for each matched element.
+ *
+ * @param func A function to execute for each matched element.
+ */
+ each(func: (index: number, elem: Element) => any): JQuery;
+
+ /**
+ * Retrieve one of the elements matched by the jQuery object.
+ *
+ * @param index A zero-based integer indicating which element to retrieve.
+ */
+ get(index: number): HTMLElement;
+ /**
+ * Retrieve the elements matched by the jQuery object.
+ */
+ get(): any[];
+
+ /**
+ * Search for a given element from among the matched elements.
+ */
+ index(): number;
+ /**
+ * Search for a given element from among the matched elements.
+ *
+ * @param selector A selector representing a jQuery collection in which to look for an element.
+ */
+ index(selector: string|JQuery|Element): number;
+
+ /**
+ * The number of elements in the jQuery object.
+ */
+ length: number;
+ /**
+ * A selector representing selector passed to jQuery(), if any, when creating the original set.
+ * version deprecated: 1.7, removed: 1.9
+ */
+ selector: string;
+ [index: string]: any;
+ [index: number]: HTMLElement;
+
+ /**
+ * Add elements to the set of matched elements.
+ *
+ * @param selector A string representing a selector expression to find additional elements to add to the set of matched elements.
+ * @param context The point in the document at which the selector should begin matching; similar to the context argument of the $(selector, context) method.
+ */
+ add(selector: string, context?: Element): JQuery;
+ /**
+ * Add elements to the set of matched elements.
+ *
+ * @param elements One or more elements to add to the set of matched elements.
+ */
+ add(...elements: Element[]): JQuery;
+ /**
+ * Add elements to the set of matched elements.
+ *
+ * @param html An HTML fragment to add to the set of matched elements.
+ */
+ add(html: string): JQuery;
+ /**
+ * Add elements to the set of matched elements.
+ *
+ * @param obj An existing jQuery object to add to the set of matched elements.
+ */
+ add(obj: JQuery): JQuery;
+
+ /**
+ * Get the children of each element in the set of matched elements, optionally filtered by a selector.
+ *
+ * @param selector A string containing a selector expression to match elements against.
+ */
+ children(selector?: string): JQuery;
+
+ /**
+ * For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree.
+ *
+ * @param selector A string containing a selector expression to match elements against.
+ */
+ closest(selector: string): JQuery;
+ /**
+ * For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree.
+ *
+ * @param selector A string containing a selector expression to match elements against.
+ * @param context A DOM element within which a matching element may be found. If no context is passed in then the context of the jQuery set will be used instead.
+ */
+ closest(selector: string, context?: Element): JQuery;
+ /**
+ * For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree.
+ *
+ * @param obj A jQuery object to match elements against.
+ */
+ closest(obj: JQuery): JQuery;
+ /**
+ * For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree.
+ *
+ * @param element An element to match elements against.
+ */
+ closest(element: Element): JQuery;
+
+ /**
+ * Get an array of all the elements and selectors matched against the current element up through the DOM tree.
+ *
+ * @param selectors An array or string containing a selector expression to match elements against (can also be a jQuery object).
+ * @param context A DOM element within which a matching element may be found. If no context is passed in then the context of the jQuery set will be used instead.
+ */
+ closest(selectors: any, context?: Element): any[];
+
+ /**
+ * Get the children of each element in the set of matched elements, including text and comment nodes.
+ */
+ contents(): JQuery;
+
+ /**
+ * End the most recent filtering operation in the current chain and return the set of matched elements to its previous state.
+ */
+ end(): JQuery;
+
+ /**
+ * Reduce the set of matched elements to the one at the specified index.
+ *
+ * @param index An integer indicating the 0-based position of the element. OR An integer indicating the position of the element, counting backwards from the last element in the set.
+ *
+ */
+ eq(index: number): JQuery;
+
+ /**
+ * Reduce the set of matched elements to those that match the selector or pass the function's test.
+ *
+ * @param selector A string containing a selector expression to match the current set of elements against.
+ */
+ filter(selector: string): JQuery;
+ /**
+ * Reduce the set of matched elements to those that match the selector or pass the function's test.
+ *
+ * @param func A function used as a test for each element in the set. this is the current DOM element.
+ */
+ filter(func: (index: number, element: Element) => any): JQuery;
+ /**
+ * Reduce the set of matched elements to those that match the selector or pass the function's test.
+ *
+ * @param element An element to match the current set of elements against.
+ */
+ filter(element: Element): JQuery;
+ /**
+ * Reduce the set of matched elements to those that match the selector or pass the function's test.
+ *
+ * @param obj An existing jQuery object to match the current set of elements against.
+ */
+ filter(obj: JQuery): JQuery;
+
+ /**
+ * Get the descendants of each element in the current set of matched elements, filtered by a selector, jQuery object, or element.
+ *
+ * @param selector A string containing a selector expression to match elements against.
+ */
+ find(selector: string): JQuery;
+ /**
+ * Get the descendants of each element in the current set of matched elements, filtered by a selector, jQuery object, or element.
+ *
+ * @param element An element to match elements against.
+ */
+ find(element: Element): JQuery;
+ /**
+ * Get the descendants of each element in the current set of matched elements, filtered by a selector, jQuery object, or element.
+ *
+ * @param obj A jQuery object to match elements against.
+ */
+ find(obj: JQuery): JQuery;
+
+ /**
+ * Reduce the set of matched elements to the first in the set.
+ */
+ first(): JQuery;
+
+ /**
+ * Reduce the set of matched elements to those that have a descendant that matches the selector or DOM element.
+ *
+ * @param selector A string containing a selector expression to match elements against.
+ */
+ has(selector: string): JQuery;
+ /**
+ * Reduce the set of matched elements to those that have a descendant that matches the selector or DOM element.
+ *
+ * @param contained A DOM element to match elements against.
+ */
+ has(contained: Element): JQuery;
+
+ /**
+ * Check the current matched set of elements against a selector, element, or jQuery object and return true if at least one of these elements matches the given arguments.
+ *
+ * @param selector A string containing a selector expression to match elements against.
+ */
+ is(selector: string): boolean;
+ /**
+ * Check the current matched set of elements against a selector, element, or jQuery object and return true if at least one of these elements matches the given arguments.
+ *
+ * @param func A function used as a test for the set of elements. It accepts one argument, index, which is the element's index in the jQuery collection.Within the function, this refers to the current DOM element.
+ */
+ is(func: (index: number, element: Element) => boolean): boolean;
+ /**
+ * Check the current matched set of elements against a selector, element, or jQuery object and return true if at least one of these elements matches the given arguments.
+ *
+ * @param obj An existing jQuery object to match the current set of elements against.
+ */
+ is(obj: JQuery): boolean;
+ /**
+ * Check the current matched set of elements against a selector, element, or jQuery object and return true if at least one of these elements matches the given arguments.
+ *
+ * @param elements One or more elements to match the current set of elements against.
+ */
+ is(elements: any): boolean;
+
+ /**
+ * Reduce the set of matched elements to the final one in the set.
+ */
+ last(): JQuery;
+
+ /**
+ * Pass each element in the current matched set through a function, producing a new jQuery object containing the return values.
+ *
+ * @param callback A function object that will be invoked for each element in the current set.
+ */
+ map(callback: (index: number, domElement: Element) => any): JQuery;
+
+ /**
+ * Get the immediately following sibling of each element in the set of matched elements. If a selector is provided, it retrieves the next sibling only if it matches that selector.
+ *
+ * @param selector A string containing a selector expression to match elements against.
+ */
+ next(selector?: string): JQuery;
+
+ /**
+ * Get all following siblings of each element in the set of matched elements, optionally filtered by a selector.
+ *
+ * @param selector A string containing a selector expression to match elements against.
+ */
+ nextAll(selector?: string): JQuery;
+
+ /**
+ * Get all following siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object passed.
+ *
+ * @param selector A string containing a selector expression to indicate where to stop matching following sibling elements.
+ * @param filter A string containing a selector expression to match elements against.
+ */
+ nextUntil(selector?: string, filter?: string): JQuery;
+ /**
+ * Get all following siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object passed.
+ *
+ * @param element A DOM node or jQuery object indicating where to stop matching following sibling elements.
+ * @param filter A string containing a selector expression to match elements against.
+ */
+ nextUntil(element?: Element, filter?: string): JQuery;
+ /**
+ * Get all following siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object passed.
+ *
+ * @param obj A DOM node or jQuery object indicating where to stop matching following sibling elements.
+ * @param filter A string containing a selector expression to match elements against.
+ */
+ nextUntil(obj?: JQuery, filter?: string): JQuery;
+
+ /**
+ * Remove elements from the set of matched elements.
+ *
+ * @param selector A string containing a selector expression to match elements against.
+ */
+ not(selector: string): JQuery;
+ /**
+ * Remove elements from the set of matched elements.
+ *
+ * @param func A function used as a test for each element in the set. this is the current DOM element.
+ */
+ not(func: (index: number, element: Element) => boolean): JQuery;
+ /**
+ * Remove elements from the set of matched elements.
+ *
+ * @param elements One or more DOM elements to remove from the matched set.
+ */
+ not(elements: Element|Element[]): JQuery;
+ /**
+ * Remove elements from the set of matched elements.
+ *
+ * @param obj An existing jQuery object to match the current set of elements against.
+ */
+ not(obj: JQuery): JQuery;
+
+ /**
+ * Get the closest ancestor element that is positioned.
+ */
+ offsetParent(): JQuery;
+
+ /**
+ * Get the parent of each element in the current set of matched elements, optionally filtered by a selector.
+ *
+ * @param selector A string containing a selector expression to match elements against.
+ */
+ parent(selector?: string): JQuery;
+
+ /**
+ * Get the ancestors of each element in the current set of matched elements, optionally filtered by a selector.
+ *
+ * @param selector A string containing a selector expression to match elements against.
+ */
+ parents(selector?: string): JQuery;
+
+ /**
+ * Get the ancestors of each element in the current set of matched elements, up to but not including the element matched by the selector, DOM node, or jQuery object.
+ *
+ * @param selector A string containing a selector expression to indicate where to stop matching ancestor elements.
+ * @param filter A string containing a selector expression to match elements against.
+ */
+ parentsUntil(selector?: string, filter?: string): JQuery;
+ /**
+ * Get the ancestors of each element in the current set of matched elements, up to but not including the element matched by the selector, DOM node, or jQuery object.
+ *
+ * @param element A DOM node or jQuery object indicating where to stop matching ancestor elements.
+ * @param filter A string containing a selector expression to match elements against.
+ */
+ parentsUntil(element?: Element, filter?: string): JQuery;
+ /**
+ * Get the ancestors of each element in the current set of matched elements, up to but not including the element matched by the selector, DOM node, or jQuery object.
+ *
+ * @param obj A DOM node or jQuery object indicating where to stop matching ancestor elements.
+ * @param filter A string containing a selector expression to match elements against.
+ */
+ parentsUntil(obj?: JQuery, filter?: string): JQuery;
+
+ /**
+ * Get the immediately preceding sibling of each element in the set of matched elements, optionally filtered by a selector.
+ *
+ * @param selector A string containing a selector expression to match elements against.
+ */
+ prev(selector?: string): JQuery;
+
+ /**
+ * Get all preceding siblings of each element in the set of matched elements, optionally filtered by a selector.
+ *
+ * @param selector A string containing a selector expression to match elements against.
+ */
+ prevAll(selector?: string): JQuery;
+
+ /**
+ * Get all preceding siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object.
+ *
+ * @param selector A string containing a selector expression to indicate where to stop matching preceding sibling elements.
+ * @param filter A string containing a selector expression to match elements against.
+ */
+ prevUntil(selector?: string, filter?: string): JQuery;
+ /**
+ * Get all preceding siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object.
+ *
+ * @param element A DOM node or jQuery object indicating where to stop matching preceding sibling elements.
+ * @param filter A string containing a selector expression to match elements against.
+ */
+ prevUntil(element?: Element, filter?: string): JQuery;
+ /**
+ * Get all preceding siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object.
+ *
+ * @param obj A DOM node or jQuery object indicating where to stop matching preceding sibling elements.
+ * @param filter A string containing a selector expression to match elements against.
+ */
+ prevUntil(obj?: JQuery, filter?: string): JQuery;
+
+ /**
+ * Get the siblings of each element in the set of matched elements, optionally filtered by a selector.
+ *
+ * @param selector A string containing a selector expression to match elements against.
+ */
+ siblings(selector?: string): JQuery;
+
+ /**
+ * Reduce the set of matched elements to a subset specified by a range of indices.
+ *
+ * @param start An integer indicating the 0-based position at which the elements begin to be selected. If negative, it indicates an offset from the end of the set.
+ * @param end An integer indicating the 0-based position at which the elements stop being selected. If negative, it indicates an offset from the end of the set. If omitted, the range continues until the end of the set.
+ */
+ slice(start: number, end?: number): JQuery;
+
+ /**
+ * Show the queue of functions to be executed on the matched elements.
+ *
+ * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue.
+ */
+ queue(queueName?: string): any[];
+ /**
+ * Manipulate the queue of functions to be executed, once for each matched element.
+ *
+ * @param newQueue An array of functions to replace the current queue contents.
+ */
+ queue(newQueue: Function[]): JQuery;
+ /**
+ * Manipulate the queue of functions to be executed, once for each matched element.
+ *
+ * @param callback The new function to add to the queue, with a function to call that will dequeue the next item.
+ */
+ queue(callback: Function): JQuery;
+ /**
+ * Manipulate the queue of functions to be executed, once for each matched element.
+ *
+ * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue.
+ * @param newQueue An array of functions to replace the current queue contents.
+ */
+ queue(queueName: string, newQueue: Function[]): JQuery;
+ /**
+ * Manipulate the queue of functions to be executed, once for each matched element.
+ *
+ * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue.
+ * @param callback The new function to add to the queue, with a function to call that will dequeue the next item.
+ */
+ queue(queueName: string, callback: Function): JQuery;
+}
+declare module "jquery" {
+ export = $;
+}
+declare var jQuery: JQueryStatic;
+declare var $: JQueryStatic;
diff --git a/extension/lib/decl/lib.es6.d.ts b/extension/lib/decl/lib.es6.d.ts
new file mode 100644
index 000000000..ef3399ba8
--- /dev/null
+++ b/extension/lib/decl/lib.es6.d.ts
@@ -0,0 +1,18634 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+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
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+declare type PropertyKey = string | number | symbol;
+
+interface Symbol {
+ /** Returns a string representation of an object. */
+ toString(): string;
+
+ /** Returns the primitive value of the specified object. */
+ valueOf(): Object;
+
+ [Symbol.toStringTag]: "Symbol";
+}
+
+interface SymbolConstructor {
+ /**
+ * A reference to the prototype.
+ */
+ prototype: Symbol;
+
+ /**
+ * Returns a new unique Symbol value.
+ * @param description Description of the new Symbol object.
+ */
+ (description?: string|number): symbol;
+
+ /**
+ * Returns a Symbol object from the global symbol registry matching the given key if found.
+ * Otherwise, returns a new symbol with this key.
+ * @param key key to search for.
+ */
+ for(key: string): symbol;
+
+ /**
+ * Returns a key from the global symbol registry matching the given Symbol if found.
+ * Otherwise, returns a undefined.
+ * @param sym Symbol to find the key for.
+ */
+ keyFor(sym: symbol): string;
+
+ // Well-known Symbols
+
+ /**
+ * A method that determines if a constructor object recognizes an object as one of the
+ * constructor’s instances. Called by the semantics of the instanceof operator.
+ */
+ hasInstance: symbol;
+
+ /**
+ * A Boolean value that if true indicates that an object should flatten to its array elements
+ * by Array.prototype.concat.
+ */
+ isConcatSpreadable: symbol;
+
+ /**
+ * A method that returns the default iterator for an object. Called by the semantics of the
+ * for-of statement.
+ */
+ iterator: symbol;
+
+ /**
+ * A regular expression method that matches the regular expression against a string. Called
+ * by the String.prototype.match method.
+ */
+ match: symbol;
+
+ /**
+ * A regular expression method that replaces matched substrings of a string. Called by the
+ * String.prototype.replace method.
+ */
+ replace: symbol;
+
+ /**
+ * A regular expression method that returns the index within a string that matches the
+ * regular expression. Called by the String.prototype.search method.
+ */
+ search: symbol;
+
+ /**
+ * A function valued property that is the constructor function that is used to create
+ * derived objects.
+ */
+ species: symbol;
+
+ /**
+ * A regular expression method that splits a string at the indices that match the regular
+ * expression. Called by the String.prototype.split method.
+ */
+ split: symbol;
+
+ /**
+ * A method that converts an object to a corresponding primitive value.
+ * Called by the ToPrimitive abstract operation.
+ */
+ toPrimitive: symbol;
+
+ /**
+ * A String value that is used in the creation of the default string description of an object.
+ * Called by the built-in method Object.prototype.toString.
+ */
+ toStringTag: symbol;
+
+ /**
+ * An Object whose own property names are property names that are excluded from the 'with'
+ * environment bindings of the associated objects.
+ */
+ unscopables: symbol;
+}
+declare var Symbol: SymbolConstructor;
+
+interface Object {
+ /**
+ * Determines whether an object has a property with the specified name.
+ * @param v A property name.
+ */
+ hasOwnProperty(v: PropertyKey): boolean;
+
+ /**
+ * Determines whether a specified property is enumerable.
+ * @param v A property name.
+ */
+ propertyIsEnumerable(v: PropertyKey): boolean;
+}
+
+interface ObjectConstructor {
+ /**
+ * Copy the values of all of the enumerable own properties from one or more source objects to a
+ * target object. Returns the target object.
+ * @param target The target object to copy to.
+ * @param source The source object from which to copy properties.
+ */
+ assign<T, U>(target: T, source: U): T & U;
+
+ /**
+ * Copy the values of all of the enumerable own properties from one or more source objects to a
+ * target object. Returns the target object.
+ * @param target The target object to copy to.
+ * @param source1 The first source object from which to copy properties.
+ * @param source2 The second source object from which to copy properties.
+ */
+ assign<T, U, V>(target: T, source1: U, source2: V): T & U & V;
+
+ /**
+ * Copy the values of all of the enumerable own properties from one or more source objects to a
+ * target object. Returns the target object.
+ * @param target The target object to copy to.
+ * @param source1 The first source object from which to copy properties.
+ * @param source2 The second source object from which to copy properties.
+ * @param source3 The third source object from which to copy properties.
+ */
+ assign<T, U, V, W>(target: T, source1: U, source2: V, source3: W): T & U & V & W;
+
+ /**
+ * Copy the values of all of the enumerable own properties from one or more source objects to a
+ * target object. Returns the target object.
+ * @param target The target object to copy to.
+ * @param sources One or more source objects from which to copy properties
+ */
+ assign(target: any, ...sources: any[]): any;
+
+ /**
+ * Returns an array of all symbol properties found directly on object o.
+ * @param o Object to retrieve the symbols from.
+ */
+ getOwnPropertySymbols(o: any): symbol[];
+
+ /**
+ * Returns true if the values are the same value, false otherwise.
+ * @param value1 The first value.
+ * @param value2 The second value.
+ */
+ is(value1: any, value2: any): boolean;
+
+ /**
+ * Sets the prototype of a specified object o to object proto or null. Returns the object o.
+ * @param o The object to change its prototype.
+ * @param proto The value of the new prototype or null.
+ */
+ setPrototypeOf(o: any, proto: any): any;
+
+ /**
+ * Gets the own property descriptor of the specified object.
+ * An own property descriptor is one that is defined directly on the object and is not
+ * inherited from the object's prototype.
+ * @param o Object that contains the property.
+ * @param p Name of the property.
+ */
+ getOwnPropertyDescriptor(o: any, propertyKey: PropertyKey): PropertyDescriptor;
+
+ /**
+ * Adds a property to an object, or modifies attributes of an existing property.
+ * @param o Object on which to add or modify the property. This can be a native JavaScript
+ * object (that is, a user-defined object or a built in object) or a DOM object.
+ * @param p The property name.
+ * @param attributes Descriptor for the property. It can be for a data property or an accessor
+ * property.
+ */
+ defineProperty(o: any, propertyKey: PropertyKey, attributes: PropertyDescriptor): any;
+}
+
+interface Function {
+ /**
+ * Returns the name of the function. Function names are read-only and can not be changed.
+ */
+ name: string;
+
+ /**
+ * Determines whether the given value inherits from this function if this function was used
+ * as a constructor function.
+ *
+ * A constructor function can control which objects are recognized as its instances by
+ * 'instanceof' by overriding this method.
+ */
+ [Symbol.hasInstance](value: any): boolean;
+}
+
+interface NumberConstructor {
+ /**
+ * The value of Number.EPSILON is the difference between 1 and the smallest value greater than 1
+ * that is representable as a Number value, which is approximately:
+ * 2.2204460492503130808472633361816 x 10‍−‍16.
+ */
+ EPSILON: number;
+
+ /**
+ * Returns true if passed value is finite.
+ * Unlike the global isFininte, Number.isFinite doesn't forcibly convert the parameter to a
+ * number. Only finite values of the type number, result in true.
+ * @param number A numeric value.
+ */
+ isFinite(number: number): boolean;
+
+ /**
+ * Returns true if the value passed is an integer, false otherwise.
+ * @param number A numeric value.
+ */
+ isInteger(number: number): boolean;
+
+ /**
+ * Returns a Boolean value that indicates whether a value is the reserved value NaN (not a
+ * number). Unlike the global isNaN(), Number.isNaN() doesn't forcefully convert the parameter
+ * to a number. Only values of the type number, that are also NaN, result in true.
+ * @param number A numeric value.
+ */
+ isNaN(number: number): boolean;
+
+ /**
+ * Returns true if the value passed is a safe integer.
+ * @param number A numeric value.
+ */
+ isSafeInteger(number: number): boolean;
+
+ /**
+ * The value of the largest integer n such that n and n + 1 are both exactly representable as
+ * a Number value.
+ * The value of Number.MIN_SAFE_INTEGER is 9007199254740991 2^53 − 1.
+ */
+ MAX_SAFE_INTEGER: number;
+
+ /**
+ * The value of the smallest integer n such that n and n − 1 are both exactly representable as
+ * a Number value.
+ * The value of Number.MIN_SAFE_INTEGER is −9007199254740991 (−(2^53 − 1)).
+ */
+ MIN_SAFE_INTEGER: number;
+
+ /**
+ * Converts a string to a floating-point number.
+ * @param string A string that contains a floating-point number.
+ */
+ parseFloat(string: string): number;
+
+ /**
+ * Converts A string to an integer.
+ * @param s A string to convert into a number.
+ * @param radix A value between 2 and 36 that specifies the base of the number in numString.
+ * If this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.
+ * All other strings are considered decimal.
+ */
+ parseInt(string: string, radix?: number): number;
+}
+
+interface Array<T> {
+ /** Iterator */
+ [Symbol.iterator](): IterableIterator<T>;
+
+ /**
+ * Returns an object whose properties have the value 'true'
+ * when they will be absent when used in a 'with' statement.
+ */
+ [Symbol.unscopables](): {
+ copyWithin: boolean;
+ entries: boolean;
+ fill: boolean;
+ find: boolean;
+ findIndex: boolean;
+ keys: boolean;
+ values: boolean;
+ };
+
+ /**
+ * Returns an array of key, value pairs for every entry in the array
+ */
+ entries(): IterableIterator<[number, T]>;
+
+ /**
+ * Returns an list of keys in the array
+ */
+ keys(): IterableIterator<number>;
+
+ /**
+ * Returns an list of values in the array
+ */
+ values(): IterableIterator<T>;
+
+ /**
+ * Returns the value of the first element in the array where predicate is true, and undefined
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found, find
+ * immediately returns that element value. Otherwise, find returns undefined.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ find(predicate: (value: T, index: number, obj: Array<T>) => boolean, thisArg?: any): T;
+
+ /**
+ * Returns the index of the first element in the array where predicate is true, and undefined
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found, find
+ * immediately returns that element value. Otherwise, find returns undefined.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ findIndex(predicate: (value: T) => boolean, thisArg?: any): number;
+
+ /**
+ * Returns the this object after filling the section identified by start and end with value
+ * @param value value to fill array section with
+ * @param start index to start filling the array at. If start is negative, it is treated as
+ * length+start where length is the length of the array.
+ * @param end index to stop filling the array at. If end is negative, it is treated as
+ * length+end.
+ */
+ fill(value: T, start?: number, end?: number): T[];
+
+ /**
+ * Returns the this object after copying a section of the array identified by start and end
+ * to the same array starting at position target
+ * @param target If target is negative, it is treated as length+target where length is the
+ * length of the array.
+ * @param start If start is negative, it is treated as length+start. If end is negative, it
+ * is treated as length+end.
+ * @param end If not specified, length of the this object is used as its default value.
+ */
+ copyWithin(target: number, start: number, end?: number): T[];
+}
+
+interface IArguments {
+ /** Iterator */
+ [Symbol.iterator](): IterableIterator<any>;
+}
+
+interface ArrayConstructor {
+ /**
+ * Creates an array from an array-like object.
+ * @param arrayLike An array-like object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from<T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): Array<U>;
+
+ /**
+ * Creates an array from an iterable object.
+ * @param iterable An iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from<T, U>(iterable: Iterable<T>, mapfn: (v: T, k: number) => U, thisArg?: any): Array<U>;
+
+ /**
+ * Creates an array from an array-like object.
+ * @param arrayLike An array-like object to convert to an array.
+ */
+ from<T>(arrayLike: ArrayLike<T>): Array<T>;
+
+ /**
+ * Creates an array from an iterable object.
+ * @param iterable An iterable object to convert to an array.
+ */
+ from<T>(iterable: Iterable<T>): Array<T>;
+
+ /**
+ * Returns a new array from a set of elements.
+ * @param items A set of elements to include in the new array object.
+ */
+ of<T>(...items: T[]): Array<T>;
+}
+
+interface String {
+ /** Iterator */
+ [Symbol.iterator](): IterableIterator<string>;
+
+ /**
+ * Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point
+ * value of the UTF-16 encoded code point starting at the string element at position pos in
+ * the String resulting from converting this object to a String.
+ * If there is no element at that position, the result is undefined.
+ * If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.
+ */
+ codePointAt(pos: number): number;
+
+ /**
+ * Returns true if searchString appears as a substring of the result of converting this
+ * object to a String, at one or more positions that are
+ * greater than or equal to position; otherwise, returns false.
+ * @param searchString search string
+ * @param position If position is undefined, 0 is assumed, so as to search all of the String.
+ */
+ includes(searchString: string, position?: number): boolean;
+
+ /**
+ * Returns true if the sequence of elements of searchString converted to a String is the
+ * same as the corresponding elements of this object (converted to a String) starting at
+ * endPosition – length(this). Otherwise returns false.
+ */
+ endsWith(searchString: string, endPosition?: number): boolean;
+
+ /**
+ * Returns the String value result of normalizing the string into the normalization form
+ * named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.
+ * @param form Applicable values: "NFC", "NFD", "NFKC", or "NFKD", If not specified default
+ * is "NFC"
+ */
+ normalize(form?: string): string;
+
+ /**
+ * Returns a String value that is made from count copies appended together. If count is 0,
+ * T is the empty String is returned.
+ * @param count number of copies to append
+ */
+ repeat(count: number): string;
+
+ /**
+ * Returns true if the sequence of elements of searchString converted to a String is the
+ * same as the corresponding elements of this object (converted to a String) starting at
+ * position. Otherwise returns false.
+ */
+ startsWith(searchString: string, position?: number): boolean;
+
+ // Overloads for objects with methods of well-known symbols.
+
+ /**
+ * Matches a string an object that supports being matched against, and returns an array containing the results of that search.
+ * @param matcher An object that supports being matched against.
+ */
+ match(matcher: { [Symbol.match](string: string): RegExpMatchArray; }): RegExpMatchArray;
+
+ /**
+ * Replaces text in a string, using an object that supports replacement within a string.
+ * @param searchValue A object can search for and replace matches within a string.
+ * @param replaceValue A string containing the text to replace for every successful match of searchValue in this string.
+ */
+ replace(searchValue: { [Symbol.replace](string: string, replaceValue: string): string; }, replaceValue: string): string;
+
+ /**
+ * Replaces text in a string, using an object that supports replacement within a string.
+ * @param searchValue A object can search for and replace matches within a string.
+ * @param replacer A function that returns the replacement text.
+ */
+ replace(searchValue: { [Symbol.replace](string: string, replacer: (substring: string, ...args: any[]) => string): string; }, replacer: (substring: string, ...args: any[]) => string): string;
+
+ /**
+ * Finds the first substring match in a regular expression search.
+ * @param searcher An object which supports searching within a string.
+ */
+ search(searcher: { [Symbol.search](string: string): number; }): number;
+
+ /**
+ * Split a string into substrings using the specified separator and return them as an array.
+ * @param splitter An object that can split a string.
+ * @param limit A value used to limit the number of elements returned in the array.
+ */
+ split(splitter: { [Symbol.split](string: string, limit?: number): string[]; }, limit?: number): string[];
+
+ /**
+ * Returns an <a> HTML anchor element and sets the name attribute to the text value
+ * @param name
+ */
+ anchor(name: string): string;
+
+ /** Returns a <big> HTML element */
+ big(): string;
+
+ /** Returns a <blink> HTML element */
+ blink(): string;
+
+ /** Returns a <b> HTML element */
+ bold(): string;
+
+ /** Returns a <tt> HTML element */
+ fixed(): string
+
+ /** Returns a <font> HTML element and sets the color attribute value */
+ fontcolor(color: string): string
+
+ /** Returns a <font> HTML element and sets the size attribute value */
+ fontsize(size: number): string;
+
+ /** Returns a <font> HTML element and sets the size attribute value */
+ fontsize(size: string): string;
+
+ /** Returns an <i> HTML element */
+ italics(): string;
+
+ /** Returns an <a> HTML element and sets the href attribute value */
+ link(url: string): string;
+
+ /** Returns a <small> HTML element */
+ small(): string;
+
+ /** Returns a <strike> HTML element */
+ strike(): string;
+
+ /** Returns a <sub> HTML element */
+ sub(): string;
+
+ /** Returns a <sup> HTML element */
+ sup(): string;
+}
+
+interface StringConstructor {
+ /**
+ * Return the String value whose elements are, in order, the elements in the List elements.
+ * If length is 0, the empty string is returned.
+ */
+ fromCodePoint(...codePoints: number[]): string;
+
+ /**
+ * String.raw is intended for use as a tag function of a Tagged Template String. When called
+ * as such the first argument will be a well formed template call site object and the rest
+ * parameter will contain the substitution values.
+ * @param template A well-formed template string call site representation.
+ * @param substitutions A set of substitution values.
+ */
+ raw(template: TemplateStringsArray, ...substitutions: any[]): string;
+}
+
+interface IteratorResult<T> {
+ done: boolean;
+ value?: T;
+}
+
+interface Iterator<T> {
+ next(value?: any): IteratorResult<T>;
+ return?(value?: any): IteratorResult<T>;
+ throw?(e?: any): IteratorResult<T>;
+}
+
+interface Iterable<T> {
+ [Symbol.iterator](): Iterator<T>;
+}
+
+interface IterableIterator<T> extends Iterator<T> {
+ [Symbol.iterator](): IterableIterator<T>;
+}
+
+interface GeneratorFunction extends Function {
+ [Symbol.toStringTag]: "GeneratorFunction";
+}
+
+interface GeneratorFunctionConstructor {
+ /**
+ * Creates a new Generator function.
+ * @param args A list of arguments the function accepts.
+ */
+ new (...args: string[]): GeneratorFunction;
+ (...args: string[]): GeneratorFunction;
+ prototype: GeneratorFunction;
+}
+declare var GeneratorFunction: GeneratorFunctionConstructor;
+
+interface Math {
+ /**
+ * Returns the number of leading zero bits in the 32-bit binary representation of a number.
+ * @param x A numeric expression.
+ */
+ clz32(x: number): number;
+
+ /**
+ * Returns the result of 32-bit multiplication of two numbers.
+ * @param x First number
+ * @param y Second number
+ */
+ imul(x: number, y: number): number;
+
+ /**
+ * Returns the sign of the x, indicating whether x is positive, negative or zero.
+ * @param x The numeric expression to test
+ */
+ sign(x: number): number;
+
+ /**
+ * Returns the base 10 logarithm of a number.
+ * @param x A numeric expression.
+ */
+ log10(x: number): number;
+
+ /**
+ * Returns the base 2 logarithm of a number.
+ * @param x A numeric expression.
+ */
+ log2(x: number): number;
+
+ /**
+ * Returns the natural logarithm of 1 + x.
+ * @param x A numeric expression.
+ */
+ log1p(x: number): number;
+
+ /**
+ * Returns the result of (e^x - 1) of x (e raised to the power of x, where e is the base of
+ * the natural logarithms).
+ * @param x A numeric expression.
+ */
+ expm1(x: number): number;
+
+ /**
+ * Returns the hyperbolic cosine of a number.
+ * @param x A numeric expression that contains an angle measured in radians.
+ */
+ cosh(x: number): number;
+
+ /**
+ * Returns the hyperbolic sine of a number.
+ * @param x A numeric expression that contains an angle measured in radians.
+ */
+ sinh(x: number): number;
+
+ /**
+ * Returns the hyperbolic tangent of a number.
+ * @param x A numeric expression that contains an angle measured in radians.
+ */
+ tanh(x: number): number;
+
+ /**
+ * Returns the inverse hyperbolic cosine of a number.
+ * @param x A numeric expression that contains an angle measured in radians.
+ */
+ acosh(x: number): number;
+
+ /**
+ * Returns the inverse hyperbolic sine of a number.
+ * @param x A numeric expression that contains an angle measured in radians.
+ */
+ asinh(x: number): number;
+
+ /**
+ * Returns the inverse hyperbolic tangent of a number.
+ * @param x A numeric expression that contains an angle measured in radians.
+ */
+ atanh(x: number): number;
+
+ /**
+ * Returns the square root of the sum of squares of its arguments.
+ * @param values Values to compute the square root for.
+ * If no arguments are passed, the result is +0.
+ * If there is only one argument, the result is the absolute value.
+ * If any argument is +Infinity or -Infinity, the result is +Infinity.
+ * If any argument is NaN, the result is NaN.
+ * If all arguments are either +0 or −0, the result is +0.
+ */
+ hypot(...values: number[] ): number;
+
+ /**
+ * Returns the integral part of the a numeric expression, x, removing any fractional digits.
+ * If x is already an integer, the result is x.
+ * @param x A numeric expression.
+ */
+ trunc(x: number): number;
+
+ /**
+ * Returns the nearest single precision float representation of a number.
+ * @param x A numeric expression.
+ */
+ fround(x: number): number;
+
+ /**
+ * Returns an implementation-dependent approximation to the cube root of number.
+ * @param x A numeric expression.
+ */
+ cbrt(x: number): number;
+
+ [Symbol.toStringTag]: "Math";
+}
+
+interface Date {
+ /**
+ * Converts a Date object to a string.
+ */
+ [Symbol.toPrimitive](hint: "default"): string;
+ /**
+ * Converts a Date object to a string.
+ */
+ [Symbol.toPrimitive](hint: "string"): string;
+ /**
+ * Converts a Date object to a number.
+ */
+ [Symbol.toPrimitive](hint: "number"): number;
+ /**
+ * Converts a Date object to a string or number.
+ *
+ * @param hint The strings "number", "string", or "default" to specify what primitive to return.
+ *
+ * @throws {TypeError} If 'hint' was given something other than "number", "string", or "default".
+ * @returns A number if 'hint' was "number", a string if 'hint' was "string" or "default".
+ */
+ [Symbol.toPrimitive](hint: string): string | number;
+}
+
+interface RegExp {
+ /**
+ * Matches a string with this regular expression, and returns an array containing the results of
+ * that search.
+ * @param string A string to search within.
+ */
+ [Symbol.match](string: string): RegExpMatchArray;
+
+ /**
+ * Replaces text in a string, using this regular expression.
+ * @param string A String object or string literal whose contents matching against
+ * this regular expression will be replaced
+ * @param replaceValue A String object or string literal containing the text to replace for every
+ * successful match of this regular expression.
+ */
+ [Symbol.replace](string: string, replaceValue: string): string;
+
+ /**
+ * Replaces text in a string, using this regular expression.
+ * @param string A String object or string literal whose contents matching against
+ * this regular expression will be replaced
+ * @param replacer A function that returns the replacement text.
+ */
+ [Symbol.replace](string: string, replacer: (substring: string, ...args: any[]) => string): string;
+
+ /**
+ * Finds the position beginning first substring match in a regular expression search
+ * using this regular expression.
+ *
+ * @param string The string to search within.
+ */
+ [Symbol.search](string: string): number;
+
+ /**
+ * Returns an array of substrings that were delimited by strings in the original input that
+ * match against this regular expression.
+ *
+ * If the regular expression contains capturing parentheses, then each time this
+ * regular expression matches, the results (including any undefined results) of the
+ * capturing parentheses are spliced.
+ *
+ * @param string string value to split
+ * @param limit if not undefined, the output array is truncated so that it contains no more
+ * than 'limit' elements.
+ */
+ [Symbol.split](string: string, limit?: number): string[];
+
+ /**
+ * Returns a string indicating the flags of the regular expression in question. This field is read-only.
+ * The characters in this string are sequenced and concatenated in the following order:
+ *
+ * - "g" for global
+ * - "i" for ignoreCase
+ * - "m" for multiline
+ * - "u" for unicode
+ * - "y" for sticky
+ *
+ * If no flags are set, the value is the empty string.
+ */
+ flags: string;
+
+ /**
+ * Returns a Boolean value indicating the state of the sticky flag (y) used with a regular
+ * expression. Default is false. Read-only.
+ */
+ sticky: boolean;
+
+ /**
+ * Returns a Boolean value indicating the state of the Unicode flag (u) used with a regular
+ * expression. Default is false. Read-only.
+ */
+ unicode: boolean;
+}
+
+interface RegExpConstructor {
+ [Symbol.species](): RegExpConstructor;
+}
+
+interface Map<K, V> {
+ clear(): void;
+ delete(key: K): boolean;
+ entries(): IterableIterator<[K, V]>;
+ forEach(callbackfn: (value: V, index: K, map: Map<K, V>) => void, thisArg?: any): void;
+ get(key: K): V;
+ has(key: K): boolean;
+ keys(): IterableIterator<K>;
+ set(key: K, value?: V): Map<K, V>;
+ size: number;
+ values(): IterableIterator<V>;
+ [Symbol.iterator]():IterableIterator<[K,V]>;
+ [Symbol.toStringTag]: "Map";
+}
+
+interface MapConstructor {
+ new (): Map<any, any>;
+ new <K, V>(): Map<K, V>;
+ new <K, V>(iterable: Iterable<[K, V]>): Map<K, V>;
+ prototype: Map<any, any>;
+}
+declare var Map: MapConstructor;
+
+interface WeakMap<K, V> {
+ clear(): void;
+ delete(key: K): boolean;
+ get(key: K): V;
+ has(key: K): boolean;
+ set(key: K, value?: V): WeakMap<K, V>;
+ [Symbol.toStringTag]: "WeakMap";
+}
+
+interface WeakMapConstructor {
+ new (): WeakMap<any, any>;
+ new <K, V>(): WeakMap<K, V>;
+ new <K, V>(iterable: Iterable<[K, V]>): WeakMap<K, V>;
+ prototype: WeakMap<any, any>;
+}
+declare var WeakMap: WeakMapConstructor;
+
+interface Set<T> {
+ add(value: T): Set<T>;
+ clear(): void;
+ delete(value: T): boolean;
+ entries(): IterableIterator<[T, T]>;
+ forEach(callbackfn: (value: T, index: T, set: Set<T>) => void, thisArg?: any): void;
+ has(value: T): boolean;
+ keys(): IterableIterator<T>;
+ size: number;
+ values(): IterableIterator<T>;
+ [Symbol.iterator]():IterableIterator<T>;
+ [Symbol.toStringTag]: "Set";
+}
+
+interface SetConstructor {
+ new (): Set<any>;
+ new <T>(): Set<T>;
+ new <T>(iterable: Iterable<T>): Set<T>;
+ prototype: Set<any>;
+}
+declare var Set: SetConstructor;
+
+interface WeakSet<T> {
+ add(value: T): WeakSet<T>;
+ clear(): void;
+ delete(value: T): boolean;
+ has(value: T): boolean;
+ [Symbol.toStringTag]: "WeakSet";
+}
+
+interface WeakSetConstructor {
+ new (): WeakSet<any>;
+ new <T>(): WeakSet<T>;
+ new <T>(iterable: Iterable<T>): WeakSet<T>;
+ prototype: WeakSet<any>;
+}
+declare var WeakSet: WeakSetConstructor;
+
+interface JSON {
+ [Symbol.toStringTag]: "JSON";
+}
+
+/**
+ * Represents a raw buffer of binary data, which is used to store data for the
+ * different typed arrays. ArrayBuffers cannot be read from or written to directly,
+ * but can be passed to a typed array or DataView Object to interpret the raw
+ * buffer as needed.
+ */
+interface ArrayBuffer {
+ [Symbol.toStringTag]: "ArrayBuffer";
+}
+
+interface DataView {
+ [Symbol.toStringTag]: "DataView";
+}
+
+/**
+ * A typed array of 8-bit integer values. The contents are initialized to 0. If the requested
+ * number of bytes could not be allocated an exception is raised.
+ */
+interface Int8Array {
+ /**
+ * Returns an array of key, value pairs for every entry in the array
+ */
+ entries(): IterableIterator<[number, number]>;
+ /**
+ * Returns an list of keys in the array
+ */
+ keys(): IterableIterator<number>;
+ /**
+ * Returns an list of values in the array
+ */
+ values(): IterableIterator<number>;
+ [Symbol.iterator](): IterableIterator<number>;
+ [Symbol.toStringTag]: "Int8Array";
+}
+
+interface Int8ArrayConstructor {
+ new (elements: Iterable<number>): Int8Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from(arrayLike: Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Int8Array;
+}
+
+/**
+ * A typed array of 8-bit unsigned integer values. The contents are initialized to 0. If the
+ * requested number of bytes could not be allocated an exception is raised.
+ */
+interface Uint8Array {
+ /**
+ * Returns an array of key, value pairs for every entry in the array
+ */
+ entries(): IterableIterator<[number, number]>;
+ /**
+ * Returns an list of keys in the array
+ */
+ keys(): IterableIterator<number>;
+ /**
+ * Returns an list of values in the array
+ */
+ values(): IterableIterator<number>;
+ [Symbol.iterator](): IterableIterator<number>;
+ [Symbol.toStringTag]: "UInt8Array";
+}
+
+interface Uint8ArrayConstructor {
+ new (elements: Iterable<number>): Uint8Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from(arrayLike: Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8Array;
+}
+
+/**
+ * A typed array of 8-bit unsigned integer (clamped) values. The contents are initialized to 0.
+ * If the requested number of bytes could not be allocated an exception is raised.
+ */
+interface Uint8ClampedArray {
+ /**
+ * Returns an array of key, value pairs for every entry in the array
+ */
+ entries(): IterableIterator<[number, number]>;
+
+ /**
+ * Returns an list of keys in the array
+ */
+ keys(): IterableIterator<number>;
+
+ /**
+ * Returns an list of values in the array
+ */
+ values(): IterableIterator<number>;
+
+ [Symbol.iterator](): IterableIterator<number>;
+ [Symbol.toStringTag]: "Uint8ClampedArray";
+}
+
+interface Uint8ClampedArrayConstructor {
+ new (elements: Iterable<number>): Uint8ClampedArray;
+
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from(arrayLike: Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8ClampedArray;
+}
+
+/**
+ * A typed array of 16-bit signed integer values. The contents are initialized to 0. If the
+ * requested number of bytes could not be allocated an exception is raised.
+ */
+interface Int16Array {
+ /**
+ * Returns an array of key, value pairs for every entry in the array
+ */
+ entries(): IterableIterator<[number, number]>;
+
+ /**
+ * Returns an list of keys in the array
+ */
+ keys(): IterableIterator<number>;
+
+ /**
+ * Returns an list of values in the array
+ */
+ values(): IterableIterator<number>;
+
+
+ [Symbol.iterator](): IterableIterator<number>;
+ [Symbol.toStringTag]: "Int16Array";
+}
+
+interface Int16ArrayConstructor {
+ new (elements: Iterable<number>): Int16Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from(arrayLike: Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Int16Array;
+}
+
+/**
+ * A typed array of 16-bit unsigned integer values. The contents are initialized to 0. If the
+ * requested number of bytes could not be allocated an exception is raised.
+ */
+interface Uint16Array {
+ /**
+ * Returns an array of key, value pairs for every entry in the array
+ */
+ entries(): IterableIterator<[number, number]>;
+ /**
+ * Returns an list of keys in the array
+ */
+ keys(): IterableIterator<number>;
+ /**
+ * Returns an list of values in the array
+ */
+ values(): IterableIterator<number>;
+ [Symbol.iterator](): IterableIterator<number>;
+ [Symbol.toStringTag]: "Uint16Array";
+}
+
+interface Uint16ArrayConstructor {
+ new (elements: Iterable<number>): Uint16Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from(arrayLike: Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint16Array;
+}
+
+/**
+ * A typed array of 32-bit signed integer values. The contents are initialized to 0. If the
+ * requested number of bytes could not be allocated an exception is raised.
+ */
+interface Int32Array {
+ /**
+ * Returns an array of key, value pairs for every entry in the array
+ */
+ entries(): IterableIterator<[number, number]>;
+ /**
+ * Returns an list of keys in the array
+ */
+ keys(): IterableIterator<number>;
+ /**
+ * Returns an list of values in the array
+ */
+ values(): IterableIterator<number>;
+ [Symbol.iterator](): IterableIterator<number>;
+ [Symbol.toStringTag]: "Int32Array";
+}
+
+interface Int32ArrayConstructor {
+ new (elements: Iterable<number>): Int32Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from(arrayLike: Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Int32Array;
+}
+
+/**
+ * A typed array of 32-bit unsigned integer values. The contents are initialized to 0. If the
+ * requested number of bytes could not be allocated an exception is raised.
+ */
+interface Uint32Array {
+ /**
+ * Returns an array of key, value pairs for every entry in the array
+ */
+ entries(): IterableIterator<[number, number]>;
+ /**
+ * Returns an list of keys in the array
+ */
+ keys(): IterableIterator<number>;
+ /**
+ * Returns an list of values in the array
+ */
+ values(): IterableIterator<number>;
+ [Symbol.iterator](): IterableIterator<number>;
+ [Symbol.toStringTag]: "Uint32Array";
+}
+
+interface Uint32ArrayConstructor {
+ new (elements: Iterable<number>): Uint32Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from(arrayLike: Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint32Array;
+}
+
+/**
+ * A typed array of 32-bit float values. The contents are initialized to 0. If the requested number
+ * of bytes could not be allocated an exception is raised.
+ */
+interface Float32Array {
+ /**
+ * Returns an array of key, value pairs for every entry in the array
+ */
+ entries(): IterableIterator<[number, number]>;
+ /**
+ * Returns an list of keys in the array
+ */
+ keys(): IterableIterator<number>;
+ /**
+ * Returns an list of values in the array
+ */
+ values(): IterableIterator<number>;
+ [Symbol.iterator](): IterableIterator<number>;
+ [Symbol.toStringTag]: "Float32Array";
+}
+
+interface Float32ArrayConstructor {
+ new (elements: Iterable<number>): Float32Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from(arrayLike: Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Float32Array;
+}
+
+/**
+ * A typed array of 64-bit float values. The contents are initialized to 0. If the requested
+ * number of bytes could not be allocated an exception is raised.
+ */
+interface Float64Array {
+ /**
+ * Returns an array of key, value pairs for every entry in the array
+ */
+ entries(): IterableIterator<[number, number]>;
+ /**
+ * Returns an list of keys in the array
+ */
+ keys(): IterableIterator<number>;
+ /**
+ * Returns an list of values in the array
+ */
+ values(): IterableIterator<number>;
+ [Symbol.iterator](): IterableIterator<number>;
+ [Symbol.toStringTag]: "Float64Array";
+}
+
+interface Float64ArrayConstructor {
+ new (elements: Iterable<number>): Float64Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from(arrayLike: Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Float64Array;
+}
+
+interface ProxyHandler<T> {
+ getPrototypeOf? (target: T): any;
+ setPrototypeOf? (target: T, v: any): boolean;
+ isExtensible? (target: T): boolean;
+ preventExtensions? (target: T): boolean;
+ getOwnPropertyDescriptor? (target: T, p: PropertyKey): PropertyDescriptor;
+ has? (target: T, p: PropertyKey): boolean;
+ get? (target: T, p: PropertyKey, receiver: any): any;
+ set? (target: T, p: PropertyKey, value: any, receiver: any): boolean;
+ deleteProperty? (target: T, p: PropertyKey): boolean;
+ defineProperty? (target: T, p: PropertyKey, attributes: PropertyDescriptor): boolean;
+ enumerate? (target: T): PropertyKey[];
+ ownKeys? (target: T): PropertyKey[];
+ apply? (target: T, thisArg: any, argArray?: any): any;
+ construct? (target: T, thisArg: any, argArray?: any): any;
+}
+
+interface ProxyConstructor {
+ revocable<T>(target: T, handler: ProxyHandler<T>): { proxy: T; revoke: () => void; };
+ new <T>(target: T, handler: ProxyHandler<T>): T
+}
+declare var Proxy: ProxyConstructor;
+
+declare namespace Reflect {
+ function apply(target: Function, thisArgument: any, argumentsList: ArrayLike<any>): any;
+ function construct(target: Function, argumentsList: ArrayLike<any>, newTarget?: any): any;
+ function defineProperty(target: any, propertyKey: PropertyKey, attributes: PropertyDescriptor): boolean;
+ function deleteProperty(target: any, propertyKey: PropertyKey): boolean;
+ function enumerate(target: any): IterableIterator<any>;
+ function get(target: any, propertyKey: PropertyKey, receiver?: any): any;
+ function getOwnPropertyDescriptor(target: any, propertyKey: PropertyKey): PropertyDescriptor;
+ function getPrototypeOf(target: any): any;
+ function has(target: any, propertyKey: string): boolean;
+ function has(target: any, propertyKey: symbol): boolean;
+ function isExtensible(target: any): boolean;
+ function ownKeys(target: any): Array<PropertyKey>;
+ function preventExtensions(target: any): boolean;
+ function set(target: any, propertyKey: PropertyKey, value: any, receiver?: any): boolean;
+ function setPrototypeOf(target: any, proto: any): boolean;
+}
+
+/**
+ * Represents the completion of an asynchronous operation
+ */
+interface Promise<T> {
+ /**
+ * Attaches callbacks for the resolution and/or rejection of the Promise.
+ * @param onfulfilled The callback to execute when the Promise is resolved.
+ * @param onrejected The callback to execute when the Promise is rejected.
+ * @returns A Promise for the completion of which ever callback is executed.
+ */
+ then<TResult>(onfulfilled?: (value: T) => TResult | PromiseLike<TResult>, onrejected?: (reason: any) => TResult | PromiseLike<TResult>): Promise<TResult>;
+ then<TResult>(onfulfilled?: (value: T) => TResult | PromiseLike<TResult>, onrejected?: (reason: any) => void): Promise<TResult>;
+
+ /**
+ * Attaches a callback for only the rejection of the Promise.
+ * @param onrejected The callback to execute when the Promise is rejected.
+ * @returns A Promise for the completion of the callback.
+ */
+ catch(onrejected?: (reason: any) => T | PromiseLike<T>): Promise<T>;
+ catch(onrejected?: (reason: any) => void): Promise<T>;
+
+ [Symbol.toStringTag]: "Promise";
+}
+
+interface PromiseConstructor {
+ /**
+ * A reference to the prototype.
+ */
+ prototype: Promise<any>;
+
+ /**
+ * Creates a new Promise.
+ * @param executor A callback used to initialize the promise. This callback is passed two arguments:
+ * a resolve callback used resolve the promise with a value or the result of another promise,
+ * and a reject callback used to reject the promise with a provided reason or error.
+ */
+ new <T>(executor: (resolve: (value?: T | PromiseLike<T>) => void, reject: (reason?: any) => void) => void): Promise<T>;
+
+ /**
+ * Creates a Promise that is resolved with an array of results when all of the provided Promises
+ * resolve, or rejected when any Promise is rejected.
+ * @param values An array of Promises.
+ * @returns A new Promise.
+ */
+ all<T1, T2>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>]): Promise<[T1, T2]>;
+ all<T1, T2, T3>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>]): Promise<[T1, T2, T3]>;
+ all<T1, T2, T3, T4>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>]): Promise<[T1, T2, T3, T4]>;
+ all<T1, T2, T3, T4, T5>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>]): Promise<[T1, T2, T3, T4, T5]>;
+ all<T1, T2, T3, T4, T5, T6>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>]): Promise<[T1, T2, T3, T4, T5, T6]>;
+ all<T1, T2, T3, T4, T5, T6, T7>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>]): Promise<[T1, T2, T3, T4, T5, T6, T7]>;
+ all<T1, T2, T3, T4, T5, T6, T7, T8>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>, T8 | PromiseLike<T8>]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8]>;
+ all<T1, T2, T3, T4, T5, T6, T7, T8, T9>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>, T8 | PromiseLike<T8>, T9 | PromiseLike<T9>]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8, T9]>;
+ all<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>, T8 | PromiseLike<T8>, T9 | PromiseLike<T9>, T10 | PromiseLike<T10>]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]>;
+ all<TAll>(values: Iterable<TAll | PromiseLike<TAll>>): Promise<TAll[]>;
+
+ /**
+ * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved
+ * or rejected.
+ * @param values An array of Promises.
+ * @returns A new Promise.
+ */
+ race<T>(values: Iterable<T | PromiseLike<T>>): Promise<T>;
+
+ /**
+ * Creates a new rejected promise for the provided reason.
+ * @param reason The reason the promise was rejected.
+ * @returns A new rejected Promise.
+ */
+ reject(reason: any): Promise<void>;
+
+ /**
+ * Creates a new rejected promise for the provided reason.
+ * @param reason The reason the promise was rejected.
+ * @returns A new rejected Promise.
+ */
+ reject<T>(reason: any): Promise<T>;
+
+ /**
+ * Creates a new resolved promise for the provided value.
+ * @param value A promise.
+ * @returns A promise whose internal state matches the provided promise.
+ */
+ resolve<T>(value: T | PromiseLike<T>): Promise<T>;
+
+ /**
+ * Creates a new resolved promise .
+ * @returns A resolved promise.
+ */
+ resolve(): Promise<void>;
+
+ [Symbol.species]: Function;
+}
+
+declare var Promise: PromiseConstructor;
+/// <reference no-default-lib="true"/>
+
+/////////////////////////////
+/// ECMAScript APIs
+/////////////////////////////
+
+declare var NaN: number;
+declare var Infinity: number;
+
+/**
+ * Evaluates JavaScript code and executes it.
+ * @param x A String value that contains valid JavaScript code.
+ */
+declare function eval(x: string): any;
+
+/**
+ * Converts A string to an integer.
+ * @param s A string to convert into a number.
+ * @param radix A value between 2 and 36 that specifies the base of the number in numString.
+ * If this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.
+ * All other strings are considered decimal.
+ */
+declare function parseInt(s: string, radix?: number): number;
+
+/**
+ * Converts a string to a floating-point number.
+ * @param string A string that contains a floating-point number.
+ */
+declare function parseFloat(string: string): number;
+
+/**
+ * Returns a Boolean value that indicates whether a value is the reserved value NaN (not a number).
+ * @param number A numeric value.
+ */
+declare function isNaN(number: number): boolean;
+
+/**
+ * Determines whether a supplied number is finite.
+ * @param number Any numeric value.
+ */
+declare function isFinite(number: number): boolean;
+
+/**
+ * Gets the unencoded version of an encoded Uniform Resource Identifier (URI).
+ * @param encodedURI A value representing an encoded URI.
+ */
+declare function decodeURI(encodedURI: string): string;
+
+/**
+ * Gets the unencoded version of an encoded component of a Uniform Resource Identifier (URI).
+ * @param encodedURIComponent A value representing an encoded URI component.
+ */
+declare function decodeURIComponent(encodedURIComponent: string): string;
+
+/**
+ * Encodes a text string as a valid Uniform Resource Identifier (URI)
+ * @param uri A value representing an encoded URI.
+ */
+declare function encodeURI(uri: string): string;
+
+/**
+ * Encodes a text string as a valid component of a Uniform Resource Identifier (URI).
+ * @param uriComponent A value representing an encoded URI component.
+ */
+declare function encodeURIComponent(uriComponent: string): string;
+
+interface PropertyDescriptor {
+ configurable?: boolean;
+ enumerable?: boolean;
+ value?: any;
+ writable?: boolean;
+ get? (): any;
+ set? (v: any): void;
+}
+
+interface PropertyDescriptorMap {
+ [s: string]: PropertyDescriptor;
+}
+
+interface Object {
+ /** The initial value of Object.prototype.constructor is the standard built-in Object constructor. */
+ constructor: Function;
+
+ /** Returns a string representation of an object. */
+ toString(): string;
+
+ /** Returns a date converted to a string using the current locale. */
+ toLocaleString(): string;
+
+ /** Returns the primitive value of the specified object. */
+ valueOf(): Object;
+
+ /**
+ * Determines whether an object has a property with the specified name.
+ * @param v A property name.
+ */
+ hasOwnProperty(v: string): boolean;
+
+ /**
+ * Determines whether an object exists in another object's prototype chain.
+ * @param v Another object whose prototype chain is to be checked.
+ */
+ isPrototypeOf(v: Object): boolean;
+
+ /**
+ * Determines whether a specified property is enumerable.
+ * @param v A property name.
+ */
+ propertyIsEnumerable(v: string): boolean;
+}
+
+interface ObjectConstructor {
+ new (value?: any): Object;
+ (): any;
+ (value: any): any;
+
+ /** A reference to the prototype for a class of objects. */
+ prototype: Object;
+
+ /**
+ * Returns the prototype of an object.
+ * @param o The object that references the prototype.
+ */
+ getPrototypeOf(o: any): any;
+
+ /**
+ * Gets the own property descriptor of the specified object.
+ * An own property descriptor is one that is defined directly on the object and is not inherited from the object's prototype.
+ * @param o Object that contains the property.
+ * @param p Name of the property.
+ */
+ getOwnPropertyDescriptor(o: any, p: string): PropertyDescriptor;
+
+ /**
+ * Returns the names of the own properties of an object. The own properties of an object are those that are defined directly
+ * on that object, and are not inherited from the object's prototype. The properties of an object include both fields (objects) and functions.
+ * @param o Object that contains the own properties.
+ */
+ getOwnPropertyNames(o: any): string[];
+
+ /**
+ * Creates an object that has the specified prototype, and that optionally contains specified properties.
+ * @param o Object to use as a prototype. May be null
+ * @param properties JavaScript object that contains one or more property descriptors.
+ */
+ create(o: any, properties?: PropertyDescriptorMap): any;
+
+ /**
+ * Adds a property to an object, or modifies attributes of an existing property.
+ * @param o Object on which to add or modify the property. This can be a native JavaScript object (that is, a user-defined object or a built in object) or a DOM object.
+ * @param p The property name.
+ * @param attributes Descriptor for the property. It can be for a data property or an accessor property.
+ */
+ defineProperty(o: any, p: string, attributes: PropertyDescriptor): any;
+
+ /**
+ * Adds one or more properties to an object, and/or modifies attributes of existing properties.
+ * @param o Object on which to add or modify the properties. This can be a native JavaScript object or a DOM object.
+ * @param properties JavaScript object that contains one or more descriptor objects. Each descriptor object describes a data property or an accessor property.
+ */
+ defineProperties(o: any, properties: PropertyDescriptorMap): any;
+
+ /**
+ * Prevents the modification of attributes of existing properties, and prevents the addition of new properties.
+ * @param o Object on which to lock the attributes.
+ */
+ seal<T>(o: T): T;
+
+ /**
+ * Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
+ * @param o Object on which to lock the attributes.
+ */
+ freeze<T>(o: T): T;
+
+ /**
+ * Prevents the addition of new properties to an object.
+ * @param o Object to make non-extensible.
+ */
+ preventExtensions<T>(o: T): T;
+
+ /**
+ * Returns true if existing property attributes cannot be modified in an object and new properties cannot be added to the object.
+ * @param o Object to test.
+ */
+ isSealed(o: any): boolean;
+
+ /**
+ * Returns true if existing property attributes and values cannot be modified in an object, and new properties cannot be added to the object.
+ * @param o Object to test.
+ */
+ isFrozen(o: any): boolean;
+
+ /**
+ * Returns a value that indicates whether new properties can be added to an object.
+ * @param o Object to test.
+ */
+ isExtensible(o: any): boolean;
+
+ /**
+ * Returns the names of the enumerable properties and methods of an object.
+ * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
+ */
+ keys(o: any): string[];
+}
+
+/**
+ * Provides functionality common to all JavaScript objects.
+ */
+declare var Object: ObjectConstructor;
+
+/**
+ * Creates a new function.
+ */
+interface Function {
+ /**
+ * Calls the function, substituting the specified object for the this value of the function, and the specified array for the arguments of the function.
+ * @param thisArg The object to be used as the this object.
+ * @param argArray A set of arguments to be passed to the function.
+ */
+ apply(thisArg: any, argArray?: any): any;
+
+ /**
+ * Calls a method of an object, substituting another object for the current object.
+ * @param thisArg The object to be used as the current object.
+ * @param argArray A list of arguments to be passed to the method.
+ */
+ call(thisArg: any, ...argArray: any[]): any;
+
+ /**
+ * For a given function, creates a bound function that has the same body as the original function.
+ * The this object of the bound function is associated with the specified object, and has the specified initial parameters.
+ * @param thisArg An object to which the this keyword can refer inside the new function.
+ * @param argArray A list of arguments to be passed to the new function.
+ */
+ bind(thisArg: any, ...argArray: any[]): any;
+
+ prototype: any;
+ length: number;
+
+ // Non-standard extensions
+ arguments: any;
+ caller: Function;
+}
+
+interface FunctionConstructor {
+ /**
+ * Creates a new function.
+ * @param args A list of arguments the function accepts.
+ */
+ new (...args: string[]): Function;
+ (...args: string[]): Function;
+ prototype: Function;
+}
+
+declare var Function: FunctionConstructor;
+
+interface IArguments {
+ [index: number]: any;
+ length: number;
+ callee: Function;
+}
+
+interface String {
+ /** Returns a string representation of a string. */
+ toString(): string;
+
+ /**
+ * Returns the character at the specified index.
+ * @param pos The zero-based index of the desired character.
+ */
+ charAt(pos: number): string;
+
+ /**
+ * Returns the Unicode value of the character at the specified location.
+ * @param index The zero-based index of the desired character. If there is no character at the specified index, NaN is returned.
+ */
+ charCodeAt(index: number): number;
+
+ /**
+ * Returns a string that contains the concatenation of two or more strings.
+ * @param strings The strings to append to the end of the string.
+ */
+ concat(...strings: string[]): string;
+
+ /**
+ * Returns the position of the first occurrence of a substring.
+ * @param searchString The substring to search for in the string
+ * @param position The index at which to begin searching the String object. If omitted, search starts at the beginning of the string.
+ */
+ indexOf(searchString: string, position?: number): number;
+
+ /**
+ * Returns the last occurrence of a substring in the string.
+ * @param searchString The substring to search for.
+ * @param position The index at which to begin searching. If omitted, the search begins at the end of the string.
+ */
+ lastIndexOf(searchString: string, position?: number): number;
+
+ /**
+ * Determines whether two strings are equivalent in the current locale.
+ * @param that String to compare to target string
+ */
+ localeCompare(that: string): number;
+
+ /**
+ * Matches a string with a regular expression, and returns an array containing the results of that search.
+ * @param regexp A variable name or string literal containing the regular expression pattern and flags.
+ */
+ match(regexp: string): RegExpMatchArray;
+
+ /**
+ * Matches a string with a regular expression, and returns an array containing the results of that search.
+ * @param regexp A regular expression object that contains the regular expression pattern and applicable flags.
+ */
+ match(regexp: RegExp): RegExpMatchArray;
+
+ /**
+ * Replaces text in a string, using a regular expression or search string.
+ * @param searchValue A string that represents the regular expression.
+ * @param replaceValue A string containing the text to replace for every successful match of searchValue in this string.
+ */
+ replace(searchValue: string, replaceValue: string): string;
+
+ /**
+ * Replaces text in a string, using a regular expression or search string.
+ * @param searchValue A string that represents the regular expression.
+ * @param replacer A function that returns the replacement text.
+ */
+ replace(searchValue: string, replacer: (substring: string, ...args: any[]) => string): string;
+
+ /**
+ * Replaces text in a string, using a regular expression or search string.
+ * @param searchValue A Regular Expression object containing the regular expression pattern and applicable flags.
+ * @param replaceValue A string containing the text to replace for every successful match of searchValue in this string.
+ */
+ replace(searchValue: RegExp, replaceValue: string): string;
+
+ /**
+ * Replaces text in a string, using a regular expression or search string.
+ * @param searchValue A Regular Expression object containing the regular expression pattern and applicable flags
+ * @param replacer A function that returns the replacement text.
+ */
+ replace(searchValue: RegExp, replacer: (substring: string, ...args: any[]) => string): string;
+
+ /**
+ * Finds the first substring match in a regular expression search.
+ * @param regexp The regular expression pattern and applicable flags.
+ */
+ search(regexp: string): number;
+
+ /**
+ * Finds the first substring match in a regular expression search.
+ * @param regexp The regular expression pattern and applicable flags.
+ */
+ search(regexp: RegExp): number;
+
+ /**
+ * Returns a section of a string.
+ * @param start The index to the beginning of the specified portion of stringObj.
+ * @param end The index to the end of the specified portion of stringObj. The substring includes the characters up to, but not including, the character indicated by end.
+ * If this value is not specified, the substring continues to the end of stringObj.
+ */
+ slice(start?: number, end?: number): string;
+
+ /**
+ * Split a string into substrings using the specified separator and return them as an array.
+ * @param separator A string that identifies character or characters to use in separating the string. If omitted, a single-element array containing the entire string is returned.
+ * @param limit A value used to limit the number of elements returned in the array.
+ */
+ split(separator: string, limit?: number): string[];
+
+ /**
+ * Split a string into substrings using the specified separator and return them as an array.
+ * @param separator A Regular Express that identifies character or characters to use in separating the string. If omitted, a single-element array containing the entire string is returned.
+ * @param limit A value used to limit the number of elements returned in the array.
+ */
+ split(separator: RegExp, limit?: number): string[];
+
+ /**
+ * Returns the substring at the specified location within a String object.
+ * @param start The zero-based index number indicating the beginning of the substring.
+ * @param end Zero-based index number indicating the end of the substring. The substring includes the characters up to, but not including, the character indicated by end.
+ * If end is omitted, the characters from start through the end of the original string are returned.
+ */
+ substring(start: number, end?: number): string;
+
+ /** Converts all the alphabetic characters in a string to lowercase. */
+ toLowerCase(): string;
+
+ /** Converts all alphabetic characters to lowercase, taking into account the host environment's current locale. */
+ toLocaleLowerCase(): string;
+
+ /** Converts all the alphabetic characters in a string to uppercase. */
+ toUpperCase(): string;
+
+ /** Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale. */
+ toLocaleUpperCase(): string;
+
+ /** Removes the leading and trailing white space and line terminator characters from a string. */
+ trim(): string;
+
+ /** Returns the length of a String object. */
+ length: number;
+
+ // IE extensions
+ /**
+ * Gets a substring beginning at the specified location and having the specified length.
+ * @param from The starting position of the desired substring. The index of the first character in the string is zero.
+ * @param length The number of characters to include in the returned substring.
+ */
+ substr(from: number, length?: number): string;
+
+ /** Returns the primitive value of the specified object. */
+ valueOf(): string;
+
+ [index: number]: string;
+}
+
+interface StringConstructor {
+ new (value?: any): String;
+ (value?: any): string;
+ prototype: String;
+ fromCharCode(...codes: number[]): string;
+}
+
+/**
+ * Allows manipulation and formatting of text strings and determination and location of substrings within strings.
+ */
+declare var String: StringConstructor;
+
+interface Boolean {
+ /** Returns the primitive value of the specified object. */
+ valueOf(): boolean;
+}
+
+interface BooleanConstructor {
+ new (value?: any): Boolean;
+ (value?: any): boolean;
+ prototype: Boolean;
+}
+
+declare var Boolean: BooleanConstructor;
+
+interface Number {
+ /**
+ * Returns a string representation of an object.
+ * @param radix Specifies a radix for converting numeric values to strings. This value is only used for numbers.
+ */
+ toString(radix?: number): string;
+
+ /**
+ * Returns a string representing a number in fixed-point notation.
+ * @param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 20, inclusive.
+ */
+ toFixed(fractionDigits?: number): string;
+
+ /**
+ * Returns a string containing a number represented in exponential notation.
+ * @param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 20, inclusive.
+ */
+ toExponential(fractionDigits?: number): string;
+
+ /**
+ * Returns a string containing a number represented either in exponential or fixed-point notation with a specified number of digits.
+ * @param precision Number of significant digits. Must be in the range 1 - 21, inclusive.
+ */
+ toPrecision(precision?: number): string;
+
+ /** Returns the primitive value of the specified object. */
+ valueOf(): number;
+}
+
+interface NumberConstructor {
+ new (value?: any): Number;
+ (value?: any): number;
+ prototype: Number;
+
+ /** The largest number that can be represented in JavaScript. Equal to approximately 1.79E+308. */
+ MAX_VALUE: number;
+
+ /** The closest number to zero that can be represented in JavaScript. Equal to approximately 5.00E-324. */
+ MIN_VALUE: number;
+
+ /**
+ * A value that is not a number.
+ * In equality comparisons, NaN does not equal any value, including itself. To test whether a value is equivalent to NaN, use the isNaN function.
+ */
+ NaN: number;
+
+ /**
+ * A value that is less than the largest negative number that can be represented in JavaScript.
+ * JavaScript displays NEGATIVE_INFINITY values as -infinity.
+ */
+ NEGATIVE_INFINITY: number;
+
+ /**
+ * A value greater than the largest number that can be represented in JavaScript.
+ * JavaScript displays POSITIVE_INFINITY values as infinity.
+ */
+ POSITIVE_INFINITY: number;
+}
+
+/** An object that represents a number of any kind. All JavaScript numbers are 64-bit floating-point numbers. */
+declare var Number: NumberConstructor;
+
+interface TemplateStringsArray extends Array<string> {
+ raw: string[];
+}
+
+interface Math {
+ /** The mathematical constant e. This is Euler's number, the base of natural logarithms. */
+ E: number;
+ /** The natural logarithm of 10. */
+ LN10: number;
+ /** The natural logarithm of 2. */
+ LN2: number;
+ /** The base-2 logarithm of e. */
+ LOG2E: number;
+ /** The base-10 logarithm of e. */
+ LOG10E: number;
+ /** Pi. This is the ratio of the circumference of a circle to its diameter. */
+ PI: number;
+ /** The square root of 0.5, or, equivalently, one divided by the square root of 2. */
+ SQRT1_2: number;
+ /** The square root of 2. */
+ SQRT2: number;
+ /**
+ * Returns the absolute value of a number (the value without regard to whether it is positive or negative).
+ * For example, the absolute value of -5 is the same as the absolute value of 5.
+ * @param x A numeric expression for which the absolute value is needed.
+ */
+ abs(x: number): number;
+ /**
+ * Returns the arc cosine (or inverse cosine) of a number.
+ * @param x A numeric expression.
+ */
+ acos(x: number): number;
+ /**
+ * Returns the arcsine of a number.
+ * @param x A numeric expression.
+ */
+ asin(x: number): number;
+ /**
+ * Returns the arctangent of a number.
+ * @param x A numeric expression for which the arctangent is needed.
+ */
+ atan(x: number): number;
+ /**
+ * Returns the angle (in radians) from the X axis to a point.
+ * @param y A numeric expression representing the cartesian y-coordinate.
+ * @param x A numeric expression representing the cartesian x-coordinate.
+ */
+ atan2(y: number, x: number): number;
+ /**
+ * Returns the smallest number greater than or equal to its numeric argument.
+ * @param x A numeric expression.
+ */
+ ceil(x: number): number;
+ /**
+ * Returns the cosine of a number.
+ * @param x A numeric expression that contains an angle measured in radians.
+ */
+ cos(x: number): number;
+ /**
+ * Returns e (the base of natural logarithms) raised to a power.
+ * @param x A numeric expression representing the power of e.
+ */
+ exp(x: number): number;
+ /**
+ * Returns the greatest number less than or equal to its numeric argument.
+ * @param x A numeric expression.
+ */
+ floor(x: number): number;
+ /**
+ * Returns the natural logarithm (base e) of a number.
+ * @param x A numeric expression.
+ */
+ log(x: number): number;
+ /**
+ * Returns the larger of a set of supplied numeric expressions.
+ * @param values Numeric expressions to be evaluated.
+ */
+ max(...values: number[]): number;
+ /**
+ * Returns the smaller of a set of supplied numeric expressions.
+ * @param values Numeric expressions to be evaluated.
+ */
+ min(...values: number[]): number;
+ /**
+ * Returns the value of a base expression taken to a specified power.
+ * @param x The base value of the expression.
+ * @param y The exponent value of the expression.
+ */
+ pow(x: number, y: number): number;
+ /** Returns a pseudorandom number between 0 and 1. */
+ random(): number;
+ /**
+ * Returns a supplied numeric expression rounded to the nearest number.
+ * @param x The value to be rounded to the nearest number.
+ */
+ round(x: number): number;
+ /**
+ * Returns the sine of a number.
+ * @param x A numeric expression that contains an angle measured in radians.
+ */
+ sin(x: number): number;
+ /**
+ * Returns the square root of a number.
+ * @param x A numeric expression.
+ */
+ sqrt(x: number): number;
+ /**
+ * Returns the tangent of a number.
+ * @param x A numeric expression that contains an angle measured in radians.
+ */
+ tan(x: number): number;
+}
+/** An intrinsic object that provides basic mathematics functionality and constants. */
+declare var Math: Math;
+
+/** Enables basic storage and retrieval of dates and times. */
+interface Date {
+ /** Returns a string representation of a date. The format of the string depends on the locale. */
+ toString(): string;
+ /** Returns a date as a string value. */
+ toDateString(): string;
+ /** Returns a time as a string value. */
+ toTimeString(): string;
+ /** Returns a value as a string value appropriate to the host environment's current locale. */
+ toLocaleString(): string;
+ /** Returns a date as a string value appropriate to the host environment's current locale. */
+ toLocaleDateString(): string;
+ /** Returns a time as a string value appropriate to the host environment's current locale. */
+ toLocaleTimeString(): string;
+ /** Returns the stored time value in milliseconds since midnight, January 1, 1970 UTC. */
+ valueOf(): number;
+ /** Gets the time value in milliseconds. */
+ getTime(): number;
+ /** Gets the year, using local time. */
+ getFullYear(): number;
+ /** Gets the year using Universal Coordinated Time (UTC). */
+ getUTCFullYear(): number;
+ /** Gets the month, using local time. */
+ getMonth(): number;
+ /** Gets the month of a Date object using Universal Coordinated Time (UTC). */
+ getUTCMonth(): number;
+ /** Gets the day-of-the-month, using local time. */
+ getDate(): number;
+ /** Gets the day-of-the-month, using Universal Coordinated Time (UTC). */
+ getUTCDate(): number;
+ /** Gets the day of the week, using local time. */
+ getDay(): number;
+ /** Gets the day of the week using Universal Coordinated Time (UTC). */
+ getUTCDay(): number;
+ /** Gets the hours in a date, using local time. */
+ getHours(): number;
+ /** Gets the hours value in a Date object using Universal Coordinated Time (UTC). */
+ getUTCHours(): number;
+ /** Gets the minutes of a Date object, using local time. */
+ getMinutes(): number;
+ /** Gets the minutes of a Date object using Universal Coordinated Time (UTC). */
+ getUTCMinutes(): number;
+ /** Gets the seconds of a Date object, using local time. */
+ getSeconds(): number;
+ /** Gets the seconds of a Date object using Universal Coordinated Time (UTC). */
+ getUTCSeconds(): number;
+ /** Gets the milliseconds of a Date, using local time. */
+ getMilliseconds(): number;
+ /** Gets the milliseconds of a Date object using Universal Coordinated Time (UTC). */
+ getUTCMilliseconds(): number;
+ /** Gets the difference in minutes between the time on the local computer and Universal Coordinated Time (UTC). */
+ getTimezoneOffset(): number;
+ /**
+ * Sets the date and time value in the Date object.
+ * @param time A numeric value representing the number of elapsed milliseconds since midnight, January 1, 1970 GMT.
+ */
+ setTime(time: number): number;
+ /**
+ * Sets the milliseconds value in the Date object using local time.
+ * @param ms A numeric value equal to the millisecond value.
+ */
+ setMilliseconds(ms: number): number;
+ /**
+ * Sets the milliseconds value in the Date object using Universal Coordinated Time (UTC).
+ * @param ms A numeric value equal to the millisecond value.
+ */
+ setUTCMilliseconds(ms: number): number;
+
+ /**
+ * Sets the seconds value in the Date object using local time.
+ * @param sec A numeric value equal to the seconds value.
+ * @param ms A numeric value equal to the milliseconds value.
+ */
+ setSeconds(sec: number, ms?: number): number;
+ /**
+ * Sets the seconds value in the Date object using Universal Coordinated Time (UTC).
+ * @param sec A numeric value equal to the seconds value.
+ * @param ms A numeric value equal to the milliseconds value.
+ */
+ setUTCSeconds(sec: number, ms?: number): number;
+ /**
+ * Sets the minutes value in the Date object using local time.
+ * @param min A numeric value equal to the minutes value.
+ * @param sec A numeric value equal to the seconds value.
+ * @param ms A numeric value equal to the milliseconds value.
+ */
+ setMinutes(min: number, sec?: number, ms?: number): number;
+ /**
+ * Sets the minutes value in the Date object using Universal Coordinated Time (UTC).
+ * @param min A numeric value equal to the minutes value.
+ * @param sec A numeric value equal to the seconds value.
+ * @param ms A numeric value equal to the milliseconds value.
+ */
+ setUTCMinutes(min: number, sec?: number, ms?: number): number;
+ /**
+ * Sets the hour value in the Date object using local time.
+ * @param hours A numeric value equal to the hours value.
+ * @param min A numeric value equal to the minutes value.
+ * @param sec A numeric value equal to the seconds value.
+ * @param ms A numeric value equal to the milliseconds value.
+ */
+ setHours(hours: number, min?: number, sec?: number, ms?: number): number;
+ /**
+ * Sets the hours value in the Date object using Universal Coordinated Time (UTC).
+ * @param hours A numeric value equal to the hours value.
+ * @param min A numeric value equal to the minutes value.
+ * @param sec A numeric value equal to the seconds value.
+ * @param ms A numeric value equal to the milliseconds value.
+ */
+ setUTCHours(hours: number, min?: number, sec?: number, ms?: number): number;
+ /**
+ * Sets the numeric day-of-the-month value of the Date object using local time.
+ * @param date A numeric value equal to the day of the month.
+ */
+ setDate(date: number): number;
+ /**
+ * Sets the numeric day of the month in the Date object using Universal Coordinated Time (UTC).
+ * @param date A numeric value equal to the day of the month.
+ */
+ setUTCDate(date: number): number;
+ /**
+ * Sets the month value in the Date object using local time.
+ * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively.
+ * @param date A numeric value representing the day of the month. If this value is not supplied, the value from a call to the getDate method is used.
+ */
+ setMonth(month: number, date?: number): number;
+ /**
+ * Sets the month value in the Date object using Universal Coordinated Time (UTC).
+ * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively.
+ * @param date A numeric value representing the day of the month. If it is not supplied, the value from a call to the getUTCDate method is used.
+ */
+ setUTCMonth(month: number, date?: number): number;
+ /**
+ * Sets the year of the Date object using local time.
+ * @param year A numeric value for the year.
+ * @param month A zero-based numeric value for the month (0 for January, 11 for December). Must be specified if numDate is specified.
+ * @param date A numeric value equal for the day of the month.
+ */
+ setFullYear(year: number, month?: number, date?: number): number;
+ /**
+ * Sets the year value in the Date object using Universal Coordinated Time (UTC).
+ * @param year A numeric value equal to the year.
+ * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively. Must be supplied if numDate is supplied.
+ * @param date A numeric value equal to the day of the month.
+ */
+ setUTCFullYear(year: number, month?: number, date?: number): number;
+ /** Returns a date converted to a string using Universal Coordinated Time (UTC). */
+ toUTCString(): string;
+ /** Returns a date as a string value in ISO format. */
+ toISOString(): string;
+ /** Used by the JSON.stringify method to enable the transformation of an object's data for JavaScript Object Notation (JSON) serialization. */
+ toJSON(key?: any): string;
+}
+
+interface DateConstructor {
+ new (): Date;
+ new (value: number): Date;
+ new (value: string): Date;
+ new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date;
+ (): string;
+ prototype: Date;
+ /**
+ * Parses a string containing a date, and returns the number of milliseconds between that date and midnight, January 1, 1970.
+ * @param s A date string
+ */
+ parse(s: string): number;
+ /**
+ * Returns the number of milliseconds between midnight, January 1, 1970 Universal Coordinated Time (UTC) (or GMT) and the specified date.
+ * @param year The full year designation is required for cross-century date accuracy. If year is between 0 and 99 is used, then year is assumed to be 1900 + year.
+ * @param month The month as an number between 0 and 11 (January to December).
+ * @param date The date as an number between 1 and 31.
+ * @param hours Must be supplied if minutes is supplied. An number from 0 to 23 (midnight to 11pm) that specifies the hour.
+ * @param minutes Must be supplied if seconds is supplied. An number from 0 to 59 that specifies the minutes.
+ * @param seconds Must be supplied if milliseconds is supplied. An number from 0 to 59 that specifies the seconds.
+ * @param ms An number from 0 to 999 that specifies the milliseconds.
+ */
+ UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number;
+ now(): number;
+}
+
+declare var Date: DateConstructor;
+
+interface RegExpMatchArray extends Array<string> {
+ index?: number;
+ input?: string;
+}
+
+interface RegExpExecArray extends Array<string> {
+ index: number;
+ input: string;
+}
+
+interface RegExp {
+ /**
+ * Executes a search on a string using a regular expression pattern, and returns an array containing the results of that search.
+ * @param string The String object or string literal on which to perform the search.
+ */
+ exec(string: string): RegExpExecArray;
+
+ /**
+ * Returns a Boolean value that indicates whether or not a pattern exists in a searched string.
+ * @param string String on which to perform the search.
+ */
+ test(string: string): boolean;
+
+ /** Returns a copy of the text of the regular expression pattern. Read-only. The regExp argument is a Regular expression object. It can be a variable name or a literal. */
+ source: string;
+
+ /** Returns a Boolean value indicating the state of the global flag (g) used with a regular expression. Default is false. Read-only. */
+ global: boolean;
+
+ /** Returns a Boolean value indicating the state of the ignoreCase flag (i) used with a regular expression. Default is false. Read-only. */
+ ignoreCase: boolean;
+
+ /** Returns a Boolean value indicating the state of the multiline flag (m) used with a regular expression. Default is false. Read-only. */
+ multiline: boolean;
+
+ lastIndex: number;
+
+ // Non-standard extensions
+ compile(): RegExp;
+}
+
+interface RegExpConstructor {
+ new (pattern: string, flags?: string): RegExp;
+ (pattern: string, flags?: string): RegExp;
+ prototype: RegExp;
+
+ // Non-standard extensions
+ $1: string;
+ $2: string;
+ $3: string;
+ $4: string;
+ $5: string;
+ $6: string;
+ $7: string;
+ $8: string;
+ $9: string;
+ lastMatch: string;
+}
+
+declare var RegExp: RegExpConstructor;
+
+interface Error {
+ name: string;
+ message: string;
+}
+
+interface ErrorConstructor {
+ new (message?: string): Error;
+ (message?: string): Error;
+ prototype: Error;
+}
+
+declare var Error: ErrorConstructor;
+
+interface EvalError extends Error {
+}
+
+interface EvalErrorConstructor {
+ new (message?: string): EvalError;
+ (message?: string): EvalError;
+ prototype: EvalError;
+}
+
+declare var EvalError: EvalErrorConstructor;
+
+interface RangeError extends Error {
+}
+
+interface RangeErrorConstructor {
+ new (message?: string): RangeError;
+ (message?: string): RangeError;
+ prototype: RangeError;
+}
+
+declare var RangeError: RangeErrorConstructor;
+
+interface ReferenceError extends Error {
+}
+
+interface ReferenceErrorConstructor {
+ new (message?: string): ReferenceError;
+ (message?: string): ReferenceError;
+ prototype: ReferenceError;
+}
+
+declare var ReferenceError: ReferenceErrorConstructor;
+
+interface SyntaxError extends Error {
+}
+
+interface SyntaxErrorConstructor {
+ new (message?: string): SyntaxError;
+ (message?: string): SyntaxError;
+ prototype: SyntaxError;
+}
+
+declare var SyntaxError: SyntaxErrorConstructor;
+
+interface TypeError extends Error {
+}
+
+interface TypeErrorConstructor {
+ new (message?: string): TypeError;
+ (message?: string): TypeError;
+ prototype: TypeError;
+}
+
+declare var TypeError: TypeErrorConstructor;
+
+interface URIError extends Error {
+}
+
+interface URIErrorConstructor {
+ new (message?: string): URIError;
+ (message?: string): URIError;
+ prototype: URIError;
+}
+
+declare var URIError: URIErrorConstructor;
+
+interface JSON {
+ /**
+ * Converts a JavaScript Object Notation (JSON) string into an object.
+ * @param text A valid JSON string.
+ * @param reviver A function that transforms the results. This function is called for each member of the object.
+ * If a member contains nested objects, the nested objects are transformed before the parent object is.
+ */
+ parse(text: string, reviver?: (key: any, value: any) => any): any;
+ /**
+ * Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
+ * @param value A JavaScript value, usually an object or array, to be converted.
+ */
+ stringify(value: any): string;
+ /**
+ * Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
+ * @param value A JavaScript value, usually an object or array, to be converted.
+ * @param replacer A function that transforms the results.
+ */
+ stringify(value: any, replacer: (key: string, value: any) => any): string;
+ /**
+ * Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
+ * @param value A JavaScript value, usually an object or array, to be converted.
+ * @param replacer Array that transforms the results.
+ */
+ stringify(value: any, replacer: any[]): string;
+ /**
+ * Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
+ * @param value A JavaScript value, usually an object or array, to be converted.
+ * @param replacer A function that transforms the results.
+ * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.
+ */
+ stringify(value: any, replacer: (key: string, value: any) => any, space: string | number): string;
+ /**
+ * Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
+ * @param value A JavaScript value, usually an object or array, to be converted.
+ * @param replacer Array that transforms the results.
+ * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.
+ */
+ stringify(value: any, replacer: any[], space: string | number): string;
+}
+/**
+ * An intrinsic object that provides functions to convert JavaScript values to and from the JavaScript Object Notation (JSON) format.
+ */
+declare var JSON: JSON;
+
+
+/////////////////////////////
+/// ECMAScript Array API (specially handled by compiler)
+/////////////////////////////
+
+interface Array<T> {
+ /**
+ * Gets or sets the length of the array. This is a number one higher than the highest element defined in an array.
+ */
+ length: number;
+ /**
+ * Returns a string representation of an array.
+ */
+ toString(): string;
+ toLocaleString(): string;
+ /**
+ * Appends new elements to an array, and returns the new length of the array.
+ * @param items New elements of the Array.
+ */
+ push(...items: T[]): number;
+ /**
+ * Removes the last element from an array and returns it.
+ */
+ pop(): T;
+ /**
+ * Combines two or more arrays.
+ * @param items Additional items to add to the end of array1.
+ */
+ concat<U extends T[]>(...items: U[]): T[];
+ /**
+ * Combines two or more arrays.
+ * @param items Additional items to add to the end of array1.
+ */
+ concat(...items: T[]): T[];
+ /**
+ * Adds all the elements of an array separated by the specified separator string.
+ * @param separator A string used to separate one element of an array from the next in the resulting String. If omitted, the array elements are separated with a comma.
+ */
+ join(separator?: string): string;
+ /**
+ * Reverses the elements in an Array.
+ */
+ reverse(): T[];
+ /**
+ * Removes the first element from an array and returns it.
+ */
+ shift(): T;
+ /**
+ * Returns a section of an array.
+ * @param start The beginning of the specified portion of the array.
+ * @param end The end of the specified portion of the array.
+ */
+ slice(start?: number, end?: number): T[];
+
+ /**
+ * Sorts an array.
+ * @param compareFn The name of the function used to determine the order of the elements. If omitted, the elements are sorted in ascending, ASCII character order.
+ */
+ sort(compareFn?: (a: T, b: T) => number): T[];
+
+ /**
+ * Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.
+ * @param start The zero-based location in the array from which to start removing elements.
+ */
+ splice(start: number): T[];
+
+ /**
+ * Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.
+ * @param start The zero-based location in the array from which to start removing elements.
+ * @param deleteCount The number of elements to remove.
+ * @param items Elements to insert into the array in place of the deleted elements.
+ */
+ splice(start: number, deleteCount: number, ...items: T[]): T[];
+
+ /**
+ * Inserts new elements at the start of an array.
+ * @param items Elements to insert at the start of the Array.
+ */
+ unshift(...items: T[]): number;
+
+ /**
+ * Returns the index of the first occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0.
+ */
+ indexOf(searchElement: T, fromIndex?: number): number;
+
+ /**
+ * Returns the index of the last occurrence of a specified value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at the last index in the array.
+ */
+ lastIndexOf(searchElement: T, fromIndex?: number): number;
+
+ /**
+ * Determines whether all the members of an array satisfy the specified test.
+ * @param callbackfn A function that accepts up to three arguments. The every method calls the callbackfn function for each element in array1 until the callbackfn returns false, or until the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
+ */
+ every(callbackfn: (value: T, index: number, array: T[]) => boolean, thisArg?: any): boolean;
+
+ /**
+ * Determines whether the specified callback function returns true for any element of an array.
+ * @param callbackfn A function that accepts up to three arguments. The some method calls the callbackfn function for each element in array1 until the callbackfn returns true, or until the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
+ */
+ some(callbackfn: (value: T, index: number, array: T[]) => boolean, thisArg?: any): boolean;
+
+ /**
+ * Performs the specified action for each element in an array.
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
+ */
+ forEach(callbackfn: (value: T, index: number, array: T[]) => void, thisArg?: any): void;
+
+ /**
+ * Calls a defined callback function on each element of an array, and returns an array that contains the results.
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
+ */
+ map<U>(callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): U[];
+
+ /**
+ * Returns the elements of an array that meet the condition specified in a callback function.
+ * @param callbackfn A function that accepts up to three arguments. The filter method calls the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
+ */
+ filter(callbackfn: (value: T, index: number, array: T[]) => boolean, thisArg?: any): T[];
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
+ */
+ reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue?: T): T;
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
+ */
+ reduce<U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
+ */
+ reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue?: T): T;
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
+ */
+ reduceRight<U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U;
+
+ [n: number]: T;
+}
+
+interface ArrayConstructor {
+ new (arrayLength?: number): any[];
+ new <T>(arrayLength: number): T[];
+ new <T>(...items: T[]): T[];
+ (arrayLength?: number): any[];
+ <T>(arrayLength: number): T[];
+ <T>(...items: T[]): T[];
+ isArray(arg: any): arg is Array<any>;
+ prototype: Array<any>;
+}
+
+declare var Array: ArrayConstructor;
+
+interface TypedPropertyDescriptor<T> {
+ enumerable?: boolean;
+ configurable?: boolean;
+ writable?: boolean;
+ value?: T;
+ get?: () => T;
+ set?: (value: T) => void;
+}
+
+declare type ClassDecorator = <TFunction extends Function>(target: TFunction) => TFunction | void;
+declare type PropertyDecorator = (target: Object, propertyKey: string | symbol) => void;
+declare type MethodDecorator = <T>(target: Object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<T>) => TypedPropertyDescriptor<T> | void;
+declare type ParameterDecorator = (target: Object, propertyKey: string | symbol, parameterIndex: number) => void;
+
+declare type PromiseConstructorLike = new <T>(executor: (resolve: (value?: T | PromiseLike<T>) => void, reject: (reason?: any) => void) => void) => PromiseLike<T>;
+
+interface PromiseLike<T> {
+ /**
+ * Attaches callbacks for the resolution and/or rejection of the Promise.
+ * @param onfulfilled The callback to execute when the Promise is resolved.
+ * @param onrejected The callback to execute when the Promise is rejected.
+ * @returns A Promise for the completion of which ever callback is executed.
+ */
+ then<TResult>(onfulfilled?: (value: T) => TResult | PromiseLike<TResult>, onrejected?: (reason: any) => TResult | PromiseLike<TResult>): PromiseLike<TResult>;
+ then<TResult>(onfulfilled?: (value: T) => TResult | PromiseLike<TResult>, onrejected?: (reason: any) => void): PromiseLike<TResult>;
+}
+
+interface ArrayLike<T> {
+ length: number;
+ [n: number]: T;
+}
+
+
+/**
+ * Represents a raw buffer of binary data, which is used to store data for the
+ * different typed arrays. ArrayBuffers cannot be read from or written to directly,
+ * but can be passed to a typed array or DataView Object to interpret the raw
+ * buffer as needed.
+ */
+interface ArrayBuffer {
+ /**
+ * Read-only. The length of the ArrayBuffer (in bytes).
+ */
+ byteLength: number;
+
+ /**
+ * Returns a section of an ArrayBuffer.
+ */
+ slice(begin:number, end?:number): ArrayBuffer;
+}
+
+interface ArrayBufferConstructor {
+ prototype: ArrayBuffer;
+ new (byteLength: number): ArrayBuffer;
+ isView(arg: any): arg is ArrayBufferView;
+}
+declare var ArrayBuffer: ArrayBufferConstructor;
+
+interface ArrayBufferView {
+ /**
+ * The ArrayBuffer instance referenced by the array.
+ */
+ buffer: ArrayBuffer;
+
+ /**
+ * The length in bytes of the array.
+ */
+ byteLength: number;
+
+ /**
+ * The offset in bytes of the array.
+ */
+ byteOffset: number;
+}
+
+interface DataView {
+ buffer: ArrayBuffer;
+ byteLength: number;
+ byteOffset: number;
+ /**
+ * Gets the Float32 value at the specified byte offset from the start of the view. There is
+ * no alignment constraint; multi-byte values may be fetched from any offset.
+ * @param byteOffset The place in the buffer at which the value should be retrieved.
+ */
+ getFloat32(byteOffset: number, littleEndian?: boolean): number;
+
+ /**
+ * Gets the Float64 value at the specified byte offset from the start of the view. There is
+ * no alignment constraint; multi-byte values may be fetched from any offset.
+ * @param byteOffset The place in the buffer at which the value should be retrieved.
+ */
+ getFloat64(byteOffset: number, littleEndian?: boolean): number;
+
+ /**
+ * Gets the Int8 value at the specified byte offset from the start of the view. There is
+ * no alignment constraint; multi-byte values may be fetched from any offset.
+ * @param byteOffset The place in the buffer at which the value should be retrieved.
+ */
+ getInt8(byteOffset: number): number;
+
+ /**
+ * Gets the Int16 value at the specified byte offset from the start of the view. There is
+ * no alignment constraint; multi-byte values may be fetched from any offset.
+ * @param byteOffset The place in the buffer at which the value should be retrieved.
+ */
+ getInt16(byteOffset: number, littleEndian?: boolean): number;
+ /**
+ * Gets the Int32 value at the specified byte offset from the start of the view. There is
+ * no alignment constraint; multi-byte values may be fetched from any offset.
+ * @param byteOffset The place in the buffer at which the value should be retrieved.
+ */
+ getInt32(byteOffset: number, littleEndian?: boolean): number;
+
+ /**
+ * Gets the Uint8 value at the specified byte offset from the start of the view. There is
+ * no alignment constraint; multi-byte values may be fetched from any offset.
+ * @param byteOffset The place in the buffer at which the value should be retrieved.
+ */
+ getUint8(byteOffset: number): number;
+
+ /**
+ * Gets the Uint16 value at the specified byte offset from the start of the view. There is
+ * no alignment constraint; multi-byte values may be fetched from any offset.
+ * @param byteOffset The place in the buffer at which the value should be retrieved.
+ */
+ getUint16(byteOffset: number, littleEndian?: boolean): number;
+
+ /**
+ * Gets the Uint32 value at the specified byte offset from the start of the view. There is
+ * no alignment constraint; multi-byte values may be fetched from any offset.
+ * @param byteOffset The place in the buffer at which the value should be retrieved.
+ */
+ getUint32(byteOffset: number, littleEndian?: boolean): number;
+
+ /**
+ * Stores an Float32 value at the specified byte offset from the start of the view.
+ * @param byteOffset The place in the buffer at which the value should be set.
+ * @param value The value to set.
+ * @param littleEndian If false or undefined, a big-endian value should be written,
+ * otherwise a little-endian value should be written.
+ */
+ setFloat32(byteOffset: number, value: number, littleEndian?: boolean): void;
+
+ /**
+ * Stores an Float64 value at the specified byte offset from the start of the view.
+ * @param byteOffset The place in the buffer at which the value should be set.
+ * @param value The value to set.
+ * @param littleEndian If false or undefined, a big-endian value should be written,
+ * otherwise a little-endian value should be written.
+ */
+ setFloat64(byteOffset: number, value: number, littleEndian?: boolean): void;
+
+ /**
+ * Stores an Int8 value at the specified byte offset from the start of the view.
+ * @param byteOffset The place in the buffer at which the value should be set.
+ * @param value The value to set.
+ */
+ setInt8(byteOffset: number, value: number): void;
+
+ /**
+ * Stores an Int16 value at the specified byte offset from the start of the view.
+ * @param byteOffset The place in the buffer at which the value should be set.
+ * @param value The value to set.
+ * @param littleEndian If false or undefined, a big-endian value should be written,
+ * otherwise a little-endian value should be written.
+ */
+ setInt16(byteOffset: number, value: number, littleEndian?: boolean): void;
+
+ /**
+ * Stores an Int32 value at the specified byte offset from the start of the view.
+ * @param byteOffset The place in the buffer at which the value should be set.
+ * @param value The value to set.
+ * @param littleEndian If false or undefined, a big-endian value should be written,
+ * otherwise a little-endian value should be written.
+ */
+ setInt32(byteOffset: number, value: number, littleEndian?: boolean): void;
+
+ /**
+ * Stores an Uint8 value at the specified byte offset from the start of the view.
+ * @param byteOffset The place in the buffer at which the value should be set.
+ * @param value The value to set.
+ */
+ setUint8(byteOffset: number, value: number): void;
+
+ /**
+ * Stores an Uint16 value at the specified byte offset from the start of the view.
+ * @param byteOffset The place in the buffer at which the value should be set.
+ * @param value The value to set.
+ * @param littleEndian If false or undefined, a big-endian value should be written,
+ * otherwise a little-endian value should be written.
+ */
+ setUint16(byteOffset: number, value: number, littleEndian?: boolean): void;
+
+ /**
+ * Stores an Uint32 value at the specified byte offset from the start of the view.
+ * @param byteOffset The place in the buffer at which the value should be set.
+ * @param value The value to set.
+ * @param littleEndian If false or undefined, a big-endian value should be written,
+ * otherwise a little-endian value should be written.
+ */
+ setUint32(byteOffset: number, value: number, littleEndian?: boolean): void;
+}
+
+interface DataViewConstructor {
+ new (buffer: ArrayBuffer, byteOffset?: number, byteLength?: number): DataView;
+}
+declare var DataView: DataViewConstructor;
+
+/**
+ * A typed array of 8-bit integer values. The contents are initialized to 0. If the requested
+ * number of bytes could not be allocated an exception is raised.
+ */
+interface Int8Array {
+ /**
+ * The size in bytes of each element in the array.
+ */
+ BYTES_PER_ELEMENT: number;
+
+ /**
+ * The ArrayBuffer instance referenced by the array.
+ */
+ buffer: ArrayBuffer;
+
+ /**
+ * The length in bytes of the array.
+ */
+ byteLength: number;
+
+ /**
+ * The offset in bytes of the array.
+ */
+ byteOffset: number;
+
+ /**
+ * Returns the this object after copying a section of the array identified by start and end
+ * to the same array starting at position target
+ * @param target If target is negative, it is treated as length+target where length is the
+ * length of the array.
+ * @param start If start is negative, it is treated as length+start. If end is negative, it
+ * is treated as length+end.
+ * @param end If not specified, length of the this object is used as its default value.
+ */
+ copyWithin(target: number, start: number, end?: number): Int8Array;
+
+ /**
+ * Determines whether all the members of an array satisfy the specified test.
+ * @param callbackfn A function that accepts up to three arguments. The every method calls
+ * the callbackfn function for each element in array1 until the callbackfn returns false,
+ * or until the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ every(callbackfn: (value: number, index: number, array: Int8Array) => boolean, thisArg?: any): boolean;
+
+ /**
+ * Returns the this object after filling the section identified by start and end with value
+ * @param value value to fill array section with
+ * @param start index to start filling the array at. If start is negative, it is treated as
+ * length+start where length is the length of the array.
+ * @param end index to stop filling the array at. If end is negative, it is treated as
+ * length+end.
+ */
+ fill(value: number, start?: number, end?: number): Int8Array;
+
+ /**
+ * Returns the elements of an array that meet the condition specified in a callback function.
+ * @param callbackfn A function that accepts up to three arguments. The filter method calls
+ * the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ filter(callbackfn: (value: number, index: number, array: Int8Array) => boolean, thisArg?: any): Int8Array;
+
+ /**
+ * Returns the value of the first element in the array where predicate is true, and undefined
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found, find
+ * immediately returns that element value. Otherwise, find returns undefined.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
+
+ /**
+ * Returns the index of the first element in the array where predicate is true, and undefined
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found, find
+ * immediately returns that element value. Otherwise, find returns undefined.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ findIndex(predicate: (value: number) => boolean, thisArg?: any): number;
+
+ /**
+ * Performs the specified action for each element in an array.
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ forEach(callbackfn: (value: number, index: number, array: Int8Array) => void, thisArg?: any): void;
+
+ /**
+ * Returns the index of the first occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ indexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * Adds all the elements of an array separated by the specified separator string.
+ * @param separator A string used to separate one element of an array from the next in the
+ * resulting String. If omitted, the array elements are separated with a comma.
+ */
+ join(separator?: string): string;
+
+ /**
+ * Returns the index of the last occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ lastIndexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * The length of the array.
+ */
+ length: number;
+
+ /**
+ * Calls a defined callback function on each element of an array, and returns an array that
+ * contains the results.
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ map(callbackfn: (value: number, index: number, array: Int8Array) => number, thisArg?: any): Int8Array;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int8Array) => number, initialValue?: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int8Array) => U, initialValue: U): U;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an
+ * argument instead of an array value.
+ */
+ reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int8Array) => number, initialValue?: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int8Array) => U, initialValue: U): U;
+
+ /**
+ * Reverses the elements in an Array.
+ */
+ reverse(): Int8Array;
+
+ /**
+ * Sets a value or an array of values.
+ * @param index The index of the location to set.
+ * @param value The value to set.
+ */
+ set(index: number, value: number): void;
+
+ /**
+ * Sets a value or an array of values.
+ * @param array A typed or untyped array of values to set.
+ * @param offset The index in the current array at which the values are to be written.
+ */
+ set(array: ArrayLike<number>, offset?: number): void;
+
+ /**
+ * Returns a section of an array.
+ * @param start The beginning of the specified portion of the array.
+ * @param end The end of the specified portion of the array.
+ */
+ slice(start?: number, end?: number): Int8Array;
+
+ /**
+ * Determines whether the specified callback function returns true for any element of an array.
+ * @param callbackfn A function that accepts up to three arguments. The some method calls the
+ * callbackfn function for each element in array1 until the callbackfn returns true, or until
+ * the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ some(callbackfn: (value: number, index: number, array: Int8Array) => boolean, thisArg?: any): boolean;
+
+ /**
+ * Sorts an array.
+ * @param compareFn The name of the function used to determine the order of the elements. If
+ * omitted, the elements are sorted in ascending, ASCII character order.
+ */
+ sort(compareFn?: (a: number, b: number) => number): Int8Array;
+
+ /**
+ * Gets a new Int8Array view of the ArrayBuffer store for this array, referencing the elements
+ * at begin, inclusive, up to end, exclusive.
+ * @param begin The index of the beginning of the array.
+ * @param end The index of the end of the array.
+ */
+ subarray(begin: number, end?: number): Int8Array;
+
+ /**
+ * Converts a number to a string by using the current locale.
+ */
+ toLocaleString(): string;
+
+ /**
+ * Returns a string representation of an array.
+ */
+ toString(): string;
+
+ [index: number]: number;
+}
+interface Int8ArrayConstructor {
+ prototype: Int8Array;
+ new (length: number): Int8Array;
+ new (array: ArrayLike<number>): Int8Array;
+ new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int8Array;
+
+ /**
+ * The size in bytes of each element in the array.
+ */
+ BYTES_PER_ELEMENT: number;
+
+ /**
+ * Returns a new array from a set of elements.
+ * @param items A set of elements to include in the new array object.
+ */
+ of(...items: number[]): Int8Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from(arrayLike: ArrayLike<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Int8Array;
+
+}
+declare var Int8Array: Int8ArrayConstructor;
+
+/**
+ * A typed array of 8-bit unsigned integer values. The contents are initialized to 0. If the
+ * requested number of bytes could not be allocated an exception is raised.
+ */
+interface Uint8Array {
+ /**
+ * The size in bytes of each element in the array.
+ */
+ BYTES_PER_ELEMENT: number;
+
+ /**
+ * The ArrayBuffer instance referenced by the array.
+ */
+ buffer: ArrayBuffer;
+
+ /**
+ * The length in bytes of the array.
+ */
+ byteLength: number;
+
+ /**
+ * The offset in bytes of the array.
+ */
+ byteOffset: number;
+
+ /**
+ * Returns the this object after copying a section of the array identified by start and end
+ * to the same array starting at position target
+ * @param target If target is negative, it is treated as length+target where length is the
+ * length of the array.
+ * @param start If start is negative, it is treated as length+start. If end is negative, it
+ * is treated as length+end.
+ * @param end If not specified, length of the this object is used as its default value.
+ */
+ copyWithin(target: number, start: number, end?: number): Uint8Array;
+
+ /**
+ * Determines whether all the members of an array satisfy the specified test.
+ * @param callbackfn A function that accepts up to three arguments. The every method calls
+ * the callbackfn function for each element in array1 until the callbackfn returns false,
+ * or until the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ every(callbackfn: (value: number, index: number, array: Uint8Array) => boolean, thisArg?: any): boolean;
+
+ /**
+ * Returns the this object after filling the section identified by start and end with value
+ * @param value value to fill array section with
+ * @param start index to start filling the array at. If start is negative, it is treated as
+ * length+start where length is the length of the array.
+ * @param end index to stop filling the array at. If end is negative, it is treated as
+ * length+end.
+ */
+ fill(value: number, start?: number, end?: number): Uint8Array;
+
+ /**
+ * Returns the elements of an array that meet the condition specified in a callback function.
+ * @param callbackfn A function that accepts up to three arguments. The filter method calls
+ * the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ filter(callbackfn: (value: number, index: number, array: Uint8Array) => boolean, thisArg?: any): Uint8Array;
+
+ /**
+ * Returns the value of the first element in the array where predicate is true, and undefined
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found, find
+ * immediately returns that element value. Otherwise, find returns undefined.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
+
+ /**
+ * Returns the index of the first element in the array where predicate is true, and undefined
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found, find
+ * immediately returns that element value. Otherwise, find returns undefined.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ findIndex(predicate: (value: number) => boolean, thisArg?: any): number;
+
+ /**
+ * Performs the specified action for each element in an array.
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ forEach(callbackfn: (value: number, index: number, array: Uint8Array) => void, thisArg?: any): void;
+
+ /**
+ * Returns the index of the first occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ indexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * Adds all the elements of an array separated by the specified separator string.
+ * @param separator A string used to separate one element of an array from the next in the
+ * resulting String. If omitted, the array elements are separated with a comma.
+ */
+ join(separator?: string): string;
+
+ /**
+ * Returns the index of the last occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ lastIndexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * The length of the array.
+ */
+ length: number;
+
+ /**
+ * Calls a defined callback function on each element of an array, and returns an array that
+ * contains the results.
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ map(callbackfn: (value: number, index: number, array: Uint8Array) => number, thisArg?: any): Uint8Array;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8Array) => number, initialValue?: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint8Array) => U, initialValue: U): U;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an
+ * argument instead of an array value.
+ */
+ reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8Array) => number, initialValue?: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint8Array) => U, initialValue: U): U;
+
+ /**
+ * Reverses the elements in an Array.
+ */
+ reverse(): Uint8Array;
+
+ /**
+ * Sets a value or an array of values.
+ * @param index The index of the location to set.
+ * @param value The value to set.
+ */
+ set(index: number, value: number): void;
+
+ /**
+ * Sets a value or an array of values.
+ * @param array A typed or untyped array of values to set.
+ * @param offset The index in the current array at which the values are to be written.
+ */
+ set(array: ArrayLike<number>, offset?: number): void;
+
+ /**
+ * Returns a section of an array.
+ * @param start The beginning of the specified portion of the array.
+ * @param end The end of the specified portion of the array.
+ */
+ slice(start?: number, end?: number): Uint8Array;
+
+ /**
+ * Determines whether the specified callback function returns true for any element of an array.
+ * @param callbackfn A function that accepts up to three arguments. The some method calls the
+ * callbackfn function for each element in array1 until the callbackfn returns true, or until
+ * the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ some(callbackfn: (value: number, index: number, array: Uint8Array) => boolean, thisArg?: any): boolean;
+
+ /**
+ * Sorts an array.
+ * @param compareFn The name of the function used to determine the order of the elements. If
+ * omitted, the elements are sorted in ascending, ASCII character order.
+ */
+ sort(compareFn?: (a: number, b: number) => number): Uint8Array;
+
+ /**
+ * Gets a new Uint8Array view of the ArrayBuffer store for this array, referencing the elements
+ * at begin, inclusive, up to end, exclusive.
+ * @param begin The index of the beginning of the array.
+ * @param end The index of the end of the array.
+ */
+ subarray(begin: number, end?: number): Uint8Array;
+
+ /**
+ * Converts a number to a string by using the current locale.
+ */
+ toLocaleString(): string;
+
+ /**
+ * Returns a string representation of an array.
+ */
+ toString(): string;
+
+ [index: number]: number;
+}
+
+interface Uint8ArrayConstructor {
+ prototype: Uint8Array;
+ new (length: number): Uint8Array;
+ new (array: ArrayLike<number>): Uint8Array;
+ new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint8Array;
+
+ /**
+ * The size in bytes of each element in the array.
+ */
+ BYTES_PER_ELEMENT: number;
+
+ /**
+ * Returns a new array from a set of elements.
+ * @param items A set of elements to include in the new array object.
+ */
+ of(...items: number[]): Uint8Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from(arrayLike: ArrayLike<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8Array;
+
+}
+declare var Uint8Array: Uint8ArrayConstructor;
+
+/**
+ * A typed array of 8-bit unsigned integer (clamped) values. The contents are initialized to 0.
+ * If the requested number of bytes could not be allocated an exception is raised.
+ */
+interface Uint8ClampedArray {
+ /**
+ * The size in bytes of each element in the array.
+ */
+ BYTES_PER_ELEMENT: number;
+
+ /**
+ * The ArrayBuffer instance referenced by the array.
+ */
+ buffer: ArrayBuffer;
+
+ /**
+ * The length in bytes of the array.
+ */
+ byteLength: number;
+
+ /**
+ * The offset in bytes of the array.
+ */
+ byteOffset: number;
+
+ /**
+ * Returns the this object after copying a section of the array identified by start and end
+ * to the same array starting at position target
+ * @param target If target is negative, it is treated as length+target where length is the
+ * length of the array.
+ * @param start If start is negative, it is treated as length+start. If end is negative, it
+ * is treated as length+end.
+ * @param end If not specified, length of the this object is used as its default value.
+ */
+ copyWithin(target: number, start: number, end?: number): Uint8ClampedArray;
+
+ /**
+ * Determines whether all the members of an array satisfy the specified test.
+ * @param callbackfn A function that accepts up to three arguments. The every method calls
+ * the callbackfn function for each element in array1 until the callbackfn returns false,
+ * or until the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ every(callbackfn: (value: number, index: number, array: Uint8ClampedArray) => boolean, thisArg?: any): boolean;
+
+ /**
+ * Returns the this object after filling the section identified by start and end with value
+ * @param value value to fill array section with
+ * @param start index to start filling the array at. If start is negative, it is treated as
+ * length+start where length is the length of the array.
+ * @param end index to stop filling the array at. If end is negative, it is treated as
+ * length+end.
+ */
+ fill(value: number, start?: number, end?: number): Uint8ClampedArray;
+
+ /**
+ * Returns the elements of an array that meet the condition specified in a callback function.
+ * @param callbackfn A function that accepts up to three arguments. The filter method calls
+ * the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ filter(callbackfn: (value: number, index: number, array: Uint8ClampedArray) => boolean, thisArg?: any): Uint8ClampedArray;
+
+ /**
+ * Returns the value of the first element in the array where predicate is true, and undefined
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found, find
+ * immediately returns that element value. Otherwise, find returns undefined.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
+
+ /**
+ * Returns the index of the first element in the array where predicate is true, and undefined
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found, find
+ * immediately returns that element value. Otherwise, find returns undefined.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ findIndex(predicate: (value: number) => boolean, thisArg?: any): number;
+
+ /**
+ * Performs the specified action for each element in an array.
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ forEach(callbackfn: (value: number, index: number, array: Uint8ClampedArray) => void, thisArg?: any): void;
+
+ /**
+ * Returns the index of the first occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ indexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * Adds all the elements of an array separated by the specified separator string.
+ * @param separator A string used to separate one element of an array from the next in the
+ * resulting String. If omitted, the array elements are separated with a comma.
+ */
+ join(separator?: string): string;
+
+ /**
+ * Returns the index of the last occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ lastIndexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * The length of the array.
+ */
+ length: number;
+
+ /**
+ * Calls a defined callback function on each element of an array, and returns an array that
+ * contains the results.
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ map(callbackfn: (value: number, index: number, array: Uint8ClampedArray) => number, thisArg?: any): Uint8ClampedArray;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => number, initialValue?: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => U, initialValue: U): U;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an
+ * argument instead of an array value.
+ */
+ reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => number, initialValue?: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => U, initialValue: U): U;
+
+ /**
+ * Reverses the elements in an Array.
+ */
+ reverse(): Uint8ClampedArray;
+
+ /**
+ * Sets a value or an array of values.
+ * @param index The index of the location to set.
+ * @param value The value to set.
+ */
+ set(index: number, value: number): void;
+
+ /**
+ * Sets a value or an array of values.
+ * @param array A typed or untyped array of values to set.
+ * @param offset The index in the current array at which the values are to be written.
+ */
+ set(array: Uint8ClampedArray, offset?: number): void;
+
+ /**
+ * Returns a section of an array.
+ * @param start The beginning of the specified portion of the array.
+ * @param end The end of the specified portion of the array.
+ */
+ slice(start?: number, end?: number): Uint8ClampedArray;
+
+ /**
+ * Determines whether the specified callback function returns true for any element of an array.
+ * @param callbackfn A function that accepts up to three arguments. The some method calls the
+ * callbackfn function for each element in array1 until the callbackfn returns true, or until
+ * the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ some(callbackfn: (value: number, index: number, array: Uint8ClampedArray) => boolean, thisArg?: any): boolean;
+
+ /**
+ * Sorts an array.
+ * @param compareFn The name of the function used to determine the order of the elements. If
+ * omitted, the elements are sorted in ascending, ASCII character order.
+ */
+ sort(compareFn?: (a: number, b: number) => number): Uint8ClampedArray;
+
+ /**
+ * Gets a new Uint8ClampedArray view of the ArrayBuffer store for this array, referencing the elements
+ * at begin, inclusive, up to end, exclusive.
+ * @param begin The index of the beginning of the array.
+ * @param end The index of the end of the array.
+ */
+ subarray(begin: number, end?: number): Uint8ClampedArray;
+
+ /**
+ * Converts a number to a string by using the current locale.
+ */
+ toLocaleString(): string;
+
+ /**
+ * Returns a string representation of an array.
+ */
+ toString(): string;
+
+ [index: number]: number;
+}
+
+interface Uint8ClampedArrayConstructor {
+ prototype: Uint8ClampedArray;
+ new (length: number): Uint8ClampedArray;
+ new (array: ArrayLike<number>): Uint8ClampedArray;
+ new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint8ClampedArray;
+
+ /**
+ * The size in bytes of each element in the array.
+ */
+ BYTES_PER_ELEMENT: number;
+
+ /**
+ * Returns a new array from a set of elements.
+ * @param items A set of elements to include in the new array object.
+ */
+ of(...items: number[]): Uint8ClampedArray;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from(arrayLike: ArrayLike<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8ClampedArray;
+}
+declare var Uint8ClampedArray: Uint8ClampedArrayConstructor;
+
+/**
+ * A typed array of 16-bit signed integer values. The contents are initialized to 0. If the
+ * requested number of bytes could not be allocated an exception is raised.
+ */
+interface Int16Array {
+ /**
+ * The size in bytes of each element in the array.
+ */
+ BYTES_PER_ELEMENT: number;
+
+ /**
+ * The ArrayBuffer instance referenced by the array.
+ */
+ buffer: ArrayBuffer;
+
+ /**
+ * The length in bytes of the array.
+ */
+ byteLength: number;
+
+ /**
+ * The offset in bytes of the array.
+ */
+ byteOffset: number;
+
+ /**
+ * Returns the this object after copying a section of the array identified by start and end
+ * to the same array starting at position target
+ * @param target If target is negative, it is treated as length+target where length is the
+ * length of the array.
+ * @param start If start is negative, it is treated as length+start. If end is negative, it
+ * is treated as length+end.
+ * @param end If not specified, length of the this object is used as its default value.
+ */
+ copyWithin(target: number, start: number, end?: number): Int16Array;
+
+ /**
+ * Determines whether all the members of an array satisfy the specified test.
+ * @param callbackfn A function that accepts up to three arguments. The every method calls
+ * the callbackfn function for each element in array1 until the callbackfn returns false,
+ * or until the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ every(callbackfn: (value: number, index: number, array: Int16Array) => boolean, thisArg?: any): boolean;
+
+ /**
+ * Returns the this object after filling the section identified by start and end with value
+ * @param value value to fill array section with
+ * @param start index to start filling the array at. If start is negative, it is treated as
+ * length+start where length is the length of the array.
+ * @param end index to stop filling the array at. If end is negative, it is treated as
+ * length+end.
+ */
+ fill(value: number, start?: number, end?: number): Int16Array;
+
+ /**
+ * Returns the elements of an array that meet the condition specified in a callback function.
+ * @param callbackfn A function that accepts up to three arguments. The filter method calls
+ * the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ filter(callbackfn: (value: number, index: number, array: Int16Array) => boolean, thisArg?: any): Int16Array;
+
+ /**
+ * Returns the value of the first element in the array where predicate is true, and undefined
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found, find
+ * immediately returns that element value. Otherwise, find returns undefined.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
+
+ /**
+ * Returns the index of the first element in the array where predicate is true, and undefined
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found, find
+ * immediately returns that element value. Otherwise, find returns undefined.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ findIndex(predicate: (value: number) => boolean, thisArg?: any): number;
+
+ /**
+ * Performs the specified action for each element in an array.
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ forEach(callbackfn: (value: number, index: number, array: Int16Array) => void, thisArg?: any): void;
+
+ /**
+ * Returns the index of the first occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ indexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * Adds all the elements of an array separated by the specified separator string.
+ * @param separator A string used to separate one element of an array from the next in the
+ * resulting String. If omitted, the array elements are separated with a comma.
+ */
+ join(separator?: string): string;
+
+ /**
+ * Returns the index of the last occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ lastIndexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * The length of the array.
+ */
+ length: number;
+
+ /**
+ * Calls a defined callback function on each element of an array, and returns an array that
+ * contains the results.
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ map(callbackfn: (value: number, index: number, array: Int16Array) => number, thisArg?: any): Int16Array;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int16Array) => number, initialValue?: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int16Array) => U, initialValue: U): U;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an
+ * argument instead of an array value.
+ */
+ reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int16Array) => number, initialValue?: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int16Array) => U, initialValue: U): U;
+
+ /**
+ * Reverses the elements in an Array.
+ */
+ reverse(): Int16Array;
+
+ /**
+ * Sets a value or an array of values.
+ * @param index The index of the location to set.
+ * @param value The value to set.
+ */
+ set(index: number, value: number): void;
+
+ /**
+ * Sets a value or an array of values.
+ * @param array A typed or untyped array of values to set.
+ * @param offset The index in the current array at which the values are to be written.
+ */
+ set(array: ArrayLike<number>, offset?: number): void;
+
+ /**
+ * Returns a section of an array.
+ * @param start The beginning of the specified portion of the array.
+ * @param end The end of the specified portion of the array.
+ */
+ slice(start?: number, end?: number): Int16Array;
+
+ /**
+ * Determines whether the specified callback function returns true for any element of an array.
+ * @param callbackfn A function that accepts up to three arguments. The some method calls the
+ * callbackfn function for each element in array1 until the callbackfn returns true, or until
+ * the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ some(callbackfn: (value: number, index: number, array: Int16Array) => boolean, thisArg?: any): boolean;
+
+ /**
+ * Sorts an array.
+ * @param compareFn The name of the function used to determine the order of the elements. If
+ * omitted, the elements are sorted in ascending, ASCII character order.
+ */
+ sort(compareFn?: (a: number, b: number) => number): Int16Array;
+
+ /**
+ * Gets a new Int16Array view of the ArrayBuffer store for this array, referencing the elements
+ * at begin, inclusive, up to end, exclusive.
+ * @param begin The index of the beginning of the array.
+ * @param end The index of the end of the array.
+ */
+ subarray(begin: number, end?: number): Int16Array;
+
+ /**
+ * Converts a number to a string by using the current locale.
+ */
+ toLocaleString(): string;
+
+ /**
+ * Returns a string representation of an array.
+ */
+ toString(): string;
+
+ [index: number]: number;
+}
+
+interface Int16ArrayConstructor {
+ prototype: Int16Array;
+ new (length: number): Int16Array;
+ new (array: ArrayLike<number>): Int16Array;
+ new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int16Array;
+
+ /**
+ * The size in bytes of each element in the array.
+ */
+ BYTES_PER_ELEMENT: number;
+
+ /**
+ * Returns a new array from a set of elements.
+ * @param items A set of elements to include in the new array object.
+ */
+ of(...items: number[]): Int16Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from(arrayLike: ArrayLike<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Int16Array;
+
+}
+declare var Int16Array: Int16ArrayConstructor;
+
+/**
+ * A typed array of 16-bit unsigned integer values. The contents are initialized to 0. If the
+ * requested number of bytes could not be allocated an exception is raised.
+ */
+interface Uint16Array {
+ /**
+ * The size in bytes of each element in the array.
+ */
+ BYTES_PER_ELEMENT: number;
+
+ /**
+ * The ArrayBuffer instance referenced by the array.
+ */
+ buffer: ArrayBuffer;
+
+ /**
+ * The length in bytes of the array.
+ */
+ byteLength: number;
+
+ /**
+ * The offset in bytes of the array.
+ */
+ byteOffset: number;
+
+ /**
+ * Returns the this object after copying a section of the array identified by start and end
+ * to the same array starting at position target
+ * @param target If target is negative, it is treated as length+target where length is the
+ * length of the array.
+ * @param start If start is negative, it is treated as length+start. If end is negative, it
+ * is treated as length+end.
+ * @param end If not specified, length of the this object is used as its default value.
+ */
+ copyWithin(target: number, start: number, end?: number): Uint16Array;
+
+ /**
+ * Determines whether all the members of an array satisfy the specified test.
+ * @param callbackfn A function that accepts up to three arguments. The every method calls
+ * the callbackfn function for each element in array1 until the callbackfn returns false,
+ * or until the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ every(callbackfn: (value: number, index: number, array: Uint16Array) => boolean, thisArg?: any): boolean;
+
+ /**
+ * Returns the this object after filling the section identified by start and end with value
+ * @param value value to fill array section with
+ * @param start index to start filling the array at. If start is negative, it is treated as
+ * length+start where length is the length of the array.
+ * @param end index to stop filling the array at. If end is negative, it is treated as
+ * length+end.
+ */
+ fill(value: number, start?: number, end?: number): Uint16Array;
+
+ /**
+ * Returns the elements of an array that meet the condition specified in a callback function.
+ * @param callbackfn A function that accepts up to three arguments. The filter method calls
+ * the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ filter(callbackfn: (value: number, index: number, array: Uint16Array) => boolean, thisArg?: any): Uint16Array;
+
+ /**
+ * Returns the value of the first element in the array where predicate is true, and undefined
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found, find
+ * immediately returns that element value. Otherwise, find returns undefined.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
+
+ /**
+ * Returns the index of the first element in the array where predicate is true, and undefined
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found, find
+ * immediately returns that element value. Otherwise, find returns undefined.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ findIndex(predicate: (value: number) => boolean, thisArg?: any): number;
+
+ /**
+ * Performs the specified action for each element in an array.
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ forEach(callbackfn: (value: number, index: number, array: Uint16Array) => void, thisArg?: any): void;
+
+ /**
+ * Returns the index of the first occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ indexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * Adds all the elements of an array separated by the specified separator string.
+ * @param separator A string used to separate one element of an array from the next in the
+ * resulting String. If omitted, the array elements are separated with a comma.
+ */
+ join(separator?: string): string;
+
+ /**
+ * Returns the index of the last occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ lastIndexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * The length of the array.
+ */
+ length: number;
+
+ /**
+ * Calls a defined callback function on each element of an array, and returns an array that
+ * contains the results.
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ map(callbackfn: (value: number, index: number, array: Uint16Array) => number, thisArg?: any): Uint16Array;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint16Array) => number, initialValue?: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint16Array) => U, initialValue: U): U;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an
+ * argument instead of an array value.
+ */
+ reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint16Array) => number, initialValue?: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint16Array) => U, initialValue: U): U;
+
+ /**
+ * Reverses the elements in an Array.
+ */
+ reverse(): Uint16Array;
+
+ /**
+ * Sets a value or an array of values.
+ * @param index The index of the location to set.
+ * @param value The value to set.
+ */
+ set(index: number, value: number): void;
+
+ /**
+ * Sets a value or an array of values.
+ * @param array A typed or untyped array of values to set.
+ * @param offset The index in the current array at which the values are to be written.
+ */
+ set(array: ArrayLike<number>, offset?: number): void;
+
+ /**
+ * Returns a section of an array.
+ * @param start The beginning of the specified portion of the array.
+ * @param end The end of the specified portion of the array.
+ */
+ slice(start?: number, end?: number): Uint16Array;
+
+ /**
+ * Determines whether the specified callback function returns true for any element of an array.
+ * @param callbackfn A function that accepts up to three arguments. The some method calls the
+ * callbackfn function for each element in array1 until the callbackfn returns true, or until
+ * the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ some(callbackfn: (value: number, index: number, array: Uint16Array) => boolean, thisArg?: any): boolean;
+
+ /**
+ * Sorts an array.
+ * @param compareFn The name of the function used to determine the order of the elements. If
+ * omitted, the elements are sorted in ascending, ASCII character order.
+ */
+ sort(compareFn?: (a: number, b: number) => number): Uint16Array;
+
+ /**
+ * Gets a new Uint16Array view of the ArrayBuffer store for this array, referencing the elements
+ * at begin, inclusive, up to end, exclusive.
+ * @param begin The index of the beginning of the array.
+ * @param end The index of the end of the array.
+ */
+ subarray(begin: number, end?: number): Uint16Array;
+
+ /**
+ * Converts a number to a string by using the current locale.
+ */
+ toLocaleString(): string;
+
+ /**
+ * Returns a string representation of an array.
+ */
+ toString(): string;
+
+ [index: number]: number;
+}
+
+interface Uint16ArrayConstructor {
+ prototype: Uint16Array;
+ new (length: number): Uint16Array;
+ new (array: ArrayLike<number>): Uint16Array;
+ new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint16Array;
+
+ /**
+ * The size in bytes of each element in the array.
+ */
+ BYTES_PER_ELEMENT: number;
+
+ /**
+ * Returns a new array from a set of elements.
+ * @param items A set of elements to include in the new array object.
+ */
+ of(...items: number[]): Uint16Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from(arrayLike: ArrayLike<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint16Array;
+
+}
+declare var Uint16Array: Uint16ArrayConstructor;
+/**
+ * A typed array of 32-bit signed integer values. The contents are initialized to 0. If the
+ * requested number of bytes could not be allocated an exception is raised.
+ */
+interface Int32Array {
+ /**
+ * The size in bytes of each element in the array.
+ */
+ BYTES_PER_ELEMENT: number;
+
+ /**
+ * The ArrayBuffer instance referenced by the array.
+ */
+ buffer: ArrayBuffer;
+
+ /**
+ * The length in bytes of the array.
+ */
+ byteLength: number;
+
+ /**
+ * The offset in bytes of the array.
+ */
+ byteOffset: number;
+
+ /**
+ * Returns the this object after copying a section of the array identified by start and end
+ * to the same array starting at position target
+ * @param target If target is negative, it is treated as length+target where length is the
+ * length of the array.
+ * @param start If start is negative, it is treated as length+start. If end is negative, it
+ * is treated as length+end.
+ * @param end If not specified, length of the this object is used as its default value.
+ */
+ copyWithin(target: number, start: number, end?: number): Int32Array;
+
+ /**
+ * Determines whether all the members of an array satisfy the specified test.
+ * @param callbackfn A function that accepts up to three arguments. The every method calls
+ * the callbackfn function for each element in array1 until the callbackfn returns false,
+ * or until the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ every(callbackfn: (value: number, index: number, array: Int32Array) => boolean, thisArg?: any): boolean;
+
+ /**
+ * Returns the this object after filling the section identified by start and end with value
+ * @param value value to fill array section with
+ * @param start index to start filling the array at. If start is negative, it is treated as
+ * length+start where length is the length of the array.
+ * @param end index to stop filling the array at. If end is negative, it is treated as
+ * length+end.
+ */
+ fill(value: number, start?: number, end?: number): Int32Array;
+
+ /**
+ * Returns the elements of an array that meet the condition specified in a callback function.
+ * @param callbackfn A function that accepts up to three arguments. The filter method calls
+ * the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ filter(callbackfn: (value: number, index: number, array: Int32Array) => boolean, thisArg?: any): Int32Array;
+
+ /**
+ * Returns the value of the first element in the array where predicate is true, and undefined
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found, find
+ * immediately returns that element value. Otherwise, find returns undefined.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
+
+ /**
+ * Returns the index of the first element in the array where predicate is true, and undefined
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found, find
+ * immediately returns that element value. Otherwise, find returns undefined.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ findIndex(predicate: (value: number) => boolean, thisArg?: any): number;
+
+ /**
+ * Performs the specified action for each element in an array.
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ forEach(callbackfn: (value: number, index: number, array: Int32Array) => void, thisArg?: any): void;
+
+ /**
+ * Returns the index of the first occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ indexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * Adds all the elements of an array separated by the specified separator string.
+ * @param separator A string used to separate one element of an array from the next in the
+ * resulting String. If omitted, the array elements are separated with a comma.
+ */
+ join(separator?: string): string;
+
+ /**
+ * Returns the index of the last occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ lastIndexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * The length of the array.
+ */
+ length: number;
+
+ /**
+ * Calls a defined callback function on each element of an array, and returns an array that
+ * contains the results.
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ map(callbackfn: (value: number, index: number, array: Int32Array) => number, thisArg?: any): Int32Array;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int32Array) => number, initialValue?: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int32Array) => U, initialValue: U): U;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an
+ * argument instead of an array value.
+ */
+ reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int32Array) => number, initialValue?: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int32Array) => U, initialValue: U): U;
+
+ /**
+ * Reverses the elements in an Array.
+ */
+ reverse(): Int32Array;
+
+ /**
+ * Sets a value or an array of values.
+ * @param index The index of the location to set.
+ * @param value The value to set.
+ */
+ set(index: number, value: number): void;
+
+ /**
+ * Sets a value or an array of values.
+ * @param array A typed or untyped array of values to set.
+ * @param offset The index in the current array at which the values are to be written.
+ */
+ set(array: ArrayLike<number>, offset?: number): void;
+
+ /**
+ * Returns a section of an array.
+ * @param start The beginning of the specified portion of the array.
+ * @param end The end of the specified portion of the array.
+ */
+ slice(start?: number, end?: number): Int32Array;
+
+ /**
+ * Determines whether the specified callback function returns true for any element of an array.
+ * @param callbackfn A function that accepts up to three arguments. The some method calls the
+ * callbackfn function for each element in array1 until the callbackfn returns true, or until
+ * the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ some(callbackfn: (value: number, index: number, array: Int32Array) => boolean, thisArg?: any): boolean;
+
+ /**
+ * Sorts an array.
+ * @param compareFn The name of the function used to determine the order of the elements. If
+ * omitted, the elements are sorted in ascending, ASCII character order.
+ */
+ sort(compareFn?: (a: number, b: number) => number): Int32Array;
+
+ /**
+ * Gets a new Int32Array view of the ArrayBuffer store for this array, referencing the elements
+ * at begin, inclusive, up to end, exclusive.
+ * @param begin The index of the beginning of the array.
+ * @param end The index of the end of the array.
+ */
+ subarray(begin: number, end?: number): Int32Array;
+
+ /**
+ * Converts a number to a string by using the current locale.
+ */
+ toLocaleString(): string;
+
+ /**
+ * Returns a string representation of an array.
+ */
+ toString(): string;
+
+ [index: number]: number;
+}
+
+interface Int32ArrayConstructor {
+ prototype: Int32Array;
+ new (length: number): Int32Array;
+ new (array: ArrayLike<number>): Int32Array;
+ new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int32Array;
+
+ /**
+ * The size in bytes of each element in the array.
+ */
+ BYTES_PER_ELEMENT: number;
+
+ /**
+ * Returns a new array from a set of elements.
+ * @param items A set of elements to include in the new array object.
+ */
+ of(...items: number[]): Int32Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from(arrayLike: ArrayLike<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Int32Array;
+}
+declare var Int32Array: Int32ArrayConstructor;
+
+/**
+ * A typed array of 32-bit unsigned integer values. The contents are initialized to 0. If the
+ * requested number of bytes could not be allocated an exception is raised.
+ */
+interface Uint32Array {
+ /**
+ * The size in bytes of each element in the array.
+ */
+ BYTES_PER_ELEMENT: number;
+
+ /**
+ * The ArrayBuffer instance referenced by the array.
+ */
+ buffer: ArrayBuffer;
+
+ /**
+ * The length in bytes of the array.
+ */
+ byteLength: number;
+
+ /**
+ * The offset in bytes of the array.
+ */
+ byteOffset: number;
+
+ /**
+ * Returns the this object after copying a section of the array identified by start and end
+ * to the same array starting at position target
+ * @param target If target is negative, it is treated as length+target where length is the
+ * length of the array.
+ * @param start If start is negative, it is treated as length+start. If end is negative, it
+ * is treated as length+end.
+ * @param end If not specified, length of the this object is used as its default value.
+ */
+ copyWithin(target: number, start: number, end?: number): Uint32Array;
+
+ /**
+ * Determines whether all the members of an array satisfy the specified test.
+ * @param callbackfn A function that accepts up to three arguments. The every method calls
+ * the callbackfn function for each element in array1 until the callbackfn returns false,
+ * or until the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ every(callbackfn: (value: number, index: number, array: Uint32Array) => boolean, thisArg?: any): boolean;
+
+ /**
+ * Returns the this object after filling the section identified by start and end with value
+ * @param value value to fill array section with
+ * @param start index to start filling the array at. If start is negative, it is treated as
+ * length+start where length is the length of the array.
+ * @param end index to stop filling the array at. If end is negative, it is treated as
+ * length+end.
+ */
+ fill(value: number, start?: number, end?: number): Uint32Array;
+
+ /**
+ * Returns the elements of an array that meet the condition specified in a callback function.
+ * @param callbackfn A function that accepts up to three arguments. The filter method calls
+ * the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ filter(callbackfn: (value: number, index: number, array: Uint32Array) => boolean, thisArg?: any): Uint32Array;
+
+ /**
+ * Returns the value of the first element in the array where predicate is true, and undefined
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found, find
+ * immediately returns that element value. Otherwise, find returns undefined.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
+
+ /**
+ * Returns the index of the first element in the array where predicate is true, and undefined
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found, find
+ * immediately returns that element value. Otherwise, find returns undefined.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ findIndex(predicate: (value: number) => boolean, thisArg?: any): number;
+
+ /**
+ * Performs the specified action for each element in an array.
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ forEach(callbackfn: (value: number, index: number, array: Uint32Array) => void, thisArg?: any): void;
+
+ /**
+ * Returns the index of the first occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ indexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * Adds all the elements of an array separated by the specified separator string.
+ * @param separator A string used to separate one element of an array from the next in the
+ * resulting String. If omitted, the array elements are separated with a comma.
+ */
+ join(separator?: string): string;
+
+ /**
+ * Returns the index of the last occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ lastIndexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * The length of the array.
+ */
+ length: number;
+
+ /**
+ * Calls a defined callback function on each element of an array, and returns an array that
+ * contains the results.
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ map(callbackfn: (value: number, index: number, array: Uint32Array) => number, thisArg?: any): Uint32Array;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint32Array) => number, initialValue?: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint32Array) => U, initialValue: U): U;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an
+ * argument instead of an array value.
+ */
+ reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint32Array) => number, initialValue?: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint32Array) => U, initialValue: U): U;
+
+ /**
+ * Reverses the elements in an Array.
+ */
+ reverse(): Uint32Array;
+
+ /**
+ * Sets a value or an array of values.
+ * @param index The index of the location to set.
+ * @param value The value to set.
+ */
+ set(index: number, value: number): void;
+
+ /**
+ * Sets a value or an array of values.
+ * @param array A typed or untyped array of values to set.
+ * @param offset The index in the current array at which the values are to be written.
+ */
+ set(array: ArrayLike<number>, offset?: number): void;
+
+ /**
+ * Returns a section of an array.
+ * @param start The beginning of the specified portion of the array.
+ * @param end The end of the specified portion of the array.
+ */
+ slice(start?: number, end?: number): Uint32Array;
+
+ /**
+ * Determines whether the specified callback function returns true for any element of an array.
+ * @param callbackfn A function that accepts up to three arguments. The some method calls the
+ * callbackfn function for each element in array1 until the callbackfn returns true, or until
+ * the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ some(callbackfn: (value: number, index: number, array: Uint32Array) => boolean, thisArg?: any): boolean;
+
+ /**
+ * Sorts an array.
+ * @param compareFn The name of the function used to determine the order of the elements. If
+ * omitted, the elements are sorted in ascending, ASCII character order.
+ */
+ sort(compareFn?: (a: number, b: number) => number): Uint32Array;
+
+ /**
+ * Gets a new Uint32Array view of the ArrayBuffer store for this array, referencing the elements
+ * at begin, inclusive, up to end, exclusive.
+ * @param begin The index of the beginning of the array.
+ * @param end The index of the end of the array.
+ */
+ subarray(begin: number, end?: number): Uint32Array;
+
+ /**
+ * Converts a number to a string by using the current locale.
+ */
+ toLocaleString(): string;
+
+ /**
+ * Returns a string representation of an array.
+ */
+ toString(): string;
+
+ [index: number]: number;
+}
+
+interface Uint32ArrayConstructor {
+ prototype: Uint32Array;
+ new (length: number): Uint32Array;
+ new (array: ArrayLike<number>): Uint32Array;
+ new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint32Array;
+
+ /**
+ * The size in bytes of each element in the array.
+ */
+ BYTES_PER_ELEMENT: number;
+
+ /**
+ * Returns a new array from a set of elements.
+ * @param items A set of elements to include in the new array object.
+ */
+ of(...items: number[]): Uint32Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from(arrayLike: ArrayLike<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint32Array;
+}
+declare var Uint32Array: Uint32ArrayConstructor;
+
+/**
+ * A typed array of 32-bit float values. The contents are initialized to 0. If the requested number
+ * of bytes could not be allocated an exception is raised.
+ */
+interface Float32Array {
+ /**
+ * The size in bytes of each element in the array.
+ */
+ BYTES_PER_ELEMENT: number;
+
+ /**
+ * The ArrayBuffer instance referenced by the array.
+ */
+ buffer: ArrayBuffer;
+
+ /**
+ * The length in bytes of the array.
+ */
+ byteLength: number;
+
+ /**
+ * The offset in bytes of the array.
+ */
+ byteOffset: number;
+
+ /**
+ * Returns the this object after copying a section of the array identified by start and end
+ * to the same array starting at position target
+ * @param target If target is negative, it is treated as length+target where length is the
+ * length of the array.
+ * @param start If start is negative, it is treated as length+start. If end is negative, it
+ * is treated as length+end.
+ * @param end If not specified, length of the this object is used as its default value.
+ */
+ copyWithin(target: number, start: number, end?: number): Float32Array;
+
+ /**
+ * Determines whether all the members of an array satisfy the specified test.
+ * @param callbackfn A function that accepts up to three arguments. The every method calls
+ * the callbackfn function for each element in array1 until the callbackfn returns false,
+ * or until the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ every(callbackfn: (value: number, index: number, array: Float32Array) => boolean, thisArg?: any): boolean;
+
+ /**
+ * Returns the this object after filling the section identified by start and end with value
+ * @param value value to fill array section with
+ * @param start index to start filling the array at. If start is negative, it is treated as
+ * length+start where length is the length of the array.
+ * @param end index to stop filling the array at. If end is negative, it is treated as
+ * length+end.
+ */
+ fill(value: number, start?: number, end?: number): Float32Array;
+
+ /**
+ * Returns the elements of an array that meet the condition specified in a callback function.
+ * @param callbackfn A function that accepts up to three arguments. The filter method calls
+ * the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ filter(callbackfn: (value: number, index: number, array: Float32Array) => boolean, thisArg?: any): Float32Array;
+
+ /**
+ * Returns the value of the first element in the array where predicate is true, and undefined
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found, find
+ * immediately returns that element value. Otherwise, find returns undefined.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
+
+ /**
+ * Returns the index of the first element in the array where predicate is true, and undefined
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found, find
+ * immediately returns that element value. Otherwise, find returns undefined.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ findIndex(predicate: (value: number) => boolean, thisArg?: any): number;
+
+ /**
+ * Performs the specified action for each element in an array.
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ forEach(callbackfn: (value: number, index: number, array: Float32Array) => void, thisArg?: any): void;
+
+ /**
+ * Returns the index of the first occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ indexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * Adds all the elements of an array separated by the specified separator string.
+ * @param separator A string used to separate one element of an array from the next in the
+ * resulting String. If omitted, the array elements are separated with a comma.
+ */
+ join(separator?: string): string;
+
+ /**
+ * Returns the index of the last occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ lastIndexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * The length of the array.
+ */
+ length: number;
+
+ /**
+ * Calls a defined callback function on each element of an array, and returns an array that
+ * contains the results.
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ map(callbackfn: (value: number, index: number, array: Float32Array) => number, thisArg?: any): Float32Array;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float32Array) => number, initialValue?: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float32Array) => U, initialValue: U): U;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an
+ * argument instead of an array value.
+ */
+ reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float32Array) => number, initialValue?: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float32Array) => U, initialValue: U): U;
+
+ /**
+ * Reverses the elements in an Array.
+ */
+ reverse(): Float32Array;
+
+ /**
+ * Sets a value or an array of values.
+ * @param index The index of the location to set.
+ * @param value The value to set.
+ */
+ set(index: number, value: number): void;
+
+ /**
+ * Sets a value or an array of values.
+ * @param array A typed or untyped array of values to set.
+ * @param offset The index in the current array at which the values are to be written.
+ */
+ set(array: ArrayLike<number>, offset?: number): void;
+
+ /**
+ * Returns a section of an array.
+ * @param start The beginning of the specified portion of the array.
+ * @param end The end of the specified portion of the array.
+ */
+ slice(start?: number, end?: number): Float32Array;
+
+ /**
+ * Determines whether the specified callback function returns true for any element of an array.
+ * @param callbackfn A function that accepts up to three arguments. The some method calls the
+ * callbackfn function for each element in array1 until the callbackfn returns true, or until
+ * the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ some(callbackfn: (value: number, index: number, array: Float32Array) => boolean, thisArg?: any): boolean;
+
+ /**
+ * Sorts an array.
+ * @param compareFn The name of the function used to determine the order of the elements. If
+ * omitted, the elements are sorted in ascending, ASCII character order.
+ */
+ sort(compareFn?: (a: number, b: number) => number): Float32Array;
+
+ /**
+ * Gets a new Float32Array view of the ArrayBuffer store for this array, referencing the elements
+ * at begin, inclusive, up to end, exclusive.
+ * @param begin The index of the beginning of the array.
+ * @param end The index of the end of the array.
+ */
+ subarray(begin: number, end?: number): Float32Array;
+
+ /**
+ * Converts a number to a string by using the current locale.
+ */
+ toLocaleString(): string;
+
+ /**
+ * Returns a string representation of an array.
+ */
+ toString(): string;
+
+ [index: number]: number;
+}
+
+interface Float32ArrayConstructor {
+ prototype: Float32Array;
+ new (length: number): Float32Array;
+ new (array: ArrayLike<number>): Float32Array;
+ new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Float32Array;
+
+ /**
+ * The size in bytes of each element in the array.
+ */
+ BYTES_PER_ELEMENT: number;
+
+ /**
+ * Returns a new array from a set of elements.
+ * @param items A set of elements to include in the new array object.
+ */
+ of(...items: number[]): Float32Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from(arrayLike: ArrayLike<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Float32Array;
+
+}
+declare var Float32Array: Float32ArrayConstructor;
+
+/**
+ * A typed array of 64-bit float values. The contents are initialized to 0. If the requested
+ * number of bytes could not be allocated an exception is raised.
+ */
+interface Float64Array {
+ /**
+ * The size in bytes of each element in the array.
+ */
+ BYTES_PER_ELEMENT: number;
+
+ /**
+ * The ArrayBuffer instance referenced by the array.
+ */
+ buffer: ArrayBuffer;
+
+ /**
+ * The length in bytes of the array.
+ */
+ byteLength: number;
+
+ /**
+ * The offset in bytes of the array.
+ */
+ byteOffset: number;
+
+ /**
+ * Returns the this object after copying a section of the array identified by start and end
+ * to the same array starting at position target
+ * @param target If target is negative, it is treated as length+target where length is the
+ * length of the array.
+ * @param start If start is negative, it is treated as length+start. If end is negative, it
+ * is treated as length+end.
+ * @param end If not specified, length of the this object is used as its default value.
+ */
+ copyWithin(target: number, start: number, end?: number): Float64Array;
+
+ /**
+ * Determines whether all the members of an array satisfy the specified test.
+ * @param callbackfn A function that accepts up to three arguments. The every method calls
+ * the callbackfn function for each element in array1 until the callbackfn returns false,
+ * or until the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ every(callbackfn: (value: number, index: number, array: Float64Array) => boolean, thisArg?: any): boolean;
+
+ /**
+ * Returns the this object after filling the section identified by start and end with value
+ * @param value value to fill array section with
+ * @param start index to start filling the array at. If start is negative, it is treated as
+ * length+start where length is the length of the array.
+ * @param end index to stop filling the array at. If end is negative, it is treated as
+ * length+end.
+ */
+ fill(value: number, start?: number, end?: number): Float64Array;
+
+ /**
+ * Returns the elements of an array that meet the condition specified in a callback function.
+ * @param callbackfn A function that accepts up to three arguments. The filter method calls
+ * the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ filter(callbackfn: (value: number, index: number, array: Float64Array) => boolean, thisArg?: any): Float64Array;
+
+ /**
+ * Returns the value of the first element in the array where predicate is true, and undefined
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found, find
+ * immediately returns that element value. Otherwise, find returns undefined.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
+
+ /**
+ * Returns the index of the first element in the array where predicate is true, and undefined
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found, find
+ * immediately returns that element value. Otherwise, find returns undefined.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ findIndex(predicate: (value: number) => boolean, thisArg?: any): number;
+
+ /**
+ * Performs the specified action for each element in an array.
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ forEach(callbackfn: (value: number, index: number, array: Float64Array) => void, thisArg?: any): void;
+
+ /**
+ * Returns the index of the first occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ indexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * Adds all the elements of an array separated by the specified separator string.
+ * @param separator A string used to separate one element of an array from the next in the
+ * resulting String. If omitted, the array elements are separated with a comma.
+ */
+ join(separator?: string): string;
+
+ /**
+ * Returns the index of the last occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ lastIndexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * The length of the array.
+ */
+ length: number;
+
+ /**
+ * Calls a defined callback function on each element of an array, and returns an array that
+ * contains the results.
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ map(callbackfn: (value: number, index: number, array: Float64Array) => number, thisArg?: any): Float64Array;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float64Array) => number, initialValue?: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float64Array) => U, initialValue: U): U;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an
+ * argument instead of an array value.
+ */
+ reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float64Array) => number, initialValue?: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float64Array) => U, initialValue: U): U;
+
+ /**
+ * Reverses the elements in an Array.
+ */
+ reverse(): Float64Array;
+
+ /**
+ * Sets a value or an array of values.
+ * @param index The index of the location to set.
+ * @param value The value to set.
+ */
+ set(index: number, value: number): void;
+
+ /**
+ * Sets a value or an array of values.
+ * @param array A typed or untyped array of values to set.
+ * @param offset The index in the current array at which the values are to be written.
+ */
+ set(array: ArrayLike<number>, offset?: number): void;
+
+ /**
+ * Returns a section of an array.
+ * @param start The beginning of the specified portion of the array.
+ * @param end The end of the specified portion of the array.
+ */
+ slice(start?: number, end?: number): Float64Array;
+
+ /**
+ * Determines whether the specified callback function returns true for any element of an array.
+ * @param callbackfn A function that accepts up to three arguments. The some method calls the
+ * callbackfn function for each element in array1 until the callbackfn returns true, or until
+ * the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ some(callbackfn: (value: number, index: number, array: Float64Array) => boolean, thisArg?: any): boolean;
+
+ /**
+ * Sorts an array.
+ * @param compareFn The name of the function used to determine the order of the elements. If
+ * omitted, the elements are sorted in ascending, ASCII character order.
+ */
+ sort(compareFn?: (a: number, b: number) => number): Float64Array;
+
+ /**
+ * Gets a new Float64Array view of the ArrayBuffer store for this array, referencing the elements
+ * at begin, inclusive, up to end, exclusive.
+ * @param begin The index of the beginning of the array.
+ * @param end The index of the end of the array.
+ */
+ subarray(begin: number, end?: number): Float64Array;
+
+ /**
+ * Converts a number to a string by using the current locale.
+ */
+ toLocaleString(): string;
+
+ /**
+ * Returns a string representation of an array.
+ */
+ toString(): string;
+
+ [index: number]: number;
+}
+
+interface Float64ArrayConstructor {
+ prototype: Float64Array;
+ new (length: number): Float64Array;
+ new (array: ArrayLike<number>): Float64Array;
+ new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Float64Array;
+
+ /**
+ * The size in bytes of each element in the array.
+ */
+ BYTES_PER_ELEMENT: number;
+
+ /**
+ * Returns a new array from a set of elements.
+ * @param items A set of elements to include in the new array object.
+ */
+ of(...items: number[]): Float64Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from(arrayLike: ArrayLike<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Float64Array;
+}
+declare var Float64Array: Float64ArrayConstructor;
+/////////////////////////////
+/// ECMAScript Internationalization API
+/////////////////////////////
+
+declare module Intl {
+ interface CollatorOptions {
+ usage?: string;
+ localeMatcher?: string;
+ numeric?: boolean;
+ caseFirst?: string;
+ sensitivity?: string;
+ ignorePunctuation?: boolean;
+ }
+
+ interface ResolvedCollatorOptions {
+ locale: string;
+ usage: string;
+ sensitivity: string;
+ ignorePunctuation: boolean;
+ collation: string;
+ caseFirst: string;
+ numeric: boolean;
+ }
+
+ interface Collator {
+ compare(x: string, y: string): number;
+ resolvedOptions(): ResolvedCollatorOptions;
+ }
+ var Collator: {
+ new (locales?: string[], options?: CollatorOptions): Collator;
+ new (locale?: string, options?: CollatorOptions): Collator;
+ (locales?: string[], options?: CollatorOptions): Collator;
+ (locale?: string, options?: CollatorOptions): Collator;
+ supportedLocalesOf(locales: string[], options?: CollatorOptions): string[];
+ supportedLocalesOf(locale: string, options?: CollatorOptions): string[];
+ }
+
+ interface NumberFormatOptions {
+ localeMatcher?: string;
+ style?: string;
+ currency?: string;
+ currencyDisplay?: string;
+ useGrouping?: boolean;
+ minimumIntegerDigits?: number;
+ minimumFractionDigits?: number;
+ maximumFractionDigits?: number;
+ minimumSignificantDigits?: number;
+ maximumSignificantDigits?: number;
+ }
+
+ interface ResolvedNumberFormatOptions {
+ locale: string;
+ numberingSystem: string;
+ style: string;
+ currency?: string;
+ currencyDisplay?: string;
+ minimumIntegerDigits: number;
+ minimumFractionDigits: number;
+ maximumFractionDigits: number;
+ minimumSignificantDigits?: number;
+ maximumSignificantDigits?: number;
+ useGrouping: boolean;
+ }
+
+ interface NumberFormat {
+ format(value: number): string;
+ resolvedOptions(): ResolvedNumberFormatOptions;
+ }
+ var NumberFormat: {
+ new (locales?: string[], options?: NumberFormatOptions): NumberFormat;
+ new (locale?: string, options?: NumberFormatOptions): NumberFormat;
+ (locales?: string[], options?: NumberFormatOptions): NumberFormat;
+ (locale?: string, options?: NumberFormatOptions): NumberFormat;
+ supportedLocalesOf(locales: string[], options?: NumberFormatOptions): string[];
+ supportedLocalesOf(locale: string, options?: NumberFormatOptions): string[];
+ }
+
+ interface DateTimeFormatOptions {
+ localeMatcher?: string;
+ weekday?: string;
+ era?: string;
+ year?: string;
+ month?: string;
+ day?: string;
+ hour?: string;
+ minute?: string;
+ second?: string;
+ timeZoneName?: string;
+ formatMatcher?: string;
+ hour12?: boolean;
+ timeZone?: string;
+ }
+
+ interface ResolvedDateTimeFormatOptions {
+ locale: string;
+ calendar: string;
+ numberingSystem: string;
+ timeZone: string;
+ hour12?: boolean;
+ weekday?: string;
+ era?: string;
+ year?: string;
+ month?: string;
+ day?: string;
+ hour?: string;
+ minute?: string;
+ second?: string;
+ timeZoneName?: string;
+ }
+
+ interface DateTimeFormat {
+ format(date?: Date | number): string;
+ resolvedOptions(): ResolvedDateTimeFormatOptions;
+ }
+ var DateTimeFormat: {
+ new (locales?: string[], options?: DateTimeFormatOptions): DateTimeFormat;
+ new (locale?: string, options?: DateTimeFormatOptions): DateTimeFormat;
+ (locales?: string[], options?: DateTimeFormatOptions): DateTimeFormat;
+ (locale?: string, options?: DateTimeFormatOptions): DateTimeFormat;
+ supportedLocalesOf(locales: string[], options?: DateTimeFormatOptions): string[];
+ supportedLocalesOf(locale: string, options?: DateTimeFormatOptions): string[];
+ }
+}
+
+interface String {
+ /**
+ * Determines whether two strings are equivalent in the current locale.
+ * @param that String to compare to target string
+ * @param locales An array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. This parameter must conform to BCP 47 standards; see the Intl.Collator object for details.
+ * @param options An object that contains one or more properties that specify comparison options. see the Intl.Collator object for details.
+ */
+ localeCompare(that: string, locales: string[], options?: Intl.CollatorOptions): number;
+
+ /**
+ * Determines whether two strings are equivalent in the current locale.
+ * @param that String to compare to target string
+ * @param locale Locale tag. If you omit this parameter, the default locale of the JavaScript runtime is used. This parameter must conform to BCP 47 standards; see the Intl.Collator object for details.
+ * @param options An object that contains one or more properties that specify comparison options. see the Intl.Collator object for details.
+ */
+ localeCompare(that: string, locale: string, options?: Intl.CollatorOptions): number;
+}
+
+interface Number {
+ /**
+ * Converts a number to a string by using the current or specified locale.
+ * @param locales An array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
+ * @param options An object that contains one or more properties that specify comparison options.
+ */
+ toLocaleString(locales?: string[], options?: Intl.NumberFormatOptions): string;
+
+ /**
+ * Converts a number to a string by using the current or specified locale.
+ * @param locale Locale tag. If you omit this parameter, the default locale of the JavaScript runtime is used.
+ * @param options An object that contains one or more properties that specify comparison options.
+ */
+ toLocaleString(locale?: string, options?: Intl.NumberFormatOptions): string;
+}
+
+interface Date {
+ /**
+ * Converts a date and time to a string by using the current or specified locale.
+ * @param locales An array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
+ * @param options An object that contains one or more properties that specify comparison options.
+ */
+ toLocaleString(locales?: string[], options?: Intl.DateTimeFormatOptions): string;
+ /**
+ * Converts a date to a string by using the current or specified locale.
+ * @param locales An array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
+ * @param options An object that contains one or more properties that specify comparison options.
+ */
+ toLocaleDateString(locales?: string[], options?: Intl.DateTimeFormatOptions): string;
+
+ /**
+ * Converts a time to a string by using the current or specified locale.
+ * @param locale Locale tag. If you omit this parameter, the default locale of the JavaScript runtime is used.
+ * @param options An object that contains one or more properties that specify comparison options.
+ */
+ toLocaleTimeString(locale?: string[], options?: Intl.DateTimeFormatOptions): string;
+
+ /**
+ * Converts a date and time to a string by using the current or specified locale.
+ * @param locale Locale tag. If you omit this parameter, the default locale of the JavaScript runtime is used.
+ * @param options An object that contains one or more properties that specify comparison options.
+ */
+ toLocaleString(locale?: string, options?: Intl.DateTimeFormatOptions): string;
+
+ /**
+ * Converts a date to a string by using the current or specified locale.
+ * @param locale Locale tag. If you omit this parameter, the default locale of the JavaScript runtime is used.
+ * @param options An object that contains one or more properties that specify comparison options.
+ */
+ toLocaleDateString(locale?: string, options?: Intl.DateTimeFormatOptions): string;
+
+ /**
+ * Converts a time to a string by using the current or specified locale.
+ * @param locale Locale tag. If you omit this parameter, the default locale of the JavaScript runtime is used.
+ * @param options An object that contains one or more properties that specify comparison options.
+ */
+ toLocaleTimeString(locale?: string, options?: Intl.DateTimeFormatOptions): string;
+}
+
+
+/////////////////////////////
+/// IE DOM APIs
+/////////////////////////////
+
+interface Algorithm {
+ name?: string;
+}
+
+interface AriaRequestEventInit extends EventInit {
+ attributeName?: string;
+ attributeValue?: string;
+}
+
+interface ClipboardEventInit extends EventInit {
+ data?: string;
+ dataType?: string;
+}
+
+interface CommandEventInit extends EventInit {
+ commandName?: string;
+ detail?: string;
+}
+
+interface CompositionEventInit extends UIEventInit {
+ data?: string;
+}
+
+interface ConfirmSiteSpecificExceptionsInformation extends ExceptionInformation {
+ arrayOfDomainStrings?: string[];
+}
+
+interface CustomEventInit extends EventInit {
+ detail?: any;
+}
+
+interface DeviceAccelerationDict {
+ x?: number;
+ y?: number;
+ z?: number;
+}
+
+interface DeviceRotationRateDict {
+ alpha?: number;
+ beta?: number;
+ gamma?: number;
+}
+
+interface EventInit {
+ bubbles?: boolean;
+ cancelable?: boolean;
+}
+
+interface ExceptionInformation {
+ domain?: string;
+}
+
+interface FocusEventInit extends UIEventInit {
+ relatedTarget?: EventTarget;
+}
+
+interface HashChangeEventInit extends EventInit {
+ newURL?: string;
+ oldURL?: string;
+}
+
+interface KeyAlgorithm {
+ name?: string;
+}
+
+interface KeyboardEventInit extends SharedKeyboardAndMouseEventInit {
+ key?: string;
+ location?: number;
+ repeat?: boolean;
+}
+
+interface MouseEventInit extends SharedKeyboardAndMouseEventInit {
+ screenX?: number;
+ screenY?: number;
+ clientX?: number;
+ clientY?: number;
+ button?: number;
+ buttons?: number;
+ relatedTarget?: EventTarget;
+}
+
+interface MsZoomToOptions {
+ contentX?: number;
+ contentY?: number;
+ viewportX?: string;
+ viewportY?: string;
+ scaleFactor?: number;
+ animate?: string;
+}
+
+interface MutationObserverInit {
+ childList?: boolean;
+ attributes?: boolean;
+ characterData?: boolean;
+ subtree?: boolean;
+ attributeOldValue?: boolean;
+ characterDataOldValue?: boolean;
+ attributeFilter?: string[];
+}
+
+interface ObjectURLOptions {
+ oneTimeOnly?: boolean;
+}
+
+interface PointerEventInit extends MouseEventInit {
+ pointerId?: number;
+ width?: number;
+ height?: number;
+ pressure?: number;
+ tiltX?: number;
+ tiltY?: number;
+ pointerType?: string;
+ isPrimary?: boolean;
+}
+
+interface PositionOptions {
+ enableHighAccuracy?: boolean;
+ timeout?: number;
+ maximumAge?: number;
+}
+
+interface SharedKeyboardAndMouseEventInit extends UIEventInit {
+ ctrlKey?: boolean;
+ shiftKey?: boolean;
+ altKey?: boolean;
+ metaKey?: boolean;
+ keyModifierStateAltGraph?: boolean;
+ keyModifierStateCapsLock?: boolean;
+ keyModifierStateFn?: boolean;
+ keyModifierStateFnLock?: boolean;
+ keyModifierStateHyper?: boolean;
+ keyModifierStateNumLock?: boolean;
+ keyModifierStateOS?: boolean;
+ keyModifierStateScrollLock?: boolean;
+ keyModifierStateSuper?: boolean;
+ keyModifierStateSymbol?: boolean;
+ keyModifierStateSymbolLock?: boolean;
+}
+
+interface StoreExceptionsInformation extends ExceptionInformation {
+ siteName?: string;
+ explanationString?: string;
+ detailURI?: string;
+}
+
+interface StoreSiteSpecificExceptionsInformation extends StoreExceptionsInformation {
+ arrayOfDomainStrings?: string[];
+}
+
+interface UIEventInit extends EventInit {
+ view?: Window;
+ detail?: number;
+}
+
+interface WebGLContextAttributes {
+ alpha?: boolean;
+ depth?: boolean;
+ stencil?: boolean;
+ antialias?: boolean;
+ premultipliedAlpha?: boolean;
+ preserveDrawingBuffer?: boolean;
+}
+
+interface WebGLContextEventInit extends EventInit {
+ statusMessage?: string;
+}
+
+interface WheelEventInit extends MouseEventInit {
+ deltaX?: number;
+ deltaY?: number;
+ deltaZ?: number;
+ deltaMode?: number;
+}
+
+interface EventListener {
+ (evt: Event): void;
+}
+
+interface ANGLE_instanced_arrays {
+ drawArraysInstancedANGLE(mode: number, first: number, count: number, primcount: number): void;
+ drawElementsInstancedANGLE(mode: number, count: number, type: number, offset: number, primcount: number): void;
+ vertexAttribDivisorANGLE(index: number, divisor: number): void;
+ VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE: number;
+}
+
+declare var ANGLE_instanced_arrays: {
+ prototype: ANGLE_instanced_arrays;
+ new(): ANGLE_instanced_arrays;
+ VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE: number;
+}
+
+interface AnalyserNode extends AudioNode {
+ fftSize: number;
+ frequencyBinCount: number;
+ maxDecibels: number;
+ minDecibels: number;
+ smoothingTimeConstant: number;
+ getByteFrequencyData(array: Uint8Array): void;
+ getByteTimeDomainData(array: Uint8Array): void;
+ getFloatFrequencyData(array: Float32Array): void;
+ getFloatTimeDomainData(array: Float32Array): void;
+}
+
+declare var AnalyserNode: {
+ prototype: AnalyserNode;
+ new(): AnalyserNode;
+}
+
+interface AnimationEvent extends Event {
+ animationName: string;
+ elapsedTime: number;
+ initAnimationEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, animationNameArg: string, elapsedTimeArg: number): void;
+}
+
+declare var AnimationEvent: {
+ prototype: AnimationEvent;
+ new(): AnimationEvent;
+}
+
+interface ApplicationCache extends EventTarget {
+ oncached: (ev: Event) => any;
+ onchecking: (ev: Event) => any;
+ ondownloading: (ev: Event) => any;
+ onerror: (ev: Event) => any;
+ onnoupdate: (ev: Event) => any;
+ onobsolete: (ev: Event) => any;
+ onprogress: (ev: ProgressEvent) => any;
+ onupdateready: (ev: Event) => any;
+ status: number;
+ abort(): void;
+ swapCache(): void;
+ update(): void;
+ CHECKING: number;
+ DOWNLOADING: number;
+ IDLE: number;
+ OBSOLETE: number;
+ UNCACHED: number;
+ UPDATEREADY: number;
+ addEventListener(type: "cached", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "checking", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "downloading", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "noupdate", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "obsolete", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "progress", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "updateready", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var ApplicationCache: {
+ prototype: ApplicationCache;
+ new(): ApplicationCache;
+ CHECKING: number;
+ DOWNLOADING: number;
+ IDLE: number;
+ OBSOLETE: number;
+ UNCACHED: number;
+ UPDATEREADY: number;
+}
+
+interface AriaRequestEvent extends Event {
+ attributeName: string;
+ attributeValue: string;
+}
+
+declare var AriaRequestEvent: {
+ prototype: AriaRequestEvent;
+ new(type: string, eventInitDict?: AriaRequestEventInit): AriaRequestEvent;
+}
+
+interface Attr extends Node {
+ name: string;
+ ownerElement: Element;
+ specified: boolean;
+ value: string;
+}
+
+declare var Attr: {
+ prototype: Attr;
+ new(): Attr;
+}
+
+interface AudioBuffer {
+ duration: number;
+ length: number;
+ numberOfChannels: number;
+ sampleRate: number;
+ getChannelData(channel: number): Float32Array;
+}
+
+declare var AudioBuffer: {
+ prototype: AudioBuffer;
+ new(): AudioBuffer;
+}
+
+interface AudioBufferSourceNode extends AudioNode {
+ buffer: AudioBuffer;
+ loop: boolean;
+ loopEnd: number;
+ loopStart: number;
+ onended: (ev: Event) => any;
+ playbackRate: AudioParam;
+ start(when?: number, offset?: number, duration?: number): void;
+ stop(when?: number): void;
+ addEventListener(type: "ended", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var AudioBufferSourceNode: {
+ prototype: AudioBufferSourceNode;
+ new(): AudioBufferSourceNode;
+}
+
+interface AudioContext extends EventTarget {
+ currentTime: number;
+ destination: AudioDestinationNode;
+ listener: AudioListener;
+ sampleRate: number;
+ state: string;
+ createAnalyser(): AnalyserNode;
+ createBiquadFilter(): BiquadFilterNode;
+ createBuffer(numberOfChannels: number, length: number, sampleRate: number): AudioBuffer;
+ createBufferSource(): AudioBufferSourceNode;
+ createChannelMerger(numberOfInputs?: number): ChannelMergerNode;
+ createChannelSplitter(numberOfOutputs?: number): ChannelSplitterNode;
+ createConvolver(): ConvolverNode;
+ createDelay(maxDelayTime?: number): DelayNode;
+ createDynamicsCompressor(): DynamicsCompressorNode;
+ createGain(): GainNode;
+ createMediaElementSource(mediaElement: HTMLMediaElement): MediaElementAudioSourceNode;
+ createOscillator(): OscillatorNode;
+ createPanner(): PannerNode;
+ createPeriodicWave(real: Float32Array, imag: Float32Array): PeriodicWave;
+ createScriptProcessor(bufferSize?: number, numberOfInputChannels?: number, numberOfOutputChannels?: number): ScriptProcessorNode;
+ createStereoPanner(): StereoPannerNode;
+ createWaveShaper(): WaveShaperNode;
+ decodeAudioData(audioData: ArrayBuffer, successCallback: DecodeSuccessCallback, errorCallback?: DecodeErrorCallback): void;
+}
+
+declare var AudioContext: {
+ prototype: AudioContext;
+ new(): AudioContext;
+}
+
+interface AudioDestinationNode extends AudioNode {
+ maxChannelCount: number;
+}
+
+declare var AudioDestinationNode: {
+ prototype: AudioDestinationNode;
+ new(): AudioDestinationNode;
+}
+
+interface AudioListener {
+ dopplerFactor: number;
+ speedOfSound: number;
+ setOrientation(x: number, y: number, z: number, xUp: number, yUp: number, zUp: number): void;
+ setPosition(x: number, y: number, z: number): void;
+ setVelocity(x: number, y: number, z: number): void;
+}
+
+declare var AudioListener: {
+ prototype: AudioListener;
+ new(): AudioListener;
+}
+
+interface AudioNode extends EventTarget {
+ channelCount: number;
+ channelCountMode: string;
+ channelInterpretation: string;
+ context: AudioContext;
+ numberOfInputs: number;
+ numberOfOutputs: number;
+ connect(destination: AudioNode, output?: number, input?: number): void;
+ disconnect(output?: number): void;
+}
+
+declare var AudioNode: {
+ prototype: AudioNode;
+ new(): AudioNode;
+}
+
+interface AudioParam {
+ defaultValue: number;
+ value: number;
+ cancelScheduledValues(startTime: number): void;
+ exponentialRampToValueAtTime(value: number, endTime: number): void;
+ linearRampToValueAtTime(value: number, endTime: number): void;
+ setTargetAtTime(target: number, startTime: number, timeConstant: number): void;
+ setValueAtTime(value: number, startTime: number): void;
+ setValueCurveAtTime(values: Float32Array, startTime: number, duration: number): void;
+}
+
+declare var AudioParam: {
+ prototype: AudioParam;
+ new(): AudioParam;
+}
+
+interface AudioProcessingEvent extends Event {
+ inputBuffer: AudioBuffer;
+ outputBuffer: AudioBuffer;
+ playbackTime: number;
+}
+
+declare var AudioProcessingEvent: {
+ prototype: AudioProcessingEvent;
+ new(): AudioProcessingEvent;
+}
+
+interface AudioTrack {
+ enabled: boolean;
+ id: string;
+ kind: string;
+ label: string;
+ language: string;
+ sourceBuffer: SourceBuffer;
+}
+
+declare var AudioTrack: {
+ prototype: AudioTrack;
+ new(): AudioTrack;
+}
+
+interface AudioTrackList extends EventTarget {
+ length: number;
+ onaddtrack: (ev: TrackEvent) => any;
+ onchange: (ev: Event) => any;
+ onremovetrack: (ev: TrackEvent) => any;
+ getTrackById(id: string): AudioTrack;
+ item(index: number): AudioTrack;
+ addEventListener(type: "addtrack", listener: (ev: TrackEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "change", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "removetrack", listener: (ev: TrackEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+ [index: number]: AudioTrack;
+}
+
+declare var AudioTrackList: {
+ prototype: AudioTrackList;
+ new(): AudioTrackList;
+}
+
+interface BarProp {
+ visible: boolean;
+}
+
+declare var BarProp: {
+ prototype: BarProp;
+ new(): BarProp;
+}
+
+interface BeforeUnloadEvent extends Event {
+ returnValue: any;
+}
+
+declare var BeforeUnloadEvent: {
+ prototype: BeforeUnloadEvent;
+ new(): BeforeUnloadEvent;
+}
+
+interface BiquadFilterNode extends AudioNode {
+ Q: AudioParam;
+ detune: AudioParam;
+ frequency: AudioParam;
+ gain: AudioParam;
+ type: string;
+ getFrequencyResponse(frequencyHz: Float32Array, magResponse: Float32Array, phaseResponse: Float32Array): void;
+}
+
+declare var BiquadFilterNode: {
+ prototype: BiquadFilterNode;
+ new(): BiquadFilterNode;
+}
+
+interface Blob {
+ size: number;
+ type: string;
+ msClose(): void;
+ msDetachStream(): any;
+ slice(start?: number, end?: number, contentType?: string): Blob;
+}
+
+declare var Blob: {
+ prototype: Blob;
+ new (blobParts?: any[], options?: BlobPropertyBag): Blob;
+}
+
+interface CDATASection extends Text {
+}
+
+declare var CDATASection: {
+ prototype: CDATASection;
+ new(): CDATASection;
+}
+
+interface CSS {
+ supports(property: string, value?: string): boolean;
+}
+declare var CSS: CSS;
+
+interface CSSConditionRule extends CSSGroupingRule {
+ conditionText: string;
+}
+
+declare var CSSConditionRule: {
+ prototype: CSSConditionRule;
+ new(): CSSConditionRule;
+}
+
+interface CSSFontFaceRule extends CSSRule {
+ style: CSSStyleDeclaration;
+}
+
+declare var CSSFontFaceRule: {
+ prototype: CSSFontFaceRule;
+ new(): CSSFontFaceRule;
+}
+
+interface CSSGroupingRule extends CSSRule {
+ cssRules: CSSRuleList;
+ deleteRule(index?: number): void;
+ insertRule(rule: string, index?: number): number;
+}
+
+declare var CSSGroupingRule: {
+ prototype: CSSGroupingRule;
+ new(): CSSGroupingRule;
+}
+
+interface CSSImportRule extends CSSRule {
+ href: string;
+ media: MediaList;
+ styleSheet: CSSStyleSheet;
+}
+
+declare var CSSImportRule: {
+ prototype: CSSImportRule;
+ new(): CSSImportRule;
+}
+
+interface CSSKeyframeRule extends CSSRule {
+ keyText: string;
+ style: CSSStyleDeclaration;
+}
+
+declare var CSSKeyframeRule: {
+ prototype: CSSKeyframeRule;
+ new(): CSSKeyframeRule;
+}
+
+interface CSSKeyframesRule extends CSSRule {
+ cssRules: CSSRuleList;
+ name: string;
+ appendRule(rule: string): void;
+ deleteRule(rule: string): void;
+ findRule(rule: string): CSSKeyframeRule;
+}
+
+declare var CSSKeyframesRule: {
+ prototype: CSSKeyframesRule;
+ new(): CSSKeyframesRule;
+}
+
+interface CSSMediaRule extends CSSConditionRule {
+ media: MediaList;
+}
+
+declare var CSSMediaRule: {
+ prototype: CSSMediaRule;
+ new(): CSSMediaRule;
+}
+
+interface CSSNamespaceRule extends CSSRule {
+ namespaceURI: string;
+ prefix: string;
+}
+
+declare var CSSNamespaceRule: {
+ prototype: CSSNamespaceRule;
+ new(): CSSNamespaceRule;
+}
+
+interface CSSPageRule extends CSSRule {
+ pseudoClass: string;
+ selector: string;
+ selectorText: string;
+ style: CSSStyleDeclaration;
+}
+
+declare var CSSPageRule: {
+ prototype: CSSPageRule;
+ new(): CSSPageRule;
+}
+
+interface CSSRule {
+ cssText: string;
+ parentRule: CSSRule;
+ parentStyleSheet: CSSStyleSheet;
+ type: number;
+ CHARSET_RULE: number;
+ FONT_FACE_RULE: number;
+ IMPORT_RULE: number;
+ KEYFRAMES_RULE: number;
+ KEYFRAME_RULE: number;
+ MEDIA_RULE: number;
+ NAMESPACE_RULE: number;
+ PAGE_RULE: number;
+ STYLE_RULE: number;
+ SUPPORTS_RULE: number;
+ UNKNOWN_RULE: number;
+ VIEWPORT_RULE: number;
+}
+
+declare var CSSRule: {
+ prototype: CSSRule;
+ new(): CSSRule;
+ CHARSET_RULE: number;
+ FONT_FACE_RULE: number;
+ IMPORT_RULE: number;
+ KEYFRAMES_RULE: number;
+ KEYFRAME_RULE: number;
+ MEDIA_RULE: number;
+ NAMESPACE_RULE: number;
+ PAGE_RULE: number;
+ STYLE_RULE: number;
+ SUPPORTS_RULE: number;
+ UNKNOWN_RULE: number;
+ VIEWPORT_RULE: number;
+}
+
+interface CSSRuleList {
+ length: number;
+ item(index: number): CSSRule;
+ [index: number]: CSSRule;
+}
+
+declare var CSSRuleList: {
+ prototype: CSSRuleList;
+ new(): CSSRuleList;
+}
+
+interface CSSStyleDeclaration {
+ alignContent: string;
+ alignItems: string;
+ alignSelf: string;
+ alignmentBaseline: string;
+ animation: string;
+ animationDelay: string;
+ animationDirection: string;
+ animationDuration: string;
+ animationFillMode: string;
+ animationIterationCount: string;
+ animationName: string;
+ animationPlayState: string;
+ animationTimingFunction: string;
+ backfaceVisibility: string;
+ background: string;
+ backgroundAttachment: string;
+ backgroundClip: string;
+ backgroundColor: string;
+ backgroundImage: string;
+ backgroundOrigin: string;
+ backgroundPosition: string;
+ backgroundPositionX: string;
+ backgroundPositionY: string;
+ backgroundRepeat: string;
+ backgroundSize: string;
+ baselineShift: string;
+ border: string;
+ borderBottom: string;
+ borderBottomColor: string;
+ borderBottomLeftRadius: string;
+ borderBottomRightRadius: string;
+ borderBottomStyle: string;
+ borderBottomWidth: string;
+ borderCollapse: string;
+ borderColor: string;
+ borderImage: string;
+ borderImageOutset: string;
+ borderImageRepeat: string;
+ borderImageSlice: string;
+ borderImageSource: string;
+ borderImageWidth: string;
+ borderLeft: string;
+ borderLeftColor: string;
+ borderLeftStyle: string;
+ borderLeftWidth: string;
+ borderRadius: string;
+ borderRight: string;
+ borderRightColor: string;
+ borderRightStyle: string;
+ borderRightWidth: string;
+ borderSpacing: string;
+ borderStyle: string;
+ borderTop: string;
+ borderTopColor: string;
+ borderTopLeftRadius: string;
+ borderTopRightRadius: string;
+ borderTopStyle: string;
+ borderTopWidth: string;
+ borderWidth: string;
+ bottom: string;
+ boxShadow: string;
+ boxSizing: string;
+ breakAfter: string;
+ breakBefore: string;
+ breakInside: string;
+ captionSide: string;
+ clear: string;
+ clip: string;
+ clipPath: string;
+ clipRule: string;
+ color: string;
+ colorInterpolationFilters: string;
+ columnCount: any;
+ columnFill: string;
+ columnGap: any;
+ columnRule: string;
+ columnRuleColor: any;
+ columnRuleStyle: string;
+ columnRuleWidth: any;
+ columnSpan: string;
+ columnWidth: any;
+ columns: string;
+ content: string;
+ counterIncrement: string;
+ counterReset: string;
+ cssFloat: string;
+ cssText: string;
+ cursor: string;
+ direction: string;
+ display: string;
+ dominantBaseline: string;
+ emptyCells: string;
+ enableBackground: string;
+ fill: string;
+ fillOpacity: string;
+ fillRule: string;
+ filter: string;
+ flex: string;
+ flexBasis: string;
+ flexDirection: string;
+ flexFlow: string;
+ flexGrow: string;
+ flexShrink: string;
+ flexWrap: string;
+ floodColor: string;
+ floodOpacity: string;
+ font: string;
+ fontFamily: string;
+ fontFeatureSettings: string;
+ fontSize: string;
+ fontSizeAdjust: string;
+ fontStretch: string;
+ fontStyle: string;
+ fontVariant: string;
+ fontWeight: string;
+ glyphOrientationHorizontal: string;
+ glyphOrientationVertical: string;
+ height: string;
+ imeMode: string;
+ justifyContent: string;
+ kerning: string;
+ left: string;
+ length: number;
+ letterSpacing: string;
+ lightingColor: string;
+ lineHeight: string;
+ listStyle: string;
+ listStyleImage: string;
+ listStylePosition: string;
+ listStyleType: string;
+ margin: string;
+ marginBottom: string;
+ marginLeft: string;
+ marginRight: string;
+ marginTop: string;
+ marker: string;
+ markerEnd: string;
+ markerMid: string;
+ markerStart: string;
+ mask: string;
+ maxHeight: string;
+ maxWidth: string;
+ minHeight: string;
+ minWidth: string;
+ msContentZoomChaining: string;
+ msContentZoomLimit: string;
+ msContentZoomLimitMax: any;
+ msContentZoomLimitMin: any;
+ msContentZoomSnap: string;
+ msContentZoomSnapPoints: string;
+ msContentZoomSnapType: string;
+ msContentZooming: string;
+ msFlowFrom: string;
+ msFlowInto: string;
+ msFontFeatureSettings: string;
+ msGridColumn: any;
+ msGridColumnAlign: string;
+ msGridColumnSpan: any;
+ msGridColumns: string;
+ msGridRow: any;
+ msGridRowAlign: string;
+ msGridRowSpan: any;
+ msGridRows: string;
+ msHighContrastAdjust: string;
+ msHyphenateLimitChars: string;
+ msHyphenateLimitLines: any;
+ msHyphenateLimitZone: any;
+ msHyphens: string;
+ msImeAlign: string;
+ msOverflowStyle: string;
+ msScrollChaining: string;
+ msScrollLimit: string;
+ msScrollLimitXMax: any;
+ msScrollLimitXMin: any;
+ msScrollLimitYMax: any;
+ msScrollLimitYMin: any;
+ msScrollRails: string;
+ msScrollSnapPointsX: string;
+ msScrollSnapPointsY: string;
+ msScrollSnapType: string;
+ msScrollSnapX: string;
+ msScrollSnapY: string;
+ msScrollTranslation: string;
+ msTextCombineHorizontal: string;
+ msTextSizeAdjust: any;
+ msTouchAction: string;
+ msTouchSelect: string;
+ msUserSelect: string;
+ msWrapFlow: string;
+ msWrapMargin: any;
+ msWrapThrough: string;
+ opacity: string;
+ order: string;
+ orphans: string;
+ outline: string;
+ outlineColor: string;
+ outlineStyle: string;
+ outlineWidth: string;
+ overflow: string;
+ overflowX: string;
+ overflowY: string;
+ padding: string;
+ paddingBottom: string;
+ paddingLeft: string;
+ paddingRight: string;
+ paddingTop: string;
+ pageBreakAfter: string;
+ pageBreakBefore: string;
+ pageBreakInside: string;
+ parentRule: CSSRule;
+ perspective: string;
+ perspectiveOrigin: string;
+ pointerEvents: string;
+ position: string;
+ quotes: string;
+ right: string;
+ rubyAlign: string;
+ rubyOverhang: string;
+ rubyPosition: string;
+ stopColor: string;
+ stopOpacity: string;
+ stroke: string;
+ strokeDasharray: string;
+ strokeDashoffset: string;
+ strokeLinecap: string;
+ strokeLinejoin: string;
+ strokeMiterlimit: string;
+ strokeOpacity: string;
+ strokeWidth: string;
+ tableLayout: string;
+ textAlign: string;
+ textAlignLast: string;
+ textAnchor: string;
+ textDecoration: string;
+ textFillColor: string;
+ textIndent: string;
+ textJustify: string;
+ textKashida: string;
+ textKashidaSpace: string;
+ textOverflow: string;
+ textShadow: string;
+ textTransform: string;
+ textUnderlinePosition: string;
+ top: string;
+ touchAction: string;
+ transform: string;
+ transformOrigin: string;
+ transformStyle: string;
+ transition: string;
+ transitionDelay: string;
+ transitionDuration: string;
+ transitionProperty: string;
+ transitionTimingFunction: string;
+ unicodeBidi: string;
+ verticalAlign: string;
+ visibility: string;
+ webkitAlignContent: string;
+ webkitAlignItems: string;
+ webkitAlignSelf: string;
+ webkitAnimation: string;
+ webkitAnimationDelay: string;
+ webkitAnimationDirection: string;
+ webkitAnimationDuration: string;
+ webkitAnimationFillMode: string;
+ webkitAnimationIterationCount: string;
+ webkitAnimationName: string;
+ webkitAnimationPlayState: string;
+ webkitAnimationTimingFunction: string;
+ webkitAppearance: string;
+ webkitBackfaceVisibility: string;
+ webkitBackground: string;
+ webkitBackgroundAttachment: string;
+ webkitBackgroundClip: string;
+ webkitBackgroundColor: string;
+ webkitBackgroundImage: string;
+ webkitBackgroundOrigin: string;
+ webkitBackgroundPosition: string;
+ webkitBackgroundPositionX: string;
+ webkitBackgroundPositionY: string;
+ webkitBackgroundRepeat: string;
+ webkitBackgroundSize: string;
+ webkitBorderBottomLeftRadius: string;
+ webkitBorderBottomRightRadius: string;
+ webkitBorderImage: string;
+ webkitBorderImageOutset: string;
+ webkitBorderImageRepeat: string;
+ webkitBorderImageSlice: string;
+ webkitBorderImageSource: string;
+ webkitBorderImageWidth: string;
+ webkitBorderRadius: string;
+ webkitBorderTopLeftRadius: string;
+ webkitBorderTopRightRadius: string;
+ webkitBoxAlign: string;
+ webkitBoxDirection: string;
+ webkitBoxFlex: string;
+ webkitBoxOrdinalGroup: string;
+ webkitBoxOrient: string;
+ webkitBoxPack: string;
+ webkitBoxSizing: string;
+ webkitColumnBreakAfter: string;
+ webkitColumnBreakBefore: string;
+ webkitColumnBreakInside: string;
+ webkitColumnCount: any;
+ webkitColumnGap: any;
+ webkitColumnRule: string;
+ webkitColumnRuleColor: any;
+ webkitColumnRuleStyle: string;
+ webkitColumnRuleWidth: any;
+ webkitColumnSpan: string;
+ webkitColumnWidth: any;
+ webkitColumns: string;
+ webkitFilter: string;
+ webkitFlex: string;
+ webkitFlexBasis: string;
+ webkitFlexDirection: string;
+ webkitFlexFlow: string;
+ webkitFlexGrow: string;
+ webkitFlexShrink: string;
+ webkitFlexWrap: string;
+ webkitJustifyContent: string;
+ webkitOrder: string;
+ webkitPerspective: string;
+ webkitPerspectiveOrigin: string;
+ webkitTapHighlightColor: string;
+ webkitTextFillColor: string;
+ webkitTextSizeAdjust: any;
+ webkitTransform: string;
+ webkitTransformOrigin: string;
+ webkitTransformStyle: string;
+ webkitTransition: string;
+ webkitTransitionDelay: string;
+ webkitTransitionDuration: string;
+ webkitTransitionProperty: string;
+ webkitTransitionTimingFunction: string;
+ webkitUserSelect: string;
+ webkitWritingMode: string;
+ whiteSpace: string;
+ widows: string;
+ width: string;
+ wordBreak: string;
+ wordSpacing: string;
+ wordWrap: string;
+ writingMode: string;
+ zIndex: string;
+ zoom: string;
+ getPropertyPriority(propertyName: string): string;
+ getPropertyValue(propertyName: string): string;
+ item(index: number): string;
+ removeProperty(propertyName: string): string;
+ setProperty(propertyName: string, value: string, priority?: string): void;
+ [index: number]: string;
+}
+
+declare var CSSStyleDeclaration: {
+ prototype: CSSStyleDeclaration;
+ new(): CSSStyleDeclaration;
+}
+
+interface CSSStyleRule extends CSSRule {
+ readOnly: boolean;
+ selectorText: string;
+ style: CSSStyleDeclaration;
+}
+
+declare var CSSStyleRule: {
+ prototype: CSSStyleRule;
+ new(): CSSStyleRule;
+}
+
+interface CSSStyleSheet extends StyleSheet {
+ cssRules: CSSRuleList;
+ cssText: string;
+ href: string;
+ id: string;
+ imports: StyleSheetList;
+ isAlternate: boolean;
+ isPrefAlternate: boolean;
+ ownerRule: CSSRule;
+ owningElement: Element;
+ pages: StyleSheetPageList;
+ readOnly: boolean;
+ rules: CSSRuleList;
+ addImport(bstrURL: string, lIndex?: number): number;
+ addPageRule(bstrSelector: string, bstrStyle: string, lIndex?: number): number;
+ addRule(bstrSelector: string, bstrStyle?: string, lIndex?: number): number;
+ deleteRule(index?: number): void;
+ insertRule(rule: string, index?: number): number;
+ removeImport(lIndex: number): void;
+ removeRule(lIndex: number): void;
+}
+
+declare var CSSStyleSheet: {
+ prototype: CSSStyleSheet;
+ new(): CSSStyleSheet;
+}
+
+interface CSSSupportsRule extends CSSConditionRule {
+}
+
+declare var CSSSupportsRule: {
+ prototype: CSSSupportsRule;
+ new(): CSSSupportsRule;
+}
+
+interface CanvasGradient {
+ addColorStop(offset: number, color: string): void;
+}
+
+declare var CanvasGradient: {
+ prototype: CanvasGradient;
+ new(): CanvasGradient;
+}
+
+interface CanvasPattern {
+}
+
+declare var CanvasPattern: {
+ prototype: CanvasPattern;
+ new(): CanvasPattern;
+}
+
+interface CanvasRenderingContext2D {
+ canvas: HTMLCanvasElement;
+ fillStyle: string | CanvasGradient | CanvasPattern;
+ font: string;
+ globalAlpha: number;
+ globalCompositeOperation: string;
+ lineCap: string;
+ lineDashOffset: number;
+ lineJoin: string;
+ lineWidth: number;
+ miterLimit: number;
+ msFillRule: string;
+ msImageSmoothingEnabled: boolean;
+ shadowBlur: number;
+ shadowColor: string;
+ shadowOffsetX: number;
+ shadowOffsetY: number;
+ strokeStyle: string | CanvasGradient | CanvasPattern;
+ textAlign: string;
+ textBaseline: string;
+ arc(x: number, y: number, radius: number, startAngle: number, endAngle: number, anticlockwise?: boolean): void;
+ arcTo(x1: number, y1: number, x2: number, y2: number, radius: number): void;
+ beginPath(): void;
+ bezierCurveTo(cp1x: number, cp1y: number, cp2x: number, cp2y: number, x: number, y: number): void;
+ clearRect(x: number, y: number, w: number, h: number): void;
+ clip(fillRule?: string): void;
+ closePath(): void;
+ createImageData(imageDataOrSw: number | ImageData, sh?: number): ImageData;
+ createLinearGradient(x0: number, y0: number, x1: number, y1: number): CanvasGradient;
+ createPattern(image: HTMLImageElement | HTMLCanvasElement | HTMLVideoElement, repetition: string): CanvasPattern;
+ createRadialGradient(x0: number, y0: number, r0: number, x1: number, y1: number, r1: number): CanvasGradient;
+ drawImage(image: HTMLImageElement | HTMLCanvasElement | HTMLVideoElement, offsetX: number, offsetY: number, width?: number, height?: number, canvasOffsetX?: number, canvasOffsetY?: number, canvasImageWidth?: number, canvasImageHeight?: number): void;
+ fill(fillRule?: string): void;
+ fillRect(x: number, y: number, w: number, h: number): void;
+ fillText(text: string, x: number, y: number, maxWidth?: number): void;
+ getImageData(sx: number, sy: number, sw: number, sh: number): ImageData;
+ getLineDash(): number[];
+ isPointInPath(x: number, y: number, fillRule?: string): boolean;
+ lineTo(x: number, y: number): void;
+ measureText(text: string): TextMetrics;
+ moveTo(x: number, y: number): void;
+ putImageData(imagedata: ImageData, dx: number, dy: number, dirtyX?: number, dirtyY?: number, dirtyWidth?: number, dirtyHeight?: number): void;
+ quadraticCurveTo(cpx: number, cpy: number, x: number, y: number): void;
+ rect(x: number, y: number, w: number, h: number): void;
+ restore(): void;
+ rotate(angle: number): void;
+ save(): void;
+ scale(x: number, y: number): void;
+ setLineDash(segments: number[]): void;
+ setTransform(m11: number, m12: number, m21: number, m22: number, dx: number, dy: number): void;
+ stroke(): void;
+ strokeRect(x: number, y: number, w: number, h: number): void;
+ strokeText(text: string, x: number, y: number, maxWidth?: number): void;
+ transform(m11: number, m12: number, m21: number, m22: number, dx: number, dy: number): void;
+ translate(x: number, y: number): void;
+}
+
+declare var CanvasRenderingContext2D: {
+ prototype: CanvasRenderingContext2D;
+ new(): CanvasRenderingContext2D;
+}
+
+interface ChannelMergerNode extends AudioNode {
+}
+
+declare var ChannelMergerNode: {
+ prototype: ChannelMergerNode;
+ new(): ChannelMergerNode;
+}
+
+interface ChannelSplitterNode extends AudioNode {
+}
+
+declare var ChannelSplitterNode: {
+ prototype: ChannelSplitterNode;
+ new(): ChannelSplitterNode;
+}
+
+interface CharacterData extends Node, ChildNode {
+ data: string;
+ length: number;
+ appendData(arg: string): void;
+ deleteData(offset: number, count: number): void;
+ insertData(offset: number, arg: string): void;
+ replaceData(offset: number, count: number, arg: string): void;
+ substringData(offset: number, count: number): string;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var CharacterData: {
+ prototype: CharacterData;
+ new(): CharacterData;
+}
+
+interface ClientRect {
+ bottom: number;
+ height: number;
+ left: number;
+ right: number;
+ top: number;
+ width: number;
+}
+
+declare var ClientRect: {
+ prototype: ClientRect;
+ new(): ClientRect;
+}
+
+interface ClientRectList {
+ length: number;
+ item(index: number): ClientRect;
+ [index: number]: ClientRect;
+}
+
+declare var ClientRectList: {
+ prototype: ClientRectList;
+ new(): ClientRectList;
+}
+
+interface ClipboardEvent extends Event {
+ clipboardData: DataTransfer;
+}
+
+declare var ClipboardEvent: {
+ prototype: ClipboardEvent;
+ new(type: string, eventInitDict?: ClipboardEventInit): ClipboardEvent;
+}
+
+interface CloseEvent extends Event {
+ code: number;
+ reason: string;
+ wasClean: boolean;
+ initCloseEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, wasCleanArg: boolean, codeArg: number, reasonArg: string): void;
+}
+
+declare var CloseEvent: {
+ prototype: CloseEvent;
+ new(): CloseEvent;
+}
+
+interface CommandEvent extends Event {
+ commandName: string;
+ detail: string;
+}
+
+declare var CommandEvent: {
+ prototype: CommandEvent;
+ new(type: string, eventInitDict?: CommandEventInit): CommandEvent;
+}
+
+interface Comment extends CharacterData {
+ text: string;
+}
+
+declare var Comment: {
+ prototype: Comment;
+ new(): Comment;
+}
+
+interface CompositionEvent extends UIEvent {
+ data: string;
+ locale: string;
+ initCompositionEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, dataArg: string, locale: string): void;
+}
+
+declare var CompositionEvent: {
+ prototype: CompositionEvent;
+ new(typeArg: string, eventInitDict?: CompositionEventInit): CompositionEvent;
+}
+
+interface Console {
+ assert(test?: boolean, message?: string, ...optionalParams: any[]): void;
+ clear(): void;
+ count(countTitle?: string): void;
+ debug(message?: string, ...optionalParams: any[]): void;
+ dir(value?: any, ...optionalParams: any[]): void;
+ dirxml(value: any): void;
+ error(message?: any, ...optionalParams: any[]): void;
+ group(groupTitle?: string): void;
+ groupCollapsed(groupTitle?: string): void;
+ groupEnd(): void;
+ info(message?: any, ...optionalParams: any[]): void;
+ log(message?: any, ...optionalParams: any[]): void;
+ msIsIndependentlyComposed(element: Element): boolean;
+ profile(reportName?: string): void;
+ profileEnd(): void;
+ select(element: Element): void;
+ time(timerName?: string): void;
+ timeEnd(timerName?: string): void;
+ trace(): void;
+ warn(message?: any, ...optionalParams: any[]): void;
+}
+
+declare var Console: {
+ prototype: Console;
+ new(): Console;
+}
+
+interface ConvolverNode extends AudioNode {
+ buffer: AudioBuffer;
+ normalize: boolean;
+}
+
+declare var ConvolverNode: {
+ prototype: ConvolverNode;
+ new(): ConvolverNode;
+}
+
+interface Coordinates {
+ accuracy: number;
+ altitude: number;
+ altitudeAccuracy: number;
+ heading: number;
+ latitude: number;
+ longitude: number;
+ speed: number;
+}
+
+declare var Coordinates: {
+ prototype: Coordinates;
+ new(): Coordinates;
+}
+
+interface Crypto extends Object, RandomSource {
+ subtle: SubtleCrypto;
+}
+
+declare var Crypto: {
+ prototype: Crypto;
+ new(): Crypto;
+}
+
+interface CryptoKey {
+ algorithm: KeyAlgorithm;
+ extractable: boolean;
+ type: string;
+ usages: string[];
+}
+
+declare var CryptoKey: {
+ prototype: CryptoKey;
+ new(): CryptoKey;
+}
+
+interface CryptoKeyPair {
+ privateKey: CryptoKey;
+ publicKey: CryptoKey;
+}
+
+declare var CryptoKeyPair: {
+ prototype: CryptoKeyPair;
+ new(): CryptoKeyPair;
+}
+
+interface CustomEvent extends Event {
+ detail: any;
+ initCustomEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, detailArg: any): void;
+}
+
+declare var CustomEvent: {
+ prototype: CustomEvent;
+ new(typeArg: string, eventInitDict?: CustomEventInit): CustomEvent;
+}
+
+interface DOMError {
+ name: string;
+ toString(): string;
+}
+
+declare var DOMError: {
+ prototype: DOMError;
+ new(): DOMError;
+}
+
+interface DOMException {
+ code: number;
+ message: string;
+ name: string;
+ toString(): string;
+ ABORT_ERR: number;
+ DATA_CLONE_ERR: number;
+ DOMSTRING_SIZE_ERR: number;
+ HIERARCHY_REQUEST_ERR: number;
+ INDEX_SIZE_ERR: number;
+ INUSE_ATTRIBUTE_ERR: number;
+ INVALID_ACCESS_ERR: number;
+ INVALID_CHARACTER_ERR: number;
+ INVALID_MODIFICATION_ERR: number;
+ INVALID_NODE_TYPE_ERR: number;
+ INVALID_STATE_ERR: number;
+ NAMESPACE_ERR: number;
+ NETWORK_ERR: number;
+ NOT_FOUND_ERR: number;
+ NOT_SUPPORTED_ERR: number;
+ NO_DATA_ALLOWED_ERR: number;
+ NO_MODIFICATION_ALLOWED_ERR: number;
+ PARSE_ERR: number;
+ QUOTA_EXCEEDED_ERR: number;
+ SECURITY_ERR: number;
+ SERIALIZE_ERR: number;
+ SYNTAX_ERR: number;
+ TIMEOUT_ERR: number;
+ TYPE_MISMATCH_ERR: number;
+ URL_MISMATCH_ERR: number;
+ VALIDATION_ERR: number;
+ WRONG_DOCUMENT_ERR: number;
+}
+
+declare var DOMException: {
+ prototype: DOMException;
+ new(): DOMException;
+ ABORT_ERR: number;
+ DATA_CLONE_ERR: number;
+ DOMSTRING_SIZE_ERR: number;
+ HIERARCHY_REQUEST_ERR: number;
+ INDEX_SIZE_ERR: number;
+ INUSE_ATTRIBUTE_ERR: number;
+ INVALID_ACCESS_ERR: number;
+ INVALID_CHARACTER_ERR: number;
+ INVALID_MODIFICATION_ERR: number;
+ INVALID_NODE_TYPE_ERR: number;
+ INVALID_STATE_ERR: number;
+ NAMESPACE_ERR: number;
+ NETWORK_ERR: number;
+ NOT_FOUND_ERR: number;
+ NOT_SUPPORTED_ERR: number;
+ NO_DATA_ALLOWED_ERR: number;
+ NO_MODIFICATION_ALLOWED_ERR: number;
+ PARSE_ERR: number;
+ QUOTA_EXCEEDED_ERR: number;
+ SECURITY_ERR: number;
+ SERIALIZE_ERR: number;
+ SYNTAX_ERR: number;
+ TIMEOUT_ERR: number;
+ TYPE_MISMATCH_ERR: number;
+ URL_MISMATCH_ERR: number;
+ VALIDATION_ERR: number;
+ WRONG_DOCUMENT_ERR: number;
+}
+
+interface DOMImplementation {
+ createDocument(namespaceURI: string, qualifiedName: string, doctype: DocumentType): Document;
+ createDocumentType(qualifiedName: string, publicId: string, systemId: string): DocumentType;
+ createHTMLDocument(title: string): Document;
+ hasFeature(feature: string, version: string): boolean;
+}
+
+declare var DOMImplementation: {
+ prototype: DOMImplementation;
+ new(): DOMImplementation;
+}
+
+interface DOMParser {
+ parseFromString(source: string, mimeType: string): Document;
+}
+
+declare var DOMParser: {
+ prototype: DOMParser;
+ new(): DOMParser;
+}
+
+interface DOMSettableTokenList extends DOMTokenList {
+ value: string;
+}
+
+declare var DOMSettableTokenList: {
+ prototype: DOMSettableTokenList;
+ new(): DOMSettableTokenList;
+}
+
+interface DOMStringList {
+ length: number;
+ contains(str: string): boolean;
+ item(index: number): string;
+ [index: number]: string;
+}
+
+declare var DOMStringList: {
+ prototype: DOMStringList;
+ new(): DOMStringList;
+}
+
+interface DOMStringMap {
+ [name: string]: string;
+}
+
+declare var DOMStringMap: {
+ prototype: DOMStringMap;
+ new(): DOMStringMap;
+}
+
+interface DOMTokenList {
+ length: number;
+ add(...token: string[]): void;
+ contains(token: string): boolean;
+ item(index: number): string;
+ remove(...token: string[]): void;
+ toString(): string;
+ toggle(token: string, force?: boolean): boolean;
+ [index: number]: string;
+}
+
+declare var DOMTokenList: {
+ prototype: DOMTokenList;
+ new(): DOMTokenList;
+}
+
+interface DataCue extends TextTrackCue {
+ data: ArrayBuffer;
+}
+
+declare var DataCue: {
+ prototype: DataCue;
+ new(): DataCue;
+}
+
+interface DataTransfer {
+ dropEffect: string;
+ effectAllowed: string;
+ files: FileList;
+ items: DataTransferItemList;
+ types: DOMStringList;
+ clearData(format?: string): boolean;
+ getData(format: string): string;
+ setData(format: string, data: string): boolean;
+}
+
+declare var DataTransfer: {
+ prototype: DataTransfer;
+ new(): DataTransfer;
+}
+
+interface DataTransferItem {
+ kind: string;
+ type: string;
+ getAsFile(): File;
+ getAsString(_callback: FunctionStringCallback): void;
+}
+
+declare var DataTransferItem: {
+ prototype: DataTransferItem;
+ new(): DataTransferItem;
+}
+
+interface DataTransferItemList {
+ length: number;
+ add(data: File): DataTransferItem;
+ clear(): void;
+ item(index: number): File;
+ remove(index: number): void;
+ [index: number]: File;
+}
+
+declare var DataTransferItemList: {
+ prototype: DataTransferItemList;
+ new(): DataTransferItemList;
+}
+
+interface DeferredPermissionRequest {
+ id: number;
+ type: string;
+ uri: string;
+ allow(): void;
+ deny(): void;
+}
+
+declare var DeferredPermissionRequest: {
+ prototype: DeferredPermissionRequest;
+ new(): DeferredPermissionRequest;
+}
+
+interface DelayNode extends AudioNode {
+ delayTime: AudioParam;
+}
+
+declare var DelayNode: {
+ prototype: DelayNode;
+ new(): DelayNode;
+}
+
+interface DeviceAcceleration {
+ x: number;
+ y: number;
+ z: number;
+}
+
+declare var DeviceAcceleration: {
+ prototype: DeviceAcceleration;
+ new(): DeviceAcceleration;
+}
+
+interface DeviceMotionEvent extends Event {
+ acceleration: DeviceAcceleration;
+ accelerationIncludingGravity: DeviceAcceleration;
+ interval: number;
+ rotationRate: DeviceRotationRate;
+ initDeviceMotionEvent(type: string, bubbles: boolean, cancelable: boolean, acceleration: DeviceAccelerationDict, accelerationIncludingGravity: DeviceAccelerationDict, rotationRate: DeviceRotationRateDict, interval: number): void;
+}
+
+declare var DeviceMotionEvent: {
+ prototype: DeviceMotionEvent;
+ new(): DeviceMotionEvent;
+}
+
+interface DeviceOrientationEvent extends Event {
+ absolute: boolean;
+ alpha: number;
+ beta: number;
+ gamma: number;
+ initDeviceOrientationEvent(type: string, bubbles: boolean, cancelable: boolean, alpha: number, beta: number, gamma: number, absolute: boolean): void;
+}
+
+declare var DeviceOrientationEvent: {
+ prototype: DeviceOrientationEvent;
+ new(): DeviceOrientationEvent;
+}
+
+interface DeviceRotationRate {
+ alpha: number;
+ beta: number;
+ gamma: number;
+}
+
+declare var DeviceRotationRate: {
+ prototype: DeviceRotationRate;
+ new(): DeviceRotationRate;
+}
+
+interface Document extends Node, GlobalEventHandlers, NodeSelector, DocumentEvent {
+ /**
+ * Sets or gets the URL for the current document.
+ */
+ URL: string;
+ /**
+ * Gets the URL for the document, stripped of any character encoding.
+ */
+ URLUnencoded: string;
+ /**
+ * Gets the object that has the focus when the parent document has focus.
+ */
+ activeElement: Element;
+ /**
+ * Sets or gets the color of all active links in the document.
+ */
+ alinkColor: string;
+ /**
+ * Returns a reference to the collection of elements contained by the object.
+ */
+ all: HTMLCollection;
+ /**
+ * Retrieves a collection of all a objects that have a name and/or id property. Objects in this collection are in HTML source order.
+ */
+ anchors: HTMLCollection;
+ /**
+ * Retrieves a collection of all applet objects in the document.
+ */
+ applets: HTMLCollection;
+ /**
+ * Deprecated. Sets or retrieves a value that indicates the background color behind the object.
+ */
+ bgColor: string;
+ /**
+ * Specifies the beginning and end of the document body.
+ */
+ body: HTMLElement;
+ characterSet: string;
+ /**
+ * Gets or sets the character set used to encode the object.
+ */
+ charset: string;
+ /**
+ * Gets a value that indicates whether standards-compliant mode is switched on for the object.
+ */
+ compatMode: string;
+ cookie: string;
+ /**
+ * Gets the default character set from the current regional language settings.
+ */
+ defaultCharset: string;
+ defaultView: Window;
+ /**
+ * Sets or gets a value that indicates whether the document can be edited.
+ */
+ designMode: string;
+ /**
+ * Sets or retrieves a value that indicates the reading order of the object.
+ */
+ dir: string;
+ /**
+ * Gets an object representing the document type declaration associated with the current document.
+ */
+ doctype: DocumentType;
+ /**
+ * Gets a reference to the root node of the document.
+ */
+ documentElement: HTMLElement;
+ /**
+ * Sets or gets the security domain of the document.
+ */
+ domain: string;
+ /**
+ * Retrieves a collection of all embed objects in the document.
+ */
+ embeds: HTMLCollection;
+ /**
+ * Sets or gets the foreground (text) color of the document.
+ */
+ fgColor: string;
+ /**
+ * Retrieves a collection, in source order, of all form objects in the document.
+ */
+ forms: HTMLCollection;
+ fullscreenElement: Element;
+ fullscreenEnabled: boolean;
+ head: HTMLHeadElement;
+ hidden: boolean;
+ /**
+ * Retrieves a collection, in source order, of img objects in the document.
+ */
+ images: HTMLCollection;
+ /**
+ * Gets the implementation object of the current document.
+ */
+ implementation: DOMImplementation;
+ /**
+ * Returns the character encoding used to create the webpage that is loaded into the document object.
+ */
+ inputEncoding: string;
+ /**
+ * Gets the date that the page was last modified, if the page supplies one.
+ */
+ lastModified: string;
+ /**
+ * Sets or gets the color of the document links.
+ */
+ linkColor: string;
+ /**
+ * Retrieves a collection of all a objects that specify the href property and all area objects in the document.
+ */
+ links: HTMLCollection;
+ /**
+ * Contains information about the current URL.
+ */
+ location: Location;
+ media: string;
+ msCSSOMElementFloatMetrics: boolean;
+ msCapsLockWarningOff: boolean;
+ msHidden: boolean;
+ msVisibilityState: string;
+ /**
+ * Fires when the user aborts the download.
+ * @param ev The event.
+ */
+ onabort: (ev: Event) => any;
+ /**
+ * Fires when the object is set as the active element.
+ * @param ev The event.
+ */
+ onactivate: (ev: UIEvent) => any;
+ /**
+ * Fires immediately before the object is set as the active element.
+ * @param ev The event.
+ */
+ onbeforeactivate: (ev: UIEvent) => any;
+ /**
+ * Fires immediately before the activeElement is changed from the current object to another object in the parent document.
+ * @param ev The event.
+ */
+ onbeforedeactivate: (ev: UIEvent) => any;
+ /**
+ * Fires when the object loses the input focus.
+ * @param ev The focus event.
+ */
+ onblur: (ev: FocusEvent) => any;
+ /**
+ * Occurs when playback is possible, but would require further buffering.
+ * @param ev The event.
+ */
+ oncanplay: (ev: Event) => any;
+ oncanplaythrough: (ev: Event) => any;
+ /**
+ * Fires when the contents of the object or selection have changed.
+ * @param ev The event.
+ */
+ onchange: (ev: Event) => any;
+ /**
+ * Fires when the user clicks the left mouse button on the object
+ * @param ev The mouse event.
+ */
+ onclick: (ev: MouseEvent) => any;
+ /**
+ * Fires when the user clicks the right mouse button in the client area, opening the context menu.
+ * @param ev The mouse event.
+ */
+ oncontextmenu: (ev: PointerEvent) => any;
+ /**
+ * Fires when the user double-clicks the object.
+ * @param ev The mouse event.
+ */
+ ondblclick: (ev: MouseEvent) => any;
+ /**
+ * Fires when the activeElement is changed from the current object to another object in the parent document.
+ * @param ev The UI Event
+ */
+ ondeactivate: (ev: UIEvent) => any;
+ /**
+ * Fires on the source object continuously during a drag operation.
+ * @param ev The event.
+ */
+ ondrag: (ev: DragEvent) => any;
+ /**
+ * Fires on the source object when the user releases the mouse at the close of a drag operation.
+ * @param ev The event.
+ */
+ ondragend: (ev: DragEvent) => any;
+ /**
+ * Fires on the target element when the user drags the object to a valid drop target.
+ * @param ev The drag event.
+ */
+ ondragenter: (ev: DragEvent) => any;
+ /**
+ * Fires on the target object when the user moves the mouse out of a valid drop target during a drag operation.
+ * @param ev The drag event.
+ */
+ ondragleave: (ev: DragEvent) => any;
+ /**
+ * Fires on the target element continuously while the user drags the object over a valid drop target.
+ * @param ev The event.
+ */
+ ondragover: (ev: DragEvent) => any;
+ /**
+ * Fires on the source object when the user starts to drag a text selection or selected object.
+ * @param ev The event.
+ */
+ ondragstart: (ev: DragEvent) => any;
+ ondrop: (ev: DragEvent) => any;
+ /**
+ * Occurs when the duration attribute is updated.
+ * @param ev The event.
+ */
+ ondurationchange: (ev: Event) => any;
+ /**
+ * Occurs when the media element is reset to its initial state.
+ * @param ev The event.
+ */
+ onemptied: (ev: Event) => any;
+ /**
+ * Occurs when the end of playback is reached.
+ * @param ev The event
+ */
+ onended: (ev: Event) => any;
+ /**
+ * Fires when an error occurs during object loading.
+ * @param ev The event.
+ */
+ onerror: (ev: Event) => any;
+ /**
+ * Fires when the object receives focus.
+ * @param ev The event.
+ */
+ onfocus: (ev: FocusEvent) => any;
+ onfullscreenchange: (ev: Event) => any;
+ onfullscreenerror: (ev: Event) => any;
+ oninput: (ev: Event) => any;
+ /**
+ * Fires when the user presses a key.
+ * @param ev The keyboard event
+ */
+ onkeydown: (ev: KeyboardEvent) => any;
+ /**
+ * Fires when the user presses an alphanumeric key.
+ * @param ev The event.
+ */
+ onkeypress: (ev: KeyboardEvent) => any;
+ /**
+ * Fires when the user releases a key.
+ * @param ev The keyboard event
+ */
+ onkeyup: (ev: KeyboardEvent) => any;
+ /**
+ * Fires immediately after the browser loads the object.
+ * @param ev The event.
+ */
+ onload: (ev: Event) => any;
+ /**
+ * Occurs when media data is loaded at the current playback position.
+ * @param ev The event.
+ */
+ onloadeddata: (ev: Event) => any;
+ /**
+ * Occurs when the duration and dimensions of the media have been determined.
+ * @param ev The event.
+ */
+ onloadedmetadata: (ev: Event) => any;
+ /**
+ * Occurs when Internet Explorer begins looking for media data.
+ * @param ev The event.
+ */
+ onloadstart: (ev: Event) => any;
+ /**
+ * Fires when the user clicks the object with either mouse button.
+ * @param ev The mouse event.
+ */
+ onmousedown: (ev: MouseEvent) => any;
+ /**
+ * Fires when the user moves the mouse over the object.
+ * @param ev The mouse event.
+ */
+ onmousemove: (ev: MouseEvent) => any;
+ /**
+ * Fires when the user moves the mouse pointer outside the boundaries of the object.
+ * @param ev The mouse event.
+ */
+ onmouseout: (ev: MouseEvent) => any;
+ /**
+ * Fires when the user moves the mouse pointer into the object.
+ * @param ev The mouse event.
+ */
+ onmouseover: (ev: MouseEvent) => any;
+ /**
+ * Fires when the user releases a mouse button while the mouse is over the object.
+ * @param ev The mouse event.
+ */
+ onmouseup: (ev: MouseEvent) => any;
+ /**
+ * Fires when the wheel button is rotated.
+ * @param ev The mouse event
+ */
+ onmousewheel: (ev: MouseWheelEvent) => any;
+ onmscontentzoom: (ev: UIEvent) => any;
+ onmsgesturechange: (ev: MSGestureEvent) => any;
+ onmsgesturedoubletap: (ev: MSGestureEvent) => any;
+ onmsgestureend: (ev: MSGestureEvent) => any;
+ onmsgesturehold: (ev: MSGestureEvent) => any;
+ onmsgesturestart: (ev: MSGestureEvent) => any;
+ onmsgesturetap: (ev: MSGestureEvent) => any;
+ onmsinertiastart: (ev: MSGestureEvent) => any;
+ onmsmanipulationstatechanged: (ev: MSManipulationEvent) => any;
+ onmspointercancel: (ev: MSPointerEvent) => any;
+ onmspointerdown: (ev: MSPointerEvent) => any;
+ onmspointerenter: (ev: MSPointerEvent) => any;
+ onmspointerleave: (ev: MSPointerEvent) => any;
+ onmspointermove: (ev: MSPointerEvent) => any;
+ onmspointerout: (ev: MSPointerEvent) => any;
+ onmspointerover: (ev: MSPointerEvent) => any;
+ onmspointerup: (ev: MSPointerEvent) => any;
+ /**
+ * Occurs when an item is removed from a Jump List of a webpage running in Site Mode.
+ * @param ev The event.
+ */
+ onmssitemodejumplistitemremoved: (ev: MSSiteModeEvent) => any;
+ /**
+ * Occurs when a user clicks a button in a Thumbnail Toolbar of a webpage running in Site Mode.
+ * @param ev The event.
+ */
+ onmsthumbnailclick: (ev: MSSiteModeEvent) => any;
+ /**
+ * Occurs when playback is paused.
+ * @param ev The event.
+ */
+ onpause: (ev: Event) => any;
+ /**
+ * Occurs when the play method is requested.
+ * @param ev The event.
+ */
+ onplay: (ev: Event) => any;
+ /**
+ * Occurs when the audio or video has started playing.
+ * @param ev The event.
+ */
+ onplaying: (ev: Event) => any;
+ onpointerlockchange: (ev: Event) => any;
+ onpointerlockerror: (ev: Event) => any;
+ /**
+ * Occurs to indicate progress while downloading media data.
+ * @param ev The event.
+ */
+ onprogress: (ev: ProgressEvent) => any;
+ /**
+ * Occurs when the playback rate is increased or decreased.
+ * @param ev The event.
+ */
+ onratechange: (ev: Event) => any;
+ /**
+ * Fires when the state of the object has changed.
+ * @param ev The event
+ */
+ onreadystatechange: (ev: ProgressEvent) => any;
+ /**
+ * Fires when the user resets a form.
+ * @param ev The event.
+ */
+ onreset: (ev: Event) => any;
+ /**
+ * Fires when the user repositions the scroll box in the scroll bar on the object.
+ * @param ev The event.
+ */
+ onscroll: (ev: UIEvent) => any;
+ /**
+ * Occurs when the seek operation ends.
+ * @param ev The event.
+ */
+ onseeked: (ev: Event) => any;
+ /**
+ * Occurs when the current playback position is moved.
+ * @param ev The event.
+ */
+ onseeking: (ev: Event) => any;
+ /**
+ * Fires when the current selection changes.
+ * @param ev The event.
+ */
+ onselect: (ev: UIEvent) => any;
+ onselectstart: (ev: Event) => any;
+ /**
+ * Occurs when the download has stopped.
+ * @param ev The event.
+ */
+ onstalled: (ev: Event) => any;
+ /**
+ * Fires when the user clicks the Stop button or leaves the Web page.
+ * @param ev The event.
+ */
+ onstop: (ev: Event) => any;
+ onsubmit: (ev: Event) => any;
+ /**
+ * Occurs if the load operation has been intentionally halted.
+ * @param ev The event.
+ */
+ onsuspend: (ev: Event) => any;
+ /**
+ * Occurs to indicate the current playback position.
+ * @param ev The event.
+ */
+ ontimeupdate: (ev: Event) => any;
+ ontouchcancel: (ev: TouchEvent) => any;
+ ontouchend: (ev: TouchEvent) => any;
+ ontouchmove: (ev: TouchEvent) => any;
+ ontouchstart: (ev: TouchEvent) => any;
+ /**
+ * Occurs when the volume is changed, or playback is muted or unmuted.
+ * @param ev The event.
+ */
+ onvolumechange: (ev: Event) => any;
+ /**
+ * Occurs when playback stops because the next frame of a video resource is not available.
+ * @param ev The event.
+ */
+ onwaiting: (ev: Event) => any;
+ onwebkitfullscreenchange: (ev: Event) => any;
+ onwebkitfullscreenerror: (ev: Event) => any;
+ plugins: HTMLCollection;
+ pointerLockElement: Element;
+ /**
+ * Retrieves a value that indicates the current state of the object.
+ */
+ readyState: string;
+ /**
+ * Gets the URL of the location that referred the user to the current page.
+ */
+ referrer: string;
+ /**
+ * Gets the root svg element in the document hierarchy.
+ */
+ rootElement: SVGSVGElement;
+ /**
+ * Retrieves a collection of all script objects in the document.
+ */
+ scripts: HTMLCollection;
+ security: string;
+ /**
+ * Retrieves a collection of styleSheet objects representing the style sheets that correspond to each instance of a link or style object in the document.
+ */
+ styleSheets: StyleSheetList;
+ /**
+ * Contains the title of the document.
+ */
+ title: string;
+ visibilityState: string;
+ /**
+ * Sets or gets the color of the links that the user has visited.
+ */
+ vlinkColor: string;
+ webkitCurrentFullScreenElement: Element;
+ webkitFullscreenElement: Element;
+ webkitFullscreenEnabled: boolean;
+ webkitIsFullScreen: boolean;
+ xmlEncoding: string;
+ xmlStandalone: boolean;
+ /**
+ * Gets or sets the version attribute specified in the declaration of an XML document.
+ */
+ xmlVersion: string;
+ currentScript: HTMLScriptElement;
+ adoptNode(source: Node): Node;
+ captureEvents(): void;
+ clear(): void;
+ /**
+ * Closes an output stream and forces the sent data to display.
+ */
+ close(): void;
+ /**
+ * Creates an attribute object with a specified name.
+ * @param name String that sets the attribute object's name.
+ */
+ createAttribute(name: string): Attr;
+ createAttributeNS(namespaceURI: string, qualifiedName: string): Attr;
+ createCDATASection(data: string): CDATASection;
+ /**
+ * Creates a comment object with the specified data.
+ * @param data Sets the comment object's data.
+ */
+ createComment(data: string): Comment;
+ /**
+ * Creates a new document.
+ */
+ createDocumentFragment(): DocumentFragment;
+ /**
+ * Creates an instance of the element for the specified tag.
+ * @param tagName The name of an element.
+ */
+ createElement(tagName: "a"): HTMLAnchorElement;
+ createElement(tagName: "abbr"): HTMLPhraseElement;
+ createElement(tagName: "acronym"): HTMLPhraseElement;
+ createElement(tagName: "address"): HTMLBlockElement;
+ createElement(tagName: "applet"): HTMLAppletElement;
+ createElement(tagName: "area"): HTMLAreaElement;
+ createElement(tagName: "audio"): HTMLAudioElement;
+ createElement(tagName: "b"): HTMLPhraseElement;
+ createElement(tagName: "base"): HTMLBaseElement;
+ createElement(tagName: "basefont"): HTMLBaseFontElement;
+ createElement(tagName: "bdo"): HTMLPhraseElement;
+ createElement(tagName: "big"): HTMLPhraseElement;
+ createElement(tagName: "blockquote"): HTMLBlockElement;
+ createElement(tagName: "body"): HTMLBodyElement;
+ createElement(tagName: "br"): HTMLBRElement;
+ createElement(tagName: "button"): HTMLButtonElement;
+ createElement(tagName: "canvas"): HTMLCanvasElement;
+ createElement(tagName: "caption"): HTMLTableCaptionElement;
+ createElement(tagName: "center"): HTMLBlockElement;
+ createElement(tagName: "cite"): HTMLPhraseElement;
+ createElement(tagName: "code"): HTMLPhraseElement;
+ createElement(tagName: "col"): HTMLTableColElement;
+ createElement(tagName: "colgroup"): HTMLTableColElement;
+ createElement(tagName: "datalist"): HTMLDataListElement;
+ createElement(tagName: "dd"): HTMLDDElement;
+ createElement(tagName: "del"): HTMLModElement;
+ createElement(tagName: "dfn"): HTMLPhraseElement;
+ createElement(tagName: "dir"): HTMLDirectoryElement;
+ createElement(tagName: "div"): HTMLDivElement;
+ createElement(tagName: "dl"): HTMLDListElement;
+ createElement(tagName: "dt"): HTMLDTElement;
+ createElement(tagName: "em"): HTMLPhraseElement;
+ createElement(tagName: "embed"): HTMLEmbedElement;
+ createElement(tagName: "fieldset"): HTMLFieldSetElement;
+ createElement(tagName: "font"): HTMLFontElement;
+ createElement(tagName: "form"): HTMLFormElement;
+ createElement(tagName: "frame"): HTMLFrameElement;
+ createElement(tagName: "frameset"): HTMLFrameSetElement;
+ createElement(tagName: "h1"): HTMLHeadingElement;
+ createElement(tagName: "h2"): HTMLHeadingElement;
+ createElement(tagName: "h3"): HTMLHeadingElement;
+ createElement(tagName: "h4"): HTMLHeadingElement;
+ createElement(tagName: "h5"): HTMLHeadingElement;
+ createElement(tagName: "h6"): HTMLHeadingElement;
+ createElement(tagName: "head"): HTMLHeadElement;
+ createElement(tagName: "hr"): HTMLHRElement;
+ createElement(tagName: "html"): HTMLHtmlElement;
+ createElement(tagName: "i"): HTMLPhraseElement;
+ createElement(tagName: "iframe"): HTMLIFrameElement;
+ createElement(tagName: "img"): HTMLImageElement;
+ createElement(tagName: "input"): HTMLInputElement;
+ createElement(tagName: "ins"): HTMLModElement;
+ createElement(tagName: "isindex"): HTMLIsIndexElement;
+ createElement(tagName: "kbd"): HTMLPhraseElement;
+ createElement(tagName: "keygen"): HTMLBlockElement;
+ createElement(tagName: "label"): HTMLLabelElement;
+ createElement(tagName: "legend"): HTMLLegendElement;
+ createElement(tagName: "li"): HTMLLIElement;
+ createElement(tagName: "link"): HTMLLinkElement;
+ createElement(tagName: "listing"): HTMLBlockElement;
+ createElement(tagName: "map"): HTMLMapElement;
+ createElement(tagName: "marquee"): HTMLMarqueeElement;
+ createElement(tagName: "menu"): HTMLMenuElement;
+ createElement(tagName: "meta"): HTMLMetaElement;
+ createElement(tagName: "nextid"): HTMLNextIdElement;
+ createElement(tagName: "nobr"): HTMLPhraseElement;
+ createElement(tagName: "object"): HTMLObjectElement;
+ createElement(tagName: "ol"): HTMLOListElement;
+ createElement(tagName: "optgroup"): HTMLOptGroupElement;
+ createElement(tagName: "option"): HTMLOptionElement;
+ createElement(tagName: "p"): HTMLParagraphElement;
+ createElement(tagName: "param"): HTMLParamElement;
+ createElement(tagName: "plaintext"): HTMLBlockElement;
+ createElement(tagName: "pre"): HTMLPreElement;
+ createElement(tagName: "progress"): HTMLProgressElement;
+ createElement(tagName: "q"): HTMLQuoteElement;
+ createElement(tagName: "rt"): HTMLPhraseElement;
+ createElement(tagName: "ruby"): HTMLPhraseElement;
+ createElement(tagName: "s"): HTMLPhraseElement;
+ createElement(tagName: "samp"): HTMLPhraseElement;
+ createElement(tagName: "script"): HTMLScriptElement;
+ createElement(tagName: "select"): HTMLSelectElement;
+ createElement(tagName: "small"): HTMLPhraseElement;
+ createElement(tagName: "source"): HTMLSourceElement;
+ createElement(tagName: "span"): HTMLSpanElement;
+ createElement(tagName: "strike"): HTMLPhraseElement;
+ createElement(tagName: "strong"): HTMLPhraseElement;
+ createElement(tagName: "style"): HTMLStyleElement;
+ createElement(tagName: "sub"): HTMLPhraseElement;
+ createElement(tagName: "sup"): HTMLPhraseElement;
+ createElement(tagName: "table"): HTMLTableElement;
+ createElement(tagName: "tbody"): HTMLTableSectionElement;
+ createElement(tagName: "td"): HTMLTableDataCellElement;
+ createElement(tagName: "textarea"): HTMLTextAreaElement;
+ createElement(tagName: "tfoot"): HTMLTableSectionElement;
+ createElement(tagName: "th"): HTMLTableHeaderCellElement;
+ createElement(tagName: "thead"): HTMLTableSectionElement;
+ createElement(tagName: "title"): HTMLTitleElement;
+ createElement(tagName: "tr"): HTMLTableRowElement;
+ createElement(tagName: "track"): HTMLTrackElement;
+ createElement(tagName: "tt"): HTMLPhraseElement;
+ createElement(tagName: "u"): HTMLPhraseElement;
+ createElement(tagName: "ul"): HTMLUListElement;
+ createElement(tagName: "var"): HTMLPhraseElement;
+ createElement(tagName: "video"): HTMLVideoElement;
+ createElement(tagName: "x-ms-webview"): MSHTMLWebViewElement;
+ createElement(tagName: "xmp"): HTMLBlockElement;
+ createElement(tagName: string): HTMLElement;
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "a"): SVGAElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "circle"): SVGCircleElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "clipPath"): SVGClipPathElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "componentTransferFunction"): SVGComponentTransferFunctionElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "defs"): SVGDefsElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "desc"): SVGDescElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "ellipse"): SVGEllipseElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feBlend"): SVGFEBlendElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feColorMatrix"): SVGFEColorMatrixElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feComponentTransfer"): SVGFEComponentTransferElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feComposite"): SVGFECompositeElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feConvolveMatrix"): SVGFEConvolveMatrixElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feDiffuseLighting"): SVGFEDiffuseLightingElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feDisplacementMap"): SVGFEDisplacementMapElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feDistantLight"): SVGFEDistantLightElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feFlood"): SVGFEFloodElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feFuncA"): SVGFEFuncAElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feFuncB"): SVGFEFuncBElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feFuncG"): SVGFEFuncGElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feFuncR"): SVGFEFuncRElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feGaussianBlur"): SVGFEGaussianBlurElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feImage"): SVGFEImageElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feMerge"): SVGFEMergeElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feMergeNode"): SVGFEMergeNodeElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feMorphology"): SVGFEMorphologyElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feOffset"): SVGFEOffsetElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "fePointLight"): SVGFEPointLightElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feSpecularLighting"): SVGFESpecularLightingElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feSpotLight"): SVGFESpotLightElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feTile"): SVGFETileElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feTurbulence"): SVGFETurbulenceElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "filter"): SVGFilterElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "foreignObject"): SVGForeignObjectElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "g"): SVGGElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "image"): SVGImageElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "gradient"): SVGGradientElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "line"): SVGLineElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "linearGradient"): SVGLinearGradientElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "marker"): SVGMarkerElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "mask"): SVGMaskElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "path"): SVGPathElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "metadata"): SVGMetadataElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "pattern"): SVGPatternElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "polygon"): SVGPolygonElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "polyline"): SVGPolylineElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "radialGradient"): SVGRadialGradientElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "rect"): SVGRectElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "svg"): SVGSVGElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "script"): SVGScriptElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "stop"): SVGStopElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "style"): SVGStyleElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "switch"): SVGSwitchElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "symbol"): SVGSymbolElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "tspan"): SVGTSpanElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "textContent"): SVGTextContentElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "text"): SVGTextElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "textPath"): SVGTextPathElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "textPositioning"): SVGTextPositioningElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "title"): SVGTitleElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "use"): SVGUseElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "view"): SVGViewElement
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: string): SVGElement
+ createElementNS(namespaceURI: string, qualifiedName: string): Element;
+ createExpression(expression: string, resolver: XPathNSResolver): XPathExpression;
+ createNSResolver(nodeResolver: Node): XPathNSResolver;
+ /**
+ * Creates a NodeIterator object that you can use to traverse filtered lists of nodes or elements in a document.
+ * @param root The root element or node to start traversing on.
+ * @param whatToShow The type of nodes or elements to appear in the node list
+ * @param filter A custom NodeFilter function to use. For more information, see filter. Use null for no filter.
+ * @param entityReferenceExpansion A flag that specifies whether entity reference nodes are expanded.
+ */
+ createNodeIterator(root: Node, whatToShow?: number, filter?: NodeFilter, entityReferenceExpansion?: boolean): NodeIterator;
+ createProcessingInstruction(target: string, data: string): ProcessingInstruction;
+ /**
+ * Returns an empty range object that has both of its boundary points positioned at the beginning of the document.
+ */
+ createRange(): Range;
+ /**
+ * Creates a text string from the specified value.
+ * @param data String that specifies the nodeValue property of the text node.
+ */
+ createTextNode(data: string): Text;
+ createTouch(view: any, target: EventTarget, identifier: number, pageX: number, pageY: number, screenX: number, screenY: number): Touch;
+ createTouchList(...touches: Touch[]): TouchList;
+ /**
+ * Creates a TreeWalker object that you can use to traverse filtered lists of nodes or elements in a document.
+ * @param root The root element or node to start traversing on.
+ * @param whatToShow The type of nodes or elements to appear in the node list. For more information, see whatToShow.
+ * @param filter A custom NodeFilter function to use.
+ * @param entityReferenceExpansion A flag that specifies whether entity reference nodes are expanded.
+ */
+ createTreeWalker(root: Node, whatToShow?: number, filter?: NodeFilter, entityReferenceExpansion?: boolean): TreeWalker;
+ /**
+ * Returns the element for the specified x coordinate and the specified y coordinate.
+ * @param x The x-offset
+ * @param y The y-offset
+ */
+ elementFromPoint(x: number, y: number): Element;
+ evaluate(expression: string, contextNode: Node, resolver: XPathNSResolver, type: number, result: XPathResult): XPathResult;
+ /**
+ * Executes a command on the current document, current selection, or the given range.
+ * @param commandId String that specifies the command to execute. This command can be any of the command identifiers that can be executed in script.
+ * @param showUI Display the user interface, defaults to false.
+ * @param value Value to assign.
+ */
+ execCommand(commandId: string, showUI?: boolean, value?: any): boolean;
+ /**
+ * Displays help information for the given command identifier.
+ * @param commandId Displays help information for the given command identifier.
+ */
+ execCommandShowHelp(commandId: string): boolean;
+ exitFullscreen(): void;
+ exitPointerLock(): void;
+ /**
+ * Causes the element to receive the focus and executes the code specified by the onfocus event.
+ */
+ focus(): void;
+ /**
+ * Returns a reference to the first object with the specified value of the ID or NAME attribute.
+ * @param elementId String that specifies the ID value. Case-insensitive.
+ */
+ getElementById(elementId: string): HTMLElement;
+ getElementsByClassName(classNames: string): NodeListOf<Element>;
+ /**
+ * Gets a collection of objects based on the value of the NAME or ID attribute.
+ * @param elementName Gets a collection of objects based on the value of the NAME or ID attribute.
+ */
+ getElementsByName(elementName: string): NodeListOf<Element>;
+ /**
+ * Retrieves a collection of objects based on the specified element name.
+ * @param name Specifies the name of an element.
+ */
+ getElementsByTagName(tagname: "a"): NodeListOf<HTMLAnchorElement>;
+ getElementsByTagName(tagname: "abbr"): NodeListOf<HTMLPhraseElement>;
+ getElementsByTagName(tagname: "acronym"): NodeListOf<HTMLPhraseElement>;
+ getElementsByTagName(tagname: "address"): NodeListOf<HTMLBlockElement>;
+ getElementsByTagName(tagname: "applet"): NodeListOf<HTMLAppletElement>;
+ getElementsByTagName(tagname: "area"): NodeListOf<HTMLAreaElement>;
+ getElementsByTagName(tagname: "article"): NodeListOf<HTMLElement>;
+ getElementsByTagName(tagname: "aside"): NodeListOf<HTMLElement>;
+ getElementsByTagName(tagname: "audio"): NodeListOf<HTMLAudioElement>;
+ getElementsByTagName(tagname: "b"): NodeListOf<HTMLPhraseElement>;
+ getElementsByTagName(tagname: "base"): NodeListOf<HTMLBaseElement>;
+ getElementsByTagName(tagname: "basefont"): NodeListOf<HTMLBaseFontElement>;
+ getElementsByTagName(tagname: "bdo"): NodeListOf<HTMLPhraseElement>;
+ getElementsByTagName(tagname: "big"): NodeListOf<HTMLPhraseElement>;
+ getElementsByTagName(tagname: "blockquote"): NodeListOf<HTMLBlockElement>;
+ getElementsByTagName(tagname: "body"): NodeListOf<HTMLBodyElement>;
+ getElementsByTagName(tagname: "br"): NodeListOf<HTMLBRElement>;
+ getElementsByTagName(tagname: "button"): NodeListOf<HTMLButtonElement>;
+ getElementsByTagName(tagname: "canvas"): NodeListOf<HTMLCanvasElement>;
+ getElementsByTagName(tagname: "caption"): NodeListOf<HTMLTableCaptionElement>;
+ getElementsByTagName(tagname: "center"): NodeListOf<HTMLBlockElement>;
+ getElementsByTagName(tagname: "circle"): NodeListOf<SVGCircleElement>;
+ getElementsByTagName(tagname: "cite"): NodeListOf<HTMLPhraseElement>;
+ getElementsByTagName(tagname: "clippath"): NodeListOf<SVGClipPathElement>;
+ getElementsByTagName(tagname: "code"): NodeListOf<HTMLPhraseElement>;
+ getElementsByTagName(tagname: "col"): NodeListOf<HTMLTableColElement>;
+ getElementsByTagName(tagname: "colgroup"): NodeListOf<HTMLTableColElement>;
+ getElementsByTagName(tagname: "datalist"): NodeListOf<HTMLDataListElement>;
+ getElementsByTagName(tagname: "dd"): NodeListOf<HTMLDDElement>;
+ getElementsByTagName(tagname: "defs"): NodeListOf<SVGDefsElement>;
+ getElementsByTagName(tagname: "del"): NodeListOf<HTMLModElement>;
+ getElementsByTagName(tagname: "desc"): NodeListOf<SVGDescElement>;
+ getElementsByTagName(tagname: "dfn"): NodeListOf<HTMLPhraseElement>;
+ getElementsByTagName(tagname: "dir"): NodeListOf<HTMLDirectoryElement>;
+ getElementsByTagName(tagname: "div"): NodeListOf<HTMLDivElement>;
+ getElementsByTagName(tagname: "dl"): NodeListOf<HTMLDListElement>;
+ getElementsByTagName(tagname: "dt"): NodeListOf<HTMLDTElement>;
+ getElementsByTagName(tagname: "ellipse"): NodeListOf<SVGEllipseElement>;
+ getElementsByTagName(tagname: "em"): NodeListOf<HTMLPhraseElement>;
+ getElementsByTagName(tagname: "embed"): NodeListOf<HTMLEmbedElement>;
+ getElementsByTagName(tagname: "feblend"): NodeListOf<SVGFEBlendElement>;
+ getElementsByTagName(tagname: "fecolormatrix"): NodeListOf<SVGFEColorMatrixElement>;
+ getElementsByTagName(tagname: "fecomponenttransfer"): NodeListOf<SVGFEComponentTransferElement>;
+ getElementsByTagName(tagname: "fecomposite"): NodeListOf<SVGFECompositeElement>;
+ getElementsByTagName(tagname: "feconvolvematrix"): NodeListOf<SVGFEConvolveMatrixElement>;
+ getElementsByTagName(tagname: "fediffuselighting"): NodeListOf<SVGFEDiffuseLightingElement>;
+ getElementsByTagName(tagname: "fedisplacementmap"): NodeListOf<SVGFEDisplacementMapElement>;
+ getElementsByTagName(tagname: "fedistantlight"): NodeListOf<SVGFEDistantLightElement>;
+ getElementsByTagName(tagname: "feflood"): NodeListOf<SVGFEFloodElement>;
+ getElementsByTagName(tagname: "fefunca"): NodeListOf<SVGFEFuncAElement>;
+ getElementsByTagName(tagname: "fefuncb"): NodeListOf<SVGFEFuncBElement>;
+ getElementsByTagName(tagname: "fefuncg"): NodeListOf<SVGFEFuncGElement>;
+ getElementsByTagName(tagname: "fefuncr"): NodeListOf<SVGFEFuncRElement>;
+ getElementsByTagName(tagname: "fegaussianblur"): NodeListOf<SVGFEGaussianBlurElement>;
+ getElementsByTagName(tagname: "feimage"): NodeListOf<SVGFEImageElement>;
+ getElementsByTagName(tagname: "femerge"): NodeListOf<SVGFEMergeElement>;
+ getElementsByTagName(tagname: "femergenode"): NodeListOf<SVGFEMergeNodeElement>;
+ getElementsByTagName(tagname: "femorphology"): NodeListOf<SVGFEMorphologyElement>;
+ getElementsByTagName(tagname: "feoffset"): NodeListOf<SVGFEOffsetElement>;
+ getElementsByTagName(tagname: "fepointlight"): NodeListOf<SVGFEPointLightElement>;
+ getElementsByTagName(tagname: "fespecularlighting"): NodeListOf<SVGFESpecularLightingElement>;
+ getElementsByTagName(tagname: "fespotlight"): NodeListOf<SVGFESpotLightElement>;
+ getElementsByTagName(tagname: "fetile"): NodeListOf<SVGFETileElement>;
+ getElementsByTagName(tagname: "feturbulence"): NodeListOf<SVGFETurbulenceElement>;
+ getElementsByTagName(tagname: "fieldset"): NodeListOf<HTMLFieldSetElement>;
+ getElementsByTagName(tagname: "figcaption"): NodeListOf<HTMLElement>;
+ getElementsByTagName(tagname: "figure"): NodeListOf<HTMLElement>;
+ getElementsByTagName(tagname: "filter"): NodeListOf<SVGFilterElement>;
+ getElementsByTagName(tagname: "font"): NodeListOf<HTMLFontElement>;
+ getElementsByTagName(tagname: "footer"): NodeListOf<HTMLElement>;
+ getElementsByTagName(tagname: "foreignobject"): NodeListOf<SVGForeignObjectElement>;
+ getElementsByTagName(tagname: "form"): NodeListOf<HTMLFormElement>;
+ getElementsByTagName(tagname: "frame"): NodeListOf<HTMLFrameElement>;
+ getElementsByTagName(tagname: "frameset"): NodeListOf<HTMLFrameSetElement>;
+ getElementsByTagName(tagname: "g"): NodeListOf<SVGGElement>;
+ getElementsByTagName(tagname: "h1"): NodeListOf<HTMLHeadingElement>;
+ getElementsByTagName(tagname: "h2"): NodeListOf<HTMLHeadingElement>;
+ getElementsByTagName(tagname: "h3"): NodeListOf<HTMLHeadingElement>;
+ getElementsByTagName(tagname: "h4"): NodeListOf<HTMLHeadingElement>;
+ getElementsByTagName(tagname: "h5"): NodeListOf<HTMLHeadingElement>;
+ getElementsByTagName(tagname: "h6"): NodeListOf<HTMLHeadingElement>;
+ getElementsByTagName(tagname: "head"): NodeListOf<HTMLHeadElement>;
+ getElementsByTagName(tagname: "header"): NodeListOf<HTMLElement>;
+ getElementsByTagName(tagname: "hgroup"): NodeListOf<HTMLElement>;
+ getElementsByTagName(tagname: "hr"): NodeListOf<HTMLHRElement>;
+ getElementsByTagName(tagname: "html"): NodeListOf<HTMLHtmlElement>;
+ getElementsByTagName(tagname: "i"): NodeListOf<HTMLPhraseElement>;
+ getElementsByTagName(tagname: "iframe"): NodeListOf<HTMLIFrameElement>;
+ getElementsByTagName(tagname: "image"): NodeListOf<SVGImageElement>;
+ getElementsByTagName(tagname: "img"): NodeListOf<HTMLImageElement>;
+ getElementsByTagName(tagname: "input"): NodeListOf<HTMLInputElement>;
+ getElementsByTagName(tagname: "ins"): NodeListOf<HTMLModElement>;
+ getElementsByTagName(tagname: "isindex"): NodeListOf<HTMLIsIndexElement>;
+ getElementsByTagName(tagname: "kbd"): NodeListOf<HTMLPhraseElement>;
+ getElementsByTagName(tagname: "keygen"): NodeListOf<HTMLBlockElement>;
+ getElementsByTagName(tagname: "label"): NodeListOf<HTMLLabelElement>;
+ getElementsByTagName(tagname: "legend"): NodeListOf<HTMLLegendElement>;
+ getElementsByTagName(tagname: "li"): NodeListOf<HTMLLIElement>;
+ getElementsByTagName(tagname: "line"): NodeListOf<SVGLineElement>;
+ getElementsByTagName(tagname: "lineargradient"): NodeListOf<SVGLinearGradientElement>;
+ getElementsByTagName(tagname: "link"): NodeListOf<HTMLLinkElement>;
+ getElementsByTagName(tagname: "listing"): NodeListOf<HTMLBlockElement>;
+ getElementsByTagName(tagname: "map"): NodeListOf<HTMLMapElement>;
+ getElementsByTagName(tagname: "mark"): NodeListOf<HTMLElement>;
+ getElementsByTagName(tagname: "marker"): NodeListOf<SVGMarkerElement>;
+ getElementsByTagName(tagname: "marquee"): NodeListOf<HTMLMarqueeElement>;
+ getElementsByTagName(tagname: "mask"): NodeListOf<SVGMaskElement>;
+ getElementsByTagName(tagname: "menu"): NodeListOf<HTMLMenuElement>;
+ getElementsByTagName(tagname: "meta"): NodeListOf<HTMLMetaElement>;
+ getElementsByTagName(tagname: "metadata"): NodeListOf<SVGMetadataElement>;
+ getElementsByTagName(tagname: "nav"): NodeListOf<HTMLElement>;
+ getElementsByTagName(tagname: "nextid"): NodeListOf<HTMLNextIdElement>;
+ getElementsByTagName(tagname: "nobr"): NodeListOf<HTMLPhraseElement>;
+ getElementsByTagName(tagname: "noframes"): NodeListOf<HTMLElement>;
+ getElementsByTagName(tagname: "noscript"): NodeListOf<HTMLElement>;
+ getElementsByTagName(tagname: "object"): NodeListOf<HTMLObjectElement>;
+ getElementsByTagName(tagname: "ol"): NodeListOf<HTMLOListElement>;
+ getElementsByTagName(tagname: "optgroup"): NodeListOf<HTMLOptGroupElement>;
+ getElementsByTagName(tagname: "option"): NodeListOf<HTMLOptionElement>;
+ getElementsByTagName(tagname: "p"): NodeListOf<HTMLParagraphElement>;
+ getElementsByTagName(tagname: "param"): NodeListOf<HTMLParamElement>;
+ getElementsByTagName(tagname: "path"): NodeListOf<SVGPathElement>;
+ getElementsByTagName(tagname: "pattern"): NodeListOf<SVGPatternElement>;
+ getElementsByTagName(tagname: "plaintext"): NodeListOf<HTMLBlockElement>;
+ getElementsByTagName(tagname: "polygon"): NodeListOf<SVGPolygonElement>;
+ getElementsByTagName(tagname: "polyline"): NodeListOf<SVGPolylineElement>;
+ getElementsByTagName(tagname: "pre"): NodeListOf<HTMLPreElement>;
+ getElementsByTagName(tagname: "progress"): NodeListOf<HTMLProgressElement>;
+ getElementsByTagName(tagname: "q"): NodeListOf<HTMLQuoteElement>;
+ getElementsByTagName(tagname: "radialgradient"): NodeListOf<SVGRadialGradientElement>;
+ getElementsByTagName(tagname: "rect"): NodeListOf<SVGRectElement>;
+ getElementsByTagName(tagname: "rt"): NodeListOf<HTMLPhraseElement>;
+ getElementsByTagName(tagname: "ruby"): NodeListOf<HTMLPhraseElement>;
+ getElementsByTagName(tagname: "s"): NodeListOf<HTMLPhraseElement>;
+ getElementsByTagName(tagname: "samp"): NodeListOf<HTMLPhraseElement>;
+ getElementsByTagName(tagname: "script"): NodeListOf<HTMLScriptElement>;
+ getElementsByTagName(tagname: "section"): NodeListOf<HTMLElement>;
+ getElementsByTagName(tagname: "select"): NodeListOf<HTMLSelectElement>;
+ getElementsByTagName(tagname: "small"): NodeListOf<HTMLPhraseElement>;
+ getElementsByTagName(tagname: "source"): NodeListOf<HTMLSourceElement>;
+ getElementsByTagName(tagname: "span"): NodeListOf<HTMLSpanElement>;
+ getElementsByTagName(tagname: "stop"): NodeListOf<SVGStopElement>;
+ getElementsByTagName(tagname: "strike"): NodeListOf<HTMLPhraseElement>;
+ getElementsByTagName(tagname: "strong"): NodeListOf<HTMLPhraseElement>;
+ getElementsByTagName(tagname: "style"): NodeListOf<HTMLStyleElement>;
+ getElementsByTagName(tagname: "sub"): NodeListOf<HTMLPhraseElement>;
+ getElementsByTagName(tagname: "sup"): NodeListOf<HTMLPhraseElement>;
+ getElementsByTagName(tagname: "svg"): NodeListOf<SVGSVGElement>;
+ getElementsByTagName(tagname: "switch"): NodeListOf<SVGSwitchElement>;
+ getElementsByTagName(tagname: "symbol"): NodeListOf<SVGSymbolElement>;
+ getElementsByTagName(tagname: "table"): NodeListOf<HTMLTableElement>;
+ getElementsByTagName(tagname: "tbody"): NodeListOf<HTMLTableSectionElement>;
+ getElementsByTagName(tagname: "td"): NodeListOf<HTMLTableDataCellElement>;
+ getElementsByTagName(tagname: "text"): NodeListOf<SVGTextElement>;
+ getElementsByTagName(tagname: "textpath"): NodeListOf<SVGTextPathElement>;
+ getElementsByTagName(tagname: "textarea"): NodeListOf<HTMLTextAreaElement>;
+ getElementsByTagName(tagname: "tfoot"): NodeListOf<HTMLTableSectionElement>;
+ getElementsByTagName(tagname: "th"): NodeListOf<HTMLTableHeaderCellElement>;
+ getElementsByTagName(tagname: "thead"): NodeListOf<HTMLTableSectionElement>;
+ getElementsByTagName(tagname: "title"): NodeListOf<HTMLTitleElement>;
+ getElementsByTagName(tagname: "tr"): NodeListOf<HTMLTableRowElement>;
+ getElementsByTagName(tagname: "track"): NodeListOf<HTMLTrackElement>;
+ getElementsByTagName(tagname: "tspan"): NodeListOf<SVGTSpanElement>;
+ getElementsByTagName(tagname: "tt"): NodeListOf<HTMLPhraseElement>;
+ getElementsByTagName(tagname: "u"): NodeListOf<HTMLPhraseElement>;
+ getElementsByTagName(tagname: "ul"): NodeListOf<HTMLUListElement>;
+ getElementsByTagName(tagname: "use"): NodeListOf<SVGUseElement>;
+ getElementsByTagName(tagname: "var"): NodeListOf<HTMLPhraseElement>;
+ getElementsByTagName(tagname: "video"): NodeListOf<HTMLVideoElement>;
+ getElementsByTagName(tagname: "view"): NodeListOf<SVGViewElement>;
+ getElementsByTagName(tagname: "wbr"): NodeListOf<HTMLElement>;
+ getElementsByTagName(tagname: "x-ms-webview"): NodeListOf<MSHTMLWebViewElement>;
+ getElementsByTagName(tagname: "xmp"): NodeListOf<HTMLBlockElement>;
+ getElementsByTagName(tagname: string): NodeListOf<Element>;
+ getElementsByTagNameNS(namespaceURI: string, localName: string): NodeListOf<Element>;
+ /**
+ * Returns an object representing the current selection of the document that is loaded into the object displaying a webpage.
+ */
+ getSelection(): Selection;
+ /**
+ * Gets a value indicating whether the object currently has focus.
+ */
+ hasFocus(): boolean;
+ importNode(importedNode: Node, deep: boolean): Node;
+ msElementsFromPoint(x: number, y: number): NodeList;
+ msElementsFromRect(left: number, top: number, width: number, height: number): NodeList;
+ /**
+ * Opens a new window and loads a document specified by a given URL. Also, opens a new window that uses the url parameter and the name parameter to collect the output of the write method and the writeln method.
+ * @param url Specifies a MIME type for the document.
+ * @param name Specifies the name of the window. This name is used as the value for the TARGET attribute on a form or an anchor element.
+ * @param features Contains a list of items separated by commas. Each item consists of an option and a value, separated by an equals sign (for example, "fullscreen=yes, toolbar=yes"). The following values are supported.
+ * @param replace Specifies whether the existing entry for the document is replaced in the history list.
+ */
+ open(url?: string, name?: string, features?: string, replace?: boolean): Document;
+ /**
+ * Returns a Boolean value that indicates whether a specified command can be successfully executed using execCommand, given the current state of the document.
+ * @param commandId Specifies a command identifier.
+ */
+ queryCommandEnabled(commandId: string): boolean;
+ /**
+ * Returns a Boolean value that indicates whether the specified command is in the indeterminate state.
+ * @param commandId String that specifies a command identifier.
+ */
+ queryCommandIndeterm(commandId: string): boolean;
+ /**
+ * Returns a Boolean value that indicates the current state of the command.
+ * @param commandId String that specifies a command identifier.
+ */
+ queryCommandState(commandId: string): boolean;
+ /**
+ * Returns a Boolean value that indicates whether the current command is supported on the current range.
+ * @param commandId Specifies a command identifier.
+ */
+ queryCommandSupported(commandId: string): boolean;
+ /**
+ * Retrieves the string associated with a command.
+ * @param commandId String that contains the identifier of a command. This can be any command identifier given in the list of Command Identifiers.
+ */
+ queryCommandText(commandId: string): string;
+ /**
+ * Returns the current value of the document, range, or current selection for the given command.
+ * @param commandId String that specifies a command identifier.
+ */
+ queryCommandValue(commandId: string): string;
+ releaseEvents(): void;
+ /**
+ * Allows updating the print settings for the page.
+ */
+ updateSettings(): void;
+ webkitCancelFullScreen(): void;
+ webkitExitFullscreen(): void;
+ /**
+ * Writes one or more HTML expressions to a document in the specified window.
+ * @param content Specifies the text and HTML tags to write.
+ */
+ write(...content: string[]): void;
+ /**
+ * Writes one or more HTML expressions, followed by a carriage return, to a document in the specified window.
+ * @param content The text and HTML tags to write.
+ */
+ writeln(...content: string[]): void;
+ addEventListener(type: "MSContentZoom", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureChange", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureDoubleTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureEnd", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureHold", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSInertiaStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSManipulationStateChanged", listener: (ev: MSManipulationEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerCancel", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerDown", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerEnter", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerLeave", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerMove", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerOut", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerOver", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerUp", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "abort", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "activate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "beforeactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "beforedeactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "blur", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "canplay", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "canplaythrough", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "change", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "click", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "contextmenu", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dblclick", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "deactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "drag", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dragend", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dragenter", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dragleave", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dragover", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dragstart", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "drop", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "durationchange", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "emptied", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "ended", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "focus", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "fullscreenchange", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "fullscreenerror", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "input", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "keydown", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "keypress", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "keyup", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "loadeddata", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "loadedmetadata", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "loadstart", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "mousedown", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mousemove", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseout", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseover", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseup", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mousewheel", listener: (ev: MouseWheelEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mssitemodejumplistitemremoved", listener: (ev: MSSiteModeEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "msthumbnailclick", listener: (ev: MSSiteModeEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pause", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "play", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "playing", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointercancel", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerdown", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerenter", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerleave", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerlockchange", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerlockerror", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointermove", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerout", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerover", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerup", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "progress", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "ratechange", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "readystatechange", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "reset", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "scroll", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "seeked", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "seeking", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "select", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "selectstart", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "stalled", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "stop", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "submit", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "suspend", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "timeupdate", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "touchcancel", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "touchend", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "touchmove", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "touchstart", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "volumechange", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "waiting", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "webkitfullscreenchange", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "webkitfullscreenerror", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "wheel", listener: (ev: WheelEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var Document: {
+ prototype: Document;
+ new(): Document;
+}
+
+interface DocumentFragment extends Node, NodeSelector {
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var DocumentFragment: {
+ prototype: DocumentFragment;
+ new(): DocumentFragment;
+}
+
+interface DocumentType extends Node, ChildNode {
+ entities: NamedNodeMap;
+ internalSubset: string;
+ name: string;
+ notations: NamedNodeMap;
+ publicId: string;
+ systemId: string;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var DocumentType: {
+ prototype: DocumentType;
+ new(): DocumentType;
+}
+
+interface DragEvent extends MouseEvent {
+ dataTransfer: DataTransfer;
+ initDragEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, ctrlKeyArg: boolean, altKeyArg: boolean, shiftKeyArg: boolean, metaKeyArg: boolean, buttonArg: number, relatedTargetArg: EventTarget, dataTransferArg: DataTransfer): void;
+ msConvertURL(file: File, targetType: string, targetURL?: string): void;
+}
+
+declare var DragEvent: {
+ prototype: DragEvent;
+ new(): DragEvent;
+}
+
+interface DynamicsCompressorNode extends AudioNode {
+ attack: AudioParam;
+ knee: AudioParam;
+ ratio: AudioParam;
+ reduction: AudioParam;
+ release: AudioParam;
+ threshold: AudioParam;
+}
+
+declare var DynamicsCompressorNode: {
+ prototype: DynamicsCompressorNode;
+ new(): DynamicsCompressorNode;
+}
+
+interface EXT_texture_filter_anisotropic {
+ MAX_TEXTURE_MAX_ANISOTROPY_EXT: number;
+ TEXTURE_MAX_ANISOTROPY_EXT: number;
+}
+
+declare var EXT_texture_filter_anisotropic: {
+ prototype: EXT_texture_filter_anisotropic;
+ new(): EXT_texture_filter_anisotropic;
+ MAX_TEXTURE_MAX_ANISOTROPY_EXT: number;
+ TEXTURE_MAX_ANISOTROPY_EXT: number;
+}
+
+interface Element extends Node, GlobalEventHandlers, ElementTraversal, NodeSelector, ChildNode {
+ classList: DOMTokenList;
+ clientHeight: number;
+ clientLeft: number;
+ clientTop: number;
+ clientWidth: number;
+ msContentZoomFactor: number;
+ msRegionOverflow: string;
+ onariarequest: (ev: AriaRequestEvent) => any;
+ oncommand: (ev: CommandEvent) => any;
+ ongotpointercapture: (ev: PointerEvent) => any;
+ onlostpointercapture: (ev: PointerEvent) => any;
+ onmsgesturechange: (ev: MSGestureEvent) => any;
+ onmsgesturedoubletap: (ev: MSGestureEvent) => any;
+ onmsgestureend: (ev: MSGestureEvent) => any;
+ onmsgesturehold: (ev: MSGestureEvent) => any;
+ onmsgesturestart: (ev: MSGestureEvent) => any;
+ onmsgesturetap: (ev: MSGestureEvent) => any;
+ onmsgotpointercapture: (ev: MSPointerEvent) => any;
+ onmsinertiastart: (ev: MSGestureEvent) => any;
+ onmslostpointercapture: (ev: MSPointerEvent) => any;
+ onmspointercancel: (ev: MSPointerEvent) => any;
+ onmspointerdown: (ev: MSPointerEvent) => any;
+ onmspointerenter: (ev: MSPointerEvent) => any;
+ onmspointerleave: (ev: MSPointerEvent) => any;
+ onmspointermove: (ev: MSPointerEvent) => any;
+ onmspointerout: (ev: MSPointerEvent) => any;
+ onmspointerover: (ev: MSPointerEvent) => any;
+ onmspointerup: (ev: MSPointerEvent) => any;
+ ontouchcancel: (ev: TouchEvent) => any;
+ ontouchend: (ev: TouchEvent) => any;
+ ontouchmove: (ev: TouchEvent) => any;
+ ontouchstart: (ev: TouchEvent) => any;
+ onwebkitfullscreenchange: (ev: Event) => any;
+ onwebkitfullscreenerror: (ev: Event) => any;
+ scrollHeight: number;
+ scrollLeft: number;
+ scrollTop: number;
+ scrollWidth: number;
+ tagName: string;
+ id: string;
+ className: string;
+ innerHTML: string;
+ getAttribute(name?: string): string;
+ getAttributeNS(namespaceURI: string, localName: string): string;
+ getAttributeNode(name: string): Attr;
+ getAttributeNodeNS(namespaceURI: string, localName: string): Attr;
+ getBoundingClientRect(): ClientRect;
+ getClientRects(): ClientRectList;
+ getElementsByTagName(name: "a"): NodeListOf<HTMLAnchorElement>;
+ getElementsByTagName(name: "abbr"): NodeListOf<HTMLPhraseElement>;
+ getElementsByTagName(name: "acronym"): NodeListOf<HTMLPhraseElement>;
+ getElementsByTagName(name: "address"): NodeListOf<HTMLBlockElement>;
+ getElementsByTagName(name: "applet"): NodeListOf<HTMLAppletElement>;
+ getElementsByTagName(name: "area"): NodeListOf<HTMLAreaElement>;
+ getElementsByTagName(name: "article"): NodeListOf<HTMLElement>;
+ getElementsByTagName(name: "aside"): NodeListOf<HTMLElement>;
+ getElementsByTagName(name: "audio"): NodeListOf<HTMLAudioElement>;
+ getElementsByTagName(name: "b"): NodeListOf<HTMLPhraseElement>;
+ getElementsByTagName(name: "base"): NodeListOf<HTMLBaseElement>;
+ getElementsByTagName(name: "basefont"): NodeListOf<HTMLBaseFontElement>;
+ getElementsByTagName(name: "bdo"): NodeListOf<HTMLPhraseElement>;
+ getElementsByTagName(name: "big"): NodeListOf<HTMLPhraseElement>;
+ getElementsByTagName(name: "blockquote"): NodeListOf<HTMLBlockElement>;
+ getElementsByTagName(name: "body"): NodeListOf<HTMLBodyElement>;
+ getElementsByTagName(name: "br"): NodeListOf<HTMLBRElement>;
+ getElementsByTagName(name: "button"): NodeListOf<HTMLButtonElement>;
+ getElementsByTagName(name: "canvas"): NodeListOf<HTMLCanvasElement>;
+ getElementsByTagName(name: "caption"): NodeListOf<HTMLTableCaptionElement>;
+ getElementsByTagName(name: "center"): NodeListOf<HTMLBlockElement>;
+ getElementsByTagName(name: "circle"): NodeListOf<SVGCircleElement>;
+ getElementsByTagName(name: "cite"): NodeListOf<HTMLPhraseElement>;
+ getElementsByTagName(name: "clippath"): NodeListOf<SVGClipPathElement>;
+ getElementsByTagName(name: "code"): NodeListOf<HTMLPhraseElement>;
+ getElementsByTagName(name: "col"): NodeListOf<HTMLTableColElement>;
+ getElementsByTagName(name: "colgroup"): NodeListOf<HTMLTableColElement>;
+ getElementsByTagName(name: "datalist"): NodeListOf<HTMLDataListElement>;
+ getElementsByTagName(name: "dd"): NodeListOf<HTMLDDElement>;
+ getElementsByTagName(name: "defs"): NodeListOf<SVGDefsElement>;
+ getElementsByTagName(name: "del"): NodeListOf<HTMLModElement>;
+ getElementsByTagName(name: "desc"): NodeListOf<SVGDescElement>;
+ getElementsByTagName(name: "dfn"): NodeListOf<HTMLPhraseElement>;
+ getElementsByTagName(name: "dir"): NodeListOf<HTMLDirectoryElement>;
+ getElementsByTagName(name: "div"): NodeListOf<HTMLDivElement>;
+ getElementsByTagName(name: "dl"): NodeListOf<HTMLDListElement>;
+ getElementsByTagName(name: "dt"): NodeListOf<HTMLDTElement>;
+ getElementsByTagName(name: "ellipse"): NodeListOf<SVGEllipseElement>;
+ getElementsByTagName(name: "em"): NodeListOf<HTMLPhraseElement>;
+ getElementsByTagName(name: "embed"): NodeListOf<HTMLEmbedElement>;
+ getElementsByTagName(name: "feblend"): NodeListOf<SVGFEBlendElement>;
+ getElementsByTagName(name: "fecolormatrix"): NodeListOf<SVGFEColorMatrixElement>;
+ getElementsByTagName(name: "fecomponenttransfer"): NodeListOf<SVGFEComponentTransferElement>;
+ getElementsByTagName(name: "fecomposite"): NodeListOf<SVGFECompositeElement>;
+ getElementsByTagName(name: "feconvolvematrix"): NodeListOf<SVGFEConvolveMatrixElement>;
+ getElementsByTagName(name: "fediffuselighting"): NodeListOf<SVGFEDiffuseLightingElement>;
+ getElementsByTagName(name: "fedisplacementmap"): NodeListOf<SVGFEDisplacementMapElement>;
+ getElementsByTagName(name: "fedistantlight"): NodeListOf<SVGFEDistantLightElement>;
+ getElementsByTagName(name: "feflood"): NodeListOf<SVGFEFloodElement>;
+ getElementsByTagName(name: "fefunca"): NodeListOf<SVGFEFuncAElement>;
+ getElementsByTagName(name: "fefuncb"): NodeListOf<SVGFEFuncBElement>;
+ getElementsByTagName(name: "fefuncg"): NodeListOf<SVGFEFuncGElement>;
+ getElementsByTagName(name: "fefuncr"): NodeListOf<SVGFEFuncRElement>;
+ getElementsByTagName(name: "fegaussianblur"): NodeListOf<SVGFEGaussianBlurElement>;
+ getElementsByTagName(name: "feimage"): NodeListOf<SVGFEImageElement>;
+ getElementsByTagName(name: "femerge"): NodeListOf<SVGFEMergeElement>;
+ getElementsByTagName(name: "femergenode"): NodeListOf<SVGFEMergeNodeElement>;
+ getElementsByTagName(name: "femorphology"): NodeListOf<SVGFEMorphologyElement>;
+ getElementsByTagName(name: "feoffset"): NodeListOf<SVGFEOffsetElement>;
+ getElementsByTagName(name: "fepointlight"): NodeListOf<SVGFEPointLightElement>;
+ getElementsByTagName(name: "fespecularlighting"): NodeListOf<SVGFESpecularLightingElement>;
+ getElementsByTagName(name: "fespotlight"): NodeListOf<SVGFESpotLightElement>;
+ getElementsByTagName(name: "fetile"): NodeListOf<SVGFETileElement>;
+ getElementsByTagName(name: "feturbulence"): NodeListOf<SVGFETurbulenceElement>;
+ getElementsByTagName(name: "fieldset"): NodeListOf<HTMLFieldSetElement>;
+ getElementsByTagName(name: "figcaption"): NodeListOf<HTMLElement>;
+ getElementsByTagName(name: "figure"): NodeListOf<HTMLElement>;
+ getElementsByTagName(name: "filter"): NodeListOf<SVGFilterElement>;
+ getElementsByTagName(name: "font"): NodeListOf<HTMLFontElement>;
+ getElementsByTagName(name: "footer"): NodeListOf<HTMLElement>;
+ getElementsByTagName(name: "foreignobject"): NodeListOf<SVGForeignObjectElement>;
+ getElementsByTagName(name: "form"): NodeListOf<HTMLFormElement>;
+ getElementsByTagName(name: "frame"): NodeListOf<HTMLFrameElement>;
+ getElementsByTagName(name: "frameset"): NodeListOf<HTMLFrameSetElement>;
+ getElementsByTagName(name: "g"): NodeListOf<SVGGElement>;
+ getElementsByTagName(name: "h1"): NodeListOf<HTMLHeadingElement>;
+ getElementsByTagName(name: "h2"): NodeListOf<HTMLHeadingElement>;
+ getElementsByTagName(name: "h3"): NodeListOf<HTMLHeadingElement>;
+ getElementsByTagName(name: "h4"): NodeListOf<HTMLHeadingElement>;
+ getElementsByTagName(name: "h5"): NodeListOf<HTMLHeadingElement>;
+ getElementsByTagName(name: "h6"): NodeListOf<HTMLHeadingElement>;
+ getElementsByTagName(name: "head"): NodeListOf<HTMLHeadElement>;
+ getElementsByTagName(name: "header"): NodeListOf<HTMLElement>;
+ getElementsByTagName(name: "hgroup"): NodeListOf<HTMLElement>;
+ getElementsByTagName(name: "hr"): NodeListOf<HTMLHRElement>;
+ getElementsByTagName(name: "html"): NodeListOf<HTMLHtmlElement>;
+ getElementsByTagName(name: "i"): NodeListOf<HTMLPhraseElement>;
+ getElementsByTagName(name: "iframe"): NodeListOf<HTMLIFrameElement>;
+ getElementsByTagName(name: "image"): NodeListOf<SVGImageElement>;
+ getElementsByTagName(name: "img"): NodeListOf<HTMLImageElement>;
+ getElementsByTagName(name: "input"): NodeListOf<HTMLInputElement>;
+ getElementsByTagName(name: "ins"): NodeListOf<HTMLModElement>;
+ getElementsByTagName(name: "isindex"): NodeListOf<HTMLIsIndexElement>;
+ getElementsByTagName(name: "kbd"): NodeListOf<HTMLPhraseElement>;
+ getElementsByTagName(name: "keygen"): NodeListOf<HTMLBlockElement>;
+ getElementsByTagName(name: "label"): NodeListOf<HTMLLabelElement>;
+ getElementsByTagName(name: "legend"): NodeListOf<HTMLLegendElement>;
+ getElementsByTagName(name: "li"): NodeListOf<HTMLLIElement>;
+ getElementsByTagName(name: "line"): NodeListOf<SVGLineElement>;
+ getElementsByTagName(name: "lineargradient"): NodeListOf<SVGLinearGradientElement>;
+ getElementsByTagName(name: "link"): NodeListOf<HTMLLinkElement>;
+ getElementsByTagName(name: "listing"): NodeListOf<HTMLBlockElement>;
+ getElementsByTagName(name: "map"): NodeListOf<HTMLMapElement>;
+ getElementsByTagName(name: "mark"): NodeListOf<HTMLElement>;
+ getElementsByTagName(name: "marker"): NodeListOf<SVGMarkerElement>;
+ getElementsByTagName(name: "marquee"): NodeListOf<HTMLMarqueeElement>;
+ getElementsByTagName(name: "mask"): NodeListOf<SVGMaskElement>;
+ getElementsByTagName(name: "menu"): NodeListOf<HTMLMenuElement>;
+ getElementsByTagName(name: "meta"): NodeListOf<HTMLMetaElement>;
+ getElementsByTagName(name: "metadata"): NodeListOf<SVGMetadataElement>;
+ getElementsByTagName(name: "nav"): NodeListOf<HTMLElement>;
+ getElementsByTagName(name: "nextid"): NodeListOf<HTMLNextIdElement>;
+ getElementsByTagName(name: "nobr"): NodeListOf<HTMLPhraseElement>;
+ getElementsByTagName(name: "noframes"): NodeListOf<HTMLElement>;
+ getElementsByTagName(name: "noscript"): NodeListOf<HTMLElement>;
+ getElementsByTagName(name: "object"): NodeListOf<HTMLObjectElement>;
+ getElementsByTagName(name: "ol"): NodeListOf<HTMLOListElement>;
+ getElementsByTagName(name: "optgroup"): NodeListOf<HTMLOptGroupElement>;
+ getElementsByTagName(name: "option"): NodeListOf<HTMLOptionElement>;
+ getElementsByTagName(name: "p"): NodeListOf<HTMLParagraphElement>;
+ getElementsByTagName(name: "param"): NodeListOf<HTMLParamElement>;
+ getElementsByTagName(name: "path"): NodeListOf<SVGPathElement>;
+ getElementsByTagName(name: "pattern"): NodeListOf<SVGPatternElement>;
+ getElementsByTagName(name: "plaintext"): NodeListOf<HTMLBlockElement>;
+ getElementsByTagName(name: "polygon"): NodeListOf<SVGPolygonElement>;
+ getElementsByTagName(name: "polyline"): NodeListOf<SVGPolylineElement>;
+ getElementsByTagName(name: "pre"): NodeListOf<HTMLPreElement>;
+ getElementsByTagName(name: "progress"): NodeListOf<HTMLProgressElement>;
+ getElementsByTagName(name: "q"): NodeListOf<HTMLQuoteElement>;
+ getElementsByTagName(name: "radialgradient"): NodeListOf<SVGRadialGradientElement>;
+ getElementsByTagName(name: "rect"): NodeListOf<SVGRectElement>;
+ getElementsByTagName(name: "rt"): NodeListOf<HTMLPhraseElement>;
+ getElementsByTagName(name: "ruby"): NodeListOf<HTMLPhraseElement>;
+ getElementsByTagName(name: "s"): NodeListOf<HTMLPhraseElement>;
+ getElementsByTagName(name: "samp"): NodeListOf<HTMLPhraseElement>;
+ getElementsByTagName(name: "script"): NodeListOf<HTMLScriptElement>;
+ getElementsByTagName(name: "section"): NodeListOf<HTMLElement>;
+ getElementsByTagName(name: "select"): NodeListOf<HTMLSelectElement>;
+ getElementsByTagName(name: "small"): NodeListOf<HTMLPhraseElement>;
+ getElementsByTagName(name: "source"): NodeListOf<HTMLSourceElement>;
+ getElementsByTagName(name: "span"): NodeListOf<HTMLSpanElement>;
+ getElementsByTagName(name: "stop"): NodeListOf<SVGStopElement>;
+ getElementsByTagName(name: "strike"): NodeListOf<HTMLPhraseElement>;
+ getElementsByTagName(name: "strong"): NodeListOf<HTMLPhraseElement>;
+ getElementsByTagName(name: "style"): NodeListOf<HTMLStyleElement>;
+ getElementsByTagName(name: "sub"): NodeListOf<HTMLPhraseElement>;
+ getElementsByTagName(name: "sup"): NodeListOf<HTMLPhraseElement>;
+ getElementsByTagName(name: "svg"): NodeListOf<SVGSVGElement>;
+ getElementsByTagName(name: "switch"): NodeListOf<SVGSwitchElement>;
+ getElementsByTagName(name: "symbol"): NodeListOf<SVGSymbolElement>;
+ getElementsByTagName(name: "table"): NodeListOf<HTMLTableElement>;
+ getElementsByTagName(name: "tbody"): NodeListOf<HTMLTableSectionElement>;
+ getElementsByTagName(name: "td"): NodeListOf<HTMLTableDataCellElement>;
+ getElementsByTagName(name: "text"): NodeListOf<SVGTextElement>;
+ getElementsByTagName(name: "textpath"): NodeListOf<SVGTextPathElement>;
+ getElementsByTagName(name: "textarea"): NodeListOf<HTMLTextAreaElement>;
+ getElementsByTagName(name: "tfoot"): NodeListOf<HTMLTableSectionElement>;
+ getElementsByTagName(name: "th"): NodeListOf<HTMLTableHeaderCellElement>;
+ getElementsByTagName(name: "thead"): NodeListOf<HTMLTableSectionElement>;
+ getElementsByTagName(name: "title"): NodeListOf<HTMLTitleElement>;
+ getElementsByTagName(name: "tr"): NodeListOf<HTMLTableRowElement>;
+ getElementsByTagName(name: "track"): NodeListOf<HTMLTrackElement>;
+ getElementsByTagName(name: "tspan"): NodeListOf<SVGTSpanElement>;
+ getElementsByTagName(name: "tt"): NodeListOf<HTMLPhraseElement>;
+ getElementsByTagName(name: "u"): NodeListOf<HTMLPhraseElement>;
+ getElementsByTagName(name: "ul"): NodeListOf<HTMLUListElement>;
+ getElementsByTagName(name: "use"): NodeListOf<SVGUseElement>;
+ getElementsByTagName(name: "var"): NodeListOf<HTMLPhraseElement>;
+ getElementsByTagName(name: "video"): NodeListOf<HTMLVideoElement>;
+ getElementsByTagName(name: "view"): NodeListOf<SVGViewElement>;
+ getElementsByTagName(name: "wbr"): NodeListOf<HTMLElement>;
+ getElementsByTagName(name: "x-ms-webview"): NodeListOf<MSHTMLWebViewElement>;
+ getElementsByTagName(name: "xmp"): NodeListOf<HTMLBlockElement>;
+ getElementsByTagName(name: string): NodeListOf<Element>;
+ getElementsByTagNameNS(namespaceURI: string, localName: string): NodeListOf<Element>;
+ hasAttribute(name: string): boolean;
+ hasAttributeNS(namespaceURI: string, localName: string): boolean;
+ msGetRegionContent(): MSRangeCollection;
+ msGetUntransformedBounds(): ClientRect;
+ msMatchesSelector(selectors: string): boolean;
+ msReleasePointerCapture(pointerId: number): void;
+ msSetPointerCapture(pointerId: number): void;
+ msZoomTo(args: MsZoomToOptions): void;
+ releasePointerCapture(pointerId: number): void;
+ removeAttribute(name?: string): void;
+ removeAttributeNS(namespaceURI: string, localName: string): void;
+ removeAttributeNode(oldAttr: Attr): Attr;
+ requestFullscreen(): void;
+ requestPointerLock(): void;
+ setAttribute(name: string, value: string): void;
+ setAttributeNS(namespaceURI: string, qualifiedName: string, value: string): void;
+ setAttributeNode(newAttr: Attr): Attr;
+ setAttributeNodeNS(newAttr: Attr): Attr;
+ setPointerCapture(pointerId: number): void;
+ webkitMatchesSelector(selectors: string): boolean;
+ webkitRequestFullScreen(): void;
+ webkitRequestFullscreen(): void;
+ getElementsByClassName(classNames: string): NodeListOf<Element>;
+ matches(selector: string): boolean;
+ addEventListener(type: "MSGestureChange", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureDoubleTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureEnd", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureHold", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGotPointerCapture", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSInertiaStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSLostPointerCapture", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerCancel", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerDown", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerEnter", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerLeave", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerMove", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerOut", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerOver", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerUp", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "ariarequest", listener: (ev: AriaRequestEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "command", listener: (ev: CommandEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "gotpointercapture", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "lostpointercapture", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointercancel", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerdown", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerenter", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerleave", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointermove", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerout", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerover", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerup", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "touchcancel", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "touchend", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "touchmove", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "touchstart", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "webkitfullscreenchange", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "webkitfullscreenerror", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "wheel", listener: (ev: WheelEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var Element: {
+ prototype: Element;
+ new(): Element;
+}
+
+interface ErrorEvent extends Event {
+ colno: number;
+ error: any;
+ filename: string;
+ lineno: number;
+ message: string;
+ initErrorEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, messageArg: string, filenameArg: string, linenoArg: number): void;
+}
+
+declare var ErrorEvent: {
+ prototype: ErrorEvent;
+ new(): ErrorEvent;
+}
+
+interface Event {
+ bubbles: boolean;
+ cancelBubble: boolean;
+ cancelable: boolean;
+ currentTarget: EventTarget;
+ defaultPrevented: boolean;
+ eventPhase: number;
+ isTrusted: boolean;
+ returnValue: boolean;
+ srcElement: Element;
+ target: EventTarget;
+ timeStamp: number;
+ type: string;
+ initEvent(eventTypeArg: string, canBubbleArg: boolean, cancelableArg: boolean): void;
+ preventDefault(): void;
+ stopImmediatePropagation(): void;
+ stopPropagation(): void;
+ AT_TARGET: number;
+ BUBBLING_PHASE: number;
+ CAPTURING_PHASE: number;
+}
+
+declare var Event: {
+ prototype: Event;
+ new(type: string, eventInitDict?: EventInit): Event;
+ AT_TARGET: number;
+ BUBBLING_PHASE: number;
+ CAPTURING_PHASE: number;
+}
+
+interface EventTarget {
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+ dispatchEvent(evt: Event): boolean;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var EventTarget: {
+ prototype: EventTarget;
+ new(): EventTarget;
+}
+
+interface External {
+}
+
+declare var External: {
+ prototype: External;
+ new(): External;
+}
+
+interface File extends Blob {
+ lastModifiedDate: any;
+ name: string;
+}
+
+declare var File: {
+ prototype: File;
+ new (parts: (ArrayBuffer | ArrayBufferView | Blob | string)[], filename: string, properties?: FilePropertyBag): File;
+}
+
+interface FileList {
+ length: number;
+ item(index: number): File;
+ [index: number]: File;
+}
+
+declare var FileList: {
+ prototype: FileList;
+ new(): FileList;
+}
+
+interface FileReader extends EventTarget, MSBaseReader {
+ error: DOMError;
+ readAsArrayBuffer(blob: Blob): void;
+ readAsBinaryString(blob: Blob): void;
+ readAsDataURL(blob: Blob): void;
+ readAsText(blob: Blob, encoding?: string): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var FileReader: {
+ prototype: FileReader;
+ new(): FileReader;
+}
+
+interface FocusEvent extends UIEvent {
+ relatedTarget: EventTarget;
+ initFocusEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, relatedTargetArg: EventTarget): void;
+}
+
+declare var FocusEvent: {
+ prototype: FocusEvent;
+ new(typeArg: string, eventInitDict?: FocusEventInit): FocusEvent;
+}
+
+interface FormData {
+ append(name: any, value: any, blobName?: string): void;
+}
+
+declare var FormData: {
+ prototype: FormData;
+ new (form?: HTMLFormElement): FormData;
+}
+
+interface GainNode extends AudioNode {
+ gain: AudioParam;
+}
+
+declare var GainNode: {
+ prototype: GainNode;
+ new(): GainNode;
+}
+
+interface Gamepad {
+ axes: number[];
+ buttons: GamepadButton[];
+ connected: boolean;
+ id: string;
+ index: number;
+ mapping: string;
+ timestamp: number;
+}
+
+declare var Gamepad: {
+ prototype: Gamepad;
+ new(): Gamepad;
+}
+
+interface GamepadButton {
+ pressed: boolean;
+ value: number;
+}
+
+declare var GamepadButton: {
+ prototype: GamepadButton;
+ new(): GamepadButton;
+}
+
+interface GamepadEvent extends Event {
+ gamepad: Gamepad;
+}
+
+declare var GamepadEvent: {
+ prototype: GamepadEvent;
+ new(): GamepadEvent;
+}
+
+interface Geolocation {
+ clearWatch(watchId: number): void;
+ getCurrentPosition(successCallback: PositionCallback, errorCallback?: PositionErrorCallback, options?: PositionOptions): void;
+ watchPosition(successCallback: PositionCallback, errorCallback?: PositionErrorCallback, options?: PositionOptions): number;
+}
+
+declare var Geolocation: {
+ prototype: Geolocation;
+ new(): Geolocation;
+}
+
+interface HTMLAllCollection extends HTMLCollection {
+ namedItem(name: string): Element;
+}
+
+declare var HTMLAllCollection: {
+ prototype: HTMLAllCollection;
+ new(): HTMLAllCollection;
+}
+
+interface HTMLAnchorElement extends HTMLElement {
+ Methods: string;
+ /**
+ * Sets or retrieves the character set used to encode the object.
+ */
+ charset: string;
+ /**
+ * Sets or retrieves the coordinates of the object.
+ */
+ coords: string;
+ /**
+ * Contains the anchor portion of the URL including the hash sign (#).
+ */
+ hash: string;
+ /**
+ * Contains the hostname and port values of the URL.
+ */
+ host: string;
+ /**
+ * Contains the hostname of a URL.
+ */
+ hostname: string;
+ /**
+ * Sets or retrieves a destination URL or an anchor point.
+ */
+ href: string;
+ /**
+ * Sets or retrieves the language code of the object.
+ */
+ hreflang: string;
+ mimeType: string;
+ /**
+ * Sets or retrieves the shape of the object.
+ */
+ name: string;
+ nameProp: string;
+ /**
+ * Contains the pathname of the URL.
+ */
+ pathname: string;
+ /**
+ * Sets or retrieves the port number associated with a URL.
+ */
+ port: string;
+ /**
+ * Contains the protocol of the URL.
+ */
+ protocol: string;
+ protocolLong: string;
+ /**
+ * Sets or retrieves the relationship between the object and the destination of the link.
+ */
+ rel: string;
+ /**
+ * Sets or retrieves the relationship between the object and the destination of the link.
+ */
+ rev: string;
+ /**
+ * Sets or retrieves the substring of the href property that follows the question mark.
+ */
+ search: string;
+ /**
+ * Sets or retrieves the shape of the object.
+ */
+ shape: string;
+ /**
+ * Sets or retrieves the window or frame at which to target content.
+ */
+ target: string;
+ /**
+ * Retrieves or sets the text of the object as a string.
+ */
+ text: string;
+ type: string;
+ urn: string;
+ /**
+ * Returns a string representation of an object.
+ */
+ toString(): string;
+}
+
+declare var HTMLAnchorElement: {
+ prototype: HTMLAnchorElement;
+ new(): HTMLAnchorElement;
+}
+
+interface HTMLAppletElement extends HTMLElement {
+ /**
+ * Retrieves a string of the URL where the object tag can be found. This is often the href of the document that the object is in, or the value set by a base element.
+ */
+ BaseHref: string;
+ align: string;
+ /**
+ * Sets or retrieves a text alternative to the graphic.
+ */
+ alt: string;
+ /**
+ * Gets or sets the optional alternative HTML script to execute if the object fails to load.
+ */
+ altHtml: string;
+ /**
+ * Sets or retrieves a character string that can be used to implement your own archive functionality for the object.
+ */
+ archive: string;
+ border: string;
+ code: string;
+ /**
+ * Sets or retrieves the URL of the component.
+ */
+ codeBase: string;
+ /**
+ * Sets or retrieves the Internet media type for the code associated with the object.
+ */
+ codeType: string;
+ /**
+ * Address of a pointer to the document this page or frame contains. If there is no document, then null will be returned.
+ */
+ contentDocument: Document;
+ /**
+ * Sets or retrieves the URL that references the data of the object.
+ */
+ data: string;
+ /**
+ * Sets or retrieves a character string that can be used to implement your own declare functionality for the object.
+ */
+ declare: boolean;
+ form: HTMLFormElement;
+ /**
+ * Sets or retrieves the height of the object.
+ */
+ height: string;
+ hspace: number;
+ /**
+ * Sets or retrieves the shape of the object.
+ */
+ name: string;
+ object: string;
+ /**
+ * Sets or retrieves a message to be displayed while an object is loading.
+ */
+ standby: string;
+ /**
+ * Returns the content type of the object.
+ */
+ type: string;
+ /**
+ * Sets or retrieves the URL, often with a bookmark extension (#name), to use as a client-side image map.
+ */
+ useMap: string;
+ vspace: number;
+ width: number;
+}
+
+declare var HTMLAppletElement: {
+ prototype: HTMLAppletElement;
+ new(): HTMLAppletElement;
+}
+
+interface HTMLAreaElement extends HTMLElement {
+ /**
+ * Sets or retrieves a text alternative to the graphic.
+ */
+ alt: string;
+ /**
+ * Sets or retrieves the coordinates of the object.
+ */
+ coords: string;
+ /**
+ * Sets or retrieves the subsection of the href property that follows the number sign (#).
+ */
+ hash: string;
+ /**
+ * Sets or retrieves the hostname and port number of the location or URL.
+ */
+ host: string;
+ /**
+ * Sets or retrieves the host name part of the location or URL.
+ */
+ hostname: string;
+ /**
+ * Sets or retrieves a destination URL or an anchor point.
+ */
+ href: string;
+ /**
+ * Sets or gets whether clicks in this region cause action.
+ */
+ noHref: boolean;
+ /**
+ * Sets or retrieves the file name or path specified by the object.
+ */
+ pathname: string;
+ /**
+ * Sets or retrieves the port number associated with a URL.
+ */
+ port: string;
+ /**
+ * Sets or retrieves the protocol portion of a URL.
+ */
+ protocol: string;
+ rel: string;
+ /**
+ * Sets or retrieves the substring of the href property that follows the question mark.
+ */
+ search: string;
+ /**
+ * Sets or retrieves the shape of the object.
+ */
+ shape: string;
+ /**
+ * Sets or retrieves the window or frame at which to target content.
+ */
+ target: string;
+ /**
+ * Returns a string representation of an object.
+ */
+ toString(): string;
+}
+
+declare var HTMLAreaElement: {
+ prototype: HTMLAreaElement;
+ new(): HTMLAreaElement;
+}
+
+interface HTMLAreasCollection extends HTMLCollection {
+ /**
+ * Adds an element to the areas, controlRange, or options collection.
+ */
+ add(element: HTMLElement, before?: HTMLElement | number): void;
+ /**
+ * Removes an element from the collection.
+ */
+ remove(index?: number): void;
+}
+
+declare var HTMLAreasCollection: {
+ prototype: HTMLAreasCollection;
+ new(): HTMLAreasCollection;
+}
+
+interface HTMLAudioElement extends HTMLMediaElement {
+}
+
+declare var HTMLAudioElement: {
+ prototype: HTMLAudioElement;
+ new(): HTMLAudioElement;
+}
+
+interface HTMLBRElement extends HTMLElement {
+ /**
+ * Sets or retrieves the side on which floating objects are not to be positioned when any IHTMLBlockElement is inserted into the document.
+ */
+ clear: string;
+}
+
+declare var HTMLBRElement: {
+ prototype: HTMLBRElement;
+ new(): HTMLBRElement;
+}
+
+interface HTMLBaseElement extends HTMLElement {
+ /**
+ * Gets or sets the baseline URL on which relative links are based.
+ */
+ href: string;
+ /**
+ * Sets or retrieves the window or frame at which to target content.
+ */
+ target: string;
+}
+
+declare var HTMLBaseElement: {
+ prototype: HTMLBaseElement;
+ new(): HTMLBaseElement;
+}
+
+interface HTMLBaseFontElement extends HTMLElement, DOML2DeprecatedColorProperty {
+ /**
+ * Sets or retrieves the current typeface family.
+ */
+ face: string;
+ /**
+ * Sets or retrieves the font size of the object.
+ */
+ size: number;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLBaseFontElement: {
+ prototype: HTMLBaseFontElement;
+ new(): HTMLBaseFontElement;
+}
+
+interface HTMLBlockElement extends HTMLElement {
+ /**
+ * Sets or retrieves reference information about the object.
+ */
+ cite: string;
+ clear: string;
+ /**
+ * Sets or retrieves the width of the object.
+ */
+ width: number;
+}
+
+declare var HTMLBlockElement: {
+ prototype: HTMLBlockElement;
+ new(): HTMLBlockElement;
+}
+
+interface HTMLBodyElement extends HTMLElement {
+ aLink: any;
+ background: string;
+ bgColor: any;
+ bgProperties: string;
+ link: any;
+ noWrap: boolean;
+ onafterprint: (ev: Event) => any;
+ onbeforeprint: (ev: Event) => any;
+ onbeforeunload: (ev: BeforeUnloadEvent) => any;
+ onblur: (ev: FocusEvent) => any;
+ onerror: (ev: Event) => any;
+ onfocus: (ev: FocusEvent) => any;
+ onhashchange: (ev: HashChangeEvent) => any;
+ onload: (ev: Event) => any;
+ onmessage: (ev: MessageEvent) => any;
+ onoffline: (ev: Event) => any;
+ ononline: (ev: Event) => any;
+ onorientationchange: (ev: Event) => any;
+ onpagehide: (ev: PageTransitionEvent) => any;
+ onpageshow: (ev: PageTransitionEvent) => any;
+ onpopstate: (ev: PopStateEvent) => any;
+ onresize: (ev: UIEvent) => any;
+ onstorage: (ev: StorageEvent) => any;
+ onunload: (ev: Event) => any;
+ text: any;
+ vLink: any;
+ createTextRange(): TextRange;
+ addEventListener(type: "MSContentZoom", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureChange", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureDoubleTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureEnd", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureHold", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGotPointerCapture", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSInertiaStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSLostPointerCapture", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSManipulationStateChanged", listener: (ev: MSManipulationEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerCancel", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerDown", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerEnter", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerLeave", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerMove", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerOut", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerOver", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerUp", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "abort", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "activate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "afterprint", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "ariarequest", listener: (ev: AriaRequestEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "beforeactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "beforecopy", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "beforecut", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "beforedeactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "beforepaste", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "beforeprint", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "beforeunload", listener: (ev: BeforeUnloadEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "blur", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "blur", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "canplay", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "canplaythrough", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "change", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "click", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "command", listener: (ev: CommandEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "contextmenu", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "copy", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "cuechange", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "cut", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dblclick", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "deactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "drag", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dragend", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dragenter", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dragleave", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dragover", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dragstart", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "drop", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "durationchange", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "emptied", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "ended", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "focus", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "focus", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "gotpointercapture", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "hashchange", listener: (ev: HashChangeEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "input", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "keydown", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "keypress", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "keyup", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "loadeddata", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "loadedmetadata", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "loadstart", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "lostpointercapture", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "message", listener: (ev: MessageEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mousedown", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseenter", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseleave", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mousemove", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseout", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseover", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseup", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mousewheel", listener: (ev: MouseWheelEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "offline", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "online", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "orientationchange", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "pagehide", listener: (ev: PageTransitionEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pageshow", listener: (ev: PageTransitionEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "paste", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pause", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "play", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "playing", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointercancel", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerdown", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerenter", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerleave", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointermove", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerout", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerover", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerup", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "popstate", listener: (ev: PopStateEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "progress", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "ratechange", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "reset", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "resize", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "scroll", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "seeked", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "seeking", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "select", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "selectstart", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "stalled", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "storage", listener: (ev: StorageEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "submit", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "suspend", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "timeupdate", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "touchcancel", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "touchend", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "touchmove", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "touchstart", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "unload", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "volumechange", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "waiting", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "webkitfullscreenchange", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "webkitfullscreenerror", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "wheel", listener: (ev: WheelEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLBodyElement: {
+ prototype: HTMLBodyElement;
+ new(): HTMLBodyElement;
+}
+
+interface HTMLButtonElement extends HTMLElement {
+ /**
+ * Provides a way to direct a user to a specific field when a document loads. This can provide both direction and convenience for a user, reducing the need to click or tab to a field when a page opens. This attribute is true when present on an element, and false when missing.
+ */
+ autofocus: boolean;
+ disabled: boolean;
+ /**
+ * Retrieves a reference to the form that the object is embedded in.
+ */
+ form: HTMLFormElement;
+ /**
+ * Overrides the action attribute (where the data on a form is sent) on the parent form element.
+ */
+ formAction: string;
+ /**
+ * Used to override the encoding (formEnctype attribute) specified on the form element.
+ */
+ formEnctype: string;
+ /**
+ * Overrides the submit method attribute previously specified on a form element.
+ */
+ formMethod: string;
+ /**
+ * Overrides any validation or required attributes on a form or form elements to allow it to be submitted without validation. This can be used to create a "save draft"-type submit option.
+ */
+ formNoValidate: string;
+ /**
+ * Overrides the target attribute on a form element.
+ */
+ formTarget: string;
+ /**
+ * Sets or retrieves the name of the object.
+ */
+ name: string;
+ status: any;
+ /**
+ * Gets the classification and default behavior of the button.
+ */
+ type: string;
+ /**
+ * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting.
+ */
+ validationMessage: string;
+ /**
+ * Returns a ValidityState object that represents the validity states of an element.
+ */
+ validity: ValidityState;
+ /**
+ * Sets or retrieves the default or selected value of the control.
+ */
+ value: string;
+ /**
+ * Returns whether an element will successfully validate based on forms validation rules and constraints.
+ */
+ willValidate: boolean;
+ /**
+ * Returns whether a form will validate when it is submitted, without having to submit it.
+ */
+ checkValidity(): boolean;
+ /**
+ * Creates a TextRange object for the element.
+ */
+ createTextRange(): TextRange;
+ /**
+ * Sets a custom error message that is displayed when a form is submitted.
+ * @param error Sets a custom error message that is displayed when a form is submitted.
+ */
+ setCustomValidity(error: string): void;
+}
+
+declare var HTMLButtonElement: {
+ prototype: HTMLButtonElement;
+ new(): HTMLButtonElement;
+}
+
+interface HTMLCanvasElement extends HTMLElement {
+ /**
+ * Gets or sets the height of a canvas element on a document.
+ */
+ height: number;
+ /**
+ * Gets or sets the width of a canvas element on a document.
+ */
+ width: number;
+ /**
+ * Returns an object that provides methods and properties for drawing and manipulating images and graphics on a canvas element in a document. A context object includes information about colors, line widths, fonts, and other graphic parameters that can be drawn on a canvas.
+ * @param contextId The identifier (ID) of the type of canvas to create. Internet Explorer 9 and Internet Explorer 10 support only a 2-D context using canvas.getContext("2d"); IE11 Preview also supports 3-D or WebGL context using canvas.getContext("experimental-webgl");
+ */
+ getContext(contextId: "2d"): CanvasRenderingContext2D;
+ getContext(contextId: "experimental-webgl"): WebGLRenderingContext;
+ getContext(contextId: string, ...args: any[]): CanvasRenderingContext2D | WebGLRenderingContext;
+ /**
+ * Returns a blob object encoded as a Portable Network Graphics (PNG) format from a canvas image or drawing.
+ */
+ msToBlob(): Blob;
+ /**
+ * Returns the content of the current canvas as an image that you can use as a source for another canvas or an HTML element.
+ * @param type The standard MIME type for the image format to return. If you do not specify this parameter, the default value is a PNG format image.
+ */
+ toDataURL(type?: string, ...args: any[]): string;
+}
+
+declare var HTMLCanvasElement: {
+ prototype: HTMLCanvasElement;
+ new(): HTMLCanvasElement;
+}
+
+interface HTMLCollection {
+ /**
+ * Sets or retrieves the number of objects in a collection.
+ */
+ length: number;
+ /**
+ * Retrieves an object from various collections.
+ */
+ item(nameOrIndex?: any, optionalIndex?: any): Element;
+ /**
+ * Retrieves a select object or an object from an options collection.
+ */
+ namedItem(name: string): Element;
+ [index: number]: Element;
+}
+
+declare var HTMLCollection: {
+ prototype: HTMLCollection;
+ new(): HTMLCollection;
+}
+
+interface HTMLDDElement extends HTMLElement {
+ /**
+ * Sets or retrieves whether the browser automatically performs wordwrap.
+ */
+ noWrap: boolean;
+}
+
+declare var HTMLDDElement: {
+ prototype: HTMLDDElement;
+ new(): HTMLDDElement;
+}
+
+interface HTMLDListElement extends HTMLElement {
+ compact: boolean;
+}
+
+declare var HTMLDListElement: {
+ prototype: HTMLDListElement;
+ new(): HTMLDListElement;
+}
+
+interface HTMLDTElement extends HTMLElement {
+ /**
+ * Sets or retrieves whether the browser automatically performs wordwrap.
+ */
+ noWrap: boolean;
+}
+
+declare var HTMLDTElement: {
+ prototype: HTMLDTElement;
+ new(): HTMLDTElement;
+}
+
+interface HTMLDataListElement extends HTMLElement {
+ options: HTMLCollection;
+}
+
+declare var HTMLDataListElement: {
+ prototype: HTMLDataListElement;
+ new(): HTMLDataListElement;
+}
+
+interface HTMLDirectoryElement extends HTMLElement {
+ compact: boolean;
+}
+
+declare var HTMLDirectoryElement: {
+ prototype: HTMLDirectoryElement;
+ new(): HTMLDirectoryElement;
+}
+
+interface HTMLDivElement extends HTMLElement {
+ /**
+ * Sets or retrieves how the object is aligned with adjacent text.
+ */
+ align: string;
+ /**
+ * Sets or retrieves whether the browser automatically performs wordwrap.
+ */
+ noWrap: boolean;
+}
+
+declare var HTMLDivElement: {
+ prototype: HTMLDivElement;
+ new(): HTMLDivElement;
+}
+
+interface HTMLDocument extends Document {
+}
+
+declare var HTMLDocument: {
+ prototype: HTMLDocument;
+ new(): HTMLDocument;
+}
+
+interface HTMLElement extends Element {
+ accessKey: string;
+ children: HTMLCollection;
+ contentEditable: string;
+ dataset: DOMStringMap;
+ dir: string;
+ draggable: boolean;
+ hidden: boolean;
+ hideFocus: boolean;
+ innerHTML: string;
+ innerText: string;
+ isContentEditable: boolean;
+ lang: string;
+ offsetHeight: number;
+ offsetLeft: number;
+ offsetParent: Element;
+ offsetTop: number;
+ offsetWidth: number;
+ onabort: (ev: Event) => any;
+ onactivate: (ev: UIEvent) => any;
+ onbeforeactivate: (ev: UIEvent) => any;
+ onbeforecopy: (ev: DragEvent) => any;
+ onbeforecut: (ev: DragEvent) => any;
+ onbeforedeactivate: (ev: UIEvent) => any;
+ onbeforepaste: (ev: DragEvent) => any;
+ onblur: (ev: FocusEvent) => any;
+ oncanplay: (ev: Event) => any;
+ oncanplaythrough: (ev: Event) => any;
+ onchange: (ev: Event) => any;
+ onclick: (ev: MouseEvent) => any;
+ oncontextmenu: (ev: PointerEvent) => any;
+ oncopy: (ev: DragEvent) => any;
+ oncuechange: (ev: Event) => any;
+ oncut: (ev: DragEvent) => any;
+ ondblclick: (ev: MouseEvent) => any;
+ ondeactivate: (ev: UIEvent) => any;
+ ondrag: (ev: DragEvent) => any;
+ ondragend: (ev: DragEvent) => any;
+ ondragenter: (ev: DragEvent) => any;
+ ondragleave: (ev: DragEvent) => any;
+ ondragover: (ev: DragEvent) => any;
+ ondragstart: (ev: DragEvent) => any;
+ ondrop: (ev: DragEvent) => any;
+ ondurationchange: (ev: Event) => any;
+ onemptied: (ev: Event) => any;
+ onended: (ev: Event) => any;
+ onerror: (ev: Event) => any;
+ onfocus: (ev: FocusEvent) => any;
+ oninput: (ev: Event) => any;
+ onkeydown: (ev: KeyboardEvent) => any;
+ onkeypress: (ev: KeyboardEvent) => any;
+ onkeyup: (ev: KeyboardEvent) => any;
+ onload: (ev: Event) => any;
+ onloadeddata: (ev: Event) => any;
+ onloadedmetadata: (ev: Event) => any;
+ onloadstart: (ev: Event) => any;
+ onmousedown: (ev: MouseEvent) => any;
+ onmouseenter: (ev: MouseEvent) => any;
+ onmouseleave: (ev: MouseEvent) => any;
+ onmousemove: (ev: MouseEvent) => any;
+ onmouseout: (ev: MouseEvent) => any;
+ onmouseover: (ev: MouseEvent) => any;
+ onmouseup: (ev: MouseEvent) => any;
+ onmousewheel: (ev: MouseWheelEvent) => any;
+ onmscontentzoom: (ev: UIEvent) => any;
+ onmsmanipulationstatechanged: (ev: MSManipulationEvent) => any;
+ onpaste: (ev: DragEvent) => any;
+ onpause: (ev: Event) => any;
+ onplay: (ev: Event) => any;
+ onplaying: (ev: Event) => any;
+ onprogress: (ev: ProgressEvent) => any;
+ onratechange: (ev: Event) => any;
+ onreset: (ev: Event) => any;
+ onscroll: (ev: UIEvent) => any;
+ onseeked: (ev: Event) => any;
+ onseeking: (ev: Event) => any;
+ onselect: (ev: UIEvent) => any;
+ onselectstart: (ev: Event) => any;
+ onstalled: (ev: Event) => any;
+ onsubmit: (ev: Event) => any;
+ onsuspend: (ev: Event) => any;
+ ontimeupdate: (ev: Event) => any;
+ onvolumechange: (ev: Event) => any;
+ onwaiting: (ev: Event) => any;
+ outerHTML: string;
+ outerText: string;
+ spellcheck: boolean;
+ style: CSSStyleDeclaration;
+ tabIndex: number;
+ title: string;
+ blur(): void;
+ click(): void;
+ dragDrop(): boolean;
+ focus(): void;
+ insertAdjacentElement(position: string, insertedElement: Element): Element;
+ insertAdjacentHTML(where: string, html: string): void;
+ insertAdjacentText(where: string, text: string): void;
+ msGetInputContext(): MSInputMethodContext;
+ scrollIntoView(top?: boolean): void;
+ setActive(): void;
+ addEventListener(type: "MSContentZoom", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureChange", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureDoubleTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureEnd", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureHold", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGotPointerCapture", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSInertiaStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSLostPointerCapture", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSManipulationStateChanged", listener: (ev: MSManipulationEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerCancel", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerDown", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerEnter", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerLeave", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerMove", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerOut", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerOver", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerUp", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "abort", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "activate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "ariarequest", listener: (ev: AriaRequestEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "beforeactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "beforecopy", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "beforecut", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "beforedeactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "beforepaste", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "blur", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "canplay", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "canplaythrough", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "change", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "click", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "command", listener: (ev: CommandEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "contextmenu", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "copy", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "cuechange", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "cut", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dblclick", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "deactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "drag", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dragend", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dragenter", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dragleave", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dragover", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dragstart", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "drop", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "durationchange", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "emptied", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "ended", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "focus", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "gotpointercapture", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "input", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "keydown", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "keypress", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "keyup", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "loadeddata", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "loadedmetadata", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "loadstart", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "lostpointercapture", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mousedown", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseenter", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseleave", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mousemove", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseout", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseover", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseup", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mousewheel", listener: (ev: MouseWheelEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "paste", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pause", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "play", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "playing", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointercancel", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerdown", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerenter", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerleave", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointermove", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerout", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerover", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerup", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "progress", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "ratechange", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "reset", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "scroll", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "seeked", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "seeking", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "select", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "selectstart", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "stalled", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "submit", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "suspend", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "timeupdate", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "touchcancel", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "touchend", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "touchmove", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "touchstart", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "volumechange", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "waiting", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "webkitfullscreenchange", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "webkitfullscreenerror", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "wheel", listener: (ev: WheelEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLElement: {
+ prototype: HTMLElement;
+ new(): HTMLElement;
+}
+
+interface HTMLEmbedElement extends HTMLElement, GetSVGDocument {
+ /**
+ * Sets or retrieves the height of the object.
+ */
+ height: string;
+ hidden: any;
+ /**
+ * Gets or sets whether the DLNA PlayTo device is available.
+ */
+ msPlayToDisabled: boolean;
+ /**
+ * Gets or sets the path to the preferred media source. This enables the Play To target device to stream the media content, which can be DRM protected, from a different location, such as a cloud media server.
+ */
+ msPlayToPreferredSourceUri: string;
+ /**
+ * Gets or sets the primary DLNA PlayTo device.
+ */
+ msPlayToPrimary: boolean;
+ /**
+ * Gets the source associated with the media element for use by the PlayToManager.
+ */
+ msPlayToSource: any;
+ /**
+ * Sets or retrieves the name of the object.
+ */
+ name: string;
+ /**
+ * Retrieves the palette used for the embedded document.
+ */
+ palette: string;
+ /**
+ * Retrieves the URL of the plug-in used to view an embedded document.
+ */
+ pluginspage: string;
+ readyState: string;
+ /**
+ * Sets or retrieves a URL to be loaded by the object.
+ */
+ src: string;
+ /**
+ * Sets or retrieves the height and width units of the embed object.
+ */
+ units: string;
+ /**
+ * Sets or retrieves the width of the object.
+ */
+ width: string;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLEmbedElement: {
+ prototype: HTMLEmbedElement;
+ new(): HTMLEmbedElement;
+}
+
+interface HTMLFieldSetElement extends HTMLElement {
+ /**
+ * Sets or retrieves how the object is aligned with adjacent text.
+ */
+ align: string;
+ disabled: boolean;
+ /**
+ * Retrieves a reference to the form that the object is embedded in.
+ */
+ form: HTMLFormElement;
+ /**
+ * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting.
+ */
+ validationMessage: string;
+ /**
+ * Returns a ValidityState object that represents the validity states of an element.
+ */
+ validity: ValidityState;
+ /**
+ * Returns whether an element will successfully validate based on forms validation rules and constraints.
+ */
+ willValidate: boolean;
+ /**
+ * Returns whether a form will validate when it is submitted, without having to submit it.
+ */
+ checkValidity(): boolean;
+ /**
+ * Sets a custom error message that is displayed when a form is submitted.
+ * @param error Sets a custom error message that is displayed when a form is submitted.
+ */
+ setCustomValidity(error: string): void;
+}
+
+declare var HTMLFieldSetElement: {
+ prototype: HTMLFieldSetElement;
+ new(): HTMLFieldSetElement;
+}
+
+interface HTMLFontElement extends HTMLElement, DOML2DeprecatedColorProperty, DOML2DeprecatedSizeProperty {
+ /**
+ * Sets or retrieves the current typeface family.
+ */
+ face: string;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLFontElement: {
+ prototype: HTMLFontElement;
+ new(): HTMLFontElement;
+}
+
+interface HTMLFormElement extends HTMLElement {
+ /**
+ * Sets or retrieves a list of character encodings for input data that must be accepted by the server processing the form.
+ */
+ acceptCharset: string;
+ /**
+ * Sets or retrieves the URL to which the form content is sent for processing.
+ */
+ action: string;
+ /**
+ * Specifies whether autocomplete is applied to an editable text field.
+ */
+ autocomplete: string;
+ /**
+ * Retrieves a collection, in source order, of all controls in a given form.
+ */
+ elements: HTMLCollection;
+ /**
+ * Sets or retrieves the MIME encoding for the form.
+ */
+ encoding: string;
+ /**
+ * Sets or retrieves the encoding type for the form.
+ */
+ enctype: string;
+ /**
+ * Sets or retrieves the number of objects in a collection.
+ */
+ length: number;
+ /**
+ * Sets or retrieves how to send the form data to the server.
+ */
+ method: string;
+ /**
+ * Sets or retrieves the name of the object.
+ */
+ name: string;
+ /**
+ * Designates a form that is not validated when submitted.
+ */
+ noValidate: boolean;
+ /**
+ * Sets or retrieves the window or frame at which to target content.
+ */
+ target: string;
+ /**
+ * Returns whether a form will validate when it is submitted, without having to submit it.
+ */
+ checkValidity(): boolean;
+ /**
+ * Retrieves a form object or an object from an elements collection.
+ * @param name Variant of type Number or String that specifies the object or collection to retrieve. If this parameter is a Number, it is the zero-based index of the object. If this parameter is a string, all objects with matching name or id properties are retrieved, and a collection is returned if more than one match is made.
+ * @param index Variant of type Number that specifies the zero-based index of the object to retrieve when a collection is returned.
+ */
+ item(name?: any, index?: any): any;
+ /**
+ * Retrieves a form object or an object from an elements collection.
+ */
+ namedItem(name: string): any;
+ /**
+ * Fires when the user resets a form.
+ */
+ reset(): void;
+ /**
+ * Fires when a FORM is about to be submitted.
+ */
+ submit(): void;
+ [name: string]: any;
+}
+
+declare var HTMLFormElement: {
+ prototype: HTMLFormElement;
+ new(): HTMLFormElement;
+}
+
+interface HTMLFrameElement extends HTMLElement, GetSVGDocument {
+ /**
+ * Specifies the properties of a border drawn around an object.
+ */
+ border: string;
+ /**
+ * Sets or retrieves the border color of the object.
+ */
+ borderColor: any;
+ /**
+ * Retrieves the document object of the page or frame.
+ */
+ contentDocument: Document;
+ /**
+ * Retrieves the object of the specified.
+ */
+ contentWindow: Window;
+ /**
+ * Sets or retrieves whether to display a border for the frame.
+ */
+ frameBorder: string;
+ /**
+ * Sets or retrieves the amount of additional space between the frames.
+ */
+ frameSpacing: any;
+ /**
+ * Sets or retrieves the height of the object.
+ */
+ height: string | number;
+ /**
+ * Sets or retrieves a URI to a long description of the object.
+ */
+ longDesc: string;
+ /**
+ * Sets or retrieves the top and bottom margin heights before displaying the text in a frame.
+ */
+ marginHeight: string;
+ /**
+ * Sets or retrieves the left and right margin widths before displaying the text in a frame.
+ */
+ marginWidth: string;
+ /**
+ * Sets or retrieves the frame name.
+ */
+ name: string;
+ /**
+ * Sets or retrieves whether the user can resize the frame.
+ */
+ noResize: boolean;
+ /**
+ * Raised when the object has been completely received from the server.
+ */
+ onload: (ev: Event) => any;
+ /**
+ * Sets or retrieves whether the frame can be scrolled.
+ */
+ scrolling: string;
+ /**
+ * Sets the value indicating whether the source file of a frame or iframe has specific security restrictions applied.
+ */
+ security: any;
+ /**
+ * Sets or retrieves a URL to be loaded by the object.
+ */
+ src: string;
+ /**
+ * Sets or retrieves the width of the object.
+ */
+ width: string | number;
+ addEventListener(type: "MSContentZoom", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureChange", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureDoubleTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureEnd", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureHold", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGotPointerCapture", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSInertiaStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSLostPointerCapture", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSManipulationStateChanged", listener: (ev: MSManipulationEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerCancel", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerDown", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerEnter", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerLeave", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerMove", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerOut", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerOver", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerUp", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "abort", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "activate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "ariarequest", listener: (ev: AriaRequestEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "beforeactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "beforecopy", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "beforecut", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "beforedeactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "beforepaste", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "blur", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "canplay", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "canplaythrough", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "change", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "click", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "command", listener: (ev: CommandEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "contextmenu", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "copy", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "cuechange", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "cut", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dblclick", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "deactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "drag", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dragend", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dragenter", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dragleave", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dragover", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dragstart", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "drop", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "durationchange", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "emptied", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "ended", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "focus", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "gotpointercapture", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "input", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "keydown", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "keypress", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "keyup", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "loadeddata", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "loadedmetadata", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "loadstart", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "lostpointercapture", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mousedown", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseenter", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseleave", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mousemove", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseout", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseover", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseup", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mousewheel", listener: (ev: MouseWheelEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "paste", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pause", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "play", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "playing", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointercancel", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerdown", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerenter", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerleave", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointermove", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerout", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerover", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerup", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "progress", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "ratechange", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "reset", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "scroll", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "seeked", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "seeking", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "select", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "selectstart", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "stalled", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "submit", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "suspend", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "timeupdate", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "touchcancel", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "touchend", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "touchmove", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "touchstart", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "volumechange", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "waiting", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "webkitfullscreenchange", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "webkitfullscreenerror", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "wheel", listener: (ev: WheelEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLFrameElement: {
+ prototype: HTMLFrameElement;
+ new(): HTMLFrameElement;
+}
+
+interface HTMLFrameSetElement extends HTMLElement {
+ border: string;
+ /**
+ * Sets or retrieves the border color of the object.
+ */
+ borderColor: any;
+ /**
+ * Sets or retrieves the frame widths of the object.
+ */
+ cols: string;
+ /**
+ * Sets or retrieves whether to display a border for the frame.
+ */
+ frameBorder: string;
+ /**
+ * Sets or retrieves the amount of additional space between the frames.
+ */
+ frameSpacing: any;
+ name: string;
+ onafterprint: (ev: Event) => any;
+ onbeforeprint: (ev: Event) => any;
+ onbeforeunload: (ev: BeforeUnloadEvent) => any;
+ /**
+ * Fires when the object loses the input focus.
+ */
+ onblur: (ev: FocusEvent) => any;
+ onerror: (ev: Event) => any;
+ /**
+ * Fires when the object receives focus.
+ */
+ onfocus: (ev: FocusEvent) => any;
+ onhashchange: (ev: HashChangeEvent) => any;
+ onload: (ev: Event) => any;
+ onmessage: (ev: MessageEvent) => any;
+ onoffline: (ev: Event) => any;
+ ononline: (ev: Event) => any;
+ onorientationchange: (ev: Event) => any;
+ onpagehide: (ev: PageTransitionEvent) => any;
+ onpageshow: (ev: PageTransitionEvent) => any;
+ onresize: (ev: UIEvent) => any;
+ onstorage: (ev: StorageEvent) => any;
+ onunload: (ev: Event) => any;
+ /**
+ * Sets or retrieves the frame heights of the object.
+ */
+ rows: string;
+ addEventListener(type: "MSContentZoom", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureChange", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureDoubleTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureEnd", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureHold", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGotPointerCapture", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSInertiaStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSLostPointerCapture", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSManipulationStateChanged", listener: (ev: MSManipulationEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerCancel", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerDown", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerEnter", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerLeave", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerMove", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerOut", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerOver", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerUp", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "abort", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "activate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "ariarequest", listener: (ev: AriaRequestEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "beforeactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "beforecopy", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "beforecut", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "beforedeactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "beforepaste", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "beforeprint", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "beforeunload", listener: (ev: BeforeUnloadEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "blur", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "blur", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "canplay", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "canplaythrough", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "change", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "click", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "command", listener: (ev: CommandEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "contextmenu", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "copy", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "cuechange", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "cut", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dblclick", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "deactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "drag", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dragend", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dragenter", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dragleave", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dragover", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dragstart", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "drop", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "durationchange", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "emptied", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "ended", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "focus", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "focus", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "gotpointercapture", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "hashchange", listener: (ev: HashChangeEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "input", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "keydown", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "keypress", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "keyup", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "loadeddata", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "loadedmetadata", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "loadstart", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "lostpointercapture", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "message", listener: (ev: MessageEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mousedown", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseenter", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseleave", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mousemove", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseout", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseover", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseup", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mousewheel", listener: (ev: MouseWheelEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "offline", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "online", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "orientationchange", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "pagehide", listener: (ev: PageTransitionEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pageshow", listener: (ev: PageTransitionEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "paste", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pause", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "play", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "playing", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointercancel", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerdown", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerenter", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerleave", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointermove", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerout", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerover", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerup", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "progress", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "ratechange", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "reset", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "resize", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "scroll", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "seeked", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "seeking", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "select", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "selectstart", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "stalled", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "storage", listener: (ev: StorageEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "submit", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "suspend", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "timeupdate", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "touchcancel", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "touchend", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "touchmove", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "touchstart", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "unload", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "volumechange", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "waiting", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "webkitfullscreenchange", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "webkitfullscreenerror", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "wheel", listener: (ev: WheelEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLFrameSetElement: {
+ prototype: HTMLFrameSetElement;
+ new(): HTMLFrameSetElement;
+}
+
+interface HTMLHRElement extends HTMLElement, DOML2DeprecatedColorProperty, DOML2DeprecatedSizeProperty {
+ /**
+ * Sets or retrieves how the object is aligned with adjacent text.
+ */
+ align: string;
+ /**
+ * Sets or retrieves whether the horizontal rule is drawn with 3-D shading.
+ */
+ noShade: boolean;
+ /**
+ * Sets or retrieves the width of the object.
+ */
+ width: number;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLHRElement: {
+ prototype: HTMLHRElement;
+ new(): HTMLHRElement;
+}
+
+interface HTMLHeadElement extends HTMLElement {
+ profile: string;
+}
+
+declare var HTMLHeadElement: {
+ prototype: HTMLHeadElement;
+ new(): HTMLHeadElement;
+}
+
+interface HTMLHeadingElement extends HTMLElement {
+ /**
+ * Sets or retrieves a value that indicates the table alignment.
+ */
+ align: string;
+ clear: string;
+}
+
+declare var HTMLHeadingElement: {
+ prototype: HTMLHeadingElement;
+ new(): HTMLHeadingElement;
+}
+
+interface HTMLHtmlElement extends HTMLElement {
+ /**
+ * Sets or retrieves the DTD version that governs the current document.
+ */
+ version: string;
+}
+
+declare var HTMLHtmlElement: {
+ prototype: HTMLHtmlElement;
+ new(): HTMLHtmlElement;
+}
+
+interface HTMLIFrameElement extends HTMLElement, GetSVGDocument {
+ /**
+ * Sets or retrieves how the object is aligned with adjacent text.
+ */
+ align: string;
+ allowFullscreen: boolean;
+ /**
+ * Specifies the properties of a border drawn around an object.
+ */
+ border: string;
+ /**
+ * Retrieves the document object of the page or frame.
+ */
+ contentDocument: Document;
+ /**
+ * Retrieves the object of the specified.
+ */
+ contentWindow: Window;
+ /**
+ * Sets or retrieves whether to display a border for the frame.
+ */
+ frameBorder: string;
+ /**
+ * Sets or retrieves the amount of additional space between the frames.
+ */
+ frameSpacing: any;
+ /**
+ * Sets or retrieves the height of the object.
+ */
+ height: string;
+ /**
+ * Sets or retrieves the horizontal margin for the object.
+ */
+ hspace: number;
+ /**
+ * Sets or retrieves a URI to a long description of the object.
+ */
+ longDesc: string;
+ /**
+ * Sets or retrieves the top and bottom margin heights before displaying the text in a frame.
+ */
+ marginHeight: string;
+ /**
+ * Sets or retrieves the left and right margin widths before displaying the text in a frame.
+ */
+ marginWidth: string;
+ /**
+ * Sets or retrieves the frame name.
+ */
+ name: string;
+ /**
+ * Sets or retrieves whether the user can resize the frame.
+ */
+ noResize: boolean;
+ /**
+ * Raised when the object has been completely received from the server.
+ */
+ onload: (ev: Event) => any;
+ sandbox: DOMSettableTokenList;
+ /**
+ * Sets or retrieves whether the frame can be scrolled.
+ */
+ scrolling: string;
+ /**
+ * Sets the value indicating whether the source file of a frame or iframe has specific security restrictions applied.
+ */
+ security: any;
+ /**
+ * Sets or retrieves a URL to be loaded by the object.
+ */
+ src: string;
+ /**
+ * Sets or retrieves the vertical margin for the object.
+ */
+ vspace: number;
+ /**
+ * Sets or retrieves the width of the object.
+ */
+ width: string;
+ addEventListener(type: "MSContentZoom", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureChange", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureDoubleTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureEnd", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureHold", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGotPointerCapture", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSInertiaStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSLostPointerCapture", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSManipulationStateChanged", listener: (ev: MSManipulationEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerCancel", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerDown", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerEnter", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerLeave", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerMove", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerOut", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerOver", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerUp", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "abort", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "activate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "ariarequest", listener: (ev: AriaRequestEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "beforeactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "beforecopy", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "beforecut", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "beforedeactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "beforepaste", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "blur", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "canplay", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "canplaythrough", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "change", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "click", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "command", listener: (ev: CommandEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "contextmenu", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "copy", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "cuechange", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "cut", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dblclick", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "deactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "drag", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dragend", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dragenter", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dragleave", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dragover", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dragstart", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "drop", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "durationchange", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "emptied", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "ended", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "focus", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "gotpointercapture", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "input", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "keydown", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "keypress", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "keyup", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "loadeddata", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "loadedmetadata", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "loadstart", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "lostpointercapture", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mousedown", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseenter", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseleave", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mousemove", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseout", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseover", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseup", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mousewheel", listener: (ev: MouseWheelEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "paste", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pause", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "play", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "playing", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointercancel", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerdown", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerenter", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerleave", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointermove", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerout", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerover", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerup", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "progress", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "ratechange", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "reset", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "scroll", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "seeked", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "seeking", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "select", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "selectstart", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "stalled", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "submit", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "suspend", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "timeupdate", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "touchcancel", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "touchend", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "touchmove", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "touchstart", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "volumechange", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "waiting", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "webkitfullscreenchange", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "webkitfullscreenerror", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "wheel", listener: (ev: WheelEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLIFrameElement: {
+ prototype: HTMLIFrameElement;
+ new(): HTMLIFrameElement;
+}
+
+interface HTMLImageElement extends HTMLElement {
+ /**
+ * Sets or retrieves how the object is aligned with adjacent text.
+ */
+ align: string;
+ /**
+ * Sets or retrieves a text alternative to the graphic.
+ */
+ alt: string;
+ /**
+ * Specifies the properties of a border drawn around an object.
+ */
+ border: string;
+ /**
+ * Retrieves whether the object is fully loaded.
+ */
+ complete: boolean;
+ crossOrigin: string;
+ currentSrc: string;
+ /**
+ * Sets or retrieves the height of the object.
+ */
+ height: number;
+ /**
+ * Sets or retrieves the width of the border to draw around the object.
+ */
+ hspace: number;
+ /**
+ * Sets or retrieves whether the image is a server-side image map.
+ */
+ isMap: boolean;
+ /**
+ * Sets or retrieves a Uniform Resource Identifier (URI) to a long description of the object.
+ */
+ longDesc: string;
+ /**
+ * Gets or sets whether the DLNA PlayTo device is available.
+ */
+ msPlayToDisabled: boolean;
+ msPlayToPreferredSourceUri: string;
+ /**
+ * Gets or sets the primary DLNA PlayTo device.
+ */
+ msPlayToPrimary: boolean;
+ /**
+ * Gets the source associated with the media element for use by the PlayToManager.
+ */
+ msPlayToSource: any;
+ /**
+ * Sets or retrieves the name of the object.
+ */
+ name: string;
+ /**
+ * The original height of the image resource before sizing.
+ */
+ naturalHeight: number;
+ /**
+ * The original width of the image resource before sizing.
+ */
+ naturalWidth: number;
+ /**
+ * The address or URL of the a media resource that is to be considered.
+ */
+ src: string;
+ srcset: string;
+ /**
+ * Sets or retrieves the URL, often with a bookmark extension (#name), to use as a client-side image map.
+ */
+ useMap: string;
+ /**
+ * Sets or retrieves the vertical margin for the object.
+ */
+ vspace: number;
+ /**
+ * Sets or retrieves the width of the object.
+ */
+ width: number;
+ x: number;
+ y: number;
+ msGetAsCastingSource(): any;
+}
+
+declare var HTMLImageElement: {
+ prototype: HTMLImageElement;
+ new(): HTMLImageElement;
+ create(): HTMLImageElement;
+}
+
+interface HTMLInputElement extends HTMLElement {
+ /**
+ * Sets or retrieves a comma-separated list of content types.
+ */
+ accept: string;
+ /**
+ * Sets or retrieves how the object is aligned with adjacent text.
+ */
+ align: string;
+ /**
+ * Sets or retrieves a text alternative to the graphic.
+ */
+ alt: string;
+ /**
+ * Specifies whether autocomplete is applied to an editable text field.
+ */
+ autocomplete: string;
+ /**
+ * Provides a way to direct a user to a specific field when a document loads. This can provide both direction and convenience for a user, reducing the need to click or tab to a field when a page opens. This attribute is true when present on an element, and false when missing.
+ */
+ autofocus: boolean;
+ /**
+ * Sets or retrieves the width of the border to draw around the object.
+ */
+ border: string;
+ /**
+ * Sets or retrieves the state of the check box or radio button.
+ */
+ checked: boolean;
+ /**
+ * Retrieves whether the object is fully loaded.
+ */
+ complete: boolean;
+ /**
+ * Sets or retrieves the state of the check box or radio button.
+ */
+ defaultChecked: boolean;
+ /**
+ * Sets or retrieves the initial contents of the object.
+ */
+ defaultValue: string;
+ disabled: boolean;
+ /**
+ * Returns a FileList object on a file type input object.
+ */
+ files: FileList;
+ /**
+ * Retrieves a reference to the form that the object is embedded in.
+ */
+ form: HTMLFormElement;
+ /**
+ * Overrides the action attribute (where the data on a form is sent) on the parent form element.
+ */
+ formAction: string;
+ /**
+ * Used to override the encoding (formEnctype attribute) specified on the form element.
+ */
+ formEnctype: string;
+ /**
+ * Overrides the submit method attribute previously specified on a form element.
+ */
+ formMethod: string;
+ /**
+ * Overrides any validation or required attributes on a form or form elements to allow it to be submitted without validation. This can be used to create a "save draft"-type submit option.
+ */
+ formNoValidate: string;
+ /**
+ * Overrides the target attribute on a form element.
+ */
+ formTarget: string;
+ /**
+ * Sets or retrieves the height of the object.
+ */
+ height: string;
+ /**
+ * Sets or retrieves the width of the border to draw around the object.
+ */
+ hspace: number;
+ indeterminate: boolean;
+ /**
+ * Specifies the ID of a pre-defined datalist of options for an input element.
+ */
+ list: HTMLElement;
+ /**
+ * Defines the maximum acceptable value for an input element with type="number".When used with the min and step attributes, lets you control the range and increment (such as only even numbers) that the user can enter into an input field.
+ */
+ max: string;
+ /**
+ * Sets or retrieves the maximum number of characters that the user can enter in a text control.
+ */
+ maxLength: number;
+ /**
+ * Defines the minimum acceptable value for an input element with type="number". When used with the max and step attributes, lets you control the range and increment (such as even numbers only) that the user can enter into an input field.
+ */
+ min: string;
+ /**
+ * Sets or retrieves the Boolean value indicating whether multiple items can be selected from a list.
+ */
+ multiple: boolean;
+ /**
+ * Sets or retrieves the name of the object.
+ */
+ name: string;
+ /**
+ * Gets or sets a string containing a regular expression that the user's input must match.
+ */
+ pattern: string;
+ /**
+ * Gets or sets a text string that is displayed in an input field as a hint or prompt to users as the format or type of information they need to enter.The text appears in an input field until the user puts focus on the field.
+ */
+ placeholder: string;
+ readOnly: boolean;
+ /**
+ * When present, marks an element that can't be submitted without a value.
+ */
+ required: boolean;
+ /**
+ * Gets or sets the end position or offset of a text selection.
+ */
+ selectionEnd: number;
+ /**
+ * Gets or sets the starting position or offset of a text selection.
+ */
+ selectionStart: number;
+ size: number;
+ /**
+ * The address or URL of the a media resource that is to be considered.
+ */
+ src: string;
+ status: boolean;
+ /**
+ * Defines an increment or jump between values that you want to allow the user to enter. When used with the max and min attributes, lets you control the range and increment (for example, allow only even numbers) that the user can enter into an input field.
+ */
+ step: string;
+ /**
+ * Returns the content type of the object.
+ */
+ type: string;
+ /**
+ * Sets or retrieves the URL, often with a bookmark extension (#name), to use as a client-side image map.
+ */
+ useMap: string;
+ /**
+ * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting.
+ */
+ validationMessage: string;
+ /**
+ * Returns a ValidityState object that represents the validity states of an element.
+ */
+ validity: ValidityState;
+ /**
+ * Returns the value of the data at the cursor's current position.
+ */
+ value: string;
+ valueAsDate: Date;
+ /**
+ * Returns the input field value as a number.
+ */
+ valueAsNumber: number;
+ /**
+ * Sets or retrieves the vertical margin for the object.
+ */
+ vspace: number;
+ /**
+ * Sets or retrieves the width of the object.
+ */
+ width: string;
+ /**
+ * Returns whether an element will successfully validate based on forms validation rules and constraints.
+ */
+ willValidate: boolean;
+ /**
+ * Returns whether a form will validate when it is submitted, without having to submit it.
+ */
+ checkValidity(): boolean;
+ /**
+ * Creates a TextRange object for the element.
+ */
+ createTextRange(): TextRange;
+ /**
+ * Makes the selection equal to the current object.
+ */
+ select(): void;
+ /**
+ * Sets a custom error message that is displayed when a form is submitted.
+ * @param error Sets a custom error message that is displayed when a form is submitted.
+ */
+ setCustomValidity(error: string): void;
+ /**
+ * Sets the start and end positions of a selection in a text field.
+ * @param start The offset into the text field for the start of the selection.
+ * @param end The offset into the text field for the end of the selection.
+ */
+ setSelectionRange(start: number, end: number): void;
+ /**
+ * Decrements a range input control's value by the value given by the Step attribute. If the optional parameter is used, it will decrement the input control's step value multiplied by the parameter's value.
+ * @param n Value to decrement the value by.
+ */
+ stepDown(n?: number): void;
+ /**
+ * Increments a range input control's value by the value given by the Step attribute. If the optional parameter is used, will increment the input control's value by that value.
+ * @param n Value to increment the value by.
+ */
+ stepUp(n?: number): void;
+}
+
+declare var HTMLInputElement: {
+ prototype: HTMLInputElement;
+ new(): HTMLInputElement;
+}
+
+interface HTMLIsIndexElement extends HTMLElement {
+ /**
+ * Sets or retrieves the URL to which the form content is sent for processing.
+ */
+ action: string;
+ /**
+ * Retrieves a reference to the form that the object is embedded in.
+ */
+ form: HTMLFormElement;
+ prompt: string;
+}
+
+declare var HTMLIsIndexElement: {
+ prototype: HTMLIsIndexElement;
+ new(): HTMLIsIndexElement;
+}
+
+interface HTMLLIElement extends HTMLElement {
+ type: string;
+ /**
+ * Sets or retrieves the value of a list item.
+ */
+ value: number;
+}
+
+declare var HTMLLIElement: {
+ prototype: HTMLLIElement;
+ new(): HTMLLIElement;
+}
+
+interface HTMLLabelElement extends HTMLElement {
+ /**
+ * Retrieves a reference to the form that the object is embedded in.
+ */
+ form: HTMLFormElement;
+ /**
+ * Sets or retrieves the object to which the given label object is assigned.
+ */
+ htmlFor: string;
+}
+
+declare var HTMLLabelElement: {
+ prototype: HTMLLabelElement;
+ new(): HTMLLabelElement;
+}
+
+interface HTMLLegendElement extends HTMLElement {
+ /**
+ * Retrieves a reference to the form that the object is embedded in.
+ */
+ align: string;
+ /**
+ * Retrieves a reference to the form that the object is embedded in.
+ */
+ form: HTMLFormElement;
+}
+
+declare var HTMLLegendElement: {
+ prototype: HTMLLegendElement;
+ new(): HTMLLegendElement;
+}
+
+interface HTMLLinkElement extends HTMLElement, LinkStyle {
+ /**
+ * Sets or retrieves the character set used to encode the object.
+ */
+ charset: string;
+ disabled: boolean;
+ /**
+ * Sets or retrieves a destination URL or an anchor point.
+ */
+ href: string;
+ /**
+ * Sets or retrieves the language code of the object.
+ */
+ hreflang: string;
+ /**
+ * Sets or retrieves the media type.
+ */
+ media: string;
+ /**
+ * Sets or retrieves the relationship between the object and the destination of the link.
+ */
+ rel: string;
+ /**
+ * Sets or retrieves the relationship between the object and the destination of the link.
+ */
+ rev: string;
+ /**
+ * Sets or retrieves the window or frame at which to target content.
+ */
+ target: string;
+ /**
+ * Sets or retrieves the MIME type of the object.
+ */
+ type: string;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLLinkElement: {
+ prototype: HTMLLinkElement;
+ new(): HTMLLinkElement;
+}
+
+interface HTMLMapElement extends HTMLElement {
+ /**
+ * Retrieves a collection of the area objects defined for the given map object.
+ */
+ areas: HTMLAreasCollection;
+ /**
+ * Sets or retrieves the name of the object.
+ */
+ name: string;
+}
+
+declare var HTMLMapElement: {
+ prototype: HTMLMapElement;
+ new(): HTMLMapElement;
+}
+
+interface HTMLMarqueeElement extends HTMLElement {
+ behavior: string;
+ bgColor: any;
+ direction: string;
+ height: string;
+ hspace: number;
+ loop: number;
+ onbounce: (ev: Event) => any;
+ onfinish: (ev: Event) => any;
+ onstart: (ev: Event) => any;
+ scrollAmount: number;
+ scrollDelay: number;
+ trueSpeed: boolean;
+ vspace: number;
+ width: string;
+ start(): void;
+ stop(): void;
+ addEventListener(type: "MSContentZoom", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureChange", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureDoubleTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureEnd", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureHold", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGotPointerCapture", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSInertiaStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSLostPointerCapture", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSManipulationStateChanged", listener: (ev: MSManipulationEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerCancel", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerDown", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerEnter", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerLeave", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerMove", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerOut", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerOver", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerUp", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "abort", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "activate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "ariarequest", listener: (ev: AriaRequestEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "beforeactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "beforecopy", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "beforecut", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "beforedeactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "beforepaste", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "blur", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "bounce", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "canplay", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "canplaythrough", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "change", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "click", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "command", listener: (ev: CommandEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "contextmenu", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "copy", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "cuechange", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "cut", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dblclick", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "deactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "drag", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dragend", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dragenter", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dragleave", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dragover", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dragstart", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "drop", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "durationchange", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "emptied", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "ended", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "finish", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "focus", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "gotpointercapture", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "input", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "keydown", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "keypress", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "keyup", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "loadeddata", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "loadedmetadata", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "loadstart", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "lostpointercapture", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mousedown", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseenter", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseleave", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mousemove", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseout", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseover", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseup", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mousewheel", listener: (ev: MouseWheelEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "paste", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pause", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "play", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "playing", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointercancel", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerdown", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerenter", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerleave", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointermove", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerout", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerover", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerup", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "progress", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "ratechange", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "reset", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "scroll", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "seeked", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "seeking", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "select", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "selectstart", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "stalled", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "start", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "submit", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "suspend", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "timeupdate", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "touchcancel", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "touchend", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "touchmove", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "touchstart", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "volumechange", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "waiting", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "webkitfullscreenchange", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "webkitfullscreenerror", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "wheel", listener: (ev: WheelEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLMarqueeElement: {
+ prototype: HTMLMarqueeElement;
+ new(): HTMLMarqueeElement;
+}
+
+interface HTMLMediaElement extends HTMLElement {
+ /**
+ * Returns an AudioTrackList object with the audio tracks for a given video element.
+ */
+ audioTracks: AudioTrackList;
+ /**
+ * Gets or sets a value that indicates whether to start playing the media automatically.
+ */
+ autoplay: boolean;
+ /**
+ * Gets a collection of buffered time ranges.
+ */
+ buffered: TimeRanges;
+ /**
+ * Gets or sets a flag that indicates whether the client provides a set of controls for the media (in case the developer does not include controls for the player).
+ */
+ controls: boolean;
+ /**
+ * Gets the address or URL of the current media resource that is selected by IHTMLMediaElement.
+ */
+ currentSrc: string;
+ /**
+ * Gets or sets the current playback position, in seconds.
+ */
+ currentTime: number;
+ defaultMuted: boolean;
+ /**
+ * Gets or sets the default playback rate when the user is not using fast forward or reverse for a video or audio resource.
+ */
+ defaultPlaybackRate: number;
+ /**
+ * Returns the duration in seconds of the current media resource. A NaN value is returned if duration is not available, or Infinity if the media resource is streaming.
+ */
+ duration: number;
+ /**
+ * Gets information about whether the playback has ended or not.
+ */
+ ended: boolean;
+ /**
+ * Returns an object representing the current error state of the audio or video element.
+ */
+ error: MediaError;
+ /**
+ * Gets or sets a flag to specify whether playback should restart after it completes.
+ */
+ loop: boolean;
+ /**
+ * Specifies the purpose of the audio or video media, such as background audio or alerts.
+ */
+ msAudioCategory: string;
+ /**
+ * Specifies the output device id that the audio will be sent to.
+ */
+ msAudioDeviceType: string;
+ msGraphicsTrustStatus: MSGraphicsTrust;
+ /**
+ * Gets the MSMediaKeys object, which is used for decrypting media data, that is associated with this media element.
+ */
+ msKeys: MSMediaKeys;
+ /**
+ * Gets or sets whether the DLNA PlayTo device is available.
+ */
+ msPlayToDisabled: boolean;
+ /**
+ * Gets or sets the path to the preferred media source. This enables the Play To target device to stream the media content, which can be DRM protected, from a different location, such as a cloud media server.
+ */
+ msPlayToPreferredSourceUri: string;
+ /**
+ * Gets or sets the primary DLNA PlayTo device.
+ */
+ msPlayToPrimary: boolean;
+ /**
+ * Gets the source associated with the media element for use by the PlayToManager.
+ */
+ msPlayToSource: any;
+ /**
+ * Specifies whether or not to enable low-latency playback on the media element.
+ */
+ msRealTime: boolean;
+ /**
+ * Gets or sets a flag that indicates whether the audio (either audio or the audio track on video media) is muted.
+ */
+ muted: boolean;
+ /**
+ * Gets the current network activity for the element.
+ */
+ networkState: number;
+ onmsneedkey: (ev: MSMediaKeyNeededEvent) => any;
+ /**
+ * Gets a flag that specifies whether playback is paused.
+ */
+ paused: boolean;
+ /**
+ * Gets or sets the current rate of speed for the media resource to play. This speed is expressed as a multiple of the normal speed of the media resource.
+ */
+ playbackRate: number;
+ /**
+ * Gets TimeRanges for the current media resource that has been played.
+ */
+ played: TimeRanges;
+ /**
+ * Gets or sets the current playback position, in seconds.
+ */
+ preload: string;
+ readyState: number;
+ /**
+ * Returns a TimeRanges object that represents the ranges of the current media resource that can be seeked.
+ */
+ seekable: TimeRanges;
+ /**
+ * Gets a flag that indicates whether the the client is currently moving to a new playback position in the media resource.
+ */
+ seeking: boolean;
+ /**
+ * The address or URL of the a media resource that is to be considered.
+ */
+ src: string;
+ textTracks: TextTrackList;
+ videoTracks: VideoTrackList;
+ /**
+ * Gets or sets the volume level for audio portions of the media element.
+ */
+ volume: number;
+ addTextTrack(kind: string, label?: string, language?: string): TextTrack;
+ /**
+ * Returns a string that specifies whether the client can play a given media resource type.
+ */
+ canPlayType(type: string): string;
+ /**
+ * Fires immediately after the client loads the object.
+ */
+ load(): void;
+ /**
+ * Clears all effects from the media pipeline.
+ */
+ msClearEffects(): void;
+ msGetAsCastingSource(): any;
+ /**
+ * Inserts the specified audio effect into media pipeline.
+ */
+ msInsertAudioEffect(activatableClassId: string, effectRequired: boolean, config?: any): void;
+ msSetMediaKeys(mediaKeys: MSMediaKeys): void;
+ /**
+ * Specifies the media protection manager for a given media pipeline.
+ */
+ msSetMediaProtectionManager(mediaProtectionManager?: any): void;
+ /**
+ * Pauses the current playback and sets paused to TRUE. This can be used to test whether the media is playing or paused. You can also use the pause or play events to tell whether the media is playing or not.
+ */
+ pause(): void;
+ /**
+ * Loads and starts playback of a media resource.
+ */
+ play(): void;
+ HAVE_CURRENT_DATA: number;
+ HAVE_ENOUGH_DATA: number;
+ HAVE_FUTURE_DATA: number;
+ HAVE_METADATA: number;
+ HAVE_NOTHING: number;
+ NETWORK_EMPTY: number;
+ NETWORK_IDLE: number;
+ NETWORK_LOADING: number;
+ NETWORK_NO_SOURCE: number;
+ addEventListener(type: "MSContentZoom", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureChange", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureDoubleTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureEnd", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureHold", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGotPointerCapture", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSInertiaStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSLostPointerCapture", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSManipulationStateChanged", listener: (ev: MSManipulationEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerCancel", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerDown", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerEnter", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerLeave", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerMove", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerOut", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerOver", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerUp", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "abort", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "activate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "ariarequest", listener: (ev: AriaRequestEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "beforeactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "beforecopy", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "beforecut", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "beforedeactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "beforepaste", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "blur", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "canplay", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "canplaythrough", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "change", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "click", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "command", listener: (ev: CommandEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "contextmenu", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "copy", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "cuechange", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "cut", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dblclick", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "deactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "drag", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dragend", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dragenter", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dragleave", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dragover", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dragstart", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "drop", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "durationchange", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "emptied", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "ended", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "focus", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "gotpointercapture", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "input", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "keydown", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "keypress", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "keyup", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "loadeddata", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "loadedmetadata", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "loadstart", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "lostpointercapture", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mousedown", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseenter", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseleave", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mousemove", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseout", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseover", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseup", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mousewheel", listener: (ev: MouseWheelEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "msneedkey", listener: (ev: MSMediaKeyNeededEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "paste", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pause", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "play", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "playing", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointercancel", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerdown", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerenter", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerleave", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointermove", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerout", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerover", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerup", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "progress", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "ratechange", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "reset", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "scroll", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "seeked", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "seeking", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "select", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "selectstart", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "stalled", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "submit", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "suspend", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "timeupdate", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "touchcancel", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "touchend", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "touchmove", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "touchstart", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "volumechange", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "waiting", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "webkitfullscreenchange", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "webkitfullscreenerror", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "wheel", listener: (ev: WheelEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLMediaElement: {
+ prototype: HTMLMediaElement;
+ new(): HTMLMediaElement;
+ HAVE_CURRENT_DATA: number;
+ HAVE_ENOUGH_DATA: number;
+ HAVE_FUTURE_DATA: number;
+ HAVE_METADATA: number;
+ HAVE_NOTHING: number;
+ NETWORK_EMPTY: number;
+ NETWORK_IDLE: number;
+ NETWORK_LOADING: number;
+ NETWORK_NO_SOURCE: number;
+}
+
+interface HTMLMenuElement extends HTMLElement {
+ compact: boolean;
+ type: string;
+}
+
+declare var HTMLMenuElement: {
+ prototype: HTMLMenuElement;
+ new(): HTMLMenuElement;
+}
+
+interface HTMLMetaElement extends HTMLElement {
+ /**
+ * Sets or retrieves the character set used to encode the object.
+ */
+ charset: string;
+ /**
+ * Gets or sets meta-information to associate with httpEquiv or name.
+ */
+ content: string;
+ /**
+ * Gets or sets information used to bind the value of a content attribute of a meta element to an HTTP response header.
+ */
+ httpEquiv: string;
+ /**
+ * Sets or retrieves the value specified in the content attribute of the meta object.
+ */
+ name: string;
+ /**
+ * Sets or retrieves a scheme to be used in interpreting the value of a property specified for the object.
+ */
+ scheme: string;
+ /**
+ * Sets or retrieves the URL property that will be loaded after the specified time has elapsed.
+ */
+ url: string;
+}
+
+declare var HTMLMetaElement: {
+ prototype: HTMLMetaElement;
+ new(): HTMLMetaElement;
+}
+
+interface HTMLModElement extends HTMLElement {
+ /**
+ * Sets or retrieves reference information about the object.
+ */
+ cite: string;
+ /**
+ * Sets or retrieves the date and time of a modification to the object.
+ */
+ dateTime: string;
+}
+
+declare var HTMLModElement: {
+ prototype: HTMLModElement;
+ new(): HTMLModElement;
+}
+
+interface HTMLNextIdElement extends HTMLElement {
+ n: string;
+}
+
+declare var HTMLNextIdElement: {
+ prototype: HTMLNextIdElement;
+ new(): HTMLNextIdElement;
+}
+
+interface HTMLOListElement extends HTMLElement {
+ compact: boolean;
+ /**
+ * The starting number.
+ */
+ start: number;
+ type: string;
+}
+
+declare var HTMLOListElement: {
+ prototype: HTMLOListElement;
+ new(): HTMLOListElement;
+}
+
+interface HTMLObjectElement extends HTMLElement, GetSVGDocument {
+ /**
+ * Retrieves a string of the URL where the object tag can be found. This is often the href of the document that the object is in, or the value set by a base element.
+ */
+ BaseHref: string;
+ align: string;
+ /**
+ * Sets or retrieves a text alternative to the graphic.
+ */
+ alt: string;
+ /**
+ * Gets or sets the optional alternative HTML script to execute if the object fails to load.
+ */
+ altHtml: string;
+ /**
+ * Sets or retrieves a character string that can be used to implement your own archive functionality for the object.
+ */
+ archive: string;
+ border: string;
+ /**
+ * Sets or retrieves the URL of the file containing the compiled Java class.
+ */
+ code: string;
+ /**
+ * Sets or retrieves the URL of the component.
+ */
+ codeBase: string;
+ /**
+ * Sets or retrieves the Internet media type for the code associated with the object.
+ */
+ codeType: string;
+ /**
+ * Retrieves the document object of the page or frame.
+ */
+ contentDocument: Document;
+ /**
+ * Sets or retrieves the URL that references the data of the object.
+ */
+ data: string;
+ declare: boolean;
+ /**
+ * Retrieves a reference to the form that the object is embedded in.
+ */
+ form: HTMLFormElement;
+ /**
+ * Sets or retrieves the height of the object.
+ */
+ height: string;
+ hspace: number;
+ /**
+ * Gets or sets whether the DLNA PlayTo device is available.
+ */
+ msPlayToDisabled: boolean;
+ /**
+ * Gets or sets the path to the preferred media source. This enables the Play To target device to stream the media content, which can be DRM protected, from a different location, such as a cloud media server.
+ */
+ msPlayToPreferredSourceUri: string;
+ /**
+ * Gets or sets the primary DLNA PlayTo device.
+ */
+ msPlayToPrimary: boolean;
+ /**
+ * Gets the source associated with the media element for use by the PlayToManager.
+ */
+ msPlayToSource: any;
+ /**
+ * Sets or retrieves the name of the object.
+ */
+ name: string;
+ /**
+ * Retrieves the contained object.
+ */
+ object: any;
+ readyState: number;
+ /**
+ * Sets or retrieves a message to be displayed while an object is loading.
+ */
+ standby: string;
+ /**
+ * Sets or retrieves the MIME type of the object.
+ */
+ type: string;
+ /**
+ * Sets or retrieves the URL, often with a bookmark extension (#name), to use as a client-side image map.
+ */
+ useMap: string;
+ /**
+ * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting.
+ */
+ validationMessage: string;
+ /**
+ * Returns a ValidityState object that represents the validity states of an element.
+ */
+ validity: ValidityState;
+ vspace: number;
+ /**
+ * Sets or retrieves the width of the object.
+ */
+ width: string;
+ /**
+ * Returns whether an element will successfully validate based on forms validation rules and constraints.
+ */
+ willValidate: boolean;
+ /**
+ * Returns whether a form will validate when it is submitted, without having to submit it.
+ */
+ checkValidity(): boolean;
+ /**
+ * Sets a custom error message that is displayed when a form is submitted.
+ * @param error Sets a custom error message that is displayed when a form is submitted.
+ */
+ setCustomValidity(error: string): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLObjectElement: {
+ prototype: HTMLObjectElement;
+ new(): HTMLObjectElement;
+}
+
+interface HTMLOptGroupElement extends HTMLElement {
+ /**
+ * Sets or retrieves the status of an option.
+ */
+ defaultSelected: boolean;
+ disabled: boolean;
+ /**
+ * Retrieves a reference to the form that the object is embedded in.
+ */
+ form: HTMLFormElement;
+ /**
+ * Sets or retrieves the ordinal position of an option in a list box.
+ */
+ index: number;
+ /**
+ * Sets or retrieves a value that you can use to implement your own label functionality for the object.
+ */
+ label: string;
+ /**
+ * Sets or retrieves whether the option in the list box is the default item.
+ */
+ selected: boolean;
+ /**
+ * Sets or retrieves the text string specified by the option tag.
+ */
+ text: string;
+ /**
+ * Sets or retrieves the value which is returned to the server when the form control is submitted.
+ */
+ value: string;
+}
+
+declare var HTMLOptGroupElement: {
+ prototype: HTMLOptGroupElement;
+ new(): HTMLOptGroupElement;
+}
+
+interface HTMLOptionElement extends HTMLElement {
+ /**
+ * Sets or retrieves the status of an option.
+ */
+ defaultSelected: boolean;
+ disabled: boolean;
+ /**
+ * Retrieves a reference to the form that the object is embedded in.
+ */
+ form: HTMLFormElement;
+ /**
+ * Sets or retrieves the ordinal position of an option in a list box.
+ */
+ index: number;
+ /**
+ * Sets or retrieves a value that you can use to implement your own label functionality for the object.
+ */
+ label: string;
+ /**
+ * Sets or retrieves whether the option in the list box is the default item.
+ */
+ selected: boolean;
+ /**
+ * Sets or retrieves the text string specified by the option tag.
+ */
+ text: string;
+ /**
+ * Sets or retrieves the value which is returned to the server when the form control is submitted.
+ */
+ value: string;
+}
+
+declare var HTMLOptionElement: {
+ prototype: HTMLOptionElement;
+ new(): HTMLOptionElement;
+ create(): HTMLOptionElement;
+}
+
+interface HTMLParagraphElement extends HTMLElement {
+ /**
+ * Sets or retrieves how the object is aligned with adjacent text.
+ */
+ align: string;
+ clear: string;
+}
+
+declare var HTMLParagraphElement: {
+ prototype: HTMLParagraphElement;
+ new(): HTMLParagraphElement;
+}
+
+interface HTMLParamElement extends HTMLElement {
+ /**
+ * Sets or retrieves the name of an input parameter for an element.
+ */
+ name: string;
+ /**
+ * Sets or retrieves the content type of the resource designated by the value attribute.
+ */
+ type: string;
+ /**
+ * Sets or retrieves the value of an input parameter for an element.
+ */
+ value: string;
+ /**
+ * Sets or retrieves the data type of the value attribute.
+ */
+ valueType: string;
+}
+
+declare var HTMLParamElement: {
+ prototype: HTMLParamElement;
+ new(): HTMLParamElement;
+}
+
+interface HTMLPhraseElement extends HTMLElement {
+ /**
+ * Sets or retrieves reference information about the object.
+ */
+ cite: string;
+ /**
+ * Sets or retrieves the date and time of a modification to the object.
+ */
+ dateTime: string;
+}
+
+declare var HTMLPhraseElement: {
+ prototype: HTMLPhraseElement;
+ new(): HTMLPhraseElement;
+}
+
+interface HTMLPreElement extends HTMLElement {
+ /**
+ * Indicates a citation by rendering text in italic type.
+ */
+ cite: string;
+ clear: string;
+ /**
+ * Sets or gets a value that you can use to implement your own width functionality for the object.
+ */
+ width: number;
+}
+
+declare var HTMLPreElement: {
+ prototype: HTMLPreElement;
+ new(): HTMLPreElement;
+}
+
+interface HTMLProgressElement extends HTMLElement {
+ /**
+ * Retrieves a reference to the form that the object is embedded in.
+ */
+ form: HTMLFormElement;
+ /**
+ * Defines the maximum, or "done" value for a progress element.
+ */
+ max: number;
+ /**
+ * Returns the quotient of value/max when the value attribute is set (determinate progress bar), or -1 when the value attribute is missing (indeterminate progress bar).
+ */
+ position: number;
+ /**
+ * Sets or gets the current value of a progress element. The value must be a non-negative number between 0 and the max value.
+ */
+ value: number;
+}
+
+declare var HTMLProgressElement: {
+ prototype: HTMLProgressElement;
+ new(): HTMLProgressElement;
+}
+
+interface HTMLQuoteElement extends HTMLElement {
+ /**
+ * Sets or retrieves reference information about the object.
+ */
+ cite: string;
+ /**
+ * Sets or retrieves the date and time of a modification to the object.
+ */
+ dateTime: string;
+}
+
+declare var HTMLQuoteElement: {
+ prototype: HTMLQuoteElement;
+ new(): HTMLQuoteElement;
+}
+
+interface HTMLScriptElement extends HTMLElement {
+ async: boolean;
+ /**
+ * Sets or retrieves the character set used to encode the object.
+ */
+ charset: string;
+ /**
+ * Sets or retrieves the status of the script.
+ */
+ defer: boolean;
+ /**
+ * Sets or retrieves the event for which the script is written.
+ */
+ event: string;
+ /**
+ * Sets or retrieves the object that is bound to the event script.
+ */
+ htmlFor: string;
+ /**
+ * Retrieves the URL to an external file that contains the source code or data.
+ */
+ src: string;
+ /**
+ * Retrieves or sets the text of the object as a string.
+ */
+ text: string;
+ /**
+ * Sets or retrieves the MIME type for the associated scripting engine.
+ */
+ type: string;
+}
+
+declare var HTMLScriptElement: {
+ prototype: HTMLScriptElement;
+ new(): HTMLScriptElement;
+}
+
+interface HTMLSelectElement extends HTMLElement {
+ /**
+ * Provides a way to direct a user to a specific field when a document loads. This can provide both direction and convenience for a user, reducing the need to click or tab to a field when a page opens. This attribute is true when present on an element, and false when missing.
+ */
+ autofocus: boolean;
+ disabled: boolean;
+ /**
+ * Retrieves a reference to the form that the object is embedded in.
+ */
+ form: HTMLFormElement;
+ /**
+ * Sets or retrieves the number of objects in a collection.
+ */
+ length: number;
+ /**
+ * Sets or retrieves the Boolean value indicating whether multiple items can be selected from a list.
+ */
+ multiple: boolean;
+ /**
+ * Sets or retrieves the name of the object.
+ */
+ name: string;
+ options: HTMLCollection;
+ /**
+ * When present, marks an element that can't be submitted without a value.
+ */
+ required: boolean;
+ /**
+ * Sets or retrieves the index of the selected option in a select object.
+ */
+ selectedIndex: number;
+ /**
+ * Sets or retrieves the number of rows in the list box.
+ */
+ size: number;
+ /**
+ * Retrieves the type of select control based on the value of the MULTIPLE attribute.
+ */
+ type: string;
+ /**
+ * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting.
+ */
+ validationMessage: string;
+ /**
+ * Returns a ValidityState object that represents the validity states of an element.
+ */
+ validity: ValidityState;
+ /**
+ * Sets or retrieves the value which is returned to the server when the form control is submitted.
+ */
+ value: string;
+ /**
+ * Returns whether an element will successfully validate based on forms validation rules and constraints.
+ */
+ willValidate: boolean;
+ selectedOptions: HTMLCollection;
+ /**
+ * Adds an element to the areas, controlRange, or options collection.
+ * @param element Variant of type Number that specifies the index position in the collection where the element is placed. If no value is given, the method places the element at the end of the collection.
+ * @param before Variant of type Object that specifies an element to insert before, or null to append the object to the collection.
+ */
+ add(element: HTMLElement, before?: HTMLElement | number): void;
+ /**
+ * Returns whether a form will validate when it is submitted, without having to submit it.
+ */
+ checkValidity(): boolean;
+ /**
+ * Retrieves a select object or an object from an options collection.
+ * @param name Variant of type Number or String that specifies the object or collection to retrieve. If this parameter is an integer, it is the zero-based index of the object. If this parameter is a string, all objects with matching name or id properties are retrieved, and a collection is returned if more than one match is made.
+ * @param index Variant of type Number that specifies the zero-based index of the object to retrieve when a collection is returned.
+ */
+ item(name?: any, index?: any): any;
+ /**
+ * Retrieves a select object or an object from an options collection.
+ * @param namedItem A String that specifies the name or id property of the object to retrieve. A collection is returned if more than one match is made.
+ */
+ namedItem(name: string): any;
+ /**
+ * Removes an element from the collection.
+ * @param index Number that specifies the zero-based index of the element to remove from the collection.
+ */
+ remove(index?: number): void;
+ /**
+ * Sets a custom error message that is displayed when a form is submitted.
+ * @param error Sets a custom error message that is displayed when a form is submitted.
+ */
+ setCustomValidity(error: string): void;
+ [name: string]: any;
+}
+
+declare var HTMLSelectElement: {
+ prototype: HTMLSelectElement;
+ new(): HTMLSelectElement;
+}
+
+interface HTMLSourceElement extends HTMLElement {
+ /**
+ * Gets or sets the intended media type of the media source.
+ */
+ media: string;
+ msKeySystem: string;
+ /**
+ * The address or URL of the a media resource that is to be considered.
+ */
+ src: string;
+ /**
+ * Gets or sets the MIME type of a media resource.
+ */
+ type: string;
+}
+
+declare var HTMLSourceElement: {
+ prototype: HTMLSourceElement;
+ new(): HTMLSourceElement;
+}
+
+interface HTMLSpanElement extends HTMLElement {
+}
+
+declare var HTMLSpanElement: {
+ prototype: HTMLSpanElement;
+ new(): HTMLSpanElement;
+}
+
+interface HTMLStyleElement extends HTMLElement, LinkStyle {
+ /**
+ * Sets or retrieves the media type.
+ */
+ media: string;
+ /**
+ * Retrieves the CSS language in which the style sheet is written.
+ */
+ type: string;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLStyleElement: {
+ prototype: HTMLStyleElement;
+ new(): HTMLStyleElement;
+}
+
+interface HTMLTableCaptionElement extends HTMLElement {
+ /**
+ * Sets or retrieves the alignment of the caption or legend.
+ */
+ align: string;
+ /**
+ * Sets or retrieves whether the caption appears at the top or bottom of the table.
+ */
+ vAlign: string;
+}
+
+declare var HTMLTableCaptionElement: {
+ prototype: HTMLTableCaptionElement;
+ new(): HTMLTableCaptionElement;
+}
+
+interface HTMLTableCellElement extends HTMLElement, HTMLTableAlignment {
+ /**
+ * Sets or retrieves abbreviated text for the object.
+ */
+ abbr: string;
+ /**
+ * Sets or retrieves how the object is aligned with adjacent text.
+ */
+ align: string;
+ /**
+ * Sets or retrieves a comma-delimited list of conceptual categories associated with the object.
+ */
+ axis: string;
+ bgColor: any;
+ /**
+ * Retrieves the position of the object in the cells collection of a row.
+ */
+ cellIndex: number;
+ /**
+ * Sets or retrieves the number columns in the table that the object should span.
+ */
+ colSpan: number;
+ /**
+ * Sets or retrieves a list of header cells that provide information for the object.
+ */
+ headers: string;
+ /**
+ * Sets or retrieves the height of the object.
+ */
+ height: any;
+ /**
+ * Sets or retrieves whether the browser automatically performs wordwrap.
+ */
+ noWrap: boolean;
+ /**
+ * Sets or retrieves how many rows in a table the cell should span.
+ */
+ rowSpan: number;
+ /**
+ * Sets or retrieves the group of cells in a table to which the object's information applies.
+ */
+ scope: string;
+ /**
+ * Sets or retrieves the width of the object.
+ */
+ width: string;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLTableCellElement: {
+ prototype: HTMLTableCellElement;
+ new(): HTMLTableCellElement;
+}
+
+interface HTMLTableColElement extends HTMLElement, HTMLTableAlignment {
+ /**
+ * Sets or retrieves the alignment of the object relative to the display or table.
+ */
+ align: string;
+ /**
+ * Sets or retrieves the number of columns in the group.
+ */
+ span: number;
+ /**
+ * Sets or retrieves the width of the object.
+ */
+ width: any;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLTableColElement: {
+ prototype: HTMLTableColElement;
+ new(): HTMLTableColElement;
+}
+
+interface HTMLTableDataCellElement extends HTMLTableCellElement {
+}
+
+declare var HTMLTableDataCellElement: {
+ prototype: HTMLTableDataCellElement;
+ new(): HTMLTableDataCellElement;
+}
+
+interface HTMLTableElement extends HTMLElement {
+ /**
+ * Sets or retrieves a value that indicates the table alignment.
+ */
+ align: string;
+ bgColor: any;
+ /**
+ * Sets or retrieves the width of the border to draw around the object.
+ */
+ border: string;
+ /**
+ * Sets or retrieves the border color of the object.
+ */
+ borderColor: any;
+ /**
+ * Retrieves the caption object of a table.
+ */
+ caption: HTMLTableCaptionElement;
+ /**
+ * Sets or retrieves the amount of space between the border of the cell and the content of the cell.
+ */
+ cellPadding: string;
+ /**
+ * Sets or retrieves the amount of space between cells in a table.
+ */
+ cellSpacing: string;
+ /**
+ * Sets or retrieves the number of columns in the table.
+ */
+ cols: number;
+ /**
+ * Sets or retrieves the way the border frame around the table is displayed.
+ */
+ frame: string;
+ /**
+ * Sets or retrieves the height of the object.
+ */
+ height: any;
+ /**
+ * Sets or retrieves the number of horizontal rows contained in the object.
+ */
+ rows: HTMLCollection;
+ /**
+ * Sets or retrieves which dividing lines (inner borders) are displayed.
+ */
+ rules: string;
+ /**
+ * Sets or retrieves a description and/or structure of the object.
+ */
+ summary: string;
+ /**
+ * Retrieves a collection of all tBody objects in the table. Objects in this collection are in source order.
+ */
+ tBodies: HTMLCollection;
+ /**
+ * Retrieves the tFoot object of the table.
+ */
+ tFoot: HTMLTableSectionElement;
+ /**
+ * Retrieves the tHead object of the table.
+ */
+ tHead: HTMLTableSectionElement;
+ /**
+ * Sets or retrieves the width of the object.
+ */
+ width: string;
+ /**
+ * Creates an empty caption element in the table.
+ */
+ createCaption(): HTMLTableCaptionElement;
+ /**
+ * Creates an empty tBody element in the table.
+ */
+ createTBody(): HTMLTableSectionElement;
+ /**
+ * Creates an empty tFoot element in the table.
+ */
+ createTFoot(): HTMLTableSectionElement;
+ /**
+ * Returns the tHead element object if successful, or null otherwise.
+ */
+ createTHead(): HTMLTableSectionElement;
+ /**
+ * Deletes the caption element and its contents from the table.
+ */
+ deleteCaption(): void;
+ /**
+ * Removes the specified row (tr) from the element and from the rows collection.
+ * @param index Number that specifies the zero-based position in the rows collection of the row to remove.
+ */
+ deleteRow(index?: number): void;
+ /**
+ * Deletes the tFoot element and its contents from the table.
+ */
+ deleteTFoot(): void;
+ /**
+ * Deletes the tHead element and its contents from the table.
+ */
+ deleteTHead(): void;
+ /**
+ * Creates a new row (tr) in the table, and adds the row to the rows collection.
+ * @param index Number that specifies where to insert the row in the rows collection. The default value is -1, which appends the new row to the end of the rows collection.
+ */
+ insertRow(index?: number): HTMLTableRowElement;
+}
+
+declare var HTMLTableElement: {
+ prototype: HTMLTableElement;
+ new(): HTMLTableElement;
+}
+
+interface HTMLTableHeaderCellElement extends HTMLTableCellElement {
+ /**
+ * Sets or retrieves the group of cells in a table to which the object's information applies.
+ */
+ scope: string;
+}
+
+declare var HTMLTableHeaderCellElement: {
+ prototype: HTMLTableHeaderCellElement;
+ new(): HTMLTableHeaderCellElement;
+}
+
+interface HTMLTableRowElement extends HTMLElement, HTMLTableAlignment {
+ /**
+ * Sets or retrieves how the object is aligned with adjacent text.
+ */
+ align: string;
+ bgColor: any;
+ /**
+ * Retrieves a collection of all cells in the table row.
+ */
+ cells: HTMLCollection;
+ /**
+ * Sets or retrieves the height of the object.
+ */
+ height: any;
+ /**
+ * Retrieves the position of the object in the rows collection for the table.
+ */
+ rowIndex: number;
+ /**
+ * Retrieves the position of the object in the collection.
+ */
+ sectionRowIndex: number;
+ /**
+ * Removes the specified cell from the table row, as well as from the cells collection.
+ * @param index Number that specifies the zero-based position of the cell to remove from the table row. If no value is provided, the last cell in the cells collection is deleted.
+ */
+ deleteCell(index?: number): void;
+ /**
+ * Creates a new cell in the table row, and adds the cell to the cells collection.
+ * @param index Number that specifies where to insert the cell in the tr. The default value is -1, which appends the new cell to the end of the cells collection.
+ */
+ insertCell(index?: number): HTMLTableCellElement;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLTableRowElement: {
+ prototype: HTMLTableRowElement;
+ new(): HTMLTableRowElement;
+}
+
+interface HTMLTableSectionElement extends HTMLElement, HTMLTableAlignment {
+ /**
+ * Sets or retrieves a value that indicates the table alignment.
+ */
+ align: string;
+ /**
+ * Sets or retrieves the number of horizontal rows contained in the object.
+ */
+ rows: HTMLCollection;
+ /**
+ * Removes the specified row (tr) from the element and from the rows collection.
+ * @param index Number that specifies the zero-based position in the rows collection of the row to remove.
+ */
+ deleteRow(index?: number): void;
+ /**
+ * Creates a new row (tr) in the table, and adds the row to the rows collection.
+ * @param index Number that specifies where to insert the row in the rows collection. The default value is -1, which appends the new row to the end of the rows collection.
+ */
+ insertRow(index?: number): HTMLTableRowElement;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLTableSectionElement: {
+ prototype: HTMLTableSectionElement;
+ new(): HTMLTableSectionElement;
+}
+
+interface HTMLTextAreaElement extends HTMLElement {
+ /**
+ * Provides a way to direct a user to a specific field when a document loads. This can provide both direction and convenience for a user, reducing the need to click or tab to a field when a page opens. This attribute is true when present on an element, and false when missing.
+ */
+ autofocus: boolean;
+ /**
+ * Sets or retrieves the width of the object.
+ */
+ cols: number;
+ /**
+ * Sets or retrieves the initial contents of the object.
+ */
+ defaultValue: string;
+ disabled: boolean;
+ /**
+ * Retrieves a reference to the form that the object is embedded in.
+ */
+ form: HTMLFormElement;
+ /**
+ * Sets or retrieves the maximum number of characters that the user can enter in a text control.
+ */
+ maxLength: number;
+ /**
+ * Sets or retrieves the name of the object.
+ */
+ name: string;
+ /**
+ * Gets or sets a text string that is displayed in an input field as a hint or prompt to users as the format or type of information they need to enter.The text appears in an input field until the user puts focus on the field.
+ */
+ placeholder: string;
+ /**
+ * Sets or retrieves the value indicated whether the content of the object is read-only.
+ */
+ readOnly: boolean;
+ /**
+ * When present, marks an element that can't be submitted without a value.
+ */
+ required: boolean;
+ /**
+ * Sets or retrieves the number of horizontal rows contained in the object.
+ */
+ rows: number;
+ /**
+ * Gets or sets the end position or offset of a text selection.
+ */
+ selectionEnd: number;
+ /**
+ * Gets or sets the starting position or offset of a text selection.
+ */
+ selectionStart: number;
+ /**
+ * Sets or retrieves the value indicating whether the control is selected.
+ */
+ status: any;
+ /**
+ * Retrieves the type of control.
+ */
+ type: string;
+ /**
+ * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting.
+ */
+ validationMessage: string;
+ /**
+ * Returns a ValidityState object that represents the validity states of an element.
+ */
+ validity: ValidityState;
+ /**
+ * Retrieves or sets the text in the entry field of the textArea element.
+ */
+ value: string;
+ /**
+ * Returns whether an element will successfully validate based on forms validation rules and constraints.
+ */
+ willValidate: boolean;
+ /**
+ * Sets or retrieves how to handle wordwrapping in the object.
+ */
+ wrap: string;
+ /**
+ * Returns whether a form will validate when it is submitted, without having to submit it.
+ */
+ checkValidity(): boolean;
+ /**
+ * Creates a TextRange object for the element.
+ */
+ createTextRange(): TextRange;
+ /**
+ * Highlights the input area of a form element.
+ */
+ select(): void;
+ /**
+ * Sets a custom error message that is displayed when a form is submitted.
+ * @param error Sets a custom error message that is displayed when a form is submitted.
+ */
+ setCustomValidity(error: string): void;
+ /**
+ * Sets the start and end positions of a selection in a text field.
+ * @param start The offset into the text field for the start of the selection.
+ * @param end The offset into the text field for the end of the selection.
+ */
+ setSelectionRange(start: number, end: number): void;
+}
+
+declare var HTMLTextAreaElement: {
+ prototype: HTMLTextAreaElement;
+ new(): HTMLTextAreaElement;
+}
+
+interface HTMLTitleElement extends HTMLElement {
+ /**
+ * Retrieves or sets the text of the object as a string.
+ */
+ text: string;
+}
+
+declare var HTMLTitleElement: {
+ prototype: HTMLTitleElement;
+ new(): HTMLTitleElement;
+}
+
+interface HTMLTrackElement extends HTMLElement {
+ default: boolean;
+ kind: string;
+ label: string;
+ readyState: number;
+ src: string;
+ srclang: string;
+ track: TextTrack;
+ ERROR: number;
+ LOADED: number;
+ LOADING: number;
+ NONE: number;
+}
+
+declare var HTMLTrackElement: {
+ prototype: HTMLTrackElement;
+ new(): HTMLTrackElement;
+ ERROR: number;
+ LOADED: number;
+ LOADING: number;
+ NONE: number;
+}
+
+interface HTMLUListElement extends HTMLElement {
+ compact: boolean;
+ type: string;
+}
+
+declare var HTMLUListElement: {
+ prototype: HTMLUListElement;
+ new(): HTMLUListElement;
+}
+
+interface HTMLUnknownElement extends HTMLElement {
+}
+
+declare var HTMLUnknownElement: {
+ prototype: HTMLUnknownElement;
+ new(): HTMLUnknownElement;
+}
+
+interface HTMLVideoElement extends HTMLMediaElement {
+ /**
+ * Gets or sets the height of the video element.
+ */
+ height: number;
+ msHorizontalMirror: boolean;
+ msIsLayoutOptimalForPlayback: boolean;
+ msIsStereo3D: boolean;
+ msStereo3DPackingMode: string;
+ msStereo3DRenderMode: string;
+ msZoom: boolean;
+ onMSVideoFormatChanged: (ev: Event) => any;
+ onMSVideoFrameStepCompleted: (ev: Event) => any;
+ onMSVideoOptimalLayoutChanged: (ev: Event) => any;
+ /**
+ * Gets or sets a URL of an image to display, for example, like a movie poster. This can be a still frame from the video, or another image if no video data is available.
+ */
+ poster: string;
+ /**
+ * Gets the intrinsic height of a video in CSS pixels, or zero if the dimensions are not known.
+ */
+ videoHeight: number;
+ /**
+ * Gets the intrinsic width of a video in CSS pixels, or zero if the dimensions are not known.
+ */
+ videoWidth: number;
+ webkitDisplayingFullscreen: boolean;
+ webkitSupportsFullscreen: boolean;
+ /**
+ * Gets or sets the width of the video element.
+ */
+ width: number;
+ getVideoPlaybackQuality(): VideoPlaybackQuality;
+ msFrameStep(forward: boolean): void;
+ msInsertVideoEffect(activatableClassId: string, effectRequired: boolean, config?: any): void;
+ msSetVideoRectangle(left: number, top: number, right: number, bottom: number): void;
+ webkitEnterFullScreen(): void;
+ webkitEnterFullscreen(): void;
+ webkitExitFullScreen(): void;
+ webkitExitFullscreen(): void;
+ addEventListener(type: "MSContentZoom", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureChange", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureDoubleTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureEnd", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureHold", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGotPointerCapture", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSInertiaStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSLostPointerCapture", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSManipulationStateChanged", listener: (ev: MSManipulationEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerCancel", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerDown", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerEnter", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerLeave", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerMove", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerOut", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerOver", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerUp", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSVideoFormatChanged", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSVideoFrameStepCompleted", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSVideoOptimalLayoutChanged", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "abort", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "activate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "ariarequest", listener: (ev: AriaRequestEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "beforeactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "beforecopy", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "beforecut", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "beforedeactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "beforepaste", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "blur", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "canplay", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "canplaythrough", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "change", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "click", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "command", listener: (ev: CommandEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "contextmenu", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "copy", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "cuechange", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "cut", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dblclick", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "deactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "drag", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dragend", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dragenter", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dragleave", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dragover", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dragstart", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "drop", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "durationchange", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "emptied", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "ended", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "focus", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "gotpointercapture", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "input", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "keydown", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "keypress", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "keyup", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "loadeddata", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "loadedmetadata", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "loadstart", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "lostpointercapture", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mousedown", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseenter", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseleave", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mousemove", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseout", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseover", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseup", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mousewheel", listener: (ev: MouseWheelEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "msneedkey", listener: (ev: MSMediaKeyNeededEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "paste", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pause", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "play", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "playing", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointercancel", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerdown", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerenter", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerleave", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointermove", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerout", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerover", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerup", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "progress", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "ratechange", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "reset", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "scroll", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "seeked", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "seeking", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "select", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "selectstart", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "stalled", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "submit", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "suspend", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "timeupdate", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "touchcancel", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "touchend", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "touchmove", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "touchstart", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "volumechange", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "waiting", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "webkitfullscreenchange", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "webkitfullscreenerror", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "wheel", listener: (ev: WheelEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var HTMLVideoElement: {
+ prototype: HTMLVideoElement;
+ new(): HTMLVideoElement;
+}
+
+interface HashChangeEvent extends Event {
+ newURL: string;
+ oldURL: string;
+}
+
+declare var HashChangeEvent: {
+ prototype: HashChangeEvent;
+ new(type: string, eventInitDict?: HashChangeEventInit): HashChangeEvent;
+}
+
+interface History {
+ length: number;
+ state: any;
+ back(distance?: any): void;
+ forward(distance?: any): void;
+ go(delta?: any): void;
+ pushState(statedata: any, title?: string, url?: string): void;
+ replaceState(statedata: any, title?: string, url?: string): void;
+}
+
+declare var History: {
+ prototype: History;
+ new(): History;
+}
+
+interface IDBCursor {
+ direction: string;
+ key: any;
+ primaryKey: any;
+ source: any;
+ advance(count: number): void;
+ continue(key?: any): void;
+ delete(): IDBRequest;
+ update(value: any): IDBRequest;
+ NEXT: string;
+ NEXT_NO_DUPLICATE: string;
+ PREV: string;
+ PREV_NO_DUPLICATE: string;
+}
+
+declare var IDBCursor: {
+ prototype: IDBCursor;
+ new(): IDBCursor;
+ NEXT: string;
+ NEXT_NO_DUPLICATE: string;
+ PREV: string;
+ PREV_NO_DUPLICATE: string;
+}
+
+interface IDBCursorWithValue extends IDBCursor {
+ value: any;
+}
+
+declare var IDBCursorWithValue: {
+ prototype: IDBCursorWithValue;
+ new(): IDBCursorWithValue;
+}
+
+interface IDBDatabase extends EventTarget {
+ name: string;
+ objectStoreNames: DOMStringList;
+ onabort: (ev: Event) => any;
+ onerror: (ev: Event) => any;
+ version: string;
+ close(): void;
+ createObjectStore(name: string, optionalParameters?: IDBObjectStoreParameters): IDBObjectStore;
+ deleteObjectStore(name: string): void;
+ transaction(storeNames: any, mode?: string): IDBTransaction;
+ addEventListener(type: "abort", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var IDBDatabase: {
+ prototype: IDBDatabase;
+ new(): IDBDatabase;
+}
+
+interface IDBFactory {
+ cmp(first: any, second: any): number;
+ deleteDatabase(name: string): IDBOpenDBRequest;
+ open(name: string, version?: number): IDBOpenDBRequest;
+}
+
+declare var IDBFactory: {
+ prototype: IDBFactory;
+ new(): IDBFactory;
+}
+
+interface IDBIndex {
+ keyPath: string | string[];
+ name: string;
+ objectStore: IDBObjectStore;
+ unique: boolean;
+ multiEntry: boolean;
+ count(key?: any): IDBRequest;
+ get(key: any): IDBRequest;
+ getKey(key: any): IDBRequest;
+ openCursor(range?: IDBKeyRange, direction?: string): IDBRequest;
+ openKeyCursor(range?: IDBKeyRange, direction?: string): IDBRequest;
+}
+
+declare var IDBIndex: {
+ prototype: IDBIndex;
+ new(): IDBIndex;
+}
+
+interface IDBKeyRange {
+ lower: any;
+ lowerOpen: boolean;
+ upper: any;
+ upperOpen: boolean;
+}
+
+declare var IDBKeyRange: {
+ prototype: IDBKeyRange;
+ new(): IDBKeyRange;
+ bound(lower: any, upper: any, lowerOpen?: boolean, upperOpen?: boolean): IDBKeyRange;
+ lowerBound(bound: any, open?: boolean): IDBKeyRange;
+ only(value: any): IDBKeyRange;
+ upperBound(bound: any, open?: boolean): IDBKeyRange;
+}
+
+interface IDBObjectStore {
+ indexNames: DOMStringList;
+ keyPath: string;
+ name: string;
+ transaction: IDBTransaction;
+ add(value: any, key?: any): IDBRequest;
+ clear(): IDBRequest;
+ count(key?: any): IDBRequest;
+ createIndex(name: string, keyPath: string | string[], optionalParameters?: IDBIndexParameters): IDBIndex;
+ delete(key: any): IDBRequest;
+ deleteIndex(indexName: string): void;
+ get(key: any): IDBRequest;
+ index(name: string): IDBIndex;
+ openCursor(range?: any, direction?: string): IDBRequest;
+ put(value: any, key?: any): IDBRequest;
+}
+
+declare var IDBObjectStore: {
+ prototype: IDBObjectStore;
+ new(): IDBObjectStore;
+}
+
+interface IDBOpenDBRequest extends IDBRequest {
+ onblocked: (ev: Event) => any;
+ onupgradeneeded: (ev: IDBVersionChangeEvent) => any;
+ addEventListener(type: "blocked", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "success", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "upgradeneeded", listener: (ev: IDBVersionChangeEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var IDBOpenDBRequest: {
+ prototype: IDBOpenDBRequest;
+ new(): IDBOpenDBRequest;
+}
+
+interface IDBRequest extends EventTarget {
+ error: DOMError;
+ onerror: (ev: Event) => any;
+ onsuccess: (ev: Event) => any;
+ readyState: string;
+ result: any;
+ source: any;
+ transaction: IDBTransaction;
+ addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "success", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var IDBRequest: {
+ prototype: IDBRequest;
+ new(): IDBRequest;
+}
+
+interface IDBTransaction extends EventTarget {
+ db: IDBDatabase;
+ error: DOMError;
+ mode: string;
+ onabort: (ev: Event) => any;
+ oncomplete: (ev: Event) => any;
+ onerror: (ev: Event) => any;
+ abort(): void;
+ objectStore(name: string): IDBObjectStore;
+ READ_ONLY: string;
+ READ_WRITE: string;
+ VERSION_CHANGE: string;
+ addEventListener(type: "abort", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "complete", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var IDBTransaction: {
+ prototype: IDBTransaction;
+ new(): IDBTransaction;
+ READ_ONLY: string;
+ READ_WRITE: string;
+ VERSION_CHANGE: string;
+}
+
+interface IDBVersionChangeEvent extends Event {
+ newVersion: number;
+ oldVersion: number;
+}
+
+declare var IDBVersionChangeEvent: {
+ prototype: IDBVersionChangeEvent;
+ new(): IDBVersionChangeEvent;
+}
+
+interface ImageData {
+ data: Uint8ClampedArray;
+ height: number;
+ width: number;
+}
+
+declare var ImageData: {
+ prototype: ImageData;
+ new(width: number, height: number): ImageData;
+ new(array: Uint8ClampedArray, width: number, height: number): ImageData;
+}
+
+interface KeyboardEvent extends UIEvent {
+ altKey: boolean;
+ char: string;
+ charCode: number;
+ ctrlKey: boolean;
+ key: string;
+ keyCode: number;
+ locale: string;
+ location: number;
+ metaKey: boolean;
+ repeat: boolean;
+ shiftKey: boolean;
+ which: number;
+ getModifierState(keyArg: string): boolean;
+ initKeyboardEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, keyArg: string, locationArg: number, modifiersListArg: string, repeat: boolean, locale: string): void;
+ DOM_KEY_LOCATION_JOYSTICK: number;
+ DOM_KEY_LOCATION_LEFT: number;
+ DOM_KEY_LOCATION_MOBILE: number;
+ DOM_KEY_LOCATION_NUMPAD: number;
+ DOM_KEY_LOCATION_RIGHT: number;
+ DOM_KEY_LOCATION_STANDARD: number;
+}
+
+declare var KeyboardEvent: {
+ prototype: KeyboardEvent;
+ new(typeArg: string, eventInitDict?: KeyboardEventInit): KeyboardEvent;
+ DOM_KEY_LOCATION_JOYSTICK: number;
+ DOM_KEY_LOCATION_LEFT: number;
+ DOM_KEY_LOCATION_MOBILE: number;
+ DOM_KEY_LOCATION_NUMPAD: number;
+ DOM_KEY_LOCATION_RIGHT: number;
+ DOM_KEY_LOCATION_STANDARD: number;
+}
+
+interface Location {
+ hash: string;
+ host: string;
+ hostname: string;
+ href: string;
+ origin: string;
+ pathname: string;
+ port: string;
+ protocol: string;
+ search: string;
+ assign(url: string): void;
+ reload(forcedReload?: boolean): void;
+ replace(url: string): void;
+ toString(): string;
+}
+
+declare var Location: {
+ prototype: Location;
+ new(): Location;
+}
+
+interface LongRunningScriptDetectedEvent extends Event {
+ executionTime: number;
+ stopPageScriptExecution: boolean;
+}
+
+declare var LongRunningScriptDetectedEvent: {
+ prototype: LongRunningScriptDetectedEvent;
+ new(): LongRunningScriptDetectedEvent;
+}
+
+interface MSApp {
+ clearTemporaryWebDataAsync(): MSAppAsyncOperation;
+ createBlobFromRandomAccessStream(type: string, seeker: any): Blob;
+ createDataPackage(object: any): any;
+ createDataPackageFromSelection(): any;
+ createFileFromStorageFile(storageFile: any): File;
+ createStreamFromInputStream(type: string, inputStream: any): MSStream;
+ execAsyncAtPriority(asynchronousCallback: MSExecAtPriorityFunctionCallback, priority: string, ...args: any[]): void;
+ execAtPriority(synchronousCallback: MSExecAtPriorityFunctionCallback, priority: string, ...args: any[]): any;
+ getCurrentPriority(): string;
+ getHtmlPrintDocumentSourceAsync(htmlDoc: any): any;
+ getViewId(view: any): any;
+ isTaskScheduledAtPriorityOrHigher(priority: string): boolean;
+ pageHandlesAllApplicationActivations(enabled: boolean): void;
+ suppressSubdownloadCredentialPrompts(suppress: boolean): void;
+ terminateApp(exceptionObject: any): void;
+ CURRENT: string;
+ HIGH: string;
+ IDLE: string;
+ NORMAL: string;
+}
+declare var MSApp: MSApp;
+
+interface MSAppAsyncOperation extends EventTarget {
+ error: DOMError;
+ oncomplete: (ev: Event) => any;
+ onerror: (ev: Event) => any;
+ readyState: number;
+ result: any;
+ start(): void;
+ COMPLETED: number;
+ ERROR: number;
+ STARTED: number;
+ addEventListener(type: "complete", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var MSAppAsyncOperation: {
+ prototype: MSAppAsyncOperation;
+ new(): MSAppAsyncOperation;
+ COMPLETED: number;
+ ERROR: number;
+ STARTED: number;
+}
+
+interface MSBlobBuilder {
+ append(data: any, endings?: string): void;
+ getBlob(contentType?: string): Blob;
+}
+
+declare var MSBlobBuilder: {
+ prototype: MSBlobBuilder;
+ new(): MSBlobBuilder;
+}
+
+interface MSCSSMatrix {
+ a: number;
+ b: number;
+ c: number;
+ d: number;
+ e: number;
+ f: number;
+ m11: number;
+ m12: number;
+ m13: number;
+ m14: number;
+ m21: number;
+ m22: number;
+ m23: number;
+ m24: number;
+ m31: number;
+ m32: number;
+ m33: number;
+ m34: number;
+ m41: number;
+ m42: number;
+ m43: number;
+ m44: number;
+ inverse(): MSCSSMatrix;
+ multiply(secondMatrix: MSCSSMatrix): MSCSSMatrix;
+ rotate(angleX: number, angleY?: number, angleZ?: number): MSCSSMatrix;
+ rotateAxisAngle(x: number, y: number, z: number, angle: number): MSCSSMatrix;
+ scale(scaleX: number, scaleY?: number, scaleZ?: number): MSCSSMatrix;
+ setMatrixValue(value: string): void;
+ skewX(angle: number): MSCSSMatrix;
+ skewY(angle: number): MSCSSMatrix;
+ toString(): string;
+ translate(x: number, y: number, z?: number): MSCSSMatrix;
+}
+
+declare var MSCSSMatrix: {
+ prototype: MSCSSMatrix;
+ new(text?: string): MSCSSMatrix;
+}
+
+interface MSGesture {
+ target: Element;
+ addPointer(pointerId: number): void;
+ stop(): void;
+}
+
+declare var MSGesture: {
+ prototype: MSGesture;
+ new(): MSGesture;
+}
+
+interface MSGestureEvent extends UIEvent {
+ clientX: number;
+ clientY: number;
+ expansion: number;
+ gestureObject: any;
+ hwTimestamp: number;
+ offsetX: number;
+ offsetY: number;
+ rotation: number;
+ scale: number;
+ screenX: number;
+ screenY: number;
+ translationX: number;
+ translationY: number;
+ velocityAngular: number;
+ velocityExpansion: number;
+ velocityX: number;
+ velocityY: number;
+ initGestureEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, offsetXArg: number, offsetYArg: number, translationXArg: number, translationYArg: number, scaleArg: number, expansionArg: number, rotationArg: number, velocityXArg: number, velocityYArg: number, velocityExpansionArg: number, velocityAngularArg: number, hwTimestampArg: number): void;
+ MSGESTURE_FLAG_BEGIN: number;
+ MSGESTURE_FLAG_CANCEL: number;
+ MSGESTURE_FLAG_END: number;
+ MSGESTURE_FLAG_INERTIA: number;
+ MSGESTURE_FLAG_NONE: number;
+}
+
+declare var MSGestureEvent: {
+ prototype: MSGestureEvent;
+ new(): MSGestureEvent;
+ MSGESTURE_FLAG_BEGIN: number;
+ MSGESTURE_FLAG_CANCEL: number;
+ MSGESTURE_FLAG_END: number;
+ MSGESTURE_FLAG_INERTIA: number;
+ MSGESTURE_FLAG_NONE: number;
+}
+
+interface MSGraphicsTrust {
+ constrictionActive: boolean;
+ status: string;
+}
+
+declare var MSGraphicsTrust: {
+ prototype: MSGraphicsTrust;
+ new(): MSGraphicsTrust;
+}
+
+interface MSHTMLWebViewElement extends HTMLElement {
+ canGoBack: boolean;
+ canGoForward: boolean;
+ containsFullScreenElement: boolean;
+ documentTitle: string;
+ height: number;
+ settings: MSWebViewSettings;
+ src: string;
+ width: number;
+ addWebAllowedObject(name: string, applicationObject: any): void;
+ buildLocalStreamUri(contentIdentifier: string, relativePath: string): string;
+ capturePreviewToBlobAsync(): MSWebViewAsyncOperation;
+ captureSelectedContentToDataPackageAsync(): MSWebViewAsyncOperation;
+ getDeferredPermissionRequestById(id: number): DeferredPermissionRequest;
+ getDeferredPermissionRequests(): DeferredPermissionRequest[];
+ goBack(): void;
+ goForward(): void;
+ invokeScriptAsync(scriptName: string, ...args: any[]): MSWebViewAsyncOperation;
+ navigate(uri: string): void;
+ navigateToLocalStreamUri(source: string, streamResolver: any): void;
+ navigateToString(contents: string): void;
+ navigateWithHttpRequestMessage(requestMessage: any): void;
+ refresh(): void;
+ stop(): void;
+}
+
+declare var MSHTMLWebViewElement: {
+ prototype: MSHTMLWebViewElement;
+ new(): MSHTMLWebViewElement;
+}
+
+interface MSInputMethodContext extends EventTarget {
+ compositionEndOffset: number;
+ compositionStartOffset: number;
+ oncandidatewindowhide: (ev: Event) => any;
+ oncandidatewindowshow: (ev: Event) => any;
+ oncandidatewindowupdate: (ev: Event) => any;
+ target: HTMLElement;
+ getCandidateWindowClientRect(): ClientRect;
+ getCompositionAlternatives(): string[];
+ hasComposition(): boolean;
+ isCandidateWindowVisible(): boolean;
+ addEventListener(type: "MSCandidateWindowHide", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSCandidateWindowShow", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSCandidateWindowUpdate", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var MSInputMethodContext: {
+ prototype: MSInputMethodContext;
+ new(): MSInputMethodContext;
+}
+
+interface MSManipulationEvent extends UIEvent {
+ currentState: number;
+ inertiaDestinationX: number;
+ inertiaDestinationY: number;
+ lastState: number;
+ initMSManipulationEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, lastState: number, currentState: number): void;
+ MS_MANIPULATION_STATE_ACTIVE: number;
+ MS_MANIPULATION_STATE_CANCELLED: number;
+ MS_MANIPULATION_STATE_COMMITTED: number;
+ MS_MANIPULATION_STATE_DRAGGING: number;
+ MS_MANIPULATION_STATE_INERTIA: number;
+ MS_MANIPULATION_STATE_PRESELECT: number;
+ MS_MANIPULATION_STATE_SELECTING: number;
+ MS_MANIPULATION_STATE_STOPPED: number;
+}
+
+declare var MSManipulationEvent: {
+ prototype: MSManipulationEvent;
+ new(): MSManipulationEvent;
+ MS_MANIPULATION_STATE_ACTIVE: number;
+ MS_MANIPULATION_STATE_CANCELLED: number;
+ MS_MANIPULATION_STATE_COMMITTED: number;
+ MS_MANIPULATION_STATE_DRAGGING: number;
+ MS_MANIPULATION_STATE_INERTIA: number;
+ MS_MANIPULATION_STATE_PRESELECT: number;
+ MS_MANIPULATION_STATE_SELECTING: number;
+ MS_MANIPULATION_STATE_STOPPED: number;
+}
+
+interface MSMediaKeyError {
+ code: number;
+ systemCode: number;
+ MS_MEDIA_KEYERR_CLIENT: number;
+ MS_MEDIA_KEYERR_DOMAIN: number;
+ MS_MEDIA_KEYERR_HARDWARECHANGE: number;
+ MS_MEDIA_KEYERR_OUTPUT: number;
+ MS_MEDIA_KEYERR_SERVICE: number;
+ MS_MEDIA_KEYERR_UNKNOWN: number;
+}
+
+declare var MSMediaKeyError: {
+ prototype: MSMediaKeyError;
+ new(): MSMediaKeyError;
+ MS_MEDIA_KEYERR_CLIENT: number;
+ MS_MEDIA_KEYERR_DOMAIN: number;
+ MS_MEDIA_KEYERR_HARDWARECHANGE: number;
+ MS_MEDIA_KEYERR_OUTPUT: number;
+ MS_MEDIA_KEYERR_SERVICE: number;
+ MS_MEDIA_KEYERR_UNKNOWN: number;
+}
+
+interface MSMediaKeyMessageEvent extends Event {
+ destinationURL: string;
+ message: Uint8Array;
+}
+
+declare var MSMediaKeyMessageEvent: {
+ prototype: MSMediaKeyMessageEvent;
+ new(): MSMediaKeyMessageEvent;
+}
+
+interface MSMediaKeyNeededEvent extends Event {
+ initData: Uint8Array;
+}
+
+declare var MSMediaKeyNeededEvent: {
+ prototype: MSMediaKeyNeededEvent;
+ new(): MSMediaKeyNeededEvent;
+}
+
+interface MSMediaKeySession extends EventTarget {
+ error: MSMediaKeyError;
+ keySystem: string;
+ sessionId: string;
+ close(): void;
+ update(key: Uint8Array): void;
+}
+
+declare var MSMediaKeySession: {
+ prototype: MSMediaKeySession;
+ new(): MSMediaKeySession;
+}
+
+interface MSMediaKeys {
+ keySystem: string;
+ createSession(type: string, initData: Uint8Array, cdmData?: Uint8Array): MSMediaKeySession;
+}
+
+declare var MSMediaKeys: {
+ prototype: MSMediaKeys;
+ new(keySystem: string): MSMediaKeys;
+ isTypeSupported(keySystem: string, type?: string): boolean;
+}
+
+interface MSMimeTypesCollection {
+ length: number;
+}
+
+declare var MSMimeTypesCollection: {
+ prototype: MSMimeTypesCollection;
+ new(): MSMimeTypesCollection;
+}
+
+interface MSPluginsCollection {
+ length: number;
+ refresh(reload?: boolean): void;
+}
+
+declare var MSPluginsCollection: {
+ prototype: MSPluginsCollection;
+ new(): MSPluginsCollection;
+}
+
+interface MSPointerEvent extends MouseEvent {
+ currentPoint: any;
+ height: number;
+ hwTimestamp: number;
+ intermediatePoints: any;
+ isPrimary: boolean;
+ pointerId: number;
+ pointerType: any;
+ pressure: number;
+ rotation: number;
+ tiltX: number;
+ tiltY: number;
+ width: number;
+ getCurrentPoint(element: Element): void;
+ getIntermediatePoints(element: Element): void;
+ initPointerEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, ctrlKeyArg: boolean, altKeyArg: boolean, shiftKeyArg: boolean, metaKeyArg: boolean, buttonArg: number, relatedTargetArg: EventTarget, offsetXArg: number, offsetYArg: number, widthArg: number, heightArg: number, pressure: number, rotation: number, tiltX: number, tiltY: number, pointerIdArg: number, pointerType: any, hwTimestampArg: number, isPrimary: boolean): void;
+}
+
+declare var MSPointerEvent: {
+ prototype: MSPointerEvent;
+ new(typeArg: string, eventInitDict?: PointerEventInit): MSPointerEvent;
+}
+
+interface MSRangeCollection {
+ length: number;
+ item(index: number): Range;
+ [index: number]: Range;
+}
+
+declare var MSRangeCollection: {
+ prototype: MSRangeCollection;
+ new(): MSRangeCollection;
+}
+
+interface MSSiteModeEvent extends Event {
+ actionURL: string;
+ buttonID: number;
+}
+
+declare var MSSiteModeEvent: {
+ prototype: MSSiteModeEvent;
+ new(): MSSiteModeEvent;
+}
+
+interface MSStream {
+ type: string;
+ msClose(): void;
+ msDetachStream(): any;
+}
+
+declare var MSStream: {
+ prototype: MSStream;
+ new(): MSStream;
+}
+
+interface MSStreamReader extends EventTarget, MSBaseReader {
+ error: DOMError;
+ readAsArrayBuffer(stream: MSStream, size?: number): void;
+ readAsBinaryString(stream: MSStream, size?: number): void;
+ readAsBlob(stream: MSStream, size?: number): void;
+ readAsDataURL(stream: MSStream, size?: number): void;
+ readAsText(stream: MSStream, encoding?: string, size?: number): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var MSStreamReader: {
+ prototype: MSStreamReader;
+ new(): MSStreamReader;
+}
+
+interface MSWebViewAsyncOperation extends EventTarget {
+ error: DOMError;
+ oncomplete: (ev: Event) => any;
+ onerror: (ev: Event) => any;
+ readyState: number;
+ result: any;
+ target: MSHTMLWebViewElement;
+ type: number;
+ start(): void;
+ COMPLETED: number;
+ ERROR: number;
+ STARTED: number;
+ TYPE_CAPTURE_PREVIEW_TO_RANDOM_ACCESS_STREAM: number;
+ TYPE_CREATE_DATA_PACKAGE_FROM_SELECTION: number;
+ TYPE_INVOKE_SCRIPT: number;
+ addEventListener(type: "complete", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var MSWebViewAsyncOperation: {
+ prototype: MSWebViewAsyncOperation;
+ new(): MSWebViewAsyncOperation;
+ COMPLETED: number;
+ ERROR: number;
+ STARTED: number;
+ TYPE_CAPTURE_PREVIEW_TO_RANDOM_ACCESS_STREAM: number;
+ TYPE_CREATE_DATA_PACKAGE_FROM_SELECTION: number;
+ TYPE_INVOKE_SCRIPT: number;
+}
+
+interface MSWebViewSettings {
+ isIndexedDBEnabled: boolean;
+ isJavaScriptEnabled: boolean;
+}
+
+declare var MSWebViewSettings: {
+ prototype: MSWebViewSettings;
+ new(): MSWebViewSettings;
+}
+
+interface MediaElementAudioSourceNode extends AudioNode {
+}
+
+declare var MediaElementAudioSourceNode: {
+ prototype: MediaElementAudioSourceNode;
+ new(): MediaElementAudioSourceNode;
+}
+
+interface MediaError {
+ code: number;
+ msExtendedCode: number;
+ MEDIA_ERR_ABORTED: number;
+ MEDIA_ERR_DECODE: number;
+ MEDIA_ERR_NETWORK: number;
+ MEDIA_ERR_SRC_NOT_SUPPORTED: number;
+ MS_MEDIA_ERR_ENCRYPTED: number;
+}
+
+declare var MediaError: {
+ prototype: MediaError;
+ new(): MediaError;
+ MEDIA_ERR_ABORTED: number;
+ MEDIA_ERR_DECODE: number;
+ MEDIA_ERR_NETWORK: number;
+ MEDIA_ERR_SRC_NOT_SUPPORTED: number;
+ MS_MEDIA_ERR_ENCRYPTED: number;
+}
+
+interface MediaList {
+ length: number;
+ mediaText: string;
+ appendMedium(newMedium: string): void;
+ deleteMedium(oldMedium: string): void;
+ item(index: number): string;
+ toString(): string;
+ [index: number]: string;
+}
+
+declare var MediaList: {
+ prototype: MediaList;
+ new(): MediaList;
+}
+
+interface MediaQueryList {
+ matches: boolean;
+ media: string;
+ addListener(listener: MediaQueryListListener): void;
+ removeListener(listener: MediaQueryListListener): void;
+}
+
+declare var MediaQueryList: {
+ prototype: MediaQueryList;
+ new(): MediaQueryList;
+}
+
+interface MediaSource extends EventTarget {
+ activeSourceBuffers: SourceBufferList;
+ duration: number;
+ readyState: number;
+ sourceBuffers: SourceBufferList;
+ addSourceBuffer(type: string): SourceBuffer;
+ endOfStream(error?: number): void;
+ removeSourceBuffer(sourceBuffer: SourceBuffer): void;
+}
+
+declare var MediaSource: {
+ prototype: MediaSource;
+ new(): MediaSource;
+ isTypeSupported(type: string): boolean;
+}
+
+interface MessageChannel {
+ port1: MessagePort;
+ port2: MessagePort;
+}
+
+declare var MessageChannel: {
+ prototype: MessageChannel;
+ new(): MessageChannel;
+}
+
+interface MessageEvent extends Event {
+ data: any;
+ origin: string;
+ ports: any;
+ source: Window;
+ initMessageEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, dataArg: any, originArg: string, lastEventIdArg: string, sourceArg: Window): void;
+}
+
+declare var MessageEvent: {
+ prototype: MessageEvent;
+ new(type: string, eventInitDict?: MessageEventInit): MessageEvent;
+}
+
+interface MessagePort extends EventTarget {
+ onmessage: (ev: MessageEvent) => any;
+ close(): void;
+ postMessage(message?: any, ports?: any): void;
+ start(): void;
+ addEventListener(type: "message", listener: (ev: MessageEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var MessagePort: {
+ prototype: MessagePort;
+ new(): MessagePort;
+}
+
+interface MimeType {
+ description: string;
+ enabledPlugin: Plugin;
+ suffixes: string;
+ type: string;
+}
+
+declare var MimeType: {
+ prototype: MimeType;
+ new(): MimeType;
+}
+
+interface MimeTypeArray {
+ length: number;
+ item(index: number): Plugin;
+ namedItem(type: string): Plugin;
+ [index: number]: Plugin;
+}
+
+declare var MimeTypeArray: {
+ prototype: MimeTypeArray;
+ new(): MimeTypeArray;
+}
+
+interface MouseEvent extends UIEvent {
+ altKey: boolean;
+ button: number;
+ buttons: number;
+ clientX: number;
+ clientY: number;
+ ctrlKey: boolean;
+ fromElement: Element;
+ layerX: number;
+ layerY: number;
+ metaKey: boolean;
+ movementX: number;
+ movementY: number;
+ offsetX: number;
+ offsetY: number;
+ pageX: number;
+ pageY: number;
+ relatedTarget: EventTarget;
+ screenX: number;
+ screenY: number;
+ shiftKey: boolean;
+ toElement: Element;
+ which: number;
+ x: number;
+ y: number;
+ getModifierState(keyArg: string): boolean;
+ initMouseEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, ctrlKeyArg: boolean, altKeyArg: boolean, shiftKeyArg: boolean, metaKeyArg: boolean, buttonArg: number, relatedTargetArg: EventTarget): void;
+}
+
+declare var MouseEvent: {
+ prototype: MouseEvent;
+ new(typeArg: string, eventInitDict?: MouseEventInit): MouseEvent;
+}
+
+interface MouseWheelEvent extends MouseEvent {
+ wheelDelta: number;
+ wheelDeltaX: number;
+ wheelDeltaY: number;
+ initMouseWheelEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, buttonArg: number, relatedTargetArg: EventTarget, modifiersListArg: string, wheelDeltaArg: number): void;
+}
+
+declare var MouseWheelEvent: {
+ prototype: MouseWheelEvent;
+ new(): MouseWheelEvent;
+}
+
+interface MutationEvent extends Event {
+ attrChange: number;
+ attrName: string;
+ newValue: string;
+ prevValue: string;
+ relatedNode: Node;
+ initMutationEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, relatedNodeArg: Node, prevValueArg: string, newValueArg: string, attrNameArg: string, attrChangeArg: number): void;
+ ADDITION: number;
+ MODIFICATION: number;
+ REMOVAL: number;
+}
+
+declare var MutationEvent: {
+ prototype: MutationEvent;
+ new(): MutationEvent;
+ ADDITION: number;
+ MODIFICATION: number;
+ REMOVAL: number;
+}
+
+interface MutationObserver {
+ disconnect(): void;
+ observe(target: Node, options: MutationObserverInit): void;
+ takeRecords(): MutationRecord[];
+}
+
+declare var MutationObserver: {
+ prototype: MutationObserver;
+ new(callback: MutationCallback): MutationObserver;
+}
+
+interface MutationRecord {
+ addedNodes: NodeList;
+ attributeName: string;
+ attributeNamespace: string;
+ nextSibling: Node;
+ oldValue: string;
+ previousSibling: Node;
+ removedNodes: NodeList;
+ target: Node;
+ type: string;
+}
+
+declare var MutationRecord: {
+ prototype: MutationRecord;
+ new(): MutationRecord;
+}
+
+interface NamedNodeMap {
+ length: number;
+ getNamedItem(name: string): Attr;
+ getNamedItemNS(namespaceURI: string, localName: string): Attr;
+ item(index: number): Attr;
+ removeNamedItem(name: string): Attr;
+ removeNamedItemNS(namespaceURI: string, localName: string): Attr;
+ setNamedItem(arg: Attr): Attr;
+ setNamedItemNS(arg: Attr): Attr;
+ [index: number]: Attr;
+}
+
+declare var NamedNodeMap: {
+ prototype: NamedNodeMap;
+ new(): NamedNodeMap;
+}
+
+interface NavigationCompletedEvent extends NavigationEvent {
+ isSuccess: boolean;
+ webErrorStatus: number;
+}
+
+declare var NavigationCompletedEvent: {
+ prototype: NavigationCompletedEvent;
+ new(): NavigationCompletedEvent;
+}
+
+interface NavigationEvent extends Event {
+ uri: string;
+}
+
+declare var NavigationEvent: {
+ prototype: NavigationEvent;
+ new(): NavigationEvent;
+}
+
+interface NavigationEventWithReferrer extends NavigationEvent {
+ referer: string;
+}
+
+declare var NavigationEventWithReferrer: {
+ prototype: NavigationEventWithReferrer;
+ new(): NavigationEventWithReferrer;
+}
+
+interface Navigator extends Object, NavigatorID, NavigatorOnLine, NavigatorContentUtils, NavigatorStorageUtils, NavigatorGeolocation, MSNavigatorDoNotTrack, MSFileSaver {
+ appCodeName: string;
+ appMinorVersion: string;
+ browserLanguage: string;
+ connectionSpeed: number;
+ cookieEnabled: boolean;
+ cpuClass: string;
+ language: string;
+ maxTouchPoints: number;
+ mimeTypes: MSMimeTypesCollection;
+ msManipulationViewsEnabled: boolean;
+ msMaxTouchPoints: number;
+ msPointerEnabled: boolean;
+ plugins: MSPluginsCollection;
+ pointerEnabled: boolean;
+ systemLanguage: string;
+ userLanguage: string;
+ webdriver: boolean;
+ getGamepads(): Gamepad[];
+ javaEnabled(): boolean;
+ msLaunchUri(uri: string, successCallback?: MSLaunchUriCallback, noHandlerCallback?: MSLaunchUriCallback): void;
+ vibrate(pattern: number | number[]): boolean;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var Navigator: {
+ prototype: Navigator;
+ new(): Navigator;
+}
+
+interface Node extends EventTarget {
+ attributes: NamedNodeMap;
+ baseURI: string;
+ childNodes: NodeList;
+ firstChild: Node;
+ lastChild: Node;
+ localName: string;
+ namespaceURI: string;
+ nextSibling: Node;
+ nodeName: string;
+ nodeType: number;
+ nodeValue: string;
+ ownerDocument: Document;
+ parentElement: HTMLElement;
+ parentNode: Node;
+ prefix: string;
+ previousSibling: Node;
+ textContent: string;
+ appendChild(newChild: Node): Node;
+ cloneNode(deep?: boolean): Node;
+ compareDocumentPosition(other: Node): number;
+ hasAttributes(): boolean;
+ hasChildNodes(): boolean;
+ insertBefore(newChild: Node, refChild?: Node): Node;
+ isDefaultNamespace(namespaceURI: string): boolean;
+ isEqualNode(arg: Node): boolean;
+ isSameNode(other: Node): boolean;
+ lookupNamespaceURI(prefix: string): string;
+ lookupPrefix(namespaceURI: string): string;
+ normalize(): void;
+ removeChild(oldChild: Node): Node;
+ replaceChild(newChild: Node, oldChild: Node): Node;
+ contains(node: Node): boolean;
+ ATTRIBUTE_NODE: number;
+ CDATA_SECTION_NODE: number;
+ COMMENT_NODE: number;
+ DOCUMENT_FRAGMENT_NODE: number;
+ DOCUMENT_NODE: number;
+ DOCUMENT_POSITION_CONTAINED_BY: number;
+ DOCUMENT_POSITION_CONTAINS: number;
+ DOCUMENT_POSITION_DISCONNECTED: number;
+ DOCUMENT_POSITION_FOLLOWING: number;
+ DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: number;
+ DOCUMENT_POSITION_PRECEDING: number;
+ DOCUMENT_TYPE_NODE: number;
+ ELEMENT_NODE: number;
+ ENTITY_NODE: number;
+ ENTITY_REFERENCE_NODE: number;
+ NOTATION_NODE: number;
+ PROCESSING_INSTRUCTION_NODE: number;
+ TEXT_NODE: number;
+}
+
+declare var Node: {
+ prototype: Node;
+ new(): Node;
+ ATTRIBUTE_NODE: number;
+ CDATA_SECTION_NODE: number;
+ COMMENT_NODE: number;
+ DOCUMENT_FRAGMENT_NODE: number;
+ DOCUMENT_NODE: number;
+ DOCUMENT_POSITION_CONTAINED_BY: number;
+ DOCUMENT_POSITION_CONTAINS: number;
+ DOCUMENT_POSITION_DISCONNECTED: number;
+ DOCUMENT_POSITION_FOLLOWING: number;
+ DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: number;
+ DOCUMENT_POSITION_PRECEDING: number;
+ DOCUMENT_TYPE_NODE: number;
+ ELEMENT_NODE: number;
+ ENTITY_NODE: number;
+ ENTITY_REFERENCE_NODE: number;
+ NOTATION_NODE: number;
+ PROCESSING_INSTRUCTION_NODE: number;
+ TEXT_NODE: number;
+}
+
+interface NodeFilter {
+ acceptNode(n: Node): number;
+}
+
+declare var NodeFilter: {
+ FILTER_ACCEPT: number;
+ FILTER_REJECT: number;
+ FILTER_SKIP: number;
+ SHOW_ALL: number;
+ SHOW_ATTRIBUTE: number;
+ SHOW_CDATA_SECTION: number;
+ SHOW_COMMENT: number;
+ SHOW_DOCUMENT: number;
+ SHOW_DOCUMENT_FRAGMENT: number;
+ SHOW_DOCUMENT_TYPE: number;
+ SHOW_ELEMENT: number;
+ SHOW_ENTITY: number;
+ SHOW_ENTITY_REFERENCE: number;
+ SHOW_NOTATION: number;
+ SHOW_PROCESSING_INSTRUCTION: number;
+ SHOW_TEXT: number;
+}
+
+interface NodeIterator {
+ expandEntityReferences: boolean;
+ filter: NodeFilter;
+ root: Node;
+ whatToShow: number;
+ detach(): void;
+ nextNode(): Node;
+ previousNode(): Node;
+}
+
+declare var NodeIterator: {
+ prototype: NodeIterator;
+ new(): NodeIterator;
+}
+
+interface NodeList {
+ length: number;
+ item(index: number): Node;
+ [index: number]: Node;
+}
+
+declare var NodeList: {
+ prototype: NodeList;
+ new(): NodeList;
+}
+
+interface OES_element_index_uint {
+}
+
+declare var OES_element_index_uint: {
+ prototype: OES_element_index_uint;
+ new(): OES_element_index_uint;
+}
+
+interface OES_standard_derivatives {
+ FRAGMENT_SHADER_DERIVATIVE_HINT_OES: number;
+}
+
+declare var OES_standard_derivatives: {
+ prototype: OES_standard_derivatives;
+ new(): OES_standard_derivatives;
+ FRAGMENT_SHADER_DERIVATIVE_HINT_OES: number;
+}
+
+interface OES_texture_float {
+}
+
+declare var OES_texture_float: {
+ prototype: OES_texture_float;
+ new(): OES_texture_float;
+}
+
+interface OES_texture_float_linear {
+}
+
+declare var OES_texture_float_linear: {
+ prototype: OES_texture_float_linear;
+ new(): OES_texture_float_linear;
+}
+
+interface OfflineAudioCompletionEvent extends Event {
+ renderedBuffer: AudioBuffer;
+}
+
+declare var OfflineAudioCompletionEvent: {
+ prototype: OfflineAudioCompletionEvent;
+ new(): OfflineAudioCompletionEvent;
+}
+
+interface OfflineAudioContext extends AudioContext {
+ oncomplete: (ev: Event) => any;
+ startRendering(): void;
+ addEventListener(type: "complete", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var OfflineAudioContext: {
+ prototype: OfflineAudioContext;
+ new(numberOfChannels: number, length: number, sampleRate: number): OfflineAudioContext;
+}
+
+interface OscillatorNode extends AudioNode {
+ detune: AudioParam;
+ frequency: AudioParam;
+ onended: (ev: Event) => any;
+ type: string;
+ setPeriodicWave(periodicWave: PeriodicWave): void;
+ start(when?: number): void;
+ stop(when?: number): void;
+ addEventListener(type: "ended", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var OscillatorNode: {
+ prototype: OscillatorNode;
+ new(): OscillatorNode;
+}
+
+interface PageTransitionEvent extends Event {
+ persisted: boolean;
+}
+
+declare var PageTransitionEvent: {
+ prototype: PageTransitionEvent;
+ new(): PageTransitionEvent;
+}
+
+interface PannerNode extends AudioNode {
+ coneInnerAngle: number;
+ coneOuterAngle: number;
+ coneOuterGain: number;
+ distanceModel: string;
+ maxDistance: number;
+ panningModel: string;
+ refDistance: number;
+ rolloffFactor: number;
+ setOrientation(x: number, y: number, z: number): void;
+ setPosition(x: number, y: number, z: number): void;
+ setVelocity(x: number, y: number, z: number): void;
+}
+
+declare var PannerNode: {
+ prototype: PannerNode;
+ new(): PannerNode;
+}
+
+interface PerfWidgetExternal {
+ activeNetworkRequestCount: number;
+ averageFrameTime: number;
+ averagePaintTime: number;
+ extraInformationEnabled: boolean;
+ independentRenderingEnabled: boolean;
+ irDisablingContentString: string;
+ irStatusAvailable: boolean;
+ maxCpuSpeed: number;
+ paintRequestsPerSecond: number;
+ performanceCounter: number;
+ performanceCounterFrequency: number;
+ addEventListener(eventType: string, callback: Function): void;
+ getMemoryUsage(): number;
+ getProcessCpuUsage(): number;
+ getRecentCpuUsage(last: number): any;
+ getRecentFrames(last: number): any;
+ getRecentMemoryUsage(last: number): any;
+ getRecentPaintRequests(last: number): any;
+ removeEventListener(eventType: string, callback: Function): void;
+ repositionWindow(x: number, y: number): void;
+ resizeWindow(width: number, height: number): void;
+}
+
+declare var PerfWidgetExternal: {
+ prototype: PerfWidgetExternal;
+ new(): PerfWidgetExternal;
+}
+
+interface Performance {
+ navigation: PerformanceNavigation;
+ timing: PerformanceTiming;
+ clearMarks(markName?: string): void;
+ clearMeasures(measureName?: string): void;
+ clearResourceTimings(): void;
+ getEntries(): any;
+ getEntriesByName(name: string, entryType?: string): any;
+ getEntriesByType(entryType: string): any;
+ getMarks(markName?: string): any;
+ getMeasures(measureName?: string): any;
+ mark(markName: string): void;
+ measure(measureName: string, startMarkName?: string, endMarkName?: string): void;
+ now(): number;
+ setResourceTimingBufferSize(maxSize: number): void;
+ toJSON(): any;
+}
+
+declare var Performance: {
+ prototype: Performance;
+ new(): Performance;
+}
+
+interface PerformanceEntry {
+ duration: number;
+ entryType: string;
+ name: string;
+ startTime: number;
+}
+
+declare var PerformanceEntry: {
+ prototype: PerformanceEntry;
+ new(): PerformanceEntry;
+}
+
+interface PerformanceMark extends PerformanceEntry {
+}
+
+declare var PerformanceMark: {
+ prototype: PerformanceMark;
+ new(): PerformanceMark;
+}
+
+interface PerformanceMeasure extends PerformanceEntry {
+}
+
+declare var PerformanceMeasure: {
+ prototype: PerformanceMeasure;
+ new(): PerformanceMeasure;
+}
+
+interface PerformanceNavigation {
+ redirectCount: number;
+ type: number;
+ toJSON(): any;
+ TYPE_BACK_FORWARD: number;
+ TYPE_NAVIGATE: number;
+ TYPE_RELOAD: number;
+ TYPE_RESERVED: number;
+}
+
+declare var PerformanceNavigation: {
+ prototype: PerformanceNavigation;
+ new(): PerformanceNavigation;
+ TYPE_BACK_FORWARD: number;
+ TYPE_NAVIGATE: number;
+ TYPE_RELOAD: number;
+ TYPE_RESERVED: number;
+}
+
+interface PerformanceNavigationTiming extends PerformanceEntry {
+ connectEnd: number;
+ connectStart: number;
+ domComplete: number;
+ domContentLoadedEventEnd: number;
+ domContentLoadedEventStart: number;
+ domInteractive: number;
+ domLoading: number;
+ domainLookupEnd: number;
+ domainLookupStart: number;
+ fetchStart: number;
+ loadEventEnd: number;
+ loadEventStart: number;
+ navigationStart: number;
+ redirectCount: number;
+ redirectEnd: number;
+ redirectStart: number;
+ requestStart: number;
+ responseEnd: number;
+ responseStart: number;
+ type: string;
+ unloadEventEnd: number;
+ unloadEventStart: number;
+}
+
+declare var PerformanceNavigationTiming: {
+ prototype: PerformanceNavigationTiming;
+ new(): PerformanceNavigationTiming;
+}
+
+interface PerformanceResourceTiming extends PerformanceEntry {
+ connectEnd: number;
+ connectStart: number;
+ domainLookupEnd: number;
+ domainLookupStart: number;
+ fetchStart: number;
+ initiatorType: string;
+ redirectEnd: number;
+ redirectStart: number;
+ requestStart: number;
+ responseEnd: number;
+ responseStart: number;
+}
+
+declare var PerformanceResourceTiming: {
+ prototype: PerformanceResourceTiming;
+ new(): PerformanceResourceTiming;
+}
+
+interface PerformanceTiming {
+ connectEnd: number;
+ connectStart: number;
+ domComplete: number;
+ domContentLoadedEventEnd: number;
+ domContentLoadedEventStart: number;
+ domInteractive: number;
+ domLoading: number;
+ domainLookupEnd: number;
+ domainLookupStart: number;
+ fetchStart: number;
+ loadEventEnd: number;
+ loadEventStart: number;
+ msFirstPaint: number;
+ navigationStart: number;
+ redirectEnd: number;
+ redirectStart: number;
+ requestStart: number;
+ responseEnd: number;
+ responseStart: number;
+ unloadEventEnd: number;
+ unloadEventStart: number;
+ toJSON(): any;
+}
+
+declare var PerformanceTiming: {
+ prototype: PerformanceTiming;
+ new(): PerformanceTiming;
+}
+
+interface PeriodicWave {
+}
+
+declare var PeriodicWave: {
+ prototype: PeriodicWave;
+ new(): PeriodicWave;
+}
+
+interface PermissionRequest extends DeferredPermissionRequest {
+ state: string;
+ defer(): void;
+}
+
+declare var PermissionRequest: {
+ prototype: PermissionRequest;
+ new(): PermissionRequest;
+}
+
+interface PermissionRequestedEvent extends Event {
+ permissionRequest: PermissionRequest;
+}
+
+declare var PermissionRequestedEvent: {
+ prototype: PermissionRequestedEvent;
+ new(): PermissionRequestedEvent;
+}
+
+interface Plugin {
+ description: string;
+ filename: string;
+ length: number;
+ name: string;
+ version: string;
+ item(index: number): MimeType;
+ namedItem(type: string): MimeType;
+ [index: number]: MimeType;
+}
+
+declare var Plugin: {
+ prototype: Plugin;
+ new(): Plugin;
+}
+
+interface PluginArray {
+ length: number;
+ item(index: number): Plugin;
+ namedItem(name: string): Plugin;
+ refresh(reload?: boolean): void;
+ [index: number]: Plugin;
+}
+
+declare var PluginArray: {
+ prototype: PluginArray;
+ new(): PluginArray;
+}
+
+interface PointerEvent extends MouseEvent {
+ currentPoint: any;
+ height: number;
+ hwTimestamp: number;
+ intermediatePoints: any;
+ isPrimary: boolean;
+ pointerId: number;
+ pointerType: any;
+ pressure: number;
+ rotation: number;
+ tiltX: number;
+ tiltY: number;
+ width: number;
+ getCurrentPoint(element: Element): void;
+ getIntermediatePoints(element: Element): void;
+ initPointerEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, ctrlKeyArg: boolean, altKeyArg: boolean, shiftKeyArg: boolean, metaKeyArg: boolean, buttonArg: number, relatedTargetArg: EventTarget, offsetXArg: number, offsetYArg: number, widthArg: number, heightArg: number, pressure: number, rotation: number, tiltX: number, tiltY: number, pointerIdArg: number, pointerType: any, hwTimestampArg: number, isPrimary: boolean): void;
+}
+
+declare var PointerEvent: {
+ prototype: PointerEvent;
+ new(typeArg: string, eventInitDict?: PointerEventInit): PointerEvent;
+}
+
+interface PopStateEvent extends Event {
+ state: any;
+ initPopStateEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, stateArg: any): void;
+}
+
+declare var PopStateEvent: {
+ prototype: PopStateEvent;
+ new(): PopStateEvent;
+}
+
+interface Position {
+ coords: Coordinates;
+ timestamp: number;
+}
+
+declare var Position: {
+ prototype: Position;
+ new(): Position;
+}
+
+interface PositionError {
+ code: number;
+ message: string;
+ toString(): string;
+ PERMISSION_DENIED: number;
+ POSITION_UNAVAILABLE: number;
+ TIMEOUT: number;
+}
+
+declare var PositionError: {
+ prototype: PositionError;
+ new(): PositionError;
+ PERMISSION_DENIED: number;
+ POSITION_UNAVAILABLE: number;
+ TIMEOUT: number;
+}
+
+interface ProcessingInstruction extends CharacterData {
+ target: string;
+}
+
+declare var ProcessingInstruction: {
+ prototype: ProcessingInstruction;
+ new(): ProcessingInstruction;
+}
+
+interface ProgressEvent extends Event {
+ lengthComputable: boolean;
+ loaded: number;
+ total: number;
+ initProgressEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, lengthComputableArg: boolean, loadedArg: number, totalArg: number): void;
+}
+
+declare var ProgressEvent: {
+ prototype: ProgressEvent;
+ new(type: string, eventInitDict?: ProgressEventInit): ProgressEvent;
+}
+
+interface Range {
+ collapsed: boolean;
+ commonAncestorContainer: Node;
+ endContainer: Node;
+ endOffset: number;
+ startContainer: Node;
+ startOffset: number;
+ cloneContents(): DocumentFragment;
+ cloneRange(): Range;
+ collapse(toStart: boolean): void;
+ compareBoundaryPoints(how: number, sourceRange: Range): number;
+ createContextualFragment(fragment: string): DocumentFragment;
+ deleteContents(): void;
+ detach(): void;
+ expand(Unit: string): boolean;
+ extractContents(): DocumentFragment;
+ getBoundingClientRect(): ClientRect;
+ getClientRects(): ClientRectList;
+ insertNode(newNode: Node): void;
+ selectNode(refNode: Node): void;
+ selectNodeContents(refNode: Node): void;
+ setEnd(refNode: Node, offset: number): void;
+ setEndAfter(refNode: Node): void;
+ setEndBefore(refNode: Node): void;
+ setStart(refNode: Node, offset: number): void;
+ setStartAfter(refNode: Node): void;
+ setStartBefore(refNode: Node): void;
+ surroundContents(newParent: Node): void;
+ toString(): string;
+ END_TO_END: number;
+ END_TO_START: number;
+ START_TO_END: number;
+ START_TO_START: number;
+}
+
+declare var Range: {
+ prototype: Range;
+ new(): Range;
+ END_TO_END: number;
+ END_TO_START: number;
+ START_TO_END: number;
+ START_TO_START: number;
+}
+
+interface SVGAElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired, SVGURIReference {
+ target: SVGAnimatedString;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGAElement: {
+ prototype: SVGAElement;
+ new(): SVGAElement;
+}
+
+interface SVGAngle {
+ unitType: number;
+ value: number;
+ valueAsString: string;
+ valueInSpecifiedUnits: number;
+ convertToSpecifiedUnits(unitType: number): void;
+ newValueSpecifiedUnits(unitType: number, valueInSpecifiedUnits: number): void;
+ SVG_ANGLETYPE_DEG: number;
+ SVG_ANGLETYPE_GRAD: number;
+ SVG_ANGLETYPE_RAD: number;
+ SVG_ANGLETYPE_UNKNOWN: number;
+ SVG_ANGLETYPE_UNSPECIFIED: number;
+}
+
+declare var SVGAngle: {
+ prototype: SVGAngle;
+ new(): SVGAngle;
+ SVG_ANGLETYPE_DEG: number;
+ SVG_ANGLETYPE_GRAD: number;
+ SVG_ANGLETYPE_RAD: number;
+ SVG_ANGLETYPE_UNKNOWN: number;
+ SVG_ANGLETYPE_UNSPECIFIED: number;
+}
+
+interface SVGAnimatedAngle {
+ animVal: SVGAngle;
+ baseVal: SVGAngle;
+}
+
+declare var SVGAnimatedAngle: {
+ prototype: SVGAnimatedAngle;
+ new(): SVGAnimatedAngle;
+}
+
+interface SVGAnimatedBoolean {
+ animVal: boolean;
+ baseVal: boolean;
+}
+
+declare var SVGAnimatedBoolean: {
+ prototype: SVGAnimatedBoolean;
+ new(): SVGAnimatedBoolean;
+}
+
+interface SVGAnimatedEnumeration {
+ animVal: number;
+ baseVal: number;
+}
+
+declare var SVGAnimatedEnumeration: {
+ prototype: SVGAnimatedEnumeration;
+ new(): SVGAnimatedEnumeration;
+}
+
+interface SVGAnimatedInteger {
+ animVal: number;
+ baseVal: number;
+}
+
+declare var SVGAnimatedInteger: {
+ prototype: SVGAnimatedInteger;
+ new(): SVGAnimatedInteger;
+}
+
+interface SVGAnimatedLength {
+ animVal: SVGLength;
+ baseVal: SVGLength;
+}
+
+declare var SVGAnimatedLength: {
+ prototype: SVGAnimatedLength;
+ new(): SVGAnimatedLength;
+}
+
+interface SVGAnimatedLengthList {
+ animVal: SVGLengthList;
+ baseVal: SVGLengthList;
+}
+
+declare var SVGAnimatedLengthList: {
+ prototype: SVGAnimatedLengthList;
+ new(): SVGAnimatedLengthList;
+}
+
+interface SVGAnimatedNumber {
+ animVal: number;
+ baseVal: number;
+}
+
+declare var SVGAnimatedNumber: {
+ prototype: SVGAnimatedNumber;
+ new(): SVGAnimatedNumber;
+}
+
+interface SVGAnimatedNumberList {
+ animVal: SVGNumberList;
+ baseVal: SVGNumberList;
+}
+
+declare var SVGAnimatedNumberList: {
+ prototype: SVGAnimatedNumberList;
+ new(): SVGAnimatedNumberList;
+}
+
+interface SVGAnimatedPreserveAspectRatio {
+ animVal: SVGPreserveAspectRatio;
+ baseVal: SVGPreserveAspectRatio;
+}
+
+declare var SVGAnimatedPreserveAspectRatio: {
+ prototype: SVGAnimatedPreserveAspectRatio;
+ new(): SVGAnimatedPreserveAspectRatio;
+}
+
+interface SVGAnimatedRect {
+ animVal: SVGRect;
+ baseVal: SVGRect;
+}
+
+declare var SVGAnimatedRect: {
+ prototype: SVGAnimatedRect;
+ new(): SVGAnimatedRect;
+}
+
+interface SVGAnimatedString {
+ animVal: string;
+ baseVal: string;
+}
+
+declare var SVGAnimatedString: {
+ prototype: SVGAnimatedString;
+ new(): SVGAnimatedString;
+}
+
+interface SVGAnimatedTransformList {
+ animVal: SVGTransformList;
+ baseVal: SVGTransformList;
+}
+
+declare var SVGAnimatedTransformList: {
+ prototype: SVGAnimatedTransformList;
+ new(): SVGAnimatedTransformList;
+}
+
+interface SVGCircleElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired {
+ cx: SVGAnimatedLength;
+ cy: SVGAnimatedLength;
+ r: SVGAnimatedLength;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGCircleElement: {
+ prototype: SVGCircleElement;
+ new(): SVGCircleElement;
+}
+
+interface SVGClipPathElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired, SVGUnitTypes {
+ clipPathUnits: SVGAnimatedEnumeration;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGClipPathElement: {
+ prototype: SVGClipPathElement;
+ new(): SVGClipPathElement;
+}
+
+interface SVGComponentTransferFunctionElement extends SVGElement {
+ amplitude: SVGAnimatedNumber;
+ exponent: SVGAnimatedNumber;
+ intercept: SVGAnimatedNumber;
+ offset: SVGAnimatedNumber;
+ slope: SVGAnimatedNumber;
+ tableValues: SVGAnimatedNumberList;
+ type: SVGAnimatedEnumeration;
+ SVG_FECOMPONENTTRANSFER_TYPE_DISCRETE: number;
+ SVG_FECOMPONENTTRANSFER_TYPE_GAMMA: number;
+ SVG_FECOMPONENTTRANSFER_TYPE_IDENTITY: number;
+ SVG_FECOMPONENTTRANSFER_TYPE_LINEAR: number;
+ SVG_FECOMPONENTTRANSFER_TYPE_TABLE: number;
+ SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN: number;
+}
+
+declare var SVGComponentTransferFunctionElement: {
+ prototype: SVGComponentTransferFunctionElement;
+ new(): SVGComponentTransferFunctionElement;
+ SVG_FECOMPONENTTRANSFER_TYPE_DISCRETE: number;
+ SVG_FECOMPONENTTRANSFER_TYPE_GAMMA: number;
+ SVG_FECOMPONENTTRANSFER_TYPE_IDENTITY: number;
+ SVG_FECOMPONENTTRANSFER_TYPE_LINEAR: number;
+ SVG_FECOMPONENTTRANSFER_TYPE_TABLE: number;
+ SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN: number;
+}
+
+interface SVGDefsElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired {
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGDefsElement: {
+ prototype: SVGDefsElement;
+ new(): SVGDefsElement;
+}
+
+interface SVGDescElement extends SVGElement, SVGStylable, SVGLangSpace {
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGDescElement: {
+ prototype: SVGDescElement;
+ new(): SVGDescElement;
+}
+
+interface SVGElement extends Element {
+ id: string;
+ onclick: (ev: MouseEvent) => any;
+ ondblclick: (ev: MouseEvent) => any;
+ onfocusin: (ev: FocusEvent) => any;
+ onfocusout: (ev: FocusEvent) => any;
+ onload: (ev: Event) => any;
+ onmousedown: (ev: MouseEvent) => any;
+ onmousemove: (ev: MouseEvent) => any;
+ onmouseout: (ev: MouseEvent) => any;
+ onmouseover: (ev: MouseEvent) => any;
+ onmouseup: (ev: MouseEvent) => any;
+ ownerSVGElement: SVGSVGElement;
+ viewportElement: SVGElement;
+ xmlbase: string;
+ className: any;
+ addEventListener(type: "MSGestureChange", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureDoubleTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureEnd", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureHold", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGotPointerCapture", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSInertiaStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSLostPointerCapture", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerCancel", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerDown", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerEnter", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerLeave", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerMove", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerOut", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerOver", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerUp", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "ariarequest", listener: (ev: AriaRequestEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "click", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "command", listener: (ev: CommandEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dblclick", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "focusin", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "focusout", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "gotpointercapture", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "lostpointercapture", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mousedown", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mousemove", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseout", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseover", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseup", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointercancel", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerdown", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerenter", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerleave", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointermove", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerout", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerover", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerup", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "touchcancel", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "touchend", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "touchmove", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "touchstart", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "webkitfullscreenchange", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "webkitfullscreenerror", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "wheel", listener: (ev: WheelEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGElement: {
+ prototype: SVGElement;
+ new(): SVGElement;
+}
+
+interface SVGElementInstance extends EventTarget {
+ childNodes: SVGElementInstanceList;
+ correspondingElement: SVGElement;
+ correspondingUseElement: SVGUseElement;
+ firstChild: SVGElementInstance;
+ lastChild: SVGElementInstance;
+ nextSibling: SVGElementInstance;
+ parentNode: SVGElementInstance;
+ previousSibling: SVGElementInstance;
+}
+
+declare var SVGElementInstance: {
+ prototype: SVGElementInstance;
+ new(): SVGElementInstance;
+}
+
+interface SVGElementInstanceList {
+ length: number;
+ item(index: number): SVGElementInstance;
+}
+
+declare var SVGElementInstanceList: {
+ prototype: SVGElementInstanceList;
+ new(): SVGElementInstanceList;
+}
+
+interface SVGEllipseElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired {
+ cx: SVGAnimatedLength;
+ cy: SVGAnimatedLength;
+ rx: SVGAnimatedLength;
+ ry: SVGAnimatedLength;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGEllipseElement: {
+ prototype: SVGEllipseElement;
+ new(): SVGEllipseElement;
+}
+
+interface SVGFEBlendElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
+ in1: SVGAnimatedString;
+ in2: SVGAnimatedString;
+ mode: SVGAnimatedEnumeration;
+ SVG_FEBLEND_MODE_COLOR: number;
+ SVG_FEBLEND_MODE_COLOR_BURN: number;
+ SVG_FEBLEND_MODE_COLOR_DODGE: number;
+ SVG_FEBLEND_MODE_DARKEN: number;
+ SVG_FEBLEND_MODE_DIFFERENCE: number;
+ SVG_FEBLEND_MODE_EXCLUSION: number;
+ SVG_FEBLEND_MODE_HARD_LIGHT: number;
+ SVG_FEBLEND_MODE_HUE: number;
+ SVG_FEBLEND_MODE_LIGHTEN: number;
+ SVG_FEBLEND_MODE_LUMINOSITY: number;
+ SVG_FEBLEND_MODE_MULTIPLY: number;
+ SVG_FEBLEND_MODE_NORMAL: number;
+ SVG_FEBLEND_MODE_OVERLAY: number;
+ SVG_FEBLEND_MODE_SATURATION: number;
+ SVG_FEBLEND_MODE_SCREEN: number;
+ SVG_FEBLEND_MODE_SOFT_LIGHT: number;
+ SVG_FEBLEND_MODE_UNKNOWN: number;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGFEBlendElement: {
+ prototype: SVGFEBlendElement;
+ new(): SVGFEBlendElement;
+ SVG_FEBLEND_MODE_COLOR: number;
+ SVG_FEBLEND_MODE_COLOR_BURN: number;
+ SVG_FEBLEND_MODE_COLOR_DODGE: number;
+ SVG_FEBLEND_MODE_DARKEN: number;
+ SVG_FEBLEND_MODE_DIFFERENCE: number;
+ SVG_FEBLEND_MODE_EXCLUSION: number;
+ SVG_FEBLEND_MODE_HARD_LIGHT: number;
+ SVG_FEBLEND_MODE_HUE: number;
+ SVG_FEBLEND_MODE_LIGHTEN: number;
+ SVG_FEBLEND_MODE_LUMINOSITY: number;
+ SVG_FEBLEND_MODE_MULTIPLY: number;
+ SVG_FEBLEND_MODE_NORMAL: number;
+ SVG_FEBLEND_MODE_OVERLAY: number;
+ SVG_FEBLEND_MODE_SATURATION: number;
+ SVG_FEBLEND_MODE_SCREEN: number;
+ SVG_FEBLEND_MODE_SOFT_LIGHT: number;
+ SVG_FEBLEND_MODE_UNKNOWN: number;
+}
+
+interface SVGFEColorMatrixElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
+ in1: SVGAnimatedString;
+ type: SVGAnimatedEnumeration;
+ values: SVGAnimatedNumberList;
+ SVG_FECOLORMATRIX_TYPE_HUEROTATE: number;
+ SVG_FECOLORMATRIX_TYPE_LUMINANCETOALPHA: number;
+ SVG_FECOLORMATRIX_TYPE_MATRIX: number;
+ SVG_FECOLORMATRIX_TYPE_SATURATE: number;
+ SVG_FECOLORMATRIX_TYPE_UNKNOWN: number;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGFEColorMatrixElement: {
+ prototype: SVGFEColorMatrixElement;
+ new(): SVGFEColorMatrixElement;
+ SVG_FECOLORMATRIX_TYPE_HUEROTATE: number;
+ SVG_FECOLORMATRIX_TYPE_LUMINANCETOALPHA: number;
+ SVG_FECOLORMATRIX_TYPE_MATRIX: number;
+ SVG_FECOLORMATRIX_TYPE_SATURATE: number;
+ SVG_FECOLORMATRIX_TYPE_UNKNOWN: number;
+}
+
+interface SVGFEComponentTransferElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
+ in1: SVGAnimatedString;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGFEComponentTransferElement: {
+ prototype: SVGFEComponentTransferElement;
+ new(): SVGFEComponentTransferElement;
+}
+
+interface SVGFECompositeElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
+ in1: SVGAnimatedString;
+ in2: SVGAnimatedString;
+ k1: SVGAnimatedNumber;
+ k2: SVGAnimatedNumber;
+ k3: SVGAnimatedNumber;
+ k4: SVGAnimatedNumber;
+ operator: SVGAnimatedEnumeration;
+ SVG_FECOMPOSITE_OPERATOR_ARITHMETIC: number;
+ SVG_FECOMPOSITE_OPERATOR_ATOP: number;
+ SVG_FECOMPOSITE_OPERATOR_IN: number;
+ SVG_FECOMPOSITE_OPERATOR_OUT: number;
+ SVG_FECOMPOSITE_OPERATOR_OVER: number;
+ SVG_FECOMPOSITE_OPERATOR_UNKNOWN: number;
+ SVG_FECOMPOSITE_OPERATOR_XOR: number;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGFECompositeElement: {
+ prototype: SVGFECompositeElement;
+ new(): SVGFECompositeElement;
+ SVG_FECOMPOSITE_OPERATOR_ARITHMETIC: number;
+ SVG_FECOMPOSITE_OPERATOR_ATOP: number;
+ SVG_FECOMPOSITE_OPERATOR_IN: number;
+ SVG_FECOMPOSITE_OPERATOR_OUT: number;
+ SVG_FECOMPOSITE_OPERATOR_OVER: number;
+ SVG_FECOMPOSITE_OPERATOR_UNKNOWN: number;
+ SVG_FECOMPOSITE_OPERATOR_XOR: number;
+}
+
+interface SVGFEConvolveMatrixElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
+ bias: SVGAnimatedNumber;
+ divisor: SVGAnimatedNumber;
+ edgeMode: SVGAnimatedEnumeration;
+ in1: SVGAnimatedString;
+ kernelMatrix: SVGAnimatedNumberList;
+ kernelUnitLengthX: SVGAnimatedNumber;
+ kernelUnitLengthY: SVGAnimatedNumber;
+ orderX: SVGAnimatedInteger;
+ orderY: SVGAnimatedInteger;
+ preserveAlpha: SVGAnimatedBoolean;
+ targetX: SVGAnimatedInteger;
+ targetY: SVGAnimatedInteger;
+ SVG_EDGEMODE_DUPLICATE: number;
+ SVG_EDGEMODE_NONE: number;
+ SVG_EDGEMODE_UNKNOWN: number;
+ SVG_EDGEMODE_WRAP: number;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGFEConvolveMatrixElement: {
+ prototype: SVGFEConvolveMatrixElement;
+ new(): SVGFEConvolveMatrixElement;
+ SVG_EDGEMODE_DUPLICATE: number;
+ SVG_EDGEMODE_NONE: number;
+ SVG_EDGEMODE_UNKNOWN: number;
+ SVG_EDGEMODE_WRAP: number;
+}
+
+interface SVGFEDiffuseLightingElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
+ diffuseConstant: SVGAnimatedNumber;
+ in1: SVGAnimatedString;
+ kernelUnitLengthX: SVGAnimatedNumber;
+ kernelUnitLengthY: SVGAnimatedNumber;
+ surfaceScale: SVGAnimatedNumber;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGFEDiffuseLightingElement: {
+ prototype: SVGFEDiffuseLightingElement;
+ new(): SVGFEDiffuseLightingElement;
+}
+
+interface SVGFEDisplacementMapElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
+ in1: SVGAnimatedString;
+ in2: SVGAnimatedString;
+ scale: SVGAnimatedNumber;
+ xChannelSelector: SVGAnimatedEnumeration;
+ yChannelSelector: SVGAnimatedEnumeration;
+ SVG_CHANNEL_A: number;
+ SVG_CHANNEL_B: number;
+ SVG_CHANNEL_G: number;
+ SVG_CHANNEL_R: number;
+ SVG_CHANNEL_UNKNOWN: number;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGFEDisplacementMapElement: {
+ prototype: SVGFEDisplacementMapElement;
+ new(): SVGFEDisplacementMapElement;
+ SVG_CHANNEL_A: number;
+ SVG_CHANNEL_B: number;
+ SVG_CHANNEL_G: number;
+ SVG_CHANNEL_R: number;
+ SVG_CHANNEL_UNKNOWN: number;
+}
+
+interface SVGFEDistantLightElement extends SVGElement {
+ azimuth: SVGAnimatedNumber;
+ elevation: SVGAnimatedNumber;
+}
+
+declare var SVGFEDistantLightElement: {
+ prototype: SVGFEDistantLightElement;
+ new(): SVGFEDistantLightElement;
+}
+
+interface SVGFEFloodElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGFEFloodElement: {
+ prototype: SVGFEFloodElement;
+ new(): SVGFEFloodElement;
+}
+
+interface SVGFEFuncAElement extends SVGComponentTransferFunctionElement {
+}
+
+declare var SVGFEFuncAElement: {
+ prototype: SVGFEFuncAElement;
+ new(): SVGFEFuncAElement;
+}
+
+interface SVGFEFuncBElement extends SVGComponentTransferFunctionElement {
+}
+
+declare var SVGFEFuncBElement: {
+ prototype: SVGFEFuncBElement;
+ new(): SVGFEFuncBElement;
+}
+
+interface SVGFEFuncGElement extends SVGComponentTransferFunctionElement {
+}
+
+declare var SVGFEFuncGElement: {
+ prototype: SVGFEFuncGElement;
+ new(): SVGFEFuncGElement;
+}
+
+interface SVGFEFuncRElement extends SVGComponentTransferFunctionElement {
+}
+
+declare var SVGFEFuncRElement: {
+ prototype: SVGFEFuncRElement;
+ new(): SVGFEFuncRElement;
+}
+
+interface SVGFEGaussianBlurElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
+ in1: SVGAnimatedString;
+ stdDeviationX: SVGAnimatedNumber;
+ stdDeviationY: SVGAnimatedNumber;
+ setStdDeviation(stdDeviationX: number, stdDeviationY: number): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGFEGaussianBlurElement: {
+ prototype: SVGFEGaussianBlurElement;
+ new(): SVGFEGaussianBlurElement;
+}
+
+interface SVGFEImageElement extends SVGElement, SVGFilterPrimitiveStandardAttributes, SVGLangSpace, SVGURIReference, SVGExternalResourcesRequired {
+ preserveAspectRatio: SVGAnimatedPreserveAspectRatio;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGFEImageElement: {
+ prototype: SVGFEImageElement;
+ new(): SVGFEImageElement;
+}
+
+interface SVGFEMergeElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGFEMergeElement: {
+ prototype: SVGFEMergeElement;
+ new(): SVGFEMergeElement;
+}
+
+interface SVGFEMergeNodeElement extends SVGElement {
+ in1: SVGAnimatedString;
+}
+
+declare var SVGFEMergeNodeElement: {
+ prototype: SVGFEMergeNodeElement;
+ new(): SVGFEMergeNodeElement;
+}
+
+interface SVGFEMorphologyElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
+ in1: SVGAnimatedString;
+ operator: SVGAnimatedEnumeration;
+ radiusX: SVGAnimatedNumber;
+ radiusY: SVGAnimatedNumber;
+ SVG_MORPHOLOGY_OPERATOR_DILATE: number;
+ SVG_MORPHOLOGY_OPERATOR_ERODE: number;
+ SVG_MORPHOLOGY_OPERATOR_UNKNOWN: number;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGFEMorphologyElement: {
+ prototype: SVGFEMorphologyElement;
+ new(): SVGFEMorphologyElement;
+ SVG_MORPHOLOGY_OPERATOR_DILATE: number;
+ SVG_MORPHOLOGY_OPERATOR_ERODE: number;
+ SVG_MORPHOLOGY_OPERATOR_UNKNOWN: number;
+}
+
+interface SVGFEOffsetElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
+ dx: SVGAnimatedNumber;
+ dy: SVGAnimatedNumber;
+ in1: SVGAnimatedString;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGFEOffsetElement: {
+ prototype: SVGFEOffsetElement;
+ new(): SVGFEOffsetElement;
+}
+
+interface SVGFEPointLightElement extends SVGElement {
+ x: SVGAnimatedNumber;
+ y: SVGAnimatedNumber;
+ z: SVGAnimatedNumber;
+}
+
+declare var SVGFEPointLightElement: {
+ prototype: SVGFEPointLightElement;
+ new(): SVGFEPointLightElement;
+}
+
+interface SVGFESpecularLightingElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
+ in1: SVGAnimatedString;
+ kernelUnitLengthX: SVGAnimatedNumber;
+ kernelUnitLengthY: SVGAnimatedNumber;
+ specularConstant: SVGAnimatedNumber;
+ specularExponent: SVGAnimatedNumber;
+ surfaceScale: SVGAnimatedNumber;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGFESpecularLightingElement: {
+ prototype: SVGFESpecularLightingElement;
+ new(): SVGFESpecularLightingElement;
+}
+
+interface SVGFESpotLightElement extends SVGElement {
+ limitingConeAngle: SVGAnimatedNumber;
+ pointsAtX: SVGAnimatedNumber;
+ pointsAtY: SVGAnimatedNumber;
+ pointsAtZ: SVGAnimatedNumber;
+ specularExponent: SVGAnimatedNumber;
+ x: SVGAnimatedNumber;
+ y: SVGAnimatedNumber;
+ z: SVGAnimatedNumber;
+}
+
+declare var SVGFESpotLightElement: {
+ prototype: SVGFESpotLightElement;
+ new(): SVGFESpotLightElement;
+}
+
+interface SVGFETileElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
+ in1: SVGAnimatedString;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGFETileElement: {
+ prototype: SVGFETileElement;
+ new(): SVGFETileElement;
+}
+
+interface SVGFETurbulenceElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
+ baseFrequencyX: SVGAnimatedNumber;
+ baseFrequencyY: SVGAnimatedNumber;
+ numOctaves: SVGAnimatedInteger;
+ seed: SVGAnimatedNumber;
+ stitchTiles: SVGAnimatedEnumeration;
+ type: SVGAnimatedEnumeration;
+ SVG_STITCHTYPE_NOSTITCH: number;
+ SVG_STITCHTYPE_STITCH: number;
+ SVG_STITCHTYPE_UNKNOWN: number;
+ SVG_TURBULENCE_TYPE_FRACTALNOISE: number;
+ SVG_TURBULENCE_TYPE_TURBULENCE: number;
+ SVG_TURBULENCE_TYPE_UNKNOWN: number;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGFETurbulenceElement: {
+ prototype: SVGFETurbulenceElement;
+ new(): SVGFETurbulenceElement;
+ SVG_STITCHTYPE_NOSTITCH: number;
+ SVG_STITCHTYPE_STITCH: number;
+ SVG_STITCHTYPE_UNKNOWN: number;
+ SVG_TURBULENCE_TYPE_FRACTALNOISE: number;
+ SVG_TURBULENCE_TYPE_TURBULENCE: number;
+ SVG_TURBULENCE_TYPE_UNKNOWN: number;
+}
+
+interface SVGFilterElement extends SVGElement, SVGUnitTypes, SVGStylable, SVGLangSpace, SVGURIReference, SVGExternalResourcesRequired {
+ filterResX: SVGAnimatedInteger;
+ filterResY: SVGAnimatedInteger;
+ filterUnits: SVGAnimatedEnumeration;
+ height: SVGAnimatedLength;
+ primitiveUnits: SVGAnimatedEnumeration;
+ width: SVGAnimatedLength;
+ x: SVGAnimatedLength;
+ y: SVGAnimatedLength;
+ setFilterRes(filterResX: number, filterResY: number): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGFilterElement: {
+ prototype: SVGFilterElement;
+ new(): SVGFilterElement;
+}
+
+interface SVGForeignObjectElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired {
+ height: SVGAnimatedLength;
+ width: SVGAnimatedLength;
+ x: SVGAnimatedLength;
+ y: SVGAnimatedLength;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGForeignObjectElement: {
+ prototype: SVGForeignObjectElement;
+ new(): SVGForeignObjectElement;
+}
+
+interface SVGGElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired {
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGGElement: {
+ prototype: SVGGElement;
+ new(): SVGGElement;
+}
+
+interface SVGGradientElement extends SVGElement, SVGStylable, SVGExternalResourcesRequired, SVGURIReference, SVGUnitTypes {
+ gradientTransform: SVGAnimatedTransformList;
+ gradientUnits: SVGAnimatedEnumeration;
+ spreadMethod: SVGAnimatedEnumeration;
+ SVG_SPREADMETHOD_PAD: number;
+ SVG_SPREADMETHOD_REFLECT: number;
+ SVG_SPREADMETHOD_REPEAT: number;
+ SVG_SPREADMETHOD_UNKNOWN: number;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGGradientElement: {
+ prototype: SVGGradientElement;
+ new(): SVGGradientElement;
+ SVG_SPREADMETHOD_PAD: number;
+ SVG_SPREADMETHOD_REFLECT: number;
+ SVG_SPREADMETHOD_REPEAT: number;
+ SVG_SPREADMETHOD_UNKNOWN: number;
+}
+
+interface SVGImageElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired, SVGURIReference {
+ height: SVGAnimatedLength;
+ preserveAspectRatio: SVGAnimatedPreserveAspectRatio;
+ width: SVGAnimatedLength;
+ x: SVGAnimatedLength;
+ y: SVGAnimatedLength;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGImageElement: {
+ prototype: SVGImageElement;
+ new(): SVGImageElement;
+}
+
+interface SVGLength {
+ unitType: number;
+ value: number;
+ valueAsString: string;
+ valueInSpecifiedUnits: number;
+ convertToSpecifiedUnits(unitType: number): void;
+ newValueSpecifiedUnits(unitType: number, valueInSpecifiedUnits: number): void;
+ SVG_LENGTHTYPE_CM: number;
+ SVG_LENGTHTYPE_EMS: number;
+ SVG_LENGTHTYPE_EXS: number;
+ SVG_LENGTHTYPE_IN: number;
+ SVG_LENGTHTYPE_MM: number;
+ SVG_LENGTHTYPE_NUMBER: number;
+ SVG_LENGTHTYPE_PC: number;
+ SVG_LENGTHTYPE_PERCENTAGE: number;
+ SVG_LENGTHTYPE_PT: number;
+ SVG_LENGTHTYPE_PX: number;
+ SVG_LENGTHTYPE_UNKNOWN: number;
+}
+
+declare var SVGLength: {
+ prototype: SVGLength;
+ new(): SVGLength;
+ SVG_LENGTHTYPE_CM: number;
+ SVG_LENGTHTYPE_EMS: number;
+ SVG_LENGTHTYPE_EXS: number;
+ SVG_LENGTHTYPE_IN: number;
+ SVG_LENGTHTYPE_MM: number;
+ SVG_LENGTHTYPE_NUMBER: number;
+ SVG_LENGTHTYPE_PC: number;
+ SVG_LENGTHTYPE_PERCENTAGE: number;
+ SVG_LENGTHTYPE_PT: number;
+ SVG_LENGTHTYPE_PX: number;
+ SVG_LENGTHTYPE_UNKNOWN: number;
+}
+
+interface SVGLengthList {
+ numberOfItems: number;
+ appendItem(newItem: SVGLength): SVGLength;
+ clear(): void;
+ getItem(index: number): SVGLength;
+ initialize(newItem: SVGLength): SVGLength;
+ insertItemBefore(newItem: SVGLength, index: number): SVGLength;
+ removeItem(index: number): SVGLength;
+ replaceItem(newItem: SVGLength, index: number): SVGLength;
+}
+
+declare var SVGLengthList: {
+ prototype: SVGLengthList;
+ new(): SVGLengthList;
+}
+
+interface SVGLineElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired {
+ x1: SVGAnimatedLength;
+ x2: SVGAnimatedLength;
+ y1: SVGAnimatedLength;
+ y2: SVGAnimatedLength;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGLineElement: {
+ prototype: SVGLineElement;
+ new(): SVGLineElement;
+}
+
+interface SVGLinearGradientElement extends SVGGradientElement {
+ x1: SVGAnimatedLength;
+ x2: SVGAnimatedLength;
+ y1: SVGAnimatedLength;
+ y2: SVGAnimatedLength;
+}
+
+declare var SVGLinearGradientElement: {
+ prototype: SVGLinearGradientElement;
+ new(): SVGLinearGradientElement;
+}
+
+interface SVGMarkerElement extends SVGElement, SVGStylable, SVGLangSpace, SVGExternalResourcesRequired, SVGFitToViewBox {
+ markerHeight: SVGAnimatedLength;
+ markerUnits: SVGAnimatedEnumeration;
+ markerWidth: SVGAnimatedLength;
+ orientAngle: SVGAnimatedAngle;
+ orientType: SVGAnimatedEnumeration;
+ refX: SVGAnimatedLength;
+ refY: SVGAnimatedLength;
+ setOrientToAngle(angle: SVGAngle): void;
+ setOrientToAuto(): void;
+ SVG_MARKERUNITS_STROKEWIDTH: number;
+ SVG_MARKERUNITS_UNKNOWN: number;
+ SVG_MARKERUNITS_USERSPACEONUSE: number;
+ SVG_MARKER_ORIENT_ANGLE: number;
+ SVG_MARKER_ORIENT_AUTO: number;
+ SVG_MARKER_ORIENT_UNKNOWN: number;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGMarkerElement: {
+ prototype: SVGMarkerElement;
+ new(): SVGMarkerElement;
+ SVG_MARKERUNITS_STROKEWIDTH: number;
+ SVG_MARKERUNITS_UNKNOWN: number;
+ SVG_MARKERUNITS_USERSPACEONUSE: number;
+ SVG_MARKER_ORIENT_ANGLE: number;
+ SVG_MARKER_ORIENT_AUTO: number;
+ SVG_MARKER_ORIENT_UNKNOWN: number;
+}
+
+interface SVGMaskElement extends SVGElement, SVGStylable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired, SVGUnitTypes {
+ height: SVGAnimatedLength;
+ maskContentUnits: SVGAnimatedEnumeration;
+ maskUnits: SVGAnimatedEnumeration;
+ width: SVGAnimatedLength;
+ x: SVGAnimatedLength;
+ y: SVGAnimatedLength;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGMaskElement: {
+ prototype: SVGMaskElement;
+ new(): SVGMaskElement;
+}
+
+interface SVGMatrix {
+ a: number;
+ b: number;
+ c: number;
+ d: number;
+ e: number;
+ f: number;
+ flipX(): SVGMatrix;
+ flipY(): SVGMatrix;
+ inverse(): SVGMatrix;
+ multiply(secondMatrix: SVGMatrix): SVGMatrix;
+ rotate(angle: number): SVGMatrix;
+ rotateFromVector(x: number, y: number): SVGMatrix;
+ scale(scaleFactor: number): SVGMatrix;
+ scaleNonUniform(scaleFactorX: number, scaleFactorY: number): SVGMatrix;
+ skewX(angle: number): SVGMatrix;
+ skewY(angle: number): SVGMatrix;
+ translate(x: number, y: number): SVGMatrix;
+}
+
+declare var SVGMatrix: {
+ prototype: SVGMatrix;
+ new(): SVGMatrix;
+}
+
+interface SVGMetadataElement extends SVGElement {
+}
+
+declare var SVGMetadataElement: {
+ prototype: SVGMetadataElement;
+ new(): SVGMetadataElement;
+}
+
+interface SVGNumber {
+ value: number;
+}
+
+declare var SVGNumber: {
+ prototype: SVGNumber;
+ new(): SVGNumber;
+}
+
+interface SVGNumberList {
+ numberOfItems: number;
+ appendItem(newItem: SVGNumber): SVGNumber;
+ clear(): void;
+ getItem(index: number): SVGNumber;
+ initialize(newItem: SVGNumber): SVGNumber;
+ insertItemBefore(newItem: SVGNumber, index: number): SVGNumber;
+ removeItem(index: number): SVGNumber;
+ replaceItem(newItem: SVGNumber, index: number): SVGNumber;
+}
+
+declare var SVGNumberList: {
+ prototype: SVGNumberList;
+ new(): SVGNumberList;
+}
+
+interface SVGPathElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired, SVGAnimatedPathData {
+ createSVGPathSegArcAbs(x: number, y: number, r1: number, r2: number, angle: number, largeArcFlag: boolean, sweepFlag: boolean): SVGPathSegArcAbs;
+ createSVGPathSegArcRel(x: number, y: number, r1: number, r2: number, angle: number, largeArcFlag: boolean, sweepFlag: boolean): SVGPathSegArcRel;
+ createSVGPathSegClosePath(): SVGPathSegClosePath;
+ createSVGPathSegCurvetoCubicAbs(x: number, y: number, x1: number, y1: number, x2: number, y2: number): SVGPathSegCurvetoCubicAbs;
+ createSVGPathSegCurvetoCubicRel(x: number, y: number, x1: number, y1: number, x2: number, y2: number): SVGPathSegCurvetoCubicRel;
+ createSVGPathSegCurvetoCubicSmoothAbs(x: number, y: number, x2: number, y2: number): SVGPathSegCurvetoCubicSmoothAbs;
+ createSVGPathSegCurvetoCubicSmoothRel(x: number, y: number, x2: number, y2: number): SVGPathSegCurvetoCubicSmoothRel;
+ createSVGPathSegCurvetoQuadraticAbs(x: number, y: number, x1: number, y1: number): SVGPathSegCurvetoQuadraticAbs;
+ createSVGPathSegCurvetoQuadraticRel(x: number, y: number, x1: number, y1: number): SVGPathSegCurvetoQuadraticRel;
+ createSVGPathSegCurvetoQuadraticSmoothAbs(x: number, y: number): SVGPathSegCurvetoQuadraticSmoothAbs;
+ createSVGPathSegCurvetoQuadraticSmoothRel(x: number, y: number): SVGPathSegCurvetoQuadraticSmoothRel;
+ createSVGPathSegLinetoAbs(x: number, y: number): SVGPathSegLinetoAbs;
+ createSVGPathSegLinetoHorizontalAbs(x: number): SVGPathSegLinetoHorizontalAbs;
+ createSVGPathSegLinetoHorizontalRel(x: number): SVGPathSegLinetoHorizontalRel;
+ createSVGPathSegLinetoRel(x: number, y: number): SVGPathSegLinetoRel;
+ createSVGPathSegLinetoVerticalAbs(y: number): SVGPathSegLinetoVerticalAbs;
+ createSVGPathSegLinetoVerticalRel(y: number): SVGPathSegLinetoVerticalRel;
+ createSVGPathSegMovetoAbs(x: number, y: number): SVGPathSegMovetoAbs;
+ createSVGPathSegMovetoRel(x: number, y: number): SVGPathSegMovetoRel;
+ getPathSegAtLength(distance: number): number;
+ getPointAtLength(distance: number): SVGPoint;
+ getTotalLength(): number;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGPathElement: {
+ prototype: SVGPathElement;
+ new(): SVGPathElement;
+}
+
+interface SVGPathSeg {
+ pathSegType: number;
+ pathSegTypeAsLetter: string;
+ PATHSEG_ARC_ABS: number;
+ PATHSEG_ARC_REL: number;
+ PATHSEG_CLOSEPATH: number;
+ PATHSEG_CURVETO_CUBIC_ABS: number;
+ PATHSEG_CURVETO_CUBIC_REL: number;
+ PATHSEG_CURVETO_CUBIC_SMOOTH_ABS: number;
+ PATHSEG_CURVETO_CUBIC_SMOOTH_REL: number;
+ PATHSEG_CURVETO_QUADRATIC_ABS: number;
+ PATHSEG_CURVETO_QUADRATIC_REL: number;
+ PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS: number;
+ PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL: number;
+ PATHSEG_LINETO_ABS: number;
+ PATHSEG_LINETO_HORIZONTAL_ABS: number;
+ PATHSEG_LINETO_HORIZONTAL_REL: number;
+ PATHSEG_LINETO_REL: number;
+ PATHSEG_LINETO_VERTICAL_ABS: number;
+ PATHSEG_LINETO_VERTICAL_REL: number;
+ PATHSEG_MOVETO_ABS: number;
+ PATHSEG_MOVETO_REL: number;
+ PATHSEG_UNKNOWN: number;
+}
+
+declare var SVGPathSeg: {
+ prototype: SVGPathSeg;
+ new(): SVGPathSeg;
+ PATHSEG_ARC_ABS: number;
+ PATHSEG_ARC_REL: number;
+ PATHSEG_CLOSEPATH: number;
+ PATHSEG_CURVETO_CUBIC_ABS: number;
+ PATHSEG_CURVETO_CUBIC_REL: number;
+ PATHSEG_CURVETO_CUBIC_SMOOTH_ABS: number;
+ PATHSEG_CURVETO_CUBIC_SMOOTH_REL: number;
+ PATHSEG_CURVETO_QUADRATIC_ABS: number;
+ PATHSEG_CURVETO_QUADRATIC_REL: number;
+ PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS: number;
+ PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL: number;
+ PATHSEG_LINETO_ABS: number;
+ PATHSEG_LINETO_HORIZONTAL_ABS: number;
+ PATHSEG_LINETO_HORIZONTAL_REL: number;
+ PATHSEG_LINETO_REL: number;
+ PATHSEG_LINETO_VERTICAL_ABS: number;
+ PATHSEG_LINETO_VERTICAL_REL: number;
+ PATHSEG_MOVETO_ABS: number;
+ PATHSEG_MOVETO_REL: number;
+ PATHSEG_UNKNOWN: number;
+}
+
+interface SVGPathSegArcAbs extends SVGPathSeg {
+ angle: number;
+ largeArcFlag: boolean;
+ r1: number;
+ r2: number;
+ sweepFlag: boolean;
+ x: number;
+ y: number;
+}
+
+declare var SVGPathSegArcAbs: {
+ prototype: SVGPathSegArcAbs;
+ new(): SVGPathSegArcAbs;
+}
+
+interface SVGPathSegArcRel extends SVGPathSeg {
+ angle: number;
+ largeArcFlag: boolean;
+ r1: number;
+ r2: number;
+ sweepFlag: boolean;
+ x: number;
+ y: number;
+}
+
+declare var SVGPathSegArcRel: {
+ prototype: SVGPathSegArcRel;
+ new(): SVGPathSegArcRel;
+}
+
+interface SVGPathSegClosePath extends SVGPathSeg {
+}
+
+declare var SVGPathSegClosePath: {
+ prototype: SVGPathSegClosePath;
+ new(): SVGPathSegClosePath;
+}
+
+interface SVGPathSegCurvetoCubicAbs extends SVGPathSeg {
+ x: number;
+ x1: number;
+ x2: number;
+ y: number;
+ y1: number;
+ y2: number;
+}
+
+declare var SVGPathSegCurvetoCubicAbs: {
+ prototype: SVGPathSegCurvetoCubicAbs;
+ new(): SVGPathSegCurvetoCubicAbs;
+}
+
+interface SVGPathSegCurvetoCubicRel extends SVGPathSeg {
+ x: number;
+ x1: number;
+ x2: number;
+ y: number;
+ y1: number;
+ y2: number;
+}
+
+declare var SVGPathSegCurvetoCubicRel: {
+ prototype: SVGPathSegCurvetoCubicRel;
+ new(): SVGPathSegCurvetoCubicRel;
+}
+
+interface SVGPathSegCurvetoCubicSmoothAbs extends SVGPathSeg {
+ x: number;
+ x2: number;
+ y: number;
+ y2: number;
+}
+
+declare var SVGPathSegCurvetoCubicSmoothAbs: {
+ prototype: SVGPathSegCurvetoCubicSmoothAbs;
+ new(): SVGPathSegCurvetoCubicSmoothAbs;
+}
+
+interface SVGPathSegCurvetoCubicSmoothRel extends SVGPathSeg {
+ x: number;
+ x2: number;
+ y: number;
+ y2: number;
+}
+
+declare var SVGPathSegCurvetoCubicSmoothRel: {
+ prototype: SVGPathSegCurvetoCubicSmoothRel;
+ new(): SVGPathSegCurvetoCubicSmoothRel;
+}
+
+interface SVGPathSegCurvetoQuadraticAbs extends SVGPathSeg {
+ x: number;
+ x1: number;
+ y: number;
+ y1: number;
+}
+
+declare var SVGPathSegCurvetoQuadraticAbs: {
+ prototype: SVGPathSegCurvetoQuadraticAbs;
+ new(): SVGPathSegCurvetoQuadraticAbs;
+}
+
+interface SVGPathSegCurvetoQuadraticRel extends SVGPathSeg {
+ x: number;
+ x1: number;
+ y: number;
+ y1: number;
+}
+
+declare var SVGPathSegCurvetoQuadraticRel: {
+ prototype: SVGPathSegCurvetoQuadraticRel;
+ new(): SVGPathSegCurvetoQuadraticRel;
+}
+
+interface SVGPathSegCurvetoQuadraticSmoothAbs extends SVGPathSeg {
+ x: number;
+ y: number;
+}
+
+declare var SVGPathSegCurvetoQuadraticSmoothAbs: {
+ prototype: SVGPathSegCurvetoQuadraticSmoothAbs;
+ new(): SVGPathSegCurvetoQuadraticSmoothAbs;
+}
+
+interface SVGPathSegCurvetoQuadraticSmoothRel extends SVGPathSeg {
+ x: number;
+ y: number;
+}
+
+declare var SVGPathSegCurvetoQuadraticSmoothRel: {
+ prototype: SVGPathSegCurvetoQuadraticSmoothRel;
+ new(): SVGPathSegCurvetoQuadraticSmoothRel;
+}
+
+interface SVGPathSegLinetoAbs extends SVGPathSeg {
+ x: number;
+ y: number;
+}
+
+declare var SVGPathSegLinetoAbs: {
+ prototype: SVGPathSegLinetoAbs;
+ new(): SVGPathSegLinetoAbs;
+}
+
+interface SVGPathSegLinetoHorizontalAbs extends SVGPathSeg {
+ x: number;
+}
+
+declare var SVGPathSegLinetoHorizontalAbs: {
+ prototype: SVGPathSegLinetoHorizontalAbs;
+ new(): SVGPathSegLinetoHorizontalAbs;
+}
+
+interface SVGPathSegLinetoHorizontalRel extends SVGPathSeg {
+ x: number;
+}
+
+declare var SVGPathSegLinetoHorizontalRel: {
+ prototype: SVGPathSegLinetoHorizontalRel;
+ new(): SVGPathSegLinetoHorizontalRel;
+}
+
+interface SVGPathSegLinetoRel extends SVGPathSeg {
+ x: number;
+ y: number;
+}
+
+declare var SVGPathSegLinetoRel: {
+ prototype: SVGPathSegLinetoRel;
+ new(): SVGPathSegLinetoRel;
+}
+
+interface SVGPathSegLinetoVerticalAbs extends SVGPathSeg {
+ y: number;
+}
+
+declare var SVGPathSegLinetoVerticalAbs: {
+ prototype: SVGPathSegLinetoVerticalAbs;
+ new(): SVGPathSegLinetoVerticalAbs;
+}
+
+interface SVGPathSegLinetoVerticalRel extends SVGPathSeg {
+ y: number;
+}
+
+declare var SVGPathSegLinetoVerticalRel: {
+ prototype: SVGPathSegLinetoVerticalRel;
+ new(): SVGPathSegLinetoVerticalRel;
+}
+
+interface SVGPathSegList {
+ numberOfItems: number;
+ appendItem(newItem: SVGPathSeg): SVGPathSeg;
+ clear(): void;
+ getItem(index: number): SVGPathSeg;
+ initialize(newItem: SVGPathSeg): SVGPathSeg;
+ insertItemBefore(newItem: SVGPathSeg, index: number): SVGPathSeg;
+ removeItem(index: number): SVGPathSeg;
+ replaceItem(newItem: SVGPathSeg, index: number): SVGPathSeg;
+}
+
+declare var SVGPathSegList: {
+ prototype: SVGPathSegList;
+ new(): SVGPathSegList;
+}
+
+interface SVGPathSegMovetoAbs extends SVGPathSeg {
+ x: number;
+ y: number;
+}
+
+declare var SVGPathSegMovetoAbs: {
+ prototype: SVGPathSegMovetoAbs;
+ new(): SVGPathSegMovetoAbs;
+}
+
+interface SVGPathSegMovetoRel extends SVGPathSeg {
+ x: number;
+ y: number;
+}
+
+declare var SVGPathSegMovetoRel: {
+ prototype: SVGPathSegMovetoRel;
+ new(): SVGPathSegMovetoRel;
+}
+
+interface SVGPatternElement extends SVGElement, SVGStylable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired, SVGFitToViewBox, SVGURIReference, SVGUnitTypes {
+ height: SVGAnimatedLength;
+ patternContentUnits: SVGAnimatedEnumeration;
+ patternTransform: SVGAnimatedTransformList;
+ patternUnits: SVGAnimatedEnumeration;
+ width: SVGAnimatedLength;
+ x: SVGAnimatedLength;
+ y: SVGAnimatedLength;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGPatternElement: {
+ prototype: SVGPatternElement;
+ new(): SVGPatternElement;
+}
+
+interface SVGPoint {
+ x: number;
+ y: number;
+ matrixTransform(matrix: SVGMatrix): SVGPoint;
+}
+
+declare var SVGPoint: {
+ prototype: SVGPoint;
+ new(): SVGPoint;
+}
+
+interface SVGPointList {
+ numberOfItems: number;
+ appendItem(newItem: SVGPoint): SVGPoint;
+ clear(): void;
+ getItem(index: number): SVGPoint;
+ initialize(newItem: SVGPoint): SVGPoint;
+ insertItemBefore(newItem: SVGPoint, index: number): SVGPoint;
+ removeItem(index: number): SVGPoint;
+ replaceItem(newItem: SVGPoint, index: number): SVGPoint;
+}
+
+declare var SVGPointList: {
+ prototype: SVGPointList;
+ new(): SVGPointList;
+}
+
+interface SVGPolygonElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired, SVGAnimatedPoints {
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGPolygonElement: {
+ prototype: SVGPolygonElement;
+ new(): SVGPolygonElement;
+}
+
+interface SVGPolylineElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired, SVGAnimatedPoints {
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGPolylineElement: {
+ prototype: SVGPolylineElement;
+ new(): SVGPolylineElement;
+}
+
+interface SVGPreserveAspectRatio {
+ align: number;
+ meetOrSlice: number;
+ SVG_MEETORSLICE_MEET: number;
+ SVG_MEETORSLICE_SLICE: number;
+ SVG_MEETORSLICE_UNKNOWN: number;
+ SVG_PRESERVEASPECTRATIO_NONE: number;
+ SVG_PRESERVEASPECTRATIO_UNKNOWN: number;
+ SVG_PRESERVEASPECTRATIO_XMAXYMAX: number;
+ SVG_PRESERVEASPECTRATIO_XMAXYMID: number;
+ SVG_PRESERVEASPECTRATIO_XMAXYMIN: number;
+ SVG_PRESERVEASPECTRATIO_XMIDYMAX: number;
+ SVG_PRESERVEASPECTRATIO_XMIDYMID: number;
+ SVG_PRESERVEASPECTRATIO_XMIDYMIN: number;
+ SVG_PRESERVEASPECTRATIO_XMINYMAX: number;
+ SVG_PRESERVEASPECTRATIO_XMINYMID: number;
+ SVG_PRESERVEASPECTRATIO_XMINYMIN: number;
+}
+
+declare var SVGPreserveAspectRatio: {
+ prototype: SVGPreserveAspectRatio;
+ new(): SVGPreserveAspectRatio;
+ SVG_MEETORSLICE_MEET: number;
+ SVG_MEETORSLICE_SLICE: number;
+ SVG_MEETORSLICE_UNKNOWN: number;
+ SVG_PRESERVEASPECTRATIO_NONE: number;
+ SVG_PRESERVEASPECTRATIO_UNKNOWN: number;
+ SVG_PRESERVEASPECTRATIO_XMAXYMAX: number;
+ SVG_PRESERVEASPECTRATIO_XMAXYMID: number;
+ SVG_PRESERVEASPECTRATIO_XMAXYMIN: number;
+ SVG_PRESERVEASPECTRATIO_XMIDYMAX: number;
+ SVG_PRESERVEASPECTRATIO_XMIDYMID: number;
+ SVG_PRESERVEASPECTRATIO_XMIDYMIN: number;
+ SVG_PRESERVEASPECTRATIO_XMINYMAX: number;
+ SVG_PRESERVEASPECTRATIO_XMINYMID: number;
+ SVG_PRESERVEASPECTRATIO_XMINYMIN: number;
+}
+
+interface SVGRadialGradientElement extends SVGGradientElement {
+ cx: SVGAnimatedLength;
+ cy: SVGAnimatedLength;
+ fx: SVGAnimatedLength;
+ fy: SVGAnimatedLength;
+ r: SVGAnimatedLength;
+}
+
+declare var SVGRadialGradientElement: {
+ prototype: SVGRadialGradientElement;
+ new(): SVGRadialGradientElement;
+}
+
+interface SVGRect {
+ height: number;
+ width: number;
+ x: number;
+ y: number;
+}
+
+declare var SVGRect: {
+ prototype: SVGRect;
+ new(): SVGRect;
+}
+
+interface SVGRectElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired {
+ height: SVGAnimatedLength;
+ rx: SVGAnimatedLength;
+ ry: SVGAnimatedLength;
+ width: SVGAnimatedLength;
+ x: SVGAnimatedLength;
+ y: SVGAnimatedLength;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGRectElement: {
+ prototype: SVGRectElement;
+ new(): SVGRectElement;
+}
+
+interface SVGSVGElement extends SVGElement, DocumentEvent, SVGLocatable, SVGTests, SVGStylable, SVGLangSpace, SVGExternalResourcesRequired, SVGFitToViewBox, SVGZoomAndPan {
+ contentScriptType: string;
+ contentStyleType: string;
+ currentScale: number;
+ currentTranslate: SVGPoint;
+ height: SVGAnimatedLength;
+ onabort: (ev: Event) => any;
+ onerror: (ev: Event) => any;
+ onresize: (ev: UIEvent) => any;
+ onscroll: (ev: UIEvent) => any;
+ onunload: (ev: Event) => any;
+ onzoom: (ev: SVGZoomEvent) => any;
+ pixelUnitToMillimeterX: number;
+ pixelUnitToMillimeterY: number;
+ screenPixelToMillimeterX: number;
+ screenPixelToMillimeterY: number;
+ viewport: SVGRect;
+ width: SVGAnimatedLength;
+ x: SVGAnimatedLength;
+ y: SVGAnimatedLength;
+ checkEnclosure(element: SVGElement, rect: SVGRect): boolean;
+ checkIntersection(element: SVGElement, rect: SVGRect): boolean;
+ createSVGAngle(): SVGAngle;
+ createSVGLength(): SVGLength;
+ createSVGMatrix(): SVGMatrix;
+ createSVGNumber(): SVGNumber;
+ createSVGPoint(): SVGPoint;
+ createSVGRect(): SVGRect;
+ createSVGTransform(): SVGTransform;
+ createSVGTransformFromMatrix(matrix: SVGMatrix): SVGTransform;
+ deselectAll(): void;
+ forceRedraw(): void;
+ getComputedStyle(elt: Element, pseudoElt?: string): CSSStyleDeclaration;
+ getCurrentTime(): number;
+ getElementById(elementId: string): Element;
+ getEnclosureList(rect: SVGRect, referenceElement: SVGElement): NodeList;
+ getIntersectionList(rect: SVGRect, referenceElement: SVGElement): NodeList;
+ pauseAnimations(): void;
+ setCurrentTime(seconds: number): void;
+ suspendRedraw(maxWaitMilliseconds: number): number;
+ unpauseAnimations(): void;
+ unsuspendRedraw(suspendHandleID: number): void;
+ unsuspendRedrawAll(): void;
+ addEventListener(type: "MSGestureChange", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureDoubleTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureEnd", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureHold", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGotPointerCapture", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSInertiaStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSLostPointerCapture", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerCancel", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerDown", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerEnter", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerLeave", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerMove", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerOut", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerOver", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerUp", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "SVGAbort", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "SVGError", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "SVGUnload", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "SVGZoom", listener: (ev: SVGZoomEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "ariarequest", listener: (ev: AriaRequestEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "click", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "command", listener: (ev: CommandEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dblclick", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "focusin", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "focusout", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "gotpointercapture", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "lostpointercapture", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mousedown", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mousemove", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseout", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseover", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseup", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointercancel", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerdown", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerenter", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerleave", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointermove", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerout", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerover", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerup", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "resize", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "scroll", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "touchcancel", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "touchend", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "touchmove", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "touchstart", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "webkitfullscreenchange", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "webkitfullscreenerror", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "wheel", listener: (ev: WheelEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGSVGElement: {
+ prototype: SVGSVGElement;
+ new(): SVGSVGElement;
+}
+
+interface SVGScriptElement extends SVGElement, SVGExternalResourcesRequired, SVGURIReference {
+ type: string;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGScriptElement: {
+ prototype: SVGScriptElement;
+ new(): SVGScriptElement;
+}
+
+interface SVGStopElement extends SVGElement, SVGStylable {
+ offset: SVGAnimatedNumber;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGStopElement: {
+ prototype: SVGStopElement;
+ new(): SVGStopElement;
+}
+
+interface SVGStringList {
+ numberOfItems: number;
+ appendItem(newItem: string): string;
+ clear(): void;
+ getItem(index: number): string;
+ initialize(newItem: string): string;
+ insertItemBefore(newItem: string, index: number): string;
+ removeItem(index: number): string;
+ replaceItem(newItem: string, index: number): string;
+}
+
+declare var SVGStringList: {
+ prototype: SVGStringList;
+ new(): SVGStringList;
+}
+
+interface SVGStyleElement extends SVGElement, SVGLangSpace {
+ media: string;
+ title: string;
+ type: string;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGStyleElement: {
+ prototype: SVGStyleElement;
+ new(): SVGStyleElement;
+}
+
+interface SVGSwitchElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired {
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGSwitchElement: {
+ prototype: SVGSwitchElement;
+ new(): SVGSwitchElement;
+}
+
+interface SVGSymbolElement extends SVGElement, SVGStylable, SVGLangSpace, SVGExternalResourcesRequired, SVGFitToViewBox {
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGSymbolElement: {
+ prototype: SVGSymbolElement;
+ new(): SVGSymbolElement;
+}
+
+interface SVGTSpanElement extends SVGTextPositioningElement {
+}
+
+declare var SVGTSpanElement: {
+ prototype: SVGTSpanElement;
+ new(): SVGTSpanElement;
+}
+
+interface SVGTextContentElement extends SVGElement, SVGStylable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired {
+ lengthAdjust: SVGAnimatedEnumeration;
+ textLength: SVGAnimatedLength;
+ getCharNumAtPosition(point: SVGPoint): number;
+ getComputedTextLength(): number;
+ getEndPositionOfChar(charnum: number): SVGPoint;
+ getExtentOfChar(charnum: number): SVGRect;
+ getNumberOfChars(): number;
+ getRotationOfChar(charnum: number): number;
+ getStartPositionOfChar(charnum: number): SVGPoint;
+ getSubStringLength(charnum: number, nchars: number): number;
+ selectSubString(charnum: number, nchars: number): void;
+ LENGTHADJUST_SPACING: number;
+ LENGTHADJUST_SPACINGANDGLYPHS: number;
+ LENGTHADJUST_UNKNOWN: number;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGTextContentElement: {
+ prototype: SVGTextContentElement;
+ new(): SVGTextContentElement;
+ LENGTHADJUST_SPACING: number;
+ LENGTHADJUST_SPACINGANDGLYPHS: number;
+ LENGTHADJUST_UNKNOWN: number;
+}
+
+interface SVGTextElement extends SVGTextPositioningElement, SVGTransformable {
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGTextElement: {
+ prototype: SVGTextElement;
+ new(): SVGTextElement;
+}
+
+interface SVGTextPathElement extends SVGTextContentElement, SVGURIReference {
+ method: SVGAnimatedEnumeration;
+ spacing: SVGAnimatedEnumeration;
+ startOffset: SVGAnimatedLength;
+ TEXTPATH_METHODTYPE_ALIGN: number;
+ TEXTPATH_METHODTYPE_STRETCH: number;
+ TEXTPATH_METHODTYPE_UNKNOWN: number;
+ TEXTPATH_SPACINGTYPE_AUTO: number;
+ TEXTPATH_SPACINGTYPE_EXACT: number;
+ TEXTPATH_SPACINGTYPE_UNKNOWN: number;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGTextPathElement: {
+ prototype: SVGTextPathElement;
+ new(): SVGTextPathElement;
+ TEXTPATH_METHODTYPE_ALIGN: number;
+ TEXTPATH_METHODTYPE_STRETCH: number;
+ TEXTPATH_METHODTYPE_UNKNOWN: number;
+ TEXTPATH_SPACINGTYPE_AUTO: number;
+ TEXTPATH_SPACINGTYPE_EXACT: number;
+ TEXTPATH_SPACINGTYPE_UNKNOWN: number;
+}
+
+interface SVGTextPositioningElement extends SVGTextContentElement {
+ dx: SVGAnimatedLengthList;
+ dy: SVGAnimatedLengthList;
+ rotate: SVGAnimatedNumberList;
+ x: SVGAnimatedLengthList;
+ y: SVGAnimatedLengthList;
+}
+
+declare var SVGTextPositioningElement: {
+ prototype: SVGTextPositioningElement;
+ new(): SVGTextPositioningElement;
+}
+
+interface SVGTitleElement extends SVGElement, SVGStylable, SVGLangSpace {
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGTitleElement: {
+ prototype: SVGTitleElement;
+ new(): SVGTitleElement;
+}
+
+interface SVGTransform {
+ angle: number;
+ matrix: SVGMatrix;
+ type: number;
+ setMatrix(matrix: SVGMatrix): void;
+ setRotate(angle: number, cx: number, cy: number): void;
+ setScale(sx: number, sy: number): void;
+ setSkewX(angle: number): void;
+ setSkewY(angle: number): void;
+ setTranslate(tx: number, ty: number): void;
+ SVG_TRANSFORM_MATRIX: number;
+ SVG_TRANSFORM_ROTATE: number;
+ SVG_TRANSFORM_SCALE: number;
+ SVG_TRANSFORM_SKEWX: number;
+ SVG_TRANSFORM_SKEWY: number;
+ SVG_TRANSFORM_TRANSLATE: number;
+ SVG_TRANSFORM_UNKNOWN: number;
+}
+
+declare var SVGTransform: {
+ prototype: SVGTransform;
+ new(): SVGTransform;
+ SVG_TRANSFORM_MATRIX: number;
+ SVG_TRANSFORM_ROTATE: number;
+ SVG_TRANSFORM_SCALE: number;
+ SVG_TRANSFORM_SKEWX: number;
+ SVG_TRANSFORM_SKEWY: number;
+ SVG_TRANSFORM_TRANSLATE: number;
+ SVG_TRANSFORM_UNKNOWN: number;
+}
+
+interface SVGTransformList {
+ numberOfItems: number;
+ appendItem(newItem: SVGTransform): SVGTransform;
+ clear(): void;
+ consolidate(): SVGTransform;
+ createSVGTransformFromMatrix(matrix: SVGMatrix): SVGTransform;
+ getItem(index: number): SVGTransform;
+ initialize(newItem: SVGTransform): SVGTransform;
+ insertItemBefore(newItem: SVGTransform, index: number): SVGTransform;
+ removeItem(index: number): SVGTransform;
+ replaceItem(newItem: SVGTransform, index: number): SVGTransform;
+}
+
+declare var SVGTransformList: {
+ prototype: SVGTransformList;
+ new(): SVGTransformList;
+}
+
+interface SVGUnitTypes {
+ SVG_UNIT_TYPE_OBJECTBOUNDINGBOX: number;
+ SVG_UNIT_TYPE_UNKNOWN: number;
+ SVG_UNIT_TYPE_USERSPACEONUSE: number;
+}
+declare var SVGUnitTypes: SVGUnitTypes;
+
+interface SVGUseElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired, SVGURIReference {
+ animatedInstanceRoot: SVGElementInstance;
+ height: SVGAnimatedLength;
+ instanceRoot: SVGElementInstance;
+ width: SVGAnimatedLength;
+ x: SVGAnimatedLength;
+ y: SVGAnimatedLength;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGUseElement: {
+ prototype: SVGUseElement;
+ new(): SVGUseElement;
+}
+
+interface SVGViewElement extends SVGElement, SVGExternalResourcesRequired, SVGFitToViewBox, SVGZoomAndPan {
+ viewTarget: SVGStringList;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var SVGViewElement: {
+ prototype: SVGViewElement;
+ new(): SVGViewElement;
+}
+
+interface SVGZoomAndPan {
+ SVG_ZOOMANDPAN_DISABLE: number;
+ SVG_ZOOMANDPAN_MAGNIFY: number;
+ SVG_ZOOMANDPAN_UNKNOWN: number;
+}
+declare var SVGZoomAndPan: SVGZoomAndPan;
+
+interface SVGZoomEvent extends UIEvent {
+ newScale: number;
+ newTranslate: SVGPoint;
+ previousScale: number;
+ previousTranslate: SVGPoint;
+ zoomRectScreen: SVGRect;
+}
+
+declare var SVGZoomEvent: {
+ prototype: SVGZoomEvent;
+ new(): SVGZoomEvent;
+}
+
+interface Screen extends EventTarget {
+ availHeight: number;
+ availWidth: number;
+ bufferDepth: number;
+ colorDepth: number;
+ deviceXDPI: number;
+ deviceYDPI: number;
+ fontSmoothingEnabled: boolean;
+ height: number;
+ logicalXDPI: number;
+ logicalYDPI: number;
+ msOrientation: string;
+ onmsorientationchange: (ev: Event) => any;
+ pixelDepth: number;
+ systemXDPI: number;
+ systemYDPI: number;
+ width: number;
+ msLockOrientation(orientations: string | string[]): boolean;
+ msUnlockOrientation(): void;
+ addEventListener(type: "MSOrientationChange", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var Screen: {
+ prototype: Screen;
+ new(): Screen;
+}
+
+interface ScriptNotifyEvent extends Event {
+ callingUri: string;
+ value: string;
+}
+
+declare var ScriptNotifyEvent: {
+ prototype: ScriptNotifyEvent;
+ new(): ScriptNotifyEvent;
+}
+
+interface ScriptProcessorNode extends AudioNode {
+ bufferSize: number;
+ onaudioprocess: (ev: AudioProcessingEvent) => any;
+ addEventListener(type: "audioprocess", listener: (ev: AudioProcessingEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var ScriptProcessorNode: {
+ prototype: ScriptProcessorNode;
+ new(): ScriptProcessorNode;
+}
+
+interface Selection {
+ anchorNode: Node;
+ anchorOffset: number;
+ focusNode: Node;
+ focusOffset: number;
+ isCollapsed: boolean;
+ rangeCount: number;
+ type: string;
+ addRange(range: Range): void;
+ collapse(parentNode: Node, offset: number): void;
+ collapseToEnd(): void;
+ collapseToStart(): void;
+ containsNode(node: Node, partlyContained: boolean): boolean;
+ deleteFromDocument(): void;
+ empty(): void;
+ extend(newNode: Node, offset: number): void;
+ getRangeAt(index: number): Range;
+ removeAllRanges(): void;
+ removeRange(range: Range): void;
+ selectAllChildren(parentNode: Node): void;
+ setBaseAndExtent(baseNode: Node, baseOffset: number, extentNode: Node, extentOffset: number): void;
+ toString(): string;
+}
+
+declare var Selection: {
+ prototype: Selection;
+ new(): Selection;
+}
+
+interface SourceBuffer extends EventTarget {
+ appendWindowEnd: number;
+ appendWindowStart: number;
+ audioTracks: AudioTrackList;
+ buffered: TimeRanges;
+ mode: string;
+ timestampOffset: number;
+ updating: boolean;
+ videoTracks: VideoTrackList;
+ abort(): void;
+ appendBuffer(data: ArrayBuffer | ArrayBufferView): void;
+ appendStream(stream: MSStream, maxSize?: number): void;
+ remove(start: number, end: number): void;
+}
+
+declare var SourceBuffer: {
+ prototype: SourceBuffer;
+ new(): SourceBuffer;
+}
+
+interface SourceBufferList extends EventTarget {
+ length: number;
+ item(index: number): SourceBuffer;
+ [index: number]: SourceBuffer;
+}
+
+declare var SourceBufferList: {
+ prototype: SourceBufferList;
+ new(): SourceBufferList;
+}
+
+interface StereoPannerNode extends AudioNode {
+ pan: AudioParam;
+}
+
+declare var StereoPannerNode: {
+ prototype: StereoPannerNode;
+ new(): StereoPannerNode;
+}
+
+interface Storage {
+ length: number;
+ clear(): void;
+ getItem(key: string): any;
+ key(index: number): string;
+ removeItem(key: string): void;
+ setItem(key: string, data: string): void;
+ [key: string]: any;
+ [index: number]: string;
+}
+
+declare var Storage: {
+ prototype: Storage;
+ new(): Storage;
+}
+
+interface StorageEvent extends Event {
+ key: string;
+ newValue: any;
+ oldValue: any;
+ storageArea: Storage;
+ url: string;
+ initStorageEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, keyArg: string, oldValueArg: any, newValueArg: any, urlArg: string, storageAreaArg: Storage): void;
+}
+
+declare var StorageEvent: {
+ prototype: StorageEvent;
+ new(): StorageEvent;
+}
+
+interface StyleMedia {
+ type: string;
+ matchMedium(mediaquery: string): boolean;
+}
+
+declare var StyleMedia: {
+ prototype: StyleMedia;
+ new(): StyleMedia;
+}
+
+interface StyleSheet {
+ disabled: boolean;
+ href: string;
+ media: MediaList;
+ ownerNode: Node;
+ parentStyleSheet: StyleSheet;
+ title: string;
+ type: string;
+}
+
+declare var StyleSheet: {
+ prototype: StyleSheet;
+ new(): StyleSheet;
+}
+
+interface StyleSheetList {
+ length: number;
+ item(index?: number): StyleSheet;
+ [index: number]: StyleSheet;
+}
+
+declare var StyleSheetList: {
+ prototype: StyleSheetList;
+ new(): StyleSheetList;
+}
+
+interface StyleSheetPageList {
+ length: number;
+ item(index: number): CSSPageRule;
+ [index: number]: CSSPageRule;
+}
+
+declare var StyleSheetPageList: {
+ prototype: StyleSheetPageList;
+ new(): StyleSheetPageList;
+}
+
+interface SubtleCrypto {
+ decrypt(algorithm: string | Algorithm, key: CryptoKey, data: ArrayBufferView): any;
+ deriveBits(algorithm: string | Algorithm, baseKey: CryptoKey, length: number): any;
+ deriveKey(algorithm: string | Algorithm, baseKey: CryptoKey, derivedKeyType: string | Algorithm, extractable: boolean, keyUsages: string[]): any;
+ digest(algorithm: string | Algorithm, data: ArrayBufferView): any;
+ encrypt(algorithm: string | Algorithm, key: CryptoKey, data: ArrayBufferView): any;
+ exportKey(format: string, key: CryptoKey): any;
+ generateKey(algorithm: string | Algorithm, extractable: boolean, keyUsages: string[]): any;
+ importKey(format: string, keyData: ArrayBufferView, algorithm: string | Algorithm, extractable: boolean, keyUsages: string[]): any;
+ sign(algorithm: string | Algorithm, key: CryptoKey, data: ArrayBufferView): any;
+ unwrapKey(format: string, wrappedKey: ArrayBufferView, unwrappingKey: CryptoKey, unwrapAlgorithm: string | Algorithm, unwrappedKeyAlgorithm: string | Algorithm, extractable: boolean, keyUsages: string[]): any;
+ verify(algorithm: string | Algorithm, key: CryptoKey, signature: ArrayBufferView, data: ArrayBufferView): any;
+ wrapKey(format: string, key: CryptoKey, wrappingKey: CryptoKey, wrapAlgorithm: string | Algorithm): any;
+}
+
+declare var SubtleCrypto: {
+ prototype: SubtleCrypto;
+ new(): SubtleCrypto;
+}
+
+interface Text extends CharacterData {
+ wholeText: string;
+ replaceWholeText(content: string): Text;
+ splitText(offset: number): Text;
+}
+
+declare var Text: {
+ prototype: Text;
+ new(): Text;
+}
+
+interface TextEvent extends UIEvent {
+ data: string;
+ inputMethod: number;
+ locale: string;
+ initTextEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, dataArg: string, inputMethod: number, locale: string): void;
+ DOM_INPUT_METHOD_DROP: number;
+ DOM_INPUT_METHOD_HANDWRITING: number;
+ DOM_INPUT_METHOD_IME: number;
+ DOM_INPUT_METHOD_KEYBOARD: number;
+ DOM_INPUT_METHOD_MULTIMODAL: number;
+ DOM_INPUT_METHOD_OPTION: number;
+ DOM_INPUT_METHOD_PASTE: number;
+ DOM_INPUT_METHOD_SCRIPT: number;
+ DOM_INPUT_METHOD_UNKNOWN: number;
+ DOM_INPUT_METHOD_VOICE: number;
+}
+
+declare var TextEvent: {
+ prototype: TextEvent;
+ new(): TextEvent;
+ DOM_INPUT_METHOD_DROP: number;
+ DOM_INPUT_METHOD_HANDWRITING: number;
+ DOM_INPUT_METHOD_IME: number;
+ DOM_INPUT_METHOD_KEYBOARD: number;
+ DOM_INPUT_METHOD_MULTIMODAL: number;
+ DOM_INPUT_METHOD_OPTION: number;
+ DOM_INPUT_METHOD_PASTE: number;
+ DOM_INPUT_METHOD_SCRIPT: number;
+ DOM_INPUT_METHOD_UNKNOWN: number;
+ DOM_INPUT_METHOD_VOICE: number;
+}
+
+interface TextMetrics {
+ width: number;
+}
+
+declare var TextMetrics: {
+ prototype: TextMetrics;
+ new(): TextMetrics;
+}
+
+interface TextRange {
+ boundingHeight: number;
+ boundingLeft: number;
+ boundingTop: number;
+ boundingWidth: number;
+ htmlText: string;
+ offsetLeft: number;
+ offsetTop: number;
+ text: string;
+ collapse(start?: boolean): void;
+ compareEndPoints(how: string, sourceRange: TextRange): number;
+ duplicate(): TextRange;
+ execCommand(cmdID: string, showUI?: boolean, value?: any): boolean;
+ execCommandShowHelp(cmdID: string): boolean;
+ expand(Unit: string): boolean;
+ findText(string: string, count?: number, flags?: number): boolean;
+ getBookmark(): string;
+ getBoundingClientRect(): ClientRect;
+ getClientRects(): ClientRectList;
+ inRange(range: TextRange): boolean;
+ isEqual(range: TextRange): boolean;
+ move(unit: string, count?: number): number;
+ moveEnd(unit: string, count?: number): number;
+ moveStart(unit: string, count?: number): number;
+ moveToBookmark(bookmark: string): boolean;
+ moveToElementText(element: Element): void;
+ moveToPoint(x: number, y: number): void;
+ parentElement(): Element;
+ pasteHTML(html: string): void;
+ queryCommandEnabled(cmdID: string): boolean;
+ queryCommandIndeterm(cmdID: string): boolean;
+ queryCommandState(cmdID: string): boolean;
+ queryCommandSupported(cmdID: string): boolean;
+ queryCommandText(cmdID: string): string;
+ queryCommandValue(cmdID: string): any;
+ scrollIntoView(fStart?: boolean): void;
+ select(): void;
+ setEndPoint(how: string, SourceRange: TextRange): void;
+}
+
+declare var TextRange: {
+ prototype: TextRange;
+ new(): TextRange;
+}
+
+interface TextRangeCollection {
+ length: number;
+ item(index: number): TextRange;
+ [index: number]: TextRange;
+}
+
+declare var TextRangeCollection: {
+ prototype: TextRangeCollection;
+ new(): TextRangeCollection;
+}
+
+interface TextTrack extends EventTarget {
+ activeCues: TextTrackCueList;
+ cues: TextTrackCueList;
+ inBandMetadataTrackDispatchType: string;
+ kind: string;
+ label: string;
+ language: string;
+ mode: any;
+ oncuechange: (ev: Event) => any;
+ onerror: (ev: Event) => any;
+ onload: (ev: Event) => any;
+ readyState: number;
+ addCue(cue: TextTrackCue): void;
+ removeCue(cue: TextTrackCue): void;
+ DISABLED: number;
+ ERROR: number;
+ HIDDEN: number;
+ LOADED: number;
+ LOADING: number;
+ NONE: number;
+ SHOWING: number;
+ addEventListener(type: "cuechange", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var TextTrack: {
+ prototype: TextTrack;
+ new(): TextTrack;
+ DISABLED: number;
+ ERROR: number;
+ HIDDEN: number;
+ LOADED: number;
+ LOADING: number;
+ NONE: number;
+ SHOWING: number;
+}
+
+interface TextTrackCue extends EventTarget {
+ endTime: number;
+ id: string;
+ onenter: (ev: Event) => any;
+ onexit: (ev: Event) => any;
+ pauseOnExit: boolean;
+ startTime: number;
+ text: string;
+ track: TextTrack;
+ getCueAsHTML(): DocumentFragment;
+ addEventListener(type: "enter", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "exit", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var TextTrackCue: {
+ prototype: TextTrackCue;
+ new(startTime: number, endTime: number, text: string): TextTrackCue;
+}
+
+interface TextTrackCueList {
+ length: number;
+ getCueById(id: string): TextTrackCue;
+ item(index: number): TextTrackCue;
+ [index: number]: TextTrackCue;
+}
+
+declare var TextTrackCueList: {
+ prototype: TextTrackCueList;
+ new(): TextTrackCueList;
+}
+
+interface TextTrackList extends EventTarget {
+ length: number;
+ onaddtrack: (ev: TrackEvent) => any;
+ item(index: number): TextTrack;
+ addEventListener(type: "addtrack", listener: (ev: TrackEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+ [index: number]: TextTrack;
+}
+
+declare var TextTrackList: {
+ prototype: TextTrackList;
+ new(): TextTrackList;
+}
+
+interface TimeRanges {
+ length: number;
+ end(index: number): number;
+ start(index: number): number;
+}
+
+declare var TimeRanges: {
+ prototype: TimeRanges;
+ new(): TimeRanges;
+}
+
+interface Touch {
+ clientX: number;
+ clientY: number;
+ identifier: number;
+ pageX: number;
+ pageY: number;
+ screenX: number;
+ screenY: number;
+ target: EventTarget;
+}
+
+declare var Touch: {
+ prototype: Touch;
+ new(): Touch;
+}
+
+interface TouchEvent extends UIEvent {
+ altKey: boolean;
+ changedTouches: TouchList;
+ ctrlKey: boolean;
+ metaKey: boolean;
+ shiftKey: boolean;
+ targetTouches: TouchList;
+ touches: TouchList;
+}
+
+declare var TouchEvent: {
+ prototype: TouchEvent;
+ new(): TouchEvent;
+}
+
+interface TouchList {
+ length: number;
+ item(index: number): Touch;
+ [index: number]: Touch;
+}
+
+declare var TouchList: {
+ prototype: TouchList;
+ new(): TouchList;
+}
+
+interface TrackEvent extends Event {
+ track: any;
+}
+
+declare var TrackEvent: {
+ prototype: TrackEvent;
+ new(): TrackEvent;
+}
+
+interface TransitionEvent extends Event {
+ elapsedTime: number;
+ propertyName: string;
+ initTransitionEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, propertyNameArg: string, elapsedTimeArg: number): void;
+}
+
+declare var TransitionEvent: {
+ prototype: TransitionEvent;
+ new(): TransitionEvent;
+}
+
+interface TreeWalker {
+ currentNode: Node;
+ expandEntityReferences: boolean;
+ filter: NodeFilter;
+ root: Node;
+ whatToShow: number;
+ firstChild(): Node;
+ lastChild(): Node;
+ nextNode(): Node;
+ nextSibling(): Node;
+ parentNode(): Node;
+ previousNode(): Node;
+ previousSibling(): Node;
+}
+
+declare var TreeWalker: {
+ prototype: TreeWalker;
+ new(): TreeWalker;
+}
+
+interface UIEvent extends Event {
+ detail: number;
+ view: Window;
+ initUIEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number): void;
+}
+
+declare var UIEvent: {
+ prototype: UIEvent;
+ new(type: string, eventInitDict?: UIEventInit): UIEvent;
+}
+
+interface URL {
+ createObjectURL(object: any, options?: ObjectURLOptions): string;
+ revokeObjectURL(url: string): void;
+}
+declare var URL: URL;
+
+interface UnviewableContentIdentifiedEvent extends NavigationEventWithReferrer {
+ mediaType: string;
+}
+
+declare var UnviewableContentIdentifiedEvent: {
+ prototype: UnviewableContentIdentifiedEvent;
+ new(): UnviewableContentIdentifiedEvent;
+}
+
+interface ValidityState {
+ badInput: boolean;
+ customError: boolean;
+ patternMismatch: boolean;
+ rangeOverflow: boolean;
+ rangeUnderflow: boolean;
+ stepMismatch: boolean;
+ tooLong: boolean;
+ typeMismatch: boolean;
+ valid: boolean;
+ valueMissing: boolean;
+}
+
+declare var ValidityState: {
+ prototype: ValidityState;
+ new(): ValidityState;
+}
+
+interface VideoPlaybackQuality {
+ corruptedVideoFrames: number;
+ creationTime: number;
+ droppedVideoFrames: number;
+ totalFrameDelay: number;
+ totalVideoFrames: number;
+}
+
+declare var VideoPlaybackQuality: {
+ prototype: VideoPlaybackQuality;
+ new(): VideoPlaybackQuality;
+}
+
+interface VideoTrack {
+ id: string;
+ kind: string;
+ label: string;
+ language: string;
+ selected: boolean;
+ sourceBuffer: SourceBuffer;
+}
+
+declare var VideoTrack: {
+ prototype: VideoTrack;
+ new(): VideoTrack;
+}
+
+interface VideoTrackList extends EventTarget {
+ length: number;
+ onaddtrack: (ev: TrackEvent) => any;
+ onchange: (ev: Event) => any;
+ onremovetrack: (ev: TrackEvent) => any;
+ selectedIndex: number;
+ getTrackById(id: string): VideoTrack;
+ item(index: number): VideoTrack;
+ addEventListener(type: "addtrack", listener: (ev: TrackEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "change", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "removetrack", listener: (ev: TrackEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+ [index: number]: VideoTrack;
+}
+
+declare var VideoTrackList: {
+ prototype: VideoTrackList;
+ new(): VideoTrackList;
+}
+
+interface WEBGL_compressed_texture_s3tc {
+ COMPRESSED_RGBA_S3TC_DXT1_EXT: number;
+ COMPRESSED_RGBA_S3TC_DXT3_EXT: number;
+ COMPRESSED_RGBA_S3TC_DXT5_EXT: number;
+ COMPRESSED_RGB_S3TC_DXT1_EXT: number;
+}
+
+declare var WEBGL_compressed_texture_s3tc: {
+ prototype: WEBGL_compressed_texture_s3tc;
+ new(): WEBGL_compressed_texture_s3tc;
+ COMPRESSED_RGBA_S3TC_DXT1_EXT: number;
+ COMPRESSED_RGBA_S3TC_DXT3_EXT: number;
+ COMPRESSED_RGBA_S3TC_DXT5_EXT: number;
+ COMPRESSED_RGB_S3TC_DXT1_EXT: number;
+}
+
+interface WEBGL_debug_renderer_info {
+ UNMASKED_RENDERER_WEBGL: number;
+ UNMASKED_VENDOR_WEBGL: number;
+}
+
+declare var WEBGL_debug_renderer_info: {
+ prototype: WEBGL_debug_renderer_info;
+ new(): WEBGL_debug_renderer_info;
+ UNMASKED_RENDERER_WEBGL: number;
+ UNMASKED_VENDOR_WEBGL: number;
+}
+
+interface WEBGL_depth_texture {
+ UNSIGNED_INT_24_8_WEBGL: number;
+}
+
+declare var WEBGL_depth_texture: {
+ prototype: WEBGL_depth_texture;
+ new(): WEBGL_depth_texture;
+ UNSIGNED_INT_24_8_WEBGL: number;
+}
+
+interface WaveShaperNode extends AudioNode {
+ curve: Float32Array;
+ oversample: string;
+}
+
+declare var WaveShaperNode: {
+ prototype: WaveShaperNode;
+ new(): WaveShaperNode;
+}
+
+interface WebGLActiveInfo {
+ name: string;
+ size: number;
+ type: number;
+}
+
+declare var WebGLActiveInfo: {
+ prototype: WebGLActiveInfo;
+ new(): WebGLActiveInfo;
+}
+
+interface WebGLBuffer extends WebGLObject {
+}
+
+declare var WebGLBuffer: {
+ prototype: WebGLBuffer;
+ new(): WebGLBuffer;
+}
+
+interface WebGLContextEvent extends Event {
+ statusMessage: string;
+}
+
+declare var WebGLContextEvent: {
+ prototype: WebGLContextEvent;
+ new(): WebGLContextEvent;
+}
+
+interface WebGLFramebuffer extends WebGLObject {
+}
+
+declare var WebGLFramebuffer: {
+ prototype: WebGLFramebuffer;
+ new(): WebGLFramebuffer;
+}
+
+interface WebGLObject {
+}
+
+declare var WebGLObject: {
+ prototype: WebGLObject;
+ new(): WebGLObject;
+}
+
+interface WebGLProgram extends WebGLObject {
+}
+
+declare var WebGLProgram: {
+ prototype: WebGLProgram;
+ new(): WebGLProgram;
+}
+
+interface WebGLRenderbuffer extends WebGLObject {
+}
+
+declare var WebGLRenderbuffer: {
+ prototype: WebGLRenderbuffer;
+ new(): WebGLRenderbuffer;
+}
+
+interface WebGLRenderingContext {
+ canvas: HTMLCanvasElement;
+ drawingBufferHeight: number;
+ drawingBufferWidth: number;
+ activeTexture(texture: number): void;
+ attachShader(program: WebGLProgram, shader: WebGLShader): void;
+ bindAttribLocation(program: WebGLProgram, index: number, name: string): void;
+ bindBuffer(target: number, buffer: WebGLBuffer): void;
+ bindFramebuffer(target: number, framebuffer: WebGLFramebuffer): void;
+ bindRenderbuffer(target: number, renderbuffer: WebGLRenderbuffer): void;
+ bindTexture(target: number, texture: WebGLTexture): void;
+ blendColor(red: number, green: number, blue: number, alpha: number): void;
+ blendEquation(mode: number): void;
+ blendEquationSeparate(modeRGB: number, modeAlpha: number): void;
+ blendFunc(sfactor: number, dfactor: number): void;
+ blendFuncSeparate(srcRGB: number, dstRGB: number, srcAlpha: number, dstAlpha: number): void;
+ bufferData(target: number, size: number | ArrayBufferView | ArrayBuffer, usage: number): void;
+ bufferSubData(target: number, offset: number, data: ArrayBufferView | ArrayBuffer): void;
+ checkFramebufferStatus(target: number): number;
+ clear(mask: number): void;
+ clearColor(red: number, green: number, blue: number, alpha: number): void;
+ clearDepth(depth: number): void;
+ clearStencil(s: number): void;
+ colorMask(red: boolean, green: boolean, blue: boolean, alpha: boolean): void;
+ compileShader(shader: WebGLShader): void;
+ compressedTexImage2D(target: number, level: number, internalformat: number, width: number, height: number, border: number, data: ArrayBufferView): void;
+ compressedTexSubImage2D(target: number, level: number, xoffset: number, yoffset: number, width: number, height: number, format: number, data: ArrayBufferView): void;
+ copyTexImage2D(target: number, level: number, internalformat: number, x: number, y: number, width: number, height: number, border: number): void;
+ copyTexSubImage2D(target: number, level: number, xoffset: number, yoffset: number, x: number, y: number, width: number, height: number): void;
+ createBuffer(): WebGLBuffer;
+ createFramebuffer(): WebGLFramebuffer;
+ createProgram(): WebGLProgram;
+ createRenderbuffer(): WebGLRenderbuffer;
+ createShader(type: number): WebGLShader;
+ createTexture(): WebGLTexture;
+ cullFace(mode: number): void;
+ deleteBuffer(buffer: WebGLBuffer): void;
+ deleteFramebuffer(framebuffer: WebGLFramebuffer): void;
+ deleteProgram(program: WebGLProgram): void;
+ deleteRenderbuffer(renderbuffer: WebGLRenderbuffer): void;
+ deleteShader(shader: WebGLShader): void;
+ deleteTexture(texture: WebGLTexture): void;
+ depthFunc(func: number): void;
+ depthMask(flag: boolean): void;
+ depthRange(zNear: number, zFar: number): void;
+ detachShader(program: WebGLProgram, shader: WebGLShader): void;
+ disable(cap: number): void;
+ disableVertexAttribArray(index: number): void;
+ drawArrays(mode: number, first: number, count: number): void;
+ drawElements(mode: number, count: number, type: number, offset: number): void;
+ enable(cap: number): void;
+ enableVertexAttribArray(index: number): void;
+ finish(): void;
+ flush(): void;
+ framebufferRenderbuffer(target: number, attachment: number, renderbuffertarget: number, renderbuffer: WebGLRenderbuffer): void;
+ framebufferTexture2D(target: number, attachment: number, textarget: number, texture: WebGLTexture, level: number): void;
+ frontFace(mode: number): void;
+ generateMipmap(target: number): void;
+ getActiveAttrib(program: WebGLProgram, index: number): WebGLActiveInfo;
+ getActiveUniform(program: WebGLProgram, index: number): WebGLActiveInfo;
+ getAttachedShaders(program: WebGLProgram): WebGLShader[];
+ getAttribLocation(program: WebGLProgram, name: string): number;
+ getBufferParameter(target: number, pname: number): any;
+ getContextAttributes(): WebGLContextAttributes;
+ getError(): number;
+ getExtension(name: string): any;
+ getFramebufferAttachmentParameter(target: number, attachment: number, pname: number): any;
+ getParameter(pname: number): any;
+ getProgramInfoLog(program: WebGLProgram): string;
+ getProgramParameter(program: WebGLProgram, pname: number): any;
+ getRenderbufferParameter(target: number, pname: number): any;
+ getShaderInfoLog(shader: WebGLShader): string;
+ getShaderParameter(shader: WebGLShader, pname: number): any;
+ getShaderPrecisionFormat(shadertype: number, precisiontype: number): WebGLShaderPrecisionFormat;
+ getShaderSource(shader: WebGLShader): string;
+ getSupportedExtensions(): string[];
+ getTexParameter(target: number, pname: number): any;
+ getUniform(program: WebGLProgram, location: WebGLUniformLocation): any;
+ getUniformLocation(program: WebGLProgram, name: string): WebGLUniformLocation;
+ getVertexAttrib(index: number, pname: number): any;
+ getVertexAttribOffset(index: number, pname: number): number;
+ hint(target: number, mode: number): void;
+ isBuffer(buffer: WebGLBuffer): boolean;
+ isContextLost(): boolean;
+ isEnabled(cap: number): boolean;
+ isFramebuffer(framebuffer: WebGLFramebuffer): boolean;
+ isProgram(program: WebGLProgram): boolean;
+ isRenderbuffer(renderbuffer: WebGLRenderbuffer): boolean;
+ isShader(shader: WebGLShader): boolean;
+ isTexture(texture: WebGLTexture): boolean;
+ lineWidth(width: number): void;
+ linkProgram(program: WebGLProgram): void;
+ pixelStorei(pname: number, param: number): void;
+ polygonOffset(factor: number, units: number): void;
+ readPixels(x: number, y: number, width: number, height: number, format: number, type: number, pixels: ArrayBufferView): void;
+ renderbufferStorage(target: number, internalformat: number, width: number, height: number): void;
+ sampleCoverage(value: number, invert: boolean): void;
+ scissor(x: number, y: number, width: number, height: number): void;
+ shaderSource(shader: WebGLShader, source: string): void;
+ stencilFunc(func: number, ref: number, mask: number): void;
+ stencilFuncSeparate(face: number, func: number, ref: number, mask: number): void;
+ stencilMask(mask: number): void;
+ stencilMaskSeparate(face: number, mask: number): void;
+ stencilOp(fail: number, zfail: number, zpass: number): void;
+ stencilOpSeparate(face: number, fail: number, zfail: number, zpass: number): void;
+ texImage2D(target: number, level: number, internalformat: number, width: number, height: number, border: number, format: number, type: number, pixels: ArrayBufferView): void;
+ texImage2D(target: number, level: number, internalformat: number, format: number, type: number, image: HTMLImageElement): void;
+ texImage2D(target: number, level: number, internalformat: number, format: number, type: number, canvas: HTMLCanvasElement): void;
+ texImage2D(target: number, level: number, internalformat: number, format: number, type: number, video: HTMLVideoElement): void;
+ texImage2D(target: number, level: number, internalformat: number, format: number, type: number, pixels: ImageData): void;
+ texParameterf(target: number, pname: number, param: number): void;
+ texParameteri(target: number, pname: number, param: number): void;
+ texSubImage2D(target: number, level: number, xoffset: number, yoffset: number, width: number, height: number, format: number, type: number, pixels: ArrayBufferView): void;
+ texSubImage2D(target: number, level: number, xoffset: number, yoffset: number, format: number, type: number, image: HTMLImageElement): void;
+ texSubImage2D(target: number, level: number, xoffset: number, yoffset: number, format: number, type: number, canvas: HTMLCanvasElement): void;
+ texSubImage2D(target: number, level: number, xoffset: number, yoffset: number, format: number, type: number, video: HTMLVideoElement): void;
+ texSubImage2D(target: number, level: number, xoffset: number, yoffset: number, format: number, type: number, pixels: ImageData): void;
+ uniform1f(location: WebGLUniformLocation, x: number): void;
+ uniform1fv(location: WebGLUniformLocation, v: Float32Array): void;
+ uniform1i(location: WebGLUniformLocation, x: number): void;
+ uniform1iv(location: WebGLUniformLocation, v: Int32Array): void;
+ uniform2f(location: WebGLUniformLocation, x: number, y: number): void;
+ uniform2fv(location: WebGLUniformLocation, v: Float32Array): void;
+ uniform2i(location: WebGLUniformLocation, x: number, y: number): void;
+ uniform2iv(location: WebGLUniformLocation, v: Int32Array): void;
+ uniform3f(location: WebGLUniformLocation, x: number, y: number, z: number): void;
+ uniform3fv(location: WebGLUniformLocation, v: Float32Array): void;
+ uniform3i(location: WebGLUniformLocation, x: number, y: number, z: number): void;
+ uniform3iv(location: WebGLUniformLocation, v: Int32Array): void;
+ uniform4f(location: WebGLUniformLocation, x: number, y: number, z: number, w: number): void;
+ uniform4fv(location: WebGLUniformLocation, v: Float32Array): void;
+ uniform4i(location: WebGLUniformLocation, x: number, y: number, z: number, w: number): void;
+ uniform4iv(location: WebGLUniformLocation, v: Int32Array): void;
+ uniformMatrix2fv(location: WebGLUniformLocation, transpose: boolean, value: Float32Array): void;
+ uniformMatrix3fv(location: WebGLUniformLocation, transpose: boolean, value: Float32Array): void;
+ uniformMatrix4fv(location: WebGLUniformLocation, transpose: boolean, value: Float32Array): void;
+ useProgram(program: WebGLProgram): void;
+ validateProgram(program: WebGLProgram): void;
+ vertexAttrib1f(indx: number, x: number): void;
+ vertexAttrib1fv(indx: number, values: Float32Array): void;
+ vertexAttrib2f(indx: number, x: number, y: number): void;
+ vertexAttrib2fv(indx: number, values: Float32Array): void;
+ vertexAttrib3f(indx: number, x: number, y: number, z: number): void;
+ vertexAttrib3fv(indx: number, values: Float32Array): void;
+ vertexAttrib4f(indx: number, x: number, y: number, z: number, w: number): void;
+ vertexAttrib4fv(indx: number, values: Float32Array): void;
+ vertexAttribPointer(indx: number, size: number, type: number, normalized: boolean, stride: number, offset: number): void;
+ viewport(x: number, y: number, width: number, height: number): void;
+ ACTIVE_ATTRIBUTES: number;
+ ACTIVE_TEXTURE: number;
+ ACTIVE_UNIFORMS: number;
+ ALIASED_LINE_WIDTH_RANGE: number;
+ ALIASED_POINT_SIZE_RANGE: number;
+ ALPHA: number;
+ ALPHA_BITS: number;
+ ALWAYS: number;
+ ARRAY_BUFFER: number;
+ ARRAY_BUFFER_BINDING: number;
+ ATTACHED_SHADERS: number;
+ BACK: number;
+ BLEND: number;
+ BLEND_COLOR: number;
+ BLEND_DST_ALPHA: number;
+ BLEND_DST_RGB: number;
+ BLEND_EQUATION: number;
+ BLEND_EQUATION_ALPHA: number;
+ BLEND_EQUATION_RGB: number;
+ BLEND_SRC_ALPHA: number;
+ BLEND_SRC_RGB: number;
+ BLUE_BITS: number;
+ BOOL: number;
+ BOOL_VEC2: number;
+ BOOL_VEC3: number;
+ BOOL_VEC4: number;
+ BROWSER_DEFAULT_WEBGL: number;
+ BUFFER_SIZE: number;
+ BUFFER_USAGE: number;
+ BYTE: number;
+ CCW: number;
+ CLAMP_TO_EDGE: number;
+ COLOR_ATTACHMENT0: number;
+ COLOR_BUFFER_BIT: number;
+ COLOR_CLEAR_VALUE: number;
+ COLOR_WRITEMASK: number;
+ COMPILE_STATUS: number;
+ COMPRESSED_TEXTURE_FORMATS: number;
+ CONSTANT_ALPHA: number;
+ CONSTANT_COLOR: number;
+ CONTEXT_LOST_WEBGL: number;
+ CULL_FACE: number;
+ CULL_FACE_MODE: number;
+ CURRENT_PROGRAM: number;
+ CURRENT_VERTEX_ATTRIB: number;
+ CW: number;
+ DECR: number;
+ DECR_WRAP: number;
+ DELETE_STATUS: number;
+ DEPTH_ATTACHMENT: number;
+ DEPTH_BITS: number;
+ DEPTH_BUFFER_BIT: number;
+ DEPTH_CLEAR_VALUE: number;
+ DEPTH_COMPONENT: number;
+ DEPTH_COMPONENT16: number;
+ DEPTH_FUNC: number;
+ DEPTH_RANGE: number;
+ DEPTH_STENCIL: number;
+ DEPTH_STENCIL_ATTACHMENT: number;
+ DEPTH_TEST: number;
+ DEPTH_WRITEMASK: number;
+ DITHER: number;
+ DONT_CARE: number;
+ DST_ALPHA: number;
+ DST_COLOR: number;
+ DYNAMIC_DRAW: number;
+ ELEMENT_ARRAY_BUFFER: number;
+ ELEMENT_ARRAY_BUFFER_BINDING: number;
+ EQUAL: number;
+ FASTEST: number;
+ FLOAT: number;
+ FLOAT_MAT2: number;
+ FLOAT_MAT3: number;
+ FLOAT_MAT4: number;
+ FLOAT_VEC2: number;
+ FLOAT_VEC3: number;
+ FLOAT_VEC4: number;
+ FRAGMENT_SHADER: number;
+ FRAMEBUFFER: number;
+ FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: number;
+ FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE: number;
+ FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE: number;
+ FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL: number;
+ FRAMEBUFFER_BINDING: number;
+ FRAMEBUFFER_COMPLETE: number;
+ FRAMEBUFFER_INCOMPLETE_ATTACHMENT: number;
+ FRAMEBUFFER_INCOMPLETE_DIMENSIONS: number;
+ FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: number;
+ FRAMEBUFFER_UNSUPPORTED: number;
+ FRONT: number;
+ FRONT_AND_BACK: number;
+ FRONT_FACE: number;
+ FUNC_ADD: number;
+ FUNC_REVERSE_SUBTRACT: number;
+ FUNC_SUBTRACT: number;
+ GENERATE_MIPMAP_HINT: number;
+ GEQUAL: number;
+ GREATER: number;
+ GREEN_BITS: number;
+ HIGH_FLOAT: number;
+ HIGH_INT: number;
+ IMPLEMENTATION_COLOR_READ_FORMAT: number;
+ IMPLEMENTATION_COLOR_READ_TYPE: number;
+ INCR: number;
+ INCR_WRAP: number;
+ INT: number;
+ INT_VEC2: number;
+ INT_VEC3: number;
+ INT_VEC4: number;
+ INVALID_ENUM: number;
+ INVALID_FRAMEBUFFER_OPERATION: number;
+ INVALID_OPERATION: number;
+ INVALID_VALUE: number;
+ INVERT: number;
+ KEEP: number;
+ LEQUAL: number;
+ LESS: number;
+ LINEAR: number;
+ LINEAR_MIPMAP_LINEAR: number;
+ LINEAR_MIPMAP_NEAREST: number;
+ LINES: number;
+ LINE_LOOP: number;
+ LINE_STRIP: number;
+ LINE_WIDTH: number;
+ LINK_STATUS: number;
+ LOW_FLOAT: number;
+ LOW_INT: number;
+ LUMINANCE: number;
+ LUMINANCE_ALPHA: number;
+ MAX_COMBINED_TEXTURE_IMAGE_UNITS: number;
+ MAX_CUBE_MAP_TEXTURE_SIZE: number;
+ MAX_FRAGMENT_UNIFORM_VECTORS: number;
+ MAX_RENDERBUFFER_SIZE: number;
+ MAX_TEXTURE_IMAGE_UNITS: number;
+ MAX_TEXTURE_SIZE: number;
+ MAX_VARYING_VECTORS: number;
+ MAX_VERTEX_ATTRIBS: number;
+ MAX_VERTEX_TEXTURE_IMAGE_UNITS: number;
+ MAX_VERTEX_UNIFORM_VECTORS: number;
+ MAX_VIEWPORT_DIMS: number;
+ MEDIUM_FLOAT: number;
+ MEDIUM_INT: number;
+ MIRRORED_REPEAT: number;
+ NEAREST: number;
+ NEAREST_MIPMAP_LINEAR: number;
+ NEAREST_MIPMAP_NEAREST: number;
+ NEVER: number;
+ NICEST: number;
+ NONE: number;
+ NOTEQUAL: number;
+ NO_ERROR: number;
+ ONE: number;
+ ONE_MINUS_CONSTANT_ALPHA: number;
+ ONE_MINUS_CONSTANT_COLOR: number;
+ ONE_MINUS_DST_ALPHA: number;
+ ONE_MINUS_DST_COLOR: number;
+ ONE_MINUS_SRC_ALPHA: number;
+ ONE_MINUS_SRC_COLOR: number;
+ OUT_OF_MEMORY: number;
+ PACK_ALIGNMENT: number;
+ POINTS: number;
+ POLYGON_OFFSET_FACTOR: number;
+ POLYGON_OFFSET_FILL: number;
+ POLYGON_OFFSET_UNITS: number;
+ RED_BITS: number;
+ RENDERBUFFER: number;
+ RENDERBUFFER_ALPHA_SIZE: number;
+ RENDERBUFFER_BINDING: number;
+ RENDERBUFFER_BLUE_SIZE: number;
+ RENDERBUFFER_DEPTH_SIZE: number;
+ RENDERBUFFER_GREEN_SIZE: number;
+ RENDERBUFFER_HEIGHT: number;
+ RENDERBUFFER_INTERNAL_FORMAT: number;
+ RENDERBUFFER_RED_SIZE: number;
+ RENDERBUFFER_STENCIL_SIZE: number;
+ RENDERBUFFER_WIDTH: number;
+ RENDERER: number;
+ REPEAT: number;
+ REPLACE: number;
+ RGB: number;
+ RGB565: number;
+ RGB5_A1: number;
+ RGBA: number;
+ RGBA4: number;
+ SAMPLER_2D: number;
+ SAMPLER_CUBE: number;
+ SAMPLES: number;
+ SAMPLE_ALPHA_TO_COVERAGE: number;
+ SAMPLE_BUFFERS: number;
+ SAMPLE_COVERAGE: number;
+ SAMPLE_COVERAGE_INVERT: number;
+ SAMPLE_COVERAGE_VALUE: number;
+ SCISSOR_BOX: number;
+ SCISSOR_TEST: number;
+ SHADER_TYPE: number;
+ SHADING_LANGUAGE_VERSION: number;
+ SHORT: number;
+ SRC_ALPHA: number;
+ SRC_ALPHA_SATURATE: number;
+ SRC_COLOR: number;
+ STATIC_DRAW: number;
+ STENCIL_ATTACHMENT: number;
+ STENCIL_BACK_FAIL: number;
+ STENCIL_BACK_FUNC: number;
+ STENCIL_BACK_PASS_DEPTH_FAIL: number;
+ STENCIL_BACK_PASS_DEPTH_PASS: number;
+ STENCIL_BACK_REF: number;
+ STENCIL_BACK_VALUE_MASK: number;
+ STENCIL_BACK_WRITEMASK: number;
+ STENCIL_BITS: number;
+ STENCIL_BUFFER_BIT: number;
+ STENCIL_CLEAR_VALUE: number;
+ STENCIL_FAIL: number;
+ STENCIL_FUNC: number;
+ STENCIL_INDEX: number;
+ STENCIL_INDEX8: number;
+ STENCIL_PASS_DEPTH_FAIL: number;
+ STENCIL_PASS_DEPTH_PASS: number;
+ STENCIL_REF: number;
+ STENCIL_TEST: number;
+ STENCIL_VALUE_MASK: number;
+ STENCIL_WRITEMASK: number;
+ STREAM_DRAW: number;
+ SUBPIXEL_BITS: number;
+ TEXTURE: number;
+ TEXTURE0: number;
+ TEXTURE1: number;
+ TEXTURE10: number;
+ TEXTURE11: number;
+ TEXTURE12: number;
+ TEXTURE13: number;
+ TEXTURE14: number;
+ TEXTURE15: number;
+ TEXTURE16: number;
+ TEXTURE17: number;
+ TEXTURE18: number;
+ TEXTURE19: number;
+ TEXTURE2: number;
+ TEXTURE20: number;
+ TEXTURE21: number;
+ TEXTURE22: number;
+ TEXTURE23: number;
+ TEXTURE24: number;
+ TEXTURE25: number;
+ TEXTURE26: number;
+ TEXTURE27: number;
+ TEXTURE28: number;
+ TEXTURE29: number;
+ TEXTURE3: number;
+ TEXTURE30: number;
+ TEXTURE31: number;
+ TEXTURE4: number;
+ TEXTURE5: number;
+ TEXTURE6: number;
+ TEXTURE7: number;
+ TEXTURE8: number;
+ TEXTURE9: number;
+ TEXTURE_2D: number;
+ TEXTURE_BINDING_2D: number;
+ TEXTURE_BINDING_CUBE_MAP: number;
+ TEXTURE_CUBE_MAP: number;
+ TEXTURE_CUBE_MAP_NEGATIVE_X: number;
+ TEXTURE_CUBE_MAP_NEGATIVE_Y: number;
+ TEXTURE_CUBE_MAP_NEGATIVE_Z: number;
+ TEXTURE_CUBE_MAP_POSITIVE_X: number;
+ TEXTURE_CUBE_MAP_POSITIVE_Y: number;
+ TEXTURE_CUBE_MAP_POSITIVE_Z: number;
+ TEXTURE_MAG_FILTER: number;
+ TEXTURE_MIN_FILTER: number;
+ TEXTURE_WRAP_S: number;
+ TEXTURE_WRAP_T: number;
+ TRIANGLES: number;
+ TRIANGLE_FAN: number;
+ TRIANGLE_STRIP: number;
+ UNPACK_ALIGNMENT: number;
+ UNPACK_COLORSPACE_CONVERSION_WEBGL: number;
+ UNPACK_FLIP_Y_WEBGL: number;
+ UNPACK_PREMULTIPLY_ALPHA_WEBGL: number;
+ UNSIGNED_BYTE: number;
+ UNSIGNED_INT: number;
+ UNSIGNED_SHORT: number;
+ UNSIGNED_SHORT_4_4_4_4: number;
+ UNSIGNED_SHORT_5_5_5_1: number;
+ UNSIGNED_SHORT_5_6_5: number;
+ VALIDATE_STATUS: number;
+ VENDOR: number;
+ VERSION: number;
+ VERTEX_ATTRIB_ARRAY_BUFFER_BINDING: number;
+ VERTEX_ATTRIB_ARRAY_ENABLED: number;
+ VERTEX_ATTRIB_ARRAY_NORMALIZED: number;
+ VERTEX_ATTRIB_ARRAY_POINTER: number;
+ VERTEX_ATTRIB_ARRAY_SIZE: number;
+ VERTEX_ATTRIB_ARRAY_STRIDE: number;
+ VERTEX_ATTRIB_ARRAY_TYPE: number;
+ VERTEX_SHADER: number;
+ VIEWPORT: number;
+ ZERO: number;
+}
+
+declare var WebGLRenderingContext: {
+ prototype: WebGLRenderingContext;
+ new(): WebGLRenderingContext;
+ ACTIVE_ATTRIBUTES: number;
+ ACTIVE_TEXTURE: number;
+ ACTIVE_UNIFORMS: number;
+ ALIASED_LINE_WIDTH_RANGE: number;
+ ALIASED_POINT_SIZE_RANGE: number;
+ ALPHA: number;
+ ALPHA_BITS: number;
+ ALWAYS: number;
+ ARRAY_BUFFER: number;
+ ARRAY_BUFFER_BINDING: number;
+ ATTACHED_SHADERS: number;
+ BACK: number;
+ BLEND: number;
+ BLEND_COLOR: number;
+ BLEND_DST_ALPHA: number;
+ BLEND_DST_RGB: number;
+ BLEND_EQUATION: number;
+ BLEND_EQUATION_ALPHA: number;
+ BLEND_EQUATION_RGB: number;
+ BLEND_SRC_ALPHA: number;
+ BLEND_SRC_RGB: number;
+ BLUE_BITS: number;
+ BOOL: number;
+ BOOL_VEC2: number;
+ BOOL_VEC3: number;
+ BOOL_VEC4: number;
+ BROWSER_DEFAULT_WEBGL: number;
+ BUFFER_SIZE: number;
+ BUFFER_USAGE: number;
+ BYTE: number;
+ CCW: number;
+ CLAMP_TO_EDGE: number;
+ COLOR_ATTACHMENT0: number;
+ COLOR_BUFFER_BIT: number;
+ COLOR_CLEAR_VALUE: number;
+ COLOR_WRITEMASK: number;
+ COMPILE_STATUS: number;
+ COMPRESSED_TEXTURE_FORMATS: number;
+ CONSTANT_ALPHA: number;
+ CONSTANT_COLOR: number;
+ CONTEXT_LOST_WEBGL: number;
+ CULL_FACE: number;
+ CULL_FACE_MODE: number;
+ CURRENT_PROGRAM: number;
+ CURRENT_VERTEX_ATTRIB: number;
+ CW: number;
+ DECR: number;
+ DECR_WRAP: number;
+ DELETE_STATUS: number;
+ DEPTH_ATTACHMENT: number;
+ DEPTH_BITS: number;
+ DEPTH_BUFFER_BIT: number;
+ DEPTH_CLEAR_VALUE: number;
+ DEPTH_COMPONENT: number;
+ DEPTH_COMPONENT16: number;
+ DEPTH_FUNC: number;
+ DEPTH_RANGE: number;
+ DEPTH_STENCIL: number;
+ DEPTH_STENCIL_ATTACHMENT: number;
+ DEPTH_TEST: number;
+ DEPTH_WRITEMASK: number;
+ DITHER: number;
+ DONT_CARE: number;
+ DST_ALPHA: number;
+ DST_COLOR: number;
+ DYNAMIC_DRAW: number;
+ ELEMENT_ARRAY_BUFFER: number;
+ ELEMENT_ARRAY_BUFFER_BINDING: number;
+ EQUAL: number;
+ FASTEST: number;
+ FLOAT: number;
+ FLOAT_MAT2: number;
+ FLOAT_MAT3: number;
+ FLOAT_MAT4: number;
+ FLOAT_VEC2: number;
+ FLOAT_VEC3: number;
+ FLOAT_VEC4: number;
+ FRAGMENT_SHADER: number;
+ FRAMEBUFFER: number;
+ FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: number;
+ FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE: number;
+ FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE: number;
+ FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL: number;
+ FRAMEBUFFER_BINDING: number;
+ FRAMEBUFFER_COMPLETE: number;
+ FRAMEBUFFER_INCOMPLETE_ATTACHMENT: number;
+ FRAMEBUFFER_INCOMPLETE_DIMENSIONS: number;
+ FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: number;
+ FRAMEBUFFER_UNSUPPORTED: number;
+ FRONT: number;
+ FRONT_AND_BACK: number;
+ FRONT_FACE: number;
+ FUNC_ADD: number;
+ FUNC_REVERSE_SUBTRACT: number;
+ FUNC_SUBTRACT: number;
+ GENERATE_MIPMAP_HINT: number;
+ GEQUAL: number;
+ GREATER: number;
+ GREEN_BITS: number;
+ HIGH_FLOAT: number;
+ HIGH_INT: number;
+ IMPLEMENTATION_COLOR_READ_FORMAT: number;
+ IMPLEMENTATION_COLOR_READ_TYPE: number;
+ INCR: number;
+ INCR_WRAP: number;
+ INT: number;
+ INT_VEC2: number;
+ INT_VEC3: number;
+ INT_VEC4: number;
+ INVALID_ENUM: number;
+ INVALID_FRAMEBUFFER_OPERATION: number;
+ INVALID_OPERATION: number;
+ INVALID_VALUE: number;
+ INVERT: number;
+ KEEP: number;
+ LEQUAL: number;
+ LESS: number;
+ LINEAR: number;
+ LINEAR_MIPMAP_LINEAR: number;
+ LINEAR_MIPMAP_NEAREST: number;
+ LINES: number;
+ LINE_LOOP: number;
+ LINE_STRIP: number;
+ LINE_WIDTH: number;
+ LINK_STATUS: number;
+ LOW_FLOAT: number;
+ LOW_INT: number;
+ LUMINANCE: number;
+ LUMINANCE_ALPHA: number;
+ MAX_COMBINED_TEXTURE_IMAGE_UNITS: number;
+ MAX_CUBE_MAP_TEXTURE_SIZE: number;
+ MAX_FRAGMENT_UNIFORM_VECTORS: number;
+ MAX_RENDERBUFFER_SIZE: number;
+ MAX_TEXTURE_IMAGE_UNITS: number;
+ MAX_TEXTURE_SIZE: number;
+ MAX_VARYING_VECTORS: number;
+ MAX_VERTEX_ATTRIBS: number;
+ MAX_VERTEX_TEXTURE_IMAGE_UNITS: number;
+ MAX_VERTEX_UNIFORM_VECTORS: number;
+ MAX_VIEWPORT_DIMS: number;
+ MEDIUM_FLOAT: number;
+ MEDIUM_INT: number;
+ MIRRORED_REPEAT: number;
+ NEAREST: number;
+ NEAREST_MIPMAP_LINEAR: number;
+ NEAREST_MIPMAP_NEAREST: number;
+ NEVER: number;
+ NICEST: number;
+ NONE: number;
+ NOTEQUAL: number;
+ NO_ERROR: number;
+ ONE: number;
+ ONE_MINUS_CONSTANT_ALPHA: number;
+ ONE_MINUS_CONSTANT_COLOR: number;
+ ONE_MINUS_DST_ALPHA: number;
+ ONE_MINUS_DST_COLOR: number;
+ ONE_MINUS_SRC_ALPHA: number;
+ ONE_MINUS_SRC_COLOR: number;
+ OUT_OF_MEMORY: number;
+ PACK_ALIGNMENT: number;
+ POINTS: number;
+ POLYGON_OFFSET_FACTOR: number;
+ POLYGON_OFFSET_FILL: number;
+ POLYGON_OFFSET_UNITS: number;
+ RED_BITS: number;
+ RENDERBUFFER: number;
+ RENDERBUFFER_ALPHA_SIZE: number;
+ RENDERBUFFER_BINDING: number;
+ RENDERBUFFER_BLUE_SIZE: number;
+ RENDERBUFFER_DEPTH_SIZE: number;
+ RENDERBUFFER_GREEN_SIZE: number;
+ RENDERBUFFER_HEIGHT: number;
+ RENDERBUFFER_INTERNAL_FORMAT: number;
+ RENDERBUFFER_RED_SIZE: number;
+ RENDERBUFFER_STENCIL_SIZE: number;
+ RENDERBUFFER_WIDTH: number;
+ RENDERER: number;
+ REPEAT: number;
+ REPLACE: number;
+ RGB: number;
+ RGB565: number;
+ RGB5_A1: number;
+ RGBA: number;
+ RGBA4: number;
+ SAMPLER_2D: number;
+ SAMPLER_CUBE: number;
+ SAMPLES: number;
+ SAMPLE_ALPHA_TO_COVERAGE: number;
+ SAMPLE_BUFFERS: number;
+ SAMPLE_COVERAGE: number;
+ SAMPLE_COVERAGE_INVERT: number;
+ SAMPLE_COVERAGE_VALUE: number;
+ SCISSOR_BOX: number;
+ SCISSOR_TEST: number;
+ SHADER_TYPE: number;
+ SHADING_LANGUAGE_VERSION: number;
+ SHORT: number;
+ SRC_ALPHA: number;
+ SRC_ALPHA_SATURATE: number;
+ SRC_COLOR: number;
+ STATIC_DRAW: number;
+ STENCIL_ATTACHMENT: number;
+ STENCIL_BACK_FAIL: number;
+ STENCIL_BACK_FUNC: number;
+ STENCIL_BACK_PASS_DEPTH_FAIL: number;
+ STENCIL_BACK_PASS_DEPTH_PASS: number;
+ STENCIL_BACK_REF: number;
+ STENCIL_BACK_VALUE_MASK: number;
+ STENCIL_BACK_WRITEMASK: number;
+ STENCIL_BITS: number;
+ STENCIL_BUFFER_BIT: number;
+ STENCIL_CLEAR_VALUE: number;
+ STENCIL_FAIL: number;
+ STENCIL_FUNC: number;
+ STENCIL_INDEX: number;
+ STENCIL_INDEX8: number;
+ STENCIL_PASS_DEPTH_FAIL: number;
+ STENCIL_PASS_DEPTH_PASS: number;
+ STENCIL_REF: number;
+ STENCIL_TEST: number;
+ STENCIL_VALUE_MASK: number;
+ STENCIL_WRITEMASK: number;
+ STREAM_DRAW: number;
+ SUBPIXEL_BITS: number;
+ TEXTURE: number;
+ TEXTURE0: number;
+ TEXTURE1: number;
+ TEXTURE10: number;
+ TEXTURE11: number;
+ TEXTURE12: number;
+ TEXTURE13: number;
+ TEXTURE14: number;
+ TEXTURE15: number;
+ TEXTURE16: number;
+ TEXTURE17: number;
+ TEXTURE18: number;
+ TEXTURE19: number;
+ TEXTURE2: number;
+ TEXTURE20: number;
+ TEXTURE21: number;
+ TEXTURE22: number;
+ TEXTURE23: number;
+ TEXTURE24: number;
+ TEXTURE25: number;
+ TEXTURE26: number;
+ TEXTURE27: number;
+ TEXTURE28: number;
+ TEXTURE29: number;
+ TEXTURE3: number;
+ TEXTURE30: number;
+ TEXTURE31: number;
+ TEXTURE4: number;
+ TEXTURE5: number;
+ TEXTURE6: number;
+ TEXTURE7: number;
+ TEXTURE8: number;
+ TEXTURE9: number;
+ TEXTURE_2D: number;
+ TEXTURE_BINDING_2D: number;
+ TEXTURE_BINDING_CUBE_MAP: number;
+ TEXTURE_CUBE_MAP: number;
+ TEXTURE_CUBE_MAP_NEGATIVE_X: number;
+ TEXTURE_CUBE_MAP_NEGATIVE_Y: number;
+ TEXTURE_CUBE_MAP_NEGATIVE_Z: number;
+ TEXTURE_CUBE_MAP_POSITIVE_X: number;
+ TEXTURE_CUBE_MAP_POSITIVE_Y: number;
+ TEXTURE_CUBE_MAP_POSITIVE_Z: number;
+ TEXTURE_MAG_FILTER: number;
+ TEXTURE_MIN_FILTER: number;
+ TEXTURE_WRAP_S: number;
+ TEXTURE_WRAP_T: number;
+ TRIANGLES: number;
+ TRIANGLE_FAN: number;
+ TRIANGLE_STRIP: number;
+ UNPACK_ALIGNMENT: number;
+ UNPACK_COLORSPACE_CONVERSION_WEBGL: number;
+ UNPACK_FLIP_Y_WEBGL: number;
+ UNPACK_PREMULTIPLY_ALPHA_WEBGL: number;
+ UNSIGNED_BYTE: number;
+ UNSIGNED_INT: number;
+ UNSIGNED_SHORT: number;
+ UNSIGNED_SHORT_4_4_4_4: number;
+ UNSIGNED_SHORT_5_5_5_1: number;
+ UNSIGNED_SHORT_5_6_5: number;
+ VALIDATE_STATUS: number;
+ VENDOR: number;
+ VERSION: number;
+ VERTEX_ATTRIB_ARRAY_BUFFER_BINDING: number;
+ VERTEX_ATTRIB_ARRAY_ENABLED: number;
+ VERTEX_ATTRIB_ARRAY_NORMALIZED: number;
+ VERTEX_ATTRIB_ARRAY_POINTER: number;
+ VERTEX_ATTRIB_ARRAY_SIZE: number;
+ VERTEX_ATTRIB_ARRAY_STRIDE: number;
+ VERTEX_ATTRIB_ARRAY_TYPE: number;
+ VERTEX_SHADER: number;
+ VIEWPORT: number;
+ ZERO: number;
+}
+
+interface WebGLShader extends WebGLObject {
+}
+
+declare var WebGLShader: {
+ prototype: WebGLShader;
+ new(): WebGLShader;
+}
+
+interface WebGLShaderPrecisionFormat {
+ precision: number;
+ rangeMax: number;
+ rangeMin: number;
+}
+
+declare var WebGLShaderPrecisionFormat: {
+ prototype: WebGLShaderPrecisionFormat;
+ new(): WebGLShaderPrecisionFormat;
+}
+
+interface WebGLTexture extends WebGLObject {
+}
+
+declare var WebGLTexture: {
+ prototype: WebGLTexture;
+ new(): WebGLTexture;
+}
+
+interface WebGLUniformLocation {
+}
+
+declare var WebGLUniformLocation: {
+ prototype: WebGLUniformLocation;
+ new(): WebGLUniformLocation;
+}
+
+interface WebKitCSSMatrix {
+ a: number;
+ b: number;
+ c: number;
+ d: number;
+ e: number;
+ f: number;
+ m11: number;
+ m12: number;
+ m13: number;
+ m14: number;
+ m21: number;
+ m22: number;
+ m23: number;
+ m24: number;
+ m31: number;
+ m32: number;
+ m33: number;
+ m34: number;
+ m41: number;
+ m42: number;
+ m43: number;
+ m44: number;
+ inverse(): WebKitCSSMatrix;
+ multiply(secondMatrix: WebKitCSSMatrix): WebKitCSSMatrix;
+ rotate(angleX: number, angleY?: number, angleZ?: number): WebKitCSSMatrix;
+ rotateAxisAngle(x: number, y: number, z: number, angle: number): WebKitCSSMatrix;
+ scale(scaleX: number, scaleY?: number, scaleZ?: number): WebKitCSSMatrix;
+ setMatrixValue(value: string): void;
+ skewX(angle: number): WebKitCSSMatrix;
+ skewY(angle: number): WebKitCSSMatrix;
+ toString(): string;
+ translate(x: number, y: number, z?: number): WebKitCSSMatrix;
+}
+
+declare var WebKitCSSMatrix: {
+ prototype: WebKitCSSMatrix;
+ new(text?: string): WebKitCSSMatrix;
+}
+
+interface WebKitPoint {
+ x: number;
+ y: number;
+}
+
+declare var WebKitPoint: {
+ prototype: WebKitPoint;
+ new(x?: number, y?: number): WebKitPoint;
+}
+
+interface WebSocket extends EventTarget {
+ binaryType: string;
+ bufferedAmount: number;
+ extensions: string;
+ onclose: (ev: CloseEvent) => any;
+ onerror: (ev: Event) => any;
+ onmessage: (ev: MessageEvent) => any;
+ onopen: (ev: Event) => any;
+ protocol: string;
+ readyState: number;
+ url: string;
+ close(code?: number, reason?: string): void;
+ send(data: any): void;
+ CLOSED: number;
+ CLOSING: number;
+ CONNECTING: number;
+ OPEN: number;
+ addEventListener(type: "close", listener: (ev: CloseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "message", listener: (ev: MessageEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "open", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var WebSocket: {
+ prototype: WebSocket;
+ new(url: string, protocols?: string | string[]): WebSocket;
+ CLOSED: number;
+ CLOSING: number;
+ CONNECTING: number;
+ OPEN: number;
+}
+
+interface WheelEvent extends MouseEvent {
+ deltaMode: number;
+ deltaX: number;
+ deltaY: number;
+ deltaZ: number;
+ getCurrentPoint(element: Element): void;
+ initWheelEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, buttonArg: number, relatedTargetArg: EventTarget, modifiersListArg: string, deltaXArg: number, deltaYArg: number, deltaZArg: number, deltaMode: number): void;
+ DOM_DELTA_LINE: number;
+ DOM_DELTA_PAGE: number;
+ DOM_DELTA_PIXEL: number;
+}
+
+declare var WheelEvent: {
+ prototype: WheelEvent;
+ new(typeArg: string, eventInitDict?: WheelEventInit): WheelEvent;
+ DOM_DELTA_LINE: number;
+ DOM_DELTA_PAGE: number;
+ DOM_DELTA_PIXEL: number;
+}
+
+interface Window extends EventTarget, WindowTimers, WindowSessionStorage, WindowLocalStorage, WindowConsole, GlobalEventHandlers, IDBEnvironment, WindowBase64 {
+ animationStartTime: number;
+ applicationCache: ApplicationCache;
+ clientInformation: Navigator;
+ closed: boolean;
+ crypto: Crypto;
+ defaultStatus: string;
+ devicePixelRatio: number;
+ doNotTrack: string;
+ document: Document;
+ event: Event;
+ external: External;
+ frameElement: Element;
+ frames: Window;
+ history: History;
+ innerHeight: number;
+ innerWidth: number;
+ length: number;
+ location: Location;
+ locationbar: BarProp;
+ menubar: BarProp;
+ msAnimationStartTime: number;
+ name: string;
+ navigator: Navigator;
+ offscreenBuffering: string | boolean;
+ onabort: (ev: Event) => any;
+ onafterprint: (ev: Event) => any;
+ onbeforeprint: (ev: Event) => any;
+ onbeforeunload: (ev: BeforeUnloadEvent) => any;
+ onblur: (ev: FocusEvent) => any;
+ oncanplay: (ev: Event) => any;
+ oncanplaythrough: (ev: Event) => any;
+ onchange: (ev: Event) => any;
+ onclick: (ev: MouseEvent) => any;
+ oncompassneedscalibration: (ev: Event) => any;
+ oncontextmenu: (ev: PointerEvent) => any;
+ ondblclick: (ev: MouseEvent) => any;
+ ondevicemotion: (ev: DeviceMotionEvent) => any;
+ ondeviceorientation: (ev: DeviceOrientationEvent) => any;
+ ondrag: (ev: DragEvent) => any;
+ ondragend: (ev: DragEvent) => any;
+ ondragenter: (ev: DragEvent) => any;
+ ondragleave: (ev: DragEvent) => any;
+ ondragover: (ev: DragEvent) => any;
+ ondragstart: (ev: DragEvent) => any;
+ ondrop: (ev: DragEvent) => any;
+ ondurationchange: (ev: Event) => any;
+ onemptied: (ev: Event) => any;
+ onended: (ev: Event) => any;
+ onerror: ErrorEventHandler;
+ onfocus: (ev: FocusEvent) => any;
+ onhashchange: (ev: HashChangeEvent) => any;
+ oninput: (ev: Event) => any;
+ onkeydown: (ev: KeyboardEvent) => any;
+ onkeypress: (ev: KeyboardEvent) => any;
+ onkeyup: (ev: KeyboardEvent) => any;
+ onload: (ev: Event) => any;
+ onloadeddata: (ev: Event) => any;
+ onloadedmetadata: (ev: Event) => any;
+ onloadstart: (ev: Event) => any;
+ onmessage: (ev: MessageEvent) => any;
+ onmousedown: (ev: MouseEvent) => any;
+ onmouseenter: (ev: MouseEvent) => any;
+ onmouseleave: (ev: MouseEvent) => any;
+ onmousemove: (ev: MouseEvent) => any;
+ onmouseout: (ev: MouseEvent) => any;
+ onmouseover: (ev: MouseEvent) => any;
+ onmouseup: (ev: MouseEvent) => any;
+ onmousewheel: (ev: MouseWheelEvent) => any;
+ onmsgesturechange: (ev: MSGestureEvent) => any;
+ onmsgesturedoubletap: (ev: MSGestureEvent) => any;
+ onmsgestureend: (ev: MSGestureEvent) => any;
+ onmsgesturehold: (ev: MSGestureEvent) => any;
+ onmsgesturestart: (ev: MSGestureEvent) => any;
+ onmsgesturetap: (ev: MSGestureEvent) => any;
+ onmsinertiastart: (ev: MSGestureEvent) => any;
+ onmspointercancel: (ev: MSPointerEvent) => any;
+ onmspointerdown: (ev: MSPointerEvent) => any;
+ onmspointerenter: (ev: MSPointerEvent) => any;
+ onmspointerleave: (ev: MSPointerEvent) => any;
+ onmspointermove: (ev: MSPointerEvent) => any;
+ onmspointerout: (ev: MSPointerEvent) => any;
+ onmspointerover: (ev: MSPointerEvent) => any;
+ onmspointerup: (ev: MSPointerEvent) => any;
+ onoffline: (ev: Event) => any;
+ ononline: (ev: Event) => any;
+ onorientationchange: (ev: Event) => any;
+ onpagehide: (ev: PageTransitionEvent) => any;
+ onpageshow: (ev: PageTransitionEvent) => any;
+ onpause: (ev: Event) => any;
+ onplay: (ev: Event) => any;
+ onplaying: (ev: Event) => any;
+ onpopstate: (ev: PopStateEvent) => any;
+ onprogress: (ev: ProgressEvent) => any;
+ onratechange: (ev: Event) => any;
+ onreadystatechange: (ev: ProgressEvent) => any;
+ onreset: (ev: Event) => any;
+ onresize: (ev: UIEvent) => any;
+ onscroll: (ev: UIEvent) => any;
+ onseeked: (ev: Event) => any;
+ onseeking: (ev: Event) => any;
+ onselect: (ev: UIEvent) => any;
+ onstalled: (ev: Event) => any;
+ onstorage: (ev: StorageEvent) => any;
+ onsubmit: (ev: Event) => any;
+ onsuspend: (ev: Event) => any;
+ ontimeupdate: (ev: Event) => any;
+ ontouchcancel: any;
+ ontouchend: any;
+ ontouchmove: any;
+ ontouchstart: any;
+ onunload: (ev: Event) => any;
+ onvolumechange: (ev: Event) => any;
+ onwaiting: (ev: Event) => any;
+ opener: Window;
+ orientation: string | number;
+ outerHeight: number;
+ outerWidth: number;
+ pageXOffset: number;
+ pageYOffset: number;
+ parent: Window;
+ performance: Performance;
+ personalbar: BarProp;
+ screen: Screen;
+ screenLeft: number;
+ screenTop: number;
+ screenX: number;
+ screenY: number;
+ scrollX: number;
+ scrollY: number;
+ scrollbars: BarProp;
+ self: Window;
+ status: string;
+ statusbar: BarProp;
+ styleMedia: StyleMedia;
+ toolbar: BarProp;
+ top: Window;
+ window: Window;
+ URL: URL;
+ alert(message?: any): void;
+ blur(): void;
+ cancelAnimationFrame(handle: number): void;
+ captureEvents(): void;
+ close(): void;
+ confirm(message?: string): boolean;
+ focus(): void;
+ getComputedStyle(elt: Element, pseudoElt?: string): CSSStyleDeclaration;
+ getMatchedCSSRules(elt: Element, pseudoElt?: string): CSSRuleList;
+ getSelection(): Selection;
+ matchMedia(mediaQuery: string): MediaQueryList;
+ moveBy(x?: number, y?: number): void;
+ moveTo(x?: number, y?: number): void;
+ msCancelRequestAnimationFrame(handle: number): void;
+ msMatchMedia(mediaQuery: string): MediaQueryList;
+ msRequestAnimationFrame(callback: FrameRequestCallback): number;
+ msWriteProfilerMark(profilerMarkName: string): void;
+ open(url?: string, target?: string, features?: string, replace?: boolean): any;
+ postMessage(message: any, targetOrigin: string, ports?: any): void;
+ print(): void;
+ prompt(message?: string, _default?: string): string;
+ releaseEvents(): void;
+ requestAnimationFrame(callback: FrameRequestCallback): number;
+ resizeBy(x?: number, y?: number): void;
+ resizeTo(x?: number, y?: number): void;
+ scroll(x?: number, y?: number): void;
+ scrollBy(x?: number, y?: number): void;
+ scrollTo(x?: number, y?: number): void;
+ webkitConvertPointFromNodeToPage(node: Node, pt: WebKitPoint): WebKitPoint;
+ webkitConvertPointFromPageToNode(node: Node, pt: WebKitPoint): WebKitPoint;
+ addEventListener(type: "MSGestureChange", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureDoubleTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureEnd", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureHold", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSInertiaStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerCancel", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerDown", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerEnter", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerLeave", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerMove", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerOut", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerOver", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerUp", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "abort", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "afterprint", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "beforeprint", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "beforeunload", listener: (ev: BeforeUnloadEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "blur", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "canplay", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "canplaythrough", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "change", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "click", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "compassneedscalibration", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "contextmenu", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dblclick", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "devicemotion", listener: (ev: DeviceMotionEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "deviceorientation", listener: (ev: DeviceOrientationEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "drag", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dragend", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dragenter", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dragleave", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dragover", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dragstart", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "drop", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "durationchange", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "emptied", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "ended", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "focus", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "hashchange", listener: (ev: HashChangeEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "input", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "keydown", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "keypress", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "keyup", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "loadeddata", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "loadedmetadata", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "loadstart", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "message", listener: (ev: MessageEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mousedown", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseenter", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseleave", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mousemove", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseout", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseover", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseup", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mousewheel", listener: (ev: MouseWheelEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "offline", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "online", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "orientationchange", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "pagehide", listener: (ev: PageTransitionEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pageshow", listener: (ev: PageTransitionEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pause", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "play", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "playing", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointercancel", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerdown", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerenter", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerleave", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointermove", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerout", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerover", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerup", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "popstate", listener: (ev: PopStateEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "progress", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "ratechange", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "readystatechange", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "reset", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "resize", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "scroll", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "seeked", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "seeking", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "select", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "stalled", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "storage", listener: (ev: StorageEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "submit", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "suspend", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "timeupdate", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "unload", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "volumechange", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "waiting", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "wheel", listener: (ev: WheelEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+ [index: number]: Window;
+}
+
+declare var Window: {
+ prototype: Window;
+ new(): Window;
+}
+
+interface Worker extends EventTarget, AbstractWorker {
+ onmessage: (ev: MessageEvent) => any;
+ postMessage(message: any, ports?: any): void;
+ terminate(): void;
+ addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "message", listener: (ev: MessageEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var Worker: {
+ prototype: Worker;
+ new(stringUrl: string): Worker;
+}
+
+interface XMLDocument extends Document {
+}
+
+declare var XMLDocument: {
+ prototype: XMLDocument;
+ new(): XMLDocument;
+}
+
+interface XMLHttpRequest extends EventTarget, XMLHttpRequestEventTarget {
+ msCaching: string;
+ onreadystatechange: (ev: ProgressEvent) => any;
+ readyState: number;
+ response: any;
+ responseBody: any;
+ responseText: string;
+ responseType: string;
+ responseXML: any;
+ status: number;
+ statusText: string;
+ timeout: number;
+ upload: XMLHttpRequestUpload;
+ withCredentials: boolean;
+ abort(): void;
+ getAllResponseHeaders(): string;
+ getResponseHeader(header: string): string;
+ msCachingEnabled(): boolean;
+ open(method: string, url: string, async?: boolean, user?: string, password?: string): void;
+ overrideMimeType(mime: string): void;
+ send(data?: Document): void;
+ send(data?: string): void;
+ send(data?: any): void;
+ setRequestHeader(header: string, value: string): void;
+ DONE: number;
+ HEADERS_RECEIVED: number;
+ LOADING: number;
+ OPENED: number;
+ UNSENT: number;
+ addEventListener(type: "abort", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "loadend", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "loadstart", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "progress", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "readystatechange", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "timeout", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var XMLHttpRequest: {
+ prototype: XMLHttpRequest;
+ new(): XMLHttpRequest;
+ DONE: number;
+ HEADERS_RECEIVED: number;
+ LOADING: number;
+ OPENED: number;
+ UNSENT: number;
+ create(): XMLHttpRequest;
+}
+
+interface XMLHttpRequestUpload extends EventTarget, XMLHttpRequestEventTarget {
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var XMLHttpRequestUpload: {
+ prototype: XMLHttpRequestUpload;
+ new(): XMLHttpRequestUpload;
+}
+
+interface XMLSerializer {
+ serializeToString(target: Node): string;
+}
+
+declare var XMLSerializer: {
+ prototype: XMLSerializer;
+ new(): XMLSerializer;
+}
+
+interface XPathEvaluator {
+ createExpression(expression: string, resolver: XPathNSResolver): XPathExpression;
+ createNSResolver(nodeResolver?: Node): XPathNSResolver;
+ evaluate(expression: string, contextNode: Node, resolver: XPathNSResolver, type: number, result: XPathResult): XPathResult;
+}
+
+declare var XPathEvaluator: {
+ prototype: XPathEvaluator;
+ new(): XPathEvaluator;
+}
+
+interface XPathExpression {
+ evaluate(contextNode: Node, type: number, result: XPathResult): XPathExpression;
+}
+
+declare var XPathExpression: {
+ prototype: XPathExpression;
+ new(): XPathExpression;
+}
+
+interface XPathNSResolver {
+ lookupNamespaceURI(prefix: string): string;
+}
+
+declare var XPathNSResolver: {
+ prototype: XPathNSResolver;
+ new(): XPathNSResolver;
+}
+
+interface XPathResult {
+ booleanValue: boolean;
+ invalidIteratorState: boolean;
+ numberValue: number;
+ resultType: number;
+ singleNodeValue: Node;
+ snapshotLength: number;
+ stringValue: string;
+ iterateNext(): Node;
+ snapshotItem(index: number): Node;
+ ANY_TYPE: number;
+ ANY_UNORDERED_NODE_TYPE: number;
+ BOOLEAN_TYPE: number;
+ FIRST_ORDERED_NODE_TYPE: number;
+ NUMBER_TYPE: number;
+ ORDERED_NODE_ITERATOR_TYPE: number;
+ ORDERED_NODE_SNAPSHOT_TYPE: number;
+ STRING_TYPE: number;
+ UNORDERED_NODE_ITERATOR_TYPE: number;
+ UNORDERED_NODE_SNAPSHOT_TYPE: number;
+}
+
+declare var XPathResult: {
+ prototype: XPathResult;
+ new(): XPathResult;
+ ANY_TYPE: number;
+ ANY_UNORDERED_NODE_TYPE: number;
+ BOOLEAN_TYPE: number;
+ FIRST_ORDERED_NODE_TYPE: number;
+ NUMBER_TYPE: number;
+ ORDERED_NODE_ITERATOR_TYPE: number;
+ ORDERED_NODE_SNAPSHOT_TYPE: number;
+ STRING_TYPE: number;
+ UNORDERED_NODE_ITERATOR_TYPE: number;
+ UNORDERED_NODE_SNAPSHOT_TYPE: number;
+}
+
+interface XSLTProcessor {
+ clearParameters(): void;
+ getParameter(namespaceURI: string, localName: string): any;
+ importStylesheet(style: Node): void;
+ removeParameter(namespaceURI: string, localName: string): void;
+ reset(): void;
+ setParameter(namespaceURI: string, localName: string, value: any): void;
+ transformToDocument(source: Node): Document;
+ transformToFragment(source: Node, document: Document): DocumentFragment;
+}
+
+declare var XSLTProcessor: {
+ prototype: XSLTProcessor;
+ new(): XSLTProcessor;
+}
+
+interface AbstractWorker {
+ onerror: (ev: Event) => any;
+ addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+interface ChildNode {
+ remove(): void;
+}
+
+interface DOML2DeprecatedColorProperty {
+ color: string;
+}
+
+interface DOML2DeprecatedSizeProperty {
+ size: number;
+}
+
+interface DocumentEvent {
+ createEvent(eventInterface:"AnimationEvent"): AnimationEvent;
+ createEvent(eventInterface:"AriaRequestEvent"): AriaRequestEvent;
+ createEvent(eventInterface:"AudioProcessingEvent"): AudioProcessingEvent;
+ createEvent(eventInterface:"BeforeUnloadEvent"): BeforeUnloadEvent;
+ createEvent(eventInterface:"ClipboardEvent"): ClipboardEvent;
+ createEvent(eventInterface:"CloseEvent"): CloseEvent;
+ createEvent(eventInterface:"CommandEvent"): CommandEvent;
+ createEvent(eventInterface:"CompositionEvent"): CompositionEvent;
+ createEvent(eventInterface:"CustomEvent"): CustomEvent;
+ createEvent(eventInterface:"DeviceMotionEvent"): DeviceMotionEvent;
+ createEvent(eventInterface:"DeviceOrientationEvent"): DeviceOrientationEvent;
+ createEvent(eventInterface:"DragEvent"): DragEvent;
+ createEvent(eventInterface:"ErrorEvent"): ErrorEvent;
+ createEvent(eventInterface:"Event"): Event;
+ createEvent(eventInterface:"Events"): Event;
+ createEvent(eventInterface:"FocusEvent"): FocusEvent;
+ createEvent(eventInterface:"GamepadEvent"): GamepadEvent;
+ createEvent(eventInterface:"HashChangeEvent"): HashChangeEvent;
+ createEvent(eventInterface:"IDBVersionChangeEvent"): IDBVersionChangeEvent;
+ createEvent(eventInterface:"KeyboardEvent"): KeyboardEvent;
+ createEvent(eventInterface:"LongRunningScriptDetectedEvent"): LongRunningScriptDetectedEvent;
+ createEvent(eventInterface:"MSGestureEvent"): MSGestureEvent;
+ createEvent(eventInterface:"MSManipulationEvent"): MSManipulationEvent;
+ createEvent(eventInterface:"MSMediaKeyMessageEvent"): MSMediaKeyMessageEvent;
+ createEvent(eventInterface:"MSMediaKeyNeededEvent"): MSMediaKeyNeededEvent;
+ createEvent(eventInterface:"MSPointerEvent"): MSPointerEvent;
+ createEvent(eventInterface:"MSSiteModeEvent"): MSSiteModeEvent;
+ createEvent(eventInterface:"MessageEvent"): MessageEvent;
+ createEvent(eventInterface:"MouseEvent"): MouseEvent;
+ createEvent(eventInterface:"MouseEvents"): MouseEvent;
+ createEvent(eventInterface:"MouseWheelEvent"): MouseWheelEvent;
+ createEvent(eventInterface:"MutationEvent"): MutationEvent;
+ createEvent(eventInterface:"MutationEvents"): MutationEvent;
+ createEvent(eventInterface:"NavigationCompletedEvent"): NavigationCompletedEvent;
+ createEvent(eventInterface:"NavigationEvent"): NavigationEvent;
+ createEvent(eventInterface:"NavigationEventWithReferrer"): NavigationEventWithReferrer;
+ createEvent(eventInterface:"OfflineAudioCompletionEvent"): OfflineAudioCompletionEvent;
+ createEvent(eventInterface:"PageTransitionEvent"): PageTransitionEvent;
+ createEvent(eventInterface:"PermissionRequestedEvent"): PermissionRequestedEvent;
+ createEvent(eventInterface:"PointerEvent"): PointerEvent;
+ createEvent(eventInterface:"PopStateEvent"): PopStateEvent;
+ createEvent(eventInterface:"ProgressEvent"): ProgressEvent;
+ createEvent(eventInterface:"SVGZoomEvent"): SVGZoomEvent;
+ createEvent(eventInterface:"SVGZoomEvents"): SVGZoomEvent;
+ createEvent(eventInterface:"ScriptNotifyEvent"): ScriptNotifyEvent;
+ createEvent(eventInterface:"StorageEvent"): StorageEvent;
+ createEvent(eventInterface:"TextEvent"): TextEvent;
+ createEvent(eventInterface:"TouchEvent"): TouchEvent;
+ createEvent(eventInterface:"TrackEvent"): TrackEvent;
+ createEvent(eventInterface:"TransitionEvent"): TransitionEvent;
+ createEvent(eventInterface:"UIEvent"): UIEvent;
+ createEvent(eventInterface:"UIEvents"): UIEvent;
+ createEvent(eventInterface:"UnviewableContentIdentifiedEvent"): UnviewableContentIdentifiedEvent;
+ createEvent(eventInterface:"WebGLContextEvent"): WebGLContextEvent;
+ createEvent(eventInterface:"WheelEvent"): WheelEvent;
+ createEvent(eventInterface: string): Event;
+}
+
+interface ElementTraversal {
+ childElementCount: number;
+ firstElementChild: Element;
+ lastElementChild: Element;
+ nextElementSibling: Element;
+ previousElementSibling: Element;
+}
+
+interface GetSVGDocument {
+ getSVGDocument(): Document;
+}
+
+interface GlobalEventHandlers {
+ onpointercancel: (ev: PointerEvent) => any;
+ onpointerdown: (ev: PointerEvent) => any;
+ onpointerenter: (ev: PointerEvent) => any;
+ onpointerleave: (ev: PointerEvent) => any;
+ onpointermove: (ev: PointerEvent) => any;
+ onpointerout: (ev: PointerEvent) => any;
+ onpointerover: (ev: PointerEvent) => any;
+ onpointerup: (ev: PointerEvent) => any;
+ onwheel: (ev: WheelEvent) => any;
+ addEventListener(type: "pointercancel", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerdown", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerenter", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerleave", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointermove", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerout", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerover", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerup", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "wheel", listener: (ev: WheelEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+interface HTMLTableAlignment {
+ /**
+ * Sets or retrieves a value that you can use to implement your own ch functionality for the object.
+ */
+ ch: string;
+ /**
+ * Sets or retrieves a value that you can use to implement your own chOff functionality for the object.
+ */
+ chOff: string;
+ /**
+ * Sets or retrieves how text and other content are vertically aligned within the object that contains them.
+ */
+ vAlign: string;
+}
+
+interface IDBEnvironment {
+ indexedDB: IDBFactory;
+ msIndexedDB: IDBFactory;
+}
+
+interface LinkStyle {
+ sheet: StyleSheet;
+}
+
+interface MSBaseReader {
+ onabort: (ev: Event) => any;
+ onerror: (ev: Event) => any;
+ onload: (ev: Event) => any;
+ onloadend: (ev: ProgressEvent) => any;
+ onloadstart: (ev: Event) => any;
+ onprogress: (ev: ProgressEvent) => any;
+ readyState: number;
+ result: any;
+ abort(): void;
+ DONE: number;
+ EMPTY: number;
+ LOADING: number;
+ addEventListener(type: "abort", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "loadend", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "loadstart", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "progress", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+interface MSFileSaver {
+ msSaveBlob(blob: any, defaultName?: string): boolean;
+ msSaveOrOpenBlob(blob: any, defaultName?: string): boolean;
+}
+
+interface MSNavigatorDoNotTrack {
+ confirmSiteSpecificTrackingException(args: ConfirmSiteSpecificExceptionsInformation): boolean;
+ confirmWebWideTrackingException(args: ExceptionInformation): boolean;
+ removeSiteSpecificTrackingException(args: ExceptionInformation): void;
+ removeWebWideTrackingException(args: ExceptionInformation): void;
+ storeSiteSpecificTrackingException(args: StoreSiteSpecificExceptionsInformation): void;
+ storeWebWideTrackingException(args: StoreExceptionsInformation): void;
+}
+
+interface NavigatorContentUtils {
+}
+
+interface NavigatorGeolocation {
+ geolocation: Geolocation;
+}
+
+interface NavigatorID {
+ appName: string;
+ appVersion: string;
+ platform: string;
+ product: string;
+ productSub: string;
+ userAgent: string;
+ vendor: string;
+ vendorSub: string;
+}
+
+interface NavigatorOnLine {
+ onLine: boolean;
+}
+
+interface NavigatorStorageUtils {
+}
+
+interface NodeSelector {
+ querySelector(selectors: string): Element;
+ querySelectorAll(selectors: string): NodeListOf<Element>;
+}
+
+interface RandomSource {
+ getRandomValues(array: ArrayBufferView): ArrayBufferView;
+}
+
+interface SVGAnimatedPathData {
+ pathSegList: SVGPathSegList;
+}
+
+interface SVGAnimatedPoints {
+ animatedPoints: SVGPointList;
+ points: SVGPointList;
+}
+
+interface SVGExternalResourcesRequired {
+ externalResourcesRequired: SVGAnimatedBoolean;
+}
+
+interface SVGFilterPrimitiveStandardAttributes extends SVGStylable {
+ height: SVGAnimatedLength;
+ result: SVGAnimatedString;
+ width: SVGAnimatedLength;
+ x: SVGAnimatedLength;
+ y: SVGAnimatedLength;
+}
+
+interface SVGFitToViewBox {
+ preserveAspectRatio: SVGAnimatedPreserveAspectRatio;
+ viewBox: SVGAnimatedRect;
+}
+
+interface SVGLangSpace {
+ xmllang: string;
+ xmlspace: string;
+}
+
+interface SVGLocatable {
+ farthestViewportElement: SVGElement;
+ nearestViewportElement: SVGElement;
+ getBBox(): SVGRect;
+ getCTM(): SVGMatrix;
+ getScreenCTM(): SVGMatrix;
+ getTransformToElement(element: SVGElement): SVGMatrix;
+}
+
+interface SVGStylable {
+ className: any;
+ style: CSSStyleDeclaration;
+}
+
+interface SVGTests {
+ requiredExtensions: SVGStringList;
+ requiredFeatures: SVGStringList;
+ systemLanguage: SVGStringList;
+ hasExtension(extension: string): boolean;
+}
+
+interface SVGTransformable extends SVGLocatable {
+ transform: SVGAnimatedTransformList;
+}
+
+interface SVGURIReference {
+ href: SVGAnimatedString;
+}
+
+interface WindowBase64 {
+ atob(encodedString: string): string;
+ btoa(rawString: string): string;
+}
+
+interface WindowConsole {
+ console: Console;
+}
+
+interface WindowLocalStorage {
+ localStorage: Storage;
+}
+
+interface WindowSessionStorage {
+ sessionStorage: Storage;
+}
+
+interface WindowTimers extends Object, WindowTimersExtension {
+ clearInterval(handle: number): void;
+ clearTimeout(handle: number): void;
+ setInterval(handler: any, timeout?: any, ...args: any[]): number;
+ setTimeout(handler: any, timeout?: any, ...args: any[]): number;
+}
+
+interface WindowTimersExtension {
+ clearImmediate(handle: number): void;
+ msClearImmediate(handle: number): void;
+ msSetImmediate(expression: any, ...args: any[]): number;
+ setImmediate(expression: any, ...args: any[]): number;
+}
+
+interface XMLHttpRequestEventTarget {
+ onabort: (ev: Event) => any;
+ onerror: (ev: Event) => any;
+ onload: (ev: Event) => any;
+ onloadend: (ev: ProgressEvent) => any;
+ onloadstart: (ev: Event) => any;
+ onprogress: (ev: ProgressEvent) => any;
+ ontimeout: (ev: ProgressEvent) => any;
+ addEventListener(type: "abort", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "loadend", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "loadstart", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "progress", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "timeout", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+interface IDBObjectStoreParameters {
+ keyPath?: string | string[];
+ autoIncrement?: boolean;
+}
+
+interface IDBIndexParameters {
+ unique?: boolean;
+ multiEntry?: boolean;
+}
+
+interface NodeListOf<TNode extends Node> extends NodeList {
+ length: number;
+ item(index: number): TNode;
+ [index: number]: TNode;
+}
+
+interface BlobPropertyBag {
+ type?: string;
+ endings?: string;
+}
+
+interface FilePropertyBag {
+ type?: string;
+ lastModified?: number;
+}
+
+interface EventListenerObject {
+ handleEvent(evt: Event): void;
+}
+
+interface MessageEventInit extends EventInit {
+ data?: any;
+ origin?: string;
+ lastEventId?: string;
+ channel?: string;
+ source?: any;
+ ports?: MessagePort[];
+}
+
+interface ProgressEventInit extends EventInit {
+ lengthComputable?: boolean;
+ loaded?: number;
+ total?: number;
+}
+
+interface HTMLTemplateElement extends HTMLElement {
+ content: DocumentFragment;
+}
+
+declare var HTMLTemplateElement: {
+ prototype: HTMLTemplateElement;
+ new(): HTMLTemplateElement;
+}
+
+declare type EventListenerOrEventListenerObject = EventListener | EventListenerObject;
+
+interface ErrorEventHandler {
+ (message: string, filename?: string, lineno?: number, colno?: number, error?:Error): void;
+}
+interface PositionCallback {
+ (position: Position): void;
+}
+interface PositionErrorCallback {
+ (error: PositionError): void;
+}
+interface MediaQueryListListener {
+ (mql: MediaQueryList): void;
+}
+interface MSLaunchUriCallback {
+ (): void;
+}
+interface FrameRequestCallback {
+ (time: number): void;
+}
+interface MSUnsafeFunctionCallback {
+ (): any;
+}
+interface MSExecAtPriorityFunctionCallback {
+ (...args: any[]): any;
+}
+interface MutationCallback {
+ (mutations: MutationRecord[], observer: MutationObserver): void;
+}
+interface DecodeSuccessCallback {
+ (decodedData: AudioBuffer): void;
+}
+interface DecodeErrorCallback {
+ (): void;
+}
+interface FunctionStringCallback {
+ (data: string): void;
+}
+declare var Audio: {new(src?: string): HTMLAudioElement; };
+declare var Image: {new(width?: number, height?: number): HTMLImageElement; };
+declare var Option: {new(text?: string, value?: string, defaultSelected?: boolean, selected?: boolean): HTMLOptionElement; };
+declare var animationStartTime: number;
+declare var applicationCache: ApplicationCache;
+declare var clientInformation: Navigator;
+declare var closed: boolean;
+declare var crypto: Crypto;
+declare var defaultStatus: string;
+declare var devicePixelRatio: number;
+declare var doNotTrack: string;
+declare var document: Document;
+declare var event: Event;
+declare var external: External;
+declare var frameElement: Element;
+declare var frames: Window;
+declare var history: History;
+declare var innerHeight: number;
+declare var innerWidth: number;
+declare var length: number;
+declare var location: Location;
+declare var locationbar: BarProp;
+declare var menubar: BarProp;
+declare var msAnimationStartTime: number;
+declare var name: string;
+declare var navigator: Navigator;
+declare var offscreenBuffering: string | boolean;
+declare var onabort: (ev: Event) => any;
+declare var onafterprint: (ev: Event) => any;
+declare var onbeforeprint: (ev: Event) => any;
+declare var onbeforeunload: (ev: BeforeUnloadEvent) => any;
+declare var onblur: (ev: FocusEvent) => any;
+declare var oncanplay: (ev: Event) => any;
+declare var oncanplaythrough: (ev: Event) => any;
+declare var onchange: (ev: Event) => any;
+declare var onclick: (ev: MouseEvent) => any;
+declare var oncompassneedscalibration: (ev: Event) => any;
+declare var oncontextmenu: (ev: PointerEvent) => any;
+declare var ondblclick: (ev: MouseEvent) => any;
+declare var ondevicemotion: (ev: DeviceMotionEvent) => any;
+declare var ondeviceorientation: (ev: DeviceOrientationEvent) => any;
+declare var ondrag: (ev: DragEvent) => any;
+declare var ondragend: (ev: DragEvent) => any;
+declare var ondragenter: (ev: DragEvent) => any;
+declare var ondragleave: (ev: DragEvent) => any;
+declare var ondragover: (ev: DragEvent) => any;
+declare var ondragstart: (ev: DragEvent) => any;
+declare var ondrop: (ev: DragEvent) => any;
+declare var ondurationchange: (ev: Event) => any;
+declare var onemptied: (ev: Event) => any;
+declare var onended: (ev: Event) => any;
+declare var onerror: ErrorEventHandler;
+declare var onfocus: (ev: FocusEvent) => any;
+declare var onhashchange: (ev: HashChangeEvent) => any;
+declare var oninput: (ev: Event) => any;
+declare var onkeydown: (ev: KeyboardEvent) => any;
+declare var onkeypress: (ev: KeyboardEvent) => any;
+declare var onkeyup: (ev: KeyboardEvent) => any;
+declare var onload: (ev: Event) => any;
+declare var onloadeddata: (ev: Event) => any;
+declare var onloadedmetadata: (ev: Event) => any;
+declare var onloadstart: (ev: Event) => any;
+declare var onmessage: (ev: MessageEvent) => any;
+declare var onmousedown: (ev: MouseEvent) => any;
+declare var onmouseenter: (ev: MouseEvent) => any;
+declare var onmouseleave: (ev: MouseEvent) => any;
+declare var onmousemove: (ev: MouseEvent) => any;
+declare var onmouseout: (ev: MouseEvent) => any;
+declare var onmouseover: (ev: MouseEvent) => any;
+declare var onmouseup: (ev: MouseEvent) => any;
+declare var onmousewheel: (ev: MouseWheelEvent) => any;
+declare var onmsgesturechange: (ev: MSGestureEvent) => any;
+declare var onmsgesturedoubletap: (ev: MSGestureEvent) => any;
+declare var onmsgestureend: (ev: MSGestureEvent) => any;
+declare var onmsgesturehold: (ev: MSGestureEvent) => any;
+declare var onmsgesturestart: (ev: MSGestureEvent) => any;
+declare var onmsgesturetap: (ev: MSGestureEvent) => any;
+declare var onmsinertiastart: (ev: MSGestureEvent) => any;
+declare var onmspointercancel: (ev: MSPointerEvent) => any;
+declare var onmspointerdown: (ev: MSPointerEvent) => any;
+declare var onmspointerenter: (ev: MSPointerEvent) => any;
+declare var onmspointerleave: (ev: MSPointerEvent) => any;
+declare var onmspointermove: (ev: MSPointerEvent) => any;
+declare var onmspointerout: (ev: MSPointerEvent) => any;
+declare var onmspointerover: (ev: MSPointerEvent) => any;
+declare var onmspointerup: (ev: MSPointerEvent) => any;
+declare var onoffline: (ev: Event) => any;
+declare var ononline: (ev: Event) => any;
+declare var onorientationchange: (ev: Event) => any;
+declare var onpagehide: (ev: PageTransitionEvent) => any;
+declare var onpageshow: (ev: PageTransitionEvent) => any;
+declare var onpause: (ev: Event) => any;
+declare var onplay: (ev: Event) => any;
+declare var onplaying: (ev: Event) => any;
+declare var onpopstate: (ev: PopStateEvent) => any;
+declare var onprogress: (ev: ProgressEvent) => any;
+declare var onratechange: (ev: Event) => any;
+declare var onreadystatechange: (ev: ProgressEvent) => any;
+declare var onreset: (ev: Event) => any;
+declare var onresize: (ev: UIEvent) => any;
+declare var onscroll: (ev: UIEvent) => any;
+declare var onseeked: (ev: Event) => any;
+declare var onseeking: (ev: Event) => any;
+declare var onselect: (ev: UIEvent) => any;
+declare var onstalled: (ev: Event) => any;
+declare var onstorage: (ev: StorageEvent) => any;
+declare var onsubmit: (ev: Event) => any;
+declare var onsuspend: (ev: Event) => any;
+declare var ontimeupdate: (ev: Event) => any;
+declare var ontouchcancel: any;
+declare var ontouchend: any;
+declare var ontouchmove: any;
+declare var ontouchstart: any;
+declare var onunload: (ev: Event) => any;
+declare var onvolumechange: (ev: Event) => any;
+declare var onwaiting: (ev: Event) => any;
+declare var opener: Window;
+declare var orientation: string | number;
+declare var outerHeight: number;
+declare var outerWidth: number;
+declare var pageXOffset: number;
+declare var pageYOffset: number;
+declare var parent: Window;
+declare var performance: Performance;
+declare var personalbar: BarProp;
+declare var screen: Screen;
+declare var screenLeft: number;
+declare var screenTop: number;
+declare var screenX: number;
+declare var screenY: number;
+declare var scrollX: number;
+declare var scrollY: number;
+declare var scrollbars: BarProp;
+declare var self: Window;
+declare var status: string;
+declare var statusbar: BarProp;
+declare var styleMedia: StyleMedia;
+declare var toolbar: BarProp;
+declare var top: Window;
+declare var window: Window;
+declare var URL: URL;
+declare function alert(message?: any): void;
+declare function blur(): void;
+declare function cancelAnimationFrame(handle: number): void;
+declare function captureEvents(): void;
+declare function close(): void;
+declare function confirm(message?: string): boolean;
+declare function focus(): void;
+declare function getComputedStyle(elt: Element, pseudoElt?: string): CSSStyleDeclaration;
+declare function getMatchedCSSRules(elt: Element, pseudoElt?: string): CSSRuleList;
+declare function getSelection(): Selection;
+declare function matchMedia(mediaQuery: string): MediaQueryList;
+declare function moveBy(x?: number, y?: number): void;
+declare function moveTo(x?: number, y?: number): void;
+declare function msCancelRequestAnimationFrame(handle: number): void;
+declare function msMatchMedia(mediaQuery: string): MediaQueryList;
+declare function msRequestAnimationFrame(callback: FrameRequestCallback): number;
+declare function msWriteProfilerMark(profilerMarkName: string): void;
+declare function open(url?: string, target?: string, features?: string, replace?: boolean): any;
+declare function postMessage(message: any, targetOrigin: string, ports?: any): void;
+declare function print(): void;
+declare function prompt(message?: string, _default?: string): string;
+declare function releaseEvents(): void;
+declare function requestAnimationFrame(callback: FrameRequestCallback): number;
+declare function resizeBy(x?: number, y?: number): void;
+declare function resizeTo(x?: number, y?: number): void;
+declare function scroll(x?: number, y?: number): void;
+declare function scrollBy(x?: number, y?: number): void;
+declare function scrollTo(x?: number, y?: number): void;
+declare function webkitConvertPointFromNodeToPage(node: Node, pt: WebKitPoint): WebKitPoint;
+declare function webkitConvertPointFromPageToNode(node: Node, pt: WebKitPoint): WebKitPoint;
+declare function toString(): string;
+declare function addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+declare function dispatchEvent(evt: Event): boolean;
+declare function removeEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+declare function clearInterval(handle: number): void;
+declare function clearTimeout(handle: number): void;
+declare function setInterval(handler: any, timeout?: any, ...args: any[]): number;
+declare function setTimeout(handler: any, timeout?: any, ...args: any[]): number;
+declare function clearImmediate(handle: number): void;
+declare function msClearImmediate(handle: number): void;
+declare function msSetImmediate(expression: any, ...args: any[]): number;
+declare function setImmediate(expression: any, ...args: any[]): number;
+declare var sessionStorage: Storage;
+declare var localStorage: Storage;
+declare var console: Console;
+declare var onpointercancel: (ev: PointerEvent) => any;
+declare var onpointerdown: (ev: PointerEvent) => any;
+declare var onpointerenter: (ev: PointerEvent) => any;
+declare var onpointerleave: (ev: PointerEvent) => any;
+declare var onpointermove: (ev: PointerEvent) => any;
+declare var onpointerout: (ev: PointerEvent) => any;
+declare var onpointerover: (ev: PointerEvent) => any;
+declare var onpointerup: (ev: PointerEvent) => any;
+declare var onwheel: (ev: WheelEvent) => any;
+declare var indexedDB: IDBFactory;
+declare var msIndexedDB: IDBFactory;
+declare function atob(encodedString: string): string;
+declare function btoa(rawString: string): string;
+declare function addEventListener(type: "MSGestureChange", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "MSGestureDoubleTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "MSGestureEnd", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "MSGestureHold", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "MSGestureStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "MSGestureTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "MSInertiaStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "MSPointerCancel", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "MSPointerDown", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "MSPointerEnter", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "MSPointerLeave", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "MSPointerMove", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "MSPointerOut", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "MSPointerOver", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "MSPointerUp", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "abort", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "afterprint", listener: (ev: Event) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "beforeprint", listener: (ev: Event) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "beforeunload", listener: (ev: BeforeUnloadEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "blur", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "canplay", listener: (ev: Event) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "canplaythrough", listener: (ev: Event) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "change", listener: (ev: Event) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "click", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "compassneedscalibration", listener: (ev: Event) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "contextmenu", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "dblclick", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "devicemotion", listener: (ev: DeviceMotionEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "deviceorientation", listener: (ev: DeviceOrientationEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "drag", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "dragend", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "dragenter", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "dragleave", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "dragover", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "dragstart", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "drop", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "durationchange", listener: (ev: Event) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "emptied", listener: (ev: Event) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "ended", listener: (ev: Event) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "focus", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "hashchange", listener: (ev: HashChangeEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "input", listener: (ev: Event) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "keydown", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "keypress", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "keyup", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "loadeddata", listener: (ev: Event) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "loadedmetadata", listener: (ev: Event) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "loadstart", listener: (ev: Event) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "message", listener: (ev: MessageEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "mousedown", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "mouseenter", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "mouseleave", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "mousemove", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "mouseout", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "mouseover", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "mouseup", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "mousewheel", listener: (ev: MouseWheelEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "offline", listener: (ev: Event) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "online", listener: (ev: Event) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "orientationchange", listener: (ev: Event) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "pagehide", listener: (ev: PageTransitionEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "pageshow", listener: (ev: PageTransitionEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "pause", listener: (ev: Event) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "play", listener: (ev: Event) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "playing", listener: (ev: Event) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "pointercancel", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "pointerdown", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "pointerenter", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "pointerleave", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "pointermove", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "pointerout", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "pointerover", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "pointerup", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "popstate", listener: (ev: PopStateEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "progress", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "ratechange", listener: (ev: Event) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "readystatechange", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "reset", listener: (ev: Event) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "resize", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "scroll", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "seeked", listener: (ev: Event) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "seeking", listener: (ev: Event) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "select", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "stalled", listener: (ev: Event) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "storage", listener: (ev: StorageEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "submit", listener: (ev: Event) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "suspend", listener: (ev: Event) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "timeupdate", listener: (ev: Event) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "unload", listener: (ev: Event) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "volumechange", listener: (ev: Event) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "waiting", listener: (ev: Event) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "wheel", listener: (ev: WheelEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;interface DOMTokenList {
+ [Symbol.iterator](): IterableIterator<string>;
+}
+
+interface NodeList {
+ [Symbol.iterator](): IterableIterator<Node>
+}
+
+interface NodeListOf<TNode extends Node> {
+ [Symbol.iterator](): IterableIterator<TNode>
+}
+
+/////////////////////////////
+/// WorkerGlobalScope APIs
+/////////////////////////////
+// These are only available in a Web Worker
+declare function importScripts(...urls: string[]): void;
+
+
+/////////////////////////////
+/// Windows Script Host APIS
+/////////////////////////////
+
+
+interface ActiveXObject {
+ new (s: string): any;
+}
+declare var ActiveXObject: ActiveXObject;
+
+interface ITextWriter {
+ Write(s: string): void;
+ WriteLine(s: string): void;
+ Close(): void;
+}
+
+interface TextStreamBase {
+ /**
+ * The column number of the current character position in an input stream.
+ */
+ Column: number;
+
+ /**
+ * The current line number in an input stream.
+ */
+ Line: number;
+
+ /**
+ * Closes a text stream.
+ * It is not necessary to close standard streams; they close automatically when the process ends. If
+ * you close a standard stream, be aware that any other pointers to that standard stream become invalid.
+ */
+ Close(): void;
+}
+
+interface TextStreamWriter extends TextStreamBase {
+ /**
+ * Sends a string to an output stream.
+ */
+ Write(s: string): void;
+
+ /**
+ * Sends a specified number of blank lines (newline characters) to an output stream.
+ */
+ WriteBlankLines(intLines: number): void;
+
+ /**
+ * Sends a string followed by a newline character to an output stream.
+ */
+ WriteLine(s: string): void;
+}
+
+interface TextStreamReader extends TextStreamBase {
+ /**
+ * Returns a specified number of characters from an input stream, starting at the current pointer position.
+ * Does not return until the ENTER key is pressed.
+ * Can only be used on a stream in reading mode; causes an error in writing or appending mode.
+ */
+ Read(characters: number): string;
+
+ /**
+ * Returns all characters from an input stream.
+ * Can only be used on a stream in reading mode; causes an error in writing or appending mode.
+ */
+ ReadAll(): string;
+
+ /**
+ * Returns an entire line from an input stream.
+ * Although this method extracts the newline character, it does not add it to the returned string.
+ * Can only be used on a stream in reading mode; causes an error in writing or appending mode.
+ */
+ ReadLine(): string;
+
+ /**
+ * Skips a specified number of characters when reading from an input text stream.
+ * Can only be used on a stream in reading mode; causes an error in writing or appending mode.
+ * @param characters Positive number of characters to skip forward. (Backward skipping is not supported.)
+ */
+ Skip(characters: number): void;
+
+ /**
+ * Skips the next line when reading from an input text stream.
+ * Can only be used on a stream in reading mode, not writing or appending mode.
+ */
+ SkipLine(): void;
+
+ /**
+ * Indicates whether the stream pointer position is at the end of a line.
+ */
+ AtEndOfLine: boolean;
+
+ /**
+ * Indicates whether the stream pointer position is at the end of a stream.
+ */
+ AtEndOfStream: boolean;
+}
+
+declare var WScript: {
+ /**
+ * Outputs text to either a message box (under WScript.exe) or the command console window followed by
+ * a newline (under CScript.exe).
+ */
+ Echo(s: any): void;
+
+ /**
+ * Exposes the write-only error output stream for the current script.
+ * Can be accessed only while using CScript.exe.
+ */
+ StdErr: TextStreamWriter;
+
+ /**
+ * Exposes the write-only output stream for the current script.
+ * Can be accessed only while using CScript.exe.
+ */
+ StdOut: TextStreamWriter;
+ Arguments: { length: number; Item(n: number): string; };
+
+ /**
+ * The full path of the currently running script.
+ */
+ ScriptFullName: string;
+
+ /**
+ * Forces the script to stop immediately, with an optional exit code.
+ */
+ Quit(exitCode?: number): number;
+
+ /**
+ * The Windows Script Host build version number.
+ */
+ BuildVersion: number;
+
+ /**
+ * Fully qualified path of the host executable.
+ */
+ FullName: string;
+
+ /**
+ * Gets/sets the script mode - interactive(true) or batch(false).
+ */
+ Interactive: boolean;
+
+ /**
+ * The name of the host executable (WScript.exe or CScript.exe).
+ */
+ Name: string;
+
+ /**
+ * Path of the directory containing the host executable.
+ */
+ Path: string;
+
+ /**
+ * The filename of the currently running script.
+ */
+ ScriptName: string;
+
+ /**
+ * Exposes the read-only input stream for the current script.
+ * Can be accessed only while using CScript.exe.
+ */
+ StdIn: TextStreamReader;
+
+ /**
+ * Windows Script Host version
+ */
+ Version: string;
+
+ /**
+ * Connects a COM object's event sources to functions named with a given prefix, in the form prefix_event.
+ */
+ ConnectObject(objEventSource: any, strPrefix: string): void;
+
+ /**
+ * Creates a COM object.
+ * @param strProgiID
+ * @param strPrefix Function names in the form prefix_event will be bound to this object's COM events.
+ */
+ CreateObject(strProgID: string, strPrefix?: string): any;
+
+ /**
+ * Disconnects a COM object from its event sources.
+ */
+ DisconnectObject(obj: any): void;
+
+ /**
+ * Retrieves an existing object with the specified ProgID from memory, or creates a new one from a file.
+ * @param strPathname Fully qualified path to the file containing the object persisted to disk.
+ * For objects in memory, pass a zero-length string.
+ * @param strProgID
+ * @param strPrefix Function names in the form prefix_event will be bound to this object's COM events.
+ */
+ GetObject(strPathname: string, strProgID?: string, strPrefix?: string): any;
+
+ /**
+ * Suspends script execution for a specified length of time, then continues execution.
+ * @param intTime Interval (in milliseconds) to suspend script execution.
+ */
+ Sleep(intTime: number): void;
+};
+
+/**
+ * Allows enumerating over a COM collection, which may not have indexed item access.
+ */
+interface Enumerator<T> {
+ /**
+ * Returns true if the current item is the last one in the collection, or the collection is empty,
+ * or the current item is undefined.
+ */
+ atEnd(): boolean;
+
+ /**
+ * Returns the current item in the collection
+ */
+ item(): T;
+
+ /**
+ * Resets the current item in the collection to the first item. If there are no items in the collection,
+ * the current item is set to undefined.
+ */
+ moveFirst(): void;
+
+ /**
+ * Moves the current item to the next item in the collection. If the enumerator is at the end of
+ * the collection or the collection is empty, the current item is set to undefined.
+ */
+ moveNext(): void;
+}
+
+interface EnumeratorConstructor {
+ new <T>(collection: any): Enumerator<T>;
+ new (collection: any): Enumerator<any>;
+}
+
+declare var Enumerator: EnumeratorConstructor;
+
+/**
+ * Enables reading from a COM safe array, which might have an alternate lower bound, or multiple dimensions.
+ */
+interface VBArray<T> {
+ /**
+ * Returns the number of dimensions (1-based).
+ */
+ dimensions(): number;
+
+ /**
+ * Takes an index for each dimension in the array, and returns the item at the corresponding location.
+ */
+ getItem(dimension1Index: number, ...dimensionNIndexes: number[]): T;
+
+ /**
+ * Returns the smallest available index for a given dimension.
+ * @param dimension 1-based dimension (defaults to 1)
+ */
+ lbound(dimension?: number): number;
+
+ /**
+ * Returns the largest available index for a given dimension.
+ * @param dimension 1-based dimension (defaults to 1)
+ */
+ ubound(dimension?: number): number;
+
+ /**
+ * Returns a Javascript array with all the elements in the VBArray. If there are multiple dimensions,
+ * each successive dimension is appended to the end of the array.
+ * Example: [[1,2,3],[4,5,6]] becomes [1,2,3,4,5,6]
+ */
+ toArray(): T[];
+}
+
+interface VBArrayConstructor {
+ new <T>(safeArray: any): VBArray<T>;
+ new (safeArray: any): VBArray<any>;
+}
+
+declare var VBArray: VBArrayConstructor;
diff --git a/extension/lib/decl/systemjs/systemjs.d.ts b/extension/lib/decl/systemjs/systemjs.d.ts
new file mode 100644
index 000000000..1d826aebb
--- /dev/null
+++ b/extension/lib/decl/systemjs/systemjs.d.ts
@@ -0,0 +1,20 @@
+interface System {
+ import(name: string): Promise<any>;
+ defined: any;
+ amdDefine: () => void;
+ amdRequire: () => void;
+ baseURL: string;
+ paths: { [key: string]: string };
+ meta: { [key: string]: Object };
+ config: any;
+ newModule(obj: Object): any;
+ normalizeSync(name: string): string;
+ set(moduleName: string, module: any)
+}
+
+
+declare var System: System;
+
+declare module "systemjs" {
+ export = System;
+} \ No newline at end of file
diff --git a/extension/lib/decl/urijs/URIjs.d.ts b/extension/lib/decl/urijs/URIjs.d.ts
new file mode 100644
index 000000000..23d79218b
--- /dev/null
+++ b/extension/lib/decl/urijs/URIjs.d.ts
@@ -0,0 +1,236 @@
+// Type definitions for URI.js 1.15.1
+// Project: https://github.com/medialize/URI.js
+// Definitions by: RodneyJT <https://github.com/RodneyJT>, Brian Surowiec <https://github.com/xt0rted>
+// Definitions: https://github.com/borisyankov/DefinitelyTyped
+
+/// <reference path="../jquery/jquery.d.ts" />
+
+declare module uri {
+
+ interface URI {
+ absoluteTo(path: string): URI;
+ absoluteTo(path: URI): URI;
+ addFragment(fragment: string): URI;
+ addQuery(qry: string): URI;
+ addQuery(qry: Object): URI;
+ addSearch(qry: string): URI;
+ addSearch(key: string, value:any): URI;
+ addSearch(qry: Object): URI;
+ authority(): string;
+ authority(authority: string): URI;
+
+ clone(): URI;
+
+ directory(): string;
+ directory(dir: boolean): string;
+ directory(dir: string): URI;
+ domain(): string;
+ domain(domain: boolean): string;
+ domain(domain: string): URI;
+
+ duplicateQueryParameters(val: boolean): URI;
+
+ equals(): boolean;
+ equals(url: string): boolean;
+
+ filename(): string;
+ filename(file: boolean): string;
+ filename(file: string): URI;
+ fragment(): string;
+ fragment(fragment: string): URI;
+ fragmentPrefix(prefix: string): URI;
+
+ hash(): string;
+ hash(hash: string): URI;
+ host(): string;
+ host(host: string): URI;
+ hostname(): string;
+ hostname(hostname: string): URI;
+ href(): string;
+ href(url: string): void;
+
+ is(qry: string): boolean;
+ iso8859(): URI;
+
+ normalize(): URI;
+ normalizeFragment(): URI;
+ normalizeHash(): URI;
+ normalizeHostname(): URI;
+ normalizePath(): URI;
+ normalizePathname(): URI;
+ normalizePort(): URI;
+ normalizeProtocol(): URI;
+ normalizeQuery(): URI;
+ normalizeSearch(): URI;
+
+ password(): string;
+ password(pw: string): URI;
+ path(): string;
+ path(path: boolean): string;
+ path(path: string): URI;
+ pathname(): string;
+ pathname(path: boolean): string;
+ pathname(path: string): URI;
+ port(): string;
+ port(port: string): URI;
+ protocol(): string;
+ protocol(protocol: string): URI;
+
+ query(): string;
+ query(qry: string): URI;
+ query(qry: boolean): Object;
+ query(qry: Object): URI;
+
+ readable(): string;
+ relativeTo(path: string): URI;
+ removeQuery(qry: string): URI;
+ removeQuery(qry: Object): URI;
+ removeSearch(qry: string): URI;
+ removeSearch(qry: Object): URI;
+ resource(): string;
+ resource(resource: string): URI;
+
+ scheme(): string;
+ scheme(protocol: string): URI;
+ search(): string;
+ search(qry: string): URI;
+ search(qry: boolean): any;
+ search(qry: Object): URI;
+ segment(): string[];
+ segment(segments: string[]): URI;
+ segment(position: number): string;
+ segment(position: number, level: string): URI;
+ segment(segment: string): URI;
+ setQuery(key: string, value: string): URI;
+ setQuery(qry: Object): URI;
+ setSearch(key: string, value: string): URI;
+ setSearch(qry: Object): URI;
+ subdomain(): string;
+ subdomain(subdomain: string): URI;
+ suffix(): string;
+ suffix(suffix: boolean): string;
+ suffix(suffix: string): URI;
+
+ tld(): string;
+ tld(tld: boolean): string;
+ tld(tld: string): URI;
+
+ unicode(): URI;
+ userinfo(): string;
+ userinfo(userinfo: string): URI;
+ username(): string;
+ username(uname: string): URI;
+
+ valueOf(): string;
+ }
+
+ interface URIOptions {
+ protocol?: string;
+ username?: string;
+ password?: string;
+ hostname?: string;
+ port?: string;
+ path?: string;
+ query?: string;
+ fragment?: string;
+ }
+
+ interface URIStatic {
+ (): URI;
+ (value: string | URIOptions | HTMLElement): URI;
+
+ new (): URI;
+ new (value: string | URIOptions | HTMLElement): URI;
+
+ addQuery(data: Object, prop: string, value: string): Object;
+ addQuery(data: Object, qryObj: Object): Object;
+
+ build(parts: {
+ protocol: string;
+ username: string;
+ password: string;
+ hostname: string;
+ port: string;
+ path: string;
+ query: string;
+ fragment: string;
+ }): string;
+ buildAuthority(parts: {
+ username?: string;
+ password?: string;
+ hostname?: string;
+ port?: string;
+ }): string;
+ buildHost(parts: {
+ hostname?: string;
+ port?: string;
+ }): string;
+ buildQuery(qry: Object): string;
+ buildQuery(qry: Object, duplicates: boolean): string;
+ buildUserinfo(parts: {
+ username?: string;
+ password?: string;
+ }): string;
+
+ commonPath(path1: string, path2: string): string;
+
+ decode(str: string): string;
+ decodeQuery(qry: string): string;
+
+ encode(str: string): string;
+ encodeQuery(qry: string): string;
+ encodeReserved(str: string): string;
+ expand(template: string, vals: Object): URI;
+
+ iso8859(): void;
+
+ parse(url: string): {
+ protocol: string;
+ username: string;
+ password: string;
+ hostname: string;
+ port: string;
+ path: string;
+ query: string;
+ fragment: string;
+ };
+ parseAuthority(url: string, parts: {
+ username?: string;
+ password?: string;
+ hostname?: string;
+ port?: string;
+ }): string;
+ parseHost(url: string, parts: {
+ hostname?: string;
+ port?: string;
+ }): string;
+ parseQuery(url: string): Object;
+ parseUserinfo(url: string, parts: {
+ username?: string;
+ password?: string;
+ }): string;
+
+ removeQuery(data: Object, prop: string, value: string): Object;
+ removeQuery(data: Object, props: string[]): Object;
+ removeQuery(data: Object, props: Object): Object;
+
+ unicode(): void;
+
+ withinString(source: string, func: (url: string) => string): string;
+ }
+
+}
+
+interface JQuery {
+ uri(): uri.URI;
+}
+
+declare var URI: uri.URIStatic;
+
+declare module 'URI' {
+ export = URI;
+}
+
+declare module 'urijs' {
+ export = URI;
+}
diff --git a/extension/lib/decl/webrtc/MediaStream.d.ts b/extension/lib/decl/webrtc/MediaStream.d.ts
new file mode 100644
index 000000000..a2306b621
--- /dev/null
+++ b/extension/lib/decl/webrtc/MediaStream.d.ts
@@ -0,0 +1,199 @@
+// Type definitions for WebRTC
+// Project: http://dev.w3.org/2011/webrtc/
+// Definitions by: Ken Smith <https://github.com/smithkl42/>
+// Definitions: https://github.com/borisyankov/DefinitelyTyped
+
+// Taken from http://dev.w3.org/2011/webrtc/editor/getusermedia.html
+// version: W3C Editor's Draft 29 June 2015
+
+interface ConstrainBooleanParameters {
+ exact?: boolean;
+ ideal?: boolean;
+}
+
+interface NumberRange {
+ max?: number;
+ min?: number;
+}
+
+interface ConstrainNumberRange extends NumberRange {
+ exact?: number;
+ ideal?: number;
+}
+
+interface ConstrainStringParameters {
+ exact?: string | string[];
+ ideal?: string | string[];
+}
+
+interface MediaStreamConstraints {
+ video?: boolean | MediaTrackConstraints;
+ audio?: boolean | MediaTrackConstraints;
+}
+
+declare module W3C {
+ type LongRange = NumberRange;
+ type DoubleRange = NumberRange;
+ type ConstrainBoolean = boolean | ConstrainBooleanParameters;
+ type ConstrainNumber = number | ConstrainNumberRange;
+ type ConstrainLong = ConstrainNumber;
+ type ConstrainDouble = ConstrainNumber;
+ type ConstrainString = string | string[] | ConstrainStringParameters;
+}
+
+interface MediaTrackConstraints extends MediaTrackConstraintSet {
+ advanced?: MediaTrackConstraintSet[];
+}
+
+interface MediaTrackConstraintSet {
+ width?: W3C.ConstrainLong;
+ height?: W3C.ConstrainLong;
+ aspectRatio?: W3C.ConstrainDouble;
+ frameRate?: W3C.ConstrainDouble;
+ facingMode?: W3C.ConstrainString;
+ volume?: W3C.ConstrainDouble;
+ sampleRate?: W3C.ConstrainLong;
+ sampleSize?: W3C.ConstrainLong;
+ echoCancellation?: W3C.ConstrainBoolean;
+ latency?: W3C.ConstrainDouble;
+ deviceId?: W3C.ConstrainString;
+ groupId?: W3C.ConstrainString;
+}
+
+interface MediaTrackSupportedConstraints {
+ width?: boolean;
+ height?: boolean;
+ aspectRatio?: boolean;
+ frameRate?: boolean;
+ facingMode?: boolean;
+ volume?: boolean;
+ sampleRate?: boolean;
+ sampleSize?: boolean;
+ echoCancellation?: boolean;
+ latency?: boolean;
+ deviceId?: boolean;
+ groupId?: boolean;
+}
+
+interface MediaStream extends EventTarget {
+ id: string;
+ active: boolean;
+
+ onactive: EventListener;
+ oninactive: EventListener;
+ onaddtrack: (event: MediaStreamTrackEvent) => any;
+ onremovetrack: (event: MediaStreamTrackEvent) => any;
+
+ clone(): MediaStream;
+ stop(): void;
+
+ getAudioTracks(): MediaStreamTrack[];
+ getVideoTracks(): MediaStreamTrack[];
+ getTracks(): MediaStreamTrack[];
+
+ getTrackById(trackId: string): MediaStreamTrack;
+
+ addTrack(track: MediaStreamTrack): void;
+ removeTrack(track: MediaStreamTrack): void;
+}
+
+interface MediaStreamTrackEvent extends Event {
+ track: MediaStreamTrack;
+}
+
+declare enum MediaStreamTrackState {
+ "live",
+ "ended"
+}
+
+interface MediaStreamTrack extends EventTarget {
+ id: string;
+ kind: string;
+ label: string;
+ enabled: boolean;
+ muted: boolean;
+ remote: boolean;
+ readyState: MediaStreamTrackState;
+
+ onmute: EventListener;
+ onunmute: EventListener;
+ onended: EventListener;
+ onoverconstrained: EventListener;
+
+ clone(): MediaStreamTrack;
+
+ stop(): void;
+
+ getCapabilities(): MediaTrackCapabilities;
+ getConstraints(): MediaTrackConstraints;
+ getSettings(): MediaTrackSettings;
+ applyConstraints(constraints: MediaTrackConstraints): Promise<void>;
+}
+
+interface MediaTrackCapabilities {
+ width: number | W3C.LongRange;
+ height: number | W3C.LongRange;
+ aspectRatio: number | W3C.DoubleRange;
+ frameRate: number | W3C.DoubleRange;
+ facingMode: string;
+ volume: number | W3C.DoubleRange;
+ sampleRate: number | W3C.LongRange;
+ sampleSize: number | W3C.LongRange;
+ echoCancellation: boolean[];
+ latency: number | W3C.DoubleRange;
+ deviceId: string;
+ groupId: string;
+}
+
+interface MediaTrackSettings {
+ width: number;
+ height: number;
+ aspectRatio: number;
+ frameRate: number;
+ facingMode: string;
+ volume: number;
+ sampleRate: number;
+ sampleSize: number;
+ echoCancellation: boolean;
+ latency: number;
+ deviceId: string;
+ groupId: string;
+}
+
+interface MediaStreamError {
+ name: string;
+ message: string;
+ constraintName: string;
+}
+
+interface NavigatorGetUserMedia {
+ (constraints: MediaStreamConstraints,
+ successCallback: (stream: MediaStream) => void,
+ errorCallback: (error: MediaStreamError) => void): void;
+}
+
+interface Navigator {
+ getUserMedia: NavigatorGetUserMedia;
+
+ webkitGetUserMedia: NavigatorGetUserMedia;
+
+ mozGetUserMedia: NavigatorGetUserMedia;
+
+ msGetUserMedia: NavigatorGetUserMedia;
+
+ mediaDevices: MediaDevices;
+}
+
+interface MediaDevices {
+ getSupportedConstraints(): MediaTrackSupportedConstraints;
+
+ getUserMedia(constraints: MediaStreamConstraints): Promise<MediaStream>;
+ enumerateDevices(): Promise<MediaDeviceInfo[]>;
+}
+
+interface MediaDeviceInfo {
+ label: string;
+ id: string;
+ kind: string;
+ facing: string;
+}
diff --git a/extension/lib/emscripten/emsc.d.ts b/extension/lib/emscripten/emsc.d.ts
new file mode 100644
index 000000000..659457ca7
--- /dev/null
+++ b/extension/lib/emscripten/emsc.d.ts
@@ -0,0 +1,41 @@
+/*
+ This file is part of TALER
+ (C) 2016 GNUnet e.V.
+
+ TALER is free software; you can redistribute it and/or modify it under the
+ terms of the GNU General Public License as published by the Free Software
+ Foundation; either version 3, or (at your option) any later version.
+
+ TALER is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+ A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along with
+ TALER; see the file COPYING. If not, If not, see <http://www.gnu.org/licenses/>
+ */
+
+export interface EmscFunGen {
+ (name: string,
+ ret: string,
+ args: string[]): ((...x: (number|string)[]) => any);
+ (name: string,
+ ret: 'number',
+ args: string[]): ((...x: (number|string)[]) => number);
+ (name: string,
+ ret: 'void',
+ args: string[]): ((...x: (number|string)[]) => void);
+ (name: string,
+ ret: 'string',
+ args: string[]): ((...x: (number|string)[]) => string);
+}
+
+
+export declare namespace Module {
+ var cwrap: EmscFunGen;
+ function _free(ptr: number);
+ function _malloc(n: number): number;
+ function Pointer_stringify(p: number, len?: number): string;
+ function getValue(ptr: number, type: string, noSafe?: boolean): number;
+ function setValue(ptr: number, value: number, type: string, noSafe?: boolean);
+ function writeStringToMemory(s: string, buffer: number, dontAddNull?: boolean);
+} \ No newline at end of file
diff --git a/extension/lib/emscripten/libwrapper.js b/extension/lib/emscripten/libwrapper.js
new file mode 100644
index 000000000..94c48f1d8
--- /dev/null
+++ b/extension/lib/emscripten/libwrapper.js
@@ -0,0 +1,24 @@
+var Module;if(!Module)Module=(typeof Module!=="undefined"?Module:null)||{};var moduleOverrides={};for(var key in Module){if(Module.hasOwnProperty(key)){moduleOverrides[key]=Module[key]}}var ENVIRONMENT_IS_WEB=typeof window==="object";var ENVIRONMENT_IS_WORKER=typeof importScripts==="function";var ENVIRONMENT_IS_NODE=typeof process==="object"&&typeof require==="function"&&!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_WORKER;var ENVIRONMENT_IS_SHELL=!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_NODE&&!ENVIRONMENT_IS_WORKER;if(ENVIRONMENT_IS_NODE){if(!Module["print"])Module["print"]=function print(x){process["stdout"].write(x+"\n")};if(!Module["printErr"])Module["printErr"]=function printErr(x){process["stderr"].write(x+"\n")};var nodeFS=require("fs");var nodePath=require("path");Module["read"]=function read(filename,binary){filename=nodePath["normalize"](filename);var ret=nodeFS["readFileSync"](filename);if(!ret&&filename!=nodePath["resolve"](filename)){filename=path.join(__dirname,"..","src",filename);ret=nodeFS["readFileSync"](filename)}if(ret&&!binary)ret=ret.toString();return ret};Module["readBinary"]=function readBinary(filename){var ret=Module["read"](filename,true);if(!ret.buffer){ret=new Uint8Array(ret)}assert(ret.buffer);return ret};Module["load"]=function load(f){globalEval(read(f))};if(!Module["thisProgram"]){if(process["argv"].length>1){Module["thisProgram"]=process["argv"][1].replace(/\\/g,"/")}else{Module["thisProgram"]="unknown-program"}}Module["arguments"]=process["argv"].slice(2);if(typeof module!=="undefined"){module["exports"]=Module}process["on"]("uncaughtException",(function(ex){if(!(ex instanceof ExitStatus)){throw ex}}));Module["inspect"]=(function(){return"[Emscripten Module object]"})}else if(ENVIRONMENT_IS_SHELL){if(!Module["print"])Module["print"]=print;if(typeof printErr!="undefined")Module["printErr"]=printErr;if(typeof read!="undefined"){Module["read"]=read}else{Module["read"]=function read(){throw"no read() available (jsc?)"}}Module["readBinary"]=function readBinary(f){if(typeof readbuffer==="function"){return new Uint8Array(readbuffer(f))}var data=read(f,"binary");assert(typeof data==="object");return data};if(typeof scriptArgs!="undefined"){Module["arguments"]=scriptArgs}else if(typeof arguments!="undefined"){Module["arguments"]=arguments}}else if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){Module["read"]=function read(url){var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.send(null);return xhr.responseText};if(typeof arguments!="undefined"){Module["arguments"]=arguments}if(typeof console!=="undefined"){if(!Module["print"])Module["print"]=function print(x){console.log(x)};if(!Module["printErr"])Module["printErr"]=function printErr(x){console.log(x)}}else{var TRY_USE_DUMP=false;if(!Module["print"])Module["print"]=TRY_USE_DUMP&&typeof dump!=="undefined"?(function(x){dump(x)}):(function(x){})}if(ENVIRONMENT_IS_WORKER){Module["load"]=importScripts}if(typeof Module["setWindowTitle"]==="undefined"){Module["setWindowTitle"]=(function(title){document.title=title})}}else{throw"Unknown runtime environment. Where are we?"}function globalEval(x){abort("NO_DYNAMIC_EXECUTION=1 was set, cannot eval")}if(!Module["load"]&&Module["read"]){Module["load"]=function load(f){globalEval(Module["read"](f))}}if(!Module["print"]){Module["print"]=(function(){})}if(!Module["printErr"]){Module["printErr"]=Module["print"]}if(!Module["arguments"]){Module["arguments"]=[]}if(!Module["thisProgram"]){Module["thisProgram"]="./this.program"}Module.print=Module["print"];Module.printErr=Module["printErr"];Module["preRun"]=[];Module["postRun"]=[];for(var key in moduleOverrides){if(moduleOverrides.hasOwnProperty(key)){Module[key]=moduleOverrides[key]}}var Runtime={setTempRet0:(function(value){tempRet0=value}),getTempRet0:(function(){return tempRet0}),stackSave:(function(){return STACKTOP}),stackRestore:(function(stackTop){STACKTOP=stackTop}),getNativeTypeSize:(function(type){switch(type){case"i1":case"i8":return 1;case"i16":return 2;case"i32":return 4;case"i64":return 8;case"float":return 4;case"double":return 8;default:{if(type[type.length-1]==="*"){return Runtime.QUANTUM_SIZE}else if(type[0]==="i"){var bits=parseInt(type.substr(1));assert(bits%8===0);return bits/8}else{return 0}}}}),getNativeFieldSize:(function(type){return Math.max(Runtime.getNativeTypeSize(type),Runtime.QUANTUM_SIZE)}),STACK_ALIGN:16,prepVararg:(function(ptr,type){if(type==="double"||type==="i64"){if(ptr&7){assert((ptr&7)===4);ptr+=4}}else{assert((ptr&3)===0)}return ptr}),getAlignSize:(function(type,size,vararg){if(!vararg&&(type=="i64"||type=="double"))return 8;if(!type)return Math.min(size,8);return Math.min(size||(type?Runtime.getNativeFieldSize(type):0),Runtime.QUANTUM_SIZE)}),dynCall:(function(sig,ptr,args){if(args&&args.length){if(!args.splice)args=Array.prototype.slice.call(args);args.splice(0,0,ptr);return Module["dynCall_"+sig].apply(null,args)}else{return Module["dynCall_"+sig].call(null,ptr)}}),functionPointers:[],addFunction:(function(func){for(var i=0;i<Runtime.functionPointers.length;i++){if(!Runtime.functionPointers[i]){Runtime.functionPointers[i]=func;return 2*(1+i)}}throw"Finished up all reserved function pointers. Use a higher value for RESERVED_FUNCTION_POINTERS."}),removeFunction:(function(index){Runtime.functionPointers[(index-2)/2]=null}),warnOnce:(function(text){if(!Runtime.warnOnce.shown)Runtime.warnOnce.shown={};if(!Runtime.warnOnce.shown[text]){Runtime.warnOnce.shown[text]=1;Module.printErr(text)}}),funcWrappers:{},getFuncWrapper:(function(func,sig){assert(sig);if(!Runtime.funcWrappers[sig]){Runtime.funcWrappers[sig]={}}var sigCache=Runtime.funcWrappers[sig];if(!sigCache[func]){sigCache[func]=function dynCall_wrapper(){return Runtime.dynCall(sig,func,arguments)}}return sigCache[func]}),getCompilerSetting:(function(name){throw"You must build with -s RETAIN_COMPILER_SETTINGS=1 for Runtime.getCompilerSetting or emscripten_get_compiler_setting to work"}),stackAlloc:(function(size){var ret=STACKTOP;STACKTOP=STACKTOP+size|0;STACKTOP=STACKTOP+15&-16;return ret}),staticAlloc:(function(size){var ret=STATICTOP;STATICTOP=STATICTOP+size|0;STATICTOP=STATICTOP+15&-16;return ret}),dynamicAlloc:(function(size){var ret=DYNAMICTOP;DYNAMICTOP=DYNAMICTOP+size|0;DYNAMICTOP=DYNAMICTOP+15&-16;if(DYNAMICTOP>=TOTAL_MEMORY){var success=enlargeMemory();if(!success){DYNAMICTOP=ret;return 0}}return ret}),alignMemory:(function(size,quantum){var ret=size=Math.ceil(size/(quantum?quantum:16))*(quantum?quantum:16);return ret}),makeBigInt:(function(low,high,unsigned){var ret=unsigned?+(low>>>0)+ +(high>>>0)*+4294967296:+(low>>>0)+ +(high|0)*+4294967296;return ret}),GLOBAL_BASE:8,QUANTUM_SIZE:4,__dummy__:0};Module["Runtime"]=Runtime;var __THREW__=0;var ABORT=false;var EXITSTATUS=0;var undef=0;var tempValue,tempInt,tempBigInt,tempInt2,tempBigInt2,tempPair,tempBigIntI,tempBigIntR,tempBigIntS,tempBigIntP,tempBigIntD,tempDouble,tempFloat;var tempI64,tempI64b;var tempRet0,tempRet1,tempRet2,tempRet3,tempRet4,tempRet5,tempRet6,tempRet7,tempRet8,tempRet9;function assert(condition,text){if(!condition){abort("Assertion failed: "+text)}}var globalScope=this;function getCFunc(ident){var func=Module["_"+ident];if(!func){abort("NO_DYNAMIC_EXECUTION=1 was set, cannot eval")}assert(func,"Cannot call unknown function "+ident+" (perhaps LLVM optimizations or closure removed it?)");return func}var cwrap,ccall;((function(){var JSfuncs={"stackSave":(function(){Runtime.stackSave()}),"stackRestore":(function(){Runtime.stackRestore()}),"arrayToC":(function(arr){var ret=Runtime.stackAlloc(arr.length);writeArrayToMemory(arr,ret);return ret}),"stringToC":(function(str){var ret=0;if(str!==null&&str!==undefined&&str!==0){ret=Runtime.stackAlloc((str.length<<2)+1);writeStringToMemory(str,ret)}return ret})};var toC={"string":JSfuncs["stringToC"],"array":JSfuncs["arrayToC"]};ccall=function ccallFunc(ident,returnType,argTypes,args,opts){var func=getCFunc(ident);var cArgs=[];var stack=0;if(args){for(var i=0;i<args.length;i++){var converter=toC[argTypes[i]];if(converter){if(stack===0)stack=Runtime.stackSave();cArgs[i]=converter(args[i])}else{cArgs[i]=args[i]}}}var ret=func.apply(null,cArgs);if(returnType==="string")ret=Pointer_stringify(ret);if(stack!==0){if(opts&&opts.async){EmterpreterAsync.asyncFinalizers.push((function(){Runtime.stackRestore(stack)}));return}Runtime.stackRestore(stack)}return ret};cwrap=function cwrap(ident,returnType,argTypes){return(function(){return ccall(ident,returnType,argTypes,arguments)})}}))();Module["ccall"]=ccall;Module["cwrap"]=cwrap;function setValue(ptr,value,type,noSafe){type=type||"i8";if(type.charAt(type.length-1)==="*")type="i32";switch(type){case"i1":HEAP8[ptr>>0]=value;break;case"i8":HEAP8[ptr>>0]=value;break;case"i16":HEAP16[ptr>>1]=value;break;case"i32":HEAP32[ptr>>2]=value;break;case"i64":tempI64=[value>>>0,(tempDouble=value,+Math_abs(tempDouble)>=+1?tempDouble>+0?(Math_min(+Math_floor(tempDouble/+4294967296),+4294967295)|0)>>>0:~~+Math_ceil((tempDouble- +(~~tempDouble>>>0))/+4294967296)>>>0:0)],HEAP32[ptr>>2]=tempI64[0],HEAP32[ptr+4>>2]=tempI64[1];break;case"float":HEAPF32[ptr>>2]=value;break;case"double":HEAPF64[ptr>>3]=value;break;default:abort("invalid type for setValue: "+type)}}Module["setValue"]=setValue;function getValue(ptr,type,noSafe){type=type||"i8";if(type.charAt(type.length-1)==="*")type="i32";switch(type){case"i1":return HEAP8[ptr>>0];case"i8":return HEAP8[ptr>>0];case"i16":return HEAP16[ptr>>1];case"i32":return HEAP32[ptr>>2];case"i64":return HEAP32[ptr>>2];case"float":return HEAPF32[ptr>>2];case"double":return HEAPF64[ptr>>3];default:abort("invalid type for setValue: "+type)}return null}Module["getValue"]=getValue;var ALLOC_NORMAL=0;var ALLOC_STACK=1;var ALLOC_STATIC=2;var ALLOC_DYNAMIC=3;var ALLOC_NONE=4;Module["ALLOC_NORMAL"]=ALLOC_NORMAL;Module["ALLOC_STACK"]=ALLOC_STACK;Module["ALLOC_STATIC"]=ALLOC_STATIC;Module["ALLOC_DYNAMIC"]=ALLOC_DYNAMIC;Module["ALLOC_NONE"]=ALLOC_NONE;function allocate(slab,types,allocator,ptr){var zeroinit,size;if(typeof slab==="number"){zeroinit=true;size=slab}else{zeroinit=false;size=slab.length}var singleType=typeof types==="string"?types:null;var ret;if(allocator==ALLOC_NONE){ret=ptr}else{ret=[typeof _malloc==="function"?_malloc:Runtime.staticAlloc,Runtime.stackAlloc,Runtime.staticAlloc,Runtime.dynamicAlloc][allocator===undefined?ALLOC_STATIC:allocator](Math.max(size,singleType?1:types.length))}if(zeroinit){var ptr=ret,stop;assert((ret&3)==0);stop=ret+(size&~3);for(;ptr<stop;ptr+=4){HEAP32[ptr>>2]=0}stop=ret+size;while(ptr<stop){HEAP8[ptr++>>0]=0}return ret}if(singleType==="i8"){if(slab.subarray||slab.slice){HEAPU8.set(slab,ret)}else{HEAPU8.set(new Uint8Array(slab),ret)}return ret}var i=0,type,typeSize,previousType;while(i<size){var curr=slab[i];if(typeof curr==="function"){curr=Runtime.getFunctionIndex(curr)}type=singleType||types[i];if(type===0){i++;continue}if(type=="i64")type="i32";setValue(ret+i,curr,type);if(previousType!==type){typeSize=Runtime.getNativeTypeSize(type);previousType=type}i+=typeSize}return ret}Module["allocate"]=allocate;function getMemory(size){if(!staticSealed)return Runtime.staticAlloc(size);if(typeof _sbrk!=="undefined"&&!_sbrk.called||!runtimeInitialized)return Runtime.dynamicAlloc(size);return _malloc(size)}Module["getMemory"]=getMemory;function Pointer_stringify(ptr,length){if(length===0||!ptr)return"";var hasUtf=0;var t;var i=0;while(1){t=HEAPU8[ptr+i>>0];hasUtf|=t;if(t==0&&!length)break;i++;if(length&&i==length)break}if(!length)length=i;var ret="";if(hasUtf<128){var MAX_CHUNK=1024;var curr;while(length>0){curr=String.fromCharCode.apply(String,HEAPU8.subarray(ptr,ptr+Math.min(length,MAX_CHUNK)));ret=ret?ret+curr:curr;ptr+=MAX_CHUNK;length-=MAX_CHUNK}return ret}return Module["UTF8ToString"](ptr)}Module["Pointer_stringify"]=Pointer_stringify;function AsciiToString(ptr){var str="";while(1){var ch=HEAP8[ptr++>>0];if(!ch)return str;str+=String.fromCharCode(ch)}}Module["AsciiToString"]=AsciiToString;function stringToAscii(str,outPtr){return writeAsciiToMemory(str,outPtr,false)}Module["stringToAscii"]=stringToAscii;function UTF8ArrayToString(u8Array,idx){var u0,u1,u2,u3,u4,u5;var str="";while(1){u0=u8Array[idx++];if(!u0)return str;if(!(u0&128)){str+=String.fromCharCode(u0);continue}u1=u8Array[idx++]&63;if((u0&224)==192){str+=String.fromCharCode((u0&31)<<6|u1);continue}u2=u8Array[idx++]&63;if((u0&240)==224){u0=(u0&15)<<12|u1<<6|u2}else{u3=u8Array[idx++]&63;if((u0&248)==240){u0=(u0&7)<<18|u1<<12|u2<<6|u3}else{u4=u8Array[idx++]&63;if((u0&252)==248){u0=(u0&3)<<24|u1<<18|u2<<12|u3<<6|u4}else{u5=u8Array[idx++]&63;u0=(u0&1)<<30|u1<<24|u2<<18|u3<<12|u4<<6|u5}}}if(u0<65536){str+=String.fromCharCode(u0)}else{var ch=u0-65536;str+=String.fromCharCode(55296|ch>>10,56320|ch&1023)}}}Module["UTF8ArrayToString"]=UTF8ArrayToString;function UTF8ToString(ptr){return UTF8ArrayToString(HEAPU8,ptr)}Module["UTF8ToString"]=UTF8ToString;function stringToUTF8Array(str,outU8Array,outIdx,maxBytesToWrite){if(!(maxBytesToWrite>0))return 0;var startIdx=outIdx;var endIdx=outIdx+maxBytesToWrite-1;for(var i=0;i<str.length;++i){var u=str.charCodeAt(i);if(u>=55296&&u<=57343)u=65536+((u&1023)<<10)|str.charCodeAt(++i)&1023;if(u<=127){if(outIdx>=endIdx)break;outU8Array[outIdx++]=u}else if(u<=2047){if(outIdx+1>=endIdx)break;outU8Array[outIdx++]=192|u>>6;outU8Array[outIdx++]=128|u&63}else if(u<=65535){if(outIdx+2>=endIdx)break;outU8Array[outIdx++]=224|u>>12;outU8Array[outIdx++]=128|u>>6&63;outU8Array[outIdx++]=128|u&63}else if(u<=2097151){if(outIdx+3>=endIdx)break;outU8Array[outIdx++]=240|u>>18;outU8Array[outIdx++]=128|u>>12&63;outU8Array[outIdx++]=128|u>>6&63;outU8Array[outIdx++]=128|u&63}else if(u<=67108863){if(outIdx+4>=endIdx)break;outU8Array[outIdx++]=248|u>>24;outU8Array[outIdx++]=128|u>>18&63;outU8Array[outIdx++]=128|u>>12&63;outU8Array[outIdx++]=128|u>>6&63;outU8Array[outIdx++]=128|u&63}else{if(outIdx+5>=endIdx)break;outU8Array[outIdx++]=252|u>>30;outU8Array[outIdx++]=128|u>>24&63;outU8Array[outIdx++]=128|u>>18&63;outU8Array[outIdx++]=128|u>>12&63;outU8Array[outIdx++]=128|u>>6&63;outU8Array[outIdx++]=128|u&63}}outU8Array[outIdx]=0;return outIdx-startIdx}Module["stringToUTF8Array"]=stringToUTF8Array;function stringToUTF8(str,outPtr,maxBytesToWrite){return stringToUTF8Array(str,HEAPU8,outPtr,maxBytesToWrite)}Module["stringToUTF8"]=stringToUTF8;function lengthBytesUTF8(str){var len=0;for(var i=0;i<str.length;++i){var u=str.charCodeAt(i);if(u>=55296&&u<=57343)u=65536+((u&1023)<<10)|str.charCodeAt(++i)&1023;if(u<=127){++len}else if(u<=2047){len+=2}else if(u<=65535){len+=3}else if(u<=2097151){len+=4}else if(u<=67108863){len+=5}else{len+=6}}return len}Module["lengthBytesUTF8"]=lengthBytesUTF8;function UTF16ToString(ptr){var i=0;var str="";while(1){var codeUnit=HEAP16[ptr+i*2>>1];if(codeUnit==0)return str;++i;str+=String.fromCharCode(codeUnit)}}Module["UTF16ToString"]=UTF16ToString;function stringToUTF16(str,outPtr,maxBytesToWrite){if(maxBytesToWrite===undefined){maxBytesToWrite=2147483647}if(maxBytesToWrite<2)return 0;maxBytesToWrite-=2;var startPtr=outPtr;var numCharsToWrite=maxBytesToWrite<str.length*2?maxBytesToWrite/2:str.length;for(var i=0;i<numCharsToWrite;++i){var codeUnit=str.charCodeAt(i);HEAP16[outPtr>>1]=codeUnit;outPtr+=2}HEAP16[outPtr>>1]=0;return outPtr-startPtr}Module["stringToUTF16"]=stringToUTF16;function lengthBytesUTF16(str){return str.length*2}Module["lengthBytesUTF16"]=lengthBytesUTF16;function UTF32ToString(ptr){var i=0;var str="";while(1){var utf32=HEAP32[ptr+i*4>>2];if(utf32==0)return str;++i;if(utf32>=65536){var ch=utf32-65536;str+=String.fromCharCode(55296|ch>>10,56320|ch&1023)}else{str+=String.fromCharCode(utf32)}}}Module["UTF32ToString"]=UTF32ToString;function stringToUTF32(str,outPtr,maxBytesToWrite){if(maxBytesToWrite===undefined){maxBytesToWrite=2147483647}if(maxBytesToWrite<4)return 0;var startPtr=outPtr;var endPtr=startPtr+maxBytesToWrite-4;for(var i=0;i<str.length;++i){var codeUnit=str.charCodeAt(i);if(codeUnit>=55296&&codeUnit<=57343){var trailSurrogate=str.charCodeAt(++i);codeUnit=65536+((codeUnit&1023)<<10)|trailSurrogate&1023}HEAP32[outPtr>>2]=codeUnit;outPtr+=4;if(outPtr+4>endPtr)break}HEAP32[outPtr>>2]=0;return outPtr-startPtr}Module["stringToUTF32"]=stringToUTF32;function lengthBytesUTF32(str){var len=0;for(var i=0;i<str.length;++i){var codeUnit=str.charCodeAt(i);if(codeUnit>=55296&&codeUnit<=57343)++i;len+=4}return len}Module["lengthBytesUTF32"]=lengthBytesUTF32;function demangle(func){var hasLibcxxabi=!!Module["___cxa_demangle"];if(hasLibcxxabi){try{var buf=_malloc(func.length);writeStringToMemory(func.substr(1),buf);var status=_malloc(4);var ret=Module["___cxa_demangle"](buf,0,0,status);if(getValue(status,"i32")===0&&ret){return Pointer_stringify(ret)}}catch(e){}finally{if(buf)_free(buf);if(status)_free(status);if(ret)_free(ret)}}var i=3;var basicTypes={"v":"void","b":"bool","c":"char","s":"short","i":"int","l":"long","f":"float","d":"double","w":"wchar_t","a":"signed char","h":"unsigned char","t":"unsigned short","j":"unsigned int","m":"unsigned long","x":"long long","y":"unsigned long long","z":"..."};var subs=[];var first=true;function dump(x){if(x)Module.print(x);Module.print(func);var pre="";for(var a=0;a<i;a++)pre+=" ";Module.print(pre+"^")}function parseNested(){i++;if(func[i]==="K")i++;var parts=[];while(func[i]!=="E"){if(func[i]==="S"){i++;var next=func.indexOf("_",i);var num=func.substring(i,next)||0;parts.push(subs[num]||"?");i=next+1;continue}if(func[i]==="C"){parts.push(parts[parts.length-1]);i+=2;continue}var size=parseInt(func.substr(i));var pre=size.toString().length;if(!size||!pre){i--;break}var curr=func.substr(i+pre,size);parts.push(curr);subs.push(curr);i+=pre+size}i++;return parts}function parse(rawList,limit,allowVoid){limit=limit||Infinity;var ret="",list=[];function flushList(){return"("+list.join(", ")+")"}var name;if(func[i]==="N"){name=parseNested().join("::");limit--;if(limit===0)return rawList?[name]:name}else{if(func[i]==="K"||first&&func[i]==="L")i++;var size=parseInt(func.substr(i));if(size){var pre=size.toString().length;name=func.substr(i+pre,size);i+=pre+size}}first=false;if(func[i]==="I"){i++;var iList=parse(true);var iRet=parse(true,1,true);ret+=iRet[0]+" "+name+"<"+iList.join(", ")+">"}else{ret=name}paramLoop:while(i<func.length&&limit-->0){var c=func[i++];if(c in basicTypes){list.push(basicTypes[c])}else{switch(c){case"P":list.push(parse(true,1,true)[0]+"*");break;case"R":list.push(parse(true,1,true)[0]+"&");break;case"L":{i++;var end=func.indexOf("E",i);var size=end-i;list.push(func.substr(i,size));i+=size+2;break};case"A":{var size=parseInt(func.substr(i));i+=size.toString().length;if(func[i]!=="_")throw"?";i++;list.push(parse(true,1,true)[0]+" ["+size+"]");break};case"E":break paramLoop;default:ret+="?"+c;break paramLoop}}}if(!allowVoid&&list.length===1&&list[0]==="void")list=[];if(rawList){if(ret){list.push(ret+"?")}return list}else{return ret+flushList()}}var parsed=func;try{if(func=="Object._main"||func=="_main"){return"main()"}if(typeof func==="number")func=Pointer_stringify(func);if(func[0]!=="_")return func;if(func[1]!=="_")return func;if(func[2]!=="Z")return func;switch(func[3]){case"n":return"operator new()";case"d":return"operator delete()"}parsed=parse()}catch(e){parsed+="?"}if(parsed.indexOf("?")>=0&&!hasLibcxxabi){Runtime.warnOnce("warning: a problem occurred in builtin C++ name demangling; build with -s DEMANGLE_SUPPORT=1 to link in libcxxabi demangling")}return parsed}function demangleAll(text){return text.replace(/__Z[\w\d_]+/g,(function(x){var y=demangle(x);return x===y?x:x+" ["+y+"]"}))}function jsStackTrace(){var err=new Error;if(!err.stack){try{throw new Error(0)}catch(e){err=e}if(!err.stack){return"(no stack trace available)"}}return err.stack.toString()}function stackTrace(){return demangleAll(jsStackTrace())}Module["stackTrace"]=stackTrace;var PAGE_SIZE=4096;function alignMemoryPage(x){if(x%4096>0){x+=4096-x%4096}return x}var HEAP;var buffer;var HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;function updateGlobalBuffer(buf){Module["buffer"]=buffer=buf}function updateGlobalBufferViews(){Module["HEAP8"]=HEAP8=new Int8Array(buffer);Module["HEAP16"]=HEAP16=new Int16Array(buffer);Module["HEAP32"]=HEAP32=new Int32Array(buffer);Module["HEAPU8"]=HEAPU8=new Uint8Array(buffer);Module["HEAPU16"]=HEAPU16=new Uint16Array(buffer);Module["HEAPU32"]=HEAPU32=new Uint32Array(buffer);Module["HEAPF32"]=HEAPF32=new Float32Array(buffer);Module["HEAPF64"]=HEAPF64=new Float64Array(buffer)}var STATIC_BASE=0,STATICTOP=0,staticSealed=false;var STACK_BASE=0,STACKTOP=0,STACK_MAX=0;var DYNAMIC_BASE=0,DYNAMICTOP=0;function abortOnCannotGrowMemory(){abort("Cannot enlarge memory arrays. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value "+TOTAL_MEMORY+", (2) compile with -s ALLOW_MEMORY_GROWTH=1 which adjusts the size at runtime but prevents some optimizations, (3) set Module.TOTAL_MEMORY to a higher value before the program runs, or if you want malloc to return NULL (0) instead of this abort, compile with -s ABORTING_MALLOC=0 ")}function enlargeMemory(){abortOnCannotGrowMemory()}var TOTAL_STACK=Module["TOTAL_STACK"]||5242880;var TOTAL_MEMORY=Module["TOTAL_MEMORY"]||16777216;var totalMemory=64*1024;while(totalMemory<TOTAL_MEMORY||totalMemory<2*TOTAL_STACK){if(totalMemory<16*1024*1024){totalMemory*=2}else{totalMemory+=16*1024*1024}}if(totalMemory!==TOTAL_MEMORY){TOTAL_MEMORY=totalMemory}assert(typeof Int32Array!=="undefined"&&typeof Float64Array!=="undefined"&&!!(new Int32Array(1))["subarray"]&&!!(new Int32Array(1))["set"],"JS engine does not provide full typed array support");if(Module["buffer"]){buffer=Module["buffer"];assert(buffer.byteLength===TOTAL_MEMORY,"provided buffer should be "+TOTAL_MEMORY+" bytes, but it is "+buffer.byteLength)}else{buffer=new ArrayBuffer(TOTAL_MEMORY)}updateGlobalBufferViews();HEAP32[0]=255;assert(HEAPU8[0]===255&&HEAPU8[3]===0,"Typed arrays 2 must be run on a little-endian system");Module["HEAP"]=HEAP;Module["buffer"]=buffer;Module["HEAP8"]=HEAP8;Module["HEAP16"]=HEAP16;Module["HEAP32"]=HEAP32;Module["HEAPU8"]=HEAPU8;Module["HEAPU16"]=HEAPU16;Module["HEAPU32"]=HEAPU32;Module["HEAPF32"]=HEAPF32;Module["HEAPF64"]=HEAPF64;function callRuntimeCallbacks(callbacks){while(callbacks.length>0){var callback=callbacks.shift();if(typeof callback=="function"){callback();continue}var func=callback.func;if(typeof func==="number"){if(callback.arg===undefined){Runtime.dynCall("v",func)}else{Runtime.dynCall("vi",func,[callback.arg])}}else{func(callback.arg===undefined?null:callback.arg)}}}var __ATPRERUN__=[];var __ATINIT__=[];var __ATMAIN__=[];var __ATEXIT__=[];var __ATPOSTRUN__=[];var runtimeInitialized=false;var runtimeExited=false;function preRun(){if(Module["preRun"]){if(typeof Module["preRun"]=="function")Module["preRun"]=[Module["preRun"]];while(Module["preRun"].length){addOnPreRun(Module["preRun"].shift())}}callRuntimeCallbacks(__ATPRERUN__)}function ensureInitRuntime(){if(runtimeInitialized)return;runtimeInitialized=true;callRuntimeCallbacks(__ATINIT__)}function preMain(){callRuntimeCallbacks(__ATMAIN__)}function exitRuntime(){callRuntimeCallbacks(__ATEXIT__);runtimeExited=true}function postRun(){if(Module["postRun"]){if(typeof Module["postRun"]=="function")Module["postRun"]=[Module["postRun"]];while(Module["postRun"].length){addOnPostRun(Module["postRun"].shift())}}callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(cb){__ATPRERUN__.unshift(cb)}Module["addOnPreRun"]=addOnPreRun;function addOnInit(cb){__ATINIT__.unshift(cb)}Module["addOnInit"]=addOnInit;function addOnPreMain(cb){__ATMAIN__.unshift(cb)}Module["addOnPreMain"]=addOnPreMain;function addOnExit(cb){__ATEXIT__.unshift(cb)}Module["addOnExit"]=addOnExit;function addOnPostRun(cb){__ATPOSTRUN__.unshift(cb)}Module["addOnPostRun"]=addOnPostRun;function intArrayFromString(stringy,dontAddNull,length){var len=length>0?length:lengthBytesUTF8(stringy)+1;var u8array=new Array(len);var numBytesWritten=stringToUTF8Array(stringy,u8array,0,u8array.length);if(dontAddNull)u8array.length=numBytesWritten;return u8array}Module["intArrayFromString"]=intArrayFromString;function intArrayToString(array){var ret=[];for(var i=0;i<array.length;i++){var chr=array[i];if(chr>255){chr&=255}ret.push(String.fromCharCode(chr))}return ret.join("")}Module["intArrayToString"]=intArrayToString;function writeStringToMemory(string,buffer,dontAddNull){var array=intArrayFromString(string,dontAddNull);var i=0;while(i<array.length){var chr=array[i];HEAP8[buffer+i>>0]=chr;i=i+1}}Module["writeStringToMemory"]=writeStringToMemory;function writeArrayToMemory(array,buffer){for(var i=0;i<array.length;i++){HEAP8[buffer++>>0]=array[i]}}Module["writeArrayToMemory"]=writeArrayToMemory;function writeAsciiToMemory(str,buffer,dontAddNull){for(var i=0;i<str.length;++i){HEAP8[buffer++>>0]=str.charCodeAt(i)}if(!dontAddNull)HEAP8[buffer>>0]=0}Module["writeAsciiToMemory"]=writeAsciiToMemory;function unSign(value,bits,ignore){if(value>=0){return value}return bits<=32?2*Math.abs(1<<bits-1)+value:Math.pow(2,bits)+value}function reSign(value,bits,ignore){if(value<=0){return value}var half=bits<=32?Math.abs(1<<bits-1):Math.pow(2,bits-1);if(value>=half&&(bits<=32||value>half)){value=-2*half+value}return value}if(!Math["imul"]||Math["imul"](4294967295,5)!==-5)Math["imul"]=function imul(a,b){var ah=a>>>16;var al=a&65535;var bh=b>>>16;var bl=b&65535;return al*bl+(ah*bl+al*bh<<16)|0};Math.imul=Math["imul"];if(!Math["clz32"])Math["clz32"]=(function(x){x=x>>>0;for(var i=0;i<32;i++){if(x&1<<31-i)return i}return 32});Math.clz32=Math["clz32"];var Math_abs=Math.abs;var Math_cos=Math.cos;var Math_sin=Math.sin;var Math_tan=Math.tan;var Math_acos=Math.acos;var Math_asin=Math.asin;var Math_atan=Math.atan;var Math_atan2=Math.atan2;var Math_exp=Math.exp;var Math_log=Math.log;var Math_sqrt=Math.sqrt;var Math_ceil=Math.ceil;var Math_floor=Math.floor;var Math_pow=Math.pow;var Math_imul=Math.imul;var Math_fround=Math.fround;var Math_min=Math.min;var Math_clz32=Math.clz32;var runDependencies=0;var runDependencyWatcher=null;var dependenciesFulfilled=null;function getUniqueRunDependency(id){return id}function addRunDependency(id){runDependencies++;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}}Module["addRunDependency"]=addRunDependency;function removeRunDependency(id){runDependencies--;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}if(runDependencies==0){if(runDependencyWatcher!==null){clearInterval(runDependencyWatcher);runDependencyWatcher=null}if(dependenciesFulfilled){var callback=dependenciesFulfilled;dependenciesFulfilled=null;callback()}}}Module["removeRunDependency"]=removeRunDependency;Module["preloadedImages"]={};Module["preloadedAudios"]={};var memoryInitializer=null;var ASM_CONSTS=[];STATIC_BASE=8;STATICTOP=STATIC_BASE+77568;__ATINIT__.push({func:(function(){_GNUNET_util_cl_init()})},{func:(function(){_GNUNET_CRYPTO_random_init()})},{func:(function(){_gpg_err_init()})});allocate([0,0,0,0,0,0,0,0,102,154,0,127,199,106,69,159,152,186,249,23,254,223,149,34,17,154,0,127,199,106,69,159,152,186,249,23,254,223,149,51,6,154,0,127,199,106,69,159,152,186,249,23,254,223,149,33,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,34,174,40,215,152,47,138,66,205,101,239,35,145,68,55,113,47,59,77,236,207,251,192,181,188,219,137,129,165,219,181,233,56,181,72,243,91,194,86,57,25,208,5,182,241,17,241,89,155,79,25,175,164,130,63,146,24,129,109,218,213,94,28,171,66,2,3,163,152,170,7,216,190,111,112,69,1,91,131,18,140,178,228,78,190,133,49,36,226,180,255,213,195,125,12,85,111,137,123,242,116,93,190,114,177,150,22,59,254,177,222,128,53,18,199,37,167,6,220,155,148,38,105,207,116,241,155,193,210,74,241,158,193,105,155,228,227,37,79,56,134,71,190,239,181,213,140,139,198,157,193,15,101,156,172,119,204,161,12,36,117,2,43,89,111,44,233,45,131,228,166,110,170,132,116,74,212,251,65,189,220,169,176,92,181,83,17,131,218,136,249,118,171,223,102,238,82,81,62,152,16,50,180,45,109,198,49,168,63,33,251,152,200,39,3,176,228,14,239,190,199,127,89,191,194,143,168,61,243,11,224,198,37,167,10,147,71,145,167,213,111,130,3,224,81,99,202,6,112,110,14,10,103,41,41,20,252,47,210,70,133,10,183,39,38,201,38,92,56,33,27,46,237,42,196,90,252,109,44,77,223,179,149,157,19,13,56,83,222,99,175,139,84,115,10,101,168,178,119,60,187,10,106,118,230,174,237,71,46,201,194,129,59,53,130,20,133,44,114,146,100,3,241,76,161,232,191,162,1,48,66,188,75,102,26,168,145,151,248,208,112,139,75,194,48,190,84,6,163,81,108,199,24,82,239,214,25,232,146,209,16,169,101,85,36,6,153,214,42,32,113,87,133,53,14,244,184,209,187,50,112,160,106,16,200,208,210,184,22,193,164,25,83,171,65,81,8,108,55,30,153,235,142,223,76,119,72,39,168,72,155,225,181,188,176,52,99,90,201,197,179,12,28,57,203,138,65,227,74,170,216,78,115,227,99,119,79,202,156,91,163,184,178,214,243,111,46,104,252,178,239,93,238,130,143,116,96,47,23,67,111,99,165,120,114,171,240,161,20,120,200,132,236,57,100,26,8,2,199,140,40,30,99,35,250,255,190,144,233,189,130,222,235,108,80,164,21,121,198,178,247,163,249,190,43,83,114,227,242,120,113,198,156,97,38,234,206,62,39,202,7,194,192,33,199,184,134,209,30,235,224,205,214,125,218,234,120,209,110,238,127,79,125,245,186,111,23,114,170,103,240,6,166,152,200,162,197,125,99,10,174,13,249,190,4,152,63,17,27,71,28,19,53,11,113,27,132,125,4,35,245,119,219,40,147,36,199,64,123,171,202,50,188,190,201,21,10,190,158,60,76,13,16,156,196,103,29,67,182,66,62,203,190,212,197,76,42,126,101,252,156,41,127,89,236,250,214,58,171,111,203,95,23,88,71,74,140,25,68,108,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,60,85,0,0,255,255,255,255,255,255,255,255,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,251,88,0,0,2,0,0,0,7,89,0,0,4,0,0,0,19,89,0,0,8,0,0,0,31,89,0,0,16,0,0,0,44,89,0,0,32,0,0,0,54,89,0,0,64,0,0,0,65,89,0,0,128,0,0,0,77,89,0,0,0,1,0,0,90,89,0,0,0,2,0,0,102,89,0,0,0,4,0,0,115,89,0,0,0,8,0,0,125,89,0,0,0,16,0,0,136,89,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,7,0,0,0,8,0,0,0,9,0,0,0,0,0,0,0,2,0,0,0,11,0,0,0,8,0,0,0,9,0,0,0,10,0,0,0,0,0,0,0,2,0,0,0,11,0,0,0,8,0,0,0,9,0,0,0,10,0,0,0,0,0,0,0,1,0,0,0,17,0,0,0,0,0,0,0,104,17,0,0,160,28,0,0,20,29,0,0,116,32,0,0,180,48,0,0,0,0,0,0,168,140,0,0,0,1,0,0,0,0,0,0,2,0,0,0,1,0,0,0,60,96,0,0,127,96,0,0,133,96,0,0,201,96,0,0,12,97,0,0,79,97,0,0,146,97,0,0,151,97,0,0,192,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,162,97,0,0,213,97,0,0,8,98,0,0,59,98,0,0,110,98,0,0,161,98,0,0,212,98,0,0,217,98,0,0,224,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,228,98,0,0,31,99,0,0,90,99,0,0,149,99,0,0,208,99,0,0,11,100,0,0,212,98,0,0,70,100,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,81,100,0,0,148,100,0,0,215,100,0,0,26,101,0,0,93,101,0,0,160,101,0,0,212,98,0,0,227,101,0,0,128,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,238,101,0,0,81,102,0,0,180,102,0,0,23,103,0,0,122,103,0,0,221,103,0,0,212,98,0,0,64,104,0,0,9,2,0,0,1,0,0,0,0,0,0,0,0,0,0,0,75,104,0,0,210,104,0,0,89,105,0,0,223,105,0,0,101,106,0,0,236,106,0,0,212,98,0,0,115,107,0,0,160,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,131,107,0,0,174,107,0,0,217,107,0,0,4,108,0,0,47,108,0,0,90,108,0,0,212,98,0,0,133,108,0,0,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,149,108,0,0,200,108,0,0,251,108,0,0,46,109,0,0,97,109,0,0,148,109,0,0,212,98,0,0,199,109,0,0,224,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,215,109,0,0,18,110,0,0,77,110,0,0,136,110,0,0,195,110,0,0,254,110,0,0,212,98,0,0,57,111,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,73,111,0,0,140,111,0,0,207,111,0,0,18,112,0,0,85,112,0,0,152,112,0,0,212,98,0,0,219,112,0,0,64,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,235,112,0,0,62,113,0,0,145,113,0,0,228,113,0,0,55,114,0,0,138,114,0,0,212,98,0,0,221,114,0,0,128,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,237,114,0,0,80,115,0,0,179,115,0,0,22,116,0,0,121,116,0,0,220,116,0,0,212,98,0,0,63,117,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,79,117,0,0,210,117,0,0,85,118,0,0,216,118,0,0,91,119,0,0,222,119,0,0,212,98,0,0,97,120,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,111,120,0,0,178,120,0,0,245,120,0,0,56,121,0,0,123,121,0,0,190,121,0,0,212,98,0,0,1,122,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,22,122,0,0,89,122,0,0,156,122,0,0,223,122,0,0,34,123,0,0,101,123,0,0,212,98,0,0,168,123,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,189,123,0,0,0,124,0,0,67,124,0,0,134,124,0,0,34,123,0,0,201,124,0,0,212,98,0,0,12,125,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,33,125,0,0,100,125,0,0,167,125,0,0,234,125,0,0,45,126,0,0,112,126,0,0,212,98,0,0,179,126,0,0,255,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,193,126,0,0,178,120,0,0,68,127,0,0,199,127,0,0,74,128,0,0,205,128,0,0,212,98,0,0,80,129,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,96,129,0,0,227,129,0,0,102,130,0,0,233,130,0,0,108,131,0,0,239,131,0,0,212,98,0,0,114,132,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,130,132,0,0,5,133,0,0,136,133,0,0,11,134,0,0,142,134,0,0,17,135,0,0,212,98,0,0,148,135,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,158,135,0,0,45,126,0,0,178,120,0,0,225,135,0,0,36,136,0,0,103,136,0,0,212,98,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,168,140,0,0,170,136,0,0,151,97,0,0,193,136,0,0,151,97,0,0,213,136,0,0,151,97,0,0,224,136,0,0,151,97,0,0,234,136,0,0,217,98,0,0,243,136,0,0,217,98,0,0,253,136,0,0,217,98,0,0,10,137,0,0,70,100,0,0,19,137,0,0,70,100,0,0,39,137,0,0,70,100,0,0,50,137,0,0,70,100,0,0,60,137,0,0,227,101,0,0,69,137,0,0,227,101,0,0,79,137,0,0,227,101,0,0,92,137,0,0,64,104,0,0,101,137,0,0,64,104,0,0,111,137,0,0,64,104,0,0,124,137,0,0,115,107,0,0,133,137,0,0,133,108,0,0,154,137,0,0,199,109,0,0,175,137,0,0,57,111,0,0,196,137,0,0,219,112,0,0,217,137,0,0,221,114,0,0,238,137,0,0,63,117,0,0,4,138,0,0,97,120,0,0,26,138,0,0,1,122,0,0,43,138,0,0,168,123,0,0,60,138,0,0,12,125,0,0,77,138,0,0,1,122,0,0,94,138,0,0,12,125,0,0,118,138,0,0,1,122,0,0,142,138,0,0,12,125,0,0,159,138,0,0,80,129,0,0,176,138,0,0,114,132,0,0,196,138,0,0,148,135,0,0,216,138,0,0,0,0,0,0,0,0,0,0,228,141,0,0,242,141,0,0,15,142,0,0,163,14,1,9,139,198,219,191,69,105,15,58,126,158,109,15,139,190,162,163,158,97,72,0,143,208,94,68,20,142,0,0,34,142,0,0,43,142,0,0,137,111,177,18,138,187,223,25,104,50,16,124,212,157,243,63,71,180,177,22,153,18,186,79,83,104,75,34,64,142,0,0,79,142,0,0,130,142,0,0,127,179,203,53,136,198,193,246,255,169,105,77,125,106,210,100,147,101,176,193,246,93,105,209,236,131,51,234,151,142,0,0,166,142,0,0,217,142,0,0,108,17,80,104,116,1,60,172,106,42,188,27,179,130,98,124,236,106,144,216,110,252,1,45,231,175,236,90,243,142,0,0,3,143,0,0,58,143,0,0,149,233,160,219,150,32,149,173,174,190,155,45,111,13,188,226,212,153,241,18,242,210,183,39,63,166,135,14,190,143,0,0,207,143,0,0,58,143,0,0,58,133,65,102,172,93,159,2,63,84,213,23,208,179,157,189,148,103,112,219,156,43,149,201,246,245,101,209,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,228,141,0,0,242,141,0,0,15,142,0,0,91,220,193,70,191,96,117,78,106,4,36,38,8,149,117,199,90,0,63,8,157,39,57,131,157,236,88,185,100,236,56,67,20,142,0,0,34,142,0,0,43,142,0,0,176,52,76,97,216,219,56,83,92,168,175,206,175,11,241,43,136,29,194,0,201,131,61,167,38,233,55,108,46,50,207,247,64,142,0,0,79,142,0,0,130,142,0,0,119,62,169,30,54,128,14,70,133,77,184,235,208,145,129,167,41,89,9,139,62,248,193,34,217,99,85,20,206,213,101,254,151,142,0,0,166,142,0,0,217,142,0,0,130,85,138,56,154,68,60,14,164,204,129,152,153,242,8,58,133,240,250,163,229,120,248,7,122,46,63,244,103,41,102,91,243,142,0,0,3,143,0,0,58,143,0,0,96,228,49,89,30,224,182,127,13,138,38,170,203,245,183,127,142,11,198,33,55,40,197,20,5,70,4,15,14,227,127,84,190,143,0,0,207,143,0,0,58,143,0,0,155,9,255,167,27,148,47,203,39,99,95,188,213,176,233,68,191,220,99,100,79,7,19,147,138,127,81,83,92,58,53,226,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,228,141,0,0,242,141,0,0,15,142,0,0,175,69,210,227,118,72,64,49,97,127,120,210,181,138,107,27,156,126,244,100,245,160,27,71,228,46,195,115,99,34,68,94,142,34,64,202,94,105,226,199,139,50,57,236,250,178,22,73,20,142,0,0,34,142,0,0,43,142,0,0,175,208,57,68,216,72,149,98,107,8,37,244,171,70,144,127,21,249,218,219,228,16,30,198,130,170,3,76,124,235,197,156,250,234,158,169,7,110,222,127,74,241,82,232,178,250,156,182,64,142,0,0,79,142,0,0,130,142,0,0,136,6,38,8,211,230,173,138,10,162,172,224,20,200,168,111,10,166,53,217,71,172,159,235,232,62,244,229,89,102,20,75,42,90,179,157,193,56,20,185,78,58,182,225,1,163,79,39,151,142,0,0,166,142,0,0,217,142,0,0,62,138,105,183,120,60,37,133,25,51,171,98,144,175,108,167,122,153,129,72,8,80,0,156,197,87,124,110,31,87,59,78,104,1,221,35,196,167,214,121,204,248,163,134,198,116,207,251,243,142,0,0,3,143,0,0,58,143,0,0,78,206,8,68,133,129,62,144,136,210,198,58,4,27,197,180,79,158,241,1,42,43,88,143,60,209,31,5,3,58,196,198,12,46,246,171,64,48,254,130,150,36,141,241,99,244,73,82,190,143,0,0,207,143,0,0,58,143,0,0,102,23,23,142,148,31,2,13,53,30,47,37,78,143,211,44,96,36,32,254,176,184,251,154,220,206,187,130,70,30,153,197,166,120,204,49,231,153,23,109,56,96,230,17,12,70,82,62,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,228,141,0,0,242,141,0,0,15,142,0,0,22,75,122,123,252,248,25,226,227,149,251,231,59,86,224,163,135,189,100,34,46,131,31,214,16,39,12,215,234,37,5,84,151,88,191,117,192,90,153,74,109,3,79,101,248,240,230,253,202,234,177,163,77,74,107,75,99,110,7,10,56,188,231,55,20,142,0,0,34,142,0,0,43,142,0,0,135,170,124,222,165,239,97,157,79,240,180,36,26,29,108,176,35,121,244,226,206,78,194,120,122,208,179,5,69,225,124,222,218,168,51,183,214,184,167,2,3,139,39,78,174,163,244,228,190,157,145,78,235,97,241,112,46,105,108,32,58,18,104,84,64,142,0,0,79,142,0,0,130,142,0,0,250,115,176,8,157,86,162,132,239,176,240,117,108,137,11,233,177,181,219,221,142,232,26,54,85,248,62,51,178,39,157,57,191,62,132,130,121,167,34,200,6,180,133,164,126,103,200,7,185,70,163,55,190,232,148,38,116,39,136,89,225,50,146,251,151,142,0,0,166,142,0,0,217,142,0,0,176,186,70,86,55,69,140,105,144,229,168,197,246,29,74,247,229,118,217,127,249,75,135,45,231,111,128,80,54,30,227,219,169,28,165,193,26,162,94,180,214,121,39,92,197,120,128,99,165,241,151,65,18,12,79,45,226,173,235,235,16,162,152,221,243,142,0,0,3,143,0,0,58,143,0,0,128,178,66,99,199,193,163,235,183,20,147,193,221,123,232,180,155,70,209,244,27,74,238,193,18,27,1,55,131,248,243,82,107,86,208,55,224,95,37,152,189,15,210,33,93,106,30,82,149,230,79,115,246,63,10,236,139,145,90,152,93,120,101,152,190,143,0,0,207,143,0,0,58,143,0,0,227,123,106,119,93,200,125,186,164,223,169,249,110,94,63,253,222,189,113,248,134,114,137,134,93,245,163,45,32,205,201,68,182,2,44,172,60,73,130,177,13,94,235,85,195,228,222,21,19,70,118,251,109,224,68,96,101,201,116,64,250,140,106,88,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44,30,0,0,180,31,0,0,120,30,0,0,244,31,0,0,52,32,0,0,136,29,0,0,0,0,0,0,156,2,0,0,183,147,0,0,2,0,0,0,188,147,0,0,1,0,0,0,192,147,0,0,8,0,0,0,199,147,0,0,3,0,0,0,209,147,0,0,3,0,0,0,216,147,0,0,9,0,0,0,223,147,0,0,10,0,0,0,230,147,0,0,11,0,0,0,237,147,0,0,5,0,0,0,241,147,0,0,45,1,0,0,245,147,0,0,6,0,0,0,251,147,0,0,7,0,0,0,0,0,0,0,0,0,0,0,32,50,0,0,200,29,0,0,0,0,0,0,7,0,0,0,2,0,0,0,145,148,0,0,168,17,0,0,184,17,0,0,16,0,0,0,128,0,0,0,248,1,0,0,1,0,0,0,2,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,149,148,0,0,158,148,0,0,165,148,0,0,0,0,0,0,173,148,0,0,1,0,0,0,196,148,0,0,3,0,0,0,219,148,0,0,5,0,0,0,242,148,0,0,2,0,0,0,0,0,0,0,0,0,0,0,198,99,99,165,248,124,124,132,238,119,119,153,246,123,123,141,255,242,242,13,214,107,107,189,222,111,111,177,145,197,197,84,96,48,48,80,2,1,1,3,206,103,103,169,86,43,43,125,231,254,254,25,181,215,215,98,77,171,171,230,236,118,118,154,143,202,202,69,31,130,130,157,137,201,201,64,250,125,125,135,239,250,250,21,178,89,89,235,142,71,71,201,251,240,240,11,65,173,173,236,179,212,212,103,95,162,162,253,69,175,175,234,35,156,156,191,83,164,164,247,228,114,114,150,155,192,192,91,117,183,183,194,225,253,253,28,61,147,147,174,76,38,38,106,108,54,54,90,126,63,63,65,245,247,247,2,131,204,204,79,104,52,52,92,81,165,165,244,209,229,229,52,249,241,241,8,226,113,113,147,171,216,216,115,98,49,49,83,42,21,21,63,8,4,4,12,149,199,199,82,70,35,35,101,157,195,195,94,48,24,24,40,55,150,150,161,10,5,5,15,47,154,154,181,14,7,7,9,36,18,18,54,27,128,128,155,223,226,226,61,205,235,235,38,78,39,39,105,127,178,178,205,234,117,117,159,18,9,9,27,29,131,131,158,88,44,44,116,52,26,26,46,54,27,27,45,220,110,110,178,180,90,90,238,91,160,160,251,164,82,82,246,118,59,59,77,183,214,214,97,125,179,179,206,82,41,41,123,221,227,227,62,94,47,47,113,19,132,132,151,166,83,83,245,185,209,209,104,0,0,0,0,193,237,237,44,64,32,32,96,227,252,252,31,121,177,177,200,182,91,91,237,212,106,106,190,141,203,203,70,103,190,190,217,114,57,57,75,148,74,74,222,152,76,76,212,176,88,88,232,133,207,207,74,187,208,208,107,197,239,239,42,79,170,170,229,237,251,251,22,134,67,67,197,154,77,77,215,102,51,51,85,17,133,133,148,138,69,69,207,233,249,249,16,4,2,2,6,254,127,127,129,160,80,80,240,120,60,60,68,37,159,159,186,75,168,168,227,162,81,81,243,93,163,163,254,128,64,64,192,5,143,143,138,63,146,146,173,33,157,157,188,112,56,56,72,241,245,245,4,99,188,188,223,119,182,182,193,175,218,218,117,66,33,33,99,32,16,16,48,229,255,255,26,253,243,243,14,191,210,210,109,129,205,205,76,24,12,12,20,38,19,19,53,195,236,236,47,190,95,95,225,53,151,151,162,136,68,68,204,46,23,23,57,147,196,196,87,85,167,167,242,252,126,126,130,122,61,61,71,200,100,100,172,186,93,93,231,50,25,25,43,230,115,115,149,192,96,96,160,25,129,129,152,158,79,79,209,163,220,220,127,68,34,34,102,84,42,42,126,59,144,144,171,11,136,136,131,140,70,70,202,199,238,238,41,107,184,184,211,40,20,20,60,167,222,222,121,188,94,94,226,22,11,11,29,173,219,219,118,219,224,224,59,100,50,50,86,116,58,58,78,20,10,10,30,146,73,73,219,12,6,6,10,72,36,36,108,184,92,92,228,159,194,194,93,189,211,211,110,67,172,172,239,196,98,98,166,57,145,145,168,49,149,149,164,211,228,228,55,242,121,121,139,213,231,231,50,139,200,200,67,110,55,55,89,218,109,109,183,1,141,141,140,177,213,213,100,156,78,78,210,73,169,169,224,216,108,108,180,172,86,86,250,243,244,244,7,207,234,234,37,202,101,101,175,244,122,122,142,71,174,174,233,16,8,8,24,111,186,186,213,240,120,120,136,74,37,37,111,92,46,46,114,56,28,28,36,87,166,166,241,115,180,180,199,151,198,198,81,203,232,232,35,161,221,221,124,232,116,116,156,62,31,31,33,150,75,75,221,97,189,189,220,13,139,139,134,15,138,138,133,224,112,112,144,124,62,62,66,113,181,181,196,204,102,102,170,144,72,72,216,6,3,3,5,247,246,246,1,28,14,14,18,194,97,97,163,106,53,53,95,174,87,87,249,105,185,185,208,23,134,134,145,153,193,193,88,58,29,29,39,39,158,158,185,217,225,225,56,235,248,248,19,43,152,152,179,34,17,17,51,210,105,105,187,169,217,217,112,7,142,142,137,51,148,148,167,45,155,155,182,60,30,30,34,21,135,135,146,201,233,233,32,135,206,206,73,170,85,85,255,80,40,40,120,165,223,223,122,3,140,140,143,89,161,161,248,9,137,137,128,26,13,13,23,101,191,191,218,215,230,230,49,132,66,66,198,208,104,104,184,130,65,65,195,41,153,153,176,90,45,45,119,30,15,15,17,123,176,176,203,168,84,84,252,109,187,187,214,44,22,22,58,81,244,167,80,126,65,101,83,26,23,164,195,58,39,94,150,59,171,107,203,31,157,69,241,172,250,88,171,75,227,3,147,32,48,250,85,173,118,109,246,136,204,118,145,245,2,76,37,79,229,215,252,197,42,203,215,38,53,68,128,181,98,163,143,222,177,90,73,37,186,27,103,69,234,14,152,93,254,192,225,195,47,117,2,129,76,240,18,141,70,151,163,107,211,249,198,3,143,95,231,21,146,156,149,191,109,122,235,149,82,89,218,212,190,131,45,88,116,33,211,73,224,105,41,142,201,200,68,117,194,137,106,244,142,121,120,153,88,62,107,39,185,113,221,190,225,79,182,240,136,173,23,201,32,172,102,125,206,58,180,99,223,74,24,229,26,49,130,151,81,51,96,98,83,127,69,177,100,119,224,187,107,174,132,254,129,160,28,249,8,43,148,112,72,104,88,143,69,253,25,148,222,108,135,82,123,248,183,171,115,211,35,114,75,2,226,227,31,143,87,102,85,171,42,178,235,40,7,47,181,194,3,134,197,123,154,211,55,8,165,48,40,135,242,35,191,165,178,2,3,106,186,237,22,130,92,138,207,28,43,167,121,180,146,243,7,242,240,78,105,226,161,101,218,244,205,6,5,190,213,209,52,98,31,196,166,254,138,52,46,83,157,162,243,85,160,5,138,225,50,164,246,235,117,11,131,236,57,64,96,239,170,94,113,159,6,189,110,16,81,62,33,138,249,150,221,6,61,221,62,5,174,77,230,189,70,145,84,141,181,113,196,93,5,4,6,212,111,96,80,21,255,25,152,251,36,214,189,233,151,137,64,67,204,103,217,158,119,176,232,66,189,7,137,139,136,231,25,91,56,121,200,238,219,161,124,10,71,124,66,15,233,248,132,30,201,0,0,0,0,9,128,134,131,50,43,237,72,30,17,112,172,108,90,114,78,253,14,255,251,15,133,56,86,61,174,213,30,54,45,57,39,10,15,217,100,104,92,166,33,155,91,84,209,36,54,46,58,12,10,103,177,147,87,231,15,180,238,150,210,27,155,145,158,128,192,197,79,97,220,32,162,90,119,75,105,28,18,26,22,226,147,186,10,192,160,42,229,60,34,224,67,18,27,23,29,14,9,13,11,242,139,199,173,45,182,168,185,20,30,169,200,87,241,25,133,175,117,7,76,238,153,221,187,163,127,96,253,247,1,38,159,92,114,245,188,68,102,59,197,91,251,126,52,139,67,41,118,203,35,198,220,182,237,252,104,184,228,241,99,215,49,220,202,66,99,133,16,19,151,34,64,132,198,17,32,133,74,36,125,210,187,61,248,174,249,50,17,199,41,161,109,29,158,47,75,220,178,48,243,13,134,82,236,119,193,227,208,43,179,22,108,169,112,185,153,17,148,72,250,71,233,100,34,168,252,140,196,160,240,63,26,86,125,44,216,34,51,144,239,135,73,78,199,217,56,209,193,140,202,162,254,152,212,11,54,166,245,129,207,165,122,222,40,218,183,142,38,63,173,191,164,44,58,157,228,80,120,146,13,106,95,204,155,84,126,70,98,246,141,19,194,144,216,184,232,46,57,247,94,130,195,175,245,159,93,128,190,105,208,147,124,111,213,45,169,207,37,18,179,200,172,153,59,16,24,125,167,232,156,99,110,219,59,187,123,205,38,120,9,110,89,24,244,236,154,183,1,131,79,154,168,230,149,110,101,170,255,230,126,33,188,207,8,239,21,232,230,186,231,155,217,74,111,54,206,234,159,9,212,41,176,124,214,49,164,178,175,42,63,35,49,198,165,148,48,53,162,102,192,116,78,188,55,252,130,202,166,224,144,208,176,51,167,216,21,241,4,152,74,65,236,218,247,127,205,80,14,23,145,246,47,118,77,214,141,67,239,176,77,204,170,77,84,228,150,4,223,158,209,181,227,76,106,136,27,193,44,31,184,70,101,81,127,157,94,234,4,1,140,53,93,250,135,116,115,251,11,65,46,179,103,29,90,146,219,210,82,233,16,86,51,109,214,71,19,154,215,97,140,55,161,12,122,89,248,20,142,235,19,60,137,206,169,39,238,183,97,201,53,225,28,229,237,122,71,177,60,156,210,223,89,85,242,115,63,24,20,206,121,115,199,55,191,83,247,205,234,95,253,170,91,223,61,111,20,120,68,219,134,202,175,243,129,185,104,196,62,56,36,52,44,194,163,64,95,22,29,195,114,188,226,37,12,40,60,73,139,255,13,149,65,57,168,1,113,8,12,179,222,216,180,228,156,100,86,193,144,123,203,132,97,213,50,182,112,72,108,92,116,208,184,87,66,82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125,1,0,0,0,2,0,0,0,4,0,0,0,8,0,0,0,16,0,0,0,32,0,0,0,64,0,0,0,128,0,0,0,27,0,0,0,54,0,0,0,108,0,0,0,216,0,0,0,171,0,0,0,77,0,0,0,154,0,0,0,47,0,0,0,94,0,0,0,188,0,0,0,99,0,0,0,198,0,0,0,151,0,0,0,53,0,0,0,106,0,0,0,212,0,0,0,179,0,0,0,125,0,0,0,250,0,0,0,239,0,0,0,197,0,0,0,145,0,0,0,2,0,0,0,43,126,21,22,40,174,210,166,171,247,21,136,9,207,79,60,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,107,193,190,226,46,64,159,150,233,61,126,17,115,147,23,42,59,63,217,46,183,45,173,32,51,52,73,248,232,60,251,74,174,45,138,87,30,3,172,156,158,183,111,172,69,175,142,81,200,166,69,55,160,179,169,63,205,227,205,173,159,28,229,139,48,200,28,70,163,92,228,17,229,251,193,25,26,10,82,239,38,117,31,103,163,203,177,64,177,128,140,241,135,164,244,223,246,159,36,69,223,79,155,23,173,43,65,123,230,108,55,16,192,75,5,53,124,93,28,14,234,196,198,111,159,247,242,230,5,0,0,0,43,126,21,22,40,174,210,166,171,247,21,136,9,207,79,60,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,107,193,190,226,46,64,159,150,233,61,126,17,115,147,23,42,59,63,217,46,183,45,173,32,51,52,73,248,232,60,251,74,174,45,138,87,30,3,172,156,158,183,111,172,69,175,142,81,119,137,80,141,22,145,143,3,245,60,82,218,197,78,216,37,48,200,28,70,163,92,228,17,229,251,193,25,26,10,82,239,151,64,5,30,156,95,236,246,67,68,247,168,34,96,237,204,246,159,36,69,223,79,155,23,173,43,65,123,230,108,55,16,48,76,101,40,246,89,199,120,102,165,16,217,193,214,174,94,8,0,0,0,2,0,0,0,241,150,0,0,224,28,0,0,236,28,0,0,16,0,0,0,192,0,0,0,248,1,0,0,1,0,0,0,2,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,248,150,0,0,4,151,0,0,0,0,0,0,12,151,0,0,1,0,0,0,36,151,0,0,3,0,0,0,60,151,0,0,5,0,0,0,84,151,0,0,2,0,0,0,0,0,0,0,0,0,0,0,9,0,0,0,2,0,0,0,108,151,0,0,84,29,0,0,96,29,0,0,16,0,0,0,0,1,0,0,248,1,0,0,1,0,0,0,2,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,115,151,0,0,127,151,0,0,0,0,0,0,135,151,0,0,1,0,0,0,159,151,0,0,3,0,0,0,183,151,0,0,5,0,0,0,207,151,0,0,2,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,231,151,0,0,241,151,0,0,15,0,0,0,188,29,0,0,20,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,184,0,0,0,0,0,0,0,0,152,0,0,15,152,0,0,0,0,0,0,1,0,0,0,2,0,0,0,3,0,0,0,147,153,0,0,28,30,0,0,192,153,0,0,195,153,0,0,202,153,0,0,204,153,0,0,206,153,0,0,1,0,0,0,2,0,0,0,5,0,0,0,6,0,0,0,7,0,0,0,8,0,0,0,3,0,0,0,9,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,151,153,0,0,155,153,0,0,167,153,0,0,0,0,0,0,2,0,0,0,2,0,0,0,22,165,0,0,27,165,0,0,15,0,0,0,96,30,0,0,20,0,0,0,2,0,0,0,1,0,0,0,2,0,0,0,4,0,0,0,184,0,0,0,10,0,0,0,42,165,0,0,63,165,0,0,81,165,0,0,95,165,0,0,109,165,0,0,0,0,0,0,11,0,0,0,2,0,0,0,190,165,0,0,197,165,0,0,19,0,0,0,172,30,0,0,28,0,0,0,3,0,0,0,1,0,0,0,3,0,0,0,5,0,0,0,192,0,0,0,11,0,0,0,216,165,0,0,0,0,0,0,152,47,138,66,145,68,55,113,207,251,192,181,165,219,181,233,91,194,86,57,241,17,241,89,164,130,63,146,213,94,28,171,152,170,7,216,1,91,131,18,190,133,49,36,195,125,12,85,116,93,190,114,254,177,222,128,167,6,220,155,116,241,155,193,193,105,155,228,134,71,190,239,198,157,193,15,204,161,12,36,111,44,233,45,170,132,116,74,220,169,176,92,218,136,249,118,82,81,62,152,109,198,49,168,200,39,3,176,199,127,89,191,243,11,224,198,71,145,167,213,81,99,202,6,103,41,41,20,133,10,183,39,56,33,27,46,252,109,44,77,19,13,56,83,84,115,10,101,187,10,106,118,46,201,194,129,133,44,114,146,161,232,191,162,75,102,26,168,112,139,75,194,163,81,108,199,25,232,146,209,36,6,153,214,133,53,14,244,112,160,106,16,22,193,164,25,8,108,55,30,76,119,72,39,181,188,176,52,179,12,28,57,74,170,216,78,79,202,156,91,243,111,46,104,238,130,143,116,111,99,165,120,20,120,200,132,8,2,199,140,250,255,190,144,235,108,80,164,247,163,249,190,242,120,113,198,8,0,0,0,2,0,0,0,226,166,0,0,233,166,0,0,19,0,0,0,232,31,0,0,32,0,0,0,4,0,0,0,1,0,0,0,3,0,0,0,5,0,0,0,192,0,0,0,11,0,0,0,252,166,0,0,19,167,0,0,0,0,0,0,10,0,0,0,2,0,0,0,41,167,0,0,48,167,0,0,19,0,0,0,40,32,0,0,64,0,0,0,5,0,0,0,1,0,0,0,4,0,0,0,6,0,0,0,224,0,0,0,12,0,0,0,67,167,0,0,90,167,0,0,0,0,0,0,9,0,0,0,2,0,0,0,107,169,0,0,114,169,0,0,19,0,0,0,104,32,0,0,48,0,0,0,6,0,0,0,1,0,0,0,4,0,0,0,6,0,0,0,224,0,0,0,12,0,0,0,133,169,0,0,156,169,0,0,0,0,0,0,10,0,0,0,0,0,0,0,178,169,0,0,0,0,0,0,0,0,0,0,16,0,0,0,0,1,0,0,160,16,0,0,13,0,0,0,14,0,0,0,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,117,50,188,188,243,33,236,236,198,67,32,32,244,201,179,179,219,3,218,218,123,139,2,2,251,43,226,226,200,250,158,158,74,236,201,201,211,9,212,212,230,107,24,24,107,159,30,30,69,14,152,152,125,56,178,178,232,210,166,166,75,183,38,38,214,87,60,60,50,138,147,147,216,238,130,130,253,152,82,82,55,212,123,123,113,55,187,187,241,151,91,91,225,131,71,71,48,60,36,36,15,226,81,81,248,198,186,186,27,243,74,74,135,72,191,191,250,112,13,13,6,179,176,176,63,222,117,117,94,253,210,210,186,32,125,125,174,49,102,102,91,163,58,58,138,28,89,89,0,0,0,0,188,147,205,205,157,224,26,26,109,44,174,174,193,171,127,127,177,199,43,43,14,185,190,190,128,160,224,224,93,16,138,138,210,82,59,59,213,186,100,100,160,136,216,216,132,165,231,231,7,232,95,95,20,17,27,27,181,194,44,44,144,180,252,252,44,39,49,49,163,101,128,128,178,42,115,115,115,129,12,12,76,95,121,121,84,65,107,107,146,2,75,75,116,105,83,83,54,143,148,148,81,31,131,131,56,54,42,42,176,156,196,196,189,200,34,34,90,248,213,213,252,195,189,189,96,120,72,72,98,206,255,255,150,7,76,76,108,119,65,65,66,230,199,199,247,36,235,235,16,20,28,28,124,99,93,93,40,34,54,54,39,192,103,103,140,175,233,233,19,249,68,68,149,234,20,20,156,187,245,245,199,24,207,207,36,45,63,63,70,227,192,192,59,219,114,114,112,108,84,84,202,76,41,41,227,53,240,240,133,254,8,8,203,23,198,198,17,79,243,243,208,228,140,140,147,89,164,164,184,150,202,202,166,59,104,104,131,77,184,184,32,40,56,56,255,46,229,229,159,86,173,173,119,132,11,11,195,29,200,200,204,255,153,153,3,237,88,88,111,154,25,25,8,10,14,14,191,126,149,149,64,80,112,112,231,48,247,247,43,207,110,110,226,110,31,31,121,61,181,181,12,15,9,9,170,52,97,97,130,22,87,87,65,11,159,159,58,128,157,157,234,100,17,17,185,205,37,37,228,221,175,175,154,8,69,69,164,141,223,223,151,92,163,163,126,213,234,234,218,88,53,53,122,208,237,237,23,252,67,67,102,203,248,248,148,177,251,251,161,211,55,55,29,64,250,250,61,104,194,194,240,204,180,180,222,93,50,50,179,113,156,156,11,231,86,86,114,218,227,227,167,96,135,135,28,27,21,21,239,58,249,249,209,191,99,99,83,169,52,52,62,133,154,154,143,66,177,177,51,209,124,124,38,155,136,136,95,166,61,61,236,215,161,161,118,223,228,228,42,148,129,129,73,1,145,145,129,251,15,15,136,170,238,238,238,97,22,22,33,115,215,215,196,245,151,151,26,168,165,165,235,63,254,254,217,181,109,109,197,174,120,120,57,109,197,197,153,229,29,29,205,164,118,118,173,220,62,62,49,103,203,203,139,71,182,182,1,91,239,239,24,30,18,18,35,197,96,96,221,176,106,106,31,246,77,77,78,233,206,206,45,124,222,222,249,157,85,85,72,90,126,126,79,178,33,33,242,122,3,3,101,38,160,160,142,25,94,94,120,102,90,90,92,75,101,101,88,78,98,98,25,69,253,253,141,244,6,6,229,134,64,64,152,190,242,242,87,172,51,51,103,144,23,23,127,142,5,5,5,94,232,232,100,125,79,79,175,106,137,137,99,149,16,16,182,47,116,116,254,117,10,10,245,146,92,92,183,116,155,155,60,51,45,45,165,214,48,48,206,73,46,46,233,137,73,73,104,114,70,70,68,85,119,119,224,216,168,168,77,4,150,150,67,189,40,40,105,41,169,169,41,121,217,217,46,145,134,134,172,135,209,209,21,74,244,244,89,21,141,141,168,130,214,214,10,188,185,185,158,13,66,66,110,193,246,246,71,184,47,47,223,6,221,221,52,57,35,35,53,98,204,204,106,196,241,241,207,18,193,193,220,235,133,133,34,158,143,143,201,161,113,113,192,240,144,144,155,83,170,170,137,241,1,1,212,225,139,139,237,140,78,78,171,111,142,142,18,162,171,171,162,62,111,111,13,84,230,230,82,242,219,219,187,123,146,146,2,182,183,183,47,202,105,105,169,217,57,57,215,12,211,211,97,35,167,167,30,173,162,162,180,153,195,195,80,68,108,108,4,5,7,7,246,127,4,4,194,70,39,39,22,167,172,172,37,118,208,208,134,19,80,80,86,247,220,220,85,26,132,132,9,81,225,225,190,37,122,122,145,239,19,19,57,57,217,169,23,23,144,103,156,156,113,179,166,166,210,232,7,7,5,4,82,82,152,253,128,128,101,163,228,228,223,118,69,69,8,154,75,75,2,146,224,224,160,128,90,90,102,120,175,175,221,228,106,106,176,221,99,99,191,209,42,42,54,56,230,230,84,13,32,32,67,198,204,204,98,53,242,242,190,152,18,18,30,24,235,235,36,247,161,161,215,236,65,65,119,108,40,40,189,67,188,188,50,117,123,123,212,55,136,136,155,38,13,13,112,250,68,68,249,19,251,251,177,148,126,126,90,72,3,3,122,242,140,140,228,208,182,182,71,139,36,36,60,48,231,231,165,132,107,107,65,84,221,221,6,223,96,96,197,35,253,253,69,25,58,58,163,91,194,194,104,61,141,141,21,89,236,236,33,243,102,102,49,174,111,111,62,162,87,87,22,130,16,16,149,99,239,239,91,1,184,184,77,131,134,134,145,46,109,109,181,217,131,131,31,81,170,170,83,155,93,93,99,124,104,104,59,166,254,254,63,235,48,48,214,165,122,122,37,190,172,172,167,22,9,9,15,12,240,240,53,227,167,167,35,97,144,144,240,192,233,233,175,140,157,157,128,58,92,92,146,245,12,12,129,115,49,49,39,44,208,208,118,37,86,86,231,11,146,146,123,187,206,206,233,78,1,1,241,137,30,30,159,107,52,52,169,83,241,241,196,106,195,195,153,180,91,91,151,241,71,71,131,225,24,24,107,230,34,34,200,189,152,152,14,69,31,31,110,226,179,179,201,244,116,116,47,182,248,248,203,102,153,153,255,204,20,20,234,149,88,88,237,3,220,220,247,86,139,139,225,212,21,21,27,28,162,162,173,30,211,211,12,215,226,226,43,251,200,200,29,195,94,94,25,142,44,44,194,181,73,73,137,233,193,193,18,207,149,149,126,191,125,125,32,186,17,17,100,234,11,11,132,119,197,197,109,57,137,137,106,175,124,124,209,51,113,113,161,201,255,255,206,98,187,187,55,113,15,15,251,129,181,181,61,121,225,225,81,9,62,62,220,173,63,63,45,36,118,118,164,205,85,85,157,249,130,130,238,216,64,64,134,229,120,120,174,197,37,37,205,185,150,150,4,77,119,119,85,68,14,14,10,8,80,80,19,134,247,247,48,231,55,55,211,161,250,250,64,29,97,97,52,170,78,78,140,237,176,176,179,6,84,84,108,112,115,115,42,178,59,59,82,210,159,159,11,65,2,2,139,123,216,216,136,160,243,243,79,17,203,203,103,49,39,39,70,194,103,103,192,39,252,252,180,144,56,56,40,32,4,4,127,246,72,72,120,96,229,229,46,255,76,76,7,150,101,101,75,92,43,43,199,177,142,142,111,171,66,66,13,158,245,245,187,156,219,219,242,82,74,74,243,27,61,61,166,95,164,164,89,147,185,185,188,10,249,249,58,239,19,19,239,145,8,8,254,133,145,145,1,73,22,22,97,238,222,222,124,45,33,33,178,79,177,177,66,143,114,114,219,59,47,47,184,71,191,191,72,135,174,174,44,109,192,192,227,70,60,60,87,214,154,154,133,62,169,169,41,105,79,79,125,100,129,129,148,42,46,46,73,206,198,198,23,203,105,105,202,47,189,189,195,252,163,163,92,151,232,232,94,5,237,237,208,122,209,209,135,172,5,5,142,127,100,100,186,213,165,165,168,26,38,38,183,75,190,190,185,14,135,135,96,167,213,213,248,90,54,54,34,40,27,27,17,20,117,117,222,63,217,217,121,41,238,238,170,136,45,45,51,60,121,121,95,76,183,183,182,2,202,202,150,184,53,53,88,218,196,196,156,176,67,67,252,23,132,132,26,85,77,77,246,31,89,89,28,138,178,178,56,125,51,51,172,87,207,207,24,199,6,6,244,141,83,83,105,116,155,155,116,183],"i8",ALLOC_NONE,Runtime.GLOBAL_BASE);allocate([151,151,245,196,173,173,86,159,227,227,218,114,234,234,213,126,244,244,74,21,143,143,158,34,171,171,162,18,98,98,78,88,95,95,232,7,29,29,229,153,35,35,57,52,246,246,193,110,108,108,68,80,50,50,93,222,70,70,114,104,160,160,38,101,205,205,147,188,218,218,3,219,186,186,198,248,158,158,250,200,214,214,130,168,110,110,207,43,112,112,80,64,133,133,235,220,10,10,117,254,147,147,138,50,223,223,141,164,41,41,76,202,28,28,20,16,215,215,115,33,180,180,204,240,212,212,9,211,138,138,16,93,81,81,226,15,0,0,0,0,25,25,154,111,26,26,224,157,148,148,143,54,199,199,230,66,201,201,236,74,210,210,253,94,127,127,171,193,168,168,216,224,50,188,117,188,33,236,243,236,67,32,198,32,201,179,244,179,3,218,219,218,139,2,123,2,43,226,251,226,250,158,200,158,236,201,74,201,9,212,211,212,107,24,230,24,159,30,107,30,14,152,69,152,56,178,125,178,210,166,232,166,183,38,75,38,87,60,214,60,138,147,50,147,238,130,216,130,152,82,253,82,212,123,55,123,55,187,113,187,151,91,241,91,131,71,225,71,60,36,48,36,226,81,15,81,198,186,248,186,243,74,27,74,72,191,135,191,112,13,250,13,179,176,6,176,222,117,63,117,253,210,94,210,32,125,186,125,49,102,174,102,163,58,91,58,28,89,138,89,0,0,0,0,147,205,188,205,224,26,157,26,44,174,109,174,171,127,193,127,199,43,177,43,185,190,14,190,160,224,128,224,16,138,93,138,82,59,210,59,186,100,213,100,136,216,160,216,165,231,132,231,232,95,7,95,17,27,20,27,194,44,181,44,180,252,144,252,39,49,44,49,101,128,163,128,42,115,178,115,129,12,115,12,95,121,76,121,65,107,84,107,2,75,146,75,105,83,116,83,143,148,54,148,31,131,81,131,54,42,56,42,156,196,176,196,200,34,189,34,248,213,90,213,195,189,252,189,120,72,96,72,206,255,98,255,7,76,150,76,119,65,108,65,230,199,66,199,36,235,247,235,20,28,16,28,99,93,124,93,34,54,40,54,192,103,39,103,175,233,140,233,249,68,19,68,234,20,149,20,187,245,156,245,24,207,199,207,45,63,36,63,227,192,70,192,219,114,59,114,108,84,112,84,76,41,202,41,53,240,227,240,254,8,133,8,23,198,203,198,79,243,17,243,228,140,208,140,89,164,147,164,150,202,184,202,59,104,166,104,77,184,131,184,40,56,32,56,46,229,255,229,86,173,159,173,132,11,119,11,29,200,195,200,255,153,204,153,237,88,3,88,154,25,111,25,10,14,8,14,126,149,191,149,80,112,64,112,48,247,231,247,207,110,43,110,110,31,226,31,61,181,121,181,15,9,12,9,52,97,170,97,22,87,130,87,11,159,65,159,128,157,58,157,100,17,234,17,205,37,185,37,221,175,228,175,8,69,154,69,141,223,164,223,92,163,151,163,213,234,126,234,88,53,218,53,208,237,122,237,252,67,23,67,203,248,102,248,177,251,148,251,211,55,161,55,64,250,29,250,104,194,61,194,204,180,240,180,93,50,222,50,113,156,179,156,231,86,11,86,218,227,114,227,96,135,167,135,27,21,28,21,58,249,239,249,191,99,209,99,169,52,83,52,133,154,62,154,66,177,143,177,209,124,51,124,155,136,38,136,166,61,95,61,215,161,236,161,223,228,118,228,148,129,42,129,1,145,73,145,251,15,129,15,170,238,136,238,97,22,238,22,115,215,33,215,245,151,196,151,168,165,26,165,63,254,235,254,181,109,217,109,174,120,197,120,109,197,57,197,229,29,153,29,164,118,205,118,220,62,173,62,103,203,49,203,71,182,139,182,91,239,1,239,30,18,24,18,197,96,35,96,176,106,221,106,246,77,31,77,233,206,78,206,124,222,45,222,157,85,249,85,90,126,72,126,178,33,79,33,122,3,242,3,38,160,101,160,25,94,142,94,102,90,120,90,75,101,92,101,78,98,88,98,69,253,25,253,244,6,141,6,134,64,229,64,190,242,152,242,172,51,87,51,144,23,103,23,142,5,127,5,94,232,5,232,125,79,100,79,106,137,175,137,149,16,99,16,47,116,182,116,117,10,254,10,146,92,245,92,116,155,183,155,51,45,60,45,214,48,165,48,73,46,206,46,137,73,233,73,114,70,104,70,85,119,68,119,216,168,224,168,4,150,77,150,189,40,67,40,41,169,105,169,121,217,41,217,145,134,46,134,135,209,172,209,74,244,21,244,21,141,89,141,130,214,168,214,188,185,10,185,13,66,158,66,193,246,110,246,184,47,71,47,6,221,223,221,57,35,52,35,98,204,53,204,196,241,106,241,18,193,207,193,235,133,220,133,158,143,34,143,161,113,201,113,240,144,192,144,83,170,155,170,241,1,137,1,225,139,212,139,140,78,237,78,111,142,171,142,162,171,18,171,62,111,162,111,84,230,13,230,242,219,82,219,123,146,187,146,182,183,2,183,202,105,47,105,217,57,169,57,12,211,215,211,35,167,97,167,173,162,30,162,153,195,180,195,68,108,80,108,5,7,4,7,127,4,246,4,70,39,194,39,167,172,22,172,118,208,37,208,19,80,134,80,247,220,86,220,26,132,85,132,81,225,9,225,37,122,190,122,239,19,145,19,217,169,57,217,144,103,23,144,113,179,156,113,210,232,166,210,5,4,7,5,152,253,82,152,101,163,128,101,223,118,228,223,8,154,69,8,2,146,75,2,160,128,224,160,102,120,90,102,221,228,175,221,176,221,106,176,191,209,99,191,54,56,42,54,84,13,230,84,67,198,32,67,98,53,204,98,190,152,242,190,30,24,18,30,36,247,235,36,215,236,161,215,119,108,65,119,189,67,40,189,50,117,188,50,212,55,123,212,155,38,136,155,112,250,13,112,249,19,68,249,177,148,251,177,90,72,126,90,122,242,3,122,228,208,140,228,71,139,182,71,60,48,36,60,165,132,231,165,65,84,107,65,6,223,221,6,197,35,96,197,69,25,253,69,163,91,58,163,104,61,194,104,21,89,141,21,33,243,236,33,49,174,102,49,62,162,111,62,22,130,87,22,149,99,16,149,91,1,239,91,77,131,184,77,145,46,134,145,181,217,109,181,31,81,131,31,83,155,170,83,99,124,93,99,59,166,104,59,63,235,254,63,214,165,48,214,37,190,122,37,167,22,172,167,15,12,9,15,53,227,240,53,35,97,167,35,240,192,144,240,175,140,233,175,128,58,157,128,146,245,92,146,129,115,12,129,39,44,49,39,118,37,208,118,231,11,86,231,123,187,146,123,233,78,206,233,241,137,1,241,159,107,30,159,169,83,52,169,196,106,241,196,153,180,195,153,151,241,91,151,131,225,71,131,107,230,24,107,200,189,34,200,14,69,152,14,110,226,31,110,201,244,179,201,47,182,116,47,203,102,248,203,255,204,153,255,234,149,20,234,237,3,88,237,247,86,220,247,225,212,139,225,27,28,21,27,173,30,162,173,12,215,211,12,43,251,226,43,29,195,200,29,25,142,94,25,194,181,44,194,137,233,73,137,18,207,193,18,126,191,149,126,32,186,125,32,100,234,17,100,132,119,11,132,109,57,197,109,106,175,137,106,209,51,124,209,161,201,113,161,206,98,255,206,55,113,187,55,251,129,15,251,61,121,181,61,81,9,225,81,220,173,62,220,45,36,63,45,164,205,118,164,157,249,85,157,238,216,130,238,134,229,64,134,174,197,120,174,205,185,37,205,4,77,150,4,85,68,119,85,10,8,14,10,19,134,80,19,48,231,247,48,211,161,55,211,64,29,250,64,52,170,97,52,140,237,78,140,179,6,176,179,108,112,84,108,42,178,115,42,82,210,59,82,11,65,159,11,139,123,2,139,136,160,216,136,79,17,243,79,103,49,203,103,70,194,39,70,192,39,103,192,180,144,252,180,40,32,56,40,127,246,4,127,120,96,72,120,46,255,229,46,7,150,76,7,75,92,101,75,199,177,43,199,111,171,142,111,13,158,66,13,187,156,245,187,242,82,219,242,243,27,74,243,166,95,61,166,89,147,164,89,188,10,185,188,58,239,249,58,239,145,19,239,254,133,8,254,1,73,145,1,97,238,22,97,124,45,222,124,178,79,33,178,66,143,177,66,219,59,114,219,184,71,47,184,72,135,191,72,44,109,174,44,227,70,192,227,87,214,60,87,133,62,154,133,41,105,169,41,125,100,79,125,148,42,129,148,73,206,46,73,23,203,198,23,202,47,105,202,195,252,189,195,92,151,163,92,94,5,232,94,208,122,237,208,135,172,209,135,142,127,5,142,186,213,100,186,168,26,165,168,183,75,38,183,185,14,190,185,96,167,135,96,248,90,213,248,34,40,54,34,17,20,27,17,222,63,117,222,121,41,217,121,170,136,238,170,51,60,45,51,95,76,121,95,182,2,183,182,150,184,202,150,88,218,53,88,156,176,196,156,252,23,67,252,26,85,132,26,246,31,77,246,28,138,89,28,56,125,178,56,172,87,51,172,24,199,207,24,244,141,6,244,105,116,83,105,116,183,155,116,245,196,151,245,86,159,173,86,218,114,227,218,213,126,234,213,74,21,244,74,158,34,143,158,162,18,171,162,78,88,98,78,232,7,95,232,229,153,29,229,57,52,35,57,193,110,246,193,68,80,108,68,93,222,50,93,114,104,70,114,38,101,160,38,147,188,205,147,3,219,218,3,198,248,186,198,250,200,158,250,130,168,214,130,207,43,110,207,80,64,112,80,235,220,133,235,117,254,10,117,138,50,147,138,141,164,223,141,76,202,41,76,20,16,28,20,115,33,215,115,204,240,180,204,9,211,212,9,16,93,138,16,226,15,81,226,0,0,0,0,154,111,25,154,224,157,26,224,143,54,148,143,230,66,199,230,236,74,201,236,253,94,210,253,171,193,127,171,216,224,168,216,47,1,0,0,0,0,0,0,169,177,0,0,0,0,0,0,0,0,0,0,16,0,0,0,128,0,0,0,160,16,0,0,13,0,0,0,14,0,0,0,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,152,47,138,66,145,68,55,113,207,251,192,181,165,219,181,233,91,194,86,57,241,17,241,89,164,130,63,146,213,94,28,171,152,170,7,216,1,91,131,18,190,133,49,36,195,125,12,85,116,93,190,114,254,177,222,128,167,6,220,155,116,241,155,193,193,105,155,228,134,71,190,239,198,157,193,15,204,161,12,36,111,44,233,45,170,132,116,74,220,169,176,92,218,136,249,118,82,81,62,152,109,198,49,168,200,39,3,176,199,127,89,191,243,11,224,198,71,145,167,213,81,99,202,6,103,41,41,20,133,10,183,39,56,33,27,46,252,109,44,77,19,13,56,83,84,115,10,101,187,10,106,118,46,201,194,129,133,44,114,146,161,232,191,162,75,102,26,168,112,139,75,194,163,81,108,199,25,232,146,209,36,6,153,214,133,53,14,244,112,160,106,16,22,193,164,25,8,108,55,30,76,119,72,39,181,188,176,52,179,12,28,57,74,170,216,78,79,202,156,91,243,111,46,104,238,130,143,116,111,99,165,120,20,120,200,132,8,2,199,140,250,255,190,144,235,108,80,164,247,163,249,190,242,120,113,198,18,0,0,0,0,0,0,0,3,0,0,0,4,184,0,0,116,50,0,0,34,184,0,0,42,184,0,0,51,184,0,0,54,184,0,0,34,184,0,0,3,0,0,0,7,0,0,0,16,0,0,0,17,0,0,0,18,0,0,0,19,0,0,0,8,0,0,0,20,0,0,0,4,0,0,0,21,0,0,0,9,0,0,0,8,184,0,0,12,184,0,0,18,184,0,0,23,184,0,0,29,184,0,0,0,0,0,0,16,0,0,0,7,0,0,0,22,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,0,0,0,22,0,0,0,37,0,0,0,63,0,0,0,92,0,0,0,117,0,0,0,132,0,0,0,147,0,0,0,161,0,0,0,175,0,0,0,190,0,0,0,205,0,0,0,230,0,0,0,243,0,0,0,2,1,0,0,16,1,0,0,27,1,0,0,41,1,0,0,63,1,0,0,79,1,0,0,109,1,0,0,129,1,0,0,153,1,0,0,179,1,0,0,204,1,0,0,222,1,0,0,231,1,0,0,241,1,0,0,1,2,0,0,14,2,0,0,28,2,0,0,47,2,0,0,71,2,0,0,91,2,0,0,107,2,0,0,122,2,0,0,138,2,0,0,154,2,0,0,171,2,0,0,185,2,0,0,201,2,0,0,228,2,0,0,245,2,0,0,9,3,0,0,28,3,0,0,45,3,0,0,65,3,0,0,77,3,0,0,91,3,0,0,104,3,0,0,120,3,0,0,139,3,0,0,158,3,0,0,178,3,0,0,198,3,0,0,212,3,0,0,234,3,0,0,254,3,0,0,6,4,0,0,10,4,0,0,24,4,0,0,47,4,0,0,55,4,0,0,70,4,0,0,83,4,0,0,98,4,0,0,127,4,0,0,156,4,0,0,179,4,0,0,195,4,0,0,211,4,0,0,231,4,0,0,244,4,0,0,3,5,0,0,20,5,0,0,36,5,0,0,53,5,0,0,70,5,0,0,82,5,0,0,95,5,0,0,126,5,0,0,147,5,0,0,167,5,0,0,188,5,0,0,210,5,0,0,222,5,0,0,237,5,0,0,245,5,0,0,2,6,0,0,11,6,0,0,29,6,0,0,40,6,0,0,51,6,0,0,65,6,0,0,85,6,0,0,98,6,0,0,110,6,0,0,124,6,0,0,136,6,0,0,156,6,0,0,175,6,0,0,195,6,0,0,217,6,0,0,241,6,0,0,6,7,0,0,29,7,0,0,50,7,0,0,65,7,0,0,76,7,0,0,96,7,0,0,109,7,0,0,122,7,0,0,139,7,0,0,161,7,0,0,175,7,0,0,195,7,0,0,211,7,0,0,225,7,0,0,236,7,0,0,0,8,0,0,23,8,0,0,44,8,0,0,59,8,0,0,80,8,0,0,102,8,0,0,118,8,0,0,132,8,0,0,148,8,0,0,162,8,0,0,179,8,0,0,191,8,0,0,223,8,0,0,243,8,0,0,255,8,0,0,9,9,0,0,21,9,0,0,39,9,0,0,60,9,0,0,72,9,0,0,87,9,0,0,104,9,0,0,119,9,0,0,135,9,0,0,149,9,0,0,168,9,0,0,187,9,0,0,210,9,0,0,231,9,0,0,255,9,0,0,17,10,0,0,39,10,0,0,62,10,0,0,80,10,0,0,92,10,0,0,110,10,0,0,127,10,0,0,141,10,0,0,158,10,0,0,173,10,0,0,196,10,0,0,215,10,0,0,228,10,0,0,247,10,0,0,15,11,0,0,42,11,0,0,55,11,0,0,80,11,0,0,91,11,0,0,110,11,0,0,122,11,0,0,138,11,0,0,156,11,0,0,183,11,0,0,190,11,0,0,205,11,0,0,221,11,0,0,237,11,0,0,1,12,0,0,14,12,0,0,26,12,0,0,43,12,0,0,55,12,0,0,72,12,0,0,86,12,0,0,102,12,0,0,129,12,0,0,152,12,0,0,175,12,0,0,198,12,0,0,213,12,0,0,230,12,0,0,248,12,0,0,13,13,0,0,32,13,0,0,63,13,0,0,81,13,0,0,99,13,0,0,121,13,0,0,147,13,0,0,174,13,0,0,191,13,0,0,232,13,0,0,8,14,0,0,46,14,0,0,73,14,0,0,103,14,0,0,133,14,0,0,161,14,0,0,198,14,0,0,222,14,0,0,14,15,0,0,56,15,0,0,96,15,0,0,132,15,0,0,143,15,0,0,161,15,0,0,178,15,0,0,209,15,0,0,230,15,0,0,255,15,0,0,14,16,0,0,38,16,0,0,57,16,0,0,93,16,0,0,114,16,0,0,143,16,0,0,163,16,0,0,190,16,0,0,218,16,0,0,233,16,0,0,244,16,0,0,5,17,0,0,42,17,0,0,87,17,0,0,131,17,0,0,171,17,0,0,209,17,0,0,247,17,0,0,33,18,0,0,67,18,0,0,112,18,0,0,157,18,0,0,170,18,0,0,180,18,0,0,193,18,0,0,228,18,0,0,248,18,0,0,10,19,0,0,33,19,0,0,57,19,0,0,78,19,0,0,106,19,0,0,136,19,0,0,164,19,0,0,184,19,0,0,208,19,0,0,235,19,0,0,253,19,0,0,15,20,0,0,43,20,0,0,58,20,0,0,74,20,0,0,102,20,0,0,125,20,0,0,145,20,0,0,162,20,0,0,190,20,0,0,214,20,0,0,239,20,0,0,3,21,0,0,23,21,0,0,42,21,0,0,71,21,0,0,95,21,0,0,123,21,0,0,150,21,0,0,176,21,0,0,205,21,0,0,229,21,0,0,254,21,0,0,25,22,0,0,54,22,0,0,71,22,0,0,96,22,0,0,119,22,0,0,141,22,0,0,160,22,0,0,182,22,0,0,215,22,0,0,245,22,0,0,12,23,0,0,47,23,0,0,63,23,0,0,83,23,0,0,103,23,0,0,120,23,0,0,147,23,0,0,160,23,0,0,182,23,0,0,202,23,0,0,230,23,0,0,2,24,0,0,21,24,0,0,39,24,0,0,80,24,0,0,120,24,0,0,159,24,0,0,173,24,0,0,208,24,0,0,247,24,0,0,24,25,0,0,51,25,0,0,74,25,0,0,104,25,0,0,135,25,0,0,164,25,0,0,190,25,0,0,213,25,0,0,233,25,0,0,252,25,0,0,22,26,0,0,43,26,0,0,76,26,0,0,113,26,0,0,147,26,0,0,172,26,0,0,201,26,0,0,221,26,0,0,248,26,0,0,28,27,0,0,50,27,0,0,72,27,0,0,100,27,0,0,139,27,0,0,173,27,0,0,195,27,0,0,227,27,0,0,250,27,0,0,31,28,0,0,60,28,0,0,77,28,0,0,105,28,0,0,132,28,0,0,153,28,0,0,180,28,0,0,204,28,0,0,219,28,0,0,247,28,0,0,15,29,0,0,34,29,0,0,56,29,0,0,93,29,0,0,119,29,0,0,145,29,0,0,171,29,0,0,197,29,0,0,223,29,0,0,249,29,0,0,19,30,0,0,45,30,0,0,71,30,0,0,98,30,0,0,125,30,0,0,152,30,0,0,179,30,0,0,206,30,0,0,233,30,0,0,4,31,0,0,27,31,0,0,48,31,0,0,60,31,0,0,7,0,0,0,13,0,0,0,98,0,0,0,99,0,0,0,68,0,0,0,97,0,0,0,11,0,0,0,114,0,0,0,0,0,0,0,0,0,0,0,52,0,0,0,9,0,0,0,77,0,0,0,74,0,0,0,53,0,0,0,0,0,0,0,56,0,0,0,57,0,0,0,59,0,0,0,16,0,0,0,125,0,0,0,10,0,0,0,44,0,0,0,70,0,0,0,103,0,0,0,111,0,0,0,104,0,0,0,0,0,0,0,35,0,0,0,35,0,0,0,89,0,0,0,0,0,0,0,33,0,0,0,73,0,0,0,122,0,0,0,17,0,0,0,14,0,0,0,27,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,112,0,0,0,113,0,0,0,43,0,0,0,0,0,0,0,84,0,0,0,115,0,0,0,4,0,0,0,22,0,0,0,5,0,0,0,106,0,0,0,21,0,0,0,120,0,0,0,51,0,0,0,45,0,0,0,46,0,0,0,47,0,0,0,79,0,0,0,80,0,0,0,83,0,0,0,82,0,0,0,81,0,0,0,48,0,0,0,40,0,0,0,124,0,0,0,24,0,0,0,31,0,0,0,90,0,0,0,72,0,0,0,36,0,0,0,119,0,0,0,0,0,0,0,100,0,0,0,102,0,0,0,101,0,0,0,23,0,0,0,55,0,0,0,105,0,0,0,50,0,0,0,61,0,0,0,19,0,0,0,2,0,0,0,8,0,0,0,37,0,0,0,67,0,0,0,123,0,0,0,12,0,0,0,42,0,0,0,64,0,0,0,65,0,0,0,92,0,0,0,28,0,0,0,63,0,0,0,60,0,0,0,38,0,0,0,15,0,0,0,107,0,0,0,20,0,0,0,39,0,0,0,118,0,0,0,88,0,0,0,95,0,0,0,25,0,0,0,76,0,0,0,6,0,0,0,95,0,0,0,75,0,0,0,1,0,0,0,96,0,0,0,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,71,0,0,0,93,0,0,0,91,0,0,0,34,0,0,0,78,0,0,0,66,0,0,0,121,0,0,0,85,0,0,0,30,0,0,0,0,0,0,0,108,0,0,0,94,0,0,0,29,0,0,0,3,0,0,0,69,0,0,0,116,0,0,0,86,0,0,0,62,0,0,0,110,0,0,0,109,0,0,0,26,0,0,0,117,0,0,0,49,0,0,0,87,0,0,0,11,0,0,0,18,0,0,0,54,0,0,0,107,128,0,0,81,128,0,0,127,128,0,0,47,128,0,0,49,128,0,0,104,128,0,0,0,128,0,0,82,128,0,0,11,128,0,0,21,128,0,0,6,128,0,0,138,128,0,0,86,128,0,0,1,128,0,0,36,128,0,0,95,128,0,0,19,128,0,0,35,128,0,0,139,128,0,0,80,128,0,0,97,128,0,0,51,128,0,0,48,128,0,0,75,128,0,0,65,128,0,0,102,128,0,0,134,128,0,0,37,128,0,0,91,128,0,0,126,128,0,0,122,128,0,0,66,128,0,0,109,128,0,0,32,128,0,0,117,128,0,0,28,128,0,0,29,128,0,0,69,128,0,0,83,128,0,0,94,128,0,0,98,128,0,0,63,128,0,0,87,128,0,0,43,128,0,0,22,128,0,0,54,128,0,0,55,128,0,0,56,128,0,0,62,128,0,0,136,128,0,0,78,128,0,0,53,128,0,0,10,128,0,0,14,128,0,0,140,128,0,0,76,128,0,0,16,128,0,0,17,128,0,0,18,128,0,0,93,128,0,0,79,128,0,0,131,128,0,0,92,128,0,0,88,128,0,0,89,128,0,0,119,128,0,0,84,128,0,0,4,128,0,0,128,128,0,0,23,128,0,0,114,128,0,0,68,128,0,0,33,128,0,0,13,128,0,0,106,128,0,0,103,128,0,0,12,128,0,0,118,128,0,0,57,128,0,0,58,128,0,0,61,128,0,0,60,128,0,0,59,128,0,0,45,128,0,0,121,128,0,0,130,128,0,0,137,128,0,0,100,128,0,0,30,128,0,0,67,128,0,0,116,128,0,0,90,128,0,0,115,128,0,0,125,128,0,0,101,128,0,0,105,128,0,0,108,128,0,0,5,128,0,0,2,128,0,0,3,128,0,0,72,128,0,0,74,128,0,0,73,128,0,0,24,128,0,0,26,128,0,0,77,128,0,0,50,128,0,0,96,128,0,0,124,128,0,0,133,128,0,0,132,128,0,0,25,128,0,0,41,128,0,0,42,128,0,0,7,128,0,0,46,128,0,0,129,128,0,0,135,128,0,0,99,128,0,0,70,128,0,0,52,128,0,0,120,128,0,0,34,128,0,0,85,128,0,0,64,128,0,0,20,128,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,116,61,0,0,5,0,0,0,0,0,0,0,0,0,0,0,10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,23,0,0,0,24,0,0,0,248,42,1,0,0,4,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,116,61,0,0,236,61,0,0,5,0,0,0,0,0,0,0,0,0,0,0,10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,25,0,0,0,24,0,0,0,0,47,1,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,192,3,0,0,192,4,0,0,192,5,0,0,192,6,0,0,192,7,0,0,192,8,0,0,192,9,0,0,192,10,0,0,192,11,0,0,192,12,0,0,192,13,0,0,192,14,0,0,192,15,0,0,192,16,0,0,192,17,0,0,192,18,0,0,192,19,0,0,192,20,0,0,192,21,0,0,192,22,0,0,192,23,0,0,192,24,0,0,192,25,0,0,192,26,0,0,192,27,0,0,192,28,0,0,192,29,0,0,192,30,0,0,192,31,0,0,192,0,0,0,179,1,0,0,195,2,0,0,195,3,0,0,195,4,0,0,195,5,0,0,195,6,0,0,195,7,0,0,195,8,0,0,195,9,0,0,195,10,0,0,195,11,0,0,195,12,0,0,195,13,0,0,211,14,0,0,195,15,0,0,195,0,0,12,187,1,0,12,195,2,0,12,195,3,0,12,195,4,0,12,211,32,0,0,0,9,0,0,0,10,0,0,0,13,0,0,0,11,0,0,0,12,0,0,0,133,0,0,0,0,32,0,0,1,32,0,0,2,32,0,0,3,32,0,0,4,32,0,0,5,32,0,0,6,32,0,0,8,32,0,0,9,32,0,0,10,32,0,0,40,32,0,0,41,32,0,0,95,32,0,0,0,48,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,26,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31,0,0,0,252,63,0,0,0,0,0,0,45,244,81,88,207,140,177,192,70,246,181,203,41,49,3,199,4,91,112,48,180,93,253,32,120,127,139,154,216,89,41,80,104,72,137,171,167,86,3,108,255,183,205,136,63,212,119,180,43,165,163,112,241,186,228,168,252,65,131,253,217,111,225,138,122,47,45,116,150,7,31,13,9,94,3,118,44,112,247,64,165,44,167,111,87,65,168,170,116,223,160,88,100,3,74,199,196,60,83,174,175,95,24,4,21,177,227,109,40,134,171,12,164,191,67,240,233,80,129,57,87,22,82,55,3,0,0,0,3,0,5,0,7,0,11,0,13,0,17,0,19,0,23,0,29,0,31,0,37,0,41,0,43,0,47,0,53,0,59,0,61,0,67,0,71,0,73,0,79,0,83,0,89,0,97,0,101,0,103,0,107,0,109,0,113,0,127,0,131,0,137,0,139,0,149,0,151,0,157,0,163,0,167,0,173,0,179,0,181,0,191,0,193,0,197,0,199,0,211,0,223,0,227,0,229,0,233,0,239,0,241,0,251,0,1,1,7,1,13,1,15,1,21,1,25,1,27,1,37,1,51,1,55,1,57,1,61,1,75,1,81,1,91,1,93,1,97,1,103,1,111,1,117,1,123,1,127,1,133,1,141,1,145,1,153,1,163,1,165,1,175,1,177,1,183,1,187,1,193,1,201,1,205,1,207,1,211,1,223,1,231,1,235,1,243,1,247,1,253,1,9,2,11,2,29,2,35,2,45,2,51,2,57,2,59,2,65,2,75,2,81,2,87,2,89,2,95,2,101,2,105,2,107,2,119,2,129,2,131,2,135,2,141,2,147,2,149,2,161,2,165,2,171,2,179,2,189,2,197,2,207,2,215,2,221,2,227,2,231,2,239,2,245,2,249,2,1,3,5,3,19,3,29,3,41,3,43,3,53,3,55,3,59,3,61,3,71,3,85,3,89,3,91,3,95,3,109,3,113,3,115,3,119,3,139,3,143,3,151,3,161,3,169,3,173,3,179,3,185,3,199,3,203,3,209,3,215,3,223,3,229,3,241,3,245,3,251,3,253,3,7,4,9,4,15,4,25,4,27,4,37,4,39,4,45,4,63,4,67,4,69,4,73,4,79,4,85,4,93,4,99,4,105,4,127,4,129,4,139,4,147,4,157,4,163,4,169,4,177,4,189,4,193,4,199,4,205,4,207,4,213,4,225,4,235,4,253,4,255,4,3,5,9,5,11,5,17,5,21,5,23,5,27,5,39,5,41,5,47,5,81,5,87,5,93,5,101,5,119,5,129,5,143,5,147,5,149,5,153,5,159,5,167,5,171,5,173,5,179,5,191,5,201,5,203,5,207,5,209,5,213,5,219,5,231,5,243,5,251,5,7,6,13,6,17,6,23,6,31,6,35,6,43,6,47,6,61,6,65,6,71,6,73,6,77,6,83,6,85,6,91,6,101,6,121,6,127,6,131,6,133,6,157,6,161,6,163,6,173,6,185,6,187,6,197,6,205,6,211,6,217,6,223,6,241,6,247,6,251,6,253,6,9,7,19,7,31,7,39,7,55,7,69,7,75,7,79,7,81,7,85,7,87,7,97,7,109,7,115,7,121,7,139,7,141,7,157,7,159,7,181,7,187,7,195,7,201,7,205,7,207,7,211,7,219,7,225,7,235,7,237,7,247,7,5,8,15,8,21,8,33,8,35,8,39,8,41,8,51,8,63,8,65,8,81,8,83,8,89,8,93,8,95,8,105,8,113,8,131,8,155,8,159,8,165,8,173,8,189,8,191,8,195,8,203,8,219,8,221,8,225,8,233,8,239,8,245,8,249,8,5,9,7,9,29,9,35,9,37,9,43,9,47,9,53,9,67,9,73,9,77,9,79,9,85,9,89,9,95,9,107,9,113,9,119,9,133,9,137,9,143,9,155,9,163,9,169,9,173,9,199,9,217,9,227,9,235,9,239,9,245,9,247,9,253,9,19,10,31,10,33,10,49,10,57,10,61,10,73,10,87,10,97,10,99,10,103,10,111,10,117,10,123,10,127,10,129,10,133,10,139,10,147,10,151,10,153,10,159,10,169,10,171,10,181,10,189,10,193,10,207,10,217,10,229,10,231,10,237,10,241,10,243,10,3,11,17,11,21,11,27,11,35,11,41,11,45,11,63,11,71,11,81,11,87,11,93,11,101,11,111,11,123,11,137,11,141,11,147,11,153,11,155,11,183,11,185,11,195,11,203,11,207,11,221,11,225,11,233,11,245,11,251,11,7,12,11,12,17,12,37,12,47,12,49,12,65,12,91,12,95,12,97,12,109,12,115,12,119,12,131,12,137,12,145,12,149,12,157,12,179,12,181,12,185,12,187,12,199,12,227,12,229,12,235,12,241,12,247,12,251,12,1,13,3,13,15,13,19,13,31,13,33,13,43,13,45,13,61,13,63,13,79,13,85,13,105,13,121,13,129,13,133,13,135,13,139,13,141,13,163,13,171,13,183,13,189,13,199,13,201,13,205,13,211,13,213,13,219,13,229,13,231,13,243,13,253,13,255,13,9,14,23,14,29,14,33,14,39,14,47,14,53,14,59,14,75,14,87,14,89,14,93,14,107,14,113,14,117,14,125,14,135,14,143,14,149,14,155,14,177,14,183,14,185,14,195,14,209,14,213,14,219,14,237,14,239,14,249,14,7,15,11,15,13,15,23,15,37,15,41,15,49,15,67,15,71,15,77,15,79,15,83,15,89,15,91,15,103,15,107,15,127,15,149,15,161,15,163,15,167,15,173,15,179,15,181,15,187,15,209,15,211,15,217,15,233,15,239,15,251,15,253,15,3,16,15,16,31,16,33,16,37,16,43,16,57,16,61,16,63,16,81,16,105,16,115,16,121,16,123,16,133,16,135,16,145,16,147,16,157,16,163,16,165,16,175,16,177,16,187,16,193,16,201,16,231,16,241,16,243,16,253,16,5,17,11,17,21,17,39,17,45,17,57,17,69,17,71,17,89,17,95,17,99,17,105,17,111,17,129,17,131,17,141,17,155,17,161,17,165,17,167,17,171,17,195,17,197,17,209,17,215,17,231,17,239,17,245,17,251,17,13,18,29,18,31,18,35,18,41,18,43,18,49,18,55,18,65,18,71,18,83,18,95,18,113,18,115,18,121,18,125,18,143,18,151,18,175,18,179,18,181,18,185,18,191,18,193,18,205,18,209,18,223,18,253,18,7,19,13,19,25,19,39,19,45,19,55,19,67,19,69,19,73,19,79,19,87,19,93,19,103,19,105,19,109,19,123,19,129,19,135,19,0,0,0,0,194,1,132,3,70,2,8,7,202,6,140,4,78,5,16,14,210,15,148,13,86,12,24,9,218,8,156,10,94,11,32,28,226,29,164,31,102,30,40,27,234,26,172,24,110,25,48,18,242,19,180,17,118,16,56,21,250,20,188,22,126,23,64,56,130,57,196,59,6,58,72,63,138,62,204,60,14,61,80,54,146,55,212,53,22,52,88,49,154,48,220,50,30,51,96,36,162,37,228,39,38,38,104,35,170,34,236,32,46,33,112,42,178,43,244,41,54,40,120,45,186,44,252,46,62,47,128,112,66,113,4,115,198,114,136,119,74,118,12,116,206,117,144,126,82,127,20,125,214,124,152,121,90,120,28,122,222,123,160,108,98,109,36,111,230,110,168,107,106,106,44,104,238,105,176,98,114,99,52,97,246,96,184,101,122,100,60,102,254,103,192,72,2,73,68,75,134,74,200,79,10,78,76,76,142,77,208,70,18,71,84,69,150,68,216,65,26,64,92,66,158,67,224,84,34,85,100,87,166,86,232,83,42,82,108,80,174,81,240,90,50,91,116,89,182,88,248,93,58,92,124,94,190,95,0,225,194,224,132,226,70,227,8,230,202,231,140,229,78,228,16,239,210,238,148,236,86,237,24,232,218,233,156,235,94,234,32,253,226,252,164,254,102,255,40,250,234,251,172,249,110,248,48,243,242,242,180,240,118,241,56,244,250,245,188,247,126,246,64,217,130,216,196,218,6,219,72,222,138,223,204,221,14,220,80,215,146,214,212,212,22,213,88,208,154,209,220,211,30,210,96,197,162,196,228,198,38,199,104,194,170,195,236,193,46,192,112,203,178,202,244,200,54,201,120,204,186,205,252,207,62,206,128,145,66,144,4,146,198,147,136,150,74,151,12,149,206,148,144,159,82,158,20,156,214,157,152,152,90,153,28,155,222,154,160,141,98,140,36,142,230,143,168,138,106,139,44,137,238,136,176,131,114,130,52,128,246,129,184,132,122,133,60,135,254,134,192,169,2,168,68,170,134,171,200,174,10,175,76,173,142,172,208,167,18,166,84,164,150,165,216,160,26,161,92,163,158,162,224,181,34,180,100,182,166,183,232,178,42,179,108,177,174,176,240,187,50,186,116,184,182,185,248,188,58,189,124,191,190,190,73,0,49,1,83,0,127,1,48,1,105,0,120,1,255,0,129,1,83,2,130,1,131,1,132,1,133,1,134,1,84,2,135,1,136,1,137,1,86,2,138,1,87,2,139,1,140,1,142,1,221,1,143,1,89,2,144,1,91,2,145,1,146,1,147,1,96,2,148,1,99,2,150,1,105,2,151,1,104,2,152,1,153,1,156,1,111,2,157,1,114,2,159,1,117,2,166,1,128,2,167,1,168,1,169,1,131,2,172,1,173,1,174,1,136,2,175,1,176,1,177,1,138,2,178,1,139,2,183,1,146,2,184,1,185,1,188,1,189,1,196,1,198,1,196,1,197,1,197,1,198,1,199,1,201,1,199,1,200,1,200,1,201,1,202,1,204,1,202,1,203,1,203,1,204,1,241,1,243,1,241,1,242,1,242,1,243,1,244,1,245,1,246,1,149,1,247,1,191,1,32,2,158,1,134,3,172,3,136,3,173,3,137,3,174,3,138,3,175,3,140,3,204,3,142,3,205,3,143,3,206,3,153,3,69,3,153,3,190,31,163,3,194,3,247,3,248,3,250,3,251,3,96,30,155,30,223,0,223,0,158,30,223,0,89,31,81,31,91,31,83,31,93,31,85,31,95,31,87,31,188,31,179,31,204,31,195,31,236,31,229,31,252,31,243,31,58,2,101,44,59,2,60,2,61,2,154,1,62,2,102,44,65,2,66,2,67,2,128,1,68,2,137,2,69,2,140,2,244,3,184,3,249,3,242,3,253,3,123,3,254,3,124,3,255,3,125,3,192,4,207,4,38,33,201,3,42,33,107,0,43,33,229,0,50,33,78,33,131,33,132,33,96,44,97,44,98,44,107,2,99,44,125,29,100,44,125,2,109,44,81,2,110,44,113,2,111,44,80,2,112,44,82,2,114,44,115,44,117,44,118,44,126,44,63,2,127,44,64,2,242,44,243,44,125,167,121,29,139,167,140,167,141,167,101,2,170,167,102,2,199,16,39,45,205,16,45,45,118,3,119,3,156,3,181,0,146,3,208,3,152,3,209,3,166,3,213,3,160,3,214,3,154,3,240,3,161,3,241,3,149,3,245,3,207,3,215,3,0,0,0,0,65,0,32,26,192,0,32,31,0,1,1,47,50,1,1,5,57,1,1,15,74,1,1,45,121,1,1,5,112,3,1,3,145,3,32,17,163,3,32,9,0,4,80,16,16,4,32,32,96,4,1,33,138,4,1,53,193,4,1,13,208,4,1,63,20,5,1,19,49,5,48,38,160,1,1,5,179,1,1,3,205,1,1,15,222,1,1,17,248,1,1,39,34,2,1,17,216,3,1,23,0,30,1,149,160,30,1,95,8,31,248,8,24,31,248,6,40,31,248,8,56,31,248,8,72,31,248,6,104,31,248,8,136,31,248,8,152,31,248,8,168,31,248,8,184,31,248,2,186,31,182,2,200,31,170,4,216,31,248,2,218,31,156,2,232,31,248,2,234,31,144,2,248,31,128,2,250,31,130,2,70,2,1,9,16,5,1,3,96,33,16,16,0,44,48,47,103,44,1,5,128,44,1,99,235,44,1,3,64,166,1,45,128,166,1,23,34,167,1,13,50,167,1,61,121,167,1,3,126,167,1,9,144,167,1,3,160,167,1,9,33,255,32,26,0,0,0,0,119,114,97,112,46,99,0,97,109,111,117,110,116,32,115,116,111,114,101,100,32,97,116,32,37,112,44,32,105,115,32,37,115,32,37,108,108,117,46,37,108,117,10,0,109,105,110,116,95,119,105,116,104,100,114,97,119,97,108,0,109,101,114,99,104,95,99,111,110,116,114,97,99,116,0,109,97,115,116,101,114,95,100,101,110,111,109,105,110,97,116,105,111,110,95,107,101,121,95,118,97,108,105,100,105,116,121,0,109,105,110,116,95,116,101,115,116,95,101,100,100,115,97,0,72,101,108,108,111,44,32,119,111,114,108,100,32,40,98,121,32,84,97,108,101,114,32,101,109,115,99,114,105,112,116,101,100,32,99,111,100,101,41,0,99,111,109,109,111,110,95,97,108,108,111,99,97,116,105,111,110,46,99,0,71,78,85,78,69,84,95,120,109,97,108,108,111,99,95,0,109,97,108,108,111,99,0,71,78,85,78,69,84,95,120,102,114,101,101,95,0,71,78,85,78,69,84,95,120,115,116,114,100,117,112,95,0,71,78,85,78,69,84,95,115,110,112,114,105,110,116,102,0,68,69,66,85,71,0,73,78,70,79,0,87,65,82,78,73,78,71,0,69,82,82,79,82,0,78,79,78,69,0,99,111,109,109,111,110,95,108,111,103,103,105,110,103,46,99,0,37,115,45,37,100,0,37,115,37,100,37,115,0,97,98,0,115,101,116,117,112,95,108,111,103,95,102,105,108,101,0,71,78,85,78,69,84,95,108,111,103,95,115,107,105,112,0,109,121,108,111,103,0,108,111,99,97,108,116,105,109,101,32,101,114,114,111,114,0,37,98,32,37,100,32,37,72,58,37,77,58,37,83,45,37,37,48,54,117,0,77,101,115,115,97,103,101,32,96,37,46,42,115,39,32,114,101,112,101,97,116,101,100,32,37,117,32,116,105,109,101,115,32,105,110,32,116,104,101,32,108,97,115,116,32,37,115,10,0,73,78,86,65,76,73,68,0,37,115,32,37,115,32,37,115,32,37,115,0,96,37,115,39,32,102,97,105,108,101,100,32,111,110,32,102,105,108,101,32,96,37,115,39,32,97,116,32,37,115,58,37,100,32,119,105,116,104,32,101,114,114,111,114,58,32,37,115,10,0,99,114,121,112,116,111,95,115,121,109,109,101,116,114,105,99,46,99,0,115,101,116,117,112,95,99,105,112,104,101,114,95,97,101,115,0,71,78,85,78,69,84,95,67,82,89,80,84,79,95,115,121,109,109,101,116,114,105,99,95,101,110,99,114,121,112,116,0,115,101,116,117,112,95,99,105,112,104,101,114,95,116,119,111,102,105,115,104,0,71,78,85,78,69,84,95,67,82,89,80,84,79,95,115,121,109,109,101,116,114,105,99,95,100,101,99,114,121,112,116,0,40,112,114,105,118,97,116,101,45,107,101,121,40,101,99,99,40,99,117,114,118,101,32,34,69,100,50,53,53,49,57,34,41,40,100,32,37,98,41,41,41,0,99,114,121,112,116,111,95,101,99,99,46,99,0,103,99,114,121,95,115,101,120,112,95,98,117,105,108,100,0,113,64,101,100,100,115,97,0,40,112,114,105,118,97,116,101,45,107,101,121,40,101,99,99,40,99,117,114,118,101,32,34,69,100,50,53,53,49,57,34,41,40,102,108,97,103,115,32,101,100,100,115,97,41,40,100,32,37,98,41,41,41,0,100,101,99,111,100,101,95,112,114,105,118,97,116,101,95,101,100,100,115,97,95,107,101,121,0,71,78,85,78,69,84,95,67,82,89,80,84,79,95,101,100,100,115,97,95,107,101,121,95,103,101,116,95,112,117,98,108,105,99,0,100,101,99,111,100,101,95,112,114,105,118,97,116,101,95,101,99,100,104,101,95,107,101,121,0,71,78,85,78,69,84,95,67,82,89,80,84,79,95,101,99,100,104,101,95,107,101,121,95,103,101,116,95,112,117,98,108,105,99,0,40,103,101,110,107,101,121,40,101,99,99,40,99,117,114,118,101,32,34,69,100,50,53,53,49,57,34,41,40,102,108,97,103,115,32,101,100,100,115,97,32,110,111,45,107,101,121,116,101,115,116,41,41,41,0,71,78,85,78,69,84,95,67,82,89,80,84,79,95,101,99,100,104,101,95,107,101,121,95,99,114,101,97,116,101,0,103,99,114,121,95,112,107,95,103,101,110,107,101,121,0,107,101,121,95,102,114,111,109,95,115,101,120,112,0,40,103,101,110,107,101,121,40,101,99,99,40,99,117,114,118,101,32,34,69,100,50,53,53,49,57,34,41,40,102,108,97,103,115,32,101,100,100,115,97,41,41,41,0,71,78,85,78,69,84,95,67,82,89,80,84,79,95,101,100,100,115,97,95,107,101,121,95,99,114,101,97,116,101,0,40,100,97,116,97,40,102,108,97,103,115,32,101,100,100,115,97,41,40,104,97,115,104,45,97,108,103,111,32,37,115,41,40,118,97,108,117,101,32,37,98,41,41,0,100,97,116,97,95,116,111,95,101,100,100,115,97,95,118,97,108,117,101,0,71,78,85,78,69,84,95,67,82,89,80,84,79,95,101,100,100,115,97,95,115,105,103,110,0,69,100,68,83,65,32,115,105,103,110,105,110,103,32,102,97,105,108,101,100,32,97,116,32,37,115,58,37,100,58,32,37,115,10,0,40,112,117,98,108,105,99,45,107,101,121,40,101,99,99,40,99,117,114,118,101,32,69,100,50,53,53,49,57,41,40,113,32,37,98,41,41,41,0,40,115,105,103,45,118,97,108,40,101,100,100,115,97,40,114,32,37,98,41,40,115,32,37,98,41,41,41,0,71,78,85,78,69,84,95,67,82,89,80,84,79,95,101,100,100,115,97,95,118,101,114,105,102,121,0,40,112,117,98,108,105,99,45,107,101,121,40,101,99,99,40,99,117,114,118,101,32,69,100,50,53,53,49,57,41,40,102,108,97,103,115,32,101,100,100,115,97,41,40,113,32,37,98,41,41,41,0,69,100,68,83,65,32,115,105,103,110,97,116,117,114,101,32,118,101,114,105,102,105,99,97,116,105,111,110,32,102,97,105,108,101,100,32,97,116,32,37,115,58,37,100,58],"i8",ALLOC_NONE,Runtime.GLOBAL_BASE+10240);allocate([32,37,115,10,0,71,78,85,78,69,84,95,67,82,89,80,84,79,95,101,99,99,95,101,99,100,104,0,103,101,116,95,97,102,102,105,110,101,32,102,97,105,108,101,100,0,99,114,121,112,116,111,95,104,97,115,104,46,99,0,71,78,85,78,69,84,95,67,82,89,80,84,79,95,104,97,115,104,95,99,111,110,116,101,120,116,95,115,116,97,114,116,0,71,78,85,78,69,84,95,67,82,89,80,84,79,95,104,97,115,104,95,99,111,110,116,101,120,116,95,102,105,110,105,115,104,0,99,114,121,112,116,111,95,109,112,105,46,99,0,71,78,85,78,69,84,95,67,82,89,80,84,79,95,109,112,105,95,112,114,105,110,116,95,117,110,115,105,103,110,101,100,0,96,37,115,39,32,102,97,105,108,101,100,32,97,116,32,37,115,58,37,100,32,119,105,116,104,32,101,114,114,111,114,58,32,37,115,10,0,103,99,114,121,95,109,112,105,95,112,114,105,110,116,0,71,78,85,78,69,84,95,67,82,89,80,84,79,95,109,112,105,95,115,99,97,110,95,117,110,115,105,103,110,101,100,0,103,99,114,121,95,109,112,105,95,115,99,97,110,0,49,46,54,46,48,0,108,105,98,103,99,114,121,112,116,32,104,97,115,32,110,111,116,32,116,104,101,32,101,120,112,101,99,116,101,100,32,118,101,114,115,105,111,110,32,40,118,101,114,115,105,111,110,32,37,115,32,105,115,32,114,101,113,117,105,114,101,100,41,46,10,0,99,114,121,112,116,111,95,114,97,110,100,111,109,46,99,0,71,78,85,78,69,84,95,67,82,89,80,84,79,95,114,97,110,100,111,109,95,105,110,105,116,0,70,97,105,108,101,100,32,116,111,32,115,101,116,32,108,105,98,103,99,114,121,112,116,32,111,112,116,105,111,110,32,37,115,58,32,37,115,10,0,68,73,83,65,66,76,69,95,83,69,67,77,69,77,0,69,78,65,66,76,69,95,81,85,73,67,75,95,82,65,78,68,79,77,0,71,78,85,78,69,84,95,67,82,89,80,84,79,95,114,97,110,100,111,109,95,117,51,50,0,40,103,101,110,107,101,121,40,114,115,97,40,110,98,105,116,115,32,37,100,41,41,41,0,99,114,121,112,116,111,95,114,115,97,46,99,0,71,78,85,78,69,84,95,67,82,89,80,84,79,95,114,115,97,95,112,114,105,118,97,116,101,95,107,101,121,95,99,114,101,97,116,101,0,71,78,85,78,69,84,95,67,82,89,80,84,79,95,114,115,97,95,112,114,105,118,97,116,101,95,107,101,121,95,101,110,99,111,100,101,0,117,116,105,108,0,71,78,85,78,69,84,95,67,82,89,80,84,79,95,114,115,97,95,112,114,105,118,97,116,101,95,107,101,121,95,100,101,99,111,100,101,0,68,101,99,111,100,101,100,32,112,114,105,118,97,116,101,32,107,101,121,32,105,115,32,110,111,116,32,118,97,108,105,100,10,0,71,78,85,78,69,84,95,67,82,89,80,84,79,95,114,115,97,95,112,114,105,118,97,116,101,95,107,101,121,95,103,101,116,95,112,117,98,108,105,99,0,69,120,116,101,114,110,97,108,32,112,114,111,116,111,99,111,108,32,118,105,111,108,97,116,105,111,110,32,100,101,116,101,99,116,101,100,32,97,116,32,37,115,58,37,100,46,10,0,40,112,117,98,108,105,99,45,107,101,121,40,114,115,97,40,110,32,37,109,41,40,101,32,37,109,41,41,41,0,71,78,85,78,69,84,95,67,82,89,80,84,79,95,114,115,97,95,112,117,98,108,105,99,95,107,101,121,95,101,110,99,111,100,101,0,71,78,85,78,69,84,95,67,82,89,80,84,79,95,114,115,97,95,112,117,98,108,105,99,95,107,101,121,95,100,101,99,111,100,101,0,71,78,85,78,69,84,95,67,82,89,80,84,79,95,114,115,97,95,115,105,103,110,97,116,117,114,101,95,101,110,99,111,100,101,0,71,78,85,78,69,84,95,67,82,89,80,84,79,95,114,115,97,95,98,108,105,110,100,105,110,103,95,107,101,121,95,101,110,99,111,100,101,0,71,78,85,78,69,84,95,67,82,89,80,84,79,95,114,115,97,95,98,108,105,110,100,105,110,103,95,107,101,121,95,100,101,99,111,100,101,0,71,78,85,78,69,84,95,67,82,89,80,84,79,95,114,115,97,95,98,108,105,110,100,0,100,97,116,97,95,116,111,95,115,101,120,112,0,40,100,97,116,97,32,40,102,108,97,103,115,32,114,97,119,41,32,40,118,97,108,117,101,32,37,77,41,41,0,71,78,85,78,69,84,95,67,82,89,80,84,79,95,114,115,97,95,115,105,103,110,0,71,78,85,78,69,84,95,67,82,89,80,84,79,95,114,115,97,95,115,105,103,110,97,116,117,114,101,95,100,101,99,111,100,101,0,71,78,85,78,69,84,95,67,82,89,80,84,79,95,114,115,97,95,117,110,98,108,105,110,100,0,40,115,105,103,45,118,97,108,32,40,114,115,97,32,40,115,32,37,77,41,41,41,0,71,78,85,78,69,84,95,67,82,89,80,84,79,95,114,115,97,95,118,101,114,105,102,121,0,82,83,65,32,115,105,103,110,97,116,117,114,101,32,118,101,114,105,102,105,99,97,116,105,111,110,32,102,97,105,108,101,100,32,97,116,32,37,115,58,37,100,58,32,37,115,10,0,115,116,114,105,110,103,115,46,99,0,37,108,108,117,32,37,115,0,102,111,114,101,118,101,114,0,109,115,0,109,0,100,97,121,0,100,97,121,115,0,101,110,100,32,111,102,32,116,105,109,101,0,37,97,32,37,98,32,37,100,32,37,72,58,37,77,58,37,83,32,37,89,0,194,181,115,0,48,32,109,115,0,71,78,85,78,69,84,95,83,84,82,73,78,71,83,95,100,97,116,97,95,116,111,95,115,116,114,105,110,103,0,48,49,50,51,52,53,54,55,56,57,65,66,67,68,69,70,71,72,74,75,77,78,80,81,82,83,84,86,87,88,89,90,0,71,78,85,78,69,84,95,83,84,82,73,78,71,83,95,115,116,114,105,110,103,95,116,111,95,100,97,116,97,0,118,105,115,105,98,105,108,105,116,121,46,99,0,103,99,114,121,95,109,100,95,104,97,115,104,95,98,117,102,102,101,114,0,99,97,108,108,101,100,32,105,110,32,110,111,110,45,111,112,101,114,97,116,105,111,110,97,108,32,115,116,97,116,101,0,103,99,114,121,95,109,100,95,103,101,116,95,97,108,103,111,0,117,115,101,100,32,105,110,32,110,111,110,45,111,112,101,114,97,116,105,111,110,97,108,32,115,116,97,116,101,0,103,99,114,121,95,114,97,110,100,111,109,105,122,101,0,103,99,114,121,95,99,114,101,97,116,101,95,110,111,110,99,101,0,109,105,115,99,46,99,0,95,103,99,114,121,95,102,97,116,97,108,95,101,114,114,111,114,0,10,70,97,116,97,108,32,101,114,114,111,114,58,32,0,70,97,116,97,108,58,32,0,79,104,104,104,104,32,106,101,101,101,101,58,32,0,68,66,71,58,32,0,91,85,110,107,110,111,119,110,32,108,111,103,32,108,101,118,101,108,32,37,100,93,58,32,0,95,103,99,114,121,95,108,111,103,118,0,105,110,116,101,114,110,97,108,32,101,114,114,111,114,32,40,102,97,116,97,108,32,111,114,32,98,117,103,41,0,46,46,46,32,116,104,105,115,32,105,115,32,97,32,98,117,103,32,40,37,115,58,37,100,58,37,115,41,10,0,65,115,115,101,114,116,105,111,110,32,96,37,115,39,32,102,97,105,108,101,100,32,40,37,115,58,37,100,58,37,115,41,10,0,32,0,37,115,58,37,115,0,37,42,115,32,32,0,37,48,50,120,0,32,92,10,0,37,42,115,32,37,42,115,0,32,40,110,117,108,108,41,0,32,91,37,117,32,98,105,116,93,0,32,91,111,117,116,32,111,102,32,99,111,114,101,93,0,45,0,43,0,100,105,118,105,100,101,32,98,121,32,122,101,114,111,0,103,108,111,98,97,108,46,99,0,103,108,111,98,97,108,95,105,110,105,116,0,49,46,55,46,48,45,98,101,116,97,50,51,48,0,118,101,114,115,105,111,110,58,37,115,58,10,0,99,105,112,104,101,114,115,58,37,115,58,10,0,97,101,115,58,116,119,111,102,105,115,104,0,112,117,98,107,101,121,115,58,37,115,58,10,0,114,115,97,58,101,99,99,0,100,105,103,101,115,116,115,58,37,115,58,10,0,115,104,97,50,53,54,58,115,104,97,53,49,50,0,114,110,100,45,109,111,100,58,108,105,110,117,120,58,10,0,99,112,117,45,97,114,99,104,58,58,10,0,109,112,105,45,97,115,109,58,37,115,58,10,0,104,119,102,108,105,115,116,58,0,37,115,58,0,10,0,102,105,112,115,45,109,111,100,101,58,37,99,58,37,99,58,10,0,115,116,97,110,100,97,114,100,0,102,105,112,115,0,115,121,115,116,101,109,0,112,114,105,110,116,95,99,111,110,102,105,103,0,114,110,103,45,116,121,112,101,58,37,115,58,37,100,58,10,0,111,117,116,32,111,102,32,99,111,114,101,32,105,110,32,115,101,99,117,114,101,32,109,101,109,111,114,121,0,92,120,37,48,50,120,0,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,48,49,50,51,52,53,54,55,56,57,45,46,47,95,58,42,43,61,0,115,101,120,112,46,99,0,100,111,95,118,115,101,120,112,95,115,115,99,97,110,0,37,100,0,37,117,0,38,92,0,95,103,99,114,121,95,115,101,120,112,95,102,105,110,100,95,116,111,107,101,110,0,95,103,99,114,121,95,115,101,120,112,95,110,116,104,0,3,4,0,8,9,11,10,12,13,34,39,92,0,45,46,47,95,58,42,43,61,0,37,48,50,88,0,37,117,58,0,95,103,99,114,121,95,115,101,120,112,95,115,112,114,105,110,116,0,112,97,100,108,111,99,107,45,114,110,103,0,112,97,100,108,111,99,107,45,97,101,115,0,112,97,100,108,111,99,107,45,115,104,97,0,112,97,100,108,111,99,107,45,109,109,117,108,0,105,110,116,101,108,45,99,112,117,0,105,110,116,101,108,45,98,109,105,50,0,105,110,116,101,108,45,115,115,115,101,51,0,105,110,116,101,108,45,112,99,108,109,117,108,0,105,110,116,101,108,45,97,101,115,110,105,0,105,110,116,101,108,45,114,100,114,97,110,100,0,105,110,116,101,108,45,97,118,120,0,105,110,116,101,108,45,97,118,120,50,0,97,114,109,45,110,101,111,110,0,47,101,116,99,47,103,99,114,121,112,116,47,104,119,102,46,100,101,110,121,0,109,101,109,111,114,121,32,97,116,32,37,112,32,99,111,114,114,117,112,116,101,100,32,40,117,110,100,101,114,102,108,111,119,61,37,48,50,120,41,10,0,109,101,109,111,114,121,32,97,116,32,37,112,32,99,111,114,114,117,112,116,101,100,32,40,111,118,101,114,102,108,111,119,61,37,48,50,120,41,10,0,87,97,114,110,105,110,103,58,32,117,115,105,110,103,32,105,110,115,101,99,117,114,101,32,109,101,109,111,114,121,33,10,0,102,97,105,108,101,100,32,116,111,32,100,114,111,112,32,115,101,116,117,105,100,10,0,115,101,99,117,114,101,32,109,101,109,111,114,121,32,105,115,32,100,105,115,97,98,108,101,100,0,99,97,110,39,116,32,109,109,97,112,32,112,111,111,108,32,111,102,32,37,117,32,98,121,116,101,115,58,32,37,115,32,45,32,117,115,105,110,103,32,109,97,108,108,111,99,10,0,99,97,110,39,116,32,97,108,108,111,99,97,116,101,32,109,101,109,111,114,121,32,112,111,111,108,32,111,102,32,37,117,32,98,121,116,101,115,10,0,80,108,101,97,115,101,32,110,111,116,101,32,116,104,97,116,32,121,111,117,32,100,111,110,39,116,32,104,97,118,101,32,115,101,99,117,114,101,32,109,101,109,111,114,121,32,111,110,32,116,104,105,115,32,115,121,115,116,101,109,10,0,79,111,112,115,44,32,115,101,99,117,114,101,32,109,101,109,111,114,121,32,112,111,111,108,32,97,108,114,101,97,100,121,32,105,110,105,116,105,97,108,105,122,101,100,10,0,111,112,101,114,97,116,105,111,110,32,105,115,32,110,111,116,32,112,111,115,115,105,98,108,101,32,119,105,116,104,111,117,116,32,105,110,105,116,105,97,108,105,122,101,100,32,115,101,99,117,114,101,32,109,101,109,111,114,121,10,0,115,101,99,117,114,101,32,109,101,109,111,114,121,32,112,111,111,108,32,105,115,32,110,111,116,32,108,111,99,107,101,100,32,119,104,105,108,101,32,105,110,32,70,73,80,83,32,109,111,100,101,10,0,115,101,99,109,101,109,32,117,115,97,103,101,58,32,37,117,47,37,108,117,32,98,121,116,101,115,32,105,110,32,37,117,32,98,108,111,99,107,115,10,0,70,65,84,65,76,58,32,102,97,105,108,101,100,32,116,111,32,97,99,113,117,105,114,101,32,116,104,101,32,70,83,77,32,108,111,99,107,32,105,110,32,108,105,98,103,114,121,112,116,58,32,37,115,10,0,70,65,84,65,76,58,32,102,97,105,108,101,100,32,116,111,32,114,101,108,101,97,115,101,32,116,104,101,32,70,83,77,32,108,111,99,107,32,105,110,32,108,105,98,103,114,121,112,116,58,32,37,115,10,0,80,111,119,101,114,45,79,110,0,73,110,105,116,0,83,101,108,102,45,84,101,115,116,0,79,112,101,114,97,116,105,111,110,97,108,0,69,114,114,111,114,0,70,97,116,97,108,45,69,114,114,111,114,0,83,104,117,116,100,111,119,110,0,103,114,97,110,116,101,100,0,100,101,110,105,101,100,0,108,105,98,103,99,114,121,112,116,32,115,116,97,116,101,32,116,114,97,110,115,105,116,105,111,110,32,37,115,32,61,62,32,37,115,32,37,115,10,0,33,100,111,110,101,0,102,105,112,115,46,99,0,95,103,99,114,121,95,105,110,105,116,105,97,108,105,122,101,95,102,105,112,115,95,109,111,100,101,0,33,110,111,95,102,105,112,115,95,109,111,100,101,95,114,101,113,117,105,114,101,100,0,47,101,116,99,47,103,99,114,121,112,116,47,102,105,112,115,95,101,110,97,98,108,101,100,0,47,112,114,111,99,47,115,121,115,47,99,114,121,112,116,111,47,102,105,112,115,95,101,110,97,98,108,101,100,0,114,0,47,112,114,111,99,47,118,101,114,115,105,111,110,0,70,65,84,65,76,58,32,101,114,114,111,114,32,114,101,97,100,105,110,103,32,96,37,115,39,32,105,110,32,108,105,98,103,99,114,121,112,116,58,32,37,115,10,0,70,65,84,65,76,58,32,102,97,105,108,101,100,32,116,111,32,99,114,101,97,116,101,32,116,104,101,32,70,83,77,32,108,111,99,107,32,105,110,32,108,105,98,103,99,114,121,112,116,58,32,37,115,10,0,95,103,99,114,121,95,102,105,112,115,95,109,111,100,101,32,40,41,0,95,103,99,114,121,95,105,110,97,99,116,105,118,97,116,101,95,102,105,112,115,95,109,111,100,101,0,102,97,116,97,108,32,0,44,32,102,117,110,99,116,105,111,110,32,0,110,111,32,100,101,115,99,114,105,112,116,105,111,110,32,97,118,97,105,108,97,98,108,101,0,37,115,101,114,114,111,114,32,105,110,32,108,105,98,103,99,114,121,112,116,44,32,102,105,108,101,32,37,115,44,32,108,105,110,101,32,37,100,37,115,37,115,58,32,37,115,10,0,72,77,65,67,45,0,79,107,97,121,0,32,40,0,108,105,98,103,99,114,121,112,116,32,115,101,108,102,116,101,115,116,58,32,37,115,32,37,115,37,115,32,40,37,100,41,58,32,37,115,37,115,37,115,37,115,10,0,98,97,100,32,99,111,110,116,101,120,116,32,116,121,112,101,32,37,100,32,103,105,118,101,110,32,116,111,32,95,103,99,114,121,95,99,116,120,95,97,108,108,111,99,10,0,99,84,120,0,98,97,100,32,112,111,105,110,116,101,114,32,37,112,32,112,97,115,115,101,100,32,116,111,32,95,103,99,114,121,95,99,116,120,95,103,101,116,95,112,111,105,110,116,101,114,10,0,119,114,111,110,103,32,99,111,110,116,101,120,116,32,116,121,112,101,32,37,100,32,114,101,113,117,101,115,116,32,102,111,114,32,99,111,110,116,101,120,116,32,37,112,32,111,102,32,116,121,112,101,32,37,100,10,0,98,97,100,32,112,111,105,110,116,101,114,32,37,112,32,112,97,115,115,101,100,32,116,111,32,103,99,114,121,95,99,116,120,95,114,101,108,97,115,101,10,0,98,97,100,32,99,111,110,116,101,120,116,32,116,121,112,101,32,37,100,32,100,101,116,101,99,116,101,100,32,105,110,32,103,99,114,121,95,99,116,120,95,114,101,108,97,115,101,10,0,103,99,114,121,95,99,105,112,104,101,114,95,99,108,111,115,101,58,32,97,108,114,101,97,100,121,32,99,108,111,115,101,100,47,105,110,118,97,108,105,100,32,104,97,110,100,108,101,0,99,105,112,104,101,114,46,99,0,99,105,112,104,101,114,95,101,110,99,114,121,112,116,0,99,105,112,104,101,114,32,109,111,100,101,32,78,79,78,69,32,117,115,101,100,0,99,105,112,104,101,114,95,101,110,99,114,121,112,116,58,32,105,110,118,97,108,105,100,32,109,111,100,101,32,37,100,10,0,99,105,112,104,101,114,95,100,101,99,114,121,112,116,0,99,105,112,104,101,114,95,100,101,99,114,121,112,116,58,32,105,110,118,97,108,105,100,32,109,111,100,101,32,37,100,10,0,87,65,82,78,73,78,71,58,32,99,105,112,104,101,114,95,115,101,116,105,118,58,32,105,118,108,101,110,61,37,117,32,98,108,107,108,101,110,61,37,117,10,0,99,105,112,104,101,114,95,115,101,116,105,118,0,73,86,32,108,101,110,103,116,104,32,100,111,101,115,32,110,111,116,32,109,97,116,99,104,32,98,108,111,99,107,108,101,110,103,116,104,0,48,120,55,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,69,68,0,45,48,120,48,49,0,45,48,120,50,68,70,67,57,51,49,49,68,52,57,48,48,49,56,67,55,51,51,56,66,70,56,54,56,56,56,54,49,55,54,55,70,70,56,70,70,53,66,50,66,69,66,69,50,55,53,52,56,65,49,52,66,50,51,53,69,67,65,54,56,55,52,65,0,48,120,49,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,49,52,68,69,70,57,68,69,65,50,70,55,57,67,68,54,53,56,49,50,54,51,49,65,53,67,70,53,68,51,69,68,0,48,120,50,49,54,57,51,54,68,51,67,68,54,69,53,51,70,69,67,48,65,52,69,50,51,49,70,68,68,54,68,67,53,67,54,57,50,67,67,55,54,48,57,53,50,53,65,55,66,50,67,57,53,54,50,68,54,48,56,70,50,53,68,53,49,65,0,48,120,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,53,56,0,48,120,48,56,0,78,73,83,84,32,80,45,49,57,50,0,48,120,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,101,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,0,48,120,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,101,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,99,0,48,120,54,52,50,49,48,53,49,57,101,53,57,99,56,48,101,55,48,102,97,55,101,57,97,98,55,50,50,52,51,48,52,57,102,101,98,56,100,101,101,99,99,49,52,54,98,57,98,49,0,48,120,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,57,57,100,101,102,56,51,54,49,52,54,98,99,57,98,49,98,52,100,50,50,56,51,49,0,48,120,49,56,56,100,97,56,48,101,98,48,51,48,57,48,102,54,55,99,98,102,50,48,101,98,52,51,97,49,56,56,48,48,102,52,102,102,48,97,102,100,56,50,102,102,49,48,49,50,0,48,120,48,55,49,57,50,98,57,53,102,102,99,56,100,97,55,56,54,51,49,48,49,49,101,100,54,98,50,52,99,100,100,53,55,51,102,57,55,55,97,49,49,101,55,57,52,56,49,49,0,48,120,48,49,0,78,73,83,84,32,80,45,50,50,52,0,48,120,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,49,0,48,120,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,101,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,101,0,48,120,98,52,48,53,48,97,56,53,48,99,48,52,98,51,97,98,102,53,52,49,51,50,53,54,53,48,52,52,98,48,98,55,100,55,98,102,100,56,98,97,50,55,48,98,51,57,52,51,50,51,53,53,102,102,98,52,0,48,120,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,49,54,97,50,101,48,98,56,102,48,51,101,49,51,100,100,50,57,52,53,53,99,53,99,50,97,51,100,0,48,120,98,55,48,101,48,99,98,100,54,98,98,52,98,102,55,102,51,50,49,51,57,48,98,57,52,97,48,51,99,49,100,51,53,54,99,50,49,49,50,50,51,52,51,50,56,48,100,54,49,49,53,99,49,100,50,49,0,48,120,98,100,51,55,54,51,56,56,98,53,102,55,50,51,102,98,52,99,50,50,100,102,101,54,99,100,52,51,55,53,97,48,53,97,48,55,52,55,54,52,52,52,100,53,56,49,57,57,56,53,48,48,55,101,51,52,0,78,73,83,84,32,80,45,50,53,54,0,48,120,102,102,102,102,102,102,102,102,48,48,48,48,48,48,48,49,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,0,48,120,102,102,102,102,102,102,102,102,48,48,48,48,48,48,48,49,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,99,0,48,120,53,97,99,54,51,53,100,56,97,97,51,97,57,51,101,55,98,51,101,98,98,100,53,53,55,54,57,56,56,54,98,99,54,53,49,100,48,54,98,48,99,99,53,51,98,48,102,54,51,98,99,101,51,99,51,101,50,55,100,50,54,48,52,98,0,48,120,102,102,102,102,102,102,102,102,48,48,48,48,48,48,48,48,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,98,99,101,54,102,97,97,100,97,55,49,55,57,101,56,52,102,51,98,57,99,97,99,50,102,99,54,51,50,53,53,49,0,48,120,54,98,49,55,100,49,102,50,101,49,50,99,52,50,52,55,102,56,98,99,101,54,101,53,54,51,97,52,52,48,102,50,55,55,48,51,55,100,56,49,50,100,101,98,51,51,97,48,102,52,97,49,51,57,52,53,100,56,57,56,99,50,57,54,0,48,120,52,102,101,51,52,50,101,50,102,101,49,97,55,102,57,98,56,101,101,55,101,98,52,97,55,99,48,102,57,101,49,54,50,98,99,101,51,51,53,55,54,98,51,49,53,101,99,101,99,98,98,54,52,48,54,56,51,55,98,102,53,49,102,53,0,78,73,83,84,32,80,45,51,56,52,0,48,120,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,101,102,102,102,102,102,102,102,102,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,102,102,102,102,102,102,102,102,0,48,120,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,101,102,102,102,102,102,102,102,102,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,102,102,102,102,102,102,102,99,0,48,120,98,51,51,49,50,102,97,55,101,50,51,101,101,55,101,52,57,56,56,101,48,53,54,98,101,51,102,56,50,100,49,57,49,56,49,100,57,99,54,101,102,101,56,49,52,49,49,50,48,51,49,52,48,56,56,102,53,48,49,51,56,55,53,97,99,54,53,54,51,57,56,100,56,97,50,101,100,49,57,100,50,97,56,53,99,56,101,100,100,51,101,99,50,97,101,102,0,48,120,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,99,55,54,51,52,100,56,49,102,52,51,55,50,100,100,102,53,56,49,97,48,100,98,50,52,56,98,48,97,55,55,97,101,99,101,99,49,57,54,97,99,99,99,53,50,57,55,51,0,48,120,97,97,56,55,99,97,50,50,98,101,56,98,48,53,51,55,56,101,98,49,99,55,49,101,102,51,50,48,97,100,55,52,54,101,49,100,51,98,54,50,56,98,97,55,57,98,57,56,53,57,102,55,52,49,101,48,56,50,53,52,50,97,51,56,53,53,48,50,102,50,53,100,98,102,53,53,50,57,54,99,51,97,53,52,53,101,51,56,55,50,55,54,48,97,98,55,0,48,120,51,54,49,55,100,101,52,97,57,54,50,54,50,99,54,102,53,100,57,101,57,56,98,102,57,50,57,50,100,99,50,57,102,56,102,52,49,100,98,100,50,56,57,97,49,52,55,99,101,57,100,97,51,49,49,51,98,53,102,48,98,56,99,48,48,97,54,48,98,49,99,101,49,100,55,101,56,49,57,100,55,97,52,51,49,100,55,99,57,48,101,97,48,101,53,102,0,78,73,83,84,32,80,45,53,50,49,0,48,120,48,49,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,0,48,120,48,49,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,99,0,48,120,48,53,49,57,53,51,101,98,57,54,49,56,101,49,99,57,97,49,102,57,50,57,97,50,49,97,48,98,54,56,53,52,48,101,101,97,50,100,97,55,50,53,98,57,57,98,51,49,53,102,51,98,56,98,52,56,57,57,49,56,101,102,49,48,57,101,49,53,54,49,57,51,57,53,49,101,99,55,101,57,51,55,98,49,54,53,50,99,48,98,100,51,98,98,49,98,102,48,55,51,53,55,51,100,102,56,56,51,100,50,99,51,52,102,49,101,102,52,53,49,102,100,52,54,98,53,48,51,102,48,48,0,48,120,49,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,97,53,49,56,54,56,55,56,51,98,102,50,102,57,54,54,98,55,102,99,99,48,49,52,56,102,55,48,57,97,53,100,48,51,98,98,53,99,57,98,56,56,57,57,99,52,55,97,101,98,98,54,102,98,55,49,101,57,49,51,56,54,52,48,57,0,48,120,48,48,99,54,56,53,56,101,48,54,98,55,48,52,48,52,101,57,99,100,57,101,51,101,99,98,54,54,50,51,57,53,98,52,52,50,57,99,54,52,56,49,51,57,48,53,51,102,98,53,50,49,102,56,50,56,97,102,54,48,54,98,52,100,51,100,98,97,97,49,52,98,53,101,55,55,101,102,101,55,53,57,50,56,102,101,49,100,99,49,50,55,97,50,102,102,97,56,100,101,51,51,52,56,98,51,99,49,56,53,54,97,52,50,57,98,102,57,55,101,55,101,51,49,99,50,101,53,98,100,54,54,0,48,120,48,49,49,56,51,57,50,57,54,97,55,56,57,97,51,98,99,48,48,52,53,99,56,97,53,102,98,52,50,99,55,100,49,98,100,57,57,56,102,53,52,52,52,57,53,55,57,98,52,52,54,56,49,55,97,102,98,100,49,55,50,55,51,101,54,54,50,99,57,55,101,101,55,50,57,57,53,101,102,52,50,54,52,48,99,53,53,48,98,57,48,49,51,102,97,100,48,55,54,49,51,53,51,99,55,48,56,54,97,50,55,50,99,50,52,48,56,56,98,101,57,52,55,54,57,102,100,49,54,54,53,48,0,98,114,97,105,110,112,111,111,108,80,49,54,48,114,49,0,48,120,101,57,53,101,52,97,53,102,55,51,55,48,53,57,100,99,54,48,100,102,99,55,97,100,57,53,98,51,100,56,49,51,57,53,49,53,54,50,48,102,0,48,120,51,52,48,101,55,98,101,50,97,50,56,48,101,98,55,52,101,50,98,101,54,49,98,97,100,97,55,52,53,100,57,55,101,56,102,55,99,51,48,48,0,48,120,49,101,53,56,57,97,56,53,57,53,52,50,51,52,49,50,49,51,52,102,97,97,50,100,98,100,101,99,57,53,99,56,100,56,54,55,53,101,53,56,0,48,120,101,57,53,101,52,97,53,102,55,51,55,48,53,57,100,99,54,48,100,102,53,57,57,49,100,52,53,48,50,57,52,48,57,101,54,48,102,99,48,57,0,48,120,98,101,100,53,97,102,49,54,101,97,51,102,54,97,52,102,54,50,57,51,56,99,52,54,51,49,101,98,53,97,102,55,98,100,98,99,100,98,99,51,0,48,120,49,54,54,55,99,98,52,55,55,97,49,97,56,101,99,51,51,56,102,57,52,55,52,49,54,54,57,99,57,55,54,51,49,54,100,97,54,51,50,49,0,98,114,97,105,110,112,111,111,108,80,49,57,50,114,49,0,48,120,99,51,48,50,102,52,49,100,57,51,50,97,51,54,99,100,97,55,97,51,52,54,51,48,57,51,100,49,56,100,98,55,56,102,99,101,52,55,54,100,101,49,97,56,54,50,57,55,0,48,120,54,97,57,49,49,55,52,48,55,54,98,49,101,48,101,49,57,99,51,57,99,48,51,49,102,101,56,54,56,53,99,49,99,97,101,48,52,48,101,53,99,54,57,97,50,56,101,102,0,48,120,52,54,57,97,50,56,101,102,55,99,50,56,99,99,97,51,100,99,55,50,49,100,48,52,52,102,52,52,57,54,98,99,99,97,55,101,102,52,49,52,54,102,98,102,50,53,99,57,0,48,120,99,51,48,50,102,52,49,100,57,51,50,97,51,54,99,100,97,55,97,51,52,54,50,102,57,101,57,101,57,49,54,98,53,98,101,56,102,49,48,50,57,97,99,52,97,99,99,49,0,48,120,99,48,97,48,54,52,55,101,97,97,98,54,97,52,56,55,53,51,98,48,51,51,99,53,54,99,98,48,102,48,57,48,48,97,50,102,53,99,52,56,53,51,51,55,53,102,100,54,0,48,120,49,52,98,54,57,48,56,54,54,97,98,100,53,98,98,56,56,98,53,102,52,56,50,56,99,49,52,57,48,48,48,50,101,54,55,55,51,102,97,50,102,97,50,57,57,98,56,102,0,98,114,97,105,110,112,111,111,108,80,50,50,52,114,49,0,48,120,100,55,99,49,51,52,97,97,50,54,52,51,54,54,56,54,50,97,49,56,51,48,50,53,55,53,100,49,100,55,56,55,98,48,57,102,48,55,53,55,57,55,100,97,56,57,102,53,55,101,99,56,99,48,102,102,0,48,120,54,56,97,53,101,54,50,99,97,57,99,101,54,99,49,99,50,57,57,56,48,51,97,54,99,49,53,51,48,98,53,49,52,101,49,56,50,97,100,56,98,48,48,52,50,97,53,57,99,97,100,50,57,102,52,51,0,48,120,50,53,56,48,102,54,51,99,99,102,101,52,52,49,51,56,56,55,48,55,49,51,98,49,97,57,50,51,54,57,101,51,51,101,50,49,51,53,100,50,54,54,100,98,98,51,55,50,51,56,54,99,52,48,48,98,0,48,120,100,55,99,49,51,52,97,97,50,54,52,51,54,54,56,54,50,97,49,56,51,48,50,53,55,53,100,48,102,98,57,56,100,49,49,54,98,99,52,98,54,100,100,101,98,99,97,51,97,53,97,55,57,51,57,102,0,48,120,48,100,57,48,50,57,97,100,50,99,55,101,53,99,102,52,51,52,48,56,50,51,98,50,97,56,55,100,99,54,56,99,57,101,52,99,101,51,49,55,52,99,49,101,54,101,102,100,101,101,49,50,99,48,55,100,0,48,120,53,56,97,97,53,54,102,55,55,50,99,48,55,50,54,102,50,52,99,54,98,56,57,101,52,101,99,100,97,99,50,52,51,53,52,98,57,101,57,57,99,97,97,51,102,54,100,51,55,54,49,52,48,50,99,100,0,98,114,97,105,110,112,111,111,108,80,50,53,54,114,49,0,48,120,97,57,102,98,53,55,100,98,97,49,101,101,97,57,98,99,51,101,54,54,48,97,57,48,57,100,56,51,56,100,55,50,54,101,51,98,102,54,50,51,100,53,50,54,50,48,50,56,50,48,49,51,52,56,49,100,49,102,54,101,53,51,55,55,0,48,120,55,100,53,97,48,57,55,53,102,99,50,99,51,48,53,55,101,101,102,54,55,53,51,48,52,49,55,97,102,102,101,55,102,98,56,48,53,53,99,49,50,54,100,99,53,99,54,99,101,57,52,97,52,98,52,52,102,51,51,48,98,53,100,57,0,48,120,50,54,100,99,53,99,54,99,101,57,52,97,52,98,52,52,102,51,51,48,98,53,100,57,98,98,100,55,55,99,98,102,57,53,56,52,49,54,50,57,53,99,102,55,101,49,99,101,54,98,99,99,100,99,49,56,102,102,56,99,48,55,98,54,0,48,120,97,57,102,98,53,55,100,98,97,49,101,101,97,57,98,99,51,101,54,54,48,97,57,48,57,100,56,51,56,100,55,49,56,99,51,57,55,97,97,51,98,53,54,49,97,54,102,55,57,48,49,101,48,101,56,50,57,55,52,56,53,54,97,55,0,48,120,56,98,100,50,97,101,98,57,99,98,55,101,53,55,99,98,50,99,52,98,52,56,50,102,102,99,56,49,98,55,97,102,98,57,100,101,50,55,101,49,101,51,98,100,50,51,99,50,51,97,52,52,53,51,98,100,57,97,99,101,51,50,54,50,0,48,120,53,52,55,101,102,56,51,53,99,51,100,97,99,52,102,100,57,55,102,56,52,54,49,97,49,52,54,49,49,100,99,57,99,50,55,55,52,53,49,51,50,100,101,100,56,101,53,52,53,99,49,100,53,52,99,55,50,102,48,52,54,57,57,55,0,98,114,97,105,110,112,111,111,108,80,51,50,48,114,49,0,48,120,100,51,53,101,52,55,50,48,51,54,98,99,52,102,98,55,101,49,51,99,55,56,53,101,100,50,48,49,101,48,54,53,102,57,56,102,99,102,97,54,102,54,102,52,48,100,101,102,52,102,57,50,98,57,101,99,55,56,57,51,101,99,50,56,102,99,100,52,49,50,98,49,102,49,98,51,50,101,50,55,0,48,120,51,101,101,51,48,98,53,54,56,102,98,97,98,48,102,56,56,51,99,99,101,98,100,52,54,100,51,102,51,98,98,56,97,50,97,55,51,53,49,51,102,53,101,98,55,57,100,97,54,54,49,57,48,101,98,48,56,53,102,102,97,57,102,52,57,50,102,51,55,53,97,57,55,100,56,54,48,101,98,52,0,48,120,53,50,48,56,56,51,57,52,57,100,102,100,98,99,52,50,100,51,97,100,49,57,56,54,52,48,54,56,56,97,54,102,101,49,51,102,52,49,51,52,57,53,53,52,98,52,57,97,99,99,51,49,100,99,99,100,56,56,52,53,51,57,56,49,54,102,53,101,98,52,97,99,56,102,98,49,102,49,97,54,0,48,120,100,51,53,101,52,55,50,48,51,54,98,99,52,102,98,55,101,49,51,99,55,56,53,101,100,50,48,49,101,48,54,53,102,57,56,102,99,102,97,53,98,54,56,102,49,50,97,51,50,100,52,56,50,101,99,55,101,101,56,54,53,56,101,57,56,54,57,49,53,53,53,98,52,52,99,53,57,51,49,49,0,48,120,52,51,98,100,55,101,57,97,102,98,53,51,100,56,98,56,53,50,56,57,98,99,99,52,56,101,101,53,98,102,101,54,102,50,48,49,51,55,100,49,48,97,48,56,55,101,98,54,101,55,56,55,49,101,50,97,49,48,97,53,57,57,99,55,49,48,97,102,56,100,48,100,51,57,101,50,48,54,49,49,0,48,120,49,52,102,100,100,48,53,53,52,53,101,99,49,99,99,56,97,98,52,48,57,51,50,52,55,102,55,55,50,55,53,101,48,55,52,51,102,102,101,100,49,49,55,49,56,50,101,97,97,57,99,55,55,56,55,55,97,97,97,99,54,97,99,55,100,51,53,50,52,53,100,49,54,57,50,101,56,101,101,49,0,98,114,97,105,110,112,111,111,108,80,51,56,52,114,49,0,48,120,56,99,98,57,49,101,56,50,97,51,51,56,54,100,50,56,48,102,53,100,54,102,55,101,53,48,101,54,52,49,100,102,49,53,50,102,55,49,48,57,101,100,53,52,53,54,98,52,49,50,98,49,100,97,49,57,55,102,98,55,49,49,50,51,97,99,100,51,97,55,50,57,57,48,49,100,49,97,55,49,56,55,52,55,48,48,49,51,51,49,48,55,101,99,53,51,0,48,120,55,98,99,51,56,50,99,54,51,100,56,99,49,53,48,99,51,99,55,50,48,56,48,97,99,101,48,53,97,102,97,48,99,50,98,101,97,50,56,101,52,102,98,50,50,55,56,55,49,51,57,49,54,53,101,102,98,97,57,49,102,57,48,102,56,97,97,53,56,49,52,97,53,48,51,97,100,52,101,98,48,52,97,56,99,55,100,100,50,50,99,101,50,56,50,54,0,48,120,48,52,97,56,99,55,100,100,50,50,99,101,50,56,50,54,56,98,51,57,98,53,53,52,49,54,102,48,52,52,55,99,50,102,98,55,55,100,101,49,48,55,100,99,100,50,97,54,50,101,56,56,48,101,97,53,51,101,101,98,54,50,100,53,55,99,98,52,51,57,48,50,57,53,100,98,99,57,57,52,51,97,98,55,56,54,57,54,102,97,53,48,52,99,49,49,0,48,120,56,99,98,57,49,101,56,50,97,51,51,56,54,100,50,56,48,102,53,100,54,102,55,101,53,48,101,54,52,49,100,102,49,53,50,102,55,49,48,57,101,100,53,52,53,54,98,51,49,102,49,54,54,101,54,99,97,99,48,52,50,53,97,55,99,102,51,97,98,54,97,102,54,98,55,102,99,51,49,48,51,98,56,56,51,50,48,50,101,57,48,52,54,53,54,53,0,48,120,49,100,49,99,54,52,102,48,54,56,99,102,52,53,102,102,97,50,97,54,51,97,56,49,98,55,99,49,51,102,54,98,56,56,52,55,97,51,101,55,55,101,102,49,52,102,101,51,100,98,55,102,99,97,102,101,48,99,98,100,49,48,101,56,101,56,50,54,101,48,51,52,51,54,100,54,52,54,97,97,101,102,56,55,98,50,101,50,52,55,100,52,97,102,49,101,0,48,120,56,97,98,101,49,100,55,53,50,48,102,57,99,50,97,52,53,99,98,49,101,98,56,101,57,53,99,102,100,53,53,50,54,50,98,55,48,98,50,57,102,101,101,99,53,56,54,52,101,49,57,99,48,53,52,102,102,57,57,49,50,57,50,56,48,101,52,54,52,54,50,49,55,55,57,49,56,49,49,49,52,50,56,50,48,51,52,49,50,54,51,99,53,51,49,53,0,98,114,97,105,110,112,111,111,108,80,53,49,50,114,49,0,48,120,97,97,100,100,57,100,98,56,100,98,101,57,99,52,56,98,51,102,100,52,101,54,97,101,51,51,99,57,102,99,48,55,99,98,51,48,56,100,98,51,98,51,99,57,100,50,48,101,100,54,54,51,57,99,99,97,55,48,51,51,48,56,55,49,55,100,52,100,57,98,48,48,57,98,99,54,54,56,52,50,97,101,99,100,97,49,50,97,101,54,97,51,56,48,101,54,50,56,56,49,102,102,50,102,50,100,56,50,99,54,56,53,50,56,97,97,54,48,53,54,53,56,51,97,52,56,102,51,0,48,120,55,56,51,48,97,51,51,49,56,98,54,48,51,98,56,57,101,50,51,50,55,49,52,53,97,99,50,51,52,99,99,53,57,52,99,98,100,100,56,100,51,100,102,57,49,54,49,48,97,56,51,52,52,49,99,97,101,97,57,56,54,51,98,99,50,100,101,100,53,100,53,97,97,56,50,53,51,97,97,49,48,97,50,101,102,49,99,57,56,98,57,97,99,56,98,53,55,102,49,49,49,55,97,55,50,98,102,50,99,55,98,57,101,55,99,49,97,99,52,100,55,55,102,99,57,52,99,97,0,48,120,51,100,102,57,49,54,49,48,97,56,51,52,52,49,99,97,101,97,57,56,54,51,98,99,50,100,101,100,53,100,53,97,97,56,50,53,51,97,97,49,48,97,50,101,102,49,99,57,56,98,57,97,99,56,98,53,55,102,49,49,49,55,97,55,50,98,102,50,99,55,98,57,101,55,99,49,97,99,52,100,55,55,102,99,57,52,99,97,100,99,48,56,51,101,54,55,57,56,52,48,53,48,98,55,53,101,98,97,101,53,100,100,50,56,48,57,98,100,54,51,56,48,49,54,102,55,50,51,0,48,120,97,97,100,100,57,100,98,56,100,98,101,57,99,52,56,98,51,102,100,52,101,54,97,101,51,51,99,57,102,99,48,55,99,98,51,48,56,100,98,51,98,51,99,57,100,50,48,101,100,54,54,51,57,99,99,97,55,48,51,51,48,56,55,48,53,53,51,101,53,99,52,49,52,99,97,57,50,54,49,57,52,49,56,54,54,49,49,57,55,102,97,99,49,48,52,55,49,100,98,49,100,51,56,49,48,56,53,100,100,97,100,100,98,53,56,55,57,54,56,50,57,99,97,57,48,48,54,57,0,48,120,56,49,97,101,101,52,98,100,100,56,50,101,100,57,54,52,53,97,50,49,51,50,50,101,57,99,52,99,54,97,57,51,56,53,101,100,57,102,55,48,98,53,100,57,49,54,99,49,98,52,51,98,54,50,101,101,102,52,100,48,48,57,56,101,102,102,51,98,49,102,55,56,101,50,100,48,100,52,56,100,53,48,100,49,54,56,55,98,57,51,98,57,55,100,53,102,55,99,54,100,53,48,52,55,52,48,54,97,53,101,54,56,56,98,51,53,50,50,48,57,98,99,98,57,102,56,50,50,0,48,120,55,100,100,101,51,56,53,100,53,54,54,51,51,50,101,99,99,48,101,97,98,102,97,57,99,102,55,56,50,50,102,100,102,50,48,57,102,55,48,48],"i8",ALLOC_NONE,Runtime.GLOBAL_BASE+20480);allocate([50,52,97,53,55,98,49,97,97,48,48,48,99,53,53,98,56,56,49,102,56,49,49,49,98,50,100,99,100,101,52,57,52,97,53,102,52,56,53,101,53,98,99,97,52,98,100,56,56,97,50,55,54,51,97,101,100,49,99,97,50,98,50,102,97,56,102,48,53,52,48,54,55,56,99,100,49,101,48,102,51,97,100,56,48,56,57,50,0,71,79,83,84,50,48,48,49,45,116,101,115,116,0,48,120,56,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,52,51,49,0,48,120,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,55,0,48,120,53,102,98,102,102,52,57,56,97,97,57,51,56,99,101,55,51,57,98,56,101,48,50,50,102,98,97,102,101,102,52,48,53,54,51,102,54,101,54,97,51,52,55,50,102,99,50,97,53,49,52,99,48,99,101,57,100,97,101,50,51,98,55,101,0,48,120,56,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,49,53,48,102,101,56,97,49,56,57,50,57,55,54,49,53,52,99,53,57,99,102,99,49,57,51,97,99,99,102,53,98,51,0,48,120,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,50,0,48,120,48,56,101,50,97,56,97,48,101,54,53,49,52,55,100,52,98,100,54,51,49,54,48,51,48,101,49,54,100,49,57,99,56,53,99,57,55,102,48,97,57,99,97,50,54,55,49,50,50,98,57,54,97,98,98,99,101,97,55,101,56,102,99,56,0,71,79,83,84,50,48,48,49,45,67,114,121,112,116,111,80,114,111,45,65,0,48,120,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,100,57,55,0,48,120,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,100,57,52,0,48,120,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,97,54,0,48,120,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,54,99,54,49,49,48,55,48,57,57,53,97,100,49,48,48,52,53,56,52,49,98,48,57,98,55,54,49,98,56,57,51,0,48,120,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,49,0,48,120,56,100,57,49,101,52,55,49,101,48,57,56,57,99,100,97,50,55,100,102,53,48,53,97,52,53,51,102,50,98,55,54,51,53,50,57,52,102,50,100,100,102,50,51,101,51,98,49,50,50,97,99,99,57,57,99,57,101,57,102,49,101,49,52,0,71,79,83,84,50,48,48,49,45,67,114,121,112,116,111,80,114,111,45,66,0,48,120,56,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,99,57,57,0,48,120,56,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,99,57,54,0,48,120,51,101,49,97,102,52,49,57,97,50,54,57,97,53,102,56,54,54,97,55,100,51,99,50,53,99,51,100,102,56,48,97,101,57,55,57,50,53,57,51,55,51,102,102,50,98,49,56,50,102,52,57,100,52,99,101,55,101,49,98,98,99,56,98,0,48,120,56,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,49,53,102,55,48,48,99,102,102,102,49,97,54,50,52,101,53,101,52,57,55,49,54,49,98,99,99,56,97,49,57,56,102,0,48,120,51,102,97,56,49,50,52,51,53,57,102,57,54,54,56,48,98,56,51,100,49,99,51,101,98,50,99,48,55,48,101,53,99,53,52,53,99,57,56,53,56,100,48,51,101,99,102,98,55,52,52,98,102,56,100,55,49,55,55,49,55,101,102,99,0,71,79,83,84,50,48,48,49,45,67,114,121,112,116,111,80,114,111,45,67,0,48,120,57,98,57,102,54,48,53,102,53,97,56,53,56,49,48,55,97,98,49,101,99,56,53,101,54,98,52,49,99,56,97,97,99,102,56,52,54,101,56,54,55,56,57,48,53,49,100,51,55,57,57,56,102,55,98,57,48,50,50,100,55,53,57,98,0,48,120,57,98,57,102,54,48,53,102,53,97,56,53,56,49,48,55,97,98,49,101,99,56,53,101,54,98,52,49,99,56,97,97,99,102,56,52,54,101,56,54,55,56,57,48,53,49,100,51,55,57,57,56,102,55,98,57,48,50,50,100,55,53,57,56,0,48,120,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,56,48,53,97,0,48,120,57,98,57,102,54,48,53,102,53,97,56,53,56,49,48,55,97,98,49,101,99,56,53,101,54,98,52,49,99,56,97,97,53,56,50,99,97,51,53,49,49,101,100,100,102,98,55,52,102,48,50,102,51,97,54,53,57,56,57,56,48,98,98,57,0,48,120,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,0,48,120,52,49,101,99,101,53,53,55,52,51,55,49,49,97,56,99,51,99,98,102,51,55,56,51,99,100,48,56,99,48,101,101,52,100,52,100,99,52,52,48,100,52,54,52,49,97,56,102,51,54,54,101,53,53,48,100,102,100,98,51,98,98,54,55,0,71,79,83,84,50,48,49,50,45,116,101,115,116,0,48,120,52,53,51,49,97,99,100,49,102,101,48,48,50,51,99,55,53,53,48,100,50,54,55,98,54,98,50,102,101,101,56,48,57,50,50,98,49,52,98,50,102,102,98,57,48,102,48,52,100,52,101,98,55,99,48,57,98,53,100,50,100,49,53,100,102,49,100,56,53,50,55,52,49,97,102,52,55,48,52,97,48,52,53,56,48,52,55,101,56,48,101,52,53,52,54,100,51,53,98,56,51,51,54,102,97,99,50,50,52,100,100,56,49,54,54,52,98,98,102,53,50,56,98,101,54,51,55,51,0,48,120,49,99,102,102,48,56,48,54,97,51,49,49,49,54,100,97,50,57,100,56,99,102,97,53,52,101,53,55,101,98,55,52,56,98,99,53,102,51,55,55,101,52,57,52,48,48,102,100,100,55,56,56,98,54,52,57,101,99,97,49,97,99,52,51,54,49,56,51,52,48,49,51,98,50,97,100,55,51,50,50,52,56,48,97,56,57,99,97,53,56,101,48,99,102,55,52,98,99,57,101,53,52,48,99,50,97,100,100,54,56,57,55,102,97,100,48,97,51,48,56,52,102,51,48,50,97,100,99,0,48,120,52,53,51,49,97,99,100,49,102,101,48,48,50,51,99,55,53,53,48,100,50,54,55,98,54,98,50,102,101,101,56,48,57,50,50,98,49,52,98,50,102,102,98,57,48,102,48,52,100,52,101,98,55,99,48,57,98,53,100,50,100,49,53,100,97,56,50,102,50,100,55,101,99,98,49,100,98,97,99,55,49,57,57,48,53,99,53,101,101,99,99,52,50,51,102,49,100,56,54,101,50,53,101,100,98,101,50,51,99,53,57,53,100,54,52,52,97,97,102,49,56,55,101,54,101,54,100,102,0,48,120,50,52,100,49,57,99,99,54,52,53,55,50,101,101,51,48,102,51,57,54,98,102,54,101,98,98,102,100,55,97,54,99,53,50,49,51,98,51,98,51,100,55,48,53,55,99,99,56,50,53,102,57,49,48,57,51,97,54,56,99,100,55,54,50,102,100,54,48,54,49,49,50,54,50,99,100,56,51,56,100,99,54,98,54,48,97,97,55,101,101,101,56,48,52,101,50,56,98,99,56,52,57,57,55,55,102,97,99,51,51,98,52,98,53,51,48,102,49,98,49,50,48,50,52,56,97,57,97,0,48,120,50,98,98,51,49,50,97,52,51,98,100,50,99,101,54,101,48,100,48,50,48,54,49,51,99,56,53,55,97,99,100,100,99,102,98,102,48,54,49,101,57,49,101,53,102,50,99,51,102,51,50,52,52,55,99,50,53,57,102,51,57,98,50,99,56,51,97,98,49,53,54,100,55,55,102,49,52,57,54,98,102,55,101,98,51,51,53,49,101,49,101,101,52,101,52,51,100,99,49,97,49,56,98,57,49,98,50,52,54,52,48,98,54,100,98,98,57,50,99,98,49,97,100,100,51,55,49,101,0,71,79,83,84,50,48,49,50,45,116,99,50,54,45,65,0,48,120,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,100,99,55,0,48,120,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,100,99,52,0,48,120,101,56,99,50,53,48,53,100,101,100,102,99,56,54,100,100,99,49,98,100,48,98,50,98,54,54,54,55,102,49,100,97,51,52,98,56,50,53,55,52,55,54,49,99,98,48,101,56,55,57,98,100,48,56,49,99,102,100,48,98,54,50,54,53,101,101,51,99,98,48,57,48,102,51,48,100,50,55,54,49,52,99,98,52,53,55,52,48,49,48,100,97,57,48,100,100,56,54,50,101,102,57,100,52,101,98,101,101,52,55,54,49,53,48,51,49,57,48,55,56,53,97,55,49,99,55,54,48,0,48,120,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,50,55,101,54,57,53,51,50,102,52,56,100,56,57,49,49,54,102,102,50,50,98,56,100,52,101,48,53,54,48,54,48,57,98,52,98,51,56,97,98,102,97,100,50,98,56,53,100,99,97,99,100,98,49,52,49,49,102,49,48,98,50,55,53,0,48,120,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,51,0,48,120,55,53,48,51,99,102,101,56,55,97,56,51,54,97,101,51,97,54,49,98,56,56,49,54,101,50,53,52,53,48,101,54,99,101,53,101,49,99,57,51,97,99,102,49,97,98,99,49,55,55,56,48,54,52,102,100,99,98,101,102,97,57,50,49,100,102,49,54,50,54,98,101,52,102,100,48,51,54,101,57,51,100,55,53,101,54,97,53,48,101,51,97,52,49,101,57,56,48,50,56,102,101,53,102,99,50,51,53,102,53,98,56,56,57,97,53,56,57,99,98,53,50,49,53,102,50,97,52,0,71,79,83,84,50,48,49,50,45,116,99,50,54,45,66,0,48,120,56,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,54,102,0,48,120,56,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,54,99,0,48,120,54,56,55,100,49,98,52,53,57,100,99,56,52,49,52,53,55,101,51,101,48,54,99,102,54,102,53,101,50,53,49,55,98,57,55,99,55,100,54,49,52,97,102,49,51,56,98,99,98,102,56,53,100,99,56,48,54,99,52,98,50,56,57,102,51,101,57,54,53,100,50,100,98,49,52,49,54,100,50,49,55,102,56,98,50,55,54,102,97,100,49,97,98,54,57,99,53,48,102,55,56,98,101,101,49,102,97,51,49,48,54,101,102,98,56,99,99,98,99,55,99,53,49,52,48,49,49,54,0,48,120,56,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,49,52,57,97,49,101,99,49,52,50,53,54,53,97,53,52,53,97,99,102,100,98,55,55,98,100,57,100,52,48,99,102,97,56,98,57,57,54,55,49,50,49,48,49,98,101,97,48,101,99,54,51,52,54,99,53,52,51,55,52,102,50,53,98,100,0,48,120,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,50,0,48,120,49,97,56,102,55,101,100,97,51,56,57,98,48,57,52,99,50,99,48,55,49,101,51,54,52,55,97,56,57,52,48,102,51,99,49,50,51,98,54,57,55,53,55,56,99,50,49,51,98,101,54,100,100,57,101,54,99,56,101,99,55,51,51,53,100,99,98,50,50,56,102,100,49,101,100,102,52,97,51,57,49,53,50,99,98,99,97,97,102,56,99,48,51,57,56,56,50,56,48,52,49,48,53,53,102,57,52,99,101,101,101,99,55,101,50,49,51,52,48,55,56,48,102,101,52,49,98,100,0,115,101,99,112,50,53,54,107,49,0,48,120,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,69,70,70,70,70,70,67,50,70,0,48,120,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,69,66,65,65,69,68,67,69,54,65,70,52,56,65,48,51,66,66,70,68,50,53,69,56,67,68,48,51,54,52,49,52,49,0,48,120,55,57,66,69,54,54,55,69,70,57,68,67,66,66,65,67,53,53,65,48,54,50,57,53,67,69,56,55,48,66,48,55,48,50,57,66,70,67,68,66,50,68,67,69,50,56,68,57,53,57,70,50,56,49,53,66,49,54,70,56,49,55,57,56,0,48,120,52,56,51,65,68,65,55,55,50,54,65,51,67,52,54,53,53,68,65,52,70,66,70,67,48,69,49,49,48,56,65,56,70,68,49,55,66,52,52,56,65,54,56,53,53,52,49,57,57,67,52,55,68,48,56,70,70,66,49,48,68,52,66,56,0,49,46,51,46,54,46,49,46,52,46,49,46,49,49,53,57,49,46,49,53,46,49,0,49,46,50,46,56,52,48,46,49,48,48,52,53,46,51,46,49,46,49,0,112,114,105,109,101,49,57,50,118,49,0,115,101,99,112,49,57,50,114,49,0,110,105,115,116,112,49,57,50,0,115,101,99,112,50,50,52,114,49,0,49,46,51,46,49,51,50,46,48,46,51,51,0,110,105,115,116,112,50,50,52,0,49,46,50,46,56,52,48,46,49,48,48,52,53,46,51,46,49,46,55,0,112,114,105,109,101,50,53,54,118,49,0,115,101,99,112,50,53,54,114,49,0,110,105,115,116,112,50,53,54,0,115,101,99,112,51,56,52,114,49,0,49,46,51,46,49,51,50,46,48,46,51,52,0,110,105,115,116,112,51,56,52,0,115,101,99,112,53,50,49,114,49,0,49,46,51,46,49,51,50,46,48,46,51,53,0,110,105,115,116,112,53,50,49,0,49,46,51,46,51,54,46,51,46,51,46,50,46,56,46,49,46,49,46,49,0,49,46,51,46,51,54,46,51,46,51,46,50,46,56,46,49,46,49,46,51,0,49,46,51,46,51,54,46,51,46,51,46,50,46,56,46,49,46,49,46,53,0,49,46,51,46,51,54,46,51,46,51,46,50,46,56,46,49,46,49,46,55,0,49,46,51,46,51,54,46,51,46,51,46,50,46,56,46,49,46,49,46,57,0,49,46,51,46,51,54,46,51,46,51,46,50,46,56,46,49,46,49,46,49,49,0,49,46,51,46,51,54,46,51,46,51,46,50,46,56,46,49,46,49,46,49,51,0,49,46,50,46,54,52,51,46,50,46,50,46,51,53,46,48,0,49,46,50,46,54,52,51,46,50,46,50,46,51,53,46,49,0,49,46,50,46,54,52,51,46,50,46,50,46,51,53,46,50,0,49,46,50,46,54,52,51,46,50,46,50,46,51,53,46,51,0,71,79,83,84,50,48,48,49,45,67,114,121,112,116,111,80,114,111,45,88,99,104,65,0,71,79,83,84,50,48,48,49,45,67,114,121,112,116,111,80,114,111,45,88,99,104,66,0,49,46,50,46,54,52,51,46,50,46,50,46,51,54,46,48,0,49,46,50,46,54,52,51,46,50,46,50,46,51,54,46,49,0,49,46,50,46,54,52,51,46,55,46,49,46,50,46,49,46,50,46,49,0,49,46,50,46,54,52,51,46,55,46,49,46,50,46,49,46,50,46,50,0,49,46,51,46,49,51,50,46,48,46,49,48,0,48,120,48,52,0,45,112,97,98,103,110,104,0,98,0,103,0,46,120,0,46,121,0,46,122,0,104,0,100,0,101,99,99,32,103,101,116,32,112,97,114,97,109,58,32,70,97,105,108,101,100,32,116,111,32,103,101,116,32,97,102,102,105,110,101,32,99,111,111,114,100,105,110,97,116,101,115,10,0,40,112,117,98,108,105,99,45,107,101,121,40,101,99,99,40,112,37,109,41,40,97,37,109,41,40,98,37,109,41,40,103,37,109,41,40,110,37,109,41,40,104,37,109,41,41,41,0,103,46,120,0,103,46,121,0,113,46,120,0,113,46,121,0,101,100,100,115,97,95,101,110,99,111,100,101,112,111,105,110,116,58,32,70,97,105,108,101,100,32,116,111,32,103,101,116,32,97,102,102,105,110,101,32,99,111,111,114,100,105,110,97,116,101,115,10,0,48,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,68,0,115,99,97,110,110,105,110,103,32,69,67,67,32,112,97,114,97,109,101,116,101,114,32,102,97,105,108,101,100,58,32,37,115,10,0,50,66,56,51,50,52,56,48,52,70,67,49,68,70,48,66,50,66,52,68,48,48,57,57,51,68,70,66,68,55,65,55,50,70,52,51,49,56,48,54,65,68,50,70,69,52,55,56,67,52,69,69,49,66,50,55,52,65,48,69,65,48,66,48,0,101,99,103,101,110,32,32,32,32,32,32,112,107,0,42,32,101,95,112,107,0,32,32,101,95,112,107,0,32,32,32,32,32,109,0,32,32,32,114,0,32,32,32,101,95,114,0,32,72,40,82,43,41,0,32,32,32,101,95,115,0,87,101,105,101,114,115,116,114,97,115,115,0,69,100,119,97,114,100,115,0,83,116,97,110,100,97,114,100,0,69,100,50,53,53,49,57,0,109,112,105,95,112,114,105,110,116,32,102,97,105,108,101,100,58,32,37,115,10,0,109,112,105,95,115,99,97,110,32,102,97,105,108,101,100,58,32,37,115,10,0,70,73,80,83,45,49,57,56,97,44,32,65,46,49,0,83,97,109,112,108,101,32,35,49,0,79,76,163,213,214,139,167,204,10,18,8,201,198,30,156,93,160,64,60,10,0,105,110,118,97,108,105,100,32,116,101,115,116,115,32,100,97,116,97,0,103,99,114,121,95,109,100,95,115,101,116,107,101,121,32,102,97,105,108,101,100,0,103,99,114,121,95,109,100,95,114,101,97,100,32,102,97,105,108,101,100,0,100,111,101,115,32,110,111,116,32,109,97,116,99,104,0,70,73,80,83,45,49,57,56,97,44,32,65,46,50,0,83,97,109,112,108,101,32,35,50,0,9,34,211,64,95,170,61,25,79,130,164,88,48,115,125,92,198,199,93,36,0,70,73,80,83,45,49,57,56,97,44,32,65,46,51,0,83,97,109,112,108,101,32,35,51,0,188,244,30,171,139,178,216,2,243,208,92,175,124,176,146,236,248,209,163,170,0,70,73,80,83,45,49,57,56,97,44,32,65,46,52,0,83,97,109,112,108,101,32,35,52,0,158,168,134,239,226,104,219,236,206,66,12,117,36,223,50,224,117,26,42,38,0,104,109,97,99,0,100,97,116,97,45,50,56,32,107,101,121,45,52,0,119,104,97,116,32,100,111,32,121,97,32,119,97,110,116,32,102,111,114,32,110,111,116,104,105,110,103,63,0,74,101,102,101,0,100,97,116,97,45,57,32,107,101,121,45,50,48,0,72,105,32,84,104,101,114,101,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,100,97,116,97,45,53,48,32,107,101,121,45,50,48,0,221,221,221,221,221,221,221,221,221,221,221,221,221,221,221,221,221,221,221,221,221,221,221,221,221,221,221,221,221,221,221,221,221,221,221,221,221,221,221,221,221,221,221,221,221,221,221,221,221,221,0,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,0,100,97,116,97,45,53,48,32,107,101,121,45,50,54,0,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,0,100,97,116,97,45,53,52,32,107,101,121,45,49,51,49,0,84,101,115,116,32,85,115,105,110,103,32,76,97,114,103,101,114,32,84,104,97,110,32,66,108,111,99,107,45,83,105,122,101,32,75,101,121,32,45,32,72,97,115,104,32,75,101,121,32,70,105,114,115,116,0,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,0,100,97,116,97,45,49,53,50,32,107,101,121,45,49,51,49,0,84,104,105,115,32,105,115,32,97,32,116,101,115,116,32,117,115,105,110,103,32,97,32,108,97,114,103,101,114,32,116,104,97,110,32,98,108,111,99,107,45,115,105,122,101,32,107,101,121,32,97,110,100,32,97,32,108,97,114,103,101,114,32,116,104,97,110,32,98,108,111,99,107,45,115,105,122,101,32,100,97,116,97,46,32,84,104,101,32,107,101,121,32,110,101,101,100,115,32,116,111,32,98,101,32,104,97,115,104,101,100,32,98,101,102,111,114,101,32,98,101,105,110,103,32,117,115,101,100,32,98,121,32,116,104,101,32,72,77,65,67,32,97,108,103,111,114,105,116,104,109,46,0,95,103,99,114,121,95,104,109,97,99,50,53,54,95,110,101,119,32,102,97,105,108,101,100,0,95,103,99,114,121,95,104,109,97,99,50,53,54,95,102,105,110,97,108,105,122,101,32,102,97,105,108,101,100,0,100,111,101,115,32,110,111,116,32,109,97,116,99,104,32,105,110,32,115,101,99,111,110,100,32,105,109,112,108,101,109,101,110,116,97,116,105,111,110,0,97,108,103,111,114,105,116,104,109,32,110,111,116,32,97,118,97,105,108,97,98,108,101,0,111,105,100,46,0,79,73,68,46,0,109,100,46,99,0,109,100,95,119,114,105,116,101,0,109,100,95,101,110,97,98,108,101,58,32,97,108,103,111,114,105,116,104,109,32,37,100,32,110,111,116,32,97,118,97,105,108,97,98,108,101,10,0,77,68,53,32,117,115,101,100,0,79,111,112,115,58,32,109,100,32,100,101,98,117,103,32,97,108,114,101,97,100,121,32,115,116,97,114,116,101,100,10,0,100,98,103,109,100,45,37,48,53,100,46,37,46,49,48,115,0,119,0,109,100,32,100,101,98,117,103,58,32,99,97,110,39,116,32,111,112,101,110,32,37,115,10,0,109,100,95,103,101,116,95,97,108,103,111,0,112,111,115,115,105,98,108,101,32,117,115,97,103,101,32,101,114,114,111,114,0,87,65,82,78,73,78,71,58,32,109,111,114,101,32,116,104,97,110,32,111,110,101,32,97,108,103,111,114,105,116,104,109,32,105,110,32,109,100,95,103,101,116,95,97,108,103,111,40,41,10,0,109,111,114,101,32,116,104,97,110,32,111,110,101,32,97,108,103,111,114,105,116,104,109,32,105,110,32,109,100,95,114,101,97,100,40,48,41,10,0,109,100,95,114,101,97,100,0,103,99,114,121,95,109,100,95,111,112,101,110,32,102,97,105,108,101,100,32,102,111,114,32,97,108,103,111,32,37,100,58,32,37,115,0,107,101,121,108,101,110,32,60,61,32,104,100,45,62,99,116,120,45,62,109,97,99,112,97,100,115,95,66,115,105,122,101,0,112,114,101,112,97,114,101,95,109,97,99,112,97,100,115,0,110,111,32,65,83,78,46,49,32,79,73,68,32,102,111,114,32,109,100,32,97,108,103,111,32,37,100,10,0,99,97,110,39,116,32,103,101,110,101,114,97,116,101,32,97,32,112,114,105,109,101,32,119,105,116,104,32,108,101,115,115,32,116,104,97,110,32,37,100,32,98,105,116,115,10,0,95,103,99,114,121,95,109,112,105,95,99,109,112,40,32,40,120,41,44,32,40,110,109,105,110,117,115,49,41,32,41,32,60,32,48,32,38,38,32,95,103,99,114,121,95,109,112,105,95,99,109,112,95,117,105,40,32,40,120,41,44,32,40,49,41,32,41,32,62,32,48,0,112,114,105,109,101,103,101,110,46,99,0,105,115,95,112,114,105,109,101,0,112,114,105,109,101,103,101,110,0,111,118,101,114,102,108,111,119,32,105,110,32,112,114,105,109,101,32,103,101,110,101,114,97,116,105,111,110,10,0,112,115,115,0,114,97,119,0,99,111,109,112,0,111,97,101,112,0,112,107,99,115,49,0,112,97,114,97,109,0,110,111,99,111,109,112,0,114,102,99,54,57,55,57,0,110,111,112,97,114,97,109,0,112,107,99,115,49,45,114,97,119,0,105,103,110,105,110,118,102,108,97,103,0,110,111,45,107,101,121,116,101,115,116,0,110,111,45,98,108,105,110,100,105,110,103,0,117,115,101,45,102,105,112,115,49,56,54,0,117,115,101,45,102,105,112,115,49,56,54,45,50,0,110,98,105,116,115,0,114,115,97,45,117,115,101,45,101,0,115,105,103,45,118,97,108,0,104,97,115,104,45,97,108,103,111,0,115,104,97,49,0,109,100,53,0,115,104,97,50,53,54,0,114,105,112,101,109,100,49,54,48,0,114,109,100,49,54,48,0,115,104,97,51,56,52,0,115,104,97,53,49,50,0,115,104,97,50,50,52,0,109,100,50,0,109,100,52,0,116,105,103,101,114,0,104,97,118,97,108,0,108,97,98,101,108,0,114,97,110,100,111,109,45,111,118,101,114,114,105,100,101,0,100,97,116,97,0,104,97,115,104,0,115,97,108,116,45,108,101,110,103,116,104,0,63,0,112,114,105,118,97,116,101,45,107,101,121,0,112,117,98,108,105,99,45,107,101,121,0,103,101,110,107,101,121,0,97,108,103,111,114,105,116,104,109,32,100,105,115,97,98,108,101,100,0,97,108,103,111,114,105,116,104,109,32,110,111,116,32,102,111,117,110,100,0,110,111,32,115,101,108,102,116,101,115,116,32,97,118,97,105,108,97,98,108,101,0,109,111,100,117,108,101,0,65,69,83,0,82,73,74,78,68,65,69,76,0,65,69,83,49,50,56,0,65,69,83,45,49,50,56,0,50,46,49,54,46,56,52,48,46,49,46,49,48,49,46,51,46,52,46,49,46,49,0,50,46,49,54,46,56,52,48,46,49,46,49,48,49,46,51,46,52,46,49,46,50,0,50,46,49,54,46,56,52,48,46,49,46,49,48,49,46,51,46,52,46,49,46,51,0,50,46,49,54,46,56,52,48,46,49,46,49,48,49,46,51,46,52,46,49,46,52,0,232,233,234,235,237,238,239,240,242,243,244,245,247,248,249,250,1,75,175,34,120,166,157,51,29,81,128,16,54,67,233,154,103,67,195,209,81,154,180,242,205,154,120,171,9,165,17,189,65,69,83,45,49,50,56,32,116,101,115,116,32,101,110,99,114,121,112,116,105,111,110,32,102,97,105,108,101,100,46,0,65,69,83,45,49,50,56,32,116,101,115,116,32,100,101,99,114,121,112,116,105,111,110,32,102,97,105,108,101,100,46,0,4,5,6,7,9,10,11,12,14,15,16,17,19,20,21,22,24,25,26,27,29,30,31,32,118,119,116,117,241,242,243,244,248,249,230,231,119,112,113,114,93,30,242,13,206,214,188,188,18,19,26,199,197,71,136,170,65,69,83,45,49,57,50,32,116,101,115,116,32,101,110,99,114,121,112,116,105,111,110,32,102,97,105,108,101,100,46,0,65,69,83,45,49,57,50,32,116,101,115,116,32,100,101,99,114,121,112,116,105,111,110,32,102,97,105,108,101,100,46,0,8,9,10,11,13,14,15,16,18,19,20,21,23,24,25,26,28,29,30,31,33,34,35,36,38,39,40,41,43,44,45,46,6,154,0,127,199,106,69,159,152,186,249,23,254,223,149,33,8,14,149,23,235,22,119,113,154,207,114,128,134,4,10,227,65,69,83,45,50,53,54,32,116,101,115,116,32,101,110,99,114,121,112,116,105,111,110,32,102,97,105,108,101,100,46,0,65,69,83,45,50,53,54,32,116,101,115,116,32,100,101,99,114,121,112,116,105,111,110,32,102,97,105,108,101,100,46,0,99,102,98,0,110,111,32,116,101,115,116,32,100,97,116,97,32,102,111,114,32,116,104,105,115,32,109,111,100,101,0,111,112,101,110,0,115,101,116,32,107,101,121,0,115,101,116,32,73,86,0,101,110,99,114,121,112,116,32,99,111,109,109,97,110,100,0,101,110,99,114,121,112,116,32,109,105,115,109,97,116,99,104,0,100,101,99,114,121,112,116,32,99,111,109,109,97,110,100,0,100,101,99,114,121,112,116,32,109,105,115,109,97,116,99,104,0,111,102,98,0,99,105,112,104,101,114,0,65,69,83,49,57,50,0,82,73,74,78,68,65,69,76,49,57,50,0,65,69,83,45,49,57,50,0,50,46,49,54,46,56,52,48,46,49,46,49,48,49,46,51,46,52,46,49,46,50,49,0,50,46,49,54,46,56,52,48,46,49,46,49,48,49,46,51,46,52,46,49,46,50,50,0,50,46,49,54,46,56,52,48,46,49,46,49,48,49,46,51,46,52,46,49,46,50,51,0,50,46,49,54,46,56,52,48,46,49,46,49,48,49,46,51,46,52,46,49,46,50,52,0,65,69,83,50,53,54,0,82,73,74,78,68,65,69,76,50,53,54,0,65,69,83,45,50,53,54,0,50,46,49,54,46,56,52,48,46,49,46,49,48,49,46,51,46,52,46,49,46,52,49,0,50,46,49,54,46,56,52,48,46,49,46,49,48,49,46,51,46,52,46,49,46,52,50,0,50,46,49,54,46,56,52,48,46,49,46,49,48,49,46,51,46,52,46,49,46,52,51,0,50,46,49,54,46,56,52,48,46,49,46,49,48,49,46,51,46,52,46,49,46,52,52,0,82,73,80,69,77,68,49,54,48,0,48,33,48,9,6,5,43,36,3,2,1,5,0,4,20,49,46,51,46,51,54,46,51,46,51,46,49,46,50,0,49,46,51,46,51,54,46,51,46,50,46,49,0,105,32,62,32,48,0,114,115,97,45,99,111,109,109,111,110,46,99,0,95,103,99,114,121,95,114,115,97,95,112,107,99,115,49,95,101,110,99,111,100,101,95,102,111,114,95,101,110,99,0,110,32,61,61,32,110,102,114,97,109,101,0,80,75,67,83,35,49,32,98,108,111,99,107,32,116,121,112,101,32,50,32,101,110,99,111,100,101,100,32,100,97,116,97,0,118,97,108,117,101,32,101,120,116,114,97,99,116,101,100,32,102,114,111,109,32,80,75,67,83,35,49,32,98,108,111,99,107,32,116,121,112,101,32,50,32,101,110,99,111,100,101,100,32,100,97,116,97,0,105,32,62,32,49,0,95,103,99,114,121,95,114,115,97,95,112,107,99,115,49,95,101,110,99,111,100,101,95,102,111,114,95,115,105,103,0,80,75,67,83,35,49,32,98,108,111,99,107,32,116,121,112,101,32,49,32,101,110,99,111,100,101,100,32,100,97,116,97,0,95,103,99,114,121,95,114,115,97,95,112,107,99,115,49,95,101,110,99,111,100,101,95,114,97,119,95,102,111,114,95,115,105,103,0,79,65,69,80,32,101,110,99,111,100,101,100,32,100,97,116,97,0,118,97,108,117,101,32,101,120,116,114,97,99,116,101,100,32,102,114,111,109,32,79,65,69,80,32,101,110,99,111,100,101,100,32,100,97,116,97,0,104,108,101,110,0,95,103,99,114,121,95,114,115,97,95,112,115,115,95,101,110,99,111,100,101,0,80,83,83,32,101,110,99,111,100,101,100,32,100,97,116,97,0,95,103,99,114,121,95,114,115,97,95,112,115,115,95,118,101,114,105,102,121,0,82,83,65,0,114,115,97,0,111,112,101,110,112,103,112,45,114,115,97,0,111,105,100,46,49,46,50,46,56,52,48,46,49,49,51,53,52,57,46,49,46,49,46,49,0,110,101,0,110,101,100,112,113,117,0,97,0,115,0,110,0,100,101,114,105,118,101,45,112,97,114,109,115,0,117,115,101,45,120,57,51,49,0,95,103,99,114,121,95,109,112,105,95,103,101,116,95,110,98,105,116,115,32,40,40,120,112,41,41,32,61,61,32,110,98,105,116,115,0,114,115,97,46,99,0,103,101,110,95,120,57,51,49,95,112,97,114,109,95,120,112,0,95,103,99,114,121,95,109,112,105,95,103,101,116,95,110,98,105,116,115,32,40,40,120,105,41,41,32,61,61,32,49,48,49,0,103,101,110,95,120,57,51,49,95,112,97,114,109,95,120,105,0,88,112,49,0,88,112,50,0,88,112,0,88,113,49,0,88,113,50,0,88,113,0,95,103,99,114,121,95,109,112,105,95,103,99,100,32,40,32,40,103,41,44,32,40,101,41,44,32,40,112,104,105,41,32,41,0,103,101,110,101,114,97,116,101,95,120,57,51,49,0,112,32,97,110,100,32,113,32,97,114,101,32,115,119,97,112,112,101,100,10,0,32,32,113,0,32,32,110,0,32,32,101,0,32,32,100,0,32,32,117,0,115,101,108,102,45,116,101,115,116,32,97,102,116,101,114,32,107,101,121,32,103,101,110,101,114,97,116,105,111,110,32,102,97,105,108,101,100,0,40,109,105,115,99,45,107,101,121,45,105,110,102,111,40,112,45,113,45,115,119,97,112,112,101,100,41,41,0,103,101,110,101,114,97,116,101,95,115,116,100,0,32,32,112,61,32,0,32,32,113,61,32,0,112,104,105,61,32,0,32,32,103,61,32,0,32,32,102,61,32,0,32,32,110,61,32,0,32,32,101,61,32,0,32,32,100,61,32,0,32,32,117,61,32,0,40,107,101,121,45,100,97,116,97,32,40,112,117,98,108,105,99,45,107,101,121,32,32,40,114,115,97,40,110,37,109,41,40,101,37,109,41,41,41,32,40,112,114,105,118,97,116,101,45,107,101,121,32,32,40,114,115,97,40,110,37,109,41,40,101,37,109,41,40,100,37,109,41,40,112,37,109,41,40,113,37,109,41,40,117,37,109,41,41,41,32,37,83,41,0,114,115,97,95,116,101,115,116,107,101,121,32,32,32,32,61,62,32,37,115,10,0,114,115,97,95,101,110,99,114,121,112,116,32,100,97,116,97,0,114,115,97,95,101,110,99,114,121,112,116,32,32,32,32,110,0,114,115,97,95,101,110,99,114,121,112,116,32,32,32,32,101,0,114,115,97,95,101,110,99,114,121,112,116,32,32,114,101,115,0,40,101,110,99,45,118,97,108,40,114,115,97,40,97,37,98,41,41,41,0,40,101,110,99,45,118,97,108,40,114,115,97,40,97,37,109,41,41,41,0,114,115,97,95,101,110,99,114,121,112,116,32,32,32,32,61,62,32,37,115,10,0,114,115,97,95,100,101,99,114,121,112,116,32,100,97,116,97,0,110,101,100,112,63,113,63,117,63,0,114,115,97,95,100,101,99,114,121,112,116,32,32,32,32,110,0,114,115,97,95,100,101,99,114,121,112,116,32,32,32,32,101,0,114,115,97,95,100,101,99,114,121,112,116,32,32,32,32,100,0,114,115,97,95,100,101,99,114,121,112,116,32,32,32,32,112,0,114,115,97,95,100,101,99,114,121,112,116,32,32,32,32,113,0,114,115,97,95,100,101,99,114,121,112,116,32,32,32,32,117,0,114,115,97,95,100,101,99,114,121,112,116,32,32,114,101,115,0,40,118,97,108,117,101,32,37,98,41,0,37,109,0,114,115,97,95,100,101,99,114,121,112,116,32,32,32,32,61,62,32,37,115,10,0,114,115,97,95,115,105,103,110,32,32,32,100,97,116,97,0,114,115,97,95,115,105,103,110,32,32,32,32,32,32,110,0,114,115,97,95,115,105,103,110,32,32,32,32,32,32,101,0,114,115,97,95,115,105,103,110,32,32,32,32,32,32,100,0,114,115,97,95,115,105,103,110,32,32,32,32,32,32,112,0,114,115,97,95,115,105,103,110,32,32,32,32,32,32,113,0,114,115,97,95,115,105,103,110,32,32,32,32,32,32,117,0,114,115,97,95,115,105,103,110,32,32,32,32,114,101,115,0,40,115,105,103,45,118,97,108,40,114,115,97,40,115,37,98,41,41,41,0,40,115,105,103,45,118,97,108,40,114,115,97,40,115,37,77,41,41,41,0,114,115,97,95,115,105,103,110,32,32,32,32,32,32,61,62,32,37,115,10,0,114,115,97,95,118,101,114,105,102,121,32,100,97,116,97,0,114,115,97,95,118,101,114,105,102,121,32,32,115,105,103,0,114,115,97,95,118,101,114,105,102,121,32,32,32,32,110,0,114,115,97,95,118,101,114,105,102,121,32,32,32,32,101,0,114,115,97,95,118,101,114,105,102,121,32,32,99,109,112,0,114,115,97,95,118,101,114,105,102,121,32,32,32,32,61,62,32,37,115,10,0,99,111,110,118,101,114,116,0,40,112,114,105,118,97,116,101,45,107,101,121,32,40,114,115,97,32,32,40,110,32,35,48,48,101,48,99,101,57,54,102,57,48,98,54,99,57,101,48,50,102,51,57,50,50,98,101,97,100,97,57,51,102,101,53,48,97,56,55,53,101,97,99,54,98,99,99,49,56,98,98,57,97,57,99,102,50,101,56,52,57,54,53,99,97,97,32,32,32,32,32,32,50,100,49,102,102,57,53,97,55,102,53,52,50,52,54,53,99,54,99,48,99,49,57,100,50,55,54,101,52,53,50,54,99,101,48,52,56,56,54,56,97,55,97,57,49,52,102,100,51,52,51,99,99,51,97,56,55,100,100,55,52,50,57,49,32,32,32,32,32,32,102,102,99,53,54,53,53,48,54,100,53,98,98,98,50,53,99,98,97,99,54,97,48,101,50,100,100,49,102,56,98,99,97,97,98,48,100,52,97,50,57,99,50,102,51,55,99,57,53,48,102,51,54,51,52,56,52,98,102,50,54,57,102,55,32,32,32,32,32,32,56,57,49,52,52,48,52,54,52,98,97,102,55,57,56,50,55,101,48,51,97,51,54,101,55,48,98,56,49,52,57,51,56,101,101,98,100,99,54,51,101,57,54,52,50,52,55,98,101,55,53,100,99,53,56,98,48,49,52,98,55,101,97,50,53,49,35,41,32,32,40,101,32,35,48,49,48,48,48,49,35,41,32,32,40,100,32,35,48,52,54,49,50,57,102,50,52,56,57,100,55,49,53,55,57,98,101,48,97,55,53,102,101,48,50,57,98,100,54,99,100,98,53,55,52,101,98,102,53,55,101,97,56,97,53,98,48,102,100,97,57,52,50,99,97,98,57,52,51,98,49,49,32,32,32,32,32,32,55,100,55,98,98,57,53,101,53,100,50,56,56,55,53,101,48,102,57,102,99,53,102,99,99,48,54,97,55,50,102,54,100,53,48,50,52,54,52,100,97,98,100,101,100,55,56,101,102,54,98,55,49,54,49,55,55,98,56,51,100,53,98,100,32,32,32,32,32,32,99,53,52,51,100,99,53,100,51,102,101,100,57,51,50,101,53,57,102,53,56,57,55,101,57,50,101],"i8",ALLOC_NONE,Runtime.GLOBAL_BASE+30720);allocate([54,102,53,56,97,48,102,51,51,52,50,52,49,48,54,97,51,98,54,102,97,50,99,98,102,56,55,55,53,49,48,101,52,97,99,50,49,32,32,32,32,32,32,99,51,101,101,52,55,56,53,49,101,57,55,100,49,50,57,57,54,50,50,50,97,99,51,53,54,54,100,52,99,99,98,48,98,56,51,100,49,54,52,48,55,52,97,98,102,55,100,101,54,53,53,102,99,50,52,52,54,100,97,49,55,56,49,35,41,32,32,40,112,32,35,48,48,101,56,54,49,98,55,48,48,101,49,55,101,56,97,102,101,54,56,51,55,101,55,53,49,50,101,51,53,98,54,99,97,49,49,100,48,97,101,52,55,100,56,98,56,53,49,54,49,99,54,55,98,97,102,54,52,51,55,55,50,49,51,32,32,32,32,32,32,102,101,53,50,100,55,55,50,102,50,48,51,53,98,51,99,97,56,51,48,97,102,52,49,100,56,97,52,49,50,48,101,49,99,49,99,55,48,100,49,50,99,99,50,50,102,48,48,100,50,56,100,51,49,100,100,52,56,97,56,100,52,50,52,102,49,35,41,32,32,40,113,32,35,48,48,102,55,97,55,99,97,53,51,54,55,99,54,54,49,102,56,101,54,50,100,102,51,52,102,48,100,48,53,99,49,48,99,56,56,101,53,52,57,50,51,52,56,100,100,55,98,100,100,99,57,52,50,99,57,97,56,102,51,54,57,102,57,32,32,32,32,32,32,51,53,97,48,55,55,56,53,100,50,100,98,56,48,53,50,49,53,101,100,55,56,54,101,52,50,56,53,100,102,49,54,53,56,101,101,100,51,99,101,56,52,102,52,54,57,98,56,49,98,53,48,100,51,53,56,52,48,55,98,52,97,100,51,54,49,35,41,32,32,40,117,32,35,51,48,52,53,53,57,97,57,101,97,100,53,54,100,50,51,48,57,100,50,48,51,56,49,49,97,54,52,49,98,98,49,97,48,57,54,50,54,98,99,56,101,98,51,54,102,102,102,97,50,51,99,57,54,56,101,99,53,98,100,56,57,49,101,32,32,32,32,32,32,101,98,98,97,102,99,55,51,97,101,54,54,54,101,48,49,98,97,55,99,56,57,57,48,98,97,101,48,54,99,99,50,98,98,101,49,48,98,55,53,101,54,57,102,99,97,99,98,51,53,51,97,54,52,55,51,48,55,57,100,56,101,57,98,35,41,41,41,0,40,112,117,98,108,105,99,45,107,101,121,32,40,114,115,97,32,32,40,110,32,35,48,48,101,48,99,101,57,54,102,57,48,98,54,99,57,101,48,50,102,51,57,50,50,98,101,97,100,97,57,51,102,101,53,48,97,56,55,53,101,97,99,54,98,99,99,49,56,98,98,57,97,57,99,102,50,101,56,52,57,54,53,99,97,97,32,32,32,32,32,32,50,100,49,102,102,57,53,97,55,102,53,52,50,52,54,53,99,54,99,48,99,49,57,100,50,55,54,101,52,53,50,54,99,101,48,52,56,56,54,56,97,55,97,57,49,52,102,100,51,52,51,99,99,51,97,56,55,100,100,55,52,50,57,49,32,32,32,32,32,32,102,102,99,53,54,53,53,48,54,100,53,98,98,98,50,53,99,98,97,99,54,97,48,101,50,100,100,49,102,56,98,99,97,97,98,48,100,52,97,50,57,99,50,102,51,55,99,57,53,48,102,51,54,51,52,56,52,98,102,50,54,57,102,55,32,32,32,32,32,32,56,57,49,52,52,48,52,54,52,98,97,102,55,57,56,50,55,101,48,51,97,51,54,101,55,48,98,56,49,52,57,51,56,101,101,98,100,99,54,51,101,57,54,52,50,52,55,98,101,55,53,100,99,53,56,98,48,49,52,98,55,101,97,50,53,49,35,41,32,32,40,101,32,35,48,49,48,48,48,49,35,41,41,41,0,107,101,121,32,99,111,110,115,105,115,116,101,110,99,121,0,115,105,103,110,0,40,100,97,116,97,32,40,102,108,97,103,115,32,112,107,99,115,49,41,32,40,104,97,115,104,32,115,104,97,49,32,35,49,49,50,50,51,51,52,52,53,53,54,54,55,55,56,56,57,57,48,48,97,97,98,98,99,99,100,100,101,101,102,102,49,48,50,48,51,48,52,48,35,41,41,0,40,100,97,116,97,32,40,102,108,97,103,115,32,112,107,99,115,49,41,32,40,104,97,115,104,32,115,104,97,49,32,35,49,49,50,50,51,51,52,52,53,53,54,54,55,55,56,56,57,57,48,48,97,97,98,98,99,99,100,100,101,101,102,102,56,48,50,48,51,48,52,48,35,41,41,0,99,111,110,118,101,114,116,105,110,103,32,100,97,116,97,32,102,97,105,108,101,100,0,115,105,103,110,105,110,103,32,102,97,105,108,101,100,0,118,101,114,105,102,121,32,102,97,105,108,101,100,0,98,97,100,32,115,105,103,110,97,116,117,114,101,32,110,111,116,32,100,101,116,101,99,116,101,100,0,101,110,99,114,121,112,116,0,40,100,97,116,97,32,40,102,108,97,103,115,32,114,97,119,41,32,40,118,97,108,117,101,32,37,109,41,41,0,101,110,99,114,121,112,116,32,102,97,105,108,101,100,0,101,110,99,45,118,97,108,0,103,99,114,121,95,112,107,95,100,101,99,114,121,112,116,32,114,101,116,117,114,110,101,100,32,103,97,114,98,97,103,101,0,99,105,112,104,101,114,116,101,120,116,32,109,97,116,99,104,101,115,32,112,108,97,105,110,116,101,120,116,0,100,101,99,114,121,112,116,32,102,97,105,108,101,100,0,118,97,108,117,101,0,100,101,99,114,121,112,116,32,114,101,116,117,114,110,101,100,32,110,111,32,112,108,97,105,110,116,101,120,116,0,109,105,115,109,97,116,99,104,0,83,72,65,49,0,48,33,48,9,6,5,43,14,3,2,26,5,0,4,20,49,46,50,46,56,52,48,46,49,49,51,53,52,57,46,49,46,49,46,53,0,49,46,50,46,56,52,48,46,49,48,48,52,48,46,52,46,51,0,49,46,51,46,49,52,46,51,46,50,46,50,54,0,49,46,51,46,49,52,46,51,46,50,46,50,57,0,49,46,50,46,56,52,48,46,49,48,48,52,53,46,52,46,49,0,169,153,62,54,71,6,129,106,186,62,37,113,120,80,194,108,156,208,216,157,0,132,152,62,68,28,59,210,110,186,174,74,161,249,81,41,229,229,70,112,241,0,52,170,151,60,212,196,218,164,246,30,235,43,219,173,39,49,101,52,1,111,0,83,72,65,50,50,52,0,48,45,48,13,6,9,96,134,72,1,101,3,4,2,4,5,0,4,28,50,46,49,54,46,56,52,48,46,49,46,49,48,49,46,51,46,52,46,50,46,52,0,35,9,125,34,52,5,216,34,134,66,164,119,189,162,85,179,42,173,188,228,189,160,179,247,227,108,157,167,0,97,98,99,100,98,99,100,101,99,100,101,102,100,101,102,103,101,102,103,104,102,103,104,105,103,104,105,106,104,105,106,107,105,106,107,108,106,107,108,109,107,108,109,110,108,109,110,111,109,110,111,112,110,111,112,113,0,117,56,139,22,81,39,118,204,93,186,93,161,253,137,1,80,176,198,69,92,180,245,139,25,82,82,37,37,0,32,121,70,85,152,12,145,216,187,180,193,234,151,97,138,75,240,63,66,88,25,72,178,238,78,231,173,103,0,186,120,22,191,143,1,207,234,65,65,64,222,93,174,34,35,176,3,97,163,150,23,122,156,180,16,255,97,242,0,21,173,0,36,141,106,97,210,6,56,184,229,192,38,147,12,62,96,57,163,60,228,89,100,255,33,103,246,236,237,212,25,219,6,193,0,205,199,110,92,153,20,251,146,129,161,199,226,132,215,62,103,241,128,154,72,164,151,32,14,4,109,57,204,199,17,44,208,0,83,72,65,50,53,54,0,48,49,48,13,6,9,96,134,72,1,101,3,4,2,1,5,0,4,32,50,46,49,54,46,56,52,48,46,49,46,49,48,49,46,51,46,52,46,50,46,49,0,49,46,50,46,56,52,48,46,49,49,51,53,52,57,46,49,46,49,46,49,49,0,83,72,65,53,49,50,0,48,81,48,13,6,9,96,134,72,1,101,3,4,2,3,5,0,4,64,50,46,49,54,46,56,52,48,46,49,46,49,48,49,46,51,46,52,46,50,46,51,0,49,46,50,46,56,52,48,46,49,49,51,53,52,57,46,49,46,49,46,49,51,0,115,104,111,114,116,32,115,116,114,105,110,103,0,97,98,99,0,203,0,117,63,69,163,94,139,181,160,61,105,154,198,80,7,39,44,50,171,14,222,209,99,26,139,96,90,67,255,91,237,128,134,7,43,161,231,204,35,88,186,236,161,52,200,37,167,0,108,111,110,103,32,115,116,114,105,110,103,0,97,98,99,100,101,102,103,104,98,99,100,101,102,103,104,105,99,100,101,102,103,104,105,106,100,101,102,103,104,105,106,107,101,102,103,104,105,106,107,108,102,103,104,105,106,107,108,109,103,104,105,106,107,108,109,110,104,105,106,107,108,109,110,111,105,106,107,108,109,110,111,112,106,107,108,109,110,111,112,113,107,108,109,110,111,112,113,114,108,109,110,111,112,113,114,115,109,110,111,112,113,114,115,116,110,111,112,113,114,115,116,117,0,9,51,12,51,247,17,71,232,61,25,47,199,130,205,27,71,83,17,27,23,59,59,5,210,47,160,128,134,227,176,247,18,252,199,199,26,85,126,45,185,102,195,233,250,145,116,96,57,0,111,110,101,32,109,105,108,108,105,111,110,32,34,97,34,0,157,14,24,9,113,100,116,203,8,110,131,78,49,10,74,28,237,20,158,156,0,242,72,82,121,114,206,197,112,76,42,91,7,184,179,220,56,236,196,235,174,151,221,216,127,61,137,133,0,100,105,103,101,115,116,0,221,175,53,161,147,97,122,186,204,65,115,73,174,32,65,49,18,230,250,78,137,169,126,162,10,158,238,230,75,85,211,154,33,146,153,42,39,79,193,168,54,186,60,35,163,254,235,189,69,77,68,35,100,60,232,14,42,154,201,79,165,76,164,159,0,142,149,155,117,218,227,19,218,140,244,247,40,20,252,20,63,143,119,121,198,235,159,127,161,114,153,174,173,182,136,144,24,80,29,40,158,73,0,247,228,51,27,153,222,196,181,67,58,199,211,41,238,182,221,38,84,94,150,229,91,135,75,233,9,0,231,24,72,61,12,231,105,100,78,46,66,199,188,21,180,99,142,31,152,177,59,32,68,40,86,50,168,3,175,169,115,235,222,15,242,68,135,126,166,10,76,176,67,44,229,119,195,27,235,0,156,92,44,73,170,46,78,173,178,23,173,140,192,155,0,83,72,65,51,56,52,0,48,65,48,13,6,9,96,134,72,1,101,3,4,2,2,5,0,4,48,50,46,49,54,46,56,52,48,46,49,46,49,48,49,46,51,46,52,46,50,46,50,0,49,46,50,46,56,52,48,46,49,49,51,53,52,57,46,49,46,49,46,49,50,0,84,87,79,70,73,83,72,0,159,88,159,92,246,18,44,50,182,191,236,47,42,232,195,90,212,145,219,22,231,177,195,158,134,203,8,107,120,159,84,25,1,159,152,9,222,23,17,133,143,170,195,163,186,32,251,195,84,119,111,102,105,115,104,45,49,50,56,32,116,101,115,116,32,101,110,99,114,121,112,116,105,111,110,32,102,97,105,108,101,100,46,0,84,119,111,102,105,115,104,45,49,50,56,32,116,101,115,116,32,100,101,99,114,121,112,116,105,111,110,32,102,97,105,108,101,100,46,0,212,59,183,85,110,163,46,70,242,162,130,183,212,91,78,13,87,255,115,157,77,201,44,27,215,252,1,112,12,200,33,111,144,175,233,27,178,136,84,79,44,50,220,35,155,38,53,230,108,180,86,28,64,191,10,151,5,147,28,182,212,8,231,250,84,119,111,102,105,115,104,45,50,53,54,32,116,101,115,116,32,101,110,99,114,121,112,116,105,111,110,32,102,97,105,108,101,100,46,0,84,119,111,102,105,115,104,45,50,53,54,32,116,101,115,116,32,100,101,99,114,121,112,116,105,111,110,32,102,97,105,108,101,100,46,0,37,115,10,0,0,1,23,2,46,24,83,3,106,47,147,25,52,84,69,4,92,107,182,48,166,148,75,26,140,53,129,85,170,70,13,5,36,93,135,108,155,183,193,49,43,167,163,149,152,76,202,27,230,141,115,54,205,130,18,86,98,171,240,71,79,14,189,6,212,37,210,94,39,136,102,109,214,156,121,184,8,194,223,50,104,44,253,168,138,164,90,150,41,153,34,77,96,203,228,28,123,231,59,142,158,116,244,55,216,206,249,131,111,19,178,87,225,99,220,172,196,241,175,72,10,80,66,15,186,190,199,7,222,213,120,38,101,211,209,95,227,40,33,137,89,103,252,110,177,215,248,157,243,122,58,185,198,9,65,195,174,224,219,51,68,105,146,45,82,254,22,169,12,139,128,165,74,91,181,151,201,42,162,154,192,35,134,78,188,97,239,204,17,229,114,29,61,124,235,232,233,60,234,143,125,159,236,117,30,245,62,56,246,217,63,207,118,250,31,132,160,112,237,20,144,179,126,88,251,226,32,100,208,221,119,173,218,197,64,242,57,176,247,73,180,11,127,81,21,67,145,16,113,187,238,191,133,200,161,1,2,4,8,16,32,64,128,77,154,121,242,169,31,62,124,248,189,55,110,220,245,167,3,6,12,24,48,96,192,205,215,227,139,91,182,33,66,132,69,138,89,178,41,82,164,5,10,20,40,80,160,13,26,52,104,208,237,151,99,198,193,207,211,235,155,123,246,161,15,30,60,120,240,173,23,46,92,184,61,122,244,165,7,14,28,56,112,224,141,87,174,17,34,68,136,93,186,57,114,228,133,71,142,81,162,9,18,36,72,144,109,218,249,191,51,102,204,213,231,131,75,150,97,194,201,223,243,171,27,54,108,216,253,183,35,70,140,85,170,25,50,100,200,221,247,163,11,22,44,88,176,45,90,180,37,74,148,101,202,217,255,179,43,86,172,21,42,84,168,29,58,116,232,157,119,238,145,111,222,241,175,19,38,76,152,125,250,185,63,126,252,181,39,78,156,117,234,153,127,254,177,47,94,188,53,106,212,229,135,67,134,65,130,73,146,105,210,233,159,115,230,129,79,158,113,226,137,95,190,49,98,196,197,199,195,203,219,251,187,59,118,236,149,103,206,209,239,147,107,214,225,143,83,166,1,2,4,8,16,32,64,128,77,154,121,242,169,31,62,124,248,189,55,110,220,245,167,3,6,12,24,48,96,192,205,215,227,139,91,182,33,66,132,69,138,89,178,41,82,164,5,10,20,40,80,160,13,26,52,104,208,237,151,99,198,193,207,211,235,155,123,246,161,15,30,60,120,240,173,23,46,92,184,61,122,244,165,7,14,28,56,112,224,141,87,174,17,34,68,136,93,186,57,114,228,133,71,142,81,162,9,18,36,72,144,109,218,249,191,51,102,204,213,231,131,75,150,97,194,201,223,243,171,27,54,108,216,253,183,35,70,140,85,170,25,50,100,200,221,247,163,11,22,44,88,176,45,90,180,37,74,148,101,202,217,255,179,43,86,172,21,42,84,168,29,58,116,232,157,119,238,145,111,222,241,175,19,38,76,152,125,250,185,63,126,252,181,39,78,156,117,234,153,127,254,177,47,94,188,53,106,212,229,135,67,134,65,130,73,146,105,210,233,159,115,230,129,79,158,113,226,137,95,190,49,98,196,197,199,195,203,169,117,103,243,179,198,232,244,4,219,253,123,163,251,118,200,154,74,146,211,128,230,120,107,228,69,221,125,209,232,56,75,13,214,198,50,53,216,152,253,24,55,247,113,236,241,108,225,67,48,117,15,55,248,38,27,250,135,19,250,148,6,72,63,242,94,208,186,139,174,48,91,132,138,84,0,223,188,35,157,25,109,91,193,61,177,89,14,243,128,174,93,162,210,130,213,99,160,1,132,131,7,46,20,217,181,81,144,155,44,124,163,166,178,235,115,165,76,190,84,22,146,12,116,227,54,97,81,192,56,140,176,58,189,245,90,115,252,44,96,37,98,11,150,187,108,78,66,137,247,107,16,83,124,106,40,180,39,241,140,225,19,230,149,189,156,69,199,226,36,244,70,182,59,102,112,204,202,149,227,3,133,86,203,212,17,28,208,30,147,215,184,251,166,195,131,142,32,181,255,233,159,207,119,191,195,186,204,234,3,119,111,57,8,175,191,51,64,201,231,98,43,113,226,129,121,121,12,9,170,173,130,36,65,205,58,249,234,216,185,229,228,197,154,185,164,77,151,68,126,8,218,134,122,231,23,161,102,29,148,170,161,237,29,6,61,112,240,178,222,210,179,65,11,123,114,160,167,17,28,49,239,194,209,39,83,144,62,32,143,246,51,96,38,255,95,150,236,92,118,177,42,171,73,158,129,156,136,82,238,27,33,95,196,147,26,10,235,239,217,145,197,133,57,73,153,238,205,45,173,79,49,143,139,59,1,71,24,135,35,109,221,70,31,214,78,62,45,105,249,100,72,42,79,206,242,203,101,47,142,252,120,151,92,5,88,122,25,172,141,127,229,213,152,26,87,75,103,14,127,167,5,90,100,40,175,20,99,63,182,41,254,136,245,60,183,76,60,2,165,184,206,218,233,176,104,23,68,85,224,31,77,138,67,125,105,87,41,199,46,141,172,116,21,183,89,196,168,159,10,114,158,126,110,21,71,34,223,18,52,88,53,7,106,153,207,52,220,110,34,80,201,222,192,104,155,101,137,188,212,219,237,248,171,200,18,168,162,43,13,64,82,220,187,254,2,50,47,164,169,202,215,16,97,33,30,240,180,211,80,93,4,15,246,0,194,111,22,157,37,54,134,66,86,74,85,94,9,193,190,224,145,117,243,198,244,219,123,251,200,74,211,230,107,69,125,232,75,214,50,216,253,55,113,241,225,48,15,248,27,135,250,6,63,94,186,174,91,138,0,188,157,109,193,177,14,128,93,210,213,160,132,7,20,181,144,44,163,178,115,76,84,146,116,54,81,56,176,189,90,252,96,98,150,108,66,247,16,124,40,39,140,19,149,156,199,36,70,59,112,202,227,133,203,17,208,147,184,166,131,32,255,159,119,195,204,3,111,8,191,64,231,43,226,121,12,170,130,65,58,234,185,228,154,164,151,126,218,122,23,102,148,161,29,61,240,222,179,11,114,167,28,239,209,83,62,143,51,38,95,236,118,42,73,129,136,238,33,196,26,235,217,197,57,153,205,173,49,139,1,24,35,221,31,78,45,249,72,79,242,101,142,120,92,88,25,141,229,152,87,103,127,5,100,175,99,182,254,245,183,60,165,206,233,104,68,224,77,67,105,41,46,172,21,89,168,10,158,110,71,223,52,53,106,207,220,34,201,192,155,137,212,237,171,18,162,13,82,187,2,47,169,215,97,30,180,80,4,246,194,22,37,134,86,85,9,190,145,169,103,179,232,4,253,163,118,154,146,128,120,228,221,209,56,13,198,53,152,24,247,236,108,67,117,55,38,250,19,148,72,242,208,139,48,132,84,223,35,25,91,61,89,243,174,162,130,99,1,131,46,217,81,155,124,166,235,165,190,22,12,227,97,192,140,58,245,115,44,37,11,187,78,137,107,83,106,180,241,225,230,189,69,226,244,182,102,204,149,3,86,212,28,30,215,251,195,142,181,233,207,191,186,234,119,57,175,51,201,98,113,129,121,9,173,36,205,249,216,229,197,185,77,68,8,134,231,161,29,170,237,6,112,178,210,65,123,160,17,49,194,39,144,32,246,96,255,150,92,177,171,158,156,82,27,95,147,10,239,145,133,73,238,45,79,143,59,71,135,109,70,214,62,105,100,42,206,203,47,252,151,5,122,172,127,213,26,75,14,167,90,40,20,63,41,136,60,76,2,184,218,176,23,85,31,138,125,87,199,141,116,183,196,159,114,126,21,34,18,88,7,153,52,110,80,222,104,101,188,219,248,200,168,43,64,220,254,50,164,202,16,33,240,211,93,15,0,111,157,54,66,74,94,193,224,84,87,79,70,73,83,72,49,50,56,0,102,97,105,108,101,100,32,116,111,32,97,99,113,117,105,114,101,32,116,104,101,32,110,111,110,99,101,32,98,117,102,102,101,114,32,108,111,99,107,58,32,37,115,10,0,102,97,105,108,101,100,32,116,111,32,114,101,108,101,97,115,101,32,116,104,101,32,110,111,110,99,101,32,98,117,102,102,101,114,32,108,111,99,107,58,32,37,115,10,0,37,115,46,42,0,37,115,46,88,0,101,99,95,105,110,118,109,58,32,105,110,118,101,114,115,101,32,100,111,101,115,32,110,111,116,32,101,120,105,115,116,58,10,0,32,32,97,0,32,32,112,0,37,115,58,32,71,101,116,116,105,110,103,32,89,45,99,111,111,114,100,105,110,97,116,101,32,111,110,32,37,115,32,105,115,32,110,111,116,32,115,117,112,112,111,114,116,101,100,10,0,95,103,99,114,121,95,109,112,105,95,101,99,95,103,101,116,95,97,102,102,105,110,101,0,77,111,110,116,103,111,109,101,114,121,0,71,67,82,89,80,84,95,66,65,82,82,69,84,84,0,37,115,58,32,37,115,32,110,111,116,32,121,101,116,32,115,117,112,112,111,114,116,101,100,10,0,95,103,99,114,121,95,109,112,105,95,101,99,95,100,117,112,95,112,111,105,110,116,0,95,103,99,114,121,95,109,112,105,95,101,99,95,97,100,100,95,112,111,105,110,116,115,0,0,1,2,2,3,3,3,3,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,33,98,112,95,109,97,114,107,101,114,0,109,112,105,45,112,111,119,46,99,0,95,103,99,114,121,95,109,112,105,95,112,111,119,109,0,114,101,115,45,62,100,32,61,61,32,114,112,0,105,32,61,61,32,110,108,105,109,98,115,0,109,112,105,99,111,100,101,114,46,99,0,95,103,99,114,121,95,109,112,105,95,115,101,116,95,98,117,102,102,101,114,0,58,103,101,110,101,114,105,99,47,109,112,105,104,45,97,100,100,49,46,99,58,103,101,110,101,114,105,99,47,109,112,105,104,45,115,117,98,49,46,99,58,103,101,110,101,114,105,99,47,109,112,105,104,45,109,117,108,49,46,99,58,103,101,110,101,114,105,99,47,109,112,105,104,45,109,117,108,50,46,99,58,103,101,110,101,114,105,99,47,109,112,105,104,45,109,117,108,51,46,99,58,103,101,110,101,114,105,99,47,109,112,105,104,45,108,115,104,105,102,116,46,99,58,103,101,110,101,114,105,99,47,109,112,105,104,45,114,115,104,105,102,116,46,99,0,105,110,118,97,108,105,100,32,109,112,105,95,99,111,110,115,116,32,115,101,108,101,99,116,111,114,32,37,100,10,0,87,97,114,110,105,110,103,58,32,116,114,121,105,110,103,32,116,111,32,99,104,97,110,103,101,32,97,110,32,105,109,109,117,116,97,98,108,101,32,77,80,73,10,0,105,110,118,97,108,105,100,32,102,108,97,103,32,118,97,108,117,101,32,105,110,32,109,112,105,95,102,114,101,101,10,0,109,112,105,95,103,101,116,95,111,112,97,113,117,101,32,111,110,32,110,111,114,109,97,108,32,109,112,105,10,0,109,112,105,95,115,101,116,95,99,111,110,100,58,32,100,105,102,102,101,114,101,110,116,32,115,105,122,101,115,10,0,109,112,105,95,115,119,97,112,95,99,111,110,100,58,32,100,105,102,102,101,114,101,110,116,32,115,105,122,101,115,10,0,105,110,118,97,108,105,100,32,102,108,97,103,32,118,97,108,117,101,10,0,77,80,73,32,115,117,98,115,121,115,116,101,109,32,110,111,116,32,105,110,105,116,105,97,108,105,122,101,100,10,0,10,10,84,104,105,115,32,105,115,32,76,105,98,103,99,114,121,112,116,32,49,46,55,46,48,45,98,101,116,97,50,51,48,32,45,32,84,104,101,32,71,78,85,32,67,114,121,112,116,111,32,76,105,98,114,97,114,121,10,67,111,112,121,114,105,103,104,116,32,40,67,41,32,50,48,48,48,45,50,48,49,50,32,70,114,101,101,32,83,111,102,116,119,97,114,101,32,70,111,117,110,100,97,116,105,111,110,44,32,73,110,99,46,10,67,111,112,121,114,105,103,104,116,32,40,67,41,32,50,48,49,50,45,50,48,49,52,32,103,49,48,32,67,111,100,101,32,71,109,98,72,10,67,111,112,121,114,105,103,104,116,32,40,67,41,32,50,48,49,51,45,50,48,49,52,32,74,117,115,115,105,32,75,105,118,105,108,105,110,110,97,10,10,40,97,51,54,101,101,55,53,32,50,48,49,54,45,48,49,45,48,56,84,50,49,58,48,54,43,48,48,48,48,41,10,10,10,0,99,105,112,104,101,114,45,99,109,97,99,46,99,0,99,109,97,99,95,103,101,110,101,114,97,116,101,95,115,117,98,107,101,121,115,0,99,45,62,117,110,117,115,101,100,32,60,32,98,108,111,99,107,115,105,122,101,0,99,105,112,104,101,114,45,99,116,114,46,99,0,95,103,99,114,121,95,99,105,112,104,101,114,95,99,116,114,95,101,110,99,114,121,112,116,0,117,110,117,115,101,100,32,61,61,32,98,108,111,99,107,115,105,122,101,0,99,105,112,104,101,114,45,103,99,109,46,99,0,100,111,95,103,104,97,115,104,95,98,117,102,0,102,97,105,108,101,100,32,116,111,32,97,108,108,111,99,97,116,101,32,109,101,109,111,114,121,0,115,101,116,107,101,121,32,102,97,105,108,101,100,0,115,101,108,102,116,101,115,116,32,102,111,114,32,67,66,67,32,102,97,105,108,101,100,32,45,32,115,101,101,32,115,121,115,108,111,103,32,102,111,114,32,100,101,116,97,105,108,115,0,115,101,108,102,116,101,115,116,32,102,111,114,32,67,70,66,32,102,97,105,108,101,100,32,45,32,115,101,101,32,115,121,115,108,111,103,32,102,111,114,32,100,101,116,97,105,108,115,0,115,101,108,102,116,101,115,116,32,102,111,114,32,67,84,82,32,102,97,105,108,101,100,32,45,32,115,101,101,32,115,121,115,108,111,103,32,102,111,114,32,100,101,116,97,105,108,115,0,69,67,67,0,101,99,99,0,101,99,100,115,97,0,101,99,100,104,0,101,100,100,115,97,0,103,111,115,116,0,112,97,98,103,110,104,113,0,112,97,98,103,110,104,113,100,0,115,119,0,114,115,0,99,117,114,118,101,0,102,108,97,103,115,0,116,114,97,110,115,105,101,110,116,45,107,101,121,0,101,99,103,101,110,32,99,117,114,118,101,32,105,110,102,111,58,32,37,115,47,37,115,10,0,101,99,103,101,110,32,99,117,114,118,101,32,117,115,101,100,58,32,37,115,10,0,101,99,103,101,110,32,99,117,114,118,101,32,32,32,112,0,101,99,103,101,110,32,99,117,114,118,101,32,32,32,97,0,101,99,103,101,110,32,99,117,114,118,101,32,32,32,98,0,101,99,103,101,110,32,99,117,114,118,101,32,32,32,110,0,101,99,103,101,110,32,99,117,114,118,101,32,32,32,104,0,101,99,103,101,110,32,99,117,114,118,101,32,71,0,101,99,103,101,110,58,32,70,97,105,108,101,100,32,116,111,32,103,101,116,32,97,102,102,105,110,101,32,99,111,111,114,100,105,110,97,116,101,115,32,102,111,114,32,37,115,10,0,81,0,101,99,103,101,110,32,99,111,110,118,101,114,116,101,100,32,81,32,116,111,32,97,32,99,111,109,112,108,105,97,110,116,32,112,111,105,110,116,10,0,101,99,103,101,110,32,100,105,100,110,39,116,32,110,101,101,100,32,116,111,32,99,111,110,118,101,114,116,32,81,32,116,111,32,97,32,99,111,109,112,108,105,97,110,116,32,112,111,105,110,116,10,0,84,101,115,116,105,110,103,32,107,101,121,46,10,0,69,67,68,83,65,32,111,112,101,114,97,116,105,111,110,58,32,115,105,103,110,32,102,97,105,108,101,100,10,0,69,67,68,83,65,32,111,112,101,114,97,116,105,111,110,58,32,115,105,103,110,44,32,118,101,114,105,102,121,32,102,97,105,108,101,100,10,0,69,67,68,83,65,32,111,112,101,114,97,116,105,111,110,58,32,115,105,103,110,44,32,118,101,114,105,102,121,32,111,107,46,10,0,101,99,100,104,58,32,70,97,105,108,101,100,32,116,111,32,103,101,116,32,97,102,102,105,110,101,32,99,111,111,114,100,105,110,97,116,101,115,32,102,111,114,32,104,107,81,10,0,101,99,100,104,58,32,70,97,105,108,101,100,32,116,111,32,103,101,116,32,97,102,102,105,110,101,32,99,111,111,114,100,105,110,97,116,101,115,32,102,111,114,32,104,100,107,71,10,0,69,67,68,72,32,116,101,115,116,32,102,97,105,108,101,100,46,10,0,71,0,40,99,117,114,118,101,32,37,115,41,0,40,102,108,97,103,115,32,112,97,114,97,109,41,0,40,102,108,97,103,115,32,101,100,100,115,97,41,0,40,102,108,97,103,115,32,112,97,114,97,109,32,101,100,100,115,97,41,0,40,107,101,121,45,100,97,116,97,32,40,112,117,98,108,105,99,45,107,101,121,32,32,40,101,99,99,37,83,37,83,40,112,37,109,41,40,97,37,109,41,40,98,37,109,41,40,103,37,109,41,40,110,37,109,41,40,104,37,109,41,40,113,37,109,41,41,41,32,40,112,114,105,118,97,116,101,45,107,101,121,32,32,40,101,99,99,37,83,37,83,40,112,37,109,41,40,97,37,109,41,40,98,37,109,41,40,103,37,109,41,40,110,37,109,41,40,104,37,109,41,40,113,37,109,41,40,100,37,109,41,41,41,32,41,0,40,107,101,121,45,100,97,116,97,32,40,112,117,98,108,105,99,45,107,101,121,32,32,40,101,99,99,37,83,37,83,40,113,37,109,41,41,41,32,40,112,114,105,118,97,116,101,45,107,101,121,32,32,40,101,99,99,37,83,37,83,40,113,37,109,41,40,100,37,109,41,41,41,32,41,0,101,99,103,101,110,32,114,101,115,117,108,116,32,32,112,0,101,99,103,101,110,32,114,101,115,117,108,116,32,32,97,0,101,99,103,101,110,32,114,101,115,117,108,116,32,32,98,0,101,99,103,101,110,32,114,101,115,117,108,116,32,32,71,0,101,99,103,101,110,32,114,101,115,117,108,116,32,32,110,0,101,99,103,101,110,32,114,101,115,117,108,116,32,32,104,0,101,99,103,101,110,32,114,101,115,117,108,116,32,32,81,0,101,99,103,101,110,32,114,101,115,117,108,116,32,32,100,0,101,99,103,101,110,32,114,101,115,117,108,116,32,32,117,115,105,110,103,32,69,100,50,53,53,49,57,43,69,100,68,83,65,10,0,45,112,63,97,63,98,63,103,63,110,63,104,63,47,113,63,43,100,0,47,113,63,43,100,0,101,99,99,95,116,101,115,116,107,101,121,32,105,110,102,58,32,37,115,47,37,115,10,0,101,99,99,95,116,101,115,116,107,101,121,32,110,97,109,58,32,37,115,10,0,101,99,99,95,116,101,115,116,107,101,121,32,32,32,112,0,101,99,99,95,116,101,115,116,107,101,121,32,32,32,97,0,101,99,99,95,116,101,115,116,107,101,121,32,32,32,98,0,101,99,99,95,116,101,115,116,107,101,121,32,103,0,101,99,99,95,116,101,115,116,107,101,121,32,32,32,110,0,101,99,99,95,116,101,115,116,107,101,121,32,32,32,104,0,101,99,99,95,116,101,115,116,107,101,121,32,32,32,113,0,101,99,99,95,116,101,115,116,107,101,121,32,32,32,100,0,66,97,100,32,99,104,101,99,107,58,32,80,111,105,110,116,32,39,71,39,32,100,111,101,115,32,110,111,116,32,98,101,108,111,110,103,32,116,111,32,99,117,114,118,101,32,39,69,39,33,10,0,66,97,100,32,99,104,101,99,107,58,32,39,71,39,32,99,97,110,110,111,116,32,98,101,32,80,111,105,110,116,32,97,116,32,73,110,102,105,110,105,116,121,33,10,0,99,104,101,99,107,95,115,101,99,114,101,116,95,107,101,121,58,32,69,32,105,115,32,110,111,116,32,97,32,99,117,114,118,101,32,111,102,32,111,114,100,101,114,32,110,10,0,66,97,100,32,99,104,101,99,107,58,32,81,32,99,97,110,32,110,111,116,32,98,101,32,97,32,80,111,105,110,116,32,97,116,32,73,110,102,105,110,105,116,121,33,10,0,66,97,100,32,99,104,101,99,107,58,32,99,111,109,112,117,116,97,116,105,111,110,32,111,102,32,100,71,32,102,97,105,108,101,100,10,0,66,97,100,32,99,104,101,99,107,58,32,84,104,101,114,101,32,105,115,32,78,79,32,99,111,114,114,101,115,112,111,110,100,101,110,99,101,32,98,101,116,119,101,101,110,32,39,100,39,32,97,110,100,32,39,81,39,33,10,0,101,99,99,95,116,101,115,116,107,101,121,32,32,32,61,62,32,37,115,10,0,112,0,101,99,99,95,101,110,99,114,121,112,116,32,100,97,116,97,0,45,112,63,97,63,98,63,103,63,110,63,104,63,43,113,0,101,99,99,95,101,110,99,114,121,112,116,32,105,110,102,111,58,32,37,115,47,37,115,10,0,101,99,99,95,101,110,99,114,121,112,116,32,110,97,109,101,58,32,37,115,10,0,101,99,99,95,101,110,99,114,121,112,116,32,32,32,32,112,0,101,99,99,95,101,110,99,114,121,112,116,32,32,32,32,97,0,101,99,99,95,101,110,99,114,121,112,116,32,32,32,32,98,0,101,99,99,95,101,110,99,114,121,112,116,32,32,103,0,101,99,99,95,101,110,99,114,121,112,116,32,32,32,32,110,0,101,99,99,95,101,110,99,114,121,112,116,32,32,32,32,104,0,101,99,99,95,101,110,99,114,121,112,116,32,32,32,32,113,0,101,99,100,104,58,32,70,97,105,108,101,100,32,116,111,32,103,101,116,32,97,102,102,105,110,101,32,99,111,111,114,100,105,110,97,116,101,115,32,102,111,114,32,107,100,71,10,0,101,99,100,104,58,32,70,97,105,108,101,100,32,116,111,32,103,101,116,32,97,102,102,105,110,101,32,99,111,111,114,100,105,110,97,116,101,115,32,102,111,114,32,107,71,10,0,40,101,110,99,45,118,97,108,40,101,99,100,104,40,115,37,109,41,40,101,37,109,41,41,41,0,101,99,99,95,101,110,99,114,121,112,116,32,32,32,32,61,62,32,37,115,10,0,101,0,101,99,99,95,100,101,99,114,121,112,116,32,32,100,95,101,0,45,112,63,97,63,98,63,103,63,110,63,104,63,43,100,0,101,99,99,95,100,101,99,114,121,112,116,32,105,110,102,111,58,32,37,115,47,37,115,10,0,101,99,99,95,100,101,99,114,121,112,116,32,110,97,109,101,58,32,37,115,10,0,101,99,99,95,100,101,99,114,121,112,116,32,32,32,32,112,0,101,99,99,95,100,101,99,114,121,112,116,32,32,32,32,97,0,101,99,99,95,100,101,99,114,121,112,116,32,32,32,32,98,0,101,99,99,95,100,101,99,114,121,112,116,32,32,103,0,101,99,99,95,100,101,99,114,121,112,116,32,32,32,32,110,0,101,99,99,95,100,101,99,114,121,112,116,32,32,32,32,104,0,101,99,99,95,100,101,99,114,121,112,116,32,32,32,32,100,0,101,99,100,104,58,32,70,97,105,108,101,100,32,116,111,32,103,101,116,32,97,102,102,105,110,101,32,99,111,111,114,100,105,110,97,116,101,115,10,0,101,99,99,95,100,101,99,114,121,112,116,32,32,114,101,115,0,40,118,97,108,117,101,32,37,109,41,0,101,99,99,95,100,101,99,114,121,112,116,32,32,32,32,61,62,32,37,115,10,0,101,99,99,95,115,105,103,110,32,32,32,100,97,116,97,0,43,69,100,68,83,65,0,101,99,99,95,115,105,103,110,32,32,32,105,110,102,111,58,32,37,115,47,37,115,37,115,10,0,101,99,99,95,115,105,103,110,32,32,32,110,97,109,101,58,32,37,115,10,0,101,99,99,95,115,105,103,110,32,32,32,32,32,32,112,0,101,99,99,95,115,105,103,110,32,32,32,32,32,32,97,0,101,99,99,95,115,105,103,110,32,32,32,32,32,32,98,0,101,99,99,95,115,105,103,110,32,32,32,32,103,0,101,99,99,95,115,105,103,110,32,32,32,32,32,32,110,0,101,99,99,95,115,105,103,110,32,32,32,32,32,32,104,0,101,99,99,95,115,105,103,110,32,32,32,32,32,32,113,0,101,99,99,95,115,105,103,110,32,32,32,32,32,32,100,0,40,115,105,103,45,118,97,108,40,101,100,100,115,97,40,114,37,77,41,40,115,37,77,41,41,41,0,40,115,105,103,45,118,97,108,40,103,111,115,116,40,114,37,77,41,40,115,37,77,41,41,41,0,40,115,105,103,45,118,97,108,40,101,99,100,115,97,40,114,37,77,41,40,115,37,77,41,41,41,0,101,99,99,95,115,105,103,110,32,32,32,32,32,32,61,62,32,37,115,10,0,101,99,99,95,118,101,114,105,102,121,32,100,97,116,97,0,47,114,115,0,101,99,99,95,118,101,114,105,102,121,32,32,115,95,114,0,101,99,99,95,118,101,114,105,102,121,32,32,115,95,115,0,45,112,63,97,63,98,63,103,63,110,63,104,63,47,113,0,47,113,0,101,99,99,95,118,101,114,105,102,121,32,105,110,102,111,58,32,37,115,47,37,115,37,115,10,0,101,99,99,95,118,101,114,105,102,121,32,110,97,109,101,58,32,37,115,10,0,101,99,99,95,118,101,114,105,102,121,32,32,32,32,112,0,101,99,99,95,118,101,114,105,102,121,32,32,32,32,97,0,101,99,99,95,118,101,114,105,102,121,32,32,32,32,98,0,101,99,99,95,118,101,114,105,102,121,32,32,103,0,101,99,99,95,118,101,114,105,102,121,32,32,32,32,110,0,101,99,99,95,118,101,114,105,102,121,32,32,32,32,104,0,101,99,99,95,118,101,114,105,102,121,32,32,32,32,113,0,71,111,111,100,0,101,99,99,95,118,101,114,105,102,121,32,32,32,32,61,62,32,37,115,10,0,108,111,119,45,108,101,118,101,108,0,112,117,98,107,101,121,0,112,63,97,63,98,63,103,63,110,63,104,63,47,113,0,112,63,97,63,98,63,103,63,110,63,104,63,113,0,113,0,112,97,98,103,110,104,113,40,49,58,37,99,37,117,58,0,41,0,100,105,103,101,115,116,32,115,105,122,101,32,100,111,101,115,32,110,111,116,32,109,97,116,99,104,32,101,120,112,101,99,116,101,100,32,115,105,122,101,0,103,99,114,121,95,109,100,95,111,112,101,110,32,102,97,105,108,101,100,0,105,110,118,97,108,105,100,32,68,65,84,65,77,79,68,69,0,100,105,103,101,115,116,32,109,105,115,109,97,116,99,104,0,104,97,115,104,45,99,111,109,109,111,110,46,99,0,95,103,99,114,121,95,109,100,95,98,108,111,99,107,95,119,114,105,116,101,0,142,153,59,159,72,104,18,115,194,150,80,186,50,252,118,206,72,51,46,167,22,77,150,164,71,111,184,197,49,161,24,106,192,223,193,124,152,220,232,123,77,167,240,17,236,72,201,114,113,210,194,15,155,146,143,226,39,13,111,184,99,213,23,56,180,142,238,227,20,167,204,138,185,50,22,69,72,229,38,174,144,34,67,104,81,122,207,234,189,107,179,115,43,192,233,218,153,131,43,97,202,1,182,222,86,36,74,158,136,213,249,179,121,115,246,34,164,61,20,166,89,155,31,101,76,180,90,116,227,85,165,238,166,167,37,28,30,114,145,109,17,194,203,33,77,60,37,37,57,18,29,142,35,78,101,45,101,31,164,200,207,248,128,243,255,199,112,63,148,0,229,42,125,251,75,61,51,5,217,80,111,108,121,49,51,48,53,32,116,101,115,116,32,49,32,102,97,105,108,101,100,46,0,80,111,108,121,49,51,48,53,32,116,101,115,116,32,50,32,102,97,105,108,101,100,46,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,80,111,108,121,49,51,48,53,32,116,101,115,116,32,51,32,102,97,105,108,101,100,46,0,1,2,3,4,5,6,7,255,254,253,252,251,250,249,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,100,175,226,232,214,173,123,189,210,135,249,124,68,98,61,57,80,111,108,121,49,51,48,53,32,116,101,115,116,32,52,32,102,97,105,108,101,100,46,0,80,111,108,121,49,51,48,53,32,115,101,108,102,116,101,115,116,32,102,97,105,108,101,100,32,40,37,115,41,10,0,102,97,105,108,101,100,32,116,111,32,97,99,113,117,105,114,101,32,116,104,101,32,112,111,111,108,32,108,111,99,107,58,32,37,115,10,0,110,111,32,101,110,116,114,111,112,121,32,103,97,116,104,101,114,105,110,103,32,109,111,100,117,108,101,32,100,101,116,101,99,116,101,100,10,0,87,65,82,78,73,78,71,58,32,117,115,105,110,103,32,105,110,115,101,99,117,114,101,32,114,97,110,100,111,109,32,110,117,109,98,101,114,32,103,101,110,101,114,97,116,111,114,33,33,10,0,112,111,111,108,95,105,115,95,108,111,99,107,101,100,0,114,97,110,100,111,109,45,99,115,112,114,110,103,46,99,0,97,100,100,95,114,97,110,100,111,109,110,101,115,115,0,109,105,120,95,112,111,111,108,0,102,97,105,108,101,100,32,116,111,32,114,101,108,101,97,115,101,32,116,104,101,32,112,111,111,108,32,108,111,99,107,58,32,37,115,10,0,32,40,104,119,114,110,103,32,102,97,105,108,101,100,41,0,114,97,110,100,111,109,32,117,115,97,103,101,58,32,112,111,111,108,115,105,122,101,61,37,100,32,109,105,120,101,100,61,37,108,117,32,112,111,108,108,115,61,37,108,117,47,37,108,117,32,97,100,100,101,100,61,37,108,117,47,37,108,117,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,111,117,116,109,105,120,61,37,108,117,32,103,101,116,108,118,108,49,61,37,108,117,47,37,108,117,32,103,101,116,108,118,108,50,61,37,108,117,47,37,108,117,37,115,10,0,114,101,97,100,95,112,111,111,108,0,116,111,111,32,109,97,110,121,32,114,97,110,100,111,109,32,98,105,116,115,32,114,101,113,117,101,115,116,101,100,10,0,114,101,97,100,95,115,101,101,100,95,102,105,108,101,0,99,97,110,39,116,32,111,112,101,110,32,96,37,115,39,58,32,37,115,10,0,99,97,110,39,116,32,108,111,99,107,32,96,37,115,39,58,32,37,115,10,0,119,97,105,116,105,110,103,32,102,111,114,32,108,111,99,107,32,111,110,32,96,37,115,39,46,46,46,10,0,99,97,110,39,116,32,115,116,97,116,32,96,37,115,39,58,32,37,115,10,0,96,37,115,39,32,105,115,32,110,111,116,32,97,32,114,101,103,117,108,97,114,32,102,105,108,101,32,45,32,105,103,110,111,114,101,100,10,0,110,111,116,101,58,32,114,97,110,100,111,109,95,115,101,101,100,32,102,105,108,101,32,105,115,32,101,109,112,116,121,10,0,119,97,114,110,105,110,103,58,32,105,110,118,97,108,105,100,32,115,105,122,101,32,111,102,32,114,97,110,100,111,109,95,115,101,101,100,32,102,105,108,101,32,45,32,110,111,116,32,117,115,101,100,10,0,99,97,110,39,116,32,114,101,97,100,32,96,37,115,39,58,32,37,115,10,0,83,108,111,119,32,101,110,116,114,111,112,121,32,103,97,116,104,101,114,105,110,103,32,109,111,100,117,108,101,32,110,111,116,32,121,101,116,32,105,110,105,116,105,97,108,105,122,101,100,10,0,78,111,32,119,97,121,32,116,111,32,103,97,116,104,101,114,32,101,110,116,114,111,112,121,32,102,111,114,32,116,104,101,32,82,78,71,10,0,100,111,95,102,97,115,116,95,114,97,110,100,111,109,95,112,111,108,108,0,95,103,99,114,121,95,114],"i8",ALLOC_NONE,Runtime.GLOBAL_BASE+40960);allocate([110,103,99,115,112,114,110,103,95,115,101,116,95,115,101,101,100,95,102,105,108,101,0,110,111,116,101,58,32,114,97,110,100,111,109,95,115,101,101,100,32,102,105,108,101,32,110,111,116,32,117,112,100,97,116,101,100,10,0,99,97,110,39,116,32,99,114,101,97,116,101,32,96,37,115,39,58,32,37,115,10,0,99,97,110,39,116,32,119,114,105,116,101,32,96,37,115,39,58,32,37,115,10,0,99,97,110,39,116,32,99,108,111,115,101,32,96,37,115,39,58,32,37,115,10,0,102,97,105,108,101,100,32,116,111,32,97,99,113,117,105,114,101,32,116,104,101,32,82,78,71,32,108,111,99,107,58,32,37,115,10,0,33,110,111,110,99,101,95,99,111,110,116,101,120,116,45,62,116,101,115,116,95,100,116,95,112,116,114,0,114,97,110,100,111,109,45,102,105,112,115,46,99,0,95,103,99,114,121,95,114,110,103,102,105,112,115,95,105,110,105,116,105,97,108,105,122,101,0,33,115,116,100,95,114,110,103,95,99,111,110,116,101,120,116,45,62,116,101,115,116,95,100,116,95,112,116,114,0,33,115,116,114,111,110,103,95,114,110,103,95,99,111,110,116,101,120,116,45,62,116,101,115,116,95,100,116,95,112,116,114,0,109,101,109,111,114,121,32,99,111,114,114,117,112,116,105,111,110,32,100,101,116,101,99,116,101,100,32,105,110,32,82,78,71,32,99,111,110,116,101,120,116,32,37,112,10,0,102,97,105,108,101,100,32,116,111,32,114,101,108,101,97,115,101,32,116,104,101,32,82,78,71,32,108,111,99,107,58,32,37,115,10,0,114,110,103,95,99,116,120,0,102,105,112,115,95,114,110,103,95,105,115,95,108,111,99,107,101,100,0,120,57,51,49,95,103,101,110,101,114,97,116,101,95,107,101,121,0,101,114,114,111,114,32,99,114,101,97,116,105,110,103,32,99,105,112,104,101,114,32,99,111,110,116,101,120,116,32,102,111,114,32,82,78,71,58,32,37,115,10,0,33,101,110,116,114,111,112,121,95,99,111,108,108,101,99,116,95,98,117,102,102,101,114,0,103,101,116,95,101,110,116,114,111,112,121,0,101,110,116,114,111,112,121,95,99,111,108,108,101,99,116,95,99,98,0,101,110,116,114,111,112,121,95,99,111,108,108,101,99,116,95,98,117,102,102,101,114,0,101,114,114,111,114,32,103,101,116,116,105,110,103,32,101,110,116,114,111,112,121,32,100,97,116,97,10,0,101,114,114,111,114,32,99,114,101,97,116,105,110,103,32,107,101,121,32,102,111,114,32,82,78,71,58,32,37,115,10,0,120,57,51,49,95,114,101,115,101,101,100,0,120,57,51,49,95,103,101,110,101,114,97,116,101,95,115,101,101,100,0,108,101,110,103,116,104,32,61,61,32,49,54,0,102,111,114,107,32,119,105,116,104,111,117,116,32,112,114,111,112,101,114,32,114,101,45,105,110,105,116,105,97,108,105,122,97,116,105,111,110,32,100,101,116,101,99,116,101,100,32,105,110,32,82,78,71,0,120,57,51,49,95,97,101,115,95,100,114,105,118,101,114,0,114,110,103,95,99,116,120,45,62,99,105,112,104,101,114,95,104,100,0,114,110,103,95,99,116,120,45,62,105,115,95,115,101,101,100,101,100,0,116,101,109,112,118,97,108,117,101,95,102,111,114,95,120,57,51,49,95,97,101,115,95,100,114,105,118,101,114,0,120,57,51,49,95,103,101,116,95,100,116,0,103,101,116,116,105,109,101,111,102,100,97,121,40,41,32,102,97,105,108,101,100,58,32,37,115,10,0,101,110,99,114,121,112,116,95,97,101,115,0,65,69,83,32,101,110,99,114,121,112,116,105,111,110,32,105,110,32,82,78,71,32,102,97,105,108,101,100,58,32,37,115,10,0,100,117,112,108,105,99,97,116,101,32,49,50,56,32,98,105,116,32,98,108,111,99,107,32,114,101,116,117,114,110,101,100,32,98,121,32,82,78,71,0,115,101,118,101,114,101,32,101,114,114,111,114,32,103,101,116,116,105,110,103,32,114,97,110,100,111,109,10,0,115,101,108,102,116,101,115,116,95,107,97,116,0,101,114,114,111,114,32,99,114,101,97,116,105,110,103,32,99,105,112,104,101,114,32,99,111,110,116,101,120,116,32,102,111,114,32,82,78,71,0,185,202,127,214,160,245,211,66,25,109,132,145,118,28,59,190,72,178,130,152,104,194,128,0,0,0,40,24,0,0,37,0,82,23,141,41,162,213,132,18,157,137,154,69,130,2,247,119,66,156,8,61,130,244,138,64,102,181,73,39,171,66,199,195,14,183,97,60,254,176,190,115,247,110,109,111,29,163,20,250,187,75,193,14,197,251,205,70,190,40,97,231,3,43,55,125,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,247,149,189,74,82,226,158,215,19,211,19,250,32,233,141,188,200,209,229,17,89,82,247,250,55,56,180,197,206,178,176,154,13,156,197,13,22,225,188,237,207,96,98,9,157,32,131,126,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,128,0,129,1,130,2,131,3,160,32,161,33,162,34,163,35,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,150,237,204,195,221,4,127,117,99,25,55,111,21,34,87,86,122,20,118,119,149,23,126,200,146,232,221,21,203,31,188,177,37,62,46,162,65,27,221,245,33,72,65,113,179,141,47,76,101,114,114,111,114,32,115,101,116,116,105,110,103,32,107,101,121,32,102,111,114,32,82,78,71,0,88,57,46,51,49,32,82,78,71,32,99,111,114,101,32,102,117,110,99,116,105,111,110,32,102,97,105,108,101,100,0,82,78,71,32,111,117,116,112,117,116,32,100,111,101,115,32,110,111,116,32,109,97,116,99,104,32,107,110,111,119,110,32,118,97,108,117,101,0,102,111,114,107,32,100,101,116,101,99,116,105,111,110,32,102,97,105,108,101,100,0,114,97,110,100,111,109,0,75,65,84,0,102,97,105,108,101,100,32,116,111,32,97,99,113,117,105,114,101,32,116,104,101,32,83,121,115,116,101,109,32,82,78,71,32,108,111,99,107,58,32,37,115,10,0,102,97,105,108,101,100,32,116,111,32,114,101,108,101,97,115,101,32,116,104,101,32,83,121,115,116,101,109,32,82,78,71,32,108,111,99,107,58,32,37,115,10,0,98,117,102,102,101,114,0,114,97,110,100,111,109,45,115,121,115,116,101,109,46,99,0,103,101,116,95,114,97,110,100,111,109,0,115,121,115,116,101,109,95,114,110,103,95,105,115,95,108,111,99,107,101,100,0,114,101,97,100,95,99,98,0,114,101,97,100,95,99,98,95,98,117,102,102,101,114,0,101,114,114,111,114,32,114,101,97,100,105,110,103,32,114,97,110,100,111,109,32,102,114,111,109,32,115,121,115,116,101,109,32,82,78,71,32,40,114,99,61,37,100,41,10,0,47,100,101,118,47,114,97,110,100,111,109,0,111,112,101,110,95,100,101,118,95,114,97,110,100,111,109,0,119,97,105,116,95,100,101,118,95,114,97,110,100,111,109,0,99,97,110,39,116,32,111,112,101,110,32,37,115,58,32,37,115,10,0,101,114,114,111,114,32,115,101,116,116,105,110,103,32,70,68,95,67,76,79,69,88,69,67,32,111,110,32,102,100,32,37,100,58,32,37,115,10,0,47,100,101,118,47,117,114,97,110,100,111,109,0,110,101,101,100,95,101,110,116,114,111,112,121,0,115,101,108,101,99,116,40,41,32,101,114,114,111,114,58,32,37,115,10,0,98,111,103,117,115,32,114,101,97,100,32,102,114,111,109,32,114,97,110,100,111,109,32,100,101,118,105,99,101,32,40,110,61,37,100,41,10,0,114,101,97,100,32,101,114,114,111,114,32,111,110,32,114,97,110,100,111,109,32,100,101,118,105,99,101,58,32,37,115,10,0,99,104,111,111,115,105,110,103,32,97,32,114,97,110,100,111,109,32,107,32,111,102,32,37,117,32,98,105,116,115,32,97,116,32,115,101,99,108,101,118,101,108,32,37,100,10,0,9,107,32,116,111,111,32,108,97,114,103,101,32,45,32,97,103,97,105,110,10,0,9,107,32,105,115,32,122,101,114,111,32,45,32,97,103,97,105,110,10,0,1,0,101,99,100,115,97,32,115,105,103,110,32,104,97,115,104,32,32,0,101,99,100,115,97,32,115,105,103,110,32,114,101,115,117,108,116,32,114,32,0,101,99,100,115,97,32,115,105,103,110,32,114,101,115,117,108,116,32,115,32,0,103,111,115,116,32,115,105,103,110,32,104,97,115,104,32,32,0,101,99,99,32,115,105,103,110,58,32,70,97,105,108,101,100,32,116,111,32,103,101,116,32,97,102,102,105,110,101,32,99,111,111,114,100,105,110,97,116,101,115,10,0,103,111,115,116,32,115,105,103,110,32,114,101,115,117,108,116,32,114,32,0,103,111,115,116,32,115,105,103,110,32,114,101,115,117,108,116,32,115,32,0,101,99,99,32,118,101,114,105,102,121,58,32,82,101,106,101,99,116,101,100,10,0,101,99,99,32,118,101,114,105,102,121,58,32,70,97,105,108,101,100,32,116,111,32,103,101,116,32,97,102,102,105,110,101,32,99,111,111,114,100,105,110,97,116,101,115,10,0,32,32,32,32,32,120,0,32,32,32,32,32,114,0,32,32,32,32,32,115,0,101,99,99,32,118,101,114,105,102,121,58,32,78,111,116,32,118,101,114,105,102,105,101,100,10,0,101,99,99,32,118,101,114,105,102,121,58,32,65,99,99,101,112,116,101,100,10,0,33,34,108,111,99,107,32,65,66,73,32,118,101,114,115,105,111,110,34,0,112,111,115,105,120,45,108,111,99,107,46,99,0,103,101,116,95,108,111,99,107,95,111,98,106,101,99,116,0,115,116,114,101,97,109,45,62,102,108,97,103,115,46,119,114,105,116,105,110,103,0,101,115,116,114,101,97,109,46,99,0,101,115,95,102,108,117,115,104,0,33,115,116,114,101,97,109,45,62,102,108,97,103,115,46,119,114,105,116,105,110,103,0,101,115,95,101,109,112,116,121,0,83,117,99,99,101,115,115,0,71,101,110,101,114,97,108,32,101,114,114,111,114,0,85,110,107,110,111,119,110,32,112,97,99,107,101,116,0,85,110,107,110,111,119,110,32,118,101,114,115,105,111,110,32,105,110,32,112,97,99,107,101,116,0,73,110,118,97,108,105,100,32,112,117,98,108,105,99,32,107,101,121,32,97,108,103,111,114,105,116,104,109,0,73,110,118,97,108,105,100,32,100,105,103,101,115,116,32,97,108,103,111,114,105,116,104,109,0,66,97,100,32,112,117,98,108,105,99,32,107,101,121,0,66,97,100,32,115,101,99,114,101,116,32,107,101,121,0,66,97,100,32,115,105,103,110,97,116,117,114,101,0,78,111,32,112,117,98,108,105,99,32,107,101,121,0,67,104,101,99,107,115,117,109,32,101,114,114,111,114,0,66,97,100,32,112,97,115,115,112,104,114,97,115,101,0,73,110,118,97,108,105,100,32,99,105,112,104,101,114,32,97,108,103,111,114,105,116,104,109,0,75,101,121,114,105,110,103,32,111,112,101,110,0,73,110,118,97,108,105,100,32,112,97,99,107,101,116,0,73,110,118,97,108,105,100,32,97,114,109,111,114,0,78,111,32,117,115,101,114,32,73,68,0,78,111,32,115,101,99,114,101,116,32,107,101,121,0,87,114,111,110,103,32,115,101,99,114,101,116,32,107,101,121,32,117,115,101,100,0,66,97,100,32,115,101,115,115,105,111,110,32,107,101,121,0,85,110,107,110,111,119,110,32,99,111,109,112,114,101,115,115,105,111,110,32,97,108,103,111,114,105,116,104,109,0,78,117,109,98,101,114,32,105,115,32,110,111,116,32,112,114,105,109,101,0,73,110,118,97,108,105,100,32,101,110,99,111,100,105,110,103,32,109,101,116,104,111,100,0,73,110,118,97,108,105,100,32,101,110,99,114,121,112,116,105,111,110,32,115,99,104,101,109,101,0,73,110,118,97,108,105,100,32,115,105,103,110,97,116,117,114,101,32,115,99,104,101,109,101,0,73,110,118,97,108,105,100,32,97,116,116,114,105,98,117,116,101,0,78,111,32,118,97,108,117,101,0,78,111,116,32,102,111,117,110,100,0,86,97,108,117,101,32,110,111,116,32,102,111,117,110,100,0,83,121,110,116,97,120,32,101,114,114,111,114,0,66,97,100,32,77,80,73,32,118,97,108,117,101,0,73,110,118,97,108,105,100,32,112,97,115,115,112,104,114,97,115,101,0,73,110,118,97,108,105,100,32,115,105,103,110,97,116,117,114,101,32,99,108,97,115,115,0,82,101,115,111,117,114,99,101,115,32,101,120,104,97,117,115,116,101,100,0,73,110,118,97,108,105,100,32,107,101,121,114,105,110,103,0,84,114,117,115,116,32,68,66,32,101,114,114,111,114,0,66,97,100,32,99,101,114,116,105,102,105,99,97,116,101,0,73,110,118,97,108,105,100,32,117,115,101,114,32,73,68,0,85,110,101,120,112,101,99,116,101,100,32,101,114,114,111,114,0,84,105,109,101,32,99,111,110,102,108,105,99,116,0,75,101,121,115,101,114,118,101,114,32,101,114,114,111,114,0,87,114,111,110,103,32,112,117,98,108,105,99,32,107,101,121,32,97,108,103,111,114,105,116,104,109,0,84,114,105,98,117,116,101,32,116,111,32,68,46,32,65,46,0,87,101,97,107,32,101,110,99,114,121,112,116,105,111,110,32,107,101,121,0,73,110,118,97,108,105,100,32,107,101,121,32,108,101,110,103,116,104,0,73,110,118,97,108,105,100,32,97,114,103,117,109,101,110,116,0,83,121,110,116,97,120,32,101,114,114,111,114,32,105,110,32,85,82,73,0,73,110,118,97,108,105,100,32,85,82,73,0,78,101,116,119,111,114,107,32,101,114,114,111,114,0,85,110,107,110,111,119,110,32,104,111,115,116,0,83,101,108,102,116,101,115,116,32,102,97,105,108,101,100,0,68,97,116,97,32,110,111,116,32,101,110,99,114,121,112,116,101,100,0,68,97,116,97,32,110,111,116,32,112,114,111,99,101,115,115,101,100,0,85,110,117,115,97,98,108,101,32,112,117,98,108,105,99,32,107,101,121,0,85,110,117,115,97,98,108,101,32,115,101,99,114,101,116,32,107,101,121,0,73,110,118,97,108,105,100,32,118,97,108,117,101,0,66,97,100,32,99,101,114,116,105,102,105,99,97,116,101,32,99,104,97,105,110,0,77,105,115,115,105,110,103,32,99,101,114,116,105,102,105,99,97,116,101,0,78,111,32,100,97,116,97,0,66,117,103,0,78,111,116,32,115,117,112,112,111,114,116,101,100,0,73,110,118,97,108,105,100,32,111,112,101,114,97,116,105,111,110,32,99,111,100,101,0,84,105,109,101,111,117,116,0,73,110,116,101,114,110,97,108,32,101,114,114,111,114,0,69,79,70,32,40,103,99,114,121,112,116,41,0,73,110,118,97,108,105,100,32,111,98,106,101,99,116,0,80,114,111,118,105,100,101,100,32,111,98,106,101,99,116,32,105,115,32,116,111,111,32,115,104,111,114,116,0,80,114,111,118,105,100,101,100,32,111,98,106,101,99,116,32,105,115,32,116,111,111,32,108,97,114,103,101,0,77,105,115,115,105,110,103,32,105,116,101,109,32,105,110,32,111,98,106,101,99,116,0,78,111,116,32,105,109,112,108,101,109,101,110,116,101,100,0,67,111,110,102,108,105,99,116,105,110,103,32,117,115,101,0,73,110,118,97,108,105,100,32,99,105,112,104,101,114,32,109,111,100,101,0,73,110,118,97,108,105,100,32,102,108,97,103,0,73,110,118,97,108,105,100,32,104,97,110,100,108,101,0,82,101,115,117,108,116,32,116,114,117,110,99,97,116,101,100,0,73,110,99,111,109,112,108,101,116,101,32,108,105,110,101,0,73,110,118,97,108,105,100,32,114,101,115,112,111,110,115,101,0,78,111,32,97,103,101,110,116,32,114,117,110,110,105,110,103,0,65,103,101,110,116,32,101,114,114,111,114,0,73,110,118,97,108,105,100,32,100,97,116,97,0,85,110,115,112,101,99,105,102,105,99,32,65,115,115,117,97,110,32,115,101,114,118,101,114,32,102,97,117,108,116,0,71,101,110,101,114,97,108,32,65,115,115,117,97,110,32,101,114,114,111,114,0,73,110,118,97,108,105,100,32,115,101,115,115,105,111,110,32,107,101,121,0,73,110,118,97,108,105,100,32,83,45,101,120,112,114,101,115,115,105,111,110,0,85,110,115,117,112,112,111,114,116,101,100,32,97,108,103,111,114,105,116,104,109,0,78,111,32,112,105,110,101,110,116,114,121,0,112,105,110,101,110,116,114,121,32,101,114,114,111,114,0,66,97,100,32,80,73,78,0,73,110,118,97,108,105,100,32,110,97,109,101,0,66,97,100,32,100,97,116,97,0,73,110,118,97,108,105,100,32,112,97,114,97,109,101,116,101,114,0,87,114,111,110,103,32,99,97,114,100,0,78,111,32,100,105,114,109,110,103,114,0,100,105,114,109,110,103,114,32,101,114,114,111,114,0,67,101,114,116,105,102,105,99,97,116,101,32,114,101,118,111,107,101,100,0,78,111,32,67,82,76,32,107,110,111,119,110,0,67,82,76,32,116,111,111,32,111,108,100,0,76,105,110,101,32,116,111,111,32,108,111,110,103,0,78,111,116,32,116,114,117,115,116,101,100,0,79,112,101,114,97,116,105,111,110,32,99,97,110,99,101,108,108,101,100,0,66,97,100,32,67,65,32,99,101,114,116,105,102,105,99,97,116,101,0,67,101,114,116,105,102,105,99,97,116,101,32,101,120,112,105,114,101,100,0,67,101,114,116,105,102,105,99,97,116,101,32,116,111,111,32,121,111,117,110,103,0,85,110,115,117,112,112,111,114,116,101,100,32,99,101,114,116,105,102,105,99,97,116,101,0,85,110,107,110,111,119,110,32,83,45,101,120,112,114,101,115,115,105,111,110,0,85,110,115,117,112,112,111,114,116,101,100,32,112,114,111,116,101,99,116,105,111,110,0,67,111,114,114,117,112,116,101,100,32,112,114,111,116,101,99,116,105,111,110,0,65,109,98,105,103,117,111,117,115,32,110,97,109,101,0,67,97,114,100,32,101,114,114,111,114,0,67,97,114,100,32,114,101,115,101,116,32,114,101,113,117,105,114,101,100,0,67,97,114,100,32,114,101,109,111,118,101,100,0,73,110,118,97,108,105,100,32,99,97,114,100,0,67,97,114,100,32,110,111,116,32,112,114,101,115,101,110,116,0,78,111,32,80,75,67,83,49,53,32,97,112,112,108,105,99,97,116,105,111,110,0,78,111,116,32,99,111,110,102,105,114,109,101,100,0,67,111,110,102,105,103,117,114,97,116,105,111,110,32,101,114,114,111,114,0,78,111,32,112,111,108,105,99,121,32,109,97,116,99,104,0,73,110,118,97,108,105,100,32,105,110,100,101,120,0,73,110,118,97,108,105,100,32,73,68,0,78,111,32,83,109,97,114,116,67,97,114,100,32,100,97,101,109,111,110,0,83,109,97,114,116,67,97,114,100,32,100,97,101,109,111,110,32,101,114,114,111,114,0,85,110,115,117,112,112,111,114,116,101,100,32,112,114,111,116,111,99,111,108,0,66,97,100,32,80,73,78,32,109,101,116,104,111,100,0,67,97,114,100,32,110,111,116,32,105,110,105,116,105,97,108,105,122,101,100,0,85,110,115,117,112,112,111,114,116,101,100,32,111,112,101,114,97,116,105,111,110,0,87,114,111,110,103,32,107,101,121,32,117,115,97,103,101,0,78,111,116,104,105,110,103,32,102,111,117,110,100,0,87,114,111,110,103,32,98,108,111,98,32,116,121,112,101,0,77,105,115,115,105,110,103,32,118,97,108,117,101,0,72,97,114,100,119,97,114,101,32,112,114,111,98,108,101,109,0,80,73,78,32,98,108,111,99,107,101,100,0,67,111,110,100,105,116,105,111,110,115,32,111,102,32,117,115,101,32,110,111,116,32,115,97,116,105,115,102,105,101,100,0,80,73,78,115,32,97,114,101,32,110,111,116,32,115,121,110,99,101,100,0,73,110,118,97,108,105,100,32,67,82,76,0,66,69,82,32,101,114,114,111,114,0,73,110,118,97,108,105,100,32,66,69,82,0,69,108,101,109,101,110,116,32,110,111,116,32,102,111,117,110,100,0,73,100,101,110,116,105,102,105,101,114,32,110,111,116,32,102,111,117,110,100,0,73,110,118,97,108,105,100,32,116,97,103,0,73,110,118,97,108,105,100,32,108,101,110,103,116,104,0,73,110,118,97,108,105,100,32,107,101,121,32,105,110,102,111,0,85,110,101,120,112,101,99,116,101,100,32,116,97,103,0,78,111,116,32,68,69,82,32,101,110,99,111,100,101,100,0,78,111,32,67,77,83,32,111,98,106,101,99,116,0,73,110,118,97,108,105,100,32,67,77,83,32,111,98,106,101,99,116,0,85,110,107,110,111,119,110,32,67,77,83,32,111,98,106,101,99,116,0,85,110,115,117,112,112,111,114,116,101,100,32,67,77,83,32,111,98,106,101,99,116,0,85,110,115,117,112,112,111,114,116,101,100,32,101,110,99,111,100,105,110,103,0,85,110,115,117,112,112,111,114,116,101,100,32,67,77,83,32,118,101,114,115,105,111,110,0,85,110,107,110,111,119,110,32,97,108,103,111,114,105,116,104,109,0,73,110,118,97,108,105,100,32,99,114,121,112,116,111,32,101,110,103,105,110,101,0,80,117,98,108,105,99,32,107,101,121,32,110,111,116,32,116,114,117,115,116,101,100,0,68,101,99,114,121,112,116,105,111,110,32,102,97,105,108,101,100,0,75,101,121,32,101,120,112,105,114,101,100,0,83,105,103,110,97,116,117,114,101,32,101,120,112,105,114,101,100,0,69,110,99,111,100,105,110,103,32,112,114,111,98,108,101,109,0,73,110,118,97,108,105,100,32,115,116,97,116,101,0,68,117,112,108,105,99,97,116,101,100,32,118,97,108,117,101,0,77,105,115,115,105,110,103,32,97,99,116,105,111,110,0,65,83,78,46,49,32,109,111,100,117,108,101,32,110,111,116,32,102,111,117,110,100,0,73,110,118,97,108,105,100,32,79,73,68,32,115,116,114,105,110,103,0,73,110,118,97,108,105,100,32,116,105,109,101,0,73,110,118,97,108,105,100,32,67,82,76,32,111,98,106,101,99,116,0,85,110,115,117,112,112,111,114,116,101,100,32,67,82,76,32,118,101,114,115,105,111,110,0,73,110,118,97,108,105,100,32,99,101,114,116,105,102,105,99,97,116,101,32,111,98,106,101,99,116,0,85,110,107,110,111,119,110,32,110,97,109,101,0,65,32,108,111,99,97,108,101,32,102,117,110,99,116,105,111,110,32,102,97,105,108,101,100,0,78,111,116,32,108,111,99,107,101,100,0,80,114,111,116,111,99,111,108,32,118,105,111,108,97,116,105,111,110,0,73,110,118,97,108,105,100,32,77,65,67,0,73,110,118,97,108,105,100,32,114,101,113,117,101,115,116,0,85,110,107,110,111,119,110,32,101,120,116,101,110,115,105,111,110,0,85,110,107,110,111,119,110,32,99,114,105,116,105,99,97,108,32,101,120,116,101,110,115,105,111,110,0,76,111,99,107,101,100,0,85,110,107,110,111,119,110,32,111,112,116,105,111,110,0,85,110,107,110,111,119,110,32,99,111,109,109,97,110,100,0,78,111,116,32,111,112,101,114,97,116,105,111,110,97,108,0,78,111,32,112,97,115,115,112,104,114,97,115,101,32,103,105,118,101,110,0,78,111,32,80,73,78,32,103,105,118,101,110,0,78,111,116,32,101,110,97,98,108,101,100,0,78,111,32,99,114,121,112,116,111,32,101,110,103,105,110,101,0,77,105,115,115,105,110,103,32,107,101,121,0,84,111,111,32,109,97,110,121,32,111,98,106,101,99,116,115,0,76,105,109,105,116,32,114,101,97,99,104,101,100,0,78,111,116,32,105,110,105,116,105,97,108,105,122,101,100,0,77,105,115,115,105,110,103,32,105,115,115,117,101,114,32,99,101,114,116,105,102,105,99,97,116,101,0,78,111,32,107,101,121,115,101,114,118,101,114,32,97,118,97,105,108,97,98,108,101,0,73,110,118,97,108,105,100,32,101,108,108,105,112,116,105,99,32,99,117,114,118,101,0,85,110,107,110,111,119,110,32,101,108,108,105,112,116,105,99,32,99,117,114,118,101,0,68,117,112,108,105,99,97,116,101,100,32,107,101,121,0,65,109,98,105,103,117,111,117,115,32,114,101,115,117,108,116,0,78,111,32,99,114,121,112,116,111,32,99,111,110,116,101,120,116,0,87,114,111,110,103,32,99,114,121,112,116,111,32,99,111,110,116,101,120,116,0,66,97,100,32,99,114,121,112,116,111,32,99,111,110,116,101,120,116,0,67,111,110,102,108,105,99,116,32,105,110,32,116,104,101,32,99,114,121,112,116,111,32,99,111,110,116,101,120,116,0,66,114,111,107,101,110,32,112,117,98,108,105,99,32,107,101,121,0,66,114,111,107,101,110,32,115,101,99,114,101,116,32,107,101,121,0,73,110,118,97,108,105,100,32,77,65,67,32,97,108,103,111,114,105,116,104,109,0,79,112,101,114,97,116,105,111,110,32,102,117,108,108,121,32,99,97,110,99,101,108,108,101,100,0,79,112,101,114,97,116,105,111,110,32,110,111,116,32,121,101,116,32,102,105,110,105,115,104,101,100,0,66,117,102,102,101,114,32,116,111,111,32,115,104,111,114,116,0,73,110,118,97,108,105,100,32,108,101,110,103,116,104,32,115,112,101,99,105,102,105,101,114,32,105,110,32,83,45,101,120,112,114,101,115,115,105,111,110,0,83,116,114,105,110,103,32,116,111,111,32,108,111,110,103,32,105,110,32,83,45,101,120,112,114,101,115,115,105,111,110,0,85,110,109,97,116,99,104,101,100,32,112,97,114,101,110,116,104,101,115,101,115,32,105,110,32,83,45,101,120,112,114,101,115,115,105,111,110,0,83,45,101,120,112,114,101,115,115,105,111,110,32,110,111,116,32,99,97,110,111,110,105,99,97,108,0,66,97,100,32,99,104,97,114,97,99,116,101,114,32,105,110,32,83,45,101,120,112,114,101,115,115,105,111,110,0,66,97,100,32,113,117,111,116,97,116,105,111,110,32,105,110,32,83,45,101,120,112,114,101,115,115,105,111,110,0,90,101,114,111,32,112,114,101,102,105,120,32,105,110,32,83,45,101,120,112,114,101,115,115,105,111,110,0,78,101,115,116,101,100,32,100,105,115,112,108,97,121,32,104,105,110,116,115,32,105,110,32,83,45,101,120,112,114,101,115,115,105,111,110,0,85,110,109,97,116,99,104,101,100,32,100,105,115,112,108,97,121,32,104,105,110,116,115,0,85,110,101,120,112,101,99,116,101,100,32,114,101,115,101,114,118,101,100,32,112,117,110,99,116,117,97,116,105,111,110,32,105,110,32,83,45,101,120,112,114,101,115,115,105,111,110,0,66,97,100,32,104,101,120,97,100,101,99,105,109,97,108,32,99,104,97,114,97,99,116,101,114,32,105,110,32,83,45,101,120,112,114,101,115,115,105,111,110,0,79,100,100,32,104,101,120,97,100,101,99,105,109,97,108,32,110,117,109,98,101,114,115,32,105,110,32,83,45,101,120,112,114,101,115,115,105,111,110,0,66,97,100,32,111,99,116,97,108,32,99,104,97,114,97,99,116,101,114,32,105,110,32,83,45,101,120,112,114,101,115,115,105,111,110,0,76,101,103,97,99,121,32,107,101,121,0,82,101,113,117,101,115,116,32,116,111,111,32,115,104,111,114,116,0,82,101,113,117,101,115,116,32,116,111,111,32,108,111,110,103,0,79,98,106,101,99,116,32,105,115,32,105,110,32,116,101,114,109,105,110,97,116,105,111,110,32,115,116,97,116,101,0,78,111,32,99,101,114,116,105,102,105,99,97,116,101,32,99,104,97,105,110,0,67,101,114,116,105,102,105,99,97,116,101,32,105,115,32,116,111,111,32,108,97,114,103,101,0,73,110,118,97,108,105,100,32,114,101,99,111,114,100,0,84,104,101,32,77,65,67,32,100,111,101,115,32,110,111,116,32,118,101,114,105,102,121,0,85,110,101,120,112,101,99,116,101,100,32,109,101,115,115,97,103,101,0,67,111,109,112,114,101,115,115,105,111,110,32,111,114,32,100,101,99,111,109,112,114,101,115,115,105,111,110,32,102,97,105,108,101,100,0,65,32,99,111,117,110,116,101,114,32,119,111,117,108,100,32,119,114,97,112,0,70,97,116,97,108,32,97,108,101,114,116,32,109,101,115,115,97,103,101,32,114,101,99,101,105,118,101,100,0,78,111,32,99,105,112,104,101,114,32,97,108,103,111,114,105,116,104,109,0,77,105,115,115,105,110,103,32,99,108,105,101,110,116,32,99,101,114,116,105,102,105,99,97,116,101,0,67,108,111,115,101,32,110,111,116,105,102,105,99,97,116,105,111,110,32,114,101,99,101,105,118,101,100,0,84,105,99,107,101,116,32,101,120,112,105,114,101,100,0,66,97,100,32,116,105,99,107,101,116,0,85,110,107,110,111,119,110,32,105,100,101,110,116,105,116,121,0,66,97,100,32,99,101,114,116,105,102,105,99,97,116,101,32,109,101,115,115,97,103,101,32,105,110,32,104,97,110,100,115,104,97,107,101,0,66,97,100,32,99,101,114,116,105,102,105,99,97,116,101,32,114,101,113,117,101,115,116,32,109,101,115,115,97,103,101,32,105,110,32,104,97,110,100,115,104,97,107,101,0,66,97,100,32,99,101,114,116,105,102,105,99,97,116,101,32,118,101,114,105,102,121,32,109,101,115,115,97,103,101,32,105,110,32,104,97,110,100,115,104,97,107,101,0,66,97,100,32,99,104,97,110,103,101,32,99,105,112,104,101,114,32,109,101,115,115,115,97,103,101,32,105,110,32,104,97,110,100,115,104,97,107,101,0,66,97,100,32,99,108,105,101,110,116,32,104,101,108,108,111,32,109,101,115,115,97,103,101,32,105,110,32,104,97,110,100,115,104,97,107,101,0,66,97,100,32,115,101,114,118,101,114,32,104,101,108,108,111,32,109,101,115,115,97,103,101,32,105,110,32,104,97,110,100,115,104,97,107,101,0,66,97,100,32,115,101,114,118,101,114,32,104,101,108,108,111,32,100,111,110,101,32,109,101,115,115,97,103,101,32,105,110,32,104,97,110,115,104,97,107,101,0,66,97,100,32,102,105,110,105,115,104,101,100,32,109,101,115,115,97,103,101,32,105,110,32,104,97,110,100,115,104,97,107,101,0,66,97,100,32,115,101,114,118,101,114,32,107,101,121,32,101,120,99,104,97,110,103,101,32,109,101,115,115,97,103,101,32,105,110,32,104,97,110,100,115,104,97,107,101,0,66,97,100,32,99,108,105,101,110,116,32,107,101,121,32,101,120,99,104,97,110,103,101,32,109,101,115,115,97,103,101,32,105,110,32,104,97,110,100,115,104,97,107,101,0,66,111,103,117,115,32,115,116,114,105,110,103,0,70,111,114,98,105,100,100,101,110,0,75,101,121,32,100,105,115,97,98,108,101,100,0,78,111,116,32,112,111,115,115,105,98,108,101,32,119,105,116,104,32,97,32,99,97,114,100,32,98,97,115,101,100,32,107,101,121,0,73,110,118,97,108,105,100,32,108,111,99,107,32,111,98,106,101,99,116,0,71,101,110,101,114,97,108,32,73,80,67,32,101,114,114,111,114,0,73,80,67,32,97,99,99,101,112,116,32,99,97,108,108,32,102,97,105,108,101,100,0,73,80,67,32,99,111,110,110,101,99,116,32,99,97,108,108,32,102,97,105,108,101,100,0,73,110,118,97,108,105,100,32,73,80,67,32,114,101,115,112,111,110,115,101,0,73,110,118,97,108,105,100,32,118,97,108,117,101,32,112,97,115,115,101,100,32,116,111,32,73,80,67,0,73,110,99,111,109,112,108,101,116,101,32,108,105,110,101,32,112,97,115,115,101,100,32,116,111,32,73,80,67,0,76,105,110,101,32,112,97,115,115,101,100,32,116,111,32,73,80,67,32,116,111,111,32,108,111,110,103,0,78,101,115,116,101,100,32,73,80,67,32,99,111,109,109,97,110,100,115,0,78,111,32,100,97,116,97,32,99,97,108,108,98,97,99,107,32,105,110,32,73,80,67,0,78,111,32,105,110,113,117,105,114,101,32,99,97,108,108,98,97,99,107,32,105,110,32,73,80,67,0,78,111,116,32,97,110,32,73,80,67,32,115,101,114,118,101,114,0,78,111,116,32,97,110,32,73,80,67,32,99,108,105,101,110,116,0,80,114,111,98,108,101,109,32,115,116,97,114,116,105,110,103,32,73,80,67,32,115,101,114,118,101,114,0,73,80,67,32,114,101,97,100,32,101,114,114,111,114,0,73,80,67,32,119,114,105,116,101,32,101,114,114,111,114,0,84,111,111,32,109,117,99,104,32,100,97,116,97,32,102,111,114,32,73,80,67,32,108,97,121,101,114,0,85,110,101,120,112,101,99,116,101,100,32,73,80,67,32,99,111,109,109,97,110,100,0,85,110,107,110,111,119,110,32,73,80,67,32,99,111,109,109,97,110,100,0,73,80,67,32,115,121,110,116,97,120,32,101,114,114,111,114,0,73,80,67,32,99,97,108,108,32,104,97,115,32,98,101,101,110,32,99,97,110,99,101,108,108,101,100,0,78,111,32,105,110,112,117,116,32,115,111,117,114,99,101,32,102,111,114,32,73,80,67,0,78,111,32,111,117,116,112,117,116,32,115,111,117,114,99,101,32,102,111,114,32,73,80,67,0,73,80,67,32,112,97,114,97,109,101,116,101,114,32,101,114,114,111,114,0,85,110,107,110,111,119,110,32,73,80,67,32,105,110,113,117,105,114,101,0,71,101,110,101,114,97,108,32,76,68,65,80,32,101,114,114,111,114,0,71,101,110,101,114,97,108,32,76,68,65,80,32,97,116,116,114,105,98,117,116,101,32,101,114,114,111,114,0,71,101,110,101,114,97,108,32,76,68,65,80,32,110,97,109,101,32,101,114,114,111,114,0,71,101,110,101,114,97,108,32,76,68,65,80,32,115,101,99,117,114,105,116,121,32,101,114,114,111,114,0,71,101,110,101,114,97,108,32,76,68,65,80,32,115,101,114,118,105,99,101,32,101,114,114,111,114,0,71,101,110,101,114,97,108,32,76,68,65,80,32,117,112,100,97,116,101,32,101,114,114,111,114,0,69,120,112,101,114,105,109,101,110,116,97,108,32,76,68,65,80,32,101,114,114,111,114,32,99,111,100,101,0,80,114,105,118,97,116,101,32,76,68,65,80,32,101,114,114,111,114,32,99,111,100,101,0,79,116,104,101,114,32,103,101,110,101,114,97,108,32,76,68,65,80,32,101,114,114,111,114,0,76,68,65,80,32,99,111,110,110,101,99,116,105,110,103,32,102,97,105,108,101,100,32,40,88,41,0,76,68,65,80,32,114,101,102,101,114,114,97,108,32,108,105,109,105,116,32,101,120,99,101,101,100,101,100,0,76,68,65,80,32,99,108,105,101,110,116,32,108,111,111,112,0,78,111,32,76,68,65,80,32,114,101,115,117,108,116,115,32,114,101,116,117,114,110,101,100,0,76,68,65,80,32,99,111,110,116,114,111,108,32,110,111,116,32,102,111,117,110,100,0,78,111,116,32,115,117,112,112,111,114,116,101,100,32,98,121,32,76,68,65,80,0,76,68,65,80,32,99,111,110,110,101,99,116,32,101,114,114,111,114,0,79,117,116,32,111,102,32,109,101,109,111,114,121,32,105,110,32,76,68,65,80,0,66,97,100,32,112,97,114,97,109,101,116,101,114,32,116,111,32,97,110,32,76,68,65,80,32,114,111,117,116,105,110,101,0,85,115,101,114,32,99,97,110,99,101,108,108,101,100,32,76,68,65,80,32,111,112,101,114,97,116,105,111,110,0,66,97,100,32,76,68,65,80,32,115,101,97,114,99,104,32,102,105,108,116,101,114,0,85,110,107,110,111,119,110,32,76,68,65,80,32,97,117,116,104,101,110,116,105,99,97,116,105,111,110,32,109,101,116,104,111,100,0,84,105,109,101,111,117,116,32,105,110,32,76,68,65,80,0,76,68,65,80,32,100,101,99,111,100,105,110,103,32,101,114,114,111,114,0,76,68,65,80,32,101,110,99,111,100,105,110,103,32,101,114,114,111,114,0,76,68,65,80,32,108,111,99,97,108,32,101,114,114,111,114,0,67,97,110,110,111,116,32,99,111,110,116,97,99,116,32,76,68,65,80,32,115,101,114,118,101,114,0,76,68,65,80,32,115,117,99,99,101,115,115,0,76,68,65,80,32,111,112,101,114,97,116,105,111,110,115,32,101,114,114,111,114,0,76,68,65,80,32,112,114,111,116,111,99,111,108,32,101,114,114,111,114,0,84,105,109,101,32,108,105,109,105,116,32,101,120,99,101,101,100,101,100,32,105,110,32,76,68,65,80,0,83,105,122,101,32,108,105,109,105,116,32,101,120,99,101,101,100,101,100,32,105,110,32,76,68,65,80,0,76,68,65,80,32,99,111,109,112,97,114,101,32,102,97,108,115,101,0,76,68,65,80,32,99,111,109,112,97,114,101,32,116,114,117,101,0,76,68,65,80,32,97,117,116,104,101,110,116,105,99,97,116,105,111,110,32,109,101,116,104,111,100,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,83,116,114,111,110,103,40,101,114,41,32,76,68,65,80,32,97,117,116,104,101,110,116,105,99,97,116,105,111,110,32,114,101,113,117,105,114,101,100,0,80,97,114,116,105,97,108,32,76,68,65,80,32,114,101,115,117,108,116,115,43,114,101,102,101,114,114,97,108,32,114,101,99,101,105,118,101,100,0,76,68,65,80,32,114,101,102,101,114,114,97,108,0,65,100,109,105,110,105,115,116,114,97,116,105,118,101,32,76,68,65,80,32,108,105,109,105,116,32,101,120,99,101,101,100,101,100,0,67,114,105,116,105,99,97,108,32,76,68,65,80,32,101,120,116,101,110,115,105,111,110,32,105,115,32,117,110,97,118,97,105,108,97,98,108,101,0,67,111,110,102,105,100,101,110,116,105,97,108,105,116,121,32,114,101,113,117,105,114,101,100,32,98,121,32,76,68,65,80,0,76,68,65,80,32,83,65,83,76,32,98,105,110,100,32,105,110,32,112,114,111,103,114,101,115,115,0,78,111,32,115,117,99,104,32,76,68,65,80,32,97,116,116,114,105,98,117,116,101,0,85,110,100,101,102,105,110,101,100,32,76,68,65,80,32,97,116,116,114,105,98,117,116,101,32,116,121,112,101,0,73,110,97,112,112,114,111,112,114,105,97,116,101,32,109,97,116,99,104,105,110,103,32,105,110,32,76,68,65,80,0,67,111,110,115,116,114,97,105,110,116,32,118,105,111,108,97,116,105,111,110,32,105,110,32,76,68,65,80,0,76,68,65,80,32,116,121,112,101,32,111,114,32,118,97,108,117,101,32,101,120,105,115,116,115,0,73,110,118,97,108,105,100,32,115,121,110,116,97,120,32,105,110,32,76,68,65,80,0,78,111,32,115,117,99,104,32,76,68,65,80,32,111,98,106,101,99,116,0,76,68,65,80,32,97,108,105,97,115,32,112,114,111,98,108,101,109,0,73,110,118,97,108,105,100,32,68,78,32,115,121,110,116,97,120,32,105,110,32,76,68,65,80,0,76,68,65,80,32,101,110,116,114,121,32,105,115,32,97,32,108,101,97,102,0,76,68,65,80,32,97,108,105,97,115,32,100,101,114,101,102,101,114,101,110,99,105,110,103,32,112,114,111,98,108,101,109,0,76,68,65,80,32,112,114,111,120,121,32,97,117,116,104,111,114,105,122,97,116,105,111,110,32,102,97,105,108,117,114,101,32,40,88,41,0,73,110,97,112,112,114,111,112,114,105,97,116,101,32,76,68,65,80,32,97,117,116,104,101,110,116,105,99,97,116,105,111,110,0,73,110,118,97,108,105,100,32,76,68,65,80,32,99,114,101,100,101,110,116,105,97,108,115,0,73,110,115,117,102,102,105,99,105,101,110,116,32,97,99,99,101,115,115,32,102,111,114,32,76,68,65,80,0,76,68,65,80,32,115,101,114,118,101,114,32,105,115,32,98,117,115,121,0,76,68,65,80,32,115,101,114,118,101,114,32,105,115,32,117,110,97,118,97,105,108,97,98,108,101,0,76,68,65,80,32,115,101,114,118,101,114,32,105,115,32,117,110,119,105,108,108,105,110,103,32,116,111,32,112,101,114,102,111,114,109,0,76,111,111,112,32,100,101,116,101,99,116,101,100,32,98,121,32,76,68,65,80,0,76,68,65,80,32,110,97,109,105,110,103,32,118,105,111,108,97,116,105,111,110,0,76,68,65,80,32,111,98,106,101,99,116,32,99,108,97,115,115,32,118,105,111,108,97,116,105,111,110,0,76,68,65,80,32,111,112,101,114,97,116,105,111,110,32,110,111,116,32,97,108,108,111,119,101,100,32,111,110,32,110,111,110,45,108,101,97,102,0,76,68,65,80,32,111,112,101,114,97,116,105,111,110,32,110,111,116,32,97,108,108,111,119,101,100,32,111,110,32,82,68,78,0,65,108,114,101,97,100,121,32,101,120,105,115,116,115,32,40,76,68,65,80,41,0,67,97,110,110,111,116,32,109,111,100,105,102,121,32,76,68,65,80,32,111,98,106,101,99,116,32,99,108,97,115,115,0,76,68,65,80,32,114,101,115,117,108,116,115,32,116,111,111,32,108,97,114,103,101,0,76,68,65,80,32,111,112,101,114,97,116,105,111,110,32,97,102,102,101,99,116,115,32,109,117,108,116,105,112,108,101,32,68,83,65,115,0,86,105,114,116,117,97,108,32,76,68,65,80,32,108,105,115,116,32,118,105,101,119,32,101,114,114,111,114,0,79,116,104,101,114,32,76,68,65,80,32,101,114,114,111,114,0,82,101,115,111,117,114,99,101,115,32,101,120,104,97,117,115,116,101,100,32,105,110,32,76,67,85,80,0,83,101,99,117,114,105,116,121,32,118,105,111,108,97,116,105,111,110,32,105,110,32,76,67,85,80,0,73,110,118,97,108,105,100,32,100,97,116,97,32,105,110,32,76,67,85,80,0,85,110,115,117,112,112,111,114,116,101,100,32,115,99,104,101,109,101,32,105,110,32,76,67,85,80,0,82,101,108,111,97,100,32,114,101,113,117,105,114,101,100,32,105,110,32,76,67,85,80,0,76,68,65,80,32,99,97,110,99,101,108,108,101,100,0,78,111,32,76,68,65,80,32,111,112,101,114,97,116,105,111,110,32,116,111,32,99,97,110,99,101,108,0,84,111,111,32,108,97,116,101,32,116,111,32,99,97,110,99,101,108,32,76,68,65,80,0,67,97,110,110,111,116,32,99,97,110,99,101,108,32,76,68,65,80,0,76,68,65,80,32,97,115,115,101,114,116,105,111,110,32,102,97,105,108,101,100,0,80,114,111,120,105,101,100,32,97,117,116,104,111,114,105,122,97,116,105,111,110,32,100,101,110,105,101,100,32,98,121,32,76,68,65,80,0,85,115,101,114,32,100,101,102,105,110,101,100,32,101,114,114,111,114,32,99,111,100,101,32,49,0,85,115,101,114,32,100,101,102,105,110,101,100,32,101,114,114,111,114,32,99,111,100,101,32,50,0,85,115,101,114,32,100,101,102,105,110,101,100,32,101,114,114,111,114,32,99,111,100,101,32,51,0,85,115,101,114,32,100,101,102,105,110,101,100,32,101,114,114,111,114,32,99,111,100,101,32,52,0,85,115,101,114,32,100,101,102,105,110,101,100,32,101,114,114,111,114,32,99,111,100,101,32,53,0,85,115,101,114,32,100,101,102,105,110,101,100,32,101,114,114,111,114,32,99,111,100,101,32,54,0,85,115,101,114,32,100,101,102,105,110,101,100,32,101,114,114,111,114,32,99,111,100,101,32,55,0,85,115,101,114,32,100,101,102,105,110,101,100,32,101,114,114,111,114,32,99,111,100,101,32,56,0,85,115,101,114,32,100,101,102,105,110,101,100,32,101,114,114,111,114,32,99,111,100,101,32,57,0,85,115,101,114,32,100,101,102,105,110,101,100,32,101,114,114,111,114,32,99,111,100,101,32,49,48,0,85,115,101,114,32,100,101,102,105,110,101,100,32,101,114,114,111,114,32,99,111,100,101,32,49,49,0,85,115,101,114,32,100,101,102,105,110,101,100,32,101,114,114,111,114,32,99,111,100,101,32,49,50,0,85,115,101,114,32,100,101,102,105,110,101,100,32,101,114,114,111,114,32,99,111,100,101,32,49,51,0,85,115,101,114,32,100,101,102,105,110,101,100,32,101,114,114,111,114,32,99,111,100,101,32,49,52,0,85,115,101,114,32,100,101,102,105,110,101],"i8",ALLOC_NONE,Runtime.GLOBAL_BASE+51200);allocate([100,32,101,114,114,111,114,32,99,111,100,101,32,49,53,0,85,115,101,114,32,100,101,102,105,110,101,100,32,101,114,114,111,114,32,99,111,100,101,32,49,54,0,83,121,115,116,101,109,32,101,114,114,111,114,32,119,47,111,32,101,114,114,110,111,0,85,110,107,110,111,119,110,32,115,121,115,116,101,109,32,101,114,114,111,114,0,69,110,100,32,111,102,32,102,105,108,101,0,85,110,107,110,111,119,110,32,101,114,114,111,114,32,99,111,100,101,0,97,109,111,117,110,116,46,99,0,84,65,76,69,82,95,97,109,111,117,110,116,95,99,109,112,0,65,115,115,101,114,116,105,111,110,32,102,97,105,108,101,100,32,97,116,32,37,115,58,37,100,46,10,0,84,65,76,69,82,95,97,109,111,117,110,116,95,115,117,98,116,114,97,99,116,0,84,65,76,69,82,95,97,109,111,117,110,116,95,97,100,100,0,18,17,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,17,34,35,36,17,37,38,39,40,41,42,43,44,17,45,46,47,16,16,48,16,16,16,16,16,16,16,49,50,51,16,52,53,16,16,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,54,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,55,17,17,17,17,56,17,57,58,59,60,61,62,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,63,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,17,64,65,17,66,67,68,69,70,71,72,73,16,16,16,74,75,76,77,78,16,16,16,79,80,16,16,16,16,81,16,16,16,16,16,16,16,16,16,17,17,17,82,83,16,16,16,16,16,16,16,16,16,16,16,17,17,17,17,84,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,17,17,85,16,16,16,16,86,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,87,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,88,89,90,91,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,92,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,254,255,255,7,254,255,255,7,0,0,0,0,0,4,32,4,255,255,127,255,255,255,127,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,195,255,3,0,31,80,0,0,0,0,0,0,0,0,0,0,32,0,0,0,0,0,223,60,64,215,255,255,251,255,255,255,255,255,255,255,255,255,191,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,3,252,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,254,255,255,255,127,2,254,255,255,255,255,0,0,0,0,0,255,191,182,0,255,255,255,7,7,0,0,0,255,7,255,255,255,255,255,255,255,254,255,195,255,255,255,255,255,255,255,255,255,255,255,255,239,31,254,225,255,159,0,0,255,255,255,255,255,255,0,224,255,255,255,255,255,255,255,255,255,255,255,255,3,0,255,255,255,255,255,7,48,4,255,255,255,252,255,31,0,0,255,255,255,1,0,0,0,0,0,0,0,0,253,31,0,0,0,0,0,0,240,3,255,127,255,255,255,255,255,255,255,239,255,223,225,255,207,255,254,254,238,159,249,255,255,253,197,227,159,89,128,176,207,255,3,0,238,135,249,255,255,253,109,195,135,25,2,94,192,255,63,0,238,191,251,255,255,253,237,227,191,27,1,0,207,255,0,0,238,159,249,255,255,253,237,227,159,25,192,176,207,255,2,0,236,199,61,214,24,199,255,195,199,29,129,0,192,255,0,0,238,223,253,255,255,253,239,227,223,29,96,3,207,255,0,0,236,223,253,255,255,253,239,227,223,29,96,64,207,255,6,0,236,223,253,255,255,255,255,231,223,93,128,0,207,255,0,252,236,255,127,252,255,255,251,47,127,128,95,255,0,0,12,0,254,255,255,255,255,127,255,7,63,32,255,3,0,0,0,0,150,37,240,254,174,236,255,59,95,32,255,243,0,0,0,0,1,0,0,0,255,3,0,0,255,254,255,255,255,31,254,255,3,255,255,254,255,255,255,31,0,0,0,0,0,0,0,0,255,255,255,255,255,255,127,249,255,3,255,255,231,193,255,255,127,64,255,51,255,255,255,255,191,32,255,255,255,255,255,247,255,255,255,255,255,255,255,255,255,61,127,61,255,255,255,255,255,61,255,255,255,255,61,127,61,255,127,255,255,255,255,255,255,255,61,255,255,255,255,255,255,255,255,135,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,31,0,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,159,255,255,254,255,255,7,255,255,255,255,255,255,255,255,255,199,1,0,255,223,15,0,255,255,15,0,255,255,15,0,255,223,13,0,255,255,255,255,255,255,207,255,255,1,128,16,255,3,0,0,0,0,255,3,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,7,255,255,255,255,255,255,255,255,63,0,255,255,255,31,255,15,255,1,192,255,255,255,255,63,31,0,255,255,255,255,255,15,255,255,255,3,255,3,0,0,0,0,255,255,255,15,255,255,255,255,255,255,255,127,254,255,31,0,255,3,255,3,128,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,239,255,239,15,255,3,0,0,0,0,255,255,255,255,255,243,255,255,255,255,255,255,191,255,3,0,255,255,255,255,255,255,63,0,255,227,255,255,255,255,255,63,0,0,0,0,0,0,0,0,0,0,0,0,0,222,111,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,63,63,255,255,255,255,63,63,255,170,255,255,255,63,255,255,255,255,255,255,223,95,220,31,207,15,255,31,220,31,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,128,0,0,255,31,0,0,0,0,0,0,0,0,0,0,0,0,132,252,47,62,80,189,255,243,224,67,0,0,255,255,255,255,255,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,255,255,255,255,255,255,3,0,0,255,255,255,255,255,127,255,255,255,255,255,127,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,31,120,12,0,255,255,255,255,191,32,255,255,255,255,255,255,255,128,0,0,255,255,127,0,127,127,127,127,127,127,127,127,255,255,255,255,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,224,0,0,0,254,3,62,31,254,255,255,255,255,255,255,255,255,255,127,224,254,255,255,255,255,255,255,255,255,255,255,247,224,255,255,255,255,63,254,255,255,255,255,255,255,255,255,255,255,127,0,0,255,255,255,7,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,63,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,31,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,31,0,0,0,0,0,0,0,0,255,255,255,255,255,63,255,31,255,255,255,15,0,0,255,255,255,255,255,127,240,143,255,255,255,128,255,255,255,255,255,255,255,255,255,255,0,0,0,0,128,255,252,255,255,255,255,255,255,255,255,255,255,255,255,121,15,0,255,7,0,0,0,0,0,0,0,0,0,255,187,247,255,255,255,0,0,0,255,255,255,255,255,255,15,0,255,255,255,255,255,255,255,255,15,0,255,3,0,0,252,8,255,255,255,255,255,7,255,255,255,255,7,0,255,255,255,31,255,255,255,255,255,255,247,255,0,128,255,3,0,0,0,0,255,255,255,255,255,255,127,0,255,63,255,3,255,255,127,4,255,255,255,255,255,255,255,127,5,0,0,56,255,255,60,0,126,126,126,0,127,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,7,255,3,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,15,0,255,255,127,248,255,255,255,255,255,15,255,255,255,255,255,255,255,255,255,255,255,255,255,63,255,255,255,255,255,255,255,255,255,255,255,255,255,3,0,0,0,0,127,0,248,224,255,253,127,95,219,255,255,255,255,255,255,255,255,255,255,255,255,255,3,0,0,0,248,255,255,255,255,255,255,255,255,255,255,255,255,63,0,0,255,255,255,255,255,255,255,255,252,255,255,255,255,255,255,0,0,0,0,0,255,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,223,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,31,0,0,255,3,254,255,255,7,254,255,255,7,192,255,255,255,255,255,255,255,255,255,255,127,252,252,252,28,0,0,0,0,255,239,255,255,127,255,255,183,255,63,255,63,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,7,0,0,0,0,0,0,0,0,255,255,255,255,255,255,31,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,31,255,255,255,255,255,255,1,0,0,0,0,0,255,255,255,127,0,0,255,255,255,7,0,0,0,0,0,0,255,255,255,63,255,255,255,255,15,255,62,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,63,255,3,0,0,0,0,0,0,0,0,0,0,63,253,255,255,255,255,191,145,255,255,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,63,0,255,255,255,3,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,192,0,0,0,0,0,0,0,0,111,240,239,254,255,255,15,0,0,0,0,0,255,255,255,31,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,63,0,255,255,63,0,255,255,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,63,0,0,0,192,255,0,0,252,255,255,255,255,255,255,1,0,0,255,255,255,1,255,3,255,255,255,255,255,255,199,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,30,0,255,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,63,0,255,3,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,31,0,255,255,255,255,255,127,0,0,248,255,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,223,255,255,255,255,255,255,255,255,223,100,222,255,235,239,255,255,255,255,255,255,255,191,231,223,223,255,255,255,123,95,252,253,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,63,255,255,255,253,255,255,247,255,255,255,247,255,255,223,255,255,255,223,255,255,127,255,255,255,127,255,255,255,253,255,255,255,253,255,255,247,207,255,255,255,255,255,255,239,255,255,255,150,254,247,10,132,234,150,170,150,247,247,94,255,251,255,15,238,251,255,15,0,0,0,0,0,0,0,0,84,33,34,25,13,1,2,3,17,75,28,12,16,4,11,29,18,30,39,104,110,111,112,113,98,32,5,6,15,19,20,21,26,8,22,7,40,36,23,24,9,10,14,27,31,37,35,131,130,125,38,42,43,60,61,62,63,67,71,74,77,88,89,90,91,92,93,94,95,96,97,99,100,101,102,103,105,106,107,108,114,115,116,121,122,123,124,0,73,108,108,101,103,97,108,32,98,121,116,101,32,115,101,113,117,101,110,99,101,0,68,111,109,97,105,110,32,101,114,114,111,114,0,82,101,115,117,108,116,32,110,111,116,32,114,101,112,114,101,115,101,110,116,97,98,108,101,0,78,111,116,32,97,32,116,116,121,0,80,101,114,109,105,115,115,105,111,110,32,100,101,110,105,101,100,0,79,112,101,114,97,116,105,111,110,32,110,111,116,32,112,101,114,109,105,116,116,101,100,0,78,111,32,115,117,99,104,32,102,105,108,101,32,111,114,32,100,105,114,101,99,116,111,114,121,0,78,111,32,115,117,99,104,32,112,114,111,99,101,115,115,0,70,105,108,101,32,101,120,105,115,116,115,0,86,97,108,117,101,32,116,111,111,32,108,97,114,103,101,32,102,111,114,32,100,97,116,97,32,116,121,112,101,0,78,111,32,115,112,97,99,101,32,108,101,102,116,32,111,110,32,100,101,118,105,99,101,0,79,117,116,32,111,102,32,109,101,109,111,114,121,0,82,101,115,111,117,114,99,101,32,98,117,115,121,0,73,110,116,101,114,114,117,112,116,101,100,32,115,121,115,116,101,109,32,99,97,108,108,0,82,101,115,111,117,114,99,101,32,116,101,109,112,111,114,97,114,105,108,121,32,117,110,97,118,97,105,108,97,98,108,101,0,73,110,118,97,108,105,100,32,115,101,101,107,0,67,114,111,115,115,45,100,101,118,105,99,101,32,108,105,110,107,0,82,101,97,100,45,111,110,108,121,32,102,105,108,101,32,115,121,115,116,101,109,0,68,105,114,101,99,116,111,114,121,32,110,111,116,32,101,109,112,116,121,0,67,111,110,110,101,99,116,105,111,110,32,114,101,115,101,116,32,98,121,32,112,101,101,114,0,79,112,101,114,97,116,105,111,110,32,116,105,109,101,100,32,111,117,116,0,67,111,110,110,101,99,116,105,111,110,32,114,101,102,117,115,101,100,0,72,111,115,116,32,105,115,32,100,111,119,110,0,72,111,115,116,32,105,115,32,117,110,114,101,97,99,104,97,98,108,101,0,65,100,100,114,101,115,115,32,105,110,32,117,115,101,0,66,114,111,107,101,110,32,112,105,112,101,0,73,47,79,32,101,114,114,111,114,0,78,111,32,115,117,99,104,32,100,101,118,105,99,101,32,111,114,32,97,100,100,114,101,115,115,0,66,108,111,99,107,32,100,101,118,105,99,101,32,114,101,113,117,105,114,101,100,0,78,111,32,115,117,99,104,32,100,101,118,105,99,101,0,78,111,116,32,97,32,100,105,114,101,99,116,111,114,121,0,73,115,32,97,32,100,105,114,101,99,116,111,114,121,0,84,101,120,116,32,102,105,108,101,32,98,117,115,121,0,69,120,101,99,32,102,111,114,109,97,116,32,101,114,114,111,114,0,73,110,118,97,108,105,100,32,97,114,103,117,109,101,110,116,0,65,114,103,117,109,101,110,116,32,108,105,115,116,32,116,111,111,32,108,111,110,103,0,83,121,109,98,111,108,105,99,32,108,105,110,107,32,108,111,111,112,0,70,105,108,101,110,97,109,101,32,116,111,111,32,108,111,110,103,0,84,111,111,32,109,97,110,121,32,111,112,101,110,32,102,105,108,101,115,32,105,110,32,115,121,115,116,101,109,0,78,111,32,102,105,108,101,32,100,101,115,99,114,105,112,116,111,114,115,32,97,118,97,105,108,97,98,108,101,0,66,97,100,32,102,105,108,101,32,100,101,115,99,114,105,112,116,111,114,0,78,111,32,99,104,105,108,100,32,112,114,111,99,101,115,115,0,66,97,100,32,97,100,100,114,101,115,115,0,70,105,108,101,32,116,111,111,32,108,97,114,103,101,0,84,111,111,32,109,97,110,121,32,108,105,110,107,115,0,78,111,32,108,111,99,107,115,32,97,118,97,105,108,97,98,108,101,0,82,101,115,111,117,114,99,101,32,100,101,97,100,108,111,99,107,32,119,111,117,108,100,32,111,99,99,117,114,0,83,116,97,116,101,32,110,111,116,32,114,101,99,111,118,101,114,97,98,108,101,0,80,114,101,118,105,111,117,115,32,111,119,110,101,114,32,100,105,101,100,0,79,112,101,114,97,116,105,111,110,32,99,97,110,99,101,108,101,100,0,70,117,110,99,116,105,111,110,32,110,111,116,32,105,109,112,108,101,109,101,110,116,101,100,0,78,111,32,109,101,115,115,97,103,101,32,111,102,32,100,101,115,105,114,101,100,32,116,121,112,101,0,73,100,101,110,116,105,102,105,101,114,32,114,101,109,111,118,101,100,0,68,101,118,105,99,101,32,110,111,116,32,97,32,115,116,114,101,97,109,0,78,111,32,100,97,116,97,32,97,118,97,105,108,97,98,108,101,0,68,101,118,105,99,101,32,116,105,109,101,111,117,116,0,79,117,116,32,111,102,32,115,116,114,101,97,109,115,32,114,101,115,111,117,114,99,101,115,0,76,105,110,107,32,104,97,115,32,98,101,101,110,32,115,101,118,101,114,101,100,0,80,114,111,116,111,99,111,108,32,101,114,114,111,114,0,66,97,100,32,109,101,115,115,97,103,101,0,70,105,108,101,32,100,101,115,99,114,105,112,116,111,114,32,105,110,32,98,97,100,32,115,116,97,116,101,0,78,111,116,32,97,32,115,111,99,107,101,116,0,68,101,115,116,105,110,97,116,105,111,110,32,97,100,100,114,101,115,115,32,114,101,113,117,105,114,101,100,0,77,101,115,115,97,103,101,32,116,111,111,32,108,97,114,103,101,0,80,114,111,116,111,99,111,108,32,119,114,111,110,103,32,116,121,112,101,32,102,111,114,32,115,111,99,107,101,116,0,80,114,111,116,111,99,111,108,32,110,111,116,32,97,118,97,105,108,97,98,108,101,0,80,114,111,116,111,99,111,108,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,83,111,99,107,101,116,32,116,121,112,101,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,78,111,116,32,115,117,112,112,111,114,116,101,100,0,80,114,111,116,111,99,111,108,32,102,97,109,105,108,121,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,65,100,100,114,101,115,115,32,102,97,109,105,108,121,32,110,111,116,32,115,117,112,112,111,114,116,101,100,32,98,121,32,112,114,111,116,111,99,111,108,0,65,100,100,114,101,115,115,32,110,111,116,32,97,118,97,105,108,97,98,108,101,0,78,101,116,119,111,114,107,32,105,115,32,100,111,119,110,0,78,101,116,119,111,114,107,32,117,110,114,101,97,99,104,97,98,108,101,0,67,111,110,110,101,99,116,105,111,110,32,114,101,115,101,116,32,98,121,32,110,101,116,119,111,114,107,0,67,111,110,110,101,99,116,105,111,110,32,97,98,111,114,116,101,100,0,78,111,32,98,117,102,102,101,114,32,115,112,97,99,101,32,97,118,97,105,108,97,98,108,101,0,83,111,99,107,101,116,32,105,115,32,99,111,110,110,101,99,116,101,100,0,83,111,99,107,101,116,32,110,111,116,32,99,111,110,110,101,99,116,101,100,0,67,97,110,110,111,116,32,115,101,110,100,32,97,102,116,101,114,32,115,111,99,107,101,116,32,115,104,117,116,100,111,119,110,0,79,112,101,114,97,116,105,111,110,32,97,108,114,101,97,100,121,32,105,110,32,112,114,111,103,114,101,115,115,0,79,112,101,114,97,116,105,111,110,32,105,110,32,112,114,111,103,114,101,115,115,0,83,116,97,108,101,32,102,105,108,101,32,104,97,110,100,108,101,0,82,101,109,111,116,101,32,73,47,79,32,101,114,114,111,114,0,81,117,111,116,97,32,101,120,99,101,101,100,101,100,0,78,111,32,109,101,100,105,117,109,32,102,111,117,110,100,0,87,114,111,110,103,32,109,101,100,105,117,109,32,116,121,112,101,0,78,111,32,101,114,114,111,114,32,105,110,102,111,114,109,97,116,105,111,110,0,0,17,0,10,0,17,17,17,0,0,0,0,5,0,0,0,0,0,0,9,0,0,0,0,11,0,0,0,0,0,0,0,0,17,0,15,10,17,17,17,3,10,7,0,1,19,9,11,11,0,0,9,6,11,0,0,11,0,6,17,0,0,0,17,17,17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,0,0,0,0,0,0,0,0,17,0,10,10,17,17,17,0,10,0,0,2,0,9,11,0,0,0,9,0,11,0,0,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,12,0,0,0,0,9,12,0,0,0,0,0,12,0,0,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,0,0,0,0,0,0,0,0,0,0,0,13,0,0,0,4,13,0,0,0,0,9,14,0,0,0,0,0,14,0,0,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,15,0,0,0,0,15,0,0,0,0,9,16,0,0,0,0,0,16,0,0,16,0,0,18,0,0,0,18,18,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,18,0,0,0,18,18,18,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,0,0,0,0,0,0,0,0,0,0,0,10,0,0,0,0,10,0,0,0,0,9,11,0,0,0,0,0,11,0,0,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,12,0,0,0,0,9,12,0,0,0,0,0,12,0,0,12,0,0,48,49,50,51,52,53,54,55,56,57,65,66,67,68,69,70,45,43,32,32,32,48,88,48,120,0,40,110,117,108,108,41,0,45,48,88,43,48,88,32,48,88,45,48,120,43,48,120,32,48,120,0,105,110,102,0,73,78,70,0,110,97,110,0,78,65,78,0,46,0,18,16,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,16,16,34,35,16,36,37,38,39,40,41,42,43,16,44,45,46,17,47,48,17,17,49,17,17,17,50,51,52,53,54,55,56,57,17,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,58,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,59,16,60,61,62,63,64,65,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,66,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,67,16,16,68,16,69,70,71,16,72,16,73,16,16,16,16,74,75,76,77,16,16,78,16,79,80,16,16,16,16,81,16,16,16,16,16,16,16,16,16,16,16,16,16,82,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,83,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,84,85,86,87,16,16,88,89,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,90,16,91,92,93,94,95,96,97,98,16,16,16,16,16,16,16,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,254,255,0,252,1,0,0,248,1,0,0,120,0,0,0,0,255,251,223,251,0,0,128,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,0,252,255,224,175,255,255,255,255,255,255,255,255,255,255,223,255,255,255,255,255,32,64,176,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,252,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,252,0,0,0,0,0,134,254,255,255,255,0,64,73,0,0,0,0,0,24,0,223,255,0,200,0,0,0,0,0,0,0,1,0,60,0,0,0,0,0,0,0,0,0,0,0,0,16,224,1,30,0,96,255,191,0,0,0,0,0,0,255,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,248,207,3,0,0,0,3,0,32,255,127,0,0,0,78,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,252,0,0,0,0,0,0,0,0,0,16,0,32,30,0,48,0,1,0,0,0,0,0,0,0,0,16,0,32,0,0,0,0,252,15,0,0,0,0,0,0,0,16,0,32,0,0,0,0,0,0,0,0,0,0,0,0,0,16,0,32,0,0,0,0,3,0,0,0,0,0,0,0,0,16,0,32,0,0,0,0,253,0,0,0,0,0,0,0,0,0,0,32,0,0,0,0,255,7,0,0,0,0,0,0,0,0,0,32,0,0,0,0,0,255,0,0,0,0,0,0,0,16,0,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32,0,0,0,0,63,2,0,0,0,0,0,0,0,0,0,4,0,0,0,0,16,0,0,0,0,0,0,128,0,128,192,223,0,12,0,0,0,0,0,0,0,0,0,0,0,0,0,31,0,0,0,0,0,0,254,255,255,255,0,252,255,255,0,0,0,0,0,0,0,0,252,0,0,0,0,0,0,192,255,223,255,7,0,0,0,0,0,0,0,0,0,0,128,6,0,252,0,0,24,62,0,0,128,191,0,204,0,0,0,0,0,0,0,0,0,0,0,8,0,0,0,0,0,0,0,0,0,0,0,96,255,255,255,31,0,0,255,3,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,96,0,0,1,0,0,24,0,0,0,0,0,0,0,0,0,56,0,0,0,0,16,0,0,0,112,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,48,0,0,254,127,47,0,0,255,3,255,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,49,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,196,255,255,255,255,0,0,0,192,0,0,0,0,0,0,0,0,1,0,224,159,0,0,0,0,127,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,0,16,0,0,252,255,255,255,31,0,0,0,0,0,12,0,0,0,0,0,0,64,0,12,240,0,0,0,0,0,0,192,248,0,0,0,0,0,0,0,192,0,0,0,0,0,0,0,0,255,0,255,255,255,33,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,127,0,0,240,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,3,224,0,224,0,224,0,96,128,248,255,255,255,252,255,255,255,255,255,127,31,252,241,127,255,127,0,0,255,255,255,3,0,0,255,255,255,255,1,0,123,3,208,193,175,66,0,12,31,188,255,255,0,0,0,0,0,2,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,15,0,255,255,255,255,127,0,0,0,255,7,0,0,255,255,255,255,255,255,255,255,255,255,63,0,0,0,0,0,0,252,255,255,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,31,255,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,224,135,3,254,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,127,255,15,0,0,0,0,0,0,0,0,255,255,255,251,255,255,255,255,255,255,255,255,255,255,15,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,63,0,0,0,255,15,30,255,255,255,1,252,193,224,0,0,0,0,0,0,0,0,0,0,0,30,1,0,0,0,0,0,0,0,0,0,0,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,255,255,15,0,0,0,255,255,255,127,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,127,0,0,0,0,0,0,192,0,224,0,0,0,0,0,0,0,0,0,0,0,128,15,112,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,255,255,127,0,3,0,0,0,0,0,0,0,0,0,0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,68,8,0,0,0,15,255,3,0,0,0,0,0,0,240,0,0,0,0,0,0,0,0,0,16,192,0,0,255,255,3,7,0,0,0,0,0,248,0,0,0,0,8,128,0,0,0,0,0,0,0,0,0,0,8,0,255,63,0,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,0,0,128,11,0,0,0,0,0,0,0,128,2,0,0,192,0,0,67,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,56,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,252,255,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,48,255,255,255,3,127,0,255,255,255,255,247,255,127,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,254,255,0,252,1,0,0,248,1,0,0,248,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,127,0,48,135,255,255,255,255,255,143,255,0,0,0,0,0,0,224,255,255,7,255,15,0,0,0,0,0,0,255,255,255,255,255,63,0,0,0,0,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,143,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,135,255,0,255,1,0,0,0,224,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,254,0,0,0,255,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,63,252,255,63,0,0,0,3,0,0,0,0,0,0,254,3,0,0,0,0,0,0,0,0,0,0,0,0,0,24,0,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,225,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,7,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,63,0,255,255,255,255,127,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,63,0,0,0,0,255,255,255,255,255,255,255,255,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,127,0,255,255,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,8,0,0,0,8,0,0,32,0,0,0,32,0,0,128,0,0,0,128,0,0,0,2,0,0,0,2,0,0,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,255,255,255,255,255,15,255,255,255,255,255,255,255,255,255,255,255,255,15,0,255,127,254,127,254,255,254,255,0,0,0,0,255,7,255,255,255,127,255,255,255,255,255,255,255,15,255,255,255,255,255,7,0,0,0,0,0,0,0,0,192,255,255,255,7,0,255,255,255,255,255,7,255,1,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,1,0,191,255,255,255,255,255,255,255,255,31,255,255,15,0,255,255,255,255,223,7,0,0,255,255,1,0,255,255,255,255,255,255,255,127,253,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,30,255,255,255,255,255,255,255,63,15,0,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,248,255,255,255,255,255,255,255,255,225,255,0,0,0,0,0,0,255,255,255,255,255,255,255,255,63,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,1,2,3,4,5,6,7,8,9,255,255,255,255,255,255,255,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,255,255,255,255,255,255,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,1,2,4,7,3,6,5,0,114,119,97,0,47,112,114,111,99,47,115,101,108,102,47,102,100,47,0],"i8",ALLOC_NONE,Runtime.GLOBAL_BASE+61440);var tempDoublePtr=Runtime.alignMemory(allocate(12,"i8",ALLOC_STATIC),8);assert(tempDoublePtr%8==0);function copyTempFloat(ptr){HEAP8[tempDoublePtr]=HEAP8[ptr];HEAP8[tempDoublePtr+1]=HEAP8[ptr+1];HEAP8[tempDoublePtr+2]=HEAP8[ptr+2];HEAP8[tempDoublePtr+3]=HEAP8[ptr+3]}function copyTempDouble(ptr){HEAP8[tempDoublePtr]=HEAP8[ptr];HEAP8[tempDoublePtr+1]=HEAP8[ptr+1];HEAP8[tempDoublePtr+2]=HEAP8[ptr+2];HEAP8[tempDoublePtr+3]=HEAP8[ptr+3];HEAP8[tempDoublePtr+4]=HEAP8[ptr+4];HEAP8[tempDoublePtr+5]=HEAP8[ptr+5];HEAP8[tempDoublePtr+6]=HEAP8[ptr+6];HEAP8[tempDoublePtr+7]=HEAP8[ptr+7]}Module["_i64Subtract"]=_i64Subtract;Module["_i64Add"]=_i64Add;function _pthread_mutex_lock(){}var ERRNO_CODES={EPERM:1,ENOENT:2,ESRCH:3,EINTR:4,EIO:5,ENXIO:6,E2BIG:7,ENOEXEC:8,EBADF:9,ECHILD:10,EAGAIN:11,EWOULDBLOCK:11,ENOMEM:12,EACCES:13,EFAULT:14,ENOTBLK:15,EBUSY:16,EEXIST:17,EXDEV:18,ENODEV:19,ENOTDIR:20,EISDIR:21,EINVAL:22,ENFILE:23,EMFILE:24,ENOTTY:25,ETXTBSY:26,EFBIG:27,ENOSPC:28,ESPIPE:29,EROFS:30,EMLINK:31,EPIPE:32,EDOM:33,ERANGE:34,ENOMSG:42,EIDRM:43,ECHRNG:44,EL2NSYNC:45,EL3HLT:46,EL3RST:47,ELNRNG:48,EUNATCH:49,ENOCSI:50,EL2HLT:51,EDEADLK:35,ENOLCK:37,EBADE:52,EBADR:53,EXFULL:54,ENOANO:55,EBADRQC:56,EBADSLT:57,EDEADLOCK:35,EBFONT:59,ENOSTR:60,ENODATA:61,ETIME:62,ENOSR:63,ENONET:64,ENOPKG:65,EREMOTE:66,ENOLINK:67,EADV:68,ESRMNT:69,ECOMM:70,EPROTO:71,EMULTIHOP:72,EDOTDOT:73,EBADMSG:74,ENOTUNIQ:76,EBADFD:77,EREMCHG:78,ELIBACC:79,ELIBBAD:80,ELIBSCN:81,ELIBMAX:82,ELIBEXEC:83,ENOSYS:38,ENOTEMPTY:39,ENAMETOOLONG:36,ELOOP:40,EOPNOTSUPP:95,EPFNOSUPPORT:96,ECONNRESET:104,ENOBUFS:105,EAFNOSUPPORT:97,EPROTOTYPE:91,ENOTSOCK:88,ENOPROTOOPT:92,ESHUTDOWN:108,ECONNREFUSED:111,EADDRINUSE:98,ECONNABORTED:103,ENETUNREACH:101,ENETDOWN:100,ETIMEDOUT:110,EHOSTDOWN:112,EHOSTUNREACH:113,EINPROGRESS:115,EALREADY:114,EDESTADDRREQ:89,EMSGSIZE:90,EPROTONOSUPPORT:93,ESOCKTNOSUPPORT:94,EADDRNOTAVAIL:99,ENETRESET:102,EISCONN:106,ENOTCONN:107,ETOOMANYREFS:109,EUSERS:87,EDQUOT:122,ESTALE:116,ENOTSUP:95,ENOMEDIUM:123,EILSEQ:84,EOVERFLOW:75,ECANCELED:125,ENOTRECOVERABLE:131,EOWNERDEAD:130,ESTRPIPE:86};var ERRNO_MESSAGES={0:"Success",1:"Not super-user",2:"No such file or directory",3:"No such process",4:"Interrupted system call",5:"I/O error",6:"No such device or address",7:"Arg list too long",8:"Exec format error",9:"Bad file number",10:"No children",11:"No more processes",12:"Not enough core",13:"Permission denied",14:"Bad address",15:"Block device required",16:"Mount device busy",17:"File exists",18:"Cross-device link",19:"No such device",20:"Not a directory",21:"Is a directory",22:"Invalid argument",23:"Too many open files in system",24:"Too many open files",25:"Not a typewriter",26:"Text file busy",27:"File too large",28:"No space left on device",29:"Illegal seek",30:"Read only file system",31:"Too many links",32:"Broken pipe",33:"Math arg out of domain of func",34:"Math result not representable",35:"File locking deadlock error",36:"File or path name too long",37:"No record locks available",38:"Function not implemented",39:"Directory not empty",40:"Too many symbolic links",42:"No message of desired type",43:"Identifier removed",44:"Channel number out of range",45:"Level 2 not synchronized",46:"Level 3 halted",47:"Level 3 reset",48:"Link number out of range",49:"Protocol driver not attached",50:"No CSI structure available",51:"Level 2 halted",52:"Invalid exchange",53:"Invalid request descriptor",54:"Exchange full",55:"No anode",56:"Invalid request code",57:"Invalid slot",59:"Bad font file fmt",60:"Device not a stream",61:"No data (for no delay io)",62:"Timer expired",63:"Out of streams resources",64:"Machine is not on the network",65:"Package not installed",66:"The object is remote",67:"The link has been severed",68:"Advertise error",69:"Srmount error",70:"Communication error on send",71:"Protocol error",72:"Multihop attempted",73:"Cross mount point (not really error)",74:"Trying to read unreadable message",75:"Value too large for defined data type",76:"Given log. name not unique",77:"f.d. invalid for this operation",78:"Remote address changed",79:"Can access a needed shared lib",80:"Accessing a corrupted shared lib",81:".lib section in a.out corrupted",82:"Attempting to link in too many libs",83:"Attempting to exec a shared library",84:"Illegal byte sequence",86:"Streams pipe error",87:"Too many users",88:"Socket operation on non-socket",89:"Destination address required",90:"Message too long",91:"Protocol wrong type for socket",92:"Protocol not available",93:"Unknown protocol",94:"Socket type not supported",95:"Not supported",96:"Protocol family not supported",97:"Address family not supported by protocol family",98:"Address already in use",99:"Address not available",100:"Network interface is not configured",101:"Network is unreachable",102:"Connection reset by network",103:"Connection aborted",104:"Connection reset by peer",105:"No buffer space available",106:"Socket is already connected",107:"Socket is not connected",108:"Can't send after socket shutdown",109:"Too many references",110:"Connection timed out",111:"Connection refused",112:"Host is down",113:"Host is unreachable",114:"Socket already connected",115:"Connection already in progress",116:"Stale file handle",122:"Quota exceeded",123:"No medium (in tape drive)",125:"Operation canceled",130:"Previous owner died",131:"State not recoverable"};function ___setErrNo(value){if(Module["___errno_location"])HEAP32[Module["___errno_location"]()>>2]=value;return value}var PATH={splitPath:(function(filename){var splitPathRe=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;return splitPathRe.exec(filename).slice(1)}),normalizeArray:(function(parts,allowAboveRoot){var up=0;for(var i=parts.length-1;i>=0;i--){var last=parts[i];if(last==="."){parts.splice(i,1)}else if(last===".."){parts.splice(i,1);up++}else if(up){parts.splice(i,1);up--}}if(allowAboveRoot){for(;up--;up){parts.unshift("..")}}return parts}),normalize:(function(path){var isAbsolute=path.charAt(0)==="/",trailingSlash=path.substr(-1)==="/";path=PATH.normalizeArray(path.split("/").filter((function(p){return!!p})),!isAbsolute).join("/");if(!path&&!isAbsolute){path="."}if(path&&trailingSlash){path+="/"}return(isAbsolute?"/":"")+path}),dirname:(function(path){var result=PATH.splitPath(path),root=result[0],dir=result[1];if(!root&&!dir){return"."}if(dir){dir=dir.substr(0,dir.length-1)}return root+dir}),basename:(function(path){if(path==="/")return"/";var lastSlash=path.lastIndexOf("/");if(lastSlash===-1)return path;return path.substr(lastSlash+1)}),extname:(function(path){return PATH.splitPath(path)[3]}),join:(function(){var paths=Array.prototype.slice.call(arguments,0);return PATH.normalize(paths.join("/"))}),join2:(function(l,r){return PATH.normalize(l+"/"+r)}),resolve:(function(){var resolvedPath="",resolvedAbsolute=false;for(var i=arguments.length-1;i>=-1&&!resolvedAbsolute;i--){var path=i>=0?arguments[i]:FS.cwd();if(typeof path!=="string"){throw new TypeError("Arguments to path.resolve must be strings")}else if(!path){return""}resolvedPath=path+"/"+resolvedPath;resolvedAbsolute=path.charAt(0)==="/"}resolvedPath=PATH.normalizeArray(resolvedPath.split("/").filter((function(p){return!!p})),!resolvedAbsolute).join("/");return(resolvedAbsolute?"/":"")+resolvedPath||"."}),relative:(function(from,to){from=PATH.resolve(from).substr(1);to=PATH.resolve(to).substr(1);function trim(arr){var start=0;for(;start<arr.length;start++){if(arr[start]!=="")break}var end=arr.length-1;for(;end>=0;end--){if(arr[end]!=="")break}if(start>end)return[];return arr.slice(start,end-start+1)}var fromParts=trim(from.split("/"));var toParts=trim(to.split("/"));var length=Math.min(fromParts.length,toParts.length);var samePartsLength=length;for(var i=0;i<length;i++){if(fromParts[i]!==toParts[i]){samePartsLength=i;break}}var outputParts=[];for(var i=samePartsLength;i<fromParts.length;i++){outputParts.push("..")}outputParts=outputParts.concat(toParts.slice(samePartsLength));return outputParts.join("/")})};var TTY={ttys:[],init:(function(){}),shutdown:(function(){}),register:(function(dev,ops){TTY.ttys[dev]={input:[],output:[],ops:ops};FS.registerDevice(dev,TTY.stream_ops)}),stream_ops:{open:(function(stream){var tty=TTY.ttys[stream.node.rdev];if(!tty){throw new FS.ErrnoError(ERRNO_CODES.ENODEV)}stream.tty=tty;stream.seekable=false}),close:(function(stream){stream.tty.ops.flush(stream.tty)}),flush:(function(stream){stream.tty.ops.flush(stream.tty)}),read:(function(stream,buffer,offset,length,pos){if(!stream.tty||!stream.tty.ops.get_char){throw new FS.ErrnoError(ERRNO_CODES.ENXIO)}var bytesRead=0;for(var i=0;i<length;i++){var result;try{result=stream.tty.ops.get_char(stream.tty)}catch(e){throw new FS.ErrnoError(ERRNO_CODES.EIO)}if(result===undefined&&bytesRead===0){throw new FS.ErrnoError(ERRNO_CODES.EAGAIN)}if(result===null||result===undefined)break;bytesRead++;buffer[offset+i]=result}if(bytesRead){stream.node.timestamp=Date.now()}return bytesRead}),write:(function(stream,buffer,offset,length,pos){if(!stream.tty||!stream.tty.ops.put_char){throw new FS.ErrnoError(ERRNO_CODES.ENXIO)}for(var i=0;i<length;i++){try{stream.tty.ops.put_char(stream.tty,buffer[offset+i])}catch(e){throw new FS.ErrnoError(ERRNO_CODES.EIO)}}if(length){stream.node.timestamp=Date.now()}return i})},default_tty_ops:{get_char:(function(tty){if(!tty.input.length){var result=null;if(ENVIRONMENT_IS_NODE){var BUFSIZE=256;var buf=new Buffer(BUFSIZE);var bytesRead=0;var fd=process.stdin.fd;var usingDevice=false;try{fd=fs.openSync("/dev/stdin","r");usingDevice=true}catch(e){}bytesRead=fs.readSync(fd,buf,0,BUFSIZE,null);if(usingDevice){fs.closeSync(fd)}if(bytesRead>0){result=buf.slice(0,bytesRead).toString("utf-8")}else{result=null}}else if(typeof window!="undefined"&&typeof window.prompt=="function"){result=window.prompt("Input: ");if(result!==null){result+="\n"}}else if(typeof readline=="function"){result=readline();if(result!==null){result+="\n"}}if(!result){return null}tty.input=intArrayFromString(result,true)}return tty.input.shift()}),put_char:(function(tty,val){if(val===null||val===10){Module["print"](UTF8ArrayToString(tty.output,0));tty.output=[]}else{if(val!=0)tty.output.push(val)}}),flush:(function(tty){if(tty.output&&tty.output.length>0){Module["print"](UTF8ArrayToString(tty.output,0));tty.output=[]}})},default_tty1_ops:{put_char:(function(tty,val){if(val===null||val===10){Module["printErr"](UTF8ArrayToString(tty.output,0));tty.output=[]}else{if(val!=0)tty.output.push(val)}}),flush:(function(tty){if(tty.output&&tty.output.length>0){Module["printErr"](UTF8ArrayToString(tty.output,0));tty.output=[]}})}};var MEMFS={ops_table:null,mount:(function(mount){return MEMFS.createNode(null,"/",16384|511,0)}),createNode:(function(parent,name,mode,dev){if(FS.isBlkdev(mode)||FS.isFIFO(mode)){throw new FS.ErrnoError(ERRNO_CODES.EPERM)}if(!MEMFS.ops_table){MEMFS.ops_table={dir:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr,lookup:MEMFS.node_ops.lookup,mknod:MEMFS.node_ops.mknod,rename:MEMFS.node_ops.rename,unlink:MEMFS.node_ops.unlink,rmdir:MEMFS.node_ops.rmdir,readdir:MEMFS.node_ops.readdir,symlink:MEMFS.node_ops.symlink},stream:{llseek:MEMFS.stream_ops.llseek}},file:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr},stream:{llseek:MEMFS.stream_ops.llseek,read:MEMFS.stream_ops.read,write:MEMFS.stream_ops.write,allocate:MEMFS.stream_ops.allocate,mmap:MEMFS.stream_ops.mmap,msync:MEMFS.stream_ops.msync}},link:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr,readlink:MEMFS.node_ops.readlink},stream:{}},chrdev:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr},stream:FS.chrdev_stream_ops}}}var node=FS.createNode(parent,name,mode,dev);if(FS.isDir(node.mode)){node.node_ops=MEMFS.ops_table.dir.node;node.stream_ops=MEMFS.ops_table.dir.stream;node.contents={}}else if(FS.isFile(node.mode)){node.node_ops=MEMFS.ops_table.file.node;node.stream_ops=MEMFS.ops_table.file.stream;node.usedBytes=0;node.contents=null}else if(FS.isLink(node.mode)){node.node_ops=MEMFS.ops_table.link.node;node.stream_ops=MEMFS.ops_table.link.stream}else if(FS.isChrdev(node.mode)){node.node_ops=MEMFS.ops_table.chrdev.node;node.stream_ops=MEMFS.ops_table.chrdev.stream}node.timestamp=Date.now();if(parent){parent.contents[name]=node}return node}),getFileDataAsRegularArray:(function(node){if(node.contents&&node.contents.subarray){var arr=[];for(var i=0;i<node.usedBytes;++i)arr.push(node.contents[i]);return arr}return node.contents}),getFileDataAsTypedArray:(function(node){if(!node.contents)return new Uint8Array;if(node.contents.subarray)return node.contents.subarray(0,node.usedBytes);return new Uint8Array(node.contents)}),expandFileStorage:(function(node,newCapacity){if(node.contents&&node.contents.subarray&&newCapacity>node.contents.length){node.contents=MEMFS.getFileDataAsRegularArray(node);node.usedBytes=node.contents.length}if(!node.contents||node.contents.subarray){var prevCapacity=node.contents?node.contents.buffer.byteLength:0;if(prevCapacity>=newCapacity)return;var CAPACITY_DOUBLING_MAX=1024*1024;newCapacity=Math.max(newCapacity,prevCapacity*(prevCapacity<CAPACITY_DOUBLING_MAX?2:1.125)|0);if(prevCapacity!=0)newCapacity=Math.max(newCapacity,256);var oldContents=node.contents;node.contents=new Uint8Array(newCapacity);if(node.usedBytes>0)node.contents.set(oldContents.subarray(0,node.usedBytes),0);return}if(!node.contents&&newCapacity>0)node.contents=[];while(node.contents.length<newCapacity)node.contents.push(0)}),resizeFileStorage:(function(node,newSize){if(node.usedBytes==newSize)return;if(newSize==0){node.contents=null;node.usedBytes=0;return}if(!node.contents||node.contents.subarray){var oldContents=node.contents;node.contents=new Uint8Array(new ArrayBuffer(newSize));if(oldContents){node.contents.set(oldContents.subarray(0,Math.min(newSize,node.usedBytes)))}node.usedBytes=newSize;return}if(!node.contents)node.contents=[];if(node.contents.length>newSize)node.contents.length=newSize;else while(node.contents.length<newSize)node.contents.push(0);node.usedBytes=newSize}),node_ops:{getattr:(function(node){var attr={};attr.dev=FS.isChrdev(node.mode)?node.id:1;attr.ino=node.id;attr.mode=node.mode;attr.nlink=1;attr.uid=0;attr.gid=0;attr.rdev=node.rdev;if(FS.isDir(node.mode)){attr.size=4096}else if(FS.isFile(node.mode)){attr.size=node.usedBytes}else if(FS.isLink(node.mode)){attr.size=node.link.length}else{attr.size=0}attr.atime=new Date(node.timestamp);attr.mtime=new Date(node.timestamp);attr.ctime=new Date(node.timestamp);attr.blksize=4096;attr.blocks=Math.ceil(attr.size/attr.blksize);return attr}),setattr:(function(node,attr){if(attr.mode!==undefined){node.mode=attr.mode}if(attr.timestamp!==undefined){node.timestamp=attr.timestamp}if(attr.size!==undefined){MEMFS.resizeFileStorage(node,attr.size)}}),lookup:(function(parent,name){throw FS.genericErrors[ERRNO_CODES.ENOENT]}),mknod:(function(parent,name,mode,dev){return MEMFS.createNode(parent,name,mode,dev)}),rename:(function(old_node,new_dir,new_name){if(FS.isDir(old_node.mode)){var new_node;try{new_node=FS.lookupNode(new_dir,new_name)}catch(e){}if(new_node){for(var i in new_node.contents){throw new FS.ErrnoError(ERRNO_CODES.ENOTEMPTY)}}}delete old_node.parent.contents[old_node.name];old_node.name=new_name;new_dir.contents[new_name]=old_node;old_node.parent=new_dir}),unlink:(function(parent,name){delete parent.contents[name]}),rmdir:(function(parent,name){var node=FS.lookupNode(parent,name);for(var i in node.contents){throw new FS.ErrnoError(ERRNO_CODES.ENOTEMPTY)}delete parent.contents[name]}),readdir:(function(node){var entries=[".",".."];for(var key in node.contents){if(!node.contents.hasOwnProperty(key)){continue}entries.push(key)}return entries}),symlink:(function(parent,newname,oldpath){var node=MEMFS.createNode(parent,newname,511|40960,0);node.link=oldpath;return node}),readlink:(function(node){if(!FS.isLink(node.mode)){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}return node.link})},stream_ops:{read:(function(stream,buffer,offset,length,position){var contents=stream.node.contents;if(position>=stream.node.usedBytes)return 0;var size=Math.min(stream.node.usedBytes-position,length);assert(size>=0);if(size>8&&contents.subarray){buffer.set(contents.subarray(position,position+size),offset)}else{for(var i=0;i<size;i++)buffer[offset+i]=contents[position+i]}return size}),write:(function(stream,buffer,offset,length,position,canOwn){if(!length)return 0;var node=stream.node;node.timestamp=Date.now();if(buffer.subarray&&(!node.contents||node.contents.subarray)){if(canOwn){node.contents=buffer.subarray(offset,offset+length);node.usedBytes=length;return length}else if(node.usedBytes===0&&position===0){node.contents=new Uint8Array(buffer.subarray(offset,offset+length));node.usedBytes=length;return length}else if(position+length<=node.usedBytes){node.contents.set(buffer.subarray(offset,offset+length),position);return length}}MEMFS.expandFileStorage(node,position+length);if(node.contents.subarray&&buffer.subarray)node.contents.set(buffer.subarray(offset,offset+length),position);else{for(var i=0;i<length;i++){node.contents[position+i]=buffer[offset+i]}}node.usedBytes=Math.max(node.usedBytes,position+length);return length}),llseek:(function(stream,offset,whence){var position=offset;if(whence===1){position+=stream.position}else if(whence===2){if(FS.isFile(stream.node.mode)){position+=stream.node.usedBytes}}if(position<0){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}return position}),allocate:(function(stream,offset,length){MEMFS.expandFileStorage(stream.node,offset+length);stream.node.usedBytes=Math.max(stream.node.usedBytes,offset+length)}),mmap:(function(stream,buffer,offset,length,position,prot,flags){if(!FS.isFile(stream.node.mode)){throw new FS.ErrnoError(ERRNO_CODES.ENODEV)}var ptr;var allocated;var contents=stream.node.contents;if(!(flags&2)&&(contents.buffer===buffer||contents.buffer===buffer.buffer)){allocated=false;ptr=contents.byteOffset}else{if(position>0||position+length<stream.node.usedBytes){if(contents.subarray){contents=contents.subarray(position,position+length)}else{contents=Array.prototype.slice.call(contents,position,position+length)}}allocated=true;ptr=_malloc(length);if(!ptr){throw new FS.ErrnoError(ERRNO_CODES.ENOMEM)}buffer.set(contents,ptr)}return{ptr:ptr,allocated:allocated}}),msync:(function(stream,buffer,offset,length,mmapFlags){if(!FS.isFile(stream.node.mode)){throw new FS.ErrnoError(ERRNO_CODES.ENODEV)}if(mmapFlags&2){return 0}var bytesWritten=MEMFS.stream_ops.write(stream,buffer,0,length,offset,false);return 0})}};var IDBFS={dbs:{},indexedDB:(function(){if(typeof indexedDB!=="undefined")return indexedDB;var ret=null;if(typeof window==="object")ret=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB;assert(ret,"IDBFS used, but indexedDB not supported");return ret}),DB_VERSION:21,DB_STORE_NAME:"FILE_DATA",mount:(function(mount){return MEMFS.mount.apply(null,arguments)}),syncfs:(function(mount,populate,callback){IDBFS.getLocalSet(mount,(function(err,local){if(err)return callback(err);IDBFS.getRemoteSet(mount,(function(err,remote){if(err)return callback(err);var src=populate?remote:local;var dst=populate?local:remote;IDBFS.reconcile(src,dst,callback)}))}))}),getDB:(function(name,callback){var db=IDBFS.dbs[name];if(db){return callback(null,db)}var req;try{req=IDBFS.indexedDB().open(name,IDBFS.DB_VERSION)}catch(e){return callback(e)}req.onupgradeneeded=(function(e){var db=e.target.result;var transaction=e.target.transaction;var fileStore;if(db.objectStoreNames.contains(IDBFS.DB_STORE_NAME)){fileStore=transaction.objectStore(IDBFS.DB_STORE_NAME)}else{fileStore=db.createObjectStore(IDBFS.DB_STORE_NAME)}if(!fileStore.indexNames.contains("timestamp")){fileStore.createIndex("timestamp","timestamp",{unique:false})}});req.onsuccess=(function(){db=req.result;IDBFS.dbs[name]=db;callback(null,db)});req.onerror=(function(e){callback(this.error);e.preventDefault()})}),getLocalSet:(function(mount,callback){var entries={};function isRealDir(p){return p!=="."&&p!==".."}function toAbsolute(root){return(function(p){return PATH.join2(root,p)})}var check=FS.readdir(mount.mountpoint).filter(isRealDir).map(toAbsolute(mount.mountpoint));while(check.length){var path=check.pop();var stat;try{stat=FS.stat(path)}catch(e){return callback(e)}if(FS.isDir(stat.mode)){check.push.apply(check,FS.readdir(path).filter(isRealDir).map(toAbsolute(path)))}entries[path]={timestamp:stat.mtime}}return callback(null,{type:"local",entries:entries})}),getRemoteSet:(function(mount,callback){var entries={};IDBFS.getDB(mount.mountpoint,(function(err,db){if(err)return callback(err);var transaction=db.transaction([IDBFS.DB_STORE_NAME],"readonly");transaction.onerror=(function(e){callback(this.error);e.preventDefault()});var store=transaction.objectStore(IDBFS.DB_STORE_NAME);var index=store.index("timestamp");index.openKeyCursor().onsuccess=(function(event){var cursor=event.target.result;if(!cursor){return callback(null,{type:"remote",db:db,entries:entries})}entries[cursor.primaryKey]={timestamp:cursor.key};cursor.continue()})}))}),loadLocalEntry:(function(path,callback){var stat,node;try{var lookup=FS.lookupPath(path);node=lookup.node;stat=FS.stat(path)}catch(e){return callback(e)}if(FS.isDir(stat.mode)){return callback(null,{timestamp:stat.mtime,mode:stat.mode})}else if(FS.isFile(stat.mode)){node.contents=MEMFS.getFileDataAsTypedArray(node);return callback(null,{timestamp:stat.mtime,mode:stat.mode,contents:node.contents})}else{return callback(new Error("node type not supported"))}}),storeLocalEntry:(function(path,entry,callback){try{if(FS.isDir(entry.mode)){FS.mkdir(path,entry.mode)}else if(FS.isFile(entry.mode)){FS.writeFile(path,entry.contents,{encoding:"binary",canOwn:true})}else{return callback(new Error("node type not supported"))}FS.chmod(path,entry.mode);FS.utime(path,entry.timestamp,entry.timestamp)}catch(e){return callback(e)}callback(null)}),removeLocalEntry:(function(path,callback){try{var lookup=FS.lookupPath(path);var stat=FS.stat(path);if(FS.isDir(stat.mode)){FS.rmdir(path)}else if(FS.isFile(stat.mode)){FS.unlink(path)}}catch(e){return callback(e)}callback(null)}),loadRemoteEntry:(function(store,path,callback){var req=store.get(path);req.onsuccess=(function(event){callback(null,event.target.result)});req.onerror=(function(e){callback(this.error);e.preventDefault()})}),storeRemoteEntry:(function(store,path,entry,callback){var req=store.put(entry,path);req.onsuccess=(function(){callback(null)});req.onerror=(function(e){callback(this.error);e.preventDefault()})}),removeRemoteEntry:(function(store,path,callback){var req=store.delete(path);req.onsuccess=(function(){callback(null)});req.onerror=(function(e){callback(this.error);e.preventDefault()})}),reconcile:(function(src,dst,callback){var total=0;var create=[];Object.keys(src.entries).forEach((function(key){var e=src.entries[key];var e2=dst.entries[key];if(!e2||e.timestamp>e2.timestamp){create.push(key);total++}}));var remove=[];Object.keys(dst.entries).forEach((function(key){var e=dst.entries[key];var e2=src.entries[key];if(!e2){remove.push(key);total++}}));if(!total){return callback(null)}var errored=false;var completed=0;var db=src.type==="remote"?src.db:dst.db;var transaction=db.transaction([IDBFS.DB_STORE_NAME],"readwrite");var store=transaction.objectStore(IDBFS.DB_STORE_NAME);function done(err){if(err){if(!done.errored){done.errored=true;return callback(err)}return}if(++completed>=total){return callback(null)}}transaction.onerror=(function(e){done(this.error);e.preventDefault()});create.sort().forEach((function(path){if(dst.type==="local"){IDBFS.loadRemoteEntry(store,path,(function(err,entry){if(err)return done(err);IDBFS.storeLocalEntry(path,entry,done)}))}else{IDBFS.loadLocalEntry(path,(function(err,entry){if(err)return done(err);IDBFS.storeRemoteEntry(store,path,entry,done)}))}}));remove.sort().reverse().forEach((function(path){if(dst.type==="local"){IDBFS.removeLocalEntry(path,done)}else{IDBFS.removeRemoteEntry(store,path,done)}}))})};var NODEFS={isWindows:false,staticInit:(function(){NODEFS.isWindows=!!process.platform.match(/^win/)}),mount:(function(mount){assert(ENVIRONMENT_IS_NODE);return NODEFS.createNode(null,"/",NODEFS.getMode(mount.opts.root),0)}),createNode:(function(parent,name,mode,dev){if(!FS.isDir(mode)&&!FS.isFile(mode)&&!FS.isLink(mode)){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}var node=FS.createNode(parent,name,mode);node.node_ops=NODEFS.node_ops;node.stream_ops=NODEFS.stream_ops;return node}),getMode:(function(path){var stat;try{stat=fs.lstatSync(path);if(NODEFS.isWindows){stat.mode=stat.mode|(stat.mode&146)>>1}}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(ERRNO_CODES[e.code])}return stat.mode}),realPath:(function(node){var parts=[];while(node.parent!==node){parts.push(node.name);node=node.parent}parts.push(node.mount.opts.root);parts.reverse();return PATH.join.apply(null,parts)}),flagsToPermissionStringMap:{0:"r",1:"r+",2:"r+",64:"r",65:"r+",66:"r+",129:"rx+",193:"rx+",514:"w+",577:"w",578:"w+",705:"wx",706:"wx+",1024:"a",1025:"a",1026:"a+",1089:"a",1090:"a+",1153:"ax",1154:"ax+",1217:"ax",1218:"ax+",4096:"rs",4098:"rs+"},flagsToPermissionString:(function(flags){flags&=~32768;flags&=~524288;if(flags in NODEFS.flagsToPermissionStringMap){return NODEFS.flagsToPermissionStringMap[flags]}else{throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}}),node_ops:{getattr:(function(node){var path=NODEFS.realPath(node);var stat;try{stat=fs.lstatSync(path)}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(ERRNO_CODES[e.code])}if(NODEFS.isWindows&&!stat.blksize){stat.blksize=4096}if(NODEFS.isWindows&&!stat.blocks){stat.blocks=(stat.size+stat.blksize-1)/stat.blksize|0}return{dev:stat.dev,ino:stat.ino,mode:stat.mode,nlink:stat.nlink,uid:stat.uid,gid:stat.gid,rdev:stat.rdev,size:stat.size,atime:stat.atime,mtime:stat.mtime,ctime:stat.ctime,blksize:stat.blksize,blocks:stat.blocks}}),setattr:(function(node,attr){var path=NODEFS.realPath(node);try{if(attr.mode!==undefined){fs.chmodSync(path,attr.mode);node.mode=attr.mode}if(attr.timestamp!==undefined){var date=new Date(attr.timestamp);fs.utimesSync(path,date,date)}if(attr.size!==undefined){fs.truncateSync(path,attr.size)}}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(ERRNO_CODES[e.code])}}),lookup:(function(parent,name){var path=PATH.join2(NODEFS.realPath(parent),name);var mode=NODEFS.getMode(path);return NODEFS.createNode(parent,name,mode)}),mknod:(function(parent,name,mode,dev){var node=NODEFS.createNode(parent,name,mode,dev);var path=NODEFS.realPath(node);try{if(FS.isDir(node.mode)){fs.mkdirSync(path,node.mode)}else{fs.writeFileSync(path,"",{mode:node.mode})}}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(ERRNO_CODES[e.code])}return node}),rename:(function(oldNode,newDir,newName){var oldPath=NODEFS.realPath(oldNode);var newPath=PATH.join2(NODEFS.realPath(newDir),newName);try{fs.renameSync(oldPath,newPath)}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(ERRNO_CODES[e.code])}}),unlink:(function(parent,name){var path=PATH.join2(NODEFS.realPath(parent),name);try{fs.unlinkSync(path)}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(ERRNO_CODES[e.code])}}),rmdir:(function(parent,name){var path=PATH.join2(NODEFS.realPath(parent),name);try{fs.rmdirSync(path)}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(ERRNO_CODES[e.code])}}),readdir:(function(node){var path=NODEFS.realPath(node);try{return fs.readdirSync(path)}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(ERRNO_CODES[e.code])}}),symlink:(function(parent,newName,oldPath){var newPath=PATH.join2(NODEFS.realPath(parent),newName);try{fs.symlinkSync(oldPath,newPath)}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(ERRNO_CODES[e.code])}}),readlink:(function(node){var path=NODEFS.realPath(node);try{path=fs.readlinkSync(path);path=NODEJS_PATH.relative(NODEJS_PATH.resolve(node.mount.opts.root),path);return path}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(ERRNO_CODES[e.code])}})},stream_ops:{open:(function(stream){var path=NODEFS.realPath(stream.node);try{if(FS.isFile(stream.node.mode)){stream.nfd=fs.openSync(path,NODEFS.flagsToPermissionString(stream.flags))}}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(ERRNO_CODES[e.code])}}),close:(function(stream){try{if(FS.isFile(stream.node.mode)&&stream.nfd){fs.closeSync(stream.nfd)}}catch(e){if(!e.code)throw e;throw new FS.ErrnoError(ERRNO_CODES[e.code])}}),read:(function(stream,buffer,offset,length,position){if(length===0)return 0;var nbuffer=new Buffer(length);var res;try{res=fs.readSync(stream.nfd,nbuffer,0,length,position)}catch(e){throw new FS.ErrnoError(ERRNO_CODES[e.code])}if(res>0){for(var i=0;i<res;i++){buffer[offset+i]=nbuffer[i]}}return res}),write:(function(stream,buffer,offset,length,position){var nbuffer=new Buffer(buffer.subarray(offset,offset+length));var res;try{res=fs.writeSync(stream.nfd,nbuffer,0,length,position)}catch(e){throw new FS.ErrnoError(ERRNO_CODES[e.code])}return res}),llseek:(function(stream,offset,whence){var position=offset;if(whence===1){position+=stream.position}else if(whence===2){if(FS.isFile(stream.node.mode)){try{var stat=fs.fstatSync(stream.nfd);position+=stat.size}catch(e){throw new FS.ErrnoError(ERRNO_CODES[e.code])}}}if(position<0){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}return position})}};var WORKERFS={DIR_MODE:16895,FILE_MODE:33279,reader:null,mount:(function(mount){assert(ENVIRONMENT_IS_WORKER);if(!WORKERFS.reader)WORKERFS.reader=new FileReaderSync;var root=WORKERFS.createNode(null,"/",WORKERFS.DIR_MODE,0);var createdParents={};function ensureParent(path){var parts=path.split("/");var parent=root;for(var i=0;i<parts.length-1;i++){var curr=parts.slice(0,i+1).join("/");if(!createdParents[curr]){createdParents[curr]=WORKERFS.createNode(parent,curr,WORKERFS.DIR_MODE,0)}parent=createdParents[curr]}return parent}function base(path){var parts=path.split("/");return parts[parts.length-1]}Array.prototype.forEach.call(mount.opts["files"]||[],(function(file){WORKERFS.createNode(ensureParent(file.name),base(file.name),WORKERFS.FILE_MODE,0,file,file.lastModifiedDate)}));(mount.opts["blobs"]||[]).forEach((function(obj){WORKERFS.createNode(ensureParent(obj["name"]),base(obj["name"]),WORKERFS.FILE_MODE,0,obj["data"])}));(mount.opts["packages"]||[]).forEach((function(pack){pack["metadata"].files.forEach((function(file){var name=file.filename.substr(1);WORKERFS.createNode(ensureParent(name),base(name),WORKERFS.FILE_MODE,0,pack["blob"].slice(file.start,file.end))}))}));return root}),createNode:(function(parent,name,mode,dev,contents,mtime){var node=FS.createNode(parent,name,mode);node.mode=mode;node.node_ops=WORKERFS.node_ops;node.stream_ops=WORKERFS.stream_ops;node.timestamp=(mtime||new Date).getTime();assert(WORKERFS.FILE_MODE!==WORKERFS.DIR_MODE);if(mode===WORKERFS.FILE_MODE){node.size=contents.size;node.contents=contents}else{node.size=4096;node.contents={}}if(parent){parent.contents[name]=node}return node}),node_ops:{getattr:(function(node){return{dev:1,ino:undefined,mode:node.mode,nlink:1,uid:0,gid:0,rdev:undefined,size:node.size,atime:new Date(node.timestamp),mtime:new Date(node.timestamp),ctime:new Date(node.timestamp),blksize:4096,blocks:Math.ceil(node.size/4096)}}),setattr:(function(node,attr){if(attr.mode!==undefined){node.mode=attr.mode}if(attr.timestamp!==undefined){node.timestamp=attr.timestamp}}),lookup:(function(parent,name){throw new FS.ErrnoError(ERRNO_CODES.ENOENT)}),mknod:(function(parent,name,mode,dev){throw new FS.ErrnoError(ERRNO_CODES.EPERM)}),rename:(function(oldNode,newDir,newName){throw new FS.ErrnoError(ERRNO_CODES.EPERM)}),unlink:(function(parent,name){throw new FS.ErrnoError(ERRNO_CODES.EPERM)}),rmdir:(function(parent,name){throw new FS.ErrnoError(ERRNO_CODES.EPERM)}),readdir:(function(node){throw new FS.ErrnoError(ERRNO_CODES.EPERM)}),symlink:(function(parent,newName,oldPath){throw new FS.ErrnoError(ERRNO_CODES.EPERM)}),readlink:(function(node){throw new FS.ErrnoError(ERRNO_CODES.EPERM)})},stream_ops:{read:(function(stream,buffer,offset,length,position){if(position>=stream.node.size)return 0;var chunk=stream.node.contents.slice(position,position+length);var ab=WORKERFS.reader.readAsArrayBuffer(chunk);buffer.set(new Uint8Array(ab),offset);return chunk.size}),write:(function(stream,buffer,offset,length,position){throw new FS.ErrnoError(ERRNO_CODES.EIO)}),llseek:(function(stream,offset,whence){var position=offset;if(whence===1){position+=stream.position}else if(whence===2){if(FS.isFile(stream.node.mode)){position+=stream.node.size}}if(position<0){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}return position})}};var _stdin=allocate(1,"i32*",ALLOC_STATIC);var _stdout=allocate(1,"i32*",ALLOC_STATIC);var _stderr=allocate(1,"i32*",ALLOC_STATIC);var FS={root:null,mounts:[],devices:[null],streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:false,ignorePermissions:true,trackingDelegate:{},tracking:{openFlags:{READ:1,WRITE:2}},ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,handleFSError:(function(e){if(!(e instanceof FS.ErrnoError))throw e+" : "+stackTrace();return ___setErrNo(e.errno)}),lookupPath:(function(path,opts){path=PATH.resolve(FS.cwd(),path);opts=opts||{};if(!path)return{path:"",node:null};var defaults={follow_mount:true,recurse_count:0};for(var key in defaults){if(opts[key]===undefined){opts[key]=defaults[key]}}if(opts.recurse_count>8){throw new FS.ErrnoError(ERRNO_CODES.ELOOP)}var parts=PATH.normalizeArray(path.split("/").filter((function(p){return!!p})),false);var current=FS.root;var current_path="/";for(var i=0;i<parts.length;i++){var islast=i===parts.length-1;if(islast&&opts.parent){break}current=FS.lookupNode(current,parts[i]);current_path=PATH.join2(current_path,parts[i]);if(FS.isMountpoint(current)){if(!islast||islast&&opts.follow_mount){current=current.mounted.root}}if(!islast||opts.follow){var count=0;while(FS.isLink(current.mode)){var link=FS.readlink(current_path);current_path=PATH.resolve(PATH.dirname(current_path),link);var lookup=FS.lookupPath(current_path,{recurse_count:opts.recurse_count});current=lookup.node;if(count++>40){throw new FS.ErrnoError(ERRNO_CODES.ELOOP)}}}}return{path:current_path,node:current}}),getPath:(function(node){var path;while(true){if(FS.isRoot(node)){var mount=node.mount.mountpoint;if(!path)return mount;return mount[mount.length-1]!=="/"?mount+"/"+path:mount+path}path=path?node.name+"/"+path:node.name;node=node.parent}}),hashName:(function(parentid,name){var hash=0;for(var i=0;i<name.length;i++){hash=(hash<<5)-hash+name.charCodeAt(i)|0}return(parentid+hash>>>0)%FS.nameTable.length}),hashAddNode:(function(node){var hash=FS.hashName(node.parent.id,node.name);node.name_next=FS.nameTable[hash];FS.nameTable[hash]=node}),hashRemoveNode:(function(node){var hash=FS.hashName(node.parent.id,node.name);if(FS.nameTable[hash]===node){FS.nameTable[hash]=node.name_next}else{var current=FS.nameTable[hash];while(current){if(current.name_next===node){current.name_next=node.name_next;break}current=current.name_next}}}),lookupNode:(function(parent,name){var err=FS.mayLookup(parent);if(err){throw new FS.ErrnoError(err,parent)}var hash=FS.hashName(parent.id,name);for(var node=FS.nameTable[hash];node;node=node.name_next){var nodeName=node.name;if(node.parent.id===parent.id&&nodeName===name){return node}}return FS.lookup(parent,name)}),createNode:(function(parent,name,mode,rdev){if(!FS.FSNode){FS.FSNode=(function(parent,name,mode,rdev){if(!parent){parent=this}this.parent=parent;this.mount=parent.mount;this.mounted=null;this.id=FS.nextInode++;this.name=name;this.mode=mode;this.node_ops={};this.stream_ops={};this.rdev=rdev});FS.FSNode.prototype={};var readMode=292|73;var writeMode=146;Object.defineProperties(FS.FSNode.prototype,{read:{get:(function(){return(this.mode&readMode)===readMode}),set:(function(val){val?this.mode|=readMode:this.mode&=~readMode})},write:{get:(function(){return(this.mode&writeMode)===writeMode}),set:(function(val){val?this.mode|=writeMode:this.mode&=~writeMode})},isFolder:{get:(function(){return FS.isDir(this.mode)})},isDevice:{get:(function(){return FS.isChrdev(this.mode)})}})}var node=new FS.FSNode(parent,name,mode,rdev);FS.hashAddNode(node);return node}),destroyNode:(function(node){FS.hashRemoveNode(node)}),isRoot:(function(node){return node===node.parent}),isMountpoint:(function(node){return!!node.mounted}),isFile:(function(mode){return(mode&61440)===32768}),isDir:(function(mode){return(mode&61440)===16384}),isLink:(function(mode){return(mode&61440)===40960}),isChrdev:(function(mode){return(mode&61440)===8192}),isBlkdev:(function(mode){return(mode&61440)===24576}),isFIFO:(function(mode){return(mode&61440)===4096}),isSocket:(function(mode){return(mode&49152)===49152}),flagModes:{"r":0,"rs":1052672,"r+":2,"w":577,"wx":705,"xw":705,"w+":578,"wx+":706,"xw+":706,"a":1089,"ax":1217,"xa":1217,"a+":1090,"ax+":1218,"xa+":1218},modeStringToFlags:(function(str){var flags=FS.flagModes[str];if(typeof flags==="undefined"){throw new Error("Unknown file open mode: "+str)}return flags}),flagsToPermissionString:(function(flag){var perms=["r","w","rw"][flag&3];if(flag&512){perms+="w"}return perms}),nodePermissions:(function(node,perms){if(FS.ignorePermissions){return 0}if(perms.indexOf("r")!==-1&&!(node.mode&292)){return ERRNO_CODES.EACCES}else if(perms.indexOf("w")!==-1&&!(node.mode&146)){return ERRNO_CODES.EACCES}else if(perms.indexOf("x")!==-1&&!(node.mode&73)){return ERRNO_CODES.EACCES}return 0}),mayLookup:(function(dir){var err=FS.nodePermissions(dir,"x");if(err)return err;if(!dir.node_ops.lookup)return ERRNO_CODES.EACCES;return 0}),mayCreate:(function(dir,name){try{var node=FS.lookupNode(dir,name);return ERRNO_CODES.EEXIST}catch(e){}return FS.nodePermissions(dir,"wx")}),mayDelete:(function(dir,name,isdir){var node;try{node=FS.lookupNode(dir,name)}catch(e){return e.errno}var err=FS.nodePermissions(dir,"wx");if(err){return err}if(isdir){if(!FS.isDir(node.mode)){return ERRNO_CODES.ENOTDIR}if(FS.isRoot(node)||FS.getPath(node)===FS.cwd()){return ERRNO_CODES.EBUSY}}else{if(FS.isDir(node.mode)){return ERRNO_CODES.EISDIR}}return 0}),mayOpen:(function(node,flags){if(!node){return ERRNO_CODES.ENOENT}if(FS.isLink(node.mode)){return ERRNO_CODES.ELOOP}else if(FS.isDir(node.mode)){if(FS.flagsToPermissionString(flags)!=="r"||flags&512){return ERRNO_CODES.EISDIR}}return FS.nodePermissions(node,FS.flagsToPermissionString(flags))}),MAX_OPEN_FDS:4096,nextfd:(function(fd_start,fd_end){fd_start=fd_start||0;fd_end=fd_end||FS.MAX_OPEN_FDS;for(var fd=fd_start;fd<=fd_end;fd++){if(!FS.streams[fd]){return fd}}throw new FS.ErrnoError(ERRNO_CODES.EMFILE)}),getStream:(function(fd){return FS.streams[fd]}),createStream:(function(stream,fd_start,fd_end){if(!FS.FSStream){FS.FSStream=(function(){});FS.FSStream.prototype={};Object.defineProperties(FS.FSStream.prototype,{object:{get:(function(){return this.node}),set:(function(val){this.node=val})},isRead:{get:(function(){return(this.flags&2097155)!==1})},isWrite:{get:(function(){return(this.flags&2097155)!==0})},isAppend:{get:(function(){return this.flags&1024})}})}var newStream=new FS.FSStream;for(var p in stream){newStream[p]=stream[p]}stream=newStream;var fd=FS.nextfd(fd_start,fd_end);stream.fd=fd;FS.streams[fd]=stream;return stream}),closeStream:(function(fd){FS.streams[fd]=null}),chrdev_stream_ops:{open:(function(stream){var device=FS.getDevice(stream.node.rdev);stream.stream_ops=device.stream_ops;if(stream.stream_ops.open){stream.stream_ops.open(stream)}}),llseek:(function(){throw new FS.ErrnoError(ERRNO_CODES.ESPIPE)})},major:(function(dev){return dev>>8}),minor:(function(dev){return dev&255}),makedev:(function(ma,mi){return ma<<8|mi}),registerDevice:(function(dev,ops){FS.devices[dev]={stream_ops:ops}}),getDevice:(function(dev){return FS.devices[dev]}),getMounts:(function(mount){var mounts=[];var check=[mount];while(check.length){var m=check.pop();mounts.push(m);check.push.apply(check,m.mounts)}return mounts}),syncfs:(function(populate,callback){if(typeof populate==="function"){callback=populate;populate=false}FS.syncFSRequests++;if(FS.syncFSRequests>1){console.log("warning: "+FS.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work")}var mounts=FS.getMounts(FS.root.mount);var completed=0;function doCallback(err){assert(FS.syncFSRequests>0);FS.syncFSRequests--;return callback(err)}function done(err){if(err){if(!done.errored){done.errored=true;return doCallback(err)}return}if(++completed>=mounts.length){doCallback(null)}}mounts.forEach((function(mount){if(!mount.type.syncfs){return done(null)}mount.type.syncfs(mount,populate,done)}))}),mount:(function(type,opts,mountpoint){var root=mountpoint==="/";var pseudo=!mountpoint;var node;if(root&&FS.root){throw new FS.ErrnoError(ERRNO_CODES.EBUSY)}else if(!root&&!pseudo){var lookup=FS.lookupPath(mountpoint,{follow_mount:false});mountpoint=lookup.path;node=lookup.node;if(FS.isMountpoint(node)){throw new FS.ErrnoError(ERRNO_CODES.EBUSY)}if(!FS.isDir(node.mode)){throw new FS.ErrnoError(ERRNO_CODES.ENOTDIR)}}var mount={type:type,opts:opts,mountpoint:mountpoint,mounts:[]};var mountRoot=type.mount(mount);mountRoot.mount=mount;mount.root=mountRoot;if(root){FS.root=mountRoot}else if(node){node.mounted=mount;if(node.mount){node.mount.mounts.push(mount)}}return mountRoot}),unmount:(function(mountpoint){var lookup=FS.lookupPath(mountpoint,{follow_mount:false});if(!FS.isMountpoint(lookup.node)){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}var node=lookup.node;var mount=node.mounted;var mounts=FS.getMounts(mount);Object.keys(FS.nameTable).forEach((function(hash){var current=FS.nameTable[hash];while(current){var next=current.name_next;if(mounts.indexOf(current.mount)!==-1){FS.destroyNode(current)}current=next}}));node.mounted=null;var idx=node.mount.mounts.indexOf(mount);assert(idx!==-1);node.mount.mounts.splice(idx,1)}),lookup:(function(parent,name){return parent.node_ops.lookup(parent,name)}),mknod:(function(path,mode,dev){var lookup=FS.lookupPath(path,{parent:true});var parent=lookup.node;var name=PATH.basename(path);if(!name||name==="."||name===".."){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}var err=FS.mayCreate(parent,name);if(err){throw new FS.ErrnoError(err)}if(!parent.node_ops.mknod){throw new FS.ErrnoError(ERRNO_CODES.EPERM)}return parent.node_ops.mknod(parent,name,mode,dev)}),create:(function(path,mode){mode=mode!==undefined?mode:438;mode&=4095;mode|=32768;return FS.mknod(path,mode,0)}),mkdir:(function(path,mode){mode=mode!==undefined?mode:511;mode&=511|512;mode|=16384;return FS.mknod(path,mode,0)}),mkdev:(function(path,mode,dev){if(typeof dev==="undefined"){dev=mode;mode=438}mode|=8192;return FS.mknod(path,mode,dev)}),symlink:(function(oldpath,newpath){if(!PATH.resolve(oldpath)){throw new FS.ErrnoError(ERRNO_CODES.ENOENT)}var lookup=FS.lookupPath(newpath,{parent:true});var parent=lookup.node;if(!parent){throw new FS.ErrnoError(ERRNO_CODES.ENOENT)}var newname=PATH.basename(newpath);var err=FS.mayCreate(parent,newname);if(err){throw new FS.ErrnoError(err)}if(!parent.node_ops.symlink){throw new FS.ErrnoError(ERRNO_CODES.EPERM)}return parent.node_ops.symlink(parent,newname,oldpath)}),rename:(function(old_path,new_path){var old_dirname=PATH.dirname(old_path);var new_dirname=PATH.dirname(new_path);var old_name=PATH.basename(old_path);var new_name=PATH.basename(new_path);var lookup,old_dir,new_dir;try{lookup=FS.lookupPath(old_path,{parent:true});old_dir=lookup.node;lookup=FS.lookupPath(new_path,{parent:true});new_dir=lookup.node}catch(e){throw new FS.ErrnoError(ERRNO_CODES.EBUSY)}if(!old_dir||!new_dir)throw new FS.ErrnoError(ERRNO_CODES.ENOENT);if(old_dir.mount!==new_dir.mount){throw new FS.ErrnoError(ERRNO_CODES.EXDEV)}var old_node=FS.lookupNode(old_dir,old_name);var relative=PATH.relative(old_path,new_dirname);if(relative.charAt(0)!=="."){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}relative=PATH.relative(new_path,old_dirname);if(relative.charAt(0)!=="."){throw new FS.ErrnoError(ERRNO_CODES.ENOTEMPTY)}var new_node;try{new_node=FS.lookupNode(new_dir,new_name)}catch(e){}if(old_node===new_node){return}var isdir=FS.isDir(old_node.mode);var err=FS.mayDelete(old_dir,old_name,isdir);if(err){throw new FS.ErrnoError(err)}err=new_node?FS.mayDelete(new_dir,new_name,isdir):FS.mayCreate(new_dir,new_name);if(err){throw new FS.ErrnoError(err)}if(!old_dir.node_ops.rename){throw new FS.ErrnoError(ERRNO_CODES.EPERM)}if(FS.isMountpoint(old_node)||new_node&&FS.isMountpoint(new_node)){throw new FS.ErrnoError(ERRNO_CODES.EBUSY)}if(new_dir!==old_dir){err=FS.nodePermissions(old_dir,"w");if(err){throw new FS.ErrnoError(err)}}try{if(FS.trackingDelegate["willMovePath"]){FS.trackingDelegate["willMovePath"](old_path,new_path)}}catch(e){console.log("FS.trackingDelegate['willMovePath']('"+old_path+"', '"+new_path+"') threw an exception: "+e.message)}FS.hashRemoveNode(old_node);try{old_dir.node_ops.rename(old_node,new_dir,new_name)}catch(e){throw e}finally{FS.hashAddNode(old_node)}try{if(FS.trackingDelegate["onMovePath"])FS.trackingDelegate["onMovePath"](old_path,new_path)}catch(e){console.log("FS.trackingDelegate['onMovePath']('"+old_path+"', '"+new_path+"') threw an exception: "+e.message)}}),rmdir:(function(path){var lookup=FS.lookupPath(path,{parent:true});var parent=lookup.node;var name=PATH.basename(path);var node=FS.lookupNode(parent,name);var err=FS.mayDelete(parent,name,true);if(err){throw new FS.ErrnoError(err)}if(!parent.node_ops.rmdir){throw new FS.ErrnoError(ERRNO_CODES.EPERM)}if(FS.isMountpoint(node)){throw new FS.ErrnoError(ERRNO_CODES.EBUSY)}try{if(FS.trackingDelegate["willDeletePath"]){FS.trackingDelegate["willDeletePath"](path)}}catch(e){console.log("FS.trackingDelegate['willDeletePath']('"+path+"') threw an exception: "+e.message)}parent.node_ops.rmdir(parent,name);FS.destroyNode(node);try{if(FS.trackingDelegate["onDeletePath"])FS.trackingDelegate["onDeletePath"](path)}catch(e){console.log("FS.trackingDelegate['onDeletePath']('"+path+"') threw an exception: "+e.message)}}),readdir:(function(path){var lookup=FS.lookupPath(path,{follow:true});var node=lookup.node;if(!node.node_ops.readdir){throw new FS.ErrnoError(ERRNO_CODES.ENOTDIR)}return node.node_ops.readdir(node)}),unlink:(function(path){var lookup=FS.lookupPath(path,{parent:true});var parent=lookup.node;var name=PATH.basename(path);var node=FS.lookupNode(parent,name);var err=FS.mayDelete(parent,name,false);if(err){if(err===ERRNO_CODES.EISDIR)err=ERRNO_CODES.EPERM;throw new FS.ErrnoError(err)}if(!parent.node_ops.unlink){throw new FS.ErrnoError(ERRNO_CODES.EPERM)}if(FS.isMountpoint(node)){throw new FS.ErrnoError(ERRNO_CODES.EBUSY)}try{if(FS.trackingDelegate["willDeletePath"]){FS.trackingDelegate["willDeletePath"](path)}}catch(e){console.log("FS.trackingDelegate['willDeletePath']('"+path+"') threw an exception: "+e.message)}parent.node_ops.unlink(parent,name);FS.destroyNode(node);try{if(FS.trackingDelegate["onDeletePath"])FS.trackingDelegate["onDeletePath"](path)}catch(e){console.log("FS.trackingDelegate['onDeletePath']('"+path+"') threw an exception: "+e.message)}}),readlink:(function(path){var lookup=FS.lookupPath(path);var link=lookup.node;if(!link){throw new FS.ErrnoError(ERRNO_CODES.ENOENT)}if(!link.node_ops.readlink){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}return PATH.resolve(FS.getPath(link.parent),link.node_ops.readlink(link))}),stat:(function(path,dontFollow){var lookup=FS.lookupPath(path,{follow:!dontFollow});var node=lookup.node;if(!node){throw new FS.ErrnoError(ERRNO_CODES.ENOENT)}if(!node.node_ops.getattr){throw new FS.ErrnoError(ERRNO_CODES.EPERM)}return node.node_ops.getattr(node)}),lstat:(function(path){return FS.stat(path,true)}),chmod:(function(path,mode,dontFollow){var node;if(typeof path==="string"){var lookup=FS.lookupPath(path,{follow:!dontFollow});node=lookup.node}else{node=path}if(!node.node_ops.setattr){throw new FS.ErrnoError(ERRNO_CODES.EPERM)}node.node_ops.setattr(node,{mode:mode&4095|node.mode&~4095,timestamp:Date.now()})}),lchmod:(function(path,mode){FS.chmod(path,mode,true)}),fchmod:(function(fd,mode){var stream=FS.getStream(fd);if(!stream){throw new FS.ErrnoError(ERRNO_CODES.EBADF)}FS.chmod(stream.node,mode)}),chown:(function(path,uid,gid,dontFollow){var node;if(typeof path==="string"){var lookup=FS.lookupPath(path,{follow:!dontFollow});node=lookup.node}else{node=path}if(!node.node_ops.setattr){throw new FS.ErrnoError(ERRNO_CODES.EPERM)}node.node_ops.setattr(node,{timestamp:Date.now()})}),lchown:(function(path,uid,gid){FS.chown(path,uid,gid,true)}),fchown:(function(fd,uid,gid){var stream=FS.getStream(fd);if(!stream){throw new FS.ErrnoError(ERRNO_CODES.EBADF)}FS.chown(stream.node,uid,gid)}),truncate:(function(path,len){if(len<0){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}var node;if(typeof path==="string"){var lookup=FS.lookupPath(path,{follow:true});node=lookup.node}else{node=path}if(!node.node_ops.setattr){throw new FS.ErrnoError(ERRNO_CODES.EPERM)}if(FS.isDir(node.mode)){throw new FS.ErrnoError(ERRNO_CODES.EISDIR)}if(!FS.isFile(node.mode)){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}var err=FS.nodePermissions(node,"w");if(err){throw new FS.ErrnoError(err)}node.node_ops.setattr(node,{size:len,timestamp:Date.now()})}),ftruncate:(function(fd,len){var stream=FS.getStream(fd);if(!stream){throw new FS.ErrnoError(ERRNO_CODES.EBADF)}if((stream.flags&2097155)===0){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}FS.truncate(stream.node,len)}),utime:(function(path,atime,mtime){var lookup=FS.lookupPath(path,{follow:true});var node=lookup.node;node.node_ops.setattr(node,{timestamp:Math.max(atime,mtime)})}),open:(function(path,flags,mode,fd_start,fd_end){if(path===""){throw new FS.ErrnoError(ERRNO_CODES.ENOENT)}flags=typeof flags==="string"?FS.modeStringToFlags(flags):flags;mode=typeof mode==="undefined"?438:mode;if(flags&64){mode=mode&4095|32768}else{mode=0}var node;if(typeof path==="object"){node=path}else{path=PATH.normalize(path);try{var lookup=FS.lookupPath(path,{follow:!(flags&131072)});node=lookup.node}catch(e){}}var created=false;if(flags&64){if(node){if(flags&128){throw new FS.ErrnoError(ERRNO_CODES.EEXIST)}}else{node=FS.mknod(path,mode,0);created=true}}if(!node){throw new FS.ErrnoError(ERRNO_CODES.ENOENT)}if(FS.isChrdev(node.mode)){flags&=~512}if(flags&65536&&!FS.isDir(node.mode)){throw new FS.ErrnoError(ERRNO_CODES.ENOTDIR)}if(!created){var err=FS.mayOpen(node,flags);if(err){throw new FS.ErrnoError(err)}}if(flags&512){FS.truncate(node,0)}flags&=~(128|512);var stream=FS.createStream({node:node,path:FS.getPath(node),flags:flags,seekable:true,position:0,stream_ops:node.stream_ops,ungotten:[],error:false},fd_start,fd_end);if(stream.stream_ops.open){stream.stream_ops.open(stream)}if(Module["logReadFiles"]&&!(flags&1)){if(!FS.readFiles)FS.readFiles={};if(!(path in FS.readFiles)){FS.readFiles[path]=1;Module["printErr"]("read file: "+path)}}try{if(FS.trackingDelegate["onOpenFile"]){var trackingFlags=0;if((flags&2097155)!==1){trackingFlags|=FS.tracking.openFlags.READ}if((flags&2097155)!==0){trackingFlags|=FS.tracking.openFlags.WRITE}FS.trackingDelegate["onOpenFile"](path,trackingFlags)}}catch(e){console.log("FS.trackingDelegate['onOpenFile']('"+path+"', flags) threw an exception: "+e.message)}return stream}),close:(function(stream){if(stream.getdents)stream.getdents=null;try{if(stream.stream_ops.close){stream.stream_ops.close(stream)}}catch(e){throw e}finally{FS.closeStream(stream.fd)}}),llseek:(function(stream,offset,whence){if(!stream.seekable||!stream.stream_ops.llseek){throw new FS.ErrnoError(ERRNO_CODES.ESPIPE)}stream.position=stream.stream_ops.llseek(stream,offset,whence);stream.ungotten=[];return stream.position}),read:(function(stream,buffer,offset,length,position){if(length<0||position<0){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}if((stream.flags&2097155)===1){throw new FS.ErrnoError(ERRNO_CODES.EBADF)}if(FS.isDir(stream.node.mode)){throw new FS.ErrnoError(ERRNO_CODES.EISDIR)}if(!stream.stream_ops.read){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}var seeking=true;if(typeof position==="undefined"){position=stream.position;seeking=false}else if(!stream.seekable){throw new FS.ErrnoError(ERRNO_CODES.ESPIPE)}var bytesRead=stream.stream_ops.read(stream,buffer,offset,length,position);if(!seeking)stream.position+=bytesRead;return bytesRead}),write:(function(stream,buffer,offset,length,position,canOwn){if(length<0||position<0){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}if((stream.flags&2097155)===0){throw new FS.ErrnoError(ERRNO_CODES.EBADF)}if(FS.isDir(stream.node.mode)){throw new FS.ErrnoError(ERRNO_CODES.EISDIR)}if(!stream.stream_ops.write){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}if(stream.flags&1024){FS.llseek(stream,0,2)}var seeking=true;if(typeof position==="undefined"){position=stream.position;seeking=false}else if(!stream.seekable){throw new FS.ErrnoError(ERRNO_CODES.ESPIPE)}var bytesWritten=stream.stream_ops.write(stream,buffer,offset,length,position,canOwn);if(!seeking)stream.position+=bytesWritten;try{if(stream.path&&FS.trackingDelegate["onWriteToFile"])FS.trackingDelegate["onWriteToFile"](stream.path)}catch(e){console.log("FS.trackingDelegate['onWriteToFile']('"+path+"') threw an exception: "+e.message)}return bytesWritten}),allocate:(function(stream,offset,length){if(offset<0||length<=0){throw new FS.ErrnoError(ERRNO_CODES.EINVAL)}if((stream.flags&2097155)===0){throw new FS.ErrnoError(ERRNO_CODES.EBADF)}if(!FS.isFile(stream.node.mode)&&!FS.isDir(node.mode)){throw new FS.ErrnoError(ERRNO_CODES.ENODEV)}if(!stream.stream_ops.allocate){throw new FS.ErrnoError(ERRNO_CODES.EOPNOTSUPP)}stream.stream_ops.allocate(stream,offset,length)}),mmap:(function(stream,buffer,offset,length,position,prot,flags){if((stream.flags&2097155)===1){throw new FS.ErrnoError(ERRNO_CODES.EACCES)}if(!stream.stream_ops.mmap){throw new FS.ErrnoError(ERRNO_CODES.ENODEV)}return stream.stream_ops.mmap(stream,buffer,offset,length,position,prot,flags)}),msync:(function(stream,buffer,offset,length,mmapFlags){if(!stream||!stream.stream_ops.msync){return 0}return stream.stream_ops.msync(stream,buffer,offset,length,mmapFlags)}),munmap:(function(stream){return 0}),ioctl:(function(stream,cmd,arg){if(!stream.stream_ops.ioctl){throw new FS.ErrnoError(ERRNO_CODES.ENOTTY)}return stream.stream_ops.ioctl(stream,cmd,arg)}),readFile:(function(path,opts){opts=opts||{};opts.flags=opts.flags||"r";opts.encoding=opts.encoding||"binary";if(opts.encoding!=="utf8"&&opts.encoding!=="binary"){throw new Error('Invalid encoding type "'+opts.encoding+'"')}var ret;var stream=FS.open(path,opts.flags);var stat=FS.stat(path);var length=stat.size;var buf=new Uint8Array(length);FS.read(stream,buf,0,length,0);if(opts.encoding==="utf8"){ret=UTF8ArrayToString(buf,0)}else if(opts.encoding==="binary"){ret=buf}FS.close(stream);return ret}),writeFile:(function(path,data,opts){opts=opts||{};opts.flags=opts.flags||"w";opts.encoding=opts.encoding||"utf8";if(opts.encoding!=="utf8"&&opts.encoding!=="binary"){throw new Error('Invalid encoding type "'+opts.encoding+'"')}var stream=FS.open(path,opts.flags,opts.mode);if(opts.encoding==="utf8"){var buf=new Uint8Array(lengthBytesUTF8(data)+1);var actualNumBytes=stringToUTF8Array(data,buf,0,buf.length);FS.write(stream,buf,0,actualNumBytes,0,opts.canOwn)}else if(opts.encoding==="binary"){FS.write(stream,data,0,data.length,0,opts.canOwn)}FS.close(stream)}),cwd:(function(){return FS.currentPath}),chdir:(function(path){var lookup=FS.lookupPath(path,{follow:true});if(!FS.isDir(lookup.node.mode)){throw new FS.ErrnoError(ERRNO_CODES.ENOTDIR)}var err=FS.nodePermissions(lookup.node,"x");if(err){throw new FS.ErrnoError(err)}FS.currentPath=lookup.path}),createDefaultDirectories:(function(){FS.mkdir("/tmp");FS.mkdir("/home");FS.mkdir("/home/web_user")}),createDefaultDevices:(function(){FS.mkdir("/dev");FS.registerDevice(FS.makedev(1,3),{read:(function(){return 0}),write:(function(stream,buffer,offset,length,pos){return length})});FS.mkdev("/dev/null",FS.makedev(1,3));TTY.register(FS.makedev(5,0),TTY.default_tty_ops);TTY.register(FS.makedev(6,0),TTY.default_tty1_ops);FS.mkdev("/dev/tty",FS.makedev(5,0));FS.mkdev("/dev/tty1",FS.makedev(6,0));var random_device;if(typeof crypto!=="undefined"){var randomBuffer=new Uint8Array(1);random_device=(function(){crypto.getRandomValues(randomBuffer);return randomBuffer[0]})}else if(ENVIRONMENT_IS_NODE){random_device=(function(){return require("crypto").randomBytes(1)[0]})}else{random_device=(function(){return Math.random()*256|0})}FS.createDevice("/dev","random",random_device);FS.createDevice("/dev","urandom",random_device);FS.mkdir("/dev/shm");FS.mkdir("/dev/shm/tmp")}),createSpecialDirectories:(function(){FS.mkdir("/proc");FS.mkdir("/proc/self");FS.mkdir("/proc/self/fd");FS.mount({mount:(function(){var node=FS.createNode("/proc/self","fd",16384|511,73);node.node_ops={lookup:(function(parent,name){var fd=+name;var stream=FS.getStream(fd);if(!stream)throw new FS.ErrnoError(ERRNO_CODES.EBADF);var ret={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:(function(){return stream.path})}};ret.parent=ret;return ret})};return node})},{},"/proc/self/fd")}),createStandardStreams:(function(){if(Module["stdin"]){FS.createDevice("/dev","stdin",Module["stdin"])}else{FS.symlink("/dev/tty","/dev/stdin")}if(Module["stdout"]){FS.createDevice("/dev","stdout",null,Module["stdout"])}else{FS.symlink("/dev/tty","/dev/stdout")}if(Module["stderr"]){FS.createDevice("/dev","stderr",null,Module["stderr"])}else{FS.symlink("/dev/tty1","/dev/stderr")}var stdin=FS.open("/dev/stdin","r");assert(stdin.fd===0,"invalid handle for stdin ("+stdin.fd+")");var stdout=FS.open("/dev/stdout","w");assert(stdout.fd===1,"invalid handle for stdout ("+stdout.fd+")");var stderr=FS.open("/dev/stderr","w");assert(stderr.fd===2,"invalid handle for stderr ("+stderr.fd+")")}),ensureErrnoError:(function(){if(FS.ErrnoError)return;FS.ErrnoError=function ErrnoError(errno,node){this.node=node;this.setErrno=(function(errno){this.errno=errno;for(var key in ERRNO_CODES){if(ERRNO_CODES[key]===errno){this.code=key;break}}});this.setErrno(errno);this.message=ERRNO_MESSAGES[errno]};FS.ErrnoError.prototype=new Error;FS.ErrnoError.prototype.constructor=FS.ErrnoError;[ERRNO_CODES.ENOENT].forEach((function(code){FS.genericErrors[code]=new FS.ErrnoError(code);FS.genericErrors[code].stack="<generic error, no stack>"}))}),staticInit:(function(){FS.ensureErrnoError();FS.nameTable=new Array(4096);FS.mount(MEMFS,{},"/");FS.createDefaultDirectories();FS.createDefaultDevices();FS.createSpecialDirectories();FS.filesystems={"MEMFS":MEMFS,"IDBFS":IDBFS,"NODEFS":NODEFS,"WORKERFS":WORKERFS}}),init:(function(input,output,error){assert(!FS.init.initialized,"FS.init was previously called. If you want to initialize later with custom parameters, remove any earlier calls (note that one is automatically added to the generated code)");FS.init.initialized=true;FS.ensureErrnoError();Module["stdin"]=input||Module["stdin"];Module["stdout"]=output||Module["stdout"];Module["stderr"]=error||Module["stderr"];FS.createStandardStreams()}),quit:(function(){FS.init.initialized=false;var fflush=Module["_fflush"];if(fflush)fflush(0);for(var i=0;i<FS.streams.length;i++){var stream=FS.streams[i];if(!stream){continue}FS.close(stream)}}),getMode:(function(canRead,canWrite){var mode=0;if(canRead)mode|=292|73;if(canWrite)mode|=146;return mode}),joinPath:(function(parts,forceRelative){var path=PATH.join.apply(null,parts);if(forceRelative&&path[0]=="/")path=path.substr(1);return path}),absolutePath:(function(relative,base){return PATH.resolve(base,relative)}),standardizePath:(function(path){return PATH.normalize(path)}),findObject:(function(path,dontResolveLastLink){var ret=FS.analyzePath(path,dontResolveLastLink);if(ret.exists){return ret.object}else{___setErrNo(ret.error);return null}}),analyzePath:(function(path,dontResolveLastLink){try{var lookup=FS.lookupPath(path,{follow:!dontResolveLastLink});path=lookup.path}catch(e){}var ret={isRoot:false,exists:false,error:0,name:null,path:null,object:null,parentExists:false,parentPath:null,parentObject:null};try{var lookup=FS.lookupPath(path,{parent:true});ret.parentExists=true;ret.parentPath=lookup.path;ret.parentObject=lookup.node;ret.name=PATH.basename(path);lookup=FS.lookupPath(path,{follow:!dontResolveLastLink});ret.exists=true;ret.path=lookup.path;ret.object=lookup.node;ret.name=lookup.node.name;ret.isRoot=lookup.path==="/"}catch(e){ret.error=e.errno}return ret}),createFolder:(function(parent,name,canRead,canWrite){var path=PATH.join2(typeof parent==="string"?parent:FS.getPath(parent),name);var mode=FS.getMode(canRead,canWrite);return FS.mkdir(path,mode)}),createPath:(function(parent,path,canRead,canWrite){parent=typeof parent==="string"?parent:FS.getPath(parent);var parts=path.split("/").reverse();while(parts.length){var part=parts.pop();if(!part)continue;var current=PATH.join2(parent,part);try{FS.mkdir(current)}catch(e){}parent=current}return current}),createFile:(function(parent,name,properties,canRead,canWrite){var path=PATH.join2(typeof parent==="string"?parent:FS.getPath(parent),name);var mode=FS.getMode(canRead,canWrite);return FS.create(path,mode)}),createDataFile:(function(parent,name,data,canRead,canWrite,canOwn){var path=name?PATH.join2(typeof parent==="string"?parent:FS.getPath(parent),name):parent;var mode=FS.getMode(canRead,canWrite);var node=FS.create(path,mode);if(data){if(typeof data==="string"){var arr=new Array(data.length);for(var i=0,len=data.length;i<len;++i)arr[i]=data.charCodeAt(i);data=arr}FS.chmod(node,mode|146);var stream=FS.open(node,"w");FS.write(stream,data,0,data.length,0,canOwn);FS.close(stream);FS.chmod(node,mode)}return node}),createDevice:(function(parent,name,input,output){var path=PATH.join2(typeof parent==="string"?parent:FS.getPath(parent),name);var mode=FS.getMode(!!input,!!output);if(!FS.createDevice.major)FS.createDevice.major=64;var dev=FS.makedev(FS.createDevice.major++,0);FS.registerDevice(dev,{open:(function(stream){stream.seekable=false}),close:(function(stream){if(output&&output.buffer&&output.buffer.length){output(10)}}),read:(function(stream,buffer,offset,length,pos){var bytesRead=0;for(var i=0;i<length;i++){var result;try{result=input()}catch(e){throw new FS.ErrnoError(ERRNO_CODES.EIO)}if(result===undefined&&bytesRead===0){throw new FS.ErrnoError(ERRNO_CODES.EAGAIN)}if(result===null||result===undefined)break;bytesRead++;buffer[offset+i]=result}if(bytesRead){stream.node.timestamp=Date.now()}return bytesRead}),write:(function(stream,buffer,offset,length,pos){for(var i=0;i<length;i++){try{output(buffer[offset+i])}catch(e){throw new FS.ErrnoError(ERRNO_CODES.EIO)}}if(length){stream.node.timestamp=Date.now()}return i})});return FS.mkdev(path,mode,dev)}),createLink:(function(parent,name,target,canRead,canWrite){var path=PATH.join2(typeof parent==="string"?parent:FS.getPath(parent),name);return FS.symlink(target,path)}),forceLoadFile:(function(obj){if(obj.isDevice||obj.isFolder||obj.link||obj.contents)return true;var success=true;if(typeof XMLHttpRequest!=="undefined"){throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.")}else if(Module["read"]){try{obj.contents=intArrayFromString(Module["read"](obj.url),true);obj.usedBytes=obj.contents.length}catch(e){success=false}}else{throw new Error("Cannot load without read() or XMLHttpRequest.")}if(!success)___setErrNo(ERRNO_CODES.EIO);return success}),createLazyFile:(function(parent,name,url,canRead,canWrite){function LazyUint8Array(){this.lengthKnown=false;this.chunks=[]}LazyUint8Array.prototype.get=function LazyUint8Array_get(idx){if(idx>this.length-1||idx<0){return undefined}var chunkOffset=idx%this.chunkSize;var chunkNum=idx/this.chunkSize|0;return this.getter(chunkNum)[chunkOffset]};LazyUint8Array.prototype.setDataGetter=function LazyUint8Array_setDataGetter(getter){this.getter=getter};LazyUint8Array.prototype.cacheLength=function LazyUint8Array_cacheLength(){var xhr=new XMLHttpRequest;xhr.open("HEAD",url,false);xhr.send(null);if(!(xhr.status>=200&&xhr.status<300||xhr.status===304))throw new Error("Couldn't load "+url+". Status: "+xhr.status);var datalength=Number(xhr.getResponseHeader("Content-length"));var header;var hasByteServing=(header=xhr.getResponseHeader("Accept-Ranges"))&&header==="bytes";var usesGzip=(header=xhr.getResponseHeader("Content-Encoding"))&&header==="gzip";var chunkSize=1024*1024;if(!hasByteServing)chunkSize=datalength;var doXHR=(function(from,to){if(from>to)throw new Error("invalid range ("+from+", "+to+") or no bytes requested!");if(to>datalength-1)throw new Error("only "+datalength+" bytes available! programmer error!");var xhr=new XMLHttpRequest;xhr.open("GET",url,false);if(datalength!==chunkSize)xhr.setRequestHeader("Range","bytes="+from+"-"+to);if(typeof Uint8Array!="undefined")xhr.responseType="arraybuffer";if(xhr.overrideMimeType){xhr.overrideMimeType("text/plain; charset=x-user-defined")}xhr.send(null);if(!(xhr.status>=200&&xhr.status<300||xhr.status===304))throw new Error("Couldn't load "+url+". Status: "+xhr.status);if(xhr.response!==undefined){return new Uint8Array(xhr.response||[])}else{return intArrayFromString(xhr.responseText||"",true)}});var lazyArray=this;lazyArray.setDataGetter((function(chunkNum){var start=chunkNum*chunkSize;var end=(chunkNum+1)*chunkSize-1;end=Math.min(end,datalength-1);if(typeof lazyArray.chunks[chunkNum]==="undefined"){lazyArray.chunks[chunkNum]=doXHR(start,end)}if(typeof lazyArray.chunks[chunkNum]==="undefined")throw new Error("doXHR failed!");return lazyArray.chunks[chunkNum]}));if(usesGzip||!datalength){chunkSize=datalength=1;datalength=this.getter(0).length;chunkSize=datalength;console.log("LazyFiles on gzip forces download of the whole file when length is accessed")}this._length=datalength;this._chunkSize=chunkSize;this.lengthKnown=true};if(typeof XMLHttpRequest!=="undefined"){if(!ENVIRONMENT_IS_WORKER)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var lazyArray=new LazyUint8Array;Object.defineProperties(lazyArray,{length:{get:(function(){if(!this.lengthKnown){this.cacheLength()}return this._length})},chunkSize:{get:(function(){if(!this.lengthKnown){this.cacheLength()}return this._chunkSize})}});var properties={isDevice:false,contents:lazyArray}}else{var properties={isDevice:false,url:url}}var node=FS.createFile(parent,name,properties,canRead,canWrite);if(properties.contents){node.contents=properties.contents}else if(properties.url){node.contents=null;node.url=properties.url}Object.defineProperties(node,{usedBytes:{get:(function(){return this.contents.length})}});var stream_ops={};var keys=Object.keys(node.stream_ops);keys.forEach((function(key){var fn=node.stream_ops[key];stream_ops[key]=function forceLoadLazyFile(){if(!FS.forceLoadFile(node)){throw new FS.ErrnoError(ERRNO_CODES.EIO)}return fn.apply(null,arguments)}}));stream_ops.read=function stream_ops_read(stream,buffer,offset,length,position){if(!FS.forceLoadFile(node)){throw new FS.ErrnoError(ERRNO_CODES.EIO)}var contents=stream.node.contents;if(position>=contents.length)return 0;var size=Math.min(contents.length-position,length);assert(size>=0);if(contents.slice){for(var i=0;i<size;i++){buffer[offset+i]=contents[position+i]}}else{for(var i=0;i<size;i++){buffer[offset+i]=contents.get(position+i)}}return size};node.stream_ops=stream_ops;return node}),createPreloadedFile:(function(parent,name,url,canRead,canWrite,onload,onerror,dontCreateFile,canOwn,preFinish){Browser.init();var fullname=name?PATH.resolve(PATH.join2(parent,name)):parent;var dep=getUniqueRunDependency("cp "+fullname);function processData(byteArray){function finish(byteArray){if(preFinish)preFinish();if(!dontCreateFile){FS.createDataFile(parent,name,byteArray,canRead,canWrite,canOwn)}if(onload)onload();removeRunDependency(dep)}var handled=false;Module["preloadPlugins"].forEach((function(plugin){if(handled)return;if(plugin["canHandle"](fullname)){plugin["handle"](byteArray,fullname,finish,(function(){if(onerror)onerror();removeRunDependency(dep)}));handled=true}}));if(!handled)finish(byteArray)}addRunDependency(dep);if(typeof url=="string"){Browser.asyncLoad(url,(function(byteArray){processData(byteArray)}),onerror)}else{processData(url)}}),indexedDB:(function(){return window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB}),DB_NAME:(function(){return"EM_FS_"+window.location.pathname}),DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:(function(paths,onload,onerror){onload=onload||(function(){});onerror=onerror||(function(){});var indexedDB=FS.indexedDB();try{var openRequest=indexedDB.open(FS.DB_NAME(),FS.DB_VERSION)}catch(e){return onerror(e)}openRequest.onupgradeneeded=function openRequest_onupgradeneeded(){console.log("creating db");var db=openRequest.result;db.createObjectStore(FS.DB_STORE_NAME)};openRequest.onsuccess=function openRequest_onsuccess(){var db=openRequest.result;var transaction=db.transaction([FS.DB_STORE_NAME],"readwrite");var files=transaction.objectStore(FS.DB_STORE_NAME);var ok=0,fail=0,total=paths.length;function finish(){if(fail==0)onload();else onerror()}paths.forEach((function(path){var putRequest=files.put(FS.analyzePath(path).object.contents,path);putRequest.onsuccess=function putRequest_onsuccess(){ok++;if(ok+fail==total)finish()};putRequest.onerror=function putRequest_onerror(){fail++;if(ok+fail==total)finish()}}));transaction.onerror=onerror};openRequest.onerror=onerror}),loadFilesFromDB:(function(paths,onload,onerror){onload=onload||(function(){});onerror=onerror||(function(){});var indexedDB=FS.indexedDB();try{var openRequest=indexedDB.open(FS.DB_NAME(),FS.DB_VERSION)}catch(e){return onerror(e)}openRequest.onupgradeneeded=onerror;openRequest.onsuccess=function openRequest_onsuccess(){var db=openRequest.result;try{var transaction=db.transaction([FS.DB_STORE_NAME],"readonly")}catch(e){onerror(e);return}var files=transaction.objectStore(FS.DB_STORE_NAME);var ok=0,fail=0,total=paths.length;function finish(){if(fail==0)onload();else onerror()}paths.forEach((function(path){var getRequest=files.get(path);getRequest.onsuccess=function getRequest_onsuccess(){if(FS.analyzePath(path).exists){FS.unlink(path)}FS.createDataFile(PATH.dirname(path),PATH.basename(path),getRequest.result,true,true,true);ok++;if(ok+fail==total)finish()};getRequest.onerror=function getRequest_onerror(){fail++;if(ok+fail==total)finish()}}));transaction.onerror=onerror};openRequest.onerror=onerror})};var SYSCALLS={DEFAULT_POLLMASK:5,mappings:{},umask:511,calculateAt:(function(dirfd,path){if(path[0]!=="/"){var dir;if(dirfd===-100){dir=FS.cwd()}else{var dirstream=FS.getStream(dirfd);if(!dirstream)throw new FS.ErrnoError(ERRNO_CODES.EBADF);dir=dirstream.path}path=PATH.join2(dir,path)}return path}),doStat:(function(func,path,buf){try{var stat=func(path)}catch(e){if(e&&e.node&&PATH.normalize(path)!==PATH.normalize(FS.getPath(e.node))){return-ERRNO_CODES.ENOTDIR}throw e}HEAP32[buf>>2]=stat.dev;HEAP32[buf+4>>2]=0;HEAP32[buf+8>>2]=stat.ino;HEAP32[buf+12>>2]=stat.mode;HEAP32[buf+16>>2]=stat.nlink;HEAP32[buf+20>>2]=stat.uid;HEAP32[buf+24>>2]=stat.gid;HEAP32[buf+28>>2]=stat.rdev;HEAP32[buf+32>>2]=0;HEAP32[buf+36>>2]=stat.size;HEAP32[buf+40>>2]=4096;HEAP32[buf+44>>2]=stat.blocks;HEAP32[buf+48>>2]=stat.atime.getTime()/1e3|0;HEAP32[buf+52>>2]=0;HEAP32[buf+56>>2]=stat.mtime.getTime()/1e3|0;HEAP32[buf+60>>2]=0;HEAP32[buf+64>>2]=stat.ctime.getTime()/1e3|0;HEAP32[buf+68>>2]=0;HEAP32[buf+72>>2]=stat.ino;return 0}),doMsync:(function(addr,stream,len,flags){var buffer=new Uint8Array(HEAPU8.subarray(addr,addr+len));FS.msync(stream,buffer,0,len,flags)}),doMkdir:(function(path,mode){path=PATH.normalize(path);if(path[path.length-1]==="/")path=path.substr(0,path.length-1);FS.mkdir(path,mode,0);return 0}),doMknod:(function(path,mode,dev){switch(mode&61440){case 32768:case 8192:case 24576:case 4096:case 49152:break;default:return-ERRNO_CODES.EINVAL}FS.mknod(path,mode,dev);return 0}),doReadlink:(function(path,buf,bufsize){if(bufsize<=0)return-ERRNO_CODES.EINVAL;var ret=FS.readlink(path);ret=ret.slice(0,Math.max(0,bufsize));writeStringToMemory(ret,buf,true);return ret.length}),doAccess:(function(path,amode){if(amode&~7){return-ERRNO_CODES.EINVAL}var node;var lookup=FS.lookupPath(path,{follow:true});node=lookup.node;var perms="";if(amode&4)perms+="r";if(amode&2)perms+="w";if(amode&1)perms+="x";if(perms&&FS.nodePermissions(node,perms)){return-ERRNO_CODES.EACCES}return 0}),doDup:(function(path,flags,suggestFD){var suggest=FS.getStream(suggestFD);if(suggest)FS.close(suggest);return FS.open(path,flags,0,suggestFD,suggestFD).fd}),doReadv:(function(stream,iov,iovcnt,offset){var ret=0;for(var i=0;i<iovcnt;i++){var ptr=HEAP32[iov+i*8>>2];var len=HEAP32[iov+(i*8+4)>>2];var curr=FS.read(stream,HEAP8,ptr,len,offset);if(curr<0)return-1;ret+=curr;if(curr<len)break}return ret}),doWritev:(function(stream,iov,iovcnt,offset){var ret=0;for(var i=0;i<iovcnt;i++){var ptr=HEAP32[iov+i*8>>2];var len=HEAP32[iov+(i*8+4)>>2];var curr=FS.write(stream,HEAP8,ptr,len,offset);if(curr<0)return-1;ret+=curr}return ret}),varargs:0,get:(function(varargs){SYSCALLS.varargs+=4;var ret=HEAP32[SYSCALLS.varargs-4>>2];return ret}),getStr:(function(){var ret=Pointer_stringify(SYSCALLS.get());return ret}),getStreamFromFD:(function(){var stream=FS.getStream(SYSCALLS.get());if(!stream)throw new FS.ErrnoError(ERRNO_CODES.EBADF);return stream}),getSocketFromFD:(function(){var socket=SOCKFS.getSocket(SYSCALLS.get());if(!socket)throw new FS.ErrnoError(ERRNO_CODES.EBADF);return socket}),getSocketAddress:(function(allowNull){var addrp=SYSCALLS.get(),addrlen=SYSCALLS.get();if(allowNull&&addrp===0)return null;var info=__read_sockaddr(addrp,addrlen);if(info.errno)throw new FS.ErrnoError(info.errno);info.addr=DNS.lookup_addr(info.addr)||info.addr;return info}),get64:(function(){var low=SYSCALLS.get(),high=SYSCALLS.get();if(low>=0)assert(high===0);else assert(high===-1);return low}),getZero:(function(){assert(SYSCALLS.get()===0)})};function ___syscall192(which,varargs){SYSCALLS.varargs=varargs;try{var addr=SYSCALLS.get(),len=SYSCALLS.get(),prot=SYSCALLS.get(),flags=SYSCALLS.get(),fd=SYSCALLS.get(),off=SYSCALLS.get();off<<=12;var ptr;var allocated=false;if(fd===-1){ptr=_malloc(len);if(!ptr)return-ERRNO_CODES.ENOMEM;_memset(ptr,0,len);allocated=true}else{var info=FS.getStream(fd);if(!info)return-ERRNO_CODES.EBADF;var res=FS.mmap(info,HEAPU8,addr,len,off,prot,flags);ptr=res.ptr;allocated=res.allocated}SYSCALLS.mappings[ptr]={malloc:ptr,len:len,allocated:allocated,fd:fd,flags:flags};return ptr}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___syscall195(which,varargs){SYSCALLS.varargs=varargs;try{var path=SYSCALLS.getStr(),buf=SYSCALLS.get();return SYSCALLS.doStat(FS.stat,path,buf)}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___syscall194(which,varargs){SYSCALLS.varargs=varargs;try{var fd=SYSCALLS.get(),zero=SYSCALLS.getZero(),length=SYSCALLS.get64();FS.ftruncate(fd,length);return 0}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___syscall197(which,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD(),buf=SYSCALLS.get();return SYSCALLS.doStat(FS.stat,stream.path,buf)}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___syscall202(which,varargs){SYSCALLS.varargs=varargs;try{return 0}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___syscall199(){return ___syscall202.apply(null,arguments)}function ___assert_fail(condition,filename,line,func){ABORT=true;throw"Assertion failed: "+Pointer_stringify(condition)+", at: "+[filename?Pointer_stringify(filename):"unknown filename",line,func?Pointer_stringify(func):"unknown function"]+" at "+stackTrace()}function _pthread_mutex_init(){}function ___syscall91(which,varargs){SYSCALLS.varargs=varargs;try{var addr=SYSCALLS.get(),len=SYSCALLS.get();var info=SYSCALLS.mappings[addr];if(!info)return 0;if(len===info.len){var stream=FS.getStream(info.fd);SYSCALLS.doMsync(addr,stream,len,info.flags);FS.munmap(stream);SYSCALLS.mappings[addr]=null;if(info.allocated){_free(info.malloc)}}return 0}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}var _UItoD=true;function ___syscall6(which,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD();FS.close(stream);return 0}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___syscall54(which,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD(),op=SYSCALLS.get();switch(op){case 21505:{if(!stream.tty)return-ERRNO_CODES.ENOTTY;return 0};case 21506:{if(!stream.tty)return-ERRNO_CODES.ENOTTY;return 0};case 21519:{if(!stream.tty)return-ERRNO_CODES.ENOTTY;var argp=SYSCALLS.get();HEAP32[argp>>2]=0;return 0};case 21520:{if(!stream.tty)return-ERRNO_CODES.ENOTTY;return-ERRNO_CODES.EINVAL};case 21531:{var argp=SYSCALLS.get();return FS.ioctl(stream,op,argp)};default:abort("bad ioctl syscall "+op)}}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}var ___tm_current=allocate(44,"i8",ALLOC_STATIC);var ___tm_timezone=allocate(intArrayFromString("GMT"),"i8",ALLOC_STATIC);var _tzname=allocate(8,"i32*",ALLOC_STATIC);var _daylight=allocate(1,"i32*",ALLOC_STATIC);var _timezone=allocate(1,"i32*",ALLOC_STATIC);function _tzset(){if(_tzset.called)return;_tzset.called=true;HEAP32[_timezone>>2]=-(new Date).getTimezoneOffset()*60;var winter=new Date(2e3,0,1);var summer=new Date(2e3,6,1);HEAP32[_daylight>>2]=Number(winter.getTimezoneOffset()!=summer.getTimezoneOffset());function extractZone(date){var match=date.toTimeString().match(/\(([A-Za-z ]+)\)$/);return match?match[1]:"GMT"}var winterName=extractZone(winter);var summerName=extractZone(summer);var winterNamePtr=allocate(intArrayFromString(winterName),"i8",ALLOC_NORMAL);var summerNamePtr=allocate(intArrayFromString(summerName),"i8",ALLOC_NORMAL);if(summer.getTimezoneOffset()<winter.getTimezoneOffset()){HEAP32[_tzname>>2]=winterNamePtr;HEAP32[_tzname+4>>2]=summerNamePtr}else{HEAP32[_tzname>>2]=summerNamePtr;HEAP32[_tzname+4>>2]=winterNamePtr}}function _localtime_r(time,tmPtr){_tzset();var date=new Date(HEAP32[time>>2]*1e3);HEAP32[tmPtr>>2]=date.getSeconds();HEAP32[tmPtr+4>>2]=date.getMinutes();HEAP32[tmPtr+8>>2]=date.getHours();HEAP32[tmPtr+12>>2]=date.getDate();HEAP32[tmPtr+16>>2]=date.getMonth();HEAP32[tmPtr+20>>2]=date.getFullYear()-1900;HEAP32[tmPtr+24>>2]=date.getDay();var start=new Date(date.getFullYear(),0,1);var yday=(date.getTime()-start.getTime())/(1e3*60*60*24)|0;HEAP32[tmPtr+28>>2]=yday;HEAP32[tmPtr+36>>2]=-(date.getTimezoneOffset()*60);var summerOffset=(new Date(2e3,6,1)).getTimezoneOffset();var winterOffset=start.getTimezoneOffset();var dst=date.getTimezoneOffset()==Math.min(winterOffset,summerOffset)|0;HEAP32[tmPtr+32>>2]=dst;var zonePtr=HEAP32[_tzname+(dst?Runtime.QUANTUM_SIZE:0)>>2];HEAP32[tmPtr+40>>2]=zonePtr;return tmPtr}function _localtime(time){return _localtime_r(time,___tm_current)}function ___syscall77(which,varargs){SYSCALLS.varargs=varargs;try{var who=SYSCALLS.get(),usage=SYSCALLS.get();_memset(usage,0,136);HEAP32[usage>>2]=1;HEAP32[usage+4>>2]=2;HEAP32[usage+8>>2]=3;HEAP32[usage+12>>2]=4;return 0}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}Module["_bitshift64Ashr"]=_bitshift64Ashr;Module["_bitshift64Lshr"]=_bitshift64Lshr;function ___syscall33(which,varargs){SYSCALLS.varargs=varargs;try{var path=SYSCALLS.getStr(),amode=SYSCALLS.get();return SYSCALLS.doAccess(path,amode)}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}var _BDtoIHigh=true;function _pthread_cleanup_push(routine,arg){__ATEXIT__.push((function(){Runtime.dynCall("vi",routine,[arg])}));_pthread_cleanup_push.level=__ATEXIT__.length}var _environ=allocate(1,"i32*",ALLOC_STATIC);var ___environ=_environ;function ___buildEnvironment(env){var MAX_ENV_VALUES=64;var TOTAL_ENV_SIZE=1024;var poolPtr;var envPtr;if(!___buildEnvironment.called){___buildEnvironment.called=true;ENV["USER"]=ENV["LOGNAME"]="web_user";ENV["PATH"]="/";ENV["PWD"]="/";ENV["HOME"]="/home/web_user";ENV["LANG"]="C";ENV["_"]=Module["thisProgram"];poolPtr=allocate(TOTAL_ENV_SIZE,"i8",ALLOC_STATIC);envPtr=allocate(MAX_ENV_VALUES*4,"i8*",ALLOC_STATIC);HEAP32[envPtr>>2]=poolPtr;HEAP32[_environ>>2]=envPtr}else{envPtr=HEAP32[_environ>>2];poolPtr=HEAP32[envPtr>>2]}var strings=[];var totalSize=0;for(var key in env){if(typeof env[key]==="string"){var line=key+"="+env[key];strings.push(line);totalSize+=line.length}}if(totalSize>TOTAL_ENV_SIZE){throw new Error("Environment size exceeded TOTAL_ENV_SIZE!")}var ptrSize=4;for(var i=0;i<strings.length;i++){var line=strings[i];writeAsciiToMemory(line,poolPtr);HEAP32[envPtr+i*ptrSize>>2]=poolPtr;poolPtr+=line.length+1}HEAP32[envPtr+strings.length*ptrSize>>2]=0}var ENV={};function _getenv(name){if(name===0)return 0;name=Pointer_stringify(name);if(!ENV.hasOwnProperty(name))return 0;if(_getenv.ret)_free(_getenv.ret);_getenv.ret=allocate(intArrayFromString(ENV[name]),"i8",ALLOC_NORMAL);return _getenv.ret}function _gettimeofday(ptr){var now=Date.now();HEAP32[ptr>>2]=now/1e3|0;HEAP32[ptr+4>>2]=now%1e3*1e3|0;return 0}function _pthread_mutex_unlock(){}function _emscripten_memcpy_big(dest,src,num){HEAPU8.set(HEAPU8.subarray(src,src+num),dest);return dest}Module["_memcpy"]=_memcpy;function ___syscall191(which,varargs){SYSCALLS.varargs=varargs;try{var resource=SYSCALLS.get(),rlim=SYSCALLS.get();HEAP32[rlim>>2]=-1;HEAP32[rlim+4>>2]=-1;HEAP32[rlim+8>>2]=-1;HEAP32[rlim+12>>2]=-1;return 0}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function _sbrk(bytes){var self=_sbrk;if(!self.called){DYNAMICTOP=alignMemoryPage(DYNAMICTOP);self.called=true;assert(Runtime.dynamicAlloc);self.alloc=Runtime.dynamicAlloc;Runtime.dynamicAlloc=(function(){abort("cannot dynamically allocate, sbrk now has control")})}var ret=DYNAMICTOP;if(bytes!=0){var success=self.alloc(bytes);if(!success)return-1>>>0}return ret}Module["_memmove"]=_memmove;var _BItoD=true;function _pthread_mutex_destroy(){}function ___syscall201(){return ___syscall202.apply(null,arguments)}var PROCINFO={ppid:1,pid:42,sid:42,pgid:42};function ___syscall64(which,varargs){SYSCALLS.varargs=varargs;try{return PROCINFO.ppid}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function _sysconf(name){switch(name){case 30:return PAGE_SIZE;case 85:return totalMemory/PAGE_SIZE;case 132:case 133:case 12:case 137:case 138:case 15:case 235:case 16:case 17:case 18:case 19:case 20:case 149:case 13:case 10:case 236:case 153:case 9:case 21:case 22:case 159:case 154:case 14:case 77:case 78:case 139:case 80:case 81:case 82:case 68:case 67:case 164:case 11:case 29:case 47:case 48:case 95:case 52:case 51:case 46:return 200809;case 79:return 0;case 27:case 246:case 127:case 128:case 23:case 24:case 160:case 161:case 181:case 182:case 242:case 183:case 184:case 243:case 244:case 245:case 165:case 178:case 179:case 49:case 50:case 168:case 169:case 175:case 170:case 171:case 172:case 97:case 76:case 32:case 173:case 35:return-1;case 176:case 177:case 7:case 155:case 8:case 157:case 125:case 126:case 92:case 93:case 129:case 130:case 131:case 94:case 91:return 1;case 74:case 60:case 69:case 70:case 4:return 1024;case 31:case 42:case 72:return 32;case 87:case 26:case 33:return 2147483647;case 34:case 1:return 47839;case 38:case 36:return 99;case 43:case 37:return 2048;case 0:return 2097152;case 3:return 65536;case 28:return 32768;case 44:return 32767;case 75:return 16384;case 39:return 1e3;case 89:return 700;case 71:return 256;case 40:return 255;case 2:return 100;case 180:return 64;case 25:return 20;case 5:return 16;case 6:return 6;case 73:return 4;case 84:{if(typeof navigator==="object")return navigator["hardwareConcurrency"]||1;return 1}}___setErrNo(ERRNO_CODES.EINVAL);return-1}function ___syscall63(which,varargs){SYSCALLS.varargs=varargs;try{var old=SYSCALLS.getStreamFromFD(),suggestFD=SYSCALLS.get();if(old.fd===suggestFD)return suggestFD;return SYSCALLS.doDup(old.path,old.flags,suggestFD)}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___syscall20(which,varargs){SYSCALLS.varargs=varargs;try{return PROCINFO.pid}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}Module["_memset"]=_memset;var _BDtoILow=true;function ___syscall75(which,varargs){SYSCALLS.varargs=varargs;try{return 0}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function _atexit(func,arg){__ATEXIT__.unshift({func:func,arg:arg})}function _abort(){Module["abort"]()}function ___lock(){}function ___unlock(){}var _floor=Math_floor;var cttz_i8=allocate([8,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,6,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,7,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,6,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0],"i8",ALLOC_STATIC);Module["_llvm_cttz_i32"]=_llvm_cttz_i32;function _emscripten_set_main_loop_timing(mode,value){Browser.mainLoop.timingMode=mode;Browser.mainLoop.timingValue=value;if(!Browser.mainLoop.func){return 1}if(mode==0){Browser.mainLoop.scheduler=function Browser_mainLoop_scheduler_setTimeout(){setTimeout(Browser.mainLoop.runner,value)};Browser.mainLoop.method="timeout"}else if(mode==1){Browser.mainLoop.scheduler=function Browser_mainLoop_scheduler_rAF(){Browser.requestAnimationFrame(Browser.mainLoop.runner)};Browser.mainLoop.method="rAF"}else if(mode==2){if(!window["setImmediate"]){var setImmediates=[];var emscriptenMainLoopMessageId="__emcc";function Browser_setImmediate_messageHandler(event){if(event.source===window&&event.data===emscriptenMainLoopMessageId){event.stopPropagation();setImmediates.shift()()}}window.addEventListener("message",Browser_setImmediate_messageHandler,true);window["setImmediate"]=function Browser_emulated_setImmediate(func){setImmediates.push(func);window.postMessage(emscriptenMainLoopMessageId,"*")}}Browser.mainLoop.scheduler=function Browser_mainLoop_scheduler_setImmediate(){window["setImmediate"](Browser.mainLoop.runner)};Browser.mainLoop.method="immediate"}return 0}function _emscripten_set_main_loop(func,fps,simulateInfiniteLoop,arg,noSetTiming){Module["noExitRuntime"]=true;assert(!Browser.mainLoop.func,"emscripten_set_main_loop: there can only be one main loop function at once: call emscripten_cancel_main_loop to cancel the previous one before setting a new one with different parameters.");Browser.mainLoop.func=func;Browser.mainLoop.arg=arg;var thisMainLoopId=Browser.mainLoop.currentlyRunningMainloop;Browser.mainLoop.runner=function Browser_mainLoop_runner(){if(ABORT)return;if(Browser.mainLoop.queue.length>0){var start=Date.now();var blocker=Browser.mainLoop.queue.shift();blocker.func(blocker.arg);if(Browser.mainLoop.remainingBlockers){var remaining=Browser.mainLoop.remainingBlockers;var next=remaining%1==0?remaining-1:Math.floor(remaining);if(blocker.counted){Browser.mainLoop.remainingBlockers=next}else{next=next+.5;Browser.mainLoop.remainingBlockers=(8*remaining+next)/9}}console.log('main loop blocker "'+blocker.name+'" took '+(Date.now()-start)+" ms");Browser.mainLoop.updateStatus();if(thisMainLoopId<Browser.mainLoop.currentlyRunningMainloop)return;setTimeout(Browser.mainLoop.runner,0);return}if(thisMainLoopId<Browser.mainLoop.currentlyRunningMainloop)return;Browser.mainLoop.currentFrameNumber=Browser.mainLoop.currentFrameNumber+1|0;if(Browser.mainLoop.timingMode==1&&Browser.mainLoop.timingValue>1&&Browser.mainLoop.currentFrameNumber%Browser.mainLoop.timingValue!=0){Browser.mainLoop.scheduler();return}if(Browser.mainLoop.method==="timeout"&&Module.ctx){Module.printErr("Looks like you are rendering without using requestAnimationFrame for the main loop. You should use 0 for the frame rate in emscripten_set_main_loop in order to use requestAnimationFrame, as that can greatly improve your frame rates!");Browser.mainLoop.method=""}Browser.mainLoop.runIter((function(){if(typeof arg!=="undefined"){Runtime.dynCall("vi",func,[arg])}else{Runtime.dynCall("v",func)}}));if(thisMainLoopId<Browser.mainLoop.currentlyRunningMainloop)return;if(typeof SDL==="object"&&SDL.audio&&SDL.audio.queueNewAudioData)SDL.audio.queueNewAudioData();Browser.mainLoop.scheduler()};if(!noSetTiming){if(fps&&fps>0)_emscripten_set_main_loop_timing(0,1e3/fps);else _emscripten_set_main_loop_timing(1,1);Browser.mainLoop.scheduler()}if(simulateInfiniteLoop){throw"SimulateInfiniteLoop"}}var Browser={mainLoop:{scheduler:null,method:"",currentlyRunningMainloop:0,func:null,arg:0,timingMode:0,timingValue:0,currentFrameNumber:0,queue:[],pause:(function(){Browser.mainLoop.scheduler=null;Browser.mainLoop.currentlyRunningMainloop++}),resume:(function(){Browser.mainLoop.currentlyRunningMainloop++;var timingMode=Browser.mainLoop.timingMode;var timingValue=Browser.mainLoop.timingValue;var func=Browser.mainLoop.func;Browser.mainLoop.func=null;_emscripten_set_main_loop(func,0,false,Browser.mainLoop.arg,true);_emscripten_set_main_loop_timing(timingMode,timingValue);Browser.mainLoop.scheduler()}),updateStatus:(function(){if(Module["setStatus"]){var message=Module["statusMessage"]||"Please wait...";var remaining=Browser.mainLoop.remainingBlockers;var expected=Browser.mainLoop.expectedBlockers;if(remaining){if(remaining<expected){Module["setStatus"](message+" ("+(expected-remaining)+"/"+expected+")")}else{Module["setStatus"](message)}}else{Module["setStatus"]("")}}}),runIter:(function(func){if(ABORT)return;if(Module["preMainLoop"]){var preRet=Module["preMainLoop"]();if(preRet===false){return}}try{func()}catch(e){if(e instanceof ExitStatus){return}else{if(e&&typeof e==="object"&&e.stack)Module.printErr("exception thrown: "+[e,e.stack]);throw e}}if(Module["postMainLoop"])Module["postMainLoop"]()})},isFullScreen:false,pointerLock:false,moduleContextCreatedCallbacks:[],workers:[],init:(function(){if(!Module["preloadPlugins"])Module["preloadPlugins"]=[];if(Browser.initted)return;Browser.initted=true;try{new Blob;Browser.hasBlobConstructor=true}catch(e){Browser.hasBlobConstructor=false;console.log("warning: no blob constructor, cannot create blobs with mimetypes")}Browser.BlobBuilder=typeof MozBlobBuilder!="undefined"?MozBlobBuilder:typeof WebKitBlobBuilder!="undefined"?WebKitBlobBuilder:!Browser.hasBlobConstructor?console.log("warning: no BlobBuilder"):null;Browser.URLObject=typeof window!="undefined"?window.URL?window.URL:window.webkitURL:undefined;if(!Module.noImageDecoding&&typeof Browser.URLObject==="undefined"){console.log("warning: Browser does not support creating object URLs. Built-in browser image decoding will not be available.");Module.noImageDecoding=true}var imagePlugin={};imagePlugin["canHandle"]=function imagePlugin_canHandle(name){return!Module.noImageDecoding&&/\.(jpg|jpeg|png|bmp)$/i.test(name)};imagePlugin["handle"]=function imagePlugin_handle(byteArray,name,onload,onerror){var b=null;if(Browser.hasBlobConstructor){try{b=new Blob([byteArray],{type:Browser.getMimetype(name)});if(b.size!==byteArray.length){b=new Blob([(new Uint8Array(byteArray)).buffer],{type:Browser.getMimetype(name)})}}catch(e){Runtime.warnOnce("Blob constructor present but fails: "+e+"; falling back to blob builder")}}if(!b){var bb=new Browser.BlobBuilder;bb.append((new Uint8Array(byteArray)).buffer);b=bb.getBlob()}var url=Browser.URLObject.createObjectURL(b);var img=new Image;img.onload=function img_onload(){assert(img.complete,"Image "+name+" could not be decoded");var canvas=document.createElement("canvas");canvas.width=img.width;canvas.height=img.height;var ctx=canvas.getContext("2d");ctx.drawImage(img,0,0);Module["preloadedImages"][name]=canvas;Browser.URLObject.revokeObjectURL(url);if(onload)onload(byteArray)};img.onerror=function img_onerror(event){console.log("Image "+url+" could not be decoded");if(onerror)onerror()};img.src=url};Module["preloadPlugins"].push(imagePlugin);var audioPlugin={};audioPlugin["canHandle"]=function audioPlugin_canHandle(name){return!Module.noAudioDecoding&&name.substr(-4)in{".ogg":1,".wav":1,".mp3":1}};audioPlugin["handle"]=function audioPlugin_handle(byteArray,name,onload,onerror){var done=false;function finish(audio){if(done)return;done=true;Module["preloadedAudios"][name]=audio;if(onload)onload(byteArray)}function fail(){if(done)return;done=true;Module["preloadedAudios"][name]=new Audio;if(onerror)onerror()}if(Browser.hasBlobConstructor){try{var b=new Blob([byteArray],{type:Browser.getMimetype(name)})}catch(e){return fail()}var url=Browser.URLObject.createObjectURL(b);var audio=new Audio;audio.addEventListener("canplaythrough",(function(){finish(audio)}),false);audio.onerror=function audio_onerror(event){if(done)return;console.log("warning: browser could not fully decode audio "+name+", trying slower base64 approach");function encode64(data){var BASE="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";var PAD="=";var ret="";var leftchar=0;var leftbits=0;for(var i=0;i<data.length;i++){leftchar=leftchar<<8|data[i];leftbits+=8;while(leftbits>=6){var curr=leftchar>>leftbits-6&63;leftbits-=6;ret+=BASE[curr]}}if(leftbits==2){ret+=BASE[(leftchar&3)<<4];ret+=PAD+PAD}else if(leftbits==4){ret+=BASE[(leftchar&15)<<2];ret+=PAD}return ret}audio.src="data:audio/x-"+name.substr(-3)+";base64,"+encode64(byteArray);finish(audio)};audio.src=url;Browser.safeSetTimeout((function(){finish(audio)}),1e4)}else{return fail()}};Module["preloadPlugins"].push(audioPlugin);var canvas=Module["canvas"];function pointerLockChange(){Browser.pointerLock=document["pointerLockElement"]===canvas||document["mozPointerLockElement"]===canvas||document["webkitPointerLockElement"]===canvas||document["msPointerLockElement"]===canvas}if(canvas){canvas.requestPointerLock=canvas["requestPointerLock"]||canvas["mozRequestPointerLock"]||canvas["webkitRequestPointerLock"]||canvas["msRequestPointerLock"]||(function(){});canvas.exitPointerLock=document["exitPointerLock"]||document["mozExitPointerLock"]||document["webkitExitPointerLock"]||document["msExitPointerLock"]||(function(){});canvas.exitPointerLock=canvas.exitPointerLock.bind(document);document.addEventListener("pointerlockchange",pointerLockChange,false);document.addEventListener("mozpointerlockchange",pointerLockChange,false);document.addEventListener("webkitpointerlockchange",pointerLockChange,false);document.addEventListener("mspointerlockchange",pointerLockChange,false);if(Module["elementPointerLock"]){canvas.addEventListener("click",(function(ev){if(!Browser.pointerLock&&canvas.requestPointerLock){canvas.requestPointerLock();ev.preventDefault()}}),false)}}}),createContext:(function(canvas,useWebGL,setInModule,webGLContextAttributes){if(useWebGL&&Module.ctx&&canvas==Module.canvas)return Module.ctx;var ctx;var contextHandle;if(useWebGL){var contextAttributes={antialias:false,alpha:false};if(webGLContextAttributes){for(var attribute in webGLContextAttributes){contextAttributes[attribute]=webGLContextAttributes[attribute]}}contextHandle=GL.createContext(canvas,contextAttributes);if(contextHandle){ctx=GL.getContext(contextHandle).GLctx}canvas.style.backgroundColor="black"}else{ctx=canvas.getContext("2d")}if(!ctx)return null;if(setInModule){if(!useWebGL)assert(typeof GLctx==="undefined","cannot set in module if GLctx is used, but we are a non-GL context that would replace it");Module.ctx=ctx;if(useWebGL)GL.makeContextCurrent(contextHandle);Module.useWebGL=useWebGL;Browser.moduleContextCreatedCallbacks.forEach((function(callback){callback()}));Browser.init()}return ctx}),destroyContext:(function(canvas,useWebGL,setInModule){}),fullScreenHandlersInstalled:false,lockPointer:undefined,resizeCanvas:undefined,requestFullScreen:(function(lockPointer,resizeCanvas,vrDevice){Browser.lockPointer=lockPointer;Browser.resizeCanvas=resizeCanvas;Browser.vrDevice=vrDevice;if(typeof Browser.lockPointer==="undefined")Browser.lockPointer=true;if(typeof Browser.resizeCanvas==="undefined")Browser.resizeCanvas=false;if(typeof Browser.vrDevice==="undefined")Browser.vrDevice=null;var canvas=Module["canvas"];function fullScreenChange(){Browser.isFullScreen=false;var canvasContainer=canvas.parentNode;if((document["webkitFullScreenElement"]||document["webkitFullscreenElement"]||document["mozFullScreenElement"]||document["mozFullscreenElement"]||document["fullScreenElement"]||document["fullscreenElement"]||document["msFullScreenElement"]||document["msFullscreenElement"]||document["webkitCurrentFullScreenElement"])===canvasContainer){canvas.cancelFullScreen=document["cancelFullScreen"]||document["mozCancelFullScreen"]||document["webkitCancelFullScreen"]||document["msExitFullscreen"]||document["exitFullscreen"]||(function(){});canvas.cancelFullScreen=canvas.cancelFullScreen.bind(document);if(Browser.lockPointer)canvas.requestPointerLock();Browser.isFullScreen=true;if(Browser.resizeCanvas)Browser.setFullScreenCanvasSize()}else{canvasContainer.parentNode.insertBefore(canvas,canvasContainer);canvasContainer.parentNode.removeChild(canvasContainer);if(Browser.resizeCanvas)Browser.setWindowedCanvasSize()}if(Module["onFullScreen"])Module["onFullScreen"](Browser.isFullScreen);Browser.updateCanvasDimensions(canvas)}if(!Browser.fullScreenHandlersInstalled){Browser.fullScreenHandlersInstalled=true;document.addEventListener("fullscreenchange",fullScreenChange,false);document.addEventListener("mozfullscreenchange",fullScreenChange,false);document.addEventListener("webkitfullscreenchange",fullScreenChange,false);document.addEventListener("MSFullscreenChange",fullScreenChange,false)}var canvasContainer=document.createElement("div");canvas.parentNode.insertBefore(canvasContainer,canvas);canvasContainer.appendChild(canvas);canvasContainer.requestFullScreen=canvasContainer["requestFullScreen"]||canvasContainer["mozRequestFullScreen"]||canvasContainer["msRequestFullscreen"]||(canvasContainer["webkitRequestFullScreen"]?(function(){canvasContainer["webkitRequestFullScreen"](Element["ALLOW_KEYBOARD_INPUT"])}):null);if(vrDevice){canvasContainer.requestFullScreen({vrDisplay:vrDevice})}else{canvasContainer.requestFullScreen()}}),nextRAF:0,fakeRequestAnimationFrame:(function(func){var now=Date.now();if(Browser.nextRAF===0){Browser.nextRAF=now+1e3/60}else{while(now+2>=Browser.nextRAF){Browser.nextRAF+=1e3/60}}var delay=Math.max(Browser.nextRAF-now,0);setTimeout(func,delay)}),requestAnimationFrame:function requestAnimationFrame(func){if(typeof window==="undefined"){Browser.fakeRequestAnimationFrame(func)}else{if(!window.requestAnimationFrame){window.requestAnimationFrame=window["requestAnimationFrame"]||window["mozRequestAnimationFrame"]||window["webkitRequestAnimationFrame"]||window["msRequestAnimationFrame"]||window["oRequestAnimationFrame"]||Browser.fakeRequestAnimationFrame}window.requestAnimationFrame(func)}},safeCallback:(function(func){return(function(){if(!ABORT)return func.apply(null,arguments)})}),allowAsyncCallbacks:true,queuedAsyncCallbacks:[],pauseAsyncCallbacks:(function(){Browser.allowAsyncCallbacks=false}),resumeAsyncCallbacks:(function(){Browser.allowAsyncCallbacks=true;if(Browser.queuedAsyncCallbacks.length>0){var callbacks=Browser.queuedAsyncCallbacks;Browser.queuedAsyncCallbacks=[];callbacks.forEach((function(func){func()}))}}),safeRequestAnimationFrame:(function(func){return Browser.requestAnimationFrame((function(){if(ABORT)return;if(Browser.allowAsyncCallbacks){func()}else{Browser.queuedAsyncCallbacks.push(func)}}))}),safeSetTimeout:(function(func,timeout){Module["noExitRuntime"]=true;return setTimeout((function(){if(ABORT)return;if(Browser.allowAsyncCallbacks){func()}else{Browser.queuedAsyncCallbacks.push(func)}}),timeout)}),safeSetInterval:(function(func,timeout){Module["noExitRuntime"]=true;return setInterval((function(){if(ABORT)return;if(Browser.allowAsyncCallbacks){func()}}),timeout)}),getMimetype:(function(name){return{"jpg":"image/jpeg","jpeg":"image/jpeg","png":"image/png","bmp":"image/bmp","ogg":"audio/ogg","wav":"audio/wav","mp3":"audio/mpeg"}[name.substr(name.lastIndexOf(".")+1)]}),getUserMedia:(function(func){if(!window.getUserMedia){window.getUserMedia=navigator["getUserMedia"]||navigator["mozGetUserMedia"]}window.getUserMedia(func)}),getMovementX:(function(event){return event["movementX"]||event["mozMovementX"]||event["webkitMovementX"]||0}),getMovementY:(function(event){return event["movementY"]||event["mozMovementY"]||event["webkitMovementY"]||0}),getMouseWheelDelta:(function(event){var delta=0;switch(event.type){case"DOMMouseScroll":delta=event.detail;break;case"mousewheel":delta=event.wheelDelta;break;case"wheel":delta=event["deltaY"];break;default:throw"unrecognized mouse wheel event: "+event.type}return delta}),mouseX:0,mouseY:0,mouseMovementX:0,mouseMovementY:0,touches:{},lastTouches:{},calculateMouseEvent:(function(event){if(Browser.pointerLock){if(event.type!="mousemove"&&"mozMovementX"in event){Browser.mouseMovementX=Browser.mouseMovementY=0}else{Browser.mouseMovementX=Browser.getMovementX(event);Browser.mouseMovementY=Browser.getMovementY(event)}if(typeof SDL!="undefined"){Browser.mouseX=SDL.mouseX+Browser.mouseMovementX;Browser.mouseY=SDL.mouseY+Browser.mouseMovementY}else{Browser.mouseX+=Browser.mouseMovementX;Browser.mouseY+=Browser.mouseMovementY}}else{var rect=Module["canvas"].getBoundingClientRect();var cw=Module["canvas"].width;var ch=Module["canvas"].height;var scrollX=typeof window.scrollX!=="undefined"?window.scrollX:window.pageXOffset;var scrollY=typeof window.scrollY!=="undefined"?window.scrollY:window.pageYOffset;if(event.type==="touchstart"||event.type==="touchend"||event.type==="touchmove"){var touch=event.touch;if(touch===undefined){return}var adjustedX=touch.pageX-(scrollX+rect.left);var adjustedY=touch.pageY-(scrollY+rect.top);adjustedX=adjustedX*(cw/rect.width);adjustedY=adjustedY*(ch/rect.height);var coords={x:adjustedX,y:adjustedY};if(event.type==="touchstart"){Browser.lastTouches[touch.identifier]=coords;Browser.touches[touch.identifier]=coords}else if(event.type==="touchend"||event.type==="touchmove"){var last=Browser.touches[touch.identifier];if(!last)last=coords;Browser.lastTouches[touch.identifier]=last;Browser.touches[touch.identifier]=coords}return}var x=event.pageX-(scrollX+rect.left);var y=event.pageY-(scrollY+rect.top);x=x*(cw/rect.width);y=y*(ch/rect.height);Browser.mouseMovementX=x-Browser.mouseX;Browser.mouseMovementY=y-Browser.mouseY;Browser.mouseX=x;Browser.mouseY=y}}),xhrLoad:(function(url,onload,onerror){var xhr=new XMLHttpRequest;xhr.open("GET",url,true);xhr.responseType="arraybuffer";xhr.onload=function xhr_onload(){if(xhr.status==200||xhr.status==0&&xhr.response){onload(xhr.response)}else{onerror()}};xhr.onerror=onerror;xhr.send(null)}),asyncLoad:(function(url,onload,onerror,noRunDep){Browser.xhrLoad(url,(function(arrayBuffer){assert(arrayBuffer,'Loading data file "'+url+'" failed (no arrayBuffer).');onload(new Uint8Array(arrayBuffer));if(!noRunDep)removeRunDependency("al "+url)}),(function(event){if(onerror){onerror()}else{throw'Loading data file "'+url+'" failed.'}}));if(!noRunDep)addRunDependency("al "+url)}),resizeListeners:[],updateResizeListeners:(function(){var canvas=Module["canvas"];Browser.resizeListeners.forEach((function(listener){listener(canvas.width,canvas.height)}))}),setCanvasSize:(function(width,height,noUpdates){var canvas=Module["canvas"];Browser.updateCanvasDimensions(canvas,width,height);if(!noUpdates)Browser.updateResizeListeners()}),windowedWidth:0,windowedHeight:0,setFullScreenCanvasSize:(function(){if(typeof SDL!="undefined"){var flags=HEAPU32[SDL.screen+Runtime.QUANTUM_SIZE*0>>2];flags=flags|8388608;HEAP32[SDL.screen+Runtime.QUANTUM_SIZE*0>>2]=flags}Browser.updateResizeListeners()}),setWindowedCanvasSize:(function(){if(typeof SDL!="undefined"){var flags=HEAPU32[SDL.screen+Runtime.QUANTUM_SIZE*0>>2];flags=flags&~8388608;HEAP32[SDL.screen+Runtime.QUANTUM_SIZE*0>>2]=flags}Browser.updateResizeListeners()}),updateCanvasDimensions:(function(canvas,wNative,hNative){if(wNative&&hNative){canvas.widthNative=wNative;canvas.heightNative=hNative}else{wNative=canvas.widthNative;hNative=canvas.heightNative}var w=wNative;var h=hNative;if(Module["forcedAspectRatio"]&&Module["forcedAspectRatio"]>0){if(w/h<Module["forcedAspectRatio"]){w=Math.round(h*Module["forcedAspectRatio"])}else{h=Math.round(w/Module["forcedAspectRatio"])}}if((document["webkitFullScreenElement"]||document["webkitFullscreenElement"]||document["mozFullScreenElement"]||document["mozFullscreenElement"]||document["fullScreenElement"]||document["fullscreenElement"]||document["msFullScreenElement"]||document["msFullscreenElement"]||document["webkitCurrentFullScreenElement"])===canvas.parentNode&&typeof screen!="undefined"){var factor=Math.min(screen.width/w,screen.height/h);w=Math.round(w*factor);h=Math.round(h*factor)}if(Browser.resizeCanvas){if(canvas.width!=w)canvas.width=w;if(canvas.height!=h)canvas.height=h;if(typeof canvas.style!="undefined"){canvas.style.removeProperty("width");canvas.style.removeProperty("height")}}else{if(canvas.width!=wNative)canvas.width=wNative;if(canvas.height!=hNative)canvas.height=hNative;if(typeof canvas.style!="undefined"){if(w!=wNative||h!=hNative){canvas.style.setProperty("width",w+"px","important");canvas.style.setProperty("height",h+"px","important")}else{canvas.style.removeProperty("width");canvas.style.removeProperty("height")}}}}),wgetRequests:{},nextWgetRequestHandle:0,getNextWgetRequestHandle:(function(){var handle=Browser.nextWgetRequestHandle;Browser.nextWgetRequestHandle++;return handle})};Module["_llvm_bswap_i32"]=_llvm_bswap_i32;function ___syscall10(which,varargs){SYSCALLS.varargs=varargs;try{var path=SYSCALLS.getStr();FS.unlink(path);return 0}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}Module["_bitshift64Shl"]=_bitshift64Shl;function ___syscall3(which,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD(),buf=SYSCALLS.get(),count=SYSCALLS.get();return FS.read(stream,HEAP8,buf,count)}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___syscall5(which,varargs){SYSCALLS.varargs=varargs;try{var pathname=SYSCALLS.getStr(),flags=SYSCALLS.get(),mode=SYSCALLS.get();var stream=FS.open(pathname,flags,mode);return stream.fd}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___syscall4(which,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD(),buf=SYSCALLS.get(),count=SYSCALLS.get();return FS.write(stream,HEAP8,buf,count)}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function _llvm_stackrestore(p){var self=_llvm_stacksave;var ret=self.LLVM_SAVEDSTACKS[p];self.LLVM_SAVEDSTACKS.splice(p,1);Runtime.stackRestore(ret)}function _llvm_stacksave(){var self=_llvm_stacksave;if(!self.LLVM_SAVEDSTACKS){self.LLVM_SAVEDSTACKS=[]}self.LLVM_SAVEDSTACKS.push(Runtime.stackSave());return self.LLVM_SAVEDSTACKS.length-1}function _clock(){if(_clock.start===undefined)_clock.start=Date.now();return(Date.now()-_clock.start)*(1e6/1e3)|0}function _pthread_cleanup_pop(){assert(_pthread_cleanup_push.level==__ATEXIT__.length,"cannot pop if something else added meanwhile!");__ATEXIT__.pop();_pthread_cleanup_push.level=__ATEXIT__.length}function ___syscall340(which,varargs){SYSCALLS.varargs=varargs;try{var pid=SYSCALLS.get(),resource=SYSCALLS.get(),new_limit=SYSCALLS.get(),old_limit=SYSCALLS.get();if(old_limit){HEAP32[old_limit>>2]=-1;HEAP32[old_limit+4>>2]=-1;HEAP32[old_limit+8>>2]=-1;HEAP32[old_limit+12>>2]=-1}return 0}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function __isLeapYear(year){return year%4===0&&(year%100!==0||year%400===0)}function __arraySum(array,index){var sum=0;for(var i=0;i<=index;sum+=array[i++]);return sum}var __MONTH_DAYS_LEAP=[31,29,31,30,31,30,31,31,30,31,30,31];var __MONTH_DAYS_REGULAR=[31,28,31,30,31,30,31,31,30,31,30,31];function __addDays(date,days){var newDate=new Date(date.getTime());while(days>0){var leap=__isLeapYear(newDate.getFullYear());var currentMonth=newDate.getMonth();var daysInCurrentMonth=(leap?__MONTH_DAYS_LEAP:__MONTH_DAYS_REGULAR)[currentMonth];if(days>daysInCurrentMonth-newDate.getDate()){days-=daysInCurrentMonth-newDate.getDate()+1;newDate.setDate(1);if(currentMonth<11){newDate.setMonth(currentMonth+1)}else{newDate.setMonth(0);newDate.setFullYear(newDate.getFullYear()+1)}}else{newDate.setDate(newDate.getDate()+days);return newDate}}return newDate}function _strftime(s,maxsize,format,tm){var tm_zone=HEAP32[tm+40>>2];var date={tm_sec:HEAP32[tm>>2],tm_min:HEAP32[tm+4>>2],tm_hour:HEAP32[tm+8>>2],tm_mday:HEAP32[tm+12>>2],tm_mon:HEAP32[tm+16>>2],tm_year:HEAP32[tm+20>>2],tm_wday:HEAP32[tm+24>>2],tm_yday:HEAP32[tm+28>>2],tm_isdst:HEAP32[tm+32>>2],tm_gmtoff:HEAP32[tm+36>>2],tm_zone:tm_zone?Pointer_stringify(tm_zone):""};var pattern=Pointer_stringify(format);var EXPANSION_RULES_1={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S"};for(var rule in EXPANSION_RULES_1){pattern=pattern.replace(new RegExp(rule,"g"),EXPANSION_RULES_1[rule])}var WEEKDAYS=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];var MONTHS=["January","February","March","April","May","June","July","August","September","October","November","December"];function leadingSomething(value,digits,character){var str=typeof value==="number"?value.toString():value||"";while(str.length<digits){str=character[0]+str}return str}function leadingNulls(value,digits){return leadingSomething(value,digits,"0")}function compareByDay(date1,date2){function sgn(value){return value<0?-1:value>0?1:0}var compare;if((compare=sgn(date1.getFullYear()-date2.getFullYear()))===0){if((compare=sgn(date1.getMonth()-date2.getMonth()))===0){compare=sgn(date1.getDate()-date2.getDate())}}return compare}function getFirstWeekStartDate(janFourth){switch(janFourth.getDay()){case 0:return new Date(janFourth.getFullYear()-1,11,29);case 1:return janFourth;case 2:return new Date(janFourth.getFullYear(),0,3);case 3:return new Date(janFourth.getFullYear(),0,2);case 4:return new Date(janFourth.getFullYear(),0,1);case 5:return new Date(janFourth.getFullYear()-1,11,31);case 6:return new Date(janFourth.getFullYear()-1,11,30)}}function getWeekBasedYear(date){var thisDate=__addDays(new Date(date.tm_year+1900,0,1),date.tm_yday);var janFourthThisYear=new Date(thisDate.getFullYear(),0,4);var janFourthNextYear=new Date(thisDate.getFullYear()+1,0,4);var firstWeekStartThisYear=getFirstWeekStartDate(janFourthThisYear);var firstWeekStartNextYear=getFirstWeekStartDate(janFourthNextYear);if(compareByDay(firstWeekStartThisYear,thisDate)<=0){if(compareByDay(firstWeekStartNextYear,thisDate)<=0){return thisDate.getFullYear()+1}else{return thisDate.getFullYear()}}else{return thisDate.getFullYear()-1}}var EXPANSION_RULES_2={"%a":(function(date){return WEEKDAYS[date.tm_wday].substring(0,3)}),"%A":(function(date){return WEEKDAYS[date.tm_wday]}),"%b":(function(date){return MONTHS[date.tm_mon].substring(0,3)}),"%B":(function(date){return MONTHS[date.tm_mon]}),"%C":(function(date){var year=date.tm_year+1900;return leadingNulls(year/100|0,2)}),"%d":(function(date){return leadingNulls(date.tm_mday,2)}),"%e":(function(date){return leadingSomething(date.tm_mday,2," ")}),"%g":(function(date){return getWeekBasedYear(date).toString().substring(2)}),"%G":(function(date){return getWeekBasedYear(date)}),"%H":(function(date){return leadingNulls(date.tm_hour,2)}),"%I":(function(date){return leadingNulls(date.tm_hour<13?date.tm_hour:date.tm_hour-12,2)}),"%j":(function(date){return leadingNulls(date.tm_mday+__arraySum(__isLeapYear(date.tm_year+1900)?__MONTH_DAYS_LEAP:__MONTH_DAYS_REGULAR,date.tm_mon-1),3)}),"%m":(function(date){return leadingNulls(date.tm_mon+1,2)}),"%M":(function(date){return leadingNulls(date.tm_min,2)}),"%n":(function(){return"\n"}),"%p":(function(date){if(date.tm_hour>0&&date.tm_hour<13){return"AM"}else{return"PM"}}),"%S":(function(date){return leadingNulls(date.tm_sec,2)}),"%t":(function(){return"\t"}),"%u":(function(date){var day=new Date(date.tm_year+1900,date.tm_mon+1,date.tm_mday,0,0,0,0);return day.getDay()||7}),"%U":(function(date){var janFirst=new Date(date.tm_year+1900,0,1);var firstSunday=janFirst.getDay()===0?janFirst:__addDays(janFirst,7-janFirst.getDay());var endDate=new Date(date.tm_year+1900,date.tm_mon,date.tm_mday);if(compareByDay(firstSunday,endDate)<0){var februaryFirstUntilEndMonth=__arraySum(__isLeapYear(endDate.getFullYear())?__MONTH_DAYS_LEAP:__MONTH_DAYS_REGULAR,endDate.getMonth()-1)-31;var firstSundayUntilEndJanuary=31-firstSunday.getDate();var days=firstSundayUntilEndJanuary+februaryFirstUntilEndMonth+endDate.getDate();return leadingNulls(Math.ceil(days/7),2)}return compareByDay(firstSunday,janFirst)===0?"01":"00"}),"%V":(function(date){var janFourthThisYear=new Date(date.tm_year+1900,0,4);var janFourthNextYear=new Date(date.tm_year+1901,0,4);var firstWeekStartThisYear=getFirstWeekStartDate(janFourthThisYear);var firstWeekStartNextYear=getFirstWeekStartDate(janFourthNextYear);var endDate=__addDays(new Date(date.tm_year+1900,0,1),date.tm_yday);if(compareByDay(endDate,firstWeekStartThisYear)<0){return"53"}if(compareByDay(firstWeekStartNextYear,endDate)<=0){return"01"}var daysDifference;if(firstWeekStartThisYear.getFullYear()<date.tm_year+1900){daysDifference=date.tm_yday+32-firstWeekStartThisYear.getDate()}else{daysDifference=date.tm_yday+1-firstWeekStartThisYear.getDate()}return leadingNulls(Math.ceil(daysDifference/7),2)}),"%w":(function(date){var day=new Date(date.tm_year+1900,date.tm_mon+1,date.tm_mday,0,0,0,0);return day.getDay()}),"%W":(function(date){var janFirst=new Date(date.tm_year,0,1);var firstMonday=janFirst.getDay()===1?janFirst:__addDays(janFirst,janFirst.getDay()===0?1:7-janFirst.getDay()+1);var endDate=new Date(date.tm_year+1900,date.tm_mon,date.tm_mday);if(compareByDay(firstMonday,endDate)<0){var februaryFirstUntilEndMonth=__arraySum(__isLeapYear(endDate.getFullYear())?__MONTH_DAYS_LEAP:__MONTH_DAYS_REGULAR,endDate.getMonth()-1)-31;var firstMondayUntilEndJanuary=31-firstMonday.getDate();var days=firstMondayUntilEndJanuary+februaryFirstUntilEndMonth+endDate.getDate();return leadingNulls(Math.ceil(days/7),2)}return compareByDay(firstMonday,janFirst)===0?"01":"00"}),"%y":(function(date){return(date.tm_year+1900).toString().substring(2)}),"%Y":(function(date){return date.tm_year+1900}),"%z":(function(date){var off=date.tm_gmtoff;var ahead=off>=0;off=Math.abs(off)/60;off=off/60*100+off%60;return(ahead?"+":"-")+String("0000"+off).slice(-4)}),"%Z":(function(date){return date.tm_zone}),"%%":(function(){return"%"})};for(var rule in EXPANSION_RULES_2){if(pattern.indexOf(rule)>=0){pattern=pattern.replace(new RegExp(rule,"g"),EXPANSION_RULES_2[rule](date))}}var bytes=intArrayFromString(pattern,false);if(bytes.length>maxsize){return 0}writeArrayToMemory(bytes,s);return bytes.length-1}function _time(ptr){var ret=Date.now()/1e3|0;if(ptr){HEAP32[ptr>>2]=ret}return ret}function ___syscall142(which,varargs){SYSCALLS.varargs=varargs;try{var nfds=SYSCALLS.get(),readfds=SYSCALLS.get(),writefds=SYSCALLS.get(),exceptfds=SYSCALLS.get(),timeout=SYSCALLS.get();assert(nfds<=64,"nfds must be less than or equal to 64");assert(!exceptfds,"exceptfds not supported");var total=0;var srcReadLow=readfds?HEAP32[readfds>>2]:0,srcReadHigh=readfds?HEAP32[readfds+4>>2]:0;var srcWriteLow=writefds?HEAP32[writefds>>2]:0,srcWriteHigh=writefds?HEAP32[writefds+4>>2]:0;var srcExceptLow=exceptfds?HEAP32[exceptfds>>2]:0,srcExceptHigh=exceptfds?HEAP32[exceptfds+4>>2]:0;var dstReadLow=0,dstReadHigh=0;var dstWriteLow=0,dstWriteHigh=0;var dstExceptLow=0,dstExceptHigh=0;var allLow=(readfds?HEAP32[readfds>>2]:0)|(writefds?HEAP32[writefds>>2]:0)|(exceptfds?HEAP32[exceptfds>>2]:0);var allHigh=(readfds?HEAP32[readfds+4>>2]:0)|(writefds?HEAP32[writefds+4>>2]:0)|(exceptfds?HEAP32[exceptfds+4>>2]:0);function check(fd,low,high,val){return fd<32?low&val:high&val}for(var fd=0;fd<nfds;fd++){var mask=1<<fd%32;if(!check(fd,allLow,allHigh,mask)){continue}var stream=FS.getStream(fd);if(!stream)throw new FS.ErrnoError(ERRNO_CODES.EBADF);var flags=SYSCALLS.DEFAULT_POLLMASK;if(stream.stream_ops.poll){flags=stream.stream_ops.poll(stream)}if(flags&1&&check(fd,srcReadLow,srcReadHigh,mask)){fd<32?dstReadLow=dstReadLow|mask:dstReadHigh=dstReadHigh|mask;total++}if(flags&4&&check(fd,srcWriteLow,srcWriteHigh,mask)){fd<32?dstWriteLow=dstWriteLow|mask:dstWriteHigh=dstWriteHigh|mask;total++}if(flags&2&&check(fd,srcExceptLow,srcExceptHigh,mask)){fd<32?dstExceptLow=dstExceptLow|mask:dstExceptHigh=dstExceptHigh|mask;total++}}if(readfds){HEAP32[readfds>>2]=dstReadLow;HEAP32[readfds+4>>2]=dstReadHigh}if(writefds){HEAP32[writefds>>2]=dstWriteLow;HEAP32[writefds+4>>2]=dstWriteHigh}if(exceptfds){HEAP32[exceptfds>>2]=dstExceptLow;HEAP32[exceptfds+4>>2]=dstExceptHigh}return total}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function _pthread_self(){return 0}function ___syscall140(which,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD(),offset_high=SYSCALLS.get(),offset_low=SYSCALLS.get(),result=SYSCALLS.get(),whence=SYSCALLS.get();var offset=offset_low;assert(offset_high===0);FS.llseek(stream,offset,whence);HEAP32[result>>2]=stream.position;if(stream.getdents&&offset===0&&whence===0)stream.getdents=null;return 0}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___syscall146(which,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD(),iov=SYSCALLS.get(),iovcnt=SYSCALLS.get();return SYSCALLS.doWritev(stream,iov,iovcnt)}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___syscall221(which,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD(),cmd=SYSCALLS.get();switch(cmd){case 0:{var arg=SYSCALLS.get();if(arg<0){return-ERRNO_CODES.EINVAL}var newStream;newStream=FS.open(stream.path,stream.flags,0,arg);return newStream.fd};case 1:case 2:return 0;case 3:return stream.flags;case 4:{var arg=SYSCALLS.get();stream.flags|=arg;return 0};case 12:case 12:{var arg=SYSCALLS.get();var offset=0;HEAP16[arg+offset>>1]=2;return 0};case 13:case 14:case 13:case 14:return 0;case 16:case 8:return-ERRNO_CODES.EINVAL;case 9:___setErrNo(ERRNO_CODES.EINVAL);return-1;default:{return-ERRNO_CODES.EINVAL}}}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function ___syscall145(which,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD(),iov=SYSCALLS.get(),iovcnt=SYSCALLS.get();return SYSCALLS.doReadv(stream,iov,iovcnt)}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}FS.staticInit();__ATINIT__.unshift((function(){if(!Module["noFSInit"]&&!FS.init.initialized)FS.init()}));__ATMAIN__.push((function(){FS.ignorePermissions=false}));__ATEXIT__.push((function(){FS.quit()}));Module["FS_createFolder"]=FS.createFolder;Module["FS_createPath"]=FS.createPath;Module["FS_createDataFile"]=FS.createDataFile;Module["FS_createPreloadedFile"]=FS.createPreloadedFile;Module["FS_createLazyFile"]=FS.createLazyFile;Module["FS_createLink"]=FS.createLink;Module["FS_createDevice"]=FS.createDevice;Module["FS_unlink"]=FS.unlink;__ATINIT__.unshift((function(){TTY.init()}));__ATEXIT__.push((function(){TTY.shutdown()}));if(ENVIRONMENT_IS_NODE){var fs=require("fs");var NODEJS_PATH=require("path");NODEFS.staticInit()}___buildEnvironment(ENV);Module["requestFullScreen"]=function Module_requestFullScreen(lockPointer,resizeCanvas,vrDevice){Browser.requestFullScreen(lockPointer,resizeCanvas,vrDevice)};Module["requestAnimationFrame"]=function Module_requestAnimationFrame(func){Browser.requestAnimationFrame(func)};Module["setCanvasSize"]=function Module_setCanvasSize(width,height,noUpdates){Browser.setCanvasSize(width,height,noUpdates)};Module["pauseMainLoop"]=function Module_pauseMainLoop(){Browser.mainLoop.pause()};Module["resumeMainLoop"]=function Module_resumeMainLoop(){Browser.mainLoop.resume()};Module["getUserMedia"]=function Module_getUserMedia(){Browser.getUserMedia()};Module["createContext"]=function Module_createContext(canvas,useWebGL,setInModule,webGLContextAttributes){return Browser.createContext(canvas,useWebGL,setInModule,webGLContextAttributes)};STACK_BASE=STACKTOP=Runtime.alignMemory(STATICTOP);staticSealed=true;STACK_MAX=STACK_BASE+TOTAL_STACK;DYNAMIC_BASE=DYNAMICTOP=Runtime.alignMemory(STACK_MAX);assert(DYNAMIC_BASE<TOTAL_MEMORY,"TOTAL_MEMORY not big enough for stack");function invoke_iiii(index,a1,a2,a3){try{return Module["dynCall_iiii"](index,a1,a2,a3)}catch(e){if(typeof e!=="number"&&e!=="longjmp")throw e;asm["setThrew"](1,0)}}function invoke_viiiii(index,a1,a2,a3,a4,a5){try{Module["dynCall_viiiii"](index,a1,a2,a3,a4,a5)}catch(e){if(typeof e!=="number"&&e!=="longjmp")throw e;asm["setThrew"](1,0)}}function invoke_vi(index,a1){try{Module["dynCall_vi"](index,a1)}catch(e){if(typeof e!=="number"&&e!=="longjmp")throw e;asm["setThrew"](1,0)}}function invoke_vii(index,a1,a2){try{Module["dynCall_vii"](index,a1,a2)}catch(e){if(typeof e!=="number"&&e!=="longjmp")throw e;asm["setThrew"](1,0)}}function invoke_ii(index,a1){try{return Module["dynCall_ii"](index,a1)}catch(e){if(typeof e!=="number"&&e!=="longjmp")throw e;asm["setThrew"](1,0)}}function invoke_viii(index,a1,a2,a3){try{Module["dynCall_viii"](index,a1,a2,a3)}catch(e){if(typeof e!=="number"&&e!=="longjmp")throw e;asm["setThrew"](1,0)}}function invoke_v(index){try{Module["dynCall_v"](index)}catch(e){if(typeof e!=="number"&&e!=="longjmp")throw e;asm["setThrew"](1,0)}}function invoke_iiiii(index,a1,a2,a3,a4){try{return Module["dynCall_iiiii"](index,a1,a2,a3,a4)}catch(e){if(typeof e!=="number"&&e!=="longjmp")throw e;asm["setThrew"](1,0)}}function invoke_viiiiii(index,a1,a2,a3,a4,a5,a6){try{Module["dynCall_viiiiii"](index,a1,a2,a3,a4,a5,a6)}catch(e){if(typeof e!=="number"&&e!=="longjmp")throw e;asm["setThrew"](1,0)}}function invoke_iii(index,a1,a2){try{return Module["dynCall_iii"](index,a1,a2)}catch(e){if(typeof e!=="number"&&e!=="longjmp")throw e;asm["setThrew"](1,0)}}function invoke_viiii(index,a1,a2,a3,a4){try{Module["dynCall_viiii"](index,a1,a2,a3,a4)}catch(e){if(typeof e!=="number"&&e!=="longjmp")throw e;asm["setThrew"](1,0)}}Module.asmGlobalArg={"Math":Math,"Int8Array":Int8Array,"Int16Array":Int16Array,"Int32Array":Int32Array,"Uint8Array":Uint8Array,"Uint16Array":Uint16Array,"Uint32Array":Uint32Array,"Float32Array":Float32Array,"Float64Array":Float64Array,"NaN":NaN,"Infinity":Infinity};Module.asmLibraryArg={"abort":abort,"assert":assert,"invoke_iiii":invoke_iiii,"invoke_viiiii":invoke_viiiii,"invoke_vi":invoke_vi,"invoke_vii":invoke_vii,"invoke_ii":invoke_ii,"invoke_viii":invoke_viii,"invoke_v":invoke_v,"invoke_iiiii":invoke_iiiii,"invoke_viiiiii":invoke_viiiiii,"invoke_iii":invoke_iii,"invoke_viiii":invoke_viiii,"_pthread_cleanup_pop":_pthread_cleanup_pop,"___syscall221":___syscall221,"_pthread_mutex_init":_pthread_mutex_init,"___syscall64":___syscall64,"___syscall63":___syscall63,"___syscall6":___syscall6,"___syscall202":___syscall202,"___setErrNo":___setErrNo,"___syscall20":___syscall20,"_llvm_stackrestore":_llvm_stackrestore,"___assert_fail":___assert_fail,"_floor":_floor,"__addDays":__addDays,"_localtime_r":_localtime_r,"_tzset":_tzset,"_emscripten_set_main_loop_timing":_emscripten_set_main_loop_timing,"_sbrk":_sbrk,"___syscall192":___syscall192,"___syscall191":___syscall191,"___syscall197":___syscall197,"___syscall195":___syscall195,"___syscall194":___syscall194,"___syscall199":___syscall199,"_sysconf":_sysconf,"_strftime":_strftime,"_clock":_clock,"__arraySum":__arraySum,"_emscripten_memcpy_big":_emscripten_memcpy_big,"___syscall91":___syscall91,"___buildEnvironment":___buildEnvironment,"_pthread_mutex_destroy":_pthread_mutex_destroy,"_pthread_self":_pthread_self,"___syscall75":___syscall75,"_pthread_mutex_unlock":_pthread_mutex_unlock,"___syscall77":___syscall77,"_llvm_stacksave":_llvm_stacksave,"_getenv":_getenv,"___syscall33":___syscall33,"___syscall54":___syscall54,"___unlock":___unlock,"__isLeapYear":__isLeapYear,"_emscripten_set_main_loop":_emscripten_set_main_loop,"___syscall10":___syscall10,"___syscall3":___syscall3,"___syscall340":___syscall340,"___lock":___lock,"_abort":_abort,"___syscall5":___syscall5,"___syscall4":___syscall4,"_time":_time,"_pthread_mutex_lock":_pthread_mutex_lock,"_gettimeofday":_gettimeofday,"___syscall201":___syscall201,"_atexit":_atexit,"___syscall140":___syscall140,"_localtime":_localtime,"___syscall142":___syscall142,"_pthread_cleanup_push":_pthread_cleanup_push,"___syscall145":___syscall145,"___syscall146":___syscall146,"STACKTOP":STACKTOP,"STACK_MAX":STACK_MAX,"tempDoublePtr":tempDoublePtr,"ABORT":ABORT,"cttz_i8":cttz_i8};// EMSCRIPTEN_START_ASM
+var asm=(function(global,env,buffer) {
+"use asm";var a=new global.Int8Array(buffer);var b=new global.Int16Array(buffer);var c=new global.Int32Array(buffer);var d=new global.Uint8Array(buffer);var e=new global.Uint16Array(buffer);var f=new global.Uint32Array(buffer);var g=new global.Float32Array(buffer);var h=new global.Float64Array(buffer);var i=env.STACKTOP|0;var j=env.STACK_MAX|0;var k=env.tempDoublePtr|0;var l=env.ABORT|0;var m=env.cttz_i8|0;var n=0;var o=0;var p=0;var q=0;var r=global.NaN,s=global.Infinity;var t=0,u=0,v=0,w=0,x=0.0,y=0,z=0,A=0,B=0.0;var C=0;var D=0;var E=0;var F=0;var G=0;var H=0;var I=0;var J=0;var K=0;var L=0;var M=global.Math.floor;var N=global.Math.abs;var O=global.Math.sqrt;var P=global.Math.pow;var Q=global.Math.cos;var R=global.Math.sin;var S=global.Math.tan;var T=global.Math.acos;var U=global.Math.asin;var V=global.Math.atan;var W=global.Math.atan2;var X=global.Math.exp;var Y=global.Math.log;var Z=global.Math.ceil;var _=global.Math.imul;var $=global.Math.min;var aa=global.Math.clz32;var ba=env.abort;var ca=env.assert;var da=env.invoke_iiii;var ea=env.invoke_viiiii;var fa=env.invoke_vi;var ga=env.invoke_vii;var ha=env.invoke_ii;var ia=env.invoke_viii;var ja=env.invoke_v;var ka=env.invoke_iiiii;var la=env.invoke_viiiiii;var ma=env.invoke_iii;var na=env.invoke_viiii;var oa=env._pthread_cleanup_pop;var pa=env.___syscall221;var qa=env._pthread_mutex_init;var ra=env.___syscall64;var sa=env.___syscall63;var ta=env.___syscall6;var ua=env.___syscall202;var va=env.___setErrNo;var wa=env.___syscall20;var xa=env._llvm_stackrestore;var ya=env.___assert_fail;var za=env._floor;var Aa=env.__addDays;var Ba=env._localtime_r;var Ca=env._tzset;var Da=env._emscripten_set_main_loop_timing;var Ea=env._sbrk;var Fa=env.___syscall192;var Ga=env.___syscall191;var Ha=env.___syscall197;var Ia=env.___syscall195;var Ja=env.___syscall194;var Ka=env.___syscall199;var La=env._sysconf;var Ma=env._strftime;var Na=env._clock;var Oa=env.__arraySum;var Pa=env._emscripten_memcpy_big;var Qa=env.___syscall91;var Ra=env.___buildEnvironment;var Sa=env._pthread_mutex_destroy;var Ta=env._pthread_self;var Ua=env.___syscall75;var Va=env._pthread_mutex_unlock;var Wa=env.___syscall77;var Xa=env._llvm_stacksave;var Ya=env._getenv;var Za=env.___syscall33;var _a=env.___syscall54;var $a=env.___unlock;var ab=env.__isLeapYear;var bb=env._emscripten_set_main_loop;var cb=env.___syscall10;var db=env.___syscall3;var eb=env.___syscall340;var fb=env.___lock;var gb=env._abort;var hb=env.___syscall5;var ib=env.___syscall4;var jb=env._time;var kb=env._pthread_mutex_lock;var lb=env._gettimeofday;var mb=env.___syscall201;var nb=env._atexit;var ob=env.___syscall140;var pb=env._localtime;var qb=env.___syscall142;var rb=env._pthread_cleanup_push;var sb=env.___syscall145;var tb=env.___syscall146;var ub=0.0;
+// EMSCRIPTEN_START_FUNCS
+function Gb(a){a=a|0;var b=0;b=i;i=i+a|0;i=i+15&-16;return b|0}function Hb(){return i|0}function Ib(a){a=a|0;i=a}function Jb(a,b){a=a|0;b=b|0;i=a;j=b}function Kb(a,b){a=a|0;b=b|0;if(!n){n=a;o=b}}function Lb(b){b=b|0;a[k>>0]=a[b>>0];a[k+1>>0]=a[b+1>>0];a[k+2>>0]=a[b+2>>0];a[k+3>>0]=a[b+3>>0]}function Mb(b){b=b|0;a[k>>0]=a[b>>0];a[k+1>>0]=a[b+1>>0];a[k+2>>0]=a[b+2>>0];a[k+3>>0]=a[b+3>>0];a[k+4>>0]=a[b+4>>0];a[k+5>>0]=a[b+5>>0];a[k+6>>0]=a[b+6>>0];a[k+7>>0]=a[b+7>>0]}function Nb(a){a=a|0;C=a}function Ob(){return C|0}function Pb(){var a=0,b=0,d=0;a=Cc(8,19098,45)|0;b=ge()|0;d=a;c[d>>2]=b;c[d+4>>2]=C;return a|0}function Qb(a,b){a=a|0;b=b|0;var c=0;c=Cc(64,19098,64)|0;ld(a,b,c);return c|0}function Rb(a){a=a|0;var b=0,d=0,e=0,f=0,g=0;b=i;i=i+32|0;d=b;e=a;f=c[e>>2]|0;g=c[e+4>>2]|0;e=c[a+8>>2]|0;c[d>>2]=a;c[d+4>>2]=a+12;a=d+8|0;c[a>>2]=f;c[a+4>>2]=g;c[d+16>>2]=e;Fw(19105,d)|0;i=b;return}function Sb(a){a=a|0;var b=0;b=Cc(32,19098,116)|0;bd(a,b);return b|0}function Tb(a,b){a=a|0;b=b|0;var c=0,d=0;c=Cc(64,19098,131)|0;d=(kd(a,b,c)|0)==-1;return (d?0:c)|0}function Ub(a){a=a|0;var b=0,c=0;b=Cc(32,19098,151)|0;c=(dd(a,Kv(a)|0,b)|0)==1;return (c?b:0)|0}function Vb(a){a=a|0;var b=0,c=0,d=0;b=i;i=i+32|0;c=b;if((dd(a,Kv(a)|0,c)|0)!=1){d=0;i=b;return d|0}a=Cc(32,19098,173)|0;$c(c,a);d=a;i=b;return d|0}function Wb(a){a=a|0;var b=0;b=Cc(32,19098,190)|0;$c(a,b);return b|0}function Xb(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=c[a>>2];c[d+4>>2]=c[a+4>>2];a=ae(d)|0;i=b;return a|0}function Yb(a){a=a|0;Ec(a,19098,213);return}function Zb(a){a=a|0;var b=0,d=0,e=0;b=i;i=i+16|0;d=b;c[d>>2]=jw(8)|0;c[d+4>>2]=jw(1302)|0;e=Cc(64,19098,234)|0;hd(a,d,e)|0;i=b;return e|0}function _b(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=i;i=i+16|0;e=d;c[e>>2]=jw(8)|0;c[e+4>>2]=jw(1303)|0;f=jd(1303,e,a,b)|0;i=d;return f|0}function $b(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0;if(!(gv(a,19142)|0)){e=jd(1200,b,c,d)|0;return e|0}if(gv(a,19158)|0){e=-1;return e|0}e=jd(1101,b,c,d)|0;return e|0}function ac(b,c,d,e){b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0;a[b+c>>0]=0;do if(gv(b,19173)|0){if(!(gv(b,19206)|0)){f=jw(1303)|0;break}if(!(gv(b,19142)|0)){f=jw(1200)|0;break}else{g=0;return g|0}}else f=jw(1025)|0;while(0);b=e+8|0;c=jw(b)|0;h=Cc(b,19098,329)|0;a[h>>0]=c;a[h+1>>0]=c>>8;a[h+2>>0]=c>>16;a[h+3>>0]=c>>24;c=h+4|0;a[c>>0]=f;a[c+1>>0]=f>>8;a[c+2>>0]=f>>16;a[c+3>>0]=f>>24;if(!e){g=h;return g|0}Dx(h+64|0,d|0,e|0)|0;g=h;return g|0}function bc(b,c,d){b=b|0;c=c|0;d=d|0;var e=0,f=0;e=d+8|0;f=Cc(e,19098,348)|0;Dx(f+8|0,c|0,d|0)|0;d=jw(b)|0;b=f+4|0;a[b>>0]=d;a[b+1>>0]=d>>8;a[b+2>>0]=d>>16;a[b+3>>0]=d>>24;d=jw(e)|0;a[f>>0]=d;a[f+1>>0]=d>>8;a[f+2>>0]=d>>16;a[f+3>>0]=d>>24;return f|0}function cc(a){a=a|0;var b=0,c=0;b=~~+M(+(+(((Kv(a)|0)*5|0)>>>3>>>0)))>>>0;c=Cc(b,19098,373)|0;de(a,Kv(a)|0,c,b)|0;a=Od(c,b)|0;Ec(c,19098,213);return a|0}function dc(a){a=a|0;var b=0,d=0,e=0;b=i;i=i+16|0;d=b;e=Qd(a,d)|0;a=ce(c[d>>2]|0,e)|0;Ec(c[d>>2]|0,19098,213);i=b;return a|0}function ec(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0;e=i;i=i+16|0;f=e;g=Cc(64,19098,416)|0;h=Kv(a)|0;c[f>>2]=0;c[f+4>>2]=0;j=(wd(g,64,a,h,b,d,f)|0)==1;i=e;return (j?g:0)|0}function fc(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0;e=i;i=i+16|0;f=e;g=Cc(32,19098,441)|0;h=Kv(a)|0;c[f>>2]=0;c[f+4>>2]=0;j=(wd(g,32,a,h,b,d,f)|0)==1;i=e;return (j?g:0)|0}function gc(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0;e=i;i=i+16|0;f=e;g=Cc(64,19098,464)|0;h=Kv(a)|0;c[f>>2]=0;c[f+4>>2]=0;j=(wd(g,64,a,h,b,d,f)|0)==1;i=e;return (j?g:0)|0}function hc(a,b,d,e,f,g,h){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var j=0,k=0,l=0,m=0,n=0;j=i;i=i+80|0;k=j+48|0;l=j+24|0;m=j;if((Ou(h,k)|0)!=1){n=0;i=j;return n|0}if((Ou(h,l)|0)!=1){n=0;i=j;return n|0}if((Ou(h,m)|0)!=1){n=0;i=j;return n|0}h=k;c[h>>2]=a;c[h+4>>2]=b;c[k+8>>2]=f;f=l;c[f>>2]=d;c[f+4>>2]=e;c[l+8>>2]=g;if((Vu(m,k,l)|0)!=1){n=0;i=j;return n|0}l=Cc(24,19098,512)|0;c[l>>2]=c[m>>2];c[l+4>>2]=c[m+4>>2];c[l+8>>2]=c[m+8>>2];c[l+12>>2]=c[m+12>>2];c[l+16>>2]=c[m+16>>2];c[l+20>>2]=c[m+20>>2];n=l;i=j;return n|0}function ic(b,d,e,f,g,h){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var j=0,k=0;j=i;i=i+224|0;k=j;Nd(f,k+88|0);Mu(k+40|0,d);Mu(k+64|0,e);e=k+8|0;d=b;b=e+32|0;do{a[e>>0]=a[d>>0]|0;e=e+1|0;d=d+1|0}while((e|0)<(b|0));c[k>>2]=jw(216)|0;c[k+4>>2]=jw(1200)|0;ld(g,h,k+152|0);h=Cc(216,19098,567)|0;Dx(h|0,k|0,216)|0;i=j;return h|0}function jc(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;d=i;i=i+80|0;e=d;c[e>>2]=72;c[e+4>>2]=1201;f=e+8|0;g=a;a=f+64|0;do{c[f>>2]=c[g>>2];f=f+4|0;g=g+4|0}while((f|0)<(a|0));g=Cc(64,19098,593)|0;hd(b,e,g)|0;i=d;return g|0}function kc(a){a=a|0;var b=0;b=Cc(64,19098,635)|0;Nd(a,b);return b|0}function lc(b,d,e,f,g,h,j,k,l,m,n){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;k=k|0;l=l|0;m=m|0;n=n|0;var o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;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1|0;v=v+1|0}while((u|0)<(b|0));u=t;v=k;b=u+32|0;do{a[u>>0]=a[v>>0]|0;u=u+1|0;v=v+1|0}while((u|0)<(b|0));k=Mx(e|0,0,1e6,0)|0;e=q;c[e>>2]=k;c[e+4>>2]=C;e=Mx(f|0,0,1e6,0)|0;f=r;c[f>>2]=e;c[f+4>>2]=C;c[o>>2]=c[q>>2];c[o+4>>2]=c[q+4>>2];q=le(o)|0;f=p+136|0;c[f>>2]=q;c[f+4>>2]=C;c[o>>2]=c[r>>2];c[o+4>>2]=c[r+4>>2];r=le(o)|0;o=p+144|0;c[o>>2]=r;c[o+4>>2]=C;o=Hc(g,0)|0;g=p+152|0;c[g>>2]=o;c[g+4>>2]=C;Mu(p+160|0,h);Mu(p+184|0,j);u=p+208|0;v=t;b=u+32|0;do{a[u>>0]=a[v>>0]|0;u=u+1|0;v=v+1|0}while((u|0)<(b|0));u=p+240|0;v=s;b=u+32|0;do{a[u>>0]=a[v>>0]|0;u=u+1|0;v=v+1|0}while((u|0)<(b|0));c[p>>2]=jw(272)|0;c[p+4>>2]=jw(1201)|0;v=Cc(64,19098,1137)|0;hd(m,p,v)|0;i=n;return v|0}function sc(b,d,e,f,g,h,j,k,l,m,n){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;k=k|0;l=l|0;m=m|0;n=n|0;var o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;o=i;i=i+304|0;p=o+16|0;q=o+24|0;r=o+272|0;s=o+8|0;t=o;u=q+8|0;v=b;b=u+64|0;do{a[u>>0]=a[v>>0]|0;u=u+1|0;v=v+1|0}while((u|0)<(b|0));u=q+72|0;v=d;b=u+64|0;do{a[u>>0]=a[v>>0]|0;u=u+1|0;v=v+1|0}while((u|0)<(b|0));u=r;v=k;b=u+32|0;do{a[u>>0]=a[v>>0]|0;u=u+1|0;v=v+1|0}while((u|0)<(b|0));u=q+216|0;v=l;b=u+32|0;do{a[u>>0]=a[v>>0]|0;u=u+1|0;v=v+1|0}while((u|0)<(b|0));u=q+184|0;v=r;b=u+32|0;do{a[u>>0]=a[v>>0]|0;u=u+1|0;v=v+1|0}while((u|0)<(b|0));v=Mx(e|0,0,1e6,0)|0;e=s;c[e>>2]=v;c[e+4>>2]=C;e=Mx(f|0,0,1e6,0)|0;f=t;c[f>>2]=e;c[f+4>>2]=C;c[p>>2]=c[s>>2];c[p+4>>2]=c[s+4>>2];s=le(p)|0;f=q+144|0;c[f>>2]=s;c[f+4>>2]=C;c[p>>2]=c[t>>2];c[p+4>>2]=c[t+4>>2];t=le(p)|0;p=q+152|0;c[p>>2]=t;c[p+4>>2]=C;Mu(q+160|0,j);j=Hc(g,h)|0;h=q+136|0;c[h>>2]=j;c[h+4>>2]=C;c[q+4>>2]=jw(1033)|0;c[q>>2]=jw(248)|0;h=(jd(1033,q,m,n)|0)!=-1&1;i=o;return h|0}function tc(a,b){a=a|0;b=b|0;var c=0;c=Cc(64,19098,1248)|0;hd(a,b,c)|0;return c|0}function uc(a){a=a|0;return nw(d[a>>0]|d[a+1>>0]<<8|d[a+2>>0]<<16|d[a+3>>0]<<24)|0}function vc(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0;f=i;i=i+32|0;g=f;if((Ou(e,g)|0)!=1){h=0;i=f;return h|0}e=g;c[e>>2]=a;c[e+4>>2]=b;c[g+8>>2]=d;d=Cc(24,19098,1291)|0;c[d>>2]=c[g>>2];c[d+4>>2]=c[g+4>>2];c[d+8>>2]=c[g+8>>2];c[d+12>>2]=c[g+12>>2];c[d+16>>2]=c[g+16>>2];c[d+20>>2]=c[g+20>>2];h=d;i=f;return h|0}function wc(){Cw(19222)|0;return}function xc(a){a=a|0;var b=0;b=a;C=c[b+4>>2]|0;return c[b>>2]|0}function yc(a){a=a|0;return c[a+8>>2]|0}function zc(a){a=a|0;return a+12|0}function Ac(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0;d=i;i=i+32|0;e=d;Ou(a+12|0,e)|0;if((Su(a)|0)==-1){f=-1;i=d;return f|0}g=a;h=c[g>>2]|0;j=c[g+4>>2]|0;g=Mx(h|0,j|0,b|0,0)|0;k=C;l=e;c[l>>2]=g;c[l+4>>2]=k;l=Nx(g|0,k|0,b|0,0)|0;if(!((l|0)==(h|0)&(C|0)==(j|0))){f=-1;i=d;return f|0}j=c[a+8>>2]|0;h=_(j,b)|0;c[e+8>>2]=h;if(((h>>>0)/(b>>>0)|0|0)!=(j|0)){f=-1;i=d;return f|0}Su(e)|0;c[a>>2]=c[e>>2];c[a+4>>2]=c[e+4>>2];c[a+8>>2]=c[e+8>>2];c[a+12>>2]=c[e+12>>2];c[a+16>>2]=c[e+16>>2];c[a+20>>2]=c[e+20>>2];f=1;i=d;return f|0}function Bc(a,b){a=a|0;b=b|0;var d=0.0,e=0,f=0;if((Su(a)|0)==-1){d=-1.0;return +d}if((Su(b)|0)==-1){d=-1.0;return +d}e=a;f=b;d=(+((c[a+8>>2]|0)>>>0)/1.0e6+(+((c[e>>2]|0)>>>0)+4294967296.0*+((c[e+4>>2]|0)>>>0)))*(+((c[b+8>>2]|0)>>>0)/1.0e6+(+((c[f>>2]|0)>>>0)+4294967296.0*+((c[f+4>>2]|0)>>>0)));return +d}function Cc(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;e=i;i=i+64|0;f=e+24|0;g=e+8|0;h=e;j=e+56|0;k=e+52|0;l=e+48|0;m=e+44|0;n=e+40|0;o=e+36|0;p=e+32|0;c[j>>2]=a;c[k>>2]=b;c[l>>2]=d;if((c[j>>2]|0)>>>0>41943040){c[n>>2]=74;if((c[184]|0)==-1)c[184]=Mc(1,0,19262,19282,c[n>>2]|0)|0;if((Pc()|0)>0){Qc(-1,0);Lc()}if(!(c[184]|0))Lc();n=c[l>>2]|0;c[h>>2]=c[k>>2];c[h+4>>2]=n;Rc(1,61592,h);Lc()}c[m>>2]=Dc(c[j>>2]|0,c[k>>2]|0,c[l>>2]|0)|0;if(c[m>>2]|0){i=e;return c[m>>2]|0}c[o>>2]=81;if((c[185]|0)==-1)c[185]=Mc(1,21083,19262,19282,c[o>>2]|0)|0;if((Pc()|0)<=0){if(c[185]|0){o=ov(c[(Yu()|0)>>2]|0)|0;c[g>>2]=19298;c[g+4>>2]=19262;c[g+8>>2]=81;c[g+12>>2]=o;Wc(1,21083,20661,g)}}else Qc(-1,0);c[p>>2]=82;if((c[186]|0)==-1)c[186]=Mc(1,0,19262,19282,c[p>>2]|0)|0;if((Pc()|0)>0){Qc(-1,0);Lc()}if(!(c[186]|0))Lc();c[f>>2]=19262;c[f+4>>2]=82;Rc(1,61592,f);Lc();return 0}function Dc(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0;e=i;i=i+32|0;f=e+16|0;g=e+12|0;h=e;c[g>>2]=a;c[e+8>>2]=b;c[e+4>>2]=d;c[h>>2]=sx(c[g>>2]|0)|0;if(!(c[h>>2]|0)){c[f>>2]=0;j=c[f>>2]|0;i=e;return j|0}else{Fx(c[h>>2]|0,0,c[g>>2]|0)|0;c[f>>2]=c[h>>2];j=c[f>>2]|0;i=e;return j|0}return 0}function Ec(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0;e=i;i=i+32|0;f=e;g=e+20|0;h=e+16|0;j=e+12|0;k=e+8|0;c[g>>2]=a;c[h>>2]=b;c[j>>2]=d;if(c[g>>2]|0){tx(c[g>>2]|0);i=e;return}c[k>>2]=237;if((c[187]|0)==-1)c[187]=Mc(1,0,19262,19305,c[k>>2]|0)|0;if((Pc()|0)>0){Qc(-1,0);Lc()}if(!(c[187]|0))Lc();k=c[j>>2]|0;c[f>>2]=c[h>>2];c[f+4>>2]=k;Rc(1,61592,f);Lc()}function Fc(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0;e=i;i=i+32|0;f=e;g=e+28|0;h=e+24|0;j=e+20|0;k=e+16|0;l=e+12|0;m=e+8|0;c[g>>2]=a;c[h>>2]=b;c[j>>2]=d;if(c[g>>2]|0){c[l>>2]=(Kv(c[g>>2]|0)|0)+1;c[k>>2]=Cc(c[l>>2]|0,c[h>>2]|0,c[j>>2]|0)|0;Dx(c[k>>2]|0,c[g>>2]|0,c[l>>2]|0)|0;i=e;return c[k>>2]|0}c[m>>2]=278;if((c[188]|0)==-1)c[188]=Mc(1,0,19262,19319,c[m>>2]|0)|0;if((Pc()|0)>0){Qc(-1,0);Lc()}if(!(c[188]|0))Lc();m=c[j>>2]|0;c[f>>2]=c[h>>2];c[f+4>>2]=m;Rc(1,61592,f);Lc();return 0}function Gc(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0;f=i;i=i+48|0;g=f;h=f+44|0;j=f+40|0;k=f+36|0;l=f+32|0;m=f+16|0;n=f+8|0;c[h>>2]=a;c[j>>2]=b;c[k>>2]=d;c[m>>2]=e;c[l>>2]=uv(c[h>>2]|0,c[j>>2]|0,c[k>>2]|0,m)|0;if((c[l>>2]|0)>>>0<(c[j>>2]|0)>>>0){i=f;return c[l>>2]|0}c[n>>2]=433;if((c[189]|0)==-1)c[189]=Mc(1,0,19262,19335,c[n>>2]|0)|0;if((Pc()|0)>0){Qc(-1,0);Lc()}if(!(c[189]|0))Lc();c[g>>2]=19262;c[g+4>>2]=433;Rc(1,61592,g);Lc();return 0}function Hc(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=i;i=i+16|0;e=d;f=e;c[f>>2]=a;c[f+4>>2]=b;b=jw(c[e>>2]|0)|0;f=Ax(0,b|0,jw(c[e+4>>2]|0)|0,0)|0;i=d;return f|0}function Ic(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=i;i=i+16|0;e=d;f=e;c[f>>2]=a;c[f+4>>2]=b;b=nw(c[e>>2]|0)|0;f=Ax(0,b|0,nw(c[e+4>>2]|0)|0,0)|0;i=d;return f|0}function Jc(){c[17640]=c[3962];return}function Kc(){return}function Lc(){gb()}function Mc(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;g=i;i=i+48|0;h=g+32|0;j=g+28|0;k=g+24|0;l=g+20|0;m=g+16|0;n=g+12|0;o=g+8|0;p=g+4|0;q=g;c[j>>2]=a;c[k>>2]=b;c[l>>2]=d;c[m>>2]=e;c[n>>2]=f;if(!(c[k>>2]|0))c[k>>2]=c[17641];if((c[17642]|0)>=0&0==(c[17643]|0)){c[h>>2]=(c[j>>2]|0)<=(c[17642]|0)&1;r=c[h>>2]|0;i=g;return r|0}c[q>>2]=(c[17642]|0)>=0&1;c[p>>2]=0;while(1){if((c[p>>2]|0)>=(c[17644]|0))break;c[o>>2]=(c[17645]|0)+((c[p>>2]|0)*112|0);if(!((c[q>>2]|0)!=0?(c[(c[o>>2]|0)+108>>2]|0)==0:0))s=9;if((((((s|0)==9?(s=0,(c[n>>2]|0)>=(c[(c[o>>2]|0)+96>>2]|0)):0)?(c[n>>2]|0)<=(c[(c[o>>2]|0)+100>>2]|0):0)?0==(ox(c[o>>2]|0,c[k>>2]|0,0,0,0)|0):0)?0==(ox((c[o>>2]|0)+32|0,c[l>>2]|0,0,0,0)|0):0)?0==(ox((c[o>>2]|0)+64|0,c[m>>2]|0,0,0,0)|0):0){s=14;break}c[p>>2]=(c[p>>2]|0)+1}if((s|0)==14){c[h>>2]=(c[j>>2]|0)<=(c[(c[o>>2]|0)+104>>2]|0)&1;r=c[h>>2]|0;i=g;return r|0}o=c[j>>2]|0;if((c[17642]|0)>=0){c[h>>2]=(o|0)<=(c[17642]|0)&1;r=c[h>>2]|0;i=g;return r|0}else{c[h>>2]=(o|0)<=2&1;r=c[h>>2]|0;i=g;return r|0}return 0}function Nc(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;d=i;i=i+4176|0;e=d+24|0;f=d+16|0;g=d;h=d+72|0;j=d+68|0;k=d+76|0;l=d+64|0;m=d+60|0;n=d+56|0;o=d+52|0;p=d+48|0;q=d+44|0;c[j>>2]=b;if(!(c[17647]|0)){c[h>>2]=-1;r=c[h>>2]|0;i=d;return r|0}if(!(Ma(k|0,4097,c[17647]|0,c[j>>2]|0)|0)){c[h>>2]=-1;r=c[h>>2]|0;i=d;return r|0}c[o>>2]=ix(k,91)|0;if(0!=(c[o>>2]|0)?93==(a[(c[o>>2]|0)+1>>0]|0):0){c[p>>2]=Fc(k,19381,344)|0;a[(c[p>>2]|0)+((c[o>>2]|0)-k)>>0]=0;a[(c[p>>2]|0)+((c[o>>2]|0)-k+1)>>0]=0;j=c[p>>2]|0;b=Dw()|0;s=(c[p>>2]|0)+((c[o>>2]|0)-k+2)|0;c[g>>2]=j;c[g+4>>2]=b;c[g+8>>2]=s;tv(k,4096,19404,g)|0;Ec(c[p>>2]|0,19381,354)}if(!(gv(k,71662)|0)){c[h>>2]=1;r=c[h>>2]|0;i=d;return r|0}Oc(71662);Wv(71662,k)|0;c[f>>2]=420;c[l>>2]=Mw(k,1089,f)|0;do if(-1!=(c[l>>2]|0)){if(c[17640]|0)vw(c[17640]|0)|0;c[m>>2]=Yw(c[l>>2]|0,2)|0;lw(c[l>>2]|0)|0;if(-1==(c[m>>2]|0)){c[l>>2]=-1;break}c[n>>2]=uw(2,19411)|0;if(!(c[n>>2]|0)){lw(2)|0;c[l>>2]=-1}}while(0);if(-1!=(c[l>>2]|0)){c[17640]=c[n>>2];c[h>>2]=1;r=c[h>>2]|0;i=d;return r|0}c[q>>2]=392;if((c[190]|0)==-1)c[190]=Mc(1,0,19381,19414,c[q>>2]|0)|0;if((Pc()|0)<=0){if(c[190]|0){q=ov(c[(Yu()|0)>>2]|0)|0;c[e>>2]=38544;c[e+4>>2]=k;c[e+8>>2]=19381;c[e+12>>2]=392;c[e+16>>2]=q;Rc(1,19557,e)}}else Qc(-1,0);c[h>>2]=-1;r=c[h>>2]|0;i=d;return r|0}function Oc(b){b=b|0;var d=0,e=0,f=0;d=i;i=i+16|0;e=d+4|0;f=d;c[e>>2]=b;if(!(a[c[e>>2]>>0]|0)){i=d;return}c[f>>2]=c[70596+((((c[17648]|0)>>>0)%3|0)<<2)>>2];if(c[f>>2]|0){Nw(c[f>>2]|0)|0;Ec(c[f>>2]|0,19381,314)}f=Fc(c[e>>2]|0,19381,316)|0;c[70596+((((c[17648]|0)>>>0)%3|0)<<2)>>2]=f;c[17648]=(c[17648]|0)+1;i=d;return}function Pc(){return c[17652]|0}function Qc(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0;d=i;i=i+32|0;e=d;f=d+20|0;g=d+16|0;h=d+12|0;j=d+8|0;c[f>>2]=a;c[g>>2]=b;if(c[f>>2]|0){c[17652]=(c[17652]|0)+(c[f>>2]|0);i=d;return}c[h>>2]=0==(c[17652]|0)&1;c[17652]=0;if((c[g>>2]|0)==0|(c[h>>2]|0)!=0){i=d;return}c[j>>2]=867;if((c[191]|0)==-1)c[191]=Mc(1,0,19381,19429,c[j>>2]|0)|0;if((Pc()|0)>0){Qc(-1,0);i=d;return}if(!(c[191]|0)){i=d;return}c[e>>2]=19381;c[e+4>>2]=867;Rc(1,61592,e);i=d;return}function Rc(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=i;i=i+32|0;f=e+20|0;g=e+16|0;h=e;c[f>>2]=a;c[g>>2]=b;c[h>>2]=d;Sc(c[f>>2]|0,c[17646]|0,c[g>>2]|0,h);i=e;return}function Sc(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,D=0;g=i;i=i+240|0;h=g+40|0;j=g+32|0;k=g+24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;k=zx(0,0,t|0,C|0)|0;t=Mx(k|0,C|0,1e3,0)|0;k=C;b=w;B=Lx(c[b>>2]|0,c[b+4>>2]|0,1e3,0)|0;b=Mx(B|0,C|0,1e3,0)|0;B=C;if((d|0)>(k|0)|(d|0)==(k|0)&e>>>0>t>>>0){t=x+4|0;e=c[t>>2]|0;k=Ax(e|0,((e|0)<0)<<31>>31|0,b|0,B|0)|0;c[t>>2]=k;break}else{k=Ax(1e6,0,b|0,B|0)|0;B=x+4|0;b=c[B>>2]|0;t=Ax(b|0,((b|0)<0)<<31>>31|0,k|0,C|0)|0;c[B>>2]=t;c[x>>2]=(c[x>>2]|0)+-1;break}}while(0);c[r>>2]=pb(x|0)|0;if(!(c[r>>2]|0))Wv(p,19451)|0;else{Ma(q|0,64,19467,c[r>>2]|0)|0;c[j>>2]=c[x+4>>2];tv(p,64,q,j)|0}uv(u,c[s>>2]|0,c[n>>2]|0,c[o>>2]|0)|0;if(c[r>>2]|0)Nc(c[r>>2]|0)|0;r=70528;if(0!=(c[l>>2]&32|0)&(0!=(c[r>>2]|0)?1:0!=(c[r+4>>2]|0))?0==(iw(u,75759,256)|0):0){c[17653]=(c[17653]|0)+1;c[h>>2]=c[17632];c[h+4>>2]=c[17633];r=ke(h)|0;h=y;c[h>>2]=r;c[h+4>>2]=C;h=y;y=c[h+4>>2]|0;if(y>>>0>10|(y|0)==10&(c[h>>2]|0)>>>0>250327040|(c[17653]|0)>>>0>1e3)Tc(p);c[z>>2]=1;D=c[v>>2]|0;xa(D|0);i=g;return}Tc(p);ow(75759,u,256)|0;c[17653]=0;c[17654]=c[l>>2];h=ge()|0;y=A;c[y>>2]=h;c[y+4>>2]=C;c[17632]=c[A>>2];c[17633]=c[A+4>>2];ow(76015,c[m>>2]|0,32)|0;Uc(c[l>>2]|0,c[m>>2]|0,p,u);c[z>>2]=0;D=c[v>>2]|0;xa(D|0);i=g;return}function Tc(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0;d=i;i=i+640|0;e=d+32|0;f=d+16|0;g=d+52|0;h=d+56|0;j=d+48|0;k=d+44|0;l=d+40|0;m=d+8|0;n=d;c[g>>2]=b;b=70528;if((0==(c[b>>2]|0)?0==(c[b+4>>2]|0):0)|0==(c[17653]|0)){i=d;return}c[j>>2]=0;c[k>>2]=Cv(75759,0,256)|0;if(c[k>>2]|0){if((c[k>>2]|0)!=75759)c[k>>2]=(c[k>>2]|0)+-1}else c[k>>2]=76014;if((a[c[k>>2]>>0]|0)==10){c[j>>2]=1;a[c[k>>2]>>0]=0};c[e>>2]=c[17632];c[e+4>>2]=c[17633];b=ke(e)|0;o=m;c[o>>2]=b;c[o+4>>2]=C;c[e>>2]=c[m>>2];c[e+4>>2]=c[m+4>>2];c[l>>2]=$d(e,1)|0;e=c[17653]|0;m=c[l>>2]|0;c[f>>2]=256;c[f+4>>2]=75759;c[f+8>>2]=e;c[f+12>>2]=m;tv(h,576,19488,f)|0;if((c[j>>2]|0)==1)a[c[k>>2]>>0]=10;Uc(c[17654]|0,76015,c[g>>2]|0,h);h=ge()|0;g=n;c[g>>2]=h;c[g+4>>2]=C;c[17632]=c[n>>2];c[17633]=c[n+4>>2];c[17653]=0;i=d;return}function Uc(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0;f=i;i=i+48|0;g=f;h=f+32|0;j=f+28|0;k=f+24|0;l=f+20|0;m=f+16|0;c[h>>2]=a;c[j>>2]=b;c[k>>2]=d;c[l>>2]=e;if(0!=(c[17640]|0)&0==(c[17655]|0)){e=c[17640]|0;d=c[k>>2]|0;b=c[j>>2]|0;a=Vc(c[h>>2]|0)|0;n=c[l>>2]|0;c[g>>2]=d;c[g+4>>2]=b;c[g+8>>2]=a;c[g+12>>2]=n;gw(e,19545,g)|0;ww(c[17640]|0)|0}c[m>>2]=c[17655];while(1){if(!(c[m>>2]|0))break;wb[c[(c[m>>2]|0)+4>>2]&15](c[(c[m>>2]|0)+8>>2]|0,c[h>>2]|0,c[j>>2]|0,c[k>>2]|0,c[l>>2]|0);c[m>>2]=c[c[m>>2]>>2]}i=f;return}function Vc(a){a=a|0;var b=0,d=0,e=0;b=i;i=i+16|0;d=b+4|0;e=b;c[e>>2]=a;do if((c[e>>2]&1|0)<=0){if((c[e>>2]&2|0)>0){c[d>>2]=19362;break}if((c[e>>2]&4|0)>0){c[d>>2]=19357;break}if((c[e>>2]&8|0)>0){c[d>>2]=19351;break}if(!(c[e>>2]&-33)){c[d>>2]=19376;break}else{c[d>>2]=19537;break}}else c[d>>2]=19370;while(0);i=b;return c[d>>2]|0}function Wc(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0;f=i;i=i+176|0;g=f;h=f+32|0;j=f+28|0;k=f+24|0;l=f+8|0;m=f+40|0;c[h>>2]=a;c[j>>2]=b;c[k>>2]=d;if(!(c[j>>2]|0))c[j>>2]=c[17641];c[l>>2]=e;e=c[j>>2]|0;j=Dw()|0;c[g>>2]=e;c[g+4>>2]=j;Gc(m,128,19398,g)|0;Sc(c[h>>2]|0,m,c[k>>2]|0,l);i=f;return}function Xc(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0;g=i;i=i+64|0;h=g+8|0;j=g;k=g+56|0;l=g+52|0;m=g+48|0;n=g+44|0;o=g+40|0;p=g+36|0;q=g+32|0;r=g+28|0;s=g+24|0;t=g+20|0;u=g+16|0;c[l>>2]=a;c[m>>2]=b;c[n>>2]=d;c[o>>2]=e;c[p>>2]=f;f=c[m>>2]|0;c[r>>2]=Xa()|0;e=i;i=i+((1*f|0)+15&-16)|0;if(1!=(Yc(q,c[n>>2]|0,c[o>>2]|0)|0)){c[k>>2]=-1;c[s>>2]=1;v=c[r>>2]|0;xa(v|0);w=c[k>>2]|0;i=g;return w|0}if(Ve(c[q>>2]|0,e,c[m>>2]|0,c[l>>2]|0,c[m>>2]|0)|0){c[t>>2]=136;if((c[196]|0)==-1)c[196]=Mc(1,0,19607,19643,c[t>>2]|0)|0;if((Pc()|0)>0){Qc(-1,0);Lc()}if(!(c[196]|0))Lc();c[j>>2]=19607;c[j+4>>2]=136;Rc(1,61592,j);Lc()}Qe(c[q>>2]|0);if(1!=(Zc(q,c[n>>2]|0,c[o>>2]|0)|0)){c[k>>2]=-1;c[s>>2]=1;v=c[r>>2]|0;xa(v|0);w=c[k>>2]|0;i=g;return w|0}if(!(Ve(c[q>>2]|0,c[p>>2]|0,c[m>>2]|0,e,c[m>>2]|0)|0)){Qe(c[q>>2]|0);Fx(e|0,0,f|0)|0;c[k>>2]=c[m>>2];c[s>>2]=1;v=c[r>>2]|0;xa(v|0);w=c[k>>2]|0;i=g;return w|0}c[u>>2]=140;if((c[200]|0)==-1)c[200]=Mc(1,0,19607,19643,c[u>>2]|0)|0;if((Pc()|0)>0){Qc(-1,0);Lc()}if(!(c[200]|0))Lc();c[h>>2]=19607;c[h+4>>2]=140;Rc(1,61592,h);Lc();return 0}function Yc(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;e=i;i=i+64|0;f=e+16|0;g=e+8|0;h=e;j=e+48|0;k=e+44|0;l=e+40|0;m=e+36|0;n=e+32|0;o=e+28|0;p=e+24|0;c[j>>2]=a;c[k>>2]=b;c[l>>2]=d;if(Pe(c[j>>2]|0,9,2,0)|0){c[n>>2]=68;if((c[193]|0)==-1)c[193]=Mc(1,0,19607,19626,c[n>>2]|0)|0;if((Pc()|0)>0){Qc(-1,0);Lc()}if(!(c[193]|0))Lc();c[h>>2]=19607;c[h+4>>2]=68;Rc(1,61592,h);Lc()}c[m>>2]=Re(c[c[j>>2]>>2]|0,c[k>>2]|0,32)|0;if(0!=(c[m>>2]|0)?((c[m>>2]&255)<<24>>24|0)!=43:0){c[o>>2]=72;if((c[194]|0)==-1)c[194]=Mc(1,0,19607,19626,c[o>>2]|0)|0;if((Pc()|0)>0){Qc(-1,0);Lc()}if(!(c[194]|0))Lc();c[g>>2]=19607;c[g+4>>2]=72;Rc(1,61592,g);Lc()}c[m>>2]=Ue(c[c[j>>2]>>2]|0,c[l>>2]|0,16)|0;if(!(c[m>>2]|0)){i=e;return 1}if(((c[m>>2]&255)<<24>>24|0)==43){i=e;return 1}c[p>>2]=76;if((c[195]|0)==-1)c[195]=Mc(1,0,19607,19626,c[p>>2]|0)|0;if((Pc()|0)>0){Qc(-1,0);Lc()}if(!(c[195]|0))Lc();c[f>>2]=19607;c[f+4>>2]=76;Rc(1,61592,f);Lc();return 0}function Zc(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;e=i;i=i+64|0;f=e+16|0;g=e+8|0;h=e;j=e+48|0;k=e+44|0;l=e+40|0;m=e+36|0;n=e+32|0;o=e+28|0;p=e+24|0;c[j>>2]=a;c[k>>2]=b;c[l>>2]=d;if(Pe(c[j>>2]|0,10,2,0)|0){c[n>>2]=98;if((c[197]|0)==-1)c[197]=Mc(1,0,19607,19675,c[n>>2]|0)|0;if((Pc()|0)>0){Qc(-1,0);Lc()}if(!(c[197]|0))Lc();c[h>>2]=19607;c[h+4>>2]=98;Rc(1,61592,h);Lc()}c[m>>2]=Re(c[c[j>>2]>>2]|0,(c[k>>2]|0)+32|0,32)|0;if(0!=(c[m>>2]|0)?((c[m>>2]&255)<<24>>24|0)!=43:0){c[o>>2]=102;if((c[198]|0)==-1)c[198]=Mc(1,0,19607,19675,c[o>>2]|0)|0;if((Pc()|0)>0){Qc(-1,0);Lc()}if(!(c[198]|0))Lc();c[g>>2]=19607;c[g+4>>2]=102;Rc(1,61592,g);Lc()}c[m>>2]=Ue(c[c[j>>2]>>2]|0,(c[l>>2]|0)+16|0,16)|0;if(!(c[m>>2]|0)){i=e;return 1}if(((c[m>>2]&255)<<24>>24|0)==43){i=e;return 1}c[p>>2]=106;if((c[199]|0)==-1)c[199]=Mc(1,0,19607,19675,c[p>>2]|0)|0;if((Pc()|0)>0){Qc(-1,0);Lc()}if(!(c[199]|0))Lc();c[f>>2]=19607;c[f+4>>2]=106;Rc(1,61592,f);Lc();return 0}function _c(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0;g=i;i=i+64|0;h=g+8|0;j=g;k=g+56|0;l=g+52|0;m=g+48|0;n=g+44|0;o=g+40|0;p=g+36|0;q=g+32|0;r=g+28|0;s=g+24|0;t=g+20|0;u=g+16|0;c[l>>2]=a;c[m>>2]=b;c[n>>2]=d;c[o>>2]=e;c[p>>2]=f;f=c[m>>2]|0;c[r>>2]=Xa()|0;e=i;i=i+((1*f|0)+15&-16)|0;if(1!=(Zc(q,c[n>>2]|0,c[o>>2]|0)|0)){c[k>>2]=-1;c[s>>2]=1;v=c[r>>2]|0;xa(v|0);w=c[k>>2]|0;i=g;return w|0}if(We(c[q>>2]|0,e,c[m>>2]|0,c[l>>2]|0,c[m>>2]|0)|0){c[t>>2]=171;if((c[201]|0)==-1)c[201]=Mc(1,0,19607,19696,c[t>>2]|0)|0;if((Pc()|0)>0){Qc(-1,0);Lc()}if(!(c[201]|0))Lc();c[j>>2]=19607;c[j+4>>2]=171;Rc(1,61592,j);Lc()}Qe(c[q>>2]|0);if(1!=(Yc(q,c[n>>2]|0,c[o>>2]|0)|0)){c[k>>2]=-1;c[s>>2]=1;v=c[r>>2]|0;xa(v|0);w=c[k>>2]|0;i=g;return w|0}if(!(We(c[q>>2]|0,c[p>>2]|0,c[m>>2]|0,e,c[m>>2]|0)|0)){Qe(c[q>>2]|0);Fx(e|0,0,f|0)|0;c[k>>2]=c[m>>2];c[s>>2]=1;v=c[r>>2]|0;xa(v|0);w=c[k>>2]|0;i=g;return w|0}c[u>>2]=175;if((c[202]|0)==-1)c[202]=Mc(1,0,19607,19696,c[u>>2]|0)|0;if((Pc()|0)>0){Qc(-1,0);Lc()}if(!(c[202]|0))Lc();c[h>>2]=19607;c[h+4>>2]=175;Rc(1,61592,h);Lc();return 0}function $c(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;d=i;i=i+64|0;e=d+16|0;f=d+8|0;g=d;h=d+52|0;j=d+48|0;k=d+44|0;l=d+40|0;m=d+36|0;n=d+32|0;o=d+28|0;p=d+24|0;c[h>>2]=a;c[j>>2]=b;c[k>>2]=ad(c[h>>2]|0)|0;if(!(c[k>>2]|0)){c[n>>2]=257;if((c[205]|0)==-1)c[205]=Mc(1,0,19770,19887,c[n>>2]|0)|0;if((Pc()|0)>0){Qc(-1,0);Lc()}if(!(c[205]|0))Lc();c[g>>2]=19770;c[g+4>>2]=257;Rc(1,61592,g);Lc()}if(Ie(l,c[k>>2]|0,0)|0){c[o>>2]=258;if((c[206]|0)==-1)c[206]=Mc(1,0,19770,19887,c[o>>2]|0)|0;if((Pc()|0)>0){Qc(-1,0);Lc()}if(!(c[206]|0))Lc();c[f>>2]=19770;c[f+4>>2]=258;Rc(1,61592,f);Lc()}ue(c[k>>2]|0);c[m>>2]=Je(19799,c[l>>2]|0,0)|0;if(c[m>>2]|0){xd(c[j>>2]|0,32,c[m>>2]|0);Ae(c[m>>2]|0);mf(c[l>>2]|0);i=d;return}c[p>>2]=261;if((c[207]|0)==-1)c[207]=Mc(1,0,19770,19887,c[p>>2]|0)|0;if((Pc()|0)>0){Qc(-1,0);Lc()}if(!(c[207]|0))Lc();c[e>>2]=19770;c[e+4>>2]=261;Rc(1,61592,e);Lc()}function ad(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0;b=i;i=i+64|0;d=b+24|0;e=b+8|0;f=b;g=b+48|0;h=b+44|0;j=b+40|0;k=b+36|0;l=b+32|0;c[g>>2]=a;a=c[g>>2]|0;c[f>>2]=32;c[f+4>>2]=a;c[j>>2]=te(h,0,19807,f)|0;if(!(c[j>>2]|0)){i=b;return c[h>>2]|0}c[k>>2]=169;if((c[203]|0)==-1)c[203]=Mc(1,21083,19770,19862,c[k>>2]|0)|0;if((Pc()|0)<=0){if(c[203]|0){k=me(c[j>>2]|0)|0;c[e>>2]=19783;c[e+4>>2]=19770;c[e+8>>2]=169;c[e+12>>2]=k;Wc(1,21083,20661,e)}}else Qc(-1,0);c[l>>2]=170;if((c[204]|0)==-1)c[204]=Mc(1,0,19770,19862,c[l>>2]|0)|0;if((Pc()|0)>0){Qc(-1,0);Lc()}if(!(c[204]|0))Lc();c[d>>2]=19770;c[d+4>>2]=170;Rc(1,61592,d);Lc();return 0}function bd(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;d=i;i=i+64|0;e=d+16|0;f=d+8|0;g=d;h=d+52|0;j=d+48|0;k=d+44|0;l=d+40|0;m=d+36|0;n=d+32|0;o=d+28|0;p=d+24|0;c[h>>2]=a;c[j>>2]=b;c[k>>2]=cd(c[h>>2]|0)|0;if(!(c[k>>2]|0)){c[n>>2]=283;if((c[210]|0)==-1)c[210]=Mc(1,0,19770,19947,c[n>>2]|0)|0;if((Pc()|0)>0){Qc(-1,0);Lc()}if(!(c[210]|0))Lc();c[g>>2]=19770;c[g+4>>2]=283;Rc(1,61592,g);Lc()}if(Ie(l,c[k>>2]|0,0)|0){c[o>>2]=284;if((c[211]|0)==-1)c[211]=Mc(1,0,19770,19947,c[o>>2]|0)|0;if((Pc()|0)>0){Qc(-1,0);Lc()}if(!(c[211]|0))Lc();c[f>>2]=19770;c[f+4>>2]=284;Rc(1,61592,f);Lc()}ue(c[k>>2]|0);c[m>>2]=Je(19799,c[l>>2]|0,0)|0;if(c[m>>2]|0){xd(c[j>>2]|0,32,c[m>>2]|0);Ae(c[m>>2]|0);mf(c[l>>2]|0);i=d;return}c[p>>2]=287;if((c[212]|0)==-1)c[212]=Mc(1,0,19770,19947,c[p>>2]|0)|0;if((Pc()|0)>0){Qc(-1,0);Lc()}if(!(c[212]|0))Lc();c[e>>2]=19770;c[e+4>>2]=287;Rc(1,61592,e);Lc()}function cd(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0;b=i;i=i+64|0;d=b+24|0;e=b+8|0;f=b;g=b+48|0;h=b+44|0;j=b+40|0;k=b+36|0;l=b+32|0;c[g>>2]=a;a=c[g>>2]|0;c[f>>2]=32;c[f+4>>2]=a;c[j>>2]=te(h,0,19728,f)|0;if(!(c[j>>2]|0)){i=b;return c[h>>2]|0}c[k>>2]=202;if((c[208]|0)==-1)c[208]=Mc(1,21083,19770,19922,c[k>>2]|0)|0;if((Pc()|0)<=0){if(c[208]|0){k=me(c[j>>2]|0)|0;c[e>>2]=19783;c[e+4>>2]=19770;c[e+8>>2]=202;c[e+12>>2]=k;Wc(1,21083,20661,e)}}else Qc(-1,0);c[l>>2]=203;if((c[209]|0)==-1)c[209]=Mc(1,0,19770,19922,c[l>>2]|0)|0;if((Pc()|0)>0){Qc(-1,0);Lc()}if(!(c[209]|0))Lc();c[d>>2]=19770;c[d+4>>2]=203;Rc(1,61592,d);Lc();return 0}function dd(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0;e=i;i=i+32|0;f=e+16|0;g=e+12|0;h=e+8|0;j=e+4|0;k=e;c[g>>2]=a;c[h>>2]=b;c[j>>2]=d;c[k>>2]=256;if((((c[k>>2]|0)>>>0)%5|0)>>>0>0)c[k>>2]=(c[k>>2]|0)+(5-(((c[k>>2]|0)>>>0)%5|0));c[k>>2]=((c[k>>2]|0)>>>0)/5|0;if((c[h>>2]|0)!=(c[k>>2]|0)){c[f>>2]=-1;l=c[f>>2]|0;i=e;return l|0}if(1!=(de(c[g>>2]|0,c[h>>2]|0,c[j>>2]|0,32)|0)){c[f>>2]=-1;l=c[f>>2]|0;i=e;return l|0}else{c[f>>2]=1;l=c[f>>2]|0;i=e;return l|0}return 0}function ed(){var a=0,b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;a=i;i=i+96|0;b=a+40|0;d=a+24|0;e=a+8|0;f=a+88|0;g=a+84|0;h=a+80|0;j=a+76|0;k=a+72|0;l=a+68|0;m=a+64|0;n=a+60|0;o=a+56|0;p=te(j,0,19982,a)|0;c[l>>2]=p;if(p){c[m>>2]=505;if((c[213]|0)==-1)c[213]=Mc(1,21083,19770,20037,c[m>>2]|0)|0;if((Pc()|0)<=0){if(c[213]|0){m=me(c[l>>2]|0)|0;c[e>>2]=19783;c[e+4>>2]=19770;c[e+8>>2]=505;c[e+12>>2]=m;Wc(1,21083,20661,e)}}else Qc(-1,0);c[f>>2]=0;q=c[f>>2]|0;i=a;return q|0}e=_e(h,c[j>>2]|0)|0;c[l>>2]=e;if(e){c[n>>2]=510;if((c[214]|0)==-1)c[214]=Mc(1,21083,19770,20037,c[n>>2]|0)|0;if((Pc()|0)<=0){if(c[214]|0){n=me(c[l>>2]|0)|0;c[d>>2]=20068;c[d+4>>2]=19770;c[d+8>>2]=510;c[d+12>>2]=n;Wc(1,21083,20661,d)}}else Qc(-1,0);ue(c[j>>2]|0);c[f>>2]=0;q=c[f>>2]|0;i=a;return q|0}ue(c[j>>2]|0);j=fd(k,c[h>>2]|0,37935,35585)|0;c[l>>2]=j;if(!j){ue(c[h>>2]|0);c[g>>2]=Cc(32,19770,530)|0;xd(c[g>>2]|0,32,c[k>>2]|0);Ae(c[k>>2]|0);c[f>>2]=c[g>>2];q=c[f>>2]|0;i=a;return q|0}c[o>>2]=525;if((c[215]|0)==-1)c[215]=Mc(1,21083,19770,20037,c[o>>2]|0)|0;if((Pc()|0)<=0){if(c[215]|0){o=me(c[l>>2]|0)|0;c[b>>2]=20083;c[b+4>>2]=19770;c[b+8>>2]=525;c[b+12>>2]=o;Wc(1,21083,20661,b)}}else Qc(-1,0);ue(c[h>>2]|0);c[f>>2]=0;q=c[f>>2]|0;i=a;return q|0}function fd(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;g=i;i=i+48|0;h=g+36|0;j=g+32|0;k=g+28|0;l=g+24|0;m=g+20|0;n=g+16|0;o=g+12|0;p=g+8|0;q=g+4|0;r=g;c[j>>2]=b;c[k>>2]=d;c[l>>2]=e;c[m>>2]=f;c[n>>2]=we(c[k>>2]|0,c[l>>2]|0,0)|0;if(!(c[n>>2]|0)){c[h>>2]=1;s=c[h>>2]|0;i=g;return s|0}c[o>>2]=xe(c[n>>2]|0)|0;ue(c[n>>2]|0);c[n>>2]=c[o>>2];if(!(c[n>>2]|0)){c[h>>2]=2;s=c[h>>2]|0;i=g;return s|0}c[r>>2]=0;c[p>>2]=c[m>>2];while(1){t=c[n>>2]|0;if(!(a[c[p>>2]>>0]|0)){u=18;break}c[o>>2]=we(t,c[p>>2]|0,1)|0;if(!(c[o>>2]|0)){u=8;break}m=ye(c[o>>2]|0,1,5)|0;c[(c[j>>2]|0)+(c[r>>2]<<2)>>2]=m;ue(c[o>>2]|0);if(!(c[(c[j>>2]|0)+(c[r>>2]<<2)>>2]|0)){u=13;break}c[p>>2]=(c[p>>2]|0)+1;c[r>>2]=(c[r>>2]|0)+1}if((u|0)==8){c[q>>2]=0;while(1){if((c[q>>2]|0)>>>0>=(c[r>>2]|0)>>>0)break;of(c[(c[j>>2]|0)+(c[q>>2]<<2)>>2]|0);c[(c[j>>2]|0)+(c[q>>2]<<2)>>2]=0;c[q>>2]=(c[q>>2]|0)+1}ue(c[n>>2]|0);c[h>>2]=3;s=c[h>>2]|0;i=g;return s|0}else if((u|0)==13){c[q>>2]=0;while(1){if((c[q>>2]|0)>>>0>=(c[r>>2]|0)>>>0)break;of(c[(c[j>>2]|0)+(c[q>>2]<<2)>>2]|0);c[(c[j>>2]|0)+(c[q>>2]<<2)>>2]=0;c[q>>2]=(c[q>>2]|0)+1}ue(c[n>>2]|0);c[h>>2]=4;s=c[h>>2]|0;i=g;return s|0}else if((u|0)==18){ue(t);c[h>>2]=0;s=c[h>>2]|0;i=g;return s|0}return 0}function gd(){var a=0,b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;a=i;i=i+96|0;b=a+40|0;d=a+24|0;e=a+8|0;f=a+88|0;g=a+84|0;h=a+80|0;j=a+76|0;k=a+72|0;l=a+68|0;m=a+64|0;n=a+60|0;o=a+56|0;p=te(j,0,20097,a)|0;c[l>>2]=p;if(p){c[m>>2]=604;if((c[216]|0)==-1)c[216]=Mc(1,21083,19770,20141,c[m>>2]|0)|0;if((Pc()|0)<=0){if(c[216]|0){m=me(c[l>>2]|0)|0;c[e>>2]=19783;c[e+4>>2]=19770;c[e+8>>2]=604;c[e+12>>2]=m;Wc(1,21083,20661,e)}}else Qc(-1,0);c[f>>2]=0;q=c[f>>2]|0;i=a;return q|0}e=_e(h,c[j>>2]|0)|0;c[l>>2]=e;if(e){c[n>>2]=609;if((c[217]|0)==-1)c[217]=Mc(1,21083,19770,20141,c[n>>2]|0)|0;if((Pc()|0)<=0){if(c[217]|0){n=me(c[l>>2]|0)|0;c[d>>2]=20068;c[d+4>>2]=19770;c[d+8>>2]=609;c[d+12>>2]=n;Wc(1,21083,20661,d)}}else Qc(-1,0);ue(c[j>>2]|0);c[f>>2]=0;q=c[f>>2]|0;i=a;return q|0}ue(c[j>>2]|0);j=fd(k,c[h>>2]|0,37935,35585)|0;c[l>>2]=j;if(!j){ue(c[h>>2]|0);c[g>>2]=Cc(32,19770,629)|0;xd(c[g>>2]|0,32,c[k>>2]|0);Ae(c[k>>2]|0);c[f>>2]=c[g>>2];q=c[f>>2]|0;i=a;return q|0}c[o>>2]=624;if((c[218]|0)==-1)c[218]=Mc(1,21083,19770,20141,c[o>>2]|0)|0;if((Pc()|0)<=0){if(c[218]|0){o=me(c[l>>2]|0)|0;c[b>>2]=20083;c[b+4>>2]=19770;c[b+8>>2]=624;c[b+12>>2]=o;Wc(1,21083,20661,b)}}else Qc(-1,0);ue(c[h>>2]|0);c[f>>2]=0;q=c[f>>2]|0;i=a;return q|0}function hd(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;e=i;i=i+80|0;f=e+16|0;g=e;h=e+68|0;j=e+64|0;k=e+60|0;l=e+56|0;m=e+52|0;n=e+48|0;o=e+44|0;p=e+40|0;q=e+32|0;r=e+28|0;s=e+24|0;c[j>>2]=a;c[k>>2]=b;c[l>>2]=d;c[m>>2]=ad(c[j>>2]|0)|0;c[o>>2]=id(c[k>>2]|0)|0;k=Xe(n,c[o>>2]|0,c[m>>2]|0)|0;c[p>>2]=k;if(k){c[r>>2]=807;if((c[220]|0)==-1)c[220]=Mc(2,21083,19770,20236,c[r>>2]|0)|0;if((Pc()|0)<=0){if(c[220]|0){r=me(c[p>>2]|0)|0;c[g>>2]=19770;c[g+4>>2]=807;c[g+8>>2]=r;Wc(2,21083,20261,g)}}else Qc(-1,0);ue(c[o>>2]|0);ue(c[m>>2]|0);c[h>>2]=-1;t=c[h>>2]|0;i=e;return t|0}ue(c[m>>2]|0);ue(c[o>>2]|0);o=fd(q,c[n>>2]|0,37797,47158)|0;c[p>>2]=o;if(!o){ue(c[n>>2]|0);xd(c[l>>2]|0,32,c[q>>2]|0);xd((c[l>>2]|0)+32|0,32,c[q+4>>2]|0);Ae(c[q>>2]|0);Ae(c[q+4>>2]|0);c[h>>2]=1;t=c[h>>2]|0;i=e;return t|0}c[s>>2]=819;if((c[221]|0)==-1)c[221]=Mc(1,0,19770,20236,c[s>>2]|0)|0;if((Pc()|0)<=0){if(c[221]|0){c[f>>2]=19770;c[f+4>>2]=819;Rc(1,61592,f)}}else Qc(-1,0);ue(c[n>>2]|0);c[h>>2]=-1;t=c[h>>2]|0;i=e;return t|0}function id(a){a=a|0;var b=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0;b=i;i=i+128|0;e=b+16|0;f=b;g=b+116|0;h=b+112|0;j=b+48|0;k=b+40|0;l=b+36|0;m=b+32|0;c[h>>2]=a;a=c[h>>2]|0;n=c[h>>2]|0;ld(a,nw(d[n>>0]|d[n+1>>0]<<8|d[n+2>>0]<<16|d[n+3>>0]<<24)|0,j);c[f>>2]=37855;c[f+4>>2]=64;c[f+8>>2]=j;j=te(k,0,20172,f)|0;c[l>>2]=j;if(!j){c[g>>2]=c[k>>2];o=c[g>>2]|0;i=b;return o|0}c[m>>2]=698;if((c[219]|0)==-1)c[219]=Mc(1,21083,19770,20216,c[m>>2]|0)|0;if((Pc()|0)<=0){if(c[219]|0){m=me(c[l>>2]|0)|0;c[e>>2]=19783;c[e+4>>2]=19770;c[e+8>>2]=698;c[e+12>>2]=m;Wc(1,21083,20661,e)}}else Qc(-1,0);c[g>>2]=0;o=c[g>>2]|0;i=b;return o|0}function jd(a,b,e,f){a=a|0;b=b|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0;g=i;i=i+96|0;h=g+40|0;j=g+32|0;k=g+16|0;l=g;m=g+92|0;n=g+88|0;o=g+84|0;p=g+80|0;q=g+76|0;r=g+72|0;s=g+68|0;t=g+64|0;u=g+60|0;v=g+56|0;w=g+52|0;c[n>>2]=a;c[o>>2]=b;c[p>>2]=e;c[q>>2]=f;f=c[n>>2]|0;n=(c[o>>2]|0)+4|0;if((f|0)!=(nw(d[n>>0]|d[n+1>>0]<<8|d[n+2>>0]<<16|d[n+3>>0]<<24)|0)){c[m>>2]=-1;x=c[m>>2]|0;i=g;return x|0}n=c[p>>2]|0;f=(c[p>>2]|0)+32|0;c[l>>2]=32;c[l+4>>2]=n;c[l+8>>2]=32;c[l+12>>2]=f;f=te(s,0,20335,l)|0;c[u>>2]=f;if(f){c[v>>2]=918;if((c[222]|0)==-1)c[222]=Mc(1,21083,19770,20364,c[v>>2]|0)|0;if((Pc()|0)<=0){if(c[222]|0){v=me(c[u>>2]|0)|0;c[k>>2]=19783;c[k+4>>2]=19770;c[k+8>>2]=918;c[k+12>>2]=v;Wc(1,21083,20661,k)}}else Qc(-1,0);c[m>>2]=-1;x=c[m>>2]|0;i=g;return x|0}c[r>>2]=id(c[o>>2]|0)|0;o=c[q>>2]|0;c[j>>2]=32;c[j+4>>2]=o;o=te(t,0,20391,j)|0;c[u>>2]=o;if(o){ue(c[r>>2]|0);ue(c[s>>2]|0);c[m>>2]=-1;x=c[m>>2]|0;i=g;return x|0}c[u>>2]=Ye(c[s>>2]|0,c[r>>2]|0,c[t>>2]|0)|0;ue(c[t>>2]|0);ue(c[r>>2]|0);ue(c[s>>2]|0);if(!(c[u>>2]|0)){c[m>>2]=1;x=c[m>>2]|0;i=g;return x|0}c[w>>2]=938;if((c[223]|0)==-1)c[223]=Mc(4,21083,19770,20364,c[w>>2]|0)|0;if((Pc()|0)<=0){if(c[223]|0){w=me(c[u>>2]|0)|0;c[h>>2]=19770;c[h+4>>2]=938;c[h+8>>2]=w;Wc(4,21083,20443,h)}}else Qc(-1,0);c[m>>2]=-1;x=c[m>>2]|0;i=g;return x|0}function kd(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0;e=i;i=i+144|0;f=e+40|0;g=e+32|0;h=e+16|0;j=e+8|0;k=e;l=e+104|0;m=e+100|0;n=e+96|0;o=e+92|0;p=e+88|0;q=e+84|0;r=e+80|0;s=e+76|0;t=e+72|0;u=e+68|0;v=e+112|0;w=e+64|0;x=e+60|0;y=e+56|0;z=e+52|0;A=e+48|0;c[m>>2]=a;c[n>>2]=b;c[o>>2]=d;d=c[n>>2]|0;c[k>>2]=32;c[k+4>>2]=d;if(te(t,0,20296,k)|0){c[l>>2]=-1;B=c[l>>2]|0;i=e;return B|0}if(Ie(s,c[t>>2]|0,0)|0){c[x>>2]=972;if((c[224]|0)==-1)c[224]=Mc(1,0,19770,20493,c[x>>2]|0)|0;if((Pc()|0)>0){Qc(-1,0);Lc()}if(!(c[224]|0))Lc();c[j>>2]=19770;c[j+4>>2]=972;Rc(1,61592,j);Lc()}ue(c[t>>2]|0);c[q>>2]=Ke(49872,c[s>>2]|0,0)|0;zd(r,c[m>>2]|0,32);c[p>>2]=Ge(0)|0;Me(c[p>>2]|0,c[r>>2]|0,c[q>>2]|0,c[s>>2]|0);He(c[q>>2]|0);Ae(c[r>>2]|0);c[u>>2]=ze(256)|0;if(Le(c[u>>2]|0,0,c[p>>2]|0,c[s>>2]|0)|0){c[y>>2]=989;if((c[225]|0)==-1)c[225]=Mc(1,21083,19770,20493,c[y>>2]|0)|0;if((Pc()|0)<=0){if(c[225]|0){y=me(0)|0;c[h>>2]=20516;c[h+4>>2]=19770;c[h+8>>2]=989;c[h+12>>2]=y;Wc(1,21083,20661,h)}}else Qc(-1,0);He(c[p>>2]|0);mf(c[s>>2]|0);c[l>>2]=-1;B=c[l>>2]|0;i=e;return B|0}He(c[p>>2]|0);mf(c[s>>2]|0);c[w>>2]=32;if(Oe(c[u>>2]|0,2)|0){c[z>>2]=998;if((c[226]|0)==-1)c[226]=Mc(1,0,19770,20493,c[z>>2]|0)|0;if((Pc()|0)>0){Qc(-1,0);Lc()}if(!(c[226]|0))Lc();c[g>>2]=19770;c[g+4>>2]=998;Rc(1,61592,g);Lc()}if(!(Ce(1,v,c[w>>2]|0,w,c[u>>2]|0)|0)){ld(v,c[w>>2]|0,c[o>>2]|0);Ae(c[u>>2]|0);c[l>>2]=1;B=c[l>>2]|0;i=e;return B|0}c[A>>2]=1005;if((c[227]|0)==-1)c[227]=Mc(1,0,19770,20493,c[A>>2]|0)|0;if((Pc()|0)>0){Qc(-1,0);Lc()}if(!(c[227]|0))Lc();c[f>>2]=19770;c[f+4>>2]=1005;Rc(1,61592,f);Lc();return 0}function ld(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=i;i=i+16|0;f=e+8|0;g=e+4|0;h=e;c[f>>2]=a;c[g>>2]=b;c[h>>2]=d;ef(10,c[h>>2]|0,c[f>>2]|0,c[g>>2]|0);i=e;return}function md(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;d=i;i=i+16|0;e=d+8|0;f=d+4|0;g=d;c[e>>2]=a;c[f>>2]=b;c[g>>2]=15;while(1){if((c[g>>2]|0)<0)break;b=Bd(c[e>>2]|0,-1)|0;c[(c[f>>2]|0)+(c[g>>2]<<2)>>2]=b;c[g>>2]=(c[g>>2]|0)+-1}i=d;return}function nd(){var a=0,b=0,d=0,e=0;a=i;i=i+16|0;b=a;d=a+12|0;e=a+8|0;c[d>>2]=Cc(4,20534,425)|0;if(!($e(c[d>>2]|0,10,0)|0)){i=a;return c[d>>2]|0}c[e>>2]=429;if((c[228]|0)==-1)c[228]=Mc(1,0,20534,20548,c[e>>2]|0)|0;if((Pc()|0)>0){Qc(-1,0);Lc()}if(!(c[228]|0))Lc();c[b>>2]=20534;c[b+4>>2]=429;Rc(1,61592,b);Lc();return 0}function od(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=i;i=i+16|0;f=e+8|0;g=e+4|0;h=e;c[f>>2]=a;c[g>>2]=b;c[h>>2]=d;cf(c[c[f>>2]>>2]|0,c[g>>2]|0,c[h>>2]|0);i=e;return}function pd(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0;e=i;i=i+32|0;f=e;g=e+20|0;h=e+16|0;j=e+12|0;k=e+8|0;c[g>>2]=b;c[h>>2]=d;c[j>>2]=df(c[c[g>>2]>>2]|0,0)|0;if(c[j>>2]|0){if(!(c[h>>2]|0)){l=c[g>>2]|0;qd(l);i=e;return}d=c[h>>2]|0;h=c[j>>2]|0;j=d+64|0;do{a[d>>0]=a[h>>0]|0;d=d+1|0;h=h+1|0}while((d|0)<(j|0));l=c[g>>2]|0;qd(l);i=e;return}c[k>>2]=462;if((c[229]|0)==-1)c[229]=Mc(1,0,20534,20581,c[k>>2]|0)|0;if((Pc()|0)>0){Qc(-1,0);Lc()}if(!(c[229]|0))Lc();c[f>>2]=20534;c[f+4>>2]=462;Rc(1,61592,f);Lc()}function qd(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;af(c[c[d>>2]>>2]|0);Ec(c[d>>2]|0,20534,480);i=b;return}function rd(b,d,e,f,g,h,j,k,l){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;k=k|0;l=l|0;var m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0;m=i;i=i+128|0;n=m+120|0;o=m+116|0;p=m+112|0;q=m+108|0;r=m+104|0;s=m+100|0;t=m+96|0;u=m+92|0;v=m+88|0;w=m+84|0;x=m+80|0;y=m+76|0;z=m+72|0;A=m+68|0;B=m+64|0;C=m+60|0;D=m+56|0;E=m+52|0;F=m+48|0;G=m+44|0;H=m+40|0;I=m+24|0;J=m+20|0;K=m+16|0;L=m+12|0;M=m+8|0;N=m+4|0;O=m;c[o>>2]=b;c[p>>2]=d;c[q>>2]=e;c[r>>2]=f;c[s>>2]=g;c[t>>2]=h;c[u>>2]=j;c[v>>2]=k;c[w>>2]=l;c[D>>2]=gf(c[r>>2]|0)|0;c[E>>2]=gf(c[q>>2]|0)|0;l=c[E>>2]|0;c[F>>2]=Xa()|0;k=i;i=i+((1*l|0)+15&-16)|0;if(!(c[D>>2]|0)){c[n>>2]=-1;c[J>>2]=1;P=c[F>>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>>2]|0)){c[J>>2]=4;break}else{Dx(c[o>>2]|0,c[z>>2]|0,c[D>>2]|0)|0;c[o>>2]=(c[o>>2]|0)+(c[D>>2]|0);R=18;break}}else R=18;while(0);b:do if((R|0)==18){c[A>>2]=1;while(1){if((c[A>>2]|0)>>>0>=(c[B>>2]|0)>>>0)break;Dx(q|0,(c[o>>2]|0)+(0-(c[D>>2]|0))|0,c[D>>2]|0)|0;Fx(q+(c[D>>2]|0)+(c[H>>2]|0)|0,(c[A>>2]|0)+1&255|0,1)|0;bf(c[y>>2]|0);c[z>>2]=td(c[y>>2]|0,k,c[E>>2]|0,q,c[K>>2]|0)|0;if(!(c[z>>2]|0)){R=21;break}Dx(c[o>>2]|0,c[z>>2]|0,c[D>>2]|0)|0;c[o>>2]=(c[o>>2]|0)+(c[D>>2]|0);c[A>>2]=(c[A>>2]|0)+1}if((R|0)==21){c[J>>2]=4;break}do if((c[C>>2]|0)>>>0>0){if((c[B>>2]|0)>>>0>0){Dx(q|0,(c[o>>2]|0)+(0-(c[D>>2]|0))|0,c[D>>2]|0)|0;c[A>>2]=(c[A>>2]|0)+1}Fx(q+(c[D>>2]|0)+(c[H>>2]|0)|0,c[A>>2]&255|0,1)|0;bf(c[y>>2]|0);r=c[y>>2]|0;l=c[E>>2]|0;if((c[B>>2]|0)>>>0>0)c[z>>2]=td(r,k,l,q,c[K>>2]|0)|0;else c[z>>2]=td(r,k,l,q+(c[D>>2]|0)|0,(c[K>>2]|0)-(c[D>>2]|0)|0)|0;if(!(c[z>>2]|0)){c[J>>2]=4;break b}else{Dx(c[o>>2]|0,c[z>>2]|0,c[C>>2]|0)|0;break}}while(0);c[G>>2]=1;c[J>>2]=10}while(0);xa(c[L>>2]|0);switch(c[J>>2]|0){case 4:{R=34;break a;break}case 10:{break a;break}default:{}}P=c[F>>2]|0;xa(P|0);Q=c[n>>2]|0;i=m;return Q|0}while(0);if((R|0)==34)c[G>>2]=-1;af(c[x>>2]|0);af(c[y>>2]|0);c[n>>2]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[l>>2]|0,2)|0){c[p>>2]=Ne(c[l>>2]|0,o)|0;if(c[p>>2]|0){c[m>>2]=(((c[o>>2]|0)+7|0)>>>0)/8|0;if((c[m>>2]|0)>>>0>(c[k>>2]|0)>>>0)c[m>>2]=c[k>>2];Dx(c[j>>2]|0,c[p>>2]|0,c[m>>2]|0)|0;if((c[m>>2]|0)>>>0>=(c[k>>2]|0)>>>0){i=e;return}Fx((c[j>>2]|0)+(c[m>>2]|0)|0,0,(c[k>>2]|0)-(c[m>>2]|0)|0)|0;i=e;return}c[q>>2]=89;if((c[230]|0)==-1)c[230]=Mc(1,0,20615,20628,c[q>>2]|0)|0;if((Pc()|0)>0){Qc(-1,0);Lc()}if(!(c[230]|0))Lc();c[h>>2]=20615;c[h+4>>2]=89;Rc(1,61592,h);Lc()}c[m>>2]=c[k>>2];h=Ce(5,c[j>>2]|0,c[m>>2]|0,m,c[l>>2]|0)|0;c[n>>2]=h;if(!h){yd(c[j>>2]|0,c[m>>2]|0,c[k>>2]|0);i=e;return}c[r>>2]=110;if((c[231]|0)==-1)c[231]=Mc(1,21083,20615,20628,c[r>>2]|0)|0;if((Pc()|0)<=0){if(c[231]|0){r=me(c[n>>2]|0)|0;c[g>>2]=20698;c[g+4>>2]=20615;c[g+8>>2]=110;c[g+12>>2]=r;Wc(1,21083,20661,g)}}else Qc(-1,0);c[s>>2]=111;if((c[232]|0)==-1)c[232]=Mc(1,0,20615,20628,c[s>>2]|0)|0;if((Pc()|0)>0){Qc(-1,0);Lc()}if(!(c[232]|0))Lc();c[f>>2]=20615;c[f+4>>2]=111;Rc(1,61592,f);Lc()}function yd(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0;e=i;i=i+16|0;f=e+12|0;g=e+8|0;h=e+4|0;j=e;c[f>>2]=a;c[g>>2]=b;c[h>>2]=d;c[j>>2]=c[f>>2];if((c[g>>2]|0)>>>0>=(c[h>>2]|0)>>>0){i=e;return}Ex((c[j>>2]|0)+((c[h>>2]|0)-(c[g>>2]|0))|0,c[f>>2]|0,c[g>>2]|0)|0;Fx(c[f>>2]|0,0,(c[h>>2]|0)-(c[g>>2]|0)|0)|0;i=e;return}function zd(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0;e=i;i=i+48|0;f=e+16|0;g=e;h=e+44|0;j=e+40|0;k=e+36|0;l=e+32|0;m=e+28|0;n=e+24|0;c[h>>2]=a;c[j>>2]=b;c[k>>2]=d;d=Be(c[h>>2]|0,5,c[j>>2]|0,c[k>>2]|0,k)|0;c[l>>2]=d;if(!d){i=e;return}c[m>>2]=140;if((c[233]|0)==-1)c[233]=Mc(1,21083,20615,20713,c[m>>2]|0)|0;if((Pc()|0)<=0){if(c[233]|0){m=me(c[l>>2]|0)|0;c[g>>2]=20745;c[g+4>>2]=20615;c[g+8>>2]=140;c[g+12>>2]=m;Wc(1,21083,20661,g)}}else Qc(-1,0);c[n>>2]=141;if((c[234]|0)==-1)c[234]=Mc(1,0,20615,20713,c[n>>2]|0)|0;if((Pc()|0)>0){Qc(-1,0);Lc()}if(!(c[234]|0))Lc();c[f>>2]=20615;c[f+4>>2]=141;Rc(1,61592,f);Lc()}function Ad(){var a=0,b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;a=i;i=i+80|0;b=a+56|0;d=a+48|0;e=a+40|0;f=a+32|0;g=a+24|0;h=a+16|0;j=a+8|0;k=a;l=a+64|0;m=a+60|0;if(qe(20759)|0){c[h>>2]=0;n=re(37,h)|0;c[l>>2]=n;if(n){n=c[3962]|0;h=me(c[l>>2]|0)|0;c[g>>2]=20912;c[g+4>>2]=h;gw(n,20873,g)|0}c[f>>2]=0;g=re(44,f)|0;c[l>>2]=g;if(!g){c[d>>2]=0;re(38,d)|0;c[b>>2]=0;re(48,b)|0;o=jb(0)|0;p=Bd(2,-1)|0;q=o^p;Dd(q);i=a;return}g=c[3962]|0;f=me(c[l>>2]|0)|0;c[e>>2]=20927;c[e+4>>2]=f;gw(g,20873,e)|0;c[d>>2]=0;re(38,d)|0;c[b>>2]=0;re(48,b)|0;o=jb(0)|0;p=Bd(2,-1)|0;q=o^p;Dd(q);i=a;return}a=c[3962]|0;c[k>>2]=20759;gw(a,20765,k)|0;c[m>>2]=286;if((c[235]|0)==-1)c[235]=Mc(1,0,20831,20847,c[m>>2]|0)|0;if((Pc()|0)>0){Qc(-1,0);Lc()}if(!(c[235]|0))Lc();c[j>>2]=20831;c[j+4>>2]=286;Rc(1,61592,j);Lc()}function Bd(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0.0;d=i;i=i+64|0;e=d+16|0;f=d+8|0;g=d;h=d+48|0;j=d+44|0;k=d+40|0;l=d+36|0;m=d+32|0;n=d+28|0;o=d+24|0;c[j>>2]=a;c[k>>2]=b;if((c[k>>2]|0)>>>0<=0){c[n>>2]=157;if((c[236]|0)==-1)c[236]=Mc(1,0,20831,20947,c[n>>2]|0)|0;if((Pc()|0)>0){Qc(-1,0);Lc()}if(!(c[236]|0))Lc();c[g>>2]=20831;c[g+4>>2]=157;Rc(1,61592,g);Lc()}switch(c[j>>2]|0){case 1:{j=c[17656]|0;c[17656]=j+1;if(!((j>>>0)%256|0)){c[f>>2]=0;re(48,f)|0}c[m>>2]=-1-(4294967295%((c[k>>2]|0)>>>0)|0);do jf(l,4,1);while((c[l>>2]|0)>>>0>=(c[m>>2]|0)>>>0);c[h>>2]=((c[l>>2]|0)>>>0)%((c[k>>2]|0)>>>0)|0;p=c[h>>2]|0;i=d;return p|0}case 2:{c[m>>2]=-1-(4294967295%((c[k>>2]|0)>>>0)|0);do lf(l,4);while((c[l>>2]|0)>>>0>=(c[m>>2]|0)>>>0);c[h>>2]=((c[l>>2]|0)>>>0)%((c[k>>2]|0)>>>0)|0;p=c[h>>2]|0;i=d;return p|0}case 0:{q=+((c[k>>2]|0)>>>0);c[l>>2]=~~(q*+Cd())>>>0;if((c[l>>2]|0)>>>0>=(c[k>>2]|0)>>>0)c[l>>2]=(c[k>>2]|0)-1;c[h>>2]=c[l>>2];p=c[h>>2]|0;i=d;return p|0}default:{c[o>>2]=189;if((c[237]|0)==-1)c[237]=Mc(1,0,20831,20947,c[o>>2]|0)|0;if((Pc()|0)>0){Qc(-1,0);Lc()}if(!(c[237]|0))Lc();c[e>>2]=20831;c[e+4>>2]=189;Rc(1,61592,e);Lc()}}return 0}function Cd(){return +(+(fx()|0)/2147483647.0)}function Dd(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;dx(c[d>>2]|0);i=b;return}function Ed(){nf(0,0);return}function Fd(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0;b=i;i=i+48|0;d=b+16|0;e=b+8|0;f=b;g=b+44|0;h=b+40|0;j=b+36|0;k=b+32|0;l=b+28|0;m=b+24|0;c[g>>2]=a;c[f>>2]=c[g>>2];if(te(k,0,20972,f)|0){c[l>>2]=154;if((c[238]|0)==-1)c[238]=Mc(1,0,20996,21009,c[l>>2]|0)|0;if((Pc()|0)>0){Qc(-1,0);Lc()}if(!(c[238]|0))Lc();c[e>>2]=20996;c[e+4>>2]=154;Rc(1,61592,e);Lc()}if(!(_e(j,c[k>>2]|0)|0)){ue(c[k>>2]|0);c[h>>2]=Cc(4,20996,163)|0;c[c[h>>2]>>2]=c[j>>2];i=b;return c[h>>2]|0}c[m>>2]=157;if((c[239]|0)==-1)c[239]=Mc(1,0,20996,21009,c[m>>2]|0)|0;if((Pc()|0)>0){Qc(-1,0);Lc()}if(!(c[239]|0))Lc();c[d>>2]=20996;c[d+4>>2]=157;Rc(1,61592,d);Lc();return 0}function Gd(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;ue(c[c[d>>2]>>2]|0);Ec(c[d>>2]|0,20996,178);i=b;return}function Hd(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0;d=i;i=i+32|0;e=d;f=d+24|0;g=d+20|0;h=d+16|0;j=d+12|0;k=d+8|0;c[f>>2]=a;c[g>>2]=b;c[h>>2]=ve(c[c[f>>2]>>2]|0,0,0,0)|0;c[j>>2]=Cc(c[h>>2]|0,20996,201)|0;b=(c[h>>2]|0)-1|0;if((b|0)==(ve(c[c[f>>2]>>2]|0,0,c[j>>2]|0,c[h>>2]|0)|0)){c[c[g>>2]>>2]=c[j>>2];i=d;return c[h>>2]|0}c[k>>2]=206;if((c[240]|0)==-1)c[240]=Mc(1,0,20996,21046,c[k>>2]|0)|0;if((Pc()|0)>0){Qc(-1,0);Lc()}if(!(c[240]|0))Lc();c[e>>2]=20996;c[e+4>>2]=206;Rc(1,61592,e);Lc();return 0}function Id(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0;d=i;i=i+48|0;e=d+8|0;f=d;g=d+32|0;h=d+28|0;j=d+24|0;k=d+20|0;l=d+16|0;m=d+12|0;c[h>>2]=a;c[j>>2]=b;c[k>>2]=Cc(4,20996,225)|0;if(se(c[k>>2]|0,c[h>>2]|0,c[j>>2]|0,0)|0){c[l>>2]=233;if((c[241]|0)==-1)c[241]=Mc(2,21083,20996,21088,c[l>>2]|0)|0;if((Pc()|0)<=0){if(c[241]|0)Wc(2,21083,21125,f)}else Qc(-1,0);Ec(c[k>>2]|0,20996,234);c[g>>2]=0;n=c[g>>2]|0;i=d;return n|0}if(!(Ze(c[c[k>>2]>>2]|0)|0)){c[g>>2]=c[k>>2];n=c[g>>2]|0;i=d;return n|0}c[m>>2]=240;if((c[242]|0)==-1)c[242]=Mc(2,21083,20996,21088,c[m>>2]|0)|0;if((Pc()|0)<=0){if(c[242]|0)Wc(2,21083,21125,e)}else Qc(-1,0);Gd(c[k>>2]|0);c[g>>2]=0;n=c[g>>2]|0;i=d;return n|0}function Jd(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0;b=i;i=i+64|0;d=b+8|0;e=b;f=b+48|0;g=b+44|0;h=b+40|0;j=b+32|0;k=b+24|0;l=b+20|0;m=b+16|0;c[g>>2]=a;c[k>>2]=Kd(j,c[c[g>>2]>>2]|0,37947,39360)|0;if(c[k>>2]|0)c[k>>2]=Kd(j,c[c[g>>2]>>2]|0,37935,39360)|0;if(c[k>>2]|0)c[k>>2]=Kd(j,c[c[g>>2]>>2]|0,39319,39360)|0;if(!(c[k>>2]|0)){g=c[j+4>>2]|0;c[d>>2]=c[j>>2];c[d+4>>2]=g;c[k>>2]=te(l,0,21248,d)|0;Ae(c[j>>2]|0);Ae(c[j+4>>2]|0);c[h>>2]=Cc(4,20996,279)|0;c[c[h>>2]>>2]=c[l>>2];c[f>>2]=c[h>>2];n=c[f>>2]|0;i=b;return n|0}c[m>>2]=269;if((c[243]|0)==-1)c[243]=Mc(2,0,20996,21159,c[m>>2]|0)|0;if((Pc()|0)<=0){if(c[243]|0){c[e>>2]=20996;c[e+4>>2]=269;Rc(34,21200,e)}}else Qc(-1,0);c[f>>2]=0;n=c[f>>2]|0;i=b;return n|0}function Kd(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;g=i;i=i+48|0;h=g+36|0;j=g+32|0;k=g+28|0;l=g+24|0;m=g+20|0;n=g+16|0;o=g+12|0;p=g+8|0;q=g+4|0;r=g;c[j>>2]=b;c[k>>2]=d;c[l>>2]=e;c[m>>2]=f;f=we(c[k>>2]|0,c[l>>2]|0,0)|0;c[n>>2]=f;if(!f){c[h>>2]=1;s=c[h>>2]|0;i=g;return s|0}c[o>>2]=xe(c[n>>2]|0)|0;ue(c[n>>2]|0);c[n>>2]=c[o>>2];if(!(c[n>>2]|0)){c[h>>2]=2;s=c[h>>2]|0;i=g;return s|0}c[r>>2]=0;c[p>>2]=c[m>>2];while(1){t=c[n>>2]|0;if(!(a[c[p>>2]>>0]|0)){u=18;break}m=we(t,c[p>>2]|0,1)|0;c[o>>2]=m;if(!m){u=8;break}m=ye(c[o>>2]|0,1,5)|0;c[(c[j>>2]|0)+(c[r>>2]<<2)>>2]=m;ue(c[o>>2]|0);if(!(c[(c[j>>2]|0)+(c[r>>2]<<2)>>2]|0)){u=13;break}c[p>>2]=(c[p>>2]|0)+1;c[r>>2]=(c[r>>2]|0)+1}if((u|0)==8){c[q>>2]=0;while(1){if((c[q>>2]|0)>>>0>=(c[r>>2]|0)>>>0)break;of(c[(c[j>>2]|0)+(c[q>>2]<<2)>>2]|0);c[(c[j>>2]|0)+(c[q>>2]<<2)>>2]=0;c[q>>2]=(c[q>>2]|0)+1}ue(c[n>>2]|0);c[h>>2]=3;s=c[h>>2]|0;i=g;return s|0}else if((u|0)==13){c[q>>2]=0;while(1){if((c[q>>2]|0)>>>0>=(c[r>>2]|0)>>>0)break;of(c[(c[j>>2]|0)+(c[q>>2]<<2)>>2]|0);c[(c[j>>2]|0)+(c[q>>2]<<2)>>2]=0;c[q>>2]=(c[q>>2]|0)+1}ue(c[n>>2]|0);c[h>>2]=4;s=c[h>>2]|0;i=g;return s|0}else if((u|0)==18){ue(t);c[h>>2]=0;s=c[h>>2]|0;i=g;return s|0}return 0}function Ld(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;ue(c[c[d>>2]>>2]|0);Ec(c[d>>2]|0,20996,294);i=b;return}function Md(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0;d=i;i=i+32|0;e=d;f=d+24|0;g=d+20|0;h=d+16|0;j=d+12|0;k=d+8|0;c[f>>2]=a;c[g>>2]=b;c[h>>2]=ve(c[c[f>>2]>>2]|0,3,0,0)|0;c[j>>2]=Cc(c[h>>2]|0,20996,317)|0;b=(c[h>>2]|0)-1|0;if((b|0)==(ve(c[c[f>>2]>>2]|0,3,c[j>>2]|0,c[h>>2]|0)|0)){c[c[g>>2]>>2]=c[j>>2];i=d;return c[h>>2]|0}c[k>>2]=322;if((c[244]|0)==-1)c[244]=Mc(1,0,20996,21278,c[k>>2]|0)|0;if((Pc()|0)>0){Qc(-1,0);Lc()}if(!(c[244]|0))Lc();c[e>>2]=20996;c[e+4>>2]=322;Rc(1,61592,e);Lc();return 0}function Nd(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;d=i;i=i+16|0;e=d+12|0;f=d+8|0;g=d+4|0;h=d;c[e>>2]=a;c[f>>2]=b;c[h>>2]=Md(c[e>>2]|0,g)|0;ld(c[g>>2]|0,c[h>>2]|0,c[f>>2]|0);Ec(c[g>>2]|0,20996,346);i=d;return}function Od(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;d=i;i=i+48|0;e=d+8|0;f=d;g=d+44|0;h=d+40|0;j=d+36|0;k=d+32|0;l=d+28|0;m=d+24|0;n=d+20|0;o=d+16|0;c[h>>2]=a;c[j>>2]=b;c[k>>2]=Cc(4,20996,366)|0;if(se(c[k>>2]|0,c[h>>2]|0,c[j>>2]|0,0)|0){c[n>>2]=373;if((c[245]|0)==-1)c[245]=Mc(2,0,20996,21314,c[n>>2]|0)|0;if((Pc()|0)<=0){if(c[245]|0){c[f>>2]=20996;c[f+4>>2]=373;Rc(34,21200,f)}}else Qc(-1,0);Ec(c[k>>2]|0,20996,374);c[g>>2]=0;p=c[g>>2]|0;i=d;return p|0}c[m>>2]=Kd(l,c[c[k>>2]>>2]|0,37947,39374)|0;if(c[m>>2]|0)c[m>>2]=Kd(l,c[c[k>>2]>>2]|0,39319,39374)|0;if(!(c[m>>2]|0)){Ae(c[l>>2]|0);c[g>>2]=c[k>>2];p=c[g>>2]|0;i=d;return p|0}c[o>>2]=384;if((c[246]|0)==-1)c[246]=Mc(1,0,20996,21314,c[o>>2]|0)|0;if((Pc()|0)<=0){if(c[246]|0){c[e>>2]=20996;c[e+4>>2]=384;Rc(1,61592,e)}}else Qc(-1,0);ue(c[c[k>>2]>>2]|0);Ec(c[k>>2]|0,20996,386);c[g>>2]=0;p=c[g>>2]|0;i=d;return p|0}function Pd(a){a=a|0;var b=0,d=0,e=0;b=i;i=i+16|0;d=b+4|0;e=b;c[d>>2]=a;c[e>>2]=Cc(4,20996,405)|0;a=ze(c[d>>2]|0)|0;c[c[e>>2]>>2]=a;kf(c[c[e>>2]>>2]|0,c[d>>2]|0,1);i=b;return c[e>>2]|0}function Qd(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0;d=i;i=i+32|0;e=d;f=d+24|0;g=d+20|0;h=d+16|0;j=d+12|0;k=d+8|0;c[f>>2]=a;c[g>>2]=b;c[h>>2]=ve(c[c[f>>2]>>2]|0,3,0,0)|0;c[j>>2]=Cc(c[h>>2]|0,20996,825)|0;b=(c[h>>2]|0)-1|0;if((b|0)==(ve(c[c[f>>2]>>2]|0,3,c[j>>2]|0,c[h>>2]|0)|0)){c[c[g>>2]>>2]=c[j>>2];i=d;return c[h>>2]|0}c[k>>2]=830;if((c[247]|0)==-1)c[247]=Mc(1,0,20996,21350,c[k>>2]|0)|0;if((Pc()|0)>0){Qc(-1,0);Lc()}if(!(c[247]|0))Lc();c[e>>2]=20996;c[e+4>>2]=830;Rc(1,61592,e);Lc();return 0}function Rd(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;Ae(c[c[d>>2]>>2]|0);Ec(c[d>>2]|0,20996,564);i=b;return}function Sd(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0;d=i;i=i+32|0;e=d;f=d+28|0;g=d+24|0;h=d+20|0;j=d+16|0;k=d+8|0;c[f>>2]=a;c[g>>2]=b;Ce(5,0,0,h,c[c[f>>2]>>2]|0)|0;c[j>>2]=Cc(c[h>>2]|0,20996,589)|0;if(!(Ce(5,c[j>>2]|0,c[h>>2]|0,d+12|0,c[c[f>>2]>>2]|0)|0)){c[c[g>>2]>>2]=c[j>>2];i=d;return c[h>>2]|0}c[k>>2]=595;if((c[248]|0)==-1)c[248]=Mc(1,0,20996,21385,c[k>>2]|0)|0;if((Pc()|0)>0){Qc(-1,0);Lc()}if(!(c[248]|0))Lc();c[e>>2]=20996;c[e+4>>2]=595;Rc(1,61592,e);Lc();return 0}function Td(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0;d=i;i=i+32|0;e=d;f=d+28|0;g=d+24|0;h=d+20|0;j=d+16|0;k=d+8|0;c[g>>2]=a;c[h>>2]=b;c[j>>2]=Cc(4,20996,616)|0;if(!(Be(c[j>>2]|0,5,c[g>>2]|0,c[h>>2]|0,d+12|0)|0)){c[f>>2]=c[j>>2];l=c[f>>2]|0;i=d;return l|0}c[k>>2]=624;if((c[249]|0)==-1)c[249]=Mc(2,0,20996,21423,c[k>>2]|0)|0;if((Pc()|0)<=0){if(c[249]|0){c[e>>2]=20996;c[e+4>>2]=624;Rc(34,21200,e)}}else Qc(-1,0);Ec(c[j>>2]|0,20996,625);c[f>>2]=0;l=c[f>>2]|0;i=d;return l|0}function Ud(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0;f=i;i=i+96|0;g=f+8|0;h=f;j=f+84|0;k=f+80|0;l=f+76|0;m=f+72|0;n=f+68|0;o=f+64|0;p=f+56|0;q=f+48|0;r=f+44|0;s=f+40|0;t=f+36|0;u=f+32|0;v=f+28|0;w=f+24|0;x=f+20|0;y=f+16|0;c[k>>2]=a;c[l>>2]=b;c[m>>2]=d;c[n>>2]=e;c[w>>2]=Kd(p,c[c[m>>2]>>2]|0,37947,39360)|0;if(c[w>>2]|0)c[w>>2]=Kd(p,c[c[m>>2]>>2]|0,39319,39360)|0;if(c[w>>2]|0){c[x>>2]=662;if((c[250]|0)==-1)c[250]=Mc(1,0,20996,21461,c[x>>2]|0)|0;if((Pc()|0)<=0){if(c[250]|0){c[h>>2]=20996;c[h+4>>2]=662;Rc(1,61592,h)}}else Qc(-1,0);c[c[n>>2]>>2]=0;c[j>>2]=0;z=c[j>>2]|0;i=f;return z|0}h=Be(o,5,c[k>>2]|0,64,s)|0;c[u>>2]=h;if(!h){c[q>>2]=ze(0)|0;Ee(c[q>>2]|0,c[c[l>>2]>>2]|0,c[p+4>>2]|0,c[p>>2]|0);c[r>>2]=ze(0)|0;De(c[r>>2]|0,c[o>>2]|0,c[q>>2]|0,c[p>>2]|0);Ae(c[o>>2]|0);Ae(c[p>>2]|0);Ae(c[p+4>>2]|0);Ae(c[q>>2]|0);Ce(5,0,0,t,c[r>>2]|0)|0;c[v>>2]=Cc(c[t>>2]|0,20996,698)|0;c[u>>2]=Ce(5,c[v>>2]|0,c[t>>2]|0,s,c[r>>2]|0)|0;Ae(c[r>>2]|0);c[c[n>>2]>>2]=c[v>>2];c[j>>2]=c[t>>2];z=c[j>>2]|0;i=f;return z|0}c[y>>2]=672;if((c[251]|0)==-1)c[251]=Mc(1,0,20996,21461,c[y>>2]|0)|0;if((Pc()|0)<=0){if(c[251]|0){c[g>>2]=20996;c[g+4>>2]=672;Rc(1,61592,g)}}else Qc(-1,0);Ae(c[p>>2]|0);Ae(c[p+4>>2]|0);c[c[n>>2]>>2]=0;c[j>>2]=0;z=c[j>>2]|0;i=f;return z|0}function Vd(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;e=i;i=i+64|0;f=e+8|0;g=e;h=e+52|0;j=e+48|0;k=e+44|0;l=e+40|0;m=e+36|0;n=e+32|0;o=e+28|0;p=e+24|0;q=e+20|0;r=e+16|0;c[j>>2]=a;c[k>>2]=b;c[l>>2]=d;c[p>>2]=Wd(c[k>>2]|0,c[l>>2]|0)|0;if(Xe(o,c[p>>2]|0,c[c[j>>2]>>2]|0)|0){c[q>>2]=767;if((c[254]|0)==-1)c[254]=Mc(1,0,20996,21528,c[q>>2]|0)|0;if((Pc()|0)<=0){if(c[254]|0){c[g>>2]=20996;c[g+4>>2]=767;Rc(1,61592,g)}}else Qc(-1,0);c[h>>2]=0;s=c[h>>2]|0;i=e;return s|0}c[n>>2]=Jd(c[j>>2]|0)|0;if(!(Ye(c[o>>2]|0,c[p>>2]|0,c[c[n>>2]>>2]|0)|0)){Ld(c[n>>2]|0);ue(c[p>>2]|0);c[m>>2]=Cc(4,20996,788)|0;c[c[m>>2]>>2]=c[o>>2];c[h>>2]=c[m>>2];s=c[h>>2]|0;i=e;return s|0}c[r>>2]=778;if((c[255]|0)==-1)c[255]=Mc(1,0,20996,21528,c[r>>2]|0)|0;if((Pc()|0)<=0){if(c[255]|0){c[f>>2]=20996;c[f+4>>2]=778;Rc(1,61592,f)}}else Qc(-1,0);Ld(c[n>>2]|0);ue(c[p>>2]|0);ue(c[o>>2]|0);c[h>>2]=0;s=c[h>>2]|0;i=e;return s|0}function Wd(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0;d=i;i=i+48|0;e=d+16|0;f=d+8|0;g=d;h=d+44|0;j=d+40|0;k=d+36|0;l=d+32|0;m=d+28|0;n=d+24|0;c[h>>2]=a;c[j>>2]=b;c[k>>2]=0;c[l>>2]=0;if(Be(k,5,c[h>>2]|0,c[j>>2]|0,0)|0){c[m>>2]=731;if((c[252]|0)==-1)c[252]=Mc(1,0,20996,21485,c[m>>2]|0)|0;if((Pc()|0)>0){Qc(-1,0);Lc()}if(!(c[252]|0))Lc();c[g>>2]=20996;c[g+4>>2]=731;Rc(1,61592,g);Lc()}c[f>>2]=c[k>>2];if(!(te(l,0,21498,f)|0)){Ae(c[k>>2]|0);i=d;return c[l>>2]|0}c[n>>2]=736;if((c[253]|0)==-1)c[253]=Mc(1,0,20996,21485,c[n>>2]|0)|0;if((Pc()|0)>0){Qc(-1,0);Lc()}if(!(c[253]|0))Lc();c[e>>2]=20996;c[e+4>>2]=736;Rc(1,61592,e);Lc();return 0}function Xd(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;ue(c[c[d>>2]>>2]|0);Ec(c[d>>2]|0,20996,803);i=b;return}function Yd(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;d=i;i=i+48|0;e=d+8|0;f=d;g=d+44|0;h=d+40|0;j=d+36|0;k=d+32|0;l=d+28|0;m=d+24|0;n=d+20|0;o=d+16|0;c[h>>2]=a;c[j>>2]=b;c[k>>2]=Cc(4,20996,852)|0;if(se(c[k>>2]|0,c[h>>2]|0,c[j>>2]|0,0)|0){c[n>>2]=859;if((c[256]|0)==-1)c[256]=Mc(2,0,20996,21551,c[n>>2]|0)|0;if((Pc()|0)<=0){if(c[256]|0){c[f>>2]=20996;c[f+4>>2]=859;Rc(34,21200,f)}}else Qc(-1,0);Ec(c[k>>2]|0,20996,860);c[g>>2]=0;p=c[g>>2]|0;i=d;return p|0}c[l>>2]=Kd(m,c[c[k>>2]>>2]|0,37797,39372)|0;if(c[l>>2]|0)c[l>>2]=Kd(m,c[c[k>>2]>>2]|0,39319,39372)|0;if(!(c[l>>2]|0)){Ae(c[m>>2]|0);c[g>>2]=c[k>>2];p=c[g>>2]|0;i=d;return p|0}c[o>>2]=870;if((c[257]|0)==-1)c[257]=Mc(2,0,20996,21551,c[o>>2]|0)|0;if((Pc()|0)<=0){if(c[257]|0){c[e>>2]=20996;c[e+4>>2]=870;Rc(34,21200,e)}}else Qc(-1,0);ue(c[c[k>>2]>>2]|0);Ec(c[k>>2]|0,20996,872);c[g>>2]=0;p=c[g>>2]|0;i=d;return p|0}function Zd(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0;e=i;i=i+96|0;f=e+32|0;g=e+24|0;h=e+16|0;j=e+8|0;k=e;l=e+92|0;m=e+88|0;n=e+84|0;o=e+80|0;p=e+76|0;q=e+72|0;r=e+68|0;s=e+64|0;t=e+60|0;u=e+56|0;v=e+52|0;w=e+48|0;x=e+44|0;y=e+40|0;c[m>>2]=a;c[n>>2]=b;c[o>>2]=d;c[t>>2]=Kd(p,c[c[o>>2]>>2]|0,37947,39374)|0;if(c[t>>2]|0)c[t>>2]=Kd(p,c[c[o>>2]>>2]|0,39319,39374)|0;if(c[t>>2]|0){c[v>>2]=932;if((c[258]|0)==-1)c[258]=Mc(2,0,20996,21586,c[v>>2]|0)|0;if((Pc()|0)<=0){if(c[258]|0){c[k>>2]=20996;c[k+4>>2]=932;Rc(34,21200,k)}}else Qc(-1,0);c[l>>2]=0;z=c[l>>2]|0;i=e;return z|0}c[t>>2]=Kd(q,c[c[m>>2]>>2]|0,37797,39372)|0;if(c[t>>2]|0)c[t>>2]=Kd(q,c[c[m>>2]>>2]|0,39319,39372)|0;if(c[t>>2]|0){Ae(c[p>>2]|0);c[w>>2]=941;if((c[259]|0)==-1)c[259]=Mc(2,0,20996,21586,c[w>>2]|0)|0;if((Pc()|0)<=0){if(c[259]|0){c[j>>2]=20996;c[j+4>>2]=941;Rc(34,21200,j)}}else Qc(-1,0);c[l>>2]=0;z=c[l>>2]|0;i=e;return z|0}c[r>>2]=ze(0)|0;if(1!=(Fe(c[r>>2]|0,c[c[n>>2]>>2]|0,c[p>>2]|0)|0)){c[x>>2]=950;if((c[260]|0)==-1)c[260]=Mc(2,0,20996,21586,c[x>>2]|0)|0;if((Pc()|0)<=0){if(c[260]|0){c[h>>2]=20996;c[h+4>>2]=950;Rc(34,21200,h)}}else Qc(-1,0);Ae(c[p>>2]|0);Ae(c[r>>2]|0);Ae(c[q>>2]|0);c[l>>2]=0;z=c[l>>2]|0;i=e;return z|0}c[s>>2]=ze(0)|0;De(c[s>>2]|0,c[q>>2]|0,c[r>>2]|0,c[p>>2]|0);Ae(c[p>>2]|0);Ae(c[r>>2]|0);Ae(c[q>>2]|0);c[u>>2]=Cc(4,20996,962)|0;q=c[u>>2]|0;c[g>>2]=c[s>>2];if(!(te(q,0,21612,g)|0)){Ae(c[s>>2]|0);c[l>>2]=c[u>>2];z=c[l>>2]|0;i=e;return z|0}c[y>>2]=967;if((c[261]|0)==-1)c[261]=Mc(1,0,20996,21586,c[y>>2]|0)|0;if((Pc()|0)>0){Qc(-1,0);Lc()}if(!(c[261]|0))Lc();c[f>>2]=20996;c[f+4>>2]=967;Rc(1,61592,f);Lc();return 0}function _d(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0;e=i;i=i+48|0;f=e;g=e+36|0;h=e+32|0;j=e+28|0;k=e+24|0;l=e+20|0;m=e+16|0;n=e+12|0;c[h>>2]=a;c[j>>2]=b;c[k>>2]=d;c[l>>2]=Wd(c[h>>2]|0,64)|0;c[m>>2]=Ye(c[c[j>>2]>>2]|0,c[l>>2]|0,c[c[k>>2]>>2]|0)|0;ue(c[l>>2]|0);if(!(c[m>>2]|0)){c[g>>2]=1;o=c[g>>2]|0;i=e;return o|0}c[n>>2]=1002;if((c[262]|0)==-1)c[262]=Mc(2,21083,20996,21635,c[n>>2]|0)|0;if((Pc()|0)<=0){if(c[262]|0){n=me(c[m>>2]|0)|0;c[f>>2]=20996;c[f+4>>2]=1001;c[f+8>>2]=n;Wc(2,21083,21660,f)}}else Qc(-1,0);c[g>>2]=-1;o=c[g>>2]|0;i=e;return o|0}function $d(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0;d=i;i=i+48|0;e=d+16|0;f=d+40|0;g=d+36|0;h=d+32|0;j=d+8|0;k=d;c[g>>2]=b;c[h>>2]=21781;b=a;l=c[b+4>>2]|0;m=j;c[m>>2]=c[b>>2];c[m+4>>2]=l;l=ie()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;c[k>>2]=a;c[k+4>>2]=C;c[h>>2]=35583;k=j;a=c[k+4>>2]|0;if(!(1==(c[g>>2]|0)&(a>>>0>0|(a|0)==0&(c[k>>2]|0)>>>0>120))?(k=j,a=Ox(c[k>>2]|0,c[k+4>>2]|0,24,0)|0,!(0==(a|0)&0==(C|0))):0)break;a=j;k=Nx(c[a>>2]|0,c[a+4>>2]|0,24,0)|0;a=j;c[a>>2]=k;c[a+4>>2]=C;a=j;if(1==(c[a>>2]|0)?0==(c[a+4>>2]|0):0){c[h>>2]=21739;break}else{c[h>>2]=21743;break}}while(0);g=j;j=c[g+4>>2]|0;o=c[h>>2]|0;h=e;c[h>>2]=c[g>>2];c[h+4>>2]=j;c[e+8>>2]=o;Gc(76048,128,21718,e)|0;c[f>>2]=76048;n=c[f>>2]|0;i=d;return n|0}function ae(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0;b=i;i=i+32|0;d=b+16|0;e=b+12|0;f=b+8|0;g=b;h=a;j=c[h>>2]|0;k=c[h+4>>2]|0;h=je()|0;l=g;c[l>>2]=h;c[l+4>>2]=C;l=g;if((j|0)==(c[l>>2]|0)?(k|0)==(c[l+4>>2]|0):0){c[d>>2]=21748;m=c[d>>2]|0;i=b;return m|0}else{l=a;a=Nx(c[l>>2]|0,c[l+4>>2]|0,1e3,0)|0;l=Nx(a|0,C|0,1e3,0)|0;c[e>>2]=l;c[f>>2]=pb(e|0)|0;Ma(76176,255,21760,c[f>>2]|0)|0;c[d>>2]=76176;m=c[d>>2]|0;i=b;return m|0}return 0}function be(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0;h=i;i=i+96|0;j=h+24|0;k=h+16|0;l=h+8|0;m=h;n=h+84|0;o=h+80|0;p=h+76|0;q=h+72|0;r=h+68|0;s=h+64|0;t=h+60|0;u=h+56|0;v=h+52|0;w=h+48|0;x=h+44|0;y=h+40|0;z=h+36|0;A=h+32|0;c[o>>2]=b;c[p>>2]=e;c[q>>2]=f;c[r>>2]=g;c[w>>2]=c[o>>2];if((c[r>>2]|0)>>>0<((((c[p>>2]<<3)+4|0)>>>0)/5|0)>>>0){c[x>>2]=873;if((c[263]|0)==-1)c[263]=Mc(1,0,21708,21790,c[x>>2]|0)|0;if((Pc()|0)<=0){if(c[263]|0){c[m>>2]=21708;c[m+4>>2]=873;Rc(1,61592,m)}}else Qc(-1,0);c[n>>2]=0;B=c[n>>2]|0;i=h;return B|0}c[v>>2]=0;c[s>>2]=0;c[t>>2]=0;c[u>>2]=0;while(1){if(!((c[t>>2]|0)>>>0<(c[p>>2]|0)>>>0?1:(c[v>>2]|0)>>>0>0)){C=32;break}if((c[v>>2]|0)>>>0<5?(c[t>>2]|0)>>>0<(c[p>>2]|0)>>>0:0){m=c[u>>2]<<8;x=c[t>>2]|0;c[t>>2]=x+1;c[u>>2]=m|(d[(c[w>>2]|0)+x>>0]|0);c[v>>2]=(c[v>>2]|0)+8}if((c[v>>2]|0)>>>0<5){c[u>>2]=c[u>>2]<<5-(c[v>>2]|0);if((c[v>>2]|0)!=((c[p>>2]<<3>>>0)%5|0|0)){C=15;break}c[v>>2]=5}if((c[s>>2]|0)>>>0>=(c[r>>2]|0)>>>0){C=24;break}x=a[(c[266]|0)+((c[u>>2]|0)>>>((c[v>>2]|0)-5|0)&31)>>0]|0;m=c[s>>2]|0;c[s>>2]=m+1;a[(c[q>>2]|0)+m>>0]=x;c[v>>2]=(c[v>>2]|0)-5}if((C|0)==15){c[y>>2]=890;if((c[264]|0)==-1)c[264]=Mc(1,0,21708,21790,c[y>>2]|0)|0;if((Pc()|0)>0){Qc(-1,0);Lc()}if(!(c[264]|0))Lc();c[l>>2]=21708;c[l+4>>2]=890;Rc(1,61592,l);Lc()}else if((C|0)==24){c[z>>2]=895;if((c[265]|0)==-1)c[265]=Mc(1,0,21708,21790,c[z>>2]|0)|0;if((Pc()|0)<=0){if(c[265]|0){c[k>>2]=21708;c[k+4>>2]=895;Rc(1,61592,k)}}else Qc(-1,0);c[n>>2]=0;B=c[n>>2]|0;i=h;return B|0}else if((C|0)==32){if(!(c[v>>2]|0)){if((c[s>>2]|0)>>>0<(c[r>>2]|0)>>>0)a[(c[q>>2]|0)+(c[s>>2]|0)>>0]=0;c[n>>2]=(c[q>>2]|0)+(c[s>>2]|0);B=c[n>>2]|0;i=h;return B|0}c[A>>2]=901;if((c[267]|0)==-1)c[267]=Mc(1,0,21708,21790,c[A>>2]|0)|0;if((Pc()|0)>0){Qc(-1,0);Lc()}if(!(c[267]|0))Lc();c[j>>2]=21708;c[j+4>>2]=901;Rc(1,61592,j);Lc()}return 0}function ce(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0;e=i;i=i+32|0;f=e+20|0;g=e+16|0;h=e+12|0;j=e+8|0;k=e+4|0;l=e;c[g>>2]=b;c[h>>2]=d;c[k>>2]=c[h>>2]<<3;if((((c[k>>2]|0)>>>0)%5|0)>>>0>0)c[k>>2]=(c[k>>2]|0)+(5-(((c[k>>2]|0)>>>0)%5|0));c[k>>2]=((c[k>>2]|0)>>>0)/5|0;c[j>>2]=Cc((c[k>>2]|0)+1|0,21708,929)|0;c[l>>2]=be(c[g>>2]|0,c[h>>2]|0,c[j>>2]|0,c[k>>2]|0)|0;if(!(c[l>>2]|0)){Ec(c[j>>2]|0,21708,933);c[f>>2]=0;m=c[f>>2]|0;i=e;return m|0}else{a[c[l>>2]>>0]=0;c[f>>2]=c[j>>2];m=c[f>>2]|0;i=e;return m|0}return 0}function de(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0;g=i;i=i+64|0;h=g;j=g+60|0;k=g+56|0;l=g+52|0;m=g+48|0;n=g+44|0;o=g+40|0;p=g+36|0;q=g+32|0;r=g+28|0;s=g+24|0;t=g+20|0;u=g+16|0;v=g+12|0;w=g+8|0;c[k>>2]=b;c[l>>2]=d;c[m>>2]=e;c[n>>2]=f;c[v>>2]=c[n>>2]<<3;if(!(c[l>>2]|0))if(!(c[n>>2]|0)){c[j>>2]=1;x=c[j>>2]|0;i=g;return x|0}else{c[j>>2]=-1;x=c[j>>2]|0;i=g;return x|0}c[u>>2]=c[m>>2];c[p>>2]=c[n>>2];c[o>>2]=c[l>>2];if((((c[v>>2]|0)>>>0)%5|0)>>>0>0){c[r>>2]=((c[v>>2]|0)>>>0)%5|0;c[t>>2]=5-(c[r>>2]|0);n=(c[o>>2]|0)+-1|0;c[o>>2]=n;m=ee(a[(c[k>>2]|0)+n>>0]|0)|0;c[s>>2]=m;c[q>>2]=m>>c[t>>2]}else{c[r>>2]=5;c[t>>2]=0;m=(c[o>>2]|0)+-1|0;c[o>>2]=m;n=ee(a[(c[k>>2]|0)+m>>0]|0)|0;c[s>>2]=n;c[q>>2]=n}if(((((c[v>>2]|0)+(c[t>>2]|0)|0)>>>0)/5|0|0)!=(c[l>>2]|0)){c[j>>2]=-1;x=c[j>>2]|0;i=g;return x|0}if(-1==(c[s>>2]|0)){c[j>>2]=-1;x=c[j>>2]|0;i=g;return x|0}while(1){y=c[o>>2]|0;if((c[p>>2]|0)>>>0<=0){z=25;break}if(!y){z=14;break}l=(c[o>>2]|0)+-1|0;c[o>>2]=l;t=ee(a[(c[k>>2]|0)+l>>0]|0)|0;c[s>>2]=t;c[q>>2]=t<<c[r>>2]|c[q>>2];if(-1==(c[s>>2]|0)){z=22;break}c[r>>2]=(c[r>>2]|0)+5;if((c[r>>2]|0)>>>0<8)continue;t=c[q>>2]&255;l=(c[p>>2]|0)+-1|0;c[p>>2]=l;a[(c[u>>2]|0)+l>>0]=t;c[q>>2]=(c[q>>2]|0)>>>8;c[r>>2]=(c[r>>2]|0)-8}if((z|0)==14){c[w>>2]=993;if((c[268]|0)==-1)c[268]=Mc(1,0,21708,21853,c[w>>2]|0)|0;if((Pc()|0)<=0){if(c[268]|0){c[h>>2]=21708;c[h+4>>2]=993;Rc(1,61592,h)}}else Qc(-1,0);c[j>>2]=-1;x=c[j>>2]|0;i=g;return x|0}else if((z|0)==22){c[j>>2]=-1;x=c[j>>2]|0;i=g;return x|0}else if((z|0)==25)if(0!=(y|0)|0!=(c[r>>2]|0)){c[j>>2]=-1;x=c[j>>2]|0;i=g;return x|0}else{c[j>>2]=1;x=c[j>>2]|0;i=g;return x|0}return 0}function ee(b){b=b|0;var e=0,f=0,g=0,h=0,j=0;e=i;i=i+16|0;f=e+4|0;g=e+8|0;h=e;a[g>>0]=b;switch(d[g>>0]|0|0){case 111:case 79:{a[g>>0]=48;break}case 76:case 108:case 73:case 105:{a[g>>0]=49;break}case 85:case 117:{a[g>>0]=86;break}default:{}}if((d[g>>0]|0|0)>=48?(d[g>>0]|0|0)<=57:0){c[f>>2]=(d[g>>0]|0)-48;j=c[f>>2]|0;i=e;return j|0}if((d[g>>0]|0|0)>=97?(d[g>>0]|0|0)<=122:0)a[g>>0]=Jv(d[g>>0]|0)|0;c[h>>2]=0;if((d[g>>0]|0|0)>=65?(d[g>>0]|0|0)<=90:0){if(73<(d[g>>0]|0|0))c[h>>2]=(c[h>>2]|0)+1;if(76<(d[g>>0]|0|0))c[h>>2]=(c[h>>2]|0)+1;if(79<(d[g>>0]|0|0))c[h>>2]=(c[h>>2]|0)+1;if(85<(d[g>>0]|0|0))c[h>>2]=(c[h>>2]|0)+1;c[f>>2]=(d[g>>0]|0)-65+10-(c[h>>2]|0);j=c[f>>2]|0;i=e;return j|0}c[f>>2]=-1;j=c[f>>2]|0;i=e;return j|0}function fe(){var a=0;a=70536;C=c[a+4>>2]|0;return c[a>>2]|0}function ge(){var a=0,b=0,d=0,e=0,f=0,g=0;a=i;i=i+32|0;b=a+8|0;d=a;e=a+16|0;lb(e|0,0)|0;f=c[e>>2]|0;g=Mx(f|0,((f|0)<0)<<31>>31|0,1e3,0)|0;f=Mx(g|0,C|0,1e3,0)|0;g=c[e+4>>2]|0;e=Ax(f|0,C|0,g|0,((g|0)<0)<<31>>31|0)|0;g=70536;f=Ax(e|0,C|0,c[g>>2]|0,c[g+4>>2]|0)|0;g=d;c[g>>2]=f;c[g+4>>2]=C;c[b>>2]=c[d>>2];c[b+4>>2]=c[d+4>>2];d=b;C=c[d+4>>2]|0;i=a;return c[d>>2]|0}function he(){var a=0,b=0,d=0;a=i;i=i+16|0;b=a;c[b>>2]=c[17636];c[b+4>>2]=c[17637];d=b;C=c[d+4>>2]|0;i=a;return c[d>>2]|0}function ie(){var a=0,b=0,d=0;a=i;i=i+16|0;b=a;c[b>>2]=c[16];c[b+4>>2]=c[17];d=b;C=c[d+4>>2]|0;i=a;return c[d>>2]|0}function je(){var a=0,b=0,d=0;a=i;i=i+16|0;b=a;c[b>>2]=c[18];c[b+4>>2]=c[19];d=b;C=c[d+4>>2]|0;i=a;return c[d>>2]|0}function ke(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;b=i;i=i+32|0;d=b+24|0;e=b+16|0;f=b+8|0;g=b;h=ge()|0;j=g;c[j>>2]=h;c[j+4>>2]=C;c[e>>2]=c[g>>2];c[e+4>>2]=c[g+4>>2];g=a;j=c[g+4>>2]|0;h=e;k=c[h+4>>2]|0;if(j>>>0>k>>>0|((j|0)==(k|0)?(c[g>>2]|0)>>>0>(c[h>>2]|0)>>>0:0)){h=he()|0;g=d;c[g>>2]=h;c[g+4>>2]=C;l=d;m=l;n=c[m>>2]|0;o=l+4|0;p=o;q=c[p>>2]|0;C=q;i=b;return n|0}else{g=e;e=a;a=zx(c[g>>2]|0,c[g+4>>2]|0,c[e>>2]|0,c[e+4>>2]|0)|0;e=f;c[e>>2]=a;c[e+4>>2]=C;c[d>>2]=c[f>>2];c[d+4>>2]=c[f+4>>2];l=d;m=l;n=c[m>>2]|0;o=l+4|0;p=o;q=c[p>>2]|0;C=q;i=b;return n|0}return 0}function le(b){b=b|0;var e=0,f=0,g=0,h=0,j=0,k=0;e=i;i=i+16|0;f=e+8|0;g=e;h=b;b=Hc(c[h>>2]|0,c[h+4>>2]|0)|0;h=C;j=g;k=j;a[k>>0]=b;a[k+1>>0]=b>>8;a[k+2>>0]=b>>16;a[k+3>>0]=b>>24;b=j+4|0;a[b>>0]=h;a[b+1>>0]=h>>8;a[b+2>>0]=h>>16;a[b+3>>0]=h>>24;a[f>>0]=a[g>>0]|0;a[f+1>>0]=a[g+1>>0]|0;a[f+2>>0]=a[g+2>>0]|0;a[f+3>>0]=a[g+3>>0]|0;a[f+4>>0]=a[g+4>>0]|0;a[f+5>>0]=a[g+5>>0]|0;a[f+6>>0]=a[g+6>>0]|0;a[f+7>>0]=a[g+7>>0]|0;g=f;f=g;h=g+4|0;C=d[h>>0]|d[h+1>>0]<<8|d[h+2>>0]<<16|d[h+3>>0]<<24;i=e;return d[f>>0]|d[f+1>>0]<<8|d[f+2>>0]<<16|d[f+3>>0]<<24|0}function me(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;a=ne(c[d>>2]|0)|0;i=b;return a|0}function ne(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;a=fu(c[d>>2]|0)|0;i=b;return a|0}function oe(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;d=i;i=i+16|0;e=d+4|0;f=d;c[e>>2]=a;c[f>>2]=b;if(!(c[f>>2]|0)){g=0;i=d;return g|0}g=(c[e>>2]&127)<<24|c[f>>2]&65535;i=d;return g|0}function pe(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;a=oe(1,c[d>>2]|0)|0;i=b;return a|0}function qe(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;a=Nf(c[d>>2]|0)|0;i=b;return a|0}function re(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;d=i;i=i+32|0;e=d+20|0;f=d+16|0;g=d;c[e>>2]=a;c[g>>2]=b;c[f>>2]=pe(Qf(c[e>>2]|0,g)|0)|0;i=d;return c[f>>2]|0}function se(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0;f=i;i=i+16|0;g=f+12|0;h=f+8|0;j=f+4|0;k=f;c[g>>2]=a;c[h>>2]=b;c[j>>2]=d;c[k>>2]=e;e=pe(wg(c[g>>2]|0,c[h>>2]|0,c[j>>2]|0,c[k>>2]|0)|0)|0;i=f;return e|0}function te(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0;f=i;i=i+32|0;g=f+28|0;h=f+24|0;j=f+20|0;k=f+16|0;l=f;c[g>>2]=a;c[h>>2]=b;c[j>>2]=d;c[l>>2]=e;c[k>>2]=Jg(c[g>>2]|0,c[h>>2]|0,c[j>>2]|0,l)|0;l=pe(c[k>>2]|0)|0;i=f;return l|0}function ue(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;vg(c[d>>2]|0);i=b;return}function ve(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0;f=i;i=i+16|0;g=f+12|0;h=f+8|0;j=f+4|0;k=f;c[g>>2]=a;c[h>>2]=b;c[j>>2]=d;c[k>>2]=e;e=Lg(c[g>>2]|0,c[h>>2]|0,c[j>>2]|0,c[k>>2]|0)|0;i=f;return e|0}function we(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=i;i=i+16|0;f=e+8|0;g=e+4|0;h=e;c[f>>2]=a;c[g>>2]=b;c[h>>2]=d;d=xg(c[f>>2]|0,c[g>>2]|0,c[h>>2]|0)|0;i=e;return d|0}function xe(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;a=Hg(c[d>>2]|0)|0;i=b;return a|0}function ye(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=i;i=i+16|0;f=e+8|0;g=e+4|0;h=e;c[f>>2]=a;c[g>>2]=b;c[h>>2]=d;d=Fg(c[f>>2]|0,c[g>>2]|0,c[h>>2]|0)|0;i=e;return d|0}function ze(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;a=vq(c[d>>2]|0)|0;i=b;return a|0}function Ae(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;xq(c[d>>2]|0);i=b;return}function Be(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0;g=i;i=i+32|0;h=g+16|0;j=g+12|0;k=g+8|0;l=g+4|0;m=g;c[h>>2]=a;c[j>>2]=b;c[k>>2]=d;c[l>>2]=e;c[m>>2]=f;f=pe(Dp(c[h>>2]|0,c[j>>2]|0,c[k>>2]|0,c[l>>2]|0,c[m>>2]|0)|0)|0;i=g;return f|0}function Ce(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0;g=i;i=i+32|0;h=g+16|0;j=g+12|0;k=g+8|0;l=g+4|0;m=g;c[h>>2]=a;c[j>>2]=b;c[k>>2]=d;c[l>>2]=e;c[m>>2]=f;f=pe(Hp(c[h>>2]|0,c[j>>2]|0,c[k>>2]|0,c[l>>2]|0,c[m>>2]|0)|0)|0;i=g;return f|0}function De(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0;f=i;i=i+16|0;g=f+12|0;h=f+8|0;j=f+4|0;k=f;c[g>>2]=a;c[h>>2]=b;c[j>>2]=d;c[k>>2]=e;vp(c[g>>2]|0,c[h>>2]|0,c[j>>2]|0,c[k>>2]|0);i=f;return}function Ee(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0;f=i;i=i+16|0;g=f+12|0;h=f+8|0;j=f+4|0;k=f;c[g>>2]=a;c[h>>2]=b;c[j>>2]=d;c[k>>2]=e;wp(c[g>>2]|0,c[h>>2]|0,c[j>>2]|0,c[k>>2]|0);i=f;return}function Fe(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=i;i=i+16|0;f=e+8|0;g=e+4|0;h=e;c[f>>2]=a;c[g>>2]=b;c[h>>2]=d;d=pp(c[f>>2]|0,c[g>>2]|0,c[h>>2]|0)|0;i=e;return d|0}function Ge(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;a=bo(c[d>>2]|0)|0;i=b;return a|0}function He(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;eo(c[d>>2]|0);i=b;return}function Ie(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=i;i=i+16|0;f=e+8|0;g=e+4|0;h=e;c[f>>2]=a;c[g>>2]=b;c[h>>2]=d;d=pe(Ai(c[f>>2]|0,c[g>>2]|0,c[h>>2]|0)|0)|0;i=e;return d|0}function Je(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=i;i=i+16|0;f=e+8|0;g=e+4|0;h=e;c[f>>2]=a;c[g>>2]=b;c[h>>2]=d;d=oo(c[f>>2]|0,c[g>>2]|0,c[h>>2]|0)|0;i=e;return d|0}function Ke(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=i;i=i+16|0;f=e+8|0;g=e+4|0;h=e;c[f>>2]=a;c[g>>2]=b;c[h>>2]=d;d=po(c[f>>2]|0,c[g>>2]|0,c[h>>2]|0)|0;i=e;return d|0}function Le(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0;f=i;i=i+16|0;g=f+12|0;h=f+8|0;j=f+4|0;k=f;c[g>>2]=a;c[h>>2]=b;c[j>>2]=d;c[k>>2]=e;e=c[g>>2]|0;g=c[h>>2]|0;h=c[j>>2]|0;j=Zn(e,g,h,Xh(c[k>>2]|0,1)|0)|0;i=f;return j|0}function Me(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0;f=i;i=i+16|0;g=f+12|0;h=f+8|0;j=f+4|0;k=f;c[g>>2]=a;c[h>>2]=b;c[j>>2]=d;c[k>>2]=e;e=c[g>>2]|0;g=c[h>>2]|0;h=c[j>>2]|0;Go(e,g,h,Xh(c[k>>2]|0,1)|0);i=f;return}function Ne(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=i;i=i+16|0;e=d+4|0;f=d;c[e>>2]=a;c[f>>2]=b;b=kq(c[e>>2]|0,c[f>>2]|0)|0;i=d;return b|0}function Oe(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=i;i=i+16|0;e=d+4|0;f=d;c[e>>2]=a;c[f>>2]=b;b=zq(c[e>>2]|0,c[f>>2]|0)|0;i=d;return b|0}function Pe(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0;f=i;i=i+32|0;g=f+16|0;h=f+12|0;j=f+8|0;k=f+4|0;l=f;c[h>>2]=a;c[j>>2]=b;c[k>>2]=d;c[l>>2]=e;e=(Lf()|0)!=0;d=c[h>>2]|0;if(e){c[g>>2]=pe(ai(d,c[j>>2]|0,c[k>>2]|0,c[l>>2]|0)|0)|0;m=c[g>>2]|0;i=f;return m|0}else{c[d>>2]=0;c[g>>2]=pe(176)|0;m=c[g>>2]|0;i=f;return m|0}return 0}function Qe(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;fi(c[d>>2]|0);i=b;return}function Re(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0;e=i;i=i+16|0;f=e+12|0;g=e+8|0;h=e+4|0;j=e;c[g>>2]=a;c[h>>2]=b;c[j>>2]=d;if(Lf()|0){c[f>>2]=Se(ni(c[g>>2]|0,c[h>>2]|0,c[j>>2]|0)|0)|0;k=c[f>>2]|0;i=e;return k|0}else{c[f>>2]=pe(176)|0;k=c[f>>2]|0;i=e;return k|0}return 0}function Se(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;a=Te(32,c[d>>2]|0)|0;i=b;return a|0}function Te(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=i;i=i+16|0;e=d+4|0;f=d;c[e>>2]=a;c[f>>2]=b;b=oe(c[e>>2]|0,c[f>>2]|0)|0;i=d;return b|0}function Ue(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0;e=i;i=i+16|0;f=e+12|0;g=e+8|0;h=e+4|0;j=e;c[g>>2]=a;c[h>>2]=b;c[j>>2]=d;if(Lf()|0){c[f>>2]=Se(pi(c[g>>2]|0,c[h>>2]|0,c[j>>2]|0)|0)|0;k=c[f>>2]|0;i=e;return k|0}else{c[f>>2]=pe(176)|0;k=c[f>>2]|0;i=e;return k|0}return 0}function Ve(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0;g=i;i=i+32|0;h=g+20|0;j=g+16|0;k=g+12|0;l=g+8|0;m=g+4|0;n=g;c[j>>2]=a;c[k>>2]=b;c[l>>2]=d;c[m>>2]=e;c[n>>2]=f;if(Lf()|0){c[h>>2]=pe(gi(c[j>>2]|0,c[k>>2]|0,c[l>>2]|0,c[m>>2]|0,c[n>>2]|0)|0)|0;o=c[h>>2]|0;i=g;return o|0}if(c[k>>2]|0)Fx(c[k>>2]|0,66,c[l>>2]|0)|0;c[h>>2]=pe(176)|0;o=c[h>>2]|0;i=g;return o|0}function We(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0;g=i;i=i+32|0;h=g+20|0;j=g+16|0;k=g+12|0;l=g+8|0;m=g+4|0;n=g;c[j>>2]=a;c[k>>2]=b;c[l>>2]=d;c[m>>2]=e;c[n>>2]=f;if(Lf()|0){c[h>>2]=pe(ki(c[j>>2]|0,c[k>>2]|0,c[l>>2]|0,c[m>>2]|0,c[n>>2]|0)|0)|0;o=c[h>>2]|0;i=g;return o|0}else{c[h>>2]=pe(176)|0;o=c[h>>2]|0;i=g;return o|0}return 0}function Xe(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0;e=i;i=i+16|0;f=e+12|0;g=e+8|0;h=e+4|0;j=e;c[g>>2]=a;c[h>>2]=b;c[j>>2]=d;d=(Lf()|0)!=0;b=c[g>>2]|0;if(d){c[f>>2]=pe(Ak(b,c[h>>2]|0,c[j>>2]|0)|0)|0;k=c[f>>2]|0;i=e;return k|0}else{c[b>>2]=0;c[f>>2]=pe(176)|0;k=c[f>>2]|0;i=e;return k|0}return 0}function Ye(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0;e=i;i=i+16|0;f=e+12|0;g=e+8|0;h=e+4|0;j=e;c[g>>2]=a;c[h>>2]=b;c[j>>2]=d;if(Lf()|0){c[f>>2]=pe(Bk(c[g>>2]|0,c[h>>2]|0,c[j>>2]|0)|0)|0;k=c[f>>2]|0;i=e;return k|0}else{c[f>>2]=pe(176)|0;k=c[f>>2]|0;i=e;return k|0}return 0}function Ze(a){a=a|0;var b=0,d=0,e=0,f=0;b=i;i=i+16|0;d=b+4|0;e=b;c[e>>2]=a;if(Lf()|0){c[d>>2]=pe(Ck(c[e>>2]|0)|0)|0;f=c[d>>2]|0;i=b;return f|0}else{c[d>>2]=pe(176)|0;f=c[d>>2]|0;i=b;return f|0}return 0}function _e(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;d=i;i=i+16|0;e=d+8|0;f=d+4|0;g=d;c[f>>2]=a;c[g>>2]=b;b=(Lf()|0)!=0;a=c[f>>2]|0;if(b){c[e>>2]=pe(Dk(a,c[g>>2]|0)|0)|0;h=c[e>>2]|0;i=d;return h|0}else{c[a>>2]=0;c[e>>2]=pe(176)|0;h=c[e>>2]|0;i=d;return h|0}return 0}function $e(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0;e=i;i=i+16|0;f=e+12|0;g=e+8|0;h=e+4|0;j=e;c[g>>2]=a;c[h>>2]=b;c[j>>2]=d;d=(Lf()|0)!=0;b=c[g>>2]|0;if(d){c[f>>2]=pe(wj(b,c[h>>2]|0,c[j>>2]|0)|0)|0;k=c[f>>2]|0;i=e;return k|0}else{c[b>>2]=0;c[f>>2]=pe(176)|0;k=c[f>>2]|0;i=e;return k|0}return 0}function af(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;Ej(c[d>>2]|0);i=b;return}function bf(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;Dj(c[d>>2]|0);i=b;return}function cf(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=i;i=i+16|0;f=e+8|0;g=e+4|0;h=e;c[f>>2]=a;c[g>>2]=b;c[h>>2]=d;if(!(Lf()|0)){i=e;return}Fj(c[f>>2]|0,c[g>>2]|0,c[h>>2]|0);i=e;return}function df(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=i;i=i+16|0;e=d+4|0;f=d;c[e>>2]=a;c[f>>2]=b;b=Rj(c[e>>2]|0,c[f>>2]|0)|0;i=d;return b|0}function ef(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0;f=i;i=i+16|0;g=f+12|0;h=f+8|0;j=f+4|0;k=f;c[g>>2]=a;c[h>>2]=b;c[j>>2]=d;c[k>>2]=e;if(!(Lf()|0))Jh(21883,1175,21896,0,21916);Nj(c[g>>2]|0,c[h>>2]|0,c[j>>2]|0,c[k>>2]|0);i=f;return}function ff(a){a=a|0;var b=0,d=0,e=0,f=0;b=i;i=i+16|0;d=b+4|0;e=b;c[e>>2]=a;if(Lf()|0){c[d>>2]=Tj(c[e>>2]|0)|0;f=c[d>>2]|0;i=b;return f|0}else{Jh(21883,1198,21948,0,21965);c[d>>2]=0;f=c[d>>2]|0;i=b;return f|0}return 0}function gf(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;a=Uj(c[d>>2]|0)|0;i=b;return a|0}function hf(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0;e=i;i=i+16|0;f=e+12|0;g=e+8|0;h=e+4|0;j=e;c[g>>2]=a;c[h>>2]=b;c[j>>2]=d;if(Lf()|0){c[f>>2]=pe(Lj(c[g>>2]|0,c[h>>2]|0,c[j>>2]|0)|0)|0;k=c[f>>2]|0;i=e;return k|0}else{c[f>>2]=pe(176)|0;k=c[f>>2]|0;i=e;return k|0}return 0}function jf(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=i;i=i+16|0;f=e+8|0;g=e+4|0;h=e;c[f>>2]=a;c[g>>2]=b;c[h>>2]=d;if(!(Lf()|0)){Jh(21883,1287,21995,1,21916);Fh()}Pn(c[f>>2]|0,c[g>>2]|0,c[h>>2]|0);i=e;return}function kf(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=i;i=i+16|0;f=e+8|0;g=e+4|0;h=e;c[f>>2]=a;c[g>>2]=b;c[h>>2]=d;yq(c[f>>2]|0,c[g>>2]|0,c[h>>2]|0);i=e;return}function lf(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=i;i=i+16|0;e=d+4|0;f=d;c[e>>2]=a;c[f>>2]=b;if(!(Lf()|0)){Jh(21883,1340,22010,1,21916);Fh()}Tn(c[e>>2]|0,c[f>>2]|0);i=d;return}function mf(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;Yh(c[d>>2]|0);i=b;return}function nf(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=i;i=i+16|0;e=d+4|0;f=d;c[e>>2]=a;c[f>>2]=b;kg(c[e>>2]|0,c[f>>2]|0);i=d;return}function of(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;$f(c[d>>2]|0);i=b;return}function pf(a){a=a|0;var b=0,d=0,e=0,f=0;b=i;i=i+16|0;d=b+4|0;e=b;c[e>>2]=a;if(c[17657]|0){c[d>>2]=zb[c[17657]&15](c[e>>2]|0)|0;f=c[d>>2]|0;i=b;return f|0}else{c[d>>2]=c[e>>2];f=c[d>>2]|0;i=b;return f|0}return 0}function qf(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=i;i=i+16|0;e=d+4|0;f=d;c[e>>2]=a;c[f>>2]=b;if(!(c[f>>2]|0))c[f>>2]=fu(c[e>>2]|0)|0;if((c[17659]|0)!=0?(Ah()|0)==0:0)Ab[c[17659]&7](c[17658]|0,c[e>>2]|0,c[f>>2]|0);Jh(22028,86,22035,1,c[f>>2]|0);rf(22053);rf(c[f>>2]|0);rf(22484);xh();gb()}function rf(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b+4|0;c[d>>2]=a;a=c[d>>2]|0;c[b>>2]=Kw(2,a,Kv(c[d>>2]|0)|0)|0;i=b;return}function sf(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;c[17662]=c[d>>2];i=b;return}function tf(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;i=b;return (c[17662]|0)>=(c[d>>2]|0)|0}function uf(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0;e=i;i=i+16|0;f=e;g=e+12|0;h=e+8|0;j=e+4|0;c[g>>2]=a;c[h>>2]=b;c[j>>2]=d;if(c[17660]|0)Fb[c[17660]&1](c[17661]|0,c[g>>2]|0,c[h>>2]|0,c[j>>2]|0);else{switch(c[g>>2]|0){case 30:case 20:case 10:case 0:break;case 40:{Aw(22068,c[3962]|0)|0;break}case 50:{Aw(22076,c[3962]|0)|0;break}case 100:{Aw(22090,c[3962]|0)|0;break}default:{d=c[3962]|0;c[f>>2]=c[g>>2];gw(d,22096,f)|0}}wv(c[3962]|0,c[h>>2]|0,c[j>>2]|0)|0}if((c[g>>2]|0)==40|(c[g>>2]|0)==50){Jh(22028,140,22121,1,22132);xh();gb()}else{i=e;return}}function vf(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=i;i=i+32|0;f=e+20|0;g=e+16|0;h=e;c[f>>2]=a;c[g>>2]=b;c[h>>2]=d;uf(c[f>>2]|0,c[g>>2]|0,h);i=e;return}function wf(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0;e=i;i=i+32|0;f=e;g=e+20|0;h=e+16|0;j=e+12|0;c[g>>2]=a;c[h>>2]=b;c[j>>2]=d;d=c[h>>2]|0;h=c[j>>2]|0;c[f>>2]=c[g>>2];c[f+4>>2]=d;c[f+8>>2]=h;vf(50,22162,f);gb()}function xf(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0;f=i;i=i+32|0;g=f;h=f+28|0;j=f+24|0;k=f+20|0;l=f+16|0;c[h>>2]=a;c[j>>2]=b;c[k>>2]=d;c[l>>2]=e;e=c[j>>2]|0;j=c[k>>2]|0;k=c[l>>2]|0;c[g>>2]=c[h>>2];c[g+4>>2]=e;c[g+8>>2]=j;c[g+12>>2]=k;vf(50,22192,g);gb()}function yf(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=i;i=i+32|0;e=d+16|0;f=d;c[e>>2]=a;c[f>>2]=b;uf(10,c[e>>2]|0,f);i=d;return}function zf(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0;e=i;i=i+32|0;f=e+16|0;g=e;c[e+20>>2]=a;c[f>>2]=b;c[g>>2]=d;uf(10,c[f>>2]|0,g);i=e;return 0}function Af(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=i;i=i+32|0;e=d+16|0;f=d;c[e>>2]=a;c[f>>2]=b;uf(30,c[e>>2]|0,f);i=d;return}function Bf(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=i;i=i+32|0;e=d+16|0;f=d;c[e>>2]=a;c[f>>2]=b;uf(40,c[e>>2]|0,f);gb()}function Cf(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=i;i=i+32|0;e=d+16|0;f=d;c[e>>2]=a;c[f>>2]=b;uf(50,c[e>>2]|0,f);gb()}function Df(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=i;i=i+32|0;e=d+16|0;f=d;c[e>>2]=a;c[f>>2]=b;uf(100,c[e>>2]|0,f);i=d;return}function Ef(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=i;i=i+32|0;e=d+16|0;f=d;c[e>>2]=a;if(!(c[e>>2]|0)){i=d;return}c[f>>2]=b;uf(0,c[e>>2]|0,f);i=d;return}function Ff(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=i;i=i+16|0;f=e+8|0;g=e+4|0;h=e;c[f>>2]=a;c[g>>2]=b;c[h>>2]=d;Gf(c[f>>2]|0,22226,c[g>>2]|0,c[h>>2]|0);i=e;return}function Gf(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0;h=i;i=i+96|0;j=h+56|0;k=h+40|0;l=h+32|0;m=h+24|0;n=h+16|0;o=h+8|0;p=h;q=h+84|0;r=h+80|0;s=h+76|0;t=h+72|0;u=h+68|0;v=h+64|0;w=h+60|0;c[q>>2]=b;c[r>>2]=e;c[s>>2]=f;c[t>>2]=g;c[u>>2]=0;c[v>>2]=0;if(((c[q>>2]|0)!=0?(a[c[q>>2]>>0]|0)!=0:0)?(c[u>>2]=1,g=c[r>>2]|0,c[p>>2]=c[q>>2],c[p+4>>2]=g,Df(22228,p),((c[t>>2]|0)!=0?(a[(c[r>>2]|0)+1>>0]|0)==91:0)&(c[s>>2]|0)!=0):0){Ef(22484,o);c[r>>2]=22226;c[n>>2]=Kv(c[q>>2]|0)|0;c[n+4>>2]=76527;Df(22234,n)}a:do if(c[t>>2]|0){c[w>>2]=c[s>>2];while(1){n=c[t>>2]|0;c[t>>2]=n+-1;if(!n)break a;c[m>>2]=d[c[w>>2]>>0];Ef(22240,m);if((c[u>>2]|0)!=0?(n=(c[v>>2]|0)+1|0,c[v>>2]=n,(n|0)==32&(c[t>>2]|0)!=0):0){c[v>>2]=0;Ef(22245,l);n=Kv(c[q>>2]|0)|0;o=Kv(c[r>>2]|0)|0;c[k>>2]=n;c[k+4>>2]=76527;c[k+8>>2]=o;c[k+12>>2]=76527;Df(22249,k)}c[w>>2]=(c[w>>2]|0)+1}}while(0);if(!(c[q>>2]|0)){i=h;return}Ef(22484,j);i=h;return}function Hf(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0;d=i;i=i+64|0;e=d;f=d+28|0;g=d+24|0;h=d+20|0;j=d+16|0;k=d+12|0;l=d+8|0;m=d+4|0;n=d+32|0;c[f>>2]=a;c[g>>2]=b;if(!(c[g>>2]|0)){Gf((c[f>>2]|0)!=0?c[f>>2]|0:22226,22257,0,0);i=d;return}if((c[g>>2]|0)!=0?(c[(c[g>>2]|0)+12>>2]&4|0)!=0:0){c[m>>2]=kq(c[g>>2]|0,l)|0;c[e>>2]=c[l>>2];tv(n,30,22265,e)|0;Gf((c[f>>2]|0)!=0?c[f>>2]|0:22226,n,c[m>>2]|0,(((c[l>>2]|0)+7|0)>>>0)/8|0);i=d;return}c[h>>2]=zp(c[g>>2]|0,0,j,k)|0;if(!(c[h>>2]|0)){Gf((c[f>>2]|0)!=0?c[f>>2]|0:22226,22275,0,0);i=d;return}g=c[f>>2]|0;f=(c[k>>2]|0)!=0?22290:22292;if(c[j>>2]|0)Gf(g,f,c[h>>2]|0,c[j>>2]|0);else Gf(g,f,76527,1);$f(c[h>>2]|0);i=d;return}function If(b){b=b|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0;e=i;i=i+48|0;f=e+28|0;g=e+24|0;h=e+20|0;j=e+16|0;k=e+12|0;l=e+32|0;m=e;n=e+8|0;c[f>>2]=b;c[g>>2]=(((c[f>>2]|0)!=0^1)&1)+(c[f>>2]|0)+63&-64;f=c[g>>2]|0;c[h>>2]=Xa()|0;g=i;i=i+((1*f|0)+15&-16)|0;c[j>>2]=g;c[k>>2]=f;a[l>>0]=0;f=m;c[f>>2]=d[l>>0];c[f+4>>2]=0;while(1){if(!((c[j>>2]&7|0)!=0?(c[k>>2]|0)!=0:0))break;a[c[j>>2]>>0]=a[l>>0]|0;c[j>>2]=(c[j>>2]|0)+1;c[k>>2]=(c[k>>2]|0)+-1}if((c[k>>2]|0)>>>0>=8){f=m;g=Mx(c[f>>2]|0,c[f+4>>2]|0,16843009,16843009)|0;f=m;c[f>>2]=g;c[f+4>>2]=C;do{c[n>>2]=c[j>>2];f=m;g=c[f+4>>2]|0;b=c[n>>2]|0;c[b>>2]=c[f>>2];c[b+4>>2]=g;c[k>>2]=(c[k>>2]|0)-8;c[j>>2]=(c[j>>2]|0)+8}while((c[k>>2]|0)>>>0>=8)}while(1){if(!(c[k>>2]|0))break;a[c[j>>2]>>0]=a[l>>0]|0;c[j>>2]=(c[j>>2]|0)+1;c[k>>2]=(c[k>>2]|0)+-1}xa(c[h>>2]|0);i=e;return}function Jf(){return}function Kf(){ju(33);qf(gu(c[(Yu()|0)>>2]|0)|0,22294)}function Lf(){if(!(c[17663]|0))Mf();return Lh()|0}function Mf(){var a=0,b=0;a=i;i=i+16|0;b=a;c[b>>2]=0;if(c[17663]|0){i=a;return}c[17663]=1;Cn(0);zh(c[17664]|0);Xg();c[b>>2]=ri()|0;if((((((c[b>>2]|0)==0?(c[b>>2]=$j()|0,(c[b>>2]|0)==0):0)?(c[b>>2]=Ek()|0,(c[b>>2]|0)==0):0)?(c[b>>2]=ak()|0,(c[b>>2]|0)==0):0)?(c[b>>2]=kh()|0,(c[b>>2]|0)==0):0)?(c[b>>2]=Zp()|0,(c[b>>2]|0)==0):0){i=a;return}wf(22309,123,22318)}function Nf(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;d=i;i=i+48|0;e=d+36|0;f=d+32|0;g=d+28|0;h=d+24|0;j=d+20|0;k=d+16|0;l=d+12|0;m=d+8|0;n=d+4|0;o=d;c[f>>2]=b;c[g>>2]=22330;if(((c[f>>2]|0)!=0?(a[c[f>>2]>>0]|0)==1:0)?(a[(c[f>>2]|0)+1>>0]|0)==1:0){c[e>>2]=Bq()|0;p=c[e>>2]|0;i=d;return p|0}Mf();b=c[g>>2]|0;if(!(c[f>>2]|0)){c[e>>2]=b;p=c[e>>2]|0;i=d;return p|0}c[o>>2]=Of(b,h,j,k)|0;if(!(c[o>>2]|0)){c[e>>2]=0;p=c[e>>2]|0;i=d;return p|0}if(!(Of(c[f>>2]|0,l,m,n)|0)){c[e>>2]=0;p=c[e>>2]|0;i=d;return p|0}do if((c[h>>2]|0)<=(c[l>>2]|0)){if((c[h>>2]|0)==(c[l>>2]|0)?(c[j>>2]|0)>(c[m>>2]|0):0)break;if(((c[h>>2]|0)==(c[l>>2]|0)?(c[j>>2]|0)==(c[m>>2]|0):0)?(c[k>>2]|0)>(c[n>>2]|0):0)break;if(((c[h>>2]|0)==(c[l>>2]|0)?(c[j>>2]|0)==(c[m>>2]|0):0)?(c[k>>2]|0)==(c[n>>2]|0):0)break;c[e>>2]=0;p=c[e>>2]|0;i=d;return p|0}while(0);c[e>>2]=c[g>>2];p=c[e>>2]|0;i=d;return p|0}function Of(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0;g=i;i=i+32|0;h=g+16|0;j=g+12|0;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=d+36|0;p=d+32|0;q=d+28|0;r=d+24|0;s=d+20|0;t=d+16|0;u=d+12|0;v=d+8|0;w=d+4|0;x=d;c[e>>2]=a;c[f>>2]=b;c[g>>2]=0;a:do switch(c[e>>2]|0){case 31:{Zg();break}case 44:{Cn(0);In();break}case 51:{if(Ln()|0)c[g>>2]=1;break}case 13:{Gn();break}case 62:case 23:break;case 14:{yh();break}case 30:{Mf();gh(0);break}case 37:{Mf();c[17665]=1;break}case 24:{Mf();b=c[f>>2]|0;a=(c[b>>2]|0)+(4-1)&~(4-1);y=c[a>>2]|0;c[b>>2]=a+4;gh(y);if((fh()|0)&4)c[g>>2]=1;break}case 25:{Mf();xh();break}case 27:{Cn(0);dh(fh()|0|1);break}case 28:{Cn(0);dh(fh()|0|2);break}case 29:{Cn(0);dh((fh()|0)&-3);break}case 22:{Mf();Hn();break}case 45:{Cn(0);y=c[f>>2]|0;a=(c[y>>2]|0)+(4-1)&~(4-1);b=c[a>>2]|0;c[y>>2]=a+4;Qn(b);break}case 46:{Cn(0);if(Lf()|0)Rn();break}case 19:{Cn(0);b=c[f>>2]|0;a=(c[b>>2]|0)+(4-1)&~(4-1);y=c[a>>2]|0;c[b>>2]=a+4;sf(y);break}case 20:{y=c[f>>2]|0;a=(c[y>>2]|0)+(4-1)&~(4-1);b=c[a>>2]|0;c[y>>2]=a+4;c[17666]=c[17666]|b;break}case 21:{b=c[f>>2]|0;a=(c[b>>2]|0)+(4-1)&~(4-1);y=c[a>>2]|0;c[b>>2]=a+4;c[17666]=c[17666]&~y;break}case 36:{Mf();break}case 40:{if(c[17663]|0)c[g>>2]=1;break}case 39:{if(c[17667]|0)c[g>>2]=1;break}case 38:{if(!(c[17667]|0)){Mf();Dn(0);c[17667]=1;Lf()|0}break}case 47:{Cn(0);Mf();break}case 48:{Cn(0);Dn(1);if(Lf()|0)Sn();break}case 52:{c[g>>2]=Rf(60)|0;break}case 49:{Cn(0);y=c[f>>2]|0;a=(c[y>>2]|0)+(4-1)&~(4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[y>>2]=a+4;c[q>>2]=b;if(Lf()|0){c[g>>2]=Vn(c[j>>2]|0,c[k>>2]|0,c[l>>2]|0,c[m>>2]|0,c[n>>2]|0,c[o>>2]|0,c[p>>2]|0,c[q>>2]|0)|0;break a}else{c[g>>2]=176;break a}break}case 59:{b=c[f>>2]|0;a=(c[b>>2]|0)+(4-1)&~(4-1);y=c[a>>2]|0;c[b>>2]=a+4;c[r>>2]=y;y=c[f>>2]|0;a=(c[y>>2]|0)+(4-1)&~(4-1);b=c[a>>2]|0;c[y>>2]=a+4;c[s>>2]=b;b=c[f>>2]|0;a=(c[b>>2]|0)+(4-1)&~(4-1);y=c[a>>2]|0;c[b>>2]=a+4;c[t>>2]=y;if(Lf()|0){c[g>>2]=Wn(c[r>>2]|0,c[s>>2]|0,c[t>>2]|0)|0;break a}else{c[g>>2]=176;break a}break}case 60:{y=c[f>>2]|0;a=(c[y>>2]|0)+(4-1)&~(4-1);b=c[a>>2]|0;c[y>>2]=a+4;c[u>>2]=b;Xn(c[u>>2]|0);break}case 61:{b=c[f>>2]|0;a=(c[b>>2]|0)+(4-1)&~(4-1);y=c[a>>2]|0;c[b>>2]=a+4;c[g>>2]=Uf(y)|0;break}case 63:{y=c[f>>2]|0;a=(c[y>>2]|0)+(4-1)&~(4-1);b=c[a>>2]|0;c[y>>2]=a+4;c[v>>2]=b;c[g>>2]=Ug(c[v>>2]|0)|0;break}case 64:{if(c[17663]|0){c[g>>2]=1;break a}else{Cn(0);Hh();break a}break}case 65:{b=c[f>>2]|0;a=(c[b>>2]|0)+(4-1)&~(4-1);y=c[a>>2]|0;c[b>>2]=a+4;c[w>>2]=y;if((c[w>>2]|0)>0)Cn(c[w>>2]|0);break}case 66:{y=c[f>>2]|0;a=(c[y>>2]|0)+(4-1)&~(4-1);b=c[a>>2]|0;c[y>>2]=a+4;c[x>>2]=b;if(c[x>>2]|0){b=Fn(((c[17663]|0)!=0^1)&1)|0;c[c[x>>2]>>2]=b}break}case 67:{Cn(0);dh(fh()|0|8);break}case 68:{Cn(0);dh(fh()|0|16);break}case 72:case 71:{c[g>>2]=69;break}default:{Cn(0);c[g>>2]=61}}while(0);i=d;return c[g>>2]|0}function Rf(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;a=Sf(1,c[d>>2]|0)|0;i=b;return a|0}function Sf(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;d=i;i=i+16|0;e=d+4|0;f=d;c[e>>2]=a;c[f>>2]=b;if(!(c[f>>2]|0)){g=0;i=d;return g|0}g=(c[e>>2]&127)<<24|c[f>>2]&65535;i=d;return g|0}function Tf(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;d=i;i=i+128|0;e=d+88|0;f=d+80|0;g=d+72|0;h=d+64|0;j=d+48|0;k=d+24|0;l=d+16|0;m=d+8|0;n=d;o=d+116|0;p=d+112|0;q=d+108|0;r=d+104|0;s=d+100|0;t=d+96|0;c[o>>2]=a;c[p>>2]=b;b=c[o>>2]|0;a=c[p>>2]|0;c[n>>2]=22330;vb[b&63](a,22344,n)|0;n=c[o>>2]|0;a=c[p>>2]|0;c[m>>2]=22370;vb[n&63](a,22357,m)|0;m=c[o>>2]|0;a=c[p>>2]|0;c[l>>2]=22395;vb[m&63](a,22382,l)|0;l=c[o>>2]|0;a=c[p>>2]|0;c[k>>2]=22416;vb[l&63](a,22403,k)|0;vb[c[o>>2]&63](c[p>>2]|0,22430,d+32|0)|0;vb[c[o>>2]&63](c[p>>2]|0,22446,d+40|0)|0;k=c[o>>2]|0;a=c[p>>2]|0;c[j>>2]=Yp()|0;vb[k&63](a,22458,j)|0;c[q>>2]=Vg()|0;vb[c[o>>2]&63](c[p>>2]|0,22471,d+56|0)|0;c[s>>2]=0;while(1){j=Wg(c[s>>2]|0,r)|0;c[t>>2]=j;if(!j)break;if(c[q>>2]&c[r>>2]){j=c[o>>2]|0;a=c[p>>2]|0;c[h>>2]=c[t>>2];vb[j&63](a,22480,h)|0}c[s>>2]=(c[s>>2]|0)+1}vb[c[o>>2]&63](c[p>>2]|0,22484,g)|0;g=c[o>>2]|0;h=c[p>>2]|0;r=(Ah()|0)!=0;q=(Gh()|0)!=0;c[f>>2]=r?121:110;c[f+4>>2]=q?121:110;vb[g&63](h,22486,f)|0;c[s>>2]=Fn(0)|0;switch(c[s>>2]|0){case 1:{c[t>>2]=22504;u=c[o>>2]|0;v=c[p>>2]|0;w=c[t>>2]|0;x=c[s>>2]|0;c[e>>2]=w;y=e+4|0;c[y>>2]=x;vb[u&63](v,22538,e)|0;i=d;return}case 2:{c[t>>2]=22513;u=c[o>>2]|0;v=c[p>>2]|0;w=c[t>>2]|0;x=c[s>>2]|0;c[e>>2]=w;y=e+4|0;c[y>>2]=x;vb[u&63](v,22538,e)|0;i=d;return}case 3:{c[t>>2]=22518;u=c[o>>2]|0;v=c[p>>2]|0;w=c[t>>2]|0;x=c[s>>2]|0;c[e>>2]=w;y=e+4|0;c[y>>2]=x;vb[u&63](v,22538,e)|0;i=d;return}default:wf(22309,321,22525)}}function Uf(a){a=a|0;var b=0,d=0,e=0;b=i;i=i+16|0;d=b+4|0;e=b;c[d>>2]=a;c[e>>2]=0;switch(c[d>>2]|0){case 30111:{c[e>>2]=ku(1076)|0;break}case 30112:{c[e>>2]=lu(1076)|0;break}case 30113:{c[e>>2]=mu(1076)|0;break}case 30114:{c[e>>2]=nu(1076)|0;break}default:c[e>>2]=61}i=b;return c[e>>2]|0}function Vf(a){a=a|0;var b=0,d=0,e=0;b=i;i=i+16|0;d=b+4|0;e=b;c[d>>2]=a;c[e>>2]=0;Wf(c[d>>2]|0,0,e)|0;i=b;return c[e>>2]|0}function Wf(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0;e=i;i=i+32|0;f=e+16|0;g=e+12|0;h=e+8|0;j=e+4|0;k=e;c[f>>2]=a;c[g>>2]=b;c[h>>2]=d;c[j>>2]=0;do if((c[g>>2]&1|0)!=0?(Xf()|0)==0:0)if(c[17669]|0){c[k>>2]=zb[c[17669]&15](c[f>>2]|0)|0;break}else{c[k>>2]=$g(c[f>>2]|0)|0;break}else l=6;while(0);do if((l|0)==6)if(c[17668]|0){c[k>>2]=zb[c[17668]&15](c[f>>2]|0)|0;break}else{c[k>>2]=_g(c[f>>2]|0)|0;break}while(0);if(c[k>>2]|0){c[c[h>>2]>>2]=c[k>>2];m=c[j>>2]|0;i=e;return m|0}if(!(c[(Yu()|0)>>2]|0))ju(12);c[j>>2]=gu(c[(Yu()|0)>>2]|0)|0;m=c[j>>2]|0;i=e;return m|0}function Xf(){var a=0,b=0;a=i;i=i+16|0;b=a;do if(c[17665]|0)if(Gh()|0){c[17665]=0;c[b>>2]=0;break}else{c[b>>2]=c[17665];break}else c[b>>2]=0;while(0);i=a;return c[b>>2]|0}function Yf(a){a=a|0;var b=0,d=0,e=0;b=i;i=i+16|0;d=b+4|0;e=b;c[d>>2]=a;c[e>>2]=0;Wf(c[d>>2]|0,1,e)|0;i=b;return c[e>>2]|0}function Zf(a){a=a|0;var b=0,d=0,e=0;b=i;i=i+16|0;d=b+4|0;e=b;c[e>>2]=a;do if(!(Xf()|0))if(c[17670]|0){c[d>>2]=zb[c[17670]&15](c[e>>2]|0)|0;break}else{c[d>>2]=wh(c[e>>2]|0)|0;break}else c[d>>2]=0;while(0);i=b;return c[d>>2]|0}function _f(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0;d=i;i=i+16|0;e=d+12|0;f=d+8|0;g=d+4|0;h=d;c[f>>2]=a;c[g>>2]=b;b=c[g>>2]|0;if(!(c[f>>2]|0)){c[e>>2]=Vf(b)|0;j=c[e>>2]|0;i=d;return j|0}if(!b){$f(c[f>>2]|0);c[e>>2]=0;j=c[e>>2]|0;i=d;return j|0}if(c[17671]|0)c[h>>2]=Eb[c[17671]&7](c[f>>2]|0,c[g>>2]|0)|0;else c[h>>2]=ah(c[f>>2]|0,c[g>>2]|0)|0;if((c[h>>2]|0)==0?(c[(Yu()|0)>>2]|0)==0:0)ju(12);c[e>>2]=c[h>>2];j=c[e>>2]|0;i=d;return j|0}function $f(a){a=a|0;var b=0,d=0,e=0;b=i;i=i+16|0;d=b+4|0;e=b;c[d>>2]=a;if(!(c[d>>2]|0)){i=b;return}c[e>>2]=c[(Yu()|0)>>2];if(c[17672]|0)xb[c[17672]&15](c[d>>2]|0);else ch(c[d>>2]|0);if(!(c[e>>2]|0)){i=b;return}ju(c[e>>2]|0);i=b;return}function ag(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0;d=i;i=i+32|0;e=d+16|0;f=d+12|0;g=d+8|0;h=d+4|0;j=d;c[f>>2]=a;c[g>>2]=b;c[h>>2]=_(c[f>>2]|0,c[g>>2]|0)|0;if((c[g>>2]|0)!=0?(((c[h>>2]|0)>>>0)/((c[g>>2]|0)>>>0)|0|0)!=(c[f>>2]|0):0){ju(12);c[e>>2]=0;k=c[e>>2]|0;i=d;return k|0}c[j>>2]=Vf(c[h>>2]|0)|0;if(c[j>>2]|0)Fx(c[j>>2]|0,0,c[h>>2]|0)|0;c[e>>2]=c[j>>2];k=c[e>>2]|0;i=d;return k|0}function bg(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0;d=i;i=i+32|0;e=d+16|0;f=d+12|0;g=d+8|0;h=d+4|0;j=d;c[f>>2]=a;c[g>>2]=b;c[h>>2]=_(c[f>>2]|0,c[g>>2]|0)|0;if((c[g>>2]|0)!=0?(((c[h>>2]|0)>>>0)/((c[g>>2]|0)>>>0)|0|0)!=(c[f>>2]|0):0){ju(12);c[e>>2]=0;k=c[e>>2]|0;i=d;return k|0}c[j>>2]=Yf(c[h>>2]|0)|0;if(c[j>>2]|0)Fx(c[j>>2]|0,0,c[h>>2]|0)|0;c[e>>2]=c[j>>2];k=c[e>>2]|0;i=d;return k|0}function cg(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0;b=i;i=i+16|0;d=b+8|0;e=b+4|0;f=b;c[d>>2]=a;c[e>>2]=0;c[f>>2]=0;c[f>>2]=Kv(c[d>>2]|0)|0;a=(Zf(c[d>>2]|0)|0)!=0;g=(c[f>>2]|0)+1|0;if(a)c[e>>2]=Yf(g)|0;else c[e>>2]=Vf(g)|0;if(!(c[e>>2]|0)){h=c[e>>2]|0;i=b;return h|0}Wv(c[e>>2]|0,c[d>>2]|0)|0;h=c[e>>2]|0;i=b;return h|0}function dg(a){a=a|0;var b=0,d=0,e=0,f=0;b=i;i=i+16|0;d=b+4|0;e=b;c[d>>2]=a;while(1){a=Vf(c[d>>2]|0)|0;c[e>>2]=a;if(!((a|0)!=0^1)){f=6;break}a=(Ah()|0)==0;if(!(a&(c[17673]|0)!=0)){f=5;break}if(!(vb[c[17673]&63](c[17674]|0,c[d>>2]|0,0)|0)){f=5;break}}if((f|0)==5)qf(gu(c[(Yu()|0)>>2]|0)|0,0);else if((f|0)==6){i=b;return c[e>>2]|0}return 0}function eg(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0;d=i;i=i+16|0;e=d+8|0;f=d+4|0;g=d;c[e>>2]=a;c[f>>2]=b;while(1){b=_f(c[e>>2]|0,c[f>>2]|0)|0;c[g>>2]=b;if(!((b|0)!=0^1)){h=6;break}b=(Ah()|0)==0;if(!(b&(c[17673]|0)!=0)){h=5;break}b=c[17673]|0;a=c[17674]|0;j=c[f>>2]|0;k=(Zf(c[e>>2]|0)|0)!=0;if(!(vb[b&63](a,j,k?3:2)|0)){h=5;break}}if((h|0)==5)qf(gu(c[(Yu()|0)>>2]|0)|0,0);else if((h|0)==6){i=d;return c[g>>2]|0}return 0}function fg(a){a=a|0;var b=0,d=0,e=0,f=0;b=i;i=i+16|0;d=b+4|0;e=b;c[d>>2]=a;while(1){a=Yf(c[d>>2]|0)|0;c[e>>2]=a;if(!((a|0)!=0^1)){f=6;break}a=(Ah()|0)==0;if(!(a&(c[17673]|0)!=0)){f=5;break}if(!(vb[c[17673]&63](c[17674]|0,c[d>>2]|0,1)|0)){f=5;break}}if((f|0)==5){d=gu(c[(Yu()|0)>>2]|0)|0;qf(d,pf(22555)|0)}else if((f|0)==6){i=b;return c[e>>2]|0}return 0}function gg(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;d=i;i=i+16|0;e=d+12|0;f=d+8|0;g=d+4|0;h=d;c[e>>2]=a;c[f>>2]=b;c[g>>2]=_(c[e>>2]|0,c[f>>2]|0)|0;if((c[f>>2]|0)!=0?(((c[g>>2]|0)>>>0)/((c[f>>2]|0)>>>0)|0|0)!=(c[e>>2]|0):0){ju(12);qf(gu(c[(Yu()|0)>>2]|0)|0,0)}c[h>>2]=dg(c[g>>2]|0)|0;Fx(c[h>>2]|0,0,c[g>>2]|0)|0;i=d;return c[h>>2]|0}function hg(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;d=i;i=i+16|0;e=d+12|0;f=d+8|0;g=d+4|0;h=d;c[e>>2]=a;c[f>>2]=b;c[g>>2]=_(c[e>>2]|0,c[f>>2]|0)|0;if((c[f>>2]|0)!=0?(((c[g>>2]|0)>>>0)/((c[f>>2]|0)>>>0)|0|0)!=(c[e>>2]|0):0){ju(12);qf(gu(c[(Yu()|0)>>2]|0)|0,0)}c[h>>2]=fg(c[g>>2]|0)|0;Fx(c[h>>2]|0,0,c[g>>2]|0)|0;i=d;return c[h>>2]|0}function ig(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,j=0;b=i;i=i+16|0;d=b+12|0;e=b+8|0;f=b+4|0;g=b;c[d>>2]=a;do{a=cg(c[d>>2]|0)|0;c[e>>2]=a;if(!((a|0)!=0^1)){h=8;break}c[f>>2]=Kv(c[d>>2]|0)|0;c[g>>2]=((Zf(c[d>>2]|0)|0)!=0^1^1)&1;a=(Ah()|0)==0;if(!(a&(c[17673]|0)!=0))break}while((vb[c[17673]&63](c[17674]|0,c[f>>2]|0,c[g>>2]|0)|0)!=0);if((h|0)==8){i=b;return c[e>>2]|0}e=gu(c[(Yu()|0)>>2]|0)|0;if(!(c[g>>2]|0)){j=0;qf(e,j)}j=pf(22555)|0;qf(e,j);return 0}function jg(a){a=a|0;var b=0,d=0,e=0;b=i;i=i+16|0;d=b+4|0;e=b;c[e>>2]=a;if(Ah()|0)c[d>>2]=0;else c[d>>2]=c[17666]&c[e>>2];i=b;return c[d>>2]|0}function kg(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=i;i=i+16|0;e=d+4|0;f=d;c[e>>2]=a;c[f>>2]=b;bk(c[e>>2]|0,c[f>>2]|0);An(c[e>>2]|0,c[f>>2]|0);i=d;return}function lg(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;g=i;i=i+48|0;h=g;j=g+32|0;k=g+28|0;l=g+24|0;m=g+20|0;n=g+16|0;o=g+12|0;p=g+8|0;q=g+4|0;c[k>>2]=a;c[l>>2]=b;c[m>>2]=d;c[n>>2]=e;c[o>>2]=f;if(!(c[k>>2]|0)){c[j>>2]=45;r=c[j>>2]|0;i=g;return r|0}c[c[k>>2]>>2]=0;if(!((((c[n>>2]|0)<0|(c[n>>2]|0)>1)^1)&(c[l>>2]|0)!=0)){c[j>>2]=45;r=c[j>>2]|0;i=g;return r|0}if((c[m>>2]|0)!=0|(c[n>>2]|0)!=0){if((c[m>>2]|0)==0&(c[n>>2]|0)!=0)c[m>>2]=Kv(c[l>>2]|0)|0}else{c[m>>2]=mg(c[l>>2]|0,0,0,p)|0;if(!(c[m>>2]|0)){c[j>>2]=c[p>>2];r=c[j>>2]|0;i=g;return r|0}}c[p>>2]=ng(q,0,c[l>>2]|0,c[m>>2]|0,0,0,h)|0;if(c[p>>2]|0){c[j>>2]=c[p>>2];r=c[j>>2]|0;i=g;return r|0}c[c[k>>2]>>2]=c[q>>2];if(c[o>>2]|0)xb[c[o>>2]&15](c[l>>2]|0);c[j>>2]=0;r=c[j>>2]|0;i=g;return r|0}function mg(a,b,e,f){a=a|0;b=b|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;g=i;i=i+48|0;h=g+44|0;j=g+40|0;k=g+36|0;l=g+32|0;m=g+28|0;n=g+24|0;o=g+20|0;p=g+16|0;q=g+4|0;r=g;c[j>>2]=a;c[k>>2]=b;c[l>>2]=e;c[m>>2]=f;c[o>>2]=0;c[p>>2]=0;c[q>>2]=0;c[r>>2]=0;if(!(c[l>>2]|0))c[l>>2]=g+12;if(!(c[m>>2]|0))c[m>>2]=g+8;c[c[m>>2]>>2]=0;c[c[l>>2]>>2]=0;if(!(c[j>>2]|0)){c[h>>2]=0;s=c[h>>2]|0;i=g;return s|0}if((d[c[j>>2]>>0]|0|0)!=40){c[c[m>>2]>>2]=204;c[h>>2]=0;s=c[h>>2]|0;i=g;return s|0}c[n>>2]=c[j>>2];a:while(1){if((c[k>>2]|0)!=0?(c[q>>2]|0)>>>0>=(c[k>>2]|0)>>>0:0){t=12;break}j=d[c[n>>2]>>0]|0;do if(c[p>>2]|0)if((j|0)==58){if((c[k>>2]|0)!=0?((c[q>>2]|0)+(c[p>>2]|0)|0)>>>0>=(c[k>>2]|0)>>>0:0){t=17;break a}c[q>>2]=(c[q>>2]|0)+(c[p>>2]|0);c[n>>2]=(c[n>>2]|0)+(c[p>>2]|0);c[p>>2]=0;break}else{if((d[c[n>>2]>>0]|0|0)<48){t=22;break a}if((d[c[n>>2]>>0]|0|0)>57){t=22;break a}c[p>>2]=((c[p>>2]|0)*10|0)+((d[c[n>>2]>>0]|0)-48);break}else{if((j|0)==40){if(c[o>>2]|0){t=25;break a}c[r>>2]=(c[r>>2]|0)+1;break}if((d[c[n>>2]>>0]|0|0)==41){if(!(c[r>>2]|0)){t=29;break a}if(c[o>>2]|0){t=31;break a}f=(c[r>>2]|0)+-1|0;c[r>>2]=f;if(f)break;else{t=33;break a}}if((d[c[n>>2]>>0]|0|0)==91){if(c[o>>2]|0){t=36;break a}c[o>>2]=c[n>>2];break}if((d[c[n>>2]>>0]|0|0)==93){if(!(c[o>>2]|0)){t=40;break a}c[o>>2]=0;break}if((d[c[n>>2]>>0]|0|0)<48){t=47;break a}if((d[c[n>>2]>>0]|0|0)>57){t=47;break a}if((d[c[n>>2]>>0]|0|0)==48){t=45;break a}c[p>>2]=(d[c[n>>2]>>0]|0)-48}while(0);c[n>>2]=(c[n>>2]|0)+1;c[q>>2]=(c[q>>2]|0)+1}switch(t|0){case 12:{c[c[l>>2]>>2]=c[q>>2];c[c[m>>2]>>2]=202;c[h>>2]=0;s=c[h>>2]|0;i=g;return s|0}case 17:{c[c[l>>2]>>2]=c[q>>2];c[c[m>>2]>>2]=202;c[h>>2]=0;s=c[h>>2]|0;i=g;return s|0}case 22:{c[c[l>>2]>>2]=c[q>>2];c[c[m>>2]>>2]=201;c[h>>2]=0;s=c[h>>2]|0;i=g;return s|0}case 25:{c[c[l>>2]>>2]=c[q>>2];c[c[m>>2]>>2]=209;c[h>>2]=0;s=c[h>>2]|0;i=g;return s|0}case 29:{c[c[l>>2]>>2]=c[q>>2];c[c[m>>2]>>2]=203;c[h>>2]=0;s=c[h>>2]|0;i=g;return s|0}case 31:{c[c[l>>2]>>2]=c[q>>2];c[c[m>>2]>>2]=209;c[h>>2]=0;s=c[h>>2]|0;i=g;return s|0}case 33:{t=(c[q>>2]|0)+1|0;c[q>>2]=t;c[h>>2]=t;s=c[h>>2]|0;i=g;return s|0}case 36:{c[c[l>>2]>>2]=c[q>>2];c[c[m>>2]>>2]=208;c[h>>2]=0;s=c[h>>2]|0;i=g;return s|0}case 40:{c[c[l>>2]>>2]=c[q>>2];c[c[m>>2]>>2]=209;c[h>>2]=0;s=c[h>>2]|0;i=g;return s|0}case 45:{c[c[l>>2]>>2]=c[q>>2];c[c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Sa=0,Ta=0,Ua=0,Va=0;m=i;i=i+400|0;n=m+16|0;o=m+8|0;p=m+292|0;q=m+288|0;r=m+284|0;s=m+280|0;t=m+276|0;u=m+272|0;v=m+268|0;w=m+264|0;x=m+260|0;y=m+256|0;z=m+252|0;A=m+248|0;B=m+244|0;D=m+240|0;E=m+236|0;F=m+232|0;G=m+228|0;H=m+224|0;I=m+220|0;J=m+216|0;K=m+212|0;L=m+196|0;M=m+192|0;N=m+188|0;O=m+184|0;P=m+316|0;Q=m+180|0;R=m+176|0;S=m+172|0;T=m+314|0;U=m+312|0;V=m+168|0;W=m+310|0;X=m+164|0;Y=m+160|0;Z=m+308|0;_=m+156|0;$=m+152|0;aa=m+148|0;ba=m+144|0;ca=m+140|0;da=m+136|0;ea=m+132|0;fa=m+128|0;ga=m+306|0;ha=m+124|0;ia=m+120|0;ja=m+116|0;ka=m+304|0;la=m+112|0;ma=m+108|0;na=m+104|0;oa=m+302|0;pa=m+100|0;qa=m+96|0;ra=m+92|0;sa=m+88|0;ta=m+84|0;ua=m+300|0;va=m+80|0;wa=m+76|0;xa=m+354|0;ya=m+72|0;za=m+298|0;Aa=m+68|0;Ba=m+64|0;Ca=m+319|0;Da=m+60|0;Ea=m+296|0;Fa=m+56|0;Ga=m+52|0;Ha=m+48|0;Ia=m+44|0;Ja=m+40|0;Ka=m+36|0;La=m+32|0;Ma=m+28|0;Na=m+24|0;Oa=m+318|0;Pa=m;Qa=m+20|0;c[q>>2]=e;c[r>>2]=f;c[s>>2]=g;c[t>>2]=h;c[u>>2]=j;c[v>>2]=k;c[w>>2]=l;c[x>>2]=0;c[A>>2]=0;c[B>>2]=0;c[D>>2]=0;c[E>>2]=0;c[F>>2]=0;c[G>>2]=0;c[H>>2]=0;c[I>>2]=0;c[J>>2]=0;c[K>>2]=0;c[M>>2]=0;c[N>>2]=0;if(!(c[q>>2]|0)){c[p>>2]=45;Ra=c[p>>2]|0;i=m;return Ra|0}c[c[q>>2]>>2]=0;if(!(c[s>>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;c[R>>2]=qg(c[B>>2]|0,(c[y>>2]|0)-(c[B>>2]|0)|0,c[L+8>>2]|0)|0;j=L+8|0;c[j>>2]=(c[j>>2]|0)+(c[R>>2]|0);b[U>>1]=c[R>>2];j=c[Q>>2]|0;a[j>>0]=a[U>>0]|0;a[j+1>>0]=a[U+1>>0]|0;c[Q>>2]=(c[Q>>2]|0)+2;c[B>>2]=0;break}switch(k|0){case 92:case 39:case 34:case 114:case 102:case 110:case 118:case 116:case 98:{c[J>>2]=0;break c;break}case 55:case 54:case 53:case 52:case 51:case 50:case 49:case 48:{if((c[z>>2]|0)>>>0<=2){Sa=29;break b}if((a[(c[y>>2]|0)+1>>0]|0)<48){Sa=29;break b}if((a[(c[y>>2]|0)+1>>0]|0)>55){Sa=29;break b}if((a[(c[y>>2]|0)+2>>0]|0)<48){Sa=29;break b}if((a[(c[y>>2]|0)+2>>0]|0)>55){Sa=29;break b}c[y>>2]=(c[y>>2]|0)+2;c[z>>2]=(c[z>>2]|0)-2;c[J>>2]=0;break c;break}case 120:{if((c[z>>2]|0)>>>0<=2){Sa=44;break b}if(!((a[(c[y>>2]|0)+1>>0]|0)>=48?(a[(c[y>>2]|0)+1>>0]|0)<=57:0))Sa=34;do if((Sa|0)==34){Sa=0;if((a[(c[y>>2]|0)+1>>0]|0)>=65?(a[(c[y>>2]|0)+1>>0]|0)<=70:0)break;if((a[(c[y>>2]|0)+1>>0]|0)<97){Sa=44;break b}if((a[(c[y>>2]|0)+1>>0]|0)>102){Sa=44;break b}}while(0);if(!((a[(c[y>>2]|0)+2>>0]|0)>=48?(a[(c[y>>2]|0)+2>>0]|0)<=57:0))Sa=40;do if((Sa|0)==40){Sa=0;if((a[(c[y>>2]|0)+2>>0]|0)>=65?(a[(c[y>>2]|0)+2>>0]|0)<=70:0)break;if((a[(c[y>>2]|0)+2>>0]|0)<97){Sa=44;break b}if((a[(c[y>>2]|0)+2>>0]|0)>102){Sa=44;break b}}while(0);c[y>>2]=(c[y>>2]|0)+2;c[z>>2]=(c[z>>2]|0)-2;c[J>>2]=0;break c;break}case 13:{if((c[z>>2]|0)!=0?(a[(c[y>>2]|0)+1>>0]|0)==10:0){c[y>>2]=(c[y>>2]|0)+1;c[z>>2]=(c[z>>2]|0)+-1}c[J>>2]=0;break c;break}case 10:{if((c[z>>2]|0)!=0?(a[(c[y>>2]|0)+1>>0]|0)==13:0){c[y>>2]=(c[y>>2]|0)+1;c[z>>2]=(c[z>>2]|0)+-1}c[J>>2]=0;break c;break}default:{Sa=54;break b}}}if(c[E>>2]|0){if(sv(a[c[y>>2]>>0]|0)|0){c[I>>2]=(c[I>>2]|0)+1;break}if((a[c[y>>2]>>0]|0)!=35)if(rg(c[y>>2]|0)|0)break;else{Sa=82;break b}if(c[I>>2]&1){Sa=66;break b}c[K>>2]=(c[I>>2]|0)/2|0;c[V>>2]=pg(L,c[K>>2]|0)|0;if(c[V>>2]|0){Sa=68;break b}k=L+8|0;j=c[k>>2]|0;c[k>>2]=j+1;a[j>>0]=1;b[W>>1]=c[K>>2];j=c[L+8>>2]|0;a[j>>0]=a[W>>0]|0;a[j+1>>0]=a[W+1>>0]|0;j=L+8|0;c[j>>2]=(c[j>>2]|0)+2;c[E>>2]=(c[E>>2]|0)+1;while(1){if((c[E>>2]|0)>>>0>=(c[y>>2]|0)>>>0)break;if(!(rg(c[E>>2]|0)|0)){c[X>>2]=sg(d[c[E>>2]>>0]|0)|0;c[E>>2]=(c[E>>2]|0)+1;while(1){if((c[E>>2]|0)>>>0>=(c[y>>2]|0)>>>0)break;if(!(rg(c[E>>2]|0)|0))break;c[E>>2]=(c[E>>2]|0)+1}if((c[E>>2]|0)>>>0<(c[y>>2]|0)>>>0){c[X>>2]=c[X>>2]<<4;j=sg(d[c[E>>2]>>0]|0)|0;c[X>>2]=(c[X>>2]|0)+j}j=c[X>>2]&255;k=L+8|0;l=c[k>>2]|0;c[k>>2]=l+1;a[l>>0]=j}c[E>>2]=(c[E>>2]|0)+1}c[E>>2]=0;break}if(c[F>>2]|0){if((a[c[y>>2]>>0]|0)!=124)break;c[F>>2]=0;break}if(c[A>>2]|0){if((a[c[y>>2]>>0]|0)>=48?(a[c[y>>2]>>0]|0)<=57:0)break;if((a[c[y>>2]>>0]|0)==58){c[K>>2]=gx(c[A>>2]|0)|0;c[A>>2]=0;if((c[K>>2]|0)>>>0>((c[z>>2]|0)-1|0)>>>0){Sa=91;break b}c[Y>>2]=pg(L,c[K>>2]|0)|0;if(c[Y>>2]|0){Sa=93;break b}j=L+8|0;l=c[j>>2]|0;c[j>>2]=l+1;a[l>>0]=1;b[Z>>1]=c[K>>2];l=c[L+8>>2]|0;a[l>>0]=a[Z>>0]|0;a[l+1>>0]=a[Z+1>>0]|0;l=L+8|0;c[l>>2]=(c[l>>2]|0)+2;Dx(c[L+8>>2]|0,(c[y>>2]|0)+1|0,c[K>>2]|0)|0;l=L+8|0;c[l>>2]=(c[l>>2]|0)+(c[K>>2]|0);c[z>>2]=(c[z>>2]|0)-(c[K>>2]|0);c[y>>2]=(c[y>>2]|0)+(c[K>>2]|0);break}if((a[c[y>>2]>>0]|0)==34){c[A>>2]=0;c[B>>2]=c[y>>2];c[J>>2]=0;break}if((a[c[y>>2]>>0]|0)==35){c[A>>2]=0;c[E>>2]=c[y>>2];c[I>>2]=0;break}if((a[c[y>>2]>>0]|0)!=124){Sa=101;break b}c[A>>2]=0;c[F>>2]=c[y>>2];break}l=a[c[y>>2]>>0]|0;if(!(c[H>>2]|0)){if((l|0)==40){if(c[G>>2]|0){Sa=179;break b}c[Ja>>2]=pg(L,0)|0;if(c[Ja>>2]|0){Sa=181;break b}j=L+8|0;k=c[j>>2]|0;c[j>>2]=k+1;a[k>>0]=3;c[N>>2]=(c[N>>2]|0)+1;break}if((a[c[y>>2]>>0]|0)==41){if(c[G>>2]|0){Sa=185;break b}c[Ka>>2]=pg(L,0)|0;if(c[Ka>>2]|0){Sa=187;break b}k=L+8|0;j=c[k>>2]|0;c[k>>2]=j+1;a[j>>0]=4;c[N>>2]=(c[N>>2]|0)+-1;break}j=c[y>>2]|0;if((a[c[y>>2]>>0]|0)==34){c[B>>2]=j;c[J>>2]=0;break}k=c[y>>2]|0;if((a[j>>0]|0)==35){c[E>>2]=k;c[I>>2]=0;break}j=c[y>>2]|0;if((a[k>>0]|0)==124){c[F>>2]=j;break}if((a[j>>0]|0)==91){Ta=c[y>>2]|0;if(c[G>>2]|0){Sa=197;break b}c[G>>2]=Ta;break}if((a[c[y>>2]>>0]|0)==93){if(!(c[G>>2]|0)){Sa=201;break b}c[G>>2]=0;break}do if((a[c[y>>2]>>0]|0)>=48){if((a[c[y>>2]>>0]|0)>57)break;Ua=c[y>>2]|0;if((a[c[y>>2]>>0]|0)==48){Sa=206;break b}c[A>>2]=Ua;break c}while(0);j=(sw(22591,a[c[y>>2]>>0]|0)|0)!=0;k=c[y>>2]|0;if(j){c[D>>2]=k;break}if(rg(k)|0)break;Va=c[y>>2]|0;if((a[c[y>>2]>>0]|0)==123){Sa=212;break b}if(sw(22690,a[Va>>0]|0)|0){Sa=214;break b}if(!(c[u>>2]|0)){Sa=218;break b}if((a[c[y>>2]>>0]|0)!=37){Sa=218;break b}c[H>>2]=c[y>>2];break}do if((l|0)!=109?(a[c[y>>2]>>0]|0)!=77:0){if((a[c[y>>2]>>0]|0)==115){if(c[v>>2]|0){k=c[M>>2]|0;c[M>>2]=k+1;c[la>>2]=c[c[(c[v>>2]|0)+(k<<2)>>2]>>2]}else{k=c[w>>2]|0;j=(c[k>>2]|0)+(4-1)&~(4-1);h=c[j>>2]|0;c[k>>2]=j+4;c[la>>2]=h}c[ma>>2]=Kv(c[la>>2]|0)|0;c[na>>2]=pg(L,c[ma>>2]|0)|0;if(c[na>>2]|0){Sa=135;break b}h=L+8|0;j=c[h>>2]|0;c[h>>2]=j+1;a[j>>0]=1;b[oa>>1]=c[ma>>2];j=c[L+8>>2]|0;a[j>>0]=a[oa>>0]|0;a[j+1>>0]=a[oa+1>>0]|0;j=L+8|0;c[j>>2]=(c[j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|0;a[j>>0]=a[ga>>0]|0;a[j+1>>0]=a[ga+1>>0]|0;j=L+8|0;c[j>>2]=(c[j>>2]|0)+2;Dx(c[L+8>>2]|0,c[ba>>2]|0,c[$>>2]|0)|0;j=L+8|0;c[j>>2]=(c[j>>2]|0)+(c[$>>2]|0);break}if(Hp(c[aa>>2]|0,0,0,$,c[_>>2]|0)|0){Sa=119;break b}c[ha>>2]=pg(L,c[$>>2]|0)|0;if(c[ha>>2]|0){Sa=121;break b}do if(!(Zf(c[L>>2]|0)|0)){if(!(zq(c[_>>2]|0,1)|0))break;c[ia>>2]=Yf(1+(c[L+4>>2]|0)-1|0)|0;if(!(c[ia>>2]|0)){Sa=125;break b}c[ja>>2]=c[ia>>2];Dx(c[ja>>2]|0,c[L>>2]|0,(c[L+8>>2]|0)-(c[L>>2]|0)|0)|0;c[L+8>>2]=(c[ja>>2]|0)+((c[L+8>>2]|0)-(c[L>>2]|0));$f(c[L>>2]|0);c[L>>2]=c[ia>>2]}while(0);j=L+8|0;h=c[j>>2]|0;c[j>>2]=h+1;a[h>>0]=1;b[ka>>1]=c[$>>2];h=c[L+8>>2]|0;a[h>>0]=a[ka>>0]|0;a[h+1>>0]=a[ka+1>>0]|0;h=L+8|0;c[h>>2]=(c[h>>2]|0)+2;if(Hp(c[aa>>2]|0,c[L+8>>2]|0,c[$>>2]|0,$,c[_>>2]|0)|0){Sa=128;break b}h=L+8|0;c[h>>2]=(c[h>>2]|0)+(c[$>>2]|0)}while(0);c[H>>2]=0}while(0);c[y>>2]=(c[y>>2]|0)+1;c[z>>2]=(c[z>>2]|0)+-1}switch(Sa|0){case 18:{c[x>>2]=c[O>>2];c[c[r>>2]>>2]=(c[y>>2]|0)-(c[s>>2]|0);break a;break}case 29:{c[c[r>>2]>>2]=(c[y>>2]|0)-(c[s>>2]|0);c[x>>2]=206;break a;break}case 44:{c[c[r>>2]>>2]=(c[y>>2]|0)-(c[s>>2]|0);c[x>>2]=206;break a;break}case 54:{c[c[r>>2]>>2]=(c[y>>2]|0)-(c[s>>2]|0);c[x>>2]=206;break a;break}case 59:{c[x>>2]=c[S>>2];c[c[r>>2]>>2]=(c[y>>2]|0)-(c[s>>2]|0);break a;break}case 66:{c[c[r>>2]>>2]=(c[y>>2]|0)-(c[s>>2]|0);c[x>>2]=212;break a;break}case 68:{c[x>>2]=c[V>>2];c[c[r>>2]>>2]=(c[y>>2]|0)-(c[s>>2]|0);break a;break}case 82:{c[c[r>>2]>>2]=(c[y>>2]|0)-(c[s>>2]|0);c[x>>2]=211;break a;break}case 91:{c[c[r>>2]>>2]=(c[y>>2]|0)-(c[s>>2]|0);c[x>>2]=202;break a;break}case 93:{c[x>>2]=c[Y>>2];c[c[r>>2]>>2]=(c[y>>2]|0)-(c[s>>2]|0);break a;break}case 101:{c[c[r>>2]>>2]=(c[y>>2]|0)-(c[s>>2]|0);c[x>>2]=201;break a;break}case 111:{c[x>>2]=c[da>>2];c[c[r>>2]>>2]=(c[y>>2]|0)-(c[s>>2]|0);break a;break}case 115:{c[x>>2]=gu(c[(Yu()|0)>>2]|0)|0;break a;break}case 119:{wf(22662,1433,22669);break}case 121:{c[x>>2]=c[ha>>2];c[c[r>>2]>>2]=(c[y>>2]|0)-(c[s>>2]|0);break a;break}case 125:{c[x>>2]=gu(c[(Yu()|0)>>2]|0)|0;break a;break}case 128:{wf(22662,1460,22669);break}case 135:{c[x>>2]=c[na>>2];c[c[r>>2]>>2]=(c[y>>2]|0)-(c[s>>2]|0);break a;break}case 145:{c[x>>2]=c[ra>>2];c[c[r>>2]>>2]=(c[y>>2]|0)-(c[s>>2]|0);break a;break}case 150:{c[x>>2]=gu(c[(Yu()|0)>>2]|0)|0;break a;break}case 158:{c[x>>2]=c[ya>>2];c[c[r>>2]>>2]=(c[y>>2]|0)-(c[s>>2]|0);break a;break}case 165:{c[x>>2]=c[Da>>2];c[c[r>>2]>>2]=(c[y>>2]|0)-(c[s>>2]|0);break a;break}case 173:{c[x>>2]=c[Ia>>2];c[c[r>>2]>>2]=(c[y>>2]|0)-(c[s>>2]|0);break a;break}case 175:{c[c[r>>2]>>2]=(c[y>>2]|0)-(c[s>>2]|0);c[x>>2]=201;break a;break}case 179:{c[c[r>>2]>>2]=(c[y>>2]|0)-(c[s>>2]|0);c[x>>2]=209;break a;break}case 181:{c[x>>2]=c[Ja>>2];c[c[r>>2]>>2]=(c[y>>2]|0)-(c[s>>2]|0);break a;break}case 185:{c[c[r>>2]>>2]=(c[y>>2]|0)-(c[s>>2]|0);c[x>>2]=209;break a;break}case 187:{c[x>>2]=c[Ka>>2];c[c[r>>2]>>2]=(c[y>>2]|0)-(c[s>>2]|0);break a;break}case 197:{c[c[r>>2]>>2]=Ta-(c[s>>2]|0);c[x>>2]=208;break a;break}case 201:{c[c[r>>2]>>2]=(c[y>>2]|0)-(c[s>>2]|0);c[x>>2]=209;break a;break}case 206:{c[c[r>>2]>>2]=Ua-(c[s>>2]|0);c[x>>2]=207;break a;break}case 212:{c[c[r>>2]>>2]=Va-(c[s>>2]|0);c[x>>2]=210;break a;break}case 214:{c[c[r>>2]>>2]=(c[y>>2]|0)-(c[s>>2]|0);c[x>>2]=210;break a;break}case 218:{c[c[r>>2]>>2]=(c[y>>2]|0)-(c[s>>2]|0);c[x>>2]=205;break a;break}case 220:{c[La>>2]=pg(L,0)|0;if(c[La>>2]|0){c[x>>2]=c[La>>2];c[c[r>>2]>>2]=(c[y>>2]|0)-(c[s>>2]|0);break a}h=L+8|0;j=c[h>>2]|0;c[h>>2]=j+1;a[j>>0]=0;if((c[N>>2]|0)==0|(c[x>>2]|0)!=0)break a;c[x>>2]=203;break a;break}}}else{c[x>>2]=gu(c[(Yu()|0)>>2]|0)|0;c[c[r>>2]>>2]=0}while(0);r=c[L>>2]|0;if(c[x>>2]|0){if(r){d:do if(Zf(c[L>>2]|0)|0){c[Ma>>2]=c[L>>2];c[Na>>2]=1+(c[L+4>>2]|0)-1;a[Oa>>0]=0;N=Pa;c[N>>2]=d[Oa>>0];c[N+4>>2]=0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>2]=c[l>>2];c[k>>2]=c[j>>2];c[(c[f>>2]|0)+8>>2]=(c[k>>2]|0)+(c[h>>2]|0);c[c[f>>2]>>2]=c[j>>2];break}c[e>>2]=gu(c[(Yu()|0)>>2]|0)|0;m=c[e>>2]|0;i=d;return m|0}while(0);c[e>>2]=0;m=c[e>>2]|0;i=d;return m|0}function qg(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;g=i;i=i+32|0;h=g+24|0;j=g+20|0;k=g+16|0;l=g+12|0;m=g+8|0;n=g+4|0;o=g;c[h>>2]=b;c[j>>2]=e;c[k>>2]=f;c[l>>2]=0;c[m>>2]=c[h>>2];c[n>>2]=c[k>>2];c[o>>2]=c[j>>2];while(1){if(!(c[o>>2]|0))break;j=d[c[m>>2]>>0]|0;do if(!(c[l>>2]|0))if((j|0)==92){c[l>>2]=1;break}else{h=a[c[m>>2]>>0]|0;f=c[n>>2]|0;c[n>>2]=f+1;a[f>>0]=h;break}else{a:do switch(j|0){case 98:{h=c[n>>2]|0;c[n>>2]=h+1;a[h>>0]=8;break}case 116:{h=c[n>>2]|0;c[n>>2]=h+1;a[h>>0]=9;break}case 118:{h=c[n>>2]|0;c[n>>2]=h+1;a[h>>0]=11;break}case 110:{h=c[n>>2]|0;c[n>>2]=h+1;a[h>>0]=10;break}case 102:{h=c[n>>2]|0;c[n>>2]=h+1;a[h>>0]=12;break}case 114:{h=c[n>>2]|0;c[n>>2]=h+1;a[h>>0]=13;break}case 34:{h=c[n>>2]|0;c[n>>2]=h+1;a[h>>0]=34;break}case 39:{h=c[n>>2]|0;c[n>>2]=h+1;a[h>>0]=39;break}case 92:{h=c[n>>2]|0;c[n>>2]=h+1;a[h>>0]=92;break}case 13:{if((c[o>>2]|0)>>>0>1?(d[(c[m>>2]|0)+1>>0]|0|0)==10:0){c[m>>2]=(c[m>>2]|0)+1;c[o>>2]=(c[o>>2]|0)+-1}break}case 10:{if((c[o>>2]|0)>>>0>1?(d[(c[m>>2]|0)+1>>0]|0|0)==13:0){c[m>>2]=(c[m>>2]|0)+1;c[o>>2]=(c[o>>2]|0)+-1}break}case 120:{if((c[o>>2]|0)>>>0>2){if(!((d[(c[m>>2]|0)+1>>0]|0|0)>=48?(d[(c[m>>2]|0)+1>>0]|0|0)<=57:0))p=23;do if((p|0)==23){p=0;if((d[(c[m>>2]|0)+1>>0]|0|0)>=65?(d[(c[m>>2]|0)+1>>0]|0|0)<=70:0)break;if((d[(c[m>>2]|0)+1>>0]|0|0)<97)break a;if((d[(c[m>>2]|0)+1>>0]|0|0)>102)break a}while(0);if(!((d[(c[m>>2]|0)+2>>0]|0|0)>=48?(d[(c[m>>2]|0)+2>>0]|0|0)<=57:0))p=29;do if((p|0)==29){p=0;if((d[(c[m>>2]|0)+2>>0]|0|0)>=65?(d[(c[m>>2]|0)+2>>0]|0|0)<=70:0)break;if((d[(c[m>>2]|0)+2>>0]|0|0)<97)break a;if((d[(c[m>>2]|0)+2>>0]|0|0)>102)break a}while(0);c[m>>2]=(c[m>>2]|0)+1;c[o>>2]=(c[o>>2]|0)+-1;h=d[c[m>>2]>>0]|0;if((d[c[m>>2]>>0]|0|0)<=57)q=h-48|0;else{f=d[c[m>>2]>>0]|0;q=((h|0)<=70?f-65|0:f-97|0)+10|0}f=d[(c[m>>2]|0)+1>>0]|0;if((d[(c[m>>2]|0)+1>>0]|0|0)<=57)r=f-48|0;else{h=d[(c[m>>2]|0)+1>>0]|0;r=((f|0)<=70?h-65|0:h-97|0)+10|0}h=c[n>>2]|0;c[n>>2]=h+1;a[h>>0]=(q<<4)+r;c[m>>2]=(c[m>>2]|0)+1;c[o>>2]=(c[o>>2]|0)+-1}break}default:if(((((((c[o>>2]|0)>>>0>2?(d[c[m>>2]>>0]|0|0)>=48:0)?(d[c[m>>2]>>0]|0|0)<=55:0)?(d[(c[m>>2]|0)+1>>0]|0|0)>=48:0)?(d[(c[m>>2]|0)+1>>0]|0|0)<=55:0)?(d[(c[m>>2]|0)+2>>0]|0|0)>=48:0)?(d[(c[m>>2]|0)+2>>0]|0|0)<=55:0){h=((d[c[m>>2]>>0]|0)-48<<6)+((d[(c[m>>2]|0)+1>>0]|0)-48<<3)+((d[(c[m>>2]|0)+2>>0]|0)-48)&255;f=c[n>>2]|0;c[n>>2]=f+1;a[f>>0]=h;c[m>>2]=(c[m>>2]|0)+2;c[o>>2]=(c[o>>2]|0)-2}}while(0);c[l>>2]=0}while(0);c[o>>2]=(c[o>>2]|0)+-1;c[m>>2]=(c[m>>2]|0)+1}i=g;return (c[n>>2]|0)-(c[k>>2]|0)|0}function rg(b){b=b|0;var d=0,e=0,f=0;d=i;i=i+16|0;e=d+4|0;f=d;c[f>>2]=b;switch(a[c[f>>2]>>0]|0){case 10:case 13:case 12:case 11:case 9:case 32:{c[e>>2]=1;break}default:c[e>>2]=0}i=d;return c[e>>2]|0}function sg(a){a=a|0;var b=0,d=0,e=0,f=0;b=i;i=i+16|0;d=b+4|0;e=b;c[e>>2]=a;a=c[e>>2]|0;do if(!((c[e>>2]|0)>=48&(c[e>>2]|0)<=57)){f=c[e>>2]|0;if((a|0)>=65&(c[e>>2]|0)<=70){c[d>>2]=10+f-65;break}if((f|0)>=97&(c[e>>2]|0)<=102){c[d>>2]=10+(c[e>>2]|0)-97;break}else{c[d>>2]=0;break}}else c[d>>2]=a-48;while(0);i=b;return c[d>>2]|0}function tg(b,f){b=b|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;g=i;i=i+32|0;h=g+20|0;j=g+16|0;k=g+12|0;l=g+8|0;m=g+24|0;n=g+4|0;o=g;c[j>>2]=b;c[k>>2]=f;c[o>>2]=0;c[c[k>>2]>>2]=0;a:do if(c[j>>2]|0){c[l>>2]=c[j>>2];while(1){f=d[c[l>>2]>>0]|0;c[n>>2]=f;if(!f)break a;c[l>>2]=(c[l>>2]|0)+1;if((c[n>>2]|0)==1){f=c[l>>2]|0;a[m>>0]=a[f>>0]|0;a[m+1>>0]=a[f+1>>0]|0;c[l>>2]=(c[l>>2]|0)+(2+(e[m>>1]|0));continue}if((c[n>>2]|0)!=3){if((c[n>>2]|0)!=4)continue;c[o>>2]=(c[o>>2]|0)+-1;if(c[o>>2]|0)continue;else break}if(!(c[o>>2]|0))c[c[k>>2]>>2]=(c[l>>2]|0)+-1-(c[j>>2]|0);c[o>>2]=(c[o>>2]|0)+1}c[h>>2]=(c[l>>2]|0)-(c[j>>2]|0);p=c[h>>2]|0;i=g;return p|0}while(0);c[h>>2]=0;p=c[h>>2]|0;i=g;return p|0}function ug(a){a=a|0;var b=0,e=0,f=0,g=0;b=i;i=i+16|0;e=b+8|0;f=b+4|0;g=b;c[f>>2]=a;do if(c[f>>2]|0){c[g>>2]=c[f>>2];if(!(d[c[g>>2]>>0]|0)){vg(c[f>>2]|0);c[e>>2]=0;break}if((d[c[g>>2]>>0]|0|0)==3?(d[(c[g>>2]|0)+1>>0]|0|0)==4:0){vg(c[f>>2]|0);c[e>>2]=0;break}c[e>>2]=c[f>>2]}else c[e>>2]=0;while(0);i=b;return c[e>>2]|0}function vg(b){b=b|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;f=i;i=i+48|0;g=f+28|0;h=f+24|0;j=f+20|0;k=f+32|0;l=f+16|0;m=f+12|0;n=f+34|0;o=f;p=f+8|0;c[g>>2]=b;if(!(c[g>>2]|0)){i=f;return}a:do if(Zf(c[g>>2]|0)|0){c[h>>2]=c[g>>2];while(1){b=d[c[h>>2]>>0]|0;c[j>>2]=b;if(!b)break;c[h>>2]=(c[h>>2]|0)+1;if((c[j>>2]|0)!=1)continue;b=c[h>>2]|0;a[k>>0]=a[b>>0]|0;a[k+1>>0]=a[b+1>>0]|0;c[h>>2]=(c[h>>2]|0)+2;c[h>>2]=(c[h>>2]|0)+(e[k>>1]|0)}c[l>>2]=c[g>>2];c[m>>2]=(c[h>>2]|0)-(c[g>>2]|0);a[n>>0]=0;b=o;c[b>>2]=d[n>>0];c[b+4>>2]=0;while(1){if(!((c[l>>2]&7|0)!=0?(c[m>>2]|0)!=0:0))break;a[c[l>>2]>>0]=a[n>>0]|0;c[l>>2]=(c[l>>2]|0)+1;c[m>>2]=(c[m>>2]|0)+-1}if((c[m>>2]|0)>>>0>=8){b=o;q=Mx(c[b>>2]|0,c[b+4>>2]|0,16843009,16843009)|0;b=o;c[b>>2]=q;c[b+4>>2]=C;do{c[p>>2]=c[l>>2];b=o;q=c[b+4>>2]|0;r=c[p>>2]|0;c[r>>2]=c[b>>2];c[r+4>>2]=q;c[m>>2]=(c[m>>2]|0)-8;c[l>>2]=(c[l>>2]|0)+8}while((c[m>>2]|0)>>>0>=8)}while(1){if(!(c[m>>2]|0))break a;a[c[l>>2]>>0]=a[n>>0]|0;c[l>>2]=(c[l>>2]|0)+1;c[m>>2]=(c[m>>2]|0)+-1}}while(0);$f(c[g>>2]|0);i=f;return}function wg(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0;f=i;i=i+16|0;g=f+12|0;h=f+8|0;j=f+4|0;k=f;c[g>>2]=a;c[h>>2]=b;c[j>>2]=d;c[k>>2]=e;e=lg(c[g>>2]|0,c[h>>2]|0,c[j>>2]|0,c[k>>2]|0,0)|0;i=f;return e|0}function xg(f,g,h){f=f|0;g=g|0;h=h|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0;j=i;i=i+48|0;k=j+32|0;l=j+28|0;m=j+24|0;n=j+20|0;o=j+16|0;p=j+36|0;q=j+12|0;r=j+8|0;s=j+4|0;t=j;c[l>>2]=f;c[m>>2]=g;c[n>>2]=h;if(!(c[l>>2]|0)){c[k>>2]=0;u=c[k>>2]|0;i=j;return u|0}if(!(c[n>>2]|0))c[n>>2]=Kv(c[m>>2]|0)|0;c[o>>2]=c[l>>2];while(1){if(!(d[c[o>>2]>>0]|0)){v=29;break}if((d[c[o>>2]>>0]|0|0)==3?(d[(c[o>>2]|0)+1>>0]|0|0)==1:0){c[q>>2]=c[o>>2];c[o>>2]=(c[o>>2]|0)+2;l=c[o>>2]|0;a[p>>0]=a[l>>0]|0;a[p+1>>0]=a[l+1>>0]|0;c[o>>2]=(c[o>>2]|0)+2;if((e[p>>1]|0|0)==(c[n>>2]|0)?(mw(c[o>>2]|0,c[m>>2]|0,c[n>>2]|0)|0)==0:0)break;c[o>>2]=(c[o>>2]|0)+(e[p>>1]|0);continue}if((d[c[o>>2]>>0]|0|0)==1){l=(c[o>>2]|0)+1|0;c[o>>2]=l;a[p>>0]=a[l>>0]|0;a[p+1>>0]=a[l+1>>0]|0;c[o>>2]=(c[o>>2]|0)+2;c[o>>2]=(c[o>>2]|0)+(e[p>>1]|0);continue}else{c[o>>2]=(c[o>>2]|0)+1;continue}}if((v|0)==29){c[k>>2]=0;u=c[k>>2]|0;i=j;return u|0}c[t>>2]=1;c[o>>2]=(c[o>>2]|0)+(e[p>>1]|0);a:while(1){w=c[o>>2]|0;if(!(c[t>>2]|0))break;do if((d[w>>0]|0|0)!=1){if((d[c[o>>2]>>0]|0|0)==3){c[t>>2]=(c[t>>2]|0)+1;break}if((d[c[o>>2]>>0]|0|0)!=4)if(!(d[c[o>>2]>>0]|0)){v=20;break a}else break;else{c[t>>2]=(c[t>>2]|0)+-1;break}}else{n=(c[o>>2]|0)+1|0;c[o>>2]=n;a[p>>0]=a[n>>0]|0;a[p+1>>0]=a[n+1>>0]|0;c[o>>2]=(c[o>>2]|0)+(2+(e[p>>1]|0));c[o>>2]=(c[o>>2]|0)+-1}while(0);c[o>>2]=(c[o>>2]|0)+1}if((v|0)==20)wf(22662,481,22693);b[p>>1]=w-(c[q>>2]|0);c[r>>2]=Vf(1+(e[p>>1]|0)|0)|0;if(c[r>>2]|0){c[s>>2]=c[r>>2];Dx(c[s>>2]|0,c[q>>2]|0,e[p>>1]|0|0)|0;c[s>>2]=(c[s>>2]|0)+(e[p>>1]|0);p=c[s>>2]|0;c[s>>2]=p+1;a[p>>0]=0;c[k>>2]=ug(c[r>>2]|0)|0;u=c[k>>2]|0;i=j;return u|0}else{c[k>>2]=0;u=c[k>>2]|0;i=j;return u|0}return 0}function yg(b){b=b|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0;f=i;i=i+32|0;g=f+20|0;h=f+16|0;j=f+12|0;k=f+24|0;l=f+8|0;m=f+4|0;n=f;c[h>>2]=b;c[m>>2]=0;c[n>>2]=0;if(!(c[h>>2]|0)){c[g>>2]=0;o=c[g>>2]|0;i=f;return o|0}c[j>>2]=c[h>>2];while(1){h=d[c[j>>2]>>0]|0;c[l>>2]=h;if(!h)break;c[j>>2]=(c[j>>2]|0)+1;if((c[l>>2]|0)==1){h=c[j>>2]|0;a[k>>0]=a[h>>0]|0;a[k+1>>0]=a[h+1>>0]|0;c[j>>2]=(c[j>>2]|0)+(2+(e[k>>1]|0));if((c[n>>2]|0)!=1)continue;c[m>>2]=(c[m>>2]|0)+1;continue}if((c[l>>2]|0)!=3){if((c[l>>2]|0)!=4)continue;c[n>>2]=(c[n>>2]|0)+-1;continue}if((c[n>>2]|0)==1)c[m>>2]=(c[m>>2]|0)+1;c[n>>2]=(c[n>>2]|0)+1}c[g>>2]=c[m>>2];o=c[g>>2]|0;i=f;return o|0}function zg(f,g){f=f|0;g=g|0;var h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;h=i;i=i+48|0;j=h+28|0;k=h+24|0;l=h+20|0;m=h+16|0;n=h+32|0;o=h+12|0;p=h+8|0;q=h+4|0;r=h;c[k>>2]=f;c[l>>2]=g;c[q>>2]=0;if((c[k>>2]|0)!=0?(d[c[k>>2]>>0]|0|0)==3:0){c[m>>2]=c[k>>2];while(1){k=(c[l>>2]|0)>0;c[m>>2]=(c[m>>2]|0)+1;s=(d[c[m>>2]>>0]|0|0)==1;if(!k)break;if(s){k=(c[m>>2]|0)+1|0;c[m>>2]=k;a[n>>0]=a[k>>0]|0;a[n+1>>0]=a[k+1>>0]|0;c[m>>2]=(c[m>>2]|0)+(2+(e[n>>1]|0));c[m>>2]=(c[m>>2]|0)+-1;if(c[q>>2]|0)continue;c[l>>2]=(c[l>>2]|0)+-1;continue}if((d[c[m>>2]>>0]|0|0)==3){c[q>>2]=(c[q>>2]|0)+1;continue}if((d[c[m>>2]>>0]|0|0)!=4)if(!(d[c[m>>2]>>0]|0)){t=15;break}else continue;c[q>>2]=(c[q>>2]|0)+-1;if(c[q>>2]|0)continue;c[l>>2]=(c[l>>2]|0)+-1}if((t|0)==15){c[j>>2]=0;u=c[j>>2]|0;i=h;return u|0}do if(s){l=(c[m>>2]|0)+1|0;a[n>>0]=a[l>>0]|0;a[n+1>>0]=a[l+1>>0]|0;c[o>>2]=Vf(5+(e[n>>1]|0)+1|0)|0;if(c[o>>2]|0){c[p>>2]=c[o>>2];l=c[p>>2]|0;c[p>>2]=l+1;a[l>>0]=3;Dx(c[p>>2]|0,c[m>>2]|0,3+(e[n>>1]|0)|0)|0;c[p>>2]=(c[p>>2]|0)+(3+(e[n>>1]|0));l=c[p>>2]|0;c[p>>2]=l+1;a[l>>0]=4;a[c[p>>2]>>0]=0;break}c[j>>2]=0;u=c[j>>2]|0;i=h;return u|0}else{if((d[c[m>>2]>>0]|0|0)!=3){c[o>>2]=0;break}c[r>>2]=c[m>>2];c[q>>2]=1;a:do{c[m>>2]=(c[m>>2]|0)+1;do if((d[c[m>>2]>>0]|0|0)!=1){if((d[c[m>>2]>>0]|0|0)==3){c[q>>2]=(c[q>>2]|0)+1;break}if((d[c[m>>2]>>0]|0|0)!=4)if(!(d[c[m>>2]>>0]|0)){t=29;break a}else break;else{c[q>>2]=(c[q>>2]|0)+-1;break}}else{l=(c[m>>2]|0)+1|0;c[m>>2]=l;a[n>>0]=a[l>>0]|0;a[n+1>>0]=a[l+1>>0]|0;c[m>>2]=(c[m>>2]|0)+(2+(e[n>>1]|0));c[m>>2]=(c[m>>2]|0)+-1}while(0)}while((c[q>>2]|0)!=0);if((t|0)==29)wf(22662,673,22715);b[n>>1]=(c[m>>2]|0)+1-(c[r>>2]|0);c[o>>2]=Vf(1+(e[n>>1]|0)|0)|0;if(c[o>>2]|0){c[p>>2]=c[o>>2];Dx(c[p>>2]|0,c[r>>2]|0,e[n>>1]|0|0)|0;c[p>>2]=(c[p>>2]|0)+(e[n>>1]|0);l=c[p>>2]|0;c[p>>2]=l+1;a[l>>0]=0;break}c[j>>2]=0;u=c[j>>2]|0;i=h;return u|0}while(0);c[j>>2]=ug(c[o>>2]|0)|0;u=c[j>>2]|0;i=h;return u|0}c[j>>2]=0;u=c[j>>2]|0;i=h;return u|0}function Ag(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;a=zg(c[d>>2]|0,0)|0;i=b;return a|0}function Bg(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=i;i=i+16|0;f=e+8|0;g=e+4|0;h=e;c[f>>2]=a;c[g>>2]=b;c[h>>2]=d;d=Cg(c[f>>2]|0,c[g>>2]|0,c[h>>2]|0)|0;i=e;return d|0}function Cg(b,f,g){b=b|0;f=f|0;g=g|0;var h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;h=i;i=i+32|0;j=h+20|0;k=h+16|0;l=h+12|0;m=h+8|0;n=h+4|0;o=h+24|0;p=h;c[k>>2]=b;c[l>>2]=f;c[m>>2]=g;c[p>>2]=0;c[c[m>>2]>>2]=0;if(!(c[k>>2]|0)){c[j>>2]=0;q=c[j>>2]|0;i=h;return q|0}c[n>>2]=c[k>>2];if((d[c[n>>2]>>0]|0|0)!=3){if(c[l>>2]|0){c[j>>2]=0;q=c[j>>2]|0;i=h;return q|0}}else c[n>>2]=(c[n>>2]|0)+1;a:while(1){r=(d[c[n>>2]>>0]|0|0)==1;if((c[l>>2]|0)<=0)break;do if(r){k=(c[n>>2]|0)+1|0;c[n>>2]=k;a[o>>0]=a[k>>0]|0;a[o+1>>0]=a[k+1>>0]|0;c[n>>2]=(c[n>>2]|0)+(2+(e[o>>1]|0));c[n>>2]=(c[n>>2]|0)+-1;if(!(c[p>>2]|0))c[l>>2]=(c[l>>2]|0)+-1}else{if((d[c[n>>2]>>0]|0|0)==3){c[p>>2]=(c[p>>2]|0)+1;break}if((d[c[n>>2]>>0]|0|0)!=4)if(!(d[c[n>>2]>>0]|0)){s=17;break a}else break;c[p>>2]=(c[p>>2]|0)+-1;if(!(c[p>>2]|0))c[l>>2]=(c[l>>2]|0)+-1}while(0);c[n>>2]=(c[n>>2]|0)+1}if((s|0)==17){c[j>>2]=0;q=c[j>>2]|0;i=h;return q|0}if(r){r=(c[n>>2]|0)+1|0;c[n>>2]=r;a[o>>0]=a[r>>0]|0;a[o+1>>0]=a[r+1>>0]|0;c[c[m>>2]>>2]=e[o>>1];c[j>>2]=(c[n>>2]|0)+2;q=c[j>>2]|0;i=h;return q|0}else{c[j>>2]=0;q=c[j>>2]|0;i=h;return q|0}return 0}function Dg(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0;e=i;i=i+32|0;f=e+24|0;g=e+20|0;h=e+16|0;j=e+12|0;k=e+8|0;l=e+4|0;m=e;c[g>>2]=a;c[h>>2]=b;c[j>>2]=d;c[c[j>>2]>>2]=0;c[k>>2]=Cg(c[g>>2]|0,c[h>>2]|0,l)|0;if(!((c[k>>2]|0)!=0&(c[l>>2]|0)!=0)){c[f>>2]=0;n=c[f>>2]|0;i=e;return n|0}c[m>>2]=Vf(c[l>>2]|0)|0;if(c[m>>2]|0){Dx(c[m>>2]|0,c[k>>2]|0,c[l>>2]|0)|0;c[c[j>>2]>>2]=c[l>>2];c[f>>2]=c[m>>2];n=c[f>>2]|0;i=e;return n|0}else{c[f>>2]=0;n=c[f>>2]|0;i=e;return n|0}return 0}function Eg(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0;e=i;i=i+32|0;f=e+20|0;g=e+16|0;h=e+12|0;j=e+8|0;k=e+4|0;l=e;c[g>>2]=b;c[h>>2]=d;c[j>>2]=Cg(c[g>>2]|0,c[h>>2]|0,k)|0;if(!((c[j>>2]|0)==0|(c[k>>2]|0)>>>0<1)?((c[k>>2]|0)+1|0)>>>0>=1:0){c[l>>2]=Vf((c[k>>2]|0)+1|0)|0;if(c[l>>2]|0){Dx(c[l>>2]|0,c[j>>2]|0,c[k>>2]|0)|0;a[(c[l>>2]|0)+(c[k>>2]|0)>>0]=0;c[f>>2]=c[l>>2];m=c[f>>2]|0;i=e;return m|0}else{c[f>>2]=0;m=c[f>>2]|0;i=e;return m|0}}c[f>>2]=0;m=c[f>>2]|0;i=e;return m|0}
+function Fg(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;e=i;i=i+32|0;f=e+28|0;g=e+24|0;h=e+20|0;j=e+16|0;k=e+12|0;l=e+8|0;m=e+4|0;n=e;c[g>>2]=a;c[h>>2]=b;c[j>>2]=d;do if((c[j>>2]|0)==8){c[m>>2]=Dg(c[g>>2]|0,c[h>>2]|0,k)|0;if(!(c[m>>2]|0)){c[f>>2]=0;o=c[f>>2]|0;i=e;return o|0}if(Zf(c[g>>2]|0)|0)p=wq(0)|0;else p=vq(0)|0;c[l>>2]=p;if(c[l>>2]|0){iq(c[l>>2]|0,c[m>>2]|0,c[k>>2]<<3)|0;break}else{$f(c[m>>2]|0);break}}else{if(!(c[j>>2]|0))c[j>>2]=1;c[n>>2]=Cg(c[g>>2]|0,c[h>>2]|0,k)|0;if(!(c[n>>2]|0)){c[f>>2]=0;o=c[f>>2]|0;i=e;return o|0}if(Dp(l,c[j>>2]|0,c[n>>2]|0,c[k>>2]|0,0)|0){c[f>>2]=0;o=c[f>>2]|0;i=e;return o|0}}while(0);c[f>>2]=c[l>>2];o=c[f>>2]|0;i=e;return o|0}function Gg(f){f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;g=i;i=i+48|0;h=g+28|0;j=g+24|0;k=g+20|0;l=g+16|0;m=g+32|0;n=g+12|0;o=g+8|0;p=g+4|0;q=g;c[j>>2]=f;c[p>>2]=0;c[q>>2]=1;if((c[j>>2]|0)!=0?(d[c[j>>2]>>0]|0|0)==3:0){c[k>>2]=c[j>>2];while(1){j=(c[q>>2]|0)>0;c[k>>2]=(c[k>>2]|0)+1;r=c[k>>2]|0;if(!j)break;if((d[r>>0]|0|0)==1){j=(c[k>>2]|0)+1|0;c[k>>2]=j;a[m>>0]=a[j>>0]|0;a[m+1>>0]=a[j+1>>0]|0;c[k>>2]=(c[k>>2]|0)+(2+(e[m>>1]|0));c[k>>2]=(c[k>>2]|0)+-1;if(c[p>>2]|0)continue;c[q>>2]=(c[q>>2]|0)+-1;continue}if((d[c[k>>2]>>0]|0|0)==3){c[p>>2]=(c[p>>2]|0)+1;continue}if((d[c[k>>2]>>0]|0|0)!=4)if(!(d[c[k>>2]>>0]|0)){s=15;break}else continue;c[p>>2]=(c[p>>2]|0)+-1;if(c[p>>2]|0)continue;c[q>>2]=(c[q>>2]|0)+-1}if((s|0)==15){c[h>>2]=0;t=c[h>>2]|0;i=g;return t|0}c[l>>2]=r;c[p>>2]=0;a:do{do if((d[c[k>>2]>>0]|0|0)!=1){if((d[c[k>>2]>>0]|0|0)==3){c[p>>2]=(c[p>>2]|0)+1;break}if((d[c[k>>2]>>0]|0|0)!=4)if(!(d[c[k>>2]>>0]|0)){s=24;break a}else break;else{c[p>>2]=(c[p>>2]|0)+-1;break}}else{r=(c[k>>2]|0)+1|0;c[k>>2]=r;a[m>>0]=a[r>>0]|0;a[m+1>>0]=a[r+1>>0]|0;c[k>>2]=(c[k>>2]|0)+(2+(e[m>>1]|0));c[k>>2]=(c[k>>2]|0)+-1}while(0);c[k>>2]=(c[k>>2]|0)+1}while((c[p>>2]|0)!=0);if((s|0)==24){c[h>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function Kg(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0;f=i;i=i+32|0;g=f+16|0;h=f+12|0;j=f+8|0;k=f+4|0;c[g>>2]=a;c[h>>2]=b;c[j>>2]=d;c[k>>2]=e;e=ng(c[g>>2]|0,c[h>>2]|0,c[j>>2]|0,c[k>>2]|0,0,0,f)|0;i=f;return e|0}function Lg(b,f,g,h){b=b|0;f=f|0;g=g|0;h=h|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0;j=i;i=i+80|0;k=j;l=j+48|0;m=j+44|0;n=j+40|0;o=j+36|0;p=j+32|0;q=j+28|0;r=j+24|0;s=j+52|0;t=j+56|0;u=j+20|0;v=j+16|0;w=j+12|0;x=j+8|0;y=j+4|0;c[m>>2]=b;c[n>>2]=f;c[o>>2]=g;c[p>>2]=h;c[u>>2]=0;c[w>>2]=0;c[q>>2]=(c[m>>2]|0)!=0?c[m>>2]|0:22730;c[r>>2]=c[o>>2];a:while(1){if(!(d[c[q>>2]>>0]|0)){z=55;break}switch(d[c[q>>2]>>0]|0|0){case 3:{c[q>>2]=(c[q>>2]|0)+1;if((c[n>>2]|0)!=1){if(c[w>>2]|0)c[u>>2]=(c[u>>2]|0)+1;c[u>>2]=(c[u>>2]|0)+(c[w>>2]|0)}c[u>>2]=(c[u>>2]|0)+1;if(c[o>>2]|0){if((c[u>>2]|0)>>>0>=(c[p>>2]|0)>>>0){z=10;break a}b:do if((c[n>>2]|0)!=1){if(c[w>>2]|0){m=c[r>>2]|0;c[r>>2]=m+1;a[m>>0]=10}c[v>>2]=0;while(1){if((c[v>>2]|0)>=(c[w>>2]|0))break b;m=c[r>>2]|0;c[r>>2]=m+1;a[m>>0]=32;c[v>>2]=(c[v>>2]|0)+1}}while(0);m=c[r>>2]|0;c[r>>2]=m+1;a[m>>0]=40}c[w>>2]=(c[w>>2]|0)+1;continue a;break}case 4:{c[q>>2]=(c[q>>2]|0)+1;c[u>>2]=(c[u>>2]|0)+1;if(c[o>>2]|0){if((c[u>>2]|0)>>>0>=(c[p>>2]|0)>>>0){z=21;break a}m=c[r>>2]|0;c[r>>2]=m+1;a[m>>0]=41}c[w>>2]=(c[w>>2]|0)+-1;if((d[c[q>>2]>>0]|0|0)==3)continue a;if(!((c[n>>2]|0)!=1?(d[c[q>>2]>>0]|0|0)!=0:0))continue a;c[u>>2]=(c[u>>2]|0)+1;c[u>>2]=(c[u>>2]|0)+(c[w>>2]|0);if(!(c[o>>2]|0))continue a;if((c[u>>2]|0)>>>0>=(c[p>>2]|0)>>>0){z=27;break a}m=c[r>>2]|0;c[r>>2]=m+1;a[m>>0]=10;c[v>>2]=0;while(1){if((c[v>>2]|0)>=(c[w>>2]|0))continue a;m=c[r>>2]|0;c[r>>2]=m+1;a[m>>0]=32;c[v>>2]=(c[v>>2]|0)+1}break}case 1:{c[q>>2]=(c[q>>2]|0)+1;m=c[q>>2]|0;a[s>>0]=a[m>>0]|0;a[s+1>>0]=a[m+1>>0]|0;c[q>>2]=(c[q>>2]|0)+2;if((c[n>>2]|0)==3){m=Mg(c[q>>2]|0,e[s>>1]|0)|0;c[x>>2]=m;switch(m|0){case 1:{c[y>>2]=Ng(c[q>>2]|0,e[s>>1]|0,0)|0;break}case 2:{c[y>>2]=Og(c[q>>2]|0,e[s>>1]|0,0)|0;break}default:c[y>>2]=Pg(c[q>>2]|0,e[s>>1]|0,0)|0}c[u>>2]=(c[u>>2]|0)+(c[y>>2]|0);if(c[o>>2]|0){if((c[u>>2]|0)>>>0>=(c[p>>2]|0)>>>0){z=38;break a}switch(c[x>>2]|0){case 1:{Ng(c[q>>2]|0,e[s>>1]|0,c[r>>2]|0)|0;break}case 2:{Og(c[q>>2]|0,e[s>>1]|0,c[r>>2]|0)|0;break}default:Pg(c[q>>2]|0,e[s>>1]|0,c[r>>2]|0)|0}c[r>>2]=(c[r>>2]|0)+(c[y>>2]|0)}if((d[(c[q>>2]|0)+(e[s>>1]|0)>>0]|0|0)!=4?(c[u>>2]=(c[u>>2]|0)+1,(c[o>>2]|0)!=0):0){if((c[u>>2]|0)>>>0>=(c[p>>2]|0)>>>0){z=47;break a}m=c[r>>2]|0;c[r>>2]=m+1;a[m>>0]=32}}else{c[k>>2]=e[s>>1];ew(t,22757,k)|0;m=Kv(t)|0;c[u>>2]=(c[u>>2]|0)+(m+(e[s>>1]|0));if(c[o>>2]|0){if((c[u>>2]|0)>>>0>=(c[p>>2]|0)>>>0){z=51;break a}c[r>>2]=Xv(c[r>>2]|0,t)|0;Dx(c[r>>2]|0,c[q>>2]|0,e[s>>1]|0|0)|0;c[r>>2]=(c[r>>2]|0)+(e[s>>1]|0)}}c[q>>2]=(c[q>>2]|0)+(e[s>>1]|0);continue a;break}default:{z=54;break a}}}if((z|0)==10){c[l>>2]=0;A=c[l>>2]|0;i=j;return A|0}else if((z|0)==21){c[l>>2]=0;A=c[l>>2]|0;i=j;return A|0}else if((z|0)==27){c[l>>2]=0;A=c[l>>2]|0;i=j;return A|0}else if((z|0)==38){c[l>>2]=0;A=c[l>>2]|0;i=j;return A|0}else if((z|0)==47){c[l>>2]=0;A=c[l>>2]|0;i=j;return A|0}else if((z|0)==51){c[l>>2]=0;A=c[l>>2]|0;i=j;return A|0}else if((z|0)==54)wf(22662,2008,22761);else if((z|0)==55){do if((c[n>>2]|0)!=1?(c[u>>2]=(c[u>>2]|0)+1,(c[o>>2]|0)!=0):0){if((c[u>>2]|0)>>>0<(c[p>>2]|0)>>>0){z=c[r>>2]|0;c[r>>2]=z+1;a[z>>0]=10;break}c[l>>2]=0;A=c[l>>2]|0;i=j;return A|0}while(0);n=c[u>>2]|0;do if(c[o>>2]|0){if(n>>>0<(c[p>>2]|0)>>>0){z=c[r>>2]|0;c[r>>2]=z+1;a[z>>0]=0;break}c[l>>2]=0;A=c[l>>2]|0;i=j;return A|0}else c[u>>2]=n+1;while(0);c[l>>2]=c[u>>2];A=c[l>>2]|0;i=j;return A|0}return 0}function Mg(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0;f=i;i=i+32|0;g=f+16|0;h=f+12|0;j=f+8|0;k=f+4|0;l=f;c[h>>2]=b;c[j>>2]=e;c[l>>2]=1;if(!(c[j>>2]|0)){c[g>>2]=1;m=c[g>>2]|0;i=f;return m|0}if(d[c[h>>2]>>0]&128){c[g>>2]=0;m=c[g>>2]|0;i=f;return m|0}if(!(a[c[h>>2]>>0]|0)){c[g>>2]=0;m=c[g>>2]|0;i=f;return m|0}c[k>>2]=c[h>>2];while(1){if(!(c[j>>2]|0))break;if((d[c[k>>2]>>0]|0)>=32){if((d[c[k>>2]>>0]|0)>=127?(d[c[k>>2]>>0]|0)<=160:0)n=12}else n=12;if((n|0)==12?(n=0,(sw(22733,d[c[k>>2]>>0]|0)|0)==0):0){n=13;break}do if(c[l>>2]|0){if((d[c[k>>2]>>0]|0)>=65?(d[c[k>>2]>>0]|0)<=90:0)break;if((d[c[k>>2]>>0]|0)>=97?(d[c[k>>2]>>0]|0)<=122:0)break;if((d[c[k>>2]>>0]|0)>=48?(d[c[k>>2]>>0]|0)<=57:0)break;if(!(sw(22743,d[c[k>>2]>>0]|0)|0))c[l>>2]=0}while(0);c[k>>2]=(c[k>>2]|0)+1;c[j>>2]=(c[j>>2]|0)+-1}if((n|0)==13){c[g>>2]=0;m=c[g>>2]|0;i=f;return m|0}c[k>>2]=c[h>>2];do if(c[l>>2]|0){if((d[c[k>>2]>>0]|0)>=48?(d[c[k>>2]>>0]|0)<=57:0)break;c[g>>2]=2;m=c[g>>2]|0;i=f;return m|0}while(0);c[g>>2]=1;m=c[g>>2]|0;i=f;return m|0}function Ng(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;g=i;i=i+32|0;h=g;j=g+24|0;k=g+20|0;l=g+16|0;m=g+12|0;n=g+8|0;o=g+4|0;c[k>>2]=b;c[l>>2]=e;c[m>>2]=f;if(!(c[m>>2]|0)){c[o>>2]=2;while(1){if(!(c[l>>2]|0))break;a:do switch(d[c[k>>2]>>0]|0|0){case 92:case 39:case 34:case 13:case 12:case 10:case 11:case 9:case 8:{c[o>>2]=(c[o>>2]|0)+2;break}default:{do if((d[c[k>>2]>>0]|0|0)>=32){if((d[c[k>>2]>>0]|0|0)>=127?(d[c[k>>2]>>0]|0|0)<=160:0)break;c[o>>2]=(c[o>>2]|0)+1;break a}while(0);c[o>>2]=(c[o>>2]|0)+4}}while(0);c[l>>2]=(c[l>>2]|0)+-1;c[k>>2]=(c[k>>2]|0)+1}c[j>>2]=c[o>>2];p=c[j>>2]|0;i=g;return p|0}c[n>>2]=c[m>>2];o=c[n>>2]|0;c[n>>2]=o+1;a[o>>0]=34;while(1){if(!(c[l>>2]|0))break;b:do switch(d[c[k>>2]>>0]|0|0){case 8:{o=c[n>>2]|0;c[n>>2]=o+1;a[o>>0]=92;o=c[n>>2]|0;c[n>>2]=o+1;a[o>>0]=98;break}case 9:{o=c[n>>2]|0;c[n>>2]=o+1;a[o>>0]=92;o=c[n>>2]|0;c[n>>2]=o+1;a[o>>0]=116;break}case 11:{o=c[n>>2]|0;c[n>>2]=o+1;a[o>>0]=92;o=c[n>>2]|0;c[n>>2]=o+1;a[o>>0]=118;break}case 10:{o=c[n>>2]|0;c[n>>2]=o+1;a[o>>0]=92;o=c[n>>2]|0;c[n>>2]=o+1;a[o>>0]=110;break}case 12:{o=c[n>>2]|0;c[n>>2]=o+1;a[o>>0]=92;o=c[n>>2]|0;c[n>>2]=o+1;a[o>>0]=102;break}case 13:{o=c[n>>2]|0;c[n>>2]=o+1;a[o>>0]=92;o=c[n>>2]|0;c[n>>2]=o+1;a[o>>0]=114;break}case 34:{o=c[n>>2]|0;c[n>>2]=o+1;a[o>>0]=92;o=c[n>>2]|0;c[n>>2]=o+1;a[o>>0]=34;break}case 39:{o=c[n>>2]|0;c[n>>2]=o+1;a[o>>0]=92;o=c[n>>2]|0;c[n>>2]=o+1;a[o>>0]=39;break}case 92:{o=c[n>>2]|0;c[n>>2]=o+1;a[o>>0]=92;o=c[n>>2]|0;c[n>>2]=o+1;a[o>>0]=92;break}default:{do if((d[c[k>>2]>>0]|0|0)>=32){if((d[c[k>>2]>>0]|0|0)>=127?(d[c[k>>2]>>0]|0|0)<=160:0)break;o=a[c[k>>2]>>0]|0;f=c[n>>2]|0;c[n>>2]=f+1;a[f>>0]=o;break b}while(0);o=c[n>>2]|0;c[h>>2]=d[c[k>>2]>>0];ew(o,22584,h)|0;c[n>>2]=(c[n>>2]|0)+4}}while(0);c[l>>2]=(c[l>>2]|0)+-1;c[k>>2]=(c[k>>2]|0)+1}k=c[n>>2]|0;c[n>>2]=k+1;a[k>>0]=34;c[j>>2]=(c[n>>2]|0)-(c[m>>2]|0);p=c[j>>2]|0;i=g;return p|0}function Og(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0;e=i;i=i+16|0;f=e+8|0;g=e+4|0;h=e;c[f>>2]=a;c[g>>2]=b;c[h>>2]=d;if(!(c[h>>2]|0)){j=c[g>>2]|0;i=e;return j|0}Dx(c[h>>2]|0,c[f>>2]|0,c[g>>2]|0)|0;j=c[g>>2]|0;i=e;return j|0}function Pg(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;g=i;i=i+32|0;h=g;j=g+16|0;k=g+12|0;l=g+8|0;m=g+4|0;c[j>>2]=b;c[k>>2]=e;c[l>>2]=f;if(!(c[l>>2]|0)){n=c[k>>2]|0;o=n<<1;p=o+2|0;i=g;return p|0}f=c[l>>2]|0;c[l>>2]=f+1;a[f>>0]=35;c[m>>2]=0;while(1){q=c[l>>2]|0;if((c[m>>2]|0)>>>0>=(c[k>>2]|0)>>>0)break;c[h>>2]=d[(c[j>>2]|0)+(c[m>>2]|0)>>0];ew(q,22752,h)|0;c[m>>2]=(c[m>>2]|0)+1;c[l>>2]=(c[l>>2]|0)+2}c[l>>2]=q+1;a[q>>0]=35;n=c[k>>2]|0;o=n<<1;p=o+2|0;i=g;return p|0}function Qg(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0;g=i;i=i+192|0;h=g+156|0;j=g+152|0;k=g+148|0;l=g+144|0;m=g+140|0;n=g+136|0;o=g+132|0;p=g+128|0;q=g+48|0;r=g+160|0;s=g+40|0;t=g+36|0;u=g+32|0;v=g+28|0;w=g+24|0;x=g+20|0;y=g+16|0;z=g+12|0;A=g+8|0;B=g+4|0;C=g;c[j>>2]=b;c[k>>2]=d;c[l>>2]=e;c[m>>2]=f;c[u>>2]=43;c[v>>2]=0;f=r;e=f+20|0;do{a[f>>0]=0;f=f+1|0}while((f|0)<(e|0));c[o>>2]=c[l>>2];c[s>>2]=0;while(1){D=a[c[o>>2]>>0]|0;if(!((a[c[o>>2]>>0]|0)!=0?(c[s>>2]|0)>>>0<20:0)){E=18;break}if((((((D<<24>>24|0)!=38?(a[c[o>>2]>>0]|0)!=43:0)?(a[c[o>>2]>>0]|0)!=45:0)?(a[c[o>>2]>>0]|0)!=47:0)?(a[c[o>>2]>>0]|0)!=63:0)?(rg(c[o>>2]|0)|0)==0:0){if((a[c[o>>2]>>0]|0)==39){c[o>>2]=(c[o>>2]|0)+1;c[p>>2]=sw(c[o>>2]|0,39)|0;if(!(c[p>>2]|0)){E=12;break}if((c[p>>2]|0)==(c[o>>2]|0)){E=12;break}c[o>>2]=c[p>>2]}f=c[m>>2]|0;e=(c[f>>2]|0)+(4-1)&~(4-1);d=c[e>>2]|0;c[f>>2]=e+4;c[q+(c[s>>2]<<2)>>2]=d;if(!(c[q+(c[s>>2]<<2)>>2]|0)){E=15;break}c[s>>2]=(c[s>>2]|0)+1}c[o>>2]=(c[o>>2]|0)+1}if((E|0)==12){c[h>>2]=29;F=c[h>>2]|0;i=g;return F|0}else if((E|0)==15){c[h>>2]=128;F=c[h>>2]|0;i=g;return F|0}else if((E|0)==18){if(D<<24>>24){c[h>>2]=183;F=c[h>>2]|0;i=g;return F|0}D=c[m>>2]|0;m=(c[D>>2]|0)+(4-1)&~(4-1);d=c[m>>2]|0;c[D>>2]=m+4;if(d){c[h>>2]=45;F=c[h>>2]|0;i=g;return F|0}while(1){if(!(c[k>>2]|0)){E=33;break}if(!(a[c[k>>2]>>0]|0)){E=33;break}c[o>>2]=sw(c[k>>2]|0,33)|0;if((c[o>>2]|0)==(c[k>>2]|0)){E=25;break}if(c[o>>2]|0)G=(c[o>>2]|0)-(c[k>>2]|0)|0;else G=0;c[w>>2]=G;c[t>>2]=xg(c[j>>2]|0,c[k>>2]|0,c[w>>2]|0)|0;if(!(c[t>>2]|0)){E=29;break}c[j>>2]=c[t>>2];c[t>>2]=0;vg(c[v>>2]|0);c[v>>2]=c[j>>2];if(c[w>>2]|0){c[k>>2]=(c[k>>2]|0)+((c[w>>2]|0)+1);continue}else{c[k>>2]=0;continue}}do if((E|0)==25)c[n>>2]=27;else if((E|0)==29)c[n>>2]=27;else if((E|0)==33){c[o>>2]=c[l>>2];c[s>>2]=0;a:while(1){if(!(a[c[o>>2]>>0]|0)){E=76;break}if((((a[c[o>>2]>>0]|0)!=38?(a[c[o>>2]>>0]|0)!=43:0)?(a[c[o>>2]>>0]|0)!=45:0)?(a[c[o>>2]>>0]|0)!=47:0){if((rg(c[o>>2]|0)|0)==0?(a[c[o>>2]>>0]|0)!=63:0){if((a[c[o>>2]>>0]|0)==39){c[o>>2]=(c[o>>2]|0)+1;c[p>>2]=sw(c[o>>2]|0,39)|0;if(!(c[p>>2]|0)){E=45;break}if((c[p>>2]|0)==(c[o>>2]|0)){E=45;break}c[t>>2]=xg(c[j>>2]|0,c[o>>2]|0,(c[p>>2]|0)-(c[o>>2]|0)|0)|0;c[o>>2]=c[p>>2]}else c[t>>2]=xg(c[j>>2]|0,c[o>>2]|0,1)|0;do if((c[t>>2]|0)==0?(a[(c[o>>2]|0)+1>>0]|0)==63:0){k=c[q+(c[s>>2]<<2)>>2]|0;if((c[u>>2]|0)!=38){c[k>>2]=0;break}c[x>>2]=k;if(!(c[(c[x>>2]|0)+12>>2]|0)){c[c[x>>2]>>2]=0;c[(c[x>>2]|0)+4>>2]=0}c[(c[x>>2]|0)+8>>2]=0}else E=55;while(0);if((E|0)==55){E=0;if(!(c[t>>2]|0)){E=56;break}do if((c[u>>2]|0)!=38){if((c[u>>2]|0)==47){k=Fg(c[t>>2]|0,1,8)|0;c[c[q+(c[s>>2]<<2)>>2]>>2]=k;break}k=c[t>>2]|0;if((c[u>>2]|0)==45){w=Fg(k,1,1)|0;c[c[q+(c[s>>2]<<2)>>2]>>2]=w;break}else{w=Fg(k,1,5)|0;c[c[q+(c[s>>2]<<2)>>2]>>2]=w;break}}else{c[y>>2]=c[q+(c[s>>2]<<2)>>2];w=c[t>>2]|0;if(!(c[(c[y>>2]|0)+12>>2]|0)){k=Dg(w,1,c[y>>2]|0)|0;c[(c[y>>2]|0)+12>>2]=k;if(!(c[(c[y>>2]|0)+12>>2]|0)){E=65;break a}c[(c[y>>2]|0)+8>>2]=c[c[y>>2]>>2];c[(c[y>>2]|0)+4>>2]=0;a[r+(c[s>>2]|0)>>0]=2;break}c[z>>2]=Bg(w,1,A)|0;if(!((c[z>>2]|0)!=0&(c[A>>2]|0)!=0)){E=60;break a}if(((c[(c[y>>2]|0)+4>>2]|0)+(c[A>>2]|0)|0)>>>0>(c[c[y>>2]>>2]|0)>>>0){E=62;break a}Dx((c[(c[y>>2]|0)+12>>2]|0)+(c[(c[y>>2]|0)+4>>2]|0)|0,c[z>>2]|0,c[A>>2]|0)|0;c[(c[y>>2]|0)+8>>2]=c[A>>2];a[r+(c[s>>2]|0)>>0]=1}while(0);vg(c[t>>2]|0);c[t>>2]=0;if(!(c[c[q+(c[s>>2]<<2)>>2]>>2]|0)){E=73;break}}c[s>>2]=(c[s>>2]|0)+1}}else c[u>>2]=a[c[o>>2]>>0];c[o>>2]=(c[o>>2]|0)+1}if((E|0)==45){c[n>>2]=29;break}else if((E|0)==56){c[n>>2]=68;break}else if((E|0)==60){c[n>>2]=65;break}else if((E|0)==62){c[n>>2]=200;break}else if((E|0)==65){c[n>>2]=65;break}else if((E|0)==73){c[n>>2]=65;break}else if((E|0)==76){vg(c[v>>2]|0);c[h>>2]=0;F=c[h>>2]|0;i=g;return F|0}}while(0);vg(c[v>>2]|0);vg(c[t>>2]|0);while(1){t=c[s>>2]|0;c[s>>2]=t+-1;if(!t)break;t=c[s>>2]|0;if(!(a[r+(c[s>>2]|0)>>0]|0)){xq(c[c[q+(t<<2)>>2]>>2]|0);c[c[q+(c[s>>2]<<2)>>2]>>2]=0;continue}v=c[q+(c[s>>2]<<2)>>2]|0;if((((a[r+t>>0]|0)!=0^1)&1|0)==1){c[B>>2]=v;c[(c[B>>2]|0)+8>>2]=0;continue}else{c[C>>2]=v;$f(c[(c[C>>2]|0)+12>>2]|0);c[(c[C>>2]|0)+12>>2]=0;c[(c[C>>2]|0)+8>>2]=0;c[(c[C>>2]|0)+4>>2]=0;c[c[C>>2]>>2]=0;continue}}c[h>>2]=c[n>>2];F=c[h>>2]|0;i=g;return F|0}return 0}function Rg(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0;f=i;i=i+32|0;g=f+28|0;h=f+24|0;j=f+20|0;k=f+16|0;l=f;c[g>>2]=a;c[h>>2]=b;c[j>>2]=d;c[l>>2]=e;c[k>>2]=Qg(c[g>>2]|0,c[h>>2]|0,c[j>>2]|0,l)|0;l=Sg(c[k>>2]|0)|0;i=f;return l|0}function Sg(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;a=Tg(1,c[d>>2]|0)|0;i=b;return a|0}function Tg(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;d=i;i=i+16|0;e=d+4|0;f=d;c[e>>2]=a;c[f>>2]=b;if(!(c[f>>2]|0)){g=0;i=d;return g|0}g=(c[e>>2]&127)<<24|c[f>>2]&65535;i=d;return g|0}function Ug(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,j=0;b=i;i=i+16|0;d=b+8|0;e=b+4|0;f=b;c[e>>2]=a;c[f>>2]=0;while(1){if((c[f>>2]|0)>>>0>=13){g=6;break}a=(gv(c[1120+(c[f>>2]<<3)+4>>2]|0,c[e>>2]|0)|0)!=0;h=c[f>>2]|0;if(!a){g=4;break}c[f>>2]=h+1}if((g|0)==4){c[17675]=c[17675]|c[1120+(h<<3)>>2];c[d>>2]=0;j=c[d>>2]|0;i=b;return j|0}else if((g|0)==6){c[d>>2]=88;j=c[d>>2]|0;i=b;return j|0}return 0}function Vg(){return c[17676]|0}function Wg(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;d=i;i=i+16|0;e=d+8|0;f=d+4|0;g=d;c[f>>2]=a;c[g>>2]=b;if((c[f>>2]|0)<0|(c[f>>2]|0)>>>0>=13){c[e>>2]=0;h=c[e>>2]|0;i=d;return h|0}if(c[g>>2]|0)c[c[g>>2]>>2]=c[1120+(c[f>>2]<<3)>>2];c[e>>2]=c[1120+(c[f>>2]<<3)+4>>2];h=c[e>>2]|0;i=d;return h|0}function Xg(){c[17676]=0;if(Ah()|0)return;Yg();c[17676]=c[17676]&~c[17675];return}function Yg(){var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0;b=i;i=i+288|0;d=b+20|0;e=b+16|0;f=b+24|0;g=b+12|0;h=b+8|0;j=b+4|0;k=b;c[d>>2]=22929;c[k>>2]=0;c[e>>2]=qw(c[d>>2]|0,23810)|0;if(!(c[e>>2]|0)){i=b;return}while(1){if(!(hw(f,256,c[e>>2]|0)|0))break;c[k>>2]=(c[k>>2]|0)+1;c[g>>2]=f;while(1){if(a[c[g>>2]>>0]&128)break;if(!(Yv(a[c[g>>2]>>0]|0)|0))break;c[g>>2]=(c[g>>2]|0)+1}c[h>>2]=sw(c[g>>2]|0,10)|0;if(c[h>>2]|0)a[c[h>>2]>>0]=0;d=c[g>>2]|0;if(a[c[g>>2]>>0]|0)l=(Kv(c[g>>2]|0)|0)-1|0;else l=0;c[h>>2]=d+l;while(1){if((c[h>>2]|0)>>>0<=(c[g>>2]|0)>>>0)break;if((a[c[h>>2]>>0]&128|0)==0?(Yv(a[c[h>>2]>>0]|0)|0)!=0:0)a[c[h>>2]>>0]=0;c[h>>2]=(c[h>>2]|0)+-1}if(!(a[c[g>>2]>>0]|0))continue;if((a[c[g>>2]>>0]|0)==35)continue;c[j>>2]=0;while(1){if((c[j>>2]|0)>>>0>=13)break;d=(gv(c[1120+(c[j>>2]<<3)+4>>2]|0,c[g>>2]|0)|0)!=0;m=c[j>>2]|0;if(!d){n=23;break}c[j>>2]=m+1}if((n|0)==23){n=0;c[17675]=c[17675]|c[1120+(m<<3)>>2]}}Gw(c[e>>2]|0)|0;vw(c[e>>2]|0)|0;i=b;return}function Zg(){c[17677]=1;return}function _g(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0;d=i;i=i+16|0;e=d+8|0;f=d+4|0;g=d;c[f>>2]=b;if(!(c[f>>2]|0)){ju(22);c[e>>2]=0;h=c[e>>2]|0;i=d;return h|0}b=c[f>>2]|0;if(!(c[17677]|0)){c[e>>2]=sx(b)|0;h=c[e>>2]|0;i=d;return h|0}j=sx(b+0+5|0)|0;c[g>>2]=j;if(j){a[c[g>>2]>>0]=c[f>>2];a[(c[g>>2]|0)+1>>0]=(c[f>>2]|0)>>>8;a[(c[g>>2]|0)+2>>0]=(c[f>>2]|0)>>>16;a[(c[g>>2]|0)+3>>0]=85;a[(c[g>>2]|0)+(4+(c[f>>2]|0))>>0]=-86;c[e>>2]=(c[g>>2]|0)+4;h=c[e>>2]|0;i=d;return h|0}else{c[e>>2]=0;h=c[e>>2]|0;i=d;return h|0}return 0}function $g(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0;d=i;i=i+16|0;e=d+8|0;f=d+4|0;g=d;c[f>>2]=b;if(!(c[f>>2]|0)){ju(22);c[e>>2]=0;h=c[e>>2]|0;i=d;return h|0}b=c[f>>2]|0;if(!(c[17677]|0)){c[e>>2]=lh(b)|0;h=c[e>>2]|0;i=d;return h|0}j=lh(b+0+5|0)|0;c[g>>2]=j;if(j){a[c[g>>2]>>0]=c[f>>2];a[(c[g>>2]|0)+1>>0]=(c[f>>2]|0)>>>8;a[(c[g>>2]|0)+2>>0]=(c[f>>2]|0)>>>16;a[(c[g>>2]|0)+3>>0]=-52;a[(c[g>>2]|0)+(4+(c[f>>2]|0))>>0]=-86;c[e>>2]=(c[g>>2]|0)+4;h=c[e>>2]|0;i=d;return h|0}else{c[e>>2]=0;h=c[e>>2]|0;i=d;return h|0}return 0}function ah(a,b){a=a|0;b=b|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0;e=i;i=i+32|0;f=e+20|0;g=e+16|0;h=e+12|0;j=e+8|0;k=e+4|0;l=e;c[g>>2]=a;c[h>>2]=b;b=c[g>>2]|0;if(!(c[17677]|0)){a=(wh(b)|0)!=0;m=c[g>>2]|0;n=c[h>>2]|0;if(a){c[f>>2]=vh(m,n)|0;o=c[f>>2]|0;i=e;return o|0}else{c[f>>2]=vx(m,n)|0;o=c[f>>2]|0;i=e;return o|0}}c[j>>2]=b;if(!(c[g>>2]|0)){c[f>>2]=_g(c[h>>2]|0)|0;o=c[f>>2]|0;i=e;return o|0}bh(c[j>>2]|0);c[l>>2]=d[(c[j>>2]|0)+-4>>0];c[l>>2]=c[l>>2]|(d[(c[j>>2]|0)+-3>>0]|0)<<8;c[l>>2]=c[l>>2]|(d[(c[j>>2]|0)+-2>>0]|0)<<16;if((c[l>>2]|0)>>>0>=(c[h>>2]|0)>>>0){c[f>>2]=c[g>>2];o=c[f>>2]|0;i=e;return o|0}b=c[h>>2]|0;if((d[(c[j>>2]|0)+-1>>0]|0|0)==204)c[k>>2]=$g(b)|0;else c[k>>2]=_g(b)|0;if(c[k>>2]|0){Dx(c[k>>2]|0,c[g>>2]|0,c[l>>2]|0)|0;Fx((c[k>>2]|0)+(c[l>>2]|0)|0,0,(c[h>>2]|0)-(c[l>>2]|0)|0)|0;ch(c[j>>2]|0);c[f>>2]=c[k>>2];o=c[f>>2]|0;i=e;return o|0}else{c[f>>2]=0;o=c[f>>2]|0;i=e;return o|0}return 0}function bh(a){a=a|0;var b=0,e=0,f=0,g=0,h=0,j=0;b=i;i=i+32|0;e=b+8|0;f=b;g=b+24|0;h=b+20|0;j=b+16|0;c[g>>2]=a;if(!(c[17677]|0)){i=b;return}c[h>>2]=c[g>>2];if(!(c[h>>2]|0)){i=b;return}if((d[(c[h>>2]|0)+-1>>0]|0|0)!=85?(d[(c[h>>2]|0)+-1>>0]|0|0)!=204:0){g=d[(c[h>>2]|0)+-1>>0]|0;c[f>>2]=c[h>>2];c[f+4>>2]=g;Bf(22950,f)}c[j>>2]=d[(c[h>>2]|0)+-4>>0];c[j>>2]=c[j>>2]|(d[(c[h>>2]|0)+-3>>0]|0)<<8;c[j>>2]=c[j>>2]|(d[(c[h>>2]|0)+-2>>0]|0)<<16;if((d[(c[h>>2]|0)+(c[j>>2]|0)>>0]|0|0)!=170){j=d[(c[h>>2]|0)+-1>>0]|0;c[e>>2]=c[h>>2];c[e+4>>2]=j;Bf(22991,e)}else{i=b;return}}function ch(a){a=a|0;var b=0,d=0,e=0,f=0;b=i;i=i+16|0;d=b+4|0;e=b;c[d>>2]=a;c[e>>2]=c[d>>2];if(!(c[e>>2]|0)){i=b;return}if(c[17677]|0){bh(c[e>>2]|0);a=(wh(c[d>>2]|0)|0)!=0;f=(c[e>>2]|0)+-4|0;if(a){th(f);i=b;return}else{tx(f);i=b;return}}else{f=(wh(c[d>>2]|0)|0)!=0;d=c[e>>2]|0;if(f){th(d);i=b;return}else{tx(d);i=b;return}}}function dh(a){a=a|0;var b=0,d=0,e=0;b=i;i=i+16|0;d=b+4|0;e=b;c[d>>2]=a;lu(1224)|0;c[e>>2]=c[17678];c[17679]=c[d>>2]&1;c[17678]=c[d>>2]&2;c[17680]=c[d>>2]&8;c[17681]=c[d>>2]&16;if(!((((c[e>>2]|0)==0|(c[17678]|0)!=0)^1)&(c[17682]|0)!=0)){mu(1224)|0;i=b;return}c[17682]=0;eh();mu(1224)|0;i=b;return}function eh(){var a=0;a=i;i=i+16|0;if(c[17679]|0){i=a;return}yf(pf(23031)|0,a);i=a;return}function fh(){var a=0,b=0;a=i;i=i+16|0;b=a;lu(1224)|0;c[b>>2]=(c[17679]|0)!=0?1:0;c[b>>2]=c[b>>2]|((c[17678]|0)!=0?2:0);c[b>>2]=c[b>>2]|((c[17683]|0)!=0?4:0);c[b>>2]=c[b>>2]|((c[17680]|0)!=0?8:0);c[b>>2]=c[b>>2]|((c[17681]|0)!=0?16:0);mu(1224)|0;i=a;return c[b>>2]|0}function gh(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;lu(1224)|0;hh(c[d>>2]|0);mu(1224)|0;i=b;return}function hh(a){a=a|0;var b=0,d=0,e=0,f=0,g=0;b=i;i=i+32|0;d=b+8|0;e=b;f=b+16|0;g=b+12|0;c[f>>2]=a;if(c[f>>2]|0){if((c[f>>2]|0)>>>0<16384)c[f>>2]=16384;if(c[17685]|0){Af(23263,d);i=b;return}else{ih(c[f>>2]|0);jh(c[17687]|0,c[f>>2]|0);i=b;return}}c[17684]=1;c[g>>2]=Qw()|0;f=c[g>>2]|0;if((f|0)==(Uw()|0)){i=b;return}if(Vw(c[g>>2]|0)|0)Bf(23064,e);g=Qw()|0;if((g|0)!=(Uw()|0))Bf(23064,e);if(Vw(0)|0){i=b;return}else Bf(23064,e)}function ih(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0;b=i;i=i+48|0;d=b+16|0;e=b+8|0;f=b+32|0;g=b+28|0;h=b+24|0;j=b+20|0;c[f>>2]=a;c[17686]=c[f>>2];if(c[17684]|0)Cf(23087,b);c[h>>2]=La(30)|0;c[g>>2]=(c[h>>2]|0)!=-1&(c[h>>2]|0)>0?c[h>>2]|0:4096;c[17686]=(c[17686]|0)+(c[g>>2]|0)-1&~((c[g>>2]|0)-1);c[17687]=Zw(0,c[17686]|0,3,34,-1,0)|0;if((c[17687]|0)==(-1|0)){g=c[17686]|0;h=ov(c[(Yu()|0)>>2]|0)|0;c[e>>2]=g;c[e+4>>2]=h;yf(23113,e)}else{c[17688]=1;c[17685]=1}if(c[17685]|0){k=c[17687]|0;c[j>>2]=k;l=c[17686]|0;m=c[j>>2]|0;c[m>>2]=l;n=c[j>>2]|0;o=n+4|0;c[o>>2]=0;i=b;return}c[17687]=sx(c[17686]|0)|0;if(!(c[17687]|0)){c[d>>2]=c[17686];Bf(23161,d)}c[17685]=1;k=c[17687]|0;c[j>>2]=k;l=c[17686]|0;m=c[j>>2]|0;c[m>>2]=l;n=c[j>>2]|0;o=n+4|0;c[o>>2]=0;i=b;return}function jh(a,b){a=a|0;b=b|0;var d=0;d=i;i=i+16|0;c[d+8>>2]=a;c[d+4>>2]=b;if(c[17680]|0){i=d;return}yf(23201,d);i=d;return}function kh(){return 0}function lh(a){a=a|0;var b=0,d=0,e=0;b=i;i=i+16|0;d=b+4|0;e=b;c[d>>2]=a;lu(1224)|0;c[e>>2]=mh(c[d>>2]|0)|0;mu(1224)|0;i=b;return c[e>>2]|0}function mh(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,j=0;b=i;i=i+32|0;d=b+8|0;e=b;f=b+20|0;g=b+16|0;h=b+12|0;c[g>>2]=a;if((c[17685]|0)==0?(hh(32768),(c[17685]|0)==0):0){yf(pf(23309)|0,e);ju(12);c[f>>2]=0;j=c[f>>2]|0;i=b;return j|0}if((c[17683]|0)!=0?(Ah()|0)!=0:0){yf(pf(23370)|0,d);ju(12);c[f>>2]=0;j=c[f>>2]|0;i=b;return j|0}if(!((c[17682]|0)==0|(c[17678]|0)!=0)){c[17682]=0;eh()}c[g>>2]=((((c[g>>2]|0)+31|0)>>>0)/32|0)<<5;c[h>>2]=nh(c[17687]|0,c[g>>2]|0)|0;if(c[h>>2]|0)sh(c[g>>2]|0,0);c[f>>2]=(c[h>>2]|0)!=0?(c[h>>2]|0)+8|0:0;j=c[f>>2]|0;i=b;return j|0}function nh(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0;d=i;i=i+16|0;e=d+12|0;f=d+8|0;g=d+4|0;h=d;c[e>>2]=a;c[f>>2]=b;c[g>>2]=c[e>>2];while(1){if(!(oh(c[g>>2]|0)|0))break;if((c[(c[g>>2]|0)+4>>2]&1|0)==0?(c[c[g>>2]>>2]|0)>>>0>=(c[f>>2]|0)>>>0:0){j=5;break}c[g>>2]=rh(c[g>>2]|0)|0}if((j|0)==5?(j=(c[g>>2]|0)+4|0,c[j>>2]=c[j>>2]|1,((c[c[g>>2]>>2]|0)-(c[f>>2]|0)|0)>>>0>8):0){c[h>>2]=(c[g>>2]|0)+8+(c[f>>2]|0);c[c[h>>2]>>2]=(c[c[g>>2]>>2]|0)-(c[f>>2]|0)-8;c[(c[h>>2]|0)+4>>2]=0;c[c[g>>2]>>2]=c[f>>2];ph(c[h>>2]|0)}if(oh(c[g>>2]|0)|0){k=c[g>>2]|0;i=d;return k|0}ju(12);c[g>>2]=0;k=c[g>>2]|0;i=d;return k|0}function oh(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0;b=i;i=i+16|0;d=b+8|0;e=b+4|0;f=b;c[d>>2]=a;c[e>>2]=c[d>>2];c[f>>2]=c[17687];if((c[e>>2]|0)>>>0<(c[f>>2]|0)>>>0){g=0;h=g&1;i=b;return h|0}g=(c[e>>2]|0)>>>0<((c[f>>2]|0)+(c[17686]|0)|0)>>>0;h=g&1;i=b;return h|0}function ph(a){a=a|0;var b=0,d=0,e=0,f=0;b=i;i=i+16|0;d=b+8|0;e=b+4|0;f=b;c[d>>2]=a;c[e>>2]=qh(c[d>>2]|0)|0;c[f>>2]=rh(c[d>>2]|0)|0;if((c[e>>2]|0)!=0?(c[(c[e>>2]|0)+4>>2]&1|0)==0:0){a=c[e>>2]|0;c[a>>2]=(c[a>>2]|0)+(8+(c[c[d>>2]>>2]|0));c[d>>2]=c[e>>2]}if(!(c[f>>2]|0)){i=b;return}if(c[(c[f>>2]|0)+4>>2]&1){i=b;return}e=c[d>>2]|0;c[e>>2]=(c[e>>2]|0)+(8+(c[c[f>>2]>>2]|0));i=b;return}function qh(a){a=a|0;var b=0,d=0,e=0,f=0,g=0;b=i;i=i+16|0;d=b+8|0;e=b+4|0;f=b;c[d>>2]=a;if((c[d>>2]|0)==(c[17687]|0)){c[e>>2]=0;g=c[e>>2]|0;i=b;return g|0}c[e>>2]=c[17687];while(1){c[f>>2]=rh(c[e>>2]|0)|0;if((c[f>>2]|0)==(c[d>>2]|0))break;c[e>>2]=c[f>>2]}g=c[e>>2]|0;i=b;return g|0}function rh(a){a=a|0;var b=0,d=0,e=0,f=0;b=i;i=i+16|0;d=b+4|0;e=b;c[d>>2]=a;c[e>>2]=(c[d>>2]|0)+8+(c[c[d>>2]>>2]|0);if(oh(c[e>>2]|0)|0){f=c[e>>2]|0;i=b;return f|0}c[e>>2]=0;f=c[e>>2]|0;i=b;return f|0}function sh(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=i;i=i+16|0;e=d+4|0;f=d;c[e>>2]=a;c[f>>2]=b;if(c[e>>2]|0){c[17689]=(c[17689]|0)+(c[e>>2]|0);c[17690]=(c[17690]|0)+1}if(!(c[f>>2]|0)){i=d;return}c[17689]=(c[17689]|0)-(c[f>>2]|0);c[17690]=(c[17690]|0)+-1;i=d;return}function th(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;lu(1224)|0;uh(c[d>>2]|0);mu(1224)|0;i=b;return}function uh(b){b=b|0;var e=0,f=0,g=0,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>>2]=(c[z>>2]|0)+-1}if((c[z>>2]|0)>>>0>=8){u=B;t=Mx(c[u>>2]|0,c[u+4>>2]|0,16843009,16843009)|0;u=B;c[u>>2]=t;c[u+4>>2]=C;do{c[D>>2]=c[y>>2];u=B;t=c[u+4>>2]|0;v=c[D>>2]|0;c[v>>2]=c[u>>2];c[v+4>>2]=t;c[z>>2]=(c[z>>2]|0)-8;c[y>>2]=(c[y>>2]|0)+8}while((c[z>>2]|0)>>>0>=8)}while(1){if(!(c[z>>2]|0))break;a[c[y>>2]>>0]=a[A>>0]|0;c[y>>2]=(c[y>>2]|0)+1;c[z>>2]=(c[z>>2]|0)+-1}sh(0,c[h>>2]|0);h=(c[g>>2]|0)+4|0;c[h>>2]=c[h>>2]&-2;ph(c[g>>2]|0);i=e;return}function vh(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0;d=i;i=i+32|0;e=d+16|0;f=d+12|0;g=d+8|0;h=d+4|0;j=d;c[e>>2]=a;c[f>>2]=b;lu(1224)|0;c[g>>2]=(c[e>>2]|0)+(0-8);c[h>>2]=c[c[g>>2]>>2];if((c[f>>2]|0)>>>0<(c[h>>2]|0)>>>0){c[j>>2]=c[e>>2];mu(1224)|0;k=c[j>>2]|0;i=d;return k|0}c[j>>2]=mh(c[f>>2]|0)|0;if(!(c[j>>2]|0)){mu(1224)|0;k=c[j>>2]|0;i=d;return k|0}Dx(c[j>>2]|0,c[e>>2]|0,c[h>>2]|0)|0;Fx((c[j>>2]|0)+(c[h>>2]|0)|0,0,(c[f>>2]|0)-(c[h>>2]|0)|0)|0;uh(c[e>>2]|0);mu(1224)|0;k=c[j>>2]|0;i=d;return k|0}function wh(a){a=a|0;var b=0,d=0,e=0;b=i;i=i+16|0;d=b;c[d>>2]=a;if(c[17685]|0)e=(oh(c[d>>2]|0)|0)!=0;else e=0;i=b;return e&1|0}function xh(){var b=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0;b=i;i=i+96|0;e=b+76|0;f=b+72|0;g=b+83|0;h=b+24|0;j=b+68|0;k=b+64|0;l=b+60|0;m=b+82|0;n=b+16|0;o=b+56|0;p=b+52|0;q=b+48|0;r=b+81|0;s=b+8|0;t=b+44|0;u=b+40|0;v=b+36|0;w=b+80|0;x=b;y=b+32|0;if(!(c[17685]|0)){i=b;return}c[e>>2]=c[17687];c[f>>2]=c[17686];a[g>>0]=-1;z=h;c[z>>2]=d[g>>0];c[z+4>>2]=0;while(1){if(!((c[e>>2]&7|0)!=0?(c[f>>2]|0)!=0:0))break;a[c[e>>2]>>0]=a[g>>0]|0;c[e>>2]=(c[e>>2]|0)+1;c[f>>2]=(c[f>>2]|0)+-1}if((c[f>>2]|0)>>>0>=8){z=h;A=Mx(c[z>>2]|0,c[z+4>>2]|0,16843009,16843009)|0;z=h;c[z>>2]=A;c[z+4>>2]=C;do{c[j>>2]=c[e>>2];z=h;A=c[z+4>>2]|0;B=c[j>>2]|0;c[B>>2]=c[z>>2];c[B+4>>2]=A;c[f>>2]=(c[f>>2]|0)-8;c[e>>2]=(c[e>>2]|0)+8}while((c[f>>2]|0)>>>0>=8)}while(1){if(!(c[f>>2]|0))break;a[c[e>>2]>>0]=a[g>>0]|0;c[e>>2]=(c[e>>2]|0)+1;c[f>>2]=(c[f>>2]|0)+-1}c[k>>2]=c[17687];c[l>>2]=c[17686];a[m>>0]=-86;f=n;c[f>>2]=d[m>>0];c[f+4>>2]=0;while(1){if(!((c[k>>2]&7|0)!=0?(c[l>>2]|0)!=0:0))break;a[c[k>>2]>>0]=a[m>>0]|0;c[k>>2]=(c[k>>2]|0)+1;c[l>>2]=(c[l>>2]|0)+-1}if((c[l>>2]|0)>>>0>=8){f=n;e=Mx(c[f>>2]|0,c[f+4>>2]|0,16843009,16843009)|0;f=n;c[f>>2]=e;c[f+4>>2]=C;do{c[o>>2]=c[k>>2];f=n;e=c[f+4>>2]|0;g=c[o>>2]|0;c[g>>2]=c[f>>2];c[g+4>>2]=e;c[l>>2]=(c[l>>2]|0)-8;c[k>>2]=(c[k>>2]|0)+8}while((c[l>>2]|0)>>>0>=8)}while(1){if(!(c[l>>2]|0))break;a[c[k>>2]>>0]=a[m>>0]|0;c[k>>2]=(c[k>>2]|0)+1;c[l>>2]=(c[l>>2]|0)+-1}c[p>>2]=c[17687];c[q>>2]=c[17686];a[r>>0]=85;l=s;c[l>>2]=d[r>>0];c[l+4>>2]=0;while(1){if(!((c[p>>2]&7|0)!=0?(c[q>>2]|0)!=0:0))break;a[c[p>>2]>>0]=a[r>>0]|0;c[p>>2]=(c[p>>2]|0)+1;c[q>>2]=(c[q>>2]|0)+-1}if((c[q>>2]|0)>>>0>=8){l=s;k=Mx(c[l>>2]|0,c[l+4>>2]|0,16843009,16843009)|0;l=s;c[l>>2]=k;c[l+4>>2]=C;do{c[t>>2]=c[p>>2];l=s;k=c[l+4>>2]|0;m=c[t>>2]|0;c[m>>2]=c[l>>2];c[m+4>>2]=k;c[q>>2]=(c[q>>2]|0)-8;c[p>>2]=(c[p>>2]|0)+8}while((c[q>>2]|0)>>>0>=8)}while(1){if(!(c[q>>2]|0))break;a[c[p>>2]>>0]=a[r>>0]|0;c[p>>2]=(c[p>>2]|0)+1;c[q>>2]=(c[q>>2]|0)+-1}c[u>>2]=c[17687];c[v>>2]=c[17686];a[w>>0]=0;q=x;c[q>>2]=d[w>>0];c[q+4>>2]=0;while(1){if(!((c[u>>2]&7|0)!=0?(c[v>>2]|0)!=0:0))break;a[c[u>>2]>>0]=a[w>>0]|0;c[u>>2]=(c[u>>2]|0)+1;c[v>>2]=(c[v>>2]|0)+-1}if((c[v>>2]|0)>>>0>=8){q=x;p=Mx(c[q>>2]|0,c[q+4>>2]|0,16843009,16843009)|0;q=x;c[q>>2]=p;c[q+4>>2]=C;do{c[y>>2]=c[u>>2];q=x;p=c[q+4>>2]|0;r=c[y>>2]|0;c[r>>2]=c[q>>2];c[r+4>>2]=p;c[v>>2]=(c[v>>2]|0)-8;c[u>>2]=(c[u>>2]|0)+8}while((c[v>>2]|0)>>>0>=8)}while(1){if(!(c[v>>2]|0))break;a[c[u>>2]>>0]=a[w>>0]|0;c[u>>2]=(c[u>>2]|0)+1;c[v>>2]=(c[v>>2]|0)+-1}if(c[17688]|0)ax(c[17687]|0,c[17686]|0)|0;c[17687]=0;c[17685]=0;c[17686]=0;c[17683]=0;i=b;return}function yh(){var a=0,b=0,d=0,e=0;a=i;i=i+16|0;b=a;lu(1224)|0;if(!(c[17685]|0)){mu(1224)|0;i=a;return}d=c[17686]|0;e=c[17690]|0;c[b>>2]=c[17689];c[b+4>>2]=d;c[b+8>>2]=e;yf(23423,b);mu(1224)|0;i=a;return}function zh(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0;b=i;i=i+544|0;d=b+8|0;e=b;f=b+28|0;g=b+24|0;h=b+20|0;j=b+16|0;k=b+288|0;l=b+12|0;m=b+32|0;c[f>>2]=a;if(c[17691]|0){if(Ah()|0){Bh(5);Fh()}if(c[17691]|0)xf(23692,23698,114,23705)}c[17691]=1;do if(c[f>>2]|0){if(c[17692]|0)xf(23732,23698,121,23705)}else{if(!(Ew(23755,0)|0)){if(!(c[17692]|0))break;xf(23732,23698,132,23705)}c[h>>2]=qw(23780,23810)|0;if(!(c[h>>2]|0)){a=c[(Yu()|0)>>2]|0;c[j>>2]=a;if((a|0)!=2&(c[j>>2]|0)!=13?(Ew(23812,0)|0)==0:0){a=ov(c[j>>2]|0)|0;c[e>>2]=23780;c[e+4>>2]=a;yf(23826,e);gb()}}else{if((hw(k,256,c[h>>2]|0)|0)!=0?(gx(k)|0)!=0:0){vw(c[h>>2]|0)|0;if(!(c[17692]|0))break;xf(23732,23698,151,23705)}vw(c[h>>2]|0)|0}c[17692]=1}while(0);if(c[17692]|0){i=b;return}c[g>>2]=ku(1268)|0;if(c[g>>2]|0){c[d>>2]=fu(c[g>>2]|0)|0;yf(23870,d);gb()}c[l>>2]=qw(23755,23810)|0;if(c[l>>2]|0){if((hw(m,256,c[l>>2]|0)|0)!=0?(gx(m)|0)!=0:0)c[17694]=1;vw(c[l>>2]|0)|0}Bh(1);i=b;return}function Ah(){return ((c[17692]|0)!=0^1)&1|0}function Bh(a){a=a|0;var b=0,d=0,e=0,f=0,g=0;b=i;i=i+32|0;d=b;e=b+20|0;f=b+16|0;g=b+12|0;c[e>>2]=a;c[f>>2]=0;Ch();c[g>>2]=c[17693];switch(c[17693]|0){case 0:{if((c[e>>2]|0)==1|(c[e>>2]|0)==4|(c[e>>2]|0)==5)c[f>>2]=1;break}case 1:{if((c[e>>2]|0)==2|(c[e>>2]|0)==4|(c[e>>2]|0)==5)c[f>>2]=1;break}case 2:{if((c[e>>2]|0)==3|(c[e>>2]|0)==4|(c[e>>2]|0)==5)c[f>>2]=1;break}case 3:{if((c[e>>2]|0)==6|(c[e>>2]|0)==2|(c[e>>2]|0)==4|(c[e>>2]|0)==5)c[f>>2]=1;break}case 4:{if((c[e>>2]|0)==6|(c[e>>2]|0)==4|(c[e>>2]|0)==5|(c[e>>2]|0)==2)c[f>>2]=1;break}case 5:{if((c[e>>2]|0)==6)c[f>>2]=1;break}default:{}}if(c[f>>2]|0)c[17693]=c[e>>2];Dh();if(!((c[f>>2]|0)!=0?(tf(2)|0)==0:0)){a=Eh(c[g>>2]|0)|0;g=Eh(c[e>>2]|0)|0;e=(c[f>>2]|0)!=0?23637:23645;c[d>>2]=a;c[d+4>>2]=g;c[d+8>>2]=e;yf(23652,d)}if(c[f>>2]|0){i=b;return}else{Fh();i=b;return}}function Ch(){var a=0,b=0,d=0;a=i;i=i+16|0;b=a;d=a+4|0;c[d>>2]=lu(1268)|0;if(c[d>>2]|0){c[b>>2]=fu(c[d>>2]|0)|0;yf(23464,b);gb()}else{i=a;return}}function Dh(){var a=0,b=0,d=0;a=i;i=i+16|0;b=a;d=a+4|0;c[d>>2]=mu(1268)|0;if(c[d>>2]|0){c[b>>2]=fu(c[d>>2]|0)|0;yf(23519,b);gb()}else{i=a;return}}function Eh(a){a=a|0;var b=0,d=0,e=0;b=i;i=i+16|0;d=b+4|0;e=b;c[d>>2]=a;switch(c[d>>2]|0){case 0:{c[e>>2]=23574;break}case 1:{c[e>>2]=23583;break}case 2:{c[e>>2]=23588;break}case 3:{c[e>>2]=23598;break}case 4:{c[e>>2]=23610;break}case 5:{c[e>>2]=23616;break}case 6:{c[e>>2]=23628;break}default:c[e>>2]=37933}i=b;return c[e>>2]|0}function Fh(){ww(0)|0;gb()}function Gh(){var a=0,b=0;a=i;i=i+16|0;b=a;if(Ah()|0)c[b>>2]=c[17694];else c[b>>2]=0;i=a;return c[b>>2]|0}function Hh(){c[17694]=1;return}function Ih(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;if(!(Ah()|0))xf(23925,23698,295,23944);if(Gh()|0){Jh(23698,300,23944,0,c[d>>2]|0);i=b;return}Ch();if(c[17695]|0){Dh();i=b;return}else{c[17695]=1;Dh();i=b;return}}function Jh(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0;g=i;i=i+48|0;h=g;j=g+40|0;k=g+36|0;l=g+32|0;m=g+28|0;n=g+24|0;c[j>>2]=a;c[k>>2]=b;c[l>>2]=d;c[m>>2]=e;c[n>>2]=f;if(!(Ah()|0)){i=g;return}Bh((c[m>>2]|0)!=0?5:4);f=c[j>>2]|0;j=c[k>>2]|0;k=(c[l>>2]|0)!=0?23978:76527;e=(c[l>>2]|0)!=0?c[l>>2]|0:76527;l=(c[n>>2]|0)!=0?c[n>>2]|0:23990;c[h>>2]=(c[m>>2]|0)!=0?23971:76527;c[h+4>>2]=f;c[h+8>>2]=j;c[h+12>>2]=k;c[h+16>>2]=e;c[h+20>>2]=l;yf(24015,h);i=g;return}function Kh(){var a=0,b=0,d=0,e=0;a=i;i=i+16|0;b=a+4|0;d=a;if(Ah()|0){Ch();c[d>>2]=c[17695];Dh();c[b>>2]=c[d>>2];e=c[b>>2]|0;i=a;return e|0}else{c[b>>2]=0;e=c[b>>2]|0;i=a;return e|0}return 0}function Lh(){var a=0,b=0,d=0;a=i;i=i+16|0;b=a;if(!(Ah()|0)){c[b>>2]=1;d=c[b>>2]|0;i=a;return d|0}Ch();if((c[17693]|0)==1){Dh();Mh(0)|0;Ch()}c[b>>2]=(c[17693]|0)==3&1;Dh();d=c[b>>2]|0;i=a;return d|0}function Mh(a){a=a|0;var b=0,d=0,e=0,f=0,g=0;b=i;i=i+16|0;d=b+8|0;e=b+4|0;f=b;c[d>>2]=a;c[e>>2]=4;c[f>>2]=50;if(Ah()|0)Bh(2);if((((((Nh(c[d>>2]|0)|0)==0?(Ph(c[d>>2]|0)|0)==0:0)?(Qh(c[d>>2]|0)|0)==0:0)?(Rh()|0)==0:0)?(Sh(c[d>>2]|0)|0)==0:0)?(Th()|0)==0:0){c[e>>2]=3;c[f>>2]=0}if(!(Ah()|0)){g=c[f>>2]|0;i=b;return g|0}Bh(c[e>>2]|0);g=c[f>>2]|0;i=b;return g|0}function Nh(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0;b=i;i=i+16|0;d=b+12|0;e=b+8|0;f=b+4|0;g=b;c[d>>2]=a;c[g>>2]=0;c[e>>2]=0;while(1){if(!(c[1312+(c[e>>2]<<2)>>2]|0))break;c[f>>2]=si(c[1312+(c[e>>2]<<2)>>2]|0,c[d>>2]|0,1)|0;a=c[1312+(c[e>>2]<<2)>>2]|0;if(c[f>>2]|0)h=fu(c[f>>2]|0)|0;else h=0;Oh(38634,a,0,h);if(c[f>>2]|0)c[g>>2]=1;c[e>>2]=(c[e>>2]|0)+1}i=b;return c[g>>2]|0}function Oh(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0;f=i;i=i+48|0;g=f;h=f+44|0;j=f+40|0;k=f+36|0;l=f+32|0;c[h>>2]=a;c[j>>2]=b;c[k>>2]=d;c[l>>2]=e;if((c[l>>2]|0)==0?(tf(2)|0)==0:0){i=f;return}e=(gv(c[h>>2]|0,36319)|0)!=0;d=e?c[h>>2]|0:43169;e=(gv(c[h>>2]|0,36319)|0)!=0^1;b=e?24063:76527;do if(gv(c[h>>2]|0,38634)|0){if(!(gv(c[h>>2]|0,43169)|0)){m=tj(c[j>>2]|0)|0;break}if(!(gv(c[h>>2]|0,36319)|0)){m=tj(c[j>>2]|0)|0;break}if(gv(c[h>>2]|0,49836)|0)m=76527;else m=uk(c[j>>2]|0)|0}else m=Zh(c[j>>2]|0)|0;while(0);h=c[j>>2]|0;j=(c[l>>2]|0)!=0?c[l>>2]|0:24069;l=(c[k>>2]|0)!=0?24074:76527;e=(c[k>>2]|0)!=0?c[k>>2]|0:76527;a=(c[k>>2]|0)!=0?49890:76527;c[g>>2]=d;c[g+4>>2]=b;c[g+8>>2]=m;c[g+12>>2]=h;c[g+16>>2]=j;c[g+20>>2]=l;c[g+24>>2]=e;c[g+28>>2]=a;yf(24077,g);i=f;return}function Ph(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0;b=i;i=i+16|0;d=b+12|0;e=b+8|0;f=b+4|0;g=b;c[d>>2]=a;c[g>>2]=0;c[e>>2]=0;while(1){if(!(c[1332+(c[e>>2]<<2)>>2]|0))break;c[f>>2]=Yj(c[1332+(c[e>>2]<<2)>>2]|0,c[d>>2]|0,1)|0;a=c[1332+(c[e>>2]<<2)>>2]|0;if(c[f>>2]|0)h=fu(c[f>>2]|0)|0;else h=0;Oh(43169,a,0,h);if(c[f>>2]|0)c[g>>2]=1;c[e>>2]=(c[e>>2]|0)+1}i=b;return c[g>>2]|0}function Qh(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0;b=i;i=i+16|0;d=b+12|0;e=b+8|0;f=b+4|0;g=b;c[d>>2]=a;c[g>>2]=0;c[e>>2]=0;while(1){if(!(c[1356+(c[e>>2]<<2)>>2]|0))break;c[f>>2]=fj(c[1356+(c[e>>2]<<2)>>2]|0,c[d>>2]|0,1)|0;a=c[1356+(c[e>>2]<<2)>>2]|0;if(c[f>>2]|0)h=fu(c[f>>2]|0)|0;else h=0;Oh(36319,a,0,h);if(c[f>>2]|0)c[g>>2]=1;c[e>>2]=(c[e>>2]|0)+1}i=b;return c[g>>2]|0}function Rh(){var a=0,b=0,d=0;a=i;i=i+16|0;b=a;c[b>>2]=Un(1)|0;if(c[b>>2]|0)d=fu(c[b>>2]|0)|0;else d=0;Oh(52600,0,0,d);i=a;return ((c[b>>2]|0)!=0^1^1)&1|0}function Sh(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0;b=i;i=i+16|0;d=b+12|0;e=b+8|0;f=b+4|0;g=b;c[d>>2]=a;c[g>>2]=0;c[e>>2]=0;while(1){if(!(c[1380+(c[e>>2]<<2)>>2]|0))break;c[f>>2]=Fk(c[1380+(c[e>>2]<<2)>>2]|0,c[d>>2]|0,1)|0;a=c[1380+(c[e>>2]<<2)>>2]|0;if(c[f>>2]|0)h=fu(c[f>>2]|0)|0;else h=0;Oh(49836,a,0,h);if(c[f>>2]|0)c[g>>2]=1;c[e>>2]=(c[e>>2]|0)+1}i=b;return c[g>>2]|0}function Th(){return 0}function Uh(){var a=0,b=0;a=i;i=i+16|0;b=a;if(Ah()|0){Ch();c[b>>2]=(c[17693]|0)==3&1;Dh()}else c[b>>2]=1;i=a;return c[b>>2]|0}function Vh(){var a=0,b=0,d=0;a=i;i=i+16|0;b=a;if(Ah()|0){Ch();c[b>>2]=((c[17693]|0)==3?1:(c[17693]|0)==4)&1;Dh();d=c[b>>2]|0;i=a;return d|0}else{c[b>>2]=1;d=c[b>>2]|0;i=a;return d|0}return 0}function Wh(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0;f=i;i=i+32|0;g=f;h=f+20|0;j=f+16|0;k=f+12|0;l=f+8|0;m=f+4|0;c[j>>2]=b;c[k>>2]=d;c[l>>2]=e;if((c[j>>2]|0)!=1){c[g>>2]=c[j>>2];Cf(24121,g)}if((c[k>>2]|0)>>>0<8)c[k>>2]=8;c[m>>2]=ag(1,8+(c[k>>2]|0)|0)|0;if(c[m>>2]|0){k=c[m>>2]|0;a[k>>0]=a[24167]|0;a[k+1>>0]=a[24168]|0;a[k+2>>0]=a[24169]|0;a[(c[m>>2]|0)+3>>0]=c[j>>2];c[(c[m>>2]|0)+4>>2]=c[l>>2];c[h>>2]=c[m>>2];n=c[h>>2]|0;i=f;return n|0}else{c[h>>2]=0;n=c[h>>2]|0;i=f;return n|0}return 0}function Xh(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0;e=i;i=i+32|0;f=e+8|0;g=e;h=e+24|0;j=e+20|0;c[h>>2]=b;c[j>>2]=d;if(!(c[h>>2]|0)){k=c[h>>2]|0;c[g>>2]=k;Bf(24171,g)}if(mw(c[h>>2]|0,24167,3)|0){k=c[h>>2]|0;c[g>>2]=k;Bf(24171,g)}if((a[(c[h>>2]|0)+3>>0]|0)!=(c[j>>2]|0)){g=c[h>>2]|0;k=a[(c[h>>2]|0)+3>>0]|0;c[f>>2]=c[j>>2];c[f+4>>2]=g;c[f+8>>2]=k;Bf(24219,f)}else{i=e;return (c[h>>2]|0)+8|0}return 0}function Yh(b){b=b|0;var d=0,e=0,f=0,g=0,h=0;d=i;i=i+16|0;e=d+8|0;f=d;g=d+12|0;c[g>>2]=b;if(!(c[g>>2]|0)){i=d;return}b=(mw(c[g>>2]|0,24167,3)|0)!=0;h=c[g>>2]|0;if(b){c[f>>2]=h;Bf(24276,f)}f=c[g>>2]|0;if((a[h+3>>0]|0)!=1){c[e>>2]=a[f+3>>0];Bf(24318,e)}if(c[f+4>>2]|0)xb[c[(c[g>>2]|0)+4>>2]&15]((c[g>>2]|0)+8|0);$f(c[g>>2]|0);i=d;return}function Zh(a){a=a|0;var b=0,d=0,e=0,f=0;b=i;i=i+16|0;d=b+4|0;e=b;c[d>>2]=a;c[e>>2]=_h(c[d>>2]|0)|0;if(!(c[e>>2]|0)){f=37933;i=b;return f|0}f=c[(c[e>>2]|0)+8>>2]|0;i=b;return f|0}function _h(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,j=0;b=i;i=i+16|0;d=b+12|0;e=b+8|0;f=b+4|0;g=b;c[e>>2]=a;c[e>>2]=$h(c[e>>2]|0)|0;c[f>>2]=0;while(1){a=c[1392+(c[f>>2]<<2)>>2]|0;c[g>>2]=a;if(!a){h=6;break}if((c[e>>2]|0)==(c[c[g>>2]>>2]|0)){h=4;break}c[f>>2]=(c[f>>2]|0)+1}if((h|0)==4){c[d>>2]=c[g>>2];j=c[d>>2]|0;i=b;return j|0}else if((h|0)==6){c[d>>2]=0;j=c[d>>2]|0;i=b;return j|0}return 0}function $h(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;i=b;return c[d>>2]|0}function ai(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0;f=i;i=i+32|0;g=f+20|0;h=f+16|0;j=f+12|0;k=f+8|0;l=f+4|0;m=f;c[g>>2]=a;c[h>>2]=b;c[j>>2]=d;c[k>>2]=e;c[m>>2]=0;if((c[j>>2]|0)>=65536)c[l>>2]=71;else c[l>>2]=bi(m,c[h>>2]|0,c[j>>2]|0,c[k>>2]|0)|0;c[c[g>>2]>>2]=(c[l>>2]|0)!=0?0:c[m>>2]|0;i=f;return c[l>>2]|0}function bi(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0;g=i;i=i+48|0;h=g+36|0;j=g+32|0;k=g+28|0;l=g+24|0;m=g+20|0;n=g+16|0;o=g+12|0;p=g+8|0;q=g+4|0;r=g;c[h>>2]=b;c[j>>2]=d;c[k>>2]=e;c[l>>2]=f;c[m>>2]=c[l>>2]&1;c[o>>2]=0;Sn();c[n>>2]=_h(c[j>>2]|0)|0;do if(c[n>>2]|0)if(a[(c[n>>2]|0)+4>>0]&1){c[p>>2]=12;break}else{c[p>>2]=0;break}else c[p>>2]=12;while(0);do if(!(c[p>>2]|0)){if((c[l>>2]&-16|0)==0?(c[l>>2]&0|0)==0:0)break;c[p>>2]=12}while(0);a:do if(!(c[p>>2]|0)){f=c[k>>2]|0;b:do if((f|0)<6)switch(f|0){case 5:case 2:case 3:case 1:{break b;break}case 4:{if((c[(c[n>>2]|0)+44>>2]|0)!=0?(c[(c[n>>2]|0)+48>>2]|0)!=0:0)break a;c[p>>2]=71;break a;break}case 0:{if((Ah()|0)==0?(jg(0)|0)!=0:0)break a;c[p>>2]=71;break a;break}default:{s=37;break b}}else{if((f|0)<9){switch(f|0){case 7:case 6:{break b;break}case 8:break;default:{s=37;break b}}if((c[(c[n>>2]|0)+20>>2]|0)!=16)c[p>>2]=71;if((c[(c[n>>2]|0)+36>>2]|0)!=0?(c[(c[n>>2]|0)+40>>2]|0)!=0:0)break a;c[p>>2]=71;break a}if((f|0)<11){switch(f|0){case 9:{break b;break}case 10:break;default:{s=37;break b}}if(((c[(c[n>>2]|0)+44>>2]|0)!=0?(c[(c[n>>2]|0)+48>>2]|0)!=0:0)?(c[(c[n>>2]|0)+60>>2]|0)!=0:0){if((c[c[n>>2]>>2]|0)==316)break a;c[p>>2]=71;break a}c[p>>2]=71;break a}if((f|0)>=65537)switch(f|0){case 65537:{break b;break}default:{s=37;break b}}switch(f|0){case 11:break;default:{s=37;break b}}if((c[(c[n>>2]|0)+36>>2]|0)!=0?(c[(c[n>>2]|0)+40>>2]|0)!=0:0){if((c[(c[n>>2]|0)+20>>2]|0)==16)break a;c[p>>2]=71;break a}c[p>>2]=71;break a}while(0);if((s|0)==37){c[p>>2]=71;break}if((c[(c[n>>2]|0)+36>>2]|0)!=0?(c[(c[n>>2]|0)+40>>2]|0)!=0:0)break;c[p>>2]=71}while(0);if(c[p>>2]|0){t=c[p>>2]|0;u=(t|0)!=0;v=c[o>>2]|0;w=u?0:v;x=c[h>>2]|0;c[x>>2]=w;y=c[p>>2]|0;z=ci(y)|0;i=g;return z|0}c[q>>2]=512+(c[(c[n>>2]|0)+28>>2]<<1)-16+15;s=c[q>>2]|0;if(c[m>>2]|0)c[o>>2]=bg(1,s)|0;else c[o>>2]=ag(1,s)|0;if(!(c[o>>2]|0)){c[p>>2]=iu()|0;t=c[p>>2]|0;u=(t|0)!=0;v=c[o>>2]|0;w=u?0:v;x=c[h>>2]|0;c[x>>2]=w;y=c[p>>2]|0;z=ci(y)|0;i=g;return z|0}c[r>>2]=0;if(c[o>>2]&15){c[r>>2]=16-(c[o>>2]&15);c[o>>2]=(c[o>>2]|0)+(c[r>>2]|0)}c[c[o>>2]>>2]=(c[m>>2]|0)!=0?1183944770:604576100;c[(c[o>>2]|0)+4>>2]=(c[q>>2]|0)-(c[r>>2]|0);c[(c[o>>2]|0)+8>>2]=c[r>>2];c[(c[o>>2]|0)+12>>2]=c[n>>2];c[(c[o>>2]|0)+16>>2]=c[j>>2];c[(c[o>>2]|0)+48>>2]=c[k>>2];c[(c[o>>2]|0)+52>>2]=c[l>>2];switch(c[j>>2]|0){case 9:case 8:case 7:{c[(c[o>>2]|0)+20>>2]=1;c[(c[o>>2]|0)+20+4>>2]=2;c[(c[o>>2]|0)+20+8>>2]=1;c[(c[o>>2]|0)+20+12>>2]=3;c[(c[o>>2]|0)+20+16>>2]=4;c[(c[o>>2]|0)+20+20>>2]=5;c[(c[o>>2]|0)+20+24>>2]=2;break}case 303:case 10:{c[(c[o>>2]|0)+20+12>>2]=6;c[(c[o>>2]|0)+20+4>>2]=7;c[(c[o>>2]|0)+20+16>>2]=8;break}default:{}}if((c[k>>2]|0)!=11){t=c[p>>2]|0;u=(t|0)!=0;v=c[o>>2]|0;w=u?0:v;x=c[h>>2]|0;c[x>>2]=w;y=c[p>>2]|0;z=ci(y)|0;i=g;return z|0}a[(c[o>>2]|0)+128+352>>0]=16;t=c[p>>2]|0;u=(t|0)!=0;v=c[o>>2]|0;w=u?0:v;x=c[h>>2]|0;c[x>>2]=w;y=c[p>>2]|0;z=ci(y)|0;i=g;return z|0}function ci(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;a=di(32,c[d>>2]|0)|0;i=b;return a|0}function di(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=i;i=i+16|0;e=d+4|0;f=d;c[e>>2]=a;c[f>>2]=b;b=ei(c[e>>2]|0,c[f>>2]|0)|0;i=d;return b|0}function ei(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;d=i;i=i+16|0;e=d+4|0;f=d;c[e>>2]=a;c[f>>2]=b;if(!(c[f>>2]|0)){g=0;i=d;return g|0}g=(c[e>>2]&127)<<24|c[f>>2]&65535;i=d;return g|0}function fi(b){b=b|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0;e=i;i=i+32|0;f=e+24|0;g=e+20|0;h=e+16|0;j=e+12|0;k=e+28|0;l=e;m=e+8|0;c[f>>2]=b;if(!(c[f>>2]|0)){i=e;return}if((c[c[f>>2]>>2]|0)!=1183944770?(c[c[f>>2]>>2]|0)!=604576100:0)qf(63,24367);c[c[f>>2]>>2]=0;c[g>>2]=c[(c[f>>2]|0)+8>>2];c[h>>2]=c[f>>2];c[j>>2]=c[(c[f>>2]|0)+4>>2];a[k>>0]=0;b=l;c[b>>2]=d[k>>0];c[b+4>>2]=0;while(1){if(!((c[h>>2]&7|0)!=0?(c[j>>2]|0)!=0:0))break;a[c[h>>2]>>0]=a[k>>0]|0;c[h>>2]=(c[h>>2]|0)+1;c[j>>2]=(c[j>>2]|0)+-1}if((c[j>>2]|0)>>>0>=8){b=l;n=Mx(c[b>>2]|0,c[b+4>>2]|0,16843009,16843009)|0;b=l;c[b>>2]=n;c[b+4>>2]=C;do{c[m>>2]=c[h>>2];b=l;n=c[b+4>>2]|0;o=c[m>>2]|0;c[o>>2]=c[b>>2];c[o+4>>2]=n;c[j>>2]=(c[j>>2]|0)-8;c[h>>2]=(c[h>>2]|0)+8}while((c[j>>2]|0)>>>0>=8)}while(1){if(!(c[j>>2]|0))break;a[c[h>>2]>>0]=a[k>>0]|0;c[h>>2]=(c[h>>2]|0)+1;c[j>>2]=(c[j>>2]|0)+-1}$f((c[f>>2]|0)+(0-(c[g>>2]|0))|0);i=e;return}function gi(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0;g=i;i=i+32|0;h=g+20|0;j=g+16|0;k=g+12|0;l=g+8|0;m=g+4|0;n=g;c[h>>2]=a;c[j>>2]=b;c[k>>2]=d;c[l>>2]=e;c[m>>2]=f;if(!(c[l>>2]|0)){c[l>>2]=c[j>>2];c[m>>2]=c[k>>2]}c[n>>2]=hi(c[h>>2]|0,c[j>>2]|0,c[k>>2]|0,c[l>>2]|0,c[m>>2]|0)|0;if(!((c[n>>2]|0)!=0&(c[j>>2]|0)!=0)){o=c[n>>2]|0;i=g;return o|0}Fx(c[j>>2]|0,66,c[k>>2]|0)|0;o=c[n>>2]|0;i=g;return o|0}function hi(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;g=i;i=i+32|0;h=g;j=g+24|0;k=g+20|0;l=g+16|0;m=g+12|0;n=g+8|0;o=g+4|0;c[j>>2]=a;c[k>>2]=b;c[l>>2]=d;c[m>>2]=e;c[n>>2]=f;f=c[(c[j>>2]|0)+48>>2]|0;a:do if((f|0)>=6){if((f|0)<9)switch(f|0){case 6:{c[o>>2]=cr(c[j>>2]|0,c[k>>2]|0,c[l>>2]|0,c[m>>2]|0,c[n>>2]|0)|0;break a;break}case 7:{c[o>>2]=Jq(c[j>>2]|0,c[k>>2]|0,c[l>>2]|0,c[m>>2]|0,c[n>>2]|0)|0;break a;break}case 8:{c[o>>2]=Uq(c[j>>2]|0,c[k>>2]|0,c[l>>2]|0,c[m>>2]|0,c[n>>2]|0)|0;break a;break}default:{p=c[j>>2]|0;q=p+48|0;r=c[q>>2]|0;c[h>>2]=r;Bf(24462,h)}}if((f|0)<11)switch(f|0){case 9:{c[o>>2]=fr(c[j>>2]|0,c[k>>2]|0,c[l>>2]|0,c[m>>2]|0,c[n>>2]|0)|0;break a;break}case 10:{c[o>>2]=Tr(c[j>>2]|0,c[k>>2]|0,c[l>>2]|0,c[m>>2]|0,c[n>>2]|0)|0;break a;break}default:{p=c[j>>2]|0;q=p+48|0;r=c[q>>2]|0;c[h>>2]=r;Bf(24462,h)}}if((f|0)<65537)switch(f|0){case 11:{c[o>>2]=Kr(c[j>>2]|0,c[k>>2]|0,c[l>>2]|0,c[m>>2]|0,c[n>>2]|0)|0;break a;break}default:{p=c[j>>2]|0;q=p+48|0;r=c[q>>2]|0;c[h>>2]=r;Bf(24462,h)}}else switch(f|0){case 65537:{c[o>>2]=71;break a;break}default:{p=c[j>>2]|0;q=p+48|0;r=c[q>>2]|0;c[h>>2]=r;Bf(24462,h)}}}else switch(f|0){case 1:{c[o>>2]=ii(c[j>>2]|0,c[k>>2]|0,c[l>>2]|0,c[m>>2]|0,c[n>>2]|0)|0;break a;break}case 3:{c[o>>2]=Mq(c[j>>2]|0,c[k>>2]|0,c[l>>2]|0,c[m>>2]|0,c[n>>2]|0)|0;break a;break}case 2:{c[o>>2]=Wq(c[j>>2]|0,c[k>>2]|0,c[l>>2]|0,c[m>>2]|0,c[n>>2]|0)|0;break a;break}case 5:{c[o>>2]=Or(c[j>>2]|0,c[k>>2]|0,c[l>>2]|0,c[m>>2]|0,c[n>>2]|0)|0;break a;break}case 4:{Fb[c[(c[(c[j>>2]|0)+12>>2]|0)+44>>2]&1]((c[j>>2]|0)+496|0,c[k>>2]|0,c[m>>2]|0,c[n>>2]|0);c[o>>2]=0;break a;break}case 0:{if((Ah()|0)==0?(jg(0)|0)!=0:0){if((c[m>>2]|0)!=(c[k>>2]|0))Ex(c[k>>2]|0,c[m>>2]|0,c[n>>2]|0)|0;c[o>>2]=0;break a}Jh(24416,875,24425,0,24440);c[o>>2]=71;break a;break}default:{p=c[j>>2]|0;q=p+48|0;r=c[q>>2]|0;c[h>>2]=r;Bf(24462,h)}}while(0);i=g;return c[o>>2]|0}function ii(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0;g=i;i=i+32|0;h=g+16|0;j=g+12|0;k=g+8|0;l=g+4|0;m=g;c[h>>2]=a;c[j>>2]=b;c[k>>2]=d;c[l>>2]=e;c[m>>2]=f;f=ji(c[h>>2]|0,c[j>>2]|0,c[k>>2]|0,c[l>>2]|0,c[m>>2]|0,c[(c[(c[h>>2]|0)+12>>2]|0)+36>>2]|0)|0;i=g;return f|0}function ji(a,b,d,e,f,g){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;h=i;i=i+48|0;j=h+44|0;k=h+40|0;l=h+36|0;m=h+32|0;n=h+28|0;o=h+24|0;p=h+20|0;q=h+16|0;r=h+12|0;s=h+8|0;t=h+4|0;u=h;c[k>>2]=a;c[l>>2]=b;c[m>>2]=d;c[n>>2]=e;c[o>>2]=f;c[p>>2]=g;c[q>>2]=c[(c[(c[k>>2]|0)+12>>2]|0)+20>>2];if((c[m>>2]|0)>>>0<(c[o>>2]|0)>>>0){c[j>>2]=200;v=c[j>>2]|0;i=h;return v|0}if(((c[o>>2]|0)>>>0)%((c[q>>2]|0)>>>0)|0){c[j>>2]=139;v=c[j>>2]|0;i=h;return v|0}c[s>>2]=((c[o>>2]|0)>>>0)/((c[q>>2]|0)>>>0)|0;c[t>>2]=0;c[r>>2]=0;while(1){if((c[r>>2]|0)>>>0>=(c[s>>2]|0)>>>0)break;c[u>>2]=vb[c[p>>2]&63]((c[k>>2]|0)+496|0,c[l>>2]|0,c[n>>2]|0)|0;c[t>>2]=(c[u>>2]|0)>>>0>(c[t>>2]|0)>>>0?c[u>>2]|0:c[t>>2]|0;c[n>>2]=(c[n>>2]|0)+(c[q>>2]|0);c[l>>2]=(c[l>>2]|0)+(c[q>>2]|0);c[r>>2]=(c[r>>2]|0)+1}if((c[t>>2]|0)>>>0>0){If((c[t>>2]|0)+16|0);Jf()}c[j>>2]=0;v=c[j>>2]|0;i=h;return v|0}function ki(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0;g=i;i=i+32|0;h=g+16|0;j=g+12|0;k=g+8|0;l=g+4|0;m=g;c[h>>2]=a;c[j>>2]=b;c[k>>2]=d;c[l>>2]=e;c[m>>2]=f;if(!(c[l>>2]|0)){c[l>>2]=c[j>>2];c[m>>2]=c[k>>2]}f=li(c[h>>2]|0,c[j>>2]|0,c[k>>2]|0,c[l>>2]|0,c[m>>2]|0)|0;i=g;return f|0}function li(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;g=i;i=i+32|0;h=g;j=g+24|0;k=g+20|0;l=g+16|0;m=g+12|0;n=g+8|0;o=g+4|0;c[j>>2]=a;c[k>>2]=b;c[l>>2]=d;c[m>>2]=e;c[n>>2]=f;f=c[(c[j>>2]|0)+48>>2]|0;a:do if((f|0)>=6){if((f|0)<9)switch(f|0){case 6:{c[o>>2]=cr(c[j>>2]|0,c[k>>2]|0,c[l>>2]|0,c[m>>2]|0,c[n>>2]|0)|0;break a;break}case 7:{c[o>>2]=Lq(c[j>>2]|0,c[k>>2]|0,c[l>>2]|0,c[m>>2]|0,c[n>>2]|0)|0;break a;break}case 8:{c[o>>2]=Vq(c[j>>2]|0,c[k>>2]|0,c[l>>2]|0,c[m>>2]|0,c[n>>2]|0)|0;break a;break}default:{p=c[j>>2]|0;q=p+48|0;r=c[q>>2]|0;c[h>>2]=r;Bf(24510,h)}}if((f|0)<11)switch(f|0){case 9:{c[o>>2]=or(c[j>>2]|0,c[k>>2]|0,c[l>>2]|0,c[m>>2]|0,c[n>>2]|0)|0;break a;break}case 10:{c[o>>2]=Wr(c[j>>2]|0,c[k>>2]|0,c[l>>2]|0,c[m>>2]|0,c[n>>2]|0)|0;break a;break}default:{p=c[j>>2]|0;q=p+48|0;r=c[q>>2]|0;c[h>>2]=r;Bf(24510,h)}}if((f|0)<65537)switch(f|0){case 11:{c[o>>2]=Nr(c[j>>2]|0,c[k>>2]|0,c[l>>2]|0,c[m>>2]|0,c[n>>2]|0)|0;break a;break}default:{p=c[j>>2]|0;q=p+48|0;r=c[q>>2]|0;c[h>>2]=r;Bf(24510,h)}}else switch(f|0){case 65537:{c[o>>2]=71;break a;break}default:{p=c[j>>2]|0;q=p+48|0;r=c[q>>2]|0;c[h>>2]=r;Bf(24510,h)}}}else switch(f|0){case 1:{c[o>>2]=mi(c[j>>2]|0,c[k>>2]|0,c[l>>2]|0,c[m>>2]|0,c[n>>2]|0)|0;break a;break}case 3:{c[o>>2]=Pq(c[j>>2]|0,c[k>>2]|0,c[l>>2]|0,c[m>>2]|0,c[n>>2]|0)|0;break a;break}case 2:{c[o>>2]=Zq(c[j>>2]|0,c[k>>2]|0,c[l>>2]|0,c[m>>2]|0,c[n>>2]|0)|0;break a;break}case 5:{c[o>>2]=Or(c[j>>2]|0,c[k>>2]|0,c[l>>2]|0,c[m>>2]|0,c[n>>2]|0)|0;break a;break}case 4:{Fb[c[(c[(c[j>>2]|0)+12>>2]|0)+48>>2]&1]((c[j>>2]|0)+496|0,c[k>>2]|0,c[m>>2]|0,c[n>>2]|0);c[o>>2]=0;break a;break}case 0:{if((Ah()|0)==0?(jg(0)|0)!=0:0){if((c[m>>2]|0)!=(c[k>>2]|0))Ex(c[k>>2]|0,c[m>>2]|0,c[n>>2]|0)|0;c[o>>2]=0;break a}Jh(24416,992,24495,0,24440);c[o>>2]=71;break a;break}default:{p=c[j>>2]|0;q=p+48|0;r=c[q>>2]|0;c[h>>2]=r;Bf(24510,h)}}while(0);i=g;return c[o>>2]|0}function mi(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0;g=i;i=i+32|0;h=g+16|0;j=g+12|0;k=g+8|0;l=g+4|0;m=g;c[h>>2]=a;c[j>>2]=b;c[k>>2]=d;c[l>>2]=e;c[m>>2]=f;f=ji(c[h>>2]|0,c[j>>2]|0,c[k>>2]|0,c[l>>2]|0,c[m>>2]|0,c[(c[(c[h>>2]|0)+12>>2]|0)+40>>2]|0)|0;i=g;return f|0}function ni(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=i;i=i+16|0;f=e+8|0;g=e+4|0;h=e;c[f>>2]=a;c[g>>2]=b;c[h>>2]=d;d=oi(c[f>>2]|0,c[g>>2]|0,c[h>>2]|0)|0;i=e;return d|0}function oi(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0;f=i;i=i+16|0;g=f+12|0;h=f+8|0;j=f+4|0;k=f;c[g>>2]=b;c[h>>2]=d;c[j>>2]=e;c[k>>2]=vb[c[(c[(c[g>>2]|0)+12>>2]|0)+32>>2]&63]((c[g>>2]|0)+496|0,c[h>>2]|0,c[j>>2]|0)|0;j=c[g>>2]|0;a:do if(!(c[k>>2]|0)){Dx(j+496+(c[(c[(c[g>>2]|0)+12>>2]|0)+28>>2]|0)|0,(c[g>>2]|0)+496|0,c[(c[(c[g>>2]|0)+12>>2]|0)+28>>2]|0)|0;h=(c[g>>2]|0)+56|0;a[h>>0]=a[h>>0]&-2|1;h=c[(c[g>>2]|0)+48>>2]|0;if((h|0)<10){switch(h|0){case 9:break;default:break a}pr(c[g>>2]|0);break}if((h|0)<65537){switch(h|0){case 10:break;default:break a}Xr(c[g>>2]|0);break}else{switch(h|0){case 65537:break;default:break a}ar(c[g>>2]|0)|0;break}}else{h=j+56|0;a[h>>0]=a[h>>0]&-2}while(0);i=f;return c[k>>2]|0}function pi(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0;e=i;i=i+16|0;f=e+12|0;g=e+8|0;h=e+4|0;j=e;c[f>>2]=a;c[g>>2]=b;c[h>>2]=d;c[j>>2]=0;switch(c[(c[f>>2]|0)+48>>2]|0){case 8:{c[j>>2]=Rq(c[f>>2]|0,c[g>>2]|0,c[h>>2]|0)|0;break}case 9:{c[j>>2]=gr(c[f>>2]|0,c[g>>2]|0,c[h>>2]|0)|0;break}case 10:{c[j>>2]=Rr(c[f>>2]|0,c[g>>2]|0,c[h>>2]|0)|0;break}case 11:{c[j>>2]=Gr(c[f>>2]|0,c[g>>2]|0,c[h>>2]|0)|0;break}default:c[j>>2]=qi(c[f>>2]|0,c[g>>2]|0,c[h>>2]|0)|0}i=e;return c[j>>2]|0}function qi(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0;f=i;i=i+32|0;g=f;h=f+20|0;j=f+16|0;k=f+12|0;l=f+8|0;c[j>>2]=b;c[k>>2]=d;c[l>>2]=e;e=c[j>>2]|0;if(c[(c[(c[j>>2]|0)+12>>2]|0)+60>>2]|0){Ab[c[(c[e+12>>2]|0)+60>>2]&7]((c[j>>2]|0)+496|0,c[k>>2]|0,c[l>>2]|0);c[h>>2]=0;m=c[h>>2]|0;i=f;return m|0}Fx(e+64|0,0,c[(c[(c[j>>2]|0)+12>>2]|0)+20>>2]|0)|0;if(c[k>>2]|0){if((c[l>>2]|0)!=(c[(c[(c[j>>2]|0)+12>>2]|0)+20>>2]|0)){e=c[(c[(c[j>>2]|0)+12>>2]|0)+20>>2]|0;c[g>>2]=c[l>>2];c[g+4>>2]=e;yf(24543,g);Jh(24416,682,24586,0,24599)}if((c[l>>2]|0)>>>0>(c[(c[(c[j>>2]|0)+12>>2]|0)+20>>2]|0)>>>0)c[l>>2]=c[(c[(c[j>>2]|0)+12>>2]|0)+20>>2];Dx((c[j>>2]|0)+64|0,c[k>>2]|0,c[l>>2]|0)|0;l=(c[j>>2]|0)+56|0;a[l>>0]=a[l>>0]&-3|2}else{l=(c[j>>2]|0)+56|0;a[l>>0]=a[l>>0]&-3}c[(c[j>>2]|0)+112>>2]=0;c[h>>2]=0;m=c[h>>2]|0;i=f;return m|0}function ri(){return 0}function si(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0;f=i;i=i+32|0;g=f+16|0;h=f+12|0;j=f+8|0;k=f+4|0;l=f;c[g>>2]=b;c[h>>2]=d;c[j>>2]=e;c[k>>2]=0;c[l>>2]=_h(c[g>>2]|0)|0;if(((c[l>>2]|0)!=0?(a[(c[l>>2]|0)+4>>0]&1|0)==0:0)?(c[(c[l>>2]|0)+52>>2]|0)!=0:0){c[k>>2]=vb[c[(c[l>>2]|0)+52>>2]&63](c[g>>2]|0,c[h>>2]|0,c[j>>2]|0)|0;m=c[k>>2]|0;n=ti(m)|0;i=f;return n|0}c[k>>2]=12;if(!(c[j>>2]|0)){m=c[k>>2]|0;n=ti(m)|0;i=f;return n|0}h=c[j>>2]|0;j=c[g>>2]|0;if((c[l>>2]|0)!=0?(a[(c[l>>2]|0)+4>>0]&1|0)==0:0)o=38004;else o=(c[l>>2]|0)!=0?37965:37984;Fb[h&1](38634,j,38026,o);m=c[k>>2]|0;n=ti(m)|0;i=f;return n|0}function ti(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;a=ei(1,c[d>>2]|0)|0;i=b;return a|0}function ui(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;g=i;i=i+32|0;h=g+24|0;j=g+20|0;k=g+16|0;l=g+12|0;m=g+8|0;n=g+4|0;o=g;c[j>>2]=b;c[k>>2]=d;c[l>>2]=e;c[m>>2]=f;c[o>>2]=0;if(!(c[k>>2]|0)){c[n>>2]=0;while(1){if(!(c[1416+((c[n>>2]|0)*48|0)>>2]|0))break;if((c[j>>2]|0)==(c[1416+((c[n>>2]|0)*48|0)+4>>2]|0)?(c[1416+((c[n>>2]|0)*48|0)+12>>2]|0)==0:0)break;c[n>>2]=(c[n>>2]|0)+1}if(!(c[1416+((c[n>>2]|0)*48|0)>>2]|0))c[n>>2]=-1}else c[n>>2]=vi(c[k>>2]|0)|0;if((c[n>>2]|0)<0){c[h>>2]=188;p=c[h>>2]|0;i=g;return p|0}c[o>>2]=c[1416+((c[n>>2]|0)*48|0)>>2];if((Ah()|0)!=0?(a[1416+((c[n>>2]|0)*48|0)+8>>0]&1|0)==0:0){c[h>>2]=60;p=c[h>>2]|0;i=g;return p|0}if((c[1416+((c[n>>2]|0)*48|0)+12>>2]|0)>>>0>=3){c[h>>2]=59;p=c[h>>2]|0;i=g;return p|0}if(c[m>>2]|0)c[c[m>>2]>>2]=c[1416+((c[n>>2]|0)*48|0)+4>>2];if(c[l>>2]|0){c[c[l>>2]>>2]=c[1416+((c[n>>2]|0)*48|0)+12>>2];c[(c[l>>2]|0)+4>>2]=c[1416+((c[n>>2]|0)*48|0)+16>>2];if(!(c[(c[l>>2]|0)+8>>2]|0)){m=wi(c[1416+((c[n>>2]|0)*48|0)+20>>2]|0)|0;c[(c[l>>2]|0)+8>>2]=m}if(!(c[(c[l>>2]|0)+12>>2]|0)){m=wi(c[1416+((c[n>>2]|0)*48|0)+24>>2]|0)|0;c[(c[l>>2]|0)+12>>2]=m}if(!(c[(c[l>>2]|0)+16>>2]|0)){m=wi(c[1416+((c[n>>2]|0)*48|0)+28>>2]|0)|0;c[(c[l>>2]|0)+16>>2]=m}if(!(c[(c[l>>2]|0)+32>>2]|0)){m=wi(c[1416+((c[n>>2]|0)*48|0)+32>>2]|0)|0;c[(c[l>>2]|0)+32>>2]=m}if(!(c[(c[l>>2]|0)+36>>2]|0)){m=wi(c[1416+((c[n>>2]|0)*48|0)+44>>2]|0)|0;c[(c[l>>2]|0)+36>>2]=m}if(!(c[(c[l>>2]|0)+20>>2]|0)){m=wi(c[1416+((c[n>>2]|0)*48|0)+36>>2]|0)|0;c[(c[l>>2]|0)+20>>2]=m}if(!(c[(c[l>>2]|0)+20+4>>2]|0)){m=wi(c[1416+((c[n>>2]|0)*48|0)+40>>2]|0)|0;c[(c[l>>2]|0)+20+4>>2]=m}if(!(c[(c[l>>2]|0)+20+8>>2]|0)){m=_p(1)|0;c[(c[l>>2]|0)+20+8>>2]=m}if(!(c[(c[l>>2]|0)+40>>2]|0))c[(c[l>>2]|0)+40>>2]=c[o>>2]}c[h>>2]=0;p=c[h>>2]|0;i=g;return p|0}function vi(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0;b=i;i=i+16|0;d=b+12|0;e=b+8|0;f=b+4|0;g=b;c[e>>2]=a;c[f>>2]=0;while(1){if(!(c[1416+((c[f>>2]|0)*48|0)>>2]|0))break;a=(gv(c[e>>2]|0,c[1416+((c[f>>2]|0)*48|0)>>2]|0)|0)!=0;h=c[f>>2]|0;if(!a){j=4;break}c[f>>2]=h+1}if((j|0)==4){c[d>>2]=h;k=c[d>>2]|0;i=b;return k|0}a:do if(!(c[1416+((c[f>>2]|0)*48|0)>>2]|0)){c[g>>2]=0;while(1){if(!(c[2472+(c[g>>2]<<3)>>2]|0))break;if(!(gv(c[e>>2]|0,c[2472+(c[g>>2]<<3)+4>>2]|0)|0))break;c[g>>2]=(c[g>>2]|0)+1}if(c[2472+(c[g>>2]<<3)>>2]|0){c[f>>2]=0;while(1){if(!(c[1416+((c[f>>2]|0)*48|0)>>2]|0))break a;h=(gv(c[2472+(c[g>>2]<<3)>>2]|0,c[1416+((c[f>>2]|0)*48|0)>>2]|0)|0)!=0;l=c[f>>2]|0;if(!h)break;c[f>>2]=l+1}c[d>>2]=l;k=c[d>>2]|0;i=b;return k|0}}while(0);c[d>>2]=-1;k=c[d>>2]|0;i=b;return k|0}function wi(a){a=a|0;var b=0,d=0,e=0,f=0,g=0;b=i;i=i+16|0;d=b;e=b+12|0;f=b+8|0;g=b+4|0;c[e>>2]=a;c[f>>2]=Dp(g,4,c[e>>2]|0,0,0)|0;if(c[f>>2]|0){c[d>>2]=fu(c[f>>2]|0)|0;Bf(35818,d)}else{i=b;return c[g>>2]|0}return 0}function xi(a,b,d,e,f,g,h,j,k){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;k=k|0;var l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0;l=i;i=i+64|0;m=l+48|0;n=l+44|0;o=l+40|0;p=l+36|0;q=l+32|0;r=l+28|0;s=l+24|0;t=l+20|0;u=l+16|0;v=l+12|0;w=l+8|0;x=l+4|0;y=l;c[n>>2]=a;c[o>>2]=b;c[p>>2]=d;c[q>>2]=e;c[r>>2]=f;c[s>>2]=g;c[t>>2]=h;c[u>>2]=j;c[v>>2]=k;c[w>>2]=vi(c[n>>2]|0)|0;if((c[w>>2]|0)<0){c[m>>2]=188;z=c[m>>2]|0;i=l;return z|0}do if(c[t>>2]|0){c[y>>2]=4;n=Kv((c[1416+((c[w>>2]|0)*48|0)+36>>2]|0)+2|0)|0;c[y>>2]=(c[y>>2]|0)+n;n=Kv((c[1416+((c[w>>2]|0)*48|0)+40>>2]|0)+2|0)|0;c[y>>2]=(c[y>>2]|0)+n;c[y>>2]=(c[y>>2]|0)+1;c[x>>2]=Vf(c[y>>2]|0)|0;if(c[x>>2]|0){n=Xv(c[x>>2]|0,35557)|0;k=Xv(n,(c[1416+((c[w>>2]|0)*48|0)+36>>2]|0)+2|0)|0;Wv(k,(c[1416+((c[w>>2]|0)*48|0)+40>>2]|0)+2|0)|0;xq(c[c[t>>2]>>2]|0);k=wi(c[x>>2]|0)|0;c[c[t>>2]>>2]=k;$f(c[x>>2]|0);break}c[m>>2]=iu()|0;z=c[m>>2]|0;i=l;return z|0}while(0);if(c[o>>2]|0)c[c[o>>2]>>2]=c[1416+((c[w>>2]|0)*48|0)+12>>2];if(c[p>>2]|0)c[c[p>>2]>>2]=c[1416+((c[w>>2]|0)*48|0)+16>>2];if(c[q>>2]|0){xq(c[c[q>>2]>>2]|0);p=wi(c[1416+((c[w>>2]|0)*48|0)+20>>2]|0)|0;c[c[q>>2]>>2]=p}if(c[r>>2]|0){xq(c[c[r>>2]>>2]|0);p=wi(c[1416+((c[w>>2]|0)*48|0)+24>>2]|0)|0;c[c[r>>2]>>2]=p}if(c[s>>2]|0){xq(c[c[s>>2]>>2]|0);p=wi(c[1416+((c[w>>2]|0)*48|0)+28>>2]|0)|0;c[c[s>>2]>>2]=p}if(c[u>>2]|0){xq(c[c[u>>2]>>2]|0);p=wi(c[1416+((c[w>>2]|0)*48|0)+32>>2]|0)|0;c[c[u>>2]>>2]=p}if(c[v>>2]|0){xq(c[c[v>>2]>>2]|0);p=wi(c[1416+((c[w>>2]|0)*48|0)+44>>2]|0)|0;c[c[v>>2]>>2]=p}c[m>>2]=0;z=c[m>>2]|0;i=l;return z|0}function yi(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;e=i;i=i+128|0;f=e;g=e+112|0;h=e+108|0;j=e+104|0;k=e+100|0;l=e+96|0;m=e+92|0;n=e+48|0;o=e+44|0;p=e+40|0;q=e+36|0;r=e+32|0;s=e+28|0;c[h>>2]=a;c[j>>2]=b;c[k>>2]=d;c[m>>2]=0;c[o>>2]=0;c[p>>2]=0;d=n;b=d+44|0;do{c[d>>2]=0;d=d+4|0}while((d|0)<(b|0));if(c[k>>2]|0)c[c[k>>2]>>2]=0;if(!(c[h>>2]|0)){c[q>>2]=c[j>>2];if((c[q>>2]|0)>=0&(c[q>>2]|0)>>>0<22?(c[m>>2]=c[1416+((c[q>>2]|0)*48|0)>>2],(c[k>>2]|0)!=0):0)c[c[k>>2]>>2]=c[1416+((c[q>>2]|0)*48|0)+4>>2];c[g>>2]=c[m>>2];t=c[g>>2]|0;i=e;return t|0}j=c[h>>2]|0;c[f>>2]=n+8;c[f+4>>2]=n+12;c[f+8>>2]=n+16;c[f+12>>2]=o;c[f+16>>2]=n+32;c[f+20>>2]=n+36;c[f+24>>2]=0;c[l>>2]=zi(Rg(j,0,35562,f)|0)|0;a:do if((c[l>>2]|0)==68){c[r>>2]=xg(c[h>>2]|0,47161,5)|0;if((c[r>>2]|0)!=0?(c[s>>2]=Eg(c[r>>2]|0,1)|0,vg(c[r>>2]|0),(c[s>>2]|0)!=0):0){c[q>>2]=vi(c[s>>2]|0)|0;$f(c[s>>2]|0);if((c[q>>2]|0)>=0?(c[m>>2]=c[1416+((c[q>>2]|0)*48|0)>>2],(c[k>>2]|0)!=0):0)c[c[k>>2]>>2]=c[1416+((c[q>>2]|0)*48|0)+4>>2];c[g>>2]=c[m>>2];t=c[g>>2]|0;i=e;return t|0}}else if(!(c[l>>2]|0)){if((c[o>>2]|0)!=0?(co(n+20|0),(dj(n+20|0,c[o>>2]|0)|0)!=0):0)break;c[q>>2]=0;while(1){if(!(c[1416+((c[q>>2]|0)*48|0)>>2]|0))break a;hq(c[p>>2]|0);c[p>>2]=wi(c[1416+((c[q>>2]|0)*48|0)+20>>2]|0)|0;if(((((((ap(c[p>>2]|0,c[n+8>>2]|0)|0)==0?(hq(c[p>>2]|0),c[p>>2]=wi(c[1416+((c[q>>2]|0)*48|0)+24>>2]|0)|0,(ap(c[p>>2]|0,c[n+12>>2]|0)|0)==0):0)?(hq(c[p>>2]|0),c[p>>2]=wi(c[1416+((c[q>>2]|0)*48|0)+28>>2]|0)|0,(ap(c[p>>2]|0,c[n+16>>2]|0)|0)==0):0)?(hq(c[p>>2]|0),c[p>>2]=wi(c[1416+((c[q>>2]|0)*48|0)+32>>2]|0)|0,(ap(c[p>>2]|0,c[n+32>>2]|0)|0)==0):0)?(hq(c[p>>2]|0),c[p>>2]=wi(c[1416+((c[q>>2]|0)*48|0)+44>>2]|0)|0,(ap(c[p>>2]|0,c[n+36>>2]|0)|0)==0):0)?(hq(c[p>>2]|0),c[p>>2]=wi(c[1416+((c[q>>2]|0)*48|0)+36>>2]|0)|0,(ap(c[p>>2]|0,c[n+20>>2]|0)|0)==0):0)?(hq(c[p>>2]|0),c[p>>2]=wi(c[1416+((c[q>>2]|0)*48|0)+40>>2]|0)|0,(ap(c[p>>2]|0,c[n+20+4>>2]|0)|0)==0):0)break;c[q>>2]=(c[q>>2]|0)+1}c[m>>2]=c[1416+((c[q>>2]|0)*48|0)>>2];if(c[k>>2]|0)c[c[k>>2]>>2]=c[1416+((c[q>>2]|0)*48|0)+4>>2]}while(0);xq(c[p>>2]|0);xq(c[n+8>>2]|0);xq(c[n+12>>2]|0);xq(c[n+16>>2]|0);xq(c[o>>2]|0);fo(n+20|0);xq(c[n+32>>2]|0);xq(c[n+36>>2]|0);c[g>>2]=c[m>>2];t=c[g>>2]|0;i=e;return t|0}function zi(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;i=b;return c[d>>2]&65535|0}function Ai(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0;e=i;i=i+80|0;f=e+76|0;g=e+72|0;h=e+68|0;j=e+64|0;k=e+60|0;l=e+56|0;m=e+52|0;n=e+48|0;o=e+44|0;p=e+40|0;q=e+36|0;r=e+32|0;s=e+28|0;t=e+24|0;u=e+20|0;v=e+16|0;w=e+12|0;x=e+8|0;y=e+4|0;z=e;c[f>>2]=a;c[g>>2]=b;c[h>>2]=d;c[k>>2]=0;c[l>>2]=0;c[m>>2]=0;c[n>>2]=0;c[o>>2]=0;c[p>>2]=0;c[q>>2]=0;c[r>>2]=0;c[s>>2]=0;c[t>>2]=0;c[u>>2]=0;c[v>>2]=0;c[c[f>>2]>>2]=0;do if(c[g>>2]|0){c[w>>2]=xg(c[g>>2]|0,47167,0)|0;if((c[w>>2]|0)!=0?(c[j>>2]=jk(c[w>>2]|0,v,0)|0,vg(c[w>>2]|0),c[w>>2]=0,(c[j>>2]|0)!=0):0)break;c[w>>2]=xg(c[g>>2]|0,47161,5)|0;if((c[w>>2]|0)!=0?(c[v>>2]&512|0)==0:0){A=13;break}c[j>>2]=Bi(n,c[g>>2]|0,48644)|0;if((((((c[j>>2]|0)==0?(c[j>>2]=Bi(o,c[g>>2]|0,39370)|0,(c[j>>2]|0)==0):0)?(c[j>>2]=Bi(p,c[g>>2]|0,35570)|0,(c[j>>2]|0)==0):0)?(c[j>>2]=Ci(q,c[g>>2]|0,35572,0)|0,(c[j>>2]|0)==0):0)?(c[j>>2]=Bi(r,c[g>>2]|0,39374)|0,(c[j>>2]|0)==0):0)?(c[j>>2]=Bi(s,c[g>>2]|0,35583)|0,(c[j>>2]|0)==0):0)A=13}else{c[w>>2]=0;A=13}while(0);do if((A|0)==13){if((c[w>>2]|0)!=0|(c[h>>2]|0)!=0){if(c[w>>2]|0){c[x>>2]=Eg(c[w>>2]|0,1)|0;vg(c[w>>2]|0);if(!(c[x>>2]|0)){c[j>>2]=65;break}}else c[x>>2]=0;c[y>>2]=ag(1,44)|0;if(!(c[y>>2]|0)){c[j>>2]=iu()|0;$f(c[x>>2]|0);break}c[j>>2]=ui(0,(c[x>>2]|0)!=0?c[x>>2]|0:c[h>>2]|0,c[y>>2]|0,0)|0;$f(c[x>>2]|0);d=c[y>>2]|0;if(c[j>>2]|0){$f(d);break}c[l>>2]=c[d>>2];c[m>>2]=c[(c[y>>2]|0)+4>>2];if(!(c[n>>2]|0)){c[n>>2]=c[(c[y>>2]|0)+8>>2];c[(c[y>>2]|0)+8>>2]=0}if(!(c[o>>2]|0)){c[o>>2]=c[(c[y>>2]|0)+12>>2];c[(c[y>>2]|0)+12>>2]=0}if(!(c[p>>2]|0)){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?1:(c[(c[(c[j>>2]|0)+16>>2]|0)+12>>2]&32|0)==0):0)o=c[(c[j>>2]|0)+16>>2]|0;else o=mq(c[(c[j>>2]|0)+16>>2]|0)|0;c[g>>2]=o;n=c[g>>2]|0;i=f;return n|0}if((gv(c[h>>2]|0,39370)|0)==0?(c[(c[j>>2]|0)+20>>2]|0)!=0:0){if((c[(c[j>>2]|0)+20>>2]|0)!=0?!((c[k>>2]|0)!=0?1:(c[(c[(c[j>>2]|0)+20>>2]|0)+12>>2]&32|0)==0):0)p=c[(c[j>>2]|0)+20>>2]|0;else p=mq(c[(c[j>>2]|0)+20>>2]|0)|0;c[g>>2]=p;n=c[g>>2]|0;i=f;return n|0}if((gv(c[h>>2]|0,35570)|0)==0?(c[(c[j>>2]|0)+24>>2]|0)!=0:0){if((c[(c[j>>2]|0)+24>>2]|0)!=0?!((c[k>>2]|0)!=0?1:(c[(c[(c[j>>2]|0)+24>>2]|0)+12>>2]&32|0)==0):0)q=c[(c[j>>2]|0)+24>>2]|0;else q=mq(c[(c[j>>2]|0)+24>>2]|0)|0;c[g>>2]=q;n=c[g>>2]|0;i=f;return n|0}if((gv(c[h>>2]|0,39374)|0)==0?(c[(c[j>>2]|0)+32>>2]|0)!=0:0){if((c[(c[j>>2]|0)+32>>2]|0)!=0?!((c[k>>2]|0)!=0?1:(c[(c[(c[j>>2]|0)+32>>2]|0)+12>>2]&32|0)==0):0)r=c[(c[j>>2]|0)+32>>2]|0;else r=mq(c[(c[j>>2]|0)+32>>2]|0)|0;c[g>>2]=r;n=c[g>>2]|0;i=f;return n|0}if((gv(c[h>>2]|0,35583)|0)==0?(c[(c[j>>2]|0)+36>>2]|0)!=0:0){if((c[(c[j>>2]|0)+36>>2]|0)!=0?!((c[k>>2]|0)!=0?1:(c[(c[(c[j>>2]|0)+36>>2]|0)+12>>2]&32|0)==0):0)s=c[(c[j>>2]|0)+36>>2]|0;else s=mq(c[(c[j>>2]|0)+36>>2]|0)|0;c[g>>2]=s;n=c[g>>2]|0;i=f;return n|0}if((gv(c[h>>2]|0,35585)|0)==0?(c[(c[j>>2]|0)+44>>2]|0)!=0:0){if((c[(c[j>>2]|0)+44>>2]|0)!=0?!((c[k>>2]|0)!=0?1:(c[(c[(c[j>>2]|0)+44>>2]|0)+12>>2]&32|0)==0):0)t=c[(c[j>>2]|0)+44>>2]|0;else t=mq(c[(c[j>>2]|0)+44>>2]|0)|0;c[g>>2]=t;n=c[g>>2]|0;i=f;return n|0}if(((gv(c[h>>2]|0,35684)|0)==0?(c[(c[j>>2]|0)+28>>2]|0)!=0:0)?(c[c[(c[j>>2]|0)+28>>2]>>2]|0)!=0:0){if((c[c[(c[j>>2]|0)+28>>2]>>2]|0)!=0?!((c[k>>2]|0)!=0?1:(c[(c[c[(c[j>>2]|0)+28>>2]>>2]|0)+12>>2]&32|0)==0):0)u=c[c[(c[j>>2]|0)+28>>2]>>2]|0;else u=mq(c[c[(c[j>>2]|0)+28>>2]>>2]|0)|0;c[g>>2]=u;n=c[g>>2]|0;i=f;return n|0}if(((gv(c[h>>2]|0,35688)|0)==0?(c[(c[j>>2]|0)+28>>2]|0)!=0:0)?(c[(c[(c[j>>2]|0)+28>>2]|0)+4>>2]|0)!=0:0){if((c[(c[(c[j>>2]|0)+28>>2]|0)+4>>2]|0)!=0?!((c[k>>2]|0)!=0?1:(c[(c[(c[(c[j>>2]|0)+28>>2]|0)+4>>2]|0)+12>>2]&32|0)==0):0)v=c[(c[(c[j>>2]|0)+28>>2]|0)+4>>2]|0;else v=mq(c[(c[(c[j>>2]|0)+28>>2]|0)+4>>2]|0)|0;c[g>>2]=v;n=c[g>>2]|0;i=f;return n|0}if(((gv(c[h>>2]|0,35692)|0)==0?(c[(c[j>>2]|0)+40>>2]|0)!=0:0)?(c[c[(c[j>>2]|0)+40>>2]>>2]|0)!=0:0){if((c[c[(c[j>>2]|0)+40>>2]>>2]|0)!=0?!((c[k>>2]|0)!=0?1:(c[(c[c[(c[j>>2]|0)+40>>2]>>2]|0)+12>>2]&32|0)==0):0)w=c[c[(c[j>>2]|0)+40>>2]>>2]|0;else w=mq(c[c[(c[j>>2]|0)+40>>2]>>2]|0)|0;c[g>>2]=w;n=c[g>>2]|0;i=f;return n|0}if(((gv(c[h>>2]|0,35696)|0)==0?(c[(c[j>>2]|0)+40>>2]|0)!=0:0)?(c[(c[(c[j>>2]|0)+40>>2]|0)+4>>2]|0)!=0:0){if((c[(c[(c[j>>2]|0)+28>>2]|0)+4>>2]|0)!=0?!((c[k>>2]|0)!=0?1:(c[(c[(c[(c[j>>2]|0)+28>>2]|0)+4>>2]|0)+12>>2]&32|0)==0):0)x=c[(c[(c[j>>2]|0)+40>>2]|0)+4>>2]|0;else x=mq(c[(c[(c[j>>2]|0)+40>>2]|0)+4>>2]|0)|0;c[g>>2]=x;n=c[g>>2]|0;i=f;return n|0}if((gv(c[h>>2]|0,35572)|0)==0?(c[(c[j>>2]|0)+28>>2]|0)!=0:0){c[g>>2]=cj(c[(c[j>>2]|0)+28>>2]|0,c[j>>2]|0)|0;n=c[g>>2]|0;i=f;return n|0}do if((a[c[h>>2]>>0]|0)==113){if((a[(c[h>>2]|0)+1>>0]|0)!=0?(a[(c[h>>2]|0)+1>>0]|0)!=64:0)break;if(!(c[(c[j>>2]|0)+40>>2]|0)){x=ej(0,c[j>>2]|0,0,0)|0;c[(c[j>>2]|0)+40>>2]=x}if(!(c[(c[j>>2]|0)+40>>2]|0)){c[g>>2]=0;n=c[g>>2]|0;i=f;return n|0}if((a[(c[h>>2]|0)+1>>0]|0)!=64){c[g>>2]=cj(c[(c[j>>2]|0)+40>>2]|0,c[j>>2]|0)|0;n=c[g>>2]|0;i=f;return n|0}if((gv((c[h>>2]|0)+2|0,47127)|0)==0?(c[c[j>>2]>>2]|0)==2:0){if(Ii(c[(c[j>>2]|0)+40>>2]|0,c[j>>2]|0,0,0,0,l,m)|0)break;c[g>>2]=iq(0,c[l>>2]|0,c[m>>2]<<3)|0;n=c[g>>2]|0;i=f;return n|0}}while(0);c[g>>2]=0;n=c[g>>2]|0;i=f;return n|0}function Fi(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;d=i;i=i+16|0;e=d+8|0;f=d+4|0;g=d;c[f>>2]=a;c[g>>2]=b;if((gv(c[f>>2]|0,35572)|0)==0?(c[(c[g>>2]|0)+28>>2]|0)!=0:0){c[e>>2]=Gi(c[(c[g>>2]|0)+28>>2]|0)|0;h=c[e>>2]|0;i=d;return h|0}if(!(gv(c[f>>2]|0,49872)|0)){if(!(c[(c[g>>2]|0)+40>>2]|0)){f=ej(0,c[g>>2]|0,0,0)|0;c[(c[g>>2]|0)+40>>2]=f}if(c[(c[g>>2]|0)+40>>2]|0){c[e>>2]=Gi(c[(c[g>>2]|0)+40>>2]|0)|0;h=c[e>>2]|0;i=d;return h|0}}c[e>>2]=0;h=c[e>>2]|0;i=d;return h|0}function Gi(a){a=a|0;var b=0,d=0,e=0,f=0;b=i;i=i+16|0;d=b+4|0;e=b;c[d>>2]=a;if(c[d>>2]|0){c[e>>2]=bo(0)|0;Hi(c[e>>2]|0,c[d>>2]|0);f=c[e>>2]|0;i=b;return f|0}else{c[e>>2]=0;f=c[e>>2]|0;i=b;return f|0}return 0}function Hi(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=i;i=i+16|0;e=d+4|0;f=d;c[e>>2]=a;c[f>>2]=b;oq(c[c[e>>2]>>2]|0,c[c[f>>2]>>2]|0)|0;oq(c[(c[e>>2]|0)+4>>2]|0,c[(c[f>>2]|0)+4>>2]|0)|0;oq(c[(c[e>>2]|0)+8>>2]|0,c[(c[f>>2]|0)+8>>2]|0)|0;i=d;return}function Ii(a,b,d,e,f,g,h){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0;j=i;i=i+48|0;k=j+40|0;l=j+36|0;m=j+32|0;n=j+28|0;o=j+24|0;p=j+20|0;q=j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|0);c[l>>2]=0;v=c[l>>2]|0;i=k;return v|0}function Ki(a,b){a=a|0;b=b|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;e=i;i=i+48|0;f=e+36|0;g=e+32|0;h=e+28|0;j=e+24|0;k=e+20|0;l=e+16|0;m=e+12|0;n=e+8|0;o=e+4|0;p=e;c[g>>2]=a;c[h>>2]=b;if((c[g>>2]|0)!=0?(c[(c[g>>2]|0)+12>>2]&4|0)!=0:0){c[k>>2]=kq(c[g>>2]|0,l)|0;if(!(c[k>>2]|0)){c[f>>2]=65;q=c[f>>2]|0;i=e;return q|0}c[l>>2]=(((c[l>>2]|0)+7|0)>>>0)/8|0;do if((c[l>>2]|0)>>>0>1?(((c[l>>2]|0)>>>0)%2|0|0)!=0:0){b=c[k>>2]|0;if((d[c[k>>2]>>0]|0|0)!=4){if((d[b>>0]|0|0)!=64)break;if(jq(c[g>>2]|0,(c[k>>2]|0)+1|0,(c[l>>2]|0)-1<<3)|0)break;c[f>>2]=iu()|0;q=c[f>>2]|0;i=e;return q|0}c[j>>2]=Dp(m,1,b+1|0,(((c[l>>2]|0)-1|0)>>>0)/2|0,0)|0;if(c[j>>2]|0){c[f>>2]=c[j>>2];q=c[f>>2]|0;i=e;return q|0}c[j>>2]=Dp(n,1,(c[k>>2]|0)+1+((((c[l>>2]|0)-1|0)>>>0)/2|0)|0,(((c[l>>2]|0)-1|0)>>>0)/2|0,0)|0;b=c[m>>2]|0;if(c[j>>2]|0){hq(b);c[f>>2]=c[j>>2];q=c[f>>2]|0;i=e;return q|0}c[j>>2]=Ji(b,c[n>>2]|0,((c[h>>2]|0)>>>0)/8|0,0,o,p)|0;hq(c[m>>2]|0);hq(c[n>>2]|0);if(!(c[j>>2]|0)){iq(c[g>>2]|0,c[o>>2]|0,c[p>>2]<<3)|0;break}c[f>>2]=c[j>>2];q=c[f>>2]|0;i=e;return q|0}while(0);c[f>>2]=0;q=c[f>>2]|0;i=e;return q|0}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o>>2]|0,c[(c[l>>2]|0)+16>>2]|0);nq(c[q>>2]|0,c[q>>2]|0);if(!(ap(c[q>>2]|0,c[n>>2]|0)|0)){if(!(c[17698]|0))c[17698]=Mi(35853)|0;vp(c[h>>2]|0,c[h>>2]|0,c[17698]|0,c[(c[l>>2]|0)+16>>2]|0);vp(c[q>>2]|0,c[h>>2]|0,c[h>>2]|0,c[(c[l>>2]|0)+16>>2]|0);vp(c[q>>2]|0,c[q>>2]|0,c[o>>2]|0,c[(c[l>>2]|0)+16>>2]|0);nq(c[q>>2]|0,c[q>>2]|0);if(!(ap(c[q>>2]|0,c[n>>2]|0)|0))c[m>>2]=65}d=So(c[h>>2]|0,0)|0;if((d|0)!=(((c[k>>2]|0)!=0^1^1)&1|0))No(c[h>>2]|0,c[(c[l>>2]|0)+16>>2]|0,c[h>>2]|0);hq(c[q>>2]|0);hq(c[p>>2]|0);hq(c[o>>2]|0);hq(c[n>>2]|0);c[g>>2]=c[m>>2];r=c[g>>2]|0;i=f;return r|0}function Mi(a){a=a|0;var b=0,d=0,e=0,f=0,g=0;b=i;i=i+16|0;d=b;e=b+12|0;f=b+8|0;g=b+4|0;c[e>>2]=a;c[f>>2]=Dp(g,4,c[e>>2]|0,0,0)|0;if(c[f>>2]|0){c[d>>2]=fu(c[f>>2]|0)|0;Bf(35818,d)}else{i=b;return c[g>>2]|0}return 0}function Ni(b,e,f,g,h){b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;j=i;i=i+64|0;k=j+48|0;l=j+44|0;m=j+40|0;n=j+36|0;o=j+32|0;p=j+28|0;q=j+24|0;r=j+20|0;s=j+16|0;t=j+12|0;u=j+8|0;v=j+4|0;w=j;c[l>>2]=b;c[m>>2]=e;c[n>>2]=f;c[o>>2]=g;c[p>>2]=h;do if((c[l>>2]|0)!=0?(c[(c[l>>2]|0)+12>>2]&4|0)!=0:0){c[u>>2]=kq(c[l>>2]|0,s)|0;if(!(c[u>>2]|0)){c[k>>2]=65;x=c[k>>2]|0;i=j;return x|0}c[s>>2]=(((c[s>>2]|0)+7|0)>>>0)/8|0;do if((c[s>>2]|0)>>>0>1?(((c[s>>2]|0)>>>0)%2|0|0)!=0:0){h=c[u>>2]|0;if((d[c[u>>2]>>0]|0|0)!=4){if((d[h>>0]|0|0)!=64)break;c[s>>2]=(c[s>>2]|0)+-1;c[u>>2]=(c[u>>2]|0)+1;break}c[q>>2]=Dp(v,1,h+1|0,(((c[s>>2]|0)-1|0)>>>0)/2|0,0)|0;if(c[q>>2]|0){c[k>>2]=c[q>>2];x=c[k>>2]|0;i=j;return x|0}c[q>>2]=Dp(w,1,(c[u>>2]|0)+1+((((c[s>>2]|0)-1|0)>>>0)/2|0)|0,(((c[s>>2]|0)-1|0)>>>0)/2|0,0)|0;if(c[q>>2]|0){hq(c[v>>2]|0);c[k>>2]=c[q>>2];x=c[k>>2]|0;i=j;return x|0}if((c[o>>2]|0)!=0?(c[q>>2]=Ji(c[v>>2]|0,c[w>>2]|0,((c[(c[m>>2]|0)+12>>2]|0)>>>0)/8|0,0,c[o>>2]|0,c[p>>2]|0)|0,(c[q>>2]|0)!=0):0){hq(c[v>>2]|0);hq(c[w>>2]|0);c[k>>2]=c[q>>2];x=c[k>>2]|0;i=j;return x|0}qq(c[c[n>>2]>>2]|0,c[v>>2]|0);qq(c[(c[n>>2]|0)+4>>2]|0,c[w>>2]|0);sq(c[(c[n>>2]|0)+8>>2]|0,1)|0;c[k>>2]=0;x=c[k>>2]|0;i=j;return x|0}while(0);c[r>>2]=Vf((c[s>>2]|0)!=0?c[s>>2]|0:1)|0;if(c[r>>2]|0){Dx(c[r>>2]|0,c[u>>2]|0,c[s>>2]|0)|0;Oi(c[r>>2]|0,c[s>>2]|0);break}c[k>>2]=iu()|0;x=c[k>>2]|0;i=j;return x|0}else y=21;while(0);if((y|0)==21?(c[r>>2]=zp(c[l>>2]|0,((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56|0;m=g+52|0;n=g+48|0;o=g+44|0;p=g+40|0;q=g+8|0;r=g+4|0;s=g;c[j>>2]=b;c[k>>2]=e;c[l>>2]=f;c[n>>2]=0;c[c[j>>2]>>2]=0;c[r>>2]=10;if((c[r>>2]|0)!=10){c[h>>2]=5;t=c[h>>2]|0;i=g;return t|0}c[s>>2]=(((c[(c[l>>2]|0)+12>>2]|0)+7|0)>>>0)/8|0;if((c[s>>2]|0)!=32){c[h>>2]=63;t=c[h>>2]|0;i=g;return t|0}c[p>>2]=bg(2,c[s>>2]|0)|0;if(!(c[p>>2]|0)){c[h>>2]=iu()|0;t=c[h>>2]|0;i=g;return t|0};c[q>>2]=0;c[q+4>>2]=0;c[q+8>>2]=0;c[q+12>>2]=0;c[q+16>>2]=0;c[q+20>>2]=0;c[q+24>>2]=0;c[q+28>>2]=0;c[n>>2]=zp(c[k>>2]|0,0,o,0)|0;k=c[p>>2]|0;if(!(c[n>>2]|0)){$f(k);c[h>>2]=iu()|0;t=c[h>>2]|0;i=g;return t|0}c[q+12>>2]=k;c[q+4>>2]=0;if((c[s>>2]|0)>>>0>(c[o>>2]|0)>>>0)u=(c[s>>2]|0)-(c[o>>2]|0)|0;else u=0;c[q+8>>2]=u;c[q+16+12>>2]=c[n>>2];c[q+16+4>>2]=0;c[q+16+8>>2]=c[o>>2];c[m>>2]=Sj(c[r>>2]|0,0,c[p>>2]|0,q,2)|0;$f(c[n>>2]|0);n=c[p>>2]|0;if(c[m>>2]|0){$f(n);c[h>>2]=c[m>>2];t=c[h>>2]|0;i=g;return t|0}else{Oi(n,32);a[c[p>>2]>>0]=(d[c[p>>2]>>0]|0)&127|64;n=(c[p>>2]|0)+31|0;a[n>>0]=(d[n>>0]|0)&248;c[c[j>>2]>>2]=c[p>>2];c[h>>2]=0;t=c[h>>2]|0;i=g;return t|0}return 0}function Qi(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s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[c[k>>2]>>2];c[(c[j>>2]|0)+4>>2]=c[(c[k>>2]|0)+4>>2];l=mq(c[(c[k>>2]|0)+8>>2]|0)|0;c[(c[j>>2]|0)+8>>2]=l;l=mq(c[(c[k>>2]|0)+12>>2]|0)|0;c[(c[j>>2]|0)+12>>2]=l;l=mq(c[(c[k>>2]|0)+16>>2]|0)|0;c[(c[j>>2]|0)+16>>2]=l;co((c[j>>2]|0)+20|0);Ui((c[j>>2]|0)+20|0,(c[k>>2]|0)+20|0);l=mq(c[(c[k>>2]|0)+32>>2]|0)|0;c[(c[j>>2]|0)+32>>2]=l;l=mq(c[(c[k>>2]|0)+36>>2]|0)|0;c[(c[j>>2]|0)+36>>2]=l;co((c[j>>2]|0)+44|0);Ui((c[j>>2]|0)+44|0,s);fo(s);y=c[p>>2]|0;xq(y);z=c[q>>2]|0;xq(z);A=c[r>>2]|0;xq(A);B=c[x>>2]|0;$f(B);C=c[n>>2]|0;i=h;return C|0}function Ri(){return Si(iu()|0)|0}function Si(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;a=Ti(1,c[d>>2]|0)|0;i=b;return a|0}function Ti(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;d=i;i=i+16|0;e=d+4|0;f=d;c[e>>2]=a;c[f>>2]=b;if(!(c[f>>2]|0)){g=0;i=d;return g|0}g=(c[e>>2]&127)<<24|c[f>>2]&65535;i=d;return g|0}function Ui(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=i;i=i+16|0;e=d+4|0;f=d;c[e>>2]=a;c[f>>2]=b;oq(c[c[e>>2]>>2]|0,c[c[f>>2]>>2]|0)|0;oq(c[(c[e>>2]|0)+4>>2]|0,c[(c[f>>2]|0)+4>>2]|0)|0;oq(c[(c[e>>2]|0)+8>>2]|0,c[(c[f>>2]|0)+8>>2]|0)|0;i=d;return}function Vi(a,b,d,e,f,g){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,j=0,k=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0,c[(c[l>>2]|0)+32>>2]|0);c[q>>2]=Wi(c[n>>2]|0,c[s>>2]|0,y,z)|0;if(!(c[q>>2]|0)){if(jg(1)|0)Ff(35972,c[y>>2]|0,c[z>>2]|0);iq(c[n>>2]|0,c[y>>2]|0,c[z>>2]<<3)|0;c[y>>2]=0;c[q>>2]=0}}}}}while(0);xq(c[E>>2]|0);xq(c[F>>2]|0);xq(c[G>>2]|0);xq(c[H>>2]|0);$f(c[u>>2]|0);no(c[r>>2]|0);fo(C);fo(D);$f(c[A>>2]|0);$f(c[y>>2]|0);c[j>>2]=c[q>>2];I=c[j>>2]|0;i=h;return I|0}c[j>>2]=79;I=c[j>>2]|0;i=h;return I|0}function Wi(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0;f=i;i=i+32|0;g=f+24|0;h=f+20|0;j=f+16|0;k=f+12|0;l=f+8|0;m=f+4|0;n=f;c[h>>2]=a;c[j>>2]=b;c[k>>2]=d;c[l>>2]=e;c[m>>2]=zp(c[h>>2]|0,c[j>>2]|0,n,0)|0;if(c[m>>2]|0){c[c[k>>2]>>2]=c[m>>2];c[c[l>>2]>>2]=c[n>>2];c[g>>2]=0;o=c[g>>2]|0;i=f;return o|0}else{c[g>>2]=iu()|0;o=c[g>>2]|0;i=f;return o|0}return 0}function Xi(a,b,d,e,f,g){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0;h=i;i=i+240|0;j=h+172|0;k=h+168|0;l=h+164|0;m=h+160|0;n=h+156|0;o=h+152|0;p=h+148|0;q=h+144|0;r=h+140|0;s=h+136|0;t=h+132|0;u=h+120|0;v=h+116|0;w=h+112|0;x=h+108|0;y=h+104|0;z=h+100|0;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E+12>>2]=c[y>>2];c[E+4>>2]=0;c[E+8>>2]=c[B>>2];c[E+16+12>>2]=c[v>>2];c[E+16+4>>2]=0;c[E+16+8>>2]=c[w>>2];c[E+32+12>>2]=c[x>>2];c[E+32+4>>2]=0;c[E+32+8>>2]=c[A>>2];c[q>>2]=Sj(c[o>>2]|0,0,D,E,3)|0;if(!(c[q>>2]|0)){Oi(D,64);if(jg(1)|0)Ff(35965,D,64);Cp(c[F>>2]|0,D,64,0);c[J>>2]=lq(c[n>>2]|0,t)|0;c[K>>2]=(((c[t>>2]|0)+7|0)>>>0)/8|0;Oi(c[J>>2]|0,c[K>>2]|0);if(jg(1)|0)Ff(53374,c[J>>2]|0,c[K>>2]|0);Cp(c[G>>2]|0,c[J>>2]|0,c[K>>2]|0,0);$f(c[J>>2]|0);if((c[K>>2]|0)!=(c[s>>2]|0)){c[q>>2]=139;break}Go(H,c[G>>2]|0,(c[l>>2]|0)+20|0,c[r>>2]|0);Go(I,c[F>>2]|0,u,c[r>>2]|0);nq(c[I>>2]|0,c[I>>2]|0);Ao(H,H,I,c[r>>2]|0);c[q>>2]=Ii(H,c[r>>2]|0,c[G>>2]|0,c[F>>2]|0,0,z,C)|0;if(!(c[q>>2]|0)){do if((c[C>>2]|0)==(c[B>>2]|0)){if(mw(c[z>>2]|0,c[y>>2]|0,c[C>>2]|0)|0)break;c[q>>2]=0;break a}while(0);c[q>>2]=8}}}while(0);$f(c[v>>2]|0);$f(c[z>>2]|0);no(c[r>>2]|0);xq(c[G>>2]|0);xq(c[F>>2]|0);fo(H);fo(I);fo(u);c[j>>2]=c[q>>2];L=c[j>>2]|0;i=h;return L|0}c[j>>2]=79;L=c[j>>2]|0;i=h;return L|0}function Yi(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;hq(c[(c[d>>2]|0)+8>>2]|0);c[(c[d>>2]|0)+8>>2]=0;hq(c[(c[d>>2]|0)+12>>2]|0);c[(c[d>>2]|0)+12>>2]=0;hq(c[(c[d>>2]|0)+16>>2]|0);c[(c[d>>2]|0)+16>>2]=0;fo((c[d>>2]|0)+20|0);hq(c[(c[d>>2]|0)+32>>2]|0);c[(c[d>>2]|0)+32>>2]=0;hq(c[(c[d>>2]|0)+36>>2]|0);c[(c[d>>2]|0)+36>>2]=0;i=b;return}function Zi(a,b){a=a|0;b=b|0;var d=0,e=0;d=i;i=i+48|0;e=d;c[e>>2]=c[b>>2];c[e+4>>2]=c[b+4>>2];c[e+40>>2]=c[b+40>>2];c[e+8>>2]=mq(c[b+8>>2]|0)|0;c[e+12>>2]=mq(c[b+12>>2]|0)|0;c[e+16>>2]=mq(c[b+16>>2]|0)|0;co(e+20|0);_i(e+20|0,b+20|0);c[e+32>>2]=mq(c[b+32>>2]|0)|0;c[e+36>>2]=mq(c[b+36>>2]|0)|0;b=a;a=e;e=b+44|0;do{c[b>>2]=c[a>>2];b=b+4|0;a=a+4|0}while((b|0)<(e|0));i=d;return}function _i(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=i;i=i+16|0;e=d+4|0;f=d;c[e>>2]=a;c[f>>2]=b;oq(c[c[e>>2]>>2]|0,c[c[f>>2]>>2]|0)|0;oq(c[(c[e>>2]|0)+4>>2]|0,c[(c[f>>2]|0)+4>>2]|0)|0;oq(c[(c[e>>2]|0)+8>>2]|0,c[(c[f>>2]|0)+8>>2]|0)|0;i=d;return}function $i(a){a=a|0;var b=0,d=0,e=0;b=i;i=i+16|0;d=b+4|0;e=b;c[d>>2]=a;c[e>>2]=37933;switch(c[d>>2]|0){case 0:{c[e>>2]=35979;break}case 1:{c[e>>2]=45707;break}case 2:{c[e>>2]=35991;break}default:{}}i=b;return c[e>>2]|0}function aj(a){a=a|0;var b=0,d=0,e=0;b=i;i=i+16|0;d=b+4|0;e=b;c[d>>2]=a;c[e>>2]=37933;switch(c[d>>2]|0){case 0:{c[e>>2]=35999;break}case 1:{c[e>>2]=36008;break}default:{}}i=b;return c[e>>2]|0}function bj(b,d,e){b=b|0;d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=d+4|0;j=d;c[e>>2]=a;c[f>>2]=b;c[g>>2]=vq(0)|0;c[h>>2]=vq(0)|0;if(Zn(c[g>>2]|0,c[h>>2]|0,c[e>>2]|0,c[f>>2]|0)|0)c[j>>2]=0;else c[j>>2]=bj(c[g>>2]|0,c[h>>2]|0,c[(c[f>>2]|0)+16>>2]|0)|0;hq(c[g>>2]|0);hq(c[h>>2]|0);i=d;return c[j>>2]|0}function dj(a,b){a=a|0;b=b|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;e=i;i=i+48|0;f=e+36|0;g=e+32|0;h=e+28|0;j=e+24|0;k=e+20|0;l=e+16|0;m=e+12|0;n=e+8|0;o=e+4|0;p=e;c[g>>2]=a;c[h>>2]=b;do if((c[h>>2]|0)!=0?(c[(c[h>>2]|0)+12>>2]&4|0)!=0:0){c[l>>2]=kq(c[h>>2]|0,p)|0;if(c[l>>2]|0){c[k>>2]=(((c[p>>2]|0)+7|0)>>>0)/8|0;c[m>>2]=0;break}c[f>>2]=65;q=c[f>>2]|0;i=e;return q|0}else r=6;while(0);do if((r|0)==6){c[k>>2]=(((Ro(c[h>>2]|0)|0)+7|0)>>>0)/8|0;c[m>>2]=dg(c[k>>2]|0)|0;c[j>>2]=Hp(5,c[m>>2]|0,c[k>>2]|0,k,c[h>>2]|0)|0;p=c[m>>2]|0;if(!(c[j>>2]|0)){c[l>>2]=p;break}$f(p);c[f>>2]=c[j>>2];q=c[f>>2]|0;i=e;return q|0}while(0);if((c[k>>2]|0)>>>0<1){$f(c[m>>2]|0);c[f>>2]=65;q=c[f>>2]|0;i=e;return q|0}if((d[c[l>>2]>>0]|0|0)!=4){$f(c[m>>2]|0);c[f>>2]=69;q=c[f>>2]|0;i=e;return q|0}if((((c[k>>2]|0)-1|0)>>>0)%2|0){$f(c[m>>2]|0);c[f>>2]=65;q=c[f>>2]|0;i=e;return q|0}c[k>>2]=(((c[k>>2]|0)-1|0)>>>0)/2|0;c[j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[h>>2]=bo(0)|0;if(c[h>>2]|0)Go(c[h>>2]|0,c[m>>2]|0,c[k>>2]|0,c[j>>2]|0);hq(c[m>>2]|0)}else{if(!(c[h>>2]|0))c[h>>2]=bo(0)|0;if(c[h>>2]|0)Go(c[h>>2]|0,c[l>>2]|0,c[k>>2]|0,c[j>>2]|0)}c[g>>2]=c[h>>2];o=c[g>>2]|0;i=f;return o|0}c[g>>2]=0;o=c[g>>2]|0;i=f;return o|0}function fj(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0;e=i;i=i+16|0;f=e+12|0;g=e+8|0;h=e+4|0;j=e;c[f>>2]=a;c[g>>2]=b;c[h>>2]=d;c[j>>2]=0;if(Vj(c[f>>2]|0,8,0,0)|0){c[j>>2]=5;if(c[h>>2]|0)Fb[c[h>>2]&1](36319,c[f>>2]|0,38026,37063)}else c[j>>2]=gj(c[f>>2]|0,c[g>>2]|0,c[h>>2]|0)|0;h=nj(c[j>>2]|0)|0;i=e;return h|0}function gj(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0;e=i;i=i+16|0;f=e+12|0;g=e+8|0;h=e+4|0;j=e;c[f>>2]=a;c[g>>2]=b;c[h>>2]=d;switch(c[f>>2]|0){case 2:{c[j>>2]=hj(c[g>>2]|0,c[h>>2]|0)|0;break}case 11:{c[j>>2]=jj(c[g>>2]|0,c[h>>2]|0)|0;break}case 8:{c[j>>2]=kj(c[g>>2]|0,c[h>>2]|0)|0;break}case 9:{c[j>>2]=lj(c[g>>2]|0,c[h>>2]|0)|0;break}case 10:{c[j>>2]=mj(c[g>>2]|0,c[h>>2]|0)|0;break}default:c[j>>2]=5}i=e;return c[j>>2]|0}function hj(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0;e=i;i=i+160|0;f=e+24|0;g=e+20|0;h=e+16|0;j=e+12|0;k=e+8|0;l=e+32|0;m=e+4|0;n=e;c[g>>2]=b;c[h>>2]=d;c[j>>2]=36059;c[m>>2]=0;while(1){if((c[m>>2]|0)>=64)break;a[l+(c[m>>2]|0)>>0]=c[m>>2];c[m>>2]=(c[m>>2]|0)+1}c[k>>2]=ij(2,36074,9,l,64,36084,20)|0;do if(!(c[k>>2]|0)){if(c[g>>2]|0){c[j>>2]=36181;c[m>>2]=0;c[n>>2]=48;while(1){if((c[m>>2]|0)>=20)break;d=c[n>>2]|0;c[n>>2]=d+1;a[l+(c[m>>2]|0)>>0]=d;c[m>>2]=(c[m>>2]|0)+1}c[k>>2]=ij(2,36196,9,l,20,36206,20)|0;if(c[k>>2]|0)break;c[j>>2]=36227;c[m>>2]=0;c[n>>2]=80;while(1){if((c[m>>2]|0)>=100)break;d=c[n>>2]|0;c[n>>2]=d+1;a[l+(c[m>>2]|0)>>0]=d;c[m>>2]=(c[m>>2]|0)+1}c[k>>2]=ij(2,36242,9,l,100,36252,20)|0;if(c[k>>2]|0)break;c[j>>2]=36273;c[m>>2]=0;c[n>>2]=112;while(1){if((c[m>>2]|0)>=49)break;d=c[n>>2]|0;c[n>>2]=d+1;a[l+(c[m>>2]|0)>>0]=d;c[m>>2]=(c[m>>2]|0)+1}c[k>>2]=ij(2,36288,9,l,49,36298,20)|0;if(c[k>>2]|0)break}c[f>>2]=0;o=c[f>>2]|0;i=e;return o|0}while(0);if(c[h>>2]|0)Fb[c[h>>2]&1](36319,2,c[j>>2]|0,c[k>>2]|0);c[f>>2]=50;o=c[f>>2]|0;i=e;return o|0}function ij(a,b,d,e,f,g,h){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;j=i;i=i+48|0;k=j+36|0;l=j+32|0;m=j+28|0;n=j+24|0;o=j+20|0;p=j+16|0;q=j+12|0;r=j+8|0;s=j+4|0;t=j;c[l>>2]=a;c[m>>2]=b;c[n>>2]=d;c[o>>2]=e;c[p>>2]=f;c[q>>2]=g;c[r>>2]=h;h=Uj(c[l>>2]|0)|0;if((h|0)!=(c[r>>2]|0)){c[k>>2]=36105;u=c[k>>2]|0;i=j;return u|0}if(wj(s,c[l>>2]|0,2)|0){c[k>>2]=49933;u=c[k>>2]|0;i=j;return u|0}h=(Lj(c[s>>2]|0,c[o>>2]|0,c[p>>2]|0)|0)!=0;p=c[s>>2]|0;if(h){Ej(p);c[k>>2]=36124;u=c[k>>2]|0;i=j;return u|0}Fj(p,c[m>>2]|0,c[n>>2]|0);c[t>>2]=Rj(c[s>>2]|0,c[l>>2]|0)|0;if(!(c[t>>2]|0)){Ej(c[s>>2]|0);c[k>>2]=36146;u=c[k>>2]|0;i=j;return u|0}l=(mw(c[t>>2]|0,c[q>>2]|0,c[r>>2]|0)|0)!=0;Ej(c[s>>2]|0);if(l){c[k>>2]=36166;u=c[k>>2]|0;i=j;return u|0}else{c[k>>2]=0;u=c[k>>2]|0;i=j;return u|0}return 0}function jj(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0;d=i;i=i+32|0;e=d+20|0;f=d+16|0;g=d+12|0;h=d+8|0;j=d+4|0;k=d;c[f>>2]=a;c[g>>2]=b;c[k>>2]=0;while(1){if(!(c[2768+((c[k>>2]|0)*40|0)>>2]|0)){l=6;break}c[h>>2]=c[2768+((c[k>>2]|0)*40|0)>>2];b=c[2768+((c[k>>2]|0)*40|0)+4>>2]|0;a=Kv(c[2768+((c[k>>2]|0)*40|0)+4>>2]|0)|0;m=c[2768+((c[k>>2]|0)*40|0)+8>>2]|0;n=Kv(c[2768+((c[k>>2]|0)*40|0)+8>>2]|0)|0;c[j>>2]=ij(11,b,a,m,n,2768+((c[k>>2]|0)*40|0)+12|0,28)|0;if(c[j>>2]|0)break;if(!(c[f>>2]|0)){l=6;break}c[k>>2]=(c[k>>2]|0)+1}if((l|0)==6){c[e>>2]=0;o=c[e>>2]|0;i=d;return o|0}if(c[g>>2]|0)Fb[c[g>>2]&1](36319,11,c[h>>2]|0,c[j>>2]|0);c[e>>2]=50;o=c[e>>2]|0;i=d;return o|0}function kj(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;d=i;i=i+48|0;e=d+32|0;f=d+28|0;g=d+24|0;h=d+20|0;j=d+16|0;k=d+12|0;l=d+8|0;m=d+4|0;n=d;c[f>>2]=a;c[g>>2]=b;c[k>>2]=0;while(1){if(!(c[3048+((c[k>>2]|0)*44|0)>>2]|0)){o=13;break}c[h>>2]=c[3048+((c[k>>2]|0)*44|0)>>2];b=c[3048+((c[k>>2]|0)*44|0)+4>>2]|0;a=Kv(c[3048+((c[k>>2]|0)*44|0)+4>>2]|0)|0;p=c[3048+((c[k>>2]|0)*44|0)+8>>2]|0;q=Kv(c[3048+((c[k>>2]|0)*44|0)+8>>2]|0)|0;c[j>>2]=ij(8,b,a,p,q,3048+((c[k>>2]|0)*44|0)+12|0,32)|0;if(c[j>>2]|0)break;q=c[3048+((c[k>>2]|0)*44|0)+8>>2]|0;c[l>>2]=Cq(q,Kv(c[3048+((c[k>>2]|0)*44|0)+8>>2]|0)|0)|0;if(!(c[l>>2]|0)){o=5;break}q=c[l>>2]|0;p=c[3048+((c[k>>2]|0)*44|0)+4>>2]|0;Dq(q,p,Kv(c[3048+((c[k>>2]|0)*44|0)+4>>2]|0)|0);c[m>>2]=Iq(c[l>>2]|0,n)|0;if(!(c[m>>2]|0)){o=7;break}if((c[n>>2]|0)!=32){o=10;break}if(mw(c[m>>2]|0,3048+((c[k>>2]|0)*44|0)+12|0,32)|0){o=10;break}Hq(c[l>>2]|0);if(!(c[f>>2]|0)){o=13;break}c[k>>2]=(c[k>>2]|0)+1}if((o|0)==5)c[j>>2]=36968;else if((o|0)==7){c[j>>2]=36993;Hq(c[l>>2]|0)}else if((o|0)==10){c[j>>2]=37023;Hq(c[l>>2]|0)}else if((o|0)==13){c[e>>2]=0;r=c[e>>2]|0;i=d;return r|0}if(c[g>>2]|0)Fb[c[g>>2]&1](36319,8,c[h>>2]|0,c[j>>2]|0);c[e>>2]=50;r=c[e>>2]|0;i=d;return r|0}function lj(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0;d=i;i=i+32|0;e=d+20|0;f=d+16|0;g=d+12|0;h=d+8|0;j=d+4|0;k=d;c[f>>2]=a;c[g>>2]=b;c[k>>2]=0;while(1){if(!(c[3356+((c[k>>2]|0)*60|0)>>2]|0)){l=6;break}c[h>>2]=c[3356+((c[k>>2]|0)*60|0)>>2];b=c[3356+((c[k>>2]|0)*60|0)+4>>2]|0;a=Kv(c[3356+((c[k>>2]|0)*60|0)+4>>2]|0)|0;m=c[3356+((c[k>>2]|0)*60|0)+8>>2]|0;n=Kv(c[3356+((c[k>>2]|0)*60|0)+8>>2]|0)|0;c[j>>2]=ij(9,b,a,m,n,3356+((c[k>>2]|0)*60|0)+12|0,48)|0;if(c[j>>2]|0)break;if(!(c[f>>2]|0)){l=6;break}c[k>>2]=(c[k>>2]|0)+1}if((l|0)==6){c[e>>2]=0;o=c[e>>2]|0;i=d;return o|0}if(c[g>>2]|0)Fb[c[g>>2]&1](36319,9,c[h>>2]|0,c[j>>2]|0);c[e>>2]=50;o=c[e>>2]|0;i=d;return o|0}function mj(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0;d=i;i=i+32|0;e=d+20|0;f=d+16|0;g=d+12|0;h=d+8|0;j=d+4|0;k=d;c[f>>2]=a;c[g>>2]=b;c[k>>2]=0;while(1){if(!(c[3776+((c[k>>2]|0)*76|0)>>2]|0)){l=6;break}c[h>>2]=c[3776+((c[k>>2]|0)*76|0)>>2];b=c[3776+((c[k>>2]|0)*76|0)+4>>2]|0;a=Kv(c[3776+((c[k>>2]|0)*76|0)+4>>2]|0)|0;m=c[3776+((c[k>>2]|0)*76|0)+8>>2]|0;n=Kv(c[3776+((c[k>>2]|0)*76|0)+8>>2]|0)|0;c[j>>2]=ij(10,b,a,m,n,3776+((c[k>>2]|0)*76|0)+12|0,64)|0;if(c[j>>2]|0)break;if(!(c[f>>2]|0)){l=6;break}c[k>>2]=(c[k>>2]|0)+1}if((l|0)==6){c[e>>2]=0;o=c[e>>2]|0;i=d;return o|0}if(c[g>>2]|0)Fb[c[g>>2]&1](36319,10,c[h>>2]|0,c[j>>2]|0);c[e>>2]=50;o=c[e>>2]|0;i=d;return o|0}function nj(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;a=oj(1,c[d>>2]|0)|0;i=b;return a|0}function oj(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;d=i;i=i+16|0;e=d+4|0;f=d;c[e>>2]=a;c[f>>2]=b;if(!(c[f>>2]|0)){g=0;i=d;return g|0}g=(c[e>>2]&127)<<24|c[f>>2]&65535;i=d;return g|0}function pj(a){a=a|0;var b=0,d=0,e=0,f=0;b=i;i=i+16|0;d=b+8|0;e=b+4|0;f=b;c[e>>2]=a;do if(c[e>>2]|0){c[f>>2]=qj(c[e>>2]|0,0)|0;if(c[f>>2]|0){c[d>>2]=c[c[f>>2]>>2];break}c[f>>2]=sj(c[e>>2]|0)|0;if(c[f>>2]|0){c[d>>2]=c[c[f>>2]>>2];break}else{c[d>>2]=0;break}}else c[d>>2]=0;while(0);i=b;return c[d>>2]|0}function qj(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0;d=i;i=i+32|0;e=d+16|0;f=d+12|0;g=d+8|0;h=d+4|0;j=d;c[f>>2]=a;c[g>>2]=b;do if(c[f>>2]|0){if((iw(c[f>>2]|0,37087,4)|0)!=0?(iw(c[f>>2]|0,37092,4)|0)!=0:0)break;c[f>>2]=(c[f>>2]|0)+4}while(0);c[h>>2]=rj(c[f>>2]|0)|0;a:do if((c[h>>2]|0)!=0?(c[(c[h>>2]|0)+20>>2]|0)!=0:0){c[j>>2]=0;while(1){if(!(c[(c[(c[h>>2]|0)+20>>2]|0)+(c[j>>2]<<2)>>2]|0))break a;if(!(Vv(c[f>>2]|0,c[(c[(c[h>>2]|0)+20>>2]|0)+(c[j>>2]<<2)>>2]|0)|0))break;c[j>>2]=(c[j>>2]|0)+1}if(c[g>>2]|0)c[c[g>>2]>>2]=c[(c[(c[h>>2]|0)+20>>2]|0)+(c[j>>2]<<2)>>2];c[e>>2]=c[h>>2];k=c[e>>2]|0;i=d;return k|0}while(0);c[e>>2]=0;k=c[e>>2]|0;i=d;return k|0}function rj(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0;b=i;i=i+32|0;d=b+20|0;e=b+16|0;f=b+12|0;g=b+8|0;h=b+4|0;j=b;c[e>>2]=a;c[h>>2]=0;a:while(1){a=c[4308+(c[h>>2]<<2)>>2]|0;c[f>>2]=a;if(!a){k=10;break}c[g>>2]=c[(c[f>>2]|0)+20>>2];b:do if(c[g>>2]|0){c[j>>2]=0;while(1){if(!(c[(c[g>>2]|0)+(c[j>>2]<<2)>>2]|0))break b;if(!(Vv(c[e>>2]|0,c[(c[g>>2]|0)+(c[j>>2]<<2)>>2]|0)|0)){k=7;break a}c[j>>2]=(c[j>>2]|0)+1}}while(0);c[h>>2]=(c[h>>2]|0)+1}if((k|0)==7){c[d>>2]=c[f>>2];l=c[d>>2]|0;i=b;return l|0}else if((k|0)==10){c[d>>2]=0;l=c[d>>2]|0;i=b;return l|0}return 0}function sj(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,j=0;b=i;i=i+16|0;d=b+12|0;e=b+8|0;f=b+4|0;g=b;c[e>>2]=a;c[g>>2]=0;while(1){a=c[4308+(c[g>>2]<<2)>>2]|0;c[f>>2]=a;if(!a){h=6;break}if(!(Vv(c[e>>2]|0,c[(c[f>>2]|0)+8>>2]|0)|0)){h=4;break}c[g>>2]=(c[g>>2]|0)+1}if((h|0)==4){c[d>>2]=c[f>>2];j=c[d>>2]|0;i=b;return j|0}else if((h|0)==6){c[d>>2]=0;j=c[d>>2]|0;i=b;return j|0}return 0}function tj(a){a=a|0;var b=0,d=0,e=0,f=0;b=i;i=i+16|0;d=b+4|0;e=b;c[d>>2]=a;c[e>>2]=uj(c[d>>2]|0)|0;if(!(c[e>>2]|0)){f=37933;i=b;return f|0}f=c[(c[e>>2]|0)+8>>2]|0;i=b;return f|0}function uj(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,j=0;b=i;i=i+16|0;d=b+12|0;e=b+8|0;f=b+4|0;g=b;c[e>>2]=a;c[e>>2]=vj(c[e>>2]|0)|0;c[f>>2]=0;while(1){a=c[4308+(c[f>>2]<<2)>>2]|0;c[g>>2]=a;if(!a){h=6;break}if((c[e>>2]|0)==(c[c[g>>2]>>2]|0)){h=4;break}c[f>>2]=(c[f>>2]|0)+1}if((h|0)==4){c[d>>2]=c[g>>2];j=c[d>>2]|0;i=b;return j|0}else if((h|0)==6){c[d>>2]=0;j=c[d>>2]|0;i=b;return j|0}return 0}function vj(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;i=b;return c[d>>2]|0}function wj(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0;e=i;i=i+32|0;f=e+16|0;g=e+12|0;h=e+8|0;j=e+4|0;k=e;c[f>>2]=a;c[g>>2]=b;c[h>>2]=d;if(c[h>>2]&-260)c[j>>2]=45;else c[j>>2]=xj(k,c[g>>2]|0,c[h>>2]|0)|0;c[c[f>>2]>>2]=(c[j>>2]|0)!=0?0:c[k>>2]|0;i=e;return c[j>>2]|0}function xj(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;f=i;i=i+48|0;g=f+36|0;h=f+32|0;j=f+28|0;k=f+24|0;l=f+20|0;m=f+16|0;n=f+12|0;o=f+8|0;p=f+4|0;q=f;c[g>>2]=b;c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|0)|0,(c[k>>2]|0)!=0):0)yj(c[p>>2]|0);if(c[k>>2]|0){r=c[k>>2]|0;i=f;return r|0}c[c[g>>2]>>2]=c[p>>2];r=c[k>>2]|0;i=f;return r|0}function yj(b){b=b|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0;e=i;i=i+80|0;f=e+68|0;g=e+64|0;h=e+60|0;j=e+56|0;k=e+52|0;l=e+74|0;m=e+16|0;n=e+48|0;o=e+44|0;p=e+40|0;q=e+73|0;r=e+8|0;s=e+36|0;t=e+32|0;u=e+28|0;v=e+72|0;w=e;x=e+24|0;c[f>>2]=b;if(!(c[f>>2]|0)){i=e;return}if(c[(c[c[f>>2]>>2]|0)+8>>2]|0)zj(c[f>>2]|0);c[g>>2]=c[(c[c[f>>2]>>2]|0)+16>>2];while(1){if(!(c[g>>2]|0))break;c[h>>2]=c[(c[g>>2]|0)+4>>2];c[j>>2]=c[g>>2];c[k>>2]=c[(c[g>>2]|0)+8>>2];a[l>>0]=0;b=m;c[b>>2]=d[l>>0];c[b+4>>2]=0;while(1){if(!((c[j>>2]&7|0)!=0?(c[k>>2]|0)!=0:0))break;a[c[j>>2]>>0]=a[l>>0]|0;c[j>>2]=(c[j>>2]|0)+1;c[k>>2]=(c[k>>2]|0)+-1}if((c[k>>2]|0)>>>0>=8){b=m;y=Mx(c[b>>2]|0,c[b+4>>2]|0,16843009,16843009)|0;b=m;c[b>>2]=y;c[b+4>>2]=C;do{c[n>>2]=c[j>>2];b=m;y=c[b+4>>2]|0;z=c[n>>2]|0;c[z>>2]=c[b>>2];c[z+4>>2]=y;c[k>>2]=(c[k>>2]|0)-8;c[j>>2]=(c[j>>2]|0)+8}while((c[k>>2]|0)>>>0>=8)}while(1){if(!(c[k>>2]|0))break;a[c[j>>2]>>0]=a[l>>0]|0;c[j>>2]=(c[j>>2]|0)+1;c[k>>2]=(c[k>>2]|0)+-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(c[c[j>>2]>>2]|0)+32>>2]&7]((c[j>>2]|0)+16|0,c[g>>2]|0,c[h>>2]|0);c[j>>2]=c[(c[j>>2]|0)+4>>2]}c[k>>2]=0;i=e;return}function Bj(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;f=i;i=i+48|0;g=f;h=f+32|0;j=f+28|0;k=f+24|0;l=f+20|0;m=f+16|0;n=f+12|0;o=f+8|0;p=f+4|0;c[j>>2]=b;c[k>>2]=e;c[l>>2]=c[c[j>>2]>>2];c[o>>2]=0;c[n>>2]=c[(c[l>>2]|0)+16>>2];while(1){if(!(c[n>>2]|0))break;if((c[c[c[n>>2]>>2]>>2]|0)==(c[k>>2]|0)){q=4;break}c[n>>2]=c[(c[n>>2]|0)+4>>2]}if((q|0)==4){c[h>>2]=0;r=c[h>>2]|0;i=f;return r|0}c[m>>2]=uj(c[k>>2]|0)|0;if(!(c[m>>2]|0)){c[g>>2]=c[k>>2];Df(37111,g);c[o>>2]=5}if(((c[o>>2]|0)==0&(c[k>>2]|0)==1?(Ah()|0)!=0:0)?(Ih(37150),(Gh()|0)!=0):0)c[o>>2]=5;do if(!(c[o>>2]|0)){c[p>>2]=24+(c[(c[m>>2]|0)+44>>2]|0)-8;k=c[p>>2]|0;if(a[(c[l>>2]|0)+12>>0]&1)c[n>>2]=Yf(k)|0;else c[n>>2]=Vf(k)|0;if(c[n>>2]|0){c[c[n>>2]>>2]=c[m>>2];c[(c[n>>2]|0)+4>>2]=c[(c[l>>2]|0)+16>>2];c[(c[n>>2]|0)+8>>2]=c[p>>2];c[(c[l>>2]|0)+16>>2]=c[n>>2];yb[c[(c[c[n>>2]>>2]|0)+28>>2]&7]((c[n>>2]|0)+16|0,((d[(c[l>>2]|0)+12>>0]|0)>>>2&1|0)!=0?256:0);break}else{c[o>>2]=gu(c[(Yu()|0)>>2]|0)|0;break}}while(0);c[h>>2]=c[o>>2];r=c[h>>2]|0;i=f;return r|0}function Cj(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0;d=i;i=i+80|0;e=d+16|0;f=d+8|0;g=d+24|0;h=d+20|0;j=d+28|0;c[g>>2]=a;c[h>>2]=b;if(Ah()|0){i=d;return}if(c[(c[c[g>>2]>>2]|0)+8>>2]|0){Df(37159,d);i=d;return}c[17699]=(c[17699]|0)+1;b=c[h>>2]|0;c[f>>2]=c[17699];c[f+4>>2]=b;tv(j,49,37191,f)|0;f=qw(j,37208)|0;c[(c[c[g>>2]>>2]|0)+8>>2]=f;if(c[(c[c[g>>2]>>2]|0)+8>>2]|0){i=d;return}c[e>>2]=j;Df(37210,e);i=d;return}function Dj(b){b=b|0;var e=0,f=0,g=0;e=i;i=i+16|0;f=e+4|0;g=e;c[f>>2]=b;b=(c[c[f>>2]>>2]|0)+12|0;a[b>>0]=a[b>>0]&-3;c[(c[f>>2]|0)+4>>2]=0;c[g>>2]=c[(c[c[f>>2]>>2]|0)+16>>2];while(1){if(!(c[g>>2]|0))break;Fx((c[g>>2]|0)+16|0,0,c[(c[c[g>>2]>>2]|0)+44>>2]|0)|0;yb[c[(c[c[g>>2]>>2]|0)+28>>2]&7]((c[g>>2]|0)+16|0,((d[(c[c[f>>2]>>2]|0)+12>>0]|0)>>>2&1|0)!=0?256:0);c[g>>2]=c[(c[g>>2]|0)+4>>2]}if(!(c[(c[c[f>>2]>>2]|0)+20>>2]|0)){i=e;return}Aj(c[f>>2]|0,c[(c[c[f>>2]>>2]|0)+20>>2]|0,c[(c[c[f>>2]>>2]|0)+24>>2]|0);i=e;return}function Ej(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;yj(c[d>>2]|0);i=b;return}function Fj(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=i;i=i+16|0;f=e+8|0;g=e+4|0;h=e;c[f>>2]=a;c[g>>2]=b;c[h>>2]=d;Aj(c[f>>2]|0,c[g>>2]|0,c[h>>2]|0);i=e;return}function Gj(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0;f=i;i=i+32|0;g=f+16|0;h=f+12|0;j=f+8|0;k=f;c[g>>2]=a;c[h>>2]=b;c[j>>2]=d;c[f+4>>2]=e;c[k>>2]=0;switch(c[h>>2]|0){case 5:{Hj(c[g>>2]|0);break}case 32:{Cj(c[g>>2]|0,c[j>>2]|0);break}case 33:{zj(c[g>>2]|0);break}default:c[k>>2]=61}i=f;return c[k>>2]|0}function Hj(b){b=b|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0;e=i;i=i+32|0;f=e+24|0;g=e+20|0;h=e+16|0;j=e+12|0;k=e+8|0;l=e+4|0;m=e;c[f>>2]=b;if((d[(c[c[f>>2]>>2]|0)+12>>0]|0)>>>1&1){i=e;return}if(c[(c[f>>2]|0)+4>>2]|0)Aj(c[f>>2]|0,0,0);c[g>>2]=c[(c[c[f>>2]>>2]|0)+16>>2];while(1){if(!(c[g>>2]|0))break;xb[c[(c[c[g>>2]>>2]|0)+36>>2]&15]((c[g>>2]|0)+16|0);c[g>>2]=c[(c[g>>2]|0)+4>>2]}g=(c[c[f>>2]>>2]|0)+12|0;a[g>>0]=a[g>>0]&-3|2;if(!(c[(c[c[f>>2]>>2]|0)+20>>2]|0)){i=e;return}c[h>>2]=Ij(c[f>>2]|0)|0;c[j>>2]=Jj(c[f>>2]|0,c[h>>2]|0)|0;c[k>>2]=Kj(c[h>>2]|0)|0;c[m>>2]=xj(l,c[h>>2]|0,((a[(c[c[f>>2]>>2]|0)+12>>0]&1|0)!=0?1:0)|(((d[(c[c[f>>2]>>2]|0)+12>>0]|0)>>>2&1|0)!=0?256:0))|0;if(c[m>>2]|0)qf(c[m>>2]|0,0);Aj(c[l>>2]|0,(c[(c[c[f>>2]>>2]|0)+20>>2]|0)+(c[(c[c[f>>2]>>2]|0)+24>>2]|0)|0,c[(c[c[f>>2]>>2]|0)+24>>2]|0);Aj(c[l>>2]|0,c[j>>2]|0,c[k>>2]|0);Hj(c[l>>2]|0);f=c[j>>2]|0;j=Jj(c[l>>2]|0,c[h>>2]|0)|0;Dx(f|0,j|0,c[k>>2]|0)|0;yj(c[l>>2]|0);i=e;return}function Ij(a){a=a|0;var b=0,d=0,e=0,f=0,g=0;b=i;i=i+16|0;d=b;e=b+8|0;f=b+4|0;c[e>>2]=a;c[f>>2]=c[(c[c[e>>2]>>2]|0)+16>>2];if((c[f>>2]|0)!=0?(c[(c[f>>2]|0)+4>>2]|0)!=0:0){Jh(37097,980,37235,0,37247);Af(37268,d)}if(!(c[f>>2]|0)){g=0;i=b;return g|0}g=c[c[c[f>>2]>>2]>>2]|0;i=b;return g|0}function Jj(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0;d=i;i=i+32|0;e=d;f=d+16|0;g=d+12|0;h=d+8|0;j=d+4|0;c[g>>2]=a;c[h>>2]=b;c[j>>2]=c[(c[c[g>>2]>>2]|0)+16>>2];if(!(c[h>>2]|0)){if(!(c[j>>2]|0))wf(37097,816,37358);if(c[(c[j>>2]|0)+4>>2]|0)Df(37319,e);c[f>>2]=zb[c[(c[c[j>>2]>>2]|0)+40>>2]&15]((c[j>>2]|0)+16|0)|0;k=c[f>>2]|0;i=d;return k|0}c[j>>2]=c[(c[c[g>>2]>>2]|0)+16>>2];while(1){if(!(c[j>>2]|0)){l=11;break}m=c[j>>2]|0;if((c[c[c[j>>2]>>2]>>2]|0)==(c[h>>2]|0))break;c[j>>2]=c[m+4>>2]}if((l|0)==11)wf(37097,816,37358);c[f>>2]=zb[c[(c[m>>2]|0)+40>>2]&15]((c[j>>2]|0)+16|0)|0;k=c[f>>2]|0;i=d;return k|0}function Kj(a){a=a|0;var b=0,d=0,e=0,f=0;b=i;i=i+16|0;d=b+4|0;e=b;c[d>>2]=a;c[e>>2]=uj(c[d>>2]|0)|0;if(!(c[e>>2]|0)){f=0;i=b;return f|0}f=c[(c[e>>2]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d;c[e>>2]=a;c[f>>2]=b;b=Qj(c[e>>2]|0,c[f>>2]|0)|0;i=d;return b|0}function Qj(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;d=i;i=i+16|0;e=d+4|0;f=d;c[e>>2]=a;c[f>>2]=b;if(!(c[f>>2]|0)){g=0;i=d;return g|0}g=(c[e>>2]&127)<<24|c[f>>2]&65535;i=d;return g|0}function Rj(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=i;i=i+16|0;e=d+4|0;f=d;c[e>>2]=a;c[f>>2]=b;Gj(c[e>>2]|0,5,0,0)|0;b=Jj(c[e>>2]|0,c[f>>2]|0)|0;i=d;return b|0}function Sj(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;g=i;i=i+48|0;h=g+32|0;j=g+28|0;k=g+24|0;l=g+20|0;m=g+16|0;n=g+12|0;o=g+8|0;p=g+4|0;q=g;c[j>>2]=a;c[k>>2]=b;c[l>>2]=d;c[m>>2]=e;c[n>>2]=f;if((c[m>>2]|0)==0|(c[n>>2]|0)<0){c[h>>2]=45;r=c[h>>2]|0;i=g;return r|0}if(c[k>>2]&-3){c[h>>2]=45;r=c[h>>2]|0;i=g;return r|0}c[o>>2]=((c[k>>2]&2|0)!=0^1^1)&1;if((c[o>>2]|0)!=0&(c[n>>2]|0)<1){c[h>>2]=45;r=c[h>>2]|0;i=g;return r|0}if((c[j>>2]|0)!=2|(c[o>>2]|0)!=0){if(((c[j>>2]|0)==1?(Ah()|0)!=0:0)?(Ih(37150),(Gh()|0)!=0):0)Fh();c[q>>2]=xj(p,c[j>>2]|0,(c[o>>2]|0)!=0?2:0)|0;if(c[q>>2]|0){c[h>>2]=c[q>>2];r=c[h>>2]|0;i=g;return r|0}do if(c[o>>2]|0){c[q>>2]=Lj(c[p>>2]|0,(c[(c[m>>2]|0)+12>>2]|0)+(c[(c[m>>2]|0)+4>>2]|0)|0,c[(c[m>>2]|0)+8>>2]|0)|0;if(!(c[q>>2]|0)){c[m>>2]=(c[m>>2]|0)+16;c[n>>2]=(c[n>>2]|0)+-1;break}yj(c[p>>2]|0);c[h>>2]=c[q>>2];r=c[h>>2]|0;i=g;return r|0}while(0);while(1){s=c[p>>2]|0;if(!(c[n>>2]|0))break;Aj(s,(c[(c[m>>2]|0)+12>>2]|0)+(c[(c[m>>2]|0)+4>>2]|0)|0,c[(c[m>>2]|0)+8>>2]|0);c[m>>2]=(c[m>>2]|0)+16;c[n>>2]=(c[n>>2]|0)+-1}Hj(s);s=c[l>>2]|0;q=Jj(c[p>>2]|0,c[j>>2]|0)|0;Dx(s|0,q|0,Kj(c[j>>2]|0)|0)|0;yj(c[p>>2]|0)}else Cm(c[l>>2]|0,c[m>>2]|0,c[n>>2]|0);c[h>>2]=0;r=c[h>>2]|0;i=g;return r|0}function Tj(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;a=Ij(c[d>>2]|0)|0;i=b;return a|0}function Uj(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;a=Kj(c[d>>2]|0)|0;i=b;return a|0}function Vj(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0;f=i;i=i+32|0;g=f+24|0;h=f+20|0;j=f+16|0;k=f+12|0;l=f+8|0;m=f+4|0;n=f;c[g>>2]=a;c[h>>2]=b;c[j>>2]=d;c[k>>2]=e;a:do switch(c[h>>2]|0){case 8:{if((c[j>>2]|0)!=0|(c[k>>2]|0)!=0){c[l>>2]=45;break a}else{c[l>>2]=Wj(c[g>>2]|0)|0;break a}break}case 10:{c[l>>2]=Wj(c[g>>2]|0)|0;if(!(c[l>>2]|0)){c[m>>2]=Xj(c[g>>2]|0,n,0)|0;if((c[j>>2]|0)!=0?(c[c[k>>2]>>2]|0)>>>0>=(c[n>>2]|0)>>>0:0){Dx(c[j>>2]|0,c[m>>2]|0,c[n>>2]|0)|0;c[c[k>>2]>>2]=c[n>>2];break a}if((c[j>>2]|0)==0&(c[k>>2]|0)!=0){c[c[k>>2]>>2]=c[n>>2];break a}if(c[j>>2]|0){c[l>>2]=66;break a}else{c[l>>2]=45;break a}}break}case 57:{if(c[k>>2]|0)o=c[c[k>>2]>>2]|0;else o=0;c[l>>2]=_j(Yj(c[g>>2]|0,o,0)|0)|0;break}default:c[l>>2]=61}while(0);i=f;return c[l>>2]|0}function Wj(b){b=b|0;var d=0,e=0,f=0,g=0,h=0;d=i;i=i+16|0;e=d+8|0;f=d+4|0;g=d;c[f>>2]=b;c[g>>2]=uj(c[f>>2]|0)|0;if((c[g>>2]|0)!=0?(a[(c[g>>2]|0)+4>>0]&1|0)==0:0){c[e>>2]=0;h=c[e>>2]|0;i=d;return h|0}c[e>>2]=5;h=c[e>>2]|0;i=d;return h|0}function Xj(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;e=i;i=i+32|0;f=e;g=e+20|0;h=e+16|0;j=e+12|0;k=e+8|0;l=e+4|0;c[g>>2]=a;c[h>>2]=b;c[j>>2]=d;c[l>>2]=0;c[k>>2]=uj(c[g>>2]|0)|0;if(!(c[k>>2]|0)){c[f>>2]=c[g>>2];Cf(37451,f)}if(c[h>>2]|0)c[c[h>>2]>>2]=c[(c[k>>2]|0)+16>>2];if(!(c[j>>2]|0)){m=c[k>>2]|0;n=m+12|0;o=c[n>>2]|0;c[l>>2]=o;p=c[l>>2]|0;i=e;return p|0}c[c[j>>2]>>2]=c[(c[k>>2]|0)+24>>2];m=c[k>>2]|0;n=m+12|0;o=c[n>>2]|0;c[l>>2]=o;p=c[l>>2]|0;i=e;return p|0}function Yj(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;f=i;i=i+32|0;g=f+16|0;h=f+12|0;j=f+8|0;k=f+4|0;l=f;c[g>>2]=b;c[h>>2]=d;c[j>>2]=e;c[k>>2]=0;c[l>>2]=uj(c[g>>2]|0)|0;if(((c[l>>2]|0)!=0?(a[(c[l>>2]|0)+4>>0]&1|0)==0:0)?(c[(c[l>>2]|0)+48>>2]|0)!=0:0){c[k>>2]=vb[c[(c[l>>2]|0)+48>>2]&63](c[g>>2]|0,c[h>>2]|0,c[j>>2]|0)|0;m=c[k>>2]|0;n=Zj(m)|0;i=f;return n|0}if(c[l>>2]|0)o=(c[(c[l>>2]|0)+48>>2]|0)!=0;else o=0;c[k>>2]=o?5:69;if(!(c[j>>2]|0)){m=c[k>>2]|0;n=Zj(m)|0;i=f;return n|0}o=c[j>>2]|0;j=c[g>>2]|0;if((c[l>>2]|0)!=0?(a[(c[l>>2]|0)+4>>0]&1|0)==0:0)p=38004;else p=(c[l>>2]|0)!=0?37965:37984;Fb[o&1](43169,j,38026,p);m=c[k>>2]|0;n=Zj(m)|0;i=f;return n|0}function Zj(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;a=Qj(1,c[d>>2]|0)|0;i=b;return a|0}function _j(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;i=b;return c[d>>2]&65535|0}function $j(){return 0}function ak(){return 0}function bk(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=i;i=i+16|0;e=d+4|0;f=d;c[e>>2]=a;c[f>>2]=b;c[17700]=c[e>>2];c[17701]=c[f>>2];i=d;return}function ck(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0;f=i;i=i+32|0;g=f+16|0;h=f+12|0;j=f+8|0;k=f+4|0;l=f;c[g>>2]=a;c[h>>2]=b;c[j>>2]=d;c[k>>2]=e;c[l>>2]=dk(c[g>>2]|0,1,c[h>>2]|0,c[j>>2]|0,c[k>>2]|0)|0;fk(10);i=f;return c[l>>2]|0}function dk(a,b,d,f,g){a=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|0)>>>0<(c[x>>2]|0)>>>0)break;D=(c[B>>2]|0)+(c[w>>2]<<2)|0;c[D>>2]=(c[D>>2]|0)-(c[x>>2]|0)}if(!((c[(c[B>>2]|0)+(c[w>>2]<<2)>>2]|0)+(c[y>>2]|0)|0))break;c[w>>2]=(c[w>>2]|0)+1}if(!(c[x>>2]|0)){Ko(c[r>>2]|0,c[q>>2]|0,c[y>>2]|0);c[A>>2]=(c[A>>2]|0)+1;Mo(c[s>>2]|0,c[r>>2]|0,1);wp(c[v>>2]|0,c[t>>2]|0,c[s>>2]|0,c[r>>2]|0);if(($o(c[v>>2]|0,1)|0)==0?(ek(c[r>>2]|0,5,A)|0)!=0:0){if(!(So(c[r>>2]|0,(c[l>>2]|0)-1-(c[m>>2]|0)|0)|0)){E=24;break}if(!(c[o>>2]|0)){E=28;break a}if(!(Eb[c[o>>2]&7](c[p>>2]|0,c[r>>2]|0)|0)){E=28;break a}fk(47)}D=(c[C>>2]|0)+1|0;c[C>>2]=D;if((D|0)==10){fk(46);c[C>>2]=0}}c[y>>2]=(c[y>>2]|0)+2}if((E|0)==24){E=0;fk(10);Df(37628,j)}fk(58)}if((E|0)==28){hq(c[t>>2]|0);hq(c[u>>2]|0);hq(c[v>>2]|0);hq(c[s>>2]|0);hq(c[q>>2]|0);$f(c[B>>2]|0);i=h;return c[r>>2]|0}return 0}function ek(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0;e=i;i=i+64|0;f=e+52|0;g=e+48|0;h=e+44|0;j=e+40|0;k=e+36|0;l=e+32|0;m=e+28|0;n=e+24|0;o=e+20|0;p=e+16|0;q=e+12|0;r=e+8|0;s=e+4|0;t=e;c[f>>2]=a;c[g>>2]=b;c[h>>2]=d;c[j>>2]=$p(c[(c[f>>2]|0)+4>>2]|0)|0;c[k>>2]=$p(c[(c[f>>2]|0)+4>>2]|0)|0;c[l>>2]=$p(c[(c[f>>2]|0)+4>>2]|0)|0;c[m>>2]=$p(c[(c[f>>2]|0)+4>>2]|0)|0;c[n>>2]=_p(2)|0;c[s>>2]=0;c[t>>2]=Ro(c[f>>2]|0)|0;if((c[g>>2]|0)<5)c[g>>2]=5;Mo(c[m>>2]|0,c[f>>2]|0,1);c[o>>2]=mq(c[m>>2]|0)|0;c[r>>2]=yp(c[o>>2]|0)|0;hp(c[o>>2]|0,c[o>>2]|0,c[r>>2]|0);c[p>>2]=0;a:while(1){if((c[p>>2]|0)>>>0>=(c[g>>2]|0)>>>0){u=22;break}d=c[h>>2]|0;c[d>>2]=(c[d>>2]|0)+1;d=c[j>>2]|0;if(c[p>>2]|0){yq(d,c[t>>2]|0,0);b=(So(c[j>>2]|0,(c[t>>2]|0)-2|0)|0)!=0;Uo(c[j>>2]|0,(c[t>>2]|0)-2|0);if(!b)Wo(c[j>>2]|0,(c[t>>2]|0)-2|0);if((ap(c[j>>2]|0,c[m>>2]|0)|0)>=0){u=11;break}if(($o(c[j>>2]|0,1)|0)<=0){u=11;break}}else sq(d,2)|0;wp(c[k>>2]|0,c[j>>2]|0,c[o>>2]|0,c[f>>2]|0);if(($o(c[k>>2]|0,1)|0)!=0?(ap(c[k>>2]|0,c[m>>2]|0)|0)!=0:0){c[q>>2]=1;while(1){if((c[q>>2]|0)>>>0<(c[r>>2]|0)>>>0)v=(ap(c[k>>2]|0,c[m>>2]|0)|0)!=0;else v=0;w=c[k>>2]|0;if(!v)break;wp(w,c[k>>2]|0,c[n>>2]|0,c[f>>2]|0);if(!($o(c[k>>2]|0,1)|0)){u=23;break a}c[q>>2]=(c[q>>2]|0)+1}if(ap(w,c[m>>2]|0)|0){u=23;break}}fk(43);c[p>>2]=(c[p>>2]|0)+1}if((u|0)==11)xf(37527,37599,951,37610);else if((u|0)==22){c[s>>2]=1;x=c[j>>2]|0;hq(x);y=c[k>>2]|0;hq(y);z=c[l>>2]|0;hq(z);A=c[m>>2]|0;hq(A);B=c[o>>2]|0;hq(B);C=c[n>>2]|0;hq(C);D=c[s>>2]|0;i=e;return D|0}else if((u|0)==23){x=c[j>>2]|0;hq(x);y=c[k>>2]|0;hq(y);z=c[l>>2]|0;hq(z);A=c[m>>2]|0;hq(A);B=c[o>>2]|0;hq(B);C=c[n>>2]|0;hq(C);D=c[s>>2]|0;i=e;return D|0}return 0}function fk(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;if(!(c[17700]|0)){i=b;return}wb[c[17700]&15](c[17701]|0,37619,c[d>>2]|0,0,0);i=b;return}function gk(a,b,d,f,g){a=a|0;b=b|0;d=d|0;f=f|0;g=g|0;var h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0;h=i;i=i+48|0;j=h+40|0;k=h+36|0;l=h+32|0;m=h+28|0;n=h+24|0;o=h+20|0;p=h+16|0;q=h+12|0;r=h+8|0;s=h+4|0;t=h;c[k>>2]=a;c[l>>2]=b;c[m>>2]=d;c[n>>2]=f;c[o>>2]=g;c[r>>2]=0;c[p>>2]=0;while(1){g=e[16508+(c[p>>2]<<1)>>1]|0;c[q>>2]=g;u=c[k>>2]|0;if(!g)break;if(ip(u,c[q>>2]|0)|0){v=4;break}c[p>>2]=(c[p>>2]|0)+1}if((v|0)==4){c[j>>2]=(($o(c[k>>2]|0,c[q>>2]|0)|0)!=0^1)&1;w=c[j>>2]|0;i=h;return w|0}c[s>>2]=pq(u)|0;c[t>>2]=pq(c[k>>2]|0)|0;Mo(c[t>>2]|0,c[k>>2]|0,1);wp(c[s>>2]|0,c[l>>2]|0,c[t>>2]|0,c[k>>2]|0);hq(c[t>>2]|0);t=($o(c[s>>2]|0,1)|0)!=0;hq(c[s>>2]|0);if(t){fk(46);c[j>>2]=0;w=c[j>>2]|0;i=h;return w|0}if(!((c[n>>2]|0)!=0?(vb[c[n>>2]&63](c[o>>2]|0,2,c[k>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>2]|0);c[t>>2]=c[v>>2];c[v>>2]=0;Po(c[t>>2]|0,c[u>>2]|0,c[k>>2]|0,c[s>>2]|0);Lo(c[t>>2]|0,c[t>>2]|0,c[k>>2]|0);hq(c[u>>2]|0);if((ap(c[t>>2]|0,c[k>>2]|0)|0)<0)Lo(c[t>>2]|0,c[t>>2]|0,c[s>>2]|0);c[w>>2]=_p(2)|0;c[x>>2]=pq(c[t>>2]|0)|0;Mo(c[s>>2]|0,c[s>>2]|0,1);Mo(c[t>>2]|0,c[t>>2]|0,1);while(1){c[y>>2]=jp(c[x>>2]|0,c[n>>2]|0,c[t>>2]|0)|0;Ko(c[t>>2]|0,c[t>>2]|0,1);if(c[y>>2]|0){if(gk(c[t>>2]|0,c[w>>2]|0,64,0,0)|0)break}else fk(47);Lo(c[t>>2]|0,c[t>>2]|0,c[s>>2]|0)}hq(c[x>>2]|0);hq(c[w>>2]|0);hq(c[s>>2]|0);fk(10);s=c[q>>2]|0;if(c[o>>2]|0)c[c[o>>2]>>2]=s;else hq(s);s=c[r>>2]|0;if(c[p>>2]|0)c[c[p>>2]>>2]=s;else hq(s);c[j>>2]=c[t>>2];z=c[j>>2]|0;i=h;return z|0}c[j>>2]=0;z=c[j>>2]|0;i=h;return z|0}function ik(a){a=a|0;var b=0,d=0,e=0,f=0;b=i;i=i+16|0;d=b+8|0;e=b+4|0;f=b;c[d>>2]=a;c[e>>2]=_p(2)|0;c[f>>2]=mq(c[d>>2]|0)|0;To(c[f>>2]|0,0);while(1){if(!((gk(c[f>>2]|0,c[e>>2]|0,64,0,0)|0)!=0^1))break;Ko(c[f>>2]|0,c[f>>2]|0,2)}hq(c[e>>2]|0);i=b;return c[f>>2]|0}function jk(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;e=i;i=i+48|0;f=e+36|0;g=e+32|0;h=e+28|0;j=e+24|0;k=e+20|0;l=e+16|0;m=e+12|0;n=e+8|0;o=e+4|0;p=e;c[f>>2]=a;c[g>>2]=b;c[h>>2]=d;c[j>>2]=0;c[n>>2]=5;c[o>>2]=0;c[p>>2]=0;if(c[f>>2]|0)q=(yg(c[f>>2]|0)|0)-1|0;else q=0;c[m>>2]=q;while(1){if((c[m>>2]|0)<=0)break;c[k>>2]=Bg(c[f>>2]|0,c[m>>2]|0,l)|0;a:do if(c[k>>2]|0)do switch(c[l>>2]|0){case 3:{if((mw(c[k>>2]|0,37658,3)|0)==0&(c[n>>2]|0)==5){c[n>>2]=4;c[o>>2]=c[o>>2]|4;break a}if((mw(c[k>>2]|0,37662,3)|0)==0&(c[n>>2]|0)==5){c[n>>2]=0;c[o>>2]=c[o>>2]|16;break a}if(c[p>>2]|0)break a;c[j>>2]=72;break a;break}case 4:{if(!(mw(c[k>>2]|0,37666,4)|0)){c[o>>2]=c[o>>2]|1024;break a}if((mw(c[k>>2]|0,37671,4)|0)==0&(c[n>>2]|0)==5){c[n>>2]=3;c[o>>2]=c[o>>2]|4;break a}if(!(mw(c[k>>2]|0,47133,4)|0)){c[n>>2]=0;c[o>>2]=c[o>>2]|8192;break a}if(c[p>>2]|0)break a;c[j>>2]=72;break a;break}case 5:{if(!(mw(c[k>>2]|0,47127,5)|0)){c[n>>2]=0;c[o>>2]=c[o>>2]|4096;break a}if((mw(c[k>>2]|0,37676,5)|0)==0&(c[n>>2]|0)==5){c[n>>2]=1;c[o>>2]=c[o>>2]|4;break a}if(!(mw(c[k>>2]|0,37682,5)|0)){c[o>>2]=c[o>>2]|512;break a}if(c[p>>2]|0)break a;c[j>>2]=72;break a;break}case 6:{if(!(mw(c[k>>2]|0,37688,6)|0)){c[o>>2]=c[o>>2]|2048;break a}if(c[p>>2]|0)break a;c[j>>2]=72;break a;break}case 7:{if(!(mw(c[k>>2]|0,37695,7)|0)){c[o>>2]=c[o>>2]|2;break a}if((mw(c[k>>2]|0,37703,7)|0)==0|(c[p>>2]|0)!=0)break a;c[j>>2]=72;break a;break}case 8:{if(!(mw(c[k>>2]|0,39389,8)|0)){c[o>>2]=c[o>>2]|64;break a}if(c[p>>2]|0)break a;c[j>>2]=72;break a;break}case 9:{if((mw(c[k>>2]|0,37711,9)|0)==0&(c[n>>2]|0)==5){c[n>>2]=2;c[o>>2]=c[o>>2]|4;break a}if(c[p>>2]|0)break a;c[j>>2]=72;break a;break}case 10:{if(!(mw(c[k>>2]|0,37721,10)|0)){c[p>>2]=1;break a}if(!(mw(c[k>>2]|0,37732,10)|0)){c[o>>2]=c[o>>2]|16384;break a}if(c[p>>2]|0)break a;c[j>>2]=72;break a;break}case 11:{if(!(mw(c[k>>2]|0,37743,11)|0)){c[o>>2]=c[o>>2]|1;break a}if(!(mw(c[k>>2]|0,37755,11)|0)){c[o>>2]=c[o>>2]|128;break a}if(c[p>>2]|0)break a;c[j>>2]=72;break a;break}case 13:{if(!(mw(c[k>>2]|0,37767,13)|0)){c[o>>2]=c[o>>2]|256;break a}if(!(mw(c[k>>2]|0,47173,13)|0)){c[o>>2]=c[o>>2]|32;break a}if(c[p>>2]|0)break a;c[j>>2]=72;break a;break}default:{if(c[p>>2]|0)break a;c[j>>2]=72;break a}}while(0);while(0);c[m>>2]=(c[m>>2]|0)+-1}if(c[g>>2]|0)c[c[g>>2]>>2]=c[o>>2];if(!(c[h>>2]|0)){r=c[j>>2]|0;i=e;return r|0}c[c[h>>2]>>2]=c[n>>2];r=c[j>>2]|0;i=e;return r|0}function kk(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0;e=i;i=i+80|0;f=e+16|0;g=e+12|0;h=e+8|0;j=e+20|0;k=e+4|0;l=e;c[g>>2]=b;c[h>>2]=d;c[c[h>>2]>>2]=0;c[g>>2]=xg(c[g>>2]|0,37781,0)|0;if(!(c[g>>2]|0)){c[f>>2]=0;m=c[f>>2]|0;i=e;return m|0}c[k>>2]=Bg(c[g>>2]|0,1,l)|0;if((c[k>>2]|0)==0|(c[l>>2]|0)>>>0>=49){vg(c[g>>2]|0);c[f>>2]=65;m=c[f>>2]|0;i=e;return m|0}else{Dx(j|0,c[k>>2]|0,c[l>>2]|0)|0;a[j+(c[l>>2]|0)>>0]=0;l=Zv(j,0,0)|0;c[c[h>>2]>>2]=l;vg(c[g>>2]|0);c[f>>2]=0;m=c[f>>2]|0;i=e;return m|0}return 0}function lk(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0;e=i;i=i+80|0;f=e+16|0;g=e+12|0;h=e+8|0;j=e+20|0;k=e+4|0;l=e;c[g>>2]=b;c[h>>2]=d;c[c[h>>2]>>2]=0;c[g>>2]=xg(c[g>>2]|0,37787,0)|0;if(!(c[g>>2]|0)){c[c[h>>2]>>2]=65537;c[f>>2]=0;m=c[f>>2]|0;i=e;return m|0}c[k>>2]=Bg(c[g>>2]|0,1,l)|0;if((c[k>>2]|0)==0|(c[l>>2]|0)>>>0>=49){vg(c[g>>2]|0);c[f>>2]=65;m=c[f>>2]|0;i=e;return m|0}else{Dx(j|0,c[k>>2]|0,c[l>>2]|0)|0;a[j+(c[l>>2]|0)>>0]=0;l=Zv(j,0,0)|0;c[c[h>>2]>>2]=l;vg(c[g>>2]|0);c[f>>2]=0;m=c[f>>2]|0;i=e;return m|0}return 0}function mk(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;f=i;i=i+48|0;g=f+32|0;h=f+28|0;j=f+24|0;k=f+20|0;l=f+16|0;m=f+12|0;n=f+8|0;o=f+4|0;p=f;c[g>>2]=a;c[h>>2]=b;c[j>>2]=d;c[k>>2]=e;c[m>>2]=0;c[n>>2]=0;c[o>>2]=0;c[c[j>>2]>>2]=0;if(c[k>>2]|0)c[c[k>>2]>>2]=0;c[m>>2]=xg(c[g>>2]|0,37797,0)|0;do if(c[m>>2]|0){c[n>>2]=zg(c[m>>2]|0,1)|0;if(!(c[n>>2]|0)){c[l>>2]=68;break}c[o>>2]=Eg(c[n>>2]|0,0)|0;if(!(c[o>>2]|0)){c[l>>2]=65;break}if(!(gv(c[o>>2]|0,47167)|0)){vg(c[n>>2]|0);c[n>>2]=zg(c[m>>2]|0,2)|0;if(!(c[n>>2]|0)){c[l>>2]=65;break}$f(c[o>>2]|0);c[o>>2]=Eg(c[n>>2]|0,0)|0;if(!(c[o>>2]|0)){c[l>>2]=65;break}}c[p>>2]=0;while(1){if(!(c[(c[h>>2]|0)+(c[p>>2]<<2)>>2]|0))break;if(!(Vv(c[o>>2]|0,c[(c[h>>2]|0)+(c[p>>2]<<2)>>2]|0)|0))break;c[p>>2]=(c[p>>2]|0)+1}if(!(c[(c[h>>2]|0)+(c[p>>2]<<2)>>2]|0)){c[l>>2]=70;break}if(c[k>>2]|0){if(!(gv(c[o>>2]|0,47127)|0))c[c[k>>2]>>2]=4096;if(!(gv(c[o>>2]|0,47133)|0))c[c[k>>2]>>2]=8192}c[c[j>>2]>>2]=c[n>>2];c[n>>2]=0;c[l>>2]=0}else c[l>>2]=65;while(0);$f(c[o>>2]|0);vg(c[n>>2]|0);vg(c[m>>2]|0);i=f;return c[l>>2]|0}function nk(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;f=i;i=i+48|0;g=f+44|0;h=f+40|0;j=f+36|0;k=f+32|0;l=f+28|0;m=f+24|0;n=f+20|0;o=f+16|0;p=f+12|0;q=f+8|0;r=f+4|0;s=f;c[g>>2]=a;c[h>>2]=b;c[j>>2]=d;c[k>>2]=e;c[l>>2]=0;c[m>>2]=0;c[n>>2]=0;c[o>>2]=0;c[q>>2]=0;c[c[j>>2]>>2]=0;c[m>>2]=xg(c[g>>2]|0,42132,0)|0;do if(c[m>>2]|0){c[n>>2]=zg(c[m>>2]|0,1)|0;if(!(c[n>>2]|0)){c[l>>2]=68;break}c[o>>2]=Eg(c[n>>2]|0,0)|0;if(!(c[o>>2]|0)){c[l>>2]=65;break}if(!(gv(c[o>>2]|0,47167)|0)){c[l>>2]=jk(c[n>>2]|0,q,(c[k>>2]|0)+8|0)|0;if(c[l>>2]|0)break;if((c[(c[k>>2]|0)+8>>2]|0)==4){c[l>>2]=70;break}if((c[(c[k>>2]|0)+8>>2]|0)==3){vg(c[n>>2]|0);c[n>>2]=xg(c[m>>2]|0,37805,0)|0;if(c[n>>2]|0){c[s>>2]=Bg(c[n>>2]|0,1,p)|0;if(c[s>>2]|0){g=ok(c[s>>2]|0,c[p>>2]|0)|0;c[(c[k>>2]|0)+16>>2]=g;if(!(c[(c[k>>2]|0)+16>>2]|0))c[l>>2]=5}else c[l>>2]=68;if(c[l>>2]|0)break}vg(c[n>>2]|0);c[n>>2]=xg(c[m>>2]|0,37889,0)|0;if(c[n>>2]|0){c[s>>2]=Bg(c[n>>2]|0,1,p)|0;do if(c[s>>2]|0){if((c[p>>2]|0)>>>0>0){g=Vf(c[p>>2]|0)|0;c[(c[k>>2]|0)+20>>2]=g;if(c[(c[k>>2]|0)+20>>2]|0){Dx(c[(c[k>>2]|0)+20>>2]|0,c[s>>2]|0,c[p>>2]|0)|0;c[(c[k>>2]|0)+24>>2]=c[p>>2];break}else{c[l>>2]=iu()|0;break}}}else c[l>>2]=68;while(0);if(c[l>>2]|0)break}}c[r>>2]=2;a:while(1){vg(c[n>>2]|0);g=zg(c[m>>2]|0,c[r>>2]|0)|0;c[n>>2]=g;if(!g)break;c[s>>2]=Bg(c[n>>2]|0,0,p)|0;if(!((c[p>>2]|0)==9?(mw(c[s>>2]|0,37805,9)|0)==0:0))t=30;do if((t|0)==30){t=0;if((c[p>>2]|0)==5?(mw(c[s>>2]|0,37889,5)|0)==0:0)break;if((c[p>>2]|0)!=15)break a;if(mw(c[s>>2]|0,37895,15)|0)break a}while(0);c[r>>2]=(c[r>>2]|0)+1}if(!(c[n>>2]|0)){c[l>>2]=68;break}$f(c[o>>2]|0);c[o>>2]=Eg(c[n>>2]|0,0)|0;if(!(c[o>>2]|0)){c[l>>2]=65;break}}else c[q>>2]=c[q>>2]|8;c[r>>2]=0;while(1){if(!(c[(c[h>>2]|0)+(c[r>>2]<<2)>>2]|0))break;if(!(Vv(c[o>>2]|0,c[(c[h>>2]|0)+(c[r>>2]<<2)>>2]|0)|0))break;c[r>>2]=(c[r>>2]|0)+1}if(c[(c[h>>2]|0)+(c[r>>2]<<2)>>2]|0){c[c[j>>2]>>2]=c[n>>2];c[n>>2]=0;g=(c[k>>2]|0)+12|0;c[g>>2]=c[g>>2]|c[q>>2];c[l>>2]=0;break}else{c[l>>2]=70;break}}else c[l>>2]=65;while(0);$f(c[o>>2]|0);vg(c[n>>2]|0);vg(c[m>>2]|0);i=f;return c[l>>2]|0}function ok(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0;e=i;i=i+32|0;f=e+16|0;g=e+12|0;h=e+8|0;j=e+4|0;k=e;c[f>>2]=b;c[g>>2]=d;c[j>>2]=0;while(1){if(!(c[4340+(c[j>>2]<<3)>>2]|0))break;d=Kv(c[4340+(c[j>>2]<<3)>>2]|0)|0;if((d|0)==(c[g>>2]|0)?(mw(c[4340+(c[j>>2]<<3)>>2]|0,c[f>>2]|0,c[g>>2]|0)|0)==0:0)break;c[j>>2]=(c[j>>2]|0)+1}if(c[4340+(c[j>>2]<<3)>>2]|0){c[h>>2]=c[4340+(c[j>>2]<<3)+4>>2];l=c[h>>2]|0;i=e;return l|0}c[k>>2]=Vf((c[g>>2]|0)+1|0)|0;if(c[k>>2]|0){Dx(c[k>>2]|0,c[f>>2]|0,c[g>>2]|0)|0;a[(c[k>>2]|0)+(c[g>>2]|0)>>0]=0;c[h>>2]=pj(c[k>>2]|0)|0;$f(c[k>>2]|0);l=c[h>>2]|0;i=e;return l|0}else{c[h>>2]=0;l=c[h>>2]|0;i=e;return l|0}return 0}function pk(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=i;i=i+16|0;f=e+8|0;g=e+4|0;h=e;c[f>>2]=a;c[g>>2]=b;c[h>>2]=d;c[c[f>>2]>>2]=c[g>>2];c[(c[f>>2]|0)+4>>2]=c[h>>2];c[(c[f>>2]|0)+8>>2]=5;c[(c[f>>2]|0)+12>>2]=0;c[(c[f>>2]|0)+16>>2]=2;c[(c[f>>2]|0)+20>>2]=0;c[(c[f>>2]|0)+24>>2]=0;c[(c[f>>2]|0)+28>>2]=20;c[(c[f>>2]|0)+32>>2]=0;c[(c[f>>2]|0)+36>>2]=0;i=e;return}function qk(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;$f(c[(c[d>>2]|0)+20>>2]|0);i=b;return}
+function Np(a,b,e,f){a=a|0;b=b|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0;g=i;i=i+144|0;h=g+128|0;j=g+124|0;k=g+120|0;l=g+116|0;m=g+112|0;n=g+108|0;o=g+104|0;p=g+100|0;q=g+96|0;r=g+92|0;s=g+88|0;t=g+84|0;u=g+80|0;v=g+76|0;w=g+72|0;x=g+68|0;y=g+64|0;z=g+60|0;A=g+56|0;B=g+52|0;C=g+48|0;D=g+44|0;E=g+40|0;F=g+36|0;G=g+32|0;H=g+28|0;I=g+24|0;J=g+20|0;K=g+16|0;L=g+12|0;M=g+8|0;N=g+4|0;O=g;c[j>>2]=a;c[k>>2]=b;c[l>>2]=e;c[m>>2]=f;if(!(c[l>>2]|0)){c[h>>2]=0;P=c[h>>2]|0;i=g;return P|0}c[s>>2]=c[m>>2];f=c[s>>2]|0;c[t>>2]=(c[s>>2]|0)>>>0<65536?(f>>>0<256?0:8):f>>>0<16777216?16:24;c[r>>2]=32-((d[45806+((c[s>>2]|0)>>>(c[t>>2]|0))>>0]|0)+(c[t>>2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(c[g>>2]|0)+(c[m>>2]<<2)>>2]=c[o>>2];j=(c[m>>2]|0)+1|0;c[m>>2]=j}while((j|0)!=0);i=f;return c[l>>2]|0}function Rp(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;f=i;i=i+48|0;g=f+32|0;h=f+28|0;j=f+24|0;k=f+20|0;l=f+16|0;m=f+12|0;n=f+8|0;o=f+4|0;p=f;c[g>>2]=a;c[h>>2]=b;c[j>>2]=d;c[k>>2]=e;c[n>>2]=c[c[j>>2]>>2];if((c[n>>2]|0)>>>0<=1){a:do if((c[n>>2]|0)==1){c[o>>2]=0;while(1){if((c[o>>2]|0)>=(c[k>>2]|0))break a;c[(c[g>>2]|0)+(c[o>>2]<<2)>>2]=c[(c[h>>2]|0)+(c[o>>2]<<2)>>2];c[o>>2]=(c[o>>2]|0)+1}}else{c[p>>2]=0;while(1){if((c[p>>2]|0)>=(c[k>>2]|0))break a;c[(c[g>>2]|0)+(c[p>>2]<<2)>>2]=0;c[p>>2]=(c[p>>2]|0)+1}}while(0);c[m>>2]=0}else c[m>>2]=Pp(c[g>>2]|0,c[h>>2]|0,c[k>>2]|0,c[n>>2]|0)|0;c[(c[g>>2]|0)+(c[k>>2]<<2)>>2]=c[m>>2];c[g>>2]=(c[g>>2]|0)+4;c[l>>2]=1;while(1){if((c[l>>2]|0)>=(c[k>>2]|0))break;c[n>>2]=c[(c[j>>2]|0)+(c[l>>2]<<2)>>2];if((c[n>>2]|0)>>>0<=1){c[m>>2]=0;if((c[n>>2]|0)==1)c[m>>2]=Kp(c[g>>2]|0,c[g>>2]|0,c[h>>2]|0,c[k>>2]|0)|0}else c[m>>2]=Wt(c[g>>2]|0,c[h>>2]|0,c[k>>2]|0,c[n>>2]|0)|0;c[(c[g>>2]|0)+(c[k>>2]<<2)>>2]=c[m>>2];c[g>>2]=(c[g>>2]|0)+4;c[l>>2]=(c[l>>2]|0)+1}i=f;return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n>>2]|0);c[n>>2]=(c[m>>2]|0)>>>0<(c[n>>2]|0)>>>0&1;c[m>>2]=(c[l>>2]|0)-(c[m>>2]|0);c[n>>2]=(c[n>>2]|0)+((c[m>>2]|0)>>>0>(c[l>>2]|0)>>>0&1);c[(c[g>>2]|0)+(c[o>>2]<<2)>>2]=c[m>>2];k=(c[o>>2]|0)+1|0;c[o>>2]=k}while((k|0)!=0);i=f;return c[n>>2]|0}function Yp(){return 46156}function Zp(){var a=0,b=0,d=0,e=0,f=0,g=0;a=i;i=i+16|0;b=a;d=a+8|0;e=a+4|0;c[d>>2]=0;a:while(1){if((c[d>>2]|0)>=6){f=12;break}switch(c[d>>2]|0){case 0:{c[e>>2]=0;break}case 1:{c[e>>2]=1;break}case 2:{c[e>>2]=2;break}case 3:{c[e>>2]=3;break}case 4:{c[e>>2]=4;break}case 5:{c[e>>2]=8;break}default:{f=10;break a}}g=_p(c[e>>2]|0)|0;c[70860+(c[d>>2]<<2)>>2]=g;c[(c[70860+(c[d>>2]<<2)>>2]|0)+12>>2]=48;c[d>>2]=(c[d>>2]|0)+1}if((f|0)==10){c[b>>2]=c[d>>2];Cf(46300,b)}else if((f|0)==12){i=a;return 0}return 0}function _p(a){a=a|0;var b=0,d=0,e=0;b=i;i=i+16|0;d=b+4|0;e=b;c[d>>2]=a;c[e>>2]=$p(1)|0;c[c[(c[e>>2]|0)+16>>2]>>2]=c[d>>2];c[(c[e>>2]|0)+4>>2]=(c[d>>2]|0)!=0?1:0;c[(c[e>>2]|0)+8>>2]=0;i=b;return c[e>>2]|0}function $p(a){a=a|0;var b=0,d=0,e=0,f=0;b=i;i=i+16|0;d=b+4|0;e=b;c[d>>2]=a;c[e>>2]=dg(20)|0;if(c[d>>2]|0)f=aq(c[d>>2]|0,0)|0;else f=0;c[(c[e>>2]|0)+16>>2]=f;c[c[e>>2]>>2]=c[d>>2];c[(c[e>>2]|0)+4>>2]=0;c[(c[e>>2]|0)+8>>2]=0;c[(c[e>>2]|0)+12>>2]=0;i=b;return c[e>>2]|0}function aq(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0;d=i;i=i+16|0;e=d+12|0;f=d+8|0;g=d+4|0;h=d;c[e>>2]=a;c[f>>2]=b;c[h>>2]=((c[e>>2]|0)!=0?c[e>>2]|0:1)<<2;b=c[h>>2]|0;if(c[f>>2]|0)j=fg(b)|0;else j=dg(b)|0;c[g>>2]=j;if(c[e>>2]|0){k=c[g>>2]|0;i=d;return k|0}c[c[g>>2]>>2]=0;k=c[g>>2]|0;i=d;return k|0}function bq(a){a=a|0;var b=0,d=0,e=0,f=0;b=i;i=i+16|0;d=b+4|0;e=b;c[d>>2]=a;c[e>>2]=dg(20)|0;if(c[d>>2]|0)f=aq(c[d>>2]|0,1)|0;else f=0;c[(c[e>>2]|0)+16>>2]=f;c[c[e>>2]>>2]=c[d>>2];c[(c[e>>2]|0)+12>>2]=1;c[(c[e>>2]|0)+4>>2]=0;c[(c[e>>2]|0)+8>>2]=0;i=b;return c[e>>2]|0}function cq(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0;f=i;i=i+48|0;g=f+28|0;h=f+24|0;j=f+20|0;k=f+16|0;l=f+12|0;m=f+32|0;n=f;o=f+8|0;c[g>>2]=b;c[h>>2]=e;if(!(c[g>>2]|0)){i=f;return}c[j>>2]=c[h>>2]<<2;a:do if(c[j>>2]|0){c[k>>2]=c[g>>2];c[l>>2]=c[j>>2];a[m>>0]=0;h=n;c[h>>2]=d[m>>0];c[h+4>>2]=0;while(1){if(!((c[k>>2]&7|0)!=0?(c[l>>2]|0)!=0:0))break;a[c[k>>2]>>0]=a[m>>0]|0;c[k>>2]=(c[k>>2]|0)+1;c[l>>2]=(c[l>>2]|0)+-1}if((c[l>>2]|0)>>>0>=8){h=n;e=Mx(c[h>>2]|0,c[h+4>>2]|0,16843009,16843009)|0;h=n;c[h>>2]=e;c[h+4>>2]=C;do{c[o>>2]=c[k>>2];h=n;e=c[h+4>>2]|0;b=c[o>>2]|0;c[b>>2]=c[h>>2];c[b+4>>2]=e;c[l>>2]=(c[l>>2]|0)-8;c[k>>2]=(c[k>>2]|0)+8}while((c[l>>2]|0)>>>0>=8)}while(1){if(!(c[l>>2]|0))break a;a[c[k>>2]>>0]=a[m>>0]|0;c[k>>2]=(c[k>>2]|0)+1;c[l>>2]=(c[l>>2]|0)+-1}}while(0);$f(c[g>>2]|0);i=f;return}function dq(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=i;i=i+16|0;f=e+8|0;g=e+4|0;h=e;c[f>>2]=a;c[g>>2]=b;c[h>>2]=d;cq(c[(c[f>>2]|0)+16>>2]|0,c[c[f>>2]>>2]|0);c[(c[f>>2]|0)+16>>2]=c[g>>2];c[c[f>>2]>>2]=c[h>>2];i=e;return}function eq(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0;d=i;i=i+16|0;e=d+8|0;f=d+4|0;g=d;c[e>>2]=a;c[f>>2]=b;b=c[e>>2]|0;if((c[f>>2]|0)>>>0<=(c[c[e>>2]>>2]|0)>>>0){c[g>>2]=c[b+4>>2];while(1){if((c[g>>2]|0)>>>0>=(c[c[e>>2]>>2]|0)>>>0)break;c[(c[(c[e>>2]|0)+16>>2]|0)+(c[g>>2]<<2)>>2]=0;c[g>>2]=(c[g>>2]|0)+1}i=d;return}a=c[e>>2]|0;a:do if(!(c[b+16>>2]|0)){h=c[f>>2]|0;if(c[a+12>>2]&1){j=hg(h,4)|0;c[(c[e>>2]|0)+16>>2]=j;break}else{j=gg(h,4)|0;c[(c[e>>2]|0)+16>>2]=j;break}}else{j=eg(c[a+16>>2]|0,c[f>>2]<<2)|0;c[(c[e>>2]|0)+16>>2]=j;c[g>>2]=c[c[e>>2]>>2];while(1){if((c[g>>2]|0)>>>0>=(c[f>>2]|0)>>>0)break a;c[(c[(c[e>>2]|0)+16>>2]|0)+(c[g>>2]<<2)>>2]=0;c[g>>2]=(c[g>>2]|0)+1}}while(0);c[c[e>>2]>>2]=c[f>>2];i=d;return}function fq(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;if((c[d>>2]|0)!=0?(c[(c[d>>2]|0)+12>>2]&16|0)!=0:0){gq();i=b;return}c[(c[d>>2]|0)+4>>2]=0;c[(c[d>>2]|0)+12>>2]=0;i=b;return}function gq(){var a=0;a=i;i=i+16|0;yf(46331,a);i=a;return}function hq(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b+4|0;c[d>>2]=a;if(!(c[d>>2]|0)){i=b;return}if(c[(c[d>>2]|0)+12>>2]&32){i=b;return}a=c[(c[d>>2]|0)+16>>2]|0;if(c[(c[d>>2]|0)+12>>2]&4)$f(a);else cq(a,c[c[d>>2]>>2]|0);if(c[(c[d>>2]|0)+12>>2]&-3864)Cf(46375,b);$f(c[d>>2]|0);i=b;return}function iq(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0;e=i;i=i+16|0;f=e+12|0;g=e+8|0;h=e+4|0;j=e;c[g>>2]=a;c[h>>2]=b;c[j>>2]=d;if(!(c[g>>2]|0))c[g>>2]=$p(0)|0;if((c[g>>2]|0)!=0?(c[(c[g>>2]|0)+12>>2]&16|0)!=0:0){gq();c[f>>2]=c[g>>2];k=c[f>>2]|0;i=e;return k|0}d=c[(c[g>>2]|0)+16>>2]|0;if(c[(c[g>>2]|0)+12>>2]&4)$f(d);else cq(d,c[c[g>>2]>>2]|0);c[(c[g>>2]|0)+16>>2]=c[h>>2];c[c[g>>2]>>2]=0;c[(c[g>>2]|0)+4>>2]=0;c[(c[g>>2]|0)+8>>2]=c[j>>2];c[(c[g>>2]|0)+12>>2]=4|c[(c[g>>2]|0)+12>>2]&3840;if(Zf(c[(c[g>>2]|0)+16>>2]|0)|0){j=(c[g>>2]|0)+12|0;c[j>>2]=c[j>>2]|1}c[f>>2]=c[g>>2];k=c[f>>2]|0;i=e;return k|0}function jq(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0;e=i;i=i+32|0;f=e+20|0;g=e+16|0;h=e+12|0;j=e+8|0;k=e+4|0;l=e;c[g>>2]=a;c[h>>2]=b;c[j>>2]=d;c[l>>2]=(((c[j>>2]|0)+7|0)>>>0)/8|0;d=(Zf(c[h>>2]|0)|0)!=0;b=c[l>>2]|0;if(d)m=Yf(b)|0;else m=Vf(b)|0;c[k>>2]=m;if(c[k>>2]|0){Dx(c[k>>2]|0,c[h>>2]|0,c[l>>2]|0)|0;c[f>>2]=iq(c[g>>2]|0,c[k>>2]|0,c[j>>2]|0)|0;n=c[f>>2]|0;i=e;return n|0}else{c[f>>2]=0;n=c[f>>2]|0;i=e;return n|0}return 0}function kq(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=i;i=i+16|0;e=d+8|0;f=d+4|0;c[e>>2]=a;c[f>>2]=b;if(!(c[(c[e>>2]|0)+12>>2]&4))Cf(46407,d);if(c[f>>2]|0)c[c[f>>2]>>2]=c[(c[e>>2]|0)+8>>2];i=d;return c[(c[e>>2]|0)+16>>2]|0}function lq(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0;d=i;i=i+32|0;e=d+20|0;f=d+16|0;g=d+12|0;h=d+8|0;j=d+4|0;k=d;c[f>>2]=a;c[g>>2]=b;c[h>>2]=kq(c[f>>2]|0,c[g>>2]|0)|0;if((c[h>>2]|0)==0&(c[g>>2]|0)!=0){c[e>>2]=0;l=c[e>>2]|0;i=d;return l|0}c[k>>2]=(((c[c[g>>2]>>2]|0)+7|0)>>>0)/8|0;g=(Zf(c[h>>2]|0)|0)!=0;f=c[k>>2]|0;if(g)m=Yf(f)|0;else m=Vf(f)|0;c[j>>2]=m;if(c[j>>2]|0)Dx(c[j>>2]|0,c[h>>2]|0,c[k>>2]|0)|0;c[e>>2]=c[j>>2];l=c[e>>2]|0;i=d;return l|0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[f>>2]=b;b=c[e>>2]|0;if((c[e>>2]|0)==(c[f>>2]|0)){if((b|0)!=0?(c[(c[e>>2]|0)+12>>2]&16|0)!=0:0){gq();i=d;return}}else oq(b,c[f>>2]|0)|0;c[(c[e>>2]|0)+8>>2]=((c[(c[f>>2]|0)+8>>2]|0)!=0^1)&1;i=d;return}function oq(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0;d=i;i=i+32|0;e=d+28|0;f=d+24|0;g=d+20|0;h=d+16|0;j=d+12|0;k=d+8|0;l=d+4|0;m=d;c[f>>2]=a;c[g>>2]=b;c[k>>2]=c[(c[g>>2]|0)+4>>2];c[l>>2]=c[(c[g>>2]|0)+8>>2];if(!(c[f>>2]|0))c[f>>2]=$p(c[(c[g>>2]|0)+4>>2]|0)|0;if((c[f>>2]|0)!=0?(c[(c[f>>2]|0)+12>>2]&16|0)!=0:0){gq();c[e>>2]=c[f>>2];n=c[e>>2]|0;i=d;return n|0}if((c[c[f>>2]>>2]|0)<(c[k>>2]|0))eq(c[f>>2]|0,c[k>>2]|0);c[h>>2]=c[(c[f>>2]|0)+16>>2];c[j>>2]=c[(c[g>>2]|0)+16>>2];c[m>>2]=0;while(1){if((c[m>>2]|0)>=(c[k>>2]|0))break;c[(c[h>>2]|0)+(c[m>>2]<<2)>>2]=c[(c[j>>2]|0)+(c[m>>2]<<2)>>2];c[m>>2]=(c[m>>2]|0)+1}c[(c[f>>2]|0)+4>>2]=c[k>>2];c[(c[f>>2]|0)+12>>2]=c[(c[g>>2]|0)+12>>2];g=(c[f>>2]|0)+12|0;c[g>>2]=c[g>>2]&-49;c[(c[f>>2]|0)+8>>2]=c[l>>2];c[e>>2]=c[f>>2];n=c[e>>2]|0;i=d;return n|0}function pq(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0;b=i;i=i+16|0;d=b+12|0;e=b+8|0;f=b+4|0;g=b;c[d>>2]=a;if((c[d>>2]|0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+(c[j>>2]<<2)>>2]^c[m>>2];c[j>>2]=(c[j>>2]|0)+1}c[m>>2]=n&(c[(c[f>>2]|0)+4>>2]^c[(c[g>>2]|0)+4>>2]);c[(c[f>>2]|0)+4>>2]=c[(c[f>>2]|0)+4>>2]^c[m>>2];c[(c[g>>2]|0)+4>>2]=c[(c[g>>2]|0)+4>>2]^c[m>>2];c[m>>2]=c[l>>2]&(c[(c[f>>2]|0)+8>>2]^c[(c[g>>2]|0)+8>>2]);c[(c[f>>2]|0)+8>>2]=c[(c[f>>2]|0)+8>>2]^c[m>>2];c[(c[g>>2]|0)+8>>2]=c[(c[g>>2]|0)+8>>2]^c[m>>2];i=e;return}function vq(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;a=$p((((c[d>>2]|0)+32-1|0)>>>0)/32|0)|0;i=b;return a|0}function wq(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;a=bq((((c[d>>2]|0)+32-1|0)>>>0)/32|0)|0;i=b;return a|0}function xq(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;hq(c[d>>2]|0);i=b;return}function yq(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0;e=i;i=i+32|0;f=e+16|0;g=e+12|0;h=e+8|0;j=e+4|0;k=e;c[f>>2]=a;c[g>>2]=b;c[h>>2]=d;c[k>>2]=(((c[g>>2]|0)+7|0)>>>0)/8|0;if((c[f>>2]|0)!=0?(c[(c[f>>2]|0)+12>>2]&16|0)!=0:0){gq();i=e;return}g=(c[f>>2]|0)!=0;if(!(c[h>>2]|0)){if(g?(c[(c[f>>2]|0)+12>>2]&1|0)!=0:0)l=fg(c[k>>2]|0)|0;else l=dg(c[k>>2]|0)|0;c[j>>2]=l;Tn(c[j>>2]|0,c[k>>2]|0)}else{if(g?(c[(c[f>>2]|0)+12>>2]&1|0)!=0:0)m=On(c[k>>2]|0,c[h>>2]|0)|0;else m=Mn(c[k>>2]|0,c[h>>2]|0)|0;c[j>>2]=m}Cp(c[f>>2]|0,c[j>>2]|0,c[k>>2]|0,0);$f(c[j>>2]|0);i=e;return}function zq(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;d=i;i=i+16|0;e=d+12|0;f=d+8|0;g=d+4|0;c[f>>2]=a;c[g>>2]=b;switch(c[g>>2]|0){case 1:{c[e>>2]=((c[(c[f>>2]|0)+12>>2]&1|0)!=0^1^1)&1;h=c[e>>2]|0;i=d;return h|0}case 2:{c[e>>2]=((c[(c[f>>2]|0)+12>>2]&4|0)!=0^1^1)&1;h=c[e>>2]|0;i=d;return h|0}case 4:{c[e>>2]=((c[(c[f>>2]|0)+12>>2]&16|0)!=0^1^1)&1;h=c[e>>2]|0;i=d;return h|0}case 8:{c[e>>2]=((c[(c[f>>2]|0)+12>>2]&32|0)!=0^1^1)&1;h=c[e>>2]|0;i=d;return h|0}case 2048:case 1024:case 512:case 256:{c[e>>2]=((c[(c[f>>2]|0)+12>>2]&c[g>>2]|0)!=0^1^1)&1;h=c[e>>2]|0;i=d;return h|0}default:Cf(46500,d)}return 0}function Aq(a){a=a|0;var b=0,d=0,e=0;b=i;i=i+16|0;d=b;e=b+12|0;c[e>>2]=a;a=c[e>>2]|0;if((c[e>>2]|0)<0|(c[e>>2]|0)>>>0>6){c[d>>2]=a;Cf(46300,d)}if(c[70860+(a<<2)>>2]|0){i=b;return c[70860+(c[e>>2]<<2)>>2]|0}else Cf(46520,b+8|0);return 0}function Bq(){return 46551}function Cq(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;f=i;i=i+96|0;g=f+28|0;h=f+24|0;j=f+20|0;k=f+16|0;l=f+12|0;m=f+32|0;n=f+8|0;o=f+4|0;p=f;c[h>>2]=b;c[j>>2]=e;c[k>>2]=sx(172)|0;if(!(c[k>>2]|0)){c[g>>2]=0;q=c[g>>2]|0;i=f;return q|0}c[c[k>>2]>>2]=1779033703;c[(c[k>>2]|0)+4>>2]=-1150833019;c[(c[k>>2]|0)+8>>2]=1013904242;c[(c[k>>2]|0)+12>>2]=-1521486534;c[(c[k>>2]|0)+16>>2]=1359893119;c[(c[k>>2]|0)+20>>2]=-1694144372;c[(c[k>>2]|0)+24>>2]=528734635;c[(c[k>>2]|0)+28>>2]=1541459225;c[(c[k>>2]|0)+32>>2]=0;c[(c[k>>2]|0)+36>>2]=0;e=(c[k>>2]|0)+40|0;a[e>>0]=a[e>>0]&-2;e=(c[k>>2]|0)+40|0;a[e>>0]=a[e>>0]&-3;a:do if(c[h>>2]|0){e=m;b=e+64|0;do{a[e>>0]=0;e=e+1|0}while((e|0)<(b|0));e=(c[k>>2]|0)+105|0;b=e+64|0;do{a[e>>0]=0;e=e+1|0}while((e|0)<(b|0));do if((c[j>>2]|0)>>>0<=64){Dx(m|0,c[h>>2]|0,c[j>>2]|0)|0;Dx((c[k>>2]|0)+105|0,c[h>>2]|0,c[j>>2]|0)|0}else{c[n>>2]=Cq(0,0)|0;if(c[n>>2]|0){Dq(c[n>>2]|0,c[h>>2]|0,c[j>>2]|0);Gq(c[n>>2]|0);e=m;r=(c[n>>2]|0)+41|0;b=e+32|0;do{a[e>>0]=a[r>>0]|0;e=e+1|0;r=r+1|0}while((e|0)<(b|0));e=(c[k>>2]|0)+105|0;r=(c[n>>2]|0)+41|0;b=e+32|0;do{a[e>>0]=a[r>>0]|0;e=e+1|0;r=r+1|0}while((e|0)<(b|0));Hq(c[n>>2]|0);break}tx(c[k>>2]|0);c[g>>2]=0;q=c[g>>2]|0;i=f;return q|0}while(0);c[l>>2]=0;while(1){if((c[l>>2]|0)>=64)break;e=m+(c[l>>2]|0)|0;a[e>>0]=(d[e>>0]|0)^54;e=(c[k>>2]|0)+105+(c[l>>2]|0)|0;a[e>>0]=(d[e>>0]|0)^92;c[l>>2]=(c[l>>2]|0)+1}e=(c[k>>2]|0)+40|0;a[e>>0]=a[e>>0]&-3|2;Dq(c[k>>2]|0,m,64);c[o>>2]=m;c[p>>2]=64;while(1){if(!(c[p>>2]|0))break a;a[c[o>>2]>>0]=0;c[o>>2]=(c[o>>2]|0)+1;c[p>>2]=(c[p>>2]|0)+-1}}while(0);c[g>>2]=c[k>>2];q=c[g>>2]|0;i=f;return q|0}function Dq(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0;f=i;i=i+16|0;g=f+12|0;h=f+8|0;j=f+4|0;k=f;c[g>>2]=b;c[h>>2]=d;c[j>>2]=e;c[k>>2]=c[h>>2];if((a[(c[g>>2]|0)+40>>0]<<7&255)<<24>>24>>7<<24>>24){i=f;return}if((c[(c[g>>2]|0)+36>>2]|0)==64){Eq(c[g>>2]|0,(c[g>>2]|0)+41|0);c[(c[g>>2]|0)+36>>2]=0;h=(c[g>>2]|0)+32|0;c[h>>2]=(c[h>>2]|0)+1}if(!(c[k>>2]|0)){i=f;return}if(c[(c[g>>2]|0)+36>>2]|0){while(1){if(!(c[j>>2]|0))break;if((c[(c[g>>2]|0)+36>>2]|0)>=64)break;h=c[k>>2]|0;c[k>>2]=h+1;e=a[h>>0]|0;h=(c[g>>2]|0)+36|0;d=c[h>>2]|0;c[h>>2]=d+1;a[(c[g>>2]|0)+41+d>>0]=e;c[j>>2]=(c[j>>2]|0)+-1}Dq(c[g>>2]|0,0,0);if(!(c[j>>2]|0)){i=f;return}}while(1){if((c[j>>2]|0)>>>0<64)break;Eq(c[g>>2]|0,c[k>>2]|0);c[(c[g>>2]|0)+36>>2]=0;e=(c[g>>2]|0)+32|0;c[e>>2]=(c[e>>2]|0)+1;c[j>>2]=(c[j>>2]|0)-64;c[k>>2]=(c[k>>2]|0)+64}while(1){if(!(c[j>>2]|0)){l=15;break}if((c[(c[g>>2]|0)+36>>2]|0)>=64){l=15;break}e=c[k>>2]|0;c[k>>2]=e+1;d=a[e>>0]|0;e=(c[g>>2]|0)+36|0;h=c[e>>2]|0;c[e>>2]=h+1;a[(c[g>>2]|0)+41+h>>0]=d;c[j>>2]=(c[j>>2]|0)+-1}if((l|0)==15){i=f;return}}function Eq(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0;e=i;i=i+384|0;f=e+376|0;g=e+372|0;h=e+368|0;j=e+364|0;k=e+360|0;l=e+356|0;m=e+352|0;n=e+348|0;o=e+344|0;p=e+340|0;q=e+336|0;r=e+332|0;s=e+328|0;t=e+264|0;u=e+8|0;v=e+4|0;w=e;c[f>>2]=b;c[g>>2]=d;c[h>>2]=c[g>>2];c[j>>2]=c[c[f>>2]>>2];c[k>>2]=c[(c[f>>2]|0)+4>>2];c[l>>2]=c[(c[f>>2]|0)+8>>2];c[m>>2]=c[(c[f>>2]|0)+12>>2];c[n>>2]=c[(c[f>>2]|0)+16>>2];c[o>>2]=c[(c[f>>2]|0)+20>>2];c[p>>2]=c[(c[f>>2]|0)+24>>2];c[q>>2]=c[(c[f>>2]|0)+28>>2];c[v>>2]=0;c[w>>2]=t;while(1){if((c[v>>2]|0)>=16)break;g=c[h>>2]|0;c[h>>2]=g+1;a[(c[w>>2]|0)+3>>0]=a[g>>0]|0;g=c[h>>2]|0;c[h>>2]=g+1;a[(c[w>>2]|0)+2>>0]=a[g>>0]|0;g=c[h>>2]|0;c[h>>2]=g+1;a[(c[w>>2]|0)+1>>0]=a[g>>0]|0;g=c[h>>2]|0;c[h>>2]=g+1;a[c[w>>2]>>0]=a[g>>0]|0;c[v>>2]=(c[v>>2]|0)+1;c[w>>2]=(c[w>>2]|0)+4}c[v>>2]=0;while(1){if((c[v>>2]|0)>=16)break;c[u+(c[v>>2]<<2)>>2]=c[t+(c[v>>2]<<2)>>2];c[v>>2]=(c[v>>2]|0)+1}while(1){if((c[v>>2]|0)>=64)break;t=Fq(c[u+((c[v>>2]|0)-2<<2)>>2]|0,17)|0;w=t^(Fq(c[u+((c[v>>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+(c[n>>2]|0);n=(c[f>>2]|0)+20|0;c[n>>2]=(c[n>>2]|0)+(c[o>>2]|0);o=(c[f>>2]|0)+24|0;c[o>>2]=(c[o>>2]|0)+(c[p>>2]|0);p=(c[f>>2]|0)+28|0;c[p>>2]=(c[p>>2]|0)+(c[q>>2]|0);i=e;return}function Fq(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=i;i=i+16|0;e=d+4|0;f=d;c[e>>2]=a;c[f>>2]=b;i=d;return (c[e>>2]|0)>>>(c[f>>2]|0)|c[e>>2]<<32-(c[f>>2]|0)|0}function Gq(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0;d=i;i=i+32|0;e=d+16|0;f=d+12|0;g=d+8|0;h=d+4|0;j=d;c[e>>2]=b;if((a[(c[e>>2]|0)+40>>0]<<7&255)<<24>>24>>7<<24>>24){i=d;return}Dq(c[e>>2]|0,0,0);c[f>>2]=c[(c[e>>2]|0)+32>>2];c[h>>2]=c[f>>2]<<6;c[g>>2]=(c[f>>2]|0)>>>26;c[f>>2]=c[h>>2];b=(c[h>>2]|0)+(c[(c[e>>2]|0)+36>>2]|0)|0;c[h>>2]=b;if(b>>>0<(c[f>>2]|0)>>>0)c[g>>2]=(c[g>>2]|0)+1;c[f>>2]=c[h>>2];c[h>>2]=c[h>>2]<<3;c[g>>2]=c[g>>2]<<3;c[g>>2]=c[g>>2]|(c[f>>2]|0)>>>29;f=(c[(c[e>>2]|0)+36>>2]|0)<56;b=(c[e>>2]|0)+36|0;k=c[b>>2]|0;c[b>>2]=k+1;a[(c[e>>2]|0)+41+k>>0]=-128;a:do if(f)while(1){if((c[(c[e>>2]|0)+36>>2]|0)>=56)break a;k=(c[e>>2]|0)+36|0;b=c[k>>2]|0;c[k>>2]=b+1;a[(c[e>>2]|0)+41+b>>0]=0}else{while(1){l=c[e>>2]|0;if((c[(c[e>>2]|0)+36>>2]|0)>=64)break;b=l+36|0;k=c[b>>2]|0;c[b>>2]=k+1;a[(c[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]|0;c[j>>2]=g+1;a[g>>0]=h;h=(c[(c[e>>2]|0)+24>>2]|0)>>>8&255;g=c[j>>2]|0;c[j>>2]=g+1;a[g>>0]=h;h=c[(c[e>>2]|0)+24>>2]&255;g=c[j>>2]|0;c[j>>2]=g+1;a[g>>0]=h;h=(c[(c[e>>2]|0)+28>>2]|0)>>>24&255;g=c[j>>2]|0;c[j>>2]=g+1;a[g>>0]=h;h=(c[(c[e>>2]|0)+28>>2]|0)>>>16&255;g=c[j>>2]|0;c[j>>2]=g+1;a[g>>0]=h;h=(c[(c[e>>2]|0)+28>>2]|0)>>>8&255;g=c[j>>2]|0;c[j>>2]=g+1;a[g>>0]=h;h=c[(c[e>>2]|0)+28>>2]&255;g=c[j>>2]|0;c[j>>2]=g+1;a[g>>0]=h;h=(c[e>>2]|0)+40|0;a[h>>0]=a[h>>0]&-2|1;i=d;return}function Hq(b){b=b|0;var d=0,e=0,f=0,g=0;d=i;i=i+16|0;e=d+8|0;f=d+4|0;g=d;c[e>>2]=b;if(!(c[e>>2]|0)){i=d;return}a:do if((a[(c[e>>2]|0)+40>>0]<<6&255)<<24>>24>>7<<24>>24){c[f>>2]=(c[e>>2]|0)+105;c[g>>2]=64;while(1){if(!(c[g>>2]|0))break a;a[c[f>>2]>>0]=0;c[f>>2]=(c[f>>2]|0)+1;c[g>>2]=(c[g>>2]|0)+-1}}while(0);tx(c[e>>2]|0);i=d;return}function Iq(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0;e=i;i=i+16|0;f=e+12|0;g=e+8|0;h=e+4|0;j=e;c[g>>2]=b;c[h>>2]=d;Gq(c[g>>2]|0);do if((a[(c[g>>2]|0)+40>>0]<<6&255)<<24>>24>>7<<24>>24){c[j>>2]=Cq(0,0)|0;if(c[j>>2]|0){Dq(c[j>>2]|0,(c[g>>2]|0)+105|0,64);Dq(c[j>>2]|0,(c[g>>2]|0)+41|0,32);Gq(c[j>>2]|0);d=(c[g>>2]|0)+41|0;b=(c[j>>2]|0)+41|0;k=d+32|0;do{a[d>>0]=a[b>>0]|0;d=d+1|0;b=b+1|0}while((d|0)<(k|0));Hq(c[j>>2]|0);break}tx(c[g>>2]|0);c[f>>2]=0;l=c[f>>2]|0;i=e;return l|0}while(0);if(c[h>>2]|0)c[c[h>>2]>>2]=32;c[f>>2]=(c[g>>2]|0)+41;l=c[f>>2]|0;i=e;return l|0}function Jq(b,e,f,g,h){b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0;j=i;i=i+80|0;k=j+56|0;l=j+52|0;m=j+48|0;n=j+44|0;o=j+40|0;p=j+36|0;q=j+32|0;r=j+28|0;s=j+24|0;t=j+20|0;u=j+16|0;v=j+12|0;w=j+8|0;x=j+64|0;y=j+4|0;z=j;c[l>>2]=b;c[m>>2]=e;c[n>>2]=f;c[o>>2]=g;c[p>>2]=h;if((c[(c[(c[l>>2]|0)+12>>2]|0)+20>>2]|0)!=16){c[k>>2]=139;A=c[k>>2]|0;i=j;return A|0}if((c[n>>2]|0)>>>0<((c[p>>2]|0)+8|0)>>>0){c[k>>2]=200;A=c[k>>2]|0;i=j;return A|0}if(((c[p>>2]|0)>>>0)%8|0){c[k>>2]=45;A=c[k>>2]|0;i=j;return A|0}c[s>>2]=((c[p>>2]|0)>>>0)/8|0;if((c[s>>2]|0)>>>0<2){c[k>>2]=45;A=c[k>>2]|0;i=j;return A|0}c[y>>2]=0;c[u>>2]=c[m>>2];c[v>>2]=c[m>>2];c[w>>2]=(c[l>>2]|0)+80;m=c[v>>2]|0;if((d[(c[l>>2]|0)+56>>0]|0)>>>1&1){n=(c[l>>2]|0)+64|0;a[m>>0]=a[n>>0]|0;a[m+1>>0]=a[n+1>>0]|0;a[m+2>>0]=a[n+2>>0]|0;a[m+3>>0]=a[n+3>>0]|0;a[m+4>>0]=a[n+4>>0]|0;a[m+5>>0]=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>2]=c[j>>2];c[o>>2]=c[k>>2];c[p>>2]=c[l>>2];c[h>>2]=3;if(!((c[n>>2]|c[o>>2]|c[p>>2])&3)){c[q>>2]=c[n>>2];c[r>>2]=c[o>>2];c[s>>2]=c[p>>2];while(1){if((c[m>>2]|0)>>>0<4)break;l=c[r>>2]|0;c[r>>2]=l+4;k=c[l>>2]|0;l=c[s>>2]|0;c[s>>2]=l+4;j=k^c[l>>2];l=c[q>>2]|0;c[q>>2]=l+4;c[l>>2]=j;c[m>>2]=(c[m>>2]|0)-4}c[n>>2]=c[q>>2];c[o>>2]=c[r>>2];c[p>>2]=c[s>>2]}while(1){if(!(c[m>>2]|0))break;s=c[o>>2]|0;c[o>>2]=s+1;r=d[s>>0]|0;s=c[p>>2]|0;c[p>>2]=s+1;q=(r^(d[s>>0]|0))&255;s=c[n>>2]|0;c[n>>2]=s+1;a[s>>0]=q;c[m>>2]=(c[m>>2]|0)+-1}i=h;return}function Oq(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0;f=i;i=i+32|0;g=f+28|0;h=f+24|0;j=f+20|0;k=f+16|0;l=f+12|0;m=f+8|0;n=f+4|0;c[g>>2]=b;c[h>>2]=d;c[j>>2]=e;c[k>>2]=c[g>>2];c[l>>2]=c[h>>2];c[f>>2]=3;if(!((c[k>>2]|c[l>>2])&3)){c[m>>2]=c[k>>2];c[n>>2]=c[l>>2];while(1){if((c[j>>2]|0)>>>0<4)break;h=c[n>>2]|0;c[n>>2]=h+4;g=c[h>>2]|0;h=c[m>>2]|0;c[m>>2]=h+4;c[h>>2]=g;c[j>>2]=(c[j>>2]|0)-4}c[k>>2]=c[m>>2];c[l>>2]=c[n>>2]}while(1){if(!(c[j>>2]|0))break;n=c[l>>2]|0;c[l>>2]=n+1;m=a[n>>0]|0;n=c[k>>2]|0;c[k>>2]=n+1;a[n>>0]=m;c[j>>2]=(c[j>>2]|0)+-1}i=f;return}function Pq(b,d,e,f,g){b=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=e|0;f=f|0;g=g|0;var h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0;h=i;i=i+96|0;j=h+64|0;k=h+60|0;l=h+56|0;m=h+52|0;n=h+48|0;o=h+40|0;p=h+72|0;q=h+36|0;r=h+32|0;s=h+28|0;t=h+24|0;u=h+20|0;v=h+16|0;w=h+68|0;x=h;y=h+12|0;z=h+8|0;c[k>>2]=b;c[l>>2]=e;c[m>>2]=f;c[n>>2]=g;c[h+44>>2]=16;c[o>>2]=c[(c[(c[k>>2]|0)+12>>2]|0)+36>>2];c[q>>2]=0;c[r>>2]=c[(c[k>>2]|0)+128+36>>2];if((c[m>>2]|0)==0?!((c[r>>2]|0)!=0&(c[n>>2]|0)!=0):0){c[j>>2]=0;A=c[j>>2]|0;i=h;return A|0}a:do{b:do if((c[r>>2]|0)>>>0>0?1:((c[m>>2]|0)+(c[r>>2]|0)|0)>>>0<16)while(1){if(!((c[m>>2]|0)!=0?(c[r>>2]|0)>>>0<16:0))break b;g=c[l>>2]|0;c[l>>2]=g+1;f=a[g>>0]|0;g=c[r>>2]|0;c[r>>2]=g+1;a[(c[k>>2]|0)+128+20+g>>0]=f;c[m>>2]=(c[m>>2]|0)+-1}while(0);c:do if(!(c[m>>2]|0)){if(!(c[n>>2]|0))break a;while(1){if((c[r>>2]|0)>>>0>=16)break c;f=c[r>>2]|0;c[r>>2]=f+1;a[(c[k>>2]|0)+128+20+f>>0]=0}}while(0);if((c[r>>2]|0)>>>0>0){Tq((c[k>>2]|0)+64|0,(c[k>>2]|0)+64|0,(c[k>>2]|0)+128+20|0,16);c[t>>2]=vb[c[o>>2]&63]((c[k>>2]|0)+496|0,(c[k>>2]|0)+64|0,(c[k>>2]|0)+64|0)|0;c[q>>2]=(c[q>>2]|0)>>>0>(c[t>>2]|0)>>>0?c[q>>2]|0:c[t>>2]|0;c[r>>2]=0}d:do if(c[(c[k>>2]|0)+20+8>>2]|0){c[s>>2]=((c[m>>2]|0)>>>0)/16|0;Db[c[(c[k>>2]|0)+20+8>>2]&1]((c[k>>2]|0)+496|0,(c[k>>2]|0)+64|0,p,c[l>>2]|0,c[s>>2]|0,1);c[l>>2]=(c[l>>2]|0)+(c[s>>2]<<4);c[m>>2]=(c[m>>2]|0)-(c[s>>2]<<4);c[u>>2]=p;c[v>>2]=16;a[w>>0]=0;f=x;c[f>>2]=d[w>>0];c[f+4>>2]=0;while(1){if(!((c[u>>2]&7|0)!=0?(c[v>>2]|0)!=0:0))break;a[c[u>>2]>>0]=a[w>>0]|0;c[u>>2]=(c[u>>2]|0)+1;c[v>>2]=(c[v>>2]|0)+-1}if((c[v>>2]|0)>>>0>=8){f=x;g=Mx(c[f>>2]|0,c[f+4>>2]|0,16843009,16843009)|0;f=x;c[f>>2]=g;c[f+4>>2]=C;do{c[y>>2]=c[u>>2];f=x;g=c[f+4>>2]|0;e=c[y>>2]|0;c[e>>2]=c[f>>2];c[e+4>>2]=g;c[v>>2]=(c[v>>2]|0)-8;c[u>>2]=(c[u>>2]|0)+8}while((c[v>>2]|0)>>>0>=8)}while(1){if(!(c[v>>2]|0))break d;a[c[u>>2]>>0]=a[w>>0]|0;c[u>>2]=(c[u>>2]|0)+1;c[v>>2]=(c[v>>2]|0)+-1}}else while(1){if((c[m>>2]|0)>>>0<16)break d;Tq((c[k>>2]|0)+64|0,(c[k>>2]|0)+64|0,c[l>>2]|0,16);c[z>>2]=vb[c[o>>2]&63]((c[k>>2]|0)+496|0,(c[k>>2]|0)+64|0,(c[k>>2]|0)+64|0)|0;c[q>>2]=(c[q>>2]|0)>>>0>(c[z>>2]|0)>>>0?c[q>>2]|0:c[z>>2]|0;c[m>>2]=(c[m>>2]|0)-16;c[l>>2]=(c[l>>2]|0)+16}while(0)}while((c[m>>2]|0)>>>0>0);c[(c[k>>2]|0)+128+36>>2]=c[r>>2];if(c[q>>2]|0)c[q>>2]=(c[q>>2]|0)+16;c[j>>2]=c[q>>2];A=c[j>>2]|0;i=h;return A|0}function Tq(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;h=i;i=i+48|0;j=h+40|0;k=h+36|0;l=h+32|0;m=h+28|0;n=h+24|0;o=h+20|0;p=h+16|0;q=h+12|0;r=h+8|0;s=h+4|0;c[j>>2]=b;c[k>>2]=e;c[l>>2]=f;c[m>>2]=g;c[n>>2]=c[j>>2];c[o>>2]=c[k>>2];c[p>>2]=c[l>>2];c[h>>2]=3;if(!((c[n>>2]|c[o>>2]|c[p>>2])&3)){c[q>>2]=c[n>>2];c[r>>2]=c[o>>2];c[s>>2]=c[p>>2];while(1){if((c[m>>2]|0)>>>0<4)break;l=c[r>>2]|0;c[r>>2]=l+4;k=c[l>>2]|0;l=c[s>>2]|0;c[s>>2]=l+4;j=k^c[l>>2];l=c[q>>2]|0;c[q>>2]=l+4;c[l>>2]=j;c[m>>2]=(c[m>>2]|0)-4}c[n>>2]=c[q>>2];c[o>>2]=c[r>>2];c[p>>2]=c[s>>2]}while(1){if(!(c[m>>2]|0))break;s=c[o>>2]|0;c[o>>2]=s+1;r=d[s>>0]|0;s=c[p>>2]|0;c[p>>2]=s+1;q=(r^(d[s>>0]|0))&255;s=c[n>>2]|0;c[n>>2]=s+1;a[s>>0]=q;c[m>>2]=(c[m>>2]|0)+-1}i=h;return}function Uq(b,e,f,g,h){b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;j=i;i=i+32|0;k=j+24|0;l=j+20|0;m=j+16|0;n=j+12|0;o=j+8|0;p=j+4|0;q=j;c[l>>2]=b;c[m>>2]=e;c[n>>2]=f;c[o>>2]=g;c[p>>2]=h;if((c[n>>2]|0)>>>0<(c[p>>2]|0)>>>0){c[k>>2]=200;r=c[k>>2]|0;i=j;return r|0}if((((a[(c[l>>2]|0)+128+56>>0]&1|0)!=0?((d[(c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>>2]=c[l>>2];c[s>>2]=c[n>>2];c[j>>2]=3;if(!((c[s>>2]|c[r>>2]|c[p>>2]|c[q>>2])&3)){c[u>>2]=c[p>>2];c[x>>2]=c[r>>2];c[v>>2]=c[q>>2];c[w>>2]=c[s>>2];while(1){if((c[o>>2]|0)>>>0<4)break;n=c[w>>2]|0;c[w>>2]=n+4;c[y>>2]=c[n>>2];n=c[c[v>>2]>>2]|0;l=c[x>>2]|0;c[x>>2]=l+4;m=n^c[l>>2];l=c[u>>2]|0;c[u>>2]=l+4;c[l>>2]=m;m=c[y>>2]|0;l=c[v>>2]|0;c[v>>2]=l+4;c[l>>2]=m;c[o>>2]=(c[o>>2]|0)-4}c[p>>2]=c[u>>2];c[r>>2]=c[x>>2];c[q>>2]=c[v>>2];c[s>>2]=c[w>>2]}while(1){if(!(c[o>>2]|0))break;w=c[s>>2]|0;c[s>>2]=w+1;a[t>>0]=a[w>>0]|0;w=d[c[q>>2]>>0]|0;v=c[r>>2]|0;c[r>>2]=v+1;x=(w^(d[v>>0]|0))&255;v=c[p>>2]|0;c[p>>2]=v+1;a[v>>0]=x;x=a[t>>0]|0;v=c[q>>2]|0;c[q>>2]=v+1;a[v>>0]=x;c[o>>2]=(c[o>>2]|0)+-1}i=j;return}function ar(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;br(c[d>>2]|0);i=b;return 0}function br(b){b=b|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;e=i;i=i+80|0;f=e+56|0;g=e+52|0;h=e+64|0;j=e+63|0;k=e+62|0;l=e+61|0;m=e+48|0;n=e+44|0;o=e+40|0;p=e+24|0;q=e+16|0;r=e+12|0;s=e+60|0;t=e;u=e+8|0;c[f>>2]=b;c[g>>2]=c[(c[(c[f>>2]|0)+12>>2]|0)+20>>2];if(16<(c[g>>2]|0)>>>0)wf(46779,113,46793);Fx(p|0,0,c[g>>2]|0)|0;c[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2]=(c[r>>2]|0)+-1}if(!(c[m>>2]|0)){i=e;return}If((c[m>>2]|0)+16|0);Jf();i=e;return}function cr(b,e,f,g,h){b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,D=0,E=0,F=0;j=i;i=i+96|0;k=j+68|0;l=j+64|0;m=j+60|0;n=j+56|0;o=j+52|0;p=j+48|0;q=j+44|0;r=j+40|0;s=j+36|0;t=j+32|0;u=j+28|0;v=j+24|0;w=j+20|0;x=j+80|0;y=j+16|0;z=j+12|0;A=j+72|0;B=j;D=j+8|0;c[l>>2]=b;c[m>>2]=e;c[n>>2]=f;c[o>>2]=g;c[p>>2]=h;c[s>>2]=c[(c[(c[l>>2]|0)+12>>2]|0)+36>>2];c[t>>2]=c[(c[(c[l>>2]|0)+12>>2]|0)+20>>2];if((c[n>>2]|0)>>>0<(c[p>>2]|0)>>>0){c[k>>2]=200;E=c[k>>2]|0;i=j;return E|0}c[v>>2]=0;if(c[(c[l>>2]|0)+112>>2]|0){if((c[(c[l>>2]|0)+112>>2]|0)>>>0>=(c[t>>2]|0)>>>0)xf(46815,46837,53,46850);c[r>>2]=(c[t>>2]|0)-(c[(c[l>>2]|0)+112>>2]|0);if((c[(c[l>>2]|0)+112>>2]|0)>>>0>(c[p>>2]|0)>>>0)F=c[p>>2]|0;else F=c[(c[l>>2]|0)+112>>2]|0;c[q>>2]=F;dr(c[m>>2]|0,c[o>>2]|0,(c[l>>2]|0)+96+(c[r>>2]|0)|0,c[q>>2]|0);F=(c[l>>2]|0)+112|0;c[F>>2]=(c[F>>2]|0)-(c[q>>2]|0);c[o>>2]=(c[o>>2]|0)+(c[q>>2]|0);c[m>>2]=(c[m>>2]|0)+(c[q>>2]|0);c[p>>2]=(c[p>>2]|0)-(c[q>>2]|0)}c[u>>2]=((c[p>>2]|0)>>>0)/((c[t>>2]|0)>>>0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))break;a[c[y>>2]>>0]=a[A>>0]|0;c[y>>2]=(c[y>>2]|0)+1;c[z>>2]=(c[z>>2]|0)+-1}if((c[z>>2]|0)>>>0>=8){F=B;u=Mx(c[F>>2]|0,c[F+4>>2]|0,16843009,16843009)|0;F=B;c[F>>2]=u;c[F+4>>2]=C;do{c[D>>2]=c[y>>2];F=B;u=c[F+4>>2]|0;n=c[D>>2]|0;c[n>>2]=c[F>>2];c[n+4>>2]=u;c[z>>2]=(c[z>>2]|0)-8;c[y>>2]=(c[y>>2]|0)+8}while((c[z>>2]|0)>>>0>=8)}while(1){if(!(c[z>>2]|0))break a;a[c[y>>2]>>0]=a[A>>0]|0;c[y>>2]=(c[y>>2]|0)+1;c[z>>2]=(c[z>>2]|0)+-1}}while(0);if((c[v>>2]|0)>>>0>0){If((c[v>>2]|0)+16|0);Jf()}c[k>>2]=0;E=c[k>>2]|0;i=j;return E|0}function dr(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;h=i;i=i+48|0;j=h+40|0;k=h+36|0;l=h+32|0;m=h+28|0;n=h+24|0;o=h+20|0;p=h+16|0;q=h+12|0;r=h+8|0;s=h+4|0;c[j>>2]=b;c[k>>2]=e;c[l>>2]=f;c[m>>2]=g;c[n>>2]=c[j>>2];c[o>>2]=c[k>>2];c[p>>2]=c[l>>2];c[h>>2]=3;if(!((c[n>>2]|c[o>>2]|c[p>>2])&3)){c[q>>2]=c[n>>2];c[r>>2]=c[o>>2];c[s>>2]=c[p>>2];while(1){if((c[m>>2]|0)>>>0<4)break;l=c[r>>2]|0;c[r>>2]=l+4;k=c[l>>2]|0;l=c[s>>2]|0;c[s>>2]=l+4;j=k^c[l>>2];l=c[q>>2]|0;c[q>>2]=l+4;c[l>>2]=j;c[m>>2]=(c[m>>2]|0)-4}c[n>>2]=c[q>>2];c[o>>2]=c[r>>2];c[p>>2]=c[s>>2]}while(1){if(!(c[m>>2]|0))break;s=c[o>>2]|0;c[o>>2]=s+1;r=d[s>>0]|0;s=c[p>>2]|0;c[p>>2]=s+1;q=(r^(d[s>>0]|0))&255;s=c[n>>2]|0;c[n>>2]=s+1;a[s>>0]=q;c[m>>2]=(c[m>>2]|0)+-1}i=h;return}function er(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0;f=i;i=i+32|0;g=f+28|0;h=f+24|0;j=f+20|0;k=f+16|0;l=f+12|0;m=f+8|0;n=f+4|0;c[g>>2]=b;c[h>>2]=d;c[j>>2]=e;c[k>>2]=c[g>>2];c[l>>2]=c[h>>2];c[f>>2]=3;if(!((c[k>>2]|c[l>>2])&3)){c[m>>2]=c[k>>2];c[n>>2]=c[l>>2];while(1){if((c[j>>2]|0)>>>0<4)break;h=c[n>>2]|0;c[n>>2]=h+4;g=c[h>>2]|0;h=c[m>>2]|0;c[m>>2]=h+4;c[h>>2]=g;c[j>>2]=(c[j>>2]|0)-4}c[k>>2]=c[m>>2];c[l>>2]=c[n>>2]}while(1){if(!(c[j>>2]|0))break;n=c[l>>2]|0;c[l>>2]=n+1;m=a[n>>0]|0;n=c[k>>2]|0;c[k>>2]=n+1;a[n>>0]=m;c[j>>2]=(c[j>>2]|0)+-1}i=f;return}function fr(b,e,f,g,h){b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;j=i;i=i+32|0;k=j+24|0;l=j+20|0;m=j+16|0;n=j+12|0;o=j+8|0;p=j+4|0;q=j;c[l>>2]=b;c[m>>2]=e;c[n>>2]=f;c[o>>2]=g;c[p>>2]=h;if((c[(c[(c[l>>2]|0)+12>>2]|0)+20>>2]|0)!=16){c[k>>2]=12;r=c[k>>2]|0;i=j;return r|0}if((c[n>>2]|0)>>>0<(c[p>>2]|0)>>>0){c[k>>2]=200;r=c[k>>2]|0;i=j;return r|0}if((d[(c[l>>2]|0)+128+68>>0]|0)>>>2&1){c[k>>2]=139;r=c[k>>2]|0;i=j;return r|0}if(((d[(c[l>>2]|0)+56>>0]|0)>>>2&1|0)==0?(a[(c[l>>2]|0)+128+68>>0]&1|0)==0:0){if(!((d[(c[l>>2]|0)+56>>0]|0)>>>1&1))gr(c[l>>2]|0,76459,16)|0;if((d[(c[l>>2]|0)+128+68>>0]|0)>>>3&1){c[k>>2]=156;r=c[k>>2]|0;i=j;return r|0}if(!((d[(c[l>>2]|0)+128+68>>0]|0)>>>1&1)){kr(c[l>>2]|0,(c[l>>2]|0)+128|0,0,0,1);h=(c[l>>2]|0)+128+68|0;a[h>>0]=a[h>>0]&-3|2}ir((c[l>>2]|0)+128+44|0,c[p>>2]|0);h=(nr((c[l>>2]|0)+128+44|0)|0)!=0;g=c[l>>2]|0;if(!h){h=g+128+68|0;a[h>>0]=a[h>>0]&-5|4;c[k>>2]=139;r=c[k>>2]|0;i=j;return r|0}c[q>>2]=cr(g,c[m>>2]|0,c[n>>2]|0,c[o>>2]|0,c[p>>2]|0)|0;if(c[q>>2]|0){c[k>>2]=c[q>>2];r=c[k>>2]|0;i=j;return r|0}else{kr(c[l>>2]|0,(c[l>>2]|0)+128|0,c[m>>2]|0,c[p>>2]|0,0);c[k>>2]=0;r=c[k>>2]|0;i=j;return r|0}}c[k>>2]=156;r=c[k>>2]|0;i=j;return r|0}function gr(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0;f=i;i=i+16|0;g=f+8|0;h=f+4|0;j=f;c[g>>2]=b;c[h>>2]=d;c[j>>2]=e;e=(c[g>>2]|0)+56|0;a[e>>0]=a[e>>0]&-3;e=(c[g>>2]|0)+56|0;a[e>>0]=a[e>>0]&-5;e=(c[g>>2]|0)+128+68|0;a[e>>0]=a[e>>0]&-9;if(!(Ah()|0)){k=c[g>>2]|0;l=c[h>>2]|0;m=c[j>>2]|0;n=hr(k,l,m)|0;i=f;return n|0}e=(c[g>>2]|0)+128+68|0;a[e>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0,c[k>>2]|0,c[l>>2]|0)|0;a[(c[j>>2]|0)+80+14>>0]=0;a[(c[j>>2]|0)+80+13>>0]=0;a[(c[j>>2]|0)+80+12>>0]=0;a[(c[j>>2]|0)+80+15>>0]=1}while(0);vb[c[(c[(c[j>>2]|0)+12>>2]|0)+36>>2]&63]((c[j>>2]|0)+496|0,(c[j>>2]|0)+128+52|0,(c[j>>2]|0)+80|0)|0;mr((c[j>>2]|0)+80|0,1)|0;c[(c[j>>2]|0)+112>>2]=0;l=(c[j>>2]|0)+56|0;a[l>>0]=a[l>>0]&-3|2;l=(c[j>>2]|0)+56|0;a[l>>0]=a[l>>0]&-5;c[h>>2]=0;y=c[h>>2]|0;i=g;return y|0}function ir(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=i;i=i+16|0;e=d+4|0;f=d;c[e>>2]=a;c[f>>2]=b;b=c[e>>2]|0;c[b>>2]=(c[b>>2]|0)+(c[f>>2]|0);if((c[c[e>>2]>>2]|0)>>>0>=(c[f>>2]|0)>>>0){i=d;return}f=(c[e>>2]|0)+4|0;c[f>>2]=(c[f>>2]|0)+1;i=d;return}function jr(a){a=a|0;var b=0,d=0,e=0;b=i;i=i+16|0;d=b+4|0;e=b;c[e>>2]=a;do if((c[(c[e>>2]|0)+4>>2]|0)>>>0<=536870911){if((c[(c[e>>2]|0)+4>>2]|0)>>>0<536870911){c[d>>2]=1;break}if((c[c[e>>2]>>2]|0)>>>0<=4294967295){c[d>>2]=1;break}else{c[d>>2]=0;break}}else c[d>>2]=0;while(0);i=b;return c[d>>2]|0}function kr(b,d,e,f,g){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;h=i;i=i+48|0;j=h+40|0;k=h+36|0;l=h+32|0;m=h+28|0;n=h+24|0;o=h+20|0;p=h+16|0;q=h+12|0;r=h+8|0;s=h+4|0;t=h;c[j>>2]=b;c[k>>2]=d;c[l>>2]=e;c[m>>2]=f;c[n>>2]=g;c[o>>2]=16;c[p>>2]=c[(c[j>>2]|0)+128+32>>2];c[q>>2]=c[(c[j>>2]|0)+128+96>>2];c[t>>2]=0;if((c[m>>2]|0)==0?!((c[p>>2]|0)!=0&(c[n>>2]|0)!=0):0){i=h;return}a:do{if((c[p>>2]|0)>>>0>0?1:((c[m>>2]|0)+(c[p>>2]|0)|0)>>>0<(c[o>>2]|0)>>>0){c[s>>2]=(c[o>>2]|0)-(c[p>>2]|0);c[s>>2]=(c[s>>2]|0)>>>0<(c[m>>2]|0)>>>0?c[s>>2]|0:c[m>>2]|0;lr((c[j>>2]|0)+128+16+(c[p>>2]|0)|0,c[l>>2]|0,c[s>>2]|0);c[p>>2]=(c[p>>2]|0)+(c[s>>2]|0);c[l>>2]=(c[l>>2]|0)+(c[s>>2]|0);c[m>>2]=(c[m>>2]|0)-(c[s>>2]|0)}b:do if(!(c[m>>2]|0)){if(!(c[n>>2]|0))break a;while(1){if((c[p>>2]|0)>>>0>=(c[o>>2]|0)>>>0)break b;g=c[p>>2]|0;c[p>>2]=g+1;a[(c[j>>2]|0)+128+16+g>>0]=0}}while(0);if((c[p>>2]|0)>>>0>0){if((c[p>>2]|0)!=(c[o>>2]|0)){u=11;break}c[t>>2]=Cb[c[q>>2]&7](c[j>>2]|0,c[k>>2]|0,(c[j>>2]|0)+128+16|0,1)|0;c[p>>2]=0}c[r>>2]=((c[m>>2]|0)>>>0)/((c[o>>2]|0)>>>0)|0;if(c[r>>2]|0){c[t>>2]=Cb[c[q>>2]&7](c[j>>2]|0,c[k>>2]|0,c[l>>2]|0,c[r>>2]|0)|0;g=_(c[o>>2]|0,c[r>>2]|0)|0;c[l>>2]=(c[l>>2]|0)+g;g=_(c[o>>2]|0,c[r>>2]|0)|0;c[m>>2]=(c[m>>2]|0)-g}}while((c[m>>2]|0)>>>0>0);if((u|0)==11)xf(46875,46895,499,46908);c[(c[j>>2]|0)+128+32>>2]=c[p>>2];if(!(c[t>>2]|0)){i=h;return}If(c[t>>2]|0);Jf();i=h;return}function lr(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0;f=i;i=i+32|0;g=f+28|0;h=f+24|0;j=f+20|0;k=f+16|0;l=f+12|0;m=f+8|0;n=f+4|0;c[g>>2]=b;c[h>>2]=d;c[j>>2]=e;c[k>>2]=c[g>>2];c[l>>2]=c[h>>2];c[f>>2]=3;if(!((c[k>>2]|c[l>>2])&3)){c[m>>2]=c[k>>2];c[n>>2]=c[l>>2];while(1){if((c[j>>2]|0)>>>0<4)break;h=c[n>>2]|0;c[n>>2]=h+4;g=c[h>>2]|0;h=c[m>>2]|0;c[m>>2]=h+4;c[h>>2]=g;c[j>>2]=(c[j>>2]|0)-4}c[k>>2]=c[m>>2];c[l>>2]=c[n>>2]}while(1){if(!(c[j>>2]|0))break;n=c[l>>2]|0;c[l>>2]=n+1;m=a[n>>0]|0;n=c[k>>2]|0;c[k>>2]=n+1;a[n>>0]=m;c[j>>2]=(c[j>>2]|0)+-1}i=f;return}function mr(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;d=i;i=i+32|0;e=d+16|0;f=d+12|0;g=d+4|0;h=d;c[e>>2]=a;c[f>>2]=b;c[d+8>>2]=16;c[g>>2]=(c[e>>2]|0)+16+-4;e=Hx(c[c[g>>2]>>2]|0)|0;c[h>>2]=e+(c[f>>2]|0);f=Hx(c[h>>2]|0)|0;c[c[g>>2]>>2]=f;i=d;return c[h>>2]|0}function nr(a){a=a|0;var b=0,d=0,e=0;b=i;i=i+16|0;d=b+4|0;e=b;c[e>>2]=a;do if((c[(c[e>>2]|0)+4>>2]|0)>>>0<=15){if((c[(c[e>>2]|0)+4>>2]|0)>>>0<15){c[d>>2]=1;break}if((c[c[e>>2]>>2]|0)>>>0<=4294967264){c[d>>2]=1;break}else{c[d>>2]=0;break}}else c[d>>2]=0;while(0);i=b;return c[d>>2]|0}function or(b,e,f,g,h){b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;j=i;i=i+32|0;k=j+20|0;l=j+16|0;m=j+12|0;n=j+8|0;o=j+4|0;p=j;c[l>>2]=b;c[m>>2]=e;c[n>>2]=f;c[o>>2]=g;c[p>>2]=h;if((c[(c[(c[l>>2]|0)+12>>2]|0)+20>>2]|0)!=16){c[k>>2]=12;q=c[k>>2]|0;i=j;return q|0}if((c[n>>2]|0)>>>0<(c[p>>2]|0)>>>0){c[k>>2]=200;q=c[k>>2]|0;i=j;return q|0}if((d[(c[l>>2]|0)+128+68>>0]|0)>>>2&1){c[k>>2]=139;q=c[k>>2]|0;i=j;return q|0}if(((d[(c[l>>2]|0)+56>>0]|0)>>>2&1|0)==0?(a[(c[l>>2]|0)+128+68>>0]&1|0)==0:0){if(!((d[(c[l>>2]|0)+56>>0]|0)>>>1&1))gr(c[l>>2]|0,76475,16)|0;if(!((d[(c[l>>2]|0)+128+68>>0]|0)>>>1&1)){kr(c[l>>2]|0,(c[l>>2]|0)+128|0,0,0,1);h=(c[l>>2]|0)+128+68|0;a[h>>0]=a[h>>0]&-3|2}ir((c[l>>2]|0)+128+44|0,c[p>>2]|0);h=(nr((c[l>>2]|0)+128+44|0)|0)!=0;g=c[l>>2]|0;if(h){kr(g,(c[l>>2]|0)+128|0,c[o>>2]|0,c[p>>2]|0,0);c[k>>2]=cr(c[l>>2]|0,c[m>>2]|0,c[n>>2]|0,c[o>>2]|0,c[p>>2]|0)|0;q=c[k>>2]|0;i=j;return q|0}else{p=g+128+68|0;a[p>>0]=a[p>>0]&-5|4;c[k>>2]=139;q=c[k>>2]|0;i=j;return q|0}}c[k>>2]=156;q=c[k>>2]|0;i=j;return q|0}function pr(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;a=(c[d>>2]|0)+128+80|0;c[a>>2]=0;c[a+4>>2]=0;c[a+8>>2]=0;c[a+12>>2]=0;vb[c[(c[(c[d>>2]|0)+12>>2]|0)+36>>2]&63]((c[d>>2]|0)+496|0,(c[d>>2]|0)+128+80|0,(c[d>>2]|0)+128+80|0)|0;qr(c[d>>2]|0);i=b;return}function qr(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;c[(c[d>>2]|0)+128+96>>2]=2;vr((c[d>>2]|0)+128+80|0,(c[d>>2]|0)+128+100|0);i=b;return}function rr(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0;f=i;i=i+32|0;g=f+20|0;h=f+16|0;j=f+12|0;k=f+8|0;l=f;c[g>>2]=a;c[h>>2]=b;c[j>>2]=d;c[k>>2]=e;c[f+4>>2]=16;c[l>>2]=0;while(1){if(!(c[k>>2]|0))break;c[l>>2]=sr(c[h>>2]|0,c[j>>2]|0,(c[g>>2]|0)+128+100|0)|0;c[j>>2]=(c[j>>2]|0)+16;c[k>>2]=(c[k>>2]|0)+-1}i=f;return (c[l>>2]|0)+((c[l>>2]|0)!=0?20:0)|0}function sr(a,b,f){a=a|0;b=b|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;g=i;i=i+80|0;h=g+56|0;j=g+52|0;k=g+48|0;l=g+64|0;m=g+32|0;n=g+24|0;o=g+20|0;p=g+16|0;q=g+4|0;r=g;c[h>>2]=a;c[j>>2]=b;c[k>>2]=f;tr(l,c[h>>2]|0,c[j>>2]|0,16);c[r>>2]=15;c[n>>2]=d[l+(c[r>>2]|0)>>0];c[o>>2]=(c[k>>2]|0)+((c[n>>2]&15)<<2<<2);c[n>>2]=(c[n>>2]&240)>>>4;c[p>>2]=(c[k>>2]|0)+(c[n>>2]<<2<<2);j=(c[r>>2]|0)+-1|0;c[r>>2]=j;c[n>>2]=d[l+j>>0];j=(c[c[o>>2]>>2]|0)>>>4;f=Ix(e[17846+((c[(c[o>>2]|0)+12>>2]<<4&240)<<1)>>1]|0|0,0,16)|0;c[m>>2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>2]<<31;c[(c[e>>2]|0)+((c[f>>2]<<2)+1<<2)>>2]=(c[g+4>>2]|0)>>>1^c[g>>2]<<31;c[(c[e>>2]|0)+((c[f>>2]<<2)+0<<2)>>2]=(c[g>>2]|0)>>>1^c[h>>2]<<24;i=d;return}function yr(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0;f=i;i=i+32|0;g=f+20|0;h=f+16|0;j=f+12|0;k=f;l=f+8|0;c[h>>2]=a;c[j>>2]=b;b=k;c[b>>2]=d;c[b+4>>2]=e;e=k;c[l>>2]=zr(c[e>>2]|0,c[e+4>>2]|0)|0;if((c[l>>2]|0)<16){c[g>>2]=(c[h>>2]|0)+128+32+(c[l>>2]<<4);m=c[g>>2]|0;i=f;return m|0}Br(c[j>>2]|0,(c[h>>2]|0)+128+32+240|0);c[l>>2]=(c[l>>2]|0)-16;while(1){n=c[j>>2]|0;if(!(c[l>>2]|0))break;Dr(n);c[l>>2]=(c[l>>2]|0)+-1}c[g>>2]=n;m=c[g>>2]|0;i=f;return m|0}function zr(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;d=i;i=i+16|0;e=d+8|0;f=d;g=f;c[g>>2]=a;c[g+4>>2]=b;b=f;g=c[b+4>>2]|0;if((c[f>>2]|0)!=0|0!=0){c[e>>2]=Ar(c[b>>2]|0)|0;h=c[e>>2]|0;i=d;return h|0}else{c[e>>2]=32+(Ar(g)|0);h=c[e>>2]|0;i=d;return h|0}return 0}function Ar(a){a=a|0;var b=0,d=0,e=0;b=i;i=i+16|0;d=b;c[d>>2]=a;a=(c[d>>2]|0)!=0;e=Gx(c[d>>2]|0)|0;i=b;return (a?e:32)|0}function Br(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=i;i=i+16|0;e=d+4|0;f=d;c[e>>2]=a;c[f>>2]=b;if((c[e>>2]|0)!=(c[f>>2]|0))Cr(c[e>>2]|0,c[f>>2]|0,16);Dr(c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2];i=f;return}function Gr(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,D=0;g=i;i=i+128|0;h=g+68|0;j=g+64|0;k=g+60|0;l=g+56|0;m=g+104|0;n=g+80|0;o=g+52|0;p=g+48|0;q=g+44|0;r=g+40|0;s=g+36|0;t=g+32|0;u=g+73|0;v=g+8|0;w=g+28|0;x=g+24|0;y=g+20|0;z=g+72|0;A=g;B=g+16|0;c[j>>2]=b;c[k>>2]=e;c[l>>2]=f;c[q>>2]=0;if(!(a[(c[j>>2]|0)+56>>0]&1)){c[h>>2]=156;D=c[h>>2]|0;i=g;return D|0}switch(d[(c[j>>2]|0)+128+352>>0]|0|0){case 16:case 12:case 8:break;default:{c[h>>2]=59;D=c[h>>2]|0;i=g;return D|0}}if((c[(c[(c[j>>2]|0)+12>>2]|0)+20>>2]|0)!=16){c[h>>2]=12;D=c[h>>2]|0;i=g;return D|0}if(!(c[k>>2]|0)){c[h>>2]=45;D=c[h>>2]|0;i=g;return D|0}if((c[l>>2]|0)>>>0>15|(c[l>>2]|0)>>>0<8|(c[l>>2]|0)>>>0>=16){c[h>>2]=139;D=c[h>>2]|0;i=g;return D|0}f=m;e=f+16|0;do{a[f>>0]=0;f=f+1|0}while((f|0)<(e|0));c[r>>2]=vb[c[(c[(c[j>>2]|0)+12>>2]|0)+36>>2]&63]((c[j>>2]|0)+496|0,(c[j>>2]|0)+128|0,m)|0;c[q>>2]=(c[r>>2]|0)>>>0>(c[q>>2]|0)>>>0?c[r>>2]|0:c[q>>2]|0;Br((c[j>>2]|0)+128+16|0,(c[j>>2]|0)+128|0);Br((c[j>>2]|0)+128+32|0,(c[j>>2]|0)+128+16|0);c[p>>2]=1;while(1){if((c[p>>2]|0)>=16)break;Br((c[j>>2]|0)+128+32+(c[p>>2]<<4)|0,(c[j>>2]|0)+128+32+((c[p>>2]|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0)>>8-(c[n>>2]|0);c[m>>2]=(c[m>>2]|0)+-1;c[j>>2]=(c[j>>2]|0)+1;c[k>>2]=(c[k>>2]|0)+1}i=h;return}else{while(1){if(!(c[m>>2]|0))break;a[c[j>>2]>>0]=a[c[k>>2]>>0]|0;c[m>>2]=(c[m>>2]|0)+-1;c[j>>2]=(c[j>>2]|0)+1;c[k>>2]=(c[k>>2]|0)+1}i=h;return}}function Jr(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0;g=i;i=i+32|0;h=g+28|0;j=g+24|0;k=g+20|0;l=g+16|0;m=g+12|0;n=g+8|0;o=g+4|0;c[h>>2]=b;c[j>>2]=e;c[k>>2]=f;c[l>>2]=c[h>>2];c[m>>2]=c[j>>2];c[g>>2]=3;if(!((c[l>>2]|c[m>>2])&3)){c[n>>2]=c[l>>2];c[o>>2]=c[m>>2];while(1){if((c[k>>2]|0)>>>0<4)break;j=c[o>>2]|0;c[o>>2]=j+4;h=c[j>>2]|0;j=c[n>>2]|0;c[n>>2]=j+4;c[j>>2]=c[j>>2]^h;c[k>>2]=(c[k>>2]|0)-4}c[l>>2]=c[n>>2];c[m>>2]=c[o>>2]}while(1){if(!(c[k>>2]|0))break;o=c[m>>2]|0;c[m>>2]=o+1;n=d[o>>0]|0;o=c[l>>2]|0;c[l>>2]=o+1;a[o>>0]=(d[o>>0]|0)^n;c[k>>2]=(c[k>>2]|0)+-1}i=g;return}function Kr(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0;g=i;i=i+32|0;h=g+16|0;j=g+12|0;k=g+8|0;l=g+4|0;m=g;c[h>>2]=a;c[j>>2]=b;c[k>>2]=d;c[l>>2]=e;c[m>>2]=f;f=Lr(c[h>>2]|0,1,c[j>>2]|0,c[k>>2]|0,c[l>>2]|0,c[m>>2]|0)|0;i=g;return f|0}function Lr(b,e,f,g,h,j){b=b|0;e=e|0;f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)>>>3&1){Hr((c[m>>2]|0)+128+288|0,(c[m>>2]|0)+80|0,(c[m>>2]|0)+64|0,16);Jr((c[m>>2]|0)+128+288|0,(c[m>>2]|0)+128+16|0,16);c[u>>2]=vb[c[(c[(c[m>>2]|0)+12>>2]|0)+36>>2]&63]((c[m>>2]|0)+496|0,(c[m>>2]|0)+128+288|0,(c[m>>2]|0)+128+288|0)|0;c[t>>2]=(c[u>>2]|0)>>>0>(c[t>>2]|0)>>>0?c[u>>2]|0:c[t>>2]|0;u=(c[m>>2]|0)+128+353|0;a[u>>0]=a[u>>0]&-2|1}if((c[t>>2]|0)>>>0>0){If((c[t>>2]|0)+16|0);Jf()}c[l>>2]=0;y=c[l>>2]|0;i=k;return y|0}c[l>>2]=156;y=c[l>>2]|0;i=k;return y|0}function Mr(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=i;i=i+16|0;f=e+8|0;g=e+4|0;h=e;c[f>>2]=a;c[g>>2]=b;c[h>>2]=d;while(1){if((c[h>>2]|0)>>>0<=0)break;Jr(c[f>>2]|0,c[g>>2]|0,16);c[g>>2]=(c[g>>2]|0)+16;c[h>>2]=(c[h>>2]|0)+-1}i=e;return}function Nr(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0;g=i;i=i+32|0;h=g+16|0;j=g+12|0;k=g+8|0;l=g+4|0;m=g;c[h>>2]=a;c[j>>2]=b;c[k>>2]=d;c[l>>2]=e;c[m>>2]=f;f=Lr(c[h>>2]|0,0,c[j>>2]|0,c[k>>2]|0,c[l>>2]|0,c[m>>2]|0)|0;i=g;return f|0}function Or(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;g=i;i=i+48|0;h=g+40|0;j=g+36|0;k=g+32|0;l=g+28|0;m=g+24|0;n=g+20|0;o=g+16|0;p=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[(c[j>>2]|0)+12>>2]|0)+44>>2]&1]((c[j>>2]|0)+496|0,m,m,64);c[n>>2]=ws((c[j>>2]|0)+128+20|0,m,32)|0;c[o>>2]=m;c[p>>2]=64;a[q>>0]=0;m=r;c[m>>2]=d[q>>0];c[m+4>>2]=0;while(1){if(!((c[o>>2]&7|0)!=0?(c[p>>2]|0)!=0:0))break;a[c[o>>2]>>0]=a[q>>0]|0;c[o>>2]=(c[o>>2]|0)+1;c[p>>2]=(c[p>>2]|0)+-1}if((c[p>>2]|0)>>>0>=8){m=r;f=Mx(c[m>>2]|0,c[m+4>>2]|0,16843009,16843009)|0;m=r;c[m>>2]=f;c[m+4>>2]=C;do{c[s>>2]=c[o>>2];m=r;f=c[m+4>>2]|0;e=c[s>>2]|0;c[e>>2]=c[m>>2];c[e+4>>2]=f;c[p>>2]=(c[p>>2]|0)-8;c[o>>2]=(c[o>>2]|0)+8}while((c[p>>2]|0)>>>0>=8)}while(1){if(!(c[p>>2]|0))break;a[c[o>>2]>>0]=a[q>>0]|0;c[o>>2]=(c[o>>2]|0)+1;c[p>>2]=(c[p>>2]|0)+-1}if(c[n>>2]|0){c[h>>2]=c[n>>2];t=c[h>>2]|0;i=g;return t|0}else{n=(c[j>>2]|0)+56|0;a[n>>0]=a[n>>0]&-3|2;c[h>>2]=0;t=c[h>>2]|0;i=g;return t|0}return 0}function Sr(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0;d=i;i=i+16|0;e=d+12|0;f=d+8|0;g=d+4|0;h=d;c[f>>2]=a;c[g>>2]=b;c[h>>2]=0;b=c[f>>2]|0;c[b>>2]=(c[b>>2]|0)+(c[g>>2]|0);if((c[c[f>>2]>>2]|0)>>>0>=(c[g>>2]|0)>>>0){c[e>>2]=c[h>>2];j=c[e>>2]|0;i=d;return j|0}else{g=(c[f>>2]|0)+4|0;c[g>>2]=(c[g>>2]|0)+1;c[e>>2]=((c[(c[f>>2]|0)+4>>2]|0)>>>0<1?1:(c[h>>2]|0)!=0)&1;j=c[e>>2]|0;i=d;return j|0}return 0}function Tr(b,e,f,g,h){b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;j=i;i=i+32|0;k=j+24|0;l=j+20|0;m=j+16|0;n=j+12|0;o=j+8|0;p=j+4|0;q=j;c[l>>2]=b;c[m>>2]=e;c[n>>2]=f;c[o>>2]=g;c[p>>2]=h;if((c[n>>2]|0)>>>0<(c[p>>2]|0)>>>0){c[k>>2]=200;r=c[k>>2]|0;i=j;return r|0}if((d[(c[l>>2]|0)+56>>0]|0)>>>2&1){c[k>>2]=156;r=c[k>>2]|0;i=j;return r|0}if((d[(c[l>>2]|0)+128+16>>0]|0)>>>1&1){c[k>>2]=139;r=c[k>>2]|0;i=j;return r|0}if(((d[(c[l>>2]|0)+56>>0]|0)>>>1&1|0)==0?(c[q>>2]=Qr(c[l>>2]|0)|0,(c[q>>2]|0)!=0):0){c[k>>2]=c[q>>2];r=c[k>>2]|0;i=j;return r|0}if(!(a[(c[l>>2]|0)+128+16>>0]&1))Ur(c[l>>2]|0);q=(Sr((c[l>>2]|0)+128+8|0,c[p>>2]|0)|0)!=0;n=c[l>>2]|0;if(q){q=n+128+16|0;a[q>>0]=a[q>>0]&-3|2;c[k>>2]=139;r=c[k>>2]|0;i=j;return r|0}else{Fb[c[(c[n+12>>2]|0)+44>>2]&1]((c[l>>2]|0)+496|0,c[m>>2]|0,c[o>>2]|0,c[p>>2]|0);ss((c[l>>2]|0)+128+20|0,c[m>>2]|0,c[p>>2]|0);c[k>>2]=0;r=c[k>>2]|0;i=j;return r|0}return 0}function Ur(b){b=b|0;var d=0,e=0;d=i;i=i+16|0;e=d;c[e>>2]=b;Vr(c[e>>2]|0,(c[e>>2]|0)+128|0);b=(c[e>>2]|0)+128+16|0;a[b>>0]=a[b>>0]&-2|1;c[(c[e>>2]|0)+128+8>>2]=0;c[(c[e>>2]|0)+128+8+4>>2]=0;i=d;return}function Vr(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;d=i;i=i+16|0;e=d+8|0;f=d+4|0;g=d;c[e>>2]=a;c[f>>2]=b;if((((c[c[f>>2]>>2]|0)>>>0)%16|0)>>>0<=0){i=d;return}c[g>>2]=16-(((c[c[f>>2]>>2]|0)>>>0)%16|0);ss((c[e>>2]|0)+128+20|0,76491,c[g>>2]|0);i=d;return}function Wr(b,e,f,g,h){b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;j=i;i=i+32|0;k=j+24|0;l=j+20|0;m=j+16|0;n=j+12|0;o=j+8|0;p=j+4|0;q=j;c[l>>2]=b;c[m>>2]=e;c[n>>2]=f;c[o>>2]=g;c[p>>2]=h;if((c[n>>2]|0)>>>0<(c[p>>2]|0)>>>0){c[k>>2]=200;r=c[k>>2]|0;i=j;return r|0}if((d[(c[l>>2]|0)+56>>0]|0)>>>2&1){c[k>>2]=156;r=c[k>>2]|0;i=j;return r|0}if((d[(c[l>>2]|0)+128+16>>0]|0)>>>1&1){c[k>>2]=139;r=c[k>>2]|0;i=j;return r|0}if(((d[(c[l>>2]|0)+56>>0]|0)>>>1&1|0)==0?(c[q>>2]=Qr(c[l>>2]|0)|0,(c[q>>2]|0)!=0):0){c[k>>2]=c[q>>2];r=c[k>>2]|0;i=j;return r|0}if(!(a[(c[l>>2]|0)+128+16>>0]&1))Ur(c[l>>2]|0);q=(Sr((c[l>>2]|0)+128+8|0,c[p>>2]|0)|0)!=0;n=(c[l>>2]|0)+128|0;if(q){q=n+16|0;a[q>>0]=a[q>>0]&-3|2;c[k>>2]=139;r=c[k>>2]|0;i=j;return r|0}else{ss(n+20|0,c[o>>2]|0,c[p>>2]|0);Fb[c[(c[(c[l>>2]|0)+12>>2]|0)+48>>2]&1]((c[l>>2]|0)+496|0,c[m>>2]|0,c[o>>2]|0,c[p>>2]|0);c[k>>2]=0;r=c[k>>2]|0;i=j;return r|0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>>2]=47010;D=c[l>>2]|0;i=k;return D|0}else{c[l>>2]=0;D=c[l>>2]|0;i=k;return D|0}return 0}function $r(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;h=i;i=i+48|0;j=h+40|0;k=h+36|0;l=h+32|0;m=h+28|0;n=h+24|0;o=h+20|0;p=h+16|0;q=h+12|0;r=h+8|0;s=h+4|0;c[j>>2]=b;c[k>>2]=e;c[l>>2]=f;c[m>>2]=g;c[n>>2]=c[j>>2];c[o>>2]=c[k>>2];c[p>>2]=c[l>>2];c[h>>2]=3;if(!((c[p>>2]|c[n>>2]|c[o>>2])&3)){c[q>>2]=c[n>>2];c[r>>2]=c[o>>2];c[s>>2]=c[p>>2];while(1){if((c[m>>2]|0)>>>0<4)break;l=c[s>>2]|0;c[s>>2]=l+4;k=c[l>>2]|0;l=c[r>>2]|0;c[r>>2]=l+4;j=c[l>>2]^k;c[l>>2]=j;l=c[q>>2]|0;c[q>>2]=l+4;c[l>>2]=j;c[m>>2]=(c[m>>2]|0)-4}c[n>>2]=c[q>>2];c[o>>2]=c[r>>2];c[p>>2]=c[s>>2]}while(1){if(!(c[m>>2]|0))break;s=c[p>>2]|0;c[p>>2]=s+1;r=d[s>>0]|0;s=c[o>>2]|0;c[o>>2]=s+1;q=((d[s>>0]|0)^r)&255;a[s>>0]=q;s=c[n>>2]|0;c[n>>2]=s+1;a[s>>0]=q;c[m>>2]=(c[m>>2]|0)+-1}i=h;return}function as(b,e,f,g,h,j,k){b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;k=k|0;var l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0;l=i;i=i+96|0;m=l+84|0;n=l+76|0;o=l+72|0;p=l+68|0;q=l+64|0;r=l+60|0;s=l+56|0;t=l+52|0;u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2]|0)|0,c[C>>2]|0)|0;c[u>>2]=0;while(1){if((c[u>>2]|0)>=(c[r>>2]|0))break;n=(c[A>>2]|0)+((c[t>>2]|0)+(c[u>>2]|0))|0;a[n>>0]=d[n>>0]^d[(c[y>>2]|0)+((c[t>>2]|0)+(c[u>>2]|0))>>0];c[u>>2]=(c[u>>2]|0)+1}c[u>>2]=c[r>>2];while(1){if((c[u>>2]|0)<=0)break;n=(c[C>>2]|0)+((c[u>>2]|0)-1)|0;a[n>>0]=(a[n>>0]|0)+1<<24>>24;if(a[(c[C>>2]|0)+((c[u>>2]|0)-1)>>0]|0)break;c[u>>2]=(c[u>>2]|0)+-1}c[t>>2]=(c[t>>2]|0)+(c[r>>2]|0)}wb[c[p>>2]&15](c[x>>2]|0,c[D>>2]|0,c[B>>2]|0,c[z>>2]|0,c[q>>2]|0);if(mw(c[B>>2]|0,c[A>>2]|0,_(c[r>>2]|0,c[q>>2]|0)|0)|0){$f(c[E>>2]|0);c[m>>2]=47059;H=c[m>>2]|0;i=l;return H|0}if(mw(c[D>>2]|0,c[C>>2]|0,c[r>>2]|0)|0){$f(c[E>>2]|0);c[m>>2]=47059;H=c[m>>2]|0;i=l;return H|0}c[w>>2]=0;while(1){if((c[w>>2]|0)>=(c[q>>2]|0)){I=56;break}Fx(c[C>>2]|0,-1,c[r>>2]|0)|0;B=(c[C>>2]|0)+((c[r>>2]|0)-1)|0;a[B>>0]=(d[B>>0]|0)-(c[w>>2]|0);a[(c[C>>2]|0)+1>>0]=0;a[c[C>>2]>>0]=0;a[(c[C>>2]|0)+2>>0]=7;c[t>>2]=0;while(1){if((c[t>>2]|0)>=(_(c[r>>2]|0,c[q>>2]|0)|0))break;a[(c[y>>2]|0)+(c[t>>2]|0)>>0]=c[t>>2];c[t>>2]=(c[t>>2]|0)+1}c[t>>2]=0;while(1){if((c[t>>2]|0)>=(_(c[r>>2]|0,c[q>>2]|0)|0))break;vb[c[o>>2]&63](c[x>>2]|0,(c[A>>2]|0)+(c[t>>2]|0)|0,c[C>>2]|0)|0;c[u>>2]=0;while(1){if((c[u>>2]|0)>=(c[r>>2]|0))break;B=(c[A>>2]|0)+((c[t>>2]|0)+(c[u>>2]|0))|0;a[B>>0]=d[B>>0]^d[(c[y>>2]|0)+((c[t>>2]|0)+(c[u>>2]|0))>>0];c[u>>2]=(c[u>>2]|0)+1}c[u>>2]=c[r>>2];while(1){if((c[u>>2]|0)<=0)break;B=(c[C>>2]|0)+((c[u>>2]|0)-1)|0;a[B>>0]=(a[B>>0]|0)+1<<24>>24;if(a[(c[C>>2]|0)+((c[u>>2]|0)-1)>>0]|0)break;c[u>>2]=(c[u>>2]|0)+-1}c[t>>2]=(c[t>>2]|0)+(c[r>>2]|0)}Fx(c[D>>2]|0,-1,c[r>>2]|0)|0;B=(c[D>>2]|0)+((c[r>>2]|0)-1)|0;a[B>>0]=(d[B>>0]|0)-(c[w>>2]|0);a[(c[D>>2]|0)+1>>0]=0;a[c[D>>2]>>0]=0;a[(c[D>>2]|0)+2>>0]=7;wb[c[p>>2]&15](c[x>>2]|0,c[D>>2]|0,c[z>>2]|0,c[A>>2]|0,c[q>>2]|0);if(mw(c[z>>2]|0,c[y>>2]|0,_(c[r>>2]|0,c[q>>2]|0)|0)|0){I=52;break}if(mw(c[D>>2]|0,c[C>>2]|0,c[r>>2]|0)|0){I=54;break}c[w>>2]=(c[w>>2]|0)+1}if((I|0)==52){$f(c[E>>2]|0);c[m>>2]=47059;H=c[m>>2]|0;i=l;return H|0}else if((I|0)==54){$f(c[E>>2]|0);c[m>>2]=47059;H=c[m>>2]|0;i=l;return H|0}else if((I|0)==56){$f(c[E>>2]|0);c[m>>2]=0;H=c[m>>2]|0;i=l;return H|0}return 0}function bs(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0;d=i;i=i+352|0;e=d+160|0;f=d+128|0;g=d+48|0;h=d+40|0;j=d+32|0;k=d+24|0;l=d+16|0;m=d+8|0;n=d;o=d+344|0;p=d+340|0;q=d+336|0;r=d+332|0;s=d+328|0;t=d+284|0;u=d+224|0;v=d+220|0;w=d+216|0;x=d+212|0;y=d+208|0;z=d+204|0;A=d+200|0;B=d+196|0;C=d+192|0;D=d+188|0;E=d+184|0;F=d+180|0;G=d+176|0;H=d+172|0;I=d+168|0;J=d+164|0;c[p>>2]=a;c[q>>2]=b;c[v>>2]=0;c[w>>2]=0;c[x>>2]=0;c[y>>2]=0;c[z>>2]=0;c[B>>2]=0;c[C>>2]=0;c[D>>2]=0;c[E>>2]=0;c[F>>2]=0;c[G>>2]=0;c[H>>2]=0;b=t;a=b+44|0;do{c[b>>2]=0;b=b+4|0}while((b|0)<(a|0));b=u;a=b+60|0;do{c[b>>2]=0;b=b+4|0}while((b|0)<(a|0));c[r>>2]=kk(c[p>>2]|0,s)|0;if(c[r>>2]|0){c[o>>2]=c[r>>2];K=c[o>>2]|0;i=d;return K|0}c[A>>2]=xg(c[p>>2]|0,47161,0)|0;if((c[A>>2]|0)!=0?(c[z>>2]=Eg(c[A>>2]|0,1)|0,vg(c[A>>2]|0),(c[z>>2]|0)==0):0){c[o>>2]=65;K=c[o>>2]|0;i=d;return K|0}c[A>>2]=xg(c[p>>2]|0,47167,0)|0;if(!((c[A>>2]|0)!=0?(c[r>>2]=jk(c[A>>2]|0,H,0)|0,vg(c[A>>2]|0),(c[r>>2]|0)!=0):0))L=8;do if((L|0)==8){c[A>>2]=xg(c[p>>2]|0,47173,0)|0;if(c[A>>2]|0){c[H>>2]=c[H>>2]|32;vg(c[A>>2]|0)}if(!((c[s>>2]|0)!=0|(c[z>>2]|0)!=0)){c[o>>2]=68;K=c[o>>2]|0;i=d;return K|0}c[r>>2]=ui(c[s>>2]|0,c[z>>2]|0,t,s)|0;$f(c[z>>2]|0);c[z>>2]=0;if(!(c[r>>2]|0)){if(jg(1)|0){b=$i(c[t>>2]|0)|0;a=aj(c[t+4>>2]|0)|0;c[n>>2]=b;c[n+4>>2]=a;Df(47187,n);if(c[t+40>>2]|0){c[m>>2]=c[t+40>>2];Df(47212,m)}Hf(47234,c[t+8>>2]|0);Hf(47250,c[t+12>>2]|0);Hf(47266,c[t+16>>2]|0);Hf(47282,c[t+32>>2]|0);Hf(47298,c[t+36>>2]|0);Yn(47314,t+20|0,0)}c[B>>2]=jo(c[t>>2]|0,c[t+4>>2]|0,0,c[t+8>>2]|0,c[t+12>>2]|0,c[t+16>>2]|0)|0;a=c[B>>2]|0;b=c[H>>2]|0;if(c[H>>2]&4096)c[r>>2]=Qi(u,t,a,b)|0;else c[r>>2]=cs(u,t,a,b,c[s>>2]|0,x,y)|0;if(!(c[r>>2]|0)){c[v>>2]=vq(0)|0;c[w>>2]=vq(0)|0;if(Zn(c[v>>2]|0,c[w>>2]|0,u+20|0,c[B>>2]|0)|0){c[l>>2]=47704;Bf(47328,l)}c[E>>2]=bj(c[v>>2]|0,c[w>>2]|0,c[u+8>>2]|0)|0;do if((c[u+4>>2]|0)==1?(c[H>>2]&2048|0)==0:0){c[r>>2]=Ii(u+44|0,c[B>>2]|0,c[v>>2]|0,c[w>>2]|0,((c[H>>2]&1024|0)!=0^1^1)&1,I,J)|0;if(!(c[r>>2]|0)){c[F>>2]=vq(0)|0;iq(c[F>>2]|0,c[I>>2]|0,c[J>>2]<<3)|0;c[I>>2]=0;break}c[o>>2]=c[r>>2];K=c[o>>2]|0;i=d;return K|0}else L=28;while(0);if((L|0)==28){if((c[x>>2]|0)==0?(c[x>>2]=vq(0)|0,c[y>>2]=vq(0)|0,(Zn(c[x>>2]|0,c[y>>2]|0,u+44|0,c[B>>2]|0)|0)!=0):0){c[k>>2]=47376;Bf(47328,k)}c[F>>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;c[r>>2]=Ig(b,0,47901,f)|0}if(((c[r>>2]|0)==0?(jg(1)|0)!=0:0)?(Hf(47977,c[u+8>>2]|0),Hf(47993,c[u+12>>2]|0),Hf(48009,c[u+16>>2]|0),Hf(48025,c[E>>2]|0),Hf(48041,c[u+32>>2]|0),Hf(48057,c[u+36>>2]|0),Hf(48073,c[F>>2]|0),Hf(48089,c[G>>2]|0),(c[H>>2]&4096|0)!=0):0)Df(48105,e)}}}while(0);hq(c[G>>2]|0);hq(c[F>>2]|0);hq(c[E>>2]|0);Yi(u);fo(u+44|0);hq(c[u+56>>2]|0);Yi(t);hq(c[v>>2]|0);hq(c[w>>2]|0);hq(c[x>>2]|0);hq(c[y>>2]|0);no(c[B>>2]|0);vg(c[D>>2]|0);vg(c[C>>2]|0);c[o>>2]=c[r>>2];K=c[o>>2]|0;i=d;return K|0}function cs(b,d,e,f,g,h,j){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0;k=i;i=i+96|0;l=k+16|0;m=k+8|0;n=k;o=k+80|0;p=k+76|0;q=k+72|0;r=k+68|0;s=k+64|0;t=k+60|0;u=k+56|0;v=k+44|0;w=k+40|0;x=k+36|0;y=k+32|0;z=k+28|0;A=k+24|0;B=k+20|0;c[o>>2]=b;c[p>>2]=d;c[q>>2]=e;c[r>>2]=f;c[s>>2]=g;c[t>>2]=h;c[u>>2]=j;c[z>>2]=Ro(c[(c[p>>2]|0)+8>>2]|0)|0;co(v);if(c[r>>2]&32)c[w>>2]=1;else c[w>>2]=2;if((c[(c[q>>2]|0)+4>>2]|0)==1){j=wq(256)|0;c[(c[o>>2]|0)+56>>2]=j;c[A>>2]=On(32,c[w>>2]|0)|0;j=c[A>>2]|0;a[j>>0]=a[j>>0]&127;j=c[A>>2]|0;a[j>>0]=a[j>>0]|64;j=(c[A>>2]|0)+31|0;a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2]|0,c[(c[p>>2]|0)+32>>2]|0,c[(c[o>>2]|0)+56>>2]|0);q=(c[o>>2]|0)+44|0;n=c[x>>2]|0;A=c[y>>2]|0;go(q,n,A,Aq(1)|0)|0;if(jg(1)|0)Df(47378,m)}else ds((c[o>>2]|0)+44|0,v);while(0);c[c[t>>2]>>2]=c[x>>2];c[c[u>>2]>>2]=c[y>>2];fo(v);if(c[r>>2]&16384){i=k;return 0}r=c[o>>2]|0;v=(c[s>>2]|0)-64|0;if((c[c[o>>2]>>2]|0)!=1){es(r,v);i=k;return 0}else{fs(r,v);i=k;return 0}return 0}function ds(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=i;i=i+16|0;e=d+4|0;f=d;c[e>>2]=a;c[f>>2]=b;oq(c[c[e>>2]>>2]|0,c[c[f>>2]>>2]|0)|0;oq(c[(c[e>>2]|0)+4>>2]|0,c[(c[f>>2]|0)+4>>2]|0)|0;oq(c[(c[e>>2]|0)+8>>2]|0,c[(c[f>>2]|0)+8>>2]|0)|0;i=d;return}function es(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0;d=i;i=i+224|0;e=d+168|0;f=d+24|0;g=d+16|0;h=d+8|0;j=d+164|0;k=d+160|0;l=d+104|0;m=d+100|0;n=d+88|0;o=d+84|0;p=d+80|0;q=d+76|0;r=d+72|0;s=d+28|0;c[j>>2]=a;c[k>>2]=b;c[m>>2]=vq(c[k>>2]|0)|0;c[o>>2]=vq(c[k>>2]|0)|0;c[p>>2]=vq(c[k>>2]|0)|0;c[q>>2]=vq(c[k>>2]|0)|0;c[r>>2]=vq(c[k>>2]|0)|0;if(jg(1)|0)Df(47471,d);co(n);b=e;a=c[j>>2]|0;t=b+44|0;do{c[b>>2]=c[a>>2];b=b+4|0;a=a+4|0}while((b|0)<(t|0));Zi(s,e);b=l;a=s;t=b+44|0;do{c[b>>2]=c[a>>2];b=b+4|0;a=a+4|0}while((b|0)<(t|0));co(l+44|0);ds(l+44|0,(c[j>>2]|0)+44|0);yq(c[m>>2]|0,c[k>>2]|0,0);if(au(c[m>>2]|0,c[j>>2]|0,c[q>>2]|0,c[r>>2]|0,0,0)|0)Bf(47485,h);if(bu(c[m>>2]|0,l,c[q>>2]|0,c[r>>2]|0)|0)Bf(47515,g);if(!(jg(1)|0)){u=l+44|0;fo(u);Yi(l);fo(n);v=c[r>>2]|0;hq(v);w=c[q>>2]|0;hq(w);x=c[p>>2]|0;hq(x);y=c[o>>2]|0;hq(y);z=c[m>>2]|0;hq(z);i=d;return}Df(47553,f);u=l+44|0;fo(u);Yi(l);fo(n);v=c[r>>2]|0;hq(v);w=c[q>>2]|0;hq(w);x=c[p>>2]|0;hq(x);y=c[o>>2]|0;hq(y);z=c[m>>2]|0;hq(z);i=d;return}function fs(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;e=i;i=i+224|0;f=e+168|0;g=e+24|0;h=e+16|0;j=e+8|0;k=e+164|0;l=e+160|0;m=e+104|0;n=e+100|0;o=e+88|0;p=e+84|0;q=e+80|0;r=e+76|0;s=e+32|0;t=e+28|0;c[k>>2]=b;c[l>>2]=d;if(jg(1)|0)Df(47471,e);co(o);d=f;b=c[k>>2]|0;u=d+44|0;do{c[d>>2]=c[b>>2];d=d+4|0;b=b+4|0}while((d|0)<(u|0));Zi(s,f);d=m;b=s;u=d+44|0;do{c[d>>2]=c[b>>2];d=d+4|0;b=b+4|0}while((d|0)<(u|0));co(m+44|0);ds(m+44|0,(c[k>>2]|0)+44|0);if((c[(c[k>>2]|0)+4>>2]|0)==1){c[n>>2]=vq(256)|0;c[t>>2]=Mn(32,0)|0;b=c[t>>2]|0;a[b>>0]=a[b>>0]&127;b=c[t>>2]|0;a[b>>0]=a[b>>0]|64;b=(c[t>>2]|0)+31|0;a[b>>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=0?(c[l>>2]=jk(c[m>>2]|0,n,0)|0,(c[l>>2]|0)!=0):0))u=3;do if((u|0)==3){a=c[k>>2]|0;if(c[n>>2]&512){c[h>>2]=r+8;c[h+4>>2]=r+12;c[h+8>>2]=r+16;c[h+12>>2]=p;c[h+16>>2]=r+32;c[h+20>>2]=r+36;c[h+24>>2]=q;c[h+28>>2]=r+56;c[h+32>>2]=0;c[l>>2]=Rg(a,0,48140,h)|0}else{c[g>>2]=q;c[g+4>>2]=r+56;c[g+8>>2]=0;c[l>>2]=Rg(a,0,48159,g)|0}if(!(c[l>>2]|0)){vg(c[m>>2]|0);c[m>>2]=xg(c[k>>2]|0,47161,5)|0;if(((c[m>>2]|0)!=0?(c[o>>2]=Eg(c[m>>2]|0,1)|0,(c[o>>2]|0)!=0):0)?(c[l>>2]=xi(c[o>>2]|0,r,r+4|0,r+8|0,r+12|0,r+16|0,p,r+32|0,r+36|0)|0,(c[l>>2]|0)!=0):0){c[j>>2]=c[l>>2];v=c[j>>2]|0;i=b;return v|0}if((c[p>>2]|0)!=0?(co(r+20|0),c[l>>2]=dj(r+20|0,c[p>>2]|0)|0,(c[l>>2]|0)!=0):0)break;if(!(c[o>>2]|0)){c[r>>2]=(c[n>>2]&4096|0)!=0?2:0;c[r+4>>2]=(c[n>>2]&4096|0)!=0?1:0}if(jg(1)|0){a=$i(c[r>>2]|0)|0;t=aj(c[r+4>>2]|0)|0;c[f>>2]=a;c[f+4>>2]=t;Df(48165,f);if(c[r+40>>2]|0){c[e>>2]=c[r+40>>2];Df(48189,e)}Hf(48210,c[r+8>>2]|0);Hf(48226,c[r+12>>2]|0);Hf(48242,c[r+16>>2]|0);Yn(48258,r+20|0,0);Hf(48272,c[r+32>>2]|0);Hf(48288,c[r+36>>2]|0);Hf(48304,c[q>>2]|0);if(!(Ah()|0))Hf(48320,c[r+56>>2]|0)}if(((((((c[r+8>>2]|0)!=0?(c[r+12>>2]|0)!=0:0)?(c[r+16>>2]|0)!=0:0)?(c[r+20>>2]|0)!=0:0)?(c[r+32>>2]|0)!=0:0)?(c[r+36>>2]|0)!=0:0)?(c[r+56>>2]|0)!=0:0){c[s>>2]=jo(c[r>>2]|0,c[r+4>>2]|0,0,c[r+8>>2]|0,c[r+12>>2]|0,c[r+16>>2]|0)|0;if(!(c[q>>2]|0)){c[l>>2]=68;break}co(r+44|0);if((c[(c[s>>2]|0)+4>>2]|0)==1)c[l>>2]=Ni(c[q>>2]|0,c[s>>2]|0,r+44|0,0,0)|0;else c[l>>2]=dj(r+44|0,c[q>>2]|0)|0;if(c[l>>2]|0)break;if(!(hs(r,c[s>>2]|0,c[n>>2]|0)|0))break;c[l>>2]=7;break}c[l>>2]=68}}while(0);no(c[s>>2]|0);xq(c[r+8>>2]|0);xq(c[r+12>>2]|0);xq(c[r+16>>2]|0);xq(c[p>>2]|0);fo(r+20|0);xq(c[r+32>>2]|0);xq(c[r+36>>2]|0);xq(c[q>>2]|0);fo(r+44|0);xq(c[r+56>>2]|0);$f(c[o>>2]|0);vg(c[m>>2]|0);if(jg(1)|0){c[d>>2]=fu(c[l>>2]|0)|0;Df(48623,d)}c[j>>2]=c[l>>2];v=c[j>>2]|0;i=b;return v|0}function hs(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0;e=i;i=i+112|0;f=e+64|0;g=e+56|0;h=e+48|0;j=e+40|0;k=e+32|0;l=e+24|0;m=e+16|0;n=e+8|0;o=e;p=e+108|0;q=e+104|0;r=e+100|0;s=e+96|0;t=e+84|0;u=e+80|0;v=e+76|0;w=e+72|0;x=e+68|0;c[p>>2]=a;c[q>>2]=b;c[r>>2]=d;c[s>>2]=1;c[w>>2]=0;c[x>>2]=0;co(t);c[u>>2]=vq(0)|0;if((c[c[q>>2]>>2]|0)==1)c[v>>2]=0;else c[v>>2]=vq(0)|0;a:do if(!(Io((c[p>>2]|0)+20|0,c[q>>2]|0)|0)){if(jg(1)|0)Df(48336,o)}else{if(!($o(c[(c[p>>2]|0)+20+8>>2]|0,0)|0)){if(!(jg(1)|0))break;Df(48388,n);break}if((c[(c[p>>2]|0)+4>>2]|0)!=1?(Go(t,c[(c[p>>2]|0)+32>>2]|0,(c[p>>2]|0)+20|0,c[q>>2]|0),($o(c[t+8>>2]|0,0)|0)!=0):0){if(!(jg(1)|0))break;Df(48433,m);break}if(!($o(c[(c[p>>2]|0)+44+8>>2]|0,0)|0)){if(!(jg(1)|0))break;Df(48480,l);break}if(!(ej(t,c[q>>2]|0,(c[p>>2]|0)+20|0,c[(c[p>>2]|0)+56>>2]|0)|0)){if(!(jg(1)|0))break;Df(48526,k);break}if(Zn(c[u>>2]|0,c[v>>2]|0,t,c[q>>2]|0)|0){if(!(jg(1)|0))break;Df(48480,j);break}do if(!(c[r>>2]&4096)){if(!($o(c[(c[p>>2]|0)+44+8>>2]|0,1)|0)){if(!(ap(c[u>>2]|0,c[(c[p>>2]|0)+44>>2]|0)|0)){if(c[v>>2]|0)break;if(!(ap(c[v>>2]|0,c[(c[p>>2]|0)+44+4>>2]|0)|0))break}if(!(jg(1)|0))break a;Df(48563,h);break a}c[w>>2]=vq(0)|0;c[x>>2]=vq(0)|0;if(Zn(c[w>>2]|0,c[x>>2]|0,(c[p>>2]|0)+44|0,c[q>>2]|0)|0){if(!(jg(1)|0))break a;Df(48480,g);break a}if((ap(c[u>>2]|0,c[w>>2]|0)|0)==0?(ap(c[v>>2]|0,c[x>>2]|0)|0)==0:0)break;if(!(jg(1)|0))break a;Df(48563,f);break a}while(0);c[s>>2]=0}while(0);hq(c[w>>2]|0);hq(c[u>>2]|0);hq(c[v>>2]|0);hq(c[x>>2]|0);fo(t);i=e;return c[s>>2]|0}
+function is(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0;e=i;i=i+256|0;f=e+72|0;g=e+64|0;h=e+56|0;j=e+48|0;k=e+40|0;l=e+32|0;m=e;n=e+248|0;o=e+244|0;p=e+240|0;q=e+236|0;r=e+232|0;s=e+192|0;t=e+184|0;u=e+180|0;v=e+176|0;w=e+172|0;x=e+168|0;y=e+164|0;z=e+160|0;A=e+104|0;B=e+96|0;C=e+84|0;D=e+80|0;E=e+76|0;c[o>>2]=a;c[p>>2]=b;c[q>>2]=d;c[t>>2]=0;c[u>>2]=0;c[v>>2]=0;c[w>>2]=0;c[x>>2]=0;c[y>>2]=0;c[z>>2]=0;c[B>>2]=0;d=A;b=d+56|0;do{c[d>>2]=0;d=d+4|0}while((d|0)<(b|0));pk(s,0,js(c[q>>2]|0)|0);c[r>>2]=rk(c[p>>2]|0,z,s)|0;do if(!(c[r>>2]|0)){if(jg(1)|0)Hf(48646,c[z>>2]|0);if((c[z>>2]|0)!=0?(c[(c[z>>2]|0)+12>>2]&4|0)!=0:0){c[r>>2]=79;break}p=c[q>>2]|0;c[m>>2]=A+8;c[m+4>>2]=A+12;c[m+8>>2]=A+16;c[m+12>>2]=v;c[m+16>>2]=A+32;c[m+20>>2]=A+36;c[m+24>>2]=w;c[m+28>>2]=0;c[r>>2]=Rg(p,0,48663,m)|0;if(!(c[r>>2]|0)){if((c[v>>2]|0)!=0?(co(A+20|0),c[r>>2]=dj(A+20|0,c[v>>2]|0)|0,(c[r>>2]|0)!=0):0)break;vg(c[t>>2]|0);c[t>>2]=xg(c[q>>2]|0,47161,5)|0;if(((c[t>>2]|0)!=0?(c[u>>2]=Eg(c[t>>2]|0,1)|0,(c[u>>2]|0)!=0):0)?(c[r>>2]=ui(0,c[u>>2]|0,A,0)|0,(c[r>>2]|0)!=0):0){c[n>>2]=c[r>>2];F=c[n>>2]|0;i=e;return F|0}if(!(c[u>>2]|0)){c[A>>2]=0;c[A+4>>2]=0}if(jg(1)|0){p=$i(c[A>>2]|0)|0;d=aj(c[A+4>>2]|0)|0;c[l>>2]=p;c[l+4>>2]=d;Df(48679,l);if(c[A+40>>2]|0){c[k>>2]=c[A+40>>2];Df(48704,k)}Hf(48726,c[A+8>>2]|0);Hf(48743,c[A+12>>2]|0);Hf(48760,c[A+16>>2]|0);Yn(48777,A+20|0,0);Hf(48792,c[A+32>>2]|0);Hf(48809,c[A+36>>2]|0);Hf(48826,c[w>>2]|0)}if((((((c[A+8>>2]|0)!=0?(c[A+12>>2]|0)!=0:0)?(c[A+16>>2]|0)!=0:0)?(c[A+20>>2]|0)!=0:0)?(c[A+32>>2]|0)!=0:0)?(c[A+36>>2]|0)!=0&(c[w>>2]|0)!=0:0){if((c[w>>2]|0)!=0?(co(A+44|0),c[r>>2]=dj(A+44|0,c[w>>2]|0)|0,(c[r>>2]|0)!=0):0)break;c[B>>2]=jo(c[A>>2]|0,c[A+4>>2]|0,0,c[A+8>>2]|0,c[A+12>>2]|0,c[A+16>>2]|0)|0;c[D>>2]=vq(0)|0;c[E>>2]=vq(0)|0;co(C);Go(C,c[z>>2]|0,A+44|0,c[B>>2]|0);if(Zn(c[D>>2]|0,c[E>>2]|0,C,c[B>>2]|0)|0)Bf(48843,j);c[x>>2]=bj(c[D>>2]|0,c[E>>2]|0,c[A+8>>2]|0)|0;Go(C,c[z>>2]|0,A+20|0,c[B>>2]|0);if(Zn(c[D>>2]|0,c[E>>2]|0,C,c[B>>2]|0)|0)Bf(48891,h);else{c[y>>2]=bj(c[D>>2]|0,c[E>>2]|0,c[A+8>>2]|0)|0;hq(c[D>>2]|0);hq(c[E>>2]|0);fo(C);d=c[o>>2]|0;p=c[y>>2]|0;c[g>>2]=c[x>>2];c[g+4>>2]=p;c[r>>2]=Ig(d,0,48938,g)|0;break}}c[r>>2]=68}}while(0);xq(c[A+8>>2]|0);xq(c[A+12>>2]|0);xq(c[A+16>>2]|0);xq(c[v>>2]|0);fo(A+20|0);xq(c[A+32>>2]|0);xq(c[A+36>>2]|0);xq(c[w>>2]|0);fo(A+44|0);xq(c[z>>2]|0);xq(c[x>>2]|0);xq(c[y>>2]|0);$f(c[u>>2]|0);no(c[B>>2]|0);qk(s);if(jg(1)|0){c[f>>2]=fu(c[r>>2]|0)|0;Df(48964,f)}c[n>>2]=c[r>>2];F=c[n>>2]|0;i=e;return F|0}function js(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0;b=i;i=i+32|0;d=b+20|0;e=b+16|0;f=b+12|0;g=b+8|0;h=b+4|0;j=b;c[e>>2]=a;c[h>>2]=0;c[f>>2]=xg(c[e>>2]|0,48644,1)|0;if(c[f>>2]|0){c[g>>2]=Fg(c[f>>2]|0,1,5)|0;vg(c[f>>2]|0);if(c[g>>2]|0){c[h>>2]=Ro(c[g>>2]|0)|0;xq(c[g>>2]|0)}}else{c[f>>2]=xg(c[e>>2]|0,47161,5)|0;if(!(c[f>>2]|0)){c[d>>2]=0;k=c[d>>2]|0;i=b;return k|0}c[j>>2]=Eg(c[f>>2]|0,1)|0;vg(c[f>>2]|0);if(!(c[j>>2]|0)){c[d>>2]=0;k=c[d>>2]|0;i=b;return k|0}if(ui(0,c[j>>2]|0,0,h)|0)c[h>>2]=0;$f(c[j>>2]|0)}c[d>>2]=c[h>>2];k=c[d>>2]|0;i=b;return k|0}function ks(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;e=i;i=i+256|0;f=e+72|0;g=e+64|0;h=e+56|0;j=e+48|0;k=e+40|0;l=e+8|0;m=e;n=e+248|0;o=e+244|0;p=e+240|0;q=e+236|0;r=e+232|0;s=e+192|0;t=e+188|0;u=e+184|0;v=e+124|0;w=e+120|0;x=e+116|0;y=e+112|0;z=e+100|0;A=e+88|0;B=e+84|0;C=e+80|0;D=e+76|0;c[o>>2]=a;c[p>>2]=b;c[q>>2]=d;c[t>>2]=0;c[u>>2]=0;c[w>>2]=0;c[x>>2]=0;c[y>>2]=0;c[B>>2]=0;d=v;b=d+60|0;do{c[d>>2]=0;d=d+4|0}while((d|0)<(b|0));co(z);co(A);pk(s,1,js(c[q>>2]|0)|0);c[r>>2]=nk(c[p>>2]|0,12916,t,s)|0;do if((c[r>>2]|0)==0?(p=c[t>>2]|0,c[m>>2]=u,c[m+4>>2]=0,c[r>>2]=Rg(p,0,48986,m)|0,(c[r>>2]|0)==0):0){if(jg(1)|0)Hf(48988,c[u>>2]|0);if((c[u>>2]|0)!=0?(c[(c[u>>2]|0)+12>>2]&4|0)!=0:0){c[r>>2]=79;break}p=c[q>>2]|0;c[l>>2]=v+8;c[l+4>>2]=v+12;c[l+8>>2]=v+16;c[l+12>>2]=w;c[l+16>>2]=v+32;c[l+20>>2]=v+36;c[l+24>>2]=v+56;c[l+28>>2]=0;c[r>>2]=Rg(p,0,49005,l)|0;if(!(c[r>>2]|0)){if((c[w>>2]|0)!=0?(co(v+20|0),c[r>>2]=dj(v+20|0,c[w>>2]|0)|0,(c[r>>2]|0)!=0):0)break;vg(c[t>>2]|0);c[t>>2]=xg(c[q>>2]|0,47161,5)|0;if(((c[t>>2]|0)!=0?(c[x>>2]=Eg(c[t>>2]|0,1)|0,(c[x>>2]|0)!=0):0)?(c[r>>2]=ui(0,c[x>>2]|0,v,0)|0,(c[r>>2]|0)!=0):0){c[n>>2]=c[r>>2];E=c[n>>2]|0;i=e;return E|0}if(!(c[x>>2]|0)){c[v>>2]=0;c[v+4>>2]=0}if(jg(1)|0){p=$i(c[v>>2]|0)|0;d=aj(c[v+4>>2]|0)|0;c[k>>2]=p;c[k+4>>2]=d;Df(49021,k);if(c[v+40>>2]|0){c[j>>2]=c[v+40>>2];Df(49046,j)}Hf(49068,c[v+8>>2]|0);Hf(49085,c[v+12>>2]|0);Hf(49102,c[v+16>>2]|0);Yn(49119,v+20|0,0);Hf(49134,c[v+32>>2]|0);Hf(49151,c[v+36>>2]|0);if(!(Ah()|0))Hf(49168,c[v+56>>2]|0)}if(((((((c[v+8>>2]|0)!=0?(c[v+12>>2]|0)!=0:0)?(c[v+16>>2]|0)!=0:0)?(c[v+20>>2]|0)!=0:0)?(c[v+32>>2]|0)!=0:0)?(c[v+36>>2]|0)!=0:0)?(c[v+56>>2]|0)!=0:0){c[r>>2]=dj(z,c[u>>2]|0)|0;if(c[r>>2]|0){fo(z);c[n>>2]=c[r>>2];E=c[n>>2]|0;i=e;return E|0}c[y>>2]=jo(c[v>>2]|0,c[v+4>>2]|0,0,c[v+8>>2]|0,c[v+12>>2]|0,c[v+16>>2]|0)|0;Go(A,c[v+56>>2]|0,z,c[y>>2]|0);c[C>>2]=vq(0)|0;c[D>>2]=vq(0)|0;if(Zn(c[C>>2]|0,c[D>>2]|0,A,c[y>>2]|0)|0)Bf(49185,h);c[B>>2]=bj(c[C>>2]|0,c[D>>2]|0,c[v+8>>2]|0)|0;if(c[B>>2]|0)c[r>>2]=0;else c[r>>2]=iu()|0;hq(c[C>>2]|0);hq(c[D>>2]|0);if(jg(1)|0)Hf(49225,c[B>>2]|0);if(c[r>>2]|0)break;d=c[o>>2]|0;c[g>>2]=c[B>>2];c[r>>2]=Ig(d,0,49242,g)|0;break}c[r>>2]=68}}while(0);fo(A);fo(z);xq(c[B>>2]|0);xq(c[v+8>>2]|0);xq(c[v+12>>2]|0);xq(c[v+16>>2]|0);xq(c[w>>2]|0);fo(v+20|0);xq(c[v+32>>2]|0);xq(c[v+36>>2]|0);xq(c[v+56>>2]|0);xq(c[u>>2]|0);$f(c[x>>2]|0);vg(c[t>>2]|0);no(c[y>>2]|0);qk(s);if(jg(1)|0){c[f>>2]=fu(c[r>>2]|0)|0;Df(49253,f)}c[n>>2]=c[r>>2];E=c[n>>2]|0;i=e;return E|0}function ls(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0;e=i;i=i+272|0;f=e+104|0;g=e+96|0;h=e+88|0;j=e+80|0;k=e+72|0;l=e+56|0;m=e+40|0;n=e;o=e+256|0;p=e+252|0;q=e+248|0;r=e+244|0;s=e+240|0;t=e+200|0;u=e+192|0;v=e+188|0;w=e+184|0;x=e+180|0;y=e+176|0;z=e+116|0;A=e+112|0;B=e+108|0;c[p>>2]=a;c[q>>2]=b;c[r>>2]=d;c[u>>2]=0;c[v>>2]=0;c[w>>2]=0;c[x>>2]=0;c[y>>2]=0;c[A>>2]=0;c[B>>2]=0;d=z;b=d+60|0;do{c[d>>2]=0;d=d+4|0}while((d|0)<(b|0));pk(t,2,0);c[s>>2]=rk(c[q>>2]|0,u,t)|0;do if(!(c[s>>2]|0)){if(jg(1)|0)Hf(49275,c[u>>2]|0);q=c[r>>2]|0;if(c[t+12>>2]&512){c[n>>2]=z+8;c[n+4>>2]=z+12;c[n+8>>2]=z+16;c[n+12>>2]=x;c[n+16>>2]=z+32;c[n+20>>2]=z+36;c[n+24>>2]=y;c[n+28>>2]=z+56;c[n+32>>2]=0;c[s>>2]=Rg(q,0,48140,n)|0}else{c[m>>2]=y;c[m+4>>2]=z+56;c[m+8>>2]=0;c[s>>2]=Rg(q,0,48159,m)|0}if(!(c[s>>2]|0)){if((c[x>>2]|0)!=0?(co(z+20|0),c[s>>2]=dj(z+20|0,c[x>>2]|0)|0,(c[s>>2]|0)!=0):0)break;vg(c[v>>2]|0);c[v>>2]=xg(c[r>>2]|0,47161,5)|0;if(((c[v>>2]|0)!=0?(c[w>>2]=Eg(c[v>>2]|0,1)|0,(c[w>>2]|0)!=0):0)?(c[s>>2]=ui(0,c[w>>2]|0,z,0)|0,(c[s>>2]|0)!=0):0){c[o>>2]=c[s>>2];C=c[o>>2]|0;i=e;return C|0}if(!(c[w>>2]|0)){c[z>>2]=(c[t+12>>2]&4096|0)!=0?2:0;c[z+4>>2]=(c[t+12>>2]&4096|0)!=0?1:0}if(jg(1)|0){q=$i(c[z>>2]|0)|0;d=aj(c[z+4>>2]|0)|0;b=(c[t+12>>2]&4096|0)!=0?49291:76527;c[l>>2]=q;c[l+4>>2]=d;c[l+8>>2]=b;Df(49298,l);if(c[z+40>>2]|0){c[k>>2]=c[z+40>>2];Df(49324,k)}Hf(49345,c[z+8>>2]|0);Hf(49361,c[z+12>>2]|0);Hf(49377,c[z+16>>2]|0);Yn(49393,z+20|0,0);Hf(49407,c[z+32>>2]|0);Hf(49423,c[z+36>>2]|0);Hf(49439,c[y>>2]|0);if(!(Ah()|0))Hf(49455,c[z+56>>2]|0)}if(((((((c[z+8>>2]|0)!=0?(c[z+12>>2]|0)!=0:0)?(c[z+16>>2]|0)!=0:0)?(c[z+20>>2]|0)!=0:0)?(c[z+32>>2]|0)!=0:0)?(c[z+36>>2]|0)!=0:0)?(c[z+56>>2]|0)!=0:0){c[A>>2]=vq(0)|0;c[B>>2]=vq(0)|0;if(c[t+12>>2]&4096){c[s>>2]=Vi(c[u>>2]|0,z,c[A>>2]|0,c[B>>2]|0,c[t+16>>2]|0,c[y>>2]|0)|0;if(c[s>>2]|0)break;b=c[p>>2]|0;d=c[B>>2]|0;c[j>>2]=c[A>>2];c[j+4>>2]=d;c[s>>2]=Ig(b,0,49471,j)|0;break}b=c[u>>2]|0;d=c[A>>2]|0;q=c[B>>2]|0;if(c[t+12>>2]&8192){c[s>>2]=cu(b,z,d,q)|0;if(c[s>>2]|0)break;a=c[p>>2]|0;D=c[B>>2]|0;c[h>>2]=c[A>>2];c[h+4>>2]=D;c[s>>2]=Ig(a,0,49498,h)|0;break}else{c[s>>2]=au(b,z,d,q,c[t+12>>2]|0,c[t+16>>2]|0)|0;if(c[s>>2]|0)break;q=c[p>>2]|0;d=c[B>>2]|0;c[g>>2]=c[A>>2];c[g+4>>2]=d;c[s>>2]=Ig(q,0,49524,g)|0;break}}c[s>>2]=68}}while(0);xq(c[z+8>>2]|0);xq(c[z+12>>2]|0);xq(c[z+16>>2]|0);xq(c[x>>2]|0);fo(z+20|0);xq(c[z+32>>2]|0);xq(c[z+36>>2]|0);xq(c[y>>2]|0);fo(z+44|0);xq(c[z+56>>2]|0);xq(c[A>>2]|0);xq(c[B>>2]|0);$f(c[w>>2]|0);xq(c[u>>2]|0);vg(c[v>>2]|0);qk(t);if(jg(1)|0){c[f>>2]=fu(c[s>>2]|0)|0;Df(49551,f)}c[o>>2]=c[s>>2];C=c[o>>2]|0;i=e;return C|0}function ms(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0;e=i;i=i+272|0;f=e+80|0;g=e+72|0;h=e+56|0;j=e+48|0;k=e+16|0;l=e;m=e+256|0;n=e+252|0;o=e+248|0;p=e+244|0;q=e+240|0;r=e+200|0;s=e+192|0;t=e+188|0;u=e+184|0;v=e+180|0;w=e+176|0;x=e+172|0;y=e+168|0;z=e+112|0;A=e+104|0;B=e+100|0;C=e+96|0;D=e+92|0;E=e+88|0;F=e+84|0;c[n>>2]=a;c[o>>2]=b;c[p>>2]=d;c[s>>2]=0;c[t>>2]=0;c[u>>2]=0;c[v>>2]=0;c[w>>2]=0;c[x>>2]=0;c[y>>2]=0;d=z;b=d+56|0;do{c[d>>2]=0;d=d+4|0}while((d|0)<(b|0));pk(r,3,js(c[p>>2]|0)|0);c[q>>2]=rk(c[o>>2]|0,y,r)|0;a:do if(!(c[q>>2]|0)){if(jg(1)|0)Hf(49572,c[y>>2]|0);c[q>>2]=mk(c[n>>2]|0,12916,s,A)|0;if((c[q>>2]|0)==0?(o=c[s>>2]|0,d=(c[A>>2]&4096|0)!=0?49588:47158,c[l>>2]=w,c[l+4>>2]=x,c[l+8>>2]=0,c[q>>2]=Rg(o,0,d,l)|0,(c[q>>2]|0)==0):0){if(jg(1)|0){Hf(49592,c[w>>2]|0);Hf(49608,c[x>>2]|0)}if(c[r+12>>2]&4096^c[A>>2]&4096){c[q>>2]=70;break}d=c[p>>2]|0;if(c[r+12>>2]&512){c[k>>2]=z+8;c[k+4>>2]=z+12;c[k+8>>2]=z+16;c[k+12>>2]=u;c[k+16>>2]=z+32;c[k+20>>2]=z+32;c[k+24>>2]=v;c[k+28>>2]=0;c[q>>2]=Rg(d,0,49624,k)|0}else{c[j>>2]=v;c[j+4>>2]=0;c[q>>2]=Rg(d,0,49640,j)|0}if(!(c[q>>2]|0)){if((c[u>>2]|0)!=0?(co(z+20|0),c[q>>2]=dj(z+20|0,c[u>>2]|0)|0,(c[q>>2]|0)!=0):0)break;vg(c[s>>2]|0);c[s>>2]=xg(c[p>>2]|0,47161,5)|0;if(((c[s>>2]|0)!=0?(c[t>>2]=Eg(c[s>>2]|0,1)|0,(c[t>>2]|0)!=0):0)?(c[q>>2]=ui(0,c[t>>2]|0,z,0)|0,(c[q>>2]|0)!=0):0){c[m>>2]=c[q>>2];G=c[m>>2]|0;i=e;return G|0}if(!(c[t>>2]|0)){c[z>>2]=(c[A>>2]&4096|0)!=0?2:0;c[z+4>>2]=(c[A>>2]&4096|0)!=0?1:0}if(jg(1)|0){d=$i(c[z>>2]|0)|0;o=aj(c[z+4>>2]|0)|0;b=(c[A>>2]&4096|0)!=0?49291:76527;c[h>>2]=d;c[h+4>>2]=o;c[h+8>>2]=b;Df(49643,h);if(c[z+40>>2]|0){c[g>>2]=c[z+40>>2];Df(49669,g)}Hf(49690,c[z+8>>2]|0);Hf(49706,c[z+12>>2]|0);Hf(49722,c[z+16>>2]|0);Yn(49738,z+20|0,0);Hf(49752,c[z+32>>2]|0);Hf(49768,c[z+36>>2]|0);Hf(49784,c[v>>2]|0)}if((((((c[z+8>>2]|0)!=0?(c[z+12>>2]|0)!=0:0)?(c[z+16>>2]|0)!=0:0)?(c[z+20>>2]|0)!=0:0)?(c[z+32>>2]|0)!=0:0)?(c[z+36>>2]|0)!=0&(c[v>>2]|0)!=0:0){if(c[A>>2]&4096){c[q>>2]=Xi(c[y>>2]|0,z,c[w>>2]|0,c[x>>2]|0,c[r+16>>2]|0,c[v>>2]|0)|0;break}b=(c[A>>2]&8192|0)!=0;co(z+44|0);if(b){c[q>>2]=dj(z+44|0,c[v>>2]|0)|0;if(c[q>>2]|0)break;c[q>>2]=du(c[y>>2]|0,z,c[w>>2]|0,c[x>>2]|0)|0;break}if((c[z+4>>2]|0)==1){c[B>>2]=jo(c[z>>2]|0,c[z+4>>2]|0,0,c[z+8>>2]|0,c[z+12>>2]|0,c[z+16>>2]|0)|0;c[q>>2]=Ni(c[v>>2]|0,c[B>>2]|0,z+44|0,0,0)|0;no(c[B>>2]|0)}else c[q>>2]=dj(z+44|0,c[v>>2]|0)|0;if(c[q>>2]|0)break;do if(c[y>>2]|0){if(!(c[(c[y>>2]|0)+12>>2]&4))break;c[E>>2]=Ro(c[z+32>>2]|0)|0;c[C>>2]=kq(c[y>>2]|0,D)|0;c[q>>2]=Dp(F,5,c[C>>2]|0,(((c[D>>2]|0)+7|0)>>>0)/8|0,0)|0;if(c[q>>2]|0)break a;if((c[D>>2]|0)>>>0>(c[E>>2]|0)>>>0)Yo(c[F>>2]|0,c[F>>2]|0,(c[D>>2]|0)-(c[E>>2]|0)|0);c[q>>2]=bu(c[F>>2]|0,z,c[w>>2]|0,c[x>>2]|0)|0;xq(c[F>>2]|0);break a}while(0);c[q>>2]=bu(c[y>>2]|0,z,c[w>>2]|0,c[x>>2]|0)|0;break}c[q>>2]=68}}}while(0);xq(c[z+8>>2]|0);xq(c[z+12>>2]|0);xq(c[z+16>>2]|0);xq(c[u>>2]|0);fo(z+20|0);xq(c[z+32>>2]|0);xq(c[z+36>>2]|0);xq(c[v>>2]|0);fo(z+44|0);xq(c[y>>2]|0);xq(c[w>>2]|0);xq(c[x>>2]|0);$f(c[t>>2]|0);vg(c[s>>2]|0);qk(r);if(jg(1)|0){if(c[q>>2]|0)H=fu(c[q>>2]|0)|0;else H=49800;c[f>>2]=H;Df(49805,f)}c[m>>2]=c[q>>2];G=c[m>>2]|0;i=e;return G|0}function ns(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0;e=i;i=i+16|0;f=e+12|0;g=e+8|0;h=e;c[g>>2]=a;c[e+4>>2]=b;c[h>>2]=d;if((c[g>>2]|0)!=18){c[f>>2]=4;j=c[f>>2]|0;i=e;return j|0}else{c[f>>2]=os(c[h>>2]|0)|0;j=c[f>>2]|0;i=e;return j|0}return 0}function os(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0;b=i;i=i+16|0;d=b+12|0;e=b+8|0;f=b+4|0;g=b;c[e>>2]=a;c[f>>2]=49826;c[g>>2]=0;if(!(c[g>>2]|0)){c[d>>2]=0;h=c[d>>2]|0;i=b;return h|0}if(c[e>>2]|0)Fb[c[e>>2]&1](49836,18,c[f>>2]|0,c[g>>2]|0);c[d>>2]=50;h=c[d>>2]|0;i=b;return h|0}function ps(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0;e=i;i=i+208|0;f=e+88|0;g=e+80|0;h=e+72|0;j=e+64|0;k=e+32|0;l=e;m=e+172|0;n=e+168|0;o=e+164|0;p=e+160|0;q=e+132|0;r=e+128|0;s=e+124|0;t=e+120|0;u=e+116|0;v=e+112|0;w=e+176|0;x=e+108|0;y=e+104|0;z=e+100|0;A=e+96|0;c[m>>2]=b;c[n>>2]=d;c[s>>2]=0;c[t>>2]=0;c[u>>2]=0;c[v>>2]=0;c[r>>2]=0;while(1){if((c[r>>2]|0)>=7)break;c[q+(c[r>>2]<<2)>>2]=0;c[r>>2]=(c[r>>2]|0)+1}c[p>>2]=xg(c[n>>2]|0,47167,0)|0;if(!((c[p>>2]|0)!=0?(c[o>>2]=jk(c[p>>2]|0,t,0)|0,(c[o>>2]|0)!=0):0))B=6;a:do if((B|0)==6){d=(c[t>>2]&4096|0)!=0;b=c[n>>2]|0;do if(c[t>>2]&512){C=q+4|0;D=q+8|0;E=q+12|0;F=q+16|0;G=q+20|0;H=q+24|0;if(d){c[l>>2]=q;c[l+4>>2]=C;c[l+8>>2]=D;c[l+12>>2]=E;c[l+16>>2]=F;c[l+20>>2]=G;c[l+24>>2]=H;c[l+28>>2]=0;c[o>>2]=Rg(b,0,49843,l)|0;break}else{c[k>>2]=q;c[k+4>>2]=C;c[k+8>>2]=D;c[k+12>>2]=E;c[k+16>>2]=F;c[k+20>>2]=G;c[k+24>>2]=H;c[k+28>>2]=0;c[o>>2]=Rg(b,0,49858,k)|0;break}}else{H=q+24|0;if(d){c[j>>2]=H;c[j+4>>2]=0;c[o>>2]=Rg(b,0,49640,j)|0;break}else{c[h>>2]=H;c[h+4>>2]=0;c[o>>2]=Rg(b,0,49872,h)|0;break}}while(0);if(!(c[o>>2]|0)){vg(c[p>>2]|0);c[p>>2]=xg(c[n>>2]|0,47161,5)|0;if(((c[p>>2]|0)!=0?(c[s>>2]=Eg(c[p>>2]|0,1)|0,(c[s>>2]|0)!=0):0)?(c[o>>2]=xi(c[s>>2]|0,u,v,q,q+4|0,q+8|0,q+12|0,q+16|0,q+20|0)|0,(c[o>>2]|0)!=0):0)break;if(!(c[s>>2]|0)){c[u>>2]=(c[t>>2]&4096|0)!=0?2:0;c[v>>2]=(c[t>>2]&4096|0)!=0?1:0}c[r>>2]=0;while(1){if((c[r>>2]|0)>=7)break;if(!(c[q+(c[r>>2]<<2)>>2]|0)){B=22;break}Qo(c[q+(c[r>>2]<<2)>>2]|0);c[r>>2]=(c[r>>2]|0)+1}if((B|0)==22){c[o>>2]=68;break}if(c[t>>2]&4096){if((c[v>>2]|0)==1)c[o>>2]=Ki(c[q+24>>2]|0,256)|0;else c[o>>2]=69;if(c[o>>2]|0)break}c[r>>2]=0;b:while(1){if((c[r>>2]|0)>=7)break a;do if((c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;if((g|0)!=(c[p>>2]|0)){c[j>>2]=49892;w=c[j>>2]|0;i=h;return w|0}c[r>>2]=wj(s,c[k>>2]|0,0)|0;if(c[r>>2]|0){c[j>>2]=49933;w=c[j>>2]|0;i=h;return w|0}a:do switch(c[l>>2]|0){case 0:{Fj(c[s>>2]|0,c[m>>2]|0,c[n>>2]|0);break}case 1:{Fx(u|0,97,1e3)|0;c[v>>2]=0;while(1){if((c[v>>2]|0)>=1e3)break a;Fj(c[s>>2]|0,u,1e3);c[v>>2]=(c[v>>2]|0)+1}break}default:c[q>>2]=49953}while(0);if((c[q>>2]|0)==0?(c[t>>2]=Rj(c[s>>2]|0,c[k>>2]|0)|0,(mw(c[t>>2]|0,c[o>>2]|0,c[p>>2]|0)|0)!=0):0)c[q>>2]=49970;Ej(c[s>>2]|0);c[j>>2]=c[q>>2];w=c[j>>2]|0;i=h;return w|0}function rs(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;f=i;i=i+32|0;g=f+28|0;h=f+24|0;j=f+20|0;k=f+16|0;l=f+12|0;m=f+8|0;n=f+4|0;o=f;c[g>>2]=b;c[h>>2]=d;c[j>>2]=e;c[k>>2]=c[h>>2];c[l>>2]=c[g>>2];c[m>>2]=0;c[n>>2]=c[(c[l>>2]|0)+148>>2];if(128<(c[n>>2]|0)>>>0)wf(49986,112,5e4);if(!(c[(c[l>>2]|0)+152>>2]|0)){i=f;return}if((c[(c[l>>2]|0)+144>>2]|0)==(c[n>>2]|0)?(c[m>>2]=vb[c[(c[l>>2]|0)+152>>2]&63](c[l>>2]|0,c[l>>2]|0,1)|0,If(c[m>>2]|0),Jf(),c[m>>2]=0,c[(c[l>>2]|0)+144>>2]=0,g=(c[l>>2]|0)+128|0,h=g,e=Ax(c[h>>2]|0,c[h+4>>2]|0,1,0)|0,h=C,d=g,c[d>>2]=e,c[d+4>>2]=h,!((e|0)!=0|(h|0)!=0)):0){h=(c[l>>2]|0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0){us((c[f>>2]|0)+68+(c[(c[f>>2]|0)+88>>2]|0)|0,c[g>>2]|0,c[h>>2]|0);g=(c[f>>2]|0)+88|0;c[g>>2]=(c[g>>2]|0)+(c[h>>2]|0)}if(!(c[k>>2]|0)){i=e;return}If(c[k>>2]|0);Jf();i=e;return}function ts(a){a=a|0;var b=0,d=0,e=0;b=i;i=i+16|0;d=b+4|0;e=b;c[d>>2]=a;c[e>>2]=c[d>>2];c[e>>2]=(c[e>>2]|0)+3;c[e>>2]=(c[e>>2]|0)+(0-(c[e>>2]&3));i=b;return c[e>>2]|0}function us(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0;f=i;i=i+32|0;g=f+28|0;h=f+24|0;j=f+20|0;k=f+16|0;l=f+12|0;m=f+8|0;n=f+4|0;c[g>>2]=b;c[h>>2]=d;c[j>>2]=e;c[k>>2]=c[g>>2];c[l>>2]=c[h>>2];c[f>>2]=3;if(!((c[k>>2]|c[l>>2])&3)){c[m>>2]=c[k>>2];c[n>>2]=c[l>>2];while(1){if((c[j>>2]|0)>>>0<4)break;h=c[n>>2]|0;c[n>>2]=h+4;g=c[h>>2]|0;h=c[m>>2]|0;c[m>>2]=h+4;c[h>>2]=g;c[j>>2]=(c[j>>2]|0)-4}c[k>>2]=c[m>>2];c[l>>2]=c[n>>2]}while(1){if(!(c[j>>2]|0))break;n=c[l>>2]|0;c[l>>2]=n+1;m=a[n>>0]|0;n=c[k>>2]|0;c[k>>2]=n+1;a[n>>0]=m;c[j>>2]=(c[j>>2]|0)+-1}i=f;return}function vs(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;d=i;i=i+16|0;e=d+12|0;f=d+8|0;g=d+4|0;h=d;c[e>>2]=a;c[f>>2]=b;c[g>>2]=ts(c[e>>2]|0)|0;c[h>>2]=Cb[c[(c[(c[e>>2]|0)+84>>2]|0)+12>>2]&7](c[g>>2]|0,(c[e>>2]|0)+68|0,c[(c[e>>2]|0)+88>>2]|0,c[f>>2]|0)|0;If(c[h>>2]|0);Jf();i=d;return}function ws(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;g=i;i=i+80|0;h=g+8|0;j=g+40|0;k=g+36|0;l=g+32|0;m=g+28|0;n=g+48|0;o=g+20|0;p=g+16|0;q=g+44|0;r=g;s=g+12|0;c[k>>2]=b;c[l>>2]=e;c[m>>2]=f;c[g+24>>2]=Vg()|0;if((c[17721]|0)==0?(c[17721]=1,c[17722]=xs()|0,(c[17722]|0)!=0):0){c[h>>2]=c[17722];Af(50408,h)}if((c[m>>2]|0)!=32){c[j>>2]=44;t=c[j>>2]|0;i=g;return t|0}if(c[17722]|0){c[j>>2]=50;t=c[j>>2]|0;i=g;return t|0}c[(c[k>>2]|0)+84>>2]=12940;us(n,c[l>>2]|0,32);Es(c[k>>2]|0,n);c[o>>2]=n;c[p>>2]=32;a[q>>0]=0;n=r;c[n>>2]=d[q>>0];c[n+4>>2]=0;while(1){if(!((c[o>>2]&7|0)!=0?(c[p>>2]|0)!=0:0))break;a[c[o>>2]>>0]=a[q>>0]|0;c[o>>2]=(c[o>>2]|0)+1;c[p>>2]=(c[p>>2]|0)+-1}if((c[p>>2]|0)>>>0>=8){n=r;k=Mx(c[n>>2]|0,c[n+4>>2]|0,16843009,16843009)|0;n=r;c[n>>2]=k;c[n+4>>2]=C;do{c[s>>2]=c[o>>2];n=r;k=c[n+4>>2]|0;l=c[s>>2]|0;c[l>>2]=c[n>>2];c[l+4>>2]=k;c[p>>2]=(c[p>>2]|0)-8;c[o>>2]=(c[o>>2]|0)+8}while((c[p>>2]|0)>>>0>=8)}while(1){if(!(c[p>>2]|0))break;a[c[o>>2]>>0]=a[q>>0]|0;c[o>>2]=(c[o>>2]|0)+1;c[p>>2]=(c[p>>2]|0)+-1}c[j>>2]=0;t=c[j>>2]|0;i=g;return t|0}function xs(){var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0;b=i;i=i+512|0;d=b+192|0;e=b+100|0;f=b+8|0;g=b+472|0;h=b+216|0;j=b+200|0;k=b+4|0;l=b;m=e;n=m+92|0;do{c[m>>2]=0;m=m+4|0}while((m|0)<(n|0));m=f;n=m+92|0;do{c[m>>2]=0;m=m+4|0}while((m|0)<(n|0));m=j;n=m+16|0;do{a[m>>0]=0;m=m+1|0}while((m|0)<(n|0));ys(j,50021,131,50152);if(mw(50184,j,16)|0){c[d>>2]=50200;o=c[d>>2]|0;i=b;return o|0}m=j;n=m+16|0;do{a[m>>0]=0;m=m+1|0}while((m|0)<(n|0));ws(e,50152,32)|0;ss(e,50021,32);ss(e,50053,64);ss(e,50117,16);ss(e,50133,8);ss(e,50141,4);ss(e,50145,2);ss(e,50147,1);ss(e,50148,1);ss(e,50149,1);ss(e,50150,1);ss(e,50151,1);vs(e,j);if(mw(50184,j,16)|0){c[d>>2]=50224;o=c[d>>2]|0;i=b;return o|0}m=j;n=m+16|0;do{a[m>>0]=0;m=m+1|0}while((m|0)<(n|0));ys(j,50248,16,50264);if(mw(50296,j,16)|0){c[d>>2]=50312;o=c[d>>2]|0;i=b;return o|0}ws(f,50336,32)|0;c[k>>2]=0;while(1){if((c[k>>2]|0)>>>0>=256)break;c[l>>2]=0;while(1){if((c[l>>2]|0)>>>0>=32)break;a[g+(c[l>>2]|0)>>0]=c[k>>2];c[l>>2]=(c[l>>2]|0)+1}c[l>>2]=0;while(1){if((c[l>>2]|0)>>>0>=(c[k>>2]|0)>>>0)break;a[h+(c[l>>2]|0)>>0]=c[k>>2];c[l>>2]=(c[l>>2]|0)+1}ys(j,h,c[k>>2]|0,g);ss(f,j,16);c[k>>2]=(c[k>>2]|0)+1}vs(f,j);if(mw(50368,j,16)|0){c[d>>2]=50384;o=c[d>>2]|0;i=b;return o|0}else{c[d>>2]=0;o=c[d>>2]|0;i=b;return o|0}return 0}function ys(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;h=i;i=i+144|0;j=h+124|0;k=h+120|0;l=h+116|0;m=h+112|0;n=h+20|0;o=h+16|0;p=h+12|0;q=h+128|0;r=h;s=h+8|0;c[j>>2]=b;c[k>>2]=e;c[l>>2]=f;c[m>>2]=g;g=n;f=g+92|0;do{c[g>>2]=0;g=g+4|0}while((g|0)<(f|0));ws(n,c[m>>2]|0,32)|0;ss(n,c[k>>2]|0,c[l>>2]|0);vs(n,c[j>>2]|0);c[o>>2]=n;c[p>>2]=92;a[q>>0]=0;n=r;c[n>>2]=d[q>>0];c[n+4>>2]=0;while(1){if(!((c[o>>2]&7|0)!=0?(c[p>>2]|0)!=0:0))break;a[c[o>>2]>>0]=a[q>>0]|0;c[o>>2]=(c[o>>2]|0)+1;c[p>>2]=(c[p>>2]|0)+-1}if((c[p>>2]|0)>>>0>=8){n=r;j=Mx(c[n>>2]|0,c[n+4>>2]|0,16843009,16843009)|0;n=r;c[n>>2]=j;c[n+4>>2]=C;do{c[s>>2]=c[o>>2];n=r;j=c[n+4>>2]|0;l=c[s>>2]|0;c[l>>2]=c[n>>2];c[l+4>>2]=j;c[p>>2]=(c[p>>2]|0)-8;c[o>>2]=(c[o>>2]|0)+8}while((c[p>>2]|0)>>>0>=8)}while(1){if(!(c[p>>2]|0))break;a[c[o>>2]>>0]=a[q>>0]|0;c[o>>2]=(c[o>>2]|0)+1;c[p>>2]=(c[p>>2]|0)+-1}i=h;return}function zs(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=i;i=i+16|0;f=e+8|0;g=e+4|0;h=e;c[f>>2]=b;c[g>>2]=d;c[h>>2]=c[f>>2];f=(As(c[g>>2]|0)|0)&67108863;c[c[h>>2]>>2]=f;f=(As((c[g>>2]|0)+3|0)|0)>>>2&67108611;c[(c[h>>2]|0)+4>>2]=f;f=(As((c[g>>2]|0)+6|0)|0)>>>4&67092735;c[(c[h>>2]|0)+8>>2]=f;f=(As((c[g>>2]|0)+9|0)|0)>>>6&66076671;c[(c[h>>2]|0)+12>>2]=f;f=(As((c[g>>2]|0)+12|0)|0)>>>8&1048575;c[(c[h>>2]|0)+16>>2]=f;c[(c[h>>2]|0)+20>>2]=0;c[(c[h>>2]|0)+20+4>>2]=0;c[(c[h>>2]|0)+20+8>>2]=0;c[(c[h>>2]|0)+20+12>>2]=0;c[(c[h>>2]|0)+20+16>>2]=0;f=As((c[g>>2]|0)+16|0)|0;c[(c[h>>2]|0)+40>>2]=f;f=As((c[g>>2]|0)+20|0)|0;c[(c[h>>2]|0)+40+4>>2]=f;f=As((c[g>>2]|0)+24|0)|0;c[(c[h>>2]|0)+40+8>>2]=f;f=As((c[g>>2]|0)+28|0)|0;c[(c[h>>2]|0)+40+12>>2]=f;a[(c[h>>2]|0)+56>>0]=0;i=e;return}function As(a){a=a|0;var b=0,e=0,f=0;b=i;i=i+16|0;e=b+4|0;f=b;c[e>>2]=a;c[f>>2]=c[e>>2];i=b;return (d[(c[f>>2]|0)+3>>0]|0)<<24|(d[(c[f>>2]|0)+2>>0]|0)<<16|(d[(c[f>>2]|0)+1>>0]|0)<<8|(d[c[f>>2]>>0]|0)|0}function Bs(a,b,e){a=a|0;b=b|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,D=0,E=0,F=0,G=0;f=i;i=i+128|0;g=f+116|0;h=f+112|0;j=f+108|0;k=f+104|0;l=f+100|0;m=f+96|0;n=f+92|0;o=f+88|0;p=f+84|0;q=f+80|0;r=f+76|0;s=f+72|0;t=f+68|0;u=f+64|0;v=f+60|0;w=f+56|0;x=f+52|0;y=f+48|0;z=f+44|0;A=f+32|0;B=f+24|0;D=f+16|0;E=f+8|0;F=f;G=f+40|0;c[g>>2]=a;c[h>>2]=b;c[j>>2]=e;c[k>>2]=c[g>>2];c[l>>2]=(d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2]|0)+1>>0]=(c[g>>2]|0)>>>8;a[c[h>>2]>>0]=c[g>>2];i=e;return}function Es(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;d=i;i=i+16|0;e=d+8|0;f=d+4|0;g=d;c[e>>2]=a;c[f>>2]=b;c[g>>2]=ts(c[e>>2]|0)|0;c[(c[e>>2]|0)+88>>2]=0;yb[c[(c[(c[e>>2]|0)+84>>2]|0)+4>>2]&7](c[g>>2]|0,c[f>>2]|0);i=d;return}function Fs(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;if(c[d>>2]|0){Hs();i=b;return}else{Gs();i=b;return}}function Gs(){if(c[17723]|0)return;c[17723]=1;return}function Hs(){var a=0,b=0;Gs();Is();if(c[17725]|0){Os();return}if(c[17726]|0)a=hg(1,664)|0;else a=gg(1,664)|0;c[17725]=a;if(c[17726]|0)b=hg(1,664)|0;else b=gg(1,664)|0;c[17727]=b;c[17728]=Js()|0;if(!(c[17728]|0)){c[17729]=1;c[17728]=3}c[17746]=Ns()|0;Os();return}function Is(){var a=0,b=0,d=0;a=i;i=i+16|0;b=a;d=a+4|0;c[d>>2]=lu(12956)|0;if(c[d>>2]|0){c[b>>2]=fu(c[d>>2]|0)|0;Bf(50439,b)}else{c[17724]=1;i=a;return}}function Js(){var a=0,b=0,d=0;a=i;i=i+16|0;b=a;d=a+4|0;if((Ew(52821,4)|0)==0?(Ew(52923,4)|0)==0:0){c[d>>2]=4;i=a;return c[d>>2]|0}Bf(pf(50476)|0,b);return 0}function Ks(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0;g=i;i=i+32|0;h=g+24|0;j=g+20|0;k=g+12|0;l=g+8|0;m=g+4|0;c[g+28>>2]=b;c[h>>2]=d;c[j>>2]=e;c[g+16>>2]=f;if(!(c[17730]|0)){yf(pf(50514)|0,g);c[17730]=1;f=jb(0)|0;bx(_(f,Dw()|0)|0)}f=dg(c[j>>2]|0)|0;c[l>>2]=f;c[m>>2]=f;c[k>>2]=c[j>>2];while(1){f=c[k>>2]|0;c[k>>2]=f+-1;if(!f)break;f=1+~~(+(cx()|0)*256.0/2147483648.0)-1&255;e=c[m>>2]|0;c[m>>2]=e+1;a[e>>0]=f}Ls(c[l>>2]|0,c[j>>2]|0,c[h>>2]|0);$f(c[l>>2]|0);i=g;return 0}function Ls(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0;g=i;i=i+32|0;h=g+16|0;j=g+12|0;k=g+8|0;l=g+4|0;m=g;c[h>>2]=b;c[j>>2]=e;c[k>>2]=f;c[l>>2]=c[h>>2];c[m>>2]=0;if(!(c[17724]|0))xf(50565,50580,1074,50596);c[17739]=(c[17739]|0)+(c[j>>2]|0);c[17740]=(c[17740]|0)+1;while(1){h=c[j>>2]|0;c[j>>2]=h+-1;if(!h)break;h=c[l>>2]|0;c[l>>2]=h+1;f=d[h>>0]|0;h=c[17741]|0;c[17741]=h+1;e=(c[17725]|0)+h|0;a[e>>0]=(d[e>>0]|0)^f;c[m>>2]=(c[m>>2]|0)+1;if((c[17741]|0)>>>0<600)continue;if(!((c[k>>2]|0)>>>0<3|(c[17742]|0)!=0)?(c[17743]=(c[17743]|0)+(c[m>>2]|0),c[m>>2]=0,(c[17743]|0)>>>0>=600):0)c[17742]=1;c[17741]=0;Ms(c[17725]|0);c[17731]=(c[17731]|0)+1;c[17745]=((c[j>>2]|0)!=0^1)&1}i=g;return}function Ms(b){b=b|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;e=i;i=i+224|0;f=e+208|0;g=e+204|0;h=e+200|0;j=e+196|0;k=e+192|0;l=e+188|0;m=e;n=e+184|0;c[f>>2]=b;c[g>>2]=(c[f>>2]|0)+600;if(!(c[17724]|0))xf(50565,50580,615,50611);Fl(m);c[j>>2]=(c[f>>2]|0)+600;b=c[g>>2]|0;o=(c[j>>2]|0)+-20|0;p=b+20|0;do{a[b>>0]=a[o>>0]|0;b=b+1|0;o=o+1|0}while((b|0)<(p|0));b=(c[g>>2]|0)+20|0;o=c[f>>2]|0;p=b+44|0;do{a[b>>0]=a[o>>0]|0;b=b+1|0;o=o+1|0}while((b|0)<(p|0));Gl(m,c[g>>2]|0);b=c[f>>2]|0;o=c[g>>2]|0;p=b+20|0;do{a[b>>0]=a[o>>0]|0;b=b+1|0;o=o+1|0}while((b|0)<(p|0));a:do if((c[17744]|0)!=0?(c[f>>2]|0)==(c[17725]|0):0){c[k>>2]=0;while(1){if((c[k>>2]|0)>=20)break a;q=(c[f>>2]|0)+(c[k>>2]|0)|0;a[q>>0]=(d[q>>0]|0)^(d[76506+(c[k>>2]|0)>>0]|0);c[k>>2]=(c[k>>2]|0)+1}}while(0);c[h>>2]=c[f>>2];c[l>>2]=1;while(1){if((c[l>>2]|0)>=30)break;b=c[g>>2]|0;o=c[h>>2]|0;p=b+20|0;do{a[b>>0]=a[o>>0]|0;b=b+1|0;o=o+1|0}while((b|0)<(p|0));c[h>>2]=(c[h>>2]|0)+20;b:do if(((c[h>>2]|0)+20+64|0)>>>0<(c[j>>2]|0)>>>0){b=(c[g>>2]|0)+20|0;o=(c[h>>2]|0)+20|0;p=b+44|0;do{a[b>>0]=a[o>>0]|0;b=b+1|0;o=o+1|0}while((b|0)<(p|0))}else{c[n>>2]=(c[h>>2]|0)+20;c[k>>2]=20;while(1){if((c[k>>2]|0)>=64)break b;if((c[n>>2]|0)>>>0>=(c[j>>2]|0)>>>0)c[n>>2]=c[f>>2];q=c[n>>2]|0;c[n>>2]=q+1;a[(c[g>>2]|0)+(c[k>>2]|0)>>0]=a[q>>0]|0;c[k>>2]=(c[k>>2]|0)+1}}while(0);Gl(m,c[g>>2]|0);b=c[h>>2]|0;o=c[g>>2]|0;p=b+20|0;do{a[b>>0]=a[o>>0]|0;b=b+1|0;o=o+1|0}while((b|0)<(p|0));c[l>>2]=(c[l>>2]|0)+1}if((c[f>>2]|0)!=(c[17725]|0)){If(384);Jf();i=e;return}Hl(76506,c[f>>2]|0,600);c[17744]=1;If(384);Jf();i=e;return}function Ns(){return 0}function Os(){var a=0,b=0,d=0;a=i;i=i+16|0;b=a;d=a+4|0;c[17724]=0;c[d>>2]=mu(12956)|0;if(c[d>>2]|0){c[b>>2]=fu(c[d>>2]|0)|0;Bf(50620,b)}else{i=a;return}}function Ps(){Is();Tt(0,0,0,0)|0;c[17742]=0;Os();return}function Qs(){var a=0,b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0;a=i;i=i+48|0;b=a;d=c[17731]|0;e=c[17733]|0;f=c[17734]|0;g=c[17740]|0;h=c[17739]|0;j=c[17732]|0;k=c[17736]|0;l=c[17735]|0;m=c[17738]|0;n=c[17737]|0;o=(Qt()|0)!=0;c[b>>2]=600;c[b+4>>2]=d;c[b+8>>2]=e;c[b+12>>2]=f;c[b+16>>2]=g;c[b+20>>2]=h;c[b+24>>2]=j;c[b+28>>2]=k;c[b+32>>2]=l;c[b+36>>2]=m;c[b+40>>2]=n;c[b+44>>2]=o?50657:76527;yf(50673,b);i=a;return}function Rs(){c[17726]=1;return}function Ss(){c[17747]=1;return}function Ts(a){a=a|0;var b=0;b=i;i=i+16|0;c[b>>2]=a;i=b;return}function Us(a){a=a|0;var b=0;b=i;i=i+16|0;c[b>>2]=a;i=b;return 0}function Vs(){Hs();return ((c[17729]|0)!=0?1:(c[17747]|0)!=0)&1|0}function Ws(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0;e=i;i=i+32|0;f=e+16|0;g=e+12|0;h=e+8|0;j=e+4|0;k=e;c[f>>2]=a;c[g>>2]=b;c[h>>2]=d;Hs();if((c[17747]|0)!=0&(c[h>>2]|0)>>>0>1)c[h>>2]=1;c[h>>2]=c[h>>2]&3;Is();d=c[g>>2]|0;if((c[h>>2]|0)>>>0>=2){c[17737]=(c[17737]|0)+d;c[17738]=(c[17738]|0)+1}else{c[17735]=(c[17735]|0)+d;c[17736]=(c[17736]|0)+1}c[j>>2]=c[f>>2];while(1){if((c[g>>2]|0)>>>0<=0)break;c[k>>2]=(c[g>>2]|0)>>>0>600?600:c[g>>2]|0;Xs(c[j>>2]|0,c[k>>2]|0,c[h>>2]|0);c[g>>2]=(c[g>>2]|0)-(c[k>>2]|0);c[j>>2]=(c[j>>2]|0)+(c[k>>2]|0)}Os();i=e;return}function Xs(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;f=i;i=i+64|0;g=f;h=f+48|0;j=f+44|0;k=f+40|0;l=f+36|0;m=f+32|0;n=f+28|0;o=f+24|0;p=f+20|0;q=f+16|0;r=f+12|0;s=f+8|0;t=f+4|0;c[h>>2]=b;c[j>>2]=d;c[k>>2]=e;if(!(c[17724]|0))xf(50565,50580,934,50797);while(1){c[o>>2]=Dw()|0;if((c[3250]|0)==-1)c[3250]=c[o>>2];if((c[3250]|0)!=(c[o>>2]|0)){c[3250]=c[o>>2];c[p>>2]=c[3250];Ls(p,4,0);c[17745]=0}if(!(c[17724]|0)){u=8;break}if((c[j>>2]|0)>>>0>600){u=10;break}if((c[17742]|0)==0?(Ys()|0)!=0:0)c[17742]=1;if(!((c[k>>2]|0)!=2|(c[17750]|0)!=0)){c[17751]=0;c[q>>2]=(c[j>>2]|0)-(c[17751]|0);if((c[q>>2]|0)>>>0>=16){if((c[q>>2]|0)>>>0>600){u=18;break}}else c[q>>2]=16;_s(4,c[q>>2]|0,2);c[17751]=(c[17751]|0)+(c[q>>2]|0);c[17750]=1}if((c[k>>2]|0)==2?(c[17751]|0)>>>0<(c[j>>2]|0)>>>0:0){if((c[17751]|0)<0)c[17751]=0;c[r>>2]=(c[j>>2]|0)-(c[17751]|0);if((c[r>>2]|0)>>>0>600){u=25;break}_s(4,c[r>>2]|0,2);c[17751]=(c[17751]|0)+(c[r>>2]|0)}while(1){if(!((c[17742]|0)!=0^1))break;$s()}at();c[s>>2]=c[3250];Ls(s,4,0);if(!(c[17745]|0)){Ms(c[17725]|0);c[17731]=(c[17731]|0)+1}c[l>>2]=0;c[n>>2]=c[17727];c[m>>2]=c[17725];while(1){if((c[l>>2]|0)>=150)break;c[c[n>>2]>>2]=(c[c[m>>2]>>2]|0)+-1515870811;c[l>>2]=(c[l>>2]|0)+1;c[n>>2]=(c[n>>2]|0)+4;c[m>>2]=(c[m>>2]|0)+4}Ms(c[17725]|0);c[17731]=(c[17731]|0)+1;Ms(c[17727]|0);c[17732]=(c[17732]|0)+1;while(1){e=c[j>>2]|0;c[j>>2]=e+-1;if(!e)break;e=c[17752]|0;c[17752]=e+1;d=a[(c[17727]|0)+e>>0]|0;e=c[h>>2]|0;c[h>>2]=e+1;a[e>>0]=d;if((c[17752]|0)>>>0>=600)c[17752]=0;c[17751]=(c[17751]|0)+-1}if((c[17751]|0)<0)c[17751]=0;Fx(c[17727]|0,0,600)|0;d=Dw()|0;if((d|0)==(c[o>>2]|0)){u=43;break}c[t>>2]=Dw()|0;Ls(t,4,0);c[17745]=0;c[3250]=c[t>>2]}if((u|0)==8)xf(50565,50580,953,50797);else if((u|0)==10)Cf(50807,g);else if((u|0)==18)wf(50580,979,50797);else if((u|0)==25)wf(50580,995,50797);else if((u|0)==43){i=f;return}}function Ys(){var a=0,b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;a=i;i=i+768|0;b=a+48|0;d=a+40|0;e=a+32|0;f=a+24|0;g=a+16|0;h=a+8|0;j=a+152|0;k=a+148|0;l=a+72|0;m=a+160|0;n=a+68|0;o=a+64|0;p=a+60|0;q=a+56|0;if(!(c[17724]|0))xf(50565,50580,743,50839);if(!(c[17748]|0)){c[j>>2]=0;r=c[j>>2]|0;i=a;return r|0}c[k>>2]=Mw(c[17748]|0,0,a)|0;if((c[k>>2]|0)==-1?(c[(Yu()|0)>>2]|0)==2:0){c[17749]=1;c[j>>2]=0;r=c[j>>2]|0;i=a;return r|0}if((c[k>>2]|0)==-1){s=pf(50854)|0;t=c[17748]|0;u=ov(c[(Yu()|0)>>2]|0)|0;c[h>>2]=t;c[h+4>>2]=u;yf(s,h);c[j>>2]=0;r=c[j>>2]|0;i=a;return r|0}h=(Zs(c[k>>2]|0,c[17748]|0,0)|0)!=0;s=c[k>>2]|0;if(h){lw(s)|0;c[j>>2]=0;r=c[j>>2]|0;i=a;return r|0}if(Iw(s,l)|0){s=pf(50925)|0;h=c[17748]|0;u=ov(c[(Yu()|0)>>2]|0)|0;c[g>>2]=h;c[g+4>>2]=u;yf(s,g);lw(c[k>>2]|0)|0;c[j>>2]=0;r=c[j>>2]|0;i=a;return r|0}if((c[l+12>>2]&61440|0)!=32768){g=pf(50946)|0;c[f>>2]=c[17748];yf(g,f);lw(c[k>>2]|0)|0;c[j>>2]=0;r=c[j>>2]|0;i=a;return r|0}if(!(c[l+36>>2]|0)){yf(pf(50984)|0,e);lw(c[k>>2]|0)|0;c[17749]=1;c[j>>2]=0;r=c[j>>2]|0;i=a;return r|0}if((c[l+36>>2]|0)!=600){yf(pf(51017)|0,d);lw(c[k>>2]|0)|0;c[j>>2]=0;r=c[j>>2]|0;i=a;return r|0}do{c[n>>2]=Lw(c[k>>2]|0,m,600)|0;if((c[n>>2]|0)!=-1)break}while((c[(Yu()|0)>>2]|0)==4);if((c[n>>2]|0)!=600){n=pf(51071)|0;d=c[17748]|0;l=ov(c[(Yu()|0)>>2]|0)|0;c[b>>2]=d;c[b+4>>2]=l;Bf(n,b)}lw(c[k>>2]|0)|0;Ls(m,600,0);c[o>>2]=Dw()|0;Ls(o,4,0);c[p>>2]=jb(0)|0;Ls(p,4,0);c[q>>2]=Na()|0;Ls(q,4,0);_s(0,16,0);c[17749]=1;c[j>>2]=1;r=c[j>>2]|0;i=a;return r|0}function Zs(a,d,e){a=a|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;f=i;i=i+64|0;g=f+16|0;h=f+8|0;j=f;k=f+60|0;l=f+56|0;m=f+52|0;n=f+48|0;o=f+32|0;p=f+24|0;q=f+20|0;c[l>>2]=a;c[m>>2]=d;c[n>>2]=e;c[q>>2]=0;c[o>>2]=0;c[o+4>>2]=0;c[o+8>>2]=0;c[o+12>>2]=0;b[o>>1]=(c[n>>2]|0)!=0?1:0;b[o+2>>1]=0;while(1){n=c[l>>2]|0;c[j>>2]=o;if((kw(n,13,j)|0)!=-1){r=10;break}if((c[(Yu()|0)>>2]|0)!=11?(c[(Yu()|0)>>2]|0)!=13:0){r=5;break}if((c[q>>2]|0)>2){n=pf(50896)|0;c[g>>2]=c[m>>2];yf(n,g)}c[p>>2]=c[q>>2];c[p+4>>2]=25e4;Jw(0,0,0,0,p)|0;if((c[q>>2]|0)>=10)continue;c[q>>2]=(c[q>>2]|0)+1}if((r|0)==5){q=pf(50875)|0;p=c[m>>2]|0;m=ov(c[(Yu()|0)>>2]|0)|0;c[h>>2]=p;c[h+4>>2]=m;yf(q,h);c[k>>2]=-1;s=c[k>>2]|0;i=f;return s|0}else if((r|0)==10){c[k>>2]=0;s=c[k>>2]|0;i=f;return s|0}return 0}function _s(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=i;i=i+32|0;f=e+20|0;g=e+16|0;h=e+12|0;c[f>>2]=a;c[g>>2]=b;c[h>>2]=d;if(!(c[17728]|0))Bf(51092,e);if((Cb[c[17728]&7](3,c[f>>2]|0,c[g>>2]|0,c[h>>2]|0)|0)<0)Bf(51143,e+8|0);else{i=e;return}}function $s(){c[17733]=(c[17733]|0)+1;_s(3,120,1);return}function at(){var a=0,b=0,d=0,e=0,f=0;a=i;i=i+160|0;b=a+144|0;d=a+8|0;e=a+4|0;f=a;if(!(c[17724]|0))xf(50565,50580,1180,51181);c[17734]=(c[17734]|0)+1;if(c[17746]|0)yb[c[17746]&7](3,2);if(lb(b|0,0)|0)wf(50580,1198,51181);else{Ls(b,4,2);Ls(b+4|0,4,2);hx(0,d)|0;Ls(d,136,2);Fx(d|0,0,136)|0;c[e>>2]=jb(0)|0;Ls(e,4,2);c[f>>2]=Na()|0;Ls(f,4,2);Rt(3,2);i=a;return}}function bt(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;if(c[17748]|0)wf(50580,673,51201);else{c[17748]=ig(c[d>>2]|0)|0;i=b;return}}function ct(){var a=0,b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0;a=i;i=i+64|0;b=a+40|0;d=a+32|0;e=a+24|0;f=a+16|0;g=a+8|0;h=a+60|0;j=a+56|0;k=a+52|0;l=a+48|0;Gs();Is();if(!((c[17748]|0)!=0&(c[17725]|0)!=0&(c[17742]|0)!=0)){Os();i=a;return}if(!(c[17749]|0)){Os();yf(pf(51231)|0,a);i=a;return}c[l>>2]=0;c[j>>2]=c[17727];c[h>>2]=c[17725];while(1){if((c[l>>2]|0)>=150)break;c[c[j>>2]>>2]=(c[c[h>>2]>>2]|0)+-1515870811;c[l>>2]=(c[l>>2]|0)+1;c[j>>2]=(c[j>>2]|0)+4;c[h>>2]=(c[h>>2]|0)+4}Ms(c[17725]|0);c[17731]=(c[17731]|0)+1;Ms(c[17727]|0);c[17732]=(c[17732]|0)+1;h=c[17748]|0;c[g>>2]=384;c[k>>2]=Mw(h,65,g)|0;do if((c[k>>2]|0)!=-1){g=(Zs(c[k>>2]|0,c[17748]|0,1)|0)!=0;h=c[k>>2]|0;if(g){lw(h)|0;break}if(Ww(h,0)|0){h=pf(51290)|0;g=c[17748]|0;j=ov(c[(Yu()|0)>>2]|0)|0;c[e>>2]=g;c[e+4>>2]=j;yf(h,e);lw(c[k>>2]|0)|0;break}do{c[l>>2]=Kw(c[k>>2]|0,c[17727]|0,600)|0;if((c[l>>2]|0)!=-1)break}while((c[(Yu()|0)>>2]|0)==4);if((c[l>>2]|0)!=600){h=pf(51290)|0;j=c[17748]|0;g=ov(c[(Yu()|0)>>2]|0)|0;c[d>>2]=j;c[d+4>>2]=g;yf(h,d)}if(lw(c[k>>2]|0)|0){h=pf(51312)|0;g=c[17748]|0;j=ov(c[(Yu()|0)>>2]|0)|0;c[b>>2]=g;c[b+4>>2]=j;yf(h,b)}}else{h=pf(51267)|0;j=c[17748]|0;g=ov(c[(Yu()|0)>>2]|0)|0;c[f>>2]=j;c[f+4>>2]=g;yf(h,f)}while(0);Os();i=a;return}function dt(){Gs();Is();if(!(c[17725]|0)){Os();return}at();Os();return}function et(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;ft();if(!(c[d>>2]|0)){i=b;return}gt();do if(c[17755]|0){if(c[(c[17756]|0)+52>>2]|0)xf(51370,51398,767,51412);if(c[(c[17757]|0)+52>>2]|0)xf(51437,51398,768,51412);if(c[(c[17758]|0)+52>>2]|0)xf(51467,51398,769,51412);else{it(c[17756]|0);it(c[17757]|0);it(c[17758]|0);break}}else{c[17755]=fg(48)|0;c[17756]=gg(1,68)|0;ht(c[17756]|0);c[17757]=hg(1,68)|0;ht(c[17757]|0);c[17758]=hg(1,68)|0;ht(c[17758]|0)}while(0);jt();i=b;return}function ft(){if(c[17753]|0)return;c[17753]=1;c[17754]=0;return}function gt(){var a=0,b=0,d=0;a=i;i=i+16|0;b=a;d=a+4|0;c[d>>2]=lu(13004)|0;if(c[d>>2]|0){c[b>>2]=fu(c[d>>2]|0)|0;Bf(51334,b)}else{c[17754]=1;i=a;return}}function ht(b){b=b|0;var d=0,e=0;d=i;i=i+16|0;e=d;c[e>>2]=b;a[c[e>>2]>>0]=17;a[(c[e>>2]|0)+16>>0]=42;a[(c[e>>2]|0)+33>>0]=-119;a[(c[e>>2]|0)+50>>0]=-4;i=d;return}function it(a){a=a|0;var b=0,e=0,f=0;b=i;i=i+16|0;e=b;f=b+4|0;c[f>>2]=a;if((((d[c[f>>2]>>0]|0|0)==17?(d[(c[f>>2]|0)+16>>0]|0|0)==42:0)?(d[(c[f>>2]|0)+33>>0]|0|0)==137:0)?(d[(c[f>>2]|0)+50>>0]|0|0)==252:0){i=b;return}c[e>>2]=c[f>>2];Bf(51500,e)}function jt(){var a=0,b=0,d=0;a=i;i=i+16|0;b=a;d=a+4|0;c[17754]=0;c[d>>2]=mu(13004)|0;if(c[d>>2]|0){c[b>>2]=fu(c[d>>2]|0)|0;Bf(51546,b)}else{i=a;return}}function kt(){gt();Tt(0,0,0,0)|0;jt();return}function lt(){return}function mt(){return 0}function nt(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=i;i=i+16|0;f=e+8|0;g=e+4|0;h=e;c[f>>2]=a;c[g>>2]=b;c[h>>2]=d;et(1);gt();d=c[f>>2]|0;f=c[g>>2]|0;if((c[h>>2]|0)==2){ot(d,f,c[17758]|0);jt();i=e;return}else{ot(d,f,c[17757]|0);jt();i=e;return}}function ot(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0;f=i;i=i+16|0;g=f;h=f+12|0;j=f+8|0;k=f+4|0;c[h>>2]=b;c[j>>2]=d;c[k>>2]=e;if(!(c[h>>2]|0))xf(52697,51398,685,52720);if(!(c[k>>2]|0))xf(51582,51398,686,52720);it(c[k>>2]|0);do if(!(c[(c[k>>2]|0)+4>>2]|0)){if((c[k>>2]|0)==(c[17756]|0)){e=pt(1)|0;c[(c[k>>2]|0)+4>>2]=e}else{e=pt(0)|0;c[(c[k>>2]|0)+4>>2]=e}if(c[(c[k>>2]|0)+4>>2]|0){e=Dw()|0;c[(c[k>>2]|0)+60>>2]=e;break}else Bf(52115,g)}while(0);if(!((a[(c[k>>2]|0)+8>>0]<<7&255)<<24>>24>>7<<24>>24))tt(c[k>>2]|0);e=c[(c[k>>2]|0)+60>>2]|0;if((e|0)==(Dw()|0)?(e=c[(c[k>>2]|0)+64>>2]|0,(e|0)==(Dw()|0)):0)if(vt(c[h>>2]|0,c[j>>2]|0,c[k>>2]|0)|0)Bf(52115,g);else{it(c[k>>2]|0);i=f;return}Jh(51398,714,52720,0,51852);Bf(52115,g)}function pt(b){b=b|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;e=i;i=i+64|0;f=e+16|0;g=e+8|0;h=e+48|0;j=e+44|0;k=e+40|0;l=e+36|0;m=e+32|0;n=e+28|0;o=e+24|0;p=e+52|0;q=e;r=e+20|0;c[j>>2]=b;if(!(c[17754]|0))xf(51590,51398,596,51609);c[l>>2]=ai(k,7,1,1)|0;if(c[l>>2]|0){c[g>>2]=qt(c[l>>2]|0)|0;Af(51627,g);c[h>>2]=0;s=c[h>>2]|0;i=e;return s|0}if(c[j>>2]|0){c[m>>2]=dg(16)|0;ot(c[m>>2]|0,16,c[17757]|0)}else c[m>>2]=rt(16)|0;c[l>>2]=ni(c[k>>2]|0,c[m>>2]|0,16)|0;c[n>>2]=c[m>>2];c[o>>2]=16;a[p>>0]=0;j=q;c[j>>2]=d[p>>0];c[j+4>>2]=0;while(1){if(!((c[n>>2]&7|0)!=0?(c[o>>2]|0)!=0:0))break;a[c[n>>2]>>0]=a[p>>0]|0;c[n>>2]=(c[n>>2]|0)+1;c[o>>2]=(c[o>>2]|0)+-1}if((c[o>>2]|0)>>>0>=8){j=q;g=Mx(c[j>>2]|0,c[j+4>>2]|0,16843009,16843009)|0;j=q;c[j>>2]=g;c[j+4>>2]=C;do{c[r>>2]=c[n>>2];j=q;g=c[j+4>>2]|0;b=c[r>>2]|0;c[b>>2]=c[j>>2];c[b+4>>2]=g;c[o>>2]=(c[o>>2]|0)-8;c[n>>2]=(c[n>>2]|0)+8}while((c[o>>2]|0)>>>0>=8)}while(1){if(!(c[o>>2]|0))break;a[c[n>>2]>>0]=a[p>>0]|0;c[n>>2]=(c[n>>2]|0)+1;c[o>>2]=(c[o>>2]|0)+-1}$f(c[m>>2]|0);if(c[l>>2]|0){c[f>>2]=qt(c[l>>2]|0)|0;Af(51776,f);fi(c[k>>2]|0);c[h>>2]=0;s=c[h>>2]|0;i=e;return s|0}else{c[h>>2]=c[k>>2];s=c[h>>2]|0;i=e;return s|0}return 0}function qt(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;a=fu(c[d>>2]|0)|0;i=b;return a|0}function rt(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0;b=i;i=i+16|0;d=b;e=b+12|0;f=b+8|0;g=b+4|0;c[e>>2]=a;if(c[17759]|0)xf(51670,51398,552,51694);c[17759]=fg(c[e>>2]|0)|0;c[17760]=c[e>>2];c[17761]=0;c[g>>2]=Tt(4,0,16,2)|0;if((c[g>>2]|0)<0){h=c[17759]|0;$f(h);c[17759]=0;Bf(51748,d)}if((c[17761]|0)!=(c[17760]|0)){h=c[17759]|0;$f(h);c[17759]=0;Bf(51748,d)}else{c[f>>2]=c[17759];c[17759]=0;i=b;return c[f>>2]|0}return 0}function st(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0;g=i;i=i+16|0;h=g+12|0;j=g+8|0;k=g;c[h>>2]=b;c[j>>2]=e;c[g+4>>2]=f;c[k>>2]=c[h>>2];if(!(c[17754]|0))xf(51590,51398,531,51706);if(!(c[17759]|0))xf(51725,51398,532,51706);while(1){h=c[j>>2]|0;c[j>>2]=h+-1;if(!h){l=8;break}if((c[17761]|0)>>>0>=(c[17760]|0)>>>0){l=8;break}h=c[k>>2]|0;c[k>>2]=h+1;f=d[h>>0]|0;h=c[17761]|0;c[17761]=h+1;e=(c[17759]|0)+h|0;a[e>>0]=(d[e>>0]|0)^f}if((l|0)==8){i=g;return}}function tt(b){b=b|0;var d=0,e=0,f=0;d=i;i=i+16|0;e=d;c[e>>2]=b;if(!(c[17754]|0))xf(51590,51398,658,51808);b=(c[e>>2]|0)+17|0;if((c[e>>2]|0)==(c[17756]|0)){ot(b,16,c[17757]|0);f=(c[e>>2]|0)+8|0;a[f>>0]=a[f>>0]&-2|1;f=Dw()|0;c[(c[e>>2]|0)+64>>2]=f;i=d;return}else{ut(b,16);b=(c[e>>2]|0)+8|0;a[b>>0]=a[b>>0]&-2|1;b=Dw()|0;c[(c[e>>2]|0)+64>>2]=b;i=d;return}}function ut(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0;f=i;i=i+48|0;g=f+28|0;h=f+24|0;j=f+20|0;k=f+16|0;l=f+12|0;m=f+32|0;n=f;o=f+8|0;c[g>>2]=b;c[h>>2]=e;if(!(c[17754]|0))xf(51590,51398,642,51820);if((c[h>>2]|0)!=16)xf(51839,51398,643,51820);c[j>>2]=rt(16)|0;h=c[g>>2]|0;g=c[j>>2]|0;e=h+16|0;do{a[h>>0]=a[g>>0]|0;h=h+1|0;g=g+1|0}while((h|0)<(e|0));c[k>>2]=c[j>>2];c[l>>2]=16;a[m>>0]=0;g=n;c[g>>2]=d[m>>0];c[g+4>>2]=0;while(1){if(!((c[k>>2]&7|0)!=0?(c[l>>2]|0)!=0:0))break;a[c[k>>2]>>0]=a[m>>0]|0;c[k>>2]=(c[k>>2]|0)+1;c[l>>2]=(c[l>>2]|0)+-1}if((c[l>>2]|0)>>>0>=8){g=n;h=Mx(c[g>>2]|0,c[g+4>>2]|0,16843009,16843009)|0;g=n;c[g>>2]=h;c[g+4>>2]=C;do{c[o>>2]=c[k>>2];g=n;h=c[g+4>>2]|0;e=c[o>>2]|0;c[e>>2]=c[g>>2];c[e+4>>2]=h;c[l>>2]=(c[l>>2]|0)-8;c[k>>2]=(c[k>>2]|0)+8}while((c[l>>2]|0)>>>0>=8)}while(1){if(!(c[l>>2]|0))break;a[c[k>>2]>>0]=a[m>>0]|0;c[k>>2]=(c[k>>2]|0)+1;c[l>>2]=(c[l>>2]|0)+-1}$f(c[j>>2]|0);i=f;return}function vt(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0;g=i;i=i+80|0;h=g+48|0;j=g+44|0;k=g+40|0;l=g+36|0;m=g+56|0;n=g+32|0;o=g+28|0;p=g+24|0;q=g+20|0;r=g+16|0;s=g+12|0;t=g+52|0;u=g;v=g+8|0;c[j>>2]=b;c[k>>2]=e;c[l>>2]=f;if(!(c[17754]|0))xf(51590,51398,444,51906);if(!(c[(c[l>>2]|0)+4>>2]|0))xf(51922,51398,445,51906);if(!((a[(c[l>>2]|0)+8>>0]<<7&255)<<24>>24>>7<<24>>24))xf(51941,51398,446,51906);if(!(c[17755]|0))xf(51960,51398,448,51906);c[n>>2]=c[17755];c[o>>2]=(c[17755]|0)+16;c[p>>2]=(c[17755]|0)+32;while(1){if(!(c[k>>2]|0)){w=33;break}if((c[(c[l>>2]|0)+52>>2]|0)==0?(c[(c[l>>2]|0)+12>>2]|0)>>>0>1e3:0){tt(c[l>>2]|0);c[(c[l>>2]|0)+12>>2]=0}c[q>>2]=(c[k>>2]|0)>>>0<16?c[k>>2]|0:16;wt(m,16,c[l>>2]|0);xt(c[p>>2]|0,m,(c[l>>2]|0)+17|0,c[(c[l>>2]|0)+4>>2]|0,c[n>>2]|0,c[o>>2]|0);f=(c[l>>2]|0)+12|0;c[f>>2]=(c[f>>2]|0)+1;if(!(((((d[(c[l>>2]|0)+51>>0]|0|0)!=0?(c[(c[l>>2]|0)+52>>2]|0)!=0:0)?(c[l>>2]|0)!=(c[17756]|0):0)?(c[l>>2]|0)!=(c[17757]|0):0)?(c[l>>2]|0)!=(c[17758]|0):0)){f=(c[l>>2]|0)+34|0;e=c[p>>2]|0;if(!((a[(c[l>>2]|0)+8>>0]<<6&255)<<24>>24>>7<<24>>24)){x=f;y=e;z=x+16|0;do{a[x>>0]=a[y>>0]|0;x=x+1|0;y=y+1|0}while((x|0)<(z|0));b=(c[l>>2]|0)+8|0;a[b>>0]=a[b>>0]&-3|2;continue}if(!(mw(f,e,16)|0)){w=22;break}x=(c[l>>2]|0)+34|0;y=c[p>>2]|0;z=x+16|0;do{a[x>>0]=a[y>>0]|0;x=x+1|0;y=y+1|0}while((x|0)<(z|0))}Dx(c[j>>2]|0,c[p>>2]|0,c[q>>2]|0)|0;c[r>>2]=c[p>>2];c[s>>2]=16;a[t>>0]=0;e=u;c[e>>2]=d[t>>0];c[e+4>>2]=0;while(1){if(!((c[r>>2]&7|0)!=0?(c[s>>2]|0)!=0:0))break;a[c[r>>2]>>0]=a[t>>0]|0;c[r>>2]=(c[r>>2]|0)+1;c[s>>2]=(c[s>>2]|0)+-1}if((c[s>>2]|0)>>>0>=8){e=u;f=Mx(c[e>>2]|0,c[e+4>>2]|0,16843009,16843009)|0;e=u;c[e>>2]=f;c[e+4>>2]=C;do{c[v>>2]=c[r>>2];e=u;f=c[e+4>>2]|0;b=c[v>>2]|0;c[b>>2]=c[e>>2];c[b+4>>2]=f;c[s>>2]=(c[s>>2]|0)-8;c[r>>2]=(c[r>>2]|0)+8}while((c[s>>2]|0)>>>0>=8)}while(1){if(!(c[s>>2]|0))break;a[c[r>>2]>>0]=a[t>>0]|0;c[r>>2]=(c[r>>2]|0)+1;c[s>>2]=(c[s>>2]|0)+-1}c[j>>2]=(c[j>>2]|0)+(c[q>>2]|0);c[k>>2]=(c[k>>2]|0)-(c[q>>2]|0)}if((w|0)==22){Jh(51398,502,51906,0,52075);c[h>>2]=-1;A=c[h>>2]|0;i=g;return A|0}else if((w|0)==33){c[h>>2]=0;A=c[h>>2]|0;i=g;return A|0}return 0}function wt(d,f,g){d=d|0;f=f|0;g=g|0;var h=0,j=0,k=0,l=0,m=0,n=0,o=0;h=i;i=i+32|0;j=h;k=h+28|0;l=h+24|0;m=h+20|0;n=h+16|0;o=h+8|0;c[k>>2]=d;c[l>>2]=f;c[m>>2]=g;if((c[l>>2]|0)!=16)xf(51839,51398,273,51990);if(!(c[17754]|0))xf(51590,51398,274,51990);if((((c[(c[m>>2]|0)+52>>2]|0)!=0?(c[m>>2]|0)!=(c[17756]|0):0)?(c[m>>2]|0)!=(c[17757]|0):0)?(c[m>>2]|0)!=(c[17758]|0):0){l=c[k>>2]|0;g=c[(c[m>>2]|0)+52>>2]|0;f=l+16|0;do{a[l>>0]=a[g>>0]|0;l=l+1|0;g=g+1|0}while((l|0)<(f|0));a[(c[k>>2]|0)+12>>0]=(c[(c[m>>2]|0)+56>>2]|0)>>>24;a[(c[k>>2]|0)+13>>0]=(c[(c[m>>2]|0)+56>>2]|0)>>>16;a[(c[k>>2]|0)+14>>0]=(c[(c[m>>2]|0)+56>>2]|0)>>>8;a[(c[k>>2]|0)+15>>0]=c[(c[m>>2]|0)+56>>2];g=(c[m>>2]|0)+56|0;c[g>>2]=(c[g>>2]|0)+1;i=h;return}if(!(c[17762]|0)){c[17763]=Dw()|0;c[17764]=Xw()|0}if(lb(o|0,0)|0){c[j>>2]=ov(c[(Yu()|0)>>2]|0)|0;Bf(52002,j)}c[n>>2]=c[o+4>>2];c[n>>2]=c[n>>2]<<4;if((c[o>>2]|0)==(c[17762]|0)?(c[n>>2]|0)==(c[17765]|0):0){b[35830]=(b[35830]|0)+1<<16>>16;b[35830]=(e[35830]|0)&4095}else{b[35830]=0;c[17762]=c[o>>2];c[17765]=c[n>>2]}a[c[k>>2]>>0]=c[o>>2]>>24;a[(c[k>>2]|0)+1>>0]=c[o>>2]>>16;a[(c[k>>2]|0)+2>>0]=c[o>>2]>>8;a[(c[k>>2]|0)+3>>0]=c[o>>2];a[(c[k>>2]|0)+4>>0]=(c[n>>2]|0)>>>16;a[(c[k>>2]|0)+5>>0]=(c[n>>2]|0)>>>8;a[(c[k>>2]|0)+6>>0]=c[n>>2]&240|(e[35830]|0)>>8&15;a[(c[k>>2]|0)+7>>0]=e[35830]|0;a[(c[k>>2]|0)+8>>0]=(c[17763]|0)>>>24;a[(c[k>>2]|0)+9>>0]=(c[17763]|0)>>>16;a[(c[k>>2]|0)+10>>0]=(c[17763]|0)>>>8;a[(c[k>>2]|0)+11>>0]=c[17763];a[(c[k>>2]|0)+12>>0]=(c[17764]|0)>>>24;a[(c[k>>2]|0)+13>>0]=(c[17764]|0)>>>16;a[(c[k>>2]|0)+14>>0]=(c[17764]|0)>>>8;a[(c[k>>2]|0)+15>>0]=c[17764];k=(c[17764]|0)+1|0;c[17764]=k;if(k){i=h;return}c[17763]=(c[17763]|0)+1;i=h;return}function xt(b,e,f,g,h,j){b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0;k=i;i=i+80|0;l=k+60|0;m=k+56|0;n=k+52|0;o=k+48|0;p=k+44|0;q=k+40|0;r=k+36|0;s=k+32|0;t=k+65|0;u=k+8|0;v=k+28|0;w=k+24|0;x=k+20|0;y=k+64|0;z=k;A=k+16|0;c[l>>2]=b;c[m>>2]=e;c[n>>2]=f;c[o>>2]=g;c[p>>2]=h;c[q>>2]=j;yt(c[o>>2]|0,c[p>>2]|0,c[m>>2]|0,16);zt(c[q>>2]|0,c[p>>2]|0,c[n>>2]|0,16);yt(c[o>>2]|0,c[l>>2]|0,c[q>>2]|0,16);zt(c[q>>2]|0,c[l>>2]|0,c[p>>2]|0,16);yt(c[o>>2]|0,c[n>>2]|0,c[q>>2]|0,16);c[r>>2]=c[p>>2];c[s>>2]=16;a[t>>0]=0;p=u;c[p>>2]=d[t>>0];c[p+4>>2]=0;while(1){if(!((c[r>>2]&7|0)!=0?(c[s>>2]|0)!=0:0))break;a[c[r>>2]>>0]=a[t>>0]|0;c[r>>2]=(c[r>>2]|0)+1;c[s>>2]=(c[s>>2]|0)+-1}if((c[s>>2]|0)>>>0>=8){p=u;n=Mx(c[p>>2]|0,c[p+4>>2]|0,16843009,16843009)|0;p=u;c[p>>2]=n;c[p+4>>2]=C;do{c[v>>2]=c[r>>2];p=u;n=c[p+4>>2]|0;o=c[v>>2]|0;c[o>>2]=c[p>>2];c[o+4>>2]=n;c[s>>2]=(c[s>>2]|0)-8;c[r>>2]=(c[r>>2]|0)+8}while((c[s>>2]|0)>>>0>=8)}while(1){if(!(c[s>>2]|0))break;a[c[r>>2]>>0]=a[t>>0]|0;c[r>>2]=(c[r>>2]|0)+1;c[s>>2]=(c[s>>2]|0)+-1}c[w>>2]=c[q>>2];c[x>>2]=16;a[y>>0]=0;q=z;c[q>>2]=d[y>>0];c[q+4>>2]=0;while(1){if(!((c[w>>2]&7|0)!=0?(c[x>>2]|0)!=0:0))break;a[c[w>>2]>>0]=a[y>>0]|0;c[w>>2]=(c[w>>2]|0)+1;c[x>>2]=(c[x>>2]|0)+-1}if((c[x>>2]|0)>>>0>=8){q=z;s=Mx(c[q>>2]|0,c[q+4>>2]|0,16843009,16843009)|0;q=z;c[q>>2]=s;c[q+4>>2]=C;do{c[A>>2]=c[w>>2];q=z;s=c[q+4>>2]|0;r=c[A>>2]|0;c[r>>2]=c[q>>2];c[r+4>>2]=s;c[x>>2]=(c[x>>2]|0)-8;c[w>>2]=(c[w>>2]|0)+8}while((c[x>>2]|0)>>>0>=8)}while(1){if(!(c[x>>2]|0))break;a[c[w>>2]>>0]=a[y>>0]|0;c[w>>2]=(c[w>>2]|0)+1;c[x>>2]=(c[x>>2]|0)+-1}i=k;return}function yt(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0;f=i;i=i+32|0;g=f;h=f+20|0;j=f+16|0;k=f+12|0;l=f+8|0;m=f+4|0;c[h>>2]=a;c[j>>2]=b;c[k>>2]=d;c[l>>2]=e;if((c[l>>2]|0)!=16)xf(51839,51398,386,52029);c[m>>2]=gi(c[h>>2]|0,c[j>>2]|0,c[l>>2]|0,c[k>>2]|0,c[l>>2]|0)|0;if(c[m>>2]|0){c[g>>2]=qt(c[m>>2]|0)|0;Bf(52041,g)}else{i=f;return}}function zt(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var h=0,j=0,k=0,l=0,m=0;h=i;i=i+16|0;j=h+12|0;k=h+8|0;l=h+4|0;m=h;c[j>>2]=b;c[k>>2]=e;c[l>>2]=f;c[m>>2]=g;while(1){if(!(c[m>>2]|0))break;a[c[j>>2]>>0]=(d[c[k>>2]>>0]|0)^(d[c[l>>2]>>0]|0);c[m>>2]=(c[m>>2]|0)+-1;c[k>>2]=(c[k>>2]|0)+1;c[l>>2]=(c[l>>2]|0)+1;c[j>>2]=(c[j>>2]|0)+1}i=h;return}function At(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=i;i=i+16|0;e=d+4|0;f=d;c[e>>2]=a;c[f>>2]=b;et(1);gt();ot(c[e>>2]|0,c[f>>2]|0,c[17756]|0);jt();i=d;return}function Bt(a){a=a|0;var b=0,d=0,e=0;b=i;i=i+16|0;d=b+4|0;e=b;c[d>>2]=a;Pn(b+8|0,8,1);c[e>>2]=Ct(c[d>>2]|0)|0;d=Dt(c[e>>2]|0)|0;i=b;return d|0}function Ct(b){b=b|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;e=i;i=i+48|0;f=e+20|0;g=e+16|0;h=e+12|0;j=e+8|0;k=e+4|0;l=e;m=e+24|0;c[f>>2]=b;c[l>>2]=0;if(!(c[17755]|0))xf(51960,51398,912,52144);c[j>>2]=gg(1,68)|0;ht(c[j>>2]|0);gt();c[g>>2]=0;a:while(1){if((c[g>>2]|0)>>>0>=3)break;c[k>>2]=ai((c[j>>2]|0)+4|0,7,1,1)|0;if(c[k>>2]|0){n=6;break}c[k>>2]=ni(c[(c[j>>2]|0)+4>>2]|0,52195+((c[g>>2]|0)*96|0)|0,16)|0;if(c[k>>2]|0){n=8;break}b=Dw()|0;c[(c[j>>2]|0)+60>>2]=b;b=(c[j>>2]|0)+17|0;o=52195+((c[g>>2]|0)*96|0)+32|0;p=b+16|0;do{a[b>>0]=a[o>>0]|0;b=b+1|0;o=o+1|0}while((b|0)<(p|0));o=(c[j>>2]|0)+8|0;a[o>>0]=a[o>>0]&-2|1;o=Dw()|0;c[(c[j>>2]|0)+64>>2]=o;c[(c[j>>2]|0)+52>>2]=52195+((c[g>>2]|0)*96|0)+16;c[(c[j>>2]|0)+56>>2]=(d[52195+((c[g>>2]|0)*96|0)+16+12>>0]|0)<<24|(d[52195+((c[g>>2]|0)*96|0)+16+13>>0]|0)<<16|(d[52195+((c[g>>2]|0)*96|0)+16+14>>0]|0)<<8|(d[52195+((c[g>>2]|0)*96|0)+16+15>>0]|0);c[h>>2]=0;while(1){if((c[h>>2]|0)>=3)break;if(vt(m,16,c[j>>2]|0)|0){n=12;break a}if(mw(m,52195+((c[g>>2]|0)*96|0)+48+(c[h>>2]<<4)|0,16)|0){n=14;break a}c[h>>2]=(c[h>>2]|0)+1}o=c[(c[j>>2]|0)+60>>2]|0;if((o|0)!=(Dw()|0)){n=18;break}o=c[(c[j>>2]|0)+64>>2]|0;if((o|0)!=(Dw()|0)){n=18;break}fi(c[(c[j>>2]|0)+4>>2]|0);c[(c[j>>2]|0)+4>>2]=0;o=(c[j>>2]|0)+8|0;a[o>>0]=a[o>>0]&-2;it(c[j>>2]|0);c[g>>2]=(c[g>>2]|0)+1}if((n|0)==6)c[l>>2]=52157;else if((n|0)==8)c[l>>2]=52483;else if((n|0)==12)c[l>>2]=52509;else if((n|0)==14)c[l>>2]=52540;else if((n|0)==18)c[l>>2]=52578;jt();fi(c[(c[j>>2]|0)+4>>2]|0);it(c[j>>2]|0);$f(c[j>>2]|0);if(!((c[f>>2]|0)!=0&(c[l>>2]|0)!=0)){q=c[l>>2]|0;r=(q|0)!=0;s=r?50:0;i=e;return s|0}Fb[c[f>>2]&1](52600,0,52607,c[l>>2]|0);q=c[l>>2]|0;r=(q|0)!=0;s=r?50:0;i=e;return s|0}function Dt(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;a=Et(1,c[d>>2]|0)|0;i=b;return a|0}function Et(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;d=i;i=i+16|0;e=d+4|0;f=d;c[e>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]|0)<<24|(d[(c[(c[x>>2]|0)+52>>2]|0)+13>>0]|0)<<16|(d[(c[(c[x>>2]|0)+52>>2]|0)+14>>0]|0)<<8|(d[(c[(c[x>>2]|0)+52>>2]|0)+15>>0]|0);if(c[p>>2]&1)a[(c[x>>2]|0)+51>>0]=1;it(c[x>>2]|0);c[w>>2]=0}p=c[x>>2]|0;if(c[w>>2]|0){fi(c[p+4>>2]|0);$f(c[x>>2]|0);c[c[o>>2]>>2]=0}else c[c[o>>2]>>2]=p;c[n>>2]=c[w>>2];y=c[n>>2]|0;i=m;return y|0}function Gt(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0;e=i;i=i+32|0;f=e+16|0;g=e+12|0;h=e+8|0;j=e+4|0;k=e;c[g>>2]=a;c[h>>2]=b;c[j>>2]=d;c[k>>2]=c[g>>2];if((c[k>>2]|0)!=0&(c[h>>2]|0)!=0^1|(c[j>>2]|0)!=16){c[f>>2]=45;l=c[f>>2]|0;i=e;return l|0}else{gt();ot(c[h>>2]|0,c[j>>2]|0,c[k>>2]|0);jt();c[f>>2]=0;l=c[f>>2]|0;i=e;return l|0}return 0}function Ht(a){a=a|0;var b=0,d=0,e=0;b=i;i=i+16|0;d=b+4|0;e=b;c[d>>2]=a;c[e>>2]=c[d>>2];if(!(c[e>>2]|0)){i=b;return}fi(c[(c[e>>2]|0)+4>>2]|0);$f(c[e>>2]|0);i=b;return}function It(a){a=a|0;var b=0;b=i;i=i+16|0;c[b>>2]=a;Jt();i=b;return}function Jt(){if(c[17766]|0)return;c[17766]=1;c[17767]=0;return}function Kt(){Lt();Tt(0,0,0,0)|0;Mt();return}function Lt(){var a=0,b=0,d=0;a=i;i=i+16|0;b=a;d=a+4|0;c[d>>2]=lu(13048)|0;if(c[d>>2]|0){c[b>>2]=fu(c[d>>2]|0)|0;Bf(52611,b)}else{c[17767]=1;i=a;return}}function Mt(){var a=0,b=0,d=0;a=i;i=i+16|0;b=a;d=a+4|0;c[17767]=0;c[d>>2]=mu(13048)|0;if(c[d>>2]|0){c[b>>2]=fu(c[d>>2]|0)|0;Bf(52654,b)}else{i=a;return}}function Nt(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=i;i=i+16|0;f=e+8|0;g=e+4|0;h=e;c[f>>2]=a;c[g>>2]=b;c[h>>2]=d;It(1);if((c[h>>2]|0)!=2)c[h>>2]=1;Lt();Ot(c[f>>2]|0,c[g>>2]|0,c[h>>2]|0);Mt();i=e;return}function Ot(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0;e=i;i=i+32|0;f=e;g=e+16|0;h=e+12|0;j=e+8|0;k=e+4|0;c[g>>2]=a;c[h>>2]=b;c[j>>2]=d;if(!(c[g>>2]|0))xf(52697,52704,144,52720);c[17768]=c[g>>2];c[17769]=c[h>>2];c[17770]=0;c[k>>2]=Tt(5,0,c[h>>2]|0,c[j>>2]|0)|0;if((c[k>>2]|0)<0){l=c[k>>2]|0;c[f>>2]=l;Bf(52775,f)}if((c[17770]|0)!=(c[17769]|0)){l=c[k>>2]|0;c[f>>2]=l;Bf(52775,f)}else{i=e;return}}function Pt(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0;f=i;i=i+16|0;g=f+12|0;h=f+8|0;j=f;c[g>>2]=b;c[h>>2]=d;c[f+4>>2]=e;c[j>>2]=c[g>>2];if(!(c[17767]|0))xf(52731,52704,124,52752);if(!(c[17768]|0))xf(52760,52704,125,52752);while(1){g=c[h>>2]|0;c[h>>2]=g+-1;if(!g){k=8;break}if((c[17770]|0)>>>0>=(c[17769]|0)>>>0){k=8;break}g=c[j>>2]|0;c[j>>2]=g+1;e=a[g>>0]|0;g=c[17770]|0;c[17770]=g+1;a[(c[17768]|0)+g>>0]=e}if((k|0)==8){i=f;return}}function Qt(){return c[17771]|0}function Rt(a,b){a=a|0;b=b|0;var d=0;d=i;i=i+16|0;c[d+4>>2]=a;c[d>>2]=b;i=d;return}function St(a,b){a=a|0;b=b|0;var d=0,e=0;d=i;i=i+16|0;e=d;c[d+8>>2]=a;c[d+4>>2]=b;c[e>>2]=0;i=d;return c[e>>2]|0}function Tt(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0;h=i;i=i+1024|0;j=h+24|0;k=h+16|0;l=h+8|0;m=h+236|0;n=h+232|0;o=h+228|0;p=h+224|0;q=h+220|0;r=h+216|0;s=h+212|0;t=h+248|0;u=h+208|0;v=h+204|0;w=h+200|0;x=h+196|0;y=h+192|0;z=h+64|0;A=h+56|0;B=h+52|0;D=h+48|0;E=h+44|0;F=h+40|0;G=h+36|0;H=h+32|0;I=h+240|0;J=h;K=h+28|0;c[n>>2]=b;c[o>>2]=e;c[p>>2]=f;c[q>>2]=g;c[v>>2]=c[p>>2];c[w>>2]=0;c[x>>2]=0;if(!(c[n>>2]|0)){if((c[3273]|0)!=-1){lw(c[3273]|0)|0;c[3273]=-1}if((c[3274]|0)!=-1){lw(c[3274]|0)|0;c[3274]=-1}c[m>>2]=0;L=c[m>>2]|0;i=h;return L|0}c[u>>2]=St(c[n>>2]|0,c[o>>2]|0)|0;if((c[u>>2]|0)>>>0>(((c[p>>2]|0)>>>0)/2|0)>>>0)c[u>>2]=((c[p>>2]|0)>>>0)/2|0;if((c[p>>2]|0)>>>0>1)c[p>>2]=(c[p>>2]|0)-(c[u>>2]|0);if((c[q>>2]|0)>=2){if((c[3273]|0)==-1){c[3273]=Ut(52821,(d[76526]|0)&1)|0;a[76526]=d[76526]|0|1}c[r>>2]=c[3273]}else{if((c[3274]|0)==-1){c[3274]=Ut(52923,(d[76526]|0)&2)|0;a[76526]=d[76526]|0|2}c[r>>2]=c[3274]}c[y>>2]=0;while(1){if(!(c[p>>2]|0))break;if(!((c[x>>2]|0)==0?(c[w>>2]|0)==((c[v>>2]|0)-(c[p>>2]|0)|0):0)){c[w>>2]=(c[v>>2]|0)-(c[p>>2]|0);Bn(52936,88,c[w>>2]|0,c[v>>2]|0);c[x>>2]=1}if((c[r>>2]|0)<1024){c[E>>2]=z;c[D>>2]=32;while(1){if(!(c[D>>2]|0))break;q=c[E>>2]|0;c[E>>2]=q+4;c[q>>2]=0;c[D>>2]=(c[D>>2]|0)+-1}q=z+((((c[r>>2]|0)>>>0)/32|0)<<2)|0;c[q>>2]=c[q>>2]|1<<(((c[r>>2]|0)>>>0)%32|0);c[A>>2]=c[y>>2];c[A+4>>2]=(c[y>>2]|0)!=0?0:1e5;q=Jw((c[r>>2]|0)+1|0,z,0,0,A)|0;c[B>>2]=q;if(!q){c[x>>2]=1;c[y>>2]=3;continue}if((c[B>>2]|0)==-1){c[l>>2]=ov(c[(Yu()|0)>>2]|0)|0;Af(52949,l);if(c[y>>2]|0)continue;c[y>>2]=1;continue}}do{c[F>>2]=(c[p>>2]|0)>>>0<768?c[p>>2]|0:768;c[s>>2]=Lw(c[r>>2]|0,t,c[F>>2]|0)|0;if((c[s>>2]|0)>=0?(c[s>>2]|0)>>>0>(c[F>>2]|0)>>>0:0){c[k>>2]=c[s>>2];Af(52969,k);c[s>>2]=c[F>>2]}if((c[s>>2]|0)!=-1)break}while((c[(Yu()|0)>>2]|0)==4);if((c[s>>2]|0)==-1){M=38;break}Ab[c[n>>2]&7](t,c[s>>2]|0,c[o>>2]|0);c[p>>2]=(c[p>>2]|0)-(c[s>>2]|0)}if((M|0)==38){c[j>>2]=ov(c[(Yu()|0)>>2]|0)|0;Bf(53007,j)}c[G>>2]=t;c[H>>2]=768;a[I>>0]=0;t=J;c[t>>2]=d[I>>0];c[t+4>>2]=0;while(1){if(!((c[G>>2]&7|0)!=0?(c[H>>2]|0)!=0:0))break;a[c[G>>2]>>0]=a[I>>0]|0;c[G>>2]=(c[G>>2]|0)+1;c[H>>2]=(c[H>>2]|0)+-1}if((c[H>>2]|0)>>>0>=8){t=J;j=Mx(c[t>>2]|0,c[t+4>>2]|0,16843009,16843009)|0;t=J;c[t>>2]=j;c[t+4>>2]=C;do{c[K>>2]=c[G>>2];t=J;j=c[t+4>>2]|0;M=c[K>>2]|0;c[M>>2]=c[t>>2];c[M+4>>2]=j;c[H>>2]=(c[H>>2]|0)-8;c[G>>2]=(c[G>>2]|0)+8}while((c[H>>2]|0)>>>0>=8)}while(1){if(!(c[H>>2]|0))break;a[c[G>>2]>>0]=a[I>>0]|0;c[G>>2]=(c[G>>2]|0)+1;c[H>>2]=(c[H>>2]|0)+-1}if(c[x>>2]|0)Bn(52936,88,c[v>>2]|0,c[v>>2]|0);c[m>>2]=0;L=c[m>>2]|0;i=h;return L|0}function Ut(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0;d=i;i=i+48|0;e=d+16|0;f=d+8|0;g=d;h=d+40|0;j=d+36|0;k=d+32|0;l=d+24|0;c[h>>2]=a;c[j>>2]=b;if(c[j>>2]|0)Bn(52833,88,1,0);while(1){c[k>>2]=Mw(c[h>>2]|0,0,g)|0;if(!((c[k>>2]|0)==-1&(c[j>>2]|0)!=0))break;c[l>>2]=5;c[l+4>>2]=0;Bn(52849,88,0,c[l>>2]|0);Jw(0,0,0,0,l)|0}if((c[k>>2]|0)==-1){l=c[h>>2]|0;h=ov(c[(Yu()|0)>>2]|0)|0;c[f>>2]=l;c[f+4>>2]=h;Bf(52865,f)}if(!(Vt(c[k>>2]|0)|0)){m=c[k>>2]|0;i=d;return m|0}f=c[k>>2]|0;h=ov(c[(Yu()|0)>>2]|0)|0;c[e>>2]=f;c[e+4>>2]=h;Af(52884,e);m=c[k>>2]|0;i=d;return m|0}function Vt(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,j=0;b=i;i=i+32|0;d=b+8|0;e=b;f=b+20|0;g=b+16|0;h=b+12|0;c[g>>2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m>>2]|0)-1|0);if(!d)Wo(c[l>>2]|0,(c[m>>2]|0)-1|0);if((ap(c[l>>2]|0,c[j>>2]|0)|0)>=0){if(!(jg(1)|0))continue;Df(53087,g);continue}if(($o(c[l>>2]|0,0)|0)>0)break;if(!(jg(1)|0))continue;Df(53109,f)}$f(c[o>>2]|0);i=e;return c[l>>2]|0}function Yt(b,d,e,f,g,h,j){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;k=i;i=i+80|0;l=k+72|0;m=k+68|0;n=k+64|0;o=k+60|0;p=k+56|0;q=k+52|0;r=k+48|0;s=k+44|0;t=k+40|0;u=k+36|0;v=k+32|0;w=k+28|0;x=k+24|0;y=k+20|0;z=k+16|0;A=k+12|0;B=k+8|0;C=k+4|0;D=k;c[m>>2]=b;c[n>>2]=d;c[o>>2]=e;c[p>>2]=f;c[q>>2]=g;c[r>>2]=h;c[s>>2]=j;c[u>>2]=0;c[v>>2]=0;c[w>>2]=0;c[x>>2]=0;c[y>>2]=0;c[z>>2]=0;c[A>>2]=0;c[C>>2]=Ro(c[n>>2]|0)|0;if(!((c[C>>2]|0)!=0&(c[p>>2]|0)!=0&(c[q>>2]|0)!=0)){c[l>>2]=32816;E=c[l>>2]|0;i=k;return E|0}j=Uj(c[r>>2]|0)|0;if((j|0)!=(c[q>>2]|0)){c[l>>2]=5;E=c[l>>2]|0;i=k;return E|0}c[u>>2]=Vf(c[q>>2]|0)|0;a:do if(c[u>>2]|0){c[D>>2]=0;while(1){if((c[D>>2]|0)>>>0>=(c[q>>2]|0)>>>0)break;a[(c[u>>2]|0)+(c[D>>2]|0)>>0]=1;c[D>>2]=(c[D>>2]|0)+1}c[v>>2]=ag(1,c[q>>2]|0)|0;if(!(c[v>>2]|0)){c[t>>2]=iu()|0;break}c[t>>2]=Zt(w,c[o>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|0;c[x>>2]=$p(0)|0;co(y);c[D>>2]=jo(c[c[m>>2]>>2]|0,c[(c[m>>2]|0)+4>>2]|0,0,c[(c[m>>2]|0)+8>>2]|0,c[(c[m>>2]|0)+12>>2]|0,c[(c[m>>2]|0)+16>>2]|0)|0;while(1){hq(c[t>>2]|0);c[t>>2]=0;if((c[p>>2]&2|0)!=0&(c[q>>2]|0)!=0){if(!(c[l>>2]|0)){F=9;break}if(!(c[(c[l>>2]|0)+12>>2]&4)){F=9;break}c[A>>2]=kq(c[l>>2]|0,B)|0;c[r>>2]=Yt(t,c[(c[m>>2]|0)+32>>2]|0,c[(c[m>>2]|0)+56>>2]|0,c[A>>2]|0,(((c[B>>2]|0)+7|0)>>>0)/8|0,c[q>>2]|0,c[s>>2]|0)|0;if(c[r>>2]|0)break;c[s>>2]=(c[s>>2]|0)+1}else c[t>>2]=Xt(c[(c[m>>2]|0)+32>>2]|0,1)|0;Go(y,c[t>>2]|0,(c[m>>2]|0)+20|0,c[D>>2]|0);if(Zn(c[x>>2]|0,0,y,c[D>>2]|0)|0){F=14;break}qp(c[n>>2]|0,c[x>>2]|0,c[(c[m>>2]|0)+32>>2]|0);if(($o(c[n>>2]|0,0)|0)!=0^1)continue;vp(c[u>>2]|0,c[(c[m>>2]|0)+56>>2]|0,c[n>>2]|0,c[(c[m>>2]|0)+32>>2]|0);Oo(c[v>>2]|0,c[z>>2]|0,c[u>>2]|0,c[(c[m>>2]|0)+32>>2]|0);pp(c[w>>2]|0,c[t>>2]|0,c[(c[m>>2]|0)+32>>2]|0)|0;vp(c[o>>2]|0,c[w>>2]|0,c[v>>2]|0,c[(c[m>>2]|0)+32>>2]|0);if(!(($o(c[o>>2]|0,0)|0)!=0^1)){F=19;break}}if((F|0)==9)c[r>>2]=70;else if((F|0)==14){if(jg(1)|0)Df(53208,j);c[r>>2]=8}else if((F|0)==19?(jg(1)|0)!=0:0){Hf(53149,c[n>>2]|0);Hf(53170,c[o>>2]|0)}no(c[D>>2]|0);fo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>2]|0,(c[l>>2]|0)+20|0,c[x>>2]|0);vp(c[s>>2]|0,c[m>>2]|0,c[q>>2]|0,c[(c[l>>2]|0)+32>>2]|0);Go(w,c[s>>2]|0,(c[l>>2]|0)+44|0,c[x>>2]|0);Ao(u,v,w,c[x>>2]|0);do if($o(c[u+8>>2]|0,0)|0){if(Zn(c[t>>2]|0,0,u,c[x>>2]|0)|0){if(jg(1)|0)Df(53314,g);c[o>>2]=8;break}qp(c[t>>2]|0,c[t>>2]|0,c[(c[l>>2]|0)+32>>2]|0);if(ap(c[t>>2]|0,c[m>>2]|0)|0){if(jg(1)|0){Hf(53360,c[t>>2]|0);Hf(53367,c[m>>2]|0);Hf(53374,c[n>>2]|0)}c[o>>2]=8}}else{if(jg(1)|0)Df(53292,h);c[o>>2]=8}while(0);no(c[x>>2]|0);fo(w);fo(v);fo(u);hq(c[t>>2]|0);hq(c[s>>2]|0);hq(c[r>>2]|0);hq(c[q>>2]|0);if((c[p>>2]|0)!=(c[k>>2]|0))hq(c[p>>2]|0);c[j>>2]=c[o>>2];z=c[j>>2]|0;i=f;return z|0}c[j>>2]=8;z=c[j>>2]|0;i=f;return z|0}c[j>>2]=8;z=c[j>>2]|0;i=f;return z|0}function cu(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0;f=i;i=i+96|0;g=f;h=f+80|0;j=f+76|0;k=f+72|0;l=f+68|0;m=f+64|0;n=f+60|0;o=f+56|0;p=f+52|0;q=f+48|0;r=f+44|0;s=f+40|0;t=f+36|0;u=f+24|0;v=f+20|0;w=f+16|0;x=f+12|0;y=f+8|0;z=f+4|0;c[j>>2]=a;c[k>>2]=b;c[l>>2]=d;c[m>>2]=e;c[n>>2]=0;if(jg(1)|0)Hf(53191,c[j>>2]|0);c[y>>2]=Ro(c[(c[k>>2]|0)+32>>2]|0)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18;break}}if((B|0)==13){if(jg(1)|0)Df(53208,g);c[n>>2]=8}else if((B|0)==18?(jg(1)|0)!=0:0){Hf(53252,c[l>>2]|0);Hf(53272,c[m>>2]|0)}no(c[z>>2]|0);fo(u);hq(c[s>>2]|0);hq(c[t>>2]|0);hq(c[r>>2]|0);hq(c[q>>2]|0);hq(c[p>>2]|0);hq(c[o>>2]|0);if((c[v>>2]|0)!=(c[j>>2]|0))hq(c[v>>2]|0);c[h>>2]=c[n>>2];A=c[h>>2]|0;i=f;return A|0}function du(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0;f=i;i=i+128|0;g=f+24|0;h=f+16|0;j=f+8|0;k=f;l=f+116|0;m=f+112|0;n=f+108|0;o=f+104|0;p=f+100|0;q=f+96|0;r=f+92|0;s=f+88|0;t=f+84|0;u=f+80|0;v=f+76|0;w=f+72|0;x=f+68|0;y=f+56|0;z=f+44|0;A=f+32|0;B=f+28|0;c[m>>2]=a;c[n>>2]=b;c[o>>2]=d;c[p>>2]=e;c[q>>2]=0;if(($o(c[o>>2]|0,0)|0)>0?(ap(c[o>>2]|0,c[(c[n>>2]|0)+32>>2]|0)|0)<0:0){if(($o(c[p>>2]|0,0)|0)>0?(ap(c[p>>2]|0,c[(c[n>>2]|0)+32>>2]|0)|0)<0:0){c[s>>2]=$p(0)|0;c[r>>2]=$p(0)|0;c[t>>2]=$p(0)|0;c[u>>2]=$p(0)|0;c[v>>2]=$p(0)|0;c[w>>2]=$p(0)|0;c[x>>2]=$p(0)|0;co(y);co(z);co(A);c[B>>2]=jo(c[c[n>>2]>>2]|0,c[(c[n>>2]|0)+4>>2]|0,0,c[(c[n>>2]|0)+8>>2]|0,c[(c[n>>2]|0)+12>>2]|0,c[(c[n>>2]|0)+16>>2]|0)|0;qp(c[r>>2]|0,c[m>>2]|0,c[(c[n>>2]|0)+32>>2]|0);if(!($o(c[r>>2]|0,0)|0))sq(c[r>>2]|0,1)|0;pp(c[v>>2]|0,c[r>>2]|0,c[(c[n>>2]|0)+32>>2]|0)|0;vp(c[t>>2]|0,c[p>>2]|0,c[v>>2]|0,c[(c[n>>2]|0)+32>>2]|0);vp(c[w>>2]|0,c[o>>2]|0,c[v>>2]|0,c[(c[n>>2]|0)+32>>2]|0);Po(c[u>>2]|0,c[x>>2]|0,c[w>>2]|0,c[(c[n>>2]|0)+32>>2]|0);Go(z,c[t>>2]|0,(c[n>>2]|0)+20|0,c[B>>2]|0);Go(A,c[u>>2]|0,(c[n>>2]|0)+44|0,c[B>>2]|0);Ao(y,z,A,c[B>>2]|0);do if($o(c[y+8>>2]|0,0)|0){if(Zn(c[s>>2]|0,0,y,c[B>>2]|0)|0){if(jg(1)|0)Df(53314,j);c[q>>2]=8;break}qp(c[s>>2]|0,c[s>>2]|0,c[(c[n>>2]|0)+32>>2]|0);m=(ap(c[s>>2]|0,c[o>>2]|0)|0)!=0;e=(jg(1)|0)!=0;if(!m){if(!e)break;Df(53407,g);break}if(e){Hf(53360,c[s>>2]|0);Hf(53367,c[o>>2]|0);Hf(53374,c[p>>2]|0);Df(53381,h)}c[q>>2]=8}else{if(jg(1)|0)Df(53292,k);c[q>>2]=8}while(0);no(c[B>>2]|0);fo(A);fo(z);fo(y);hq(c[x>>2]|0);hq(c[w>>2]|0);hq(c[v>>2]|0);hq(c[u>>2]|0);hq(c[t>>2]|0);hq(c[s>>2]|0);hq(c[r>>2]|0);c[l>>2]=c[q>>2];C=c[l>>2]|0;i=f;return C|0}c[l>>2]=8;C=c[l>>2]|0;i=f;return C|0}c[l>>2]=8;C=c[l>>2]|0;i=f;return C|0}function eu(){return tu()|0}function fu(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;a=Gu(c[d>>2]|0)|0;i=b;return a|0}function gu(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;a=Ku(c[d>>2]|0)|0;i=b;return a|0}function hu(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;a=Ju(c[d>>2]|0)|0;i=b;return a|0}function iu(){return Lu()|0}function ju(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;vu(c[d>>2]|0);i=b;return}function ku(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;a=ou(c[d>>2]|0)|0;i=b;return a|0}function lu(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;a=qu(c[d>>2]|0)|0;i=b;return a|0}function mu(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;a=ru(c[d>>2]|0)|0;i=b;return a|0}function nu(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;a=su(c[d>>2]|0)|0;i=b;return a|0}function ou(a){a=a|0;var b=0,d=0,e=0,f=0,g=0;b=i;i=i+16|0;d=b+8|0;e=b+4|0;f=b;c[d>>2]=a;c[e>>2]=c[d>>2];if(c[c[e>>2]>>2]|0)c[e>>2]=pu(c[d>>2]|0)|0;else c[c[e>>2]>>2]=1;c[f>>2]=qa((c[e>>2]|0)+4|0,0)|0;if(!(c[f>>2]|0)){g=c[f>>2]|0;i=b;return g|0}c[f>>2]=gu(c[f>>2]|0)|0;g=c[f>>2]|0;i=b;return g|0}function pu(a){a=a|0;var b=0,d=0,e=0;b=i;i=i+16|0;d=b+4|0;e=b;c[d>>2]=a;c[e>>2]=c[d>>2];if((c[c[e>>2]>>2]|0)!=1)ya(53429,53449,114,53462);else{i=b;return c[e>>2]|0}return 0}function qu(a){a=a|0;var b=0,d=0,e=0,f=0,g=0;b=i;i=i+16|0;d=b+8|0;e=b+4|0;f=b;c[d>>2]=a;c[e>>2]=pu(c[d>>2]|0)|0;c[f>>2]=kb((c[e>>2]|0)+4|0)|0;if(!(c[f>>2]|0)){g=c[f>>2]|0;i=b;return g|0}c[f>>2]=gu(c[f>>2]|0)|0;g=c[f>>2]|0;i=b;return g|0}function ru(a){a=a|0;var b=0,d=0,e=0,f=0,g=0;b=i;i=i+16|0;d=b+8|0;e=b+4|0;f=b;c[d>>2]=a;c[e>>2]=pu(c[d>>2]|0)|0;c[f>>2]=Va((c[e>>2]|0)+4|0)|0;if(!(c[f>>2]|0)){g=c[f>>2]|0;i=b;return g|0}c[f>>2]=gu(c[f>>2]|0)|0;g=c[f>>2]|0;i=b;return g|0}function su(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0;b=i;i=i+64|0;d=b+52|0;e=b+48|0;f=b+44|0;g=b;c[d>>2]=a;c[e>>2]=pu(c[d>>2]|0)|0;c[f>>2]=Sa((c[e>>2]|0)+4|0)|0;if(c[f>>2]|0){c[f>>2]=gu(c[f>>2]|0)|0;h=c[f>>2]|0;i=b;return h|0}else{e=g;a=e+44|0;do{c[e>>2]=0;e=e+4|0}while((e|0)<(a|0));c[g>>2]=1;e=c[d>>2]|0;d=g;a=e+44|0;do{c[e>>2]=c[d>>2];e=e+4|0;d=d+4|0}while((e|0)<(a|0));h=c[f>>2]|0;i=b;return h|0}return 0}function tu(){uu();return 0}function uu(){wu()|0;return}function vu(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;a=c[d>>2]|0;c[(Yu()|0)>>2]=a;i=b;return}function wu(){if(c[17772]|0)return 0;c[17772]=1;nb(3)|0;return 0}function xu(){yu(0)|0;c[17774]=0;c[17775]=0;return}function yu(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,j=0;b=i;i=i+16|0;d=b+8|0;e=b+4|0;f=b;c[d>>2]=a;if(c[d>>2]|0){zu(c[d>>2]|0);c[e>>2]=Au(c[d>>2]|0)|0;Du(c[d>>2]|0);g=c[e>>2]|0;h=(g|0)!=0;j=h?-1:0;i=b;return j|0}c[e>>2]=0;Eu();c[f>>2]=c[17773];while(1){if(!(c[f>>2]|0))break;if(c[(c[f>>2]|0)+4>>2]|0){zu(c[(c[f>>2]|0)+4>>2]|0);d=Au(c[(c[f>>2]|0)+4>>2]|0)|0;c[e>>2]=c[e>>2]|d;Du(c[(c[f>>2]|0)+4>>2]|0)}c[f>>2]=c[c[f>>2]>>2]}Fu();g=c[e>>2]|0;h=(g|0)!=0;j=h?-1:0;i=b;return j|0}function zu(a){a=a|0;var b=0,e=0;b=i;i=i+16|0;e=b;c[e>>2]=a;if((d[(c[(c[e>>2]|0)+36>>2]|0)+1140>>0]|0)>>>5&1){i=b;return}qu((c[(c[e>>2]|0)+36>>2]|0)+1040|0)|0;i=b;return}function Au(a){a=a|0;var b=0,d=0,e=0,f=0;b=i;i=i+16|0;d=b+4|0;e=b;c[d>>2]=a;a=c[d>>2]|0;if((c[c[d>>2]>>2]|0)>>>16&1){c[e>>2]=Bu(a)|0;f=c[e>>2]|0;i=b;return f|0}else{Cu(a);c[e>>2]=0;f=c[e>>2]|0;i=b;return f|0}return 0}function Bu(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0;d=i;i=i+32|0;e=d+20|0;f=d+16|0;g=d+12|0;h=d+8|0;j=d+4|0;k=d;c[e>>2]=b;c[f>>2]=c[(c[(c[e>>2]|0)+36>>2]|0)+1108>>2];if(!((c[c[e>>2]>>2]|0)>>>16&1))ya(53478,53500,1654,53510);do if(c[(c[e>>2]|0)+16>>2]|0){if(!(c[f>>2]|0)){c[g>>2]=95;break}c[j>>2]=0;c[g>>2]=0;do{if(((c[(c[e>>2]|0)+16>>2]|0)-(c[j>>2]|0)|0)<=0)break;if(!((c[g>>2]|0)!=0^1))break;c[k>>2]=vb[c[f>>2]&63](c[(c[(c[e>>2]|0)+36>>2]|0)+1084>>2]|0,(c[(c[e>>2]|0)+4>>2]|0)+(c[j>>2]|0)|0,(c[(c[e>>2]|0)+16>>2]|0)-(c[j>>2]|0)|0)|0;if((c[k>>2]|0)==-1){c[h>>2]=0;c[g>>2]=-1}else c[h>>2]=c[k>>2];c[j>>2]=(c[j>>2]|0)+(c[h>>2]|0)}while((c[g>>2]|0)==0);b=(c[e>>2]|0)+20|0;c[b>>2]=(c[b>>2]|0)+(c[j>>2]|0);if((c[(c[e>>2]|0)+16>>2]|0)==(c[j>>2]|0)){b=(c[(c[e>>2]|0)+36>>2]|0)+1100|0;c[b>>2]=(c[b>>2]|0)+(c[(c[e>>2]|0)+16>>2]|0);c[(c[e>>2]|0)+16>>2]=0;c[(c[e>>2]|0)+20>>2]=0;vb[c[f>>2]&63](c[(c[(c[e>>2]|0)+36>>2]|0)+1084>>2]|0,0,0)|0}}else c[g>>2]=0;while(0);if(!(c[g>>2]|0)){l=c[g>>2]|0;i=d;return l|0}f=(c[(c[e>>2]|0)+36>>2]|0)+1136|0;a[f>>0]=a[f>>0]&-2|1;l=c[g>>2]|0;i=d;return l|0}function Cu(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;if((c[c[d>>2]>>2]|0)>>>16&1)ya(53519,53500,1722,53542);else{c[(c[d>>2]|0)+12>>2]=0;c[(c[d>>2]|0)+16>>2]=0;c[(c[d>>2]|0)+32>>2]=0;i=b;return}}function Du(a){a=a|0;var b=0,e=0;b=i;i=i+16|0;e=b;c[e>>2]=a;if((d[(c[(c[e>>2]|0)+36>>2]|0)+1140>>0]|0)>>>5&1){i=b;return}ru((c[(c[e>>2]|0)+36>>2]|0)+1040|0)|0;i=b;return}function Eu(){qu(13100)|0;return}function Fu(){ru(13100)|0;return}function Gu(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0;b=i;i=i+16|0;d=b+12|0;e=b+8|0;f=b+4|0;g=b;c[e>>2]=a;c[f>>2]=Hu(c[e>>2]|0)|0;do if(c[f>>2]&32768){c[g>>2]=hu(c[f>>2]|0)|0;if(!(c[g>>2]|0)){c[f>>2]=16382;break}c[d>>2]=ov(c[g>>2]|0)|0;h=c[d>>2]|0;i=b;return h|0}while(0);c[d>>2]=53551+(c[13144+((Iu(c[f>>2]|0)|0)<<2)>>2]|0);h=c[d>>2]|0;i=b;return h|0}function Hu(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;i=b;return c[d>>2]&65535|0}function Iu(a){a=a|0;var b=0,d=0,e=0,f=0;b=i;i=i+16|0;d=b;c[d>>2]=a;a=c[d>>2]|0;if((c[d>>2]|0)>=0&(c[d>>2]|0)<=213){e=a-0|0;i=b;return e|0}f=c[d>>2]|0;if((a|0)>=222&(c[d>>2]|0)<=254){e=f-8|0;i=b;return e|0}a=c[d>>2]|0;if((f|0)>=257&(c[d>>2]|0)<=271){e=a-10|0;i=b;return e|0}f=c[d>>2]|0;if((a|0)>=273&(c[d>>2]|0)<=281){e=f-11|0;i=b;return e|0}a=c[d>>2]|0;if((f|0)>=721&(c[d>>2]|0)<=729){e=a-450|0;i=b;return e|0}f=c[d>>2]|0;if((a|0)>=750&(c[d>>2]|0)<=752){e=f-470|0;i=b;return e|0}a=c[d>>2]|0;if((f|0)>=754&(c[d>>2]|0)<=782){e=a-471|0;i=b;return e|0}f=c[d>>2]|0;if((a|0)>=784&(c[d>>2]|0)<=789){e=f-472|0;i=b;return e|0}a=c[d>>2]|0;if((f|0)>=800&(c[d>>2]|0)<=804){e=a-482|0;i=b;return e|0}f=c[d>>2]|0;if((a|0)>=815&(c[d>>2]|0)<=822){e=f-492|0;i=b;return e|0}a=c[d>>2]|0;if((f|0)>=832&(c[d>>2]|0)<=839){e=a-501|0;i=b;return e|0}f=c[d>>2]|0;if((a|0)>=844&(c[d>>2]|0)<=844){e=f-505|0;i=b;return e|0}a=c[d>>2]|0;if((f|0)>=848&(c[d>>2]|0)<=848){e=a-508|0;i=b;return e|0}f=c[d>>2]|0;if((a|0)>=881&(c[d>>2]|0)<=891){e=f-540|0;i=b;return e|0}a=c[d>>2]|0;if((f|0)>=1024&(c[d>>2]|0)<=1039){e=a-672|0;i=b;return e|0}else{e=(a|0)>=16381&(c[d>>2]|0)<=16383?(c[d>>2]|0)-16013|0:371;i=b;return e|0}return 0}function Ju(a){a=a|0;var b=0,d=0,e=0;b=i;i=i+16|0;d=b+4|0;e=b;c[e>>2]=a;do if(c[e>>2]&32768){c[e>>2]=c[e>>2]&-32769;if((c[e>>2]|0)>>>0<141){c[d>>2]=c[14632+(c[e>>2]<<2)>>2];break}else{c[d>>2]=0;break}}else c[d>>2]=0;while(0);i=b;return c[d>>2]|0}function Ku(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0;b=i;i=i+16|0;d=b+8|0;e=b+4|0;f=b;c[e>>2]=a;if(!(c[e>>2]|0)){c[d>>2]=0;g=c[d>>2]|0;i=b;return g|0}a=c[e>>2]|0;do if(!((c[e>>2]|0)>=1&(c[e>>2]|0)<=11)){h=c[e>>2]|0;if((a|0)>=11&(c[e>>2]|0)<=35){j=h-0|0;break}k=c[e>>2]|0;if((h|0)>=35&(c[e>>2]|0)<=40){j=k+1|0;break}h=c[e>>2]|0;if((k|0)>=42&(c[e>>2]|0)<=57){j=h-0|0;break}k=c[e>>2]|0;if((h|0)>=59&(c[e>>2]|0)<=95){j=k-1|0;break}else{j=(k|0)>=95&(c[e>>2]|0)<=125?(c[e>>2]|0)-0|0:-1;break}}else j=a-1|0;while(0);c[f>>2]=j;if((c[f>>2]|0)<0){c[d>>2]=16382;g=c[d>>2]|0;i=b;return g|0}else{c[d>>2]=32768|c[15196+(c[f>>2]<<2)>>2];g=c[d>>2]|0;i=b;return g|0}return 0}function Lu(){var a=0,b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0;a=i;i=i+16|0;b=a+8|0;d=a+4|0;e=a;c[d>>2]=c[(Yu()|0)>>2];if(!(c[d>>2]|0)){c[b>>2]=16381;f=c[b>>2]|0;i=a;return f|0}g=c[d>>2]|0;do if(!((c[d>>2]|0)>=1&(c[d>>2]|0)<=11)){h=c[d>>2]|0;if((g|0)>=11&(c[d>>2]|0)<=35){j=h-0|0;break}k=c[d>>2]|0;if((h|0)>=35&(c[d>>2]|0)<=40){j=k+1|0;break}h=c[d>>2]|0;if((k|0)>=42&(c[d>>2]|0)<=57){j=h-0|0;break}k=c[d>>2]|0;if((h|0)>=59&(c[d>>2]|0)<=95){j=k-1|0;break}else{j=(k|0)>=95&(c[d>>2]|0)<=125?(c[d>>2]|0)-0|0:-1;break}}else j=g-1|0;while(0);c[e>>2]=j;if((c[e>>2]|0)<0){c[b>>2]=16382;f=c[b>>2]|0;i=a;return f|0}else{c[b>>2]=32768|c[15196+(c[e>>2]<<2)>>2];f=c[b>>2]|0;i=a;return f|0}return 0}function Mu(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0;e=i;i=i+16|0;f=e+4|0;g=e;c[f>>2]=b;c[g>>2]=d;d=c[g>>2]|0;b=Hc(c[d>>2]|0,c[d+4>>2]|0)|0;d=C;h=c[f>>2]|0;j=h;a[j>>0]=b;a[j+1>>0]=b>>8;a[j+2>>0]=b>>16;a[j+3>>0]=b>>24;b=h+4|0;a[b>>0]=d;a[b+1>>0]=d>>8;a[b+2>>0]=d>>16;a[b+3>>0]=d>>24;d=jw(c[(c[g>>2]|0)+8>>2]|0)|0;b=(c[f>>2]|0)+8|0;a[b>>0]=d;a[b+1>>0]=d>>8;a[b+2>>0]=d>>16;a[b+3>>0]=d>>24;d=(c[f>>2]|0)+12|0;f=(c[g>>2]|0)+12|0;g=d+12|0;do{a[d>>0]=a[f>>0]|0;d=d+1|0;f=f+1|0}while((d|0)<(g|0));i=e;return}function Nu(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,j=0;f=i;i=i+16|0;g=f+4|0;h=f;c[g>>2]=b;c[h>>2]=e;e=c[h>>2]|0;b=e;j=e+4|0;e=Ic(d[b>>0]|d[b+1>>0]<<8|d[b+2>>0]<<16|d[b+3>>0]<<24,d[j>>0]|d[j+1>>0]<<8|d[j+2>>0]<<16|d[j+3>>0]<<24)|0;j=c[g>>2]|0;c[j>>2]=e;c[j+4>>2]=C;j=(c[h>>2]|0)+8|0;e=nw(d[j>>0]|d[j+1>>0]<<8|d[j+2>>0]<<16|d[j+3>>0]<<24)|0;c[(c[g>>2]|0)+8>>2]=e;e=(c[g>>2]|0)+12|0;g=(c[h>>2]|0)+12|0;h=e+12|0;do{a[e>>0]=a[g>>0]|0;e=e+1|0;g=g+1|0}while((e|0)<(h|0));i=f;return}function Ou(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0;d=i;i=i+16|0;e=d+12|0;f=d+8|0;g=d+4|0;h=d;c[f>>2]=a;c[g>>2]=b;c[h>>2]=Kv(c[f>>2]|0)|0;if((c[h>>2]|0)>>>0>=12){c[e>>2]=-1;j=c[e>>2]|0;i=d;return j|0}else{b=c[g>>2]|0;c[b>>2]=0;c[b+4>>2]=0;c[b+8>>2]=0;c[b+12>>2]=0;c[b+16>>2]=0;c[b+20>>2]=0;Dx((c[g>>2]|0)+12|0,c[f>>2]|0,c[h>>2]|0)|0;c[e>>2]=1;j=c[e>>2]|0;i=d;return j|0}return 0}function Pu(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;d=i;i=i+16|0;e=d+8|0;f=d+4|0;g=d;c[f>>2]=a;c[g>>2]=b;do if(0!=(Qu(c[f>>2]|0)|0)?0!=(Qu(c[g>>2]|0)|0):0)if(!(Vv((c[f>>2]|0)+12|0,(c[g>>2]|0)+12|0)|0)){c[e>>2]=1;break}else{c[e>>2]=0;break}else h=3;while(0);if((h|0)==3)c[e>>2]=-1;i=d;return c[e>>2]|0}function Qu(b){b=b|0;var d=0,e=0;d=i;i=i+16|0;e=d;c[e>>2]=b;i=d;return 0!=(a[(c[e>>2]|0)+12>>0]|0)|0}function Ru(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;d=i;i=i+96|0;e=d+64|0;f=d+56|0;g=d+48|0;h=d+92|0;j=d+88|0;k=d+84|0;l=d+24|0;m=d;n=d+80|0;o=d+76|0;p=d+72|0;c[j>>2]=a;c[k>>2]=b;if(1!=(Pu(c[j>>2]|0,c[k>>2]|0)|0)){c[n>>2]=325;if((c[3925]|0)==-1)c[3925]=Mc(1,0,61566,61575,c[n>>2]|0)|0;if((Pc()|0)>0){Qc(-1,0);Lc()}if(!(c[3925]|0))Lc();c[g>>2]=61566;c[g+4>>2]=325;Rc(1,61592,g);Lc()}g=c[j>>2]|0;c[l>>2]=c[g>>2];c[l+4>>2]=c[g+4>>2];c[l+8>>2]=c[g+8>>2];c[l+12>>2]=c[g+12>>2];c[l+16>>2]=c[g+16>>2];c[l+20>>2]=c[g+20>>2];g=c[k>>2]|0;c[m>>2]=c[g>>2];c[m+4>>2]=c[g+4>>2];c[m+8>>2]=c[g+8>>2];c[m+12>>2]=c[g+12>>2];c[m+16>>2]=c[g+16>>2];c[m+20>>2]=c[g+20>>2];if(-1==(Su(l)|0)){c[o>>2]=329;if((c[3926]|0)==-1)c[3926]=Mc(1,0,61566,61575,c[o>>2]|0)|0;if((Pc()|0)>0){Qc(-1,0);Lc()}if(!(c[3926]|0))Lc();c[f>>2]=61566;c[f+4>>2]=329;Rc(1,61592,f);Lc()}if(-1==(Su(m)|0)){c[p>>2]=331;if((c[3927]|0)==-1)c[3927]=Mc(1,0,61566,61575,c[p>>2]|0)|0;if((Pc()|0)>0){Qc(-1,0);Lc()}if(!(c[3927]|0))Lc();c[e>>2]=61566;c[e+4>>2]=331;Rc(1,61592,e);Lc()}e=l;p=m;if(!((c[e>>2]|0)==(c[p>>2]|0)?(c[e+4>>2]|0)==(c[p+4>>2]|0):0)){p=l;e=c[p+4>>2]|0;f=m;o=c[f+4>>2]|0;if(e>>>0<o>>>0|((e|0)==(o|0)?(c[p>>2]|0)>>>0<(c[f>>2]|0)>>>0:0)){c[h>>2]=-1;q=c[h>>2]|0;i=d;return q|0}else{c[h>>2]=1;q=c[h>>2]|0;i=d;return q|0}}if((c[l+8>>2]|0)>>>0<(c[m+8>>2]|0)>>>0){c[h>>2]=-1;q=c[h>>2]|0;i=d;return q|0}if((c[l+8>>2]|0)>>>0>(c[m+8>>2]|0)>>>0){c[h>>2]=1;q=c[h>>2]|0;i=d;return q|0}else{c[h>>2]=0;q=c[h>>2]|0;i=d;return q|0}return 0}function Su(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0;b=i;i=i+16|0;d=b+8|0;e=b+4|0;f=b;c[e>>2]=a;if(1!=(Qu(c[e>>2]|0)|0)){c[d>>2]=-1;g=c[d>>2]|0;i=b;return g|0}c[f>>2]=0;while(1){a=c[e>>2]|0;if((c[a>>2]|0)!=-1?1:(c[a+4>>2]|0)!=-1)h=(c[(c[e>>2]|0)+8>>2]|0)>>>0>=1e6;else h=0;a=(c[e>>2]|0)+8|0;j=c[a>>2]|0;if(!h)break;c[a>>2]=j-1e6;a=c[e>>2]|0;k=a;l=Ax(c[k>>2]|0,c[k+4>>2]|0,1,0)|0;k=a;c[k>>2]=l;c[k+4>>2]=C;c[f>>2]=1}if(j>>>0>=1e6){Tu(c[e>>2]|0);c[d>>2]=-1;g=c[d>>2]|0;i=b;return g|0}else{c[d>>2]=c[f>>2];g=c[d>>2]|0;i=b;return g|0}return 0}function Tu(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;a=c[d>>2]|0;c[a>>2]=0;c[a+4>>2]=0;c[a+8>>2]=0;c[a+12>>2]=0;c[a+16>>2]=0;c[a+20>>2]=0;i=b;return}function Uu(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;e=i;i=i+112|0;f=e+64|0;g=e+56|0;h=e+48|0;j=e+96|0;k=e+92|0;l=e+88|0;m=e+84|0;n=e+24|0;o=e;p=e+80|0;q=e+76|0;r=e+72|0;c[k>>2]=a;c[l>>2]=b;c[m>>2]=d;if(1!=(Pu(c[l>>2]|0,c[m>>2]|0)|0)){Tu(c[k>>2]|0);c[j>>2]=-1;s=c[j>>2]|0;i=e;return s|0}d=c[l>>2]|0;c[n>>2]=c[d>>2];c[n+4>>2]=c[d+4>>2];c[n+8>>2]=c[d+8>>2];c[n+12>>2]=c[d+12>>2];c[n+16>>2]=c[d+16>>2];c[n+20>>2]=c[d+20>>2];d=c[m>>2]|0;c[o>>2]=c[d>>2];c[o+4>>2]=c[d+4>>2];c[o+8>>2]=c[d+8>>2];c[o+12>>2]=c[d+12>>2];c[o+16>>2]=c[d+16>>2];c[o+20>>2]=c[d+20>>2];if(-1!=(Su(n)|0)?-1!=(Su(o)|0):0){do if((c[n+8>>2]|0)>>>0<(c[o+8>>2]|0)>>>0){d=n;if(!(0==(c[d>>2]|0)?0==(c[d+4>>2]|0):0)){d=n+8|0;c[d>>2]=(c[d>>2]|0)+1e6;d=n;m=Ax(c[d>>2]|0,c[d+4>>2]|0,-1,-1)|0;d=n;c[d>>2]=m;c[d+4>>2]=C;break}Tu(c[k>>2]|0);c[j>>2]=-1;s=c[j>>2]|0;i=e;return s|0}while(0);d=n;m=c[d+4>>2]|0;l=o;b=c[l+4>>2]|0;if(m>>>0<b>>>0|((m|0)==(b|0)?(c[d>>2]|0)>>>0<(c[l>>2]|0)>>>0:0)){Tu(c[k>>2]|0);c[j>>2]=-1;s=c[j>>2]|0;i=e;return s|0}if(1!=(Ou(n+12|0,c[k>>2]|0)|0)){c[p>>2]=397;if((c[3928]|0)==-1)c[3928]=Mc(1,0,61566,61620,c[p>>2]|0)|0;if((Pc()|0)>0){Qc(-1,0);Lc()}if(!(c[3928]|0))Lc();c[h>>2]=61566;c[h+4>>2]=397;Rc(1,61592,h);Lc()}if((c[n+8>>2]|0)>>>0<(c[o+8>>2]|0)>>>0){c[q>>2]=398;if((c[3929]|0)==-1)c[3929]=Mc(1,0,61566,61620,c[q>>2]|0)|0;if((Pc()|0)>0){Qc(-1,0);Lc()}if(!(c[3929]|0))Lc();c[g>>2]=61566;c[g+4>>2]=398;Rc(1,61592,g);Lc()}c[(c[k>>2]|0)+8>>2]=(c[n+8>>2]|0)-(c[o+8>>2]|0);g=n;q=c[g+4>>2]|0;h=o;p=c[h+4>>2]|0;if(q>>>0>p>>>0|((q|0)==(p|0)?(c[g>>2]|0)>>>0>=(c[h>>2]|0)>>>0:0)){h=n;n=o;o=zx(c[h>>2]|0,c[h+4>>2]|0,c[n>>2]|0,c[n+4>>2]|0)|0;n=c[k>>2]|0;c[n>>2]=o;c[n+4>>2]=C;if(0==(c[(c[k>>2]|0)+8>>2]|0)?(n=c[k>>2]|0,0==(c[n>>2]|0)?0==(c[n+4>>2]|0):0):0){c[j>>2]=0;s=c[j>>2]|0;i=e;return s|0}c[j>>2]=1;s=c[j>>2]|0;i=e;return s|0}c[r>>2]=400;if((c[3930]|0)==-1)c[3930]=Mc(1,0,61566,61620,c[r>>2]|0)|0;if((Pc()|0)>0){Qc(-1,0);Lc()}if(!(c[3930]|0))Lc();c[f>>2]=61566;c[f+4>>2]=400;Rc(1,61592,f);Lc()}Tu(c[k>>2]|0);c[j>>2]=-1;s=c[j>>2]|0;i=e;return s|0}function Vu(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;e=i;i=i+112|0;f=e+72|0;g=e+96|0;h=e+92|0;j=e+88|0;k=e+84|0;l=e+48|0;m=e+24|0;n=e;o=e+80|0;c[h>>2]=a;c[j>>2]=b;c[k>>2]=d;if(1!=(Pu(c[j>>2]|0,c[k>>2]|0)|0)){Tu(c[h>>2]|0);c[g>>2]=-1;p=c[g>>2]|0;i=e;return p|0}d=c[j>>2]|0;c[l>>2]=c[d>>2];c[l+4>>2]=c[d+4>>2];c[l+8>>2]=c[d+8>>2];c[l+12>>2]=c[d+12>>2];c[l+16>>2]=c[d+16>>2];c[l+20>>2]=c[d+20>>2];d=c[k>>2]|0;c[m>>2]=c[d>>2];c[m+4>>2]=c[d+4>>2];c[m+8>>2]=c[d+8>>2];c[m+12>>2]=c[d+12>>2];c[m+16>>2]=c[d+16>>2];c[m+20>>2]=c[d+20>>2];if(-1!=(Su(l)|0)?-1!=(Su(m)|0):0){if(1==(Ou((c[j>>2]|0)+12|0,n)|0)){j=l;d=m;k=Ax(c[j>>2]|0,c[j+4>>2]|0,c[d>>2]|0,c[d+4>>2]|0)|0;d=n;c[d>>2]=k;c[d+4>>2]=C;d=n;k=c[d+4>>2]|0;j=l;b=c[j+4>>2]|0;if(k>>>0<b>>>0|((k|0)==(b|0)?(c[d>>2]|0)>>>0<(c[j>>2]|0)>>>0:0)){Tu(c[h>>2]|0);c[g>>2]=-1;p=c[g>>2]|0;i=e;return p|0}c[n+8>>2]=(c[l+8>>2]|0)+(c[m+8>>2]|0);m=-1==(Su(n)|0);l=c[h>>2]|0;if(m){Tu(l);c[g>>2]=-1;p=c[g>>2]|0;i=e;return p|0}else{c[l>>2]=c[n>>2];c[l+4>>2]=c[n+4>>2];c[l+8>>2]=c[n+8>>2];c[l+12>>2]=c[n+12>>2];c[l+16>>2]=c[n+16>>2];c[l+20>>2]=c[n+20>>2];c[g>>2]=1;p=c[g>>2]|0;i=e;return p|0}}c[o>>2]=444;if((c[3931]|0)==-1)c[3931]=Mc(1,0,61566,61642,c[o>>2]|0)|0;if((Pc()|0)>0){Qc(-1,0);Lc()}if(!(c[3931]|0))Lc();c[f>>2]=61566;c[f+4>>2]=444;Rc(1,61592,f);Lc()}Tu(c[h>>2]|0);c[g>>2]=-1;p=c[g>>2]|0;i=e;return p|0}function Wu(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=c[a+60>>2];a=Xu(ta(6,d|0)|0)|0;i=b;return a|0}function Xu(a){a=a|0;var b=0;if(a>>>0>4294963200){c[(Yu()|0)>>2]=0-a;b=-1}else b=a;return b|0}function Yu(){var a=0;if(!(c[17776]|0))a=71148;else a=c[(Ta()|0)+64>>2]|0;return a|0}function Zu(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0;f=i;i=i+80|0;g=f;c[b+36>>2]=25;if((c[b>>2]&64|0)==0?(c[g>>2]=c[b+60>>2],c[g+4>>2]=21505,c[g+8>>2]=f+12,(_a(54,g|0)|0)!=0):0)a[b+75>>0]=-1;g=_u(b,d,e)|0;i=f;return g|0}function _u(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0;e=i;i=i+48|0;f=e+16|0;g=e;h=e+32|0;j=a+28|0;k=c[j>>2]|0;c[h>>2]=k;l=a+20|0;m=(c[l>>2]|0)-k|0;c[h+4>>2]=m;c[h+8>>2]=b;c[h+12>>2]=d;b=a+60|0;k=a+44|0;n=h;h=2;o=m+d|0;while(1){if(!(c[17776]|0)){c[f>>2]=c[b>>2];c[f+4>>2]=n;c[f+8>>2]=h;p=Xu(tb(146,f|0)|0)|0}else{rb(6,a|0);c[g>>2]=c[b>>2];c[g+4>>2]=n;c[g+8>>2]=h;m=Xu(tb(146,g|0)|0)|0;oa(0);p=m}if((o|0)==(p|0)){q=6;break}if((p|0)<0){r=n;s=h;q=8;break}m=o-p|0;t=c[n+4>>2]|0;if(p>>>0<=t>>>0)if((h|0)==2){c[j>>2]=(c[j>>2]|0)+p;u=t;v=p;w=n;x=2}else{u=t;v=p;w=n;x=h}else{y=c[k>>2]|0;c[j>>2]=y;c[l>>2]=y;u=c[n+12>>2]|0;v=p-t|0;w=n+8|0;x=h+-1|0}c[w>>2]=(c[w>>2]|0)+v;c[w+4>>2]=u-v;n=w;h=x;o=m}if((q|0)==6){o=c[k>>2]|0;c[a+16>>2]=o+(c[a+48>>2]|0);k=o;c[j>>2]=k;c[l>>2]=k;z=d}else if((q|0)==8){c[a+16>>2]=0;c[j>>2]=0;c[l>>2]=0;c[a>>2]=c[a>>2]|32;if((s|0)==2)z=0;else z=d-(c[r+4>>2]|0)|0}i=e;return z|0}function $u(a){a=a|0;if(!(c[a+68>>2]|0))av(a);return}function av(a){a=a|0;return}function bv(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=i;i=i+32|0;f=e;g=e+20|0;c[f>>2]=c[a+60>>2];c[f+4>>2]=0;c[f+8>>2]=b;c[f+12>>2]=g;c[f+16>>2]=d;if((Xu(ob(140,f|0)|0)|0)<0){c[g>>2]=-1;h=-1}else h=c[g>>2]|0;i=e;return h|0}function cv(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;f=i;i=i+48|0;g=f+16|0;h=f;j=f+32|0;c[j>>2]=d;k=j+4|0;l=b+48|0;m=c[l>>2]|0;c[k>>2]=e-((m|0)!=0&1);n=b+44|0;c[j+8>>2]=c[n>>2];c[j+12>>2]=m;if(!(c[17776]|0)){c[g>>2]=c[b+60>>2];c[g+4>>2]=j;c[g+8>>2]=2;o=Xu(sb(145,g|0)|0)|0}else{rb(7,b|0);c[h>>2]=c[b+60>>2];c[h+4>>2]=j;c[h+8>>2]=2;j=Xu(sb(145,h|0)|0)|0;oa(0);o=j}if((o|0)>=1){j=c[k>>2]|0;if(o>>>0>j>>>0){k=c[n>>2]|0;n=b+4|0;c[n>>2]=k;h=k;c[b+8>>2]=h+(o-j);if(!(c[l>>2]|0))p=e;else{c[n>>2]=h+1;a[d+(e+-1)>>0]=a[h>>0]|0;p=e}}else p=o}else{c[b>>2]=c[b>>2]|o&48^16;c[b+8>>2]=0;c[b+4>>2]=0;p=o}i=f;return p|0}function dv(a){a=a|0;if(!(c[a+68>>2]|0))av(a);return}function ev(a){a=a|0;return fv(a)|0}function fv(a){a=a|0;return ((a|0)==32|(a|0)==9)&1|0}function gv(b,c){b=b|0;c=c|0;var d=0,e=0,f=0,g=0;d=a[b>>0]|0;e=a[c>>0]|0;if(d<<24>>24==0?1:d<<24>>24!=e<<24>>24){f=d;g=e}else{e=b;b=c;do{e=e+1|0;b=b+1|0;c=a[e>>0]|0;d=a[b>>0]|0}while(!(c<<24>>24==0?1:c<<24>>24!=d<<24>>24));f=c;g=d}return (f&255)-(g&255)|0}function hv(a){a=a|0;var b=0;b=(iv(a)|0)==0;return (b?a:a|32)|0}function iv(a){a=a|0;return (a+-65|0)>>>0<26|0}function jv(a){a=a|0;return kv(a,0)|0}function kv(c,f){c=c|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;g=(f<<1)+-1|0;h=f+-1|0;a:do if(!((c+-43008|0)>>>0<22272|((c+-11776|0)>>>0<30784|((c+-1536|0)>>>0<2560|(lv(c)|0)==0)))){i=(f|0)!=0;if(i&(c+-4256|0)>>>0<46){if((c|0)>4293)switch(c|0){case 4295:case 4301:break;default:{j=c;break a}}j=c+7264|0;break}if((c+-11520|0)>>>0<38&(i^1)){if((c|0)>11557)switch(c|0){case 11559:case 11565:break;default:{j=c;break a}}j=c+-7264|0;break}else k=0;do{i=a[18850+(k<<2)+2>>0]|0;l=i<<24>>24;m=c-(e[18850+(k<<2)>>1]|0)|0;if((m-(l&h)|0)>>>0<(d[18850+(k<<2)+3>>0]|0)>>>0){n=i;o=l;p=m;q=13;break}k=k+1|0}while((k|0)!=61);if((q|0)==13)if(n<<24>>24==1){j=f+c-(p&1)|0;break}else{j=(_(o,g)|0)+c|0;break}m=1-f|0;l=b[18358+(m<<1)>>1]|0;b:do if(l<<16>>16){i=l;r=0;while(1){if((i&65535|0)==(c|0)){s=r;break}r=r+1|0;i=b[18358+(r<<2)+(m<<1)>>1]|0;if(!(i<<16>>16))break b}j=e[18358+(s<<2)+(f<<1)>>1]|0;break a}while(0);if((c+-66600+(f*40|0)|0)>>>0<40)j=c+-40+(f*80|0)|0;else j=c}else j=c;while(0);return j|0}function lv(a){a=a|0;var b=0;if(a>>>0<131072)b=(d[61659+((d[61659+(a>>>8)>>0]|0)<<5|a>>>3&31)>>0]|0)>>>(a&7)&1;else b=a>>>0<196606&1;return b|0}function mv(a){a=a|0;return kv(a,1)|0}function nv(a){a=a|0;return (a+-97|0)>>>0<26|0}function ov(b){b=b|0;var c=0,e=0,f=0,g=0,h=0,i=0,j=0;c=0;while(1){if((d[64635+c>>0]|0)==(b|0)){e=c;f=2;break}c=c+1|0;if((c|0)==87){g=87;h=64723;f=5;break}}if((f|0)==2)if(!e)i=64723;else{g=e;h=64723;f=5}if((f|0)==5)while(1){f=0;e=h;while(1){c=e+1|0;if(!(a[e>>0]|0)){j=c;break}else e=c}g=g+-1|0;if(!g){i=j;break}else{h=j;f=5}}return i|0}function pv(a){a=a|0;var b=0;if(!a)b=0;else b=(qv(16168,a)|0)!=0;return b&1|0}function qv(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;if(!b)d=a+((rv(a)|0)<<2)|0;else{e=a;while(1){a=c[e>>2]|0;if((a|0)==0|(a|0)==(b|0)){f=e;g=a;break}else e=e+4|0}d=(g|0)!=0?f:0}return d|0}function rv(a){a=a|0;var b=0,d=0;b=a;while(1)if(!(c[b>>2]|0)){d=b;break}else b=b+4|0;return d-a>>2|0}function sv(a){a=a|0;var b=0;if((a+-48|0)>>>0<10)b=1;else b=((a|32)+-97|0)>>>0<6;return b&1|0}function tv(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0;f=i;i=i+16|0;g=f;c[g>>2]=e;e=uv(a,b,d,g)|0;i=f;return e|0}function uv(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;g=i;i=i+128|0;h=g+112|0;j=g;k=j;l=16256;m=k+112|0;do{c[k>>2]=c[l>>2];k=k+4|0;l=l+4|0}while((k|0)<(m|0));if((d+-1|0)>>>0>2147483646)if(!d){n=h;o=1;p=4}else{c[(Yu()|0)>>2]=75;q=-1}else{n=b;o=d;p=4}if((p|0)==4){p=-2-n|0;d=o>>>0>p>>>0?p:o;c[j+48>>2]=d;o=j+20|0;c[o>>2]=n;c[j+44>>2]=n;p=n+d|0;n=j+16|0;c[n>>2]=p;c[j+28>>2]=p;p=wv(j,e,f)|0;if(!d)q=p;else{d=c[o>>2]|0;a[d+(((d|0)==(c[n>>2]|0))<<31>>31)>>0]=0;q=p}}i=g;return q|0}function vv(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0;e=a+20|0;f=c[e>>2]|0;g=(c[a+16>>2]|0)-f|0;a=g>>>0>d>>>0?d:g;Dx(f|0,b|0,a|0)|0;c[e>>2]=(c[e>>2]|0)+a;return d|0}function wv(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;f=i;i=i+224|0;g=f+120|0;h=f+80|0;j=f;k=f+136|0;l=h;m=l+40|0;do{c[l>>2]=0;l=l+4|0}while((l|0)<(m|0));c[g>>2]=c[e>>2];if((xv(0,d,g,j,h)|0)<0)n=-1;else{if((c[b+76>>2]|0)>-1)o=Iv(b)|0;else o=0;e=c[b>>2]|0;l=e&32;if((a[b+74>>0]|0)<1)c[b>>2]=e&-33;e=b+48|0;if(!(c[e>>2]|0)){m=b+44|0;p=c[m>>2]|0;c[m>>2]=k;q=b+28|0;c[q>>2]=k;r=b+20|0;c[r>>2]=k;c[e>>2]=80;s=b+16|0;c[s>>2]=k+80;k=xv(b,d,g,j,h)|0;if(!p)t=k;else{vb[c[b+36>>2]&63](b,0,0)|0;u=(c[r>>2]|0)==0?-1:k;c[m>>2]=p;c[e>>2]=0;c[s>>2]=0;c[q>>2]=0;c[r>>2]=0;t=u}}else t=xv(b,d,g,j,h)|0;h=c[b>>2]|0;c[b>>2]=h|l;if(o)av(b);n=(h&32|0)==0?t:-1}i=f;return n|0}function xv(e,f,g,j,l){e=e|0;f=f|0;g=g|0;j=j|0;l=l|0;var m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,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0;L=0;M=0;N=0;O=f;a:while(1){do if((L|0)>-1)if((M|0)>(2147483647-L|0)){c[(Yu()|0)>>2]=75;P=-1;break}else{P=M+L|0;break}else P=L;while(0);f=a[O>>0]|0;if(!(f<<24>>24)){Q=P;R=N;S=244;break}else{T=f;U=O}b:while(1){switch(T<<24>>24){case 37:{V=U;W=U;S=9;break b;break}case 0:{X=U;Y=U;break b;break}default:{}}f=U+1|0;T=a[f>>0]|0;U=f}c:do if((S|0)==9)while(1){S=0;if((a[V+1>>0]|0)!=37){X=V;Y=W;break c}f=W+1|0;Z=V+2|0;if((a[Z>>0]|0)==37){V=Z;W=f;S=9}else{X=Z;Y=f;break}}while(0);f=Y-O|0;if(v?(c[e>>2]&32|0)==0:0)yv(O,f,e)|0;if((Y|0)!=(O|0)){L=P;M=f;O=X;continue}Z=X+1|0;$=a[Z>>0]|0;aa=($<<24>>24)+-48|0;if(aa>>>0<10){ba=(a[X+2>>0]|0)==36;ca=ba?X+3|0:Z;da=a[ca>>0]|0;ea=ba?aa:-1;fa=ba?1:N;ga=ca}else{da=$;ea=-1;fa=N;ga=Z}Z=da<<24>>24;d:do if((Z&-32|0)==32){$=Z;ca=da;ba=0;aa=ga;while(1){if(!(1<<$+-32&75913)){ha=ca;ia=ba;ja=aa;break d}ka=1<<(ca<<24>>24)+-32|ba;la=aa+1|0;ma=a[la>>0]|0;$=ma<<24>>24;if(($&-32|0)!=32){ha=ma;ia=ka;ja=la;break}else{ca=ma;ba=ka;aa=la}}}else{ha=da;ia=0;ja=ga}while(0);do if(ha<<24>>24==42){Z=ja+1|0;aa=(a[Z>>0]|0)+-48|0;if(aa>>>0<10?(a[ja+2>>0]|0)==36:0){c[l+(aa<<2)>>2]=10;na=1;oa=ja+3|0;pa=c[j+((a[Z>>0]|0)+-48<<3)>>2]|0}else{if(fa){qa=-1;break a}if(!v){ra=ia;sa=0;ta=Z;ua=0;break}aa=(c[g>>2]|0)+(4-1)&~(4-1);ba=c[aa>>2]|0;c[g>>2]=aa+4;na=0;oa=Z;pa=ba}if((pa|0)<0){ra=ia|8192;sa=na;ta=oa;ua=0-pa|0}else{ra=ia;sa=na;ta=oa;ua=pa}}else{ba=(ha<<24>>24)+-48|0;if(ba>>>0<10){Z=ja;aa=0;ca=ba;while(1){ba=(aa*10|0)+ca|0;$=Z+1|0;ca=(a[$>>0]|0)+-48|0;if(ca>>>0>=10){va=ba;wa=$;break}else{Z=$;aa=ba}}if((va|0)<0){qa=-1;break a}else{ra=ia;sa=fa;ta=wa;ua=va}}else{ra=ia;sa=fa;ta=ja;ua=0}}while(0);e:do if((a[ta>>0]|0)==46){aa=ta+1|0;Z=a[aa>>0]|0;if(Z<<24>>24!=42){ca=(Z<<24>>24)+-48|0;if(ca>>>0<10){xa=aa;ya=0;za=ca}else{Aa=0;Ba=aa;break}while(1){aa=(ya*10|0)+za|0;ca=xa+1|0;za=(a[ca>>0]|0)+-48|0;if(za>>>0>=10){Aa=aa;Ba=ca;break e}else{xa=ca;ya=aa}}}aa=ta+2|0;ca=(a[aa>>0]|0)+-48|0;if(ca>>>0<10?(a[ta+3>>0]|0)==36:0){c[l+(ca<<2)>>2]=10;Aa=c[j+((a[aa>>0]|0)+-48<<3)>>2]|0;Ba=ta+4|0;break}if(sa){qa=-1;break a}if(v){ca=(c[g>>2]|0)+(4-1)&~(4-1);Z=c[ca>>2]|0;c[g>>2]=ca+4;Aa=Z;Ba=aa}else{Aa=0;Ba=aa}}else{Aa=-1;Ba=ta}while(0);aa=Ba;Z=0;while(1){ca=(a[aa>>0]|0)+-65|0;if(ca>>>0>57){qa=-1;break a}ba=aa+1|0;$=a[66527+(Z*58|0)+ca>>0]|0;ca=$&255;if((ca+-1|0)>>>0<8){aa=ba;Z=ca}else{Ca=ba;Da=$;Ea=ca;Fa=aa;Ga=Z;break}}if(!(Da<<24>>24)){qa=-1;break}Z=(ea|0)>-1;do if(Da<<24>>24==19)if(Z){qa=-1;break a}else S=52;else{if(Z){c[l+(ea<<2)>>2]=Ea;aa=j+(ea<<3)|0;ca=c[aa+4>>2]|0;$=r;c[$>>2]=c[aa>>2];c[$+4>>2]=ca;S=52;break}if(!v){qa=0;break a}Av(r,Ea,g)}while(0);if((S|0)==52?(S=0,!v):0){L=P;M=f;N=sa;O=Ca;continue}Z=a[Fa>>0]|0;ca=(Ga|0)!=0&(Z&15|0)==3?Z&-33:Z;Z=ra&-65537;$=(ra&8192|0)==0?ra:Z;f:do switch(ca|0){case 110:{switch(Ga|0){case 0:{c[c[r>>2]>>2]=P;L=P;M=f;N=sa;O=Ca;continue a;break}case 1:{c[c[r>>2]>>2]=P;L=P;M=f;N=sa;O=Ca;continue a;break}case 2:{aa=c[r>>2]|0;c[aa>>2]=P;c[aa+4>>2]=((P|0)<0)<<31>>31;L=P;M=f;N=sa;O=Ca;continue a;break}case 3:{b[c[r>>2]>>1]=P;L=P;M=f;N=sa;O=Ca;continue a;break}case 4:{a[c[r>>2]>>0]=P;L=P;M=f;N=sa;O=Ca;continue a;break}case 6:{c[c[r>>2]>>2]=P;L=P;M=f;N=sa;O=Ca;continue a;break}case 7:{aa=c[r>>2]|0;c[aa>>2]=P;c[aa+4>>2]=((P|0)<0)<<31>>31;L=P;M=f;N=sa;O=Ca;continue a;break}default:{L=P;M=f;N=sa;O=Ca;continue a}}break}case 112:{Ha=$|8;Ia=Aa>>>0>8?Aa:8;Ja=120;S=64;break}case 88:case 120:{Ha=$;Ia=Aa;Ja=ca;S=64;break}case 111:{aa=r;ba=c[aa>>2]|0;la=c[aa+4>>2]|0;if((ba|0)==0&(la|0)==0)Ka=w;else{aa=w;ka=ba;ba=la;while(1){la=aa+-1|0;a[la>>0]=ka&7|48;ka=Cx(ka|0,ba|0,3)|0;ba=C;if((ka|0)==0&(ba|0)==0){Ka=la;break}else aa=la}}if(!($&8)){La=Ka;Ma=$;Na=Aa;Oa=0;Pa=67007;S=77}else{aa=x-Ka|0;La=Ka;Ma=$;Na=(Aa|0)>(aa|0)?Aa:aa+1|0;Oa=0;Pa=67007;S=77}break}case 105:case 100:{aa=r;ba=c[aa>>2]|0;ka=c[aa+4>>2]|0;if((ka|0)<0){aa=zx(0,0,ba|0,ka|0)|0;la=C;ma=r;c[ma>>2]=aa;c[ma+4>>2]=la;Qa=aa;Ra=la;Sa=1;Ta=67007;S=76;break f}if(!($&2048)){la=$&1;Qa=ba;Ra=ka;Sa=la;Ta=(la|0)==0?67007:67009;S=76}else{Qa=ba;Ra=ka;Sa=1;Ta=67008;S=76}break}case 117:{ka=r;Qa=c[ka>>2]|0;Ra=c[ka+4>>2]|0;Sa=0;Ta=67007;S=76;break}case 99:{a[y>>0]=c[r>>2];Ua=y;Va=Z;Wa=1;Xa=0;Ya=67007;Za=w;break}case 109:{_a=ov(c[(Yu()|0)>>2]|0)|0;S=82;break}case 115:{ka=c[r>>2]|0;_a=(ka|0)!=0?ka:67017;S=82;break}case 67:{c[t>>2]=c[r>>2];c[s>>2]=0;c[r>>2]=t;$a=t;ab=-1;S=86;break}case 83:{ka=c[r>>2]|0;if(!Aa){Dv(e,32,ua,0,$);bb=0;S=97}else{$a=ka;ab=Aa;S=86}break}case 65:case 71:case 70:case 69:case 97:case 103:case 102:case 101:{cb=+h[r>>3];c[o>>2]=0;h[k>>3]=cb;if((c[k+4>>2]|0)>=0)if(!($&2048)){ka=$&1;db=cb;eb=ka;fb=(ka|0)==0?67025:67030}else{db=cb;eb=1;fb=67027}else{db=-cb;eb=1;fb=67024}h[k>>3]=db;ka=c[k+4>>2]&2146435072;do if(ka>>>0<2146435072|(ka|0)==2146435072&0<0){cb=+Gv(db,o)*2.0;ba=cb!=0.0;if(ba)c[o>>2]=(c[o>>2]|0)+-1;la=ca|32;if((la|0)==97){aa=ca&32;ma=(aa|0)==0?fb:fb+9|0;gb=eb|2;hb=12-Aa|0;do if(!(Aa>>>0>11|(hb|0)==0)){ib=hb;jb=8.0;while(1){ib=ib+-1|0;kb=jb*16.0;if(!ib){lb=kb;break}else jb=kb}if((a[ma>>0]|0)==45){mb=-(lb+(-cb-lb));break}else{mb=cb+lb-lb;break}}else mb=cb;while(0);hb=c[o>>2]|0;ib=(hb|0)<0?0-hb|0:hb;nb=Bv(ib,((ib|0)<0)<<31>>31,B)|0;if((nb|0)==(B|0)){a[D>>0]=48;ob=D}else ob=nb;a[ob+-1>>0]=(hb>>31&2)+43;hb=ob+-2|0;a[hb>>0]=ca+15;nb=(Aa|0)<1;ib=($&8|0)==0;jb=mb;pb=p;while(1){qb=~~jb;rb=pb+1|0;a[pb>>0]=d[66991+qb>>0]|aa;jb=(jb-+(qb|0))*16.0;do if((rb-z|0)==1){if(ib&(nb&jb==0.0)){sb=rb;break}a[rb>>0]=46;sb=pb+2|0}else sb=rb;while(0);if(!(jb!=0.0)){tb=sb;break}else pb=sb}pb=tb;nb=hb;ib=(Aa|0)!=0&(F+pb|0)<(Aa|0)?G+Aa-nb|0:E-nb+pb|0;aa=ib+gb|0;Dv(e,32,ua,aa,$);if(!(c[e>>2]&32))yv(ma,gb,e)|0;Dv(e,48,ua,aa,$^65536);rb=pb-z|0;if(!(c[e>>2]&32))yv(p,rb,e)|0;pb=q-nb|0;Dv(e,48,ib-(rb+pb)|0,0,0);if(!(c[e>>2]&32))yv(hb,pb,e)|0;Dv(e,32,ua,aa,$^8192);ub=(aa|0)<(ua|0)?ua:aa;break}aa=(Aa|0)<0?6:Aa;if(ba){pb=(c[o>>2]|0)+-28|0;c[o>>2]=pb;vb=cb*268435456.0;wb=pb}else{vb=cb;wb=c[o>>2]|0}pb=(wb|0)<0?n:H;rb=pb;jb=vb;ib=pb;while(1){nb=~~jb>>>0;c[ib>>2]=nb;qb=ib+4|0;jb=(jb-+(nb>>>0))*1.0e9;if(!(jb!=0.0)){xb=qb;break}else ib=qb}ib=c[o>>2]|0;if((ib|0)>0){ba=ib;hb=pb;gb=xb;while(1){ma=(ba|0)>29?29:ba;qb=gb+-4|0;do if(qb>>>0<hb>>>0)yb=hb;else{nb=0;zb=qb;while(1){Ab=Ix(c[zb>>2]|0,0,ma|0)|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b=10}while(1){Sb=Sb*10|0;nb=Rb+1|0;if(qb>>>0<Sb>>>0){Qb=nb;break}else Rb=nb}}else Qb=0;while(0);qb=(la|0)==103;Cb=(aa|0)!=0;nb=aa-((la|0)!=102?Qb:0)+((Cb&qb)<<31>>31)|0;if((nb|0)<(((Pb-rb>>2)*9|0)+-9|0)){ba=nb+9216|0;nb=pb+4+(((ba|0)/9|0)+-1024<<2)|0;gb=((ba|0)%9|0)+1|0;if((gb|0)<9){ba=10;hb=gb;while(1){gb=ba*10|0;hb=hb+1|0;if((hb|0)==9){Tb=gb;break}else ba=gb}}else Tb=10;ba=c[nb>>2]|0;hb=(ba>>>0)%(Tb>>>0)|0;la=(nb+4|0)==(Pb|0);do if(la&(hb|0)==0){Ub=Ob;Vb=nb;Wb=Qb}else{jb=(((ba>>>0)/(Tb>>>0)|0)&1|0)==0?9007199254740992.0:9007199254740994.0;gb=(Tb|0)/2|0;if(hb>>>0<gb>>>0)Xb=.5;else Xb=la&(hb|0)==(gb|0)?1.0:1.5;do if(!eb){Yb=jb;Zb=Xb}else{if((a[fb>>0]|0)!=45){Yb=jb;Zb=Xb;break}Yb=-jb;Zb=-Xb}while(0);gb=ba-hb|0;c[nb>>2]=gb;if(!(Yb+Zb!=Yb)){Ub=Ob;Vb=nb;Wb=Qb;break}ib=gb+Tb|0;c[nb>>2]=ib;if(ib>>>0>999999999){ib=Ob;gb=nb;while(1){Bb=gb+-4|0;c[gb>>2]=0;if(Bb>>>0<ib>>>0){ma=ib+-4|0;c[ma>>2]=0;_b=ma}else _b=ib;ma=(c[Bb>>2]|0)+1|0;c[Bb>>2]=ma;if(ma>>>0>999999999){ib=_b;gb=Bb}else{$b=_b;ac=Bb;break}}}else{$b=Ob;ac=nb}gb=(rb-$b>>2)*9|0;ib=c[$b>>2]|0;if(ib>>>0<10){Ub=$b;Vb=ac;Wb=gb;break}else{bc=gb;cc=10}while(1){cc=cc*10|0;gb=bc+1|0;if(ib>>>0<cc>>>0){Ub=$b;Vb=ac;Wb=gb;break}else bc=gb}}while(0);nb=Vb+4|0;dc=Ub;ec=Wb;fc=Pb>>>0>nb>>>0?nb:Pb}else{dc=Ob;ec=Qb;fc=Pb}nb=0-ec|0;hb=fc;while(1){if(hb>>>0<=dc>>>0){gc=0;hc=hb;break}ba=hb+-4|0;if(!(c[ba>>2]|0))hb=ba;else{gc=1;hc=hb;break}}do if(qb){hb=(Cb&1^1)+aa|0;if((hb|0)>(ec|0)&(ec|0)>-5){ic=ca+-1|0;jc=hb+-1-ec|0}else{ic=ca+-2|0;jc=hb+-1|0}hb=$&8;if(hb){kc=ic;lc=jc;mc=hb;break}do if(gc){hb=c[hc+-4>>2]|0;if(!hb){nc=9;break}if(!((hb>>>0)%10|0)){oc=10;pc=0}else{nc=0;break}while(1){oc=oc*10|0;ba=pc+1|0;if((hb>>>0)%(oc>>>0)|0){nc=ba;break}else pc=ba}}else nc=9;while(0);hb=((hc-rb>>2)*9|0)+-9|0;if((ic|32|0)==102){ba=hb-nc|0;la=(ba|0)<0?0:ba;kc=ic;lc=(jc|0)<(la|0)?jc:la;mc=0;break}else{la=hb+ec-nc|0;hb=(la|0)<0?0:la;kc=ic;lc=(jc|0)<(hb|0)?jc:hb;mc=0;break}}else{kc=ca;lc=aa;mc=$&8}while(0);aa=lc|mc;rb=(aa|0)!=0&1;Cb=(kc|32|0)==102;if(Cb){qc=(ec|0)>0?ec:0;rc=0}else{qb=(ec|0)<0?nb:ec;hb=Bv(qb,((qb|0)<0)<<31>>31,B)|0;if((q-hb|0)<2){qb=hb;while(1){la=qb+-1|0;a[la>>0]=48;if((q-la|0)<2)qb=la;else{sc=la;break}}}else sc=hb;a[sc+-1>>0]=(ec>>31&2)+43;qb=sc+-2|0;a[qb>>0]=kc;qc=q-qb|0;rc=qb}qb=eb+1+lc+rb+qc|0;Dv(e,32,ua,qb,$);if(!(c[e>>2]&32))yv(fb,eb,e)|0;Dv(e,48,ua,qb,$^65536);do if(Cb){nb=dc>>>0>pb>>>0?pb:dc;la=nb;while(1){ba=Bv(c[la>>2]|0,0,I)|0;do if((la|0)==(nb|0)){if((ba|0)!=(I|0)){tc=ba;break}a[K>>0]=48;tc=K}else{if(ba>>>0<=p>>>0){tc=ba;break}Fx(p|0,48,ba-z|0)|0;ib=ba;while(1){gb=ib+-1|0;if(gb>>>0>p>>>0)ib=gb;else{tc=gb;break}}}while(0);if(!(c[e>>2]&32))yv(tc,J-tc|0,e)|0;ba=la+4|0;if(ba>>>0>pb>>>0){uc=ba;break}else la=ba}do if(aa){if(c[e>>2]&32)break;yv(67059,1,e)|0}while(0);if((lc|0)>0&uc>>>0<hc>>>0){la=lc;nb=uc;while(1){ba=Bv(c[nb>>2]|0,0,I)|0;if(ba>>>0>p>>>0){Fx(p|0,48,ba-z|0)|0;ib=ba;while(1){gb=ib+-1|0;if(gb>>>0>p>>>0)ib=gb;else{vc=gb;break}}}else vc=ba;if(!(c[e>>2]&32))yv(vc,(la|0)>9?9:la,e)|0;nb=nb+4|0;ib=la+-9|0;if(!((la|0)>9&nb>>>0<hc>>>0)){wc=ib;break}else la=ib}}else wc=lc;Dv(e,48,wc+9|0,9,0)}else{la=gc?hc:dc+4|0;if((lc|0)>-1){nb=(mc|0)==0;ib=lc;gb=dc;while(1){Bb=Bv(c[gb>>2]|0,0,I)|0;if((Bb|0)==(I|0)){a[K>>0]=48;xc=K}else xc=Bb;do if((gb|0)==(dc|0)){Bb=xc+1|0;if(!(c[e>>2]&32))yv(xc,1,e)|0;if(nb&(ib|0)<1){yc=Bb;break}if(c[e>>2]&32){yc=Bb;break}yv(67059,1,e)|0;yc=Bb}else{if(xc>>>0<=p>>>0){yc=xc;break}Fx(p|0,48,xc+A|0)|0;Bb=xc;while(1){ma=Bb+-1|0;if(ma>>>0>p>>>0)Bb=ma;else{yc=ma;break}}}while(0);ba=J-yc|0;if(!(c[e>>2]&32))yv(yc,(ib|0)>(ba|0)?ba:ib,e)|0;Bb=ib-ba|0;gb=gb+4|0;if(!(gb>>>0<la>>>0&(Bb|0)>-1)){zc=Bb;break}else ib=Bb}}else zc=lc;Dv(e,48,zc+18|0,18,0);if(c[e>>2]&32)break;yv(rc,q-rc|0,e)|0}while(0);Dv(e,32,ua,qb,$^8192);ub=(qb|0)<(ua|0)?ua:qb}else{aa=(ca&32|0)!=0;pb=db!=db|0.0!=0.0;Cb=pb?0:eb;rb=Cb+3|0;Dv(e,32,ua,rb,Z);hb=c[e>>2]|0;if(!(hb&32)){yv(fb,Cb,e)|0;Ac=c[e>>2]|0}else Ac=hb;if(!(Ac&32))yv(pb?(aa?67051:67055):aa?67043:67047,3,e)|0;Dv(e,32,ua,rb,$^8192);ub=(rb|0)<(ua|0)?ua:rb}while(0);L=P;M=ub;N=sa;O=Ca;continue a;break}default:{Ua=O;Va=$;Wa=Aa;Xa=0;Ya=67007;Za=w}}while(0);g:do if((S|0)==64){S=0;ca=r;f=c[ca>>2]|0;ka=c[ca+4>>2]|0;ca=Ja&32;if(!((f|0)==0&(ka|0)==0)){rb=w;aa=f;f=ka;while(1){ka=rb+-1|0;a[ka>>0]=d[66991+(aa&15)>>0]|ca;aa=Cx(aa|0,f|0,4)|0;f=C;if((aa|0)==0&(f|0)==0){Bc=ka;break}else rb=ka}rb=r;if((Ha&8|0)==0|(c[rb>>2]|0)==0&(c[rb+4>>2]|0)==0){La=Bc;Ma=Ha;Na=Ia;Oa=0;Pa=67007;S=77}else{La=Bc;Ma=Ha;Na=Ia;Oa=2;Pa=67007+(Ja>>4)|0;S=77}}else{La=w;Ma=Ha;Na=Ia;Oa=0;Pa=67007;S=77}}else if((S|0)==76){S=0;La=Bv(Qa,Ra,w)|0;Ma=$;Na=Aa;Oa=Sa;Pa=Ta;S=77}else if((S|0)==82){S=0;rb=Cv(_a,0,Aa)|0;f=(rb|0)==0;Ua=_a;Va=Z;Wa=f?Aa:rb-_a|0;Xa=0;Ya=67007;Za=f?_a+Aa|0:rb}else if((S|0)==86){S=0;rb=0;f=0;aa=$a;while(1){ca=c[aa>>2]|0;if(!ca){Cc=rb;Dc=f;break}ka=Ev(u,ca)|0;if((ka|0)<0|ka>>>0>(ab-rb|0)>>>0){Cc=rb;Dc=ka;break}ca=ka+rb|0;if(ab>>>0>ca>>>0){rb=ca;f=ka;aa=aa+4|0}else{Cc=ca;Dc=ka;break}}if((Dc|0)<0){qa=-1;break a}Dv(e,32,ua,Cc,$);if(!Cc){bb=0;S=97}else{aa=0;f=$a;while(1){rb=c[f>>2]|0;if(!rb){bb=Cc;S=97;break g}ka=Ev(u,rb)|0;aa=ka+aa|0;if((aa|0)>(Cc|0)){bb=Cc;S=97;break g}if(!(c[e>>2]&32))yv(u,ka,e)|0;if(aa>>>0>=Cc>>>0){bb=Cc;S=97;break}else f=f+4|0}}}while(0);if((S|0)==97){S=0;Dv(e,32,ua,bb,$^8192);L=P;M=(ua|0)>(bb|0)?ua:bb;N=sa;O=Ca;continue}if((S|0)==77){S=0;Z=(Na|0)>-1?Ma&-65537:Ma;f=r;aa=(c[f>>2]|0)!=0|(c[f+4>>2]|0)!=0;if((Na|0)!=0|aa){f=(aa&1^1)+(x-La)|0;Ua=La;Va=Z;Wa=(Na|0)>(f|0)?Na:f;Xa=Oa;Ya=Pa;Za=w}else{Ua=w;Va=Z;Wa=0;Xa=Oa;Ya=Pa;Za=w}}Z=Za-Ua|0;f=(Wa|0)<(Z|0)?Z:Wa;aa=Xa+f|0;ka=(ua|0)<(aa|0)?aa:ua;Dv(e,32,ka,aa,Va);if(!(c[e>>2]&32))yv(Ya,Xa,e)|0;Dv(e,48,ka,aa,Va^65536);Dv(e,48,f,Z,0);if(!(c[e>>2]&32))yv(Ua,Z,e)|0;Dv(e,32,ka,aa,Va^8192);L=P;M=ka;N=sa;O=Ca}h:do if((S|0)==244)if(!e)if(R){Ca=1;while(1){O=c[l+(Ca<<2)>>2]|0;if(!O){Ec=Ca;break}Av(j+(Ca<<3)|0,O,g);Ca=Ca+1|0;if((Ca|0)>=10){qa=1;break h}}if((Ec|0)<10){Ca=Ec;while(1){if(c[l+(Ca<<2)>>2]|0){qa=-1;break h}Ca=Ca+1|0;if((Ca|0)>=10){qa=1;break}}}else qa=1}else qa=0;else qa=Q;while(0);i=m;return qa|0}function yv(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;f=e+16|0;g=c[f>>2]|0;if(!g)if(!(zv(e)|0)){h=c[f>>2]|0;i=5}else j=0;else{h=g;i=5}a:do if((i|0)==5){g=e+20|0;f=c[g>>2]|0;k=f;if((h-f|0)>>>0<d>>>0){j=vb[c[e+36>>2]&63](e,b,d)|0;break}b:do if((a[e+75>>0]|0)>-1){f=d;while(1){if(!f){l=d;m=b;n=k;o=0;break b}p=f+-1|0;if((a[b+p>>0]|0)==10){q=f;break}else f=p}if((vb[c[e+36>>2]&63](e,b,q)|0)>>>0<q>>>0){j=q;break a}l=d-q|0;m=b+q|0;n=c[g>>2]|0;o=q}else{l=d;m=b;n=k;o=0}while(0);Dx(n|0,m|0,l|0)|0;c[g>>2]=(c[g>>2]|0)+l;j=o+l|0}while(0);return j|0}function zv(b){b=b|0;var d=0,e=0,f=0;d=b+74|0;e=a[d>>0]|0;a[d>>0]=e+255|e;e=c[b>>2]|0;if(!(e&8)){c[b+8>>2]=0;c[b+4>>2]=0;d=c[b+44>>2]|0;c[b+28>>2]=d;c[b+20>>2]=d;c[b+16>>2]=d+(c[b+48>>2]|0);f=0}else{c[b>>2]=e|32;f=-1}return f|0}function Av(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,i=0,j=0.0;a:do if(b>>>0<=20)do switch(b|0){case 9:{e=(c[d>>2]|0)+(4-1)&~(4-1);f=c[e>>2]|0;c[d>>2]=e+4;c[a>>2]=f;break a;break}case 10:{f=(c[d>>2]|0)+(4-1)&~(4-1);e=c[f>>2]|0;c[d>>2]=f+4;f=a;c[f>>2]=e;c[f+4>>2]=((e|0)<0)<<31>>31;break a;break}case 11:{e=(c[d>>2]|0)+(4-1)&~(4-1);f=c[e>>2]|0;c[d>>2]=e+4;e=a;c[e>>2]=f;c[e+4>>2]=0;break a;break}case 12:{e=(c[d>>2]|0)+(8-1)&~(8-1);f=e;g=c[f>>2]|0;i=c[f+4>>2]|0;c[d>>2]=e+8;e=a;c[e>>2]=g;c[e+4>>2]=i;break a;break}case 13:{i=(c[d>>2]|0)+(4-1)&~(4-1);e=c[i>>2]|0;c[d>>2]=i+4;i=(e&65535)<<16>>16;e=a;c[e>>2]=i;c[e+4>>2]=((i|0)<0)<<31>>31;break a;break}case 14:{i=(c[d>>2]|0)+(4-1)&~(4-1);e=c[i>>2]|0;c[d>>2]=i+4;i=a;c[i>>2]=e&65535;c[i+4>>2]=0;break a;break}case 15:{i=(c[d>>2]|0)+(4-1)&~(4-1);e=c[i>>2]|0;c[d>>2]=i+4;i=(e&255)<<24>>24;e=a;c[e>>2]=i;c[e+4>>2]=((i|0)<0)<<31>>31;break a;break}case 16:{i=(c[d>>2]|0)+(4-1)&~(4-1);e=c[i>>2]|0;c[d>>2]=i+4;i=a;c[i>>2]=e&255;c[i+4>>2]=0;break a;break}case 17:{i=(c[d>>2]|0)+(8-1)&~(8-1);j=+h[i>>3];c[d>>2]=i+8;h[a>>3]=j;break a;break}case 18:{i=(c[d>>2]|0)+(8-1)&~(8-1);j=+h[i>>3];c[d>>2]=i+8;h[a>>3]=j;break a;break}default:break a}while(0);while(0);return}function Bv(b,c,d){b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;if(c>>>0>0|(c|0)==0&b>>>0>4294967295){e=d;f=b;g=c;while(1){c=Ox(f|0,g|0,10,0)|0;h=e+-1|0;a[h>>0]=c|48;c=Nx(f|0,g|0,10,0)|0;if(g>>>0>9|(g|0)==9&f>>>0>4294967295){e=h;f=c;g=C}else{i=h;j=c;break}}k=i;l=j}else{k=d;l=b}if(!l)m=k;else{b=k;k=l;while(1){l=b+-1|0;a[l>>0]=(k>>>0)%10|0|48;if(k>>>0<10){m=l;break}else{b=l;k=(k>>>0)/10|0}}}return m|0}function Cv(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0;f=d&255;g=(e|0)!=0;a:do if(g&(b&3|0)!=0){h=d&255;i=e;j=b;while(1){if((a[j>>0]|0)==h<<24>>24){k=i;l=j;m=6;break a}n=j+1|0;o=i+-1|0;p=(o|0)!=0;if(p&(n&3|0)!=0){i=o;j=n}else{q=o;r=p;s=n;m=5;break}}}else{q=e;r=g;s=b;m=5}while(0);if((m|0)==5)if(r){k=q;l=s;m=6}else{t=0;u=s}b:do if((m|0)==6){s=d&255;if((a[l>>0]|0)==s<<24>>24){t=k;u=l}else{q=_(f,16843009)|0;c:do if(k>>>0>3){r=k;b=l;while(1){g=c[b>>2]^q;if((g&-2139062144^-2139062144)&g+-16843009){v=r;w=b;break}g=b+4|0;e=r+-4|0;if(e>>>0>3){r=e;b=g}else{x=e;y=g;m=11;break c}}z=v;A=w}else{x=k;y=l;m=11}while(0);if((m|0)==11)if(!x){t=0;u=y;break}else{z=x;A=y}while(1){if((a[A>>0]|0)==s<<24>>24){t=z;u=A;break b}q=A+1|0;z=z+-1|0;if(!z){t=0;u=q;break}else A=q}}}while(0);return ((t|0)!=0?u:0)|0}function Dv(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;g=i;i=i+256|0;h=g;do if((d|0)>(e|0)&(f&73728|0)==0){j=d-e|0;Fx(h|0,b|0,(j>>>0>256?256:j)|0)|0;k=c[a>>2]|0;l=(k&32|0)==0;if(j>>>0>255){m=d-e|0;n=j;o=k;k=l;while(1){if(k){yv(h,256,a)|0;p=c[a>>2]|0}else p=o;n=n+-256|0;k=(p&32|0)==0;if(n>>>0<=255)break;else o=p}if(k)q=m&255;else break}else if(l)q=j;else break;yv(h,q,a)|0}while(0);i=g;return}function Ev(a,b){a=a|0;b=b|0;var c=0;if(!a)c=0;else c=Fv(a,b,0)|0;return c|0}function Fv(b,d,e){b=b|0;d=d|0;e=e|0;var f=0;do if(b){if(d>>>0<128){a[b>>0]=d;f=1;break}if(d>>>0<2048){a[b>>0]=d>>>6|192;a[b+1>>0]=d&63|128;f=2;break}if(d>>>0<55296|(d&-8192|0)==57344){a[b>>0]=d>>>12|224;a[b+1>>0]=d>>>6&63|128;a[b+2>>0]=d&63|128;f=3;break}if((d+-65536|0)>>>0<1048576){a[b>>0]=d>>>18|240;a[b+1>>0]=d>>>12&63|128;a[b+2>>0]=d>>>6&63|128;a[b+3>>0]=d&63|128;f=4;break}else{c[(Yu()|0)>>2]=84;f=-1;break}}else f=1;while(0);return f|0}function Gv(a,b){a=+a;b=b|0;return +(+Hv(a,b))}function Hv(a,b){a=+a;b=b|0;var d=0,e=0,f=0,g=0,i=0.0,j=0.0,l=0,m=0.0;h[k>>3]=a;d=c[k>>2]|0;e=c[k+4>>2]|0;f=Cx(d|0,e|0,52)|0;g=f&2047;switch(g|0){case 0:{if(a!=0.0){i=+Hv(a*18446744073709551616.0,b);j=i;l=(c[b>>2]|0)+-64|0}else{j=a;l=0}c[b>>2]=l;m=j;break}case 2047:{m=a;break}default:{c[b>>2]=g+-1022;c[k>>2]=d;c[k+4>>2]=e&-2146435073|1071644672;m=+h[k>>3]}}return +m}function Iv(a){a=a|0;return 0}function Jv(a){a=a|0;var b=0;b=(nv(a)|0)==0;return (b?a:a&95)|0}function Kv(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;d=b;a:do if(!(d&3)){e=b;f=4}else{g=b;h=d;while(1){if(!(a[g>>0]|0)){i=h;break a}j=g+1|0;h=j;if(!(h&3)){e=j;f=4;break}else g=j}}while(0);if((f|0)==4){f=e;while(1){e=c[f>>2]|0;if(!((e&-2139062144^-2139062144)&e+-16843009))f=f+4|0;else{k=e;l=f;break}}if(!((k&255)<<24>>24))m=l;else{k=l;while(1){l=k+1|0;if(!(a[l>>0]|0)){m=l;break}else k=l}}i=m}return i-d|0}function Lv(a){a=a|0;return ((a|0)==223|(jv(a)|0)!=(a|0))&1|0}function Mv(a){a=a|0;var b=0;if(a>>>0>=255)if((a+-57344|0)>>>0<8185|(a>>>0<8232|(a+-8234|0)>>>0<47062))b=1;else return ((a+-65532|0)>>>0>1048579|(a&65534|0)==65534)&1^1|0;else b=(a+1&127)>>>0>32&1;return b|0}function Nv(a,b){a=a|0;b=b|0;var c=0;do switch(b|0){case 1:{c=Ov(a)|0;break}case 2:{c=lv(a)|0;break}case 3:{c=ev(a)|0;break}case 4:{c=Qv(a)|0;break}case 5:{c=Pv(a)|0;break}case 6:{c=Rv(a)|0;break}case 7:{c=Lv(a)|0;break}case 8:{c=Mv(a)|0;break}case 9:{c=Sv(a)|0;break}case 10:{c=pv(a)|0;break}case 11:{c=Tv(a)|0;break}case 12:{c=Uv(a)|0;break}default:c=0}while(0);return c|0}function Ov(a){a=a|0;var b=0;if(!(Pv(a)|0))b=(lv(a)|0)!=0;else b=1;return b&1|0}function Pv(a){a=a|0;return (a+-48|0)>>>0<10|0}function Qv(a){a=a|0;var b=0;if((a&-2|0)==8232|(a>>>0<32|(a+-127|0)>>>0<33))b=1;else b=(a+-65529|0)>>>0<3;return b&1|0}function Rv(a){a=a|0;var b=0;if(!(pv(a)|0))b=(Mv(a)|0)!=0;else b=0;return b&1|0}function Sv(a){a=a|0;var b=0;if(a>>>0<131072)b=(d[67061+((d[67061+(a>>>8)>>0]|0)<<5|a>>>3&31)>>0]|0)>>>(a&7)&1;else b=0;return b|0}function Tv(a){a=a|0;return (mv(a)|0)!=(a|0)|0}function Uv(a){a=a|0;var b=0;if((a+-48|0)>>>0<10)b=1;else b=((a|32)+-97|0)>>>0<6;return b&1|0}function Vv(b,c){b=b|0;c=c|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;e=a[b>>0]|0;a:do if(!(e<<24>>24)){f=0;g=c}else{h=e;i=e&255;j=b;k=c;while(1){l=a[k>>0]|0;if(!(l<<24>>24)){f=h;g=k;break a}if(h<<24>>24!=l<<24>>24?(l=hv(i)|0,(l|0)!=(hv(d[k>>0]|0)|0)):0){m=j;n=k;break}j=j+1|0;l=k+1|0;o=a[j>>0]|0;if(!(o<<24>>24)){f=0;g=l;break a}else{h=o;i=o&255;k=l}}f=a[m>>0]|0;g=n}while(0);n=hv(f&255)|0;return n-(hv(d[g>>0]|0)|0)|0}function Wv(a,b){a=a|0;b=b|0;Xv(a,b)|0;return a|0}function Xv(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;e=d;a:do if(!((e^b)&3)){if(!(e&3)){f=d;g=b}else{h=b;i=d;while(1){j=a[i>>0]|0;a[h>>0]=j;if(!(j<<24>>24)){k=h;break a}j=i+1|0;l=h+1|0;if(!(j&3)){f=j;g=l;break}else{h=l;i=j}}}i=c[f>>2]|0;if(!((i&-2139062144^-2139062144)&i+-16843009)){h=i;i=g;j=f;while(1){l=j+4|0;m=i+4|0;c[i>>2]=h;h=c[l>>2]|0;if((h&-2139062144^-2139062144)&h+-16843009){n=m;o=l;break}else{i=m;j=l}}}else{n=g;o=f}p=o;q=n;r=8}else{p=d;q=b;r=8}while(0);if((r|0)==8){r=a[p>>0]|0;a[q>>0]=r;if(!(r<<24>>24))k=q;else{r=q;q=p;while(1){q=q+1|0;p=r+1|0;b=a[q>>0]|0;a[p>>0]=b;if(!(b<<24>>24)){k=p;break}else r=p}}}return k|0}function Yv(a){a=a|0;return ((a|0)==32|(a+-9|0)>>>0<5)&1|0}function Zv(a,b,c){a=a|0;b=b|0;c=c|0;var d=0;d=_v(a,b,c,-1,0)|0;return d|0}function _v(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0;g=i;i=i+112|0;h=g;c[h>>2]=0;j=h+4|0;c[j>>2]=a;c[h+44>>2]=a;k=h+8|0;c[k>>2]=(a|0)<0?-1:a+2147483647|0;c[h+76>>2]=-1;$v(h,0);l=aw(h,d,1,e,f)|0;if(b)c[b>>2]=a+((c[j>>2]|0)+(c[h+108>>2]|0)-(c[k>>2]|0));i=g;return l|0}function $v(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;c[a+104>>2]=b;d=c[a+8>>2]|0;e=c[a+4>>2]|0;f=d-e|0;c[a+108>>2]=f;if((b|0)!=0&(f|0)>(b|0))c[a+100>>2]=e+b;else c[a+100>>2]=d;return}function aw(b,e,f,g,h){b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0;a:do if(e>>>0>36){c[(Yu()|0)>>2]=22;i=0;j=0}else{k=b+4|0;l=b+100|0;do{m=c[k>>2]|0;if(m>>>0<(c[l>>2]|0)>>>0){c[k>>2]=m+1;n=d[m>>0]|0}else n=bw(b)|0}while((Yv(n)|0)!=0);o=n;b:do switch(o|0){case 43:case 45:{m=((o|0)==45)<<31>>31;p=c[k>>2]|0;if(p>>>0<(c[l>>2]|0)>>>0){c[k>>2]=p+1;q=d[p>>0]|0;r=m;break b}else{q=bw(b)|0;r=m;break b}break}default:{q=o;r=0}}while(0);m=(e|0)==0;do if((e|16|0)==16&(q|0)==48){p=c[k>>2]|0;if(p>>>0<(c[l>>2]|0)>>>0){c[k>>2]=p+1;s=d[p>>0]|0}else s=bw(b)|0;if((s|32|0)!=120)if(m){t=8;u=s;v=46;break}else{w=e;x=s;v=32;break}p=c[k>>2]|0;if(p>>>0<(c[l>>2]|0)>>>0){c[k>>2]=p+1;y=d[p>>0]|0}else y=bw(b)|0;if((d[70230+y>>0]|0)>15){p=(c[l>>2]|0)==0;if(!p)c[k>>2]=(c[k>>2]|0)+-1;if(!f){$v(b,0);i=0;j=0;break a}if(p){i=0;j=0;break a}c[k>>2]=(c[k>>2]|0)+-1;i=0;j=0;break a}else{t=16;u=y;v=46}}else{p=m?10:e;if((d[70230+q>>0]|0)>>>0<p>>>0){w=p;x=q;v=32}else{if(c[l>>2]|0)c[k>>2]=(c[k>>2]|0)+-1;$v(b,0);c[(Yu()|0)>>2]=22;i=0;j=0;break a}}while(0);if((v|0)==32)if((w|0)==10){m=x+-48|0;if(m>>>0<10){p=m;m=0;while(1){z=(m*10|0)+p|0;A=c[k>>2]|0;if(A>>>0<(c[l>>2]|0)>>>0){c[k>>2]=A+1;B=d[A>>0]|0}else B=bw(b)|0;p=B+-48|0;if(!(p>>>0<10&z>>>0<429496729)){D=z;E=B;break}else m=z}F=D;G=0;H=E}else{F=0;G=0;H=x}m=H+-48|0;if(m>>>0<10){p=F;z=G;A=m;m=H;while(1){I=Mx(p|0,z|0,10,0)|0;J=C;K=((A|0)<0)<<31>>31;L=~K;if(J>>>0>L>>>0|(J|0)==(L|0)&I>>>0>~A>>>0){M=A;N=p;O=z;P=m;break}L=Ax(I|0,J|0,A|0,K|0)|0;K=C;J=c[k>>2]|0;if(J>>>0<(c[l>>2]|0)>>>0){c[k>>2]=J+1;Q=d[J>>0]|0}else Q=bw(b)|0;J=Q+-48|0;if(J>>>0<10&(K>>>0<429496729|(K|0)==429496729&L>>>0<2576980378)){p=L;z=K;A=J;m=Q}else{M=J;N=L;O=K;P=Q;break}}if(M>>>0>9){R=O;S=N;T=r}else{U=10;V=N;W=O;X=P;v=72}}else{R=G;S=F;T=r}}else{t=w;u=x;v=46}c:do if((v|0)==46){if(!(t+-1&t)){m=a[70486+((t*23|0)>>>5&7)>>0]|0;A=a[70230+u>>0]|0;z=A&255;if(z>>>0<t>>>0){p=z;z=0;while(1){K=p|z<<m;L=c[k>>2]|0;if(L>>>0<(c[l>>2]|0)>>>0){c[k>>2]=L+1;Y=d[L>>0]|0}else Y=bw(b)|0;L=a[70230+Y>>0]|0;p=L&255;if(!(K>>>0<134217728&p>>>0<t>>>0)){Z=K;$=L;aa=Y;break}else z=K}ba=$;ca=0;da=Z;ea=aa}else{ba=A;ca=0;da=0;ea=u}z=Cx(-1,-1,m|0)|0;p=C;if((ba&255)>>>0>=t>>>0|(ca>>>0>p>>>0|(ca|0)==(p|0)&da>>>0>z>>>0)){U=t;V=da;W=ca;X=ea;v=72;break}else{fa=da;ga=ca;ha=ba}while(1){K=Ix(fa|0,ga|0,m|0)|0;L=C;J=ha&255|K;K=c[k>>2]|0;if(K>>>0<(c[l>>2]|0)>>>0){c[k>>2]=K+1;ia=d[K>>0]|0}else ia=bw(b)|0;ha=a[70230+ia>>0]|0;if((ha&255)>>>0>=t>>>0|(L>>>0>p>>>0|(L|0)==(p|0)&J>>>0>z>>>0)){U=t;V=J;W=L;X=ia;v=72;break c}else{fa=J;ga=L}}}z=a[70230+u>>0]|0;p=z&255;if(p>>>0<t>>>0){m=p;p=0;while(1){A=m+(_(p,t)|0)|0;L=c[k>>2]|0;if(L>>>0<(c[l>>2]|0)>>>0){c[k>>2]=L+1;ja=d[L>>0]|0}else ja=bw(b)|0;L=a[70230+ja>>0]|0;m=L&255;if(!(A>>>0<119304647&m>>>0<t>>>0)){ka=A;la=L;ma=ja;break}else p=A}na=la;oa=ka;pa=0;qa=ma}else{na=z;oa=0;pa=0;qa=u}if((na&255)>>>0<t>>>0){p=Nx(-1,-1,t|0,0)|0;m=C;A=pa;L=oa;J=na;K=qa;while(1){if(A>>>0>m>>>0|(A|0)==(m|0)&L>>>0>p>>>0){U=t;V=L;W=A;X=K;v=72;break c}I=Mx(L|0,A|0,t|0,0)|0;ra=C;sa=J&255;if(ra>>>0>4294967295|(ra|0)==-1&I>>>0>~sa>>>0){U=t;V=L;W=A;X=K;v=72;break c}ta=Ax(sa|0,0,I|0,ra|0)|0;ra=C;I=c[k>>2]|0;if(I>>>0<(c[l>>2]|0)>>>0){c[k>>2]=I+1;ua=d[I>>0]|0}else ua=bw(b)|0;J=a[70230+ua>>0]|0;if((J&255)>>>0>=t>>>0){U=t;V=ta;W=ra;X=ua;v=72;break}else{A=ra;L=ta;K=ua}}}else{U=t;V=oa;W=pa;X=qa;v=72}}while(0);if((v|0)==72)if((d[70230+X>>0]|0)>>>0<U>>>0){do{K=c[k>>2]|0;if(K>>>0<(c[l>>2]|0)>>>0){c[k>>2]=K+1;va=d[K>>0]|0}else va=bw(b)|0}while((d[70230+va>>0]|0)>>>0<U>>>0);c[(Yu()|0)>>2]=34;R=h;S=g;T=(g&1|0)==0&0==0?r:0}else{R=W;S=V;T=r}if(c[l>>2]|0)c[k>>2]=(c[k>>2]|0)+-1;if(!(R>>>0<h>>>0|(R|0)==(h|0)&S>>>0<g>>>0)){if(!((g&1|0)!=0|0!=0|(T|0)!=0)){c[(Yu()|0)>>2]=34;K=Ax(g|0,h|0,-1,-1)|0;i=C;j=K;break}if(R>>>0>h>>>0|(R|0)==(h|0)&S>>>0>g>>>0){c[(Yu()|0)>>2]=34;i=h;j=g;break}}K=((T|0)<0)<<31>>31;L=zx(S^T|0,R^K|0,T|0,K|0)|0;i=C;j=L}while(0);C=i;return j|0}function bw(b){b=b|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;e=b+104|0;f=c[e>>2]|0;if((f|0)!=0?(c[b+108>>2]|0)>=(f|0):0)g=4;else{f=cw(b)|0;if((f|0)>=0){h=c[e>>2]|0;e=c[b+8>>2]|0;if(h){i=c[b+4>>2]|0;j=h-(c[b+108>>2]|0)|0;h=e;if((e-i|0)<(j|0)){k=h;g=9}else{c[b+100>>2]=i+(j+-1);l=h}}else{k=e;g=9}if((g|0)==9){c[b+100>>2]=e;l=k}k=b+4|0;if(!l)m=c[k>>2]|0;else{e=c[k>>2]|0;k=b+108|0;c[k>>2]=l+1-e+(c[k>>2]|0);m=e}e=m+-1|0;if((d[e>>0]|0|0)==(f|0))n=f;else{a[e>>0]=f;n=f}}else g=4}if((g|0)==4){c[b+100>>2]=0;n=-1}return n|0}function cw(a){a=a|0;var b=0,e=0,f=0;b=i;i=i+16|0;e=b;if((c[a+8>>2]|0)==0?(dw(a)|0)!=0:0)f=-1;else if((vb[c[a+32>>2]&63](a,e,1)|0)==1)f=d[e>>0]|0;else f=-1;i=b;return f|0}function dw(b){b=b|0;var d=0,e=0,f=0;d=b+74|0;e=a[d>>0]|0;a[d>>0]=e+255|e;e=b+20|0;d=b+44|0;if((c[e>>2]|0)>>>0>(c[d>>2]|0)>>>0)vb[c[b+36>>2]&63](b,0,0)|0;c[b+16>>2]=0;c[b+28>>2]=0;c[e>>2]=0;e=c[b>>2]|0;if(e&20)if(!(e&4))f=-1;else{c[b>>2]=e|32;f=-1}else{e=c[d>>2]|0;c[b+8>>2]=e;c[b+4>>2]=e;f=0}return f|0}function ew(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0;e=i;i=i+16|0;f=e;c[f>>2]=d;d=fw(a,b,f)|0;i=e;return d|0}
+function qn(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0;e=i;i=i+48|0;f=e+32|0;g=e+28|0;h=e+24|0;j=e+20|0;k=e+16|0;l=e+12|0;m=e+8|0;n=e+4|0;o=e;c[f>>2]=a;c[g>>2]=b;c[h>>2]=d;c[l>>2]=nn(c[h>>2]|0)|0;c[l>>2]=c[l>>2]^c[(c[f>>2]|0)+4096+16>>2];c[m>>2]=nn((c[h>>2]|0)+4|0)|0;c[m>>2]=c[m>>2]^c[(c[f>>2]|0)+4096+20>>2];c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[(c[f>>2]|0)+3072+(((c[k>>2]|0)>>>16&255)<<2)>>2]^c[(c[f>>2]|0)+((c[k>>2]|0)>>>24<<2)>>2];c[n>>2]=(c[n>>2]|0)+(c[o>>2]|0);c[o>>2]=(c[o>>2]|0)+(c[n>>2]|0);c[m>>2]=c[m>>2]^(c[o>>2]|0)+(c[(c[f>>2]|0)+4128+4>>2]|0);c[m>>2]=((c[m>>2]|0)>>>1)+(c[m>>2]<<31);c[l>>2]=(c[l>>2]<<1)+((c[l>>2]|0)>>>31);c[l>>2]=c[l>>2]^(c[n>>2]|0)+(c[(c[f>>2]|0)+4128>>2]|0);c[j>>2]=c[j>>2]^c[(c[f>>2]|0)+4096>>2];on(c[g>>2]|0,c[j>>2]|0);c[k>>2]=c[k>>2]^c[(c[f>>2]|0)+4096+4>>2];on((c[g>>2]|0)+4|0,c[k>>2]|0);c[l>>2]=c[l>>2]^c[(c[f>>2]|0)+4096+8>>2];on((c[g>>2]|0)+8|0,c[l>>2]|0);c[m>>2]=c[m>>2]^c[(c[f>>2]|0)+4096+12>>2];on((c[g>>2]|0)+12|0,c[m>>2]|0);i=e;return}function rn(){var a=0,b=0;a=i;i=i+16|0;c[a+8>>2]=4;c[a+4>>2]=16;c[a>>2]=4256;b=as(43442,13,14,8,4,16,4256)|0;i=a;return b|0}function sn(b,e,f,g,h){b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0;j=i;i=i+96|0;k=j+60|0;l=j+56|0;m=j+52|0;n=j+48|0;o=j+44|0;p=j+40|0;q=j+36|0;r=j+32|0;s=j+72|0;t=j+28|0;u=j+24|0;v=j+20|0;w=j+16|0;x=j+12|0;y=j+64|0;z=j;A=j+8|0;c[k>>2]=b;c[l>>2]=e;c[m>>2]=f;c[n>>2]=g;c[o>>2]=h;c[p>>2]=c[k>>2];c[q>>2]=c[m>>2];c[r>>2]=c[n>>2];c[u>>2]=0;while(1){if(!(c[o>>2]|0))break;c[t>>2]=ln(c[p>>2]|0,s,c[l>>2]|0)|0;if((c[t>>2]|0)>>>0>(c[u>>2]|0)>>>0)c[u>>2]=c[t>>2];tn(c[q>>2]|0,s,c[r>>2]|0,16);c[q>>2]=(c[q>>2]|0)+16;c[r>>2]=(c[r>>2]|0)+16;c[v>>2]=16;while(1){if((c[v>>2]|0)<=0)break;n=(c[l>>2]|0)+((c[v>>2]|0)-1)|0;a[n>>0]=(a[n>>0]|0)+1<<24>>24;if(a[(c[l>>2]|0)+((c[v>>2]|0)-1)>>0]|0)break;c[v>>2]=(c[v>>2]|0)+-1}c[o>>2]=(c[o>>2]|0)+-1}c[w>>2]=s;c[x>>2]=16;a[y>>0]=0;s=z;c[s>>2]=d[y>>0];c[s+4>>2]=0;while(1){if(!((c[w>>2]&7|0)!=0?(c[x>>2]|0)!=0:0))break;a[c[w>>2]>>0]=a[y>>0]|0;c[w>>2]=(c[w>>2]|0)+1;c[x>>2]=(c[x>>2]|0)+-1}if((c[x>>2]|0)>>>0>=8){s=z;o=Mx(c[s>>2]|0,c[s+4>>2]|0,16843009,16843009)|0;s=z;c[s>>2]=o;c[s+4>>2]=C;do{c[A>>2]=c[w>>2];s=z;o=c[s+4>>2]|0;v=c[A>>2]|0;c[v>>2]=c[s>>2];c[v+4>>2]=o;c[x>>2]=(c[x>>2]|0)-8;c[w>>2]=(c[w>>2]|0)+8}while((c[x>>2]|0)>>>0>=8)}while(1){if(!(c[x>>2]|0))break;a[c[w>>2]>>0]=a[y>>0]|0;c[w>>2]=(c[w>>2]|0)+1;c[x>>2]=(c[x>>2]|0)+-1}If(c[u>>2]|0);Jf();i=j;return}function tn(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;h=i;i=i+48|0;j=h+40|0;k=h+36|0;l=h+32|0;m=h+28|0;n=h+24|0;o=h+20|0;p=h+16|0;q=h+12|0;r=h+8|0;s=h+4|0;c[j>>2]=b;c[k>>2]=e;c[l>>2]=f;c[m>>2]=g;c[n>>2]=c[j>>2];c[o>>2]=c[k>>2];c[p>>2]=c[l>>2];c[h>>2]=3;if(!((c[n>>2]|c[o>>2]|c[p>>2])&3)){c[q>>2]=c[n>>2];c[r>>2]=c[o>>2];c[s>>2]=c[p>>2];while(1){if((c[m>>2]|0)>>>0<4)break;l=c[r>>2]|0;c[r>>2]=l+4;k=c[l>>2]|0;l=c[s>>2]|0;c[s>>2]=l+4;j=k^c[l>>2];l=c[q>>2]|0;c[q>>2]=l+4;c[l>>2]=j;c[m>>2]=(c[m>>2]|0)-4}c[n>>2]=c[q>>2];c[o>>2]=c[r>>2];c[p>>2]=c[s>>2]}while(1){if(!(c[m>>2]|0))break;s=c[o>>2]|0;c[o>>2]=s+1;r=d[s>>0]|0;s=c[p>>2]|0;c[p>>2]=s+1;q=(r^(d[s>>0]|0))&255;s=c[n>>2]|0;c[n>>2]=s+1;a[s>>0]=q;c[m>>2]=(c[m>>2]|0)+-1}i=h;return}function un(){var a=0,b=0;a=i;i=i+16|0;c[a+8>>2]=5;c[a+4>>2]=16;c[a>>2]=4256;b=Yr(43442,13,14,6,5,16,4256)|0;i=a;return b|0}function vn(b,e,f,g,h){b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0;j=i;i=i+80|0;k=j+56|0;l=j+52|0;m=j+48|0;n=j+44|0;o=j+40|0;p=j+36|0;q=j+32|0;r=j+28|0;s=j+64|0;t=j+24|0;u=j+20|0;v=j+16|0;w=j+12|0;x=j+60|0;y=j;z=j+8|0;c[k>>2]=b;c[l>>2]=e;c[m>>2]=f;c[n>>2]=g;c[o>>2]=h;c[p>>2]=c[k>>2];c[q>>2]=c[m>>2];c[r>>2]=c[n>>2];c[u>>2]=0;while(1){if(!(c[o>>2]|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]=0;while(1){if(!(c[m>>2]|0))break;c[q>>2]=ln(c[n>>2]|0,c[j>>2]|0,c[j>>2]|0)|0;if((c[q>>2]|0)>>>0>(c[r>>2]|0)>>>0)c[r>>2]=c[q>>2];zn(c[o>>2]|0,c[j>>2]|0,c[p>>2]|0,16);c[o>>2]=(c[o>>2]|0)+16;c[p>>2]=(c[p>>2]|0)+16;c[m>>2]=(c[m>>2]|0)+-1}If(c[r>>2]|0);Jf();i=g;return}function zn(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0;f=i;i=i+16|0;g=f+12|0;h=f+8|0;j=f+4|0;k=f;c[g>>2]=a;c[h>>2]=b;c[j>>2]=d;c[k>>2]=e;wn(c[g>>2]|0,c[j>>2]|0,c[h>>2]|0,c[j>>2]|0,c[k>>2]|0);i=f;return}function An(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=i;i=i+16|0;e=d+4|0;f=d;c[e>>2]=a;c[f>>2]=b;c[17706]=c[e>>2];c[17707]=c[f>>2];i=d;return}function Bn(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0;f=i;i=i+16|0;g=f+12|0;h=f+8|0;j=f+4|0;k=f;c[g>>2]=a;c[h>>2]=b;c[j>>2]=d;c[k>>2]=e;if(!(c[17706]|0)){i=f;return}wb[c[17706]&15](c[17707]|0,c[g>>2]|0,c[h>>2]|0,c[j>>2]|0,c[k>>2]|0);i=f;return}function Cn(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;do if(c[d>>2]|0){if((c[d>>2]|0)==1){c[17709]=1;break}if(!(c[17708]|0)){if((c[d>>2]|0)==2){c[17710]=1;break}if((c[d>>2]|0)==3)c[17711]=1}}else c[17708]=1;while(0);i=b;return}function Dn(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;if(Ah()|0){et(c[d>>2]|0);i=b;return}if(c[17709]|0){Fs(c[d>>2]|0);i=b;return}if(c[17710]|0){et(c[d>>2]|0);i=b;return}a=c[d>>2]|0;if(c[17711]|0){It(a);i=b;return}else{Fs(a);i=b;return}}function En(){if(Ah()|0){kt();return}if(c[17709]|0){Ps();return}if(c[17710]|0){kt();return}if(c[17711]|0){Kt();return}else{Ps();return}}function Fn(a){a=a|0;var b=0,d=0,e=0,f=0;b=i;i=i+16|0;d=b+4|0;e=b;c[e>>2]=a;if((c[e>>2]|0)==0?(Ah()|0)!=0:0)c[d>>2]=2;else f=4;do if((f|0)==4){if(c[17709]|0){c[d>>2]=1;break}if(c[17710]|0){c[d>>2]=2;break}if(c[17711]|0){c[d>>2]=3;break}else{c[d>>2]=1;break}}while(0);i=b;return c[d>>2]|0}function Gn(){if(Ah()|0){lt();return}else{Qs();return}}function Hn(){if(Ah()|0)return;Rs();return}function In(){if(Ah()|0)return;Ss();return}function Jn(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;if(Ah()|0){i=b;return}Ts(c[d>>2]|0);i=b;return}function Kn(a){a=a|0;var b=0,d=0,e=0;b=i;i=i+16|0;d=b+4|0;e=b;c[e>>2]=a;if(Ah()|0)c[d>>2]=0;else c[d>>2]=Us(c[e>>2]|0)|0;i=b;return c[d>>2]|0}function Ln(){var a=0,b=0;a=i;i=i+16|0;b=a;if(Ah()|0)c[b>>2]=mt()|0;else c[b>>2]=Vs()|0;i=a;return c[b>>2]|0}function Mn(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;d=i;i=i+16|0;e=d+8|0;f=d+4|0;g=d;c[e>>2]=a;c[f>>2]=b;c[g>>2]=dg(c[e>>2]|0)|0;Nn(c[g>>2]|0,c[e>>2]|0,c[f>>2]|0);i=d;return c[g>>2]|0}function Nn(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=i;i=i+16|0;f=e+8|0;g=e+4|0;h=e;c[f>>2]=a;c[g>>2]=b;c[h>>2]=d;if(Ah()|0){nt(c[f>>2]|0,c[g>>2]|0,c[h>>2]|0);i=e;return}if(c[17709]|0){Ws(c[f>>2]|0,c[g>>2]|0,c[h>>2]|0);i=e;return}if(c[17710]|0){nt(c[f>>2]|0,c[g>>2]|0,c[h>>2]|0);i=e;return}d=c[f>>2]|0;f=c[g>>2]|0;g=c[h>>2]|0;if(c[17711]|0){Nt(d,f,g);i=e;return}else{Ws(d,f,g);i=e;return}}function On(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;d=i;i=i+16|0;e=d+8|0;f=d+4|0;g=d;c[e>>2]=a;c[f>>2]=b;c[g>>2]=fg(c[e>>2]|0)|0;Nn(c[g>>2]|0,c[e>>2]|0,c[f>>2]|0);i=d;return c[g>>2]|0}function Pn(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=i;i=i+16|0;f=e+8|0;g=e+4|0;h=e;c[f>>2]=a;c[g>>2]=b;c[h>>2]=d;Nn(c[f>>2]|0,c[g>>2]|0,c[h>>2]|0);i=e;return}function Qn(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;if(Ah()|0){i=b;return}if(c[17709]|0){bt(c[d>>2]|0);i=b;return}if((c[17710]|0)!=0|(c[17711]|0)!=0){i=b;return}bt(c[d>>2]|0);i=b;return}function Rn(){if(Ah()|0)return;if(c[17709]|0){ct();return}if((c[17710]|0)!=0|(c[17711]|0)!=0)return;ct();return}function Sn(){if(Ah()|0)return;if(c[17709]|0){dt();return}if((c[17710]|0)!=0|(c[17711]|0)!=0)return;dt();return}function Tn(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;e=i;i=i+48|0;f=e+8|0;g=e;h=e+40|0;j=e+36|0;k=e+32|0;l=e+28|0;m=e+24|0;n=e+20|0;o=e+16|0;p=e+12|0;c[h>>2]=b;c[j>>2]=d;if(Ah()|0){At(c[h>>2]|0,c[j>>2]|0);i=e;return}Dn(1);c[n>>2]=lu(12532)|0;if(c[n>>2]|0){c[g>>2]=fu(c[n>>2]|0)|0;Bf(45492,g)}c[k>>2]=Dw()|0;if(c[17712]|0){if((c[17713]|0)!=(c[k>>2]|0)){Nn(76451,8,0);c[17713]=c[k>>2]}}else{c[o>>2]=jb(0)|0;c[p>>2]=c[k>>2];c[17713]=c[k>>2];c[l>>2]=76431;k=c[l>>2]|0;a[k>>0]=a[p>>0]|0;a[k+1>>0]=a[p+1>>0]|0;a[k+2>>0]=a[p+2>>0]|0;a[k+3>>0]=a[p+3>>0]|0;c[l>>2]=(c[l>>2]|0)+4;p=c[l>>2]|0;a[p>>0]=a[o>>0]|0;a[p+1>>0]=a[o+1>>0]|0;a[p+2>>0]=a[o+2>>0]|0;a[p+3>>0]=a[o+3>>0]|0;Pn(76451,8,0);c[17712]=1}c[l>>2]=c[h>>2];while(1){if((c[j>>2]|0)>>>0<=0)break;Bm(76431,76431,28);c[m>>2]=(c[j>>2]|0)>>>0>20?20:c[j>>2]|0;Dx(c[l>>2]|0,76431,c[m>>2]|0)|0;c[j>>2]=(c[j>>2]|0)-(c[m>>2]|0);c[l>>2]=(c[l>>2]|0)+(c[m>>2]|0)}c[n>>2]=mu(12532)|0;if(c[n>>2]|0){c[f>>2]=fu(c[n>>2]|0)|0;Bf(45537,f)}else{i=e;return}}function Un(a){a=a|0;var b=0,d=0,e=0;b=i;i=i+16|0;d=b+4|0;e=b;c[e>>2]=a;if(Ah()|0)c[d>>2]=Bt(c[e>>2]|0)|0;else c[d>>2]=0;i=b;return c[d>>2]|0}function Vn(a,b,d,e,f,g,h,j){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;k=i;i=i+48|0;l=k+32|0;m=k+28|0;n=k+24|0;o=k+20|0;p=k+16|0;q=k+12|0;r=k+8|0;s=k+4|0;t=k;c[m>>2]=a;c[n>>2]=b;c[o>>2]=d;c[p>>2]=e;c[q>>2]=f;c[r>>2]=g;c[s>>2]=h;c[t>>2]=j;if(Ah()|0){c[l>>2]=Ft(c[m>>2]|0,c[n>>2]|0,c[o>>2]|0,c[p>>2]|0,c[q>>2]|0,c[r>>2]|0,c[s>>2]|0,c[t>>2]|0)|0;u=c[l>>2]|0;i=k;return u|0}else{c[l>>2]=60;u=c[l>>2]|0;i=k;return u|0}return 0}function Wn(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0;e=i;i=i+16|0;f=e+12|0;g=e+8|0;h=e+4|0;j=e;c[g>>2]=a;c[h>>2]=b;c[j>>2]=d;if(Ah()|0){c[f>>2]=Gt(c[g>>2]|0,c[h>>2]|0,c[j>>2]|0)|0;k=c[f>>2]|0;i=e;return k|0}else{c[f>>2]=60;k=c[f>>2]|0;i=e;return k|0}return 0}function Xn(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;if(!(Ah()|0)){i=b;return}Ht(c[d>>2]|0);i=b;return}function Yn(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0;f=i;i=i+144|0;g=f+8|0;h=f;j=f+28|0;k=f+24|0;l=f+20|0;m=f+16|0;n=f+12|0;o=f+32|0;c[j>>2]=b;c[k>>2]=d;c[l>>2]=e;e=c[j>>2]|0;if(!(c[k>>2]|0)){c[h>>2]=e;tv(o,99,45582,h)|0;Hf(o,0);i=f;return}c[g>>2]=e;tv(o,99,45587,g)|0;if(c[l>>2]|0){c[m>>2]=vq(0)|0;c[n>>2]=vq(0)|0}if((c[l>>2]|0)!=0?(Zn(c[m>>2]|0,c[n>>2]|0,c[k>>2]|0,c[l>>2]|0)|0)==0:0){a[o+((Kv(o)|0)-1)>>0]=120;Hf(o,c[m>>2]|0);a[o+((Kv(o)|0)-1)>>0]=121;Hf(o,c[n>>2]|0)}else{Hf(o,c[c[k>>2]>>2]|0);a[o+((Kv(o)|0)-1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]|0)$n(c[j>>2]|0,c[c[l>>2]>>2]|0,c[q>>2]|0,c[m>>2]|0);if(c[k>>2]|0)$n(c[k>>2]|0,c[(c[l>>2]|0)+4>>2]|0,c[q>>2]|0,c[m>>2]|0);xq(c[q>>2]|0);c[h>>2]=0;r=c[h>>2]|0;i=f;return r|0}default:{c[h>>2]=-1;r=c[h>>2]|0;i=f;return r|0}}return 0}function _n(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=i;i=i+16|0;f=e+12|0;g=e+8|0;h=e+4|0;c[f>>2]=a;c[g>>2]=b;c[h>>2]=d;if(pp(c[f>>2]|0,c[g>>2]|0,c[(c[h>>2]|0)+16>>2]|0)|0){i=e;return}Af(45592,e);Hf(45626,c[g>>2]|0);Hf(45630,c[(c[h>>2]|0)+16>>2]|0);i=e;return}function $n(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0;f=i;i=i+16|0;g=f+12|0;h=f+8|0;j=f+4|0;k=f;c[g>>2]=a;c[h>>2]=b;c[j>>2]=d;c[k>>2]=e;up(c[g>>2]|0,c[h>>2]|0,c[j>>2]|0);ao(c[g>>2]|0,c[k>>2]|0);i=f;return}function ao(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=i;i=i+16|0;e=d+4|0;f=d;c[e>>2]=a;c[f>>2]=b;b=c[e>>2]|0;a=c[e>>2]|0;e=c[f>>2]|0;if(c[(c[f>>2]|0)+48+12>>2]|0){tp(b,a,c[e+48+12>>2]|0);i=d;return}else{qp(b,a,c[e+16>>2]|0);i=d;return}}function bo(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[b+4>>2]=a;c[d>>2]=dg(12)|0;co(c[d>>2]|0);i=b;return c[d>>2]|0}function co(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;a=vq(0)|0;c[c[d>>2]>>2]=a;a=vq(0)|0;c[(c[d>>2]|0)+4>>2]=a;a=vq(0)|0;c[(c[d>>2]|0)+8>>2]=a;i=b;return}function eo(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;if(!(c[d>>2]|0)){i=b;return}fo(c[d>>2]|0);$f(c[d>>2]|0);i=b;return}function fo(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;hq(c[c[d>>2]>>2]|0);c[c[d>>2]>>2]=0;hq(c[(c[d>>2]|0)+4>>2]|0);c[(c[d>>2]|0)+4>>2]=0;hq(c[(c[d>>2]|0)+8>>2]|0);c[(c[d>>2]|0)+8>>2]=0;i=b;return}function go(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0;f=i;i=i+16|0;g=f+12|0;h=f+8|0;j=f+4|0;k=f;c[g>>2]=a;c[h>>2]=b;c[j>>2]=d;c[k>>2]=e;if(!(c[g>>2]|0))c[g>>2]=bo(0)|0;e=c[c[g>>2]>>2]|0;if(c[h>>2]|0)oq(e,c[h>>2]|0)|0;else fq(e);e=c[(c[g>>2]|0)+4>>2]|0;if(c[j>>2]|0)oq(e,c[j>>2]|0)|0;else fq(e);e=c[(c[g>>2]|0)+8>>2]|0;if(c[k>>2]|0){oq(e,c[k>>2]|0)|0;l=c[g>>2]|0;i=f;return l|0}else{fq(e);l=c[g>>2]|0;i=f;return l|0}return 0}function ho(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0;f=i;i=i+16|0;g=f+12|0;h=f+8|0;j=f+4|0;k=f;c[g>>2]=a;c[h>>2]=b;c[j>>2]=d;c[k>>2]=e;if(!(c[g>>2]|0))c[g>>2]=bo(0)|0;e=c[c[g>>2]>>2]|0;if(c[h>>2]|0)qq(e,c[h>>2]|0);else fq(e);e=c[(c[g>>2]|0)+4>>2]|0;if(c[j>>2]|0)qq(e,c[j>>2]|0);else fq(e);e=c[(c[g>>2]|0)+8>>2]|0;if(c[k>>2]|0){qq(e,c[k>>2]|0);l=c[g>>2]|0;i=f;return l|0}else{fq(e);l=c[g>>2]|0;i=f;return l|0}return 0}function io(b){b=b|0;var d=0,e=0;d=i;i=i+16|0;e=d;c[e>>2]=b;b=(c[e>>2]|0)+48|0;a[b>>0]=a[b>>0]&-2;b=(c[e>>2]|0)+48|0;a[b>>0]=a[b>>0]&-3;i=d;return}function jo(a,b,d,e,f,g){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;h=i;i=i+32|0;j=h+24|0;k=h+20|0;l=h+16|0;m=h+12|0;n=h+8|0;o=h+4|0;p=h;c[j>>2]=a;c[k>>2]=b;c[l>>2]=d;c[m>>2]=e;c[n>>2]=f;c[o>>2]=g;c[p>>2]=gg(1,108)|0;ko(c[p>>2]|0,c[j>>2]|0,c[k>>2]|0,c[l>>2]|0,c[m>>2]|0,c[n>>2]|0,c[o>>2]|0);i=h;return c[p>>2]|0}function ko(a,b,d,e,f,g,h){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;j=i;i=i+32|0;k=j+28|0;l=j+24|0;m=j+20|0;n=j+16|0;o=j+12|0;p=j+8|0;q=j+4|0;r=j;c[k>>2]=a;c[l>>2]=b;c[m>>2]=d;c[n>>2]=e;c[o>>2]=f;c[p>>2]=g;c[q>>2]=h;do if(!(c[17714]|0))if(Ya(45718)|0){c[17714]=1;break}else{c[17714]=-1;break}while(0);c[c[k>>2]>>2]=c[l>>2];c[(c[k>>2]|0)+4>>2]=c[m>>2];c[(c[k>>2]|0)+8>>2]=c[n>>2];if((c[m>>2]|0)==1)c[(c[k>>2]|0)+12>>2]=256;else{m=Ro(c[o>>2]|0)|0;c[(c[k>>2]|0)+12>>2]=m}m=mq(c[o>>2]|0)|0;c[(c[k>>2]|0)+16>>2]=m;m=mq(c[p>>2]|0)|0;c[(c[k>>2]|0)+20>>2]=m;m=mq(c[q>>2]|0)|0;c[(c[k>>2]|0)+24>>2]=m;if((c[17714]|0)>0)s=rp(c[(c[k>>2]|0)+16>>2]|0,0)|0;else s=0;c[(c[k>>2]|0)+48+12>>2]=s;io(c[k>>2]|0);c[r>>2]=0;while(1){if((c[r>>2]|0)>>>0>=11)break;s=pq(c[(c[k>>2]|0)+16>>2]|0)|0;c[(c[k>>2]|0)+48+16+(c[r>>2]<<2)>>2]=s;c[r>>2]=(c[r>>2]|0)+1}i=j;return}function lo(a,b,d,e,f,g,h){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;j=i;i=i+48|0;k=j+36|0;l=j+32|0;m=j+28|0;n=j+24|0;o=j+20|0;p=j+16|0;q=j+12|0;r=j+8|0;s=j+4|0;t=j;c[l>>2]=a;c[m>>2]=b;c[n>>2]=d;c[o>>2]=e;c[p>>2]=f;c[q>>2]=g;c[r>>2]=h;c[c[l>>2]>>2]=0;if(!((c[p>>2]|0)!=0&(c[q>>2]|0)!=0)){c[k>>2]=32816;u=c[k>>2]|0;i=j;return u|0}c[s>>2]=Wh(1,108,5)|0;if(c[s>>2]|0){c[t>>2]=Xh(c[s>>2]|0,1)|0;ko(c[t>>2]|0,c[m>>2]|0,c[n>>2]|0,c[o>>2]|0,c[p>>2]|0,c[q>>2]|0,c[r>>2]|0);c[c[l>>2]>>2]=c[s>>2];c[k>>2]=0;u=c[k>>2]|0;i=j;return u|0}else{c[k>>2]=iu()|0;u=c[k>>2]|0;i=j;return u|0}return 0}function mo(a){a=a|0;var b=0,d=0,e=0,f=0;b=i;i=i+16|0;d=b+8|0;e=b+4|0;f=b;c[d>>2]=a;c[e>>2]=c[d>>2];sp(c[(c[e>>2]|0)+48+12>>2]|0);hq(c[(c[e>>2]|0)+16>>2]|0);hq(c[(c[e>>2]|0)+20>>2]|0);hq(c[(c[e>>2]|0)+24>>2]|0);eo(c[(c[e>>2]|0)+28>>2]|0);hq(c[(c[e>>2]|0)+32>>2]|0);hq(c[(c[e>>2]|0)+36>>2]|0);eo(c[(c[e>>2]|0)+40>>2]|0);hq(c[(c[e>>2]|0)+44>>2]|0);hq(c[(c[e>>2]|0)+48+8>>2]|0);c[f>>2]=0;while(1){if((c[f>>2]|0)>>>0>=11)break;hq(c[(c[e>>2]|0)+48+16+(c[f>>2]<<2)>>2]|0);c[f>>2]=(c[f>>2]|0)+1}i=b;return}function no(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;if(!(c[d>>2]|0)){i=b;return}mo(c[d>>2]|0);$f(c[d>>2]|0);i=b;return}function oo(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0;e=i;i=i+16|0;f=e+12|0;g=e+8|0;h=e+4|0;j=e;c[f>>2]=a;c[g>>2]=b;c[h>>2]=d;c[j>>2]=Xh(c[g>>2]|0,1)|0;g=Ei(c[f>>2]|0,c[j>>2]|0,c[h>>2]|0)|0;i=e;return g|0}function po(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=i;i=i+16|0;f=e+12|0;g=e+8|0;h=e;c[f>>2]=a;c[g>>2]=b;c[e+4>>2]=d;c[h>>2]=Xh(c[g>>2]|0,1)|0;g=Fi(c[f>>2]|0,c[h>>2]|0)|0;i=e;return g|0}function qo(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=i;i=i+16|0;f=e+8|0;g=e+4|0;h=e;c[f>>2]=a;c[g>>2]=b;c[h>>2]=d;switch(c[c[h>>2]>>2]|0){case 0:{ro(c[f>>2]|0,c[g>>2]|0,c[h>>2]|0);i=e;return}case 1:{yo(c[f>>2]|0,c[g>>2]|0,c[h>>2]|0);i=e;return}case 2:{zo(c[f>>2]|0,c[g>>2]|0,c[h>>2]|0);i=e;return}default:{i=e;return}}}function ro(a,b,d){a=a|0;b=b|0;d=d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[h>>2]|0,c[j>>2]|0,c[(c[k>>2]|0)+16>>2]|0);i=f;return}function xo(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=i;i=i+16|0;f=e+8|0;g=e+4|0;h=e;c[f>>2]=a;c[g>>2]=b;c[h>>2]=d;_o(c[f>>2]|0,c[g>>2]|0,1);ao(c[f>>2]|0,c[h>>2]|0);i=e;return}function yo(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0;e=i;i=i+32|0;f=e;c[e+16>>2]=a;c[e+12>>2]=b;c[e+8>>2]=d;c[f>>2]=45759;c[f+4>>2]=45707;Bf(45733,f)}function zo(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=i;i=i+16|0;f=e+8|0;g=e+4|0;h=e;c[f>>2]=a;c[g>>2]=b;c[h>>2]=d;vo(c[(c[h>>2]|0)+48+16>>2]|0,c[c[g>>2]>>2]|0,c[(c[g>>2]|0)+4>>2]|0,c[h>>2]|0);to(c[(c[h>>2]|0)+48+16>>2]|0,c[(c[h>>2]|0)+48+16>>2]|0,c[h>>2]|0);to(c[(c[h>>2]|0)+48+16+4>>2]|0,c[c[g>>2]>>2]|0,c[h>>2]|0);to(c[(c[h>>2]|0)+48+16+8>>2]|0,c[(c[g>>2]|0)+4>>2]|0,c[h>>2]|0);d=c[(c[h>>2]|0)+48+16+12>>2]|0;b=c[h>>2]|0;if((c[(c[h>>2]|0)+4>>2]|0)==1){oq(d,c[b+48+16+4>>2]|0)|0;nq(c[(c[h>>2]|0)+48+16+12>>2]|0,c[(c[h>>2]|0)+48+16+12>>2]|0)}else $n(d,c[b+20>>2]|0,c[(c[h>>2]|0)+48+16+4>>2]|0,c[h>>2]|0);vo(c[(c[h>>2]|0)+48+16+16>>2]|0,c[(c[h>>2]|0)+48+16+12>>2]|0,c[(c[h>>2]|0)+48+16+8>>2]|0,c[h>>2]|0);to(c[(c[h>>2]|0)+48+16+20>>2]|0,c[(c[g>>2]|0)+8>>2]|0,c[h>>2]|0);xo(c[(c[h>>2]|0)+48+16+24>>2]|0,c[(c[h>>2]|0)+48+16+20>>2]|0,c[h>>2]|0);uo(c[(c[h>>2]|0)+48+16+24>>2]|0,c[(c[h>>2]|0)+48+16+16>>2]|0,c[(c[h>>2]|0)+48+16+24>>2]|0,c[h>>2]|0);uo(c[c[f>>2]>>2]|0,c[(c[h>>2]|0)+48+16>>2]|0,c[(c[h>>2]|0)+48+16+4>>2]|0,c[h>>2]|0);uo(c[c[f>>2]>>2]|0,c[c[f>>2]>>2]|0,c[(c[h>>2]|0)+48+16+8>>2]|0,c[h>>2]|0);$n(c[c[f>>2]>>2]|0,c[c[f>>2]>>2]|0,c[(c[h>>2]|0)+48+16+24>>2]|0,c[h>>2]|0);uo(c[(c[f>>2]|0)+4>>2]|0,c[(c[h>>2]|0)+48+16+12>>2]|0,c[(c[h>>2]|0)+48+16+8>>2]|0,c[h>>2]|0);$n(c[(c[f>>2]|0)+4>>2]|0,c[(c[f>>2]|0)+4>>2]|0,c[(c[h>>2]|0)+48+16+16>>2]|0,c[h>>2]|0);$n(c[(c[f>>2]|0)+8>>2]|0,c[(c[h>>2]|0)+48+16+16>>2]|0,c[(c[h>>2]|0)+48+16+24>>2]|0,c[h>>2]|0);i=e;return}function Ao(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0;f=i;i=i+16|0;g=f+12|0;h=f+8|0;j=f+4|0;k=f;c[g>>2]=a;c[h>>2]=b;c[j>>2]=d;c[k>>2]=e;switch(c[c[k>>2]>>2]|0){case 0:{Bo(c[g>>2]|0,c[h>>2]|0,c[j>>2]|0,c[k>>2]|0);i=f;return}case 1:{Do(c[g>>2]|0,c[h>>2]|0,c[j>>2]|0,c[k>>2]|0);i=f;return}case 2:{Eo(c[g>>2]|0,c[h>>2]|0,c[j>>2]|0,c[k>>2]|0);i=f;return}default:{i=f;return}}}function Bo(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;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[h>>2]|0)+16>>2]}c[j>>2]=c[(c[f>>2]|0)+16>>2];c[r>>2]=0;do if(c[n>>2]|0){if((c[p>>2]|0)==(c[q>>2]|0)){c[t>>2]=lp(c[j>>2]|0,c[k>>2]|0,c[m>>2]|0,c[l>>2]|0,c[n>>2]|0)|0;c[(c[j>>2]|0)+(c[m>>2]<<2)>>2]=c[t>>2];c[o>>2]=(c[m>>2]|0)+(c[t>>2]|0);if(!(c[p>>2]|0))break;c[r>>2]=1;break}if((c[m>>2]|0)!=(c[n>>2]|0)){np(c[j>>2]|0,c[k>>2]|0,c[m>>2]|0,c[l>>2]|0,c[n>>2]|0)|0;c[o>>2]=c[m>>2];while(1){if((c[o>>2]|0)<=0)break;if(c[(c[j>>2]|0)+((c[o>>2]|0)-1<<2)>>2]|0)break;c[o>>2]=(c[o>>2]|0)+-1}c[r>>2]=c[p>>2];break}h=(op(c[k>>2]|0,c[l>>2]|0,c[m>>2]|0)|0)<0;g=c[j>>2]|0;if(h){Xp(g,c[l>>2]|0,c[k>>2]|0,c[m>>2]|0)|0;c[o>>2]=c[m>>2];while(1){if((c[o>>2]|0)<=0)break;if(c[(c[j>>2]|0)+((c[o>>2]|0)-1<<2)>>2]|0)break;c[o>>2]=(c[o>>2]|0)+-1}if(c[p>>2]|0)break;c[r>>2]=1;break}else{Xp(g,c[k>>2]|0,c[l>>2]|0,c[m>>2]|0)|0;c[o>>2]=c[m>>2];while(1){if((c[o>>2]|0)<=0)break;if(c[(c[j>>2]|0)+((c[o>>2]|0)-1<<2)>>2]|0)break;c[o>>2]=(c[o>>2]|0)+-1}if(!(c[p>>2]|0))break;c[r>>2]=1;break}}else{c[s>>2]=0;while(1){if((c[s>>2]|0)>=(c[m>>2]|0))break;c[(c[j>>2]|0)+(c[s>>2]<<2)>>2]=c[(c[k>>2]|0)+(c[s>>2]<<2)>>2];c[s>>2]=(c[s>>2]|0)+1}c[o>>2]=c[m>>2];c[r>>2]=c[p>>2]}while(0);c[(c[f>>2]|0)+4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[f>>2]=a;c[g>>2]=b;c[h>>2]=d;c[j>>2]=mq(c[h>>2]|0)|0;c[(c[j>>2]|0)+8>>2]=((c[(c[j>>2]|0)+8>>2]|0)!=0^1)&1;Lo(c[f>>2]|0,c[g>>2]|0,c[j>>2]|0);hq(c[j>>2]|0);i=e;return}function Oo(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0;f=i;i=i+16|0;g=f+12|0;h=f+8|0;j=f+4|0;k=f;c[g>>2]=a;c[h>>2]=b;c[j>>2]=d;c[k>>2]=e;Lo(c[g>>2]|0,c[h>>2]|0,c[j>>2]|0);qp(c[g>>2]|0,c[g>>2]|0,c[k>>2]|0);i=f;return}function Po(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0;f=i;i=i+16|0;g=f+12|0;h=f+8|0;j=f+4|0;k=f;c[g>>2]=a;c[h>>2]=b;c[j>>2]=d;c[k>>2]=e;No(c[g>>2]|0,c[h>>2]|0,c[j>>2]|0);qp(c[g>>2]|0,c[g>>2]|0,c[k>>2]|0);i=f;return}function Qo(a){a=a|0;var b=0,d=0,e=0;b=i;i=i+16|0;d=b;c[d>>2]=a;if((c[d>>2]|0)!=0?(c[(c[d>>2]|0)+12>>2]&4|0)!=0:0){i=b;return}while(1){if(!(c[(c[d>>2]|0)+4>>2]|0)){e=6;break}if(!((c[(c[(c[d>>2]|0)+16>>2]|0)+((c[(c[d>>2]|0)+4>>2]|0)-1<<2)>>2]|0)!=0^1)){e=6;break}a=(c[d>>2]|0)+4|0;c[a>>2]=(c[a>>2]|0)+-1}if((e|0)==6){i=b;return}}function Ro(a){a=a|0;var b=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0;b=i;i=i+32|0;e=b+20|0;f=b+16|0;g=b+12|0;h=b+8|0;j=b+4|0;k=b;c[f>>2]=a;if((c[f>>2]|0)!=0?(c[(c[f>>2]|0)+12>>2]&4|0)!=0:0){c[e>>2]=c[(c[f>>2]|0)+8>>2];l=c[e>>2]|0;i=b;return l|0}Qo(c[f>>2]|0);if(c[(c[f>>2]|0)+4>>2]|0){c[h>>2]=c[(c[(c[f>>2]|0)+16>>2]|0)+((c[(c[f>>2]|0)+4>>2]|0)-1<<2)>>2];if(c[h>>2]|0){c[j>>2]=c[h>>2];h=c[j>>2]|0;c[k>>2]=(c[j>>2]|0)>>>0<65536?(h>>>0<256?0:8):h>>>0<16777216?16:24;c[g>>2]=32-((d[45806+((c[j>>2]|0)>>>(c[k>>2]|0))>>0]|0)+(c[k>>2]|0))}else c[g>>2]=32;c[g>>2]=32-(c[g>>2]|0)+((c[(c[f>>2]|0)+4>>2]|0)-1<<5)}else c[g>>2]=0;c[e>>2]=c[g>>2];l=c[e>>2]|0;i=b;return l|0}function So(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0;d=i;i=i+32|0;e=d+20|0;f=d+16|0;g=d+12|0;h=d+8|0;j=d+4|0;k=d;c[f>>2]=a;c[g>>2]=b;c[h>>2]=((c[g>>2]|0)>>>0)/32|0;c[j>>2]=((c[g>>2]|0)>>>0)%32|0;if((c[h>>2]|0)>>>0>=(c[(c[f>>2]|0)+4>>2]|0)>>>0){c[e>>2]=0;l=c[e>>2]|0;i=d;return l|0}else{c[k>>2]=c[(c[(c[f>>2]|0)+16>>2]|0)+(c[h>>2]<<2)>>2];c[e>>2]=(c[k>>2]&1<<c[j>>2]|0)!=0?1:0;l=c[e>>2]|0;i=d;return l|0}return 0}function To(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0;d=i;i=i+32|0;e=d+16|0;f=d+12|0;g=d+8|0;h=d+4|0;j=d;c[e>>2]=a;c[f>>2]=b;if((c[e>>2]|0)!=0?(c[(c[e>>2]|0)+12>>2]&16|0)!=0:0){gq();i=d;return}c[h>>2]=((c[f>>2]|0)>>>0)/32|0;c[j>>2]=((c[f>>2]|0)>>>0)%32|0;if((c[h>>2]|0)>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+1;i=d;return}function Vo(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;d=i;i=i+16|0;e=d+12|0;f=d+8|0;g=d+4|0;h=d;c[e>>2]=a;c[f>>2]=b;if((c[e>>2]|0)!=0?(c[(c[e>>2]|0)+12>>2]&16|0)!=0:0){gq();i=d;return}c[g>>2]=((c[f>>2]|0)>>>0)/32|0;c[h>>2]=((c[f>>2]|0)>>>0)%32|0;if((c[g>>2]|0)>>>0>=(c[(c[e>>2]|0)+4>>2]|0)>>>0){i=d;return}while(1){if((c[h>>2]|0)>>>0>=32)break;f=(c[(c[e>>2]|0)+16>>2]|0)+(c[g>>2]<<2)|0;c[f>>2]=c[f>>2]&~(1<<c[h>>2]);c[h>>2]=(c[h>>2]|0)+1}c[(c[e>>2]|0)+4>>2]=(c[g>>2]|0)+1;i=d;return}function Wo(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;d=i;i=i+16|0;e=d+12|0;f=d+8|0;g=d+4|0;h=d;c[e>>2]=a;c[f>>2]=b;if((c[e>>2]|0)!=0?(c[(c[e>>2]|0)+12>>2]&16|0)!=0:0){gq();i=d;return}c[g>>2]=((c[f>>2]|0)>>>0)/32|0;c[h>>2]=((c[f>>2]|0)>>>0)%32|0;if((c[g>>2]|0)>>>0>=(c[(c[e>>2]|0)+4>>2]|0)>>>0){i=d;return}f=(c[(c[e>>2]|0)+16>>2]|0)+(c[g>>2]<<2)|0;c[f>>2]=c[f>>2]&~(1<<c[h>>2]);i=d;return}function Xo(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0;d=i;i=i+32|0;e=d+16|0;f=d+12|0;g=d+8|0;h=d+4|0;j=d;c[e>>2]=a;c[f>>2]=b;c[g>>2]=c[(c[e>>2]|0)+16>>2];c[h>>2]=c[(c[e>>2]|0)+4>>2];if((c[e>>2]|0)!=0?(c[(c[e>>2]|0)+12>>2]&16|0)!=0:0){gq();i=d;return}if((c[f>>2]|0)>>>0>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>>2]|0);i=d;return}function _o(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;e=i;i=i+48|0;f=e+36|0;g=e+32|0;h=e+28|0;j=e+24|0;k=e+20|0;l=e+16|0;m=e+12|0;n=e+8|0;o=e+4|0;p=e;c[f>>2]=a;c[g>>2]=b;c[h>>2]=d;c[j>>2]=((c[h>>2]|0)>>>0)/32|0;c[k>>2]=((c[h>>2]|0)>>>0)%32|0;if((c[f>>2]|0)!=0?(c[(c[f>>2]|0)+12>>2]&16|0)!=0:0){gq();i=e;return}if(!((c[h>>2]|0)!=0?1:(c[f>>2]|0)!=(c[g>>2]|0))){i=e;return}if((c[f>>2]|0)!=(c[g>>2]|0)){c[l>>2]=c[(c[g>>2]|0)+4>>2];c[m>>2]=c[(c[g>>2]|0)+8>>2];if((c[c[f>>2]>>2]|0)>>>0<((c[l>>2]|0)+(c[j>>2]|0)+1|0)>>>0)eq(c[f>>2]|0,(c[l>>2]|0)+(c[j>>2]|0)+1|0);c[n>>2]=c[(c[f>>2]|0)+16>>2];c[o>>2]=c[(c[g>>2]|0)+16>>2];c[p>>2]=0;while(1){if((c[p>>2]|0)>>>0>=(c[l>>2]|0)>>>0)break;c[(c[n>>2]|0)+(c[p>>2]<<2)>>2]=c[(c[o>>2]|0)+(c[p>>2]<<2)>>2];c[p>>2]=(c[p>>2]|0)+1}c[(c[f>>2]|0)+4>>2]=c[l>>2];c[(c[f>>2]|0)+12>>2]=c[(c[g>>2]|0)+12>>2];c[(c[f>>2]|0)+8>>2]=c[m>>2]}if((c[j>>2]|0)==0|(c[k>>2]|0)!=0){if(c[h>>2]|0){Zo(c[f>>2]|0,(c[j>>2]|0)+1|0);Yo(c[f>>2]|0,c[f>>2]|0,32-(c[k>>2]|0)|0)}}else Zo(c[f>>2]|0,c[j>>2]|0);while(1){if((c[(c[f>>2]|0)+4>>2]|0)<=0){q=19;break}if(c[(c[(c[f>>2]|0)+16>>2]|0)+((c[(c[f>>2]|0)+4>>2]|0)-1<<2)>>2]|0){q=19;break}j=(c[f>>2]|0)+4|0;c[j>>2]=(c[j>>2]|0)+-1}if((q|0)==19){i=e;return}}function $o(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;d=i;i=i+16|0;e=d+12|0;f=d+8|0;g=d+4|0;h=d;c[f>>2]=a;c[g>>2]=b;c[h>>2]=c[g>>2];Qo(c[f>>2]|0);do if(c[(c[f>>2]|0)+4>>2]|0){if(c[(c[f>>2]|0)+8>>2]|0){c[e>>2]=-1;break}if((c[(c[f>>2]|0)+4>>2]|0)!=1){c[e>>2]=1;break}if((c[c[(c[f>>2]|0)+16>>2]>>2]|0)>>>0>(c[h>>2]|0)>>>0){c[e>>2]=1;break}if((c[c[(c[f>>2]|0)+16>>2]>>2]|0)>>>0<(c[h>>2]|0)>>>0){c[e>>2]=-1;break}else{c[e>>2]=0;break}}else c[e>>2]=0-((c[h>>2]|0)!=0&1);while(0);i=d;return c[e>>2]|0}function ap(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0;d=i;i=i+32|0;e=d+20|0;f=d+16|0;g=d+12|0;h=d+8|0;j=d+4|0;k=d;c[f>>2]=a;c[g>>2]=b;if(!((c[f>>2]|0)!=0?(c[(c[f>>2]|0)+12>>2]&4|0)!=0:0))l=3;do if((l|0)==3){if((c[g>>2]|0)!=0?(c[(c[g>>2]|0)+12>>2]&4|0)!=0:0)break;Qo(c[f>>2]|0);Qo(c[g>>2]|0);c[h>>2]=c[(c[f>>2]|0)+4>>2];c[j>>2]=c[(c[g>>2]|0)+4>>2];if((c[(c[f>>2]|0)+8>>2]|0)==0?(c[(c[g>>2]|0)+8>>2]|0)!=0:0){c[e>>2]=1;m=c[e>>2]|0;i=d;return m|0}if((c[(c[f>>2]|0)+8>>2]|0)!=0?(c[(c[g>>2]|0)+8>>2]|0)==0:0){c[e>>2]=-1;m=c[e>>2]|0;i=d;return m|0}if(((c[h>>2]|0)!=(c[j>>2]|0)?(c[(c[f>>2]|0)+8>>2]|0)==0:0)?(c[(c[g>>2]|0)+8>>2]|0)==0:0){c[e>>2]=(c[h>>2]|0)-(c[j>>2]|0);m=c[e>>2]|0;i=d;return m|0}if(((c[h>>2]|0)!=(c[j>>2]|0)?(c[(c[f>>2]|0)+8>>2]|0)!=0:0)?(c[(c[g>>2]|0)+8>>2]|0)!=0:0){c[e>>2]=(c[j>>2]|0)+(c[h>>2]|0);m=c[e>>2]|0;i=d;return m|0}if(!(c[h>>2]|0)){c[e>>2]=0;m=c[e>>2]|0;i=d;return m|0}b=op(c[(c[f>>2]|0)+16>>2]|0,c[(c[g>>2]|0)+16>>2]|0,c[h>>2]|0)|0;c[k>>2]=b;if(!b){c[e>>2]=0;m=c[e>>2]|0;i=d;return m|0}if((((c[k>>2]|0)<0?1:0)|0)==(((c[(c[f>>2]|0)+8>>2]|0)!=0?1:0)|0)){c[e>>2]=1;m=c[e>>2]|0;i=d;return m|0}else{c[e>>2]=-1;m=c[e>>2]|0;i=d;return m|0}}while(0);do if((c[f>>2]|0)!=0?(c[(c[f>>2]|0)+12>>2]&4|0)!=0:0){if((c[g>>2]|0)!=0?(c[(c[g>>2]|0)+12>>2]&4|0)!=0:0)break;c[e>>2]=-1;m=c[e>>2]|0;i=d;return m|0}while(0);if(c[f>>2]|0){if((c[g>>2]|0)!=0?(c[(c[f>>2]|0)+12>>2]&4|0)==0:0)l=13}else if(c[g>>2]|0)l=13;if((l|0)==13?(c[(c[g>>2]|0)+12>>2]&4|0)!=0:0){c[e>>2]=1;m=c[e>>2]|0;i=d;return m|0}if((c[(c[f>>2]|0)+8>>2]|0)==0?(c[(c[g>>2]|0)+8>>2]|0)==0:0){c[e>>2]=0;m=c[e>>2]|0;i=d;return m|0}if((c[(c[f>>2]|0)+8>>2]|0)<(c[(c[g>>2]|0)+8>>2]|0)){c[e>>2]=-1;m=c[e>>2]|0;i=d;return m|0}if((c[(c[f>>2]|0)+8>>2]|0)>(c[(c[g>>2]|0)+8>>2]|0)){c[e>>2]=1;m=c[e>>2]|0;i=d;return m|0}else{c[e>>2]=mw(c[(c[f>>2]|0)+16>>2]|0,c[(c[g>>2]|0)+16>>2]|0,((c[(c[f>>2]|0)+8>>2]|0)+7|0)/8|0)|0;m=c[e>>2]|0;i=d;return m|0}return 0}function bp(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0;e=i;i=i+32|0;f=e+16|0;g=e+12|0;h=e+8|0;j=e+4|0;k=e;c[f>>2]=a;c[g>>2]=b;c[h>>2]=d;c[j>>2]=c[(c[h>>2]|0)+8>>2];c[k>>2]=0;if((c[f>>2]|0)==(c[h>>2]|0)){c[k>>2]=mq(c[h>>2]|0)|0;c[h>>2]=c[k>>2]}cp(c[f>>2]|0,c[g>>2]|0,c[h>>2]|0);if((((c[j>>2]|0)!=0?1:0)^((c[(c[g>>2]|0)+8>>2]|0)!=0?1:0)|0)!=0?(c[(c[f>>2]|0)+4>>2]|0)!=0:0)Lo(c[f>>2]|0,c[f>>2]|0,c[h>>2]|0);if(!(c[k>>2]|0)){i=e;return}hq(c[k>>2]|0);i=e;return}function cp(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=i;i=i+16|0;f=e+8|0;g=e+4|0;h=e;c[f>>2]=a;c[g>>2]=b;c[h>>2]=d;dp(0,c[f>>2]|0,c[g>>2]|0,c[h>>2]|0);i=e;return}function dp(a,b,e,f){a=a|0;b=b|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0;g=i;i=i+160|0;h=g+144|0;j=g+140|0;k=g+136|0;l=g+132|0;m=g+128|0;n=g+124|0;o=g+120|0;p=g+116|0;q=g+112|0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=Op(c[p>>2]|0,c[m>>2]|0,c[q>>2]|0,c[w>>2]|0)|0;if(c[H>>2]|0){c[(c[p>>2]|0)+(c[q>>2]<<2)>>2]=c[H>>2];c[t>>2]=(c[q>>2]|0)+1;break}else{c[t>>2]=c[q>>2];break}}else{if((c[n>>2]|0)!=(c[p>>2]|0)){if((c[h>>2]|0)!=0?(c[n>>2]|0)==(c[o>>2]|0):0)N=32}else N=32;if((N|0)==32){c[z+(c[A>>2]<<2)>>2]=c[r>>2];if(c[l>>2]|0)O=(c[(c[l>>2]|0)+12>>2]&1|0)!=0;else O=0;F=aq(c[r>>2]|0,O&1)|0;E=c[A>>2]|0;c[A>>2]=E+1;c[y+(E<<2)>>2]=F;c[I>>2]=F;c[J>>2]=0;while(1){if((c[J>>2]|0)>=(c[r>>2]|0))break;c[(c[I>>2]|0)+(c[J>>2]<<2)>>2]=c[(c[n>>2]|0)+(c[J>>2]<<2)>>2];c[J>>2]=(c[J>>2]|0)+1}c[n>>2]=c[I>>2]}c:do if((c[p>>2]|0)!=(c[m>>2]|0)){c[K>>2]=0;while(1){if((c[K>>2]|0)>=(c[q>>2]|0))break c;c[(c[p>>2]|0)+(c[K>>2]<<2)>>2]=c[(c[m>>2]|0)+(c[K>>2]<<2)>>2];c[K>>2]=(c[K>>2]|0)+1}}while(0);c[t>>2]=c[q>>2]}while(0);c[x>>2]=Mp(c[o>>2]|0,0,c[p>>2]|0,c[t>>2]|0,c[n>>2]|0,c[r>>2]|0)|0;if(c[h>>2]|0){c[s>>2]=(c[t>>2]|0)-(c[r>>2]|0);if(c[x>>2]|0){c[(c[o>>2]|0)+(c[s>>2]<<2)>>2]=c[x>>2];c[s>>2]=(c[s>>2]|0)+1}c[(c[h>>2]|0)+4>>2]=c[s>>2];c[(c[h>>2]|0)+8>>2]=c[v>>2]}c[t>>2]=c[r>>2];while(1){if((c[t>>2]|0)<=0)break;if(c[(c[p>>2]|0)+((c[t>>2]|0)-1<<2)>>2]|0)break;c[t>>2]=(c[t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>2]=d+4;c[d>>2]=e;a:do if((c[l>>2]|0)>>>0<(c[m>>2]|0)>>>0){while(1){e=(c[k>>2]|0)+-1|0;c[k>>2]=e;if(!e)break;e=c[j>>2]|0;c[j>>2]=e+4;c[m>>2]=(c[e>>2]|0)+1;e=c[m>>2]|0;d=c[h>>2]|0;c[h>>2]=d+4;c[d>>2]=e;if(c[m>>2]|0)break a}c[g>>2]=1;o=c[g>>2]|0;i=f;return o|0}while(0);b:do if((c[h>>2]|0)!=(c[j>>2]|0)){c[n>>2]=0;while(1){if((c[n>>2]|0)>=((c[k>>2]|0)-1|0))break b;c[(c[h>>2]|0)+(c[n>>2]<<2)>>2]=c[(c[j>>2]|0)+(c[n>>2]<<2)>>2];c[n>>2]=(c[n>>2]|0)+1}}while(0);c[g>>2]=0;o=c[g>>2]|0;i=f;return o|0}function lp(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0;g=i;i=i+32|0;h=g+20|0;j=g+16|0;k=g+12|0;l=g+8|0;m=g+4|0;n=g;c[h>>2]=a;c[j>>2]=b;c[k>>2]=d;c[l>>2]=e;c[m>>2]=f;c[n>>2]=0;if(c[m>>2]|0)c[n>>2]=Kp(c[h>>2]|0,c[j>>2]|0,c[l>>2]|0,c[m>>2]|0)|0;if(!((c[k>>2]|0)-(c[m>>2]|0)|0)){o=c[n>>2]|0;i=g;return o|0}c[n>>2]=kp((c[h>>2]|0)+(c[m>>2]<<2)|0,(c[j>>2]|0)+(c[m>>2]<<2)|0,(c[k>>2]|0)-(c[m>>2]|0)|0,c[n>>2]|0)|0;o=c[n>>2]|0;i=g;return o|0}function mp(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0;f=i;i=i+32|0;g=f+24|0;h=f+20|0;j=f+16|0;k=f+12|0;l=f+8|0;m=f+4|0;n=f;c[h>>2]=a;c[j>>2]=b;c[k>>2]=d;c[l>>2]=e;e=c[j>>2]|0;c[j>>2]=e+4;c[m>>2]=c[e>>2];c[l>>2]=(c[m>>2]|0)-(c[l>>2]|0);e=c[l>>2]|0;d=c[h>>2]|0;c[h>>2]=d+4;c[d>>2]=e;a:do if((c[l>>2]|0)>>>0>(c[m>>2]|0)>>>0){while(1){e=(c[k>>2]|0)+-1|0;c[k>>2]=e;if(!e)break;e=c[j>>2]|0;c[j>>2]=e+4;c[m>>2]=c[e>>2];e=(c[m>>2]|0)-1|0;d=c[h>>2]|0;c[h>>2]=d+4;c[d>>2]=e;if(c[m>>2]|0)break a}c[g>>2]=1;o=c[g>>2]|0;i=f;return o|0}while(0);b:do if((c[h>>2]|0)!=(c[j>>2]|0)){c[n>>2]=0;while(1){if((c[n>>2]|0)>=((c[k>>2]|0)-1|0))break b;c[(c[h>>2]|0)+(c[n>>2]<<2)>>2]=c[(c[j>>2]|0)+(c[n>>2]<<2)>>2];c[n>>2]=(c[n>>2]|0)+1}}while(0);c[g>>2]=0;o=c[g>>2]|0;i=f;return o|0}function np(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0;g=i;i=i+32|0;h=g+20|0;j=g+16|0;k=g+12|0;l=g+8|0;m=g+4|0;n=g;c[h>>2]=a;c[j>>2]=b;c[k>>2]=d;c[l>>2]=e;c[m>>2]=f;c[n>>2]=0;if(c[m>>2]|0)c[n>>2]=Xp(c[h>>2]|0,c[j>>2]|0,c[l>>2]|0,c[m>>2]|0)|0;if(!((c[k>>2]|0)-(c[m>>2]|0)|0)){o=c[n>>2]|0;i=g;return o|0}c[n>>2]=mp((c[h>>2]|0)+(c[m>>2]<<2)|0,(c[j>>2]|0)+(c[m>>2]<<2)|0,(c[k>>2]|0)-(c[m>>2]|0)|0,c[n>>2]|0)|0;o=c[n>>2]|0;i=g;return o|0}function op(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0;e=i;i=i+32|0;f=e+24|0;g=e+20|0;h=e+16|0;j=e+12|0;k=e+8|0;l=e+4|0;m=e;c[g>>2]=a;c[h>>2]=b;c[j>>2]=d;c[k>>2]=(c[j>>2]|0)-1;while(1){if((c[k>>2]|0)<0){n=5;break}c[l>>2]=c[(c[g>>2]|0)+(c[k>>2]<<2)>>2];c[m>>2]=c[(c[h>>2]|0)+(c[k>>2]<<2)>>2];if((c[l>>2]|0)!=(c[m>>2]|0)){n=6;break}c[k>>2]=(c[k>>2]|0)+-1}if((n|0)==5){c[f>>2]=0;o=c[f>>2]|0;i=e;return o|0}else if((n|0)==6){c[f>>2]=(c[l>>2]|0)>>>0>(c[m>>2]|0)>>>0?1:-1;o=c[f>>2]|0;i=e;return o|0}return 0}function pp(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0;e=i;i=i+80|0;f=e+68|0;g=e+64|0;h=e+60|0;j=e+56|0;k=e+52|0;l=e+48|0;m=e+44|0;n=e+40|0;o=e+36|0;p=e+32|0;q=e+28|0;r=e+24|0;s=e+20|0;t=e+16|0;u=e+12|0;v=e+8|0;w=e+4|0;x=e;c[g>>2]=a;c[h>>2]=b;c[j>>2]=d;c[n>>2]=0;c[q>>2]=0;c[t>>2]=0;if(!($o(c[h>>2]|0,0)|0)){c[f>>2]=0;y=c[f>>2]|0;i=e;return y|0}if(!($o(c[j>>2]|0,1)|0)){c[f>>2]=0;y=c[f>>2]|0;i=e;return y|0}c[k>>2]=mq(c[h>>2]|0)|0;c[l>>2]=mq(c[j>>2]|0)|0;c[v>>2]=0;while(1){if(So(c[k>>2]|0,0)|0)break;if(!((So(c[l>>2]|0,0)|0)!=0^1))break;Yo(c[k>>2]|0,c[k>>2]|0,1);Yo(c[l>>2]|0,c[l>>2]|0,1);c[v>>2]=(c[v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==19){h=(c[o>>2]|0)==(c[m>>2]|0);if((c[c[f>>2]>>2]|0)<(c[l>>2]|0)){if(!h?(c[o>>2]|0)!=(c[n>>2]|0):0){eq(c[f>>2]|0,c[l>>2]|0);c[o>>2]=c[(c[f>>2]|0)+16>>2];break}if(c[f>>2]|0)H=(c[(c[f>>2]|0)+12>>2]&1|0)!=0;else H=0;c[o>>2]=aq(c[l>>2]|0,H&1)|0;c[v>>2]=1;break}if(!h){if((c[o>>2]|0)!=(c[n>>2]|0))break;c[x>>2]=c[k>>2];h=aq(c[k>>2]|0,c[t>>2]|0)|0;c[w>>2]=h;c[n>>2]=h;c[z>>2]=0;while(1){if((c[z>>2]|0)>=(c[k>>2]|0))break a;c[(c[n>>2]|0)+(c[z>>2]<<2)>>2]=c[(c[o>>2]|0)+(c[z>>2]<<2)>>2];c[z>>2]=(c[z>>2]|0)+1}}c[x>>2]=c[j>>2];h=aq(c[j>>2]|0,c[s>>2]|0)|0;c[w>>2]=h;c[m>>2]=h;if((c[o>>2]|0)==(c[n>>2]|0))c[n>>2]=c[m>>2];c[y>>2]=0;while(1){if((c[y>>2]|0)>=(c[j>>2]|0))break a;c[(c[m>>2]|0)+(c[y>>2]<<2)>>2]=c[(c[o>>2]|0)+(c[y>>2]<<2)>>2];c[y>>2]=(c[y>>2]|0)+1}}while(0);if(c[k>>2]|0){c[p>>2]=Up(c[o>>2]|0,c[m>>2]|0,c[j>>2]|0,c[n>>2]|0,c[k>>2]|0)|0;c[l>>2]=(c[l>>2]|0)-((c[p>>2]|0)!=0?0:1)}else c[l>>2]=0;if(c[v>>2]|0){if((c[v>>2]|0)==2){c[A>>2]=aq(c[l>>2]|0,0)|0;c[B>>2]=0;while(1){if((c[B>>2]|0)>=(c[l>>2]|0))break;c[(c[A>>2]|0)+(c[B>>2]<<2)>>2]=c[(c[o>>2]|0)+(c[B>>2]<<2)>>2];c[B>>2]=(c[B>>2]|0)+1}cq(c[o>>2]|0,0);c[o>>2]=c[A>>2]}dq(c[f>>2]|0,c[o>>2]|0,c[l>>2]|0)}c[(c[f>>2]|0)+4>>2]=c[l>>2];c[(c[f>>2]|0)+8>>2]=c[u>>2];if(!(c[w>>2]|0)){i=e;return}cq(c[w>>2]|0,c[x>>2]|0);i=e;return}function vp(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0;f=i;i=i+16|0;g=f+12|0;h=f+8|0;j=f+4|0;k=f;c[g>>2]=a;c[h>>2]=b;c[j>>2]=d;c[k>>2]=e;up(c[g>>2]|0,c[h>>2]|0,c[j>>2]|0);cp(c[g>>2]|0,c[g>>2]|0,c[k>>2]|0);i=f;return}function wp(a,b,e,f){a=a|0;b=b|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0;g=i;i=i+512|0;h=g+504|0;j=g+500|0;k=g+496|0;l=g+492|0;m=g+488|0;n=g+484|0;o=g+480|0;p=g+476|0;q=g+472|0;r=g+468|0;s=g+464|0;t=g+460|0;u=g+456|0;v=g+452|0;w=g+448|0;x=g+444|0;y=g+440|0;z=g+436|0;A=g+432|0;B=g+428|0;C=g+424|0;D=g+420|0;E=g+416|0;F=g+412|0;G=g+408|0;H=g+404|0;I=g+400|0;J=g+396|0;K=g+392|0;L=g+328|0;M=g+264|0;N=g+260|0;O=g+256|0;P=g+252|0;Q=g+248|0;R=g+244|0;S=g+240|0;T=g+236|0;U=g+232|0;V=g+228|0;W=g+224|0;X=g+220|0;Y=g+216|0;Z=g+212|0;_=g+208|0;$=g+204|0;aa=g+200|0;ba=g+196|0;ca=g+192|0;da=g+164|0;ea=g+160|0;fa=g+156|0;ga=g+152|0;ha=g+148|0;ia=g+144|0;ja=g+140|0;ka=g+136|0;la=g+132|0;ma=g+128|0;na=g+124|0;oa=g+120|0;pa=g+116|0;qa=g+112|0;ra=g+108|0;sa=g+104|0;ta=g+100|0;ua=g+80|0;va=g+60|0;wa=g+56|0;xa=g+52|0;ya=g+48|0;za=g+44|0;Aa=g+24|0;Ba=g+4|0;Ca=g;c[h>>2]=a;c[j>>2]=b;c[k>>2]=e;c[l>>2]=f;c[D>>2]=0;c[E>>2]=0;c[F>>2]=0;c[G>>2]=0;c[H>>2]=0;c[I>>2]=0;c[J>>2]=0;c[K>>2]=0;c[q>>2]=c[(c[k>>2]|0)+4>>2];c[r>>2]=c[(c[l>>2]|0)+4>>2];c[A>>2]=c[r>>2]<<1;c[u>>2]=c[(c[l>>2]|0)+8>>2];do if((c[q>>2]<<5|0)<=512){if((c[q>>2]<<5|0)>256){c[N>>2]=4;break}if((c[q>>2]<<5|0)>128){c[N>>2]=3;break}if((c[q>>2]<<5|0)>64){c[N>>2]=2;break}else{c[N>>2]=1;break}}else c[N>>2]=5;while(0);if(c[k>>2]|0)Da=(c[(c[k>>2]|0)+12>>2]&1|0)!=0;else Da=0;c[x>>2]=Da&1;if(c[l>>2]|0)Ea=(c[(c[l>>2]|0)+12>>2]&1|0)!=0;else Ea=0;c[y>>2]=Ea&1;if(c[j>>2]|0)Fa=(c[(c[j>>2]|0)+12>>2]&1|0)!=0;else Fa=0;c[z>>2]=Fa&1;c[m>>2]=c[(c[h>>2]|0)+16>>2];c[n>>2]=c[(c[k>>2]|0)+16>>2];if(!(c[r>>2]|0))Kf();do if(c[q>>2]|0){c[H>>2]=(c[y>>2]|0)!=0?c[r>>2]|0:0;k=aq(c[r>>2]|0,c[y>>2]|0)|0;c[D>>2]=k;c[o>>2]=k;c[R>>2]=c[(c[(c[l>>2]|0)+16>>2]|0)+((c[r>>2]|0)-1<<2)>>2];k=c[R>>2]|0;c[S>>2]=(c[R>>2]|0)>>>0<65536?(k>>>0<256?0:8):k>>>0<16777216?16:24;c[B>>2]=32-((d[45806+((c[R>>2]|0)>>>(c[S>>2]|0))>>0]|0)+(c[S>>2]|0));a:do if(c[B>>2]|0)Op(c[o>>2]|0,c[(c[l>>2]|0)+16>>2]|0,c[r>>2]|0,c[B>>2]|0)|0;else{c[T>>2]=0;while(1){if((c[T>>2]|0)>=(c[r>>2]|0))break a;c[(c[o>>2]|0)+(c[T>>2]<<2)>>2]=c[(c[(c[l>>2]|0)+16>>2]|0)+(c[T>>2]<<2)>>2];c[T>>2]=(c[T>>2]|0)+1}}while(0);c[s>>2]=c[(c[j>>2]|0)+4>>2];c[v>>2]=c[(c[j>>2]|0)+8>>2];b:do if((c[s>>2]|0)>(c[r>>2]|0)){c[I>>2]=(c[z>>2]|0)!=0?(c[s>>2]|0)+1|0:0;k=aq((c[s>>2]|0)+1|0,c[z>>2]|0)|0;c[E>>2]=k;c[p>>2]=k;c[U>>2]=0;while(1){if((c[U>>2]|0)>=(c[s>>2]|0))break;c[(c[p>>2]|0)+(c[U>>2]<<2)>>2]=c[(c[(c[j>>2]|0)+16>>2]|0)+(c[U>>2]<<2)>>2];c[U>>2]=(c[U>>2]|0)+1}Mp((c[p>>2]|0)+(c[r>>2]<<2)|0,0,c[p>>2]|0,c[s>>2]|0,c[o>>2]|0,c[r>>2]|0)|0;c[s>>2]=c[r>>2];while(1){if((c[s>>2]|0)<=0)break b;if(c[(c[p>>2]|0)+((c[s>>2]|0)-1<<2)>>2]|0)break b;c[s>>2]=(c[s>>2]|0)+-1}}else c[p>>2]=c[(c[j>>2]|0)+16>>2];while(0);if(!(c[s>>2]|0)){c[(c[h>>2]|0)+4>>2]=0;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1){if((c[t>>2]|0)<=0)break;if(c[(c[m>>2]|0)+((c[t>>2]|0)-1<<2)>>2]|0)break;c[t>>2]=(c[t>>2]|0)+-1}Vp(da);c[X>>2]=0;while(1){if((c[X>>2]|0)>=(1<<(c[N>>2]|0)-1|0))break;if(c[x>>2]|0)Ia=c[M+(c[X>>2]<<2)>>2]|0;else Ia=0;cq(c[L+(c[X>>2]<<2)>>2]|0,Ia);c[X>>2]=(c[X>>2]|0)+1}cq(c[O>>2]|0,(c[x>>2]|0)!=0?c[Q>>2]|0:0);g:do if((c[C>>2]|0)!=0&(c[t>>2]|0)!=0){if(c[B>>2]|0)Wp(c[o>>2]|0,c[o>>2]|0,c[r>>2]|0,c[B>>2]|0)|0;np(c[m>>2]|0,c[o>>2]|0,c[r>>2]|0,c[m>>2]|0,c[t>>2]|0)|0;c[t>>2]=c[r>>2];c[w>>2]=c[u>>2];while(1){if((c[t>>2]|0)<=0)break g;if(c[(c[m>>2]|0)+((c[t>>2]|0)-1<<2)>>2]|0)break g;c[t>>2]=(c[t>>2]|0)+-1}}while(0);if((c[(c[h>>2]|0)+16>>2]|0)==(c[m>>2]|0)){c[(c[h>>2]|0)+4>>2]=c[t>>2];c[(c[h>>2]|0)+8>>2]=c[w>>2];break}else xf(46098,46073,786,46083)}else{if((c[r>>2]|0)==1)Ja=(c[c[(c[l>>2]|0)+16>>2]>>2]|0)==1;else Ja=0;c[(c[h>>2]|0)+4>>2]=Ja?0:1;if(c[(c[h>>2]|0)+4>>2]|0){if((c[c[h>>2]>>2]|0)<1)eq(c[h>>2]|0,1);c[m>>2]=c[(c[h>>2]|0)+16>>2];c[c[m>>2]>>2]=1}c[(c[h>>2]|0)+8>>2]=0}while(0);if(c[D>>2]|0)cq(c[D>>2]|0,c[H>>2]|0);if(c[E>>2]|0)cq(c[E>>2]|0,c[I>>2]|0);if(c[F>>2]|0)cq(c[F>>2]|0,c[J>>2]|0);if(!(c[G>>2]|0)){i=g;return}cq(c[G>>2]|0,c[K>>2]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>>2];E=c[l>>2]|0;i=k;return E|0}else{c[s>>2]=c[t>>2];while(1){if(!(c[c[p>>2]>>2]|0))break;if(!((a[c[s>>2]>>0]|0)!=0^1))break;c[s>>2]=(c[s>>2]|0)+1;v=c[p>>2]|0;c[v>>2]=(c[v>>2]|0)+-1}if((c[s>>2]|0)!=(c[t>>2]|0))Ex(c[t>>2]|0,c[s>>2]|0,c[c[p>>2]>>2]|0)|0;c[l>>2]=c[u>>2];E=c[l>>2]|0;i=k;return E|0}return 0}function Bp(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0;g=i;i=i+32|0;h=g+16|0;j=g+12|0;k=g+8|0;l=g+4|0;m=g;c[h>>2]=a;c[j>>2]=b;c[k>>2]=d;c[l>>2]=e;c[m>>2]=f;f=Ap(c[h>>2]|0,c[j>>2]|0,c[k>>2]|0,c[l>>2]|0,c[m>>2]|0,0)|0;i=g;return f|0}function Cp(a,b,e,f){a=a|0;b=b|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;g=i;i=i+48|0;h=g+32|0;j=g+28|0;k=g+24|0;l=g+20|0;m=g+16|0;n=g+12|0;o=g+8|0;p=g+4|0;q=g;c[h>>2]=a;c[j>>2]=b;c[k>>2]=e;c[l>>2]=f;c[m>>2]=c[j>>2];if((c[h>>2]|0)!=0?(c[(c[h>>2]|0)+12>>2]&16|0)!=0:0){gq();i=g;return}c[p>>2]=(((c[k>>2]|0)+4-1|0)>>>0)/4|0;if((c[c[h>>2]>>2]|0)<(c[p>>2]|0))eq(c[h>>2]|0,c[p>>2]|0);c[(c[h>>2]|0)+8>>2]=c[l>>2];c[q>>2]=0;c[n>>2]=(c[m>>2]|0)+(c[k>>2]|0)+-1;while(1){r=c[n>>2]|0;if((c[n>>2]|0)>>>0<((c[m>>2]|0)+4|0)>>>0)break;c[n>>2]=r+-1;c[o>>2]=d[r>>0];k=c[n>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0)|0)<<2;if(((c[q>>2]|0)>>>0)%8|0)c[k>>2]=1;c[r>>2]=(((c[q>>2]|0)+7|0)>>>0)/8|0;c[s>>2]=(((c[r>>2]|0)+4-1|0)>>>0)/4|0;if((c[c[g>>2]>>2]|0)>>>0<(c[s>>2]|0)>>>0)eq(c[g>>2]|0,c[s>>2]|0);c[l>>2]=4-(((c[r>>2]|0)>>>0)%4|0);c[l>>2]=(c[l>>2]|0)%4|0;r=c[s>>2]|0;c[(c[g>>2]|0)+4>>2]=r;c[m>>2]=r;c[(c[g>>2]|0)+8>>2]=c[j>>2];a:while(1){if((c[m>>2]|0)<=0){u=37;break}c[t>>2]=0;while(1){if((c[l>>2]|0)>=4)break;if(c[k>>2]|0){c[o>>2]=48;c[k>>2]=0}else{j=c[h>>2]|0;c[h>>2]=j+1;c[o>>2]=a[j>>0]}if(!(c[o>>2]|0)){u=18;break a}j=c[h>>2]|0;c[h>>2]=j+1;c[p>>2]=a[j>>0];if(!(c[p>>2]|0)){u=20;break a}j=c[o>>2]|0;do if((c[o>>2]|0)>=48&(c[o>>2]|0)<=57)c[n>>2]=j-48;else{r=c[o>>2]|0;if((j|0)>=97&(c[o>>2]|0)<=102){c[n>>2]=r-97+10;break}if(!((r|0)>=65&(c[o>>2]|0)<=70)){u=27;break a}c[n>>2]=(c[o>>2]|0)-65+10}while(0);c[n>>2]=c[n>>2]<<4;j=c[p>>2]|0;do if((c[p>>2]|0)>=48&(c[p>>2]|0)<=57)c[n>>2]=c[n>>2]|j-48;else{r=c[p>>2]|0;if((j|0)>=97&(c[p>>2]|0)<=102){c[n>>2]=c[n>>2]|r-97+10;break}if(!((r|0)>=65&(c[p>>2]|0)<=70)){u=34;break a}c[n>>2]=c[n>>2]|(c[p>>2]|0)-65+10}while(0);c[t>>2]=c[t>>2]<<8;c[t>>2]=c[t>>2]|c[n>>2];c[l>>2]=(c[l>>2]|0)+1}c[l>>2]=0;c[(c[(c[g>>2]|0)+16>>2]|0)+((c[m>>2]|0)-1<<2)>>2]=c[t>>2];c[m>>2]=(c[m>>2]|0)+-1}if((u|0)==18){fq(c[g>>2]|0);c[f>>2]=1;v=c[f>>2]|0;i=e;return v|0}else if((u|0)==20){fq(c[g>>2]|0);c[f>>2]=1;v=c[f>>2]|0;i=e;return v|0}else if((u|0)==27){fq(c[g>>2]|0);c[f>>2]=1;v=c[f>>2]|0;i=e;return v|0}else if((u|0)==34){fq(c[g>>2]|0);c[f>>2]=1;v=c[f>>2]|0;i=e;return v|0}else if((u|0)==37){c[f>>2]=0;v=c[f>>2]|0;i=e;return v|0}return 0}function Hp(b,e,f,g,h){b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0;j=i;i=i+128|0;k=j+112|0;l=j+108|0;m=j+104|0;n=j+100|0;o=j+96|0;p=j+92|0;q=j+88|0;r=j+84|0;s=j+76|0;t=j+72|0;u=j+68|0;v=j+64|0;w=j+60|0;x=j+56|0;y=j+52|0;z=j+48|0;A=j+44|0;B=j+40|0;C=j+36|0;D=j+32|0;E=j+28|0;F=j+24|0;G=j+20|0;H=j+16|0;I=j+12|0;J=j+8|0;K=j+4|0;L=j;c[l>>2]=b;c[m>>2]=e;c[n>>2]=f;c[o>>2]=g;c[p>>2]=h;c[q>>2]=Ro(c[p>>2]|0)|0;if(!(c[o>>2]|0))c[o>>2]=j+80;if((c[(c[p>>2]|0)+8>>2]|0)!=0?($o(c[p>>2]|0,0)|0)!=0:0)c[s>>2]=1;else c[s>>2]=0;c[r>>2]=c[n>>2];c[c[o>>2]>>2]=0;if((c[l>>2]|0)==1){c[u>>2]=0;c[t>>2]=zp(c[p>>2]|0,0,v,0)|0;if(!(c[t>>2]|0)){c[k>>2]=iu()|0;M=c[k>>2]|0;i=j;return M|0}if(c[s>>2]|0){Ip(c[t>>2]|0,c[v>>2]|0);if(!((d[c[t>>2]>>0]|0)&128)){c[v>>2]=(c[v>>2]|0)+1;c[u>>2]=2}}else if((c[v>>2]|0)!=0?((d[c[t>>2]>>0]|0)&128|0)!=0:0){c[v>>2]=(c[v>>2]|0)+1;c[u>>2]=1}if((c[m>>2]|0)!=0?(c[v>>2]|0)>>>0>(c[r>>2]|0)>>>0:0){$f(c[t>>2]|0);c[k>>2]=66;M=c[k>>2]|0;i=j;return M|0}if(c[m>>2]|0){c[w>>2]=c[m>>2];if((c[u>>2]|0)!=1){if(c[u>>2]|0){n=c[w>>2]|0;c[w>>2]=n+1;a[n>>0]=-1}}else{n=c[w>>2]|0;c[w>>2]=n+1;a[n>>0]=0}Dx(c[w>>2]|0,c[t>>2]|0,(c[v>>2]|0)-(((c[u>>2]|0)!=0^1^1)&1)|0)|0}$f(c[t>>2]|0);c[c[o>>2]>>2]=c[v>>2];c[k>>2]=0;M=c[k>>2]|0;i=j;return M|0}if((c[l>>2]|0)==5){c[x>>2]=(((c[q>>2]|0)+7|0)>>>0)/8|0;if((c[m>>2]|0)!=0?(c[x>>2]|0)>>>0>(c[r>>2]|0)>>>0:0){c[k>>2]=66;M=c[k>>2]|0;i=j;return M|0}do if(c[m>>2]|0){c[y>>2]=zp(c[p>>2]|0,0,x,0)|0;if(c[y>>2]|0){Dx(c[m>>2]|0,c[y>>2]|0,c[x>>2]|0)|0;$f(c[y>>2]|0);break}c[k>>2]=iu()|0;M=c[k>>2]|0;i=j;return M|0}while(0);c[c[o>>2]>>2]=c[x>>2];c[k>>2]=0;M=c[k>>2]|0;i=j;return M|0}if((c[l>>2]|0)==2){c[z>>2]=(((c[q>>2]|0)+7|0)>>>0)/8|0;if(c[s>>2]|0){c[k>>2]=45;M=c[k>>2]|0;i=j;return M|0}if((c[m>>2]|0)!=0?((c[z>>2]|0)+2|0)>>>0>(c[r>>2]|0)>>>0:0){c[k>>2]=66;M=c[k>>2]|0;i=j;return M|0}do if(c[m>>2]|0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c[k>>2]|0;i=j;return M|0}function Ip(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,j=0;f=i;i=i+16|0;g=f+8|0;h=f+4|0;j=f;c[g>>2]=b;c[h>>2]=e;c[j>>2]=(c[h>>2]|0)-1;while(1){if((c[j>>2]|0)<0)break;if(!((a[(c[g>>2]|0)+(c[j>>2]|0)>>0]|0)!=0^1))break;c[j>>2]=(c[j>>2]|0)+-1}if((c[j>>2]|0)<0){i=f;return}h=d[(c[g>>2]|0)+(c[j>>2]|0)>>0]|0;do if(!(d[(c[g>>2]|0)+(c[j>>2]|0)>>0]&1)){e=d[(c[g>>2]|0)+(c[j>>2]|0)>>0]|0;if(h&2){a[(c[g>>2]|0)+(c[j>>2]|0)>>0]=(e^252|2)&254;break}b=d[(c[g>>2]|0)+(c[j>>2]|0)>>0]|0;if(e&4){a[(c[g>>2]|0)+(c[j>>2]|0)>>0]=(b^248|4)&252;break}e=d[(c[g>>2]|0)+(c[j>>2]|0)>>0]|0;if(b&8){a[(c[g>>2]|0)+(c[j>>2]|0)>>0]=(e^240|8)&248;break}b=d[(c[g>>2]|0)+(c[j>>2]|0)>>0]|0;if(e&16){a[(c[g>>2]|0)+(c[j>>2]|0)>>0]=(b^224|16)&240;break}e=d[(c[g>>2]|0)+(c[j>>2]|0)>>0]|0;if(b&32){a[(c[g>>2]|0)+(c[j>>2]|0)>>0]=(e^192|32)&224;break}b=(c[g>>2]|0)+(c[j>>2]|0)|0;if(e&64){a[(c[g>>2]|0)+(c[j>>2]|0)>>0]=(d[b>>0]^128|64)&192;break}else{a[b>>0]=-128;break}}else a[(c[g>>2]|0)+(c[j>>2]|0)>>0]=h^254|1;while(0);c[j>>2]=(c[j>>2]|0)+-1;while(1){if((c[j>>2]|0)<0)break;h=(c[g>>2]|0)+(c[j>>2]|0)|0;a[h>>0]=d[h>>0]^255;c[j>>2]=(c[j>>2]|0)+-1}i=f;return}function Jp(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=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h+268|0;w=h+264|0;x=h+260|0;y=h+256|0;z=h+252|0;A=h+248|0;B=h+244|0;C=h+240|0;D=h+236|0;E=h+232|0;F=h+228|0;G=h+224|0;H=h+220|0;I=h+216|0;J=h+212|0;K=h+208|0;L=h+204|0;M=h+200|0;N=h+196|0;O=h+192|0;P=h+188|0;Q=h+184|0;R=h+180|0;S=h+176|0;T=h+172|0;U=h+168|0;V=h+164|0;W=h+160|0;X=h+156|0;Y=h+152|0;Z=h+148|0;$=h+144|0;aa=h+140|0;ba=h+136|0;ca=h+132|0;da=h+128|0;ea=h+124|0;fa=h+120|0;ga=h+116|0;ha=h+112|0;ia=h+108|0;ja=h+104|0;ka=h+100|0;la=h+96|0;ma=h+92|0;na=h+88|0;oa=h+84|0;pa=h+80|0;qa=h+76|0;ra=h+72|0;sa=h+68|0;ta=h+64|0;ua=h+60|0;va=h+56|0;wa=h+52|0;xa=h+48|0;ya=h+44|0;za=h+40|0;Aa=h+36|0;Ba=h+32|0;Ca=h+28|0;Da=h+24|0;Ea=h+20|0;Fa=h+16|0;Ga=h+12|0;Ha=h+8|0;Ia=h+4|0;Ja=h;c[j>>2]=a;c[k>>2]=b;c[l>>2]=d;c[m>>2]=e;c[n>>2]=f;c[o>>2]=g;c[p>>2]=0;switch(c[o>>2]|0){case 0:{Kf();break}case 1:{c[s>>2]=c[c[n>>2]>>2];c[r>>2]=c[(c[l>>2]|0)+((c[m>>2]|0)-1<<2)>>2];if((c[r>>2]|0)>>>0>=(c[s>>2]|0)>>>0){c[r>>2]=(c[r>>2]|0)-(c[s>>2]|0);c[p>>2]=1}c[j>>2]=(c[j>>2]|0)+(c[k>>2]<<2);c[q>>2]=(c[m>>2]|0)-2;while(1){if((c[q>>2]|0)<0)break;c[t>>2]=(c[s>>2]|0)>>>16;c[u>>2]=c[s>>2]&65535;c[x>>2]=((c[r>>2]|0)>>>0)%((c[t>>2]|0)>>>0)|0;c[v>>2]=((c[r>>2]|0)>>>0)/((c[t>>2]|0)>>>0)|0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c[g>>2]|0,0,0)|0;c[c[h>>2]>>2]=d;c[f>>2]=(c[c[h>>2]>>2]|0)!=0?0:65;R=c[f>>2]|0;i=e;return R|0}c[s>>2]=xg(c[l>>2]|0,47167,0)|0;if(c[s>>2]|0){if(jk(c[s>>2]|0,r,(c[j>>2]|0)+8|0)|0)c[q>>2]=1;vg(c[s>>2]|0)}if((c[(c[j>>2]|0)+8>>2]|0)==5)c[(c[j>>2]|0)+8>>2]=0;c[m>>2]=xg(c[l>>2]|0,37916,0)|0;if(c[m>>2]|0)S=0;else S=xg(c[l>>2]|0,42217,0)|0;c[n>>2]=S;a:do if(((c[m>>2]|0)!=0^1)&1^((c[n>>2]|0)!=0^1)&1){if(c[q>>2]|0){c[k>>2]=72;break}if((c[(c[j>>2]|0)+8>>2]|0)==0?(c[r>>2]&4096|0)!=0:0){if(!(c[n>>2]|0)){c[k>>2]=65;break}c[t>>2]=xg(c[l>>2]|0,37805,0)|0;if(c[t>>2]|0){c[p>>2]=Bg(c[t>>2]|0,1,o)|0;if(c[p>>2]|0){S=ok(c[p>>2]|0,c[o>>2]|0)|0;c[(c[j>>2]|0)+16>>2]=S;if(!(c[(c[j>>2]|0)+16>>2]|0))c[k>>2]=5}else c[k>>2]=68;vg(c[t>>2]|0)}else c[k>>2]=65;if(c[k>>2]|0)break;c[u>>2]=Dg(c[n>>2]|0,1,v)|0;if(c[u>>2]|0){if(c[v>>2]<<3>>>0<(c[v>>2]|0)>>>0){$f(c[u>>2]|0);c[k>>2]=67}}else{c[v>>2]=0;c[u>>2]=Vf(1)|0;if(!(c[u>>2]|0))c[k>>2]=iu()|0}if(c[k>>2]|0)break;S=iq(0,c[u>>2]|0,c[v>>2]<<3)|0;c[c[h>>2]>>2]=S;break}do if((c[m>>2]|0)!=0?(c[(c[j>>2]|0)+8>>2]|0)==0:0){if((c[r>>2]&16|0)==0?(c[r>>2]&2|0)==0:0)break;if((yg(c[m>>2]|0)|0)!=3){c[k>>2]=65;break a}S=Bg(c[m>>2]|0,1,o)|0;c[p>>2]=S;if(!((S|0)!=0&(c[o>>2]|0)!=0)){c[k>>2]=65;break a}S=ok(c[p>>2]|0,c[o>>2]|0)|0;c[(c[j>>2]|0)+16>>2]=S;if(!(c[(c[j>>2]|0)+16>>2]|0)){c[k>>2]=5;break a}S=Dg(c[m>>2]|0,2,x)|0;c[w>>2]=S;if(!S){c[k>>2]=65;break a}S=c[w>>2]|0;if(c[x>>2]<<3>>>0<(c[x>>2]|0)>>>0){$f(S);c[k>>2]=67;break a}else{s=iq(0,S,c[x>>2]<<3)|0;c[c[h>>2]>>2]=s;break a}}while(0);if((c[n>>2]|0)!=0?(c[(c[j>>2]|0)+8>>2]|0)==0:0){if(c[r>>2]&2){c[k>>2]=70;break}s=Fg(c[n>>2]|0,1,5)|0;c[c[h>>2]>>2]=s;if(c[c[h>>2]>>2]|0)break;c[k>>2]=65;break}if(((c[n>>2]|0)!=0?(c[(c[j>>2]|0)+8>>2]|0)==1:0)?(c[c[j>>2]>>2]|0)==0:0){c[B>>2]=0;c[C>>2]=0;s=Bg(c[n>>2]|0,1,z)|0;c[y>>2]=s;if(!((s|0)!=0&(c[z>>2]|0)!=0)){c[k>>2]=65;break}c[A>>2]=xg(c[l>>2]|0,37895,0)|0;if(c[A>>2]|0){c[p>>2]=Bg(c[A>>2]|0,1,o)|0;do if(c[p>>2]|0){if((c[o>>2]|0)>>>0>0){c[B>>2]=Vf(c[o>>2]|0)|0;if(c[B>>2]|0){Dx(c[B>>2]|0,c[p>>2]|0,c[o>>2]|0)|0;c[C>>2]=c[o>>2];break}else{c[k>>2]=iu()|0;break}}}else c[k>>2]=68;while(0);vg(c[A>>2]|0);if(c[k>>2]|0)break}c[k>>2]=Il(c[h>>2]|0,c[(c[j>>2]|0)+4>>2]|0,c[y>>2]|0,c[z>>2]|0,c[B>>2]|0,c[C>>2]|0)|0;$f(c[B>>2]|0);break}do if((c[m>>2]|0)!=0?(c[(c[j>>2]|0)+8>>2]|0)==1:0){if((c[c[j>>2]>>2]|0)!=2?(c[c[j>>2]>>2]|0)!=3:0)break;if((yg(c[m>>2]|0)|0)!=3){c[k>>2]=65;break a}s=Bg(c[m>>2]|0,1,o)|0;c[p>>2]=s;if(!((s|0)!=0&(c[o>>2]|0)!=0)){c[k>>2]=65;break a}s=ok(c[p>>2]|0,c[o>>2]|0)|0;c[(c[j>>2]|0)+16>>2]=s;if(!(c[(c[j>>2]|0)+16>>2]|0)){c[k>>2]=5;break a}s=Bg(c[m>>2]|0,2,E)|0;c[D>>2]=s;if((s|0)!=0&(c[E>>2]|0)!=0){c[k>>2]=Ml(c[h>>2]|0,c[(c[j>>2]|0)+4>>2]|0,c[D>>2]|0,c[E>>2]|0,c[(c[j>>2]|0)+16>>2]|0)|0;break a}else{c[k>>2]=65;break a}}while(0);do if((c[n>>2]|0)!=0?(c[(c[j>>2]|0)+8>>2]|0)==2:0){if((c[c[j>>2]>>2]|0)!=2?(c[c[j>>2]>>2]|0)!=3:0)break;if((yg(c[n>>2]|0)|0)!=2){c[k>>2]=65;break a}s=Bg(c[n>>2]|0,1,G)|0;c[F>>2]=s;if((s|0)!=0&(c[G>>2]|0)!=0){c[k>>2]=Nl(c[h>>2]|0,c[(c[j>>2]|0)+4>>2]|0,c[F>>2]|0,c[G>>2]|0)|0;break a}else{c[k>>2]=65;break a}}while(0);if(((c[n>>2]|0)!=0?(c[(c[j>>2]|0)+8>>2]|0)==3:0)?(c[c[j>>2]>>2]|0)==0:0){s=Bg(c[n>>2]|0,1,I)|0;c[H>>2]=s;if(!((s|0)!=0&(c[I>>2]|0)!=0)){c[k>>2]=65;break}c[K>>2]=0;c[L>>2]=0;c[J>>2]=xg(c[l>>2]|0,37805,0)|0;if(c[J>>2]|0){c[p>>2]=Bg(c[J>>2]|0,1,o)|0;do if(c[p>>2]|0){s=ok(c[p>>2]|0,c[o>>2]|0)|0;c[(c[j>>2]|0)+16>>2]=s;if(c[(c[j>>2]|0)+16>>2]|0)break;c[k>>2]=5}else c[k>>2]=68;while(0);vg(c[J>>2]|0);if(c[k>>2]|0)break}c[J>>2]=xg(c[l>>2]|0,37889,0)|0;if(c[J>>2]|0){c[p>>2]=Bg(c[J>>2]|0,1,o)|0;do if(c[p>>2]|0){if((c[o>>2]|0)>>>0<=0)break;s=Vf(c[o>>2]|0)|0;c[(c[j>>2]|0)+20>>2]=s;if(c[(c[j>>2]|0)+20>>2]|0){Dx(c[(c[j>>2]|0)+20>>2]|0,c[p>>2]|0,c[o>>2]|0)|0;c[(c[j>>2]|0)+24>>2]=c[o>>2];break}else{c[k>>2]=iu()|0;break}}else c[k>>2]=68;while(0);vg(c[J>>2]|0);if(c[k>>2]|0)break}c[J>>2]=xg(c[l>>2]|0,37895,0)|0;if(c[J>>2]|0){c[p>>2]=Bg(c[J>>2]|0,1,o)|0;do if(c[p>>2]|0){if((c[o>>2]|0)>>>0<=0)break;c[K>>2]=Vf(c[o>>2]|0)|0;if(c[K>>2]|0){Dx(c[K>>2]|0,c[p>>2]|0,c[o>>2]|0)|0;c[L>>2]=c[o>>2];break}else{c[k>>2]=iu()|0;break}}else c[k>>2]=68;while(0);vg(c[J>>2]|0);if(c[k>>2]|0)break}c[k>>2]=Ol(c[h>>2]|0,c[(c[j>>2]|0)+4>>2]|0,c[(c[j>>2]|0)+16>>2]|0,c[H>>2]|0,c[I>>2]|0,c[(c[j>>2]|0)+20>>2]|0,c[(c[j>>2]|0)+24>>2]|0,c[K>>2]|0,c[L>>2]|0)|0;$f(c[K>>2]|0);break}if(((c[m>>2]|0)!=0?(c[(c[j>>2]|0)+8>>2]|0)==4:0)?(c[c[j>>2]>>2]|0)==2:0){if((yg(c[m>>2]|0)|0)!=3){c[k>>2]=65;break}s=Bg(c[m>>2]|0,1,o)|0;c[p>>2]=s;if(!((s|0)!=0&(c[o>>2]|0)!=0)){c[k>>2]=65;break}c[O>>2]=0;c[P>>2]=0;s=ok(c[p>>2]|0,c[o>>2]|0)|0;c[(c[j>>2]|0)+16>>2]=s;if(!(c[(c[j>>2]|0)+16>>2]|0)){c[k>>2]=5;break}s=Bg(c[m>>2]|0,2,N)|0;c[M>>2]=s;if(!((s|0)!=0&(c[N>>2]|0)!=0)){c[k>>2]=65;break}c[Q>>2]=xg(c[l>>2]|0,37921,0)|0;do if(c[Q>>2]|0){c[p>>2]=Bg(c[Q>>2]|0,1,o)|0;if(c[p>>2]|0){s=Zv(c[p>>2]|0,0,10)|0;c[(c[j>>2]|0)+28>>2]=s;vg(c[Q>>2]|0);break}else{c[k>>2]=68;break a}}while(0);c[Q>>2]=xg(c[l>>2]|0,37895,0)|0;if(c[Q>>2]|0){c[p>>2]=Bg(c[Q>>2]|0,1,o)|0;do if(c[p>>2]|0){if((c[o>>2]|0)>>>0<=0)break;c[O>>2]=Vf(c[o>>2]|0)|0;if(c[O>>2]|0){Dx(c[O>>2]|0,c[p>>2]|0,c[o>>2]|0)|0;c[P>>2]=c[o>>2];break}else{c[k>>2]=iu()|0;break}}else c[k>>2]=68;while(0);vg(c[Q>>2]|0);if(c[k>>2]|0)break}c[k>>2]=Sl(c[h>>2]|0,(c[(c[j>>2]|0)+4>>2]|0)-1|0,c[(c[j>>2]|0)+16>>2]|0,c[M>>2]|0,c[N>>2]|0,c[(c[j>>2]|0)+28>>2]|0,c[O>>2]|0,c[P>>2]|0)|0;$f(c[O>>2]|0);break}if(((c[m>>2]|0)!=0?(c[(c[j>>2]|0)+8>>2]|0)==4:0)?(c[c[j>>2]>>2]|0)==3:0){if((yg(c[m>>2]|0)|0)!=3){c[k>>2]=65;break}s=Bg(c[m>>2]|0,1,o)|0;c[p>>2]=s;if(!((s|0)!=0&(c[o>>2]|0)!=0)){c[k>>2]=65;break}s=ok(c[p>>2]|0,c[o>>2]|0)|0;c[(c[j>>2]|0)+16>>2]=s;if(!(c[(c[j>>2]|0)+16>>2]|0)){c[k>>2]=5;break}s=Fg(c[m>>2]|0,2,5)|0;c[c[h>>2]>>2]=s;if(!(c[c[h>>2]>>2]|0))c[k>>2]=65;c[(c[j>>2]|0)+32>>2]=5;c[(c[j>>2]|0)+36>>2]=c[c[h>>2]>>2];break}c[k>>2]=70}else c[k>>2]=65;while(0);vg(c[l>>2]|0);vg(c[m>>2]|0);vg(c[n>>2]|0);if(c[k>>2]|0){$f(c[(c[j>>2]|0)+20>>2]|0);c[(c[j>>2]|0)+20>>2]=0}else c[(c[j>>2]|0)+12>>2]=c[r>>2];c[f>>2]=c[k>>2];R=c[f>>2]|0;i=e;return R|0}function sk(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;d=i;i=i+16|0;e=d+12|0;f=d+8|0;g=d+4|0;h=d;c[e>>2]=a;c[f>>2]=b;c[g>>2]=c[e>>2];c[h>>2]=c[(c[g>>2]|0)+36>>2];e=Tl(c[h>>2]|0,c[f>>2]|0,(c[(c[g>>2]|0)+4>>2]|0)-1|0,c[(c[g>>2]|0)+16>>2]|0,c[(c[g>>2]|0)+28>>2]|0)|0;i=d;return e|0}function tk(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0;b=i;i=i+32|0;d=b+16|0;e=b+12|0;f=b+8|0;g=b+4|0;h=b;c[e>>2]=a;c[g>>2]=0;a:while(1){a=c[4444+(c[g>>2]<<2)>>2]|0;c[f>>2]=a;if(!a){j=11;break}a=(Vv(c[e>>2]|0,c[(c[f>>2]|0)+12>>2]|0)|0)!=0;k=c[f>>2]|0;if(!a){j=4;break}c[h>>2]=c[k+16>>2];while(1){if(!(c[c[h>>2]>>2]|0))break;if(!(Vv(c[e>>2]|0,c[c[h>>2]>>2]|0)|0)){j=8;break a}c[h>>2]=(c[h>>2]|0)+4}c[g>>2]=(c[g>>2]|0)+1}if((j|0)==4){c[d>>2]=k;l=c[d>>2]|0;i=b;return l|0}else if((j|0)==8){c[d>>2]=c[f>>2];l=c[d>>2]|0;i=b;return l|0}else if((j|0)==11){c[d>>2]=0;l=c[d>>2]|0;i=b;return l|0}return 0}function uk(a){a=a|0;var b=0,d=0,e=0,f=0,g=0;b=i;i=i+16|0;d=b+8|0;e=b+4|0;f=b;c[e>>2]=a;c[f>>2]=vk(c[e>>2]|0)|0;if(c[f>>2]|0){c[d>>2]=c[(c[f>>2]|0)+12>>2];g=c[d>>2]|0;i=b;return g|0}else{c[d>>2]=37933;g=c[d>>2]|0;i=b;return g|0}return 0}function vk(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,j=0;b=i;i=i+16|0;d=b+12|0;e=b+8|0;f=b+4|0;g=b;c[e>>2]=a;c[e>>2]=wk(c[e>>2]|0)|0;c[f>>2]=0;while(1){a=c[4444+(c[f>>2]<<2)>>2]|0;c[g>>2]=a;if(!a){h=6;break}if((c[e>>2]|0)==(c[c[g>>2]>>2]|0)){h=4;break}c[f>>2]=(c[f>>2]|0)+1}if((h|0)==4){c[d>>2]=c[g>>2];j=c[d>>2]|0;i=b;return j|0}else if((h|0)==6){c[d>>2]=0;j=c[d>>2]|0;i=b;return j|0}return 0}function wk(a){a=a|0;var b=0,d=0,e=0;b=i;i=i+16|0;d=b+4|0;e=b;c[e>>2]=a;switch(c[e>>2]|0){case 2:{c[d>>2]=1;break}case 3:{c[d>>2]=1;break}case 16:{c[d>>2]=20;break}case 301:{c[d>>2]=18;break}case 302:{c[d>>2]=18;break}default:c[d>>2]=c[e>>2]}i=b;return c[d>>2]|0}function xk(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0;e=i;i=i+32|0;f=e+20|0;g=e+16|0;h=e+12|0;j=e+8|0;k=e+4|0;l=e;c[f>>2]=a;c[g>>2]=b;c[h>>2]=d;c[c[f>>2]>>2]=0;c[j>>2]=yk(c[h>>2]|0,0,k,l)|0;do if(!(c[j>>2]|0))if(c[(c[k>>2]|0)+48>>2]|0){c[j>>2]=vb[c[(c[k>>2]|0)+48>>2]&63](c[f>>2]|0,c[g>>2]|0,c[l>>2]|0)|0;break}else{c[j>>2]=69;break}while(0);vg(c[l>>2]|0);i=e;return c[j>>2]|0}function yk(a,b,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[j>>2]=69;break}while(0);vg(c[l>>2]|0);i=e;return c[j>>2]|0}function Ak(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0;e=i;i=i+32|0;f=e+20|0;g=e+16|0;h=e+12|0;j=e+8|0;k=e+4|0;l=e;c[f>>2]=a;c[g>>2]=b;c[h>>2]=d;c[c[f>>2]>>2]=0;c[j>>2]=yk(c[h>>2]|0,1,k,l)|0;do if(!(c[j>>2]|0))if(c[(c[k>>2]|0)+56>>2]|0){c[j>>2]=vb[c[(c[k>>2]|0)+56>>2]&63](c[f>>2]|0,c[g>>2]|0,c[l>>2]|0)|0;break}else{c[j>>2]=69;break}while(0);vg(c[l>>2]|0);i=e;return c[j>>2]|0}function Bk(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0;e=i;i=i+32|0;f=e+20|0;g=e+16|0;h=e+12|0;j=e+8|0;k=e+4|0;l=e;c[f>>2]=a;c[g>>2]=b;c[h>>2]=d;c[j>>2]=yk(c[h>>2]|0,0,k,l)|0;do if(!(c[j>>2]|0))if(c[(c[k>>2]|0)+60>>2]|0){c[j>>2]=vb[c[(c[k>>2]|0)+60>>2]&63](c[f>>2]|0,c[g>>2]|0,c[l>>2]|0)|0;break}else{c[j>>2]=69;break}while(0);vg(c[l>>2]|0);i=e;return c[j>>2]|0}function Ck(a){a=a|0;var b=0,d=0,e=0,f=0,g=0;b=i;i=i+16|0;d=b+12|0;e=b+8|0;f=b+4|0;g=b;c[d>>2]=a;c[e>>2]=yk(c[d>>2]|0,1,f,g)|0;do if(!(c[e>>2]|0))if(c[(c[f>>2]|0)+44>>2]|0){c[e>>2]=zb[c[(c[f>>2]|0)+44>>2]&15](c[g>>2]|0)|0;break}else{c[e>>2]=69;break}while(0);vg(c[g>>2]|0);i=b;return c[e>>2]|0}function Dk(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0;d=i;i=i+32|0;e=d+24|0;f=d+20|0;g=d+16|0;h=d+12|0;j=d+8|0;k=d+4|0;l=d;c[e>>2]=a;c[f>>2]=b;c[g>>2]=0;c[h>>2]=0;c[j>>2]=0;c[k>>2]=0;c[c[e>>2]>>2]=0;c[h>>2]=xg(c[f>>2]|0,37958,0)|0;do if(c[h>>2]|0){c[j>>2]=Hg(c[h>>2]|0)|0;vg(c[h>>2]|0);c[h>>2]=c[j>>2];c[j>>2]=0;if(!(c[h>>2]|0)){c[l>>2]=68;break}c[k>>2]=Eg(c[h>>2]|0,0)|0;if(!(c[k>>2]|0)){c[l>>2]=65;break}c[g>>2]=tk(c[k>>2]|0)|0;$f(c[k>>2]|0);c[k>>2]=0;if(!(c[g>>2]|0)){c[l>>2]=4;break}if(c[(c[g>>2]|0)+40>>2]|0){c[l>>2]=Eb[c[(c[g>>2]|0)+40>>2]&7](c[h>>2]|0,c[e>>2]|0)|0;break}else{c[l>>2]=69;break}}else c[l>>2]=65;while(0);vg(c[h>>2]|0);$f(c[k>>2]|0);vg(c[j>>2]|0);i=d;return c[l>>2]|0}function Ek(){return 0}function Fk(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0;f=i;i=i+32|0;g=f+16|0;h=f+12|0;j=f+8|0;k=f+4|0;l=f;c[g>>2]=b;c[h>>2]=d;c[j>>2]=e;c[g>>2]=wk(c[g>>2]|0)|0;c[l>>2]=vk(c[g>>2]|0)|0;if(((c[l>>2]|0)!=0?(a[(c[l>>2]|0)+4>>0]&1|0)==0:0)?(c[(c[l>>2]|0)+68>>2]|0)!=0:0){c[k>>2]=vb[c[(c[l>>2]|0)+68>>2]&63](c[g>>2]|0,c[h>>2]|0,c[j>>2]|0)|0;m=c[k>>2]|0;n=Gk(m)|0;i=f;return n|0}c[k>>2]=4;if(!(c[j>>2]|0)){m=c[k>>2]|0;n=Gk(m)|0;i=f;return n|0}h=c[j>>2]|0;j=c[g>>2]|0;if((c[l>>2]|0)!=0?(a[(c[l>>2]|0)+4>>0]&1|0)==0:0)o=38004;else o=(c[l>>2]|0)!=0?37965:37984;Fb[h&1](49836,j,38026,o);m=c[k>>2]|0;n=Gk(m)|0;i=f;return n|0}function Gk(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;a=Hk(1,c[d>>2]|0)|0;i=b;return a|0}function Hk(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;d=i;i=i+16|0;e=d+4|0;f=d;c[e>>2]=a;c[f>>2]=b;if(!(c[f>>2]|0)){g=0;i=d;return g|0}g=(c[e>>2]&127)<<24|c[f>>2]&65535;i=d;return g|0}function Ik(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0;e=i;i=i+16|0;f=e+12|0;g=e+8|0;h=e+4|0;j=e;c[f>>2]=a;c[g>>2]=b;c[h>>2]=d;c[j>>2]=c[f>>2];f=Jk(c[j>>2]|0,c[g>>2]|0,c[h>>2]|0)|0;i=e;return f|0}function Jk(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0;g=i;i=i+144|0;h=g+72|0;j=g+132|0;k=g+128|0;l=g+124|0;m=g+120|0;n=g+116|0;o=g+112|0;p=g+108|0;q=g+104|0;r=g+100|0;s=g+96|0;t=g+92|0;u=g+88|0;v=g+8|0;w=g+84|0;x=g+80|0;y=g+136|0;z=g;A=g+76|0;c[k>>2]=b;c[l>>2]=e;c[m>>2]=f;c[s>>2]=0;f=(Ah()|0)!=0;if(!(f|(c[17702]|0)!=0)?(c[17702]=1,c[17703]=Kk()|0,(c[17703]|0)!=0):0){c[h>>2]=c[17703];Af(43706,h)}if(c[17703]|0){c[j>>2]=50;B=c[j>>2]|0;i=g;return B|0}do if((c[m>>2]|0)==16){c[n>>2]=10;c[t>>2]=4}else{if((c[m>>2]|0)==24){c[n>>2]=12;c[t>>2]=6;break}if((c[m>>2]|0)==32){c[n>>2]=14;c[t>>2]=8;break}c[j>>2]=44;B=c[j>>2]|0;i=g;return B|0}while(0);c[(c[k>>2]|0)+480>>2]=c[n>>2];h=(c[k>>2]|0)+484|0;a[h>>0]=a[h>>0]&-2;c[(c[k>>2]|0)+488>>2]=29;c[(c[k>>2]|0)+492>>2]=30;c[(c[k>>2]|0)+496>>2]=1;c[(c[k>>2]|0)+500>>2]=2;c[u>>2]=4577;Qk();c[o>>2]=0;while(1){if((c[o>>2]|0)>>>0>=(c[m>>2]|0)>>>0)break;a[v+(c[o>>2]>>2<<2)+(c[o>>2]&3)>>0]=a[(c[l>>2]|0)+(c[o>>2]|0)>>0]|0;c[o>>2]=(c[o>>2]|0)+1}c[p>>2]=(c[t>>2]|0)-1;while(1){if((c[p>>2]|0)<0)break;c[v+32+(c[p>>2]<<2)>>2]=c[v+(c[p>>2]<<2)>>2];c[p>>2]=(c[p>>2]|0)+-1}c[q>>2]=0;c[r>>2]=0;c[p>>2]=0;while(1){if((c[p>>2]|0)>=(c[t>>2]|0))break;if((c[q>>2]|0)>=((c[n>>2]|0)+1|0))break;while(1){if(!((c[p>>2]|0)<(c[t>>2]|0)?(c[r>>2]|0)<4:0))break;c[(c[k>>2]|0)+(c[q>>2]<<4)+(c[r>>2]<<2)>>2]=c[v+32+(c[p>>2]<<2)>>2];c[p>>2]=(c[p>>2]|0)+1;c[r>>2]=(c[r>>2]|0)+1}if((c[r>>2]|0)!=4)continue;c[q>>2]=(c[q>>2]|0)+1;c[r>>2]=0}a:while(1){if((c[q>>2]|0)>=((c[n>>2]|0)+1|0))break;o=v+32|0;a[o>>0]=(d[o>>0]|0)^(d[(c[u>>2]|0)+((d[v+32+((c[t>>2]|0)-1<<2)+1>>0]|0)<<2)>>0]|0);o=v+32+1|0;a[o>>0]=(d[o>>0]|0)^(d[(c[u>>2]|0)+((d[v+32+((c[t>>2]|0)-1<<2)+2>>0]|0)<<2)>>0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p>>2]|0)>=(c[t>>2]|0))break b;l=v+32+(c[p>>2]<<2)|0;c[l>>2]=c[l>>2]^c[v+32+((c[p>>2]|0)-1<<2)>>2];c[p>>2]=(c[p>>2]|0)+1}}while(0);c[p>>2]=0;while(1){if((c[p>>2]|0)>=(c[t>>2]|0))continue a;if((c[q>>2]|0)>=((c[n>>2]|0)+1|0))continue a;while(1){if(!((c[p>>2]|0)<(c[t>>2]|0)?(c[r>>2]|0)<4:0))break;c[(c[k>>2]|0)+(c[q>>2]<<4)+(c[r>>2]<<2)>>2]=c[v+32+(c[p>>2]<<2)>>2];c[p>>2]=(c[p>>2]|0)+1;c[r>>2]=(c[r>>2]|0)+1}if((c[r>>2]|0)!=4)continue;c[q>>2]=(c[q>>2]|0)+1;c[r>>2]=0}}c[w>>2]=v;c[x>>2]=64;a[y>>0]=0;v=z;c[v>>2]=d[y>>0];c[v+4>>2]=0;while(1){if(!((c[w>>2]&7|0)!=0?(c[x>>2]|0)!=0:0))break;a[c[w>>2]>>0]=a[y>>0]|0;c[w>>2]=(c[w>>2]|0)+1;c[x>>2]=(c[x>>2]|0)+-1}if((c[x>>2]|0)>>>0>=8){v=z;r=Mx(c[v>>2]|0,c[v+4>>2]|0,16843009,16843009)|0;v=z;c[v>>2]=r;c[v+4>>2]=C;do{c[A>>2]=c[w>>2];v=z;r=c[v+4>>2]|0;q=c[A>>2]|0;c[q>>2]=c[v>>2];c[q+4>>2]=r;c[x>>2]=(c[x>>2]|0)-8;c[w>>2]=(c[w>>2]|0)+8}while((c[x>>2]|0)>>>0>=8)}while(1){if(!(c[x>>2]|0))break;a[c[w>>2]>>0]=a[y>>0]|0;c[w>>2]=(c[w>>2]|0)+1;c[x>>2]=(c[x>>2]|0)+-1}c[j>>2]=0;B=c[j>>2]|0;i=g;return B|0}function Kk(){var a=0,b=0,d=0,e=0,f=0,g=0;a=i;i=i+16|0;b=a+4|0;d=a;e=Lk()|0;c[d>>2]=e;do if(((e|0)==0?(f=Uk()|0,c[d>>2]=f,(f|0)==0):0)?(f=Vk()|0,c[d>>2]=f,(f|0)==0):0){f=Wk()|0;c[d>>2]=f;if(f){c[b>>2]=c[d>>2];break}f=Zk()|0;c[d>>2]=f;if(f){c[b>>2]=c[d>>2];break}else{c[d>>2]=al()|0;c[b>>2]=c[d>>2];break}}else g=4;while(0);if((g|0)==4)c[b>>2]=c[d>>2];i=a;return c[b>>2]|0}function Lk(){var a=0,b=0,d=0,e=0;a=i;i=i+528|0;b=a+504|0;d=a;e=a+512|0;Ik(d,38153,16)|0;Mk(d,e,38169)|0;do if(!(mw(e,38185,16)|0)){Nk(d,e,e)|0;if(mw(e,38169,16)|0){c[b>>2]=38233;break}else{c[b>>2]=0;break}}else c[b>>2]=38201;while(0);i=a;return c[b>>2]|0}function Mk(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0;e=i;i=i+16|0;f=e+12|0;g=e+8|0;h=e+4|0;j=e;c[f>>2]=a;c[g>>2]=b;c[h>>2]=d;c[j>>2]=c[f>>2];if(c[(c[j>>2]|0)+496>>2]|0)Bb[c[(c[j>>2]|0)+496>>2]&3]();f=vb[c[(c[j>>2]|0)+488>>2]&63](c[j>>2]|0,c[g>>2]|0,c[h>>2]|0)|0;i=e;return f|0}function Nk(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0;e=i;i=i+16|0;f=e+12|0;g=e+8|0;h=e+4|0;j=e;c[f>>2]=a;c[g>>2]=b;c[h>>2]=d;c[j>>2]=c[f>>2];Ok(c[j>>2]|0);if(c[(c[j>>2]|0)+500>>2]|0)Bb[c[(c[j>>2]|0)+500>>2]&3]();f=vb[c[(c[j>>2]|0)+492>>2]&63](c[j>>2]|0,c[g>>2]|0,c[h>>2]|0)|0;i=e;return f|0}function Ok(b){b=b|0;var d=0,e=0;d=i;i=i+16|0;e=d;c[e>>2]=b;if(a[(c[e>>2]|0)+484>>0]&1){i=d;return}Pk(c[e>>2]|0);b=(c[e>>2]|0)+484|0;a[b>>0]=a[b>>0]&-2|1;i=d;return}function Pk(a){a=a|0;var b=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0;b=i;i=i+32|0;e=b+20|0;f=b+16|0;g=b+12|0;h=b+8|0;j=b+4|0;k=b;c[e>>2]=a;c[g>>2]=4577;Qk();Sk();c[(c[e>>2]|0)+240>>2]=c[c[e>>2]>>2];c[(c[e>>2]|0)+240+4>>2]=c[(c[e>>2]|0)+4>>2];c[(c[e>>2]|0)+240+8>>2]=c[(c[e>>2]|0)+8>>2];c[(c[e>>2]|0)+240+12>>2]=c[(c[e>>2]|0)+12>>2];c[f>>2]=1;while(1){l=(c[e>>2]|0)+(c[f>>2]<<4)|0;if((c[f>>2]|0)>=(c[(c[e>>2]|0)+480>>2]|0))break;c[h>>2]=l;c[j>>2]=(c[e>>2]|0)+240+(c[f>>2]<<4);c[k>>2]=c[c[h>>2]>>2];a=Tk(c[5600+((d[(c[g>>2]|0)+(((c[k>>2]|0)>>>0&255)<<2)>>0]|0)<<2)>>2]|0,0)|0;m=a^(Tk(c[5600+((d[(c[g>>2]|0)+(((c[k>>2]|0)>>>8&255)<<2)>>0]|0)<<2)>>2]|0,8)|0);a=m^(Tk(c[5600+((d[(c[g>>2]|0)+(((c[k>>2]|0)>>>16&255)<<2)>>0]|0)<<2)>>2]|0,16)|0);m=a^(Tk(c[5600+((d[(c[g>>2]|0)+(((c[k>>2]|0)>>>24&255)<<2)>>0]|0)<<2)>>2]|0,24)|0);c[c[j>>2]>>2]=m;c[k>>2]=c[(c[h>>2]|0)+4>>2];m=Tk(c[5600+((d[(c[g>>2]|0)+(((c[k>>2]|0)>>>0&255)<<2)>>0]|0)<<2)>>2]|0,0)|0;a=m^(Tk(c[5600+((d[(c[g>>2]|0)+(((c[k>>2]|0)>>>8&255)<<2)>>0]|0)<<2)>>2]|0,8)|0);m=a^(Tk(c[5600+((d[(c[g>>2]|0)+(((c[k>>2]|0)>>>16&255)<<2)>>0]|0)<<2)>>2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>>2]=c[(c[e>>2]|0)+(c[f>>2]<<4)+12>>2];i=b;return}function Qk(){Rk(4576,1024);return}function Rk(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=i;i=i+16|0;e=d+4|0;f=d;c[d+8>>2]=a;c[e>>2]=b;c[f>>2]=0;while(1){if((c[f>>2]|0)>>>0>=(c[e>>2]|0)>>>0)break;c[f>>2]=(c[f>>2]|0)+256}i=d;return}function Sk(){Rk(5600,1280);return}function Tk(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=i;i=i+16|0;e=d+4|0;f=d;c[e>>2]=a;c[f>>2]=b;i=d;return c[e>>2]<<(c[f>>2]&31)|(c[e>>2]|0)>>>(32-(c[f>>2]|0)&31)|0}function Uk(){var a=0,b=0,d=0,e=0;a=i;i=i+528|0;b=a+504|0;d=a;e=a+512|0;Ik(d,38265,24)|0;Mk(d,e,38289)|0;do if(!(mw(e,38305,16)|0)){Nk(d,e,e)|0;if(mw(e,38289,16)|0){c[b>>2]=38353;break}else{c[b>>2]=0;break}}else c[b>>2]=38321;while(0);i=a;return c[b>>2]|0}function Vk(){var a=0,b=0,d=0,e=0;a=i;i=i+528|0;b=a+504|0;d=a;e=a+512|0;Ik(d,38385,32)|0;Mk(d,e,38417)|0;do if(!(mw(e,38433,16)|0)){Nk(d,e,e)|0;if(mw(e,38417,16)|0){c[b>>2]=38481;break}else{c[b>>2]=0;break}}else c[b>>2]=38449;while(0);i=a;return c[b>>2]|0}function Wk(){var a=0,b=0;a=i;i=i+16|0;c[a+8>>2]=9;c[a+4>>2]=16;c[a>>2]=504;b=as(38033,1,2,4,9,16,504)|0;i=a;return b|0}function Xk(b,e,f,g,h){b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0;j=i;i=i+96|0;k=j+76|0;l=j+72|0;m=j+68|0;n=j+64|0;o=j+60|0;p=j+56|0;q=j+52|0;r=j+48|0;s=j+44|0;t=j+40|0;u=j;v=j+36|0;w=j+32|0;x=j+28|0;y=j+80|0;z=j+16|0;A=j+24|0;c[k>>2]=b;c[l>>2]=e;c[m>>2]=f;c[n>>2]=g;c[o>>2]=h;c[p>>2]=c[k>>2];c[q>>2]=c[m>>2];c[r>>2]=c[n>>2];c[s>>2]=0;if(c[(c[p>>2]|0)+496>>2]|0)Bb[c[(c[p>>2]|0)+496>>2]&3]();c[v>>2]=c[(c[p>>2]|0)+488>>2];while(1){if(!(c[o>>2]|0))break;c[s>>2]=vb[c[v>>2]&63](c[p>>2]|0,u,c[l>>2]|0)|0;Yk(c[q>>2]|0,u,c[r>>2]|0,16);c[q>>2]=(c[q>>2]|0)+16;c[r>>2]=(c[r>>2]|0)+16;c[t>>2]=16;while(1){if((c[t>>2]|0)<=0)break;n=(c[l>>2]|0)+((c[t>>2]|0)-1)|0;a[n>>0]=(a[n>>0]|0)+1<<24>>24;if(a[(c[l>>2]|0)+((c[t>>2]|0)-1)>>0]|0)break;c[t>>2]=(c[t>>2]|0)+-1}c[o>>2]=(c[o>>2]|0)+-1}c[w>>2]=u;c[x>>2]=16;a[y>>0]=0;u=z;c[u>>2]=d[y>>0];c[u+4>>2]=0;while(1){if(!((c[w>>2]&7|0)!=0?(c[x>>2]|0)!=0:0))break;a[c[w>>2]>>0]=a[y>>0]|0;c[w>>2]=(c[w>>2]|0)+1;c[x>>2]=(c[x>>2]|0)+-1}if((c[x>>2]|0)>>>0>=8){u=z;o=Mx(c[u>>2]|0,c[u+4>>2]|0,16843009,16843009)|0;u=z;c[u>>2]=o;c[u+4>>2]=C;do{c[A>>2]=c[w>>2];u=z;o=c[u+4>>2]|0;t=c[A>>2]|0;c[t>>2]=c[u>>2];c[t+4>>2]=o;c[x>>2]=(c[x>>2]|0)-8;c[w>>2]=(c[w>>2]|0)+8}while((c[x>>2]|0)>>>0>=8)}while(1){if(!(c[x>>2]|0))break;a[c[w>>2]>>0]=a[y>>0]|0;c[w>>2]=(c[w>>2]|0)+1;c[x>>2]=(c[x>>2]|0)+-1}if(!(c[s>>2]|0)){i=j;return}If((c[s>>2]|0)+16|0);Jf();i=j;return}function Yk(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;h=i;i=i+48|0;j=h+40|0;k=h+36|0;l=h+32|0;m=h+28|0;n=h+24|0;o=h+20|0;p=h+16|0;q=h+12|0;r=h+8|0;s=h+4|0;c[j>>2]=b;c[k>>2]=e;c[l>>2]=f;c[m>>2]=g;c[n>>2]=c[j>>2];c[o>>2]=c[k>>2];c[p>>2]=c[l>>2];c[h>>2]=3;if(!((c[n>>2]|c[o>>2]|c[p>>2])&3)){c[q>>2]=c[n>>2];c[r>>2]=c[o>>2];c[s>>2]=c[p>>2];while(1){if((c[m>>2]|0)>>>0<4)break;l=c[r>>2]|0;c[r>>2]=l+4;k=c[l>>2]|0;l=c[s>>2]|0;c[s>>2]=l+4;j=k^c[l>>2];l=c[q>>2]|0;c[q>>2]=l+4;c[l>>2]=j;c[m>>2]=(c[m>>2]|0)-4}c[n>>2]=c[q>>2];c[o>>2]=c[r>>2];c[p>>2]=c[s>>2]}while(1){if(!(c[m>>2]|0))break;s=c[o>>2]|0;c[o>>2]=s+1;r=d[s>>0]|0;s=c[p>>2]|0;c[p>>2]=s+1;q=(r^(d[s>>0]|0))&255;s=c[n>>2]|0;c[n>>2]=s+1;a[s>>0]=q;c[m>>2]=(c[m>>2]|0)+-1}i=h;return}function Zk(){var a=0,b=0;a=i;i=i+16|0;c[a+8>>2]=10;c[a+4>>2]=16;c[a>>2]=504;b=Yr(38033,1,2,3,10,16,504)|0;i=a;return b|0}function _k(b,e,f,g,h){b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0;j=i;i=i+80|0;k=j+72|0;l=j+68|0;m=j+64|0;n=j+60|0;o=j+56|0;p=j+52|0;q=j+48|0;r=j+44|0;s=j+40|0;t=j;u=j+36|0;v=j+32|0;w=j+28|0;x=j+76|0;y=j+16|0;z=j+24|0;c[k>>2]=b;c[l>>2]=e;c[m>>2]=f;c[n>>2]=g;c[o>>2]=h;c[p>>2]=c[k>>2];c[q>>2]=c[m>>2];c[r>>2]=c[n>>2];c[s>>2]=0;Ok(c[p>>2]|0);if(c[(c[p>>2]|0)+500>>2]|0)Bb[c[(c[p>>2]|0)+500>>2]&3]();c[u>>2]=c[(c[p>>2]|0)+492>>2];while(1){if(!(c[o>>2]|0))break;c[s>>2]=vb[c[u>>2]&63](c[p>>2]|0,t,c[r>>2]|0)|0;$k(c[q>>2]|0,t,c[l>>2]|0,c[r>>2]|0,16);c[r>>2]=(c[r>>2]|0)+16;c[q>>2]=(c[q>>2]|0)+16;c[o>>2]=(c[o>>2]|0)+-1}c[v>>2]=t;c[w>>2]=16;a[x>>0]=0;t=y;c[t>>2]=d[x>>0];c[t+4>>2]=0;while(1){if(!((c[v>>2]&7|0)!=0?(c[w>>2]|0)!=0:0))break;a[c[v>>2]>>0]=a[x>>0]|0;c[v>>2]=(c[v>>2]|0)+1;c[w>>2]=(c[w>>2]|0)+-1}if((c[w>>2]|0)>>>0>=8){t=y;o=Mx(c[t>>2]|0,c[t+4>>2]|0,16843009,16843009)|0;t=y;c[t>>2]=o;c[t+4>>2]=C;do{c[z>>2]=c[v>>2];t=y;o=c[t+4>>2]|0;q=c[z>>2]|0;c[q>>2]=c[t>>2];c[q+4>>2]=o;c[w>>2]=(c[w>>2]|0)-8;c[v>>2]=(c[v>>2]|0)+8}while((c[w>>2]|0)>>>0>=8)}while(1){if(!(c[w>>2]|0))break;a[c[v>>2]>>0]=a[x>>0]|0;c[v>>2]=(c[v>>2]|0)+1;c[w>>2]=(c[w>>2]|0)+-1}if(!(c[s>>2]|0)){i=j;return}If((c[s>>2]|0)+16|0);Jf();i=j;return}function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>2]=504;b=_r(38033,1,2,2,10,16,504)|0;i=a;return b|0}function bl(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;g=i;i=i+48|0;h=g+36|0;j=g+32|0;k=g+28|0;l=g+24|0;m=g+20|0;n=g+16|0;o=g+12|0;p=g+8|0;q=g+4|0;r=g;c[h>>2]=a;c[j>>2]=b;c[k>>2]=d;c[l>>2]=e;c[m>>2]=f;c[n>>2]=c[h>>2];c[o>>2]=c[k>>2];c[p>>2]=c[l>>2];c[q>>2]=0;if(c[(c[n>>2]|0)+496>>2]|0)Bb[c[(c[n>>2]|0)+496>>2]&3]();c[r>>2]=c[(c[n>>2]|0)+488>>2];while(1){if(!(c[m>>2]|0))break;c[q>>2]=vb[c[r>>2]&63](c[n>>2]|0,c[j>>2]|0,c[j>>2]|0)|0;cl(c[o>>2]|0,c[j>>2]|0,c[p>>2]|0,16);c[o>>2]=(c[o>>2]|0)+16;c[p>>2]=(c[p>>2]|0)+16;c[m>>2]=(c[m>>2]|0)+-1}if(!(c[q>>2]|0)){i=g;return}If((c[q>>2]|0)+16|0);Jf();i=g;return}function cl(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0;f=i;i=i+16|0;g=f+12|0;h=f+8|0;j=f+4|0;k=f;c[g>>2]=a;c[h>>2]=b;c[j>>2]=d;c[k>>2]=e;$k(c[g>>2]|0,c[j>>2]|0,c[h>>2]|0,c[j>>2]|0,c[k>>2]|0);i=f;return}function dl(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=i;i=i+16|0;f=e+8|0;g=e+4|0;h=e;c[f>>2]=a;c[g>>2]=b;c[h>>2]=d;d=el(c[f>>2]|0,c[g>>2]|0,c[h>>2]|0)|0;i=e;return d|0}function el(a,b,e){a=a|0;b=b|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m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l;l=Tk(c[5600+(((c[m+12>>2]|0)>>>8&255)<<2)>>2]|0,8)|0;c[m>>2]=c[m>>2]^l;l=Tk(c[5600+(((c[m+12>>2]|0)>>>16&255)<<2)>>2]|0,16)|0;k=m+4|0;c[k>>2]=c[k>>2]^l;l=Tk(c[5600+(((c[m+12>>2]|0)>>>24&255)<<2)>>2]|0,24)|0;k=m+8|0;c[k>>2]=c[k>>2]^l;c[m+12>>2]=c[(c[g>>2]|0)+240+16+12>>2]^c[n+12>>2];c[n>>2]=(d[6624+((c[m>>2]|0)>>>0&255)>>0]|0)<<0;c[n+4>>2]=(d[6624+((c[m>>2]|0)>>>8&255)>>0]|0)<<8;c[n+8>>2]=(d[6624+((c[m>>2]|0)>>>16&255)>>0]|0)<<16;c[n+12>>2]=(d[6624+((c[m>>2]|0)>>>24&255)>>0]|0)<<24;c[m>>2]=c[n>>2]^c[(c[g>>2]|0)+240>>2];l=n+4|0;c[l>>2]=c[l>>2]^(d[6624+((c[m+4>>2]|0)>>>0&255)>>0]|0)<<0;l=n+8|0;c[l>>2]=c[l>>2]^(d[6624+((c[m+4>>2]|0)>>>8&255)>>0]|0)<<8;l=n+12|0;c[l>>2]=c[l>>2]^(d[6624+((c[m+4>>2]|0)>>>16&255)>>0]|0)<<16;c[m>>2]=c[m>>2]^(d[6624+((c[m+4>>2]|0)>>>24&255)>>0]|0)<<24;c[m+4>>2]=c[n+4>>2]^c[(c[g>>2]|0)+240+4>>2];l=n+8|0;c[l>>2]=c[l>>2]^(d[6624+((c[m+8>>2]|0)>>>0&255)>>0]|0)<<0;l=n+12|0;c[l>>2]=c[l>>2]^(d[6624+((c[m+8>>2]|0)>>>8&255)>>0]|0)<<8;c[m>>2]=c[m>>2]^(d[6624+((c[m+8>>2]|0)>>>16&255)>>0]|0)<<16;l=m+4|0;c[l>>2]=c[l>>2]^(d[6624+((c[m+8>>2]|0)>>>24&255)>>0]|0)<<24;c[m+8>>2]=c[n+8>>2]^c[(c[g>>2]|0)+240+8>>2];l=n+12|0;c[l>>2]=c[l>>2]^(d[6624+((c[m+12>>2]|0)>>>0&255)>>0]|0)<<0;c[m>>2]=c[m>>2]^(d[6624+((c[m+12>>2]|0)>>>8&255)>>0]|0)<<8;l=m+4|0;c[l>>2]=c[l>>2]^(d[6624+((c[m+12>>2]|0)>>>16&255)>>0]|0)<<16;l=m+8|0;c[l>>2]=c[l>>2]^(d[6624+((c[m+12>>2]|0)>>>24&255)>>0]|0)<<24;c[m+12>>2]=c[n+12>>2]^c[(c[g>>2]|0)+240+12>>2];gl(c[h>>2]|0,c[m>>2]|0);gl((c[h>>2]|0)+4|0,c[m+4>>2]|0);gl((c[h>>2]|0)+8|0,c[m+8>>2]|0);gl((c[h>>2]|0)+12|0,c[m+12>>2]|0);i=f;return 64}function jl(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0;e=i;i=i+16|0;f=e+12|0;g=e+8|0;h=e+4|0;j=e;c[f>>2]=a;c[g>>2]=b;c[h>>2]=d;switch(c[f>>2]|0){case 7:{c[j>>2]=kl(c[g>>2]|0,c[h>>2]|0)|0;break}case 8:{c[j>>2]=ml(c[g>>2]|0,c[h>>2]|0)|0;break}case 9:{c[j>>2]=nl(c[g>>2]|0,c[h>>2]|0)|0;break}default:c[j>>2]=12}i=e;return c[j>>2]|0}function kl(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0;d=i;i=i+32|0;e=d+16|0;f=d+12|0;g=d+8|0;h=d+4|0;j=d;c[f>>2]=a;c[g>>2]=b;c[h>>2]=49826;c[j>>2]=Lk()|0;do if(!(c[j>>2]|0)){if(c[f>>2]|0){c[h>>2]=38513;c[j>>2]=ll(2)|0;if(c[j>>2]|0)break;c[h>>2]=38630;c[j>>2]=ll(5)|0;if(c[j>>2]|0)break}c[e>>2]=0;k=c[e>>2]|0;i=d;return k|0}while(0);if(c[g>>2]|0)Fb[c[g>>2]&1](38634,7,c[h>>2]|0,c[j>>2]|0);c[e>>2]=50;k=c[e>>2]|0;i=d;return k|0}function ll(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0;b=i;i=i+48|0;d=b+24|0;e=b+20|0;f=b+32|0;g=b+16|0;h=b+12|0;j=b+8|0;k=b+4|0;l=b;c[e>>2]=a;c[k>>2]=0;c[l>>2]=0;c[h>>2]=0;while(1){if((c[h>>2]|0)>>>0>=2)break;if((c[7e3+((c[h>>2]|0)*164|0)>>2]|0)==(c[e>>2]|0))break;c[h>>2]=(c[h>>2]|0)+1}if((c[h>>2]|0)==2){fi(c[k>>2]|0);fi(c[l>>2]|0);c[d>>2]=38517;m=c[d>>2]|0;i=b;return m|0}c[g>>2]=ai(k,7,c[7e3+((c[h>>2]|0)*164|0)>>2]|0,0)|0;if(c[g>>2]|0){fi(c[k>>2]|0);fi(c[l>>2]|0);c[d>>2]=38544;m=c[d>>2]|0;i=b;return m|0}c[g>>2]=ai(l,7,c[7e3+((c[h>>2]|0)*164|0)>>2]|0,0)|0;e=c[k>>2]|0;if(c[g>>2]|0){fi(e);fi(c[l>>2]|0);c[d>>2]=38544;m=c[d>>2]|0;i=b;return m|0}c[g>>2]=ni(e,7e3+((c[h>>2]|0)*164|0)+4|0,16)|0;if(!(c[g>>2]|0))c[g>>2]=ni(c[l>>2]|0,7e3+((c[h>>2]|0)*164|0)+4|0,16)|0;e=c[k>>2]|0;if(c[g>>2]|0){fi(e);fi(c[l>>2]|0);c[d>>2]=38549;m=c[d>>2]|0;i=b;return m|0}c[g>>2]=pi(e,7e3+((c[h>>2]|0)*164|0)+20|0,16)|0;if(!(c[g>>2]|0))c[g>>2]=pi(c[l>>2]|0,7e3+((c[h>>2]|0)*164|0)+20|0,16)|0;if(c[g>>2]|0){fi(c[k>>2]|0);fi(c[l>>2]|0);c[d>>2]=38557;m=c[d>>2]|0;i=b;return m|0}c[j>>2]=0;while(1){n=c[k>>2]|0;if((c[j>>2]|0)>>>0>=4){o=30;break}c[g>>2]=gi(n,f,16,7e3+((c[h>>2]|0)*164|0)+36+(c[j>>2]<<5)|0,16)|0;if(c[g>>2]|0){o=22;break}if(mw(f,7e3+((c[h>>2]|0)*164|0)+36+(c[j>>2]<<5)+16|0,16)|0){o=24;break}c[g>>2]=ki(c[l>>2]|0,f,16,7e3+((c[h>>2]|0)*164|0)+36+(c[j>>2]<<5)+16|0,16)|0;if(c[g>>2]|0){o=26;break}if(mw(f,7e3+((c[h>>2]|0)*164|0)+36+(c[j>>2]<<5)|0,16)|0){o=28;break}c[j>>2]=(c[j>>2]|0)+1}if((o|0)==22){fi(c[k>>2]|0);fi(c[l>>2]|0);c[d>>2]=38564;m=c[d>>2]|0;i=b;return m|0}else if((o|0)==24){fi(c[k>>2]|0);fi(c[l>>2]|0);c[d>>2]=38580;m=c[d>>2]|0;i=b;return m|0}else if((o|0)==26){fi(c[k>>2]|0);fi(c[l>>2]|0);c[d>>2]=38597;m=c[d>>2]|0;i=b;return m|0}else if((o|0)==28){fi(c[k>>2]|0);fi(c[l>>2]|0);c[d>>2]=38613;m=c[d>>2]|0;i=b;return m|0}else if((o|0)==30){fi(n);fi(c[l>>2]|0);c[d>>2]=0;m=c[d>>2]|0;i=b;return m|0}return 0}function ml(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0;d=i;i=i+32|0;e=d+16|0;f=d+8|0;g=d+4|0;h=d;c[d+12>>2]=a;c[f>>2]=b;c[g>>2]=49826;c[h>>2]=Uk()|0;if(!(c[h>>2]|0)){c[e>>2]=0;j=c[e>>2]|0;i=d;return j|0}if(c[f>>2]|0)Fb[c[f>>2]&1](38634,8,c[g>>2]|0,c[h>>2]|0);c[e>>2]=50;j=c[e>>2]|0;i=d;return j|0}function nl(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0;d=i;i=i+32|0;e=d+16|0;f=d+8|0;g=d+4|0;h=d;c[d+12>>2]=a;c[f>>2]=b;c[g>>2]=49826;c[h>>2]=Vk()|0;if(!(c[h>>2]|0)){c[e>>2]=0;j=c[e>>2]|0;i=d;return j|0}if(c[f>>2]|0)Fb[c[f>>2]&1](38634,9,c[g>>2]|0,c[h>>2]|0);c[e>>2]=50;j=c[e>>2]|0;i=d;return j|0}function ol(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;g=i;i=i+48|0;h=g+36|0;j=g+32|0;k=g+28|0;l=g+24|0;m=g+20|0;n=g+16|0;o=g+12|0;p=g+8|0;q=g+4|0;r=g;c[h>>2]=a;c[j>>2]=b;c[k>>2]=d;c[l>>2]=e;c[m>>2]=f;c[n>>2]=c[h>>2];c[o>>2]=c[k>>2];c[p>>2]=c[l>>2];c[q>>2]=0;if(c[(c[n>>2]|0)+496>>2]|0)Bb[c[(c[n>>2]|0)+496>>2]&3]();c[r>>2]=c[(c[n>>2]|0)+488>>2];while(1){if(!(c[m>>2]|0))break;c[q>>2]=vb[c[r>>2]&63](c[n>>2]|0,c[j>>2]|0,c[j>>2]|0)|0;pl(c[o>>2]|0,c[j>>2]|0,c[p>>2]|0,16);c[o>>2]=(c[o>>2]|0)+16;c[p>>2]=(c[p>>2]|0)+16;c[m>>2]=(c[m>>2]|0)+-1}if(!(c[q>>2]|0)){i=g;return}If((c[q>>2]|0)+16|0);Jf();i=g;return}function pl(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;h=i;i=i+48|0;j=h+40|0;k=h+36|0;l=h+32|0;m=h+28|0;n=h+24|0;o=h+20|0;p=h+16|0;q=h+12|0;r=h+8|0;s=h+4|0;c[j>>2]=b;c[k>>2]=e;c[l>>2]=f;c[m>>2]=g;c[n>>2]=c[j>>2];c[o>>2]=c[k>>2];c[p>>2]=c[l>>2];c[h>>2]=3;if(!((c[p>>2]|c[n>>2]|c[o>>2])&3)){c[q>>2]=c[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(c[n>>2]|0)+-1}if((c[s>>2]|0)!=(c[k>>2]|0))rl(c[k>>2]|0,c[s>>2]|0,16);if(!(c[t>>2]|0)){i=h;return}If((c[t>>2]|0)+16|0);Jf();i=h;return}function rl(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0;f=i;i=i+32|0;g=f+28|0;h=f+24|0;j=f+20|0;k=f+16|0;l=f+12|0;m=f+8|0;n=f+4|0;c[g>>2]=b;c[h>>2]=d;c[j>>2]=e;c[k>>2]=c[g>>2];c[l>>2]=c[h>>2];c[f>>2]=3;if(!((c[k>>2]|c[l>>2])&3)){c[m>>2]=c[k>>2];c[n>>2]=c[l>>2];while(1){if((c[j>>2]|0)>>>0<4)break;h=c[n>>2]|0;c[n>>2]=h+4;g=c[h>>2]|0;h=c[m>>2]|0;c[m>>2]=h+4;c[h>>2]=g;c[j>>2]=(c[j>>2]|0)-4}c[k>>2]=c[m>>2];c[l>>2]=c[n>>2]}while(1){if(!(c[j>>2]|0))break;n=c[l>>2]|0;c[l>>2]=n+1;m=a[n>>0]|0;n=c[k>>2]|0;c[k>>2]=n+1;a[n>>0]=m;c[j>>2]=(c[j>>2]|0)+-1}i=f;return}function sl(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0;g=i;i=i+112|0;h=g+104|0;j=g+100|0;k=g+96|0;l=g+92|0;m=g+88|0;n=g+84|0;o=g+80|0;p=g+76|0;q=g+72|0;r=g+16|0;s=g+68|0;t=g+40|0;u=g+64|0;v=g+60|0;w=g;x=g+56|0;y=g+32|0;z=g+52|0;A=g+48|0;c[h>>2]=a;c[j>>2]=b;c[k>>2]=d;c[l>>2]=e;c[m>>2]=f;c[n>>2]=(c[h>>2]|0)+496;c[o>>2]=c[j>>2];c[p>>2]=c[k>>2];c[q>>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>2]|0,16);rl(w,c[p>>2]|0,16);vl(w,(c[h>>2]|0)+64|0,16);c[q>>2]=vb[c[x>>2]&63](c[n>>2]|0,w,w)|0;vl(w,(c[h>>2]|0)+64|0,16);vl((c[h>>2]|0)+80|0,w,16);rl(c[o>>2]|0,w,16);c[p>>2]=(c[p>>2]|0)+16;c[o>>2]=(c[o>>2]|0)+16;c[l>>2]=(c[l>>2]|0)+-1}}while(0);if(!(c[q>>2]|0)){i=g;return}If((c[q>>2]|0)+16|0);Jf();i=g;return}function tl(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;d=i;i=i+16|0;e=d+8|0;f=d;g=f;c[g>>2]=a;c[g+4>>2]=b;b=f;g=c[b+4>>2]|0;if((c[f>>2]|0)!=0|0!=0){c[e>>2]=ul(c[b>>2]|0)|0;h=c[e>>2]|0;i=d;return h|0}else{c[e>>2]=32+(ul(g)|0);h=c[e>>2]|0;i=d;return h|0}return 0}function ul(a){a=a|0;var b=0,d=0,e=0;b=i;i=i+16|0;d=b;c[d>>2]=a;a=(c[d>>2]|0)!=0;e=Gx(c[d>>2]|0)|0;i=b;return (a?e:32)|0}function vl(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0;g=i;i=i+32|0;h=g+28|0;j=g+24|0;k=g+20|0;l=g+16|0;m=g+12|0;n=g+8|0;o=g+4|0;c[h>>2]=b;c[j>>2]=e;c[k>>2]=f;c[l>>2]=c[h>>2];c[m>>2]=c[j>>2];c[g>>2]=3;if(!((c[l>>2]|c[m>>2])&3)){c[n>>2]=c[l>>2];c[o>>2]=c[m>>2];while(1){if((c[k>>2]|0)>>>0<4)break;j=c[o>>2]|0;c[o>>2]=j+4;h=c[j>>2]|0;j=c[n>>2]|0;c[n>>2]=j+4;c[j>>2]=c[j>>2]^h;c[k>>2]=(c[k>>2]|0)-4}c[l>>2]=c[n>>2];c[m>>2]=c[o>>2]}while(1){if(!(c[k>>2]|0))break;o=c[m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t>>2]&7|0)!=0?(c[u>>2]|0)!=0:0))break;a[c[t>>2]>>0]=a[v>>0]|0;c[t>>2]=(c[t>>2]|0)+1;c[u>>2]=(c[u>>2]|0)+-1}if((c[u>>2]|0)>>>0>=8){o=w;k=Mx(c[o>>2]|0,c[o+4>>2]|0,16843009,16843009)|0;o=w;c[o>>2]=k;c[o+4>>2]=C;do{c[x>>2]=c[t>>2];o=w;k=c[o+4>>2]|0;m=c[x>>2]|0;c[m>>2]=c[o>>2];c[m+4>>2]=k;c[u>>2]=(c[u>>2]|0)-8;c[t>>2]=(c[t>>2]|0)+8}while((c[u>>2]|0)>>>0>=8)}while(1){if(!(c[u>>2]|0))break;a[c[t>>2]>>0]=a[v>>0]|0;c[t>>2]=(c[t>>2]|0)+1;c[u>>2]=(c[u>>2]|0)+-1}if(!(c[n>>2]|0)){i=g;return}If((c[n>>2]|0)+16|0);Jf();i=g;return}function xl(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=i;i=i+16|0;e=d+8|0;f=d;c[e>>2]=a;c[d+4>>2]=b;c[f>>2]=c[e>>2];c[(c[f>>2]|0)+160>>2]=1732584193;c[(c[f>>2]|0)+164>>2]=-271733879;c[(c[f>>2]|0)+168>>2]=-1732584194;c[(c[f>>2]|0)+172>>2]=271733878;c[(c[f>>2]|0)+176>>2]=-1009589776;e=(c[f>>2]|0)+128|0;c[e>>2]=0;c[e+4>>2]=0;e=(c[f>>2]|0)+136|0;c[e>>2]=0;c[e+4>>2]=0;c[(c[f>>2]|0)+144>>2]=0;c[(c[f>>2]|0)+148>>2]=64;c[(c[f>>2]|0)+152>>2]=31;i=d;return}function yl(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0;e=i;i=i+16|0;f=e+12|0;g=e+8|0;h=e+4|0;j=e;c[f>>2]=a;c[g>>2]=b;c[h>>2]=d;do{c[j>>2]=zl(c[f>>2]|0,c[g>>2]|0)|0;c[g>>2]=(c[g>>2]|0)+64;d=(c[h>>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(c[f>>2]|0)+144>>2]|0)<56;h=(c[f>>2]|0)+144|0;e=c[h>>2]|0;c[h>>2]=e+1;a[(c[f>>2]|0)+e>>0]=-128;a:do if(g)while(1){if((c[(c[f>>2]|0)+144>>2]|0)>=56)break a;e=(c[f>>2]|0)+144|0;h=c[e>>2]|0;c[e>>2]=h+1;a[(c[f>>2]|0)+h>>0]=0}else{while(1){n=c[f>>2]|0;if((c[(c[f>>2]|0)+144>>2]|0)>=64)break;h=n+144|0;e=c[h>>2]|0;c[h>>2]=e+1;a[(c[f>>2]|0)+e>>0]=0}rs(n,0,0);e=c[f>>2]|0;h=e+56|0;do{c[e>>2]=0;e=e+4|0}while((e|0)<(h|0))}while(0);Dl((c[f>>2]|0)+56|0,c[k>>2]|0);Dl((c[f>>2]|0)+60|0,c[j>>2]|0);c[m>>2]=yl(c[f>>2]|0,c[f>>2]|0,1)|0;If(c[m>>2]|0);Jf();c[l>>2]=c[f>>2];Dl(c[l>>2]|0,c[(c[f>>2]|0)+160>>2]|0);c[l>>2]=(c[l>>2]|0)+4;Dl(c[l>>2]|0,c[(c[f>>2]|0)+164>>2]|0);c[l>>2]=(c[l>>2]|0)+4;Dl(c[l>>2]|0,c[(c[f>>2]|0)+168>>2]|0);c[l>>2]=(c[l>>2]|0)+4;Dl(c[l>>2]|0,c[(c[f>>2]|0)+172>>2]|0);c[l>>2]=(c[l>>2]|0)+4;Dl(c[l>>2]|0,c[(c[f>>2]|0)+176>>2]|0);c[l>>2]=(c[l>>2]|0)+4;i=d;return}function Dl(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=i;i=i+16|0;f=e+8|0;g=e+4|0;h=e;c[f>>2]=b;c[g>>2]=d;c[h>>2]=c[f>>2];a[(c[h>>2]|0)+3>>0]=(c[g>>2]|0)>>>24;a[(c[h>>2]|0)+2>>0]=(c[g>>2]|0)>>>16;a[(c[h>>2]|0)+1>>0]=(c[g>>2]|0)>>>8;a[c[h>>2]>>0]=c[g>>2];i=e;return}function El(a){a=a|0;var b=0,d=0,e=0;b=i;i=i+16|0;d=b+4|0;e=b;c[d>>2]=a;c[e>>2]=c[d>>2];i=b;return c[e>>2]|0}function Fl(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;xl(c[d>>2]|0,0);i=b;return}function Gl(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;d=i;i=i+16|0;e=d+8|0;f=d+4|0;g=d;c[e>>2]=a;c[f>>2]=b;c[g>>2]=c[f>>2];yl(c[e>>2]|0,c[f>>2]|0,1)|0;c[c[g>>2]>>2]=c[(c[e>>2]|0)+160>>2];c[(c[g>>2]|0)+4>>2]=c[(c[e>>2]|0)+164>>2];c[(c[g>>2]|0)+8>>2]=c[(c[e>>2]|0)+168>>2];c[(c[g>>2]|0)+12>>2]=c[(c[e>>2]|0)+172>>2];c[(c[g>>2]|0)+16>>2]=c[(c[e>>2]|0)+176>>2];i=d;return}function Hl(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0;f=i;i=i+208|0;g=f+192|0;h=f+188|0;j=f+184|0;k=f;c[g>>2]=b;c[h>>2]=d;c[j>>2]=e;Fl(k);rs(k,c[h>>2]|0,c[j>>2]|0);Cl(k);j=c[g>>2]|0;g=k;k=j+20|0;do{a[j>>0]=a[g>>0]|0;j=j+1|0;g=g+1|0}while((j|0)<(k|0));i=f;return}function Il(b,d,e,f,g,h){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0;j=i;i=i+80|0;k=j+64|0;l=j+60|0;m=j+56|0;n=j+52|0;o=j+48|0;p=j+44|0;q=j+40|0;r=j+36|0;s=j+32|0;t=j+28|0;u=j+24|0;v=j+20|0;w=j+16|0;x=j+12|0;y=j+8|0;z=j+4|0;A=j;c[l>>2]=b;c[m>>2]=d;c[n>>2]=e;c[o>>2]=f;c[p>>2]=g;c[q>>2]=h;c[r>>2]=0;c[s>>2]=0;c[t>>2]=(((c[m>>2]|0)+7|0)>>>0)/8|0;if(!((c[t>>2]|0)!=0?((c[o>>2]|0)+7|0)>>>0<=(c[t>>2]|0)>>>0:0)){c[k>>2]=66;B=c[k>>2]|0;i=j;return B|0}m=Yf(c[t>>2]|0)|0;c[s>>2]=m;if(!m){c[k>>2]=iu()|0;B=c[k>>2]|0;i=j;return B|0}c[v>>2]=0;m=c[v>>2]|0;c[v>>2]=m+1;a[(c[s>>2]|0)+m>>0]=0;m=c[v>>2]|0;c[v>>2]=m+1;a[(c[s>>2]|0)+m>>0]=2;c[u>>2]=(c[t>>2]|0)-3-(c[o>>2]|0);if((c[u>>2]|0)<=0)xf(38940,38946,95,38959);do if(c[p>>2]|0){if((c[q>>2]|0)!=(c[u>>2]|0)){$f(c[s>>2]|0);c[k>>2]=45;B=c[k>>2]|0;i=j;return B|0}c[x>>2]=0;while(1){if((c[x>>2]|0)>>>0>=(c[q>>2]|0)>>>0){C=15;break}if(!(a[(c[p>>2]|0)+(c[x>>2]|0)>>0]|0))break;c[x>>2]=(c[x>>2]|0)+1}if((C|0)==15){Dx((c[s>>2]|0)+(c[v>>2]|0)|0,c[p>>2]|0,c[q>>2]|0)|0;c[v>>2]=(c[v>>2]|0)+(c[q>>2]|0);break}$f(c[s>>2]|0);c[k>>2]=45;B=c[k>>2]|0;i=j;return B|0}else{c[w>>2]=On(c[u>>2]|0,1)|0;while(1){c[z>>2]=0;c[y>>2]=0;while(1){if((c[y>>2]|0)>=(c[u>>2]|0))break;if(!(a[(c[w>>2]|0)+(c[y>>2]|0)>>0]|0))c[z>>2]=(c[z>>2]|0)+1;c[y>>2]=(c[y>>2]|0)+1}if(!(c[z>>2]|0))break;c[z>>2]=(c[z>>2]|0)+(((c[z>>2]|0)/128|0)+3);c[A>>2]=On(c[z>>2]|0,1)|0;c[y>>2]=0;while(1){if(!((c[y>>2]|0)<(c[u>>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>>2]|0){$f(c[p>>2]|0);c[j>>2]=Kl(c[o>>2]|0)|0;s=c[j>>2]|0;i=h;return s|0}c[q>>2]=c[r>>2];if((c[q>>2]|0)>>>0<4){$f(c[p>>2]|0);c[j>>2]=155;s=c[j>>2]|0;i=h;return s|0}c[r>>2]=0;if(!(a[c[p>>2]>>0]|0))c[r>>2]=(c[r>>2]|0)+1;o=c[r>>2]|0;c[r>>2]=o+1;if((d[(c[p>>2]|0)+o>>0]|0)!=2){$f(c[p>>2]|0);c[j>>2]=155;s=c[j>>2]|0;i=h;return s|0}while(1){if((c[r>>2]|0)>>>0>=(c[q>>2]|0)>>>0)break;if(!(d[(c[p>>2]|0)+(c[r>>2]|0)>>0]|0))break;c[r>>2]=(c[r>>2]|0)+1}if(((c[r>>2]|0)+1|0)>>>0>=(c[q>>2]|0)>>>0){$f(c[p>>2]|0);c[j>>2]=155;s=c[j>>2]|0;i=h;return s|0}c[r>>2]=(c[r>>2]|0)+1;Ex(c[p>>2]|0,(c[p>>2]|0)+(c[r>>2]|0)|0,(c[q>>2]|0)-(c[r>>2]|0)|0)|0;c[c[k>>2]>>2]=c[p>>2];c[c[l>>2]>>2]=(c[q>>2]|0)-(c[r>>2]|0);if(jg(1)|0)Ff(39035,c[c[k>>2]>>2]|0,c[c[l>>2]>>2]|0);c[j>>2]=0;s=c[j>>2]|0;i=h;return s|0}function Kl(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;a=Ll(c[d>>2]|0)|0;i=b;return a|0}function Ll(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;i=b;return c[d>>2]&65535|0}function Ml(b,d,e,f,g){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0;h=i;i=i+160|0;j=h+48|0;k=h+44|0;l=h+40|0;m=h+36|0;n=h+32|0;o=h+28|0;p=h+24|0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>>2]=c[w>>2];a[J>>0]=0;w=K;c[w>>2]=d[J>>0];c[w+4>>2]=0;while(1){if(!((c[H>>2]&7|0)!=0?(c[I>>2]|0)!=0:0))break;a[c[H>>2]>>0]=a[J>>0]|0;c[H>>2]=(c[H>>2]|0)+1;c[I>>2]=(c[I>>2]|0)+-1}if((c[I>>2]|0)>>>0>=8){w=K;r=Mx(c[w>>2]|0,c[w+4>>2]|0,16843009,16843009)|0;w=K;c[w>>2]=r;c[w+4>>2]=C;do{c[L>>2]=c[H>>2];w=K;r=c[w+4>>2]|0;D=c[L>>2]|0;c[D>>2]=c[w>>2];c[D+4>>2]=r;c[I>>2]=(c[I>>2]|0)-8;c[H>>2]=(c[H>>2]|0)+8}while((c[I>>2]|0)>>>0>=8)}while(1){if(!(c[I>>2]|0))break;a[c[H>>2]>>0]=a[J>>0]|0;c[H>>2]=(c[H>>2]|0)+1;c[I>>2]=(c[I>>2]|0)+-1}$f(c[v>>2]|0);M=c[p>>2]|0;i=j;return M|0}function Ul(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;d=i;i=i+112|0;e=d;f=d+100|0;g=d+96|0;h=d+92|0;j=d+88|0;k=d+84|0;l=d+80|0;m=d+56|0;n=d+52|0;o=d+48|0;p=d+44|0;q=d+40|0;r=d+36|0;c[g>>2]=a;c[h>>2]=b;c[o>>2]=0;c[q>>2]=0;c[m>>2]=0;c[m+4>>2]=0;c[m+8>>2]=0;c[m+12>>2]=0;c[m+16>>2]=0;c[m+20>>2]=0;c[j>>2]=kk(c[g>>2]|0,k)|0;if(c[j>>2]|0){c[f>>2]=c[j>>2];s=c[f>>2]|0;i=d;return s|0}c[j>>2]=lk(c[g>>2]|0,l)|0;if(c[j>>2]|0){c[f>>2]=c[j>>2];s=c[f>>2]|0;i=d;return s|0}c[p>>2]=xg(c[g>>2]|0,47167,0)|0;if((c[p>>2]|0)!=0?(c[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g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0;g=i;i=i+176|0;h=g;j=g+164|0;k=g+160|0;l=g+156|0;m=g+152|0;n=g+148|0;o=g+144|0;p=g+140|0;q=g+136|0;r=g+132|0;s=g+128|0;t=g+124|0;u=g+120|0;v=g+116|0;w=g+112|0;x=g+108|0;y=g+104|0;z=g+100|0;A=g+96|0;B=g+92|0;C=g+88|0;D=g+84|0;E=g+80|0;F=g+76|0;G=g+72|0;H=g+16|0;I=g+8|0;J=g+4|0;c[k>>2]=a;c[l>>2]=b;c[m>>2]=d;c[n>>2]=e;c[o>>2]=f;c[c[o>>2]>>2]=0;if((c[m>>2]|0)==1)c[m>>2]=65537;if((c[l>>2]|0)>>>0>=1024?(((c[l>>2]|0)>>>0)%256|0|0)==0:0){if((c[m>>2]|0)>>>0<3){c[j>>2]=55;K=c[j>>2]|0;i=g;return K|0}if(!(c[m>>2]&1)){c[j>>2]=55;K=c[j>>2]|0;i=g;return K|0}c[A>>2]=0;c[B>>2]=0;c[C>>2]=0;c[D>>2]=0;c[E>>2]=0;c[F>>2]=0;if(c[n>>2]|0){f=H;e=f+56|0;do{c[f>>2]=0;f=f+4|0}while((f|0)<(e|0));c[H>>2]=39508;c[H+8>>2]=39512;c[H+16>>2]=39516;c[H+24>>2]=39519;c[H+32>>2]=39523;c[H+40>>2]=39527;c[H+4>>2]=A;c[H+8+4>>2]=B;c[H+16+4>>2]=C;c[H+24+4>>2]=D;c[H+32+4>>2]=E;c[H+40+4>>2]=F;c[I>>2]=0;while(1){if(!(c[H+(c[I>>2]<<3)>>2]|0))break;c[J>>2]=xg(c[n>>2]|0,c[H+(c[I>>2]<<3)>>2]|0,0)|0;if(c[J>>2]|0){f=Fg(c[J>>2]|0,1,5)|0;c[c[H+(c[I>>2]<<3)+4>>2]>>2]=f;vg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2]|0)+12>>2]=0;xq(c[(c[k>>2]|0)+16>>2]|0);c[(c[k>>2]|0)+16>>2]=0;xq(c[(c[k>>2]|0)+8>>2]|0);c[(c[k>>2]|0)+8>>2]=0;xq(c[(c[k>>2]|0)+20>>2]|0);c[(c[k>>2]|0)+20>>2]=0;Jh(39434,586,39564,0,39619);c[j>>2]=50;K=c[j>>2]|0;i=g;return K|0}else{c[j>>2]=0;K=c[j>>2]|0;i=g;return K|0}}c[j>>2]=55;K=c[j>>2]|0;i=g;return K|0}function Wl(a){a=a|0;var b=0,d=0,e=0;b=i;i=i+16|0;d=b+4|0;e=b;c[d>>2]=a;c[e>>2]=wq(c[d>>2]|0)|0;yq(c[e>>2]|0,c[d>>2]|0,2);Uo(c[e>>2]|0,(c[d>>2]|0)-1|0);To(c[e>>2]|0,(c[d>>2]|0)-2|0);a=Ro(c[e>>2]|0)|0;if((a|0)==(c[d>>2]|0)){i=b;return c[e>>2]|0}else xf(39398,39434,360,39440);return 0}function Xl(){var a=0,b=0;a=i;i=i+16|0;b=a;c[b>>2]=wq(101)|0;yq(c[b>>2]|0,101,2);Uo(c[b>>2]|0,100);if((Ro(c[b>>2]|0)|0)==101){i=a;return c[b>>2]|0}else xf(39457,39434,375,39491);return 0}function Yl(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0;d=i;i=i+48|0;e=d+32|0;f=d+28|0;g=d+24|0;h=d+16|0;j=d+12|0;k=d+8|0;l=d+4|0;m=d;c[e>>2]=a;c[f>>2]=b;c[g>>2]=-1;c[j>>2]=vq(c[f>>2]|0)|0;c[k>>2]=vq(c[f>>2]|0)|0;c[l>>2]=vq(c[f>>2]|0)|0;c[m>>2]=vq(c[f>>2]|0)|0;c[h>>2]=c[c[e>>2]>>2];c[h+4>>2]=c[(c[e>>2]|0)+4>>2];yq(c[j>>2]|0,c[f>>2]|0,0);Zl(c[k>>2]|0,c[j>>2]|0,h);if((((ap(c[k>>2]|0,c[j>>2]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|0,c[u>>2]|0)|0)!=0^1))break;if(c[k>>2]|0){z=27;break}Ko(c[t>>2]|0,c[t>>2]|0,2)}if((z|0)==27)wf(39434,287,39686);c[o>>2]=wq(c[j>>2]|0)|0;pp(c[o>>2]|0,c[t>>2]|0,c[w>>2]|0)|0;c[p>>2]=wq(c[j>>2]|0)|0;pp(c[p>>2]|0,c[m>>2]|0,c[n>>2]|0)|0;if(jg(1)|0){Hf(39699,c[m>>2]|0);Hf(39705,c[n>>2]|0);Hf(39711,c[u>>2]|0);Hf(39717,c[v>>2]|0);Hf(39723,c[w>>2]|0);Hf(39729,c[s>>2]|0);Hf(39735,c[t>>2]|0);Hf(39741,c[o>>2]|0);Hf(39747,c[p>>2]|0)}xq(c[q>>2]|0);xq(c[r>>2]|0);xq(c[u>>2]|0);xq(c[w>>2]|0);xq(c[v>>2]|0);c[c[h>>2]>>2]=c[s>>2];c[(c[h>>2]|0)+4>>2]=c[t>>2];c[(c[h>>2]|0)+12>>2]=c[m>>2];c[(c[h>>2]|0)+16>>2]=c[n>>2];c[(c[h>>2]|0)+8>>2]=c[o>>2];c[(c[h>>2]|0)+20>>2]=c[p>>2];if(Yl(c[h>>2]|0,(c[j>>2]|0)-64|0)|0){xq(c[c[h>>2]>>2]|0);c[c[h>>2]>>2]=0;xq(c[(c[h>>2]|0)+4>>2]|0);c[(c[h>>2]|0)+4>>2]=0;xq(c[(c[h>>2]|0)+12>>2]|0);c[(c[h>>2]|0)+12>>2]=0;xq(c[(c[h>>2]|0)+16>>2]|0);c[(c[h>>2]|0)+16>>2]=0;xq(c[(c[h>>2]|0)+8>>2]|0);c[(c[h>>2]|0)+8>>2]=0;xq(c[(c[h>>2]|0)+20>>2]|0);c[(c[h>>2]|0)+20>>2]=0;Jh(39434,334,39686,0,39619);c[g>>2]=50;y=c[g>>2]|0;i=f;return y|0}else{c[g>>2]=0;y=c[g>>2]|0;i=f;return y|0}return 0}function am(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0;d=i;i=i+32|0;e=d+16|0;f=d+12|0;g=d+8|0;h=d+4|0;j=d;c[e>>2]=a;c[f>>2]=b;c[g>>2]=c[e>>2];Mo(c[f>>2]|0,c[f>>2]|0,1);c[h>>2]=pq(c[f>>2]|0)|0;c[j>>2]=((jp(c[h>>2]|0,c[g>>2]|0,c[f>>2]|0)|0)!=0^1)&1;xq(c[h>>2]|0);Ko(c[f>>2]|0,c[f>>2]|0,1);i=d;return c[j>>2]|0}function bm(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,j=0;b=i;i=i+80|0;d=b+32|0;e=b;f=b+68|0;g=b+64|0;h=b+40|0;c[f>>2]=a;c[h>>2]=0;c[h+4>>2]=0;c[h+8>>2]=0;c[h+12>>2]=0;c[h+16>>2]=0;c[h+20>>2]=0;a=c[f>>2]|0;c[e>>2]=h;c[e+4>>2]=h+4;c[e+8>>2]=h+8;c[e+12>>2]=h+12;c[e+16>>2]=h+16;c[e+20>>2]=h+20;c[e+24>>2]=0;c[g>>2]=Rg(a,0,39363,e)|0;if((c[g>>2]|0)==0?(cm(h)|0)==0:0)c[g>>2]=7;xq(c[h>>2]|0);xq(c[h+4>>2]|0);xq(c[h+8>>2]|0);xq(c[h+12>>2]|0);xq(c[h+16>>2]|0);xq(c[h+20>>2]|0);if(!(jg(1)|0)){j=c[g>>2]|0;i=b;return j|0}c[d>>2]=fu(c[g>>2]|0)|0;Df(39848,d);j=c[g>>2]|0;i=b;return j|0}function cm(a){a=a|0;var b=0,d=0,e=0,f=0;b=i;i=i+16|0;d=b+8|0;e=b+4|0;f=b;c[d>>2]=a;c[f>>2]=$p(c[(c[(c[d>>2]|0)+12>>2]|0)+4>>2]<<1)|0;up(c[f>>2]|0,c[(c[d>>2]|0)+12>>2]|0,c[(c[d>>2]|0)+16>>2]|0);c[e>>2]=ap(c[f>>2]|0,c[c[d>>2]>>2]|0)|0;hq(c[f>>2]|0);i=b;return ((c[e>>2]|0)!=0^1)&1|0}function dm(a,b,d){a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|0;i=e;return u|0}function em(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0;b=i;i=i+32|0;d=b+16|0;e=b+12|0;f=b+8|0;g=b+4|0;h=b;c[e>>2]=a;c[f>>2]=xg(c[e>>2]|0,39374,1)|0;if(!(c[f>>2]|0)){c[d>>2]=0;j=c[d>>2]|0;i=b;return j|0}c[g>>2]=Fg(c[f>>2]|0,1,5)|0;vg(c[f>>2]|0);if(c[g>>2]|0)k=Ro(c[g>>2]|0)|0;else k=0;c[h>>2]=k;xq(c[g>>2]|0);c[d>>2]=c[h>>2];j=c[d>>2]|0;i=b;return j|0}function fm(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0;e=i;i=i+192|0;f=e+64|0;g=e+56|0;h=e+48|0;j=e+40|0;k=e+8|0;l=e;m=e+180|0;n=e+176|0;o=e+172|0;p=e+168|0;q=e+128|0;r=e+124|0;s=e+120|0;t=e+96|0;u=e+88|0;v=e+84|0;w=e+80|0;x=e+76|0;y=e+72|0;z=e+68|0;c[m>>2]=a;c[n>>2]=b;c[o>>2]=d;c[r>>2]=0;c[s>>2]=0;c[t>>2]=0;c[t+4>>2]=0;c[t+8>>2]=0;c[t+12>>2]=0;c[t+16>>2]=0;c[t+20>>2]=0;c[u>>2]=0;c[v>>2]=0;c[w>>2]=0;c[x>>2]=0;c[y>>2]=0;c[z>>2]=0;pk(q,1,em(c[o>>2]|0)|0);c[p>>2]=nk(c[n>>2]|0,7708,r,q)|0;a:do if((c[p>>2]|0)==0?(n=c[r>>2]|0,c[l>>2]=s,c[l+4>>2]=0,c[p>>2]=Rg(n,0,39370,l)|0,(c[p>>2]|0)==0):0){if(jg(1)|0)Hf(4e4,c[s>>2]|0);if((c[s>>2]|0)!=0?(c[(c[s>>2]|0)+12>>2]&4|0)!=0:0){c[p>>2]=79;break}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2]=Ql(y,z,c[q+4>>2]|0,c[q+16>>2]|0,c[u>>2]|0,c[q+20>>2]|0,c[q+24>>2]|0)|0;hq(c[u>>2]|0);c[u>>2]=0;if(c[p>>2]|0)break a;n=c[m>>2]|0;d=c[y>>2]|0;c[h>>2]=c[z>>2];c[h+4>>2]=d;c[p>>2]=Ig(n,0,40146,h)|0;break a;break}default:{n=c[m>>2]|0;d=(c[q+12>>2]&8|0)!=0?40157:49242;c[g>>2]=c[u>>2];c[p>>2]=Ig(n,0,d,g)|0;break a}}}}while(0);$f(c[y>>2]|0);xq(c[u>>2]|0);xq(c[t>>2]|0);xq(c[t+4>>2]|0);xq(c[t+8>>2]|0);xq(c[t+12>>2]|0);xq(c[t+16>>2]|0);xq(c[t+20>>2]|0);xq(c[s>>2]|0);xq(c[v>>2]|0);xq(c[w>>2]|0);xq(c[x>>2]|0);vg(c[r>>2]|0);qk(q);if(!(jg(1)|0)){A=c[p>>2]|0;i=e;return A|0}c[f>>2]=fu(c[p>>2]|0)|0;Df(40160,f);A=c[p>>2]|0;i=e;return A|0}function gm(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;e=i;i=i+160|0;f=e+48|0;g=e+40|0;h=e+32|0;j=e;k=e+148|0;l=e+144|0;m=e+140|0;n=e+136|0;o=e+96|0;p=e+88|0;q=e+64|0;r=e+60|0;s=e+56|0;t=e+52|0;c[k>>2]=a;c[l>>2]=b;c[m>>2]=d;c[p>>2]=0;c[q>>2]=0;c[q+4>>2]=0;c[q+8>>2]=0;c[q+12>>2]=0;c[q+16>>2]=0;c[q+20>>2]=0;c[r>>2]=0;pk(o,2,em(c[m>>2]|0)|0);c[n>>2]=rk(c[l>>2]|0,p,o)|0;do if(!(c[n>>2]|0)){if(jg(1)|0)Hf(40182,c[p>>2]|0);if((c[p>>2]|0)!=0?(c[(c[p>>2]|0)+12>>2]&4|0)!=0:0){c[n>>2]=79;break}l=c[m>>2]|0;c[j>>2]=q;c[j+4>>2]=q+4;c[j+8>>2]=q+8;c[j+12>>2]=q+12;c[j+16>>2]=q+16;c[j+20>>2]=q+20;c[j+24>>2]=0;c[n>>2]=Rg(l,0,40017,j)|0;if(!(c[n>>2]|0)){if((jg(1)|0)!=0?(Hf(40198,c[q>>2]|0),Hf(40214,c[q+4>>2]|0),(Ah()|0)==0):0){Hf(40230,c[q+8>>2]|0);Hf(40246,c[q+12>>2]|0);Hf(40262,c[q+16>>2]|0);Hf(40278,c[q+20>>2]|0)}c[r>>2]=vq(0)|0;_l(c[r>>2]|0,c[p>>2]|0,q);if(jg(1)|0)Hf(40294,c[r>>2]|0);if(!(c[o+12>>2]&4)){l=c[k>>2]|0;c[g>>2]=c[r>>2];c[n>>2]=Ig(l,0,40330,g)|0;break}c[t>>2]=(((Ro(c[q>>2]|0)|0)+7|0)>>>0)/8|0;c[n>>2]=Jp(s,0,c[r>>2]|0,c[t>>2]|0)|0;if(!(c[n>>2]|0)){l=c[k>>2]|0;d=c[s>>2]|0;c[h>>2]=c[t>>2];c[h+4>>2]=d;c[n>>2]=Ig(l,0,40310,h)|0;$f(c[s>>2]|0)}}}while(0);xq(c[r>>2]|0);xq(c[q>>2]|0);xq(c[q+4>>2]|0);xq(c[q+8>>2]|0);xq(c[q+12>>2]|0);xq(c[q+16>>2]|0);xq(c[q+20>>2]|0);xq(c[p>>2]|0);qk(o);if(!(jg(1)|0)){u=c[n>>2]|0;i=e;return u|0}c[f>>2]=fu(c[n>>2]|0)|0;Df(40350,f);u=c[n>>2]|0;i=e;return u|0}function hm(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;e=i;i=i+112|0;f=e+24|0;g=e+8|0;h=e;j=e+108|0;k=e+104|0;l=e+100|0;m=e+96|0;n=e+56|0;o=e+48|0;p=e+44|0;q=e+40|0;r=e+32|0;s=e+28|0;c[j>>2]=a;c[k>>2]=b;c[l>>2]=d;c[o>>2]=0;c[p>>2]=0;c[q>>2]=0;c[r>>2]=0;c[r+4>>2]=0;c[s>>2]=0;pk(n,3,em(c[l>>2]|0)|0);c[m>>2]=rk(c[k>>2]|0,q,n)|0;do if(!(c[m>>2]|0)){if(jg(1)|0)Hf(40371,c[q>>2]|0);if((c[q>>2]|0)!=0?(c[(c[q>>2]|0)+12>>2]&4|0)!=0:0){c[m>>2]=79;break}c[m>>2]=mk(c[j>>2]|0,7708,o,0)|0;if((c[m>>2]|0)==0?(k=c[o>>2]|0,c[h>>2]=p,c[h+4>>2]=0,c[m>>2]=Rg(k,0,39372,h)|0,(c[m>>2]|0)==0):0){if(jg(1)|0)Hf(40387,c[p>>2]|0);k=c[l>>2]|0;c[g>>2]=r;c[g+4>>2]=r+4;c[g+8>>2]=0;c[m>>2]=Rg(k,0,39360,g)|0;if(!(c[m>>2]|0)){if(jg(1)|0){Hf(40403,c[r>>2]|0);Hf(40419,c[r+4>>2]|0)}c[s>>2]=vq(0)|0;Zl(c[s>>2]|0,c[p>>2]|0,r);if(jg(1)|0)Hf(40435,c[s>>2]|0);if(c[n+32>>2]|0){c[m>>2]=Eb[c[n+32>>2]&7](n,c[s>>2]|0)|0;break}else{k=(ap(c[s>>2]|0,c[q>>2]|0)|0)!=0;c[m>>2]=k?8:0;break}}}}while(0);xq(c[s>>2]|0);xq(c[r>>2]|0);xq(c[r+4>>2]|0);xq(c[q>>2]|0);xq(c[p>>2]|0);vg(c[o>>2]|0);qk(n);if(!(jg(1)|0)){t=c[m>>2]|0;i=e;return t|0}if(c[m>>2]|0)u=fu(c[m>>2]|0)|0;else u=49800;c[f>>2]=u;Df(40451,f);t=c[m>>2]|0;i=e;return t|0}function im(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0;e=i;i=i+16|0;f=e+12|0;g=e+4|0;h=e;c[f>>2]=a;c[e+8>>2]=b;c[g>>2]=d;if((c[f>>2]|0)==1){c[h>>2]=jm(c[g>>2]|0)|0;j=c[h>>2]|0;i=e;return j|0}else{c[h>>2]=4;j=c[h>>2]|0;i=e;return j|0}return 0}function jm(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0;b=i;i=i+32|0;d=b+24|0;e=b+20|0;f=b+16|0;g=b+12|0;h=b+8|0;j=b+4|0;k=b;c[e>>2]=a;c[j>>2]=0;c[k>>2]=0;c[f>>2]=40472;c[h>>2]=Kg(j,0,40480,Kv(40480)|0)|0;if(!(c[h>>2]|0))c[h>>2]=Kg(k,0,41510,Kv(41510)|0)|0;do if(!(c[h>>2]|0)){c[f>>2]=41827;c[h>>2]=Ck(c[j>>2]|0)|0;if(c[h>>2]|0){c[g>>2]=km(c[h>>2]|0)|0;break}c[f>>2]=41843;c[g>>2]=lm(c[k>>2]|0,c[j>>2]|0)|0;if((c[g>>2]|0)==0?(c[f>>2]=42079,c[g>>2]=om(c[k>>2]|0,c[j>>2]|0)|0,(c[g>>2]|0)==0):0){vg(c[k>>2]|0);vg(c[j>>2]|0);c[d>>2]=0;l=c[d>>2]|0;i=b;return l|0}}else c[g>>2]=km(c[h>>2]|0)|0;while(0);vg(c[k>>2]|0);vg(c[j>>2]|0);if(c[e>>2]|0)Fb[c[e>>2]&1](49836,1,c[f>>2]|0,c[g>>2]|0);c[d>>2]=50;l=c[d>>2]|0;i=b;return l|0}function km(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;a=fu(c[d>>2]|0)|0;i=b;return a|0}function lm(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0;d=i;i=i+32|0;e=d+24|0;f=d+20|0;g=d+16|0;h=d+12|0;j=d+8|0;k=d+4|0;l=d;c[e>>2]=a;c[f>>2]=b;c[g>>2]=0;c[j>>2]=0;c[k>>2]=0;c[l>>2]=0;c[h>>2]=Kg(j,0,41848,Kv(41848)|0)|0;if(!(c[h>>2]|0))c[h>>2]=Kg(k,0,41924,Kv(41924)|0)|0;do if(!(c[h>>2]|0)){c[h>>2]=Ak(l,c[j>>2]|0,c[f>>2]|0)|0;if(c[h>>2]|0){c[g>>2]=42023;break}c[h>>2]=Bk(c[l>>2]|0,c[j>>2]|0,c[e>>2]|0)|0;if(c[h>>2]|0){c[g>>2]=42038;break}c[h>>2]=Bk(c[l>>2]|0,c[k>>2]|0,c[e>>2]|0)|0;if((mm(c[h>>2]|0)|0)!=8)c[g>>2]=42052}else c[g>>2]=42e3;while(0);vg(c[l>>2]|0);vg(c[k>>2]|0);vg(c[j>>2]|0);i=d;return c[g>>2]|0}function mm(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;a=nm(c[d>>2]|0)|0;i=b;return a|0}function nm(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;i=b;return c[d>>2]&65535|0}
+function om(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;d=i;i=i+64|0;e=d;f=d+48|0;g=d+44|0;h=d+40|0;j=d+36|0;k=d+28|0;l=d+24|0;m=d+20|0;n=d+16|0;o=d+12|0;p=d+8|0;q=d+4|0;c[f>>2]=a;c[g>>2]=b;c[h>>2]=0;c[d+32>>2]=1e3;c[k>>2]=0;c[l>>2]=0;c[m>>2]=0;c[n>>2]=0;c[o>>2]=0;c[p>>2]=0;c[q>>2]=0;c[k>>2]=vq(1e3)|0;yq(c[k>>2]|0,1e3,0);c[e>>2]=c[k>>2];c[j>>2]=Ig(l,0,42087,e)|0;do if(!(c[j>>2]|0)){c[j>>2]=xk(m,c[l>>2]|0,c[f>>2]|0)|0;if(c[j>>2]|0){c[h>>2]=42117;break}c[n>>2]=pm(c[m>>2]|0)|0;if(!(c[n>>2]|0)){c[h>>2]=42140;break}if(!(ap(c[k>>2]|0,c[n>>2]|0)|0)){c[h>>2]=42173;break}c[j>>2]=zk(o,c[m>>2]|0,c[g>>2]|0)|0;if(c[j>>2]|0){c[h>>2]=42202;break}c[q>>2]=xg(c[o>>2]|0,42217,0)|0;if(c[q>>2]|0)c[p>>2]=Fg(c[q>>2]|0,1,5)|0;else c[p>>2]=Fg(c[o>>2]|0,0,5)|0;if(!(c[p>>2]|0)){c[h>>2]=42223;break}if(ap(c[k>>2]|0,c[p>>2]|0)|0)c[h>>2]=42253}else c[h>>2]=42e3;while(0);vg(c[q>>2]|0);xq(c[p>>2]|0);vg(c[o>>2]|0);xq(c[n>>2]|0);vg(c[m>>2]|0);vg(c[l>>2]|0);xq(c[k>>2]|0);i=d;return c[h>>2]|0}function pm(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0;b=i;i=i+32|0;d=b+20|0;e=b+16|0;f=b+12|0;g=b+8|0;h=b+4|0;j=b;c[e>>2]=a;c[f>>2]=xg(c[e>>2]|0,42132,0)|0;if(!(c[f>>2]|0)){c[d>>2]=0;k=c[d>>2]|0;i=b;return k|0}c[g>>2]=xg(c[f>>2]|0,39319,0)|0;vg(c[f>>2]|0);if(!(c[g>>2]|0)){c[d>>2]=0;k=c[d>>2]|0;i=b;return k|0}c[h>>2]=xg(c[g>>2]|0,39370,0)|0;vg(c[g>>2]|0);if(c[h>>2]|0){c[j>>2]=Fg(c[h>>2]|0,1,0)|0;vg(c[h>>2]|0);c[d>>2]=c[j>>2];k=c[d>>2]|0;i=b;return k|0}else{c[d>>2]=0;k=c[d>>2]|0;i=b;return k|0}return 0}function qm(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0;d=i;i=i+32|0;e=d+20|0;f=d+16|0;g=d+12|0;h=d+8|0;j=d+4|0;k=d;c[f>>2]=a;c[g>>2]=b;c[h>>2]=xg(c[g>>2]|0,39374,1)|0;if(!(c[h>>2]|0)){c[e>>2]=68;l=c[e>>2]|0;i=d;return l|0}c[j>>2]=Bg(c[h>>2]|0,1,k)|0;if(c[j>>2]|0){Fj(c[f>>2]|0,c[j>>2]|0,c[k>>2]|0);vg(c[h>>2]|0);c[e>>2]=0;l=c[e>>2]|0;i=d;return l|0}else{vg(c[h>>2]|0);c[e>>2]=68;l=c[e>>2]|0;i=d;return l|0}return 0}function rm(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=i;i=i+16|0;e=d+12|0;f=d+4|0;c[e>>2]=a;c[d+8>>2]=b;c[f>>2]=c[e>>2];c[d>>2]=Vg()|0;c[(c[f>>2]|0)+160>>2]=1732584193;c[(c[f>>2]|0)+164>>2]=-271733879;c[(c[f>>2]|0)+168>>2]=-1732584194;c[(c[f>>2]|0)+172>>2]=271733878;c[(c[f>>2]|0)+176>>2]=-1009589776;e=(c[f>>2]|0)+128|0;c[e>>2]=0;c[e+4>>2]=0;e=(c[f>>2]|0)+136|0;c[e>>2]=0;c[e+4>>2]=0;c[(c[f>>2]|0)+144>>2]=0;c[(c[f>>2]|0)+148>>2]=64;c[(c[f>>2]|0)+152>>2]=32;i=d;return}function sm(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0;e=i;i=i+32|0;f=e+16|0;g=e+12|0;h=e+8|0;j=e+4|0;k=e;c[f>>2]=a;c[g>>2]=b;c[h>>2]=d;c[j>>2]=c[f>>2];do{c[k>>2]=tm(c[j>>2]|0,c[g>>2]|0)|0;c[g>>2]=(c[g>>2]|0)+64;f=(c[h>>2]|0)+-1|0;c[h>>2]=f}while((f|0)!=0);i=e;return c[k>>2]|0}function tm(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;d=i;i=i+112|0;e=d+100|0;f=d+96|0;g=d+92|0;h=d+88|0;j=d+84|0;k=d+80|0;l=d+76|0;m=d+72|0;n=d+68|0;o=d+64|0;p=d;c[e>>2]=a;c[f>>2]=b;c[g>>2]=c[e>>2];c[h>>2]=c[f>>2];c[j>>2]=c[(c[g>>2]|0)+160>>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[o>>2]|0,1)|0;c[p+56>>2]=f;c[k>>2]=(c[k>>2]|0)+(e+f);c[m>>2]=um(c[m>>2]|0,30)|0;f=um(c[k>>2]|0,5)|0;e=f+(c[l>>2]^c[m>>2]^c[n>>2])+-899497514|0;c[o>>2]=c[p+60>>2]^c[p+4>>2]^c[p+28>>2]^c[p+48>>2];f=um(c[o>>2]|0,1)|0;c[p+60>>2]=f;c[j>>2]=(c[j>>2]|0)+(e+f);c[l>>2]=um(c[l>>2]|0,30)|0;f=(c[g>>2]|0)+160|0;c[f>>2]=(c[f>>2]|0)+(c[j>>2]|0);j=(c[g>>2]|0)+164|0;c[j>>2]=(c[j>>2]|0)+(c[k>>2]|0);k=(c[g>>2]|0)+168|0;c[k>>2]=(c[k>>2]|0)+(c[l>>2]|0);l=(c[g>>2]|0)+172|0;c[l>>2]=(c[l>>2]|0)+(c[m>>2]|0);m=(c[g>>2]|0)+176|0;c[m>>2]=(c[m>>2]|0)+(c[n>>2]|0);i=d;return 104}function um(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=i;i=i+16|0;e=d+4|0;f=d;c[e>>2]=a;c[f>>2]=b;i=d;return c[e>>2]<<(c[f>>2]&31)|(c[e>>2]|0)>>>(32-(c[f>>2]|0)&31)|0}function vm(a){a=a|0;var b=0,e=0,f=0;b=i;i=i+16|0;e=b+4|0;f=b;c[e>>2]=a;c[f>>2]=c[e>>2];i=b;return (d[c[f>>2]>>0]|0)<<24|(d[(c[f>>2]|0)+1>>0]|0)<<16|(d[(c[f>>2]|0)+2>>0]|0)<<8|(d[(c[f>>2]|0)+3>>0]|0)|0}function wm(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0;d=i;i=i+32|0;e=d+28|0;f=d+24|0;g=d+20|0;h=d+16|0;j=d+12|0;k=d+8|0;l=d+4|0;m=d;c[e>>2]=b;c[f>>2]=c[e>>2];rs(c[f>>2]|0,0,0);c[g>>2]=c[(c[f>>2]|0)+128>>2];c[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>2]|0);c[l>>2]=(c[l>>2]|0)+4;i=d;return}function xm(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=i;i=i+16|0;f=e+8|0;g=e+4|0;h=e;c[f>>2]=b;c[g>>2]=d;c[h>>2]=c[f>>2];a[c[h>>2]>>0]=(c[g>>2]|0)>>>24;a[(c[h>>2]|0)+1>>0]=(c[g>>2]|0)>>>16;a[(c[h>>2]|0)+2>>0]=(c[g>>2]|0)>>>8;a[(c[h>>2]|0)+3>>0]=c[g>>2];i=e;return}function ym(a){a=a|0;var b=0,d=0,e=0;b=i;i=i+16|0;d=b+4|0;e=b;c[d>>2]=a;c[e>>2]=c[d>>2];i=b;return c[e>>2]|0}function zm(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0;e=i;i=i+16|0;f=e+12|0;g=e+8|0;h=e+4|0;j=e;c[f>>2]=a;c[g>>2]=b;c[h>>2]=d;if((c[f>>2]|0)==2){c[j>>2]=Am(c[g>>2]|0,c[h>>2]|0)|0;k=c[j>>2]|0;i=e;return k|0}else{c[j>>2]=5;k=c[j>>2]|0;i=e;return k|0}return 0}function Am(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0;d=i;i=i+32|0;e=d+16|0;f=d+12|0;g=d+8|0;h=d+4|0;j=d;c[f>>2]=a;c[g>>2]=b;c[h>>2]=42864;c[j>>2]=qs(2,0,42877,3,42367,20)|0;do if(!(c[j>>2]|0)){if(c[f>>2]|0){c[h>>2]=42930;c[j>>2]=qs(2,0,42508,56,42388,20)|0;if(c[j>>2]|0)break;c[h>>2]=43104;c[j>>2]=qs(2,1,0,0,42409,20)|0;if(c[j>>2]|0)break}c[e>>2]=0;k=c[e>>2]|0;i=d;return k|0}while(0);if(c[g>>2]|0)Fb[c[g>>2]&1](43169,2,c[h>>2]|0,c[j>>2]|0);c[e>>2]=50;k=c[e>>2]|0;i=d;return k|0}function Bm(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0;f=i;i=i+208|0;g=f+192|0;h=f+188|0;j=f+184|0;k=f;c[g>>2]=b;c[h>>2]=d;c[j>>2]=e;rm(k,0);rs(k,c[h>>2]|0,c[j>>2]|0);wm(k);j=c[g>>2]|0;g=k;k=j+20|0;do{a[j>>0]=a[g>>0]|0;j=j+1|0;g=g+1|0}while((j|0)<(k|0));i=f;return}function Cm(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0;f=i;i=i+208|0;g=f+192|0;h=f+188|0;j=f+184|0;k=f;c[g>>2]=b;c[h>>2]=d;c[j>>2]=e;rm(k,0);while(1){if((c[j>>2]|0)<=0)break;rs(k,(c[(c[h>>2]|0)+12>>2]|0)+(c[(c[h>>2]|0)+4>>2]|0)|0,c[(c[h>>2]|0)+8>>2]|0);c[h>>2]=(c[h>>2]|0)+16;c[j>>2]=(c[j>>2]|0)+-1}wm(k);j=c[g>>2]|0;g=k;k=j+20|0;do{a[j>>0]=a[g>>0]|0;j=j+1|0;g=g+1|0}while((j|0)<(k|0));i=f;return}function Dm(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=i;i=i+16|0;e=d+12|0;f=d+4|0;c[e>>2]=a;c[d+8>>2]=b;c[f>>2]=c[e>>2];c[d>>2]=Vg()|0;c[(c[f>>2]|0)+160>>2]=-1056596264;c[(c[f>>2]|0)+164>>2]=914150663;c[(c[f>>2]|0)+168>>2]=812702999;c[(c[f>>2]|0)+172>>2]=-150054599;c[(c[f>>2]|0)+176>>2]=-4191439;c[(c[f>>2]|0)+180>>2]=1750603025;c[(c[f>>2]|0)+184>>2]=1694076839;c[(c[f>>2]|0)+188>>2]=-1090891868;e=(c[f>>2]|0)+128|0;c[e>>2]=0;c[e+4>>2]=0;e=(c[f>>2]|0)+136|0;c[e>>2]=0;c[e+4>>2]=0;c[(c[f>>2]|0)+144>>2]=0;c[(c[f>>2]|0)+148>>2]=64;c[(c[f>>2]|0)+152>>2]=33;i=d;return}function Em(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0;e=i;i=i+32|0;f=e+16|0;g=e+12|0;h=e+8|0;j=e+4|0;k=e;c[f>>2]=a;c[g>>2]=b;c[h>>2]=d;c[j>>2]=c[f>>2];do{c[k>>2]=Fm(c[j>>2]|0,c[g>>2]|0)|0;c[g>>2]=(c[g>>2]|0)+64;f=(c[h>>2]|0)+-1|0;c[h>>2]=f}while((f|0)!=0);i=e;return c[k>>2]|0}function Fm(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;d=i;i=i+320|0;e=d+312|0;f=d+308|0;g=d+304|0;h=d+300|0;j=d+296|0;k=d+292|0;l=d+288|0;m=d+284|0;n=d+280|0;o=d+276|0;p=d+272|0;q=d+268|0;r=d+264|0;s=d+8|0;t=d;c[e>>2]=a;c[f>>2]=b;c[g>>2]=c[e>>2];c[h>>2]=c[(c[g>>2]|0)+160>>2];c[j>>2]=c[(c[g>>2]|0)+164>>2];c[k>>2]=c[(c[g>>2]|0)+168>>2];c[l>>2]=c[(c[g>>2]|0)+172>>2];c[m>>2]=c[(c[g>>2]|0)+176>>2];c[n>>2]=c[(c[g>>2]|0)+180>>2];c[o>>2]=c[(c[g>>2]|0)+184>>2];c[p>>2]=c[(c[g>>2]|0)+188>>2];c[t>>2]=0;while(1){if((c[t>>2]|0)>=16)break;e=Gm((c[f>>2]|0)+(c[t>>2]<<2)|0)|0;c[s+(c[t>>2]<<2)>>2]=e;c[t>>2]=(c[t>>2]|0)+1}while(1){if((c[t>>2]|0)>=64)break;f=Hm(c[s+((c[t>>2]|0)-2<<2)>>2]|0,17)|0;e=f^(Hm(c[s+((c[t>>2]|0)-2<<2)>>2]|0,19)|0);f=(e^(c[s+((c[t>>2]|0)-2<<2)>>2]|0)>>>10)+(c[s+((c[t>>2]|0)-7<<2)>>2]|0)|0;e=Hm(c[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f=0;d=i;i=i+16|0;e=d+4|0;f=d;c[e>>2]=a;c[f>>2]=b;i=d;return (c[e>>2]|0)>>>(c[f>>2]&31)|c[e>>2]<<(32-(c[f>>2]|0)&31)|0}function Im(a){a=a|0;var b=0,d=0,e=0;b=i;i=i+16|0;d=b;c[d>>2]=a;a=Hm(c[d>>2]|0,6)|0;e=a^(Hm(c[d>>2]|0,11)|0);a=e^(Hm(c[d>>2]|0,25)|0);i=b;return a|0}function Jm(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=i;i=i+16|0;f=e+8|0;g=e+4|0;h=e;c[f>>2]=a;c[g>>2]=b;c[h>>2]=d;i=e;return c[h>>2]^c[f>>2]&(c[g>>2]^c[h>>2])|0}function Km(a){a=a|0;var b=0,d=0,e=0;b=i;i=i+16|0;d=b;c[d>>2]=a;a=Hm(c[d>>2]|0,2)|0;e=a^(Hm(c[d>>2]|0,13)|0);a=e^(Hm(c[d>>2]|0,22)|0);i=b;return a|0}function Lm(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=i;i=i+16|0;f=e+8|0;g=e+4|0;h=e;c[f>>2]=a;c[g>>2]=b;c[h>>2]=d;i=e;return c[f>>2]&c[g>>2]|c[h>>2]&(c[f>>2]|c[g>>2])|0}function Mm(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0;d=i;i=i+32|0;e=d+28|0;f=d+24|0;g=d+20|0;h=d+16|0;j=d+12|0;k=d+8|0;l=d+4|0;m=d;c[e>>2]=b;c[f>>2]=c[e>>2];rs(c[f>>2]|0,0,0);c[g>>2]=c[(c[f>>2]|0)+128>>2];c[h>>2]=c[(c[f>>2]|0)+128+4>>2];c[k>>2]=c[g>>2]<<6;c[j>>2]=c[h>>2]<<6|(c[g>>2]|0)>>>26;c[g>>2]=c[k>>2];h=(c[k>>2]|0)+(c[(c[f>>2]|0)+144>>2]|0)|0;c[k>>2]=h;if(h>>>0<(c[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l>>2]|0,c[(c[f>>2]|0)+188>>2]|0);c[l>>2]=(c[l>>2]|0)+4;i=d;return}function Nm(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=i;i=i+16|0;f=e+8|0;g=e+4|0;h=e;c[f>>2]=b;c[g>>2]=d;c[h>>2]=c[f>>2];a[c[h>>2]>>0]=(c[g>>2]|0)>>>24;a[(c[h>>2]|0)+1>>0]=(c[g>>2]|0)>>>16;a[(c[h>>2]|0)+2>>0]=(c[g>>2]|0)>>>8;a[(c[h>>2]|0)+3>>0]=c[g>>2];i=e;return}function Om(a){a=a|0;var b=0,d=0,e=0;b=i;i=i+16|0;d=b+4|0;e=b;c[d>>2]=a;c[e>>2]=c[d>>2];i=b;return c[e>>2]|0}function Pm(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0;e=i;i=i+16|0;f=e+12|0;g=e+8|0;h=e+4|0;j=e;c[f>>2]=a;c[g>>2]=b;c[h>>2]=d;switch(c[f>>2]|0){case 11:{c[j>>2]=Qm(c[g>>2]|0,c[h>>2]|0)|0;break}case 8:{c[j>>2]=Rm(c[g>>2]|0,c[h>>2]|0)|0;break}default:c[j>>2]=5}i=e;return c[j>>2]|0}function Qm(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0;d=i;i=i+32|0;e=d+16|0;f=d+12|0;g=d+8|0;h=d+4|0;j=d;c[f>>2]=a;c[g>>2]=b;c[h>>2]=42864;c[j>>2]=qs(11,0,42877,3,42479,28)|0;do if(!(c[j>>2]|0)){if(c[f>>2]|0){c[h>>2]=42930;c[j>>2]=qs(11,0,42508,56,42565,28)|0;if(c[j>>2]|0)break;c[h>>2]=43104;c[j>>2]=qs(11,1,0,0,42594,28)|0;if(c[j>>2]|0)break}c[e>>2]=0;k=c[e>>2]|0;i=d;return k|0}while(0);if(c[g>>2]|0)Fb[c[g>>2]&1](43169,11,c[h>>2]|0,c[j>>2]|0);c[e>>2]=50;k=c[e>>2]|0;i=d;return k|0}function Rm(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0;d=i;i=i+32|0;e=d+16|0;f=d+12|0;g=d+8|0;h=d+4|0;j=d;c[f>>2]=a;c[g>>2]=b;c[h>>2]=42864;c[j>>2]=qs(8,0,42877,3,42623,32)|0;do if(!(c[j>>2]|0)){if(c[f>>2]|0){c[h>>2]=42930;c[j>>2]=qs(8,0,42508,56,42656,32)|0;if(c[j>>2]|0)break;c[h>>2]=43104;c[j>>2]=qs(8,1,0,0,42689,32)|0;if(c[j>>2]|0)break}c[e>>2]=0;k=c[e>>2]|0;i=d;return k|0}while(0);if(c[g>>2]|0)Fb[c[g>>2]&1](43169,8,c[h>>2]|0,c[j>>2]|0);c[e>>2]=50;k=c[e>>2]|0;i=d;return k|0}function Sm(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=i;i=i+16|0;e=d+12|0;f=d+4|0;c[e>>2]=a;c[d+8>>2]=b;c[f>>2]=c[e>>2];c[d>>2]=Vg()|0;c[(c[f>>2]|0)+160>>2]=1779033703;c[(c[f>>2]|0)+164>>2]=-1150833019;c[(c[f>>2]|0)+168>>2]=1013904242;c[(c[f>>2]|0)+172>>2]=-1521486534;c[(c[f>>2]|0)+176>>2]=1359893119;c[(c[f>>2]|0)+180>>2]=-1694144372;c[(c[f>>2]|0)+184>>2]=528734635;c[(c[f>>2]|0)+188>>2]=1541459225;e=(c[f>>2]|0)+128|0;c[e>>2]=0;c[e+4>>2]=0;e=(c[f>>2]|0)+136|0;c[e>>2]=0;c[e+4>>2]=0;c[(c[f>>2]|0)+144>>2]=0;c[(c[f>>2]|0)+148>>2]=64;c[(c[f>>2]|0)+152>>2]=33;i=d;return}function Tm(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;d=i;i=i+32|0;e=d+16|0;f=d+8|0;g=d+4|0;c[e>>2]=a;c[d+12>>2]=b;c[f>>2]=c[e>>2];c[g>>2]=(c[f>>2]|0)+160;c[d>>2]=Vg()|0;e=c[g>>2]|0;c[e>>2]=-205731576;c[e+4>>2]=1779033703;e=(c[g>>2]|0)+8|0;c[e>>2]=-2067093701;c[e+4>>2]=-1150833019;e=(c[g>>2]|0)+16|0;c[e>>2]=-23791573;c[e+4>>2]=1013904242;e=(c[g>>2]|0)+24|0;c[e>>2]=1595750129;c[e+4>>2]=-1521486534;e=(c[g>>2]|0)+32|0;c[e>>2]=-1377402159;c[e+4>>2]=1359893119;e=(c[g>>2]|0)+40|0;c[e>>2]=725511199;c[e+4>>2]=-1694144372;e=(c[g>>2]|0)+48|0;c[e>>2]=-79577749;c[e+4>>2]=528734635;e=(c[g>>2]|0)+56|0;c[e>>2]=327033209;c[e+4>>2]=1541459225;e=(c[f>>2]|0)+128|0;c[e>>2]=0;c[e+4>>2]=0;e=(c[f>>2]|0)+136|0;c[e>>2]=0;c[e+4>>2]=0;c[(c[f>>2]|0)+144>>2]=0;c[(c[f>>2]|0)+148>>2]=128;c[(c[f>>2]|0)+152>>2]=34;i=d;return}function Um(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0;e=i;i=i+32|0;f=e+16|0;g=e+12|0;h=e+8|0;j=e+4|0;k=e;c[f>>2]=a;c[g>>2]=b;c[h>>2]=d;c[j>>2]=c[f>>2];do{c[k>>2]=(Vm((c[j>>2]|0)+160|0,c[g>>2]|0)|0)+12;c[g>>2]=(c[g>>2]|0)+128;f=(c[h>>2]|0)+-1|0;c[h>>2]=f}while((f|0)!=0);i=e;return c[k>>2]|0}function Vm(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;d=i;i=i+240|0;e=d+232|0;f=d+228|0;g=d+216|0;h=d+208|0;j=d+200|0;k=d+192|0;l=d+184|0;m=d+176|0;n=d+168|0;o=d+160|0;p=d+32|0;q=d+224|0;r=d+24|0;s=d+16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>2]|0,48)|0;a[(c[j>>2]|0)+1>>0]=g;g=h;e=Cx(c[g>>2]|0,c[g+4>>2]|0,40)|0;a[(c[j>>2]|0)+2>>0]=e;a[(c[j>>2]|0)+3>>0]=c[h+4>>2];e=h;g=Cx(c[e>>2]|0,c[e+4>>2]|0,24)|0;a[(c[j>>2]|0)+4>>0]=g;g=h;e=Cx(c[g>>2]|0,c[g+4>>2]|0,16)|0;a[(c[j>>2]|0)+5>>0]=e;e=h;g=Cx(c[e>>2]|0,c[e+4>>2]|0,8)|0;a[(c[j>>2]|0)+6>>0]=g;a[(c[j>>2]|0)+7>>0]=c[h>>2];i=f;return}function cn(a){a=a|0;var b=0,d=0,e=0;b=i;i=i+16|0;d=b+4|0;e=b;c[d>>2]=a;c[e>>2]=c[d>>2];i=b;return c[e>>2]|0}function dn(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0;e=i;i=i+16|0;f=e+12|0;g=e+8|0;h=e+4|0;j=e;c[f>>2]=a;c[g>>2]=b;c[h>>2]=d;switch(c[f>>2]|0){case 9:{c[j>>2]=en(c[g>>2]|0,c[h>>2]|0)|0;break}case 10:{c[j>>2]=fn(c[g>>2]|0,c[h>>2]|0)|0;break}default:c[j>>2]=5}i=e;return c[j>>2]|0}function en(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0;d=i;i=i+32|0;e=d+16|0;f=d+12|0;g=d+8|0;h=d+4|0;j=d;c[f>>2]=a;c[g>>2]=b;c[h>>2]=42864;c[j>>2]=qs(9,0,42877,3,42881,48)|0;do if(!(c[j>>2]|0)){if(c[f>>2]|0){c[h>>2]=42930;c[j>>2]=qs(9,0,42942,112,43055,48)|0;if(c[j>>2]|0)break;c[h>>2]=43104;c[j>>2]=qs(9,1,0,0,43120,48)|0;if(c[j>>2]|0)break}c[e>>2]=0;k=c[e>>2]|0;i=d;return k|0}while(0);if(c[g>>2]|0)Fb[c[g>>2]&1](43169,9,c[h>>2]|0,c[j>>2]|0);c[e>>2]=50;k=c[e>>2]|0;i=d;return k|0}function fn(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0;d=i;i=i+32|0;e=d+16|0;f=d+12|0;g=d+8|0;h=d+4|0;j=d;c[f>>2]=a;c[g>>2]=b;c[h>>2]=42864;c[j>>2]=qs(10,0,42877,3,43176,64)|0;do if(!(c[j>>2]|0)){if(c[f>>2]|0){c[h>>2]=42930;c[j>>2]=qs(10,0,42942,112,43241,64)|0;if(c[j>>2]|0)break;c[h>>2]=43104;c[j>>2]=qs(10,1,0,0,43306,64)|0;if(c[j>>2]|0)break}c[e>>2]=0;k=c[e>>2]|0;i=d;return k|0}while(0);if(c[g>>2]|0)Fb[c[g>>2]&1](43169,10,c[h>>2]|0,c[j>>2]|0);c[e>>2]=50;k=c[e>>2]|0;i=d;return k|0}function gn(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;d=i;i=i+32|0;e=d+16|0;f=d+8|0;g=d+4|0;c[e>>2]=a;c[d+12>>2]=b;c[f>>2]=c[e>>2];c[g>>2]=(c[f>>2]|0)+160;c[d>>2]=Vg()|0;e=c[g>>2]|0;c[e>>2]=-1056596264;c[e+4>>2]=-876896931;e=(c[g>>2]|0)+8|0;c[e>>2]=914150663;c[e+4>>2]=1654270250;e=(c[g>>2]|0)+16|0;c[e>>2]=812702999;c[e+4>>2]=-1856437926;e=(c[g>>2]|0)+24|0;c[e>>2]=-150054599;c[e+4>>2]=355462360;e=(c[g>>2]|0)+32|0;c[e>>2]=-4191439;c[e+4>>2]=1731405415;e=(c[g>>2]|0)+40|0;c[e>>2]=1750603025;c[e+4>>2]=-1900787065;e=(c[g>>2]|0)+48|0;c[e>>2]=1694076839;c[e+4>>2]=-619958771;e=(c[g>>2]|0)+56|0;c[e>>2]=-1090891868;c[e+4>>2]=1203062813;e=(c[f>>2]|0)+128|0;c[e>>2]=0;c[e+4>>2]=0;e=(c[f>>2]|0)+136|0;c[e>>2]=0;c[e+4>>2]=0;c[(c[f>>2]|0)+144>>2]=0;c[(c[f>>2]|0)+148>>2]=128;c[(c[f>>2]|0)+152>>2]=34;i=d;return}function hn(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0;e=i;i=i+32|0;f=e+16|0;g=e+12|0;h=e+8|0;j=e+4|0;k=e;c[f>>2]=a;c[g>>2]=b;c[h>>2]=d;c[j>>2]=c[f>>2];c[k>>2]=jn(c[j>>2]|0,c[g>>2]|0,c[h>>2]|0)|0;If(47);Jf();i=e;return c[k>>2]|0}
+function fw(a,b,c){a=a|0;b=b|0;c=c|0;return uv(a,2147483647,b,c)|0}function gw(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0;e=i;i=i+16|0;f=e;c[f>>2]=d;d=wv(a,b,f)|0;i=e;return d|0}function hw(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0;if((c[f+76>>2]|0)>-1)g=Iv(f)|0;else g=0;h=e+-1|0;if((e|0)<2){e=f+74|0;i=a[e>>0]|0;a[e>>0]=i+255|i;if(g)av(f);if(!h){a[b>>0]=0;j=b}else j=0}else{a:do if(h){i=f+4|0;e=f+8|0;k=h;l=b;while(1){m=c[i>>2]|0;n=m;o=(c[e>>2]|0)-n|0;p=Cv(m,10,o)|0;q=(p|0)==0;r=q?o:1-n+p|0;p=r>>>0<k>>>0;n=p?r:k;Dx(l|0,m|0,n|0)|0;m=(c[i>>2]|0)+n|0;c[i>>2]=m;r=l+n|0;o=k-n|0;if(!(q&p)){s=r;t=17;break a}if(m>>>0>=(c[e>>2]|0)>>>0){p=cw(f)|0;if((p|0)<0){u=r;break}else v=p}else{c[i>>2]=m+1;v=d[m>>0]|0}k=o+-1|0;o=r+1|0;a[r>>0]=v;if(!((k|0)!=0&(v&255|0)!=10)){s=o;t=17;break a}else l=o}if((u|0)!=(b|0)?(c[f>>2]&16|0)!=0:0){s=u;t=17}else w=0}else{s=b;t=17}while(0);if((t|0)==17)if(!b)w=0;else{a[s>>0]=0;w=b}if(!g)j=w;else{av(f);j=w}}return j|0}function iw(b,c,e){b=b|0;c=c|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;if(!e)f=0;else{g=a[b>>0]|0;a:do if(!(g<<24>>24)){h=0;i=c}else{j=e;k=g;l=b;m=c;while(1){j=j+-1|0;n=a[m>>0]|0;if(!(k<<24>>24==n<<24>>24&((j|0)!=0&n<<24>>24!=0))){h=k;i=m;break a}l=l+1|0;n=m+1|0;k=a[l>>0]|0;if(!(k<<24>>24)){h=0;i=n;break}else m=n}}while(0);f=(h&255)-(d[i>>0]|0)|0}return f|0}function jw(a){a=a|0;return Hx(a|0)|0}function kw(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;e=i;i=i+192|0;f=e+152|0;g=e+136|0;h=e+120|0;j=e+104|0;k=e+96|0;l=e+80|0;m=e+64|0;n=e+48|0;o=e+32|0;p=e+16|0;q=e;r=e+176|0;s=e+168|0;c[r>>2]=d;d=(c[r>>2]|0)+(4-1)&~(4-1);t=c[d>>2]|0;c[r>>2]=d+4;d=(b|0)==4?t|32768:t;a:do switch(b|0){case 14:{c[q>>2]=a;c[q+4>>2]=14;c[q+8>>2]=d;u=Xu(pa(221,q|0)|0)|0;break}case 9:{c[p>>2]=a;c[p+4>>2]=16;c[p+8>>2]=s;t=pa(221,p|0)|0;switch(t|0){case -22:{c[o>>2]=a;c[o+4>>2]=9;c[o+8>>2]=d;v=pa(221,o|0)|0;break}case 0:{r=c[s+4>>2]|0;v=(c[s>>2]|0)==2?0-r|0:r;break}default:v=Xu(t)|0}u=v;break}case 1030:{c[n>>2]=a;c[n+4>>2]=1030;c[n+8>>2]=d;t=pa(221,n|0)|0;if((t|0)!=-22){if((t|0)>-1){c[m>>2]=t;c[m+4>>2]=2;c[m+8>>2]=1;pa(221,m|0)|0}u=Xu(t)|0;break a}c[l>>2]=a;c[l+4>>2]=1030;c[l+8>>2]=0;t=pa(221,l|0)|0;if((t|0)==-22){c[j>>2]=a;c[j+4>>2]=0;c[j+8>>2]=d;r=pa(221,j|0)|0;if((r|0)>-1){c[h>>2]=r;c[h+4>>2]=2;c[h+8>>2]=1;pa(221,h|0)|0}u=Xu(r)|0;break a}else{if((t|0)>-1){c[k>>2]=t;ta(6,k|0)|0}u=Xu(-22)|0;break a}break}default:if((b+-12|0)>>>0<5){c[g>>2]=a;c[g+4>>2]=b;c[g+8>>2]=d;u=Xu(pa(221,g|0)|0)|0;break a}else{c[f>>2]=a;c[f+4>>2]=b;c[f+8>>2]=d;u=Xu(pa(221,f|0)|0)|0;break a}}while(0);i=e;return u|0}function lw(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;a=ta(6,d|0)|0;d=Xu((a|0)==-4?-115:a)|0;i=b;return d|0}function mw(b,c,d){b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;a:do if(!d)e=0;else{f=d;g=b;h=c;while(1){i=a[g>>0]|0;j=a[h>>0]|0;if(i<<24>>24!=j<<24>>24){k=i;l=j;break}f=f+-1|0;if(!f){e=0;break a}else{g=g+1|0;h=h+1|0}}e=(k&255)-(l&255)|0}while(0);return e|0}function nw(a){a=a|0;return Hx(a|0)|0}function ow(a,b,c){a=a|0;b=b|0;c=c|0;pw(a,b,c)|0;return a|0}function pw(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0;f=d;do if(!((f^b)&3)){g=(e|0)!=0;a:do if(g&(f&3|0)!=0){h=e;i=d;j=b;while(1){k=a[i>>0]|0;a[j>>0]=k;if(!(k<<24>>24)){l=h;m=i;n=j;break a}k=h+-1|0;o=i+1|0;p=j+1|0;q=(k|0)!=0;if(q&(o&3|0)!=0){h=k;i=o;j=p}else{r=k;s=o;t=p;u=q;v=5;break}}}else{r=e;s=d;t=b;u=g;v=5}while(0);if((v|0)==5)if(u){l=r;m=s;n=t}else{w=t;x=0;break}if(!(a[m>>0]|0)){w=n;x=l}else{b:do if(l>>>0>3){g=l;j=n;i=m;while(1){h=c[i>>2]|0;if((h&-2139062144^-2139062144)&h+-16843009){y=g;z=j;A=i;break b}c[j>>2]=h;h=g+-4|0;q=i+4|0;p=j+4|0;if(h>>>0>3){g=h;j=p;i=q}else{y=h;z=p;A=q;break}}}else{y=l;z=n;A=m}while(0);B=A;C=z;D=y;v=11}}else{B=d;C=b;D=e;v=11}while(0);c:do if((v|0)==11)if(!D){w=C;x=0}else{e=B;b=C;d=D;while(1){y=a[e>>0]|0;a[b>>0]=y;if(!(y<<24>>24)){w=b;x=d;break c}d=d+-1|0;y=b+1|0;if(!d){w=y;x=0;break}else{e=e+1|0;b=y}}}while(0);Fx(w|0,0,x|0)|0;return w|0}function qw(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0;e=i;i=i+32|0;f=e+16|0;g=e;if(Cv(70495,a[d>>0]|0,4)|0){h=rw(d)|0|32768;c[g>>2]=b;c[g+4>>2]=h;c[g+8>>2]=438;h=Xu(hb(5,g|0)|0)|0;if((h|0)>=0){g=uw(h,d)|0;if(!g){c[f>>2]=h;ta(6,f|0)|0;j=0}else j=g}else j=0}else{c[(Yu()|0)>>2]=22;j=0}i=e;return j|0}function rw(b){b=b|0;var c=0,d=0,e=0,f=0;c=(sw(b,43)|0)==0;d=a[b>>0]|0;e=c?d<<24>>24!=114&1:2;c=(sw(b,120)|0)==0;f=c?e:e|128;e=(sw(b,101)|0)==0;b=e?f:f|524288;f=d<<24>>24==114?b:b|64;b=d<<24>>24==119?f|512:f;return (d<<24>>24==97?b|1024:b)|0}function sw(b,c){b=b|0;c=c|0;var d=0;d=tw(b,c)|0;return ((a[d>>0]|0)==(c&255)<<24>>24?d:0)|0}function tw(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;e=d&255;a:do if(!e)f=b+(Kv(b)|0)|0;else{if(!(b&3))g=b;else{h=d&255;i=b;while(1){j=a[i>>0]|0;if(j<<24>>24==0?1:j<<24>>24==h<<24>>24){f=i;break a}j=i+1|0;if(!(j&3)){g=j;break}else i=j}}i=_(e,16843009)|0;h=c[g>>2]|0;b:do if(!((h&-2139062144^-2139062144)&h+-16843009)){j=h;k=g;while(1){l=j^i;if((l&-2139062144^-2139062144)&l+-16843009){m=k;break b}l=k+4|0;j=c[l>>2]|0;if((j&-2139062144^-2139062144)&j+-16843009){m=l;break}else k=l}}else m=g;while(0);i=d&255;h=m;while(1){k=a[h>>0]|0;if(k<<24>>24==0?1:k<<24>>24==i<<24>>24){f=h;break}else h=h+1|0}}while(0);return f|0}function uw(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;e=i;i=i+112|0;f=e+40|0;g=e+24|0;h=e+16|0;j=e;k=e+52|0;l=a[d>>0]|0;if(Cv(70495,l<<24>>24,4)|0){m=sx(1144)|0;if(!m)n=0;else{o=m;p=o+112|0;do{c[o>>2]=0;o=o+4|0}while((o|0)<(p|0));if(!(sw(d,43)|0))c[m>>2]=l<<24>>24==114?8:4;if(!(sw(d,101)|0))q=l;else{c[j>>2]=b;c[j+4>>2]=2;c[j+8>>2]=1;pa(221,j|0)|0;q=a[d>>0]|0}if(q<<24>>24==97){c[h>>2]=b;c[h+4>>2]=3;q=pa(221,h|0)|0;if(!(q&1024)){c[g>>2]=b;c[g+4>>2]=4;c[g+8>>2]=q|1024;pa(221,g|0)|0}g=c[m>>2]|128;c[m>>2]=g;r=g}else r=c[m>>2]|0;c[m+60>>2]=b;c[m+44>>2]=m+120;c[m+48>>2]=1024;g=m+75|0;a[g>>0]=-1;if((r&8|0)==0?(c[f>>2]=b,c[f+4>>2]=21505,c[f+8>>2]=k,(_a(54,f|0)|0)==0):0)a[g>>0]=10;c[m+32>>2]=35;c[m+36>>2]=25;c[m+40>>2]=24;c[m+12>>2]=10;if(!(c[17777]|0))c[m+76>>2]=-1;fb(71132);g=c[17782]|0;c[m+56>>2]=g;if(g)c[g+52>>2]=m;c[17782]=m;$a(71132);n=m}}else{c[(Yu()|0)>>2]=22;n=0}i=e;return n|0}function vw(a){a=a|0;var b=0,d=0,e=0,f=0;b=(c[a>>2]&1|0)!=0;if(!b){fb(71132);d=c[a+52>>2]|0;e=a+56|0;if(d)c[d+56>>2]=c[e>>2];f=c[e>>2]|0;if(f)c[f+52>>2]=d;if((c[17782]|0)==(a|0))c[17782]=f;$a(71132)}f=ww(a)|0;d=zb[c[a+12>>2]&15](a)|0|f;f=c[a+92>>2]|0;if(f)tx(f);if(!b)tx(a);return d|0}function ww(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0;do if(a){if((c[a+76>>2]|0)<=-1){b=xw(a)|0;break}d=(Iv(a)|0)==0;e=xw(a)|0;if(d)b=e;else{av(a);b=e}}else{if(!(c[3961]|0))f=0;else f=ww(c[3961]|0)|0;fb(71132);e=c[17782]|0;if(!e)g=f;else{d=e;e=f;while(1){if((c[d+76>>2]|0)>-1)h=Iv(d)|0;else h=0;if((c[d+20>>2]|0)>>>0>(c[d+28>>2]|0)>>>0)i=xw(d)|0|e;else i=e;if(h)av(d);d=c[d+56>>2]|0;if(!d){g=i;break}else e=i}}$a(71132);b=g}while(0);return b|0}function xw(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0;b=a+20|0;d=a+28|0;if((c[b>>2]|0)>>>0>(c[d>>2]|0)>>>0?(vb[c[a+36>>2]&63](a,0,0)|0,(c[b>>2]|0)==0):0)e=-1;else{f=a+4|0;g=c[f>>2]|0;h=a+8|0;i=c[h>>2]|0;if(g>>>0<i>>>0)vb[c[a+40>>2]&63](a,g-i|0,1)|0;c[a+16>>2]=0;c[d>>2]=0;c[b>>2]=0;c[h>>2]=0;c[f>>2]=0;e=0}return e|0}function yw(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0;f=i;i=i+16|0;g=f;h=e&255;a[g>>0]=h;j=b+16|0;k=c[j>>2]|0;if(!k)if(!(zv(b)|0)){l=c[j>>2]|0;m=4}else n=-1;else{l=k;m=4}do if((m|0)==4){k=b+20|0;j=c[k>>2]|0;if(j>>>0<l>>>0?(o=e&255,(o|0)!=(a[b+75>>0]|0)):0){c[k>>2]=j+1;a[j>>0]=h;n=o;break}if((vb[c[b+36>>2]&63](b,g,1)|0)==1)n=d[g>>0]|0;else n=-1}while(0);i=f;return n|0}function zw(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0;g=i;i=i+16|0;h=g;a:do if(!e)j=0;else{do if(f){k=(b|0)==0?h:b;l=a[e>>0]|0;m=l&255;if(l<<24>>24>-1){c[k>>2]=m;j=l<<24>>24!=0&1;break a}l=m+-194|0;if(l>>>0<=50){m=e+1|0;n=c[15964+(l<<2)>>2]|0;if(f>>>0<4?(n&-2147483648>>>((f*6|0)+-6|0)|0)!=0:0)break;l=d[m>>0]|0;m=l>>>3;if((m+-16|m+(n>>26))>>>0<=7){m=l+-128|n<<6;if((m|0)>=0){c[k>>2]=m;j=2;break a}n=d[e+2>>0]|0;if((n&192|0)==128){l=n+-128|m<<6;if((l|0)>=0){c[k>>2]=l;j=3;break a}m=d[e+3>>0]|0;if((m&192|0)==128){c[k>>2]=m+-128|l<<6;j=4;break a}}}}}while(0);c[(Yu()|0)>>2]=84;j=-1}while(0);i=g;return j|0}function Aw(a,b){a=a|0;b=b|0;return (Bw(a,Kv(a)|0,1,b)|0)+-1|0}function Bw(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0;f=_(d,b)|0;if((c[e+76>>2]|0)>-1){g=(Iv(e)|0)==0;h=yv(a,f,e)|0;if(g)i=h;else{av(e);i=h}}else i=yv(a,f,e)|0;if((i|0)==(f|0))j=d;else j=(i>>>0)/(b>>>0)|0;return j|0}function Cw(b){b=b|0;var d=0,e=0,f=0,g=0,h=0;d=c[3932]|0;if((c[d+76>>2]|0)>-1)e=Iv(d)|0;else e=0;do if((Aw(b,d)|0)<0)f=1;else{if((a[d+75>>0]|0)!=10?(g=d+20|0,h=c[g>>2]|0,h>>>0<(c[d+16>>2]|0)>>>0):0){c[g>>2]=h+1;a[h>>0]=10;f=0;break}f=(yw(d,10)|0)<0}while(0);if(e)av(d);return f<<31>>31|0}function Dw(){var a=0,b=0;a=i;i=i+16|0;b=wa(20,a|0)|0;i=a;return b|0}function Ew(a,b){a=a|0;b=b|0;var d=0,e=0;d=i;i=i+16|0;e=d;c[e>>2]=a;c[e+4>>2]=b;b=Xu(Za(33,e|0)|0)|0;i=d;return b|0}function Fw(a,b){a=a|0;b=b|0;var d=0,e=0;d=i;i=i+16|0;e=d;c[e>>2]=b;b=wv(c[3932]|0,a,e)|0;i=d;return b|0}function Gw(a){a=a|0;var b=0,d=0,e=0;if((c[a+76>>2]|0)>-1){b=(Iv(a)|0)==0;d=(c[a>>2]|0)>>>4&1;if(b)e=d;else e=d}else e=(c[a>>2]|0)>>>4&1;return e|0}function Hw(b,c){b=b|0;c=c|0;var d=0,e=0,f=0,g=0;d=b;e=70499;f=d+15|0;do{a[d>>0]=a[e>>0]|0;d=d+1|0;e=e+1|0}while((d|0)<(f|0));if(!c){a[b+14>>0]=48;a[b+15>>0]=0}else{e=14;d=c;while(1){f=e+1|0;if(d>>>0<10){g=f;break}else{e=f;d=(d>>>0)/10|0}}a[b+g>>0]=0;d=c;c=g;while(1){c=c+-1|0;a[b+c>>0]=(d>>>0)%10|0|48;if(d>>>0<10)break;else d=(d>>>0)/10|0}}return}function Iw(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0;d=i;i=i+48|0;e=d+40|0;f=d+8|0;g=d;c[g>>2]=a;c[g+4>>2]=b;h=Ha(197,g|0)|0;if((h|0)==-9?(c[f>>2]=a,c[f+4>>2]=1,(pa(221,f|0)|0)>=0):0){Hw(f,a);c[e>>2]=f;c[e+4>>2]=b;j=Xu(Ia(195,e|0)|0)|0}else j=Xu(h)|0;i=d;return j|0}function Jw(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0;g=i;i=i+32|0;h=g;c[h>>2]=a;c[h+4>>2]=b;c[h+8>>2]=d;c[h+12>>2]=e;c[h+16>>2]=f;f=Xu(qb(142,h|0)|0)|0;i=g;return f|0}function Kw(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0;e=i;i=i+16|0;f=e;c[f>>2]=a;c[f+4>>2]=b;c[f+8>>2]=d;d=Xu(ib(4,f|0)|0)|0;i=e;return d|0}function Lw(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0;e=i;i=i+16|0;f=e;c[f>>2]=a;c[f+4>>2]=b;c[f+8>>2]=d;d=Xu(db(3,f|0)|0)|0;i=e;return d|0}function Mw(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=i;i=i+32|0;f=e;g=e+16|0;c[g>>2]=d;d=(c[g>>2]|0)+(4-1)&~(4-1);h=c[d>>2]|0;c[g>>2]=d+4;c[f>>2]=a;c[f+4>>2]=b|32768;c[f+8>>2]=h;h=Xu(hb(5,f|0)|0)|0;i=e;return h|0}function Nw(a){a=a|0;var b=0,d=0;b=i;i=i+16|0;d=b;c[d>>2]=a;a=Xu(cb(10,d|0)|0)|0;i=b;return a|0}function Ow(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0;f=i;i=i+32|0;g=f;c[g>>2]=b;c[g+4>>2]=d;c[g+8>>2]=e;c[g+12>>2]=a;e=g+16|0;c[e>>2]=0;d=g+20|0;c[d>>2]=0;switch(a|0){case 208:case 203:case 213:{c[e>>2]=1;break}default:{}}Tw(8,g);g=c[d>>2]|0;if(!g)h=0;else{c[(Yu()|0)>>2]=g;h=-1}i=f;return h|0}function Pw(a){a=a|0;var b=0,d=0,e=0,f=0,g=0;b=i;i=i+32|0;d=b+16|0;e=b;f=a+20|0;do if(!(c[f>>2]|0)){if(((c[a+16>>2]|0)!=0?(g=c[a>>2]|0,(g|0)>-1):0)?(g|0)!=(Qw()|0):0){c[d>>2]=c[180];c[d+4>>2]=c[181];c[d+8>>2]=c[182];c[d+12>>2]=c[183];Rw(6,e)|0;g=Sw(6,d)|0;c[f>>2]=0-g;if(!((g|0)!=0?(c[17780]|0)!=0:0)){c[f>>2]=1;Sw(6,e)|0}break}c[f>>2]=1}while(0);i=b;return}function Qw(){var a=0,b=0;a=i;i=i+16|0;b=Ka(199,a|0)|0;i=a;return b|0}function Rw(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0;d=i;i=i+32|0;e=d+16|0;f=d;g=d+24|0;c[f>>2]=0;c[f+4>>2]=a;c[f+8>>2]=0;c[f+12>>2]=b;h=Xu(eb(340,f|0)|0)|0;if(!h){f=b;if((c[f>>2]|0)==-1?(c[f+4>>2]|0)==-1:0){f=b;c[f>>2]=-1;c[f+4>>2]=-1}f=b+8|0;j=f;if((c[j>>2]|0)==-1?(c[j+4>>2]|0)==-1:0){j=f;c[j>>2]=-1;c[j+4>>2]=-1;k=0}else k=0}else if((c[(Yu()|0)>>2]|0)==38){c[e>>2]=a;c[e+4>>2]=g;if((Xu(Ga(191,e|0)|0)|0)>=0){e=c[g>>2]|0;a=(e|0)==-1;j=b;c[j>>2]=a?-1:e;c[j+4>>2]=a?-1:0;j=c[g+4>>2]|0;g=(j|0)==-1;e=b+8|0;f=e;c[f>>2]=g?-1:j;c[f+4>>2]=g?-1:0;if(a){a=b;c[a>>2]=-1;c[a+4>>2]=-1}if(g){g=e;c[g>>2]=-1;c[g+4>>2]=-1;k=0}else k=0}else k=-1}else k=h;i=d;return k|0}function Sw(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0;d=i;i=i+32|0;e=d+16|0;f=d;g=d+24|0;c[f>>2]=0;c[f+4>>2]=a;c[f+8>>2]=b;c[f+12>>2]=0;h=eb(340,f|0)|0;if((h|0)==-38){f=b;j=c[f>>2]|0;k=c[f+4>>2]|0;f=k>>>0<0|(k|0)==0&j>>>0<4294967295;k=f?j:-1;c[g>>2]=k;k=b+8|0;b=c[k>>2]|0;j=c[k+4>>2]|0;k=j>>>0<0|(j|0)==0&b>>>0<4294967295;j=k?b:-1;c[g+4>>2]=j;c[e>>2]=a;c[e+4>>2]=g;l=Ua(75,e|0)|0}else l=h;i=d;return l|0}function Tw(a,b){a=a|0;b=b|0;xb[a&15](b);return}function Uw(){var a=0,b=0;a=i;i=i+16|0;b=mb(201,a|0)|0;i=a;return b|0}function Vw(a){a=a|0;return Ow(213,a,0,0)|0}function Ww(a,b){a=a|0;b=b|0;var d=0,e=0;d=i;i=i+16|0;e=d;c[e>>2]=a;c[e+4>>2]=0;c[e+8>>2]=b;c[e+12>>2]=((b|0)<0)<<31>>31;b=Xu(Ja(194,e|0)|0)|0;i=d;return b|0}function Xw(){var a=0,b=0;a=i;i=i+16|0;b=ra(64,a|0)|0;i=a;return b|0}function Yw(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;d=i;i=i+16|0;e=d;do{c[e>>2]=a;c[e+4>>2]=b;f=sa(63,e|0)|0}while((f|0)==-16);g=f;e=Xu(g)|0;i=d;return e|0}function Zw(a,b,d,e,f,g){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,j=0,k=0,l=0,m=0;h=i;i=i+32|0;j=h;do if((g&4095|0)==0&(((g|0)<0)<<31>>31&-4096|0)==0){if(b>>>0>2147483646){c[(Yu()|0)>>2]=12;k=-1;break}l=(e&16|0)!=0;if(l)_w(-1);c[j>>2]=a;c[j+4>>2]=b;c[j+8>>2]=d;c[j+12>>2]=e;c[j+16>>2]=f;c[j+20>>2]=g>>12;m=Xu(Fa(192,j|0)|0)|0;if(l){$w();k=m}else k=m}else{c[(Yu()|0)>>2]=22;k=-1}while(0);i=h;return k|0}function _w(a){a=a|0;return}function $w(){return}function ax(a,b){a=a|0;b=b|0;var d=0,e=0;d=i;i=i+16|0;e=d;_w(-1);c[e>>2]=a;c[e+4>>2]=b;b=Xu(Qa(91,e|0)|0)|0;$w();i=d;return b|0}function bx(a){a=a|0;var b=0;b=70552;c[b>>2]=a+-1;c[b+4>>2]=0;return}function cx(){var a=0,b=0,d=0;a=70552;b=Mx(c[a>>2]|0,c[a+4>>2]|0,1284865837,1481765933)|0;a=Ax(b|0,C|0,1,0)|0;b=C;d=70552;c[d>>2]=a;c[d+4>>2]=b;d=Cx(a|0,b|0,33)|0;return d|0}function dx(a){a=a|0;fb(71152);ex(a);$a(71152);return}function ex(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0;b=c[4092]|0;if(!b)c[c[4093]>>2]=a;else{c[4126]=(b|0)==31|(b|0)==7?3:1;c[17790]=0;if((b|0)>0){d=c[4093]|0;e=0;f=a;a=0;do{g=Mx(f|0,e|0,1284865837,1481765933)|0;f=Ax(g|0,C|0,1,0)|0;e=C;c[d+(a<<2)>>2]=e;a=a+1|0}while((a|0)<(b|0));h=d}else h=c[4093]|0;c[h>>2]=c[h>>2]|1}return}function fx(){var a=0,b=0,d=0,e=0,f=0,g=0,h=0;fb(71152);a=c[4092]|0;if(!a){b=c[4093]|0;d=(_(c[b>>2]|0,1103515245)|0)+12345&2147483647;c[b>>2]=d;e=d}else{d=c[17790]|0;b=c[4093]|0;f=c[4126]|0;g=b+(f<<2)|0;h=(c[g>>2]|0)+(c[b+(d<<2)>>2]|0)|0;c[g>>2]=h;g=f+1|0;c[4126]=(g|0)==(a|0)?0:g;g=d+1|0;c[17790]=(g|0)==(a|0)?0:g;e=h>>>1}$a(71152);return e|0}function gx(b){b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;c=b;while(1){b=c+1|0;if(!(Yv(a[c>>0]|0)|0)){d=c;e=b;break}else c=b}c=a[d>>0]|0;switch(c<<24>>24|0){case 45:{f=1;g=5;break}case 43:{f=0;g=5;break}default:{h=d;i=c;j=0}}if((g|0)==5){h=e;i=a[e>>0]|0;j=f}f=(i<<24>>24)+-48|0;if(f>>>0<10){i=h;h=f;f=0;while(1){i=i+1|0;e=(f*10|0)-h|0;h=(a[i>>0]|0)+-48|0;if(h>>>0>=10){k=e;break}else f=e}}else k=0;return ((j|0)!=0?k:0-k|0)|0}function hx(a,b){a=a|0;b=b|0;var d=0,e=0;d=i;i=i+16|0;e=d;c[e>>2]=a;c[e+4>>2]=b;b=Xu(Wa(77,e|0)|0)|0;i=d;return b|0}function ix(a,b){a=a|0;b=b|0;return jx(a,b,(Kv(a)|0)+1|0)|0}function jx(b,c,d){b=b|0;c=c|0;d=d|0;var e=0,f=0;e=c&255;c=d;while(1){if(!c){f=0;break}c=c+-1|0;d=b+c|0;if((a[d>>0]|0)==e<<24>>24){f=d;break}}return f|0}function kx(a){a=a|0;return (a+-48|0)>>>0<10|0}function lx(a,b){a=a|0;b=b|0;var d=0;if(!a)d=ux(1,24)|0;else{c[b>>2]=0;c[b+4>>2]=0;c[b+8>>2]=0;c[b+12>>2]=0;c[b+16>>2]=0;c[b+20>>2]=0;d=b}return d|0}function mx(a){a=a|0;var b=0,d=0;b=c[a>>2]|0;if(b){d=b;do{tx(c[d>>2]|0);b=d;d=c[d+4>>2]|0;tx(b)}while((d|0)!=0)}tx(a);return}function nx(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;g=a+16|0;a:do if(!(c[g>>2]|0)){h=a+12|0;i=c[h>>2]|0;do if(i>>>0<f>>>0){if(b)if(!d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+4>>2]=u;w=w+1|0;if((w|0)==(t|0)){E=0;break}else D=u+s|0}do{c[A+(E<<3)>>2]=-1;E=E+1|0}while((E|0)!=(t|0))}t=zw(h,b,4)|0;if((t|0)<1)if((t|0)<0){F=0;G=1}else{H=1;p=201}else{H=t;p=201}a:do if((p|0)==201){t=j+8|0;E=(q|0)!=0;D=(r|0)>0;w=j+12|0;u=j+44|0;v=j+32|0;I=j+36|0;J=(r|0)==0;K=(m|0)==0;L=(r|0)<1;M=-1;N=0;O=0;P=H;Q=0;R=C;S=B;T=B;U=b+H|0;V=x;while(1){if((M|0)<0){W=c[t>>2]|0;X=W+8|0;b:do if(!(c[X>>2]|0)){Y=M;Z=N;$=T}else{aa=(O|0)!=0;ba=(Q|0)==95;ca=(O|0)==0;da=E&(Q|0)==10;ea=K&(O|0)<1;fa=X;ga=M;ha=N;ia=T;ja=W;while(1){ka=fa;la=ja;c:while(1){ma=la+12|0;if((c[A+(c[ma>>2]<<3)>>2]|0)>=(O|0)){na=ga;oa=ha;pa=ia;qa=la;break}ra=la+20|0;sa=c[ra>>2]|0;if(!sa){ta=ka;ua=ma;va=la;p=236;break}d:do if(da|(ea|(sa&1|0)==0)){if((sa&2|0)!=0?(wa=c[h>>2]|0,!((wa|l|0)==0|E&(wa|0)==10)):0)break;do if(sa&16){if(ba)break d;if(Ov(Q)|0)break d;wa=c[h>>2]|0;if((wa|0)==95)break;if(!(Ov(wa)|0))break d}while(0);wa=c[ra>>2]|0;if(!(wa&32))xa=wa;else{if(ba){wa=c[h>>2]|0;if((wa|0)==95)break;else ya=wa}else{wa=(Ov(Q)|0)==0;za=c[h>>2]|0;if(wa|(za|0)==95)break;else ya=za}if(Ov(ya)|0)break;xa=c[ra>>2]|0}za=c[h>>2]|0;do if((za|0)!=0&(aa&(xa&64|0)!=0)){if(ba){Aa=za;Ba=1}else{wa=(Ov(Q)|0)!=0;Aa=c[h>>2]|0;Ba=wa}if((Aa|0)==95)if(Ba)break d;else break;else if(Ba^(Ov(Aa)|0)!=0)break;else break d}while(0);if(!(c[ra>>2]&128)){ta=ka;ua=ma;va=la;p=236;break c}za=c[h>>2]|0;if(ca|(za|0)==0)break;if(ba){Ca=za;Da=1}else{za=(Ov(Q)|0)!=0;Ca=c[h>>2]|0;Da=za}if((Ca|0)==95)if(Da){ta=ka;ua=ma;va=la;p=236;break c}else break;else if(Da^(Ov(Ca)|0)!=0)break;else{ta=ka;ua=ma;va=la;p=236;break c}}while(0);ka=la+40|0;if(!(c[ka>>2]|0)){Y=ga;Z=ha;$=ia;break b}else la=la+32|0}if((p|0)==236){p=0;c[ia>>2]=c[ta>>2];if(D)Fx(c[ia+4>>2]|0,-1,s|0)|0;la=c[va+16>>2]|0;do if(la){ka=c[la>>2]|0;if((ka|0)<=-1)break;ma=ia+4|0;ra=ka;ka=la;do{if((ra|0)<(r|0))c[(c[ma>>2]|0)+(ra<<2)>>2]=O;ka=ka+4|0;ra=c[ka>>2]|0}while((ra|0)>-1)}while(0);la=(c[ia>>2]|0)!=(c[w>>2]|0);if(L|la){Ea=ia+4|0;Fa=la?ga:O;Ga=la?ha:1}else{la=ia+4|0;ra=c[la>>2]|0;ka=0;do{c[o+(ka<<2)>>2]=c[ra+(ka<<2)>>2];ka=ka+1|0}while((ka|0)!=(r|0));Ea=la;Fa=O;Ga=1}la=c[ua>>2]|0;c[A+(la<<3)>>2]=O;c[A+(la<<3)+4>>2]=Ea;na=Fa;oa=Ga;pa=ia+8|0;qa=va}fa=qa+40|0;if(!(c[fa>>2]|0)){Y=na;Z=oa;$=pa;break}else{ga=na;ha=oa;ia=pa;ja=qa+32|0}}}while(0);c[$>>2]=0;W=c[h>>2]|0;if(!W){Ha=Y;break}else{Ia=W;Ja=Y;Ka=Z}}else{if(J){Ha=M;break}W=c[h>>2]|0;if((T|0)!=(S|0)&(W|0)!=0){Ia=W;Ja=M;Ka=N}else{Ha=M;break}}W=O+P|0;X=zw(h,U,4)|0;if((X|0)<1)if((X|0)<0){F=0;G=1;break a}else La=1;else La=X;X=U+La|0;if((Ka|0)!=0&(c[u>>2]|0)!=0){if(!(c[S>>2]|0))Ma=R;else{ja=c[I>>2]|0;ia=c[ja>>2]|0;ha=(ia|0)>-1;ga=S;fa=R;while(1){ba=ga+4|0;e:do if(ha){ca=ja;aa=ia;ea=0;while(1){da=c[ca+((ea|1)<<2)>>2]|0;if((aa|0)>=(r|0)){Na=fa;break e}la=c[ba>>2]|0;if((c[la+(da<<2)>>2]|0)==(c[o+(da<<2)>>2]|0)?(c[la+(aa<<2)>>2]|0)<(c[o+(aa<<2)>>2]|0):0){Na=fa;break e}ea=ea+2|0;ca=c[I>>2]|0;aa=c[ca+(ea<<2)>>2]|0;if((aa|0)<=-1){Oa=la;break}}Pa=ba;Qa=Oa;p=265}else{Pa=ba;Qa=c[ba>>2]|0;p=265}while(0);if((p|0)==265){p=0;c[fa>>2]=c[ga>>2];ba=fa+4|0;aa=c[ba>>2]|0;c[ba>>2]=Qa;c[Pa>>2]=aa;Na=fa+8|0}ga=ga+8|0;if(!(c[ga>>2]|0)){Ma=Na;break}else fa=Na}}c[Ma>>2]=0;Ra=0;Sa=R;Ta=S}else{Ra=Ka;Sa=S;Ta=R}fa=c[Sa>>2]|0;if(!fa){Ua=Ja;Va=Ra;Wa=Ta;Xa=V}else{ga=(W|0)!=0;ia=(Ia|0)==95;ja=(W|0)==0;ha=E&(Ia|0)==10;aa=K&(W|0)<1;ba=fa;fa=Ja;ea=Ra;ca=Sa;la=Ta;da=V;while(1){ka=ba+8|0;if(!(c[ka>>2]|0)){Ya=fa;Za=ea;_a=la;$a=da}else{ra=ca+4|0;ma=da;sa=ka;ka=fa;za=ea;wa=la;ab=ba;while(1){f:do if((c[ab>>2]|0)>>>0>Ia>>>0){bb=ka;cb=za;db=wa;eb=ma}else{if((c[ab+4>>2]|0)>>>0<Ia>>>0){bb=ka;cb=za;db=wa;eb=ma;break}fb=ab+20|0;gb=c[fb>>2]|0;do if(gb){if(!(ha|(aa|(gb&1|0)==0))){bb=ka;cb=za;db=wa;eb=ma;break f}if((gb&2|0)!=0?(hb=c[h>>2]|0,!((hb|l|0)==0|E&(hb|0)==10)):0){bb=ka;cb=za;db=wa;eb=ma;break f}do if(gb&16){if(ia){bb=ka;cb=za;db=wa;eb=ma;break f}if(Ov(Ia)|0){bb=ka;cb=za;db=wa;eb=ma;break f}hb=c[h>>2]|0;if((hb|0)==95)break;if(!(Ov(hb)|0)){bb=ka;cb=za;db=wa;eb=ma;break f}}while(0);hb=c[fb>>2]|0;if(!(hb&32))ib=hb;else{if(ia){hb=c[h>>2]|0;if((hb|0)==95){bb=ka;cb=za;db=wa;eb=ma;break f}else jb=hb}else{hb=(Ov(Ia)|0)==0;kb=c[h>>2]|0;if(hb|(kb|0)==95){bb=ka;cb=za;db=wa;eb=ma;break f}else jb=kb}if(Ov(jb)|0){bb=ka;cb=za;db=wa;eb=ma;break f}ib=c[fb>>2]|0}kb=c[h>>2]|0;do if((kb|0)!=0&(ga&(ib&64|0)!=0)){if(ia){lb=kb;mb=1}else{hb=(Ov(Ia)|0)!=0;lb=c[h>>2]|0;mb=hb}if((lb|0)==95)if(mb){bb=ka;cb=za;db=wa;eb=ma;break f}else break;else if(mb^(Ov(lb)|0)!=0)break;else{bb=ka;cb=za;db=wa;eb=ma;break f}}while(0);do if(c[fb>>2]&128){kb=c[h>>2]|0;if(ja|(kb|0)==0){bb=ka;cb=za;db=wa;eb=ma;break f}if(ia){nb=kb;ob=1}else{kb=(Ov(Ia)|0)!=0;nb=c[h>>2]|0;ob=kb}if((nb|0)==95)if(ob)break;else{bb=ka;cb=za;db=wa;eb=ma;break f}else if(ob^(Ov(nb)|0)!=0){bb=ka;cb=za;db=wa;eb=ma;break f}else break}while(0);kb=c[fb>>2]|0;do if(!(kb&4))pb=kb;else{if(c[a>>2]&2){pb=kb;break}if(!(Nv(Ia,c[ab+24>>2]|0)|0)){bb=ka;cb=za;db=wa;eb=ma;break f}pb=c[fb>>2]|0}while(0);do if(pb&4){if(!(c[a>>2]&2))break;kb=mv(Ia)|0;hb=ab+24|0;if(Nv(kb,c[hb>>2]|0)|0)break;kb=jv(Ia)|0;if(!(Nv(kb,c[hb>>2]|0)|0)){bb=ka;cb=za;db=wa;eb=ma;break f}}while(0);if(!(c[fb>>2]&8))break;if(rx(c[ab+28>>2]|0,Ia,c[a>>2]&2)|0){bb=ka;cb=za;db=wa;eb=ma;break f}}while(0);if(D){fb=c[ra>>2]|0;gb=0;do{c[ma+(gb<<2)>>2]=c[fb+(gb<<2)>>2];gb=gb+1|0}while((gb|0)!=(r|0))}gb=c[ab+16>>2]|0;do if(gb){fb=c[gb>>2]|0;if((fb|0)>-1){qb=fb;rb=gb}else break;do{if((qb|0)<(r|0))c[ma+(qb<<2)>>2]=W;rb=rb+4|0;qb=c[rb>>2]|0}while((qb|0)>-1)}while(0);gb=c[ab+12>>2]|0;fb=A+(gb<<3)|0;if((c[fb>>2]|0)>=(W|0)){hb=c[A+(gb<<3)+4>>2]|0;kb=c[hb>>2]|0;if(!(px(r,c[v>>2]|0,ma,kb)|0)){bb=ka;cb=za;db=wa;eb=ma;break}c[hb>>2]=ma;if((c[sa>>2]|0)!=(c[w>>2]|0)){bb=ka;cb=za;db=wa;eb=kb;break}if(D)sb=0;else{bb=W;cb=1;db=wa;eb=kb;break}while(1){c[o+(sb<<2)>>2]=c[ma+(sb<<2)>>2];sb=sb+1|0;if((sb|0)==(r|0)){bb=W;cb=1;db=wa;eb=kb;break f}}}kb=c[sa>>2]|0;c[wa>>2]=kb;hb=wa+4|0;tb=c[hb>>2]|0;c[hb>>2]=ma;c[fb>>2]=W;c[A+(gb<<3)+4>>2]=hb;do if((kb|0)==(c[w>>2]|0)){if((ka|0)==-1){if(!D){ub=W;vb=1;break}}else{if(!D){ub=ka;vb=za;break}if((c[ma>>2]|0)>(c[o>>2]|0)){ub=ka;vb=za;break}}wb=c[hb>>2]|0;xb=0;do{c[o+(xb<<2)>>2]=c[wb+(xb<<2)>>2];xb=xb+1|0}while((xb|0)<(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Yb=Ob;break}else{qb=Mb;ib=Nb;jb=Ob;l=l+32|0}}if(Wb){l=c[Wb>>2]|0;if((l|0)>-1){jb=l;l=Wb;while(1){c[Hb+(jb<<2)>>2]=ub;ib=l+4|0;jb=c[ib>>2]|0;if((jb|0)<=-1){Zb=ib;break}else l=ib}}else Zb=Wb}else Zb=0;if(!Yb){_b=Ya;$b=Zb;ac=ub;bc=Lb;cc=Xb;dc=0;ec=r;p=174}else{fc=Ya;gc=Zb;hc=ub;ic=Lb;jc=Xb;kc=Yb;lc=r;p=82}}else{_b=Ya;$b=0;ac=ub;bc=Lb;cc=bb;dc=0;ec=r;p=174}k:while(1){l:do if((p|0)==82){p=0;if((kc|0)==(c[Ha>>2]|0)){if((fc|0)>=(hc|0)){if(!(Sa&(fc|0)==(hc|0))){_b=fc;$b=gc;ac=hc;bc=ic;cc=jc;dc=kc;ec=lc;p=174;continue k}if(!(px(c[d>>2]|0,c[Ia>>2]|0,Hb,o)|0)){_b=fc;$b=gc;ac=fc;bc=ic;cc=jc;dc=kc;ec=lc;p=174;continue k}}if(Ta){_b=hc;$b=gc;ac=hc;bc=ic;cc=jc;dc=kc;ec=lc;p=174;continue k}if((c[d>>2]|0)>0)mc=0;else{_b=hc;$b=gc;ac=hc;bc=ic;cc=jc;dc=kc;ec=lc;p=174;continue k}while(1){c[o+(mc<<2)>>2]=c[Hb+(mc<<2)>>2];l=mc+1|0;if((l|0)<(c[d>>2]|0))mc=l;else{_b=hc;$b=gc;ac=hc;bc=ic;cc=jc;dc=kc;ec=lc;p=174;continue k}}}l=kc+8|0;do if(!(c[l>>2]|0))p=97;else{if(!(c[kc+20>>2]&256)){p=97;break}jb=c[kc+24>>2]|0;qx(jb+1|0,Ib,c[a>>2]&-9,j,Hb,hc);ib=c[Ib+(jb<<3)>>2]|0;qb=c[Ib+(jb<<3)+4>>2]|0;jb=qb-ib|0;if(iw(b+ib|0,lc+-1|0,jb)|0){_b=fc;$b=gc;ac=hc;bc=ic;cc=jc;dc=kc;ec=lc;p=174;continue k}mb=(qb|0)==(ib|0);ib=mb&1;qb=Jb+(c[kc+12>>2]<<2)|0;if(mb?(c[qb>>2]|0)!=0:0){_b=fc;$b=gc;ac=hc;bc=ic;cc=jc;dc=kc;ec=lc;p=174;continue k}c[qb>>2]=ib;ib=jb+-1|0;jb=lc+ib|0;qb=c[h>>2]|0;mb=hc+ic+ib|0;ib=zw(h,jb,4)|0;if((ib|0)<1)if((ib|0)<0){nc=2;oc=fc;pc=gc;qc=mb;rc=ib;sc=jc;tc=kc;uc=jb;break l}else vc=1;else vc=ib;wc=mb;xc=vc;yc=qb;zc=jb+vc|0}while(0);if((p|0)==97){p=0;jb=c[h>>2]|0;if(!jb){_b=fc;$b=gc;ac=hc;bc=ic;cc=jc;dc=kc;ec=lc;p=174;continue k}qb=hc+ic|0;mb=zw(h,lc,4)|0;if((mb|0)<1){if((mb|0)<0){nc=2;oc=fc;pc=gc;qc=qb;rc=mb;sc=jc;tc=kc;uc=lc;break}Ac=mb+1|0}else Ac=mb;wc=qb;xc=Ac;yc=jb;zc=lc+Ac|0}if(!(c[l>>2]|0)){_b=fc;$b=gc;ac=wc;bc=xc;cc=jc;dc=kc;ec=zc;p=174;continue k}jb=(wc|0)!=0;qb=(yc|0)==95;mb=(wc|0)==0;ib=La&(yc|0)==10;vb=_a&(wc|0)<1;pb=l;nb=0;rb=gc;lb=jc;ob=kc;m:while(1){n:do if((c[ob>>2]|0)>>>0>yc>>>0){Bc=nb;Cc=rb;Dc=lb}else{if((c[ob+4>>2]|0)>>>0<yc>>>0){Bc=nb;Cc=rb;Dc=lb;break}tb=ob+20|0;Ra=c[tb>>2]|0;do if(Ra){if(!(ib|(vb|(Ra&1|0)==0))){Bc=nb;Cc=rb;Dc=lb;break n}if((Ra&2|0)!=0?(sb=c[h>>2]|0,!((sb|z|0)==0|La&(sb|0)==10)):0){Bc=nb;Cc=rb;Dc=lb;break n}do if(Ra&16){if(qb){Bc=nb;Cc=rb;Dc=lb;break n}if(Ov(yc)|0){Bc=nb;Cc=rb;Dc=lb;break n}sb=c[h>>2]|0;if((sb|0)==95)break;if(!(Ov(sb)|0)){Bc=nb;Cc=rb;Dc=lb;break n}}while(0);sb=c[tb>>2]|0;if(!(sb&32))Ec=sb;else{if(qb){sb=c[h>>2]|0;if((sb|0)==95){Bc=nb;Cc=rb;Dc=lb;break n}else Fc=sb}else{sb=(Ov(yc)|0)==0;Ja=c[h>>2]|0;if(sb|(Ja|0)==95){Bc=nb;Cc=rb;Dc=lb;break n}else Fc=Ja}if(Ov(Fc)|0){Bc=nb;Cc=rb;Dc=lb;break n}Ec=c[tb>>2]|0}Ja=c[h>>2]|0;do if((Ja|0)!=0&(jb&(Ec&64|0)!=0)){if(qb){Gc=Ja;Hc=1}else{sb=(Ov(yc)|0)!=0;Gc=c[h>>2]|0;Hc=sb}if((Gc|0)==95)if(Hc){Bc=nb;Cc=rb;Dc=lb;break n}else break;else if(Hc^(Ov(Gc)|0)!=0)break;else{Bc=nb;Cc=rb;Dc=lb;break n}}while(0);do if(c[tb>>2]&128){Ja=c[h>>2]|0;if(mb|(Ja|0)==0){Bc=nb;Cc=rb;Dc=lb;break n}if(qb){Ic=Ja;Jc=1}else{Ja=(Ov(yc)|0)!=0;Ic=c[h>>2]|0;Jc=Ja}if((Ic|0)==95)if(Jc)break;else{Bc=nb;Cc=rb;Dc=lb;break n}else if(Jc^(Ov(Ic)|0)!=0){Bc=nb;Cc=rb;Dc=lb;break n}else break}while(0);Ja=c[tb>>2]|0;do if(!(Ja&4))Kc=Ja;else{if(c[a>>2]&2){Kc=Ja;break}if(!(Nv(yc,c[ob+24>>2]|0)|0)){Bc=nb;Cc=rb;Dc=lb;break n}Kc=c[tb>>2]|0}while(0);do if(Kc&4){if(!(c[a>>2]&2))break;Ja=mv(yc)|0;sb=ob+24|0;if(Nv(Ja,c[sb>>2]|0)|0)break;Ja=jv(yc)|0;if(!(Nv(Ja,c[sb>>2]|0)|0)){Bc=nb;Cc=rb;Dc=lb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Va)tx(Hb);if(!Ua)tx(Ib);if($a){nc=1;oc=fc;pc=Nc;qc=wc;rc=xc;sc=Oc;tc=kc;uc=zc;break}tx(Jb);nc=1;oc=fc;pc=Nc;qc=wc;rc=xc;sc=Oc;tc=kc;uc=zc;break}else if((p|0)==170){p=0;if(!Qc){_b=fc;$b=Rc;ac=wc;bc=xc;cc=Sc;dc=kc;ec=zc;p=174;continue k}if(!Rc){nc=0;oc=fc;pc=0;qc=wc;rc=xc;sc=Sc;tc=Qc;uc=zc;break}ob=c[Rc>>2]|0;if((ob|0)>-1){Tc=ob;Uc=Rc}else{nc=0;oc=fc;pc=Rc;qc=wc;rc=xc;sc=Sc;tc=Qc;uc=zc;break}while(1){ob=Uc+4|0;c[Hb+(Tc<<2)>>2]=wc;Tc=c[ob>>2]|0;if((Tc|0)<=-1){nc=0;oc=fc;pc=ob;qc=wc;rc=xc;sc=Sc;tc=Qc;uc=zc;break}else Uc=ob}}}else if((p|0)==174){p=0;ob=c[cc+24>>2]|0;if(!ob){if((_b|0)>-1|(c[h>>2]|0)==0){nc=27;oc=_b;pc=$b;qc=ac;rc=bc;sc=cc;tc=dc;uc=ec;break}c[h>>2]=A;nc=3;oc=_b;pc=$b;qc=ac;rc=bc;sc=cc;tc=dc;uc=r;break}lb=c[cc+8>>2]|0;if(c[lb+20>>2]&256)c[Jb+(c[cc+12>>2]<<2)>>2]=0;rb=c[cc>>2]|0;nb=c[cc+4>>2]|0;c[h>>2]=c[cc+16>>2];pb=c[d>>2]|0;if((pb|0)<=0){nc=0;oc=_b;pc=$b;qc=rb;rc=bc;sc=ob;tc=lb;uc=nb;break}qb=c[cc+20>>2]|0;mb=0;do{c[Hb+(mb<<2)>>2]=c[qb+(mb<<2)>>2];mb=mb+1|0}while((mb|0)!=(pb|0));nc=0;oc=_b;pc=$b;qc=rb;rc=bc;sc=ob;tc=lb;uc=nb}while(0);switch(nc|0){case 2:{Cb=0;Db=Ib;Eb=1;Fb=Jb;Gb=Hb;break h;break}case 27:{Vc=oc;p=184;break i;break}case 0:{fc=oc;gc=pc;hc=qc;ic=rc;jc=sc;kc=tc;lc=uc;p=82;break}case 3:{break k;break}default:{Ab=12;Bb=0;break g}}}Za=c[d>>2]|0;Ya=oc;db=rc;cb=ub;bb=sc;eb=uc}if((p|0)==56){mx(F);if(!Va)tx(Hb);if(!Ua)tx(Ib);if($a){Ab=12;Bb=0;break g}tx(Jb);Ab=12;Bb=0;break g}else if((p|0)==63){mx(F);if(!Va)tx(Hb);if(!Ua)tx(Ib);if($a){Ab=12;Bb=0;break g}tx(Jb);Ab=12;Bb=0;break g}else if((p|0)==184){Cb=Vc;Db=Ib;Eb=Vc>>>31;Fb=Jb;Gb=Hb;break}}while(0);mx(F);if(Gb)tx(Gb);if(Db)tx(Db);if(!Fb){Ab=Eb;Bb=Cb}else{tx(Fb);Ab=Eb;Bb=Cb}}else{Ab=12;Bb=0}while(0);yb=Bb;zb=Ab}if(!zb)qx(k,e,c[a>>2]|0,j,o,yb);if(!o)n=zb;else{tx(o);n=zb}}i=g;return n|0}function px(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0;a:do if((a|0)>0){f=0;while(1){g=c[d+(f<<2)>>2]|0;h=c[e+(f<<2)>>2]|0;if(!(c[b+(f<<2)>>2]|0)){if((g|0)<(h|0)){i=1;break a}if((g|0)>(h|0)){i=0;break a}}else{if((g|0)>(h|0)){i=1;break a}if((g|0)<(h|0)){i=0;break a}}f=f+1|0;if((f|0)>=(a|0)){i=0;break}}}else i=0;while(0);return i|0}function qx(a,b,d,e,f,g){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;if((d&8|0)==0&(g|0)>-1){d=c[e+16>>2]|0;h=e+28|0;i=c[h>>2]|0;j=(a|0)!=0;if(j&(i|0)!=0){k=e+48|0;e=0;do{l=c[d+(e*12|0)>>2]|0;if((l|0)==(c[k>>2]|0))m=g;else m=c[f+(l<<2)>>2]|0;l=b+(e<<3)|0;c[l>>2]=m;n=c[d+(e*12|0)+4>>2]|0;if((n|0)==(c[k>>2]|0))o=g;else o=c[f+(n<<2)>>2]|0;n=b+(e<<3)+4|0;c[n>>2]=o;if((m|0)==-1|(o|0)==-1){c[n>>2]=-1;c[l>>2]=-1}e=e+1|0;l=c[h>>2]|0}while(e>>>0<a>>>0&e>>>0<l>>>0);p=l}else p=i;if(j&(p|0)!=0){j=0;while(1){i=b+(j<<3)+4|0;e=c[d+(j*12|0)+8>>2]|0;if((e|0)!=0?(h=c[e>>2]|0,(h|0)>-1):0){o=b+(j<<3)|0;m=h;h=c[o>>2]|0;f=0;while(1){if((h|0)>=(c[b+(m<<3)>>2]|0)?(c[i>>2]|0)<=(c[b+(m<<3)+4>>2]|0):0)q=h;else{c[i>>2]=-1;c[o>>2]=-1;q=-1}f=f+1|0;m=c[e+(f<<2)>>2]|0;if((m|0)<=-1)break;else h=q}}h=j+1|0;if(h>>>0<a>>>0&h>>>0<p>>>0)j=h;else{r=h;break}}}else r=0}else r=0;if(r>>>0<a>>>0){j=r;do{c[b+(j<<3)>>2]=-1;c[b+(j<<3)+4>>2]=-1;j=j+1|0}while((j|0)!=(a|0))}return}function rx(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;e=c[a>>2]|0;a:do if(!e)f=0;else{g=(d|0)==0;h=a;i=e;while(1){if(g){if(Nv(b,i)|0){f=1;break a}}else{j=jv(b)|0;if(Nv(j,c[h>>2]|0)|0){f=1;break a}j=mv(b)|0;if(Nv(j,c[h>>2]|0)|0){f=1;break a}}h=h+4|0;i=c[h>>2]|0;if(!i){f=0;break}}}while(0);return f|0}function sx(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,Ma=0,Na=0,Oa=0;do if(a>>>0<245){b=a>>>0<11?16:a+11&-8;d=b>>>3;e=c[17791]|0;f=e>>>d;if(f&3){g=(f&1^1)+d|0;h=71204+(g<<1<<2)|0;i=h+8|0;j=c[i>>2]|0;k=j+8|0;l=c[k>>2]|0;do if((h|0)!=(l|0)){if(l>>>0<(c[17795]|0)>>>0)gb();m=l+12|0;if((c[m>>2]|0)==(j|0)){c[m>>2]=h;c[i>>2]=l;break}else gb()}else c[17791]=e&~(1<<g);while(0);l=g<<3;c[j+4>>2]=l|3;i=j+l+4|0;c[i>>2]=c[i>>2]|1;n=k;return n|0}i=c[17793]|0;if(b>>>0>i>>>0){if(f){l=2<<d;h=f<<d&(l|0-l);l=(h&0-h)+-1|0;h=l>>>12&16;m=l>>>h;l=m>>>5&8;o=m>>>l;m=o>>>2&4;p=o>>>m;o=p>>>1&2;q=p>>>o;p=q>>>1&1;r=(l|h|m|o|p)+(q>>>p)|0;p=71204+(r<<1<<2)|0;q=p+8|0;o=c[q>>2]|0;m=o+8|0;h=c[m>>2]|0;do if((p|0)!=(h|0)){if(h>>>0<(c[17795]|0)>>>0)gb();l=h+12|0;if((c[l>>2]|0)==(o|0)){c[l>>2]=p;c[q>>2]=h;s=c[17793]|0;break}else gb()}else{c[17791]=e&~(1<<r);s=i}while(0);i=(r<<3)-b|0;c[o+4>>2]=b|3;e=o+b|0;c[e+4>>2]=i|1;c[e+i>>2]=i;if(s){h=c[17796]|0;q=s>>>3;p=71204+(q<<1<<2)|0;d=c[17791]|0;f=1<<q;if(d&f){q=p+8|0;k=c[q>>2]|0;if(k>>>0<(c[17795]|0)>>>0)gb();else{t=q;u=k}}else{c[17791]=d|f;t=p+8|0;u=p}c[t>>2]=h;c[u+12>>2]=h;c[h+8>>2]=u;c[h+12>>2]=p}c[17793]=i;c[17796]=e;n=m;return n|0}e=c[17792]|0;if(e){i=(e&0-e)+-1|0;e=i>>>12&16;p=i>>>e;i=p>>>5&8;h=p>>>i;p=h>>>2&4;f=h>>>p;h=f>>>1&2;d=f>>>h;f=d>>>1&1;k=c[71468+((i|e|p|h|f)+(d>>>f)<<2)>>2]|0;f=(c[k+4>>2]&-8)-b|0;d=k;h=k;while(1){k=c[d+16>>2]|0;if(!k){p=c[d+20>>2]|0;if(!p){v=f;w=h;break}else x=p}else x=k;k=(c[x+4>>2]&-8)-b|0;p=k>>>0<f>>>0;f=p?k:f;d=x;h=p?x:h}h=c[17795]|0;if(w>>>0<h>>>0)gb();d=w+b|0;if(w>>>0>=d>>>0)gb();f=c[w+24>>2]|0;m=c[w+12>>2]|0;do if((m|0)==(w|0)){o=w+20|0;r=c[o>>2]|0;if(!r){p=w+16|0;k=c[p>>2]|0;if(!k){y=0;break}else{z=k;A=p}}else{z=r;A=o}while(1){o=z+20|0;r=c[o>>2]|0;if(r){z=r;A=o;continue}o=z+16|0;r=c[o>>2]|0;if(!r){B=z;C=A;break}else{z=r;A=o}}if(C>>>0<h>>>0)gb();else{c[C>>2]=0;y=B;break}}else{o=c[w+8>>2]|0;if(o>>>0<h>>>0)gb();r=o+12|0;if((c[r>>2]|0)!=(w|0))gb();p=m+8|0;if((c[p>>2]|0)==(w|0)){c[r>>2]=m;c[p>>2]=o;y=m;break}else gb()}while(0);do if(f){m=c[w+28>>2]|0;h=71468+(m<<2)|0;if((w|0)==(c[h>>2]|0)){c[h>>2]=y;if(!y){c[17792]=c[17792]&~(1<<m);break}}else{if(f>>>0<(c[17795]|0)>>>0)gb();m=f+16|0;if((c[m>>2]|0)==(w|0))c[m>>2]=y;else c[f+20>>2]=y;if(!y)break}m=c[17795]|0;if(y>>>0<m>>>0)gb();c[y+24>>2]=f;h=c[w+16>>2]|0;do if(h)if(h>>>0<m>>>0)gb();else{c[y+16>>2]=h;c[h+24>>2]=y;break}while(0);h=c[w+20>>2]|0;if(h)if(h>>>0<(c[17795]|0)>>>0)gb();else{c[y+20>>2]=h;c[h+24>>2]=y;break}}while(0);if(v>>>0<16){f=v+b|0;c[w+4>>2]=f|3;h=w+f+4|0;c[h>>2]=c[h>>2]|1}else{c[w+4>>2]=b|3;c[d+4>>2]=v|1;c[d+v>>2]=v;h=c[17793]|0;if(h){f=c[17796]|0;m=h>>>3;h=71204+(m<<1<<2)|0;o=c[17791]|0;p=1<<m;if(o&p){m=h+8|0;r=c[m>>2]|0;if(r>>>0<(c[17795]|0)>>>0)gb();else{D=m;E=r}}else{c[17791]=o|p;D=h+8|0;E=h}c[D>>2]=f;c[E+12>>2]=f;c[f+8>>2]=E;c[f+12>>2]=h}c[17793]=v;c[17796]=d}n=w+8|0;return n|0}else F=b}else F=b}else if(a>>>0<=4294967231){h=a+11|0;f=h&-8;p=c[17792]|0;if(p){o=0-f|0;r=h>>>8;if(r)if(f>>>0>16777215)G=31;else{h=(r+1048320|0)>>>16&8;m=r<<h;r=(m+520192|0)>>>16&4;k=m<<r;m=(k+245760|0)>>>16&2;e=14-(r|h|m)+(k<<m>>>15)|0;G=f>>>(e+7|0)&1|e<<1}else G=0;e=c[71468+(G<<2)>>2]|0;a:do if(!e){H=o;I=0;J=0;K=86}else{m=o;k=0;h=f<<((G|0)==31?0:25-(G>>>1)|0);r=e;i=0;while(1){q=c[r+4>>2]&-8;j=q-f|0;if(j>>>0<m>>>0)if((q|0)==(f|0)){L=j;M=r;N=r;K=90;break a}else{O=j;P=r}else{O=m;P=i}j=c[r+20>>2]|0;r=c[r+16+(h>>>31<<2)>>2]|0;q=(j|0)==0|(j|0)==(r|0)?k:j;j=(r|0)==0;if(j){H=O;I=q;J=P;K=86;break}else{m=O;k=q;h=h<<(j&1^1);i=P}}}while(0);if((K|0)==86){if((I|0)==0&(J|0)==0){e=2<<G;o=p&(e|0-e);if(!o){F=f;break}e=(o&0-o)+-1|0;o=e>>>12&16;b=e>>>o;e=b>>>5&8;d=b>>>e;b=d>>>2&4;i=d>>>b;d=i>>>1&2;h=i>>>d;i=h>>>1&1;Q=c[71468+((e|o|b|d|i)+(h>>>i)<<2)>>2]|0}else Q=I;if(!Q){R=H;S=J}else{L=H;M=Q;N=J;K=90}}if((K|0)==90)while(1){K=0;i=(c[M+4>>2]&-8)-f|0;h=i>>>0<L>>>0;d=h?i:L;i=h?M:N;h=c[M+16>>2]|0;if(h){L=d;M=h;N=i;K=90;continue}M=c[M+20>>2]|0;if(!M){R=d;S=i;break}else{L=d;N=i;K=90}}if((S|0)!=0?R>>>0<((c[17793]|0)-f|0)>>>0:0){p=c[17795]|0;if(S>>>0<p>>>0)gb();i=S+f|0;if(S>>>0>=i>>>0)gb();d=c[S+24>>2]|0;h=c[S+12>>2]|0;do if((h|0)==(S|0)){b=S+20|0;o=c[b>>2]|0;if(!o){e=S+16|0;k=c[e>>2]|0;if(!k){T=0;break}else{U=k;V=e}}else{U=o;V=b}while(1){b=U+20|0;o=c[b>>2]|0;if(o){U=o;V=b;continue}b=U+16|0;o=c[b>>2]|0;if(!o){W=U;X=V;break}else{U=o;V=b}}if(X>>>0<p>>>0)gb();else{c[X>>2]=0;T=W;break}}else{b=c[S+8>>2]|0;if(b>>>0<p>>>0)gb();o=b+12|0;if((c[o>>2]|0)!=(S|0))gb();e=h+8|0;if((c[e>>2]|0)==(S|0)){c[o>>2]=h;c[e>>2]=b;T=h;break}else gb()}while(0);do if(d){h=c[S+28>>2]|0;p=71468+(h<<2)|0;if((S|0)==(c[p>>2]|0)){c[p>>2]=T;if(!T){c[17792]=c[17792]&~(1<<h);break}}else{if(d>>>0<(c[17795]|0)>>>0)gb();h=d+16|0;if((c[h>>2]|0)==(S|0))c[h>>2]=T;else c[d+20>>2]=T;if(!T)break}h=c[17795]|0;if(T>>>0<h>>>0)gb();c[T+24>>2]=d;p=c[S+16>>2]|0;do if(p)if(p>>>0<h>>>0)gb();else{c[T+16>>2]=p;c[p+24>>2]=T;break}while(0);p=c[S+20>>2]|0;if(p)if(p>>>0<(c[17795]|0)>>>0)gb();else{c[T+20>>2]=p;c[p+24>>2]=T;break}}while(0);do if(R>>>0>=16){c[S+4>>2]=f|3;c[i+4>>2]=R|1;c[i+R>>2]=R;d=R>>>3;if(R>>>0<256){p=71204+(d<<1<<2)|0;h=c[17791]|0;b=1<<d;if(h&b){d=p+8|0;e=c[d>>2]|0;if(e>>>0<(c[17795]|0)>>>0)gb();else{Y=d;Z=e}}else{c[17791]=h|b;Y=p+8|0;Z=p}c[Y>>2]=i;c[Z+12>>2]=i;c[i+8>>2]=Z;c[i+12>>2]=p;break}p=R>>>8;if(p)if(R>>>0>16777215)_=31;else{b=(p+1048320|0)>>>16&8;h=p<<b;p=(h+520192|0)>>>16&4;e=h<<p;h=(e+245760|0)>>>16&2;d=14-(p|b|h)+(e<<h>>>15)|0;_=R>>>(d+7|0)&1|d<<1}else _=0;d=71468+(_<<2)|0;c[i+28>>2]=_;h=i+16|0;c[h+4>>2]=0;c[h>>2]=0;h=c[17792]|0;e=1<<_;if(!(h&e)){c[17792]=h|e;c[d>>2]=i;c[i+24>>2]=d;c[i+12>>2]=i;c[i+8>>2]=i;break}e=R<<((_|0)==31?0:25-(_>>>1)|0);h=c[d>>2]|0;while(1){if((c[h+4>>2]&-8|0)==(R|0)){$=h;K=148;break}d=h+16+(e>>>31<<2)|0;b=c[d>>2]|0;if(!b){aa=d;ba=h;K=145;break}else{e=e<<1;h=b}}if((K|0)==145)if(aa>>>0<(c[17795]|0)>>>0)gb();else{c[aa>>2]=i;c[i+24>>2]=ba;c[i+12>>2]=i;c[i+8>>2]=i;break}else if((K|0)==148){h=$+8|0;e=c[h>>2]|0;b=c[17795]|0;if(e>>>0>=b>>>0&$>>>0>=b>>>0){c[e+12>>2]=i;c[h>>2]=i;c[i+8>>2]=e;c[i+12>>2]=$;c[i+24>>2]=0;break}else gb()}}else{e=R+f|0;c[S+4>>2]=e|3;h=S+e+4|0;c[h>>2]=c[h>>2]|1}while(0);n=S+8|0;return n|0}else F=f}else F=f}else F=-1;while(0);S=c[17793]|0;if(S>>>0>=F>>>0){R=S-F|0;$=c[17796]|0;if(R>>>0>15){ba=$+F|0;c[17796]=ba;c[17793]=R;c[ba+4>>2]=R|1;c[ba+R>>2]=R;c[$+4>>2]=F|3}else{c[17793]=0;c[17796]=0;c[$+4>>2]=S|3;R=$+S+4|0;c[R>>2]=c[R>>2]|1}n=$+8|0;return n|0}$=c[17794]|0;if($>>>0>F>>>0){R=$-F|0;c[17794]=R;$=c[17797]|0;S=$+F|0;c[17797]=S;c[S+4>>2]=R|1;c[$+4>>2]=F|3;n=$+8|0;return n|0}do if(!(c[17909]|0)){$=La(30)|0;if(!($+-1&$)){c[17911]=$;c[17910]=$;c[17912]=-1;c[17913]=-1;c[17914]=0;c[17902]=0;c[17909]=(jb(0)|0)&-16^1431655768;break}else gb()}while(0);$=F+48|0;R=c[17911]|0;S=F+47|0;ba=R+S|0;aa=0-R|0;R=ba&aa;if(R>>>0<=F>>>0){n=0;return n|0}_=c[17901]|0;if((_|0)!=0?(Z=c[17899]|0,Y=Z+R|0,Y>>>0<=Z>>>0|Y>>>0>_>>>0):0){n=0;return n|0}b:do if(!(c[17902]&4)){_=c[17797]|0;c:do if(_){Y=71612;while(1){Z=c[Y>>2]|0;if(Z>>>0<=_>>>0?(T=Y+4|0,(Z+(c[T>>2]|0)|0)>>>0>_>>>0):0){ca=Y;da=T;break}Y=c[Y+8>>2]|0;if(!Y){K=173;break c}}Y=ba-(c[17794]|0)&aa;if(Y>>>0<2147483647){T=Ea(Y|0)|0;if((T|0)==((c[ca>>2]|0)+(c[da>>2]|0)|0)){if((T|0)!=(-1|0)){ea=T;fa=Y;K=193;break b}}else{ga=T;ha=Y;K=183}}}else K=173;while(0);do if((K|0)==173?(_=Ea(0)|0,(_|0)!=(-1|0)):0){f=_;Y=c[17910]|0;T=Y+-1|0;if(!(T&f))ia=R;else ia=R-f+(T+f&0-Y)|0;Y=c[17899]|0;f=Y+ia|0;if(ia>>>0>F>>>0&ia>>>0<2147483647){T=c[17901]|0;if((T|0)!=0?f>>>0<=Y>>>0|f>>>0>T>>>0:0)break;T=Ea(ia|0)|0;if((T|0)==(_|0)){ea=_;fa=ia;K=193;break b}else{ga=T;ha=ia;K=183}}}while(0);d:do if((K|0)==183){T=0-ha|0;do if($>>>0>ha>>>0&(ha>>>0<2147483647&(ga|0)!=(-1|0))?(_=c[17911]|0,f=S-ha+_&0-_,f>>>0<2147483647):0)if((Ea(f|0)|0)==(-1|0)){Ea(T|0)|0;break d}else{ja=f+ha|0;break}else ja=ha;while(0);if((ga|0)!=(-1|0)){ea=ga;fa=ja;K=193;break b}}while(0);c[17902]=c[17902]|4;K=190}else K=190;while(0);if((((K|0)==190?R>>>0<2147483647:0)?(ja=Ea(R|0)|0,R=Ea(0)|0,ja>>>0<R>>>0&((ja|0)!=(-1|0)&(R|0)!=(-1|0))):0)?(ga=R-ja|0,ga>>>0>(F+40|0)>>>0):0){ea=ja;fa=ga;K=193}if((K|0)==193){ga=(c[17899]|0)+fa|0;c[17899]=ga;if(ga>>>0>(c[17900]|0)>>>0)c[17900]=ga;ga=c[17797]|0;do if(ga){ja=71612;do{R=c[ja>>2]|0;ha=ja+4|0;S=c[ha>>2]|0;if((ea|0)==(R+S|0)){ka=R;la=ha;ma=S;na=ja;K=203;break}ja=c[ja+8>>2]|0}while((ja|0)!=0);if(((K|0)==203?(c[na+12>>2]&8|0)==0:0)?ga>>>0<ea>>>0&ga>>>0>=ka>>>0:0){c[la>>2]=ma+fa;ja=ga+8|0;S=(ja&7|0)==0?0:0-ja&7;ja=ga+S|0;ha=fa-S+(c[17794]|0)|0;c[17797]=ja;c[17794]=ha;c[ja+4>>2]=ha|1;c[ja+ha+4>>2]=40;c[17798]=c[17913];break}ha=c[17795]|0;if(ea>>>0<ha>>>0){c[17795]=ea;oa=ea}else oa=ha;ha=ea+fa|0;ja=71612;while(1){if((c[ja>>2]|0)==(ha|0)){pa=ja;qa=ja;K=211;break}ja=c[ja+8>>2]|0;if(!ja){ra=71612;break}}if((K|0)==211)if(!(c[qa+12>>2]&8)){c[pa>>2]=ea;ja=qa+4|0;c[ja>>2]=(c[ja>>2]|0)+fa;ja=ea+8|0;S=ea+((ja&7|0)==0?0:0-ja&7)|0;ja=ha+8|0;R=ha+((ja&7|0)==0?0:0-ja&7)|0;ja=S+F|0;$=R-S-F|0;c[S+4>>2]=F|3;do if((R|0)!=(ga|0)){if((R|0)==(c[17796]|0)){ia=(c[17793]|0)+$|0;c[17793]=ia;c[17796]=ja;c[ja+4>>2]=ia|1;c[ja+ia>>2]=ia;break}ia=c[R+4>>2]|0;if((ia&3|0)==1){da=ia&-8;ca=ia>>>3;e:do if(ia>>>0>=256){aa=c[R+24>>2]|0;ba=c[R+12>>2]|0;do if((ba|0)==(R|0)){T=R+16|0;f=T+4|0;_=c[f>>2]|0;if(!_){Y=c[T>>2]|0;if(!Y){sa=0;break}else{ta=Y;ua=T}}else{ta=_;ua=f}while(1){f=ta+20|0;_=c[f>>2]|0;if(_){ta=_;ua=f;continue}f=ta+16|0;_=c[f>>2]|0;if(!_){va=ta;wa=ua;break}else{ta=_;ua=f}}if(wa>>>0<oa>>>0)gb();else{c[wa>>2]=0;sa=va;break}}else{f=c[R+8>>2]|0;if(f>>>0<oa>>>0)gb();_=f+12|0;if((c[_>>2]|0)!=(R|0))gb();T=ba+8|0;if((c[T>>2]|0)==(R|0)){c[_>>2]=ba;c[T>>2]=f;sa=ba;break}else gb()}while(0);if(!aa)break;ba=c[R+28>>2]|0;f=71468+(ba<<2)|0;do if((R|0)!=(c[f>>2]|0)){if(aa>>>0<(c[17795]|0)>>>0)gb();T=aa+16|0;if((c[T>>2]|0)==(R|0))c[T>>2]=sa;else c[aa+20>>2]=sa;if(!sa)break e}else{c[f>>2]=sa;if(sa)break;c[17792]=c[17792]&~(1<<ba);break e}while(0);ba=c[17795]|0;if(sa>>>0<ba>>>0)gb();c[sa+24>>2]=aa;f=R+16|0;T=c[f>>2]|0;do if(T)if(T>>>0<ba>>>0)gb();else{c[sa+16>>2]=T;c[T+24>>2]=sa;break}while(0);T=c[f+4>>2]|0;if(!T)break;if(T>>>0<(c[17795]|0)>>>0)gb();else{c[sa+20>>2]=T;c[T+24>>2]=sa;break}}else{T=c[R+8>>2]|0;ba=c[R+12>>2]|0;aa=71204+(ca<<1<<2)|0;do if((T|0)!=(aa|0)){if(T>>>0<oa>>>0)gb();if((c[T+12>>2]|0)==(R|0))break;gb()}while(0);if((ba|0)==(T|0)){c[17791]=c[17791]&~(1<<ca);break}do if((ba|0)==(aa|0))xa=ba+8|0;else{if(ba>>>0<oa>>>0)gb();f=ba+8|0;if((c[f>>2]|0)==(R|0)){xa=f;break}gb()}while(0);c[T+12>>2]=ba;c[xa>>2]=T}while(0);ya=R+da|0;za=da+$|0}else{ya=R;za=$}ca=ya+4|0;c[ca>>2]=c[ca>>2]&-2;c[ja+4>>2]=za|1;c[ja+za>>2]=za;ca=za>>>3;if(za>>>0<256){ia=71204+(ca<<1<<2)|0;aa=c[17791]|0;f=1<<ca;do if(!(aa&f)){c[17791]=aa|f;Aa=ia+8|0;Ba=ia}else{ca=ia+8|0;_=c[ca>>2]|0;if(_>>>0>=(c[17795]|0)>>>0){Aa=ca;Ba=_;break}gb()}while(0);c[Aa>>2]=ja;c[Ba+12>>2]=ja;c[ja+8>>2]=Ba;c[ja+12>>2]=ia;break}f=za>>>8;do if(!f)Ca=0;else{if(za>>>0>16777215){Ca=31;break}aa=(f+1048320|0)>>>16&8;da=f<<aa;_=(da+520192|0)>>>16&4;ca=da<<_;da=(ca+245760|0)>>>16&2;Y=14-(_|aa|da)+(ca<<da>>>15)|0;Ca=za>>>(Y+7|0)&1|Y<<1}while(0);f=71468+(Ca<<2)|0;c[ja+28>>2]=Ca;ia=ja+16|0;c[ia+4>>2]=0;c[ia>>2]=0;ia=c[17792]|0;Y=1<<Ca;if(!(ia&Y)){c[17792]=ia|Y;c[f>>2]=ja;c[ja+24>>2]=f;c[ja+12>>2]=ja;c[ja+8>>2]=ja;break}Y=za<<((Ca|0)==31?0:25-(Ca>>>1)|0);ia=c[f>>2]|0;while(1){if((c[ia+4>>2]&-8|0)==(za|0)){Da=ia;K=281;break}f=ia+16+(Y>>>31<<2)|0;da=c[f>>2]|0;if(!da){Fa=f;Ga=ia;K=278;break}else{Y=Y<<1;ia=da}}if((K|0)==278)if(Fa>>>0<(c[17795]|0)>>>0)gb();else{c[Fa>>2]=ja;c[ja+24>>2]=Ga;c[ja+12>>2]=ja;c[ja+8>>2]=ja;break}else if((K|0)==281){ia=Da+8|0;Y=c[ia>>2]|0;da=c[17795]|0;if(Y>>>0>=da>>>0&Da>>>0>=da>>>0){c[Y+12>>2]=ja;c[ia>>2]=ja;c[ja+8>>2]=Y;c[ja+12>>2]=Da;c[ja+24>>2]=0;break}else gb()}}else{Y=(c[17794]|0)+$|0;c[17794]=Y;c[17797]=ja;c[ja+4>>2]=Y|1}while(0);n=S+8|0;return n|0}else ra=71612;while(1){ja=c[ra>>2]|0;if(ja>>>0<=ga>>>0?($=ja+(c[ra+4>>2]|0)|0,$>>>0>ga>>>0):0){Ha=$;break}ra=c[ra+8>>2]|0}S=Ha+-47|0;$=S+8|0;ja=S+(($&7|0)==0?0:0-$&7)|0;$=ga+16|0;S=ja>>>0<$>>>0?ga:ja;ja=S+8|0;R=ea+8|0;ha=(R&7|0)==0?0:0-R&7;R=ea+ha|0;Y=fa+-40-ha|0;c[17797]=R;c[17794]=Y;c[R+4>>2]=Y|1;c[R+Y+4>>2]=40;c[17798]=c[17913];Y=S+4|0;c[Y>>2]=27;c[ja>>2]=c[17903];c[ja+4>>2]=c[17904];c[ja+8>>2]=c[17905];c[ja+12>>2]=c[17906];c[17903]=ea;c[17904]=fa;c[17906]=0;c[17905]=ja;ja=S+24|0;do{ja=ja+4|0;c[ja>>2]=7}while((ja+4|0)>>>0<Ha>>>0);if((S|0)!=(ga|0)){ja=S-ga|0;c[Y>>2]=c[Y>>2]&-2;c[ga+4>>2]=ja|1;c[S>>2]=ja;R=ja>>>3;if(ja>>>0<256){ha=71204+(R<<1<<2)|0;ia=c[17791]|0;da=1<<R;if(ia&da){R=ha+8|0;f=c[R>>2]|0;if(f>>>0<(c[17795]|0)>>>0)gb();else{Ia=R;Ja=f}}else{c[17791]=ia|da;Ia=ha+8|0;Ja=ha}c[Ia>>2]=ga;c[Ja+12>>2]=ga;c[ga+8>>2]=Ja;c[ga+12>>2]=ha;break}ha=ja>>>8;if(ha)if(ja>>>0>16777215)Ka=31;else{da=(ha+1048320|0)>>>16&8;ia=ha<<da;ha=(ia+520192|0)>>>16&4;f=ia<<ha;ia=(f+245760|0)>>>16&2;R=14-(ha|da|ia)+(f<<ia>>>15)|0;Ka=ja>>>(R+7|0)&1|R<<1}else Ka=0;R=71468+(Ka<<2)|0;c[ga+28>>2]=Ka;c[ga+20>>2]=0;c[$>>2]=0;ia=c[17792]|0;f=1<<Ka;if(!(ia&f)){c[17792]=ia|f;c[R>>2]=ga;c[ga+24>>2]=R;c[ga+12>>2]=ga;c[ga+8>>2]=ga;break}f=ja<<((Ka|0)==31?0:25-(Ka>>>1)|0);ia=c[R>>2]|0;while(1){if((c[ia+4>>2]&-8|0)==(ja|0)){Ma=ia;K=307;break}R=ia+16+(f>>>31<<2)|0;da=c[R>>2]|0;if(!da){Na=R;Oa=ia;K=304;break}else{f=f<<1;ia=da}}if((K|0)==304)if(Na>>>0<(c[17795]|0)>>>0)gb();else{c[Na>>2]=ga;c[ga+24>>2]=Oa;c[ga+12>>2]=ga;c[ga+8>>2]=ga;break}else if((K|0)==307){ia=Ma+8|0;f=c[ia>>2]|0;ja=c[17795]|0;if(f>>>0>=ja>>>0&Ma>>>0>=ja>>>0){c[f+12>>2]=ga;c[ia>>2]=ga;c[ga+8>>2]=f;c[ga+12>>2]=Ma;c[ga+24>>2]=0;break}else gb()}}}else{f=c[17795]|0;if((f|0)==0|ea>>>0<f>>>0)c[17795]=ea;c[17903]=ea;c[17904]=fa;c[17906]=0;c[17800]=c[17909];c[17799]=-1;f=0;do{ia=71204+(f<<1<<2)|0;c[ia+12>>2]=ia;c[ia+8>>2]=ia;f=f+1|0}while((f|0)!=32);f=ea+8|0;ia=(f&7|0)==0?0:0-f&7;f=ea+ia|0;ja=fa+-40-ia|0;c[17797]=f;c[17794]=ja;c[f+4>>2]=ja|1;c[f+ja+4>>2]=40;c[17798]=c[17913]}while(0);fa=c[17794]|0;if(fa>>>0>F>>>0){ea=fa-F|0;c[17794]=ea;fa=c[17797]|0;ga=fa+F|0;c[17797]=ga;c[ga+4>>2]=ea|1;c[fa+4>>2]=F|3;n=fa+8|0;return n|0}}c[(Yu()|0)>>2]=12;n=0;return n|0}function tx(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0;if(!a)return;b=a+-8|0;d=c[17795]|0;if(b>>>0<d>>>0)gb();e=c[a+-4>>2]|0;a=e&3;if((a|0)==1)gb();f=e&-8;g=b+f|0;do if(!(e&1)){h=c[b>>2]|0;if(!a)return;i=b+(0-h)|0;j=h+f|0;if(i>>>0<d>>>0)gb();if((i|0)==(c[17796]|0)){k=g+4|0;l=c[k>>2]|0;if((l&3|0)!=3){m=i;n=j;break}c[17793]=j;c[k>>2]=l&-2;c[i+4>>2]=j|1;c[i+j>>2]=j;return}l=h>>>3;if(h>>>0<256){h=c[i+8>>2]|0;k=c[i+12>>2]|0;o=71204+(l<<1<<2)|0;if((h|0)!=(o|0)){if(h>>>0<d>>>0)gb();if((c[h+12>>2]|0)!=(i|0))gb()}if((k|0)==(h|0)){c[17791]=c[17791]&~(1<<l);m=i;n=j;break}if((k|0)!=(o|0)){if(k>>>0<d>>>0)gb();o=k+8|0;if((c[o>>2]|0)==(i|0))p=o;else gb()}else p=k+8|0;c[h+12>>2]=k;c[p>>2]=h;m=i;n=j;break}h=c[i+24>>2]|0;k=c[i+12>>2]|0;do if((k|0)==(i|0)){o=i+16|0;l=o+4|0;q=c[l>>2]|0;if(!q){r=c[o>>2]|0;if(!r){s=0;break}else{t=r;u=o}}else{t=q;u=l}while(1){l=t+20|0;q=c[l>>2]|0;if(q){t=q;u=l;continue}l=t+16|0;q=c[l>>2]|0;if(!q){v=t;w=u;break}else{t=q;u=l}}if(w>>>0<d>>>0)gb();else{c[w>>2]=0;s=v;break}}else{l=c[i+8>>2]|0;if(l>>>0<d>>>0)gb();q=l+12|0;if((c[q>>2]|0)!=(i|0))gb();o=k+8|0;if((c[o>>2]|0)==(i|0)){c[q>>2]=k;c[o>>2]=l;s=k;break}else gb()}while(0);if(h){k=c[i+28>>2]|0;l=71468+(k<<2)|0;if((i|0)==(c[l>>2]|0)){c[l>>2]=s;if(!s){c[17792]=c[17792]&~(1<<k);m=i;n=j;break}}else{if(h>>>0<(c[17795]|0)>>>0)gb();k=h+16|0;if((c[k>>2]|0)==(i|0))c[k>>2]=s;else c[h+20>>2]=s;if(!s){m=i;n=j;break}}k=c[17795]|0;if(s>>>0<k>>>0)gb();c[s+24>>2]=h;l=i+16|0;o=c[l>>2]|0;do if(o)if(o>>>0<k>>>0)gb();else{c[s+16>>2]=o;c[o+24>>2]=s;break}while(0);o=c[l+4>>2]|0;if(o)if(o>>>0<(c[17795]|0)>>>0)gb();else{c[s+20>>2]=o;c[o+24>>2]=s;m=i;n=j;break}else{m=i;n=j}}else{m=i;n=j}}else{m=b;n=f}while(0);if(m>>>0>=g>>>0)gb();f=g+4|0;b=c[f>>2]|0;if(!(b&1))gb();if(!(b&2)){if((g|0)==(c[17797]|0)){s=(c[17794]|0)+n|0;c[17794]=s;c[17797]=m;c[m+4>>2]=s|1;if((m|0)!=(c[17796]|0))return;c[17796]=0;c[17793]=0;return}if((g|0)==(c[17796]|0)){s=(c[17793]|0)+n|0;c[17793]=s;c[17796]=m;c[m+4>>2]=s|1;c[m+s>>2]=s;return}s=(b&-8)+n|0;d=b>>>3;do if(b>>>0>=256){v=c[g+24>>2]|0;w=c[g+12>>2]|0;do if((w|0)==(g|0)){u=g+16|0;t=u+4|0;p=c[t>>2]|0;if(!p){a=c[u>>2]|0;if(!a){x=0;break}else{y=a;z=u}}else{y=p;z=t}while(1){t=y+20|0;p=c[t>>2]|0;if(p){y=p;z=t;continue}t=y+16|0;p=c[t>>2]|0;if(!p){A=y;B=z;break}else{y=p;z=t}}if(B>>>0<(c[17795]|0)>>>0)gb();else{c[B>>2]=0;x=A;break}}else{t=c[g+8>>2]|0;if(t>>>0<(c[17795]|0)>>>0)gb();p=t+12|0;if((c[p>>2]|0)!=(g|0))gb();u=w+8|0;if((c[u>>2]|0)==(g|0)){c[p>>2]=w;c[u>>2]=t;x=w;break}else gb()}while(0);if(v){w=c[g+28>>2]|0;j=71468+(w<<2)|0;if((g|0)==(c[j>>2]|0)){c[j>>2]=x;if(!x){c[17792]=c[17792]&~(1<<w);break}}else{if(v>>>0<(c[17795]|0)>>>0)gb();w=v+16|0;if((c[w>>2]|0)==(g|0))c[w>>2]=x;else c[v+20>>2]=x;if(!x)break}w=c[17795]|0;if(x>>>0<w>>>0)gb();c[x+24>>2]=v;j=g+16|0;i=c[j>>2]|0;do if(i)if(i>>>0<w>>>0)gb();else{c[x+16>>2]=i;c[i+24>>2]=x;break}while(0);i=c[j+4>>2]|0;if(i)if(i>>>0<(c[17795]|0)>>>0)gb();else{c[x+20>>2]=i;c[i+24>>2]=x;break}}}else{i=c[g+8>>2]|0;w=c[g+12>>2]|0;v=71204+(d<<1<<2)|0;if((i|0)!=(v|0)){if(i>>>0<(c[17795]|0)>>>0)gb();if((c[i+12>>2]|0)!=(g|0))gb()}if((w|0)==(i|0)){c[17791]=c[17791]&~(1<<d);break}if((w|0)!=(v|0)){if(w>>>0<(c[17795]|0)>>>0)gb();v=w+8|0;if((c[v>>2]|0)==(g|0))C=v;else gb()}else C=w+8|0;c[i+12>>2]=w;c[C>>2]=i}while(0);c[m+4>>2]=s|1;c[m+s>>2]=s;if((m|0)==(c[17796]|0)){c[17793]=s;return}else D=s}else{c[f>>2]=b&-2;c[m+4>>2]=n|1;c[m+n>>2]=n;D=n}n=D>>>3;if(D>>>0<256){b=71204+(n<<1<<2)|0;f=c[17791]|0;s=1<<n;if(f&s){n=b+8|0;C=c[n>>2]|0;if(C>>>0<(c[17795]|0)>>>0)gb();else{E=n;F=C}}else{c[17791]=f|s;E=b+8|0;F=b}c[E>>2]=m;c[F+12>>2]=m;c[m+8>>2]=F;c[m+12>>2]=b;return}b=D>>>8;if(b)if(D>>>0>16777215)G=31;else{F=(b+1048320|0)>>>16&8;E=b<<F;b=(E+520192|0)>>>16&4;s=E<<b;E=(s+245760|0)>>>16&2;f=14-(b|F|E)+(s<<E>>>15)|0;G=D>>>(f+7|0)&1|f<<1}else G=0;f=71468+(G<<2)|0;c[m+28>>2]=G;c[m+20>>2]=0;c[m+16>>2]=0;E=c[17792]|0;s=1<<G;do if(E&s){F=D<<((G|0)==31?0:25-(G>>>1)|0);b=c[f>>2]|0;while(1){if((c[b+4>>2]&-8|0)==(D|0)){H=b;I=130;break}C=b+16+(F>>>31<<2)|0;n=c[C>>2]|0;if(!n){J=C;K=b;I=127;break}else{F=F<<1;b=n}}if((I|0)==127)if(J>>>0<(c[17795]|0)>>>0)gb();else{c[J>>2]=m;c[m+24>>2]=K;c[m+12>>2]=m;c[m+8>>2]=m;break}else if((I|0)==130){b=H+8|0;F=c[b>>2]|0;j=c[17795]|0;if(F>>>0>=j>>>0&H>>>0>=j>>>0){c[F+12>>2]=m;c[b>>2]=m;c[m+8>>2]=F;c[m+12>>2]=H;c[m+24>>2]=0;break}else gb()}}else{c[17792]=E|s;c[f>>2]=m;c[m+24>>2]=f;c[m+12>>2]=m;c[m+8>>2]=m}while(0);m=(c[17799]|0)+-1|0;c[17799]=m;if(!m)L=71620;else return;while(1){m=c[L>>2]|0;if(!m)break;else L=m+8|0}c[17799]=-1;return}function ux(a,b){a=a|0;b=b|0;var d=0,e=0;if(a){d=_(b,a)|0;if((b|a)>>>0>65535)e=((d>>>0)/(a>>>0)|0|0)==(b|0)?d:-1;else e=d}else e=0;d=sx(e)|0;if(!d)return d|0;if(!(c[d+-4>>2]&3))return d|0;Fx(d|0,0,e|0)|0;return d|0}function vx(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;if(!a){d=sx(b)|0;return d|0}if(b>>>0>4294967231){c[(Yu()|0)>>2]=12;d=0;return d|0}e=wx(a+-8|0,b>>>0<11?16:b+11&-8)|0;if(e){d=e+8|0;return d|0}e=sx(b)|0;if(!e){d=0;return d|0}f=c[a+-4>>2]|0;g=(f&-8)-((f&3|0)==0?8:4)|0;Dx(e|0,a|0,(g>>>0<b>>>0?g:b)|0)|0;tx(a);d=e;return d|0}function wx(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0;d=a+4|0;e=c[d>>2]|0;f=e&-8;g=a+f|0;h=c[17795]|0;i=e&3;if(!((i|0)!=1&a>>>0>=h>>>0&a>>>0<g>>>0))gb();j=c[g+4>>2]|0;if(!(j&1))gb();if(!i){if(b>>>0<256){k=0;return k|0}if(f>>>0>=(b+4|0)>>>0?(f-b|0)>>>0<=c[17911]<<1>>>0:0){k=a;return k|0}k=0;return k|0}if(f>>>0>=b>>>0){i=f-b|0;if(i>>>0<=15){k=a;return k|0}l=a+b|0;c[d>>2]=e&1|b|2;c[l+4>>2]=i|3;m=l+i+4|0;c[m>>2]=c[m>>2]|1;xx(l,i);k=a;return k|0}if((g|0)==(c[17797]|0)){i=(c[17794]|0)+f|0;if(i>>>0<=b>>>0){k=0;return k|0}l=i-b|0;i=a+b|0;c[d>>2]=e&1|b|2;c[i+4>>2]=l|1;c[17797]=i;c[17794]=l;k=a;return k|0}if((g|0)==(c[17796]|0)){l=(c[17793]|0)+f|0;if(l>>>0<b>>>0){k=0;return k|0}i=l-b|0;if(i>>>0>15){m=a+b|0;n=m+i|0;c[d>>2]=e&1|b|2;c[m+4>>2]=i|1;c[n>>2]=i;o=n+4|0;c[o>>2]=c[o>>2]&-2;p=m;q=i}else{c[d>>2]=e&1|l|2;i=a+l+4|0;c[i>>2]=c[i>>2]|1;p=0;q=0}c[17793]=q;c[17796]=p;k=a;return k|0}if(j&2){k=0;return k|0}p=(j&-8)+f|0;if(p>>>0<b>>>0){k=0;return k|0}f=p-b|0;q=j>>>3;do if(j>>>0>=256){i=c[g+24>>2]|0;l=c[g+12>>2]|0;do if((l|0)==(g|0)){m=g+16|0;o=m+4|0;n=c[o>>2]|0;if(!n){r=c[m>>2]|0;if(!r){s=0;break}else{t=r;u=m}}else{t=n;u=o}while(1){o=t+20|0;n=c[o>>2]|0;if(n){t=n;u=o;continue}o=t+16|0;n=c[o>>2]|0;if(!n){v=t;w=u;break}else{t=n;u=o}}if(w>>>0<h>>>0)gb();else{c[w>>2]=0;s=v;break}}else{o=c[g+8>>2]|0;if(o>>>0<h>>>0)gb();n=o+12|0;if((c[n>>2]|0)!=(g|0))gb();m=l+8|0;if((c[m>>2]|0)==(g|0)){c[n>>2]=l;c[m>>2]=o;s=l;break}else gb()}while(0);if(i){l=c[g+28>>2]|0;o=71468+(l<<2)|0;if((g|0)==(c[o>>2]|0)){c[o>>2]=s;if(!s){c[17792]=c[17792]&~(1<<l);break}}else{if(i>>>0<(c[17795]|0)>>>0)gb();l=i+16|0;if((c[l>>2]|0)==(g|0))c[l>>2]=s;else c[i+20>>2]=s;if(!s)break}l=c[17795]|0;if(s>>>0<l>>>0)gb();c[s+24>>2]=i;o=g+16|0;m=c[o>>2]|0;do if(m)if(m>>>0<l>>>0)gb();else{c[s+16>>2]=m;c[m+24>>2]=s;break}while(0);m=c[o+4>>2]|0;if(m)if(m>>>0<(c[17795]|0)>>>0)gb();else{c[s+20>>2]=m;c[m+24>>2]=s;break}}}else{m=c[g+8>>2]|0;l=c[g+12>>2]|0;i=71204+(q<<1<<2)|0;if((m|0)!=(i|0)){if(m>>>0<h>>>0)gb();if((c[m+12>>2]|0)!=(g|0))gb()}if((l|0)==(m|0)){c[17791]=c[17791]&~(1<<q);break}if((l|0)!=(i|0)){if(l>>>0<h>>>0)gb();i=l+8|0;if((c[i>>2]|0)==(g|0))x=i;else gb()}else x=l+8|0;c[m+12>>2]=l;c[x>>2]=m}while(0);if(f>>>0<16){c[d>>2]=p|e&1|2;x=a+p+4|0;c[x>>2]=c[x>>2]|1;k=a;return k|0}else{x=a+b|0;c[d>>2]=e&1|b|2;c[x+4>>2]=f|3;b=x+f+4|0;c[b>>2]=c[b>>2]|1;xx(x,f);k=a;return k|0}return 0}function xx(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0;d=a+b|0;e=c[a+4>>2]|0;do if(!(e&1)){f=c[a>>2]|0;if(!(e&3))return;g=a+(0-f)|0;h=f+b|0;i=c[17795]|0;if(g>>>0<i>>>0)gb();if((g|0)==(c[17796]|0)){j=d+4|0;k=c[j>>2]|0;if((k&3|0)!=3){l=g;m=h;break}c[17793]=h;c[j>>2]=k&-2;c[g+4>>2]=h|1;c[g+h>>2]=h;return}k=f>>>3;if(f>>>0<256){f=c[g+8>>2]|0;j=c[g+12>>2]|0;n=71204+(k<<1<<2)|0;if((f|0)!=(n|0)){if(f>>>0<i>>>0)gb();if((c[f+12>>2]|0)!=(g|0))gb()}if((j|0)==(f|0)){c[17791]=c[17791]&~(1<<k);l=g;m=h;break}if((j|0)!=(n|0)){if(j>>>0<i>>>0)gb();n=j+8|0;if((c[n>>2]|0)==(g|0))o=n;else gb()}else o=j+8|0;c[f+12>>2]=j;c[o>>2]=f;l=g;m=h;break}f=c[g+24>>2]|0;j=c[g+12>>2]|0;do if((j|0)==(g|0)){n=g+16|0;k=n+4|0;p=c[k>>2]|0;if(!p){q=c[n>>2]|0;if(!q){r=0;break}else{s=q;t=n}}else{s=p;t=k}while(1){k=s+20|0;p=c[k>>2]|0;if(p){s=p;t=k;continue}k=s+16|0;p=c[k>>2]|0;if(!p){u=s;v=t;break}else{s=p;t=k}}if(v>>>0<i>>>0)gb();else{c[v>>2]=0;r=u;break}}else{k=c[g+8>>2]|0;if(k>>>0<i>>>0)gb();p=k+12|0;if((c[p>>2]|0)!=(g|0))gb();n=j+8|0;if((c[n>>2]|0)==(g|0)){c[p>>2]=j;c[n>>2]=k;r=j;break}else gb()}while(0);if(f){j=c[g+28>>2]|0;i=71468+(j<<2)|0;if((g|0)==(c[i>>2]|0)){c[i>>2]=r;if(!r){c[17792]=c[17792]&~(1<<j);l=g;m=h;break}}else{if(f>>>0<(c[17795]|0)>>>0)gb();j=f+16|0;if((c[j>>2]|0)==(g|0))c[j>>2]=r;else c[f+20>>2]=r;if(!r){l=g;m=h;break}}j=c[17795]|0;if(r>>>0<j>>>0)gb();c[r+24>>2]=f;i=g+16|0;k=c[i>>2]|0;do if(k)if(k>>>0<j>>>0)gb();else{c[r+16>>2]=k;c[k+24>>2]=r;break}while(0);k=c[i+4>>2]|0;if(k)if(k>>>0<(c[17795]|0)>>>0)gb();else{c[r+20>>2]=k;c[k+24>>2]=r;l=g;m=h;break}else{l=g;m=h}}else{l=g;m=h}}else{l=a;m=b}while(0);b=c[17795]|0;if(d>>>0<b>>>0)gb();a=d+4|0;r=c[a>>2]|0;if(!(r&2)){if((d|0)==(c[17797]|0)){u=(c[17794]|0)+m|0;c[17794]=u;c[17797]=l;c[l+4>>2]=u|1;if((l|0)!=(c[17796]|0))return;c[17796]=0;c[17793]=0;return}if((d|0)==(c[17796]|0)){u=(c[17793]|0)+m|0;c[17793]=u;c[17796]=l;c[l+4>>2]=u|1;c[l+u>>2]=u;return}u=(r&-8)+m|0;v=r>>>3;do if(r>>>0>=256){t=c[d+24>>2]|0;s=c[d+12>>2]|0;do if((s|0)==(d|0)){o=d+16|0;e=o+4|0;k=c[e>>2]|0;if(!k){j=c[o>>2]|0;if(!j){w=0;break}else{x=j;y=o}}else{x=k;y=e}while(1){e=x+20|0;k=c[e>>2]|0;if(k){x=k;y=e;continue}e=x+16|0;k=c[e>>2]|0;if(!k){z=x;A=y;break}else{x=k;y=e}}if(A>>>0<b>>>0)gb();else{c[A>>2]=0;w=z;break}}else{e=c[d+8>>2]|0;if(e>>>0<b>>>0)gb();k=e+12|0;if((c[k>>2]|0)!=(d|0))gb();o=s+8|0;if((c[o>>2]|0)==(d|0)){c[k>>2]=s;c[o>>2]=e;w=s;break}else gb()}while(0);if(t){s=c[d+28>>2]|0;h=71468+(s<<2)|0;if((d|0)==(c[h>>2]|0)){c[h>>2]=w;if(!w){c[17792]=c[17792]&~(1<<s);break}}else{if(t>>>0<(c[17795]|0)>>>0)gb();s=t+16|0;if((c[s>>2]|0)==(d|0))c[s>>2]=w;else c[t+20>>2]=w;if(!w)break}s=c[17795]|0;if(w>>>0<s>>>0)gb();c[w+24>>2]=t;h=d+16|0;g=c[h>>2]|0;do if(g)if(g>>>0<s>>>0)gb();else{c[w+16>>2]=g;c[g+24>>2]=w;break}while(0);g=c[h+4>>2]|0;if(g)if(g>>>0<(c[17795]|0)>>>0)gb();else{c[w+20>>2]=g;c[g+24>>2]=w;break}}}else{g=c[d+8>>2]|0;s=c[d+12>>2]|0;t=71204+(v<<1<<2)|0;if((g|0)!=(t|0)){if(g>>>0<b>>>0)gb();if((c[g+12>>2]|0)!=(d|0))gb()}if((s|0)==(g|0)){c[17791]=c[17791]&~(1<<v);break}if((s|0)!=(t|0)){if(s>>>0<b>>>0)gb();t=s+8|0;if((c[t>>2]|0)==(d|0))B=t;else gb()}else B=s+8|0;c[g+12>>2]=s;c[B>>2]=g}while(0);c[l+4>>2]=u|1;c[l+u>>2]=u;if((l|0)==(c[17796]|0)){c[17793]=u;return}else C=u}else{c[a>>2]=r&-2;c[l+4>>2]=m|1;c[l+m>>2]=m;C=m}m=C>>>3;if(C>>>0<256){r=71204+(m<<1<<2)|0;a=c[17791]|0;u=1<<m;if(a&u){m=r+8|0;B=c[m>>2]|0;if(B>>>0<(c[17795]|0)>>>0)gb();else{D=m;E=B}}else{c[17791]=a|u;D=r+8|0;E=r}c[D>>2]=l;c[E+12>>2]=l;c[l+8>>2]=E;c[l+12>>2]=r;return}r=C>>>8;if(r)if(C>>>0>16777215)F=31;else{E=(r+1048320|0)>>>16&8;D=r<<E;r=(D+520192|0)>>>16&4;u=D<<r;D=(u+245760|0)>>>16&2;a=14-(r|E|D)+(u<<D>>>15)|0;F=C>>>(a+7|0)&1|a<<1}else F=0;a=71468+(F<<2)|0;c[l+28>>2]=F;c[l+20>>2]=0;c[l+16>>2]=0;D=c[17792]|0;u=1<<F;if(!(D&u)){c[17792]=D|u;c[a>>2]=l;c[l+24>>2]=a;c[l+12>>2]=l;c[l+8>>2]=l;return}u=C<<((F|0)==31?0:25-(F>>>1)|0);F=c[a>>2]|0;while(1){if((c[F+4>>2]&-8|0)==(C|0)){G=F;H=127;break}a=F+16+(u>>>31<<2)|0;D=c[a>>2]|0;if(!D){I=a;J=F;H=124;break}else{u=u<<1;F=D}}if((H|0)==124){if(I>>>0<(c[17795]|0)>>>0)gb();c[I>>2]=l;c[l+24>>2]=J;c[l+12>>2]=l;c[l+8>>2]=l;return}else if((H|0)==127){H=G+8|0;J=c[H>>2]|0;I=c[17795]|0;if(!(J>>>0>=I>>>0&G>>>0>=I>>>0))gb();c[J+12>>2]=l;c[H>>2]=l;c[l+8>>2]=J;c[l+12>>2]=G;c[l+24>>2]=0;return}}function yx(){}function zx(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0;e=b-d>>>0;e=b-d-(c>>>0>a>>>0|0)>>>0;return (C=e,a-c>>>0|0)|0}function Ax(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0;e=a+c>>>0;return (C=b+d+(e>>>0<a>>>0|0)>>>0,e|0)|0}function Bx(a,b,c){a=a|0;b=b|0;c=c|0;if((c|0)<32){C=b>>c;return a>>>c|(b&(1<<c)-1)<<32-c}C=(b|0)<0?-1:0;return b>>c-32|0}function Cx(a,b,c){a=a|0;b=b|0;c=c|0;if((c|0)<32){C=b>>>c;return a>>>c|(b&(1<<c)-1)<<32-c}C=0;return b>>>c-32|0}function Dx(b,d,e){b=b|0;d=d|0;e=e|0;var f=0;if((e|0)>=4096)return Pa(b|0,d|0,e|0)|0;f=b|0;if((b&3)==(d&3)){while(b&3){if(!e)return f|0;a[b>>0]=a[d>>0]|0;b=b+1|0;d=d+1|0;e=e-1|0}while((e|0)>=4){c[b>>2]=c[d>>2];b=b+4|0;d=d+4|0;e=e-4|0}}while((e|0)>0){a[b>>0]=a[d>>0]|0;b=b+1|0;d=d+1|0;e=e-1|0}return f|0}function Ex(b,c,d){b=b|0;c=c|0;d=d|0;var e=0;if((c|0)<(b|0)&(b|0)<(c+d|0)){e=b;c=c+d|0;b=b+d|0;while((d|0)>0){b=b-1|0;c=c-1|0;d=d-1|0;a[b>>0]=a[c>>0]|0}b=e}else Dx(b,c,d)|0;return b|0}function Fx(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0;f=b+e|0;if((e|0)>=20){d=d&255;g=b&3;h=d|d<<8|d<<16|d<<24;i=f&~3;if(g){g=b+4-g|0;while((b|0)<(g|0)){a[b>>0]=d;b=b+1|0}}while((b|0)<(i|0)){c[b>>2]=h;b=b+4|0}}while((b|0)<(f|0)){a[b>>0]=d;b=b+1|0}return b-e|0}function Gx(b){b=b|0;var c=0;c=a[m+(b&255)>>0]|0;if((c|0)<8)return c|0;c=a[m+(b>>8&255)>>0]|0;if((c|0)<8)return c+8|0;c=a[m+(b>>16&255)>>0]|0;if((c|0)<8)return c+16|0;return (a[m+(b>>>24)>>0]|0)+24|0}function Hx(a){a=a|0;return (a&255)<<24|(a>>8&255)<<16|(a>>16&255)<<8|a>>>24|0}function Ix(a,b,c){a=a|0;b=b|0;c=c|0;if((c|0)<32){C=b<<c|(a&(1<<c)-1<<32-c)>>>32-c;return a<<c}C=a<<c-32;return 0}function Jx(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0;c=a&65535;d=b&65535;e=_(d,c)|0;f=a>>>16;a=(e>>>16)+(_(d,f)|0)|0;d=b>>>16;b=_(d,c)|0;return (C=(a>>>16)+(_(d,f)|0)+(((a&65535)+b|0)>>>16)|0,a+b<<16|e&65535|0)|0}function Kx(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;e=b>>31|((b|0)<0?-1:0)<<1;f=((b|0)<0?-1:0)>>31|((b|0)<0?-1:0)<<1;g=d>>31|((d|0)<0?-1:0)<<1;h=((d|0)<0?-1:0)>>31|((d|0)<0?-1:0)<<1;i=zx(e^a|0,f^b|0,e|0,f|0)|0;b=C;a=g^e;e=h^f;return zx((Px(i,b,zx(g^c|0,h^d|0,g|0,h|0)|0,C,0)|0)^a|0,C^e|0,a|0,e|0)|0}function Lx(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0;f=i;i=i+16|0;g=f|0;h=b>>31|((b|0)<0?-1:0)<<1;j=((b|0)<0?-1:0)>>31|((b|0)<0?-1:0)<<1;k=e>>31|((e|0)<0?-1:0)<<1;l=((e|0)<0?-1:0)>>31|((e|0)<0?-1:0)<<1;m=zx(h^a|0,j^b|0,h|0,j|0)|0;b=C;Px(m,b,zx(k^d|0,l^e|0,k|0,l|0)|0,C,g)|0;l=zx(c[g>>2]^h|0,c[g+4>>2]^j|0,h|0,j|0)|0;j=C;i=f;return (C=j,l)|0}function Mx(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0;e=a;a=c;c=Jx(e,a)|0;f=C;return (C=(_(b,a)|0)+(_(d,e)|0)+f|f&0,c|0|0)|0}function Nx(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return Px(a,b,c,d,0)|0}function Ox(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0;f=i;i=i+16|0;g=f|0;Px(a,b,d,e,g)|0;i=f;return (C=c[g+4>>2]|0,c[g>>2]|0)|0}function Px(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,D=0,E=0,F=0,G=0,H=0;g=a;h=b;i=h;j=d;k=e;l=k;if(!i){m=(f|0)!=0;if(!l){if(m){c[f>>2]=(g>>>0)%(j>>>0);c[f+4>>2]=0}n=0;o=(g>>>0)/(j>>>0)>>>0;return (C=n,o)|0}else{if(!m){n=0;o=0;return (C=n,o)|0}c[f>>2]=a|0;c[f+4>>2]=b&0;n=0;o=0;return (C=n,o)|0}}m=(l|0)==0;do if(j){if(!m){p=(aa(l|0)|0)-(aa(i|0)|0)|0;if(p>>>0<=31){q=p+1|0;r=31-p|0;s=p-31>>31;t=q;u=g>>>(q>>>0)&s|i<<r;v=i>>>(q>>>0)&s;w=0;x=g<<r;break}if(!f){n=0;o=0;return (C=n,o)|0}c[f>>2]=a|0;c[f+4>>2]=h|b&0;n=0;o=0;return (C=n,o)|0}r=j-1|0;if(r&j){s=(aa(j|0)|0)+33-(aa(i|0)|0)|0;q=64-s|0;p=32-s|0;y=p>>31;z=s-32|0;A=z>>31;t=s;u=p-1>>31&i>>>(z>>>0)|(i<<p|g>>>(s>>>0))&A;v=A&i>>>(s>>>0);w=g<<q&y;x=(i<<q|g>>>(z>>>0))&y|g<<p&s-33>>31;break}if(f){c[f>>2]=r&g;c[f+4>>2]=0}if((j|0)==1){n=h|b&0;o=a|0|0;return (C=n,o)|0}else{r=Gx(j|0)|0;n=i>>>(r>>>0)|0;o=i<<32-r|g>>>(r>>>0)|0;return (C=n,o)|0}}else{if(m){if(f){c[f>>2]=(i>>>0)%(j>>>0);c[f+4>>2]=0}n=0;o=(i>>>0)/(j>>>0)>>>0;return (C=n,o)|0}if(!g){if(f){c[f>>2]=0;c[f+4>>2]=(i>>>0)%(l>>>0)}n=0;o=(i>>>0)/(l>>>0)>>>0;return (C=n,o)|0}r=l-1|0;if(!(r&l)){if(f){c[f>>2]=a|0;c[f+4>>2]=r&i|b&0}n=0;o=i>>>((Gx(l|0)|0)>>>0);return (C=n,o)|0}r=(aa(l|0)|0)-(aa(i|0)|0)|0;if(r>>>0<=30){s=r+1|0;p=31-r|0;t=s;u=i<<p|g>>>(s>>>0);v=i>>>(s>>>0);w=0;x=g<<p;break}if(!f){n=0;o=0;return (C=n,o)|0}c[f>>2]=a|0;c[f+4>>2]=h|b&0;n=0;o=0;return (C=n,o)|0}while(0);if(!t){B=x;D=w;E=v;F=u;G=0;H=0}else{b=d|0|0;d=k|e&0;e=Ax(b|0,d|0,-1,-1)|0;k=C;h=x;x=w;w=v;v=u;u=t;t=0;do{a=h;h=x>>>31|h<<1;x=t|x<<1;g=v<<1|a>>>31|0;a=v>>>31|w<<1|0;zx(e|0,k|0,g|0,a|0)|0;i=C;l=i>>31|((i|0)<0?-1:0)<<1;t=l&1;v=zx(g|0,a|0,l&b|0,(((i|0)<0?-1:0)>>31|((i|0)<0?-1:0)<<1)&d|0)|0;w=C;u=u-1|0}while((u|0)!=0);B=h;D=x;E=w;F=v;G=0;H=t}t=D;D=0;if(f){c[f>>2]=F;c[f+4>>2]=E}n=(t|0)>>>31|(B|D)<<1|(D<<1|t>>>31)&0|G;o=(t<<1|0>>>31)&-2|H;return (C=n,o)|0}function Qx(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return vb[a&63](b|0,c|0,d|0)|0}function Rx(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;wb[a&15](b|0,c|0,d|0,e|0,f|0)}function Sx(a,b){a=a|0;b=b|0;xb[a&15](b|0)}function Tx(a,b,c){a=a|0;b=b|0;c=c|0;yb[a&7](b|0,c|0)}function Ux(a,b){a=a|0;b=b|0;return zb[a&15](b|0)|0}function Vx(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;Ab[a&7](b|0,c|0,d|0)}function Wx(a){a=a|0;Bb[a&3]()}function Xx(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return Cb[a&7](b|0,c|0,d|0,e|0)|0}function Yx(a,b,c,d,e,f,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;Db[a&1](b|0,c|0,d|0,e|0,f|0,g|0)}function Zx(a,b,c){a=a|0;b=b|0;c=c|0;return Eb[a&7](b|0,c|0)|0}function _x(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;Fb[a&1](b|0,c|0,d|0,e|0)}function $x(a,b,c){a=a|0;b=b|0;c=c|0;ba(0);return 0}function ay(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;ba(1)}function by(a){a=a|0;ba(2)}function cy(a,b){a=a|0;b=b|0;ba(3)}function dy(a){a=a|0;ba(4);return 0}function ey(a,b,c){a=a|0;b=b|0;c=c|0;ba(5)}function fy(){ba(6)}function gy(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;ba(7);return 0}function hy(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;ba(8)}function iy(a,b){a=a|0;b=b|0;ba(9);return 0}function jy(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;ba(10)}
+function jn(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0;g=i;i=i+64|0;h=g;j=g+36|0;k=g+32|0;l=g+28|0;m=g+24|0;n=g+20|0;o=g+16|0;p=g+12|0;q=g+8|0;r=g+4|0;s=g+56|0;t=g+55|0;u=g+54|0;v=g+53|0;w=g+52|0;x=g+51|0;y=g+50|0;z=g+49|0;A=g+48|0;B=g+47|0;C=g+46|0;D=g+45|0;E=g+44|0;F=g+43|0;G=g+42|0;H=g+41|0;I=g+40|0;c[k>>2]=b;c[l>>2]=e;c[m>>2]=f;a[s>>0]=0;a[t>>0]=0;a[u>>0]=0;a[v>>0]=0;a[w>>0]=0;a[x>>0]=0;a[y>>0]=0;a[z>>0]=0;a[A>>0]=0;a[B>>0]=0;a[C>>0]=0;a[D>>0]=0;a[E>>0]=0;a[F>>0]=0;a[G>>0]=0;a[H>>0]=0;if(((c[m>>2]|0)-16|16|0)!=16){c[j>>2]=44;J=c[j>>2]|0;i=g;return J|0}if((c[17704]|0)==0?(c[17704]=1,c[17705]=kn()|0,(c[17705]|0)!=0):0){c[h>>2]=c[17705];Af(43706,h)}if(c[17705]|0){c[j>>2]=50;J=c[j>>2]|0;i=g;return J|0}if(a[c[l>>2]>>0]|0){a[I>>0]=a[43710+((d[c[l>>2]>>0]|0)-1)>>0]|0;a[s>>0]=d[s>>0]^d[43965+((d[I>>0]|0)+0)>>0];a[t>>0]=d[t>>0]^d[43965+((d[I>>0]|0)+45)>>0];a[u>>0]=d[u>>0]^d[43965+((d[I>>0]|0)+1)>>0];a[v>>0]=d[v>>0]^d[43965+((d[I>>0]|0)+45)>>0]}if(a[(c[l>>2]|0)+1>>0]|0){a[I>>0]=a[43710+((d[(c[l>>2]|0)+1>>0]|0)-1)>>0]|0;a[s>>0]=d[s>>0]^d[43965+((d[I>>0]|0)+45)>>0];a[t>>0]=d[t>>0]^d[43965+((d[I>>0]|0)+164)>>0];a[u>>0]=d[u>>0]^d[43965+((d[I>>0]|0)+68)>>0];a[v>>0]=d[v>>0]^d[43965+((d[I>>0]|0)+138)>>0]}if(a[(c[l>>2]|0)+2>>0]|0){a[I>>0]=a[43710+((d[(c[l>>2]|0)+2>>0]|0)-1)>>0]|0;a[s>>0]=d[s>>0]^d[43965+((d[I>>0]|0)+138)>>0];a[t>>0]=d[t>>0]^d[43965+((d[I>>0]|0)+213)>>0];a[u>>0]=d[u>>0]^d[43965+((d[I>>0]|0)+191)>>0];a[v>>0]=d[v>>0]^d[43965+((d[I>>0]|0)+209)>>0]}if(a[(c[l>>2]|0)+3>>0]|0){a[I>>0]=a[43710+((d[(c[l>>2]|0)+3>>0]|0)-1)>>0]|0;a[s>>0]=d[s>>0]^d[43965+((d[I>>0]|0)+209)>>0];a[t>>0]=d[t>>0]^d[43965+((d[I>>0]|0)+127)>>0];a[u>>0]=d[u>>0]^d[43965+((d[I>>0]|0)+61)>>0];a[v>>0]=d[v>>0]^d[43965+((d[I>>0]|0)+153)>>0]}if(a[(c[l>>2]|0)+4>>0]|0){a[I>>0]=a[43710+((d[(c[l>>2]|0)+4>>0]|0)-1)>>0]|0;a[s>>0]=d[s>>0]^d[43965+((d[I>>0]|0)+153)>>0];a[t>>0]=d[t>>0]^d[43965+((d[I>>0]|0)+70)>>0];a[u>>0]=d[u>>0]^d[43965+((d[I>>0]|0)+102)>>0];a[v>>0]=d[v>>0]^d[43965+((d[I>>0]|0)+150)>>0]}if(a[(c[l>>2]|0)+5>>0]|0){a[I>>0]=a[43710+((d[(c[l>>2]|0)+5>>0]|0)-1)>>0]|0;a[s>>0]=d[s>>0]^d[43965+((d[I>>0]|0)+150)>>0];a[t>>0]=d[t>>0]^d[43965+((d[I>>0]|0)+60)>>0];a[u>>0]=d[u>>0]^d[43965+((d[I>>0]|0)+91)>>0];a[v>>0]=d[v>>0]^d[43965+((d[I>>0]|0)+237)>>0]}if(a[(c[l>>2]|0)+6>>0]|0){a[I>>0]=a[43710+((d[(c[l>>2]|0)+6>>0]|0)-1)>>0]|0;a[s>>0]=d[s>>0]^d[43965+((d[I>>0]|0)+237)>>0];a[t>>0]=d[t>>0]^d[43965+((d[I>>0]|0)+55)>>0];a[u>>0]=d[u>>0]^d[43965+((d[I>>0]|0)+79)>>0];a[v>>0]=d[v>>0]^d[43965+((d[I>>0]|0)+224)>>0]}if(a[(c[l>>2]|0)+7>>0]|0){a[I>>0]=a[43710+((d[(c[l>>2]|0)+7>>0]|0)-1)>>0]|0;a[s>>0]=d[s>>0]^d[43965+((d[I>>0]|0)+224)>>0];a[t>>0]=d[t>>0]^d[43965+((d[I>>0]|0)+208)>>0];a[u>>0]=d[u>>0]^d[43965+((d[I>>0]|0)+140)>>0];a[v>>0]=d[v>>0]^d[43965+((d[I>>0]|0)+23)>>0]}if(a[(c[l>>2]|0)+8>>0]|0){a[I>>0]=a[43710+((d[(c[l>>2]|0)+8>>0]|0)-1)>>0]|0;a[w>>0]=d[w>>0]^d[43965+((d[I>>0]|0)+0)>>0];a[x>>0]=d[x>>0]^d[43965+((d[I>>0]|0)+45)>>0];a[y>>0]=d[y>>0]^d[43965+((d[I>>0]|0)+1)>>0];a[z>>0]=d[z>>0]^d[43965+((d[I>>0]|0)+45)>>0]}if(a[(c[l>>2]|0)+9>>0]|0){a[I>>0]=a[43710+((d[(c[l>>2]|0)+9>>0]|0)-1)>>0]|0;a[w>>0]=d[w>>0]^d[43965+((d[I>>0]|0)+45)>>0];a[x>>0]=d[x>>0]^d[43965+((d[I>>0]|0)+164)>>0];a[y>>0]=d[y>>0]^d[43965+((d[I>>0]|0)+68)>>0];a[z>>0]=d[z>>0]^d[43965+((d[I>>0]|0)+138)>>0]}if(a[(c[l>>2]|0)+10>>0]|0){a[I>>0]=a[43710+((d[(c[l>>2]|0)+10>>0]|0)-1)>>0]|0;a[w>>0]=d[w>>0]^d[43965+((d[I>>0]|0)+138)>>0];a[x>>0]=d[x>>0]^d[43965+((d[I>>0]|0)+213)>>0];a[y>>0]=d[y>>0]^d[43965+((d[I>>0]|0)+191)>>0];a[z>>0]=d[z>>0]^d[43965+((d[I>>0]|0)+209)>>0]}if(a[(c[l>>2]|0)+11>>0]|0){a[I>>0]=a[43710+((d[(c[l>>2]|0)+11>>0]|0)-1)>>0]|0;a[w>>0]=d[w>>0]^d[43965+((d[I>>0]|0)+209)>>0];a[x>>0]=d[x>>0]^d[43965+((d[I>>0]|0)+127)>>0];a[y>>0]=d[y>>0]^d[43965+((d[I>>0]|0)+61)>>0];a[z>>0]=d[z>>0]^d[43965+((d[I>>0]|0)+153)>>0]}if(a[(c[l>>2]|0)+12>>0]|0){a[I>>0]=a[43710+((d[(c[l>>2]|0)+12>>0]|0)-1)>>0]|0;a[w>>0]=d[w>>0]^d[43965+((d[I>>0]|0)+153)>>0];a[x>>0]=d[x>>0]^d[43965+((d[I>>0]|0)+70)>>0];a[y>>0]=d[y>>0]^d[43965+((d[I>>0]|0)+102)>>0];a[z>>0]=d[z>>0]^d[43965+((d[I>>0]|0)+150)>>0]}if(a[(c[l>>2]|0)+13>>0]|0){a[I>>0]=a[43710+((d[(c[l>>2]|0)+13>>0]|0)-1)>>0]|0;a[w>>0]=d[w>>0]^d[43965+((d[I>>0]|0)+150)>>0];a[x>>0]=d[x>>0]^d[43965+((d[I>>0]|0)+60)>>0];a[y>>0]=d[y>>0]^d[43965+((d[I>>0]|0)+91)>>0];a[z>>0]=d[z>>0]^d[43965+((d[I>>0]|0)+237)>>0]}if(a[(c[l>>2]|0)+14>>0]|0){a[I>>0]=a[43710+((d[(c[l>>2]|0)+14>>0]|0)-1)>>0]|0;a[w>>0]=d[w>>0]^d[43965+((d[I>>0]|0)+237)>>0];a[x>>0]=d[x>>0]^d[43965+((d[I>>0]|0)+55)>>0];a[y>>0]=d[y>>0]^d[43965+((d[I>>0]|0)+79)>>0];a[z>>0]=d[z>>0]^d[43965+((d[I>>0]|0)+224)>>0]}if(a[(c[l>>2]|0)+15>>0]|0){a[I>>0]=a[43710+((d[(c[l>>2]|0)+15>>0]|0)-1)>>0]|0;a[w>>0]=d[w>>0]^d[43965+((d[I>>0]|0)+224)>>0];a[x>>0]=d[x>>0]^d[43965+((d[I>>0]|0)+208)>>0];a[y>>0]=d[y>>0]^d[43965+((d[I>>0]|0)+140)>>0];a[z>>0]=d[z>>0]^d[43965+((d[I>>0]|0)+23)>>0]}if((c[m>>2]|0)==32){if(a[(c[l>>2]|0)+16>>0]|0){a[I>>0]=a[43710+((d[(c[l>>2]|0)+16>>0]|0)-1)>>0]|0;a[A>>0]=d[A>>0]^d[43965+((d[I>>0]|0)+0)>>0];a[B>>0]=d[B>>0]^d[43965+((d[I>>0]|0)+45)>>0];a[C>>0]=d[C>>0]^d[43965+((d[I>>0]|0)+1)>>0];a[D>>0]=d[D>>0]^d[43965+((d[I>>0]|0)+45)>>0]}if(a[(c[l>>2]|0)+17>>0]|0){a[I>>0]=a[43710+((d[(c[l>>2]|0)+17>>0]|0)-1)>>0]|0;a[A>>0]=d[A>>0]^d[43965+((d[I>>0]|0)+45)>>0];a[B>>0]=d[B>>0]^d[43965+((d[I>>0]|0)+164)>>0];a[C>>0]=d[C>>0]^d[43965+((d[I>>0]|0)+68)>>0];a[D>>0]=d[D>>0]^d[43965+((d[I>>0]|0)+138)>>0]}if(a[(c[l>>2]|0)+18>>0]|0){a[I>>0]=a[43710+((d[(c[l>>2]|0)+18>>0]|0)-1)>>0]|0;a[A>>0]=d[A>>0]^d[43965+((d[I>>0]|0)+138)>>0];a[B>>0]=d[B>>0]^d[43965+((d[I>>0]|0)+213)>>0];a[C>>0]=d[C>>0]^d[43965+((d[I>>0]|0)+191)>>0];a[D>>0]=d[D>>0]^d[43965+((d[I>>0]|0)+209)>>0]}if(a[(c[l>>2]|0)+19>>0]|0){a[I>>0]=a[43710+((d[(c[l>>2]|0)+19>>0]|0)-1)>>0]|0;a[A>>0]=d[A>>0]^d[43965+((d[I>>0]|0)+209)>>0];a[B>>0]=d[B>>0]^d[43965+((d[I>>0]|0)+127)>>0];a[C>>0]=d[C>>0]^d[43965+((d[I>>0]|0)+61)>>0];a[D>>0]=d[D>>0]^d[43965+((d[I>>0]|0)+153)>>0]}if(a[(c[l>>2]|0)+20>>0]|0){a[I>>0]=a[43710+((d[(c[l>>2]|0)+20>>0]|0)-1)>>0]|0;a[A>>0]=d[A>>0]^d[43965+((d[I>>0]|0)+153)>>0];a[B>>0]=d[B>>0]^d[43965+((d[I>>0]|0)+70)>>0];a[C>>0]=d[C>>0]^d[43965+((d[I>>0]|0)+102)>>0];a[D>>0]=d[D>>0]^d[43965+((d[I>>0]|0)+150)>>0]}if(a[(c[l>>2]|0)+21>>0]|0){a[I>>0]=a[43710+((d[(c[l>>2]|0)+21>>0]|0)-1)>>0]|0;a[A>>0]=d[A>>0]^d[43965+((d[I>>0]|0)+150)>>0];a[B>>0]=d[B>>0]^d[43965+((d[I>>0]|0)+60)>>0];a[C>>0]=d[C>>0]^d[43965+((d[I>>0]|0)+91)>>0];a[D>>0]=d[D>>0]^d[43965+((d[I>>0]|0)+237)>>0]}if(a[(c[l>>2]|0)+22>>0]|0){a[I>>0]=a[43710+((d[(c[l>>2]|0)+22>>0]|0)-1)>>0]|0;a[A>>0]=d[A>>0]^d[43965+((d[I>>0]|0)+237)>>0];a[B>>0]=d[B>>0]^d[43965+((d[I>>0]|0)+55)>>0];a[C>>0]=d[C>>0]^d[43965+((d[I>>0]|0)+79)>>0];a[D>>0]=d[D>>0]^d[43965+((d[I>>0]|0)+224)>>0]}if(a[(c[l>>2]|0)+23>>0]|0){a[I>>0]=a[43710+((d[(c[l>>2]|0)+23>>0]|0)-1)>>0]|0;a[A>>0]=d[A>>0]^d[43965+((d[I>>0]|0)+224)>>0];a[B>>0]=d[B>>0]^d[43965+((d[I>>0]|0)+208)>>0];a[C>>0]=d[C>>0]^d[43965+((d[I>>0]|0)+140)>>0];a[D>>0]=d[D>>0]^d[43965+((d[I>>0]|0)+23)>>0]}if(a[(c[l>>2]|0)+24>>0]|0){a[I>>0]=a[43710+((d[(c[l>>2]|0)+24>>0]|0)-1)>>0]|0;a[E>>0]=d[E>>0]^d[43965+((d[I>>0]|0)+0)>>0];a[F>>0]=d[F>>0]^d[43965+((d[I>>0]|0)+45)>>0];a[G>>0]=d[G>>0]^d[43965+((d[I>>0]|0)+1)>>0];a[H>>0]=d[H>>0]^d[43965+((d[I>>0]|0)+45)>>0]}if(a[(c[l>>2]|0)+25>>0]|0){a[I>>0]=a[43710+((d[(c[l>>2]|0)+25>>0]|0)-1)>>0]|0;a[E>>0]=d[E>>0]^d[43965+((d[I>>0]|0)+45)>>0];a[F>>0]=d[F>>0]^d[43965+((d[I>>0]|0)+164)>>0];a[G>>0]=d[G>>0]^d[43965+((d[I>>0]|0)+68)>>0];a[H>>0]=d[H>>0]^d[43965+((d[I>>0]|0)+138)>>0]}if(a[(c[l>>2]|0)+26>>0]|0){a[I>>0]=a[43710+((d[(c[l>>2]|0)+26>>0]|0)-1)>>0]|0;a[E>>0]=d[E>>0]^d[43965+((d[I>>0]|0)+138)>>0];a[F>>0]=d[F>>0]^d[43965+((d[I>>0]|0)+213)>>0];a[G>>0]=d[G>>0]^d[43965+((d[I>>0]|0)+191)>>0];a[H>>0]=d[H>>0]^d[43965+((d[I>>0]|0)+209)>>0]}if(a[(c[l>>2]|0)+27>>0]|0){a[I>>0]=a[43710+((d[(c[l>>2]|0)+27>>0]|0)-1)>>0]|0;a[E>>0]=d[E>>0]^d[43965+((d[I>>0]|0)+209)>>0];a[F>>0]=d[F>>0]^d[43965+((d[I>>0]|0)+127)>>0];a[G>>0]=d[G>>0]^d[43965+((d[I>>0]|0)+61)>>0];a[H>>0]=d[H>>0]^d[43965+((d[I>>0]|0)+153)>>0]}if(a[(c[l>>2]|0)+28>>0]|0){a[I>>0]=a[43710+((d[(c[l>>2]|0)+28>>0]|0)-1)>>0]|0;a[E>>0]=d[E>>0]^d[43965+((d[I>>0]|0)+153)>>0];a[F>>0]=d[F>>0]^d[43965+((d[I>>0]|0)+70)>>0];a[G>>0]=d[G>>0]^d[43965+((d[I>>0]|0)+102)>>0];a[H>>0]=d[H>>0]^d[43965+((d[I>>0]|0)+150)>>0]}if(a[(c[l>>2]|0)+29>>0]|0){a[I>>0]=a[43710+((d[(c[l>>2]|0)+29>>0]|0)-1)>>0]|0;a[E>>0]=d[E>>0]^d[43965+((d[I>>0]|0)+150)>>0];a[F>>0]=d[F>>0]^d[43965+((d[I>>0]|0)+60)>>0];a[G>>0]=d[G>>0]^d[43965+((d[I>>0]|0)+91)>>0];a[H>>0]=d[H>>0]^d[43965+((d[I>>0]|0)+237)>>0]}if(a[(c[l>>2]|0)+30>>0]|0){a[I>>0]=a[43710+((d[(c[l>>2]|0)+30>>0]|0)-1)>>0]|0;a[E>>0]=d[E>>0]^d[43965+((d[I>>0]|0)+237)>>0];a[F>>0]=d[F>>0]^d[43965+((d[I>>0]|0)+55)>>0];a[G>>0]=d[G>>0]^d[43965+((d[I>>0]|0)+79)>>0];a[H>>0]=d[H>>0]^d[43965+((d[I>>0]|0)+224)>>0]}if(a[(c[l>>2]|0)+31>>0]|0){a[I>>0]=a[43710+((d[(c[l>>2]|0)+31>>0]|0)-1)>>0]|0;a[E>>0]=d[E>>0]^d[43965+((d[I>>0]|0)+224)>>0];a[F>>0]=d[F>>0]^d[43965+((d[I>>0]|0)+208)>>0];a[G>>0]=d[G>>0]^d[43965+((d[I>>0]|0)+140)>>0];a[H>>0]=d[H>>0]^d[43965+((d[I>>0]|0)+23)>>0]}c[o>>2]=0;c[n>>2]=0;c[p>>2]=1;while(1){if((c[n>>2]|0)>=256)break;c[(c[k>>2]|0)+(c[n>>2]<<2)>>2]=c[8372+((d[45225+(d[45225+(d[44969+(d[44457+(c[p>>2]|0)>>0]^d[s>>0])>>0]^d[w>>0])>>0]^d[A>>0])>>0]^d[E>>0])<<2)>>2];c[(c[k>>2]|0)+1024+(c[n>>2]<<2)>>2]=c[9396+((d[45225+(d[44969+(d[44969+(d[44457+(c[o>>2]|0)>>0]^d[t>>0])>>0]^d[x>>0])>>0]^d[B>>0])>>0]^d[F>>0])<<2)>>2];c[(c[k>>2]|0)+2048+(c[n>>2]<<2)>>2]=c[10420+((d[44969+(d[45225+(d[45225+(d[44457+(c[o>>2]|0)>>0]^d[u>>0])>>0]^d[y>>0])>>0]^d[C>>0])>>0]^d[G>>0])<<2)>>2];c[(c[k>>2]|0)+3072+(c[n>>2]<<2)>>2]=c[11444+((d[44969+(d[44969+(d[45225+(d[44457+(c[p>>2]|0)>>0]^d[v>>0])>>0]^d[z>>0])>>0]^d[D>>0])>>0]^d[H>>0])<<2)>>2];c[n>>2]=(c[n>>2]|0)+1;c[o>>2]=(c[o>>2]|0)+2;c[p>>2]=(c[p>>2]|0)+2}c[q>>2]=c[8372+((d[45225+(d[45225+(d[44969+(117^d[(c[l>>2]|0)+24>>0])>>0]^d[(c[l>>2]|0)+16>>0])>>0]^d[(c[l>>2]|0)+8>>0])>>0]^d[c[l>>2]>>0])<<2)>>2]^c[9396+((d[45225+(d[44969+(d[44969+(169^d[(c[l>>2]|0)+25>>0])>>0]^d[(c[l>>2]|0)+17>>0])>>0]^d[(c[l>>2]|0)+9>>0])>>0]^d[(c[l>>2]|0)+1>>0])<<2)>>2]^c[10420+((d[44969+(d[45225+(d[45225+(169^d[(c[l>>2]|0)+26>>0])>>0]^d[(c[l>>2]|0)+18>>0])>>0]^d[(c[l>>2]|0)+10>>0])>>0]^d[(c[l>>2]|0)+2>>0])<<2)>>2]^c[11444+((d[44969+(d[44969+(d[45225+(117^d[(c[l>>2]|0)+27>>0])>>0]^d[(c[l>>2]|0)+19>>0])>>0]^d[(c[l>>2]|0)+11>>0])>>0]^d[(c[l>>2]|0)+3>>0])<<2)>>2];c[r>>2]=c[8372+((d[45225+(d[45225+(d[44969+(243^d[(c[l>>2]|0)+28>>0])>>0]^d[(c[l>>2]|0)+20>>0])>>0]^d[(c[l>>2]|0)+12>>0])>>0]^d[(c[l>>2]|0)+4>>0])<<2)>>2]^c[9396+((d[45225+(d[44969+(d[44969+(103^d[(c[l>>2]|0)+29>>0])>>0]^d[(c[l>>2]|0)+21>>0])>>0]^d[(c[l>>2]|0)+13>>0])>>0]^d[(c[l>>2]|0)+5>>0])<<2)>>2]^c[10420+((d[44969+(d[45225+(d[45225+(103^d[(c[l>>2]|0)+30>>0])>>0]^d[(c[l>>2]|0)+22>>0])>>0]^d[(c[l>>2]|0)+14>>0])>>0]^d[(c[l>>2]|0)+6>>0])<<2)>>2]^c[11444+((d[44969+(d[44969+(d[45225+(243^d[(c[l>>2]|0)+31>>0])>>0]^d[(c[l>>2]|0)+23>>0])>>0]^d[(c[l>>2]|0)+15>>0])>>0]^d[(c[l>>2]|0)+7>>0])<<2)>>2];c[r>>2]=(c[r>>2]<<8)+((c[r>>2]|0)>>>24);c[q>>2]=(c[q>>2]|0)+(c[r>>2]|0);c[r>>2]=(c[r>>2]|0)+(c[q>>2]|0);c[(c[k>>2]|0)+4096>>2]=c[q>>2];c[(c[k>>2]|0)+4096+4>>2]=(c[r>>2]<<9)+((c[r>>2]|0)>>>23);c[q>>2]=c[8372+((d[45225+(d[45225+(d[44969+(198^d[(c[l>>2]|0)+24>>0])>>0]^d[(c[l>>2]|0)+16>>0])>>0]^d[(c[l>>2]|0)+8>>0])>>0]^d[c[l>>2]>>0])<<2)>>2]^c[9396+((d[45225+(d[44969+(d[44969+(179^d[(c[l>>2]|0)+25>>0])>>0]^d[(c[l>>2]|0)+17>>0])>>0]^d[(c[l>>2]|0)+9>>0])>>0]^d[(c[l>>2]|0)+1>>0])<<2)>>2]^c[10420+((d[44969+(d[45225+(d[45225+(179^d[(c[l>>2]|0)+26>>0])>>0]^d[(c[l>>2]|0)+18>>0])>>0]^d[(c[l>>2]|0)+10>>0])>>0]^d[(c[l>>2]|0)+2>>0])<<2)>>2]^c[11444+((d[44969+(d[44969+(d[45225+(198^d[(c[l>>2]|0)+27>>0])>>0]^d[(c[l>>2]|0)+19>>0])>>0]^d[(c[l>>2]|0)+11>>0])>>0]^d[(c[l>>2]|0)+3>>0])<<2)>>2];c[r>>2]=c[8372+((d[45225+(d[45225+(d[44969+(244^d[(c[l>>2]|0)+28>>0])>>0]^d[(c[l>>2]|0)+20>>0])>>0]^d[(c[l>>2]|0)+12>>0])>>0]^d[(c[l>>2]|0)+4>>0])<<2)>>2]^c[9396+((d[45225+(d[44969+(d[44969+(232^d[(c[l>>2]|0)+29>>0])>>0]^d[(c[l>>2]|0)+21>>0])>>0]^d[(c[l>>2]|0)+13>>0])>>0]^d[(c[l>>2]|0)+5>>0])<<2)>>2]^c[10420+((d[44969+(d[45225+(d[45225+(232^d[(c[l>>2]|0)+30>>0])>>0]^d[(c[l>>2]|0)+22>>0])>>0]^d[(c[l>>2]|0)+14>>0])>>0]^d[(c[l>>2]|0)+6>>0])<<2)>>2]^c[11444+((d[44969+(d[44969+(d[45225+(244^d[(c[l>>2]|0)+31>>0])>>0]^d[(c[l>>2]|0)+23>>0])>>0]^d[(c[l>>2]|0)+15>>0])>>0]^d[(c[l>>2]|0)+7>>0])<<2)>>2];c[r>>2]=(c[r>>2]<<8)+((c[r>>2]|0)>>>24);c[q>>2]=(c[q>>2]|0)+(c[r>>2]|0);c[r>>2]=(c[r>>2]|0)+(c[q>>2]|0);c[(c[k>>2]|0)+4096+8>>2]=c[q>>2];c[(c[k>>2]|0)+4096+12>>2]=(c[r>>2]<<9)+((c[r>>2]|0)>>>23);c[q>>2]=c[8372+((d[45225+(d[45225+(d[44969+(219^d[(c[l>>2]|0)+24>>0])>>0]^d[(c[l>>2]|0)+16>>0])>>0]^d[(c[l>>2]|0)+8>>0])>>0]^d[c[l>>2]>>0])<<2)>>2]^c[9396+((d[45225+(d[44969+(d[44969+(4^d[(c[l>>2]|0)+25>>0])>>0]^d[(c[l>>2]|0)+17>>0])>>0]^d[(c[l>>2]|0)+9>>0])>>0]^d[(c[l>>2]|0)+1>>0])<<2)>>2]^c[10420+((d[44969+(d[45225+(d[45225+(4^d[(c[l>>2]|0)+26>>0])>>0]^d[(c[l>>2]|0)+18>>0])>>0]^d[(c[l>>2]|0)+10>>0])>>0]^d[(c[l>>2]|0)+2>>0])<<2)>>2]^c[11444+((d[44969+(d[44969+(d[45225+(219^d[(c[l>>2]|0)+27>>0])>>0]^d[(c[l>>2]|0)+19>>0])>>0]^d[(c[l>>2]|0)+11>>0])>>0]^d[(c[l>>2]|0)+3>>0])<<2)>>2];c[r>>2]=c[8372+((d[45225+(d[45225+(d[44969+(123^d[(c[l>>2]|0)+28>>0])>>0]^d[(c[l>>2]|0)+20>>0])>>0]^d[(c[l>>2]|0)+12>>0])>>0]^d[(c[l>>2]|0)+4>>0])<<2)>>2]^c[9396+((d[45225+(d[44969+(d[44969+(253^d[(c[l>>2]|0)+29>>0])>>0]^d[(c[l>>2]|0)+21>>0])>>0]^d[(c[l>>2]|0)+13>>0])>>0]^d[(c[l>>2]|0)+5>>0])<<2)>>2]^c[10420+((d[44969+(d[45225+(d[45225+(253^d[(c[l>>2]|0)+30>>0])>>0]^d[(c[l>>2]|0)+22>>0])>>0]^d[(c[l>>2]|0)+14>>0])>>0]^d[(c[l>>2]|0)+6>>0])<<2)>>2]^c[11444+((d[44969+(d[44969+(d[45225+(123^d[(c[l>>2]|0)+31>>0])>>0]^d[(c[l>>2]|0)+23>>0])>>0]^d[(c[l>>2]|0)+15>>0])>>0]^d[(c[l>>2]|0)+7>>0])<<2)>>2];c[r>>2]=(c[r>>2]<<8)+((c[r>>2]|0)>>>24);c[q>>2]=(c[q>>2]|0)+(c[r>>2]|0);c[r>>2]=(c[r>>2]|0)+(c[q>>2]|0);c[(c[k>>2]|0)+4096+16>>2]=c[q>>2];c[(c[k>>2]|0)+4096+20>>2]=(c[r>>2]<<9)+((c[r>>2]|0)>>>23);c[q>>2]=c[8372+((d[45225+(d[45225+(d[44969+(251^d[(c[l>>2]|0)+24>>0])>>0]^d[(c[l>>2]|0)+16>>0])>>0]^d[(c[l>>2]|0)+8>>0])>>0]^d[c[l>>2]>>0])<<2)>>2]^c[9396+((d[45225+(d[44969+(d[44969+(163^d[(c[l>>2]|0)+25>>0])>>0]^d[(c[l>>2]|0)+17>>0])>>0]^d[(c[l>>2]|0)+9>>0])>>0]^d[(c[l>>2]|0)+1>>0])<<2)>>2]^c[10420+((d[44969+(d[45225+(d[45225+(163^d[(c[l>>2]|0)+26>>0])>>0]^d[(c[l>>2]|0)+18>>0])>>0]^d[(c[l>>2]|0)+10>>0])>>0]^d[(c[l>>2]|0)+2>>0])<<2)>>2]^c[11444+((d[44969+(d[44969+(d[45225+(251^d[(c[l>>2]|0)+27>>0])>>0]^d[(c[l>>2]|0)+19>>0])>>0]^d[(c[l>>2]|0)+11>>0])>>0]^d[(c[l>>2]|0)+3>>0])<<2)>>2];c[r>>2]=c[8372+((d[45225+(d[45225+(d[44969+(200^d[(c[l>>2]|0)+28>>0])>>0]^d[(c[l>>2]|0)+20>>0])>>0]^d[(c[l>>2]|0)+12>>0])>>0]^d[(c[l>>2]|0)+4>>0])<<2)>>2]^c[9396+((d[45225+(d[44969+(d[44969+(118^d[(c[l>>2]|0)+29>>0])>>0]^d[(c[l>>2]|0)+21>>0])>>0]^d[(c[l>>2]|0)+13>>0])>>0]^d[(c[l>>2]|0)+5>>0])<<2)>>2]^c[10420+((d[44969+(d[45225+(d[45225+(118^d[(c[l>>2]|0)+30>>0])>>0]^d[(c[l>>2]|0)+22>>0])>>0]^d[(c[l>>2]|0)+14>>0])>>0]^d[(c[l>>2]|0)+6>>0])<<2)>>2]^c[11444+((d[44969+(d[44969+(d[45225+(200^d[(c[l>>2]|0)+31>>0])>>0]^d[(c[l>>2]|0)+23>>0])>>0]^d[(c[l>>2]|0)+15>>0])>>0]^d[(c[l>>2]|0)+7>>0])<<2)>>2];c[r>>2]=(c[r>>2]<<8)+((c[r>>2]|0)>>>24);c[q>>2]=(c[q>>2]|0)+(c[r>>2]|0);c[r>>2]=(c[r>>2]|0)+(c[q>>2]|0);c[(c[k>>2]|0)+4096+24>>2]=c[q>>2];c[(c[k>>2]|0)+4096+28>>2]=(c[r>>2]<<9)+((c[r>>2]|0)>>>23);c[q>>2]=c[8372+((d[45225+(d[45225+(d[44969+(74^d[(c[l>>2]|0)+24>>0])>>0]^d[(c[l>>2]|0)+16>>0])>>0]^d[(c[l>>2]|0)+8>>0])>>0]^d[c[l>>2]>>0])<<2)>>2]^c[9396+((d[45225+(d[44969+(d[44969+(154^d[(c[l>>2]|0)+25>>0])>>0]^d[(c[l>>2]|0)+17>>0])>>0]^d[(c[l>>2]|0)+9>>0])>>0]^d[(c[l>>2]|0)+1>>0])<<2)>>2]^c[10420+((d[44969+(d[45225+(d[45225+(154^d[(c[l>>2]|0)+26>>0])>>0]^d[(c[l>>2]|0)+18>>0])>>0]^d[(c[l>>2]|0)+10>>0])>>0]^d[(c[l>>2]|0)+2>>0])<<2)>>2]^c[11444+((d[44969+(d[44969+(d[45225+(74^d[(c[l>>2]|0)+27>>0])>>0]^d[(c[l>>2]|0)+19>>0])>>0]^d[(c[l>>2]|0)+11>>0])>>0]^d[(c[l>>2]|0)+3>>0])<<2)>>2];c[r>>2]=c[8372+((d[45225+(d[45225+(d[44969+(211^d[(c[l>>2]|0)+28>>0])>>0]^d[(c[l>>2]|0)+20>>0])>>0]^d[(c[l>>2]|0)+12>>0])>>0]^d[(c[l>>2]|0)+4>>0])<<2)>>2]^c[9396+((d[45225+(d[44969+(d[44969+(146^d[(c[l>>2]|0)+29>>0])>>0]^d[(c[l>>2]|0)+21>>0])>>0]^d[(c[l>>2]|0)+13>>0])>>0]^d[(c[l>>2]|0)+5>>0])<<2)>>2]^c[10420+((d[44969+(d[45225+(d[45225+(146^d[(c[l>>2]|0)+30>>0])>>0]^d[(c[l>>2]|0)+22>>0])>>0]^d[(c[l>>2]|0)+14>>0])>>0]^d[(c[l>>2]|0)+6>>0])<<2)>>2]^c[11444+((d[44969+(d[44969+(d[45225+(211^d[(c[l>>2]|0)+31>>0])>>0]^d[(c[l>>2]|0)+23>>0])>>0]^d[(c[l>>2]|0)+15>>0])>>0]^d[(c[l>>2]|0)+7>>0])<<2)>>2];c[r>>2]=(c[r>>2]<<8)+((c[r>>2]|0)>>>24);c[q>>2]=(c[q>>2]|0)+(c[r>>2]|0);c[r>>2]=(c[r>>2]|0)+(c[q>>2]|0);c[(c[k>>2]|0)+4128>>2]=c[q>>2];c[(c[k>>2]|0)+4128+4>>2]=(c[r>>2]<<9)+((c[r>>2]|0)>>>23);c[q>>2]=c[8372+((d[45225+(d[45225+(d[44969+(230^d[(c[l>>2]|0)+24>>0])>>0]^d[(c[l>>2]|0)+16>>0])>>0]^d[(c[l>>2]|0)+8>>0])>>0]^d[c[l>>2]>>0])<<2)>>2]^c[9396+((d[45225+(d[44969+(d[44969+(128^d[(c[l>>2]|0)+25>>0])>>0]^d[(c[l>>2]|0)+17>>0])>>0]^d[(c[l>>2]|0)+9>>0])>>0]^d[(c[l>>2]|0)+1>>0])<<2)>>2]^c[10420+((d[44969+(d[45225+(d[45225+(128^d[(c[l>>2]|0)+26>>0])>>0]^d[(c[l>>2]|0)+18>>0])>>0]^d[(c[l>>2]|0)+10>>0])>>0]^d[(c[l>>2]|0)+2>>0])<<2)>>2]^c[11444+((d[44969+(d[44969+(d[45225+(230^d[(c[l>>2]|0)+27>>0])>>0]^d[(c[l>>2]|0)+19>>0])>>0]^d[(c[l>>2]|0)+11>>0])>>0]^d[(c[l>>2]|0)+3>>0])<<2)>>2];c[r>>2]=c[8372+((d[45225+(d[45225+(d[44969+(107^d[(c[l>>2]|0)+28>>0])>>0]^d[(c[l>>2]|0)+20>>0])>>0]^d[(c[l>>2]|0)+12>>0])>>0]^d[(c[l>>2]|0)+4>>0])<<2)>>2]^c[9396+((d[45225+(d[44969+(d[44969+(120^d[(c[l>>2]|0)+29>>0])>>0]^d[(c[l>>2]|0)+21>>0])>>0]^d[(c[l>>2]|0)+13>>0])>>0]^d[(c[l>>2]|0)+5>>0])<<2)>>2]^c[10420+((d[44969+(d[45225+(d[45225+(120^d[(c[l>>2]|0)+30>>0])>>0]^d[(c[l>>2]|0)+22>>0])>>0]^d[(c[l>>2]|0)+14>>0])>>0]^d[(c[l>>2]|0)+6>>0])<<2)>>2]^c[11444+((d[44969+(d[44969+(d[45225+(107^d[(c[l>>2]|0)+31>>0])>>0]^d[(c[l>>2]|0)+23>>0])>>0]^d[(c[l>>2]|0)+15>>0])>>0]^d[(c[l>>2]|0)+7>>0])<<2)>>2];c[r>>2]=(c[r>>2]<<8)+((c[r>>2]|0)>>>24);c[q>>2]=(c[q>>2]|0)+(c[r>>2]|0);c[r>>2]=(c[r>>2]|0)+(c[q>>2]|0);c[(c[k>>2]|0)+4128+8>>2]=c[q>>2];c[(c[k>>2]|0)+4128+12>>2]=(c[r>>2]<<9)+((c[r>>2]|0)>>>23);c[q>>2]=c[8372+((d[45225+(d[45225+(d[44969+(69^d[(c[l>>2]|0)+24>>0])>>0]^d[(c[l>>2]|0)+16>>0])>>0]^d[(c[l>>2]|0)+8>>0])>>0]^d[c[l>>2]>>0])<<2)>>2]^c[9396+((d[45225+(d[44969+(d[44969+(228^d[(c[l>>2]|0)+25>>0])>>0]^d[(c[l>>2]|0)+17>>0])>>0]^d[(c[l>>2]|0)+9>>0])>>0]^d[(c[l>>2]|0)+1>>0])<<2)>>2]^c[10420+((d[44969+(d[45225+(d[45225+(228^d[(c[l>>2]|0)+26>>0])>>0]^d[(c[l>>2]|0)+18>>0])>>0]^d[(c[l>>2]|0)+10>>0])>>0]^d[(c[l>>2]|0)+2>>0])<<2)>>2]^c[11444+((d[44969+(d[44969+(d[45225+(69^d[(c[l>>2]|0)+27>>0])>>0]^d[(c[l>>2]|0)+19>>0])>>0]^d[(c[l>>2]|0)+11>>0])>>0]^d[(c[l>>2]|0)+3>>0])<<2)>>2];c[r>>2]=c[8372+((d[45225+(d[45225+(d[44969+(125^d[(c[l>>2]|0)+28>>0])>>0]^d[(c[l>>2]|0)+20>>0])>>0]^d[(c[l>>2]|0)+12>>0])>>0]^d[(c[l>>2]|0)+4>>0])<<2)>>2]^c[9396+((d[45225+(d[44969+(d[44969+(221^d[(c[l>>2]|0)+29>>0])>>0]^d[(c[l>>2]|0)+21>>0])>>0]^d[(c[l>>2]|0)+13>>0])>>0]^d[(c[l>>2]|0)+5>>0])<<2)>>2]^c[10420+((d[44969+(d[45225+(d[45225+(221^d[(c[l>>2]|0)+30>>0])>>0]^d[(c[l>>2]|0)+22>>0])>>0]^d[(c[l>>2]|0)+14>>0])>>0]^d[(c[l>>2]|0)+6>>0])<<2)>>2]^c[11444+((d[44969+(d[44969+(d[45225+(125^d[(c[l>>2]|0)+31>>0])>>0]^d[(c[l>>2]|0)+23>>0])>>0]^d[(c[l>>2]|0)+15>>0])>>0]^d[(c[l>>2]|0)+7>>0])<<2)>>2];c[r>>2]=(c[r>>2]<<8)+((c[r>>2]|0)>>>24);c[q>>2]=(c[q>>2]|0)+(c[r>>2]|0);c[r>>2]=(c[r>>2]|0)+(c[q>>2]|0);c[(c[k>>2]|0)+4128+16>>2]=c[q>>2];c[(c[k>>2]|0)+4128+20>>2]=(c[r>>2]<<9)+((c[r>>2]|0)>>>23);c[q>>2]=c[8372+((d[45225+(d[45225+(d[44969+(232^d[(c[l>>2]|0)+24>>0])>>0]^d[(c[l>>2]|0)+16>>0])>>0]^d[(c[l>>2]|0)+8>>0])>>0]^d[c[l>>2]>>0])<<2)>>2]^c[9396+((d[45225+(d[44969+(d[44969+(209^d[(c[l>>2]|0)+25>>0])>>0]^d[(c[l>>2]|0)+17>>0])>>0]^d[(c[l>>2]|0)+9>>0])>>0]^d[(c[l>>2]|0)+1>>0])<<2)>>2]^c[10420+((d[44969+(d[45225+(d[45225+(209^d[(c[l>>2]|0)+26>>0])>>0]^d[(c[l>>2]|0)+18>>0])>>0]^d[(c[l>>2]|0)+10>>0])>>0]^d[(c[l>>2]|0)+2>>0])<<2)>>2]^c[11444+((d[44969+(d[44969+(d[45225+(232^d[(c[l>>2]|0)+27>>0])>>0]^d[(c[l>>2]|0)+19>>0])>>0]^d[(c[l>>2]|0)+11>>0])>>0]^d[(c[l>>2]|0)+3>>0])<<2)>>2];c[r>>2]=c[8372+((d[45225+(d[45225+(d[44969+(75^d[(c[l>>2]|0)+28>>0])>>0]^d[(c[l>>2]|0)+20>>0])>>0]^d[(c[l>>2]|0)+12>>0])>>0]^d[(c[l>>2]|0)+4>>0])<<2)>>2]^c[9396+((d[45225+(d[44969+(d[44969+(56^d[(c[l>>2]|0)+29>>0])>>0]^d[(c[l>>2]|0)+21>>0])>>0]^d[(c[l>>2]|0)+13>>0])>>0]^d[(c[l>>2]|0)+5>>0])<<2)>>2]^c[10420+((d[44969+(d[45225+(d[45225+(56^d[(c[l>>2]|0)+30>>0])>>0]^d[(c[l>>2]|0)+22>>0])>>0]^d[(c[l>>2]|0)+14>>0])>>0]^d[(c[l>>2]|0)+6>>0])<<2)>>2]^c[11444+((d[44969+(d[44969+(d[45225+(75^d[(c[l>>2]|0)+31>>0])>>0]^d[(c[l>>2]|0)+23>>0])>>0]^d[(c[l>>2]|0)+15>>0])>>0]^d[(c[l>>2]|0)+7>>0])<<2)>>2];c[r>>2]=(c[r>>2]<<8)+((c[r>>2]|0)>>>24);c[q>>2]=(c[q>>2]|0)+(c[r>>2]|0);c[r>>2]=(c[r>>2]|0)+(c[q>>2]|0);c[(c[k>>2]|0)+4128+24>>2]=c[q>>2];c[(c[k>>2]|0)+4128+28>>2]=(c[r>>2]<<9)+((c[r>>2]|0)>>>23);c[q>>2]=c[8372+((d[45225+(d[45225+(d[44969+(214^d[(c[l>>2]|0)+24>>0])>>0]^d[(c[l>>2]|0)+16>>0])>>0]^d[(c[l>>2]|0)+8>>0])>>0]^d[c[l>>2]>>0])<<2)>>2]^c[9396+((d[45225+(d[44969+(d[44969+(13^d[(c[l>>2]|0)+25>>0])>>0]^d[(c[l>>2]|0)+17>>0])>>0]^d[(c[l>>2]|0)+9>>0])>>0]^d[(c[l>>2]|0)+1>>0])<<2)>>2]^c[10420+((d[44969+(d[45225+(d[45225+(13^d[(c[l>>2]|0)+26>>0])>>0]^d[(c[l>>2]|0)+18>>0])>>0]^d[(c[l>>2]|0)+10>>0])>>0]^d[(c[l>>2]|0)+2>>0])<<2)>>2]^c[11444+((d[44969+(d[44969+(d[45225+(214^d[(c[l>>2]|0)+27>>0])>>0]^d[(c[l>>2]|0)+19>>0])>>0]^d[(c[l>>2]|0)+11>>0])>>0]^d[(c[l>>2]|0)+3>>0])<<2)>>2];c[r>>2]=c[8372+((d[45225+(d[45225+(d[44969+(50^d[(c[l>>2]|0)+28>>0])>>0]^d[(c[l>>2]|0)+20>>0])>>0]^d[(c[l>>2]|0)+12>>0])>>0]^d[(c[l>>2]|0)+4>>0])<<2)>>2]^c[9396+((d[45225+(d[44969+(d[44969+(198^d[(c[l>>2]|0)+29>>0])>>0]^d[(c[l>>2]|0)+21>>0])>>0]^d[(c[l>>2]|0)+13>>0])>>0]^d[(c[l>>2]|0)+5>>0])<<2)>>2]^c[10420+((d[44969+(d[45225+(d[45225+(198^d[(c[l>>2]|0)+30>>0])>>0]^d[(c[l>>2]|0)+22>>0])>>0]^d[(c[l>>2]|0)+14>>0])>>0]^d[(c[l>>2]|0)+6>>0])<<2)>>2]^c[11444+((d[44969+(d[44969+(d[45225+(50^d[(c[l>>2]|0)+31>>0])>>0]^d[(c[l>>2]|0)+23>>0])>>0]^d[(c[l>>2]|0)+15>>0])>>0]^d[(c[l>>2]|0)+7>>0])<<2)>>2];c[r>>2]=(c[r>>2]<<8)+((c[r>>2]|0)>>>24);c[q>>2]=(c[q>>2]|0)+(c[r>>2]|0);c[r>>2]=(c[r>>2]|0)+(c[q>>2]|0);c[(c[k>>2]|0)+4128+32>>2]=c[q>>2];c[(c[k>>2]|0)+4128+36>>2]=(c[r>>2]<<9)+((c[r>>2]|0)>>>23);c[q>>2]=c[8372+((d[45225+(d[45225+(d[44969+(216^d[(c[l>>2]|0)+24>>0])>>0]^d[(c[l>>2]|0)+16>>0])>>0]^d[(c[l>>2]|0)+8>>0])>>0]^d[c[l>>2]>>0])<<2)>>2]^c[9396+((d[45225+(d[44969+(d[44969+(53^d[(c[l>>2]|0)+25>>0])>>0]^d[(c[l>>2]|0)+17>>0])>>0]^d[(c[l>>2]|0)+9>>0])>>0]^d[(c[l>>2]|0)+1>>0])<<2)>>2]^c[10420+((d[44969+(d[45225+(d[45225+(53^d[(c[l>>2]|0)+26>>0])>>0]^d[(c[l>>2]|0)+18>>0])>>0]^d[(c[l>>2]|0)+10>>0])>>0]^d[(c[l>>2]|0)+2>>0])<<2)>>2]^c[11444+((d[44969+(d[44969+(d[45225+(216^d[(c[l>>2]|0)+27>>0])>>0]^d[(c[l>>2]|0)+19>>0])>>0]^d[(c[l>>2]|0)+11>>0])>>0]^d[(c[l>>2]|0)+3>>0])<<2)>>2];c[r>>2]=c[8372+((d[45225+(d[45225+(d[44969+(253^d[(c[l>>2]|0)+28>>0])>>0]^d[(c[l>>2]|0)+20>>0])>>0]^d[(c[l>>2]|0)+12>>0])>>0]^d[(c[l>>2]|0)+4>>0])<<2)>>2]^c[9396+((d[45225+(d[44969+(d[44969+(152^d[(c[l>>2]|0)+29>>0])>>0]^d[(c[l>>2]|0)+21>>0])>>0]^d[(c[l>>2]|0)+13>>0])>>0]^d[(c[l>>2]|0)+5>>0])<<2)>>2]^c[10420+((d[44969+(d[45225+(d[45225+(152^d[(c[l>>2]|0)+30>>0])>>0]^d[(c[l>>2]|0)+22>>0])>>0]^d[(c[l>>2]|0)+14>>0])>>0]^d[(c[l>>2]|0)+6>>0])<<2)>>2]^c[11444+((d[44969+(d[44969+(d[45225+(253^d[(c[l>>2]|0)+31>>0])>>0]^d[(c[l>>2]|0)+23>>0])>>0]^d[(c[l>>2]|0)+15>>0])>>0]^d[(c[l>>2]|0)+7>>0])<<2)>>2];c[r>>2]=(c[r>>2]<<8)+((c[r>>2]|0)>>>24);c[q>>2]=(c[q>>2]|0)+(c[r>>2]|0);c[r>>2]=(c[r>>2]|0)+(c[q>>2]|0);c[(c[k>>2]|0)+4128+40>>2]=c[q>>2];c[(c[k>>2]|0)+4128+44>>2]=(c[r>>2]<<9)+((c[r>>2]|0)>>>23);c[q>>2]=c[8372+((d[45225+(d[45225+(d[44969+(55^d[(c[l>>2]|0)+24>>0])>>0]^d[(c[l>>2]|0)+16>>0])>>0]^d[(c[l>>2]|0)+8>>0])>>0]^d[c[l>>2]>>0])<<2)>>2]^c[9396+((d[45225+(d[44969+(d[44969+(24^d[(c[l>>2]|0)+25>>0])>>0]^d[(c[l>>2]|0)+17>>0])>>0]^d[(c[l>>2]|0)+9>>0])>>0]^d[(c[l>>2]|0)+1>>0])<<2)>>2]^c[10420+((d[44969+(d[45225+(d[45225+(24^d[(c[l>>2]|0)+26>>0])>>0]^d[(c[l>>2]|0)+18>>0])>>0]^d[(c[l>>2]|0)+10>>0])>>0]^d[(c[l>>2]|0)+2>>0])<<2)>>2]^c[11444+((d[44969+(d[44969+(d[45225+(55^d[(c[l>>2]|0)+27>>0])>>0]^d[(c[l>>2]|0)+19>>0])>>0]^d[(c[l>>2]|0)+11>>0])>>0]^d[(c[l>>2]|0)+3>>0])<<2)>>2];c[r>>2]=c[8372+((d[45225+(d[45225+(d[44969+(113^d[(c[l>>2]|0)+28>>0])>>0]^d[(c[l>>2]|0)+20>>0])>>0]^d[(c[l>>2]|0)+12>>0])>>0]^d[(c[l>>2]|0)+4>>0])<<2)>>2]^c[9396+((d[45225+(d[44969+(d[44969+(247^d[(c[l>>2]|0)+29>>0])>>0]^d[(c[l>>2]|0)+21>>0])>>0]^d[(c[l>>2]|0)+13>>0])>>0]^d[(c[l>>2]|0)+5>>0])<<2)>>2]^c[10420+((d[44969+(d[45225+(d[45225+(247^d[(c[l>>2]|0)+30>>0])>>0]^d[(c[l>>2]|0)+22>>0])>>0]^d[(c[l>>2]|0)+14>>0])>>0]^d[(c[l>>2]|0)+6>>0])<<2)>>2]^c[11444+((d[44969+(d[44969+(d[45225+(113^d[(c[l>>2]|0)+31>>0])>>0]^d[(c[l>>2]|0)+23>>0])>>0]^d[(c[l>>2]|0)+15>>0])>>0]^d[(c[l>>2]|0)+7>>0])<<2)>>2];c[r>>2]=(c[r>>2]<<8)+((c[r>>2]|0)>>>24);c[q>>2]=(c[q>>2]|0)+(c[r>>2]|0);c[r>>2]=(c[r>>2]|0)+(c[q>>2]|0);c[(c[k>>2]|0)+4128+48>>2]=c[q>>2];c[(c[k>>2]|0)+4128+52>>2]=(c[r>>2]<<9)+((c[r>>2]|0)>>>23);c[q>>2]=c[8372+((d[45225+(d[45225+(d[44969+(241^d[(c[l>>2]|0)+24>>0])>>0]^d[(c[l>>2]|0)+16>>0])>>0]^d[(c[l>>2]|0)+8>>0])>>0]^d[c[l>>2]>>0])<<2)>>2]^c[9396+((d[45225+(d[44969+(d[44969+(236^d[(c[l>>2]|0)+25>>0])>>0]^d[(c[l>>2]|0)+17>>0])>>0]^d[(c[l>>2]|0)+9>>0])>>0]^d[(c[l>>2]|0)+1>>0])<<2)>>2]^c[10420+((d[44969+(d[45225+(d[45225+(236^d[(c[l>>2]|0)+26>>0])>>0]^d[(c[l>>2]|0)+18>>0])>>0]^d[(c[l>>2]|0)+10>>0])>>0]^d[(c[l>>2]|0)+2>>0])<<2)>>2]^c[11444+((d[44969+(d[44969+(d[45225+(241^d[(c[l>>2]|0)+27>>0])>>0]^d[(c[l>>2]|0)+19>>0])>>0]^d[(c[l>>2]|0)+11>>0])>>0]^d[(c[l>>2]|0)+3>>0])<<2)>>2];c[r>>2]=c[8372+((d[45225+(d[45225+(d[44969+(225^d[(c[l>>2]|0)+28>>0])>>0]^d[(c[l>>2]|0)+20>>0])>>0]^d[(c[l>>2]|0)+12>>0])>>0]^d[(c[l>>2]|0)+4>>0])<<2)>>2]^c[9396+((d[45225+(d[44969+(d[44969+(108^d[(c[l>>2]|0)+29>>0])>>0]^d[(c[l>>2]|0)+21>>0])>>0]^d[(c[l>>2]|0)+13>>0])>>0]^d[(c[l>>2]|0)+5>>0])<<2)>>2]^c[10420+((d[44969+(d[45225+(d[45225+(108^d[(c[l>>2]|0)+30>>0])>>0]^d[(c[l>>2]|0)+22>>0])>>0]^d[(c[l>>2]|0)+14>>0])>>0]^d[(c[l>>2]|0)+6>>0])<<2)>>2]^c[11444+((d[44969+(d[44969+(d[45225+(225^d[(c[l>>2]|0)+31>>0])>>0]^d[(c[l>>2]|0)+23>>0])>>0]^d[(c[l>>2]|0)+15>>0])>>0]^d[(c[l>>2]|0)+7>>0])<<2)>>2];c[r>>2]=(c[r>>2]<<8)+((c[r>>2]|0)>>>24);c[q>>2]=(c[q>>2]|0)+(c[r>>2]|0);c[r>>2]=(c[r>>2]|0)+(c[q>>2]|0);c[(c[k>>2]|0)+4128+56>>2]=c[q>>2];c[(c[k>>2]|0)+4128+60>>2]=(c[r>>2]<<9)+((c[r>>2]|0)>>>23);c[q>>2]=c[8372+((d[45225+(d[45225+(d[44969+(48^d[(c[l>>2]|0)+24>>0])>>0]^d[(c[l>>2]|0)+16>>0])>>0]^d[(c[l>>2]|0)+8>>0])>>0]^d[c[l>>2]>>0])<<2)>>2]^c[9396+((d[45225+(d[44969+(d[44969+(67^d[(c[l>>2]|0)+25>>0])>>0]^d[(c[l>>2]|0)+17>>0])>>0]^d[(c[l>>2]|0)+9>>0])>>0]^d[(c[l>>2]|0)+1>>0])<<2)>>2]^c[10420+((d[44969+(d[45225+(d[45225+(67^d[(c[l>>2]|0)+26>>0])>>0]^d[(c[l>>2]|0)+18>>0])>>0]^d[(c[l>>2]|0)+10>>0])>>0]^d[(c[l>>2]|0)+2>>0])<<2)>>2]^c[11444+((d[44969+(d[44969+(d[45225+(48^d[(c[l>>2]|0)+27>>0])>>0]^d[(c[l>>2]|0)+19>>0])>>0]^d[(c[l>>2]|0)+11>>0])>>0]^d[(c[l>>2]|0)+3>>0])<<2)>>2];c[r>>2]=c[8372+((d[45225+(d[45225+(d[44969+(15^d[(c[l>>2]|0)+28>>0])>>0]^d[(c[l>>2]|0)+20>>0])>>0]^d[(c[l>>2]|0)+12>>0])>>0]^d[(c[l>>2]|0)+4>>0])<<2)>>2]^c[9396+((d[45225+(d[44969+(d[44969+(117^d[(c[l>>2]|0)+29>>0])>>0]^d[(c[l>>2]|0)+21>>0])>>0]^d[(c[l>>2]|0)+13>>0])>>0]^d[(c[l>>2]|0)+5>>0])<<2)>>2]^c[10420+((d[44969+(d[45225+(d[45225+(117^d[(c[l>>2]|0)+30>>0])>>0]^d[(c[l>>2]|0)+22>>0])>>0]^d[(c[l>>2]|0)+14>>0])>>0]^d[(c[l>>2]|0)+6>>0])<<2)>>2]^c[11444+((d[44969+(d[44969+(d[45225+(15^d[(c[l>>2]|0)+31>>0])>>0]^d[(c[l>>2]|0)+23>>0])>>0]^d[(c[l>>2]|0)+15>>0])>>0]^d[(c[l>>2]|0)+7>>0])<<2)>>2];c[r>>2]=(c[r>>2]<<8)+((c[r>>2]|0)>>>24);c[q>>2]=(c[q>>2]|0)+(c[r>>2]|0);c[r>>2]=(c[r>>2]|0)+(c[q>>2]|0);c[(c[k>>2]|0)+4128+64>>2]=c[q>>2];c[(c[k>>2]|0)+4128+68>>2]=(c[r>>2]<<9)+((c[r>>2]|0)>>>23);c[q>>2]=c[8372+((d[45225+(d[45225+(d[44969+(248^d[(c[l>>2]|0)+24>>0])>>0]^d[(c[l>>2]|0)+16>>0])>>0]^d[(c[l>>2]|0)+8>>0])>>0]^d[c[l>>2]>>0])<<2)>>2]^c[9396+((d[45225+(d[44969+(d[44969+(55^d[(c[l>>2]|0)+25>>0])>>0]^d[(c[l>>2]|0)+17>>0])>>0]^d[(c[l>>2]|0)+9>>0])>>0]^d[(c[l>>2]|0)+1>>0])<<2)>>2]^c[10420+((d[44969+(d[45225+(d[45225+(55^d[(c[l>>2]|0)+26>>0])>>0]^d[(c[l>>2]|0)+18>>0])>>0]^d[(c[l>>2]|0)+10>>0])>>0]^d[(c[l>>2]|0)+2>>0])<<2)>>2]^c[11444+((d[44969+(d[44969+(d[45225+(248^d[(c[l>>2]|0)+27>>0])>>0]^d[(c[l>>2]|0)+19>>0])>>0]^d[(c[l>>2]|0)+11>>0])>>0]^d[(c[l>>2]|0)+3>>0])<<2)>>2];c[r>>2]=c[8372+((d[45225+(d[45225+(d[44969+(27^d[(c[l>>2]|0)+28>>0])>>0]^d[(c[l>>2]|0)+20>>0])>>0]^d[(c[l>>2]|0)+12>>0])>>0]^d[(c[l>>2]|0)+4>>0])<<2)>>2]^c[9396+((d[45225+(d[44969+(d[44969+(38^d[(c[l>>2]|0)+29>>0])>>0]^d[(c[l>>2]|0)+21>>0])>>0]^d[(c[l>>2]|0)+13>>0])>>0]^d[(c[l>>2]|0)+5>>0])<<2)>>2]^c[10420+((d[44969+(d[45225+(d[45225+(38^d[(c[l>>2]|0)+30>>0])>>0]^d[(c[l>>2]|0)+22>>0])>>0]^d[(c[l>>2]|0)+14>>0])>>0]^d[(c[l>>2]|0)+6>>0])<<2)>>2]^c[11444+((d[44969+(d[44969+(d[45225+(27^d[(c[l>>2]|0)+31>>0])>>0]^d[(c[l>>2]|0)+23>>0])>>0]^d[(c[l>>2]|0)+15>>0])>>0]^d[(c[l>>2]|0)+7>>0])<<2)>>2];c[r>>2]=(c[r>>2]<<8)+((c[r>>2]|0)>>>24);c[q>>2]=(c[q>>2]|0)+(c[r>>2]|0);c[r>>2]=(c[r>>2]|0)+(c[q>>2]|0);c[(c[k>>2]|0)+4128+72>>2]=c[q>>2];c[(c[k>>2]|0)+4128+76>>2]=(c[r>>2]<<9)+((c[r>>2]|0)>>>23);c[q>>2]=c[8372+((d[45225+(d[45225+(d[44969+(135^d[(c[l>>2]|0)+24>>0])>>0]^d[(c[l>>2]|0)+16>>0])>>0]^d[(c[l>>2]|0)+8>>0])>>0]^d[c[l>>2]>>0])<<2)>>2]^c[9396+((d[45225+(d[44969+(d[44969+(250^d[(c[l>>2]|0)+25>>0])>>0]^d[(c[l>>2]|0)+17>>0])>>0]^d[(c[l>>2]|0)+9>>0])>>0]^d[(c[l>>2]|0)+1>>0])<<2)>>2]^c[10420+((d[44969+(d[45225+(d[45225+(250^d[(c[l>>2]|0)+26>>0])>>0]^d[(c[l>>2]|0)+18>>0])>>0]^d[(c[l>>2]|0)+10>>0])>>0]^d[(c[l>>2]|0)+2>>0])<<2)>>2]^c[11444+((d[44969+(d[44969+(d[45225+(135^d[(c[l>>2]|0)+27>>0])>>0]^d[(c[l>>2]|0)+19>>0])>>0]^d[(c[l>>2]|0)+11>>0])>>0]^d[(c[l>>2]|0)+3>>0])<<2)>>2];c[r>>2]=c[8372+((d[45225+(d[45225+(d[44969+(250^d[(c[l>>2]|0)+28>>0])>>0]^d[(c[l>>2]|0)+20>>0])>>0]^d[(c[l>>2]|0)+12>>0])>>0]^d[(c[l>>2]|0)+4>>0])<<2)>>2]^c[9396+((d[45225+(d[44969+(d[44969+(19^d[(c[l>>2]|0)+29>>0])>>0]^d[(c[l>>2]|0)+21>>0])>>0]^d[(c[l>>2]|0)+13>>0])>>0]^d[(c[l>>2]|0)+5>>0])<<2)>>2]^c[10420+((d[44969+(d[45225+(d[45225+(19^d[(c[l>>2]|0)+30>>0])>>0]^d[(c[l>>2]|0)+22>>0])>>0]^d[(c[l>>2]|0)+14>>0])>>0]^d[(c[l>>2]|0)+6>>0])<<2)>>2]^c[11444+((d[44969+(d[44969+(d[45225+(250^d[(c[l>>2]|0)+31>>0])>>0]^d[(c[l>>2]|0)+23>>0])>>0]^d[(c[l>>2]|0)+15>>0])>>0]^d[(c[l>>2]|0)+7>>0])<<2)>>2];c[r>>2]=(c[r>>2]<<8)+((c[r>>2]|0)>>>24);c[q>>2]=(c[q>>2]|0)+(c[r>>2]|0);c[r>>2]=(c[r>>2]|0)+(c[q>>2]|0);c[(c[k>>2]|0)+4128+80>>2]=c[q>>2];c[(c[k>>2]|0)+4128+84>>2]=(c[r>>2]<<9)+((c[r>>2]|0)>>>23);c[q>>2]=c[8372+((d[45225+(d[45225+(d[44969+(6^d[(c[l>>2]|0)+24>>0])>>0]^d[(c[l>>2]|0)+16>>0])>>0]^d[(c[l>>2]|0)+8>>0])>>0]^d[c[l>>2]>>0])<<2)>>2]^c[9396+((d[45225+(d[44969+(d[44969+(148^d[(c[l>>2]|0)+25>>0])>>0]^d[(c[l>>2]|0)+17>>0])>>0]^d[(c[l>>2]|0)+9>>0])>>0]^d[(c[l>>2]|0)+1>>0])<<2)>>2]^c[10420+((d[44969+(d[45225+(d[45225+(148^d[(c[l>>2]|0)+26>>0])>>0]^d[(c[l>>2]|0)+18>>0])>>0]^d[(c[l>>2]|0)+10>>0])>>0]^d[(c[l>>2]|0)+2>>0])<<2)>>2]^c[11444+((d[44969+(d[44969+(d[45225+(6^d[(c[l>>2]|0)+27>>0])>>0]^d[(c[l>>2]|0)+19>>0])>>0]^d[(c[l>>2]|0)+11>>0])>>0]^d[(c[l>>2]|0)+3>>0])<<2)>>2];c[r>>2]=c[8372+((d[45225+(d[45225+(d[44969+(63^d[(c[l>>2]|0)+28>>0])>>0]^d[(c[l>>2]|0)+20>>0])>>0]^d[(c[l>>2]|0)+12>>0])>>0]^d[(c[l>>2]|0)+4>>0])<<2)>>2]^c[9396+((d[45225+(d[44969+(d[44969+(72^d[(c[l>>2]|0)+29>>0])>>0]^d[(c[l>>2]|0)+21>>0])>>0]^d[(c[l>>2]|0)+13>>0])>>0]^d[(c[l>>2]|0)+5>>0])<<2)>>2]^c[10420+((d[44969+(d[45225+(d[45225+(72^d[(c[l>>2]|0)+30>>0])>>0]^d[(c[l>>2]|0)+22>>0])>>0]^d[(c[l>>2]|0)+14>>0])>>0]^d[(c[l>>2]|0)+6>>0])<<2)>>2]^c[11444+((d[44969+(d[44969+(d[45225+(63^d[(c[l>>2]|0)+31>>0])>>0]^d[(c[l>>2]|0)+23>>0])>>0]^d[(c[l>>2]|0)+15>>0])>>0]^d[(c[l>>2]|0)+7>>0])<<2)>>2];c[r>>2]=(c[r>>2]<<8)+((c[r>>2]|0)>>>24);c[q>>2]=(c[q>>2]|0)+(c[r>>2]|0);c[r>>2]=(c[r>>2]|0)+(c[q>>2]|0);c[(c[k>>2]|0)+4128+88>>2]=c[q>>2];c[(c[k>>2]|0)+4128+92>>2]=(c[r>>2]<<9)+((c[r>>2]|0)>>>23);c[q>>2]=c[8372+((d[45225+(d[45225+(d[44969+(94^d[(c[l>>2]|0)+24>>0])>>0]^d[(c[l>>2]|0)+16>>0])>>0]^d[(c[l>>2]|0)+8>>0])>>0]^d[c[l>>2]>>0])<<2)>>2]^c[9396+((d[45225+(d[44969+(d[44969+(242^d[(c[l>>2]|0)+25>>0])>>0]^d[(c[l>>2]|0)+17>>0])>>0]^d[(c[l>>2]|0)+9>>0])>>0]^d[(c[l>>2]|0)+1>>0])<<2)>>2]^c[10420+((d[44969+(d[45225+(d[45225+(242^d[(c[l>>2]|0)+26>>0])>>0]^d[(c[l>>2]|0)+18>>0])>>0]^d[(c[l>>2]|0)+10>>0])>>0]^d[(c[l>>2]|0)+2>>0])<<2)>>2]^c[11444+((d[44969+(d[44969+(d[45225+(94^d[(c[l>>2]|0)+27>>0])>>0]^d[(c[l>>2]|0)+19>>0])>>0]^d[(c[l>>2]|0)+11>>0])>>0]^d[(c[l>>2]|0)+3>>0])<<2)>>2];c[r>>2]=c[8372+((d[45225+(d[45225+(d[44969+(186^d[(c[l>>2]|0)+28>>0])>>0]^d[(c[l>>2]|0)+20>>0])>>0]^d[(c[l>>2]|0)+12>>0])>>0]^d[(c[l>>2]|0)+4>>0])<<2)>>2]^c[9396+((d[45225+(d[44969+(d[44969+(208^d[(c[l>>2]|0)+29>>0])>>0]^d[(c[l>>2]|0)+21>>0])>>0]^d[(c[l>>2]|0)+13>>0])>>0]^d[(c[l>>2]|0)+5>>0])<<2)>>2]^c[10420+((d[44969+(d[45225+(d[45225+(208^d[(c[l>>2]|0)+30>>0])>>0]^d[(c[l>>2]|0)+22>>0])>>0]^d[(c[l>>2]|0)+14>>0])>>0]^d[(c[l>>2]|0)+6>>0])<<2)>>2]^c[11444+((d[44969+(d[44969+(d[45225+(186^d[(c[l>>2]|0)+31>>0])>>0]^d[(c[l>>2]|0)+23>>0])>>0]^d[(c[l>>2]|0)+15>>0])>>0]^d[(c[l>>2]|0)+7>>0])<<2)>>2];c[r>>2]=(c[r>>2]<<8)+((c[r>>2]|0)>>>24);c[q>>2]=(c[q>>2]|0)+(c[r>>2]|0);c[r>>2]=(c[r>>2]|0)+(c[q>>2]|0);c[(c[k>>2]|0)+4128+96>>2]=c[q>>2];c[(c[k>>2]|0)+4128+100>>2]=(c[r>>2]<<9)+((c[r>>2]|0)>>>23);c[q>>2]=c[8372+((d[45225+(d[45225+(d[44969+(174^d[(c[l>>2]|0)+24>>0])>>0]^d[(c[l>>2]|0)+16>>0])>>0]^d[(c[l>>2]|0)+8>>0])>>0]^d[c[l>>2]>>0])<<2)>>2]^c[9396+((d[45225+(d[44969+(d[44969+(139^d[(c[l>>2]|0)+25>>0])>>0]^d[(c[l>>2]|0)+17>>0])>>0]^d[(c[l>>2]|0)+9>>0])>>0]^d[(c[l>>2]|0)+1>>0])<<2)>>2]^c[10420+((d[44969+(d[45225+(d[45225+(139^d[(c[l>>2]|0)+26>>0])>>0]^d[(c[l>>2]|0)+18>>0])>>0]^d[(c[l>>2]|0)+10>>0])>>0]^d[(c[l>>2]|0)+2>>0])<<2)>>2]^c[11444+((d[44969+(d[44969+(d[45225+(174^d[(c[l>>2]|0)+27>>0])>>0]^d[(c[l>>2]|0)+19>>0])>>0]^d[(c[l>>2]|0)+11>>0])>>0]^d[(c[l>>2]|0)+3>>0])<<2)>>2];c[r>>2]=c[8372+((d[45225+(d[45225+(d[44969+(91^d[(c[l>>2]|0)+28>>0])>>0]^d[(c[l>>2]|0)+20>>0])>>0]^d[(c[l>>2]|0)+12>>0])>>0]^d[(c[l>>2]|0)+4>>0])<<2)>>2]^c[9396+((d[45225+(d[44969+(d[44969+(48^d[(c[l>>2]|0)+29>>0])>>0]^d[(c[l>>2]|0)+21>>0])>>0]^d[(c[l>>2]|0)+13>>0])>>0]^d[(c[l>>2]|0)+5>>0])<<2)>>2]^c[10420+((d[44969+(d[45225+(d[45225+(48^d[(c[l>>2]|0)+30>>0])>>0]^d[(c[l>>2]|0)+22>>0])>>0]^d[(c[l>>2]|0)+14>>0])>>0]^d[(c[l>>2]|0)+6>>0])<<2)>>2]^c[11444+((d[44969+(d[44969+(d[45225+(91^d[(c[l>>2]|0)+31>>0])>>0]^d[(c[l>>2]|0)+23>>0])>>0]^d[(c[l>>2]|0)+15>>0])>>0]^d[(c[l>>2]|0)+7>>0])<<2)>>2];c[r>>2]=(c[r>>2]<<8)+((c[r>>2]|0)>>>24);c[q>>2]=(c[q>>2]|0)+(c[r>>2]|0);c[r>>2]=(c[r>>2]|0)+(c[q>>2]|0);c[(c[k>>2]|0)+4128+104>>2]=c[q>>2];c[(c[k>>2]|0)+4128+108>>2]=(c[r>>2]<<9)+((c[r>>2]|0)>>>23);c[q>>2]=c[8372+((d[45225+(d[45225+(d[44969+(138^d[(c[l>>2]|0)+24>>0])>>0]^d[(c[l>>2]|0)+16>>0])>>0]^d[(c[l>>2]|0)+8>>0])>>0]^d[c[l>>2]>>0])<<2)>>2]^c[9396+((d[45225+(d[44969+(d[44969+(132^d[(c[l>>2]|0)+25>>0])>>0]^d[(c[l>>2]|0)+17>>0])>>0]^d[(c[l>>2]|0)+9>>0])>>0]^d[(c[l>>2]|0)+1>>0])<<2)>>2]^c[10420+((d[44969+(d[45225+(d[45225+(132^d[(c[l>>2]|0)+26>>0])>>0]^d[(c[l>>2]|0)+18>>0])>>0]^d[(c[l>>2]|0)+10>>0])>>0]^d[(c[l>>2]|0)+2>>0])<<2)>>2]^c[11444+((d[44969+(d[44969+(d[45225+(138^d[(c[l>>2]|0)+27>>0])>>0]^d[(c[l>>2]|0)+19>>0])>>0]^d[(c[l>>2]|0)+11>>0])>>0]^d[(c[l>>2]|0)+3>>0])<<2)>>2];c[r>>2]=c[8372+((d[45225+(d[45225+(d[44969+(0^d[(c[l>>2]|0)+28>>0])>>0]^d[(c[l>>2]|0)+20>>0])>>0]^d[(c[l>>2]|0)+12>>0])>>0]^d[(c[l>>2]|0)+4>>0])<<2)>>2]^c[9396+((d[45225+(d[44969+(d[44969+(84^d[(c[l>>2]|0)+29>>0])>>0]^d[(c[l>>2]|0)+21>>0])>>0]^d[(c[l>>2]|0)+13>>0])>>0]^d[(c[l>>2]|0)+5>>0])<<2)>>2]^c[10420+((d[44969+(d[45225+(d[45225+(84^d[(c[l>>2]|0)+30>>0])>>0]^d[(c[l>>2]|0)+22>>0])>>0]^d[(c[l>>2]|0)+14>>0])>>0]^d[(c[l>>2]|0)+6>>0])<<2)>>2]^c[11444+((d[44969+(d[44969+(d[45225+(0^d[(c[l>>2]|0)+31>>0])>>0]^d[(c[l>>2]|0)+23>>0])>>0]^d[(c[l>>2]|0)+15>>0])>>0]^d[(c[l>>2]|0)+7>>0])<<2)>>2];c[r>>2]=(c[r>>2]<<8)+((c[r>>2]|0)>>>24);c[q>>2]=(c[q>>2]|0)+(c[r>>2]|0);c[r>>2]=(c[r>>2]|0)+(c[q>>2]|0);c[(c[k>>2]|0)+4128+112>>2]=c[q>>2];c[(c[k>>2]|0)+4128+116>>2]=(c[r>>2]<<9)+((c[r>>2]|0)>>>23);c[q>>2]=c[8372+((d[45225+(d[45225+(d[44969+(188^d[(c[l>>2]|0)+24>>0])>>0]^d[(c[l>>2]|0)+16>>0])>>0]^d[(c[l>>2]|0)+8>>0])>>0]^d[c[l>>2]>>0])<<2)>>2]^c[9396+((d[45225+(d[44969+(d[44969+(223^d[(c[l>>2]|0)+25>>0])>>0]^d[(c[l>>2]|0)+17>>0])>>0]^d[(c[l>>2]|0)+9>>0])>>0]^d[(c[l>>2]|0)+1>>0])<<2)>>2]^c[10420+((d[44969+(d[45225+(d[45225+(223^d[(c[l>>2]|0)+26>>0])>>0]^d[(c[l>>2]|0)+18>>0])>>0]^d[(c[l>>2]|0)+10>>0])>>0]^d[(c[l>>2]|0)+2>>0])<<2)>>2]^c[11444+((d[44969+(d[44969+(d[45225+(188^d[(c[l>>2]|0)+27>>0])>>0]^d[(c[l>>2]|0)+19>>0])>>0]^d[(c[l>>2]|0)+11>>0])>>0]^d[(c[l>>2]|0)+3>>0])<<2)>>2];c[r>>2]=c[8372+((d[45225+(d[45225+(d[44969+(157^d[(c[l>>2]|0)+28>>0])>>0]^d[(c[l>>2]|0)+20>>0])>>0]^d[(c[l>>2]|0)+12>>0])>>0]^d[(c[l>>2]|0)+4>>0])<<2)>>2]^c[9396+((d[45225+(d[44969+(d[44969+(35^d[(c[l>>2]|0)+29>>0])>>0]^d[(c[l>>2]|0)+21>>0])>>0]^d[(c[l>>2]|0)+13>>0])>>0]^d[(c[l>>2]|0)+5>>0])<<2)>>2]^c[10420+((d[44969+(d[45225+(d[45225+(35^d[(c[l>>2]|0)+30>>0])>>0]^d[(c[l>>2]|0)+22>>0])>>0]^d[(c[l>>2]|0)+14>>0])>>0]^d[(c[l>>2]|0)+6>>0])<<2)>>2]^c[11444+((d[44969+(d[44969+(d[45225+(157^d[(c[l>>2]|0)+31>>0])>>0]^d[(c[l>>2]|0)+23>>0])>>0]^d[(c[l>>2]|0)+15>>0])>>0]^d[(c[l>>2]|0)+7>>0])<<2)>>2];c[r>>2]=(c[r>>2]<<8)+((c[r>>2]|0)>>>24);c[q>>2]=(c[q>>2]|0)+(c[r>>2]|0);c[r>>2]=(c[r>>2]|0)+(c[q>>2]|0);c[(c[k>>2]|0)+4128+120>>2]=c[q>>2];c[(c[k>>2]|0)+4128+124>>2]=(c[r>>2]<<9)+((c[r>>2]|0)>>>23)}else{c[o>>2]=0;c[n>>2]=0;c[p>>2]=1;while(1){if((c[n>>2]|0)>=256)break;c[(c[k>>2]|0)+(c[n>>2]<<2)>>2]=c[8372+((d[45225+(d[44457+(c[o>>2]|0)>>0]^d[s>>0])>>0]^d[w>>0])<<2)>>2];c[(c[k>>2]|0)+1024+(c[n>>2]<<2)>>2]=c[9396+((d[45225+(d[44457+(c[p>>2]|0)>>0]^d[t>>0])>>0]^d[x>>0])<<2)>>2];c[(c[k>>2]|0)+2048+(c[n>>2]<<2)>>2]=c[10420+((d[44969+(d[44457+(c[o>>2]|0)>>0]^d[u>>0])>>0]^d[y>>0])<<2)>>2];c[(c[k>>2]|0)+3072+(c[n>>2]<<2)>>2]=c[11444+((d[44969+(d[44457+(c[p>>2]|0)>>0]^d[v>>0])>>0]^d[z>>0])<<2)>>2];c[n>>2]=(c[n>>2]|0)+1;c[o>>2]=(c[o>>2]|0)+2;c[p>>2]=(c[p>>2]|0)+2}c[q>>2]=c[8372+((d[45225+(169^d[(c[l>>2]|0)+8>>0])>>0]^d[c[l>>2]>>0])<<2)>>2]^c[9396+((d[45225+(117^d[(c[l>>2]|0)+9>>0])>>0]^d[(c[l>>2]|0)+1>>0])<<2)>>2]^c[10420+((d[44969+(169^d[(c[l>>2]|0)+10>>0])>>0]^d[(c[l>>2]|0)+2>>0])<<2)>>2]^c[11444+((d[44969+(117^d[(c[l>>2]|0)+11>>0])>>0]^d[(c[l>>2]|0)+3>>0])<<2)>>2];c[r>>2]=c[8372+((d[45225+(103^d[(c[l>>2]|0)+12>>0])>>0]^d[(c[l>>2]|0)+4>>0])<<2)>>2]^c[9396+((d[45225+(243^d[(c[l>>2]|0)+13>>0])>>0]^d[(c[l>>2]|0)+5>>0])<<2)>>2]^c[10420+((d[44969+(103^d[(c[l>>2]|0)+14>>0])>>0]^d[(c[l>>2]|0)+6>>0])<<2)>>2]^c[11444+((d[44969+(243^d[(c[l>>2]|0)+15>>0])>>0]^d[(c[l>>2]|0)+7>>0])<<2)>>2];c[r>>2]=(c[r>>2]<<8)+((c[r>>2]|0)>>>24);c[q>>2]=(c[q>>2]|0)+(c[r>>2]|0);c[r>>2]=(c[r>>2]|0)+(c[q>>2]|0);c[(c[k>>2]|0)+4096>>2]=c[q>>2];c[(c[k>>2]|0)+4096+4>>2]=(c[r>>2]<<9)+((c[r>>2]|0)>>>23);c[q>>2]=c[8372+((d[45225+(179^d[(c[l>>2]|0)+8>>0])>>0]^d[c[l>>2]>>0])<<2)>>2]^c[9396+((d[45225+(198^d[(c[l>>2]|0)+9>>0])>>0]^d[(c[l>>2]|0)+1>>0])<<2)>>2]^c[10420+((d[44969+(179^d[(c[l>>2]|0)+10>>0])>>0]^d[(c[l>>2]|0)+2>>0])<<2)>>2]^c[11444+((d[44969+(198^d[(c[l>>2]|0)+11>>0])>>0]^d[(c[l>>2]|0)+3>>0])<<2)>>2];c[r>>2]=c[8372+((d[45225+(232^d[(c[l>>2]|0)+12>>0])>>0]^d[(c[l>>2]|0)+4>>0])<<2)>>2]^c[9396+((d[45225+(244^d[(c[l>>2]|0)+13>>0])>>0]^d[(c[l>>2]|0)+5>>0])<<2)>>2]^c[10420+((d[44969+(232^d[(c[l>>2]|0)+14>>0])>>0]^d[(c[l>>2]|0)+6>>0])<<2)>>2]^c[11444+((d[44969+(244^d[(c[l>>2]|0)+15>>0])>>0]^d[(c[l>>2]|0)+7>>0])<<2)>>2];c[r>>2]=(c[r>>2]<<8)+((c[r>>2]|0)>>>24);c[q>>2]=(c[q>>2]|0)+(c[r>>2]|0);c[r>>2]=(c[r>>2]|0)+(c[q>>2]|0);c[(c[k>>2]|0)+4096+8>>2]=c[q>>2];c[(c[k>>2]|0)+4096+12>>2]=(c[r>>2]<<9)+((c[r>>2]|0)>>>23);c[q>>2]=c[8372+((d[45225+(4^d[(c[l>>2]|0)+8>>0])>>0]^d[c[l>>2]>>0])<<2)>>2]^c[9396+((d[45225+(219^d[(c[l>>2]|0)+9>>0])>>0]^d[(c[l>>2]|0)+1>>0])<<2)>>2]^c[10420+((d[44969+(4^d[(c[l>>2]|0)+10>>0])>>0]^d[(c[l>>2]|0)+2>>0])<<2)>>2]^c[11444+((d[44969+(219^d[(c[l>>2]|0)+11>>0])>>0]^d[(c[l>>2]|0)+3>>0])<<2)>>2];c[r>>2]=c[8372+((d[45225+(253^d[(c[l>>2]|0)+12>>0])>>0]^d[(c[l>>2]|0)+4>>0])<<2)>>2]^c[9396+((d[45225+(123^d[(c[l>>2]|0)+13>>0])>>0]^d[(c[l>>2]|0)+5>>0])<<2)>>2]^c[10420+((d[44969+(253^d[(c[l>>2]|0)+14>>0])>>0]^d[(c[l>>2]|0)+6>>0])<<2)>>2]^c[11444+((d[44969+(123^d[(c[l>>2]|0)+15>>0])>>0]^d[(c[l>>2]|0)+7>>0])<<2)>>2];c[r>>2]=(c[r>>2]<<8)+((c[r>>2]|0)>>>24);c[q>>2]=(c[q>>2]|0)+(c[r>>2]|0);c[r>>2]=(c[r>>2]|0)+(c[q>>2]|0);c[(c[k>>2]|0)+4096+16>>2]=c[q>>2];c[(c[k>>2]|0)+4096+20>>2]=(c[r>>2]<<9)+((c[r>>2]|0)>>>23);c[q>>2]=c[8372+((d[45225+(163^d[(c[l>>2]|0)+8>>0])>>0]^d[c[l>>2]>>0])<<2)>>2]^c[9396+((d[45225+(251^d[(c[l>>2]|0)+9>>0])>>0]^d[(c[l>>2]|0)+1>>0])<<2)>>2]^c[10420+((d[44969+(163^d[(c[l>>2]|0)+10>>0])>>0]^d[(c[l>>2]|0)+2>>0])<<2)>>2]^c[11444+((d[44969+(251^d[(c[l>>2]|0)+11>>0])>>0]^d[(c[l>>2]|0)+3>>0])<<2)>>2];c[r>>2]=c[8372+((d[45225+(118^d[(c[l>>2]|0)+12>>0])>>0]^d[(c[l>>2]|0)+4>>0])<<2)>>2]^c[9396+((d[45225+(200^d[(c[l>>2]|0)+13>>0])>>0]^d[(c[l>>2]|0)+5>>0])<<2)>>2]^c[10420+((d[44969+(118^d[(c[l>>2]|0)+14>>0])>>0]^d[(c[l>>2]|0)+6>>0])<<2)>>2]^c[11444+((d[44969+(200^d[(c[l>>2]|0)+15>>0])>>0]^d[(c[l>>2]|0)+7>>0])<<2)>>2];c[r>>2]=(c[r>>2]<<8)+((c[r>>2]|0)>>>24);c[q>>2]=(c[q>>2]|0)+(c[r>>2]|0);c[r>>2]=(c[r>>2]|0)+(c[q>>2]|0);c[(c[k>>2]|0)+4096+24>>2]=c[q>>2];c[(c[k>>2]|0)+4096+28>>2]=(c[r>>2]<<9)+((c[r>>2]|0)>>>23);c[q>>2]=c[8372+((d[45225+(154^d[(c[l>>2]|0)+8>>0])>>0]^d[c[l>>2]>>0])<<2)>>2]^c[9396+((d[45225+(74^d[(c[l>>2]|0)+9>>0])>>0]^d[(c[l>>2]|0)+1>>0])<<2)>>2]^c[10420+((d[44969+(154^d[(c[l>>2]|0)+10>>0])>>0]^d[(c[l>>2]|0)+2>>0])<<2)>>2]^c[11444+((d[44969+(74^d[(c[l>>2]|0)+11>>0])>>0]^d[(c[l>>2]|0)+3>>0])<<2)>>2];c[r>>2]=c[8372+((d[45225+(146^d[(c[l>>2]|0)+12>>0])>>0]^d[(c[l>>2]|0)+4>>0])<<2)>>2]^c[9396+((d[45225+(211^d[(c[l>>2]|0)+13>>0])>>0]^d[(c[l>>2]|0)+5>>0])<<2)>>2]^c[10420+((d[44969+(146^d[(c[l>>2]|0)+14>>0])>>0]^d[(c[l>>2]|0)+6>>0])<<2)>>2]^c[11444+((d[44969+(211^d[(c[l>>2]|0)+15>>0])>>0]^d[(c[l>>2]|0)+7>>0])<<2)>>2];c[r>>2]=(c[r>>2]<<8)+((c[r>>2]|0)>>>24);c[q>>2]=(c[q>>2]|0)+(c[r>>2]|0);c[r>>2]=(c[r>>2]|0)+(c[q>>2]|0);c[(c[k>>2]|0)+4128>>2]=c[q>>2];c[(c[k>>2]|0)+4128+4>>2]=(c[r>>2]<<9)+((c[r>>2]|0)>>>23);c[q>>2]=c[8372+((d[45225+(128^d[(c[l>>2]|0)+8>>0])>>0]^d[c[l>>2]>>0])<<2)>>2]^c[9396+((d[45225+(230^d[(c[l>>2]|0)+9>>0])>>0]^d[(c[l>>2]|0)+1>>0])<<2)>>2]^c[10420+((d[44969+(128^d[(c[l>>2]|0)+10>>0])>>0]^d[(c[l>>2]|0)+2>>0])<<2)>>2]^c[11444+((d[44969+(230^d[(c[l>>2]|0)+11>>0])>>0]^d[(c[l>>2]|0)+3>>0])<<2)>>2];c[r>>2]=c[8372+((d[45225+(120^d[(c[l>>2]|0)+12>>0])>>0]^d[(c[l>>2]|0)+4>>0])<<2)>>2]^c[9396+((d[45225+(107^d[(c[l>>2]|0)+13>>0])>>0]^d[(c[l>>2]|0)+5>>0])<<2)>>2]^c[10420+((d[44969+(120^d[(c[l>>2]|0)+14>>0])>>0]^d[(c[l>>2]|0)+6>>0])<<2)>>2]^c[11444+((d[44969+(107^d[(c[l>>2]|0)+15>>0])>>0]^d[(c[l>>2]|0)+7>>0])<<2)>>2];c[r>>2]=(c[r>>2]<<8)+((c[r>>2]|0)>>>24);c[q>>2]=(c[q>>2]|0)+(c[r>>2]|0);c[r>>2]=(c[r>>2]|0)+(c[q>>2]|0);c[(c[k>>2]|0)+4128+8>>2]=c[q>>2];c[(c[k>>2]|0)+4128+12>>2]=(c[r>>2]<<9)+((c[r>>2]|0)>>>23);c[q>>2]=c[8372+((d[45225+(228^d[(c[l>>2]|0)+8>>0])>>0]^d[c[l>>2]>>0])<<2)>>2]^c[9396+((d[45225+(69^d[(c[l>>2]|0)+9>>0])>>0]^d[(c[l>>2]|0)+1>>0])<<2)>>2]^c[10420+((d[44969+(228^d[(c[l>>2]|0)+10>>0])>>0]^d[(c[l>>2]|0)+2>>0])<<2)>>2]^c[11444+((d[44969+(69^d[(c[l>>2]|0)+11>>0])>>0]^d[(c[l>>2]|0)+3>>0])<<2)>>2];c[r>>2]=c[8372+((d[45225+(221^d[(c[l>>2]|0)+12>>0])>>0]^d[(c[l>>2]|0)+4>>0])<<2)>>2]^c[9396+((d[45225+(125^d[(c[l>>2]|0)+13>>0])>>0]^d[(c[l>>2]|0)+5>>0])<<2)>>2]^c[10420+((d[44969+(221^d[(c[l>>2]|0)+14>>0])>>0]^d[(c[l>>2]|0)+6>>0])<<2)>>2]^c[11444+((d[44969+(125^d[(c[l>>2]|0)+15>>0])>>0]^d[(c[l>>2]|0)+7>>0])<<2)>>2];c[r>>2]=(c[r>>2]<<8)+((c[r>>2]|0)>>>24);c[q>>2]=(c[q>>2]|0)+(c[r>>2]|0);c[r>>2]=(c[r>>2]|0)+(c[q>>2]|0);c[(c[k>>2]|0)+4128+16>>2]=c[q>>2];c[(c[k>>2]|0)+4128+20>>2]=(c[r>>2]<<9)+((c[r>>2]|0)>>>23);c[q>>2]=c[8372+((d[45225+(209^d[(c[l>>2]|0)+8>>0])>>0]^d[c[l>>2]>>0])<<2)>>2]^c[9396+((d[45225+(232^d[(c[l>>2]|0)+9>>0])>>0]^d[(c[l>>2]|0)+1>>0])<<2)>>2]^c[10420+((d[44969+(209^d[(c[l>>2]|0)+10>>0])>>0]^d[(c[l>>2]|0)+2>>0])<<2)>>2]^c[11444+((d[44969+(232^d[(c[l>>2]|0)+11>>0])>>0]^d[(c[l>>2]|0)+3>>0])<<2)>>2];c[r>>2]=c[8372+((d[45225+(56^d[(c[l>>2]|0)+12>>0])>>0]^d[(c[l>>2]|0)+4>>0])<<2)>>2]^c[9396+((d[45225+(75^d[(c[l>>2]|0)+13>>0])>>0]^d[(c[l>>2]|0)+5>>0])<<2)>>2]^c[10420+((d[44969+(56^d[(c[l>>2]|0)+14>>0])>>0]^d[(c[l>>2]|0)+6>>0])<<2)>>2]^c[11444+((d[44969+(75^d[(c[l>>2]|0)+15>>0])>>0]^d[(c[l>>2]|0)+7>>0])<<2)>>2];c[r>>2]=(c[r>>2]<<8)+((c[r>>2]|0)>>>24);c[q>>2]=(c[q>>2]|0)+(c[r>>2]|0);c[r>>2]=(c[r>>2]|0)+(c[q>>2]|0);c[(c[k>>2]|0)+4128+24>>2]=c[q>>2];c[(c[k>>2]|0)+4128+28>>2]=(c[r>>2]<<9)+((c[r>>2]|0)>>>23);c[q>>2]=c[8372+((d[45225+(13^d[(c[l>>2]|0)+8>>0])>>0]^d[c[l>>2]>>0])<<2)>>2]^c[9396+((d[45225+(214^d[(c[l>>2]|0)+9>>0])>>0]^d[(c[l>>2]|0)+1>>0])<<2)>>2]^c[10420+((d[44969+(13^d[(c[l>>2]|0)+10>>0])>>0]^d[(c[l>>2]|0)+2>>0])<<2)>>2]^c[11444+((d[44969+(214^d[(c[l>>2]|0)+11>>0])>>0]^d[(c[l>>2]|0)+3>>0])<<2)>>2];c[r>>2]=c[8372+((d[45225+(198^d[(c[l>>2]|0)+12>>0])>>0]^d[(c[l>>2]|0)+4>>0])<<2)>>2]^c[9396+((d[45225+(50^d[(c[l>>2]|0)+13>>0])>>0]^d[(c[l>>2]|0)+5>>0])<<2)>>2]^c[10420+((d[44969+(198^d[(c[l>>2]|0)+14>>0])>>0]^d[(c[l>>2]|0)+6>>0])<<2)>>2]^c[11444+((d[44969+(50^d[(c[l>>2]|0)+15>>0])>>0]^d[(c[l>>2]|0)+7>>0])<<2)>>2];c[r>>2]=(c[r>>2]<<8)+((c[r>>2]|0)>>>24);c[q>>2]=(c[q>>2]|0)+(c[r>>2]|0);c[r>>2]=(c[r>>2]|0)+(c[q>>2]|0);c[(c[k>>2]|0)+4128+32>>2]=c[q>>2];c[(c[k>>2]|0)+4128+36>>2]=(c[r>>2]<<9)+((c[r>>2]|0)>>>23);c[q>>2]=c[8372+((d[45225+(53^d[(c[l>>2]|0)+8>>0])>>0]^d[c[l>>2]>>0])<<2)>>2]^c[9396+((d[45225+(216^d[(c[l>>2]|0)+9>>0])>>0]^d[(c[l>>2]|0)+1>>0])<<2)>>2]^c[10420+((d[44969+(53^d[(c[l>>2]|0)+10>>0])>>0]^d[(c[l>>2]|0)+2>>0])<<2)>>2]^c[11444+((d[44969+(216^d[(c[l>>2]|0)+11>>0])>>0]^d[(c[l>>2]|0)+3>>0])<<2)>>2];c[r>>2]=c[8372+((d[45225+(152^d[(c[l>>2]|0)+12>>0])>>0]^d[(c[l>>2]|0)+4>>0])<<2)>>2]^c[9396+((d[45225+(253^d[(c[l>>2]|0)+13>>0])>>0]^d[(c[l>>2]|0)+5>>0])<<2)>>2]^c[10420+((d[44969+(152^d[(c[l>>2]|0)+14>>0])>>0]^d[(c[l>>2]|0)+6>>0])<<2)>>2]^c[11444+((d[44969+(253^d[(c[l>>2]|0)+15>>0])>>0]^d[(c[l>>2]|0)+7>>0])<<2)>>2];c[r>>2]=(c[r>>2]<<8)+((c[r>>2]|0)>>>24);c[q>>2]=(c[q>>2]|0)+(c[r>>2]|0);c[r>>2]=(c[r>>2]|0)+(c[q>>2]|0);c[(c[k>>2]|0)+4128+40>>2]=c[q>>2];c[(c[k>>2]|0)+4128+44>>2]=(c[r>>2]<<9)+((c[r>>2]|0)>>>23);c[q>>2]=c[8372+((d[45225+(24^d[(c[l>>2]|0)+8>>0])>>0]^d[c[l>>2]>>0])<<2)>>2]^c[9396+((d[45225+(55^d[(c[l>>2]|0)+9>>0])>>0]^d[(c[l>>2]|0)+1>>0])<<2)>>2]^c[10420+((d[44969+(24^d[(c[l>>2]|0)+10>>0])>>0]^d[(c[l>>2]|0)+2>>0])<<2)>>2]^c[11444+((d[44969+(55^d[(c[l>>2]|0)+11>>0])>>0]^d[(c[l>>2]|0)+3>>0])<<2)>>2];c[r>>2]=c[8372+((d[45225+(247^d[(c[l>>2]|0)+12>>0])>>0]^d[(c[l>>2]|0)+4>>0])<<2)>>2]^c[9396+((d[45225+(113^d[(c[l>>2]|0)+13>>0])>>0]^d[(c[l>>2]|0)+5>>0])<<2)>>2]^c[10420+((d[44969+(247^d[(c[l>>2]|0)+14>>0])>>0]^d[(c[l>>2]|0)+6>>0])<<2)>>2]^c[11444+((d[44969+(113^d[(c[l>>2]|0)+15>>0])>>0]^d[(c[l>>2]|0)+7>>0])<<2)>>2];c[r>>2]=(c[r>>2]<<8)+((c[r>>2]|0)>>>24);c[q>>2]=(c[q>>2]|0)+(c[r>>2]|0);c[r>>2]=(c[r>>2]|0)+(c[q>>2]|0);c[(c[k>>2]|0)+4128+48>>2]=c[q>>2];c[(c[k>>2]|0)+4128+52>>2]=(c[r>>2]<<9)+((c[r>>2]|0)>>>23);c[q>>2]=c[8372+((d[45225+(236^d[(c[l>>2]|0)+8>>0])>>0]^d[c[l>>2]>>0])<<2)>>2]^c[9396+((d[45225+(241^d[(c[l>>2]|0)+9>>0])>>0]^d[(c[l>>2]|0)+1>>0])<<2)>>2]^c[10420+((d[44969+(236^d[(c[l>>2]|0)+10>>0])>>0]^d[(c[l>>2]|0)+2>>0])<<2)>>2]^c[11444+((d[44969+(241^d[(c[l>>2]|0)+11>>0])>>0]^d[(c[l>>2]|0)+3>>0])<<2)>>2];c[r>>2]=c[8372+((d[45225+(108^d[(c[l>>2]|0)+12>>0])>>0]^d[(c[l>>2]|0)+4>>0])<<2)>>2]^c[9396+((d[45225+(225^d[(c[l>>2]|0)+13>>0])>>0]^d[(c[l>>2]|0)+5>>0])<<2)>>2]^c[10420+((d[44969+(108^d[(c[l>>2]|0)+14>>0])>>0]^d[(c[l>>2]|0)+6>>0])<<2)>>2]^c[11444+((d[44969+(225^d[(c[l>>2]|0)+15>>0])>>0]^d[(c[l>>2]|0)+7>>0])<<2)>>2];c[r>>2]=(c[r>>2]<<8)+((c[r>>2]|0)>>>24);c[q>>2]=(c[q>>2]|0)+(c[r>>2]|0);c[r>>2]=(c[r>>2]|0)+(c[q>>2]|0);c[(c[k>>2]|0)+4128+56>>2]=c[q>>2];c[(c[k>>2]|0)+4128+60>>2]=(c[r>>2]<<9)+((c[r>>2]|0)>>>23);c[q>>2]=c[8372+((d[45225+(67^d[(c[l>>2]|0)+8>>0])>>0]^d[c[l>>2]>>0])<<2)>>2]^c[9396+((d[45225+(48^d[(c[l>>2]|0)+9>>0])>>0]^d[(c[l>>2]|0)+1>>0])<<2)>>2]^c[10420+((d[44969+(67^d[(c[l>>2]|0)+10>>0])>>0]^d[(c[l>>2]|0)+2>>0])<<2)>>2]^c[11444+((d[44969+(48^d[(c[l>>2]|0)+11>>0])>>0]^d[(c[l>>2]|0)+3>>0])<<2)>>2];c[r>>2]=c[8372+((d[45225+(117^d[(c[l>>2]|0)+12>>0])>>0]^d[(c[l>>2]|0)+4>>0])<<2)>>2]^c[9396+((d[45225+(15^d[(c[l>>2]|0)+13>>0])>>0]^d[(c[l>>2]|0)+5>>0])<<2)>>2]^c[10420+((d[44969+(117^d[(c[l>>2]|0)+14>>0])>>0]^d[(c[l>>2]|0)+6>>0])<<2)>>2]^c[11444+((d[44969+(15^d[(c[l>>2]|0)+15>>0])>>0]^d[(c[l>>2]|0)+7>>0])<<2)>>2];c[r>>2]=(c[r>>2]<<8)+((c[r>>2]|0)>>>24);c[q>>2]=(c[q>>2]|0)+(c[r>>2]|0);c[r>>2]=(c[r>>2]|0)+(c[q>>2]|0);c[(c[k>>2]|0)+4128+64>>2]=c[q>>2];c[(c[k>>2]|0)+4128+68>>2]=(c[r>>2]<<9)+((c[r>>2]|0)>>>23);c[q>>2]=c[8372+((d[45225+(55^d[(c[l>>2]|0)+8>>0])>>0]^d[c[l>>2]>>0])<<2)>>2]^c[9396+((d[45225+(248^d[(c[l>>2]|0)+9>>0])>>0]^d[(c[l>>2]|0)+1>>0])<<2)>>2]^c[10420+((d[44969+(55^d[(c[l>>2]|0)+10>>0])>>0]^d[(c[l>>2]|0)+2>>0])<<2)>>2]^c[11444+((d[44969+(248^d[(c[l>>2]|0)+11>>0])>>0]^d[(c[l>>2]|0)+3>>0])<<2)>>2];c[r>>2]=c[8372+((d[45225+(38^d[(c[l>>2]|0)+12>>0])>>0]^d[(c[l>>2]|0)+4>>0])<<2)>>2]^c[9396+((d[45225+(27^d[(c[l>>2]|0)+13>>0])>>0]^d[(c[l>>2]|0)+5>>0])<<2)>>2]^c[10420+((d[44969+(38^d[(c[l>>2]|0)+14>>0])>>0]^d[(c[l>>2]|0)+6>>0])<<2)>>2]^c[11444+((d[44969+(27^d[(c[l>>2]|0)+15>>0])>>0]^d[(c[l>>2]|0)+7>>0])<<2)>>2];c[r>>2]=(c[r>>2]<<8)+((c[r>>2]|0)>>>24);c[q>>2]=(c[q>>2]|0)+(c[r>>2]|0);c[r>>2]=(c[r>>2]|0)+(c[q>>2]|0);c[(c[k>>2]|0)+4128+72>>2]=c[q>>2];c[(c[k>>2]|0)+4128+76>>2]=(c[r>>2]<<9)+((c[r>>2]|0)>>>23);c[q>>2]=c[8372+((d[45225+(250^d[(c[l>>2]|0)+8>>0])>>0]^d[c[l>>2]>>0])<<2)>>2]^c[9396+((d[45225+(135^d[(c[l>>2]|0)+9>>0])>>0]^d[(c[l>>2]|0)+1>>0])<<2)>>2]^c[10420+((d[44969+(250^d[(c[l>>2]|0)+10>>0])>>0]^d[(c[l>>2]|0)+2>>0])<<2)>>2]^c[11444+((d[44969+(135^d[(c[l>>2]|0)+11>>0])>>0]^d[(c[l>>2]|0)+3>>0])<<2)>>2];c[r>>2]=c[8372+((d[45225+(19^d[(c[l>>2]|0)+12>>0])>>0]^d[(c[l>>2]|0)+4>>0])<<2)>>2]^c[9396+((d[45225+(250^d[(c[l>>2]|0)+13>>0])>>0]^d[(c[l>>2]|0)+5>>0])<<2)>>2]^c[10420+((d[44969+(19^d[(c[l>>2]|0)+14>>0])>>0]^d[(c[l>>2]|0)+6>>0])<<2)>>2]^c[11444+((d[44969+(250^d[(c[l>>2]|0)+15>>0])>>0]^d[(c[l>>2]|0)+7>>0])<<2)>>2];c[r>>2]=(c[r>>2]<<8)+((c[r>>2]|0)>>>24);c[q>>2]=(c[q>>2]|0)+(c[r>>2]|0);c[r>>2]=(c[r>>2]|0)+(c[q>>2]|0);c[(c[k>>2]|0)+4128+80>>2]=c[q>>2];c[(c[k>>2]|0)+4128+84>>2]=(c[r>>2]<<9)+((c[r>>2]|0)>>>23);c[q>>2]=c[8372+((d[45225+(148^d[(c[l>>2]|0)+8>>0])>>0]^d[c[l>>2]>>0])<<2)>>2]^c[9396+((d[45225+(6^d[(c[l>>2]|0)+9>>0])>>0]^d[(c[l>>2]|0)+1>>0])<<2)>>2]^c[10420+((d[44969+(148^d[(c[l>>2]|0)+10>>0])>>0]^d[(c[l>>2]|0)+2>>0])<<2)>>2]^c[11444+((d[44969+(6^d[(c[l>>2]|0)+11>>0])>>0]^d[(c[l>>2]|0)+3>>0])<<2)>>2];c[r>>2]=c[8372+((d[45225+(72^d[(c[l>>2]|0)+12>>0])>>0]^d[(c[l>>2]|0)+4>>0])<<2)>>2]^c[9396+((d[45225+(63^d[(c[l>>2]|0)+13>>0])>>0]^d[(c[l>>2]|0)+5>>0])<<2)>>2]^c[10420+((d[44969+(72^d[(c[l>>2]|0)+14>>0])>>0]^d[(c[l>>2]|0)+6>>0])<<2)>>2]^c[11444+((d[44969+(63^d[(c[l>>2]|0)+15>>0])>>0]^d[(c[l>>2]|0)+7>>0])<<2)>>2];c[r>>2]=(c[r>>2]<<8)+((c[r>>2]|0)>>>24);c[q>>2]=(c[q>>2]|0)+(c[r>>2]|0);c[r>>2]=(c[r>>2]|0)+(c[q>>2]|0);c[(c[k>>2]|0)+4128+88>>2]=c[q>>2];c[(c[k>>2]|0)+4128+92>>2]=(c[r>>2]<<9)+((c[r>>2]|0)>>>23);c[q>>2]=c[8372+((d[45225+(242^d[(c[l>>2]|0)+8>>0])>>0]^d[c[l>>2]>>0])<<2)>>2]^c[9396+((d[45225+(94^d[(c[l>>2]|0)+9>>0])>>0]^d[(c[l>>2]|0)+1>>0])<<2)>>2]^c[10420+((d[44969+(242^d[(c[l>>2]|0)+10>>0])>>0]^d[(c[l>>2]|0)+2>>0])<<2)>>2]^c[11444+((d[44969+(94^d[(c[l>>2]|0)+11>>0])>>0]^d[(c[l>>2]|0)+3>>0])<<2)>>2];c[r>>2]=c[8372+((d[45225+(208^d[(c[l>>2]|0)+12>>0])>>0]^d[(c[l>>2]|0)+4>>0])<<2)>>2]^c[9396+((d[45225+(186^d[(c[l>>2]|0)+13>>0])>>0]^d[(c[l>>2]|0)+5>>0])<<2)>>2]^c[10420+((d[44969+(208^d[(c[l>>2]|0)+14>>0])>>0]^d[(c[l>>2]|0)+6>>0])<<2)>>2]^c[11444+((d[44969+(186^d[(c[l>>2]|0)+15>>0])>>0]^d[(c[l>>2]|0)+7>>0])<<2)>>2];c[r>>2]=(c[r>>2]<<8)+((c[r>>2]|0)>>>24);c[q>>2]=(c[q>>2]|0)+(c[r>>2]|0);c[r>>2]=(c[r>>2]|0)+(c[q>>2]|0);c[(c[k>>2]|0)+4128+96>>2]=c[q>>2];c[(c[k>>2]|0)+4128+100>>2]=(c[r>>2]<<9)+((c[r>>2]|0)>>>23);c[q>>2]=c[8372+((d[45225+(139^d[(c[l>>2]|0)+8>>0])>>0]^d[c[l>>2]>>0])<<2)>>2]^c[9396+((d[45225+(174^d[(c[l>>2]|0)+9>>0])>>0]^d[(c[l>>2]|0)+1>>0])<<2)>>2]^c[10420+((d[44969+(139^d[(c[l>>2]|0)+10>>0])>>0]^d[(c[l>>2]|0)+2>>0])<<2)>>2]^c[11444+((d[44969+(174^d[(c[l>>2]|0)+11>>0])>>0]^d[(c[l>>2]|0)+3>>0])<<2)>>2];c[r>>2]=c[8372+((d[45225+(48^d[(c[l>>2]|0)+12>>0])>>0]^d[(c[l>>2]|0)+4>>0])<<2)>>2]^c[9396+((d[45225+(91^d[(c[l>>2]|0)+13>>0])>>0]^d[(c[l>>2]|0)+5>>0])<<2)>>2]^c[10420+((d[44969+(48^d[(c[l>>2]|0)+14>>0])>>0]^d[(c[l>>2]|0)+6>>0])<<2)>>2]^c[11444+((d[44969+(91^d[(c[l>>2]|0)+15>>0])>>0]^d[(c[l>>2]|0)+7>>0])<<2)>>2];c[r>>2]=(c[r>>2]<<8)+((c[r>>2]|0)>>>24);c[q>>2]=(c[q>>2]|0)+(c[r>>2]|0);c[r>>2]=(c[r>>2]|0)+(c[q>>2]|0);c[(c[k>>2]|0)+4128+104>>2]=c[q>>2];c[(c[k>>2]|0)+4128+108>>2]=(c[r>>2]<<9)+((c[r>>2]|0)>>>23);c[q>>2]=c[8372+((d[45225+(132^d[(c[l>>2]|0)+8>>0])>>0]^d[c[l>>2]>>0])<<2)>>2]^c[9396+((d[45225+(138^d[(c[l>>2]|0)+9>>0])>>0]^d[(c[l>>2]|0)+1>>0])<<2)>>2]^c[10420+((d[44969+(132^d[(c[l>>2]|0)+10>>0])>>0]^d[(c[l>>2]|0)+2>>0])<<2)>>2]^c[11444+((d[44969+(138^d[(c[l>>2]|0)+11>>0])>>0]^d[(c[l>>2]|0)+3>>0])<<2)>>2];c[r>>2]=c[8372+((d[45225+(84^d[(c[l>>2]|0)+12>>0])>>0]^d[(c[l>>2]|0)+4>>0])<<2)>>2]^c[9396+((d[45225+(0^d[(c[l>>2]|0)+13>>0])>>0]^d[(c[l>>2]|0)+5>>0])<<2)>>2]^c[10420+((d[44969+(84^d[(c[l>>2]|0)+14>>0])>>0]^d[(c[l>>2]|0)+6>>0])<<2)>>2]^c[11444+((d[44969+(0^d[(c[l>>2]|0)+15>>0])>>0]^d[(c[l>>2]|0)+7>>0])<<2)>>2];c[r>>2]=(c[r>>2]<<8)+((c[r>>2]|0)>>>24);c[q>>2]=(c[q>>2]|0)+(c[r>>2]|0);c[r>>2]=(c[r>>2]|0)+(c[q>>2]|0);c[(c[k>>2]|0)+4128+112>>2]=c[q>>2];c[(c[k>>2]|0)+4128+116>>2]=(c[r>>2]<<9)+((c[r>>2]|0)>>>23);c[q>>2]=c[8372+((d[45225+(223^d[(c[l>>2]|0)+8>>0])>>0]^d[c[l>>2]>>0])<<2)>>2]^c[9396+((d[45225+(188^d[(c[l>>2]|0)+9>>0])>>0]^d[(c[l>>2]|0)+1>>0])<<2)>>2]^c[10420+((d[44969+(223^d[(c[l>>2]|0)+10>>0])>>0]^d[(c[l>>2]|0)+2>>0])<<2)>>2]^c[11444+((d[44969+(188^d[(c[l>>2]|0)+11>>0])>>0]^d[(c[l>>2]|0)+3>>0])<<2)>>2];c[r>>2]=c[8372+((d[45225+(35^d[(c[l>>2]|0)+12>>0])>>0]^d[(c[l>>2]|0)+4>>0])<<2)>>2]^c[9396+((d[45225+(157^d[(c[l>>2]|0)+13>>0])>>0]^d[(c[l>>2]|0)+5>>0])<<2)>>2]^c[10420+((d[44969+(35^d[(c[l>>2]|0)+14>>0])>>0]^d[(c[l>>2]|0)+6>>0])<<2)>>2]^c[11444+((d[44969+(157^d[(c[l>>2]|0)+15>>0])>>0]^d[(c[l>>2]|0)+7>>0])<<2)>>2];c[r>>2]=(c[r>>2]<<8)+((c[r>>2]|0)>>>24);c[q>>2]=(c[q>>2]|0)+(c[r>>2]|0);c[r>>2]=(c[r>>2]|0)+(c[q>>2]|0);c[(c[k>>2]|0)+4128+120>>2]=c[q>>2];c[(c[k>>2]|0)+4128+124>>2]=(c[r>>2]<<9)+((c[r>>2]|0)>>>23)}c[j>>2]=0;J=c[j>>2]|0;i=g;return J|0}function kn(){var a=0,b=0,d=0,e=0,f=0,g=0;a=i;i=i+4288|0;b=a+4264|0;d=a+8|0;e=a+4272|0;f=a;hn(d,43450,16)|0;ln(d,e,43466)|0;do if(!(mw(e,43482,16)|0)){pn(d,e,e)|0;if(mw(e,43466,16)|0){c[b>>2]=43534;break}hn(d,43570,32)|0;ln(d,e,43602)|0;if(mw(e,43618,16)|0){c[b>>2]=43634;break}pn(d,e,e)|0;if(mw(e,43602,16)|0){c[b>>2]=43670;break}g=rn()|0;c[f>>2]=g;if(g){c[b>>2]=c[f>>2];break}g=un()|0;c[f>>2]=g;if(g){c[b>>2]=c[f>>2];break}g=xn()|0;c[f>>2]=g;if(g){c[b>>2]=c[f>>2];break}else{c[b>>2]=0;break}}else c[b>>2]=43498;while(0);i=a;return c[b>>2]|0}function ln(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0;e=i;i=i+16|0;f=e+12|0;g=e+8|0;h=e+4|0;j=e;c[f>>2]=a;c[g>>2]=b;c[h>>2]=d;c[j>>2]=c[f>>2];mn(c[j>>2]|0,c[g>>2]|0,c[h>>2]|0);i=e;return 36}function mn(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0;e=i;i=i+48|0;f=e+32|0;g=e+28|0;h=e+24|0;j=e+20|0;k=e+16|0;l=e+12|0;m=e+8|0;n=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^c[(c[f>>2]|0)+1024+(((c[j>>2]|0)>>>8&255)<<2)>>2]^c[(c[f>>2]|0)+2048+(((c[j>>2]|0)>>>16&255)<<2)>>2]^c[(c[f>>2]|0)+3072+((c[j>>2]|0)>>>24<<2)>>2];c[o>>2]=c[(c[f>>2]|0)+1024+((c[k>>2]&255)<<2)>>2]^c[(c[f>>2]|0)+2048+(((c[k>>2]|0)>>>8&255)<<2)>>2]^c[(c[f>>2]|0)+3072+(((c[k>>2]|0)>>>16&255)<<2)>>2]^c[(c[f>>2]|0)+((c[k>>2]|0)>>>24<<2)>>2];c[n>>2]=(c[n>>2]|0)+(c[o>>2]|0);c[o>>2]=(c[o>>2]|0)+((c[n>>2]|0)+(c[(c[f>>2]|0)+4128+100>>2]|0));c[l>>2]=c[l>>2]^(c[n>>2]|0)+(c[(c[f>>2]|0)+4128+96>>2]|0);c[l>>2]=((c[l>>2]|0)>>>1)+(c[l>>2]<<31);c[m>>2]=(c[m>>2]<<1)+((c[m>>2]|0)>>>31)^c[o>>2];c[n>>2]=c[(c[f>>2]|0)+((c[l>>2]&255)<<2)>>2]^c[(c[f>>2]|0)+1024+(((c[l>>2]|0)>>>8&255)<<2)>>2]^c[(c[f>>2]|0)+2048+(((c[l>>2]|0)>>>16&255)<<2)>>2]^c[(c[f>>2]|0)+3072+((c[l>>2]|0)>>>24<<2)>>2];c[o>>2]=c[(c[f>>2]|0)+1024+((c[m>>2]&255)<<2)>>2]^c[(c[f>>2]|0)+2048+(((c[m>>2]|0)>>>8&255)<<2)>>2]^c[(c[f>>2]|0)+3072+(((c[m>>2]|0)>>>16&255)<<2)>>2]^c[(c[f>>2]|0)+((c[m>>2]|0)>>>24<<2)>>2];c[n>>2]=(c[n>>2]|0)+(c[o>>2]|0);c[o>>2]=(c[o>>2]|0)+((c[n>>2]|0)+(c[(c[f>>2]|0)+4128+108>>2]|0));c[j>>2]=c[j>>2]^(c[n>>2]|0)+(c[(c[f>>2]|0)+4128+104>>2]|0);c[j>>2]=((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=(c[o>>2]|0)+((c[n>>2]|0)+(c[(c[f>>2]|0)+4128+124>>2]|0));c[j>>2]=c[j>>2]^(c[n>>2]|0)+(c[(c[f>>2]|0)+4128+120>>2]|0);c[j>>2]=((c[j>>2]|0)>>>1)+(c[j>>2]<<31);c[k>>2]=(c[k>>2]<<1)+((c[k>>2]|0)>>>31)^c[o>>2];c[l>>2]=c[l>>2]^c[(c[f>>2]|0)+4096+16>>2];on(c[g>>2]|0,c[l>>2]|0);c[m>>2]=c[m>>2]^c[(c[f>>2]|0)+4096+20>>2];on((c[g>>2]|0)+4|0,c[m>>2]|0);c[j>>2]=c[j>>2]^c[(c[f>>2]|0)+4096+24>>2];on((c[g>>2]|0)+8|0,c[j>>2]|0);c[k>>2]=c[k>>2]^c[(c[f>>2]|0)+4096+28>>2];on((c[g>>2]|0)+12|0,c[k>>2]|0);i=e;return}function nn(a){a=a|0;var b=0,e=0,f=0;b=i;i=i+16|0;e=b+4|0;f=b;c[e>>2]=a;c[f>>2]=c[e>>2];i=b;return (d[(c[f>>2]|0)+3>>0]|0)<<24|(d[(c[f>>2]|0)+2>>0]|0)<<16|(d[(c[f>>2]|0)+1>>0]|0)<<8|(d[c[f>>2]>>0]|0)|0}function on(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=i;i=i+16|0;f=e+8|0;g=e+4|0;h=e;c[f>>2]=b;c[g>>2]=d;c[h>>2]=c[f>>2];a[(c[h>>2]|0)+3>>0]=(c[g>>2]|0)>>>24;a[(c[h>>2]|0)+2>>0]=(c[g>>2]|0)>>>16;a[(c[h>>2]|0)+1>>0]=(c[g>>2]|0)>>>8;a[c[h>>2]>>0]=c[g>>2];i=e;return}function pn(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0;e=i;i=i+16|0;f=e+12|0;g=e+8|0;h=e+4|0;j=e;c[f>>2]=a;c[g>>2]=b;c[h>>2]=d;c[j>>2]=c[f>>2];qn(c[j>>2]|0,c[g>>2]|0,c[h>>2]|0);i=e;return 36}
+
+// EMSCRIPTEN_END_FUNCS
+var vb=[$x,Ik,Mk,Nk,jl,dm,fm,gm,hm,im,zm,Pm,dn,hn,ln,pn,is,ks,ls,ms,ns,yi,Bs,Zu,bv,_u,vv,zf,gw,dl,hl,yl,sm,Em,Um,cv,$x,$x,$x,$x,$x,$x,$x,$x,$x,$x,$x,$x,$x,$x,$x,$x,$x,$x,$x,$x,$x,$x,$x,$x,$x,$x,$x,$x];var wb=[ay,ol,bl,_k,Xk,sl,vn,yn,sn,ay,ay,ay,ay,ay,ay,ay];var xb=[by,Cl,wm,Mm,an,mo,$u,dv,Pw,by,by,by,by,by,by,by];var yb=[cy,xl,rm,Dm,Sm,Tm,gn,zs];var zb=[dy,El,bm,em,ym,Om,cn,gs,js,Di,Wu,dy,dy,dy,dy,dy];var Ab=[ey,rs,wl,Ls,st,Pt,ey,ey];var Bb=[fy,Qk,Sk,xu];var Cb=[gy,Cs,rr,Ks,Tt,gy,gy,gy];var Db=[hy,ql];var Eb=[iy,Ul,qm,bs,ps,sk,am,iy];var Fb=[jy,Oh];return{_WRALL_make_purpose:ac,_GNUNET_CRYPTO_rsa_blinding_key_encode:Sd,_bitshift64Lshr:Cx,_bitshift64Ashr:Bx,_GNUNET_CRYPTO_eddsa_key_create:gd,_memcpy:Dx,_TALER_WR_GNUNET_free:Yb,_TALER_WRALL_amount_add:hc,_GNUNET_CRYPTO_rsa_private_key_decode:Id,_TALER_WR_multiply_amount:Ac,_GNUNET_CRYPTO_rsa_blinding_key_decode:Td,_GNUNET_CRYPTO_ecc_ecdh:kd,_TALER_amount_hton:Mu,_TALER_WR_verify_sign_key_enc:qc,_free:tx,_TALER_WRALL_sign_deposit_permission:rc,_TALER_WR_verify_denoms:nc,_GNUNET_CRYPTO_rsa_blinding_key_create:Pd,_TALER_WR_verify_sign_key:pc,_TALER_WRALL_rsa_public_key_hash:kc,_TALER_WRALL_gen_key_from_blob:gc,_GNUNET_CRYPTO_rsa_private_key_get_public:Jd,_TALER_WRALL_rsa_public_key_decode_from_string:cc,_GNUNET_CRYPTO_symmetric_encrypt:Xc,_TALER_WR_get_fraction:yc,_TALER_WR_verify_denoms_enc:oc,_TALER_amount_cmp:Ru,_TALER_WRALL_ecdhe_public_key_from_private_key:Sb,_llvm_cttz_i32:Gx,_TALER_WRALL_eddsa_private_key_from_string:Ub,_TALER_WRALL_gen_init_vector:fc,_TALER_amount_ntoh:Nu,_WR_verify_test:_b,_GNUNET_CRYPTO_rsa_public_key_free:Ld,_GNUNET_CRYPTO_hkdf:ud,_GNUNET_CRYPTO_eddsa_key_get_public:$c,_llvm_bswap_i32:Hx,_GNUNET_CRYPTO_rsa_private_key_create:Fd,_GNUNET_STRINGS_data_to_string_alloc:ce,_TALER_WRALL_sign_test:Zb,_TALER_WR_verify_confirmation:sc,_GNUNET_CRYPTO_rsa_public_key_decode:Od,_GNUNET_CRYPTO_rsa_blinding_key_free:Rd,_GNUNET_CRYPTO_rsa_signature_encode:Qd,_GNUNET_CRYPTO_rsa_verify:_d,_TALER_WR_eddsa_verify:$b,_GNUNET_STRINGS_string_to_data:de,_TALER_WRALL_gen_symmetric_key:ec,_TALER_WRALL_ecc_ecdh:Tb,_memset:Fx,_GNUNET_CRYPTO_rsa_unblind:Zd,_TALER_WR_get_currency:zc,_DEBUG_WR_get_purpose:uc,_TALER_WRALL_get_amount:vc,_GNUNET_CRYPTO_rsa_private_key_encode:Hd,_GNUNET_CRYPTO_symmetric_decrypt:_c,_i64Subtract:zx,_TALER_WR_get_value:xc,_GNUNET_CRYPTO_rsa_signature_free:Xd,_TALER_WRALL_eddsa_public_key_from_priv_string:Vb,_GNUNET_CRYPTO_rsa_blind:Ud,_TALER_WR_verify_denom_enc:mc,_malloc:sx,_TALER_WR_hello_world:wc,_TALER_WRALL_make_withdraw_bundle:ic,_GNUNET_CRYPTO_rsa_signature_decode:Yd,_GNUNET_CRYPTO_rsa_sign:Vd,_GNUNET_CRYPTO_ecdhe_key_create:ed,_TALER_WRALL_get_encoding_from_rsa_signature:dc,_TALER_WRALL_hash:Qb,_TALER_amount_normalize:Su,_TALER_WRALL_sign_contract:jc,_bitshift64Shl:Ix,_GNUNET_CRYPTO_rsa_private_key_free:Gd,_fflush:ww,_GNUNET_CRYPTO_hash_create_random:md,_TALER_WRALL_eddsa_public_key_from_private:Wb,_TALER_WR_multiply_amounts:Bc,_TALER_amount_add:Vu,_GNUNET_CRYPTO_ecdhe_key_get_public:bd,_TALER_amount_subtract:Uu,_i64Add:Ax,_TALER_WRALL_purpose_create:bc,_GNUNET_CRYPTO_eddsa_sign:hd,_TALER_WR_verify_denom:lc,_TALER_WRALL_get_current_time:Pb,___errno_location:Yu,_TALER_WR_get_fancy_time:Xb,_TALER_WRALL_make_eddsa_signature:tc,_memmove:Ex,_TALER_amount_get_zero:Ou,_DEBUG_WR_dump_amount:Rb,_GNUNET_CRYPTO_rsa_public_key_encode:Md,_GNUNET_CRYPTO_hash:ld,_GNUNET_util_cl_init:Jc,_GNUNET_CRYPTO_random_init:Ad,_gpg_err_init:eu,runPostSets:yx,stackAlloc:Gb,stackSave:Hb,stackRestore:Ib,establishStackSpace:Jb,setThrew:Kb,setTempRet0:Nb,getTempRet0:Ob,dynCall_iiii:Qx,dynCall_viiiii:Rx,dynCall_vi:Sx,dynCall_vii:Tx,dynCall_ii:Ux,dynCall_viii:Vx,dynCall_v:Wx,dynCall_iiiii:Xx,dynCall_viiiiii:Yx,dynCall_iii:Zx,dynCall_viiii:_x}})
+
+
+// EMSCRIPTEN_END_ASM
+(Module.asmGlobalArg,Module.asmLibraryArg,buffer);var _WRALL_make_purpose=Module["_WRALL_make_purpose"]=asm["_WRALL_make_purpose"];var _GNUNET_CRYPTO_rsa_blinding_key_encode=Module["_GNUNET_CRYPTO_rsa_blinding_key_encode"]=asm["_GNUNET_CRYPTO_rsa_blinding_key_encode"];var _bitshift64Lshr=Module["_bitshift64Lshr"]=asm["_bitshift64Lshr"];var _bitshift64Ashr=Module["_bitshift64Ashr"]=asm["_bitshift64Ashr"];var _GNUNET_CRYPTO_eddsa_key_create=Module["_GNUNET_CRYPTO_eddsa_key_create"]=asm["_GNUNET_CRYPTO_eddsa_key_create"];var _memcpy=Module["_memcpy"]=asm["_memcpy"];var _TALER_WR_GNUNET_free=Module["_TALER_WR_GNUNET_free"]=asm["_TALER_WR_GNUNET_free"];var _TALER_WRALL_amount_add=Module["_TALER_WRALL_amount_add"]=asm["_TALER_WRALL_amount_add"];var _GNUNET_CRYPTO_rsa_private_key_decode=Module["_GNUNET_CRYPTO_rsa_private_key_decode"]=asm["_GNUNET_CRYPTO_rsa_private_key_decode"];var _TALER_WR_multiply_amount=Module["_TALER_WR_multiply_amount"]=asm["_TALER_WR_multiply_amount"];var _GNUNET_CRYPTO_rsa_blinding_key_decode=Module["_GNUNET_CRYPTO_rsa_blinding_key_decode"]=asm["_GNUNET_CRYPTO_rsa_blinding_key_decode"];var _TALER_WR_multiply_amounts=Module["_TALER_WR_multiply_amounts"]=asm["_TALER_WR_multiply_amounts"];var _TALER_amount_hton=Module["_TALER_amount_hton"]=asm["_TALER_amount_hton"];var _TALER_WRALL_eddsa_private_key_from_string=Module["_TALER_WRALL_eddsa_private_key_from_string"]=asm["_TALER_WRALL_eddsa_private_key_from_string"];var runPostSets=Module["runPostSets"]=asm["runPostSets"];var _gpg_err_init=Module["_gpg_err_init"]=asm["_gpg_err_init"];var _free=Module["_free"]=asm["_free"];var _TALER_WRALL_sign_deposit_permission=Module["_TALER_WRALL_sign_deposit_permission"]=asm["_TALER_WRALL_sign_deposit_permission"];var _TALER_WR_verify_denoms=Module["_TALER_WR_verify_denoms"]=asm["_TALER_WR_verify_denoms"];var _GNUNET_CRYPTO_rsa_blinding_key_create=Module["_GNUNET_CRYPTO_rsa_blinding_key_create"]=asm["_GNUNET_CRYPTO_rsa_blinding_key_create"];var _TALER_WR_verify_denom_enc=Module["_TALER_WR_verify_denom_enc"]=asm["_TALER_WR_verify_denom_enc"];var _TALER_WRALL_rsa_public_key_hash=Module["_TALER_WRALL_rsa_public_key_hash"]=asm["_TALER_WRALL_rsa_public_key_hash"];var _TALER_WRALL_gen_key_from_blob=Module["_TALER_WRALL_gen_key_from_blob"]=asm["_TALER_WRALL_gen_key_from_blob"];var _GNUNET_CRYPTO_rsa_private_key_get_public=Module["_GNUNET_CRYPTO_rsa_private_key_get_public"]=asm["_GNUNET_CRYPTO_rsa_private_key_get_public"];var _TALER_WRALL_rsa_public_key_decode_from_string=Module["_TALER_WRALL_rsa_public_key_decode_from_string"]=asm["_TALER_WRALL_rsa_public_key_decode_from_string"];var _GNUNET_CRYPTO_symmetric_encrypt=Module["_GNUNET_CRYPTO_symmetric_encrypt"]=asm["_GNUNET_CRYPTO_symmetric_encrypt"];var _TALER_WR_get_fraction=Module["_TALER_WR_get_fraction"]=asm["_TALER_WR_get_fraction"];var _TALER_WR_verify_denoms_enc=Module["_TALER_WR_verify_denoms_enc"]=asm["_TALER_WR_verify_denoms_enc"];var _TALER_amount_cmp=Module["_TALER_amount_cmp"]=asm["_TALER_amount_cmp"];var _TALER_WRALL_ecdhe_public_key_from_private_key=Module["_TALER_WRALL_ecdhe_public_key_from_private_key"]=asm["_TALER_WRALL_ecdhe_public_key_from_private_key"];var _llvm_cttz_i32=Module["_llvm_cttz_i32"]=asm["_llvm_cttz_i32"];var _TALER_WR_verify_sign_key_enc=Module["_TALER_WR_verify_sign_key_enc"]=asm["_TALER_WR_verify_sign_key_enc"];var _TALER_WRALL_gen_init_vector=Module["_TALER_WRALL_gen_init_vector"]=asm["_TALER_WRALL_gen_init_vector"];var _TALER_amount_ntoh=Module["_TALER_amount_ntoh"]=asm["_TALER_amount_ntoh"];var _WR_verify_test=Module["_WR_verify_test"]=asm["_WR_verify_test"];var _GNUNET_CRYPTO_rsa_public_key_free=Module["_GNUNET_CRYPTO_rsa_public_key_free"]=asm["_GNUNET_CRYPTO_rsa_public_key_free"];var _GNUNET_CRYPTO_hkdf=Module["_GNUNET_CRYPTO_hkdf"]=asm["_GNUNET_CRYPTO_hkdf"];var _GNUNET_CRYPTO_eddsa_key_get_public=Module["_GNUNET_CRYPTO_eddsa_key_get_public"]=asm["_GNUNET_CRYPTO_eddsa_key_get_public"];var _llvm_bswap_i32=Module["_llvm_bswap_i32"]=asm["_llvm_bswap_i32"];var _TALER_WR_get_value=Module["_TALER_WR_get_value"]=asm["_TALER_WR_get_value"];var _GNUNET_STRINGS_data_to_string_alloc=Module["_GNUNET_STRINGS_data_to_string_alloc"]=asm["_GNUNET_STRINGS_data_to_string_alloc"];var _TALER_WRALL_sign_test=Module["_TALER_WRALL_sign_test"]=asm["_TALER_WRALL_sign_test"];var _TALER_WR_verify_confirmation=Module["_TALER_WR_verify_confirmation"]=asm["_TALER_WR_verify_confirmation"];var _GNUNET_CRYPTO_rsa_public_key_decode=Module["_GNUNET_CRYPTO_rsa_public_key_decode"]=asm["_GNUNET_CRYPTO_rsa_public_key_decode"];var _GNUNET_CRYPTO_rsa_blinding_key_free=Module["_GNUNET_CRYPTO_rsa_blinding_key_free"]=asm["_GNUNET_CRYPTO_rsa_blinding_key_free"];var _GNUNET_CRYPTO_rsa_signature_encode=Module["_GNUNET_CRYPTO_rsa_signature_encode"]=asm["_GNUNET_CRYPTO_rsa_signature_encode"];var _GNUNET_CRYPTO_rsa_verify=Module["_GNUNET_CRYPTO_rsa_verify"]=asm["_GNUNET_CRYPTO_rsa_verify"];var _TALER_WR_eddsa_verify=Module["_TALER_WR_eddsa_verify"]=asm["_TALER_WR_eddsa_verify"];var _GNUNET_STRINGS_string_to_data=Module["_GNUNET_STRINGS_string_to_data"]=asm["_GNUNET_STRINGS_string_to_data"];var _TALER_WRALL_gen_symmetric_key=Module["_TALER_WRALL_gen_symmetric_key"]=asm["_TALER_WRALL_gen_symmetric_key"];var _TALER_WRALL_ecc_ecdh=Module["_TALER_WRALL_ecc_ecdh"]=asm["_TALER_WRALL_ecc_ecdh"];var _TALER_WRALL_get_amount=Module["_TALER_WRALL_get_amount"]=asm["_TALER_WRALL_get_amount"];var _GNUNET_CRYPTO_rsa_unblind=Module["_GNUNET_CRYPTO_rsa_unblind"]=asm["_GNUNET_CRYPTO_rsa_unblind"];var _TALER_WR_get_currency=Module["_TALER_WR_get_currency"]=asm["_TALER_WR_get_currency"];var _DEBUG_WR_get_purpose=Module["_DEBUG_WR_get_purpose"]=asm["_DEBUG_WR_get_purpose"];var _memset=Module["_memset"]=asm["_memset"];var _GNUNET_CRYPTO_rsa_private_key_encode=Module["_GNUNET_CRYPTO_rsa_private_key_encode"]=asm["_GNUNET_CRYPTO_rsa_private_key_encode"];var _GNUNET_CRYPTO_symmetric_decrypt=Module["_GNUNET_CRYPTO_symmetric_decrypt"]=asm["_GNUNET_CRYPTO_symmetric_decrypt"];var _i64Subtract=Module["_i64Subtract"]=asm["_i64Subtract"];var _GNUNET_CRYPTO_rsa_private_key_create=Module["_GNUNET_CRYPTO_rsa_private_key_create"]=asm["_GNUNET_CRYPTO_rsa_private_key_create"];var _GNUNET_CRYPTO_rsa_signature_free=Module["_GNUNET_CRYPTO_rsa_signature_free"]=asm["_GNUNET_CRYPTO_rsa_signature_free"];var _GNUNET_util_cl_init=Module["_GNUNET_util_cl_init"]=asm["_GNUNET_util_cl_init"];var _TALER_WRALL_eddsa_public_key_from_priv_string=Module["_TALER_WRALL_eddsa_public_key_from_priv_string"]=asm["_TALER_WRALL_eddsa_public_key_from_priv_string"];var _GNUNET_CRYPTO_rsa_blind=Module["_GNUNET_CRYPTO_rsa_blind"]=asm["_GNUNET_CRYPTO_rsa_blind"];var _TALER_WR_verify_sign_key=Module["_TALER_WR_verify_sign_key"]=asm["_TALER_WR_verify_sign_key"];var _malloc=Module["_malloc"]=asm["_malloc"];var _TALER_WR_hello_world=Module["_TALER_WR_hello_world"]=asm["_TALER_WR_hello_world"];var _TALER_WRALL_make_withdraw_bundle=Module["_TALER_WRALL_make_withdraw_bundle"]=asm["_TALER_WRALL_make_withdraw_bundle"];var _GNUNET_CRYPTO_rsa_signature_decode=Module["_GNUNET_CRYPTO_rsa_signature_decode"]=asm["_GNUNET_CRYPTO_rsa_signature_decode"];var _GNUNET_CRYPTO_rsa_sign=Module["_GNUNET_CRYPTO_rsa_sign"]=asm["_GNUNET_CRYPTO_rsa_sign"];var _GNUNET_CRYPTO_ecdhe_key_create=Module["_GNUNET_CRYPTO_ecdhe_key_create"]=asm["_GNUNET_CRYPTO_ecdhe_key_create"];var _TALER_WRALL_get_encoding_from_rsa_signature=Module["_TALER_WRALL_get_encoding_from_rsa_signature"]=asm["_TALER_WRALL_get_encoding_from_rsa_signature"];var _TALER_WRALL_hash=Module["_TALER_WRALL_hash"]=asm["_TALER_WRALL_hash"];var _TALER_amount_normalize=Module["_TALER_amount_normalize"]=asm["_TALER_amount_normalize"];var _TALER_WRALL_sign_contract=Module["_TALER_WRALL_sign_contract"]=asm["_TALER_WRALL_sign_contract"];var _bitshift64Shl=Module["_bitshift64Shl"]=asm["_bitshift64Shl"];var _GNUNET_CRYPTO_rsa_private_key_free=Module["_GNUNET_CRYPTO_rsa_private_key_free"]=asm["_GNUNET_CRYPTO_rsa_private_key_free"];var _fflush=Module["_fflush"]=asm["_fflush"];var _GNUNET_CRYPTO_hash_create_random=Module["_GNUNET_CRYPTO_hash_create_random"]=asm["_GNUNET_CRYPTO_hash_create_random"];var _TALER_WRALL_eddsa_public_key_from_private=Module["_TALER_WRALL_eddsa_public_key_from_private"]=asm["_TALER_WRALL_eddsa_public_key_from_private"];var _GNUNET_CRYPTO_ecc_ecdh=Module["_GNUNET_CRYPTO_ecc_ecdh"]=asm["_GNUNET_CRYPTO_ecc_ecdh"];var _TALER_amount_add=Module["_TALER_amount_add"]=asm["_TALER_amount_add"];var _GNUNET_CRYPTO_ecdhe_key_get_public=Module["_GNUNET_CRYPTO_ecdhe_key_get_public"]=asm["_GNUNET_CRYPTO_ecdhe_key_get_public"];var _TALER_amount_subtract=Module["_TALER_amount_subtract"]=asm["_TALER_amount_subtract"];var _i64Add=Module["_i64Add"]=asm["_i64Add"];var _TALER_WRALL_purpose_create=Module["_TALER_WRALL_purpose_create"]=asm["_TALER_WRALL_purpose_create"];var _GNUNET_CRYPTO_eddsa_sign=Module["_GNUNET_CRYPTO_eddsa_sign"]=asm["_GNUNET_CRYPTO_eddsa_sign"];var _TALER_WR_verify_denom=Module["_TALER_WR_verify_denom"]=asm["_TALER_WR_verify_denom"];var _GNUNET_CRYPTO_hash=Module["_GNUNET_CRYPTO_hash"]=asm["_GNUNET_CRYPTO_hash"];var ___errno_location=Module["___errno_location"]=asm["___errno_location"];var _TALER_WR_get_fancy_time=Module["_TALER_WR_get_fancy_time"]=asm["_TALER_WR_get_fancy_time"];var _TALER_WRALL_make_eddsa_signature=Module["_TALER_WRALL_make_eddsa_signature"]=asm["_TALER_WRALL_make_eddsa_signature"];var _memmove=Module["_memmove"]=asm["_memmove"];var _GNUNET_CRYPTO_random_init=Module["_GNUNET_CRYPTO_random_init"]=asm["_GNUNET_CRYPTO_random_init"];var _TALER_amount_get_zero=Module["_TALER_amount_get_zero"]=asm["_TALER_amount_get_zero"];var _DEBUG_WR_dump_amount=Module["_DEBUG_WR_dump_amount"]=asm["_DEBUG_WR_dump_amount"];var _GNUNET_CRYPTO_rsa_public_key_encode=Module["_GNUNET_CRYPTO_rsa_public_key_encode"]=asm["_GNUNET_CRYPTO_rsa_public_key_encode"];var _TALER_WRALL_get_current_time=Module["_TALER_WRALL_get_current_time"]=asm["_TALER_WRALL_get_current_time"];var dynCall_iiii=Module["dynCall_iiii"]=asm["dynCall_iiii"];var dynCall_viiiii=Module["dynCall_viiiii"]=asm["dynCall_viiiii"];var dynCall_vi=Module["dynCall_vi"]=asm["dynCall_vi"];var dynCall_vii=Module["dynCall_vii"]=asm["dynCall_vii"];var dynCall_ii=Module["dynCall_ii"]=asm["dynCall_ii"];var dynCall_viii=Module["dynCall_viii"]=asm["dynCall_viii"];var dynCall_v=Module["dynCall_v"]=asm["dynCall_v"];var dynCall_iiiii=Module["dynCall_iiiii"]=asm["dynCall_iiiii"];var dynCall_viiiiii=Module["dynCall_viiiiii"]=asm["dynCall_viiiiii"];var dynCall_iii=Module["dynCall_iii"]=asm["dynCall_iii"];var dynCall_viiii=Module["dynCall_viiii"]=asm["dynCall_viiii"];Runtime.stackAlloc=asm["stackAlloc"];Runtime.stackSave=asm["stackSave"];Runtime.stackRestore=asm["stackRestore"];Runtime.establishStackSpace=asm["establishStackSpace"];Runtime.setTempRet0=asm["setTempRet0"];Runtime.getTempRet0=asm["getTempRet0"];function ExitStatus(status){this.name="ExitStatus";this.message="Program terminated with exit("+status+")";this.status=status}ExitStatus.prototype=new Error;ExitStatus.prototype.constructor=ExitStatus;var initialStackTop;var preloadStartTime=null;var calledMain=false;dependenciesFulfilled=function runCaller(){if(!Module["calledRun"])run();if(!Module["calledRun"])dependenciesFulfilled=runCaller};Module["callMain"]=Module.callMain=function callMain(args){assert(runDependencies==0,"cannot call main when async dependencies remain! (listen on __ATMAIN__)");assert(__ATPRERUN__.length==0,"cannot call main when preRun functions remain to be called");args=args||[];ensureInitRuntime();var argc=args.length+1;function pad(){for(var i=0;i<4-1;i++){argv.push(0)}}var argv=[allocate(intArrayFromString(Module["thisProgram"]),"i8",ALLOC_NORMAL)];pad();for(var i=0;i<argc-1;i=i+1){argv.push(allocate(intArrayFromString(args[i]),"i8",ALLOC_NORMAL));pad()}argv.push(0);argv=allocate(argv,"i32",ALLOC_NORMAL);try{var ret=Module["_main"](argc,argv,0);exit(ret,true)}catch(e){if(e instanceof ExitStatus){return}else if(e=="SimulateInfiniteLoop"){Module["noExitRuntime"]=true;return}else{if(e&&typeof e==="object"&&e.stack)Module.printErr("exception thrown: "+[e,e.stack]);throw e}}finally{calledMain=true}};function run(args){args=args||Module["arguments"];if(preloadStartTime===null)preloadStartTime=Date.now();if(runDependencies>0){return}preRun();if(runDependencies>0)return;if(Module["calledRun"])return;function doRun(){if(Module["calledRun"])return;Module["calledRun"]=true;if(ABORT)return;ensureInitRuntime();preMain();if(Module["onRuntimeInitialized"])Module["onRuntimeInitialized"]();if(Module["_main"]&&shouldRunNow)Module["callMain"](args);postRun()}if(Module["setStatus"]){Module["setStatus"]("Running...");setTimeout((function(){setTimeout((function(){Module["setStatus"]("")}),1);doRun()}),1)}else{doRun()}}Module["run"]=Module.run=run;function exit(status,implicit){if(implicit&&Module["noExitRuntime"]){return}if(Module["noExitRuntime"]){}else{ABORT=true;EXITSTATUS=status;STACKTOP=initialStackTop;exitRuntime();if(Module["onExit"])Module["onExit"](status)}if(ENVIRONMENT_IS_NODE){process["stdout"]["once"]("drain",(function(){process["exit"](status)}));console.log(" ");setTimeout((function(){process["exit"](status)}),500)}else if(ENVIRONMENT_IS_SHELL&&typeof quit==="function"){quit(status)}throw new ExitStatus(status)}Module["exit"]=Module.exit=exit;var abortDecorators=[];function abort(what){if(what!==undefined){Module.print(what);Module.printErr(what);what=JSON.stringify(what)}else{what=""}ABORT=true;EXITSTATUS=1;var extra="\nIf this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.";var output="abort("+what+") at "+stackTrace()+extra;if(abortDecorators){abortDecorators.forEach((function(decorator){output=decorator(output,what)}))}throw output}Module["abort"]=Module.abort=abort;if(Module["preInit"]){if(typeof Module["preInit"]=="function")Module["preInit"]=[Module["preInit"]];while(Module["preInit"].length>0){Module["preInit"].pop()()}}var shouldRunNow=true;if(Module["noInitialRun"]){shouldRunNow=false}run()
+
+
+
+
diff --git a/extension/lib/polyfill-react.js b/extension/lib/polyfill-react.js
deleted file mode 100644
index f30ba7c64..000000000
--- a/extension/lib/polyfill-react.js
+++ /dev/null
@@ -1,16 +0,0 @@
-"use strict";
-let React = {
- createElement: function (tag, props, ...children) {
- let e = document.createElement(tag);
- for (let k in props) {
- e.setAttribute(k, props[k]);
- }
- for (let child of children) {
- if ("string" === typeof child || "number" == typeof child) {
- child = document.createTextNode(child);
- }
- e.appendChild(child);
- }
- return e;
- }
-};
diff --git a/extension/lib/refs.ts b/extension/lib/refs.ts
new file mode 100644
index 000000000..2da073d38
--- /dev/null
+++ b/extension/lib/refs.ts
@@ -0,0 +1,6 @@
+
+// Help the TypeScript compiler find declarations.
+
+/// <reference path="decl/lib.es6.d.ts" />
+/// <reference path="decl/urijs/URIjs.d.ts" />
+/// <reference path="decl/systemjs/systemjs.d.ts" /> \ No newline at end of file
diff --git a/extension/lib/util.js b/extension/lib/util.js
deleted file mode 100644
index 938f6c730..000000000
--- a/extension/lib/util.js
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- This file is part of TALER
- (C) 2015 GNUnet e.V.
-
- TALER is free software; you can redistribute it and/or modify it under the
- terms of the GNU General Public License as published by the Free Software
- Foundation; either version 3, or (at your option) any later version.
-
- TALER is distributed in the hope that it will be useful, but WITHOUT ANY
- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
- A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License along with
- TALER; see the file COPYING. If not, If not, see <http://www.gnu.org/licenses/>
- */
-'use strict';
-/**
- * Parse an amount that is specified like '5.42 EUR'.
- * Returns a {currency,value,fraction} object or null
- * if the input is invalid.
- */
-function amount_parse_pretty(s) {
- let pattern = /(\d+)(.\d+)?\s*([a-zA-Z]+)/;
- let matches = pattern.exec(s);
- if (null == matches) {
- return null;
- }
- return {
- // Always succeeds due to regex
- value: parseInt(matches[1]),
- // Should we warn / fail on lost precision?
- fraction: Math.round(parseFloat(matches[2] || "0") * 1000000),
- currency: matches[3],
- };
-}
-function format(s, ...args) {
- function r(m, n) {
- let i = parseInt(n);
- return args[i];
- }
- s = s.replace(/{{/g, '{');
- s = s.replace(/}}/g, '}');
- s = s.replace(/{([0-9]+)}/g, r);
- return s;
-}
-function promiseFinally(p, fn) {
- return p.then((x) => { fn(); return x; })
- .catch((e) => { fn(); throw e; });
-}
diff --git a/extension/lib/util.ts b/extension/lib/util.ts
index f488bc77c..f2fdb131a 100644
--- a/extension/lib/util.ts
+++ b/extension/lib/util.ts
@@ -52,4 +52,4 @@ function format(s: string, ...args: any[]) {
function promiseFinally<T>(p: Promise<T>, fn): Promise<T> {
return p.then((x) => { fn(); return x; })
.catch((e) => {fn(); throw e;});
-} \ No newline at end of file
+}
diff --git a/extension/lib/URI.js b/extension/lib/vendor/URI.js
index c041b4304..c041b4304 100644
--- a/extension/lib/URI.js
+++ b/extension/lib/vendor/URI.js
diff --git a/extension/lib/handlebars-v4.0.5.js b/extension/lib/vendor/handlebars-v4.0.5.js
index 289ae458a..289ae458a 100644
--- a/extension/lib/handlebars-v4.0.5.js
+++ b/extension/lib/vendor/handlebars-v4.0.5.js
diff --git a/extension/lib/vendor/system.src.js b/extension/lib/vendor/system.src.js
new file mode 100644
index 000000000..55b1b5c3c
--- /dev/null
+++ b/extension/lib/vendor/system.src.js
@@ -0,0 +1,4843 @@
+/*
+ * SystemJS v0.19.13
+ */
+(function() {
+function bootstrap() {(function(__global) {
+
+ var isWorker = typeof window == 'undefined' && typeof self != 'undefined' && typeof importScripts != 'undefined';
+ var isBrowser = typeof window != 'undefined' && typeof document != 'undefined';
+ var isWindows = typeof process != 'undefined' && typeof process.platform != 'undefined' && !!process.platform.match(/^win/);
+
+ if (!__global.console)
+ __global.console = { assert: function() {} };
+
+ // IE8 support
+ var indexOf = Array.prototype.indexOf || function(item) {
+ for (var i = 0, thisLen = this.length; i < thisLen; i++) {
+ if (this[i] === item) {
+ return i;
+ }
+ }
+ return -1;
+ };
+
+ var defineProperty;
+ (function () {
+ try {
+ if (!!Object.defineProperty({}, 'a', {}))
+ defineProperty = Object.defineProperty;
+ }
+ catch (e) {
+ defineProperty = function(obj, prop, opt) {
+ try {
+ obj[prop] = opt.value || opt.get.call(obj);
+ }
+ catch(e) {}
+ }
+ }
+ })();
+
+ function addToError(err, msg) {
+ var newErr;
+ if (err instanceof Error) {
+ newErr = new Error(err.message, err.fileName, err.lineNumber);
+ if (isBrowser) {
+ newErr.message = err.message + '\n\t' + msg;
+ newErr.stack = err.stack;
+ }
+ else {
+ // node errors only look correct with the stack modified
+ newErr.message = err.message;
+ newErr.stack = err.stack + '\n\t' + msg;
+ }
+ }
+ else {
+ newErr = err + '\n\t' + msg;
+ }
+
+ return newErr;
+ }
+
+ function __eval(source, debugName, context) {
+ try {
+ new Function(source).call(context);
+ }
+ catch(e) {
+ throw addToError(e, 'Evaluating ' + debugName);
+ }
+ }
+
+ var baseURI;
+ // environent baseURI detection
+ if (typeof document != 'undefined' && document.getElementsByTagName) {
+ baseURI = document.baseURI;
+
+ if (!baseURI) {
+ var bases = document.getElementsByTagName('base');
+ baseURI = bases[0] && bases[0].href || window.location.href;
+ }
+
+ // sanitize out the hash and querystring
+ baseURI = baseURI.split('#')[0].split('?')[0];
+ baseURI = baseURI.substr(0, baseURI.lastIndexOf('/') + 1);
+ }
+ else if (typeof process != 'undefined' && process.cwd) {
+ baseURI = 'file://' + (isWindows ? '/' : '') + process.cwd() + '/';
+ if (isWindows)
+ baseURI = baseURI.replace(/\\/g, '/');
+ }
+ else if (typeof location != 'undefined') {
+ baseURI = __global.location.href;
+ }
+ else {
+ throw new TypeError('No environment baseURI');
+ }
+
+ var URL = __global.URLPolyfill || __global.URL;
+/*
+*********************************************************************************************
+
+ Dynamic Module Loader Polyfill
+
+ - Implemented exactly to the former 2014-08-24 ES6 Specification Draft Rev 27, Section 15
+ http://wiki.ecmascript.org/doku.php?id=harmony:specification_drafts#august_24_2014_draft_rev_27
+
+ - Functions are commented with their spec numbers, with spec differences commented.
+
+ - Spec bugs are commented in this code with links.
+
+ - Abstract functions have been combined where possible, and their associated functions
+ commented.
+
+ - Realm implementation is entirely omitted.
+
+*********************************************************************************************
+*/
+
+function Module() {}
+// http://www.ecma-international.org/ecma-262/6.0/#sec-@@tostringtag
+defineProperty(Module.prototype, 'toString', {
+ value: function() {
+ return 'Module';
+ }
+});
+function Loader(options) {
+ this._loader = {
+ loaderObj: this,
+ loads: [],
+ modules: {},
+ importPromises: {},
+ moduleRecords: {}
+ };
+
+ // 26.3.3.6
+ defineProperty(this, 'global', {
+ get: function() {
+ return __global;
+ }
+ });
+
+ // 26.3.3.13 realm not implemented
+}
+
+(function() {
+
+// Some Helpers
+
+// logs a linkset snapshot for debugging
+/* function snapshot(loader) {
+ console.log('---Snapshot---');
+ for (var i = 0; i < loader.loads.length; i++) {
+ var load = loader.loads[i];
+ var linkSetLog = ' ' + load.name + ' (' + load.status + '): ';
+
+ for (var j = 0; j < load.linkSets.length; j++) {
+ linkSetLog += '{' + logloads(load.linkSets[j].loads) + '} ';
+ }
+ console.log(linkSetLog);
+ }
+ console.log('');
+}
+function logloads(loads) {
+ var log = '';
+ for (var k = 0; k < loads.length; k++)
+ log += loads[k].name + (k != loads.length - 1 ? ' ' : '');
+ return log;
+} */
+
+
+/* function checkInvariants() {
+ // see https://bugs.ecmascript.org/show_bug.cgi?id=2603#c1
+
+ var loads = System._loader.loads;
+ var linkSets = [];
+
+ for (var i = 0; i < loads.length; i++) {
+ var load = loads[i];
+ console.assert(load.status == 'loading' || load.status == 'loaded', 'Each load is loading or loaded');
+
+ for (var j = 0; j < load.linkSets.length; j++) {
+ var linkSet = load.linkSets[j];
+
+ for (var k = 0; k < linkSet.loads.length; k++)
+ console.assert(loads.indexOf(linkSet.loads[k]) != -1, 'linkSet loads are a subset of loader loads');
+
+ if (linkSets.indexOf(linkSet) == -1)
+ linkSets.push(linkSet);
+ }
+ }
+
+ for (var i = 0; i < loads.length; i++) {
+ var load = loads[i];
+ for (var j = 0; j < linkSets.length; j++) {
+ var linkSet = linkSets[j];
+
+ if (linkSet.loads.indexOf(load) != -1)
+ console.assert(load.linkSets.indexOf(linkSet) != -1, 'linkSet contains load -> load contains linkSet');
+
+ if (load.linkSets.indexOf(linkSet) != -1)
+ console.assert(linkSet.loads.indexOf(load) != -1, 'load contains linkSet -> linkSet contains load');
+ }
+ }
+
+ for (var i = 0; i < linkSets.length; i++) {
+ var linkSet = linkSets[i];
+ for (var j = 0; j < linkSet.loads.length; j++) {
+ var load = linkSet.loads[j];
+
+ for (var k = 0; k < load.dependencies.length; k++) {
+ var depName = load.dependencies[k].value;
+ var depLoad;
+ for (var l = 0; l < loads.length; l++) {
+ if (loads[l].name != depName)
+ continue;
+ depLoad = loads[l];
+ break;
+ }
+
+ // loading records are allowed not to have their dependencies yet
+ // if (load.status != 'loading')
+ // console.assert(depLoad, 'depLoad found');
+
+ // console.assert(linkSet.loads.indexOf(depLoad) != -1, 'linkset contains all dependencies');
+ }
+ }
+ }
+} */
+
+ // 15.2.3 - Runtime Semantics: Loader State
+
+ // 15.2.3.11
+ function createLoaderLoad(object) {
+ return {
+ // modules is an object for ES5 implementation
+ modules: {},
+ loads: [],
+ loaderObj: object
+ };
+ }
+
+ // 15.2.3.2 Load Records and LoadRequest Objects
+
+ // 15.2.3.2.1
+ function createLoad(name) {
+ return {
+ status: 'loading',
+ name: name,
+ linkSets: [],
+ dependencies: [],
+ metadata: {}
+ };
+ }
+
+ // 15.2.3.2.2 createLoadRequestObject, absorbed into calling functions
+
+ // 15.2.4
+
+ // 15.2.4.1
+ function loadModule(loader, name, options) {
+ return new Promise(asyncStartLoadPartwayThrough({
+ step: options.address ? 'fetch' : 'locate',
+ loader: loader,
+ moduleName: name,
+ // allow metadata for import https://bugs.ecmascript.org/show_bug.cgi?id=3091
+ moduleMetadata: options && options.metadata || {},
+ moduleSource: options.source,
+ moduleAddress: options.address
+ }));
+ }
+
+ // 15.2.4.2
+ function requestLoad(loader, request, refererName, refererAddress) {
+ // 15.2.4.2.1 CallNormalize
+ return new Promise(function(resolve, reject) {
+ resolve(loader.loaderObj.normalize(request, refererName, refererAddress));
+ })
+ // 15.2.4.2.2 GetOrCreateLoad
+ .then(function(name) {
+ var load;
+ if (loader.modules[name]) {
+ load = createLoad(name);
+ load.status = 'linked';
+ // https://bugs.ecmascript.org/show_bug.cgi?id=2795
+ load.module = loader.modules[name];
+ return load;
+ }
+
+ for (var i = 0, l = loader.loads.length; i < l; i++) {
+ load = loader.loads[i];
+ if (load.name != name)
+ continue;
+ console.assert(load.status == 'loading' || load.status == 'loaded', 'loading or loaded');
+ return load;
+ }
+
+ load = createLoad(name);
+ loader.loads.push(load);
+
+ proceedToLocate(loader, load);
+
+ return load;
+ });
+ }
+
+ // 15.2.4.3
+ function proceedToLocate(loader, load) {
+ proceedToFetch(loader, load,
+ Promise.resolve()
+ // 15.2.4.3.1 CallLocate
+ .then(function() {
+ return loader.loaderObj.locate({ name: load.name, metadata: load.metadata });
+ })
+ );
+ }
+
+ // 15.2.4.4
+ function proceedToFetch(loader, load, p) {
+ proceedToTranslate(loader, load,
+ p
+ // 15.2.4.4.1 CallFetch
+ .then(function(address) {
+ // adjusted, see https://bugs.ecmascript.org/show_bug.cgi?id=2602
+ if (load.status != 'loading')
+ return;
+ load.address = address;
+
+ return loader.loaderObj.fetch({ name: load.name, metadata: load.metadata, address: address });
+ })
+ );
+ }
+
+ var anonCnt = 0;
+
+ // 15.2.4.5
+ function proceedToTranslate(loader, load, p) {
+ p
+ // 15.2.4.5.1 CallTranslate
+ .then(function(source) {
+ if (load.status != 'loading')
+ return;
+
+ return Promise.resolve(loader.loaderObj.translate({ name: load.name, metadata: load.metadata, address: load.address, source: source }))
+
+ // 15.2.4.5.2 CallInstantiate
+ .then(function(source) {
+ load.source = source;
+ return loader.loaderObj.instantiate({ name: load.name, metadata: load.metadata, address: load.address, source: source });
+ })
+
+ // 15.2.4.5.3 InstantiateSucceeded
+ .then(function(instantiateResult) {
+ if (instantiateResult === undefined) {
+ load.address = load.address || '<Anonymous Module ' + ++anonCnt + '>';
+
+ // instead of load.kind, use load.isDeclarative
+ load.isDeclarative = true;
+ return transpile.call(loader.loaderObj, load)
+ .then(function(transpiled) {
+ // Hijack System.register to set declare function
+ var curSystem = __global.System;
+ var curRegister = curSystem.register;
+ curSystem.register = function(name, deps, declare) {
+ if (typeof name != 'string') {
+ declare = deps;
+ deps = name;
+ }
+ // store the registered declaration as load.declare
+ // store the deps as load.deps
+ load.declare = declare;
+ load.depsList = deps;
+ }
+ // empty {} context is closest to undefined 'this' we can get
+ __eval(transpiled, load.address, {});
+ curSystem.register = curRegister;
+ });
+ }
+ else if (typeof instantiateResult == 'object') {
+ load.depsList = instantiateResult.deps || [];
+ load.execute = instantiateResult.execute;
+ load.isDeclarative = false;
+ }
+ else
+ throw TypeError('Invalid instantiate return value');
+ })
+ // 15.2.4.6 ProcessLoadDependencies
+ .then(function() {
+ load.dependencies = [];
+ var depsList = load.depsList;
+
+ var loadPromises = [];
+ for (var i = 0, l = depsList.length; i < l; i++) (function(request, index) {
+ loadPromises.push(
+ requestLoad(loader, request, load.name, load.address)
+
+ // 15.2.4.6.1 AddDependencyLoad (load is parentLoad)
+ .then(function(depLoad) {
+
+ // adjusted from spec to maintain dependency order
+ // this is due to the System.register internal implementation needs
+ load.dependencies[index] = {
+ key: request,
+ value: depLoad.name
+ };
+
+ if (depLoad.status != 'linked') {
+ var linkSets = load.linkSets.concat([]);
+ for (var i = 0, l = linkSets.length; i < l; i++)
+ addLoadToLinkSet(linkSets[i], depLoad);
+ }
+
+ // console.log('AddDependencyLoad ' + depLoad.name + ' for ' + load.name);
+ // snapshot(loader);
+ })
+ );
+ })(depsList[i], i);
+
+ return Promise.all(loadPromises);
+ })
+
+ // 15.2.4.6.2 LoadSucceeded
+ .then(function() {
+ // console.log('LoadSucceeded ' + load.name);
+ // snapshot(loader);
+
+ console.assert(load.status == 'loading', 'is loading');
+
+ load.status = 'loaded';
+
+ var linkSets = load.linkSets.concat([]);
+ for (var i = 0, l = linkSets.length; i < l; i++)
+ updateLinkSetOnLoad(linkSets[i], load);
+ });
+ })
+ // 15.2.4.5.4 LoadFailed
+ ['catch'](function(exc) {
+ load.status = 'failed';
+ load.exception = exc;
+
+ var linkSets = load.linkSets.concat([]);
+ for (var i = 0, l = linkSets.length; i < l; i++) {
+ linkSetFailed(linkSets[i], load, exc);
+ }
+
+ console.assert(load.linkSets.length == 0, 'linkSets not removed');
+ });
+ }
+
+ // 15.2.4.7 PromiseOfStartLoadPartwayThrough absorbed into calling functions
+
+ // 15.2.4.7.1
+ function asyncStartLoadPartwayThrough(stepState) {
+ return function(resolve, reject) {
+ var loader = stepState.loader;
+ var name = stepState.moduleName;
+ var step = stepState.step;
+
+ if (loader.modules[name])
+ throw new TypeError('"' + name + '" already exists in the module table');
+
+ // adjusted to pick up existing loads
+ var existingLoad;
+ for (var i = 0, l = loader.loads.length; i < l; i++) {
+ if (loader.loads[i].name == name) {
+ existingLoad = loader.loads[i];
+
+ if (step == 'translate' && !existingLoad.source) {
+ existingLoad.address = stepState.moduleAddress;
+ proceedToTranslate(loader, existingLoad, Promise.resolve(stepState.moduleSource));
+ }
+
+ // a primary load -> use that existing linkset if it is for the direct load here
+ // otherwise create a new linkset unit
+ if (existingLoad.linkSets.length && existingLoad.linkSets[0].loads[0].name == existingLoad.name)
+ return existingLoad.linkSets[0].done.then(function() {
+ resolve(existingLoad);
+ });
+ }
+ }
+
+ var load = existingLoad || createLoad(name);
+
+ load.metadata = stepState.moduleMetadata;
+
+ var linkSet = createLinkSet(loader, load);
+
+ loader.loads.push(load);
+
+ resolve(linkSet.done);
+
+ if (step == 'locate')
+ proceedToLocate(loader, load);
+
+ else if (step == 'fetch')
+ proceedToFetch(loader, load, Promise.resolve(stepState.moduleAddress));
+
+ else {
+ console.assert(step == 'translate', 'translate step');
+ load.address = stepState.moduleAddress;
+ proceedToTranslate(loader, load, Promise.resolve(stepState.moduleSource));
+ }
+ }
+ }
+
+ // Declarative linking functions run through alternative implementation:
+ // 15.2.5.1.1 CreateModuleLinkageRecord not implemented
+ // 15.2.5.1.2 LookupExport not implemented
+ // 15.2.5.1.3 LookupModuleDependency not implemented
+
+ // 15.2.5.2.1
+ function createLinkSet(loader, startingLoad) {
+ var linkSet = {
+ loader: loader,
+ loads: [],
+ startingLoad: startingLoad, // added see spec bug https://bugs.ecmascript.org/show_bug.cgi?id=2995
+ loadingCount: 0
+ };
+ linkSet.done = new Promise(function(resolve, reject) {
+ linkSet.resolve = resolve;
+ linkSet.reject = reject;
+ });
+ addLoadToLinkSet(linkSet, startingLoad);
+ return linkSet;
+ }
+ // 15.2.5.2.2
+ function addLoadToLinkSet(linkSet, load) {
+ if (load.status == 'failed')
+ return;
+
+ console.assert(load.status == 'loading' || load.status == 'loaded', 'loading or loaded on link set');
+
+ for (var i = 0, l = linkSet.loads.length; i < l; i++)
+ if (linkSet.loads[i] == load)
+ return;
+
+ linkSet.loads.push(load);
+ load.linkSets.push(linkSet);
+
+ // adjustment, see https://bugs.ecmascript.org/show_bug.cgi?id=2603
+ if (load.status != 'loaded') {
+ linkSet.loadingCount++;
+ }
+
+ var loader = linkSet.loader;
+
+ for (var i = 0, l = load.dependencies.length; i < l; i++) {
+ if (!load.dependencies[i])
+ continue;
+
+ var name = load.dependencies[i].value;
+
+ if (loader.modules[name])
+ continue;
+
+ for (var j = 0, d = loader.loads.length; j < d; j++) {
+ if (loader.loads[j].name != name)
+ continue;
+
+ addLoadToLinkSet(linkSet, loader.loads[j]);
+ break;
+ }
+ }
+ // console.log('add to linkset ' + load.name);
+ // snapshot(linkSet.loader);
+ }
+
+ // linking errors can be generic or load-specific
+ // this is necessary for debugging info
+ function doLink(linkSet) {
+ var error = false;
+ try {
+ link(linkSet, function(load, exc) {
+ linkSetFailed(linkSet, load, exc);
+ error = true;
+ });
+ }
+ catch(e) {
+ linkSetFailed(linkSet, null, e);
+ error = true;
+ }
+ return error;
+ }
+
+ // 15.2.5.2.3
+ function updateLinkSetOnLoad(linkSet, load) {
+ // console.log('update linkset on load ' + load.name);
+ // snapshot(linkSet.loader);
+
+ console.assert(load.status == 'loaded' || load.status == 'linked', 'loaded or linked');
+
+ linkSet.loadingCount--;
+
+ if (linkSet.loadingCount > 0)
+ return;
+
+ // adjusted for spec bug https://bugs.ecmascript.org/show_bug.cgi?id=2995
+ var startingLoad = linkSet.startingLoad;
+
+ // non-executing link variation for loader tracing
+ // on the server. Not in spec.
+ /***/
+ if (linkSet.loader.loaderObj.execute === false) {
+ var loads = [].concat(linkSet.loads);
+ for (var i = 0, l = loads.length; i < l; i++) {
+ var load = loads[i];
+ load.module = !load.isDeclarative ? {
+ module: _newModule({})
+ } : {
+ name: load.name,
+ module: _newModule({}),
+ evaluated: true
+ };
+ load.status = 'linked';
+ finishLoad(linkSet.loader, load);
+ }
+ return linkSet.resolve(startingLoad);
+ }
+ /***/
+
+ var abrupt = doLink(linkSet);
+
+ if (abrupt)
+ return;
+
+ console.assert(linkSet.loads.length == 0, 'loads cleared');
+
+ linkSet.resolve(startingLoad);
+ }
+
+ // 15.2.5.2.4
+ function linkSetFailed(linkSet, load, exc) {
+ var loader = linkSet.loader;
+ var requests;
+
+ checkError:
+ if (load) {
+ if (linkSet.loads[0].name == load.name) {
+ exc = addToError(exc, 'Error loading ' + load.name);
+ }
+ else {
+ for (var i = 0; i < linkSet.loads.length; i++) {
+ var pLoad = linkSet.loads[i];
+ for (var j = 0; j < pLoad.dependencies.length; j++) {
+ var dep = pLoad.dependencies[j];
+ if (dep.value == load.name) {
+ exc = addToError(exc, 'Error loading ' + load.name + ' as "' + dep.key + '" from ' + pLoad.name);
+ break checkError;
+ }
+ }
+ }
+ exc = addToError(exc, 'Error loading ' + load.name + ' from ' + linkSet.loads[0].name);
+ }
+ }
+ else {
+ exc = addToError(exc, 'Error linking ' + linkSet.loads[0].name);
+ }
+
+
+ var loads = linkSet.loads.concat([]);
+ for (var i = 0, l = loads.length; i < l; i++) {
+ var load = loads[i];
+
+ // store all failed load records
+ loader.loaderObj.failed = loader.loaderObj.failed || [];
+ if (indexOf.call(loader.loaderObj.failed, load) == -1)
+ loader.loaderObj.failed.push(load);
+
+ var linkIndex = indexOf.call(load.linkSets, linkSet);
+ console.assert(linkIndex != -1, 'link not present');
+ load.linkSets.splice(linkIndex, 1);
+ if (load.linkSets.length == 0) {
+ var globalLoadsIndex = indexOf.call(linkSet.loader.loads, load);
+ if (globalLoadsIndex != -1)
+ linkSet.loader.loads.splice(globalLoadsIndex, 1);
+ }
+ }
+ linkSet.reject(exc);
+ }
+
+ // 15.2.5.2.5
+ function finishLoad(loader, load) {
+ // add to global trace if tracing
+ if (loader.loaderObj.trace) {
+ if (!loader.loaderObj.loads)
+ loader.loaderObj.loads = {};
+ var depMap = {};
+ load.dependencies.forEach(function(dep) {
+ depMap[dep.key] = dep.value;
+ });
+ loader.loaderObj.loads[load.name] = {
+ name: load.name,
+ deps: load.dependencies.map(function(dep){ return dep.key }),
+ depMap: depMap,
+ address: load.address,
+ metadata: load.metadata,
+ source: load.source,
+ kind: load.isDeclarative ? 'declarative' : 'dynamic'
+ };
+ }
+ // if not anonymous, add to the module table
+ if (load.name) {
+ console.assert(!loader.modules[load.name], 'load not in module table');
+ loader.modules[load.name] = load.module;
+ }
+ var loadIndex = indexOf.call(loader.loads, load);
+ if (loadIndex != -1)
+ loader.loads.splice(loadIndex, 1);
+ for (var i = 0, l = load.linkSets.length; i < l; i++) {
+ loadIndex = indexOf.call(load.linkSets[i].loads, load);
+ if (loadIndex != -1)
+ load.linkSets[i].loads.splice(loadIndex, 1);
+ }
+ load.linkSets.splice(0, load.linkSets.length);
+ }
+
+ function doDynamicExecute(linkSet, load, linkError) {
+ try {
+ var module = load.execute();
+ }
+ catch(e) {
+ linkError(load, e);
+ return;
+ }
+ if (!module || !(module instanceof Module))
+ linkError(load, new TypeError('Execution must define a Module instance'));
+ else
+ return module;
+ }
+
+ // 26.3 Loader
+
+ // 26.3.1.1
+ // defined at top
+
+ // importPromises adds ability to import a module twice without error - https://bugs.ecmascript.org/show_bug.cgi?id=2601
+ function createImportPromise(loader, name, promise) {
+ var importPromises = loader._loader.importPromises;
+ return importPromises[name] = promise.then(function(m) {
+ importPromises[name] = undefined;
+ return m;
+ }, function(e) {
+ importPromises[name] = undefined;
+ throw e;
+ });
+ }
+
+ Loader.prototype = {
+ // 26.3.3.1
+ constructor: Loader,
+ // 26.3.3.2
+ define: function(name, source, options) {
+ // check if already defined
+ if (this._loader.importPromises[name])
+ throw new TypeError('Module is already loading.');
+ return createImportPromise(this, name, new Promise(asyncStartLoadPartwayThrough({
+ step: 'translate',
+ loader: this._loader,
+ moduleName: name,
+ moduleMetadata: options && options.metadata || {},
+ moduleSource: source,
+ moduleAddress: options && options.address
+ })));
+ },
+ // 26.3.3.3
+ 'delete': function(name) {
+ var loader = this._loader;
+ delete loader.importPromises[name];
+ delete loader.moduleRecords[name];
+ return loader.modules[name] ? delete loader.modules[name] : false;
+ },
+ // 26.3.3.4 entries not implemented
+ // 26.3.3.5
+ get: function(key) {
+ if (!this._loader.modules[key])
+ return;
+ doEnsureEvaluated(this._loader.modules[key], [], this);
+ return this._loader.modules[key].module;
+ },
+ // 26.3.3.7
+ has: function(name) {
+ return !!this._loader.modules[name];
+ },
+ // 26.3.3.8
+ 'import': function(name, parentName, parentAddress) {
+ if (typeof parentName == 'object')
+ parentName = parentName.name;
+
+ // run normalize first
+ var loaderObj = this;
+
+ // added, see https://bugs.ecmascript.org/show_bug.cgi?id=2659
+ return Promise.resolve(loaderObj.normalize(name, parentName))
+ .then(function(name) {
+ var loader = loaderObj._loader;
+
+ if (loader.modules[name]) {
+ doEnsureEvaluated(loader.modules[name], [], loader._loader);
+ return loader.modules[name].module;
+ }
+
+ return loader.importPromises[name] || createImportPromise(loaderObj, name,
+ loadModule(loader, name, {})
+ .then(function(load) {
+ delete loader.importPromises[name];
+ return evaluateLoadedModule(loader, load);
+ }));
+ });
+ },
+ // 26.3.3.9 keys not implemented
+ // 26.3.3.10
+ load: function(name) {
+ var loader = this._loader;
+ if (loader.modules[name])
+ return Promise.resolve();
+ return loader.importPromises[name] || createImportPromise(this, name, new Promise(asyncStartLoadPartwayThrough({
+ step: 'locate',
+ loader: loader,
+ moduleName: name,
+ moduleMetadata: {},
+ moduleSource: undefined,
+ moduleAddress: undefined
+ }))
+ .then(function() {
+ delete loader.importPromises[name];
+ }));
+ },
+ // 26.3.3.11
+ module: function(source, options) {
+ var load = createLoad();
+ load.address = options && options.address;
+ var linkSet = createLinkSet(this._loader, load);
+ var sourcePromise = Promise.resolve(source);
+ var loader = this._loader;
+ var p = linkSet.done.then(function() {
+ return evaluateLoadedModule(loader, load);
+ });
+ proceedToTranslate(loader, load, sourcePromise);
+ return p;
+ },
+ // 26.3.3.12
+ newModule: function (obj) {
+ if (typeof obj != 'object')
+ throw new TypeError('Expected object');
+
+ var m = new Module();
+
+ var pNames = [];
+ if (Object.getOwnPropertyNames && obj != null)
+ pNames = Object.getOwnPropertyNames(obj);
+ else
+ for (var key in obj)
+ pNames.push(key);
+
+ for (var i = 0; i < pNames.length; i++) (function(key) {
+ defineProperty(m, key, {
+ configurable: false,
+ enumerable: true,
+ get: function () {
+ return obj[key];
+ }
+ });
+ })(pNames[i]);
+
+ return m;
+ },
+ // 26.3.3.14
+ set: function(name, module) {
+ if (!(module instanceof Module))
+ throw new TypeError('Loader.set(' + name + ', module) must be a module');
+ this._loader.modules[name] = {
+ module: module
+ };
+ },
+ // 26.3.3.15 values not implemented
+ // 26.3.3.16 @@iterator not implemented
+ // 26.3.3.17 @@toStringTag not implemented
+
+ // 26.3.3.18.1
+ normalize: function(name, referrerName, referrerAddress) {
+ return name;
+ },
+ // 26.3.3.18.2
+ locate: function(load) {
+ return load.name;
+ },
+ // 26.3.3.18.3
+ fetch: function(load) {
+ },
+ // 26.3.3.18.4
+ translate: function(load) {
+ return load.source;
+ },
+ // 26.3.3.18.5
+ instantiate: function(load) {
+ }
+ };
+
+ var _newModule = Loader.prototype.newModule;
+/*
+ * ES6 Module Declarative Linking Code - Dev Build Only
+ */
+ function link(linkSet, linkError) {
+
+ var loader = linkSet.loader;
+
+ if (!linkSet.loads.length)
+ return;
+
+ var loads = linkSet.loads.concat([]);
+
+ for (var i = 0; i < loads.length; i++) {
+ var load = loads[i];
+
+ var module = doDynamicExecute(linkSet, load, linkError);
+ if (!module)
+ return;
+ load.module = {
+ name: load.name,
+ module: module
+ };
+ load.status = 'linked';
+
+ finishLoad(loader, load);
+ }
+ }
+
+ function evaluateLoadedModule(loader, load) {
+ console.assert(load.status == 'linked', 'is linked ' + load.name);
+ return load.module.module;
+ }
+
+ function doEnsureEvaluated() {}
+
+ function transpile() {
+ throw new TypeError('ES6 transpilation is only provided in the dev module loader build.');
+ }
+})();/*
+*********************************************************************************************
+
+ System Loader Implementation
+
+ - Implemented to https://github.com/jorendorff/js-loaders/blob/master/browser-loader.js
+
+ - <script type="module"> supported
+
+*********************************************************************************************
+*/
+
+var System;
+
+function SystemLoader() {
+ Loader.call(this);
+ this.paths = {};
+}
+
+// NB no specification provided for System.paths, used ideas discussed in https://github.com/jorendorff/js-loaders/issues/25
+function applyPaths(paths, name) {
+ // most specific (most number of slashes in path) match wins
+ var pathMatch = '', wildcard, maxWildcardPrefixLen = 0;
+
+ // check to see if we have a paths entry
+ for (var p in paths) {
+ var pathParts = p.split('*');
+ if (pathParts.length > 2)
+ throw new TypeError('Only one wildcard in a path is permitted');
+
+ // exact path match
+ if (pathParts.length == 1) {
+ if (name == p) {
+ pathMatch = p;
+ break;
+ }
+ }
+ // wildcard path match
+ else {
+ var wildcardPrefixLen = pathParts[0].length;
+ if (wildcardPrefixLen >= maxWildcardPrefixLen &&
+ name.substr(0, pathParts[0].length) == pathParts[0] &&
+ name.substr(name.length - pathParts[1].length) == pathParts[1]) {
+ maxWildcardPrefixLen = wildcardPrefixLen;
+ pathMatch = p;
+ wildcard = name.substr(pathParts[0].length, name.length - pathParts[1].length - pathParts[0].length);
+ }
+ }
+ }
+
+ var outPath = paths[pathMatch];
+ if (typeof wildcard == 'string')
+ outPath = outPath.replace('*', wildcard);
+
+ return outPath;
+}
+
+// inline Object.create-style class extension
+function LoaderProto() {}
+LoaderProto.prototype = Loader.prototype;
+SystemLoader.prototype = new LoaderProto();
+ var fetchTextFromURL;
+ if (typeof XMLHttpRequest != 'undefined') {
+ fetchTextFromURL = function(url, authorization, fulfill, reject) {
+ var xhr = new XMLHttpRequest();
+ var sameDomain = true;
+ var doTimeout = false;
+ if (!('withCredentials' in xhr)) {
+ // check if same domain
+ var domainCheck = /^(\w+:)?\/\/([^\/]+)/.exec(url);
+ if (domainCheck) {
+ sameDomain = domainCheck[2] === window.location.host;
+ if (domainCheck[1])
+ sameDomain &= domainCheck[1] === window.location.protocol;
+ }
+ }
+ if (!sameDomain && typeof XDomainRequest != 'undefined') {
+ xhr = new XDomainRequest();
+ xhr.onload = load;
+ xhr.onerror = error;
+ xhr.ontimeout = error;
+ xhr.onprogress = function() {};
+ xhr.timeout = 0;
+ doTimeout = true;
+ }
+ function load() {
+ fulfill(xhr.responseText);
+ }
+ function error() {
+ reject(new Error('XHR error' + (xhr.status ? ' (' + xhr.status + (xhr.statusText ? ' ' + xhr.statusText : '') + ')' : '') + ' loading ' + url));
+ }
+
+ xhr.onreadystatechange = function () {
+ if (xhr.readyState === 4) {
+ // in Chrome on file:/// URLs, status is 0
+ if (xhr.status == 0) {
+ if (xhr.responseText) {
+ load();
+ }
+ else {
+ // when responseText is empty, wait for load or error event
+ // to inform if it is a 404 or empty file
+ xhr.addEventListener('error', error);
+ xhr.addEventListener('load', load);
+ }
+ }
+ else if (xhr.status === 200) {
+ load();
+ }
+ else {
+ error();
+ }
+ }
+ };
+ xhr.open("GET", url, true);
+
+ if (xhr.setRequestHeader) {
+ xhr.setRequestHeader('Accept', 'application/x-es-module, */*');
+ // can set "authorization: true" to enable withCredentials only
+ if (authorization) {
+ if (typeof authorization == 'string')
+ xhr.setRequestHeader('Authorization', authorization);
+ xhr.withCredentials = true;
+ }
+ }
+
+ if (doTimeout) {
+ setTimeout(function() {
+ xhr.send();
+ }, 0);
+ } else {
+ xhr.send(null);
+ }
+ };
+ }
+ else if (typeof require != 'undefined' && typeof process != 'undefined') {
+ var fs;
+ fetchTextFromURL = function(url, authorization, fulfill, reject) {
+ if (url.substr(0, 8) != 'file:///')
+ throw new Error('Unable to fetch "' + url + '". Only file URLs of the form file:/// allowed running in Node.');
+ fs = fs || require('fs');
+ if (isWindows)
+ url = url.replace(/\//g, '\\').substr(8);
+ else
+ url = url.substr(7);
+ return fs.readFile(url, function(err, data) {
+ if (err) {
+ return reject(err);
+ }
+ else {
+ // Strip Byte Order Mark out if it's the leading char
+ var dataString = data + '';
+ if (dataString[0] === '\ufeff')
+ dataString = dataString.substr(1);
+
+ fulfill(dataString);
+ }
+ });
+ };
+ }
+ else if (typeof self != 'undefined' && typeof self.fetch != 'undefined') {
+ fetchTextFromURL = function(url, authorization, fulfill, reject) {
+ var opts = {
+ headers: {'Accept': 'application/x-es-module, */*'}
+ };
+
+ if (authorization) {
+ if (typeof authorization == 'string')
+ opts.headers['Authorization'] = authorization;
+ opts.credentials = 'include';
+ }
+
+ fetch(url, opts)
+ .then(function (r) {
+ if (r.ok) {
+ return r.text();
+ } else {
+ throw new Error('Fetch error: ' + r.status + ' ' + r.statusText);
+ }
+ })
+ .then(fulfill, reject);
+ }
+ }
+ else {
+ throw new TypeError('No environment fetch API available.');
+ }
+
+ SystemLoader.prototype.fetch = function(load) {
+ return new Promise(function(resolve, reject) {
+ fetchTextFromURL(load.address, undefined, resolve, reject);
+ });
+ };
+/*
+ * Traceur, Babel and TypeScript transpile hook for Loader
+ */
+var transpile = (function() {
+
+ // use Traceur by default
+ Loader.prototype.transpiler = 'traceur';
+
+ function transpile(load) {
+ var self = this;
+
+ return Promise.resolve(__global[self.transpiler == 'typescript' ? 'ts' : self.transpiler]
+ || (self.pluginLoader || self)['import'](self.transpiler))
+ .then(function(transpiler) {
+ if (transpiler.__useDefault)
+ transpiler = transpiler['default'];
+
+ var transpileFunction;
+ if (transpiler.Compiler)
+ transpileFunction = traceurTranspile;
+ else if (transpiler.createLanguageService)
+ transpileFunction = typescriptTranspile;
+ else
+ transpileFunction = babelTranspile;
+
+ // note __moduleName will be part of the transformer meta in future when we have the spec for this
+ return '(function(__moduleName){' + transpileFunction.call(self, load, transpiler) + '\n})("' + load.name + '");\n//# sourceURL=' + load.address + '!transpiled';
+ });
+ };
+
+ function traceurTranspile(load, traceur) {
+ var options = this.traceurOptions || {};
+ options.modules = 'instantiate';
+ options.script = false;
+ if (options.sourceMaps === undefined)
+ options.sourceMaps = 'inline';
+ options.filename = load.address;
+ options.inputSourceMap = load.metadata.sourceMap;
+ options.moduleName = false;
+
+ var compiler = new traceur.Compiler(options);
+
+ return doTraceurCompile(load.source, compiler, options.filename);
+ }
+ function doTraceurCompile(source, compiler, filename) {
+ try {
+ return compiler.compile(source, filename);
+ }
+ catch(e) {
+ // on older versions of traceur (<0.9.3), an array of errors is thrown
+ // rather than a single error.
+ if (e.length) {
+ throw e[0];
+ }
+ throw e;
+ }
+ }
+
+ function babelTranspile(load, babel) {
+ var options = this.babelOptions || {};
+ options.modules = 'system';
+ if (options.sourceMap === undefined)
+ options.sourceMap = 'inline';
+ options.inputSourceMap = load.metadata.sourceMap;
+ options.filename = load.address;
+ options.code = true;
+ options.ast = false;
+
+ return babel.transform(load.source, options).code;
+ }
+
+ function typescriptTranspile(load, ts) {
+ var options = this.typescriptOptions || {};
+ options.target = options.target || ts.ScriptTarget.ES5;
+ if (options.sourceMap === undefined)
+ options.sourceMap = true;
+ if (options.sourceMap && options.inlineSourceMap !== false)
+ options.inlineSourceMap = true;
+
+ options.module = ts.ModuleKind.System;
+
+ return ts.transpile(load.source, options, load.address);
+ }
+
+ return transpile;
+})();
+// SystemJS Loader Class and Extension helpers
+
+function SystemJSLoader() {
+ SystemLoader.call(this);
+
+ systemJSConstructor.call(this);
+}
+
+// inline Object.create-style class extension
+function SystemProto() {};
+SystemProto.prototype = SystemLoader.prototype;
+SystemJSLoader.prototype = new SystemProto();
+SystemJSLoader.prototype.constructor = SystemJSLoader;
+
+// remove ESML instantiate
+SystemJSLoader.prototype.instantiate = function() {};
+
+var systemJSConstructor;
+
+function hook(name, hook) {
+ SystemJSLoader.prototype[name] = hook(SystemJSLoader.prototype[name] || function() {});
+}
+function hookConstructor(hook) {
+ systemJSConstructor = hook(systemJSConstructor || function() {});
+}
+
+function dedupe(deps) {
+ var newDeps = [];
+ for (var i = 0, l = deps.length; i < l; i++)
+ if (indexOf.call(newDeps, deps[i]) == -1)
+ newDeps.push(deps[i])
+ return newDeps;
+}
+
+function group(deps) {
+ var names = [];
+ var indices = [];
+ for (var i = 0, l = deps.length; i < l; i++) {
+ var index = indexOf.call(names, deps[i]);
+ if (index === -1) {
+ names.push(deps[i]);
+ indices.push([i]);
+ }
+ else {
+ indices[index].push(i);
+ }
+ }
+ return { names: names, indices: indices };
+}
+
+var getOwnPropertyDescriptor = true;
+try {
+ Object.getOwnPropertyDescriptor({ a: 0 }, 'a');
+}
+catch(e) {
+ getOwnPropertyDescriptor = false;
+}
+
+// converts any module.exports object into an object ready for SystemJS.newModule
+function getESModule(exports) {
+ var esModule = {};
+ // don't trigger getters/setters in environments that support them
+ if (typeof exports == 'object' || typeof exports == 'function') {
+ if (getOwnPropertyDescriptor) {
+ var d;
+ for (var p in exports)
+ if (d = Object.getOwnPropertyDescriptor(exports, p))
+ defineProperty(esModule, p, d);
+ }
+ else {
+ var hasOwnProperty = exports && exports.hasOwnProperty;
+ for (var p in exports) {
+ if (!hasOwnProperty || exports.hasOwnProperty(p))
+ esModule[p] = exports[p];
+ }
+ }
+ }
+ esModule['default'] = exports;
+ defineProperty(esModule, '__useDefault', {
+ value: true
+ });
+ return esModule;
+}
+
+function extend(a, b, prepend) {
+ for (var p in b) {
+ if (!prepend || !(p in a))
+ a[p] = b[p];
+ }
+ return a;
+}
+
+// package configuration options
+var packageProperties = ['main', 'format', 'defaultExtension', 'meta', 'map', 'basePath', 'depCache'];
+
+// meta first-level extends where:
+// array + array appends
+// object + object extends
+// other properties replace
+function extendMeta(a, b, prepend) {
+ for (var p in b) {
+ var val = b[p];
+ if (!(p in a))
+ a[p] = val;
+ else if (val instanceof Array && a[p] instanceof Array)
+ a[p] = [].concat(prepend ? val : a[p]).concat(prepend ? a[p] : val);
+ else if (typeof val == 'object' && val !== null && typeof a[p] == 'object')
+ a[p] = extend(extend({}, a[p]), val, prepend);
+ else if (!prepend)
+ a[p] = val;
+ }
+}
+
+function warn(msg) {
+ if (this.warnings && typeof console != 'undefined' && console.warn)
+ console.warn(msg);
+}// we define a __exec for globally-scoped execution
+// used by module format implementations
+var __exec;
+
+(function() {
+
+ // System clobbering protection (mostly for Traceur)
+ var curSystem;
+ var callCounter = 0;
+ var curLoad;
+ function preExec(loader, load) {
+ if (callCounter++ == 0)
+ curSystem = __global.System;
+ __global.System = loader;
+ curLoad = load;
+ }
+ function postExec() {
+ if (--callCounter == 0)
+ __global.System = curSystem;
+ curLoad = undefined;
+ }
+
+ // System.register, System.registerDynamic, AMD define pipeline
+ // if currently evalling code here, immediately reduce the registered entry against the load record
+ hook('pushRegister_', function() {
+ return function(register) {
+ if (!curLoad)
+ return false;
+
+ this.reduceRegister_(curLoad, register);
+ return true;
+ };
+ });
+
+ var hasBtoa = typeof btoa != 'undefined';
+
+ // used to support leading #!/usr/bin/env in scripts as supported in Node
+ var hashBangRegEx = /^\#\!.*/;
+
+ function getSource(load) {
+ var lastLineIndex = load.source.lastIndexOf('\n');
+
+ // wrap ES formats with a System closure for System global encapsulation
+ var wrap = load.metadata.format == 'esm' || load.metadata.format == 'register' || load.metadata.bundle;
+
+ return (wrap ? '(function(System) {' : '') + (load.metadata.format == 'cjs' ? load.source.replace(hashBangRegEx, '') : load.source) + (wrap ? '\n})(System);' : '')
+ // adds the sourceURL comment if not already present
+ + (load.source.substr(lastLineIndex, 15) != '\n//# sourceURL='
+ ? '\n//# sourceURL=' + load.address + (load.metadata.sourceMap ? '!transpiled' : '') : '')
+ // add sourceMappingURL if load.metadata.sourceMap is set
+ + (load.metadata.sourceMap && hasBtoa &&
+ '\n//# sourceMappingURL=data:application/json;base64,' + btoa(unescape(encodeURIComponent(load.metadata.sourceMap))) || '')
+ }
+
+ function evalExec(load) {
+ if (load.metadata.integrity)
+ throw new TypeError('Subresource integrity checking is not supported in Web Workers or Chrome Extensions.');
+ try {
+ preExec(this, load);
+ new Function(getSource(load)).call(__global);
+ postExec();
+ }
+ catch(e) {
+ postExec();
+ throw addToError(e, 'Evaluating ' + load.address);
+ }
+ }
+
+ // use script injection eval to get identical global script behaviour
+ if (typeof document != 'undefined' && document.getElementsByTagName) {
+ var head;
+
+ var scripts = document.getElementsByTagName('script');
+ $__curScript = scripts[scripts.length - 1];
+ __exec = function(load) {
+ if (!this.globalEvaluationScope)
+ return evalExec.call(this, load);
+
+ if (!head)
+ head = document.head || document.body || document.documentElement;
+
+ var script = document.createElement('script');
+ script.text = getSource(load);
+ var onerror = window.onerror;
+ var e;
+ window.onerror = function(_e) {
+ e = addToError(_e, 'Evaluating ' + load.address);
+ }
+ preExec(this, load);
+
+ if (load.metadata.integrity)
+ script.setAttribute('integrity', load.metadata.integrity);
+ if (load.metadata.nonce)
+ script.setAttribute('nonce', load.metadata.nonce);
+
+ head.appendChild(script);
+ head.removeChild(script);
+ postExec();
+ window.onerror = onerror;
+ if (e)
+ throw e;
+ };
+ }
+
+ // global scoped eval for node
+ else if (typeof require != 'undefined') {
+ var vmModule = 'vm';
+ var vm = require(vmModule);
+ __exec = function vmExec(load) {
+ if (!this.globalEvaluationScope)
+ return evalExec.call(this, load);
+
+ if (load.metadata.integrity)
+ throw new TypeError('Subresource integrity checking is unavailable in Node.');
+ try {
+ preExec(this, load);
+ vm.runInThisContext(getSource(load));
+ postExec();
+ }
+ catch(e) {
+ postExec();
+ throw addToError(e.toString(), 'Evaluating ' + load.address);
+ }
+ };
+ }
+ else {
+ __exec = evalExec;
+ }
+
+})();var absURLRegEx = /^[^\/]+:\/\//;
+
+function readMemberExpression(p, value) {
+ var pParts = p.split('.');
+ while (pParts.length)
+ value = value[pParts.shift()];
+ return value;
+}
+
+var baseURLCache = {};
+function getBaseURLObj() {
+ if (baseURLCache[this.baseURL])
+ return baseURLCache[this.baseURL];
+
+ // normalize baseURL if not already
+ if (this.baseURL[this.baseURL.length - 1] != '/')
+ this.baseURL += '/';
+
+ var baseURL = new URL(this.baseURL, baseURI);
+
+ this.baseURL = baseURL.href;
+
+ return (baseURLCache[this.baseURL] = baseURL);
+}
+
+function getMapMatch(map, name) {
+ var bestMatch, bestMatchLength = 0;
+
+ for (var p in map) {
+ if (name.substr(0, p.length) == p && (name.length == p.length || name[p.length] == '/')) {
+ var curMatchLength = p.split('/').length;
+ if (curMatchLength <= bestMatchLength)
+ continue;
+ bestMatch = p;
+ bestMatchLength = curMatchLength;
+ }
+ }
+
+ return bestMatch;
+}
+
+function setConditional(mode) {
+ this.set('@system-env', this.newModule({
+ browser: isBrowser,
+ node: !!this._nodeRequire,
+ env: mode,
+ production: mode == 'production',
+ development: mode == 'development'
+ }));
+}
+
+var baseURIObj = new URL(baseURI);
+
+hookConstructor(function(constructor) {
+ return function() {
+ constructor.call(this);
+
+ // support baseURL
+ this.baseURL = baseURI.substr(0, baseURI.lastIndexOf('/') + 1);
+
+ // support map
+ this.map = {};
+
+ // global behaviour flags
+ this.warnings = false;
+ this.defaultJSExtensions = false;
+ this.globalEvaluationScope = true;
+ this.pluginFirst = false;
+
+ // by default load ".json" files as json
+ // leading * meta doesn't need normalization
+ // NB add this in next breaking release
+ // this.meta['*.json'] = { format: 'json' };
+
+ // Default settings for globalEvaluationScope:
+ // Disabled for WebWorker, Chrome Extensions and jsdom
+ if (isWorker
+ || isBrowser && window.chrome && window.chrome.extension
+ || isBrowser && navigator.userAgent.match(/^Node\.js/))
+ this.globalEvaluationScope = false;
+
+ // support the empty module, as a concept
+ this.set('@empty', this.newModule({}));
+
+ setConditional.call(this, 'development');
+ };
+});
+
+// include the node require since we're overriding it
+if (typeof require != 'undefined' && typeof process != 'undefined' && !process.browser)
+ SystemJSLoader.prototype._nodeRequire = require;
+
+var nodeCoreModules = ['assert', 'buffer', 'child_process', 'cluster', 'console', 'constants',
+ 'crypto', 'dgram', 'dns', 'domain', 'events', 'fs', 'http', 'https', 'module', 'net', 'os', 'path',
+ 'process', 'punycode', 'querystring', 'readline', 'repl', 'stream', 'string_decoder', 'sys', 'timers',
+ 'tls', 'tty', 'url', 'util', 'vm', 'zlib'];
+
+/*
+ Core SystemJS Normalization
+
+ If a name is relative, we apply URL normalization to the page
+ If a name is an absolute URL, we leave it as-is
+
+ Plain names (neither of the above) run through the map and paths
+ normalization phases.
+
+ The paths normalization phase applies last (paths extension), which
+ defines the `decanonicalize` function and normalizes everything into
+ a URL.
+ */
+hook('normalize', function(normalize) {
+ return function(name, parentName) {
+ // first run map config
+ if (name[0] != '.' && name[0] != '/' && !name.match(absURLRegEx)) {
+ var mapMatch = getMapMatch(this.map, name);
+ if (mapMatch)
+ name = this.map[mapMatch] + name.substr(mapMatch.length);
+ }
+
+ // dynamically load node-core modules when requiring `@node/fs` for example
+ if (name.substr(0, 6) == '@node/' && nodeCoreModules.indexOf(name.substr(6)) != -1) {
+ if (!this._nodeRequire)
+ throw new TypeError('Error loading ' + name + '. Can only load node core modules in Node.');
+ this.set(name, this.newModule(getESModule(this._nodeRequire(name.substr(6)))));
+ }
+
+ // relative URL-normalization
+ if (name[0] == '.' || name[0] == '/') {
+ if (parentName)
+ name = new URL(name, parentName.replace(/#/g, '%05')).href.replace(/%05/g, '#');
+ else
+ name = new URL(name, baseURIObj).href;
+ }
+
+ // if the module is in the registry already, use that
+ if (this.has(name))
+ return name;
+
+ if (name.match(absURLRegEx)) {
+ // defaultJSExtensions backwards compatibility
+ if (this.defaultJSExtensions && name.substr(name.length - 3, 3) != '.js')
+ name += '.js';
+ return name;
+ }
+
+ // applyPaths implementation provided from ModuleLoader system.js source
+ name = applyPaths(this.paths, name) || name;
+
+ // defaultJSExtensions backwards compatibility
+ if (this.defaultJSExtensions && name.substr(name.length - 3, 3) != '.js')
+ name += '.js';
+
+ // ./x, /x -> page-relative
+ if (name[0] == '.' || name[0] == '/')
+ return new URL(name, baseURIObj).href;
+ // x -> baseURL-relative
+ else
+ return new URL(name, getBaseURLObj.call(this)).href;
+ };
+});
+
+// percent encode just '#' in urls if using HTTP requests
+var httpRequest = typeof XMLHttpRequest != 'undefined';
+hook('locate', function(locate) {
+ return function(load) {
+ return Promise.resolve(locate.call(this, load))
+ .then(function(address) {
+ if (httpRequest)
+ return address.replace(/#/g, '%23');
+ return address;
+ });
+ };
+});
+
+/*
+ * Fetch with authorization
+ */
+hook('fetch', function() {
+ return function(load) {
+ return new Promise(function(resolve, reject) {
+ fetchTextFromURL(load.address, load.metadata.authorization, resolve, reject);
+ });
+ };
+});
+
+/*
+ __useDefault
+
+ When a module object looks like:
+ newModule(
+ __useDefault: true,
+ default: 'some-module'
+ })
+
+ Then importing that module provides the 'some-module'
+ result directly instead of the full module.
+
+ Useful for eg module.exports = function() {}
+*/
+hook('import', function(systemImport) {
+ return function(name, parentName, parentAddress) {
+ if (parentName && parentName.name)
+ warn.call(this, 'SystemJS.import(name, { name: parentName }) is deprecated for SystemJS.import(name, parentName), while importing ' + name + ' from ' + parentName.name);
+ return systemImport.call(this, name, parentName, parentAddress).then(function(module) {
+ return module.__useDefault ? module['default'] : module;
+ });
+ };
+});
+
+/*
+ * Allow format: 'detect' meta to enable format detection
+ */
+hook('translate', function(systemTranslate) {
+ return function(load) {
+ if (load.metadata.format == 'detect')
+ load.metadata.format = undefined;
+ return systemTranslate.call(this, load);
+ };
+});
+
+
+/*
+ * JSON format support
+ *
+ * Supports loading JSON files as a module format itself
+ *
+ * Usage:
+ *
+ * SystemJS.config({
+ * meta: {
+ * '*.json': { format: 'json' }
+ * }
+ * });
+ *
+ * Module is returned as if written:
+ *
+ * export default {JSON}
+ *
+ * No named exports are provided
+ *
+ * Files ending in ".json" are treated as json automatically by SystemJS
+ */
+hook('instantiate', function(instantiate) {
+ return function(load) {
+ if (load.metadata.format == 'json' && !this.builder) {
+ var entry = load.metadata.entry = createEntry();
+ entry.deps = [];
+ entry.execute = function() {
+ try {
+ return JSON.parse(load.source);
+ }
+ catch(e) {
+ throw new Error("Invalid JSON file " + load.name);
+ }
+ };
+ }
+ };
+})
+
+/*
+ Extend config merging one deep only
+
+ loader.config({
+ some: 'random',
+ config: 'here',
+ deep: {
+ config: { too: 'too' }
+ }
+ });
+
+ <=>
+
+ loader.some = 'random';
+ loader.config = 'here'
+ loader.deep = loader.deep || {};
+ loader.deep.config = { too: 'too' };
+
+
+ Normalizes meta and package configs allowing for:
+
+ SystemJS.config({
+ meta: {
+ './index.js': {}
+ }
+ });
+
+ To become
+
+ SystemJS.meta['https://thissite.com/index.js'] = {};
+
+ For easy normalization canonicalization with latest URL support.
+
+*/
+SystemJSLoader.prototype.env = 'development';
+
+SystemJSLoader.prototype.config = function(cfg) {
+ var loader = this;
+
+ if ('warnings' in cfg)
+ loader.warnings = cfg.warnings;
+
+ // always configure baseURL first
+ if (cfg.baseURL) {
+ var hasConfig = false;
+ function checkHasConfig(obj) {
+ for (var p in obj)
+ return true;
+ }
+ if (checkHasConfig(loader.packages) || checkHasConfig(loader.meta) || checkHasConfig(loader.depCache) || checkHasConfig(loader.bundles) || checkHasConfig(loader.packageConfigPaths))
+ throw new TypeError('Incorrect configuration order. The baseURL must be configured with the first SystemJS.config call.');
+
+ loader.baseURL = cfg.baseURL;
+
+ // sanitize baseURL
+ getBaseURLObj.call(loader);
+ }
+
+ if (cfg.defaultJSExtensions) {
+ loader.defaultJSExtensions = cfg.defaultJSExtensions;
+ warn.call(loader, 'The defaultJSExtensions configuration option is deprecated, use packages configuration instead.');
+ }
+
+ if (cfg.pluginFirst)
+ loader.pluginFirst = cfg.pluginFirst;
+
+ if (cfg.env) {
+ if (cfg.env != 'production' && cfg.env != 'development')
+ throw new TypeError('The config environment must be set to "production" or "development".');
+ setConditional.call(loader, cfg.env);
+ }
+
+ if (cfg.paths) {
+ for (var p in cfg.paths)
+ loader.paths[p] = cfg.paths[p];
+ }
+
+ function noJSDecanonicalize(name) {
+ var normalized = loader.decanonicalize(name);
+ if (loader.defaultJSExtensions && name.substr(name.length - 3, 3) != '.js' && normalized.substr(normalized.length - 3, 3) == '.js')
+ return normalized.substr(0, normalized.length - 3);
+ return normalized;
+ }
+
+ if (cfg.map) {
+ var objMaps = '';
+ for (var p in cfg.map) {
+ var v = cfg.map[p];
+
+ // object map backwards-compat into packages configuration
+ if (typeof v !== 'string') {
+ objMaps += (objMaps.length ? ', ' : '') + '"' + p + '"';
+
+ var normalized = noJSDecanonicalize(p);
+
+ // if a package main, revert it
+ var pkgMatch = '';
+ for (var pkg in loader.packages) {
+ if (normalized.substr(0, pkg.length) == pkg
+ && (!normalized[pkg.length] || normalized[pkg.length] == '/')
+ && pkgMatch.split('/').length < pkg.split('/').length)
+ pkgMatch = pkg;
+ }
+ if (pkgMatch && loader.packages[pkgMatch].main)
+ normalized = normalized.substr(0, normalized.length - loader.packages[pkgMatch].main.length - 1);
+
+ var pkg = loader.packages[normalized] = loader.packages[normalized] || {};
+ pkg.map = v;
+ }
+ else {
+ loader.map[p] = v;
+ }
+ }
+ if (objMaps)
+ warn.call(loader, 'The map configuration for ' + objMaps + ' uses object submaps, which is deprecated in global map.\nUpdate this to use package contextual map with configs like SystemJS.config({ packages: { "' + p + '": { map: {...} } } }).');
+ }
+
+ if (cfg.packageConfigPaths) {
+ var packageConfigPaths = [];
+ for (var i = 0; i < cfg.packageConfigPaths.length; i++) {
+ var path = cfg.packageConfigPaths[i];
+ var packageLength = Math.max(path.lastIndexOf('*') + 1, path.lastIndexOf('/'));
+ var normalized = noJSDecanonicalize(path.substr(0, packageLength) + '/');
+ normalized = normalized.substr(0, normalized.length - 1) + path.substr(packageLength);
+ packageConfigPaths[i] = normalized;
+ }
+ loader.packageConfigPaths = packageConfigPaths;
+ }
+
+ if (cfg.bundles) {
+ for (var p in cfg.bundles) {
+ var bundle = [];
+ for (var i = 0; i < cfg.bundles[p].length; i++)
+ bundle.push(noJSDecanonicalize(cfg.bundles[p][i]));
+ loader.bundles[p] = bundle;
+ }
+ }
+
+ if (cfg.packages) {
+ for (var p in cfg.packages) {
+ if (p.match(/^([^\/]+:)?\/\/$/))
+ throw new TypeError('"' + p + '" is not a valid package name.');
+
+ // trailing slash allows paths matches here
+ var prop = noJSDecanonicalize(p + (p[p.length - 1] != '/' ? '/' : ''));
+
+ // allow trailing '/' in package config
+ if (prop[prop.length - 1] == '/')
+ prop = prop.substr(0, prop.length - 1);
+
+ loader.packages[prop] = loader.packages[prop] || {};
+
+ // meta backwards compatibility
+ if (cfg.packages[p].modules) {
+ warn.call(loader, 'Package ' + p + ' is configured with "modules", which is deprecated as it has been renamed to "meta".');
+ cfg.packages[p].meta = cfg.packages[p].modules;
+ delete cfg.packages[p].modules;
+ }
+
+ for (var q in cfg.packages[p])
+ if (indexOf.call(packageProperties, q) == -1)
+ warn.call(loader, '"' + q + '" is not a valid package configuration option in package ' + p);
+
+ extendMeta(loader.packages[prop], cfg.packages[p]);
+ }
+ }
+
+ for (var c in cfg) {
+ var v = cfg[c];
+ var normalizeProp = false;
+
+ if (c == 'baseURL' || c == 'map' || c == 'packages' || c == 'bundles' || c == 'paths' || c == 'warnings' || c == 'packageConfigPaths')
+ continue;
+
+ if (typeof v != 'object' || v instanceof Array) {
+ loader[c] = v;
+ }
+ else {
+ loader[c] = loader[c] || {};
+
+ if (c == 'meta' || c == 'depCache')
+ normalizeProp = true;
+
+ for (var p in v) {
+ // base-level wildcard meta does not normalize to retain catch-all quality
+ if (c == 'meta' && p[0] == '*')
+ loader[c][p] = v[p];
+ else if (normalizeProp)
+ loader[c][noJSDecanonicalize(p)] = v[p];
+ else
+ loader[c][p] = v[p];
+ }
+ }
+ }
+};/*
+ * Package Configuration Extension
+ *
+ * Example:
+ *
+ * SystemJS.packages = {
+ * jquery: {
+ * basePath: 'lib', // optionally only use a subdirectory within the package
+ * main: 'index.js', // when not set, package name is requested directly
+ * format: 'amd',
+ * defaultExtension: 'ts', // defaults to 'js', can be set to false
+ * modules: {
+ * '*.ts': {
+ * loader: 'typescript'
+ * },
+ * 'vendor/sizzle.js': {
+ * format: 'global'
+ * }
+ * },
+ * map: {
+ * // map internal require('sizzle') to local require('./vendor/sizzle')
+ * sizzle: './vendor/sizzle.js',
+ * // map any internal or external require of 'jquery/vendor/another' to 'another/index.js'
+ * './vendor/another.js': './another/index.js',
+ * // test.js / test -> lib/test.js
+ * './test.js': './lib/test.js',
+ *
+ * // environment-specific map configurations
+ * './index.js': {
+ * '~browser': './index-node.js'
+ * }
+ * },
+ * // allows for setting package-prefixed depCache
+ * // keys are normalized module names relative to the package itself
+ * depCache: {
+ * // import 'package/index.js' loads in parallel package/lib/test.js,package/vendor/sizzle.js
+ * './index.js': ['./test'],
+ * './test.js': ['external-dep'],
+ * 'external-dep/path.js': ['./another.js']
+ * }
+ * }
+ * };
+ *
+ * Then:
+ * import 'jquery' -> jquery/index.js
+ * import 'jquery/submodule' -> jquery/submodule.js
+ * import 'jquery/submodule.ts' -> jquery/submodule.ts loaded as typescript
+ * import 'jquery/vendor/another' -> another/index.js
+ *
+ * Detailed Behaviours
+ * - main can have a leading "./" can be added optionally
+ * - map and defaultExtension are applied to the main
+ * - defaultExtension adds the extension only if the exact extension is not present
+ * - defaultJSExtensions applies after map when defaultExtension is not set
+ * - if a meta value is available for a module, map and defaultExtension are skipped
+ * - like global map, package map also applies to subpaths (sizzle/x, ./vendor/another/sub)
+ * - condition module map is '@env' module in package or '@system-env' globally
+ * - map targets support conditional interpolation ('./x': './x.#{|env}.js')
+ * - internal package map targets cannot use boolean conditionals
+ *
+ * In addition, the following modules properties will be allowed to be package
+ * -relative as well in the package module config:
+ *
+ * - loader
+ * - alias
+ *
+ *
+ * Package Configuration Loading
+ *
+ * Not all packages may already have their configuration present in the System config
+ * For these cases, a list of packageConfigPaths can be provided, which when matched against
+ * a request, will first request a ".json" file by the package name to derive the package
+ * configuration from. This allows dynamic loading of non-predetermined code, a key use
+ * case in SystemJS.
+ *
+ * Example:
+ *
+ * SystemJS.packageConfigPaths = ['packages/test/package.json', 'packages/*.json'];
+ *
+ * // will first request 'packages/new-package/package.json' for the package config
+ * // before completing the package request to 'packages/new-package/path'
+ * SystemJS.import('packages/new-package/path');
+ *
+ * // will first request 'packages/test/package.json' before the main
+ * SystemJS.import('packages/test');
+ *
+ * When a package matches packageConfigPaths, it will always send a config request for
+ * the package configuration.
+ * The package name itself is taken to be the match up to and including the last wildcard
+ * or trailing slash.
+ * The most specific package config path will be used.
+ * Any existing package configurations for the package will deeply merge with the
+ * package config, with the existing package configurations taking preference.
+ * To opt-out of the package configuration request for a package that matches
+ * packageConfigPaths, use the { configured: true } package config option.
+ *
+ */
+(function() {
+
+ hookConstructor(function(constructor) {
+ return function() {
+ constructor.call(this);
+ this.packages = {};
+ this.packageConfigPaths = {};
+ };
+ });
+
+ function getPackage(loader, normalized) {
+ // use most specific package
+ var curPkg, curPkgLen = 0, pkgLen;
+ for (var p in loader.packages) {
+ if (normalized.substr(0, p.length) === p && (normalized.length === p.length || normalized[p.length] === '/')) {
+ pkgLen = p.split('/').length;
+ if (pkgLen > curPkgLen) {
+ curPkg = p;
+ curPkgLen = pkgLen;
+ }
+ }
+ }
+ return curPkg;
+ }
+
+ function getBasePath(pkg) {
+ // sanitize basePath
+ var basePath = pkg.basePath && pkg.basePath != '.' ? pkg.basePath : '';
+ if (basePath) {
+ if (basePath.substr(0, 2) == './')
+ basePath = basePath.substr(2);
+ if (basePath[basePath.length - 1] != '/')
+ basePath += '/';
+ }
+ return basePath;
+ }
+
+ function addDefaultExtension(loader, pkg, pkgName, basePath, subPath, skipExtensions) {
+ // don't apply extensions to folders or if defaultExtension = false
+ if (!subPath || subPath[subPath.length - 1] == '/' || skipExtensions || pkg.defaultExtension === false)
+ return subPath;
+
+ // NB are you sure about this?
+ // skip if we have interpolation conditional syntax in subPath?
+ if (subPath.match(interpolationRegEx))
+ return subPath;
+
+ var metaMatch = false;
+
+ // exact meta or meta with any content after the last wildcard skips extension
+ if (pkg.meta)
+ getMetaMatches(pkg.meta, subPath, function(metaPattern, matchMeta, matchDepth) {
+ if (matchDepth == 0 || metaPattern.lastIndexOf('*') != metaPattern.length - 1)
+ return metaMatch = true;
+ });
+
+ // exact global meta or meta with any content after the last wildcard skips extension
+ if (!metaMatch && loader.meta)
+ getMetaMatches(loader.meta, pkgName + '/' + basePath + subPath, function(metaPattern, matchMeta, matchDepth) {
+ if (matchDepth == 0 || metaPattern.lastIndexOf('*') != metaPattern.length - 1)
+ return metaMatch = true;
+ });
+
+ if (metaMatch)
+ return subPath;
+
+ // work out what the defaultExtension is and add if not there already
+ // NB reconsider if default should really be ".js"?
+ var defaultExtension = '.' + (pkg.defaultExtension || 'js');
+ if (subPath.substr(subPath.length - defaultExtension.length) != defaultExtension)
+ return subPath + defaultExtension;
+ else
+ return subPath;
+ }
+
+ function applyPackageConfigSync(loader, pkg, pkgName, subPath, skipExtensions) {
+ // main
+ if (!subPath) {
+ if (pkg.main)
+ subPath = pkg.main.substr(0, 2) == './' ? pkg.main.substr(2) : pkg.main;
+ // also no submap if name is package itself (import 'pkg' -> 'path/to/pkg.js')
+ else
+ // NB can add a default package main convention here when defaultJSExtensions is deprecated
+ // if it becomes internal to the package then it would no longer be an exit path
+ return pkgName + (loader.defaultJSExtensions ? '.js' : '');
+ }
+
+ var basePath = getBasePath(pkg);
+
+ // map config checking without then with extensions
+ if (pkg.map) {
+ var mapPath = './' + subPath;
+
+ var mapMatch = getMapMatch(pkg.map, mapPath);
+
+ // we then check map with the default extension adding
+ if (!mapMatch) {
+ mapPath = './' + addDefaultExtension(loader, pkg, pkgName, basePath, subPath, skipExtensions);
+ if (mapPath != './' + subPath)
+ mapMatch = getMapMatch(pkg.map, mapPath);
+ }
+ if (mapMatch)
+ return doMapSync(loader, pkg, pkgName, basePath, mapMatch, mapPath, skipExtensions);
+ }
+
+ // normal package resolution
+ return pkgName + '/' + basePath + addDefaultExtension(loader, pkg, pkgName, basePath, subPath, skipExtensions);
+ }
+
+ function doMapSync(loader, pkg, pkgName, basePath, mapMatch, path, skipExtensions) {
+ var mapped = pkg.map[mapMatch];
+
+ // ignore conditionals in sync
+ if (typeof mapped != 'string')
+ mapped = mapMatch = path;
+
+ // package map to main / base-level
+ if (mapped == '.')
+ mapped = pkgName;
+
+ // internal package map
+ else if (mapped.substr(0, 2) == './')
+ return pkgName + '/' + basePath + addDefaultExtension(loader, pkg, pkgName, basePath, mapped.substr(2) + path.substr(mapMatch.length), skipExtensions);
+
+ // external map reference
+ return loader.normalizeSync(mapped + path.substr(mapMatch.length), pkgName + '/');
+ }
+
+ function applyPackageConfig(loader, pkg, pkgName, subPath, skipExtensions) {
+ // main
+ if (!subPath) {
+ if (pkg.main)
+ subPath = pkg.main.substr(0, 2) == './' ? pkg.main.substr(2) : pkg.main;
+ // also no submap if name is package itself (import 'pkg' -> 'path/to/pkg.js')
+ else
+ // NB can add a default package main convention here when defaultJSExtensions is deprecated
+ // if it becomes internal to the package then it would no longer be an exit path
+ return Promise.resolve(pkgName + (loader.defaultJSExtensions ? '.js' : ''));
+ }
+
+ var basePath = getBasePath(pkg);
+
+ // map config checking without then with extensions
+ var mapPath, mapMatch;
+
+ if (pkg.map) {
+ mapPath = './' + subPath;
+ mapMatch = getMapMatch(pkg.map, mapPath);
+
+ // we then check map with the default extension adding
+ if (!mapMatch) {
+ mapPath = './' + addDefaultExtension(loader, pkg, pkgName, basePath, subPath, skipExtensions);
+ if (mapPath != './' + subPath)
+ mapMatch = getMapMatch(pkg.map, mapPath);
+ }
+ }
+
+ return (mapMatch ? doMap(loader, pkg, pkgName, basePath, mapMatch, mapPath, skipExtensions) : Promise.resolve())
+ .then(function(mapped) {
+ if (mapped)
+ return Promise.resolve(mapped);
+
+ // normal package resolution / fallback resolution for no conditional match
+ return Promise.resolve(pkgName + '/' + basePath + addDefaultExtension(loader, pkg, pkgName, basePath, subPath, skipExtensions));
+ });
+ }
+
+ function doStringMap(loader, pkg, pkgName, basePath, mapMatch, mapped, path, skipExtensions) {
+ // NB the interpolation cases should strictly skip subsequent interpolation
+
+ // package map to main / base-level
+ if (mapped == '.')
+ mapped = pkgName;
+
+ // internal package map
+ else if (mapped.substr(0, 2) == './')
+ return Promise.resolve(pkgName + '/' + basePath + addDefaultExtension(loader, pkg, pkgName, basePath, mapped.substr(2) + path.substr(mapMatch.length), skipExtensions))
+ .then(function(name) {
+ return interpolateConditional.call(loader, name, pkgName + '/');
+ });
+
+ // external map reference
+ // NB deprecate the use of the second argument here -> should be fully global reference
+ return loader.normalize(mapped + path.substr(mapMatch.length), pkgName + '/');
+ }
+
+ function doMap(loader, pkg, pkgName, basePath, mapMatch, path, skipExtensions) {
+ var mapped = pkg.map[mapMatch];
+
+ if (typeof mapped == 'string')
+ return doStringMap(loader, pkg, pkgName, basePath, mapMatch, mapped, path, skipExtensions);
+
+ // we use a special conditional syntax to allow the builder to handle conditional branch points further
+ if (loader.builder)
+ return Promise.resolve(pkgName + '/#:' + path);
+
+ // map object -> conditional map
+ return loader['import'](pkg.map['@env'] || '@system-env', pkgName)
+ .then(function(env) {
+ // first map condition to match is used
+ for (var e in mapped) {
+ var negate = e[0] == '~';
+
+ var value = readMemberExpression(negate ? e.substr(1) : e, env);
+
+ if (!negate && value || negate && !value)
+ return mapped[e];
+ }
+ })
+ .then(function(mapped) {
+ if (mapped)
+ return doStringMap(loader, pkg, pkgName, basePath, mapMatch, mapped, path, skipExtensions);
+
+ // no environment match -> fallback to original subPath by returning undefined
+ });
+ }
+
+ // normalizeSync = decanonicalize + package resolution
+ SystemJSLoader.prototype.normalizeSync = SystemJSLoader.prototype.decanonicalize = SystemJSLoader.prototype.normalize;
+
+ // decanonicalize must JUST handle package defaultExtension: false case when defaultJSExtensions is set
+ // to be deprecated!
+ hook('decanonicalize', function(decanonicalize) {
+ return function(name, parentName) {
+ var decanonicalized = decanonicalize.call(this, name, parentName);
+
+ if (!this.defaultJSExtensions)
+ return decanonicalized;
+
+ var pkgName = getPackage(this, decanonicalized);
+
+ var defaultExtension = pkgName && this.packages[pkgName].defaultExtension;
+
+ if (defaultExtension && (defaultExtension === false || defaultExtension != '.js') && name.substr(name.length - 3, 3) != '.js' && decanonicalized.substr(decanonicalized.length - 3, 3) == '.js')
+ decanonicalized = decanonicalized.substr(0, decanonicalized.length - 3);
+
+ return decanonicalized;
+ };
+ });
+
+ hook('normalizeSync', function(normalizeSync) {
+ return function(name, parentName, isPlugin) {
+ warn.call(this, 'SystemJS.normalizeSync has been deprecated for SystemJS.decanonicalize.');
+
+ var loader = this;
+ isPlugin = isPlugin === true;
+
+ // apply contextual package map first
+ // (we assume the parent package config has already been loaded)
+ if (parentName)
+ var parentPackageName = getPackage(loader, parentName) ||
+ loader.defaultJSExtensions && parentName.substr(parentName.length - 3, 3) == '.js' &&
+ getPackage(loader, parentName.substr(0, parentName.length - 3));
+
+ var parentPackage = parentPackageName && loader.packages[parentPackageName];
+
+ // remove any parent basePath from parentName
+ if (parentPackage) {
+ var parentBasePath = getBasePath(parentPackage);
+ if (parentBasePath && parentName.substr(parentPackageName.length + 1, parentBasePath.length) == parentBasePath)
+ parentName = parentPackageName + parentName.substr(parentPackageName.length + parentBasePath.length);
+ }
+
+ // ignore . since internal maps handled by standard package resolution
+ if (parentPackage && name[0] != '.') {
+ var parentMap = parentPackage.map;
+ var parentMapMatch = parentMap && getMapMatch(parentMap, name);
+
+ if (parentMapMatch && typeof parentMap[parentMapMatch] == 'string')
+ return doMapSync(loader, parentPackage, parentPackageName, getBasePath(parentPackage), parentMapMatch, name, isPlugin);
+ }
+
+ var defaultJSExtension = loader.defaultJSExtensions && name.substr(name.length - 3, 3) != '.js';
+
+ // apply map, core, paths, contextual package map
+ var normalized = normalizeSync.call(loader, name, parentName);
+
+ // undo defaultJSExtension
+ if (defaultJSExtension && normalized.substr(normalized.length - 3, 3) != '.js')
+ defaultJSExtension = false;
+ if (defaultJSExtension)
+ normalized = normalized.substr(0, normalized.length - 3);
+
+ var pkgConfigMatch = getPackageConfigMatch(loader, normalized);
+ var pkgName = pkgConfigMatch && pkgConfigMatch.packageName || getPackage(loader, normalized);
+
+ if (!pkgName)
+ return normalized + (defaultJSExtension ? '.js' : '');
+
+ var subPath = normalized.substr(pkgName.length + 1);
+
+ // allow for direct package name normalization with trailling "/" (no main)
+ // that is normalize('pkg/') does not apply main, while normalize('./', 'pkg/') does
+ if (!subPath && normalized.length == pkgName.length + 1 && name[0] != '.')
+ return pkgName + subPath;
+
+ return applyPackageConfigSync(loader, loader.packages[pkgName] || {}, pkgName, subPath, isPlugin);
+ };
+ });
+
+ hook('normalize', function(normalize) {
+ return function(name, parentName, isPlugin) {
+ var loader = this;
+ isPlugin = isPlugin === true;
+
+ return Promise.resolve()
+ .then(function() {
+ // apply contextual package map first
+ // (we assume the parent package config has already been loaded)
+ if (parentName)
+ var parentPackageName = getPackage(loader, parentName) ||
+ loader.defaultJSExtensions && parentName.substr(parentName.length - 3, 3) == '.js' &&
+ getPackage(loader, parentName.substr(0, parentName.length - 3));
+
+ var parentPackage = parentPackageName && loader.packages[parentPackageName];
+
+ // remove any parent basePath from parentName
+ if (parentPackage) {
+ var parentBasePath = getBasePath(parentPackage);
+ if (parentBasePath && parentName.substr(parentPackageName.length + 1, parentBasePath.length) == parentBasePath)
+ parentName = parentPackageName + parentName.substr(parentPackageName.length + parentBasePath.length);
+ }
+
+ // ignore . since internal maps handled by standard package resolution
+ if (parentPackage && name.substr(0, 2) != './') {
+ var parentMap = parentPackage.map;
+ var parentMapMatch = parentMap && getMapMatch(parentMap, name);
+
+ if (parentMapMatch)
+ return doMap(loader, parentPackage, parentPackageName, parentBasePath, parentMapMatch, name, isPlugin);
+ }
+
+ return Promise.resolve();
+ })
+ .then(function(mapped) {
+ if (mapped)
+ return mapped;
+
+ var defaultJSExtension = loader.defaultJSExtensions && name.substr(name.length - 3, 3) != '.js';
+
+ // apply map, core, paths, contextual package map
+ var normalized = normalize.call(loader, name, parentName);
+
+ // undo defaultJSExtension
+ if (defaultJSExtension && normalized.substr(normalized.length - 3, 3) != '.js')
+ defaultJSExtension = false;
+ if (defaultJSExtension)
+ normalized = normalized.substr(0, normalized.length - 3);
+
+ var pkgConfigMatch = getPackageConfigMatch(loader, normalized);
+ var pkgName = pkgConfigMatch && pkgConfigMatch.packageName || getPackage(loader, normalized);
+
+ if (!pkgName)
+ return Promise.resolve(normalized + (defaultJSExtension ? '.js' : ''));
+
+ var pkg = loader.packages[pkgName];
+
+ // if package is already configured or not a dynamic config package, use existing package config
+ var isConfigured = pkg && (pkg.configured || !pkgConfigMatch);
+ return (isConfigured ? Promise.resolve(pkg) : loadPackageConfigPath(loader, pkgName, pkgConfigMatch.configPath))
+ .then(function(pkg) {
+ var subPath = normalized.substr(pkgName.length + 1);
+
+ // allow for direct package name normalization with trailling "/" (no main)
+ // that is normalize('pkg/') does not apply main, while normalize('./', 'pkg/') does
+ if (!subPath && normalized.length == pkgName.length + 1 && name[0] != '.')
+ return Promise.resolve(pkgName + subPath);
+
+ return applyPackageConfig(loader, pkg, pkgName, subPath, isPlugin);
+ });
+ });
+ };
+ });
+
+ // check if the given normalized name matches a packageConfigPath
+ // if so, loads the config
+ var packageConfigPaths = {};
+
+ // data object for quick checks against package paths
+ function createPkgConfigPathObj(path) {
+ var lastWildcard = path.lastIndexOf('*');
+ var length = Math.max(lastWildcard + 1, path.lastIndexOf('/'));
+ return {
+ length: length,
+ // NB handle regex control character escapes or simply create a test function here
+ regEx: new RegExp('^(' + path.substr(0, length).replace(/\*/g, '[^\\/]+') + ')(\\/|$)'),
+ wildcard: lastWildcard != -1
+ };
+ }
+
+ // most specific match wins
+ function getPackageConfigMatch(loader, normalized) {
+ var pkgName, exactMatch = false, configPath;
+ for (var i = 0; i < loader.packageConfigPaths.length; i++) {
+ var packageConfigPath = loader.packageConfigPaths[i];
+ var p = packageConfigPaths[packageConfigPath] || (packageConfigPaths[packageConfigPath] = createPkgConfigPathObj(packageConfigPath));
+ if (normalized.length < p.length)
+ continue;
+ var match = normalized.match(p.regEx);
+ if (match && (!pkgName || (!(exactMatch && p.wildcard) && pkgName.length < match[1].length))) {
+ pkgName = match[1];
+ exactMatch = !p.wildcard;
+ configPath = pkgName + packageConfigPath.substr(p.length);
+ }
+ }
+
+ if (!pkgName)
+ return;
+
+ return {
+ packageName: pkgName,
+ configPath: configPath
+ };
+ }
+
+ function loadPackageConfigPath(loader, pkgName, pkgConfigPath) {
+ var configLoader = loader.pluginLoader || loader;
+
+ // NB remove this when json is default
+ (configLoader.meta[pkgConfigPath] = configLoader.meta[pkgConfigPath] || {}).format = 'json';
+
+ return configLoader.load(pkgConfigPath)
+ .then(function() {
+ pkgConfig = configLoader.get(pkgConfigPath);
+
+ var cfg = pkgConfig['default'];
+
+ // support "systemjs" prefixing
+ if (cfg.systemjs)
+ cfg = cfg.systemjs;
+
+ // modules backwards compatibility
+ if (cfg.modules) {
+ cfg.meta = cfg.modules;
+ warn.call(loader, 'Package config file ' + pkgConfigPath + ' is configured with "modules", which is deprecated as it has been renamed to "meta".');
+ }
+
+ // remove any non-system properties if generic config file (eg package.json)
+ for (var p in cfg) {
+ if (indexOf.call(packageProperties, p) == -1)
+ delete cfg[p];
+ }
+
+ // deeply-merge (to first level) config with any existing package config
+ var pkg = loader.packages[pkgName] = loader.packages[pkgName] || {};
+ extendMeta(pkg, cfg, true);
+
+ // support external depCache
+ var basePath = getBasePath(pkg);
+ if (cfg.depCache) {
+ for (var d in cfg.depCache) {
+ var dNormalized;
+
+ if (d.substr(0, 2) == './')
+ dNormalized = pkgName + '/' + basePath + d.substr(2);
+ else
+ dNormalized = coreResolve.call(loader, d);
+ loader.depCache[dNormalized] = (loader.depCache[dNormalized] || []).concat(cfg.depCache[d]);
+ }
+ delete cfg.depCache;
+ }
+
+ return pkg;
+ });
+ }
+
+ function getMetaMatches(pkgMeta, subPath, matchFn) {
+ // wildcard meta
+ var meta = {};
+ var wildcardIndex;
+ for (var module in pkgMeta) {
+ // allow meta to start with ./ for flexibility
+ var dotRel = module.substr(0, 2) == './' ? './' : '';
+ if (dotRel)
+ module = module.substr(2);
+
+ wildcardIndex = module.indexOf('*');
+ if (wildcardIndex === -1)
+ continue;
+
+ if (module.substr(0, wildcardIndex) == subPath.substr(0, wildcardIndex)
+ && module.substr(wildcardIndex + 1) == subPath.substr(subPath.length - module.length + wildcardIndex + 1)) {
+ // alow match function to return true for an exit path
+ if (matchFn(module, pkgMeta[dotRel + module], module.split('/').length))
+ return;
+ }
+ }
+ // exact meta
+ var exactMeta = pkgMeta[subPath] || pkgMeta['./' + subPath];
+ if (exactMeta)
+ matchFn(exactMeta, exactMeta, 0);
+ }
+
+ hook('locate', function(locate) {
+ return function(load) {
+ var loader = this;
+ return Promise.resolve(locate.call(this, load))
+ .then(function(address) {
+ var pkgName = getPackage(loader, load.name);
+ if (pkgName) {
+ var pkg = loader.packages[pkgName];
+ var basePath = getBasePath(pkg);
+ var subPath = load.name.substr(pkgName.length + basePath.length + 1);
+
+ // format
+ if (pkg.format)
+ load.metadata.format = load.metadata.format || pkg.format;
+
+ var meta = {};
+ if (pkg.meta) {
+ var bestDepth = 0;
+
+ // NB support a main shorthand in meta here?
+ getMetaMatches(pkg.meta, subPath, function(metaPattern, matchMeta, matchDepth) {
+ if (matchDepth > bestDepth)
+ bestDepth = matchDepth;
+ extendMeta(meta, matchMeta, matchDepth && bestDepth > matchDepth);
+ });
+
+ // allow alias and loader to be package-relative
+ if (meta.alias && meta.alias.substr(0, 2) == './')
+ meta.alias = pkgName + meta.alias.substr(1);
+ if (meta.loader && meta.loader.substr(0, 2) == './')
+ meta.loader = pkgName + meta.loader.substr(1);
+ extendMeta(load.metadata, meta);
+ }
+ }
+
+ return address;
+ });
+ };
+ });
+
+})();
+/*
+ * Script tag fetch
+ *
+ * When load.metadata.scriptLoad is true, we load via script tag injection.
+ */
+(function() {
+
+ if (typeof document != 'undefined')
+ var head = document.getElementsByTagName('head')[0];
+
+ var curSystem;
+
+ // if doing worker executing, this is set to the load record being executed
+ var workerLoad = null;
+
+ // interactive mode handling method courtesy RequireJS
+ var ieEvents = head && (function() {
+ var s = document.createElement('script');
+ var isOpera = typeof opera !== 'undefined' && opera.toString() === '[object Opera]';
+ return s.attachEvent && !(s.attachEvent.toString && s.attachEvent.toString().indexOf('[native code') < 0) && !isOpera;
+ })();
+
+ // IE interactive-only part
+ // we store loading scripts array as { script: <script>, load: {...} }
+ var interactiveLoadingScripts = [];
+ var interactiveScript;
+ function getInteractiveScriptLoad() {
+ if (interactiveScript && interactiveScript.script.readyState === 'interactive')
+ return interactiveScript.load;
+
+ for (var i = 0; i < interactiveLoadingScripts.length; i++)
+ if (interactiveLoadingScripts[i].script.readyState == 'interactive') {
+ interactiveScript = interactiveLoadingScripts[i];
+ return interactiveScript.load;
+ }
+ }
+
+ // System.register, System.registerDynamic, AMD define pipeline
+ // this is called by the above methods when they execute
+ // we then run the reduceRegister_ collection function either immediately
+ // if we are in IE and know the currently executing script (interactive)
+ // or later if we need to wait for the synchronous load callback to know the script
+ var loadingCnt = 0;
+ var registerQueue = [];
+ hook('pushRegister_', function(pushRegister) {
+ return function(register) {
+ // if using eval-execution then skip
+ if (pushRegister.call(this, register))
+ return false;
+
+ // if using worker execution, then we're done
+ if (workerLoad)
+ this.reduceRegister_(workerLoad, register);
+
+ // detect if we know the currently executing load (IE)
+ // if so, immediately call reduceRegister
+ else if (ieEvents)
+ this.reduceRegister_(getInteractiveScriptLoad(), register);
+
+ // otherwise, add to our execution queue
+ // to call reduceRegister on sync script load event
+ else if (loadingCnt)
+ registerQueue.push(register);
+
+ // if we're not currently loading anything though
+ // then do the reduction against a null load
+ // (out of band named define or named register)
+ // note even in non-script environments, this catch is used
+ else
+ this.reduceRegister_(null, register);
+
+ return true;
+ };
+ });
+
+ function webWorkerImport(loader, load) {
+ return new Promise(function(resolve, reject) {
+ if (load.metadata.integrity)
+ reject(new Error('Subresource integrity checking is not supported in web workers.'));
+
+ workerLoad = load;
+ try {
+ importScripts(load.address);
+ }
+ catch(e) {
+ workerLoad = null;
+ reject(e);
+ }
+ workerLoad = null;
+
+ // if nothing registered, then something went wrong
+ if (!load.metadata.entry)
+ reject(new Error(load.address + ' did not call System.register or AMD define'));
+
+ resolve('');
+ });
+ }
+
+ // override fetch to use script injection
+ hook('fetch', function(fetch) {
+ return function(load) {
+ var loader = this;
+
+ if (!load.metadata.scriptLoad || (!isBrowser && !isWorker))
+ return fetch.call(this, load);
+
+ if (isWorker)
+ return webWorkerImport(loader, load);
+
+ return new Promise(function(resolve, reject) {
+ var s = document.createElement('script');
+
+ s.async = true;
+
+ if (load.metadata.integrity)
+ s.setAttribute('integrity', load.metadata.integrity);
+
+ if (ieEvents) {
+ s.attachEvent('onreadystatechange', complete);
+ interactiveLoadingScripts.push({
+ script: s,
+ load: load
+ });
+ }
+ else {
+ s.addEventListener('load', complete, false);
+ s.addEventListener('error', error, false);
+ }
+
+ loadingCnt++;
+
+ curSystem = __global.System;
+
+ s.src = load.address;
+ head.appendChild(s);
+
+ function complete(evt) {
+ if (s.readyState && s.readyState != 'loaded' && s.readyState != 'complete')
+ return;
+
+ loadingCnt--;
+
+ // complete call is sync on execution finish
+ // (in ie already done reductions)
+ if (!load.metadata.entry && !registerQueue.length) {
+ loader.reduceRegister_(load);
+ }
+ else if (!ieEvents) {
+ for (var i = 0; i < registerQueue.length; i++)
+ loader.reduceRegister_(load, registerQueue[i]);
+ registerQueue = [];
+ }
+
+ cleanup();
+
+ // if nothing registered, then something went wrong
+ if (!load.metadata.entry && !load.metadata.bundle)
+ reject(new Error(load.name + ' did not call System.register or AMD define. If loading a global module configure the global name via the meta exports property for script injection support.'));
+
+ resolve('');
+ }
+
+ function error(evt) {
+ cleanup();
+ reject(new Error('Unable to load script ' + load.address));
+ }
+
+ function cleanup() {
+ __global.System = curSystem;
+
+ if (s.detachEvent) {
+ s.detachEvent('onreadystatechange', complete);
+ for (var i = 0; i < interactiveLoadingScripts.length; i++)
+ if (interactiveLoadingScripts[i].script == s) {
+ if (interactiveScript && interactiveScript.script == s)
+ interactiveScript = null;
+ interactiveLoadingScripts.splice(i, 1);
+ }
+ }
+ else {
+ s.removeEventListener('load', complete, false);
+ s.removeEventListener('error', error, false);
+ }
+
+ head.removeChild(s);
+ }
+ });
+ };
+ });
+})();
+/*
+ * Instantiate registry extension
+ *
+ * Supports Traceur System.register 'instantiate' output for loading ES6 as ES5.
+ *
+ * - Creates the loader.register function
+ * - Also supports metadata.format = 'register' in instantiate for anonymous register modules
+ * - Also supports metadata.deps, metadata.execute and metadata.executingRequire
+ * for handling dynamic modules alongside register-transformed ES6 modules
+ *
+ *
+ * The code here replicates the ES6 linking groups algorithm to ensure that
+ * circular ES6 compiled into System.register can work alongside circular AMD
+ * and CommonJS, identically to the actual ES6 loader.
+ *
+ */
+
+
+/*
+ * Registry side table entries in loader.defined
+ * Registry Entry Contains:
+ * - name
+ * - deps
+ * - declare for declarative modules
+ * - execute for dynamic modules, different to declarative execute on module
+ * - executingRequire indicates require drives execution for circularity of dynamic modules
+ * - declarative optional boolean indicating which of the above
+ *
+ * Can preload modules directly on SystemJS.defined['my/module'] = { deps, execute, executingRequire }
+ *
+ * Then the entry gets populated with derived information during processing:
+ * - normalizedDeps derived from deps, created in instantiate
+ * - groupIndex used by group linking algorithm
+ * - evaluated indicating whether evaluation has happend
+ * - module the module record object, containing:
+ * - exports actual module exports
+ *
+ * For dynamic we track the es module with:
+ * - esModule actual es module value
+ * - esmExports whether to extend the esModule with named exports
+ *
+ * Then for declarative only we track dynamic bindings with the 'module' records:
+ * - name
+ * - exports
+ * - setters declarative setter functions
+ * - dependencies, module records of dependencies
+ * - importers, module records of dependents
+ *
+ * After linked and evaluated, entries are removed, declarative module records remain in separate
+ * module binding table
+ *
+ */
+
+var leadingCommentAndMetaRegEx = /^\s*(\/\*[^\*]*(\*(?!\/)[^\*]*)*\*\/|\s*\/\/[^\n]*|\s*"[^"]+"\s*;?|\s*'[^']+'\s*;?)*\s*/;
+function detectRegisterFormat(source) {
+ var leadingCommentAndMeta = source.match(leadingCommentAndMetaRegEx);
+ return leadingCommentAndMeta && source.substr(leadingCommentAndMeta[0].length, 15) == 'System.register';
+}
+
+function createEntry() {
+ return {
+ name: null,
+ deps: null,
+ originalIndices: null,
+ declare: null,
+ execute: null,
+ executingRequire: false,
+ declarative: false,
+ normalizedDeps: null,
+ groupIndex: null,
+ evaluated: false,
+ module: null,
+ esModule: null,
+ esmExports: false
+ };
+}
+
+(function() {
+
+ /*
+ * There are two variations of System.register:
+ * 1. System.register for ES6 conversion (2-3 params) - System.register([name, ]deps, declare)
+ * see https://github.com/ModuleLoader/es6-module-loader/wiki/System.register-Explained
+ *
+ * 2. System.registerDynamic for dynamic modules (3-4 params) - System.registerDynamic([name, ]deps, executingRequire, execute)
+ * the true or false statement
+ *
+ * this extension implements the linking algorithm for the two variations identical to the spec
+ * allowing compiled ES6 circular references to work alongside AMD and CJS circular references.
+ *
+ */
+ SystemJSLoader.prototype.register = function(name, deps, declare) {
+ if (typeof name != 'string') {
+ declare = deps;
+ deps = name;
+ name = null;
+ }
+
+ // dynamic backwards-compatibility
+ // can be deprecated eventually
+ if (typeof declare == 'boolean')
+ return this.registerDynamic.apply(this, arguments);
+
+ var entry = createEntry();
+ // ideally wouldn't apply map config to bundle names but
+ // dependencies go through map regardless so we can't restrict
+ // could reconsider in shift to new spec
+ entry.name = name && (this.decanonicalize || this.normalize).call(this, name);
+ entry.declarative = true;
+ entry.deps = deps;
+ entry.declare = declare;
+
+ this.pushRegister_({
+ amd: false,
+ entry: entry
+ });
+ };
+ SystemJSLoader.prototype.registerDynamic = function(name, deps, declare, execute) {
+ if (typeof name != 'string') {
+ execute = declare;
+ declare = deps;
+ deps = name;
+ name = null;
+ }
+
+ // dynamic
+ var entry = createEntry();
+ entry.name = name && (this.decanonicalize || this.normalize).call(this, name);
+ entry.deps = deps;
+ entry.execute = execute;
+ entry.executingRequire = declare;
+
+ this.pushRegister_({
+ amd: false,
+ entry: entry
+ });
+ };
+ hook('reduceRegister_', function() {
+ return function(load, register) {
+ if (!register)
+ return;
+
+ var entry = register.entry;
+ var curMeta = load && load.metadata;
+
+ // named register
+ if (entry.name) {
+ if (!(entry.name in this.defined))
+ this.defined[entry.name] = entry;
+
+ if (curMeta)
+ curMeta.bundle = true;
+ }
+ // anonymous register
+ if (!entry.name || load && entry.name == load.name) {
+ if (!curMeta)
+ throw new TypeError('Unexpected anonymous System.register call.');
+ if (curMeta.entry) {
+ if (curMeta.format == 'register')
+ throw new Error('Multiple anonymous System.register calls in module ' + load.name + '. If loading a bundle, ensure all the System.register calls are named.');
+ else
+ throw new Error('Module ' + load.name + ' interpreted as ' + curMeta.format + ' module format, but called System.register.');
+ }
+ if (!curMeta.format)
+ curMeta.format = 'register';
+ curMeta.entry = entry;
+ }
+ };
+ });
+
+ hookConstructor(function(constructor) {
+ return function() {
+ constructor.call(this);
+
+ this.defined = {};
+ this._loader.moduleRecords = {};
+ };
+ });
+
+ function buildGroups(entry, loader, groups) {
+ groups[entry.groupIndex] = groups[entry.groupIndex] || [];
+
+ if (indexOf.call(groups[entry.groupIndex], entry) != -1)
+ return;
+
+ groups[entry.groupIndex].push(entry);
+
+ for (var i = 0, l = entry.normalizedDeps.length; i < l; i++) {
+ var depName = entry.normalizedDeps[i];
+ var depEntry = loader.defined[depName];
+
+ // not in the registry means already linked / ES6
+ if (!depEntry || depEntry.evaluated)
+ continue;
+
+ // now we know the entry is in our unlinked linkage group
+ var depGroupIndex = entry.groupIndex + (depEntry.declarative != entry.declarative);
+
+ // the group index of an entry is always the maximum
+ if (depEntry.groupIndex === null || depEntry.groupIndex < depGroupIndex) {
+
+ // if already in a group, remove from the old group
+ if (depEntry.groupIndex !== null) {
+ groups[depEntry.groupIndex].splice(indexOf.call(groups[depEntry.groupIndex], depEntry), 1);
+
+ // if the old group is empty, then we have a mixed depndency cycle
+ if (groups[depEntry.groupIndex].length == 0)
+ throw new Error("Mixed dependency cycle detected");
+ }
+
+ depEntry.groupIndex = depGroupIndex;
+ }
+
+ buildGroups(depEntry, loader, groups);
+ }
+ }
+
+ function link(name, loader) {
+ var startEntry = loader.defined[name];
+
+ // skip if already linked
+ if (startEntry.module)
+ return;
+
+ startEntry.groupIndex = 0;
+
+ var groups = [];
+
+ buildGroups(startEntry, loader, groups);
+
+ var curGroupDeclarative = !!startEntry.declarative == groups.length % 2;
+ for (var i = groups.length - 1; i >= 0; i--) {
+ var group = groups[i];
+ for (var j = 0; j < group.length; j++) {
+ var entry = group[j];
+
+ // link each group
+ if (curGroupDeclarative)
+ linkDeclarativeModule(entry, loader);
+ else
+ linkDynamicModule(entry, loader);
+ }
+ curGroupDeclarative = !curGroupDeclarative;
+ }
+ }
+
+ // module binding records
+ function Module() {}
+ defineProperty(Module, 'toString', {
+ value: function() {
+ return 'Module';
+ }
+ });
+
+ function getOrCreateModuleRecord(name, moduleRecords) {
+ return moduleRecords[name] || (moduleRecords[name] = {
+ name: name,
+ dependencies: [],
+ exports: new Module(), // start from an empty module and extend
+ importers: []
+ });
+ }
+
+ function linkDeclarativeModule(entry, loader) {
+ // only link if already not already started linking (stops at circular)
+ if (entry.module)
+ return;
+
+ var moduleRecords = loader._loader.moduleRecords;
+ var module = entry.module = getOrCreateModuleRecord(entry.name, moduleRecords);
+ var exports = entry.module.exports;
+
+ var declaration = entry.declare.call(__global, function(name, value) {
+ module.locked = true;
+
+ if (typeof name == 'object') {
+ for (var p in name)
+ exports[p] = name[p];
+ }
+ else {
+ exports[name] = value;
+ }
+
+ for (var i = 0, l = module.importers.length; i < l; i++) {
+ var importerModule = module.importers[i];
+ if (!importerModule.locked) {
+ var importerIndex = indexOf.call(importerModule.dependencies, module);
+ importerModule.setters[importerIndex](exports);
+ }
+ }
+
+ module.locked = false;
+ return value;
+ }, entry.name);
+
+ module.setters = declaration.setters;
+ module.execute = declaration.execute;
+
+ if (!module.setters || !module.execute) {
+ throw new TypeError('Invalid System.register form for ' + entry.name);
+ }
+
+ // now link all the module dependencies
+ for (var i = 0, l = entry.normalizedDeps.length; i < l; i++) {
+ var depName = entry.normalizedDeps[i];
+ var depEntry = loader.defined[depName];
+ var depModule = moduleRecords[depName];
+
+ // work out how to set depExports based on scenarios...
+ var depExports;
+
+ if (depModule) {
+ depExports = depModule.exports;
+ }
+ // dynamic, already linked in our registry
+ else if (depEntry && !depEntry.declarative) {
+ depExports = depEntry.esModule;
+ }
+ // in the loader registry
+ else if (!depEntry) {
+ depExports = loader.get(depName);
+ }
+ // we have an entry -> link
+ else {
+ linkDeclarativeModule(depEntry, loader);
+ depModule = depEntry.module;
+ depExports = depModule.exports;
+ }
+
+ // only declarative modules have dynamic bindings
+ if (depModule && depModule.importers) {
+ depModule.importers.push(module);
+ module.dependencies.push(depModule);
+ }
+ else {
+ module.dependencies.push(null);
+ }
+
+ // run setters for all entries with the matching dependency name
+ var originalIndices = entry.originalIndices[i];
+ for (var j = 0, len = originalIndices.length; j < len; ++j) {
+ var index = originalIndices[j];
+ if (module.setters[index]) {
+ module.setters[index](depExports);
+ }
+ }
+ }
+ }
+
+ // An analog to loader.get covering execution of all three layers (real declarative, simulated declarative, simulated dynamic)
+ function getModule(name, loader) {
+ var exports;
+ var entry = loader.defined[name];
+
+ if (!entry) {
+ exports = loader.get(name);
+ if (!exports)
+ throw new Error('Unable to load dependency ' + name + '.');
+ }
+
+ else {
+ if (entry.declarative)
+ ensureEvaluated(name, [], loader);
+
+ else if (!entry.evaluated)
+ linkDynamicModule(entry, loader);
+
+ exports = entry.module.exports;
+ }
+
+ if ((!entry || entry.declarative) && exports && exports.__useDefault)
+ return exports['default'];
+
+ return exports;
+ }
+
+ function linkDynamicModule(entry, loader) {
+ if (entry.module)
+ return;
+
+ var exports = {};
+
+ var module = entry.module = { exports: exports, id: entry.name };
+
+ // AMD requires execute the tree first
+ if (!entry.executingRequire) {
+ for (var i = 0, l = entry.normalizedDeps.length; i < l; i++) {
+ var depName = entry.normalizedDeps[i];
+ // we know we only need to link dynamic due to linking algorithm
+ var depEntry = loader.defined[depName];
+ if (depEntry)
+ linkDynamicModule(depEntry, loader);
+ }
+ }
+
+ // now execute
+ entry.evaluated = true;
+ var output = entry.execute.call(__global, function(name) {
+ for (var i = 0, l = entry.deps.length; i < l; i++) {
+ if (entry.deps[i] != name)
+ continue;
+ return getModule(entry.normalizedDeps[i], loader);
+ }
+ throw new Error('Module ' + name + ' not declared as a dependency.');
+ }, exports, module);
+
+ if (output)
+ module.exports = output;
+
+ // create the esModule object, which allows ES6 named imports of dynamics
+ exports = module.exports;
+
+ // __esModule flag treats as already-named
+ if (exports && exports.__esModule)
+ entry.esModule = exports;
+ // set module as 'default' export, then fake named exports by iterating properties
+ else if (entry.esmExports && exports !== __global)
+ entry.esModule = getESModule(exports);
+ // just use the 'default' export
+ else
+ entry.esModule = { 'default': exports };
+ }
+
+ /*
+ * Given a module, and the list of modules for this current branch,
+ * ensure that each of the dependencies of this module is evaluated
+ * (unless one is a circular dependency already in the list of seen
+ * modules, in which case we execute it)
+ *
+ * Then we evaluate the module itself depth-first left to right
+ * execution to match ES6 modules
+ */
+ function ensureEvaluated(moduleName, seen, loader) {
+ var entry = loader.defined[moduleName];
+
+ // if already seen, that means it's an already-evaluated non circular dependency
+ if (!entry || entry.evaluated || !entry.declarative)
+ return;
+
+ // this only applies to declarative modules which late-execute
+
+ seen.push(moduleName);
+
+ for (var i = 0, l = entry.normalizedDeps.length; i < l; i++) {
+ var depName = entry.normalizedDeps[i];
+ if (indexOf.call(seen, depName) == -1) {
+ if (!loader.defined[depName])
+ loader.get(depName);
+ else
+ ensureEvaluated(depName, seen, loader);
+ }
+ }
+
+ if (entry.evaluated)
+ return;
+
+ entry.evaluated = true;
+ entry.module.execute.call(__global);
+ }
+
+ // override the delete method to also clear the register caches
+ hook('delete', function(del) {
+ return function(name) {
+ delete this._loader.moduleRecords[name];
+ delete this.defined[name];
+ return del.call(this, name);
+ };
+ });
+
+ hook('fetch', function(fetch) {
+ return function(load) {
+ if (this.defined[load.name]) {
+ load.metadata.format = 'defined';
+ return '';
+ }
+
+ if (load.metadata.format == 'register' && !load.metadata.authorization && load.metadata.scriptLoad !== false)
+ load.metadata.scriptLoad = true;
+
+ load.metadata.deps = load.metadata.deps || [];
+
+ return fetch.call(this, load);
+ };
+ });
+
+ hook('translate', function(translate) {
+ // we run the meta detection here (register is after meta)
+ return function(load) {
+ load.metadata.deps = load.metadata.deps || [];
+ return Promise.resolve(translate.call(this, load)).then(function(source) {
+ // run detection for register format
+ if (load.metadata.format == 'register' || !load.metadata.format && detectRegisterFormat(load.source))
+ load.metadata.format = 'register';
+ return source;
+ });
+ };
+ });
+
+ hook('instantiate', function(instantiate) {
+ return function(load) {
+ if (load.metadata.format == 'detect')
+ load.metadata.format = undefined;
+
+ // assumes previous instantiate is sync
+ // (core json support)
+ instantiate.call(this, load);
+
+ var loader = this;
+
+ var entry;
+
+ // first we check if this module has already been defined in the registry
+ if (loader.defined[load.name]) {
+ entry = loader.defined[load.name];
+ // don't support deps for ES modules
+ if (!entry.declarative)
+ entry.deps = entry.deps.concat(load.metadata.deps);
+ }
+
+ // picked up already by an anonymous System.register script injection
+ // or via the dynamic formats
+ else if (load.metadata.entry) {
+ entry = load.metadata.entry;
+ entry.deps = entry.deps.concat(load.metadata.deps);
+ }
+
+ // Contains System.register calls
+ // (dont run bundles in the builder)
+ else if (!(loader.builder && load.metadata.bundle)
+ && (load.metadata.format == 'register' || load.metadata.format == 'esm' || load.metadata.format == 'es6')) {
+
+ if (typeof __exec != 'undefined')
+ __exec.call(loader, load);
+
+ if (!load.metadata.entry && !load.metadata.bundle)
+ throw new Error(load.name + ' detected as ' + load.metadata.format + ' but didn\'t execute.');
+
+ entry = load.metadata.entry;
+
+ // support metadata deps for System.register
+ if (entry && load.metadata.deps)
+ entry.deps = entry.deps.concat(load.metadata.deps);
+ }
+
+ // named bundles are just an empty module
+ if (!entry) {
+ entry = createEntry();
+ entry.deps = load.metadata.deps;
+ entry.execute = function() {};
+ }
+
+ // place this module onto defined for circular references
+ loader.defined[load.name] = entry;
+
+ var grouped = group(entry.deps);
+
+ entry.deps = grouped.names;
+ entry.originalIndices = grouped.indices;
+ entry.name = load.name;
+ entry.esmExports = load.metadata.esmExports !== false;
+
+ // first, normalize all dependencies
+ var normalizePromises = [];
+ for (var i = 0, l = entry.deps.length; i < l; i++)
+ normalizePromises.push(Promise.resolve(loader.normalize(entry.deps[i], load.name)));
+
+ return Promise.all(normalizePromises).then(function(normalizedDeps) {
+
+ entry.normalizedDeps = normalizedDeps;
+
+ return {
+ deps: entry.deps,
+ execute: function() {
+ // recursively ensure that the module and all its
+ // dependencies are linked (with dependency group handling)
+ link(load.name, loader);
+
+ // now handle dependency execution in correct order
+ ensureEvaluated(load.name, [], loader);
+
+ // remove from the registry
+ loader.defined[load.name] = undefined;
+
+ // return the defined module object
+ return loader.newModule(entry.declarative ? entry.module.exports : entry.esModule);
+ }
+ };
+ });
+ };
+ });
+})();
+/*
+ * Extension to detect ES6 and auto-load Traceur or Babel for processing
+ */
+(function() {
+ // good enough ES6 module detection regex - format detections not designed to be accurate, but to handle the 99% use case
+ var esmRegEx = /(^\s*|[}\);\n]\s*)(import\s+(['"]|(\*\s+as\s+)?[^"'\(\)\n;]+\s+from\s+['"]|\{)|export\s+\*\s+from\s+["']|export\s+(\{|default|function|class|var|const|let|async\s+function))/;
+
+ var traceurRuntimeRegEx = /\$traceurRuntime\s*\./;
+ var babelHelpersRegEx = /babelHelpers\s*\./;
+
+ hook('translate', function(translate) {
+ return function(load) {
+ var loader = this;
+ return translate.call(loader, load)
+ .then(function(source) {
+ // detect & transpile ES6
+ if (load.metadata.format == 'esm' || load.metadata.format == 'es6' || !load.metadata.format && loader.transpiler !== false && source.match(esmRegEx)) {
+ if (load.metadata.format == 'es6')
+ warn.call(loader, 'Module ' + load.name + ' has metadata setting its format to "es6", which is deprecated.\nThis should be updated to "esm".');
+
+ load.metadata.format = 'esm';
+
+ if (loader.transpiler === false) {
+ // we accept translation to esm for builds though to enable eg rollup optimizations
+ if (loader.builder)
+ return source;
+ throw new TypeError('Unable to dynamically transpile ES module as SystemJS.transpiler set to false.');
+ }
+
+ // setting _loader.loadedTranspiler = false tells the next block to
+ // do checks for setting transpiler metadata
+ loader._loader.loadedTranspiler = loader._loader.loadedTranspiler || false;
+ if (loader.pluginLoader)
+ loader.pluginLoader._loader.loadedTranspiler = loader._loader.loadedTranspiler || false;
+
+ // do transpilation
+ return (loader._loader.transpilerPromise || (
+ loader._loader.transpilerPromise = Promise.resolve(
+ __global[loader.transpiler == 'typescript' ? 'ts' : loader.transpiler] || (loader.pluginLoader || loader)['import'](loader.transpiler)
+ ))).then(function(transpiler) {
+ loader._loader.loadedTranspilerRuntime = true;
+
+ // translate hooks means this is a transpiler plugin instead of a raw implementation
+ if (transpiler.translate) {
+ // if transpiler is the same as the plugin loader, then don't run twice
+ if (transpiler == load.metadata.loaderModule)
+ return load.source;
+
+ return Promise.resolve(transpiler.translate.call(loader, load))
+ .then(function(source) {
+ if (load.metadata.format == 'esm' && !loader.builder && detectRegisterFormat(source))
+ load.metadata.format = 'register';
+ return source;
+ });
+ }
+
+ // legacy builder support
+ if (loader.builder)
+ load.metadata.originalSource = load.source;
+
+ // defined in es6-module-loader/src/transpile.js
+ return transpile.call(loader, load)
+ .then(function(source) {
+ // clear sourceMap as transpiler embeds it
+ load.metadata.sourceMap = undefined;
+ return source;
+ });
+ });
+ }
+
+ // skip transpiler and transpiler runtime loading when transpiler is disabled
+ if (loader.transpiler === false)
+ return source;
+
+ // load the transpiler correctly
+ if (loader._loader.loadedTranspiler === false && (loader.transpiler == 'traceur' || loader.transpiler == 'typescript' || loader.transpiler == 'babel')
+ && load.name == loader.normalizeSync(loader.transpiler)) {
+
+ // always load transpiler as a global
+ if (source.length > 100 && !load.metadata.format) {
+ load.metadata.format = 'global';
+
+ if (loader.transpiler === 'traceur')
+ load.metadata.exports = 'traceur';
+ if (loader.transpiler === 'typescript')
+ load.metadata.exports = 'ts';
+ }
+
+ loader._loader.loadedTranspiler = true;
+ }
+
+ // load the transpiler runtime correctly
+ if (loader._loader.loadedTranspilerRuntime === false) {
+ if (load.name == loader.normalizeSync('traceur-runtime')
+ || load.name == loader.normalizeSync('babel/external-helpers*')) {
+ if (source.length > 100)
+ load.metadata.format = load.metadata.format || 'global';
+
+ loader._loader.loadedTranspilerRuntime = true;
+ }
+ }
+
+ // detect transpiler runtime usage to load runtimes
+ if ((load.metadata.format == 'register' || load.metadata.bundle) && loader._loader.loadedTranspilerRuntime !== true) {
+ if (!__global.$traceurRuntime && load.source.match(traceurRuntimeRegEx)) {
+ loader._loader.loadedTranspilerRuntime = loader._loader.loadedTranspilerRuntime || false;
+ return loader['import']('traceur-runtime').then(function() {
+ return source;
+ });
+ }
+ if (!__global.babelHelpers && load.source.match(babelHelpersRegEx)) {
+ loader._loader.loadedTranspilerRuntime = loader._loader.loadedTranspilerRuntime || false;
+ return loader['import']('babel/external-helpers').then(function() {
+ return source;
+ });
+ }
+ }
+
+ return source;
+ });
+ };
+ });
+
+})();
+/*
+ SystemJS Global Format
+
+ Supports
+ metadata.deps
+ metadata.globals
+ metadata.exports
+
+ Without metadata.exports, detects writes to the global object.
+*/
+var __globalName = typeof self != 'undefined' ? 'self' : 'global';
+
+hook('fetch', function(fetch) {
+ return function(load) {
+ if (load.metadata.exports && !load.metadata.format)
+ load.metadata.format = 'global';
+
+ // A global with exports, no globals and no deps
+ // can be loaded via a script tag
+ if (load.metadata.format == 'global' && !load.metadata.authorization
+ && load.metadata.exports && !load.metadata.globals
+ && (!load.metadata.deps || load.metadata.deps.length == 0)
+ && load.metadata.scriptLoad !== false)
+ load.metadata.scriptLoad = true;
+
+ return fetch.call(this, load);
+ };
+});
+
+// ideally we could support script loading for globals, but the issue with that is that
+// we can't do it with AMD support side-by-side since AMD support means defining the
+// global define, and global support means not definining it, yet we don't have any hook
+// into the "pre-execution" phase of a script tag being loaded to handle both cases
+hook('instantiate', function(instantiate) {
+ return function(load) {
+ var loader = this;
+
+ if (!load.metadata.format)
+ load.metadata.format = 'global';
+
+ // global is a fallback module format
+ if (load.metadata.format == 'global' && !load.metadata.registered) {
+
+ var entry = createEntry();
+
+ load.metadata.entry = entry;
+
+ entry.deps = [];
+
+ for (var g in load.metadata.globals)
+ entry.deps.push(load.metadata.globals[g]);
+
+ entry.execute = function(require, exports, module) {
+
+ var globals;
+ if (load.metadata.globals) {
+ globals = {};
+ for (var g in load.metadata.globals)
+ if (load.metadata.globals[g])
+ globals[g] = require(load.metadata.globals[g]);
+ }
+
+ var exportName = load.metadata.exports;
+
+ if (exportName)
+ load.source += '\n' + __globalName + '["' + exportName + '"] = ' + exportName + ';';
+
+ var retrieveGlobal = loader.get('@@global-helpers').prepareGlobal(module.id, exportName, globals);
+
+ __exec.call(loader, load);
+
+ return retrieveGlobal();
+ }
+ }
+ return instantiate.call(this, load);
+ };
+});
+hook('reduceRegister_', function(reduceRegister) {
+ return function(load, register) {
+ if (register || !load.metadata.exports)
+ return reduceRegister.call(this, load, register);
+
+ load.metadata.format = 'global';
+ var entry = load.metadata.entry = createEntry();
+ entry.deps = load.metadata.deps;
+ var globalValue = readMemberExpression(load.metadata.exports, __global);
+ entry.execute = function() {
+ return globalValue;
+ };
+ };
+});
+
+hookConstructor(function(constructor) {
+ return function() {
+ var loader = this;
+ constructor.call(loader);
+
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
+
+ // bare minimum ignores for IE8
+ var ignoredGlobalProps = ['_g', 'sessionStorage', 'localStorage', 'clipboardData', 'frames', 'frameElement', 'external', 'mozAnimationStartTime', 'webkitStorageInfo', 'webkitIndexedDB'];
+
+ var globalSnapshot;
+
+ function forEachGlobal(callback) {
+ if (Object.keys)
+ Object.keys(__global).forEach(callback);
+ else
+ for (var g in __global) {
+ if (!hasOwnProperty.call(__global, g))
+ continue;
+ callback(g);
+ }
+ }
+
+ function forEachGlobalValue(callback) {
+ forEachGlobal(function(globalName) {
+ if (indexOf.call(ignoredGlobalProps, globalName) != -1)
+ return;
+ try {
+ var value = __global[globalName];
+ }
+ catch (e) {
+ ignoredGlobalProps.push(globalName);
+ }
+ callback(globalName, value);
+ });
+ }
+
+ loader.set('@@global-helpers', loader.newModule({
+ prepareGlobal: function(moduleName, exportName, globals) {
+ // disable module detection
+ var curDefine = __global.define;
+
+ __global.define = undefined;
+ __global.exports = undefined;
+ if (__global.module && __global.module.exports)
+ __global.module = undefined;
+
+ // set globals
+ var oldGlobals;
+ if (globals) {
+ oldGlobals = {};
+ for (var g in globals) {
+ oldGlobals[g] = __global[g];
+ __global[g] = globals[g];
+ }
+ }
+
+ // store a complete copy of the global object in order to detect changes
+ if (!exportName) {
+ globalSnapshot = {};
+
+ forEachGlobalValue(function(name, value) {
+ globalSnapshot[name] = value;
+ });
+ }
+
+ // return function to retrieve global
+ return function() {
+ var globalValue;
+
+ if (exportName) {
+ globalValue = readMemberExpression(exportName, __global);
+ }
+ else {
+ var singleGlobal;
+ var multipleExports;
+ var exports = {};
+
+ forEachGlobalValue(function(name, value) {
+ if (globalSnapshot[name] === value)
+ return;
+ if (typeof value == 'undefined')
+ return;
+ exports[name] = value;
+
+ if (typeof singleGlobal != 'undefined') {
+ if (!multipleExports && singleGlobal !== value)
+ multipleExports = true;
+ }
+ else {
+ singleGlobal = value;
+ }
+ });
+ globalValue = multipleExports ? exports : singleGlobal;
+ }
+
+ // revert globals
+ if (oldGlobals) {
+ for (var g in oldGlobals)
+ __global[g] = oldGlobals[g];
+ }
+ __global.define = curDefine;
+
+ return globalValue;
+ };
+ }
+ }));
+ };
+});
+/*
+ SystemJS CommonJS Format
+*/
+(function() {
+ // CJS Module Format
+ // require('...') || exports[''] = ... || exports.asd = ... || module.exports = ...
+ var cjsExportsRegEx = /(?:^\uFEFF?|[^$_a-zA-Z\xA0-\uFFFF.])(exports\s*(\[['"]|\.)|module(\.exports|\['exports'\]|\["exports"\])\s*(\[['"]|[=,\.]))/;
+ // RegEx adjusted from https://github.com/jbrantly/yabble/blob/master/lib/yabble.js#L339
+ var cjsRequireRegEx = /(?:^\uFEFF?|[^$_a-zA-Z\xA0-\uFFFF."'])require\s*\(\s*("[^"\\]*(?:\\.[^"\\]*)*"|'[^'\\]*(?:\\.[^'\\]*)*')\s*\)/g;
+ var commentRegEx = /(^|[^\\])(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/mg;
+
+ var stringRegEx = /("[^"\\\n\r]*(\\.[^"\\\n\r]*)*"|'[^'\\\n\r]*(\\.[^'\\\n\r]*)*')/g;
+
+ function getCJSDeps(source) {
+ cjsRequireRegEx.lastIndex = commentRegEx.lastIndex = stringRegEx.lastIndex = 0;
+
+ var deps = [];
+
+ var match;
+
+ // track string and comment locations for unminified source
+ var stringLocations = [], commentLocations = [];
+
+ function inLocation(locations, match) {
+ for (var i = 0; i < locations.length; i++)
+ if (locations[i][0] < match.index && locations[i][1] > match.index)
+ return true;
+ return false;
+ }
+
+ if (source.length / source.split('\n').length < 200) {
+ while (match = stringRegEx.exec(source))
+ stringLocations.push([match.index, match.index + match[0].length]);
+
+ while (match = commentRegEx.exec(source)) {
+ // only track comments not starting in strings
+ if (!inLocation(stringLocations, match))
+ commentLocations.push([match.index, match.index + match[0].length]);
+ }
+ }
+
+ while (match = cjsRequireRegEx.exec(source)) {
+ // ensure we're not within a string or comment location
+ if (!inLocation(stringLocations, match) && !inLocation(commentLocations, match)) {
+ var dep = match[1].substr(1, match[1].length - 2);
+ // skip cases like require('" + file + "')
+ if (dep.match(/"|'/))
+ continue;
+ // trailing slash requires are removed as they don't map mains in SystemJS
+ if (dep[dep.length - 1] == '/')
+ dep = dep.substr(0, dep.length - 1);
+ deps.push(dep);
+ }
+ }
+
+ return deps;
+ }
+
+ hook('instantiate', function(instantiate) {
+ return function(load) {
+ var loader = this;
+ if (!load.metadata.format) {
+ cjsExportsRegEx.lastIndex = 0;
+ cjsRequireRegEx.lastIndex = 0;
+ if (cjsRequireRegEx.exec(load.source) || cjsExportsRegEx.exec(load.source))
+ load.metadata.format = 'cjs';
+ }
+
+ if (load.metadata.format == 'cjs') {
+ var metaDeps = load.metadata.deps;
+ var deps = load.metadata.cjsRequireDetection === false ? [] : getCJSDeps(load.source);
+
+ for (var g in load.metadata.globals)
+ if (load.metadata.globals[g])
+ deps.push(load.metadata.globals[g]);
+
+ var entry = createEntry();
+
+ load.metadata.entry = entry;
+
+ entry.deps = deps;
+ entry.executingRequire = true;
+ entry.execute = function(_require, exports, module) {
+ function require(name) {
+ if (name[name.length - 1] == '/')
+ name = name.substr(0, name.length - 1);
+ return _require.apply(this, arguments);
+ }
+
+ // ensure meta deps execute first
+ for (var i = 0; i < metaDeps.length; i++)
+ require(metaDeps[i]);
+
+ // disable AMD detection
+ var define = __global.define;
+ __global.define = undefined;
+
+ var pathVars = loader.get('@@cjs-helpers').getPathVars(module.id);
+
+ __global.__cjsWrapper = {
+ exports: exports,
+ args: [require, exports, module, pathVars.filename, pathVars.dirname, __global, __global]
+ };
+
+ var globals = '';
+ if (load.metadata.globals) {
+ for (var g in load.metadata.globals)
+ globals += 'var ' + g + ' = require("' + load.metadata.globals[g] + '");';
+ }
+
+ load.source = "(function(require, exports, module, __filename, __dirname, global, GLOBAL) {" + globals
+ + load.source + "\n}).apply(__cjsWrapper.exports, __cjsWrapper.args);";
+
+ __exec.call(loader, load);
+
+ __global.__cjsWrapper = undefined;
+ __global.define = define;
+ };
+ }
+
+ return instantiate.call(loader, load);
+ };
+ });
+})();
+hookConstructor(function(constructor) {
+ return function() {
+ var loader = this;
+ constructor.call(loader);
+
+ if (typeof window != 'undefined' && typeof document != 'undefined' && window.location)
+ var windowOrigin = location.protocol + '//' + location.hostname + (location.port ? ':' + location.port : '');
+
+ loader.set('@@cjs-helpers', loader.newModule({
+ getPathVars: function(moduleId) {
+ // remove any plugin syntax
+ var pluginIndex = moduleId.lastIndexOf('!');
+ var filename;
+ if (pluginIndex != -1)
+ filename = moduleId.substr(0, pluginIndex);
+ else
+ filename = moduleId;
+
+ var dirname = filename.split('/');
+ dirname.pop();
+ dirname = dirname.join('/');
+
+ if (filename.substr(0, 8) == 'file:///') {
+ filename = filename.substr(7);
+ dirname = dirname.substr(7);
+
+ // on windows remove leading '/'
+ if (isWindows) {
+ filename = filename.substr(1);
+ dirname = dirname.substr(1);
+ }
+ }
+ else if (windowOrigin && filename.substr(0, windowOrigin.length) === windowOrigin) {
+ filename = filename.substr(windowOrigin.length);
+ dirname = dirname.substr(windowOrigin.length);
+ }
+
+ return {
+ filename: filename,
+ dirname: dirname
+ };
+ }
+ }))
+ };
+});/*
+ * AMD Helper function module
+ * Separated into its own file as this is the part needed for full AMD support in SFX builds
+ * NB since implementations have now diverged this can be merged back with amd.js
+ */
+hookConstructor(function(constructor) {
+ return function() {
+ var loader = this;
+ constructor.call(this);
+
+ var commentRegEx = /(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/mg;
+ var cjsRequirePre = "(?:^|[^$_a-zA-Z\\xA0-\\uFFFF.])";
+ var cjsRequirePost = "\\s*\\(\\s*(\"([^\"]+)\"|'([^']+)')\\s*\\)";
+ var fnBracketRegEx = /\(([^\)]*)\)/;
+ var wsRegEx = /^\s+|\s+$/g;
+
+ var requireRegExs = {};
+
+ function getCJSDeps(source, requireIndex) {
+
+ // remove comments
+ source = source.replace(commentRegEx, '');
+
+ // determine the require alias
+ var params = source.match(fnBracketRegEx);
+ var requireAlias = (params[1].split(',')[requireIndex] || 'require').replace(wsRegEx, '');
+
+ // find or generate the regex for this requireAlias
+ var requireRegEx = requireRegExs[requireAlias] || (requireRegExs[requireAlias] = new RegExp(cjsRequirePre + requireAlias + cjsRequirePost, 'g'));
+
+ requireRegEx.lastIndex = 0;
+
+ var deps = [];
+
+ var match;
+ while (match = requireRegEx.exec(source))
+ deps.push(match[2] || match[3]);
+
+ return deps;
+ }
+
+ /*
+ AMD-compatible require
+ To copy RequireJS, set window.require = window.requirejs = loader.amdRequire
+ */
+ function require(names, callback, errback, referer) {
+ // in amd, first arg can be a config object... we just ignore
+ if (typeof names == 'object' && !(names instanceof Array))
+ return require.apply(null, Array.prototype.splice.call(arguments, 1, arguments.length - 1));
+
+ // amd require
+ if (typeof names == 'string' && typeof callback == 'function')
+ names = [names];
+ if (names instanceof Array) {
+ var dynamicRequires = [];
+ for (var i = 0; i < names.length; i++)
+ dynamicRequires.push(loader['import'](names[i], referer));
+ Promise.all(dynamicRequires).then(function(modules) {
+ if (callback)
+ callback.apply(null, modules);
+ }, errback);
+ }
+
+ // commonjs require
+ else if (typeof names == 'string') {
+ var module = loader.get(loader.decanonicalize(names, referer));
+ if (!module)
+ throw new Error('Module not already loaded loading "' + names + '" from "' + referer + '".');
+ return module.__useDefault ? module['default'] : module;
+ }
+
+ else
+ throw new TypeError('Invalid require');
+ }
+
+ function define(name, deps, factory) {
+ if (typeof name != 'string') {
+ factory = deps;
+ deps = name;
+ name = null;
+ }
+ if (!(deps instanceof Array)) {
+ factory = deps;
+ deps = ['require', 'exports', 'module'].splice(0, factory.length);
+ }
+
+ if (typeof factory != 'function')
+ factory = (function(factory) {
+ return function() { return factory; }
+ })(factory);
+
+ // in IE8, a trailing comma becomes a trailing undefined entry
+ if (deps[deps.length - 1] === undefined)
+ deps.pop();
+
+ // remove system dependencies
+ var requireIndex, exportsIndex, moduleIndex;
+
+ if ((requireIndex = indexOf.call(deps, 'require')) != -1) {
+
+ deps.splice(requireIndex, 1);
+
+ // only trace cjs requires for non-named
+ // named defines assume the trace has already been done
+ if (!name)
+ deps = deps.concat(getCJSDeps(factory.toString(), requireIndex));
+ }
+
+ if ((exportsIndex = indexOf.call(deps, 'exports')) != -1)
+ deps.splice(exportsIndex, 1);
+
+ if ((moduleIndex = indexOf.call(deps, 'module')) != -1)
+ deps.splice(moduleIndex, 1);
+
+ function execute(req, exports, module) {
+ var depValues = [];
+ for (var i = 0; i < deps.length; i++)
+ depValues.push(req(deps[i]));
+
+ module.uri = module.id;
+
+ module.config = function() {};
+
+ // add back in system dependencies
+ if (moduleIndex != -1)
+ depValues.splice(moduleIndex, 0, module);
+
+ if (exportsIndex != -1)
+ depValues.splice(exportsIndex, 0, exports);
+
+ if (requireIndex != -1) {
+ function contextualRequire(names, callback, errback) {
+ if (typeof names == 'string' && typeof callback != 'function')
+ return req(names);
+ return require.call(loader, names, callback, errback, module.id);
+ }
+ contextualRequire.toUrl = function(name) {
+ // normalize without defaultJSExtensions
+ var defaultJSExtension = loader.defaultJSExtensions && name.substr(name.length - 3, 3) != '.js';
+ var url = loader.decanonicalize(name, module.id);
+ if (defaultJSExtension && url.substr(url.length - 3, 3) == '.js')
+ url = url.substr(0, url.length - 3);
+ return url;
+ };
+ depValues.splice(requireIndex, 0, contextualRequire);
+ }
+
+ // set global require to AMD require
+ var curRequire = __global.require;
+ __global.require = require;
+
+ var output = factory.apply(exportsIndex == -1 ? __global : exports, depValues);
+
+ __global.require = curRequire;
+
+ if (typeof output == 'undefined' && module)
+ output = module.exports;
+
+ if (typeof output != 'undefined')
+ return output;
+ }
+
+ var entry = createEntry();
+ entry.name = name && (loader.decanonicalize || loader.normalize).call(loader, name);
+ entry.deps = deps;
+ entry.execute = execute;
+
+ loader.pushRegister_({
+ amd: true,
+ entry: entry
+ });
+ }
+ define.amd = {};
+
+ // reduction function to attach defines to a load record
+ hook('reduceRegister_', function(reduceRegister) {
+ return function(load, register) {
+ // only handle AMD registers here
+ if (!register || !register.amd)
+ return reduceRegister.call(this, load, register);
+
+ var curMeta = load && load.metadata;
+ var entry = register.entry;
+
+ if (curMeta)
+ curMeta.format = 'amd';
+
+ // anonymous define
+ if (!entry.name) {
+ if (!curMeta)
+ throw new TypeError('Unexpected anonymous AMD define.');
+
+ // already defined anonymously -> throw
+ if (curMeta.entry)
+ throw new TypeError('Multiple defines for anonymous module ' + load.name);
+
+ curMeta.entry = entry;
+ }
+ // named define
+ else {
+ // if we don't have any other defines,
+ // then let this be an anonymous define
+ // this is just to support single modules of the form:
+ // define('jquery')
+ // still loading anonymously
+ // because it is done widely enough to be useful
+ // as soon as there is more than one define, this gets removed though
+ if (curMeta) {
+ if (!curMeta.entry && !curMeta.bundle)
+ curMeta.entry = entry;
+ else
+ curMeta.entry = undefined;
+
+ // note this is now a bundle
+ curMeta.bundle = true;
+ }
+
+ // define the module through the register registry
+ if (!(entry.name in this.defined))
+ this.defined[entry.name] = entry;
+ }
+ };
+ });
+
+ // adds define as a global (potentially just temporarily)
+ function createDefine() {
+ // ensure no NodeJS environment detection
+ var oldModule = __global.module;
+ var oldExports = __global.exports;
+ var oldDefine = __global.define;
+
+ __global.module = undefined;
+ __global.exports = undefined;
+ __global.define = define;
+
+ return function() {
+ __global.define = oldDefine;
+ __global.module = oldModule;
+ __global.exports = oldExports;
+ };
+ }
+
+ loader.set('@@amd-helpers', loader.newModule({
+ createDefine: createDefine,
+ require: require,
+ define: define
+ }));
+ loader.amdDefine = define;
+ loader.amdRequire = require;
+ };
+});/*
+ SystemJS AMD Format
+*/
+(function() {
+ // AMD Module Format Detection RegEx
+ // define([.., .., ..], ...)
+ // define(varName); || define(function(require, exports) {}); || define({})
+ var amdRegEx = /(?:^\uFEFF?|[^$_a-zA-Z\xA0-\uFFFF.])define\s*\(\s*("[^"]+"\s*,\s*|'[^']+'\s*,\s*)?\s*(\[(\s*(("[^"]+"|'[^']+')\s*,|\/\/.*\r?\n|\/\*(.|\s)*?\*\/))*(\s*("[^"]+"|'[^']+')\s*,?)?(\s*(\/\/.*\r?\n|\/\*(.|\s)*?\*\/))*\s*\]|function\s*|{|[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*\))/;
+
+ hook('fetch', function(fetch) {
+ return function(load) {
+ if (load.metadata.format === 'amd'
+ && !load.metadata.authorization
+ && load.metadata.scriptLoad !== false)
+ load.metadata.scriptLoad = true;
+ // script load implies define global leak
+ if (load.metadata.scriptLoad && isBrowser)
+ this.get('@@amd-helpers').createDefine();
+ return fetch.call(this, load);
+ };
+ });
+
+ hook('instantiate', function(instantiate) {
+ return function(load) {
+ var loader = this;
+
+ if (load.metadata.format == 'amd' || !load.metadata.format && load.source.match(amdRegEx)) {
+ load.metadata.format = 'amd';
+
+ if (!loader.builder && loader.execute !== false) {
+ var removeDefine = this.get('@@amd-helpers').createDefine();
+
+ try {
+ __exec.call(loader, load);
+ }
+ finally {
+ removeDefine();
+ }
+
+ if (!load.metadata.entry && !load.metadata.bundle)
+ throw new TypeError('AMD module ' + load.name + ' did not define');
+ }
+ else {
+ load.metadata.execute = function() {
+ return load.metadata.builderExecute.apply(this, arguments);
+ };
+ }
+ }
+
+ return instantiate.call(loader, load);
+ };
+ });
+
+})();
+/*
+ SystemJS Loader Plugin Support
+
+ Supports plugin loader syntax with "!", or via metadata.loader
+
+ The plugin name is loaded as a module itself, and can override standard loader hooks
+ for the plugin resource. See the plugin section of the systemjs readme.
+*/
+
+(function() {
+ function getParentName(loader, parentName) {
+ // if parent is a plugin, normalize against the parent plugin argument only
+ if (parentName) {
+ var parentPluginIndex;
+ if (loader.pluginFirst) {
+ if ((parentPluginIndex = parentName.lastIndexOf('!')) != -1)
+ return parentName.substr(parentPluginIndex + 1);
+ }
+ else {
+ if ((parentPluginIndex = parentName.indexOf('!')) != -1)
+ return parentName.substr(0, parentPluginIndex);
+ }
+
+ return parentName;
+ }
+ }
+
+ function parsePlugin(loader, name) {
+ var argumentName;
+ var pluginName;
+
+ var pluginIndex = name.lastIndexOf('!');
+
+ if (pluginIndex == -1)
+ return;
+
+ if (loader.pluginFirst) {
+ argumentName = name.substr(pluginIndex + 1);
+ pluginName = name.substr(0, pluginIndex);
+ }
+ else {
+ argumentName = name.substr(0, pluginIndex);
+ pluginName = name.substr(pluginIndex + 1) || argumentName.substr(argumentName.lastIndexOf('.') + 1);
+ }
+
+ return {
+ argument: argumentName,
+ plugin: pluginName
+ };
+ }
+
+ // put name back together after parts have been normalized
+ function combinePluginParts(loader, argumentName, pluginName, defaultExtension) {
+ if (defaultExtension && argumentName.substr(argumentName.length - 3, 3) == '.js')
+ argumentName = argumentName.substr(0, argumentName.length - 3);
+
+ if (loader.pluginFirst) {
+ return pluginName + '!' + argumentName;
+ }
+ else {
+ return argumentName + '!' + pluginName;
+ }
+ }
+
+ // note if normalize will add a default js extension
+ // if so, remove for backwards compat
+ // this is strange and sucks, but will be deprecated
+ function checkDefaultExtension(loader, arg) {
+ return loader.defaultJSExtensions && arg.substr(arg.length - 3, 3) != '.js';
+ }
+
+ function createNormalizeSync(normalizeSync) {
+ return function(name, parentName, isPlugin) {
+ var loader = this;
+
+ parentName = getParentName(this, parentName);
+ var parsed = parsePlugin(loader, name);
+
+ if (!parsed)
+ return normalizeSync.call(this, name, parentName, isPlugin);
+
+ // if this is a plugin, normalize the plugin name and the argument
+ var argumentName = loader.normalizeSync(parsed.argument, parentName, true);
+ var pluginName = loader.normalizeSync(parsed.plugin, parentName, true);
+ return combinePluginParts(loader, argumentName, pluginName, checkDefaultExtension(loader, parsed.argument));
+ };
+ }
+
+ hook('decanonicalize', createNormalizeSync);
+ hook('normalizeSync', createNormalizeSync);
+
+ hook('normalize', function(normalize) {
+ return function(name, parentName, isPlugin) {
+ var loader = this;
+
+ parentName = getParentName(this, parentName);
+
+ var parsed = parsePlugin(loader, name);
+
+ if (!parsed)
+ return normalize.call(loader, name, parentName, isPlugin);
+
+ return Promise.all([
+ loader.normalize(parsed.argument, parentName, true),
+ loader.normalize(parsed.plugin, parentName, true)
+ ])
+ .then(function(normalized) {
+ return combinePluginParts(loader, normalized[0], normalized[1], checkDefaultExtension(loader, parsed.argument));
+ });
+ }
+ });
+
+ hook('locate', function(locate) {
+ return function(load) {
+ var loader = this;
+
+ var name = load.name;
+
+ // plugin syntax
+ var pluginSyntaxIndex;
+ if (loader.pluginFirst) {
+ if ((pluginSyntaxIndex = name.indexOf('!')) != -1) {
+ load.metadata.loader = name.substr(0, pluginSyntaxIndex);
+ load.name = name.substr(pluginSyntaxIndex + 1);
+ }
+ }
+ else {
+ if ((pluginSyntaxIndex = name.lastIndexOf('!')) != -1) {
+ load.metadata.loader = name.substr(pluginSyntaxIndex + 1);
+ load.name = name.substr(0, pluginSyntaxIndex);
+ }
+ }
+
+ return locate.call(loader, load)
+ .then(function(address) {
+ var plugin = load.metadata.loader;
+
+ if (!plugin)
+ return address;
+
+ // only fetch the plugin itself if this name isn't defined
+ if (loader.defined && loader.defined[name])
+ return address;
+
+ var pluginLoader = loader.pluginLoader || loader;
+
+ // load the plugin module and run standard locate
+ return pluginLoader['import'](plugin)
+ .then(function(loaderModule) {
+ // store the plugin module itself on the metadata
+ load.metadata.loaderModule = loaderModule;
+
+ load.address = address;
+ if (loaderModule.locate)
+ return loaderModule.locate.call(loader, load);
+
+ return address;
+ });
+ });
+ };
+ });
+
+ hook('fetch', function(fetch) {
+ return function(load) {
+ var loader = this;
+ if (load.metadata.loaderModule && load.metadata.loaderModule.fetch && load.metadata.format != 'defined') {
+ load.metadata.scriptLoad = false;
+ return load.metadata.loaderModule.fetch.call(loader, load, function(load) {
+ return fetch.call(loader, load);
+ });
+ }
+ else {
+ return fetch.call(loader, load);
+ }
+ };
+ });
+
+ hook('translate', function(translate) {
+ return function(load) {
+
+ /*
+ * Source map sanitization for load.metadata.sourceMap
+ * Used to set browser and build-level source maps for
+ * translated sources in a general way.
+ *
+ * This isn't plugin-specific, but can't go anywhere else for now
+ * As it is post-translate
+ */
+ var sourceMap = load.metadata.sourceMap;
+
+ // if an object not a JSON string do sanitizing
+ if (sourceMap && typeof sourceMap == 'object') {
+ var originalName = load.name.split('!')[0];
+
+ // force set the filename of the original file
+ sourceMap.file = originalName + '!transpiled';
+
+ // force set the sources list if only one source
+ if (!sourceMap.sources || sourceMap.sources.length == 1)
+ sourceMap.sources = [originalName];
+ load.metadata.sourceMap = JSON.stringify(sourceMap);
+ }
+
+ var loader = this;
+ if (load.metadata.loaderModule && load.metadata.loaderModule.translate && load.metadata.format != 'defined') {
+ return Promise.resolve(load.metadata.loaderModule.translate.call(loader, load)).then(function(result) {
+ // NB we should probably enforce a string output
+ if (typeof result == 'string')
+ load.source = result;
+ return translate.call(loader, load);
+ });
+ }
+ else {
+ return translate.call(loader, load);
+ }
+ };
+ });
+
+ hook('instantiate', function(instantiate) {
+ return function(load) {
+ var loader = this;
+
+ if (load.metadata.loaderModule && load.metadata.loaderModule.instantiate && !loader.builder && load.metadata.format != 'defined')
+ return Promise.resolve(load.metadata.loaderModule.instantiate.call(loader, load)).then(function(result) {
+ load.metadata.entry = createEntry();
+ load.metadata.entry.execute = function() {
+ return result;
+ }
+ load.metadata.entry.deps = load.metadata.deps;
+ load.metadata.format = 'defined';
+ return instantiate.call(loader, load);
+ });
+ else
+ return instantiate.call(loader, load);
+ };
+ });
+
+})();/*
+ * Conditions Extension
+ *
+ * Allows a condition module to alter the resolution of an import via syntax:
+ *
+ * import $ from 'jquery/#{browser}';
+ *
+ * Will first load the module 'browser' via `SystemJS.import('browser')` and
+ * take the default export of that module.
+ * If the default export is not a string, an error is thrown.
+ *
+ * We then substitute the string into the require to get the conditional resolution
+ * enabling environment-specific variations like:
+ *
+ * import $ from 'jquery/ie'
+ * import $ from 'jquery/firefox'
+ * import $ from 'jquery/chrome'
+ * import $ from 'jquery/safari'
+ *
+ * It can be useful for a condition module to define multiple conditions.
+ * This can be done via the `|` modifier to specify an export member expression:
+ *
+ * import 'jquery/#{./browser.js|grade.version}'
+ *
+ * Where the `grade` export `version` member in the `browser.js` module is substituted.
+ *
+ *
+ * Boolean Conditionals
+ *
+ * For polyfill modules, that are used as imports but have no module value,
+ * a binary conditional allows a module not to be loaded at all if not needed:
+ *
+ * import 'es5-shim#?./conditions.js|needs-es5shim'
+ *
+ * These conditions can also be negated via:
+ *
+ * import 'es5-shim#?~./conditions.js|es6'
+ *
+ */
+
+ function parseCondition(condition) {
+ var conditionExport, conditionModule, negation;
+
+ var negation = condition[0] == '~';
+ var conditionExportIndex = condition.lastIndexOf('|');
+ if (conditionExportIndex != -1) {
+ conditionExport = condition.substr(conditionExportIndex + 1);
+ conditionModule = condition.substr(negation, conditionExportIndex - negation) || '@system-env';
+ }
+ else {
+ conditionExport = null;
+ conditionModule = condition.substr(negation);
+ }
+
+ return {
+ module: conditionModule,
+ prop: conditionExport,
+ negate: negation
+ };
+ }
+
+ function serializeCondition(conditionObj) {
+ return (conditionObj.negate ? '~' : '') + conditionObj.module + (conditionObj.prop ? '|' + conditionObj.prop : '');
+ }
+
+ function resolveCondition(conditionObj, parentName, bool) {
+ return this['import'](conditionObj.module, parentName)
+ .then(function(m) {
+ if (conditionObj.prop)
+ m = readMemberExpression(conditionObj.prop, m);
+ else if (typeof m == 'object' && m + '' == 'Module')
+ m = m['default'];
+
+ return conditionObj.negate ? !m : m;
+ });
+ }
+
+ var interpolationRegEx = /#\{[^\}]+\}/;
+ function interpolateConditional(name, parentName) {
+ // first we normalize the conditional
+ var conditionalMatch = name.match(interpolationRegEx);
+
+ if (!conditionalMatch)
+ return Promise.resolve(name);
+
+ var conditionObj = parseCondition(conditionalMatch[0].substr(2, conditionalMatch[0].length - 3));
+
+ // in builds, return normalized conditional
+ if (this.builder)
+ return this['normalize'](conditionObj.module, parentName)
+ .then(function(conditionModule) {
+ conditionObj.module = conditionModule;
+ return name.replace(interpolationRegEx, '#{' + serializeCondition(conditionObj) + '}');
+ });
+
+ return resolveCondition.call(this, conditionObj, parentName, false)
+ .then(function(conditionValue) {
+ if (typeof conditionValue !== 'string')
+ throw new TypeError('The condition value for ' + name + ' doesn\'t resolve to a string.');
+
+ if (conditionValue.indexOf('/') != -1)
+ throw new TypeError('Unabled to interpolate conditional ' + name + (parentName ? ' in ' + parentName : '') + '\n\tThe condition value ' + conditionValue + ' cannot contain a "/" separator.');
+
+ return name.replace(interpolationRegEx, conditionValue);
+ });
+ }
+
+ function booleanConditional(name, parentName) {
+ // first we normalize the conditional
+ var booleanIndex = name.lastIndexOf('#?');
+
+ if (booleanIndex == -1)
+ return Promise.resolve(name);
+
+ var conditionObj = parseCondition(name.substr(booleanIndex + 2));
+
+ // in builds, return normalized conditional
+ if (this.builder)
+ return this['normalize'](conditionObj.module, parentName)
+ .then(function(conditionModule) {
+ conditionObj.module = conditionModule;
+ return name.substr(0, booleanIndex) + '#?' + serializeCondition(conditionObj);
+ });
+
+ return resolveCondition.call(this, conditionObj, parentName, true)
+ .then(function(conditionValue) {
+ return conditionValue ? name.substr(0, booleanIndex) : '@empty';
+ });
+ }
+
+ // normalizeSync does not parse conditionals at all although it could
+ hook('normalize', function(normalize) {
+ return function(name, parentName, parentAddress) {
+ var loader = this;
+ return booleanConditional.call(loader, name, parentName)
+ .then(function(name) {
+ return normalize.call(loader, name, parentName, parentAddress);
+ })
+ .then(function(normalized) {
+ return interpolateConditional.call(loader, normalized, parentName);
+ });
+ };
+ });
+/*
+ * Alias Extension
+ *
+ * Allows a module to be a plain copy of another module by module name
+ *
+ * SystemJS.meta['mybootstrapalias'] = { alias: 'bootstrap' };
+ *
+ */
+(function() {
+ // aliases
+ hook('fetch', function(fetch) {
+ return function(load) {
+ var alias = load.metadata.alias;
+ var aliasDeps = load.metadata.deps || [];
+ if (alias) {
+ load.metadata.format = 'defined';
+ var entry = createEntry();
+ this.defined[load.name] = entry;
+ entry.declarative = true;
+ entry.deps = aliasDeps.concat([alias]);
+ entry.declare = function(_export) {
+ return {
+ setters: [function(module) {
+ for (var p in module)
+ _export(p, module[p]);
+ if (module.__useDefault)
+ entry.module.exports.__useDefault = true;
+ }],
+ execute: function() {}
+ };
+ };
+ return '';
+ }
+
+ return fetch.call(this, load);
+ };
+ });
+})();/*
+ * Meta Extension
+ *
+ * Sets default metadata on a load record (load.metadata) from
+ * loader.metadata via SystemJS.meta function.
+ *
+ *
+ * Also provides an inline meta syntax for module meta in source.
+ *
+ * Eg:
+ *
+ * loader.meta({
+ * 'my/module': { deps: ['jquery'] }
+ * 'my/*': { format: 'amd' }
+ * });
+ *
+ * Which in turn populates loader.metadata.
+ *
+ * load.metadata.deps and load.metadata.format will then be set
+ * for 'my/module'
+ *
+ * The same meta could be set with a my/module.js file containing:
+ *
+ * my/module.js
+ * "format amd";
+ * "deps[] jquery";
+ * "globals.some value"
+ * console.log('this is my/module');
+ *
+ * Configuration meta always takes preference to inline meta.
+ *
+ * Multiple matches in wildcards are supported and ammend the meta.
+ *
+ *
+ * The benefits of the function form is that paths are URL-normalized
+ * supporting say
+ *
+ * loader.meta({ './app': { format: 'cjs' } });
+ *
+ * Instead of needing to set against the absolute URL (https://site.com/app.js)
+ *
+ */
+
+(function() {
+
+ hookConstructor(function(constructor) {
+ return function() {
+ this.meta = {};
+ constructor.call(this);
+ };
+ });
+
+ hook('locate', function(locate) {
+ return function(load) {
+ var meta = this.meta;
+ var name = load.name;
+
+ // NB for perf, maybe introduce a fast-path wildcard lookup cache here
+ // which is checked first
+
+ // apply wildcard metas
+ var bestDepth = 0;
+ var wildcardIndex;
+ for (var module in meta) {
+ wildcardIndex = module.indexOf('*');
+ if (wildcardIndex === -1)
+ continue;
+ if (module.substr(0, wildcardIndex) === name.substr(0, wildcardIndex)
+ && module.substr(wildcardIndex + 1) === name.substr(name.length - module.length + wildcardIndex + 1)) {
+ var depth = module.split('/').length;
+ if (depth > bestDepth)
+ bestDepth = depth;
+ extendMeta(load.metadata, meta[module], bestDepth != depth);
+ }
+ }
+
+ // apply exact meta
+ if (meta[name])
+ extendMeta(load.metadata, meta[name]);
+
+ return locate.call(this, load);
+ };
+ });
+
+ // detect any meta header syntax
+ // only set if not already set
+ var metaRegEx = /^(\s*\/\*[^\*]*(\*(?!\/)[^\*]*)*\*\/|\s*\/\/[^\n]*|\s*"[^"]+"\s*;?|\s*'[^']+'\s*;?)+/;
+ var metaPartRegEx = /\/\*[^\*]*(\*(?!\/)[^\*]*)*\*\/|\/\/[^\n]*|"[^"]+"\s*;?|'[^']+'\s*;?/g;
+
+ function setMetaProperty(target, p, value) {
+ var pParts = p.split('.');
+ var curPart;
+ while (pParts.length > 1) {
+ curPart = pParts.shift();
+ target = target[curPart] = target[curPart] || {};
+ }
+ curPart = pParts.shift();
+ if (!(curPart in target))
+ target[curPart] = value;
+ }
+
+ hook('translate', function(translate) {
+ return function(load) {
+ // NB meta will be post-translate pending transpiler conversion to plugins
+ var meta = load.source.match(metaRegEx);
+ if (meta) {
+ var metaParts = meta[0].match(metaPartRegEx);
+
+ for (var i = 0; i < metaParts.length; i++) {
+ var curPart = metaParts[i];
+ var len = curPart.length;
+
+ var firstChar = curPart.substr(0, 1);
+ if (curPart.substr(len - 1, 1) == ';')
+ len--;
+
+ if (firstChar != '"' && firstChar != "'")
+ continue;
+
+ var metaString = curPart.substr(1, curPart.length - 3);
+ var metaName = metaString.substr(0, metaString.indexOf(' '));
+
+ if (metaName) {
+ var metaValue = metaString.substr(metaName.length + 1, metaString.length - metaName.length - 1);
+
+ if (metaName.substr(metaName.length - 2, 2) == '[]') {
+ metaName = metaName.substr(0, metaName.length - 2);
+ load.metadata[metaName] = load.metadata[metaName] || [];
+ load.metadata[metaName].push(metaValue);
+ }
+ else if (load.metadata[metaName] instanceof Array) {
+ // temporary backwards compat for previous "deps" syntax
+ warn.call(this, 'Module ' + load.name + ' contains deprecated "deps ' + metaValue + '" meta syntax.\nThis should be updated to "deps[] ' + metaValue + '" for pushing to array meta.');
+ load.metadata[metaName].push(metaValue);
+ }
+ else {
+ setMetaProperty(load.metadata, metaName, metaValue);
+ }
+ }
+ else {
+ load.metadata[metaString] = true;
+ }
+ }
+ }
+
+ return translate.call(this, load);
+ };
+ });
+})();
+/*
+ System bundles
+
+ Allows a bundle module to be specified which will be dynamically
+ loaded before trying to load a given module.
+
+ For example:
+ SystemJS.bundles['mybundle'] = ['jquery', 'bootstrap/js/bootstrap']
+
+ Will result in a load to "mybundle" whenever a load to "jquery"
+ or "bootstrap/js/bootstrap" is made.
+
+ In this way, the bundle becomes the request that provides the module
+*/
+
+(function() {
+ // bundles support (just like RequireJS)
+ // bundle name is module name of bundle itself
+ // bundle is array of modules defined by the bundle
+ // when a module in the bundle is requested, the bundle is loaded instead
+ // of the form SystemJS.bundles['mybundle'] = ['jquery', 'bootstrap/js/bootstrap']
+ hookConstructor(function(constructor) {
+ return function() {
+ constructor.call(this);
+ this.bundles = {};
+ this._loader.loadedBundles = {};
+ };
+ });
+
+ // assign bundle metadata for bundle loads
+ hook('locate', function(locate) {
+ return function(load) {
+ var loader = this;
+
+ if (!(load.name in loader.defined))
+ for (var b in loader.bundles) {
+ if (loader.bundles[b].indexOf(load.name) != -1)
+ return loader['import'](b)
+ .then(function() {
+ return locate.call(loader, load);
+ });
+ }
+
+ return locate.call(loader, load);
+ };
+ });
+})();
+/*
+ * Dependency Tree Cache
+ *
+ * Allows a build to pre-populate a dependency trace tree on the loader of
+ * the expected dependency tree, to be loaded upfront when requesting the
+ * module, avoinding the n round trips latency of module loading, where
+ * n is the dependency tree depth.
+ *
+ * eg:
+ * SystemJS.depCache = {
+ * 'app': ['normalized', 'deps'],
+ * 'normalized': ['another'],
+ * 'deps': ['tree']
+ * };
+ *
+ * SystemJS.import('app')
+ * // simultaneously starts loading all of:
+ * // 'normalized', 'deps', 'another', 'tree'
+ * // before "app" source is even loaded
+ *
+ */
+
+(function() {
+ hookConstructor(function(constructor) {
+ return function() {
+ constructor.call(this);
+ this.depCache = {};
+ }
+ });
+
+ hook('locate', function(locate) {
+ return function(load) {
+ var loader = this;
+ // load direct deps, in turn will pick up their trace trees
+ var deps = loader.depCache[load.name];
+ if (deps)
+ for (var i = 0; i < deps.length; i++)
+ loader['import'](deps[i], load.name);
+
+ return locate.call(loader, load);
+ };
+ });
+})();
+
+System = new SystemJSLoader();
+
+__global.SystemJS = System;
+System.version = '0.19.13 Standard';
+ // -- exporting --
+
+ if (typeof exports === 'object')
+ module.exports = Loader;
+
+ __global.Reflect = __global.Reflect || {};
+ __global.Reflect.Loader = __global.Reflect.Loader || Loader;
+ __global.Reflect.global = __global.Reflect.global || __global;
+ __global.LoaderPolyfill = Loader;
+
+ if (!System) {
+ System = new SystemLoader();
+ System.constructor = SystemLoader;
+ }
+
+ if (typeof exports === 'object')
+ module.exports = System;
+
+ __global.System = System;
+
+})(typeof self != 'undefined' ? self : global);}
+
+// auto-load Promise and URL polyfills if needed in the browser
+try {
+ var hasURL = typeof URLPolyfill != 'undefined' || new URL('test:///').protocol == 'test:';
+}
+catch(e) {}
+
+if (typeof Promise === 'undefined' || !hasURL) {
+ // document.write
+ if (typeof document !== 'undefined') {
+ var scripts = document.getElementsByTagName('script');
+ $__curScript = scripts[scripts.length - 1];
+ var curPath = $__curScript.src;
+ var basePath = curPath.substr(0, curPath.lastIndexOf('/') + 1);
+ window.systemJSBootstrap = bootstrap;
+ document.write(
+ '<' + 'script type="text/javascript" src="' + basePath + 'system-polyfills.js">' + '<' + '/script>'
+ );
+ }
+ // importScripts
+ else if (typeof importScripts !== 'undefined') {
+ var basePath = '';
+ try {
+ throw new Error('_');
+ } catch (e) {
+ e.stack.replace(/(?:at|@).*(http.+):[\d]+:[\d]+/, function(m, url) {
+ basePath = url.replace(/\/[^\/]*$/, '/');
+ });
+ }
+ importScripts(basePath + 'system-polyfills.js');
+ bootstrap();
+ }
+ else {
+ bootstrap();
+ }
+}
+else {
+ bootstrap();
+}
+
+
+})(); \ No newline at end of file
diff --git a/extension/lib/wallet/checkable.ts b/extension/lib/wallet/checkable.ts
new file mode 100644
index 000000000..7587f529c
--- /dev/null
+++ b/extension/lib/wallet/checkable.ts
@@ -0,0 +1,136 @@
+/*
+ This file is part of TALER
+ (C) 2016 GNUnet e.V.
+
+ TALER is free software; you can redistribute it and/or modify it under the
+ terms of the GNU General Public License as published by the Free Software
+ Foundation; either version 3, or (at your option) any later version.
+
+ TALER is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+ A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along with
+ TALER; see the file COPYING. If not, If not, see <http://www.gnu.org/licenses/>
+ */
+
+
+"use strict";
+
+/**
+ * Decorators for type-checking JSON into
+ * an object.
+ * @module Checkable
+ * @author Florian Dold
+ */
+
+export namespace Checkable {
+ let chkSym = Symbol("checkable");
+
+ function checkNumber(target, prop): any {
+ if ((typeof target) !== "number") {
+ throw Error("number expected for " + prop.propertyKey);
+ }
+ return target;
+ }
+
+ function checkString(target, prop): any {
+ if (typeof target !== "string") {
+ throw Error("string expected for " + prop.propertyKey);
+ }
+ return target;
+ }
+
+ function checkAnyObject(target, prop): any {
+ if (typeof target !== "object") {
+ throw Error("object expected for " + prop.propertyKey);
+ }
+ return target;
+ }
+
+ function checkValue(target, prop): any {
+ let type = prop.type;
+ if (!type) {
+ throw Error("assertion failed");
+ }
+ let v = target;
+ if (!v || typeof v !== "object") {
+ throw Error("expected object for " + prop.propertyKey);
+ }
+ let props = type.prototype[chkSym].props;
+ let remainingPropNames = new Set(Object.getOwnPropertyNames(v));
+ let obj = new type();
+ for (let prop of props) {
+ if (!remainingPropNames.has(prop.propertyKey)) {
+ throw Error("Property missing: " + prop.propertyKey);
+ }
+ if (!remainingPropNames.delete(prop.propertyKey)) {
+ throw Error("assertion failed");
+ }
+ let propVal = v[prop.propertyKey];
+ obj[prop.propertyKey] = prop.checker(propVal, prop);
+ }
+
+ if (remainingPropNames.size != 0) {
+ throw Error("superfluous properties " + JSON.stringify(Array.from(
+ remainingPropNames.values())));
+ }
+ return obj;
+ }
+
+ export function Class(target) {
+ target.checked = (v) => {
+ return checkValue(v, {
+ propertyKey: "(root)",
+ type: target,
+ checker: checkValue
+ });
+ };
+ return target;
+ }
+
+ export function Value(type) {
+ function deco(target: Object, propertyKey: string | symbol): void {
+ let chk = mkChk(target);
+ chk.props.push({
+ propertyKey: propertyKey,
+ checker: checkValue,
+ type: type
+ });
+ }
+
+ return deco;
+ }
+
+ export function List(type) {
+ function deco(target: Object, propertyKey: string | symbol): void {
+ throw Error("not implemented");
+ }
+
+ return deco;
+ }
+
+ export function Number(target: Object, propertyKey: string | symbol): void {
+ let chk = mkChk(target);
+ chk.props.push({propertyKey: propertyKey, checker: checkNumber});
+ }
+
+ export function AnyObject(target: Object, propertyKey: string | symbol): void {
+ let chk = mkChk(target);
+ chk.props.push({propertyKey: propertyKey, checker: checkAnyObject});
+ }
+
+ export function String(target: Object, propertyKey: string | symbol): void {
+ let chk = mkChk(target);
+ chk.props.push({propertyKey: propertyKey, checker: checkString});
+ }
+
+ function mkChk(target) {
+ let chk = target[chkSym];
+ if (!chk) {
+ chk = {props: []};
+ target[chkSym] = chk;
+ }
+ return chk;
+ }
+}
diff --git a/extension/lib/wallet/db.ts b/extension/lib/wallet/db.ts
new file mode 100644
index 000000000..a208f0923
--- /dev/null
+++ b/extension/lib/wallet/db.ts
@@ -0,0 +1,97 @@
+/*
+ This file is part of TALER
+ (C) 2016 GNUnet e.V.
+
+ TALER is free software; you can redistribute it and/or modify it under the
+ terms of the GNU General Public License as published by the Free Software
+ Foundation; either version 3, or (at your option) any later version.
+
+ TALER is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+ A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along with
+ TALER; see the file COPYING. If not, If not, see <http://www.gnu.org/licenses/>
+ */
+
+"use strict";
+
+/**
+ * Declarations and helpers for
+ * things that are stored in the wallet's
+ * database.
+ * @module Db
+ * @author Florian Dold
+ */
+
+const DB_NAME = "taler";
+const DB_VERSION = 1;
+
+/**
+ * Return a promise that resolves
+ * to the taler wallet db.
+ */
+export function openTalerDb(): Promise<IDBDatabase> {
+ return new Promise((resolve, reject) => {
+ let req = indexedDB.open(DB_NAME, DB_VERSION);
+ req.onerror = (e) => {
+ reject(e);
+ };
+ req.onsuccess = (e) => {
+ resolve(req.result);
+ };
+ req.onupgradeneeded = (e) => {
+ let db = req.result;
+ console.log("DB: upgrade needed: oldVersion = " + e.oldVersion);
+ switch (e.oldVersion) {
+ case 0: // DB does not exist yet
+ let mints = db.createObjectStore("mints", {keyPath: "baseUrl"});
+ mints.createIndex("pubKey", "keys.master_public_key");
+ db.createObjectStore("reserves", {keyPath: "reserve_pub"});
+ db.createObjectStore("denoms", {keyPath: "denomPub"});
+ let coins = db.createObjectStore("coins", {keyPath: "coinPub"});
+ coins.createIndex("mintBaseUrl", "mintBaseUrl");
+ db.createObjectStore("transactions", {keyPath: "contractHash"});
+ db.createObjectStore("precoins",
+ {keyPath: "coinPub", autoIncrement: true});
+ db.createObjectStore("history", {keyPath: "id", autoIncrement: true});
+ break;
+ }
+ };
+ });
+}
+
+
+export function exportDb(db): Promise<any> {
+ let dump = {
+ name: db.name,
+ version: db.version,
+ stores: {}
+ };
+
+ return new Promise((resolve, reject) => {
+
+ let tx = db.transaction(db.objectStoreNames);
+ tx.addEventListener("complete", (e) => {
+ resolve(dump);
+ });
+ for (let i = 0; i < db.objectStoreNames.length; i++) {
+ let name = db.objectStoreNames[i];
+ let storeDump = {};
+ dump.stores[name] = storeDump;
+ let store = tx.objectStore(name)
+ .openCursor()
+ .addEventListener("success", (e) => {
+ let cursor = e.target.result;
+ if (cursor) {
+ storeDump[cursor.key] = cursor.value;
+ cursor.continue();
+ }
+ });
+ }
+ });
+}
+
+export function deleteDb() {
+ indexedDB.deleteDatabase(DB_NAME);
+} \ No newline at end of file
diff --git a/extension/lib/wallet/emscriptif.ts b/extension/lib/wallet/emscriptif.ts
new file mode 100644
index 000000000..d8fd72289
--- /dev/null
+++ b/extension/lib/wallet/emscriptif.ts
@@ -0,0 +1,938 @@
+/*
+ This file is part of TALER
+ (C) 2015 GNUnet e.V.
+
+ TALER is free software; you can redistribute it and/or modify it under the
+ terms of the GNU General Public License as published by the Free Software
+ Foundation; either version 3, or (at your option) any later version.
+
+ TALER is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+ A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along with
+ TALER; see the file COPYING. If not, If not, see <http://www.gnu.org/licenses/>
+ */
+
+import {AmountJson_interface} from "./types";
+import * as EmscWrapper from "../emscripten/emsc";
+
+/**
+ * High-level interface to emscripten-compiled modules used
+ * by the wallet.
+ * @module EmscriptIf
+ * @author Florian Dold
+ */
+
+"use strict";
+
+// Size of a native pointer.
+const PTR_SIZE = 4;
+
+const GNUNET_OK = 1;
+const GNUNET_YES = 1;
+const GNUNET_NO = 0;
+const GNUNET_SYSERR = -1;
+
+let Module = EmscWrapper.Module;
+
+let getEmsc: EmscWrapper.EmscFunGen = (...args) => Module.cwrap.apply(null, args);
+
+var emsc = {
+ free: (ptr) => Module._free(ptr),
+ get_value: getEmsc('TALER_WR_get_value',
+ 'number',
+ ['number']),
+ get_fraction: getEmsc('TALER_WR_get_fraction',
+ 'number',
+ ['number']),
+ get_currency: getEmsc('TALER_WR_get_currency',
+ 'string',
+ ['number']),
+ amount_add: getEmsc('TALER_amount_add',
+ 'number',
+ ['number', 'number', 'number']),
+ amount_subtract: getEmsc('TALER_amount_subtract',
+ 'number',
+ ['number', 'number', 'number']),
+ amount_normalize: getEmsc('TALER_amount_normalize',
+ 'void',
+ ['number']),
+ amount_get_zero: getEmsc('TALER_amount_get_zero',
+ 'number',
+ ['string', 'number']),
+ amount_cmp: getEmsc('TALER_amount_cmp',
+ 'number',
+ ['number', 'number']),
+ amount_hton: getEmsc('TALER_amount_hton',
+ 'void',
+ ['number', 'number']),
+ amount_ntoh: getEmsc('TALER_amount_ntoh',
+ 'void',
+ ['number', 'number']),
+ hash: getEmsc('GNUNET_CRYPTO_hash',
+ 'void',
+ ['number', 'number', 'number']),
+ memmove: getEmsc('memmove',
+ 'number',
+ ['number', 'number', 'number']),
+ rsa_public_key_free: getEmsc('GNUNET_CRYPTO_rsa_public_key_free',
+ 'void',
+ ['number']),
+ rsa_signature_free: getEmsc('GNUNET_CRYPTO_rsa_signature_free',
+ 'void',
+ ['number']),
+ string_to_data: getEmsc('GNUNET_STRINGS_string_to_data',
+ 'number',
+ ['number', 'number', 'number', 'number']),
+ eddsa_sign: getEmsc('GNUNET_CRYPTO_eddsa_sign',
+ 'number',
+ ['number', 'number', 'number']),
+ hash_create_random: getEmsc('GNUNET_CRYPTO_hash_create_random',
+ 'void',
+ ['number', 'number']),
+ rsa_blinding_key_destroy: getEmsc('GNUNET_CRYPTO_rsa_blinding_key_free',
+ 'void',
+ ['number']),
+};
+
+var emscAlloc = {
+ get_amount: getEmsc('TALER_WRALL_get_amount',
+ 'number',
+ ['number', 'number', 'number', 'string']),
+ eddsa_key_create: getEmsc('GNUNET_CRYPTO_eddsa_key_create',
+ 'number', []),
+ eddsa_public_key_from_private: getEmsc(
+ 'TALER_WRALL_eddsa_public_key_from_private',
+ 'number',
+ ['number']),
+ data_to_string_alloc: getEmsc('GNUNET_STRINGS_data_to_string_alloc',
+ 'number',
+ ['number', 'number']),
+ purpose_create: getEmsc('TALER_WRALL_purpose_create',
+ 'number',
+ ['number', 'number', 'number']),
+ rsa_blind: getEmsc('GNUNET_CRYPTO_rsa_blind',
+ 'number',
+ ['number', 'number', 'number', 'number']),
+ rsa_blinding_key_create: getEmsc('GNUNET_CRYPTO_rsa_blinding_key_create',
+ 'number',
+ ['number']),
+ rsa_blinding_key_encode: getEmsc('GNUNET_CRYPTO_rsa_blinding_key_encode',
+ 'number',
+ ['number', 'number']),
+ rsa_signature_encode: getEmsc('GNUNET_CRYPTO_rsa_signature_encode',
+ 'number',
+ ['number', 'number']),
+ rsa_blinding_key_decode: getEmsc('GNUNET_CRYPTO_rsa_blinding_key_decode',
+ 'number',
+ ['number', 'number']),
+ rsa_public_key_decode: getEmsc('GNUNET_CRYPTO_rsa_public_key_decode',
+ 'number',
+ ['number', 'number']),
+ rsa_signature_decode: getEmsc('GNUNET_CRYPTO_rsa_signature_decode',
+ 'number',
+ ['number', 'number']),
+ rsa_public_key_encode: getEmsc('GNUNET_CRYPTO_rsa_public_key_encode',
+ 'number',
+ ['number', 'number']),
+ rsa_unblind: getEmsc('GNUNET_CRYPTO_rsa_unblind',
+ 'number',
+ ['number', 'number', 'number']),
+ malloc: (size: number) => Module._malloc(size),
+};
+
+
+enum SignaturePurpose {
+ RESERVE_WITHDRAW = 1200,
+ WALLET_COIN_DEPOSIT = 1201,
+}
+
+enum RandomQuality {
+ WEAK = 0,
+ STRONG = 1,
+ NONCE = 2
+}
+
+
+abstract class ArenaObject {
+ private _nativePtr: number;
+ arena: Arena;
+
+ abstract destroy(): void;
+
+ constructor(arena?: Arena) {
+ this.nativePtr = null;
+ if (!arena) {
+ if (arenaStack.length == 0) {
+ throw Error("No arena available")
+ }
+ arena = arenaStack[arenaStack.length - 1];
+ }
+ arena.put(this);
+ this.arena = arena;
+ }
+
+ getNative(): number {
+ // We want to allow latent allocation
+ // of native wrappers, but we never want to
+ // pass 'undefined' to emscripten.
+ if (this._nativePtr === undefined) {
+ throw Error("Native pointer not initialized");
+ }
+ return this._nativePtr;
+ }
+
+ free() {
+ if (this.nativePtr !== undefined) {
+ emsc.free(this.nativePtr);
+ this.nativePtr = undefined;
+ }
+ }
+
+ alloc(size: number) {
+ if (this.nativePtr !== undefined) {
+ throw Error("Double allocation");
+ }
+ this.nativePtr = emscAlloc.malloc(size);
+ }
+
+ setNative(n: number) {
+ if (n === undefined) {
+ throw Error("Native pointer must be a number or null");
+ }
+ this._nativePtr = n;
+ }
+
+ set nativePtr(v) {
+ this.setNative(v);
+ }
+
+ get nativePtr() {
+ return this.getNative();
+ }
+
+}
+
+interface Arena {
+ put(obj: ArenaObject): void;
+ destroy(): void;
+}
+
+class DefaultArena implements Arena {
+ heap: Array<ArenaObject>;
+
+ constructor() {
+ this.heap = [];
+ }
+
+ put(obj) {
+ this.heap.push(obj);
+ }
+
+ destroy() {
+ for (let obj of this.heap) {
+ obj.destroy();
+ }
+ this.heap = []
+ }
+}
+
+
+function mySetTimeout(ms: number, fn: () => void) {
+ // We need to use different timeouts, depending on whether
+ // we run in node or a web extension
+ if ("function" === typeof setTimeout) {
+ setTimeout(fn, ms);
+ } else {
+ chrome.extension.getBackgroundPage().setTimeout(fn, ms);
+ }
+}
+
+
+/**
+ * Arena that destroys all its objects once control has returned to the message
+ * loop and a small interval has passed.
+ */
+class SyncArena extends DefaultArena {
+ private isScheduled: boolean;
+
+ constructor() {
+ super();
+ }
+
+ pub(obj) {
+ super.put(obj);
+ if (!this.isScheduled) {
+ this.schedule();
+ }
+ this.heap.push(obj);
+ }
+
+ destroy() {
+ super.destroy();
+ }
+
+ private schedule() {
+ this.isScheduled = true;
+ mySetTimeout(50, () => {
+ this.isScheduled = false;
+ this.destroy();
+ });
+ }
+}
+
+let arenaStack: Arena[] = [];
+arenaStack.push(new SyncArena());
+
+
+export class Amount extends ArenaObject {
+ constructor(args?: AmountJson_interface, arena?: Arena) {
+ super(arena);
+ if (args) {
+ this.nativePtr = emscAlloc.get_amount(args.value,
+ 0,
+ args.fraction,
+ args.currency);
+ } else {
+ this.nativePtr = emscAlloc.get_amount(0, 0, 0, "");
+ }
+ }
+
+ destroy() {
+ if (this.nativePtr != 0) {
+ emsc.free(this.nativePtr);
+ }
+ }
+
+
+ static getZero(currency: string, a?: Arena): Amount {
+ let am = new Amount(null, a);
+ let r = emsc.amount_get_zero(currency, am.getNative());
+ if (r != GNUNET_OK) {
+ throw Error("invalid currency");
+ }
+ return am;
+ }
+
+
+ toNbo(a?: Arena): AmountNbo {
+ let x = new AmountNbo(a);
+ x.alloc();
+ emsc.amount_hton(x.nativePtr, this.nativePtr);
+ return x;
+ }
+
+ fromNbo(nbo: AmountNbo): void {
+ emsc.amount_ntoh(this.nativePtr, nbo.nativePtr);
+ }
+
+ get value() {
+ return emsc.get_value(this.nativePtr);
+ }
+
+ get fraction() {
+ return emsc.get_fraction(this.nativePtr);
+ }
+
+ get currency() {
+ return emsc.get_currency(this.nativePtr);
+ }
+
+ toJson() {
+ return {
+ value: emsc.get_value(this.nativePtr),
+ fraction: emsc.get_fraction(this.nativePtr),
+ currency: emsc.get_currency(this.nativePtr)
+ };
+ }
+
+ /**
+ * Add an amount to this amount.
+ */
+ add(a) {
+ let res = emsc.amount_add(this.nativePtr, a.nativePtr, this.nativePtr);
+ if (res < 1) {
+ // Overflow
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * Perform saturating subtraction on amounts.
+ */
+ sub(a) {
+ // this = this - a
+ let res = emsc.amount_subtract(this.nativePtr, this.nativePtr, a.nativePtr);
+ if (res == 0) {
+ // Underflow
+ return false;
+ }
+ if (res > 0) {
+ return true;
+ }
+ throw Error("Incompatible currencies");
+ }
+
+ cmp(a) {
+ return emsc.amount_cmp(this.nativePtr, a.nativePtr);
+ }
+
+ normalize() {
+ emsc.amount_normalize(this.nativePtr);
+ }
+}
+
+
+abstract class PackedArenaObject extends ArenaObject {
+ abstract size(): number;
+
+ constructor(a?: Arena) {
+ super(a);
+ }
+
+ toCrock(): string {
+ var d = emscAlloc.data_to_string_alloc(this.nativePtr, this.size());
+ var s = Module.Pointer_stringify(d);
+ emsc.free(d);
+ return s;
+ }
+
+ toJson(): any {
+ // Per default, the json encoding of
+ // packed arena objects is just the crockford encoding.
+ // Subclasses typically want to override this.
+ return this.toCrock();
+ }
+
+ loadCrock(s: string) {
+ this.alloc();
+ // We need to get the javascript string
+ // to the emscripten heap first.
+ let buf = ByteArray.fromString(s);
+ let res = emsc.string_to_data(buf.nativePtr,
+ s.length,
+ this.nativePtr,
+ this.size());
+ buf.destroy();
+ if (res < 1) {
+ throw {error: "wrong encoding"};
+ }
+ }
+
+ alloc() {
+ if (this.nativePtr === null) {
+ this.nativePtr = emscAlloc.malloc(this.size());
+ }
+ }
+
+ destroy() {
+ emsc.free(this.nativePtr);
+ this.nativePtr = 0;
+ }
+
+ hash(): HashCode {
+ var x = new HashCode();
+ x.alloc();
+ emsc.hash(this.nativePtr, this.size(), x.nativePtr);
+ return x;
+ }
+
+ hexdump() {
+ let bytes: string[] = [];
+ for (let i = 0; i < this.size(); i++) {
+ let b = Module.getValue(this.getNative() + i, "i8");
+ b = (b + 256) % 256;
+ bytes.push("0".concat(b.toString(16)).slice(-2));
+ }
+ let lines = [];
+ for (let i = 0; i < bytes.length; i+=8) {
+ lines.push(bytes.slice(i, i+8).join(","));
+ }
+ return lines.join("\n");
+ }
+}
+
+
+export class AmountNbo extends PackedArenaObject {
+ size() {
+ return 24;
+ }
+ toJson(): any {
+ let a = new DefaultArena();
+ let am = new Amount(null, a);
+ am.fromNbo(this);
+ let json = am.toJson();
+ a.destroy();
+ return json;
+ }
+}
+
+
+export class EddsaPrivateKey extends PackedArenaObject {
+ static create(a?: Arena): EddsaPrivateKey {
+ let obj = new EddsaPrivateKey(a);
+ obj.nativePtr = emscAlloc.eddsa_key_create();
+ return obj;
+ }
+
+ size() {
+ return 32;
+ }
+
+ getPublicKey(a?: Arena): EddsaPublicKey {
+ let obj = new EddsaPublicKey(a);
+ obj.nativePtr = emscAlloc.eddsa_public_key_from_private(this.nativePtr);
+ return obj;
+ }
+
+ static fromCrock: (string) => EddsaPrivateKey;
+}
+mixinStatic(EddsaPrivateKey, fromCrock);
+
+
+function fromCrock(s: string) {
+ let x = new this();
+ x.alloc();
+ x.loadCrock(s);
+ return x;
+}
+
+
+function mixin(obj, method, name?: string) {
+ if (!name) {
+ name = method.name;
+ }
+ if (!name) {
+ throw Error("Mixin needs a name.");
+ }
+ obj.prototype[method.name] = method;
+}
+
+
+function mixinStatic(obj, method, name?: string) {
+ if (!name) {
+ name = method.name;
+ }
+ if (!name) {
+ throw Error("Mixin needs a name.");
+ }
+ obj[method.name] = method;
+}
+
+
+export class EddsaPublicKey extends PackedArenaObject {
+ size() {
+ return 32;
+ }
+ static fromCrock: (s: string) => EddsaPublicKey;
+}
+mixinStatic(EddsaPublicKey, fromCrock);
+
+function makeFromCrock(decodeFn: (p: number, s: number) => number) {
+ function fromCrock(s: string, a?: Arena) {
+ let obj = new this(a);
+ let buf = ByteArray.fromCrock(s);
+ obj.setNative(decodeFn(buf.getNative(),
+ buf.size()));
+ buf.destroy();
+ return obj;
+ }
+
+ return fromCrock;
+}
+
+function makeToCrock(encodeFn: (po: number, ps: number) => number): () => string {
+ function toCrock() {
+ let ptr = emscAlloc.malloc(PTR_SIZE);
+ let size = emscAlloc.rsa_blinding_key_encode(this.nativePtr, ptr);
+ let res = new ByteArray(size, Module.getValue(ptr, '*'));
+ let s = res.toCrock();
+ emsc.free(ptr);
+ res.destroy();
+ return s;
+ }
+ return toCrock;
+}
+
+export class RsaBlindingKey extends ArenaObject {
+ static create(len: number, a?: Arena) {
+ let o = new RsaBlindingKey(a);
+ o.nativePtr = emscAlloc.rsa_blinding_key_create(len);
+ return o;
+ }
+
+ static fromCrock: (s: string, a?: Arena) => RsaBlindingKey;
+ toCrock = makeToCrock(emscAlloc.rsa_blinding_key_encode);
+
+ destroy() {
+ // TODO
+ }
+}
+mixinStatic(RsaBlindingKey, makeFromCrock(emscAlloc.rsa_blinding_key_decode));
+
+
+export class HashCode extends PackedArenaObject {
+ size() {
+ return 64;
+ }
+
+ static fromCrock: (s: string) => HashCode;
+
+ random(qualStr: string) {
+ let qual: RandomQuality;
+ switch (qualStr) {
+ case "weak":
+ qual = RandomQuality.WEAK;
+ break;
+ case "strong":
+ case null:
+ case undefined:
+ qual = RandomQuality.STRONG;
+ break;
+ case "nonce":
+ qual = RandomQuality.NONCE;
+ break;
+ default:
+ throw Error(format("unknown crypto quality: {0}", qual));
+ }
+ this.alloc();
+ emsc.hash_create_random(qual, this.nativePtr);
+ }
+}
+mixinStatic(HashCode, fromCrock);
+
+
+export class ByteArray extends PackedArenaObject {
+ private allocatedSize: number;
+
+ size() {
+ return this.allocatedSize;
+ }
+
+ constructor(desiredSize: number, init: number, a?: Arena) {
+ super(a);
+ if (init === undefined || init === null) {
+ this.nativePtr = emscAlloc.malloc(desiredSize);
+ } else {
+ this.nativePtr = init;
+ }
+ this.allocatedSize = desiredSize;
+ }
+
+ static fromString(s: string, a?: Arena): ByteArray {
+ let hstr = emscAlloc.malloc(s.length + 1);
+ Module.writeStringToMemory(s, hstr);
+ return new ByteArray(s.length, hstr, a);
+ }
+
+ static fromCrock(s: string, a?: Arena): ByteArray {
+ let hstr = emscAlloc.malloc(s.length + 1);
+ Module.writeStringToMemory(s, hstr);
+ let decodedLen = Math.floor((s.length * 5) / 8);
+ let ba = new ByteArray(decodedLen, null, a);
+ let res = emsc.string_to_data(hstr, s.length, ba.nativePtr, decodedLen);
+ emsc.free(hstr);
+ if (res != GNUNET_OK) {
+ throw Error("decoding failed");
+ }
+ return ba;
+ }
+}
+
+
+export class EccSignaturePurpose extends PackedArenaObject {
+ size() {
+ return this.payloadSize + 8;
+ }
+
+ payloadSize: number;
+
+ constructor(purpose: SignaturePurpose,
+ payload: PackedArenaObject,
+ a?: Arena) {
+ super(a);
+ this.nativePtr = emscAlloc.purpose_create(purpose,
+ payload.nativePtr,
+ payload.size());
+ this.payloadSize = payload.size();
+ }
+}
+
+
+abstract class SignatureStruct {
+ abstract fieldTypes(): Array<any>;
+
+ abstract purpose(): SignaturePurpose;
+
+ private members: any = {};
+
+ constructor(x: { [name: string]: any }) {
+ for (let k in x) {
+ this.set(k, x[k]);
+ }
+ }
+
+ toPurpose(a?: Arena): EccSignaturePurpose {
+ let totalSize = 0;
+ for (let f of this.fieldTypes()) {
+ let name = f[0];
+ let member = this.members[name];
+ if (!member) {
+ throw Error(format("Member {0} not set", name));
+ }
+ totalSize += member.size();
+ }
+
+ let buf = emscAlloc.malloc(totalSize);
+ let ptr = buf;
+ for (let f of this.fieldTypes()) {
+ let name = f[0];
+ let member = this.members[name];
+ let size = member.size();
+ emsc.memmove(ptr, member.nativePtr, size);
+ ptr += size;
+ }
+ let ba = new ByteArray(totalSize, buf, a);
+ return new EccSignaturePurpose(this.purpose(), ba);
+ }
+
+
+ toJson() {
+ let res: any = {};
+ for (let f of this.fieldTypes()) {
+ let name = f[0];
+ let member = this.members[name];
+ if (!member) {
+ throw Error(format("Member {0} not set", name));
+ }
+ res[name] = member.toJson();
+ }
+ res["purpose"] = this.purpose();
+ return res;
+ }
+
+ protected set(name: string, value: PackedArenaObject) {
+ let typemap: any = {};
+ for (let f of this.fieldTypes()) {
+ typemap[f[0]] = f[1];
+ }
+ if (!(name in typemap)) {
+ throw Error(format("Key {0} not found", name));
+ }
+ if (!(value instanceof typemap[name])) {
+ throw Error(format("Wrong type for {0}", name));
+ }
+ this.members[name] = value;
+ }
+}
+
+
+// It's redundant, but more type safe.
+export interface WithdrawRequestPS_Args {
+ reserve_pub: EddsaPublicKey;
+ amount_with_fee: AmountNbo;
+ withdraw_fee: AmountNbo;
+ h_denomination_pub: HashCode;
+ h_coin_envelope: HashCode;
+}
+
+
+export class WithdrawRequestPS extends SignatureStruct {
+ constructor(w: WithdrawRequestPS_Args) {
+ super(w);
+ }
+
+ purpose() {
+ return SignaturePurpose.RESERVE_WITHDRAW;
+ }
+
+ fieldTypes() {
+ return [
+ ["reserve_pub", EddsaPublicKey],
+ ["amount_with_fee", AmountNbo],
+ ["withdraw_fee", AmountNbo],
+ ["h_denomination_pub", HashCode],
+ ["h_coin_envelope", HashCode]
+ ];
+ }
+}
+
+
+export class AbsoluteTimeNbo extends PackedArenaObject {
+ static fromTalerString(s: string): AbsoluteTimeNbo {
+ let x = new AbsoluteTimeNbo();
+ x.alloc();
+ let r = /Date\(([0-9]+)\)/;
+ let m = r.exec(s);
+ if (m.length != 2) {
+ throw Error();
+ }
+ let n = parseInt(m[1]) * 1000000;
+ // XXX: This only works up to 54 bit numbers.
+ set64(x.getNative(), n);
+ return x;
+ }
+
+ size() {
+ return 8;
+ }
+}
+
+
+// XXX: This only works up to 54 bit numbers.
+function set64(p: number, n: number) {
+ for (let i = 0; i < 8; ++i) {
+ Module.setValue(p + (7 - i), n & 0xFF, "i8");
+ n = Math.floor(n / 256);
+ }
+
+}
+
+
+export class UInt64 extends PackedArenaObject {
+ static fromNumber(n: number): UInt64 {
+ let x = new UInt64();
+ x.alloc();
+ set64(x.getNative(), n);
+ return x;
+ }
+
+ size() {
+ return 8;
+ }
+}
+
+
+// It's redundant, but more type safe.
+export interface DepositRequestPS_Args {
+ h_contract: HashCode;
+ h_wire: HashCode;
+ timestamp: AbsoluteTimeNbo;
+ refund_deadline: AbsoluteTimeNbo;
+ transaction_id: UInt64;
+ amount_with_fee: AmountNbo;
+ deposit_fee: AmountNbo;
+ merchant: EddsaPublicKey;
+ coin_pub: EddsaPublicKey;
+}
+
+
+export class DepositRequestPS extends SignatureStruct {
+ constructor(w: DepositRequestPS_Args) {
+ super(w);
+ }
+
+ purpose() {
+ return SignaturePurpose.WALLET_COIN_DEPOSIT;
+ }
+
+ fieldTypes() {
+ return [
+ ["h_contract", HashCode],
+ ["h_wire", HashCode],
+ ["timestamp", AbsoluteTimeNbo],
+ ["refund_deadline", AbsoluteTimeNbo],
+ ["transaction_id", UInt64],
+ ["amount_with_fee", AmountNbo],
+ ["deposit_fee", AmountNbo],
+ ["merchant", EddsaPublicKey],
+ ["coin_pub", EddsaPublicKey],
+ ];
+ }
+}
+
+
+interface Encodeable {
+ encode(arena?: Arena): ByteArray;
+}
+
+function makeEncode(encodeFn) {
+ function encode(arena?: Arena) {
+ let ptr = emscAlloc.malloc(PTR_SIZE);
+ let len = encodeFn(this.getNative(), ptr);
+ let res = new ByteArray(len, null, arena);
+ res.setNative(Module.getValue(ptr, '*'));
+ emsc.free(ptr);
+ return res;
+ }
+ return encode;
+}
+
+
+export class RsaPublicKey extends ArenaObject implements Encodeable {
+ static fromCrock: (s: string, a?: Arena) => RsaPublicKey;
+
+ toCrock() {
+ return this.encode().toCrock();
+ }
+
+ destroy() {
+ emsc.rsa_public_key_free(this.nativePtr);
+ this.nativePtr = 0;
+ }
+
+ encode: (arena?: Arena) => ByteArray;
+}
+mixinStatic(RsaPublicKey, makeFromCrock(emscAlloc.rsa_public_key_decode));
+mixin(RsaPublicKey, makeEncode(emscAlloc.rsa_public_key_encode));
+
+
+export class EddsaSignature extends PackedArenaObject {
+ size() {
+ return 64;
+ }
+}
+
+
+export class RsaSignature extends ArenaObject implements Encodeable{
+ static fromCrock: (s: string, a?: Arena) => RsaSignature;
+
+ encode: (arena?: Arena) => ByteArray;
+
+ destroy() {
+ emsc.rsa_signature_free(this.getNative());
+ this.setNative(0);
+ }
+}
+mixinStatic(RsaSignature, makeFromCrock(emscAlloc.rsa_signature_decode));
+mixin(RsaSignature, makeEncode(emscAlloc.rsa_signature_encode));
+
+
+export function rsaBlind(hashCode: HashCode,
+ blindingKey: RsaBlindingKey,
+ pkey: RsaPublicKey,
+ arena?: Arena): ByteArray {
+ let ptr = emscAlloc.malloc(PTR_SIZE);
+ let s = emscAlloc.rsa_blind(hashCode.nativePtr,
+ blindingKey.nativePtr,
+ pkey.nativePtr,
+ ptr);
+ return new ByteArray(s, Module.getValue(ptr, '*'), arena);
+}
+
+
+export function eddsaSign(purpose: EccSignaturePurpose,
+ priv: EddsaPrivateKey,
+ a?: Arena): EddsaSignature {
+ let sig = new EddsaSignature(a);
+ sig.alloc();
+ let res = emsc.eddsa_sign(priv.nativePtr, purpose.nativePtr, sig.nativePtr);
+ if (res < 1) {
+ throw Error("EdDSA signing failed");
+ }
+ return sig;
+}
+
+
+export function rsaUnblind(sig: RsaSignature,
+ bk: RsaBlindingKey,
+ pk: RsaPublicKey,
+ a?: Arena): RsaSignature {
+ let x = new RsaSignature(a);
+ x.nativePtr = emscAlloc.rsa_unblind(sig.nativePtr,
+ bk.nativePtr,
+ pk.nativePtr);
+ return x;
+}
diff --git a/extension/lib/wallet/http.ts b/extension/lib/wallet/http.ts
new file mode 100644
index 000000000..d132857b7
--- /dev/null
+++ b/extension/lib/wallet/http.ts
@@ -0,0 +1,85 @@
+/*
+ This file is part of TALER
+ (C) 2016 GNUnet e.V.
+
+ TALER is free software; you can redistribute it and/or modify it under the
+ terms of the GNU General Public License as published by the Free Software
+ Foundation; either version 3, or (at your option) any later version.
+
+ TALER is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+ A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along with
+ TALER; see the file COPYING. If not, If not, see <http://www.gnu.org/licenses/>
+ */
+
+/**
+ * Helpers for doing XMLHttpRequest-s that are based on ES6 promises.
+ * @module Http
+ * @author Florian Dold
+ */
+
+"use strict";
+
+
+
+export interface HttpResponse {
+ status: number;
+ responseText: string;
+}
+
+
+export class BrowserHttpLib {
+ req(method: string,
+ url: string|uri.URI,
+ options?: any): Promise<HttpResponse> {
+ let urlString: string;
+ if (url instanceof URI) {
+ urlString = url.href();
+ } else if (typeof url === "string") {
+ urlString = url;
+ }
+
+ return new Promise((resolve, reject) => {
+ let myRequest = new XMLHttpRequest();
+ myRequest.open(method, urlString);
+ if (options && options.req) {
+ myRequest.send(options.req);
+ } else {
+ myRequest.send();
+ }
+ myRequest.addEventListener("readystatechange", (e) => {
+ if (myRequest.readyState == XMLHttpRequest.DONE) {
+ let resp = {
+ status: myRequest.status,
+ responseText: myRequest.responseText
+ };
+ resolve(resp);
+ }
+ });
+ });
+ }
+
+
+ get(url: string|uri.URI) {
+ return this.req("get", url);
+ }
+
+
+ postJson(url: string|uri.URI, body) {
+ return this.req("post", url, {req: JSON.stringify(body)});
+ }
+
+
+ postForm(url: string|uri.URI, form) {
+ return this.req("post", url, {req: form});
+ }
+}
+
+
+export class RequestException {
+ constructor(detail) {
+
+ }
+} \ No newline at end of file
diff --git a/extension/lib/wallet/query.ts b/extension/lib/wallet/query.ts
new file mode 100644
index 000000000..c67ce0193
--- /dev/null
+++ b/extension/lib/wallet/query.ts
@@ -0,0 +1,283 @@
+/*
+ This file is part of TALER
+ (C) 2016 GNUnet e.V.
+
+ TALER is free software; you can redistribute it and/or modify it under the
+ terms of the GNU General Public License as published by the Free Software
+ Foundation; either version 3, or (at your option) any later version.
+
+ TALER is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+ A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along with
+ TALER; see the file COPYING. If not, If not, see <http://www.gnu.org/licenses/>
+ */
+
+/// <reference path="../decl/urijs/URIjs.d.ts" />
+
+
+/**
+ * Database query abstractions.
+ * @module Query
+ * @author Florian Dold
+ */
+
+"use strict";
+
+
+export function Query(db) {
+ return new QueryRoot(db);
+}
+
+
+abstract class QueryStreamBase {
+ abstract subscribe(f: (isDone: boolean, value: any) => void);
+
+ root: QueryRoot;
+
+ constructor(root: QueryRoot) {
+ this.root = root;
+ }
+
+ indexJoin(storeName: string, indexName: string, key: any): QueryStreamBase {
+ // join on the source relation's key, which may be
+ // a path or a transformer function
+ this.root.stores.add(storeName);
+ return new QueryStreamIndexJoin(this, storeName, indexName, key);
+ }
+
+ filter(f: (any) => boolean): QueryStreamBase {
+ return new QueryStreamFilter(this, f);
+ }
+
+ reduce(f, acc?): Promise<any> {
+ let leakedResolve;
+ let p = new Promise((resolve, reject) => {
+ leakedResolve = resolve;
+ });
+
+ this.subscribe((isDone, value) => {
+ if (isDone) {
+ leakedResolve(acc);
+ return;
+ }
+ acc = f(value, acc);
+ });
+
+ return Promise.resolve().then(() => this.root.finish().then(() => p));
+ }
+}
+
+
+class QueryStreamFilter extends QueryStreamBase {
+ s: QueryStreamBase;
+ filterFn;
+
+ constructor(s: QueryStreamBase, filterFn) {
+ super(s.root);
+ this.s = s;
+ this.filterFn = filterFn;
+ }
+
+ subscribe(f) {
+ this.s.subscribe((isDone, value) => {
+ if (isDone) {
+ f(true, undefined);
+ return;
+ }
+ if (this.filterFn(value)) {
+ f(false, value)
+ }
+ });
+ }
+}
+
+
+class QueryStreamIndexJoin extends QueryStreamBase {
+ s: QueryStreamBase;
+ storeName;
+ key;
+ indexName;
+
+ constructor(s, storeName: string, indexName: string, key: any) {
+ super(s.root);
+ this.s = s;
+ this.storeName = storeName;
+ this.key = key;
+ this.indexName = indexName;
+ }
+
+ subscribe(f) {
+ this.s.subscribe((isDone, value) => {
+ if (isDone) {
+ f(true, undefined);
+ return;
+ }
+ let s = this.root.tx.objectStore(this.storeName).index(this.indexName);
+ let req = s.openCursor(IDBKeyRange.only(this.key(value)));
+ req.onsuccess = () => {
+ let cursor = req.result;
+ if (cursor) {
+ f(false, [value, cursor.value]);
+ cursor.continue();
+ } else {
+ f(true, undefined);
+ }
+ }
+ });
+ }
+
+}
+
+
+class IterQueryStream extends QueryStreamBase {
+ private qr: QueryRoot;
+ private storeName;
+ private options;
+
+ constructor(qr, storeName, options?) {
+ super(qr);
+ this.qr = qr;
+ this.options = options;
+ this.storeName = storeName;
+ }
+
+ subscribe(f) {
+ function doIt() {
+ let s;
+ if (this.options && this.options.indexName) {
+ s = this.qr.tx.objectStore(this.storeName)
+ .index(this.options.indexName);
+ } else {
+ s = this.qr.tx.objectStore(this.storeName);
+ }
+ let kr = undefined;
+ if (this.options && ("only" in this.options)) {
+ kr = IDBKeyRange.only(this.options.only);
+ }
+ let req = s.openCursor(kr);
+ req.onsuccess = (e) => {
+ let cursor: IDBCursorWithValue = req.result;
+ if (cursor) {
+ f(false, cursor.value);
+ cursor.continue();
+ } else {
+ f(true, undefined);
+ }
+ }
+ }
+
+ this.qr.work.push(doIt.bind(this));
+ }
+}
+
+
+class QueryRoot {
+ work = [];
+ db: IDBDatabase;
+ tx: IDBTransaction;
+ stores = new Set();
+ kickoffPromise;
+
+ constructor(db) {
+ this.db = db;
+ }
+
+ iter(storeName): QueryStreamBase {
+ this.stores.add(storeName);
+ return new IterQueryStream(this, storeName);
+ }
+
+ iterOnly(storeName, key): QueryStreamBase {
+ this.stores.add(storeName);
+ return new IterQueryStream(this, storeName, {only: key});
+ }
+
+ iterIndex(storeName, indexName, key) {
+ this.stores.add(storeName);
+ return new IterQueryStream(this, storeName, {indexName: indexName});
+ }
+
+ put(storeName, val): QueryRoot {
+ this.stores.add(storeName);
+ function doPut() {
+ this.tx.objectStore(storeName).put(val);
+ }
+
+ this.work.push(doPut.bind(this));
+ return this;
+ }
+
+ putAll(storeName, iterable): QueryRoot {
+ this.stores.add(storeName);
+ function doPutAll() {
+ for (let obj of iterable) {
+ this.tx.objectStore(storeName).put(obj);
+ }
+ }
+
+ this.work.push(doPutAll.bind(this));
+ return this;
+ }
+
+ add(storeName, val): QueryRoot {
+ this.stores.add(storeName);
+ function doAdd() {
+ this.tx.objectStore(storeName).add(val);
+ }
+
+ this.work.push(doAdd.bind(this));
+ return this;
+ }
+
+ get(storeName, key): Promise<any> {
+ this.stores.add(storeName);
+ let leakedResolve;
+ let p = new Promise((resolve, reject) => {
+ leakedResolve = resolve;
+ });
+ if (!leakedResolve) {
+ // According to ES6 spec (paragraph 25.4.3.1), this can't happen.
+ throw Error("assertion failed");
+ }
+ function doGet() {
+ let req = this.tx.objectStore(storeName).get(key);
+ req.onsuccess = (r) => {
+ leakedResolve(req.result);
+ };
+ }
+
+ this.work.push(doGet.bind(this));
+ return Promise.resolve().then(() => {
+ return this.finish().then(() => p);
+ });
+ }
+
+ finish(): Promise<void> {
+ if (this.kickoffPromise) {
+ return this.kickoffPromise;
+ }
+ this.kickoffPromise = new Promise((resolve, reject) => {
+
+ this.tx = this.db.transaction(Array.from(this.stores), "readwrite");
+ this.tx.oncomplete = () => {
+ resolve();
+ };
+ for (let w of this.work) {
+ w();
+ }
+ });
+ return this.kickoffPromise;
+ }
+
+ delete(storeName: string, key): QueryRoot {
+ this.stores.add(storeName);
+ function doDelete() {
+ this.tx.objectStore(storeName).delete(key);
+ }
+
+ this.work.push(doDelete.bind(this));
+ return this;
+ }
+} \ No newline at end of file
diff --git a/extension/lib/wallet/timerThread.ts b/extension/lib/wallet/timerThread.ts
new file mode 100644
index 000000000..6635da009
--- /dev/null
+++ b/extension/lib/wallet/timerThread.ts
@@ -0,0 +1,10 @@
+/**
+ * This file should be used as a WebWorker.
+ * Background pages in the WebExtensions model do
+ * not allow to schedule callbacks that should be called
+ * after a timeout. We can emulate this with WebWorkers.
+ */
+
+onmessage = function(e) {
+ self.setInterval(() => postMessage(true, "timerThread"), e.data.interval);
+}; \ No newline at end of file
diff --git a/extension/lib/wallet/types.ts b/extension/lib/wallet/types.ts
new file mode 100644
index 000000000..33de0ffb9
--- /dev/null
+++ b/extension/lib/wallet/types.ts
@@ -0,0 +1,109 @@
+/*
+ This file is part of TALER
+ (C) 2016 GNUnet e.V.
+
+ TALER is free software; you can redistribute it and/or modify it under the
+ terms of the GNU General Public License as published by the Free Software
+ Foundation; either version 3, or (at your option) any later version.
+
+ TALER is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+ A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along with
+ TALER; see the file COPYING. If not, If not, see <http://www.gnu.org/licenses/>
+ */
+
+"use strict";
+
+// TODO: factor into multiple files
+
+export interface Mint {
+ baseUrl: string;
+ keys: Keys
+}
+
+export interface CoinWithDenom {
+ coin: Coin;
+ denom: Denomination;
+}
+
+export interface Keys {
+ denoms: Denomination[];
+}
+
+export interface Denomination {
+ value: AmountJson_interface;
+ denom_pub: string;
+ fee_withdraw: AmountJson_interface;
+ fee_deposit: AmountJson_interface;
+}
+
+export interface PreCoin {
+ coinPub: string;
+ coinPriv: string;
+ reservePub: string;
+ denomPub: string;
+ blindingKey: string;
+ withdrawSig: string;
+ coinEv: string;
+ mintBaseUrl: string;
+ coinValue: AmountJson_interface;
+}
+
+export interface Coin {
+ coinPub: string;
+ coinPriv: string;
+ denomPub: string;
+ denomSig: string;
+ currentAmount: AmountJson_interface;
+ mintBaseUrl: string;
+}
+
+
+export interface AmountJson_interface {
+ value: number;
+ fraction: number
+ currency: string;
+}
+
+export interface ConfirmReserveRequest {
+ /**
+ * Name of the form field for the amount.
+ */
+ field_amount;
+
+ /**
+ * Name of the form field for the reserve public key.
+ */
+ field_reserve_pub;
+
+ /**
+ * Name of the form field for the reserve public key.
+ */
+ field_mint;
+
+ /**
+ * The actual amount in string form.
+ * TODO: where is this format specified?
+ */
+ amount_str;
+
+ /**
+ * Target URL for the reserve creation request.
+ */
+ post_url;
+
+ /**
+ * Mint URL where the bank should create the reserve.
+ */
+ mint;
+}
+
+
+export interface ConfirmReserveResponse {
+ backlink: string;
+ success: boolean;
+ status: number;
+ text: string;
+} \ No newline at end of file
diff --git a/extension/lib/wallet/wallet.ts b/extension/lib/wallet/wallet.ts
new file mode 100644
index 000000000..46bae70a7
--- /dev/null
+++ b/extension/lib/wallet/wallet.ts
@@ -0,0 +1,697 @@
+/*
+ This file is part of TALER
+ (C) 2015 GNUnet e.V.
+
+ TALER is free software; you can redistribute it and/or modify it under the
+ terms of the GNU General Public License as published by the Free Software
+ Foundation; either version 3, or (at your option) any later version.
+
+ TALER is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+ A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along with
+ TALER; see the file COPYING. If not, If not, see <http://www.gnu.org/licenses/>
+ */
+
+/**
+ * High-level wallet operations that should be indepentent from the underlying
+ * browser extension interface.
+ * @module Wallet
+ * @author Florian Dold
+ */
+
+import {Amount} from "./emscriptif"
+import {AmountJson_interface} from "./types";
+import {CoinWithDenom} from "./types";
+import {DepositRequestPS_Args} from "./emscriptif";
+import {HashCode} from "./emscriptif";
+import {EddsaPublicKey} from "./emscriptif";
+import {Coin} from "./types";
+import {AbsoluteTimeNbo} from "./emscriptif";
+import {UInt64} from "./emscriptif";
+import {DepositRequestPS} from "./emscriptif";
+import {eddsaSign} from "./emscriptif";
+import {EddsaPrivateKey} from "./emscriptif";
+import {ConfirmReserveRequest} from "./types";
+import {ConfirmReserveResponse} from "./types";
+import {RsaPublicKey} from "./emscriptif";
+import {Denomination} from "./types";
+import {RsaBlindingKey} from "./emscriptif";
+import {ByteArray} from "./emscriptif";
+import {rsaBlind} from "./emscriptif";
+import {WithdrawRequestPS} from "./emscriptif";
+import {PreCoin} from "./types";
+import {rsaUnblind} from "./emscriptif";
+import {RsaSignature} from "./emscriptif";
+import {Mint} from "./types";
+import {Checkable} from "./checkable";
+import {HttpResponse} from "./http";
+import {RequestException} from "./http";
+import {Query} from "./query";
+
+"use strict";
+
+@Checkable.Class
+class AmountJson {
+ @Checkable.Number
+ value: number;
+
+ @Checkable.Number
+ fraction: number;
+
+ @Checkable.String
+ currency: string;
+
+ static check: (v: any) => AmountJson;
+}
+
+
+@Checkable.Class
+class CoinPaySig {
+ @Checkable.String
+ coin_sig: string;
+
+ @Checkable.String
+ coin_pub: string;
+
+ @Checkable.String
+ ub_sig: string;
+
+ @Checkable.String
+ denom_pub: string;
+
+ @Checkable.Value(AmountJson)
+ f: AmountJson;
+
+ static check: (v: any) => CoinPaySig;
+}
+
+
+interface ConfirmPayRequest {
+ merchantPageUrl: string;
+ offer: Offer;
+}
+
+interface MintCoins {
+ [mintUrl: string]: CoinWithDenom[];
+}
+
+
+interface MintInfo {
+ master_pub: string;
+ url: string;
+}
+
+interface Offer {
+ contract: Contract;
+ sig: string;
+ H_contract: string;
+ pay_url: string;
+ exec_url: string;
+}
+
+interface Contract {
+ H_wire: string;
+ amount: AmountJson_interface;
+ auditors: string[];
+ expiry: string,
+ locations: string[];
+ max_fee: AmountJson_interface;
+ merchant: any;
+ merchant_pub: string;
+ mints: MintInfo[];
+ products: string[];
+ refund_deadline: string;
+ timestamp: string;
+ transaction_id: number;
+}
+
+
+interface CoinPaySig_interface {
+ coin_sig: string;
+ coin_pub: string;
+ ub_sig: string;
+ denom_pub: string;
+ f: AmountJson_interface;
+}
+
+
+interface Transaction {
+ contractHash: string;
+ contract: any;
+ payUrl: string;
+ payReq: any;
+}
+
+
+interface Reserve {
+ mint_base_url: string
+ reserve_priv: string;
+ reserve_pub: string;
+}
+
+
+interface PaymentResponse {
+ payUrl: string;
+ payReq: any;
+}
+
+
+export interface Badge {
+ setText(s: string): void;
+ setColor(c: string): void;
+}
+
+
+type PayCoinInfo = Array<{ updatedCoin: Coin, sig: CoinPaySig_interface }>;
+
+
+/**
+ * See http://api.taler.net/wallet.html#general
+ */
+function canonicalizeBaseUrl(url) {
+ let x = new URI(url);
+ if (!x.protocol()) {
+ x.protocol("https");
+ }
+ x.path(x.path() + "/").normalizePath();
+ x.fragment();
+ x.query();
+ return x.href()
+}
+
+
+interface HttpRequestLibrary {
+ req(method: string,
+ url: string|uri.URI,
+ options?: any): Promise<HttpResponse>;
+
+ get(url: string|uri.URI): Promise<HttpResponse>;
+
+ postJson(url: string|uri.URI, body): Promise<HttpResponse>;
+
+ postForm(url: string|uri.URI, form): Promise<HttpResponse>;
+}
+
+
+function copy(o) {
+ return JSON.parse(JSON.stringify(o));
+}
+
+
+function rankDenom(denom1: any, denom2: any) {
+ // Slow ... we should find a better way than to convert it evert time.
+ let v1 = new Amount(denom1.value);
+ let v2 = new Amount(denom2.value);
+ return (-1) * v1.cmp(v2);
+}
+
+
+export class Wallet {
+ private db: IDBDatabase;
+ private http: HttpRequestLibrary;
+ private badge: Badge;
+
+ constructor(db: IDBDatabase, http: HttpRequestLibrary, badge: Badge) {
+ this.db = db;
+ this.http = http;
+ this.badge = badge;
+ }
+
+ static signDeposit(offer: Offer,
+ cds: CoinWithDenom[]): PayCoinInfo {
+ let ret = [];
+ let amountSpent = Amount.getZero(cds[0].coin.currentAmount.currency);
+ let amountRemaining = new Amount(offer.contract.amount);
+ cds = copy(cds);
+ for (let cd of cds) {
+ let coinSpend;
+
+ if (amountRemaining.value == 0 && amountRemaining.fraction == 0) {
+ break;
+ }
+
+ if (amountRemaining.cmp(new Amount(cd.coin.currentAmount)) < 0) {
+ coinSpend = new Amount(amountRemaining.toJson());
+ } else {
+ coinSpend = new Amount(cd.coin.currentAmount);
+ }
+
+ amountSpent.add(coinSpend);
+ amountRemaining.sub(coinSpend);
+
+ let newAmount = new Amount(cd.coin.currentAmount);
+ newAmount.sub(coinSpend);
+ cd.coin.currentAmount = newAmount.toJson();
+
+ let args: DepositRequestPS_Args = {
+ h_contract: HashCode.fromCrock(offer.H_contract),
+ h_wire: HashCode.fromCrock(offer.contract.H_wire),
+ amount_with_fee: coinSpend.toNbo(),
+ coin_pub: EddsaPublicKey.fromCrock(cd.coin.coinPub),
+ deposit_fee: new Amount(cd.denom.fee_deposit).toNbo(),
+ merchant: EddsaPublicKey.fromCrock(offer.contract.merchant_pub),
+ refund_deadline: AbsoluteTimeNbo.fromTalerString(offer.contract.refund_deadline),
+ timestamp: AbsoluteTimeNbo.fromTalerString(offer.contract.timestamp),
+ transaction_id: UInt64.fromNumber(offer.contract.transaction_id),
+ };
+
+ let d = new DepositRequestPS(args);
+
+ let coinSig = eddsaSign(d.toPurpose(),
+ EddsaPrivateKey.fromCrock(cd.coin.coinPriv))
+ .toCrock();
+
+ let s: CoinPaySig_interface = {
+ coin_sig: coinSig,
+ coin_pub: cd.coin.coinPub,
+ ub_sig: cd.coin.denomSig,
+ denom_pub: cd.coin.denomPub,
+ f: coinSpend.toJson(),
+ };
+ ret.push({sig: s, updatedCoin: cd.coin});
+ }
+ return ret;
+ }
+
+
+ /**
+ * Get mints and associated coins that are still spendable,
+ * but only if the sum the coins' remaining value exceeds the payment amount.
+ * @param paymentAmount
+ * @param depositFeeLimit
+ * @param allowedMints
+ */
+ getPossibleMintCoins(paymentAmount: AmountJson_interface,
+ depositFeeLimit: AmountJson_interface,
+ allowedMints: MintInfo[]): Promise<MintCoins> {
+
+
+ let m: MintCoins = {};
+
+ function storeMintCoin(mc) {
+ let mint = mc[0];
+ let coin = mc[1];
+ let cd = {
+ coin: coin,
+ denom: mint.keys.denoms.find((e) => e.denom_pub === coin.denomPub)
+ };
+ if (!cd.denom) {
+ throw Error("denom not found (database inconsistent)");
+ }
+ let x = m[mint.baseUrl];
+ if (!x) {
+ m[mint.baseUrl] = [cd];
+ } else {
+ x.push(cd);
+ }
+ }
+
+ let ps = allowedMints.map((info) => {
+ return Query(this.db)
+ .iterIndex("mints", "pubKey", info.master_pub)
+ .indexJoin("coins", "mintBaseUrl", (mint) => mint.baseUrl)
+ .reduce(storeMintCoin);
+ });
+
+ return Promise.all(ps).then(() => {
+ let ret: MintCoins = {};
+
+ nextMint:
+ for (let key in m) {
+ let coins = m[key].map((x) => ({
+ a: new Amount(x.denom.fee_deposit),
+ c: x
+ }));
+ // Sort by ascending deposit fee
+ coins.sort((o1, o2) => o1.a.cmp(o2.a));
+ let maxFee = new Amount(depositFeeLimit);
+ let minAmount = new Amount(paymentAmount);
+ let accFee = new Amount(coins[0].c.denom.fee_deposit);
+ let accAmount = Amount.getZero(coins[0].c.coin.currentAmount.currency);
+ let usableCoins: CoinWithDenom[] = [];
+ nextCoin:
+ for (let i = 0; i < coins.length; i++) {
+ let coinAmount = new Amount(coins[i].c.coin.currentAmount);
+ let coinFee = coins[i].a;
+ if (coinAmount.cmp(coinFee) <= 0) {
+ continue nextCoin;
+ }
+ accFee.add(coinFee);
+ accAmount.add(coinAmount);
+ if (accFee.cmp(maxFee) >= 0) {
+ console.log("too much fees");
+ continue nextMint;
+ }
+ usableCoins.push(coins[i].c);
+ if (accAmount.cmp(minAmount) >= 0) {
+ ret[key] = usableCoins;
+ continue nextMint;
+ }
+ }
+ }
+ return ret;
+ });
+ }
+
+
+ executePay(offer: Offer,
+ payCoinInfo: PayCoinInfo,
+ merchantBaseUrl: string,
+ chosenMint: string): Promise<void> {
+ let payReq = {};
+ payReq["H_wire"] = offer.contract.H_wire;
+ payReq["H_contract"] = offer.H_contract;
+ payReq["transaction_id"] = offer.contract.transaction_id;
+ payReq["refund_deadline"] = offer.contract.refund_deadline;
+ payReq["mint"] = URI(chosenMint).href();
+ payReq["coins"] = payCoinInfo.map((x) => x.sig);
+ payReq["timestamp"] = offer.contract.timestamp;
+ let payUrl = URI(offer.pay_url).absoluteTo(merchantBaseUrl);
+ let t: Transaction = {
+ contractHash: offer.H_contract,
+ contract: offer.contract,
+ payUrl: payUrl.href(),
+ payReq: payReq
+ };
+
+ return Query(this.db)
+ .put("transactions", t)
+ .putAll("coins", payCoinInfo.map((pci) => pci.updatedCoin))
+ .finish();
+ }
+
+ confirmPay(offer: Offer, merchantPageUrl: string): Promise<any> {
+ return Promise.resolve().then(() => {
+ return this.getPossibleMintCoins(offer.contract.amount,
+ offer.contract.max_fee,
+ offer.contract.mints)
+ }).then((mcs) => {
+ if (Object.keys(mcs).length == 0) {
+ throw Error("Not enough coins.");
+ }
+ let mintUrl = Object.keys(mcs)[0];
+ let ds = Wallet.signDeposit(offer, mcs[mintUrl]);
+ return this.executePay(offer, ds, merchantPageUrl, mintUrl);
+ });
+ }
+
+ doPayment(H_contract): Promise<PaymentResponse> {
+ return Promise.resolve().then(() => {
+ return Query(this.db)
+ .get("transactions", H_contract)
+ .then((t) => {
+ if (!t) {
+ throw Error("contract not found");
+ }
+ let resp: PaymentResponse = {
+ payUrl: t.payUrl,
+ payReq: t.payReq
+ };
+ return resp;
+ });
+ });
+ }
+
+ confirmReserve(req: ConfirmReserveRequest): Promise<ConfirmReserveResponse> {
+ let reservePriv = EddsaPrivateKey.create();
+ let reservePub = reservePriv.getPublicKey();
+ let form = new FormData();
+ let now = (new Date()).toString();
+ form.append(req.field_amount, req.amount_str);
+ form.append(req.field_reserve_pub, reservePub.toCrock());
+ form.append(req.field_mint, req.mint);
+ // TODO: set bank-specified fields.
+ let mintBaseUrl = canonicalizeBaseUrl(req.mint);
+
+ return this.http.postForm(req.post_url, form)
+ .then((hresp) => {
+ let resp: ConfirmReserveResponse = {
+ status: hresp.status,
+ text: hresp.responseText,
+ success: undefined,
+ backlink: undefined
+ };
+ let reserveRecord = {
+ reserve_pub: reservePub.toCrock(),
+ reserve_priv: reservePriv.toCrock(),
+ mint_base_url: mintBaseUrl,
+ created: now,
+ last_query: null,
+ current_amount: null,
+ // XXX: set to actual amount
+ initial_amount: null
+ };
+
+ if (hresp.status != 200) {
+ resp.success = false;
+ return resp;
+ }
+
+ resp.success = true;
+ // We can't show the page directly, so
+ // we show some generic page from the wallet.
+ resp.backlink = null;
+ return Query(this.db)
+ .put("reserves", reserveRecord)
+ .finish()
+ .then(() => {
+ // Do this in the background
+ this.updateMintFromUrl(reserveRecord.mint_base_url)
+ .then((mint) =>
+ this.updateReserve(reservePub, mint)
+ .then((reserve) => this.depleteReserve(reserve,
+ mint))
+ );
+ return resp;
+ });
+ });
+ }
+
+ withdrawPrepare(denom: Denomination,
+ reserve: Reserve): Promise<PreCoin> {
+ let reservePriv = new EddsaPrivateKey();
+ reservePriv.loadCrock(reserve.reserve_priv);
+ let reservePub = new EddsaPublicKey();
+ reservePub.loadCrock(reserve.reserve_pub);
+ let denomPub = RsaPublicKey.fromCrock(denom.denom_pub);
+ let coinPriv = EddsaPrivateKey.create();
+ let coinPub = coinPriv.getPublicKey();
+ let blindingFactor = RsaBlindingKey.create(1024);
+ let pubHash: HashCode = coinPub.hash();
+ let ev: ByteArray = rsaBlind(pubHash, blindingFactor, denomPub);
+
+ if (!denom.fee_withdraw) {
+ throw Error("Field fee_withdraw missing");
+ }
+
+ let amountWithFee = new Amount(denom.value);
+ amountWithFee.add(new Amount(denom.fee_withdraw));
+ let withdrawFee = new Amount(denom.fee_withdraw);
+
+ // Signature
+ let withdrawRequest = new WithdrawRequestPS({
+ reserve_pub: reservePub,
+ amount_with_fee: amountWithFee.toNbo(),
+ withdraw_fee: withdrawFee.toNbo(),
+ h_denomination_pub: denomPub.encode().hash(),
+ h_coin_envelope: ev.hash()
+ });
+
+ var sig = eddsaSign(withdrawRequest.toPurpose(), reservePriv);
+
+ let preCoin: PreCoin = {
+ reservePub: reservePub.toCrock(),
+ blindingKey: blindingFactor.toCrock(),
+ coinPub: coinPub.toCrock(),
+ coinPriv: coinPriv.toCrock(),
+ denomPub: denomPub.encode().toCrock(),
+ mintBaseUrl: reserve.mint_base_url,
+ withdrawSig: sig.toCrock(),
+ coinEv: ev.toCrock(),
+ coinValue: denom.value
+ };
+
+ return Query(this.db).put("precoins", preCoin).finish().then(() => preCoin);
+ }
+
+
+ withdrawExecute(pc: PreCoin): Promise<Coin> {
+ return Query(this.db)
+ .get("reserves", pc.reservePub)
+ .then((r) => {
+ let wd: any = {};
+ wd.denom_pub = pc.denomPub;
+ wd.reserve_pub = pc.reservePub;
+ wd.reserve_sig = pc.withdrawSig;
+ wd.coin_ev = pc.coinEv;
+ let reqUrl = URI("reserve/withdraw").absoluteTo(r.mint_base_url);
+ return this.http.postJson(reqUrl, wd);
+ })
+ .then(resp => {
+ if (resp.status != 200) {
+ throw new RequestException({
+ hint: "Withdrawal failed",
+ status: resp.status
+ });
+ }
+ let r = JSON.parse(resp.responseText);
+ let denomSig = rsaUnblind(RsaSignature.fromCrock(r.ev_sig),
+ RsaBlindingKey.fromCrock(pc.blindingKey),
+ RsaPublicKey.fromCrock(pc.denomPub));
+ let coin: Coin = {
+ coinPub: pc.coinPub,
+ coinPriv: pc.coinPriv,
+ denomPub: pc.denomPub,
+ denomSig: denomSig.encode().toCrock(),
+ currentAmount: pc.coinValue,
+ mintBaseUrl: pc.mintBaseUrl,
+ };
+ return coin;
+ });
+ }
+
+
+ updateBadge() {
+ function countNonEmpty(c, n) {
+ if (c.currentAmount.fraction != 0 || c.currentAmount.value != 0) {
+ return n + 1;
+ }
+ return n;
+ }
+
+ function doBadge(n) {
+ this.badge.setText(n.toString());
+ this.badge.setColor("#0F0");
+ }
+
+ Query(this.db)
+ .iter("coins")
+ .reduce(countNonEmpty, 0)
+ .then(doBadge.bind(this));
+ }
+
+ storeCoin(coin: Coin) {
+ Query(this.db)
+ .delete("precoins", coin.coinPub)
+ .add("coins", coin)
+ .finish()
+ .then(() => {
+ this.updateBadge();
+ });
+ }
+
+ withdraw(denom, reserve): Promise<void> {
+ return this.withdrawPrepare(denom, reserve)
+ .then((pc) => this.withdrawExecute(pc))
+ .then((c) => this.storeCoin(c));
+ }
+
+
+ /**
+ * Withdraw coins from a reserve until it is empty.
+ */
+ depleteReserve(reserve, mint): void {
+ let denoms = copy(mint.keys.denoms);
+ let remaining = new Amount(reserve.current_amount);
+ denoms.sort(rankDenom);
+ let workList = [];
+ for (let i = 0; i < 1000; i++) {
+ let found = false;
+ for (let d of denoms) {
+ let cost = new Amount(d.value);
+ cost.add(new Amount(d.fee_withdraw));
+ if (remaining.cmp(cost) < 0) {
+ continue;
+ }
+ found = true;
+ remaining.sub(cost);
+ workList.push(d);
+ }
+ if (!found) {
+ console.log("did not find coins for remaining ", remaining.toJson());
+ break;
+ }
+ }
+
+ // Do the request one by one.
+ let next = () => {
+ if (workList.length == 0) {
+ return;
+ }
+ let d = workList.pop();
+ this.withdraw(d, reserve)
+ .then(() => next());
+ };
+
+ // Asynchronous recursion
+ next();
+ }
+
+ updateReserve(reservePub: EddsaPublicKey,
+ mint): Promise<Reserve> {
+ let reservePubStr = reservePub.toCrock();
+ return Query(this.db)
+ .get("reserves", reservePubStr)
+ .then((reserve) => {
+ let reqUrl = URI("reserve/status").absoluteTo(mint.baseUrl);
+ reqUrl.query({'reserve_pub': reservePubStr});
+ return this.http.get(reqUrl).then(resp => {
+ if (resp.status != 200) {
+ throw Error();
+ }
+ let reserveInfo = JSON.parse(resp.responseText);
+ if (!reserveInfo) {
+ throw Error();
+ }
+ reserve.current_amount = reserveInfo.balance;
+ return Query(this.db)
+ .put("reserves", reserve)
+ .finish()
+ .then(() => reserve);
+ });
+ });
+ }
+
+ /**
+ * Update or add mint DB entry by fetching the /keys information.
+ * Optionally link the reserve entry to the new or existing
+ * mint entry in then DB.
+ */
+ updateMintFromUrl(baseUrl) {
+ let reqUrl = URI("keys").absoluteTo(baseUrl);
+ return this.http.get(reqUrl).then((resp) => {
+ if (resp.status != 200) {
+ throw Error("/keys request failed");
+ }
+ let mintKeysJson = JSON.parse(resp.responseText);
+ if (!mintKeysJson) {
+ throw new RequestException({url: reqUrl, hint: "keys invalid"});
+ }
+ let mint: Mint = {
+ baseUrl: baseUrl,
+ keys: mintKeysJson
+ };
+ return Query(this.db).put("mints", mint).finish().then(() => mint);
+ });
+ }
+
+
+ getBalances(): Promise<any> {
+ function collectBalances(c: Coin, byCurrency) {
+ let acc: AmountJson_interface = byCurrency[c.currentAmount.currency];
+ if (!acc) {
+ acc = Amount.getZero(c.currentAmount.currency).toJson();
+ }
+ let am = new Amount(c.currentAmount);
+ am.add(new Amount(acc));
+ byCurrency[c.currentAmount.currency] = am.toJson();
+ return byCurrency;
+ }
+
+ return Query(this.db)
+ .iter("coins")
+ .reduce(collectBalances, {});
+ }
+}
diff --git a/extension/lib/wallet/wxmessaging.js b/extension/lib/wallet/wxmessaging.js
new file mode 100644
index 000000000..c656f2632
--- /dev/null
+++ b/extension/lib/wallet/wxmessaging.js
@@ -0,0 +1,144 @@
+/*
+ This file is part of TALER
+ (C) 2016 GNUnet e.V.
+
+ TALER is free software; you can redistribute it and/or modify it under the
+ terms of the GNU General Public License as published by the Free Software
+ Foundation; either version 3, or (at your option) any later version.
+
+ TALER is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+ A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along with
+ TALER; see the file COPYING. If not, If not, see <http://www.gnu.org/licenses/>
+ */
+System.register(["./wallet", "./db", "./http"], function(exports_1) {
+ "use strict";
+ var wallet_1, db_1, db_2, db_3, http_1;
+ var ChromeBadge;
+ function makeHandlers(wallet) {
+ return (_a = {},
+ _a["balances"] = function (db, detail, sendResponse) {
+ wallet.getBalances().then(sendResponse);
+ return true;
+ },
+ _a["dump-db"] = function (db, detail, sendResponse) {
+ db_1.exportDb(db).then(sendResponse);
+ return true;
+ },
+ _a["reset"] = function (db, detail, sendResponse) {
+ var tx = db.transaction(db.objectStoreNames, 'readwrite');
+ for (var i = 0; i < db.objectStoreNames.length; i++) {
+ tx.objectStore(db.objectStoreNames[i]).clear();
+ }
+ db_2.deleteDb();
+ chrome.browserAction.setBadgeText({ text: "" });
+ console.log("reset done");
+ // Response is synchronous
+ return false;
+ },
+ _a["confirm-reserve"] = function (db, detail, sendResponse) {
+ // TODO: make it a checkable
+ var req = {
+ field_amount: detail.field_amount,
+ field_mint: detail.field_mint,
+ field_reserve_pub: detail.field_reserve_pub,
+ post_url: detail.post_url,
+ mint: detail.mint,
+ amount_str: detail.amount_str
+ };
+ wallet.confirmReserve(req)
+ .then(function (resp) {
+ if (resp.success) {
+ resp.backlink = chrome.extension.getURL("pages/reserve-success.html");
+ }
+ sendResponse(resp);
+ });
+ return true;
+ },
+ _a["confirm-pay"] = function (db, detail, sendResponse) {
+ wallet.confirmPay(detail.offer, detail.merchantPageUrl)
+ .then(function () {
+ sendResponse({ success: true });
+ })
+ .catch(function (e) {
+ sendResponse({ error: e.message });
+ });
+ return true;
+ },
+ _a["execute-payment"] = function (db, detail, sendResponse) {
+ wallet.doPayment(detail.H_contract)
+ .then(function (r) {
+ sendResponse({
+ success: true,
+ payUrl: r.payUrl,
+ payReq: r.payReq
+ });
+ })
+ .catch(function (e) {
+ sendResponse({ success: false, error: e.message });
+ });
+ // async sendResponse
+ return true;
+ },
+ _a
+ );
+ var _a;
+ }
+ function wxMain() {
+ chrome.browserAction.setBadgeText({ text: "" });
+ db_3.openTalerDb().then(function (db) {
+ var http = new http_1.BrowserHttpLib();
+ var badge = new ChromeBadge();
+ var wallet = new wallet_1.Wallet(db, http, badge);
+ var handlers = makeHandlers(wallet);
+ wallet.updateBadge();
+ chrome.runtime.onMessage.addListener(function (req, sender, onresponse) {
+ if (req.type in handlers) {
+ return handlers[req.type](db, req.detail, onresponse);
+ }
+ console.error(format("Request type {1} unknown, req {0}", JSON.stringify(req), req.type));
+ return false;
+ });
+ });
+ }
+ exports_1("wxMain", wxMain);
+ return {
+ setters:[
+ function (wallet_1_1) {
+ wallet_1 = wallet_1_1;
+ },
+ function (db_1_1) {
+ db_1 = db_1_1;
+ db_2 = db_1_1;
+ db_3 = db_1_1;
+ },
+ function (http_1_1) {
+ http_1 = http_1_1;
+ }],
+ execute: function() {
+ /**
+ * Messaging for the WebExtensions wallet. Should contain
+ * parts that are specific for WebExtensions, but as little business
+ * logic as possible.
+ * @module Messaging
+ * @author Florian Dold
+ */
+ "use strict";
+ ChromeBadge = (function () {
+ function ChromeBadge() {
+ }
+ ChromeBadge.prototype.setText = function (s) {
+ chrome.browserAction.setBadgeText({ text: s });
+ };
+ ChromeBadge.prototype.setColor = function (c) {
+ chrome.browserAction.setBadgeBackgroundColor({ color: c });
+ };
+ return ChromeBadge;
+ }());
+ wxMain();
+ }
+ }
+});
+//# sourceMappingURL=wxmessaging.js.map \ No newline at end of file
diff --git a/extension/lib/wallet/wxmessaging.ts b/extension/lib/wallet/wxmessaging.ts
new file mode 100644
index 000000000..1b345e22f
--- /dev/null
+++ b/extension/lib/wallet/wxmessaging.ts
@@ -0,0 +1,138 @@
+/*
+ This file is part of TALER
+ (C) 2016 GNUnet e.V.
+
+ TALER is free software; you can redistribute it and/or modify it under the
+ terms of the GNU General Public License as published by the Free Software
+ Foundation; either version 3, or (at your option) any later version.
+
+ TALER is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+ A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along with
+ TALER; see the file COPYING. If not, If not, see <http://www.gnu.org/licenses/>
+ */
+
+
+import {ConfirmReserveRequest} from "./types";
+import {Wallet} from "./wallet";
+import {exportDb} from "./db";
+import {deleteDb} from "./db";
+import {openTalerDb} from "./db";
+import {BrowserHttpLib} from "./http";
+import {Badge} from "./wallet";
+/**
+ * Messaging for the WebExtensions wallet. Should contain
+ * parts that are specific for WebExtensions, but as little business
+ * logic as possible.
+ * @module Messaging
+ * @author Florian Dold
+ */
+
+"use strict";
+
+function makeHandlers(wallet) {
+ return {
+ ["balances"]: function(db, detail, sendResponse) {
+ wallet.getBalances().then(sendResponse);
+ return true;
+ },
+ ["dump-db"]: function(db, detail, sendResponse) {
+ exportDb(db).then(sendResponse);
+ return true;
+ },
+ ["reset"]: function(db, detail, sendResponse) {
+ let tx = db.transaction(db.objectStoreNames, 'readwrite');
+ for (let i = 0; i < db.objectStoreNames.length; i++) {
+ tx.objectStore(db.objectStoreNames[i]).clear();
+ }
+ deleteDb();
+
+ chrome.browserAction.setBadgeText({text: ""});
+ console.log("reset done");
+ // Response is synchronous
+ return false;
+ },
+ ["confirm-reserve"]: function(db, detail, sendResponse) {
+ // TODO: make it a checkable
+ let req: ConfirmReserveRequest = {
+ field_amount: detail.field_amount,
+ field_mint: detail.field_mint,
+ field_reserve_pub: detail.field_reserve_pub,
+ post_url: detail.post_url,
+ mint: detail.mint,
+ amount_str: detail.amount_str
+ };
+ wallet.confirmReserve(req)
+ .then((resp) => {
+ if (resp.success) {
+ resp.backlink = chrome.extension.getURL(
+ "pages/reserve-success.html");
+ }
+ sendResponse(resp);
+ });
+ return true;
+ },
+ ["confirm-pay"]: function(db, detail, sendResponse) {
+ wallet.confirmPay(detail.offer, detail.merchantPageUrl)
+ .then(() => {
+ sendResponse({success: true})
+ })
+ .catch((e) => {
+ sendResponse({error: e.message});
+ });
+ return true;
+ },
+ ["execute-payment"]: function(db, detail, sendResponse) {
+ wallet.doPayment(detail.H_contract)
+ .then((r) => {
+ sendResponse({
+ success: true,
+ payUrl: r.payUrl,
+ payReq: r.payReq
+ });
+ })
+ .catch((e) => {
+ sendResponse({success: false, error: e.message});
+ });
+ // async sendResponse
+ return true;
+ }
+ };
+}
+
+class ChromeBadge implements Badge {
+ setText(s: string) {
+ chrome.browserAction.setBadgeText({text: s});
+ }
+
+ setColor(c: string) {
+ chrome.browserAction.setBadgeBackgroundColor({color: c});
+ }
+}
+
+
+export function wxMain() {
+ chrome.browserAction.setBadgeText({text: ""});
+
+ openTalerDb().then((db) => {
+ let http = new BrowserHttpLib();
+ let badge = new ChromeBadge();
+ let wallet = new Wallet(db, http, badge);
+ let handlers = makeHandlers(wallet);
+ wallet.updateBadge();
+ chrome.runtime.onMessage.addListener(
+ function(req, sender, onresponse) {
+ if (req.type in handlers) {
+ return handlers[req.type](db, req.detail, onresponse);
+ }
+ console.error(format("Request type {1} unknown, req {0}",
+ JSON.stringify(req),
+ req.type));
+ return false;
+ });
+ });
+}
+
+wxMain(); \ No newline at end of file