networkwm-js 0.2.1 → 0.2.3
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/bytemanip.js +11 -12
- package/dist/cli/decrypt-mp3.js +2 -3
- package/dist/cli/decrypt-oma.js +1 -2
- package/dist/cli/encrypt-oma.js +1 -2
- package/dist/cli/sign-device.js +4 -5
- package/dist/cli/table-file-info.js +1 -2
- package/dist/cli/tagged-oma-info.js +1 -2
- package/dist/codecs.d.ts +1 -1
- package/dist/codecs.d.ts.map +1 -1
- package/dist/codecs.js +5 -5
- package/dist/database-abstraction.d.ts +2 -2
- package/dist/database-abstraction.d.ts.map +1 -1
- package/dist/database-abstraction.js +7 -4
- package/dist/databases.d.ts.map +1 -1
- package/dist/derive-mp3-key.d.ts +1 -1
- package/dist/derive-mp3-key.d.ts.map +1 -1
- package/dist/derive-mp3-key.js +3 -4
- package/dist/devices.d.ts.map +1 -1
- package/dist/devices.js +4 -3
- package/dist/encryption.d.ts +8 -8
- package/dist/encryption.d.ts.map +1 -1
- package/dist/encryption.js +12 -12
- package/dist/filesystem/usb-mass-storage-webusb-filesystem.d.ts +18 -16
- package/dist/filesystem/usb-mass-storage-webusb-filesystem.d.ts.map +1 -1
- package/dist/filesystem/usb-mass-storage-webusb-filesystem.js +6 -6
- package/dist/id3.d.ts +4 -4
- package/dist/id3.d.ts.map +1 -1
- package/dist/id3.js +7 -8
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -2
- package/dist/init-data.d.ts +16 -16
- package/dist/init-data.d.ts.map +1 -1
- package/dist/initialization.js +2 -3
- package/dist/mp3.js +3 -4
- package/dist/{helpers.d.ts → node-helpers.d.ts} +1 -2
- package/dist/node-helpers.d.ts.map +1 -0
- package/dist/{helpers.js → node-helpers.js} +2 -8
- package/dist/sort.d.ts +2 -2
- package/dist/sort.d.ts.map +1 -1
- package/dist/sort.js +2 -3
- package/dist/tables.js +2 -3
- package/dist/tagged-oma.d.ts +4 -2
- package/dist/tagged-oma.d.ts.map +1 -1
- package/dist/tagged-oma.js +7 -8
- package/dist/utils.d.ts +5 -4
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +13 -9
- package/package.json +3 -3
- package/dist/helpers.d.ts.map +0 -1
package/dist/bytemanip.js
CHANGED
|
@@ -1,59 +1,60 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.readUint8 = readUint8;
|
|
4
|
+
exports.readUint16 = readUint16;
|
|
5
|
+
exports.readUint32 = readUint32;
|
|
6
|
+
exports.getUint32 = getUint32;
|
|
7
|
+
exports.getUint16 = getUint16;
|
|
8
|
+
exports.readBytes = readBytes;
|
|
9
|
+
exports.readString = readString;
|
|
10
|
+
exports.align = align;
|
|
11
|
+
exports.writeUint8 = writeUint8;
|
|
12
|
+
exports.writeUint16 = writeUint16;
|
|
13
|
+
exports.writeUint32 = writeUint32;
|
|
4
14
|
const textDecoder = new TextDecoder();
|
|
5
15
|
const textEncoder = new TextEncoder();
|
|
6
16
|
function readUint8(data, offset) {
|
|
7
17
|
const value = data.getUint8(offset);
|
|
8
18
|
return [value, offset + 1];
|
|
9
19
|
}
|
|
10
|
-
exports.readUint8 = readUint8;
|
|
11
20
|
;
|
|
12
21
|
function readUint16(data, offset) {
|
|
13
22
|
const value = data.getUint16(offset);
|
|
14
23
|
return [value, offset + 2];
|
|
15
24
|
}
|
|
16
|
-
exports.readUint16 = readUint16;
|
|
17
25
|
;
|
|
18
26
|
function readUint32(data, offset) {
|
|
19
27
|
const value = data.getUint32(offset);
|
|
20
28
|
return [value, offset + 4];
|
|
21
29
|
}
|
|
22
|
-
exports.readUint32 = readUint32;
|
|
23
30
|
;
|
|
24
31
|
function getUint32(data, offset = 0) {
|
|
25
32
|
if (offset < 0)
|
|
26
33
|
offset += data.length;
|
|
27
34
|
return (data[offset + 0] << 24) | (data[offset + 1] << 16) | (data[offset + 2] << 8) | data[offset + 3];
|
|
28
35
|
}
|
|
29
|
-
exports.getUint32 = getUint32;
|
|
30
36
|
function getUint16(data, offset = 0) {
|
|
31
37
|
if (offset < 0)
|
|
32
38
|
offset += data.length;
|
|
33
39
|
return (data[offset + 0] << 8) | data[offset + 1];
|
|
34
40
|
}
|
|
35
|
-
exports.getUint16 = getUint16;
|
|
36
41
|
function readBytes(data, offset, length) {
|
|
37
42
|
const value = new Uint8Array(data.buffer.slice(offset, offset + length));
|
|
38
43
|
return [value, offset + length];
|
|
39
44
|
}
|
|
40
|
-
exports.readBytes = readBytes;
|
|
41
45
|
;
|
|
42
46
|
function readString(data, offset, length) {
|
|
43
47
|
const bytes = readBytes(data, offset, length);
|
|
44
48
|
return [textDecoder.decode(bytes[0]), bytes[1]];
|
|
45
49
|
}
|
|
46
|
-
exports.readString = readString;
|
|
47
50
|
function align(offset, to) {
|
|
48
51
|
if (offset % to === 0)
|
|
49
52
|
return offset;
|
|
50
53
|
return (Math.floor(offset / to) + 1) * to;
|
|
51
54
|
}
|
|
52
|
-
exports.align = align;
|
|
53
55
|
function writeUint8(value) {
|
|
54
56
|
return new Uint8Array([value]);
|
|
55
57
|
}
|
|
56
|
-
exports.writeUint8 = writeUint8;
|
|
57
58
|
;
|
|
58
59
|
function writeUint16(value) {
|
|
59
60
|
const array = new Uint8Array(2);
|
|
@@ -61,7 +62,6 @@ function writeUint16(value) {
|
|
|
61
62
|
array[1] = value & 0xff;
|
|
62
63
|
return array;
|
|
63
64
|
}
|
|
64
|
-
exports.writeUint16 = writeUint16;
|
|
65
65
|
;
|
|
66
66
|
function writeUint32(value) {
|
|
67
67
|
const array = new Uint8Array(4);
|
|
@@ -71,5 +71,4 @@ function writeUint32(value) {
|
|
|
71
71
|
array[3] = value & 0xff;
|
|
72
72
|
return array;
|
|
73
73
|
}
|
|
74
|
-
exports.writeUint32 = writeUint32;
|
|
75
74
|
;
|
package/dist/cli/decrypt-mp3.js
CHANGED
|
@@ -3,7 +3,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
6
|
+
exports.mainDeriveKey = mainDeriveKey;
|
|
7
|
+
exports.main = main;
|
|
7
8
|
const fs_1 = __importDefault(require("fs"));
|
|
8
9
|
const path_1 = __importDefault(require("path"));
|
|
9
10
|
const derive_mp3_key_1 = require("../derive-mp3-key");
|
|
@@ -37,7 +38,6 @@ function mainDeriveKey(invocation, args) {
|
|
|
37
38
|
const leafId = (0, encryption_1.getMP3EncryptionKey)(trackKey, id);
|
|
38
39
|
console.log(`Device MP3 key: ${leafId.toString(16).padStart(8, '0')}`);
|
|
39
40
|
}
|
|
40
|
-
exports.mainDeriveKey = mainDeriveKey;
|
|
41
41
|
function main(invocation, args) {
|
|
42
42
|
if (args.length < 3) {
|
|
43
43
|
console.log(`Usage: ${invocation} <device key> <OMA-encapsulated-MP3> <output MP3>`);
|
|
@@ -56,4 +56,3 @@ function main(invocation, args) {
|
|
|
56
56
|
}
|
|
57
57
|
fs_1.default.writeFileSync(dest, (0, derive_mp3_key_1.decryptMP3)(new Uint8Array(fs_1.default.readFileSync(source)), fileId, deviceKey));
|
|
58
58
|
}
|
|
59
|
-
exports.main = main;
|
package/dist/cli/decrypt-oma.js
CHANGED
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.main =
|
|
6
|
+
exports.main = main;
|
|
7
7
|
const fs_1 = __importDefault(require("fs"));
|
|
8
8
|
const tagged_oma_1 = require("../tagged-oma");
|
|
9
9
|
function main(invocation, args) {
|
|
@@ -22,4 +22,3 @@ function main(invocation, args) {
|
|
|
22
22
|
}
|
|
23
23
|
fs_1.default.writeFileSync(dest, (0, tagged_oma_1.decryptOMA)(new Uint8Array(fs_1.default.readFileSync(source))));
|
|
24
24
|
}
|
|
25
|
-
exports.main = main;
|
package/dist/cli/encrypt-oma.js
CHANGED
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.main =
|
|
6
|
+
exports.main = main;
|
|
7
7
|
const fs_1 = __importDefault(require("fs"));
|
|
8
8
|
const tagged_oma_1 = require("../tagged-oma");
|
|
9
9
|
const himd_js_1 = require("himd-js");
|
|
@@ -80,4 +80,3 @@ async function main(invocation, args) {
|
|
|
80
80
|
console.log("Duration is: ", encrypted.duration, " seconds");
|
|
81
81
|
fs_1.default.writeFileSync(dest, encrypted.data);
|
|
82
82
|
}
|
|
83
|
-
exports.main = main;
|
package/dist/cli/sign-device.js
CHANGED
|
@@ -3,21 +3,21 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.main =
|
|
6
|
+
exports.main = main;
|
|
7
7
|
const encryption_1 = require("../encryption");
|
|
8
8
|
const filesystem_1 = require("../filesystem");
|
|
9
|
-
const
|
|
9
|
+
const node_helpers_1 = require("../node-helpers");
|
|
10
10
|
const path_1 = require("path");
|
|
11
11
|
const fs_1 = __importDefault(require("fs"));
|
|
12
12
|
async function main() {
|
|
13
13
|
await (0, encryption_1.initCrypto)();
|
|
14
14
|
(0, encryption_1.importKeys)(new Uint8Array(fs_1.default.readFileSync((0, path_1.join)(__dirname, "..", "..", "EKBROOTS.DES"))));
|
|
15
|
-
const device = await (0,
|
|
15
|
+
const device = await (0, node_helpers_1.openNewDeviceNode)();
|
|
16
16
|
if (!device) {
|
|
17
17
|
console.log("No device found!");
|
|
18
18
|
return;
|
|
19
19
|
}
|
|
20
|
-
const fs = await (0,
|
|
20
|
+
const fs = await (0, node_helpers_1.createNWJSFS)(device);
|
|
21
21
|
console.log(`Connected to ${device.definition.name}`);
|
|
22
22
|
console.log("Opening session...");
|
|
23
23
|
const session = new filesystem_1.UMSCNWJSSession(fs.driver, fs);
|
|
@@ -27,4 +27,3 @@ async function main() {
|
|
|
27
27
|
await session.finalizeSession();
|
|
28
28
|
console.log("Done.");
|
|
29
29
|
}
|
|
30
|
-
exports.main = main;
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.main =
|
|
6
|
+
exports.main = main;
|
|
7
7
|
const tables_1 = require("../tables");
|
|
8
8
|
const utils_1 = require("../utils");
|
|
9
9
|
const fs_1 = __importDefault(require("fs"));
|
|
@@ -43,4 +43,3 @@ function main(invocation, args) {
|
|
|
43
43
|
}
|
|
44
44
|
bumpIndent(-1);
|
|
45
45
|
}
|
|
46
|
-
exports.main = main;
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.main =
|
|
6
|
+
exports.main = main;
|
|
7
7
|
const fs_1 = __importDefault(require("fs"));
|
|
8
8
|
const utils_1 = require("../utils");
|
|
9
9
|
const id3_1 = require("../id3");
|
|
@@ -189,4 +189,3 @@ function main(invocation, args) {
|
|
|
189
189
|
}
|
|
190
190
|
}
|
|
191
191
|
}
|
|
192
|
-
exports.main = main;
|
package/dist/codecs.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export interface NWCodecInfo {
|
|
|
7
7
|
codecInfo: Uint8Array;
|
|
8
8
|
complete?: boolean;
|
|
9
9
|
}
|
|
10
|
-
export declare function createEA3Header({ codecId, codecInfo, complete }: NWCodecInfo, encrypted?: number, version?: number): Uint8Array
|
|
10
|
+
export declare function createEA3Header({ codecId, codecInfo, complete }: NWCodecInfo, encrypted?: number, version?: number): Uint8Array<ArrayBuffer>;
|
|
11
11
|
export declare function getCodecName(codecInfo: NWCodecInfo): import("himd-js").HiMDCodecName;
|
|
12
12
|
export declare function getKBPS(codecInfo: NWCodecInfo): number;
|
|
13
13
|
//# sourceMappingURL=codecs.d.ts.map
|
package/dist/codecs.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codecs.d.ts","sourceRoot":"","sources":["../src/codecs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,SAAS,EAAsD,MAAM,SAAS,CAAC;AAGnG,oBAAY,OAAO;IACf,GAAG,IAAO;CACb;AAED,MAAM,WAAW,WAAW;IACxB,OAAO,EAAE,SAAS,GAAG,OAAO,CAAC;IAC7B,SAAS,EAAE,UAAU,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,wBAAgB,eAAe,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,WAAW,EAAE,SAAS,SAAS,EAAE,OAAO,SAAI,
|
|
1
|
+
{"version":3,"file":"codecs.d.ts","sourceRoot":"","sources":["../src/codecs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,SAAS,EAAsD,MAAM,SAAS,CAAC;AAGnG,oBAAY,OAAO;IACf,GAAG,IAAO;CACb;AAED,MAAM,WAAW,WAAW;IACxB,OAAO,EAAE,SAAS,GAAG,OAAO,CAAC;IAC7B,SAAS,EAAE,UAAU,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,wBAAgB,eAAe,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,WAAW,EAAE,SAAS,SAAS,EAAE,OAAO,SAAI,2BAO7G;AAED,wBAAgB,YAAY,CAAC,SAAS,EAAE,WAAW,mCAMlD;AAED,wBAAgB,OAAO,CAAC,SAAS,EAAE,WAAW,UAa7C"}
|
package/dist/codecs.js
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.NWCodec = void 0;
|
|
4
|
+
exports.createEA3Header = createEA3Header;
|
|
5
|
+
exports.getCodecName = getCodecName;
|
|
6
|
+
exports.getKBPS = getKBPS;
|
|
4
7
|
const himd_js_1 = require("himd-js");
|
|
5
8
|
const bytemanip_1 = require("./bytemanip");
|
|
6
9
|
var NWCodec;
|
|
7
10
|
(function (NWCodec) {
|
|
8
11
|
NWCodec[NWCodec["MP3"] = 3] = "MP3";
|
|
9
|
-
})(NWCodec
|
|
12
|
+
})(NWCodec || (exports.NWCodec = NWCodec = {}));
|
|
10
13
|
function createEA3Header({ codecId, codecInfo, complete }, encrypted = 0xFFFF, version = 1) {
|
|
11
14
|
const headerSize = 96;
|
|
12
15
|
const header = new Uint8Array(headerSize);
|
|
@@ -15,14 +18,12 @@ function createEA3Header({ codecId, codecInfo, complete }, encrypted = 0xFFFF, v
|
|
|
15
18
|
header.set(complete ? codecInfo : codecInfo.slice(0, 3), 33);
|
|
16
19
|
return header;
|
|
17
20
|
}
|
|
18
|
-
exports.createEA3Header = createEA3Header;
|
|
19
21
|
function getCodecName(codecInfo) {
|
|
20
22
|
if (codecInfo.codecId === NWCodec.MP3) {
|
|
21
23
|
return "MP3";
|
|
22
24
|
}
|
|
23
25
|
return (0, himd_js_1.getCodecName)(codecInfo);
|
|
24
26
|
}
|
|
25
|
-
exports.getCodecName = getCodecName;
|
|
26
27
|
function getKBPS(codecInfo) {
|
|
27
28
|
if (codecInfo.codecId === NWCodec.MP3) {
|
|
28
29
|
// Make it compatible with HiMD codec definitions
|
|
@@ -37,4 +38,3 @@ function getKBPS(codecInfo) {
|
|
|
37
38
|
}
|
|
38
39
|
return (0, himd_js_1.getKBPS)(codecInfo);
|
|
39
40
|
}
|
|
40
|
-
exports.getKBPS = getKBPS;
|
|
@@ -3,7 +3,7 @@ import { DatabaseManager, InboundTrackMetadata, TrackMetadata } from "./database
|
|
|
3
3
|
import { UMSCNWJSSession } from "./filesystem";
|
|
4
4
|
import { DeviceDefinition } from "./devices";
|
|
5
5
|
import { NWCodecInfo } from "./codecs";
|
|
6
|
-
export
|
|
6
|
+
export type AbstractedTrack = TrackMetadata & {
|
|
7
7
|
encryptionState: Uint8Array;
|
|
8
8
|
codecInfo: Uint8Array;
|
|
9
9
|
oneElementLength: number;
|
|
@@ -27,7 +27,7 @@ export declare class DatabaseAbstraction {
|
|
|
27
27
|
private reassignTrackNumber;
|
|
28
28
|
private copyToFilesystem;
|
|
29
29
|
uploadMP3Track(trackInfo: InboundTrackMetadata, rawData: Uint8Array, callback?: (done: number, outOf: number) => void): Promise<void>;
|
|
30
|
-
uploadTrack(trackInfo: InboundTrackMetadata, codec: CodecInfo, rawData: Uint8Array
|
|
30
|
+
uploadTrack(trackInfo: InboundTrackMetadata, codec: CodecInfo, rawData: Uint8Array<ArrayBuffer>, session?: UMSCNWJSSession, callback?: (done: number, outOf: number) => void): Promise<void>;
|
|
31
31
|
flushUpdates(): Promise<void>;
|
|
32
32
|
deleteTrack(systemIndex: number): Promise<void>;
|
|
33
33
|
reserializeDatabase(): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"database-abstraction.d.ts","sourceRoot":"","sources":["../src/database-abstraction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AACnE,OAAO,EAAE,eAAe,EAAc,oBAAoB,EAAE,aAAa,EAAY,MAAM,aAAa,CAAC;AAGzG,OAAO,EAAsB,eAAe,EAAE,MAAM,cAAc,CAAC;AAGnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAE7C,OAAO,EAAE,WAAW,EAAyB,MAAM,UAAU,CAAC;AAK9D,
|
|
1
|
+
{"version":3,"file":"database-abstraction.d.ts","sourceRoot":"","sources":["../src/database-abstraction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AACnE,OAAO,EAAE,eAAe,EAAc,oBAAoB,EAAE,aAAa,EAAY,MAAM,aAAa,CAAC;AAGzG,OAAO,EAAsB,eAAe,EAAE,MAAM,cAAc,CAAC;AAGnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAE7C,OAAO,EAAE,WAAW,EAAyB,MAAM,UAAU,CAAC;AAK9D,MAAM,MAAM,eAAe,GAAG,aAAa,GAAG;IAC1C,eAAe,EAAE,UAAU,CAAC;IAC5B,SAAS,EAAE,UAAU,CAAC;IACtB,gBAAgB,EAAE,MAAM,CAAC;IACzB,WAAW,EAAE,MAAM,CAAC;IAEpB,SAAS,EAAE,aAAa,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,qBAAa,mBAAmB;IAOR,OAAO,CAAC,UAAU;IAAyB,UAAU,EAAE,gBAAgB;IAN3F,OAAO,CAAC,wBAAwB,CAAC,CAAyB;IAC1D,OAAO,CAAC,iBAAiB,CAAa;IACtC,OAAO,CAAC,SAAS,CAAyB;IAC1C,OAAO,CAAC,aAAa,CAAgB;IAC9B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,eAAe,CAAC;IACjC,OAAO;WAIa,MAAM,CAAC,UAAU,EAAE,cAAc,EAAE,UAAU,EAAE,gBAAgB;IAiCnF,OAAO,CAAC,OAAO;IAkCR,WAAW,CAAC,SAAS,EAAE,aAAa,EAAE,SAAS,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM;IAyB5F,OAAO,CAAC,mBAAmB;YAWb,gBAAgB;IAsBxB,cAAc,CAChB,SAAS,EAAE,oBAAoB,EAC/B,OAAO,EAAE,UAAU,EACnB,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI;IAe9C,WAAW,CACb,SAAS,EAAE,oBAAoB,EAC/B,KAAK,EAAE,SAAS,EAChB,OAAO,EAAE,UAAU,CAAC,WAAW,CAAC,EAChC,OAAO,CAAC,EAAE,eAAe,EACzB,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI;IAmB9C,YAAY;IAMZ,WAAW,CAAC,WAAW,EAAE,MAAM;IAgBrC,mBAAmB;IA6EnB,0BAA0B,IAAK;QAC3B,0BAA0B,EAAE,CAAC,CAAC;QAC9B,IAAI,EAAE,MAAM,CAAC;QACb,QAAQ,EAAE;YACN,0BAA0B,EAAE,CAAC,CAAC;YAC9B,IAAI,EAAE,MAAM,CAAC;YACb,QAAQ,EAAE,eAAe,EAAE,CAAA;SAC9B,EAAE,CAAA;KACN,EAAE;IAIG,QAAQ;IA6BR,WAAW,CAAC,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,aAAa;CAoBjE"}
|
|
@@ -6,7 +6,7 @@ const sort_1 = require("./sort");
|
|
|
6
6
|
const initialization_1 = require("./initialization");
|
|
7
7
|
const filesystem_1 = require("./filesystem");
|
|
8
8
|
const tagged_oma_1 = require("./tagged-oma");
|
|
9
|
-
const
|
|
9
|
+
const utils_1 = require("./utils");
|
|
10
10
|
const mp3_1 = require("./mp3");
|
|
11
11
|
const codecs_1 = require("./codecs");
|
|
12
12
|
const bytemanip_1 = require("./bytemanip");
|
|
@@ -125,7 +125,7 @@ class DatabaseAbstraction {
|
|
|
125
125
|
// The audio store for this file doesn't yet exist - create it.
|
|
126
126
|
await this.filesystem.mkdir(audioStore);
|
|
127
127
|
}
|
|
128
|
-
const fh = await this.database.filesystem.open((0,
|
|
128
|
+
const fh = await this.database.filesystem.open((0, utils_1.resolvePathFromGlobalIndex)(globalTrackIndex), 'rw');
|
|
129
129
|
let remaining = data.length;
|
|
130
130
|
let i = 0;
|
|
131
131
|
callback === null || callback === void 0 ? void 0 : callback(i, data.length);
|
|
@@ -183,7 +183,10 @@ class DatabaseAbstraction {
|
|
|
183
183
|
// Sort
|
|
184
184
|
this.deletedTracks.sort((a, b) => a - b);
|
|
185
185
|
// Delete the file.
|
|
186
|
-
|
|
186
|
+
try {
|
|
187
|
+
await this.filesystem.delete((0, utils_1.resolvePathFromGlobalIndex)(systemIndex));
|
|
188
|
+
}
|
|
189
|
+
catch (ex) { } // Might fail.
|
|
187
190
|
}
|
|
188
191
|
reserializeDatabase() {
|
|
189
192
|
const instrs = [
|
|
@@ -286,7 +289,7 @@ class DatabaseAbstraction {
|
|
|
286
289
|
}
|
|
287
290
|
async renameTrack(systemIndex, metadata) {
|
|
288
291
|
// Update the metadata within the OMA file
|
|
289
|
-
const handle = await this.database.filesystem.open((0,
|
|
292
|
+
const handle = await this.database.filesystem.open((0, utils_1.resolvePathFromGlobalIndex)(systemIndex), 'rw');
|
|
290
293
|
if (handle) {
|
|
291
294
|
try {
|
|
292
295
|
if (this.allTracks[systemIndex - 1].codecName === "MP3") {
|
package/dist/databases.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"databases.d.ts","sourceRoot":"","sources":["../src/databases.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAyB,aAAa,EAAE,MAAM,SAAS,CAAC;AAI/E,OAAO,EAAc,SAAS,EAAkB,MAAM,UAAU,CAAC;AAEjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AA2D/C,MAAM,WAAW,QAAQ;IAAE,cAAc,EAAE;QAAE,0BAA0B,EAAE,MAAM,CAAC;QAAC,cAAc,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAAC,IAAI,EAAE,MAAM,EAAE,CAAA;CAAC;AAC3I,MAAM,WAAW,YAAY;IAAG,eAAe,EAAE,UAAU,CAAC;IAAC,SAAS,EAAE,UAAU,CAAC;IAAC,aAAa,EAAE,MAAM,CAAC;IAAC,gBAAgB,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE;QAAC,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAC,CAAA;CAAC;AACvK,MAAM,WAAW,UAAU;IAAE,aAAa,EAAE,MAAM,CAAC;IAAC,gBAAgB,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE;QAAC,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAC,CAAA;CAAC;AAChH,MAAM,WAAW,aAAa;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,aAAa,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAC;AACxI,MAAM,WAAW,oBAAoB;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAA;CAAE;AAC1H,qBAAa,eAAe;IAML,UAAU,EAAE,cAAc;IAAE,OAAO,CAAC,kBAAkB,CAAC;IAL1E,UAAU,EAAE;QAAC,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAA;KAAC,CAAK;IAChD,eAAe,EAAE;QAAC,CAAC,QAAQ,EAAE,MAAM,GAAG,QAAQ,CAAA;KAAC,CAAM;IACrD,oBAAoB,EAAE;QAAC,CAAC,QAAQ,EAAE,MAAM,GAAG,UAAU,EAAE,CAAA;KAAC,CAAM;IAC9D,qBAAqB,EAAE,YAAY,EAAE,CAAM;gBAExB,UAAU,EAAE,cAAc,EAAU,kBAAkB,CAAC,
|
|
1
|
+
{"version":3,"file":"databases.d.ts","sourceRoot":"","sources":["../src/databases.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAyB,aAAa,EAAE,MAAM,SAAS,CAAC;AAI/E,OAAO,EAAc,SAAS,EAAkB,MAAM,UAAU,CAAC;AAEjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AA2D/C,MAAM,WAAW,QAAQ;IAAE,cAAc,EAAE;QAAE,0BAA0B,EAAE,MAAM,CAAC;QAAC,cAAc,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAAC,IAAI,EAAE,MAAM,EAAE,CAAA;CAAC;AAC3I,MAAM,WAAW,YAAY;IAAG,eAAe,EAAE,UAAU,CAAC;IAAC,SAAS,EAAE,UAAU,CAAC;IAAC,aAAa,EAAE,MAAM,CAAC;IAAC,gBAAgB,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE;QAAC,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAC,CAAA;CAAC;AACvK,MAAM,WAAW,UAAU;IAAE,aAAa,EAAE,MAAM,CAAC;IAAC,gBAAgB,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE;QAAC,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAC,CAAA;CAAC;AAChH,MAAM,WAAW,aAAa;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,aAAa,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAC;AACxI,MAAM,WAAW,oBAAoB;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAA;CAAE;AAC1H,qBAAa,eAAe;IAML,UAAU,EAAE,cAAc;IAAE,OAAO,CAAC,kBAAkB,CAAC;IAL1E,UAAU,EAAE;QAAC,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAA;KAAC,CAAK;IAChD,eAAe,EAAE;QAAC,CAAC,QAAQ,EAAE,MAAM,GAAG,QAAQ,CAAA;KAAC,CAAM;IACrD,oBAAoB,EAAE;QAAC,CAAC,QAAQ,EAAE,MAAM,GAAG,UAAU,EAAE,CAAA;KAAC,CAAM;IAC9D,qBAAqB,EAAE,YAAY,EAAE,CAAM;gBAExB,UAAU,EAAE,cAAc,EAAU,kBAAkB,CAAC,EAAE,kBAAkB,YAAA;IAExF,IAAI;IAoFH,iBAAiB;IAsEX,aAAa;IAU1B,SAAS,CAAC,cAAc,CAAC,KAAK,EAAE,MAAM;;;;;;;;;IAkB/B,oBAAoB,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM;IAYvD,iBAAiB,IAAI;QAAE,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,QAAQ,EAAE;YAAE,KAAK,EAAE,MAAM,CAAC;YAAC,MAAM,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,CAAC;YAAC,QAAQ,EAAE,MAAM,CAAC;YAAC,SAAS,EAAE,aAAa,CAAC;YAAC,SAAS,EAAE,MAAM,CAAA;SAAE,EAAE,CAAA;KAAC,EAAE;IAkC9L,kBAAkB,IAAI;QAAC,CAAC,MAAM,EAAE,MAAM,GAAG;YAAC,CAAC,KAAK,EAAE,MAAM,GAAG;gBAAC,KAAK,EAAE,MAAM,CAAC;gBAAC,KAAK,EAAE,CAAC,CAAC,CAAC;gBAAC,QAAQ,EAAE,MAAM,CAAC;gBAAC,SAAS,EAAE,aAAa,CAAC;gBAAC,SAAS,EAAE,MAAM,CAAA;aAAE,EAAE,CAAA;SAAC,CAAA;KAAC;CAwBnK"}
|
package/dist/derive-mp3-key.d.ts
CHANGED
|
@@ -8,5 +8,5 @@ export declare function deriveMP3ParametersFromOMA(mp3CodecInfo: Uint8Array): {
|
|
|
8
8
|
flags: number;
|
|
9
9
|
};
|
|
10
10
|
export declare function deriveMP3TrackKey(rawFile: Uint8Array, callback?: (state: 'genFrames' | 'genKeys' | 'commonness', progress: number, outOf: number) => void): number;
|
|
11
|
-
export declare function decryptMP3(fullFile: Uint8Array
|
|
11
|
+
export declare function decryptMP3(fullFile: Uint8Array<ArrayBuffer>, fileId: number, deviceKey?: number, callback?: (state: 'genFrames' | 'genKeys' | 'commonness' | 'decrypt', progress: number, of: number) => void): Uint8Array<ArrayBuffer>;
|
|
12
12
|
//# sourceMappingURL=derive-mp3-key.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"derive-mp3-key.d.ts","sourceRoot":"","sources":["../src/derive-mp3-key.ts"],"names":[],"mappings":"AAUA,wBAAgB,0BAA0B,CAAC,YAAY,EAAE,UAAU;;;;;;;;EAclE;AAED,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,UAAU,EAAE,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,GAAG,SAAS,GAAG,YAAY,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,GAAG,MAAM,CA6DlK;AAED,wBAAgB,UAAU,CAAC,QAAQ,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,GAAG,SAAS,GAAG,YAAY,GAAG,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,KAAK,IAAI,
|
|
1
|
+
{"version":3,"file":"derive-mp3-key.d.ts","sourceRoot":"","sources":["../src/derive-mp3-key.ts"],"names":[],"mappings":"AAUA,wBAAgB,0BAA0B,CAAC,YAAY,EAAE,UAAU;;;;;;;;EAclE;AAED,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,UAAU,EAAE,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,GAAG,SAAS,GAAG,YAAY,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,GAAG,MAAM,CA6DlK;AAED,wBAAgB,UAAU,CAAC,QAAQ,EAAE,UAAU,CAAC,WAAW,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,GAAG,SAAS,GAAG,YAAY,GAAG,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,KAAK,IAAI,GAAG,UAAU,CAAC,WAAW,CAAC,CAyBvO"}
|
package/dist/derive-mp3-key.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.deriveMP3ParametersFromOMA = deriveMP3ParametersFromOMA;
|
|
4
|
+
exports.deriveMP3TrackKey = deriveMP3TrackKey;
|
|
5
|
+
exports.decryptMP3 = decryptMP3;
|
|
4
6
|
const bytemanip_1 = require("./bytemanip");
|
|
5
7
|
const encryption_1 = require("./encryption");
|
|
6
8
|
const id3_1 = require("./id3");
|
|
@@ -22,7 +24,6 @@ function deriveMP3ParametersFromOMA(mp3CodecInfo) {
|
|
|
22
24
|
const preemp = (cmb1 >> 2) & 3;
|
|
23
25
|
return { version, layer, bitrate, sample, chmod, preemp, flags };
|
|
24
26
|
}
|
|
25
|
-
exports.deriveMP3ParametersFromOMA = deriveMP3ParametersFromOMA;
|
|
26
27
|
function deriveMP3TrackKey(rawFile, callback) {
|
|
27
28
|
// Make sure we're dealing with an MP3 OMA file
|
|
28
29
|
let offset = 0;
|
|
@@ -82,7 +83,6 @@ function deriveMP3TrackKey(rawFile, callback) {
|
|
|
82
83
|
const matchedKey = allKeys[commonness.indexOf(Math.max(...commonness))];
|
|
83
84
|
return matchedKey;
|
|
84
85
|
}
|
|
85
|
-
exports.deriveMP3TrackKey = deriveMP3TrackKey;
|
|
86
86
|
function decryptMP3(fullFile, fileId, deviceKey, callback) {
|
|
87
87
|
const trackKey = (deviceKey ? (0, encryption_1.getMP3EncryptionKey)(deviceKey, fileId) : deriveMP3TrackKey(fullFile, callback ? (s, p) => callback(s, p, 127) : undefined)) >>> 0;
|
|
88
88
|
// Make sure we're dealing with an MP3 OMA file
|
|
@@ -106,4 +106,3 @@ function decryptMP3(fullFile, fileId, deviceKey, callback) {
|
|
|
106
106
|
}
|
|
107
107
|
return data;
|
|
108
108
|
}
|
|
109
|
-
exports.decryptMP3 = decryptMP3;
|
package/dist/devices.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"devices.d.ts","sourceRoot":"","sources":["../src/devices.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAE1C,MAAM,WAAW,kBAAkB;IAC/B,UAAU,EAAE,CAAC,MAAM,OAAO,MAAM,CAAC,EAAE,CAAC;CACvC;AAED,MAAM,WAAW,gBAAgB;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;IACxC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,YAAY,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,eAAO,MAAM,SAAS,EAAE,gBAAgB,
|
|
1
|
+
{"version":3,"file":"devices.d.ts","sourceRoot":"","sources":["../src/devices.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAE1C,MAAM,WAAW,kBAAkB;IAC/B,UAAU,EAAE,CAAC,MAAM,OAAO,MAAM,CAAC,EAAE,CAAC;CACvC;AAED,MAAM,WAAW,gBAAgB;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;IACxC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,YAAY,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,eAAO,MAAM,SAAS,EAAE,gBAAgB,EAgHvC,CAAC;AAEF,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,gBAAgB,GAAG,IAAI,CAE5E"}
|
package/dist/devices.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.DeviceIds = void 0;
|
|
4
|
+
exports.findDevice = findDevice;
|
|
4
5
|
exports.DeviceIds = [
|
|
5
6
|
{ vendorId: 0x054c, productId: 0x01ad, name: 'Sony NW-HD1 / NW-HD2' },
|
|
6
7
|
{ vendorId: 0x054c, productId: 0x0210, name: 'Sony NW-HD3' },
|
|
@@ -48,7 +49,8 @@ exports.DeviceIds = [
|
|
|
48
49
|
{
|
|
49
50
|
vendorId: 0x054c,
|
|
50
51
|
productId: 0x01FB,
|
|
51
|
-
name: 'Sony NW-E305',
|
|
52
|
+
name: 'Sony NW-E305 / NW-E507',
|
|
53
|
+
disableDRM: true,
|
|
52
54
|
databaseParameters: {
|
|
53
55
|
initLayers: ['stick_gtrlst'],
|
|
54
56
|
}
|
|
@@ -117,4 +119,3 @@ function findDevice(vid, pid) {
|
|
|
117
119
|
var _a;
|
|
118
120
|
return (_a = exports.DeviceIds.find(e => e.vendorId === vid && e.productId === pid)) !== null && _a !== void 0 ? _a : null;
|
|
119
121
|
}
|
|
120
|
-
exports.findDevice = findDevice;
|
package/dist/encryption.d.ts
CHANGED
|
@@ -5,12 +5,12 @@ export declare const EKBROOTS: {
|
|
|
5
5
|
};
|
|
6
6
|
export declare function importKeys(rawKeysContents: Uint8Array): void;
|
|
7
7
|
export declare function getMP3EncryptionKey(discId: number, trackNumber: number): number;
|
|
8
|
-
export declare function createTrackKeyForKeyring(ekbNum: number, verificationKey: Uint8Array, trackKey: Uint8Array): Uint8Array
|
|
9
|
-
export declare function createTrackKeyFromKeyring(ekbNum: number, encryptedVerificationKey: Uint8Array, encryptedTrackKey: Uint8Array): Uint8Array
|
|
10
|
-
export declare function createMaclistValue(ekbNum: number, verificationKey: Uint8Array, contents: Uint8Array): Uint8Array
|
|
11
|
-
export declare function retailMac(message: Uint8Array, key: Uint8Array): Uint8Array
|
|
12
|
-
export declare function createIcvMac(icvAndHeader: Uint8Array, sessionKey: Uint8Array): Uint8Array
|
|
13
|
-
export declare function createTrackMac2(trackKeyWa: Crypto.lib.WordArray, trackEntry: Uint8Array): Uint8Array
|
|
14
|
-
export declare function createTrackMac(trackKey: Uint8Array, trackEntry: Uint8Array): Uint8Array
|
|
15
|
-
export declare function desDecrypt(data: Uint8Array, key: Uint8Array): Uint8Array
|
|
8
|
+
export declare function createTrackKeyForKeyring(ekbNum: number, verificationKey: Uint8Array, trackKey: Uint8Array): Uint8Array<ArrayBuffer>;
|
|
9
|
+
export declare function createTrackKeyFromKeyring(ekbNum: number, encryptedVerificationKey: Uint8Array, encryptedTrackKey: Uint8Array): Uint8Array<ArrayBuffer>;
|
|
10
|
+
export declare function createMaclistValue(ekbNum: number, verificationKey: Uint8Array, contents: Uint8Array): Uint8Array<ArrayBuffer>;
|
|
11
|
+
export declare function retailMac(message: Uint8Array, key: Uint8Array): Uint8Array<ArrayBuffer>;
|
|
12
|
+
export declare function createIcvMac(icvAndHeader: Uint8Array, sessionKey: Uint8Array): Uint8Array<ArrayBuffer>;
|
|
13
|
+
export declare function createTrackMac2(trackKeyWa: Crypto.lib.WordArray, trackEntry: Uint8Array): Uint8Array<ArrayBuffer>;
|
|
14
|
+
export declare function createTrackMac(trackKey: Uint8Array, trackEntry: Uint8Array): Uint8Array<ArrayBuffer>;
|
|
15
|
+
export declare function desDecrypt(data: Uint8Array, key: Uint8Array): Uint8Array<ArrayBuffer>;
|
|
16
16
|
//# sourceMappingURL=encryption.d.ts.map
|
package/dist/encryption.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"encryption.d.ts","sourceRoot":"","sources":["../src/encryption.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,0BAA0B,CAAC;AAK9C,wBAAsB,UAAU,kBAG/B;AAGD,eAAO,MAAM,QAAQ,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,CAAA;CAExC,CAAC;AAEX,wBAAgB,UAAU,CAAC,eAAe,EAAE,UAAU,QAQrD;AAED,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,UAEtE;AAED,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,MAAM,EAAE,eAAe,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,
|
|
1
|
+
{"version":3,"file":"encryption.d.ts","sourceRoot":"","sources":["../src/encryption.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,0BAA0B,CAAC;AAK9C,wBAAsB,UAAU,kBAG/B;AAGD,eAAO,MAAM,QAAQ,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,CAAA;CAExC,CAAC;AAEX,wBAAgB,UAAU,CAAC,eAAe,EAAE,UAAU,QAQrD;AAED,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,UAEtE;AAED,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,MAAM,EAAE,eAAe,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,2BAsBzG;AAED,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,MAAM,EAAE,wBAAwB,EAAE,UAAU,EAAE,iBAAiB,EAAE,UAAU,2BAsB5H;AAED,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,EAAE,eAAe,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,2BAenG;AAID,wBAAgB,SAAS,CAAC,OAAO,EAAE,UAAU,EAAE,GAAG,EAAE,UAAU,2BAgB7D;AAED,wBAAgB,YAAY,CAAC,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,2BAM5E;AAED,wBAAgB,eAAe,CAAC,UAAU,EAAE,MAAM,CAAC,GAAG,CAAC,SAAS,EAAE,UAAU,EAAE,UAAU,2BAQvF;AAED,wBAAgB,cAAc,CAAC,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,2BAG1E;AAED,wBAAgB,UAAU,CAAC,IAAI,EAAE,UAAU,EAAE,GAAG,EAAE,UAAU,2BAE3D"}
|
package/dist/encryption.js
CHANGED
|
@@ -3,7 +3,18 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
6
|
+
exports.EKBROOTS = void 0;
|
|
7
|
+
exports.initCrypto = initCrypto;
|
|
8
|
+
exports.importKeys = importKeys;
|
|
9
|
+
exports.getMP3EncryptionKey = getMP3EncryptionKey;
|
|
10
|
+
exports.createTrackKeyForKeyring = createTrackKeyForKeyring;
|
|
11
|
+
exports.createTrackKeyFromKeyring = createTrackKeyFromKeyring;
|
|
12
|
+
exports.createMaclistValue = createMaclistValue;
|
|
13
|
+
exports.retailMac = retailMac;
|
|
14
|
+
exports.createIcvMac = createIcvMac;
|
|
15
|
+
exports.createTrackMac2 = createTrackMac2;
|
|
16
|
+
exports.createTrackMac = createTrackMac;
|
|
17
|
+
exports.desDecrypt = desDecrypt;
|
|
7
18
|
const crypto_js_wasm_1 = __importDefault(require("@originjs/crypto-js-wasm"));
|
|
8
19
|
const bytemanip_1 = require("./bytemanip");
|
|
9
20
|
const errors_1 = require("./errors");
|
|
@@ -12,7 +23,6 @@ async function initCrypto() {
|
|
|
12
23
|
await crypto_js_wasm_1.default.TripleDES.loadWasm();
|
|
13
24
|
await crypto_js_wasm_1.default.DES.loadWasm();
|
|
14
25
|
}
|
|
15
|
-
exports.initCrypto = initCrypto;
|
|
16
26
|
// prettier-ignore
|
|
17
27
|
exports.EKBROOTS = {
|
|
18
28
|
// <Redacted>
|
|
@@ -26,11 +36,9 @@ function importKeys(rawKeysContents) {
|
|
|
26
36
|
exports.EKBROOTS[ekbid] = rawKeysContents.slice(offset, offset += 3 * 8);
|
|
27
37
|
}
|
|
28
38
|
}
|
|
29
|
-
exports.importKeys = importKeys;
|
|
30
39
|
function getMP3EncryptionKey(discId, trackNumber) {
|
|
31
40
|
return ((trackNumber * 0x5296E435 + 0x2465) ^ discId) >>> 0;
|
|
32
41
|
}
|
|
33
|
-
exports.getMP3EncryptionKey = getMP3EncryptionKey;
|
|
34
42
|
function createTrackKeyForKeyring(ekbNum, verificationKey, trackKey) {
|
|
35
43
|
if (!(ekbNum in exports.EKBROOTS)) {
|
|
36
44
|
throw new errors_1.NWJSError('Requested decryption with an unknown EKB');
|
|
@@ -52,7 +60,6 @@ function createTrackKeyForKeyring(ekbNum, verificationKey, trackKey) {
|
|
|
52
60
|
});
|
|
53
61
|
return (0, utils_1.wordArrayToByteArray)(decryptedTrackKey, 8);
|
|
54
62
|
}
|
|
55
|
-
exports.createTrackKeyForKeyring = createTrackKeyForKeyring;
|
|
56
63
|
function createTrackKeyFromKeyring(ekbNum, encryptedVerificationKey, encryptedTrackKey) {
|
|
57
64
|
if (!(ekbNum in exports.EKBROOTS)) {
|
|
58
65
|
throw new errors_1.NWJSError('Requested decryption with an unknown EKB');
|
|
@@ -73,7 +80,6 @@ function createTrackKeyFromKeyring(ekbNum, encryptedVerificationKey, encryptedTr
|
|
|
73
80
|
}).ciphertext;
|
|
74
81
|
return (0, utils_1.wordArrayToByteArray)(decryptedTrackKey, 8);
|
|
75
82
|
}
|
|
76
|
-
exports.createTrackKeyFromKeyring = createTrackKeyFromKeyring;
|
|
77
83
|
function createMaclistValue(ekbNum, verificationKey, contents) {
|
|
78
84
|
if (!(ekbNum in exports.EKBROOTS)) {
|
|
79
85
|
throw new errors_1.NWJSError('Requested decryption with an unknown EKB');
|
|
@@ -88,7 +94,6 @@ function createMaclistValue(ekbNum, verificationKey, contents) {
|
|
|
88
94
|
});
|
|
89
95
|
return createTrackMac2(decryptedVerificationKey, contents);
|
|
90
96
|
}
|
|
91
|
-
exports.createMaclistValue = createMaclistValue;
|
|
92
97
|
const NO_PADDING = { pad: (a) => a, unpad: (a) => a };
|
|
93
98
|
function retailMac(message, key) {
|
|
94
99
|
const keyA = key.subarray(0, 8);
|
|
@@ -107,7 +112,6 @@ function retailMac(message, key) {
|
|
|
107
112
|
const final = crypto_js_wasm_1.default.DES.encrypt(encB, keyAWa, { padding: NO_PADDING, mode: crypto_js_wasm_1.default.mode.ECB }).ciphertext;
|
|
108
113
|
return (0, utils_1.wordArrayToByteArray)(final);
|
|
109
114
|
}
|
|
110
|
-
exports.retailMac = retailMac;
|
|
111
115
|
function createIcvMac(icvAndHeader, sessionKey) {
|
|
112
116
|
const icvWa = crypto_js_wasm_1.default.lib.WordArray.create(icvAndHeader);
|
|
113
117
|
const sessionKeyWa = crypto_js_wasm_1.default.lib.WordArray.create(sessionKey);
|
|
@@ -115,7 +119,6 @@ function createIcvMac(icvAndHeader, sessionKey) {
|
|
|
115
119
|
const result = crypto_js_wasm_1.default.DES.encrypt(icvWa, sessionKeyWa, { mode: crypto_js_wasm_1.default.mode.CBC, iv: zeroWa, padding: NO_PADDING });
|
|
116
120
|
return (0, utils_1.wordArrayToByteArray)(result.ciphertext).subarray(-8);
|
|
117
121
|
}
|
|
118
|
-
exports.createIcvMac = createIcvMac;
|
|
119
122
|
function createTrackMac2(trackKeyWa, trackEntry) {
|
|
120
123
|
const trackEntryWa = crypto_js_wasm_1.default.lib.WordArray.create(trackEntry);
|
|
121
124
|
const macKeySourceWa = crypto_js_wasm_1.default.lib.WordArray.create(new Uint8Array(8).fill(0));
|
|
@@ -124,13 +127,10 @@ function createTrackMac2(trackKeyWa, trackEntry) {
|
|
|
124
127
|
const mac = crypto_js_wasm_1.default.DES.encrypt(trackEntryWa, macKey, { mode: crypto_js_wasm_1.default.mode.CBC, iv: zeroWa, padding: NO_PADDING });
|
|
125
128
|
return (0, utils_1.wordArrayToByteArray)(mac.ciphertext).subarray(-8);
|
|
126
129
|
}
|
|
127
|
-
exports.createTrackMac2 = createTrackMac2;
|
|
128
130
|
function createTrackMac(trackKey, trackEntry) {
|
|
129
131
|
const trackKeyWa = crypto_js_wasm_1.default.lib.WordArray.create(trackKey);
|
|
130
132
|
return createTrackMac2(trackKeyWa, trackEntry);
|
|
131
133
|
}
|
|
132
|
-
exports.createTrackMac = createTrackMac;
|
|
133
134
|
function desDecrypt(data, key) {
|
|
134
135
|
return (0, utils_1.wordArrayToByteArray)(crypto_js_wasm_1.default.TripleDES.decrypt(crypto_js_wasm_1.default.lib.CipherParams.create({ ciphertext: crypto_js_wasm_1.default.lib.WordArray.create(data) }), crypto_js_wasm_1.default.lib.WordArray.create(key), { mode: crypto_js_wasm_1.default.mode.ECB, iv: crypto_js_wasm_1.default.lib.WordArray.create(new Uint8Array(8).fill(0)) }), data.length);
|
|
135
136
|
}
|
|
136
|
-
exports.desDecrypt = desDecrypt;
|
|
@@ -2,37 +2,38 @@ import { HiMDFile, HiMDFilesystem, SonyVendorUSMCDriver, UMSCHiMDFilesystem } fr
|
|
|
2
2
|
import { WebUSBDevice } from 'usb';
|
|
3
3
|
export declare class SonyVendorNWJSUSMCDriver extends SonyVendorUSMCDriver {
|
|
4
4
|
constructor(webUSB: WebUSBDevice);
|
|
5
|
-
protected drmRead(param: number, length: number): Promise<Uint8Array
|
|
5
|
+
protected drmRead(param: number, length: number): Promise<Uint8Array<ArrayBuffer>>;
|
|
6
6
|
protected drmWrite(param: number, data: Uint8Array): Promise<void>;
|
|
7
7
|
getDiscID(): Promise<Uint8Array>;
|
|
8
8
|
writeHostLeafID(leafID: Uint8Array, hostNonce: Uint8Array): Promise<void>;
|
|
9
9
|
getAuthenticationStage2Info(): Promise<{
|
|
10
|
-
discId: Uint8Array
|
|
11
|
-
mac: Uint8Array
|
|
12
|
-
deviceLeafId: Uint8Array
|
|
13
|
-
deviceNonce: Uint8Array
|
|
10
|
+
discId: Uint8Array<ArrayBuffer>;
|
|
11
|
+
mac: Uint8Array<ArrayBuffer>;
|
|
12
|
+
deviceLeafId: Uint8Array<ArrayBuffer>;
|
|
13
|
+
deviceNonce: Uint8Array<ArrayBuffer>;
|
|
14
14
|
}>;
|
|
15
15
|
writeAuthenticationStage3Info(hostMac: Uint8Array): Promise<void>;
|
|
16
16
|
readMasterKey(): Promise<{
|
|
17
|
-
header: Uint8Array
|
|
18
|
-
masterKey: Uint8Array
|
|
17
|
+
header: Uint8Array<ArrayBuffer>;
|
|
18
|
+
masterKey: Uint8Array<ArrayBuffer>;
|
|
19
19
|
}>;
|
|
20
20
|
writeMasterKeyAndMac(generation: number, masterKey: Uint8Array, mac: Uint8Array, sessionKey: Uint8Array): Promise<void>;
|
|
21
21
|
}
|
|
22
|
+
type _Uint8Array = Uint8Array<ArrayBuffer>;
|
|
22
23
|
export declare class UMSCNWJSSession {
|
|
23
24
|
protected driver: SonyVendorNWJSUSMCDriver;
|
|
24
25
|
protected fs: HiMDFilesystem;
|
|
25
|
-
hostNonce: Uint8Array
|
|
26
|
-
hostLeafId: Uint8Array
|
|
27
|
-
deviceNonce?:
|
|
28
|
-
discId?:
|
|
29
|
-
deviceLeafId?:
|
|
30
|
-
currentIcv?:
|
|
31
|
-
currentIcvHeader?:
|
|
32
|
-
sessionKey?:
|
|
26
|
+
hostNonce: Uint8Array<ArrayBuffer>;
|
|
27
|
+
hostLeafId: Uint8Array<ArrayBuffer>;
|
|
28
|
+
deviceNonce?: _Uint8Array;
|
|
29
|
+
discId?: _Uint8Array;
|
|
30
|
+
deviceLeafId?: _Uint8Array;
|
|
31
|
+
currentIcv?: _Uint8Array;
|
|
32
|
+
currentIcvHeader?: _Uint8Array;
|
|
33
|
+
sessionKey?: _Uint8Array;
|
|
33
34
|
mclistHandle?: HiMDFile;
|
|
34
35
|
currentGeneration?: number;
|
|
35
|
-
allMacs?:
|
|
36
|
+
allMacs?: _Uint8Array;
|
|
36
37
|
constructor(driver: SonyVendorNWJSUSMCDriver, fs: HiMDFilesystem);
|
|
37
38
|
performAuthorization(): Promise<void>;
|
|
38
39
|
finalizeSession(): Promise<void>;
|
|
@@ -44,4 +45,5 @@ export declare class UMSCNWJSFilesystem extends UMSCHiMDFilesystem {
|
|
|
44
45
|
constructor(webUSB: WebUSBDevice, partition?: number | null);
|
|
45
46
|
protected initFS(bypassCoherencyChecks?: boolean | undefined): Promise<void>;
|
|
46
47
|
}
|
|
48
|
+
export {};
|
|
47
49
|
//# sourceMappingURL=usb-mass-storage-webusb-filesystem.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usb-mass-storage-webusb-filesystem.d.ts","sourceRoot":"","sources":["../../src/filesystem/usb-mass-storage-webusb-filesystem.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAI7F,OAAO,EAAE,YAAY,EAAE,MAAM,KAAK,CAAC;AAKnC,qBAAa,wBAAyB,SAAQ,oBAAoB;gBAClD,MAAM,EAAE,YAAY;cAIhB,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;
|
|
1
|
+
{"version":3,"file":"usb-mass-storage-webusb-filesystem.d.ts","sourceRoot":"","sources":["../../src/filesystem/usb-mass-storage-webusb-filesystem.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAI7F,OAAO,EAAE,YAAY,EAAE,MAAM,KAAK,CAAC;AAKnC,qBAAa,wBAAyB,SAAQ,oBAAoB;gBAClD,MAAM,EAAE,YAAY;cAIhB,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;cAuBxE,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU;IA2BlD,SAAS,IAAI,OAAO,CAAC,UAAU,CAAC;IAIhC,eAAe,CAAC,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU;IASzD,2BAA2B;;;;;;IAoB3B,6BAA6B,CAAC,OAAO,EAAE,UAAU;IAyBjD,aAAa;;;;IAWb,oBAAoB,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,GAAG,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU;CAuBhH;AACD,KAAK,WAAW,GAAG,UAAU,CAAC,WAAW,CAAC,CAAC;AAE3C,qBAAa,eAAe;IAgBZ,SAAS,CAAC,MAAM,EAAE,wBAAwB;IAAE,SAAS,CAAC,EAAE,EAAE,cAAc;IAfpF,SAAS,0BAAuB;IAChC,UAAU,0BAAoE;IAE9E,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,YAAY,CAAC,EAAE,WAAW,CAAC;IAC3B,UAAU,CAAC,EAAE,WAAW,CAAC;IACzB,gBAAgB,CAAC,EAAE,WAAW,CAAC;IAC/B,UAAU,CAAC,EAAE,WAAW,CAAC;IAEzB,YAAY,CAAC,EAAE,QAAQ,CAAC;IACxB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B,OAAO,CAAC,EAAE,WAAW,CAAC;gBAEA,MAAM,EAAE,wBAAwB,EAAY,EAAE,EAAE,cAAc;IAEvE,oBAAoB;IAkBpB,eAAe;IAYrB,aAAa,CAAC,WAAW,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU;CAG5D;AAED,qBAAa,kBAAmB,SAAQ,kBAAkB;IAEpB,OAAO,CAAC,SAAS;IADnD,MAAM,EAAE,wBAAwB,CAAC;gBACrB,MAAM,EAAE,YAAY,EAAU,SAAS,GAAE,MAAM,GAAG,IAAQ;cAKtD,MAAM,CAAC,qBAAqB,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC;CAYrF"}
|
|
@@ -119,12 +119,12 @@ class SonyVendorNWJSUSMCDriver extends himd_js_1.SonyVendorUSMCDriver {
|
|
|
119
119
|
// mac = 0x9e, 0x29, 0xe4, 0xa3, 0x4f, 0x8d, 0x43, 0xc7
|
|
120
120
|
const generationBytes = (0, bytemanip_1.writeUint32)(generation);
|
|
121
121
|
const theSonySoup = new Uint8Array([
|
|
122
|
-
0x00, 0x20, 0x00, 0x98,
|
|
123
|
-
...generationBytes,
|
|
124
|
-
0x00, 0x00, 0x00, 0x00,
|
|
125
|
-
0x00, 0x01, 0x00, 0x21,
|
|
126
|
-
...masterKey,
|
|
127
|
-
...mac,
|
|
122
|
+
0x00, 0x20, 0x00, 0x98, // Rewrite
|
|
123
|
+
...generationBytes, // Generation data
|
|
124
|
+
0x00, 0x00, 0x00, 0x00, // ???
|
|
125
|
+
0x00, 0x01, 0x00, 0x21, // Authenticate using ekb 00010021
|
|
126
|
+
...masterKey, // The key
|
|
127
|
+
...mac, // MAC over the MACLIST, bound to device
|
|
128
128
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
|
129
129
|
]);
|
|
130
130
|
theSonySoup.set((0, bytemanip_1.writeUint32)(generation), 4);
|
package/dist/id3.d.ts
CHANGED
|
@@ -22,12 +22,12 @@ export declare function readInitialID3Header(buffer: Uint8Array): {
|
|
|
22
22
|
export declare function parse(buffer: Uint8Array): ID3Tags & {
|
|
23
23
|
size: number;
|
|
24
24
|
};
|
|
25
|
-
export declare function serialize(tags: ID3Tags, constSize?: number): Uint8Array
|
|
26
|
-
export declare function encodeUTF16BEStringEA3(source: string, includeType?: boolean): Uint8Array
|
|
27
|
-
export declare function encodeSonyWeirdString(type: string, data: string): Uint8Array
|
|
25
|
+
export declare function serialize(tags: ID3Tags, constSize?: number): Uint8Array<ArrayBuffer>;
|
|
26
|
+
export declare function encodeUTF16BEStringEA3(source: string, includeType?: boolean): Uint8Array<ArrayBuffer>;
|
|
27
|
+
export declare function encodeSonyWeirdString(type: string, data: string): Uint8Array<ArrayBuffer>;
|
|
28
28
|
export declare function createCommonID3Tags(titleInfo: InboundTrackMetadata): {
|
|
29
29
|
id: string;
|
|
30
|
-
contents: Uint8Array
|
|
30
|
+
contents: Uint8Array<ArrayBuffer>;
|
|
31
31
|
flags: number;
|
|
32
32
|
}[];
|
|
33
33
|
//# sourceMappingURL=id3.d.ts.map
|
package/dist/id3.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"id3.d.ts","sourceRoot":"","sources":["../src/id3.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAiB,MAAM,aAAa,CAAC;AAGlE,MAAM,WAAW,MAAM;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,UAAU,CAAC;CACxB;AAED,MAAM,WAAW,OAAO;IACpB,OAAO,EAAE;QACL,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,MAAM,CAAC;KACjB,CAAC;IACF,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;CACjB;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAYnF;AAKD,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,UAAU,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAiBtH;AAED,wBAAgB,KAAK,CAAC,MAAM,EAAE,UAAU,GAAG,OAAO,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAgDpE;AAWD,wBAAgB,SAAS,CAAC,IAAI,EAAE,OAAO,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,UAAU,
|
|
1
|
+
{"version":3,"file":"id3.d.ts","sourceRoot":"","sources":["../src/id3.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAiB,MAAM,aAAa,CAAC;AAGlE,MAAM,WAAW,MAAM;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,UAAU,CAAC;CACxB;AAED,MAAM,WAAW,OAAO;IACpB,OAAO,EAAE;QACL,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,MAAM,CAAC;KACjB,CAAC;IACF,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;CACjB;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAYnF;AAKD,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,UAAU,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAiBtH;AAED,wBAAgB,KAAK,CAAC,MAAM,EAAE,UAAU,GAAG,OAAO,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAgDpE;AAWD,wBAAgB,SAAS,CAAC,IAAI,EAAE,OAAO,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC,WAAW,CAAC,CA8CpF;AAED,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,UAAO,2BAgCxE;AAED,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,2BAM/D;AAED,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,oBAAoB;;;;IAYlE"}
|
package/dist/id3.js
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.readSynchsafeInt32 = readSynchsafeInt32;
|
|
4
|
+
exports.readInitialID3Header = readInitialID3Header;
|
|
5
|
+
exports.parse = parse;
|
|
6
|
+
exports.serialize = serialize;
|
|
7
|
+
exports.encodeUTF16BEStringEA3 = encodeUTF16BEStringEA3;
|
|
8
|
+
exports.encodeSonyWeirdString = encodeSonyWeirdString;
|
|
9
|
+
exports.createCommonID3Tags = createCommonID3Tags;
|
|
4
10
|
const bytemanip_1 = require("./bytemanip");
|
|
5
11
|
const utils_1 = require("./utils");
|
|
6
12
|
function readSynchsafeInt32(data, offset) {
|
|
@@ -16,7 +22,6 @@ function readSynchsafeInt32(data, offset) {
|
|
|
16
22
|
value |= byte & 0x7F;
|
|
17
23
|
return [value, offset];
|
|
18
24
|
}
|
|
19
|
-
exports.readSynchsafeInt32 = readSynchsafeInt32;
|
|
20
25
|
;
|
|
21
26
|
const textDecoder = new TextDecoder();
|
|
22
27
|
const textEncoder = new TextEncoder();
|
|
@@ -36,7 +41,6 @@ function readInitialID3Header(buffer) {
|
|
|
36
41
|
[size, offset] = readSynchsafeInt32(data, offset);
|
|
37
42
|
return { major, minor, size, flags };
|
|
38
43
|
}
|
|
39
|
-
exports.readInitialID3Header = readInitialID3Header;
|
|
40
44
|
function parse(buffer) {
|
|
41
45
|
const data = new DataView(buffer.buffer);
|
|
42
46
|
let offset = 0;
|
|
@@ -79,7 +83,6 @@ function parse(buffer) {
|
|
|
79
83
|
size,
|
|
80
84
|
};
|
|
81
85
|
}
|
|
82
|
-
exports.parse = parse;
|
|
83
86
|
;
|
|
84
87
|
function writeSynchsafeInt32(value) {
|
|
85
88
|
const array = new Uint8Array(4);
|
|
@@ -129,7 +132,6 @@ function serialize(tags, constSize) {
|
|
|
129
132
|
}
|
|
130
133
|
return result;
|
|
131
134
|
}
|
|
132
|
-
exports.serialize = serialize;
|
|
133
135
|
;
|
|
134
136
|
function encodeUTF16BEStringEA3(source, includeType = true) {
|
|
135
137
|
const rawArr = includeType ? [2] : []; // 2 - marker - UTF16BE
|
|
@@ -159,7 +161,6 @@ function encodeUTF16BEStringEA3(source, includeType = true) {
|
|
|
159
161
|
}
|
|
160
162
|
return new Uint8Array(rawArr);
|
|
161
163
|
}
|
|
162
|
-
exports.encodeUTF16BEStringEA3 = encodeUTF16BEStringEA3;
|
|
163
164
|
function encodeSonyWeirdString(type, data) {
|
|
164
165
|
return (0, utils_1.concatUint8Arrays)([
|
|
165
166
|
encodeUTF16BEStringEA3(type),
|
|
@@ -167,7 +168,6 @@ function encodeSonyWeirdString(type, data) {
|
|
|
167
168
|
encodeUTF16BEStringEA3(data, false),
|
|
168
169
|
]);
|
|
169
170
|
}
|
|
170
|
-
exports.encodeSonyWeirdString = encodeSonyWeirdString;
|
|
171
171
|
function createCommonID3Tags(titleInfo) {
|
|
172
172
|
var _a;
|
|
173
173
|
return [
|
|
@@ -182,4 +182,3 @@ function createCommonID3Tags(titleInfo) {
|
|
|
182
182
|
{ id: "TXXX", contents: encodeSonyWeirdString("OMG_TIT2S", titleInfo.title), flags: 0 },
|
|
183
183
|
];
|
|
184
184
|
}
|
|
185
|
-
exports.createCommonID3Tags = createCommonID3Tags;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export * from './filesystem';
|
|
2
|
-
export * from './helpers';
|
|
3
2
|
export * from './bytemanip';
|
|
4
3
|
export * from './databases';
|
|
5
4
|
export * from './database-abstraction';
|
|
@@ -7,5 +6,6 @@ export * from './sort';
|
|
|
7
6
|
export * from './tagged-oma';
|
|
8
7
|
export * from './devices';
|
|
9
8
|
export * from './derive-mp3-key';
|
|
9
|
+
export { resolvePathFromGlobalIndex } from './utils';
|
|
10
10
|
export { importKeys, initCrypto } from './encryption';
|
|
11
11
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,wBAAwB,CAAC;AACvC,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,kBAAkB,CAAC;AACjC,OAAO,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -14,9 +14,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.initCrypto = exports.importKeys = void 0;
|
|
17
|
+
exports.initCrypto = exports.importKeys = exports.resolvePathFromGlobalIndex = void 0;
|
|
18
18
|
__exportStar(require("./filesystem"), exports);
|
|
19
|
-
__exportStar(require("./helpers"), exports);
|
|
20
19
|
__exportStar(require("./bytemanip"), exports);
|
|
21
20
|
__exportStar(require("./databases"), exports);
|
|
22
21
|
__exportStar(require("./database-abstraction"), exports);
|
|
@@ -24,6 +23,8 @@ __exportStar(require("./sort"), exports);
|
|
|
24
23
|
__exportStar(require("./tagged-oma"), exports);
|
|
25
24
|
__exportStar(require("./devices"), exports);
|
|
26
25
|
__exportStar(require("./derive-mp3-key"), exports);
|
|
26
|
+
var utils_1 = require("./utils");
|
|
27
|
+
Object.defineProperty(exports, "resolvePathFromGlobalIndex", { enumerable: true, get: function () { return utils_1.resolvePathFromGlobalIndex; } });
|
|
27
28
|
var encryption_1 = require("./encryption");
|
|
28
29
|
Object.defineProperty(exports, "importKeys", { enumerable: true, get: function () { return encryption_1.importKeys; } });
|
|
29
30
|
Object.defineProperty(exports, "initCrypto", { enumerable: true, get: function () { return encryption_1.initCrypto; } });
|
package/dist/init-data.d.ts
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type InitializationLayer = {
|
|
2
2
|
[fileName: string]: Uint8Array;
|
|
3
3
|
};
|
|
4
4
|
export declare const LAYERS: {
|
|
5
5
|
root: {
|
|
6
|
-
"00010021.DAT": Uint8Array
|
|
7
|
-
"00GTRLST.DAT": Uint8Array
|
|
8
|
-
"01TREE01.DAT": Uint8Array
|
|
9
|
-
"01TREE02.DAT": Uint8Array
|
|
10
|
-
"01TREE03.DAT": Uint8Array
|
|
11
|
-
"01TREE04.DAT": Uint8Array
|
|
12
|
-
"02TREINF.DAT": Uint8Array
|
|
13
|
-
"03GINF01.DAT": Uint8Array
|
|
14
|
-
"03GINF02.DAT": Uint8Array
|
|
15
|
-
"03GINF03.DAT": Uint8Array
|
|
16
|
-
"03GINF04.DAT": Uint8Array
|
|
17
|
-
"04CNTINF.DAT": Uint8Array
|
|
18
|
-
"05CHINDC.DAT": Uint8Array
|
|
6
|
+
"00010021.DAT": Uint8Array<ArrayBuffer>;
|
|
7
|
+
"00GTRLST.DAT": Uint8Array<ArrayBuffer>;
|
|
8
|
+
"01TREE01.DAT": Uint8Array<ArrayBuffer>;
|
|
9
|
+
"01TREE02.DAT": Uint8Array<ArrayBuffer>;
|
|
10
|
+
"01TREE03.DAT": Uint8Array<ArrayBuffer>;
|
|
11
|
+
"01TREE04.DAT": Uint8Array<ArrayBuffer>;
|
|
12
|
+
"02TREINF.DAT": Uint8Array<ArrayBuffer>;
|
|
13
|
+
"03GINF01.DAT": Uint8Array<ArrayBuffer>;
|
|
14
|
+
"03GINF02.DAT": Uint8Array<ArrayBuffer>;
|
|
15
|
+
"03GINF03.DAT": Uint8Array<ArrayBuffer>;
|
|
16
|
+
"03GINF04.DAT": Uint8Array<ArrayBuffer>;
|
|
17
|
+
"04CNTINF.DAT": Uint8Array<ArrayBuffer>;
|
|
18
|
+
"05CHINDC.DAT": Uint8Array<ArrayBuffer>;
|
|
19
19
|
};
|
|
20
20
|
stick_gtrlst: {
|
|
21
|
-
"00GTRLST.DAT": Uint8Array
|
|
21
|
+
"00GTRLST.DAT": Uint8Array<ArrayBuffer>;
|
|
22
22
|
};
|
|
23
23
|
needs_cid: {
|
|
24
|
-
"05CIDLST.DAT": Uint8Array
|
|
24
|
+
"05CIDLST.DAT": Uint8Array<ArrayBuffer>;
|
|
25
25
|
};
|
|
26
26
|
};
|
|
27
27
|
//# sourceMappingURL=init-data.d.ts.map
|
package/dist/init-data.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init-data.d.ts","sourceRoot":"","sources":["../src/init-data.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"init-data.d.ts","sourceRoot":"","sources":["../src/init-data.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,mBAAmB,GAAG;IAAE,CAAC,QAAQ,EAAE,MAAM,GAAG,UAAU,CAAA;CAAE,CAAC;AAErE,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;CAsBlB,CAAC"}
|
package/dist/initialization.js
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
// This file's job is to create the initial structures required to get a brand new (or formatted)
|
|
3
3
|
// Sony NW to work.
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
exports.
|
|
5
|
+
exports.initializeNW = initializeNW;
|
|
6
|
+
exports.initializeIfNeeded = initializeIfNeeded;
|
|
6
7
|
const init_data_1 = require("./init-data");
|
|
7
8
|
function constructFinalContents(layerNames) {
|
|
8
9
|
const currentOverlayed = { ...init_data_1.LAYERS.root };
|
|
@@ -31,7 +32,6 @@ async function initializeNW(filesystem, initLayers) {
|
|
|
31
32
|
await maclist.close();
|
|
32
33
|
console.log(`Initializing complete!`);
|
|
33
34
|
}
|
|
34
|
-
exports.initializeNW = initializeNW;
|
|
35
35
|
async function initializeIfNeeded(filesystem, initLayers) {
|
|
36
36
|
const rootContents = await filesystem.list("/");
|
|
37
37
|
if (!rootContents.find(e => e.type === 'directory' && e.name === '/OMGAUDIO')) {
|
|
@@ -39,4 +39,3 @@ async function initializeIfNeeded(filesystem, initLayers) {
|
|
|
39
39
|
await initializeNW(filesystem, initLayers);
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
|
-
exports.initializeIfNeeded = initializeIfNeeded;
|
package/dist/mp3.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.generateMP3CodecField = generateMP3CodecField;
|
|
4
|
+
exports.createMP3OMAFile = createMP3OMAFile;
|
|
5
|
+
exports.updateMP3Metadata = updateMP3Metadata;
|
|
4
6
|
const mp3_parser_1 = require("mp3-parser");
|
|
5
7
|
const bytemanip_1 = require("./bytemanip");
|
|
6
8
|
const codecs_1 = require("./codecs");
|
|
@@ -98,7 +100,6 @@ function generateMP3CodecField(mp3Data) {
|
|
|
98
100
|
frames: frameCount,
|
|
99
101
|
};
|
|
100
102
|
}
|
|
101
|
-
exports.generateMP3CodecField = generateMP3CodecField;
|
|
102
103
|
const METADATA_BLOCK_SIZE = 0x1000;
|
|
103
104
|
function createMP3OMAFile(index, metadata, rawFile, deviceKey, codec) {
|
|
104
105
|
// Strip all ID3 tags from the source MP3 file
|
|
@@ -141,7 +142,6 @@ function createMP3OMAFile(index, metadata, rawFile, deviceKey, codec) {
|
|
|
141
142
|
}
|
|
142
143
|
return finalFileBuffer;
|
|
143
144
|
}
|
|
144
|
-
exports.createMP3OMAFile = createMP3OMAFile;
|
|
145
145
|
async function updateMP3Metadata(file, titleInfo) {
|
|
146
146
|
// Check if this is a valid file.
|
|
147
147
|
await file.seek(0);
|
|
@@ -162,4 +162,3 @@ async function updateMP3Metadata(file, titleInfo) {
|
|
|
162
162
|
await file.seek(0);
|
|
163
163
|
await file.write(newEA3);
|
|
164
164
|
}
|
|
165
|
-
exports.updateMP3Metadata = updateMP3Metadata;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { WebUSBDevice } from "usb";
|
|
2
2
|
import { UMSCNWJSFilesystem } from "./filesystem";
|
|
3
3
|
import { DeviceDefinition } from "./devices";
|
|
4
|
-
export declare function resolvePathFromGlobalIndex(globalTrackIndex: number): string;
|
|
5
4
|
export declare function createNWJSFS(device: {
|
|
6
5
|
dev: WebUSBDevice;
|
|
7
6
|
definition: DeviceDefinition;
|
|
@@ -10,4 +9,4 @@ export declare function openNewDeviceNode(): Promise<{
|
|
|
10
9
|
dev: WebUSBDevice;
|
|
11
10
|
definition: DeviceDefinition;
|
|
12
11
|
} | null>;
|
|
13
|
-
//# sourceMappingURL=helpers.d.ts.map
|
|
12
|
+
//# sourceMappingURL=node-helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node-helpers.d.ts","sourceRoot":"","sources":["../src/node-helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAkB,MAAM,KAAK,CAAC;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAElD,OAAO,EAAE,gBAAgB,EAAa,MAAM,WAAW,CAAC;AAGxD,wBAAsB,YAAY,CAAC,MAAM,EAAE;IAAE,GAAG,EAAE,YAAY,CAAC;IAAC,UAAU,EAAE,gBAAgB,CAAA;CAAE,+BAO7F;AAED,wBAAsB,iBAAiB,IAAI,OAAO,CAAC;IAAE,GAAG,EAAE,YAAY,CAAC;IAAC,UAAU,EAAE,gBAAgB,CAAA;CAAE,GAAG,IAAI,CAAC,CA2B7G"}
|
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.createNWJSFS = createNWJSFS;
|
|
4
|
+
exports.openNewDeviceNode = openNewDeviceNode;
|
|
4
5
|
const usb_1 = require("usb");
|
|
5
6
|
const filesystem_1 = require("./filesystem");
|
|
6
|
-
const utils_1 = require("./utils");
|
|
7
7
|
const devices_1 = require("./devices");
|
|
8
8
|
const initialization_1 = require("./initialization");
|
|
9
|
-
function resolvePathFromGlobalIndex(globalTrackIndex) {
|
|
10
|
-
return (0, utils_1.join)('OMGAUDIO', `10F${(globalTrackIndex >> 8).toString(16).padStart(2, '0')}`, '1000' + globalTrackIndex.toString(16).padStart(4, '0').toUpperCase() + '.OMA');
|
|
11
|
-
}
|
|
12
|
-
exports.resolvePathFromGlobalIndex = resolvePathFromGlobalIndex;
|
|
13
9
|
async function createNWJSFS(device) {
|
|
14
10
|
var _a, _b;
|
|
15
11
|
// Connect into the HiMD codebase
|
|
@@ -18,7 +14,6 @@ async function createNWJSFS(device) {
|
|
|
18
14
|
await (0, initialization_1.initializeIfNeeded)(fs, (_b = (_a = device.definition.databaseParameters) === null || _a === void 0 ? void 0 : _a.initLayers) !== null && _b !== void 0 ? _b : []);
|
|
19
15
|
return fs;
|
|
20
16
|
}
|
|
21
|
-
exports.createNWJSFS = createNWJSFS;
|
|
22
17
|
async function openNewDeviceNode() {
|
|
23
18
|
let legacyDevice, definition = null;
|
|
24
19
|
for (let dev of devices_1.DeviceIds) {
|
|
@@ -45,4 +40,3 @@ async function openNewDeviceNode() {
|
|
|
45
40
|
await webUsbDevice.open();
|
|
46
41
|
return { dev: webUsbDevice, definition };
|
|
47
42
|
}
|
|
48
|
-
exports.openNewDeviceNode = openNewDeviceNode;
|
package/dist/sort.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type ComplexSortGroupedResult<T> = T[] | {
|
|
2
2
|
name: string;
|
|
3
3
|
contents: ComplexSortGroupedResult<T>;
|
|
4
4
|
__complexSortGroupedResult: 1;
|
|
5
5
|
}[];
|
|
6
|
-
export
|
|
6
|
+
export type ComplexSortFormatPart = {
|
|
7
7
|
var: string;
|
|
8
8
|
} | {
|
|
9
9
|
literal: string;
|
package/dist/sort.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sort.d.ts","sourceRoot":"","sources":["../src/sort.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"sort.d.ts","sourceRoot":"","sources":["../src/sort.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,wBAAwB,CAAC,CAAC,IAClC,CAAC,EAAE,GACH;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,wBAAwB,CAAC,CAAC,CAAC,CAAC;IAAC,0BAA0B,EAAE,CAAC,CAAA;CAAE,EAAE,CAAC;AAE7F,MAAM,MAAM,qBAAqB,GAAG;IAAE,GAAG,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAE1E,wBAAgB,WAAW,CAAC,CAAC,EACzB,MAAM,EAAE,qBAAqB,EAAE,EAAE,EACjC,IAAI,EAAE,CAAC,EAAE,GACV,wBAAwB,CAAC,CAAC,CAAC,CAwC7B;AAED,wBAAgB,OAAO,CAAC,CAAC,EAAE,IAAI,EAAE,wBAAwB,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAcjE"}
|
package/dist/sort.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.complexSort = complexSort;
|
|
4
|
+
exports.flatten = flatten;
|
|
4
5
|
function complexSort(format, data) {
|
|
5
6
|
function createFieldForFormat(format, entry) {
|
|
6
7
|
let str = "";
|
|
@@ -42,7 +43,6 @@ function complexSort(format, data) {
|
|
|
42
43
|
}));
|
|
43
44
|
}
|
|
44
45
|
}
|
|
45
|
-
exports.complexSort = complexSort;
|
|
46
46
|
function flatten(data) {
|
|
47
47
|
let finalArray = [];
|
|
48
48
|
if (!data.length)
|
|
@@ -59,4 +59,3 @@ function flatten(data) {
|
|
|
59
59
|
}
|
|
60
60
|
return finalArray;
|
|
61
61
|
}
|
|
62
|
-
exports.flatten = flatten;
|
package/dist/tables.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.parseTable = parseTable;
|
|
4
|
+
exports.serializeTable = serializeTable;
|
|
4
5
|
const bytemanip_1 = require("./bytemanip");
|
|
5
6
|
const utils_1 = require("./utils");
|
|
6
7
|
function parseTable(tableFileContents) {
|
|
@@ -45,7 +46,6 @@ function parseTable(tableFileContents) {
|
|
|
45
46
|
}
|
|
46
47
|
return { classes: classDefinitions, contents: classContents, name: tableName };
|
|
47
48
|
}
|
|
48
|
-
exports.parseTable = parseTable;
|
|
49
49
|
function serializeTable(tableFile, writeSecondLength = true) {
|
|
50
50
|
const textEncoder = new TextEncoder();
|
|
51
51
|
// Recalculate lengths and starting addresses.
|
|
@@ -101,4 +101,3 @@ function serializeTable(tableFile, writeSecondLength = true) {
|
|
|
101
101
|
}
|
|
102
102
|
return data;
|
|
103
103
|
}
|
|
104
|
-
exports.serializeTable = serializeTable;
|
package/dist/tagged-oma.d.ts
CHANGED
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
import { HiMDCodec, HiMDFile } from "himd-js";
|
|
2
2
|
import { InboundTrackMetadata, TrackMetadata } from './databases';
|
|
3
|
+
type _Uint8Array = Uint8Array<ArrayBuffer>;
|
|
3
4
|
export interface OmaFile {
|
|
4
5
|
data: Uint8Array;
|
|
5
6
|
duration: number;
|
|
6
7
|
maclistValue?: Uint8Array;
|
|
7
8
|
}
|
|
8
|
-
export declare function createTaggedEncryptedOMA(rawData:
|
|
9
|
+
export declare function createTaggedEncryptedOMA(rawData: _Uint8Array, titleInfo: InboundTrackMetadata, codec: {
|
|
9
10
|
codecId: HiMDCodec;
|
|
10
11
|
codecInfo: Uint8Array;
|
|
11
12
|
}): OmaFile;
|
|
12
|
-
export declare function createTaggedOMA(rawData:
|
|
13
|
+
export declare function createTaggedOMA(rawData: _Uint8Array, titleInfo: InboundTrackMetadata, codec: {
|
|
13
14
|
codecId: HiMDCodec;
|
|
14
15
|
codecInfo: Uint8Array;
|
|
15
16
|
}): OmaFile;
|
|
16
17
|
export declare function updateMetadata(file: HiMDFile, titleInfo: TrackMetadata): Promise<void>;
|
|
17
18
|
export declare function decryptOMA(omaFile: Uint8Array): Uint8Array;
|
|
19
|
+
export {};
|
|
18
20
|
//# sourceMappingURL=tagged-oma.d.ts.map
|
package/dist/tagged-oma.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tagged-oma.d.ts","sourceRoot":"","sources":["../src/tagged-oma.ts"],"names":[],"mappings":"AAEA,OAAO,EAAgC,SAAS,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAI5E,OAAO,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"tagged-oma.d.ts","sourceRoot":"","sources":["../src/tagged-oma.ts"],"names":[],"mappings":"AAEA,OAAO,EAAgC,SAAS,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAI5E,OAAO,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAGlE,KAAK,WAAW,GAAG,UAAU,CAAC,WAAW,CAAC,CAAC;AAiH3C,MAAM,WAAW,OAAO;IACpB,IAAI,EAAE,UAAU,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,UAAU,CAAC;CAC7B;AAED,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,oBAAoB,EAAE,KAAK,EAAE;IAAC,OAAO,EAAE,SAAS,CAAC;IAAC,SAAS,EAAE,UAAU,CAAA;CAAC,GAAG,OAAO,CAc3J;AAED,wBAAgB,eAAe,CAAC,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,oBAAoB,EAAE,KAAK,EAAE;IAAC,OAAO,EAAE,SAAS,CAAC;IAAC,SAAS,EAAE,UAAU,CAAA;CAAC,GAAG,OAAO,CAKlJ;AAeD,wBAAsB,cAAc,CAAC,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,aAAa,iBA+B5E;AAED,wBAAgB,UAAU,CAAC,OAAO,EAAE,UAAU,GAAG,UAAU,CAyD1D"}
|
package/dist/tagged-oma.js
CHANGED
|
@@ -3,7 +3,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
6
|
+
exports.createTaggedEncryptedOMA = createTaggedEncryptedOMA;
|
|
7
|
+
exports.createTaggedOMA = createTaggedOMA;
|
|
8
|
+
exports.updateMetadata = updateMetadata;
|
|
9
|
+
exports.decryptOMA = decryptOMA;
|
|
7
10
|
const crypto_js_wasm_1 = __importDefault(require("@originjs/crypto-js-wasm"));
|
|
8
11
|
const himd_js_1 = require("himd-js");
|
|
9
12
|
const utils_1 = require("./utils");
|
|
@@ -53,7 +56,7 @@ function createEncryptionHeader(titleInfo, milliseconds) {
|
|
|
53
56
|
// In every KEYRING section, the track key is stored as decrypted by the verification key decrypted by the ekbroot
|
|
54
57
|
const padding = (0, utils_1.createRandomBytes)(8); // What's this???
|
|
55
58
|
const keyringDataA = (0, utils_1.concatUint8Arrays)([
|
|
56
|
-
ULINF_KEYRING_HEADER,
|
|
59
|
+
ULINF_KEYRING_HEADER, // Use EKB 00010021
|
|
57
60
|
verificationKey, (0, encryption_1.createTrackKeyForKeyring)(0x00010021, verificationKey, actualTrackKey), padding,
|
|
58
61
|
new Uint8Array(8).fill(0),
|
|
59
62
|
]);
|
|
@@ -70,7 +73,7 @@ function createEncryptionHeader(titleInfo, milliseconds) {
|
|
|
70
73
|
const maclistVerifiedData = firstGEOBContents.slice(94); // Offset to '!CID'
|
|
71
74
|
const maclistValue = (0, encryption_1.createTrackMac2)(decryptedVerificationKeyWaA, maclistVerifiedData);
|
|
72
75
|
const keyringDataB = (0, utils_1.concatUint8Arrays)([
|
|
73
|
-
new Uint8Array([0x00, 0x28, 0x00, 0x01, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x1D]),
|
|
76
|
+
new Uint8Array([0x00, 0x28, 0x00, 0x01, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x1D]), // Use EKB 0001001D
|
|
74
77
|
verificationKey, (0, encryption_1.createTrackKeyForKeyring)(0x0001001D, verificationKey, actualTrackKey), padding,
|
|
75
78
|
new Uint8Array(8).fill(0),
|
|
76
79
|
EKB1001D_CONTENTS,
|
|
@@ -92,7 +95,7 @@ function createEncryptionHeader(titleInfo, milliseconds) {
|
|
|
92
95
|
flags: 0,
|
|
93
96
|
version: { major: 3, minor: 0 },
|
|
94
97
|
tags: [
|
|
95
|
-
{ id: "GEOB", contents: firstGEOBContents, flags: 0 },
|
|
98
|
+
{ id: "GEOB", contents: firstGEOBContents, flags: 0 }, // OMG_ULINF
|
|
96
99
|
...(0, id3_1.createCommonID3Tags)(titleInfo),
|
|
97
100
|
{ id: "TLEN", contents: (0, id3_1.encodeUTF16BEStringEA3)(milliseconds.toString()), flags: 0 },
|
|
98
101
|
{ id: "GEOB", contents: secondGEOBContents, flags: 0 }, // OMG_BKLSI
|
|
@@ -114,14 +117,12 @@ function createTaggedEncryptedOMA(rawData, titleInfo, codec) {
|
|
|
114
117
|
rawData = (0, utils_1.wordArrayToByteArray)(allData.ciphertext, rawData.length);
|
|
115
118
|
return { data: (0, utils_1.concatUint8Arrays)([encHeader, formatHeader, rawData]), maclistValue, duration: milliseconds };
|
|
116
119
|
}
|
|
117
|
-
exports.createTaggedEncryptedOMA = createTaggedEncryptedOMA;
|
|
118
120
|
function createTaggedOMA(rawData, titleInfo, codec) {
|
|
119
121
|
const milliseconds = Math.floor(1000 * (0, himd_js_1.getSeconds)(codec, Math.ceil(rawData.length / (0, himd_js_1.getBytesPerFrame)(codec))));
|
|
120
122
|
const primaryHeader = createPrimaryHeader(titleInfo, milliseconds);
|
|
121
123
|
const formatHeader = (0, codecs_1.createEA3Header)(codec, 0xFFFF);
|
|
122
124
|
return { data: (0, utils_1.concatUint8Arrays)([primaryHeader, formatHeader, rawData]), duration: milliseconds };
|
|
123
125
|
}
|
|
124
|
-
exports.createTaggedOMA = createTaggedOMA;
|
|
125
126
|
function findInMetadata(metadata, id, asGeob) {
|
|
126
127
|
if (!asGeob)
|
|
127
128
|
return metadata.tags.find(e => e.id === id);
|
|
@@ -169,7 +170,6 @@ async function updateMetadata(file, titleInfo) {
|
|
|
169
170
|
await file.write(subsequentData);
|
|
170
171
|
await file.write(new Uint8Array(zeroOutDifference).fill(0));
|
|
171
172
|
}
|
|
172
|
-
exports.updateMetadata = updateMetadata;
|
|
173
173
|
function decryptOMA(omaFile) {
|
|
174
174
|
var _a;
|
|
175
175
|
const OMA_METADATA_HEADER = textEncoder.encode("ea3");
|
|
@@ -229,4 +229,3 @@ function decryptOMA(omaFile) {
|
|
|
229
229
|
// And merge all into the final OMA.
|
|
230
230
|
return (0, utils_1.concatUint8Arrays)([newMetaHeader, newFormatHeader, decryptedAudio]);
|
|
231
231
|
}
|
|
232
|
-
exports.decryptOMA = decryptOMA;
|
package/dist/utils.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export declare function assert(condition: boolean, message?: string): void;
|
|
2
2
|
export declare function join(...paths: string[]): string;
|
|
3
|
-
export declare function concatUint8Arrays(args: Uint8Array[]): Uint8Array
|
|
4
|
-
export declare function wordArrayToByteArray(wordArray: any, length?: number): Uint8Array
|
|
5
|
-
export declare function createRandomBytes(length?: number): Uint8Array
|
|
3
|
+
export declare function concatUint8Arrays(args: Uint8Array<ArrayBuffer>[]): Uint8Array<ArrayBuffer>;
|
|
4
|
+
export declare function wordArrayToByteArray(wordArray: any, length?: number): Uint8Array<ArrayBuffer>;
|
|
5
|
+
export declare function createRandomBytes(length?: number): Uint8Array<ArrayBuffer>;
|
|
6
6
|
export declare function arrayEq<T>(a: ArrayLike<T>, b: ArrayLike<T>): boolean;
|
|
7
7
|
export declare function hexDump(logger: (e: string) => void, data: Uint8Array, truncate?: boolean): void;
|
|
8
8
|
export declare class Logger {
|
|
@@ -10,5 +10,6 @@ export declare class Logger {
|
|
|
10
10
|
bumpIndent(i: number): void;
|
|
11
11
|
log(...data: string[]): void;
|
|
12
12
|
}
|
|
13
|
-
export declare function getAudioDataFromWave(waveFile: Uint8Array): Uint8Array | null;
|
|
13
|
+
export declare function getAudioDataFromWave(waveFile: Uint8Array): Uint8Array<ArrayBuffer> | null;
|
|
14
|
+
export declare function resolvePathFromGlobalIndex(globalTrackIndex: number): string;
|
|
14
15
|
//# sourceMappingURL=utils.d.ts.map
|
package/dist/utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA,wBAAgB,MAAM,CAAC,SAAS,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,MAAM,QAM1D;AAED,wBAAgB,IAAI,CAAC,GAAG,KAAK,EAAE,MAAM,EAAE,UAEtC;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,UAAU,CAAC,WAAW,CAAC,EAAE,2BAchE;AAmBD,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,GAAG,EAAE,MAAM,GAAE,MAA2B,2BAavF;AAED,wBAAgB,iBAAiB,CAAC,MAAM,SAAI,2BAM3C;AAED,wBAAgB,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,SAAS,CAAC,CAAC,CAAC,WAM1D;AAGD,wBAAgB,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,UAAO,QAarF;AAED,qBAAa,MAAM;IACf,OAAO,SAAM;IACb,UAAU,CAAC,CAAC,EAAE,MAAM;IAQpB,GAAG,CAAC,GAAG,IAAI,EAAE,MAAM,EAAE;CAGxB;AAED,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,UAAU,kCAgBxD;AAED,wBAAgB,0BAA0B,CAAC,gBAAgB,EAAE,MAAM,UAElE"}
|
package/dist/utils.js
CHANGED
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.Logger = void 0;
|
|
4
|
+
exports.assert = assert;
|
|
5
|
+
exports.join = join;
|
|
6
|
+
exports.concatUint8Arrays = concatUint8Arrays;
|
|
7
|
+
exports.wordArrayToByteArray = wordArrayToByteArray;
|
|
8
|
+
exports.createRandomBytes = createRandomBytes;
|
|
9
|
+
exports.arrayEq = arrayEq;
|
|
10
|
+
exports.hexDump = hexDump;
|
|
11
|
+
exports.getAudioDataFromWave = getAudioDataFromWave;
|
|
12
|
+
exports.resolvePathFromGlobalIndex = resolvePathFromGlobalIndex;
|
|
4
13
|
function assert(condition, message) {
|
|
5
14
|
if (condition) {
|
|
6
15
|
return;
|
|
@@ -8,11 +17,9 @@ function assert(condition, message) {
|
|
|
8
17
|
message = message || 'no message provided';
|
|
9
18
|
throw new Error(`Assertion failed: ${message}`);
|
|
10
19
|
}
|
|
11
|
-
exports.assert = assert;
|
|
12
20
|
function join(...paths) {
|
|
13
21
|
return paths.join("/").replace(/\/*/, '/');
|
|
14
22
|
}
|
|
15
|
-
exports.join = join;
|
|
16
23
|
function concatUint8Arrays(args) {
|
|
17
24
|
let totalLength = 0;
|
|
18
25
|
for (let a of args) {
|
|
@@ -26,7 +33,6 @@ function concatUint8Arrays(args) {
|
|
|
26
33
|
}
|
|
27
34
|
return res;
|
|
28
35
|
}
|
|
29
|
-
exports.concatUint8Arrays = concatUint8Arrays;
|
|
30
36
|
function wordToByteArray(word, length, littleEndian = false) {
|
|
31
37
|
let ba = [], xFF = 0xff;
|
|
32
38
|
let actualLength = length;
|
|
@@ -60,13 +66,11 @@ function wordArrayToByteArray(wordArray, length = wordArray.sigBytes) {
|
|
|
60
66
|
}
|
|
61
67
|
return res;
|
|
62
68
|
}
|
|
63
|
-
exports.wordArrayToByteArray = wordArrayToByteArray;
|
|
64
69
|
function createRandomBytes(length = 8) {
|
|
65
70
|
return new Uint8Array(Array(length)
|
|
66
71
|
.fill(0)
|
|
67
72
|
.map(() => Math.floor(Math.random() * 256)));
|
|
68
73
|
}
|
|
69
|
-
exports.createRandomBytes = createRandomBytes;
|
|
70
74
|
function arrayEq(a, b) {
|
|
71
75
|
if (a.length !== b.length)
|
|
72
76
|
return false;
|
|
@@ -76,7 +80,6 @@ function arrayEq(a, b) {
|
|
|
76
80
|
}
|
|
77
81
|
return true;
|
|
78
82
|
}
|
|
79
|
-
exports.arrayEq = arrayEq;
|
|
80
83
|
const textDecoder = new TextDecoder();
|
|
81
84
|
function hexDump(logger, data, truncate = true) {
|
|
82
85
|
if (data.length === 0)
|
|
@@ -93,7 +96,6 @@ function hexDump(logger, data, truncate = true) {
|
|
|
93
96
|
if (truncated)
|
|
94
97
|
logger("<truncated>");
|
|
95
98
|
}
|
|
96
|
-
exports.hexDump = hexDump;
|
|
97
99
|
class Logger {
|
|
98
100
|
constructor() {
|
|
99
101
|
this.preffix = "";
|
|
@@ -130,4 +132,6 @@ function getAudioDataFromWave(waveFile) {
|
|
|
130
132
|
}
|
|
131
133
|
return null;
|
|
132
134
|
}
|
|
133
|
-
|
|
135
|
+
function resolvePathFromGlobalIndex(globalTrackIndex) {
|
|
136
|
+
return join('OMGAUDIO', `10F${(globalTrackIndex >> 8).toString(16).padStart(2, '0')}`, '1000' + globalTrackIndex.toString(16).padStart(4, '0').toUpperCase() + '.OMA');
|
|
137
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "networkwm-js",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3",
|
|
4
4
|
"description": "A library which lets you manage tracks and metadata on Sony Network Walkmen.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -32,12 +32,12 @@
|
|
|
32
32
|
"@types/node": "^18.11.9",
|
|
33
33
|
"prettier": "^2.8.8",
|
|
34
34
|
"ts-node": "^10.9.2",
|
|
35
|
-
"typescript": "^
|
|
35
|
+
"typescript": "^5.9.3"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@originjs/crypto-js-wasm": "github:asivery/crypto-js-wasm",
|
|
39
39
|
"async-mutex": "^0.4.0",
|
|
40
|
-
"himd-js": "^0.2.
|
|
40
|
+
"himd-js": "^0.2.9",
|
|
41
41
|
"mp3-parser": "^0.3.0",
|
|
42
42
|
"node-id3": "^0.2.5",
|
|
43
43
|
"node-mass-storage": "^0.2.4",
|
package/dist/helpers.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../src/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAkB,MAAM,KAAK,CAAC;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAElD,OAAO,EAAE,gBAAgB,EAAa,MAAM,WAAW,CAAC;AAGxD,wBAAgB,0BAA0B,CAAC,gBAAgB,EAAE,MAAM,UAElE;AAED,wBAAsB,YAAY,CAAC,MAAM,EAAE;IAAE,GAAG,EAAE,YAAY,CAAC;IAAC,UAAU,EAAE,gBAAgB,CAAA;CAAE,+BAO7F;AAED,wBAAsB,iBAAiB,IAAI,OAAO,CAAC;IAAE,GAAG,EAAE,YAAY,CAAC;IAAC,UAAU,EAAE,gBAAgB,CAAA;CAAE,GAAG,IAAI,CAAC,CA2B7G"}
|