@learncard/didkit-plugin 1.5.36 → 1.6.1
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/dist/didkit/didkit_wasm.d.ts +2 -2
- package/dist/didkit/didkit_wasm.js +201 -226
- package/dist/didkit/didkit_wasm_bg.wasm +0 -0
- package/dist/didkit/didkit_wasm_bg.wasm.d.ts +2 -2
- package/dist/didkit-plugin.cjs.development.js +250 -280
- package/dist/didkit-plugin.cjs.development.js.map +2 -2
- package/dist/didkit-plugin.cjs.production.min.js +2 -2
- package/dist/didkit-plugin.cjs.production.min.js.map +3 -3
- package/dist/didkit-plugin.esm.js +247 -277
- package/dist/didkit-plugin.esm.js.map +2 -2
- package/dist/didkit_wasm.d.ts +2 -2
- package/dist/didkit_wasm.js +201 -226
- package/dist/didkit_wasm_bg.wasm +0 -0
- package/dist/didkit_wasm_bg.wasm.d.ts +2 -2
- package/package.json +7 -7
|
@@ -19,15 +19,16 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
19
19
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
20
|
|
|
21
21
|
// src/index.ts
|
|
22
|
-
var
|
|
23
|
-
__export(
|
|
22
|
+
var index_exports = {};
|
|
23
|
+
__export(index_exports, {
|
|
24
24
|
getDidKitPlugin: () => getDidKitPlugin
|
|
25
25
|
});
|
|
26
|
-
module.exports = __toCommonJS(
|
|
26
|
+
module.exports = __toCommonJS(index_exports);
|
|
27
27
|
|
|
28
28
|
// src/didkit/pkg/didkit_wasm.js
|
|
29
29
|
var import_meta = {};
|
|
30
30
|
var wasm;
|
|
31
|
+
var WASM_VECTOR_LEN = 0;
|
|
31
32
|
var cachedUint8ArrayMemory0 = null;
|
|
32
33
|
function getUint8ArrayMemory0() {
|
|
33
34
|
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
@@ -36,35 +37,9 @@ function getUint8ArrayMemory0() {
|
|
|
36
37
|
return cachedUint8ArrayMemory0;
|
|
37
38
|
}
|
|
38
39
|
__name(getUint8ArrayMemory0, "getUint8ArrayMemory0");
|
|
39
|
-
var
|
|
40
|
-
throw Error("TextDecoder not available");
|
|
41
|
-
} };
|
|
42
|
-
if (typeof TextDecoder !== "undefined") {
|
|
43
|
-
cachedTextDecoder.decode();
|
|
44
|
-
}
|
|
45
|
-
var MAX_SAFARI_DECODE_BYTES = 2146435072;
|
|
46
|
-
var numBytesDecoded = 0;
|
|
47
|
-
function decodeText(ptr, len) {
|
|
48
|
-
numBytesDecoded += len;
|
|
49
|
-
if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
|
|
50
|
-
cachedTextDecoder = typeof TextDecoder !== "undefined" ? new TextDecoder("utf-8", { ignoreBOM: true, fatal: true }) : { decode: () => {
|
|
51
|
-
throw Error("TextDecoder not available");
|
|
52
|
-
} };
|
|
53
|
-
cachedTextDecoder.decode();
|
|
54
|
-
numBytesDecoded = len;
|
|
55
|
-
}
|
|
56
|
-
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
57
|
-
}
|
|
58
|
-
__name(decodeText, "decodeText");
|
|
59
|
-
function getStringFromWasm0(ptr, len) {
|
|
60
|
-
ptr = ptr >>> 0;
|
|
61
|
-
return decodeText(ptr, len);
|
|
62
|
-
}
|
|
63
|
-
__name(getStringFromWasm0, "getStringFromWasm0");
|
|
64
|
-
var WASM_VECTOR_LEN = 0;
|
|
65
|
-
var cachedTextEncoder = typeof TextEncoder !== "undefined" ? new TextEncoder("utf-8") : { encode: () => {
|
|
40
|
+
var cachedTextEncoder = typeof TextEncoder !== "undefined" ? new TextEncoder("utf-8") : { encode: /* @__PURE__ */ __name(() => {
|
|
66
41
|
throw Error("TextEncoder not available");
|
|
67
|
-
} };
|
|
42
|
+
}, "encode") };
|
|
68
43
|
var encodeString = typeof cachedTextEncoder.encodeInto === "function" ? function(arg, view) {
|
|
69
44
|
return cachedTextEncoder.encodeInto(arg, view);
|
|
70
45
|
} : function(arg, view) {
|
|
@@ -89,8 +64,7 @@ function passStringToWasm0(arg, malloc, realloc) {
|
|
|
89
64
|
let offset = 0;
|
|
90
65
|
for (; offset < len; offset++) {
|
|
91
66
|
const code = arg.charCodeAt(offset);
|
|
92
|
-
if (code > 127)
|
|
93
|
-
break;
|
|
67
|
+
if (code > 127) break;
|
|
94
68
|
mem[ptr + offset] = code;
|
|
95
69
|
}
|
|
96
70
|
if (offset !== len) {
|
|
@@ -115,6 +89,17 @@ function getDataViewMemory0() {
|
|
|
115
89
|
return cachedDataViewMemory0;
|
|
116
90
|
}
|
|
117
91
|
__name(getDataViewMemory0, "getDataViewMemory0");
|
|
92
|
+
var cachedTextDecoder = typeof TextDecoder !== "undefined" ? new TextDecoder("utf-8", { ignoreBOM: true, fatal: true }) : { decode: /* @__PURE__ */ __name(() => {
|
|
93
|
+
throw Error("TextDecoder not available");
|
|
94
|
+
}, "decode") };
|
|
95
|
+
if (typeof TextDecoder !== "undefined") {
|
|
96
|
+
cachedTextDecoder.decode();
|
|
97
|
+
}
|
|
98
|
+
function getStringFromWasm0(ptr, len) {
|
|
99
|
+
ptr = ptr >>> 0;
|
|
100
|
+
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
101
|
+
}
|
|
102
|
+
__name(getStringFromWasm0, "getStringFromWasm0");
|
|
118
103
|
function addToExternrefTable0(obj) {
|
|
119
104
|
const idx = wasm.__externref_table_alloc();
|
|
120
105
|
wasm.__wbindgen_export_4.set(idx, obj);
|
|
@@ -139,6 +124,33 @@ function isLikeNone(x) {
|
|
|
139
124
|
return x === void 0 || x === null;
|
|
140
125
|
}
|
|
141
126
|
__name(isLikeNone, "isLikeNone");
|
|
127
|
+
var CLOSURE_DTORS = typeof FinalizationRegistry === "undefined" ? { register: /* @__PURE__ */ __name(() => {
|
|
128
|
+
}, "register"), unregister: /* @__PURE__ */ __name(() => {
|
|
129
|
+
}, "unregister") } : new FinalizationRegistry((state) => {
|
|
130
|
+
wasm.__wbindgen_export_5.get(state.dtor)(state.a, state.b);
|
|
131
|
+
});
|
|
132
|
+
function makeMutClosure(arg0, arg1, dtor, f) {
|
|
133
|
+
const state = { a: arg0, b: arg1, cnt: 1, dtor };
|
|
134
|
+
const real = /* @__PURE__ */ __name((...args) => {
|
|
135
|
+
state.cnt++;
|
|
136
|
+
const a = state.a;
|
|
137
|
+
state.a = 0;
|
|
138
|
+
try {
|
|
139
|
+
return f(a, state.b, ...args);
|
|
140
|
+
} finally {
|
|
141
|
+
if (--state.cnt === 0) {
|
|
142
|
+
wasm.__wbindgen_export_5.get(state.dtor)(a, state.b);
|
|
143
|
+
CLOSURE_DTORS.unregister(state);
|
|
144
|
+
} else {
|
|
145
|
+
state.a = a;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}, "real");
|
|
149
|
+
real.original = state;
|
|
150
|
+
CLOSURE_DTORS.register(real, state, state);
|
|
151
|
+
return real;
|
|
152
|
+
}
|
|
153
|
+
__name(makeMutClosure, "makeMutClosure");
|
|
142
154
|
function debugString(val) {
|
|
143
155
|
const type = typeof val;
|
|
144
156
|
if (type == "number" || type == "boolean" || val == null) {
|
|
@@ -196,35 +208,6 @@ ${val.stack}`;
|
|
|
196
208
|
return className;
|
|
197
209
|
}
|
|
198
210
|
__name(debugString, "debugString");
|
|
199
|
-
var CLOSURE_DTORS = typeof FinalizationRegistry === "undefined" ? { register: () => {
|
|
200
|
-
}, unregister: () => {
|
|
201
|
-
} } : new FinalizationRegistry(
|
|
202
|
-
(state) => {
|
|
203
|
-
wasm.__wbindgen_export_5.get(state.dtor)(state.a, state.b);
|
|
204
|
-
}
|
|
205
|
-
);
|
|
206
|
-
function makeMutClosure(arg0, arg1, dtor, f) {
|
|
207
|
-
const state = { a: arg0, b: arg1, cnt: 1, dtor };
|
|
208
|
-
const real = /* @__PURE__ */ __name((...args) => {
|
|
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_5.get(state.dtor)(a, state.b);
|
|
217
|
-
CLOSURE_DTORS.unregister(state);
|
|
218
|
-
} else {
|
|
219
|
-
state.a = a;
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
}, "real");
|
|
223
|
-
real.original = state;
|
|
224
|
-
CLOSURE_DTORS.register(real, state, state);
|
|
225
|
-
return real;
|
|
226
|
-
}
|
|
227
|
-
__name(makeMutClosure, "makeMutClosure");
|
|
228
211
|
function clearCache() {
|
|
229
212
|
const ret = wasm.clearCache();
|
|
230
213
|
return ret;
|
|
@@ -444,25 +427,23 @@ function contextLoader(url) {
|
|
|
444
427
|
return ret;
|
|
445
428
|
}
|
|
446
429
|
__name(contextLoader, "contextLoader");
|
|
447
|
-
function
|
|
448
|
-
wasm.
|
|
430
|
+
function __wbg_adapter_54(arg0, arg1, arg2) {
|
|
431
|
+
wasm.closure4184_externref_shim(arg0, arg1, arg2);
|
|
449
432
|
}
|
|
450
|
-
__name(
|
|
451
|
-
function
|
|
452
|
-
wasm.
|
|
433
|
+
__name(__wbg_adapter_54, "__wbg_adapter_54");
|
|
434
|
+
function __wbg_adapter_222(arg0, arg1, arg2, arg3) {
|
|
435
|
+
wasm.closure4586_externref_shim(arg0, arg1, arg2, arg3);
|
|
453
436
|
}
|
|
454
|
-
__name(
|
|
437
|
+
__name(__wbg_adapter_222, "__wbg_adapter_222");
|
|
455
438
|
var __wbindgen_enum_RequestCredentials = ["omit", "same-origin", "include"];
|
|
456
439
|
var __wbindgen_enum_RequestMode = ["same-origin", "no-cors", "cors", "navigate"];
|
|
457
|
-
var EXPECTED_RESPONSE_TYPES = /* @__PURE__ */ new Set(["basic", "cors", "default"]);
|
|
458
440
|
async function __wbg_load(module2, imports) {
|
|
459
441
|
if (typeof Response === "function" && module2 instanceof Response) {
|
|
460
442
|
if (typeof WebAssembly.instantiateStreaming === "function") {
|
|
461
443
|
try {
|
|
462
444
|
return await WebAssembly.instantiateStreaming(module2, imports);
|
|
463
445
|
} catch (e) {
|
|
464
|
-
|
|
465
|
-
if (validResponse && module2.headers.get("Content-Type") !== "application/wasm") {
|
|
446
|
+
if (module2.headers.get("Content-Type") != "application/wasm") {
|
|
466
447
|
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);
|
|
467
448
|
} else {
|
|
468
449
|
throw e;
|
|
@@ -484,10 +465,6 @@ __name(__wbg_load, "__wbg_load");
|
|
|
484
465
|
function __wbg_get_imports() {
|
|
485
466
|
const imports = {};
|
|
486
467
|
imports.wbg = {};
|
|
487
|
-
imports.wbg.__wbg_Error_1f3748b298f99708 = function(arg0, arg1) {
|
|
488
|
-
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
489
|
-
return ret;
|
|
490
|
-
};
|
|
491
468
|
imports.wbg.__wbg_String_8f0eb39a4a4c2f66 = function(arg0, arg1) {
|
|
492
469
|
const ret = String(arg1);
|
|
493
470
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
@@ -495,27 +472,31 @@ function __wbg_get_imports() {
|
|
|
495
472
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
496
473
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
497
474
|
};
|
|
498
|
-
imports.wbg.
|
|
475
|
+
imports.wbg.__wbg_abort_775ef1d17fc65868 = function(arg0) {
|
|
499
476
|
arg0.abort();
|
|
500
477
|
};
|
|
501
|
-
imports.wbg.
|
|
478
|
+
imports.wbg.__wbg_append_8c7dd8d641a5f01b = function() {
|
|
502
479
|
return handleError(function(arg0, arg1, arg2, arg3, arg4) {
|
|
503
480
|
arg0.append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
504
481
|
}, arguments);
|
|
505
482
|
};
|
|
506
|
-
imports.wbg.
|
|
483
|
+
imports.wbg.__wbg_arrayBuffer_d1b44c4390db422f = function() {
|
|
507
484
|
return handleError(function(arg0) {
|
|
508
485
|
const ret = arg0.arrayBuffer();
|
|
509
486
|
return ret;
|
|
510
487
|
}, arguments);
|
|
511
488
|
};
|
|
512
|
-
imports.wbg.
|
|
489
|
+
imports.wbg.__wbg_buffer_609cc3eee51ed158 = function(arg0) {
|
|
490
|
+
const ret = arg0.buffer;
|
|
491
|
+
return ret;
|
|
492
|
+
};
|
|
493
|
+
imports.wbg.__wbg_call_672a4d21634d4a24 = function() {
|
|
513
494
|
return handleError(function(arg0, arg1) {
|
|
514
495
|
const ret = arg0.call(arg1);
|
|
515
496
|
return ret;
|
|
516
497
|
}, arguments);
|
|
517
498
|
};
|
|
518
|
-
imports.wbg.
|
|
499
|
+
imports.wbg.__wbg_call_7cccdd69e0791ae2 = function() {
|
|
519
500
|
return handleError(function(arg0, arg1, arg2) {
|
|
520
501
|
const ret = arg0.call(arg1, arg2);
|
|
521
502
|
return ret;
|
|
@@ -529,15 +510,15 @@ function __wbg_get_imports() {
|
|
|
529
510
|
const ret = arg0.crypto;
|
|
530
511
|
return ret;
|
|
531
512
|
};
|
|
532
|
-
imports.wbg.
|
|
513
|
+
imports.wbg.__wbg_done_769e5ede4b31c67b = function(arg0) {
|
|
533
514
|
const ret = arg0.done;
|
|
534
515
|
return ret;
|
|
535
516
|
};
|
|
536
|
-
imports.wbg.
|
|
517
|
+
imports.wbg.__wbg_entries_3265d4158b33e5dc = function(arg0) {
|
|
537
518
|
const ret = Object.entries(arg0);
|
|
538
519
|
return ret;
|
|
539
520
|
};
|
|
540
|
-
imports.wbg.
|
|
521
|
+
imports.wbg.__wbg_fetch_509096533071c657 = function(arg0, arg1) {
|
|
541
522
|
const ret = arg0.fetch(arg1);
|
|
542
523
|
return ret;
|
|
543
524
|
};
|
|
@@ -545,7 +526,7 @@ function __wbg_get_imports() {
|
|
|
545
526
|
const ret = fetch(arg0);
|
|
546
527
|
return ret;
|
|
547
528
|
};
|
|
548
|
-
imports.wbg.
|
|
529
|
+
imports.wbg.__wbg_from_2a5d3e218e67aa85 = function(arg0) {
|
|
549
530
|
const ret = Array.from(arg0);
|
|
550
531
|
return ret;
|
|
551
532
|
};
|
|
@@ -566,31 +547,31 @@ function __wbg_get_imports() {
|
|
|
566
547
|
arg0.getRandomValues(arg1);
|
|
567
548
|
}, arguments);
|
|
568
549
|
};
|
|
569
|
-
imports.wbg.
|
|
550
|
+
imports.wbg.__wbg_getTime_46267b1c24877e30 = function(arg0) {
|
|
570
551
|
const ret = arg0.getTime();
|
|
571
552
|
return ret;
|
|
572
553
|
};
|
|
573
|
-
imports.wbg.
|
|
554
|
+
imports.wbg.__wbg_get_67b2ba62fc30de12 = function() {
|
|
574
555
|
return handleError(function(arg0, arg1) {
|
|
575
556
|
const ret = Reflect.get(arg0, arg1);
|
|
576
557
|
return ret;
|
|
577
558
|
}, arguments);
|
|
578
559
|
};
|
|
579
|
-
imports.wbg.
|
|
560
|
+
imports.wbg.__wbg_get_b9b93047fe3cf45b = function(arg0, arg1) {
|
|
580
561
|
const ret = arg0[arg1 >>> 0];
|
|
581
562
|
return ret;
|
|
582
563
|
};
|
|
583
|
-
imports.wbg.
|
|
564
|
+
imports.wbg.__wbg_has_a5ea9117f258a0ec = function() {
|
|
584
565
|
return handleError(function(arg0, arg1) {
|
|
585
566
|
const ret = Reflect.has(arg0, arg1);
|
|
586
567
|
return ret;
|
|
587
568
|
}, arguments);
|
|
588
569
|
};
|
|
589
|
-
imports.wbg.
|
|
570
|
+
imports.wbg.__wbg_headers_9cb51cfd2ac780a4 = function(arg0) {
|
|
590
571
|
const ret = arg0.headers;
|
|
591
572
|
return ret;
|
|
592
573
|
};
|
|
593
|
-
imports.wbg.
|
|
574
|
+
imports.wbg.__wbg_instanceof_ArrayBuffer_e14585432e3737fc = function(arg0) {
|
|
594
575
|
let result;
|
|
595
576
|
try {
|
|
596
577
|
result = arg0 instanceof ArrayBuffer;
|
|
@@ -600,7 +581,7 @@ function __wbg_get_imports() {
|
|
|
600
581
|
const ret = result;
|
|
601
582
|
return ret;
|
|
602
583
|
};
|
|
603
|
-
imports.wbg.
|
|
584
|
+
imports.wbg.__wbg_instanceof_Map_f3469ce2244d2430 = function(arg0) {
|
|
604
585
|
let result;
|
|
605
586
|
try {
|
|
606
587
|
result = arg0 instanceof Map;
|
|
@@ -610,7 +591,7 @@ function __wbg_get_imports() {
|
|
|
610
591
|
const ret = result;
|
|
611
592
|
return ret;
|
|
612
593
|
};
|
|
613
|
-
imports.wbg.
|
|
594
|
+
imports.wbg.__wbg_instanceof_Response_f2cc20d9f7dfd644 = function(arg0) {
|
|
614
595
|
let result;
|
|
615
596
|
try {
|
|
616
597
|
result = arg0 instanceof Response;
|
|
@@ -620,7 +601,7 @@ function __wbg_get_imports() {
|
|
|
620
601
|
const ret = result;
|
|
621
602
|
return ret;
|
|
622
603
|
};
|
|
623
|
-
imports.wbg.
|
|
604
|
+
imports.wbg.__wbg_instanceof_Uint8Array_17156bcf118086a9 = function(arg0) {
|
|
624
605
|
let result;
|
|
625
606
|
try {
|
|
626
607
|
result = arg0 instanceof Uint8Array;
|
|
@@ -630,27 +611,27 @@ function __wbg_get_imports() {
|
|
|
630
611
|
const ret = result;
|
|
631
612
|
return ret;
|
|
632
613
|
};
|
|
633
|
-
imports.wbg.
|
|
614
|
+
imports.wbg.__wbg_isArray_a1eab7e0d067391b = function(arg0) {
|
|
634
615
|
const ret = Array.isArray(arg0);
|
|
635
616
|
return ret;
|
|
636
617
|
};
|
|
637
|
-
imports.wbg.
|
|
618
|
+
imports.wbg.__wbg_isSafeInteger_343e2beeeece1bb0 = function(arg0) {
|
|
638
619
|
const ret = Number.isSafeInteger(arg0);
|
|
639
620
|
return ret;
|
|
640
621
|
};
|
|
641
|
-
imports.wbg.
|
|
622
|
+
imports.wbg.__wbg_iterator_9a24c88df860dc65 = function() {
|
|
642
623
|
const ret = Symbol.iterator;
|
|
643
624
|
return ret;
|
|
644
625
|
};
|
|
645
|
-
imports.wbg.
|
|
626
|
+
imports.wbg.__wbg_keys_5c77a08ddc2fb8a6 = function(arg0) {
|
|
646
627
|
const ret = Object.keys(arg0);
|
|
647
628
|
return ret;
|
|
648
629
|
};
|
|
649
|
-
imports.wbg.
|
|
630
|
+
imports.wbg.__wbg_length_a446193dc22c12f8 = function(arg0) {
|
|
650
631
|
const ret = arg0.length;
|
|
651
632
|
return ret;
|
|
652
633
|
};
|
|
653
|
-
imports.wbg.
|
|
634
|
+
imports.wbg.__wbg_length_e2d2a49132c1b256 = function(arg0) {
|
|
654
635
|
const ret = arg0.length;
|
|
655
636
|
return ret;
|
|
656
637
|
};
|
|
@@ -662,42 +643,24 @@ function __wbg_get_imports() {
|
|
|
662
643
|
const ret = arg0.msCrypto;
|
|
663
644
|
return ret;
|
|
664
645
|
};
|
|
665
|
-
imports.wbg.
|
|
666
|
-
const ret = new Date();
|
|
646
|
+
imports.wbg.__wbg_new0_f788a2397c7ca929 = function() {
|
|
647
|
+
const ret = /* @__PURE__ */ new Date();
|
|
667
648
|
return ret;
|
|
668
649
|
};
|
|
669
|
-
imports.wbg.
|
|
650
|
+
imports.wbg.__wbg_new_018dcc2d6c8c2f6a = function() {
|
|
670
651
|
return handleError(function() {
|
|
671
652
|
const ret = new Headers();
|
|
672
653
|
return ret;
|
|
673
654
|
}, arguments);
|
|
674
655
|
};
|
|
675
|
-
imports.wbg.
|
|
676
|
-
const ret = new Object();
|
|
677
|
-
return ret;
|
|
678
|
-
};
|
|
679
|
-
imports.wbg.__wbg_new_56407f99198feff7 = function() {
|
|
680
|
-
const ret = /* @__PURE__ */ new Map();
|
|
681
|
-
return ret;
|
|
682
|
-
};
|
|
683
|
-
imports.wbg.__wbg_new_6a8b180049d9484e = function() {
|
|
684
|
-
return handleError(function() {
|
|
685
|
-
const ret = new AbortController();
|
|
686
|
-
return ret;
|
|
687
|
-
}, arguments);
|
|
688
|
-
};
|
|
689
|
-
imports.wbg.__wbg_new_9190433fb67ed635 = function(arg0) {
|
|
690
|
-
const ret = new Uint8Array(arg0);
|
|
691
|
-
return ret;
|
|
692
|
-
};
|
|
693
|
-
imports.wbg.__wbg_new_d5e3800b120e37e1 = function(arg0, arg1) {
|
|
656
|
+
imports.wbg.__wbg_new_23a2665fac83c611 = function(arg0, arg1) {
|
|
694
657
|
try {
|
|
695
658
|
var state0 = { a: arg0, b: arg1 };
|
|
696
659
|
var cb0 = /* @__PURE__ */ __name((arg02, arg12) => {
|
|
697
660
|
const a = state0.a;
|
|
698
661
|
state0.a = 0;
|
|
699
662
|
try {
|
|
700
|
-
return
|
|
663
|
+
return __wbg_adapter_222(a, state0.b, arg02, arg12);
|
|
701
664
|
} finally {
|
|
702
665
|
state0.a = a;
|
|
703
666
|
}
|
|
@@ -708,43 +671,61 @@ function __wbg_get_imports() {
|
|
|
708
671
|
state0.a = state0.b = 0;
|
|
709
672
|
}
|
|
710
673
|
};
|
|
711
|
-
imports.wbg.
|
|
674
|
+
imports.wbg.__wbg_new_405e22f390576ce2 = function() {
|
|
675
|
+
const ret = new Object();
|
|
676
|
+
return ret;
|
|
677
|
+
};
|
|
678
|
+
imports.wbg.__wbg_new_5e0be73521bc8c17 = function() {
|
|
679
|
+
const ret = /* @__PURE__ */ new Map();
|
|
680
|
+
return ret;
|
|
681
|
+
};
|
|
682
|
+
imports.wbg.__wbg_new_78feb108b6472713 = function() {
|
|
712
683
|
const ret = new Array();
|
|
713
684
|
return ret;
|
|
714
685
|
};
|
|
715
|
-
imports.wbg.
|
|
716
|
-
const ret = new Uint8Array(
|
|
686
|
+
imports.wbg.__wbg_new_a12002a7f91c75be = function(arg0) {
|
|
687
|
+
const ret = new Uint8Array(arg0);
|
|
717
688
|
return ret;
|
|
718
689
|
};
|
|
719
|
-
imports.wbg.
|
|
690
|
+
imports.wbg.__wbg_new_e25e5aab09ff45db = function() {
|
|
691
|
+
return handleError(function() {
|
|
692
|
+
const ret = new AbortController();
|
|
693
|
+
return ret;
|
|
694
|
+
}, arguments);
|
|
695
|
+
};
|
|
696
|
+
imports.wbg.__wbg_newnoargs_105ed471475aaf50 = function(arg0, arg1) {
|
|
720
697
|
const ret = new Function(getStringFromWasm0(arg0, arg1));
|
|
721
698
|
return ret;
|
|
722
699
|
};
|
|
723
|
-
imports.wbg.
|
|
700
|
+
imports.wbg.__wbg_newwithbyteoffsetandlength_d97e637ebe145a9a = function(arg0, arg1, arg2) {
|
|
701
|
+
const ret = new Uint8Array(arg0, arg1 >>> 0, arg2 >>> 0);
|
|
702
|
+
return ret;
|
|
703
|
+
};
|
|
704
|
+
imports.wbg.__wbg_newwithlength_a381634e90c276d4 = function(arg0) {
|
|
724
705
|
const ret = new Uint8Array(arg0 >>> 0);
|
|
725
706
|
return ret;
|
|
726
707
|
};
|
|
727
|
-
imports.wbg.
|
|
708
|
+
imports.wbg.__wbg_newwithstrandinit_06c535e0a867c635 = function() {
|
|
728
709
|
return handleError(function(arg0, arg1, arg2) {
|
|
729
710
|
const ret = new Request(getStringFromWasm0(arg0, arg1), arg2);
|
|
730
711
|
return ret;
|
|
731
712
|
}, arguments);
|
|
732
713
|
};
|
|
733
|
-
imports.wbg.
|
|
714
|
+
imports.wbg.__wbg_next_25feadfc0913fea9 = function(arg0) {
|
|
715
|
+
const ret = arg0.next;
|
|
716
|
+
return ret;
|
|
717
|
+
};
|
|
718
|
+
imports.wbg.__wbg_next_6574e1a8a62d1055 = function() {
|
|
734
719
|
return handleError(function(arg0) {
|
|
735
720
|
const ret = arg0.next();
|
|
736
721
|
return ret;
|
|
737
722
|
}, arguments);
|
|
738
723
|
};
|
|
739
|
-
imports.wbg.__wbg_next_3de8f2669431a3ff = function(arg0) {
|
|
740
|
-
const ret = arg0.next;
|
|
741
|
-
return ret;
|
|
742
|
-
};
|
|
743
724
|
imports.wbg.__wbg_node_905d3e251edff8a2 = function(arg0) {
|
|
744
725
|
const ret = arg0.node;
|
|
745
726
|
return ret;
|
|
746
727
|
};
|
|
747
|
-
imports.wbg.
|
|
728
|
+
imports.wbg.__wbg_now_d18023d54d4e5500 = function(arg0) {
|
|
748
729
|
const ret = arg0.now();
|
|
749
730
|
return ret;
|
|
750
731
|
};
|
|
@@ -752,20 +733,17 @@ function __wbg_get_imports() {
|
|
|
752
733
|
const ret = arg0.process;
|
|
753
734
|
return ret;
|
|
754
735
|
};
|
|
755
|
-
imports.wbg.
|
|
756
|
-
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
|
|
757
|
-
};
|
|
758
|
-
imports.wbg.__wbg_push_cd3ac7d5b094565d = function(arg0, arg1) {
|
|
736
|
+
imports.wbg.__wbg_push_737cfc8c1432c2c6 = function(arg0, arg1) {
|
|
759
737
|
const ret = arg0.push(arg1);
|
|
760
738
|
return ret;
|
|
761
739
|
};
|
|
762
|
-
imports.wbg.
|
|
740
|
+
imports.wbg.__wbg_queueMicrotask_97d92b4fcc8a61c5 = function(arg0) {
|
|
741
|
+
queueMicrotask(arg0);
|
|
742
|
+
};
|
|
743
|
+
imports.wbg.__wbg_queueMicrotask_d3219def82552485 = function(arg0) {
|
|
763
744
|
const ret = arg0.queueMicrotask;
|
|
764
745
|
return ret;
|
|
765
746
|
};
|
|
766
|
-
imports.wbg.__wbg_queueMicrotask_f24a794d09c42640 = function(arg0) {
|
|
767
|
-
queueMicrotask(arg0);
|
|
768
|
-
};
|
|
769
747
|
imports.wbg.__wbg_randomFillSync_994ac6d9ade7a695 = function(arg0, arg1, arg2) {
|
|
770
748
|
arg0.randomFillSync(getArrayU8FromWasm0(arg1, arg2));
|
|
771
749
|
};
|
|
@@ -784,7 +762,7 @@ function __wbg_get_imports() {
|
|
|
784
762
|
return ret;
|
|
785
763
|
}, arguments);
|
|
786
764
|
};
|
|
787
|
-
imports.wbg.
|
|
765
|
+
imports.wbg.__wbg_resolve_4851785c9c5f573d = function(arg0) {
|
|
788
766
|
const ret = Promise.resolve(arg0);
|
|
789
767
|
return ret;
|
|
790
768
|
};
|
|
@@ -794,52 +772,52 @@ function __wbg_get_imports() {
|
|
|
794
772
|
return ret;
|
|
795
773
|
}, arguments);
|
|
796
774
|
};
|
|
797
|
-
imports.wbg.
|
|
798
|
-
arg0
|
|
799
|
-
};
|
|
800
|
-
imports.wbg.__wbg_set_31197016f65a6a19 = function(arg0, arg1, arg2) {
|
|
801
|
-
const ret = arg0.set(arg1, arg2);
|
|
802
|
-
return ret;
|
|
775
|
+
imports.wbg.__wbg_set_37837023f3d740e8 = function(arg0, arg1, arg2) {
|
|
776
|
+
arg0[arg1 >>> 0] = arg2;
|
|
803
777
|
};
|
|
804
778
|
imports.wbg.__wbg_set_3f1d0b984ed272ed = function(arg0, arg1, arg2) {
|
|
805
779
|
arg0[arg1] = arg2;
|
|
806
780
|
};
|
|
807
|
-
imports.wbg.
|
|
781
|
+
imports.wbg.__wbg_set_65595bdd868b3009 = function(arg0, arg1, arg2) {
|
|
782
|
+
arg0.set(arg1, arg2 >>> 0);
|
|
783
|
+
};
|
|
784
|
+
imports.wbg.__wbg_set_8fc6bf8a5b1071d1 = function(arg0, arg1, arg2) {
|
|
785
|
+
const ret = arg0.set(arg1, arg2);
|
|
786
|
+
return ret;
|
|
787
|
+
};
|
|
788
|
+
imports.wbg.__wbg_set_bb8cecf6a62b9f46 = function() {
|
|
808
789
|
return handleError(function(arg0, arg1, arg2) {
|
|
809
790
|
const ret = Reflect.set(arg0, arg1, arg2);
|
|
810
791
|
return ret;
|
|
811
792
|
}, arguments);
|
|
812
793
|
};
|
|
813
|
-
imports.wbg.
|
|
814
|
-
arg0[arg1 >>> 0] = arg2;
|
|
815
|
-
};
|
|
816
|
-
imports.wbg.__wbg_setbody_e324371c31597f2a = function(arg0, arg1) {
|
|
794
|
+
imports.wbg.__wbg_setbody_5923b78a95eedf29 = function(arg0, arg1) {
|
|
817
795
|
arg0.body = arg1;
|
|
818
796
|
};
|
|
819
|
-
imports.wbg.
|
|
797
|
+
imports.wbg.__wbg_setcredentials_c3a22f1cd105a2c6 = function(arg0, arg1) {
|
|
820
798
|
arg0.credentials = __wbindgen_enum_RequestCredentials[arg1];
|
|
821
799
|
};
|
|
822
|
-
imports.wbg.
|
|
800
|
+
imports.wbg.__wbg_setheaders_834c0bdb6a8949ad = function(arg0, arg1) {
|
|
823
801
|
arg0.headers = arg1;
|
|
824
802
|
};
|
|
825
|
-
imports.wbg.
|
|
803
|
+
imports.wbg.__wbg_setmethod_3c5280fe5d890842 = function(arg0, arg1, arg2) {
|
|
826
804
|
arg0.method = getStringFromWasm0(arg1, arg2);
|
|
827
805
|
};
|
|
828
|
-
imports.wbg.
|
|
806
|
+
imports.wbg.__wbg_setmode_5dc300b865044b65 = function(arg0, arg1) {
|
|
829
807
|
arg0.mode = __wbindgen_enum_RequestMode[arg1];
|
|
830
808
|
};
|
|
831
|
-
imports.wbg.
|
|
809
|
+
imports.wbg.__wbg_setsignal_75b21ef3a81de905 = function(arg0, arg1) {
|
|
832
810
|
arg0.signal = arg1;
|
|
833
811
|
};
|
|
834
|
-
imports.wbg.
|
|
812
|
+
imports.wbg.__wbg_signal_aaf9ad74119f20a4 = function(arg0) {
|
|
835
813
|
const ret = arg0.signal;
|
|
836
814
|
return ret;
|
|
837
815
|
};
|
|
838
|
-
imports.wbg.
|
|
816
|
+
imports.wbg.__wbg_static_accessor_GLOBAL_88a902d13a557d07 = function() {
|
|
839
817
|
const ret = typeof global === "undefined" ? null : global;
|
|
840
818
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
841
819
|
};
|
|
842
|
-
imports.wbg.
|
|
820
|
+
imports.wbg.__wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0 = function() {
|
|
843
821
|
const ret = typeof globalThis === "undefined" ? null : globalThis;
|
|
844
822
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
845
823
|
};
|
|
@@ -847,44 +825,44 @@ function __wbg_get_imports() {
|
|
|
847
825
|
const ret = module;
|
|
848
826
|
return ret;
|
|
849
827
|
};
|
|
850
|
-
imports.wbg.
|
|
828
|
+
imports.wbg.__wbg_static_accessor_SELF_37c5d418e4bf5819 = function() {
|
|
851
829
|
const ret = typeof self === "undefined" ? null : self;
|
|
852
830
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
853
831
|
};
|
|
854
|
-
imports.wbg.
|
|
832
|
+
imports.wbg.__wbg_static_accessor_WINDOW_5de37043a91a9c40 = function() {
|
|
855
833
|
const ret = typeof window === "undefined" ? null : window;
|
|
856
834
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
857
835
|
};
|
|
858
|
-
imports.wbg.
|
|
836
|
+
imports.wbg.__wbg_status_f6360336ca686bf0 = function(arg0) {
|
|
859
837
|
const ret = arg0.status;
|
|
860
838
|
return ret;
|
|
861
839
|
};
|
|
862
|
-
imports.wbg.
|
|
840
|
+
imports.wbg.__wbg_stringify_f7ed6987935b4a24 = function() {
|
|
863
841
|
return handleError(function(arg0) {
|
|
864
842
|
const ret = JSON.stringify(arg0);
|
|
865
843
|
return ret;
|
|
866
844
|
}, arguments);
|
|
867
845
|
};
|
|
868
|
-
imports.wbg.
|
|
846
|
+
imports.wbg.__wbg_subarray_aa9065fa9dc5df96 = function(arg0, arg1, arg2) {
|
|
869
847
|
const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
|
|
870
848
|
return ret;
|
|
871
849
|
};
|
|
872
|
-
imports.wbg.
|
|
873
|
-
const ret = arg0.then(arg1
|
|
850
|
+
imports.wbg.__wbg_then_44b73946d2fb3e7d = function(arg0, arg1) {
|
|
851
|
+
const ret = arg0.then(arg1);
|
|
874
852
|
return ret;
|
|
875
853
|
};
|
|
876
|
-
imports.wbg.
|
|
877
|
-
const ret = arg0.then(arg1);
|
|
854
|
+
imports.wbg.__wbg_then_48b406749878a531 = function(arg0, arg1, arg2) {
|
|
855
|
+
const ret = arg0.then(arg1, arg2);
|
|
878
856
|
return ret;
|
|
879
857
|
};
|
|
880
|
-
imports.wbg.
|
|
858
|
+
imports.wbg.__wbg_url_ae10c34ca209681d = function(arg0, arg1) {
|
|
881
859
|
const ret = arg1.url;
|
|
882
860
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
883
861
|
const len1 = WASM_VECTOR_LEN;
|
|
884
862
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
885
863
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
886
864
|
};
|
|
887
|
-
imports.wbg.
|
|
865
|
+
imports.wbg.__wbg_value_cd1ffa7b1ab794f1 = function(arg0) {
|
|
888
866
|
const ret = arg0.value;
|
|
889
867
|
return ret;
|
|
890
868
|
};
|
|
@@ -892,18 +870,30 @@ function __wbg_get_imports() {
|
|
|
892
870
|
const ret = arg0.versions;
|
|
893
871
|
return ret;
|
|
894
872
|
};
|
|
895
|
-
imports.wbg.
|
|
873
|
+
imports.wbg.__wbindgen_bigint_from_i128 = function(arg0, arg1) {
|
|
874
|
+
const ret = arg0 << BigInt(64) | BigInt.asUintN(64, arg1);
|
|
875
|
+
return ret;
|
|
876
|
+
};
|
|
877
|
+
imports.wbg.__wbindgen_bigint_from_i64 = function(arg0) {
|
|
878
|
+
const ret = arg0;
|
|
879
|
+
return ret;
|
|
880
|
+
};
|
|
881
|
+
imports.wbg.__wbindgen_bigint_from_u64 = function(arg0) {
|
|
882
|
+
const ret = BigInt.asUintN(64, arg0);
|
|
883
|
+
return ret;
|
|
884
|
+
};
|
|
885
|
+
imports.wbg.__wbindgen_bigint_get_as_i64 = function(arg0, arg1) {
|
|
896
886
|
const v = arg1;
|
|
897
887
|
const ret = typeof v === "bigint" ? v : void 0;
|
|
898
888
|
getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
|
|
899
889
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
900
890
|
};
|
|
901
|
-
imports.wbg.
|
|
891
|
+
imports.wbg.__wbindgen_boolean_get = function(arg0) {
|
|
902
892
|
const v = arg0;
|
|
903
|
-
const ret = typeof v === "boolean" ? v :
|
|
904
|
-
return
|
|
893
|
+
const ret = typeof v === "boolean" ? v ? 1 : 0 : 2;
|
|
894
|
+
return ret;
|
|
905
895
|
};
|
|
906
|
-
imports.wbg.
|
|
896
|
+
imports.wbg.__wbindgen_cb_drop = function(arg0) {
|
|
907
897
|
const obj = arg0.original;
|
|
908
898
|
if (obj.cnt-- == 1) {
|
|
909
899
|
obj.a = 0;
|
|
@@ -912,57 +902,83 @@ function __wbg_get_imports() {
|
|
|
912
902
|
const ret = false;
|
|
913
903
|
return ret;
|
|
914
904
|
};
|
|
915
|
-
imports.wbg.
|
|
905
|
+
imports.wbg.__wbindgen_closure_wrapper12250 = function(arg0, arg1, arg2) {
|
|
906
|
+
const ret = makeMutClosure(arg0, arg1, 4185, __wbg_adapter_54);
|
|
907
|
+
return ret;
|
|
908
|
+
};
|
|
909
|
+
imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
|
|
916
910
|
const ret = debugString(arg1);
|
|
917
911
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
918
912
|
const len1 = WASM_VECTOR_LEN;
|
|
919
913
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
920
914
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
921
915
|
};
|
|
922
|
-
imports.wbg.
|
|
916
|
+
imports.wbg.__wbindgen_error_new = function(arg0, arg1) {
|
|
917
|
+
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
918
|
+
return ret;
|
|
919
|
+
};
|
|
920
|
+
imports.wbg.__wbindgen_in = function(arg0, arg1) {
|
|
923
921
|
const ret = arg0 in arg1;
|
|
924
922
|
return ret;
|
|
925
923
|
};
|
|
926
|
-
imports.wbg.
|
|
924
|
+
imports.wbg.__wbindgen_init_externref_table = function() {
|
|
925
|
+
const table = wasm.__wbindgen_export_4;
|
|
926
|
+
const offset = table.grow(4);
|
|
927
|
+
table.set(0, void 0);
|
|
928
|
+
table.set(offset + 0, void 0);
|
|
929
|
+
table.set(offset + 1, null);
|
|
930
|
+
table.set(offset + 2, true);
|
|
931
|
+
table.set(offset + 3, false);
|
|
932
|
+
;
|
|
933
|
+
};
|
|
934
|
+
imports.wbg.__wbindgen_is_bigint = function(arg0) {
|
|
927
935
|
const ret = typeof arg0 === "bigint";
|
|
928
936
|
return ret;
|
|
929
937
|
};
|
|
930
|
-
imports.wbg.
|
|
938
|
+
imports.wbg.__wbindgen_is_function = function(arg0) {
|
|
931
939
|
const ret = typeof arg0 === "function";
|
|
932
940
|
return ret;
|
|
933
941
|
};
|
|
934
|
-
imports.wbg.
|
|
942
|
+
imports.wbg.__wbindgen_is_null = function(arg0) {
|
|
935
943
|
const ret = arg0 === null;
|
|
936
944
|
return ret;
|
|
937
945
|
};
|
|
938
|
-
imports.wbg.
|
|
946
|
+
imports.wbg.__wbindgen_is_object = function(arg0) {
|
|
939
947
|
const val = arg0;
|
|
940
948
|
const ret = typeof val === "object" && val !== null;
|
|
941
949
|
return ret;
|
|
942
950
|
};
|
|
943
|
-
imports.wbg.
|
|
951
|
+
imports.wbg.__wbindgen_is_string = function(arg0) {
|
|
944
952
|
const ret = typeof arg0 === "string";
|
|
945
953
|
return ret;
|
|
946
954
|
};
|
|
947
|
-
imports.wbg.
|
|
955
|
+
imports.wbg.__wbindgen_is_undefined = function(arg0) {
|
|
948
956
|
const ret = arg0 === void 0;
|
|
949
957
|
return ret;
|
|
950
958
|
};
|
|
951
|
-
imports.wbg.
|
|
959
|
+
imports.wbg.__wbindgen_jsval_eq = function(arg0, arg1) {
|
|
952
960
|
const ret = arg0 === arg1;
|
|
953
961
|
return ret;
|
|
954
962
|
};
|
|
955
|
-
imports.wbg.
|
|
963
|
+
imports.wbg.__wbindgen_jsval_loose_eq = function(arg0, arg1) {
|
|
956
964
|
const ret = arg0 == arg1;
|
|
957
965
|
return ret;
|
|
958
966
|
};
|
|
959
|
-
imports.wbg.
|
|
967
|
+
imports.wbg.__wbindgen_memory = function() {
|
|
968
|
+
const ret = wasm.memory;
|
|
969
|
+
return ret;
|
|
970
|
+
};
|
|
971
|
+
imports.wbg.__wbindgen_number_get = function(arg0, arg1) {
|
|
960
972
|
const obj = arg1;
|
|
961
973
|
const ret = typeof obj === "number" ? obj : void 0;
|
|
962
974
|
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
963
975
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
964
976
|
};
|
|
965
|
-
imports.wbg.
|
|
977
|
+
imports.wbg.__wbindgen_number_new = function(arg0) {
|
|
978
|
+
const ret = arg0;
|
|
979
|
+
return ret;
|
|
980
|
+
};
|
|
981
|
+
imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
|
|
966
982
|
const obj = arg1;
|
|
967
983
|
const ret = typeof obj === "string" ? obj : void 0;
|
|
968
984
|
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
@@ -970,46 +986,12 @@ function __wbg_get_imports() {
|
|
|
970
986
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
971
987
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
972
988
|
};
|
|
973
|
-
imports.wbg.
|
|
974
|
-
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
975
|
-
};
|
|
976
|
-
imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
|
|
989
|
+
imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
|
|
977
990
|
const ret = getStringFromWasm0(arg0, arg1);
|
|
978
991
|
return ret;
|
|
979
992
|
};
|
|
980
|
-
imports.wbg.
|
|
981
|
-
|
|
982
|
-
return ret;
|
|
983
|
-
};
|
|
984
|
-
imports.wbg.__wbindgen_cast_4625c577ab2ec9ee = function(arg0) {
|
|
985
|
-
const ret = BigInt.asUintN(64, arg0);
|
|
986
|
-
return ret;
|
|
987
|
-
};
|
|
988
|
-
imports.wbg.__wbindgen_cast_9ae0607507abb057 = function(arg0) {
|
|
989
|
-
const ret = arg0;
|
|
990
|
-
return ret;
|
|
991
|
-
};
|
|
992
|
-
imports.wbg.__wbindgen_cast_cb9088102bce6b30 = function(arg0, arg1) {
|
|
993
|
-
const ret = getArrayU8FromWasm0(arg0, arg1);
|
|
994
|
-
return ret;
|
|
995
|
-
};
|
|
996
|
-
imports.wbg.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {
|
|
997
|
-
const ret = arg0;
|
|
998
|
-
return ret;
|
|
999
|
-
};
|
|
1000
|
-
imports.wbg.__wbindgen_cast_f7331b0818e1ba43 = function(arg0, arg1) {
|
|
1001
|
-
const ret = makeMutClosure(arg0, arg1, 4201, __wbg_adapter_10);
|
|
1002
|
-
return ret;
|
|
1003
|
-
};
|
|
1004
|
-
imports.wbg.__wbindgen_init_externref_table = function() {
|
|
1005
|
-
const table = wasm.__wbindgen_export_4;
|
|
1006
|
-
const offset = table.grow(4);
|
|
1007
|
-
table.set(0, void 0);
|
|
1008
|
-
table.set(offset + 0, void 0);
|
|
1009
|
-
table.set(offset + 1, null);
|
|
1010
|
-
table.set(offset + 2, true);
|
|
1011
|
-
table.set(offset + 3, false);
|
|
1012
|
-
;
|
|
993
|
+
imports.wbg.__wbindgen_throw = function(arg0, arg1) {
|
|
994
|
+
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
1013
995
|
};
|
|
1014
996
|
return imports;
|
|
1015
997
|
}
|
|
@@ -1027,8 +1009,7 @@ function __wbg_finalize_init(instance, module2) {
|
|
|
1027
1009
|
}
|
|
1028
1010
|
__name(__wbg_finalize_init, "__wbg_finalize_init");
|
|
1029
1011
|
async function __wbg_init(module_or_path) {
|
|
1030
|
-
if (wasm !== void 0)
|
|
1031
|
-
return wasm;
|
|
1012
|
+
if (wasm !== void 0) return wasm;
|
|
1032
1013
|
if (typeof module_or_path !== "undefined") {
|
|
1033
1014
|
if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
|
|
1034
1015
|
({ module_or_path } = module_or_path);
|
|
@@ -1053,11 +1034,9 @@ var didkit_wasm_default = __wbg_init;
|
|
|
1053
1034
|
// src/didkit/index.ts
|
|
1054
1035
|
var initialized = false;
|
|
1055
1036
|
var generating = false;
|
|
1056
|
-
var init = /* @__PURE__ */ __name(async (arg = "https://cdn.filestackcontent.com/
|
|
1057
|
-
while (generating)
|
|
1058
|
-
|
|
1059
|
-
if (initialized)
|
|
1060
|
-
return;
|
|
1037
|
+
var init = /* @__PURE__ */ __name(async (arg = "https://cdn.filestackcontent.com/HReKwBTm2Wha4Wlo4uwe") => {
|
|
1038
|
+
while (generating) await new Promise((res) => setTimeout(res, 250));
|
|
1039
|
+
if (initialized) return;
|
|
1061
1040
|
try {
|
|
1062
1041
|
generating = true;
|
|
1063
1042
|
await didkit_wasm_default({ module_or_path: arg });
|
|
@@ -1074,13 +1053,10 @@ var didkit_default = init;
|
|
|
1074
1053
|
var getContextURIs = /* @__PURE__ */ __name((jsonld) => {
|
|
1075
1054
|
const contexts = [];
|
|
1076
1055
|
const traverse = /* @__PURE__ */ __name((obj) => {
|
|
1077
|
-
if (typeof obj !== "object" || obj === null)
|
|
1078
|
-
return;
|
|
1056
|
+
if (typeof obj !== "object" || obj === null) return;
|
|
1079
1057
|
if (obj["@context"]) {
|
|
1080
|
-
if (Array.isArray(obj["@context"]))
|
|
1081
|
-
|
|
1082
|
-
else
|
|
1083
|
-
contexts.push(obj["@context"]);
|
|
1058
|
+
if (Array.isArray(obj["@context"])) contexts.push(...obj["@context"]);
|
|
1059
|
+
else contexts.push(obj["@context"]);
|
|
1084
1060
|
}
|
|
1085
1061
|
Object.keys(obj).forEach((key) => {
|
|
1086
1062
|
traverse(obj[key]);
|
|
@@ -1096,8 +1072,7 @@ var getDocumentMap = /* @__PURE__ */ __name(async (learnCard, obj, allowRemoteCo
|
|
|
1096
1072
|
);
|
|
1097
1073
|
return uris.reduce((acc, cur, index) => {
|
|
1098
1074
|
const resolvedDoc = resolvedDocs[index];
|
|
1099
|
-
if (resolvedDoc)
|
|
1100
|
-
acc[cur] = JSON.stringify(resolvedDoc);
|
|
1075
|
+
if (resolvedDoc) acc[cur] = JSON.stringify(resolvedDoc);
|
|
1101
1076
|
return acc;
|
|
1102
1077
|
}, {});
|
|
1103
1078
|
}, "getDocumentMap");
|
|
@@ -1111,24 +1086,24 @@ var getDidKitPlugin = /* @__PURE__ */ __name(async (input, allowRemoteContexts =
|
|
|
1111
1086
|
displayName: "DIDKit",
|
|
1112
1087
|
description: "Provides an interface to DIDKit, which allows for the generation of key material, as well as signing and verifying credentials and presentations",
|
|
1113
1088
|
context: {
|
|
1114
|
-
resolveStaticDocument: async (_learnCard, url) => {
|
|
1089
|
+
resolveStaticDocument: /* @__PURE__ */ __name(async (_learnCard, url) => {
|
|
1115
1090
|
try {
|
|
1116
1091
|
return JSON.parse(await contextLoader(url) ?? "") || void 0;
|
|
1117
1092
|
} catch (error) {
|
|
1118
1093
|
_learnCard.debug?.(error);
|
|
1119
1094
|
return void 0;
|
|
1120
1095
|
}
|
|
1121
|
-
}
|
|
1096
|
+
}, "resolveStaticDocument")
|
|
1122
1097
|
},
|
|
1123
1098
|
methods: {
|
|
1124
|
-
generateEd25519KeyFromBytes: (_learnCard, bytes) => JSON.parse(generateEd25519KeyFromBytes(bytes)),
|
|
1125
|
-
generateSecp256k1KeyFromBytes: (_learnCard, bytes) => JSON.parse(generateSecp256k1KeyFromBytes(bytes)),
|
|
1126
|
-
keyToDid: (_learnCard, type, keypair) => {
|
|
1099
|
+
generateEd25519KeyFromBytes: /* @__PURE__ */ __name((_learnCard, bytes) => JSON.parse(generateEd25519KeyFromBytes(bytes)), "generateEd25519KeyFromBytes"),
|
|
1100
|
+
generateSecp256k1KeyFromBytes: /* @__PURE__ */ __name((_learnCard, bytes) => JSON.parse(generateSecp256k1KeyFromBytes(bytes)), "generateSecp256k1KeyFromBytes"),
|
|
1101
|
+
keyToDid: /* @__PURE__ */ __name((_learnCard, type, keypair) => {
|
|
1127
1102
|
return keyToDID(type, JSON.stringify(keypair));
|
|
1128
|
-
},
|
|
1129
|
-
keyToVerificationMethod: async (_learnCard, type, keypair) => keyToVerificationMethod(type, JSON.stringify(keypair)),
|
|
1130
|
-
didToVerificationMethod: async (_learnCard, did) => didToVerificationMethod(did),
|
|
1131
|
-
issueCredential: async (_learnCard, credential, options, keypair) => {
|
|
1103
|
+
}, "keyToDid"),
|
|
1104
|
+
keyToVerificationMethod: /* @__PURE__ */ __name(async (_learnCard, type, keypair) => keyToVerificationMethod(type, JSON.stringify(keypair)), "keyToVerificationMethod"),
|
|
1105
|
+
didToVerificationMethod: /* @__PURE__ */ __name(async (_learnCard, did) => didToVerificationMethod(did), "didToVerificationMethod"),
|
|
1106
|
+
issueCredential: /* @__PURE__ */ __name(async (_learnCard, credential, options, keypair) => {
|
|
1132
1107
|
return JSON.parse(
|
|
1133
1108
|
await issueCredential(
|
|
1134
1109
|
JSON.stringify(credential),
|
|
@@ -1139,8 +1114,8 @@ var getDidKitPlugin = /* @__PURE__ */ __name(async (input, allowRemoteContexts =
|
|
|
1139
1114
|
)
|
|
1140
1115
|
)
|
|
1141
1116
|
);
|
|
1142
|
-
},
|
|
1143
|
-
verifyCredential: async (_learnCard, credential, options = {}) => {
|
|
1117
|
+
}, "issueCredential"),
|
|
1118
|
+
verifyCredential: /* @__PURE__ */ __name(async (_learnCard, credential, options = {}) => {
|
|
1144
1119
|
return JSON.parse(
|
|
1145
1120
|
await verifyCredential(
|
|
1146
1121
|
JSON.stringify(credential),
|
|
@@ -1150,8 +1125,8 @@ var getDidKitPlugin = /* @__PURE__ */ __name(async (input, allowRemoteContexts =
|
|
|
1150
1125
|
)
|
|
1151
1126
|
)
|
|
1152
1127
|
);
|
|
1153
|
-
},
|
|
1154
|
-
issuePresentation: async (_learnCard, presentation, options, keypair) => {
|
|
1128
|
+
}, "verifyCredential"),
|
|
1129
|
+
issuePresentation: /* @__PURE__ */ __name(async (_learnCard, presentation, options, keypair) => {
|
|
1155
1130
|
const isJwt = options.proofFormat === "jwt";
|
|
1156
1131
|
const result = await issuePresentation(
|
|
1157
1132
|
JSON.stringify(presentation),
|
|
@@ -1162,8 +1137,8 @@ var getDidKitPlugin = /* @__PURE__ */ __name(async (input, allowRemoteContexts =
|
|
|
1162
1137
|
)
|
|
1163
1138
|
);
|
|
1164
1139
|
return isJwt ? result : JSON.parse(result);
|
|
1165
|
-
},
|
|
1166
|
-
verifyPresentation: async (_learnCard, presentation, options = {}) => {
|
|
1140
|
+
}, "issuePresentation"),
|
|
1141
|
+
verifyPresentation: /* @__PURE__ */ __name(async (_learnCard, presentation, options = {}) => {
|
|
1167
1142
|
const isJwt = typeof presentation === "string";
|
|
1168
1143
|
return JSON.parse(
|
|
1169
1144
|
await verifyPresentation(
|
|
@@ -1178,38 +1153,33 @@ var getDidKitPlugin = /* @__PURE__ */ __name(async (input, allowRemoteContexts =
|
|
|
1178
1153
|
)
|
|
1179
1154
|
)
|
|
1180
1155
|
);
|
|
1181
|
-
},
|
|
1182
|
-
contextLoader: async (_learnCard, url) => {
|
|
1156
|
+
}, "verifyPresentation"),
|
|
1157
|
+
contextLoader: /* @__PURE__ */ __name(async (_learnCard, url) => {
|
|
1183
1158
|
try {
|
|
1184
1159
|
return JSON.parse(await contextLoader(url) ?? "") || void 0;
|
|
1185
1160
|
} catch (error) {
|
|
1186
1161
|
_learnCard.debug?.(error);
|
|
1187
1162
|
return void 0;
|
|
1188
1163
|
}
|
|
1189
|
-
},
|
|
1190
|
-
resolveDid: async (_learnCard, did, inputMetadata = {}) => JSON.parse(await resolveDID(did, JSON.stringify(inputMetadata))),
|
|
1191
|
-
didResolver: async (_learnCard, did, inputMetadata = {}) => JSON.parse(await didResolver(did, JSON.stringify(inputMetadata))),
|
|
1192
|
-
createJwe: async (_learnCard, cleartext, recipients) => JSON.parse(await createJwe(cleartext, recipients)),
|
|
1193
|
-
decryptJwe: async (_learnCard, jwe, jwks) => decryptJwe(
|
|
1164
|
+
}, "contextLoader"),
|
|
1165
|
+
resolveDid: /* @__PURE__ */ __name(async (_learnCard, did, inputMetadata = {}) => JSON.parse(await resolveDID(did, JSON.stringify(inputMetadata))), "resolveDid"),
|
|
1166
|
+
didResolver: /* @__PURE__ */ __name(async (_learnCard, did, inputMetadata = {}) => JSON.parse(await didResolver(did, JSON.stringify(inputMetadata))), "didResolver"),
|
|
1167
|
+
createJwe: /* @__PURE__ */ __name(async (_learnCard, cleartext, recipients) => JSON.parse(await createJwe(cleartext, recipients)), "createJwe"),
|
|
1168
|
+
decryptJwe: /* @__PURE__ */ __name(async (_learnCard, jwe, jwks) => decryptJwe(
|
|
1194
1169
|
JSON.stringify(jwe),
|
|
1195
1170
|
jwks.map((jwk) => JSON.stringify(jwk))
|
|
1196
|
-
),
|
|
1197
|
-
createDagJwe: async (_learnCard, cleartext, recipients) => JSON.parse(await createDagJwe(cleartext, recipients)),
|
|
1198
|
-
decryptDagJwe: async (_learnCard, jwe, jwks) => {
|
|
1171
|
+
), "decryptJwe"),
|
|
1172
|
+
createDagJwe: /* @__PURE__ */ __name(async (_learnCard, cleartext, recipients) => JSON.parse(await createDagJwe(cleartext, recipients)), "createDagJwe"),
|
|
1173
|
+
decryptDagJwe: /* @__PURE__ */ __name(async (_learnCard, jwe, jwks) => {
|
|
1199
1174
|
const convertBigIntsToNumbers = /* @__PURE__ */ __name((obj) => {
|
|
1200
|
-
if (obj === null || obj === void 0)
|
|
1201
|
-
|
|
1202
|
-
if (
|
|
1203
|
-
|
|
1204
|
-
if (Array.isArray(obj))
|
|
1205
|
-
return obj.map(convertBigIntsToNumbers);
|
|
1206
|
-
if (typeof obj !== "object")
|
|
1207
|
-
return obj;
|
|
1175
|
+
if (obj === null || obj === void 0) return obj;
|
|
1176
|
+
if (typeof obj === "bigint") return Number(obj);
|
|
1177
|
+
if (Array.isArray(obj)) return obj.map(convertBigIntsToNumbers);
|
|
1178
|
+
if (typeof obj !== "object") return obj;
|
|
1208
1179
|
const hasNestedObjects = Object.values(obj).some(
|
|
1209
1180
|
(val) => typeof val === "bigint" || typeof val === "object" && val !== null
|
|
1210
1181
|
);
|
|
1211
|
-
if (!hasNestedObjects)
|
|
1212
|
-
return obj;
|
|
1182
|
+
if (!hasNestedObjects) return obj;
|
|
1213
1183
|
const result = {};
|
|
1214
1184
|
for (const key in obj) {
|
|
1215
1185
|
result[key] = convertBigIntsToNumbers(obj[key]);
|
|
@@ -1222,10 +1192,10 @@ var getDidKitPlugin = /* @__PURE__ */ __name(async (input, allowRemoteContexts =
|
|
|
1222
1192
|
jwks.map((jwk) => JSON.stringify(jwk))
|
|
1223
1193
|
)
|
|
1224
1194
|
);
|
|
1225
|
-
},
|
|
1226
|
-
clearDidWebCache: async () => {
|
|
1195
|
+
}, "decryptDagJwe"),
|
|
1196
|
+
clearDidWebCache: /* @__PURE__ */ __name(async () => {
|
|
1227
1197
|
await clearCache();
|
|
1228
|
-
}
|
|
1198
|
+
}, "clearDidWebCache")
|
|
1229
1199
|
}
|
|
1230
1200
|
};
|
|
1231
1201
|
}, "getDidKitPlugin");
|