@learncard/didkit-plugin 1.4.10 → 1.4.12

Sign up to get free protection for your applications and to get access to all the features.
@@ -26,6 +26,7 @@ __export(src_exports, {
26
26
  module.exports = __toCommonJS(src_exports);
27
27
 
28
28
  // src/didkit/pkg/didkit_wasm.js
29
+ var import_meta = {};
29
30
  var wasm;
30
31
  var cachedTextDecoder = typeof TextDecoder !== "undefined" ? new TextDecoder("utf-8", { ignoreBOM: true, fatal: true }) : { decode: () => {
31
32
  throw Error("TextDecoder not available");
@@ -33,17 +34,17 @@ var cachedTextDecoder = typeof TextDecoder !== "undefined" ? new TextDecoder("ut
33
34
  if (typeof TextDecoder !== "undefined") {
34
35
  cachedTextDecoder.decode();
35
36
  }
36
- var cachedUint8Memory0 = null;
37
- function getUint8Memory0() {
38
- if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) {
39
- cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
37
+ var cachedUint8ArrayMemory0 = null;
38
+ function getUint8ArrayMemory0() {
39
+ if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
40
+ cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
40
41
  }
41
- return cachedUint8Memory0;
42
+ return cachedUint8ArrayMemory0;
42
43
  }
43
- __name(getUint8Memory0, "getUint8Memory0");
44
+ __name(getUint8ArrayMemory0, "getUint8ArrayMemory0");
44
45
  function getStringFromWasm0(ptr, len) {
45
46
  ptr = ptr >>> 0;
46
- return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
47
+ return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
47
48
  }
48
49
  __name(getStringFromWasm0, "getStringFromWasm0");
49
50
  var heap = new Array(128).fill(void 0);
@@ -93,13 +94,13 @@ function passStringToWasm0(arg, malloc, realloc) {
93
94
  if (realloc === void 0) {
94
95
  const buf = cachedTextEncoder.encode(arg);
95
96
  const ptr2 = malloc(buf.length, 1) >>> 0;
96
- getUint8Memory0().subarray(ptr2, ptr2 + buf.length).set(buf);
97
+ getUint8ArrayMemory0().subarray(ptr2, ptr2 + buf.length).set(buf);
97
98
  WASM_VECTOR_LEN = buf.length;
98
99
  return ptr2;
99
100
  }
100
101
  let len = arg.length;
101
102
  let ptr = malloc(len, 1) >>> 0;
102
- const mem = getUint8Memory0();
103
+ const mem = getUint8ArrayMemory0();
103
104
  let offset = 0;
104
105
  for (; offset < len; offset++) {
105
106
  const code = arg.charCodeAt(offset);
@@ -112,9 +113,10 @@ function passStringToWasm0(arg, malloc, realloc) {
112
113
  arg = arg.slice(offset);
113
114
  }
114
115
  ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
115
- const view = getUint8Memory0().subarray(ptr + offset, ptr + len);
116
+ const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
116
117
  const ret = encodeString(arg, view);
117
118
  offset += ret.written;
119
+ ptr = realloc(ptr, len, offset, 1) >>> 0;
118
120
  }
119
121
  WASM_VECTOR_LEN = offset;
120
122
  return ptr;
@@ -124,14 +126,14 @@ function isLikeNone(x) {
124
126
  return x === void 0 || x === null;
125
127
  }
126
128
  __name(isLikeNone, "isLikeNone");
127
- var cachedInt32Memory0 = null;
128
- function getInt32Memory0() {
129
- if (cachedInt32Memory0 === null || cachedInt32Memory0.byteLength === 0) {
130
- cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);
129
+ var cachedDataViewMemory0 = null;
130
+ function getDataViewMemory0() {
131
+ if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || cachedDataViewMemory0.buffer.detached === void 0 && cachedDataViewMemory0.buffer !== wasm.memory.buffer) {
132
+ cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
131
133
  }
132
- return cachedInt32Memory0;
134
+ return cachedDataViewMemory0;
133
135
  }
134
- __name(getInt32Memory0, "getInt32Memory0");
136
+ __name(getDataViewMemory0, "getDataViewMemory0");
135
137
  function debugString(val) {
136
138
  const type = typeof val;
137
139
  if (type == "number" || type == "boolean" || val == null) {
@@ -189,6 +191,11 @@ ${val.stack}`;
189
191
  return className;
190
192
  }
191
193
  __name(debugString, "debugString");
194
+ var CLOSURE_DTORS = typeof FinalizationRegistry === "undefined" ? { register: () => {
195
+ }, unregister: () => {
196
+ } } : new FinalizationRegistry((state) => {
197
+ wasm.__wbindgen_export_2.get(state.dtor)(state.a, state.b);
198
+ });
192
199
  function makeMutClosure(arg0, arg1, dtor, f) {
193
200
  const state = { a: arg0, b: arg1, cnt: 1, dtor };
194
201
  const real = /* @__PURE__ */ __name((...args) => {
@@ -200,17 +207,19 @@ function makeMutClosure(arg0, arg1, dtor, f) {
200
207
  } finally {
201
208
  if (--state.cnt === 0) {
202
209
  wasm.__wbindgen_export_2.get(state.dtor)(a, state.b);
210
+ CLOSURE_DTORS.unregister(state);
203
211
  } else {
204
212
  state.a = a;
205
213
  }
206
214
  }
207
215
  }, "real");
208
216
  real.original = state;
217
+ CLOSURE_DTORS.register(real, state, state);
209
218
  return real;
210
219
  }
211
220
  __name(makeMutClosure, "makeMutClosure");
212
221
  function __wbg_adapter_26(arg0, arg1, arg2) {
213
- wasm.wasm_bindgen__convert__closures__invoke1_mut__h45806fd75c456525(arg0, arg1, addHeapObject(arg2));
222
+ wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hbfea49efa319d6a8(arg0, arg1, addHeapObject(arg2));
214
223
  }
215
224
  __name(__wbg_adapter_26, "__wbg_adapter_26");
216
225
  function didResolver(did, input_metadata) {
@@ -233,7 +242,7 @@ function resolveDID(did, input_metadata) {
233
242
  __name(resolveDID, "resolveDID");
234
243
  function passArray8ToWasm0(arg, malloc) {
235
244
  const ptr = malloc(arg.length * 1, 1) >>> 0;
236
- getUint8Memory0().set(arg, ptr / 1);
245
+ getUint8ArrayMemory0().set(arg, ptr / 1);
237
246
  WASM_VECTOR_LEN = arg.length;
238
247
  return ptr;
239
248
  }
@@ -246,10 +255,10 @@ function generateEd25519KeyFromBytes(bytes) {
246
255
  const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
247
256
  const len0 = WASM_VECTOR_LEN;
248
257
  wasm.generateEd25519KeyFromBytes(retptr, ptr0, len0);
249
- var r0 = getInt32Memory0()[retptr / 4 + 0];
250
- var r1 = getInt32Memory0()[retptr / 4 + 1];
251
- var r2 = getInt32Memory0()[retptr / 4 + 2];
252
- var r3 = getInt32Memory0()[retptr / 4 + 3];
258
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
259
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
260
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
261
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
253
262
  var ptr2 = r0;
254
263
  var len2 = r1;
255
264
  if (r3) {
@@ -274,10 +283,10 @@ function generateSecp256k1KeyFromBytes(bytes) {
274
283
  const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
275
284
  const len0 = WASM_VECTOR_LEN;
276
285
  wasm.generateSecp256k1KeyFromBytes(retptr, ptr0, len0);
277
- var r0 = getInt32Memory0()[retptr / 4 + 0];
278
- var r1 = getInt32Memory0()[retptr / 4 + 1];
279
- var r2 = getInt32Memory0()[retptr / 4 + 2];
280
- var r3 = getInt32Memory0()[retptr / 4 + 3];
286
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
287
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
288
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
289
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
281
290
  var ptr2 = r0;
282
291
  var len2 = r1;
283
292
  if (r3) {
@@ -304,10 +313,10 @@ function keyToDID(method_pattern, jwk) {
304
313
  const ptr1 = passStringToWasm0(jwk, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
305
314
  const len1 = WASM_VECTOR_LEN;
306
315
  wasm.keyToDID(retptr, ptr0, len0, ptr1, len1);
307
- var r0 = getInt32Memory0()[retptr / 4 + 0];
308
- var r1 = getInt32Memory0()[retptr / 4 + 1];
309
- var r2 = getInt32Memory0()[retptr / 4 + 2];
310
- var r3 = getInt32Memory0()[retptr / 4 + 3];
316
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
317
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
318
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
319
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
311
320
  var ptr3 = r0;
312
321
  var len3 = r1;
313
322
  if (r3) {
@@ -405,13 +414,15 @@ function handleError(f, args) {
405
414
  __name(handleError, "handleError");
406
415
  function getArrayU8FromWasm0(ptr, len) {
407
416
  ptr = ptr >>> 0;
408
- return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);
417
+ return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
409
418
  }
410
419
  __name(getArrayU8FromWasm0, "getArrayU8FromWasm0");
411
- function __wbg_adapter_139(arg0, arg1, arg2, arg3) {
412
- wasm.wasm_bindgen__convert__closures__invoke2_mut__h46bbe3de5dd3bce3(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
420
+ function __wbg_adapter_155(arg0, arg1, arg2, arg3) {
421
+ wasm.wasm_bindgen__convert__closures__invoke2_mut__h7f21b3df1bf974ab(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
413
422
  }
414
- __name(__wbg_adapter_139, "__wbg_adapter_139");
423
+ __name(__wbg_adapter_155, "__wbg_adapter_155");
424
+ var __wbindgen_enum_RequestCredentials = ["omit", "same-origin", "include"];
425
+ var __wbindgen_enum_RequestMode = ["same-origin", "no-cors", "cors", "navigate"];
415
426
  async function __wbg_load(module2, imports) {
416
427
  if (typeof Response === "function" && module2 instanceof Response) {
417
428
  if (typeof WebAssembly.instantiateStreaming === "function") {
@@ -419,7 +430,7 @@ async function __wbg_load(module2, imports) {
419
430
  return await WebAssembly.instantiateStreaming(module2, imports);
420
431
  } catch (e) {
421
432
  if (module2.headers.get("Content-Type") != "application/wasm") {
422
- console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e);
433
+ console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e);
423
434
  } else {
424
435
  throw e;
425
436
  }
@@ -460,86 +471,119 @@ function __wbg_get_imports() {
460
471
  const ret = getObject(arg0);
461
472
  return addHeapObject(ret);
462
473
  };
463
- imports.wbg.__wbg_fetch_57429b87be3dcc33 = function(arg0) {
474
+ imports.wbg.__wbg_fetch_bc7c8e27076a5c84 = function(arg0) {
464
475
  const ret = fetch(getObject(arg0));
465
476
  return addHeapObject(ret);
466
477
  };
467
- imports.wbg.__wbg_fetch_8eaf01857a5bb21f = function(arg0, arg1) {
468
- const ret = getObject(arg0).fetch(getObject(arg1));
478
+ imports.wbg.__wbg_queueMicrotask_848aa4969108a57e = function(arg0) {
479
+ const ret = getObject(arg0).queueMicrotask;
469
480
  return addHeapObject(ret);
470
481
  };
471
- imports.wbg.__wbg_instanceof_Response_fc4327dbfcdf5ced = function(arg0) {
472
- let result;
473
- try {
474
- result = getObject(arg0) instanceof Response;
475
- } catch {
476
- result = false;
477
- }
478
- const ret = result;
482
+ imports.wbg.__wbindgen_is_function = function(arg0) {
483
+ const ret = typeof getObject(arg0) === "function";
479
484
  return ret;
480
485
  };
481
- imports.wbg.__wbg_url_8503de97f69da463 = function(arg0, arg1) {
482
- const ret = getObject(arg1).url;
483
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
484
- const len1 = WASM_VECTOR_LEN;
485
- getInt32Memory0()[arg0 / 4 + 1] = len1;
486
- getInt32Memory0()[arg0 / 4 + 0] = ptr1;
486
+ imports.wbg.__wbg_queueMicrotask_c5419c06eab41e73 = function(arg0) {
487
+ queueMicrotask(getObject(arg0));
487
488
  };
488
- imports.wbg.__wbg_status_ac85a3142a84caa2 = function(arg0) {
489
- const ret = getObject(arg0).status;
490
- return ret;
489
+ imports.wbg.__wbg_fetch_1fdc4448ed9eec00 = function(arg0, arg1) {
490
+ const ret = getObject(arg0).fetch(getObject(arg1));
491
+ return addHeapObject(ret);
491
492
  };
492
- imports.wbg.__wbg_headers_b70de86b8e989bc0 = function(arg0) {
493
- const ret = getObject(arg0).headers;
493
+ imports.wbg.__wbg_setbody_aa8b691bec428bf4 = function(arg0, arg1) {
494
+ getObject(arg0).body = getObject(arg1);
495
+ };
496
+ imports.wbg.__wbg_setcredentials_a4e661320cdb9738 = function(arg0, arg1) {
497
+ getObject(arg0).credentials = __wbindgen_enum_RequestCredentials[arg1];
498
+ };
499
+ imports.wbg.__wbg_setheaders_f5205d36e423a544 = function(arg0, arg1) {
500
+ getObject(arg0).headers = getObject(arg1);
501
+ };
502
+ imports.wbg.__wbg_setmethod_ce2da76000b02f6a = function(arg0, arg1, arg2) {
503
+ getObject(arg0).method = getStringFromWasm0(arg1, arg2);
504
+ };
505
+ imports.wbg.__wbg_setmode_4919fd636102c586 = function(arg0, arg1) {
506
+ getObject(arg0).mode = __wbindgen_enum_RequestMode[arg1];
507
+ };
508
+ imports.wbg.__wbg_setsignal_812ccb8269a7fd90 = function(arg0, arg1) {
509
+ getObject(arg0).signal = getObject(arg1);
510
+ };
511
+ imports.wbg.__wbg_signal_9acfcec9e7dffc22 = function(arg0) {
512
+ const ret = getObject(arg0).signal;
494
513
  return addHeapObject(ret);
495
514
  };
496
- imports.wbg.__wbg_arrayBuffer_288fb3538806e85c = function() {
497
- return handleError(function(arg0) {
498
- const ret = getObject(arg0).arrayBuffer();
515
+ imports.wbg.__wbg_new_75169ae5a9683c55 = function() {
516
+ return handleError(function() {
517
+ const ret = new AbortController();
499
518
  return addHeapObject(ret);
500
519
  }, arguments);
501
520
  };
502
- imports.wbg.__wbg_newwithstrandinit_cad5cd6038c7ff5d = function() {
521
+ imports.wbg.__wbg_abort_c57daab47a6c1215 = function(arg0) {
522
+ getObject(arg0).abort();
523
+ };
524
+ imports.wbg.__wbg_newwithstrandinit_4b92c89af0a8e383 = function() {
503
525
  return handleError(function(arg0, arg1, arg2) {
504
526
  const ret = new Request(getStringFromWasm0(arg0, arg1), getObject(arg2));
505
527
  return addHeapObject(ret);
506
528
  }, arguments);
507
529
  };
508
- imports.wbg.__wbg_now_0cfdc90c97d0c24b = function(arg0) {
509
- const ret = getObject(arg0).now();
510
- return ret;
530
+ imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
531
+ const obj = getObject(arg1);
532
+ const ret = typeof obj === "string" ? obj : void 0;
533
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
534
+ var len1 = WASM_VECTOR_LEN;
535
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
536
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
511
537
  };
512
- imports.wbg.__wbg_new_1eead62f64ca15ce = function() {
538
+ imports.wbg.__wbg_new_a9ae04a5200606a5 = function() {
513
539
  return handleError(function() {
514
540
  const ret = new Headers();
515
541
  return addHeapObject(ret);
516
542
  }, arguments);
517
543
  };
518
- imports.wbg.__wbg_append_fda9e3432e3e88da = function() {
544
+ imports.wbg.__wbg_append_8b3e7f74a47ea7d5 = function() {
519
545
  return handleError(function(arg0, arg1, arg2, arg3, arg4) {
520
546
  getObject(arg0).append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
521
547
  }, arguments);
522
548
  };
523
- imports.wbg.__wbg_signal_4bd18fb489af2d4c = function(arg0) {
524
- const ret = getObject(arg0).signal;
549
+ imports.wbg.__wbg_now_d3cbc9581625f686 = function(arg0) {
550
+ const ret = getObject(arg0).now();
551
+ return ret;
552
+ };
553
+ imports.wbg.__wbg_instanceof_Response_3c0e210a57ff751d = function(arg0) {
554
+ let result;
555
+ try {
556
+ result = getObject(arg0) instanceof Response;
557
+ } catch (_) {
558
+ result = false;
559
+ }
560
+ const ret = result;
561
+ return ret;
562
+ };
563
+ imports.wbg.__wbg_url_58af972663531d16 = function(arg0, arg1) {
564
+ const ret = getObject(arg1).url;
565
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
566
+ const len1 = WASM_VECTOR_LEN;
567
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
568
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
569
+ };
570
+ imports.wbg.__wbg_status_5f4e900d22140a18 = function(arg0) {
571
+ const ret = getObject(arg0).status;
572
+ return ret;
573
+ };
574
+ imports.wbg.__wbg_headers_1b9bf90c73fae600 = function(arg0) {
575
+ const ret = getObject(arg0).headers;
525
576
  return addHeapObject(ret);
526
577
  };
527
- imports.wbg.__wbg_new_55c9955722952374 = function() {
528
- return handleError(function() {
529
- const ret = new AbortController();
578
+ imports.wbg.__wbg_arrayBuffer_144729e09879650e = function() {
579
+ return handleError(function(arg0) {
580
+ const ret = getObject(arg0).arrayBuffer();
530
581
  return addHeapObject(ret);
531
582
  }, arguments);
532
583
  };
533
- imports.wbg.__wbg_abort_654b796176d117aa = function(arg0) {
534
- getObject(arg0).abort();
535
- };
536
- imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
537
- const obj = getObject(arg1);
538
- const ret = typeof obj === "string" ? obj : void 0;
539
- var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
540
- var len1 = WASM_VECTOR_LEN;
541
- getInt32Memory0()[arg0 / 4 + 1] = len1;
542
- getInt32Memory0()[arg0 / 4 + 0] = ptr1;
584
+ imports.wbg.__wbg_static_accessor_MODULE_ef3aa2eb251158a5 = function() {
585
+ const ret = module;
586
+ return addHeapObject(ret);
543
587
  };
544
588
  imports.wbg.__wbg_self_7eede1f4488bf346 = function() {
545
589
  return handleError(function() {
@@ -559,10 +603,6 @@ function __wbg_get_imports() {
559
603
  const ret = getObject(arg0) === void 0;
560
604
  return ret;
561
605
  };
562
- imports.wbg.__wbg_static_accessor_MODULE_ef3aa2eb251158a5 = function() {
563
- const ret = module;
564
- return addHeapObject(ret);
565
- };
566
606
  imports.wbg.__wbg_require_900d5c3984fe7703 = function(arg0, arg1, arg2) {
567
607
  const ret = getObject(arg0).require(getStringFromWasm0(arg1, arg2));
568
608
  return addHeapObject(ret);
@@ -577,7 +617,7 @@ function __wbg_get_imports() {
577
617
  imports.wbg.__wbg_randomFillSync_85b3f4c52c56c313 = function(arg0, arg1, arg2) {
578
618
  getObject(arg0).randomFillSync(getArrayU8FromWasm0(arg1, arg2));
579
619
  };
580
- imports.wbg.__wbg_crypto_c48a774b022d20ac = function(arg0) {
620
+ imports.wbg.__wbg_crypto_1d1f22824a6a080c = function(arg0) {
581
621
  const ret = getObject(arg0).crypto;
582
622
  return addHeapObject(ret);
583
623
  };
@@ -586,15 +626,15 @@ function __wbg_get_imports() {
586
626
  const ret = typeof val === "object" && val !== null;
587
627
  return ret;
588
628
  };
589
- imports.wbg.__wbg_process_298734cf255a885d = function(arg0) {
629
+ imports.wbg.__wbg_process_4a72847cc503995b = function(arg0) {
590
630
  const ret = getObject(arg0).process;
591
631
  return addHeapObject(ret);
592
632
  };
593
- imports.wbg.__wbg_versions_e2e78e134e3e5d01 = function(arg0) {
633
+ imports.wbg.__wbg_versions_f686565e586dd935 = function(arg0) {
594
634
  const ret = getObject(arg0).versions;
595
635
  return addHeapObject(ret);
596
636
  };
597
- imports.wbg.__wbg_node_1cd7a5d853dbea79 = function(arg0) {
637
+ imports.wbg.__wbg_node_104a2ff8d6ea03a2 = function(arg0) {
598
638
  const ret = getObject(arg0).node;
599
639
  return addHeapObject(ret);
600
640
  };
@@ -602,118 +642,114 @@ function __wbg_get_imports() {
602
642
  const ret = typeof getObject(arg0) === "string";
603
643
  return ret;
604
644
  };
605
- imports.wbg.__wbg_msCrypto_bcb970640f50a1e8 = function(arg0) {
606
- const ret = getObject(arg0).msCrypto;
607
- return addHeapObject(ret);
608
- };
609
- imports.wbg.__wbg_require_8f08ceecec0f4fee = function() {
645
+ imports.wbg.__wbg_require_cca90b1a94a0255b = function() {
610
646
  return handleError(function() {
611
647
  const ret = module.require;
612
648
  return addHeapObject(ret);
613
649
  }, arguments);
614
650
  };
615
- imports.wbg.__wbindgen_is_function = function(arg0) {
616
- const ret = typeof getObject(arg0) === "function";
617
- return ret;
651
+ imports.wbg.__wbg_msCrypto_eb05e62b530a1508 = function(arg0) {
652
+ const ret = getObject(arg0).msCrypto;
653
+ return addHeapObject(ret);
618
654
  };
619
- imports.wbg.__wbg_randomFillSync_dc1e9a60c158336d = function() {
655
+ imports.wbg.__wbg_randomFillSync_5c9c955aa56b6049 = function() {
620
656
  return handleError(function(arg0, arg1) {
621
657
  getObject(arg0).randomFillSync(takeObject(arg1));
622
658
  }, arguments);
623
659
  };
624
- imports.wbg.__wbg_getRandomValues_37fa2ca9e4e07fab = function() {
660
+ imports.wbg.__wbg_getRandomValues_3aa56aa6edec874c = function() {
625
661
  return handleError(function(arg0, arg1) {
626
662
  getObject(arg0).getRandomValues(getObject(arg1));
627
663
  }, arguments);
628
664
  };
629
- imports.wbg.__wbg_newnoargs_581967eacc0e2604 = function(arg0, arg1) {
665
+ imports.wbg.__wbg_newnoargs_1ede4bf2ebbaaf43 = function(arg0, arg1) {
630
666
  const ret = new Function(getStringFromWasm0(arg0, arg1));
631
667
  return addHeapObject(ret);
632
668
  };
633
- imports.wbg.__wbg_next_526fc47e980da008 = function(arg0) {
669
+ imports.wbg.__wbg_next_13b477da1eaa3897 = function(arg0) {
634
670
  const ret = getObject(arg0).next;
635
671
  return addHeapObject(ret);
636
672
  };
637
- imports.wbg.__wbg_next_ddb3312ca1c4e32a = function() {
673
+ imports.wbg.__wbg_next_b06e115d1b01e10b = function() {
638
674
  return handleError(function(arg0) {
639
675
  const ret = getObject(arg0).next();
640
676
  return addHeapObject(ret);
641
677
  }, arguments);
642
678
  };
643
- imports.wbg.__wbg_done_5c1f01fb660d73b5 = function(arg0) {
679
+ imports.wbg.__wbg_done_983b5ffcaec8c583 = function(arg0) {
644
680
  const ret = getObject(arg0).done;
645
681
  return ret;
646
682
  };
647
- imports.wbg.__wbg_value_1695675138684bd5 = function(arg0) {
683
+ imports.wbg.__wbg_value_2ab8a198c834c26a = function(arg0) {
648
684
  const ret = getObject(arg0).value;
649
685
  return addHeapObject(ret);
650
686
  };
651
- imports.wbg.__wbg_iterator_97f0c81209c6c35a = function() {
687
+ imports.wbg.__wbg_iterator_695d699a44d6234c = function() {
652
688
  const ret = Symbol.iterator;
653
689
  return addHeapObject(ret);
654
690
  };
655
- imports.wbg.__wbg_get_97b561fb56f034b5 = function() {
691
+ imports.wbg.__wbg_get_ef828680c64da212 = function() {
656
692
  return handleError(function(arg0, arg1) {
657
693
  const ret = Reflect.get(getObject(arg0), getObject(arg1));
658
694
  return addHeapObject(ret);
659
695
  }, arguments);
660
696
  };
661
- imports.wbg.__wbg_call_cb65541d95d71282 = function() {
697
+ imports.wbg.__wbg_call_a9ef466721e824f2 = function() {
662
698
  return handleError(function(arg0, arg1) {
663
699
  const ret = getObject(arg0).call(getObject(arg1));
664
700
  return addHeapObject(ret);
665
701
  }, arguments);
666
702
  };
667
- imports.wbg.__wbg_new_b51585de1b234aff = function() {
703
+ imports.wbg.__wbg_new_e69b5f66fda8f13c = function() {
668
704
  const ret = new Object();
669
705
  return addHeapObject(ret);
670
706
  };
671
- imports.wbg.__wbg_self_1ff1d729e9aae938 = function() {
707
+ imports.wbg.__wbg_self_bf91bf94d9e04084 = function() {
672
708
  return handleError(function() {
673
709
  const ret = self.self;
674
710
  return addHeapObject(ret);
675
711
  }, arguments);
676
712
  };
677
- imports.wbg.__wbg_window_5f4faef6c12b79ec = function() {
713
+ imports.wbg.__wbg_window_52dd9f07d03fd5f8 = function() {
678
714
  return handleError(function() {
679
715
  const ret = window.window;
680
716
  return addHeapObject(ret);
681
717
  }, arguments);
682
718
  };
683
- imports.wbg.__wbg_globalThis_1d39714405582d3c = function() {
719
+ imports.wbg.__wbg_globalThis_05c129bf37fcf1be = function() {
684
720
  return handleError(function() {
685
721
  const ret = globalThis.globalThis;
686
722
  return addHeapObject(ret);
687
723
  }, arguments);
688
724
  };
689
- imports.wbg.__wbg_global_651f05c6a0944d1c = function() {
725
+ imports.wbg.__wbg_global_3eca19bb09e9c484 = function() {
690
726
  return handleError(function() {
691
727
  const ret = global.global;
692
728
  return addHeapObject(ret);
693
729
  }, arguments);
694
730
  };
695
- imports.wbg.__wbg_call_01734de55d61e11d = function() {
731
+ imports.wbg.__wbg_call_3bfa248576352471 = function() {
696
732
  return handleError(function(arg0, arg1, arg2) {
697
733
  const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
698
734
  return addHeapObject(ret);
699
735
  }, arguments);
700
736
  };
701
- imports.wbg.__wbg_getTime_5e2054f832d82ec9 = function(arg0) {
737
+ imports.wbg.__wbg_getTime_41225036a0393d63 = function(arg0) {
702
738
  const ret = getObject(arg0).getTime();
703
739
  return ret;
704
740
  };
705
- imports.wbg.__wbg_new0_c0be7df4b6bd481f = function() {
741
+ imports.wbg.__wbg_new0_218ada33b570be35 = function() {
706
742
  const ret = new Date();
707
743
  return addHeapObject(ret);
708
744
  };
709
- imports.wbg.__wbg_new_43f1b47c28813cbd = function(arg0, arg1) {
745
+ imports.wbg.__wbg_new_1073970097e5a420 = function(arg0, arg1) {
710
746
  try {
711
747
  var state0 = { a: arg0, b: arg1 };
712
748
  var cb0 = /* @__PURE__ */ __name((arg02, arg12) => {
713
749
  const a = state0.a;
714
750
  state0.a = 0;
715
751
  try {
716
- return __wbg_adapter_139(a, state0.b, arg02, arg12);
752
+ return __wbg_adapter_155(a, state0.b, arg02, arg12);
717
753
  } finally {
718
754
  state0.a = a;
719
755
  }
@@ -724,69 +760,63 @@ function __wbg_get_imports() {
724
760
  state0.a = state0.b = 0;
725
761
  }
726
762
  };
727
- imports.wbg.__wbg_resolve_53698b95aaf7fcf8 = function(arg0) {
763
+ imports.wbg.__wbg_resolve_0aad7c1484731c99 = function(arg0) {
728
764
  const ret = Promise.resolve(getObject(arg0));
729
765
  return addHeapObject(ret);
730
766
  };
731
- imports.wbg.__wbg_then_f7e06ee3c11698eb = function(arg0, arg1) {
767
+ imports.wbg.__wbg_then_748f75edfb032440 = function(arg0, arg1) {
732
768
  const ret = getObject(arg0).then(getObject(arg1));
733
769
  return addHeapObject(ret);
734
770
  };
735
- imports.wbg.__wbg_then_b2267541e2a73865 = function(arg0, arg1, arg2) {
771
+ imports.wbg.__wbg_then_4866a7d9f55d8f3e = function(arg0, arg1, arg2) {
736
772
  const ret = getObject(arg0).then(getObject(arg1), getObject(arg2));
737
773
  return addHeapObject(ret);
738
774
  };
739
- imports.wbg.__wbg_buffer_085ec1f694018c4f = function(arg0) {
775
+ imports.wbg.__wbg_buffer_ccaed51a635d8a2d = function(arg0) {
740
776
  const ret = getObject(arg0).buffer;
741
777
  return addHeapObject(ret);
742
778
  };
743
- imports.wbg.__wbg_newwithbyteoffsetandlength_6da8e527659b86aa = function(arg0, arg1, arg2) {
779
+ imports.wbg.__wbg_newwithbyteoffsetandlength_7e3eb787208af730 = function(arg0, arg1, arg2) {
744
780
  const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
745
781
  return addHeapObject(ret);
746
782
  };
747
- imports.wbg.__wbg_new_8125e318e6245eed = function(arg0) {
783
+ imports.wbg.__wbg_new_fec2611eb9180f95 = function(arg0) {
748
784
  const ret = new Uint8Array(getObject(arg0));
749
785
  return addHeapObject(ret);
750
786
  };
751
- imports.wbg.__wbg_set_5cf90238115182c3 = function(arg0, arg1, arg2) {
787
+ imports.wbg.__wbg_set_ec2fcf81bc573fd9 = function(arg0, arg1, arg2) {
752
788
  getObject(arg0).set(getObject(arg1), arg2 >>> 0);
753
789
  };
754
- imports.wbg.__wbg_length_72e2208bbc0efc61 = function(arg0) {
790
+ imports.wbg.__wbg_length_9254c4bd3b9f23c4 = function(arg0) {
755
791
  const ret = getObject(arg0).length;
756
792
  return ret;
757
793
  };
758
- imports.wbg.__wbg_newwithlength_e5d69174d6984cd7 = function(arg0) {
794
+ imports.wbg.__wbg_newwithlength_76462a666eca145f = function(arg0) {
759
795
  const ret = new Uint8Array(arg0 >>> 0);
760
796
  return addHeapObject(ret);
761
797
  };
762
- imports.wbg.__wbg_subarray_13db269f57aa838d = function(arg0, arg1, arg2) {
798
+ imports.wbg.__wbg_subarray_975a06f9dbd16995 = function(arg0, arg1, arg2) {
763
799
  const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
764
800
  return addHeapObject(ret);
765
801
  };
766
- imports.wbg.__wbg_has_c5fcd020291e56b8 = function() {
767
- return handleError(function(arg0, arg1) {
768
- const ret = Reflect.has(getObject(arg0), getObject(arg1));
769
- return ret;
770
- }, arguments);
771
- };
772
- imports.wbg.__wbg_set_092e06b0f9d71865 = function() {
773
- return handleError(function(arg0, arg1, arg2) {
774
- const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
775
- return ret;
776
- }, arguments);
777
- };
778
- imports.wbg.__wbg_stringify_e25465938f3f611f = function() {
802
+ imports.wbg.__wbg_stringify_eead5648c09faaf8 = function() {
779
803
  return handleError(function(arg0) {
780
804
  const ret = JSON.stringify(getObject(arg0));
781
805
  return addHeapObject(ret);
782
806
  }, arguments);
783
807
  };
808
+ imports.wbg.__wbg_has_bd717f25f195f23d = function() {
809
+ return handleError(function(arg0, arg1) {
810
+ const ret = Reflect.has(getObject(arg0), getObject(arg1));
811
+ return ret;
812
+ }, arguments);
813
+ };
784
814
  imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
785
815
  const ret = debugString(getObject(arg1));
786
816
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
787
817
  const len1 = WASM_VECTOR_LEN;
788
- getInt32Memory0()[arg0 / 4 + 1] = len1;
789
- getInt32Memory0()[arg0 / 4 + 0] = ptr1;
818
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
819
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
790
820
  };
791
821
  imports.wbg.__wbindgen_throw = function(arg0, arg1) {
792
822
  throw new Error(getStringFromWasm0(arg0, arg1));
@@ -795,33 +825,43 @@ function __wbg_get_imports() {
795
825
  const ret = wasm.memory;
796
826
  return addHeapObject(ret);
797
827
  };
798
- imports.wbg.__wbindgen_closure_wrapper12457 = function(arg0, arg1, arg2) {
799
- const ret = makeMutClosure(arg0, arg1, 4397, __wbg_adapter_26);
828
+ imports.wbg.__wbindgen_closure_wrapper12178 = function(arg0, arg1, arg2) {
829
+ const ret = makeMutClosure(arg0, arg1, 3919, __wbg_adapter_26);
800
830
  return addHeapObject(ret);
801
831
  };
802
832
  return imports;
803
833
  }
804
834
  __name(__wbg_get_imports, "__wbg_get_imports");
805
- function __wbg_init_memory(imports, maybe_memory) {
835
+ function __wbg_init_memory(imports, memory) {
806
836
  }
807
837
  __name(__wbg_init_memory, "__wbg_init_memory");
808
838
  function __wbg_finalize_init(instance, module2) {
809
839
  wasm = instance.exports;
810
840
  __wbg_init.__wbindgen_wasm_module = module2;
811
- cachedInt32Memory0 = null;
812
- cachedUint8Memory0 = null;
841
+ cachedDataViewMemory0 = null;
842
+ cachedUint8ArrayMemory0 = null;
813
843
  return wasm;
814
844
  }
815
845
  __name(__wbg_finalize_init, "__wbg_finalize_init");
816
- async function __wbg_init(input) {
846
+ async function __wbg_init(module_or_path) {
817
847
  if (wasm !== void 0)
818
848
  return wasm;
849
+ if (typeof module_or_path !== "undefined") {
850
+ if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
851
+ ({ module_or_path } = module_or_path);
852
+ } else {
853
+ console.warn("using deprecated parameters for the initialization function; pass a single object instead");
854
+ }
855
+ }
856
+ if (typeof module_or_path === "undefined") {
857
+ module_or_path = new URL("didkit_wasm_bg.wasm", import_meta.url);
858
+ }
819
859
  const imports = __wbg_get_imports();
820
- if (typeof input === "string" || typeof Request === "function" && input instanceof Request || typeof URL === "function" && input instanceof URL) {
821
- input = fetch(input);
860
+ if (typeof module_or_path === "string" || typeof Request === "function" && module_or_path instanceof Request || typeof URL === "function" && module_or_path instanceof URL) {
861
+ module_or_path = fetch(module_or_path);
822
862
  }
823
863
  __wbg_init_memory(imports);
824
- const { instance, module: module2 } = await __wbg_load(await input, imports);
864
+ const { instance, module: module2 } = await __wbg_load(await module_or_path, imports);
825
865
  return __wbg_finalize_init(instance, module2);
826
866
  }
827
867
  __name(__wbg_init, "__wbg_init");
@@ -830,7 +870,7 @@ var didkit_wasm_default = __wbg_init;
830
870
  // src/didkit/index.ts
831
871
  var initialized = false;
832
872
  var generating = false;
833
- var init = /* @__PURE__ */ __name(async (arg = "https://cdn.filestackcontent.com/OSz89FZyTr6FIRUhZzKg") => {
873
+ var init = /* @__PURE__ */ __name(async (arg = "https://cdn.filestackcontent.com/A9HwVUqTVG04sEMFuABA") => {
834
874
  while (generating)
835
875
  await new Promise((res) => setTimeout(res, 250));
836
876
  if (initialized)