@trustwallet/wallet-core 2.9.3 → 2.9.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/generated/core_proto.d.ts +6 -0
- package/dist/generated/core_proto.js +33 -1
- package/dist/index.d.ts +2 -3
- package/dist/index.js +16 -7
- package/dist/lib/wallet-core.d.ts +640 -0
- package/dist/lib/wallet-core.js +67 -67
- package/dist/lib/wallet-core.wasm +0 -0
- package/package.json +7 -5
@@ -14452,6 +14452,9 @@ export namespace TW {
|
|
14452
14452
|
|
14453
14453
|
/** SigningOutput signedTransaction */
|
14454
14454
|
signedTransaction?: (Uint8Array|null);
|
14455
|
+
|
14456
|
+
/** SigningOutput hash */
|
14457
|
+
hash?: (Uint8Array|null);
|
14455
14458
|
}
|
14456
14459
|
|
14457
14460
|
/** Represents a SigningOutput. */
|
@@ -14466,6 +14469,9 @@ export namespace TW {
|
|
14466
14469
|
/** SigningOutput signedTransaction. */
|
14467
14470
|
public signedTransaction: Uint8Array;
|
14468
14471
|
|
14472
|
+
/** SigningOutput hash. */
|
14473
|
+
public hash: Uint8Array;
|
14474
|
+
|
14469
14475
|
/**
|
14470
14476
|
* Creates a new SigningOutput instance using the specified properties.
|
14471
14477
|
* @param [properties] Properties to set
|
@@ -42351,6 +42351,7 @@
|
|
42351
42351
|
* @memberof TW.NEAR.Proto
|
42352
42352
|
* @interface ISigningOutput
|
42353
42353
|
* @property {Uint8Array|null} [signedTransaction] SigningOutput signedTransaction
|
42354
|
+
* @property {Uint8Array|null} [hash] SigningOutput hash
|
42354
42355
|
*/
|
42355
42356
|
|
42356
42357
|
/**
|
@@ -42376,6 +42377,14 @@
|
|
42376
42377
|
*/
|
42377
42378
|
SigningOutput.prototype.signedTransaction = $util.newBuffer([]);
|
42378
42379
|
|
42380
|
+
/**
|
42381
|
+
* SigningOutput hash.
|
42382
|
+
* @member {Uint8Array} hash
|
42383
|
+
* @memberof TW.NEAR.Proto.SigningOutput
|
42384
|
+
* @instance
|
42385
|
+
*/
|
42386
|
+
SigningOutput.prototype.hash = $util.newBuffer([]);
|
42387
|
+
|
42379
42388
|
/**
|
42380
42389
|
* Creates a new SigningOutput instance using the specified properties.
|
42381
42390
|
* @function create
|
@@ -42402,6 +42411,8 @@
|
|
42402
42411
|
writer = $Writer.create();
|
42403
42412
|
if (message.signedTransaction != null && Object.hasOwnProperty.call(message, "signedTransaction"))
|
42404
42413
|
writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.signedTransaction);
|
42414
|
+
if (message.hash != null && Object.hasOwnProperty.call(message, "hash"))
|
42415
|
+
writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.hash);
|
42405
42416
|
return writer;
|
42406
42417
|
};
|
42407
42418
|
|
@@ -42426,6 +42437,9 @@
|
|
42426
42437
|
case 1:
|
42427
42438
|
message.signedTransaction = reader.bytes();
|
42428
42439
|
break;
|
42440
|
+
case 2:
|
42441
|
+
message.hash = reader.bytes();
|
42442
|
+
break;
|
42429
42443
|
default:
|
42430
42444
|
reader.skipType(tag & 7);
|
42431
42445
|
break;
|
@@ -42448,6 +42462,9 @@
|
|
42448
42462
|
if (message.signedTransaction != null && message.hasOwnProperty("signedTransaction"))
|
42449
42463
|
if (!(message.signedTransaction && typeof message.signedTransaction.length === "number" || $util.isString(message.signedTransaction)))
|
42450
42464
|
return "signedTransaction: buffer expected";
|
42465
|
+
if (message.hash != null && message.hasOwnProperty("hash"))
|
42466
|
+
if (!(message.hash && typeof message.hash.length === "number" || $util.isString(message.hash)))
|
42467
|
+
return "hash: buffer expected";
|
42451
42468
|
return null;
|
42452
42469
|
};
|
42453
42470
|
|
@@ -42468,6 +42485,11 @@
|
|
42468
42485
|
$util.base64.decode(object.signedTransaction, message.signedTransaction = $util.newBuffer($util.base64.length(object.signedTransaction)), 0);
|
42469
42486
|
else if (object.signedTransaction.length)
|
42470
42487
|
message.signedTransaction = object.signedTransaction;
|
42488
|
+
if (object.hash != null)
|
42489
|
+
if (typeof object.hash === "string")
|
42490
|
+
$util.base64.decode(object.hash, message.hash = $util.newBuffer($util.base64.length(object.hash)), 0);
|
42491
|
+
else if (object.hash.length)
|
42492
|
+
message.hash = object.hash;
|
42471
42493
|
return message;
|
42472
42494
|
};
|
42473
42495
|
|
@@ -42484,7 +42506,7 @@
|
|
42484
42506
|
if (!options)
|
42485
42507
|
options = {};
|
42486
42508
|
var object = {};
|
42487
|
-
if (options.defaults)
|
42509
|
+
if (options.defaults) {
|
42488
42510
|
if (options.bytes === String)
|
42489
42511
|
object.signedTransaction = "";
|
42490
42512
|
else {
|
@@ -42492,8 +42514,18 @@
|
|
42492
42514
|
if (options.bytes !== Array)
|
42493
42515
|
object.signedTransaction = $util.newBuffer(object.signedTransaction);
|
42494
42516
|
}
|
42517
|
+
if (options.bytes === String)
|
42518
|
+
object.hash = "";
|
42519
|
+
else {
|
42520
|
+
object.hash = [];
|
42521
|
+
if (options.bytes !== Array)
|
42522
|
+
object.hash = $util.newBuffer(object.hash);
|
42523
|
+
}
|
42524
|
+
}
|
42495
42525
|
if (message.signedTransaction != null && message.hasOwnProperty("signedTransaction"))
|
42496
42526
|
object.signedTransaction = options.bytes === String ? $util.base64.encode(message.signedTransaction, 0, message.signedTransaction.length) : options.bytes === Array ? Array.prototype.slice.call(message.signedTransaction) : message.signedTransaction;
|
42527
|
+
if (message.hash != null && message.hasOwnProperty("hash"))
|
42528
|
+
object.hash = options.bytes === String ? $util.base64.encode(message.hash, 0, message.hash.length) : options.bytes === Array ? Array.prototype.slice.call(message.hash) : message.hash;
|
42497
42529
|
return object;
|
42498
42530
|
};
|
42499
42531
|
|
package/dist/index.d.ts
CHANGED
@@ -1,3 +1,2 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
export { TW, WalletCore };
|
1
|
+
export { TW } from "./generated/core_proto";
|
2
|
+
export * as WalletCore from "./lib/wallet-core";
|
package/dist/index.js
CHANGED
@@ -1,12 +1,21 @@
|
|
1
|
-
"use strict";
|
2
1
|
// Copyright © 2017-2022 Trust Wallet.
|
3
2
|
//
|
4
3
|
// This file is part of Trust. The full Trust copyright notice, including
|
5
4
|
// terms governing use, modification, and redistribution, is contained in the
|
6
5
|
// file LICENSE at the root of the source code distribution tree.
|
7
|
-
|
8
|
-
|
9
|
-
var
|
10
|
-
|
11
|
-
|
12
|
-
|
6
|
+
(function (factory) {
|
7
|
+
if (typeof module === "object" && typeof module.exports === "object") {
|
8
|
+
var v = factory(require, exports);
|
9
|
+
if (v !== undefined) module.exports = v;
|
10
|
+
}
|
11
|
+
else if (typeof define === "function" && define.amd) {
|
12
|
+
define(["require", "exports", "./generated/core_proto", "./lib/wallet-core"], factory);
|
13
|
+
}
|
14
|
+
})(function (require, exports) {
|
15
|
+
"use strict";
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
+
exports.WalletCore = exports.TW = void 0;
|
18
|
+
var core_proto_1 = require("./generated/core_proto");
|
19
|
+
Object.defineProperty(exports, "TW", { enumerable: true, get: function () { return core_proto_1.TW; } });
|
20
|
+
exports.WalletCore = require("./lib/wallet-core");
|
21
|
+
});
|
@@ -0,0 +1,640 @@
|
|
1
|
+
// Copyright © 2017-2022 Trust Wallet.
|
2
|
+
//
|
3
|
+
// This file is part of Trust. The full Trust copyright notice, including
|
4
|
+
// terms governing use, modification, and redistribution, is contained in the
|
5
|
+
// file LICENSE at the root of the source code distribution tree.
|
6
|
+
//
|
7
|
+
// This is a GENERATED FILE, changes made here WILL BE LOST.
|
8
|
+
//
|
9
|
+
export class AnySigner {
|
10
|
+
static sign(data: Uint8Array | Buffer, coin: CoinType): Uint8Array;
|
11
|
+
static plan(data: Uint8Array | Buffer, coin: CoinType): Uint8Array;
|
12
|
+
static supportsJSON(coin: CoinType): boolean;
|
13
|
+
}
|
14
|
+
export namespace HexCoding {
|
15
|
+
export function decode(hex: string): Uint8Array;
|
16
|
+
export function encode(buffer: Uint8Array | Buffer): string;
|
17
|
+
}
|
18
|
+
export class Hash {
|
19
|
+
static sha1(data: Uint8Array | Buffer): Uint8Array;
|
20
|
+
static sha256(data: Uint8Array | Buffer): Uint8Array;
|
21
|
+
static sha512(data: Uint8Array | Buffer): Uint8Array;
|
22
|
+
static sha512_256(data: Uint8Array | Buffer): Uint8Array;
|
23
|
+
static keccak256(data: Uint8Array | Buffer): Uint8Array;
|
24
|
+
static keccak512(data: Uint8Array | Buffer): Uint8Array;
|
25
|
+
static sha3_256(data: Uint8Array | Buffer): Uint8Array;
|
26
|
+
static sha3_512(data: Uint8Array | Buffer): Uint8Array;
|
27
|
+
static ripemd(data: Uint8Array | Buffer): Uint8Array;
|
28
|
+
static blake256(data: Uint8Array | Buffer): Uint8Array;
|
29
|
+
static blake2b(data: Uint8Array | Buffer, size: number): Uint8Array;
|
30
|
+
static groestl512(data: Uint8Array | Buffer): Uint8Array;
|
31
|
+
static sha256SHA256(data: Uint8Array | Buffer): Uint8Array;
|
32
|
+
static sha256RIPEMD(data: Uint8Array | Buffer): Uint8Array;
|
33
|
+
static sha3_256RIPEMD(data: Uint8Array | Buffer): Uint8Array;
|
34
|
+
static blake256Blake256(data: Uint8Array | Buffer): Uint8Array;
|
35
|
+
static blake256RIPEMD(data: Uint8Array | Buffer): Uint8Array;
|
36
|
+
static groestl512Groestl512(data: Uint8Array | Buffer): Uint8Array;
|
37
|
+
}
|
38
|
+
export class Blockchain {
|
39
|
+
value: number;
|
40
|
+
static bitcoin: Blockchain;
|
41
|
+
static ethereum: Blockchain;
|
42
|
+
static vechain: Blockchain;
|
43
|
+
static tron: Blockchain;
|
44
|
+
static icon: Blockchain;
|
45
|
+
static binance: Blockchain;
|
46
|
+
static ripple: Blockchain;
|
47
|
+
static tezos: Blockchain;
|
48
|
+
static nimiq: Blockchain;
|
49
|
+
static stellar: Blockchain;
|
50
|
+
static aion: Blockchain;
|
51
|
+
static cosmos: Blockchain;
|
52
|
+
static theta: Blockchain;
|
53
|
+
static ontology: Blockchain;
|
54
|
+
static zilliqa: Blockchain;
|
55
|
+
static ioTeX: Blockchain;
|
56
|
+
static eos: Blockchain;
|
57
|
+
static nano: Blockchain;
|
58
|
+
static nuls: Blockchain;
|
59
|
+
static waves: Blockchain;
|
60
|
+
static aeternity: Blockchain;
|
61
|
+
static nebulas: Blockchain;
|
62
|
+
static fio: Blockchain;
|
63
|
+
static solana: Blockchain;
|
64
|
+
static harmony: Blockchain;
|
65
|
+
static near: Blockchain;
|
66
|
+
static algorand: Blockchain;
|
67
|
+
static polkadot: Blockchain;
|
68
|
+
static cardano: Blockchain;
|
69
|
+
static neo: Blockchain;
|
70
|
+
static filecoin: Blockchain;
|
71
|
+
static elrondNetwork: Blockchain;
|
72
|
+
static oasisNetwork: Blockchain;
|
73
|
+
static decred: Blockchain;
|
74
|
+
static zcash: Blockchain;
|
75
|
+
static groestlcoin: Blockchain;
|
76
|
+
static thorchain: Blockchain;
|
77
|
+
static ronin: Blockchain;
|
78
|
+
static kusama: Blockchain;
|
79
|
+
}
|
80
|
+
export class BitcoinSigHashType {
|
81
|
+
value: number;
|
82
|
+
static all: BitcoinSigHashType;
|
83
|
+
static none: BitcoinSigHashType;
|
84
|
+
static single: BitcoinSigHashType;
|
85
|
+
static fork: BitcoinSigHashType;
|
86
|
+
static forkBTG: BitcoinSigHashType;
|
87
|
+
}
|
88
|
+
export class AnyAddress {
|
89
|
+
static equal(lhs: AnyAddress, rhs: AnyAddress): boolean;
|
90
|
+
static isValid(string: string, coin: CoinType): boolean;
|
91
|
+
static createWithString(string: string, coin: CoinType): AnyAddress;
|
92
|
+
static createWithPublicKey(publicKey: PublicKey, coin: CoinType): AnyAddress;
|
93
|
+
description(): string;
|
94
|
+
coin(): CoinType;
|
95
|
+
data(): Uint8Array;
|
96
|
+
delete(): void;
|
97
|
+
}
|
98
|
+
export class FIOAccount {
|
99
|
+
static createWithString(string: string): FIOAccount;
|
100
|
+
description(): string;
|
101
|
+
delete(): void;
|
102
|
+
}
|
103
|
+
export class Mnemonic {
|
104
|
+
static isValid(mnemonic: string): boolean;
|
105
|
+
static isValidWord(word: string): boolean;
|
106
|
+
static suggest(prefix: string): string;
|
107
|
+
}
|
108
|
+
export class StoredKeyEncryptionLevel {
|
109
|
+
value: number;
|
110
|
+
static default: StoredKeyEncryptionLevel;
|
111
|
+
static minimal: StoredKeyEncryptionLevel;
|
112
|
+
static weak: StoredKeyEncryptionLevel;
|
113
|
+
static standard: StoredKeyEncryptionLevel;
|
114
|
+
}
|
115
|
+
export class SS58AddressType {
|
116
|
+
value: number;
|
117
|
+
static polkadot: SS58AddressType;
|
118
|
+
static kusama: SS58AddressType;
|
119
|
+
}
|
120
|
+
export class Cardano {
|
121
|
+
static minAdaAmount(tokenBundle: Uint8Array | Buffer): number;
|
122
|
+
}
|
123
|
+
export class EthereumAbiFunction {
|
124
|
+
static createWithString(name: string): EthereumAbiFunction;
|
125
|
+
getType(): string;
|
126
|
+
addParamUInt8(val: number, isOutput: boolean): number;
|
127
|
+
addParamUInt16(val: number, isOutput: boolean): number;
|
128
|
+
addParamUInt32(val: number, isOutput: boolean): number;
|
129
|
+
addParamUInt64(val: number, isOutput: boolean): number;
|
130
|
+
addParamUInt256(val: Uint8Array | Buffer, isOutput: boolean): number;
|
131
|
+
addParamUIntN(bits: number, val: Uint8Array | Buffer, isOutput: boolean): number;
|
132
|
+
addParamInt8(val: number, isOutput: boolean): number;
|
133
|
+
addParamInt16(val: number, isOutput: boolean): number;
|
134
|
+
addParamInt32(val: number, isOutput: boolean): number;
|
135
|
+
addParamInt64(val: number, isOutput: boolean): number;
|
136
|
+
addParamInt256(val: Uint8Array | Buffer, isOutput: boolean): number;
|
137
|
+
addParamIntN(bits: number, val: Uint8Array | Buffer, isOutput: boolean): number;
|
138
|
+
addParamBool(val: boolean, isOutput: boolean): number;
|
139
|
+
addParamString(val: string, isOutput: boolean): number;
|
140
|
+
addParamAddress(val: Uint8Array | Buffer, isOutput: boolean): number;
|
141
|
+
addParamBytes(val: Uint8Array | Buffer, isOutput: boolean): number;
|
142
|
+
addParamBytesFix(size: number, val: Uint8Array | Buffer, isOutput: boolean): number;
|
143
|
+
addParamArray(isOutput: boolean): number;
|
144
|
+
getParamUInt8(idx: number, isOutput: boolean): number;
|
145
|
+
getParamUInt64(idx: number, isOutput: boolean): number;
|
146
|
+
getParamUInt256(idx: number, isOutput: boolean): Uint8Array;
|
147
|
+
getParamBool(idx: number, isOutput: boolean): boolean;
|
148
|
+
getParamString(idx: number, isOutput: boolean): string;
|
149
|
+
getParamAddress(idx: number, isOutput: boolean): Uint8Array;
|
150
|
+
addInArrayParamUInt8(arrayIdx: number, val: number): number;
|
151
|
+
addInArrayParamUInt16(arrayIdx: number, val: number): number;
|
152
|
+
addInArrayParamUInt32(arrayIdx: number, val: number): number;
|
153
|
+
addInArrayParamUInt64(arrayIdx: number, val: number): number;
|
154
|
+
addInArrayParamUInt256(arrayIdx: number, val: Uint8Array | Buffer): number;
|
155
|
+
addInArrayParamUIntN(arrayIdx: number, bits: number, val: Uint8Array | Buffer): number;
|
156
|
+
addInArrayParamInt8(arrayIdx: number, val: number): number;
|
157
|
+
addInArrayParamInt16(arrayIdx: number, val: number): number;
|
158
|
+
addInArrayParamInt32(arrayIdx: number, val: number): number;
|
159
|
+
addInArrayParamInt64(arrayIdx: number, val: number): number;
|
160
|
+
addInArrayParamInt256(arrayIdx: number, val: Uint8Array | Buffer): number;
|
161
|
+
addInArrayParamIntN(arrayIdx: number, bits: number, val: Uint8Array | Buffer): number;
|
162
|
+
addInArrayParamBool(arrayIdx: number, val: boolean): number;
|
163
|
+
addInArrayParamString(arrayIdx: number, val: string): number;
|
164
|
+
addInArrayParamAddress(arrayIdx: number, val: Uint8Array | Buffer): number;
|
165
|
+
addInArrayParamBytes(arrayIdx: number, val: Uint8Array | Buffer): number;
|
166
|
+
addInArrayParamBytesFix(arrayIdx: number, size: number, val: Uint8Array | Buffer): number;
|
167
|
+
delete(): void;
|
168
|
+
}
|
169
|
+
export class THORChainSwap {
|
170
|
+
static buildSwap(input: Uint8Array | Buffer): Uint8Array;
|
171
|
+
}
|
172
|
+
export class PublicKeyType {
|
173
|
+
value: number;
|
174
|
+
static secp256k1: PublicKeyType;
|
175
|
+
static secp256k1Extended: PublicKeyType;
|
176
|
+
static nist256p1: PublicKeyType;
|
177
|
+
static nist256p1Extended: PublicKeyType;
|
178
|
+
static ed25519: PublicKeyType;
|
179
|
+
static ed25519Blake2b: PublicKeyType;
|
180
|
+
static curve25519: PublicKeyType;
|
181
|
+
static ed25519Extended: PublicKeyType;
|
182
|
+
}
|
183
|
+
export class CoinType {
|
184
|
+
value: number;
|
185
|
+
static aeternity: CoinType;
|
186
|
+
static aion: CoinType;
|
187
|
+
static binance: CoinType;
|
188
|
+
static bitcoin: CoinType;
|
189
|
+
static bitcoinCash: CoinType;
|
190
|
+
static bitcoinGold: CoinType;
|
191
|
+
static callisto: CoinType;
|
192
|
+
static cardano: CoinType;
|
193
|
+
static cosmos: CoinType;
|
194
|
+
static dash: CoinType;
|
195
|
+
static decred: CoinType;
|
196
|
+
static digiByte: CoinType;
|
197
|
+
static dogecoin: CoinType;
|
198
|
+
static eos: CoinType;
|
199
|
+
static ethereum: CoinType;
|
200
|
+
static ethereumClassic: CoinType;
|
201
|
+
static fio: CoinType;
|
202
|
+
static goChain: CoinType;
|
203
|
+
static groestlcoin: CoinType;
|
204
|
+
static icon: CoinType;
|
205
|
+
static ioTeX: CoinType;
|
206
|
+
static kava: CoinType;
|
207
|
+
static kin: CoinType;
|
208
|
+
static litecoin: CoinType;
|
209
|
+
static monacoin: CoinType;
|
210
|
+
static nebulas: CoinType;
|
211
|
+
static nuls: CoinType;
|
212
|
+
static nano: CoinType;
|
213
|
+
static near: CoinType;
|
214
|
+
static nimiq: CoinType;
|
215
|
+
static ontology: CoinType;
|
216
|
+
static poanetwork: CoinType;
|
217
|
+
static qtum: CoinType;
|
218
|
+
static xrp: CoinType;
|
219
|
+
static solana: CoinType;
|
220
|
+
static stellar: CoinType;
|
221
|
+
static tezos: CoinType;
|
222
|
+
static theta: CoinType;
|
223
|
+
static thunderToken: CoinType;
|
224
|
+
static neo: CoinType;
|
225
|
+
static tomoChain: CoinType;
|
226
|
+
static tron: CoinType;
|
227
|
+
static veChain: CoinType;
|
228
|
+
static viacoin: CoinType;
|
229
|
+
static wanchain: CoinType;
|
230
|
+
static zcash: CoinType;
|
231
|
+
static firo: CoinType;
|
232
|
+
static zilliqa: CoinType;
|
233
|
+
static zelcash: CoinType;
|
234
|
+
static ravencoin: CoinType;
|
235
|
+
static waves: CoinType;
|
236
|
+
static terra: CoinType;
|
237
|
+
static harmony: CoinType;
|
238
|
+
static algorand: CoinType;
|
239
|
+
static kusama: CoinType;
|
240
|
+
static polkadot: CoinType;
|
241
|
+
static filecoin: CoinType;
|
242
|
+
static elrond: CoinType;
|
243
|
+
static bandChain: CoinType;
|
244
|
+
static smartChainLegacy: CoinType;
|
245
|
+
static smartChain: CoinType;
|
246
|
+
static oasis: CoinType;
|
247
|
+
static polygon: CoinType;
|
248
|
+
static thorchain: CoinType;
|
249
|
+
static bluzelle: CoinType;
|
250
|
+
static optimism: CoinType;
|
251
|
+
static arbitrum: CoinType;
|
252
|
+
static ecochain: CoinType;
|
253
|
+
static avalancheCChain: CoinType;
|
254
|
+
static xdai: CoinType;
|
255
|
+
static fantom: CoinType;
|
256
|
+
static cryptoOrg: CoinType;
|
257
|
+
static celo: CoinType;
|
258
|
+
static ronin: CoinType;
|
259
|
+
static osmosis: CoinType;
|
260
|
+
static ecash: CoinType;
|
261
|
+
static cronosChain: CoinType;
|
262
|
+
static smartBitcoinCash: CoinType;
|
263
|
+
static kuCoinCommunityChain: CoinType;
|
264
|
+
static boba: CoinType;
|
265
|
+
static metis: CoinType;
|
266
|
+
static aurora: CoinType;
|
267
|
+
static evmos: CoinType;
|
268
|
+
static nativeEvmos: CoinType;
|
269
|
+
static moonriver: CoinType;
|
270
|
+
static moonbeam: CoinType;
|
271
|
+
static klaytn: CoinType;
|
272
|
+
}
|
273
|
+
export class HDVersion {
|
274
|
+
value: number;
|
275
|
+
static none: HDVersion;
|
276
|
+
static xpub: HDVersion;
|
277
|
+
static xprv: HDVersion;
|
278
|
+
static ypub: HDVersion;
|
279
|
+
static yprv: HDVersion;
|
280
|
+
static zpub: HDVersion;
|
281
|
+
static zprv: HDVersion;
|
282
|
+
static ltub: HDVersion;
|
283
|
+
static ltpv: HDVersion;
|
284
|
+
static mtub: HDVersion;
|
285
|
+
static mtpv: HDVersion;
|
286
|
+
static dpub: HDVersion;
|
287
|
+
static dprv: HDVersion;
|
288
|
+
static dgub: HDVersion;
|
289
|
+
static dgpv: HDVersion;
|
290
|
+
}
|
291
|
+
export class Purpose {
|
292
|
+
value: number;
|
293
|
+
static bip44: Purpose;
|
294
|
+
static bip49: Purpose;
|
295
|
+
static bip84: Purpose;
|
296
|
+
static bip1852: Purpose;
|
297
|
+
}
|
298
|
+
export class PBKDF2 {
|
299
|
+
static hmacSha256(password: Uint8Array | Buffer, salt: Uint8Array | Buffer, iterations: number, dkLen: number): Uint8Array;
|
300
|
+
static hmacSha512(password: Uint8Array | Buffer, salt: Uint8Array | Buffer, iterations: number, dkLen: number): Uint8Array;
|
301
|
+
}
|
302
|
+
export class Base58 {
|
303
|
+
static encode(data: Uint8Array | Buffer): string;
|
304
|
+
static encodeNoCheck(data: Uint8Array | Buffer): string;
|
305
|
+
static decode(string: string): Uint8Array;
|
306
|
+
static decodeNoCheck(string: string): Uint8Array;
|
307
|
+
}
|
308
|
+
export class TransactionCompiler {
|
309
|
+
static buildInput(coinType: CoinType, from: string, to: string, amount: string, asset: string, memo: string, chainId: string): Uint8Array;
|
310
|
+
static preImageHashes(coinType: CoinType, txInputData: Uint8Array | Buffer): Uint8Array;
|
311
|
+
static compileWithSignatures(coinType: CoinType, txInputData: Uint8Array | Buffer, signatures: DataVector, publicKeys: DataVector): Uint8Array;
|
312
|
+
}
|
313
|
+
export class SegwitAddress {
|
314
|
+
static equal(lhs: SegwitAddress, rhs: SegwitAddress): boolean;
|
315
|
+
static isValidString(string: string): boolean;
|
316
|
+
static createWithString(string: string): SegwitAddress;
|
317
|
+
static createWithPublicKey(hrp: HRP, publicKey: PublicKey): SegwitAddress;
|
318
|
+
description(): string;
|
319
|
+
hrp(): HRP;
|
320
|
+
witnessVersion(): number;
|
321
|
+
witnessProgram(): Uint8Array;
|
322
|
+
delete(): void;
|
323
|
+
}
|
324
|
+
export class StellarVersionByte {
|
325
|
+
value: number;
|
326
|
+
static accountID: StellarVersionByte;
|
327
|
+
static seed: StellarVersionByte;
|
328
|
+
static preAuthTX: StellarVersionByte;
|
329
|
+
static sha256Hash: StellarVersionByte;
|
330
|
+
}
|
331
|
+
export class CoinTypeConfiguration {
|
332
|
+
static getSymbol(type: CoinType): string;
|
333
|
+
static getDecimals(type: CoinType): number;
|
334
|
+
static getTransactionURL(type: CoinType, transactionID: string): string;
|
335
|
+
static getAccountURL(type: CoinType, accountID: string): string;
|
336
|
+
static getID(type: CoinType): string;
|
337
|
+
static getName(type: CoinType): string;
|
338
|
+
}
|
339
|
+
export class NEARAccount {
|
340
|
+
static createWithString(string: string): NEARAccount;
|
341
|
+
description(): string;
|
342
|
+
delete(): void;
|
343
|
+
}
|
344
|
+
export class BitcoinAddress {
|
345
|
+
static equal(lhs: BitcoinAddress, rhs: BitcoinAddress): boolean;
|
346
|
+
static isValid(data: Uint8Array | Buffer): boolean;
|
347
|
+
static isValidString(string: string): boolean;
|
348
|
+
static createWithString(string: string): BitcoinAddress;
|
349
|
+
static createWithData(data: Uint8Array | Buffer): BitcoinAddress;
|
350
|
+
static createWithPublicKey(publicKey: PublicKey, prefix: number): BitcoinAddress;
|
351
|
+
description(): string;
|
352
|
+
prefix(): number;
|
353
|
+
keyhash(): Uint8Array;
|
354
|
+
delete(): void;
|
355
|
+
}
|
356
|
+
export class EthereumAbi {
|
357
|
+
static encode(fn: EthereumAbiFunction): Uint8Array;
|
358
|
+
static decodeOutput(fn: EthereumAbiFunction, encoded: Uint8Array | Buffer): boolean;
|
359
|
+
static decodeCall(data: Uint8Array | Buffer, abi: string): string;
|
360
|
+
static encodeTyped(messageJson: string): Uint8Array;
|
361
|
+
}
|
362
|
+
export class HRP {
|
363
|
+
value: number;
|
364
|
+
static unknown: HRP;
|
365
|
+
static bitcoin: HRP;
|
366
|
+
static litecoin: HRP;
|
367
|
+
static viacoin: HRP;
|
368
|
+
static groestlcoin: HRP;
|
369
|
+
static digiByte: HRP;
|
370
|
+
static monacoin: HRP;
|
371
|
+
static cosmos: HRP;
|
372
|
+
static bitcoinCash: HRP;
|
373
|
+
static bitcoinGold: HRP;
|
374
|
+
static ioTeX: HRP;
|
375
|
+
static zilliqa: HRP;
|
376
|
+
static terra: HRP;
|
377
|
+
static cryptoOrg: HRP;
|
378
|
+
static kava: HRP;
|
379
|
+
static oasis: HRP;
|
380
|
+
static bluzelle: HRP;
|
381
|
+
static bandChain: HRP;
|
382
|
+
static elrond: HRP;
|
383
|
+
static binance: HRP;
|
384
|
+
static ecash: HRP;
|
385
|
+
static thorchain: HRP;
|
386
|
+
static harmony: HRP;
|
387
|
+
static cardano: HRP;
|
388
|
+
static qtum: HRP;
|
389
|
+
static osmosis: HRP;
|
390
|
+
static nativeEvmos: HRP;
|
391
|
+
}
|
392
|
+
|
393
|
+
declare function describeHRP(value: HRP): string;
|
394
|
+
|
395
|
+
export class StellarMemoType {
|
396
|
+
value: number;
|
397
|
+
static none: StellarMemoType;
|
398
|
+
static text: StellarMemoType;
|
399
|
+
static id: StellarMemoType;
|
400
|
+
static hash: StellarMemoType;
|
401
|
+
static return: StellarMemoType;
|
402
|
+
}
|
403
|
+
export class StellarPassphrase {
|
404
|
+
value: number;
|
405
|
+
static stellar: StellarPassphrase;
|
406
|
+
static kin: StellarPassphrase;
|
407
|
+
}
|
408
|
+
|
409
|
+
declare function describeStellarPassphrase(value: StellarPassphrase): string;
|
410
|
+
|
411
|
+
export class SolanaAddress {
|
412
|
+
static createWithString(string: string): SolanaAddress;
|
413
|
+
description(): string;
|
414
|
+
defaultTokenAddress(tokenMintAddress: string): string;
|
415
|
+
delete(): void;
|
416
|
+
}
|
417
|
+
export class EthereumChainID {
|
418
|
+
value: number;
|
419
|
+
static ethereum: EthereumChainID;
|
420
|
+
static classic: EthereumChainID;
|
421
|
+
static poa: EthereumChainID;
|
422
|
+
static vechain: EthereumChainID;
|
423
|
+
static callisto: EthereumChainID;
|
424
|
+
static tomochain: EthereumChainID;
|
425
|
+
static polygon: EthereumChainID;
|
426
|
+
static thundertoken: EthereumChainID;
|
427
|
+
static gochain: EthereumChainID;
|
428
|
+
static celo: EthereumChainID;
|
429
|
+
static wanchain: EthereumChainID;
|
430
|
+
static cronos: EthereumChainID;
|
431
|
+
static optimism: EthereumChainID;
|
432
|
+
static xdai: EthereumChainID;
|
433
|
+
static smartbch: EthereumChainID;
|
434
|
+
static fantom: EthereumChainID;
|
435
|
+
static boba: EthereumChainID;
|
436
|
+
static kcc: EthereumChainID;
|
437
|
+
static heco: EthereumChainID;
|
438
|
+
static metis: EthereumChainID;
|
439
|
+
static moonbeam: EthereumChainID;
|
440
|
+
static moonriver: EthereumChainID;
|
441
|
+
static ronin: EthereumChainID;
|
442
|
+
static klaytn: EthereumChainID;
|
443
|
+
static avalanchec: EthereumChainID;
|
444
|
+
static evmos: EthereumChainID;
|
445
|
+
static arbitrum: EthereumChainID;
|
446
|
+
static smartchain: EthereumChainID;
|
447
|
+
static aurora: EthereumChainID;
|
448
|
+
}
|
449
|
+
export class BitcoinScript {
|
450
|
+
static equal(lhs: BitcoinScript, rhs: BitcoinScript): boolean;
|
451
|
+
static buildPayToPublicKey(pubkey: Uint8Array | Buffer): BitcoinScript;
|
452
|
+
static buildPayToPublicKeyHash(hash: Uint8Array | Buffer): BitcoinScript;
|
453
|
+
static buildPayToScriptHash(scriptHash: Uint8Array | Buffer): BitcoinScript;
|
454
|
+
static buildPayToWitnessPubkeyHash(hash: Uint8Array | Buffer): BitcoinScript;
|
455
|
+
static buildPayToWitnessScriptHash(scriptHash: Uint8Array | Buffer): BitcoinScript;
|
456
|
+
static lockScriptForAddress(address: string, coin: CoinType): BitcoinScript;
|
457
|
+
static hashTypeForCoin(coinType: CoinType): number;
|
458
|
+
static create(): BitcoinScript;
|
459
|
+
static createWithData(data: Uint8Array | Buffer): BitcoinScript;
|
460
|
+
static createCopy(script: BitcoinScript): BitcoinScript;
|
461
|
+
size(): number;
|
462
|
+
data(): Uint8Array;
|
463
|
+
scriptHash(): Uint8Array;
|
464
|
+
isPayToScriptHash(): boolean;
|
465
|
+
isPayToWitnessScriptHash(): boolean;
|
466
|
+
isPayToWitnessPublicKeyHash(): boolean;
|
467
|
+
isWitnessProgram(): boolean;
|
468
|
+
matchPayToPubkey(): Uint8Array;
|
469
|
+
matchPayToPubkeyHash(): Uint8Array;
|
470
|
+
matchPayToScriptHash(): Uint8Array;
|
471
|
+
matchPayToWitnessPublicKeyHash(): Uint8Array;
|
472
|
+
matchPayToWitnessScriptHash(): Uint8Array;
|
473
|
+
encode(): Uint8Array;
|
474
|
+
delete(): void;
|
475
|
+
}
|
476
|
+
export class PrivateKey {
|
477
|
+
static isValid(data: Uint8Array | Buffer, curve: Curve): boolean;
|
478
|
+
static create(): PrivateKey;
|
479
|
+
static createWithData(data: Uint8Array | Buffer): PrivateKey;
|
480
|
+
static createCopy(key: PrivateKey): PrivateKey;
|
481
|
+
data(): Uint8Array;
|
482
|
+
getPublicKeySecp256k1(compressed: boolean): PublicKey;
|
483
|
+
getPublicKeyNist256p1(): PublicKey;
|
484
|
+
getPublicKeyEd25519(): PublicKey;
|
485
|
+
getPublicKeyEd25519Blake2b(): PublicKey;
|
486
|
+
getPublicKeyEd25519Extended(): PublicKey;
|
487
|
+
getPublicKeyCurve25519(): PublicKey;
|
488
|
+
getSharedKey(publicKey: PublicKey, curve: Curve): Uint8Array;
|
489
|
+
sign(digest: Uint8Array | Buffer, curve: Curve): Uint8Array;
|
490
|
+
signAsDER(digest: Uint8Array | Buffer, curve: Curve): Uint8Array;
|
491
|
+
signSchnorr(message: Uint8Array | Buffer, curve: Curve): Uint8Array;
|
492
|
+
delete(): void;
|
493
|
+
}
|
494
|
+
export class HDWallet {
|
495
|
+
static getPublicKeyFromExtended(extended: string, coin: CoinType, derivationPath: string): PublicKey;
|
496
|
+
static create(strength: number, passphrase: string): HDWallet;
|
497
|
+
static createWithMnemonic(mnemonic: string, passphrase: string): HDWallet;
|
498
|
+
static createWithMnemonicCheck(mnemonic: string, passphrase: string, check: boolean): HDWallet;
|
499
|
+
static createWithEntropy(entropy: Uint8Array | Buffer, passphrase: string): HDWallet;
|
500
|
+
seed(): Uint8Array;
|
501
|
+
mnemonic(): string;
|
502
|
+
entropy(): Uint8Array;
|
503
|
+
getMasterKey(curve: Curve): PrivateKey;
|
504
|
+
getKeyForCoin(coin: CoinType): PrivateKey;
|
505
|
+
getAddressForCoin(coin: CoinType): string;
|
506
|
+
getKey(coin: CoinType, derivationPath: string): PrivateKey;
|
507
|
+
getDerivedKey(coin: CoinType, account: number, change: number, address: number): PrivateKey;
|
508
|
+
getExtendedPrivateKey(purpose: Purpose, coin: CoinType, version: HDVersion): string;
|
509
|
+
getExtendedPublicKey(purpose: Purpose, coin: CoinType, version: HDVersion): string;
|
510
|
+
getExtendedPrivateKeyAccount(purpose: Purpose, coin: CoinType, derivation: Derivation, version: HDVersion, account: number): string;
|
511
|
+
getExtendedPublicKeyAccount(purpose: Purpose, coin: CoinType, derivation: Derivation, version: HDVersion, account: number): string;
|
512
|
+
getExtendedPrivateKeyDerivation(purpose: Purpose, coin: CoinType, derivation: Derivation, version: HDVersion): string;
|
513
|
+
getExtendedPublicKeyDerivation(purpose: Purpose, coin: CoinType, derivation: Derivation, version: HDVersion): string;
|
514
|
+
delete(): void;
|
515
|
+
}
|
516
|
+
export class StoredKey {
|
517
|
+
static load(path: string): StoredKey;
|
518
|
+
static importPrivateKey(privateKey: Uint8Array | Buffer, name: string, password: Uint8Array | Buffer, coin: CoinType): StoredKey;
|
519
|
+
static importHDWallet(mnemonic: string, name: string, password: Uint8Array | Buffer, coin: CoinType): StoredKey;
|
520
|
+
static importJSON(json: Uint8Array | Buffer): StoredKey;
|
521
|
+
static createLevel(name: string, password: Uint8Array | Buffer, encryptionLevel: StoredKeyEncryptionLevel): StoredKey;
|
522
|
+
static create(name: string, password: Uint8Array | Buffer): StoredKey;
|
523
|
+
identifier(): string;
|
524
|
+
name(): string;
|
525
|
+
isMnemonic(): boolean;
|
526
|
+
accountCount(): number;
|
527
|
+
encryptionParameters(): string;
|
528
|
+
account(index: number): Account;
|
529
|
+
accountForCoin(coin: CoinType, wallet: HDWallet): Account;
|
530
|
+
accountForCoinDerivation(coin: CoinType, derivation: Derivation, wallet: HDWallet): Account;
|
531
|
+
addAccountDerivation(address: string, coin: CoinType, derivation: Derivation, derivationPath: string, publicKey: string, extendedPublicKey: string): void;
|
532
|
+
addAccount(address: string, coin: CoinType, derivationPath: string, publicKey: string, extendedPublicKey: string): void;
|
533
|
+
removeAccountForCoin(coin: CoinType): void;
|
534
|
+
removeAccountForCoinDerivation(coin: CoinType, derivation: Derivation): void;
|
535
|
+
removeAccountForCoinDerivationPath(coin: CoinType, derivationPath: string): void;
|
536
|
+
store(path: string): boolean;
|
537
|
+
decryptPrivateKey(password: Uint8Array | Buffer): Uint8Array;
|
538
|
+
decryptMnemonic(password: Uint8Array | Buffer): string;
|
539
|
+
privateKey(coin: CoinType, password: Uint8Array | Buffer): PrivateKey;
|
540
|
+
wallet(password: Uint8Array | Buffer): HDWallet;
|
541
|
+
exportJSON(): Uint8Array;
|
542
|
+
fixAddresses(password: Uint8Array | Buffer): boolean;
|
543
|
+
delete(): void;
|
544
|
+
}
|
545
|
+
export class RippleXAddress {
|
546
|
+
static equal(lhs: RippleXAddress, rhs: RippleXAddress): boolean;
|
547
|
+
static isValidString(string: string): boolean;
|
548
|
+
static createWithString(string: string): RippleXAddress;
|
549
|
+
static createWithPublicKey(publicKey: PublicKey, tag: number): RippleXAddress;
|
550
|
+
description(): string;
|
551
|
+
tag(): number;
|
552
|
+
delete(): void;
|
553
|
+
}
|
554
|
+
export class EthereumAbiValue {
|
555
|
+
static encodeBool(value: boolean): Uint8Array;
|
556
|
+
static encodeInt32(value: number): Uint8Array;
|
557
|
+
static encodeUInt32(value: number): Uint8Array;
|
558
|
+
static encodeInt256(value: Uint8Array | Buffer): Uint8Array;
|
559
|
+
static encodeUInt256(value: Uint8Array | Buffer): Uint8Array;
|
560
|
+
static encodeAddress(value: Uint8Array | Buffer): Uint8Array;
|
561
|
+
static encodeString(value: string): Uint8Array;
|
562
|
+
static encodeBytes(value: Uint8Array | Buffer): Uint8Array;
|
563
|
+
static encodeBytesDyn(value: Uint8Array | Buffer): Uint8Array;
|
564
|
+
static decodeUInt256(input: Uint8Array | Buffer): string;
|
565
|
+
static decodeValue(input: Uint8Array | Buffer, type: string): string;
|
566
|
+
static decodeArray(input: Uint8Array | Buffer, type: string): string;
|
567
|
+
}
|
568
|
+
export class AES {
|
569
|
+
static encryptCBC(key: Uint8Array | Buffer, data: Uint8Array | Buffer, iv: Uint8Array | Buffer, mode: AESPaddingMode): Uint8Array;
|
570
|
+
static decryptCBC(key: Uint8Array | Buffer, data: Uint8Array | Buffer, iv: Uint8Array | Buffer, mode: AESPaddingMode): Uint8Array;
|
571
|
+
static encryptCTR(key: Uint8Array | Buffer, data: Uint8Array | Buffer, iv: Uint8Array | Buffer): Uint8Array;
|
572
|
+
static decryptCTR(key: Uint8Array | Buffer, data: Uint8Array | Buffer, iv: Uint8Array | Buffer): Uint8Array;
|
573
|
+
}
|
574
|
+
export class AESPaddingMode {
|
575
|
+
value: number;
|
576
|
+
static zero: AESPaddingMode;
|
577
|
+
static pkcs7: AESPaddingMode;
|
578
|
+
}
|
579
|
+
export class GroestlcoinAddress {
|
580
|
+
static equal(lhs: GroestlcoinAddress, rhs: GroestlcoinAddress): boolean;
|
581
|
+
static isValidString(string: string): boolean;
|
582
|
+
static createWithString(string: string): GroestlcoinAddress;
|
583
|
+
static createWithPublicKey(publicKey: PublicKey, prefix: number): GroestlcoinAddress;
|
584
|
+
description(): string;
|
585
|
+
delete(): void;
|
586
|
+
}
|
587
|
+
export class Account {
|
588
|
+
static create(address: string, coin: CoinType, derivation: Derivation, derivationPath: string, publicKey: string, extendedPublicKey: string): Account;
|
589
|
+
address(): string;
|
590
|
+
derivation(): Derivation;
|
591
|
+
derivationPath(): string;
|
592
|
+
publicKey(): string;
|
593
|
+
extendedPublicKey(): string;
|
594
|
+
coin(): CoinType;
|
595
|
+
delete(): void;
|
596
|
+
}
|
597
|
+
export class Derivation {
|
598
|
+
value: number;
|
599
|
+
static default: Derivation;
|
600
|
+
static custom: Derivation;
|
601
|
+
static bitcoinSegwit: Derivation;
|
602
|
+
static bitcoinLegacy: Derivation;
|
603
|
+
static litecoinLegacy: Derivation;
|
604
|
+
static solanaSolana: Derivation;
|
605
|
+
}
|
606
|
+
export class PublicKey {
|
607
|
+
static isValid(data: Uint8Array | Buffer, type: PublicKeyType): boolean;
|
608
|
+
static recover(signature: Uint8Array | Buffer, message: Uint8Array | Buffer): PublicKey;
|
609
|
+
static createWithData(data: Uint8Array | Buffer, type: PublicKeyType): PublicKey;
|
610
|
+
isCompressed(): boolean;
|
611
|
+
compressed(): PublicKey;
|
612
|
+
uncompressed(): PublicKey;
|
613
|
+
data(): Uint8Array;
|
614
|
+
keyType(): PublicKeyType;
|
615
|
+
description(): string;
|
616
|
+
verify(signature: Uint8Array | Buffer, message: Uint8Array | Buffer): boolean;
|
617
|
+
verifyAsDER(signature: Uint8Array | Buffer, message: Uint8Array | Buffer): boolean;
|
618
|
+
verifySchnorr(signature: Uint8Array | Buffer, message: Uint8Array | Buffer): boolean;
|
619
|
+
delete(): void;
|
620
|
+
}
|
621
|
+
export class DataVector {
|
622
|
+
static create(): DataVector;
|
623
|
+
static createWithData(data: Uint8Array | Buffer): DataVector;
|
624
|
+
size(): number;
|
625
|
+
add(data: Uint8Array | Buffer): void;
|
626
|
+
get(index: number): Uint8Array;
|
627
|
+
delete(): void;
|
628
|
+
}
|
629
|
+
export class Curve {
|
630
|
+
value: number;
|
631
|
+
static secp256k1: Curve;
|
632
|
+
static ed25519: Curve;
|
633
|
+
static ed25519Blake2bNano: Curve;
|
634
|
+
static curve25519: Curve;
|
635
|
+
static nist256p1: Curve;
|
636
|
+
static ed25519Extended: Curve;
|
637
|
+
}
|
638
|
+
|
639
|
+
declare function describeCurve(value: Curve): string;
|
640
|
+
|
package/dist/lib/wallet-core.js
CHANGED
@@ -12,96 +12,96 @@ function Aa(a,b,c){void 0===c&&(c=2147483647);if(4>c)return 0;var d=b;c=d+c-4;fo
|
|
12
12
|
function Fa(){var a=oa.buffer;Ca=a;g.HEAP8=D=new Int8Array(a);g.HEAP16=B=new Int16Array(a);g.HEAP32=C=new Int32Array(a);g.HEAPU8=z=new Uint8Array(a);g.HEAPU16=wa=new Uint16Array(a);g.HEAPU32=F=new Uint32Array(a);g.HEAPF32=Da=new Float32Array(a);g.HEAPF64=Ea=new Float64Array(a)}var Ga,Ha=[],Ia=[],Ja=[];function Ka(){var a=g.preRun.shift();Ha.unshift(a)}var G=0,La=null,Ma=null;
|
13
13
|
function x(a){if(g.onAbort)g.onAbort(a);a="Aborted("+a+")";u(a);pa=!0;throw new WebAssembly.RuntimeError(a+". Build with -sASSERTIONS for more info.");}function Na(){return H.startsWith("data:application/octet-stream;base64,")}var H;H="wallet-core.wasm";if(!Na()){var Oa=H;H=g.locateFile?g.locateFile(Oa,n):n+Oa}function Pa(){var a=H;try{if(a==H&&na)return new Uint8Array(na);if(ja)return ja(a);throw"both async and sync fetching of the wasm failed";}catch(b){x(b)}}
|
14
14
|
function Qa(){if(!na&&(ca||ea)){if("function"==typeof fetch&&!H.startsWith("file://"))return fetch(H,{credentials:"same-origin"}).then(function(a){if(!a.ok)throw"failed to load wasm binary file at '"+H+"'";return a.arrayBuffer()}).catch(function(){return Pa()});if(ia)return new Promise(function(a,b){ia(H,function(c){a(new Uint8Array(c))},b)})}return Promise.resolve().then(function(){return Pa()})}var I,Ra;
|
15
|
-
function Sa(a){for(;0<a.length;){var b=a.shift();if("function"==typeof b)b(g);else{var c=b.
|
16
|
-
function Va(a){this.va=a-24;this.
|
15
|
+
function Sa(a){for(;0<a.length;){var b=a.shift();if("function"==typeof b)b(g);else{var c=b.Xb;"number"==typeof c?void 0===b.bb?Ta(c)():Ta(c)(b.bb):c(void 0===b.bb?null:b.bb)}}}var Ua=[];function Ta(a){var b=Ua[a];b||(a>=Ua.length&&(Ua.length=a+1),Ua[a]=b=Ga.get(a));return b}
|
16
|
+
function Va(a){this.va=a-24;this.Vb=function(b){F[this.va+4>>2]=b};this.Rb=function(b){F[this.va+8>>2]=b};this.Tb=function(){C[this.va>>2]=0};this.Mb=function(){D[this.va+12>>0]=0};this.Ub=function(){D[this.va+13>>0]=0};this.Ia=function(b,c){this.Jb();this.Vb(b);this.Rb(c);this.Tb();this.Mb();this.Ub()};this.Jb=function(){F[this.va+16>>2]=0}}
|
17
17
|
var Wa=0,Xa=(a,b)=>{for(var c=0,d=a.length-1;0<=d;d--){var e=a[d];"."===e?a.splice(d,1):".."===e?(a.splice(d,1),c++):c&&(a.splice(d,1),c--)}if(b)for(;c;c--)a.unshift("..");return a},Ya=a=>{var b="/"===a.charAt(0),c="/"===a.substr(-1);(a=Xa(a.split("/").filter(d=>!!d),!b).join("/"))||b||(a=".");a&&c&&(a+="/");return(b?"/":"")+a},Za=a=>{var b=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(a).slice(1);a=b[0];b=b[1];if(!a&&!b)return".";b&&(b=b.substr(0,b.length-1));return a+b},$a=
|
18
18
|
a=>{if("/"===a)return"/";a=Ya(a);a=a.replace(/\/$/,"");var b=a.lastIndexOf("/");return-1===b?a:a.substr(b+1)};function ab(){if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues){var a=new Uint8Array(1);return function(){crypto.getRandomValues(a);return a[0]}}if(fa)try{var b=require("crypto");return function(){return b.randomBytes(1)[0]}}catch(c){}return function(){x("randomDevice")}}
|
19
|
-
function bb(){for(var a="",b=!1,c=arguments.length-1;-1<=c&&!b;c--){b=0<=c?arguments[c]:"/";if("string"!=typeof b)throw new TypeError("Arguments to path.resolve must be strings");if(!b)return"";a=b+"/"+a;b="/"===b.charAt(0)}a=Xa(a.split("/").filter(d=>!!d),!b).join("/");return(b?"/":"")+a||"."}var cb=[];function db(a,b){cb[a]={input:[],output:[],
|
20
|
-
var fb={open:function(a){var b=cb[a.node.rdev];if(!b)throw new J(43);a.tty=b;a.seekable=!1},close:function(a){a.tty.
|
21
|
-
try{for(var e=0;e<d;e++)a.tty.
|
22
|
-
readline(),null!==b&&(b+="\n"));if(!b)return null;a.input=gb(b,!0)}return a.input.shift()},
|
23
|
-
createNode:function(a,b,c,d){if(24576===(c&61440)||4096===(c&61440))throw new J(63);K.Ea||(K.Ea={dir:{node:{
|
24
|
-
stream:jb}});c=kb(a,b,c,d);16384===(c.mode&61440)?(c.ua=K.Ea.dir.node,c.sa=K.Ea.dir.stream,c.ta={}):32768===(c.mode&61440)?(c.ua=K.Ea.file.node,c.sa=K.Ea.file.stream,c.xa=0,c.ta=null):40960===(c.mode&61440)?(c.ua=K.Ea.link.node,c.sa=K.Ea.link.stream):8192===(c.mode&61440)&&(c.ua=K.Ea.
|
25
|
-
b){var c=a.ta?a.ta.length:0;c>=b||(b=Math.max(b,c*(1048576>c?2:1.125)>>>0),0!=c&&(b=Math.max(b,256)),c=a.ta,a.ta=new Uint8Array(b),0<a.xa&&a.ta.set(c.subarray(0,a.xa),0))},
|
26
|
-
b.size=a.xa:40960===(a.mode&61440)?b.size=a.link.length:b.size=0;b.atime=new Date(a.timestamp);b.mtime=new Date(a.timestamp);b.ctime=new Date(a.timestamp);b.
|
19
|
+
function bb(){for(var a="",b=!1,c=arguments.length-1;-1<=c&&!b;c--){b=0<=c?arguments[c]:"/";if("string"!=typeof b)throw new TypeError("Arguments to path.resolve must be strings");if(!b)return"";a=b+"/"+a;b="/"===b.charAt(0)}a=Xa(a.split("/").filter(d=>!!d),!b).join("/");return(b?"/":"")+a||"."}var cb=[];function db(a,b){cb[a]={input:[],output:[],Sa:b};eb(a,fb)}
|
20
|
+
var fb={open:function(a){var b=cb[a.node.rdev];if(!b)throw new J(43);a.tty=b;a.seekable=!1},close:function(a){a.tty.Sa.flush(a.tty)},flush:function(a){a.tty.Sa.flush(a.tty)},read:function(a,b,c,d){if(!a.tty||!a.tty.Sa.pb)throw new J(60);for(var e=0,f=0;f<d;f++){try{var k=a.tty.Sa.pb(a.tty)}catch(l){throw new J(29);}if(void 0===k&&0===e)throw new J(6);if(null===k||void 0===k)break;e++;b[c+f]=k}e&&(a.node.timestamp=Date.now());return e},write:function(a,b,c,d){if(!a.tty||!a.tty.Sa.fb)throw new J(60);
|
21
|
+
try{for(var e=0;e<d;e++)a.tty.Sa.fb(a.tty,b[c+e])}catch(f){throw new J(29);}d&&(a.node.timestamp=Date.now());return e}},hb={pb:function(a){if(!a.input.length){var b=null;if(fa){var c=Buffer.alloc(256),d=0;try{d=fs.readSync(process.stdin.fd,c,0,256,-1)}catch(e){if(e.toString().includes("EOF"))d=0;else throw e;}0<d?b=c.slice(0,d).toString("utf-8"):b=null}else"undefined"!=typeof window&&"function"==typeof window.prompt?(b=window.prompt("Input: "),null!==b&&(b+="\n")):"function"==typeof readline&&(b=
|
22
|
+
readline(),null!==b&&(b+="\n"));if(!b)return null;a.input=gb(b,!0)}return a.input.shift()},fb:function(a,b){null===b||10===b?(ma(ra(a.output,0)),a.output=[]):0!=b&&a.output.push(b)},flush:function(a){a.output&&0<a.output.length&&(ma(ra(a.output,0)),a.output=[])}},ib={fb:function(a,b){null===b||10===b?(u(ra(a.output,0)),a.output=[]):0!=b&&a.output.push(b)},flush:function(a){a.output&&0<a.output.length&&(u(ra(a.output,0)),a.output=[])}},K={Ea:null,Ha:function(){return K.createNode(null,"/",16895,0)},
|
23
|
+
createNode:function(a,b,c,d){if(24576===(c&61440)||4096===(c&61440))throw new J(63);K.Ea||(K.Ea={dir:{node:{Ka:K.ua.Ka,Fa:K.ua.Fa,lookup:K.ua.lookup,Xa:K.ua.Xa,rename:K.ua.rename,unlink:K.ua.unlink,rmdir:K.ua.rmdir,readdir:K.ua.readdir,symlink:K.ua.symlink},stream:{La:K.sa.La}},file:{node:{Ka:K.ua.Ka,Fa:K.ua.Fa},stream:{La:K.sa.La,read:K.sa.read,write:K.sa.write,jb:K.sa.jb,qb:K.sa.qb,Za:K.sa.Za}},link:{node:{Ka:K.ua.Ka,Fa:K.ua.Fa,readlink:K.ua.readlink},stream:{}},kb:{node:{Ka:K.ua.Ka,Fa:K.ua.Fa},
|
24
|
+
stream:jb}});c=kb(a,b,c,d);16384===(c.mode&61440)?(c.ua=K.Ea.dir.node,c.sa=K.Ea.dir.stream,c.ta={}):32768===(c.mode&61440)?(c.ua=K.Ea.file.node,c.sa=K.Ea.file.stream,c.xa=0,c.ta=null):40960===(c.mode&61440)?(c.ua=K.Ea.link.node,c.sa=K.Ea.link.stream):8192===(c.mode&61440)&&(c.ua=K.Ea.kb.node,c.sa=K.Ea.kb.stream);c.timestamp=Date.now();a&&(a.ta[b]=c,a.timestamp=c.timestamp);return c},Yb:function(a){return a.ta?a.ta.subarray?a.ta.subarray(0,a.xa):new Uint8Array(a.ta):new Uint8Array(0)},mb:function(a,
|
25
|
+
b){var c=a.ta?a.ta.length:0;c>=b||(b=Math.max(b,c*(1048576>c?2:1.125)>>>0),0!=c&&(b=Math.max(b,256)),c=a.ta,a.ta=new Uint8Array(b),0<a.xa&&a.ta.set(c.subarray(0,a.xa),0))},Ib:function(a,b){if(a.xa!=b)if(0==b)a.ta=null,a.xa=0;else{var c=a.ta;a.ta=new Uint8Array(b);c&&a.ta.set(c.subarray(0,Math.min(b,a.xa)));a.xa=b}},ua:{Ka:function(a){var b={};b.dev=8192===(a.mode&61440)?a.id:1;b.ino=a.id;b.mode=a.mode;b.nlink=1;b.uid=0;b.gid=0;b.rdev=a.rdev;16384===(a.mode&61440)?b.size=4096:32768===(a.mode&61440)?
|
26
|
+
b.size=a.xa:40960===(a.mode&61440)?b.size=a.link.length:b.size=0;b.atime=new Date(a.timestamp);b.mtime=new Date(a.timestamp);b.ctime=new Date(a.timestamp);b.ub=4096;b.blocks=Math.ceil(b.size/b.ub);return b},Fa:function(a,b){void 0!==b.mode&&(a.mode=b.mode);void 0!==b.timestamp&&(a.timestamp=b.timestamp);void 0!==b.size&&K.Ib(a,b.size)},lookup:function(){throw lb[44];},Xa:function(a,b,c,d){return K.createNode(a,b,c,d)},rename:function(a,b,c){if(16384===(a.mode&61440)){try{var d=mb(b,c)}catch(f){}if(d)for(var e in d.ta)throw new J(55);
|
27
27
|
}delete a.parent.ta[a.name];a.parent.timestamp=Date.now();a.name=c;b.ta[c]=a;b.timestamp=a.parent.timestamp;a.parent=b},unlink:function(a,b){delete a.ta[b];a.timestamp=Date.now()},rmdir:function(a,b){var c=mb(a,b),d;for(d in c.ta)throw new J(55);delete a.ta[b];a.timestamp=Date.now()},readdir:function(a){var b=[".",".."],c;for(c in a.ta)a.ta.hasOwnProperty(c)&&b.push(c);return b},symlink:function(a,b,c){a=K.createNode(a,b,41471,0);a.link=c;return a},readlink:function(a){if(40960!==(a.mode&61440))throw new J(28);
|
28
|
-
return a.link}},sa:{read:function(a,b,c,d,e){var f=a.node.ta;if(e>=a.node.xa)return 0;a=Math.min(a.node.xa-e,d);if(8<a&&f.subarray)b.set(f.subarray(e,e+a),c);else for(d=0;d<a;d++)b[c+d]=f[e+d];return a},write:function(a,b,c,d,e,f){b.buffer===D.buffer&&(f=!1);if(!d)return 0;a=a.node;a.timestamp=Date.now();if(b.subarray&&(!a.ta||a.ta.subarray)){if(f)return a.ta=b.subarray(c,c+d),a.xa=d;if(0===a.xa&&0===e)return a.ta=b.slice(c,c+d),a.xa=d;if(e+d<=a.xa)return a.ta.set(b.subarray(c,c+d),e),d}K.
|
29
|
-
d);if(a.ta.subarray&&b.subarray)a.ta.set(b.subarray(c,c+d),e);else for(f=0;f<d;f++)a.ta[e+f]=b[c+f];a.xa=Math.max(a.xa,e+d);return d},
|
30
|
-
c,c+b);c=!0;b=65536*Math.ceil(b/65536);(e=nb(65536,b))?(z.fill(0,e,e+b),b=e):b=0;if(!b)throw new J(48);D.set(a,b)}else c=!1,b=a.byteOffset;return{va:b,
|
31
|
-
e=0;e<a.length;e++){var f=e===a.length-1;if(f&&b.parent)break;c=mb(c,a[e]);d=Ya(d+"/"+a[e]);c.
|
32
|
-
{var c;if(c=(c=wb(a,"x"))?c:a.ua.lookup?0:2)throw new J(c,a);for(c=rb[vb(a.id,b)];c;c=c.
|
33
|
-
return 0},Ab=(a,b)=>{try{return mb(a,b),20}catch(c){}return wb(a,"wx")},Bb=(a=0)=>{for(;4096>=a;a++)if(!L[a])return a;throw new J(33);},Db=(a,b)=>{Cb||(Cb=function(){this
|
34
|
-
(a,b)=>{pb[a]={sa:b}},Eb=(a,b)=>{var c="/"===b,d=!b;if(c&&ob)throw new J(10);if(!c&&!d){var e=M(b,{
|
35
|
-
b,b=438);N(a,b|8192,c)},Gb=(a,b)=>{if(!bb(a))throw new J(44);var c=M(b,{parent:!0}).node;if(!c)throw new J(44);b=$a(b);var d=Ab(c,b);if(d)throw new J(d);if(!c.ua.symlink)throw new J(63);c.ua.symlink(c,b,a)},tb=a=>{a=M(a).node;if(!a)throw new J(44);if(!a.ua.readlink)throw new J(28);return bb(ub(a.parent),a.ua.readlink(a))},Ib=(a,b,c)=>{if(""===a)throw new J(44);if("string"==typeof b){var d=
|
36
|
-
c)&4095|32768:0;if("object"==typeof a)var e=a;else{a=Ya(a);try{e=M(a,{
|
37
|
-
if(32768!==(c.mode&61440))throw new J(28);if(d=wb(c,"w"))throw new J(d);c.ua.Fa(c,{size:0,timestamp:Date.now()})}b&=-131713;e=Db({node:e,path:ub(e),flags:b,seekable:!0,position:0,sa:e.sa,
|
38
|
-
c};this.
|
39
|
-
void 0===t)break;p++;k[l+q]=t}p&&(f.node.timestamp=Date.now());return p},write:(f,k,l,m)=>{for(var p=0;p<m;p++)try{c(k[l+p])}catch(q){throw new J(29);}m&&(f.node.timestamp=Date.now());return p}});Fb(a,d,e)},Nb,O={},Cb,Hb,Pb=void 0;function P(){Pb+=4;return C[Pb-4>>2]}function Q(a){a=L[a];if(!a)throw new J(8);return a}
|
40
|
-
function R(a){for(var b="";z[a];)b+=Rb[z[a++]];return b}var Sb={},S={},Tb={};function Ub(a){if(void 0===a)return"_unknown";a=a.replace(/[^a-zA-Z0-9_]/g,"$");var b=a.charCodeAt(0);return 48<=b&&57>=b?"_"+a:a}
|
41
|
-
function Wb(a){var b=Error,c=Vb(a,function(d){this.name=a;this.message=d;d=Error(d).stack;void 0!==d&&(this.stack=this.toString()+"\n"+d.replace(/^Error(:[^\n]*)?\n/,""))});c.prototype=Object.create(b.prototype);c.prototype.constructor=c;c.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message};return c}
|
42
|
-
function $b(a,b,c){function d(l){l=c(l);l.length!==a.length&&Zb("Mismatched type converter count");for(var m=0;m<a.length;++m)U(a[m],l[m])}a.forEach(function(l){Tb[l]=b});var e=Array(b.length),f=[],k=0;b.forEach((l,m)=>{S.hasOwnProperty(l)?e[m]=S[l]:(f.push(l),Sb.hasOwnProperty(l)||(Sb[l]=[]),Sb[l].push(()=>{e[m]=S[l];++k;k===f.length&&d(e)}))});0===f.length&&d(e)}
|
43
|
-
function U(a,b,c={}){if(!("argPackAdvance"in b))throw new TypeError("registerType registeredInstance requires argPackAdvance");var d=b.name;a||T('type "'+d+'" must have a positive integer typeid pointer');if(S.hasOwnProperty(a)){if(c.
|
44
|
-
function dc(a){--a.count.value;0===a.count.value&&(a.Aa?a.Ba.
|
28
|
+
return a.link}},sa:{read:function(a,b,c,d,e){var f=a.node.ta;if(e>=a.node.xa)return 0;a=Math.min(a.node.xa-e,d);if(8<a&&f.subarray)b.set(f.subarray(e,e+a),c);else for(d=0;d<a;d++)b[c+d]=f[e+d];return a},write:function(a,b,c,d,e,f){b.buffer===D.buffer&&(f=!1);if(!d)return 0;a=a.node;a.timestamp=Date.now();if(b.subarray&&(!a.ta||a.ta.subarray)){if(f)return a.ta=b.subarray(c,c+d),a.xa=d;if(0===a.xa&&0===e)return a.ta=b.slice(c,c+d),a.xa=d;if(e+d<=a.xa)return a.ta.set(b.subarray(c,c+d),e),d}K.mb(a,e+
|
29
|
+
d);if(a.ta.subarray&&b.subarray)a.ta.set(b.subarray(c,c+d),e);else for(f=0;f<d;f++)a.ta[e+f]=b[c+f];a.xa=Math.max(a.xa,e+d);return d},La:function(a,b,c){1===c?b+=a.position:2===c&&32768===(a.node.mode&61440)&&(b+=a.node.xa);if(0>b)throw new J(28);return b},jb:function(a,b,c){K.mb(a.node,b+c);a.node.xa=Math.max(a.node.xa,b+c)},qb:function(a,b,c,d,e){if(32768!==(a.node.mode&61440))throw new J(43);a=a.node.ta;if(e&2||a.buffer!==Ca){if(0<c||c+b<a.length)a.subarray?a=a.subarray(c,c+b):a=Array.prototype.slice.call(a,
|
30
|
+
c,c+b);c=!0;b=65536*Math.ceil(b/65536);(e=nb(65536,b))?(z.fill(0,e,e+b),b=e):b=0;if(!b)throw new J(48);D.set(a,b)}else c=!1,b=a.byteOffset;return{va:b,Wb:c}},Za:function(a,b,c,d,e){if(32768!==(a.node.mode&61440))throw new J(43);if(e&2)return 0;K.sa.write(a,b,0,d,c,!1);return 0}}},ob=null,pb={},L=[],qb=1,rb=null,sb=!0,J=null,lb={},M=(a,b={})=>{a=bb("/",a);if(!a)return{path:"",node:null};b=Object.assign({ob:!0,gb:0},b);if(8<b.gb)throw new J(32);a=Xa(a.split("/").filter(k=>!!k),!1);for(var c=ob,d="/",
|
31
|
+
e=0;e<a.length;e++){var f=e===a.length-1;if(f&&b.parent)break;c=mb(c,a[e]);d=Ya(d+"/"+a[e]);c.Ya&&(!f||f&&b.ob)&&(c=c.Ya.root);if(!f||b.nb)for(f=0;40960===(c.mode&61440);)if(c=tb(d),d=bb(Za(d),c),c=M(d,{gb:b.gb+1}).node,40<f++)throw new J(32);}return{path:d,node:c}},ub=a=>{for(var b;;){if(a===a.parent)return a=a.Ha.rb,b?"/"!==a[a.length-1]?a+"/"+b:a+b:a;b=b?a.name+"/"+b:a.name;a=a.parent}},vb=(a,b)=>{for(var c=0,d=0;d<b.length;d++)c=(c<<5)-c+b.charCodeAt(d)|0;return(a+c>>>0)%rb.length},mb=(a,b)=>
|
32
|
+
{var c;if(c=(c=wb(a,"x"))?c:a.ua.lookup?0:2)throw new J(c,a);for(c=rb[vb(a.id,b)];c;c=c.Db){var d=c.name;if(c.parent.id===a.id&&d===b)return c}return a.ua.lookup(a,b)},kb=(a,b,c,d)=>{a=new xb(a,b,c,d);b=vb(a.parent.id,a.name);a.Db=rb[b];return rb[b]=a},yb={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},zb=a=>{var b=["r","w","rw"][a&3];a&512&&(b+="w");return b},wb=(a,b)=>{if(sb)return 0;if(!b.includes("r")||a.mode&292){if(b.includes("w")&&!(a.mode&146)||b.includes("x")&&!(a.mode&73))return 2}else return 2;
|
33
|
+
return 0},Ab=(a,b)=>{try{return mb(a,b),20}catch(c){}return wb(a,"wx")},Bb=(a=0)=>{for(;4096>=a;a++)if(!L[a])return a;throw new J(33);},Db=(a,b)=>{Cb||(Cb=function(){this.Ia={}},Cb.prototype={},Object.defineProperties(Cb.prototype,{object:{get:function(){return this.node},set:function(c){this.node=c}},flags:{get:function(){return this.Ia.flags},set:function(c){this.Ia.flags=c}},position:{get:function(){return this.Ia.position},set:function(c){this.Ia.position=c}}}));a=Object.assign(new Cb,a);b=Bb(b);
|
34
|
+
a.fd=b;return L[b]=a},jb={open:a=>{a.sa=pb[a.node.rdev].sa;a.sa.open&&a.sa.open(a)},La:()=>{throw new J(70);}},eb=(a,b)=>{pb[a]={sa:b}},Eb=(a,b)=>{var c="/"===b,d=!b;if(c&&ob)throw new J(10);if(!c&&!d){var e=M(b,{ob:!1});b=e.path;e=e.node;if(e.Ya)throw new J(10);if(16384!==(e.mode&61440))throw new J(54);}b={type:a,$b:{},rb:b,Cb:[]};a=a.Ha(b);a.Ha=b;b.root=a;c?ob=a:e&&(e.Ya=b,e.Ha&&e.Ha.Cb.push(b))},N=(a,b,c)=>{var d=M(a,{parent:!0}).node;a=$a(a);if(!a||"."===a||".."===a)throw new J(28);var e=Ab(d,
|
35
|
+
a);if(e)throw new J(e);if(!d.ua.Xa)throw new J(63);return d.ua.Xa(d,a,b,c)},Fb=(a,b,c)=>{"undefined"==typeof c&&(c=b,b=438);N(a,b|8192,c)},Gb=(a,b)=>{if(!bb(a))throw new J(44);var c=M(b,{parent:!0}).node;if(!c)throw new J(44);b=$a(b);var d=Ab(c,b);if(d)throw new J(d);if(!c.ua.symlink)throw new J(63);c.ua.symlink(c,b,a)},tb=a=>{a=M(a).node;if(!a)throw new J(44);if(!a.ua.readlink)throw new J(28);return bb(ub(a.parent),a.ua.readlink(a))},Ib=(a,b,c)=>{if(""===a)throw new J(44);if("string"==typeof b){var d=
|
36
|
+
yb[b];if("undefined"==typeof d)throw Error("Unknown file open mode: "+b);b=d}c=b&64?("undefined"==typeof c?438:c)&4095|32768:0;if("object"==typeof a)var e=a;else{a=Ya(a);try{e=M(a,{nb:!(b&131072)}).node}catch(f){}}d=!1;if(b&64)if(e){if(b&128)throw new J(20);}else e=N(a,c,0),d=!0;if(!e)throw new J(44);8192===(e.mode&61440)&&(b&=-513);if(b&65536&&16384!==(e.mode&61440))throw new J(54);if(!d&&(c=e?40960===(e.mode&61440)?32:16384===(e.mode&61440)&&("r"!==zb(b)||b&512)?31:wb(e,zb(b)):44))throw new J(c);
|
37
|
+
if(b&512&&!d){c=e;c="string"==typeof c?M(c,{nb:!0}).node:c;if(!c.ua.Fa)throw new J(63);if(16384===(c.mode&61440))throw new J(31);if(32768!==(c.mode&61440))throw new J(28);if(d=wb(c,"w"))throw new J(d);c.ua.Fa(c,{size:0,timestamp:Date.now()})}b&=-131713;e=Db({node:e,path:ub(e),flags:b,seekable:!0,position:0,sa:e.sa,Sb:[],error:!1});e.sa.open&&e.sa.open(e);!g.logReadFiles||b&1||(Hb||(Hb={}),a in Hb||(Hb[a]=1));return e},Jb=(a,b,c)=>{if(null===a.fd)throw new J(8);if(!a.seekable||!a.sa.La)throw new J(70);
|
38
|
+
if(0!=c&&1!=c&&2!=c)throw new J(28);a.position=a.sa.La(a,b,c);a.Sb=[]},Kb=()=>{J||(J=function(a,b){this.node=b;this.Kb=function(c){this.Ja=c};this.Kb(a);this.message="FS error"},J.prototype=Error(),J.prototype.constructor=J,[44].forEach(a=>{lb[a]=new J(a);lb[a].stack="<generic error, no stack>"}))},Lb,Mb=(a,b)=>{var c=0;a&&(c|=365);b&&(c|=146);return c},Ob=(a,b,c)=>{a=Ya("/dev/"+a);var d=Mb(!!b,!!c);Nb||(Nb=64);var e=Nb++<<8|0;eb(e,{open:f=>{f.seekable=!1},close:()=>{c&&c.buffer&&c.buffer.length&&
|
39
|
+
c(10)},read:(f,k,l,m)=>{for(var p=0,q=0;q<m;q++){try{var t=b()}catch(v){throw new J(29);}if(void 0===t&&0===p)throw new J(6);if(null===t||void 0===t)break;p++;k[l+q]=t}p&&(f.node.timestamp=Date.now());return p},write:(f,k,l,m)=>{for(var p=0;p<m;p++)try{c(k[l+p])}catch(q){throw new J(29);}m&&(f.node.timestamp=Date.now());return p}});Fb(a,d,e)},Nb,O={},Cb,Hb,Pb=void 0;function P(){Pb+=4;return C[Pb-4>>2]}function Q(a){a=L[a];if(!a)throw new J(8);return a}
|
40
|
+
function Qb(a){switch(a){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+a);}}var Rb=void 0;function R(a){for(var b="";z[a];)b+=Rb[z[a++]];return b}var Sb={},S={},Tb={};function Ub(a){if(void 0===a)return"_unknown";a=a.replace(/[^a-zA-Z0-9_]/g,"$");var b=a.charCodeAt(0);return 48<=b&&57>=b?"_"+a:a}
|
41
|
+
function Vb(a,b){a=Ub(a);return(new Function("body","return function "+a+'() {\n "use strict"; return body.apply(this, arguments);\n};\n'))(b)}function Wb(a){var b=Error,c=Vb(a,function(d){this.name=a;this.message=d;d=Error(d).stack;void 0!==d&&(this.stack=this.toString()+"\n"+d.replace(/^Error(:[^\n]*)?\n/,""))});c.prototype=Object.create(b.prototype);c.prototype.constructor=c;c.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message};return c}
|
42
|
+
var Xb=void 0;function T(a){throw new Xb(a);}var Yb=void 0;function Zb(a){throw new Yb(a);}function $b(a,b,c){function d(l){l=c(l);l.length!==a.length&&Zb("Mismatched type converter count");for(var m=0;m<a.length;++m)U(a[m],l[m])}a.forEach(function(l){Tb[l]=b});var e=Array(b.length),f=[],k=0;b.forEach((l,m)=>{S.hasOwnProperty(l)?e[m]=S[l]:(f.push(l),Sb.hasOwnProperty(l)||(Sb[l]=[]),Sb[l].push(()=>{e[m]=S[l];++k;k===f.length&&d(e)}))});0===f.length&&d(e)}
|
43
|
+
function U(a,b,c={}){if(!("argPackAdvance"in b))throw new TypeError("registerType registeredInstance requires argPackAdvance");var d=b.name;a||T('type "'+d+'" must have a positive integer typeid pointer');if(S.hasOwnProperty(a)){if(c.zb)return;T("Cannot register type '"+d+"' twice")}S[a]=b;delete Tb[a];Sb.hasOwnProperty(a)&&(b=Sb[a],delete Sb[a],b.forEach(e=>e()))}function ac(a){T(a.ra.ya.wa.name+" instance already deleted")}var bc=!1;function cc(){}
|
44
|
+
function dc(a){--a.count.value;0===a.count.value&&(a.Aa?a.Ba.Ma(a.Aa):a.ya.wa.Ma(a.va))}function ec(a,b,c){if(b===c)return a;if(void 0===c.Ca)return null;a=ec(a,b,c.Ca);return null===a?null:c.wb(a)}var fc={},gc=[];function hc(){for(;gc.length;){var a=gc.pop();a.ra.Qa=!1;a["delete"]()}}var ic=void 0,jc={};function kc(a,b){for(void 0===b&&T("ptr should not be undefined");a.Ca;)b=a.Ua(b),a=a.Ca;return jc[b]}
|
45
45
|
function lc(a,b){b.ya&&b.va||Zb("makeClassHandle requires ptr and ptrType");!!b.Ba!==!!b.Aa&&Zb("Both smartPtrType and smartPtr must be specified");b.count={value:1};return mc(Object.create(a,{ra:{value:b}}))}function mc(a){if("undefined"===typeof FinalizationRegistry)return mc=b=>b,a;bc=new FinalizationRegistry(b=>{dc(b.ra)});mc=b=>{var c=b.ra;c.Aa&&bc.register(b,{ra:c},b);return b};cc=b=>{bc.unregister(b)};return mc(a)}function V(){}
|
46
|
-
function nc(a,b,c){if(void 0===a[b].za){var d=a[b];a[b]=function(){a[b].za.hasOwnProperty(arguments.length)||T("Function '"+c+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+a[b].za+")!");return a[b].za[arguments.length].apply(this,arguments)};a[b].za=[];a[b].za[d.
|
47
|
-
function oc(a,b,c){g.hasOwnProperty(a)?((void 0===c||void 0!==g[a].za&&void 0!==g[a].za[c])&&T("Cannot register public name '"+a+"' twice"),nc(g,a,a),g.hasOwnProperty(c)&&T("Cannot register multiple overloads of a function with the same number of arguments ("+c+")!"),g[a].za[c]=b):(g[a]=b,void 0!==c&&(g[a].
|
48
|
-
function qc(a,b,c){for(;b!==c;)b.
|
49
|
-
function tc(a,b){if(null===b){this.
|
50
|
-
this.
|
51
|
-
function vc(a,b){if(null===b)return this.
|
52
|
-
function W(a,b,c,d){this.name=a;this.wa=b;this.
|
46
|
+
function nc(a,b,c){if(void 0===a[b].za){var d=a[b];a[b]=function(){a[b].za.hasOwnProperty(arguments.length)||T("Function '"+c+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+a[b].za+")!");return a[b].za[arguments.length].apply(this,arguments)};a[b].za=[];a[b].za[d.Pa]=d}}
|
47
|
+
function oc(a,b,c){g.hasOwnProperty(a)?((void 0===c||void 0!==g[a].za&&void 0!==g[a].za[c])&&T("Cannot register public name '"+a+"' twice"),nc(g,a,a),g.hasOwnProperty(c)&&T("Cannot register multiple overloads of a function with the same number of arguments ("+c+")!"),g[a].za[c]=b):(g[a]=b,void 0!==c&&(g[a].Zb=c))}function pc(a,b,c,d,e,f,k,l){this.name=a;this.constructor=b;this.Ra=c;this.Ma=d;this.Ca=e;this.xb=f;this.Ua=k;this.wb=l;this.Fb=[]}
|
48
|
+
function qc(a,b,c){for(;b!==c;)b.Ua||T("Expected null or instance of "+c.name+", got an instance of "+b.name),a=b.Ua(a),b=b.Ca;return a}function rc(a,b){if(null===b)return this.eb&&T("null is not a valid "+this.name),0;b.ra||T('Cannot pass "'+sc(b)+'" as a '+this.name);b.ra.va||T("Cannot pass deleted object as a pointer of type "+this.name);return qc(b.ra.va,b.ra.ya.wa,this.wa)}
|
49
|
+
function tc(a,b){if(null===b){this.eb&&T("null is not a valid "+this.name);if(this.Wa){var c=this.Gb();null!==a&&a.push(this.Ma,c);return c}return 0}b.ra||T('Cannot pass "'+sc(b)+'" as a '+this.name);b.ra.va||T("Cannot pass deleted object as a pointer of type "+this.name);!this.Va&&b.ra.ya.Va&&T("Cannot convert argument of type "+(b.ra.Ba?b.ra.Ba.name:b.ra.ya.name)+" to parameter type "+this.name);c=qc(b.ra.va,b.ra.ya.wa,this.wa);if(this.Wa)switch(void 0===b.ra.Aa&&T("Passing raw pointer to smart pointer is illegal"),
|
50
|
+
this.Lb){case 0:b.ra.Ba===this?c=b.ra.Aa:T("Cannot convert argument of type "+(b.ra.Ba?b.ra.Ba.name:b.ra.ya.name)+" to parameter type "+this.name);break;case 1:c=b.ra.Aa;break;case 2:if(b.ra.Ba===this)c=b.ra.Aa;else{var d=b.clone();c=this.Hb(c,uc(function(){d["delete"]()}));null!==a&&a.push(this.Ma,c)}break;default:T("Unsupporting sharing policy")}return c}
|
51
|
+
function vc(a,b){if(null===b)return this.eb&&T("null is not a valid "+this.name),0;b.ra||T('Cannot pass "'+sc(b)+'" as a '+this.name);b.ra.va||T("Cannot pass deleted object as a pointer of type "+this.name);b.ra.ya.Va&&T("Cannot convert argument of type "+b.ra.ya.name+" to parameter type "+this.name);return qc(b.ra.va,b.ra.ya.wa,this.wa)}function wc(a){return this.fromWireType(F[a>>2])}
|
52
|
+
function W(a,b,c,d){this.name=a;this.wa=b;this.eb=c;this.Va=d;this.Wa=!1;this.Ma=this.Hb=this.Gb=this.tb=this.Lb=this.Eb=void 0;void 0!==b.Ca?this.toWireType=tc:(this.toWireType=d?rc:vc,this.Da=null)}function xc(a,b,c){g.hasOwnProperty(a)||Zb("Replacing nonexistant public symbol");void 0!==g[a].za&&void 0!==c?g[a].za[c]=b:(g[a]=b,g[a].Pa=c)}
|
53
53
|
function yc(a,b){var c=[];return function(){c.length=0;Object.assign(c,arguments);if(a.includes("j")){var d=g["dynCall_"+a];d=c&&c.length?d.apply(null,[b].concat(c)):d.call(null,b)}else d=Ta(b).apply(null,c);return d}}function X(a,b){a=R(a);var c=a.includes("j")?yc(a,b):Ta(b);"function"!=typeof c&&T("unknown function pointer with signature "+a+": "+b);return c}var zc=void 0;function Ac(a){a=Bc(a);var b=R(a);Y(a);return b}
|
54
54
|
function Ec(a,b){function c(f){e[f]||S[f]||(Tb[f]?Tb[f].forEach(c):(d.push(f),e[f]=!0))}var d=[],e={};b.forEach(c);throw new zc(a+": "+d.map(Ac).join([", "]));}function Fc(a){var b=Function;if(!(b instanceof Function))throw new TypeError("new_ called with constructor type "+typeof b+" which is not a function");var c=Vb(b.name||"unknownFunctionName",function(){});c.prototype=b.prototype;c=new c;a=b.apply(c,a);return a instanceof Object?a:c}function Gc(a){for(;a.length;){var b=a.pop();a.pop()(b)}}
|
55
55
|
function Hc(a,b,c,d,e){var f=b.length;2>f&&T("argTypes array size mismatch! Must at least get return value and 'this' types!");var k=null!==b[1]&&null!==c,l=!1;for(c=1;c<b.length;++c)if(null!==b[c]&&void 0===b[c].Da){l=!0;break}var m="void"!==b[0].name,p="",q="";for(c=0;c<f-2;++c)p+=(0!==c?", ":"")+"arg"+c,q+=(0!==c?", ":"")+"arg"+c+"Wired";a="return function "+Ub(a)+"("+p+") {\nif (arguments.length !== "+(f-2)+") {\nthrowBindingError('function "+a+" called with ' + arguments.length + ' arguments, expected "+
|
56
56
|
(f-2)+" args!');\n}\n";l&&(a+="var destructors = [];\n");var t=l?"destructors":"null";p="throwBindingError invoker fn runDestructors retType classParam".split(" ");d=[T,d,e,Gc,b[0],b[1]];k&&(a+="var thisWired = classParam.toWireType("+t+", this);\n");for(c=0;c<f-2;++c)a+="var arg"+c+"Wired = argType"+c+".toWireType("+t+", arg"+c+"); // "+b[c+2].name+"\n",p.push("argType"+c),d.push(b[c+2]);k&&(q="thisWired"+(0<q.length?", ":"")+q);a+=(m?"var rv = ":"")+"invoker(fn"+(0<q.length?", ":"")+q+");\n";if(l)a+=
|
57
|
-
"runDestructors(destructors);\n";else for(c=k?1:2;c<b.length;++c)f=1===c?"thisWired":"arg"+(c-2)+"Wired",null!==b[c].Da&&(a+=f+"_dtor("+f+"); // "+b[c].name+"\n",p.push(f+"_dtor"),d.push(b[c].Da));m&&(a+="var ret = retType.fromWireType(rv);\nreturn ret;\n");p.push(a+"}\n");return Fc(p).apply(null,d)}function Ic(a,b){for(var c=[],d=0;d<a;d++)c.push(C[(b>>2)+d]);return c}var Jc=[],Z=[{},{value:void 0},{value:null},{value:!0},{value:!1}];function Kc(a){4<a&&0===--Z[a].
|
58
|
-
var Lc=a=>{a||T("Cannot use deleted val. handle = "+a);return Z[a].value},uc=a=>{switch(a){case void 0:return 1;case null:return 2;case !0:return 3;case !1:return 4;default:var b=Jc.length?Jc.pop():Z.length;Z[b]={
|
57
|
+
"runDestructors(destructors);\n";else for(c=k?1:2;c<b.length;++c)f=1===c?"thisWired":"arg"+(c-2)+"Wired",null!==b[c].Da&&(a+=f+"_dtor("+f+"); // "+b[c].name+"\n",p.push(f+"_dtor"),d.push(b[c].Da));m&&(a+="var ret = retType.fromWireType(rv);\nreturn ret;\n");p.push(a+"}\n");return Fc(p).apply(null,d)}function Ic(a,b){for(var c=[],d=0;d<a;d++)c.push(C[(b>>2)+d]);return c}var Jc=[],Z=[{},{value:void 0},{value:null},{value:!0},{value:!1}];function Kc(a){4<a&&0===--Z[a].hb&&(Z[a]=void 0,Jc.push(a))}
|
58
|
+
var Lc=a=>{a||T("Cannot use deleted val. handle = "+a);return Z[a].value},uc=a=>{switch(a){case void 0:return 1;case null:return 2;case !0:return 3;case !1:return 4;default:var b=Jc.length?Jc.pop():Z.length;Z[b]={hb:1,value:a};return b}};
|
59
59
|
function Mc(a,b,c){switch(b){case 0:return function(d){return this.fromWireType((c?D:z)[d])};case 1:return function(d){return this.fromWireType((c?B:wa)[d>>1])};case 2:return function(d){return this.fromWireType((c?C:F)[d>>2])};default:throw new TypeError("Unknown integer type: "+a);}}function Nc(a,b){var c=S[a];void 0===c&&T(b+" has unknown type "+Ac(a));return c}function sc(a){if(null===a)return"null";var b=typeof a;return"object"===b||"array"===b||"function"===b?a.toString():""+a}
|
60
60
|
function Oc(a,b){switch(b){case 2:return function(c){return this.fromWireType(Da[c>>2])};case 3:return function(c){return this.fromWireType(Ea[c>>3])};default:throw new TypeError("Unknown float type: "+a);}}
|
61
61
|
function Pc(a,b,c){switch(b){case 0:return c?function(d){return D[d]}:function(d){return z[d]};case 1:return c?function(d){return B[d>>1]}:function(d){return wa[d>>1]};case 2:return c?function(d){return C[d>>2]}:function(d){return F[d>>2]};default:throw new TypeError("Unknown integer type: "+a);}}var Qc={};function Rc(a){var b=Qc[a];return void 0===b?R(a):b}var Sc=[];function Tc(){return"object"==typeof globalThis?globalThis:Function("return this")()}
|
62
|
-
function Uc(a){var b=Sc.length;Sc.push(a);return b}function Vc(a,b){for(var c=Array(a),d=0;d<a;++d)c[d]=Nc(
|
63
|
-
function Zc(){if(!$c){var a={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:ba||"./this.program"},b;for(b in Yc)void 0===Yc[b]?delete a[b]:a[b]=Yc[b];var c=[];for(b in a)c.push(b+"="+a[b]);$c=c}return $c}var $c;function ad(a,b){ad.
|
62
|
+
function Uc(a){var b=Sc.length;Sc.push(a);return b}function Vc(a,b){for(var c=Array(a),d=0;d<a;++d)c[d]=Nc(F[b+4*d>>2],"parameter "+d);return c}var Wc=[],Xc={},Yc={};
|
63
|
+
function Zc(){if(!$c){var a={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:ba||"./this.program"},b;for(b in Yc)void 0===Yc[b]?delete a[b]:a[b]=Yc[b];var c=[];for(b in a)c.push(b+"="+a[b]);$c=c}return $c}var $c;function ad(a,b){ad.sb||(ad.sb=ab());for(var c=0;c<b;c++)D[a+c>>0]=ad.sb();return 0}function bd(a){return 0===a%4&&(0!==a%100||0===a%400)}
|
64
64
|
var cd=[31,29,31,30,31,30,31,31,30,31,30,31],dd=[31,28,31,30,31,30,31,31,30,31,30,31];
|
65
65
|
function ed(a,b,c,d){function e(h,r,w){for(h="number"==typeof h?h.toString():h||"";h.length<r;)h=w[0]+h;return h}function f(h,r){return e(h,r,"0")}function k(h,r){function w(E){return 0>E?-1:0<E?1:0}var A;0===(A=w(h.getFullYear()-r.getFullYear()))&&0===(A=w(h.getMonth()-r.getMonth()))&&(A=w(h.getDate()-r.getDate()));return A}function l(h){switch(h.getDay()){case 0:return new Date(h.getFullYear()-1,11,29);case 1:return h;case 2:return new Date(h.getFullYear(),0,3);case 3:return new Date(h.getFullYear(),
|
66
|
-
0,2);case 4:return new Date(h.getFullYear(),0,1);case 5:return new Date(h.getFullYear()-1,11,31);case 6:return new Date(h.getFullYear()-1,11,30)}}function m(h){var r=h.
|
67
|
-
0,4));w=l(w);return 0>=k(r,h)?0>=k(w,h)?h.getFullYear()+1:h.getFullYear():h.getFullYear()-1}var p=C[d+40>>2];d={
|
68
|
-
"%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var q in p)c=c.replace(new RegExp(q,"g"),p[q]);var t="Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),v="January February March April May June July August September October November December".split(" ");p={"%a":function(h){return t[h.Ga].substring(0,3)},"%A":function(h){return t[h.Ga]},"%b":function(h){return v[h.
|
69
|
-
"%C":function(h){return f((h.
|
70
|
-
h
|
71
|
-
"%y":function(h){return(h.
|
72
|
-
function xb(a,b,c,d){a||(a=this);this.parent=a;this.Ha=a.Ha;this.
|
66
|
+
0,2);case 4:return new Date(h.getFullYear(),0,1);case 5:return new Date(h.getFullYear()-1,11,31);case 6:return new Date(h.getFullYear()-1,11,30)}}function m(h){var r=h.Na;for(h=new Date((new Date(h.Oa+1900,0,1)).getTime());0<r;){var w=h.getMonth(),A=(bd(h.getFullYear())?cd:dd)[w];if(r>A-h.getDate())r-=A-h.getDate()+1,h.setDate(1),11>w?h.setMonth(w+1):(h.setMonth(0),h.setFullYear(h.getFullYear()+1));else{h.setDate(h.getDate()+r);break}}w=new Date(h.getFullYear()+1,0,4);r=l(new Date(h.getFullYear(),
|
67
|
+
0,4));w=l(w);return 0>=k(r,h)?0>=k(w,h)?h.getFullYear()+1:h.getFullYear():h.getFullYear()-1}var p=C[d+40>>2];d={Pb:C[d>>2],Ob:C[d+4>>2],$a:C[d+8>>2],ib:C[d+12>>2],ab:C[d+16>>2],Oa:C[d+20>>2],Ga:C[d+24>>2],Na:C[d+28>>2],ac:C[d+32>>2],Nb:C[d+36>>2],Qb:p?y(p):""};c=y(c);p={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d",
|
68
|
+
"%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var q in p)c=c.replace(new RegExp(q,"g"),p[q]);var t="Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),v="January February March April May June July August September October November December".split(" ");p={"%a":function(h){return t[h.Ga].substring(0,3)},"%A":function(h){return t[h.Ga]},"%b":function(h){return v[h.ab].substring(0,3)},"%B":function(h){return v[h.ab]},
|
69
|
+
"%C":function(h){return f((h.Oa+1900)/100|0,2)},"%d":function(h){return f(h.ib,2)},"%e":function(h){return e(h.ib,2," ")},"%g":function(h){return m(h).toString().substring(2)},"%G":function(h){return m(h)},"%H":function(h){return f(h.$a,2)},"%I":function(h){h=h.$a;0==h?h=12:12<h&&(h-=12);return f(h,2)},"%j":function(h){for(var r=0,w=0;w<=h.ab-1;r+=(bd(h.Oa+1900)?cd:dd)[w++]);return f(h.ib+r,3)},"%m":function(h){return f(h.ab+1,2)},"%M":function(h){return f(h.Ob,2)},"%n":function(){return"\n"},"%p":function(h){return 0<=
|
70
|
+
h.$a&&12>h.$a?"AM":"PM"},"%S":function(h){return f(h.Pb,2)},"%t":function(){return"\t"},"%u":function(h){return h.Ga||7},"%U":function(h){return f(Math.floor((h.Na+7-h.Ga)/7),2)},"%V":function(h){var r=Math.floor((h.Na+7-(h.Ga+6)%7)/7);2>=(h.Ga+371-h.Na-2)%7&&r++;if(r)53==r&&(w=(h.Ga+371-h.Na)%7,4==w||3==w&&bd(h.Oa)||(r=1));else{r=52;var w=(h.Ga+7-h.Na-1)%7;(4==w||5==w&&bd(h.Oa%400-1))&&r++}return f(r,2)},"%w":function(h){return h.Ga},"%W":function(h){return f(Math.floor((h.Na+7-(h.Ga+6)%7)/7),2)},
|
71
|
+
"%y":function(h){return(h.Oa+1900).toString().substring(2)},"%Y":function(h){return h.Oa+1900},"%z":function(h){h=h.Nb;var r=0<=h;h=Math.abs(h)/60;return(r?"+":"-")+String("0000"+(h/60*100+h%60)).slice(-4)},"%Z":function(h){return h.Qb},"%%":function(){return"%"}};c=c.replace(/%%/g,"\x00\x00");for(q in p)c.includes(q)&&(c=c.replace(new RegExp(q,"g"),p[q](d)));c=c.replace(/\0\0/g,"%");q=gb(c,!1);if(q.length>b)return 0;D.set(q,a);return q.length-1}
|
72
|
+
function xb(a,b,c,d){a||(a=this);this.parent=a;this.Ha=a.Ha;this.Ya=null;this.id=qb++;this.name=b;this.mode=c;this.ua={};this.sa={};this.rdev=d}Object.defineProperties(xb.prototype,{read:{get:function(){return 365===(this.mode&365)},set:function(a){a?this.mode|=365:this.mode&=-366}},write:{get:function(){return 146===(this.mode&146)},set:function(a){a?this.mode|=146:this.mode&=-147}}});Kb();rb=Array(4096);Eb(K,"/");N("/tmp",16895,0);N("/home",16895,0);N("/home/web_user",16895,0);
|
73
73
|
(()=>{N("/dev",16895,0);eb(259,{read:()=>0,write:(b,c,d,e)=>e});Fb("/dev/null",259);db(1280,hb);db(1536,ib);Fb("/dev/tty",1280);Fb("/dev/tty1",1536);var a=ab();Ob("random",a);Ob("urandom",a);N("/dev/shm",16895,0);N("/dev/shm/tmp",16895,0)})();
|
74
|
-
(()=>{N("/proc",16895,0);var a=N("/proc/self",16895,0);N("/proc/self/fd",16895,0);Eb({Ha:()=>{var b=kb(a,"fd",16895,73);b.ua={lookup:(c,d)=>{var e=L[+d];if(!e)throw new J(8);c={parent:null,Ha:{
|
75
|
-
V.prototype.isAliasOf=function(a){if(!(this instanceof V&&a instanceof V))return!1;var b=this.ra.ya.wa,c=this.ra.va,d=a.ra.ya.wa;for(a=a.ra.va;b.Ca;)c=b.
|
76
|
-
V.prototype.clone=function(){this.ra.va||ac(this);if(this.ra.
|
77
|
-
V.prototype.isDeleted=function(){return!this.ra.va};V.prototype.deleteLater=function(){this.ra.va||ac(this);this.ra.
|
78
|
-
W.prototype.
|
79
|
-
W.prototype.fromWireType=function(a){function b(){return this.
|
74
|
+
(()=>{N("/proc",16895,0);var a=N("/proc/self",16895,0);N("/proc/self/fd",16895,0);Eb({Ha:()=>{var b=kb(a,"fd",16895,73);b.ua={lookup:(c,d)=>{var e=L[+d];if(!e)throw new J(8);c={parent:null,Ha:{rb:"fake"},ua:{readlink:()=>e.path}};return c.parent=c}};return b}},"/proc/self/fd")})();for(var fd=Array(256),gd=0;256>gd;++gd)fd[gd]=String.fromCharCode(gd);Rb=fd;Xb=g.BindingError=Wb("BindingError");Yb=g.InternalError=Wb("InternalError");
|
75
|
+
V.prototype.isAliasOf=function(a){if(!(this instanceof V&&a instanceof V))return!1;var b=this.ra.ya.wa,c=this.ra.va,d=a.ra.ya.wa;for(a=a.ra.va;b.Ca;)c=b.Ua(c),b=b.Ca;for(;d.Ca;)a=d.Ua(a),d=d.Ca;return b===d&&c===a};
|
76
|
+
V.prototype.clone=function(){this.ra.va||ac(this);if(this.ra.Ta)return this.ra.count.value+=1,this;var a=mc,b=Object,c=b.create,d=Object.getPrototypeOf(this),e=this.ra;a=a(c.call(b,d,{ra:{value:{count:e.count,Qa:e.Qa,Ta:e.Ta,va:e.va,ya:e.ya,Aa:e.Aa,Ba:e.Ba}}}));a.ra.count.value+=1;a.ra.Qa=!1;return a};V.prototype["delete"]=function(){this.ra.va||ac(this);this.ra.Qa&&!this.ra.Ta&&T("Object already scheduled for deletion");cc(this);dc(this.ra);this.ra.Ta||(this.ra.Aa=void 0,this.ra.va=void 0)};
|
77
|
+
V.prototype.isDeleted=function(){return!this.ra.va};V.prototype.deleteLater=function(){this.ra.va||ac(this);this.ra.Qa&&!this.ra.Ta&&T("Object already scheduled for deletion");gc.push(this);1===gc.length&&ic&&ic(hc);this.ra.Qa=!0;return this};g.getInheritedInstanceCount=function(){return Object.keys(jc).length};g.getLiveInheritedInstances=function(){var a=[],b;for(b in jc)jc.hasOwnProperty(b)&&a.push(jc[b]);return a};g.flushPendingDeletes=hc;g.setDelayFunction=function(a){ic=a;gc.length&&ic&&ic(hc)};
|
78
|
+
W.prototype.yb=function(a){this.tb&&(a=this.tb(a));return a};W.prototype.lb=function(a){this.Ma&&this.Ma(a)};W.prototype.argPackAdvance=8;W.prototype.readValueFromPointer=wc;W.prototype.deleteObject=function(a){if(null!==a)a["delete"]()};
|
79
|
+
W.prototype.fromWireType=function(a){function b(){return this.Wa?lc(this.wa.Ra,{ya:this.Eb,va:c,Ba:this,Aa:a}):lc(this.wa.Ra,{ya:this,va:a})}var c=this.yb(a);if(!c)return this.lb(a),null;var d=kc(this.wa,c);if(void 0!==d){if(0===d.ra.count.value)return d.ra.va=c,d.ra.Aa=a,d.clone();d=d.clone();this.lb(a);return d}d=this.wa.xb(c);d=fc[d];if(!d)return b.call(this);d=this.Va?d.vb:d.pointerType;var e=ec(c,this.wa,d.wa);return null===e?b.call(this):this.Wa?lc(d.wa.Ra,{ya:d,va:e,Ba:this,Aa:a}):lc(d.wa.Ra,
|
80
80
|
{ya:d,va:e})};zc=g.UnboundTypeError=Wb("UnboundTypeError");g.count_emval_handles=function(){for(var a=0,b=5;b<Z.length;++b)void 0!==Z[b]&&++a;return a};g.get_first_emval=function(){for(var a=5;a<Z.length;++a)if(void 0!==Z[a])return Z[a];return null};function gb(a,b){var c=Array(ta(a)+1);a=sa(a,c,0,c.length);b&&(c.length=a);return c}
|
81
|
-
var kd={a:function(a,b,c,d){x("Assertion failed: "+y(a)+", at: "+[b?y(b):"unknown filename",c,d?y(d):"unknown function"])},b:function(a){return hd(a+24)+24},d:function(a,b,c){(new Va(a)).
|
82
|
-
typeof O||!(f instanceof J))throw f;return-f.
|
83
|
-
typeof O||!(f instanceof J))throw f;return-f.
|
84
|
-
readValueFromPointer:function(k){if(1===c)var l=D;else if(2===c)l=B;else if(4===c)l=C;else throw new TypeError("Unknown boolean type size: "+b);return this.fromWireType(l[k>>f])},Da:null})},g:function(a,b,c,d,e,f,k,l,m,p,q,t,v){q=R(q);f=X(e,f);l&&(l=X(k,l));p&&(p=X(m,p));v=X(t,v);var h=Ub(q);oc(h,function(){Ec("Cannot construct "+q+" due to unbound types",[d])});$b([a,b,c],d?[d]:[],function(r){r=r[0];if(d){var w=r.wa;var A=w.
|
85
|
-
E)throw new Xb("Use 'new' to construct "+q);if(void 0===da.
|
86
|
-
new W(q+" const*",da,!1,!0);fc[a]={pointerType:A,
|
87
|
-
return[]})},e:function(a,b,c,d,e,f,k,l){var m=Ic(c,d);b=R(b);f=X(e,f);$b([],[a],function(p){function q(){Ec("Cannot call "+t+" due to unbound types",m)}p=p[0];var t=p.name+"."+b;b.startsWith("@@")&&(b=Symbol[b.substring(2)]);l&&p.wa.
|
81
|
+
var kd={a:function(a,b,c,d){x("Assertion failed: "+y(a)+", at: "+[b?y(b):"unknown filename",c,d?y(d):"unknown function"])},b:function(a){return hd(a+24)+24},d:function(a,b,c){(new Va(a)).Ia(b,c);Wa++;throw a;},u:function(a,b,c){Pb=c;try{var d=Q(a);switch(b){case 0:var e=P();return 0>e?-28:Db(d,e).fd;case 1:case 2:return 0;case 3:return d.flags;case 4:return e=P(),d.flags|=e,0;case 5:return e=P(),B[e+0>>1]=2,0;case 6:case 7:return 0;case 16:case 8:return-28;case 9:return C[jd()>>2]=28,-1;default:return-28}}catch(f){if("undefined"==
|
82
|
+
typeof O||!(f instanceof J))throw f;return-f.Ja}},H:function(a,b,c){Pb=c;try{var d=Q(a);switch(b){case 21509:case 21505:return d.tty?0:-59;case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:return d.tty?0:-59;case 21519:if(!d.tty)return-59;var e=P();return C[e>>2]=0;case 21520:return d.tty?-28:-59;case 21531:a=e=P();if(!d.sa.Ab)throw new J(59);return d.sa.Ab(d,b,a);case 21523:return d.tty?0:-59;case 21524:return d.tty?0:-59;default:x("bad ioctl syscall "+b)}}catch(f){if("undefined"==
|
83
|
+
typeof O||!(f instanceof J))throw f;return-f.Ja}},t:function(a,b,c,d){Pb=d;try{b=y(b);var e=b;if("/"===e.charAt(0))b=e;else{if(-100===a)var f="/";else{var k=L[a];if(!k)throw new J(8);f=k.path}if(0==e.length)throw new J(44);b=Ya(f+"/"+e)}var l=d?P():0;return Ib(b,c,l).fd}catch(m){if("undefined"==typeof O||!(m instanceof J))throw m;return-m.Ja}},C:function(){},N:function(a,b,c,d,e){var f=Qb(c);b=R(b);U(a,{name:b,fromWireType:function(k){return!!k},toWireType:function(k,l){return l?d:e},argPackAdvance:8,
|
84
|
+
readValueFromPointer:function(k){if(1===c)var l=D;else if(2===c)l=B;else if(4===c)l=C;else throw new TypeError("Unknown boolean type size: "+b);return this.fromWireType(l[k>>f])},Da:null})},g:function(a,b,c,d,e,f,k,l,m,p,q,t,v){q=R(q);f=X(e,f);l&&(l=X(k,l));p&&(p=X(m,p));v=X(t,v);var h=Ub(q);oc(h,function(){Ec("Cannot construct "+q+" due to unbound types",[d])});$b([a,b,c],d?[d]:[],function(r){r=r[0];if(d){var w=r.wa;var A=w.Ra}else A=V.prototype;r=Vb(h,function(){if(Object.getPrototypeOf(this)!==
|
85
|
+
E)throw new Xb("Use 'new' to construct "+q);if(void 0===da.Ia)throw new Xb(q+" has no accessible constructor");var Cc=da.Ia[arguments.length];if(void 0===Cc)throw new Xb("Tried to invoke ctor of "+q+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(da.Ia).toString()+") parameters instead!");return Cc.apply(this,arguments)});var E=Object.create(A,{constructor:{value:r}});r.prototype=E;var da=new pc(q,r,E,v,w,f,l,p);w=new W(q,da,!0,!1);A=new W(q+"*",da,!1,!1);var Dc=
|
86
|
+
new W(q+" const*",da,!1,!0);fc[a]={pointerType:A,vb:Dc};xc(h,r);return[w,A,Dc]})},f:function(a,b,c,d,e,f,k){var l=Ic(c,d);b=R(b);f=X(e,f);$b([],[a],function(m){function p(){Ec("Cannot call "+q+" due to unbound types",l)}m=m[0];var q=m.name+"."+b;b.startsWith("@@")&&(b=Symbol[b.substring(2)]);var t=m.wa.constructor;void 0===t[b]?(p.Pa=c-1,t[b]=p):(nc(t,b,q),t[b].za[c-1]=p);$b([],l,function(v){v=[v[0],null].concat(v.slice(1));v=Hc(q,v,null,f,k);void 0===t[b].za?(v.Pa=c-1,t[b]=v):t[b].za[c-1]=v;return[]});
|
87
|
+
return[]})},e:function(a,b,c,d,e,f,k,l){var m=Ic(c,d);b=R(b);f=X(e,f);$b([],[a],function(p){function q(){Ec("Cannot call "+t+" due to unbound types",m)}p=p[0];var t=p.name+"."+b;b.startsWith("@@")&&(b=Symbol[b.substring(2)]);l&&p.wa.Fb.push(b);var v=p.wa.Ra,h=v[b];void 0===h||void 0===h.za&&h.className!==p.name&&h.Pa===c-2?(q.Pa=c-2,q.className=p.name,v[b]=q):(nc(v,b,t),v[b].za[c-2]=q);$b([],m,function(r){r=Hc(t,r,p,f,k);void 0===v[b].za?(r.Pa=c-2,v[b]=r):v[b].za[c-2]=r;return[]});return[]})},M:function(a,
|
88
88
|
b){b=R(b);U(a,{name:b,fromWireType:function(c){var d=Lc(c);Kc(c);return d},toWireType:function(c,d){return uc(d)},argPackAdvance:8,readValueFromPointer:wc,Da:null})},j:function(a,b,c,d){function e(){}c=Qb(c);b=R(b);e.values={};U(a,{name:b,constructor:e,fromWireType:function(f){return this.constructor.values[f]},toWireType:function(f,k){return k.value},argPackAdvance:8,readValueFromPointer:Mc(b,c,d),Da:null});oc(b,e)},c:function(a,b,c){var d=Nc(a,"enum");b=R(b);a=d.constructor;d=Object.create(d.constructor.prototype,
|
89
89
|
{value:{value:c},constructor:{value:Vb(d.name+"_"+b,function(){})}});a.values[c]=d;a[b]=d},x:function(a,b,c){c=Qb(c);b=R(b);U(a,{name:b,fromWireType:function(d){return d},toWireType:function(d,e){return e},argPackAdvance:8,readValueFromPointer:Oc(b,c),Da:null})},q:function(a,b,c,d,e,f){var k=Ic(b,c);a=R(a);e=X(d,e);oc(a,function(){Ec("Cannot call "+a+" due to unbound types",k)},b-1);$b([],k,function(l){l=[l[0],null].concat(l.slice(1));xc(a,Hc(a,l,null,e,f),b-1);return[]})},l:function(a,b,c,d,e){b=
|
90
90
|
R(b);-1===e&&(e=4294967295);e=Qb(c);var f=l=>l;if(0===d){var k=32-8*c;f=l=>l<<k>>>k}c=b.includes("unsigned")?function(l,m){return m>>>0}:function(l,m){return m};U(a,{name:b,fromWireType:f,toWireType:c,argPackAdvance:8,readValueFromPointer:Pc(b,e,0!==d),Da:null})},h:function(a,b,c){function d(f){f>>=2;var k=F;return new e(Ca,k[f+1],k[f])}var e=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][b];c=R(c);U(a,{name:c,fromWireType:d,argPackAdvance:8,readValueFromPointer:d},
|
91
|
-
{
|
91
|
+
{zb:!0})},w:function(a,b){b=R(b);var c="std::string"===b;U(a,{name:b,fromWireType:function(d){var e=F[d>>2];if(c)for(var f=d+4,k=0;k<=e;++k){var l=d+4+k;if(k==e||0==z[l]){f=y(f,l-f);if(void 0===m)var m=f;else m+=String.fromCharCode(0),m+=f;f=l+1}}else{m=Array(e);for(k=0;k<e;++k)m[k]=String.fromCharCode(z[d+4+k]);m=m.join("")}Y(d);return m},toWireType:function(d,e){e instanceof ArrayBuffer&&(e=new Uint8Array(e));var f="string"==typeof e;f||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof
|
92
92
|
Int8Array||T("Cannot pass non-string to std::string");var k=(c&&f?()=>ta(e):()=>e.length)(),l=hd(4+k+1);F[l>>2]=k;if(c&&f)sa(e,z,l+4,k+1);else if(f)for(f=0;f<k;++f){var m=e.charCodeAt(f);255<m&&(Y(l),T("String has UTF-16 code units that do not fit in 8 bits"));z[l+4+f]=m}else for(f=0;f<k;++f)z[l+4+f]=e[f];null!==d&&d.push(Y,l);return l},argPackAdvance:8,readValueFromPointer:wc,Da:function(d){Y(d)}})},p:function(a,b,c){c=R(c);if(2===b){var d=va;var e=xa;var f=ya;var k=()=>wa;var l=1}else 4===b&&(d=
|
93
|
-
za,e=Aa,f=Ba,k=()=>F,l=2);U(a,{name:c,fromWireType:function(m){for(var p=F[m>>2],q=k(),t,v=m+4,h=0;h<=p;++h){var r=m+4+h*b;if(h==p||0==q[r>>l])v=d(v,r-v),void 0===t?t=v:(t+=String.fromCharCode(0),t+=v),v=r+b}Y(m);return t},toWireType:function(m,p){"string"!=typeof p&&T("Cannot pass non-string to C++ string type "+c);var q=f(p),t=hd(4+q+b);F[t>>2]=q>>l;e(p,t+4,q+b);null!==m&&m.push(Y,t);return t},argPackAdvance:8,readValueFromPointer:wc,Da:function(m){Y(m)}})},O:function(a,b){b=R(b);U(a,{
|
93
|
+
za,e=Aa,f=Ba,k=()=>F,l=2);U(a,{name:c,fromWireType:function(m){for(var p=F[m>>2],q=k(),t,v=m+4,h=0;h<=p;++h){var r=m+4+h*b;if(h==p||0==q[r>>l])v=d(v,r-v),void 0===t?t=v:(t+=String.fromCharCode(0),t+=v),v=r+b}Y(m);return t},toWireType:function(m,p){"string"!=typeof p&&T("Cannot pass non-string to C++ string type "+c);var q=f(p),t=hd(4+q+b);F[t>>2]=q>>l;e(p,t+4,q+b);null!==m&&m.push(Y,t);return t},argPackAdvance:8,readValueFromPointer:wc,Da:function(m){Y(m)}})},O:function(a,b){b=R(b);U(a,{Bb:!0,name:b,
|
94
94
|
argPackAdvance:0,fromWireType:function(){},toWireType:function(){}})},v:function(){return Date.now()},K:function(){return!0},P:function(a,b,c,d){a=Sc[a];b=Lc(b);c=Rc(c);a(b,c,null,d)},i:Kc,z:function(a){if(0===a)return uc(Tc());a=Rc(a);return uc(Tc()[a])},Q:function(a,b){var c=Vc(a,b),d=c[0];b=d.name+"_$"+c.slice(1).map(function(q){return q.name}).join("_")+"$";var e=Wc[b];if(void 0!==e)return e;e=["retType"];for(var f=[d],k="",l=0;l<a-1;++l)k+=(0!==l?", ":"")+"arg"+l,e.push("argType"+l),f.push(c[1+
|
95
|
-
l]);var m="return function "+Ub("methodCaller_"+b)+"(handle, name, destructors, args) {\n",p=0;for(l=0;l<a-1;++l)m+=" var arg"+l+" = argType"+l+".readValueFromPointer(args"+(p?"+"+p:"")+");\n",p+=c[l+1].argPackAdvance;m+=" var rv = handle[name]("+k+");\n";for(l=0;l<a-1;++l)c[l+1].deleteObject&&(m+=" argType"+l+".deleteObject(arg"+l+");\n");d.
|
95
|
+
l]);var m="return function "+Ub("methodCaller_"+b)+"(handle, name, destructors, args) {\n",p=0;for(l=0;l<a-1;++l)m+=" var arg"+l+" = argType"+l+".readValueFromPointer(args"+(p?"+"+p:"")+");\n",p+=c[l+1].argPackAdvance;m+=" var rv = handle[name]("+k+");\n";for(l=0;l<a-1;++l)c[l+1].deleteObject&&(m+=" argType"+l+".deleteObject(arg"+l+");\n");d.Bb||(m+=" return retType.toWireType(destructors, rv);\n");e.push(m+"};\n");a=Fc(e).apply(null,f);e=Uc(a);return Wc[b]=e},k:function(a){4<a&&(Z[a].hb+=
|
96
96
|
1)},y:function(a,b,c,d){a=Lc(a);var e=Xc[b];if(!e){e="";for(var f=0;f<b;++f)e+=(0!==f?", ":"")+"arg"+f;var k="return function emval_allocator_"+b+"(constructor, argTypes, args) {\n";for(f=0;f<b;++f)k+="var argType"+f+" = requireRegisteredType(Module['HEAP32'][(argTypes >>> 2) + "+f+'], "parameter '+f+'");\nvar arg'+f+" = argType"+f+".readValueFromPointer(args);\nargs += argType"+f+"['argPackAdvance'];\n";e=(new Function("requireRegisteredType","Module","valueToHandle",k+("var obj = new constructor("+
|
97
|
-
e+");\nreturn valueToHandle(obj);\n}\n")))(Nc,g,uc);Xc[b]=e}return e(a,c,d)},A:function(a,b){a=Nc(a,"_emval_take_value");a=a.readValueFromPointer(b);return uc(a)},J:function(a,b,c,d,e,f){try{var k=L[e];if(k&&c&2){var l=z.slice(a,a+b);k&&k.sa.
|
97
|
+
e+");\nreturn valueToHandle(obj);\n}\n")))(Nc,g,uc);Xc[b]=e}return e(a,c,d)},A:function(a,b){a=Nc(a,"_emval_take_value");a=a.readValueFromPointer(b);return uc(a)},J:function(a,b,c,d,e,f){try{var k=L[e];if(k&&c&2){var l=z.slice(a,a+b);k&&k.sa.Za&&k.sa.Za(k,l,f,b,d)}}catch(m){if("undefined"==typeof O||!(m instanceof J))throw m;return-m.Ja}},n:function(){x("")},L:function(a,b,c){z.copyWithin(a,b,b+c)},I:function(a){var b=z.length;a>>>=0;if(2147483648<a)return!1;for(var c=1;4>=c;c*=2){var d=b*(1+.2/c);
|
98
98
|
d=Math.min(d,a+100663296);var e=Math;d=Math.max(a,d);e=e.min.call(e,2147483648,d+(65536-d%65536)%65536);a:{try{oa.grow(e-Ca.byteLength+65535>>>16);Fa();var f=1;break a}catch(k){}f=void 0}if(f)return!0}return!1},F:function(a,b){var c=0;Zc().forEach(function(d,e){var f=b+c;e=F[a+4*e>>2]=f;for(f=0;f<d.length;++f)D[e++>>0]=d.charCodeAt(f);D[e>>0]=0;c+=d.length+1});return 0},G:function(a,b){var c=Zc();F[a>>2]=c.length;var d=0;c.forEach(function(e){d+=e.length+1});F[b>>2]=d;return 0},o:function(a){try{var b=
|
99
|
-
Q(a);if(null===b.fd)throw new J(8);b.
|
100
|
-
var h="undefined"!=typeof t;if(!h)t=m.position;else if(!m.seekable)throw new J(70);var r=m.sa.read(m,v,p,q,t);h||(m.position+=r);var w=r;if(0>w){var A=-1;break a}b+=w;if(w<l)break}A=b}C[d>>2]=A;return 0}catch(E){if("undefined"==typeof O||!(E instanceof J))throw E;return E.
|
101
|
-
0)>>>0:~~+Math.ceil((I-+(~~I>>>0))/4294967296)>>>0:0)];C[e>>2]=Ra[0];C[e+4>>2]=Ra[1];f.
|
102
|
-
m.seekable&&m.flags&1024&&Jb(m,0,2);var h="undefined"!=typeof t;if(!h)t=m.position;else if(!m.seekable)throw new J(70);var r=m.sa.write(m,v,p,q,t,void 0);h||(m.position+=r);var w=r;if(0>w){var A=-1;break a}b+=w}A=b}F[d>>2]=A;return 0}catch(E){if("undefined"==typeof O||!(E instanceof J))throw E;return E.
|
99
|
+
Q(a);if(null===b.fd)throw new J(8);b.cb&&(b.cb=null);try{b.sa.close&&b.sa.close(b)}catch(c){throw c;}finally{L[b.fd]=null}b.fd=null;return 0}catch(c){if("undefined"==typeof O||!(c instanceof J))throw c;return c.Ja}},s:function(a,b,c,d){try{a:{var e=Q(a);a=b;for(var f=b=0;f<c;f++){var k=F[a>>2],l=F[a+4>>2];a+=8;var m=e,p=k,q=l,t=void 0,v=D;if(0>q||0>t)throw new J(28);if(null===m.fd)throw new J(8);if(1===(m.flags&2097155))throw new J(8);if(16384===(m.node.mode&61440))throw new J(31);if(!m.sa.read)throw new J(28);
|
100
|
+
var h="undefined"!=typeof t;if(!h)t=m.position;else if(!m.seekable)throw new J(70);var r=m.sa.read(m,v,p,q,t);h||(m.position+=r);var w=r;if(0>w){var A=-1;break a}b+=w;if(w<l)break}A=b}C[d>>2]=A;return 0}catch(E){if("undefined"==typeof O||!(E instanceof J))throw E;return E.Ja}},B:function(a,b,c,d,e){try{b=c+2097152>>>0<4194305-!!b?(b>>>0)+4294967296*c:NaN;if(isNaN(b))return 61;var f=Q(a);Jb(f,b,d);Ra=[f.position>>>0,(I=f.position,1<=+Math.abs(I)?0<I?(Math.min(+Math.floor(I/4294967296),4294967295)|
|
101
|
+
0)>>>0:~~+Math.ceil((I-+(~~I>>>0))/4294967296)>>>0:0)];C[e>>2]=Ra[0];C[e+4>>2]=Ra[1];f.cb&&0===b&&0===d&&(f.cb=null);return 0}catch(k){if("undefined"==typeof O||!(k instanceof J))throw k;return k.Ja}},r:function(a,b,c,d){try{a:{var e=Q(a);a=b;for(var f=b=0;f<c;f++){var k=F[a>>2],l=F[a+4>>2];a+=8;var m=e,p=k,q=l,t=void 0,v=D;if(0>q||0>t)throw new J(28);if(null===m.fd)throw new J(8);if(0===(m.flags&2097155))throw new J(8);if(16384===(m.node.mode&61440))throw new J(31);if(!m.sa.write)throw new J(28);
|
102
|
+
m.seekable&&m.flags&1024&&Jb(m,0,2);var h="undefined"!=typeof t;if(!h)t=m.position;else if(!m.seekable)throw new J(70);var r=m.sa.write(m,v,p,q,t,void 0);h||(m.position+=r);var w=r;if(0>w){var A=-1;break a}b+=w}A=b}F[d>>2]=A;return 0}catch(E){if("undefined"==typeof O||!(E instanceof J))throw E;return E.Ja}},D:ad,m:function(){},E:function(a,b,c,d){return ed(a,b,c,d)}};
|
103
103
|
(function(){function a(e){g.asm=e.exports;oa=g.asm.R;Fa();Ga=g.asm.T;Ia.unshift(g.asm.S);G--;g.monitorRunDependencies&&g.monitorRunDependencies(G);0==G&&(null!==La&&(clearInterval(La),La=null),Ma&&(e=Ma,Ma=null,e()))}function b(e){a(e.instance)}function c(e){return Qa().then(function(f){return WebAssembly.instantiate(f,d)}).then(function(f){return f}).then(e,function(f){u("failed to asynchronously prepare wasm: "+f);x(f)})}var d={a:kd};G++;g.monitorRunDependencies&&g.monitorRunDependencies(G);if(g.instantiateWasm)try{return g.instantiateWasm(d,
|
104
|
-
a)}catch(e){return u("Module.instantiateWasm callback failed with error: "+e),!1}(function(){return na||"function"!=typeof WebAssembly.instantiateStreaming||Na()||H.startsWith("file://")||"function"!=typeof fetch?c(b):fetch(H,{credentials:"same-origin"}).then(function(e){return WebAssembly.instantiateStreaming(e,d).then(b,function(f){u("wasm streaming compile failed: "+f);u("falling back to ArrayBuffer instantiation");return c(b)})})})();return{}})();
|
104
|
+
a)}catch(e){return u("Module.instantiateWasm callback failed with error: "+e),!1}(function(){return na||"function"!=typeof WebAssembly.instantiateStreaming||Na()||H.startsWith("file://")||fa||"function"!=typeof fetch?c(b):fetch(H,{credentials:"same-origin"}).then(function(e){return WebAssembly.instantiateStreaming(e,d).then(b,function(f){u("wasm streaming compile failed: "+f);u("falling back to ArrayBuffer instantiation");return c(b)})})})();return{}})();
|
105
105
|
g.___wasm_call_ctors=function(){return(g.___wasm_call_ctors=g.asm.S).apply(null,arguments)};var Y=g._free=function(){return(Y=g._free=g.asm.U).apply(null,arguments)},hd=g._malloc=function(){return(hd=g._malloc=g.asm.V).apply(null,arguments)},jd=g.___errno_location=function(){return(jd=g.___errno_location=g.asm.W).apply(null,arguments)},Bc=g.___getTypeName=function(){return(Bc=g.___getTypeName=g.asm.X).apply(null,arguments)};
|
106
106
|
g.___embind_register_native_and_builtin_types=function(){return(g.___embind_register_native_and_builtin_types=g.asm.Y).apply(null,arguments)};var nb=g._emscripten_builtin_memalign=function(){return(nb=g._emscripten_builtin_memalign=g.asm.Z).apply(null,arguments)};g.___cxa_is_pointer_type=function(){return(g.___cxa_is_pointer_type=g.asm._).apply(null,arguments)};g.dynCall_jii=function(){return(g.dynCall_jii=g.asm.$).apply(null,arguments)};
|
107
107
|
g.dynCall_ji=function(){return(g.dynCall_ji=g.asm.aa).apply(null,arguments)};g.dynCall_iiji=function(){return(g.dynCall_iiji=g.asm.ba).apply(null,arguments)};g.dynCall_iiiji=function(){return(g.dynCall_iiiji=g.asm.ca).apply(null,arguments)};g.dynCall_jiii=function(){return(g.dynCall_jiii=g.asm.da).apply(null,arguments)};g.dynCall_jiiii=function(){return(g.dynCall_jiiii=g.asm.ea).apply(null,arguments)};g.dynCall_iiij=function(){return(g.dynCall_iiij=g.asm.fa).apply(null,arguments)};
|
Binary file
|
package/package.json
CHANGED
@@ -1,17 +1,19 @@
|
|
1
1
|
{
|
2
2
|
"name": "@trustwallet/wallet-core",
|
3
|
-
"version": "2.9.
|
3
|
+
"version": "2.9.6",
|
4
4
|
"description": "wallet core wasm and protobuf models",
|
5
5
|
"main": "dist/index.js",
|
6
6
|
"types": "dist/index.d.ts",
|
7
7
|
"scripts": {
|
8
|
-
"test": "mocha
|
8
|
+
"test": "mocha",
|
9
9
|
"generate": "npm run codegen:js && npm run codegen:ts",
|
10
10
|
"codegen:js": "pbjs -t static-module '../src/proto/*.proto' --no-delimited --force-long -o generated/core_proto.js",
|
11
|
+
"codegen:js-browser": "pbjs -t static-module '../src/proto/*.proto' -w closure --no-delimited --force-long -o ../samples/wasm/core_proto.js",
|
11
12
|
"codegen:ts": "pbts -o generated/core_proto.d.ts generated/core_proto.js",
|
12
13
|
"clean": "rm -rf dist generated && mkdir -p dist/generated generated",
|
13
|
-
"build": "npm run clean && npm run generate && cp -R generated lib dist && tsc
|
14
|
-
"copy:wasm": "mkdir -p lib && cp ../wasm-build/wasm/wallet-core.* lib"
|
14
|
+
"build": "npm run clean && npm run generate && cp -R generated lib dist && tsc",
|
15
|
+
"copy:wasm": "mkdir -p lib && cp ../wasm-build/wasm/wallet-core.* lib",
|
16
|
+
"copy:wasm-sample": "cp ../wasm-build/wasm/wallet-core.* ../samples/wasm/"
|
15
17
|
},
|
16
18
|
"repository": {
|
17
19
|
"type": "git",
|
@@ -27,7 +29,7 @@
|
|
27
29
|
"dist"
|
28
30
|
],
|
29
31
|
"dependencies": {
|
30
|
-
"protobufjs": "
|
32
|
+
"protobufjs": ">=6.11.3"
|
31
33
|
},
|
32
34
|
"devDependencies": {
|
33
35
|
"@types/chai": "^4.3.0",
|