@utoo/web 0.0.1-alpha.3 → 0.0.1-alpha.9

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/esm/utoo/index.js CHANGED
@@ -2,68 +2,23 @@ let wasm;
2
2
  const heap = new Array(128).fill(undefined);
3
3
  heap.push(undefined, null, true, false);
4
4
  function getObject(idx) { return heap[idx]; }
5
- const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available'); } });
6
- if (typeof TextDecoder !== 'undefined') {
7
- cachedTextDecoder.decode();
8
- }
9
- ;
5
+ let WASM_VECTOR_LEN = 0;
10
6
  let cachedUint8ArrayMemory0 = null;
11
7
  function getUint8ArrayMemory0() {
12
- if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
8
+ if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.buffer !== wasm.memory.buffer) {
13
9
  cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
14
10
  }
15
11
  return cachedUint8ArrayMemory0;
16
12
  }
17
- function getStringFromWasm0(ptr, len) {
18
- ptr = ptr >>> 0;
19
- return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
20
- }
21
- let heap_next = heap.length;
22
- function addHeapObject(obj) {
23
- if (heap_next === heap.length)
24
- heap.push(heap.length + 1);
25
- const idx = heap_next;
26
- heap_next = heap[idx];
27
- heap[idx] = obj;
28
- return idx;
29
- }
30
- function handleError(f, args) {
31
- try {
32
- return f.apply(this, args);
33
- }
34
- catch (e) {
35
- wasm.__wbindgen_export_0(addHeapObject(e));
36
- }
37
- }
38
- function dropObject(idx) {
39
- if (idx < 132)
40
- return;
41
- heap[idx] = heap_next;
42
- heap_next = idx;
43
- }
44
- function takeObject(idx) {
45
- const ret = getObject(idx);
46
- dropObject(idx);
47
- return ret;
48
- }
49
- function getArrayU8FromWasm0(ptr, len) {
50
- ptr = ptr >>> 0;
51
- return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
52
- }
53
- let WASM_VECTOR_LEN = 0;
54
13
  const cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available'); } });
