@next/swc-wasm-web 13.4.9 → 13.4.10-canary.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@next/swc-wasm-web",
3
- "version": "13.4.9",
3
+ "version": "13.4.10-canary.1",
4
4
  "files": [
5
5
  "wasm_bg.wasm",
6
6
  "wasm.js",
package/wasm.d.ts CHANGED
@@ -71,11 +71,11 @@ export interface InitOutput {
71
71
  readonly __wbindgen_malloc: (a: number) => number;
72
72
  readonly __wbindgen_realloc: (a: number, b: number, c: number) => number;
73
73
  readonly __wbindgen_export_2: WebAssembly.Table;
74
- readonly _dyn_core_e7bf91d7bc92fdf___ops__function__FnMut_______Output______as_wasm_bindgen_37fcc410b0eb3cf7___closure__WasmClosure___describe__invoke___wasm_bindgen_37fcc410b0eb3cf7___JsValue_____: (a: number, b: number, c: number) => void;
74
+ readonly wasm_bindgen_e82bfa34083ed5a1___convert__closures__invoke1_mut___wasm_bindgen_e82bfa34083ed5a1___JsValue_____: (a: number, b: number, c: number) => void;
75
75
  readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
76
76
  readonly __wbindgen_free: (a: number, b: number) => void;
77
77
  readonly __wbindgen_exn_store: (a: number) => void;
78
- readonly wasm_bindgen_37fcc410b0eb3cf7___convert__closures__invoke2_mut___wasm_bindgen_37fcc410b0eb3cf7___JsValue__wasm_bindgen_37fcc410b0eb3cf7___JsValue_____: (a: number, b: number, c: number, d: number) => void;
78
+ readonly wasm_bindgen_e82bfa34083ed5a1___convert__closures__invoke2_mut___wasm_bindgen_e82bfa34083ed5a1___JsValue__wasm_bindgen_e82bfa34083ed5a1___JsValue_____: (a: number, b: number, c: number, d: number) => void;
79
79
  }
80
80
 
81
81
  export type SyncInitInput = BufferSource | WebAssembly.Module;
package/wasm.js CHANGED
@@ -20,26 +20,21 @@ function takeObject(idx) {
20
20
  return ret;
21
21
  }
22
22
 
23
- function isLikeNone(x) {
24
- return x === undefined || x === null;
25
- }
23
+ const cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
26
24
 
27
- let cachedBigInt64Memory0 = null;
25
+ cachedTextDecoder.decode();
28
26
 
29
- function getBigInt64Memory0() {
30
- if (cachedBigInt64Memory0 === null || cachedBigInt64Memory0.byteLength === 0) {
31
- cachedBigInt64Memory0 = new BigInt64Array(wasm.memory.buffer);
27
+ let cachedUint8Memory0 = null;
28
+
29
+ function getUint8Memory0() {
30
+ if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) {
31
+ cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
32
32
  }
33
- return cachedBigInt64Memory0;
33
+ return cachedUint8Memory0;
34
34
  }
35
35
 
36
- let cachedInt32Memory0 = null;
37
-
38
- function getInt32Memory0() {
39
- if (cachedInt32Memory0 === null || cachedInt32Memory0.byteLength === 0) {
40
- cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);
41
- }
42
- return cachedInt32Memory0;
36
+ function getStringFromWasm0(ptr, len) {
37
+ return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
43
38
  }
44
39
 
45
40
  function addHeapObject(obj) {
@@ -51,26 +46,8 @@ function addHeapObject(obj) {
51
46
  return idx;
52
47
  }
53
48
 
54
- let cachedFloat64Memory0 = null;
55
-
56
- function getFloat64Memory0() {
57
- if (cachedFloat64Memory0 === null || cachedFloat64Memory0.byteLength === 0) {
58
- cachedFloat64Memory0 = new Float64Array(wasm.memory.buffer);
59
- }
60
- return cachedFloat64Memory0;
61
- }
62
-
63
49
  let WASM_VECTOR_LEN = 0;
64
50
 
65
- let cachedUint8Memory0 = null;
66
-
67
- function getUint8Memory0() {
68
- if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) {
69
- cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
70
- }
71
- return cachedUint8Memory0;
72
- }
73
-
74
51
  const cachedTextEncoder = new TextEncoder('utf-8');
75
52
 
76
53
  const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
@@ -124,12 +101,17 @@ function passStringToWasm0(arg, malloc, realloc) {
124
101
  return ptr;
125
102
  }
126
103
 
127
- const cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
104
+ function isLikeNone(x) {
105
+ return x === undefined || x === null;
106
+ }
128
107
 
129
- cachedTextDecoder.decode();
108
+ let cachedInt32Memory0 = null;
130
109
 
131
- function getStringFromWasm0(ptr, len) {
132
- return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
110
+ function getInt32Memory0() {
111
+ if (cachedInt32Memory0 === null || cachedInt32Memory0.byteLength === 0) {
112
+ cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);
113
+ }
114
+ return cachedInt32Memory0;
133
115
  }
134
116
 
135
117
  function debugString(val) {
@@ -197,6 +179,24 @@ function debugString(val) {
197
179
  return className;
198
180
  }
199
181
 
182
+ let cachedFloat64Memory0 = null;
183
+
184
+ function getFloat64Memory0() {
185
+ if (cachedFloat64Memory0 === null || cachedFloat64Memory0.byteLength === 0) {
186
+ cachedFloat64Memory0 = new Float64Array(wasm.memory.buffer);
187
+ }
188
+ return cachedFloat64Memory0;
189
+ }
190
+
191
+ let cachedBigInt64Memory0 = null;
192
+
193
+ function getBigInt64Memory0() {
194
+ if (cachedBigInt64Memory0 === null || cachedBigInt64Memory0.byteLength === 0) {
195
+ cachedBigInt64Memory0 = new BigInt64Array(wasm.memory.buffer);
196
+ }
197
+ return cachedBigInt64Memory0;
198
+ }
199
+
200
200
  function makeMutClosure(arg0, arg1, dtor, f) {
201
201
  const state = { a: arg0, b: arg1, cnt: 1, dtor };
202
202
  const real = (...args) => {
@@ -222,7 +222,7 @@ function makeMutClosure(arg0, arg1, dtor, f) {
222
222
  return real;
223
223
  }
224
224
  function __wbg_adapter_46(arg0, arg1, arg2) {
225
- wasm._dyn_core_e7bf91d7bc92fdf___ops__function__FnMut_______Output______as_wasm_bindgen_37fcc410b0eb3cf7___closure__WasmClosure___describe__invoke___wasm_bindgen_37fcc410b0eb3cf7___JsValue_____(arg0, arg1, addHeapObject(arg2));
225
+ wasm.wasm_bindgen_e82bfa34083ed5a1___convert__closures__invoke1_mut___wasm_bindgen_e82bfa34083ed5a1___JsValue_____(arg0, arg1, addHeapObject(arg2));
226
226
  }
227
227
 
228
228
  /**
@@ -264,7 +264,7 @@ function handleError(f, args) {
264
264
  }
265
265
  }
266
266
  function __wbg_adapter_110(arg0, arg1, arg2, arg3) {
267
- wasm.wasm_bindgen_37fcc410b0eb3cf7___convert__closures__invoke2_mut___wasm_bindgen_37fcc410b0eb3cf7___JsValue__wasm_bindgen_37fcc410b0eb3cf7___JsValue_____(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
267
+ wasm.wasm_bindgen_e82bfa34083ed5a1___convert__closures__invoke2_mut___wasm_bindgen_e82bfa34083ed5a1___JsValue__wasm_bindgen_e82bfa34083ed5a1___JsValue_____(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
268
268
  }
269
269
 
270
270
  /**
@@ -448,72 +448,27 @@ function getImports() {
448
448
  const ret = getObject(arg0) == getObject(arg1);
449
449
  return ret;
450
450
  };
451
- imports.wbg.__wbindgen_boolean_get = function(arg0) {
452
- const v = getObject(arg0);
453
- const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
454
- return ret;
455
- };
456
- imports.wbg.__wbindgen_is_bigint = function(arg0) {
457
- const ret = typeof(getObject(arg0)) === 'bigint';
458
- return ret;
459
- };
460
- imports.wbg.__wbindgen_bigint_get_as_i64 = function(arg0, arg1) {
461
- const v = getObject(arg1);
462
- const ret = typeof(v) === 'bigint' ? v : undefined;
463
- getBigInt64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? BigInt(0) : ret;
464
- getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
465
- };
466
- imports.wbg.__wbindgen_bigint_from_i64 = function(arg0) {
467
- const ret = arg0;
468
- return addHeapObject(ret);
469
- };
470
- imports.wbg.__wbindgen_jsval_eq = function(arg0, arg1) {
471
- const ret = getObject(arg0) === getObject(arg1);
472
- return ret;
473
- };
474
- imports.wbg.__wbindgen_number_get = function(arg0, arg1) {
475
- const obj = getObject(arg1);
476
- const ret = typeof(obj) === 'number' ? obj : undefined;
477
- getFloat64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? 0 : ret;
478
- getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
479
- };
480
- imports.wbg.__wbg_isSafeInteger_8c4789029e885159 = function(arg0) {
481
- const ret = Number.isSafeInteger(getObject(arg0));
482
- return ret;
483
- };
484
- imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
485
- const obj = getObject(arg1);
486
- const ret = typeof(obj) === 'string' ? obj : undefined;
487
- var ptr0 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
488
- var len0 = WASM_VECTOR_LEN;
489
- getInt32Memory0()[arg0 / 4 + 1] = len0;
490
- getInt32Memory0()[arg0 / 4 + 0] = ptr0;
491
- };
492
- imports.wbg.__wbg_isArray_39d28997bf6b96b4 = function(arg0) {
493
- const ret = Array.isArray(getObject(arg0));
494
- return ret;
495
- };
496
451
  imports.wbg.__wbindgen_is_object = function(arg0) {
497
452
  const val = getObject(arg0);
498
453
  const ret = typeof(val) === 'object' && val !== null;
499
454
  return ret;
500
455
  };
501
- imports.wbg.__wbg_length_e498fbc24f9c1d4f = function(arg0) {
502
- const ret = getObject(arg0).length;
456
+ imports.wbg.__wbindgen_boolean_get = function(arg0) {
457
+ const v = getObject(arg0);
458
+ const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
503
459
  return ret;
504
460
  };
505
- imports.wbg.__wbg_iterator_55f114446221aa5a = function() {
506
- const ret = Symbol.iterator;
461
+ imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
462
+ const ret = getStringFromWasm0(arg0, arg1);
507
463
  return addHeapObject(ret);
508
464
  };
509
- imports.wbg.__wbindgen_in = function(arg0, arg1) {
510
- const ret = getObject(arg0) in getObject(arg1);
511
- return ret;
512
- };
513
- imports.wbg.__wbindgen_bigint_from_u64 = function(arg0) {
514
- const ret = BigInt.asUintN(64, arg0);
465
+ imports.wbg.__wbg_new_b525de17f44a8943 = function() {
466
+ const ret = new Array();
515
467
  return addHeapObject(ret);
516
468
  };
469
+ imports.wbg.__wbg_set_17224bc548dd1d7b = function(arg0, arg1, arg2) {
470
+ getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
471
+ };
517
472
  imports.wbg.__wbg_new0_25059e40b1c02766 = function() {
518
473
  const ret = new Date();
519
474
  return addHeapObject(ret);
@@ -522,14 +477,18 @@ function getImports() {
522
477
  const ret = getObject(arg0).getTimezoneOffset();
523
478
  return ret;
524
479
  };
525
- imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
526
- const ret = getStringFromWasm0(arg0, arg1);
527
- return addHeapObject(ret);
528
- };
529
480
  imports.wbg.__wbg_get_baf4855f9a986186 = function() { return handleError(function (arg0, arg1) {
530
481
  const ret = Reflect.get(getObject(arg0), getObject(arg1));
531
482
  return addHeapObject(ret);
532
483
  }, arguments) };
484
+ imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
485
+ const obj = getObject(arg1);
486
+ const ret = typeof(obj) === 'string' ? obj : undefined;
487
+ var ptr0 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
488
+ var len0 = WASM_VECTOR_LEN;
489
+ getInt32Memory0()[arg0 / 4 + 1] = len0;
490
+ getInt32Memory0()[arg0 / 4 + 0] = ptr0;
491
+ };
533
492
  imports.wbg.__wbg_getwithrefkey_15c62c2b8546208d = function(arg0, arg1) {
534
493
  const ret = getObject(arg0)[getObject(arg1)];
535
494
  return addHeapObject(ret);
@@ -538,12 +497,9 @@ function getImports() {
538
497
  const ret = getObject(arg0) === undefined;
539
498
  return ret;
540
499
  };
541
- imports.wbg.__wbg_new_b525de17f44a8943 = function() {
542
- const ret = new Array();
543
- return addHeapObject(ret);
544
- };
545
- imports.wbg.__wbg_set_17224bc548dd1d7b = function(arg0, arg1, arg2) {
546
- getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
500
+ imports.wbg.__wbindgen_in = function(arg0, arg1) {
501
+ const ret = getObject(arg0) in getObject(arg1);
502
+ return ret;
547
503
  };
548
504
  imports.wbg.__wbg_getTime_7c59072d1651a3cf = function(arg0) {
549
505
  const ret = getObject(arg0).getTime();
@@ -580,13 +536,6 @@ imports.wbg.__wbg_buffer_cf65c07de34b9a08 = function(arg0) {
580
536
  const ret = getObject(arg0).buffer;
581
537
  return addHeapObject(ret);
582
538
  };
583
- imports.wbg.__wbg_new_537b7341ce90bb31 = function(arg0) {
584
- const ret = new Uint8Array(getObject(arg0));
585
- return addHeapObject(ret);
586
- };
587
- imports.wbg.__wbg_set_17499e8aa4003ebd = function(arg0, arg1, arg2) {
588
- getObject(arg0).set(getObject(arg1), arg2 >>> 0);
589
- };
590
539
  imports.wbg.__wbg_newwithbyteoffsetandlength_9fb2f11355ecadf5 = function(arg0, arg1, arg2) {
591
540
  const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
592
541
  return addHeapObject(ret);
@@ -594,6 +543,13 @@ imports.wbg.__wbg_newwithbyteoffsetandlength_9fb2f11355ecadf5 = function(arg0, a
594
543
  imports.wbg.__wbg_randomFillSync_e950366c42764a07 = function() { return handleError(function (arg0, arg1) {
595
544
  getObject(arg0).randomFillSync(takeObject(arg1));
596
545
  }, arguments) };
546
+ imports.wbg.__wbg_new_537b7341ce90bb31 = function(arg0) {
547
+ const ret = new Uint8Array(getObject(arg0));
548
+ return addHeapObject(ret);
549
+ };
550
+ imports.wbg.__wbg_set_17499e8aa4003ebd = function(arg0, arg1, arg2) {
551
+ getObject(arg0).set(getObject(arg1), arg2 >>> 0);
552
+ };
597
553
  imports.wbg.__wbg_crypto_70a96de3b6b73dac = function(arg0) {
598
554
  const ret = getObject(arg0).crypto;
599
555
  return addHeapObject(ret);
@@ -634,6 +590,10 @@ imports.wbg.__wbg_call_9495de66fdbe016b = function() { return handleError(functi
634
590
  const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
635
591
  return addHeapObject(ret);
636
592
  }, arguments) };
593
+ imports.wbg.__wbg_iterator_55f114446221aa5a = function() {
594
+ const ret = Symbol.iterator;
595
+ return addHeapObject(ret);
596
+ };
637
597
  imports.wbg.__wbg_call_95d1ea488d03e4e8 = function() { return handleError(function (arg0, arg1) {
638
598
  const ret = getObject(arg0).call(getObject(arg1));
639
599
  return addHeapObject(ret);
@@ -678,10 +638,20 @@ imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
678
638
  getInt32Memory0()[arg0 / 4 + 1] = len0;
679
639
  getInt32Memory0()[arg0 / 4 + 0] = ptr0;
680
640
  };
641
+ imports.wbg.__wbindgen_error_new = function(arg0, arg1) {
642
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
643
+ return addHeapObject(ret);
644
+ };
681
645
  imports.wbg.__wbg_entries_4e1315b774245952 = function(arg0) {
682
646
  const ret = Object.entries(getObject(arg0));
683
647
  return addHeapObject(ret);
684
648
  };
649
+ imports.wbg.__wbindgen_number_get = function(arg0, arg1) {
650
+ const obj = getObject(arg1);
651
+ const ret = typeof(obj) === 'number' ? obj : undefined;
652
+ getFloat64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? 0 : ret;
653
+ getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
654
+ };
685
655
  imports.wbg.__wbg_instanceof_Uint8Array_01cebe79ca606cca = function(arg0) {
686
656
  let result;
687
657
  try {
@@ -702,10 +672,40 @@ imports.wbg.__wbg_instanceof_ArrayBuffer_a69f02ee4c4f5065 = function(arg0) {
702
672
  const ret = result;
703
673
  return ret;
704
674
  };
705
- imports.wbg.__wbindgen_error_new = function(arg0, arg1) {
706
- const ret = new Error(getStringFromWasm0(arg0, arg1));
675
+ imports.wbg.__wbg_length_e498fbc24f9c1d4f = function(arg0) {
676
+ const ret = getObject(arg0).length;
677
+ return ret;
678
+ };
679
+ imports.wbg.__wbg_isArray_39d28997bf6b96b4 = function(arg0) {
680
+ const ret = Array.isArray(getObject(arg0));
681
+ return ret;
682
+ };
683
+ imports.wbg.__wbindgen_is_bigint = function(arg0) {
684
+ const ret = typeof(getObject(arg0)) === 'bigint';
685
+ return ret;
686
+ };
687
+ imports.wbg.__wbindgen_bigint_get_as_i64 = function(arg0, arg1) {
688
+ const v = getObject(arg1);
689
+ const ret = typeof(v) === 'bigint' ? v : undefined;
690
+ getBigInt64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? BigInt(0) : ret;
691
+ getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
692
+ };
693
+ imports.wbg.__wbindgen_bigint_from_i64 = function(arg0) {
694
+ const ret = arg0;
695
+ return addHeapObject(ret);
696
+ };
697
+ imports.wbg.__wbindgen_jsval_eq = function(arg0, arg1) {
698
+ const ret = getObject(arg0) === getObject(arg1);
699
+ return ret;
700
+ };
701
+ imports.wbg.__wbindgen_bigint_from_u64 = function(arg0) {
702
+ const ret = BigInt.asUintN(64, arg0);
707
703
  return addHeapObject(ret);
708
704
  };
705
+ imports.wbg.__wbg_isSafeInteger_8c4789029e885159 = function(arg0) {
706
+ const ret = Number.isSafeInteger(getObject(arg0));
707
+ return ret;
708
+ };
709
709
  imports.wbg.__wbg_new_f9876326328f45ed = function() {
710
710
  const ret = new Object();
711
711
  return addHeapObject(ret);
@@ -734,10 +734,6 @@ imports.wbg.__wbg_new_9d3a9ce4282a18a8 = function(arg0, arg1) {
734
734
  imports.wbg.__wbindgen_throw = function(arg0, arg1) {
735
735
  throw new Error(getStringFromWasm0(arg0, arg1));
736
736
  };
737
- imports.wbg.__wbg_then_ec5db6d509eb475f = function(arg0, arg1) {
738
- const ret = getObject(arg0).then(getObject(arg1));
739
- return addHeapObject(ret);
740
- };
741
737
  imports.wbg.__wbg_resolve_fd40f858d9db1a04 = function(arg0) {
742
738
  const ret = Promise.resolve(getObject(arg0));
743
739
  return addHeapObject(ret);
@@ -751,8 +747,12 @@ imports.wbg.__wbindgen_cb_drop = function(arg0) {
751
747
  const ret = false;
752
748
  return ret;
753
749
  };
754
- imports.wbg.__wbindgen_closure_wrapper18196 = function(arg0, arg1, arg2) {
755
- const ret = makeMutClosure(arg0, arg1, 275, __wbg_adapter_46);
750
+ imports.wbg.__wbg_then_ec5db6d509eb475f = function(arg0, arg1) {
751
+ const ret = getObject(arg0).then(getObject(arg1));
752
+ return addHeapObject(ret);
753
+ };
754
+ imports.wbg.__wbindgen_closure_wrapper18412 = function(arg0, arg1, arg2) {
755
+ const ret = makeMutClosure(arg0, arg1, 253, __wbg_adapter_46);
756
756
  return addHeapObject(ret);
757
757
  };
758
758
 
package/wasm_bg.wasm CHANGED
Binary file