@bitwarden/sdk-internal 0.2.0-main.13 → 0.2.0-main.130

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,35 @@ 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));
269
+ return ret !== 0;
270
+ } finally {
271
+ heap[stack_pointer++] = undefined;
272
+ }
273
+ }
274
+
275
+ /**
276
+ * @param {any} error
277
+ * @returns {boolean}
278
+ */
279
+ export function isSshKeyExportError(error) {
280
+ try {
281
+ const ret = wasm.isSshKeyExportError(addBorrowedObject(error));
282
+ return ret !== 0;
283
+ } finally {
284
+ heap[stack_pointer++] = undefined;
285
+ }
286
+ }
287
+
288
+ /**
289
+ * @param {any} error
290
+ * @returns {boolean}
291
+ */
292
+ export function isSshKeyImportError(error) {
293
+ try {
294
+ const ret = wasm.isSshKeyImportError(addBorrowedObject(error));
268
295
  return ret !== 0;
269
296
  } finally {
270
297
  heap[stack_pointer++] = undefined;
@@ -288,9 +315,61 @@ export function isKeyGenerationError(error) {
288
315
  * @param {any} error
289
316
  * @returns {boolean}
290
317
  */
291
- export function isTestError(error) {
318
+ export function isDecryptFileError(error) {
292
319
  try {
293
- const ret = wasm.isTestError(addBorrowedObject(error));
320
+ const ret = wasm.isDecryptFileError(addBorrowedObject(error));
321
+ return ret !== 0;
322
+ } finally {
323
+ heap[stack_pointer++] = undefined;
324
+ }
325
+ }
326
+
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;
337
+ }
338
+ }
339
+
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;
350
+ }
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));
294
373
  return ret !== 0;
