diff --git a/dist/dsteem.d.ts b/dist/dsteem.d.ts index 54af3bd..71f3200 100644 --- a/dist/dsteem.d.ts +++ b/dist/dsteem.d.ts @@ -4,6 +4,40 @@ declare module 'dsteem/version' { } declare module 'dsteem/steem/asset' { + /** + * @file Steem asset type definitions and helpers. + * @author Johan Nordberg + * @license + * Copyright (c) 2017 Johan Nordberg. All Rights Reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistribution of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistribution in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its contributors + * may be used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + * + * You acknowledge that this software is not designed, licensed or intended for use + * in the design, construction, operation or maintenance of any military facility. + */ /** * Asset symbol string. */ @@ -105,7 +139,6 @@ declare module 'dsteem/steem/asset' { } declare module 'dsteem/steem/misc' { - /// /** * @file Misc steem type definitions. * @author Johan Nordberg @@ -140,6 +173,7 @@ declare module 'dsteem/steem/misc' { * You acknowledge that this software is not designed, licensed or intended for use * in the design, construction, operation or maintenance of any military facility. */ + /// import { Asset, Price } from 'dsteem/steem/asset'; /** * Large number that may be unsafe to represent natively in JavaScript. @@ -319,7 +353,6 @@ declare module 'dsteem/steem/misc' { } declare module 'dsteem/steem/serializer' { - /// /** * @file Steem protocol serialization. * @author Johan Nordberg @@ -354,43 +387,41 @@ declare module 'dsteem/steem/serializer' { * You acknowledge that this software is not designed, licensed or intended for use * in the design, construction, operation or maintenance of any military facility. */ + /// import * as ByteBuffer from 'bytebuffer'; import { PublicKey } from 'dsteem/crypto'; import { Asset } from 'dsteem/steem/asset'; import { HexBuffer } from 'dsteem/steem/misc'; import { Operation } from 'dsteem/steem/operation'; - export interface SerializerOptions { - addressPrefix: string; - } - export type Serializer = (buffer: ByteBuffer, data: any, options: SerializerOptions) => void; + export type Serializer = (buffer: ByteBuffer, data: any) => void; export const Types: { - Array: (itemSerializer: Serializer) => (buffer: ByteBuffer, data: any[], options: SerializerOptions) => void; + Array: (itemSerializer: Serializer) => (buffer: ByteBuffer, data: any[]) => void; Asset: (buffer: ByteBuffer, data: string | number | Asset) => void; Authority: (buffer: ByteBuffer, data: { [key: string]: any; - }, options: SerializerOptions) => void; + }) => void; Binary: (size?: number | undefined) => (buffer: ByteBuffer, data: HexBuffer | Buffer) => void; Boolean: (buffer: ByteBuffer, data: boolean) => void; Date: (buffer: ByteBuffer, data: string) => void; - FlatMap: (keySerializer: Serializer, valueSerializer: Serializer) => (buffer: ByteBuffer, data: [any, any][], options: SerializerOptions) => void; + FlatMap: (keySerializer: Serializer, valueSerializer: Serializer) => (buffer: ByteBuffer, data: [any, any][]) => void; Int16: (buffer: ByteBuffer, data: number) => void; Int32: (buffer: ByteBuffer, data: number) => void; Int64: (buffer: ByteBuffer, data: number) => void; Int8: (buffer: ByteBuffer, data: number) => void; Object: (keySerializers: [string, Serializer][]) => (buffer: ByteBuffer, data: { [key: string]: any; - }, options: SerializerOptions) => void; - Operation: (buffer: ByteBuffer, operation: Operation, options: SerializerOptions) => void; - Optional: (valueSerializer: Serializer) => (buffer: ByteBuffer, data: any, options: SerializerOptions) => void; + }) => void; + Operation: (buffer: ByteBuffer, operation: Operation) => void; + Optional: (valueSerializer: Serializer) => (buffer: ByteBuffer, data: any) => void; Price: (buffer: ByteBuffer, data: { [key: string]: any; - }, options: SerializerOptions) => void; - PublicKey: (buffer: ByteBuffer, data: string | Buffer | PublicKey, options: SerializerOptions) => void; - StaticVariant: (itemSerializers: Serializer[]) => (buffer: ByteBuffer, data: [number, any], options: SerializerOptions) => void; + }) => void; + PublicKey: (buffer: ByteBuffer, data: string | PublicKey) => void; + StaticVariant: (itemSerializers: Serializer[]) => (buffer: ByteBuffer, data: [number, any]) => void; String: (buffer: ByteBuffer, data: string) => void; Transaction: (buffer: ByteBuffer, data: { [key: string]: any; - }, options: SerializerOptions) => void; + }) => void; UInt16: (buffer: ByteBuffer, data: number) => void; UInt32: (buffer: ByteBuffer, data: number) => void; UInt64: (buffer: ByteBuffer, data: number) => void; @@ -400,7 +431,6 @@ declare module 'dsteem/steem/serializer' { } declare module 'dsteem/utils' { - /// /** * @file Misc utility functions. * @author Johan Nordberg @@ -435,6 +465,7 @@ declare module 'dsteem/utils' { * You acknowledge that this software is not designed, licensed or intended for use * in the design, construction, operation or maintenance of any military facility. */ + /// import { EventEmitter } from 'events'; /** * Return a promise that will resove when a specific event is emitted. @@ -459,12 +490,46 @@ declare module 'dsteem/utils' { } declare module 'dsteem/crypto' { + /** + * @file Steem crypto helpers. + * @author Johan Nordberg + * @license + * Copyright (c) 2017 Johan Nordberg. All Rights Reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistribution of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistribution in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its contributors + * may be used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + * + * You acknowledge that this software is not designed, licensed or intended for use + * in the design, construction, operation or maintenance of any military facility. + */ /// import { SignedTransaction, Transaction } from 'dsteem/steem/transaction'; /** * Network id used in WIF-encoding. */ - export const NETWORK_ID: Buffer; + export const NETWORK_ID: Buffer; function ripemd160(input: Buffer | string): Buffer; function sha256(input: Buffer | string): Buffer; function doubleSha256(input: Buffer | string): Buffer; function encodePublic(key: Buffer, prefix: string): string; function encodePrivate(key: Buffer): string; function decodePrivate(encodedKey: string): Buffer; function isCanonicalSignature(signature: Buffer): boolean; /** * ECDSA (secp256k1) public key. */ @@ -474,11 +539,11 @@ declare module 'dsteem/crypto' { /** * Create a new instance from a WIF-encoded key. */ - static fromString(wif: string, prefix?: string): PublicKey; + static fromString(wif: string): PublicKey; /** * Create a new instance. */ - static from(value: string | PublicKey | Buffer, prefix?: string): PublicKey; + static from(value: string | PublicKey): PublicKey; constructor(key: Buffer, prefix?: string); /** * Verify a 32-byte signature. @@ -557,24 +622,57 @@ declare module 'dsteem/crypto' { recover(message: Buffer, prefix?: string): PublicKey; toBuffer(): Buffer; toString(): string; - } + } function transactionDigest(transaction: Transaction | SignedTransaction, chainId?: Buffer): Buffer; function signTransaction(transaction: Transaction, keys: PrivateKey | PrivateKey[], chainId?: Buffer): SignedTransaction; /** Misc crypto utility functions. */ export const cryptoUtils: { - decodePrivate: (encodedKey: string) => Buffer; - doubleSha256: (input: string | Buffer) => Buffer; - encodePrivate: (key: Buffer) => string; - encodePublic: (key: Buffer, prefix: string) => string; - isCanonicalSignature: (signature: Buffer) => boolean; - ripemd160: (input: string | Buffer) => Buffer; - sha256: (input: string | Buffer) => Buffer; - signTransaction: (transaction: Transaction, keys: PrivateKey | PrivateKey[], options: { - chainId: Buffer; - addressPrefix: string; - }) => SignedTransaction; + decodePrivate: typeof decodePrivate; + doubleSha256: typeof doubleSha256; + encodePrivate: typeof encodePrivate; + encodePublic: typeof encodePublic; + isCanonicalSignature: typeof isCanonicalSignature; + ripemd160: typeof ripemd160; + sha256: typeof sha256; + signTransaction: typeof signTransaction; + transactionDigest: typeof transactionDigest; }; + export {}; } declare module 'dsteem/steem/account' { + /** + * @file Steem account type definitions. + * @author Johan Nordberg + * @license + * Copyright (c) 2017 Johan Nordberg. All Rights Reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistribution of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistribution in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its contributors + * may be used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + * + * You acknowledge that this software is not designed, licensed or intended for use + * in the design, construction, operation or maintenance of any military facility. + */ import { PublicKey } from 'dsteem/crypto'; import { Asset } from 'dsteem/steem/asset'; export interface AuthorityType { @@ -590,7 +688,7 @@ declare module 'dsteem/steem/account' { weight_threshold: number; account_auths: Array<[string, number]>; key_auths: Array<[string | PublicKey, number]>; - constructor({weight_threshold, account_auths, key_auths}: AuthorityType); + constructor({ weight_threshold, account_auths, key_auths }: AuthorityType); } export interface Account { id: number; @@ -779,7 +877,6 @@ declare module 'dsteem/steem/comment' { } declare module 'dsteem/steem/operation' { - /// /** * @file Steem operation type definitions. * @author Johan Nordberg @@ -814,6 +911,7 @@ declare module 'dsteem/steem/operation' { * You acknowledge that this software is not designed, licensed or intended for use * in the design, construction, operation or maintenance of any military facility. */ + /// import { PublicKey } from 'dsteem/crypto'; import { AuthorityType } from 'dsteem/steem/account'; import { Asset, Price } from 'dsteem/steem/asset'; @@ -1671,7 +1769,6 @@ declare module 'dsteem/steem/block' { } declare module 'dsteem/helpers/blockchain' { - /// /** * @file Steem blockchain helpers. * @author Johan Nordberg @@ -1706,6 +1803,7 @@ declare module 'dsteem/helpers/blockchain' { * You acknowledge that this software is not designed, licensed or intended for use * in the design, construction, operation or maintenance of any military facility. */ + /// import { Client } from 'dsteem/client'; import { BlockHeader, SignedBlock } from 'dsteem/steem/block'; import { AppliedOperation } from 'dsteem/steem/operation'; @@ -1717,7 +1815,7 @@ declare module 'dsteem/helpers/blockchain' { /** * Get all blocks. */ - Latest = 1, + Latest = 1 } export interface BlockchainStreamOptions { /** @@ -1778,6 +1876,40 @@ declare module 'dsteem/helpers/blockchain' { } declare module 'dsteem/helpers/broadcast' { + /** + * @file Broadcast API helpers. + * @author Johan Nordberg + * @license + * Copyright (c) 2017 Johan Nordberg. All Rights Reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistribution of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistribution in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its contributors + * may be used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + * + * You acknowledge that this software is not designed, licensed or intended for use + * in the design, construction, operation or maintenance of any military facility. + */ import { Client } from 'dsteem/client'; import { PrivateKey, PublicKey } from 'dsteem/crypto'; import { AuthorityType } from 'dsteem/steem/account'; @@ -2067,6 +2199,40 @@ declare module 'dsteem/helpers/database' { } declare module 'dsteem/client' { + /** + * @file Steem RPC client implementation. + * @author Johan Nordberg + * @license + * Copyright (c) 2017 Johan Nordberg. All Rights Reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistribution of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistribution in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its contributors + * may be used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + * + * You acknowledge that this software is not designed, licensed or intended for use + * in the design, construction, operation or maintenance of any military facility. + */ /// import { Blockchain } from 'dsteem/helpers/blockchain'; import { BroadcastAPI } from 'dsteem/helpers/broadcast'; @@ -2227,6 +2393,40 @@ declare module 'dsteem' { } declare module 'dsteem/index-browser' { + /** + * @file dsteem entry point for browsers. + * @author Johan Nordberg + * @license + * Copyright (c) 2017 Johan Nordberg. All Rights Reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistribution of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistribution in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its contributors + * may be used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + * + * You acknowledge that this software is not designed, licensed or intended for use + * in the design, construction, operation or maintenance of any military facility. + */ import 'core-js/es6/map'; import 'core-js/es6/number'; import 'core-js/es6/promise'; diff --git a/dist/dsteem.js b/dist/dsteem.js index d92ffd7..0cd0b7f 100644 --- a/dist/dsteem.js +++ b/dist/dsteem.js @@ -1,2 +1,2 @@ -!function(f){"object"==typeof exports&&"undefined"!=typeof module?module.exports=f():"function"==typeof define&&define.amd?define([],f):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).dsteem=f()}(function(){var define,module,exports;return function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a="function"==typeof require&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){return s(t[o][1][e]||e)},l,l.exports,e,t,n,r)}return n[o].exports}for(var i="function"==typeof require&&require,o=0;o>6],primitive=0==(32&tag);if(31==(31&tag)){var oct=tag;for(tag=0;128==(128&oct);){if(oct=buf.readUInt8(fail),buf.isError(oct))return oct;tag<<=7,tag|=127&oct}}else tag&=31;return{cls:cls,primitive:primitive,tag:tag,tagStr:der.tag[tag]}}function derDecodeLen(buf,primitive,fail){var len=buf.readUInt8(fail);if(buf.isError(len))return len;if(!primitive&&128===len)return null;if(0==(128&len))return len;var num=127&len;if(num>4)return buf.error("length octect is too long");len=0;for(var i=0;i=31?reporter.error("Multi-octet tag encoding unsupported"):(primitive||(res|=32),res|der.tagClassByName[cls||"universal"]<<6)}(tag,primitive,cls,this.reporter);if(content.length<128)return(header=new Buffer(2))[0]=encodedTag,header[1]=content.length,this._createEncoderBuffer([header,content]);for(var lenOctets=1,i=content.length;i>=256;i>>=8)lenOctets++;(header=new Buffer(2+lenOctets))[0]=encodedTag,header[1]=128|lenOctets,i=1+lenOctets;for(var j=content.length;j>0;i--,j>>=8)header[i]=255&j;return this._createEncoderBuffer([header,content])},DERNode.prototype._encodeStr=function(str,tag){if("bitstr"===tag)return this._createEncoderBuffer([0|str.unused,str.data]);if("bmpstr"===tag){for(var buf=new Buffer(2*str.length),i=0;i=40)return this.reporter.error("Second objid identifier OOB");id.splice(0,2,40*id[0]+id[1])}var size=0;for(i=0;i=128;ident>>=7)size++}var objid=new Buffer(size),offset=objid.length-1;for(i=id.length-1;i>=0;i--)for(ident=id[i],objid[offset--]=127&ident;(ident>>=7)>0;)objid[offset--]=128|127&ident;return this._createEncoderBuffer(objid)},DERNode.prototype._encodeTime=function(time,tag){var str,date=new Date(time);return"gentime"===tag?str=[two(date.getFullYear()),two(date.getUTCMonth()+1),two(date.getUTCDate()),two(date.getUTCHours()),two(date.getUTCMinutes()),two(date.getUTCSeconds()),"Z"].join(""):"utctime"===tag?str=[two(date.getFullYear()%100),two(date.getUTCMonth()+1),two(date.getUTCDate()),two(date.getUTCHours()),two(date.getUTCMinutes()),two(date.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+tag+" time is not supported yet"),this._encodeStr(str,"octstr")},DERNode.prototype._encodeNull=function(){return this._createEncoderBuffer("")},DERNode.prototype._encodeInt=function(num,values){if("string"==typeof num){if(!values)return this.reporter.error("String int or enum given, but no values map");if(!values.hasOwnProperty(num))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(num));num=values[num]}if("number"!=typeof num&&!Buffer.isBuffer(num)){var numArray=num.toArray();!num.sign&&128&numArray[0]&&numArray.unshift(0),num=new Buffer(numArray)}if(Buffer.isBuffer(num)){var size=num.length;0===num.length&&size++;var out=new Buffer(size);return num.copy(out),0===num.length&&(out[0]=0),this._createEncoderBuffer(out)}if(num<128)return this._createEncoderBuffer(num);if(num<256)return this._createEncoderBuffer([0,num]);size=1;for(var i=num;i>=256;i>>=8)size++;for(i=(out=new Array(size)).length-1;i>=0;i--)out[i]=255&num,num>>=8;return 128&out[0]&&out.unshift(0),this._createEncoderBuffer(new Buffer(out))},DERNode.prototype._encodeBool=function(value){return this._createEncoderBuffer(value?255:0)},DERNode.prototype._use=function(entity,obj){return"function"==typeof entity&&(entity=entity(obj)),entity._getEncoder("der").tree},DERNode.prototype._skipDefault=function(dataBuffer,reporter,parent){var i,state=this._baseState;if(null===state.default)return!1;var data=dataBuffer.join();if(void 0===state.defaultBuffer&&(state.defaultBuffer=this._encodeValue(state.default,reporter,parent).join()),data.length!==state.defaultBuffer.length)return!1;for(i=0;i=0;i--)if(ka[i]!==kb[i])return!1;for(i=ka.length-1;i>=0;i--)if(!_deepEqual(a[key=ka[i]],b[key],strict,actualVisitedObjects))return!1;return!0}(actual,expected,strict,memos))}return strict?actual===expected:actual==expected}function isArguments(object){return"[object Arguments]"==Object.prototype.toString.call(object)}function expectedException(actual,expected){if(!actual||!expected)return!1;if("[object RegExp]"==Object.prototype.toString.call(expected))return expected.test(actual);try{if(actual instanceof expected)return!0}catch(e){}return!Error.isPrototypeOf(expected)&&!0===expected.call({},actual)}function _throws(shouldThrow,block,expected,message){var actual;if("function"!=typeof block)throw new TypeError('"block" argument must be a function');"string"==typeof expected&&(message=expected,expected=null),actual=function(block){var error;try{block()}catch(e){error=e}return error}(block),message=(expected&&expected.name?" ("+expected.name+").":".")+(message?" "+message:"."),shouldThrow&&!actual&&fail(actual,expected,"Missing expected exception"+message);var userProvidedMessage="string"==typeof message,isUnwantedException=!shouldThrow&&util.isError(actual),isUnexpectedException=!shouldThrow&&actual&&!expected;if((isUnwantedException&&userProvidedMessage&&expectedException(actual,expected)||isUnexpectedException)&&fail(actual,expected,"Got unwanted exception"+message),shouldThrow&&actual&&expected&&!expectedException(actual,expected)||!shouldThrow&&actual)throw actual}assert.AssertionError=function(options){var self;this.name="AssertionError",this.actual=options.actual,this.expected=options.expected,this.operator=options.operator,options.message?(this.message=options.message,this.generatedMessage=!1):(this.message=truncate(inspect((self=this).actual),128)+" "+self.operator+" "+truncate(inspect(self.expected),128),this.generatedMessage=!0);var stackStartFunction=options.stackStartFunction||fail;if(Error.captureStackTrace)Error.captureStackTrace(this,stackStartFunction);else{var err=new Error;if(err.stack){var out=err.stack,fn_name=getName(stackStartFunction),idx=out.indexOf("\n"+fn_name);if(idx>=0){var next_line=out.indexOf("\n",idx+1);out=out.substring(next_line+1)}this.stack=out}}},util.inherits(assert.AssertionError,Error),assert.fail=fail,assert.ok=ok,assert.equal=function(actual,expected,message){actual!=expected&&fail(actual,expected,message,"==",assert.equal)},assert.notEqual=function(actual,expected,message){actual==expected&&fail(actual,expected,message,"!=",assert.notEqual)},assert.deepEqual=function(actual,expected,message){_deepEqual(actual,expected,!1)||fail(actual,expected,message,"deepEqual",assert.deepEqual)},assert.deepStrictEqual=function(actual,expected,message){_deepEqual(actual,expected,!0)||fail(actual,expected,message,"deepStrictEqual",assert.deepStrictEqual)},assert.notDeepEqual=function(actual,expected,message){_deepEqual(actual,expected,!1)&&fail(actual,expected,message,"notDeepEqual",assert.notDeepEqual)},assert.notDeepStrictEqual=function notDeepStrictEqual(actual,expected,message){_deepEqual(actual,expected,!0)&&fail(actual,expected,message,"notDeepStrictEqual",notDeepStrictEqual)},assert.strictEqual=function(actual,expected,message){actual!==expected&&fail(actual,expected,message,"===",assert.strictEqual)},assert.notStrictEqual=function(actual,expected,message){actual===expected&&fail(actual,expected,message,"!==",assert.notStrictEqual)},assert.throws=function(block,error,message){_throws(!0,block,error,message)},assert.doesNotThrow=function(block,error,message){_throws(!1,block,error,message)},assert.ifError=function(err){if(err)throw err};var objectKeys=Object.keys||function(obj){var keys=[];for(var key in obj)hasOwn.call(obj,key)&&keys.push(key);return keys}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"util/":"/Users/jnordberg/Development/dsteem/node_modules/util/util.js"}],"/Users/jnordberg/Development/dsteem/node_modules/base-x/index.js":[function(_dereq_,module,exports){var Buffer=_dereq_("safe-buffer").Buffer;module.exports=function(ALPHABET){for(var ALPHABET_MAP={},BASE=ALPHABET.length,LEADER=ALPHABET.charAt(0),z=0;z>=8;for(;carry>0;)bytes.push(255&carry),carry>>=8}for(var k=0;string[k]===LEADER&&k0;)digits.push(carry%BASE),carry=carry/BASE|0}for(var string="",k=0;0===source[k]&&k=0;--q)string+=ALPHABET[digits[q]];return string},decodeUnsafe:decodeUnsafe,decode:function(string){var buffer=decodeUnsafe(string);if(buffer)return buffer;throw new Error("Non-base"+BASE+" character")}}}},{"safe-buffer":"/Users/jnordberg/Development/dsteem/node_modules/safe-buffer/index.js"}],"/Users/jnordberg/Development/dsteem/node_modules/base64-js/index.js":[function(_dereq_,module,exports){"use strict";exports.byteLength=function(b64){return 3*b64.length/4-placeHoldersCount(b64)},exports.toByteArray=function(b64){var i,l,tmp,placeHolders,arr,len=b64.length;placeHolders=placeHoldersCount(b64),arr=new Arr(3*len/4-placeHolders),l=placeHolders>0?len-4:len;var L=0;for(i=0;i>16&255,arr[L++]=tmp>>8&255,arr[L++]=255&tmp;return 2===placeHolders?(tmp=revLookup[b64.charCodeAt(i)]<<2|revLookup[b64.charCodeAt(i+1)]>>4,arr[L++]=255&tmp):1===placeHolders&&(tmp=revLookup[b64.charCodeAt(i)]<<10|revLookup[b64.charCodeAt(i+1)]<<4|revLookup[b64.charCodeAt(i+2)]>>2,arr[L++]=tmp>>8&255,arr[L++]=255&tmp),arr},exports.fromByteArray=function(uint8){for(var tmp,len=uint8.length,extraBytes=len%3,output="",parts=[],i=0,len2=len-extraBytes;ilen2?len2:i+16383));return 1===extraBytes?(tmp=uint8[len-1],output+=lookup[tmp>>2],output+=lookup[tmp<<4&63],output+="=="):2===extraBytes&&(tmp=(uint8[len-2]<<8)+uint8[len-1],output+=lookup[tmp>>10],output+=lookup[tmp>>4&63],output+=lookup[tmp<<2&63],output+="="),parts.push(output),parts.join("")};for(var lookup=[],revLookup=[],Arr="undefined"!=typeof Uint8Array?Uint8Array:Array,code="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=0,len=code.length;i0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===b64[len-2]?2:"="===b64[len-1]?1:0}function encodeChunk(uint8,start,end){for(var tmp,num,output=[],i=start;i>18&63]+lookup[num>>12&63]+lookup[num>>6&63]+lookup[63&num]);return output.join("")}revLookup["-".charCodeAt(0)]=62,revLookup["_".charCodeAt(0)]=63},{}],"/Users/jnordberg/Development/dsteem/node_modules/bip66/index.js":[function(_dereq_,module,exports){var Buffer=_dereq_("safe-buffer").Buffer;module.exports={check:function(buffer){if(buffer.length<8)return!1;if(buffer.length>72)return!1;if(48!==buffer[0])return!1;if(buffer[1]!==buffer.length-2)return!1;if(2!==buffer[2])return!1;var lenR=buffer[3];if(0===lenR)return!1;if(5+lenR>=buffer.length)return!1;if(2!==buffer[4+lenR])return!1;var lenS=buffer[5+lenR];return!(0===lenS||6+lenR+lenS!==buffer.length||128&buffer[4]||lenR>1&&0===buffer[4]&&!(128&buffer[5])||128&buffer[lenR+6]||lenS>1&&0===buffer[lenR+6]&&!(128&buffer[lenR+7]))},decode:function(buffer){if(buffer.length<8)throw new Error("DER sequence length is too short");if(buffer.length>72)throw new Error("DER sequence length is too long");if(48!==buffer[0])throw new Error("Expected DER sequence");if(buffer[1]!==buffer.length-2)throw new Error("DER sequence length is invalid");if(2!==buffer[2])throw new Error("Expected DER integer");var lenR=buffer[3];if(0===lenR)throw new Error("R length is zero");if(5+lenR>=buffer.length)throw new Error("R length is too long");if(2!==buffer[4+lenR])throw new Error("Expected DER integer (2)");var lenS=buffer[5+lenR];if(0===lenS)throw new Error("S length is zero");if(6+lenR+lenS!==buffer.length)throw new Error("S length is invalid");if(128&buffer[4])throw new Error("R value is negative");if(lenR>1&&0===buffer[4]&&!(128&buffer[5]))throw new Error("R value excessively padded");if(128&buffer[lenR+6])throw new Error("S value is negative");if(lenS>1&&0===buffer[lenR+6]&&!(128&buffer[lenR+7]))throw new Error("S value excessively padded");return{r:buffer.slice(4,4+lenR),s:buffer.slice(6+lenR)}},encode:function(r,s){var lenR=r.length,lenS=s.length;if(0===lenR)throw new Error("R length is zero");if(0===lenS)throw new Error("S length is zero");if(lenR>33)throw new Error("R length is too long");if(lenS>33)throw new Error("S length is too long");if(128&r[0])throw new Error("R value is negative");if(128&s[0])throw new Error("S value is negative");if(lenR>1&&0===r[0]&&!(128&r[1]))throw new Error("R value excessively padded");if(lenS>1&&0===s[0]&&!(128&s[1]))throw new Error("S value excessively padded");var signature=Buffer.allocUnsafe(6+lenR+lenS);return signature[0]=48,signature[1]=signature.length-2,signature[2]=2,signature[3]=r.length,r.copy(signature,4),signature[4+lenR]=2,signature[5+lenR]=s.length,s.copy(signature,6+lenR),signature}}},{"safe-buffer":"/Users/jnordberg/Development/dsteem/node_modules/safe-buffer/index.js"}],"/Users/jnordberg/Development/dsteem/node_modules/bn.js/lib/bn.js":[function(_dereq_,module,exports){!function(module,exports){"use strict";function assert(val,msg){if(!val)throw new Error(msg||"Assertion failed")}function inherits(ctor,superCtor){ctor.super_=superCtor;var TempCtor=function(){};TempCtor.prototype=superCtor.prototype,ctor.prototype=new TempCtor,ctor.prototype.constructor=ctor}function BN(number,base,endian){if(BN.isBN(number))return number;this.negative=0,this.words=null,this.length=0,this.red=null,null!==number&&("le"!==base&&"be"!==base||(endian=base,base=10),this._init(number||0,base||10,endian||"be"))}var Buffer;"object"==typeof module?module.exports=BN:exports.BN=BN,BN.BN=BN,BN.wordSize=26;try{Buffer=_dereq_("buffer").Buffer}catch(e){}function parseHex(str,start,end){for(var r=0,len=Math.min(str.length,end),i=start;i=49&&c<=54?c-49+10:c>=17&&c<=22?c-17+10:15&c}return r}function parseBase(str,start,end,mul){for(var r=0,len=Math.min(str.length,end),i=start;i=49?c-49+10:c>=17?c-17+10:c}return r}BN.isBN=function(num){return num instanceof BN||null!==num&&"object"==typeof num&&num.constructor.wordSize===BN.wordSize&&Array.isArray(num.words)},BN.max=function(left,right){return left.cmp(right)>0?left:right},BN.min=function(left,right){return left.cmp(right)<0?left:right},BN.prototype._init=function(number,base,endian){if("number"==typeof number)return this._initNumber(number,base,endian);if("object"==typeof number)return this._initArray(number,base,endian);"hex"===base&&(base=16),assert(base===(0|base)&&base>=2&&base<=36);var start=0;"-"===(number=number.toString().replace(/\s+/g,""))[0]&&start++,16===base?this._parseHex(number,start):this._parseBase(number,base,start),"-"===number[0]&&(this.negative=1),this.strip(),"le"===endian&&this._initArray(this.toArray(),base,endian)},BN.prototype._initNumber=function(number,base,endian){number<0&&(this.negative=1,number=-number),number<67108864?(this.words=[67108863&number],this.length=1):number<4503599627370496?(this.words=[67108863&number,number/67108864&67108863],this.length=2):(assert(number<9007199254740992),this.words=[67108863&number,number/67108864&67108863,1],this.length=3),"le"===endian&&this._initArray(this.toArray(),base,endian)},BN.prototype._initArray=function(number,base,endian){if(assert("number"==typeof number.length),number.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(number.length/3),this.words=new Array(this.length);for(var i=0;i=0;i-=3)w=number[i]|number[i-1]<<8|number[i-2]<<16,this.words[j]|=w<>>26-off&67108863,(off+=24)>=26&&(off-=26,j++);else if("le"===endian)for(i=0,j=0;i>>26-off&67108863,(off+=24)>=26&&(off-=26,j++);return this.strip()},BN.prototype._parseHex=function(number,start){this.length=Math.ceil((number.length-start)/6),this.words=new Array(this.length);for(var i=0;i=start;i-=6)w=parseHex(number,i,i+6),this.words[j]|=w<>>26-off&4194303,(off+=24)>=26&&(off-=26,j++);i+6!==start&&(w=parseHex(number,start,i+6),this.words[j]|=w<>>26-off&4194303),this.strip()},BN.prototype._parseBase=function(number,base,start){this.words=[0],this.length=1;for(var limbLen=0,limbPow=1;limbPow<=67108863;limbPow*=base)limbLen++;limbLen--,limbPow=limbPow/base|0;for(var total=number.length-start,mod=total%limbLen,end=Math.min(total,total-mod)+start,word=0,i=start;i1&&0===this.words[this.length-1];)this.length--;return this._normSign()},BN.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},BN.prototype.inspect=function(){return(this.red?""};var zeros=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],groupSizes=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],groupBases=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function smallMulTo(self,num,out){out.negative=num.negative^self.negative;var len=self.length+num.length|0;out.length=len,len=len-1|0;var a=0|self.words[0],b=0|num.words[0],r=a*b,lo=67108863&r,carry=r/67108864|0;out.words[0]=lo;for(var k=1;k>>26,rword=67108863&carry,maxJ=Math.min(k,num.length-1),j=Math.max(0,k-self.length+1);j<=maxJ;j++){var i=k-j|0;ncarry+=(r=(a=0|self.words[i])*(b=0|num.words[j])+rword)/67108864|0,rword=67108863&r}out.words[k]=0|rword,carry=0|ncarry}return 0!==carry?out.words[k]=0|carry:out.length--,out.strip()}BN.prototype.toString=function(base,padding){var out;if(base=base||10,padding=0|padding||1,16===base||"hex"===base){out="";for(var off=0,carry=0,i=0;i>>24-off&16777215)||i!==this.length-1?zeros[6-word.length]+word+out:word+out,(off+=2)>=26&&(off-=26,i--)}for(0!==carry&&(out=carry.toString(16)+out);out.length%padding!=0;)out="0"+out;return 0!==this.negative&&(out="-"+out),out}if(base===(0|base)&&base>=2&&base<=36){var groupSize=groupSizes[base],groupBase=groupBases[base];out="";var c=this.clone();for(c.negative=0;!c.isZero();){var r=c.modn(groupBase).toString(base);out=(c=c.idivn(groupBase)).isZero()?r+out:zeros[groupSize-r.length]+r+out}for(this.isZero()&&(out="0"+out);out.length%padding!=0;)out="0"+out;return 0!==this.negative&&(out="-"+out),out}assert(!1,"Base should be between 2 and 36")},BN.prototype.toNumber=function(){var ret=this.words[0];return 2===this.length?ret+=67108864*this.words[1]:3===this.length&&1===this.words[2]?ret+=4503599627370496+67108864*this.words[1]:this.length>2&&assert(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-ret:ret},BN.prototype.toJSON=function(){return this.toString(16)},BN.prototype.toBuffer=function(endian,length){return assert(void 0!==Buffer),this.toArrayLike(Buffer,endian,length)},BN.prototype.toArray=function(endian,length){return this.toArrayLike(Array,endian,length)},BN.prototype.toArrayLike=function(ArrayType,endian,length){var byteLength=this.byteLength(),reqLength=length||Math.max(1,byteLength);assert(byteLength<=reqLength,"byte array longer than desired length"),assert(reqLength>0,"Requested array length <= 0"),this.strip();var b,i,littleEndian="le"===endian,res=new ArrayType(reqLength),q=this.clone();if(littleEndian){for(i=0;!q.isZero();i++)b=q.andln(255),q.iushrn(8),res[i]=b;for(;i=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},BN.prototype._zeroBits=function(w){if(0===w)return 26;var t=w,r=0;return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r},BN.prototype.bitLength=function(){var w=this.words[this.length-1],hi=this._countBits(w);return 26*(this.length-1)+hi},BN.prototype.zeroBits=function(){if(this.isZero())return 0;for(var r=0,i=0;inum.length?this.clone().ior(num):num.clone().ior(this)},BN.prototype.uor=function(num){return this.length>num.length?this.clone().iuor(num):num.clone().iuor(this)},BN.prototype.iuand=function(num){var b;b=this.length>num.length?num:this;for(var i=0;inum.length?this.clone().iand(num):num.clone().iand(this)},BN.prototype.uand=function(num){return this.length>num.length?this.clone().iuand(num):num.clone().iuand(this)},BN.prototype.iuxor=function(num){var a,b;this.length>num.length?(a=this,b=num):(a=num,b=this);for(var i=0;inum.length?this.clone().ixor(num):num.clone().ixor(this)},BN.prototype.uxor=function(num){return this.length>num.length?this.clone().iuxor(num):num.clone().iuxor(this)},BN.prototype.inotn=function(width){assert("number"==typeof width&&width>=0);var bytesNeeded=0|Math.ceil(width/26),bitsLeft=width%26;this._expand(bytesNeeded),bitsLeft>0&&bytesNeeded--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-bitsLeft),this.strip()},BN.prototype.notn=function(width){return this.clone().inotn(width)},BN.prototype.setn=function(bit,val){assert("number"==typeof bit&&bit>=0);var off=bit/26|0,wbit=bit%26;return this._expand(off+1),this.words[off]=val?this.words[off]|1<num.length?(a=this,b=num):(a=num,b=this);for(var carry=0,i=0;i>>26;for(;0!==carry&&i>>26;if(this.length=a.length,0!==carry)this.words[this.length]=carry,this.length++;else if(a!==this)for(;inum.length?this.clone().iadd(num):num.clone().iadd(this)},BN.prototype.isub=function(num){if(0!==num.negative){num.negative=0;var r=this.iadd(num);return num.negative=1,r._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(num),this.negative=1,this._normSign();var a,b,cmp=this.cmp(num);if(0===cmp)return this.negative=0,this.length=1,this.words[0]=0,this;cmp>0?(a=this,b=num):(a=num,b=this);for(var carry=0,i=0;i>26,this.words[i]=67108863&r;for(;0!==carry&&i>26,this.words[i]=67108863&r;if(0===carry&&i>>13,a1=0|a[1],al1=8191&a1,ah1=a1>>>13,a2=0|a[2],al2=8191&a2,ah2=a2>>>13,a3=0|a[3],al3=8191&a3,ah3=a3>>>13,a4=0|a[4],al4=8191&a4,ah4=a4>>>13,a5=0|a[5],al5=8191&a5,ah5=a5>>>13,a6=0|a[6],al6=8191&a6,ah6=a6>>>13,a7=0|a[7],al7=8191&a7,ah7=a7>>>13,a8=0|a[8],al8=8191&a8,ah8=a8>>>13,a9=0|a[9],al9=8191&a9,ah9=a9>>>13,b0=0|b[0],bl0=8191&b0,bh0=b0>>>13,b1=0|b[1],bl1=8191&b1,bh1=b1>>>13,b2=0|b[2],bl2=8191&b2,bh2=b2>>>13,b3=0|b[3],bl3=8191&b3,bh3=b3>>>13,b4=0|b[4],bl4=8191&b4,bh4=b4>>>13,b5=0|b[5],bl5=8191&b5,bh5=b5>>>13,b6=0|b[6],bl6=8191&b6,bh6=b6>>>13,b7=0|b[7],bl7=8191&b7,bh7=b7>>>13,b8=0|b[8],bl8=8191&b8,bh8=b8>>>13,b9=0|b[9],bl9=8191&b9,bh9=b9>>>13;out.negative=self.negative^num.negative,out.length=19;var w0=(c+(lo=Math.imul(al0,bl0))|0)+((8191&(mid=(mid=Math.imul(al0,bh0))+Math.imul(ah0,bl0)|0))<<13)|0;c=((hi=Math.imul(ah0,bh0))+(mid>>>13)|0)+(w0>>>26)|0,w0&=67108863,lo=Math.imul(al1,bl0),mid=(mid=Math.imul(al1,bh0))+Math.imul(ah1,bl0)|0,hi=Math.imul(ah1,bh0);var w1=(c+(lo=lo+Math.imul(al0,bl1)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh1)|0)+Math.imul(ah0,bl1)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh1)|0)+(mid>>>13)|0)+(w1>>>26)|0,w1&=67108863,lo=Math.imul(al2,bl0),mid=(mid=Math.imul(al2,bh0))+Math.imul(ah2,bl0)|0,hi=Math.imul(ah2,bh0),lo=lo+Math.imul(al1,bl1)|0,mid=(mid=mid+Math.imul(al1,bh1)|0)+Math.imul(ah1,bl1)|0,hi=hi+Math.imul(ah1,bh1)|0;var w2=(c+(lo=lo+Math.imul(al0,bl2)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh2)|0)+Math.imul(ah0,bl2)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh2)|0)+(mid>>>13)|0)+(w2>>>26)|0,w2&=67108863,lo=Math.imul(al3,bl0),mid=(mid=Math.imul(al3,bh0))+Math.imul(ah3,bl0)|0,hi=Math.imul(ah3,bh0),lo=lo+Math.imul(al2,bl1)|0,mid=(mid=mid+Math.imul(al2,bh1)|0)+Math.imul(ah2,bl1)|0,hi=hi+Math.imul(ah2,bh1)|0,lo=lo+Math.imul(al1,bl2)|0,mid=(mid=mid+Math.imul(al1,bh2)|0)+Math.imul(ah1,bl2)|0,hi=hi+Math.imul(ah1,bh2)|0;var w3=(c+(lo=lo+Math.imul(al0,bl3)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh3)|0)+Math.imul(ah0,bl3)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh3)|0)+(mid>>>13)|0)+(w3>>>26)|0,w3&=67108863,lo=Math.imul(al4,bl0),mid=(mid=Math.imul(al4,bh0))+Math.imul(ah4,bl0)|0,hi=Math.imul(ah4,bh0),lo=lo+Math.imul(al3,bl1)|0,mid=(mid=mid+Math.imul(al3,bh1)|0)+Math.imul(ah3,bl1)|0,hi=hi+Math.imul(ah3,bh1)|0,lo=lo+Math.imul(al2,bl2)|0,mid=(mid=mid+Math.imul(al2,bh2)|0)+Math.imul(ah2,bl2)|0,hi=hi+Math.imul(ah2,bh2)|0,lo=lo+Math.imul(al1,bl3)|0,mid=(mid=mid+Math.imul(al1,bh3)|0)+Math.imul(ah1,bl3)|0,hi=hi+Math.imul(ah1,bh3)|0;var w4=(c+(lo=lo+Math.imul(al0,bl4)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh4)|0)+Math.imul(ah0,bl4)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh4)|0)+(mid>>>13)|0)+(w4>>>26)|0,w4&=67108863,lo=Math.imul(al5,bl0),mid=(mid=Math.imul(al5,bh0))+Math.imul(ah5,bl0)|0,hi=Math.imul(ah5,bh0),lo=lo+Math.imul(al4,bl1)|0,mid=(mid=mid+Math.imul(al4,bh1)|0)+Math.imul(ah4,bl1)|0,hi=hi+Math.imul(ah4,bh1)|0,lo=lo+Math.imul(al3,bl2)|0,mid=(mid=mid+Math.imul(al3,bh2)|0)+Math.imul(ah3,bl2)|0,hi=hi+Math.imul(ah3,bh2)|0,lo=lo+Math.imul(al2,bl3)|0,mid=(mid=mid+Math.imul(al2,bh3)|0)+Math.imul(ah2,bl3)|0,hi=hi+Math.imul(ah2,bh3)|0,lo=lo+Math.imul(al1,bl4)|0,mid=(mid=mid+Math.imul(al1,bh4)|0)+Math.imul(ah1,bl4)|0,hi=hi+Math.imul(ah1,bh4)|0;var w5=(c+(lo=lo+Math.imul(al0,bl5)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh5)|0)+Math.imul(ah0,bl5)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh5)|0)+(mid>>>13)|0)+(w5>>>26)|0,w5&=67108863,lo=Math.imul(al6,bl0),mid=(mid=Math.imul(al6,bh0))+Math.imul(ah6,bl0)|0,hi=Math.imul(ah6,bh0),lo=lo+Math.imul(al5,bl1)|0,mid=(mid=mid+Math.imul(al5,bh1)|0)+Math.imul(ah5,bl1)|0,hi=hi+Math.imul(ah5,bh1)|0,lo=lo+Math.imul(al4,bl2)|0,mid=(mid=mid+Math.imul(al4,bh2)|0)+Math.imul(ah4,bl2)|0,hi=hi+Math.imul(ah4,bh2)|0,lo=lo+Math.imul(al3,bl3)|0,mid=(mid=mid+Math.imul(al3,bh3)|0)+Math.imul(ah3,bl3)|0,hi=hi+Math.imul(ah3,bh3)|0,lo=lo+Math.imul(al2,bl4)|0,mid=(mid=mid+Math.imul(al2,bh4)|0)+Math.imul(ah2,bl4)|0,hi=hi+Math.imul(ah2,bh4)|0,lo=lo+Math.imul(al1,bl5)|0,mid=(mid=mid+Math.imul(al1,bh5)|0)+Math.imul(ah1,bl5)|0,hi=hi+Math.imul(ah1,bh5)|0;var w6=(c+(lo=lo+Math.imul(al0,bl6)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh6)|0)+Math.imul(ah0,bl6)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh6)|0)+(mid>>>13)|0)+(w6>>>26)|0,w6&=67108863,lo=Math.imul(al7,bl0),mid=(mid=Math.imul(al7,bh0))+Math.imul(ah7,bl0)|0,hi=Math.imul(ah7,bh0),lo=lo+Math.imul(al6,bl1)|0,mid=(mid=mid+Math.imul(al6,bh1)|0)+Math.imul(ah6,bl1)|0,hi=hi+Math.imul(ah6,bh1)|0,lo=lo+Math.imul(al5,bl2)|0,mid=(mid=mid+Math.imul(al5,bh2)|0)+Math.imul(ah5,bl2)|0,hi=hi+Math.imul(ah5,bh2)|0,lo=lo+Math.imul(al4,bl3)|0,mid=(mid=mid+Math.imul(al4,bh3)|0)+Math.imul(ah4,bl3)|0,hi=hi+Math.imul(ah4,bh3)|0,lo=lo+Math.imul(al3,bl4)|0,mid=(mid=mid+Math.imul(al3,bh4)|0)+Math.imul(ah3,bl4)|0,hi=hi+Math.imul(ah3,bh4)|0,lo=lo+Math.imul(al2,bl5)|0,mid=(mid=mid+Math.imul(al2,bh5)|0)+Math.imul(ah2,bl5)|0,hi=hi+Math.imul(ah2,bh5)|0,lo=lo+Math.imul(al1,bl6)|0,mid=(mid=mid+Math.imul(al1,bh6)|0)+Math.imul(ah1,bl6)|0,hi=hi+Math.imul(ah1,bh6)|0;var w7=(c+(lo=lo+Math.imul(al0,bl7)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh7)|0)+Math.imul(ah0,bl7)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh7)|0)+(mid>>>13)|0)+(w7>>>26)|0,w7&=67108863,lo=Math.imul(al8,bl0),mid=(mid=Math.imul(al8,bh0))+Math.imul(ah8,bl0)|0,hi=Math.imul(ah8,bh0),lo=lo+Math.imul(al7,bl1)|0,mid=(mid=mid+Math.imul(al7,bh1)|0)+Math.imul(ah7,bl1)|0,hi=hi+Math.imul(ah7,bh1)|0,lo=lo+Math.imul(al6,bl2)|0,mid=(mid=mid+Math.imul(al6,bh2)|0)+Math.imul(ah6,bl2)|0,hi=hi+Math.imul(ah6,bh2)|0,lo=lo+Math.imul(al5,bl3)|0,mid=(mid=mid+Math.imul(al5,bh3)|0)+Math.imul(ah5,bl3)|0,hi=hi+Math.imul(ah5,bh3)|0,lo=lo+Math.imul(al4,bl4)|0,mid=(mid=mid+Math.imul(al4,bh4)|0)+Math.imul(ah4,bl4)|0,hi=hi+Math.imul(ah4,bh4)|0,lo=lo+Math.imul(al3,bl5)|0,mid=(mid=mid+Math.imul(al3,bh5)|0)+Math.imul(ah3,bl5)|0,hi=hi+Math.imul(ah3,bh5)|0,lo=lo+Math.imul(al2,bl6)|0,mid=(mid=mid+Math.imul(al2,bh6)|0)+Math.imul(ah2,bl6)|0,hi=hi+Math.imul(ah2,bh6)|0,lo=lo+Math.imul(al1,bl7)|0,mid=(mid=mid+Math.imul(al1,bh7)|0)+Math.imul(ah1,bl7)|0,hi=hi+Math.imul(ah1,bh7)|0;var w8=(c+(lo=lo+Math.imul(al0,bl8)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh8)|0)+Math.imul(ah0,bl8)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh8)|0)+(mid>>>13)|0)+(w8>>>26)|0,w8&=67108863,lo=Math.imul(al9,bl0),mid=(mid=Math.imul(al9,bh0))+Math.imul(ah9,bl0)|0,hi=Math.imul(ah9,bh0),lo=lo+Math.imul(al8,bl1)|0,mid=(mid=mid+Math.imul(al8,bh1)|0)+Math.imul(ah8,bl1)|0,hi=hi+Math.imul(ah8,bh1)|0,lo=lo+Math.imul(al7,bl2)|0,mid=(mid=mid+Math.imul(al7,bh2)|0)+Math.imul(ah7,bl2)|0,hi=hi+Math.imul(ah7,bh2)|0,lo=lo+Math.imul(al6,bl3)|0,mid=(mid=mid+Math.imul(al6,bh3)|0)+Math.imul(ah6,bl3)|0,hi=hi+Math.imul(ah6,bh3)|0,lo=lo+Math.imul(al5,bl4)|0,mid=(mid=mid+Math.imul(al5,bh4)|0)+Math.imul(ah5,bl4)|0,hi=hi+Math.imul(ah5,bh4)|0,lo=lo+Math.imul(al4,bl5)|0,mid=(mid=mid+Math.imul(al4,bh5)|0)+Math.imul(ah4,bl5)|0,hi=hi+Math.imul(ah4,bh5)|0,lo=lo+Math.imul(al3,bl6)|0,mid=(mid=mid+Math.imul(al3,bh6)|0)+Math.imul(ah3,bl6)|0,hi=hi+Math.imul(ah3,bh6)|0,lo=lo+Math.imul(al2,bl7)|0,mid=(mid=mid+Math.imul(al2,bh7)|0)+Math.imul(ah2,bl7)|0,hi=hi+Math.imul(ah2,bh7)|0,lo=lo+Math.imul(al1,bl8)|0,mid=(mid=mid+Math.imul(al1,bh8)|0)+Math.imul(ah1,bl8)|0,hi=hi+Math.imul(ah1,bh8)|0;var w9=(c+(lo=lo+Math.imul(al0,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh9)|0)+Math.imul(ah0,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh9)|0)+(mid>>>13)|0)+(w9>>>26)|0,w9&=67108863,lo=Math.imul(al9,bl1),mid=(mid=Math.imul(al9,bh1))+Math.imul(ah9,bl1)|0,hi=Math.imul(ah9,bh1),lo=lo+Math.imul(al8,bl2)|0,mid=(mid=mid+Math.imul(al8,bh2)|0)+Math.imul(ah8,bl2)|0,hi=hi+Math.imul(ah8,bh2)|0,lo=lo+Math.imul(al7,bl3)|0,mid=(mid=mid+Math.imul(al7,bh3)|0)+Math.imul(ah7,bl3)|0,hi=hi+Math.imul(ah7,bh3)|0,lo=lo+Math.imul(al6,bl4)|0,mid=(mid=mid+Math.imul(al6,bh4)|0)+Math.imul(ah6,bl4)|0,hi=hi+Math.imul(ah6,bh4)|0,lo=lo+Math.imul(al5,bl5)|0,mid=(mid=mid+Math.imul(al5,bh5)|0)+Math.imul(ah5,bl5)|0,hi=hi+Math.imul(ah5,bh5)|0,lo=lo+Math.imul(al4,bl6)|0,mid=(mid=mid+Math.imul(al4,bh6)|0)+Math.imul(ah4,bl6)|0,hi=hi+Math.imul(ah4,bh6)|0,lo=lo+Math.imul(al3,bl7)|0,mid=(mid=mid+Math.imul(al3,bh7)|0)+Math.imul(ah3,bl7)|0,hi=hi+Math.imul(ah3,bh7)|0,lo=lo+Math.imul(al2,bl8)|0,mid=(mid=mid+Math.imul(al2,bh8)|0)+Math.imul(ah2,bl8)|0,hi=hi+Math.imul(ah2,bh8)|0;var w10=(c+(lo=lo+Math.imul(al1,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al1,bh9)|0)+Math.imul(ah1,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah1,bh9)|0)+(mid>>>13)|0)+(w10>>>26)|0,w10&=67108863,lo=Math.imul(al9,bl2),mid=(mid=Math.imul(al9,bh2))+Math.imul(ah9,bl2)|0,hi=Math.imul(ah9,bh2),lo=lo+Math.imul(al8,bl3)|0,mid=(mid=mid+Math.imul(al8,bh3)|0)+Math.imul(ah8,bl3)|0,hi=hi+Math.imul(ah8,bh3)|0,lo=lo+Math.imul(al7,bl4)|0,mid=(mid=mid+Math.imul(al7,bh4)|0)+Math.imul(ah7,bl4)|0,hi=hi+Math.imul(ah7,bh4)|0,lo=lo+Math.imul(al6,bl5)|0,mid=(mid=mid+Math.imul(al6,bh5)|0)+Math.imul(ah6,bl5)|0,hi=hi+Math.imul(ah6,bh5)|0,lo=lo+Math.imul(al5,bl6)|0,mid=(mid=mid+Math.imul(al5,bh6)|0)+Math.imul(ah5,bl6)|0,hi=hi+Math.imul(ah5,bh6)|0,lo=lo+Math.imul(al4,bl7)|0,mid=(mid=mid+Math.imul(al4,bh7)|0)+Math.imul(ah4,bl7)|0,hi=hi+Math.imul(ah4,bh7)|0,lo=lo+Math.imul(al3,bl8)|0,mid=(mid=mid+Math.imul(al3,bh8)|0)+Math.imul(ah3,bl8)|0,hi=hi+Math.imul(ah3,bh8)|0;var w11=(c+(lo=lo+Math.imul(al2,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al2,bh9)|0)+Math.imul(ah2,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah2,bh9)|0)+(mid>>>13)|0)+(w11>>>26)|0,w11&=67108863,lo=Math.imul(al9,bl3),mid=(mid=Math.imul(al9,bh3))+Math.imul(ah9,bl3)|0,hi=Math.imul(ah9,bh3),lo=lo+Math.imul(al8,bl4)|0,mid=(mid=mid+Math.imul(al8,bh4)|0)+Math.imul(ah8,bl4)|0,hi=hi+Math.imul(ah8,bh4)|0,lo=lo+Math.imul(al7,bl5)|0,mid=(mid=mid+Math.imul(al7,bh5)|0)+Math.imul(ah7,bl5)|0,hi=hi+Math.imul(ah7,bh5)|0,lo=lo+Math.imul(al6,bl6)|0,mid=(mid=mid+Math.imul(al6,bh6)|0)+Math.imul(ah6,bl6)|0,hi=hi+Math.imul(ah6,bh6)|0,lo=lo+Math.imul(al5,bl7)|0,mid=(mid=mid+Math.imul(al5,bh7)|0)+Math.imul(ah5,bl7)|0,hi=hi+Math.imul(ah5,bh7)|0,lo=lo+Math.imul(al4,bl8)|0,mid=(mid=mid+Math.imul(al4,bh8)|0)+Math.imul(ah4,bl8)|0,hi=hi+Math.imul(ah4,bh8)|0;var w12=(c+(lo=lo+Math.imul(al3,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al3,bh9)|0)+Math.imul(ah3,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah3,bh9)|0)+(mid>>>13)|0)+(w12>>>26)|0,w12&=67108863,lo=Math.imul(al9,bl4),mid=(mid=Math.imul(al9,bh4))+Math.imul(ah9,bl4)|0,hi=Math.imul(ah9,bh4),lo=lo+Math.imul(al8,bl5)|0,mid=(mid=mid+Math.imul(al8,bh5)|0)+Math.imul(ah8,bl5)|0,hi=hi+Math.imul(ah8,bh5)|0,lo=lo+Math.imul(al7,bl6)|0,mid=(mid=mid+Math.imul(al7,bh6)|0)+Math.imul(ah7,bl6)|0,hi=hi+Math.imul(ah7,bh6)|0,lo=lo+Math.imul(al6,bl7)|0,mid=(mid=mid+Math.imul(al6,bh7)|0)+Math.imul(ah6,bl7)|0,hi=hi+Math.imul(ah6,bh7)|0,lo=lo+Math.imul(al5,bl8)|0,mid=(mid=mid+Math.imul(al5,bh8)|0)+Math.imul(ah5,bl8)|0,hi=hi+Math.imul(ah5,bh8)|0;var w13=(c+(lo=lo+Math.imul(al4,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al4,bh9)|0)+Math.imul(ah4,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah4,bh9)|0)+(mid>>>13)|0)+(w13>>>26)|0,w13&=67108863,lo=Math.imul(al9,bl5),mid=(mid=Math.imul(al9,bh5))+Math.imul(ah9,bl5)|0,hi=Math.imul(ah9,bh5),lo=lo+Math.imul(al8,bl6)|0,mid=(mid=mid+Math.imul(al8,bh6)|0)+Math.imul(ah8,bl6)|0,hi=hi+Math.imul(ah8,bh6)|0,lo=lo+Math.imul(al7,bl7)|0,mid=(mid=mid+Math.imul(al7,bh7)|0)+Math.imul(ah7,bl7)|0,hi=hi+Math.imul(ah7,bh7)|0,lo=lo+Math.imul(al6,bl8)|0,mid=(mid=mid+Math.imul(al6,bh8)|0)+Math.imul(ah6,bl8)|0,hi=hi+Math.imul(ah6,bh8)|0;var w14=(c+(lo=lo+Math.imul(al5,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al5,bh9)|0)+Math.imul(ah5,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah5,bh9)|0)+(mid>>>13)|0)+(w14>>>26)|0,w14&=67108863,lo=Math.imul(al9,bl6),mid=(mid=Math.imul(al9,bh6))+Math.imul(ah9,bl6)|0,hi=Math.imul(ah9,bh6),lo=lo+Math.imul(al8,bl7)|0,mid=(mid=mid+Math.imul(al8,bh7)|0)+Math.imul(ah8,bl7)|0,hi=hi+Math.imul(ah8,bh7)|0,lo=lo+Math.imul(al7,bl8)|0,mid=(mid=mid+Math.imul(al7,bh8)|0)+Math.imul(ah7,bl8)|0,hi=hi+Math.imul(ah7,bh8)|0;var w15=(c+(lo=lo+Math.imul(al6,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al6,bh9)|0)+Math.imul(ah6,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah6,bh9)|0)+(mid>>>13)|0)+(w15>>>26)|0,w15&=67108863,lo=Math.imul(al9,bl7),mid=(mid=Math.imul(al9,bh7))+Math.imul(ah9,bl7)|0,hi=Math.imul(ah9,bh7),lo=lo+Math.imul(al8,bl8)|0,mid=(mid=mid+Math.imul(al8,bh8)|0)+Math.imul(ah8,bl8)|0,hi=hi+Math.imul(ah8,bh8)|0;var w16=(c+(lo=lo+Math.imul(al7,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al7,bh9)|0)+Math.imul(ah7,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah7,bh9)|0)+(mid>>>13)|0)+(w16>>>26)|0,w16&=67108863,lo=Math.imul(al9,bl8),mid=(mid=Math.imul(al9,bh8))+Math.imul(ah9,bl8)|0,hi=Math.imul(ah9,bh8);var w17=(c+(lo=lo+Math.imul(al8,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al8,bh9)|0)+Math.imul(ah8,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah8,bh9)|0)+(mid>>>13)|0)+(w17>>>26)|0,w17&=67108863;var w18=(c+(lo=Math.imul(al9,bl9))|0)+((8191&(mid=(mid=Math.imul(al9,bh9))+Math.imul(ah9,bl9)|0))<<13)|0;return c=((hi=Math.imul(ah9,bh9))+(mid>>>13)|0)+(w18>>>26)|0,w18&=67108863,o[0]=w0,o[1]=w1,o[2]=w2,o[3]=w3,o[4]=w4,o[5]=w5,o[6]=w6,o[7]=w7,o[8]=w8,o[9]=w9,o[10]=w10,o[11]=w11,o[12]=w12,o[13]=w13,o[14]=w14,o[15]=w15,o[16]=w16,o[17]=w17,o[18]=w18,0!==c&&(o[19]=c,out.length++),out};function jumboMulTo(self,num,out){return(new FFTM).mulp(self,num,out)}function FFTM(x,y){this.x=x,this.y=y}Math.imul||(comb10MulTo=smallMulTo),BN.prototype.mulTo=function(num,out){var len=this.length+num.length;return 10===this.length&&10===num.length?comb10MulTo(this,num,out):len<63?smallMulTo(this,num,out):len<1024?function(self,num,out){out.negative=num.negative^self.negative,out.length=self.length+num.length;for(var carry=0,hncarry=0,k=0;k>>26)|0)>>>26,ncarry&=67108863}out.words[k]=rword,carry=ncarry,ncarry=hncarry}return 0!==carry?out.words[k]=carry:out.length--,out.strip()}(this,num,out):jumboMulTo(this,num,out)},FFTM.prototype.makeRBT=function(N){for(var t=new Array(N),l=BN.prototype._countBits(N)-1,i=0;i>=1;return rb},FFTM.prototype.permute=function(rbt,rws,iws,rtws,itws,N){for(var i=0;i>>=1)i++;return 1<>>=13,rws[2*i+1]=8191&carry,carry>>>=13;for(i=2*len;i>=26,carry+=w/67108864|0,carry+=lo>>>26,this.words[i]=67108863&lo}return 0!==carry&&(this.words[i]=carry,this.length++),this},BN.prototype.muln=function(num){return this.clone().imuln(num)},BN.prototype.sqr=function(){return this.mul(this)},BN.prototype.isqr=function(){return this.imul(this.clone())},BN.prototype.pow=function(num){var w=function(num){for(var w=new Array(num.bitLength()),bit=0;bit>>wbit}return w}(num);if(0===w.length)return new BN(1);for(var res=this,i=0;i=0);var i,r=bits%26,s=(bits-r)/26,carryMask=67108863>>>26-r<<26-r;if(0!==r){var carry=0;for(i=0;i>>26-r}carry&&(this.words[i]=carry,this.length++)}if(0!==s){for(i=this.length-1;i>=0;i--)this.words[i+s]=this.words[i];for(i=0;i=0),h=hint?(hint-hint%26)/26:0;var r=bits%26,s=Math.min((bits-r)/26,this.length),mask=67108863^67108863>>>r<s)for(this.length-=s,i=0;i=0&&(0!==carry||i>=h);i--){var word=0|this.words[i];this.words[i]=carry<<26-r|word>>>r,carry=word&mask}return maskedWords&&0!==carry&&(maskedWords.words[maskedWords.length++]=carry),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},BN.prototype.ishrn=function(bits,hint,extended){return assert(0===this.negative),this.iushrn(bits,hint,extended)},BN.prototype.shln=function(bits){return this.clone().ishln(bits)},BN.prototype.ushln=function(bits){return this.clone().iushln(bits)},BN.prototype.shrn=function(bits){return this.clone().ishrn(bits)},BN.prototype.ushrn=function(bits){return this.clone().iushrn(bits)},BN.prototype.testn=function(bit){assert("number"==typeof bit&&bit>=0);var r=bit%26,s=(bit-r)/26,q=1<=0);var r=bits%26,s=(bits-r)/26;if(assert(0===this.negative,"imaskn works only with positive numbers"),this.length<=s)return this;if(0!==r&&s++,this.length=Math.min(s,this.length),0!==r){var mask=67108863^67108863>>>r<=67108864;i++)this.words[i]-=67108864,i===this.length-1?this.words[i+1]=1:this.words[i+1]++;return this.length=Math.max(this.length,i+1),this},BN.prototype.isubn=function(num){if(assert("number"==typeof num),assert(num<67108864),num<0)return this.iaddn(-num);if(0!==this.negative)return this.negative=0,this.iaddn(num),this.negative=1,this;if(this.words[0]-=num,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var i=0;i>26)-(right/67108864|0),this.words[i+shift]=67108863&w}for(;i>26,this.words[i+shift]=67108863&w;if(0===carry)return this.strip();for(assert(-1===carry),carry=0,i=0;i>26,this.words[i]=67108863&w;return this.negative=1,this.strip()},BN.prototype._wordDiv=function(num,mode){var shift=(this.length,num.length),a=this.clone(),b=num,bhi=0|b.words[b.length-1];0!=(shift=26-this._countBits(bhi))&&(b=b.ushln(shift),a.iushln(shift),bhi=0|b.words[b.length-1]);var q,m=a.length-b.length;if("mod"!==mode){(q=new BN(null)).length=m+1,q.words=new Array(q.length);for(var i=0;i=0;j--){var qj=67108864*(0|a.words[b.length+j])+(0|a.words[b.length+j-1]);for(qj=Math.min(qj/bhi|0,67108863),a._ishlnsubmul(b,qj,j);0!==a.negative;)qj--,a.negative=0,a._ishlnsubmul(b,1,j),a.isZero()||(a.negative^=1);q&&(q.words[j]=qj)}return q&&q.strip(),a.strip(),"div"!==mode&&0!==shift&&a.iushrn(shift),{div:q||null,mod:a}},BN.prototype.divmod=function(num,mode,positive){return assert(!num.isZero()),this.isZero()?{div:new BN(0),mod:new BN(0)}:0!==this.negative&&0===num.negative?(res=this.neg().divmod(num,mode),"mod"!==mode&&(div=res.div.neg()),"div"!==mode&&(mod=res.mod.neg(),positive&&0!==mod.negative&&mod.iadd(num)),{div:div,mod:mod}):0===this.negative&&0!==num.negative?(res=this.divmod(num.neg(),mode),"mod"!==mode&&(div=res.div.neg()),{div:div,mod:res.mod}):0!=(this.negative&num.negative)?(res=this.neg().divmod(num.neg(),mode),"div"!==mode&&(mod=res.mod.neg(),positive&&0!==mod.negative&&mod.isub(num)),{div:res.div,mod:mod}):num.length>this.length||this.cmp(num)<0?{div:new BN(0),mod:this}:1===num.length?"div"===mode?{div:this.divn(num.words[0]),mod:null}:"mod"===mode?{div:null,mod:new BN(this.modn(num.words[0]))}:{div:this.divn(num.words[0]),mod:new BN(this.modn(num.words[0]))}:this._wordDiv(num,mode);var div,mod,res},BN.prototype.div=function(num){return this.divmod(num,"div",!1).div},BN.prototype.mod=function(num){return this.divmod(num,"mod",!1).mod},BN.prototype.umod=function(num){return this.divmod(num,"mod",!0).mod},BN.prototype.divRound=function(num){var dm=this.divmod(num);if(dm.mod.isZero())return dm.div;var mod=0!==dm.div.negative?dm.mod.isub(num):dm.mod,half=num.ushrn(1),r2=num.andln(1),cmp=mod.cmp(half);return cmp<0||1===r2&&0===cmp?dm.div:0!==dm.div.negative?dm.div.isubn(1):dm.div.iaddn(1)},BN.prototype.modn=function(num){assert(num<=67108863);for(var p=(1<<26)%num,acc=0,i=this.length-1;i>=0;i--)acc=(p*acc+(0|this.words[i]))%num;return acc},BN.prototype.idivn=function(num){assert(num<=67108863);for(var carry=0,i=this.length-1;i>=0;i--){var w=(0|this.words[i])+67108864*carry;this.words[i]=w/num|0,carry=w%num}return this.strip()},BN.prototype.divn=function(num){return this.clone().idivn(num)},BN.prototype.egcd=function(p){assert(0===p.negative),assert(!p.isZero());var x=this,y=p.clone();x=0!==x.negative?x.umod(p):x.clone();for(var A=new BN(1),B=new BN(0),C=new BN(0),D=new BN(1),g=0;x.isEven()&&y.isEven();)x.iushrn(1),y.iushrn(1),++g;for(var yp=y.clone(),xp=x.clone();!x.isZero();){for(var i=0,im=1;0==(x.words[0]&im)&&i<26;++i,im<<=1);if(i>0)for(x.iushrn(i);i-- >0;)(A.isOdd()||B.isOdd())&&(A.iadd(yp),B.isub(xp)),A.iushrn(1),B.iushrn(1);for(var j=0,jm=1;0==(y.words[0]&jm)&&j<26;++j,jm<<=1);if(j>0)for(y.iushrn(j);j-- >0;)(C.isOdd()||D.isOdd())&&(C.iadd(yp),D.isub(xp)),C.iushrn(1),D.iushrn(1);x.cmp(y)>=0?(x.isub(y),A.isub(C),B.isub(D)):(y.isub(x),C.isub(A),D.isub(B))}return{a:C,b:D,gcd:y.iushln(g)}},BN.prototype._invmp=function(p){assert(0===p.negative),assert(!p.isZero());var a=this,b=p.clone();a=0!==a.negative?a.umod(p):a.clone();for(var res,x1=new BN(1),x2=new BN(0),delta=b.clone();a.cmpn(1)>0&&b.cmpn(1)>0;){for(var i=0,im=1;0==(a.words[0]&im)&&i<26;++i,im<<=1);if(i>0)for(a.iushrn(i);i-- >0;)x1.isOdd()&&x1.iadd(delta),x1.iushrn(1);for(var j=0,jm=1;0==(b.words[0]&jm)&&j<26;++j,jm<<=1);if(j>0)for(b.iushrn(j);j-- >0;)x2.isOdd()&&x2.iadd(delta),x2.iushrn(1);a.cmp(b)>=0?(a.isub(b),x1.isub(x2)):(b.isub(a),x2.isub(x1))}return(res=0===a.cmpn(1)?x1:x2).cmpn(0)<0&&res.iadd(p),res},BN.prototype.gcd=function(num){if(this.isZero())return num.abs();if(num.isZero())return this.abs();var a=this.clone(),b=num.clone();a.negative=0,b.negative=0;for(var shift=0;a.isEven()&&b.isEven();shift++)a.iushrn(1),b.iushrn(1);for(;;){for(;a.isEven();)a.iushrn(1);for(;b.isEven();)b.iushrn(1);var r=a.cmp(b);if(r<0){var t=a;a=b,b=t}else if(0===r||0===b.cmpn(1))break;a.isub(b)}return b.iushln(shift)},BN.prototype.invm=function(num){return this.egcd(num).a.umod(num)},BN.prototype.isEven=function(){return 0==(1&this.words[0])},BN.prototype.isOdd=function(){return 1==(1&this.words[0])},BN.prototype.andln=function(num){return this.words[0]&num},BN.prototype.bincn=function(bit){assert("number"==typeof bit);var r=bit%26,s=(bit-r)/26,q=1<>>26,w&=67108863,this.words[i]=w}return 0!==carry&&(this.words[i]=carry,this.length++),this},BN.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},BN.prototype.cmpn=function(num){var res,negative=num<0;if(0!==this.negative&&!negative)return-1;if(0===this.negative&&negative)return 1;if(this.strip(),this.length>1)res=1;else{negative&&(num=-num),assert(num<=67108863,"Number is too big");var w=0|this.words[0];res=w===num?0:wnum.length)return 1;if(this.length=0;i--){var a=0|this.words[i],b=0|num.words[i];if(a!==b){ab&&(res=1);break}}return res},BN.prototype.gtn=function(num){return 1===this.cmpn(num)},BN.prototype.gt=function(num){return 1===this.cmp(num)},BN.prototype.gten=function(num){return this.cmpn(num)>=0},BN.prototype.gte=function(num){return this.cmp(num)>=0},BN.prototype.ltn=function(num){return-1===this.cmpn(num)},BN.prototype.lt=function(num){return-1===this.cmp(num)},BN.prototype.lten=function(num){return this.cmpn(num)<=0},BN.prototype.lte=function(num){return this.cmp(num)<=0},BN.prototype.eqn=function(num){return 0===this.cmpn(num)},BN.prototype.eq=function(num){return 0===this.cmp(num)},BN.red=function(num){return new Red(num)},BN.prototype.toRed=function(ctx){return assert(!this.red,"Already a number in reduction context"),assert(0===this.negative,"red works only with positives"),ctx.convertTo(this)._forceRed(ctx)},BN.prototype.fromRed=function(){return assert(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},BN.prototype._forceRed=function(ctx){return this.red=ctx,this},BN.prototype.forceRed=function(ctx){return assert(!this.red,"Already a number in reduction context"),this._forceRed(ctx)},BN.prototype.redAdd=function(num){return assert(this.red,"redAdd works only with red numbers"),this.red.add(this,num)},BN.prototype.redIAdd=function(num){return assert(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,num)},BN.prototype.redSub=function(num){return assert(this.red,"redSub works only with red numbers"),this.red.sub(this,num)},BN.prototype.redISub=function(num){return assert(this.red,"redISub works only with red numbers"),this.red.isub(this,num)},BN.prototype.redShl=function(num){return assert(this.red,"redShl works only with red numbers"),this.red.shl(this,num)},BN.prototype.redMul=function(num){return assert(this.red,"redMul works only with red numbers"),this.red._verify2(this,num),this.red.mul(this,num)},BN.prototype.redIMul=function(num){return assert(this.red,"redMul works only with red numbers"),this.red._verify2(this,num),this.red.imul(this,num)},BN.prototype.redSqr=function(){return assert(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},BN.prototype.redISqr=function(){return assert(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},BN.prototype.redSqrt=function(){return assert(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},BN.prototype.redInvm=function(){return assert(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},BN.prototype.redNeg=function(){return assert(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},BN.prototype.redPow=function(num){return assert(this.red&&!num.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,num)};var primes={k256:null,p224:null,p192:null,p25519:null};function MPrime(name,p){this.name=name,this.p=new BN(p,16),this.n=this.p.bitLength(),this.k=new BN(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function K256(){MPrime.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function P224(){MPrime.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function P192(){MPrime.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function P25519(){MPrime.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function Red(m){if("string"==typeof m){var prime=BN._prime(m);this.m=prime.p,this.prime=prime}else assert(m.gtn(1),"modulus must be greater than 1"),this.m=m,this.prime=null}function Mont(m){Red.call(this,m),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new BN(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}MPrime.prototype._tmp=function(){var tmp=new BN(null);return tmp.words=new Array(Math.ceil(this.n/13)),tmp},MPrime.prototype.ireduce=function(num){var rlen,r=num;do{this.split(r,this.tmp),rlen=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(rlen>this.n);var cmp=rlen0?r.isub(this.p):r.strip(),r},MPrime.prototype.split=function(input,out){input.iushrn(this.n,0,out)},MPrime.prototype.imulK=function(num){return num.imul(this.k)},inherits(K256,MPrime),K256.prototype.split=function(input,output){for(var outLen=Math.min(input.length,9),i=0;i>>22,prev=next}prev>>>=22,input.words[i-10]=prev,0===prev&&input.length>10?input.length-=10:input.length-=9},K256.prototype.imulK=function(num){num.words[num.length]=0,num.words[num.length+1]=0,num.length+=2;for(var lo=0,i=0;i>>=26,num.words[i]=lo,carry=hi}return 0!==carry&&(num.words[num.length++]=carry),num},BN._prime=function(name){if(primes[name])return primes[name];var prime;if("k256"===name)prime=new K256;else if("p224"===name)prime=new P224;else if("p192"===name)prime=new P192;else{if("p25519"!==name)throw new Error("Unknown prime "+name);prime=new P25519}return primes[name]=prime,prime},Red.prototype._verify1=function(a){assert(0===a.negative,"red works only with positives"),assert(a.red,"red works only with red numbers")},Red.prototype._verify2=function(a,b){assert(0==(a.negative|b.negative),"red works only with positives"),assert(a.red&&a.red===b.red,"red works only with red numbers")},Red.prototype.imod=function(a){return this.prime?this.prime.ireduce(a)._forceRed(this):a.umod(this.m)._forceRed(this)},Red.prototype.neg=function(a){return a.isZero()?a.clone():this.m.sub(a)._forceRed(this)},Red.prototype.add=function(a,b){this._verify2(a,b);var res=a.add(b);return res.cmp(this.m)>=0&&res.isub(this.m),res._forceRed(this)},Red.prototype.iadd=function(a,b){this._verify2(a,b);var res=a.iadd(b);return res.cmp(this.m)>=0&&res.isub(this.m),res},Red.prototype.sub=function(a,b){this._verify2(a,b);var res=a.sub(b);return res.cmpn(0)<0&&res.iadd(this.m),res._forceRed(this)},Red.prototype.isub=function(a,b){this._verify2(a,b);var res=a.isub(b);return res.cmpn(0)<0&&res.iadd(this.m),res},Red.prototype.shl=function(a,num){return this._verify1(a),this.imod(a.ushln(num))},Red.prototype.imul=function(a,b){return this._verify2(a,b),this.imod(a.imul(b))},Red.prototype.mul=function(a,b){return this._verify2(a,b),this.imod(a.mul(b))},Red.prototype.isqr=function(a){return this.imul(a,a.clone())},Red.prototype.sqr=function(a){return this.mul(a,a)},Red.prototype.sqrt=function(a){if(a.isZero())return a.clone();var mod3=this.m.andln(3);if(assert(mod3%2==1),3===mod3){var pow=this.m.add(new BN(1)).iushrn(2);return this.pow(a,pow)}for(var q=this.m.subn(1),s=0;!q.isZero()&&0===q.andln(1);)s++,q.iushrn(1);assert(!q.isZero());var one=new BN(1).toRed(this),nOne=one.redNeg(),lpow=this.m.subn(1).iushrn(1),z=this.m.bitLength();for(z=new BN(2*z*z).toRed(this);0!==this.pow(z,lpow).cmp(nOne);)z.redIAdd(nOne);for(var c=this.pow(z,q),r=this.pow(a,q.addn(1).iushrn(1)),t=this.pow(a,q),m=s;0!==t.cmp(one);){for(var tmp=t,i=0;0!==tmp.cmp(one);i++)tmp=tmp.redSqr();assert(i=0;i--){for(var word=num.words[i],j=start-1;j>=0;j--){var bit=word>>j&1;res!==wnd[0]&&(res=this.sqr(res)),0!==bit||0!==current?(current<<=1,current|=bit,(4==++currentLen||0===i&&0===j)&&(res=this.mul(res,wnd[current]),currentLen=0,current=0)):currentLen=0}start=26}return res},Red.prototype.convertTo=function(num){var r=num.umod(this.m);return r===num?r.clone():r},Red.prototype.convertFrom=function(num){var res=num.clone();return res.red=null,res},BN.mont=function(num){return new Mont(num)},inherits(Mont,Red),Mont.prototype.convertTo=function(num){return this.imod(num.ushln(this.shift))},Mont.prototype.convertFrom=function(num){var r=this.imod(num.mul(this.rinv));return r.red=null,r},Mont.prototype.imul=function(a,b){if(a.isZero()||b.isZero())return a.words[0]=0,a.length=1,a;var t=a.imul(b),c=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),u=t.isub(c).iushrn(this.shift),res=u;return u.cmp(this.m)>=0?res=u.isub(this.m):u.cmpn(0)<0&&(res=u.iadd(this.m)),res._forceRed(this)},Mont.prototype.mul=function(a,b){if(a.isZero()||b.isZero())return new BN(0)._forceRed(this);var t=a.mul(b),c=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),u=t.isub(c).iushrn(this.shift),res=u;return u.cmp(this.m)>=0?res=u.isub(this.m):u.cmpn(0)<0&&(res=u.iadd(this.m)),res._forceRed(this)},Mont.prototype.invm=function(a){return this.imod(a._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===module||module,this)},{buffer:"/Users/jnordberg/Development/dsteem/node_modules/browser-resolve/empty.js"}],"/Users/jnordberg/Development/dsteem/node_modules/brorand/index.js":[function(_dereq_,module,exports){var r;function Rand(rand){this.rand=rand}if(module.exports=function(len){return r||(r=new Rand(null)),r.generate(len)},module.exports.Rand=Rand,Rand.prototype.generate=function(len){return this._rand(len)},Rand.prototype._rand=function(n){if(this.rand.getBytes)return this.rand.getBytes(n);for(var res=new Uint8Array(n),i=0;i>>24]^SUB_MIX1[s1>>>16&255]^SUB_MIX2[s2>>>8&255]^SUB_MIX3[255&s3]^keySchedule[ksRow++],t1=SUB_MIX0[s1>>>24]^SUB_MIX1[s2>>>16&255]^SUB_MIX2[s3>>>8&255]^SUB_MIX3[255&s0]^keySchedule[ksRow++],t2=SUB_MIX0[s2>>>24]^SUB_MIX1[s3>>>16&255]^SUB_MIX2[s0>>>8&255]^SUB_MIX3[255&s1]^keySchedule[ksRow++],t3=SUB_MIX0[s3>>>24]^SUB_MIX1[s0>>>16&255]^SUB_MIX2[s1>>>8&255]^SUB_MIX3[255&s2]^keySchedule[ksRow++],s0=t0,s1=t1,s2=t2,s3=t3;return t0=(SBOX[s0>>>24]<<24|SBOX[s1>>>16&255]<<16|SBOX[s2>>>8&255]<<8|SBOX[255&s3])^keySchedule[ksRow++],t1=(SBOX[s1>>>24]<<24|SBOX[s2>>>16&255]<<16|SBOX[s3>>>8&255]<<8|SBOX[255&s0])^keySchedule[ksRow++],t2=(SBOX[s2>>>24]<<24|SBOX[s3>>>16&255]<<16|SBOX[s0>>>8&255]<<8|SBOX[255&s1])^keySchedule[ksRow++],t3=(SBOX[s3>>>24]<<24|SBOX[s0>>>16&255]<<16|SBOX[s1>>>8&255]<<8|SBOX[255&s2])^keySchedule[ksRow++],[t0>>>=0,t1>>>=0,t2>>>=0,t3>>>=0]}var RCON=[0,1,2,4,8,16,32,64,128,27,54],G=function(){for(var d=new Array(256),j=0;j<256;j++)d[j]=j<128?j<<1:j<<1^283;for(var SBOX=[],INV_SBOX=[],SUB_MIX=[[],[],[],[]],INV_SUB_MIX=[[],[],[],[]],x=0,xi=0,i=0;i<256;++i){var sx=xi^xi<<1^xi<<2^xi<<3^xi<<4;sx=sx>>>8^255&sx^99,SBOX[x]=sx,INV_SBOX[sx]=x;var x2=d[x],x4=d[x2],x8=d[x4],t=257*d[sx]^16843008*sx;SUB_MIX[0][x]=t<<24|t>>>8,SUB_MIX[1][x]=t<<16|t>>>16,SUB_MIX[2][x]=t<<8|t>>>24,SUB_MIX[3][x]=t,t=16843009*x8^65537*x4^257*x2^16843008*x,INV_SUB_MIX[0][sx]=t<<24|t>>>8,INV_SUB_MIX[1][sx]=t<<16|t>>>16,INV_SUB_MIX[2][sx]=t<<8|t>>>24,INV_SUB_MIX[3][sx]=t,0===x?x=xi=1:(x=x2^d[d[d[x8^x2]]],xi^=d[d[xi]])}return{SBOX:SBOX,INV_SBOX:INV_SBOX,SUB_MIX:SUB_MIX,INV_SUB_MIX:INV_SUB_MIX}}();function AES(key){this._key=asUInt32Array(key),this._reset()}AES.blockSize=16,AES.keySize=32,AES.prototype.blockSize=AES.blockSize,AES.prototype.keySize=AES.keySize,AES.prototype._reset=function(){for(var keyWords=this._key,keySize=keyWords.length,nRounds=keySize+6,ksRows=4*(nRounds+1),keySchedule=[],k=0;k>>24,t=G.SBOX[t>>>24]<<24|G.SBOX[t>>>16&255]<<16|G.SBOX[t>>>8&255]<<8|G.SBOX[255&t],t^=RCON[k/keySize|0]<<24):keySize>6&&k%keySize==4&&(t=G.SBOX[t>>>24]<<24|G.SBOX[t>>>16&255]<<16|G.SBOX[t>>>8&255]<<8|G.SBOX[255&t]),keySchedule[k]=keySchedule[k-keySize]^t}for(var invKeySchedule=[],ik=0;ik>>24]]^G.INV_SUB_MIX[1][G.SBOX[tt>>>16&255]]^G.INV_SUB_MIX[2][G.SBOX[tt>>>8&255]]^G.INV_SUB_MIX[3][G.SBOX[255&tt]]}this._nRounds=nRounds,this._keySchedule=keySchedule,this._invKeySchedule=invKeySchedule},AES.prototype.encryptBlockRaw=function(M){return cryptBlock(M=asUInt32Array(M),this._keySchedule,G.SUB_MIX,G.SBOX,this._nRounds)},AES.prototype.encryptBlock=function(M){var out=this.encryptBlockRaw(M),buf=Buffer.allocUnsafe(16);return buf.writeUInt32BE(out[0],0),buf.writeUInt32BE(out[1],4),buf.writeUInt32BE(out[2],8),buf.writeUInt32BE(out[3],12),buf},AES.prototype.decryptBlock=function(M){var m1=(M=asUInt32Array(M))[1];M[1]=M[3],M[3]=m1;var out=cryptBlock(M,this._invKeySchedule,G.INV_SUB_MIX,G.INV_SBOX,this._nRounds),buf=Buffer.allocUnsafe(16);return buf.writeUInt32BE(out[0],0),buf.writeUInt32BE(out[3],4),buf.writeUInt32BE(out[2],8),buf.writeUInt32BE(out[1],12),buf},AES.prototype.scrub=function(){scrubVec(this._keySchedule),scrubVec(this._invKeySchedule),scrubVec(this._key)},module.exports.AES=AES},{"safe-buffer":"/Users/jnordberg/Development/dsteem/node_modules/safe-buffer/index.js"}],"/Users/jnordberg/Development/dsteem/node_modules/browserify-aes/authCipher.js":[function(_dereq_,module,exports){var aes=_dereq_("./aes"),Buffer=_dereq_("safe-buffer").Buffer,Transform=_dereq_("cipher-base"),inherits=_dereq_("inherits"),GHASH=_dereq_("./ghash"),xor=_dereq_("buffer-xor"),incr32=_dereq_("./incr32");function StreamCipher(mode,key,iv,decrypt){Transform.call(this);var h=Buffer.alloc(4,0);this._cipher=new aes.AES(key);var ck=this._cipher.encryptBlock(h);this._ghash=new GHASH(ck),iv=function(self,iv,ck){if(12===iv.length)return self._finID=Buffer.concat([iv,Buffer.from([0,0,0,1])]),Buffer.concat([iv,Buffer.from([0,0,0,2])]);var ghash=new GHASH(ck),len=iv.length,toPad=len%16;ghash.update(iv),toPad&&(toPad=16-toPad,ghash.update(Buffer.alloc(toPad,0))),ghash.update(Buffer.alloc(8,0));var ivBits=8*len,tail=Buffer.alloc(8);tail.writeUIntBE(ivBits,0,8),ghash.update(tail),self._finID=ghash.state;var out=Buffer.from(self._finID);return incr32(out),out}(this,iv,ck),this._prev=Buffer.from(iv),this._cache=Buffer.allocUnsafe(0),this._secCache=Buffer.allocUnsafe(0),this._decrypt=decrypt,this._alen=0,this._len=0,this._mode=mode,this._authTag=null,this._called=!1}inherits(StreamCipher,Transform),StreamCipher.prototype._update=function(chunk){if(!this._called&&this._alen){var rump=16-this._alen%16;rump<16&&(rump=Buffer.alloc(rump,0),this._ghash.update(rump))}this._called=!0;var out=this._mode.encrypt(this,chunk);return this._decrypt?this._ghash.update(chunk):this._ghash.update(out),this._len+=chunk.length,out},StreamCipher.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var tag=xor(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(a,b){var out=0;a.length!==b.length&&out++;for(var len=Math.min(a.length,b.length),i=0;i16)return out=this.cache.slice(0,16),this.cache=this.cache.slice(16),out}else if(this.cache.length>=16)return out=this.cache.slice(0,16),this.cache=this.cache.slice(16),out;return null},Splitter.prototype.flush=function(){if(this.cache.length)return this.cache},exports.createDecipher=function(suite,password){var config=MODES[suite.toLowerCase()];if(!config)throw new TypeError("invalid suite type");var keys=ebtk(password,!1,config.key,config.iv);return createDecipheriv(suite,keys.key,keys.iv)},exports.createDecipheriv=createDecipheriv},{"./aes":"/Users/jnordberg/Development/dsteem/node_modules/browserify-aes/aes.js","./authCipher":"/Users/jnordberg/Development/dsteem/node_modules/browserify-aes/authCipher.js","./modes":"/Users/jnordberg/Development/dsteem/node_modules/browserify-aes/modes/index.js","./streamCipher":"/Users/jnordberg/Development/dsteem/node_modules/browserify-aes/streamCipher.js","cipher-base":"/Users/jnordberg/Development/dsteem/node_modules/cipher-base/index.js",evp_bytestokey:"/Users/jnordberg/Development/dsteem/node_modules/evp_bytestokey/index.js",inherits:"/Users/jnordberg/Development/dsteem/node_modules/inherits/inherits_browser.js","safe-buffer":"/Users/jnordberg/Development/dsteem/node_modules/safe-buffer/index.js"}],"/Users/jnordberg/Development/dsteem/node_modules/browserify-aes/encrypter.js":[function(_dereq_,module,exports){var MODES=_dereq_("./modes"),AuthCipher=_dereq_("./authCipher"),Buffer=_dereq_("safe-buffer").Buffer,StreamCipher=_dereq_("./streamCipher"),Transform=_dereq_("cipher-base"),aes=_dereq_("./aes"),ebtk=_dereq_("evp_bytestokey");function Cipher(mode,key,iv){Transform.call(this),this._cache=new Splitter,this._cipher=new aes.AES(key),this._prev=Buffer.from(iv),this._mode=mode,this._autopadding=!0}_dereq_("inherits")(Cipher,Transform),Cipher.prototype._update=function(data){var chunk,thing;this._cache.add(data);for(var out=[];chunk=this._cache.get();)thing=this._mode.encrypt(this,chunk),out.push(thing);return Buffer.concat(out)};var PADDING=Buffer.alloc(16,16);function Splitter(){this.cache=Buffer.allocUnsafe(0)}function createCipheriv(suite,password,iv){var config=MODES[suite.toLowerCase()];if(!config)throw new TypeError("invalid suite type");if("string"==typeof password&&(password=Buffer.from(password)),password.length!==config.key/8)throw new TypeError("invalid key length "+password.length);if("string"==typeof iv&&(iv=Buffer.from(iv)),"GCM"!==config.mode&&iv.length!==config.iv)throw new TypeError("invalid iv length "+iv.length);return"stream"===config.type?new StreamCipher(config.module,password,iv):"auth"===config.type?new AuthCipher(config.module,password,iv):new Cipher(config.module,password,iv)}Cipher.prototype._final=function(){var chunk=this._cache.flush();if(this._autopadding)return chunk=this._mode.encrypt(this,chunk),this._cipher.scrub(),chunk;if(!chunk.equals(PADDING))throw this._cipher.scrub(),new Error("data not multiple of block length")},Cipher.prototype.setAutoPadding=function(setTo){return this._autopadding=!!setTo,this},Splitter.prototype.add=function(data){this.cache=Buffer.concat([this.cache,data])},Splitter.prototype.get=function(){if(this.cache.length>15){var out=this.cache.slice(0,16);return this.cache=this.cache.slice(16),out}return null},Splitter.prototype.flush=function(){for(var len=16-this.cache.length,padBuff=Buffer.allocUnsafe(len),i=-1;++i>>0,0),buf.writeUInt32BE(out[1]>>>0,4),buf.writeUInt32BE(out[2]>>>0,8),buf.writeUInt32BE(out[3]>>>0,12),buf}function GHASH(key){this.h=key,this.state=Buffer.alloc(16,0),this.cache=Buffer.allocUnsafe(0)}GHASH.prototype.ghash=function(block){for(var i=-1;++i0;j--)Vi[j]=Vi[j]>>>1|(1&Vi[j-1])<<31;Vi[0]=Vi[0]>>>1,lsbVi&&(Vi[0]=Vi[0]^225<<24)}this.state=fromArray(Zi)},GHASH.prototype.update=function(buf){var chunk;for(this.cache=Buffer.concat([this.cache,buf]);this.cache.length>=16;)chunk=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(chunk)},GHASH.prototype.final=function(abl,bl){return this.cache.length&&this.ghash(Buffer.concat([this.cache,ZEROES],16)),this.ghash(fromArray([0,abl,0,bl])),this.state},module.exports=GHASH},{"safe-buffer":"/Users/jnordberg/Development/dsteem/node_modules/safe-buffer/index.js"}],"/Users/jnordberg/Development/dsteem/node_modules/browserify-aes/incr32.js":[function(_dereq_,module,exports){module.exports=function(iv){for(var item,len=iv.length;len--;){if(255!==(item=iv.readUInt8(len))){item++,iv.writeUInt8(item,len);break}iv.writeUInt8(0,len)}}},{}],"/Users/jnordberg/Development/dsteem/node_modules/browserify-aes/modes/cbc.js":[function(_dereq_,module,exports){var xor=_dereq_("buffer-xor");exports.encrypt=function(self,block){var data=xor(block,self._prev);return self._prev=self._cipher.encryptBlock(data),self._prev},exports.decrypt=function(self,block){var pad=self._prev;self._prev=block;var out=self._cipher.decryptBlock(block);return xor(out,pad)}},{"buffer-xor":"/Users/jnordberg/Development/dsteem/node_modules/buffer-xor/index.js"}],"/Users/jnordberg/Development/dsteem/node_modules/browserify-aes/modes/cfb.js":[function(_dereq_,module,exports){var Buffer=_dereq_("safe-buffer").Buffer,xor=_dereq_("buffer-xor");function encryptStart(self,data,decrypt){var len=data.length,out=xor(data,self._cache);return self._cache=self._cache.slice(len),self._prev=Buffer.concat([self._prev,decrypt?data:out]),out}exports.encrypt=function(self,data,decrypt){for(var len,out=Buffer.allocUnsafe(0);data.length;){if(0===self._cache.length&&(self._cache=self._cipher.encryptBlock(self._prev),self._prev=Buffer.allocUnsafe(0)),!(self._cache.length<=data.length)){out=Buffer.concat([out,encryptStart(self,data,decrypt)]);break}len=self._cache.length,out=Buffer.concat([out,encryptStart(self,data.slice(0,len),decrypt)]),data=data.slice(len)}return out}},{"buffer-xor":"/Users/jnordberg/Development/dsteem/node_modules/buffer-xor/index.js","safe-buffer":"/Users/jnordberg/Development/dsteem/node_modules/safe-buffer/index.js"}],"/Users/jnordberg/Development/dsteem/node_modules/browserify-aes/modes/cfb1.js":[function(_dereq_,module,exports){var Buffer=_dereq_("safe-buffer").Buffer;function encryptByte(self,byteParam,decrypt){for(var pad,bit,value,i=-1,out=0;++i<8;)pad=self._cipher.encryptBlock(self._prev),bit=byteParam&1<<7-i?128:0,out+=(128&(value=pad[0]^bit))>>i%8,self._prev=shiftIn(self._prev,decrypt?bit:value);return out}function shiftIn(buffer,value){var len=buffer.length,i=-1,out=Buffer.allocUnsafe(buffer.length);for(buffer=Buffer.concat([buffer,Buffer.from([value])]);++i>7;return out}exports.encrypt=function(self,chunk,decrypt){for(var len=chunk.length,out=Buffer.allocUnsafe(len),i=-1;++i=0||!r.umod(priv.prime1)||!r.umod(priv.prime2);)r=new bn(randomBytes(len));return r}module.exports=crt,crt.getr=getr}).call(this,_dereq_("buffer").Buffer)},{"bn.js":"/Users/jnordberg/Development/dsteem/node_modules/bn.js/lib/bn.js",buffer:"/Users/jnordberg/Development/dsteem/node_modules/buffer/index.js",randombytes:"/Users/jnordberg/Development/dsteem/node_modules/randombytes/browser.js"}],"/Users/jnordberg/Development/dsteem/node_modules/browserify-sign/algos.js":[function(_dereq_,module,exports){module.exports=_dereq_("./browser/algorithms.json")},{"./browser/algorithms.json":"/Users/jnordberg/Development/dsteem/node_modules/browserify-sign/browser/algorithms.json"}],"/Users/jnordberg/Development/dsteem/node_modules/browserify-sign/browser/algorithms.json":[function(_dereq_,module,exports){module.exports={sha224WithRSAEncryption:{sign:"rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},"RSA-SHA224":{sign:"ecdsa/rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},sha256WithRSAEncryption:{sign:"rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},"RSA-SHA256":{sign:"ecdsa/rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},sha384WithRSAEncryption:{sign:"rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},"RSA-SHA384":{sign:"ecdsa/rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},sha512WithRSAEncryption:{sign:"rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA512":{sign:"ecdsa/rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA1":{sign:"rsa",hash:"sha1",id:"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{sign:"ecdsa",hash:"sha1",id:""},sha256:{sign:"ecdsa",hash:"sha256",id:""},sha224:{sign:"ecdsa",hash:"sha224",id:""},sha384:{sign:"ecdsa",hash:"sha384",id:""},sha512:{sign:"ecdsa",hash:"sha512",id:""},"DSA-SHA":{sign:"dsa",hash:"sha1",id:""},"DSA-SHA1":{sign:"dsa",hash:"sha1",id:""},DSA:{sign:"dsa",hash:"sha1",id:""},"DSA-WITH-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-WITH-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-WITH-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-WITH-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-RIPEMD160":{sign:"dsa",hash:"rmd160",id:""},ripemd160WithRSA:{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},"RSA-RIPEMD160":{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},md5WithRSAEncryption:{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"},"RSA-MD5":{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"}}},{}],"/Users/jnordberg/Development/dsteem/node_modules/browserify-sign/browser/curves.json":[function(_dereq_,module,exports){module.exports={"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"}},{}],"/Users/jnordberg/Development/dsteem/node_modules/browserify-sign/browser/index.js":[function(_dereq_,module,exports){(function(Buffer){var createHash=_dereq_("create-hash"),stream=_dereq_("stream"),inherits=_dereq_("inherits"),sign=_dereq_("./sign"),verify=_dereq_("./verify"),algorithms=_dereq_("./algorithms.json");function Sign(algorithm){stream.Writable.call(this);var data=algorithms[algorithm];if(!data)throw new Error("Unknown message digest");this._hashType=data.hash,this._hash=createHash(data.hash),this._tag=data.id,this._signType=data.sign}function Verify(algorithm){stream.Writable.call(this);var data=algorithms[algorithm];if(!data)throw new Error("Unknown message digest");this._hash=createHash(data.hash),this._tag=data.id,this._signType=data.sign}function createSign(algorithm){return new Sign(algorithm)}function createVerify(algorithm){return new Verify(algorithm)}Object.keys(algorithms).forEach(function(key){algorithms[key].id=new Buffer(algorithms[key].id,"hex"),algorithms[key.toLowerCase()]=algorithms[key]}),inherits(Sign,stream.Writable),Sign.prototype._write=function(data,_,done){this._hash.update(data),done()},Sign.prototype.update=function(data,enc){return"string"==typeof data&&(data=new Buffer(data,enc)),this._hash.update(data),this},Sign.prototype.sign=function(key,enc){this.end();var hash=this._hash.digest(),sig=sign(hash,key,this._hashType,this._signType,this._tag);return enc?sig.toString(enc):sig},inherits(Verify,stream.Writable),Verify.prototype._write=function(data,_,done){this._hash.update(data),done()},Verify.prototype.update=function(data,enc){return"string"==typeof data&&(data=new Buffer(data,enc)),this._hash.update(data),this},Verify.prototype.verify=function(key,sig,enc){"string"==typeof sig&&(sig=new Buffer(sig,enc)),this.end();var hash=this._hash.digest();return verify(sig,hash,key,this._signType,this._tag)},module.exports={Sign:createSign,Verify:createVerify,createSign:createSign,createVerify:createVerify}}).call(this,_dereq_("buffer").Buffer)},{"./algorithms.json":"/Users/jnordberg/Development/dsteem/node_modules/browserify-sign/browser/algorithms.json","./sign":"/Users/jnordberg/Development/dsteem/node_modules/browserify-sign/browser/sign.js","./verify":"/Users/jnordberg/Development/dsteem/node_modules/browserify-sign/browser/verify.js",buffer:"/Users/jnordberg/Development/dsteem/node_modules/buffer/index.js","create-hash":"/Users/jnordberg/Development/dsteem/node_modules/create-hash/browser.js",inherits:"/Users/jnordberg/Development/dsteem/node_modules/inherits/inherits_browser.js",stream:"/Users/jnordberg/Development/dsteem/node_modules/stream-browserify/index.js"}],"/Users/jnordberg/Development/dsteem/node_modules/browserify-sign/browser/sign.js":[function(_dereq_,module,exports){(function(Buffer){var createHmac=_dereq_("create-hmac"),crt=_dereq_("browserify-rsa"),EC=_dereq_("elliptic").ec,BN=_dereq_("bn.js"),parseKeys=_dereq_("parse-asn1"),curves=_dereq_("./curves.json");function getKey(x,q,hash,algo){if((x=new Buffer(x.toArray())).length0&&bits.ishrn(shift),bits}function makeKey(q,kv,algo){var t,k;do{for(t=new Buffer(0);8*t.length=q)throw new Error("invalid sig")}module.exports=function(sig,hash,key,signType,tag){var pub=parseKeys(key);if("ec"===pub.type){if("ecdsa"!==signType&&"ecdsa/rsa"!==signType)throw new Error("wrong public key type");return function(sig,hash,pub){var curveId=curves[pub.data.algorithm.curve.join(".")];if(!curveId)throw new Error("unknown curve "+pub.data.algorithm.curve.join("."));var curve=new EC(curveId),pubkey=pub.data.subjectPrivateKey.data;return curve.verify(hash,sig,pubkey)}(sig,hash,pub)}if("dsa"===pub.type){if("dsa"!==signType)throw new Error("wrong public key type");return function(sig,hash,pub){var p=pub.data.p,q=pub.data.q,g=pub.data.g,y=pub.data.pub_key,unpacked=parseKeys.signature.decode(sig,"der"),s=unpacked.s,r=unpacked.r;checkValue(s,q),checkValue(r,q);var montp=BN.mont(p),w=s.invm(q);return 0===g.toRed(montp).redPow(new BN(hash).mul(w).mod(q)).fromRed().mul(y.toRed(montp).redPow(r.mul(w).mod(q)).fromRed()).mod(p).mod(q).cmp(r)}(sig,hash,pub)}if("rsa"!==signType&&"ecdsa/rsa"!==signType)throw new Error("wrong public key type");hash=Buffer.concat([tag,hash]);for(var len=pub.modulus.byteLength(),pad=[1],padNum=0;hash.length+pad.length+2>5==6?2:byte>>4==14?3:byte>>3==30?4:-1}function utf8FillLast(buf){var p=this.lastTotal-this.lastNeed,r=function(self,buf,p){if(128!=(192&buf[0]))return self.lastNeed=0,"�".repeat(p);if(self.lastNeed>1&&buf.length>1){if(128!=(192&buf[1]))return self.lastNeed=1,"�".repeat(p+1);if(self.lastNeed>2&&buf.length>2&&128!=(192&buf[2]))return self.lastNeed=2,"�".repeat(p+2)}}(this,buf,p);return void 0!==r?r:this.lastNeed<=buf.length?(buf.copy(this.lastChar,p,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(buf.copy(this.lastChar,p,0,buf.length),void(this.lastNeed-=buf.length))}function utf16Text(buf,i){if((buf.length-i)%2==0){var r=buf.toString("utf16le",i);if(r){var c=r.charCodeAt(r.length-1);if(c>=55296&&c<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=buf[buf.length-2],this.lastChar[1]=buf[buf.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=buf[buf.length-1],buf.toString("utf16le",i,buf.length-1)}function utf16End(buf){var r=buf&&buf.length?this.write(buf):"";if(this.lastNeed){var end=this.lastTotal-this.lastNeed;return r+this.lastChar.toString("utf16le",0,end)}return r}function base64Text(buf,i){var n=(buf.length-i)%3;return 0===n?buf.toString("base64",i):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=buf[buf.length-1]:(this.lastChar[0]=buf[buf.length-2],this.lastChar[1]=buf[buf.length-1]),buf.toString("base64",i,buf.length-n))}function base64End(buf){var r=buf&&buf.length?this.write(buf):"";return this.lastNeed?r+this.lastChar.toString("base64",0,3-this.lastNeed):r}function simpleWrite(buf){return buf.toString(this.encoding)}function simpleEnd(buf){return buf&&buf.length?this.write(buf):""}exports.StringDecoder=StringDecoder,StringDecoder.prototype.write=function(buf){if(0===buf.length)return"";var r,i;if(this.lastNeed){if(void 0===(r=this.fillLast(buf)))return"";i=this.lastNeed,this.lastNeed=0}else i=0;return i=0?(nb>0&&(self.lastNeed=nb-1),nb):--j=0?(nb>0&&(self.lastNeed=nb-2),nb):--j=0?(nb>0&&(2===nb?nb=0:self.lastNeed=nb-3),nb):0}(this,buf,i);if(!this.lastNeed)return buf.toString("utf8",i);this.lastTotal=total;var end=buf.length-(total-this.lastNeed);return buf.copy(this.lastChar,0,end),buf.toString("utf8",i,end)},StringDecoder.prototype.fillLast=function(buf){if(this.lastNeed<=buf.length)return buf.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);buf.copy(this.lastChar,this.lastTotal-this.lastNeed,0,buf.length),this.lastNeed-=buf.length}},{"safe-buffer":"/Users/jnordberg/Development/dsteem/node_modules/safe-buffer/index.js"}],"/Users/jnordberg/Development/dsteem/node_modules/bs58/index.js":[function(_dereq_,module,exports){var basex=_dereq_("base-x");module.exports=basex("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")},{"base-x":"/Users/jnordberg/Development/dsteem/node_modules/base-x/index.js"}],"/Users/jnordberg/Development/dsteem/node_modules/buffer-xor/index.js":[function(_dereq_,module,exports){(function(Buffer){module.exports=function(a,b){for(var length=Math.min(a.length,b.length),buffer=new Buffer(length),i=0;iK_MAX_LENGTH)throw new RangeError("Invalid typed array length");var buf=new Uint8Array(length);return buf.__proto__=Buffer.prototype,buf}function Buffer(arg,encodingOrOffset,length){if("number"==typeof arg){if("string"==typeof encodingOrOffset)throw new Error("If encoding is specified then the first argument must be a string");return allocUnsafe(arg)}return from(arg,encodingOrOffset,length)}function from(value,encodingOrOffset,length){if("number"==typeof value)throw new TypeError('"value" argument must not be a number');return isArrayBuffer(value)?function(array,byteOffset,length){if(byteOffset<0||array.byteLength=K_MAX_LENGTH)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+K_MAX_LENGTH.toString(16)+" bytes");return 0|length}function byteLength(string,encoding){if(Buffer.isBuffer(string))return string.length;if(isArrayBufferView(string)||isArrayBuffer(string))return string.byteLength;"string"!=typeof string&&(string=""+string);var len=string.length;if(0===len)return 0;for(var loweredCase=!1;;)switch(encoding){case"ascii":case"latin1":case"binary":return len;case"utf8":case"utf-8":case void 0:return utf8ToBytes(string).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*len;case"hex":return len>>>1;case"base64":return base64ToBytes(string).length;default:if(loweredCase)return utf8ToBytes(string).length;encoding=(""+encoding).toLowerCase(),loweredCase=!0}}function swap(b,n,m){var i=b[n];b[n]=b[m],b[m]=i}function bidirectionalIndexOf(buffer,val,byteOffset,encoding,dir){if(0===buffer.length)return-1;if("string"==typeof byteOffset?(encoding=byteOffset,byteOffset=0):byteOffset>2147483647?byteOffset=2147483647:byteOffset<-2147483648&&(byteOffset=-2147483648),numberIsNaN(byteOffset=+byteOffset)&&(byteOffset=dir?0:buffer.length-1),byteOffset<0&&(byteOffset=buffer.length+byteOffset),byteOffset>=buffer.length){if(dir)return-1;byteOffset=buffer.length-1}else if(byteOffset<0){if(!dir)return-1;byteOffset=0}if("string"==typeof val&&(val=Buffer.from(val,encoding)),Buffer.isBuffer(val))return 0===val.length?-1:arrayIndexOf(buffer,val,byteOffset,encoding,dir);if("number"==typeof val)return val&=255,"function"==typeof Uint8Array.prototype.indexOf?dir?Uint8Array.prototype.indexOf.call(buffer,val,byteOffset):Uint8Array.prototype.lastIndexOf.call(buffer,val,byteOffset):arrayIndexOf(buffer,[val],byteOffset,encoding,dir);throw new TypeError("val must be string, number or Buffer")}function arrayIndexOf(arr,val,byteOffset,encoding,dir){var i,indexSize=1,arrLength=arr.length,valLength=val.length;if(void 0!==encoding&&("ucs2"===(encoding=String(encoding).toLowerCase())||"ucs-2"===encoding||"utf16le"===encoding||"utf-16le"===encoding)){if(arr.length<2||val.length<2)return-1;indexSize=2,arrLength/=2,valLength/=2,byteOffset/=2}function read(buf,i){return 1===indexSize?buf[i]:buf.readUInt16BE(i*indexSize)}if(dir){var foundIndex=-1;for(i=byteOffset;iarrLength&&(byteOffset=arrLength-valLength),i=byteOffset;i>=0;i--){for(var found=!0,j=0;jremaining&&(length=remaining):length=remaining;var strLen=string.length;if(strLen%2!=0)throw new TypeError("Invalid hex string");length>strLen/2&&(length=strLen/2);for(var i=0;i>8,lo=c%256,byteArray.push(lo),byteArray.push(hi);return byteArray}(string,buf.length-offset),buf,offset,length)}function base64Slice(buf,start,end){return 0===start&&end===buf.length?base64.fromByteArray(buf):base64.fromByteArray(buf.slice(start,end))}function utf8Slice(buf,start,end){end=Math.min(buf.length,end);for(var res=[],i=start;i239?4:firstByte>223?3:firstByte>191?2:1;if(i+bytesPerSequence<=end)switch(bytesPerSequence){case 1:firstByte<128&&(codePoint=firstByte);break;case 2:128==(192&(secondByte=buf[i+1]))&&(tempCodePoint=(31&firstByte)<<6|63&secondByte)>127&&(codePoint=tempCodePoint);break;case 3:secondByte=buf[i+1],thirdByte=buf[i+2],128==(192&secondByte)&&128==(192&thirdByte)&&(tempCodePoint=(15&firstByte)<<12|(63&secondByte)<<6|63&thirdByte)>2047&&(tempCodePoint<55296||tempCodePoint>57343)&&(codePoint=tempCodePoint);break;case 4:secondByte=buf[i+1],thirdByte=buf[i+2],fourthByte=buf[i+3],128==(192&secondByte)&&128==(192&thirdByte)&&128==(192&fourthByte)&&(tempCodePoint=(15&firstByte)<<18|(63&secondByte)<<12|(63&thirdByte)<<6|63&fourthByte)>65535&&tempCodePoint<1114112&&(codePoint=tempCodePoint)}null===codePoint?(codePoint=65533,bytesPerSequence=1):codePoint>65535&&(codePoint-=65536,res.push(codePoint>>>10&1023|55296),codePoint=56320|1023&codePoint),res.push(codePoint),i+=bytesPerSequence}return function(codePoints){var len=codePoints.length;if(len<=MAX_ARGUMENTS_LENGTH)return String.fromCharCode.apply(String,codePoints);for(var res="",i=0;ithis.length)return"";if((void 0===end||end>this.length)&&(end=this.length),end<=0)return"";if((end>>>=0)<=(start>>>=0))return"";for(encoding||(encoding="utf8");;)switch(encoding){case"hex":return hexSlice(this,start,end);case"utf8":case"utf-8":return utf8Slice(this,start,end);case"ascii":return asciiSlice(this,start,end);case"latin1":case"binary":return latin1Slice(this,start,end);case"base64":return base64Slice(this,start,end);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return utf16leSlice(this,start,end);default:if(loweredCase)throw new TypeError("Unknown encoding: "+encoding);encoding=(encoding+"").toLowerCase(),loweredCase=!0}}.apply(this,arguments)},Buffer.prototype.equals=function(b){if(!Buffer.isBuffer(b))throw new TypeError("Argument must be a Buffer");return this===b||0===Buffer.compare(this,b)},Buffer.prototype.inspect=function(){var str="",max=exports.INSPECT_MAX_BYTES;return this.length>0&&(str=this.toString("hex",0,max).match(/.{2}/g).join(" "),this.length>max&&(str+=" ... ")),""},Buffer.prototype.compare=function(target,start,end,thisStart,thisEnd){if(!Buffer.isBuffer(target))throw new TypeError("Argument must be a Buffer");if(void 0===start&&(start=0),void 0===end&&(end=target?target.length:0),void 0===thisStart&&(thisStart=0),void 0===thisEnd&&(thisEnd=this.length),start<0||end>target.length||thisStart<0||thisEnd>this.length)throw new RangeError("out of range index");if(thisStart>=thisEnd&&start>=end)return 0;if(thisStart>=thisEnd)return-1;if(start>=end)return 1;if(start>>>=0,end>>>=0,thisStart>>>=0,thisEnd>>>=0,this===target)return 0;for(var x=thisEnd-thisStart,y=end-start,len=Math.min(x,y),thisCopy=this.slice(thisStart,thisEnd),targetCopy=target.slice(start,end),i=0;i>>=0,isFinite(length)?(length>>>=0,void 0===encoding&&(encoding="utf8")):(encoding=length,length=void 0)}var remaining=this.length-offset;if((void 0===length||length>remaining)&&(length=remaining),string.length>0&&(length<0||offset<0)||offset>this.length)throw new RangeError("Attempt to write outside buffer bounds");encoding||(encoding="utf8");for(var loweredCase=!1;;)switch(encoding){case"hex":return hexWrite(this,string,offset,length);case"utf8":case"utf-8":return utf8Write(this,string,offset,length);case"ascii":return asciiWrite(this,string,offset,length);case"latin1":case"binary":return latin1Write(this,string,offset,length);case"base64":return base64Write(this,string,offset,length);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ucs2Write(this,string,offset,length);default:if(loweredCase)throw new TypeError("Unknown encoding: "+encoding);encoding=(""+encoding).toLowerCase(),loweredCase=!0}},Buffer.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var MAX_ARGUMENTS_LENGTH=4096;function asciiSlice(buf,start,end){var ret="";end=Math.min(buf.length,end);for(var i=start;ilen)&&(end=len);for(var out="",i=start;ilength)throw new RangeError("Trying to access beyond buffer length")}function checkInt(buf,value,offset,ext,max,min){if(!Buffer.isBuffer(buf))throw new TypeError('"buffer" argument must be a Buffer instance');if(value>max||valuebuf.length)throw new RangeError("Index out of range")}function checkIEEE754(buf,value,offset,ext,max,min){if(offset+ext>buf.length)throw new RangeError("Index out of range");if(offset<0)throw new RangeError("Index out of range")}function writeFloat(buf,value,offset,littleEndian,noAssert){return value=+value,offset>>>=0,noAssert||checkIEEE754(buf,0,offset,4),ieee754.write(buf,value,offset,littleEndian,23,4),offset+4}function writeDouble(buf,value,offset,littleEndian,noAssert){return value=+value,offset>>>=0,noAssert||checkIEEE754(buf,0,offset,8),ieee754.write(buf,value,offset,littleEndian,52,8),offset+8}Buffer.prototype.slice=function(start,end){var len=this.length;start=~~start,end=void 0===end?len:~~end,start<0?(start+=len)<0&&(start=0):start>len&&(start=len),end<0?(end+=len)<0&&(end=0):end>len&&(end=len),end>>=0,byteLength>>>=0,noAssert||checkOffset(offset,byteLength,this.length);for(var val=this[offset],mul=1,i=0;++i>>=0,byteLength>>>=0,noAssert||checkOffset(offset,byteLength,this.length);for(var val=this[offset+--byteLength],mul=1;byteLength>0&&(mul*=256);)val+=this[offset+--byteLength]*mul;return val},Buffer.prototype.readUInt8=function(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,1,this.length),this[offset]},Buffer.prototype.readUInt16LE=function(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,2,this.length),this[offset]|this[offset+1]<<8},Buffer.prototype.readUInt16BE=function(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,2,this.length),this[offset]<<8|this[offset+1]},Buffer.prototype.readUInt32LE=function(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,4,this.length),(this[offset]|this[offset+1]<<8|this[offset+2]<<16)+16777216*this[offset+3]},Buffer.prototype.readUInt32BE=function(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,4,this.length),16777216*this[offset]+(this[offset+1]<<16|this[offset+2]<<8|this[offset+3])},Buffer.prototype.readIntLE=function(offset,byteLength,noAssert){offset>>>=0,byteLength>>>=0,noAssert||checkOffset(offset,byteLength,this.length);for(var val=this[offset],mul=1,i=0;++i=(mul*=128)&&(val-=Math.pow(2,8*byteLength)),val},Buffer.prototype.readIntBE=function(offset,byteLength,noAssert){offset>>>=0,byteLength>>>=0,noAssert||checkOffset(offset,byteLength,this.length);for(var i=byteLength,mul=1,val=this[offset+--i];i>0&&(mul*=256);)val+=this[offset+--i]*mul;return val>=(mul*=128)&&(val-=Math.pow(2,8*byteLength)),val},Buffer.prototype.readInt8=function(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,1,this.length),128&this[offset]?-1*(255-this[offset]+1):this[offset]},Buffer.prototype.readInt16LE=function(offset,noAssert){offset>>>=0,noAssert||checkOffset(offset,2,this.length);var val=this[offset]|this[offset+1]<<8;return 32768&val?4294901760|val:val},Buffer.prototype.readInt16BE=function(offset,noAssert){offset>>>=0,noAssert||checkOffset(offset,2,this.length);var val=this[offset+1]|this[offset]<<8;return 32768&val?4294901760|val:val},Buffer.prototype.readInt32LE=function(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,4,this.length),this[offset]|this[offset+1]<<8|this[offset+2]<<16|this[offset+3]<<24},Buffer.prototype.readInt32BE=function(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,4,this.length),this[offset]<<24|this[offset+1]<<16|this[offset+2]<<8|this[offset+3]},Buffer.prototype.readFloatLE=function(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,4,this.length),ieee754.read(this,offset,!0,23,4)},Buffer.prototype.readFloatBE=function(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,4,this.length),ieee754.read(this,offset,!1,23,4)},Buffer.prototype.readDoubleLE=function(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,8,this.length),ieee754.read(this,offset,!0,52,8)},Buffer.prototype.readDoubleBE=function(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,8,this.length),ieee754.read(this,offset,!1,52,8)},Buffer.prototype.writeUIntLE=function(value,offset,byteLength,noAssert){value=+value,offset>>>=0,byteLength>>>=0,noAssert||checkInt(this,value,offset,byteLength,Math.pow(2,8*byteLength)-1,0);var mul=1,i=0;for(this[offset]=255&value;++i>>=0,byteLength>>>=0,noAssert||checkInt(this,value,offset,byteLength,Math.pow(2,8*byteLength)-1,0);var i=byteLength-1,mul=1;for(this[offset+i]=255&value;--i>=0&&(mul*=256);)this[offset+i]=value/mul&255;return offset+byteLength},Buffer.prototype.writeUInt8=function(value,offset,noAssert){return value=+value,offset>>>=0,noAssert||checkInt(this,value,offset,1,255,0),this[offset]=255&value,offset+1},Buffer.prototype.writeUInt16LE=function(value,offset,noAssert){return value=+value,offset>>>=0,noAssert||checkInt(this,value,offset,2,65535,0),this[offset]=255&value,this[offset+1]=value>>>8,offset+2},Buffer.prototype.writeUInt16BE=function(value,offset,noAssert){return value=+value,offset>>>=0,noAssert||checkInt(this,value,offset,2,65535,0),this[offset]=value>>>8,this[offset+1]=255&value,offset+2},Buffer.prototype.writeUInt32LE=function(value,offset,noAssert){return value=+value,offset>>>=0,noAssert||checkInt(this,value,offset,4,4294967295,0),this[offset+3]=value>>>24,this[offset+2]=value>>>16,this[offset+1]=value>>>8,this[offset]=255&value,offset+4},Buffer.prototype.writeUInt32BE=function(value,offset,noAssert){return value=+value,offset>>>=0,noAssert||checkInt(this,value,offset,4,4294967295,0),this[offset]=value>>>24,this[offset+1]=value>>>16,this[offset+2]=value>>>8,this[offset+3]=255&value,offset+4},Buffer.prototype.writeIntLE=function(value,offset,byteLength,noAssert){if(value=+value,offset>>>=0,!noAssert){var limit=Math.pow(2,8*byteLength-1);checkInt(this,value,offset,byteLength,limit-1,-limit)}var i=0,mul=1,sub=0;for(this[offset]=255&value;++i>0)-sub&255;return offset+byteLength},Buffer.prototype.writeIntBE=function(value,offset,byteLength,noAssert){if(value=+value,offset>>>=0,!noAssert){var limit=Math.pow(2,8*byteLength-1);checkInt(this,value,offset,byteLength,limit-1,-limit)}var i=byteLength-1,mul=1,sub=0;for(this[offset+i]=255&value;--i>=0&&(mul*=256);)value<0&&0===sub&&0!==this[offset+i+1]&&(sub=1),this[offset+i]=(value/mul>>0)-sub&255;return offset+byteLength},Buffer.prototype.writeInt8=function(value,offset,noAssert){return value=+value,offset>>>=0,noAssert||checkInt(this,value,offset,1,127,-128),value<0&&(value=255+value+1),this[offset]=255&value,offset+1},Buffer.prototype.writeInt16LE=function(value,offset,noAssert){return value=+value,offset>>>=0,noAssert||checkInt(this,value,offset,2,32767,-32768),this[offset]=255&value,this[offset+1]=value>>>8,offset+2},Buffer.prototype.writeInt16BE=function(value,offset,noAssert){return value=+value,offset>>>=0,noAssert||checkInt(this,value,offset,2,32767,-32768),this[offset]=value>>>8,this[offset+1]=255&value,offset+2},Buffer.prototype.writeInt32LE=function(value,offset,noAssert){return value=+value,offset>>>=0,noAssert||checkInt(this,value,offset,4,2147483647,-2147483648),this[offset]=255&value,this[offset+1]=value>>>8,this[offset+2]=value>>>16,this[offset+3]=value>>>24,offset+4},Buffer.prototype.writeInt32BE=function(value,offset,noAssert){return value=+value,offset>>>=0,noAssert||checkInt(this,value,offset,4,2147483647,-2147483648),value<0&&(value=4294967295+value+1),this[offset]=value>>>24,this[offset+1]=value>>>16,this[offset+2]=value>>>8,this[offset+3]=255&value,offset+4},Buffer.prototype.writeFloatLE=function(value,offset,noAssert){return writeFloat(this,value,offset,!0,noAssert)},Buffer.prototype.writeFloatBE=function(value,offset,noAssert){return writeFloat(this,value,offset,!1,noAssert)},Buffer.prototype.writeDoubleLE=function(value,offset,noAssert){return writeDouble(this,value,offset,!0,noAssert)},Buffer.prototype.writeDoubleBE=function(value,offset,noAssert){return writeDouble(this,value,offset,!1,noAssert)},Buffer.prototype.copy=function(target,targetStart,start,end){if(start||(start=0),end||0===end||(end=this.length),targetStart>=target.length&&(targetStart=target.length),targetStart||(targetStart=0),end>0&&end=this.length)throw new RangeError("sourceStart out of bounds");if(end<0)throw new RangeError("sourceEnd out of bounds");end>this.length&&(end=this.length),target.length-targetStart=0;--i)target[i+targetStart]=this[i+start];else if(len<1e3)for(i=0;i>>=0,end=void 0===end?this.length:end>>>0,val||(val=0),"number"==typeof val)for(i=start;i55295&&codePoint<57344){if(!leadSurrogate){if(codePoint>56319){(units-=3)>-1&&bytes.push(239,191,189);continue}if(i+1===length){(units-=3)>-1&&bytes.push(239,191,189);continue}leadSurrogate=codePoint;continue}if(codePoint<56320){(units-=3)>-1&&bytes.push(239,191,189),leadSurrogate=codePoint;continue}codePoint=65536+(leadSurrogate-55296<<10|codePoint-56320)}else leadSurrogate&&(units-=3)>-1&&bytes.push(239,191,189);if(leadSurrogate=null,codePoint<128){if((units-=1)<0)break;bytes.push(codePoint)}else if(codePoint<2048){if((units-=2)<0)break;bytes.push(codePoint>>6|192,63&codePoint|128)}else if(codePoint<65536){if((units-=3)<0)break;bytes.push(codePoint>>12|224,codePoint>>6&63|128,63&codePoint|128)}else{if(!(codePoint<1114112))throw new Error("Invalid code point");if((units-=4)<0)break;bytes.push(codePoint>>18|240,codePoint>>12&63|128,codePoint>>6&63|128,63&codePoint|128)}}return bytes}function base64ToBytes(str){return base64.toByteArray(function(str){if((str=str.trim().replace(INVALID_BASE64_RE,"")).length<2)return"";for(;str.length%4!=0;)str+="=";return str}(str))}function blitBuffer(src,dst,offset,length){for(var i=0;i=dst.length||i>=src.length);++i)dst[i+offset]=src[i];return i}function isArrayBuffer(obj){return obj instanceof ArrayBuffer||null!=obj&&null!=obj.constructor&&"ArrayBuffer"===obj.constructor.name&&"number"==typeof obj.byteLength}function isArrayBufferView(obj){return"function"==typeof ArrayBuffer.isView&&ArrayBuffer.isView(obj)}function numberIsNaN(obj){return obj!=obj}},{"base64-js":"/Users/jnordberg/Development/dsteem/node_modules/base64-js/index.js",ieee754:"/Users/jnordberg/Development/dsteem/node_modules/ieee754/index.js"}],"/Users/jnordberg/Development/dsteem/node_modules/bytebuffer/dist/bytebuffer.js":[function(_dereq_,module,exports){var factory;factory=function(Long){"use strict";var ByteBuffer=function(capacity,littleEndian,noAssert){if(void 0===capacity&&(capacity=ByteBuffer.DEFAULT_CAPACITY),void 0===littleEndian&&(littleEndian=ByteBuffer.DEFAULT_ENDIAN),void 0===noAssert&&(noAssert=ByteBuffer.DEFAULT_NOASSERT),!noAssert){if((capacity|=0)<0)throw RangeError("Illegal capacity");littleEndian=!!littleEndian,noAssert=!!noAssert}this.buffer=0===capacity?EMPTY_BUFFER:new ArrayBuffer(capacity),this.view=0===capacity?null:new Uint8Array(this.buffer),this.offset=0,this.markedOffset=-1,this.limit=capacity,this.littleEndian=littleEndian,this.noAssert=noAssert};ByteBuffer.VERSION="5.0.1",ByteBuffer.LITTLE_ENDIAN=!0,ByteBuffer.BIG_ENDIAN=!1,ByteBuffer.DEFAULT_CAPACITY=16,ByteBuffer.DEFAULT_ENDIAN=ByteBuffer.BIG_ENDIAN,ByteBuffer.DEFAULT_NOASSERT=!1,ByteBuffer.Long=Long||null;var ByteBufferPrototype=ByteBuffer.prototype;ByteBufferPrototype.__isByteBuffer__,Object.defineProperty(ByteBufferPrototype,"__isByteBuffer__",{value:!0,enumerable:!1,configurable:!1});var EMPTY_BUFFER=new ArrayBuffer(0),stringFromCharCode=String.fromCharCode;function stringSource(s){var i=0;return function(){return i1024&&(ps.push(stringFromCharCode.apply(String,cs)),cs.length=0),Array.prototype.push.apply(cs,arguments)}}function ieee754_read(buffer,offset,isLE,mLen,nBytes){var e,m,eLen=8*nBytes-mLen-1,eMax=(1<>1,nBits=-7,i=isLE?nBytes-1:0,d=isLE?-1:1,s=buffer[offset+i];for(i+=d,e=s&(1<<-nBits)-1,s>>=-nBits,nBits+=eLen;nBits>0;e=256*e+buffer[offset+i],i+=d,nBits-=8);for(m=e&(1<<-nBits)-1,e>>=-nBits,nBits+=mLen;nBits>0;m=256*m+buffer[offset+i],i+=d,nBits-=8);if(0===e)e=1-eBias;else{if(e===eMax)return m?NaN:Infinity*(s?-1:1);m+=Math.pow(2,mLen),e-=eBias}return(s?-1:1)*m*Math.pow(2,e-mLen)}function ieee754_write(buffer,value,offset,isLE,mLen,nBytes){var e,m,c,eLen=8*nBytes-mLen-1,eMax=(1<>1,rt=23===mLen?Math.pow(2,-24)-Math.pow(2,-77):0,i=isLE?0:nBytes-1,d=isLE?1:-1,s=value<0||0===value&&1/value<0?1:0;for(value=Math.abs(value),isNaN(value)||Infinity===value?(m=isNaN(value)?1:0,e=eMax):(e=Math.floor(Math.log(value)/Math.LN2),value*(c=Math.pow(2,-e))<1&&(e--,c*=2),(value+=e+eBias>=1?rt/c:rt*Math.pow(2,1-eBias))*c>=2&&(e++,c/=2),e+eBias>=eMax?(m=0,e=eMax):e+eBias>=1?(m=(value*c-1)*Math.pow(2,mLen),e+=eBias):(m=value*Math.pow(2,eBias-1)*Math.pow(2,mLen),e=0));mLen>=8;buffer[offset+i]=255&m,i+=d,m/=256,mLen-=8);for(e=e<0;buffer[offset+i]=255&e,i+=d,e/=256,eLen-=8);buffer[offset+i-d]|=128*s}ByteBuffer.accessor=function(){return Uint8Array},ByteBuffer.allocate=function(capacity,littleEndian,noAssert){return new ByteBuffer(capacity,littleEndian,noAssert)},ByteBuffer.concat=function(buffers,encoding,littleEndian,noAssert){"boolean"!=typeof encoding&&"string"==typeof encoding||(noAssert=littleEndian,littleEndian=encoding,encoding=void 0);for(var length,capacity=0,i=0,k=buffers.length;i0&&(capacity+=length);if(0===capacity)return new ByteBuffer(0,littleEndian,noAssert);var bi,bb=new ByteBuffer(capacity,littleEndian,noAssert);for(i=0;i0&&(bb.buffer=buffer.buffer,bb.offset=buffer.byteOffset,bb.limit=buffer.byteOffset+buffer.byteLength,bb.view=new Uint8Array(buffer.buffer));else if(buffer instanceof ArrayBuffer)bb=new ByteBuffer(0,littleEndian,noAssert),buffer.byteLength>0&&(bb.buffer=buffer,bb.offset=0,bb.limit=buffer.byteLength,bb.view=buffer.byteLength>0?new Uint8Array(buffer):null);else{if("[object Array]"!==Object.prototype.toString.call(buffer))throw TypeError("Illegal buffer");(bb=new ByteBuffer(buffer.length,littleEndian,noAssert)).limit=buffer.length;for(var i=0;i>>=0)<0||offset+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+offset+" (+0) <= "+this.buffer.byteLength)}var k,start=offset,bits=value.length,bytes=bits>>3,bit=0;for(offset+=this.writeVarint32(bits,offset);bytes--;)k=1&!!value[bit++]|(1&!!value[bit++])<<1|(1&!!value[bit++])<<2|(1&!!value[bit++])<<3|(1&!!value[bit++])<<4|(1&!!value[bit++])<<5|(1&!!value[bit++])<<6|(1&!!value[bit++])<<7,this.writeByte(k,offset++);if(bit>3,bit=0,value=[];for(offset+=ret.length;bytes--;)k=this.readByte(offset++),value[bit++]=!!(1&k),value[bit++]=!!(2&k),value[bit++]=!!(4&k),value[bit++]=!!(8&k),value[bit++]=!!(16&k),value[bit++]=!!(32&k),value[bit++]=!!(64&k),value[bit++]=!!(128&k);if(bit>m++&1)}return relative&&(this.offset=offset),value},ByteBufferPrototype.readBytes=function(length,offset){var relative=void 0===offset;if(relative&&(offset=this.offset),!this.noAssert){if("number"!=typeof offset||offset%1!=0)throw TypeError("Illegal offset: "+offset+" (not an integer)");if((offset>>>=0)<0||offset+length>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+offset+" (+"+length+") <= "+this.buffer.byteLength)}var slice=this.slice(offset,offset+length);return relative&&(this.offset+=length),slice},ByteBufferPrototype.writeBytes=ByteBufferPrototype.append,ByteBufferPrototype.writeInt8=function(value,offset){var relative=void 0===offset;if(relative&&(offset=this.offset),!this.noAssert){if("number"!=typeof value||value%1!=0)throw TypeError("Illegal value: "+value+" (not an integer)");if(value|=0,"number"!=typeof offset||offset%1!=0)throw TypeError("Illegal offset: "+offset+" (not an integer)");if((offset>>>=0)<0||offset+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+offset+" (+0) <= "+this.buffer.byteLength)}offset+=1;var capacity0=this.buffer.byteLength;return offset>capacity0&&this.resize((capacity0*=2)>offset?capacity0:offset),offset-=1,this.view[offset]=value,relative&&(this.offset+=1),this},ByteBufferPrototype.writeByte=ByteBufferPrototype.writeInt8,ByteBufferPrototype.readInt8=function(offset){var relative=void 0===offset;if(relative&&(offset=this.offset),!this.noAssert){if("number"!=typeof offset||offset%1!=0)throw TypeError("Illegal offset: "+offset+" (not an integer)");if((offset>>>=0)<0||offset+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+offset+" (+1) <= "+this.buffer.byteLength)}var value=this.view[offset];return 128==(128&value)&&(value=-(255-value+1)),relative&&(this.offset+=1),value},ByteBufferPrototype.readByte=ByteBufferPrototype.readInt8,ByteBufferPrototype.writeUint8=function(value,offset){var relative=void 0===offset;if(relative&&(offset=this.offset),!this.noAssert){if("number"!=typeof value||value%1!=0)throw TypeError("Illegal value: "+value+" (not an integer)");if(value>>>=0,"number"!=typeof offset||offset%1!=0)throw TypeError("Illegal offset: "+offset+" (not an integer)");if((offset>>>=0)<0||offset+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+offset+" (+0) <= "+this.buffer.byteLength)}offset+=1;var capacity1=this.buffer.byteLength;return offset>capacity1&&this.resize((capacity1*=2)>offset?capacity1:offset),offset-=1,this.view[offset]=value,relative&&(this.offset+=1),this},ByteBufferPrototype.writeUInt8=ByteBufferPrototype.writeUint8,ByteBufferPrototype.readUint8=function(offset){var relative=void 0===offset;if(relative&&(offset=this.offset),!this.noAssert){if("number"!=typeof offset||offset%1!=0)throw TypeError("Illegal offset: "+offset+" (not an integer)");if((offset>>>=0)<0||offset+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+offset+" (+1) <= "+this.buffer.byteLength)}var value=this.view[offset];return relative&&(this.offset+=1),value},ByteBufferPrototype.readUInt8=ByteBufferPrototype.readUint8,ByteBufferPrototype.writeInt16=function(value,offset){var relative=void 0===offset;if(relative&&(offset=this.offset),!this.noAssert){if("number"!=typeof value||value%1!=0)throw TypeError("Illegal value: "+value+" (not an integer)");if(value|=0,"number"!=typeof offset||offset%1!=0)throw TypeError("Illegal offset: "+offset+" (not an integer)");if((offset>>>=0)<0||offset+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+offset+" (+0) <= "+this.buffer.byteLength)}offset+=2;var capacity2=this.buffer.byteLength;return offset>capacity2&&this.resize((capacity2*=2)>offset?capacity2:offset),offset-=2,this.littleEndian?(this.view[offset+1]=(65280&value)>>>8,this.view[offset]=255&value):(this.view[offset]=(65280&value)>>>8,this.view[offset+1]=255&value),relative&&(this.offset+=2),this},ByteBufferPrototype.writeShort=ByteBufferPrototype.writeInt16,ByteBufferPrototype.readInt16=function(offset){var relative=void 0===offset;if(relative&&(offset=this.offset),!this.noAssert){if("number"!=typeof offset||offset%1!=0)throw TypeError("Illegal offset: "+offset+" (not an integer)");if((offset>>>=0)<0||offset+2>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+offset+" (+2) <= "+this.buffer.byteLength)}var value=0;return this.littleEndian?(value=this.view[offset],value|=this.view[offset+1]<<8):(value=this.view[offset]<<8,value|=this.view[offset+1]),32768==(32768&value)&&(value=-(65535-value+1)),relative&&(this.offset+=2),value},ByteBufferPrototype.readShort=ByteBufferPrototype.readInt16,ByteBufferPrototype.writeUint16=function(value,offset){var relative=void 0===offset;if(relative&&(offset=this.offset),!this.noAssert){if("number"!=typeof value||value%1!=0)throw TypeError("Illegal value: "+value+" (not an integer)");if(value>>>=0,"number"!=typeof offset||offset%1!=0)throw TypeError("Illegal offset: "+offset+" (not an integer)");if((offset>>>=0)<0||offset+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+offset+" (+0) <= "+this.buffer.byteLength)}offset+=2;var capacity3=this.buffer.byteLength;return offset>capacity3&&this.resize((capacity3*=2)>offset?capacity3:offset),offset-=2,this.littleEndian?(this.view[offset+1]=(65280&value)>>>8,this.view[offset]=255&value):(this.view[offset]=(65280&value)>>>8,this.view[offset+1]=255&value),relative&&(this.offset+=2),this},ByteBufferPrototype.writeUInt16=ByteBufferPrototype.writeUint16,ByteBufferPrototype.readUint16=function(offset){var relative=void 0===offset;if(relative&&(offset=this.offset),!this.noAssert){if("number"!=typeof offset||offset%1!=0)throw TypeError("Illegal offset: "+offset+" (not an integer)");if((offset>>>=0)<0||offset+2>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+offset+" (+2) <= "+this.buffer.byteLength)}var value=0;return this.littleEndian?(value=this.view[offset],value|=this.view[offset+1]<<8):(value=this.view[offset]<<8,value|=this.view[offset+1]),relative&&(this.offset+=2),value},ByteBufferPrototype.readUInt16=ByteBufferPrototype.readUint16,ByteBufferPrototype.writeInt32=function(value,offset){var relative=void 0===offset;if(relative&&(offset=this.offset),!this.noAssert){if("number"!=typeof value||value%1!=0)throw TypeError("Illegal value: "+value+" (not an integer)");if(value|=0,"number"!=typeof offset||offset%1!=0)throw TypeError("Illegal offset: "+offset+" (not an integer)");if((offset>>>=0)<0||offset+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+offset+" (+0) <= "+this.buffer.byteLength)}offset+=4;var capacity4=this.buffer.byteLength;return offset>capacity4&&this.resize((capacity4*=2)>offset?capacity4:offset),offset-=4,this.littleEndian?(this.view[offset+3]=value>>>24&255,this.view[offset+2]=value>>>16&255,this.view[offset+1]=value>>>8&255,this.view[offset]=255&value):(this.view[offset]=value>>>24&255,this.view[offset+1]=value>>>16&255,this.view[offset+2]=value>>>8&255,this.view[offset+3]=255&value),relative&&(this.offset+=4),this},ByteBufferPrototype.writeInt=ByteBufferPrototype.writeInt32,ByteBufferPrototype.readInt32=function(offset){var relative=void 0===offset;if(relative&&(offset=this.offset),!this.noAssert){if("number"!=typeof offset||offset%1!=0)throw TypeError("Illegal offset: "+offset+" (not an integer)");if((offset>>>=0)<0||offset+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+offset+" (+4) <= "+this.buffer.byteLength)}var value=0;return this.littleEndian?(value=this.view[offset+2]<<16,value|=this.view[offset+1]<<8,value|=this.view[offset],value+=this.view[offset+3]<<24>>>0):(value=this.view[offset+1]<<16,value|=this.view[offset+2]<<8,value|=this.view[offset+3],value+=this.view[offset]<<24>>>0),value|=0,relative&&(this.offset+=4),value},ByteBufferPrototype.readInt=ByteBufferPrototype.readInt32,ByteBufferPrototype.writeUint32=function(value,offset){var relative=void 0===offset;if(relative&&(offset=this.offset),!this.noAssert){if("number"!=typeof value||value%1!=0)throw TypeError("Illegal value: "+value+" (not an integer)");if(value>>>=0,"number"!=typeof offset||offset%1!=0)throw TypeError("Illegal offset: "+offset+" (not an integer)");if((offset>>>=0)<0||offset+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+offset+" (+0) <= "+this.buffer.byteLength)}offset+=4;var capacity5=this.buffer.byteLength;return offset>capacity5&&this.resize((capacity5*=2)>offset?capacity5:offset),offset-=4,this.littleEndian?(this.view[offset+3]=value>>>24&255,this.view[offset+2]=value>>>16&255,this.view[offset+1]=value>>>8&255,this.view[offset]=255&value):(this.view[offset]=value>>>24&255,this.view[offset+1]=value>>>16&255,this.view[offset+2]=value>>>8&255,this.view[offset+3]=255&value),relative&&(this.offset+=4),this},ByteBufferPrototype.writeUInt32=ByteBufferPrototype.writeUint32,ByteBufferPrototype.readUint32=function(offset){var relative=void 0===offset;if(relative&&(offset=this.offset),!this.noAssert){if("number"!=typeof offset||offset%1!=0)throw TypeError("Illegal offset: "+offset+" (not an integer)");if((offset>>>=0)<0||offset+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+offset+" (+4) <= "+this.buffer.byteLength)}var value=0;return this.littleEndian?(value=this.view[offset+2]<<16,value|=this.view[offset+1]<<8,value|=this.view[offset],value+=this.view[offset+3]<<24>>>0):(value=this.view[offset+1]<<16,value|=this.view[offset+2]<<8,value|=this.view[offset+3],value+=this.view[offset]<<24>>>0),relative&&(this.offset+=4),value},ByteBufferPrototype.readUInt32=ByteBufferPrototype.readUint32,Long&&(ByteBufferPrototype.writeInt64=function(value,offset){var relative=void 0===offset;if(relative&&(offset=this.offset),!this.noAssert){if("number"==typeof value)value=Long.fromNumber(value);else if("string"==typeof value)value=Long.fromString(value);else if(!(value&&value instanceof Long))throw TypeError("Illegal value: "+value+" (not an integer or Long)");if("number"!=typeof offset||offset%1!=0)throw TypeError("Illegal offset: "+offset+" (not an integer)");if((offset>>>=0)<0||offset+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+offset+" (+0) <= "+this.buffer.byteLength)}"number"==typeof value?value=Long.fromNumber(value):"string"==typeof value&&(value=Long.fromString(value)),offset+=8;var capacity6=this.buffer.byteLength;offset>capacity6&&this.resize((capacity6*=2)>offset?capacity6:offset),offset-=8;var lo=value.low,hi=value.high;return this.littleEndian?(this.view[offset+3]=lo>>>24&255,this.view[offset+2]=lo>>>16&255,this.view[offset+1]=lo>>>8&255,this.view[offset]=255&lo,offset+=4,this.view[offset+3]=hi>>>24&255,this.view[offset+2]=hi>>>16&255,this.view[offset+1]=hi>>>8&255,this.view[offset]=255&hi):(this.view[offset]=hi>>>24&255,this.view[offset+1]=hi>>>16&255,this.view[offset+2]=hi>>>8&255,this.view[offset+3]=255&hi,offset+=4,this.view[offset]=lo>>>24&255,this.view[offset+1]=lo>>>16&255,this.view[offset+2]=lo>>>8&255,this.view[offset+3]=255&lo),relative&&(this.offset+=8),this},ByteBufferPrototype.writeLong=ByteBufferPrototype.writeInt64,ByteBufferPrototype.readInt64=function(offset){var relative=void 0===offset;if(relative&&(offset=this.offset),!this.noAssert){if("number"!=typeof offset||offset%1!=0)throw TypeError("Illegal offset: "+offset+" (not an integer)");if((offset>>>=0)<0||offset+8>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+offset+" (+8) <= "+this.buffer.byteLength)}var lo=0,hi=0;this.littleEndian?(lo=this.view[offset+2]<<16,lo|=this.view[offset+1]<<8,lo|=this.view[offset],lo+=this.view[offset+3]<<24>>>0,offset+=4,hi=this.view[offset+2]<<16,hi|=this.view[offset+1]<<8,hi|=this.view[offset],hi+=this.view[offset+3]<<24>>>0):(hi=this.view[offset+1]<<16,hi|=this.view[offset+2]<<8,hi|=this.view[offset+3],hi+=this.view[offset]<<24>>>0,offset+=4,lo=this.view[offset+1]<<16,lo|=this.view[offset+2]<<8,lo|=this.view[offset+3],lo+=this.view[offset]<<24>>>0);var value=new Long(lo,hi,!1);return relative&&(this.offset+=8),value},ByteBufferPrototype.readLong=ByteBufferPrototype.readInt64,ByteBufferPrototype.writeUint64=function(value,offset){var relative=void 0===offset;if(relative&&(offset=this.offset),!this.noAssert){if("number"==typeof value)value=Long.fromNumber(value);else if("string"==typeof value)value=Long.fromString(value);else if(!(value&&value instanceof Long))throw TypeError("Illegal value: "+value+" (not an integer or Long)");if("number"!=typeof offset||offset%1!=0)throw TypeError("Illegal offset: "+offset+" (not an integer)");if((offset>>>=0)<0||offset+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+offset+" (+0) <= "+this.buffer.byteLength)}"number"==typeof value?value=Long.fromNumber(value):"string"==typeof value&&(value=Long.fromString(value)),offset+=8;var capacity7=this.buffer.byteLength;offset>capacity7&&this.resize((capacity7*=2)>offset?capacity7:offset),offset-=8;var lo=value.low,hi=value.high;return this.littleEndian?(this.view[offset+3]=lo>>>24&255,this.view[offset+2]=lo>>>16&255,this.view[offset+1]=lo>>>8&255,this.view[offset]=255&lo,offset+=4,this.view[offset+3]=hi>>>24&255,this.view[offset+2]=hi>>>16&255,this.view[offset+1]=hi>>>8&255,this.view[offset]=255&hi):(this.view[offset]=hi>>>24&255,this.view[offset+1]=hi>>>16&255,this.view[offset+2]=hi>>>8&255,this.view[offset+3]=255&hi,offset+=4,this.view[offset]=lo>>>24&255,this.view[offset+1]=lo>>>16&255,this.view[offset+2]=lo>>>8&255,this.view[offset+3]=255&lo),relative&&(this.offset+=8),this},ByteBufferPrototype.writeUInt64=ByteBufferPrototype.writeUint64,ByteBufferPrototype.readUint64=function(offset){var relative=void 0===offset;if(relative&&(offset=this.offset),!this.noAssert){if("number"!=typeof offset||offset%1!=0)throw TypeError("Illegal offset: "+offset+" (not an integer)");if((offset>>>=0)<0||offset+8>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+offset+" (+8) <= "+this.buffer.byteLength)}var lo=0,hi=0;this.littleEndian?(lo=this.view[offset+2]<<16,lo|=this.view[offset+1]<<8,lo|=this.view[offset],lo+=this.view[offset+3]<<24>>>0,offset+=4,hi=this.view[offset+2]<<16,hi|=this.view[offset+1]<<8,hi|=this.view[offset],hi+=this.view[offset+3]<<24>>>0):(hi=this.view[offset+1]<<16,hi|=this.view[offset+2]<<8,hi|=this.view[offset+3],hi+=this.view[offset]<<24>>>0,offset+=4,lo=this.view[offset+1]<<16,lo|=this.view[offset+2]<<8,lo|=this.view[offset+3],lo+=this.view[offset]<<24>>>0);var value=new Long(lo,hi,!0);return relative&&(this.offset+=8),value},ByteBufferPrototype.readUInt64=ByteBufferPrototype.readUint64),ByteBufferPrototype.writeFloat32=function(value,offset){var relative=void 0===offset;if(relative&&(offset=this.offset),!this.noAssert){if("number"!=typeof value)throw TypeError("Illegal value: "+value+" (not a number)");if("number"!=typeof offset||offset%1!=0)throw TypeError("Illegal offset: "+offset+" (not an integer)");if((offset>>>=0)<0||offset+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+offset+" (+0) <= "+this.buffer.byteLength)}offset+=4;var capacity8=this.buffer.byteLength;return offset>capacity8&&this.resize((capacity8*=2)>offset?capacity8:offset),offset-=4,ieee754_write(this.view,value,offset,this.littleEndian,23,4),relative&&(this.offset+=4),this},ByteBufferPrototype.writeFloat=ByteBufferPrototype.writeFloat32,ByteBufferPrototype.readFloat32=function(offset){var relative=void 0===offset;if(relative&&(offset=this.offset),!this.noAssert){if("number"!=typeof offset||offset%1!=0)throw TypeError("Illegal offset: "+offset+" (not an integer)");if((offset>>>=0)<0||offset+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+offset+" (+4) <= "+this.buffer.byteLength)}var value=ieee754_read(this.view,offset,this.littleEndian,23,4);return relative&&(this.offset+=4),value},ByteBufferPrototype.readFloat=ByteBufferPrototype.readFloat32,ByteBufferPrototype.writeFloat64=function(value,offset){var relative=void 0===offset;if(relative&&(offset=this.offset),!this.noAssert){if("number"!=typeof value)throw TypeError("Illegal value: "+value+" (not a number)");if("number"!=typeof offset||offset%1!=0)throw TypeError("Illegal offset: "+offset+" (not an integer)");if((offset>>>=0)<0||offset+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+offset+" (+0) <= "+this.buffer.byteLength)}offset+=8;var capacity9=this.buffer.byteLength;return offset>capacity9&&this.resize((capacity9*=2)>offset?capacity9:offset),offset-=8,ieee754_write(this.view,value,offset,this.littleEndian,52,8),relative&&(this.offset+=8),this},ByteBufferPrototype.writeDouble=ByteBufferPrototype.writeFloat64,ByteBufferPrototype.readFloat64=function(offset){var relative=void 0===offset;if(relative&&(offset=this.offset),!this.noAssert){if("number"!=typeof offset||offset%1!=0)throw TypeError("Illegal offset: "+offset+" (not an integer)");if((offset>>>=0)<0||offset+8>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+offset+" (+8) <= "+this.buffer.byteLength)}var value=ieee754_read(this.view,offset,this.littleEndian,52,8);return relative&&(this.offset+=8),value},ByteBufferPrototype.readDouble=ByteBufferPrototype.readFloat64,ByteBuffer.MAX_VARINT32_BYTES=5,ByteBuffer.calculateVarint32=function(value){return(value>>>=0)<128?1:value<16384?2:value<1<<21?3:value<1<<28?4:5},ByteBuffer.zigZagEncode32=function(n){return((n|=0)<<1^n>>31)>>>0},ByteBuffer.zigZagDecode32=function(n){return n>>>1^-(1&n)|0},ByteBufferPrototype.writeVarint32=function(value,offset){var relative=void 0===offset;if(relative&&(offset=this.offset),!this.noAssert){if("number"!=typeof value||value%1!=0)throw TypeError("Illegal value: "+value+" (not an integer)");if(value|=0,"number"!=typeof offset||offset%1!=0)throw TypeError("Illegal offset: "+offset+" (not an integer)");if((offset>>>=0)<0||offset+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+offset+" (+0) <= "+this.buffer.byteLength)}var b,size=ByteBuffer.calculateVarint32(value);offset+=size;var capacity10=this.buffer.byteLength;for(offset>capacity10&&this.resize((capacity10*=2)>offset?capacity10:offset),offset-=size,value>>>=0;value>=128;)b=127&value|128,this.view[offset++]=b,value>>>=7;return this.view[offset++]=value,relative?(this.offset=offset,this):size},ByteBufferPrototype.writeVarint32ZigZag=function(value,offset){return this.writeVarint32(ByteBuffer.zigZagEncode32(value),offset)},ByteBufferPrototype.readVarint32=function(offset){var relative=void 0===offset;if(relative&&(offset=this.offset),!this.noAssert){if("number"!=typeof offset||offset%1!=0)throw TypeError("Illegal offset: "+offset+" (not an integer)");if((offset>>>=0)<0||offset+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+offset+" (+1) <= "+this.buffer.byteLength)}var b,c=0,value=0;do{if(!this.noAssert&&offset>this.limit){var err=Error("Truncated");throw err.truncated=!0,err}b=this.view[offset++],c<5&&(value|=(127&b)<<7*c),++c}while(0!=(128&b));return value|=0,relative?(this.offset=offset,value):{value:value,length:c}},ByteBufferPrototype.readVarint32ZigZag=function(offset){var val=this.readVarint32(offset);return"object"==typeof val?val.value=ByteBuffer.zigZagDecode32(val.value):val=ByteBuffer.zigZagDecode32(val),val},Long&&(ByteBuffer.MAX_VARINT64_BYTES=10,ByteBuffer.calculateVarint64=function(value){"number"==typeof value?value=Long.fromNumber(value):"string"==typeof value&&(value=Long.fromString(value));var part0=value.toInt()>>>0,part1=value.shiftRightUnsigned(28).toInt()>>>0,part2=value.shiftRightUnsigned(56).toInt()>>>0;return 0==part2?0==part1?part0<16384?part0<128?1:2:part0<1<<21?3:4:part1<16384?part1<128?5:6:part1<1<<21?7:8:part2<128?9:10},ByteBuffer.zigZagEncode64=function(value){return"number"==typeof value?value=Long.fromNumber(value,!1):"string"==typeof value?value=Long.fromString(value,!1):!1!==value.unsigned&&(value=value.toSigned()),value.shiftLeft(1).xor(value.shiftRight(63)).toUnsigned()},ByteBuffer.zigZagDecode64=function(value){return"number"==typeof value?value=Long.fromNumber(value,!1):"string"==typeof value?value=Long.fromString(value,!1):!1!==value.unsigned&&(value=value.toSigned()),value.shiftRightUnsigned(1).xor(value.and(Long.ONE).toSigned().negate()).toSigned()},ByteBufferPrototype.writeVarint64=function(value,offset){var relative=void 0===offset;if(relative&&(offset=this.offset),!this.noAssert){if("number"==typeof value)value=Long.fromNumber(value);else if("string"==typeof value)value=Long.fromString(value);else if(!(value&&value instanceof Long))throw TypeError("Illegal value: "+value+" (not an integer or Long)");if("number"!=typeof offset||offset%1!=0)throw TypeError("Illegal offset: "+offset+" (not an integer)");if((offset>>>=0)<0||offset+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+offset+" (+0) <= "+this.buffer.byteLength)}"number"==typeof value?value=Long.fromNumber(value,!1):"string"==typeof value?value=Long.fromString(value,!1):!1!==value.unsigned&&(value=value.toSigned());var size=ByteBuffer.calculateVarint64(value),part0=value.toInt()>>>0,part1=value.shiftRightUnsigned(28).toInt()>>>0,part2=value.shiftRightUnsigned(56).toInt()>>>0;offset+=size;var capacity11=this.buffer.byteLength;switch(offset>capacity11&&this.resize((capacity11*=2)>offset?capacity11:offset),offset-=size,size){case 10:this.view[offset+9]=part2>>>7&1;case 9:this.view[offset+8]=9!==size?128|part2:127&part2;case 8:this.view[offset+7]=8!==size?part1>>>21|128:part1>>>21&127;case 7:this.view[offset+6]=7!==size?part1>>>14|128:part1>>>14&127;case 6:this.view[offset+5]=6!==size?part1>>>7|128:part1>>>7&127;case 5:this.view[offset+4]=5!==size?128|part1:127&part1;case 4:this.view[offset+3]=4!==size?part0>>>21|128:part0>>>21&127;case 3:this.view[offset+2]=3!==size?part0>>>14|128:part0>>>14&127;case 2:this.view[offset+1]=2!==size?part0>>>7|128:part0>>>7&127;case 1:this.view[offset]=1!==size?128|part0:127&part0}return relative?(this.offset+=size,this):size},ByteBufferPrototype.writeVarint64ZigZag=function(value,offset){return this.writeVarint64(ByteBuffer.zigZagEncode64(value),offset)},ByteBufferPrototype.readVarint64=function(offset){var relative=void 0===offset;if(relative&&(offset=this.offset),!this.noAssert){if("number"!=typeof offset||offset%1!=0)throw TypeError("Illegal offset: "+offset+" (not an integer)");if((offset>>>=0)<0||offset+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+offset+" (+1) <= "+this.buffer.byteLength)}var start=offset,part0=0,part1=0,part2=0,b=0;if(part0=127&(b=this.view[offset++]),128&b&&(part0|=(127&(b=this.view[offset++]))<<7,(128&b||this.noAssert&&void 0===b)&&(part0|=(127&(b=this.view[offset++]))<<14,(128&b||this.noAssert&&void 0===b)&&(part0|=(127&(b=this.view[offset++]))<<21,(128&b||this.noAssert&&void 0===b)&&(part1=127&(b=this.view[offset++]),(128&b||this.noAssert&&void 0===b)&&(part1|=(127&(b=this.view[offset++]))<<7,(128&b||this.noAssert&&void 0===b)&&(part1|=(127&(b=this.view[offset++]))<<14,(128&b||this.noAssert&&void 0===b)&&(part1|=(127&(b=this.view[offset++]))<<21,(128&b||this.noAssert&&void 0===b)&&(part2=127&(b=this.view[offset++]),(128&b||this.noAssert&&void 0===b)&&(part2|=(127&(b=this.view[offset++]))<<7,128&b||this.noAssert&&void 0===b))))))))))throw Error("Buffer overrun");var value=Long.fromBits(part0|part1<<28,part1>>>4|part2<<24,!1);return relative?(this.offset=offset,value):{value:value,length:offset-start}},ByteBufferPrototype.readVarint64ZigZag=function(offset){var val=this.readVarint64(offset);return val&&val.value instanceof Long?val.value=ByteBuffer.zigZagDecode64(val.value):val=ByteBuffer.zigZagDecode64(val),val}),ByteBufferPrototype.writeCString=function(str,offset){var relative=void 0===offset;relative&&(offset=this.offset);var i,k=str.length;if(!this.noAssert){if("string"!=typeof str)throw TypeError("Illegal str: Not a string");for(i=0;i>>=0)<0||offset+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+offset+" (+0) <= "+this.buffer.byteLength)}k=utfx.calculateUTF16asUTF8(stringSource(str))[1],offset+=k+1;var capacity12=this.buffer.byteLength;return offset>capacity12&&this.resize((capacity12*=2)>offset?capacity12:offset),offset-=k+1,utfx.encodeUTF16toUTF8(stringSource(str),function(b){this.view[offset++]=b}.bind(this)),this.view[offset++]=0,relative?(this.offset=offset,this):k},ByteBufferPrototype.readCString=function(offset){var relative=void 0===offset;if(relative&&(offset=this.offset),!this.noAssert){if("number"!=typeof offset||offset%1!=0)throw TypeError("Illegal offset: "+offset+" (not an integer)");if((offset>>>=0)<0||offset+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+offset+" (+1) <= "+this.buffer.byteLength)}var sd,start=offset,b=-1;return utfx.decodeUTF8toUTF16(function(){if(0===b)return null;if(offset>=this.limit)throw RangeError("Illegal range: Truncated data, "+offset+" < "+this.limit);return 0===(b=this.view[offset++])?null:b}.bind(this),sd=stringDestination(),!0),relative?(this.offset=offset,sd()):{string:sd(),length:offset-start}},ByteBufferPrototype.writeIString=function(str,offset){var relative=void 0===offset;if(relative&&(offset=this.offset),!this.noAssert){if("string"!=typeof str)throw TypeError("Illegal str: Not a string");if("number"!=typeof offset||offset%1!=0)throw TypeError("Illegal offset: "+offset+" (not an integer)");if((offset>>>=0)<0||offset+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+offset+" (+0) <= "+this.buffer.byteLength)}var k,start=offset;k=utfx.calculateUTF16asUTF8(stringSource(str),this.noAssert)[1],offset+=4+k;var capacity13=this.buffer.byteLength;if(offset>capacity13&&this.resize((capacity13*=2)>offset?capacity13:offset),offset-=4+k,this.littleEndian?(this.view[offset+3]=k>>>24&255,this.view[offset+2]=k>>>16&255,this.view[offset+1]=k>>>8&255,this.view[offset]=255&k):(this.view[offset]=k>>>24&255,this.view[offset+1]=k>>>16&255,this.view[offset+2]=k>>>8&255,this.view[offset+3]=255&k),offset+=4,utfx.encodeUTF16toUTF8(stringSource(str),function(b){this.view[offset++]=b}.bind(this)),offset!==start+4+k)throw RangeError("Illegal range: Truncated data, "+offset+" == "+(offset+4+k));return relative?(this.offset=offset,this):offset-start},ByteBufferPrototype.readIString=function(offset){var relative=void 0===offset;if(relative&&(offset=this.offset),!this.noAssert){if("number"!=typeof offset||offset%1!=0)throw TypeError("Illegal offset: "+offset+" (not an integer)");if((offset>>>=0)<0||offset+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+offset+" (+4) <= "+this.buffer.byteLength)}var start=offset,len=this.readUint32(offset),str=this.readUTF8String(len,ByteBuffer.METRICS_BYTES,offset+=4);return offset+=str.length,relative?(this.offset=offset,str.string):{string:str.string,length:offset-start}},ByteBuffer.METRICS_CHARS="c",ByteBuffer.METRICS_BYTES="b",ByteBufferPrototype.writeUTF8String=function(str,offset){var k,relative=void 0===offset;if(relative&&(offset=this.offset),!this.noAssert){if("number"!=typeof offset||offset%1!=0)throw TypeError("Illegal offset: "+offset+" (not an integer)");if((offset>>>=0)<0||offset+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+offset+" (+0) <= "+this.buffer.byteLength)}var start=offset;k=utfx.calculateUTF16asUTF8(stringSource(str))[1],offset+=k;var capacity14=this.buffer.byteLength;return offset>capacity14&&this.resize((capacity14*=2)>offset?capacity14:offset),offset-=k,utfx.encodeUTF16toUTF8(stringSource(str),function(b){this.view[offset++]=b}.bind(this)),relative?(this.offset=offset,this):offset-start},ByteBufferPrototype.writeString=ByteBufferPrototype.writeUTF8String,ByteBuffer.calculateUTF8Chars=function(str){return utfx.calculateUTF16asUTF8(stringSource(str))[0]},ByteBuffer.calculateUTF8Bytes=function(str){return utfx.calculateUTF16asUTF8(stringSource(str))[1]},ByteBuffer.calculateString=ByteBuffer.calculateUTF8Bytes,ByteBufferPrototype.readUTF8String=function(length,metrics,offset){"number"==typeof metrics&&(offset=metrics,metrics=void 0);var relative=void 0===offset;if(relative&&(offset=this.offset),void 0===metrics&&(metrics=ByteBuffer.METRICS_CHARS),!this.noAssert){if("number"!=typeof length||length%1!=0)throw TypeError("Illegal length: "+length+" (not an integer)");if(length|=0,"number"!=typeof offset||offset%1!=0)throw TypeError("Illegal offset: "+offset+" (not an integer)");if((offset>>>=0)<0||offset+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+offset+" (+0) <= "+this.buffer.byteLength)}var sd,i=0,start=offset;if(metrics===ByteBuffer.METRICS_CHARS){if(sd=stringDestination(),utfx.decodeUTF8(function(){return i>>=0)<0||offset+length>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+offset+" (+"+length+") <= "+this.buffer.byteLength)}var k=offset+length;if(utfx.decodeUTF8toUTF16(function(){return offset>>=0)<0||offset+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+offset+" (+0) <= "+this.buffer.byteLength)}var k,l,start=offset;k=utfx.calculateUTF16asUTF8(stringSource(str),this.noAssert)[1],l=ByteBuffer.calculateVarint32(k),offset+=l+k;var capacity15=this.buffer.byteLength;if(offset>capacity15&&this.resize((capacity15*=2)>offset?capacity15:offset),offset-=l+k,offset+=this.writeVarint32(k,offset),utfx.encodeUTF16toUTF8(stringSource(str),function(b){this.view[offset++]=b}.bind(this)),offset!==start+k+l)throw RangeError("Illegal range: Truncated data, "+offset+" == "+(offset+k+l));return relative?(this.offset=offset,this):offset-start},ByteBufferPrototype.readVString=function(offset){var relative=void 0===offset;if(relative&&(offset=this.offset),!this.noAssert){if("number"!=typeof offset||offset%1!=0)throw TypeError("Illegal offset: "+offset+" (not an integer)");if((offset>>>=0)<0||offset+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+offset+" (+1) <= "+this.buffer.byteLength)}var start=offset,len=this.readVarint32(offset),str=this.readUTF8String(len.value,ByteBuffer.METRICS_BYTES,offset+=len.length);return offset+=str.length,relative?(this.offset=offset,str.string):{string:str.string,length:offset-start}},ByteBufferPrototype.append=function(source,encoding,offset){"number"!=typeof encoding&&"string"==typeof encoding||(offset=encoding,encoding=void 0);var relative=void 0===offset;if(relative&&(offset=this.offset),!this.noAssert){if("number"!=typeof offset||offset%1!=0)throw TypeError("Illegal offset: "+offset+" (not an integer)");if((offset>>>=0)<0||offset+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+offset+" (+0) <= "+this.buffer.byteLength)}source instanceof ByteBuffer||(source=ByteBuffer.wrap(source,encoding));var length=source.limit-source.offset;if(length<=0)return this;offset+=length;var capacity16=this.buffer.byteLength;return offset>capacity16&&this.resize((capacity16*=2)>offset?capacity16:offset),offset-=length,this.view.set(source.view.subarray(source.offset,source.limit),offset),source.offset+=length,relative&&(this.offset+=length),this},ByteBufferPrototype.appendTo=function(target,offset){return target.append(this,offset),this},ByteBufferPrototype.assert=function(assert){return this.noAssert=!assert,this},ByteBufferPrototype.capacity=function(){return this.buffer.byteLength},ByteBufferPrototype.clear=function(){return this.offset=0,this.limit=this.buffer.byteLength,this.markedOffset=-1,this},ByteBufferPrototype.clone=function(copy){var bb=new ByteBuffer(0,this.littleEndian,this.noAssert);return copy?(bb.buffer=new ArrayBuffer(this.buffer.byteLength),bb.view=new Uint8Array(bb.buffer)):(bb.buffer=this.buffer,bb.view=this.view),bb.offset=this.offset,bb.markedOffset=this.markedOffset,bb.limit=this.limit,bb},ByteBufferPrototype.compact=function(begin,end){if(void 0===begin&&(begin=this.offset),void 0===end&&(end=this.limit),!this.noAssert){if("number"!=typeof begin||begin%1!=0)throw TypeError("Illegal begin: Not an integer");if(begin>>>=0,"number"!=typeof end||end%1!=0)throw TypeError("Illegal end: Not an integer");if(end>>>=0,begin<0||begin>end||end>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+begin+" <= "+end+" <= "+this.buffer.byteLength)}if(0===begin&&end===this.buffer.byteLength)return this;var len=end-begin;if(0===len)return this.buffer=EMPTY_BUFFER,this.view=null,this.markedOffset>=0&&(this.markedOffset-=begin),this.offset=0,this.limit=0,this;var buffer=new ArrayBuffer(len),view=new Uint8Array(buffer);return view.set(this.view.subarray(begin,end)),this.buffer=buffer,this.view=view,this.markedOffset>=0&&(this.markedOffset-=begin),this.offset=0,this.limit=len,this},ByteBufferPrototype.copy=function(begin,end){if(void 0===begin&&(begin=this.offset),void 0===end&&(end=this.limit),!this.noAssert){if("number"!=typeof begin||begin%1!=0)throw TypeError("Illegal begin: Not an integer");if(begin>>>=0,"number"!=typeof end||end%1!=0)throw TypeError("Illegal end: Not an integer");if(end>>>=0,begin<0||begin>end||end>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+begin+" <= "+end+" <= "+this.buffer.byteLength)}if(begin===end)return new ByteBuffer(0,this.littleEndian,this.noAssert);var capacity=end-begin,bb=new ByteBuffer(capacity,this.littleEndian,this.noAssert);return bb.offset=0,bb.limit=capacity,bb.markedOffset>=0&&(bb.markedOffset-=begin),this.copyTo(bb,0,begin,end),bb},ByteBufferPrototype.copyTo=function(target,targetOffset,sourceOffset,sourceLimit){var relative,targetRelative;if(!this.noAssert&&!ByteBuffer.isByteBuffer(target))throw TypeError("Illegal target: Not a ByteBuffer");if(targetOffset=(targetRelative=void 0===targetOffset)?target.offset:0|targetOffset,sourceOffset=(relative=void 0===sourceOffset)?this.offset:0|sourceOffset,sourceLimit=void 0===sourceLimit?this.limit:0|sourceLimit,targetOffset<0||targetOffset>target.buffer.byteLength)throw RangeError("Illegal target range: 0 <= "+targetOffset+" <= "+target.buffer.byteLength);if(sourceOffset<0||sourceLimit>this.buffer.byteLength)throw RangeError("Illegal source range: 0 <= "+sourceOffset+" <= "+this.buffer.byteLength);var len=sourceLimit-sourceOffset;return 0===len?target:(target.ensureCapacity(targetOffset+len),target.view.set(this.view.subarray(sourceOffset,sourceLimit),targetOffset),relative&&(this.offset+=len),targetRelative&&(target.offset+=len),this)},ByteBufferPrototype.ensureCapacity=function(capacity){var current=this.buffer.byteLength;return currentcapacity?current:capacity):this},ByteBufferPrototype.fill=function(value,begin,end){var relative=void 0===begin;if(relative&&(begin=this.offset),"string"==typeof value&&value.length>0&&(value=value.charCodeAt(0)),void 0===begin&&(begin=this.offset),void 0===end&&(end=this.limit),!this.noAssert){if("number"!=typeof value||value%1!=0)throw TypeError("Illegal value: "+value+" (not an integer)");if(value|=0,"number"!=typeof begin||begin%1!=0)throw TypeError("Illegal begin: Not an integer");if(begin>>>=0,"number"!=typeof end||end%1!=0)throw TypeError("Illegal end: Not an integer");if(end>>>=0,begin<0||begin>end||end>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+begin+" <= "+end+" <= "+this.buffer.byteLength)}if(begin>=end)return this;for(;begin>>=0)<0||offset+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+offset+" (+0) <= "+this.buffer.byteLength)}return this.markedOffset=offset,this},ByteBufferPrototype.order=function(littleEndian){if(!this.noAssert&&"boolean"!=typeof littleEndian)throw TypeError("Illegal littleEndian: Not a boolean");return this.littleEndian=!!littleEndian,this},ByteBufferPrototype.LE=function(littleEndian){return this.littleEndian=void 0===littleEndian||!!littleEndian,this},ByteBufferPrototype.BE=function(bigEndian){return this.littleEndian=void 0!==bigEndian&&!bigEndian,this},ByteBufferPrototype.prepend=function(source,encoding,offset){"number"!=typeof encoding&&"string"==typeof encoding||(offset=encoding,encoding=void 0);var relative=void 0===offset;if(relative&&(offset=this.offset),!this.noAssert){if("number"!=typeof offset||offset%1!=0)throw TypeError("Illegal offset: "+offset+" (not an integer)");if((offset>>>=0)<0||offset+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+offset+" (+0) <= "+this.buffer.byteLength)}source instanceof ByteBuffer||(source=ByteBuffer.wrap(source,encoding));var len=source.limit-source.offset;if(len<=0)return this;var diff=len-offset;if(diff>0){var buffer=new ArrayBuffer(this.buffer.byteLength+diff),view=new Uint8Array(buffer);view.set(this.view.subarray(offset,this.buffer.byteLength),len),this.buffer=buffer,this.view=view,this.offset+=diff,this.markedOffset>=0&&(this.markedOffset+=diff),this.limit+=diff,offset+=diff}else new Uint8Array(this.buffer);return this.view.set(source.view.subarray(source.offset,source.limit),offset-len),source.offset=source.limit,relative&&(this.offset-=len),this},ByteBufferPrototype.prependTo=function(target,offset){return target.prepend(this,offset),this},ByteBufferPrototype.printDebug=function(out){"function"!=typeof out&&(out=void 0),out(this.toString()+"\n-------------------------------------------------------------------\n"+this.toDebug(!0))},ByteBufferPrototype.remaining=function(){return this.limit-this.offset},ByteBufferPrototype.reset=function(){return this.markedOffset>=0?(this.offset=this.markedOffset,this.markedOffset=-1):this.offset=0,this},ByteBufferPrototype.resize=function(capacity){if(!this.noAssert){if("number"!=typeof capacity||capacity%1!=0)throw TypeError("Illegal capacity: "+capacity+" (not an integer)");if((capacity|=0)<0)throw RangeError("Illegal capacity: 0 <= "+capacity)}if(this.buffer.byteLength>>=0,"number"!=typeof end||end%1!=0)throw TypeError("Illegal end: Not an integer");if(end>>>=0,begin<0||begin>end||end>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+begin+" <= "+end+" <= "+this.buffer.byteLength)}return begin===end?this:(Array.prototype.reverse.call(this.view.subarray(begin,end)),this)},ByteBufferPrototype.skip=function(length){if(!this.noAssert){if("number"!=typeof length||length%1!=0)throw TypeError("Illegal length: "+length+" (not an integer)");length|=0}var offset=this.offset+length;if(!this.noAssert&&(offset<0||offset>this.buffer.byteLength))throw RangeError("Illegal length: 0 <= "+this.offset+" + "+length+" <= "+this.buffer.byteLength);return this.offset=offset,this},ByteBufferPrototype.slice=function(begin,end){if(void 0===begin&&(begin=this.offset),void 0===end&&(end=this.limit),!this.noAssert){if("number"!=typeof begin||begin%1!=0)throw TypeError("Illegal begin: Not an integer");if(begin>>>=0,"number"!=typeof end||end%1!=0)throw TypeError("Illegal end: Not an integer");if(end>>>=0,begin<0||begin>end||end>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+begin+" <= "+end+" <= "+this.buffer.byteLength)}var bb=this.clone();return bb.offset=begin,bb.limit=end,bb},ByteBufferPrototype.toBuffer=function(forceCopy){var offset=this.offset,limit=this.limit;if(!this.noAssert){if("number"!=typeof offset||offset%1!=0)throw TypeError("Illegal offset: Not an integer");if(offset>>>=0,"number"!=typeof limit||limit%1!=0)throw TypeError("Illegal limit: Not an integer");if(limit>>>=0,offset<0||offset>limit||limit>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+offset+" <= "+limit+" <= "+this.buffer.byteLength)}if(!forceCopy&&0===offset&&limit===this.buffer.byteLength)return this.buffer;if(offset===limit)return EMPTY_BUFFER;var buffer=new ArrayBuffer(limit-offset);return new Uint8Array(buffer).set(new Uint8Array(this.buffer).subarray(offset,limit),0),buffer},ByteBufferPrototype.toArrayBuffer=ByteBufferPrototype.toBuffer,ByteBufferPrototype.toString=function(encoding,begin,end){if(void 0===encoding)return"ByteBufferAB(offset="+this.offset+",markedOffset="+this.markedOffset+",limit="+this.limit+",capacity="+this.capacity()+")";switch("number"==typeof encoding&&(end=begin=encoding="utf8"),encoding){case"utf8":return this.toUTF8(begin,end);case"base64":return this.toBase64(begin,end);case"hex":return this.toHex(begin,end);case"binary":return this.toBinary(begin,end);case"debug":return this.toDebug();case"columns":return this.toColumns();default:throw Error("Unsupported encoding: "+encoding)}};var lxiv=function(){for(var lxiv={},aout=[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,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,48,49,50,51,52,53,54,55,56,57,43,47],ain=[],i=0,k=aout.length;i>2&63]),t=(3&b)<<4,null!==(b=src())?(dst(aout[63&((t|=b>>4&15)|b>>4&15)]),t=(15&b)<<2,null!==(b=src())?(dst(aout[63&(t|b>>6&3)]),dst(aout[63&b])):(dst(aout[63&t]),dst(61))):(dst(aout[63&t]),dst(61),dst(61))},lxiv.decode=function(src,dst){var c,t1,t2;function fail(c){throw Error("Illegal character code: "+c)}for(;null!==(c=src());)if(void 0===(t1=ain[c])&&fail(c),null!==(c=src())&&(void 0===(t2=ain[c])&&fail(c),dst(t1<<2>>>0|(48&t2)>>4),null!==(c=src()))){if(void 0===(t1=ain[c])){if(61===c)break;fail(c)}if(dst((15&t2)<<4>>>0|(60&t1)>>2),null!==(c=src())){if(void 0===(t2=ain[c])){if(61===c)break;fail(c)}dst((3&t1)<<6>>>0|t2)}}},lxiv.test=function(str){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(str)},lxiv}();ByteBufferPrototype.toBase64=function(begin,end){if(void 0===begin&&(begin=this.offset),void 0===end&&(end=this.limit),end|=0,(begin|=0)<0||end>this.capacity||begin>end)throw RangeError("begin, end");var sd;return lxiv.encode(function(){return beginthis.capacity()||begin>end)throw RangeError("begin, end");if(begin===end)return"";for(var chars=[],parts=[];begin=1024&&(parts.push(String.fromCharCode.apply(String,chars)),chars=[]);return parts.join("")+String.fromCharCode.apply(String,chars)},ByteBuffer.fromBinary=function(str,littleEndian){if("string"!=typeof str)throw TypeError("str");for(var charCode,i=0,k=str.length,bb=new ByteBuffer(k,littleEndian);i255)throw RangeError("illegal char code: "+charCode);bb.view[i++]=charCode}return bb.limit=k,bb},ByteBufferPrototype.toDebug=function(columns){for(var b,i=-1,k=this.buffer.byteLength,hex="",asc="",out="";i32&&b<127?String.fromCharCode(b):".")),++i,columns&&i>0&&i%16==0&&i!==k){for(;hex.length<51;)hex+=" ";out+=hex+asc+"\n",hex=asc=""}i===this.offset&&i===this.limit?hex+=i===this.markedOffset?"!":"|":i===this.offset?hex+=i===this.markedOffset?"[":"<":i===this.limit?hex+=i===this.markedOffset?"]":">":hex+=i===this.markedOffset?"'":columns||0!==i&&i!==k?" ":""}if(columns&&" "!==hex){for(;hex.length<51;)hex+=" ";out+=hex+asc+"\n"}return columns?out:hex},ByteBuffer.fromDebug=function(str,littleEndian,noAssert){for(var ch,b,k=str.length,bb=new ByteBuffer((k+1)/3|0,littleEndian,noAssert),i=0,j=0,rs=!1,ho=!1,hm=!1,hl=!1,fail=!1;i":if(!noAssert){if(hl){fail=!0;break}hl=!0}bb.limit=j,rs=!1;break;case"'":if(!noAssert){if(hm){fail=!0;break}hm=!0}bb.markedOffset=j,rs=!1;break;case" ":rs=!1;break;default:if(!noAssert&&rs){fail=!0;break}if(b=parseInt(ch+str.charAt(i++),16),!noAssert&&(isNaN(b)||b<0||b>255))throw TypeError("Illegal str: Not a debug encoded string");bb.view[j++]=b,rs=!0}if(fail)throw TypeError("Illegal str: Invalid symbol at "+i)}if(!noAssert){if(!ho||!hl)throw TypeError("Illegal str: Missing offset or limit");if(j>>=0,"number"!=typeof end||end%1!=0)throw TypeError("Illegal end: Not an integer");if(end>>>=0,begin<0||begin>end||end>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+begin+" <= "+end+" <= "+this.buffer.byteLength)}for(var b,out=new Array(end-begin);begin255))throw TypeError("Illegal str: Contains non-hex characters");bb.view[j++]=b}return bb.limit=j,bb};var utfx=function(){var utfx={MAX_CODEPOINT:1114111,encodeUTF8:function(src,dst){var cp=null;for("number"==typeof src&&(cp=src,src=function(){return null});null!==cp||null!==(cp=src());)cp<128?dst(127&cp):cp<2048?(dst(cp>>6&31|192),dst(63&cp|128)):cp<65536?(dst(cp>>12&15|224),dst(cp>>6&63|128),dst(63&cp|128)):(dst(cp>>18&7|240),dst(cp>>12&63|128),dst(cp>>6&63|128),dst(63&cp|128)),cp=null},decodeUTF8:function(src,dst){for(var a,b,c,d,fail=function(b){b=b.slice(0,b.indexOf(null));var err=Error(b.toString());throw err.name="TruncatedError",err.bytes=b,err};null!==(a=src());)if(0==(128&a))dst(a);else if(192==(224&a))null===(b=src())&&fail([a,b]),dst((31&a)<<6|63&b);else if(224==(240&a))(null===(b=src())||null===(c=src()))&&fail([a,b,c]),dst((15&a)<<12|(63&b)<<6|63&c);else{if(240!=(248&a))throw RangeError("Illegal starting byte: "+a);(null===(b=src())||null===(c=src())||null===(d=src()))&&fail([a,b,c,d]),dst((7&a)<<18|(63&b)<<12|(63&c)<<6|63&d)}},UTF16toUTF8:function(src,dst){for(var c1,c2=null;null!==(c1=null!==c2?c2:src());)c1>=55296&&c1<=57343&&null!==(c2=src())&&c2>=56320&&c2<=57343?(dst(1024*(c1-55296)+c2-56320+65536),c2=null):dst(c1);null!==c2&&dst(c2)},UTF8toUTF16:function(src,dst){var cp=null;for("number"==typeof src&&(cp=src,src=function(){return null});null!==cp||null!==(cp=src());)cp<=65535?dst(cp):(dst(55296+((cp-=65536)>>10)),dst(cp%1024+56320)),cp=null},encodeUTF16toUTF8:function(src,dst){utfx.UTF16toUTF8(src,function(cp){utfx.encodeUTF8(cp,dst)})},decodeUTF8toUTF16:function(src,dst){utfx.decodeUTF8(src,function(cp){utfx.UTF8toUTF16(cp,dst)})},calculateCodePoint:function(cp){return cp<128?1:cp<2048?2:cp<65536?3:4},calculateUTF8:function(src){for(var cp,l=0;null!==(cp=src());)l+=cp<128?1:cp<2048?2:cp<65536?3:4;return l},calculateUTF16asUTF8:function(src){var n=0,l=0;return utfx.UTF16toUTF8(src,function(cp){++n,l+=cp<128?1:cp<2048?2:cp<65536?3:4}),[n,l]}};return utfx}();return ByteBufferPrototype.toUTF8=function(begin,end){if(void 0===begin&&(begin=this.offset),void 0===end&&(end=this.limit),!this.noAssert){if("number"!=typeof begin||begin%1!=0)throw TypeError("Illegal begin: Not an integer");if(begin>>>=0,"number"!=typeof end||end%1!=0)throw TypeError("Illegal end: Not an integer");if(end>>>=0,begin<0||begin>end||end>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+begin+" <= "+end+" <= "+this.buffer.byteLength)}var sd;try{utfx.decodeUTF8toUTF16(function(){return beginindex;)if((value=O[index++])!=value)return!0}else for(;length>index;index++)if((IS_INCLUDES||index in O)&&O[index]===el)return IS_INCLUDES||index||0;return!IS_INCLUDES&&-1}}},{"./_to-absolute-index":"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_to-absolute-index.js","./_to-iobject":"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_to-iobject.js","./_to-length":"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_to-length.js"}],"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_classof.js":[function(_dereq_,module,exports){var cof=_dereq_("./_cof"),TAG=_dereq_("./_wks")("toStringTag"),ARG="Arguments"==cof(function(){return arguments}());module.exports=function(it){var O,T,B;return void 0===it?"Undefined":null===it?"Null":"string"==typeof(T=function(it,key){try{return it[key]}catch(e){}}(O=Object(it),TAG))?T:ARG?cof(O):"Object"==(B=cof(O))&&"function"==typeof O.callee?"Arguments":B}},{"./_cof":"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_cof.js","./_wks":"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_wks.js"}],"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_cof.js":[function(_dereq_,module,exports){var toString={}.toString;module.exports=function(it){return toString.call(it).slice(8,-1)}},{}],"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_collection-strong.js":[function(_dereq_,module,exports){"use strict";var dP=_dereq_("./_object-dp").f,create=_dereq_("./_object-create"),redefineAll=_dereq_("./_redefine-all"),ctx=_dereq_("./_ctx"),anInstance=_dereq_("./_an-instance"),forOf=_dereq_("./_for-of"),$iterDefine=_dereq_("./_iter-define"),step=_dereq_("./_iter-step"),setSpecies=_dereq_("./_set-species"),DESCRIPTORS=_dereq_("./_descriptors"),fastKey=_dereq_("./_meta").fastKey,validate=_dereq_("./_validate-collection"),SIZE=DESCRIPTORS?"_s":"size",getEntry=function(that,key){var entry,index=fastKey(key);if("F"!==index)return that._i[index];for(entry=that._f;entry;entry=entry.n)if(entry.k==key)return entry};module.exports={getConstructor:function(wrapper,NAME,IS_MAP,ADDER){var C=wrapper(function(that,iterable){anInstance(that,C,NAME,"_i"),that._t=NAME,that._i=create(null),that._f=void 0,that._l=void 0,that[SIZE]=0,void 0!=iterable&&forOf(iterable,IS_MAP,that[ADDER],that)});return redefineAll(C.prototype,{clear:function(){for(var that=validate(this,NAME),data=that._i,entry=that._f;entry;entry=entry.n)entry.r=!0,entry.p&&(entry.p=entry.p.n=void 0),delete data[entry.i];that._f=that._l=void 0,that[SIZE]=0},delete:function(key){var that=validate(this,NAME),entry=getEntry(that,key);if(entry){var next=entry.n,prev=entry.p;delete that._i[entry.i],entry.r=!0,prev&&(prev.n=next),next&&(next.p=prev),that._f==entry&&(that._f=next),that._l==entry&&(that._l=prev),that[SIZE]--}return!!entry},forEach:function(callbackfn){validate(this,NAME);for(var entry,f=ctx(callbackfn,arguments.length>1?arguments[1]:void 0,3);entry=entry?entry.n:this._f;)for(f(entry.v,entry.k,this);entry&&entry.r;)entry=entry.p},has:function(key){return!!getEntry(validate(this,NAME),key)}}),DESCRIPTORS&&dP(C.prototype,"size",{get:function(){return validate(this,NAME)[SIZE]}}),C},def:function(that,key,value){var prev,index,entry=getEntry(that,key);return entry?entry.v=value:(that._l=entry={i:index=fastKey(key,!0),k:key,v:value,p:prev=that._l,n:void 0,r:!1},that._f||(that._f=entry),prev&&(prev.n=entry),that[SIZE]++,"F"!==index&&(that._i[index]=entry)),that},getEntry:getEntry,setStrong:function(C,NAME,IS_MAP){$iterDefine(C,NAME,function(iterated,kind){this._t=validate(iterated,NAME),this._k=kind,this._l=void 0},function(){for(var kind=this._k,entry=this._l;entry&&entry.r;)entry=entry.p;return this._t&&(this._l=entry=entry?entry.n:this._t._f)?step(0,"keys"==kind?entry.k:"values"==kind?entry.v:[entry.k,entry.v]):(this._t=void 0,step(1))},IS_MAP?"entries":"values",!IS_MAP,!0),setSpecies(NAME)}}},{"./_an-instance":"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_an-instance.js","./_ctx":"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_ctx.js","./_descriptors":"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_descriptors.js","./_for-of":"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_for-of.js","./_iter-define":"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_iter-define.js","./_iter-step":"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_iter-step.js","./_meta":"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_meta.js","./_object-create":"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_object-create.js","./_object-dp":"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_object-dp.js","./_redefine-all":"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_redefine-all.js","./_set-species":"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_set-species.js","./_validate-collection":"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_validate-collection.js"}],"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_collection.js":[function(_dereq_,module,exports){"use strict";var global=_dereq_("./_global"),$export=_dereq_("./_export"),redefine=_dereq_("./_redefine"),redefineAll=_dereq_("./_redefine-all"),meta=_dereq_("./_meta"),forOf=_dereq_("./_for-of"),anInstance=_dereq_("./_an-instance"),isObject=_dereq_("./_is-object"),fails=_dereq_("./_fails"),$iterDetect=_dereq_("./_iter-detect"),setToStringTag=_dereq_("./_set-to-string-tag"),inheritIfRequired=_dereq_("./_inherit-if-required");module.exports=function(NAME,wrapper,methods,common,IS_MAP,IS_WEAK){var Base=global[NAME],C=Base,ADDER=IS_MAP?"set":"add",proto=C&&C.prototype,O={},fixMethod=function(KEY){var fn=proto[KEY];redefine(proto,KEY,"delete"==KEY?function(a){return!(IS_WEAK&&!isObject(a))&&fn.call(this,0===a?0:a)}:"has"==KEY?function(a){return!(IS_WEAK&&!isObject(a))&&fn.call(this,0===a?0:a)}:"get"==KEY?function(a){return IS_WEAK&&!isObject(a)?void 0:fn.call(this,0===a?0:a)}:"add"==KEY?function(a){return fn.call(this,0===a?0:a),this}:function(a,b){return fn.call(this,0===a?0:a,b),this})};if("function"==typeof C&&(IS_WEAK||proto.forEach&&!fails(function(){(new C).entries().next()}))){var instance=new C,HASNT_CHAINING=instance[ADDER](IS_WEAK?{}:-0,1)!=instance,THROWS_ON_PRIMITIVES=fails(function(){instance.has(1)}),ACCEPT_ITERABLES=$iterDetect(function(iter){new C(iter)}),BUGGY_ZERO=!IS_WEAK&&fails(function(){for(var $instance=new C,index=5;index--;)$instance[ADDER](index,index);return!$instance.has(-0)});ACCEPT_ITERABLES||((C=wrapper(function(target,iterable){anInstance(target,C,NAME);var that=inheritIfRequired(new Base,target,C);return void 0!=iterable&&forOf(iterable,IS_MAP,that[ADDER],that),that})).prototype=proto,proto.constructor=C),(THROWS_ON_PRIMITIVES||BUGGY_ZERO)&&(fixMethod("delete"),fixMethod("has"),IS_MAP&&fixMethod("get")),(BUGGY_ZERO||HASNT_CHAINING)&&fixMethod(ADDER),IS_WEAK&&proto.clear&&delete proto.clear}else C=common.getConstructor(wrapper,NAME,IS_MAP,ADDER),redefineAll(C.prototype,methods),meta.NEED=!0;return setToStringTag(C,NAME),O[NAME]=C,$export($export.G+$export.W+$export.F*(C!=Base),O),IS_WEAK||common.setStrong(C,NAME,IS_MAP),C}},{"./_an-instance":"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_an-instance.js","./_export":"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_export.js","./_fails":"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_fails.js","./_for-of":"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_for-of.js","./_global":"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_global.js","./_inherit-if-required":"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_inherit-if-required.js","./_is-object":"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_is-object.js","./_iter-detect":"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_iter-detect.js","./_meta":"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_meta.js","./_redefine":"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_redefine.js","./_redefine-all":"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_redefine-all.js","./_set-to-string-tag":"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_set-to-string-tag.js"}],"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_core.js":[function(_dereq_,module,exports){var core=module.exports={version:"2.5.3"};"number"==typeof __e&&(__e=core)},{}],"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_create-property.js":[function(_dereq_,module,exports){"use strict";var $defineProperty=_dereq_("./_object-dp"),createDesc=_dereq_("./_property-desc");module.exports=function(object,index,value){index in object?$defineProperty.f(object,index,createDesc(0,value)):object[index]=value}},{"./_object-dp":"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_object-dp.js","./_property-desc":"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_property-desc.js"}],"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_ctx.js":[function(_dereq_,module,exports){var aFunction=_dereq_("./_a-function");module.exports=function(fn,that,length){if(aFunction(fn),void 0===that)return fn;switch(length){case 1:return function(a){return fn.call(that,a)};case 2:return function(a,b){return fn.call(that,a,b)};case 3:return function(a,b,c){return fn.call(that,a,b,c)}}return function(){return fn.apply(that,arguments)}}},{"./_a-function":"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_a-function.js"}],"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_defined.js":[function(_dereq_,module,exports){module.exports=function(it){if(void 0==it)throw TypeError("Can't call method on "+it);return it}},{}],"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_descriptors.js":[function(_dereq_,module,exports){module.exports=!_dereq_("./_fails")(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},{"./_fails":"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_fails.js"}],"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_dom-create.js":[function(_dereq_,module,exports){var isObject=_dereq_("./_is-object"),document=_dereq_("./_global").document,is=isObject(document)&&isObject(document.createElement);module.exports=function(it){return is?document.createElement(it):{}}},{"./_global":"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_global.js","./_is-object":"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_is-object.js"}],"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_enum-bug-keys.js":[function(_dereq_,module,exports){module.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},{}],"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_enum-keys.js":[function(_dereq_,module,exports){var getKeys=_dereq_("./_object-keys"),gOPS=_dereq_("./_object-gops"),pIE=_dereq_("./_object-pie");module.exports=function(it){var result=getKeys(it),getSymbols=gOPS.f;if(getSymbols)for(var key,symbols=getSymbols(it),isEnum=pIE.f,i=0;symbols.length>i;)isEnum.call(it,key=symbols[i++])&&result.push(key);return result}},{"./_object-gops":"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_object-gops.js","./_object-keys":"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_object-keys.js","./_object-pie":"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_object-pie.js"}],"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_export.js":[function(_dereq_,module,exports){var global=_dereq_("./_global"),core=_dereq_("./_core"),hide=_dereq_("./_hide"),redefine=_dereq_("./_redefine"),ctx=_dereq_("./_ctx"),$export=function(type,name,source){var key,own,out,exp,IS_FORCED=type&$export.F,IS_GLOBAL=type&$export.G,IS_STATIC=type&$export.S,IS_PROTO=type&$export.P,IS_BIND=type&$export.B,target=IS_GLOBAL?global:IS_STATIC?global[name]||(global[name]={}):(global[name]||{}).prototype,exports=IS_GLOBAL?core:core[name]||(core[name]={}),expProto=exports.prototype||(exports.prototype={});for(key in IS_GLOBAL&&(source=name),source)out=((own=!IS_FORCED&&target&&void 0!==target[key])?target:source)[key],exp=IS_BIND&&own?ctx(out,global):IS_PROTO&&"function"==typeof out?ctx(Function.call,out):out,target&&redefine(target,key,out,type&$export.U),exports[key]!=out&&hide(exports,key,exp),IS_PROTO&&expProto[key]!=out&&(expProto[key]=out)};global.core=core,$export.F=1,$export.G=2,$export.S=4,$export.P=8,$export.B=16,$export.W=32,$export.U=64,$export.R=128,module.exports=$export},{"./_core":"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_core.js","./_ctx":"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_ctx.js","./_global":"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_global.js","./_hide":"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_hide.js","./_redefine":"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_redefine.js"}],"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_fails.js":[function(_dereq_,module,exports){module.exports=function(exec){try{return!!exec()}catch(e){return!0}}},{}],"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_for-of.js":[function(_dereq_,module,exports){var ctx=_dereq_("./_ctx"),call=_dereq_("./_iter-call"),isArrayIter=_dereq_("./_is-array-iter"),anObject=_dereq_("./_an-object"),toLength=_dereq_("./_to-length"),getIterFn=_dereq_("./core.get-iterator-method"),BREAK={},RETURN={};(exports=module.exports=function(iterable,entries,fn,that,ITERATOR){var length,step,iterator,result,iterFn=ITERATOR?function(){return iterable}:getIterFn(iterable),f=ctx(fn,that,entries?2:1),index=0;if("function"!=typeof iterFn)throw TypeError(iterable+" is not iterable!");if(isArrayIter(iterFn)){for(length=toLength(iterable.length);length>index;index++)if((result=entries?f(anObject(step=iterable[index])[0],step[1]):f(iterable[index]))===BREAK||result===RETURN)return result}else for(iterator=iterFn.call(iterable);!(step=iterator.next()).done;)if((result=call(iterator,f,step.value,entries))===BREAK||result===RETURN)return result}).BREAK=BREAK,exports.RETURN=RETURN},{"./_an-object":"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_an-object.js","./_ctx":"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_ctx.js","./_is-array-iter":"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_is-array-iter.js","./_iter-call":"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_iter-call.js","./_to-length":"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_to-length.js","./core.get-iterator-method":"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/core.get-iterator-method.js"}],"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_global.js":[function(_dereq_,module,exports){var global=module.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=global)},{}],"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_has.js":[function(_dereq_,module,exports){var hasOwnProperty={}.hasOwnProperty;module.exports=function(it,key){return hasOwnProperty.call(it,key)}},{}],"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_hide.js":[function(_dereq_,module,exports){var dP=_dereq_("./_object-dp"),createDesc=_dereq_("./_property-desc");module.exports=_dereq_("./_descriptors")?function(object,key,value){return dP.f(object,key,createDesc(1,value))}:function(object,key,value){return object[key]=value,object}},{"./_descriptors":"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_descriptors.js","./_object-dp":"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_object-dp.js","./_property-desc":"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_property-desc.js"}],"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_html.js":[function(_dereq_,module,exports){var document=_dereq_("./_global").document;module.exports=document&&document.documentElement},{"./_global":"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_global.js"}],"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_ie8-dom-define.js":[function(_dereq_,module,exports){module.exports=!_dereq_("./_descriptors")&&!_dereq_("./_fails")(function(){return 7!=Object.defineProperty(_dereq_("./_dom-create")("div"),"a",{get:function(){return 7}}).a})},{"./_descriptors":"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_descriptors.js","./_dom-create":"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_dom-create.js","./_fails":"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_fails.js"}],"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_inherit-if-required.js":[function(_dereq_,module,exports){var isObject=_dereq_("./_is-object"),setPrototypeOf=_dereq_("./_set-proto").set;module.exports=function(that,target,C){var P,S=target.constructor;return S!==C&&"function"==typeof S&&(P=S.prototype)!==C.prototype&&isObject(P)&&setPrototypeOf&&setPrototypeOf(that,P),that}},{"./_is-object":"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_is-object.js","./_set-proto":"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_set-proto.js"}],"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_invoke.js":[function(_dereq_,module,exports){module.exports=function(fn,args,that){var un=void 0===that;switch(args.length){case 0:return un?fn():fn.call(that);case 1:return un?fn(args[0]):fn.call(that,args[0]);case 2:return un?fn(args[0],args[1]):fn.call(that,args[0],args[1]);case 3:return un?fn(args[0],args[1],args[2]):fn.call(that,args[0],args[1],args[2]);case 4:return un?fn(args[0],args[1],args[2],args[3]):fn.call(that,args[0],args[1],args[2],args[3])}return fn.apply(that,args)}},{}],"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_iobject.js":[function(_dereq_,module,exports){var cof=_dereq_("./_cof");module.exports=Object("z").propertyIsEnumerable(0)?Object:function(it){return"String"==cof(it)?it.split(""):Object(it)}},{"./_cof":"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_cof.js"}],"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_is-array-iter.js":[function(_dereq_,module,exports){var Iterators=_dereq_("./_iterators"),ITERATOR=_dereq_("./_wks")("iterator"),ArrayProto=Array.prototype;module.exports=function(it){return void 0!==it&&(Iterators.Array===it||ArrayProto[ITERATOR]===it)}},{"./_iterators":"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_iterators.js","./_wks":"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_wks.js"}],"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_is-array.js":[function(_dereq_,module,exports){var cof=_dereq_("./_cof");module.exports=Array.isArray||function(arg){return"Array"==cof(arg)}},{"./_cof":"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_cof.js"}],"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_is-integer.js":[function(_dereq_,module,exports){var isObject=_dereq_("./_is-object"),floor=Math.floor;module.exports=function(it){return!isObject(it)&&isFinite(it)&&floor(it)===it}},{"./_is-object":"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_is-object.js"}],"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_is-object.js":[function(_dereq_,module,exports){module.exports=function(it){return"object"==typeof it?null!==it:"function"==typeof it}},{}],"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_iter-call.js":[function(_dereq_,module,exports){var anObject=_dereq_("./_an-object");module.exports=function(iterator,fn,value,entries){try{return entries?fn(anObject(value)[0],value[1]):fn(value)}catch(e){var ret=iterator.return;throw void 0!==ret&&anObject(ret.call(iterator)),e}}},{"./_an-object":"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_an-object.js"}],"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_iter-create.js":[function(_dereq_,module,exports){"use strict";var create=_dereq_("./_object-create"),descriptor=_dereq_("./_property-desc"),setToStringTag=_dereq_("./_set-to-string-tag"),IteratorPrototype={};_dereq_("./_hide")(IteratorPrototype,_dereq_("./_wks")("iterator"),function(){return this}),module.exports=function(Constructor,NAME,next){Constructor.prototype=create(IteratorPrototype,{next:descriptor(1,next)}),setToStringTag(Constructor,NAME+" Iterator")}},{"./_hide":"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_hide.js","./_object-create":"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_object-create.js","./_property-desc":"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_property-desc.js","./_set-to-string-tag":"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_set-to-string-tag.js","./_wks":"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_wks.js"}],"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_iter-define.js":[function(_dereq_,module,exports){"use strict";var LIBRARY=_dereq_("./_library"),$export=_dereq_("./_export"),redefine=_dereq_("./_redefine"),hide=_dereq_("./_hide"),has=_dereq_("./_has"),Iterators=_dereq_("./_iterators"),$iterCreate=_dereq_("./_iter-create"),setToStringTag=_dereq_("./_set-to-string-tag"),getPrototypeOf=_dereq_("./_object-gpo"),ITERATOR=_dereq_("./_wks")("iterator"),BUGGY=!([].keys&&"next"in[].keys()),returnThis=function(){return this};module.exports=function(Base,NAME,Constructor,next,DEFAULT,IS_SET,FORCED){$iterCreate(Constructor,NAME,next);var methods,key,IteratorPrototype,getMethod=function(kind){if(!BUGGY&&kind in proto)return proto[kind];switch(kind){case"keys":case"values":return function(){return new Constructor(this,kind)}}return function(){return new Constructor(this,kind)}},TAG=NAME+" Iterator",DEF_VALUES="values"==DEFAULT,VALUES_BUG=!1,proto=Base.prototype,$native=proto[ITERATOR]||proto["@@iterator"]||DEFAULT&&proto[DEFAULT],$default=!BUGGY&&$native||getMethod(DEFAULT),$entries=DEFAULT?DEF_VALUES?getMethod("entries"):$default:void 0,$anyNative="Array"==NAME&&proto.entries||$native;if($anyNative&&(IteratorPrototype=getPrototypeOf($anyNative.call(new Base)))!==Object.prototype&&IteratorPrototype.next&&(setToStringTag(IteratorPrototype,TAG,!0),LIBRARY||has(IteratorPrototype,ITERATOR)||hide(IteratorPrototype,ITERATOR,returnThis)),DEF_VALUES&&$native&&"values"!==$native.name&&(VALUES_BUG=!0,$default=function(){return $native.call(this)}),LIBRARY&&!FORCED||!BUGGY&&!VALUES_BUG&&proto[ITERATOR]||hide(proto,ITERATOR,$default),Iterators[NAME]=$default,Iterators[TAG]=returnThis,DEFAULT)if(methods={values:DEF_VALUES?$default:getMethod("values"),keys:IS_SET?$default:getMethod("keys"),entries:$entries},FORCED)for(key in methods)key in proto||redefine(proto,key,methods[key]);else $export($export.P+$export.F*(BUGGY||VALUES_BUG),NAME,methods);return methods}},{"./_export":"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_export.js","./_has":"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_has.js","./_hide":"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_hide.js","./_iter-create":"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_iter-create.js","./_iterators":"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_iterators.js","./_library":"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_library.js","./_object-gpo":"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_object-gpo.js","./_redefine":"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_redefine.js","./_set-to-string-tag":"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_set-to-string-tag.js","./_wks":"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_wks.js"}],"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_iter-detect.js":[function(_dereq_,module,exports){var ITERATOR=_dereq_("./_wks")("iterator"),SAFE_CLOSING=!1;try{var riter=[7][ITERATOR]();riter.return=function(){SAFE_CLOSING=!0},Array.from(riter,function(){throw 2})}catch(e){}module.exports=function(exec,skipClosing){if(!skipClosing&&!SAFE_CLOSING)return!1;var safe=!1;try{var arr=[7],iter=arr[ITERATOR]();iter.next=function(){return{done:safe=!0}},arr[ITERATOR]=function(){return iter},exec(arr)}catch(e){}return safe}},{"./_wks":"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_wks.js"}],"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_iter-step.js":[function(_dereq_,module,exports){module.exports=function(done,value){return{value:value,done:!!done}}},{}],"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_iterators.js":[function(_dereq_,module,exports){module.exports={}},{}],"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_library.js":[function(_dereq_,module,exports){module.exports=!1},{}],"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_meta.js":[function(_dereq_,module,exports){var META=_dereq_("./_uid")("meta"),isObject=_dereq_("./_is-object"),has=_dereq_("./_has"),setDesc=_dereq_("./_object-dp").f,id=0,isExtensible=Object.isExtensible||function(){return!0},FREEZE=!_dereq_("./_fails")(function(){return isExtensible(Object.preventExtensions({}))}),setMeta=function(it){setDesc(it,META,{value:{i:"O"+ ++id,w:{}}})},meta=module.exports={KEY:META,NEED:!1,fastKey:function(it,create){if(!isObject(it))return"symbol"==typeof it?it:("string"==typeof it?"S":"P")+it;if(!has(it,META)){if(!isExtensible(it))return"F";if(!create)return"E";setMeta(it)}return it[META].i},getWeak:function(it,create){if(!has(it,META)){if(!isExtensible(it))return!0;if(!create)return!1;setMeta(it)}return it[META].w},onFreeze:function(it){return FREEZE&&meta.NEED&&isExtensible(it)&&!has(it,META)&&setMeta(it),it}}},{"./_fails":"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_fails.js","./_has":"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_has.js","./_is-object":"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_is-object.js","./_object-dp":"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_object-dp.js","./_uid":"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_uid.js"}],"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_microtask.js":[function(_dereq_,module,exports){var global=_dereq_("./_global"),macrotask=_dereq_("./_task").set,Observer=global.MutationObserver||global.WebKitMutationObserver,process=global.process,Promise=global.Promise,isNode="process"==_dereq_("./_cof")(process);module.exports=function(){var head,last,notify,flush=function(){var parent,fn;for(isNode&&(parent=process.domain)&&parent.exit();head;){fn=head.fn,head=head.next;try{fn()}catch(e){throw head?notify():last=void 0,e}}last=void 0,parent&&parent.enter()};if(isNode)notify=function(){process.nextTick(flush)};else if(!Observer||global.navigator&&global.navigator.standalone)if(Promise&&Promise.resolve){var promise=Promise.resolve();notify=function(){promise.then(flush)}}else notify=function(){macrotask.call(global,flush)};else{var toggle=!0,node=document.createTextNode("");new Observer(flush).observe(node,{characterData:!0}),notify=function(){node.data=toggle=!toggle}}return function(fn){var task={fn:fn,next:void 0};last&&(last.next=task),head||(head=task,notify()),last=task}}},{"./_cof":"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_cof.js","./_global":"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_global.js","./_task":"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_task.js"}],"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_new-promise-capability.js":[function(_dereq_,module,exports){"use strict";var aFunction=_dereq_("./_a-function");module.exports.f=function(C){return new function(C){var resolve,reject;this.promise=new C(function($$resolve,$$reject){if(void 0!==resolve||void 0!==reject)throw TypeError("Bad Promise constructor");resolve=$$resolve,reject=$$reject}),this.resolve=aFunction(resolve),this.reject=aFunction(reject)}(C)}},{"./_a-function":"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_a-function.js"}],"/Users/jnordberg/Development/dsteem/node_modules/core-js/modules/_object-create.js":[function(_dereq_,module,exports){var anObject=_dereq_("./_an-object"),dPs=_dereq_("./_object-dps"),enumBugKeys=_dereq_("./_enum-bug-keys"),IE_PROTO=_dereq_("./_shared-key")("IE_PROTO"),Empty=function(){},createDict=function(){var iframeDocument,iframe=_dereq_("./_dom-create")("iframe"),i=enumBugKeys.length;for(iframe.style.display="none",_dereq_("./_html").appendChild(iframe),iframe.src="javascript:",(iframeDocument=iframe.contentWindow.document).open(),iframeDocument.write(" - - - diff --git a/package.json b/package.json index 420f780..64eb872 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "dsteem", - "version": "0.8.7", + "version": "0.9.0", "description": "Steem blockchain RPC client library", "author": "Johan Nordberg", "license": "BSD-3-Clause",