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

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
@@ -1,23 +1,30 @@
1
1
  let wasm;
2
- const heap = new Array(128).fill(undefined);
3
- heap.push(undefined, null, true, false);
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
- ;
10
2
  let cachedUint8ArrayMemory0 = null;
11
3
  function getUint8ArrayMemory0() {
12
- if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
4
+ if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.buffer !== wasm.memory.buffer) {
13
5
  cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
14
6
  }
15
7
  return cachedUint8ArrayMemory0;
16
8
  }
9
+ let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
10
+ cachedTextDecoder.decode();
11
+ const MAX_SAFARI_DECODE_BYTES = 2146435072;
12
+ let numBytesDecoded = 0;
13
+ function decodeText(ptr, len) {
14
+ numBytesDecoded += len;
15
+ if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
16
+ cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
17
+ cachedTextDecoder.decode();
18
+ numBytesDecoded = len;
19
+ }
20
+ return cachedTextDecoder.decode(getUint8ArrayMemory0().slice(ptr, ptr + len));
21
+ }
17
22
  function getStringFromWasm0(ptr, len) {
18
23
  ptr = ptr >>> 0;
19
- return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
24
+ return decodeText(ptr, len);
20
25
  }
26
+ let heap = new Array(128).fill(undefined);
27
+ heap.push(undefined, null, true, false);
21
28
  let heap_next = heap.length;
22
29
  function addHeapObject(obj) {
23
30
  if (heap_next === heap.length)
@@ -27,43 +34,17 @@ function addHeapObject(obj) {
27
34
  heap[idx] = obj;
28
35
  return idx;
29
36
  }
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
- }
37
+ function getObject(idx) { return heap[idx]; }
53
38
  let WASM_VECTOR_LEN = 0;
54
- 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
- });
39
+ const cachedTextEncoder = new TextEncoder();
40
+ cachedTextEncoder.encodeInto = function (arg, view) {
41
+ const buf = cachedTextEncoder.encode(arg);
42
+ view.set(buf);
43
+ return {
44
+ read: arg.length,
45
+ written: buf.length
46
+ };
47
+ };
67
48
  function passStringToWasm0(arg, malloc, realloc) {
68
49
  if (realloc === undefined) {
69
50
  const buf = cachedTextEncoder.encode(arg);
@@ -88,7 +69,7 @@ function passStringToWasm0(arg, malloc, realloc) {
88
69
  }
89
70
  ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
90
71
  const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
91
- const ret = encodeString(arg, view);
72
+ const ret = cachedTextEncoder.encodeInto(arg, view);
92
73
  offset += ret.written;
93
74
  ptr = realloc(ptr, len, offset, 1) >>> 0;
94
75
  }
@@ -97,45 +78,37 @@ function passStringToWasm0(arg, malloc, realloc) {
97
78
  }
98
79
  let cachedDataViewMemory0 = null;
99
80
  function getDataViewMemory0() {
100
- if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
81
+ if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer !== wasm.memory.buffer) {
101
82
  cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
102
83
  }
103
84
  return cachedDataViewMemory0;
104
85
  }
86
+ function handleError(f, args) {
87
+ try {
88
+ return f.apply(this, args);
89
+ }
90
+ catch (e) {
91
+ wasm.__wbindgen_export_3(addHeapObject(e));
92
+ }
93
+ }
94
+ function dropObject(idx) {
95
+ if (idx < 132)
96
+ return;
97
+ heap[idx] = heap_next;
98
+ heap_next = idx;
99
+ }
100
+ function takeObject(idx) {
101
+ const ret = getObject(idx);
102
+ dropObject(idx);
103
+ return ret;
104
+ }
105
+ function getArrayU8FromWasm0(ptr, len) {
106
+ ptr = ptr >>> 0;
107
+ return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
108
+ }
105
109
  function isLikeNone(x) {
106
110
  return x === undefined || x === null;
107
111
  }