55
- const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
56
- ? function (arg, view) {
57
- return cachedTextEncoder.encodeInto(arg, view);
58
- }
59
- : function (arg, view) {
60
- const buf = cachedTextEncoder.encode(arg);
61
- view.set(buf);
62
- return {
63
- read: arg.length,
64
- written: buf.length
65
- };
66
- });
14
+ const encodeString = function (arg, view) {
15
+ const buf = cachedTextEncoder.encode(arg);
16
+ view.set(buf);
17
+ return {
18
+ read: arg.length,
19
+ written: buf.length
20
+ };
21
+ };
67
22
  function passStringToWasm0(arg, malloc, realloc) {
68
23
  if (realloc === undefined) {
69
24
  const buf = cachedTextEncoder.encode(arg);
@@ -97,18 +52,59 @@ function passStringToWasm0(arg, malloc, realloc) {
97
52
  }
98
53
  let cachedDataViewMemory0 = null;
99
54
  function getDataViewMemory0() {
100
- if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
55
+ if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer !== wasm.memory.buffer) {
101
56
  cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
102
57
  }
103
58
  return cachedDataViewMemory0;
104
59
  }
60
+ const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available'); } });
61
+ if (typeof TextDecoder !== 'undefined') {
62
+ cachedTextDecoder.decode();
63
+ }
64
+ ;
65
+ function getStringFromWasm0(ptr, len) {
66
+ ptr = ptr >>> 0;
67
+ return cachedTextDecoder.decode(getUint8ArrayMemory0().slice(ptr, ptr + len));
68
+ }
69
+ let heap_next = heap.length;
70
+ function addHeapObject(obj) {
71
+ if (heap_next === heap.length)
72
+ heap.push(heap.length + 1);
73
+ const idx = heap_next;
74
+ heap_next = heap[idx];
75
+ heap[idx] = obj;
76
+ return idx;
77
+ }
78
+ function handleError(f, args) {
79
+ try {
80
+ return f.apply(this, args);
81
+ }
82
+ catch (e) {
83
+ wasm.__wbindgen_export_3(addHeapObject(e));
84
+ }
85
+ }
86
+ function dropObject(idx) {
87
+ if (idx < 132)
88
+ return;
89
+ heap[idx] = heap_next;
90
+ heap_next = idx;
91
+ }
92
+ function takeObject(idx) {
93
+ const ret = getObject(idx);
94
+ dropObject(idx);
95
+ return ret;
96
+ }
97
+ function getArrayU8FromWasm0(ptr, len) {
98
+ ptr = ptr >>> 0;
99
+ return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
100
+ }
105
101
  function isLikeNone(x) {
106
102
  return x === undefined || x === null;
107
103
  }
108
104
  const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
109
105
  ? { register: () => { }, unregister: () => { } }
110
106
  : new FinalizationRegistry(state => {
111
- wasm.__wbindgen_export_3.get(state.dtor)(state.a, state.b);
107
+ wasm.__wbindgen_export_5.get(state.dtor)(state.a, state.b);
112
108
  });
113
109
  function makeMutClosure(arg0, arg1, dtor, f) {
114
110
  const state = { a: arg0, b: arg1, cnt: 1, dtor };
@@ -124,7 +120,7 @@ function makeMutClosure(arg0, arg1, dtor, f) {
124
120
  }
125
121
  finally {
126
122
  if (--state.cnt === 0) {
127
- wasm.__wbindgen_export_3.get(state.dtor)(a, state.b);
123
+ wasm.__wbindgen_export_5.get(state.dtor)(a, state.b);
128
124
  CLOSURE_DTORS.unregister(state);
129
125
  }
130
126
  else {
@@ -204,37 +200,57 @@ function debugString(val) {
204
200
  // TODO we could test for more things here, like `Set`s and `Map`s.
205
201
  return className;
206
202
  }
207
- function _assertClass(instance, klass) {
208
- if (!(instance instanceof klass)) {
209
- throw new Error(`expected instance of ${klass.name}`);
210
- }
203
+ function passArray8ToWasm0(arg, malloc) {
204
+ const ptr = malloc(arg.length * 1, 1) >>> 0;
205
+ getUint8ArrayMemory0().set(arg, ptr / 1);
206
+ WASM_VECTOR_LEN = arg.length;
207
+ return ptr;
208
+ }
209
+ export function init_pack() {
210
+ wasm.init_pack();
211
211
  }
212
212
  /**
213
- * @param {PartialProjectOptions} partial_options
214
- * @returns {Promise<void>}
213
+ * Entry point for web workers
214
+ * @param {number} ptr
215
215
  */
216
- export function build(partial_options) {
217
- _assertClass(partial_options, PartialProjectOptions);
218
- var ptr0 = partial_options.__destroy_into_raw();
219
- const ret = wasm.build(ptr0);
220
- return takeObject(ret);
216
+ export function wasm_thread_entry_point(ptr) {
217
+ wasm.wasm_thread_entry_point(ptr);
221
218
  }
222
- export function init_pack() {
223
- wasm.init_pack();
219
+ function __wbg_adapter_46(arg0, arg1) {
220
+ wasm.__wbindgen_export_6(arg0, arg1);
224
221
  }
225
- function __wbg_adapter_28(arg0, arg1) {
226
- wasm.__wbindgen_export_5(arg0, arg1);
222
+ function __wbg_adapter_49(arg0, arg1, arg2) {
223
+ wasm.__wbindgen_export_7(arg0, arg1, addHeapObject(arg2));
227
224
  }
228
- function __wbg_adapter_31(arg0, arg1, arg2) {
229
- wasm.__wbindgen_export_6(arg0, arg1, addHeapObject(arg2));
225
+ function __wbg_adapter_52(arg0, arg1, arg2) {
226
+ wasm.__wbindgen_export_8(arg0, arg1, addHeapObject(arg2));
230
227
  }
231
- function __wbg_adapter_68(arg0, arg1, arg2, arg3) {
232
- wasm.__wbindgen_export_7(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
228
+ let stack_pointer = 128;
229
+ function addBorrowedObject(obj) {
230
+ if (stack_pointer == 1)
231
+ throw new Error('out of js stack');
232
+ heap[--stack_pointer] = obj;
233
+ return stack_pointer;
234
+ }
235
+ function __wbg_adapter_57(arg0, arg1, arg2) {
236
+ try {
237
+ wasm.__wbindgen_export_9(arg0, arg1, addBorrowedObject(arg2));
238
+ }
239
+ finally {
240
+ heap[stack_pointer++] = undefined;
241
+ }
242
+ }
243
+ function __wbg_adapter_60(arg0, arg1) {
244
+ wasm.__wbindgen_export_10(arg0, arg1);
245
+ }
246
+ function __wbg_adapter_109(arg0, arg1, arg2, arg3) {
247
+ wasm.__wbindgen_export_11(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
233
248
  }
234
249
  const __wbindgen_enum_DirEntryType = ["file", "directory"];
235
250
  const __wbindgen_enum_FileSystemHandleKind = ["file", "directory"];
236
251
  const __wbindgen_enum_RequestCredentials = ["omit", "same-origin", "include"];
237
252
  const __wbindgen_enum_RequestMode = ["same-origin", "no-cors", "cors", "navigate"];
253
+ const __wbindgen_enum_WorkerType = ["classic", "module"];
238
254
  const CreateSyncAccessHandleOptionsFinalization = (typeof FinalizationRegistry === 'undefined')
239
255
  ? { register: () => { }, unregister: () => { } }
240
256
  : new FinalizationRegistry(ptr => wasm.__wbg_createsyncaccesshandleoptions_free(ptr >>> 0, 1));
@@ -260,9 +276,6 @@ export class CreateSyncAccessHandleOptions {
260
276
  const DirEntryFinalization = (typeof FinalizationRegistry === 'undefined')
261
277
  ? { register: () => { }, unregister: () => { } }
262
278
  : new FinalizationRegistry(ptr => wasm.__wbg_direntry_free(ptr >>> 0, 1));
263
- /**
264
- * Directory entry with name and type information
265
- */
266
279
  export class DirEntry {
267
280
  static __wrap(ptr) {
268
281
  ptr = ptr >>> 0;
@@ -332,77 +345,6 @@ export class DirEntry {
332
345
  wasm.__wbg_set_direntry_type(this.__wbg_ptr, (__wbindgen_enum_DirEntryType.indexOf(arg0) + 1 || 3) - 1);
333
346
  }
334
347
  }
335
- const PartialProjectOptionsFinalization = (typeof FinalizationRegistry === 'undefined')
336
- ? { register: () => { }, unregister: () => { } }
337
- : new FinalizationRegistry(ptr => wasm.__wbg_partialprojectoptions_free(ptr >>> 0, 1));
338
- export class PartialProjectOptions {
339
- __destroy_into_raw() {
340
- const ptr = this.__wbg_ptr;
341
- this.__wbg_ptr = 0;
342
- PartialProjectOptionsFinalization.unregister(this);
343
- return ptr;
344
- }
345
- free() {
346
- const ptr = this.__destroy_into_raw();
347
- wasm.__wbg_partialprojectoptions_free(ptr, 0);
348
- }
349
- /**
350
- * @returns {string}
351
- */
352
- get project_path() {
353
- let deferred1_0;
354
- let deferred1_1;
355
- try {
356
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
357
- wasm.__wbg_get_partialprojectoptions_project_path(retptr, this.__wbg_ptr);
358
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
359
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
360
- deferred1_0 = r0;
361
- deferred1_1 = r1;
362
- return getStringFromWasm0(r0, r1);
363
- }
364
- finally {
365
- wasm.__wbindgen_add_to_stack_pointer(16);
366
- wasm.__wbindgen_export_4(deferred1_0, deferred1_1, 1);
367
- }
368
- }
369
- /**
370
- * @param {string} arg0
371
- */
372
- set project_path(arg0) {
373
- const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
374
- const len0 = WASM_VECTOR_LEN;
375
- wasm.__wbg_set_partialprojectoptions_project_path(this.__wbg_ptr, ptr0, len0);
376
- }
377
- /**
378
- * @returns {string | undefined}
379
- */
380
- get config() {
381
- try {
382
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
383
- wasm.__wbg_get_partialprojectoptions_config(retptr, this.__wbg_ptr);
384
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
385
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
386
- let v1;
387
- if (r0 !== 0) {
388
- v1 = getStringFromWasm0(r0, r1).slice();
389
- wasm.__wbindgen_export_4(r0, r1 * 1, 1);
390
- }
391
- return v1;
392
- }
393
- finally {
394
- wasm.__wbindgen_add_to_stack_pointer(16);
395
- }
396
- }
397
- /**
398
- * @param {string | null} [arg0]
399
- */
400
- set config(arg0) {
401
- var ptr0 = isLikeNone(arg0) ? 0 : passStringToWasm0(arg0, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
402
- var len0 = WASM_VECTOR_LEN;
403
- wasm.__wbg_set_partialprojectoptions_config(this.__wbg_ptr, ptr0, len0);
404
- }
405
- }
406
348
  const ProjectFinalization = (typeof FinalizationRegistry === 'undefined')
407
349
  ? { register: () => { }, unregister: () => { } }
408
350
  : new FinalizationRegistry(ptr => wasm.__wbg_project_free(ptr >>> 0, 1));
@@ -459,20 +401,43 @@ export class Project {
459
401
  return takeObject(ret);
460
402
  }
461
403
  /**
462
- * @returns {Promise<void>}
404
+ * @returns {Promise<any>}
463
405
  */
464
406
  build() {
465
407
  const ret = wasm.project_build(this.__wbg_ptr);
466
408
  return takeObject(ret);
467
409
  }
410
+ /**
411
+ * @param {string} path
412
+ * @returns {Promise<Uint8Array>}
413
+ */
414
+ read(path) {
415
+ const ptr0 = passStringToWasm0(path, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
416
+ const len0 = WASM_VECTOR_LEN;
417
+ const ret = wasm.project_read(this.__wbg_ptr, ptr0, len0);
418
+ return takeObject(ret);
419
+ }
468
420
  /**
469
421
  * @param {string} path
470
422
  * @returns {Promise<string>}
471
423
  */
472
- readFile(path) {
424
+ readToString(path) {
425
+ const ptr0 = passStringToWasm0(path, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
426
+ const len0 = WASM_VECTOR_LEN;
427
+ const ret = wasm.project_readToString(this.__wbg_ptr, ptr0, len0);
428
+ return takeObject(ret);
429
+ }
430
+ /**
431
+ * @param {string} path
432
+ * @param {Uint8Array} content
433
+ * @returns {Promise<void>}
434
+ */
435
+ write(path, content) {
473
436
  const ptr0 = passStringToWasm0(path, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
474
437
  const len0 = WASM_VECTOR_LEN;
475
- const ret = wasm.project_readFile(this.__wbg_ptr, ptr0, len0);
438
+ const ptr1 = passArray8ToWasm0(content, wasm.__wbindgen_export_1);
439
+ const len1 = WASM_VECTOR_LEN;
440
+ const ret = wasm.project_write(this.__wbg_ptr, ptr0, len0, ptr1, len1);
476
441
  return takeObject(ret);
477
442
  }
478
443
  /**
@@ -480,12 +445,12 @@ export class Project {
480
445
  * @param {string} content
481
446
  * @returns {Promise<void>}
482
447
  */
483
- writeFile(path, content) {
448
+ writeString(path, content) {
484
449
  const ptr0 = passStringToWasm0(path, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
485
450
  const len0 = WASM_VECTOR_LEN;
486
451
  const ptr1 = passStringToWasm0(content, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
487
452
  const len1 = WASM_VECTOR_LEN;
488
- const ret = wasm.project_writeFile(this.__wbg_ptr, ptr0, len0, ptr1, len1);
453
+ const ret = wasm.project_writeString(this.__wbg_ptr, ptr0, len0, ptr1, len1);
489
454
  return takeObject(ret);
490
455
  }
491
456
  /**
@@ -563,6 +528,13 @@ async function __wbg_load(module, imports) {
563
528
  function __wbg_get_imports() {
564
529
  const imports = {};
565
530
  imports.wbg = {};
531
+ imports.wbg.__wbg_String_8f0eb39a4a4c2f66 = function (arg0, arg1) {
532
+ const ret = String(getObject(arg1));
533
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
534
+ const len1 = WASM_VECTOR_LEN;
535
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
536
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
537
+ };
566
538
  imports.wbg.__wbg_abort_410ec47a64ac6117 = function (arg0, arg1) {
567
539
  getObject(arg0).abort(getObject(arg1));
568
540
  };
@@ -580,6 +552,10 @@ function __wbg_get_imports() {
580
552
  return addHeapObject(ret);
581
553
  }, arguments);
582
554
  };
555
+ imports.wbg.__wbg_async_9ff6d9e405f13772 = function (arg0) {
556
+ const ret = getObject(arg0).async;
557
+ return ret;
558
+ };
583
559
  imports.wbg.__wbg_buffer_609cc3eee51ed158 = function (arg0) {
584
560
  const ret = getObject(arg0).buffer;
585
561
  return addHeapObject(ret);
@@ -603,10 +579,29 @@ function __wbg_get_imports() {
603
579
  imports.wbg.__wbg_close_a17af48266bd9942 = function (arg0) {
604
580
  getObject(arg0).close();
605
581
  };
582
+ imports.wbg.__wbg_createObjectURL_6e98d2f9c7bd9764 = function () {
583
+ return handleError(function (arg0, arg1) {
584
+ const ret = URL.createObjectURL(getObject(arg1));
585
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
586
+ const len1 = WASM_VECTOR_LEN;
587
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
588
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
589
+ }, arguments);
590
+ };
606
591
  imports.wbg.__wbg_createsyncaccesshandleoptions_new = function (arg0) {
607
592
  const ret = CreateSyncAccessHandleOptions.__wrap(arg0);
608
593
  return addHeapObject(ret);
609
594
  };
595
+ imports.wbg.__wbg_data_432d9c3df2630942 = function (arg0) {
596
+ const ret = getObject(arg0).data;
597
+ return addHeapObject(ret);
598
+ };
599
+ imports.wbg.__wbg_debug_3cb59063b29f58c1 = function (arg0) {
600
+ console.debug(getObject(arg0));
601
+ };
602
+ imports.wbg.__wbg_debug_e17b51583ca6a632 = function (arg0, arg1, arg2, arg3) {
603
+ console.debug(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
604
+ };
610
605
  imports.wbg.__wbg_direntry_new = function (arg0) {
611
606
  const ret = DirEntry.__wrap(arg0);
612
607
  return addHeapObject(ret);
@@ -619,6 +614,30 @@ function __wbg_get_imports() {
619
614
  const ret = getObject(arg0).entries();
620
615
  return addHeapObject(ret);
621
616
  };
617
+ imports.wbg.__wbg_error_524f506f44df1645 = function (arg0) {
618
+ console.error(getObject(arg0));
619
+ };
620
+ imports.wbg.__wbg_error_7534b8e9a36f1ab4 = function (arg0, arg1) {
621
+ let deferred0_0;
622
+ let deferred0_1;
623
+ try {
624
+ deferred0_0 = arg0;
625
+ deferred0_1 = arg1;
626
+ console.error(getStringFromWasm0(arg0, arg1));
627
+ }
628
+ finally {
629
+ wasm.__wbindgen_export_4(deferred0_0, deferred0_1, 1);
630
+ }
631
+ };
632
+ imports.wbg.__wbg_error_80de38b3f7cc3c3c = function (arg0, arg1, arg2, arg3) {
633
+ console.error(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
634
+ };
635
+ imports.wbg.__wbg_eval_e10dc02e9547f640 = function () {
636
+ return handleError(function (arg0, arg1) {
637
+ const ret = eval(getStringFromWasm0(arg0, arg1));
638
+ return addHeapObject(ret);
639
+ }, arguments);
640
+ };
622
641
  imports.wbg.__wbg_fetch_11bff8299d0ecd2b = function (arg0) {
623
642
  const ret = fetch(getObject(arg0));
624
643
  return addHeapObject(ret);
@@ -643,9 +662,9 @@ function __wbg_get_imports() {
643
662
  const ret = getObject(arg0).getFileHandle(getStringFromWasm0(arg1, arg2), getObject(arg3));
644
663
  return addHeapObject(ret);
645
664
  };
646
- imports.wbg.__wbg_getRandomValues_21a0191e74d0e1d3 = function () {
647
- return handleError(function (arg0, arg1) {
648
- globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
665
+ imports.wbg.__wbg_getRandomValues_3a70830e53f8ccf5 = function () {
666
+ return handleError(function (arg0) {
667
+ globalThis.crypto.getRandomValues(getObject(arg0));
649
668
  }, arguments);
650
669
  };
651
670
  imports.wbg.__wbg_getSize_e7dbd5ffa0b43df1 = function () {
@@ -674,6 +693,23 @@ function __wbg_get_imports() {
674
693
  const ret = getObject(arg0).headers;
675
694
  return addHeapObject(ret);
676
695
  };
696
+ imports.wbg.__wbg_info_033d8b8a0838f1d3 = function (arg0, arg1, arg2, arg3) {
697
+ console.info(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
698
+ };
699
+ imports.wbg.__wbg_info_3daf2e093e091b66 = function (arg0) {
700
+ console.info(getObject(arg0));
701
+ };
702
+ imports.wbg.__wbg_instanceof_DedicatedWorkerGlobalScope_a688e81380e34e02 = function (arg0) {
703
+ let result;
704
+ try {
705
+ result = getObject(arg0) instanceof DedicatedWorkerGlobalScope;
706
+ }
707
+ catch (_) {
708
+ result = false;
709
+ }
710
+ const ret = result;
711
+ return ret;
712
+ };
677
713
  imports.wbg.__wbg_instanceof_DomException_ed1ccb7aaf39034c = function (arg0) {
678
714
  let result;
679
715
  try {
@@ -707,6 +743,17 @@ function __wbg_get_imports() {
707
743
  const ret = result;
708
744
  return ret;
709
745
  };
746
+ imports.wbg.__wbg_instanceof_WorkerGlobalScope_dbdbdea7e3b56493 = function (arg0) {
747
+ let result;
748
+ try {
749
+ result = getObject(arg0) instanceof WorkerGlobalScope;
750
+ }
751
+ catch (_) {
752
+ result = false;
753
+ }
754
+ const ret = result;
755
+ return ret;
756
+ };
710
757
  imports.wbg.__wbg_iterator_9a24c88df860dc65 = function () {
711
758
  const ret = Symbol.iterator;
712
759
  return addHeapObject(ret);
@@ -719,6 +766,13 @@ function __wbg_get_imports() {
719
766
  const ret = getObject(arg0).length;
720
767
  return ret;
721
768
  };
769
+ imports.wbg.__wbg_message_d1685a448ba00178 = function (arg0, arg1) {
770
+ const ret = getObject(arg1).message;
771
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
772
+ const len1 = WASM_VECTOR_LEN;
773
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
774
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
775
+ };
722
776
  imports.wbg.__wbg_name_f2d27098bfd843e7 = function (arg0, arg1) {
723
777
  const ret = getObject(arg1).name;
724
778
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
@@ -743,7 +797,7 @@ function __wbg_get_imports() {
743
797
  const a = state0.a;
744
798
  state0.a = 0;
745
799
  try {
746
- return __wbg_adapter_68(a, state0.b, arg0, arg1);
800
+ return __wbg_adapter_109(a, state0.b, arg0, arg1);
747
801
  }
748
802
  finally {
749
803
  state0.a = a;
@@ -760,16 +814,38 @@ function __wbg_get_imports() {
760
814
  const ret = new Object();
761
815
  return addHeapObject(ret);
762
816
  };
817
+ imports.wbg.__wbg_new_5e0be73521bc8c17 = function () {
818
+ const ret = new Map();
819
+ return addHeapObject(ret);
820
+ };
821
+ imports.wbg.__wbg_new_78feb108b6472713 = function () {
822
+ const ret = new Array();
823
+ return addHeapObject(ret);
824
+ };
825
+ imports.wbg.__wbg_new_8a6f238a6ece86ea = function () {
826
+ const ret = new Error();
827
+ return addHeapObject(ret);
828
+ };
763
829
  imports.wbg.__wbg_new_a12002a7f91c75be = function (arg0) {
764
830
  const ret = new Uint8Array(getObject(arg0));
765
831
  return addHeapObject(ret);
766
832
  };
833
+ imports.wbg.__wbg_new_b1a33e5095abf678 = function () {
834
+ return handleError(function (arg0, arg1) {
835
+ const ret = new Worker(getStringFromWasm0(arg0, arg1));
836
+ return addHeapObject(ret);
837
+ }, arguments);
838
+ };
767
839
  imports.wbg.__wbg_new_e25e5aab09ff45db = function () {
768
840
  return handleError(function () {
769
841
  const ret = new AbortController();
770
842
  return addHeapObject(ret);
771
843
  }, arguments);
772
844
  };
845
+ imports.wbg.__wbg_new_e9a4a67dbababe57 = function (arg0) {
846
+ const ret = new Int32Array(getObject(arg0));
847
+ return addHeapObject(ret);
848
+ };
773
849
  imports.wbg.__wbg_newnoargs_105ed471475aaf50 = function (arg0, arg1) {
774
850
  const ret = new Function(getStringFromWasm0(arg0, arg1));
775
851
  return addHeapObject(ret);
@@ -778,12 +854,34 @@ function __wbg_get_imports() {
778
854
  const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
779
855
  return addHeapObject(ret);
780
856
  };
857
+ imports.wbg.__wbg_newwithlength_a381634e90c276d4 = function (arg0) {
858
+ const ret = new Uint8Array(arg0 >>> 0);
859
+ return addHeapObject(ret);
860
+ };
861
+ imports.wbg.__wbg_newwithoptions_0419cac3977d7f7f = function () {
862
+ return handleError(function (arg0, arg1, arg2) {
863
+ const ret = new Worker(getStringFromWasm0(arg0, arg1), getObject(arg2));
864
+ return addHeapObject(ret);
865
+ }, arguments);
866
+ };
781
867
  imports.wbg.__wbg_newwithstrandinit_06c535e0a867c635 = function () {
782
868
  return handleError(function (arg0, arg1, arg2) {
783
869
  const ret = new Request(getStringFromWasm0(arg0, arg1), getObject(arg2));
784
870
  return addHeapObject(ret);
785
871
  }, arguments);
786
872
  };
873
+ imports.wbg.__wbg_newwithstrsequence_a242b062eda81d0b = function () {
874
+ return handleError(function (arg0) {
875
+ const ret = new Blob(getObject(arg0));
876
+ return addHeapObject(ret);
877
+ }, arguments);
878
+ };
879
+ imports.wbg.__wbg_newwithstrsequenceandoptions_aaff55b467c81b63 = function () {
880
+ return handleError(function (arg0, arg1) {
881
+ const ret = new Blob(getObject(arg0), getObject(arg1));
882
+ return addHeapObject(ret);
883
+ }, arguments);
884
+ };
787
885
  imports.wbg.__wbg_next_25feadfc0913fea9 = function (arg0) {
788
886
  const ret = getObject(arg0).next;
789
887
  return addHeapObject(ret);
@@ -800,6 +898,32 @@ function __wbg_get_imports() {
800
898
  return addHeapObject(ret);
801
899
  }, arguments);
802
900
  };
901
+ imports.wbg.__wbg_now_e1163c67115ff874 = function (arg0) {
902
+ const ret = getObject(arg0).now();
903
+ return ret;
904
+ };
905
+ imports.wbg.__wbg_of_4a05197bfc89556f = function (arg0, arg1, arg2) {
906
+ const ret = Array.of(getObject(arg0), getObject(arg1), getObject(arg2));
907
+ return addHeapObject(ret);
908
+ };
909
+ imports.wbg.__wbg_performance_7fe0928f3ab059e5 = function (arg0) {
910
+ const ret = getObject(arg0).performance;
911
+ return addHeapObject(ret);
912
+ };
913
+ imports.wbg.__wbg_postMessage_6edafa8f7b9c2f52 = function () {
914
+ return handleError(function (arg0, arg1) {
915
+ getObject(arg0).postMessage(getObject(arg1));
916
+ }, arguments);
917
+ };
918
+ imports.wbg.__wbg_postMessage_83a8d58d3fcb6c13 = function () {
919
+ return handleError(function (arg0, arg1) {
920
+ getObject(arg0).postMessage(getObject(arg1));
921
+ }, arguments);
922
+ };
923
+ imports.wbg.__wbg_push_737cfc8c1432c2c6 = function (arg0, arg1) {
924
+ const ret = getObject(arg0).push(getObject(arg1));
925
+ return ret;
926
+ };
803
927
  imports.wbg.__wbg_queueMicrotask_97d92b4fcc8a61c5 = function (arg0) {
804
928
  queueMicrotask(getObject(arg0));
805
929
  };
@@ -807,6 +931,10 @@ function __wbg_get_imports() {
807
931
  const ret = getObject(arg0).queueMicrotask;
808
932
  return addHeapObject(ret);
809
933
  };
934
+ imports.wbg.__wbg_random_3ad904d98382defe = function () {
935
+ const ret = Math.random();
936
+ return ret;
937
+ };
810
938
  imports.wbg.__wbg_read_f8fdd4b410209222 = function () {
811
939
  return handleError(function (arg0, arg1, arg2, arg3) {
812
940
  const ret = getObject(arg0).read(getArrayU8FromWasm0(arg1, arg2), getObject(arg3));
@@ -821,13 +949,34 @@ function __wbg_get_imports() {
821
949
  const ret = Promise.resolve(getObject(arg0));
822
950
  return addHeapObject(ret);
823
951
  };
952
+ imports.wbg.__wbg_revokeObjectURL_27267efebeb457c7 = function () {
953
+ return handleError(function (arg0, arg1) {
954
+ URL.revokeObjectURL(getStringFromWasm0(arg0, arg1));
955
+ }, arguments);
956
+ };
957
+ imports.wbg.__wbg_setTimeout_42370cb3051b8c2c = function () {
958
+ return handleError(function (arg0, arg1, arg2) {
959
+ const ret = getObject(arg0).setTimeout(getObject(arg1), arg2);
960
+ return addHeapObject(ret);
961
+ }, arguments);
962
+ };
824
963
  imports.wbg.__wbg_setTimeout_73ce8df12de4f2f2 = function (arg0, arg1) {
825
964
  const ret = setTimeout(getObject(arg0), arg1);
826
965
  return addHeapObject(ret);
827
966
  };
967
+ imports.wbg.__wbg_set_37837023f3d740e8 = function (arg0, arg1, arg2) {
968
+ getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
969
+ };
970
+ imports.wbg.__wbg_set_3f1d0b984ed272ed = function (arg0, arg1, arg2) {
971
+ getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
972
+ };
828
973
  imports.wbg.__wbg_set_65595bdd868b3009 = function (arg0, arg1, arg2) {
829
974
  getObject(arg0).set(getObject(arg1), arg2 >>> 0);
830
975
  };
976
+ imports.wbg.__wbg_set_8fc6bf8a5b1071d1 = function (arg0, arg1, arg2) {
977
+ const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
978
+ return addHeapObject(ret);
979
+ };
831
980
  imports.wbg.__wbg_setat_2a071a392643c10e = function (arg0, arg1) {
832
981
  getObject(arg0).at = arg1;
833
982
  };
@@ -852,16 +1001,48 @@ function __wbg_get_imports() {
852
1001
  imports.wbg.__wbg_setmode_5dc300b865044b65 = function (arg0, arg1) {
853
1002
  getObject(arg0).mode = __wbindgen_enum_RequestMode[arg1];
854
1003
  };
1004
+ imports.wbg.__wbg_setname_73878b09a5ee3d0c = function (arg0, arg1, arg2) {
1005
+ getObject(arg0).name = getStringFromWasm0(arg1, arg2);
1006
+ };
1007
+ imports.wbg.__wbg_setonerror_57eeef5feb01fe7a = function (arg0, arg1) {
1008
+ getObject(arg0).onerror = getObject(arg1);
1009
+ };
1010
+ imports.wbg.__wbg_setonmessage_5a885b16bdc6dca6 = function (arg0, arg1) {
1011
+ getObject(arg0).onmessage = getObject(arg1);
1012
+ };
855
1013
  imports.wbg.__wbg_setrecursive_536113a081d6177a = function (arg0, arg1) {
856
1014
  getObject(arg0).recursive = arg1 !== 0;
857
1015
  };
858
1016
  imports.wbg.__wbg_setsignal_75b21ef3a81de905 = function (arg0, arg1) {
859
1017
  getObject(arg0).signal = getObject(arg1);
860
1018
  };
1019
+ imports.wbg.__wbg_settype_39ed370d3edd403c = function (arg0, arg1, arg2) {
1020
+ getObject(arg0).type = getStringFromWasm0(arg1, arg2);
1021
+ };
1022
+ imports.wbg.__wbg_settype_47fae7d6c82625e7 = function (arg0, arg1) {
1023
+ getObject(arg0).type = __wbindgen_enum_WorkerType[arg1];
1024
+ };
861
1025
  imports.wbg.__wbg_signal_aaf9ad74119f20a4 = function (arg0) {
862
1026
  const ret = getObject(arg0).signal;
863
1027
  return addHeapObject(ret);
864
1028
  };
1029
+ imports.wbg.__wbg_size_3808d41635a9c259 = function (arg0) {
1030
+ const ret = getObject(arg0).size;
1031
+ return ret;
1032
+ };
1033
+ imports.wbg.__wbg_slice_8c197bf0b6dfc84a = function () {
1034
+ return handleError(function (arg0, arg1, arg2, arg3, arg4) {
1035
+ const ret = getObject(arg0).slice(arg1, arg2, getStringFromWasm0(arg3, arg4));
1036
+ return addHeapObject(ret);
1037
+ }, arguments);
1038
+ };
1039
+ imports.wbg.__wbg_stack_0ed75d68575b0f3c = function (arg0, arg1) {
1040
+ const ret = getObject(arg1).stack;
1041
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
1042
+ const len1 = WASM_VECTOR_LEN;
1043
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1044
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1045
+ };
865
1046
  imports.wbg.__wbg_static_accessor_GLOBAL_88a902d13a557d07 = function () {
866
1047
  const ret = typeof global === 'undefined' ? null : global;
867
1048
  return isLikeNone(ret) ? 0 : addHeapObject(ret);
@@ -892,6 +1073,10 @@ function __wbg_get_imports() {
892
1073
  return addHeapObject(ret);
893
1074
  }, arguments);
894
1075
  };
1076
+ imports.wbg.__wbg_subarray_aa9065fa9dc5df96 = function (arg0, arg1, arg2) {
1077
+ const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
1078
+ return addHeapObject(ret);
1079
+ };
895
1080
  imports.wbg.__wbg_then_44b73946d2fb3e7d = function (arg0, arg1) {
896
1081
  const ret = getObject(arg0).then(getObject(arg1));
897
1082
  return addHeapObject(ret);
@@ -920,6 +1105,24 @@ function __wbg_get_imports() {
920
1105
  const ret = getObject(arg0).value;
921
1106
  return addHeapObject(ret);
922
1107
  };
1108
+ imports.wbg.__wbg_value_dab73d3d5d4abaaf = function (arg0) {
1109
+ const ret = getObject(arg0).value;
1110
+ return addHeapObject(ret);
1111
+ };
1112
+ imports.wbg.__wbg_waitAsync_61f0a081053dd3c2 = function (arg0, arg1, arg2) {
1113
+ const ret = Atomics.waitAsync(getObject(arg0), arg1 >>> 0, arg2);
1114
+ return addHeapObject(ret);
1115
+ };
1116
+ imports.wbg.__wbg_waitAsync_7ce6c8a047c752c3 = function () {
1117
+ const ret = Atomics.waitAsync;
1118
+ return addHeapObject(ret);
1119
+ };
1120
+ imports.wbg.__wbg_warn_4ca3906c248c47c4 = function (arg0) {
1121
+ console.warn(getObject(arg0));
1122
+ };
1123
+ imports.wbg.__wbg_warn_aaf1f4664a035bd6 = function (arg0, arg1, arg2, arg3) {
1124
+ console.warn(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
1125
+ };
923
1126
  imports.wbg.__wbg_write_530d3c84df874f53 = function () {
924
1127
  return handleError(function (arg0, arg1, arg2, arg3) {
925
1128
  const ret = getObject(arg0).write(getArrayU8FromWasm0(arg1, arg2), getObject(arg3));
@@ -933,6 +1136,14 @@ function __wbg_get_imports() {
933
1136
  imports.wbg.__wbindgen_array_push = function (arg0, arg1) {
934
1137
  getObject(arg0).push(takeObject(arg1));
935
1138
  };
1139
+ imports.wbg.__wbindgen_bigint_from_i64 = function (arg0) {
1140
+ const ret = arg0;
1141
+ return addHeapObject(ret);
1142
+ };
1143
+ imports.wbg.__wbindgen_bigint_from_u64 = function (arg0) {
1144
+ const ret = BigInt.asUintN(64, arg0);
1145
+ return addHeapObject(ret);
1146
+ };
936
1147
  imports.wbg.__wbindgen_cb_drop = function (arg0) {
937
1148
  const obj = takeObject(arg0).original;
938
1149
  if (obj.cnt-- == 1) {
@@ -942,12 +1153,28 @@ function __wbg_get_imports() {
942
1153
  const ret = false;
943
1154
  return ret;
944
1155
  };
945
- imports.wbg.__wbindgen_closure_wrapper178346 = function (arg0, arg1, arg2) {
946
- const ret = makeMutClosure(arg0, arg1, 141890, __wbg_adapter_31);
1156
+ imports.wbg.__wbindgen_closure_wrapper204130 = function (arg0, arg1, arg2) {
1157
+ const ret = makeMutClosure(arg0, arg1, 131379, __wbg_adapter_49);
1158
+ return addHeapObject(ret);
1159
+ };
1160
+ imports.wbg.__wbindgen_closure_wrapper216712 = function (arg0, arg1, arg2) {
1161
+ const ret = makeMutClosure(arg0, arg1, 144806, __wbg_adapter_52);
1162
+ return addHeapObject(ret);
1163
+ };
1164
+ imports.wbg.__wbindgen_closure_wrapper216713 = function (arg0, arg1, arg2) {
1165
+ const ret = makeMutClosure(arg0, arg1, 144806, __wbg_adapter_52);
1166
+ return addHeapObject(ret);
1167
+ };
1168
+ imports.wbg.__wbindgen_closure_wrapper216764 = function (arg0, arg1, arg2) {
1169
+ const ret = makeMutClosure(arg0, arg1, 144832, __wbg_adapter_57);
1170
+ return addHeapObject(ret);
1171
+ };
1172
+ imports.wbg.__wbindgen_closure_wrapper216804 = function (arg0, arg1, arg2) {
1173
+ const ret = makeMutClosure(arg0, arg1, 144850, __wbg_adapter_60);
947
1174
  return addHeapObject(ret);
948
1175
  };
949
- imports.wbg.__wbindgen_closure_wrapper25760 = function (arg0, arg1, arg2) {
950
- const ret = makeMutClosure(arg0, arg1, 18204, __wbg_adapter_28);
1176
+ imports.wbg.__wbindgen_closure_wrapper32222 = function (arg0, arg1, arg2) {
1177
+ const ret = makeMutClosure(arg0, arg1, 18428, __wbg_adapter_46);
951
1178
  return addHeapObject(ret);
952
1179
  };
953
1180
  imports.wbg.__wbindgen_debug_string = function (arg0, arg1) {
@@ -957,6 +1184,10 @@ function __wbg_get_imports() {
957
1184
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
958
1185
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
959
1186
  };
1187
+ imports.wbg.__wbindgen_error_new = function (arg0, arg1) {
1188
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
1189
+ return addHeapObject(ret);
1190
+ };
960
1191
  imports.wbg.__wbindgen_is_function = function (arg0) {
961
1192
  const ret = typeof (getObject(arg0)) === 'function';
962
1193
  return ret;
@@ -966,14 +1197,46 @@ function __wbg_get_imports() {
966
1197
  const ret = typeof (val) === 'object' && val !== null;
967
1198
  return ret;
968
1199
  };
1200
+ imports.wbg.__wbindgen_is_string = function (arg0) {
1201
+ const ret = typeof (getObject(arg0)) === 'string';
1202
+ return ret;
1203
+ };
969
1204
  imports.wbg.__wbindgen_is_undefined = function (arg0) {
970
1205
  const ret = getObject(arg0) === undefined;
971
1206
  return ret;
972
1207
  };
1208
+ imports.wbg.__wbindgen_link_9579f016b4522a24 = function (arg0) {
1209
+ const val = `onmessage = function (ev) {
1210
+ let [ia, index, value] = ev.data;
1211
+ ia = new Int32Array(ia.buffer);
1212
+ let result = Atomics.wait(ia, index, value);
1213
+ postMessage(result);
1214
+ };
1215
+ `;
1216
+ const ret = typeof URL.createObjectURL === 'undefined' ? "data:application/javascript," + encodeURIComponent(val) : URL.createObjectURL(new Blob([val], { type: "text/javascript" }));
1217
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
1218
+ const len1 = WASM_VECTOR_LEN;
1219
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1220
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1221
+ };
973
1222
  imports.wbg.__wbindgen_memory = function () {
974
1223
  const ret = wasm.memory;
975
1224
  return addHeapObject(ret);
976
1225
  };
1226
+ imports.wbg.__wbindgen_module = function () {
1227
+ const ret = __wbg_init.__wbindgen_wasm_module;
1228
+ return addHeapObject(ret);
1229
+ };
1230
+ imports.wbg.__wbindgen_number_get = function (arg0, arg1) {
1231
+ const obj = getObject(arg1);
1232
+ const ret = typeof (obj) === 'number' ? obj : undefined;
1233
+ getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
1234
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
1235
+ };
1236
+ imports.wbg.__wbindgen_number_new = function (arg0) {
1237
+ const ret = arg0;
1238
+ return addHeapObject(ret);
1239
+ };
977
1240
  imports.wbg.__wbindgen_object_clone_ref = function (arg0) {
978
1241
  const ret = getObject(arg0);
979
1242
  return addHeapObject(ret);
@@ -981,6 +1244,9 @@ function __wbg_get_imports() {
981
1244
  imports.wbg.__wbindgen_object_drop_ref = function (arg0) {
982
1245
  takeObject(arg0);
983
1246
  };
1247
+ imports.wbg.__wbindgen_rethrow = function (arg0) {
1248
+ throw takeObject(arg0);
1249
+ };
984
1250
  imports.wbg.__wbindgen_string_get = function (arg0, arg1) {
985
1251
  const obj = getObject(arg1);
986
1252
  const ret = typeof (obj) === 'string' ? obj : undefined;
@@ -996,43 +1262,55 @@ function __wbg_get_imports() {
996
1262
  imports.wbg.__wbindgen_throw = function (arg0, arg1) {
997
1263
  throw new Error(getStringFromWasm0(arg0, arg1));
998
1264
  };
1265
+ imports.wbg.__wbindgen_uint8_array_new = function (arg0, arg1) {
1266
+ var v0 = getArrayU8FromWasm0(arg0, arg1).slice();
1267
+ wasm.__wbindgen_export_4(arg0, arg1 * 1, 1);
1268
+ const ret = v0;
1269
+ return addHeapObject(ret);
1270
+ };
999
1271
  return imports;
1000
1272
  }
1001
1273
  function __wbg_init_memory(imports, memory) {
1274
+ imports.wbg.memory = memory || new WebAssembly.Memory({ initial: 224, maximum: 16384, shared: true });
1002
1275
  }
1003
- function __wbg_finalize_init(instance, module) {
1276
+ function __wbg_finalize_init(instance, module, thread_stack_size) {
1004
1277
  wasm = instance.exports;
1005
1278
  __wbg_init.__wbindgen_wasm_module = module;
1006
1279
  cachedDataViewMemory0 = null;
1007
1280
  cachedUint8ArrayMemory0 = null;
1008
- wasm.__wbindgen_start();
1281
+ if (typeof thread_stack_size !== 'undefined' && (typeof thread_stack_size !== 'number' || thread_stack_size === 0 || thread_stack_size % 65536 !== 0)) {
1282
+ throw 'invalid stack size';
1283
+ }
1284
+ wasm.__wbindgen_start(thread_stack_size);
1009
1285
  return wasm;
1010
1286
  }
1011
- function initSync(module) {
1287
+ function initSync(module, memory) {
1012
1288
  if (wasm !== undefined)
1013
1289
  return wasm;
1290
+ let thread_stack_size;
1014
1291
  if (typeof module !== 'undefined') {
1015
1292
  if (Object.getPrototypeOf(module) === Object.prototype) {
1016
- ({ module } = module);
1293
+ ({ module, memory, thread_stack_size } = module);
1017
1294
  }
1018
1295
  else {
1019
1296
  console.warn('using deprecated parameters for `initSync()`; pass a single object instead');
1020
1297
  }
1021
1298
  }
1022
1299
  const imports = __wbg_get_imports();
1023
- __wbg_init_memory(imports);
1300
+ __wbg_init_memory(imports, memory);
1024
1301
  if (!(module instanceof WebAssembly.Module)) {
1025
1302
  module = new WebAssembly.Module(module);
1026
1303
  }
1027
1304
  const instance = new WebAssembly.Instance(module, imports);
1028
- return __wbg_finalize_init(instance, module);
1305
+ return __wbg_finalize_init(instance, module, thread_stack_size);
1029
1306
  }
1030
- async function __wbg_init(module_or_path) {
1307
+ async function __wbg_init(module_or_path, memory) {
1031
1308
  if (wasm !== undefined)
1032
1309
  return wasm;
1310
+ let thread_stack_size;
1033
1311
  if (typeof module_or_path !== 'undefined') {
1034
1312
  if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
1035
- ({ module_or_path } = module_or_path);
1313
+ ({ module_or_path, memory, thread_stack_size } = module_or_path);
1036
1314
  }
1037
1315
  else {
1038
1316
  console.warn('using deprecated parameters for the initialization function; pass a single object instead');
@@ -1045,9 +1323,9 @@ async function __wbg_init(module_or_path) {
1045
1323
  if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {
1046
1324
  module_or_path = fetch(module_or_path);
1047
1325
  }
1048
- __wbg_init_memory(imports);
1326
+ __wbg_init_memory(imports, memory);
1049
1327
  const { instance, module } = await __wbg_load(await module_or_path, imports);
1050
- return __wbg_finalize_init(instance, module);
1328
+ return __wbg_finalize_init(instance, module, thread_stack_size);
1051
1329
  }
1052
1330
  export { initSync };
1053
1331
  export default __wbg_init;