@bitwarden/sdk-internal 0.2.0-main.9 → 0.2.0-main.90

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.
@@ -3,12 +3,15 @@ export function __wbg_set_wasm(val) {
3
3
  wasm = val;
4
4
  }
5
5
 
6
- const lTextDecoder =
7
- typeof TextDecoder === "undefined" ? (0, module.require)("util").TextDecoder : TextDecoder;
6
+ const heap = new Array(128).fill(undefined);
8
7
 
9
- let cachedTextDecoder = new lTextDecoder("utf-8", { ignoreBOM: true, fatal: true });
8
+ heap.push(undefined, null, true, false);
10
9
 
11
- cachedTextDecoder.decode();
10
+ function getObject(idx) {
11
+ return heap[idx];
12
+ }
13
+
14
+ let WASM_VECTOR_LEN = 0;
12
15
 
13
16
  let cachedUint8ArrayMemory0 = null;
14
17
 
@@ -19,44 +22,6 @@ function getUint8ArrayMemory0() {
19
22
  return cachedUint8ArrayMemory0;
20
23
  }
21
24
 
22
- function getStringFromWasm0(ptr, len) {
23
- ptr = ptr >>> 0;
24
- return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
25
- }
26
-
27
- const heap = new Array(128).fill(undefined);
28
-
29
- heap.push(undefined, null, true, false);
30
-
31
- let heap_next = heap.length;
32
-
33
- function addHeapObject(obj) {
34
- if (heap_next === heap.length) heap.push(heap.length + 1);
35
- const idx = heap_next;
36
- heap_next = heap[idx];
37
-
38
- heap[idx] = obj;
39
- return idx;
40
- }
41
-
42
- function getObject(idx) {
43
- return heap[idx];
44
- }
45
-
46
- function dropObject(idx) {
47
- if (idx < 132) return;
48
- heap[idx] = heap_next;
49
- heap_next = idx;
50
- }
51
-
52
- function takeObject(idx) {
53
- const ret = getObject(idx);
54
- dropObject(idx);
55
- return ret;
56
- }
57
-
58
- let WASM_VECTOR_LEN = 0;
59
-
60
25
  const lTextEncoder =
61
26
  typeof TextEncoder === "undefined" ? (0, module.require)("util").TextEncoder : TextEncoder;
62
27
 
@@ -116,10 +81,6 @@ function passStringToWasm0(arg, malloc, realloc) {
116
81
  return ptr;
117
82
  }
118
83
 
119
- function isLikeNone(x) {
120
- return x === undefined || x === null;
121
- }
122
-
123
84
  let cachedDataViewMemory0 = null;
124
85
 
125
86
  function getDataViewMemory0() {
@@ -134,6 +95,85 @@ function getDataViewMemory0() {
134
95
  return cachedDataViewMemory0;
135
96
  }
136
97
 
98
+ const lTextDecoder =
99
+ typeof TextDecoder === "undefined" ? (0, module.require)("util").TextDecoder : TextDecoder;
100
+
101
+ let cachedTextDecoder = new lTextDecoder("utf-8", { ignoreBOM: true, fatal: true });
102
+
103
+ cachedTextDecoder.decode();
104
+
105
+ function getStringFromWasm0(ptr, len) {
106
+ ptr = ptr >>> 0;
107
+ return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
108
+ }
109
+
110
+ let heap_next = heap.length;
111
+
112
+ function addHeapObject(obj) {
113
+ if (heap_next === heap.length) heap.push(heap.length + 1);
114
+ const idx = heap_next;
115
+ heap_next = heap[idx];
116
+
117
+ heap[idx] = obj;
118
+ return idx;
119
+ }
120
+
121
+ function handleError(f, args) {
122
+ try {
123
+ return f.apply(this, args);
124
+ } catch (e) {
125
+ wasm.__wbindgen_exn_store(addHeapObject(e));
126
+ }
127
+ }
128
+
129
+ function dropObject(idx) {
130
+ if (idx < 132) return;
131
+ heap[idx] = heap_next;
132
+ heap_next = idx;
133
+ }
134
+
135
+ function takeObject(idx) {
136
+ const ret = getObject(idx);
137
+ dropObject(idx);
138
+ return ret;
139
+ }
140
+
141
+ function isLikeNone(x) {
142
+ return x === undefined || x === null;
143
+ }
144
+
145
+ const CLOSURE_DTORS =
146
+ typeof FinalizationRegistry === "undefined"
147
+ ? { register: () => {}, unregister: () => {} }
148
+ : new FinalizationRegistry((state) => {
149
+ wasm.__wbindgen_export_4.get(state.dtor)(state.a, state.b);
150
+ });
151
+
152
+ function makeMutClosure(arg0, arg1, dtor, f) {
153
+ const state = { a: arg0, b: arg1, cnt: 1, dtor };
154
+ const real = (...args) => {
155
+ // First up with a closure we increment the internal reference
156
+ // count. This ensures that the Rust closure environment won't
157
+ // be deallocated while we're invoking it.
158
+ state.cnt++;
159
+ const a = state.a;
160
+ state.a = 0;
161
+ try {
162
+ return f(a, state.b, ...args);
163
+ } finally {
164
+ if (--state.cnt === 0) {
165
+ wasm.__wbindgen_export_4.get(state.dtor)(a, state.b);
166
+ CLOSURE_DTORS.unregister(state);
167
+ } else {
168
+ state.a = a;
169
+ }
170
+ }
171
+ };
172
+ real.original = state;
173
+ CLOSURE_DTORS.register(real, state, state);
174
+ return real;
175
+ }
176
+
137
177
  function debugString(val) {
138
178
  // primitive types
139
179
  const type = typeof val;
@@ -175,7 +215,7 @@ function debugString(val) {
175
215
  // Test for built-in
176
216
  const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
177
217
  let className;
178
- if (builtInMatches.length > 1) {
218
+ if (builtInMatches && builtInMatches.length > 1) {
179
219
  className = builtInMatches[1];
180
220
  } else {
181
221
  // Failed to match the standard '[object ClassName]'
@@ -199,45 +239,6 @@ function debugString(val) {
199
239
  return className;
200
240
  }
201
241
 
202
- const CLOSURE_DTORS =
203
- typeof FinalizationRegistry === "undefined"
204
- ? { register: () => {}, unregister: () => {} }
205
- : new FinalizationRegistry((state) => {
206
- wasm.__wbindgen_export_2.get(state.dtor)(state.a, state.b);
207
- });
208
-
209
- function makeMutClosure(arg0, arg1, dtor, f) {
210
- const state = { a: arg0, b: arg1, cnt: 1, dtor };
211
- const real = (...args) => {
212
- // First up with a closure we increment the internal reference
213
- // count. This ensures that the Rust closure environment won't
214
- // be deallocated while we're invoking it.
215
- state.cnt++;
216
- const a = state.a;
217
- state.a = 0;
218
- try {
219
- return f(a, state.b, ...args);
220
- } finally {
221
- if (--state.cnt === 0) {
222
- wasm.__wbindgen_export_2.get(state.dtor)(a, state.b);
223
- CLOSURE_DTORS.unregister(state);
224
- } else {
225
- state.a = a;
226
- }
227
- }
228
- };
229
- real.original = state;
230
- CLOSURE_DTORS.register(real, state, state);
231
- return real;
232
- }
233
- function __wbg_adapter_38(arg0, arg1, arg2) {
234
- wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hcab43b83560065d8(
235
- arg0,
236
- arg1,
237
- addHeapObject(arg2),
238
- );
239
- }
240
-
241
242
  let stack_pointer = 128;
242
243
 
243
244
  function addBorrowedObject(obj) {
@@ -249,9 +250,9 @@ function addBorrowedObject(obj) {
249
250
  * @param {any} error
250
251
  * @returns {boolean}
251
252
  */
252
- export function isCoreError(error) {
253
+ export function isEncryptionSettingsError(error) {
253
254
  try {
254
- const ret = wasm.isCoreError(addBorrowedObject(error));
255
+ const ret = wasm.isEncryptionSettingsError(addBorrowedObject(error));
255
256
  return ret !== 0;
256
257
  } finally {
257
258
  heap[stack_pointer++] = undefined;
@@ -262,9 +263,9 @@ export function isCoreError(error) {
262
263
  * @param {any} error
263
264
  * @returns {boolean}
264
265
  */
265
- export function isEncryptionSettingsError(error) {
266
+ export function isCryptoError(error) {
266
267
  try {
267
- const ret = wasm.isEncryptionSettingsError(addBorrowedObject(error));
268
+ const ret = wasm.isCryptoError(addBorrowedObject(error));
268
269
  return ret !== 0;
269
270
  } finally {
270
271
  heap[stack_pointer++] = undefined;
@@ -275,69 +276,245 @@ export function isEncryptionSettingsError(error) {
275
276
  * @param {any} error
276
277
  * @returns {boolean}
277
278
  */
278
- export function isTestError(error) {
279
+ export function isSshKeyExportError(error) {
279
280
  try {
280
- const ret = wasm.isTestError(addBorrowedObject(error));
281
+ const ret = wasm.isSshKeyExportError(addBorrowedObject(error));
281
282
  return ret !== 0;
282
283
  } finally {
283
284
  heap[stack_pointer++] = undefined;
284
285
  }
285
286
  }
286
287
 
287
- function handleError(f, args) {
288
+ /**
289
+ * @param {any} error
290
+ * @returns {boolean}
291
+ */
292
+ export function isSshKeyImportError(error) {
288
293
  try {
289
- return f.apply(this, args);
290
- } catch (e) {
291
- wasm.__wbindgen_exn_store(addHeapObject(e));
294
+ const ret = wasm.isSshKeyImportError(addBorrowedObject(error));
295
+ return ret !== 0;
296
+ } finally {
297
+ heap[stack_pointer++] = undefined;
292
298
  }
293
299
  }
294
- function __wbg_adapter_107(arg0, arg1, arg2, arg3) {
295
- wasm.wasm_bindgen__convert__closures__invoke2_mut__h7363c1bfa226a55d(
296
- arg0,
297
- arg1,
298
- addHeapObject(arg2),
299
- addHeapObject(arg3),
300
- );
301
- }
302
-
303
- export const LogLevel = Object.freeze({
304
- Trace: 0,
305
- 0: "Trace",
306
- Debug: 1,
307
- 1: "Debug",
308
- Info: 2,
309
- 2: "Info",
310
- Warn: 3,
311
- 3: "Warn",
312
- Error: 4,
313
- 4: "Error",
314
- });
315
-
316
- const __wbindgen_enum_RequestCredentials = ["omit", "same-origin", "include"];
317
300
 
318
- const __wbindgen_enum_RequestMode = ["same-origin", "no-cors", "cors", "navigate"];
301
+ /**
302
+ * @param {any} error
303
+ * @returns {boolean}
304
+ */
305
+ export function isKeyGenerationError(error) {
306
+ try {
307
+ const ret = wasm.isKeyGenerationError(addBorrowedObject(error));
308
+ return ret !== 0;
309
+ } finally {
310
+ heap[stack_pointer++] = undefined;
311
+ }
312
+ }
319
313
 
320
- const BitwardenClientFinalization =
321
- typeof FinalizationRegistry === "undefined"
322
- ? { register: () => {}, unregister: () => {} }
323
- : new FinalizationRegistry((ptr) => wasm.__wbg_bitwardenclient_free(ptr >>> 0, 1));
314
+ /**
315
+ * @param {any} error
316
+ * @returns {boolean}
317
+ */
318
+ export function isDecryptFileError(error) {
319
+ try {
320
+ const ret = wasm.isDecryptFileError(addBorrowedObject(error));
321
+ return ret !== 0;
322
+ } finally {
323
+ heap[stack_pointer++] = undefined;
324
+ }
325
+ }
324
326
 
325
- export class BitwardenClient {
326
- __destroy_into_raw() {
327
- const ptr = this.__wbg_ptr;
328
- this.__wbg_ptr = 0;
329
- BitwardenClientFinalization.unregister(this);
330
- return ptr;
327
+ /**
328
+ * @param {any} error
329
+ * @returns {boolean}
330
+ */
331
+ export function isEncryptFileError(error) {
332
+ try {
333
+ const ret = wasm.isEncryptFileError(addBorrowedObject(error));
334
+ return ret !== 0;
335
+ } finally {
336
+ heap[stack_pointer++] = undefined;
331
337
  }
338
+ }
332
339
 
333
- free() {
334
- const ptr = this.__destroy_into_raw();
335
- wasm.__wbg_bitwardenclient_free(ptr, 0);
340
+ /**
341
+ * @param {any} error
342
+ * @returns {boolean}
343
+ */
344
+ export function isDecryptError(error) {
345
+ try {
346
+ const ret = wasm.isDecryptError(addBorrowedObject(error));
347
+ return ret !== 0;
348
+ } finally {
349
+ heap[stack_pointer++] = undefined;
336
350
  }
337
- /**
338
- * @param {ClientSettings | undefined} [settings]
339
- * @param {LogLevel | undefined} [log_level]
340
- */
351
+ }
352
+
353
+ /**
354
+ * @param {any} error
355
+ * @returns {boolean}
356
+ */
357
+ export function isEncryptError(error) {
358
+ try {
359
+ const ret = wasm.isEncryptError(addBorrowedObject(error));
360
+ return ret !== 0;
361
+ } finally {
362
+ heap[stack_pointer++] = undefined;
363
+ }
364
+ }
365
+
366
+ /**
367
+ * @param {any} error
368
+ * @returns {boolean}
369
+ */
370
+ export function isTotpError(error) {
371
+ try {
372
+ const ret = wasm.isTotpError(addBorrowedObject(error));
373
+ return ret !== 0;
374
+ } finally {
375
+ heap[stack_pointer++] = undefined;
376
+ }
377
+ }
378
+
379
+ /**
380
+ * @param {any} error
381
+ * @returns {boolean}
382
+ */
383
+ export function isTestError(error) {
384
+ try {
385
+ const ret = wasm.isTestError(addBorrowedObject(error));
386
+ return ret !== 0;
387
+ } finally {
388
+ heap[stack_pointer++] = undefined;
389
+ }
390
+ }
391
+
392
+ /**
393
+ * Generate a new SSH key pair
394
+ *
395
+ * # Arguments
396
+ * - `key_algorithm` - The algorithm to use for the key pair
397
+ *
398
+ * # Returns
399
+ * - `Ok(SshKey)` if the key was successfully generated
400
+ * - `Err(KeyGenerationError)` if the key could not be generated
401
+ * @param {KeyAlgorithm} key_algorithm
402
+ * @returns {SshKey}
403
+ */
404
+ export function generate_ssh_key(key_algorithm) {
405
+ try {
406
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
407
+ wasm.generate_ssh_key(retptr, addHeapObject(key_algorithm));
408
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
409
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
410
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
411
+ if (r2) {
412
+ throw takeObject(r1);
413
+ }
414
+ return takeObject(r0);
415
+ } finally {
416
+ wasm.__wbindgen_add_to_stack_pointer(16);
417
+ }
418
+ }
419
+
420
+ /**
421
+ * Convert a PCKS8 or OpenSSH encrypted or unencrypted private key
422
+ * to an OpenSSH private key with public key and fingerprint
423
+ *
424
+ * # Arguments
425
+ * - `imported_key` - The private key to convert
426
+ * - `password` - The password to use for decrypting the key
427
+ *
428
+ * # Returns
429
+ * - `Ok(SshKey)` if the key was successfully coneverted
430
+ * - `Err(PasswordRequired)` if the key is encrypted and no password was provided
431
+ * - `Err(WrongPassword)` if the password provided is incorrect
432
+ * - `Err(ParsingError)` if the key could not be parsed
433
+ * - `Err(UnsupportedKeyType)` if the key type is not supported
434
+ * @param {string} imported_key
435
+ * @param {string | null} [password]
436
+ * @returns {SshKey}
437
+ */
438
+ export function import_ssh_key(imported_key, password) {
439
+ try {
440
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
441
+ const ptr0 = passStringToWasm0(imported_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
442
+ const len0 = WASM_VECTOR_LEN;
443
+ var ptr1 = isLikeNone(password)
444
+ ? 0
445
+ : passStringToWasm0(password, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
446
+ var len1 = WASM_VECTOR_LEN;
447
+ wasm.import_ssh_key(retptr, ptr0, len0, ptr1, len1);
448
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
449
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
450
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
451
+ if (r2) {
452
+ throw takeObject(r1);
453
+ }
454
+ return takeObject(r0);
455
+ } finally {
456
+ wasm.__wbindgen_add_to_stack_pointer(16);
457
+ }
458
+ }
459
+
460
+ function __wbg_adapter_40(arg0, arg1, arg2) {
461
+ wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h7af7927fe391910e(
462
+ arg0,
463
+ arg1,
464
+ addHeapObject(arg2),
465
+ );
466
+ }
467
+
468
+ function __wbg_adapter_143(arg0, arg1, arg2, arg3) {
469
+ wasm.wasm_bindgen__convert__closures__invoke2_mut__h69e15f428907d894(
470
+ arg0,
471
+ arg1,
472
+ addHeapObject(arg2),
473
+ addHeapObject(arg3),
474
+ );
475
+ }
476
+
477
+ /**
478
+ * @enum {0 | 1 | 2 | 3 | 4}
479
+ */
480
+ export const LogLevel = Object.freeze({
481
+ Trace: 0,
482
+ 0: "Trace",
483
+ Debug: 1,
484
+ 1: "Debug",
485
+ Info: 2,
486
+ 2: "Info",
487
+ Warn: 3,
488
+ 3: "Warn",
489
+ Error: 4,
490
+ 4: "Error",
491
+ });
492
+
493
+ const __wbindgen_enum_RequestCredentials = ["omit", "same-origin", "include"];
494
+
495
+ const __wbindgen_enum_RequestMode = ["same-origin", "no-cors", "cors", "navigate"];
496
+
497
+ const BitwardenClientFinalization =
498
+ typeof FinalizationRegistry === "undefined"
499
+ ? { register: () => {}, unregister: () => {} }
500
+ : new FinalizationRegistry((ptr) => wasm.__wbg_bitwardenclient_free(ptr >>> 0, 1));
501
+
502
+ export class BitwardenClient {
503
+ __destroy_into_raw() {
504
+ const ptr = this.__wbg_ptr;
505
+ this.__wbg_ptr = 0;
506
+ BitwardenClientFinalization.unregister(this);
507
+ return ptr;
508
+ }
509
+
510
+ free() {
511
+ const ptr = this.__destroy_into_raw();
512
+ wasm.__wbg_bitwardenclient_free(ptr, 0);
513
+ }
514
+ /**
515
+ * @param {ClientSettings | null} [settings]
516
+ * @param {LogLevel | null} [log_level]
517
+ */
341
518
  constructor(settings, log_level) {
342
519
  const ret = wasm.bitwardenclient_new(
343
520
  isLikeNone(settings) ? 0 : addHeapObject(settings),
@@ -391,13 +568,21 @@ export class BitwardenClient {
391
568
  }
392
569
  /**
393
570
  * @param {string} msg
394
- * @returns {Promise<void>}
395
571
  */
396
572
  throw(msg) {
397
- const ptr0 = passStringToWasm0(msg, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
398
- const len0 = WASM_VECTOR_LEN;
399
- const ret = wasm.bitwardenclient_throw(this.__wbg_ptr, ptr0, len0);
400
- return takeObject(ret);
573
+ try {
574
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
575
+ const ptr0 = passStringToWasm0(msg, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
576
+ const len0 = WASM_VECTOR_LEN;
577
+ wasm.bitwardenclient_throw(retptr, this.__wbg_ptr, ptr0, len0);
578
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
579
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
580
+ if (r1) {
581
+ throw takeObject(r0);
582
+ }
583
+ } finally {
584
+ wasm.__wbindgen_add_to_stack_pointer(16);
585
+ }
401
586
  }
402
587
  /**
403
588
  * Test method, calls http endpoint
@@ -411,102 +596,215 @@ export class BitwardenClient {
411
596
  return takeObject(ret);
412
597
  }
413
598
  /**
414
- * @returns {ClientCrypto}
599
+ * @returns {CryptoClient}
415
600
  */
416
601
  crypto() {
417
602
  const ret = wasm.bitwardenclient_crypto(this.__wbg_ptr);
418
- return ClientCrypto.__wrap(ret);
603
+ return CryptoClient.__wrap(ret);
419
604
  }
420
605
  /**
421
- * @returns {ClientVault}
606
+ * @returns {VaultClient}
422
607
  */
423
608
  vault() {
424
609
  const ret = wasm.bitwardenclient_crypto(this.__wbg_ptr);
425
- return ClientVault.__wrap(ret);
610
+ return VaultClient.__wrap(ret);
426
611
  }
427
612
  }
428
613
 
429
- const ClientCryptoFinalization =
614
+ const ClientFoldersFinalization =
430
615
  typeof FinalizationRegistry === "undefined"
431
616
  ? { register: () => {}, unregister: () => {} }
432
- : new FinalizationRegistry((ptr) => wasm.__wbg_clientcrypto_free(ptr >>> 0, 1));
617
+ : new FinalizationRegistry((ptr) => wasm.__wbg_clientfolders_free(ptr >>> 0, 1));
433
618
 
434
- export class ClientCrypto {
619
+ export class ClientFolders {
435
620
  static __wrap(ptr) {
436
621
  ptr = ptr >>> 0;
437
- const obj = Object.create(ClientCrypto.prototype);
622
+ const obj = Object.create(ClientFolders.prototype);
438
623
  obj.__wbg_ptr = ptr;
439
- ClientCryptoFinalization.register(obj, obj.__wbg_ptr, obj);
624
+ ClientFoldersFinalization.register(obj, obj.__wbg_ptr, obj);
440
625
  return obj;
441
626
  }
442
627
 
443
628
  __destroy_into_raw() {
444
629
  const ptr = this.__wbg_ptr;
445
630
  this.__wbg_ptr = 0;
446
- ClientCryptoFinalization.unregister(this);
631
+ ClientFoldersFinalization.unregister(this);
447
632
  return ptr;
448
633
  }
449
634
 
450
635
  free() {
451
636
  const ptr = this.__destroy_into_raw();
452
- wasm.__wbg_clientcrypto_free(ptr, 0);
637
+ wasm.__wbg_clientfolders_free(ptr, 0);
453
638
  }
454
639
  /**
455
- * Initialization method for the user crypto. Needs to be called before any other crypto
456
- * operations.
457
- * @param {InitUserCryptoRequest} req
458
- * @returns {Promise<void>}
640
+ * Decrypt folder
641
+ * @param {Folder} folder
642
+ * @returns {FolderView}
459
643
  */
460
- initialize_user_crypto(req) {
461
- const ret = wasm.clientcrypto_initialize_user_crypto(this.__wbg_ptr, addHeapObject(req));
462
- return takeObject(ret);
644
+ decrypt(folder) {
645
+ try {
646
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
647
+ wasm.clientfolders_decrypt(retptr, this.__wbg_ptr, addHeapObject(folder));
648
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
649
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
650
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
651
+ if (r2) {
652
+ throw takeObject(r1);
653
+ }
654
+ return takeObject(r0);
655
+ } finally {
656
+ wasm.__wbindgen_add_to_stack_pointer(16);
657
+ }
658
+ }
659
+ }
660
+
661
+ const ClientTotpFinalization =
662
+ typeof FinalizationRegistry === "undefined"
663
+ ? { register: () => {}, unregister: () => {} }
664
+ : new FinalizationRegistry((ptr) => wasm.__wbg_clienttotp_free(ptr >>> 0, 1));
665
+
666
+ export class ClientTotp {
667
+ static __wrap(ptr) {
668
+ ptr = ptr >>> 0;
669
+ const obj = Object.create(ClientTotp.prototype);
670
+ obj.__wbg_ptr = ptr;
671
+ ClientTotpFinalization.register(obj, obj.__wbg_ptr, obj);
672
+ return obj;
673
+ }
674
+
675
+ __destroy_into_raw() {
676
+ const ptr = this.__wbg_ptr;
677
+ this.__wbg_ptr = 0;
678
+ ClientTotpFinalization.unregister(this);
679
+ return ptr;
680
+ }
681
+
682
+ free() {
683
+ const ptr = this.__destroy_into_raw();
684
+ wasm.__wbg_clienttotp_free(ptr, 0);
463
685
  }
464
686
  /**
465
- * Initialization method for the organization crypto. Needs to be called after
466
- * `initialize_user_crypto` but before any other crypto operations.
467
- * @param {InitOrgCryptoRequest} req
468
- * @returns {Promise<void>}
687
+ * Generates a TOTP code from a provided key
688
+ *
689
+ * # Arguments
690
+ * - `key` - Can be:
691
+ * - A base32 encoded string
692
+ * - OTP Auth URI
693
+ * - Steam URI
694
+ * - `time_ms` - Optional timestamp in milliseconds
695
+ *
696
+ * # Returns
697
+ * - `Ok(TotpResponse)` containing the generated code and period
698
+ * - `Err(TotpError)` if code generation fails
699
+ * @param {string} key
700
+ * @param {number | null} [time_ms]
701
+ * @returns {TotpResponse}
469
702
  */
470
- initialize_org_crypto(req) {
471
- const ret = wasm.clientcrypto_initialize_org_crypto(this.__wbg_ptr, addHeapObject(req));
472
- return takeObject(ret);
703
+ generate_totp(key, time_ms) {
704
+ try {
705
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
706
+ const ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
707
+ const len0 = WASM_VECTOR_LEN;
708
+ wasm.clienttotp_generate_totp(
709
+ retptr,
710
+ this.__wbg_ptr,
711
+ ptr0,
712
+ len0,
713
+ !isLikeNone(time_ms),
714
+ isLikeNone(time_ms) ? 0 : time_ms,
715
+ );
716
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
717
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
718
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
719
+ if (r2) {
720
+ throw takeObject(r1);
721
+ }
722
+ return takeObject(r0);
723
+ } finally {
724
+ wasm.__wbindgen_add_to_stack_pointer(16);
725
+ }
473
726
  }
474
727
  }
475
728
 
476
- const ClientFoldersFinalization =
729
+ const CryptoClientFinalization =
477
730
  typeof FinalizationRegistry === "undefined"
478
731
  ? { register: () => {}, unregister: () => {} }
479
- : new FinalizationRegistry((ptr) => wasm.__wbg_clientfolders_free(ptr >>> 0, 1));
732
+ : new FinalizationRegistry((ptr) => wasm.__wbg_cryptoclient_free(ptr >>> 0, 1));
480
733
 
481
- export class ClientFolders {
734
+ export class CryptoClient {
482
735
  static __wrap(ptr) {
483
736
  ptr = ptr >>> 0;
484
- const obj = Object.create(ClientFolders.prototype);
737
+ const obj = Object.create(CryptoClient.prototype);
485
738
  obj.__wbg_ptr = ptr;
486
- ClientFoldersFinalization.register(obj, obj.__wbg_ptr, obj);
739
+ CryptoClientFinalization.register(obj, obj.__wbg_ptr, obj);
487
740
  return obj;
488
741
  }
489
742
 
490
743
  __destroy_into_raw() {
491
744
  const ptr = this.__wbg_ptr;
492
745
  this.__wbg_ptr = 0;
493
- ClientFoldersFinalization.unregister(this);
746
+ CryptoClientFinalization.unregister(this);
494
747
  return ptr;
495
748
  }
496
749
 
497
750
  free() {
498
751
  const ptr = this.__destroy_into_raw();
499
- wasm.__wbg_clientfolders_free(ptr, 0);
752
+ wasm.__wbg_cryptoclient_free(ptr, 0);
500
753
  }
501
754
  /**
502
- * Decrypt folder
503
- * @param {Folder} folder
504
- * @returns {FolderView}
755
+ * Initialization method for the user crypto. Needs to be called before any other crypto
756
+ * operations.
757
+ * @param {InitUserCryptoRequest} req
758
+ * @returns {Promise<void>}
505
759
  */
506
- decrypt(folder) {
760
+ initialize_user_crypto(req) {
761
+ const ret = wasm.cryptoclient_initialize_user_crypto(this.__wbg_ptr, addHeapObject(req));
762
+ return takeObject(ret);
763
+ }
764
+ /**
765
+ * Initialization method for the organization crypto. Needs to be called after
766
+ * `initialize_user_crypto` but before any other crypto operations.
767
+ * @param {InitOrgCryptoRequest} req
768
+ * @returns {Promise<void>}
769
+ */
770
+ initialize_org_crypto(req) {
771
+ const ret = wasm.cryptoclient_initialize_org_crypto(this.__wbg_ptr, addHeapObject(req));
772
+ return takeObject(ret);
773
+ }
774
+ /**
775
+ * Generates a new key pair and encrypts the private key with the provided user key.
776
+ * Crypto initialization not required.
777
+ * @param {string} user_key
778
+ * @returns {MakeKeyPairResponse}
779
+ */
780
+ make_key_pair(user_key) {
507
781
  try {
508
782
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
509
- wasm.clientfolders_decrypt(retptr, this.__wbg_ptr, addHeapObject(folder));
783
+ const ptr0 = passStringToWasm0(user_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
784
+ const len0 = WASM_VECTOR_LEN;
785
+ wasm.cryptoclient_make_key_pair(retptr, this.__wbg_ptr, ptr0, len0);
786
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
787
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
788
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
789
+ if (r2) {
790
+ throw takeObject(r1);
791
+ }
792
+ return takeObject(r0);
793
+ } finally {
794
+ wasm.__wbindgen_add_to_stack_pointer(16);
795
+ }
796
+ }
797
+ /**
798
+ * Verifies a user's asymmetric keys by decrypting the private key with the provided user
799
+ * key. Returns if the private key is decryptable and if it is a valid matching key.
800
+ * Crypto initialization not required.
801
+ * @param {VerifyAsymmetricKeysRequest} request
802
+ * @returns {VerifyAsymmetricKeysResponse}
803
+ */
804
+ verify_asymmetric_keys(request) {
805
+ try {
806
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
807
+ wasm.cryptoclient_verify_asymmetric_keys(retptr, this.__wbg_ptr, addHeapObject(request));
510
808
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
511
809
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
512
810
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
@@ -520,30 +818,30 @@ export class ClientFolders {
520
818
  }
521
819
  }
522
820
 
523
- const ClientVaultFinalization =
821
+ const VaultClientFinalization =
524
822
  typeof FinalizationRegistry === "undefined"
525
823
  ? { register: () => {}, unregister: () => {} }
526
- : new FinalizationRegistry((ptr) => wasm.__wbg_clientvault_free(ptr >>> 0, 1));
824
+ : new FinalizationRegistry((ptr) => wasm.__wbg_vaultclient_free(ptr >>> 0, 1));
527
825
 
528
- export class ClientVault {
826
+ export class VaultClient {
529
827
  static __wrap(ptr) {
530
828
  ptr = ptr >>> 0;
531
- const obj = Object.create(ClientVault.prototype);
829
+ const obj = Object.create(VaultClient.prototype);
532
830
  obj.__wbg_ptr = ptr;
533
- ClientVaultFinalization.register(obj, obj.__wbg_ptr, obj);
831
+ VaultClientFinalization.register(obj, obj.__wbg_ptr, obj);
534
832
  return obj;
535
833
  }
536
834
 
537
835
  __destroy_into_raw() {
538
836
  const ptr = this.__wbg_ptr;
539
837
  this.__wbg_ptr = 0;
540
- ClientVaultFinalization.unregister(this);
838
+ VaultClientFinalization.unregister(this);
541
839
  return ptr;
542
840
  }
543
841
 
544
842
  free() {
545
843
  const ptr = this.__destroy_into_raw();
546
- wasm.__wbg_clientvault_free(ptr, 0);
844
+ wasm.__wbg_vaultclient_free(ptr, 0);
547
845
  }
548
846
  /**
549
847
  * @returns {ClientFolders}
@@ -552,200 +850,175 @@ export class ClientVault {
552
850
  const ret = wasm.bitwardenclient_crypto(this.__wbg_ptr);
553
851
  return ClientFolders.__wrap(ret);
554
852
  }
853
+ /**
854
+ * @returns {ClientTotp}
855
+ */
856
+ totp() {
857
+ const ret = wasm.bitwardenclient_crypto(this.__wbg_ptr);
858
+ return ClientTotp.__wrap(ret);
859
+ }
555
860
  }
556
861
 
557
- export function __wbg_new_fe19e4f3db5c3999(arg0, arg1) {
558
- let deferred0_0;
559
- let deferred0_1;
560
- try {
561
- deferred0_0 = arg0;
562
- deferred0_1 = arg1;
563
- const ret = new Error(getStringFromWasm0(arg0, arg1));
564
- return addHeapObject(ret);
565
- } finally {
566
- wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
567
- }
862
+ export function __wbg_String_8f0eb39a4a4c2f66(arg0, arg1) {
863
+ const ret = String(getObject(arg1));
864
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
865
+ const len1 = WASM_VECTOR_LEN;
866
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
867
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
568
868
  }
569
869
 
570
- export function __wbg_setname_46d623c31ae39910(arg0, arg1, arg2) {
571
- let deferred0_0;
572
- let deferred0_1;
573
- try {
574
- deferred0_0 = arg1;
575
- deferred0_1 = arg2;
576
- getObject(arg0).name = getStringFromWasm0(arg1, arg2);
577
- } finally {
578
- wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
579
- }
580
- }
581
-
582
- export function __wbg_setvariant_262a12673324f71b(arg0, arg1, arg2) {
583
- let deferred0_0;
584
- let deferred0_1;
585
- try {
586
- deferred0_0 = arg1;
587
- deferred0_1 = arg2;
588
- getObject(arg0).variant = getStringFromWasm0(arg1, arg2);
589
- } finally {
590
- wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
591
- }
592
- }
593
-
594
- export function __wbindgen_string_new(arg0, arg1) {
595
- const ret = getStringFromWasm0(arg0, arg1);
596
- return addHeapObject(ret);
870
+ export function __wbg_abort_775ef1d17fc65868(arg0) {
871
+ getObject(arg0).abort();
597
872
  }
598
873
 
599
- export function __wbg_get_ef828680c64da212() {
600
- return handleError(function (arg0, arg1) {
601
- const ret = Reflect.get(getObject(arg0), getObject(arg1));
602
- return addHeapObject(ret);
874
+ export function __wbg_append_299d5d48292c0495() {
875
+ return handleError(function (arg0, arg1, arg2, arg3, arg4) {
876
+ getObject(arg0).append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
603
877
  }, arguments);
604
878
  }
605
879
 
606
- export function __wbindgen_object_drop_ref(arg0) {
607
- takeObject(arg0);
880
+ export function __wbg_append_8c7dd8d641a5f01b() {
881
+ return handleError(function (arg0, arg1, arg2, arg3, arg4) {
882
+ getObject(arg0).append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
883
+ }, arguments);
608
884
  }
609
885
 
610
- export function __wbindgen_string_get(arg0, arg1) {
611
- const obj = getObject(arg1);
612
- const ret = typeof obj === "string" ? obj : undefined;
613
- var ptr1 = isLikeNone(ret)
614
- ? 0
615
- : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
616
- var len1 = WASM_VECTOR_LEN;
617
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
618
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
886
+ export function __wbg_append_b2d1fc16de2a0e81() {
887
+ return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5) {
888
+ getObject(arg0).append(
889
+ getStringFromWasm0(arg1, arg2),
890
+ getObject(arg3),
891
+ getStringFromWasm0(arg4, arg5),
892
+ );
893
+ }, arguments);
619
894
  }
620
895
 
621
- export function __wbindgen_is_object(arg0) {
622
- const val = getObject(arg0);
623
- const ret = typeof val === "object" && val !== null;
624
- return ret;
896
+ export function __wbg_append_b44785ebeb668479() {
897
+ return handleError(function (arg0, arg1, arg2, arg3) {
898
+ getObject(arg0).append(getStringFromWasm0(arg1, arg2), getObject(arg3));
899
+ }, arguments);
625
900
  }
626
901
 
627
- export function __wbg_getwithrefkey_edc2c8960f0f1191(arg0, arg1) {
628
- const ret = getObject(arg0)[getObject(arg1)];
902
+ export function __wbg_buffer_609cc3eee51ed158(arg0) {
903
+ const ret = getObject(arg0).buffer;
629
904
  return addHeapObject(ret);
630
905
  }
631
906
 
632
- export function __wbindgen_is_undefined(arg0) {
633
- const ret = getObject(arg0) === undefined;
634
- return ret;
907
+ export function __wbg_call_672a4d21634d4a24() {
908
+ return handleError(function (arg0, arg1) {
909
+ const ret = getObject(arg0).call(getObject(arg1));
910
+ return addHeapObject(ret);
911
+ }, arguments);
635
912
  }
636
913
 
637
- export function __wbindgen_in(arg0, arg1) {
638
- const ret = getObject(arg0) in getObject(arg1);
639
- return ret;
914
+ export function __wbg_call_7cccdd69e0791ae2() {
915
+ return handleError(function (arg0, arg1, arg2) {
916
+ const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
917
+ return addHeapObject(ret);
918
+ }, arguments);
640
919
  }
641
920
 
642
- export function __wbg_isSafeInteger_b9dff570f01a9100(arg0) {
643
- const ret = Number.isSafeInteger(getObject(arg0));
644
- return ret;
921
+ export function __wbg_crypto_ed58b8e10a292839(arg0) {
922
+ const ret = getObject(arg0).crypto;
923
+ return addHeapObject(ret);
645
924
  }
646
925
 
647
- export function __wbindgen_as_number(arg0) {
648
- const ret = +getObject(arg0);
649
- return ret;
926
+ export function __wbg_debug_e17b51583ca6a632(arg0, arg1, arg2, arg3) {
927
+ console.debug(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
650
928
  }
651
929
 
652
- export function __wbindgen_is_string(arg0) {
653
- const ret = typeof getObject(arg0) === "string";
930
+ export function __wbg_done_769e5ede4b31c67b(arg0) {
931
+ const ret = getObject(arg0).done;
654
932
  return ret;
655
933
  }
656
934
 
657
- export function __wbg_entries_c02034de337d3ee2(arg0) {
935
+ export function __wbg_entries_3265d4158b33e5dc(arg0) {
658
936
  const ret = Object.entries(getObject(arg0));
659
937
  return addHeapObject(ret);
660
938
  }
661
939
 
662
- export function __wbg_length_f217bbbf7e8e4df4(arg0) {
663
- const ret = getObject(arg0).length;
664
- return ret;
940
+ export function __wbg_error_7534b8e9a36f1ab4(arg0, arg1) {
941
+ let deferred0_0;
942
+ let deferred0_1;
943
+ try {
944
+ deferred0_0 = arg0;
945
+ deferred0_1 = arg1;
946
+ console.error(getStringFromWasm0(arg0, arg1));
947
+ } finally {
948
+ wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
949
+ }
665
950
  }
666
951
 
667
- export function __wbg_get_5419cf6b954aa11d(arg0, arg1) {
668
- const ret = getObject(arg0)[arg1 >>> 0];
669
- return addHeapObject(ret);
952
+ export function __wbg_error_80de38b3f7cc3c3c(arg0, arg1, arg2, arg3) {
953
+ console.error(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
670
954
  }
671
955
 
672
- export function __wbg_call_3bfa248576352471() {
673
- return handleError(function (arg0, arg1, arg2) {
674
- const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
675
- return addHeapObject(ret);
676
- }, arguments);
956
+ export function __wbg_fetch_4465c2b10f21a927(arg0) {
957
+ const ret = fetch(getObject(arg0));
958
+ return addHeapObject(ret);
677
959
  }
678
960
 
679
- export function __wbindgen_object_clone_ref(arg0) {
680
- const ret = getObject(arg0);
961
+ export function __wbg_fetch_509096533071c657(arg0, arg1) {
962
+ const ret = getObject(arg0).fetch(getObject(arg1));
681
963
  return addHeapObject(ret);
682
964
  }
683
965
 
684
- export function __wbg_next_b06e115d1b01e10b() {
685
- return handleError(function (arg0) {
686
- const ret = getObject(arg0).next();
687
- return addHeapObject(ret);
966
+ export function __wbg_getRandomValues_bcb4912f16000dc4() {
967
+ return handleError(function (arg0, arg1) {
968
+ getObject(arg0).getRandomValues(getObject(arg1));
688
969
  }, arguments);
689
970
  }
690
971
 
691
- export function __wbg_done_983b5ffcaec8c583(arg0) {
692
- const ret = getObject(arg0).done;
972
+ export function __wbg_getTime_46267b1c24877e30(arg0) {
973
+ const ret = getObject(arg0).getTime();
693
974
  return ret;
694
975
  }
695
976
 
696
- export function __wbg_value_2ab8a198c834c26a(arg0) {
697
- const ret = getObject(arg0).value;
698
- return addHeapObject(ret);
699
- }
700
-
701
- export function __wbg_new_e69b5f66fda8f13c() {
702
- const ret = new Object();
703
- return addHeapObject(ret);
704
- }
705
-
706
- export function __wbg_setmethod_ce2da76000b02f6a(arg0, arg1, arg2) {
707
- getObject(arg0).method = getStringFromWasm0(arg1, arg2);
708
- }
709
-
710
- export function __wbg_new_a9ae04a5200606a5() {
711
- return handleError(function () {
712
- const ret = new Headers();
977
+ export function __wbg_get_67b2ba62fc30de12() {
978
+ return handleError(function (arg0, arg1) {
979
+ const ret = Reflect.get(getObject(arg0), getObject(arg1));
713
980
  return addHeapObject(ret);
714
981
  }, arguments);
715
982
  }
716
983
 
717
- export function __wbg_setheaders_f5205d36e423a544(arg0, arg1) {
718
- getObject(arg0).headers = getObject(arg1);
719
- }
720
-
721
- export function __wbg_setmode_4919fd636102c586(arg0, arg1) {
722
- getObject(arg0).mode = __wbindgen_enum_RequestMode[arg1];
984
+ export function __wbg_get_b9b93047fe3cf45b(arg0, arg1) {
985
+ const ret = getObject(arg0)[arg1 >>> 0];
986
+ return addHeapObject(ret);
723
987
  }
724
988
 
725
- export function __wbg_setcredentials_a4e661320cdb9738(arg0, arg1) {
726
- getObject(arg0).credentials = __wbindgen_enum_RequestCredentials[arg1];
989
+ export function __wbg_getwithrefkey_1dc361bd10053bfe(arg0, arg1) {
990
+ const ret = getObject(arg0)[getObject(arg1)];
991
+ return addHeapObject(ret);
727
992
  }
728
993
 
729
- export function __wbg_setbody_aa8b691bec428bf4(arg0, arg1) {
730
- getObject(arg0).body = getObject(arg1);
994
+ export function __wbg_has_a5ea9117f258a0ec() {
995
+ return handleError(function (arg0, arg1) {
996
+ const ret = Reflect.has(getObject(arg0), getObject(arg1));
997
+ return ret;
998
+ }, arguments);
731
999
  }
732
1000
 
733
- export function __wbg_signal_9acfcec9e7dffc22(arg0) {
734
- const ret = getObject(arg0).signal;
1001
+ export function __wbg_headers_9cb51cfd2ac780a4(arg0) {
1002
+ const ret = getObject(arg0).headers;
735
1003
  return addHeapObject(ret);
736
1004
  }
737
1005
 
738
- export function __wbg_setsignal_812ccb8269a7fd90(arg0, arg1) {
739
- getObject(arg0).signal = getObject(arg1);
1006
+ export function __wbg_info_033d8b8a0838f1d3(arg0, arg1, arg2, arg3) {
1007
+ console.info(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
740
1008
  }
741
1009
 
742
- export function __wbg_append_8b3e7f74a47ea7d5() {
743
- return handleError(function (arg0, arg1, arg2, arg3, arg4) {
744
- getObject(arg0).append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
745
- }, arguments);
1010
+ export function __wbg_instanceof_ArrayBuffer_e14585432e3737fc(arg0) {
1011
+ let result;
1012
+ try {
1013
+ result = getObject(arg0) instanceof ArrayBuffer;
1014
+ } catch (_) {
1015
+ result = false;
1016
+ }
1017
+ const ret = result;
1018
+ return ret;
746
1019
  }
747
1020
 
748
- export function __wbg_instanceof_Response_3c0e210a57ff751d(arg0) {
1021
+ export function __wbg_instanceof_Response_f2cc20d9f7dfd644(arg0) {
749
1022
  let result;
750
1023
  try {
751
1024
  result = getObject(arg0) instanceof Response;
@@ -756,70 +1029,66 @@ export function __wbg_instanceof_Response_3c0e210a57ff751d(arg0) {
756
1029
  return ret;
757
1030
  }
758
1031
 
759
- export function __wbg_status_5f4e900d22140a18(arg0) {
760
- const ret = getObject(arg0).status;
1032
+ export function __wbg_instanceof_Uint8Array_17156bcf118086a9(arg0) {
1033
+ let result;
1034
+ try {
1035
+ result = getObject(arg0) instanceof Uint8Array;
1036
+ } catch (_) {
1037
+ result = false;
1038
+ }
1039
+ const ret = result;
761
1040
  return ret;
762
1041
  }
763
1042
 
764
- export function __wbg_url_58af972663531d16(arg0, arg1) {
765
- const ret = getObject(arg1).url;
766
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
767
- const len1 = WASM_VECTOR_LEN;
768
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
769
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1043
+ export function __wbg_isSafeInteger_343e2beeeece1bb0(arg0) {
1044
+ const ret = Number.isSafeInteger(getObject(arg0));
1045
+ return ret;
770
1046
  }
771
1047
 
772
- export function __wbg_headers_1b9bf90c73fae600(arg0) {
773
- const ret = getObject(arg0).headers;
1048
+ export function __wbg_iterator_9a24c88df860dc65() {
1049
+ const ret = Symbol.iterator;
774
1050
  return addHeapObject(ret);
775
1051
  }
776
1052
 
777
- export function __wbg_stringify_eead5648c09faaf8() {
778
- return handleError(function (arg0) {
779
- const ret = JSON.stringify(getObject(arg0));
780
- return addHeapObject(ret);
781
- }, arguments);
1053
+ export function __wbg_length_a446193dc22c12f8(arg0) {
1054
+ const ret = getObject(arg0).length;
1055
+ return ret;
782
1056
  }
783
1057
 
784
- export function __wbg_abort_c57daab47a6c1215(arg0) {
785
- getObject(arg0).abort();
1058
+ export function __wbg_length_e2d2a49132c1b256(arg0) {
1059
+ const ret = getObject(arg0).length;
1060
+ return ret;
786
1061
  }
787
1062
 
788
- export function __wbg_text_ebeee8b31af4c919() {
789
- return handleError(function (arg0) {
790
- const ret = getObject(arg0).text();
791
- return addHeapObject(ret);
792
- }, arguments);
1063
+ export function __wbg_log_cad59bb680daec67(arg0, arg1, arg2, arg3) {
1064
+ console.log(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
793
1065
  }
794
1066
 
795
- export function __wbindgen_jsval_loose_eq(arg0, arg1) {
796
- const ret = getObject(arg0) == getObject(arg1);
797
- return ret;
1067
+ export function __wbg_msCrypto_0a36e2ec3a343d26(arg0) {
1068
+ const ret = getObject(arg0).msCrypto;
1069
+ return addHeapObject(ret);
798
1070
  }
799
1071
 
800
- export function __wbindgen_cb_drop(arg0) {
801
- const obj = takeObject(arg0).original;
802
- if (obj.cnt-- == 1) {
803
- obj.a = 0;
804
- return true;
805
- }
806
- const ret = false;
807
- return ret;
1072
+ export function __wbg_new0_f788a2397c7ca929() {
1073
+ const ret = new Date();
1074
+ return addHeapObject(ret);
808
1075
  }
809
1076
 
810
- export function __wbindgen_error_new(arg0, arg1) {
811
- const ret = new Error(getStringFromWasm0(arg0, arg1));
812
- return addHeapObject(ret);
1077
+ export function __wbg_new_018dcc2d6c8c2f6a() {
1078
+ return handleError(function () {
1079
+ const ret = new Headers();
1080
+ return addHeapObject(ret);
1081
+ }, arguments);
813
1082
  }
814
1083
 
815
- export function __wbg_new_1073970097e5a420(arg0, arg1) {
1084
+ export function __wbg_new_23a2665fac83c611(arg0, arg1) {
816
1085
  try {
817
1086
  var state0 = { a: arg0, b: arg1 };
818
1087
  var cb0 = (arg0, arg1) => {
819
1088
  const a = state0.a;
820
1089
  state0.a = 0;
821
1090
  try {
822
- return __wbg_adapter_107(a, state0.b, arg0, arg1);
1091
+ return __wbg_adapter_143(a, state0.b, arg0, arg1);
823
1092
  } finally {
824
1093
  state0.a = a;
825
1094
  }
@@ -831,233 +1100,293 @@ export function __wbg_new_1073970097e5a420(arg0, arg1) {
831
1100
  }
832
1101
  }
833
1102
 
834
- export function __wbg_set_f975102236d3c502(arg0, arg1, arg2) {
835
- getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
1103
+ export function __wbg_new_405e22f390576ce2() {
1104
+ const ret = new Object();
1105
+ return addHeapObject(ret);
1106
+ }
1107
+
1108
+ export function __wbg_new_78feb108b6472713() {
1109
+ const ret = new Array();
1110
+ return addHeapObject(ret);
836
1111
  }
837
1112
 
838
- export function __wbg_new_abda76e883ba8a5f() {
1113
+ export function __wbg_new_8a6f238a6ece86ea() {
839
1114
  const ret = new Error();
840
1115
  return addHeapObject(ret);
841
1116
  }
842
1117
 
843
- export function __wbg_stack_658279fe44541cf6(arg0, arg1) {
844
- const ret = getObject(arg1).stack;
845
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
846
- const len1 = WASM_VECTOR_LEN;
847
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
848
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1118
+ export function __wbg_new_9fd39a253424609a() {
1119
+ return handleError(function () {
1120
+ const ret = new FormData();
1121
+ return addHeapObject(ret);
1122
+ }, arguments);
849
1123
  }
850
1124
 
851
- export function __wbg_error_f851667af71bcfc6(arg0, arg1) {
1125
+ export function __wbg_new_a12002a7f91c75be(arg0) {
1126
+ const ret = new Uint8Array(getObject(arg0));
1127
+ return addHeapObject(ret);
1128
+ }
1129
+
1130
+ export function __wbg_new_c68d7209be747379(arg0, arg1) {
1131
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
1132
+ return addHeapObject(ret);
1133
+ }
1134
+
1135
+ export function __wbg_new_e25e5aab09ff45db() {
1136
+ return handleError(function () {
1137
+ const ret = new AbortController();
1138
+ return addHeapObject(ret);
1139
+ }, arguments);
1140
+ }
1141
+
1142
+ export function __wbg_new_f24b6d53abe5bc82(arg0, arg1) {
852
1143
  let deferred0_0;
853
1144
  let deferred0_1;
854
1145
  try {
855
1146
  deferred0_0 = arg0;
856
1147
  deferred0_1 = arg1;
857
- console.error(getStringFromWasm0(arg0, arg1));
1148
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
1149
+ return addHeapObject(ret);
858
1150
  } finally {
859
1151
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
860
1152
  }
861
1153
  }
862
1154
 
863
- export function __wbg_self_bf91bf94d9e04084() {
864
- return handleError(function () {
865
- const ret = self.self;
866
- return addHeapObject(ret);
867
- }, arguments);
1155
+ export function __wbg_newnoargs_105ed471475aaf50(arg0, arg1) {
1156
+ const ret = new Function(getStringFromWasm0(arg0, arg1));
1157
+ return addHeapObject(ret);
868
1158
  }
869
1159
 
870
- export function __wbg_window_52dd9f07d03fd5f8() {
871
- return handleError(function () {
872
- const ret = window.window;
873
- return addHeapObject(ret);
874
- }, arguments);
1160
+ export function __wbg_newwithbyteoffsetandlength_d97e637ebe145a9a(arg0, arg1, arg2) {
1161
+ const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
1162
+ return addHeapObject(ret);
875
1163
  }
876
1164
 
877
- export function __wbg_globalThis_05c129bf37fcf1be() {
878
- return handleError(function () {
879
- const ret = globalThis.globalThis;
880
- return addHeapObject(ret);
881
- }, arguments);
1165
+ export function __wbg_newwithlength_a381634e90c276d4(arg0) {
1166
+ const ret = new Uint8Array(arg0 >>> 0);
1167
+ return addHeapObject(ret);
882
1168
  }
883
1169
 
884
- export function __wbg_global_3eca19bb09e9c484() {
885
- return handleError(function () {
886
- const ret = global.global;
1170
+ export function __wbg_newwithstrandinit_06c535e0a867c635() {
1171
+ return handleError(function (arg0, arg1, arg2) {
1172
+ const ret = new Request(getStringFromWasm0(arg0, arg1), getObject(arg2));
887
1173
  return addHeapObject(ret);
888
1174
  }, arguments);
889
1175
  }
890
1176
 
891
- export function __wbg_newnoargs_1ede4bf2ebbaaf43(arg0, arg1) {
892
- const ret = new Function(getStringFromWasm0(arg0, arg1));
893
- return addHeapObject(ret);
894
- }
895
-
896
- export function __wbg_call_a9ef466721e824f2() {
1177
+ export function __wbg_newwithu8arraysequenceandoptions_068570c487f69127() {
897
1178
  return handleError(function (arg0, arg1) {
898
- const ret = getObject(arg0).call(getObject(arg1));
1179
+ const ret = new Blob(getObject(arg0), getObject(arg1));
899
1180
  return addHeapObject(ret);
900
1181
  }, arguments);
901
1182
  }
902
1183
 
903
- export function __wbg_iterator_695d699a44d6234c() {
904
- const ret = Symbol.iterator;
1184
+ export function __wbg_next_25feadfc0913fea9(arg0) {
1185
+ const ret = getObject(arg0).next;
905
1186
  return addHeapObject(ret);
906
1187
  }
907
1188
 
908
- export function __wbindgen_is_function(arg0) {
909
- const ret = typeof getObject(arg0) === "function";
910
- return ret;
1189
+ export function __wbg_next_6574e1a8a62d1055() {
1190
+ return handleError(function (arg0) {
1191
+ const ret = getObject(arg0).next();
1192
+ return addHeapObject(ret);
1193
+ }, arguments);
911
1194
  }
912
1195
 
913
- export function __wbg_next_13b477da1eaa3897(arg0) {
914
- const ret = getObject(arg0).next;
1196
+ export function __wbg_node_02999533c4ea02e3(arg0) {
1197
+ const ret = getObject(arg0).node;
915
1198
  return addHeapObject(ret);
916
1199
  }
917
1200
 
918
- export function __wbg_new_034f913e7636e987() {
919
- const ret = new Array();
1201
+ export function __wbg_process_5c1d670bc53614b8(arg0) {
1202
+ const ret = getObject(arg0).process;
920
1203
  return addHeapObject(ret);
921
1204
  }
922
1205
 
923
- export function __wbg_push_36cf4d81d7da33d1(arg0, arg1) {
1206
+ export function __wbg_push_737cfc8c1432c2c6(arg0, arg1) {
924
1207
  const ret = getObject(arg0).push(getObject(arg1));
925
1208
  return ret;
926
1209
  }
927
1210
 
928
- export function __wbg_instanceof_ArrayBuffer_74945570b4a62ec7(arg0) {
929
- let result;
930
- try {
931
- result = getObject(arg0) instanceof ArrayBuffer;
932
- } catch (_) {
933
- result = false;
934
- }
935
- const ret = result;
936
- return ret;
1211
+ export function __wbg_queueMicrotask_97d92b4fcc8a61c5(arg0) {
1212
+ queueMicrotask(getObject(arg0));
937
1213
  }
938
1214
 
939
- export function __wbg_new_70a2f23d1565c04c(arg0, arg1) {
940
- const ret = new Error(getStringFromWasm0(arg0, arg1));
1215
+ export function __wbg_queueMicrotask_d3219def82552485(arg0) {
1216
+ const ret = getObject(arg0).queueMicrotask;
941
1217
  return addHeapObject(ret);
942
1218
  }
943
1219
 
944
- export function __wbg_has_bd717f25f195f23d() {
1220
+ export function __wbg_randomFillSync_ab2cfe79ebbf2740() {
945
1221
  return handleError(function (arg0, arg1) {
946
- const ret = Reflect.has(getObject(arg0), getObject(arg1));
947
- return ret;
1222
+ getObject(arg0).randomFillSync(takeObject(arg1));
1223
+ }, arguments);
1224
+ }
1225
+
1226
+ export function __wbg_require_79b1e9274cde3c87() {
1227
+ return handleError(function () {
1228
+ const ret = module.require;
1229
+ return addHeapObject(ret);
948
1230
  }, arguments);
949
1231
  }
950
1232
 
951
- export function __wbg_resolve_0aad7c1484731c99(arg0) {
1233
+ export function __wbg_resolve_4851785c9c5f573d(arg0) {
952
1234
  const ret = Promise.resolve(getObject(arg0));
953
1235
  return addHeapObject(ret);
954
1236
  }
955
1237
 
956
- export function __wbg_then_748f75edfb032440(arg0, arg1) {
957
- const ret = getObject(arg0).then(getObject(arg1));
958
- return addHeapObject(ret);
1238
+ export function __wbg_set_3f1d0b984ed272ed(arg0, arg1, arg2) {
1239
+ getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
959
1240
  }
960
1241
 
961
- export function __wbg_then_4866a7d9f55d8f3e(arg0, arg1, arg2) {
962
- const ret = getObject(arg0).then(getObject(arg1), getObject(arg2));
963
- return addHeapObject(ret);
1242
+ export function __wbg_set_65595bdd868b3009(arg0, arg1, arg2) {
1243
+ getObject(arg0).set(getObject(arg1), arg2 >>> 0);
964
1244
  }
965
1245
 
966
- export function __wbindgen_memory() {
967
- const ret = wasm.memory;
968
- return addHeapObject(ret);
1246
+ export function __wbg_setbody_5923b78a95eedf29(arg0, arg1) {
1247
+ getObject(arg0).body = getObject(arg1);
969
1248
  }
970
1249
 
971
- export function __wbg_buffer_ccaed51a635d8a2d(arg0) {
972
- const ret = getObject(arg0).buffer;
973
- return addHeapObject(ret);
1250
+ export function __wbg_setcredentials_c3a22f1cd105a2c6(arg0, arg1) {
1251
+ getObject(arg0).credentials = __wbindgen_enum_RequestCredentials[arg1];
974
1252
  }
975
1253
 
976
- export function __wbg_newwithbyteoffsetandlength_7e3eb787208af730(arg0, arg1, arg2) {
977
- const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
978
- return addHeapObject(ret);
1254
+ export function __wbg_setheaders_834c0bdb6a8949ad(arg0, arg1) {
1255
+ getObject(arg0).headers = getObject(arg1);
979
1256
  }
980
1257
 
981
- export function __wbg_length_9254c4bd3b9f23c4(arg0) {
982
- const ret = getObject(arg0).length;
983
- return ret;
1258
+ export function __wbg_setmethod_3c5280fe5d890842(arg0, arg1, arg2) {
1259
+ getObject(arg0).method = getStringFromWasm0(arg1, arg2);
984
1260
  }
985
1261
 
986
- export function __wbg_new_fec2611eb9180f95(arg0) {
987
- const ret = new Uint8Array(getObject(arg0));
988
- return addHeapObject(ret);
1262
+ export function __wbg_setmode_5dc300b865044b65(arg0, arg1) {
1263
+ getObject(arg0).mode = __wbindgen_enum_RequestMode[arg1];
989
1264
  }
990
1265
 
991
- export function __wbg_set_ec2fcf81bc573fd9(arg0, arg1, arg2) {
992
- getObject(arg0).set(getObject(arg1), arg2 >>> 0);
1266
+ export function __wbg_setname_c0e2d6f348c746f4(arg0, arg1, arg2) {
1267
+ let deferred0_0;
1268
+ let deferred0_1;
1269
+ try {
1270
+ deferred0_0 = arg1;
1271
+ deferred0_1 = arg2;
1272
+ getObject(arg0).name = getStringFromWasm0(arg1, arg2);
1273
+ } finally {
1274
+ wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
1275
+ }
993
1276
  }
994
1277
 
995
- export function __wbg_instanceof_Uint8Array_df0761410414ef36(arg0) {
996
- let result;
1278
+ export function __wbg_setsignal_75b21ef3a81de905(arg0, arg1) {
1279
+ getObject(arg0).signal = getObject(arg1);
1280
+ }
1281
+
1282
+ export function __wbg_settype_39ed370d3edd403c(arg0, arg1, arg2) {
1283
+ getObject(arg0).type = getStringFromWasm0(arg1, arg2);
1284
+ }
1285
+
1286
+ export function __wbg_setvariant_d1d41b778dfe9c17(arg0, arg1, arg2) {
1287
+ let deferred0_0;
1288
+ let deferred0_1;
997
1289
  try {
998
- result = getObject(arg0) instanceof Uint8Array;
999
- } catch (_) {
1000
- result = false;
1290
+ deferred0_0 = arg1;
1291
+ deferred0_1 = arg2;
1292
+ getObject(arg0).variant = getStringFromWasm0(arg1, arg2);
1293
+ } finally {
1294
+ wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
1001
1295
  }
1002
- const ret = result;
1003
- return ret;
1004
1296
  }
1005
1297
 
1006
- export function __wbg_new_4e7308fbedde3997() {
1007
- return handleError(function () {
1008
- const ret = new FormData();
1009
- return addHeapObject(ret);
1010
- }, arguments);
1298
+ export function __wbg_signal_aaf9ad74119f20a4(arg0) {
1299
+ const ret = getObject(arg0).signal;
1300
+ return addHeapObject(ret);
1011
1301
  }
1012
1302
 
1013
- export function __wbg_append_43a4b1c9d5df4168() {
1014
- return handleError(function (arg0, arg1, arg2, arg3, arg4) {
1015
- getObject(arg0).append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
1016
- }, arguments);
1303
+ export function __wbg_stack_0ed75d68575b0f3c(arg0, arg1) {
1304
+ const ret = getObject(arg1).stack;
1305
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1306
+ const len1 = WASM_VECTOR_LEN;
1307
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1308
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1017
1309
  }
1018
1310
 
1019
- export function __wbg_settype_623d2ee701e6310a(arg0, arg1, arg2) {
1020
- getObject(arg0).type = getStringFromWasm0(arg1, arg2);
1311
+ export function __wbg_static_accessor_GLOBAL_88a902d13a557d07() {
1312
+ const ret = typeof global === "undefined" ? null : global;
1313
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
1021
1314
  }
1022
1315
 
1023
- export function __wbg_newwithu8arraysequenceandoptions_d41c0fdf78490206() {
1024
- return handleError(function (arg0, arg1) {
1025
- const ret = new Blob(getObject(arg0), getObject(arg1));
1316
+ export function __wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0() {
1317
+ const ret = typeof globalThis === "undefined" ? null : globalThis;
1318
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
1319
+ }
1320
+
1321
+ export function __wbg_static_accessor_SELF_37c5d418e4bf5819() {
1322
+ const ret = typeof self === "undefined" ? null : self;
1323
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
1324
+ }
1325
+
1326
+ export function __wbg_static_accessor_WINDOW_5de37043a91a9c40() {
1327
+ const ret = typeof window === "undefined" ? null : window;
1328
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
1329
+ }
1330
+
1331
+ export function __wbg_status_f6360336ca686bf0(arg0) {
1332
+ const ret = getObject(arg0).status;
1333
+ return ret;
1334
+ }
1335
+
1336
+ export function __wbg_stringify_f7ed6987935b4a24() {
1337
+ return handleError(function (arg0) {
1338
+ const ret = JSON.stringify(getObject(arg0));
1026
1339
  return addHeapObject(ret);
1027
1340
  }, arguments);
1028
1341
  }
1029
1342
 
1030
- export function __wbg_append_7ee78799a92a9731() {
1031
- return handleError(function (arg0, arg1, arg2, arg3) {
1032
- getObject(arg0).append(getStringFromWasm0(arg1, arg2), getObject(arg3));
1033
- }, arguments);
1343
+ export function __wbg_subarray_aa9065fa9dc5df96(arg0, arg1, arg2) {
1344
+ const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
1345
+ return addHeapObject(ret);
1034
1346
  }
1035
1347
 
1036
- export function __wbg_append_8135c71037096394() {
1037
- return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5) {
1038
- getObject(arg0).append(
1039
- getStringFromWasm0(arg1, arg2),
1040
- getObject(arg3),
1041
- getStringFromWasm0(arg4, arg5),
1042
- );
1348
+ export function __wbg_text_7805bea50de2af49() {
1349
+ return handleError(function (arg0) {
1350
+ const ret = getObject(arg0).text();
1351
+ return addHeapObject(ret);
1043
1352
  }, arguments);
1044
1353
  }
1045
1354
 
1046
- export function __wbg_fetch_f8d735ba6fe1b719(arg0) {
1047
- const ret = fetch(getObject(arg0));
1355
+ export function __wbg_then_44b73946d2fb3e7d(arg0, arg1) {
1356
+ const ret = getObject(arg0).then(getObject(arg1));
1048
1357
  return addHeapObject(ret);
1049
1358
  }
1050
1359
 
1051
- export function __wbg_fetch_1fdc4448ed9eec00(arg0, arg1) {
1052
- const ret = getObject(arg0).fetch(getObject(arg1));
1360
+ export function __wbg_then_48b406749878a531(arg0, arg1, arg2) {
1361
+ const ret = getObject(arg0).then(getObject(arg1), getObject(arg2));
1053
1362
  return addHeapObject(ret);
1054
1363
  }
1055
1364
 
1056
- export function __wbg_new_75169ae5a9683c55() {
1057
- return handleError(function () {
1058
- const ret = new AbortController();
1059
- return addHeapObject(ret);
1060
- }, arguments);
1365
+ export function __wbg_url_ae10c34ca209681d(arg0, arg1) {
1366
+ const ret = getObject(arg1).url;
1367
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1368
+ const len1 = WASM_VECTOR_LEN;
1369
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1370
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1371
+ }
1372
+
1373
+ export function __wbg_value_cd1ffa7b1ab794f1(arg0) {
1374
+ const ret = getObject(arg0).value;
1375
+ return addHeapObject(ret);
1376
+ }
1377
+
1378
+ export function __wbg_versions_c71aa1626a93e0a1(arg0) {
1379
+ const ret = getObject(arg0).versions;
1380
+ return addHeapObject(ret);
1381
+ }
1382
+
1383
+ export function __wbg_warn_aaf1f4664a035bd6(arg0, arg1, arg2, arg3) {
1384
+ console.warn(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
1385
+ }
1386
+
1387
+ export function __wbindgen_as_number(arg0) {
1388
+ const ret = +getObject(arg0);
1389
+ return ret;
1061
1390
  }
1062
1391
 
1063
1392
  export function __wbindgen_boolean_get(arg0) {
@@ -1066,19 +1395,19 @@ export function __wbindgen_boolean_get(arg0) {
1066
1395
  return ret;
1067
1396
  }
1068
1397
 
1069
- export function __wbindgen_number_get(arg0, arg1) {
1070
- const obj = getObject(arg1);
1071
- const ret = typeof obj === "number" ? obj : undefined;
1072
- getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
1073
- getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
1398
+ export function __wbindgen_cb_drop(arg0) {
1399
+ const obj = takeObject(arg0).original;
1400
+ if (obj.cnt-- == 1) {
1401
+ obj.a = 0;
1402
+ return true;
1403
+ }
1404
+ const ret = false;
1405
+ return ret;
1074
1406
  }
1075
1407
 
1076
- export function __wbg_String_b9412f8799faab3e(arg0, arg1) {
1077
- const ret = String(getObject(arg1));
1078
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1079
- const len1 = WASM_VECTOR_LEN;
1080
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1081
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1408
+ export function __wbindgen_closure_wrapper2088(arg0, arg1, arg2) {
1409
+ const ret = makeMutClosure(arg0, arg1, 559, __wbg_adapter_40);
1410
+ return addHeapObject(ret);
1082
1411
  }
1083
1412
 
1084
1413
  export function __wbindgen_debug_string(arg0, arg1) {
@@ -1089,47 +1418,84 @@ export function __wbindgen_debug_string(arg0, arg1) {
1089
1418
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1090
1419
  }
1091
1420
 
1092
- export function __wbindgen_throw(arg0, arg1) {
1093
- throw new Error(getStringFromWasm0(arg0, arg1));
1421
+ export function __wbindgen_error_new(arg0, arg1) {
1422
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
1423
+ return addHeapObject(ret);
1094
1424
  }
1095
1425
 
1096
- export function __wbg_queueMicrotask_848aa4969108a57e(arg0) {
1097
- const ret = getObject(arg0).queueMicrotask;
1098
- return addHeapObject(ret);
1426
+ export function __wbindgen_in(arg0, arg1) {
1427
+ const ret = getObject(arg0) in getObject(arg1);
1428
+ return ret;
1099
1429
  }
1100
1430
 
1101
- export function __wbg_queueMicrotask_c5419c06eab41e73(arg0) {
1102
- queueMicrotask(getObject(arg0));
1431
+ export function __wbindgen_is_function(arg0) {
1432
+ const ret = typeof getObject(arg0) === "function";
1433
+ return ret;
1103
1434
  }
1104
1435
 
1105
- export function __wbg_newwithstrandinit_4b92c89af0a8e383() {
1106
- return handleError(function (arg0, arg1, arg2) {
1107
- const ret = new Request(getStringFromWasm0(arg0, arg1), getObject(arg2));
1108
- return addHeapObject(ret);
1109
- }, arguments);
1436
+ export function __wbindgen_is_object(arg0) {
1437
+ const val = getObject(arg0);
1438
+ const ret = typeof val === "object" && val !== null;
1439
+ return ret;
1110
1440
  }
1111
1441
 
1112
- export function __wbg_debug_a0b6c2c5ac9a4bfd(arg0, arg1, arg2, arg3) {
1113
- console.debug(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
1442
+ export function __wbindgen_is_string(arg0) {
1443
+ const ret = typeof getObject(arg0) === "string";
1444
+ return ret;
1114
1445
  }
1115
1446
 
1116
- export function __wbg_error_4d17c5bb1ca90c94(arg0, arg1, arg2, arg3) {
1117
- console.error(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
1447
+ export function __wbindgen_is_undefined(arg0) {
1448
+ const ret = getObject(arg0) === undefined;
1449
+ return ret;
1118
1450
  }
1119
1451
 
1120
- export function __wbg_info_1c7fba7da21072d1(arg0, arg1, arg2, arg3) {
1121
- console.info(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
1452
+ export function __wbindgen_jsval_loose_eq(arg0, arg1) {
1453
+ const ret = getObject(arg0) == getObject(arg1);
1454
+ return ret;
1122
1455
  }
1123
1456
 
1124
- export function __wbg_log_4de37a0274d94769(arg0, arg1, arg2, arg3) {
1125
- console.log(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
1457
+ export function __wbindgen_memory() {
1458
+ const ret = wasm.memory;
1459
+ return addHeapObject(ret);
1126
1460
  }
1127
1461
 
1128
- export function __wbg_warn_2e2787d40aad9a81(arg0, arg1, arg2, arg3) {
1129
- console.warn(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
1462
+ export function __wbindgen_number_get(arg0, arg1) {
1463
+ const obj = getObject(arg1);
1464
+ const ret = typeof obj === "number" ? obj : undefined;
1465
+ getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
1466
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
1467
+ }
1468
+
1469
+ export function __wbindgen_number_new(arg0) {
1470
+ const ret = arg0;
1471
+ return addHeapObject(ret);
1130
1472
  }
1131
1473
 
1132
- export function __wbindgen_closure_wrapper1630(arg0, arg1, arg2) {
1133
- const ret = makeMutClosure(arg0, arg1, 434, __wbg_adapter_38);
1474
+ export function __wbindgen_object_clone_ref(arg0) {
1475
+ const ret = getObject(arg0);
1134
1476
  return addHeapObject(ret);
1135
1477
  }
1478
+
1479
+ export function __wbindgen_object_drop_ref(arg0) {
1480
+ takeObject(arg0);
1481
+ }
1482
+
1483
+ export function __wbindgen_string_get(arg0, arg1) {
1484
+ const obj = getObject(arg1);
1485
+ const ret = typeof obj === "string" ? obj : undefined;
1486
+ var ptr1 = isLikeNone(ret)
1487
+ ? 0
1488
+ : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1489
+ var len1 = WASM_VECTOR_LEN;
1490
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1491
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1492
+ }
1493
+
1494
+ export function __wbindgen_string_new(arg0, arg1) {
1495
+ const ret = getStringFromWasm0(arg0, arg1);
1496
+ return addHeapObject(ret);
1497
+ }
1498
+
1499
+ export function __wbindgen_throw(arg0, arg1) {
1500
+ throw new Error(getStringFromWasm0(arg0, arg1));
1501
+ }