295
374
  } finally {
296
375
  heap[stack_pointer++] = undefined;
@@ -298,8 +377,41 @@ export function isTestError(error) {
298
377
  }
299
378
 
300
379
  /**
380
+ * @param {LogLevel} level
381
+ */
382
+ export function set_log_level(level) {
383
+ wasm.set_log_level(level);
384
+ }
385
+
386
+ /**
387
+ * @param {LogLevel | null} [log_level]
388
+ */
389
+ export function init_sdk(log_level) {
390
+ wasm.init_sdk(isLikeNone(log_level) ? 5 : log_level);
391
+ }
392
+
393
+ function passArray8ToWasm0(arg, malloc) {
394
+ const ptr = malloc(arg.length * 1, 1) >>> 0;
395
+ getUint8ArrayMemory0().set(arg, ptr / 1);
396
+ WASM_VECTOR_LEN = arg.length;
397
+ return ptr;
398
+ }
399
+
400
+ function getArrayU8FromWasm0(ptr, len) {
401
+ ptr = ptr >>> 0;
402
+ return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
403
+ }
404
+ /**
405
+ * Generate a new SSH key pair
406
+ *
407
+ * # Arguments
408
+ * - `key_algorithm` - The algorithm to use for the key pair
409
+ *
410
+ * # Returns
411
+ * - `Ok(SshKey)` if the key was successfully generated
412
+ * - `Err(KeyGenerationError)` if the key could not be generated
301
413
  * @param {KeyAlgorithm} key_algorithm
302
- * @returns {GenerateSshKeyResult}
414
+ * @returns {SshKeyView}
303
415
  */
304
416
  export function generate_ssh_key(key_algorithm) {
305
417
  try {
@@ -317,15 +429,69 @@ export function generate_ssh_key(key_algorithm) {
317
429
  }
318
430
  }
319
431
 
320
- function handleError(f, args) {
432
+ /**
433
+ * Convert a PCKS8 or OpenSSH encrypted or unencrypted private key
434
+ * to an OpenSSH private key with public key and fingerprint
435
+ *
436
+ * # Arguments
437
+ * - `imported_key` - The private key to convert
438
+ * - `password` - The password to use for decrypting the key
439
+ *
440
+ * # Returns
441
+ * - `Ok(SshKey)` if the key was successfully coneverted
442
+ * - `Err(PasswordRequired)` if the key is encrypted and no password was provided
443
+ * - `Err(WrongPassword)` if the password provided is incorrect
444
+ * - `Err(ParsingError)` if the key could not be parsed
445
+ * - `Err(UnsupportedKeyType)` if the key type is not supported
446
+ * @param {string} imported_key
447
+ * @param {string | null} [password]
448
+ * @returns {SshKeyView}
449
+ */
450
+ export function import_ssh_key(imported_key, password) {
321
451
  try {
322
- return f.apply(this, args);
323
- } catch (e) {
324
- wasm.__wbindgen_exn_store(addHeapObject(e));
452
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
453
+ const ptr0 = passStringToWasm0(imported_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
454
+ const len0 = WASM_VECTOR_LEN;
455
+ var ptr1 = isLikeNone(password)
456
+ ? 0
457
+ : passStringToWasm0(password, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
458
+ var len1 = WASM_VECTOR_LEN;
459
+ wasm.import_ssh_key(retptr, ptr0, len0, ptr1, len1);
460
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
461
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
462
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
463
+ if (r2) {
464
+ throw takeObject(r1);
465
+ }
466
+ return takeObject(r0);
467
+ } finally {
468
+ wasm.__wbindgen_add_to_stack_pointer(16);
469
+ }
470
+ }
471
+
472
+ /**
473
+ * @param {any} error
474
+ * @returns {boolean}
475
+ */
476
+ export function isTestError(error) {
477
+ try {
478
+ const ret = wasm.isTestError(addBorrowedObject(error));
479
+ return ret !== 0;
480
+ } finally {
481
+ heap[stack_pointer++] = undefined;
325
482
  }
326
483
  }
327
- function __wbg_adapter_125(arg0, arg1, arg2, arg3) {
328
- wasm.wasm_bindgen__convert__closures__invoke2_mut__h7363c1bfa226a55d(
484
+
485
+ function __wbg_adapter_40(arg0, arg1, arg2) {
486
+ wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h8ef26cc0e999965d(
487
+ arg0,
488
+ arg1,
489
+ addHeapObject(arg2),
490
+ );
491
+ }
492
+
493
+ function __wbg_adapter_150(arg0, arg1, arg2, arg3) {
494
+ wasm.wasm_bindgen__convert__closures__invoke2_mut__h33defb2ea0fdb769(
329
495
  arg0,
330
496
  arg1,
331
497
  addHeapObject(arg2),
@@ -333,6 +499,9 @@ function __wbg_adapter_125(arg0, arg1, arg2, arg3) {
333
499
  );
334
500
  }
335
501
 
502
+ /**
503
+ * @enum {0 | 1 | 2 | 3 | 4}
504
+ */
336
505
  export const LogLevel = Object.freeze({
337
506
  Trace: 0,
338
507
  0: "Trace",
@@ -368,14 +537,10 @@ export class BitwardenClient {
368
537
  wasm.__wbg_bitwardenclient_free(ptr, 0);
369
538
  }
370
539
  /**
371
- * @param {ClientSettings | undefined} [settings]
372
- * @param {LogLevel | undefined} [log_level]
540
+ * @param {ClientSettings | null} [settings]
373
541
  */
374
- constructor(settings, log_level) {
375
- const ret = wasm.bitwardenclient_new(
376
- isLikeNone(settings) ? 0 : addHeapObject(settings),
377
- isLikeNone(log_level) ? 5 : log_level,
378
- );
542
+ constructor(settings) {
543
+ const ret = wasm.bitwardenclient_new(isLikeNone(settings) ? 0 : addHeapObject(settings));
379
544
  this.__wbg_ptr = ret >>> 0;
380
545
  BitwardenClientFinalization.register(this, this.__wbg_ptr, this);
381
546
  return this;
@@ -424,13 +589,21 @@ export class BitwardenClient {
424
589
  }
425
590
  /**
426
591
  * @param {string} msg
427
- * @returns {Promise<void>}
428
592
  */
429
593
  throw(msg) {
430
- const ptr0 = passStringToWasm0(msg, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
431
- const len0 = WASM_VECTOR_LEN;
432
- const ret = wasm.bitwardenclient_throw(this.__wbg_ptr, ptr0, len0);
433
- return takeObject(ret);
594
+ try {
595
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
596
+ const ptr0 = passStringToWasm0(msg, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
597
+ const len0 = WASM_VECTOR_LEN;
598
+ wasm.bitwardenclient_throw(retptr, this.__wbg_ptr, ptr0, len0);
599
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
600
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
601
+ if (r1) {
602
+ throw takeObject(r0);
603
+ }
604
+ } finally {
605
+ wasm.__wbindgen_add_to_stack_pointer(16);
606
+ }
434
607
  }
435
608
  /**
436
609
  * Test method, calls http endpoint
@@ -444,45 +617,160 @@ export class BitwardenClient {
444
617
  return takeObject(ret);
445
618
  }
446
619
  /**
447
- * @returns {ClientCrypto}
620
+ * @returns {CryptoClient}
448
621
  */
449
622
  crypto() {
450
623
  const ret = wasm.bitwardenclient_crypto(this.__wbg_ptr);
451
- return ClientCrypto.__wrap(ret);
624
+ return CryptoClient.__wrap(ret);
452
625
  }
453
626
  /**
454
- * @returns {ClientVault}
627
+ * @returns {VaultClient}
455
628
  */
456
629
  vault() {
457
630
  const ret = wasm.bitwardenclient_crypto(this.__wbg_ptr);
458
- return ClientVault.__wrap(ret);
631
+ return VaultClient.__wrap(ret);
632
+ }
633
+ }
634
+
635
+ const ClientFoldersFinalization =
636
+ typeof FinalizationRegistry === "undefined"
637
+ ? { register: () => {}, unregister: () => {} }
638
+ : new FinalizationRegistry((ptr) => wasm.__wbg_clientfolders_free(ptr >>> 0, 1));
639
+
640
+ export class ClientFolders {
641
+ static __wrap(ptr) {
642
+ ptr = ptr >>> 0;
643
+ const obj = Object.create(ClientFolders.prototype);
644
+ obj.__wbg_ptr = ptr;
645
+ ClientFoldersFinalization.register(obj, obj.__wbg_ptr, obj);
646
+ return obj;
647
+ }
648
+
649
+ __destroy_into_raw() {
650
+ const ptr = this.__wbg_ptr;
651
+ this.__wbg_ptr = 0;
652
+ ClientFoldersFinalization.unregister(this);
653
+ return ptr;
654
+ }
655
+
656
+ free() {
657
+ const ptr = this.__destroy_into_raw();
658
+ wasm.__wbg_clientfolders_free(ptr, 0);
659
+ }
660
+ /**
661
+ * Decrypt folder
662
+ * @param {Folder} folder
663
+ * @returns {FolderView}
664
+ */
665
+ decrypt(folder) {
666
+ try {
667
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
668
+ wasm.clientfolders_decrypt(retptr, this.__wbg_ptr, addHeapObject(folder));
669
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
670
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
671
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
672
+ if (r2) {
673
+ throw takeObject(r1);
674
+ }
675
+ return takeObject(r0);
676
+ } finally {
677
+ wasm.__wbindgen_add_to_stack_pointer(16);
678
+ }
679
+ }
680
+ }
681
+
682
+ const ClientTotpFinalization =
683
+ typeof FinalizationRegistry === "undefined"
684
+ ? { register: () => {}, unregister: () => {} }
685
+ : new FinalizationRegistry((ptr) => wasm.__wbg_clienttotp_free(ptr >>> 0, 1));
686
+
687
+ export class ClientTotp {
688
+ static __wrap(ptr) {
689
+ ptr = ptr >>> 0;
690
+ const obj = Object.create(ClientTotp.prototype);
691
+ obj.__wbg_ptr = ptr;
692
+ ClientTotpFinalization.register(obj, obj.__wbg_ptr, obj);
693
+ return obj;
694
+ }
695
+
696
+ __destroy_into_raw() {
697
+ const ptr = this.__wbg_ptr;
698
+ this.__wbg_ptr = 0;
699
+ ClientTotpFinalization.unregister(this);
700
+ return ptr;
701
+ }
702
+
703
+ free() {
704
+ const ptr = this.__destroy_into_raw();
705
+ wasm.__wbg_clienttotp_free(ptr, 0);
706
+ }
707
+ /**
708
+ * Generates a TOTP code from a provided key
709
+ *
710
+ * # Arguments
711
+ * - `key` - Can be:
712
+ * - A base32 encoded string
713
+ * - OTP Auth URI
714
+ * - Steam URI
715
+ * - `time_ms` - Optional timestamp in milliseconds
716
+ *
717
+ * # Returns
718
+ * - `Ok(TotpResponse)` containing the generated code and period
719
+ * - `Err(TotpError)` if code generation fails
720
+ * @param {string} key
721
+ * @param {number | null} [time_ms]
722
+ * @returns {TotpResponse}
723
+ */
724
+ generate_totp(key, time_ms) {
725
+ try {
726
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
727
+ const ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
728
+ const len0 = WASM_VECTOR_LEN;
729
+ wasm.clienttotp_generate_totp(
730
+ retptr,
731
+ this.__wbg_ptr,
732
+ ptr0,
733
+ len0,
734
+ !isLikeNone(time_ms),
735
+ isLikeNone(time_ms) ? 0 : time_ms,
736
+ );
737
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
738
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
739
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
740
+ if (r2) {
741
+ throw takeObject(r1);
742
+ }
743
+ return takeObject(r0);
744
+ } finally {
745
+ wasm.__wbindgen_add_to_stack_pointer(16);
746
+ }
459
747
  }
460
748
  }
461
749
 
462
- const ClientCryptoFinalization =
750
+ const CryptoClientFinalization =
463
751
  typeof FinalizationRegistry === "undefined"
464
752
  ? { register: () => {}, unregister: () => {} }
465
- : new FinalizationRegistry((ptr) => wasm.__wbg_clientcrypto_free(ptr >>> 0, 1));
753
+ : new FinalizationRegistry((ptr) => wasm.__wbg_cryptoclient_free(ptr >>> 0, 1));
466
754
 
467
- export class ClientCrypto {
755
+ export class CryptoClient {
468
756
  static __wrap(ptr) {
469
757
  ptr = ptr >>> 0;
470
- const obj = Object.create(ClientCrypto.prototype);
758
+ const obj = Object.create(CryptoClient.prototype);
471
759
  obj.__wbg_ptr = ptr;
472
- ClientCryptoFinalization.register(obj, obj.__wbg_ptr, obj);
760
+ CryptoClientFinalization.register(obj, obj.__wbg_ptr, obj);
473
761
  return obj;
474
762
  }
475
763
 
476
764
  __destroy_into_raw() {
477
765
  const ptr = this.__wbg_ptr;
478
766
  this.__wbg_ptr = 0;
479
- ClientCryptoFinalization.unregister(this);
767
+ CryptoClientFinalization.unregister(this);
480
768
  return ptr;
481
769
  }
482
770
 
483
771
  free() {
484
772
  const ptr = this.__destroy_into_raw();
485
- wasm.__wbg_clientcrypto_free(ptr, 0);
773
+ wasm.__wbg_cryptoclient_free(ptr, 0);
486
774
  }
487
775
  /**
488
776
  * Initialization method for the user crypto. Needs to be called before any other crypto
@@ -491,7 +779,7 @@ export class ClientCrypto {
491
779
  * @returns {Promise<void>}
492
780
  */
493
781
  initialize_user_crypto(req) {
494
- const ret = wasm.clientcrypto_initialize_user_crypto(this.__wbg_ptr, addHeapObject(req));
782
+ const ret = wasm.cryptoclient_initialize_user_crypto(this.__wbg_ptr, addHeapObject(req));
495
783
  return takeObject(ret);
496
784
  }
497
785
  /**
@@ -501,82 +789,253 @@ export class ClientCrypto {
501
789
  * @returns {Promise<void>}
502
790
  */
503
791
  initialize_org_crypto(req) {
504
- const ret = wasm.clientcrypto_initialize_org_crypto(this.__wbg_ptr, addHeapObject(req));
792
+ const ret = wasm.cryptoclient_initialize_org_crypto(this.__wbg_ptr, addHeapObject(req));
505
793
  return takeObject(ret);
506
794
  }
795
+ /**
796
+ * Generates a new key pair and encrypts the private key with the provided user key.
797
+ * Crypto initialization not required.
798
+ * @param {string} user_key
799
+ * @returns {MakeKeyPairResponse}
800
+ */
801
+ make_key_pair(user_key) {
802
+ try {
803
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
804
+ const ptr0 = passStringToWasm0(user_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
805
+ const len0 = WASM_VECTOR_LEN;
806
+ wasm.cryptoclient_make_key_pair(retptr, this.__wbg_ptr, ptr0, len0);
807
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
808
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
809
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
810
+ if (r2) {
811
+ throw takeObject(r1);
812
+ }
813
+ return takeObject(r0);
814
+ } finally {
815
+ wasm.__wbindgen_add_to_stack_pointer(16);
816
+ }
817
+ }
818
+ /**
819
+ * Verifies a user's asymmetric keys by decrypting the private key with the provided user
820
+ * key. Returns if the private key is decryptable and if it is a valid matching key.
821
+ * Crypto initialization not required.
822
+ * @param {VerifyAsymmetricKeysRequest} request
823
+ * @returns {VerifyAsymmetricKeysResponse}
824
+ */
825
+ verify_asymmetric_keys(request) {
826
+ try {
827
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
828
+ wasm.cryptoclient_verify_asymmetric_keys(retptr, this.__wbg_ptr, addHeapObject(request));
829
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
830
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
831
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
832
+ if (r2) {
833
+ throw takeObject(r1);
834
+ }
835
+ return takeObject(r0);
836
+ } finally {
837
+ wasm.__wbindgen_add_to_stack_pointer(16);
838
+ }
839
+ }
507
840
  }
508
841
 
509
- const ClientFoldersFinalization =
842
+ const PureCryptoFinalization =
510
843
  typeof FinalizationRegistry === "undefined"
511
844
  ? { register: () => {}, unregister: () => {} }
512
- : new FinalizationRegistry((ptr) => wasm.__wbg_clientfolders_free(ptr >>> 0, 1));
513
-
514
- export class ClientFolders {
515
- static __wrap(ptr) {
516
- ptr = ptr >>> 0;
517
- const obj = Object.create(ClientFolders.prototype);
518
- obj.__wbg_ptr = ptr;
519
- ClientFoldersFinalization.register(obj, obj.__wbg_ptr, obj);
520
- return obj;
521
- }
522
-
845
+ : new FinalizationRegistry((ptr) => wasm.__wbg_purecrypto_free(ptr >>> 0, 1));
846
+ /**
847
+ * This module represents a stopgap solution to provide access to primitive crypto functions for JS
848
+ * clients. It is not intended to be used outside of the JS clients and this pattern should not be
849
+ * proliferated. It is necessary because we want to use SDK crypto prior to the SDK being fully
850
+ * responsible for state and keys.
851
+ */
852
+ export class PureCrypto {
523
853
  __destroy_into_raw() {
524
854
  const ptr = this.__wbg_ptr;
525
855
  this.__wbg_ptr = 0;
526
- ClientFoldersFinalization.unregister(this);
856
+ PureCryptoFinalization.unregister(this);
527
857
  return ptr;
528
858
  }
529
859
 
530
860
  free() {
531
861
  const ptr = this.__destroy_into_raw();
532
- wasm.__wbg_clientfolders_free(ptr, 0);
862
+ wasm.__wbg_purecrypto_free(ptr, 0);
533
863
  }
534
864
  /**
535
- * Decrypt folder
536
- * @param {Folder} folder
537
- * @returns {FolderView}
865
+ * @param {string} enc_string
866
+ * @param {Uint8Array} key
867
+ * @returns {string}
538
868
  */
539
- decrypt(folder) {
869
+ static symmetric_decrypt(enc_string, key) {
870
+ let deferred4_0;
871
+ let deferred4_1;
540
872
  try {
541
873
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
542
- wasm.clientfolders_decrypt(retptr, this.__wbg_ptr, addHeapObject(folder));
874
+ const ptr0 = passStringToWasm0(enc_string, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
875
+ const len0 = WASM_VECTOR_LEN;
876
+ const ptr1 = passArray8ToWasm0(key, wasm.__wbindgen_malloc);
877
+ const len1 = WASM_VECTOR_LEN;
878
+ wasm.purecrypto_symmetric_decrypt(retptr, ptr0, len0, ptr1, len1);
543
879
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
544
880
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
545
881
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
546
- if (r2) {
547
- throw takeObject(r1);
882
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
883
+ var ptr3 = r0;
884
+ var len3 = r1;
885
+ if (r3) {
886
+ ptr3 = 0;
887
+ len3 = 0;
888
+ throw takeObject(r2);
548
889
  }
549
- return takeObject(r0);
890
+ deferred4_0 = ptr3;
891
+ deferred4_1 = len3;
892
+ return getStringFromWasm0(ptr3, len3);
893
+ } finally {
894
+ wasm.__wbindgen_add_to_stack_pointer(16);
895
+ wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
896
+ }
897
+ }
898
+ /**
899
+ * @param {string} enc_string
900
+ * @param {Uint8Array} key
901
+ * @returns {Uint8Array}
902
+ */
903
+ static symmetric_decrypt_to_bytes(enc_string, key) {
904
+ try {
905
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
906
+ const ptr0 = passStringToWasm0(enc_string, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
907
+ const len0 = WASM_VECTOR_LEN;
908
+ const ptr1 = passArray8ToWasm0(key, wasm.__wbindgen_malloc);
909
+ const len1 = WASM_VECTOR_LEN;
910
+ wasm.purecrypto_symmetric_decrypt_to_bytes(retptr, ptr0, len0, ptr1, len1);
911
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
912
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
913
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
914
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
915
+ if (r3) {
916
+ throw takeObject(r2);
917
+ }
918
+ var v3 = getArrayU8FromWasm0(r0, r1).slice();
919
+ wasm.__wbindgen_free(r0, r1 * 1, 1);
920
+ return v3;
921
+ } finally {
922
+ wasm.__wbindgen_add_to_stack_pointer(16);
923
+ }
924
+ }
925
+ /**
926
+ * @param {Uint8Array} enc_bytes
927
+ * @param {Uint8Array} key
928
+ * @returns {Uint8Array}
929
+ */
930
+ static symmetric_decrypt_array_buffer(enc_bytes, key) {
931
+ try {
932
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
933
+ const ptr0 = passArray8ToWasm0(enc_bytes, wasm.__wbindgen_malloc);
934
+ const len0 = WASM_VECTOR_LEN;
935
+ const ptr1 = passArray8ToWasm0(key, wasm.__wbindgen_malloc);
936
+ const len1 = WASM_VECTOR_LEN;
937
+ wasm.purecrypto_symmetric_decrypt_array_buffer(retptr, ptr0, len0, ptr1, len1);
938
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
939
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
940
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
941
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
942
+ if (r3) {
943
+ throw takeObject(r2);
944
+ }
945
+ var v3 = getArrayU8FromWasm0(r0, r1).slice();
946
+ wasm.__wbindgen_free(r0, r1 * 1, 1);
947
+ return v3;
948
+ } finally {
949
+ wasm.__wbindgen_add_to_stack_pointer(16);
950
+ }
951
+ }
952
+ /**
953
+ * @param {string} plain
954
+ * @param {Uint8Array} key
955
+ * @returns {string}
956
+ */
957
+ static symmetric_encrypt(plain, key) {
958
+ let deferred4_0;
959
+ let deferred4_1;
960
+ try {
961
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
962
+ const ptr0 = passStringToWasm0(plain, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
963
+ const len0 = WASM_VECTOR_LEN;
964
+ const ptr1 = passArray8ToWasm0(key, wasm.__wbindgen_malloc);
965
+ const len1 = WASM_VECTOR_LEN;
966
+ wasm.purecrypto_symmetric_encrypt(retptr, ptr0, len0, ptr1, len1);
967
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
968
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
969
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
970
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
971
+ var ptr3 = r0;
972
+ var len3 = r1;
973
+ if (r3) {
974
+ ptr3 = 0;
975
+ len3 = 0;
976
+ throw takeObject(r2);
977
+ }
978
+ deferred4_0 = ptr3;
979
+ deferred4_1 = len3;
980
+ return getStringFromWasm0(ptr3, len3);
981
+ } finally {
982
+ wasm.__wbindgen_add_to_stack_pointer(16);
983
+ wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
984
+ }
985
+ }
986
+ /**
987
+ * @param {Uint8Array} plain
988
+ * @param {Uint8Array} key
989
+ * @returns {Uint8Array}
990
+ */
991
+ static symmetric_encrypt_to_array_buffer(plain, key) {
992
+ try {
993
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
994
+ const ptr0 = passArray8ToWasm0(plain, wasm.__wbindgen_malloc);
995
+ const len0 = WASM_VECTOR_LEN;
996
+ const ptr1 = passArray8ToWasm0(key, wasm.__wbindgen_malloc);
997
+ const len1 = WASM_VECTOR_LEN;
998
+ wasm.purecrypto_symmetric_encrypt_to_array_buffer(retptr, ptr0, len0, ptr1, len1);
999
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1000
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1001
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1002
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
1003
+ if (r3) {
1004
+ throw takeObject(r2);
1005
+ }
1006
+ var v3 = getArrayU8FromWasm0(r0, r1).slice();
1007
+ wasm.__wbindgen_free(r0, r1 * 1, 1);
1008
+ return v3;
550
1009
  } finally {
551
1010
  wasm.__wbindgen_add_to_stack_pointer(16);
552
1011
  }
553
1012
  }
554
1013
  }
555
1014
 
556
- const ClientVaultFinalization =
1015
+ const VaultClientFinalization =
557
1016
  typeof FinalizationRegistry === "undefined"
558
1017
  ? { register: () => {}, unregister: () => {} }
559
- : new FinalizationRegistry((ptr) => wasm.__wbg_clientvault_free(ptr >>> 0, 1));
1018
+ : new FinalizationRegistry((ptr) => wasm.__wbg_vaultclient_free(ptr >>> 0, 1));
560
1019
 
561
- export class ClientVault {
1020
+ export class VaultClient {
562
1021
  static __wrap(ptr) {
563
1022
  ptr = ptr >>> 0;
564
- const obj = Object.create(ClientVault.prototype);
1023
+ const obj = Object.create(VaultClient.prototype);
565
1024
  obj.__wbg_ptr = ptr;
566
- ClientVaultFinalization.register(obj, obj.__wbg_ptr, obj);
1025
+ VaultClientFinalization.register(obj, obj.__wbg_ptr, obj);
567
1026
  return obj;
568
1027
  }
569
1028
 
570
1029
  __destroy_into_raw() {
571
1030
  const ptr = this.__wbg_ptr;
572
1031
  this.__wbg_ptr = 0;
573
- ClientVaultFinalization.unregister(this);
1032
+ VaultClientFinalization.unregister(this);
574
1033
  return ptr;
575
1034
  }
576
1035
 
577
1036
  free() {
578
1037
  const ptr = this.__destroy_into_raw();
579
- wasm.__wbg_clientvault_free(ptr, 0);
1038
+ wasm.__wbg_vaultclient_free(ptr, 0);
580
1039
  }
581
1040
  /**
582
1041
  * @returns {ClientFolders}
@@ -585,188 +1044,175 @@ export class ClientVault {
585
1044
  const ret = wasm.bitwardenclient_crypto(this.__wbg_ptr);
586
1045
  return ClientFolders.__wrap(ret);
587
1046
  }
588
- }
589
-
590
- export function __wbg_new_fe19e4f3db5c3999(arg0, arg1) {
591
- let deferred0_0;
592
- let deferred0_1;
593
- try {
594
- deferred0_0 = arg0;
595
- deferred0_1 = arg1;
596
- const ret = new Error(getStringFromWasm0(arg0, arg1));
597
- return addHeapObject(ret);
598
- } finally {
599
- wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
1047
+ /**
1048
+ * @returns {ClientTotp}
1049
+ */
1050
+ totp() {
1051
+ const ret = wasm.bitwardenclient_crypto(this.__wbg_ptr);
1052
+ return ClientTotp.__wrap(ret);
600
1053
  }
601
1054
  }
602
1055
 
603
- export function __wbg_setname_46d623c31ae39910(arg0, arg1, arg2) {
604
- let deferred0_0;
605
- let deferred0_1;
606
- try {
607
- deferred0_0 = arg1;
608
- deferred0_1 = arg2;
609
- getObject(arg0).name = getStringFromWasm0(arg1, arg2);
610
- } finally {
611
- wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
612
- }
613
- }
614
-
615
- export function __wbg_setvariant_262a12673324f71b(arg0, arg1, arg2) {
616
- let deferred0_0;
617
- let deferred0_1;
618
- try {
619
- deferred0_0 = arg1;
620
- deferred0_1 = arg2;
621
- getObject(arg0).variant = getStringFromWasm0(arg1, arg2);
622
- } finally {
623
- wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
624
- }
1056
+ export function __wbg_String_8f0eb39a4a4c2f66(arg0, arg1) {
1057
+ const ret = String(getObject(arg1));
1058
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1059
+ const len1 = WASM_VECTOR_LEN;
1060
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1061
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
625
1062
  }
626
1063
 
627
- export function __wbindgen_string_new(arg0, arg1) {
628
- const ret = getStringFromWasm0(arg0, arg1);
629
- return addHeapObject(ret);
1064
+ export function __wbg_abort_775ef1d17fc65868(arg0) {
1065
+ getObject(arg0).abort();
630
1066
  }
631
1067
 
632
- export function __wbg_get_ef828680c64da212() {
633
- return handleError(function (arg0, arg1) {
634
- const ret = Reflect.get(getObject(arg0), getObject(arg1));
635
- return addHeapObject(ret);
1068
+ export function __wbg_append_299d5d48292c0495() {
1069
+ return handleError(function (arg0, arg1, arg2, arg3, arg4) {
1070
+ getObject(arg0).append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
636
1071
  }, arguments);
637
1072
  }
638
1073
 
639
- export function __wbindgen_object_drop_ref(arg0) {
640
- takeObject(arg0);
641
- }
642
-
643
- export function __wbindgen_string_get(arg0, arg1) {
644
- const obj = getObject(arg1);
645
- const ret = typeof obj === "string" ? obj : undefined;
646
- var ptr1 = isLikeNone(ret)
647
- ? 0
648
- : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
649
- var len1 = WASM_VECTOR_LEN;
650
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
651
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1074
+ export function __wbg_append_8c7dd8d641a5f01b() {
1075
+ return handleError(function (arg0, arg1, arg2, arg3, arg4) {
1076
+ getObject(arg0).append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
1077
+ }, arguments);
652
1078
  }
653
1079
 
654
- export function __wbindgen_jsval_loose_eq(arg0, arg1) {
655
- const ret = getObject(arg0) == getObject(arg1);
656
- return ret;
1080
+ export function __wbg_append_b2d1fc16de2a0e81() {
1081
+ return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5) {
1082
+ getObject(arg0).append(
1083
+ getStringFromWasm0(arg1, arg2),
1084
+ getObject(arg3),
1085
+ getStringFromWasm0(arg4, arg5),
1086
+ );
1087
+ }, arguments);
657
1088
  }
658
1089
 
659
- export function __wbindgen_is_object(arg0) {
660
- const val = getObject(arg0);
661
- const ret = typeof val === "object" && val !== null;
662
- return ret;
1090
+ export function __wbg_append_b44785ebeb668479() {
1091
+ return handleError(function (arg0, arg1, arg2, arg3) {
1092
+ getObject(arg0).append(getStringFromWasm0(arg1, arg2), getObject(arg3));
1093
+ }, arguments);
663
1094
  }
664
1095
 
665
- export function __wbg_getwithrefkey_edc2c8960f0f1191(arg0, arg1) {
666
- const ret = getObject(arg0)[getObject(arg1)];
1096
+ export function __wbg_buffer_609cc3eee51ed158(arg0) {
1097
+ const ret = getObject(arg0).buffer;
667
1098
  return addHeapObject(ret);
668
1099
  }
669
1100
 
670
- export function __wbindgen_is_undefined(arg0) {
671
- const ret = getObject(arg0) === undefined;
672
- return ret;
1101
+ export function __wbg_call_672a4d21634d4a24() {
1102
+ return handleError(function (arg0, arg1) {
1103
+ const ret = getObject(arg0).call(getObject(arg1));
1104
+ return addHeapObject(ret);
1105
+ }, arguments);
673
1106
  }
674
1107
 
675
- export function __wbindgen_in(arg0, arg1) {
676
- const ret = getObject(arg0) in getObject(arg1);
677
- return ret;
1108
+ export function __wbg_call_7cccdd69e0791ae2() {
1109
+ return handleError(function (arg0, arg1, arg2) {
1110
+ const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
1111
+ return addHeapObject(ret);
1112
+ }, arguments);
678
1113
  }
679
1114
 
680
- export function __wbg_isSafeInteger_b9dff570f01a9100(arg0) {
681
- const ret = Number.isSafeInteger(getObject(arg0));
682
- return ret;
1115
+ export function __wbg_crypto_ed58b8e10a292839(arg0) {
1116
+ const ret = getObject(arg0).crypto;
1117
+ return addHeapObject(ret);
683
1118
  }
684
1119
 
685
- export function __wbindgen_as_number(arg0) {
686
- const ret = +getObject(arg0);
687
- return ret;
1120
+ export function __wbg_debug_e17b51583ca6a632(arg0, arg1, arg2, arg3) {
1121
+ console.debug(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
688
1122
  }
689
1123
 
690
- export function __wbindgen_is_string(arg0) {
691
- const ret = typeof getObject(arg0) === "string";
1124
+ export function __wbg_done_769e5ede4b31c67b(arg0) {
1125
+ const ret = getObject(arg0).done;
692
1126
  return ret;
693
1127
  }
694
1128
 
695
- export function __wbg_entries_c02034de337d3ee2(arg0) {
1129
+ export function __wbg_entries_3265d4158b33e5dc(arg0) {
696
1130
  const ret = Object.entries(getObject(arg0));
697
1131
  return addHeapObject(ret);
698
1132
  }
699
1133
 
700
- export function __wbg_length_f217bbbf7e8e4df4(arg0) {
701
- const ret = getObject(arg0).length;
702
- return ret;
1134
+ export function __wbg_error_7534b8e9a36f1ab4(arg0, arg1) {
1135
+ let deferred0_0;
1136
+ let deferred0_1;
1137
+ try {
1138
+ deferred0_0 = arg0;
1139
+ deferred0_1 = arg1;
1140
+ console.error(getStringFromWasm0(arg0, arg1));
1141
+ } finally {
1142
+ wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
1143
+ }
703
1144
  }
704
1145
 
705
- export function __wbg_get_5419cf6b954aa11d(arg0, arg1) {
706
- const ret = getObject(arg0)[arg1 >>> 0];
707
- return addHeapObject(ret);
1146
+ export function __wbg_error_80de38b3f7cc3c3c(arg0, arg1, arg2, arg3) {
1147
+ console.error(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
708
1148
  }
709
1149
 
710
- export function __wbg_call_3bfa248576352471() {
711
- return handleError(function (arg0, arg1, arg2) {
712
- const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
713
- return addHeapObject(ret);
714
- }, arguments);
1150
+ export function __wbg_fetch_4465c2b10f21a927(arg0) {
1151
+ const ret = fetch(getObject(arg0));
1152
+ return addHeapObject(ret);
715
1153
  }
716
1154
 
717
- export function __wbindgen_object_clone_ref(arg0) {
718
- const ret = getObject(arg0);
1155
+ export function __wbg_fetch_509096533071c657(arg0, arg1) {
1156
+ const ret = getObject(arg0).fetch(getObject(arg1));
719
1157
  return addHeapObject(ret);
720
1158
  }
721
1159
 
722
- export function __wbg_new_e69b5f66fda8f13c() {
723
- const ret = new Object();
724
- return addHeapObject(ret);
1160
+ export function __wbg_getRandomValues_bcb4912f16000dc4() {
1161
+ return handleError(function (arg0, arg1) {
1162
+ getObject(arg0).getRandomValues(getObject(arg1));
1163
+ }, arguments);
725
1164
  }
726
1165
 
727
- export function __wbg_setmethod_ce2da76000b02f6a(arg0, arg1, arg2) {
728
- getObject(arg0).method = getStringFromWasm0(arg1, arg2);
1166
+ export function __wbg_getTime_46267b1c24877e30(arg0) {
1167
+ const ret = getObject(arg0).getTime();
1168
+ return ret;
729
1169
  }
730
1170
 
731
- export function __wbg_new_a9ae04a5200606a5() {
732
- return handleError(function () {
733
- const ret = new Headers();
1171
+ export function __wbg_get_67b2ba62fc30de12() {
1172
+ return handleError(function (arg0, arg1) {
1173
+ const ret = Reflect.get(getObject(arg0), getObject(arg1));
734
1174
  return addHeapObject(ret);
735
1175
  }, arguments);
736
1176
  }
737
1177
 
738
- export function __wbg_setheaders_f5205d36e423a544(arg0, arg1) {
739
- getObject(arg0).headers = getObject(arg1);
740
- }
741
-
742
- export function __wbg_setmode_4919fd636102c586(arg0, arg1) {
743
- getObject(arg0).mode = __wbindgen_enum_RequestMode[arg1];
1178
+ export function __wbg_get_b9b93047fe3cf45b(arg0, arg1) {
1179
+ const ret = getObject(arg0)[arg1 >>> 0];
1180
+ return addHeapObject(ret);
744
1181
  }
745
1182
 
746
- export function __wbg_setcredentials_a4e661320cdb9738(arg0, arg1) {
747
- getObject(arg0).credentials = __wbindgen_enum_RequestCredentials[arg1];
1183
+ export function __wbg_getwithrefkey_1dc361bd10053bfe(arg0, arg1) {
1184
+ const ret = getObject(arg0)[getObject(arg1)];
1185
+ return addHeapObject(ret);
748
1186
  }
749
1187
 
750
- export function __wbg_setbody_aa8b691bec428bf4(arg0, arg1) {
751
- getObject(arg0).body = getObject(arg1);
1188
+ export function __wbg_has_a5ea9117f258a0ec() {
1189
+ return handleError(function (arg0, arg1) {
1190
+ const ret = Reflect.has(getObject(arg0), getObject(arg1));
1191
+ return ret;
1192
+ }, arguments);
752
1193
  }
753
1194
 
754
- export function __wbg_signal_9acfcec9e7dffc22(arg0) {
755
- const ret = getObject(arg0).signal;
1195
+ export function __wbg_headers_9cb51cfd2ac780a4(arg0) {
1196
+ const ret = getObject(arg0).headers;
756
1197
  return addHeapObject(ret);
757
1198
  }
758
1199
 
759
- export function __wbg_setsignal_812ccb8269a7fd90(arg0, arg1) {
760
- getObject(arg0).signal = getObject(arg1);
1200
+ export function __wbg_info_033d8b8a0838f1d3(arg0, arg1, arg2, arg3) {
1201
+ console.info(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
761
1202
  }
762
1203
 
763
- export function __wbg_append_8b3e7f74a47ea7d5() {
764
- return handleError(function (arg0, arg1, arg2, arg3, arg4) {
765
- getObject(arg0).append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
766
- }, arguments);
1204
+ export function __wbg_instanceof_ArrayBuffer_e14585432e3737fc(arg0) {
1205
+ let result;
1206
+ try {
1207
+ result = getObject(arg0) instanceof ArrayBuffer;
1208
+ } catch (_) {
1209
+ result = false;
1210
+ }
1211
+ const ret = result;
1212
+ return ret;
767
1213
  }
768
1214
 
769
- export function __wbg_instanceof_Response_3c0e210a57ff751d(arg0) {
1215
+ export function __wbg_instanceof_Response_f2cc20d9f7dfd644(arg0) {
770
1216
  let result;
771
1217
  try {
772
1218
  result = getObject(arg0) instanceof Response;
@@ -777,82 +1223,66 @@ export function __wbg_instanceof_Response_3c0e210a57ff751d(arg0) {
777
1223
  return ret;
778
1224
  }
779
1225
 
780
- export function __wbg_status_5f4e900d22140a18(arg0) {
781
- const ret = getObject(arg0).status;
1226
+ export function __wbg_instanceof_Uint8Array_17156bcf118086a9(arg0) {
1227
+ let result;
1228
+ try {
1229
+ result = getObject(arg0) instanceof Uint8Array;
1230
+ } catch (_) {
1231
+ result = false;
1232
+ }
1233
+ const ret = result;
782
1234
  return ret;
783
1235
  }
784
1236
 
785
- export function __wbg_url_58af972663531d16(arg0, arg1) {
786
- const ret = getObject(arg1).url;
787
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
788
- const len1 = WASM_VECTOR_LEN;
789
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
790
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1237
+ export function __wbg_isSafeInteger_343e2beeeece1bb0(arg0) {
1238
+ const ret = Number.isSafeInteger(getObject(arg0));
1239
+ return ret;
791
1240
  }
792
1241
 
793
- export function __wbg_headers_1b9bf90c73fae600(arg0) {
794
- const ret = getObject(arg0).headers;
1242
+ export function __wbg_iterator_9a24c88df860dc65() {
1243
+ const ret = Symbol.iterator;
795
1244
  return addHeapObject(ret);
796
1245
  }
797
1246
 
798
- export function __wbg_next_b06e115d1b01e10b() {
799
- return handleError(function (arg0) {
800
- const ret = getObject(arg0).next();
801
- return addHeapObject(ret);
802
- }, arguments);
1247
+ export function __wbg_length_a446193dc22c12f8(arg0) {
1248
+ const ret = getObject(arg0).length;
1249
+ return ret;
803
1250
  }
804
1251
 
805
- export function __wbg_done_983b5ffcaec8c583(arg0) {
806
- const ret = getObject(arg0).done;
1252
+ export function __wbg_length_e2d2a49132c1b256(arg0) {
1253
+ const ret = getObject(arg0).length;
807
1254
  return ret;
808
1255
  }
809
1256
 
810
- export function __wbg_value_2ab8a198c834c26a(arg0) {
811
- const ret = getObject(arg0).value;
812
- return addHeapObject(ret);
1257
+ export function __wbg_log_cad59bb680daec67(arg0, arg1, arg2, arg3) {
1258
+ console.log(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
813
1259
  }
814
1260
 
815
- export function __wbg_stringify_eead5648c09faaf8() {
816
- return handleError(function (arg0) {
817
- const ret = JSON.stringify(getObject(arg0));
818
- return addHeapObject(ret);
819
- }, arguments);
1261
+ export function __wbg_msCrypto_0a36e2ec3a343d26(arg0) {
1262
+ const ret = getObject(arg0).msCrypto;
1263
+ return addHeapObject(ret);
820
1264
  }
821
1265
 
822
- export function __wbg_abort_c57daab47a6c1215(arg0) {
823
- getObject(arg0).abort();
1266
+ export function __wbg_new0_f788a2397c7ca929() {
1267
+ const ret = new Date();
1268
+ return addHeapObject(ret);
824
1269
  }
825
1270
 
826
- export function __wbg_text_ebeee8b31af4c919() {
827
- return handleError(function (arg0) {
828
- const ret = getObject(arg0).text();
1271
+ export function __wbg_new_018dcc2d6c8c2f6a() {
1272
+ return handleError(function () {
1273
+ const ret = new Headers();
829
1274
  return addHeapObject(ret);
830
1275
  }, arguments);
831
1276
  }
832
1277
 
833
- export function __wbindgen_cb_drop(arg0) {
834
- const obj = takeObject(arg0).original;
835
- if (obj.cnt-- == 1) {
836
- obj.a = 0;
837
- return true;
838
- }
839
- const ret = false;
840
- return ret;
841
- }
842
-
843
- export function __wbindgen_error_new(arg0, arg1) {
844
- const ret = new Error(getStringFromWasm0(arg0, arg1));
845
- return addHeapObject(ret);
846
- }
847
-
848
- export function __wbg_new_1073970097e5a420(arg0, arg1) {
1278
+ export function __wbg_new_23a2665fac83c611(arg0, arg1) {
849
1279
  try {
850
1280
  var state0 = { a: arg0, b: arg1 };
851
1281
  var cb0 = (arg0, arg1) => {
852
1282
  const a = state0.a;
853
1283
  state0.a = 0;
854
1284
  try {
855
- return __wbg_adapter_125(a, state0.b, arg0, arg1);
1285
+ return __wbg_adapter_150(a, state0.b, arg0, arg1);
856
1286
  } finally {
857
1287
  state0.a = a;
858
1288
  }
@@ -864,287 +1294,293 @@ export function __wbg_new_1073970097e5a420(arg0, arg1) {
864
1294
  }
865
1295
  }
866
1296
 
867
- export function __wbg_set_f975102236d3c502(arg0, arg1, arg2) {
868
- getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
1297
+ export function __wbg_new_405e22f390576ce2() {
1298
+ const ret = new Object();
1299
+ return addHeapObject(ret);
1300
+ }
1301
+
1302
+ export function __wbg_new_78feb108b6472713() {
1303
+ const ret = new Array();
1304
+ return addHeapObject(ret);
869
1305
  }
870
1306
 
871
- export function __wbg_new_abda76e883ba8a5f() {
1307
+ export function __wbg_new_8a6f238a6ece86ea() {
872
1308
  const ret = new Error();
873
1309
  return addHeapObject(ret);
874
1310
  }
875
1311
 
876
- export function __wbg_stack_658279fe44541cf6(arg0, arg1) {
877
- const ret = getObject(arg1).stack;
878
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
879
- const len1 = WASM_VECTOR_LEN;
880
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
881
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1312
+ export function __wbg_new_9fd39a253424609a() {
1313
+ return handleError(function () {
1314
+ const ret = new FormData();
1315
+ return addHeapObject(ret);
1316
+ }, arguments);
1317
+ }
1318
+
1319
+ export function __wbg_new_a12002a7f91c75be(arg0) {
1320
+ const ret = new Uint8Array(getObject(arg0));
1321
+ return addHeapObject(ret);
1322
+ }
1323
+
1324
+ export function __wbg_new_c68d7209be747379(arg0, arg1) {
1325
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
1326
+ return addHeapObject(ret);
1327
+ }
1328
+
1329
+ export function __wbg_new_e25e5aab09ff45db() {
1330
+ return handleError(function () {
1331
+ const ret = new AbortController();
1332
+ return addHeapObject(ret);
1333
+ }, arguments);
882
1334
  }
883
1335
 
884
- export function __wbg_error_f851667af71bcfc6(arg0, arg1) {
1336
+ export function __wbg_new_f24b6d53abe5bc82(arg0, arg1) {
885
1337
  let deferred0_0;
886
1338
  let deferred0_1;
887
1339
  try {
888
1340
  deferred0_0 = arg0;
889
1341
  deferred0_1 = arg1;
890
- console.error(getStringFromWasm0(arg0, arg1));
1342
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
1343
+ return addHeapObject(ret);
891
1344
  } finally {
892
1345
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
893
1346
  }
894
1347
  }
895
1348
 
896
- export function __wbg_crypto_1d1f22824a6a080c(arg0) {
897
- const ret = getObject(arg0).crypto;
1349
+ export function __wbg_newnoargs_105ed471475aaf50(arg0, arg1) {
1350
+ const ret = new Function(getStringFromWasm0(arg0, arg1));
898
1351
  return addHeapObject(ret);
899
1352
  }
900
1353
 
901
- export function __wbg_process_4a72847cc503995b(arg0) {
902
- const ret = getObject(arg0).process;
1354
+ export function __wbg_newwithbyteoffsetandlength_d97e637ebe145a9a(arg0, arg1, arg2) {
1355
+ const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
903
1356
  return addHeapObject(ret);
904
1357
  }
905
1358
 
906
- export function __wbg_versions_f686565e586dd935(arg0) {
907
- const ret = getObject(arg0).versions;
1359
+ export function __wbg_newwithlength_a381634e90c276d4(arg0) {
1360
+ const ret = new Uint8Array(arg0 >>> 0);
908
1361
  return addHeapObject(ret);
909
1362
  }
910
1363
 
911
- export function __wbg_node_104a2ff8d6ea03a2(arg0) {
912
- const ret = getObject(arg0).node;
913
- return addHeapObject(ret);
1364
+ export function __wbg_newwithstrandinit_06c535e0a867c635() {
1365
+ return handleError(function (arg0, arg1, arg2) {
1366
+ const ret = new Request(getStringFromWasm0(arg0, arg1), getObject(arg2));
1367
+ return addHeapObject(ret);
1368
+ }, arguments);
914
1369
  }
915
1370
 
916
- export function __wbg_require_cca90b1a94a0255b() {
917
- return handleError(function () {
918
- const ret = module.require;
1371
+ export function __wbg_newwithu8arraysequenceandoptions_068570c487f69127() {
1372
+ return handleError(function (arg0, arg1) {
1373
+ const ret = new Blob(getObject(arg0), getObject(arg1));
919
1374
  return addHeapObject(ret);
920
1375
  }, arguments);
921
1376
  }
922
1377
 
923
- export function __wbindgen_is_function(arg0) {
924
- const ret = typeof getObject(arg0) === "function";
925
- return ret;
926
- }
927
-
928
- export function __wbg_msCrypto_eb05e62b530a1508(arg0) {
929
- const ret = getObject(arg0).msCrypto;
1378
+ export function __wbg_next_25feadfc0913fea9(arg0) {
1379
+ const ret = getObject(arg0).next;
930
1380
  return addHeapObject(ret);
931
1381
  }
932
1382
 
933
- export function __wbg_newwithlength_76462a666eca145f(arg0) {
934
- const ret = new Uint8Array(arg0 >>> 0);
935
- return addHeapObject(ret);
1383
+ export function __wbg_next_6574e1a8a62d1055() {
1384
+ return handleError(function (arg0) {
1385
+ const ret = getObject(arg0).next();
1386
+ return addHeapObject(ret);
1387
+ }, arguments);
936
1388
  }
937
1389
 
938
- export function __wbindgen_memory() {
939
- const ret = wasm.memory;
1390
+ export function __wbg_node_02999533c4ea02e3(arg0) {
1391
+ const ret = getObject(arg0).node;
940
1392
  return addHeapObject(ret);
941
1393
  }
942
1394
 
943
- export function __wbg_buffer_ccaed51a635d8a2d(arg0) {
944
- const ret = getObject(arg0).buffer;
1395
+ export function __wbg_process_5c1d670bc53614b8(arg0) {
1396
+ const ret = getObject(arg0).process;
945
1397
  return addHeapObject(ret);
946
1398
  }
947
1399
 
948
- export function __wbg_newwithbyteoffsetandlength_7e3eb787208af730(arg0, arg1, arg2) {
949
- const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
950
- return addHeapObject(ret);
1400
+ export function __wbg_push_737cfc8c1432c2c6(arg0, arg1) {
1401
+ const ret = getObject(arg0).push(getObject(arg1));
1402
+ return ret;
951
1403
  }
952
1404
 
953
- export function __wbg_randomFillSync_5c9c955aa56b6049() {
954
- return handleError(function (arg0, arg1) {
955
- getObject(arg0).randomFillSync(takeObject(arg1));
956
- }, arguments);
1405
+ export function __wbg_queueMicrotask_97d92b4fcc8a61c5(arg0) {
1406
+ queueMicrotask(getObject(arg0));
957
1407
  }
958
1408
 
959
- export function __wbg_subarray_975a06f9dbd16995(arg0, arg1, arg2) {
960
- const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
1409
+ export function __wbg_queueMicrotask_d3219def82552485(arg0) {
1410
+ const ret = getObject(arg0).queueMicrotask;
961
1411
  return addHeapObject(ret);
962
1412
  }
963
1413
 
964
- export function __wbg_getRandomValues_3aa56aa6edec874c() {
1414
+ export function __wbg_randomFillSync_ab2cfe79ebbf2740() {
965
1415
  return handleError(function (arg0, arg1) {
966
- getObject(arg0).getRandomValues(getObject(arg1));
1416
+ getObject(arg0).randomFillSync(takeObject(arg1));
967
1417
  }, arguments);
968
1418
  }
969
1419
 
970
- export function __wbg_new_fec2611eb9180f95(arg0) {
971
- const ret = new Uint8Array(getObject(arg0));
972
- return addHeapObject(ret);
1420
+ export function __wbg_require_79b1e9274cde3c87() {
1421
+ return handleError(function () {
1422
+ const ret = module.require;
1423
+ return addHeapObject(ret);
1424
+ }, arguments);
973
1425
  }
974
1426
 
975
- export function __wbg_set_ec2fcf81bc573fd9(arg0, arg1, arg2) {
976
- getObject(arg0).set(getObject(arg1), arg2 >>> 0);
1427
+ export function __wbg_resolve_4851785c9c5f573d(arg0) {
1428
+ const ret = Promise.resolve(getObject(arg0));
1429
+ return addHeapObject(ret);
977
1430
  }
978
1431
 
979
- export function __wbg_self_bf91bf94d9e04084() {
980
- return handleError(function () {
981
- const ret = self.self;
982
- return addHeapObject(ret);
983
- }, arguments);
1432
+ export function __wbg_set_3f1d0b984ed272ed(arg0, arg1, arg2) {
1433
+ getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
984
1434
  }
985
1435
 
986
- export function __wbg_window_52dd9f07d03fd5f8() {
987
- return handleError(function () {
988
- const ret = window.window;
989
- return addHeapObject(ret);
990
- }, arguments);
1436
+ export function __wbg_set_65595bdd868b3009(arg0, arg1, arg2) {
1437
+ getObject(arg0).set(getObject(arg1), arg2 >>> 0);
991
1438
  }
992
1439
 
993
- export function __wbg_globalThis_05c129bf37fcf1be() {
994
- return handleError(function () {
995
- const ret = globalThis.globalThis;
996
- return addHeapObject(ret);
997
- }, arguments);
1440
+ export function __wbg_setbody_5923b78a95eedf29(arg0, arg1) {
1441
+ getObject(arg0).body = getObject(arg1);
998
1442
  }
999
1443
 
1000
- export function __wbg_global_3eca19bb09e9c484() {
1001
- return handleError(function () {
1002
- const ret = global.global;
1003
- return addHeapObject(ret);
1004
- }, arguments);
1444
+ export function __wbg_setcredentials_c3a22f1cd105a2c6(arg0, arg1) {
1445
+ getObject(arg0).credentials = __wbindgen_enum_RequestCredentials[arg1];
1005
1446
  }
1006
1447
 
1007
- export function __wbg_newnoargs_1ede4bf2ebbaaf43(arg0, arg1) {
1008
- const ret = new Function(getStringFromWasm0(arg0, arg1));
1009
- return addHeapObject(ret);
1448
+ export function __wbg_setheaders_834c0bdb6a8949ad(arg0, arg1) {
1449
+ getObject(arg0).headers = getObject(arg1);
1010
1450
  }
1011
1451
 
1012
- export function __wbg_call_a9ef466721e824f2() {
1013
- return handleError(function (arg0, arg1) {
1014
- const ret = getObject(arg0).call(getObject(arg1));
1015
- return addHeapObject(ret);
1016
- }, arguments);
1452
+ export function __wbg_setmethod_3c5280fe5d890842(arg0, arg1, arg2) {
1453
+ getObject(arg0).method = getStringFromWasm0(arg1, arg2);
1017
1454
  }
1018
1455
 
1019
- export function __wbg_iterator_695d699a44d6234c() {
1020
- const ret = Symbol.iterator;
1021
- return addHeapObject(ret);
1456
+ export function __wbg_setmode_5dc300b865044b65(arg0, arg1) {
1457
+ getObject(arg0).mode = __wbindgen_enum_RequestMode[arg1];
1022
1458
  }
1023
1459
 
1024
- export function __wbg_next_13b477da1eaa3897(arg0) {
1025
- const ret = getObject(arg0).next;
1026
- return addHeapObject(ret);
1460
+ export function __wbg_setname_c0e2d6f348c746f4(arg0, arg1, arg2) {
1461
+ let deferred0_0;
1462
+ let deferred0_1;
1463
+ try {
1464
+ deferred0_0 = arg1;
1465
+ deferred0_1 = arg2;
1466
+ getObject(arg0).name = getStringFromWasm0(arg1, arg2);
1467
+ } finally {
1468
+ wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
1469
+ }
1027
1470
  }
1028
1471
 
1029
- export function __wbg_new_034f913e7636e987() {
1030
- const ret = new Array();
1031
- return addHeapObject(ret);
1472
+ export function __wbg_setsignal_75b21ef3a81de905(arg0, arg1) {
1473
+ getObject(arg0).signal = getObject(arg1);
1032
1474
  }
1033
1475
 
1034
- export function __wbg_push_36cf4d81d7da33d1(arg0, arg1) {
1035
- const ret = getObject(arg0).push(getObject(arg1));
1036
- return ret;
1476
+ export function __wbg_settype_39ed370d3edd403c(arg0, arg1, arg2) {
1477
+ getObject(arg0).type = getStringFromWasm0(arg1, arg2);
1037
1478
  }
1038
1479
 
1039
- export function __wbg_instanceof_ArrayBuffer_74945570b4a62ec7(arg0) {
1040
- let result;
1480
+ export function __wbg_setvariant_d1d41b778dfe9c17(arg0, arg1, arg2) {
1481
+ let deferred0_0;
1482
+ let deferred0_1;
1041
1483
  try {
1042
- result = getObject(arg0) instanceof ArrayBuffer;
1043
- } catch (_) {
1044
- result = false;
1484
+ deferred0_0 = arg1;
1485
+ deferred0_1 = arg2;
1486
+ getObject(arg0).variant = getStringFromWasm0(arg1, arg2);
1487
+ } finally {
1488
+ wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
1045
1489
  }
1046
- const ret = result;
1047
- return ret;
1048
1490
  }
1049
1491
 
1050
- export function __wbg_new_70a2f23d1565c04c(arg0, arg1) {
1051
- const ret = new Error(getStringFromWasm0(arg0, arg1));
1492
+ export function __wbg_signal_aaf9ad74119f20a4(arg0) {
1493
+ const ret = getObject(arg0).signal;
1052
1494
  return addHeapObject(ret);
1053
1495
  }
1054
1496
 
1055
- export function __wbg_has_bd717f25f195f23d() {
1056
- return handleError(function (arg0, arg1) {
1057
- const ret = Reflect.has(getObject(arg0), getObject(arg1));
1058
- return ret;
1059
- }, arguments);
1497
+ export function __wbg_stack_0ed75d68575b0f3c(arg0, arg1) {
1498
+ const ret = getObject(arg1).stack;
1499
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1500
+ const len1 = WASM_VECTOR_LEN;
1501
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1502
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1060
1503
  }
1061
1504
 
1062
- export function __wbg_resolve_0aad7c1484731c99(arg0) {
1063
- const ret = Promise.resolve(getObject(arg0));
1064
- return addHeapObject(ret);
1505
+ export function __wbg_static_accessor_GLOBAL_88a902d13a557d07() {
1506
+ const ret = typeof global === "undefined" ? null : global;
1507
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
1065
1508
  }
1066
1509
 
1067
- export function __wbg_then_748f75edfb032440(arg0, arg1) {
1068
- const ret = getObject(arg0).then(getObject(arg1));
1069
- return addHeapObject(ret);
1510
+ export function __wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0() {
1511
+ const ret = typeof globalThis === "undefined" ? null : globalThis;
1512
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
1070
1513
  }
1071
1514
 
1072
- export function __wbg_then_4866a7d9f55d8f3e(arg0, arg1, arg2) {
1073
- const ret = getObject(arg0).then(getObject(arg1), getObject(arg2));
1074
- return addHeapObject(ret);
1515
+ export function __wbg_static_accessor_SELF_37c5d418e4bf5819() {
1516
+ const ret = typeof self === "undefined" ? null : self;
1517
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
1075
1518
  }
1076
1519
 
1077
- export function __wbg_length_9254c4bd3b9f23c4(arg0) {
1078
- const ret = getObject(arg0).length;
1079
- return ret;
1520
+ export function __wbg_static_accessor_WINDOW_5de37043a91a9c40() {
1521
+ const ret = typeof window === "undefined" ? null : window;
1522
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
1080
1523
  }
1081
1524
 
1082
- export function __wbg_instanceof_Uint8Array_df0761410414ef36(arg0) {
1083
- let result;
1084
- try {
1085
- result = getObject(arg0) instanceof Uint8Array;
1086
- } catch (_) {
1087
- result = false;
1088
- }
1089
- const ret = result;
1525
+ export function __wbg_status_f6360336ca686bf0(arg0) {
1526
+ const ret = getObject(arg0).status;
1090
1527
  return ret;
1091
1528
  }
1092
1529
 
1093
- export function __wbg_new_4e7308fbedde3997() {
1094
- return handleError(function () {
1095
- const ret = new FormData();
1530
+ export function __wbg_stringify_f7ed6987935b4a24() {
1531
+ return handleError(function (arg0) {
1532
+ const ret = JSON.stringify(getObject(arg0));
1096
1533
  return addHeapObject(ret);
1097
1534
  }, arguments);
1098
1535
  }
1099
1536
 
1100
- export function __wbg_append_43a4b1c9d5df4168() {
1101
- return handleError(function (arg0, arg1, arg2, arg3, arg4) {
1102
- getObject(arg0).append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
1103
- }, arguments);
1104
- }
1105
-
1106
- export function __wbg_settype_623d2ee701e6310a(arg0, arg1, arg2) {
1107
- getObject(arg0).type = getStringFromWasm0(arg1, arg2);
1537
+ export function __wbg_subarray_aa9065fa9dc5df96(arg0, arg1, arg2) {
1538
+ const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
1539
+ return addHeapObject(ret);
1108
1540
  }
1109
1541
 
1110
- export function __wbg_newwithu8arraysequenceandoptions_d41c0fdf78490206() {
1111
- return handleError(function (arg0, arg1) {
1112
- const ret = new Blob(getObject(arg0), getObject(arg1));
1542
+ export function __wbg_text_7805bea50de2af49() {
1543
+ return handleError(function (arg0) {
1544
+ const ret = getObject(arg0).text();
1113
1545
  return addHeapObject(ret);
1114
1546
  }, arguments);
1115
1547
  }
1116
1548
 
1117
- export function __wbg_append_7ee78799a92a9731() {
1118
- return handleError(function (arg0, arg1, arg2, arg3) {
1119
- getObject(arg0).append(getStringFromWasm0(arg1, arg2), getObject(arg3));
1120
- }, arguments);
1549
+ export function __wbg_then_44b73946d2fb3e7d(arg0, arg1) {
1550
+ const ret = getObject(arg0).then(getObject(arg1));
1551
+ return addHeapObject(ret);
1121
1552
  }
1122
1553
 
1123
- export function __wbg_append_8135c71037096394() {
1124
- return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5) {
1125
- getObject(arg0).append(
1126
- getStringFromWasm0(arg1, arg2),
1127
- getObject(arg3),
1128
- getStringFromWasm0(arg4, arg5),
1129
- );
1130
- }, arguments);
1554
+ export function __wbg_then_48b406749878a531(arg0, arg1, arg2) {
1555
+ const ret = getObject(arg0).then(getObject(arg1), getObject(arg2));
1556
+ return addHeapObject(ret);
1131
1557
  }
1132
1558
 
1133
- export function __wbg_fetch_f8d735ba6fe1b719(arg0) {
1134
- const ret = fetch(getObject(arg0));
1559
+ export function __wbg_url_ae10c34ca209681d(arg0, arg1) {
1560
+ const ret = getObject(arg1).url;
1561
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1562
+ const len1 = WASM_VECTOR_LEN;
1563
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1564
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1565
+ }
1566
+
1567
+ export function __wbg_value_cd1ffa7b1ab794f1(arg0) {
1568
+ const ret = getObject(arg0).value;
1135
1569
  return addHeapObject(ret);
1136
1570
  }
1137
1571
 
1138
- export function __wbg_fetch_1fdc4448ed9eec00(arg0, arg1) {
1139
- const ret = getObject(arg0).fetch(getObject(arg1));
1572
+ export function __wbg_versions_c71aa1626a93e0a1(arg0) {
1573
+ const ret = getObject(arg0).versions;
1140
1574
  return addHeapObject(ret);
1141
1575
  }
1142
1576
 
1143
- export function __wbg_new_75169ae5a9683c55() {
1144
- return handleError(function () {
1145
- const ret = new AbortController();
1146
- return addHeapObject(ret);
1147
- }, arguments);
1577
+ export function __wbg_warn_aaf1f4664a035bd6(arg0, arg1, arg2, arg3) {
1578
+ console.warn(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
1579
+ }
1580
+
1581
+ export function __wbindgen_as_number(arg0) {
1582
+ const ret = +getObject(arg0);
1583
+ return ret;
1148
1584
  }
1149
1585
 
1150
1586
  export function __wbindgen_boolean_get(arg0) {
@@ -1153,19 +1589,19 @@ export function __wbindgen_boolean_get(arg0) {
1153
1589
  return ret;
1154
1590
  }
1155
1591
 
1156
- export function __wbindgen_number_get(arg0, arg1) {
1157
- const obj = getObject(arg1);
1158
- const ret = typeof obj === "number" ? obj : undefined;
1159
- getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
1160
- getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
1592
+ export function __wbindgen_cb_drop(arg0) {
1593
+ const obj = takeObject(arg0).original;
1594
+ if (obj.cnt-- == 1) {
1595
+ obj.a = 0;
1596
+ return true;
1597
+ }
1598
+ const ret = false;
1599
+ return ret;
1161
1600
  }
1162
1601
 
1163
- export function __wbg_String_b9412f8799faab3e(arg0, arg1) {
1164
- const ret = String(getObject(arg1));
1165
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1166
- const len1 = WASM_VECTOR_LEN;
1167
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1168
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1602
+ export function __wbindgen_closure_wrapper2148(arg0, arg1, arg2) {
1603
+ const ret = makeMutClosure(arg0, arg1, 548, __wbg_adapter_40);
1604
+ return addHeapObject(ret);
1169
1605
  }
1170
1606
 
1171
1607
  export function __wbindgen_debug_string(arg0, arg1) {
@@ -1176,47 +1612,84 @@ export function __wbindgen_debug_string(arg0, arg1) {
1176
1612
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1177
1613
  }
1178
1614
 
1179
- export function __wbindgen_throw(arg0, arg1) {
1180
- throw new Error(getStringFromWasm0(arg0, arg1));
1615
+ export function __wbindgen_error_new(arg0, arg1) {
1616
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
1617
+ return addHeapObject(ret);
1181
1618
  }
1182
1619
 
1183
- export function __wbg_queueMicrotask_848aa4969108a57e(arg0) {
1184
- const ret = getObject(arg0).queueMicrotask;
1185
- return addHeapObject(ret);
1620
+ export function __wbindgen_in(arg0, arg1) {
1621
+ const ret = getObject(arg0) in getObject(arg1);
1622
+ return ret;
1186
1623
  }
1187
1624
 
1188
- export function __wbg_queueMicrotask_c5419c06eab41e73(arg0) {
1189
- queueMicrotask(getObject(arg0));
1625
+ export function __wbindgen_is_function(arg0) {
1626
+ const ret = typeof getObject(arg0) === "function";
1627
+ return ret;
1190
1628
  }
1191
1629
 
1192
- export function __wbg_newwithstrandinit_4b92c89af0a8e383() {
1193
- return handleError(function (arg0, arg1, arg2) {
1194
- const ret = new Request(getStringFromWasm0(arg0, arg1), getObject(arg2));
1195
- return addHeapObject(ret);
1196
- }, arguments);
1630
+ export function __wbindgen_is_object(arg0) {
1631
+ const val = getObject(arg0);
1632
+ const ret = typeof val === "object" && val !== null;
1633
+ return ret;
1197
1634
  }
1198
1635
 
1199
- export function __wbg_debug_a0b6c2c5ac9a4bfd(arg0, arg1, arg2, arg3) {
1200
- console.debug(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
1636
+ export function __wbindgen_is_string(arg0) {
1637
+ const ret = typeof getObject(arg0) === "string";
1638
+ return ret;
1201
1639
  }
1202
1640
 
1203
- export function __wbg_error_4d17c5bb1ca90c94(arg0, arg1, arg2, arg3) {
1204
- console.error(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
1641
+ export function __wbindgen_is_undefined(arg0) {
1642
+ const ret = getObject(arg0) === undefined;
1643
+ return ret;
1205
1644
  }
1206
1645
 
1207
- export function __wbg_info_1c7fba7da21072d1(arg0, arg1, arg2, arg3) {
1208
- console.info(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
1646
+ export function __wbindgen_jsval_loose_eq(arg0, arg1) {
1647
+ const ret = getObject(arg0) == getObject(arg1);
1648
+ return ret;
1209
1649
  }
1210
1650
 
1211
- export function __wbg_log_4de37a0274d94769(arg0, arg1, arg2, arg3) {
1212
- console.log(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
1651
+ export function __wbindgen_memory() {
1652
+ const ret = wasm.memory;
1653
+ return addHeapObject(ret);
1213
1654
  }
1214
1655
 
1215
- export function __wbg_warn_2e2787d40aad9a81(arg0, arg1, arg2, arg3) {
1216
- console.warn(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
1656
+ export function __wbindgen_number_get(arg0, arg1) {
1657
+ const obj = getObject(arg1);
1658
+ const ret = typeof obj === "number" ? obj : undefined;
1659
+ getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
1660
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
1217
1661
  }
1218
1662
 
1219
- export function __wbindgen_closure_wrapper1799(arg0, arg1, arg2) {
1220
- const ret = makeMutClosure(arg0, arg1, 491, __wbg_adapter_38);
1663
+ export function __wbindgen_number_new(arg0) {
1664
+ const ret = arg0;
1665
+ return addHeapObject(ret);
1666
+ }
1667
+
1668
+ export function __wbindgen_object_clone_ref(arg0) {
1669
+ const ret = getObject(arg0);
1221
1670
  return addHeapObject(ret);
1222
1671
  }
1672
+
1673
+ export function __wbindgen_object_drop_ref(arg0) {
1674
+ takeObject(arg0);
1675
+ }
1676
+
1677
+ export function __wbindgen_string_get(arg0, arg1) {
1678
+ const obj = getObject(arg1);
1679
+ const ret = typeof obj === "string" ? obj : undefined;
1680
+ var ptr1 = isLikeNone(ret)
1681
+ ? 0
1682
+ : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1683
+ var len1 = WASM_VECTOR_LEN;
1684
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1685
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1686
+ }
1687
+
1688
+ export function __wbindgen_string_new(arg0, arg1) {
1689
+ const ret = getStringFromWasm0(arg0, arg1);
1690
+ return addHeapObject(ret);
1691
+ }
1692
+
1693
+ export function __wbindgen_throw(arg0, arg1) {
1694
+ throw new Error(getStringFromWasm0(arg0, arg1));
1695
+ }