libchai 0.1.13 → 0.2.0

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 (5) hide show
  1. package/LICENSE +674 -0
  2. package/chai.d.ts +20 -45
  3. package/chai.js +344 -387
  4. package/chai_bg.wasm +0 -0
  5. package/package.json +10 -2
package/chai.js CHANGED
@@ -6,51 +6,15 @@ heap.push(undefined, null, true, false);
6
6
 
7
7
  function getObject(idx) { return heap[idx]; }
8
8
 
9
- let heap_next = heap.length;
10
-
11
- function dropObject(idx) {
12
- if (idx < 132) return;
13
- heap[idx] = heap_next;
14
- heap_next = idx;
15
- }
16
-
17
- function takeObject(idx) {
18
- const ret = getObject(idx);
19
- dropObject(idx);
20
- return ret;
21
- }
22
-
23
- function isLikeNone(x) {
24
- return x === undefined || x === null;
25
- }
26
-
27
- let cachedFloat64Memory0 = null;
28
-
29
- function getFloat64Memory0() {
30
- if (cachedFloat64Memory0 === null || cachedFloat64Memory0.byteLength === 0) {
31
- cachedFloat64Memory0 = new Float64Array(wasm.memory.buffer);
32
- }
33
- return cachedFloat64Memory0;
34
- }
35
-
36
- let cachedInt32Memory0 = null;
37
-
38
- function getInt32Memory0() {
39
- if (cachedInt32Memory0 === null || cachedInt32Memory0.byteLength === 0) {
40
- cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);
41
- }
42
- return cachedInt32Memory0;
43
- }
44
-
45
9
  let WASM_VECTOR_LEN = 0;
46
10
 
47
- let cachedUint8Memory0 = null;
11
+ let cachedUint8ArrayMemory0 = null;
48
12
 
49
- function getUint8Memory0() {
50
- if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) {
51
- cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
13
+ function getUint8ArrayMemory0() {
14
+ if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
15
+ cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
52
16
  }
53
- return cachedUint8Memory0;
17
+ return cachedUint8ArrayMemory0;
54
18
  }
55
19
 
56
20
  const cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available') } } );
@@ -73,7 +37,7 @@ function passStringToWasm0(arg, malloc, realloc) {
73
37
  if (realloc === undefined) {
74
38
  const buf = cachedTextEncoder.encode(arg);
75
39
  const ptr = malloc(buf.length, 1) >>> 0;
76
- getUint8Memory0().subarray(ptr, ptr + buf.length).set(buf);
40
+ getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
77
41
  WASM_VECTOR_LEN = buf.length;
78
42
  return ptr;
79
43
  }
@@ -81,7 +45,7 @@ function passStringToWasm0(arg, malloc, realloc) {
81
45
  let len = arg.length;
82
46
  let ptr = malloc(len, 1) >>> 0;
83
47
 
84
- const mem = getUint8Memory0();
48
+ const mem = getUint8ArrayMemory0();
85
49
 
86
50
  let offset = 0;
87
51
 
@@ -96,7 +60,7 @@ function passStringToWasm0(arg, malloc, realloc) {
96
60
  arg = arg.slice(offset);
97
61
  }
98
62
  ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
99
- const view = getUint8Memory0().subarray(ptr + offset, ptr + len);
63
+ const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
100
64
  const ret = encodeString(arg, view);
101
65
 
102
66
  offset += ret.written;
@@ -107,6 +71,17 @@ function passStringToWasm0(arg, malloc, realloc) {
107
71
  return ptr;
108
72
  }
109
73
 
74
+ let cachedDataViewMemory0 = null;
75
+
76
+ function getDataViewMemory0() {
77
+ if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
78
+ cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
79
+ }
80
+ return cachedDataViewMemory0;
81
+ }
82
+
83
+ let heap_next = heap.length;
84
+
110
85
  function addHeapObject(obj) {
111
86
  if (heap_next === heap.length) heap.push(heap.length + 1);
112
87
  const idx = heap_next;
@@ -116,22 +91,37 @@ function addHeapObject(obj) {
116
91
  return idx;
117
92
  }
118
93
 
94
+ function handleError(f, args) {
95
+ try {
96
+ return f.apply(this, args);
97
+ } catch (e) {
98
+ wasm.__wbindgen_export_2(addHeapObject(e));
99
+ }
100
+ }
101
+
119
102
  const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
120
103
 
121
104
  if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };
122
105
 
123
106
  function getStringFromWasm0(ptr, len) {
124
107
  ptr = ptr >>> 0;
125
- return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
108
+ return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
109
+ }
110
+
111
+ function dropObject(idx) {
112
+ if (idx < 132) return;
113
+ heap[idx] = heap_next;
114
+ heap_next = idx;
126
115
  }
127
116
 
128
- let cachedBigInt64Memory0 = null;
117
+ function takeObject(idx) {
118
+ const ret = getObject(idx);
119
+ dropObject(idx);
120
+ return ret;
121
+ }
129
122
 
130
- function getBigInt64Memory0() {
131
- if (cachedBigInt64Memory0 === null || cachedBigInt64Memory0.byteLength === 0) {
132
- cachedBigInt64Memory0 = new BigInt64Array(wasm.memory.buffer);
133
- }
134
- return cachedBigInt64Memory0;
123
+ function isLikeNone(x) {
124
+ return x === undefined || x === null;
135
125
  }
136
126
 
137
127
  function debugString(val) {
@@ -175,7 +165,7 @@ function debugString(val) {
175
165
  // Test for built-in
176
166
  const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
177
167
  let className;
178
- if (builtInMatches.length > 1) {
168
+ if (builtInMatches && builtInMatches.length > 1) {
179
169
  className = builtInMatches[1];
180
170
  } else {
181
171
  // Failed to match the standard '[object ClassName]'
@@ -199,16 +189,17 @@ function debugString(val) {
199
189
  return className;
200
190
  }
201
191
  /**
202
- * @param {any} js_config
203
- * @returns {any}
204
- */
192
+ * 用于在图形界面验证输入的配置是否正确
193
+ * @param {any} js_config
194
+ * @returns {any}
195
+ */
205
196
  export function validate(js_config) {
206
197
  try {
207
198
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
208
199
  wasm.validate(retptr, addHeapObject(js_config));
209
- var r0 = getInt32Memory0()[retptr / 4 + 0];
210
- var r1 = getInt32Memory0()[retptr / 4 + 1];
211
- var r2 = getInt32Memory0()[retptr / 4 + 2];
200
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
201
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
202
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
212
203
  if (r2) {
213
204
  throw takeObject(r1);
214
205
  }
@@ -218,103 +209,50 @@ export function validate(js_config) {
218
209
  }
219
210
  }
220
211
 
221
- function handleError(f, args) {
222
- try {
223
- return f.apply(this, args);
224
- } catch (e) {
225
- wasm.__wbindgen_export_3(addHeapObject(e));
226
- }
227
- }
228
-
229
- const WebInterfaceFinalization = (typeof FinalizationRegistry === 'undefined')
212
+ const WebFinalization = (typeof FinalizationRegistry === 'undefined')
230
213
  ? { register: () => {}, unregister: () => {} }
231
- : new FinalizationRegistry(ptr => wasm.__wbg_webinterface_free(ptr >>> 0));
214
+ : new FinalizationRegistry(ptr => wasm.__wbg_web_free(ptr >>> 0, 1));
232
215
  /**
233
- */
234
- export class WebInterface {
216
+ * 通过图形界面来使用 libchai 的入口,实现了界面特征
217
+ */
218
+ export class Web {
235
219
 
236
220
  static __wrap(ptr) {
237
221
  ptr = ptr >>> 0;
238
- const obj = Object.create(WebInterface.prototype);
222
+ const obj = Object.create(Web.prototype);
239
223
  obj.__wbg_ptr = ptr;
240
- WebInterfaceFinalization.register(obj, obj.__wbg_ptr, obj);
224
+ WebFinalization.register(obj, obj.__wbg_ptr, obj);
241
225
  return obj;
242
226
  }
243
227
 
244
228
  __destroy_into_raw() {
245
229
  const ptr = this.__wbg_ptr;
246
230
  this.__wbg_ptr = 0;
247
- WebInterfaceFinalization.unregister(this);
231
+ WebFinalization.unregister(this);
248
232
  return ptr;
249
233
  }
250
234
 
251
235
  free() {
252
236
  const ptr = this.__destroy_into_raw();
253
- wasm.__wbg_webinterface_free(ptr);
254
- }
255
- /**
256
- * @param {Function} post_message
257
- * @param {any} js_config
258
- * @param {any} js_info
259
- * @param {any} js_assets
260
- * @returns {WebInterface}
261
- */
262
- static new(post_message, js_config, js_info, js_assets) {
263
- try {
264
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
265
- wasm.webinterface_new(retptr, addHeapObject(post_message), addHeapObject(js_config), addHeapObject(js_info), addHeapObject(js_assets));
266
- var r0 = getInt32Memory0()[retptr / 4 + 0];
267
- var r1 = getInt32Memory0()[retptr / 4 + 1];
268
- var r2 = getInt32Memory0()[retptr / 4 + 2];
269
- if (r2) {
270
- throw takeObject(r1);
271
- }
272
- return WebInterface.__wrap(r0);
273
- } finally {
274
- wasm.__wbindgen_add_to_stack_pointer(16);
275
- }
276
- }
277
- /**
278
- * @param {any} js_config
279
- */
280
- update_config(js_config) {
281
- try {
282
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
283
- wasm.webinterface_update_config(retptr, this.__wbg_ptr, addHeapObject(js_config));
284
- var r0 = getInt32Memory0()[retptr / 4 + 0];
285
- var r1 = getInt32Memory0()[retptr / 4 + 1];
286
- if (r1) {
287
- throw takeObject(r0);
288
- }
289
- } finally {
290
- wasm.__wbindgen_add_to_stack_pointer(16);
291
- }
237
+ wasm.__wbg_web_free(ptr, 0);
292
238
  }
293
239
  /**
294
- * @param {any} js_info
295
- */
296
- update_info(js_info) {
297
- try {
298
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
299
- wasm.webinterface_update_info(retptr, this.__wbg_ptr, addHeapObject(js_info));
300
- var r0 = getInt32Memory0()[retptr / 4 + 0];
301
- var r1 = getInt32Memory0()[retptr / 4 + 1];
302
- if (r1) {
303
- throw takeObject(r0);
304
- }
305
- } finally {
306
- wasm.__wbindgen_add_to_stack_pointer(16);
307
- }
240
+ * @param {Function} 回调
241
+ * @returns {Web}
242
+ */
243
+ static new(回调) {
244
+ const ret = wasm.web_new(addHeapObject(回调));
245
+ return Web.__wrap(ret);
308
246
  }
309
247
  /**
310
- * @param {any} js_assets
311
- */
312
- update_assets(js_assets) {
248
+ * @param {any} 前端参数
249
+ */
250
+ sync(前端参数) {
313
251
  try {
314
252
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
315
- wasm.webinterface_update_assets(retptr, this.__wbg_ptr, addHeapObject(js_assets));
316
- var r0 = getInt32Memory0()[retptr / 4 + 0];
317
- var r1 = getInt32Memory0()[retptr / 4 + 1];
253
+ wasm.web_sync(retptr, this.__wbg_ptr, addHeapObject(前端参数));
254
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
255
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
318
256
  if (r1) {
319
257
  throw takeObject(r0);
320
258
  }
@@ -323,16 +261,16 @@ export class WebInterface {
323
261
  }
324
262
  }
325
263
  /**
326
- * @param {any} js_objective
327
- * @returns {any}
328
- */
329
- encode_evaluate(js_objective) {
264
+ * @param {any} 前端目标函数配置
265
+ * @returns {any}
266
+ */
267
+ encode_evaluate(前端目标函数配置) {
330
268
  try {
331
269
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
332
- wasm.webinterface_encode_evaluate(retptr, this.__wbg_ptr, addHeapObject(js_objective));
333
- var r0 = getInt32Memory0()[retptr / 4 + 0];
334
- var r1 = getInt32Memory0()[retptr / 4 + 1];
335
- var r2 = getInt32Memory0()[retptr / 4 + 2];
270
+ wasm.web_encode_evaluate(retptr, this.__wbg_ptr, addHeapObject(前端目标函数配置));
271
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
272
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
273
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
336
274
  if (r2) {
337
275
  throw takeObject(r1);
338
276
  }
@@ -341,14 +279,12 @@ export class WebInterface {
341
279
  wasm.__wbindgen_add_to_stack_pointer(16);
342
280
  }
343
281
  }
344
- /**
345
- */
346
282
  optimize() {
347
283
  try {
348
284
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
349
- wasm.webinterface_optimize(retptr, this.__wbg_ptr);
350
- var r0 = getInt32Memory0()[retptr / 4 + 0];
351
- var r1 = getInt32Memory0()[retptr / 4 + 1];
285
+ wasm.web_optimize(retptr, this.__wbg_ptr);
286
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
287
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
352
288
  if (r1) {
353
289
  throw takeObject(r0);
354
290
  }
@@ -366,7 +302,7 @@ async function __wbg_load(module, imports) {
366
302
 
367
303
  } catch (e) {
368
304
  if (module.headers.get('Content-Type') != 'application/wasm') {
369
- 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);
305
+ 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);
370
306
 
371
307
  } else {
372
308
  throw e;
@@ -392,111 +328,42 @@ async function __wbg_load(module, imports) {
392
328
  function __wbg_get_imports() {
393
329
  const imports = {};
394
330
  imports.wbg = {};
395
- imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
396
- takeObject(arg0);
397
- };
398
- imports.wbg.__wbindgen_boolean_get = function(arg0) {
399
- const v = getObject(arg0);
400
- const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
401
- return ret;
402
- };
403
- imports.wbg.__wbindgen_is_bigint = function(arg0) {
404
- const ret = typeof(getObject(arg0)) === 'bigint';
405
- return ret;
406
- };
407
- imports.wbg.__wbindgen_number_get = function(arg0, arg1) {
408
- const obj = getObject(arg1);
409
- const ret = typeof(obj) === 'number' ? obj : undefined;
410
- getFloat64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? 0 : ret;
411
- getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
412
- };
413
- imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
414
- const obj = getObject(arg1);
415
- const ret = typeof(obj) === 'string' ? obj : undefined;
416
- var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
417
- var len1 = WASM_VECTOR_LEN;
418
- getInt32Memory0()[arg0 / 4 + 1] = len1;
419
- getInt32Memory0()[arg0 / 4 + 0] = ptr1;
420
- };
421
- imports.wbg.__wbindgen_is_object = function(arg0) {
422
- const val = getObject(arg0);
423
- const ret = typeof(val) === 'object' && val !== null;
424
- return ret;
425
- };
426
- imports.wbg.__wbindgen_in = function(arg0, arg1) {
427
- const ret = getObject(arg0) in getObject(arg1);
428
- return ret;
331
+ imports.wbg.__wbg_String_8f0eb39a4a4c2f66 = function(arg0, arg1) {
332
+ const ret = String(getObject(arg1));
333
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
334
+ const len1 = WASM_VECTOR_LEN;
335
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
336
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
429
337
  };
430
- imports.wbg.__wbindgen_bigint_from_i64 = function(arg0) {
431
- const ret = arg0;
338
+ imports.wbg.__wbg_buffer_609cc3eee51ed158 = function(arg0) {
339
+ const ret = getObject(arg0).buffer;
432
340
  return addHeapObject(ret);
433
341
  };
434
- imports.wbg.__wbindgen_jsval_eq = function(arg0, arg1) {
435
- const ret = getObject(arg0) === getObject(arg1);
436
- return ret;
437
- };
438
- imports.wbg.__wbindgen_bigint_from_u64 = function(arg0) {
439
- const ret = BigInt.asUintN(64, arg0);
342
+ imports.wbg.__wbg_call_672a4d21634d4a24 = function() { return handleError(function (arg0, arg1) {
343
+ const ret = getObject(arg0).call(getObject(arg1));
440
344
  return addHeapObject(ret);
441
- };
442
- imports.wbg.__wbindgen_error_new = function(arg0, arg1) {
443
- const ret = new Error(getStringFromWasm0(arg0, arg1));
345
+ }, arguments) };
346
+ imports.wbg.__wbg_call_7cccdd69e0791ae2 = function() { return handleError(function (arg0, arg1, arg2) {
347
+ const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
444
348
  return addHeapObject(ret);
445
- };
446
- imports.wbg.__wbindgen_is_string = function(arg0) {
447
- const ret = typeof(getObject(arg0)) === 'string';
448
- return ret;
449
- };
450
- imports.wbg.__wbindgen_is_undefined = function(arg0) {
451
- const ret = getObject(arg0) === undefined;
452
- return ret;
453
- };
454
- imports.wbg.__wbindgen_number_new = function(arg0) {
455
- const ret = arg0;
349
+ }, arguments) };
350
+ imports.wbg.__wbg_codePointAt_78181f32881e5b59 = function(arg0, arg1) {
351
+ const ret = getObject(arg0).codePointAt(arg1 >>> 0);
456
352
  return addHeapObject(ret);
457
353
  };
458
- imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
459
- const ret = getStringFromWasm0(arg0, arg1);
354
+ imports.wbg.__wbg_crypto_ed58b8e10a292839 = function(arg0) {
355
+ const ret = getObject(arg0).crypto;
460
356
  return addHeapObject(ret);
461
357
  };
462
- imports.wbg.__wbindgen_jsval_loose_eq = function(arg0, arg1) {
463
- const ret = getObject(arg0) == getObject(arg1);
464
- return ret;
465
- };
466
- imports.wbg.__wbindgen_as_number = function(arg0) {
467
- const ret = +getObject(arg0);
358
+ imports.wbg.__wbg_done_769e5ede4b31c67b = function(arg0) {
359
+ const ret = getObject(arg0).done;
468
360
  return ret;
469
361
  };
470
- imports.wbg.__wbg_String_b9412f8799faab3e = function(arg0, arg1) {
471
- const ret = String(getObject(arg1));
472
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
473
- const len1 = WASM_VECTOR_LEN;
474
- getInt32Memory0()[arg0 / 4 + 1] = len1;
475
- getInt32Memory0()[arg0 / 4 + 0] = ptr1;
476
- };
477
- imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
478
- const ret = getObject(arg0);
479
- return addHeapObject(ret);
480
- };
481
- imports.wbg.__wbg_getwithrefkey_edc2c8960f0f1191 = function(arg0, arg1) {
482
- const ret = getObject(arg0)[getObject(arg1)];
483
- return addHeapObject(ret);
484
- };
485
- imports.wbg.__wbg_set_f975102236d3c502 = function(arg0, arg1, arg2) {
486
- getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
487
- };
488
- imports.wbg.__wbg_new_abda76e883ba8a5f = function() {
489
- const ret = new Error();
362
+ imports.wbg.__wbg_entries_3265d4158b33e5dc = function(arg0) {
363
+ const ret = Object.entries(getObject(arg0));
490
364
  return addHeapObject(ret);
491
365
  };
492
- imports.wbg.__wbg_stack_658279fe44541cf6 = function(arg0, arg1) {
493
- const ret = getObject(arg1).stack;
494
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
495
- const len1 = WASM_VECTOR_LEN;
496
- getInt32Memory0()[arg0 / 4 + 1] = len1;
497
- getInt32Memory0()[arg0 / 4 + 0] = ptr1;
498
- };
499
- imports.wbg.__wbg_error_f851667af71bcfc6 = function(arg0, arg1) {
366
+ imports.wbg.__wbg_error_7534b8e9a36f1ab4 = function(arg0, arg1) {
500
367
  let deferred0_0;
501
368
  let deferred0_1;
502
369
  try {
@@ -504,234 +371,306 @@ function __wbg_get_imports() {
504
371
  deferred0_1 = arg1;
505
372
  console.error(getStringFromWasm0(arg0, arg1));
506
373
  } finally {
507
- wasm.__wbindgen_export_2(deferred0_0, deferred0_1, 1);
374
+ wasm.__wbindgen_export_3(deferred0_0, deferred0_1, 1);
508
375
  }
509
376
  };
510
- imports.wbg.__wbg_performance_a1b8bde2ee512264 = function(arg0) {
511
- const ret = getObject(arg0).performance;
377
+ imports.wbg.__wbg_fromCodePoint_f37c25c172f2e8b5 = function() { return handleError(function (arg0) {
378
+ const ret = String.fromCodePoint(arg0 >>> 0);
512
379
  return addHeapObject(ret);
513
- };
514
- imports.wbg.__wbg_now_abd80e969af37148 = function(arg0) {
515
- const ret = getObject(arg0).now();
516
- return ret;
517
- };
518
- imports.wbg.__wbg_crypto_1d1f22824a6a080c = function(arg0) {
519
- const ret = getObject(arg0).crypto;
380
+ }, arguments) };
381
+ imports.wbg.__wbg_getRandomValues_bcb4912f16000dc4 = function() { return handleError(function (arg0, arg1) {
382
+ getObject(arg0).getRandomValues(getObject(arg1));
383
+ }, arguments) };
384
+ imports.wbg.__wbg_get_67b2ba62fc30de12 = function() { return handleError(function (arg0, arg1) {
385
+ const ret = Reflect.get(getObject(arg0), getObject(arg1));
520
386
  return addHeapObject(ret);
521
- };
522
- imports.wbg.__wbg_process_4a72847cc503995b = function(arg0) {
523
- const ret = getObject(arg0).process;
387
+ }, arguments) };
388
+ imports.wbg.__wbg_get_b9b93047fe3cf45b = function(arg0, arg1) {
389
+ const ret = getObject(arg0)[arg1 >>> 0];
524
390
  return addHeapObject(ret);
525
391
  };
526
- imports.wbg.__wbg_versions_f686565e586dd935 = function(arg0) {
527
- const ret = getObject(arg0).versions;
392
+ imports.wbg.__wbg_getwithrefkey_1dc361bd10053bfe = function(arg0, arg1) {
393
+ const ret = getObject(arg0)[getObject(arg1)];
528
394
  return addHeapObject(ret);
529
395
  };
530
- imports.wbg.__wbg_node_104a2ff8d6ea03a2 = function(arg0) {
531
- const ret = getObject(arg0).node;
532
- return addHeapObject(ret);
396
+ imports.wbg.__wbg_instanceof_ArrayBuffer_e14585432e3737fc = function(arg0) {
397
+ let result;
398
+ try {
399
+ result = getObject(arg0) instanceof ArrayBuffer;
400
+ } catch (_) {
401
+ result = false;
402
+ }
403
+ const ret = result;
404
+ return ret;
533
405
  };
534
- imports.wbg.__wbg_require_cca90b1a94a0255b = function() { return handleError(function () {
535
- const ret = module.require;
536
- return addHeapObject(ret);
537
- }, arguments) };
538
- imports.wbg.__wbindgen_is_function = function(arg0) {
539
- const ret = typeof(getObject(arg0)) === 'function';
406
+ imports.wbg.__wbg_instanceof_Map_f3469ce2244d2430 = function(arg0) {
407
+ let result;
408
+ try {
409
+ result = getObject(arg0) instanceof Map;
410
+ } catch (_) {
411
+ result = false;
412
+ }
413
+ const ret = result;
540
414
  return ret;
541
415
  };
542
- imports.wbg.__wbg_msCrypto_eb05e62b530a1508 = function(arg0) {
543
- const ret = getObject(arg0).msCrypto;
544
- return addHeapObject(ret);
416
+ imports.wbg.__wbg_instanceof_Uint8Array_17156bcf118086a9 = function(arg0) {
417
+ let result;
418
+ try {
419
+ result = getObject(arg0) instanceof Uint8Array;
420
+ } catch (_) {
421
+ result = false;
422
+ }
423
+ const ret = result;
424
+ return ret;
545
425
  };
546
- imports.wbg.__wbg_randomFillSync_5c9c955aa56b6049 = function() { return handleError(function (arg0, arg1) {
547
- getObject(arg0).randomFillSync(takeObject(arg1));
548
- }, arguments) };
549
- imports.wbg.__wbg_getRandomValues_3aa56aa6edec874c = function() { return handleError(function (arg0, arg1) {
550
- getObject(arg0).getRandomValues(getObject(arg1));
551
- }, arguments) };
552
- imports.wbg.__wbg_get_bd8e338fbd5f5cc8 = function(arg0, arg1) {
553
- const ret = getObject(arg0)[arg1 >>> 0];
426
+ imports.wbg.__wbg_isArray_a1eab7e0d067391b = function(arg0) {
427
+ const ret = Array.isArray(getObject(arg0));
428
+ return ret;
429
+ };
430
+ imports.wbg.__wbg_isSafeInteger_343e2beeeece1bb0 = function(arg0) {
431
+ const ret = Number.isSafeInteger(getObject(arg0));
432
+ return ret;
433
+ };
434
+ imports.wbg.__wbg_iterator_9a24c88df860dc65 = function() {
435
+ const ret = Symbol.iterator;
554
436
  return addHeapObject(ret);
555
437
  };
556
- imports.wbg.__wbg_length_cd7af8117672b8b8 = function(arg0) {
438
+ imports.wbg.__wbg_length_a446193dc22c12f8 = function(arg0) {
557
439
  const ret = getObject(arg0).length;
558
440
  return ret;
559
441
  };
560
- imports.wbg.__wbg_new_16b304a2cfa7ff4a = function() {
561
- const ret = new Array();
562
- return addHeapObject(ret);
442
+ imports.wbg.__wbg_length_d56737991078581b = function(arg0) {
443
+ const ret = getObject(arg0).length;
444
+ return ret;
563
445
  };
564
- imports.wbg.__wbg_newnoargs_e258087cd0daa0ea = function(arg0, arg1) {
565
- const ret = new Function(getStringFromWasm0(arg0, arg1));
446
+ imports.wbg.__wbg_length_e2d2a49132c1b256 = function(arg0) {
447
+ const ret = getObject(arg0).length;
448
+ return ret;
449
+ };
450
+ imports.wbg.__wbg_msCrypto_0a36e2ec3a343d26 = function(arg0) {
451
+ const ret = getObject(arg0).msCrypto;
566
452
  return addHeapObject(ret);
567
453
  };
568
- imports.wbg.__wbg_next_40fc327bfc8770e6 = function(arg0) {
569
- const ret = getObject(arg0).next;
454
+ imports.wbg.__wbg_new_405e22f390576ce2 = function() {
455
+ const ret = new Object();
570
456
  return addHeapObject(ret);
571
457
  };
572
- imports.wbg.__wbg_next_196c84450b364254 = function() { return handleError(function (arg0) {
573
- const ret = getObject(arg0).next();
458
+ imports.wbg.__wbg_new_5e0be73521bc8c17 = function() {
459
+ const ret = new Map();
574
460
  return addHeapObject(ret);
575
- }, arguments) };
576
- imports.wbg.__wbg_done_298b57d23c0fc80c = function(arg0) {
577
- const ret = getObject(arg0).done;
578
- return ret;
579
461
  };
580
- imports.wbg.__wbg_value_d93c65011f51a456 = function(arg0) {
581
- const ret = getObject(arg0).value;
462
+ imports.wbg.__wbg_new_78feb108b6472713 = function() {
463
+ const ret = new Array();
582
464
  return addHeapObject(ret);
583
465
  };
584
- imports.wbg.__wbg_iterator_2cee6dadfd956dfa = function() {
585
- const ret = Symbol.iterator;
466
+ imports.wbg.__wbg_new_8a6f238a6ece86ea = function() {
467
+ const ret = new Error();
586
468
  return addHeapObject(ret);
587
469
  };
588
- imports.wbg.__wbg_get_e3c254076557e348 = function() { return handleError(function (arg0, arg1) {
589
- const ret = Reflect.get(getObject(arg0), getObject(arg1));
470
+ imports.wbg.__wbg_new_a12002a7f91c75be = function(arg0) {
471
+ const ret = new Uint8Array(getObject(arg0));
590
472
  return addHeapObject(ret);
591
- }, arguments) };
592
- imports.wbg.__wbg_call_27c0f87801dedf93 = function() { return handleError(function (arg0, arg1) {
593
- const ret = getObject(arg0).call(getObject(arg1));
473
+ };
474
+ imports.wbg.__wbg_newnoargs_105ed471475aaf50 = function(arg0, arg1) {
475
+ const ret = new Function(getStringFromWasm0(arg0, arg1));
594
476
  return addHeapObject(ret);
595
- }, arguments) };
596
- imports.wbg.__wbg_new_72fb9a18b5ae2624 = function() {
597
- const ret = new Object();
477
+ };
478
+ imports.wbg.__wbg_newwithbyteoffsetandlength_d97e637ebe145a9a = function(arg0, arg1, arg2) {
479
+ const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
598
480
  return addHeapObject(ret);
599
481
  };
600
- imports.wbg.__wbg_length_dee433d4c85c9387 = function(arg0) {
601
- const ret = getObject(arg0).length;
602
- return ret;
482
+ imports.wbg.__wbg_newwithlength_a381634e90c276d4 = function(arg0) {
483
+ const ret = new Uint8Array(arg0 >>> 0);
484
+ return addHeapObject(ret);
603
485
  };
604
- imports.wbg.__wbg_codePointAt_158806992b6482b1 = function(arg0, arg1) {
605
- const ret = getObject(arg0).codePointAt(arg1 >>> 0);
486
+ imports.wbg.__wbg_next_25feadfc0913fea9 = function(arg0) {
487
+ const ret = getObject(arg0).next;
606
488
  return addHeapObject(ret);
607
489
  };
608
- imports.wbg.__wbg_self_ce0dbfc45cf2f5be = function() { return handleError(function () {
609
- const ret = self.self;
490
+ imports.wbg.__wbg_next_6574e1a8a62d1055 = function() { return handleError(function (arg0) {
491
+ const ret = getObject(arg0).next();
610
492
  return addHeapObject(ret);
611
493
  }, arguments) };
612
- imports.wbg.__wbg_window_c6fb939a7f436783 = function() { return handleError(function () {
613
- const ret = window.window;
494
+ imports.wbg.__wbg_node_02999533c4ea02e3 = function(arg0) {
495
+ const ret = getObject(arg0).node;
614
496
  return addHeapObject(ret);
615
- }, arguments) };
616
- imports.wbg.__wbg_globalThis_d1e6af4856ba331b = function() { return handleError(function () {
617
- const ret = globalThis.globalThis;
497
+ };
498
+ imports.wbg.__wbg_process_5c1d670bc53614b8 = function(arg0) {
499
+ const ret = getObject(arg0).process;
618
500
  return addHeapObject(ret);
501
+ };
502
+ imports.wbg.__wbg_randomFillSync_ab2cfe79ebbf2740 = function() { return handleError(function (arg0, arg1) {
503
+ getObject(arg0).randomFillSync(takeObject(arg1));
619
504
  }, arguments) };
620
- imports.wbg.__wbg_global_207b558942527489 = function() { return handleError(function () {
621
- const ret = global.global;
505
+ imports.wbg.__wbg_require_79b1e9274cde3c87 = function() { return handleError(function () {
506
+ const ret = module.require;
622
507
  return addHeapObject(ret);
623
508
  }, arguments) };
624
- imports.wbg.__wbg_set_d4638f722068f043 = function(arg0, arg1, arg2) {
509
+ imports.wbg.__wbg_set_37837023f3d740e8 = function(arg0, arg1, arg2) {
625
510
  getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
626
511
  };
627
- imports.wbg.__wbg_isArray_2ab64d95e09ea0ae = function(arg0) {
628
- const ret = Array.isArray(getObject(arg0));
629
- return ret;
512
+ imports.wbg.__wbg_set_3f1d0b984ed272ed = function(arg0, arg1, arg2) {
513
+ getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
630
514
  };
631
- imports.wbg.__wbg_instanceof_ArrayBuffer_836825be07d4c9d2 = function(arg0) {
632
- let result;
633
- try {
634
- result = getObject(arg0) instanceof ArrayBuffer;
635
- } catch (_) {
636
- result = false;
637
- }
638
- const ret = result;
639
- return ret;
515
+ imports.wbg.__wbg_set_65595bdd868b3009 = function(arg0, arg1, arg2) {
516
+ getObject(arg0).set(getObject(arg1), arg2 >>> 0);
640
517
  };
641
- imports.wbg.__wbg_call_b3ca7c6051f9bec1 = function() { return handleError(function (arg0, arg1, arg2) {
642
- const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
518
+ imports.wbg.__wbg_set_8fc6bf8a5b1071d1 = function(arg0, arg1, arg2) {
519
+ const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
643
520
  return addHeapObject(ret);
644
- }, arguments) };
645
- imports.wbg.__wbg_instanceof_Map_87917e0a7aaf4012 = function(arg0) {
646
- let result;
647
- try {
648
- result = getObject(arg0) instanceof Map;
649
- } catch (_) {
650
- result = false;
651
- }
652
- const ret = result;
653
- return ret;
654
521
  };
655
- imports.wbg.__wbg_isSafeInteger_f7b04ef02296c4d2 = function(arg0) {
656
- const ret = Number.isSafeInteger(getObject(arg0));
657
- return ret;
522
+ imports.wbg.__wbg_stack_0ed75d68575b0f3c = function(arg0, arg1) {
523
+ const ret = getObject(arg1).stack;
524
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
525
+ const len1 = WASM_VECTOR_LEN;
526
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
527
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
658
528
  };
659
- imports.wbg.__wbg_entries_95cc2c823b285a09 = function(arg0) {
660
- const ret = Object.entries(getObject(arg0));
661
- return addHeapObject(ret);
529
+ imports.wbg.__wbg_static_accessor_GLOBAL_88a902d13a557d07 = function() {
530
+ const ret = typeof global === 'undefined' ? null : global;
531
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
662
532
  };
663
- imports.wbg.__wbg_buffer_12d079cc21e14bdb = function(arg0) {
664
- const ret = getObject(arg0).buffer;
665
- return addHeapObject(ret);
533
+ imports.wbg.__wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0 = function() {
534
+ const ret = typeof globalThis === 'undefined' ? null : globalThis;
535
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
666
536
  };
667
- imports.wbg.__wbg_newwithbyteoffsetandlength_aa4a17c33a06e5cb = function(arg0, arg1, arg2) {
668
- const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
669
- return addHeapObject(ret);
537
+ imports.wbg.__wbg_static_accessor_SELF_37c5d418e4bf5819 = function() {
538
+ const ret = typeof self === 'undefined' ? null : self;
539
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
670
540
  };
671
- imports.wbg.__wbg_new_63b92bc8671ed464 = function(arg0) {
672
- const ret = new Uint8Array(getObject(arg0));
541
+ imports.wbg.__wbg_static_accessor_WINDOW_5de37043a91a9c40 = function() {
542
+ const ret = typeof window === 'undefined' ? null : window;
543
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
544
+ };
545
+ imports.wbg.__wbg_subarray_aa9065fa9dc5df96 = function(arg0, arg1, arg2) {
546
+ const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
673
547
  return addHeapObject(ret);
674
548
  };
675
- imports.wbg.__wbg_set_a47bac70306a19a7 = function(arg0, arg1, arg2) {
676
- getObject(arg0).set(getObject(arg1), arg2 >>> 0);
549
+ imports.wbg.__wbg_value_cd1ffa7b1ab794f1 = function(arg0) {
550
+ const ret = getObject(arg0).value;
551
+ return addHeapObject(ret);
677
552
  };
678
- imports.wbg.__wbg_length_c20a40f15020d68a = function(arg0) {
679
- const ret = getObject(arg0).length;
680
- return ret;
553
+ imports.wbg.__wbg_versions_c71aa1626a93e0a1 = function(arg0) {
554
+ const ret = getObject(arg0).versions;
555
+ return addHeapObject(ret);
681
556
  };
682
- imports.wbg.__wbg_instanceof_Uint8Array_2b3bbecd033d19f6 = function(arg0) {
683
- let result;
684
- try {
685
- result = getObject(arg0) instanceof Uint8Array;
686
- } catch (_) {
687
- result = false;
688
- }
689
- const ret = result;
557
+ imports.wbg.__wbindgen_as_number = function(arg0) {
558
+ const ret = +getObject(arg0);
690
559
  return ret;
691
560
  };
692
- imports.wbg.__wbg_newwithlength_e9b4878cebadb3d3 = function(arg0) {
693
- const ret = new Uint8Array(arg0 >>> 0);
561
+ imports.wbg.__wbindgen_bigint_from_i64 = function(arg0) {
562
+ const ret = arg0;
694
563
  return addHeapObject(ret);
695
564
  };
696
- imports.wbg.__wbg_subarray_a1f73cd4b5b42fe1 = function(arg0, arg1, arg2) {
697
- const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
565
+ imports.wbg.__wbindgen_bigint_from_u64 = function(arg0) {
566
+ const ret = BigInt.asUintN(64, arg0);
698
567
  return addHeapObject(ret);
699
568
  };
700
569
  imports.wbg.__wbindgen_bigint_get_as_i64 = function(arg0, arg1) {
701
570
  const v = getObject(arg1);
702
571
  const ret = typeof(v) === 'bigint' ? v : undefined;
703
- getBigInt64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? BigInt(0) : ret;
704
- getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
572
+ getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
573
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
574
+ };
575
+ imports.wbg.__wbindgen_boolean_get = function(arg0) {
576
+ const v = getObject(arg0);
577
+ const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
578
+ return ret;
705
579
  };
706
580
  imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
707
581
  const ret = debugString(getObject(arg1));
708
582
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
709
583
  const len1 = WASM_VECTOR_LEN;
710
- getInt32Memory0()[arg0 / 4 + 1] = len1;
711
- getInt32Memory0()[arg0 / 4 + 0] = ptr1;
584
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
585
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
712
586
  };
713
- imports.wbg.__wbindgen_throw = function(arg0, arg1) {
714
- throw new Error(getStringFromWasm0(arg0, arg1));
587
+ imports.wbg.__wbindgen_error_new = function(arg0, arg1) {
588
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
589
+ return addHeapObject(ret);
590
+ };
591
+ imports.wbg.__wbindgen_in = function(arg0, arg1) {
592
+ const ret = getObject(arg0) in getObject(arg1);
593
+ return ret;
594
+ };
595
+ imports.wbg.__wbindgen_is_bigint = function(arg0) {
596
+ const ret = typeof(getObject(arg0)) === 'bigint';
597
+ return ret;
598
+ };
599
+ imports.wbg.__wbindgen_is_function = function(arg0) {
600
+ const ret = typeof(getObject(arg0)) === 'function';
601
+ return ret;
602
+ };
603
+ imports.wbg.__wbindgen_is_object = function(arg0) {
604
+ const val = getObject(arg0);
605
+ const ret = typeof(val) === 'object' && val !== null;
606
+ return ret;
607
+ };
608
+ imports.wbg.__wbindgen_is_string = function(arg0) {
609
+ const ret = typeof(getObject(arg0)) === 'string';
610
+ return ret;
611
+ };
612
+ imports.wbg.__wbindgen_is_undefined = function(arg0) {
613
+ const ret = getObject(arg0) === undefined;
614
+ return ret;
615
+ };
616
+ imports.wbg.__wbindgen_jsval_eq = function(arg0, arg1) {
617
+ const ret = getObject(arg0) === getObject(arg1);
618
+ return ret;
619
+ };
620
+ imports.wbg.__wbindgen_jsval_loose_eq = function(arg0, arg1) {
621
+ const ret = getObject(arg0) == getObject(arg1);
622
+ return ret;
715
623
  };
716
624
  imports.wbg.__wbindgen_memory = function() {
717
625
  const ret = wasm.memory;
718
626
  return addHeapObject(ret);
719
627
  };
628
+ imports.wbg.__wbindgen_number_get = function(arg0, arg1) {
629
+ const obj = getObject(arg1);
630
+ const ret = typeof(obj) === 'number' ? obj : undefined;
631
+ getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
632
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
633
+ };
634
+ imports.wbg.__wbindgen_number_new = function(arg0) {
635
+ const ret = arg0;
636
+ return addHeapObject(ret);
637
+ };
638
+ imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
639
+ const ret = getObject(arg0);
640
+ return addHeapObject(ret);
641
+ };
642
+ imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
643
+ takeObject(arg0);
644
+ };
645
+ imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
646
+ const obj = getObject(arg1);
647
+ const ret = typeof(obj) === 'string' ? obj : undefined;
648
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
649
+ var len1 = WASM_VECTOR_LEN;
650
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
651
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
652
+ };
653
+ imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
654
+ const ret = getStringFromWasm0(arg0, arg1);
655
+ return addHeapObject(ret);
656
+ };
657
+ imports.wbg.__wbindgen_throw = function(arg0, arg1) {
658
+ throw new Error(getStringFromWasm0(arg0, arg1));
659
+ };
720
660
 
721
661
  return imports;
722
662
  }
723
663
 
724
- function __wbg_init_memory(imports, maybe_memory) {
664
+ function __wbg_init_memory(imports, memory) {
725
665
 
726
666
  }
727
667
 
728
668
  function __wbg_finalize_init(instance, module) {
729
669
  wasm = instance.exports;
730
670
  __wbg_init.__wbindgen_wasm_module = module;
731
- cachedBigInt64Memory0 = null;
732
- cachedFloat64Memory0 = null;
733
- cachedInt32Memory0 = null;
734
- cachedUint8Memory0 = null;
671
+ cachedDataViewMemory0 = null;
672
+ cachedUint8ArrayMemory0 = null;
673
+
735
674
 
736
675
 
737
676
  return wasm;
@@ -740,6 +679,15 @@ function __wbg_finalize_init(instance, module) {
740
679
  function initSync(module) {
741
680
  if (wasm !== undefined) return wasm;
742
681
 
682
+
683
+ if (typeof module !== 'undefined') {
684
+ if (Object.getPrototypeOf(module) === Object.prototype) {
685
+ ({module} = module)
686
+ } else {
687
+ console.warn('using deprecated parameters for `initSync()`; pass a single object instead')
688
+ }
689
+ }
690
+
743
691
  const imports = __wbg_get_imports();
744
692
 
745
693
  __wbg_init_memory(imports);
@@ -753,24 +701,33 @@ function initSync(module) {
753
701
  return __wbg_finalize_init(instance, module);
754
702
  }
755
703
 
756
- async function __wbg_init(input) {
704
+ async function __wbg_init(module_or_path) {
757
705
  if (wasm !== undefined) return wasm;
758
706
 
759
- if (typeof input === 'undefined') {
760
- input = new URL('chai_bg.wasm', import.meta.url);
707
+
708
+ if (typeof module_or_path !== 'undefined') {
709
+ if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
710
+ ({module_or_path} = module_or_path)
711
+ } else {
712
+ console.warn('using deprecated parameters for the initialization function; pass a single object instead')
713
+ }
714
+ }
715
+
716
+ if (typeof module_or_path === 'undefined') {
717
+ module_or_path = new URL('chai_bg.wasm', import.meta.url);
761
718
  }
762
719
  const imports = __wbg_get_imports();
763
720
 
764
- if (typeof input === 'string' || (typeof Request === 'function' && input instanceof Request) || (typeof URL === 'function' && input instanceof URL)) {
765
- input = fetch(input);
721
+ if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {
722
+ module_or_path = fetch(module_or_path);
766
723
  }
767
724
 
768
725
  __wbg_init_memory(imports);
769
726
 
770
- const { instance, module } = await __wbg_load(await input, imports);
727
+ const { instance, module } = await __wbg_load(await module_or_path, imports);
771
728
 
772
729
  return __wbg_finalize_init(instance, module);
773
730
  }
774
731
 
775
- export { initSync }
732
+ export { initSync };
776
733
  export default __wbg_init;