@flywheel-io/fw-file-rs 0.1.4 → 0.2.1
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/README.md +15 -3
- package/fw_file_rs.d.ts +6 -6
- package/fw_file_rs.js +196 -176
- package/fw_file_rs_bg.wasm +0 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -11,7 +11,7 @@ import init, { get_dcm_meta, WasmDeidProfile } from "fw-file-rs";
|
|
|
11
11
|
// initialize the WASM module (required before use)
|
|
12
12
|
await init();
|
|
13
13
|
|
|
14
|
-
const
|
|
14
|
+
const headerBytes = await read_until_pixel_data(file);
|
|
15
15
|
// extract metadata from a DICOM file
|
|
16
16
|
const tags = [
|
|
17
17
|
"StudyInstanceUID",
|
|
@@ -23,8 +23,9 @@ const tags = [
|
|
|
23
23
|
"Rows",
|
|
24
24
|
"Columns",
|
|
25
25
|
];
|
|
26
|
-
const meta = get_dcm_meta(
|
|
26
|
+
const meta = get_dcm_meta(headerBytes, tags);
|
|
27
27
|
// group DICOM files by StudyInstanceUID and SeriesInstanceUID and split localizer
|
|
28
|
+
const metas = [["1.dcm", meta]]; // list of (filename, meta data) tuples
|
|
28
29
|
const groups = group_dcm_meta(metas, ["StudyInstanceUID", "SeriesInstanceUID"], true);
|
|
29
30
|
|
|
30
31
|
// de-identify a DICOM file using a YAML profile
|
|
@@ -37,7 +38,18 @@ dicom:
|
|
|
37
38
|
replace-with: REDACTED
|
|
38
39
|
`;
|
|
39
40
|
const profile = WasmDeidProfile.from_yaml(yaml);
|
|
40
|
-
const
|
|
41
|
+
const deidHeaderBytes = profile.deid_dcm(headerBytes);
|
|
42
|
+
const chunks: Blob[] = []
|
|
43
|
+
// make the deidentified header the first chunk
|
|
44
|
+
chunks.push(new Blob([deidHeaderBytes]));
|
|
45
|
+
// then slice the rest of the file after the header
|
|
46
|
+
let start = headerBytes.length;
|
|
47
|
+
while (start < file.size) {
|
|
48
|
+
const chunkSize = Math.min(file.size - start, CHUNK_SIZE)
|
|
49
|
+
chunks.push(file.slice(start, start + chunkSize))
|
|
50
|
+
start += chunkSize
|
|
51
|
+
}
|
|
52
|
+
// chunks are ready to be uploaded
|
|
41
53
|
```
|
|
42
54
|
|
|
43
55
|
[fw-file-rs-repo]: https://gitlab.com/flywheel-io/tools/lib/fw-file-rs
|
package/fw_file_rs.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
export function get_dcm_meta(bytes: Uint8Array, tags: string[]): any;
|
|
4
|
-
export function group_dcm_meta(metas: any, group_by_tags: any, split_localizer: boolean): any;
|
|
5
4
|
export function read_until_pixel_data(file: File): Promise<Uint8Array>;
|
|
5
|
+
export function group_dcm_meta(metas: any, group_by_tags: any, split_localizer: boolean): any;
|
|
6
6
|
export function create_dcm_as_bytes(tags_js: any): Uint8Array;
|
|
7
7
|
export class WasmDCMGroup {
|
|
8
8
|
private constructor();
|
|
@@ -20,12 +20,12 @@ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembl
|
|
|
20
20
|
export interface InitOutput {
|
|
21
21
|
readonly memory: WebAssembly.Memory;
|
|
22
22
|
readonly get_dcm_meta: (a: number, b: number, c: number, d: number) => [number, number, number];
|
|
23
|
-
readonly __wbg_wasmdcmgroup_free: (a: number, b: number) => void;
|
|
24
|
-
readonly group_dcm_meta: (a: any, b: any, c: number) => any;
|
|
25
|
-
readonly read_until_pixel_data: (a: any) => any;
|
|
26
23
|
readonly __wbg_wasmdeidprofile_free: (a: number, b: number) => void;
|
|
27
24
|
readonly wasmdeidprofile_from_yaml: (a: number, b: number) => [number, number, number];
|
|
28
25
|
readonly wasmdeidprofile_deid_dcm: (a: number, b: number, c: number) => [number, number, number, number];
|
|
26
|
+
readonly read_until_pixel_data: (a: any) => any;
|
|
27
|
+
readonly __wbg_wasmdcmgroup_free: (a: number, b: number) => void;
|
|
28
|
+
readonly group_dcm_meta: (a: any, b: any, c: number) => any;
|
|
29
29
|
readonly create_dcm_as_bytes: (a: any) => [number, number, number, number];
|
|
30
30
|
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
31
31
|
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
@@ -35,8 +35,8 @@ export interface InitOutput {
|
|
|
35
35
|
readonly __wbindgen_export_5: WebAssembly.Table;
|
|
36
36
|
readonly __externref_table_dealloc: (a: number) => void;
|
|
37
37
|
readonly __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
38
|
-
readonly
|
|
39
|
-
readonly
|
|
38
|
+
readonly closure46_externref_shim: (a: number, b: number, c: any) => void;
|
|
39
|
+
readonly closure1153_externref_shim: (a: number, b: number, c: any, d: any) => void;
|
|
40
40
|
readonly __wbindgen_start: () => void;
|
|
41
41
|
}
|
|
42
42
|
|
package/fw_file_rs.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
let wasm;
|
|
2
2
|
|
|
3
|
-
let WASM_VECTOR_LEN = 0;
|
|
4
|
-
|
|
5
3
|
let cachedUint8ArrayMemory0 = null;
|
|
6
4
|
|
|
7
5
|
function getUint8ArrayMemory0() {
|
|
@@ -11,6 +9,29 @@ function getUint8ArrayMemory0() {
|
|
|
11
9
|
return cachedUint8ArrayMemory0;
|
|
12
10
|
}
|
|
13
11
|
|
|
12
|
+
let cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
|
|
13
|
+
|
|
14
|
+
if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };
|
|
15
|
+
|
|
16
|
+
const MAX_SAFARI_DECODE_BYTES = 2146435072;
|
|
17
|
+
let numBytesDecoded = 0;
|
|
18
|
+
function decodeText(ptr, len) {
|
|
19
|
+
numBytesDecoded += len;
|
|
20
|
+
if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
|
|
21
|
+
cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
|
|
22
|
+
cachedTextDecoder.decode();
|
|
23
|
+
numBytesDecoded = len;
|
|
24
|
+
}
|
|
25
|
+
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function getStringFromWasm0(ptr, len) {
|
|
29
|
+
ptr = ptr >>> 0;
|
|
30
|
+
return decodeText(ptr, len);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
let WASM_VECTOR_LEN = 0;
|
|
34
|
+
|
|
14
35
|
const cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available') } } );
|
|
15
36
|
|
|
16
37
|
const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
|
|
@@ -89,50 +110,15 @@ function handleError(f, args) {
|
|
|
89
110
|
}
|
|
90
111
|
}
|
|
91
112
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };
|
|
95
|
-
|
|
96
|
-
function getStringFromWasm0(ptr, len) {
|
|
113
|
+
function getArrayU8FromWasm0(ptr, len) {
|
|
97
114
|
ptr = ptr >>> 0;
|
|
98
|
-
return
|
|
115
|
+
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
99
116
|
}
|
|
100
117
|
|
|
101
118
|
function isLikeNone(x) {
|
|
102
119
|
return x === undefined || x === null;
|
|
103
120
|
}
|
|
104
121
|
|
|
105
|
-
const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
|
|
106
|
-
? { register: () => {}, unregister: () => {} }
|
|
107
|
-
: new FinalizationRegistry(state => {
|
|
108
|
-
wasm.__wbindgen_export_5.get(state.dtor)(state.a, state.b)
|
|
109
|
-
});
|
|
110
|
-
|
|
111
|
-
function makeMutClosure(arg0, arg1, dtor, f) {
|
|
112
|
-
const state = { a: arg0, b: arg1, cnt: 1, dtor };
|
|
113
|
-
const real = (...args) => {
|
|
114
|
-
// First up with a closure we increment the internal reference
|
|
115
|
-
// count. This ensures that the Rust closure environment won't
|
|
116
|
-
// be deallocated while we're invoking it.
|
|
117
|
-
state.cnt++;
|
|
118
|
-
const a = state.a;
|
|
119
|
-
state.a = 0;
|
|
120
|
-
try {
|
|
121
|
-
return f(a, state.b, ...args);
|
|
122
|
-
} finally {
|
|
123
|
-
if (--state.cnt === 0) {
|
|
124
|
-
wasm.__wbindgen_export_5.get(state.dtor)(a, state.b);
|
|
125
|
-
CLOSURE_DTORS.unregister(state);
|
|
126
|
-
} else {
|
|
127
|
-
state.a = a;
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
};
|
|
131
|
-
real.original = state;
|
|
132
|
-
CLOSURE_DTORS.register(real, state, state);
|
|
133
|
-
return real;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
122
|
function debugString(val) {
|
|
137
123
|
// primitive types
|
|
138
124
|
const type = typeof val;
|
|
@@ -198,6 +184,40 @@ function debugString(val) {
|
|
|
198
184
|
return className;
|
|
199
185
|
}
|
|
200
186
|
|
|
187
|
+
const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
|
|
188
|
+
? { register: () => {}, unregister: () => {} }
|
|
189
|
+
: new FinalizationRegistry(
|
|
190
|
+
state => {
|
|
191
|
+
wasm.__wbindgen_export_5.get(state.dtor)(state.a, state.b);
|
|
192
|
+
}
|
|
193
|
+
);
|
|
194
|
+
|
|
195
|
+
function makeMutClosure(arg0, arg1, dtor, f) {
|
|
196
|
+
const state = { a: arg0, b: arg1, cnt: 1, dtor };
|
|
197
|
+
const real = (...args) => {
|
|
198
|
+
|
|
199
|
+
// First up with a closure we increment the internal reference
|
|
200
|
+
// count. This ensures that the Rust closure environment won't
|
|
201
|
+
// be deallocated while we're invoking it.
|
|
202
|
+
state.cnt++;
|
|
203
|
+
const a = state.a;
|
|
204
|
+
state.a = 0;
|
|
205
|
+
try {
|
|
206
|
+
return f(a, state.b, ...args);
|
|
207
|
+
} finally {
|
|
208
|
+
if (--state.cnt === 0) {
|
|
209
|
+
wasm.__wbindgen_export_5.get(state.dtor)(a, state.b);
|
|
210
|
+
CLOSURE_DTORS.unregister(state);
|
|
211
|
+
} else {
|
|
212
|
+
state.a = a;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
};
|
|
216
|
+
real.original = state;
|
|
217
|
+
CLOSURE_DTORS.register(real, state, state);
|
|
218
|
+
return real;
|
|
219
|
+
}
|
|
220
|
+
|
|
201
221
|
function passArray8ToWasm0(arg, malloc) {
|
|
202
222
|
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
203
223
|
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
@@ -237,6 +257,15 @@ export function get_dcm_meta(bytes, tags) {
|
|
|
237
257
|
return takeFromExternrefTable0(ret[0]);
|
|
238
258
|
}
|
|
239
259
|
|
|
260
|
+
/**
|
|
261
|
+
* @param {File} file
|
|
262
|
+
* @returns {Promise<Uint8Array>}
|
|
263
|
+
*/
|
|
264
|
+
export function read_until_pixel_data(file) {
|
|
265
|
+
const ret = wasm.read_until_pixel_data(file);
|
|
266
|
+
return ret;
|
|
267
|
+
}
|
|
268
|
+
|
|
240
269
|
/**
|
|
241
270
|
* @param {any} metas
|
|
242
271
|
* @param {any} group_by_tags
|
|
@@ -248,19 +277,6 @@ export function group_dcm_meta(metas, group_by_tags, split_localizer) {
|
|
|
248
277
|
return ret;
|
|
249
278
|
}
|
|
250
279
|
|
|
251
|
-
/**
|
|
252
|
-
* @param {File} file
|
|
253
|
-
* @returns {Promise<Uint8Array>}
|
|
254
|
-
*/
|
|
255
|
-
export function read_until_pixel_data(file) {
|
|
256
|
-
const ret = wasm.read_until_pixel_data(file);
|
|
257
|
-
return ret;
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
function getArrayU8FromWasm0(ptr, len) {
|
|
261
|
-
ptr = ptr >>> 0;
|
|
262
|
-
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
263
|
-
}
|
|
264
280
|
/**
|
|
265
281
|
* @param {any} tags_js
|
|
266
282
|
* @returns {Uint8Array}
|
|
@@ -275,12 +291,12 @@ export function create_dcm_as_bytes(tags_js) {
|
|
|
275
291
|
return v1;
|
|
276
292
|
}
|
|
277
293
|
|
|
278
|
-
function
|
|
279
|
-
wasm.
|
|
294
|
+
function __wbg_adapter_12(arg0, arg1, arg2) {
|
|
295
|
+
wasm.closure46_externref_shim(arg0, arg1, arg2);
|
|
280
296
|
}
|
|
281
297
|
|
|
282
|
-
function
|
|
283
|
-
wasm.
|
|
298
|
+
function __wbg_adapter_79(arg0, arg1, arg2, arg3) {
|
|
299
|
+
wasm.closure1153_externref_shim(arg0, arg1, arg2, arg3);
|
|
284
300
|
}
|
|
285
301
|
|
|
286
302
|
const WasmDCMGroupFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
@@ -357,6 +373,8 @@ export class WasmDeidProfile {
|
|
|
357
373
|
}
|
|
358
374
|
}
|
|
359
375
|
|
|
376
|
+
const EXPECTED_RESPONSE_TYPES = new Set(['basic', 'cors', 'default']);
|
|
377
|
+
|
|
360
378
|
async function __wbg_load(module, imports) {
|
|
361
379
|
if (typeof Response === 'function' && module instanceof Response) {
|
|
362
380
|
if (typeof WebAssembly.instantiateStreaming === 'function') {
|
|
@@ -364,7 +382,9 @@ async function __wbg_load(module, imports) {
|
|
|
364
382
|
return await WebAssembly.instantiateStreaming(module, imports);
|
|
365
383
|
|
|
366
384
|
} catch (e) {
|
|
367
|
-
|
|
385
|
+
const validResponse = module.ok && EXPECTED_RESPONSE_TYPES.has(module.type);
|
|
386
|
+
|
|
387
|
+
if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
|
|
368
388
|
console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e);
|
|
369
389
|
|
|
370
390
|
} else {
|
|
@@ -391,6 +411,10 @@ async function __wbg_load(module, imports) {
|
|
|
391
411
|
function __wbg_get_imports() {
|
|
392
412
|
const imports = {};
|
|
393
413
|
imports.wbg = {};
|
|
414
|
+
imports.wbg.__wbg_Error_1f3748b298f99708 = function(arg0, arg1) {
|
|
415
|
+
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
416
|
+
return ret;
|
|
417
|
+
};
|
|
394
418
|
imports.wbg.__wbg_String_8f0eb39a4a4c2f66 = function(arg0, arg1) {
|
|
395
419
|
const ret = String(arg1);
|
|
396
420
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
@@ -398,39 +422,38 @@ function __wbg_get_imports() {
|
|
|
398
422
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
399
423
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
400
424
|
};
|
|
401
|
-
imports.wbg.
|
|
425
|
+
imports.wbg.__wbg_arrayBuffer_4a3158e85510825e = function(arg0) {
|
|
402
426
|
const ret = arg0.arrayBuffer();
|
|
403
427
|
return ret;
|
|
404
428
|
};
|
|
405
|
-
imports.wbg.
|
|
406
|
-
const ret = arg0.buffer;
|
|
407
|
-
return ret;
|
|
408
|
-
};
|
|
409
|
-
imports.wbg.__wbg_call_672a4d21634d4a24 = function() { return handleError(function (arg0, arg1) {
|
|
429
|
+
imports.wbg.__wbg_call_2f8d426a20a307fe = function() { return handleError(function (arg0, arg1) {
|
|
410
430
|
const ret = arg0.call(arg1);
|
|
411
431
|
return ret;
|
|
412
432
|
}, arguments) };
|
|
413
|
-
imports.wbg.
|
|
433
|
+
imports.wbg.__wbg_call_f53f0647ceb9c567 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
414
434
|
const ret = arg0.call(arg1, arg2);
|
|
415
435
|
return ret;
|
|
416
436
|
}, arguments) };
|
|
417
|
-
imports.wbg.
|
|
437
|
+
imports.wbg.__wbg_done_4a7743b6f942c9f3 = function(arg0) {
|
|
418
438
|
const ret = arg0.done;
|
|
419
439
|
return ret;
|
|
420
440
|
};
|
|
421
|
-
imports.wbg.
|
|
441
|
+
imports.wbg.__wbg_entries_17f7acbc2d691c0d = function(arg0) {
|
|
422
442
|
const ret = Object.entries(arg0);
|
|
423
443
|
return ret;
|
|
424
444
|
};
|
|
425
|
-
imports.wbg.
|
|
445
|
+
imports.wbg.__wbg_getRandomValues_3c9c0d586e575a16 = function() { return handleError(function (arg0, arg1) {
|
|
446
|
+
globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
|
|
447
|
+
}, arguments) };
|
|
448
|
+
imports.wbg.__wbg_get_27b4bcbec57323ca = function() { return handleError(function (arg0, arg1) {
|
|
426
449
|
const ret = Reflect.get(arg0, arg1);
|
|
427
450
|
return ret;
|
|
428
451
|
}, arguments) };
|
|
429
|
-
imports.wbg.
|
|
452
|
+
imports.wbg.__wbg_get_59c6316d15f9f1d0 = function(arg0, arg1) {
|
|
430
453
|
const ret = arg0[arg1 >>> 0];
|
|
431
454
|
return ret;
|
|
432
455
|
};
|
|
433
|
-
imports.wbg.
|
|
456
|
+
imports.wbg.__wbg_instanceof_ArrayBuffer_59339a3a6f0c10ea = function(arg0) {
|
|
434
457
|
let result;
|
|
435
458
|
try {
|
|
436
459
|
result = arg0 instanceof ArrayBuffer;
|
|
@@ -440,7 +463,7 @@ function __wbg_get_imports() {
|
|
|
440
463
|
const ret = result;
|
|
441
464
|
return ret;
|
|
442
465
|
};
|
|
443
|
-
imports.wbg.
|
|
466
|
+
imports.wbg.__wbg_instanceof_Map_dd89a82d76d1b25f = function(arg0) {
|
|
444
467
|
let result;
|
|
445
468
|
try {
|
|
446
469
|
result = arg0 instanceof Map;
|
|
@@ -450,7 +473,7 @@ function __wbg_get_imports() {
|
|
|
450
473
|
const ret = result;
|
|
451
474
|
return ret;
|
|
452
475
|
};
|
|
453
|
-
imports.wbg.
|
|
476
|
+
imports.wbg.__wbg_instanceof_Uint8Array_91f3c5adee7e6672 = function(arg0) {
|
|
454
477
|
let result;
|
|
455
478
|
try {
|
|
456
479
|
result = arg0 instanceof Uint8Array;
|
|
@@ -460,34 +483,46 @@ function __wbg_get_imports() {
|
|
|
460
483
|
const ret = result;
|
|
461
484
|
return ret;
|
|
462
485
|
};
|
|
463
|
-
imports.wbg.
|
|
486
|
+
imports.wbg.__wbg_isArray_bc2498eba6fcb71f = function(arg0) {
|
|
464
487
|
const ret = Array.isArray(arg0);
|
|
465
488
|
return ret;
|
|
466
489
|
};
|
|
467
|
-
imports.wbg.
|
|
490
|
+
imports.wbg.__wbg_isSafeInteger_6091d6e3ee1b65fd = function(arg0) {
|
|
468
491
|
const ret = Number.isSafeInteger(arg0);
|
|
469
492
|
return ret;
|
|
470
493
|
};
|
|
471
|
-
imports.wbg.
|
|
494
|
+
imports.wbg.__wbg_iterator_96378c3c9a17347c = function() {
|
|
472
495
|
const ret = Symbol.iterator;
|
|
473
496
|
return ret;
|
|
474
497
|
};
|
|
475
|
-
imports.wbg.
|
|
498
|
+
imports.wbg.__wbg_length_246fa1f85a0dea5b = function(arg0) {
|
|
476
499
|
const ret = arg0.length;
|
|
477
500
|
return ret;
|
|
478
501
|
};
|
|
479
|
-
imports.wbg.
|
|
502
|
+
imports.wbg.__wbg_length_904c0910ed998bf3 = function(arg0) {
|
|
480
503
|
const ret = arg0.length;
|
|
481
504
|
return ret;
|
|
482
505
|
};
|
|
483
|
-
imports.wbg.
|
|
506
|
+
imports.wbg.__wbg_new_1930cbb8d9ffc31b = function() {
|
|
507
|
+
const ret = new Object();
|
|
508
|
+
return ret;
|
|
509
|
+
};
|
|
510
|
+
imports.wbg.__wbg_new_56407f99198feff7 = function() {
|
|
511
|
+
const ret = new Map();
|
|
512
|
+
return ret;
|
|
513
|
+
};
|
|
514
|
+
imports.wbg.__wbg_new_9190433fb67ed635 = function(arg0) {
|
|
515
|
+
const ret = new Uint8Array(arg0);
|
|
516
|
+
return ret;
|
|
517
|
+
};
|
|
518
|
+
imports.wbg.__wbg_new_d5e3800b120e37e1 = function(arg0, arg1) {
|
|
484
519
|
try {
|
|
485
520
|
var state0 = {a: arg0, b: arg1};
|
|
486
521
|
var cb0 = (arg0, arg1) => {
|
|
487
522
|
const a = state0.a;
|
|
488
523
|
state0.a = 0;
|
|
489
524
|
try {
|
|
490
|
-
return
|
|
525
|
+
return __wbg_adapter_79(a, state0.b, arg0, arg1);
|
|
491
526
|
} finally {
|
|
492
527
|
state0.a = a;
|
|
493
528
|
}
|
|
@@ -498,122 +533,102 @@ function __wbg_get_imports() {
|
|
|
498
533
|
state0.a = state0.b = 0;
|
|
499
534
|
}
|
|
500
535
|
};
|
|
501
|
-
imports.wbg.
|
|
502
|
-
const ret = new Object();
|
|
503
|
-
return ret;
|
|
504
|
-
};
|
|
505
|
-
imports.wbg.__wbg_new_5e0be73521bc8c17 = function() {
|
|
506
|
-
const ret = new Map();
|
|
507
|
-
return ret;
|
|
508
|
-
};
|
|
509
|
-
imports.wbg.__wbg_new_78feb108b6472713 = function() {
|
|
536
|
+
imports.wbg.__wbg_new_e969dc3f68d25093 = function() {
|
|
510
537
|
const ret = new Array();
|
|
511
538
|
return ret;
|
|
512
539
|
};
|
|
513
|
-
imports.wbg.
|
|
514
|
-
const ret = new Uint8Array(arg0);
|
|
540
|
+
imports.wbg.__wbg_newfromslice_d0d56929c6d9c842 = function(arg0, arg1) {
|
|
541
|
+
const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
|
|
515
542
|
return ret;
|
|
516
543
|
};
|
|
517
|
-
imports.wbg.
|
|
544
|
+
imports.wbg.__wbg_newnoargs_a81330f6e05d8aca = function(arg0, arg1) {
|
|
518
545
|
const ret = new Function(getStringFromWasm0(arg0, arg1));
|
|
519
546
|
return ret;
|
|
520
547
|
};
|
|
521
|
-
imports.wbg.
|
|
522
|
-
const ret = new Uint8Array(arg0, arg1 >>> 0, arg2 >>> 0);
|
|
523
|
-
return ret;
|
|
524
|
-
};
|
|
525
|
-
imports.wbg.__wbg_newwithlength_a381634e90c276d4 = function(arg0) {
|
|
548
|
+
imports.wbg.__wbg_newwithlength_ed0ee6c1edca86fc = function(arg0) {
|
|
526
549
|
const ret = new Uint8Array(arg0 >>> 0);
|
|
527
550
|
return ret;
|
|
528
551
|
};
|
|
529
|
-
imports.wbg.
|
|
530
|
-
const ret = arg0.next;
|
|
531
|
-
return ret;
|
|
532
|
-
};
|
|
533
|
-
imports.wbg.__wbg_next_6574e1a8a62d1055 = function() { return handleError(function (arg0) {
|
|
552
|
+
imports.wbg.__wbg_next_2e6b37020ac5fe58 = function() { return handleError(function (arg0) {
|
|
534
553
|
const ret = arg0.next();
|
|
535
554
|
return ret;
|
|
536
555
|
}, arguments) };
|
|
537
|
-
imports.wbg.
|
|
538
|
-
|
|
556
|
+
imports.wbg.__wbg_next_3de8f2669431a3ff = function(arg0) {
|
|
557
|
+
const ret = arg0.next;
|
|
558
|
+
return ret;
|
|
559
|
+
};
|
|
560
|
+
imports.wbg.__wbg_prototypesetcall_c5f74efd31aea86b = function(arg0, arg1, arg2) {
|
|
561
|
+
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
|
|
539
562
|
};
|
|
540
|
-
imports.wbg.
|
|
563
|
+
imports.wbg.__wbg_queueMicrotask_bcc6e26d899696db = function(arg0) {
|
|
541
564
|
const ret = arg0.queueMicrotask;
|
|
542
565
|
return ret;
|
|
543
566
|
};
|
|
544
|
-
imports.wbg.
|
|
567
|
+
imports.wbg.__wbg_queueMicrotask_f24a794d09c42640 = function(arg0) {
|
|
568
|
+
queueMicrotask(arg0);
|
|
569
|
+
};
|
|
570
|
+
imports.wbg.__wbg_resolve_5775c0ef9222f556 = function(arg0) {
|
|
545
571
|
const ret = Promise.resolve(arg0);
|
|
546
572
|
return ret;
|
|
547
573
|
};
|
|
548
|
-
imports.wbg.
|
|
549
|
-
|
|
574
|
+
imports.wbg.__wbg_set_31197016f65a6a19 = function(arg0, arg1, arg2) {
|
|
575
|
+
const ret = arg0.set(arg1, arg2);
|
|
576
|
+
return ret;
|
|
550
577
|
};
|
|
551
578
|
imports.wbg.__wbg_set_3f1d0b984ed272ed = function(arg0, arg1, arg2) {
|
|
552
579
|
arg0[arg1] = arg2;
|
|
553
580
|
};
|
|
554
|
-
imports.wbg.
|
|
555
|
-
arg0
|
|
556
|
-
};
|
|
557
|
-
imports.wbg.__wbg_set_8fc6bf8a5b1071d1 = function(arg0, arg1, arg2) {
|
|
558
|
-
const ret = arg0.set(arg1, arg2);
|
|
559
|
-
return ret;
|
|
581
|
+
imports.wbg.__wbg_set_d636a0463acf1dbc = function(arg0, arg1, arg2) {
|
|
582
|
+
arg0[arg1 >>> 0] = arg2;
|
|
560
583
|
};
|
|
561
|
-
imports.wbg.
|
|
584
|
+
imports.wbg.__wbg_size_4181b899cbfa6483 = function(arg0) {
|
|
562
585
|
const ret = arg0.size;
|
|
563
586
|
return ret;
|
|
564
587
|
};
|
|
565
|
-
imports.wbg.
|
|
588
|
+
imports.wbg.__wbg_slice_dc41c7f2c4886814 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
566
589
|
const ret = arg0.slice(arg1, arg2);
|
|
567
590
|
return ret;
|
|
568
591
|
}, arguments) };
|
|
569
|
-
imports.wbg.
|
|
592
|
+
imports.wbg.__wbg_static_accessor_GLOBAL_1f13249cc3acc96d = function() {
|
|
570
593
|
const ret = typeof global === 'undefined' ? null : global;
|
|
571
594
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
572
595
|
};
|
|
573
|
-
imports.wbg.
|
|
596
|
+
imports.wbg.__wbg_static_accessor_GLOBAL_THIS_df7ae94b1e0ed6a3 = function() {
|
|
574
597
|
const ret = typeof globalThis === 'undefined' ? null : globalThis;
|
|
575
598
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
576
599
|
};
|
|
577
|
-
imports.wbg.
|
|
600
|
+
imports.wbg.__wbg_static_accessor_SELF_6265471db3b3c228 = function() {
|
|
578
601
|
const ret = typeof self === 'undefined' ? null : self;
|
|
579
602
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
580
603
|
};
|
|
581
|
-
imports.wbg.
|
|
604
|
+
imports.wbg.__wbg_static_accessor_WINDOW_16fb482f8ec52863 = function() {
|
|
582
605
|
const ret = typeof window === 'undefined' ? null : window;
|
|
583
606
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
584
607
|
};
|
|
585
|
-
imports.wbg.
|
|
586
|
-
const ret = arg0.then(arg1);
|
|
587
|
-
return ret;
|
|
588
|
-
};
|
|
589
|
-
imports.wbg.__wbg_then_48b406749878a531 = function(arg0, arg1, arg2) {
|
|
608
|
+
imports.wbg.__wbg_then_8d2fcccde5380a03 = function(arg0, arg1, arg2) {
|
|
590
609
|
const ret = arg0.then(arg1, arg2);
|
|
591
610
|
return ret;
|
|
592
611
|
};
|
|
593
|
-
imports.wbg.
|
|
594
|
-
const ret = arg0.
|
|
595
|
-
return ret;
|
|
596
|
-
};
|
|
597
|
-
imports.wbg.__wbindgen_bigint_from_i64 = function(arg0) {
|
|
598
|
-
const ret = arg0;
|
|
612
|
+
imports.wbg.__wbg_then_9cc266be2bf537b6 = function(arg0, arg1) {
|
|
613
|
+
const ret = arg0.then(arg1);
|
|
599
614
|
return ret;
|
|
600
615
|
};
|
|
601
|
-
imports.wbg.
|
|
602
|
-
const ret =
|
|
616
|
+
imports.wbg.__wbg_value_09d0b4eaab48b91d = function(arg0) {
|
|
617
|
+
const ret = arg0.value;
|
|
603
618
|
return ret;
|
|
604
619
|
};
|
|
605
|
-
imports.wbg.
|
|
620
|
+
imports.wbg.__wbg_wbindgenbigintgetasi64_7637cb1a7fb9a81e = function(arg0, arg1) {
|
|
606
621
|
const v = arg1;
|
|
607
622
|
const ret = typeof(v) === 'bigint' ? v : undefined;
|
|
608
623
|
getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
|
|
609
624
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
610
625
|
};
|
|
611
|
-
imports.wbg.
|
|
626
|
+
imports.wbg.__wbg_wbindgenbooleanget_59f830b1a70d2530 = function(arg0) {
|
|
612
627
|
const v = arg0;
|
|
613
|
-
const ret = typeof(v) === 'boolean' ?
|
|
614
|
-
return ret;
|
|
628
|
+
const ret = typeof(v) === 'boolean' ? v : undefined;
|
|
629
|
+
return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
|
|
615
630
|
};
|
|
616
|
-
imports.wbg.
|
|
631
|
+
imports.wbg.__wbg_wbindgencbdrop_a85ed476c6a370b9 = function(arg0) {
|
|
617
632
|
const obj = arg0.original;
|
|
618
633
|
if (obj.cnt-- == 1) {
|
|
619
634
|
obj.a = 0;
|
|
@@ -622,79 +637,53 @@ function __wbg_get_imports() {
|
|
|
622
637
|
const ret = false;
|
|
623
638
|
return ret;
|
|
624
639
|
};
|
|
625
|
-
imports.wbg.
|
|
626
|
-
const ret = makeMutClosure(arg0, arg1, 36, __wbg_adapter_50);
|
|
627
|
-
return ret;
|
|
628
|
-
};
|
|
629
|
-
imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
|
|
640
|
+
imports.wbg.__wbg_wbindgendebugstring_bb652b1bc2061b6d = function(arg0, arg1) {
|
|
630
641
|
const ret = debugString(arg1);
|
|
631
642
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
632
643
|
const len1 = WASM_VECTOR_LEN;
|
|
633
644
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
634
645
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
635
646
|
};
|
|
636
|
-
imports.wbg.
|
|
637
|
-
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
638
|
-
return ret;
|
|
639
|
-
};
|
|
640
|
-
imports.wbg.__wbindgen_in = function(arg0, arg1) {
|
|
647
|
+
imports.wbg.__wbg_wbindgenin_192b210aa1c401e9 = function(arg0, arg1) {
|
|
641
648
|
const ret = arg0 in arg1;
|
|
642
649
|
return ret;
|
|
643
650
|
};
|
|
644
|
-
imports.wbg.
|
|
645
|
-
const table = wasm.__wbindgen_export_4;
|
|
646
|
-
const offset = table.grow(4);
|
|
647
|
-
table.set(0, undefined);
|
|
648
|
-
table.set(offset + 0, undefined);
|
|
649
|
-
table.set(offset + 1, null);
|
|
650
|
-
table.set(offset + 2, true);
|
|
651
|
-
table.set(offset + 3, false);
|
|
652
|
-
;
|
|
653
|
-
};
|
|
654
|
-
imports.wbg.__wbindgen_is_bigint = function(arg0) {
|
|
651
|
+
imports.wbg.__wbg_wbindgenisbigint_7d76a1ca6454e439 = function(arg0) {
|
|
655
652
|
const ret = typeof(arg0) === 'bigint';
|
|
656
653
|
return ret;
|
|
657
654
|
};
|
|
658
|
-
imports.wbg.
|
|
655
|
+
imports.wbg.__wbg_wbindgenisfunction_ea72b9d66a0e1705 = function(arg0) {
|
|
659
656
|
const ret = typeof(arg0) === 'function';
|
|
660
657
|
return ret;
|
|
661
658
|
};
|
|
662
|
-
imports.wbg.
|
|
659
|
+
imports.wbg.__wbg_wbindgenisobject_dfe064a121d87553 = function(arg0) {
|
|
663
660
|
const val = arg0;
|
|
664
661
|
const ret = typeof(val) === 'object' && val !== null;
|
|
665
662
|
return ret;
|
|
666
663
|
};
|
|
667
|
-
imports.wbg.
|
|
664
|
+
imports.wbg.__wbg_wbindgenisstring_4b74e4111ba029e6 = function(arg0) {
|
|
668
665
|
const ret = typeof(arg0) === 'string';
|
|
669
666
|
return ret;
|
|
670
667
|
};
|
|
671
|
-
imports.wbg.
|
|
668
|
+
imports.wbg.__wbg_wbindgenisundefined_71f08a6ade4354e7 = function(arg0) {
|
|
672
669
|
const ret = arg0 === undefined;
|
|
673
670
|
return ret;
|
|
674
671
|
};
|
|
675
|
-
imports.wbg.
|
|
672
|
+
imports.wbg.__wbg_wbindgenjsvaleq_f27272c0a890df7f = function(arg0, arg1) {
|
|
676
673
|
const ret = arg0 === arg1;
|
|
677
674
|
return ret;
|
|
678
675
|
};
|
|
679
|
-
imports.wbg.
|
|
676
|
+
imports.wbg.__wbg_wbindgenjsvallooseeq_9dd7bb4b95ac195c = function(arg0, arg1) {
|
|
680
677
|
const ret = arg0 == arg1;
|
|
681
678
|
return ret;
|
|
682
679
|
};
|
|
683
|
-
imports.wbg.
|
|
684
|
-
const ret = wasm.memory;
|
|
685
|
-
return ret;
|
|
686
|
-
};
|
|
687
|
-
imports.wbg.__wbindgen_number_get = function(arg0, arg1) {
|
|
680
|
+
imports.wbg.__wbg_wbindgennumberget_d855f947247a3fbc = function(arg0, arg1) {
|
|
688
681
|
const obj = arg1;
|
|
689
682
|
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
690
683
|
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
691
684
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
692
685
|
};
|
|
693
|
-
imports.wbg.
|
|
694
|
-
const ret = arg0;
|
|
695
|
-
return ret;
|
|
696
|
-
};
|
|
697
|
-
imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
|
|
686
|
+
imports.wbg.__wbg_wbindgenstringget_43fe05afe34b0cb1 = function(arg0, arg1) {
|
|
698
687
|
const obj = arg1;
|
|
699
688
|
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
700
689
|
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
@@ -702,12 +691,43 @@ function __wbg_get_imports() {
|
|
|
702
691
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
703
692
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
704
693
|
};
|
|
705
|
-
imports.wbg.
|
|
694
|
+
imports.wbg.__wbg_wbindgenthrow_4c11a24fca429ccf = function(arg0, arg1) {
|
|
695
|
+
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
696
|
+
};
|
|
697
|
+
imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
|
|
698
|
+
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
706
699
|
const ret = getStringFromWasm0(arg0, arg1);
|
|
707
700
|
return ret;
|
|
708
701
|
};
|
|
709
|
-
imports.wbg.
|
|
710
|
-
|
|
702
|
+
imports.wbg.__wbindgen_cast_4625c577ab2ec9ee = function(arg0) {
|
|
703
|
+
// Cast intrinsic for `U64 -> Externref`.
|
|
704
|
+
const ret = BigInt.asUintN(64, arg0);
|
|
705
|
+
return ret;
|
|
706
|
+
};
|
|
707
|
+
imports.wbg.__wbindgen_cast_9ae0607507abb057 = function(arg0) {
|
|
708
|
+
// Cast intrinsic for `I64 -> Externref`.
|
|
709
|
+
const ret = arg0;
|
|
710
|
+
return ret;
|
|
711
|
+
};
|
|
712
|
+
imports.wbg.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {
|
|
713
|
+
// Cast intrinsic for `F64 -> Externref`.
|
|
714
|
+
const ret = arg0;
|
|
715
|
+
return ret;
|
|
716
|
+
};
|
|
717
|
+
imports.wbg.__wbindgen_cast_f4d44e7fde62b12a = function(arg0, arg1) {
|
|
718
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 45, function: Function { arguments: [Externref], shim_idx: 46, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
719
|
+
const ret = makeMutClosure(arg0, arg1, 45, __wbg_adapter_12);
|
|
720
|
+
return ret;
|
|
721
|
+
};
|
|
722
|
+
imports.wbg.__wbindgen_init_externref_table = function() {
|
|
723
|
+
const table = wasm.__wbindgen_export_4;
|
|
724
|
+
const offset = table.grow(4);
|
|
725
|
+
table.set(0, undefined);
|
|
726
|
+
table.set(offset + 0, undefined);
|
|
727
|
+
table.set(offset + 1, null);
|
|
728
|
+
table.set(offset + 2, true);
|
|
729
|
+
table.set(offset + 3, false);
|
|
730
|
+
;
|
|
711
731
|
};
|
|
712
732
|
|
|
713
733
|
return imports;
|
package/fw_file_rs_bg.wasm
CHANGED
|
Binary file
|