@bitwarden/sdk-internal 0.2.0-main.1 → 0.2.0-main.100
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +674 -295
- package/VERSION +1 -0
- package/bitwarden_wasm_internal.d.ts +224 -35
- package/bitwarden_wasm_internal.js +1 -0
- package/bitwarden_wasm_internal_bg.js +765 -484
- package/bitwarden_wasm_internal_bg.wasm +0 -0
- package/bitwarden_wasm_internal_bg.wasm.d.ts +52 -25
- package/bitwarden_wasm_internal_bg.wasm.js +1 -1
- package/node/bitwarden_wasm_internal.d.ts +224 -35
- package/node/bitwarden_wasm_internal.js +769 -485
- package/node/bitwarden_wasm_internal_bg.wasm +0 -0
- package/node/bitwarden_wasm_internal_bg.wasm.d.ts +52 -25
- package/package.json +5 -4
|
@@ -3,14 +3,6 @@ imports["__wbindgen_placeholder__"] = module.exports;
|
|
|
3
3
|
let wasm;
|
|
4
4
|
const { TextEncoder, TextDecoder } = require(`util`);
|
|
5
5
|
|
|
6
|
-
const heap = new Array(128).fill(undefined);
|
|
7
|
-
|
|
8
|
-
heap.push(undefined, null, true, false);
|
|
9
|
-
|
|
10
|
-
function getObject(idx) {
|
|
11
|
-
return heap[idx];
|
|
12
|
-
}
|
|
13
|
-
|
|
14
6
|
let WASM_VECTOR_LEN = 0;
|
|
15
7
|
|
|
16
8
|
let cachedUint8ArrayMemory0 = null;
|
|
@@ -78,10 +70,6 @@ function passStringToWasm0(arg, malloc, realloc) {
|
|
|
78
70
|
return ptr;
|
|
79
71
|
}
|
|
80
72
|
|
|
81
|
-
function isLikeNone(x) {
|
|
82
|
-
return x === undefined || x === null;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
73
|
let cachedDataViewMemory0 = null;
|
|
86
74
|
|
|
87
75
|
function getDataViewMemory0() {
|
|
@@ -96,36 +84,64 @@ function getDataViewMemory0() {
|
|
|
96
84
|
return cachedDataViewMemory0;
|
|
97
85
|
}
|
|
98
86
|
|
|
99
|
-
let
|
|
87
|
+
let cachedTextDecoder = new TextDecoder("utf-8", { ignoreBOM: true, fatal: true });
|
|
100
88
|
|
|
101
|
-
|
|
102
|
-
if (idx < 132) return;
|
|
103
|
-
heap[idx] = heap_next;
|
|
104
|
-
heap_next = idx;
|
|
105
|
-
}
|
|
89
|
+
cachedTextDecoder.decode();
|
|
106
90
|
|
|
107
|
-
function
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
return ret;
|
|
91
|
+
function getStringFromWasm0(ptr, len) {
|
|
92
|
+
ptr = ptr >>> 0;
|
|
93
|
+
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
111
94
|
}
|
|
112
95
|
|
|
113
|
-
function
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
heap_next = heap[idx];
|
|
117
|
-
|
|
118
|
-
heap[idx] = obj;
|
|
96
|
+
function addToExternrefTable0(obj) {
|
|
97
|
+
const idx = wasm.__externref_table_alloc();
|
|
98
|
+
wasm.__wbindgen_export_4.set(idx, obj);
|
|
119
99
|
return idx;
|
|
120
100
|
}
|
|
121
101
|
|
|
122
|
-
|
|
102
|
+
function handleError(f, args) {
|
|
103
|
+
try {
|
|
104
|
+
return f.apply(this, args);
|
|
105
|
+
} catch (e) {
|
|
106
|
+
const idx = addToExternrefTable0(e);
|
|
107
|
+
wasm.__wbindgen_exn_store(idx);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
123
110
|
|
|
124
|
-
|
|
111
|
+
function isLikeNone(x) {
|
|
112
|
+
return x === undefined || x === null;
|
|
113
|
+
}
|
|
125
114
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
115
|
+
const CLOSURE_DTORS =
|
|
116
|
+
typeof FinalizationRegistry === "undefined"
|
|
117
|
+
? { register: () => {}, unregister: () => {} }
|
|
118
|
+
: new FinalizationRegistry((state) => {
|
|
119
|
+
wasm.__wbindgen_export_6.get(state.dtor)(state.a, state.b);
|
|
120
|
+
});
|
|
121
|
+
|
|
122
|
+
function makeMutClosure(arg0, arg1, dtor, f) {
|
|
123
|
+
const state = { a: arg0, b: arg1, cnt: 1, dtor };
|
|
124
|
+
const real = (...args) => {
|
|
125
|
+
// First up with a closure we increment the internal reference
|
|
126
|
+
// count. This ensures that the Rust closure environment won't
|
|
127
|
+
// be deallocated while we're invoking it.
|
|
128
|
+
state.cnt++;
|
|
129
|
+
const a = state.a;
|
|
130
|
+
state.a = 0;
|
|
131
|
+
try {
|
|
132
|
+
return f(a, state.b, ...args);
|
|
133
|
+
} finally {
|
|
134
|
+
if (--state.cnt === 0) {
|
|
135
|
+
wasm.__wbindgen_export_6.get(state.dtor)(a, state.b);
|
|
136
|
+
CLOSURE_DTORS.unregister(state);
|
|
137
|
+
} else {
|
|
138
|
+
state.a = a;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
};
|
|
142
|
+
real.original = state;
|
|
143
|
+
CLOSURE_DTORS.register(real, state, state);
|
|
144
|
+
return real;
|
|
129
145
|
}
|
|
130
146
|
|
|
131
147
|
function debugString(val) {
|
|
@@ -169,7 +185,7 @@ function debugString(val) {
|
|
|
169
185
|
// Test for built-in
|
|
170
186
|
const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
|
|
171
187
|
let className;
|
|
172
|
-
if (builtInMatches.length > 1) {
|
|
188
|
+
if (builtInMatches && builtInMatches.length > 1) {
|
|
173
189
|
className = builtInMatches[1];
|
|
174
190
|
} else {
|
|
175
191
|
// Failed to match the standard '[object ClassName]'
|
|
@@ -192,62 +208,173 @@ function debugString(val) {
|
|
|
192
208
|
// TODO we could test for more things here, like `Set`s and `Map`s.
|
|
193
209
|
return className;
|
|
194
210
|
}
|
|
211
|
+
/**
|
|
212
|
+
* @param {any} error
|
|
213
|
+
* @returns {boolean}
|
|
214
|
+
*/
|
|
215
|
+
module.exports.isEncryptionSettingsError = function (error) {
|
|
216
|
+
const ret = wasm.isEncryptionSettingsError(error);
|
|
217
|
+
return ret !== 0;
|
|
218
|
+
};
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* @param {any} error
|
|
222
|
+
* @returns {boolean}
|
|
223
|
+
*/
|
|
224
|
+
module.exports.isCryptoError = function (error) {
|
|
225
|
+
const ret = wasm.isCryptoError(error);
|
|
226
|
+
return ret !== 0;
|
|
227
|
+
};
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* @param {any} error
|
|
231
|
+
* @returns {boolean}
|
|
232
|
+
*/
|
|
233
|
+
module.exports.isSshKeyExportError = function (error) {
|
|
234
|
+
const ret = wasm.isSshKeyExportError(error);
|
|
235
|
+
return ret !== 0;
|
|
236
|
+
};
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* @param {any} error
|
|
240
|
+
* @returns {boolean}
|
|
241
|
+
*/
|
|
242
|
+
module.exports.isSshKeyImportError = function (error) {
|
|
243
|
+
const ret = wasm.isSshKeyImportError(error);
|
|
244
|
+
return ret !== 0;
|
|
245
|
+
};
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
* @param {any} error
|
|
249
|
+
* @returns {boolean}
|
|
250
|
+
*/
|
|
251
|
+
module.exports.isKeyGenerationError = function (error) {
|
|
252
|
+
const ret = wasm.isKeyGenerationError(error);
|
|
253
|
+
return ret !== 0;
|
|
254
|
+
};
|
|
255
|
+
|
|
256
|
+
/**
|
|
257
|
+
* @param {any} error
|
|
258
|
+
* @returns {boolean}
|
|
259
|
+
*/
|
|
260
|
+
module.exports.isDecryptFileError = function (error) {
|
|
261
|
+
const ret = wasm.isDecryptFileError(error);
|
|
262
|
+
return ret !== 0;
|
|
263
|
+
};
|
|
264
|
+
|
|
265
|
+
/**
|
|
266
|
+
* @param {any} error
|
|
267
|
+
* @returns {boolean}
|
|
268
|
+
*/
|
|
269
|
+
module.exports.isEncryptFileError = function (error) {
|
|
270
|
+
const ret = wasm.isEncryptFileError(error);
|
|
271
|
+
return ret !== 0;
|
|
272
|
+
};
|
|
273
|
+
|
|
274
|
+
/**
|
|
275
|
+
* @param {any} error
|
|
276
|
+
* @returns {boolean}
|
|
277
|
+
*/
|
|
278
|
+
module.exports.isDecryptError = function (error) {
|
|
279
|
+
const ret = wasm.isDecryptError(error);
|
|
280
|
+
return ret !== 0;
|
|
281
|
+
};
|
|
282
|
+
|
|
283
|
+
/**
|
|
284
|
+
* @param {any} error
|
|
285
|
+
* @returns {boolean}
|
|
286
|
+
*/
|
|
287
|
+
module.exports.isEncryptError = function (error) {
|
|
288
|
+
const ret = wasm.isEncryptError(error);
|
|
289
|
+
return ret !== 0;
|
|
290
|
+
};
|
|
291
|
+
|
|
292
|
+
/**
|
|
293
|
+
* @param {any} error
|
|
294
|
+
* @returns {boolean}
|
|
295
|
+
*/
|
|
296
|
+
module.exports.isTotpError = function (error) {
|
|
297
|
+
const ret = wasm.isTotpError(error);
|
|
298
|
+
return ret !== 0;
|
|
299
|
+
};
|
|
300
|
+
|
|
301
|
+
function takeFromExternrefTable0(idx) {
|
|
302
|
+
const value = wasm.__wbindgen_export_4.get(idx);
|
|
303
|
+
wasm.__externref_table_dealloc(idx);
|
|
304
|
+
return value;
|
|
305
|
+
}
|
|
306
|
+
/**
|
|
307
|
+
* Generate a new SSH key pair
|
|
308
|
+
*
|
|
309
|
+
* # Arguments
|
|
310
|
+
* - `key_algorithm` - The algorithm to use for the key pair
|
|
311
|
+
*
|
|
312
|
+
* # Returns
|
|
313
|
+
* - `Ok(SshKey)` if the key was successfully generated
|
|
314
|
+
* - `Err(KeyGenerationError)` if the key could not be generated
|
|
315
|
+
* @param {KeyAlgorithm} key_algorithm
|
|
316
|
+
* @returns {SshKeyView}
|
|
317
|
+
*/
|
|
318
|
+
module.exports.generate_ssh_key = function (key_algorithm) {
|
|
319
|
+
const ret = wasm.generate_ssh_key(key_algorithm);
|
|
320
|
+
if (ret[2]) {
|
|
321
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
322
|
+
}
|
|
323
|
+
return takeFromExternrefTable0(ret[0]);
|
|
324
|
+
};
|
|
325
|
+
|
|
326
|
+
/**
|
|
327
|
+
* Convert a PCKS8 or OpenSSH encrypted or unencrypted private key
|
|
328
|
+
* to an OpenSSH private key with public key and fingerprint
|
|
329
|
+
*
|
|
330
|
+
* # Arguments
|
|
331
|
+
* - `imported_key` - The private key to convert
|
|
332
|
+
* - `password` - The password to use for decrypting the key
|
|
333
|
+
*
|
|
334
|
+
* # Returns
|
|
335
|
+
* - `Ok(SshKey)` if the key was successfully coneverted
|
|
336
|
+
* - `Err(PasswordRequired)` if the key is encrypted and no password was provided
|
|
337
|
+
* - `Err(WrongPassword)` if the password provided is incorrect
|
|
338
|
+
* - `Err(ParsingError)` if the key could not be parsed
|
|
339
|
+
* - `Err(UnsupportedKeyType)` if the key type is not supported
|
|
340
|
+
* @param {string} imported_key
|
|
341
|
+
* @param {string | null} [password]
|
|
342
|
+
* @returns {SshKeyView}
|
|
343
|
+
*/
|
|
344
|
+
module.exports.import_ssh_key = function (imported_key, password) {
|
|
345
|
+
const ptr0 = passStringToWasm0(imported_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
346
|
+
const len0 = WASM_VECTOR_LEN;
|
|
347
|
+
var ptr1 = isLikeNone(password)
|
|
348
|
+
? 0
|
|
349
|
+
: passStringToWasm0(password, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
350
|
+
var len1 = WASM_VECTOR_LEN;
|
|
351
|
+
const ret = wasm.import_ssh_key(ptr0, len0, ptr1, len1);
|
|
352
|
+
if (ret[2]) {
|
|
353
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
354
|
+
}
|
|
355
|
+
return takeFromExternrefTable0(ret[0]);
|
|
356
|
+
};
|
|
195
357
|
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
358
|
+
/**
|
|
359
|
+
* @param {any} error
|
|
360
|
+
* @returns {boolean}
|
|
361
|
+
*/
|
|
362
|
+
module.exports.isTestError = function (error) {
|
|
363
|
+
const ret = wasm.isTestError(error);
|
|
364
|
+
return ret !== 0;
|
|
365
|
+
};
|
|
202
366
|
|
|
203
|
-
function
|
|
204
|
-
|
|
205
|
-
const real = (...args) => {
|
|
206
|
-
// First up with a closure we increment the internal reference
|
|
207
|
-
// count. This ensures that the Rust closure environment won't
|
|
208
|
-
// be deallocated while we're invoking it.
|
|
209
|
-
state.cnt++;
|
|
210
|
-
const a = state.a;
|
|
211
|
-
state.a = 0;
|
|
212
|
-
try {
|
|
213
|
-
return f(a, state.b, ...args);
|
|
214
|
-
} finally {
|
|
215
|
-
if (--state.cnt === 0) {
|
|
216
|
-
wasm.__wbindgen_export_2.get(state.dtor)(a, state.b);
|
|
217
|
-
CLOSURE_DTORS.unregister(state);
|
|
218
|
-
} else {
|
|
219
|
-
state.a = a;
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
};
|
|
223
|
-
real.original = state;
|
|
224
|
-
CLOSURE_DTORS.register(real, state, state);
|
|
225
|
-
return real;
|
|
226
|
-
}
|
|
227
|
-
function __wbg_adapter_38(arg0, arg1, arg2) {
|
|
228
|
-
wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hec6c9a85ed863308(
|
|
229
|
-
arg0,
|
|
230
|
-
arg1,
|
|
231
|
-
addHeapObject(arg2),
|
|
232
|
-
);
|
|
367
|
+
function __wbg_adapter_42(arg0, arg1, arg2) {
|
|
368
|
+
wasm.closure605_externref_shim(arg0, arg1, arg2);
|
|
233
369
|
}
|
|
234
370
|
|
|
235
|
-
function
|
|
236
|
-
|
|
237
|
-
return f.apply(this, args);
|
|
238
|
-
} catch (e) {
|
|
239
|
-
wasm.__wbindgen_exn_store(addHeapObject(e));
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
function __wbg_adapter_100(arg0, arg1, arg2, arg3) {
|
|
243
|
-
wasm.wasm_bindgen__convert__closures__invoke2_mut__h29c3505e35b3c82d(
|
|
244
|
-
arg0,
|
|
245
|
-
arg1,
|
|
246
|
-
addHeapObject(arg2),
|
|
247
|
-
addHeapObject(arg3),
|
|
248
|
-
);
|
|
371
|
+
function __wbg_adapter_145(arg0, arg1, arg2, arg3) {
|
|
372
|
+
wasm.closure453_externref_shim(arg0, arg1, arg2, arg3);
|
|
249
373
|
}
|
|
250
374
|
|
|
375
|
+
/**
|
|
376
|
+
* @enum {0 | 1 | 2 | 3 | 4}
|
|
377
|
+
*/
|
|
251
378
|
module.exports.LogLevel = Object.freeze({
|
|
252
379
|
Trace: 0,
|
|
253
380
|
0: "Trace",
|
|
@@ -283,12 +410,12 @@ class BitwardenClient {
|
|
|
283
410
|
wasm.__wbg_bitwardenclient_free(ptr, 0);
|
|
284
411
|
}
|
|
285
412
|
/**
|
|
286
|
-
* @param {ClientSettings |
|
|
287
|
-
* @param {LogLevel |
|
|
413
|
+
* @param {ClientSettings | null} [settings]
|
|
414
|
+
* @param {LogLevel | null} [log_level]
|
|
288
415
|
*/
|
|
289
416
|
constructor(settings, log_level) {
|
|
290
417
|
const ret = wasm.bitwardenclient_new(
|
|
291
|
-
isLikeNone(settings) ? 0 :
|
|
418
|
+
isLikeNone(settings) ? 0 : addToExternrefTable0(settings),
|
|
292
419
|
isLikeNone(log_level) ? 5 : log_level,
|
|
293
420
|
);
|
|
294
421
|
this.__wbg_ptr = ret >>> 0;
|
|
@@ -304,17 +431,13 @@ class BitwardenClient {
|
|
|
304
431
|
let deferred2_0;
|
|
305
432
|
let deferred2_1;
|
|
306
433
|
try {
|
|
307
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
308
434
|
const ptr0 = passStringToWasm0(msg, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
309
435
|
const len0 = WASM_VECTOR_LEN;
|
|
310
|
-
wasm.bitwardenclient_echo(
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
deferred2_1 = r1;
|
|
315
|
-
return getStringFromWasm0(r0, r1);
|
|
436
|
+
const ret = wasm.bitwardenclient_echo(this.__wbg_ptr, ptr0, len0);
|
|
437
|
+
deferred2_0 = ret[0];
|
|
438
|
+
deferred2_1 = ret[1];
|
|
439
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
316
440
|
} finally {
|
|
317
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
318
441
|
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
319
442
|
}
|
|
320
443
|
}
|
|
@@ -325,15 +448,11 @@ class BitwardenClient {
|
|
|
325
448
|
let deferred1_0;
|
|
326
449
|
let deferred1_1;
|
|
327
450
|
try {
|
|
328
|
-
const
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
deferred1_0 = r0;
|
|
333
|
-
deferred1_1 = r1;
|
|
334
|
-
return getStringFromWasm0(r0, r1);
|
|
451
|
+
const ret = wasm.bitwardenclient_version(this.__wbg_ptr);
|
|
452
|
+
deferred1_0 = ret[0];
|
|
453
|
+
deferred1_1 = ret[1];
|
|
454
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
335
455
|
} finally {
|
|
336
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
337
456
|
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
338
457
|
}
|
|
339
458
|
}
|
|
@@ -341,18 +460,11 @@ class BitwardenClient {
|
|
|
341
460
|
* @param {string} msg
|
|
342
461
|
*/
|
|
343
462
|
throw(msg) {
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
350
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
351
|
-
if (r1) {
|
|
352
|
-
throw takeObject(r0);
|
|
353
|
-
}
|
|
354
|
-
} finally {
|
|
355
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
463
|
+
const ptr0 = passStringToWasm0(msg, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
464
|
+
const len0 = WASM_VECTOR_LEN;
|
|
465
|
+
const ret = wasm.bitwardenclient_throw(this.__wbg_ptr, ptr0, len0);
|
|
466
|
+
if (ret[1]) {
|
|
467
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
356
468
|
}
|
|
357
469
|
}
|
|
358
470
|
/**
|
|
@@ -364,145 +476,226 @@ class BitwardenClient {
|
|
|
364
476
|
const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
365
477
|
const len0 = WASM_VECTOR_LEN;
|
|
366
478
|
const ret = wasm.bitwardenclient_http_get(this.__wbg_ptr, ptr0, len0);
|
|
367
|
-
return
|
|
479
|
+
return ret;
|
|
368
480
|
}
|
|
369
481
|
/**
|
|
370
|
-
* @returns {
|
|
482
|
+
* @returns {CryptoClient}
|
|
371
483
|
*/
|
|
372
484
|
crypto() {
|
|
373
485
|
const ret = wasm.bitwardenclient_crypto(this.__wbg_ptr);
|
|
374
|
-
return
|
|
486
|
+
return CryptoClient.__wrap(ret);
|
|
375
487
|
}
|
|
376
488
|
/**
|
|
377
|
-
* @returns {
|
|
489
|
+
* @returns {VaultClient}
|
|
378
490
|
*/
|
|
379
491
|
vault() {
|
|
380
492
|
const ret = wasm.bitwardenclient_crypto(this.__wbg_ptr);
|
|
381
|
-
return
|
|
493
|
+
return VaultClient.__wrap(ret);
|
|
382
494
|
}
|
|
383
495
|
}
|
|
384
496
|
module.exports.BitwardenClient = BitwardenClient;
|
|
385
497
|
|
|
386
|
-
const
|
|
498
|
+
const ClientFoldersFinalization =
|
|
387
499
|
typeof FinalizationRegistry === "undefined"
|
|
388
500
|
? { register: () => {}, unregister: () => {} }
|
|
389
|
-
: new FinalizationRegistry((ptr) => wasm.
|
|
501
|
+
: new FinalizationRegistry((ptr) => wasm.__wbg_clientfolders_free(ptr >>> 0, 1));
|
|
390
502
|
|
|
391
|
-
class
|
|
503
|
+
class ClientFolders {
|
|
392
504
|
static __wrap(ptr) {
|
|
393
505
|
ptr = ptr >>> 0;
|
|
394
|
-
const obj = Object.create(
|
|
506
|
+
const obj = Object.create(ClientFolders.prototype);
|
|
395
507
|
obj.__wbg_ptr = ptr;
|
|
396
|
-
|
|
508
|
+
ClientFoldersFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
397
509
|
return obj;
|
|
398
510
|
}
|
|
399
511
|
|
|
400
512
|
__destroy_into_raw() {
|
|
401
513
|
const ptr = this.__wbg_ptr;
|
|
402
514
|
this.__wbg_ptr = 0;
|
|
403
|
-
|
|
515
|
+
ClientFoldersFinalization.unregister(this);
|
|
404
516
|
return ptr;
|
|
405
517
|
}
|
|
406
518
|
|
|
407
519
|
free() {
|
|
408
520
|
const ptr = this.__destroy_into_raw();
|
|
409
|
-
wasm.
|
|
521
|
+
wasm.__wbg_clientfolders_free(ptr, 0);
|
|
410
522
|
}
|
|
411
523
|
/**
|
|
412
|
-
*
|
|
413
|
-
*
|
|
414
|
-
* @
|
|
415
|
-
* @returns {Promise<void>}
|
|
524
|
+
* Decrypt folder
|
|
525
|
+
* @param {Folder} folder
|
|
526
|
+
* @returns {FolderView}
|
|
416
527
|
*/
|
|
417
|
-
|
|
418
|
-
const ret = wasm.
|
|
419
|
-
|
|
528
|
+
decrypt(folder) {
|
|
529
|
+
const ret = wasm.clientfolders_decrypt(this.__wbg_ptr, folder);
|
|
530
|
+
if (ret[2]) {
|
|
531
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
532
|
+
}
|
|
533
|
+
return takeFromExternrefTable0(ret[0]);
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
module.exports.ClientFolders = ClientFolders;
|
|
537
|
+
|
|
538
|
+
const ClientTotpFinalization =
|
|
539
|
+
typeof FinalizationRegistry === "undefined"
|
|
540
|
+
? { register: () => {}, unregister: () => {} }
|
|
541
|
+
: new FinalizationRegistry((ptr) => wasm.__wbg_clienttotp_free(ptr >>> 0, 1));
|
|
542
|
+
|
|
543
|
+
class ClientTotp {
|
|
544
|
+
static __wrap(ptr) {
|
|
545
|
+
ptr = ptr >>> 0;
|
|
546
|
+
const obj = Object.create(ClientTotp.prototype);
|
|
547
|
+
obj.__wbg_ptr = ptr;
|
|
548
|
+
ClientTotpFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
549
|
+
return obj;
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
__destroy_into_raw() {
|
|
553
|
+
const ptr = this.__wbg_ptr;
|
|
554
|
+
this.__wbg_ptr = 0;
|
|
555
|
+
ClientTotpFinalization.unregister(this);
|
|
556
|
+
return ptr;
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
free() {
|
|
560
|
+
const ptr = this.__destroy_into_raw();
|
|
561
|
+
wasm.__wbg_clienttotp_free(ptr, 0);
|
|
420
562
|
}
|
|
421
563
|
/**
|
|
422
|
-
*
|
|
423
|
-
*
|
|
424
|
-
*
|
|
425
|
-
*
|
|
564
|
+
* Generates a TOTP code from a provided key
|
|
565
|
+
*
|
|
566
|
+
* # Arguments
|
|
567
|
+
* - `key` - Can be:
|
|
568
|
+
* - A base32 encoded string
|
|
569
|
+
* - OTP Auth URI
|
|
570
|
+
* - Steam URI
|
|
571
|
+
* - `time_ms` - Optional timestamp in milliseconds
|
|
572
|
+
*
|
|
573
|
+
* # Returns
|
|
574
|
+
* - `Ok(TotpResponse)` containing the generated code and period
|
|
575
|
+
* - `Err(TotpError)` if code generation fails
|
|
576
|
+
* @param {string} key
|
|
577
|
+
* @param {number | null} [time_ms]
|
|
578
|
+
* @returns {TotpResponse}
|
|
426
579
|
*/
|
|
427
|
-
|
|
428
|
-
const
|
|
429
|
-
|
|
580
|
+
generate_totp(key, time_ms) {
|
|
581
|
+
const ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
582
|
+
const len0 = WASM_VECTOR_LEN;
|
|
583
|
+
const ret = wasm.clienttotp_generate_totp(
|
|
584
|
+
this.__wbg_ptr,
|
|
585
|
+
ptr0,
|
|
586
|
+
len0,
|
|
587
|
+
!isLikeNone(time_ms),
|
|
588
|
+
isLikeNone(time_ms) ? 0 : time_ms,
|
|
589
|
+
);
|
|
590
|
+
if (ret[2]) {
|
|
591
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
592
|
+
}
|
|
593
|
+
return takeFromExternrefTable0(ret[0]);
|
|
430
594
|
}
|
|
431
595
|
}
|
|
432
|
-
module.exports.
|
|
596
|
+
module.exports.ClientTotp = ClientTotp;
|
|
433
597
|
|
|
434
|
-
const
|
|
598
|
+
const CryptoClientFinalization =
|
|
435
599
|
typeof FinalizationRegistry === "undefined"
|
|
436
600
|
? { register: () => {}, unregister: () => {} }
|
|
437
|
-
: new FinalizationRegistry((ptr) => wasm.
|
|
601
|
+
: new FinalizationRegistry((ptr) => wasm.__wbg_cryptoclient_free(ptr >>> 0, 1));
|
|
438
602
|
|
|
439
|
-
class
|
|
603
|
+
class CryptoClient {
|
|
440
604
|
static __wrap(ptr) {
|
|
441
605
|
ptr = ptr >>> 0;
|
|
442
|
-
const obj = Object.create(
|
|
606
|
+
const obj = Object.create(CryptoClient.prototype);
|
|
443
607
|
obj.__wbg_ptr = ptr;
|
|
444
|
-
|
|
608
|
+
CryptoClientFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
445
609
|
return obj;
|
|
446
610
|
}
|
|
447
611
|
|
|
448
612
|
__destroy_into_raw() {
|
|
449
613
|
const ptr = this.__wbg_ptr;
|
|
450
614
|
this.__wbg_ptr = 0;
|
|
451
|
-
|
|
615
|
+
CryptoClientFinalization.unregister(this);
|
|
452
616
|
return ptr;
|
|
453
617
|
}
|
|
454
618
|
|
|
455
619
|
free() {
|
|
456
620
|
const ptr = this.__destroy_into_raw();
|
|
457
|
-
wasm.
|
|
621
|
+
wasm.__wbg_cryptoclient_free(ptr, 0);
|
|
458
622
|
}
|
|
459
623
|
/**
|
|
460
|
-
*
|
|
461
|
-
*
|
|
462
|
-
* @
|
|
624
|
+
* Initialization method for the user crypto. Needs to be called before any other crypto
|
|
625
|
+
* operations.
|
|
626
|
+
* @param {InitUserCryptoRequest} req
|
|
627
|
+
* @returns {Promise<void>}
|
|
463
628
|
*/
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
629
|
+
initialize_user_crypto(req) {
|
|
630
|
+
const ret = wasm.cryptoclient_initialize_user_crypto(this.__wbg_ptr, req);
|
|
631
|
+
return ret;
|
|
632
|
+
}
|
|
633
|
+
/**
|
|
634
|
+
* Initialization method for the organization crypto. Needs to be called after
|
|
635
|
+
* `initialize_user_crypto` but before any other crypto operations.
|
|
636
|
+
* @param {InitOrgCryptoRequest} req
|
|
637
|
+
* @returns {Promise<void>}
|
|
638
|
+
*/
|
|
639
|
+
initialize_org_crypto(req) {
|
|
640
|
+
const ret = wasm.cryptoclient_initialize_org_crypto(this.__wbg_ptr, req);
|
|
641
|
+
return ret;
|
|
642
|
+
}
|
|
643
|
+
/**
|
|
644
|
+
* Generates a new key pair and encrypts the private key with the provided user key.
|
|
645
|
+
* Crypto initialization not required.
|
|
646
|
+
* @param {string} user_key
|
|
647
|
+
* @returns {MakeKeyPairResponse}
|
|
648
|
+
*/
|
|
649
|
+
make_key_pair(user_key) {
|
|
650
|
+
const ptr0 = passStringToWasm0(user_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
651
|
+
const len0 = WASM_VECTOR_LEN;
|
|
652
|
+
const ret = wasm.cryptoclient_make_key_pair(this.__wbg_ptr, ptr0, len0);
|
|
653
|
+
if (ret[2]) {
|
|
654
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
655
|
+
}
|
|
656
|
+
return takeFromExternrefTable0(ret[0]);
|
|
657
|
+
}
|
|
658
|
+
/**
|
|
659
|
+
* Verifies a user's asymmetric keys by decrypting the private key with the provided user
|
|
660
|
+
* key. Returns if the private key is decryptable and if it is a valid matching key.
|
|
661
|
+
* Crypto initialization not required.
|
|
662
|
+
* @param {VerifyAsymmetricKeysRequest} request
|
|
663
|
+
* @returns {VerifyAsymmetricKeysResponse}
|
|
664
|
+
*/
|
|
665
|
+
verify_asymmetric_keys(request) {
|
|
666
|
+
const ret = wasm.cryptoclient_verify_asymmetric_keys(this.__wbg_ptr, request);
|
|
667
|
+
if (ret[2]) {
|
|
668
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
477
669
|
}
|
|
670
|
+
return takeFromExternrefTable0(ret[0]);
|
|
478
671
|
}
|
|
479
672
|
}
|
|
480
|
-
module.exports.
|
|
673
|
+
module.exports.CryptoClient = CryptoClient;
|
|
481
674
|
|
|
482
|
-
const
|
|
675
|
+
const VaultClientFinalization =
|
|
483
676
|
typeof FinalizationRegistry === "undefined"
|
|
484
677
|
? { register: () => {}, unregister: () => {} }
|
|
485
|
-
: new FinalizationRegistry((ptr) => wasm.
|
|
678
|
+
: new FinalizationRegistry((ptr) => wasm.__wbg_vaultclient_free(ptr >>> 0, 1));
|
|
486
679
|
|
|
487
|
-
class
|
|
680
|
+
class VaultClient {
|
|
488
681
|
static __wrap(ptr) {
|
|
489
682
|
ptr = ptr >>> 0;
|
|
490
|
-
const obj = Object.create(
|
|
683
|
+
const obj = Object.create(VaultClient.prototype);
|
|
491
684
|
obj.__wbg_ptr = ptr;
|
|
492
|
-
|
|
685
|
+
VaultClientFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
493
686
|
return obj;
|
|
494
687
|
}
|
|
495
688
|
|
|
496
689
|
__destroy_into_raw() {
|
|
497
690
|
const ptr = this.__wbg_ptr;
|
|
498
691
|
this.__wbg_ptr = 0;
|
|
499
|
-
|
|
692
|
+
VaultClientFinalization.unregister(this);
|
|
500
693
|
return ptr;
|
|
501
694
|
}
|
|
502
695
|
|
|
503
696
|
free() {
|
|
504
697
|
const ptr = this.__destroy_into_raw();
|
|
505
|
-
wasm.
|
|
698
|
+
wasm.__wbg_vaultclient_free(ptr, 0);
|
|
506
699
|
}
|
|
507
700
|
/**
|
|
508
701
|
* @returns {ClientFolders}
|
|
@@ -511,168 +704,164 @@ class ClientVault {
|
|
|
511
704
|
const ret = wasm.bitwardenclient_crypto(this.__wbg_ptr);
|
|
512
705
|
return ClientFolders.__wrap(ret);
|
|
513
706
|
}
|
|
707
|
+
/**
|
|
708
|
+
* @returns {ClientTotp}
|
|
709
|
+
*/
|
|
710
|
+
totp() {
|
|
711
|
+
const ret = wasm.bitwardenclient_crypto(this.__wbg_ptr);
|
|
712
|
+
return ClientTotp.__wrap(ret);
|
|
713
|
+
}
|
|
514
714
|
}
|
|
515
|
-
module.exports.
|
|
715
|
+
module.exports.VaultClient = VaultClient;
|
|
516
716
|
|
|
517
|
-
module.exports.
|
|
518
|
-
const
|
|
519
|
-
const
|
|
520
|
-
|
|
521
|
-
? 0
|
|
522
|
-
: passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
523
|
-
var len1 = WASM_VECTOR_LEN;
|
|
717
|
+
module.exports.__wbg_String_8f0eb39a4a4c2f66 = function (arg0, arg1) {
|
|
718
|
+
const ret = String(arg1);
|
|
719
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
720
|
+
const len1 = WASM_VECTOR_LEN;
|
|
524
721
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
525
722
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
526
723
|
};
|
|
527
724
|
|
|
528
|
-
module.exports.
|
|
529
|
-
|
|
530
|
-
};
|
|
531
|
-
|
|
532
|
-
module.exports.__wbindgen_is_object = function (arg0) {
|
|
533
|
-
const val = getObject(arg0);
|
|
534
|
-
const ret = typeof val === "object" && val !== null;
|
|
535
|
-
return ret;
|
|
725
|
+
module.exports.__wbg_abort_775ef1d17fc65868 = function (arg0) {
|
|
726
|
+
arg0.abort();
|
|
536
727
|
};
|
|
537
728
|
|
|
538
|
-
module.exports.
|
|
539
|
-
|
|
540
|
-
|
|
729
|
+
module.exports.__wbg_append_299d5d48292c0495 = function () {
|
|
730
|
+
return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
731
|
+
arg0.append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
732
|
+
}, arguments);
|
|
541
733
|
};
|
|
542
734
|
|
|
543
|
-
module.exports.
|
|
544
|
-
|
|
545
|
-
|
|
735
|
+
module.exports.__wbg_append_8c7dd8d641a5f01b = function () {
|
|
736
|
+
return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
737
|
+
arg0.append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
738
|
+
}, arguments);
|
|
546
739
|
};
|
|
547
740
|
|
|
548
|
-
module.exports.
|
|
549
|
-
|
|
550
|
-
|
|
741
|
+
module.exports.__wbg_append_b2d1fc16de2a0e81 = function () {
|
|
742
|
+
return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
743
|
+
arg0.append(getStringFromWasm0(arg1, arg2), arg3, getStringFromWasm0(arg4, arg5));
|
|
744
|
+
}, arguments);
|
|
551
745
|
};
|
|
552
746
|
|
|
553
|
-
module.exports.
|
|
554
|
-
|
|
555
|
-
|
|
747
|
+
module.exports.__wbg_append_b44785ebeb668479 = function () {
|
|
748
|
+
return handleError(function (arg0, arg1, arg2, arg3) {
|
|
749
|
+
arg0.append(getStringFromWasm0(arg1, arg2), arg3);
|
|
750
|
+
}, arguments);
|
|
556
751
|
};
|
|
557
752
|
|
|
558
|
-
module.exports.
|
|
559
|
-
const ret =
|
|
753
|
+
module.exports.__wbg_buffer_609cc3eee51ed158 = function (arg0) {
|
|
754
|
+
const ret = arg0.buffer;
|
|
560
755
|
return ret;
|
|
561
756
|
};
|
|
562
757
|
|
|
563
|
-
module.exports.
|
|
564
|
-
|
|
565
|
-
|
|
758
|
+
module.exports.__wbg_call_672a4d21634d4a24 = function () {
|
|
759
|
+
return handleError(function (arg0, arg1) {
|
|
760
|
+
const ret = arg0.call(arg1);
|
|
761
|
+
return ret;
|
|
762
|
+
}, arguments);
|
|
566
763
|
};
|
|
567
764
|
|
|
568
|
-
module.exports.
|
|
569
|
-
|
|
570
|
-
|
|
765
|
+
module.exports.__wbg_call_7cccdd69e0791ae2 = function () {
|
|
766
|
+
return handleError(function (arg0, arg1, arg2) {
|
|
767
|
+
const ret = arg0.call(arg1, arg2);
|
|
768
|
+
return ret;
|
|
769
|
+
}, arguments);
|
|
571
770
|
};
|
|
572
771
|
|
|
573
|
-
module.exports.
|
|
574
|
-
const ret =
|
|
772
|
+
module.exports.__wbg_crypto_ed58b8e10a292839 = function (arg0) {
|
|
773
|
+
const ret = arg0.crypto;
|
|
575
774
|
return ret;
|
|
576
775
|
};
|
|
577
776
|
|
|
578
|
-
module.exports.
|
|
579
|
-
|
|
580
|
-
return addHeapObject(ret);
|
|
777
|
+
module.exports.__wbg_debug_e17b51583ca6a632 = function (arg0, arg1, arg2, arg3) {
|
|
778
|
+
console.debug(arg0, arg1, arg2, arg3);
|
|
581
779
|
};
|
|
582
780
|
|
|
583
|
-
module.exports.
|
|
584
|
-
const ret =
|
|
585
|
-
return addHeapObject(ret);
|
|
586
|
-
};
|
|
587
|
-
|
|
588
|
-
module.exports.__wbg_next_b06e115d1b01e10b = function () {
|
|
589
|
-
return handleError(function (arg0) {
|
|
590
|
-
const ret = getObject(arg0).next();
|
|
591
|
-
return addHeapObject(ret);
|
|
592
|
-
}, arguments);
|
|
593
|
-
};
|
|
594
|
-
|
|
595
|
-
module.exports.__wbg_done_983b5ffcaec8c583 = function (arg0) {
|
|
596
|
-
const ret = getObject(arg0).done;
|
|
781
|
+
module.exports.__wbg_done_769e5ede4b31c67b = function (arg0) {
|
|
782
|
+
const ret = arg0.done;
|
|
597
783
|
return ret;
|
|
598
784
|
};
|
|
599
785
|
|
|
600
|
-
module.exports.
|
|
601
|
-
const ret =
|
|
602
|
-
return
|
|
786
|
+
module.exports.__wbg_entries_3265d4158b33e5dc = function (arg0) {
|
|
787
|
+
const ret = Object.entries(arg0);
|
|
788
|
+
return ret;
|
|
603
789
|
};
|
|
604
790
|
|
|
605
|
-
module.exports.
|
|
791
|
+
module.exports.__wbg_error_7534b8e9a36f1ab4 = function (arg0, arg1) {
|
|
606
792
|
let deferred0_0;
|
|
607
793
|
let deferred0_1;
|
|
608
794
|
try {
|
|
609
795
|
deferred0_0 = arg0;
|
|
610
796
|
deferred0_1 = arg1;
|
|
611
|
-
|
|
612
|
-
return addHeapObject(ret);
|
|
797
|
+
console.error(getStringFromWasm0(arg0, arg1));
|
|
613
798
|
} finally {
|
|
614
799
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
615
800
|
}
|
|
616
801
|
};
|
|
617
802
|
|
|
618
|
-
module.exports.
|
|
619
|
-
|
|
620
|
-
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
|
|
621
|
-
return addHeapObject(ret);
|
|
622
|
-
}, arguments);
|
|
803
|
+
module.exports.__wbg_error_80de38b3f7cc3c3c = function (arg0, arg1, arg2, arg3) {
|
|
804
|
+
console.error(arg0, arg1, arg2, arg3);
|
|
623
805
|
};
|
|
624
806
|
|
|
625
|
-
module.exports.
|
|
626
|
-
const ret =
|
|
627
|
-
return
|
|
807
|
+
module.exports.__wbg_fetch_4465c2b10f21a927 = function (arg0) {
|
|
808
|
+
const ret = fetch(arg0);
|
|
809
|
+
return ret;
|
|
628
810
|
};
|
|
629
811
|
|
|
630
|
-
module.exports.
|
|
631
|
-
|
|
812
|
+
module.exports.__wbg_fetch_509096533071c657 = function (arg0, arg1) {
|
|
813
|
+
const ret = arg0.fetch(arg1);
|
|
814
|
+
return ret;
|
|
632
815
|
};
|
|
633
816
|
|
|
634
|
-
module.exports.
|
|
635
|
-
return handleError(function () {
|
|
636
|
-
|
|
637
|
-
return addHeapObject(ret);
|
|
817
|
+
module.exports.__wbg_getRandomValues_bcb4912f16000dc4 = function () {
|
|
818
|
+
return handleError(function (arg0, arg1) {
|
|
819
|
+
arg0.getRandomValues(arg1);
|
|
638
820
|
}, arguments);
|
|
639
821
|
};
|
|
640
822
|
|
|
641
|
-
module.exports.
|
|
642
|
-
|
|
823
|
+
module.exports.__wbg_getTime_46267b1c24877e30 = function (arg0) {
|
|
824
|
+
const ret = arg0.getTime();
|
|
825
|
+
return ret;
|
|
643
826
|
};
|
|
644
827
|
|
|
645
|
-
module.exports.
|
|
646
|
-
|
|
828
|
+
module.exports.__wbg_get_67b2ba62fc30de12 = function () {
|
|
829
|
+
return handleError(function (arg0, arg1) {
|
|
830
|
+
const ret = Reflect.get(arg0, arg1);
|
|
831
|
+
return ret;
|
|
832
|
+
}, arguments);
|
|
647
833
|
};
|
|
648
834
|
|
|
649
|
-
module.exports.
|
|
650
|
-
|
|
835
|
+
module.exports.__wbg_get_b9b93047fe3cf45b = function (arg0, arg1) {
|
|
836
|
+
const ret = arg0[arg1 >>> 0];
|
|
837
|
+
return ret;
|
|
651
838
|
};
|
|
652
839
|
|
|
653
|
-
module.exports.
|
|
654
|
-
|
|
840
|
+
module.exports.__wbg_getwithrefkey_1dc361bd10053bfe = function (arg0, arg1) {
|
|
841
|
+
const ret = arg0[arg1];
|
|
842
|
+
return ret;
|
|
655
843
|
};
|
|
656
844
|
|
|
657
|
-
module.exports.
|
|
658
|
-
|
|
659
|
-
|
|
845
|
+
module.exports.__wbg_has_a5ea9117f258a0ec = function () {
|
|
846
|
+
return handleError(function (arg0, arg1) {
|
|
847
|
+
const ret = Reflect.has(arg0, arg1);
|
|
848
|
+
return ret;
|
|
849
|
+
}, arguments);
|
|
660
850
|
};
|
|
661
851
|
|
|
662
|
-
module.exports.
|
|
663
|
-
|
|
852
|
+
module.exports.__wbg_headers_9cb51cfd2ac780a4 = function (arg0) {
|
|
853
|
+
const ret = arg0.headers;
|
|
854
|
+
return ret;
|
|
664
855
|
};
|
|
665
856
|
|
|
666
|
-
module.exports.
|
|
667
|
-
|
|
668
|
-
getObject(arg0).append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
669
|
-
}, arguments);
|
|
857
|
+
module.exports.__wbg_info_033d8b8a0838f1d3 = function (arg0, arg1, arg2, arg3) {
|
|
858
|
+
console.info(arg0, arg1, arg2, arg3);
|
|
670
859
|
};
|
|
671
860
|
|
|
672
|
-
module.exports.
|
|
861
|
+
module.exports.__wbg_instanceof_ArrayBuffer_e14585432e3737fc = function (arg0) {
|
|
673
862
|
let result;
|
|
674
863
|
try {
|
|
675
|
-
result =
|
|
864
|
+
result = arg0 instanceof ArrayBuffer;
|
|
676
865
|
} catch (_) {
|
|
677
866
|
result = false;
|
|
678
867
|
}
|
|
@@ -680,394 +869,487 @@ module.exports.__wbg_instanceof_Response_3c0e210a57ff751d = function (arg0) {
|
|
|
680
869
|
return ret;
|
|
681
870
|
};
|
|
682
871
|
|
|
683
|
-
module.exports.
|
|
684
|
-
|
|
872
|
+
module.exports.__wbg_instanceof_Response_f2cc20d9f7dfd644 = function (arg0) {
|
|
873
|
+
let result;
|
|
874
|
+
try {
|
|
875
|
+
result = arg0 instanceof Response;
|
|
876
|
+
} catch (_) {
|
|
877
|
+
result = false;
|
|
878
|
+
}
|
|
879
|
+
const ret = result;
|
|
685
880
|
return ret;
|
|
686
881
|
};
|
|
687
882
|
|
|
688
|
-
module.exports.
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
883
|
+
module.exports.__wbg_instanceof_Uint8Array_17156bcf118086a9 = function (arg0) {
|
|
884
|
+
let result;
|
|
885
|
+
try {
|
|
886
|
+
result = arg0 instanceof Uint8Array;
|
|
887
|
+
} catch (_) {
|
|
888
|
+
result = false;
|
|
889
|
+
}
|
|
890
|
+
const ret = result;
|
|
891
|
+
return ret;
|
|
694
892
|
};
|
|
695
893
|
|
|
696
|
-
module.exports.
|
|
697
|
-
const ret =
|
|
698
|
-
return
|
|
894
|
+
module.exports.__wbg_isSafeInteger_343e2beeeece1bb0 = function (arg0) {
|
|
895
|
+
const ret = Number.isSafeInteger(arg0);
|
|
896
|
+
return ret;
|
|
699
897
|
};
|
|
700
898
|
|
|
701
|
-
module.exports.
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
return addHeapObject(ret);
|
|
705
|
-
}, arguments);
|
|
899
|
+
module.exports.__wbg_iterator_9a24c88df860dc65 = function () {
|
|
900
|
+
const ret = Symbol.iterator;
|
|
901
|
+
return ret;
|
|
706
902
|
};
|
|
707
903
|
|
|
708
|
-
module.exports.
|
|
709
|
-
|
|
904
|
+
module.exports.__wbg_length_a446193dc22c12f8 = function (arg0) {
|
|
905
|
+
const ret = arg0.length;
|
|
906
|
+
return ret;
|
|
710
907
|
};
|
|
711
908
|
|
|
712
|
-
module.exports.
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
return addHeapObject(ret);
|
|
716
|
-
}, arguments);
|
|
909
|
+
module.exports.__wbg_length_e2d2a49132c1b256 = function (arg0) {
|
|
910
|
+
const ret = arg0.length;
|
|
911
|
+
return ret;
|
|
717
912
|
};
|
|
718
913
|
|
|
719
|
-
module.exports.
|
|
720
|
-
|
|
721
|
-
return addHeapObject(ret);
|
|
914
|
+
module.exports.__wbg_log_cad59bb680daec67 = function (arg0, arg1, arg2, arg3) {
|
|
915
|
+
console.log(arg0, arg1, arg2, arg3);
|
|
722
916
|
};
|
|
723
917
|
|
|
724
|
-
module.exports.
|
|
725
|
-
const ret =
|
|
918
|
+
module.exports.__wbg_msCrypto_0a36e2ec3a343d26 = function (arg0) {
|
|
919
|
+
const ret = arg0.msCrypto;
|
|
726
920
|
return ret;
|
|
727
921
|
};
|
|
728
922
|
|
|
729
|
-
module.exports.
|
|
730
|
-
const
|
|
731
|
-
if (obj.cnt-- == 1) {
|
|
732
|
-
obj.a = 0;
|
|
733
|
-
return true;
|
|
734
|
-
}
|
|
735
|
-
const ret = false;
|
|
923
|
+
module.exports.__wbg_new0_f788a2397c7ca929 = function () {
|
|
924
|
+
const ret = new Date();
|
|
736
925
|
return ret;
|
|
737
926
|
};
|
|
738
927
|
|
|
739
|
-
module.exports.
|
|
740
|
-
|
|
741
|
-
|
|
928
|
+
module.exports.__wbg_new_018dcc2d6c8c2f6a = function () {
|
|
929
|
+
return handleError(function () {
|
|
930
|
+
const ret = new Headers();
|
|
931
|
+
return ret;
|
|
932
|
+
}, arguments);
|
|
742
933
|
};
|
|
743
934
|
|
|
744
|
-
module.exports.
|
|
935
|
+
module.exports.__wbg_new_23a2665fac83c611 = function (arg0, arg1) {
|
|
745
936
|
try {
|
|
746
937
|
var state0 = { a: arg0, b: arg1 };
|
|
747
938
|
var cb0 = (arg0, arg1) => {
|
|
748
939
|
const a = state0.a;
|
|
749
940
|
state0.a = 0;
|
|
750
941
|
try {
|
|
751
|
-
return
|
|
942
|
+
return __wbg_adapter_145(a, state0.b, arg0, arg1);
|
|
752
943
|
} finally {
|
|
753
944
|
state0.a = a;
|
|
754
945
|
}
|
|
755
946
|
};
|
|
756
947
|
const ret = new Promise(cb0);
|
|
757
|
-
return
|
|
948
|
+
return ret;
|
|
758
949
|
} finally {
|
|
759
950
|
state0.a = state0.b = 0;
|
|
760
951
|
}
|
|
761
952
|
};
|
|
762
953
|
|
|
763
|
-
module.exports.
|
|
764
|
-
|
|
954
|
+
module.exports.__wbg_new_405e22f390576ce2 = function () {
|
|
955
|
+
const ret = new Object();
|
|
956
|
+
return ret;
|
|
957
|
+
};
|
|
958
|
+
|
|
959
|
+
module.exports.__wbg_new_78feb108b6472713 = function () {
|
|
960
|
+
const ret = new Array();
|
|
961
|
+
return ret;
|
|
765
962
|
};
|
|
766
963
|
|
|
767
|
-
module.exports.
|
|
964
|
+
module.exports.__wbg_new_8a6f238a6ece86ea = function () {
|
|
768
965
|
const ret = new Error();
|
|
769
|
-
return
|
|
966
|
+
return ret;
|
|
770
967
|
};
|
|
771
968
|
|
|
772
|
-
module.exports.
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
969
|
+
module.exports.__wbg_new_9fd39a253424609a = function () {
|
|
970
|
+
return handleError(function () {
|
|
971
|
+
const ret = new FormData();
|
|
972
|
+
return ret;
|
|
973
|
+
}, arguments);
|
|
778
974
|
};
|
|
779
975
|
|
|
780
|
-
module.exports.
|
|
976
|
+
module.exports.__wbg_new_a12002a7f91c75be = function (arg0) {
|
|
977
|
+
const ret = new Uint8Array(arg0);
|
|
978
|
+
return ret;
|
|
979
|
+
};
|
|
980
|
+
|
|
981
|
+
module.exports.__wbg_new_c68d7209be747379 = function (arg0, arg1) {
|
|
982
|
+
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
983
|
+
return ret;
|
|
984
|
+
};
|
|
985
|
+
|
|
986
|
+
module.exports.__wbg_new_e25e5aab09ff45db = function () {
|
|
987
|
+
return handleError(function () {
|
|
988
|
+
const ret = new AbortController();
|
|
989
|
+
return ret;
|
|
990
|
+
}, arguments);
|
|
991
|
+
};
|
|
992
|
+
|
|
993
|
+
module.exports.__wbg_new_f24b6d53abe5bc82 = function (arg0, arg1) {
|
|
781
994
|
let deferred0_0;
|
|
782
995
|
let deferred0_1;
|
|
783
996
|
try {
|
|
784
997
|
deferred0_0 = arg0;
|
|
785
998
|
deferred0_1 = arg1;
|
|
786
|
-
|
|
999
|
+
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
1000
|
+
return ret;
|
|
787
1001
|
} finally {
|
|
788
1002
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
789
1003
|
}
|
|
790
1004
|
};
|
|
791
1005
|
|
|
792
|
-
module.exports.
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
return addHeapObject(ret);
|
|
796
|
-
}, arguments);
|
|
1006
|
+
module.exports.__wbg_newnoargs_105ed471475aaf50 = function (arg0, arg1) {
|
|
1007
|
+
const ret = new Function(getStringFromWasm0(arg0, arg1));
|
|
1008
|
+
return ret;
|
|
797
1009
|
};
|
|
798
1010
|
|
|
799
|
-
module.exports.
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
return addHeapObject(ret);
|
|
803
|
-
}, arguments);
|
|
1011
|
+
module.exports.__wbg_newwithbyteoffsetandlength_d97e637ebe145a9a = function (arg0, arg1, arg2) {
|
|
1012
|
+
const ret = new Uint8Array(arg0, arg1 >>> 0, arg2 >>> 0);
|
|
1013
|
+
return ret;
|
|
804
1014
|
};
|
|
805
1015
|
|
|
806
|
-
module.exports.
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
return addHeapObject(ret);
|
|
810
|
-
}, arguments);
|
|
1016
|
+
module.exports.__wbg_newwithlength_a381634e90c276d4 = function (arg0) {
|
|
1017
|
+
const ret = new Uint8Array(arg0 >>> 0);
|
|
1018
|
+
return ret;
|
|
811
1019
|
};
|
|
812
1020
|
|
|
813
|
-
module.exports.
|
|
814
|
-
return handleError(function () {
|
|
815
|
-
const ret =
|
|
816
|
-
return
|
|
1021
|
+
module.exports.__wbg_newwithstrandinit_06c535e0a867c635 = function () {
|
|
1022
|
+
return handleError(function (arg0, arg1, arg2) {
|
|
1023
|
+
const ret = new Request(getStringFromWasm0(arg0, arg1), arg2);
|
|
1024
|
+
return ret;
|
|
817
1025
|
}, arguments);
|
|
818
1026
|
};
|
|
819
1027
|
|
|
820
|
-
module.exports.
|
|
821
|
-
const ret = new Function(getStringFromWasm0(arg0, arg1));
|
|
822
|
-
return addHeapObject(ret);
|
|
823
|
-
};
|
|
824
|
-
|
|
825
|
-
module.exports.__wbg_call_a9ef466721e824f2 = function () {
|
|
1028
|
+
module.exports.__wbg_newwithu8arraysequenceandoptions_068570c487f69127 = function () {
|
|
826
1029
|
return handleError(function (arg0, arg1) {
|
|
827
|
-
const ret =
|
|
828
|
-
return
|
|
1030
|
+
const ret = new Blob(arg0, arg1);
|
|
1031
|
+
return ret;
|
|
829
1032
|
}, arguments);
|
|
830
1033
|
};
|
|
831
1034
|
|
|
832
|
-
module.exports.
|
|
833
|
-
const ret =
|
|
834
|
-
return
|
|
1035
|
+
module.exports.__wbg_next_25feadfc0913fea9 = function (arg0) {
|
|
1036
|
+
const ret = arg0.next;
|
|
1037
|
+
return ret;
|
|
835
1038
|
};
|
|
836
1039
|
|
|
837
|
-
module.exports.
|
|
838
|
-
return handleError(function (arg0
|
|
839
|
-
const ret =
|
|
840
|
-
return
|
|
1040
|
+
module.exports.__wbg_next_6574e1a8a62d1055 = function () {
|
|
1041
|
+
return handleError(function (arg0) {
|
|
1042
|
+
const ret = arg0.next();
|
|
1043
|
+
return ret;
|
|
841
1044
|
}, arguments);
|
|
842
1045
|
};
|
|
843
1046
|
|
|
844
|
-
module.exports.
|
|
845
|
-
const ret =
|
|
1047
|
+
module.exports.__wbg_node_02999533c4ea02e3 = function (arg0) {
|
|
1048
|
+
const ret = arg0.node;
|
|
846
1049
|
return ret;
|
|
847
1050
|
};
|
|
848
1051
|
|
|
849
|
-
module.exports.
|
|
850
|
-
const ret =
|
|
851
|
-
return
|
|
1052
|
+
module.exports.__wbg_process_5c1d670bc53614b8 = function (arg0) {
|
|
1053
|
+
const ret = arg0.process;
|
|
1054
|
+
return ret;
|
|
852
1055
|
};
|
|
853
1056
|
|
|
854
|
-
module.exports.
|
|
855
|
-
const ret =
|
|
856
|
-
return
|
|
1057
|
+
module.exports.__wbg_push_737cfc8c1432c2c6 = function (arg0, arg1) {
|
|
1058
|
+
const ret = arg0.push(arg1);
|
|
1059
|
+
return ret;
|
|
857
1060
|
};
|
|
858
1061
|
|
|
859
|
-
module.exports.
|
|
860
|
-
|
|
861
|
-
return ret;
|
|
1062
|
+
module.exports.__wbg_queueMicrotask_97d92b4fcc8a61c5 = function (arg0) {
|
|
1063
|
+
queueMicrotask(arg0);
|
|
862
1064
|
};
|
|
863
1065
|
|
|
864
|
-
module.exports.
|
|
865
|
-
|
|
866
|
-
try {
|
|
867
|
-
result = getObject(arg0) instanceof ArrayBuffer;
|
|
868
|
-
} catch (_) {
|
|
869
|
-
result = false;
|
|
870
|
-
}
|
|
871
|
-
const ret = result;
|
|
1066
|
+
module.exports.__wbg_queueMicrotask_d3219def82552485 = function (arg0) {
|
|
1067
|
+
const ret = arg0.queueMicrotask;
|
|
872
1068
|
return ret;
|
|
873
1069
|
};
|
|
874
1070
|
|
|
875
|
-
module.exports.
|
|
876
|
-
|
|
877
|
-
|
|
1071
|
+
module.exports.__wbg_randomFillSync_ab2cfe79ebbf2740 = function () {
|
|
1072
|
+
return handleError(function (arg0, arg1) {
|
|
1073
|
+
arg0.randomFillSync(arg1);
|
|
1074
|
+
}, arguments);
|
|
878
1075
|
};
|
|
879
1076
|
|
|
880
|
-
module.exports.
|
|
881
|
-
return handleError(function (
|
|
882
|
-
const ret =
|
|
1077
|
+
module.exports.__wbg_require_79b1e9274cde3c87 = function () {
|
|
1078
|
+
return handleError(function () {
|
|
1079
|
+
const ret = module.require;
|
|
883
1080
|
return ret;
|
|
884
1081
|
}, arguments);
|
|
885
1082
|
};
|
|
886
1083
|
|
|
887
|
-
module.exports.
|
|
888
|
-
const ret = Promise.resolve(
|
|
889
|
-
return
|
|
1084
|
+
module.exports.__wbg_resolve_4851785c9c5f573d = function (arg0) {
|
|
1085
|
+
const ret = Promise.resolve(arg0);
|
|
1086
|
+
return ret;
|
|
890
1087
|
};
|
|
891
1088
|
|
|
892
|
-
module.exports.
|
|
893
|
-
|
|
894
|
-
return addHeapObject(ret);
|
|
1089
|
+
module.exports.__wbg_set_3f1d0b984ed272ed = function (arg0, arg1, arg2) {
|
|
1090
|
+
arg0[arg1] = arg2;
|
|
895
1091
|
};
|
|
896
1092
|
|
|
897
|
-
module.exports.
|
|
898
|
-
|
|
899
|
-
return addHeapObject(ret);
|
|
1093
|
+
module.exports.__wbg_set_65595bdd868b3009 = function (arg0, arg1, arg2) {
|
|
1094
|
+
arg0.set(arg1, arg2 >>> 0);
|
|
900
1095
|
};
|
|
901
1096
|
|
|
902
|
-
module.exports.
|
|
903
|
-
|
|
904
|
-
return addHeapObject(ret);
|
|
1097
|
+
module.exports.__wbg_setbody_5923b78a95eedf29 = function (arg0, arg1) {
|
|
1098
|
+
arg0.body = arg1;
|
|
905
1099
|
};
|
|
906
1100
|
|
|
907
|
-
module.exports.
|
|
908
|
-
|
|
909
|
-
return addHeapObject(ret);
|
|
1101
|
+
module.exports.__wbg_setcredentials_c3a22f1cd105a2c6 = function (arg0, arg1) {
|
|
1102
|
+
arg0.credentials = __wbindgen_enum_RequestCredentials[arg1];
|
|
910
1103
|
};
|
|
911
1104
|
|
|
912
|
-
module.exports.
|
|
913
|
-
|
|
914
|
-
return addHeapObject(ret);
|
|
1105
|
+
module.exports.__wbg_setheaders_834c0bdb6a8949ad = function (arg0, arg1) {
|
|
1106
|
+
arg0.headers = arg1;
|
|
915
1107
|
};
|
|
916
1108
|
|
|
917
|
-
module.exports.
|
|
918
|
-
|
|
919
|
-
|
|
1109
|
+
module.exports.__wbg_setmethod_3c5280fe5d890842 = function (arg0, arg1, arg2) {
|
|
1110
|
+
arg0.method = getStringFromWasm0(arg1, arg2);
|
|
1111
|
+
};
|
|
1112
|
+
|
|
1113
|
+
module.exports.__wbg_setmode_5dc300b865044b65 = function (arg0, arg1) {
|
|
1114
|
+
arg0.mode = __wbindgen_enum_RequestMode[arg1];
|
|
1115
|
+
};
|
|
1116
|
+
|
|
1117
|
+
module.exports.__wbg_setname_c0e2d6f348c746f4 = function (arg0, arg1, arg2) {
|
|
1118
|
+
let deferred0_0;
|
|
1119
|
+
let deferred0_1;
|
|
1120
|
+
try {
|
|
1121
|
+
deferred0_0 = arg1;
|
|
1122
|
+
deferred0_1 = arg2;
|
|
1123
|
+
arg0.name = getStringFromWasm0(arg1, arg2);
|
|
1124
|
+
} finally {
|
|
1125
|
+
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
1126
|
+
}
|
|
920
1127
|
};
|
|
921
1128
|
|
|
922
|
-
module.exports.
|
|
923
|
-
|
|
924
|
-
return addHeapObject(ret);
|
|
1129
|
+
module.exports.__wbg_setsignal_75b21ef3a81de905 = function (arg0, arg1) {
|
|
1130
|
+
arg0.signal = arg1;
|
|
925
1131
|
};
|
|
926
1132
|
|
|
927
|
-
module.exports.
|
|
928
|
-
|
|
1133
|
+
module.exports.__wbg_settype_39ed370d3edd403c = function (arg0, arg1, arg2) {
|
|
1134
|
+
arg0.type = getStringFromWasm0(arg1, arg2);
|
|
929
1135
|
};
|
|
930
1136
|
|
|
931
|
-
module.exports.
|
|
932
|
-
let
|
|
1137
|
+
module.exports.__wbg_setvariant_d1d41b778dfe9c17 = function (arg0, arg1, arg2) {
|
|
1138
|
+
let deferred0_0;
|
|
1139
|
+
let deferred0_1;
|
|
933
1140
|
try {
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
1141
|
+
deferred0_0 = arg1;
|
|
1142
|
+
deferred0_1 = arg2;
|
|
1143
|
+
arg0.variant = getStringFromWasm0(arg1, arg2);
|
|
1144
|
+
} finally {
|
|
1145
|
+
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
937
1146
|
}
|
|
938
|
-
|
|
1147
|
+
};
|
|
1148
|
+
|
|
1149
|
+
module.exports.__wbg_signal_aaf9ad74119f20a4 = function (arg0) {
|
|
1150
|
+
const ret = arg0.signal;
|
|
939
1151
|
return ret;
|
|
940
1152
|
};
|
|
941
1153
|
|
|
942
|
-
module.exports.
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
1154
|
+
module.exports.__wbg_stack_0ed75d68575b0f3c = function (arg0, arg1) {
|
|
1155
|
+
const ret = arg1.stack;
|
|
1156
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1157
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1158
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1159
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
947
1160
|
};
|
|
948
1161
|
|
|
949
|
-
module.exports.
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
}, arguments);
|
|
1162
|
+
module.exports.__wbg_static_accessor_GLOBAL_88a902d13a557d07 = function () {
|
|
1163
|
+
const ret = typeof global === "undefined" ? null : global;
|
|
1164
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
953
1165
|
};
|
|
954
1166
|
|
|
955
|
-
module.exports.
|
|
956
|
-
|
|
1167
|
+
module.exports.__wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0 = function () {
|
|
1168
|
+
const ret = typeof globalThis === "undefined" ? null : globalThis;
|
|
1169
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
957
1170
|
};
|
|
958
1171
|
|
|
959
|
-
module.exports.
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
return addHeapObject(ret);
|
|
963
|
-
}, arguments);
|
|
1172
|
+
module.exports.__wbg_static_accessor_SELF_37c5d418e4bf5819 = function () {
|
|
1173
|
+
const ret = typeof self === "undefined" ? null : self;
|
|
1174
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
964
1175
|
};
|
|
965
1176
|
|
|
966
|
-
module.exports.
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
}, arguments);
|
|
1177
|
+
module.exports.__wbg_static_accessor_WINDOW_5de37043a91a9c40 = function () {
|
|
1178
|
+
const ret = typeof window === "undefined" ? null : window;
|
|
1179
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
970
1180
|
};
|
|
971
1181
|
|
|
972
|
-
module.exports.
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
getStringFromWasm0(arg1, arg2),
|
|
976
|
-
getObject(arg3),
|
|
977
|
-
getStringFromWasm0(arg4, arg5),
|
|
978
|
-
);
|
|
979
|
-
}, arguments);
|
|
1182
|
+
module.exports.__wbg_status_f6360336ca686bf0 = function (arg0) {
|
|
1183
|
+
const ret = arg0.status;
|
|
1184
|
+
return ret;
|
|
980
1185
|
};
|
|
981
1186
|
|
|
982
|
-
module.exports.
|
|
983
|
-
|
|
984
|
-
|
|
1187
|
+
module.exports.__wbg_stringify_f7ed6987935b4a24 = function () {
|
|
1188
|
+
return handleError(function (arg0) {
|
|
1189
|
+
const ret = JSON.stringify(arg0);
|
|
1190
|
+
return ret;
|
|
1191
|
+
}, arguments);
|
|
985
1192
|
};
|
|
986
1193
|
|
|
987
|
-
module.exports.
|
|
988
|
-
const ret =
|
|
989
|
-
return
|
|
1194
|
+
module.exports.__wbg_subarray_aa9065fa9dc5df96 = function (arg0, arg1, arg2) {
|
|
1195
|
+
const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
|
|
1196
|
+
return ret;
|
|
990
1197
|
};
|
|
991
1198
|
|
|
992
|
-
module.exports.
|
|
993
|
-
return handleError(function () {
|
|
994
|
-
const ret =
|
|
995
|
-
return
|
|
1199
|
+
module.exports.__wbg_text_7805bea50de2af49 = function () {
|
|
1200
|
+
return handleError(function (arg0) {
|
|
1201
|
+
const ret = arg0.text();
|
|
1202
|
+
return ret;
|
|
996
1203
|
}, arguments);
|
|
997
1204
|
};
|
|
998
1205
|
|
|
999
|
-
module.exports.
|
|
1000
|
-
const
|
|
1001
|
-
const ret = typeof v === "boolean" ? (v ? 1 : 0) : 2;
|
|
1206
|
+
module.exports.__wbg_then_44b73946d2fb3e7d = function (arg0, arg1) {
|
|
1207
|
+
const ret = arg0.then(arg1);
|
|
1002
1208
|
return ret;
|
|
1003
1209
|
};
|
|
1004
1210
|
|
|
1005
|
-
module.exports.
|
|
1006
|
-
const
|
|
1007
|
-
|
|
1008
|
-
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
1009
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
1211
|
+
module.exports.__wbg_then_48b406749878a531 = function (arg0, arg1, arg2) {
|
|
1212
|
+
const ret = arg0.then(arg1, arg2);
|
|
1213
|
+
return ret;
|
|
1010
1214
|
};
|
|
1011
1215
|
|
|
1012
|
-
module.exports.
|
|
1013
|
-
const ret =
|
|
1216
|
+
module.exports.__wbg_url_ae10c34ca209681d = function (arg0, arg1) {
|
|
1217
|
+
const ret = arg1.url;
|
|
1014
1218
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1015
1219
|
const len1 = WASM_VECTOR_LEN;
|
|
1016
1220
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1017
1221
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1018
1222
|
};
|
|
1019
1223
|
|
|
1224
|
+
module.exports.__wbg_value_cd1ffa7b1ab794f1 = function (arg0) {
|
|
1225
|
+
const ret = arg0.value;
|
|
1226
|
+
return ret;
|
|
1227
|
+
};
|
|
1228
|
+
|
|
1229
|
+
module.exports.__wbg_versions_c71aa1626a93e0a1 = function (arg0) {
|
|
1230
|
+
const ret = arg0.versions;
|
|
1231
|
+
return ret;
|
|
1232
|
+
};
|
|
1233
|
+
|
|
1234
|
+
module.exports.__wbg_warn_aaf1f4664a035bd6 = function (arg0, arg1, arg2, arg3) {
|
|
1235
|
+
console.warn(arg0, arg1, arg2, arg3);
|
|
1236
|
+
};
|
|
1237
|
+
|
|
1238
|
+
module.exports.__wbindgen_as_number = function (arg0) {
|
|
1239
|
+
const ret = +arg0;
|
|
1240
|
+
return ret;
|
|
1241
|
+
};
|
|
1242
|
+
|
|
1243
|
+
module.exports.__wbindgen_boolean_get = function (arg0) {
|
|
1244
|
+
const v = arg0;
|
|
1245
|
+
const ret = typeof v === "boolean" ? (v ? 1 : 0) : 2;
|
|
1246
|
+
return ret;
|
|
1247
|
+
};
|
|
1248
|
+
|
|
1249
|
+
module.exports.__wbindgen_cb_drop = function (arg0) {
|
|
1250
|
+
const obj = arg0.original;
|
|
1251
|
+
if (obj.cnt-- == 1) {
|
|
1252
|
+
obj.a = 0;
|
|
1253
|
+
return true;
|
|
1254
|
+
}
|
|
1255
|
+
const ret = false;
|
|
1256
|
+
return ret;
|
|
1257
|
+
};
|
|
1258
|
+
|
|
1259
|
+
module.exports.__wbindgen_closure_wrapper2160 = function (arg0, arg1, arg2) {
|
|
1260
|
+
const ret = makeMutClosure(arg0, arg1, 606, __wbg_adapter_42);
|
|
1261
|
+
return ret;
|
|
1262
|
+
};
|
|
1263
|
+
|
|
1020
1264
|
module.exports.__wbindgen_debug_string = function (arg0, arg1) {
|
|
1021
|
-
const ret = debugString(
|
|
1265
|
+
const ret = debugString(arg1);
|
|
1022
1266
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1023
1267
|
const len1 = WASM_VECTOR_LEN;
|
|
1024
1268
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1025
1269
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1026
1270
|
};
|
|
1027
1271
|
|
|
1028
|
-
module.exports.
|
|
1029
|
-
|
|
1272
|
+
module.exports.__wbindgen_error_new = function (arg0, arg1) {
|
|
1273
|
+
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
1274
|
+
return ret;
|
|
1030
1275
|
};
|
|
1031
1276
|
|
|
1032
|
-
module.exports.
|
|
1033
|
-
const ret =
|
|
1034
|
-
return
|
|
1277
|
+
module.exports.__wbindgen_in = function (arg0, arg1) {
|
|
1278
|
+
const ret = arg0 in arg1;
|
|
1279
|
+
return ret;
|
|
1035
1280
|
};
|
|
1036
1281
|
|
|
1037
|
-
module.exports.
|
|
1038
|
-
|
|
1282
|
+
module.exports.__wbindgen_init_externref_table = function () {
|
|
1283
|
+
const table = wasm.__wbindgen_export_4;
|
|
1284
|
+
const offset = table.grow(4);
|
|
1285
|
+
table.set(0, undefined);
|
|
1286
|
+
table.set(offset + 0, undefined);
|
|
1287
|
+
table.set(offset + 1, null);
|
|
1288
|
+
table.set(offset + 2, true);
|
|
1289
|
+
table.set(offset + 3, false);
|
|
1039
1290
|
};
|
|
1040
1291
|
|
|
1041
|
-
module.exports.
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
return addHeapObject(ret);
|
|
1045
|
-
}, arguments);
|
|
1292
|
+
module.exports.__wbindgen_is_function = function (arg0) {
|
|
1293
|
+
const ret = typeof arg0 === "function";
|
|
1294
|
+
return ret;
|
|
1046
1295
|
};
|
|
1047
1296
|
|
|
1048
|
-
module.exports.
|
|
1049
|
-
|
|
1297
|
+
module.exports.__wbindgen_is_object = function (arg0) {
|
|
1298
|
+
const val = arg0;
|
|
1299
|
+
const ret = typeof val === "object" && val !== null;
|
|
1300
|
+
return ret;
|
|
1050
1301
|
};
|
|
1051
1302
|
|
|
1052
|
-
module.exports.
|
|
1053
|
-
|
|
1303
|
+
module.exports.__wbindgen_is_string = function (arg0) {
|
|
1304
|
+
const ret = typeof arg0 === "string";
|
|
1305
|
+
return ret;
|
|
1054
1306
|
};
|
|
1055
1307
|
|
|
1056
|
-
module.exports.
|
|
1057
|
-
|
|
1308
|
+
module.exports.__wbindgen_is_undefined = function (arg0) {
|
|
1309
|
+
const ret = arg0 === undefined;
|
|
1310
|
+
return ret;
|
|
1058
1311
|
};
|
|
1059
1312
|
|
|
1060
|
-
module.exports.
|
|
1061
|
-
|
|
1313
|
+
module.exports.__wbindgen_jsval_loose_eq = function (arg0, arg1) {
|
|
1314
|
+
const ret = arg0 == arg1;
|
|
1315
|
+
return ret;
|
|
1316
|
+
};
|
|
1317
|
+
|
|
1318
|
+
module.exports.__wbindgen_memory = function () {
|
|
1319
|
+
const ret = wasm.memory;
|
|
1320
|
+
return ret;
|
|
1062
1321
|
};
|
|
1063
1322
|
|
|
1064
|
-
module.exports.
|
|
1065
|
-
|
|
1323
|
+
module.exports.__wbindgen_number_get = function (arg0, arg1) {
|
|
1324
|
+
const obj = arg1;
|
|
1325
|
+
const ret = typeof obj === "number" ? obj : undefined;
|
|
1326
|
+
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
1327
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
1066
1328
|
};
|
|
1067
1329
|
|
|
1068
|
-
module.exports.
|
|
1069
|
-
const ret =
|
|
1070
|
-
return
|
|
1330
|
+
module.exports.__wbindgen_number_new = function (arg0) {
|
|
1331
|
+
const ret = arg0;
|
|
1332
|
+
return ret;
|
|
1333
|
+
};
|
|
1334
|
+
|
|
1335
|
+
module.exports.__wbindgen_string_get = function (arg0, arg1) {
|
|
1336
|
+
const obj = arg1;
|
|
1337
|
+
const ret = typeof obj === "string" ? obj : undefined;
|
|
1338
|
+
var ptr1 = isLikeNone(ret)
|
|
1339
|
+
? 0
|
|
1340
|
+
: passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1341
|
+
var len1 = WASM_VECTOR_LEN;
|
|
1342
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1343
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1344
|
+
};
|
|
1345
|
+
|
|
1346
|
+
module.exports.__wbindgen_string_new = function (arg0, arg1) {
|
|
1347
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
1348
|
+
return ret;
|
|
1349
|
+
};
|
|
1350
|
+
|
|
1351
|
+
module.exports.__wbindgen_throw = function (arg0, arg1) {
|
|
1352
|
+
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
1071
1353
|
};
|
|
1072
1354
|
|
|
1073
1355
|
const path = require("path").join(__dirname, "bitwarden_wasm_internal_bg.wasm");
|
|
@@ -1077,3 +1359,5 @@ const wasmModule = new WebAssembly.Module(bytes);
|
|
|
1077
1359
|
const wasmInstance = new WebAssembly.Instance(wasmModule, imports);
|
|
1078
1360
|
wasm = wasmInstance.exports;
|
|
1079
1361
|
module.exports.__wasm = wasm;
|
|
1362
|
+
|
|
1363
|
+
wasm.__wbindgen_start();
|