Update checked-in dependencies
This commit is contained in:
parent
8c70d43f73
commit
ccc5046d0b
17 changed files with 1088 additions and 958 deletions
178
node_modules/long/index.js
generated
vendored
178
node_modules/long/index.js
generated
vendored
|
|
@ -22,9 +22,69 @@
|
|||
var wasm = null;
|
||||
try {
|
||||
wasm = new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([
|
||||
0, 97, 115, 109, 1, 0, 0, 0, 1, 13, 2, 96, 0, 1, 127, 96, 4, 127, 127, 127, 127, 1, 127, 3, 7, 6, 0, 1, 1, 1, 1, 1, 6, 6, 1, 127, 1, 65, 0, 11, 7, 50, 6, 3, 109, 117, 108, 0, 1, 5, 100, 105, 118, 95, 115, 0, 2, 5, 100, 105, 118, 95, 117, 0, 3, 5, 114, 101, 109, 95, 115, 0, 4, 5, 114, 101, 109, 95, 117, 0, 5, 8, 103, 101, 116, 95, 104, 105, 103, 104, 0, 0, 10, 191, 1, 6, 4, 0, 35, 0, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 126, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 127, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 128, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 129, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 130, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11
|
||||
// \0asm
|
||||
0, 97, 115, 109,
|
||||
// version 1
|
||||
1, 0, 0, 0,
|
||||
|
||||
// section "type"
|
||||
1, 13, 2,
|
||||
// 0, () => i32
|
||||
96, 0, 1, 127,
|
||||
// 1, (i32, i32, i32, i32) => i32
|
||||
96, 4, 127, 127, 127, 127, 1, 127,
|
||||
|
||||
// section "function"
|
||||
3, 7, 6,
|
||||
// 0, type 0
|
||||
0,
|
||||
// 1, type 1
|
||||
1,
|
||||
// 2, type 1
|
||||
1,
|
||||
// 3, type 1
|
||||
1,
|
||||
// 4, type 1
|
||||
1,
|
||||
// 5, type 1
|
||||
1,
|
||||
|
||||
// section "global"
|
||||
6, 6, 1,
|
||||
// 0, "high", mutable i32
|
||||
127, 1, 65, 0, 11,
|
||||
|
||||
// section "export"
|
||||
7, 50, 6,
|
||||
// 0, "mul"
|
||||
3, 109, 117, 108, 0, 1,
|
||||
// 1, "div_s"
|
||||
5, 100, 105, 118, 95, 115, 0, 2,
|
||||
// 2, "div_u"
|
||||
5, 100, 105, 118, 95, 117, 0, 3,
|
||||
// 3, "rem_s"
|
||||
5, 114, 101, 109, 95, 115, 0, 4,
|
||||
// 4, "rem_u"
|
||||
5, 114, 101, 109, 95, 117, 0, 5,
|
||||
// 5, "get_high"
|
||||
8, 103, 101, 116, 95, 104, 105, 103, 104, 0, 0,
|
||||
|
||||
// section "code"
|
||||
10, 191, 1, 6,
|
||||
// 0, "get_high"
|
||||
4, 0, 35, 0, 11,
|
||||
// 1, "mul"
|
||||
36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 126, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11,
|
||||
// 2, "div_s"
|
||||
36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 127, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11,
|
||||
// 3, "div_u"
|
||||
36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 128, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11,
|
||||
// 4, "rem_s"
|
||||
36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 129, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11,
|
||||
// 5, "rem_u"
|
||||
36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 130, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11
|
||||
])), {}).exports;
|
||||
} catch (e) {
|
||||
} catch {
|
||||
// no wasm support :(
|
||||
}
|
||||
|
||||
|
|
@ -315,7 +375,7 @@ function fromValue(val, unsigned) {
|
|||
/**
|
||||
* Converts the specified value to a Long using the appropriate from* function for its type.
|
||||
* @function
|
||||
* @param {!Long|number|string|!{low: number, high: number, unsigned: boolean}} val Value
|
||||
* @param {!Long|number|bigint|string|!{low: number, high: number, unsigned: boolean}} val Value
|
||||
* @param {boolean=} unsigned Whether unsigned or not, defaults to signed
|
||||
* @returns {!Long}
|
||||
*/
|
||||
|
|
@ -585,6 +645,22 @@ LongPrototype.getNumBitsAbs = function getNumBitsAbs() {
|
|||
return this.high != 0 ? bit + 33 : bit + 1;
|
||||
};
|
||||
|
||||
/**
|
||||
* Tests if this Long can be safely represented as a JavaScript number.
|
||||
* @this {!Long}
|
||||
* @returns {boolean}
|
||||
*/
|
||||
LongPrototype.isSafeInteger = function isSafeInteger() {
|
||||
// 2^53-1 is the maximum safe value
|
||||
var top11Bits = this.high >> 21;
|
||||
// [0, 2^53-1]
|
||||
if (!top11Bits) return true;
|
||||
// > 2^53-1
|
||||
if (this.unsigned) return false;
|
||||
// [-2^53, -1] except -2^53
|
||||
return top11Bits === -1 && !(this.low === 0 && this.high === -0x200000);
|
||||
};
|
||||
|
||||
/**
|
||||
* Tests if this Long's value equals zero.
|
||||
* @this {!Long}
|
||||
|
|
@ -639,7 +715,7 @@ LongPrototype.isEven = function isEven() {
|
|||
/**
|
||||
* Tests if this Long's value equals the specified's.
|
||||
* @this {!Long}
|
||||
* @param {!Long|number|string} other Other value
|
||||
* @param {!Long|number|bigint|string} other Other value
|
||||
* @returns {boolean}
|
||||
*/
|
||||
LongPrototype.equals = function equals(other) {
|
||||
|
|
@ -653,7 +729,7 @@ LongPrototype.equals = function equals(other) {
|
|||
/**
|
||||
* Tests if this Long's value equals the specified's. This is an alias of {@link Long#equals}.
|
||||
* @function
|
||||
* @param {!Long|number|string} other Other value
|
||||
* @param {!Long|number|bigint|string} other Other value
|
||||
* @returns {boolean}
|
||||
*/
|
||||
LongPrototype.eq = LongPrototype.equals;
|
||||
|
|
@ -661,7 +737,7 @@ LongPrototype.eq = LongPrototype.equals;
|
|||
/**
|
||||
* Tests if this Long's value differs from the specified's.
|
||||
* @this {!Long}
|
||||
* @param {!Long|number|string} other Other value
|
||||
* @param {!Long|number|bigint|string} other Other value
|
||||
* @returns {boolean}
|
||||
*/
|
||||
LongPrototype.notEquals = function notEquals(other) {
|
||||
|
|
@ -671,7 +747,7 @@ LongPrototype.notEquals = function notEquals(other) {
|
|||
/**
|
||||
* Tests if this Long's value differs from the specified's. This is an alias of {@link Long#notEquals}.
|
||||
* @function
|
||||
* @param {!Long|number|string} other Other value
|
||||
* @param {!Long|number|bigint|string} other Other value
|
||||
* @returns {boolean}
|
||||
*/
|
||||
LongPrototype.neq = LongPrototype.notEquals;
|
||||
|
|
@ -679,7 +755,7 @@ LongPrototype.neq = LongPrototype.notEquals;
|
|||
/**
|
||||
* Tests if this Long's value differs from the specified's. This is an alias of {@link Long#notEquals}.
|
||||
* @function
|
||||
* @param {!Long|number|string} other Other value
|
||||
* @param {!Long|number|bigint|string} other Other value
|
||||
* @returns {boolean}
|
||||
*/
|
||||
LongPrototype.ne = LongPrototype.notEquals;
|
||||
|
|
@ -687,7 +763,7 @@ LongPrototype.ne = LongPrototype.notEquals;
|
|||
/**
|
||||
* Tests if this Long's value is less than the specified's.
|
||||
* @this {!Long}
|
||||
* @param {!Long|number|string} other Other value
|
||||
* @param {!Long|number|bigint|string} other Other value
|
||||
* @returns {boolean}
|
||||
*/
|
||||
LongPrototype.lessThan = function lessThan(other) {
|
||||
|
|
@ -697,7 +773,7 @@ LongPrototype.lessThan = function lessThan(other) {
|
|||
/**
|
||||
* Tests if this Long's value is less than the specified's. This is an alias of {@link Long#lessThan}.
|
||||
* @function
|
||||
* @param {!Long|number|string} other Other value
|
||||
* @param {!Long|number|bigint|string} other Other value
|
||||
* @returns {boolean}
|
||||
*/
|
||||
LongPrototype.lt = LongPrototype.lessThan;
|
||||
|
|
@ -705,7 +781,7 @@ LongPrototype.lt = LongPrototype.lessThan;
|
|||
/**
|
||||
* Tests if this Long's value is less than or equal the specified's.
|
||||
* @this {!Long}
|
||||
* @param {!Long|number|string} other Other value
|
||||
* @param {!Long|number|bigint|string} other Other value
|
||||
* @returns {boolean}
|
||||
*/
|
||||
LongPrototype.lessThanOrEqual = function lessThanOrEqual(other) {
|
||||
|
|
@ -715,7 +791,7 @@ LongPrototype.lessThanOrEqual = function lessThanOrEqual(other) {
|
|||
/**
|
||||
* Tests if this Long's value is less than or equal the specified's. This is an alias of {@link Long#lessThanOrEqual}.
|
||||
* @function
|
||||
* @param {!Long|number|string} other Other value
|
||||
* @param {!Long|number|bigint|string} other Other value
|
||||
* @returns {boolean}
|
||||
*/
|
||||
LongPrototype.lte = LongPrototype.lessThanOrEqual;
|
||||
|
|
@ -723,7 +799,7 @@ LongPrototype.lte = LongPrototype.lessThanOrEqual;
|
|||
/**
|
||||
* Tests if this Long's value is less than or equal the specified's. This is an alias of {@link Long#lessThanOrEqual}.
|
||||
* @function
|
||||
* @param {!Long|number|string} other Other value
|
||||
* @param {!Long|number|bigint|string} other Other value
|
||||
* @returns {boolean}
|
||||
*/
|
||||
LongPrototype.le = LongPrototype.lessThanOrEqual;
|
||||
|
|
@ -731,7 +807,7 @@ LongPrototype.le = LongPrototype.lessThanOrEqual;
|
|||
/**
|
||||
* Tests if this Long's value is greater than the specified's.
|
||||
* @this {!Long}
|
||||
* @param {!Long|number|string} other Other value
|
||||
* @param {!Long|number|bigint|string} other Other value
|
||||
* @returns {boolean}
|
||||
*/
|
||||
LongPrototype.greaterThan = function greaterThan(other) {
|
||||
|
|
@ -741,7 +817,7 @@ LongPrototype.greaterThan = function greaterThan(other) {
|
|||
/**
|
||||
* Tests if this Long's value is greater than the specified's. This is an alias of {@link Long#greaterThan}.
|
||||
* @function
|
||||
* @param {!Long|number|string} other Other value
|
||||
* @param {!Long|number|bigint|string} other Other value
|
||||
* @returns {boolean}
|
||||
*/
|
||||
LongPrototype.gt = LongPrototype.greaterThan;
|
||||
|
|
@ -749,7 +825,7 @@ LongPrototype.gt = LongPrototype.greaterThan;
|
|||
/**
|
||||
* Tests if this Long's value is greater than or equal the specified's.
|
||||
* @this {!Long}
|
||||
* @param {!Long|number|string} other Other value
|
||||
* @param {!Long|number|bigint|string} other Other value
|
||||
* @returns {boolean}
|
||||
*/
|
||||
LongPrototype.greaterThanOrEqual = function greaterThanOrEqual(other) {
|
||||
|
|
@ -759,7 +835,7 @@ LongPrototype.greaterThanOrEqual = function greaterThanOrEqual(other) {
|
|||
/**
|
||||
* Tests if this Long's value is greater than or equal the specified's. This is an alias of {@link Long#greaterThanOrEqual}.
|
||||
* @function
|
||||
* @param {!Long|number|string} other Other value
|
||||
* @param {!Long|number|bigint|string} other Other value
|
||||
* @returns {boolean}
|
||||
*/
|
||||
LongPrototype.gte = LongPrototype.greaterThanOrEqual;
|
||||
|
|
@ -767,7 +843,7 @@ LongPrototype.gte = LongPrototype.greaterThanOrEqual;
|
|||
/**
|
||||
* Tests if this Long's value is greater than or equal the specified's. This is an alias of {@link Long#greaterThanOrEqual}.
|
||||
* @function
|
||||
* @param {!Long|number|string} other Other value
|
||||
* @param {!Long|number|bigint|string} other Other value
|
||||
* @returns {boolean}
|
||||
*/
|
||||
LongPrototype.ge = LongPrototype.greaterThanOrEqual;
|
||||
|
|
@ -775,7 +851,7 @@ LongPrototype.ge = LongPrototype.greaterThanOrEqual;
|
|||
/**
|
||||
* Compares this Long's value with the specified's.
|
||||
* @this {!Long}
|
||||
* @param {!Long|number|string} other Other value
|
||||
* @param {!Long|number|bigint|string} other Other value
|
||||
* @returns {number} 0 if they are the same, 1 if the this is greater and -1
|
||||
* if the given one is greater
|
||||
*/
|
||||
|
|
@ -800,7 +876,7 @@ LongPrototype.compare = function compare(other) {
|
|||
/**
|
||||
* Compares this Long's value with the specified's. This is an alias of {@link Long#compare}.
|
||||
* @function
|
||||
* @param {!Long|number|string} other Other value
|
||||
* @param {!Long|number|bigint|string} other Other value
|
||||
* @returns {number} 0 if they are the same, 1 if the this is greater and -1
|
||||
* if the given one is greater
|
||||
*/
|
||||
|
|
@ -827,7 +903,7 @@ LongPrototype.neg = LongPrototype.negate;
|
|||
/**
|
||||
* Returns the sum of this and the specified Long.
|
||||
* @this {!Long}
|
||||
* @param {!Long|number|string} addend Addend
|
||||
* @param {!Long|number|bigint|string} addend Addend
|
||||
* @returns {!Long} Sum
|
||||
*/
|
||||
LongPrototype.add = function add(addend) {
|
||||
|
|
@ -864,7 +940,7 @@ LongPrototype.add = function add(addend) {
|
|||
/**
|
||||
* Returns the difference of this and the specified Long.
|
||||
* @this {!Long}
|
||||
* @param {!Long|number|string} subtrahend Subtrahend
|
||||
* @param {!Long|number|bigint|string} subtrahend Subtrahend
|
||||
* @returns {!Long} Difference
|
||||
*/
|
||||
LongPrototype.subtract = function subtract(subtrahend) {
|
||||
|
|
@ -876,7 +952,7 @@ LongPrototype.subtract = function subtract(subtrahend) {
|
|||
/**
|
||||
* Returns the difference of this and the specified Long. This is an alias of {@link Long#subtract}.
|
||||
* @function
|
||||
* @param {!Long|number|string} subtrahend Subtrahend
|
||||
* @param {!Long|number|bigint|string} subtrahend Subtrahend
|
||||
* @returns {!Long} Difference
|
||||
*/
|
||||
LongPrototype.sub = LongPrototype.subtract;
|
||||
|
|
@ -884,7 +960,7 @@ LongPrototype.sub = LongPrototype.subtract;
|
|||
/**
|
||||
* Returns the product of this and the specified Long.
|
||||
* @this {!Long}
|
||||
* @param {!Long|number|string} multiplier Multiplier
|
||||
* @param {!Long|number|bigint|string} multiplier Multiplier
|
||||
* @returns {!Long} Product
|
||||
*/
|
||||
LongPrototype.multiply = function multiply(multiplier) {
|
||||
|
|
@ -961,7 +1037,7 @@ LongPrototype.multiply = function multiply(multiplier) {
|
|||
/**
|
||||
* Returns the product of this and the specified Long. This is an alias of {@link Long#multiply}.
|
||||
* @function
|
||||
* @param {!Long|number|string} multiplier Multiplier
|
||||
* @param {!Long|number|bigint|string} multiplier Multiplier
|
||||
* @returns {!Long} Product
|
||||
*/
|
||||
LongPrototype.mul = LongPrototype.multiply;
|
||||
|
|
@ -970,7 +1046,7 @@ LongPrototype.mul = LongPrototype.multiply;
|
|||
* Returns this Long divided by the specified. The result is signed if this Long is signed or
|
||||
* unsigned if this Long is unsigned.
|
||||
* @this {!Long}
|
||||
* @param {!Long|number|string} divisor Divisor
|
||||
* @param {!Long|number|bigint|string} divisor Divisor
|
||||
* @returns {!Long} Quotient
|
||||
*/
|
||||
LongPrototype.divide = function divide(divisor) {
|
||||
|
|
@ -1083,7 +1159,7 @@ LongPrototype.divide = function divide(divisor) {
|
|||
/**
|
||||
* Returns this Long divided by the specified. This is an alias of {@link Long#divide}.
|
||||
* @function
|
||||
* @param {!Long|number|string} divisor Divisor
|
||||
* @param {!Long|number|bigint|string} divisor Divisor
|
||||
* @returns {!Long} Quotient
|
||||
*/
|
||||
LongPrototype.div = LongPrototype.divide;
|
||||
|
|
@ -1091,7 +1167,7 @@ LongPrototype.div = LongPrototype.divide;
|
|||
/**
|
||||
* Returns this Long modulo the specified.
|
||||
* @this {!Long}
|
||||
* @param {!Long|number|string} divisor Divisor
|
||||
* @param {!Long|number|bigint|string} divisor Divisor
|
||||
* @returns {!Long} Remainder
|
||||
*/
|
||||
LongPrototype.modulo = function modulo(divisor) {
|
||||
|
|
@ -1115,7 +1191,7 @@ LongPrototype.modulo = function modulo(divisor) {
|
|||
/**
|
||||
* Returns this Long modulo the specified. This is an alias of {@link Long#modulo}.
|
||||
* @function
|
||||
* @param {!Long|number|string} divisor Divisor
|
||||
* @param {!Long|number|bigint|string} divisor Divisor
|
||||
* @returns {!Long} Remainder
|
||||
*/
|
||||
LongPrototype.mod = LongPrototype.modulo;
|
||||
|
|
@ -1123,7 +1199,7 @@ LongPrototype.mod = LongPrototype.modulo;
|
|||
/**
|
||||
* Returns this Long modulo the specified. This is an alias of {@link Long#modulo}.
|
||||
* @function
|
||||
* @param {!Long|number|string} divisor Divisor
|
||||
* @param {!Long|number|bigint|string} divisor Divisor
|
||||
* @returns {!Long} Remainder
|
||||
*/
|
||||
LongPrototype.rem = LongPrototype.modulo;
|
||||
|
|
@ -1174,7 +1250,7 @@ LongPrototype.ctz = LongPrototype.countTrailingZeros;
|
|||
/**
|
||||
* Returns the bitwise AND of this Long and the specified.
|
||||
* @this {!Long}
|
||||
* @param {!Long|number|string} other Other Long
|
||||
* @param {!Long|number|bigint|string} other Other Long
|
||||
* @returns {!Long}
|
||||
*/
|
||||
LongPrototype.and = function and(other) {
|
||||
|
|
@ -1186,7 +1262,7 @@ LongPrototype.and = function and(other) {
|
|||
/**
|
||||
* Returns the bitwise OR of this Long and the specified.
|
||||
* @this {!Long}
|
||||
* @param {!Long|number|string} other Other Long
|
||||
* @param {!Long|number|bigint|string} other Other Long
|
||||
* @returns {!Long}
|
||||
*/
|
||||
LongPrototype.or = function or(other) {
|
||||
|
|
@ -1198,7 +1274,7 @@ LongPrototype.or = function or(other) {
|
|||
/**
|
||||
* Returns the bitwise XOR of this Long and the given one.
|
||||
* @this {!Long}
|
||||
* @param {!Long|number|string} other Other Long
|
||||
* @param {!Long|number|bigint|string} other Other Long
|
||||
* @returns {!Long}
|
||||
*/
|
||||
LongPrototype.xor = function xor(other) {
|
||||
|
|
@ -1464,4 +1540,40 @@ Long.fromBytesBE = function fromBytesBE(bytes, unsigned) {
|
|||
);
|
||||
};
|
||||
|
||||
// Support conversion to/from BigInt where available
|
||||
if (typeof BigInt === "function") {
|
||||
|
||||
/**
|
||||
* Returns a Long representing the given big integer.
|
||||
* @function
|
||||
* @param {number} value The big integer value
|
||||
* @param {boolean=} unsigned Whether unsigned or not, defaults to signed
|
||||
* @returns {!Long} The corresponding Long value
|
||||
*/
|
||||
Long.fromBigInt = function fromBigInt(value, unsigned) {
|
||||
var lowBits = Number(BigInt.asIntN(32, value));
|
||||
var highBits = Number(BigInt.asIntN(32, value >> BigInt(32)));
|
||||
return fromBits(lowBits, highBits, unsigned);
|
||||
};
|
||||
|
||||
// Override
|
||||
Long.fromValue = function fromValueWithBigInt(value, unsigned) {
|
||||
if (typeof value === "bigint")
|
||||
return fromBigInt(value, unsigned);
|
||||
return fromValue(value, unsigned);
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts the Long to its big integer representation.
|
||||
* @this {!Long}
|
||||
* @returns {bigint}
|
||||
*/
|
||||
LongPrototype.toBigInt = function toBigInt() {
|
||||
var lowBigInt = BigInt(this.low >>> 0);
|
||||
var highBigInt = BigInt(this.unsigned ? this.high >>> 0 : this.high);
|
||||
return highBigInt << BigInt(32) | lowBigInt;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
export default Long;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue