@airgap/icp 0.13.15-beta.1 → 0.13.15-beta.11
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/package.json +8 -6
- package/v1/block-explorer/ICPBlockExplorer.d.ts +1 -1
- package/v1/block-explorer/ICPBlockExplorer.js +16 -49
- package/v1/block-explorer/ICPBlockExplorer.js.map +1 -1
- package/v1/index.d.ts +3 -2
- package/v1/index.js +9 -5
- package/v1/index.js.map +1 -1
- package/v1/module/ICPModule.d.ts +2 -4
- package/v1/module/ICPModule.js +53 -94
- package/v1/module/ICPModule.js.map +1 -1
- package/v1/module.js +1 -1
- package/v1/module.js.map +1 -1
- package/v1/protocol/ICPGovernance.d.ts +39 -0
- package/v1/protocol/ICPGovernance.js +1177 -0
- package/v1/protocol/ICPGovernance.js.map +1 -0
- package/v1/protocol/ICPImplementation.d.ts +30 -5
- package/v1/protocol/ICPImplementation.js +317 -252
- package/v1/protocol/ICPImplementation.js.map +1 -1
- package/v1/protocol/ICPProtocol.d.ts +60 -8
- package/v1/protocol/ICPProtocol.js +765 -320
- package/v1/protocol/ICPProtocol.js.map +1 -1
- package/v1/protocol/icrc/CkBTCProtocol.js +138 -225
- package/v1/protocol/icrc/CkBTCProtocol.js.map +1 -1
- package/v1/protocol/icrc/ICRC1Protocol.d.ts +4 -4
- package/v1/protocol/icrc/ICRC1Protocol.js +338 -553
- package/v1/protocol/icrc/ICRC1Protocol.js.map +1 -1
- package/v1/serializer/v3/schemas/converter/transaction-converter.js +48 -5
- package/v1/serializer/v3/schemas/converter/transaction-converter.js.map +1 -1
- package/v1/serializer/v3/schemas/definitions/transaction-sign-request-icp.d.ts +8 -2
- package/v1/serializer/v3/schemas/generated/transaction-sign-request-icp.json +31 -1
- package/v1/serializer/v3/serializer-companion.js +85 -144
- package/v1/serializer/v3/serializer-companion.js.map +1 -1
- package/v1/serializer/v3/validators/transaction-validator.js +22 -60
- package/v1/serializer/v3/validators/transaction-validator.js.map +1 -1
- package/v1/serializer/v3/validators/validators.js +19 -58
- package/v1/serializer/v3/validators/validators.js.map +1 -1
- package/v1/types/governance.d.ts +29 -0
- package/v1/types/governance.js +279 -210
- package/v1/types/governance.js.map +1 -1
- package/v1/types/icrc/ledger.js +22 -23
- package/v1/types/icrc/ledger.js.map +1 -1
- package/v1/types/ledger.d.ts +1 -0
- package/v1/types/ledger.js +37 -38
- package/v1/types/ledger.js.map +1 -1
- package/v1/types/management_idl.js +6 -7
- package/v1/types/management_idl.js.map +1 -1
- package/v1/types/protocol.d.ts +2 -1
- package/v1/types/transaction.d.ts +22 -3
- package/v1/types/transaction.js +38 -0
- package/v1/types/transaction.js.map +1 -1
- package/v1/utils/account.js +42 -70
- package/v1/utils/account.js.map +1 -1
- package/v1/utils/actor.js +139 -322
- package/v1/utils/actor.js.map +1 -1
- package/v1/utils/auth.js +44 -134
- package/v1/utils/auth.js.map +1 -1
- package/v1/utils/bls.js +41 -109
- package/v1/utils/bls.js.map +1 -1
- package/v1/utils/buffer.js +47 -111
- package/v1/utils/buffer.js.map +1 -1
- package/v1/utils/cbor.js +50 -85
- package/v1/utils/cbor.js.map +1 -1
- package/v1/utils/certificate.js +116 -238
- package/v1/utils/certificate.js.map +1 -1
- package/v1/utils/convert.d.ts +1 -1
- package/v1/utils/convert.js +29 -49
- package/v1/utils/convert.js.map +1 -1
- package/v1/utils/der.js +37 -35
- package/v1/utils/der.js.map +1 -1
- package/v1/utils/errors.js +10 -30
- package/v1/utils/errors.js.map +1 -1
- package/v1/utils/hdkey.js +33 -33
- package/v1/utils/hdkey.js.map +1 -1
- package/v1/utils/http.d.ts +1 -1
- package/v1/utils/http.js +202 -426
- package/v1/utils/http.js.map +1 -1
- package/v1/utils/icrc1.js +24 -41
- package/v1/utils/icrc1.js.map +1 -1
- package/v1/utils/idl.js +780 -1159
- package/v1/utils/idl.js.map +1 -1
- package/v1/utils/json.d.ts +1 -0
- package/v1/utils/json.js +19 -0
- package/v1/utils/json.js.map +1 -0
- package/v1/utils/leb128.js +29 -30
- package/v1/utils/leb128.js.map +1 -1
- package/v1/utils/polling.js +84 -234
- package/v1/utils/polling.js.map +1 -1
- package/v1/utils/principal.js +78 -126
- package/v1/utils/principal.js.map +1 -1
- package/v1/utils/secp256k1.js +68 -134
- package/v1/utils/secp256k1.js.map +1 -1
- package/v1/utils/transaction.js +7 -7
- package/v1/utils/transaction.js.map +1 -1
package/v1/utils/principal.js
CHANGED
|
@@ -1,48 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __values = (this && this.__values) || function(o) {
|
|
3
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
4
|
-
if (m) return m.call(o);
|
|
5
|
-
if (o && typeof o.length === "number") return {
|
|
6
|
-
next: function () {
|
|
7
|
-
if (o && i >= o.length) o = void 0;
|
|
8
|
-
return { value: o && o[i++], done: !o };
|
|
9
|
-
}
|
|
10
|
-
};
|
|
11
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
12
|
-
};
|
|
13
|
-
var __read = (this && this.__read) || function (o, n) {
|
|
14
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
15
|
-
if (!m) return o;
|
|
16
|
-
var i = m.call(o), r, ar = [], e;
|
|
17
|
-
try {
|
|
18
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
19
|
-
}
|
|
20
|
-
catch (error) { e = { error: error }; }
|
|
21
|
-
finally {
|
|
22
|
-
try {
|
|
23
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
24
|
-
}
|
|
25
|
-
finally { if (e) throw e.error; }
|
|
26
|
-
}
|
|
27
|
-
return ar;
|
|
28
|
-
};
|
|
29
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
30
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
31
|
-
if (ar || !(i in from)) {
|
|
32
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
33
|
-
ar[i] = from[i];
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
37
|
-
};
|
|
38
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
3
|
exports.Principal = exports.sha224 = exports.getCrc32 = exports.decode = exports.encode = void 0;
|
|
40
|
-
|
|
4
|
+
const js_sha256_1 = require("js-sha256");
|
|
41
5
|
// tslint:disable:no-bitwise
|
|
42
|
-
|
|
6
|
+
const alphabet = 'abcdefghijklmnopqrstuvwxyz234567';
|
|
43
7
|
// Build a lookup table for decoding.
|
|
44
|
-
|
|
45
|
-
for (
|
|
8
|
+
const lookupTable = Object.create(null);
|
|
9
|
+
for (let i = 0; i < alphabet.length; i++) {
|
|
46
10
|
lookupTable[alphabet[i]] = i;
|
|
47
11
|
}
|
|
48
12
|
// Add aliases for rfc4648.
|
|
@@ -54,11 +18,11 @@ lookupTable['1'] = lookupTable.i;
|
|
|
54
18
|
*/
|
|
55
19
|
function encode(input) {
|
|
56
20
|
// How many bits will we skip from the first byte.
|
|
57
|
-
|
|
21
|
+
let skip = 0;
|
|
58
22
|
// 5 high bits, carry from one byte to the next.
|
|
59
|
-
|
|
23
|
+
let bits = 0;
|
|
60
24
|
// The output string in base32.
|
|
61
|
-
|
|
25
|
+
let output = '';
|
|
62
26
|
function encodeByte(byte) {
|
|
63
27
|
if (skip < 0) {
|
|
64
28
|
// we have a carry from the previous byte
|
|
@@ -80,7 +44,7 @@ function encode(input) {
|
|
|
80
44
|
}
|
|
81
45
|
return 0;
|
|
82
46
|
}
|
|
83
|
-
for (
|
|
47
|
+
for (let i = 0; i < input.length;) {
|
|
84
48
|
i += encodeByte(input[i]);
|
|
85
49
|
}
|
|
86
50
|
return output + (skip < 0 ? alphabet[bits >> 3] : '');
|
|
@@ -90,20 +54,19 @@ exports.encode = encode;
|
|
|
90
54
|
* @param input The base32 encoded string to decode.
|
|
91
55
|
*/
|
|
92
56
|
function decode(input) {
|
|
93
|
-
var e_1, _a;
|
|
94
57
|
// how many bits we have from the previous character.
|
|
95
|
-
|
|
58
|
+
let skip = 0;
|
|
96
59
|
// current byte we're producing.
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
60
|
+
let byte = 0;
|
|
61
|
+
const output = new Uint8Array(((input.length * 4) / 3) | 0);
|
|
62
|
+
let o = 0;
|
|
100
63
|
function decodeChar(char) {
|
|
101
64
|
// Consume a character from the stream, store
|
|
102
65
|
// the output in this.output. As before, better
|
|
103
66
|
// to use update().
|
|
104
|
-
|
|
67
|
+
let val = lookupTable[char.toLowerCase()];
|
|
105
68
|
if (val === undefined) {
|
|
106
|
-
throw new Error(
|
|
69
|
+
throw new Error(`Invalid character: ${JSON.stringify(char)}`);
|
|
107
70
|
}
|
|
108
71
|
// move to the high bits
|
|
109
72
|
val <<= 3;
|
|
@@ -121,18 +84,8 @@ function decode(input) {
|
|
|
121
84
|
}
|
|
122
85
|
}
|
|
123
86
|
}
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
var c = input_1_1.value;
|
|
127
|
-
decodeChar(c);
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
131
|
-
finally {
|
|
132
|
-
try {
|
|
133
|
-
if (input_1_1 && !input_1_1.done && (_a = input_1.return)) _a.call(input_1);
|
|
134
|
-
}
|
|
135
|
-
finally { if (e_1) throw e_1.error; }
|
|
87
|
+
for (const c of input) {
|
|
88
|
+
decodeChar(c);
|
|
136
89
|
}
|
|
137
90
|
return output.slice(0, o);
|
|
138
91
|
}
|
|
@@ -140,7 +93,7 @@ exports.decode = decode;
|
|
|
140
93
|
// tslint:disable:no-bitwise
|
|
141
94
|
// This file is translated to JavaScript from
|
|
142
95
|
// https://lxp32.github.io/docs/a-simple-example-crc32-calculation/
|
|
143
|
-
|
|
96
|
+
const lookUpTable = new Uint32Array([
|
|
144
97
|
0x00000000,
|
|
145
98
|
0x77073096,
|
|
146
99
|
0xee0e612c,
|
|
@@ -403,12 +356,12 @@ var lookUpTable = new Uint32Array([
|
|
|
403
356
|
* @param buf The BufferLike to calculate the CRC32 of.
|
|
404
357
|
*/
|
|
405
358
|
function getCrc32(buf) {
|
|
406
|
-
|
|
407
|
-
|
|
359
|
+
const b = new Uint8Array(buf);
|
|
360
|
+
let crc = -1;
|
|
408
361
|
// tslint:disable-next-line:prefer-for-of
|
|
409
|
-
for (
|
|
410
|
-
|
|
411
|
-
|
|
362
|
+
for (let i = 0; i < b.length; i++) {
|
|
363
|
+
const byte = b[i];
|
|
364
|
+
const t = (byte ^ crc) & 0xff;
|
|
412
365
|
crc = lookUpTable[t] ^ (crc >>> 8);
|
|
413
366
|
}
|
|
414
367
|
return (crc ^ -1) >>> 0;
|
|
@@ -419,94 +372,94 @@ exports.getCrc32 = getCrc32;
|
|
|
419
372
|
* @param data Arraybuffer to encode
|
|
420
373
|
*/
|
|
421
374
|
function sha224(data) {
|
|
422
|
-
|
|
375
|
+
const shaObj = js_sha256_1.sha224.create();
|
|
423
376
|
shaObj.update(data);
|
|
424
377
|
return new Uint8Array(shaObj.array());
|
|
425
378
|
}
|
|
426
379
|
exports.sha224 = sha224;
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
380
|
+
const SELF_AUTHENTICATING_SUFFIX = 2;
|
|
381
|
+
const ANONYMOUS_SUFFIX = 4;
|
|
382
|
+
const MANAGEMENT_CANISTER_PRINCIPAL_HEX_STR = 'aaaaa-aa';
|
|
383
|
+
const fromHexString = (hexString) => { var _a; return new Uint8Array(((_a = hexString.match(/.{1,2}/g)) !== null && _a !== void 0 ? _a : []).map((byte) => parseInt(byte, 16))); };
|
|
384
|
+
const toHexString = (bytes) => bytes.reduce((str, byte) => str + byte.toString(16).padStart(2, '0'), '');
|
|
385
|
+
class Principal {
|
|
386
|
+
constructor(_arr) {
|
|
434
387
|
this._arr = _arr;
|
|
435
388
|
this._isPrincipal = true;
|
|
436
389
|
}
|
|
437
|
-
|
|
390
|
+
static anonymous() {
|
|
438
391
|
return new this(new Uint8Array([ANONYMOUS_SUFFIX]));
|
|
439
|
-
}
|
|
392
|
+
}
|
|
440
393
|
/**
|
|
441
394
|
* Utility method, returning the principal representing the management canister, decoded from the hex string `'aaaaa-aa'`
|
|
442
395
|
* @returns {Principal} principal of the management canister
|
|
443
396
|
*/
|
|
444
|
-
|
|
397
|
+
static managementCanister() {
|
|
445
398
|
return this.fromHex(MANAGEMENT_CANISTER_PRINCIPAL_HEX_STR);
|
|
446
|
-
}
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
return new this(new Uint8Array(
|
|
450
|
-
}
|
|
451
|
-
|
|
399
|
+
}
|
|
400
|
+
static selfAuthenticating(publicKey) {
|
|
401
|
+
const sha = sha224(publicKey);
|
|
402
|
+
return new this(new Uint8Array([...sha, SELF_AUTHENTICATING_SUFFIX]));
|
|
403
|
+
}
|
|
404
|
+
static from(other) {
|
|
452
405
|
if (typeof other === 'string') {
|
|
453
406
|
return Principal.fromText(other);
|
|
454
407
|
}
|
|
455
408
|
else if (typeof other === 'object' && other !== null && other._isPrincipal === true) {
|
|
456
409
|
return new Principal(other._arr);
|
|
457
410
|
}
|
|
458
|
-
throw new Error(
|
|
459
|
-
}
|
|
460
|
-
|
|
411
|
+
throw new Error(`Impossible to convert ${JSON.stringify(other)} to Principal.`);
|
|
412
|
+
}
|
|
413
|
+
static fromHex(hex) {
|
|
461
414
|
return new this(fromHexString(hex));
|
|
462
|
-
}
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
415
|
+
}
|
|
416
|
+
static fromText(text) {
|
|
417
|
+
const canisterIdNoDash = text.toLowerCase().replace(/-/g, '');
|
|
418
|
+
let arr = decode(canisterIdNoDash);
|
|
466
419
|
arr = arr.slice(4, arr.length);
|
|
467
|
-
|
|
420
|
+
const principal = new this(arr);
|
|
468
421
|
if (principal.toText() !== text) {
|
|
469
|
-
throw new Error(
|
|
422
|
+
throw new Error(`Principal "${principal.toText()}" does not have a valid checksum (original value "${text}" may not be a valid Principal ID).`);
|
|
470
423
|
}
|
|
471
424
|
return principal;
|
|
472
|
-
}
|
|
473
|
-
|
|
425
|
+
}
|
|
426
|
+
static fromUint8Array(arr) {
|
|
474
427
|
return new this(arr);
|
|
475
|
-
}
|
|
476
|
-
|
|
428
|
+
}
|
|
429
|
+
isAnonymous() {
|
|
477
430
|
return this._arr.byteLength === 1 && this._arr[0] === ANONYMOUS_SUFFIX;
|
|
478
|
-
}
|
|
479
|
-
|
|
431
|
+
}
|
|
432
|
+
toUint8Array() {
|
|
480
433
|
return this._arr;
|
|
481
|
-
}
|
|
482
|
-
|
|
434
|
+
}
|
|
435
|
+
toHex() {
|
|
483
436
|
return toHexString(this._arr).toUpperCase();
|
|
484
|
-
}
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
437
|
+
}
|
|
438
|
+
toText() {
|
|
439
|
+
const checksumArrayBuf = new ArrayBuffer(4);
|
|
440
|
+
const view = new DataView(checksumArrayBuf);
|
|
488
441
|
view.setUint32(0, getCrc32(this._arr));
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
442
|
+
const checksum = new Uint8Array(checksumArrayBuf);
|
|
443
|
+
const bytes = Uint8Array.from(this._arr);
|
|
444
|
+
const array = new Uint8Array([...checksum, ...bytes]);
|
|
445
|
+
const result = encode(array);
|
|
446
|
+
const matches = result.match(/.{1,5}/g);
|
|
494
447
|
if (!matches) {
|
|
495
448
|
// This should only happen if there's no character, which is unreachable.
|
|
496
449
|
throw new Error();
|
|
497
450
|
}
|
|
498
451
|
return matches.join('-');
|
|
499
|
-
}
|
|
500
|
-
|
|
452
|
+
}
|
|
453
|
+
toString() {
|
|
501
454
|
return this.toText();
|
|
502
|
-
}
|
|
455
|
+
}
|
|
503
456
|
/**
|
|
504
457
|
* Utility method taking a Principal to compare against. Used for determining canister ranges in certificate verification
|
|
505
458
|
* @param {Principal} other - a {@link Principal} to compare
|
|
506
459
|
* @returns {'lt' | 'eq' | 'gt'} `'lt' | 'eq' | 'gt'` a string, representing less than, equal to, or greater than
|
|
507
460
|
*/
|
|
508
|
-
|
|
509
|
-
for (
|
|
461
|
+
compareTo(other) {
|
|
462
|
+
for (let i = 0; i < Math.min(this._arr.length, other._arr.length); i++) {
|
|
510
463
|
if (this._arr[i] < other._arr[i])
|
|
511
464
|
return 'lt';
|
|
512
465
|
else if (this._arr[i] > other._arr[i])
|
|
@@ -518,26 +471,25 @@ var Principal = /** @class */ (function () {
|
|
|
518
471
|
if (this._arr.length > other._arr.length)
|
|
519
472
|
return 'gt';
|
|
520
473
|
return 'eq';
|
|
521
|
-
}
|
|
474
|
+
}
|
|
522
475
|
/**
|
|
523
476
|
* Utility method checking whether a provided Principal is less than or equal to the current one using the {@link Principal.compareTo} method
|
|
524
477
|
* @param other a {@link Principal} to compare
|
|
525
478
|
* @returns {boolean} boolean
|
|
526
479
|
*/
|
|
527
|
-
|
|
528
|
-
|
|
480
|
+
ltEq(other) {
|
|
481
|
+
const cmp = this.compareTo(other);
|
|
529
482
|
return cmp == 'lt' || cmp == 'eq';
|
|
530
|
-
}
|
|
483
|
+
}
|
|
531
484
|
/**
|
|
532
485
|
* Utility method checking whether a provided Principal is greater than or equal to the current one using the {@link Principal.compareTo} method
|
|
533
486
|
* @param other a {@link Principal} to compare
|
|
534
487
|
* @returns {boolean} boolean
|
|
535
488
|
*/
|
|
536
|
-
|
|
537
|
-
|
|
489
|
+
gtEq(other) {
|
|
490
|
+
const cmp = this.compareTo(other);
|
|
538
491
|
return cmp == 'gt' || cmp == 'eq';
|
|
539
|
-
}
|
|
540
|
-
|
|
541
|
-
}());
|
|
492
|
+
}
|
|
493
|
+
}
|
|
542
494
|
exports.Principal = Principal;
|
|
543
495
|
//# sourceMappingURL=principal.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"principal.js","sourceRoot":"","sources":["../../../src/v1/utils/principal.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"principal.js","sourceRoot":"","sources":["../../../src/v1/utils/principal.ts"],"names":[],"mappings":";;;AAAA,yCAA8C;AAE9C,4BAA4B;AAC5B,MAAM,QAAQ,GAAG,kCAAkC,CAAA;AAEnD,qCAAqC;AACrC,MAAM,WAAW,GAA2B,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;AAC/D,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;IACxC,WAAW,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAA;CAC7B;AAED,2BAA2B;AAC3B,WAAW,CAAC,GAAG,CAAC,GAAG,WAAW,CAAC,CAAC,CAAA;AAChC,WAAW,CAAC,GAAG,CAAC,GAAG,WAAW,CAAC,CAAC,CAAA;AAEhC;;;GAGG;AACH,SAAgB,MAAM,CAAC,KAAiB;IACtC,kDAAkD;IAClD,IAAI,IAAI,GAAG,CAAC,CAAA;IACZ,gDAAgD;IAChD,IAAI,IAAI,GAAG,CAAC,CAAA;IAEZ,+BAA+B;IAC/B,IAAI,MAAM,GAAG,EAAE,CAAA;IAEf,SAAS,UAAU,CAAC,IAAY;QAC9B,IAAI,IAAI,GAAG,CAAC,EAAE;YACZ,yCAAyC;YACzC,IAAI,IAAI,IAAI,IAAI,CAAC,IAAI,CAAA;SACtB;aAAM;YACL,WAAW;YACX,IAAI,GAAG,CAAC,IAAI,IAAI,IAAI,CAAC,GAAG,GAAG,CAAA;SAC5B;QAED,IAAI,IAAI,GAAG,CAAC,EAAE;YACZ,6DAA6D;YAC7D,IAAI,IAAI,CAAC,CAAA;YACT,OAAO,CAAC,CAAA;SACT;QAED,IAAI,IAAI,GAAG,CAAC,EAAE;YACZ,sBAAsB;YACtB,MAA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;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UA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