Update checked-in dependencies
This commit is contained in:
parent
8c70d43f73
commit
ccc5046d0b
17 changed files with 1088 additions and 958 deletions
56
node_modules/long/README.md
generated
vendored
56
node_modules/long/README.md
generated
vendored
|
|
@ -4,7 +4,7 @@ long.js
|
|||
A Long class for representing a 64 bit two's-complement integer value derived from the [Closure Library](https://github.com/google/closure-library)
|
||||
for stand-alone use and extended with unsigned support.
|
||||
|
||||
[](https://github.com/dcodeIO/long.js/actions?query=workflow%3ATest) [](https://github.com/dcodeIO/long.js/actions?query=workflow%3APublish) [](https://www.npmjs.com/package/long)
|
||||
[](https://github.com/dcodeIO/long.js/actions/workflows/test.yml) [](https://github.com/dcodeIO/long.js/actions/workflows/publish.yml) [](https://www.npmjs.com/package/long)
|
||||
|
||||
Background
|
||||
----------
|
||||
|
|
@ -103,7 +103,10 @@ API
|
|||
|
||||
### Utility
|
||||
|
||||
* Long.**isLong**(obj: `*`): `boolean`<br />
|
||||
* type **LongLike**: `Long | number | bigint | string`<br />
|
||||
Any value or object that either is or can be converted to a Long.
|
||||
|
||||
* Long.**isLong**(obj: `any`): `boolean`<br />
|
||||
Tests if the specified object is a Long.
|
||||
|
||||
* Long.**fromBits**(lowBits: `number`, highBits: `number`, unsigned?: `boolean`): `Long`<br />
|
||||
|
|
@ -124,28 +127,31 @@ API
|
|||
* Long.**fromNumber**(value: `number`, unsigned?: `boolean`): `Long`<br />
|
||||
Returns a Long representing the given value, provided that it is a finite number. Otherwise, zero is returned.
|
||||
|
||||
* Long.**fromBigInt**(value: `bigint`, unsigned?: `boolean`): `Long`<br />
|
||||
Returns a Long representing the given big integer.
|
||||
|
||||
* Long.**fromString**(str: `string`, unsigned?: `boolean`, radix?: `number`)<br />
|
||||
Long.**fromString**(str: `string`, radix: `number`)<br />
|
||||
Returns a Long representation of the given string, written using the specified radix.
|
||||
|
||||
* Long.**fromValue**(val: `*`, unsigned?: `boolean`): `Long`<br />
|
||||
* Long.**fromValue**(val: `LongLike`, unsigned?: `boolean`): `Long`<br />
|
||||
Converts the specified value to a Long using the appropriate from* function for its type.
|
||||
|
||||
### Methods
|
||||
|
||||
* Long#**add**(addend: `Long | number | string`): `Long`<br />
|
||||
* Long#**add**(addend: `LongLike`): `Long`<br />
|
||||
Returns the sum of this and the specified Long.
|
||||
|
||||
* Long#**and**(other: `Long | number | string`): `Long`<br />
|
||||
* Long#**and**(other: `LongLike`): `Long`<br />
|
||||
Returns the bitwise AND of this Long and the specified.
|
||||
|
||||
* Long#**compare**/**comp**(other: `Long | number | string`): `number`<br />
|
||||
* Long#**compare**/**comp**(other: `LongLike`): `number`<br />
|
||||
Compares this Long's value with the specified's. Returns `0` if they are the same, `1` if the this is greater and `-1` if the given one is greater.
|
||||
|
||||
* Long#**divide**/**div**(divisor: `Long | number | string`): `Long`<br />
|
||||
* Long#**divide**/**div**(divisor: `LongLike`): `Long`<br />
|
||||
Returns this Long divided by the specified.
|
||||
|
||||
* Long#**equals**/**eq**(other: `Long | number | string`): `boolean`<br />
|
||||
* Long#**equals**/**eq**(other: `LongLike`): `boolean`<br />
|
||||
Tests if this Long's value equals the specified's.
|
||||
|
||||
* Long#**getHighBits**(): `number`<br />
|
||||
|
|
@ -163,10 +169,10 @@ API
|
|||
* Long#**getNumBitsAbs**(): `number`<br />
|
||||
Gets the number of bits needed to represent the absolute value of this Long.
|
||||
|
||||
* Long#**greaterThan**/**gt**(other: `Long | number | string`): `boolean`<br />
|
||||
* Long#**greaterThan**/**gt**(other: `LongLike`): `boolean`<br />
|
||||
Tests if this Long's value is greater than the specified's.
|
||||
|
||||
* Long#**greaterThanOrEqual**/**gte**/**ge**(other: `Long | number | string`): `boolean`<br />
|
||||
* Long#**greaterThanOrEqual**/**gte**/**ge**(other: `LongLike`): `boolean`<br />
|
||||
Tests if this Long's value is greater than or equal the specified's.
|
||||
|
||||
* Long#**isEven**(): `boolean`<br />
|
||||
|
|
@ -181,19 +187,22 @@ API
|
|||
* Long#**isPositive**(): `boolean`<br />
|
||||
Tests if this Long's value is positive or zero.
|
||||
|
||||
* Long#**isSafeInteger**(): `boolean`<br />
|
||||
Tests if this Long can be safely represented as a JavaScript number.
|
||||
|
||||
* Long#**isZero**/**eqz**(): `boolean`<br />
|
||||
Tests if this Long's value equals zero.
|
||||
|
||||
* Long#**lessThan**/**lt**(other: `Long | number | string`): `boolean`<br />
|
||||
* Long#**lessThan**/**lt**(other: `LongLike`): `boolean`<br />
|
||||
Tests if this Long's value is less than the specified's.
|
||||
|
||||
* Long#**lessThanOrEqual**/**lte**/**le**(other: `Long | number | string`): `boolean`<br />
|
||||
* Long#**lessThanOrEqual**/**lte**/**le**(other: `LongLike`): `boolean`<br />
|
||||
Tests if this Long's value is less than or equal the specified's.
|
||||
|
||||
* Long#**modulo**/**mod**/**rem**(divisor: `Long | number | string`): `Long`<br />
|
||||
* Long#**modulo**/**mod**/**rem**(divisor: `LongLike`): `Long`<br />
|
||||
Returns this Long modulo the specified.
|
||||
|
||||
* Long#**multiply**/**mul**(multiplier: `Long | number | string`): `Long`<br />
|
||||
* Long#**multiply**/**mul**(multiplier: `LongLike`): `Long`<br />
|
||||
Returns the product of this and the specified Long.
|
||||
|
||||
* Long#**negate**/**neg**(): `Long`<br />
|
||||
|
|
@ -208,28 +217,28 @@ API
|
|||
* Long#**countTrailingZeros**/**ctz**(): `number`<br />
|
||||
Returns count trailing zeros of this Long.
|
||||
|
||||
* Long#**notEquals**/**neq**/**ne**(other: `Long | number | string`): `boolean`<br />
|
||||
* Long#**notEquals**/**neq**/**ne**(other: `LongLike`): `boolean`<br />
|
||||
Tests if this Long's value differs from the specified's.
|
||||
|
||||
* Long#**or**(other: `Long | number | string`): `Long`<br />
|
||||
* Long#**or**(other: `LongLike`): `Long`<br />
|
||||
Returns the bitwise OR of this Long and the specified.
|
||||
|
||||
* Long#**shiftLeft**/**shl**(numBits: `Long | number | string`): `Long`<br />
|
||||
* Long#**shiftLeft**/**shl**(numBits: `Long | number`): `Long`<br />
|
||||
Returns this Long with bits shifted to the left by the given amount.
|
||||
|
||||
* Long#**shiftRight**/**shr**(numBits: `Long | number | string`): `Long`<br />
|
||||
* Long#**shiftRight**/**shr**(numBits: `Long | number`): `Long`<br />
|
||||
Returns this Long with bits arithmetically shifted to the right by the given amount.
|
||||
|
||||
* Long#**shiftRightUnsigned**/**shru**/**shr_u**(numBits: `Long | number | string`): `Long`<br />
|
||||
* Long#**shiftRightUnsigned**/**shru**/**shr_u**(numBits: `Long | number`): `Long`<br />
|
||||
Returns this Long with bits logically shifted to the right by the given amount.
|
||||
|
||||
* Long#**rotateLeft**/**rotl**(numBits: `Long | number | string`): `Long`<br />
|
||||
* Long#**rotateLeft**/**rotl**(numBits: `Long | number`): `Long`<br />
|
||||
Returns this Long with bits rotated to the left by the given amount.
|
||||
|
||||
* Long#**rotateRight**/**rotr**(numBits: `Long | number | string`): `Long`<br />
|
||||
* Long#**rotateRight**/**rotr**(numBits: `Long | number`): `Long`<br />
|
||||
Returns this Long with bits rotated to the right by the given amount.
|
||||
|
||||
* Long#**subtract**/**sub**(subtrahend: `Long | number | string`): `Long`<br />
|
||||
* Long#**subtract**/**sub**(subtrahend: `LongLike`): `Long`<br />
|
||||
Returns the difference of this and the specified Long.
|
||||
|
||||
* Long#**toBytes**(le?: `boolean`): `number[]`<br />
|
||||
|
|
@ -247,6 +256,9 @@ API
|
|||
* Long#**toNumber**(): `number`<br />
|
||||
Converts the Long to a the nearest floating-point representation of this value (double, 53 bit mantissa).
|
||||
|
||||
* Long#**toBigInt**(): `bigint`<br />
|
||||
Converts the Long to its big integer representation.
|
||||
|
||||
* Long#**toSigned**(): `Long`<br />
|
||||
Converts this Long to signed.
|
||||
|
||||
|
|
|
|||
4
node_modules/long/index.d.ts
generated
vendored
4
node_modules/long/index.d.ts
generated
vendored
|
|
@ -1,2 +1,2 @@
|
|||
import Long from './umd/index';
|
||||
export default Long; // compatible with `import Long from "long"`
|
||||
import { Long } from './types.js';
|
||||
export default Long;
|
||||
|
|
|
|||
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;
|
||||
|
|
|
|||
10
node_modules/long/package.json
generated
vendored
10
node_modules/long/package.json
generated
vendored
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "long",
|
||||
"version": "5.2.4",
|
||||
"version": "5.3.0",
|
||||
"author": "Daniel Wirtz <dcode@dcode.io>",
|
||||
"description": "A Long class for representing a 64-bit two's-complement integer value.",
|
||||
"repository": {
|
||||
|
|
@ -33,7 +33,9 @@
|
|||
},
|
||||
"scripts": {
|
||||
"build": "esm2umd Long index.js > umd/index.js",
|
||||
"test": "node tests"
|
||||
"test": "npm run test:unit && npm run test:typescript",
|
||||
"test:unit": "node tests",
|
||||
"test:typescript": "tsc --project tests/typescript/tsconfig.esnext.json && tsc --project tests/typescript/tsconfig.nodenext.json && tsc --project tests/typescript/tsconfig.commonjs.json"
|
||||
},
|
||||
"files": [
|
||||
"index.js",
|
||||
|
|
@ -41,10 +43,12 @@
|
|||
"umd/index.js",
|
||||
"umd/index.d.ts",
|
||||
"umd/package.json",
|
||||
"types.d.ts",
|
||||
"LICENSE",
|
||||
"README.md"
|
||||
],
|
||||
"devDependencies": {
|
||||
"esm2umd": "^0.2.1"
|
||||
"esm2umd": "^0.2.2",
|
||||
"typescript": "^5.7.3"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
465
node_modules/long/types.d.ts
generated
vendored
Normal file
465
node_modules/long/types.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,465 @@
|
|||
type LongLike = Long | number | bigint | string | { low: number; high: number; unsigned: boolean };
|
||||
|
||||
export declare class Long {
|
||||
/**
|
||||
* Constructs a 64 bit two's-complement integer, given its low and high 32 bit values as signed integers. See the from* functions below for more convenient ways of constructing Longs.
|
||||
*/
|
||||
constructor(low: number, high?: number, unsigned?: boolean);
|
||||
|
||||
/**
|
||||
* Maximum unsigned value.
|
||||
*/
|
||||
static MAX_UNSIGNED_VALUE: Long;
|
||||
|
||||
/**
|
||||
* Maximum signed value.
|
||||
*/
|
||||
static MAX_VALUE: Long;
|
||||
|
||||
/**
|
||||
* Minimum signed value.
|
||||
*/
|
||||
static MIN_VALUE: Long;
|
||||
|
||||
/**
|
||||
* Signed negative one.
|
||||
*/
|
||||
static NEG_ONE: Long;
|
||||
|
||||
/**
|
||||
* Signed one.
|
||||
*/
|
||||
static ONE: Long;
|
||||
|
||||
/**
|
||||
* Unsigned one.
|
||||
*/
|
||||
static UONE: Long;
|
||||
|
||||
/**
|
||||
* Unsigned zero.
|
||||
*/
|
||||
static UZERO: Long;
|
||||
|
||||
/**
|
||||
* Signed zero
|
||||
*/
|
||||
static ZERO: Long;
|
||||
|
||||
/**
|
||||
* The high 32 bits as a signed value.
|
||||
*/
|
||||
high: number;
|
||||
|
||||
/**
|
||||
* The low 32 bits as a signed value.
|
||||
*/
|
||||
low: number;
|
||||
|
||||
/**
|
||||
* Whether unsigned or not.
|
||||
*/
|
||||
unsigned: boolean;
|
||||
|
||||
/**
|
||||
* Returns a Long representing the 64 bit integer that comes by concatenating the given low and high bits. Each is assumed to use 32 bits.
|
||||
*/
|
||||
static fromBits(lowBits: number, highBits: number, unsigned?: boolean): Long;
|
||||
|
||||
/**
|
||||
* Returns a Long representing the given 32 bit integer value.
|
||||
*/
|
||||
static fromInt(value: number, unsigned?: boolean): Long;
|
||||
|
||||
/**
|
||||
* Returns a Long representing the given value, provided that it is a finite number. Otherwise, zero is returned.
|
||||
*/
|
||||
static fromNumber(value: number, unsigned?: boolean): Long;
|
||||
|
||||
/**
|
||||
* Returns a Long representing the given big integer value.
|
||||
*/
|
||||
static fromBigInt(value: bigint, unsigned?: boolean): Long;
|
||||
|
||||
/**
|
||||
* Returns a Long representation of the given string, written using the specified radix.
|
||||
*/
|
||||
static fromString(
|
||||
str: string,
|
||||
unsigned?: boolean | number,
|
||||
radix?: number
|
||||
): Long;
|
||||
|
||||
/**
|
||||
* Creates a Long from its byte representation.
|
||||
*/
|
||||
static fromBytes(bytes: number[], unsigned?: boolean, le?: boolean): Long;
|
||||
|
||||
/**
|
||||
* Creates a Long from its little endian byte representation.
|
||||
*/
|
||||
static fromBytesLE(bytes: number[], unsigned?: boolean): Long;
|
||||
|
||||
/**
|
||||
* Creates a Long from its big endian byte representation.
|
||||
*/
|
||||
static fromBytesBE(bytes: number[], unsigned?: boolean): Long;
|
||||
|
||||
/**
|
||||
* Tests if the specified object is a Long.
|
||||
*/
|
||||
static isLong(obj: any): obj is Long;
|
||||
|
||||
/**
|
||||
* Converts the specified value to a Long.
|
||||
*/
|
||||
static fromValue(val: LongLike, unsigned?: boolean): Long;
|
||||
|
||||
/**
|
||||
* Returns the sum of this and the specified Long.
|
||||
*/
|
||||
add(addend: LongLike): Long;
|
||||
|
||||
/**
|
||||
* Returns the bitwise AND of this Long and the specified.
|
||||
*/
|
||||
and(other: LongLike): Long;
|
||||
|
||||
/**
|
||||
* Compares this Long's value with the specified's.
|
||||
*/
|
||||
compare(other: LongLike): number;
|
||||
|
||||
/**
|
||||
* Compares this Long's value with the specified's.
|
||||
*/
|
||||
comp(other: LongLike): number;
|
||||
|
||||
/**
|
||||
* Returns this Long divided by the specified.
|
||||
*/
|
||||
divide(divisor: LongLike): Long;
|
||||
|
||||
/**
|
||||
* Returns this Long divided by the specified.
|
||||
*/
|
||||
div(divisor: LongLike): Long;
|
||||
|
||||
/**
|
||||
* Tests if this Long's value equals the specified's.
|
||||
*/
|
||||
equals(other: LongLike): boolean;
|
||||
|
||||
/**
|
||||
* Tests if this Long's value equals the specified's.
|
||||
*/
|
||||
eq(other: LongLike): boolean;
|
||||
|
||||
/**
|
||||
* Gets the high 32 bits as a signed integer.
|
||||
*/
|
||||
getHighBits(): number;
|
||||
|
||||
/**
|
||||
* Gets the high 32 bits as an unsigned integer.
|
||||
*/
|
||||
getHighBitsUnsigned(): number;
|
||||
|
||||
/**
|
||||
* Gets the low 32 bits as a signed integer.
|
||||
*/
|
||||
getLowBits(): number;
|
||||
|
||||
/**
|
||||
* Gets the low 32 bits as an unsigned integer.
|
||||
*/
|
||||
getLowBitsUnsigned(): number;
|
||||
|
||||
/**
|
||||
* Gets the number of bits needed to represent the absolute value of this Long.
|
||||
*/
|
||||
getNumBitsAbs(): number;
|
||||
|
||||
/**
|
||||
* Tests if this Long's value is greater than the specified's.
|
||||
*/
|
||||
greaterThan(other: LongLike): boolean;
|
||||
|
||||
/**
|
||||
* Tests if this Long's value is greater than the specified's.
|
||||
*/
|
||||
gt(other: LongLike): boolean;
|
||||
|
||||
/**
|
||||
* Tests if this Long's value is greater than or equal the specified's.
|
||||
*/
|
||||
greaterThanOrEqual(other: LongLike): boolean;
|
||||
|
||||
/**
|
||||
* Tests if this Long's value is greater than or equal the specified's.
|
||||
*/
|
||||
gte(other: LongLike): boolean;
|
||||
|
||||
/**
|
||||
* Tests if this Long's value is greater than or equal the specified's.
|
||||
*/
|
||||
ge(other: LongLike): boolean;
|
||||
|
||||
/**
|
||||
* Tests if this Long's value is even.
|
||||
*/
|
||||
isEven(): boolean;
|
||||
|
||||
/**
|
||||
* Tests if this Long's value is negative.
|
||||
*/
|
||||
isNegative(): boolean;
|
||||
|
||||
/**
|
||||
* Tests if this Long's value is odd.
|
||||
*/
|
||||
isOdd(): boolean;
|
||||
|
||||
/**
|
||||
* Tests if this Long's value is positive or zero.
|
||||
*/
|
||||
isPositive(): boolean;
|
||||
|
||||
/**
|
||||
* Tests if this Long can be safely represented as a JavaScript number.
|
||||
*/
|
||||
isSafeInteger(): boolean;
|
||||
|
||||
/**
|
||||
* Tests if this Long's value equals zero.
|
||||
*/
|
||||
isZero(): boolean;
|
||||
|
||||
/**
|
||||
* Tests if this Long's value equals zero.
|
||||
*/
|
||||
eqz(): boolean;
|
||||
|
||||
/**
|
||||
* Tests if this Long's value is less than the specified's.
|
||||
*/
|
||||
lessThan(other: LongLike): boolean;
|
||||
|
||||
/**
|
||||
* Tests if this Long's value is less than the specified's.
|
||||
*/
|
||||
lt(other: LongLike): boolean;
|
||||
|
||||
/**
|
||||
* Tests if this Long's value is less than or equal the specified's.
|
||||
*/
|
||||
lessThanOrEqual(other: LongLike): boolean;
|
||||
|
||||
/**
|
||||
* Tests if this Long's value is less than or equal the specified's.
|
||||
*/
|
||||
lte(other: LongLike): boolean;
|
||||
|
||||
/**
|
||||
* Tests if this Long's value is less than or equal the specified's.
|
||||
*/
|
||||
le(other: LongLike): boolean;
|
||||
|
||||
/**
|
||||
* Returns this Long modulo the specified.
|
||||
*/
|
||||
modulo(other: LongLike): Long;
|
||||
|
||||
/**
|
||||
* Returns this Long modulo the specified.
|
||||
*/
|
||||
mod(other: LongLike): Long;
|
||||
|
||||
/**
|
||||
* Returns this Long modulo the specified.
|
||||
*/
|
||||
rem(other: LongLike): Long;
|
||||
|
||||
/**
|
||||
* Returns the product of this and the specified Long.
|
||||
*/
|
||||
multiply(multiplier: LongLike): Long;
|
||||
|
||||
/**
|
||||
* Returns the product of this and the specified Long.
|
||||
*/
|
||||
mul(multiplier: LongLike): Long;
|
||||
|
||||
/**
|
||||
* Negates this Long's value.
|
||||
*/
|
||||
negate(): Long;
|
||||
|
||||
/**
|
||||
* Negates this Long's value.
|
||||
*/
|
||||
neg(): Long;
|
||||
|
||||
/**
|
||||
* Returns the bitwise NOT of this Long.
|
||||
*/
|
||||
not(): Long;
|
||||
|
||||
/**
|
||||
* Returns count leading zeros of this Long.
|
||||
*/
|
||||
countLeadingZeros(): number;
|
||||
|
||||
/**
|
||||
* Returns count leading zeros of this Long.
|
||||
*/
|
||||
clz(): number;
|
||||
|
||||
/**
|
||||
* Returns count trailing zeros of this Long.
|
||||
*/
|
||||
countTrailingZeros(): number;
|
||||
|
||||
/**
|
||||
* Returns count trailing zeros of this Long.
|
||||
*/
|
||||
ctz(): number;
|
||||
|
||||
/**
|
||||
* Tests if this Long's value differs from the specified's.
|
||||
*/
|
||||
notEquals(other: LongLike): boolean;
|
||||
|
||||
/**
|
||||
* Tests if this Long's value differs from the specified's.
|
||||
*/
|
||||
neq(other: LongLike): boolean;
|
||||
|
||||
/**
|
||||
* Tests if this Long's value differs from the specified's.
|
||||
*/
|
||||
ne(other: LongLike): boolean;
|
||||
|
||||
/**
|
||||
* Returns the bitwise OR of this Long and the specified.
|
||||
*/
|
||||
or(other: LongLike): Long;
|
||||
|
||||
/**
|
||||
* Returns this Long with bits shifted to the left by the given amount.
|
||||
*/
|
||||
shiftLeft(numBits: number | Long): Long;
|
||||
|
||||
/**
|
||||
* Returns this Long with bits shifted to the left by the given amount.
|
||||
*/
|
||||
shl(numBits: number | Long): Long;
|
||||
|
||||
/**
|
||||
* Returns this Long with bits arithmetically shifted to the right by the given amount.
|
||||
*/
|
||||
shiftRight(numBits: number | Long): Long;
|
||||
|
||||
/**
|
||||
* Returns this Long with bits arithmetically shifted to the right by the given amount.
|
||||
*/
|
||||
shr(numBits: number | Long): Long;
|
||||
|
||||
/**
|
||||
* Returns this Long with bits logically shifted to the right by the given amount.
|
||||
*/
|
||||
shiftRightUnsigned(numBits: number | Long): Long;
|
||||
|
||||
/**
|
||||
* Returns this Long with bits logically shifted to the right by the given amount.
|
||||
*/
|
||||
shru(numBits: number | Long): Long;
|
||||
|
||||
/**
|
||||
* Returns this Long with bits logically shifted to the right by the given amount.
|
||||
*/
|
||||
shr_u(numBits: number | Long): Long;
|
||||
|
||||
/**
|
||||
* Returns this Long with bits rotated to the left by the given amount.
|
||||
*/
|
||||
rotateLeft(numBits: number | Long): Long;
|
||||
|
||||
/**
|
||||
* Returns this Long with bits rotated to the left by the given amount.
|
||||
*/
|
||||
rotl(numBits: number | Long): Long;
|
||||
|
||||
/**
|
||||
* Returns this Long with bits rotated to the right by the given amount.
|
||||
*/
|
||||
rotateRight(numBits: number | Long): Long;
|
||||
|
||||
/**
|
||||
* Returns this Long with bits rotated to the right by the given amount.
|
||||
*/
|
||||
rotr(numBits: number | Long): Long;
|
||||
|
||||
/**
|
||||
* Returns the difference of this and the specified Long.
|
||||
*/
|
||||
subtract(subtrahend: LongLike): Long;
|
||||
|
||||
/**
|
||||
* Returns the difference of this and the specified Long.
|
||||
*/
|
||||
sub(subtrahend: LongLike): Long;
|
||||
|
||||
/**
|
||||
* Converts the Long to a big integer.
|
||||
*/
|
||||
toBigInt(): bigint;
|
||||
|
||||
/**
|
||||
* Converts the Long to a 32 bit integer, assuming it is a 32 bit integer.
|
||||
*/
|
||||
toInt(): number;
|
||||
|
||||
/**
|
||||
* Converts the Long to a the nearest floating-point representation of this value (double, 53 bit mantissa).
|
||||
*/
|
||||
toNumber(): number;
|
||||
|
||||
/**
|
||||
* Converts this Long to its byte representation.
|
||||
*/
|
||||
|
||||
toBytes(le?: boolean): number[];
|
||||
|
||||
/**
|
||||
* Converts this Long to its little endian byte representation.
|
||||
*/
|
||||
|
||||
toBytesLE(): number[];
|
||||
|
||||
/**
|
||||
* Converts this Long to its big endian byte representation.
|
||||
*/
|
||||
|
||||
toBytesBE(): number[];
|
||||
|
||||
/**
|
||||
* Converts this Long to signed.
|
||||
*/
|
||||
toSigned(): Long;
|
||||
|
||||
/**
|
||||
* Converts the Long to a string written in the specified radix.
|
||||
*/
|
||||
toString(radix?: number): string;
|
||||
|
||||
/**
|
||||
* Converts this Long to unsigned.
|
||||
*/
|
||||
toUnsigned(): Long;
|
||||
|
||||
/**
|
||||
* Returns the bitwise XOR of this Long and the given one.
|
||||
*/
|
||||
xor(other: LongLike): Long;
|
||||
}
|
||||
457
node_modules/long/umd/index.d.ts
generated
vendored
457
node_modules/long/umd/index.d.ts
generated
vendored
|
|
@ -1,457 +1,2 @@
|
|||
declare class Long {
|
||||
/**
|
||||
* Constructs a 64 bit two's-complement integer, given its low and high 32 bit values as signed integers. See the from* functions below for more convenient ways of constructing Longs.
|
||||
*/
|
||||
constructor(low: number, high?: number, unsigned?: boolean);
|
||||
|
||||
/**
|
||||
* Maximum unsigned value.
|
||||
*/
|
||||
static MAX_UNSIGNED_VALUE: Long;
|
||||
|
||||
/**
|
||||
* Maximum signed value.
|
||||
*/
|
||||
static MAX_VALUE: Long;
|
||||
|
||||
/**
|
||||
* Minimum signed value.
|
||||
*/
|
||||
static MIN_VALUE: Long;
|
||||
|
||||
/**
|
||||
* Signed negative one.
|
||||
*/
|
||||
static NEG_ONE: Long;
|
||||
|
||||
/**
|
||||
* Signed one.
|
||||
*/
|
||||
static ONE: Long;
|
||||
|
||||
/**
|
||||
* Unsigned one.
|
||||
*/
|
||||
static UONE: Long;
|
||||
|
||||
/**
|
||||
* Unsigned zero.
|
||||
*/
|
||||
static UZERO: Long;
|
||||
|
||||
/**
|
||||
* Signed zero
|
||||
*/
|
||||
static ZERO: Long;
|
||||
|
||||
/**
|
||||
* The high 32 bits as a signed value.
|
||||
*/
|
||||
high: number;
|
||||
|
||||
/**
|
||||
* The low 32 bits as a signed value.
|
||||
*/
|
||||
low: number;
|
||||
|
||||
/**
|
||||
* Whether unsigned or not.
|
||||
*/
|
||||
unsigned: boolean;
|
||||
|
||||
/**
|
||||
* Returns a Long representing the 64 bit integer that comes by concatenating the given low and high bits. Each is assumed to use 32 bits.
|
||||
*/
|
||||
static fromBits(lowBits: number, highBits: number, unsigned?: boolean): Long;
|
||||
|
||||
/**
|
||||
* Returns a Long representing the given 32 bit integer value.
|
||||
*/
|
||||
static fromInt(value: number, unsigned?: boolean): Long;
|
||||
|
||||
/**
|
||||
* Returns a Long representing the given value, provided that it is a finite number. Otherwise, zero is returned.
|
||||
*/
|
||||
static fromNumber(value: number, unsigned?: boolean): Long;
|
||||
|
||||
/**
|
||||
* Returns a Long representation of the given string, written using the specified radix.
|
||||
*/
|
||||
static fromString(
|
||||
str: string,
|
||||
unsigned?: boolean | number,
|
||||
radix?: number
|
||||
): Long;
|
||||
|
||||
/**
|
||||
* Creates a Long from its byte representation.
|
||||
*/
|
||||
static fromBytes(bytes: number[], unsigned?: boolean, le?: boolean): Long;
|
||||
|
||||
/**
|
||||
* Creates a Long from its little endian byte representation.
|
||||
*/
|
||||
static fromBytesLE(bytes: number[], unsigned?: boolean): Long;
|
||||
|
||||
/**
|
||||
* Creates a Long from its big endian byte representation.
|
||||
*/
|
||||
static fromBytesBE(bytes: number[], unsigned?: boolean): Long;
|
||||
|
||||
/**
|
||||
* Tests if the specified object is a Long.
|
||||
*/
|
||||
static isLong(obj: any): obj is Long;
|
||||
|
||||
/**
|
||||
* Converts the specified value to a Long.
|
||||
*/
|
||||
static fromValue(
|
||||
val:
|
||||
| Long
|
||||
| number
|
||||
| string
|
||||
| { low: number; high: number; unsigned: boolean },
|
||||
unsigned?: boolean
|
||||
): Long;
|
||||
|
||||
/**
|
||||
* Returns the sum of this and the specified Long.
|
||||
*/
|
||||
add(addend: number | Long | string): Long;
|
||||
|
||||
/**
|
||||
* Returns the bitwise AND of this Long and the specified.
|
||||
*/
|
||||
and(other: Long | number | string): Long;
|
||||
|
||||
/**
|
||||
* Compares this Long's value with the specified's.
|
||||
*/
|
||||
compare(other: Long | number | string): number;
|
||||
|
||||
/**
|
||||
* Compares this Long's value with the specified's.
|
||||
*/
|
||||
comp(other: Long | number | string): number;
|
||||
|
||||
/**
|
||||
* Returns this Long divided by the specified.
|
||||
*/
|
||||
divide(divisor: Long | number | string): Long;
|
||||
|
||||
/**
|
||||
* Returns this Long divided by the specified.
|
||||
*/
|
||||
div(divisor: Long | number | string): Long;
|
||||
|
||||
/**
|
||||
* Tests if this Long's value equals the specified's.
|
||||
*/
|
||||
equals(other: Long | number | string): boolean;
|
||||
|
||||
/**
|
||||
* Tests if this Long's value equals the specified's.
|
||||
*/
|
||||
eq(other: Long | number | string): boolean;
|
||||
|
||||
/**
|
||||
* Gets the high 32 bits as a signed integer.
|
||||
*/
|
||||
getHighBits(): number;
|
||||
|
||||
/**
|
||||
* Gets the high 32 bits as an unsigned integer.
|
||||
*/
|
||||
getHighBitsUnsigned(): number;
|
||||
|
||||
/**
|
||||
* Gets the low 32 bits as a signed integer.
|
||||
*/
|
||||
getLowBits(): number;
|
||||
|
||||
/**
|
||||
* Gets the low 32 bits as an unsigned integer.
|
||||
*/
|
||||
getLowBitsUnsigned(): number;
|
||||
|
||||
/**
|
||||
* Gets the number of bits needed to represent the absolute value of this Long.
|
||||
*/
|
||||
getNumBitsAbs(): number;
|
||||
|
||||
/**
|
||||
* Tests if this Long's value is greater than the specified's.
|
||||
*/
|
||||
greaterThan(other: Long | number | string): boolean;
|
||||
|
||||
/**
|
||||
* Tests if this Long's value is greater than the specified's.
|
||||
*/
|
||||
gt(other: Long | number | string): boolean;
|
||||
|
||||
/**
|
||||
* Tests if this Long's value is greater than or equal the specified's.
|
||||
*/
|
||||
greaterThanOrEqual(other: Long | number | string): boolean;
|
||||
|
||||
/**
|
||||
* Tests if this Long's value is greater than or equal the specified's.
|
||||
*/
|
||||
gte(other: Long | number | string): boolean;
|
||||
|
||||
/**
|
||||
* Tests if this Long's value is greater than or equal the specified's.
|
||||
*/
|
||||
ge(other: Long | number | string): boolean;
|
||||
|
||||
/**
|
||||
* Tests if this Long's value is even.
|
||||
*/
|
||||
isEven(): boolean;
|
||||
|
||||
/**
|
||||
* Tests if this Long's value is negative.
|
||||
*/
|
||||
isNegative(): boolean;
|
||||
|
||||
/**
|
||||
* Tests if this Long's value is odd.
|
||||
*/
|
||||
isOdd(): boolean;
|
||||
|
||||
/**
|
||||
* Tests if this Long's value is positive or zero.
|
||||
*/
|
||||
isPositive(): boolean;
|
||||
|
||||
/**
|
||||
* Tests if this Long's value equals zero.
|
||||
*/
|
||||
isZero(): boolean;
|
||||
|
||||
/**
|
||||
* Tests if this Long's value equals zero.
|
||||
*/
|
||||
eqz(): boolean;
|
||||
|
||||
/**
|
||||
* Tests if this Long's value is less than the specified's.
|
||||
*/
|
||||
lessThan(other: Long | number | string): boolean;
|
||||
|
||||
/**
|
||||
* Tests if this Long's value is less than the specified's.
|
||||
*/
|
||||
lt(other: Long | number | string): boolean;
|
||||
|
||||
/**
|
||||
* Tests if this Long's value is less than or equal the specified's.
|
||||
*/
|
||||
lessThanOrEqual(other: Long | number | string): boolean;
|
||||
|
||||
/**
|
||||
* Tests if this Long's value is less than or equal the specified's.
|
||||
*/
|
||||
lte(other: Long | number | string): boolean;
|
||||
|
||||
/**
|
||||
* Tests if this Long's value is less than or equal the specified's.
|
||||
*/
|
||||
le(other: Long | number | string): boolean;
|
||||
|
||||
/**
|
||||
* Returns this Long modulo the specified.
|
||||
*/
|
||||
modulo(other: Long | number | string): Long;
|
||||
|
||||
/**
|
||||
* Returns this Long modulo the specified.
|
||||
*/
|
||||
mod(other: Long | number | string): Long;
|
||||
|
||||
/**
|
||||
* Returns this Long modulo the specified.
|
||||
*/
|
||||
rem(other: Long | number | string): Long;
|
||||
|
||||
/**
|
||||
* Returns the product of this and the specified Long.
|
||||
*/
|
||||
multiply(multiplier: Long | number | string): Long;
|
||||
|
||||
/**
|
||||
* Returns the product of this and the specified Long.
|
||||
*/
|
||||
mul(multiplier: Long | number | string): Long;
|
||||
|
||||
/**
|
||||
* Negates this Long's value.
|
||||
*/
|
||||
negate(): Long;
|
||||
|
||||
/**
|
||||
* Negates this Long's value.
|
||||
*/
|
||||
neg(): Long;
|
||||
|
||||
/**
|
||||
* Returns the bitwise NOT of this Long.
|
||||
*/
|
||||
not(): Long;
|
||||
|
||||
/**
|
||||
* Returns count leading zeros of this Long.
|
||||
*/
|
||||
countLeadingZeros(): number;
|
||||
|
||||
/**
|
||||
* Returns count leading zeros of this Long.
|
||||
*/
|
||||
clz(): number;
|
||||
|
||||
/**
|
||||
* Returns count trailing zeros of this Long.
|
||||
*/
|
||||
countTrailingZeros(): number;
|
||||
|
||||
/**
|
||||
* Returns count trailing zeros of this Long.
|
||||
*/
|
||||
ctz(): number;
|
||||
|
||||
/**
|
||||
* Tests if this Long's value differs from the specified's.
|
||||
*/
|
||||
notEquals(other: Long | number | string): boolean;
|
||||
|
||||
/**
|
||||
* Tests if this Long's value differs from the specified's.
|
||||
*/
|
||||
neq(other: Long | number | string): boolean;
|
||||
|
||||
/**
|
||||
* Tests if this Long's value differs from the specified's.
|
||||
*/
|
||||
ne(other: Long | number | string): boolean;
|
||||
|
||||
/**
|
||||
* Returns the bitwise OR of this Long and the specified.
|
||||
*/
|
||||
or(other: Long | number | string): Long;
|
||||
|
||||
/**
|
||||
* Returns this Long with bits shifted to the left by the given amount.
|
||||
*/
|
||||
shiftLeft(numBits: number | Long): Long;
|
||||
|
||||
/**
|
||||
* Returns this Long with bits shifted to the left by the given amount.
|
||||
*/
|
||||
shl(numBits: number | Long): Long;
|
||||
|
||||
/**
|
||||
* Returns this Long with bits arithmetically shifted to the right by the given amount.
|
||||
*/
|
||||
shiftRight(numBits: number | Long): Long;
|
||||
|
||||
/**
|
||||
* Returns this Long with bits arithmetically shifted to the right by the given amount.
|
||||
*/
|
||||
shr(numBits: number | Long): Long;
|
||||
|
||||
/**
|
||||
* Returns this Long with bits logically shifted to the right by the given amount.
|
||||
*/
|
||||
shiftRightUnsigned(numBits: number | Long): Long;
|
||||
|
||||
/**
|
||||
* Returns this Long with bits logically shifted to the right by the given amount.
|
||||
*/
|
||||
shru(numBits: number | Long): Long;
|
||||
|
||||
/**
|
||||
* Returns this Long with bits logically shifted to the right by the given amount.
|
||||
*/
|
||||
shr_u(numBits: number | Long): Long;
|
||||
|
||||
/**
|
||||
* Returns this Long with bits rotated to the left by the given amount.
|
||||
*/
|
||||
rotateLeft(numBits: number | Long): Long;
|
||||
|
||||
/**
|
||||
* Returns this Long with bits rotated to the left by the given amount.
|
||||
*/
|
||||
rotl(numBits: number | Long): Long;
|
||||
|
||||
/**
|
||||
* Returns this Long with bits rotated to the right by the given amount.
|
||||
*/
|
||||
rotateRight(numBits: number | Long): Long;
|
||||
|
||||
/**
|
||||
* Returns this Long with bits rotated to the right by the given amount.
|
||||
*/
|
||||
rotr(numBits: number | Long): Long;
|
||||
|
||||
/**
|
||||
* Returns the difference of this and the specified Long.
|
||||
*/
|
||||
subtract(subtrahend: number | Long | string): Long;
|
||||
|
||||
/**
|
||||
* Returns the difference of this and the specified Long.
|
||||
*/
|
||||
sub(subtrahend: number | Long | string): Long;
|
||||
|
||||
/**
|
||||
* Converts the Long to a 32 bit integer, assuming it is a 32 bit integer.
|
||||
*/
|
||||
toInt(): number;
|
||||
|
||||
/**
|
||||
* Converts the Long to a the nearest floating-point representation of this value (double, 53 bit mantissa).
|
||||
*/
|
||||
toNumber(): number;
|
||||
|
||||
/**
|
||||
* Converts this Long to its byte representation.
|
||||
*/
|
||||
|
||||
toBytes(le?: boolean): number[];
|
||||
|
||||
/**
|
||||
* Converts this Long to its little endian byte representation.
|
||||
*/
|
||||
|
||||
toBytesLE(): number[];
|
||||
|
||||
/**
|
||||
* Converts this Long to its big endian byte representation.
|
||||
*/
|
||||
|
||||
toBytesBE(): number[];
|
||||
|
||||
/**
|
||||
* Converts this Long to signed.
|
||||
*/
|
||||
toSigned(): Long;
|
||||
|
||||
/**
|
||||
* Converts the Long to a string written in the specified radix.
|
||||
*/
|
||||
toString(radix?: number): string;
|
||||
|
||||
/**
|
||||
* Converts this Long to unsigned.
|
||||
*/
|
||||
toUnsigned(): Long;
|
||||
|
||||
/**
|
||||
* Returns the bitwise XOR of this Long and the given one.
|
||||
*/
|
||||
xor(other: Long | number | string): Long;
|
||||
}
|
||||
|
||||
import { Long } from '../types.js';
|
||||
export = Long;
|
||||
|
|
|
|||
615
node_modules/long/umd/index.js
generated
vendored
615
node_modules/long/umd/index.js
generated
vendored
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue