axiam-sdk-wasm 1.1.3 → 1.2.5

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.
@@ -49,12 +49,20 @@ export class AxiamWasmClient {
49
49
  * @returns {Promise<boolean>}
50
50
  */
51
51
  can(action, resource, scope) {
52
- const ptr0 = passStringToWasm0(action, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
53
- const len0 = WASM_VECTOR_LEN;
54
- const ptr1 = passStringToWasm0(resource, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
55
- const len1 = WASM_VECTOR_LEN;
56
- var ptr2 = isLikeNone(scope) ? 0 : passStringToWasm0(scope, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
57
- var len2 = WASM_VECTOR_LEN;
52
+ let ptr0, len0, ptr1, len1, ptr2, len2;
53
+ try {
54
+ ptr0 = passStringToWasm0(action, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
55
+ len0 = WASM_VECTOR_LEN;
56
+ ptr1 = passStringToWasm0(resource, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
57
+ len1 = WASM_VECTOR_LEN;
58
+ ptr2 = isLikeNone(scope) ? 0 : passStringToWasm0(scope, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
59
+ len2 = WASM_VECTOR_LEN;
60
+ } catch (e) {
61
+ if (ptr2) { wasm.__wbindgen_free(ptr2, len2 * 1, 1); }
62
+ if (ptr1) { wasm.__wbindgen_free(ptr1, len1 * 1, 1); }
63
+ if (ptr0) { wasm.__wbindgen_free(ptr0, len0 * 1, 1); }
64
+ throw e;
65
+ }
58
66
  const ret = wasm.axiamwasmclient_can(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
59
67
  return ret;
60
68
  }
@@ -71,12 +79,20 @@ export class AxiamWasmClient {
71
79
  * @returns {Promise<any>}
72
80
  */
73
81
  checkAccess(action, resource, scope) {
74
- const ptr0 = passStringToWasm0(action, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
75
- const len0 = WASM_VECTOR_LEN;
76
- const ptr1 = passStringToWasm0(resource, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
77
- const len1 = WASM_VECTOR_LEN;
78
- var ptr2 = isLikeNone(scope) ? 0 : passStringToWasm0(scope, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
79
- var len2 = WASM_VECTOR_LEN;
82
+ let ptr0, len0, ptr1, len1, ptr2, len2;
83
+ try {
84
+ ptr0 = passStringToWasm0(action, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
85
+ len0 = WASM_VECTOR_LEN;
86
+ ptr1 = passStringToWasm0(resource, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
87
+ len1 = WASM_VECTOR_LEN;
88
+ ptr2 = isLikeNone(scope) ? 0 : passStringToWasm0(scope, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
89
+ len2 = WASM_VECTOR_LEN;
90
+ } catch (e) {
91
+ if (ptr2) { wasm.__wbindgen_free(ptr2, len2 * 1, 1); }
92
+ if (ptr1) { wasm.__wbindgen_free(ptr1, len1 * 1, 1); }
93
+ if (ptr0) { wasm.__wbindgen_free(ptr0, len0 * 1, 1); }
94
+ throw e;
95
+ }
80
96
  const ret = wasm.axiamwasmclient_checkAccess(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
81
97
  return ret;
82
98
  }
@@ -109,10 +125,17 @@ export class AxiamWasmClient {
109
125
  * @returns {Promise<any>}
110
126
  */
111
127
  loginOpaque(username_or_email, password) {
112
- const ptr0 = passStringToWasm0(username_or_email, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
113
- const len0 = WASM_VECTOR_LEN;
114
- const ptr1 = passStringToWasm0(password, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
115
- const len1 = WASM_VECTOR_LEN;
128
+ let ptr0, len0, ptr1, len1;
129
+ try {
130
+ ptr0 = passStringToWasm0(username_or_email, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
131
+ len0 = WASM_VECTOR_LEN;
132
+ ptr1 = passStringToWasm0(password, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
133
+ len1 = WASM_VECTOR_LEN;
134
+ } catch (e) {
135
+ if (ptr1) { wasm.__wbindgen_free(ptr1, len1 * 1, 1); }
136
+ if (ptr0) { wasm.__wbindgen_free(ptr0, len0 * 1, 1); }
137
+ throw e;
138
+ }
116
139
  const ret = wasm.axiamwasmclient_loginOpaque(this.__wbg_ptr, ptr0, len0, ptr1, len1);
117
140
  return ret;
118
141
  }
@@ -127,10 +150,17 @@ export class AxiamWasmClient {
127
150
  * @returns {Promise<any>}
128
151
  */
129
152
  login(username_or_email, password) {
130
- const ptr0 = passStringToWasm0(username_or_email, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
131
- const len0 = WASM_VECTOR_LEN;
132
- const ptr1 = passStringToWasm0(password, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
133
- const len1 = WASM_VECTOR_LEN;
153
+ let ptr0, len0, ptr1, len1;
154
+ try {
155
+ ptr0 = passStringToWasm0(username_or_email, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
156
+ len0 = WASM_VECTOR_LEN;
157
+ ptr1 = passStringToWasm0(password, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
158
+ len1 = WASM_VECTOR_LEN;
159
+ } catch (e) {
160
+ if (ptr1) { wasm.__wbindgen_free(ptr1, len1 * 1, 1); }
161
+ if (ptr0) { wasm.__wbindgen_free(ptr0, len0 * 1, 1); }
162
+ throw e;
163
+ }
134
164
  const ret = wasm.axiamwasmclient_login(this.__wbg_ptr, ptr0, len0, ptr1, len1);
135
165
  return ret;
136
166
  }
@@ -156,12 +186,20 @@ export class AxiamWasmClient {
156
186
  * @param {string} tenant_slug
157
187
  */
158
188
  constructor(base_url, org_slug, tenant_slug) {
159
- const ptr0 = passStringToWasm0(base_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
160
- const len0 = WASM_VECTOR_LEN;
161
- const ptr1 = passStringToWasm0(org_slug, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
162
- const len1 = WASM_VECTOR_LEN;
163
- const ptr2 = passStringToWasm0(tenant_slug, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
164
- const len2 = WASM_VECTOR_LEN;
189
+ let ptr0, len0, ptr1, len1, ptr2, len2;
190
+ try {
191
+ ptr0 = passStringToWasm0(base_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
192
+ len0 = WASM_VECTOR_LEN;
193
+ ptr1 = passStringToWasm0(org_slug, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
194
+ len1 = WASM_VECTOR_LEN;
195
+ ptr2 = passStringToWasm0(tenant_slug, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
196
+ len2 = WASM_VECTOR_LEN;
197
+ } catch (e) {
198
+ if (ptr2) { wasm.__wbindgen_free(ptr2, len2 * 1, 1); }
199
+ if (ptr1) { wasm.__wbindgen_free(ptr1, len1 * 1, 1); }
200
+ if (ptr0) { wasm.__wbindgen_free(ptr0, len0 * 1, 1); }
201
+ throw e;
202
+ }
165
203
  const ret = wasm.axiamwasmclient_new(ptr0, len0, ptr1, len1, ptr2, len2);
166
204
  if (ret[2]) {
167
205
  throw takeFromExternrefTable0(ret[1]);
@@ -280,7 +318,7 @@ export function sdkVersion() {
280
318
  wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
281
319
  }
282
320
  }
283
- export function __wbg_Error_30c8987f7c2ed4e2(arg0, arg1) {
321
+ export function __wbg_Error_208446807d0d1e30(arg0, arg1) {
284
322
  const ret = Error(getStringFromWasm0(arg0, arg1));
285
323
  return ret;
286
324
  }
@@ -288,96 +326,96 @@ export function __wbg_String_8564e559799eccda(arg0, arg1) {
288
326
  const ret = String(arg1);
289
327
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
290
328
  const len1 = WASM_VECTOR_LEN;
291
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
292
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
329
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 1, len1, true);
330
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 0, ptr1, true);
293
331
  }
294
- export function __wbg___wbindgen_boolean_get_5b446f51afd21013(arg0) {
332
+ export function __wbg___wbindgen_boolean_get_4f1baf9a00be3c74(arg0) {
295
333
  const v = arg0;
296
334
  const ret = typeof(v) === 'boolean' ? v : undefined;
297
335
  return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
298
336
  }
299
- export function __wbg___wbindgen_debug_string_4687d8d8c2017d52(arg0, arg1) {
337
+ export function __wbg___wbindgen_debug_string_f249a2a76caa9a55(arg0, arg1) {
300
338
  const ret = debugString(arg1);
301
339
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
302
340
  const len1 = WASM_VECTOR_LEN;
303
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
304
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
341
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 1, len1, true);
342
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 0, ptr1, true);
305
343
  }
306
- export function __wbg___wbindgen_is_function_1f9d30630b8b1d3d(arg0) {
344
+ export function __wbg___wbindgen_is_function_741ff2bb612836f5(arg0) {
307
345
  const ret = typeof(arg0) === 'function';
308
346
  return ret;
309
347
  }
310
- export function __wbg___wbindgen_is_object_3c45d4f2dde4e749(arg0) {
348
+ export function __wbg___wbindgen_is_object_8b968c3ab8e96595(arg0) {
311
349
  const val = arg0;
312
350
  const ret = typeof(val) === 'object' && val !== null;
313
351
  return ret;
314
352
  }
315
- export function __wbg___wbindgen_is_string_90b56bc79aad6f6c(arg0) {
353
+ export function __wbg___wbindgen_is_string_fc456fee5d3317de(arg0) {
316
354
  const ret = typeof(arg0) === 'string';
317
355
  return ret;
318
356
  }
319
- export function __wbg___wbindgen_is_undefined_8865fb403f8fe9d8(arg0) {
357
+ export function __wbg___wbindgen_is_undefined_be5b34249ff1fc15(arg0) {
320
358
  const ret = arg0 === undefined;
321
359
  return ret;
322
360
  }
323
- export function __wbg___wbindgen_jsval_loose_eq_677f21e468d6b461(arg0, arg1) {
361
+ export function __wbg___wbindgen_jsval_loose_eq_b2f214e2e4b30e36(arg0, arg1) {
324
362
  const ret = arg0 == arg1;
325
363
  return ret;
326
364
  }
327
- export function __wbg___wbindgen_number_get_2e0e7dee9f701a71(arg0, arg1) {
365
+ export function __wbg___wbindgen_number_get_934b640d0889af78(arg0, arg1) {
328
366
  const obj = arg1;
329
367
  const ret = typeof(obj) === 'number' ? obj : undefined;
330
- getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
331
- getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
368
+ getDataViewMemory0().setFloat64((arg0 >>> 0) + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
369
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 0, !isLikeNone(ret), true);
332
370
  }
333
- export function __wbg___wbindgen_string_get_0380ccaa2f57f0d9(arg0, arg1) {
371
+ export function __wbg___wbindgen_string_get_7ce8eee7fd327545(arg0, arg1) {
334
372
  const obj = arg1;
335
373
  const ret = typeof(obj) === 'string' ? obj : undefined;
336
374
  var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
337
375
  var len1 = WASM_VECTOR_LEN;
338
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
339
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
376
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 1, len1, true);
377
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 0, ptr1, true);
340
378
  }
341
- export function __wbg___wbindgen_throw_41e9ee4f547fc59a(arg0, arg1) {
379
+ export function __wbg___wbindgen_throw_4c88d8bf264fd984(arg0, arg1) {
342
380
  throw new Error(getStringFromWasm0(arg0, arg1));
343
381
  }
344
- export function __wbg__wbg_cb_unref_dcc1a90847f04c41(arg0) {
382
+ export function __wbg__wbg_cb_unref_09736879a3f67559(arg0) {
345
383
  arg0._wbg_cb_unref();
346
384
  }
347
- export function __wbg_abort_334e7f918b7c5047(arg0, arg1) {
385
+ export function __wbg_abort_d3b62653236ec492(arg0, arg1) {
348
386
  arg0.abort(arg1);
349
387
  }
350
- export function __wbg_abort_f78b99d80248bacb(arg0) {
388
+ export function __wbg_abort_f8d1589eb0c65ee2(arg0) {
351
389
  arg0.abort();
352
390
  }
353
- export function __wbg_append_1938ed58fb5613b8() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
391
+ export function __wbg_append_ba9a4dc30a0323fd() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
354
392
  arg0.append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
355
393
  }, arguments); }
356
- export function __wbg_arrayBuffer_f07be74819944ea2() { return handleError(function (arg0) {
394
+ export function __wbg_arrayBuffer_2c99a9ba14ba536c() { return handleError(function (arg0) {
357
395
  const ret = arg0.arrayBuffer();
358
396
  return ret;
359
397
  }, arguments); }
360
- export function __wbg_call_187d372bd5fdd4aa() { return handleError(function (arg0, arg1, arg2) {
361
- const ret = arg0.call(arg1, arg2);
398
+ export function __wbg_call_40b008ba32f73991() { return handleError(function (arg0, arg1) {
399
+ const ret = arg0.call(arg1);
362
400
  return ret;
363
401
  }, arguments); }
364
- export function __wbg_call_6137034ef55c9d0f() { return handleError(function (arg0, arg1) {
365
- const ret = arg0.call(arg1);
402
+ export function __wbg_call_a410eb4b59ed5965() { return handleError(function (arg0, arg1, arg2) {
403
+ const ret = arg0.call(arg1, arg2);
366
404
  return ret;
367
405
  }, arguments); }
368
406
  export function __wbg_clearTimeout_1daad5c6ee4fcd3b(arg0) {
369
407
  const ret = clearTimeout(arg0);
370
408
  return ret;
371
409
  }
372
- export function __wbg_crypto_38df2bab126b63dc(arg0) {
410
+ export function __wbg_crypto_23f565a907d30078(arg0) {
373
411
  const ret = arg0.crypto;
374
412
  return ret;
375
413
  }
376
- export function __wbg_done_b41a1d26cdb37fb6(arg0) {
414
+ export function __wbg_done_57e08d0be6e30c02(arg0) {
377
415
  const ret = arg0.done;
378
416
  return ret;
379
417
  }
380
- export function __wbg_entries_b55ec7e0dc443355(arg0) {
418
+ export function __wbg_entries_fb0b3ba27a6e0bf7(arg0) {
381
419
  const ret = arg0.entries();
382
420
  return ret;
383
421
  }
@@ -392,45 +430,45 @@ export function __wbg_error_757e9472f8410341(arg0, arg1) {
392
430
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
393
431
  }
394
432
  }
395
- export function __wbg_fetch_7a37768ab67c5bd8(arg0) {
396
- const ret = fetch(arg0);
433
+ export function __wbg_fetch_41d29a2b2428e0c7(arg0, arg1) {
434
+ const ret = arg0.fetch(arg1);
397
435
  return ret;
398
436
  }
399
- export function __wbg_fetch_efc64baf325b084d(arg0, arg1) {
400
- const ret = arg0.fetch(arg1);
437
+ export function __wbg_fetch_7a37768ab67c5bd8(arg0) {
438
+ const ret = fetch(arg0);
401
439
  return ret;
402
440
  }
403
- export function __wbg_getRandomValues_436a51d0629d84e1() { return handleError(function (arg0, arg1) {
441
+ export function __wbg_getRandomValues_8b6f1f663e6f188d() { return handleError(function (arg0, arg1) {
404
442
  globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
405
443
  }, arguments); }
406
- export function __wbg_getRandomValues_c44a50d8cfdaebeb() { return handleError(function (arg0, arg1) {
444
+ export function __wbg_getRandomValues_d2908e0b99612b91() { return handleError(function (arg0, arg1) {
407
445
  arg0.getRandomValues(arg1);
408
446
  }, arguments); }
409
- export function __wbg_getTime_f5a55efff2585d5d(arg0) {
447
+ export function __wbg_getTime_edc91481cbc4cd78(arg0) {
410
448
  const ret = arg0.getTime();
411
449
  return ret;
412
450
  }
413
- export function __wbg_get_658f6698067d9515() { return handleError(function (arg0, arg1) {
451
+ export function __wbg_get_635eea311fa1a291() { return handleError(function (arg0, arg1) {
414
452
  const ret = Reflect.get(arg0, arg1);
415
453
  return ret;
416
454
  }, arguments); }
417
- export function __wbg_get_6c896e0571ddae51(arg0, arg1) {
455
+ export function __wbg_get_d7176cfb76d71114(arg0, arg1) {
418
456
  const ret = arg0[arg1 >>> 0];
419
457
  return ret;
420
458
  }
421
- export function __wbg_get_unchecked_288889d017702237(arg0, arg1) {
459
+ export function __wbg_get_unchecked_e6325ad374eff861(arg0, arg1) {
422
460
  const ret = arg0[arg1 >>> 0];
423
461
  return ret;
424
462
  }
425
- export function __wbg_has_5d6706e5209576c1() { return handleError(function (arg0, arg1) {
463
+ export function __wbg_has_2c4d5cf25ec8c1cf() { return handleError(function (arg0, arg1) {
426
464
  const ret = Reflect.has(arg0, arg1);
427
465
  return ret;
428
466
  }, arguments); }
429
- export function __wbg_headers_eba93595f8944c2f(arg0) {
467
+ export function __wbg_headers_5fc0106c076eb731(arg0) {
430
468
  const ret = arg0.headers;
431
469
  return ret;
432
470
  }
433
- export function __wbg_instanceof_ArrayBuffer_a99f175873e5d9b8(arg0) {
471
+ export function __wbg_instanceof_ArrayBuffer_12cdaa4161423e6b(arg0) {
434
472
  let result;
435
473
  try {
436
474
  result = arg0 instanceof ArrayBuffer;
@@ -440,7 +478,7 @@ export function __wbg_instanceof_ArrayBuffer_a99f175873e5d9b8(arg0) {
440
478
  const ret = result;
441
479
  return ret;
442
480
  }
443
- export function __wbg_instanceof_Response_b8758567269c30b2(arg0) {
481
+ export function __wbg_instanceof_Response_5b0b4f7f1daeae51(arg0) {
444
482
  let result;
445
483
  try {
446
484
  result = arg0 instanceof Response;
@@ -450,7 +488,7 @@ export function __wbg_instanceof_Response_b8758567269c30b2(arg0) {
450
488
  const ret = result;
451
489
  return ret;
452
490
  }
453
- export function __wbg_instanceof_Uint8Array_828cef2aaacafc31(arg0) {
491
+ export function __wbg_instanceof_Uint8Array_d7aeb0dcb3108fea(arg0) {
454
492
  let result;
455
493
  try {
456
494
  result = arg0 instanceof Uint8Array;
@@ -460,70 +498,70 @@ export function __wbg_instanceof_Uint8Array_828cef2aaacafc31(arg0) {
460
498
  const ret = result;
461
499
  return ret;
462
500
  }
463
- export function __wbg_isArray_e15a2ff68ffdbef2(arg0) {
501
+ export function __wbg_isArray_bcf1376d0d732d08(arg0) {
464
502
  const ret = Array.isArray(arg0);
465
503
  return ret;
466
504
  }
467
- export function __wbg_iterator_e3c31c892080e444() {
505
+ export function __wbg_iterator_e4c5e8f68ada7b58() {
468
506
  const ret = Symbol.iterator;
469
507
  return ret;
470
508
  }
471
- export function __wbg_length_7f3c00c40364105e(arg0) {
509
+ export function __wbg_length_186163212ffe79c3(arg0) {
472
510
  const ret = arg0.length;
473
511
  return ret;
474
512
  }
475
- export function __wbg_length_d4bdea10311bd9cf(arg0) {
513
+ export function __wbg_length_b03a0fabb109b1e9(arg0) {
476
514
  const ret = arg0.length;
477
515
  return ret;
478
516
  }
479
- export function __wbg_msCrypto_bd5a034af96bcba6(arg0) {
517
+ export function __wbg_msCrypto_d5f06fad6bf1409b(arg0) {
480
518
  const ret = arg0.msCrypto;
481
519
  return ret;
482
520
  }
483
- export function __wbg_new_0_72d020f0c63443d4() {
521
+ export function __wbg_new_0_36d738a0c8cfac43() {
484
522
  const ret = new Date();
485
523
  return ret;
486
524
  }
487
- export function __wbg_new_1dbf7428bba60a42(arg0) {
525
+ export function __wbg_new_13de428334042d26(arg0) {
488
526
  const ret = new Uint8Array(arg0);
489
527
  return ret;
490
528
  }
491
- export function __wbg_new_227d7c05414eb861() {
492
- const ret = new Error();
529
+ export function __wbg_new_277c27c26f94cbc2() { return handleError(function () {
530
+ const ret = new Headers();
531
+ return ret;
532
+ }, arguments); }
533
+ export function __wbg_new_37eb45aaf5eeb820() {
534
+ const ret = new Array();
493
535
  return ret;
494
536
  }
495
- export function __wbg_new_2e41357094e99294() { return handleError(function () {
537
+ export function __wbg_new_5f28518387ad0e34() { return handleError(function () {
496
538
  const ret = new AbortController();
497
539
  return ret;
498
540
  }, arguments); }
499
- export function __wbg_new_343a093a3c2ffb4e(arg0, arg1) {
541
+ export function __wbg_new_787b9fb330d55d78(arg0, arg1) {
500
542
  const ret = new Error(getStringFromWasm0(arg0, arg1));
501
543
  return ret;
502
544
  }
503
- export function __wbg_new_617a8cdb8bb1130e() {
504
- const ret = new Object();
545
+ export function __wbg_new_bb74001155cb8ca8() {
546
+ const ret = new Error();
505
547
  return ret;
506
548
  }
507
- export function __wbg_new_83ca405eae412a62() { return handleError(function () {
508
- const ret = new Headers();
509
- return ret;
510
- }, arguments); }
511
- export function __wbg_new_ee2291f50781bf1d() {
512
- const ret = new Array();
549
+ export function __wbg_new_cd4348290afae586() {
550
+ const ret = new Object();
513
551
  return ret;
514
552
  }
515
- export function __wbg_new_from_slice_9a868026ffa4208a(arg0, arg1) {
553
+ export function __wbg_new_from_slice_b8daf545a41c6aa0(arg0, arg1) {
516
554
  const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
517
555
  return ret;
518
556
  }
519
- export function __wbg_new_typed_b01cb72a8af741a3(arg0, arg1) {
557
+ export function __wbg_new_typed_e09da9dae6ee5935(arg0, arg1) {
520
558
  try {
521
559
  var state0 = {a: arg0, b: arg1};
522
560
  var cb0 = (arg0, arg1) => {
523
561
  const a = state0.a;
524
562
  state0.a = 0;
525
563
  try {
526
- return wasm_bindgen_7b836f8fa6c91627___convert__closures_____invoke___js_sys_5186bfb419067290___Function_fn_wasm_bindgen_7b836f8fa6c91627___JsValue_____wasm_bindgen_7b836f8fa6c91627___sys__Undefined___js_sys_5186bfb419067290___Function_fn_wasm_bindgen_7b836f8fa6c91627___JsValue_____wasm_bindgen_7b836f8fa6c91627___sys__Undefined_______true_(a, state0.b, arg0, arg1);
564
+ return wasm_bindgen_580c7edf9b7e6dd6___convert__closures_____invoke___js_sys_c8006d49073aae9a___Function_fn_wasm_bindgen_580c7edf9b7e6dd6___JsValue_____wasm_bindgen_580c7edf9b7e6dd6___sys__Undefined___js_sys_c8006d49073aae9a___Function_fn_wasm_bindgen_580c7edf9b7e6dd6___JsValue_____wasm_bindgen_580c7edf9b7e6dd6___sys__Undefined_______true_(a, state0.b, arg0, arg1);
527
565
  } finally {
528
566
  state0.a = a;
529
567
  }
@@ -534,23 +572,23 @@ export function __wbg_new_typed_b01cb72a8af741a3(arg0, arg1) {
534
572
  state0.a = 0;
535
573
  }
536
574
  }
537
- export function __wbg_new_with_length_3da0ad195f6f63ba(arg0) {
575
+ export function __wbg_new_with_length_01b143a7e5dd5a3e(arg0) {
538
576
  const ret = new Uint8Array(arg0 >>> 0);
539
577
  return ret;
540
578
  }
541
- export function __wbg_new_with_str_and_init_4618dee4e950224f() { return handleError(function (arg0, arg1, arg2) {
579
+ export function __wbg_new_with_str_and_init_d9f6b5611184e16b() { return handleError(function (arg0, arg1, arg2) {
542
580
  const ret = new Request(getStringFromWasm0(arg0, arg1), arg2);
543
581
  return ret;
544
582
  }, arguments); }
545
- export function __wbg_next_33784799010f1bbe(arg0) {
583
+ export function __wbg_next_178c1651c11432b3(arg0) {
546
584
  const ret = arg0.next;
547
585
  return ret;
548
586
  }
549
- export function __wbg_next_f4aac29c42af995c() { return handleError(function (arg0) {
587
+ export function __wbg_next_af5ac6a08bb0a717() { return handleError(function (arg0) {
550
588
  const ret = arg0.next();
551
589
  return ret;
552
590
  }, arguments); }
553
- export function __wbg_node_84ea875411254db1(arg0) {
591
+ export function __wbg_node_86166ff8ce1f2002(arg0) {
554
592
  const ret = arg0.node;
555
593
  return ret;
556
594
  }
@@ -558,32 +596,32 @@ export function __wbg_now_e7c6795a7f81e10f(arg0) {
558
596
  const ret = arg0.now();
559
597
  return ret;
560
598
  }
561
- export function __wbg_performance_3fcf6e32a7e1ed0a(arg0) {
599
+ export function __wbg_performance_7e4e4494fdc9d07a(arg0) {
562
600
  const ret = arg0.performance;
563
601
  return ret;
564
602
  }
565
- export function __wbg_process_44c7a14e11e9f69e(arg0) {
603
+ export function __wbg_process_91f425a63f58e399(arg0) {
566
604
  const ret = arg0.process;
567
605
  return ret;
568
606
  }
569
- export function __wbg_prototypesetcall_bc27214492979395(arg0, arg1, arg2) {
607
+ export function __wbg_prototypesetcall_13162965d1fe7aa3(arg0, arg1, arg2) {
570
608
  Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
571
609
  }
572
- export function __wbg_queueMicrotask_9833f9a49df95a49(arg0) {
610
+ export function __wbg_queueMicrotask_1e8503a8a690f0a3(arg0) {
573
611
  const ret = arg0.queueMicrotask;
574
612
  return ret;
575
613
  }
576
- export function __wbg_queueMicrotask_a72f977e97f23c5f(arg0) {
614
+ export function __wbg_queueMicrotask_4a1a4d8dd332373b(arg0) {
577
615
  queueMicrotask(arg0);
578
616
  }
579
- export function __wbg_randomFillSync_6c25eac9869eb53c() { return handleError(function (arg0, arg1) {
617
+ export function __wbg_randomFillSync_34b023059e3363de() { return handleError(function (arg0, arg1) {
580
618
  arg0.randomFillSync(arg1);
581
619
  }, arguments); }
582
- export function __wbg_require_b4edbdcf3e2a1ef0() { return handleError(function () {
620
+ export function __wbg_require_9a7d8cc2e1d275c0() { return handleError(function () {
583
621
  const ret = module.require;
584
622
  return ret;
585
623
  }, arguments); }
586
- export function __wbg_resolve_0076e10020304ede(arg0) {
624
+ export function __wbg_resolve_dbf78ab4942478b0(arg0) {
587
625
  const ret = Promise.resolve(arg0);
588
626
  return ret;
589
627
  }
@@ -591,109 +629,109 @@ export function __wbg_setTimeout_b4a9096784635514(arg0, arg1) {
591
629
  const ret = setTimeout(arg0, arg1);
592
630
  return ret;
593
631
  }
594
- export function __wbg_set_6be42768c690e380(arg0, arg1, arg2) {
595
- arg0[arg1] = arg2;
596
- }
597
- export function __wbg_set_bea140a88be9b277(arg0, arg1, arg2) {
598
- arg0[arg1 >>> 0] = arg2;
599
- }
600
- export function __wbg_set_body_1fb0f1008bfc7df6(arg0, arg1) {
632
+ export function __wbg_set_body_877d5251e78ca815(arg0, arg1) {
601
633
  arg0.body = arg1;
602
634
  }
603
- export function __wbg_set_cache_7507c4cc5938ccc7(arg0, arg1) {
635
+ export function __wbg_set_cache_7a23201e29cbd632(arg0, arg1) {
604
636
  arg0.cache = __wbindgen_enum_RequestCache[arg1];
605
637
  }
606
- export function __wbg_set_credentials_e0dcce31ca532b7d(arg0, arg1) {
638
+ export function __wbg_set_credentials_bb5277b4006149d4(arg0, arg1) {
607
639
  arg0.credentials = __wbindgen_enum_RequestCredentials[arg1];
608
640
  }
609
- export function __wbg_set_headers_40ad33dcf016613f(arg0, arg1) {
641
+ export function __wbg_set_d2d33b52458e984a(arg0, arg1, arg2) {
642
+ arg0[arg1 >>> 0] = arg2;
643
+ }
644
+ export function __wbg_set_e4b9a833d288759a(arg0, arg1, arg2) {
645
+ arg0[arg1] = arg2;
646
+ }
647
+ export function __wbg_set_headers_6d75a7df4eb22716(arg0, arg1) {
610
648
  arg0.headers = arg1;
611
649
  }
612
- export function __wbg_set_method_dcb32343247ec427(arg0, arg1, arg2) {
650
+ export function __wbg_set_method_639e69af35614d36(arg0, arg1, arg2) {
613
651
  arg0.method = getStringFromWasm0(arg1, arg2);
614
652
  }
615
- export function __wbg_set_mode_74e772635acb96ec(arg0, arg1) {
653
+ export function __wbg_set_mode_07e051ad8b4e2126(arg0, arg1) {
616
654
  arg0.mode = __wbindgen_enum_RequestMode[arg1];
617
655
  }
618
- export function __wbg_set_referrer_efd0fb956d6b70b2(arg0, arg1, arg2) {
656
+ export function __wbg_set_referrer_413a47ffe5e2e157(arg0, arg1, arg2) {
619
657
  arg0.referrer = getStringFromWasm0(arg1, arg2);
620
658
  }
621
- export function __wbg_set_referrer_policy_465382f52c1a03d3(arg0, arg1) {
659
+ export function __wbg_set_referrer_policy_f3e837a21403cf06(arg0, arg1) {
622
660
  arg0.referrerPolicy = __wbindgen_enum_ReferrerPolicy[arg1];
623
661
  }
624
- export function __wbg_set_signal_2dbd377604627f26(arg0, arg1) {
662
+ export function __wbg_set_signal_0b2eee78907e5ba7(arg0, arg1) {
625
663
  arg0.signal = arg1;
626
664
  }
627
- export function __wbg_signal_e5a49a2d9c65b7f6(arg0) {
665
+ export function __wbg_signal_fac908876f45725d(arg0) {
628
666
  const ret = arg0.signal;
629
667
  return ret;
630
668
  }
631
- export function __wbg_stack_3b0d974bbf31e44f(arg0, arg1) {
669
+ export function __wbg_stack_575c4e0918581b9c(arg0, arg1) {
632
670
  const ret = arg1.stack;
633
671
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
634
672
  const len1 = WASM_VECTOR_LEN;
635
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
636
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
673
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 1, len1, true);
674
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 0, ptr1, true);
637
675
  }
638
- export function __wbg_static_accessor_GLOBAL_266715b9d96ba635() {
639
- const ret = typeof global === 'undefined' ? null : global;
676
+ export function __wbg_static_accessor_GLOBAL_THIS_003ee833af9699fc() {
677
+ const ret = typeof globalThis === 'undefined' ? undefined : globalThis;
640
678
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
641
679
  }
642
- export function __wbg_static_accessor_GLOBAL_THIS_10fb7dc1ae063179() {
643
- const ret = typeof globalThis === 'undefined' ? null : globalThis;
680
+ export function __wbg_static_accessor_GLOBAL_e4293fb22cbe77da() {
681
+ const ret = typeof global === 'undefined' ? undefined : global;
644
682
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
645
683
  }
646
- export function __wbg_static_accessor_SELF_0b583911f537483a() {
647
- const ret = typeof self === 'undefined' ? null : self;
684
+ export function __wbg_static_accessor_SELF_53bb20457401453d() {
685
+ const ret = typeof self === 'undefined' ? undefined : self;
648
686
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
649
687
  }
650
- export function __wbg_static_accessor_WINDOW_d7f903d1508cbdc4() {
651
- const ret = typeof window === 'undefined' ? null : window;
688
+ export function __wbg_static_accessor_WINDOW_b5e0810bfecb7feb() {
689
+ const ret = typeof window === 'undefined' ? undefined : window;
652
690
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
653
691
  }
654
- export function __wbg_status_ce0a98d3c57125f3(arg0) {
692
+ export function __wbg_status_cb85b6c8d1769fa1(arg0) {
655
693
  const ret = arg0.status;
656
694
  return ret;
657
695
  }
658
- export function __wbg_subarray_002b94d5e13d1411(arg0, arg1, arg2) {
696
+ export function __wbg_subarray_58f388a9247ac0bb(arg0, arg1, arg2) {
659
697
  const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
660
698
  return ret;
661
699
  }
662
- export function __wbg_text_ff3f476b3d6b1246() { return handleError(function (arg0) {
700
+ export function __wbg_text_5240eb2c41de8292() { return handleError(function (arg0) {
663
701
  const ret = arg0.text();
664
702
  return ret;
665
703
  }, arguments); }
666
- export function __wbg_then_c949d5a25a4e78f8(arg0, arg1, arg2) {
704
+ export function __wbg_then_656f253a5dd7d8ea(arg0, arg1, arg2) {
667
705
  const ret = arg0.then(arg1, arg2);
668
706
  return ret;
669
707
  }
670
- export function __wbg_then_e71170d78fcf8954(arg0, arg1) {
708
+ export function __wbg_then_e3f7f2d365708be8(arg0, arg1) {
671
709
  const ret = arg0.then(arg1);
672
710
  return ret;
673
711
  }
674
- export function __wbg_url_8e28edeab4cd6bed(arg0, arg1) {
712
+ export function __wbg_url_9fadea28ec624f1d(arg0, arg1) {
675
713
  const ret = arg1.url;
676
714
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
677
715
  const len1 = WASM_VECTOR_LEN;
678
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
679
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
716
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 1, len1, true);
717
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 0, ptr1, true);
680
718
  }
681
- export function __wbg_value_f3c585ee8f5ba40c(arg0) {
719
+ export function __wbg_value_e0f328965e184931(arg0) {
682
720
  const ret = arg0.value;
683
721
  return ret;
684
722
  }
685
- export function __wbg_versions_276b2795b1c6a219(arg0) {
723
+ export function __wbg_versions_6e128a981b0df859(arg0) {
686
724
  const ret = arg0.versions;
687
725
  return ret;
688
726
  }
689
727
  export function __wbindgen_generic_0000000000000001(arg0, arg1) {
690
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 524, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
691
- const ret = makeMutClosure(arg0, arg1, wasm_bindgen_7b836f8fa6c91627___convert__closures_____invoke___wasm_bindgen_7b836f8fa6c91627___JsValue__core_37ee0ce0c4cd57d5___result__Result_____wasm_bindgen_7b836f8fa6c91627___JsError___true_);
728
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 527, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
729
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen_580c7edf9b7e6dd6___convert__closures_____invoke___wasm_bindgen_580c7edf9b7e6dd6___JsValue__core_37ee0ce0c4cd57d5___result__Result_____wasm_bindgen_580c7edf9b7e6dd6___JsError___true_);
692
730
  return ret;
693
731
  }
694
732
  export function __wbindgen_generic_0000000000000002(arg0, arg1) {
695
733
  // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 172, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
696
- const ret = makeMutClosure(arg0, arg1, wasm_bindgen_7b836f8fa6c91627___convert__closures_____invoke_______true_);
734
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen_580c7edf9b7e6dd6___convert__closures_____invoke_______true_);
697
735
  return ret;
698
736
  }
699
737
  export function __wbindgen_generic_0000000000000003(arg0) {
@@ -718,26 +756,25 @@ export function __wbindgen_generic_0000000000000006(arg0) {
718
756
  }
719
757
  export function __wbindgen_init_externref_table() {
720
758
  const table = wasm.__wbindgen_externrefs;
721
- const offset = table.grow(4);
722
759
  table.set(0, undefined);
723
- table.set(offset + 0, undefined);
724
- table.set(offset + 1, null);
725
- table.set(offset + 2, true);
726
- table.set(offset + 3, false);
760
+ table.set(1024, undefined);
761
+ table.set(1025, null);
762
+ table.set(1026, true);
763
+ table.set(1027, false);
727
764
  }
728
- function wasm_bindgen_7b836f8fa6c91627___convert__closures_____invoke_______true_(arg0, arg1) {
729
- wasm.wasm_bindgen_7b836f8fa6c91627___convert__closures_____invoke_______true_(arg0, arg1);
765
+ function wasm_bindgen_580c7edf9b7e6dd6___convert__closures_____invoke_______true_(arg0, arg1) {
766
+ wasm.wasm_bindgen_580c7edf9b7e6dd6___convert__closures_____invoke_______true_(arg0, arg1);
730
767
  }
731
768
 
732
- function wasm_bindgen_7b836f8fa6c91627___convert__closures_____invoke___wasm_bindgen_7b836f8fa6c91627___JsValue__core_37ee0ce0c4cd57d5___result__Result_____wasm_bindgen_7b836f8fa6c91627___JsError___true_(arg0, arg1, arg2) {
733
- const ret = wasm.wasm_bindgen_7b836f8fa6c91627___convert__closures_____invoke___wasm_bindgen_7b836f8fa6c91627___JsValue__core_37ee0ce0c4cd57d5___result__Result_____wasm_bindgen_7b836f8fa6c91627___JsError___true_(arg0, arg1, arg2);
769
+ function wasm_bindgen_580c7edf9b7e6dd6___convert__closures_____invoke___wasm_bindgen_580c7edf9b7e6dd6___JsValue__core_37ee0ce0c4cd57d5___result__Result_____wasm_bindgen_580c7edf9b7e6dd6___JsError___true_(arg0, arg1, arg2) {
770
+ const ret = wasm.wasm_bindgen_580c7edf9b7e6dd6___convert__closures_____invoke___wasm_bindgen_580c7edf9b7e6dd6___JsValue__core_37ee0ce0c4cd57d5___result__Result_____wasm_bindgen_580c7edf9b7e6dd6___JsError___true_(arg0, arg1, arg2);
734
771
  if (ret[1]) {
735
772
  throw takeFromExternrefTable0(ret[0]);
736
773
  }
737
774
  }
738
775
 
739
- function wasm_bindgen_7b836f8fa6c91627___convert__closures_____invoke___js_sys_5186bfb419067290___Function_fn_wasm_bindgen_7b836f8fa6c91627___JsValue_____wasm_bindgen_7b836f8fa6c91627___sys__Undefined___js_sys_5186bfb419067290___Function_fn_wasm_bindgen_7b836f8fa6c91627___JsValue_____wasm_bindgen_7b836f8fa6c91627___sys__Undefined_______true_(arg0, arg1, arg2, arg3) {
740
- wasm.wasm_bindgen_7b836f8fa6c91627___convert__closures_____invoke___js_sys_5186bfb419067290___Function_fn_wasm_bindgen_7b836f8fa6c91627___JsValue_____wasm_bindgen_7b836f8fa6c91627___sys__Undefined___js_sys_5186bfb419067290___Function_fn_wasm_bindgen_7b836f8fa6c91627___JsValue_____wasm_bindgen_7b836f8fa6c91627___sys__Undefined_______true_(arg0, arg1, arg2, arg3);
776
+ function wasm_bindgen_580c7edf9b7e6dd6___convert__closures_____invoke___js_sys_c8006d49073aae9a___Function_fn_wasm_bindgen_580c7edf9b7e6dd6___JsValue_____wasm_bindgen_580c7edf9b7e6dd6___sys__Undefined___js_sys_c8006d49073aae9a___Function_fn_wasm_bindgen_580c7edf9b7e6dd6___JsValue_____wasm_bindgen_580c7edf9b7e6dd6___sys__Undefined_______true_(arg0, arg1, arg2, arg3) {
777
+ wasm.wasm_bindgen_580c7edf9b7e6dd6___convert__closures_____invoke___js_sys_c8006d49073aae9a___Function_fn_wasm_bindgen_580c7edf9b7e6dd6___JsValue_____wasm_bindgen_580c7edf9b7e6dd6___sys__Undefined___js_sys_c8006d49073aae9a___Function_fn_wasm_bindgen_580c7edf9b7e6dd6___JsValue_____wasm_bindgen_580c7edf9b7e6dd6___sys__Undefined_______true_(arg0, arg1, arg2, arg3);
741
778
  }
742
779
 
743
780
 
@@ -766,68 +803,61 @@ const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
766
803
  : new FinalizationRegistry(state => wasm.__wbindgen_destroy_closure(state.a, state.b));
767
804
 
768
805
  function debugString(val) {
769
- // primitive types
770
- const type = typeof val;
771
- if (type == 'number' || type == 'boolean' || val == null) {
772
- return `${val}`;
773
- }
774
- if (type == 'string') {
775
- return `"${val}"`;
776
- }
777
- if (type == 'symbol') {
778
- const description = val.description;
779
- if (description == null) {
780
- return 'Symbol';
781
- } else {
782
- return `Symbol(${description})`;
783
- }
784
- }
785
- if (type == 'function') {
786
- const name = val.name;
787
- if (typeof name == 'string' && name.length > 0) {
788
- return `Function(${name})`;
789
- } else {
790
- return 'Function';
791
- }
792
- }
793
- // objects
794
- if (Array.isArray(val)) {
795
- const length = val.length;
796
- let debug = '[';
797
- if (length > 0) {
798
- debug += debugString(val[0]);
799
- }
800
- for(let i = 1; i < length; i++) {
801
- debug += ', ' + debugString(val[i]);
802
- }
803
- debug += ']';
804
- return debug;
805
- }
806
- // Test for built-in
807
- const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
808
- let className;
809
- if (builtInMatches && builtInMatches.length > 1) {
810
- className = builtInMatches[1];
811
- } else {
812
- // Failed to match the standard '[object ClassName]'
813
- return toString.call(val);
814
- }
815
- if (className == 'Object') {
816
- // we're a user defined class or Object
817
- // JSON.stringify avoids problems with cycles, and is generally much
818
- // easier than looping through ownProperties of `val`.
819
- try {
820
- return 'Object(' + JSON.stringify(val) + ')';
821
- } catch (_) {
822
- return 'Object';
806
+ switch (typeof val) {
807
+ // primitive types
808
+ case 'number':
809
+ case 'boolean':
810
+ case 'undefined':
811
+ return `${val}`;
812
+ case 'string':
813
+ return JSON.stringify(val);
814
+ case 'bigint':
815
+ return `${val}n`;
816
+ case 'symbol':
817
+ return val.description !== undefined
818
+ ? `Symbol(${val.description})`
819
+ : 'Symbol';
820
+ case 'function':
821
+ return typeof val.name === 'string' && val.name !== ''
822
+ ? `Function(${val.name})`
823
+ : 'Function';
824
+ case 'object': {
825
+ if (val === null) {
826
+ return 'null';
827
+ }
828
+ // objects
829
+ if (Array.isArray(val)) {
830
+ return '[' + Array.from(val, debugString).join(', ') + ']';
831
+ }
832
+ // errors
833
+ if (val instanceof Error) {
834
+ return `${val.name}: ${val.message}\n${val.stack}`;
835
+ }
836
+
837
+ const toStringOutput = toString.call(val);
838
+ // Test for built-in
839
+ const className = /\[object ([^\]]+)\]/.exec(toStringOutput)?.[1];
840
+
841
+ // Failed to match the standard '[object ClassName]'
842
+ if (className === undefined) {
843
+ return toStringOutput;
844
+ }
845
+ if (className === 'Object') {
846
+ // we're a user defined class or Object
847
+ // JSON.stringify avoids problems with cycles, and is generally much
848
+ // easier than looping through ownProperties of `val`.
849
+ try {
850
+ return 'Object(' + JSON.stringify(val) + ')';
851
+ } catch (_) {
852
+ return 'Object';
853
+ }
854
+ }
855
+ // TODO we could test for more things here, like `Set`s and `Map`s.
856
+ return className;
823
857
  }
858
+ // Per MDN: 'This list of values is exhaustive.'
859
+ // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof#description
824
860
  }
825
- // errors
826
- if (val instanceof Error) {
827
- return `${val.name}: ${val.message}\n${val.stack}`;
828
- }
829
- // TODO we could test for more things here, like `Set`s and `Map`s.
830
- return className;
831
861
  }
832
862
 
833
863
  function getArrayU8FromWasm0(ptr, len) {
@@ -844,7 +874,8 @@ function getDataViewMemory0() {
844
874
  }
845
875
 
846
876
  function getStringFromWasm0(ptr, len) {
847
- return decodeText(ptr >>> 0, len);
877
+ ptr = ptr >>> 0;
878
+ return decodeText(getUint8ArrayMemory0().subarray(ptr, ptr + len));
848
879
  }
849
880
 
850
881
  let cachedUint8ArrayMemory0 = null;
@@ -939,18 +970,18 @@ function takeFromExternrefTable0(idx) {
939
970
  return value;
940
971
  }
941
972
 
942
- let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
973
+ let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true });
943
974
  cachedTextDecoder.decode();
944
975
  const MAX_SAFARI_DECODE_BYTES = 2146435072;
945
976
  let numBytesDecoded = 0;
946
- function decodeText(ptr, len) {
947
- numBytesDecoded += len;
977
+ function decodeText(bytes) {
978
+ numBytesDecoded += bytes.length;
948
979
  if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
949
- cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
980
+ cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true });
950
981
  cachedTextDecoder.decode();
951
- numBytesDecoded = len;
982
+ numBytesDecoded = bytes.length;
952
983
  }
953
- return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
984
+ return cachedTextDecoder.decode(bytes);
954
985
  }
955
986
 
956
987
  const cachedTextEncoder = new TextEncoder();
Binary file
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "axiam-sdk-wasm",
3
3
  "type": "module",
4
4
  "description": "Browser (WebAssembly) build of the official AXIAM IAM client SDK",
5
- "version": "1.1.3",
5
+ "version": "1.2.5",
6
6
  "license": "Apache-2.0",
7
7
  "repository": {
8
8
  "type": "git",