@utoo/web 1.1.0 → 1.2.0-rc.10

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.
Files changed (56) hide show
  1. package/README.md +55 -0
  2. package/esm/a0a815481b4ff49f8961.wasm +0 -0
  3. package/esm/index.d.ts +3 -2
  4. package/esm/index.js +3 -2
  5. package/esm/loaderWorker.js +2 -0
  6. package/esm/loaderWorker.js.LICENSE.txt +23 -0
  7. package/esm/{forkedProject.d.ts → project/ForkedProject.d.ts} +5 -3
  8. package/esm/{forkedProject.js → project/ForkedProject.js} +8 -0
  9. package/esm/{internalProject.d.ts → project/InternalProject.d.ts} +5 -3
  10. package/esm/project/InternalProject.js +132 -0
  11. package/esm/{project.d.ts → project/Project.d.ts} +4 -1
  12. package/esm/{project.js → project/Project.js} +21 -6
  13. package/esm/serviceWorker.js +4 -3
  14. package/esm/{type.d.ts → types.d.ts} +44 -0
  15. package/esm/types.js +56 -0
  16. package/esm/utils/sabcom.d.ts +61 -0
  17. package/esm/utils/sabcom.js +203 -0
  18. package/esm/utoo/index.d.ts +126 -66
  19. package/esm/utoo/index.js +351 -235
  20. package/esm/utoo/index_bg.wasm +0 -0
  21. package/esm/webpackLoaders/cjs.js +299 -0
  22. package/esm/webpackLoaders/loaderWorkerPool.d.ts +2 -0
  23. package/esm/webpackLoaders/loaderWorkerPool.js +90 -0
  24. package/esm/webpackLoaders/polyfills/fsPolyfill.d.ts +78 -0
  25. package/esm/webpackLoaders/polyfills/fsPolyfill.js +279 -0
  26. package/esm/webpackLoaders/polyfills/fsPromisesPolyfill.d.ts +26 -0
  27. package/esm/webpackLoaders/polyfills/fsPromisesPolyfill.js +112 -0
  28. package/esm/webpackLoaders/polyfills/nodePolyFills.d.ts +92 -0
  29. package/esm/webpackLoaders/polyfills/nodePolyFills.js +230 -0
  30. package/esm/webpackLoaders/polyfills/workerThreadsPolyfill.d.ts +7 -0
  31. package/esm/webpackLoaders/polyfills/workerThreadsPolyfill.js +16 -0
  32. package/esm/webpackLoaders/{worker/type.d.ts → types.d.ts} +2 -1
  33. package/esm/webpackLoaders/worker.d.ts +2 -0
  34. package/esm/webpackLoaders/worker.js +46 -0
  35. package/esm/worker.js +2 -2
  36. package/package.json +19 -18
  37. package/esm/internalProject.js +0 -185
  38. package/esm/type.js +0 -12
  39. package/esm/webpackLoaders/loaders/less-loader/index.d.ts +0 -3
  40. package/esm/webpackLoaders/loaders/less-loader/index.js +0 -103
  41. package/esm/webpackLoaders/loaders/less-loader/options.json +0 -67
  42. package/esm/webpackLoaders/loaders/less-loader/utils.d.ts +0 -14
  43. package/esm/webpackLoaders/loaders/less-loader/utils.js +0 -217
  44. package/esm/webpackLoaders/worker/cjs.js +0 -80
  45. package/esm/webpackLoaders/worker/index.d.ts +0 -2
  46. package/esm/webpackLoaders/worker/index.js +0 -31
  47. package/esm/webpackLoaders/worker/nodePolyFills.d.ts +0 -14
  48. package/esm/webpackLoaders/worker/nodePolyFills.js +0 -24
  49. package/esm/webpackLoaders/workerContent.d.ts +0 -2
  50. package/esm/webpackLoaders/workerContent.js +0 -1
  51. /package/esm/{installServiceWorker.d.ts → utils/installServiceWorker.d.ts} +0 -0
  52. /package/esm/{installServiceWorker.js → utils/installServiceWorker.js} +0 -0
  53. /package/esm/{message.d.ts → utils/message.d.ts} +0 -0
  54. /package/esm/{message.js → utils/message.js} +0 -0
  55. /package/esm/webpackLoaders/{worker/cjs.d.ts → cjs.d.ts} +0 -0
  56. /package/esm/webpackLoaders/{worker/type.js → types.js} +0 -0
package/esm/utoo/index.js CHANGED
@@ -91,6 +91,9 @@ function handleError(f, args) {
91
91
  wasm.__wbindgen_export_3(addHeapObject(e));
92
92
  }
93
93
  }
