@learncard/didkit-plugin 1.9.8 → 1.9.9

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,7 +3,6 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
3
3
 
4
4
  // src/didkit/pkg/didkit_wasm.js
5
5
  var wasm;
6
- var WASM_VECTOR_LEN = 0;
7
6
  var cachedUint8ArrayMemory0 = null;
8
7
  function getUint8ArrayMemory0() {
9
8
  if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
@@ -12,19 +11,37 @@ function getUint8ArrayMemory0() {
12
11
  return cachedUint8ArrayMemory0;
13
12
  }
14
13
  __name(getUint8ArrayMemory0, "getUint8ArrayMemory0");
15
- var cachedTextEncoder = typeof TextEncoder !== "undefined" ? new TextEncoder("utf-8") : { encode: /* @__PURE__ */ __name(() => {
16
- throw Error("TextEncoder not available");
17
- }, "encode") };
18
- var encodeString = typeof cachedTextEncoder.encodeInto === "function" ? function(arg, view) {
19
- return cachedTextEncoder.encodeInto(arg, view);
20
- } : function(arg, view) {
21
- const buf = cachedTextEncoder.encode(arg);
22
- view.set(buf);
23
- return {
24
- read: arg.length,
25
- written: buf.length
14
+ var cachedTextDecoder = new TextDecoder("utf-8", { ignoreBOM: true, fatal: true });
15
+ cachedTextDecoder.decode();
16
+ var MAX_SAFARI_DECODE_BYTES = 2146435072;
17
+ var numBytesDecoded = 0;
18
+ function decodeText(ptr, len) {
19
+ numBytesDecoded += len;
20
+ if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
21
+ cachedTextDecoder = new TextDecoder("utf-8", { ignoreBOM: true, fatal: true });
22
+ cachedTextDecoder.decode();
23
+ numBytesDecoded = len;
24
+ }
25
+ return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
26
+ }
27
+ __name(decodeText, "decodeText");
28
+ function getStringFromWasm0(ptr, len) {
29
+ ptr = ptr >>> 0;
30
+ return decodeText(ptr, len);
31
+ }
32
+ __name(getStringFromWasm0, "getStringFromWasm0");
33
+ var WASM_VECTOR_LEN = 0;
34
+ var cachedTextEncoder = new TextEncoder();
35
+ if (!("encodeInto" in cachedTextEncoder)) {
36
+ cachedTextEncoder.encodeInto = function(arg, view) {
37
+ const buf = cachedTextEncoder.encode(arg);
38
+ view.set(buf);
39
+ return {
40
+ read: arg.length,
41
+ written: buf.length
42
+ };
26
43
  };
27
- };
44
+ }
28
45
  function passStringToWasm0(arg, malloc, realloc) {
29
46
  if (realloc === void 0) {
30
47
  const buf = cachedTextEncoder.encode(arg);
@@ -48,7 +65,7 @@ function passStringToWasm0(arg, malloc, realloc) {
48
65
  }
49
66
  ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
50
67
  const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
51
- const ret = encodeString(arg, view);
68
+ const ret = cachedTextEncoder.encodeInto(arg, view);
52
69
  offset += ret.written;
53
70
  ptr = realloc(ptr, len, offset, 1) >>> 0;
54
71
  }
@@ -64,17 +81,6 @@ function getDataViewMemory0() {
64
81
  return cachedDataViewMemory0;
65
82
  }
66
83
  __name(getDataViewMemory0, "getDataViewMemory0");
67
- var cachedTextDecoder = typeof TextDecoder !== "undefined" ? new TextDecoder("utf-8", { ignoreBOM: true, fatal: true }) : { decode: /* @__PURE__ */ __name(() => {
68
- throw Error("TextDecoder not available");
69
- }, "decode") };
70
- if (typeof TextDecoder !== "undefined") {
71
- cachedTextDecoder.decode();
72
- }
73
- function getStringFromWasm0(ptr, len) {
74
- ptr = ptr >>> 0;
75
- return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
76
- }
77
- __name(getStringFromWasm0, "getStringFromWasm0");
78
84
  function addToExternrefTable0(obj) {
79
85
  const idx = wasm.__externref_table_alloc();
80
86
  wasm.__wbindgen_export_4.set(idx, obj);
@@ -99,33 +105,6 @@ function isLikeNone(x) {
99
105
  return x === void 0 || x === null;
100
106
  }
101
107
  __name(isLikeNone, "isLikeNone");
102
- var CLOSURE_DTORS = typeof FinalizationRegistry === "undefined" ? { register: /* @__PURE__ */ __name(() => {
103
- }, "register"), unregister: /* @__PURE__ */ __name(() => {
104
- }, "unregister") } : new FinalizationRegistry((state) => {
105
- wasm.__wbindgen_export_5.get(state.dtor)(state.a, state.b);
106
- });
107
- function makeMutClosure(arg0, arg1, dtor, f) {
108
- const state = { a: arg0, b: arg1, cnt: 1, dtor };
109
- const real = /* @__PURE__ */ __name((...args) => {
110
- state.cnt++;
111
- const a = state.a;
112
- state.a = 0;
113
- try {
114
- return f(a, state.b, ...args);
115
- } finally {
116
- if (--state.cnt === 0) {
117
- wasm.__wbindgen_export_5.get(state.dtor)(a, state.b);
118
- CLOSURE_DTORS.unregister(state);
119
- } else {
120
- state.a = a;
121
- }
122
- }
123
- }, "real");
124
- real.original = state;
125
- CLOSURE_DTORS.register(real, state, state);
126
- return real;
127
- }
128
- __name(makeMutClosure, "makeMutClosure");
129
108
  function debugString(val) {
130
109
  const type = typeof val;
131
110
  if (type == "number" || type == "boolean" || val == null) {
@@ -183,6 +162,76 @@ ${val.stack}`;
183
162
  return className;
184
163
  }
185
164
  __name(debugString, "debugString");
165
+ var CLOSURE_DTORS = typeof FinalizationRegistry === "undefined" ? { register: /* @__PURE__ */ __name(() => {
166
+ }, "register"), unregister: /* @__PURE__ */ __name(() => {
167
+ }, "unregister") } : new FinalizationRegistry(
168
+ (state) => {
169
+ wasm.__wbindgen_export_5.get(state.dtor)(state.a, state.b);
170
+ }
171
+ );
172
+ function makeMutClosure(arg0, arg1, dtor, f) {
173
+ const state = { a: arg0, b: arg1, cnt: 1, dtor };
174
+ const real = /* @__PURE__ */ __name((...args) => {
175
+ state.cnt++;
176
+ const a = state.a;
177
+ state.a = 0;
178
+ try {
179
+ return f(a, state.b, ...args);
180
+ } finally {
181
+ if (--state.cnt === 0) {
182
+ wasm.__wbindgen_export_5.get(state.dtor)(a, state.b);
183
+ CLOSURE_DTORS.unregister(state);
184
+ } else {
185
+ state.a = a;
186
+ }
187
+ }
188
+ }, "real");
189
+ real.original = state;
190
+ CLOSURE_DTORS.register(real, state, state);
191
+ return real;
192
+ }
193
+ __name(makeMutClosure, "makeMutClosure");
194
+ function verifyPresentation(vp, proof_options, context_map) {
195
+ const ptr0 = passStringToWasm0(vp, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
196
+ const len0 = WASM_VECTOR_LEN;
197
+ const ptr1 = passStringToWasm0(proof_options, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
198
+ const len1 = WASM_VECTOR_LEN;
199
+ const ptr2 = passStringToWasm0(context_map, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
200
+ const len2 = WASM_VECTOR_LEN;
201
+ const ret = wasm.verifyPresentation(ptr0, len0, ptr1, len1, ptr2, len2);
202
+ return ret;
203
+ }
204
+ __name(verifyPresentation, "verifyPresentation");
205
+ function contextLoader(url) {
206
+ const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
207
+ const len0 = WASM_VECTOR_LEN;
208
+ const ret = wasm.contextLoader(ptr0, len0);
209
+ return ret;
210
+ }
211
+ __name(contextLoader, "contextLoader");
212
+ function clearCache() {
213
+ const ret = wasm.clearCache();
214
+ return ret;
215
+ }
216
+ __name(clearCache, "clearCache");
217
+ function didResolver(did, input_metadata) {
218
+ const ptr0 = passStringToWasm0(did, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
219
+ const len0 = WASM_VECTOR_LEN;
220
+ const ptr1 = passStringToWasm0(input_metadata, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
221
+ const len1 = WASM_VECTOR_LEN;
222
+ const ret = wasm.didResolver(ptr0, len0, ptr1, len1);
223
+ return ret;
224
+ }
225
+ __name(didResolver, "didResolver");
226
+ function resolveDID(did, input_metadata) {
227
+ const ptr0 = passStringToWasm0(did, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
228
+ const len0 = WASM_VECTOR_LEN;
229
+ const ptr1 = passStringToWasm0(input_metadata, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
230
+ const len1 = WASM_VECTOR_LEN;
231
+ const ret = wasm.resolveDID(ptr0, len0, ptr1, len1);
232
+ return ret;
233
+ }
234
+ __name(resolveDID, "resolveDID");
186
235
  function takeFromExternrefTable0(idx) {
187
236
  const value = wasm.__wbindgen_export_4.get(idx);
188
237
  wasm.__externref_table_dealloc(idx);
@@ -222,52 +271,6 @@ function keyToVerificationMethod(method_pattern, jwk) {
222
271
  return ret;
223
272
  }
224
273
  __name(keyToVerificationMethod, "keyToVerificationMethod");
225
- function passArray8ToWasm0(arg, malloc) {
226
- const ptr = malloc(arg.length * 1, 1) >>> 0;
227
- getUint8ArrayMemory0().set(arg, ptr / 1);
228
- WASM_VECTOR_LEN = arg.length;
229
- return ptr;
230
- }
231
- __name(passArray8ToWasm0, "passArray8ToWasm0");
232
- function generateSecp256k1KeyFromBytes(bytes) {
233
- let deferred3_0;
234
- let deferred3_1;
235
- try {
236
- const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
237
- const len0 = WASM_VECTOR_LEN;
238
- const ret = wasm.generateSecp256k1KeyFromBytes(ptr0, len0);
239
- var ptr2 = ret[0];
240
- var len2 = ret[1];
241
- if (ret[3]) {
242
- ptr2 = 0;
243
- len2 = 0;
244
- throw takeFromExternrefTable0(ret[2]);
245
- }
246
- deferred3_0 = ptr2;
247
- deferred3_1 = len2;
248
- return getStringFromWasm0(ptr2, len2);
249
- } finally {
250
- wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
251
- }
252
- }
253
- __name(generateSecp256k1KeyFromBytes, "generateSecp256k1KeyFromBytes");
254
- function passArrayJsValueToWasm0(array, malloc) {
255
- const ptr = malloc(array.length * 4, 4) >>> 0;
256
- for (let i = 0; i < array.length; i++) {
257
- const add = addToExternrefTable0(array[i]);
258
- getDataViewMemory0().setUint32(ptr + 4 * i, add, true);
259
- }
260
- WASM_VECTOR_LEN = array.length;
261
- return ptr;
262
- }
263
- __name(passArrayJsValueToWasm0, "passArrayJsValueToWasm0");
264
- function createDagJwe(cleartext, recipients) {
265
- const ptr0 = passArrayJsValueToWasm0(recipients, wasm.__wbindgen_malloc);
266
- const len0 = WASM_VECTOR_LEN;
267
- const ret = wasm.createDagJwe(cleartext, ptr0, len0);
268
- return ret;
269
- }
270
- __name(createDagJwe, "createDagJwe");
271
274
  function didToVerificationMethod(did) {
272
275
  const ptr0 = passStringToWasm0(did, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
273
276
  const len0 = WASM_VECTOR_LEN;
@@ -275,17 +278,6 @@ function didToVerificationMethod(did) {
275
278
  return ret;
276
279
  }
277
280
  __name(didToVerificationMethod, "didToVerificationMethod");
278
- function verifyPresentation(vp, proof_options, context_map) {
279
- const ptr0 = passStringToWasm0(vp, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
280
- const len0 = WASM_VECTOR_LEN;
281
- const ptr1 = passStringToWasm0(proof_options, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
282
- const len1 = WASM_VECTOR_LEN;
283
- const ptr2 = passStringToWasm0(context_map, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
284
- const len2 = WASM_VECTOR_LEN;
285
- const ret = wasm.verifyPresentation(ptr0, len0, ptr1, len1, ptr2, len2);
286
- return ret;
287
- }
288
- __name(verifyPresentation, "verifyPresentation");
289
281
  function issueCredential(credential, proof_options, key, context_map) {
290
282
  const ptr0 = passStringToWasm0(credential, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
291
283
  const len0 = WASM_VECTOR_LEN;
@@ -299,33 +291,17 @@ function issueCredential(credential, proof_options, key, context_map) {
299
291
  return ret;
300
292
  }
301
293
  __name(issueCredential, "issueCredential");
302
- function didResolver(did, input_metadata) {
303
- const ptr0 = passStringToWasm0(did, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
304
- const len0 = WASM_VECTOR_LEN;
305
- const ptr1 = passStringToWasm0(input_metadata, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
306
- const len1 = WASM_VECTOR_LEN;
307
- const ret = wasm.didResolver(ptr0, len0, ptr1, len1);
308
- return ret;
309
- }
310
- __name(didResolver, "didResolver");
311
- function createJwe(cleartext, recipients) {
312
- const ptr0 = passStringToWasm0(cleartext, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
313
- const len0 = WASM_VECTOR_LEN;
314
- const ptr1 = passArrayJsValueToWasm0(recipients, wasm.__wbindgen_malloc);
315
- const len1 = WASM_VECTOR_LEN;
316
- const ret = wasm.createJwe(ptr0, len0, ptr1, len1);
317
- return ret;
318
- }
319
- __name(createJwe, "createJwe");
320
- function decryptJwe(jwe, jwks) {
321
- const ptr0 = passStringToWasm0(jwe, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
294
+ function verifyCredential(vc, proof_options, context_map) {
295
+ const ptr0 = passStringToWasm0(vc, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
322
296
  const len0 = WASM_VECTOR_LEN;
323
- const ptr1 = passArrayJsValueToWasm0(jwks, wasm.__wbindgen_malloc);
297
+ const ptr1 = passStringToWasm0(proof_options, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
324
298
  const len1 = WASM_VECTOR_LEN;
325
- const ret = wasm.decryptJwe(ptr0, len0, ptr1, len1);
299
+ const ptr2 = passStringToWasm0(context_map, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
300
+ const len2 = WASM_VECTOR_LEN;
301
+ const ret = wasm.verifyCredential(ptr0, len0, ptr1, len1, ptr2, len2);
326
302
  return ret;
327
303
  }
328
- __name(decryptJwe, "decryptJwe");
304
+ __name(verifyCredential, "verifyCredential");
329
305
  function issuePresentation(presentation, proof_options, key, context_map) {
330
306
  const ptr0 = passStringToWasm0(presentation, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
331
307
  const len0 = WASM_VECTOR_LEN;
@@ -339,38 +315,13 @@ function issuePresentation(presentation, proof_options, key, context_map) {
339
315
  return ret;
340
316
  }
341
317
  __name(issuePresentation, "issuePresentation");
342
- function clearCache() {
343
- const ret = wasm.clearCache();
344
- return ret;
345
- }
346
- __name(clearCache, "clearCache");
347
- function verifyCredential(vc, proof_options, context_map) {
348
- const ptr0 = passStringToWasm0(vc, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
349
- const len0 = WASM_VECTOR_LEN;
350
- const ptr1 = passStringToWasm0(proof_options, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
351
- const len1 = WASM_VECTOR_LEN;
352
- const ptr2 = passStringToWasm0(context_map, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
353
- const len2 = WASM_VECTOR_LEN;
354
- const ret = wasm.verifyCredential(ptr0, len0, ptr1, len1, ptr2, len2);
355
- return ret;
356
- }
357
- __name(verifyCredential, "verifyCredential");
358
- function resolveDID(did, input_metadata) {
359
- const ptr0 = passStringToWasm0(did, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
360
- const len0 = WASM_VECTOR_LEN;
361
- const ptr1 = passStringToWasm0(input_metadata, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
362
- const len1 = WASM_VECTOR_LEN;
363
- const ret = wasm.resolveDID(ptr0, len0, ptr1, len1);
364
- return ret;
365
- }
366
- __name(resolveDID, "resolveDID");
367
- function contextLoader(url) {
368
- const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
369
- const len0 = WASM_VECTOR_LEN;
370
- const ret = wasm.contextLoader(ptr0, len0);
371
- return ret;
318
+ function passArray8ToWasm0(arg, malloc) {
319
+ const ptr = malloc(arg.length * 1, 1) >>> 0;
320
+ getUint8ArrayMemory0().set(arg, ptr / 1);
321
+ WASM_VECTOR_LEN = arg.length;
322
+ return ptr;
372
323
  }
373
- __name(contextLoader, "contextLoader");
324
+ __name(passArray8ToWasm0, "passArray8ToWasm0");
374
325
  function generateEd25519KeyFromBytes(bytes) {
375
326
  let deferred3_0;
376
327
  let deferred3_1;
@@ -393,6 +344,63 @@ function generateEd25519KeyFromBytes(bytes) {
393
344
  }
394
345
  }
395
346
  __name(generateEd25519KeyFromBytes, "generateEd25519KeyFromBytes");
347
+ function generateSecp256k1KeyFromBytes(bytes) {
348
+ let deferred3_0;
349
+ let deferred3_1;
350
+ try {
351
+ const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
352
+ const len0 = WASM_VECTOR_LEN;
353
+ const ret = wasm.generateSecp256k1KeyFromBytes(ptr0, len0);
354
+ var ptr2 = ret[0];
355
+ var len2 = ret[1];
356
+ if (ret[3]) {
357
+ ptr2 = 0;
358
+ len2 = 0;
359
+ throw takeFromExternrefTable0(ret[2]);
360
+ }
361
+ deferred3_0 = ptr2;
362
+ deferred3_1 = len2;
363
+ return getStringFromWasm0(ptr2, len2);
364
+ } finally {
365
+ wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
366
+ }
367
+ }
368
+ __name(generateSecp256k1KeyFromBytes, "generateSecp256k1KeyFromBytes");
369
+ function passArrayJsValueToWasm0(array, malloc) {
370
+ const ptr = malloc(array.length * 4, 4) >>> 0;
371
+ for (let i = 0; i < array.length; i++) {
372
+ const add = addToExternrefTable0(array[i]);
373
+ getDataViewMemory0().setUint32(ptr + 4 * i, add, true);
374
+ }
375
+ WASM_VECTOR_LEN = array.length;
376
+ return ptr;
377
+ }
378
+ __name(passArrayJsValueToWasm0, "passArrayJsValueToWasm0");
379
+ function createJwe(cleartext, recipients) {
380
+ const ptr0 = passStringToWasm0(cleartext, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
381
+ const len0 = WASM_VECTOR_LEN;
382
+ const ptr1 = passArrayJsValueToWasm0(recipients, wasm.__wbindgen_malloc);
383
+ const len1 = WASM_VECTOR_LEN;
384
+ const ret = wasm.createJwe(ptr0, len0, ptr1, len1);
385
+ return ret;
386
+ }
387
+ __name(createJwe, "createJwe");
388
+ function decryptJwe(jwe, jwks) {
389
+ const ptr0 = passStringToWasm0(jwe, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
390
+ const len0 = WASM_VECTOR_LEN;
391
+ const ptr1 = passArrayJsValueToWasm0(jwks, wasm.__wbindgen_malloc);
392
+ const len1 = WASM_VECTOR_LEN;
393
+ const ret = wasm.decryptJwe(ptr0, len0, ptr1, len1);
394
+ return ret;
395
+ }
396
+ __name(decryptJwe, "decryptJwe");
397
+ function createDagJwe(cleartext, recipients) {
398
+ const ptr0 = passArrayJsValueToWasm0(recipients, wasm.__wbindgen_malloc);
399
+ const len0 = WASM_VECTOR_LEN;
400
+ const ret = wasm.createDagJwe(cleartext, ptr0, len0);
401
+ return ret;
402
+ }
403
+ __name(createDagJwe, "createDagJwe");
396
404
  function decryptDagJwe(jwe, jwks) {
397
405
  const ptr0 = passStringToWasm0(jwe, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
398
406
  const len0 = WASM_VECTOR_LEN;
@@ -402,23 +410,25 @@ function decryptDagJwe(jwe, jwks) {
402
410
  return ret;
403
411
  }
404
412
  __name(decryptDagJwe, "decryptDagJwe");
405
- function __wbg_adapter_54(arg0, arg1, arg2) {
406
- wasm.closure4149_externref_shim(arg0, arg1, arg2);
413
+ function __wbg_adapter_10(arg0, arg1, arg2) {
414
+ wasm.closure4206_externref_shim(arg0, arg1, arg2);
407
415
  }
408
- __name(__wbg_adapter_54, "__wbg_adapter_54");
409
- function __wbg_adapter_172(arg0, arg1, arg2, arg3) {
410
- wasm.closure4546_externref_shim(arg0, arg1, arg2, arg3);
416
+ __name(__wbg_adapter_10, "__wbg_adapter_10");
417
+ function __wbg_adapter_170(arg0, arg1, arg2, arg3) {
418
+ wasm.closure4605_externref_shim(arg0, arg1, arg2, arg3);
411
419
  }
412
- __name(__wbg_adapter_172, "__wbg_adapter_172");
420
+ __name(__wbg_adapter_170, "__wbg_adapter_170");
413
421
  var __wbindgen_enum_RequestCredentials = ["omit", "same-origin", "include"];
414
422
  var __wbindgen_enum_RequestMode = ["same-origin", "no-cors", "cors", "navigate"];
423
+ var EXPECTED_RESPONSE_TYPES = /* @__PURE__ */ new Set(["basic", "cors", "default"]);
415
424
  async function __wbg_load(module2, imports) {
416
425
  if (typeof Response === "function" && module2 instanceof Response) {
417
426
  if (typeof WebAssembly.instantiateStreaming === "function") {
418
427
  try {
419
428
  return await WebAssembly.instantiateStreaming(module2, imports);
420
429
  } catch (e) {
421
- if (module2.headers.get("Content-Type") != "application/wasm") {
430
+ const validResponse = module2.ok && EXPECTED_RESPONSE_TYPES.has(module2.type);
431
+ if (validResponse && module2.headers.get("Content-Type") !== "application/wasm") {
422
432
  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
433
  } else {
424
434
  throw e;
@@ -440,6 +450,10 @@ __name(__wbg_load, "__wbg_load");
440
450
  function __wbg_get_imports() {
441
451
  const imports = {};
442
452
  imports.wbg = {};
453
+ imports.wbg.__wbg_Error_e17e777aac105295 = function(arg0, arg1) {
454
+ const ret = Error(getStringFromWasm0(arg0, arg1));
455
+ return ret;
456
+ };
443
457
  imports.wbg.__wbg_String_8f0eb39a4a4c2f66 = function(arg0, arg1) {
444
458
  const ret = String(arg1);
445
459
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
@@ -447,31 +461,27 @@ function __wbg_get_imports() {
447
461
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
448
462
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
449
463
  };
450
- imports.wbg.__wbg_abort_775ef1d17fc65868 = function(arg0) {
464
+ imports.wbg.__wbg_abort_67e1b49bf6614565 = function(arg0) {
451
465
  arg0.abort();
452
466
  };
453
- imports.wbg.__wbg_append_8c7dd8d641a5f01b = function() {
467
+ imports.wbg.__wbg_append_72a3c0addd2bce38 = function() {
454
468
  return handleError(function(arg0, arg1, arg2, arg3, arg4) {
455
469
  arg0.append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
456
470
  }, arguments);
457
471
  };
458
- imports.wbg.__wbg_arrayBuffer_d1b44c4390db422f = function() {
472
+ imports.wbg.__wbg_arrayBuffer_9c99b8e2809e8cbb = function() {
459
473
  return handleError(function(arg0) {
460
474
  const ret = arg0.arrayBuffer();
461
475
  return ret;
462
476
  }, arguments);
463
477
  };
464
- imports.wbg.__wbg_buffer_609cc3eee51ed158 = function(arg0) {
465
- const ret = arg0.buffer;
466
- return ret;
467
- };
468
- imports.wbg.__wbg_call_672a4d21634d4a24 = function() {
478
+ imports.wbg.__wbg_call_13410aac570ffff7 = function() {
469
479
  return handleError(function(arg0, arg1) {
470
480
  const ret = arg0.call(arg1);
471
481
  return ret;
472
482
  }, arguments);
473
483
  };
474
- imports.wbg.__wbg_call_7cccdd69e0791ae2 = function() {
484
+ imports.wbg.__wbg_call_a5400b25a865cfd8 = function() {
475
485
  return handleError(function(arg0, arg1, arg2) {
476
486
  const ret = arg0.call(arg1, arg2);
477
487
  return ret;
@@ -485,15 +495,15 @@ function __wbg_get_imports() {
485
495
  const ret = arg0.crypto;
486
496
  return ret;
487
497
  };
488
- imports.wbg.__wbg_done_769e5ede4b31c67b = function(arg0) {
498
+ imports.wbg.__wbg_done_75ed0ee6dd243d9d = function(arg0) {
489
499
  const ret = arg0.done;
490
500
  return ret;
491
501
  };
492
- imports.wbg.__wbg_entries_3265d4158b33e5dc = function(arg0) {
502
+ imports.wbg.__wbg_entries_2be2f15bd5554996 = function(arg0) {
493
503
  const ret = Object.entries(arg0);
494
504
  return ret;
495
505
  };
496
- imports.wbg.__wbg_fetch_509096533071c657 = function(arg0, arg1) {
506
+ imports.wbg.__wbg_fetch_87aed7f306ec6d63 = function(arg0, arg1) {
497
507
  const ret = arg0.fetch(arg1);
498
508
  return ret;
499
509
  };
@@ -501,18 +511,18 @@ function __wbg_get_imports() {
501
511
  const ret = fetch(arg0);
502
512
  return ret;
503
513
  };
504
- imports.wbg.__wbg_from_2a5d3e218e67aa85 = function(arg0) {
514
+ imports.wbg.__wbg_from_88bc52ce20ba6318 = function(arg0) {
505
515
  const ret = Array.from(arg0);
506
516
  return ret;
507
517
  };
508
- imports.wbg.__wbg_getRandomValues_371e7ade8bd92088 = function(arg0, arg1) {
509
- arg0.getRandomValues(arg1);
510
- };
511
- imports.wbg.__wbg_getRandomValues_3c9c0d586e575a16 = function() {
518
+ imports.wbg.__wbg_getRandomValues_1c61fac11405ffdc = function() {
512
519
  return handleError(function(arg0, arg1) {
513
520
  globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
514
521
  }, arguments);
515
522
  };
523
+ imports.wbg.__wbg_getRandomValues_371e7ade8bd92088 = function(arg0, arg1) {
524
+ arg0.getRandomValues(arg1);
525
+ };
516
526
  imports.wbg.__wbg_getRandomValues_7dfe5bd1b67c9ca1 = function(arg0) {
517
527
  const ret = arg0.getRandomValues;
518
528
  return ret;
@@ -522,31 +532,31 @@ function __wbg_get_imports() {
522
532
  arg0.getRandomValues(arg1);
523
533
  }, arguments);
524
534
  };
525
- imports.wbg.__wbg_getTime_46267b1c24877e30 = function(arg0) {
535
+ imports.wbg.__wbg_getTime_6bb3f64e0f18f817 = function(arg0) {
526
536
  const ret = arg0.getTime();
527
537
  return ret;
528
538
  };
529
- imports.wbg.__wbg_get_67b2ba62fc30de12 = function() {
539
+ imports.wbg.__wbg_get_0da715ceaecea5c8 = function(arg0, arg1) {
540
+ const ret = arg0[arg1 >>> 0];
541
+ return ret;
542
+ };
543
+ imports.wbg.__wbg_get_458e874b43b18b25 = function() {
530
544
  return handleError(function(arg0, arg1) {
531
545
  const ret = Reflect.get(arg0, arg1);
532
546
  return ret;
533
547
  }, arguments);
534
548
  };
535
- imports.wbg.__wbg_get_b9b93047fe3cf45b = function(arg0, arg1) {
536
- const ret = arg0[arg1 >>> 0];
537
- return ret;
538
- };
539
- imports.wbg.__wbg_has_a5ea9117f258a0ec = function() {
549
+ imports.wbg.__wbg_has_b89e451f638123e3 = function() {
540
550
  return handleError(function(arg0, arg1) {
541
551
  const ret = Reflect.has(arg0, arg1);
542
552
  return ret;
543
553
  }, arguments);
544
554
  };
545
- imports.wbg.__wbg_headers_9cb51cfd2ac780a4 = function(arg0) {
555
+ imports.wbg.__wbg_headers_29fec3c72865cd75 = function(arg0) {
546
556
  const ret = arg0.headers;
547
557
  return ret;
548
558
  };
549
- imports.wbg.__wbg_instanceof_ArrayBuffer_e14585432e3737fc = function(arg0) {
559
+ imports.wbg.__wbg_instanceof_ArrayBuffer_67f3012529f6a2dd = function(arg0) {
550
560
  let result;
551
561
  try {
552
562
  result = arg0 instanceof ArrayBuffer;
@@ -556,7 +566,7 @@ function __wbg_get_imports() {
556
566
  const ret = result;
557
567
  return ret;
558
568
  };
559
- imports.wbg.__wbg_instanceof_Map_f3469ce2244d2430 = function(arg0) {
569
+ imports.wbg.__wbg_instanceof_Map_ebb01a5b6b5ffd0b = function(arg0) {
560
570
  let result;
561
571
  try {
562
572
  result = arg0 instanceof Map;
@@ -566,7 +576,7 @@ function __wbg_get_imports() {
566
576
  const ret = result;
567
577
  return ret;
568
578
  };
569
- imports.wbg.__wbg_instanceof_Response_f2cc20d9f7dfd644 = function(arg0) {
579
+ imports.wbg.__wbg_instanceof_Response_50fde2cd696850bf = function(arg0) {
570
580
  let result;
571
581
  try {
572
582
  result = arg0 instanceof Response;
@@ -576,7 +586,7 @@ function __wbg_get_imports() {
576
586
  const ret = result;
577
587
  return ret;
578
588
  };
579
- imports.wbg.__wbg_instanceof_Uint8Array_17156bcf118086a9 = function(arg0) {
589
+ imports.wbg.__wbg_instanceof_Uint8Array_9a8378d955933db7 = function(arg0) {
580
590
  let result;
581
591
  try {
582
592
  result = arg0 instanceof Uint8Array;
@@ -586,27 +596,27 @@ function __wbg_get_imports() {
586
596
  const ret = result;
587
597
  return ret;
588
598
  };
589
- imports.wbg.__wbg_isArray_a1eab7e0d067391b = function(arg0) {
599
+ imports.wbg.__wbg_isArray_030cce220591fb41 = function(arg0) {
590
600
  const ret = Array.isArray(arg0);
591
601
  return ret;
592
602
  };
593
- imports.wbg.__wbg_isSafeInteger_343e2beeeece1bb0 = function(arg0) {
603
+ imports.wbg.__wbg_isSafeInteger_1c0d1af5542e102a = function(arg0) {
594
604
  const ret = Number.isSafeInteger(arg0);
595
605
  return ret;
596
606
  };
597
- imports.wbg.__wbg_iterator_9a24c88df860dc65 = function() {
607
+ imports.wbg.__wbg_iterator_f370b34483c71a1c = function() {
598
608
  const ret = Symbol.iterator;
599
609
  return ret;
600
610
  };
601
- imports.wbg.__wbg_keys_5c77a08ddc2fb8a6 = function(arg0) {
611
+ imports.wbg.__wbg_keys_ef52390b2ae0e714 = function(arg0) {
602
612
  const ret = Object.keys(arg0);
603
613
  return ret;
604
614
  };
605
- imports.wbg.__wbg_length_a446193dc22c12f8 = function(arg0) {
615
+ imports.wbg.__wbg_length_186546c51cd61acd = function(arg0) {
606
616
  const ret = arg0.length;
607
617
  return ret;
608
618
  };
609
- imports.wbg.__wbg_length_e2d2a49132c1b256 = function(arg0) {
619
+ imports.wbg.__wbg_length_6bb7e81f9d7713e4 = function(arg0) {
610
620
  const ret = arg0.length;
611
621
  return ret;
612
622
  };
@@ -618,24 +628,26 @@ function __wbg_get_imports() {
618
628
  const ret = arg0.msCrypto;
619
629
  return ret;
620
630
  };
621
- imports.wbg.__wbg_new0_f788a2397c7ca929 = function() {
631
+ imports.wbg.__wbg_new0_b0a0a38c201e6df5 = function() {
622
632
  const ret = /* @__PURE__ */ new Date();
623
633
  return ret;
624
634
  };
625
- imports.wbg.__wbg_new_018dcc2d6c8c2f6a = function() {
626
- return handleError(function() {
627
- const ret = new Headers();
628
- return ret;
629
- }, arguments);
635
+ imports.wbg.__wbg_new_19c25a3f2fa63a02 = function() {
636
+ const ret = new Object();
637
+ return ret;
630
638
  };
631
- imports.wbg.__wbg_new_23a2665fac83c611 = function(arg0, arg1) {
639
+ imports.wbg.__wbg_new_1f3a344cf3123716 = function() {
640
+ const ret = new Array();
641
+ return ret;
642
+ };
643
+ imports.wbg.__wbg_new_2e3c58a15f39f5f9 = function(arg0, arg1) {
632
644
  try {
633
645
  var state0 = { a: arg0, b: arg1 };
634
646
  var cb0 = /* @__PURE__ */ __name((arg02, arg12) => {
635
647
  const a = state0.a;
636
648
  state0.a = 0;
637
649
  try {
638
- return __wbg_adapter_172(a, state0.b, arg02, arg12);
650
+ return __wbg_adapter_170(a, state0.b, arg02, arg12);
639
651
  } finally {
640
652
  state0.a = a;
641
653
  }
@@ -646,51 +658,49 @@ function __wbg_get_imports() {
646
658
  state0.a = state0.b = 0;
647
659
  }
648
660
  };
649
- imports.wbg.__wbg_new_405e22f390576ce2 = function() {
650
- const ret = new Object();
651
- return ret;
652
- };
653
- imports.wbg.__wbg_new_5e0be73521bc8c17 = function() {
661
+ imports.wbg.__wbg_new_2ff1f68f3676ea53 = function() {
654
662
  const ret = /* @__PURE__ */ new Map();
655
663
  return ret;
656
664
  };
657
- imports.wbg.__wbg_new_78feb108b6472713 = function() {
658
- const ret = new Array();
659
- return ret;
660
- };
661
- imports.wbg.__wbg_new_a12002a7f91c75be = function(arg0) {
665
+ imports.wbg.__wbg_new_638ebfaedbf32a5e = function(arg0) {
662
666
  const ret = new Uint8Array(arg0);
663
667
  return ret;
664
668
  };
665
- imports.wbg.__wbg_new_e25e5aab09ff45db = function() {
669
+ imports.wbg.__wbg_new_66b9434b4e59b63e = function() {
666
670
  return handleError(function() {
667
671
  const ret = new AbortController();
668
672
  return ret;
669
673
  }, arguments);
670
674
  };
671
- imports.wbg.__wbg_newnoargs_105ed471475aaf50 = function(arg0, arg1) {
672
- const ret = new Function(getStringFromWasm0(arg0, arg1));
675
+ imports.wbg.__wbg_new_f6e53210afea8e45 = function() {
676
+ return handleError(function() {
677
+ const ret = new Headers();
678
+ return ret;
679
+ }, arguments);
680
+ };
681
+ imports.wbg.__wbg_newfromslice_074c56947bd43469 = function(arg0, arg1) {
682
+ const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
673
683
  return ret;
674
684
  };
675
- imports.wbg.__wbg_newwithbyteoffsetandlength_d97e637ebe145a9a = function(arg0, arg1, arg2) {
676
- const ret = new Uint8Array(arg0, arg1 >>> 0, arg2 >>> 0);
685
+ imports.wbg.__wbg_newnoargs_254190557c45b4ec = function(arg0, arg1) {
686
+ const ret = new Function(getStringFromWasm0(arg0, arg1));
677
687
  return ret;
678
688
  };
679
- imports.wbg.__wbg_newwithlength_a381634e90c276d4 = function(arg0) {
689
+ imports.wbg.__wbg_newwithlength_a167dcc7aaa3ba77 = function(arg0) {
680
690
  const ret = new Uint8Array(arg0 >>> 0);
681
691
  return ret;
682
692
  };
683
- imports.wbg.__wbg_newwithstrandinit_06c535e0a867c635 = function() {
693
+ imports.wbg.__wbg_newwithstrandinit_b5d168a29a3fd85f = function() {
684
694
  return handleError(function(arg0, arg1, arg2) {
685
695
  const ret = new Request(getStringFromWasm0(arg0, arg1), arg2);
686
696
  return ret;
687
697
  }, arguments);
688
698
  };
689
- imports.wbg.__wbg_next_25feadfc0913fea9 = function(arg0) {
699
+ imports.wbg.__wbg_next_5b3530e612fde77d = function(arg0) {
690
700
  const ret = arg0.next;
691
701
  return ret;
692
702
  };
693
- imports.wbg.__wbg_next_6574e1a8a62d1055 = function() {
703
+ imports.wbg.__wbg_next_692e82279131b03c = function() {
694
704
  return handleError(function(arg0) {
695
705
  const ret = arg0.next();
696
706
  return ret;
@@ -700,7 +710,7 @@ function __wbg_get_imports() {
700
710
  const ret = arg0.node;
701
711
  return ret;
702
712
  };
703
- imports.wbg.__wbg_now_d18023d54d4e5500 = function(arg0) {
713
+ imports.wbg.__wbg_now_886b39d7ec380719 = function(arg0) {
704
714
  const ret = arg0.now();
705
715
  return ret;
706
716
  };
@@ -708,14 +718,17 @@ function __wbg_get_imports() {
708
718
  const ret = arg0.process;
709
719
  return ret;
710
720
  };
711
- imports.wbg.__wbg_push_737cfc8c1432c2c6 = function(arg0, arg1) {
721
+ imports.wbg.__wbg_prototypesetcall_3d4a26c1ed734349 = function(arg0, arg1, arg2) {
722
+ Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
723
+ };
724
+ imports.wbg.__wbg_push_330b2eb93e4e1212 = function(arg0, arg1) {
712
725
  const ret = arg0.push(arg1);
713
726
  return ret;
714
727
  };
715
- imports.wbg.__wbg_queueMicrotask_97d92b4fcc8a61c5 = function(arg0) {
728
+ imports.wbg.__wbg_queueMicrotask_25d0739ac89e8c88 = function(arg0) {
716
729
  queueMicrotask(arg0);
717
730
  };
718
- imports.wbg.__wbg_queueMicrotask_d3219def82552485 = function(arg0) {
731
+ imports.wbg.__wbg_queueMicrotask_4488407636f5bf24 = function(arg0) {
719
732
  const ret = arg0.queueMicrotask;
720
733
  return ret;
721
734
  };
@@ -737,7 +750,7 @@ function __wbg_get_imports() {
737
750
  return ret;
738
751
  }, arguments);
739
752
  };
740
- imports.wbg.__wbg_resolve_4851785c9c5f573d = function(arg0) {
753
+ imports.wbg.__wbg_resolve_4055c623acdd6a1b = function(arg0) {
741
754
  const ret = Promise.resolve(arg0);
742
755
  return ret;
743
756
  };
@@ -747,52 +760,52 @@ function __wbg_get_imports() {
747
760
  return ret;
748
761
  }, arguments);
749
762
  };
750
- imports.wbg.__wbg_set_37837023f3d740e8 = function(arg0, arg1, arg2) {
751
- arg0[arg1 >>> 0] = arg2;
763
+ imports.wbg.__wbg_set_1353b2a5e96bc48c = function(arg0, arg1, arg2) {
764
+ arg0.set(getArrayU8FromWasm0(arg1, arg2));
752
765
  };
753
766
  imports.wbg.__wbg_set_3f1d0b984ed272ed = function(arg0, arg1, arg2) {
754
767
  arg0[arg1] = arg2;
755
768
  };
756
- imports.wbg.__wbg_set_65595bdd868b3009 = function(arg0, arg1, arg2) {
757
- arg0.set(arg1, arg2 >>> 0);
758
- };
759
- imports.wbg.__wbg_set_8fc6bf8a5b1071d1 = function(arg0, arg1, arg2) {
760
- const ret = arg0.set(arg1, arg2);
761
- return ret;
762
- };
763
- imports.wbg.__wbg_set_bb8cecf6a62b9f46 = function() {
769
+ imports.wbg.__wbg_set_453345bcda80b89a = function() {
764
770
  return handleError(function(arg0, arg1, arg2) {
765
771
  const ret = Reflect.set(arg0, arg1, arg2);
766
772
  return ret;
767
773
  }, arguments);
768
774
  };
769
- imports.wbg.__wbg_setbody_5923b78a95eedf29 = function(arg0, arg1) {
775
+ imports.wbg.__wbg_set_90f6c0f7bd8c0415 = function(arg0, arg1, arg2) {
776
+ arg0[arg1 >>> 0] = arg2;
777
+ };
778
+ imports.wbg.__wbg_set_b7f1cf4fae26fe2a = function(arg0, arg1, arg2) {
779
+ const ret = arg0.set(arg1, arg2);
780
+ return ret;
781
+ };
782
+ imports.wbg.__wbg_setbody_c8460bdf44147df8 = function(arg0, arg1) {
770
783
  arg0.body = arg1;
771
784
  };
772
- imports.wbg.__wbg_setcredentials_c3a22f1cd105a2c6 = function(arg0, arg1) {
785
+ imports.wbg.__wbg_setcredentials_9cd60d632c9d5dfc = function(arg0, arg1) {
773
786
  arg0.credentials = __wbindgen_enum_RequestCredentials[arg1];
774
787
  };
775
- imports.wbg.__wbg_setheaders_834c0bdb6a8949ad = function(arg0, arg1) {
788
+ imports.wbg.__wbg_setheaders_0052283e2f3503d1 = function(arg0, arg1) {
776
789
  arg0.headers = arg1;
777
790
  };
778
- imports.wbg.__wbg_setmethod_3c5280fe5d890842 = function(arg0, arg1, arg2) {
791
+ imports.wbg.__wbg_setmethod_9b504d5b855b329c = function(arg0, arg1, arg2) {
779
792
  arg0.method = getStringFromWasm0(arg1, arg2);
780
793
  };
781
- imports.wbg.__wbg_setmode_5dc300b865044b65 = function(arg0, arg1) {
794
+ imports.wbg.__wbg_setmode_a23e1a2ad8b512f8 = function(arg0, arg1) {
782
795
  arg0.mode = __wbindgen_enum_RequestMode[arg1];
783
796
  };
784
- imports.wbg.__wbg_setsignal_75b21ef3a81de905 = function(arg0, arg1) {
797
+ imports.wbg.__wbg_setsignal_8c45ad1247a74809 = function(arg0, arg1) {
785
798
  arg0.signal = arg1;
786
799
  };
787
- imports.wbg.__wbg_signal_aaf9ad74119f20a4 = function(arg0) {
800
+ imports.wbg.__wbg_signal_da4d466ce86118b5 = function(arg0) {
788
801
  const ret = arg0.signal;
789
802
  return ret;
790
803
  };
791
- imports.wbg.__wbg_static_accessor_GLOBAL_88a902d13a557d07 = function() {
804
+ imports.wbg.__wbg_static_accessor_GLOBAL_8921f820c2ce3f12 = function() {
792
805
  const ret = typeof global === "undefined" ? null : global;
793
806
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
794
807
  };
795
- imports.wbg.__wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0 = function() {
808
+ imports.wbg.__wbg_static_accessor_GLOBAL_THIS_f0a4409105898184 = function() {
796
809
  const ret = typeof globalThis === "undefined" ? null : globalThis;
797
810
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
798
811
  };
@@ -800,44 +813,44 @@ function __wbg_get_imports() {
800
813
  const ret = module;
801
814
  return ret;
802
815
  };
803
- imports.wbg.__wbg_static_accessor_SELF_37c5d418e4bf5819 = function() {
816
+ imports.wbg.__wbg_static_accessor_SELF_995b214ae681ff99 = function() {
804
817
  const ret = typeof self === "undefined" ? null : self;
805
818
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
806
819
  };
807
- imports.wbg.__wbg_static_accessor_WINDOW_5de37043a91a9c40 = function() {
820
+ imports.wbg.__wbg_static_accessor_WINDOW_cde3890479c675ea = function() {
808
821
  const ret = typeof window === "undefined" ? null : window;
809
822
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
810
823
  };
811
- imports.wbg.__wbg_status_f6360336ca686bf0 = function(arg0) {
824
+ imports.wbg.__wbg_status_3fea3036088621d6 = function(arg0) {
812
825
  const ret = arg0.status;
813
826
  return ret;
814
827
  };
815
- imports.wbg.__wbg_stringify_f7ed6987935b4a24 = function() {
828
+ imports.wbg.__wbg_stringify_b98c93d0a190446a = function() {
816
829
  return handleError(function(arg0) {
817
830
  const ret = JSON.stringify(arg0);
818
831
  return ret;
819
832
  }, arguments);
820
833
  };
821
- imports.wbg.__wbg_subarray_aa9065fa9dc5df96 = function(arg0, arg1, arg2) {
834
+ imports.wbg.__wbg_subarray_70fd07feefe14294 = function(arg0, arg1, arg2) {
822
835
  const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
823
836
  return ret;
824
837
  };
825
- imports.wbg.__wbg_then_44b73946d2fb3e7d = function(arg0, arg1) {
826
- const ret = arg0.then(arg1);
838
+ imports.wbg.__wbg_then_b33a773d723afa3e = function(arg0, arg1, arg2) {
839
+ const ret = arg0.then(arg1, arg2);
827
840
  return ret;
828
841
  };
829
- imports.wbg.__wbg_then_48b406749878a531 = function(arg0, arg1, arg2) {
830
- const ret = arg0.then(arg1, arg2);
842
+ imports.wbg.__wbg_then_e22500defe16819f = function(arg0, arg1) {
843
+ const ret = arg0.then(arg1);
831
844
  return ret;
832
845
  };
833
- imports.wbg.__wbg_url_ae10c34ca209681d = function(arg0, arg1) {
846
+ imports.wbg.__wbg_url_e5720dfacf77b05e = function(arg0, arg1) {
834
847
  const ret = arg1.url;
835
848
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
836
849
  const len1 = WASM_VECTOR_LEN;
837
850
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
838
851
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
839
852
  };
840
- imports.wbg.__wbg_value_cd1ffa7b1ab794f1 = function(arg0) {
853
+ imports.wbg.__wbg_value_dd9372230531eade = function(arg0) {
841
854
  const ret = arg0.value;
842
855
  return ret;
843
856
  };
@@ -845,30 +858,18 @@ function __wbg_get_imports() {
845
858
  const ret = arg0.versions;
846
859
  return ret;
847
860
  };
848
- imports.wbg.__wbindgen_bigint_from_i128 = function(arg0, arg1) {
849
- const ret = arg0 << BigInt(64) | BigInt.asUintN(64, arg1);
850
- return ret;
851
- };
852
- imports.wbg.__wbindgen_bigint_from_i64 = function(arg0) {
853
- const ret = arg0;
854
- return ret;
855
- };
856
- imports.wbg.__wbindgen_bigint_from_u64 = function(arg0) {
857
- const ret = BigInt.asUintN(64, arg0);
858
- return ret;
859
- };
860
- imports.wbg.__wbindgen_bigint_get_as_i64 = function(arg0, arg1) {
861
+ imports.wbg.__wbg_wbindgenbigintgetasi64_ac743ece6ab9bba1 = function(arg0, arg1) {
861
862
  const v = arg1;
862
863
  const ret = typeof v === "bigint" ? v : void 0;
863
864
  getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
864
865
  getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
865
866
  };
866
- imports.wbg.__wbindgen_boolean_get = function(arg0) {
867
+ imports.wbg.__wbg_wbindgenbooleanget_3fe6f642c7d97746 = function(arg0) {
867
868
  const v = arg0;
868
- const ret = typeof v === "boolean" ? v ? 1 : 0 : 2;
869
- return ret;
869
+ const ret = typeof v === "boolean" ? v : void 0;
870
+ return isLikeNone(ret) ? 16777215 : ret ? 1 : 0;
870
871
  };
871
- imports.wbg.__wbindgen_cb_drop = function(arg0) {
872
+ imports.wbg.__wbg_wbindgencbdrop_eb10308566512b88 = function(arg0) {
872
873
  const obj = arg0.original;
873
874
  if (obj.cnt-- == 1) {
874
875
  obj.a = 0;
@@ -877,83 +878,57 @@ function __wbg_get_imports() {
877
878
  const ret = false;
878
879
  return ret;
879
880
  };
880
- imports.wbg.__wbindgen_closure_wrapper12203 = function(arg0, arg1, arg2) {
881
- const ret = makeMutClosure(arg0, arg1, 4150, __wbg_adapter_54);
882
- return ret;
883
- };
884
- imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
881
+ imports.wbg.__wbg_wbindgendebugstring_99ef257a3ddda34d = function(arg0, arg1) {
885
882
  const ret = debugString(arg1);
886
883
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
887
884
  const len1 = WASM_VECTOR_LEN;
888
885
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
889
886
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
890
887
  };
891
- imports.wbg.__wbindgen_error_new = function(arg0, arg1) {
892
- const ret = new Error(getStringFromWasm0(arg0, arg1));
893
- return ret;
894
- };
895
- imports.wbg.__wbindgen_in = function(arg0, arg1) {
888
+ imports.wbg.__wbg_wbindgenin_d7a1ee10933d2d55 = function(arg0, arg1) {
896
889
  const ret = arg0 in arg1;
897
890
  return ret;
898
891
  };
899
- imports.wbg.__wbindgen_init_externref_table = function() {
900
- const table = wasm.__wbindgen_export_4;
901
- const offset = table.grow(4);
902
- table.set(0, void 0);
903
- table.set(offset + 0, void 0);
904
- table.set(offset + 1, null);
905
- table.set(offset + 2, true);
906
- table.set(offset + 3, false);
907
- ;
908
- };
909
- imports.wbg.__wbindgen_is_bigint = function(arg0) {
892
+ imports.wbg.__wbg_wbindgenisbigint_ecb90cc08a5a9154 = function(arg0) {
910
893
  const ret = typeof arg0 === "bigint";
911
894
  return ret;
912
895
  };
913
- imports.wbg.__wbindgen_is_function = function(arg0) {
896
+ imports.wbg.__wbg_wbindgenisfunction_8cee7dce3725ae74 = function(arg0) {
914
897
  const ret = typeof arg0 === "function";
915
898
  return ret;
916
899
  };
917
- imports.wbg.__wbindgen_is_null = function(arg0) {
900
+ imports.wbg.__wbg_wbindgenisnull_f3037694abe4d97a = function(arg0) {
918
901
  const ret = arg0 === null;
919
902
  return ret;
920
903
  };
921
- imports.wbg.__wbindgen_is_object = function(arg0) {
904
+ imports.wbg.__wbg_wbindgenisobject_307a53c6bd97fbf8 = function(arg0) {
922
905
  const val = arg0;
923
906
  const ret = typeof val === "object" && val !== null;
924
907
  return ret;
925
908
  };
926
- imports.wbg.__wbindgen_is_string = function(arg0) {
909
+ imports.wbg.__wbg_wbindgenisstring_d4fa939789f003b0 = function(arg0) {
927
910
  const ret = typeof arg0 === "string";
928
911
  return ret;
929
912
  };
930
- imports.wbg.__wbindgen_is_undefined = function(arg0) {
913
+ imports.wbg.__wbg_wbindgenisundefined_c4b71d073b92f3c5 = function(arg0) {
931
914
  const ret = arg0 === void 0;
932
915
  return ret;
933
916
  };
934
- imports.wbg.__wbindgen_jsval_eq = function(arg0, arg1) {
917
+ imports.wbg.__wbg_wbindgenjsvaleq_e6f2ad59ccae1b58 = function(arg0, arg1) {
935
918
  const ret = arg0 === arg1;
936
919
  return ret;
937
920
  };
938
- imports.wbg.__wbindgen_jsval_loose_eq = function(arg0, arg1) {
921
+ imports.wbg.__wbg_wbindgenjsvallooseeq_9bec8c9be826bed1 = function(arg0, arg1) {
939
922
  const ret = arg0 == arg1;
940
923
  return ret;
941
924
  };
942
- imports.wbg.__wbindgen_memory = function() {
943
- const ret = wasm.memory;
944
- return ret;
945
- };
946
- imports.wbg.__wbindgen_number_get = function(arg0, arg1) {
925
+ imports.wbg.__wbg_wbindgennumberget_f74b4c7525ac05cb = function(arg0, arg1) {
947
926
  const obj = arg1;
948
927
  const ret = typeof obj === "number" ? obj : void 0;
949
928
  getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
950
929
  getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
951
930
  };
952
- imports.wbg.__wbindgen_number_new = function(arg0) {
953
- const ret = arg0;
954
- return ret;
955
- };
956
- imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
931
+ imports.wbg.__wbg_wbindgenstringget_0f16a6ddddef376f = function(arg0, arg1) {
957
932
  const obj = arg1;
958
933
  const ret = typeof obj === "string" ? obj : void 0;
959
934
  var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
@@ -961,12 +936,46 @@ function __wbg_get_imports() {
961
936
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
962
937
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
963
938
  };
964
- imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
939
+ imports.wbg.__wbg_wbindgenthrow_451ec1a8469d7eb6 = function(arg0, arg1) {
940
+ throw new Error(getStringFromWasm0(arg0, arg1));
941
+ };
942
+ imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
965
943
  const ret = getStringFromWasm0(arg0, arg1);
966
944
  return ret;
967
945
  };
968
- imports.wbg.__wbindgen_throw = function(arg0, arg1) {
969
- throw new Error(getStringFromWasm0(arg0, arg1));
946
+ imports.wbg.__wbindgen_cast_2ddd8a25ff58642a = function(arg0, arg1) {
947
+ const ret = BigInt.asUintN(64, arg0) | arg1 << BigInt(64);
948
+ return ret;
949
+ };
950
+ imports.wbg.__wbindgen_cast_4625c577ab2ec9ee = function(arg0) {
951
+ const ret = BigInt.asUintN(64, arg0);
952
+ return ret;
953
+ };
954
+ imports.wbg.__wbindgen_cast_9ae0607507abb057 = function(arg0) {
955
+ const ret = arg0;
956
+ return ret;
957
+ };
958
+ imports.wbg.__wbindgen_cast_9f5eb788ede76783 = function(arg0, arg1) {
959
+ const ret = makeMutClosure(arg0, arg1, 4205, __wbg_adapter_10);
960
+ return ret;
961
+ };
962
+ imports.wbg.__wbindgen_cast_cb9088102bce6b30 = function(arg0, arg1) {
963
+ const ret = getArrayU8FromWasm0(arg0, arg1);
964
+ return ret;
965
+ };
966
+ imports.wbg.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {
967
+ const ret = arg0;
968
+ return ret;
969
+ };
970
+ imports.wbg.__wbindgen_init_externref_table = function() {
971
+ const table = wasm.__wbindgen_export_4;
972
+ const offset = table.grow(4);
973
+ table.set(0, void 0);
974
+ table.set(offset + 0, void 0);
975
+ table.set(offset + 1, null);
976
+ table.set(offset + 2, true);
977
+ table.set(offset + 3, false);
978
+ ;
970
979
  };
971
980
  return imports;
972
981
  }
@@ -1007,9 +1016,10 @@ __name(__wbg_init, "__wbg_init");
1007
1016
  var didkit_wasm_default = __wbg_init;
1008
1017
 
1009
1018
  // src/didkit/index.ts
1019
+ var DEFAULT_DIDKIT_WASM_URL = "https://assets.learncard.ai/didkit/sha256-60efb6027699fda135db0d817f7a541bbd660ae88bec9cbec9796feeb3740b96/didkit_wasm_bg.wasm";
1010
1020
  var initialized = false;
1011
1021
  var generating = false;
1012
- var init = /* @__PURE__ */ __name(async (arg = "https://cdn.filestackcontent.com/6v059q3KQlmXd6XoVPyC") => {
1022
+ var init = /* @__PURE__ */ __name(async (arg = DEFAULT_DIDKIT_WASM_URL) => {
1013
1023
  while (generating) await new Promise((res) => setTimeout(res, 250));
1014
1024
  if (initialized) return;
1015
1025
  try {