@contentauth/c2pa-wasm 0.6.0 → 0.6.2

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 CHANGED
@@ -12,15 +12,23 @@ npm install @contentauth/c2pa-wasm
12
12
 
13
13
  ### Prerequisites
14
14
 
15
- Ensure the repo-wide prerequisites ([Node.js](https://nodejs.org/) v22+, [NX](https://nx.dev/getting-started/intro), and [pnpm](https://pnpm.io/)) are installed. See the [top-level README](https://github.com/contentauth/c2pa-js#prerequisites) for details.
15
+ Ensure the repo-wide prerequisites are installed.:
16
16
 
17
- Then, all of the following prerequisites must be installed before `c2pa-wasm` can be built:
17
+ - ([Node.js](https://nodejs.org/) v22+
18
+ - [NX](https://nx.dev/getting-started/intro)
19
+ - [pnpm](https://pnpm.io/))
18
20
 
19
- #### Rust
21
+ See the [c2pa-js README](../../README.md#prerequisites) for details.
22
+
23
+ Then, install all of the following prerequisites:
20
24
 
21
- [Installation instructions](https://www.rust-lang.org/tools/install)
25
+ - [Rust](#rust)
26
+ - [wasm-bindgen-cli](#wasm-bindgen-cli)
27
+ - [wasm-pack](#wasm-pack)
28
+
29
+ #### Rust
22
30
 
23
- Minimum supported Rust version: **1.88.0**.
31
+ The minimum supported Rust version is **1.88.0**.
24
32
 
25
33
  To install Rust via [rustup](https://rustup.rs/):
26
34
 
@@ -28,7 +36,9 @@ To install Rust via [rustup](https://rustup.rs/):
28
36
  curl https://sh.rustup.rs -sSf | sh
29
37
  ```
30
38
 
31
- Additionally, the `wasm32-unknown-unknown` target must be installed:
39
+ For more information, see [Install Rust](https://www.rust-lang.org/tools/install).
40
+
41
+ Additionally, you must install the `wasm32-unknown-unknown` target:
32
42
 
33
43
  ```sh
34
44
  rustup target add wasm32-unknown-unknown
@@ -36,22 +46,27 @@ rustup target add wasm32-unknown-unknown
36
46
 
37
47
  #### wasm-bindgen-cli
38
48
 
39
- [Documentation](https://wasm-bindgen.github.io/wasm-bindgen/reference/cli)
49
+ The `wasm-bindgen-cli` provides options to tweak JavaScript generated by `wasm-bingen`.
50
+
51
+ For more information, see the [wasm-bindgen-cli documentation](https://wasm-bindgen.github.io/wasm-bindgen/reference/cli).
40
52
 
41
53
  ```sh
42
- cargo install wasm-bindgen-cli@0.2.114
54
+ cargo install wasm-bindgen-cli@0.2.120
43
55
  ```
44
56
 
45
- > **Important:** The version of `wasm-bindgen-cli` **must** match the version of the `wasm-bindgen` dependency in [`Cargo.toml`](./Cargo.toml). A version mismatch will cause build failures with errors like _"rust Wasm file schema version: X.X.X, this binary schema version: Y.Y.Y"_. If you encounter this, check `Cargo.toml` for the correct version and reinstall the CLI accordingly.
57
+ > [!IMPORTANT]
58
+ > The version of `wasm-bindgen-cli` **must** match the version of the `wasm-bindgen` dependency in [`Cargo.toml`](https://github.com/contentauth/c2pa-js/blob/main/packages/c2pa-wasm/Cargo.toml). A version mismatch will cause build failures with errors like _"rust Wasm file schema version: X.X.X, this binary schema version: Y.Y.Y"_. If you encounter this, check `Cargo.toml` for the correct version and reinstall the CLI accordingly.
46
59
 
47
60
  #### wasm-pack
48
61
 
49
- [Documentation](https://rustwasm.github.io/docs/wasm-pack/)
62
+ Wasm-pack is a tool for building and working with Rust-generated WebAssembly that interoperates with JavaScript.
50
63
 
51
64
  ```sh
52
65
  cargo install wasm-pack@0.13.1
53
66
  ```
54
67
 
68
+ For more information, see the [wasm-pack documentation](https://rustwasm.github.io/docs/wasm-pack/).
69
+
55
70
  ### Building
56
71
 
57
72
  To build the library:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentauth/c2pa-wasm",
3
- "version": "0.6.0",
3
+ "version": "0.6.2",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
package/pkg/c2pa.d.ts CHANGED
@@ -36,6 +36,13 @@ export class WasmBuilder {
36
36
  * * `blob` - A [`Blob`] representing an asset which should be included as an ingredient.
37
37
  */
38
38
  addIngredientFromBlob(json: string, format: string, blob: Blob): Promise<void>;
39
+ /**
40
+ * Add a redaction for a JUMBF URI with the given reason.
41
+ *
42
+ * Adds the URI to the builder's redaction list and appends a `c2pa.redacted` action
43
+ * with the reason and URI parameter, as required by the C2PA spec.
44
+ */
45
+ addRedaction(uri: string, reason: any): void;
39
46
  /**
40
47
  * Add a [`Blob`] to the manifest as a resource. The ID must match an identifier in the manifest.
41
48
  */
@@ -166,23 +173,11 @@ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembl
166
173
 
167
174
  export interface InitOutput {
168
175
  readonly memory: WebAssembly.Memory;
169
- readonly __wbg_wasmreader_free: (a: number, b: number) => void;
170
- readonly wasmreader_activeLabel: (a: number) => [number, number];
171
- readonly wasmreader_activeManifest: (a: number) => [number, number, number];
172
- readonly wasmreader_crJson: (a: number) => [number, number];
173
- readonly wasmreader_fromBlob: (a: number, b: number, c: any, d: number, e: number) => any;
174
- readonly wasmreader_fromBlobFragment: (a: number, b: number, c: any, d: any, e: number, f: number) => any;
175
- readonly wasmreader_json: (a: number) => [number, number];
176
- readonly wasmreader_manifestStore: (a: number) => [number, number, number];
177
- readonly wasmreader_resourceToBytes: (a: number, b: number, c: number) => [number, number, number];
178
- readonly __wbg_wasmsigner_free: (a: number, b: number) => void;
179
- readonly wasmsigner_fromDefinition: (a: any) => [number, number, number];
180
- readonly run: () => void;
181
- readonly loadSettings: (a: number, b: number) => [number, number];
182
176
  readonly __wbg_wasmbuilder_free: (a: number, b: number) => void;
183
177
  readonly wasmbuilder_addAction: (a: number, b: any) => [number, number];
184
178
  readonly wasmbuilder_addIngredient: (a: number, b: number, c: number) => [number, number];
185
179
  readonly wasmbuilder_addIngredientFromBlob: (a: number, b: number, c: number, d: number, e: number, f: any) => any;
180
+ readonly wasmbuilder_addRedaction: (a: number, b: number, c: number, d: any) => [number, number];
186
181
  readonly wasmbuilder_addResourceFromBlob: (a: number, b: number, c: number, d: any) => [number, number];
187
182
  readonly wasmbuilder_fromArchive: (a: any, b: number, c: number) => [number, number, number];
188
183
  readonly wasmbuilder_fromJson: (a: number, b: number, c: number, d: number) => [number, number, number];
@@ -195,17 +190,29 @@ export interface InitOutput {
195
190
  readonly wasmbuilder_sign: (a: number, b: any, c: number, d: number, e: any) => any;
196
191
  readonly wasmbuilder_signAndGetManifestBytes: (a: number, b: any, c: number, d: number, e: any) => any;
197
192
  readonly wasmbuilder_toArchive: (a: number) => [number, number, number];
198
- readonly wasm_bindgen__closure__destroy__h30e1f1aacfc8be07: (a: number, b: number) => void;
199
- readonly wasm_bindgen__closure__destroy__h1bb863e8c2f31492: (a: number, b: number) => void;
200
- readonly wasm_bindgen__convert__closures_____invoke__h97115e9701795d15: (a: number, b: number, c: any) => [number, number];
201
- readonly wasm_bindgen__convert__closures_____invoke__h2e3e7bd63b210081: (a: number, b: number, c: any, d: any) => void;
202
- readonly wasm_bindgen__convert__closures_____invoke__ha8a072e6843ba599: (a: number, b: number) => void;
193
+ readonly __wbg_wasmreader_free: (a: number, b: number) => void;
194
+ readonly wasmreader_activeLabel: (a: number) => [number, number];
195
+ readonly wasmreader_activeManifest: (a: number) => [number, number, number];
196
+ readonly wasmreader_crJson: (a: number) => [number, number];
197
+ readonly wasmreader_fromBlob: (a: number, b: number, c: any, d: number, e: number) => any;
198
+ readonly wasmreader_fromBlobFragment: (a: number, b: number, c: any, d: any, e: number, f: number) => any;
199
+ readonly wasmreader_json: (a: number) => [number, number];
200
+ readonly wasmreader_manifestStore: (a: number) => [number, number, number];
201
+ readonly wasmreader_resourceToBytes: (a: number, b: number, c: number) => [number, number, number];
202
+ readonly run: () => void;
203
+ readonly loadSettings: (a: number, b: number) => [number, number];
204
+ readonly __wbg_wasmsigner_free: (a: number, b: number) => void;
205
+ readonly wasmsigner_fromDefinition: (a: any) => [number, number, number];
206
+ readonly wasm_bindgen__convert__closures_____invoke__h4aa26a54fe4da3a7: (a: number, b: number, c: any) => [number, number];
207
+ readonly wasm_bindgen__convert__closures_____invoke__h71c2fa3b316ba280: (a: number, b: number, c: any, d: any) => void;
208
+ readonly wasm_bindgen__convert__closures_____invoke__hb660c60820732a9e: (a: number, b: number) => void;
203
209
  readonly __wbindgen_malloc: (a: number, b: number) => number;
204
210
  readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
205
211
  readonly __wbindgen_exn_store: (a: number) => void;
206
212
  readonly __externref_table_alloc: () => number;
207
213
  readonly __wbindgen_externrefs: WebAssembly.Table;
208
214
  readonly __wbindgen_free: (a: number, b: number, c: number) => void;
215
+ readonly __wbindgen_destroy_closure: (a: number, b: number) => void;
209
216
  readonly __externref_table_dealloc: (a: number) => void;
210
217
  readonly __wbindgen_start: () => void;
211
218
  }
package/pkg/c2pa.js CHANGED
@@ -5,7 +5,6 @@
5
5
  */
6
6
  export class WasmBuilder {
7
7
  static __wrap(ptr) {
8
- ptr = ptr >>> 0;
9
8
  const obj = Object.create(WasmBuilder.prototype);
10
9
  obj.__wbg_ptr = ptr;
11
10
  WasmBuilderFinalization.register(obj, obj.__wbg_ptr, obj);
@@ -66,6 +65,22 @@ export class WasmBuilder {
66
65
  const ret = wasm.wasmbuilder_addIngredientFromBlob(this.__wbg_ptr, ptr0, len0, ptr1, len1, blob);
67
66
  return ret;
68
67
  }
68
+ /**
69
+ * Add a redaction for a JUMBF URI with the given reason.
70
+ *
71
+ * Adds the URI to the builder's redaction list and appends a `c2pa.redacted` action
72
+ * with the reason and URI parameter, as required by the C2PA spec.
73
+ * @param {string} uri
74
+ * @param {any} reason
75
+ */
76
+ addRedaction(uri, reason) {
77
+ const ptr0 = passStringToWasm0(uri, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
78
+ const len0 = WASM_VECTOR_LEN;
79
+ const ret = wasm.wasmbuilder_addRedaction(this.__wbg_ptr, ptr0, len0, reason);
80
+ if (ret[1]) {
81
+ throw takeFromExternrefTable0(ret[0]);
82
+ }
83
+ }
69
84
  /**
70
85
  * Add a [`Blob`] to the manifest as a resource. The ID must match an identifier in the manifest.
71
86
  * @param {string} id
@@ -227,7 +242,6 @@ if (Symbol.dispose) WasmBuilder.prototype[Symbol.dispose] = WasmBuilder.prototyp
227
242
  */
228
243
  export class WasmReader {
229
244
  static __wrap(ptr) {
230
- ptr = ptr >>> 0;
231
245
  const obj = Object.create(WasmReader.prototype);
232
246
  obj.__wbg_ptr = ptr;
233
247
  WasmReaderFinalization.register(obj, obj.__wbg_ptr, obj);
@@ -362,7 +376,6 @@ if (Symbol.dispose) WasmReader.prototype[Symbol.dispose] = WasmReader.prototype.
362
376
 
363
377
  export class WasmSigner {
364
378
  static __wrap(ptr) {
365
- ptr = ptr >>> 0;
366
379
  const obj = Object.create(WasmSigner.prototype);
367
380
  obj.__wbg_ptr = ptr;
368
381
  WasmSignerFinalization.register(obj, obj.__wbg_ptr, obj);
@@ -418,76 +431,75 @@ export function loadSettings(settings) {
418
431
  export function run() {
419
432
  wasm.run();
420
433
  }
421
-
422
434
  function __wbg_get_imports() {
423
435
  const import0 = {
424
436
  __proto__: null,
425
- __wbg_Error_83742b46f01ce22d: function(arg0, arg1) {
437
+ __wbg_Error_3639a60ed15f87e7: function(arg0, arg1) {
426
438
  const ret = Error(getStringFromWasm0(arg0, arg1));
427
439
  return ret;
428
440
  },
429
- __wbg_Number_a5a435bd7bbec835: function(arg0) {
441
+ __wbg_Number_a3d737fd183f7dca: function(arg0) {
430
442
  const ret = Number(arg0);
431
443
  return ret;
432
444
  },
433
- __wbg___wbindgen_bigint_get_as_i64_447a76b5c6ef7bda: function(arg0, arg1) {
445
+ __wbg___wbindgen_bigint_get_as_i64_3af6d4ca77193a4b: function(arg0, arg1) {
434
446
  const v = arg1;
435
447
  const ret = typeof(v) === 'bigint' ? v : undefined;
436
448
  getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
437
449
  getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
438
450
  },
439
- __wbg___wbindgen_boolean_get_c0f3f60bac5a78d1: function(arg0) {
451
+ __wbg___wbindgen_boolean_get_c3dd5c39f1b5a12b: function(arg0) {
440
452
  const v = arg0;
441
453
  const ret = typeof(v) === 'boolean' ? v : undefined;
442
454
  return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
443
455
  },
444
- __wbg___wbindgen_debug_string_5398f5bb970e0daa: function(arg0, arg1) {
456
+ __wbg___wbindgen_debug_string_07cb72cfcc952e2b: function(arg0, arg1) {
445
457
  const ret = debugString(arg1);
446
458
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
447
459
  const len1 = WASM_VECTOR_LEN;
448
460
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
449
461
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
450
462
  },
451
- __wbg___wbindgen_in_41dbb8413020e076: function(arg0, arg1) {
463
+ __wbg___wbindgen_in_2617fa76397620d3: function(arg0, arg1) {
452
464
  const ret = arg0 in arg1;
453
465
  return ret;
454
466
  },
455
- __wbg___wbindgen_is_bigint_e2141d4f045b7eda: function(arg0) {
467
+ __wbg___wbindgen_is_bigint_d6a8167cac401b95: function(arg0) {
456
468
  const ret = typeof(arg0) === 'bigint';
457
469
  return ret;
458
470
  },
459
- __wbg___wbindgen_is_function_3c846841762788c1: function(arg0) {
471
+ __wbg___wbindgen_is_function_2f0fd7ceb86e64c5: function(arg0) {
460
472
  const ret = typeof(arg0) === 'function';
461
473
  return ret;
462
474
  },
463
- __wbg___wbindgen_is_object_781bc9f159099513: function(arg0) {
475
+ __wbg___wbindgen_is_object_5b22ff2418063a9c: function(arg0) {
464
476
  const val = arg0;
465
477
  const ret = typeof(val) === 'object' && val !== null;
466
478
  return ret;
467
479
  },
468
- __wbg___wbindgen_is_string_7ef6b97b02428fae: function(arg0) {
480
+ __wbg___wbindgen_is_string_eddc07a3efad52e6: function(arg0) {
469
481
  const ret = typeof(arg0) === 'string';
470
482
  return ret;
471
483
  },
472
- __wbg___wbindgen_is_undefined_52709e72fb9f179c: function(arg0) {
484
+ __wbg___wbindgen_is_undefined_244a92c34d3b6ec0: function(arg0) {
473
485
  const ret = arg0 === undefined;
474
486
  return ret;
475
487
  },
476
- __wbg___wbindgen_jsval_eq_ee31bfad3e536463: function(arg0, arg1) {
488
+ __wbg___wbindgen_jsval_eq_403eaa3610500a25: function(arg0, arg1) {
477
489
  const ret = arg0 === arg1;
478
490
  return ret;
479
491
  },
480
- __wbg___wbindgen_jsval_loose_eq_5bcc3bed3c69e72b: function(arg0, arg1) {
492
+ __wbg___wbindgen_jsval_loose_eq_1978f1e77b4bce62: function(arg0, arg1) {
481
493
  const ret = arg0 == arg1;
482
494
  return ret;
483
495
  },
484
- __wbg___wbindgen_number_get_34bb9d9dcfa21373: function(arg0, arg1) {
496
+ __wbg___wbindgen_number_get_dd6d69a6079f26f1: function(arg0, arg1) {
485
497
  const obj = arg1;
486
498
  const ret = typeof(obj) === 'number' ? obj : undefined;
487
499
  getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
488
500
  getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
489
501
  },
490
- __wbg___wbindgen_string_get_395e606bd0ee4427: function(arg0, arg1) {
502
+ __wbg___wbindgen_string_get_965592073e5d848c: function(arg0, arg1) {
491
503
  const obj = arg1;
492
504
  const ret = typeof(obj) === 'string' ? obj : undefined;
493
505
  var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
@@ -495,34 +507,34 @@ function __wbg_get_imports() {
495
507
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
496
508
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
497
509
  },
498
- __wbg___wbindgen_throw_6ddd609b62940d55: function(arg0, arg1) {
510
+ __wbg___wbindgen_throw_9c75d47bf9e7731e: function(arg0, arg1) {
499
511
  throw new Error(getStringFromWasm0(arg0, arg1));
500
512
  },
501
- __wbg__wbg_cb_unref_6b5b6b8576d35cb1: function(arg0) {
513
+ __wbg__wbg_cb_unref_158e43e869788cdc: function(arg0) {
502
514
  arg0._wbg_cb_unref();
503
515
  },
504
- __wbg_abort_5ef96933660780b7: function(arg0) {
505
- arg0.abort();
506
- },
507
- __wbg_abort_6479c2d794ebf2ee: function(arg0, arg1) {
516
+ __wbg_abort_43913e33ecb83d0d: function(arg0, arg1) {
508
517
  arg0.abort(arg1);
509
518
  },
510
- __wbg_append_608dfb635ee8998f: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
519
+ __wbg_abort_87eb7f23cf4b73d1: function(arg0) {
520
+ arg0.abort();
521
+ },
522
+ __wbg_append_8df396311184f750: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
511
523
  arg0.append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
512
524
  }, arguments); },
513
- __wbg_arrayBuffer_eb8e9ca620af2a19: function() { return handleError(function (arg0) {
525
+ __wbg_arrayBuffer_87e3ac06d961f7a0: function() { return handleError(function (arg0) {
514
526
  const ret = arg0.arrayBuffer();
515
527
  return ret;
516
528
  }, arguments); },
517
- __wbg_byteLength_607b856aa6c5a508: function(arg0) {
529
+ __wbg_byteLength_1f57c71e64ee0180: function(arg0) {
518
530
  const ret = arg0.byteLength;
519
531
  return ret;
520
532
  },
521
- __wbg_call_2d781c1f4d5c0ef8: function() { return handleError(function (arg0, arg1, arg2) {
533
+ __wbg_call_a41d6421b30a32c5: function() { return handleError(function (arg0, arg1, arg2) {
522
534
  const ret = arg0.call(arg1, arg2);
523
535
  return ret;
524
536
  }, arguments); },
525
- __wbg_call_e133b57c9155d22c: function() { return handleError(function (arg0, arg1) {
537
+ __wbg_call_add9e5a76382e668: function() { return handleError(function (arg0, arg1) {
526
538
  const ret = arg0.call(arg1);
527
539
  return ret;
528
540
  }, arguments); },
@@ -534,11 +546,11 @@ function __wbg_get_imports() {
534
546
  const ret = arg0.crypto;
535
547
  return ret;
536
548
  },
537
- __wbg_done_08ce71ee07e3bd17: function(arg0) {
549
+ __wbg_done_b1afd6201ac045e0: function(arg0) {
538
550
  const ret = arg0.done;
539
551
  return ret;
540
552
  },
541
- __wbg_entries_e8a20ff8c9757101: function(arg0) {
553
+ __wbg_entries_bb9843ba73dc70d6: function(arg0) {
542
554
  const ret = Object.entries(arg0);
543
555
  return ret;
544
556
  },
@@ -553,7 +565,7 @@ function __wbg_get_imports() {
553
565
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
554
566
  }
555
567
  },
556
- __wbg_fetch_5550a88cf343aaa9: function(arg0, arg1) {
568
+ __wbg_fetch_1a030943aa8e0c38: function(arg0, arg1) {
557
569
  const ret = arg0.fetch(arg1);
558
570
  return ret;
559
571
  },
@@ -561,36 +573,36 @@ function __wbg_get_imports() {
561
573
  const ret = fetch(arg0);
562
574
  return ret;
563
575
  },
564
- __wbg_from_4bdf88943703fd48: function(arg0) {
576
+ __wbg_from_ff141b1e4c69b979: function(arg0) {
565
577
  const ret = Array.from(arg0);
566
578
  return ret;
567
579
  },
568
- __wbg_getRandomValues_3dda8830c2565714: function() { return handleError(function (arg0, arg1) {
569
- globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
570
- }, arguments); },
571
580
  __wbg_getRandomValues_3f44b700395062e5: function() { return handleError(function (arg0, arg1) {
572
581
  globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
573
582
  }, arguments); },
574
583
  __wbg_getRandomValues_c44a50d8cfdaebeb: function() { return handleError(function (arg0, arg1) {
575
584
  arg0.getRandomValues(arg1);
576
585
  }, arguments); },
577
- __wbg_getTime_1dad7b5386ddd2d9: function(arg0) {
586
+ __wbg_getRandomValues_ef12552bf5acd2fe: function() { return handleError(function (arg0, arg1) {
587
+ globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
588
+ }, arguments); },
589
+ __wbg_getTime_e599bee315e19eba: function(arg0) {
578
590
  const ret = arg0.getTime();
579
591
  return ret;
580
592
  },
581
- __wbg_get_326e41e095fb2575: function() { return handleError(function (arg0, arg1) {
593
+ __wbg_get_41476db20fef99a8: function() { return handleError(function (arg0, arg1) {
582
594
  const ret = Reflect.get(arg0, arg1);
583
595
  return ret;
584
596
  }, arguments); },
585
- __wbg_get_3ef1eba1850ade27: function() { return handleError(function (arg0, arg1) {
586
- const ret = Reflect.get(arg0, arg1);
587
- return ret;
588
- }, arguments); },
589
- __wbg_get_a8ee5c45dabc1b3b: function(arg0, arg1) {
597
+ __wbg_get_652f640b3b0b6e3e: function(arg0, arg1) {
590
598
  const ret = arg0[arg1 >>> 0];
591
599
  return ret;
592
600
  },
593
- __wbg_get_unchecked_329cfe50afab7352: function(arg0, arg1) {
601
+ __wbg_get_9cfea9b7bbf12a15: function() { return handleError(function (arg0, arg1) {
602
+ const ret = Reflect.get(arg0, arg1);
603
+ return ret;
604
+ }, arguments); },
605
+ __wbg_get_unchecked_be562b1421656321: function(arg0, arg1) {
594
606
  const ret = arg0[arg1 >>> 0];
595
607
  return ret;
596
608
  },
@@ -598,15 +610,15 @@ function __wbg_get_imports() {
598
610
  const ret = arg0[arg1];
599
611
  return ret;
600
612
  },
601
- __wbg_has_926ef2ff40b308cf: function() { return handleError(function (arg0, arg1) {
613
+ __wbg_has_3a6f31f647e0ba22: function() { return handleError(function (arg0, arg1) {
602
614
  const ret = Reflect.has(arg0, arg1);
603
615
  return ret;
604
616
  }, arguments); },
605
- __wbg_headers_eb2234545f9ff993: function(arg0) {
617
+ __wbg_headers_de17f740bce997ae: function(arg0) {
606
618
  const ret = arg0.headers;
607
619
  return ret;
608
620
  },
609
- __wbg_instanceof_ArrayBuffer_101e2bf31071a9f6: function(arg0) {
621
+ __wbg_instanceof_ArrayBuffer_eab9f28fbec23477: function(arg0) {
610
622
  let result;
611
623
  try {
612
624
  result = arg0 instanceof ArrayBuffer;
@@ -616,7 +628,7 @@ function __wbg_get_imports() {
616
628
  const ret = result;
617
629
  return ret;
618
630
  },
619
- __wbg_instanceof_Map_f194b366846aca0c: function(arg0) {
631
+ __wbg_instanceof_Map_10d4edf60fcf9327: function(arg0) {
620
632
  let result;
621
633
  try {
622
634
  result = arg0 instanceof Map;
@@ -626,7 +638,7 @@ function __wbg_get_imports() {
626
638
  const ret = result;
627
639
  return ret;
628
640
  },
629
- __wbg_instanceof_Promise_7c3bdd7805c2c6e6: function(arg0) {
641
+ __wbg_instanceof_Promise_1208ac2399c33e10: function(arg0) {
630
642
  let result;
631
643
  try {
632
644
  result = arg0 instanceof Promise;
@@ -636,7 +648,7 @@ function __wbg_get_imports() {
636
648
  const ret = result;
637
649
  return ret;
638
650
  },
639
- __wbg_instanceof_Response_9b4d9fd451e051b1: function(arg0) {
651
+ __wbg_instanceof_Response_370b83aa6c17e88a: function(arg0) {
640
652
  let result;
641
653
  try {
642
654
  result = arg0 instanceof Response;
@@ -646,7 +658,7 @@ function __wbg_get_imports() {
646
658
  const ret = result;
647
659
  return ret;
648
660
  },
649
- __wbg_instanceof_Uint8Array_740438561a5b956d: function(arg0) {
661
+ __wbg_instanceof_Uint8Array_57d77acd50e4c44d: function(arg0) {
650
662
  let result;
651
663
  try {
652
664
  result = arg0 instanceof Uint8Array;
@@ -656,23 +668,23 @@ function __wbg_get_imports() {
656
668
  const ret = result;
657
669
  return ret;
658
670
  },
659
- __wbg_isArray_33b91feb269ff46e: function(arg0) {
671
+ __wbg_isArray_c6c6ef8308995bcf: function(arg0) {
660
672
  const ret = Array.isArray(arg0);
661
673
  return ret;
662
674
  },
663
- __wbg_isSafeInteger_ecd6a7f9c3e053cd: function(arg0) {
675
+ __wbg_isSafeInteger_3c56c421a5b4cce4: function(arg0) {
664
676
  const ret = Number.isSafeInteger(arg0);
665
677
  return ret;
666
678
  },
667
- __wbg_iterator_d8f549ec8fb061b1: function() {
679
+ __wbg_iterator_9d68985a1d096fc2: function() {
668
680
  const ret = Symbol.iterator;
669
681
  return ret;
670
682
  },
671
- __wbg_length_b3416cf66a5452c8: function(arg0) {
683
+ __wbg_length_0a6ce016dc1460b0: function(arg0) {
672
684
  const ret = arg0.length;
673
685
  return ret;
674
686
  },
675
- __wbg_length_ea16607d7b61445b: function(arg0) {
687
+ __wbg_length_ba3c032602efe310: function(arg0) {
676
688
  const ret = arg0.length;
677
689
  return ret;
678
690
  },
@@ -680,54 +692,54 @@ function __wbg_get_imports() {
680
692
  const ret = arg0.msCrypto;
681
693
  return ret;
682
694
  },
683
- __wbg_new_0837727332ac86ba: function() { return handleError(function () {
684
- const ret = new Headers();
685
- return ret;
686
- }, arguments); },
687
- __wbg_new_0_1dcafdf5e786e876: function() {
695
+ __wbg_new_0_e486ec9936f7edbf: function() {
688
696
  const ret = new Date();
689
697
  return ret;
690
698
  },
691
- __wbg_new_227d7c05414eb861: function() {
692
- const ret = new Error();
693
- return ret;
694
- },
695
- __wbg_new_338f3b13aa93419b: function() { return handleError(function () {
696
- const ret = new FileReaderSync();
699
+ __wbg_new_18865c63fa645c6f: function() { return handleError(function () {
700
+ const ret = new Headers();
697
701
  return ret;
698
702
  }, arguments); },
699
- __wbg_new_49d5571bd3f0c4d4: function() {
700
- const ret = new Map();
703
+ __wbg_new_227d7c05414eb861: function() {
704
+ const ret = new Error();
701
705
  return ret;
702
706
  },
703
- __wbg_new_5f486cdf45a04d78: function(arg0) {
704
- const ret = new Uint8Array(arg0);
707
+ __wbg_new_2fad8ca02fd00684: function() {
708
+ const ret = new Object();
705
709
  return ret;
706
710
  },
707
- __wbg_new_a70fbab9066b301f: function() {
711
+ __wbg_new_3baa8d9866155c79: function() {
708
712
  const ret = new Array();
709
713
  return ret;
710
714
  },
711
- __wbg_new_ab79df5bd7c26067: function() {
712
- const ret = new Object();
715
+ __wbg_new_46ae4e4ff2a07a64: function() {
716
+ const ret = new Map();
713
717
  return ret;
714
718
  },
715
- __wbg_new_c518c60af666645b: function() { return handleError(function () {
719
+ __wbg_new_51ff470dc2f61e27: function() { return handleError(function () {
716
720
  const ret = new AbortController();
717
721
  return ret;
718
722
  }, arguments); },
719
- __wbg_new_from_slice_22da9388ac046e50: function(arg0, arg1) {
723
+ __wbg_new_8454eee672b2ba6e: function(arg0) {
724
+ const ret = new Uint8Array(arg0);
725
+ return ret;
726
+ },
727
+ __wbg_new_b440b9ba53cb2554: function() { return handleError(function () {
728
+ const ret = new FileReaderSync();
729
+ return ret;
730
+ }, arguments); },
731
+ __wbg_new_from_slice_5a173c243af2e823: function(arg0, arg1) {
720
732
  const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
721
733
  return ret;
722
734
  },
723
- __wbg_new_typed_aaaeaf29cf802876: function(arg0, arg1) {
735
+ __wbg_new_typed_1137602701dc87d4: function(arg0, arg1) {
724
736
  try {
725
737
  var state0 = {a: arg0, b: arg1};
726
738
  var cb0 = (arg0, arg1) => {
727
739
  const a = state0.a;
728
740
  state0.a = 0;
729
741
  try {
730
- return wasm_bindgen__convert__closures_____invoke__h2e3e7bd63b210081(a, state0.b, arg0, arg1);
742
+ return wasm_bindgen__convert__closures_____invoke__h71c2fa3b316ba280(a, state0.b, arg0, arg1);
731
743
  } finally {
732
744
  state0.a = a;
733
745
  }
@@ -735,30 +747,30 @@ function __wbg_get_imports() {
735
747
  const ret = new Promise(cb0);
736
748
  return ret;
737
749
  } finally {
738
- state0.a = state0.b = 0;
750
+ state0.a = 0;
739
751
  }
740
752
  },
741
- __wbg_new_with_length_825018a1616e9e55: function(arg0) {
753
+ __wbg_new_with_length_9011f5da794bf5d9: function(arg0) {
742
754
  const ret = new Uint8Array(arg0 >>> 0);
743
755
  return ret;
744
756
  },
745
- __wbg_new_with_str_and_init_b4b54d1a819bc724: function() { return handleError(function (arg0, arg1, arg2) {
757
+ __wbg_new_with_str_and_init_da311e12114f4d1e: function() { return handleError(function (arg0, arg1, arg2) {
746
758
  const ret = new Request(getStringFromWasm0(arg0, arg1), arg2);
747
759
  return ret;
748
760
  }, arguments); },
749
- __wbg_next_11b99ee6237339e3: function() { return handleError(function (arg0) {
750
- const ret = arg0.next();
751
- return ret;
752
- }, arguments); },
753
- __wbg_next_e01a967809d1aa68: function(arg0) {
761
+ __wbg_next_261c3c48c6e309a5: function(arg0) {
754
762
  const ret = arg0.next;
755
763
  return ret;
756
764
  },
765
+ __wbg_next_aacee310bcfe6461: function() { return handleError(function (arg0) {
766
+ const ret = arg0.next();
767
+ return ret;
768
+ }, arguments); },
757
769
  __wbg_node_84ea875411254db1: function(arg0) {
758
770
  const ret = arg0.node;
759
771
  return ret;
760
772
  },
761
- __wbg_now_16f0c993d5dd6c27: function() {
773
+ __wbg_now_4f457f10f864aec5: function() {
762
774
  const ret = Date.now();
763
775
  return ret;
764
776
  },
@@ -766,20 +778,20 @@ function __wbg_get_imports() {
766
778
  const ret = arg0.process;
767
779
  return ret;
768
780
  },
769
- __wbg_prototypesetcall_d62e5099504357e6: function(arg0, arg1, arg2) {
781
+ __wbg_prototypesetcall_fd4050e806e1d519: function(arg0, arg1, arg2) {
770
782
  Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
771
783
  },
772
- __wbg_queueMicrotask_0c399741342fb10f: function(arg0) {
784
+ __wbg_queueMicrotask_40ac6ffc2848ba77: function(arg0) {
785
+ queueMicrotask(arg0);
786
+ },
787
+ __wbg_queueMicrotask_74d092439f6494c1: function(arg0) {
773
788
  const ret = arg0.queueMicrotask;
774
789
  return ret;
775
790
  },
776
- __wbg_queueMicrotask_a082d78ce798393e: function(arg0) {
777
- queueMicrotask(arg0);
778
- },
779
791
  __wbg_randomFillSync_6c25eac9869eb53c: function() { return handleError(function (arg0, arg1) {
780
792
  arg0.randomFillSync(arg1);
781
793
  }, arguments); },
782
- __wbg_readAsArrayBuffer_762e6372375b4632: function() { return handleError(function (arg0, arg1) {
794
+ __wbg_readAsArrayBuffer_952b5bb25ca28be4: function() { return handleError(function (arg0, arg1) {
783
795
  const ret = arg0.readAsArrayBuffer(arg1);
784
796
  return ret;
785
797
  }, arguments); },
@@ -787,7 +799,7 @@ function __wbg_get_imports() {
787
799
  const ret = module.require;
788
800
  return ret;
789
801
  }, arguments); },
790
- __wbg_resolve_ae8d83246e5bcc12: function(arg0) {
802
+ __wbg_resolve_9feb5d906ca62419: function(arg0) {
791
803
  const ret = Promise.resolve(arg0);
792
804
  return ret;
793
805
  },
@@ -795,49 +807,49 @@ function __wbg_get_imports() {
795
807
  const ret = setTimeout(arg0, arg1);
796
808
  return ret;
797
809
  },
798
- __wbg_set_282384002438957f: function(arg0, arg1, arg2) {
799
- arg0[arg1 >>> 0] = arg2;
800
- },
801
810
  __wbg_set_6be42768c690e380: function(arg0, arg1, arg2) {
802
811
  arg0[arg1] = arg2;
803
812
  },
804
- __wbg_set_8c0b3ffcf05d61c2: function(arg0, arg1, arg2) {
805
- arg0.set(getArrayU8FromWasm0(arg1, arg2));
806
- },
807
- __wbg_set_bf7251625df30a02: function(arg0, arg1, arg2) {
813
+ __wbg_set_82f7a370f604db70: function(arg0, arg1, arg2) {
808
814
  const ret = arg0.set(arg1, arg2);
809
815
  return ret;
810
816
  },
811
- __wbg_set_body_a3d856b097dfda04: function(arg0, arg1) {
817
+ __wbg_set_b0d9dc239ecdb765: function(arg0, arg1, arg2) {
818
+ arg0.set(getArrayU8FromWasm0(arg1, arg2));
819
+ },
820
+ __wbg_set_body_aaff4f5f9991f342: function(arg0, arg1) {
812
821
  arg0.body = arg1;
813
822
  },
814
- __wbg_set_cache_ec7e430c6056ebda: function(arg0, arg1) {
823
+ __wbg_set_cache_d1f2b7b4dfa39317: function(arg0, arg1) {
815
824
  arg0.cache = __wbindgen_enum_RequestCache[arg1];
816
825
  },
817
- __wbg_set_credentials_ed63183445882c65: function(arg0, arg1) {
826
+ __wbg_set_credentials_f31e4d30b974ce14: function(arg0, arg1) {
818
827
  arg0.credentials = __wbindgen_enum_RequestCredentials[arg1];
819
828
  },
820
- __wbg_set_headers_3c8fecc693b75327: function(arg0, arg1) {
829
+ __wbg_set_f614f6a0608d1d1d: function(arg0, arg1, arg2) {
830
+ arg0[arg1 >>> 0] = arg2;
831
+ },
832
+ __wbg_set_headers_ae96049ea40e9eef: function(arg0, arg1) {
821
833
  arg0.headers = arg1;
822
834
  },
823
- __wbg_set_method_8c015e8bcafd7be1: function(arg0, arg1, arg2) {
835
+ __wbg_set_method_0eea8a5597775fa1: function(arg0, arg1, arg2) {
824
836
  arg0.method = getStringFromWasm0(arg1, arg2);
825
837
  },
826
- __wbg_set_mode_5a87f2c809cf37c2: function(arg0, arg1) {
838
+ __wbg_set_mode_9fe47bff60a1580d: function(arg0, arg1) {
827
839
  arg0.mode = __wbindgen_enum_RequestMode[arg1];
828
840
  },
829
- __wbg_set_signal_0cebecb698f25d21: function(arg0, arg1) {
841
+ __wbg_set_signal_8c5cf4c3b27bd8a8: function(arg0, arg1) {
830
842
  arg0.signal = arg1;
831
843
  },
832
- __wbg_signal_166e1da31adcac18: function(arg0) {
844
+ __wbg_signal_4643ce883b92b553: function(arg0) {
833
845
  const ret = arg0.signal;
834
846
  return ret;
835
847
  },
836
- __wbg_size_819df95195daae81: function(arg0) {
848
+ __wbg_size_7aa12780f92a63e8: function(arg0) {
837
849
  const ret = arg0.size;
838
850
  return ret;
839
851
  },
840
- __wbg_slice_f55d290dcc799204: function() { return handleError(function (arg0, arg1, arg2) {
852
+ __wbg_slice_4fa1187be1acab2b: function() { return handleError(function (arg0, arg1, arg2) {
841
853
  const ret = arg0.slice(arg1, arg2);
842
854
  return ret;
843
855
  }, arguments); },
@@ -848,54 +860,54 @@ function __wbg_get_imports() {
848
860
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
849
861
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
850
862
  },
851
- __wbg_static_accessor_GLOBAL_8adb955bd33fac2f: function() {
852
- const ret = typeof global === 'undefined' ? null : global;
863
+ __wbg_static_accessor_GLOBAL_THIS_1c7f1bd6c6941fdb: function() {
864
+ const ret = typeof globalThis === 'undefined' ? null : globalThis;
853
865
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
854
866
  },
855
- __wbg_static_accessor_GLOBAL_THIS_ad356e0db91c7913: function() {
856
- const ret = typeof globalThis === 'undefined' ? null : globalThis;
867
+ __wbg_static_accessor_GLOBAL_e039bc914f83e74e: function() {
868
+ const ret = typeof global === 'undefined' ? null : global;
857
869
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
858
870
  },
859
- __wbg_static_accessor_SELF_f207c857566db248: function() {
871
+ __wbg_static_accessor_SELF_8bf8c48c28420ad5: function() {
860
872
  const ret = typeof self === 'undefined' ? null : self;
861
873
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
862
874
  },
863
- __wbg_static_accessor_WINDOW_bb9f1ba69d61b386: function() {
875
+ __wbg_static_accessor_WINDOW_6aeee9b51652ee0f: function() {
864
876
  const ret = typeof window === 'undefined' ? null : window;
865
877
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
866
878
  },
867
- __wbg_status_318629ab93a22955: function(arg0) {
879
+ __wbg_status_157e67ab07d01f8a: function(arg0) {
868
880
  const ret = arg0.status;
869
881
  return ret;
870
882
  },
871
- __wbg_stringify_5ae93966a84901ac: function() { return handleError(function (arg0) {
883
+ __wbg_stringify_7fd5cae8859a6f10: function() { return handleError(function (arg0) {
872
884
  const ret = JSON.stringify(arg0);
873
885
  return ret;
874
886
  }, arguments); },
875
- __wbg_subarray_a068d24e39478a8a: function(arg0, arg1, arg2) {
887
+ __wbg_subarray_fbe3cef290e1fa43: function(arg0, arg1, arg2) {
876
888
  const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
877
889
  return ret;
878
890
  },
879
- __wbg_then_098abe61755d12f6: function(arg0, arg1) {
891
+ __wbg_then_20a157d939b514f5: function(arg0, arg1) {
880
892
  const ret = arg0.then(arg1);
881
893
  return ret;
882
894
  },
883
- __wbg_then_9e335f6dd892bc11: function(arg0, arg1, arg2) {
895
+ __wbg_then_5ef9b762bc91555c: function(arg0, arg1, arg2) {
884
896
  const ret = arg0.then(arg1, arg2);
885
897
  return ret;
886
898
  },
887
- __wbg_url_7fefc1820fba4e0c: function(arg0, arg1) {
899
+ __wbg_url_a0e994e7d0317efc: function(arg0, arg1) {
888
900
  const ret = arg1.url;
889
901
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
890
902
  const len1 = WASM_VECTOR_LEN;
891
903
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
892
904
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
893
905
  },
894
- __wbg_valueOf_3dcf9bcf2e496cb2: function(arg0) {
906
+ __wbg_valueOf_96c1596174cf4ec4: function(arg0) {
895
907
  const ret = arg0.valueOf();
896
908
  return ret;
897
909
  },
898
- __wbg_value_21fc78aab0322612: function(arg0) {
910
+ __wbg_value_f852716acdeb3e82: function(arg0) {
899
911
  const ret = arg0.value;
900
912
  return ret;
901
913
  },
@@ -908,13 +920,13 @@ function __wbg_get_imports() {
908
920
  return ret;
909
921
  },
910
922
  __wbindgen_cast_0000000000000001: function(arg0, arg1) {
911
- // Cast intrinsic for `Closure(Closure { dtor_idx: 1539, function: Function { arguments: [], shim_idx: 1540, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
912
- const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h30e1f1aacfc8be07, wasm_bindgen__convert__closures_____invoke__ha8a072e6843ba599);
923
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 2917, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
924
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h4aa26a54fe4da3a7);
913
925
  return ret;
914
926
  },
915
927
  __wbindgen_cast_0000000000000002: function(arg0, arg1) {
916
- // Cast intrinsic for `Closure(Closure { dtor_idx: 1542, function: Function { arguments: [Externref], shim_idx: 2995, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
917
- const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h1bb863e8c2f31492, wasm_bindgen__convert__closures_____invoke__h97115e9701795d15);
928
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 1626, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
929
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__hb660c60820732a9e);
918
930
  return ret;
919
931
  },
920
932
  __wbindgen_cast_0000000000000003: function(arg0) {
@@ -965,19 +977,19 @@ function __wbg_get_imports() {
965
977
  };
966
978
  }
967
979
 
968
- function wasm_bindgen__convert__closures_____invoke__ha8a072e6843ba599(arg0, arg1) {
969
- wasm.wasm_bindgen__convert__closures_____invoke__ha8a072e6843ba599(arg0, arg1);
980
+ function wasm_bindgen__convert__closures_____invoke__hb660c60820732a9e(arg0, arg1) {
981
+ wasm.wasm_bindgen__convert__closures_____invoke__hb660c60820732a9e(arg0, arg1);
970
982
  }
971
983
 
972
- function wasm_bindgen__convert__closures_____invoke__h97115e9701795d15(arg0, arg1, arg2) {
973
- const ret = wasm.wasm_bindgen__convert__closures_____invoke__h97115e9701795d15(arg0, arg1, arg2);
984
+ function wasm_bindgen__convert__closures_____invoke__h4aa26a54fe4da3a7(arg0, arg1, arg2) {
985
+ const ret = wasm.wasm_bindgen__convert__closures_____invoke__h4aa26a54fe4da3a7(arg0, arg1, arg2);
974
986
  if (ret[1]) {
975
987
  throw takeFromExternrefTable0(ret[0]);
976
988
  }
977
989
  }
978
990
 
979
- function wasm_bindgen__convert__closures_____invoke__h2e3e7bd63b210081(arg0, arg1, arg2, arg3) {
980
- wasm.wasm_bindgen__convert__closures_____invoke__h2e3e7bd63b210081(arg0, arg1, arg2, arg3);
991
+ function wasm_bindgen__convert__closures_____invoke__h71c2fa3b316ba280(arg0, arg1, arg2, arg3) {
992
+ wasm.wasm_bindgen__convert__closures_____invoke__h71c2fa3b316ba280(arg0, arg1, arg2, arg3);
981
993
  }
982
994
 
983
995
 
@@ -990,13 +1002,13 @@ const __wbindgen_enum_RequestCredentials = ["omit", "same-origin", "include"];
990
1002
  const __wbindgen_enum_RequestMode = ["same-origin", "no-cors", "cors", "navigate"];
991
1003
  const WasmBuilderFinalization = (typeof FinalizationRegistry === 'undefined')
992
1004
  ? { register: () => {}, unregister: () => {} }
993
- : new FinalizationRegistry(ptr => wasm.__wbg_wasmbuilder_free(ptr >>> 0, 1));
1005
+ : new FinalizationRegistry(ptr => wasm.__wbg_wasmbuilder_free(ptr, 1));
994
1006
  const WasmReaderFinalization = (typeof FinalizationRegistry === 'undefined')
995
1007
  ? { register: () => {}, unregister: () => {} }
996
- : new FinalizationRegistry(ptr => wasm.__wbg_wasmreader_free(ptr >>> 0, 1));
1008
+ : new FinalizationRegistry(ptr => wasm.__wbg_wasmreader_free(ptr, 1));
997
1009
  const WasmSignerFinalization = (typeof FinalizationRegistry === 'undefined')
998
1010
  ? { register: () => {}, unregister: () => {} }
999
- : new FinalizationRegistry(ptr => wasm.__wbg_wasmsigner_free(ptr >>> 0, 1));
1011
+ : new FinalizationRegistry(ptr => wasm.__wbg_wasmsigner_free(ptr, 1));
1000
1012
 
1001
1013
  function addToExternrefTable0(obj) {
1002
1014
  const idx = wasm.__externref_table_alloc();
@@ -1006,7 +1018,7 @@ function addToExternrefTable0(obj) {
1006
1018
 
1007
1019
  const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
1008
1020
  ? { register: () => {}, unregister: () => {} }
1009
- : new FinalizationRegistry(state => state.dtor(state.a, state.b));
1021
+ : new FinalizationRegistry(state => wasm.__wbindgen_destroy_closure(state.a, state.b));
1010
1022
 
1011
1023
  function debugString(val) {
1012
1024
  // primitive types
@@ -1087,8 +1099,7 @@ function getDataViewMemory0() {
1087
1099
  }
1088
1100
 
1089
1101
  function getStringFromWasm0(ptr, len) {
1090
- ptr = ptr >>> 0;
1091
- return decodeText(ptr, len);
1102
+ return decodeText(ptr >>> 0, len);
1092
1103
  }
1093
1104
 
1094
1105
  let cachedUint8ArrayMemory0 = null;
@@ -1112,8 +1123,8 @@ function isLikeNone(x) {
1112
1123
  return x === undefined || x === null;
1113
1124
  }
1114
1125
 
1115
- function makeMutClosure(arg0, arg1, dtor, f) {
1116
- const state = { a: arg0, b: arg1, cnt: 1, dtor };
1126
+ function makeMutClosure(arg0, arg1, f) {
1127
+ const state = { a: arg0, b: arg1, cnt: 1 };
1117
1128
  const real = (...args) => {
1118
1129
 
1119
1130
  // First up with a closure we increment the internal reference
@@ -1131,7 +1142,7 @@ function makeMutClosure(arg0, arg1, dtor, f) {
1131
1142
  };
1132
1143
  real._wbg_cb_unref = () => {
1133
1144
  if (--state.cnt === 0) {
1134
- state.dtor(state.a, state.b);
1145
+ wasm.__wbindgen_destroy_closure(state.a, state.b);
1135
1146
  state.a = 0;
1136
1147
  CLOSURE_DTORS.unregister(state);
1137
1148
  }
@@ -1212,8 +1223,9 @@ if (!('encodeInto' in cachedTextEncoder)) {
1212
1223
 
1213
1224
  let WASM_VECTOR_LEN = 0;
1214
1225
 
1215
- let wasmModule, wasm;
1226
+ let wasmModule, wasmInstance, wasm;
1216
1227
  function __wbg_finalize_init(instance, module) {
1228
+ wasmInstance = instance;
1217
1229
  wasm = instance.exports;
1218
1230
  wasmModule = module;
1219
1231
  cachedDataViewMemory0 = null;
@@ -1302,4 +1314,4 @@ async function __wbg_init(module_or_path) {
1302
1314
  }
1303
1315
 
1304
1316
  export { initSync, __wbg_init as default };
1305
- export const WASM_SRI = "sha512-oGQbx/CAdZfAEfbSgEC3a7d1bzvke+2Gh1D4RJxTMdor7cykQuyPbKGeqKz6UYbgFqb3k+bLRnLwbaTtlmqNIA==";
1317
+ export const WASM_SRI = "sha512-85H5W9PEIFDMXW7vSiWM4cqQYBgtKPq8rpdLBgPVu2nvzjLBDqm4AmPFCUgzd9WCRRCzMidMsO5C0E4Uj11dug==";
package/pkg/c2pa_bg.wasm CHANGED
Binary file
@@ -1,23 +1,11 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  export const memory: WebAssembly.Memory;
4
- export const __wbg_wasmreader_free: (a: number, b: number) => void;
5
- export const wasmreader_activeLabel: (a: number) => [number, number];
6
- export const wasmreader_activeManifest: (a: number) => [number, number, number];
7
- export const wasmreader_crJson: (a: number) => [number, number];
8
- export const wasmreader_fromBlob: (a: number, b: number, c: any, d: number, e: number) => any;
9
- export const wasmreader_fromBlobFragment: (a: number, b: number, c: any, d: any, e: number, f: number) => any;
10
- export const wasmreader_json: (a: number) => [number, number];
11
- export const wasmreader_manifestStore: (a: number) => [number, number, number];
12
- export const wasmreader_resourceToBytes: (a: number, b: number, c: number) => [number, number, number];
13
- export const __wbg_wasmsigner_free: (a: number, b: number) => void;
14
- export const wasmsigner_fromDefinition: (a: any) => [number, number, number];
15
- export const run: () => void;
16
- export const loadSettings: (a: number, b: number) => [number, number];
17
4
  export const __wbg_wasmbuilder_free: (a: number, b: number) => void;
18
5
  export const wasmbuilder_addAction: (a: number, b: any) => [number, number];
19
6
  export const wasmbuilder_addIngredient: (a: number, b: number, c: number) => [number, number];
20
7
  export const wasmbuilder_addIngredientFromBlob: (a: number, b: number, c: number, d: number, e: number, f: any) => any;
8
+ export const wasmbuilder_addRedaction: (a: number, b: number, c: number, d: any) => [number, number];
21
9
  export const wasmbuilder_addResourceFromBlob: (a: number, b: number, c: number, d: any) => [number, number];
22
10
  export const wasmbuilder_fromArchive: (a: any, b: number, c: number) => [number, number, number];
23
11
  export const wasmbuilder_fromJson: (a: number, b: number, c: number, d: number) => [number, number, number];
@@ -30,16 +18,28 @@ export const wasmbuilder_setThumbnailFromBlob: (a: number, b: number, c: number,
30
18
  export const wasmbuilder_sign: (a: number, b: any, c: number, d: number, e: any) => any;
31
19
  export const wasmbuilder_signAndGetManifestBytes: (a: number, b: any, c: number, d: number, e: any) => any;
32
20
  export const wasmbuilder_toArchive: (a: number) => [number, number, number];
33
- export const wasm_bindgen__closure__destroy__h30e1f1aacfc8be07: (a: number, b: number) => void;
34
- export const wasm_bindgen__closure__destroy__h1bb863e8c2f31492: (a: number, b: number) => void;
35
- export const wasm_bindgen__convert__closures_____invoke__h97115e9701795d15: (a: number, b: number, c: any) => [number, number];
36
- export const wasm_bindgen__convert__closures_____invoke__h2e3e7bd63b210081: (a: number, b: number, c: any, d: any) => void;
37
- export const wasm_bindgen__convert__closures_____invoke__ha8a072e6843ba599: (a: number, b: number) => void;
21
+ export const __wbg_wasmreader_free: (a: number, b: number) => void;
22
+ export const wasmreader_activeLabel: (a: number) => [number, number];
23
+ export const wasmreader_activeManifest: (a: number) => [number, number, number];
24
+ export const wasmreader_crJson: (a: number) => [number, number];
25
+ export const wasmreader_fromBlob: (a: number, b: number, c: any, d: number, e: number) => any;
26
+ export const wasmreader_fromBlobFragment: (a: number, b: number, c: any, d: any, e: number, f: number) => any;
27
+ export const wasmreader_json: (a: number) => [number, number];
28
+ export const wasmreader_manifestStore: (a: number) => [number, number, number];
29
+ export const wasmreader_resourceToBytes: (a: number, b: number, c: number) => [number, number, number];
30
+ export const run: () => void;
31
+ export const loadSettings: (a: number, b: number) => [number, number];
32
+ export const __wbg_wasmsigner_free: (a: number, b: number) => void;
33
+ export const wasmsigner_fromDefinition: (a: any) => [number, number, number];
34
+ export const wasm_bindgen__convert__closures_____invoke__h4aa26a54fe4da3a7: (a: number, b: number, c: any) => [number, number];
35
+ export const wasm_bindgen__convert__closures_____invoke__h71c2fa3b316ba280: (a: number, b: number, c: any, d: any) => void;
36
+ export const wasm_bindgen__convert__closures_____invoke__hb660c60820732a9e: (a: number, b: number) => void;
38
37
  export const __wbindgen_malloc: (a: number, b: number) => number;
39
38
  export const __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
40
39
  export const __wbindgen_exn_store: (a: number) => void;
41
40
  export const __externref_table_alloc: () => number;
42
41
  export const __wbindgen_externrefs: WebAssembly.Table;
43
42
  export const __wbindgen_free: (a: number, b: number, c: number) => void;
43
+ export const __wbindgen_destroy_closure: (a: number, b: number) => void;
44
44
  export const __externref_table_dealloc: (a: number) => void;
45
45
  export const __wbindgen_start: () => void;