94
+ function isLikeNone(x) {
95
+ return x === undefined || x === null;
96
+ }
94
97
  function dropObject(idx) {
95
98
  if (idx < 132)
96
99
  return;
@@ -106,9 +109,6 @@ function getArrayU8FromWasm0(ptr, len) {
106
109
  ptr = ptr >>> 0;
107
110
  return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
108
111
  }
109
- function isLikeNone(x) {
110
- return x === undefined || x === null;
111
- }
112
112
  function debugString(val) {
113
113
  // primitive types
114
114
  const type = typeof val;
@@ -239,68 +239,50 @@ function makeClosure(arg0, arg1, dtor, f) {
239
239
  CLOSURE_DTORS.register(real, state, state);
240
240
  return real;
241
241
  }
242
- /**
243
- * @param {number} worker_id
244
- * @returns {Promise<string>}
245
- */
246
- export function recvMessageInWorker(worker_id) {
247
- const ret = wasm.recvMessageInWorker(worker_id);
248
- return takeObject(ret);
249
- }
250
- /**
251
- * @returns {Promise<WorkerTermination>}
252
- */
253
- export function recvWorkerTermination() {
254
- const ret = wasm.recvWorkerTermination();
255
- return takeObject(ret);
242
+ function _assertClass(instance, klass) {
243
+ if (!(instance instanceof klass)) {
244
+ throw new Error(`expected instance of ${klass.name}`);
245
+ }
256
246
  }
257
247
  /**
258
- * @param {number} task_id
259
248
  * @param {number} worker_id
260
- * @returns {Promise<void>}
249
+ * @returns {Promise<WasmTaskMessage>}
261
250
  */
262
- export function notifyWorkerAck(task_id, worker_id) {
263
- const ret = wasm.notifyWorkerAck(task_id, worker_id);
251
+ export function recvTaskMessageInWorker(worker_id) {
252
+ const ret = wasm.recvTaskMessageInWorker(worker_id);
264
253
  return takeObject(ret);
265
254
  }
266
255
  /**
267
- * @param {number} task_id
268
- * @param {string} message
256
+ * @param {any} message
269
257
  * @returns {Promise<void>}
270
258
  */
271
- export function sendTaskMessage(task_id, message) {
272
- const ptr0 = passStringToWasm0(message, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
273
- const len0 = WASM_VECTOR_LEN;
274
- const ret = wasm.sendTaskMessage(task_id, ptr0, len0);
259
+ export function sendTaskMessage(message) {
260
+ const ret = wasm.sendTaskMessage(addHeapObject(message));
275
261
  return takeObject(ret);
276
262
  }
263
+ export function init_pack() {
264
+ wasm.init_pack();
265
+ }
277
266
  /**
278
- * @param {string} pool_id
279
- * @returns {Promise<number>}
267
+ * @param {string} filter
280
268
  */
281
- export function recvWorkerRequest(pool_id) {
282
- const ptr0 = passStringToWasm0(pool_id, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
269
+ export function initLogFilter(filter) {
270
+ const ptr0 = passStringToWasm0(filter, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
283
271
  const len0 = WASM_VECTOR_LEN;
284
- const ret = wasm.recvWorkerRequest(ptr0, len0);
285
- return takeObject(ret);
272
+ wasm.initLogFilter(ptr0, len0);
286
273
  }
287
274
  /**
288
- * @returns {Promise<PoolOptions>}
275
+ * @param {Function} creator
276
+ * @param {Function} terminator
289
277
  */
290
- export function recvPoolRequest() {
291
- const ret = wasm.recvPoolRequest();
292
- return takeObject(ret);
293
- }
294
- export function init_pack() {
295
- wasm.init_pack();
278
+ export function registerWorkerScheduler(creator, terminator) {
279
+ wasm.registerWorkerScheduler(addHeapObject(creator), addHeapObject(terminator));
296
280
  }
297
281
  /**
298
- * @param {string} filter
282
+ * @param {number} worker_id
299
283
  */
300
- export function init_log_filter(filter) {
301
- const ptr0 = passStringToWasm0(filter, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
302
- const len0 = WASM_VECTOR_LEN;
303
- wasm.init_log_filter(ptr0, len0);
284
+ export function workerCreated(worker_id) {
285
+ wasm.workerCreated(worker_id);
304
286
  }
305
287
  function passArray8ToWasm0(arg, malloc) {
306
288
  const ptr = malloc(arg.length * 1, 1) >>> 0;
@@ -315,9 +297,12 @@ function passArray8ToWasm0(arg, malloc) {
315
297
  export function wasm_thread_entry_point(ptr) {
316
298
  wasm.wasm_thread_entry_point(ptr);
317
299
  }
318
- function __wbg_adapter_6(arg0, arg1, arg2) {
300
+ function __wbg_adapter_4(arg0, arg1, arg2) {
319
301
  wasm.__wbindgen_export_6(arg0, arg1, addHeapObject(arg2));
320
302
  }
303
+ function __wbg_adapter_9(arg0, arg1) {
304
+ wasm.__wbindgen_export_7(arg0, arg1);
305
+ }
321
306
  let stack_pointer = 128;
322
307
  function addBorrowedObject(obj) {
323
308
  if (stack_pointer == 1)
@@ -325,18 +310,15 @@ function addBorrowedObject(obj) {
325
310
  heap[--stack_pointer] = obj;
326
311
  return stack_pointer;
327
312
  }
328
- function __wbg_adapter_13(arg0, arg1, arg2) {
313
+ function __wbg_adapter_18(arg0, arg1, arg2) {
329
314
  try {
330
- wasm.__wbindgen_export_7(arg0, arg1, addBorrowedObject(arg2));
315
+ wasm.__wbindgen_export_8(arg0, arg1, addBorrowedObject(arg2));
331
316
  }
332
317
  finally {
333
318
  heap[stack_pointer++] = undefined;
334
319
  }
335
320
  }
336
- function __wbg_adapter_16(arg0, arg1) {
337
- wasm.__wbindgen_export_8(arg0, arg1);
338
- }
339
- function __wbg_adapter_19(arg0, arg1, arg2) {
321
+ function __wbg_adapter_27(arg0, arg1, arg2) {
340
322
  wasm.__wbindgen_export_9(arg0, arg1, addHeapObject(arg2));
341
323
  }
342
324
  function __wbg_adapter_94(arg0, arg1, arg2, arg3) {
@@ -459,7 +441,10 @@ export class Metadata {
459
441
  return obj;
460
442
  }
461
443
  toJSON() {
462
- return {};
444
+ return {
445
+ type: this.type,
446
+ file_size: this.file_size,
447
+ };
463
448
  }
464
449
  toString() {
465
450
  return JSON.stringify(this);
@@ -474,74 +459,35 @@ export class Metadata {
474
459
  const ptr = this.__destroy_into_raw();
475
460
  wasm.__wbg_metadata_free(ptr, 0);
476
461
  }
477
- }
478
- if (Symbol.dispose)
479
- Metadata.prototype[Symbol.dispose] = Metadata.prototype.free;
480
- const PoolOptionsFinalization = (typeof FinalizationRegistry === 'undefined')
481
- ? { register: () => { }, unregister: () => { } }
482
- : new FinalizationRegistry(ptr => wasm.__wbg_pooloptions_free(ptr >>> 0, 1));
483
- export class PoolOptions {
484
- static __wrap(ptr) {
485
- ptr = ptr >>> 0;
486
- const obj = Object.create(PoolOptions.prototype);
487
- obj.__wbg_ptr = ptr;
488
- PoolOptionsFinalization.register(obj, obj.__wbg_ptr, obj);
489
- return obj;
490
- }
491
- __destroy_into_raw() {
492
- const ptr = this.__wbg_ptr;
493
- this.__wbg_ptr = 0;
494
- PoolOptionsFinalization.unregister(this);
495
- return ptr;
496
- }
497
- free() {
498
- const ptr = this.__destroy_into_raw();
499
- wasm.__wbg_pooloptions_free(ptr, 0);
500
- }
501
462
  /**
502
- * @returns {string}
463
+ * @returns {DirEntryType}
503
464
  */
504
- get filename() {
505
- let deferred1_0;
506
- let deferred1_1;
507
- try {
508
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
509
- wasm.__wbg_get_pooloptions_filename(retptr, this.__wbg_ptr);
510
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
511
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
512
- deferred1_0 = r0;
513
- deferred1_1 = r1;
514
- return getStringFromWasm0(r0, r1);
515
- }
516
- finally {
517
- wasm.__wbindgen_add_to_stack_pointer(16);
518
- wasm.__wbindgen_export_4(deferred1_0, deferred1_1, 1);
519
- }
465
+ get type() {
466
+ const ret = wasm.__wbg_get_metadata_type(this.__wbg_ptr);
467
+ return __wbindgen_enum_DirEntryType[ret];
520
468
  }
521
469
  /**
522
- * @param {string} arg0
470
+ * @param {DirEntryType} arg0
523
471
  */
524
- set filename(arg0) {
525
- const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
526
- const len0 = WASM_VECTOR_LEN;
527
- wasm.__wbg_set_pooloptions_filename(this.__wbg_ptr, ptr0, len0);
472
+ set type(arg0) {
473
+ wasm.__wbg_set_metadata_type(this.__wbg_ptr, (__wbindgen_enum_DirEntryType.indexOf(arg0) + 1 || 3) - 1);
528
474
  }
529
475
  /**
530
- * @returns {number}
476
+ * @returns {bigint}
531
477
  */
532
- get maxConcurrency() {
533
- const ret = wasm.__wbg_get_pooloptions_maxConcurrency(this.__wbg_ptr);
534
- return ret >>> 0;
478
+ get file_size() {
479
+ const ret = wasm.__wbg_get_metadata_file_size(this.__wbg_ptr);
480
+ return BigInt.asUintN(64, ret);
535
481
  }
536
482
  /**
537
- * @param {number} arg0
483
+ * @param {bigint} arg0
538
484
  */
539
- set maxConcurrency(arg0) {
540
- wasm.__wbg_set_pooloptions_maxConcurrency(this.__wbg_ptr, arg0);
485
+ set file_size(arg0) {
486
+ wasm.__wbg_set_metadata_file_size(this.__wbg_ptr, arg0);
541
487
  }
542
488
  }
543
489
  if (Symbol.dispose)
544
- PoolOptions.prototype[Symbol.dispose] = PoolOptions.prototype.free;
490
+ Metadata.prototype[Symbol.dispose] = Metadata.prototype.free;
545
491
  const ProjectFinalization = (typeof FinalizationRegistry === 'undefined')
546
492
  ? { register: () => { }, unregister: () => { } }
547
493
  : new FinalizationRegistry(ptr => wasm.__wbg_project_free(ptr >>> 0, 1));
@@ -560,10 +506,10 @@ export class Project {
560
506
  * @param {string} path
561
507
  * @returns {Promise<void>}
562
508
  */
563
- createDir(path) {
509
+ static createDir(path) {
564
510
  const ptr0 = passStringToWasm0(path, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
565
511
  const len0 = WASM_VECTOR_LEN;
566
- const ret = wasm.project_createDir(this.__wbg_ptr, ptr0, len0);
512
+ const ret = wasm.project_createDir(ptr0, len0);
567
513
  return takeObject(ret);
568
514
  }
569
515
  /**
@@ -571,20 +517,20 @@ export class Project {
571
517
  * @param {boolean} recursive
572
518
  * @returns {Promise<void>}
573
519
  */
574
- removeDir(path, recursive) {
520
+ static removeDir(path, recursive) {
575
521
  const ptr0 = passStringToWasm0(path, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
576
522
  const len0 = WASM_VECTOR_LEN;
577
- const ret = wasm.project_removeDir(this.__wbg_ptr, ptr0, len0, recursive);
523
+ const ret = wasm.project_removeDir(ptr0, len0, recursive);
578
524
  return takeObject(ret);
579
525
  }
580
526
  /**
581
527
  * @param {string} path
582
528
  * @returns {Promise<void>}
583
529
  */
584
- removeFile(path) {
530
+ static removeFile(path) {
585
531
  const ptr0 = passStringToWasm0(path, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
586
532
  const len0 = WASM_VECTOR_LEN;
587
- const ret = wasm.project_removeFile(this.__wbg_ptr, ptr0, len0);
533
+ const ret = wasm.project_removeFile(ptr0, len0);
588
534
  return takeObject(ret);
589
535
  }
590
536
  /**
@@ -592,43 +538,43 @@ export class Project {
592
538
  * @param {string} content
593
539
  * @returns {Promise<void>}
594
540
  */
595
- writeString(path, content) {
541
+ static writeString(path, content) {
596
542
  const ptr0 = passStringToWasm0(path, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
597
543
  const len0 = WASM_VECTOR_LEN;
598
544
  const ptr1 = passStringToWasm0(content, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
599
545
  const len1 = WASM_VECTOR_LEN;
600
- const ret = wasm.project_writeString(this.__wbg_ptr, ptr0, len0, ptr1, len1);
546
+ const ret = wasm.project_writeString(ptr0, len0, ptr1, len1);
601
547
  return takeObject(ret);
602
548
  }
603
549
  /**
604
550
  * @param {string} path
605
551
  * @returns {Promise<void>}
606
552
  */
607
- createDirAll(path) {
553
+ static createDirAll(path) {
608
554
  const ptr0 = passStringToWasm0(path, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
609
555
  const len0 = WASM_VECTOR_LEN;
610
- const ret = wasm.project_createDirAll(this.__wbg_ptr, ptr0, len0);
556
+ const ret = wasm.project_createDirAll(ptr0, len0);
611
557
  return takeObject(ret);
612
558
  }
613
559
  /**
614
560
  * @param {string} path
615
561
  * @returns {Promise<string>}
616
562
  */
617
- readToString(path) {
563
+ static readToString(path) {
618
564
  const ptr0 = passStringToWasm0(path, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
619
565
  const len0 = WASM_VECTOR_LEN;
620
- const ret = wasm.project_readToString(this.__wbg_ptr, ptr0, len0);
566
+ const ret = wasm.project_readToString(ptr0, len0);
621
567
  return takeObject(ret);
622
568
  }
623
569
  /**
624
570
  * @returns {string}
625
571
  */
626
- get cwd() {
572
+ static get cwd() {
627
573
  let deferred1_0;
628
574
  let deferred1_1;
629
575
  try {
630
576
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
631
- wasm.project_cwd(retptr, this.__wbg_ptr);
577
+ wasm.project_cwd(retptr);
632
578
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
633
579
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
634
580
  deferred1_0 = r0;
@@ -641,56 +587,56 @@ export class Project {
641
587
  }
642
588
  }
643
589
  /**
644
- * @param {string} cwd
645
- * @param {string} thread_url
590
+ * Generate package-lock.json by resolving dependencies.
591
+ *
592
+ * # Arguments
593
+ * * `registry` - Optional registry URL. If None, uses npmmirror.
594
+ * - "https://registry.npmmirror.com" - supports semver queries (faster)
595
+ * - "https://registry.npmjs.org" - official npm registry (slower, fetches full manifest)
596
+ * * `concurrency` - Optional concurrency limit (defaults to 20)
597
+ * @param {string | null} [registry]
598
+ * @param {number | null} [concurrency]
599
+ * @returns {Promise<string>}
646
600
  */
647
- constructor(cwd, thread_url) {
648
- const ptr0 = passStringToWasm0(cwd, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
649
- const len0 = WASM_VECTOR_LEN;
650
- const ptr1 = passStringToWasm0(thread_url, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
651
- const len1 = WASM_VECTOR_LEN;
652
- const ret = wasm.project_new(ptr0, len0, ptr1, len1);
653
- this.__wbg_ptr = ret >>> 0;
654
- ProjectFinalization.register(this, this.__wbg_ptr, this);
655
- return this;
601
+ static deps(registry, concurrency) {
602
+ var ptr0 = isLikeNone(registry) ? 0 : passStringToWasm0(registry, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
603
+ var len0 = WASM_VECTOR_LEN;
604
+ const ret = wasm.project_deps(ptr0, len0, isLikeNone(concurrency) ? 0x100000001 : (concurrency) >>> 0);
605
+ return takeObject(ret);
656
606
  }
657
607
  /**
658
608
  * Create a tar.gz archive and return bytes (no file I/O)
659
609
  * This is useful for main thread execution without OPFS access
660
610
  * @param {any} files
661
- * @returns {Uint8Array}
611
+ * @returns {Promise<Uint8Array>}
662
612
  */
663
- gzip(files) {
664
- try {
665
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
666
- wasm.project_gzip(retptr, this.__wbg_ptr, addHeapObject(files));
667
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
668
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
669
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
670
- if (r2) {
671
- throw takeObject(r1);
672
- }
673
- return takeObject(r0);
674
- }
675
- finally {
676
- wasm.__wbindgen_add_to_stack_pointer(16);
677
- }
613
+ static gzip(files) {
614
+ const ret = wasm.project_gzip(addHeapObject(files));
615
+ return takeObject(ret);
616
+ }
617
+ /**
618
+ * @param {string} thread_url
619
+ */
620
+ static init(thread_url) {
621
+ const ptr0 = passStringToWasm0(thread_url, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
622
+ const len0 = WASM_VECTOR_LEN;
623
+ wasm.project_init(ptr0, len0);
678
624
  }
679
625
  /**
680
626
  * @param {string} path
681
627
  * @returns {Promise<Uint8Array>}
682
628
  */
683
- read(path) {
629
+ static read(path) {
684
630
  const ptr0 = passStringToWasm0(path, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
685
631
  const len0 = WASM_VECTOR_LEN;
686
- const ret = wasm.project_read(this.__wbg_ptr, ptr0, len0);
632
+ const ret = wasm.project_read(ptr0, len0);
687
633
  return takeObject(ret);
688
634
  }
689
635
  /**
690
636
  * @returns {Promise<any>}
691
637
  */
692
- build() {
693
- const ret = wasm.project_build(this.__wbg_ptr);
638
+ static build() {
639
+ const ret = wasm.project_build();
694
640
  return takeObject(ret);
695
641
  }
696
642
  /**
@@ -698,12 +644,12 @@ export class Project {
698
644
  * @param {Uint8Array} content
699
645
  * @returns {Promise<void>}
700
646
  */
701
- write(path, content) {
647
+ static write(path, content) {
702
648
  const ptr0 = passStringToWasm0(path, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
703
649
  const len0 = WASM_VECTOR_LEN;
704
650
  const ptr1 = passArray8ToWasm0(content, wasm.__wbindgen_export_1);
705
651
  const len1 = WASM_VECTOR_LEN;
706
- const ret = wasm.project_write(this.__wbg_ptr, ptr0, len0, ptr1, len1);
652
+ const ret = wasm.project_write(ptr0, len0, ptr1, len1);
707
653
  return takeObject(ret);
708
654
  }
709
655
  /**
@@ -711,54 +657,49 @@ export class Project {
711
657
  * @param {number | null} [max_concurrent_downloads]
712
658
  * @returns {Promise<void>}
713
659
  */
714
- install(package_lock, max_concurrent_downloads) {
660
+ static install(package_lock, max_concurrent_downloads) {
715
661
  const ptr0 = passStringToWasm0(package_lock, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
716
662
  const len0 = WASM_VECTOR_LEN;
717
- const ret = wasm.project_install(this.__wbg_ptr, ptr0, len0, isLikeNone(max_concurrent_downloads) ? 0x100000001 : (max_concurrent_downloads) >>> 0);
663
+ const ret = wasm.project_install(ptr0, len0, isLikeNone(max_concurrent_downloads) ? 0x100000001 : (max_concurrent_downloads) >>> 0);
718
664
  return takeObject(ret);
719
665
  }
720
666
  /**
721
- * Calculate MD5 hash of byte content
667
+ * @param {string} path
668
+ */
669
+ static setCwd(path) {
670
+ const ptr0 = passStringToWasm0(path, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
671
+ const len0 = WASM_VECTOR_LEN;
672
+ wasm.project_setCwd(ptr0, len0);
673
+ }
674
+ /**
675
+ * Calculate MD5 hash of byte content (async for better thread scheduling)
722
676
  * @param {Uint8Array} content
723
- * @returns {string}
677
+ * @returns {Promise<string>}
724
678
  */
725
- sigMd5(content) {
726
- let deferred2_0;
727
- let deferred2_1;
728
- try {
729
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
730
- const ptr0 = passArray8ToWasm0(content, wasm.__wbindgen_export_1);
731
- const len0 = WASM_VECTOR_LEN;
732
- wasm.project_sigMd5(retptr, this.__wbg_ptr, ptr0, len0);
733
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
734
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
735
- deferred2_0 = r0;
736
- deferred2_1 = r1;
737
- return getStringFromWasm0(r0, r1);
738
- }
739
- finally {
740
- wasm.__wbindgen_add_to_stack_pointer(16);
741
- wasm.__wbindgen_export_4(deferred2_0, deferred2_1, 1);
742
- }
679
+ static sigMd5(content) {
680
+ const ptr0 = passArray8ToWasm0(content, wasm.__wbindgen_export_1);
681
+ const len0 = WASM_VECTOR_LEN;
682
+ const ret = wasm.project_sigMd5(ptr0, len0);
683
+ return takeObject(ret);
743
684
  }
744
685
  /**
745
686
  * @param {string} path
746
687
  * @returns {Promise<Metadata>}
747
688
  */
748
- metadata(path) {
689
+ static metadata(path) {
749
690
  const ptr0 = passStringToWasm0(path, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
750
691
  const len0 = WASM_VECTOR_LEN;
751
- const ret = wasm.project_metadata(this.__wbg_ptr, ptr0, len0);
692
+ const ret = wasm.project_metadata(ptr0, len0);
752
693
  return takeObject(ret);
753
694
  }
754
695
  /**
755
696
  * @param {string} path
756
697
  * @returns {Promise<DirEntry[]>}
757
698
  */
758
- readDir(path) {
699
+ static readDir(path) {
759
700
  const ptr0 = passStringToWasm0(path, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
760
701
  const len0 = WASM_VECTOR_LEN;
761
- const ret = wasm.project_readDir(this.__wbg_ptr, ptr0, len0);
702
+ const ret = wasm.project_readDir(ptr0, len0);
762
703
  return takeObject(ret);
763
704
  }
764
705
  /**
@@ -766,37 +707,141 @@ export class Project {
766
707
  * @param {string} dst
767
708
  * @returns {Promise<void>}
768
709
  */
769
- copyFile(src, dst) {
710
+ static copyFile(src, dst) {
770
711
  const ptr0 = passStringToWasm0(src, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
771
712
  const len0 = WASM_VECTOR_LEN;
772
713
  const ptr1 = passStringToWasm0(dst, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
773
714
  const len1 = WASM_VECTOR_LEN;
774
- const ret = wasm.project_copyFile(this.__wbg_ptr, ptr0, len0, ptr1, len1);
715
+ const ret = wasm.project_copyFile(ptr0, len0, ptr1, len1);
775
716
  return takeObject(ret);
776
717
  }
777
718
  }
778
719
  if (Symbol.dispose)
779
720
  Project.prototype[Symbol.dispose] = Project.prototype.free;
780
- const WorkerTerminationFinalization = (typeof FinalizationRegistry === 'undefined')
721
+ const WasmTaskMessageFinalization = (typeof FinalizationRegistry === 'undefined')
781
722
  ? { register: () => { }, unregister: () => { } }
782
- : new FinalizationRegistry(ptr => wasm.__wbg_workertermination_free(ptr >>> 0, 1));
783
- export class WorkerTermination {
723
+ : new FinalizationRegistry(ptr => wasm.__wbg_wasmtaskmessage_free(ptr >>> 0, 1));
724
+ export class WasmTaskMessage {
784
725
  static __wrap(ptr) {
785
726
  ptr = ptr >>> 0;
786
- const obj = Object.create(WorkerTermination.prototype);
727
+ const obj = Object.create(WasmTaskMessage.prototype);
787
728
  obj.__wbg_ptr = ptr;
788
- WorkerTerminationFinalization.register(obj, obj.__wbg_ptr, obj);
729
+ WasmTaskMessageFinalization.register(obj, obj.__wbg_ptr, obj);
789
730
  return obj;
790
731
  }
791
732
  __destroy_into_raw() {
792
733
  const ptr = this.__wbg_ptr;
793
734
  this.__wbg_ptr = 0;
794
- WorkerTerminationFinalization.unregister(this);
735
+ WasmTaskMessageFinalization.unregister(this);
795
736
  return ptr;
796
737
  }
797
738
  free() {
798
739
  const ptr = this.__destroy_into_raw();
799
- wasm.__wbg_workertermination_free(ptr, 0);
740
+ wasm.__wbg_wasmtaskmessage_free(ptr, 0);
741
+ }
742
+ /**
743
+ * @returns {number}
744
+ */
745
+ get taskId() {
746
+ const ret = wasm.__wbg_get_wasmtaskmessage_taskId(this.__wbg_ptr);
747
+ return ret >>> 0;
748
+ }
749
+ /**
750
+ * @param {number} arg0
751
+ */
752
+ set taskId(arg0) {
753
+ wasm.__wbg_set_wasmtaskmessage_taskId(this.__wbg_ptr, arg0);
754
+ }
755
+ /**
756
+ * @returns {string}
757
+ */
758
+ get data() {
759
+ let deferred1_0;
760
+ let deferred1_1;
761
+ try {
762
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
763
+ wasm.__wbg_get_wasmtaskmessage_data(retptr, this.__wbg_ptr);
764
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
765
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
766
+ deferred1_0 = r0;
767
+ deferred1_1 = r1;
768
+ return getStringFromWasm0(r0, r1);
769
+ }
770
+ finally {
771
+ wasm.__wbindgen_add_to_stack_pointer(16);
772
+ wasm.__wbindgen_export_4(deferred1_0, deferred1_1, 1);
773
+ }
774
+ }
775
+ /**
776
+ * @param {string} arg0
777
+ */
778
+ set data(arg0) {
779
+ const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
780
+ const len0 = WASM_VECTOR_LEN;
781
+ wasm.__wbg_set_wasmtaskmessage_data(this.__wbg_ptr, ptr0, len0);
782
+ }
783
+ }
784
+ if (Symbol.dispose)
785
+ WasmTaskMessage.prototype[Symbol.dispose] = WasmTaskMessage.prototype.free;
786
+ const WebWorkerCreationFinalization = (typeof FinalizationRegistry === 'undefined')
787
+ ? { register: () => { }, unregister: () => { } }
788
+ : new FinalizationRegistry(ptr => wasm.__wbg_webworkercreation_free(ptr >>> 0, 1));
789
+ export class WebWorkerCreation {
790
+ static __wrap(ptr) {
791
+ ptr = ptr >>> 0;
792
+ const obj = Object.create(WebWorkerCreation.prototype);
793
+ obj.__wbg_ptr = ptr;
794
+ WebWorkerCreationFinalization.register(obj, obj.__wbg_ptr, obj);
795
+ return obj;
796
+ }
797
+ __destroy_into_raw() {
798
+ const ptr = this.__wbg_ptr;
799
+ this.__wbg_ptr = 0;
800
+ WebWorkerCreationFinalization.unregister(this);
801
+ return ptr;
802
+ }
803
+ free() {
804
+ const ptr = this.__destroy_into_raw();
805
+ wasm.__wbg_webworkercreation_free(ptr, 0);
806
+ }
807
+ /**
808
+ * @returns {WebWorkerOptions}
809
+ */
810
+ get options() {
811
+ const ret = wasm.__wbg_get_webworkercreation_options(this.__wbg_ptr);
812
+ return WebWorkerOptions.__wrap(ret);
813
+ }
814
+ /**
815
+ * @param {WebWorkerOptions} arg0
816
+ */
817
+ set options(arg0) {
818
+ _assertClass(arg0, WebWorkerOptions);
819
+ var ptr0 = arg0.__destroy_into_raw();
820
+ wasm.__wbg_set_webworkercreation_options(this.__wbg_ptr, ptr0);
821
+ }
822
+ }
823
+ if (Symbol.dispose)
824
+ WebWorkerCreation.prototype[Symbol.dispose] = WebWorkerCreation.prototype.free;
825
+ const WebWorkerOptionsFinalization = (typeof FinalizationRegistry === 'undefined')
826
+ ? { register: () => { }, unregister: () => { } }
827
+ : new FinalizationRegistry(ptr => wasm.__wbg_webworkeroptions_free(ptr >>> 0, 1));
828
+ export class WebWorkerOptions {
829
+ static __wrap(ptr) {
830
+ ptr = ptr >>> 0;
831
+ const obj = Object.create(WebWorkerOptions.prototype);
832
+ obj.__wbg_ptr = ptr;
833
+ WebWorkerOptionsFinalization.register(obj, obj.__wbg_ptr, obj);
834
+ return obj;
835
+ }
836
+ __destroy_into_raw() {
837
+ const ptr = this.__wbg_ptr;
838
+ this.__wbg_ptr = 0;
839
+ WebWorkerOptionsFinalization.unregister(this);
840
+ return ptr;
841
+ }
842
+ free() {
843
+ const ptr = this.__destroy_into_raw();
844
+ wasm.__wbg_webworkeroptions_free(ptr, 0);
800
845
  }
801
846
  /**
802
847
  * @returns {string}
@@ -806,7 +851,7 @@ export class WorkerTermination {
806
851
  let deferred1_1;
807
852
  try {
808
853
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
809
- wasm.__wbg_get_pooloptions_filename(retptr, this.__wbg_ptr);
854
+ wasm.__wbg_get_wasmtaskmessage_data(retptr, this.__wbg_ptr);
810
855
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
811
856
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
812
857
  deferred1_0 = r0;
@@ -824,24 +869,91 @@ export class WorkerTermination {
824
869
  set filename(arg0) {
825
870
  const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
826
871
  const len0 = WASM_VECTOR_LEN;
827
- wasm.__wbg_set_pooloptions_filename(this.__wbg_ptr, ptr0, len0);
872
+ wasm.__wbg_set_wasmtaskmessage_data(this.__wbg_ptr, ptr0, len0);
873
+ }
874
+ /**
875
+ * @returns {string}
876
+ */
877
+ get cwd() {
878
+ let deferred1_0;
879
+ let deferred1_1;
880
+ try {
881
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
882
+ wasm.__wbg_get_webworkeroptions_cwd(retptr, this.__wbg_ptr);
883
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
884
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
885
+ deferred1_0 = r0;
886
+ deferred1_1 = r1;
887
+ return getStringFromWasm0(r0, r1);
888
+ }
889
+ finally {
890
+ wasm.__wbindgen_add_to_stack_pointer(16);
891
+ wasm.__wbindgen_export_4(deferred1_0, deferred1_1, 1);
892
+ }
893
+ }
894
+ /**
895
+ * @param {string} arg0
896
+ */
897
+ set cwd(arg0) {
898
+ const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
899
+ const len0 = WASM_VECTOR_LEN;
900
+ wasm.__wbg_set_webworkeroptions_cwd(this.__wbg_ptr, ptr0, len0);
901
+ }
902
+ }
903
+ if (Symbol.dispose)
904
+ WebWorkerOptions.prototype[Symbol.dispose] = WebWorkerOptions.prototype.free;
905
+ const WebWorkerTerminationFinalization = (typeof FinalizationRegistry === 'undefined')
906
+ ? { register: () => { }, unregister: () => { } }
907
+ : new FinalizationRegistry(ptr => wasm.__wbg_webworkertermination_free(ptr >>> 0, 1));
908
+ export class WebWorkerTermination {
909
+ static __wrap(ptr) {
910
+ ptr = ptr >>> 0;
911
+ const obj = Object.create(WebWorkerTermination.prototype);
912
+ obj.__wbg_ptr = ptr;
913
+ WebWorkerTerminationFinalization.register(obj, obj.__wbg_ptr, obj);
914
+ return obj;
915
+ }
916
+ __destroy_into_raw() {
917
+ const ptr = this.__wbg_ptr;
918
+ this.__wbg_ptr = 0;
919
+ WebWorkerTerminationFinalization.unregister(this);
920
+ return ptr;
921
+ }
922
+ free() {
923
+ const ptr = this.__destroy_into_raw();
924
+ wasm.__wbg_webworkertermination_free(ptr, 0);
925
+ }
926
+ /**
927
+ * @returns {WebWorkerOptions}
928
+ */
929
+ get options() {
930
+ const ret = wasm.__wbg_get_webworkertermination_options(this.__wbg_ptr);
931
+ return WebWorkerOptions.__wrap(ret);
932
+ }
933
+ /**
934
+ * @param {WebWorkerOptions} arg0
935
+ */
936
+ set options(arg0) {
937
+ _assertClass(arg0, WebWorkerOptions);
938
+ var ptr0 = arg0.__destroy_into_raw();
939
+ wasm.__wbg_set_webworkertermination_options(this.__wbg_ptr, ptr0);
828
940
  }
829
941
  /**
830
942
  * @returns {number}
831
943
  */
832
944
  get workerId() {
833
- const ret = wasm.__wbg_get_pooloptions_maxConcurrency(this.__wbg_ptr);
945
+ const ret = wasm.__wbg_get_webworkertermination_workerId(this.__wbg_ptr);
834
946
  return ret >>> 0;
835
947
  }
836
948
  /**
837
949
  * @param {number} arg0
838
950
  */
839
951
  set workerId(arg0) {
840
- wasm.__wbg_set_pooloptions_maxConcurrency(this.__wbg_ptr, arg0);
952
+ wasm.__wbg_set_webworkertermination_workerId(this.__wbg_ptr, arg0);
841
953
  }
842
954
  }
843
955
  if (Symbol.dispose)
844
- WorkerTermination.prototype[Symbol.dispose] = WorkerTermination.prototype.free;
956
+ WebWorkerTermination.prototype[Symbol.dispose] = WebWorkerTermination.prototype.free;
845
957
  const EXPECTED_RESPONSE_TYPES = new Set(['basic', 'cors', 'default']);
846
958
  async function __wbg_load(module, imports) {
847
959
  if (typeof Response === 'function' && module instanceof Response) {
@@ -927,9 +1039,9 @@ function __wbg_get_imports() {
927
1039
  return addHeapObject(ret);
928
1040
  }, arguments);
929
1041
  };
930
- imports.wbg.__wbg_changedHandle_51cdba7dd85fac27 = function (arg0) {
1042
+ imports.wbg.__wbg_changedHandle_8ffec3b429cf1dbb = function (arg0) {
931
1043
  const ret = getObject(arg0).changedHandle;
932
- return addHeapObject(ret);
1044
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
933
1045
  };
934
1046
  imports.wbg.__wbg_clearTimeout_7a42b49784aea641 = function (arg0) {
935
1047
  const ret = clearTimeout(takeObject(arg0));
@@ -1222,16 +1334,16 @@ function __wbg_get_imports() {
1222
1334
  const ret = new Error();
1223
1335
  return addHeapObject(ret);
1224
1336
  };
1225
- imports.wbg.__wbg_new_9b2344bc56f77a2b = function (arg0) {
1226
- const ret = new FileSystemObserver(getObject(arg0));
1227
- return addHeapObject(ret);
1228
- };
1229
1337
  imports.wbg.__wbg_new_9d476835fd376de6 = function () {
1230
1338
  return handleError(function (arg0, arg1) {
1231
1339
  const ret = new Worker(getStringFromWasm0(arg0, arg1));
1232
1340
  return addHeapObject(ret);
1233
1341
  }, arguments);
1234
1342
  };
1343
+ imports.wbg.__wbg_new_aa308f983e021414 = function (arg0) {
1344
+ const ret = new FileSystemObserver(getObject(arg0));
1345
+ return addHeapObject(ret);
1346
+ };
1235
1347
  imports.wbg.__wbg_new_f6e53210afea8e45 = function () {
1236
1348
  return handleError(function () {
1237
1349
  const ret = new Headers();
@@ -1292,7 +1404,7 @@ function __wbg_get_imports() {
1292
1404
  const ret = Date.now();
1293
1405
  return ret;
1294
1406
  };
1295
- imports.wbg.__wbg_observe_a98641e2bc5e6a17 = function (arg0, arg1, arg2) {
1407
+ imports.wbg.__wbg_observe_d35dc74a40256f14 = function (arg0, arg1, arg2) {
1296
1408
  const ret = getObject(arg0).observe(getObject(arg1), getObject(arg2));
1297
1409
  return addHeapObject(ret);
1298
1410
  };
@@ -1304,10 +1416,6 @@ function __wbg_get_imports() {
1304
1416
  const ret = getObject(arg0).performance;
1305
1417
  return addHeapObject(ret);
1306
1418
  };
1307
- imports.wbg.__wbg_pooloptions_new = function (arg0) {
1308
- const ret = PoolOptions.__wrap(arg0);
1309
- return addHeapObject(ret);
1310
- };
1311
1419
  imports.wbg.__wbg_postMessage_38909232d65f5870 = function () {
1312
1420
  return handleError(function (arg0, arg1) {
1313
1421
  getObject(arg0).postMessage(getObject(arg1));
@@ -1348,7 +1456,7 @@ function __wbg_get_imports() {
1348
1456
  return ret;
1349
1457
  }, arguments);
1350
1458
  };
1351
- imports.wbg.__wbg_relativePathComponents_71b7af6cc056eaa1 = function (arg0) {
1459
+ imports.wbg.__wbg_relativePathComponents_e83421748ca55913 = function (arg0) {
1352
1460
  const ret = getObject(arg0).relativePathComponents;
1353
1461
  return addHeapObject(ret);
1354
1462
  };
@@ -1416,7 +1524,7 @@ function __wbg_get_imports() {
1416
1524
  imports.wbg.__wbg_setrecursive_072599988d5f7e8d = function (arg0, arg1) {
1417
1525
  getObject(arg0).recursive = arg1 !== 0;
1418
1526
  };
1419
- imports.wbg.__wbg_setrecursive_0b3e76f293311ab5 = function (arg0, arg1) {
1527
+ imports.wbg.__wbg_setrecursive_2b2b8ba6100007aa = function (arg0, arg1) {
1420
1528
  getObject(arg0).recursive = arg1 !== 0;
1421
1529
  };
1422
1530
  imports.wbg.__wbg_setsignal_8c45ad1247a74809 = function (arg0, arg1) {
@@ -1497,7 +1605,7 @@ function __wbg_get_imports() {
1497
1605
  getObject(arg0).truncate(arg1 >>> 0);
1498
1606
  }, arguments);
1499
1607
  };
1500
- imports.wbg.__wbg_type_7ef9242007bd4c65 = function (arg0) {
1608
+ imports.wbg.__wbg_type_8ed3e3e9b945ec59 = function (arg0) {
1501
1609
  const ret = getObject(arg0).type;
1502
1610
  return (__wbindgen_enum_FileSystemChangeRecordType.indexOf(ret) + 1 || 7) - 1;
1503
1611
  };
@@ -1530,6 +1638,10 @@ function __wbg_get_imports() {
1530
1638
  imports.wbg.__wbg_warn_e2ada06313f92f09 = function (arg0) {
1531
1639
  console.warn(getObject(arg0));
1532
1640
  };
1641
+ imports.wbg.__wbg_wasmtaskmessage_new = function (arg0) {
1642
+ const ret = WasmTaskMessage.__wrap(arg0);
1643
+ return addHeapObject(ret);
1644
+ };
1533
1645
  imports.wbg.__wbg_wbindgenbooleanget_3fe6f642c7d97746 = function (arg0) {
1534
1646
  const v = getObject(arg0);
1535
1647
  const ret = typeof (v) === 'boolean' ? v : undefined;
@@ -1604,8 +1716,12 @@ function __wbg_get_imports() {
1604
1716
  imports.wbg.__wbg_wbindgenthrow_451ec1a8469d7eb6 = function (arg0, arg1) {
1605
1717
  throw new Error(getStringFromWasm0(arg0, arg1));
1606
1718
  };
1607
- imports.wbg.__wbg_workertermination_new = function (arg0) {
1608
- const ret = WorkerTermination.__wrap(arg0);
1719
+ imports.wbg.__wbg_webworkercreation_new = function (arg0) {
1720
+ const ret = WebWorkerCreation.__wrap(arg0);
1721
+ return addHeapObject(ret);
1722
+ };
1723
+ imports.wbg.__wbg_webworkertermination_new = function (arg0) {
1724
+ const ret = WebWorkerTermination.__wrap(arg0);
1609
1725
  return addHeapObject(ret);
1610
1726
  };
1611
1727
  imports.wbg.__wbg_write_9ac6a5f58a8c835c = function () {
@@ -1620,9 +1736,14 @@ function __wbg_get_imports() {
1620
1736
  return ret;
1621
1737
  }, arguments);
1622
1738
  };
1623
- imports.wbg.__wbindgen_cast_12af9e1632226a2a = function (arg0, arg1) {
1624
- // Cast intrinsic for `Closure(Closure { dtor_idx: 8603, function: Function { arguments: [Ref(NamedExternref("MessageEvent"))], shim_idx: 8626, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1625
- const ret = makeMutClosure(arg0, arg1, 8603, __wbg_adapter_13);
1739
+ imports.wbg.__wbindgen_cast_0336f6e3114862a9 = function (arg0, arg1) {
1740
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 8677, function: Function { arguments: [], shim_idx: 1993, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1741
+ const ret = makeMutClosure(arg0, arg1, 8677, __wbg_adapter_9);
1742
+ return addHeapObject(ret);
1743
+ };
1744
+ imports.wbg.__wbindgen_cast_1fa25394258c7b5c = function (arg0, arg1) {
1745
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 1992, function: Function { arguments: [], shim_idx: 1993, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1746
+ const ret = makeMutClosure(arg0, arg1, 1992, __wbg_adapter_9);
1626
1747
  return addHeapObject(ret);
1627
1748
  };
1628
1749
  imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function (arg0, arg1) {
@@ -1630,14 +1751,9 @@ function __wbg_get_imports() {
1630
1751
  const ret = getStringFromWasm0(arg0, arg1);
1631
1752
  return addHeapObject(ret);
1632
1753
  };
1633
- imports.wbg.__wbindgen_cast_26f8fe7fb5e9a165 = function (arg0, arg1) {
1634
- // Cast intrinsic for `Closure(Closure { dtor_idx: 8621, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 8622, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1635
- const ret = makeMutClosure(arg0, arg1, 8621, __wbg_adapter_19);
1636
- return addHeapObject(ret);
1637
- };
1638
- imports.wbg.__wbindgen_cast_341c6edfb226ca8c = function (arg0, arg1) {
1639
- // Cast intrinsic for `Closure(Closure { dtor_idx: 8621, function: Function { arguments: [Externref], shim_idx: 8622, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1640
- const ret = makeMutClosure(arg0, arg1, 8621, __wbg_adapter_19);
1754
+ imports.wbg.__wbindgen_cast_267b46f6d4f9531c = function (arg0, arg1) {
1755
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 8677, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 8678, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1756
+ const ret = makeMutClosure(arg0, arg1, 8677, __wbg_adapter_4);
1641
1757
  return addHeapObject(ret);
1642
1758
  };
1643
1759
  imports.wbg.__wbindgen_cast_4625c577ab2ec9ee = function (arg0) {
@@ -1645,14 +1761,9 @@ function __wbg_get_imports() {
1645
1761
  const ret = BigInt.asUintN(64, arg0);
1646
1762
  return addHeapObject(ret);
1647
1763
  };
1648
- imports.wbg.__wbindgen_cast_4c807b347a3d0cbf = function (arg0, arg1) {
1649
- // Cast intrinsic for `Closure(Closure { dtor_idx: 599, function: Function { arguments: [], shim_idx: 600, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1650
- const ret = makeMutClosure(arg0, arg1, 599, __wbg_adapter_16);
1651
- return addHeapObject(ret);
1652
- };
1653
- imports.wbg.__wbindgen_cast_60ddcd55e3b8f21d = function (arg0, arg1) {
1654
- // Cast intrinsic for `Closure(Closure { dtor_idx: 8621, function: Function { arguments: [], shim_idx: 600, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1655
- const ret = makeMutClosure(arg0, arg1, 8621, __wbg_adapter_16);
1764
+ imports.wbg.__wbindgen_cast_71a8823e0cdbb969 = function (arg0, arg1) {
1765
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 8677, function: Function { arguments: [Externref], shim_idx: 8678, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1766
+ const ret = makeMutClosure(arg0, arg1, 8677, __wbg_adapter_4);
1656
1767
  return addHeapObject(ret);
1657
1768
  };
1658
1769
  imports.wbg.__wbindgen_cast_76322aab70622876 = function (arg0, arg1) {
@@ -1669,21 +1780,26 @@ function __wbg_get_imports() {
1669
1780
  const ret = v0;
1670
1781
  return addHeapObject(ret);
1671
1782
  };
1672
- imports.wbg.__wbindgen_cast_7d864cd0d8fe5a0e = function (arg0, arg1) {
1673
- // Cast intrinsic for `Closure(Closure { dtor_idx: 8603, function: Function { arguments: [NamedExternref("Array<any>")], shim_idx: 8604, ret: Unit, inner_ret: Some(Unit) }, mutable: false }) -> Externref`.
1674
- const ret = makeClosure(arg0, arg1, 8603, __wbg_adapter_6);
1675
- return addHeapObject(ret);
1676
- };
1677
1783
  imports.wbg.__wbindgen_cast_9ae0607507abb057 = function (arg0) {
1678
1784
  // Cast intrinsic for `I64 -> Externref`.
1679
1785
  const ret = arg0;
1680
1786
  return addHeapObject(ret);
1681
1787
  };
1788
+ imports.wbg.__wbindgen_cast_b7dc63dcdfc8d728 = function (arg0, arg1) {
1789
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 8682, function: Function { arguments: [Ref(NamedExternref("MessageEvent"))], shim_idx: 8683, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1790
+ const ret = makeMutClosure(arg0, arg1, 8682, __wbg_adapter_18);
1791
+ return addHeapObject(ret);
1792
+ };
1682
1793
  imports.wbg.__wbindgen_cast_d6cd19b81560fd6e = function (arg0) {
1683
1794
  // Cast intrinsic for `F64 -> Externref`.
1684
1795
  const ret = arg0;
1685
1796
  return addHeapObject(ret);
1686
1797
  };
1798
+ imports.wbg.__wbindgen_cast_ffa04fbd359d627f = function (arg0, arg1) {
1799
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 8661, function: Function { arguments: [NamedExternref("Array<any>")], shim_idx: 8662, ret: Unit, inner_ret: Some(Unit) }, mutable: false }) -> Externref`.
1800
+ const ret = makeClosure(arg0, arg1, 8661, __wbg_adapter_27);
1801
+ return addHeapObject(ret);
1802
+ };
1687
1803
  imports.wbg.__wbindgen_link_dd5153a359f2e504 = function (arg0) {
1688
1804
  const val = `onmessage = function (ev) {
1689
1805
  let [ia, index, value] = ev.data;
@@ -1708,7 +1824,7 @@ function __wbg_get_imports() {
1708
1824
  return imports;
1709
1825
  }
1710
1826
  function __wbg_init_memory(imports, memory) {
1711
- imports.wbg.memory = memory || new WebAssembly.Memory({ initial: 130, maximum: 16384, shared: true });
1827
+ imports.wbg.memory = memory || new WebAssembly.Memory({ initial: 130, maximum: 65536, shared: true });
1712
1828
  }
1713
1829
  function __wbg_finalize_init(instance, module, thread_stack_size) {
1714
1830
  wasm = instance.exports;