108
- const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
109
- ? { register: () => { }, unregister: () => { } }
110
- : new FinalizationRegistry(state => {
111
- wasm.__wbindgen_export_3.get(state.dtor)(state.a, state.b);
112
- });
113
- function makeMutClosure(arg0, arg1, dtor, f) {
114
- const state = { a: arg0, b: arg1, cnt: 1, dtor };
115
- const real = (...args) => {
116
- // First up with a closure we increment the internal reference
117
- // count. This ensures that the Rust closure environment won't
118
- // be deallocated while we're invoking it.
119
- state.cnt++;
120
- const a = state.a;
121
- state.a = 0;
122
- try {
123
- return f(a, state.b, ...args);
124
- }
125
- finally {
126
- if (--state.cnt === 0) {
127
- wasm.__wbindgen_export_3.get(state.dtor)(a, state.b);
128
- CLOSURE_DTORS.unregister(state);
129
- }
130
- else {
131
- state.a = a;
132
- }
133
- }
134
- };
135
- real.original = state;
136
- CLOSURE_DTORS.register(real, state, state);
137
- return real;
138
- }
139
112
  function debugString(val) {
140
113
  // primitive types
141
114
  const type = typeof val;
@@ -204,37 +177,118 @@ function debugString(val) {
204
177
  // TODO we could test for more things here, like `Set`s and `Map`s.
205
178
  return className;
206
179
  }
207
- function _assertClass(instance, klass) {
208
- if (!(instance instanceof klass)) {
209
- throw new Error(`expected instance of ${klass.name}`);
180
+ const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
181
+ ? { register: () => { }, unregister: () => { } }
182
+ : new FinalizationRegistry(state => {
183
+ wasm.__wbindgen_export_5.get(state.dtor)(state.a, state.b);
184
+ });
185
+ function makeMutClosure(arg0, arg1, dtor, f) {
186
+ const state = { a: arg0, b: arg1, cnt: 1, dtor };
187
+ const real = (...args) => {
188
+ // First up with a closure we increment the internal reference
189
+ // count. This ensures that the Rust closure environment won't
190
+ // be deallocated while we're invoking it.
191
+ state.cnt++;
192
+ const a = state.a;
193
+ state.a = 0;
194
+ try {
195
+ return f(a, state.b, ...args);
196
+ }
197
+ finally {
198
+ if (--state.cnt === 0) {
199
+ wasm.__wbindgen_export_5.get(state.dtor)(a, state.b);
200
+ CLOSURE_DTORS.unregister(state);
201
+ }
202
+ else {
203
+ state.a = a;
204
+ }
205
+ }
206
+ };
207
+ real.original = state;
208
+ CLOSURE_DTORS.register(real, state, state);
209
+ return real;
210
+ }
211
+ function getArrayJsValueFromWasm0(ptr, len) {
212
+ ptr = ptr >>> 0;
213
+ const mem = getDataViewMemory0();
214
+ const result = [];
215
+ for (let i = ptr; i < ptr + 4 * len; i += 4) {
216
+ result.push(takeObject(mem.getUint32(i, true)));
210
217
  }
218
+ return result;
211
219
  }
212
- /**
213
- * @param {PartialProjectOptions} partial_options
214
- * @returns {Promise<void>}
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);
220
+ function makeClosure(arg0, arg1, dtor, f) {
221
+ const state = { a: arg0, b: arg1, cnt: 1, dtor };
222
+ const real = (...args) => {
223
+ // First up with a closure we increment the internal reference
224
+ // count. This ensures that the Rust closure environment won't
225
+ // be deallocated while we're invoking it.
226
+ state.cnt++;
227
+ try {
228
+ return f(state.a, state.b, ...args);
229
+ }
230
+ finally {
231
+ if (--state.cnt === 0) {
232
+ wasm.__wbindgen_export_5.get(state.dtor)(state.a, state.b);
233
+ state.a = 0;
234
+ CLOSURE_DTORS.unregister(state);
235
+ }
236
+ }
237
+ };
238
+ real.original = state;
239
+ CLOSURE_DTORS.register(real, state, state);
240
+ return real;
221
241
  }
222
242
  export function init_pack() {
223
243
  wasm.init_pack();
224
244
  }
225
- function __wbg_adapter_28(arg0, arg1) {
226
- wasm.__wbindgen_export_5(arg0, arg1);
245
+ function passArray8ToWasm0(arg, malloc) {
246
+ const ptr = malloc(arg.length * 1, 1) >>> 0;
247
+ getUint8ArrayMemory0().set(arg, ptr / 1);
248
+ WASM_VECTOR_LEN = arg.length;
249
+ return ptr;
250
+ }
251
+ /**
252
+ * Entry point for web workers
253
+ * @param {number} ptr
254
+ */
255
+ export function wasm_thread_entry_point(ptr) {
256
+ wasm.wasm_thread_entry_point(ptr);
227
257
  }
228
- function __wbg_adapter_31(arg0, arg1, arg2) {
258
+ function __wbg_adapter_4(arg0, arg1, arg2) {
229
259
  wasm.__wbindgen_export_6(arg0, arg1, addHeapObject(arg2));
230
260
  }
231
- function __wbg_adapter_68(arg0, arg1, arg2, arg3) {
232
- wasm.__wbindgen_export_7(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
261
+ function __wbg_adapter_7(arg0, arg1, arg2) {
262
+ wasm.__wbindgen_export_7(arg0, arg1, addHeapObject(arg2));
263
+ }
264
+ let stack_pointer = 128;
265
+ function addBorrowedObject(obj) {
266
+ if (stack_pointer == 1)
267
+ throw new Error('out of js stack');
268
+ heap[--stack_pointer] = obj;
269
+ return stack_pointer;
270
+ }
271
+ function __wbg_adapter_18(arg0, arg1, arg2) {
272
+ try {
273
+ wasm.__wbindgen_export_8(arg0, arg1, addBorrowedObject(arg2));
274
+ }
275
+ finally {
276
+ heap[stack_pointer++] = undefined;
277
+ }
278
+ }
279
+ function __wbg_adapter_25(arg0, arg1) {
280
+ wasm.__wbindgen_export_9(arg0, arg1);
281
+ }
282
+ function __wbg_adapter_92(arg0, arg1, arg2, arg3) {
283
+ wasm.__wbindgen_export_10(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
233
284
  }
234
285
  const __wbindgen_enum_DirEntryType = ["file", "directory"];
286
+ const __wbindgen_enum_FileSystemChangeRecordType = ["appeared", "disappeared", "errored", "modified", "moved", "unknown"];
235
287
  const __wbindgen_enum_FileSystemHandleKind = ["file", "directory"];
288
+ const __wbindgen_enum_RequestCache = ["default", "no-store", "reload", "no-cache", "force-cache", "only-if-cached"];
236
289
  const __wbindgen_enum_RequestCredentials = ["omit", "same-origin", "include"];
237
290
  const __wbindgen_enum_RequestMode = ["same-origin", "no-cors", "cors", "navigate"];
291
+ const __wbindgen_enum_WorkerType = ["classic", "module"];
238
292
  const CreateSyncAccessHandleOptionsFinalization = (typeof FinalizationRegistry === 'undefined')
239
293
  ? { register: () => { }, unregister: () => { } }
240
294
  : new FinalizationRegistry(ptr => wasm.__wbg_createsyncaccesshandleoptions_free(ptr >>> 0, 1));
@@ -257,12 +311,11 @@ export class CreateSyncAccessHandleOptions {
257
311
  wasm.__wbg_createsyncaccesshandleoptions_free(ptr, 0);
258
312
  }
259
313
  }
314
+ if (Symbol.dispose)
315
+ CreateSyncAccessHandleOptions.prototype[Symbol.dispose] = CreateSyncAccessHandleOptions.prototype.free;
260
316
  const DirEntryFinalization = (typeof FinalizationRegistry === 'undefined')
261
317
  ? { register: () => { }, unregister: () => { } }
262
318
  : new FinalizationRegistry(ptr => wasm.__wbg_direntry_free(ptr >>> 0, 1));
263
- /**
264
- * Directory entry with name and type information
265
- */
266
319
  export class DirEntry {
267
320
  static __wrap(ptr) {
268
321
  ptr = ptr >>> 0;
@@ -332,77 +385,38 @@ export class DirEntry {
332
385
  wasm.__wbg_set_direntry_type(this.__wbg_ptr, (__wbindgen_enum_DirEntryType.indexOf(arg0) + 1 || 3) - 1);
333
386
  }
334
387
  }
335
- const PartialProjectOptionsFinalization = (typeof FinalizationRegistry === 'undefined')
388
+ if (Symbol.dispose)
389
+ DirEntry.prototype[Symbol.dispose] = DirEntry.prototype.free;
390
+ const MetadataFinalization = (typeof FinalizationRegistry === 'undefined')
336
391
  ? { register: () => { }, unregister: () => { } }
337
- : new FinalizationRegistry(ptr => wasm.__wbg_partialprojectoptions_free(ptr >>> 0, 1));
338
- export class PartialProjectOptions {
392
+ : new FinalizationRegistry(ptr => wasm.__wbg_metadata_free(ptr >>> 0, 1));
393
+ export class Metadata {
394
+ static __wrap(ptr) {
395
+ ptr = ptr >>> 0;
396
+ const obj = Object.create(Metadata.prototype);
397
+ obj.__wbg_ptr = ptr;
398
+ MetadataFinalization.register(obj, obj.__wbg_ptr, obj);
399
+ return obj;
400
+ }
401
+ toJSON() {
402
+ return {};
403
+ }
404
+ toString() {
405
+ return JSON.stringify(this);
406
+ }
339
407
  __destroy_into_raw() {
340
408
  const ptr = this.__wbg_ptr;
341
409
  this.__wbg_ptr = 0;
342
- PartialProjectOptionsFinalization.unregister(this);
410
+ MetadataFinalization.unregister(this);
343
411
  return ptr;
344
412
  }
345
413
  free() {
346
414
  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);
415
+ wasm.__wbg_metadata_free(ptr, 0);
404
416
  }
405
417
  }
418
+ if (Symbol.dispose)
419
+ Metadata.prototype[Symbol.dispose] = Metadata.prototype.free;
406
420
  const ProjectFinalization = (typeof FinalizationRegistry === 'undefined')
407
421
  ? { register: () => { }, unregister: () => { } }
408
422
  : new FinalizationRegistry(ptr => wasm.__wbg_project_free(ptr >>> 0, 1));
@@ -418,15 +432,68 @@ export class Project {
418
432
  wasm.__wbg_project_free(ptr, 0);
419
433
  }
420
434
  /**
421
- * @param {string} cwd
435
+ * @param {string} path
436
+ * @returns {Promise<void>}
422
437
  */
423
- constructor(cwd) {
424
- const ptr0 = passStringToWasm0(cwd, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
438
+ createDir(path) {
439
+ const ptr0 = passStringToWasm0(path, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
425
440
  const len0 = WASM_VECTOR_LEN;
426
- const ret = wasm.project_new(ptr0, len0);
427
- this.__wbg_ptr = ret >>> 0;
428
- ProjectFinalization.register(this, this.__wbg_ptr, this);
429
- return this;
441
+ const ret = wasm.project_createDir(this.__wbg_ptr, ptr0, len0);
442
+ return takeObject(ret);
443
+ }
444
+ /**
445
+ * @param {string} path
446
+ * @param {boolean} recursive
447
+ * @returns {Promise<void>}
448
+ */
449
+ removeDir(path, recursive) {
450
+ const ptr0 = passStringToWasm0(path, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
451
+ const len0 = WASM_VECTOR_LEN;
452
+ const ret = wasm.project_removeDir(this.__wbg_ptr, ptr0, len0, recursive);
453
+ return takeObject(ret);
454
+ }
455
+ /**
456
+ * @param {string} path
457
+ * @returns {Promise<void>}
458
+ */
459
+ removeFile(path) {
460
+ const ptr0 = passStringToWasm0(path, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
461
+ const len0 = WASM_VECTOR_LEN;
462
+ const ret = wasm.project_removeFile(this.__wbg_ptr, ptr0, len0);
463
+ return takeObject(ret);
464
+ }
465
+ /**
466
+ * @param {string} path
467
+ * @param {string} content
468
+ * @returns {Promise<void>}
469
+ */
470
+ writeString(path, content) {
471
+ const ptr0 = passStringToWasm0(path, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
472
+ const len0 = WASM_VECTOR_LEN;
473
+ const ptr1 = passStringToWasm0(content, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
474
+ const len1 = WASM_VECTOR_LEN;
475
+ const ret = wasm.project_writeString(this.__wbg_ptr, ptr0, len0, ptr1, len1);
476
+ return takeObject(ret);
477
+ }
478
+ /**
479
+ * @param {string} path
480
+ * @returns {Promise<void>}
481
+ */
482
+ createDirAll(path) {
483
+ const ptr0 = passStringToWasm0(path, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
484
+ const len0 = WASM_VECTOR_LEN;
485
+ const ret = wasm.project_createDirAll(this.__wbg_ptr, ptr0, len0);
486
+ return takeObject(ret);
487
+ }
488
+ /**
489
+ * @param {string} path
490
+ * @returns {Promise<string>}
491
+ */
492
+ readToString(path) {
493
+ const ptr0 = passStringToWasm0(path, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
494
+ const len0 = WASM_VECTOR_LEN;
495
+ const ret = wasm.project_readToString(this.__wbg_ptr, ptr0, len0);
496
+ return takeObject(ret);
430
497
  }
431
498
  /**
432
499
  * @returns {string}
@@ -449,73 +516,77 @@ export class Project {
449
516
  }
450
517
  }
451
518
  /**
452
- * @param {string} package_lock
453
- * @returns {Promise<void>}
519
+ * @param {string} cwd
520
+ * @param {string} thread_url
454
521
  */
455
- install(package_lock) {
456
- const ptr0 = passStringToWasm0(package_lock, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
522
+ constructor(cwd, thread_url) {
523
+ const ptr0 = passStringToWasm0(cwd, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
457
524
  const len0 = WASM_VECTOR_LEN;
458
- const ret = wasm.project_install(this.__wbg_ptr, ptr0, len0);
459
- return takeObject(ret);
525
+ const ptr1 = passStringToWasm0(thread_url, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
526
+ const len1 = WASM_VECTOR_LEN;
527
+ const ret = wasm.project_new(ptr0, len0, ptr1, len1);
528
+ this.__wbg_ptr = ret >>> 0;
529
+ ProjectFinalization.register(this, this.__wbg_ptr, this);
530
+ return this;
460
531
  }
461
532
  /**
462
- * @returns {Promise<void>}
533
+ * @param {string} path
534
+ * @returns {Promise<Uint8Array>}
463
535
  */
464
- build() {
465
- const ret = wasm.project_build(this.__wbg_ptr);
536
+ read(path) {
537
+ const ptr0 = passStringToWasm0(path, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
538
+ const len0 = WASM_VECTOR_LEN;
539
+ const ret = wasm.project_read(this.__wbg_ptr, ptr0, len0);
466
540
  return takeObject(ret);
467
541
  }
468
542
  /**
469
- * @param {string} path
470
- * @returns {Promise<string>}
543
+ * @returns {Promise<any>}
471
544
  */
472
- readFile(path) {
473
- const ptr0 = passStringToWasm0(path, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
474
- const len0 = WASM_VECTOR_LEN;
475
- const ret = wasm.project_readFile(this.__wbg_ptr, ptr0, len0);
545
+ build() {
546
+ const ret = wasm.project_build(this.__wbg_ptr);
476
547
  return takeObject(ret);
477
548
  }
478
549
  /**
479
550
  * @param {string} path
480
- * @param {string} content
551
+ * @param {Uint8Array} content
481
552
  * @returns {Promise<void>}
482
553
  */
483
- writeFile(path, content) {
554
+ write(path, content) {
484
555
  const ptr0 = passStringToWasm0(path, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
485
556
  const len0 = WASM_VECTOR_LEN;
486
- const ptr1 = passStringToWasm0(content, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
557
+ const ptr1 = passArray8ToWasm0(content, wasm.__wbindgen_export_1);
487
558
  const len1 = WASM_VECTOR_LEN;
488
- const ret = wasm.project_writeFile(this.__wbg_ptr, ptr0, len0, ptr1, len1);
559
+ const ret = wasm.project_write(this.__wbg_ptr, ptr0, len0, ptr1, len1);
489
560
  return takeObject(ret);
490
561
  }
491
562
  /**
492
- * @param {string} path
493
- * @returns {Promise<DirEntry[]>}
563
+ * @param {string} package_lock
564
+ * @returns {Promise<void>}
494
565
  */
495
- readDir(path) {
496
- const ptr0 = passStringToWasm0(path, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
566
+ install(package_lock) {
567
+ const ptr0 = passStringToWasm0(package_lock, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
497
568
  const len0 = WASM_VECTOR_LEN;
498
- const ret = wasm.project_readDir(this.__wbg_ptr, ptr0, len0);
569
+ const ret = wasm.project_install(this.__wbg_ptr, ptr0, len0);
499
570
  return takeObject(ret);
500
571
  }
501
572
  /**
502
573
  * @param {string} path
503
- * @returns {Promise<void>}
574
+ * @returns {Promise<Metadata>}
504
575
  */
505
- createDir(path) {
576
+ metadata(path) {
506
577
  const ptr0 = passStringToWasm0(path, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
507
578
  const len0 = WASM_VECTOR_LEN;
508
- const ret = wasm.project_createDir(this.__wbg_ptr, ptr0, len0);
579
+ const ret = wasm.project_metadata(this.__wbg_ptr, ptr0, len0);
509
580
  return takeObject(ret);
510
581
  }
511
582
  /**
512
583
  * @param {string} path
513
- * @returns {Promise<void>}
584
+ * @returns {Promise<DirEntry[]>}
514
585
  */
515
- createDirAll(path) {
586
+ readDir(path) {
516
587
  const ptr0 = passStringToWasm0(path, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
517
588
  const len0 = WASM_VECTOR_LEN;
518
- const ret = wasm.project_createDirAll(this.__wbg_ptr, ptr0, len0);
589
+ const ret = wasm.project_readDir(this.__wbg_ptr, ptr0, len0);
519
590
  return takeObject(ret);
520
591
  }
521
592
  /**
@@ -532,6 +603,9 @@ export class Project {
532
603
  return takeObject(ret);
533
604
  }
534
605
  }
606
+ if (Symbol.dispose)
607
+ Project.prototype[Symbol.dispose] = Project.prototype.free;
608
+ const EXPECTED_RESPONSE_TYPES = new Set(['basic', 'cors', 'default']);
535
609
  async function __wbg_load(module, imports) {
536
610
  if (typeof Response === 'function' && module instanceof Response) {
537
611
  if (typeof WebAssembly.instantiateStreaming === 'function') {
@@ -539,7 +613,8 @@ async function __wbg_load(module, imports) {
539
613
  return await WebAssembly.instantiateStreaming(module, imports);
540
614
  }
541
615
  catch (e) {
542
- if (module.headers.get('Content-Type') != 'application/wasm') {
616
+ const validResponse = module.ok && EXPECTED_RESPONSE_TYPES.has(module.type);
617
+ if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
543
618
  console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e);
544
619
  }
545
620
  else {
@@ -563,118 +638,197 @@ async function __wbg_load(module, imports) {
563
638
  function __wbg_get_imports() {
564
639
  const imports = {};
565
640
  imports.wbg = {};
566
- imports.wbg.__wbg_abort_410ec47a64ac6117 = function (arg0, arg1) {
567
- getObject(arg0).abort(getObject(arg1));
641
+ imports.wbg.__wbg_Error_e17e777aac105295 = function (arg0, arg1) {
642
+ const ret = Error(getStringFromWasm0(arg0, arg1));
643
+ return addHeapObject(ret);
644
+ };
645
+ imports.wbg.__wbg_String_8f0eb39a4a4c2f66 = function (arg0, arg1) {
646
+ const ret = String(getObject(arg1));
647
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
648
+ const len1 = WASM_VECTOR_LEN;
649
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
650
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
568
651
  };
569
- imports.wbg.__wbg_abort_775ef1d17fc65868 = function (arg0) {
652
+ imports.wbg.__wbg_abort_67e1b49bf6614565 = function (arg0) {
570
653
  getObject(arg0).abort();
571
654
  };
572
- imports.wbg.__wbg_append_8c7dd8d641a5f01b = function () {
655
+ imports.wbg.__wbg_abort_d830bf2e9aa6ec5b = function (arg0, arg1) {
656
+ getObject(arg0).abort(getObject(arg1));
657
+ };
658
+ imports.wbg.__wbg_append_72a3c0addd2bce38 = function () {
573
659
  return handleError(function (arg0, arg1, arg2, arg3, arg4) {
574
660
  getObject(arg0).append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
575
661
  }, arguments);
576
662
  };
577
- imports.wbg.__wbg_arrayBuffer_d1b44c4390db422f = function () {
663
+ imports.wbg.__wbg_arrayBuffer_9c99b8e2809e8cbb = function () {
578
664
  return handleError(function (arg0) {
579
665
  const ret = getObject(arg0).arrayBuffer();
580
666
  return addHeapObject(ret);
581
667
  }, arguments);
582
668
  };
583
- imports.wbg.__wbg_buffer_609cc3eee51ed158 = function (arg0) {
669
+ imports.wbg.__wbg_async_d65ec5b7c88f9d4a = function (arg0) {
670
+ const ret = getObject(arg0).async;
671
+ return ret;
672
+ };
673
+ imports.wbg.__wbg_buffer_40c0928cc927f62a = function (arg0) {
584
674
  const ret = getObject(arg0).buffer;
585
675
  return addHeapObject(ret);
586
676
  };
587
- imports.wbg.__wbg_call_672a4d21634d4a24 = function () {
677
+ imports.wbg.__wbg_call_13410aac570ffff7 = function () {
588
678
  return handleError(function (arg0, arg1) {
589
679
  const ret = getObject(arg0).call(getObject(arg1));
590
680
  return addHeapObject(ret);
591
681
  }, arguments);
592
682
  };
593
- imports.wbg.__wbg_call_7cccdd69e0791ae2 = function () {
683
+ imports.wbg.__wbg_call_a5400b25a865cfd8 = function () {
594
684
  return handleError(function (arg0, arg1, arg2) {
595
685
  const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
596
686
  return addHeapObject(ret);
597
687
  }, arguments);
598
688
  };
599
- imports.wbg.__wbg_clearTimeout_0b53d391c1b94dda = function (arg0) {
689
+ imports.wbg.__wbg_changedHandle_9c4d7f94c0b78c7d = function (arg0) {
690
+ const ret = getObject(arg0).changedHandle;
691
+ return addHeapObject(ret);
692
+ };
693
+ imports.wbg.__wbg_clearTimeout_6222fede17abcb1a = function (arg0) {
600
694
  const ret = clearTimeout(takeObject(arg0));
601
695
  return addHeapObject(ret);
602
696
  };
603
- imports.wbg.__wbg_close_a17af48266bd9942 = function (arg0) {
697
+ imports.wbg.__wbg_close_9870d6f25f3c1f31 = function (arg0) {
604
698
  getObject(arg0).close();
605
699
  };
700
+ imports.wbg.__wbg_createObjectURL_c80225986d2b928b = function () {
701
+ return handleError(function (arg0, arg1) {
702
+ const ret = URL.createObjectURL(getObject(arg1));
703
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
704
+ const len1 = WASM_VECTOR_LEN;
705
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
706
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
707
+ }, arguments);
708
+ };
606
709
  imports.wbg.__wbg_createsyncaccesshandleoptions_new = function (arg0) {
607
710
  const ret = CreateSyncAccessHandleOptions.__wrap(arg0);
608
711
  return addHeapObject(ret);
609
712
  };
713
+ imports.wbg.__wbg_data_9ab529722bcc4e6c = function (arg0) {
714
+ const ret = getObject(arg0).data;
715
+ return addHeapObject(ret);
716
+ };
717
+ imports.wbg.__wbg_debug_7f3000e7358ea482 = function (arg0, arg1, arg2, arg3) {
718
+ console.debug(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
719
+ };
720
+ imports.wbg.__wbg_debug_c906769d2f88c17b = function (arg0) {
721
+ console.debug(getObject(arg0));
722
+ };
610
723
  imports.wbg.__wbg_direntry_new = function (arg0) {
611
724
  const ret = DirEntry.__wrap(arg0);
612
725
  return addHeapObject(ret);
613
726
  };
614
- imports.wbg.__wbg_done_769e5ede4b31c67b = function (arg0) {
727
+ imports.wbg.__wbg_done_75ed0ee6dd243d9d = function (arg0) {
615
728
  const ret = getObject(arg0).done;
616
729
  return ret;
617
730
  };
618
- imports.wbg.__wbg_entries_19efe296f7d36df9 = function (arg0) {
731
+ imports.wbg.__wbg_entries_1a3c3b9544532397 = function (arg0) {
619
732
  const ret = getObject(arg0).entries();
620
733
  return addHeapObject(ret);
621
734
  };
622
- imports.wbg.__wbg_fetch_11bff8299d0ecd2b = function (arg0) {
623
- const ret = fetch(getObject(arg0));
624
- return addHeapObject(ret);
735
+ imports.wbg.__wbg_error_0889f151acea569e = function (arg0, arg1, arg2, arg3) {
736
+ console.error(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
737
+ };
738
+ imports.wbg.__wbg_error_7534b8e9a36f1ab4 = function (arg0, arg1) {
739
+ let deferred0_0;
740
+ let deferred0_1;
741
+ try {
742
+ deferred0_0 = arg0;
743
+ deferred0_1 = arg1;
744
+ console.error(getStringFromWasm0(arg0, arg1));
745
+ }
746
+ finally {
747
+ wasm.__wbindgen_export_4(deferred0_0, deferred0_1, 1);
748
+ }
625
749
  };
626
- imports.wbg.__wbg_fetch_509096533071c657 = function (arg0, arg1) {
750
+ imports.wbg.__wbg_error_99981e16d476aa5c = function (arg0) {
751
+ console.error(getObject(arg0));
752
+ };
753
+ imports.wbg.__wbg_eval_631dc78d65611b94 = function () {
754
+ return handleError(function (arg0, arg1) {
755
+ const ret = eval(getStringFromWasm0(arg0, arg1));
756
+ return addHeapObject(ret);
757
+ }, arguments);
758
+ };
759
+ imports.wbg.__wbg_fetch_87aed7f306ec6d63 = function (arg0, arg1) {
627
760
  const ret = getObject(arg0).fetch(getObject(arg1));
628
761
  return addHeapObject(ret);
629
762
  };
630
- imports.wbg.__wbg_from_2a5d3e218e67aa85 = function (arg0) {
763
+ imports.wbg.__wbg_fetch_f156d10be9a5c88a = function (arg0) {
764
+ const ret = fetch(getObject(arg0));
765
+ return addHeapObject(ret);
766
+ };
767
+ imports.wbg.__wbg_from_88bc52ce20ba6318 = function (arg0) {
631
768
  const ret = Array.from(getObject(arg0));
632
769
  return addHeapObject(ret);
633
770
  };
634
- imports.wbg.__wbg_getDirectoryHandle_c48a138373d79b3d = function (arg0, arg1, arg2, arg3) {
771
+ imports.wbg.__wbg_getDirectoryHandle_0fb26677897f1e21 = function (arg0, arg1, arg2, arg3) {
635
772
  const ret = getObject(arg0).getDirectoryHandle(getStringFromWasm0(arg1, arg2), getObject(arg3));
636
773
  return addHeapObject(ret);
637
774
  };
638
- imports.wbg.__wbg_getDirectory_c206b0540c9acc0f = function (arg0) {
775
+ imports.wbg.__wbg_getDirectory_8564f4b4ae7ee35c = function (arg0) {
639
776
  const ret = getObject(arg0).getDirectory();
640
777
  return addHeapObject(ret);
641
778
  };
642
- imports.wbg.__wbg_getFileHandle_5fb877d1ecc74d52 = function (arg0, arg1, arg2, arg3) {
779
+ imports.wbg.__wbg_getFileHandle_9f23d09c2497fa5f = function (arg0, arg1, arg2, arg3) {
643
780
  const ret = getObject(arg0).getFileHandle(getStringFromWasm0(arg1, arg2), getObject(arg3));
644
781
  return addHeapObject(ret);
645
782
  };
646
- imports.wbg.__wbg_getRandomValues_21a0191e74d0e1d3 = function () {
647
- return handleError(function (arg0, arg1) {
648
- globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
783
+ imports.wbg.__wbg_getRandomValues_80578b2ff2a093ba = function () {
784
+ return handleError(function (arg0) {
785
+ globalThis.crypto.getRandomValues(getObject(arg0));
649
786
  }, arguments);
650
787
  };
651
- imports.wbg.__wbg_getSize_e7dbd5ffa0b43df1 = function () {
788
+ imports.wbg.__wbg_getSize_56a06761973a6cd7 = function () {
652
789
  return handleError(function (arg0) {
653
790
  const ret = getObject(arg0).getSize();
654
791
  return ret;
655
792
  }, arguments);
656
793
  };
657
- imports.wbg.__wbg_get_67b2ba62fc30de12 = function () {
794
+ imports.wbg.__wbg_get_0da715ceaecea5c8 = function (arg0, arg1) {
795
+ const ret = getObject(arg0)[arg1 >>> 0];
796
+ return addHeapObject(ret);
797
+ };
798
+ imports.wbg.__wbg_get_458e874b43b18b25 = function () {
658
799
  return handleError(function (arg0, arg1) {
659
800
  const ret = Reflect.get(getObject(arg0), getObject(arg1));
660
801
  return addHeapObject(ret);
661
802
  }, arguments);
662
803
  };
663
- imports.wbg.__wbg_get_b9b93047fe3cf45b = function (arg0, arg1) {
664
- const ret = getObject(arg0)[arg1 >>> 0];
665
- return addHeapObject(ret);
666
- };
667
- imports.wbg.__wbg_has_a5ea9117f258a0ec = function () {
804
+ imports.wbg.__wbg_has_b89e451f638123e3 = function () {
668
805
  return handleError(function (arg0, arg1) {
669
806
  const ret = Reflect.has(getObject(arg0), getObject(arg1));
670
807
  return ret;
671
808
  }, arguments);
672
809
  };
673
- imports.wbg.__wbg_headers_9cb51cfd2ac780a4 = function (arg0) {
810
+ imports.wbg.__wbg_headers_29fec3c72865cd75 = function (arg0) {
674
811
  const ret = getObject(arg0).headers;
675
812
  return addHeapObject(ret);
676
813
  };
677
- imports.wbg.__wbg_instanceof_DomException_ed1ccb7aaf39034c = function (arg0) {
814
+ imports.wbg.__wbg_info_15c3631232fceddb = function (arg0, arg1, arg2, arg3) {
815
+ console.info(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
816
+ };
817
+ imports.wbg.__wbg_info_6cf68c1a86a92f6a = function (arg0) {
818
+ console.info(getObject(arg0));
819
+ };
820
+ imports.wbg.__wbg_instanceof_DedicatedWorkerGlobalScope_a054a9af652220ba = function (arg0) {
821
+ let result;
822
+ try {
823
+ result = getObject(arg0) instanceof DedicatedWorkerGlobalScope;
824
+ }
825
+ catch (_) {
826
+ result = false;
827
+ }
828
+ const ret = result;
829
+ return ret;
830
+ };
831
+ imports.wbg.__wbg_instanceof_DomException_bd63c2a0e0b53ed5 = function (arg0) {
678
832
  let result;
679
833
  try {
680
834
  result = getObject(arg0) instanceof DOMException;
@@ -685,7 +839,7 @@ function __wbg_get_imports() {
685
839
  const ret = result;
686
840
  return ret;
687
841
  };
688
- imports.wbg.__wbg_instanceof_FileSystemDirectoryHandle_0906fc139d75557b = function (arg0) {
842
+ imports.wbg.__wbg_instanceof_FileSystemDirectoryHandle_ef2de8bfd438118c = function (arg0) {
689
843
  let result;
690
844
  try {
691
845
  result = getObject(arg0) instanceof FileSystemDirectoryHandle;
@@ -696,7 +850,7 @@ function __wbg_get_imports() {
696
850
  const ret = result;
697
851
  return ret;
698
852
  };
699
- imports.wbg.__wbg_instanceof_Response_f2cc20d9f7dfd644 = function (arg0) {
853
+ imports.wbg.__wbg_instanceof_Response_50fde2cd696850bf = function (arg0) {
700
854
  let result;
701
855
  try {
702
856
  result = getObject(arg0) instanceof Response;
@@ -707,43 +861,64 @@ function __wbg_get_imports() {
707
861
  const ret = result;
708
862
  return ret;
709
863
  };
710
- imports.wbg.__wbg_iterator_9a24c88df860dc65 = function () {
864
+ imports.wbg.__wbg_iterator_f370b34483c71a1c = function () {
711
865
  const ret = Symbol.iterator;
712
866
  return addHeapObject(ret);
713
867
  };
714
- imports.wbg.__wbg_kind_e326a1c6387aad5e = function (arg0) {
868
+ imports.wbg.__wbg_kind_56b64eb6cc62543d = function (arg0) {
715
869
  const ret = getObject(arg0).kind;
716
870
  return (__wbindgen_enum_FileSystemHandleKind.indexOf(ret) + 1 || 3) - 1;
717
871
  };
718
- imports.wbg.__wbg_length_a446193dc22c12f8 = function (arg0) {
872
+ imports.wbg.__wbg_length_186546c51cd61acd = function (arg0) {
873
+ const ret = getObject(arg0).length;
874
+ return ret;
875
+ };
876
+ imports.wbg.__wbg_length_6bb7e81f9d7713e4 = function (arg0) {
719
877
  const ret = getObject(arg0).length;
720
878
  return ret;
721
879
  };
722
- imports.wbg.__wbg_name_f2d27098bfd843e7 = function (arg0, arg1) {
880
+ imports.wbg.__wbg_message_702ebc62fa8b0c7c = function (arg0, arg1) {
881
+ const ret = getObject(arg1).message;
882
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
883
+ const len1 = WASM_VECTOR_LEN;
884
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
885
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
886
+ };
887
+ imports.wbg.__wbg_metadata_new = function (arg0) {
888
+ const ret = Metadata.__wrap(arg0);
889
+ return addHeapObject(ret);
890
+ };
891
+ imports.wbg.__wbg_name_f75f535832c8ea6b = function (arg0, arg1) {
723
892
  const ret = getObject(arg1).name;
724
893
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
725
894
  const len1 = WASM_VECTOR_LEN;
726
895
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
727
896
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
728
897
  };
729
- imports.wbg.__wbg_navigator_0a9bf1120e24fec2 = function (arg0) {
898
+ imports.wbg.__wbg_navigator_bfaf1b0b0eb48da2 = function (arg0) {
730
899
  const ret = getObject(arg0).navigator;
731
900
  return addHeapObject(ret);
732
901
  };
733
- imports.wbg.__wbg_new_018dcc2d6c8c2f6a = function () {
734
- return handleError(function () {
735
- const ret = new Headers();
736
- return addHeapObject(ret);
737
- }, arguments);
902
+ imports.wbg.__wbg_new_19c25a3f2fa63a02 = function () {
903
+ const ret = new Object();
904
+ return addHeapObject(ret);
905
+ };
906
+ imports.wbg.__wbg_new_1f3a344cf3123716 = function () {
907
+ const ret = new Array();
908
+ return addHeapObject(ret);
909
+ };
910
+ imports.wbg.__wbg_new_2368e31ffa149431 = function (arg0) {
911
+ const ret = new Int32Array(getObject(arg0));
912
+ return addHeapObject(ret);
738
913
  };
739
- imports.wbg.__wbg_new_23a2665fac83c611 = function (arg0, arg1) {
914
+ imports.wbg.__wbg_new_2e3c58a15f39f5f9 = function (arg0, arg1) {
740
915
  try {
741
916
  var state0 = { a: arg0, b: arg1 };
742
917
  var cb0 = (arg0, arg1) => {
743
918
  const a = state0.a;
744
919
  state0.a = 0;
745
920
  try {
746
- return __wbg_adapter_68(a, state0.b, arg0, arg1);
921
+ return __wbg_adapter_92(a, state0.b, arg0, arg1);
747
922
  }
748
923
  finally {
749
924
  state0.a = a;
@@ -756,185 +931,343 @@ function __wbg_get_imports() {
756
931
  state0.a = state0.b = 0;
757
932
  }
758
933
  };
759
- imports.wbg.__wbg_new_405e22f390576ce2 = function () {
760
- const ret = new Object();
934
+ imports.wbg.__wbg_new_2ff1f68f3676ea53 = function () {
935
+ const ret = new Map();
761
936
  return addHeapObject(ret);
762
937
  };
763
- imports.wbg.__wbg_new_a12002a7f91c75be = function (arg0) {
938
+ imports.wbg.__wbg_new_3958f7343c57c948 = function (arg0) {
939
+ const ret = new FileSystemObserver(getObject(arg0));
940
+ return addHeapObject(ret);
941
+ };
942
+ imports.wbg.__wbg_new_638ebfaedbf32a5e = function (arg0) {
764
943
  const ret = new Uint8Array(getObject(arg0));
765
944
  return addHeapObject(ret);
766
945
  };
767
- imports.wbg.__wbg_new_e25e5aab09ff45db = function () {
946
+ imports.wbg.__wbg_new_66b9434b4e59b63e = function () {
768
947
  return handleError(function () {
769
948
  const ret = new AbortController();
770
949
  return addHeapObject(ret);
771
950
  }, arguments);
772
951
  };
773
- imports.wbg.__wbg_newnoargs_105ed471475aaf50 = function (arg0, arg1) {
952
+ imports.wbg.__wbg_new_8a6f238a6ece86ea = function () {
953
+ const ret = new Error();
954
+ return addHeapObject(ret);
955
+ };
956
+ imports.wbg.__wbg_new_9d476835fd376de6 = function () {
957
+ return handleError(function (arg0, arg1) {
958
+ const ret = new Worker(getStringFromWasm0(arg0, arg1));
959
+ return addHeapObject(ret);
960
+ }, arguments);
961
+ };
962
+ imports.wbg.__wbg_new_f6e53210afea8e45 = function () {
963
+ return handleError(function () {
964
+ const ret = new Headers();
965
+ return addHeapObject(ret);
966
+ }, arguments);
967
+ };
968
+ imports.wbg.__wbg_newfromslice_074c56947bd43469 = function (arg0, arg1) {
969
+ const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
970
+ return addHeapObject(ret);
971
+ };
972
+ imports.wbg.__wbg_newnoargs_254190557c45b4ec = function (arg0, arg1) {
774
973
  const ret = new Function(getStringFromWasm0(arg0, arg1));
775
974
  return addHeapObject(ret);
776
975
  };
777
- imports.wbg.__wbg_newwithbyteoffsetandlength_d97e637ebe145a9a = function (arg0, arg1, arg2) {
778
- const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
976
+ imports.wbg.__wbg_newwithlength_a167dcc7aaa3ba77 = function (arg0) {
977
+ const ret = new Uint8Array(arg0 >>> 0);
779
978
  return addHeapObject(ret);
780
979
  };
781
- imports.wbg.__wbg_newwithstrandinit_06c535e0a867c635 = function () {
980
+ imports.wbg.__wbg_newwithoptions_4fd7ce7655102e6f = function () {
981
+ return handleError(function (arg0, arg1, arg2) {
982
+ const ret = new Worker(getStringFromWasm0(arg0, arg1), getObject(arg2));
983
+ return addHeapObject(ret);
984
+ }, arguments);
985
+ };
986
+ imports.wbg.__wbg_newwithstrandinit_b5d168a29a3fd85f = function () {
782
987
  return handleError(function (arg0, arg1, arg2) {
783
988
  const ret = new Request(getStringFromWasm0(arg0, arg1), getObject(arg2));
784
989
  return addHeapObject(ret);
785
990
  }, arguments);
786
991
  };
787
- imports.wbg.__wbg_next_25feadfc0913fea9 = function (arg0) {
788
- const ret = getObject(arg0).next;
789
- return addHeapObject(ret);
992
+ imports.wbg.__wbg_newwithstrsequence_a1a92f1d042bca10 = function () {
993
+ return handleError(function (arg0) {
994
+ const ret = new Blob(getObject(arg0));
995
+ return addHeapObject(ret);
996
+ }, arguments);
790
997
  };
791
- imports.wbg.__wbg_next_6574e1a8a62d1055 = function () {
998
+ imports.wbg.__wbg_newwithstrsequenceandoptions_5b257525e688af7d = function () {
999
+ return handleError(function (arg0, arg1) {
1000
+ const ret = new Blob(getObject(arg0), getObject(arg1));
1001
+ return addHeapObject(ret);
1002
+ }, arguments);
1003
+ };
1004
+ imports.wbg.__wbg_next_1142e1658f75ec63 = function () {
792
1005
  return handleError(function (arg0) {
793
1006
  const ret = getObject(arg0).next();
794
1007
  return addHeapObject(ret);
795
1008
  }, arguments);
796
1009
  };
797
- imports.wbg.__wbg_next_c3ab0d59847b3b5c = function () {
1010
+ imports.wbg.__wbg_next_5b3530e612fde77d = function (arg0) {
1011
+ const ret = getObject(arg0).next;
1012
+ return addHeapObject(ret);
1013
+ };
1014
+ imports.wbg.__wbg_next_692e82279131b03c = function () {
798
1015
  return handleError(function (arg0) {
799
1016
  const ret = getObject(arg0).next();
800
1017
  return addHeapObject(ret);
801
1018
  }, arguments);
802
1019
  };
803
- imports.wbg.__wbg_queueMicrotask_97d92b4fcc8a61c5 = function (arg0) {
1020
+ imports.wbg.__wbg_now_0dc4920a47cf7280 = function (arg0) {
1021
+ const ret = getObject(arg0).now();
1022
+ return ret;
1023
+ };
1024
+ imports.wbg.__wbg_observe_23bf99c5799b428b = function (arg0, arg1, arg2) {
1025
+ const ret = getObject(arg0).observe(getObject(arg1), getObject(arg2));
1026
+ return addHeapObject(ret);
1027
+ };
1028
+ imports.wbg.__wbg_of_26ef42cc9a4270a1 = function (arg0, arg1, arg2) {
1029
+ const ret = Array.of(getObject(arg0), getObject(arg1), getObject(arg2));
1030
+ return addHeapObject(ret);
1031
+ };
1032
+ imports.wbg.__wbg_performance_6adc3b899e448a23 = function (arg0) {
1033
+ const ret = getObject(arg0).performance;
1034
+ return addHeapObject(ret);
1035
+ };
1036
+ imports.wbg.__wbg_postMessage_38909232d65f5870 = function () {
1037
+ return handleError(function (arg0, arg1) {
1038
+ getObject(arg0).postMessage(getObject(arg1));
1039
+ }, arguments);
1040
+ };
1041
+ imports.wbg.__wbg_postMessage_50e57097ede408b9 = function () {
1042
+ return handleError(function (arg0, arg1) {
1043
+ getObject(arg0).postMessage(getObject(arg1));
1044
+ }, arguments);
1045
+ };
1046
+ imports.wbg.__wbg_prototypesetcall_3d4a26c1ed734349 = function (arg0, arg1, arg2) {
1047
+ Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), getObject(arg2));
1048
+ };
1049
+ imports.wbg.__wbg_push_330b2eb93e4e1212 = function (arg0, arg1) {
1050
+ const ret = getObject(arg0).push(getObject(arg1));
1051
+ return ret;
1052
+ };
1053
+ imports.wbg.__wbg_queueMicrotask_25d0739ac89e8c88 = function (arg0) {
804
1054
  queueMicrotask(getObject(arg0));
805
1055
  };
806
- imports.wbg.__wbg_queueMicrotask_d3219def82552485 = function (arg0) {
1056
+ imports.wbg.__wbg_queueMicrotask_4488407636f5bf24 = function (arg0) {
807
1057
  const ret = getObject(arg0).queueMicrotask;
808
1058
  return addHeapObject(ret);
809
1059
  };
810
- imports.wbg.__wbg_read_f8fdd4b410209222 = function () {
1060
+ imports.wbg.__wbg_random_7ed63a0b38ee3b75 = function () {
1061
+ const ret = Math.random();
1062
+ return ret;
1063
+ };
1064
+ imports.wbg.__wbg_read_a43bb46027f02ee9 = function () {
811
1065
  return handleError(function (arg0, arg1, arg2, arg3) {
812
1066
  const ret = getObject(arg0).read(getArrayU8FromWasm0(arg1, arg2), getObject(arg3));
813
1067
  return ret;
814
1068
  }, arguments);
815
1069
  };
816
- imports.wbg.__wbg_removeEntry_a424e90dff229b19 = function (arg0, arg1, arg2, arg3) {
1070
+ imports.wbg.__wbg_read_c8c5b5e1fd6b9760 = function () {
1071
+ return handleError(function (arg0, arg1, arg2) {
1072
+ const ret = getObject(arg0).read(getArrayU8FromWasm0(arg1, arg2));
1073
+ return ret;
1074
+ }, arguments);
1075
+ };
1076
+ imports.wbg.__wbg_relativePathComponents_35d81f85c00300f2 = function (arg0) {
1077
+ const ret = getObject(arg0).relativePathComponents;
1078
+ return addHeapObject(ret);
1079
+ };
1080
+ imports.wbg.__wbg_removeEntry_beea80e74f68ed5b = function (arg0, arg1, arg2, arg3) {
817
1081
  const ret = getObject(arg0).removeEntry(getStringFromWasm0(arg1, arg2), getObject(arg3));
818
1082
  return addHeapObject(ret);
819
1083
  };
820
- imports.wbg.__wbg_resolve_4851785c9c5f573d = function (arg0) {
1084
+ imports.wbg.__wbg_resolve_4055c623acdd6a1b = function (arg0) {
821
1085
  const ret = Promise.resolve(getObject(arg0));
822
1086
  return addHeapObject(ret);
823
1087
  };
824
- imports.wbg.__wbg_setTimeout_73ce8df12de4f2f2 = function (arg0, arg1) {
1088
+ imports.wbg.__wbg_revokeObjectURL_651b859c81bf1af0 = function () {
1089
+ return handleError(function (arg0, arg1) {
1090
+ URL.revokeObjectURL(getStringFromWasm0(arg0, arg1));
1091
+ }, arguments);
1092
+ };
1093
+ imports.wbg.__wbg_setTimeout_2b339866a2aa3789 = function (arg0, arg1) {
825
1094
  const ret = setTimeout(getObject(arg0), arg1);
826
1095
  return addHeapObject(ret);
827
1096
  };
828
- imports.wbg.__wbg_set_65595bdd868b3009 = function (arg0, arg1, arg2) {
829
- getObject(arg0).set(getObject(arg1), arg2 >>> 0);
1097
+ imports.wbg.__wbg_setTimeout_63008613644b07af = function () {
1098
+ return handleError(function (arg0, arg1, arg2) {
1099
+ const ret = getObject(arg0).setTimeout(getObject(arg1), arg2);
1100
+ return addHeapObject(ret);
1101
+ }, arguments);
1102
+ };
1103
+ imports.wbg.__wbg_set_3f1d0b984ed272ed = function (arg0, arg1, arg2) {
1104
+ getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
1105
+ };
1106
+ imports.wbg.__wbg_set_90f6c0f7bd8c0415 = function (arg0, arg1, arg2) {
1107
+ getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
830
1108
  };
831
- imports.wbg.__wbg_setat_2a071a392643c10e = function (arg0, arg1) {
1109
+ imports.wbg.__wbg_set_b7f1cf4fae26fe2a = function (arg0, arg1, arg2) {
1110
+ const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
1111
+ return addHeapObject(ret);
1112
+ };
1113
+ imports.wbg.__wbg_setat_f8fc70f546036b10 = function (arg0, arg1) {
832
1114
  getObject(arg0).at = arg1;
833
1115
  };
834
- imports.wbg.__wbg_setbody_5923b78a95eedf29 = function (arg0, arg1) {
1116
+ imports.wbg.__wbg_setbody_c8460bdf44147df8 = function (arg0, arg1) {
835
1117
  getObject(arg0).body = getObject(arg1);
836
1118
  };
837
- imports.wbg.__wbg_setcreate_139bad94b2874fb5 = function (arg0, arg1) {
1119
+ imports.wbg.__wbg_setcache_90ca4ad8a8ad40d3 = function (arg0, arg1) {
1120
+ getObject(arg0).cache = __wbindgen_enum_RequestCache[arg1];
1121
+ };
1122
+ imports.wbg.__wbg_setcreate_1eb73f4ea713c1ad = function (arg0, arg1) {
838
1123
  getObject(arg0).create = arg1 !== 0;
839
1124
  };
840
- imports.wbg.__wbg_setcreate_4ca762e23d9f78da = function (arg0, arg1) {
1125
+ imports.wbg.__wbg_setcreate_2d32aa4bbcd1d7af = function (arg0, arg1) {
841
1126
  getObject(arg0).create = arg1 !== 0;
842
1127
  };
843
- imports.wbg.__wbg_setcredentials_c3a22f1cd105a2c6 = function (arg0, arg1) {
1128
+ imports.wbg.__wbg_setcredentials_9cd60d632c9d5dfc = function (arg0, arg1) {
844
1129
  getObject(arg0).credentials = __wbindgen_enum_RequestCredentials[arg1];
845
1130
  };
846
- imports.wbg.__wbg_setheaders_834c0bdb6a8949ad = function (arg0, arg1) {
1131
+ imports.wbg.__wbg_setheaders_0052283e2f3503d1 = function (arg0, arg1) {
847
1132
  getObject(arg0).headers = getObject(arg1);
848
1133
  };
849
- imports.wbg.__wbg_setmethod_3c5280fe5d890842 = function (arg0, arg1, arg2) {
1134
+ imports.wbg.__wbg_setmethod_9b504d5b855b329c = function (arg0, arg1, arg2) {
850
1135
  getObject(arg0).method = getStringFromWasm0(arg1, arg2);
851
1136
  };
852
- imports.wbg.__wbg_setmode_5dc300b865044b65 = function (arg0, arg1) {
1137
+ imports.wbg.__wbg_setmode_a23e1a2ad8b512f8 = function (arg0, arg1) {
853
1138
  getObject(arg0).mode = __wbindgen_enum_RequestMode[arg1];
854
1139
  };
855
- imports.wbg.__wbg_setrecursive_536113a081d6177a = function (arg0, arg1) {
1140
+ imports.wbg.__wbg_setname_6c6a9da905405176 = function (arg0, arg1, arg2) {
1141
+ getObject(arg0).name = getStringFromWasm0(arg1, arg2);
1142
+ };
1143
+ imports.wbg.__wbg_setonerror_d1f7d212a8fc3389 = function (arg0, arg1) {
1144
+ getObject(arg0).onerror = getObject(arg1);
1145
+ };
1146
+ imports.wbg.__wbg_setonmessage_c943f7891405ab22 = function (arg0, arg1) {
1147
+ getObject(arg0).onmessage = getObject(arg1);
1148
+ };
1149
+ imports.wbg.__wbg_setrecursive_072599988d5f7e8d = function (arg0, arg1) {
1150
+ getObject(arg0).recursive = arg1 !== 0;
1151
+ };
1152
+ imports.wbg.__wbg_setrecursive_2f6a071c98b6be16 = function (arg0, arg1) {
856
1153
  getObject(arg0).recursive = arg1 !== 0;
857
1154
  };
858
- imports.wbg.__wbg_setsignal_75b21ef3a81de905 = function (arg0, arg1) {
1155
+ imports.wbg.__wbg_setsignal_8c45ad1247a74809 = function (arg0, arg1) {
859
1156
  getObject(arg0).signal = getObject(arg1);
860
1157
  };
861
- imports.wbg.__wbg_signal_aaf9ad74119f20a4 = function (arg0) {
1158
+ imports.wbg.__wbg_settype_298968e371b58a33 = function (arg0, arg1, arg2) {
1159
+ getObject(arg0).type = getStringFromWasm0(arg1, arg2);
1160
+ };
1161
+ imports.wbg.__wbg_settype_3dc790721d11b6f5 = function (arg0, arg1) {
1162
+ getObject(arg0).type = __wbindgen_enum_WorkerType[arg1];
1163
+ };
1164
+ imports.wbg.__wbg_signal_da4d466ce86118b5 = function (arg0) {
862
1165
  const ret = getObject(arg0).signal;
863
1166
  return addHeapObject(ret);
864
1167
  };
865
- imports.wbg.__wbg_static_accessor_GLOBAL_88a902d13a557d07 = function () {
1168
+ imports.wbg.__wbg_size_8f84e7768fba0589 = function (arg0) {
1169
+ const ret = getObject(arg0).size;
1170
+ return ret;
1171
+ };
1172
+ imports.wbg.__wbg_slice_337130a0e2389850 = function () {
1173
+ return handleError(function (arg0, arg1, arg2, arg3, arg4) {
1174
+ const ret = getObject(arg0).slice(arg1, arg2, getStringFromWasm0(arg3, arg4));
1175
+ return addHeapObject(ret);
1176
+ }, arguments);
1177
+ };
1178
+ imports.wbg.__wbg_stack_0ed75d68575b0f3c = function (arg0, arg1) {
1179
+ const ret = getObject(arg1).stack;
1180
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
1181
+ const len1 = WASM_VECTOR_LEN;
1182
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1183
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1184
+ };
1185
+ imports.wbg.__wbg_static_accessor_GLOBAL_8921f820c2ce3f12 = function () {
866
1186
  const ret = typeof global === 'undefined' ? null : global;
867
1187
  return isLikeNone(ret) ? 0 : addHeapObject(ret);
868
1188
  };
869
- imports.wbg.__wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0 = function () {
1189
+ imports.wbg.__wbg_static_accessor_GLOBAL_THIS_f0a4409105898184 = function () {
870
1190
  const ret = typeof globalThis === 'undefined' ? null : globalThis;
871
1191
  return isLikeNone(ret) ? 0 : addHeapObject(ret);
872
1192
  };
873
- imports.wbg.__wbg_static_accessor_SELF_37c5d418e4bf5819 = function () {
1193
+ imports.wbg.__wbg_static_accessor_SELF_995b214ae681ff99 = function () {
874
1194
  const ret = typeof self === 'undefined' ? null : self;
875
1195
  return isLikeNone(ret) ? 0 : addHeapObject(ret);
876
1196
  };
877
- imports.wbg.__wbg_static_accessor_WINDOW_5de37043a91a9c40 = function () {
1197
+ imports.wbg.__wbg_static_accessor_WINDOW_cde3890479c675ea = function () {
878
1198
  const ret = typeof window === 'undefined' ? null : window;
879
1199
  return isLikeNone(ret) ? 0 : addHeapObject(ret);
880
1200
  };
881
- imports.wbg.__wbg_status_f6360336ca686bf0 = function (arg0) {
1201
+ imports.wbg.__wbg_status_3fea3036088621d6 = function (arg0) {
882
1202
  const ret = getObject(arg0).status;
883
1203
  return ret;
884
1204
  };
885
- imports.wbg.__wbg_storage_07eb754b88898955 = function (arg0) {
1205
+ imports.wbg.__wbg_storage_32b4ac688c114c3d = function (arg0) {
886
1206
  const ret = getObject(arg0).storage;
887
1207
  return addHeapObject(ret);
888
1208
  };
889
- imports.wbg.__wbg_stringify_f7ed6987935b4a24 = function () {
1209
+ imports.wbg.__wbg_stringify_b98c93d0a190446a = function () {
890
1210
  return handleError(function (arg0) {
891
1211
  const ret = JSON.stringify(getObject(arg0));
892
1212
  return addHeapObject(ret);
893
1213
  }, arguments);
894
1214
  };
895
- imports.wbg.__wbg_then_44b73946d2fb3e7d = function (arg0, arg1) {
896
- const ret = getObject(arg0).then(getObject(arg1));
1215
+ imports.wbg.__wbg_subarray_70fd07feefe14294 = function (arg0, arg1, arg2) {
1216
+ const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
897
1217
  return addHeapObject(ret);
898
1218
  };
899
- imports.wbg.__wbg_then_48b406749878a531 = function (arg0, arg1, arg2) {
1219
+ imports.wbg.__wbg_then_b33a773d723afa3e = function (arg0, arg1, arg2) {
900
1220
  const ret = getObject(arg0).then(getObject(arg1), getObject(arg2));
901
1221
  return addHeapObject(ret);
902
1222
  };
903
- imports.wbg.__wbg_toString_5285597960676b7b = function (arg0) {
1223
+ imports.wbg.__wbg_then_e22500defe16819f = function (arg0, arg1) {
1224
+ const ret = getObject(arg0).then(getObject(arg1));
1225
+ return addHeapObject(ret);
1226
+ };
1227
+ imports.wbg.__wbg_toString_78df35411a4fd40c = function (arg0) {
904
1228
  const ret = getObject(arg0).toString();
905
1229
  return addHeapObject(ret);
906
1230
  };
907
- imports.wbg.__wbg_truncate_29261a6365c72b01 = function () {
1231
+ imports.wbg.__wbg_truncate_0fe935591188a14c = function () {
908
1232
  return handleError(function (arg0, arg1) {
909
1233
  getObject(arg0).truncate(arg1 >>> 0);
910
1234
  }, arguments);
911
1235
  };
912
- imports.wbg.__wbg_url_ae10c34ca209681d = function (arg0, arg1) {
1236
+ imports.wbg.__wbg_type_5f9dd3f303ae4dde = function (arg0) {
1237
+ const ret = getObject(arg0).type;
1238
+ return (__wbindgen_enum_FileSystemChangeRecordType.indexOf(ret) + 1 || 7) - 1;
1239
+ };
1240
+ imports.wbg.__wbg_url_e5720dfacf77b05e = function (arg0, arg1) {
913
1241
  const ret = getObject(arg1).url;
914
1242
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
915
1243
  const len1 = WASM_VECTOR_LEN;
916
1244
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
917
1245
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
918
1246
  };
919
- imports.wbg.__wbg_value_cd1ffa7b1ab794f1 = function (arg0) {
1247
+ imports.wbg.__wbg_value_ade0f87d71d4aecc = function (arg0) {
920
1248
  const ret = getObject(arg0).value;
921
1249
  return addHeapObject(ret);
922
1250
  };
923
- imports.wbg.__wbg_write_530d3c84df874f53 = function () {
924
- return handleError(function (arg0, arg1, arg2, arg3) {
925
- const ret = getObject(arg0).write(getArrayU8FromWasm0(arg1, arg2), getObject(arg3));
926
- return ret;
927
- }, arguments);
1251
+ imports.wbg.__wbg_value_dd9372230531eade = function (arg0) {
1252
+ const ret = getObject(arg0).value;
1253
+ return addHeapObject(ret);
928
1254
  };
929
- imports.wbg.__wbindgen_array_new = function () {
930
- const ret = [];
1255
+ imports.wbg.__wbg_waitAsync_213e79486ffecd82 = function () {
1256
+ const ret = Atomics.waitAsync;
931
1257
  return addHeapObject(ret);
932
1258
  };
933
- imports.wbg.__wbindgen_array_push = function (arg0, arg1) {
934
- getObject(arg0).push(takeObject(arg1));
1259
+ imports.wbg.__wbg_waitAsync_402c2db0645a44e0 = function (arg0, arg1, arg2) {
1260
+ const ret = Atomics.waitAsync(getObject(arg0), arg1 >>> 0, arg2);
1261
+ return addHeapObject(ret);
1262
+ };
1263
+ imports.wbg.__wbg_warn_90eb15d986910fe9 = function (arg0, arg1, arg2, arg3) {
1264
+ console.warn(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
935
1265
  };
936
- imports.wbg.__wbindgen_cb_drop = function (arg0) {
937
- const obj = takeObject(arg0).original;
1266
+ imports.wbg.__wbg_warn_e2ada06313f92f09 = function (arg0) {
1267
+ console.warn(getObject(arg0));
1268
+ };
1269
+ imports.wbg.__wbg_wbindgencbdrop_eb10308566512b88 = function (arg0) {
1270
+ const obj = getObject(arg0).original;
938
1271
  if (obj.cnt-- == 1) {
939
1272
  obj.a = 0;
940
1273
  return true;
@@ -942,46 +1275,48 @@ function __wbg_get_imports() {
942
1275
  const ret = false;
943
1276
  return ret;
944
1277
  };
945
- imports.wbg.__wbindgen_closure_wrapper178346 = function (arg0, arg1, arg2) {
946
- const ret = makeMutClosure(arg0, arg1, 141890, __wbg_adapter_31);
947
- return addHeapObject(ret);
948
- };
949
- imports.wbg.__wbindgen_closure_wrapper25760 = function (arg0, arg1, arg2) {
950
- const ret = makeMutClosure(arg0, arg1, 18204, __wbg_adapter_28);
951
- return addHeapObject(ret);
952
- };
953
- imports.wbg.__wbindgen_debug_string = function (arg0, arg1) {
1278
+ imports.wbg.__wbg_wbindgendebugstring_99ef257a3ddda34d = function (arg0, arg1) {
954
1279
  const ret = debugString(getObject(arg1));
955
1280
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
956
1281
  const len1 = WASM_VECTOR_LEN;
957
1282
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
958
1283
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
959
1284
  };
960
- imports.wbg.__wbindgen_is_function = function (arg0) {
1285
+ imports.wbg.__wbg_wbindgenisfunction_8cee7dce3725ae74 = function (arg0) {
961
1286
  const ret = typeof (getObject(arg0)) === 'function';
962
1287
  return ret;
963
1288
  };
964
- imports.wbg.__wbindgen_is_object = function (arg0) {
1289
+ imports.wbg.__wbg_wbindgenisobject_307a53c6bd97fbf8 = function (arg0) {
965
1290
  const val = getObject(arg0);
966
1291
  const ret = typeof (val) === 'object' && val !== null;
967
1292
  return ret;
968
1293
  };
969
- imports.wbg.__wbindgen_is_undefined = function (arg0) {
1294
+ imports.wbg.__wbg_wbindgenisstring_d4fa939789f003b0 = function (arg0) {
1295
+ const ret = typeof (getObject(arg0)) === 'string';
1296
+ return ret;
1297
+ };
1298
+ imports.wbg.__wbg_wbindgenisundefined_c4b71d073b92f3c5 = function (arg0) {
970
1299
  const ret = getObject(arg0) === undefined;
971
1300
  return ret;
972
1301
  };
973
- imports.wbg.__wbindgen_memory = function () {
1302
+ imports.wbg.__wbg_wbindgenmemory_d84da70f7c42d172 = function () {
974
1303
  const ret = wasm.memory;
975
1304
  return addHeapObject(ret);
976
1305
  };
977
- imports.wbg.__wbindgen_object_clone_ref = function (arg0) {
978
- const ret = getObject(arg0);
1306
+ imports.wbg.__wbg_wbindgenmodule_7e59019f6366ff9c = function () {
1307
+ const ret = __wbg_init.__wbindgen_wasm_module;
979
1308
  return addHeapObject(ret);
980
1309
  };
981
- imports.wbg.__wbindgen_object_drop_ref = function (arg0) {
982
- takeObject(arg0);
1310
+ imports.wbg.__wbg_wbindgennumberget_f74b4c7525ac05cb = function (arg0, arg1) {
1311
+ const obj = getObject(arg1);
1312
+ const ret = typeof (obj) === 'number' ? obj : undefined;
1313
+ getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
1314
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
983
1315
  };
984
- imports.wbg.__wbindgen_string_get = function (arg0, arg1) {
1316
+ imports.wbg.__wbg_wbindgenrethrow_01815c9239d70cc2 = function (arg0) {
1317
+ throw takeObject(arg0);
1318
+ };
1319
+ imports.wbg.__wbg_wbindgenstringget_0f16a6ddddef376f = function (arg0, arg1) {
985
1320
  const obj = getObject(arg1);
986
1321
  const ret = typeof (obj) === 'string' ? obj : undefined;
987
1322
  var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
@@ -989,50 +1324,154 @@ function __wbg_get_imports() {
989
1324
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
990
1325
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
991
1326
  };
992
- imports.wbg.__wbindgen_string_new = function (arg0, arg1) {
1327
+ imports.wbg.__wbg_wbindgenthrow_451ec1a8469d7eb6 = function (arg0, arg1) {
1328
+ throw new Error(getStringFromWasm0(arg0, arg1));
1329
+ };
1330
+ imports.wbg.__wbg_write_9ac6a5f58a8c835c = function () {
1331
+ return handleError(function (arg0, arg1, arg2, arg3) {
1332
+ const ret = getObject(arg0).write(getArrayU8FromWasm0(arg1, arg2), getObject(arg3));
1333
+ return ret;
1334
+ }, arguments);
1335
+ };
1336
+ imports.wbg.__wbg_write_b652d19332a4ce1e = function () {
1337
+ return handleError(function (arg0, arg1, arg2) {
1338
+ const ret = getObject(arg0).write(getArrayU8FromWasm0(arg1, arg2));
1339
+ return ret;
1340
+ }, arguments);
1341
+ };
1342
+ imports.wbg.__wbindgen_cast_025aed27710c2518 = function (arg0, arg1) {
1343
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 9056, function: Function { arguments: [Ref(NamedExternref("MessageEvent"))], shim_idx: 9065, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1344
+ const ret = makeMutClosure(arg0, arg1, 9056, __wbg_adapter_18);
1345
+ return addHeapObject(ret);
1346
+ };
1347
+ imports.wbg.__wbindgen_cast_0e8130195cfa0680 = function (arg0, arg1) {
1348
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 1993, function: Function { arguments: [], shim_idx: 1994, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1349
+ const ret = makeMutClosure(arg0, arg1, 1993, __wbg_adapter_25);
1350
+ return addHeapObject(ret);
1351
+ };
1352
+ imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function (arg0, arg1) {
1353
+ // Cast intrinsic for `Ref(String) -> Externref`.
993
1354
  const ret = getStringFromWasm0(arg0, arg1);
994
1355
  return addHeapObject(ret);
995
1356
  };
996
- imports.wbg.__wbindgen_throw = function (arg0, arg1) {
997
- throw new Error(getStringFromWasm0(arg0, arg1));
1357
+ imports.wbg.__wbindgen_cast_4625c577ab2ec9ee = function (arg0) {
1358
+ // Cast intrinsic for `U64 -> Externref`.
1359
+ const ret = BigInt.asUintN(64, arg0);
1360
+ return addHeapObject(ret);
1361
+ };
1362
+ imports.wbg.__wbindgen_cast_4abc855908e61529 = function (arg0, arg1) {
1363
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 9067, function: Function { arguments: [], shim_idx: 1994, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1364
+ const ret = makeMutClosure(arg0, arg1, 9067, __wbg_adapter_25);
1365
+ return addHeapObject(ret);
1366
+ };
1367
+ imports.wbg.__wbindgen_cast_68a31acf4586c97f = function (arg0, arg1) {
1368
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 8789, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 8790, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1369
+ const ret = makeMutClosure(arg0, arg1, 8789, __wbg_adapter_4);
1370
+ return addHeapObject(ret);
1371
+ };
1372
+ imports.wbg.__wbindgen_cast_76322aab70622876 = function (arg0, arg1) {
1373
+ var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
1374
+ wasm.__wbindgen_export_4(arg0, arg1 * 4, 4);
1375
+ // Cast intrinsic for `Vector(NamedExternref("DirEntry")) -> Externref`.
1376
+ const ret = v0;
1377
+ return addHeapObject(ret);
1378
+ };
1379
+ imports.wbg.__wbindgen_cast_77bc3e92745e9a35 = function (arg0, arg1) {
1380
+ var v0 = getArrayU8FromWasm0(arg0, arg1).slice();
1381
+ wasm.__wbindgen_export_4(arg0, arg1 * 1, 1);
1382
+ // Cast intrinsic for `Vector(U8) -> Externref`.
1383
+ const ret = v0;
1384
+ return addHeapObject(ret);
1385
+ };
1386
+ imports.wbg.__wbindgen_cast_9ae0607507abb057 = function (arg0) {
1387
+ // Cast intrinsic for `I64 -> Externref`.
1388
+ const ret = arg0;
1389
+ return addHeapObject(ret);
1390
+ };
1391
+ imports.wbg.__wbindgen_cast_a01a04b45c08d0e8 = function (arg0, arg1) {
1392
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 8789, function: Function { arguments: [NamedExternref("ErrorEvent")], shim_idx: 8790, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1393
+ const ret = makeMutClosure(arg0, arg1, 8789, __wbg_adapter_4);
1394
+ return addHeapObject(ret);
1395
+ };
1396
+ imports.wbg.__wbindgen_cast_c0785ac30e0427e1 = function (arg0, arg1) {
1397
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 8789, function: Function { arguments: [Externref], shim_idx: 8790, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1398
+ const ret = makeMutClosure(arg0, arg1, 8789, __wbg_adapter_4);
1399
+ return addHeapObject(ret);
1400
+ };
1401
+ imports.wbg.__wbindgen_cast_d6cd19b81560fd6e = function (arg0) {
1402
+ // Cast intrinsic for `F64 -> Externref`.
1403
+ const ret = arg0;
1404
+ return addHeapObject(ret);
1405
+ };
1406
+ imports.wbg.__wbindgen_cast_ec0f8eccb37f735c = function (arg0, arg1) {
1407
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 9056, function: Function { arguments: [NamedExternref("Array<any>")], shim_idx: 9057, ret: Unit, inner_ret: Some(Unit) }, mutable: false }) -> Externref`.
1408
+ const ret = makeClosure(arg0, arg1, 9056, __wbg_adapter_7);
1409
+ return addHeapObject(ret);
1410
+ };
1411
+ imports.wbg.__wbindgen_link_dd5153a359f2e504 = function (arg0) {
1412
+ const val = `onmessage = function (ev) {
1413
+ let [ia, index, value] = ev.data;
1414
+ ia = new Int32Array(ia.buffer);
1415
+ let result = Atomics.wait(ia, index, value);
1416
+ postMessage(result);
1417
+ };
1418
+ `;
1419
+ const ret = typeof URL.createObjectURL === 'undefined' ? "data:application/javascript," + encodeURIComponent(val) : URL.createObjectURL(new Blob([val], { type: "text/javascript" }));
1420
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_1, wasm.__wbindgen_export_2);
1421
+ const len1 = WASM_VECTOR_LEN;
1422
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1423
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1424
+ };
1425
+ imports.wbg.__wbindgen_object_clone_ref = function (arg0) {
1426
+ const ret = getObject(arg0);
1427
+ return addHeapObject(ret);
1428
+ };
1429
+ imports.wbg.__wbindgen_object_drop_ref = function (arg0) {
1430
+ takeObject(arg0);
998
1431
  };
999
1432
  return imports;
1000
1433
  }
1001
1434
  function __wbg_init_memory(imports, memory) {
1435
+ imports.wbg.memory = memory || new WebAssembly.Memory({ initial: 116, maximum: 16384, shared: true });
1002
1436
  }
1003
- function __wbg_finalize_init(instance, module) {
1437
+ function __wbg_finalize_init(instance, module, thread_stack_size) {
1004
1438
  wasm = instance.exports;
1005
1439
  __wbg_init.__wbindgen_wasm_module = module;
1006
1440
  cachedDataViewMemory0 = null;
1007
1441
  cachedUint8ArrayMemory0 = null;
1008
- wasm.__wbindgen_start();
1442
+ if (typeof thread_stack_size !== 'undefined' && (typeof thread_stack_size !== 'number' || thread_stack_size === 0 || thread_stack_size % 65536 !== 0)) {
1443
+ throw 'invalid stack size';
1444
+ }
1445
+ wasm.__wbindgen_start(thread_stack_size);
1009
1446
  return wasm;
1010
1447
  }
1011
- function initSync(module) {
1448
+ function initSync(module, memory) {
1012
1449
  if (wasm !== undefined)
1013
1450
  return wasm;
1451
+ let thread_stack_size;
1014
1452
  if (typeof module !== 'undefined') {
1015
1453
  if (Object.getPrototypeOf(module) === Object.prototype) {
1016
- ({ module } = module);
1454
+ ({ module, memory, thread_stack_size } = module);
1017
1455
  }
1018
1456
  else {
1019
1457
  console.warn('using deprecated parameters for `initSync()`; pass a single object instead');
1020
1458
  }
1021
1459
  }
1022
1460
  const imports = __wbg_get_imports();
1023
- __wbg_init_memory(imports);
1461
+ __wbg_init_memory(imports, memory);
1024
1462
  if (!(module instanceof WebAssembly.Module)) {
1025
1463
  module = new WebAssembly.Module(module);
1026
1464
  }
1027
1465
  const instance = new WebAssembly.Instance(module, imports);
1028
- return __wbg_finalize_init(instance, module);
1466
+ return __wbg_finalize_init(instance, module, thread_stack_size);
1029
1467
  }
1030
- async function __wbg_init(module_or_path) {
1468
+ async function __wbg_init(module_or_path, memory) {
1031
1469
  if (wasm !== undefined)
1032
1470
  return wasm;
1471
+ let thread_stack_size;
1033
1472
  if (typeof module_or_path !== 'undefined') {
1034
1473
  if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
1035
- ({ module_or_path } = module_or_path);
1474
+ ({ module_or_path, memory, thread_stack_size } = module_or_path);
1036
1475
  }
1037
1476
  else {
1038
1477
  console.warn('using deprecated parameters for the initialization function; pass a single object instead');
@@ -1045,9 +1484,9 @@ async function __wbg_init(module_or_path) {
1045
1484
  if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {
1046
1485
  module_or_path = fetch(module_or_path);
1047
1486
  }
1048
- __wbg_init_memory(imports);
1487
+ __wbg_init_memory(imports, memory);
1049
1488
  const { instance, module } = await __wbg_load(await module_or_path, imports);
1050
- return __wbg_finalize_init(instance, module);
1489
+ return __wbg_finalize_init(instance, module, thread_stack_size);
1051
1490
  }
1052
1491
  export { initSync };
1053
1492
  export default __wbg_init;