@contentauth/c2pa-wasm 0.4.4 → 0.4.6
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/README.md +12 -4
- package/package.json +5 -1
- package/pkg/c2pa.d.ts +186 -174
- package/pkg/c2pa.js +950 -942
- package/pkg/c2pa_bg.wasm +0 -0
- package/pkg/c2pa_bg.wasm.d.ts +7 -7
package/pkg/c2pa.js
CHANGED
|
@@ -1,248 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
function addToExternrefTable0(obj) {
|
|
4
|
-
const idx = wasm.__externref_table_alloc();
|
|
5
|
-
wasm.__wbindgen_externrefs.set(idx, obj);
|
|
6
|
-
return idx;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
|
|
10
|
-
? { register: () => {}, unregister: () => {} }
|
|
11
|
-
: new FinalizationRegistry(state => state.dtor(state.a, state.b));
|
|
12
|
-
|
|
13
|
-
function debugString(val) {
|
|
14
|
-
// primitive types
|
|
15
|
-
const type = typeof val;
|
|
16
|
-
if (type == 'number' || type == 'boolean' || val == null) {
|
|
17
|
-
return `${val}`;
|
|
18
|
-
}
|
|
19
|
-
if (type == 'string') {
|
|
20
|
-
return `"${val}"`;
|
|
21
|
-
}
|
|
22
|
-
if (type == 'symbol') {
|
|
23
|
-
const description = val.description;
|
|
24
|
-
if (description == null) {
|
|
25
|
-
return 'Symbol';
|
|
26
|
-
} else {
|
|
27
|
-
return `Symbol(${description})`;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
if (type == 'function') {
|
|
31
|
-
const name = val.name;
|
|
32
|
-
if (typeof name == 'string' && name.length > 0) {
|
|
33
|
-
return `Function(${name})`;
|
|
34
|
-
} else {
|
|
35
|
-
return 'Function';
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
// objects
|
|
39
|
-
if (Array.isArray(val)) {
|
|
40
|
-
const length = val.length;
|
|
41
|
-
let debug = '[';
|
|
42
|
-
if (length > 0) {
|
|
43
|
-
debug += debugString(val[0]);
|
|
44
|
-
}
|
|
45
|
-
for(let i = 1; i < length; i++) {
|
|
46
|
-
debug += ', ' + debugString(val[i]);
|
|
47
|
-
}
|
|
48
|
-
debug += ']';
|
|
49
|
-
return debug;
|
|
50
|
-
}
|
|
51
|
-
// Test for built-in
|
|
52
|
-
const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
|
|
53
|
-
let className;
|
|
54
|
-
if (builtInMatches && builtInMatches.length > 1) {
|
|
55
|
-
className = builtInMatches[1];
|
|
56
|
-
} else {
|
|
57
|
-
// Failed to match the standard '[object ClassName]'
|
|
58
|
-
return toString.call(val);
|
|
59
|
-
}
|
|
60
|
-
if (className == 'Object') {
|
|
61
|
-
// we're a user defined class or Object
|
|
62
|
-
// JSON.stringify avoids problems with cycles, and is generally much
|
|
63
|
-
// easier than looping through ownProperties of `val`.
|
|
64
|
-
try {
|
|
65
|
-
return 'Object(' + JSON.stringify(val) + ')';
|
|
66
|
-
} catch (_) {
|
|
67
|
-
return 'Object';
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
// errors
|
|
71
|
-
if (val instanceof Error) {
|
|
72
|
-
return `${val.name}: ${val.message}\n${val.stack}`;
|
|
73
|
-
}
|
|
74
|
-
// TODO we could test for more things here, like `Set`s and `Map`s.
|
|
75
|
-
return className;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
function getArrayU8FromWasm0(ptr, len) {
|
|
79
|
-
ptr = ptr >>> 0;
|
|
80
|
-
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
let cachedDataViewMemory0 = null;
|
|
84
|
-
function getDataViewMemory0() {
|
|
85
|
-
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
|
|
86
|
-
cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
|
|
87
|
-
}
|
|
88
|
-
return cachedDataViewMemory0;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
function getStringFromWasm0(ptr, len) {
|
|
92
|
-
ptr = ptr >>> 0;
|
|
93
|
-
return decodeText(ptr, len);
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
let cachedUint8ArrayMemory0 = null;
|
|
97
|
-
function getUint8ArrayMemory0() {
|
|
98
|
-
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
99
|
-
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
100
|
-
}
|
|
101
|
-
return cachedUint8ArrayMemory0;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
function handleError(f, args) {
|
|
105
|
-
try {
|
|
106
|
-
return f.apply(this, args);
|
|
107
|
-
} catch (e) {
|
|
108
|
-
const idx = addToExternrefTable0(e);
|
|
109
|
-
wasm.__wbindgen_exn_store(idx);
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
function isLikeNone(x) {
|
|
114
|
-
return x === undefined || x === null;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
function makeMutClosure(arg0, arg1, dtor, f) {
|
|
118
|
-
const state = { a: arg0, b: arg1, cnt: 1, dtor };
|
|
119
|
-
const real = (...args) => {
|
|
120
|
-
|
|
121
|
-
// First up with a closure we increment the internal reference
|
|
122
|
-
// count. This ensures that the Rust closure environment won't
|
|
123
|
-
// be deallocated while we're invoking it.
|
|
124
|
-
state.cnt++;
|
|
125
|
-
const a = state.a;
|
|
126
|
-
state.a = 0;
|
|
127
|
-
try {
|
|
128
|
-
return f(a, state.b, ...args);
|
|
129
|
-
} finally {
|
|
130
|
-
state.a = a;
|
|
131
|
-
real._wbg_cb_unref();
|
|
132
|
-
}
|
|
133
|
-
};
|
|
134
|
-
real._wbg_cb_unref = () => {
|
|
135
|
-
if (--state.cnt === 0) {
|
|
136
|
-
state.dtor(state.a, state.b);
|
|
137
|
-
state.a = 0;
|
|
138
|
-
CLOSURE_DTORS.unregister(state);
|
|
139
|
-
}
|
|
140
|
-
};
|
|
141
|
-
CLOSURE_DTORS.register(real, state, state);
|
|
142
|
-
return real;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
function passStringToWasm0(arg, malloc, realloc) {
|
|
146
|
-
if (realloc === undefined) {
|
|
147
|
-
const buf = cachedTextEncoder.encode(arg);
|
|
148
|
-
const ptr = malloc(buf.length, 1) >>> 0;
|
|
149
|
-
getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
150
|
-
WASM_VECTOR_LEN = buf.length;
|
|
151
|
-
return ptr;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
let len = arg.length;
|
|
155
|
-
let ptr = malloc(len, 1) >>> 0;
|
|
156
|
-
|
|
157
|
-
const mem = getUint8ArrayMemory0();
|
|
158
|
-
|
|
159
|
-
let offset = 0;
|
|
160
|
-
|
|
161
|
-
for (; offset < len; offset++) {
|
|
162
|
-
const code = arg.charCodeAt(offset);
|
|
163
|
-
if (code > 0x7F) break;
|
|
164
|
-
mem[ptr + offset] = code;
|
|
165
|
-
}
|
|
166
|
-
if (offset !== len) {
|
|
167
|
-
if (offset !== 0) {
|
|
168
|
-
arg = arg.slice(offset);
|
|
169
|
-
}
|
|
170
|
-
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
171
|
-
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
172
|
-
const ret = cachedTextEncoder.encodeInto(arg, view);
|
|
173
|
-
|
|
174
|
-
offset += ret.written;
|
|
175
|
-
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
WASM_VECTOR_LEN = offset;
|
|
179
|
-
return ptr;
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
function takeFromExternrefTable0(idx) {
|
|
183
|
-
const value = wasm.__wbindgen_externrefs.get(idx);
|
|
184
|
-
wasm.__externref_table_dealloc(idx);
|
|
185
|
-
return value;
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
189
|
-
cachedTextDecoder.decode();
|
|
190
|
-
const MAX_SAFARI_DECODE_BYTES = 2146435072;
|
|
191
|
-
let numBytesDecoded = 0;
|
|
192
|
-
function decodeText(ptr, len) {
|
|
193
|
-
numBytesDecoded += len;
|
|
194
|
-
if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
|
|
195
|
-
cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
196
|
-
cachedTextDecoder.decode();
|
|
197
|
-
numBytesDecoded = len;
|
|
198
|
-
}
|
|
199
|
-
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
const cachedTextEncoder = new TextEncoder();
|
|
203
|
-
|
|
204
|
-
if (!('encodeInto' in cachedTextEncoder)) {
|
|
205
|
-
cachedTextEncoder.encodeInto = function (arg, view) {
|
|
206
|
-
const buf = cachedTextEncoder.encode(arg);
|
|
207
|
-
view.set(buf);
|
|
208
|
-
return {
|
|
209
|
-
read: arg.length,
|
|
210
|
-
written: buf.length
|
|
211
|
-
};
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
let WASM_VECTOR_LEN = 0;
|
|
216
|
-
|
|
217
|
-
function wasm_bindgen__convert__closures_____invoke__hfa979f81ae70afaa(arg0, arg1, arg2) {
|
|
218
|
-
wasm.wasm_bindgen__convert__closures_____invoke__hfa979f81ae70afaa(arg0, arg1, arg2);
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
function wasm_bindgen__convert__closures_____invoke__h6743aa07e10cb0d4(arg0, arg1) {
|
|
222
|
-
wasm.wasm_bindgen__convert__closures_____invoke__h6743aa07e10cb0d4(arg0, arg1);
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
function wasm_bindgen__convert__closures_____invoke__h536d005b97d28fdb(arg0, arg1, arg2, arg3) {
|
|
226
|
-
wasm.wasm_bindgen__convert__closures_____invoke__h536d005b97d28fdb(arg0, arg1, arg2, arg3);
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
const __wbindgen_enum_RequestCache = ["default", "no-store", "reload", "no-cache", "force-cache", "only-if-cached"];
|
|
230
|
-
|
|
231
|
-
const __wbindgen_enum_RequestCredentials = ["omit", "same-origin", "include"];
|
|
232
|
-
|
|
233
|
-
const __wbindgen_enum_RequestMode = ["same-origin", "no-cors", "cors", "navigate"];
|
|
234
|
-
|
|
235
|
-
const WasmBuilderFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
236
|
-
? { register: () => {}, unregister: () => {} }
|
|
237
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_wasmbuilder_free(ptr >>> 0, 1));
|
|
238
|
-
|
|
239
|
-
const WasmReaderFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
240
|
-
? { register: () => {}, unregister: () => {} }
|
|
241
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_wasmreader_free(ptr >>> 0, 1));
|
|
242
|
-
|
|
243
|
-
const WasmSignerFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
244
|
-
? { register: () => {}, unregister: () => {} }
|
|
245
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_wasmsigner_free(ptr >>> 0, 1));
|
|
1
|
+
/* @ts-self-types="./c2pa.d.ts" */
|
|
246
2
|
|
|
247
3
|
/**
|
|
248
4
|
* Wraps a `c2pa::Builder`.
|
|
@@ -276,25 +32,53 @@ export class WasmBuilder {
|
|
|
276
32
|
}
|
|
277
33
|
}
|
|
278
34
|
/**
|
|
279
|
-
*
|
|
280
|
-
*
|
|
35
|
+
* Add an ingredient to the manifest from a JSON ingredient definition without a blob
|
|
36
|
+
*
|
|
37
|
+
* # Arguments
|
|
38
|
+
* * `ingredient_json` - A JSON string representing the ingredient.
|
|
39
|
+
* @param {string} json
|
|
281
40
|
*/
|
|
282
|
-
|
|
283
|
-
const
|
|
41
|
+
addIngredient(json) {
|
|
42
|
+
const ptr0 = passStringToWasm0(json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
43
|
+
const len0 = WASM_VECTOR_LEN;
|
|
44
|
+
const ret = wasm.wasmbuilder_addIngredient(this.__wbg_ptr, ptr0, len0);
|
|
284
45
|
if (ret[1]) {
|
|
285
46
|
throw takeFromExternrefTable0(ret[0]);
|
|
286
47
|
}
|
|
287
48
|
}
|
|
288
49
|
/**
|
|
289
|
-
*
|
|
290
|
-
*
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
50
|
+
* Add an ingredient to the manifest from a JSON ingredient definition and a [`Blob`].
|
|
51
|
+
*
|
|
52
|
+
* # Arguments
|
|
53
|
+
* * `ingredient_json` - A JSON string representing the ingredient. This ingredient is merged with the ingredient specified in the `stream` argument, and these values take precedence.
|
|
54
|
+
* * `format` - The format of the ingredient.
|
|
55
|
+
* * `blob` - A [`Blob`] representing an asset which should be included as an ingredient.
|
|
56
|
+
* @param {string} json
|
|
57
|
+
* @param {string} format
|
|
58
|
+
* @param {Blob} blob
|
|
59
|
+
*/
|
|
60
|
+
addIngredientFromBlob(json, format, blob) {
|
|
61
|
+
const ptr0 = passStringToWasm0(json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
62
|
+
const len0 = WASM_VECTOR_LEN;
|
|
63
|
+
const ptr1 = passStringToWasm0(format, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
64
|
+
const len1 = WASM_VECTOR_LEN;
|
|
65
|
+
const ret = wasm.wasmbuilder_addIngredientFromBlob(this.__wbg_ptr, ptr0, len0, ptr1, len1, blob);
|
|
66
|
+
if (ret[1]) {
|
|
67
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Add a [`Blob`] to the manifest as a resource. The ID must match an identifier in the manifest.
|
|
72
|
+
* @param {string} id
|
|
73
|
+
* @param {Blob} blob
|
|
74
|
+
*/
|
|
75
|
+
addResourceFromBlob(id, blob) {
|
|
76
|
+
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
77
|
+
const len0 = WASM_VECTOR_LEN;
|
|
78
|
+
const ret = wasm.wasmbuilder_addResourceFromBlob(this.__wbg_ptr, ptr0, len0, blob);
|
|
79
|
+
if (ret[1]) {
|
|
80
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
296
81
|
}
|
|
297
|
-
return takeFromExternrefTable0(ret[0]);
|
|
298
82
|
}
|
|
299
83
|
/**
|
|
300
84
|
* Attempts to create a new `WasmBuilder` from a builder archive.
|
|
@@ -313,26 +97,22 @@ export class WasmBuilder {
|
|
|
313
97
|
return WasmBuilder.__wrap(ret[0]);
|
|
314
98
|
}
|
|
315
99
|
/**
|
|
316
|
-
*
|
|
317
|
-
*
|
|
318
|
-
*/
|
|
319
|
-
setNoEmbed(no_embed) {
|
|
320
|
-
wasm.wasmbuilder_setNoEmbed(this.__wbg_ptr, no_embed);
|
|
321
|
-
}
|
|
322
|
-
/**
|
|
323
|
-
* Add an ingredient to the manifest from a JSON ingredient definition without a blob
|
|
324
|
-
*
|
|
325
|
-
* # Arguments
|
|
326
|
-
* * `ingredient_json` - A JSON string representing the ingredient.
|
|
100
|
+
* Attempts to create a new `WasmBuilder` from a JSON ManifestDefinition string.
|
|
101
|
+
* Optionally accepts a context JSON string to configure the builder.
|
|
327
102
|
* @param {string} json
|
|
103
|
+
* @param {string | null} [context_json]
|
|
104
|
+
* @returns {WasmBuilder}
|
|
328
105
|
*/
|
|
329
|
-
|
|
106
|
+
static fromJson(json, context_json) {
|
|
330
107
|
const ptr0 = passStringToWasm0(json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
331
108
|
const len0 = WASM_VECTOR_LEN;
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
109
|
+
var ptr1 = isLikeNone(context_json) ? 0 : passStringToWasm0(context_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
110
|
+
var len1 = WASM_VECTOR_LEN;
|
|
111
|
+
const ret = wasm.wasmbuilder_fromJson(ptr0, len0, ptr1, len1);
|
|
112
|
+
if (ret[2]) {
|
|
113
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
335
114
|
}
|
|
115
|
+
return WasmBuilder.__wrap(ret[0]);
|
|
336
116
|
}
|
|
337
117
|
/**
|
|
338
118
|
* Get the current manifest definition.
|
|
@@ -345,6 +125,38 @@ export class WasmBuilder {
|
|
|
345
125
|
}
|
|
346
126
|
return takeFromExternrefTable0(ret[0]);
|
|
347
127
|
}
|
|
128
|
+
/**
|
|
129
|
+
* Creates a new `WasmBuilder` with a minimal manifest definition.
|
|
130
|
+
* Optionally accepts a context JSON string to configure the builder.
|
|
131
|
+
* @param {string | null} [context_json]
|
|
132
|
+
* @returns {WasmBuilder}
|
|
133
|
+
*/
|
|
134
|
+
static new(context_json) {
|
|
135
|
+
var ptr0 = isLikeNone(context_json) ? 0 : passStringToWasm0(context_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
136
|
+
var len0 = WASM_VECTOR_LEN;
|
|
137
|
+
const ret = wasm.wasmbuilder_new(ptr0, len0);
|
|
138
|
+
if (ret[2]) {
|
|
139
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
140
|
+
}
|
|
141
|
+
return WasmBuilder.__wrap(ret[0]);
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Sets the builder "intent."
|
|
145
|
+
* @param {any} json_intent
|
|
146
|
+
*/
|
|
147
|
+
setIntent(json_intent) {
|
|
148
|
+
const ret = wasm.wasmbuilder_setIntent(this.__wbg_ptr, json_intent);
|
|
149
|
+
if (ret[1]) {
|
|
150
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* Sets the state of the no_embed flag.
|
|
155
|
+
* @param {boolean} no_embed
|
|
156
|
+
*/
|
|
157
|
+
setNoEmbed(no_embed) {
|
|
158
|
+
wasm.wasmbuilder_setNoEmbed(this.__wbg_ptr, no_embed);
|
|
159
|
+
}
|
|
348
160
|
/**
|
|
349
161
|
* Sets the remote_url for a remote manifest.
|
|
350
162
|
*
|
|
@@ -357,19 +169,6 @@ export class WasmBuilder {
|
|
|
357
169
|
const len0 = WASM_VECTOR_LEN;
|
|
358
170
|
wasm.wasmbuilder_setRemoteUrl(this.__wbg_ptr, ptr0, len0);
|
|
359
171
|
}
|
|
360
|
-
/**
|
|
361
|
-
* Add a [`Blob`] to the manifest as a resource. The ID must match an identifier in the manifest.
|
|
362
|
-
* @param {string} id
|
|
363
|
-
* @param {Blob} blob
|
|
364
|
-
*/
|
|
365
|
-
addResourceFromBlob(id, blob) {
|
|
366
|
-
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
367
|
-
const len0 = WASM_VECTOR_LEN;
|
|
368
|
-
const ret = wasm.wasmbuilder_addResourceFromBlob(this.__wbg_ptr, ptr0, len0, blob);
|
|
369
|
-
if (ret[1]) {
|
|
370
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
371
|
-
}
|
|
372
|
-
}
|
|
373
172
|
/**
|
|
374
173
|
* Sets a thumbnail from a [`Blob`] to be included in the manifest. The thumbnail should represent the asset being signed.
|
|
375
174
|
* @param {string} format
|
|
@@ -383,86 +182,43 @@ export class WasmBuilder {
|
|
|
383
182
|
throw takeFromExternrefTable0(ret[0]);
|
|
384
183
|
}
|
|
385
184
|
}
|
|
386
|
-
/**
|
|
387
|
-
* Add an ingredient to the manifest from a JSON ingredient definition and a [`Blob`].
|
|
388
|
-
*
|
|
389
|
-
* # Arguments
|
|
390
|
-
* * `ingredient_json` - A JSON string representing the ingredient. This ingredient is merged with the ingredient specified in the `stream` argument, and these values take precedence.
|
|
391
|
-
* * `format` - The format of the ingredient.
|
|
392
|
-
* * `blob` - A [`Blob`] representing an asset which should be included as an ingredient.
|
|
393
|
-
* @param {string} json
|
|
394
|
-
* @param {string} format
|
|
395
|
-
* @param {Blob} blob
|
|
396
|
-
*/
|
|
397
|
-
addIngredientFromBlob(json, format, blob) {
|
|
398
|
-
const ptr0 = passStringToWasm0(json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
399
|
-
const len0 = WASM_VECTOR_LEN;
|
|
400
|
-
const ptr1 = passStringToWasm0(format, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
401
|
-
const len1 = WASM_VECTOR_LEN;
|
|
402
|
-
const ret = wasm.wasmbuilder_addIngredientFromBlob(this.__wbg_ptr, ptr0, len0, ptr1, len1, blob);
|
|
403
|
-
if (ret[1]) {
|
|
404
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
405
|
-
}
|
|
406
|
-
}
|
|
407
185
|
/**
|
|
408
186
|
* Sign an asset using the provided SignerDefinition, format, and source Blob.
|
|
409
|
-
* Use this method to get both the manifest bytes and the bytes of the signed asset.
|
|
410
187
|
* @param {SignerDefinition} signer_definition
|
|
411
188
|
* @param {string} format
|
|
412
189
|
* @param {Blob} source
|
|
413
|
-
* @returns {Promise<
|
|
190
|
+
* @returns {Promise<Uint8Array>}
|
|
414
191
|
*/
|
|
415
|
-
|
|
192
|
+
sign(signer_definition, format, source) {
|
|
416
193
|
const ptr0 = passStringToWasm0(format, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
417
194
|
const len0 = WASM_VECTOR_LEN;
|
|
418
|
-
const ret = wasm.
|
|
195
|
+
const ret = wasm.wasmbuilder_sign(this.__wbg_ptr, signer_definition, ptr0, len0, source);
|
|
419
196
|
return ret;
|
|
420
197
|
}
|
|
421
|
-
/**
|
|
422
|
-
* Creates a new `WasmBuilder` with a minimal manifest definition.
|
|
423
|
-
* Optionally accepts a context JSON string to configure the builder.
|
|
424
|
-
* @param {string | null} [context_json]
|
|
425
|
-
* @returns {WasmBuilder}
|
|
426
|
-
*/
|
|
427
|
-
static new(context_json) {
|
|
428
|
-
var ptr0 = isLikeNone(context_json) ? 0 : passStringToWasm0(context_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
429
|
-
var len0 = WASM_VECTOR_LEN;
|
|
430
|
-
const ret = wasm.wasmbuilder_new(ptr0, len0);
|
|
431
|
-
if (ret[2]) {
|
|
432
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
433
|
-
}
|
|
434
|
-
return WasmBuilder.__wrap(ret[0]);
|
|
435
|
-
}
|
|
436
198
|
/**
|
|
437
199
|
* Sign an asset using the provided SignerDefinition, format, and source Blob.
|
|
200
|
+
* Use this method to get both the manifest bytes and the bytes of the signed asset.
|
|
438
201
|
* @param {SignerDefinition} signer_definition
|
|
439
202
|
* @param {string} format
|
|
440
203
|
* @param {Blob} source
|
|
441
|
-
* @returns {Promise<
|
|
204
|
+
* @returns {Promise<any>}
|
|
442
205
|
*/
|
|
443
|
-
|
|
206
|
+
signAndGetManifestBytes(signer_definition, format, source) {
|
|
444
207
|
const ptr0 = passStringToWasm0(format, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
445
208
|
const len0 = WASM_VECTOR_LEN;
|
|
446
|
-
const ret = wasm.
|
|
209
|
+
const ret = wasm.wasmbuilder_signAndGetManifestBytes(this.__wbg_ptr, signer_definition, ptr0, len0, source);
|
|
447
210
|
return ret;
|
|
448
211
|
}
|
|
449
212
|
/**
|
|
450
|
-
*
|
|
451
|
-
*
|
|
452
|
-
* @param {string} json
|
|
453
|
-
* @param {string | null} [context_json]
|
|
454
|
-
* @returns {WasmBuilder}
|
|
213
|
+
* "Save" a builder to an archive.
|
|
214
|
+
* @returns {Uint8Array}
|
|
455
215
|
*/
|
|
456
|
-
|
|
457
|
-
const
|
|
458
|
-
const len0 = WASM_VECTOR_LEN;
|
|
459
|
-
var ptr1 = isLikeNone(context_json) ? 0 : passStringToWasm0(context_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
460
|
-
var len1 = WASM_VECTOR_LEN;
|
|
461
|
-
const ret = wasm.wasmbuilder_fromJson(ptr0, len0, ptr1, len1);
|
|
216
|
+
toArchive() {
|
|
217
|
+
const ret = wasm.wasmbuilder_toArchive(this.__wbg_ptr);
|
|
462
218
|
if (ret[2]) {
|
|
463
219
|
throw takeFromExternrefTable0(ret[1]);
|
|
464
220
|
}
|
|
465
|
-
return
|
|
221
|
+
return takeFromExternrefTable0(ret[0]);
|
|
466
222
|
}
|
|
467
223
|
}
|
|
468
224
|
if (Symbol.dispose) WasmBuilder.prototype[Symbol.dispose] = WasmBuilder.prototype.free;
|
|
@@ -501,17 +257,6 @@ export class WasmReader {
|
|
|
501
257
|
}
|
|
502
258
|
return v1;
|
|
503
259
|
}
|
|
504
|
-
/**
|
|
505
|
-
* Returns the asset's manifest store.
|
|
506
|
-
* @returns {any}
|
|
507
|
-
*/
|
|
508
|
-
manifestStore() {
|
|
509
|
-
const ret = wasm.wasmreader_manifestStore(this.__wbg_ptr);
|
|
510
|
-
if (ret[2]) {
|
|
511
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
512
|
-
}
|
|
513
|
-
return takeFromExternrefTable0(ret[0]);
|
|
514
|
-
}
|
|
515
260
|
/**
|
|
516
261
|
* Returns the asset's active manifest.
|
|
517
262
|
* @returns {any}
|
|
@@ -524,18 +269,20 @@ export class WasmReader {
|
|
|
524
269
|
return takeFromExternrefTable0(ret[0]);
|
|
525
270
|
}
|
|
526
271
|
/**
|
|
527
|
-
*
|
|
528
|
-
*
|
|
529
|
-
* @
|
|
272
|
+
* Attempts to create a new `WasmReader` from an asset format and `Blob` of the asset's bytes.
|
|
273
|
+
* Optionally accepts a context JSON string to configure the reader.
|
|
274
|
+
* @param {string} format
|
|
275
|
+
* @param {Blob} blob
|
|
276
|
+
* @param {string | null} [context_json]
|
|
277
|
+
* @returns {Promise<WasmReader>}
|
|
530
278
|
*/
|
|
531
|
-
|
|
532
|
-
const ptr0 = passStringToWasm0(
|
|
279
|
+
static fromBlob(format, blob, context_json) {
|
|
280
|
+
const ptr0 = passStringToWasm0(format, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
533
281
|
const len0 = WASM_VECTOR_LEN;
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
return takeFromExternrefTable0(ret[0]);
|
|
282
|
+
var ptr1 = isLikeNone(context_json) ? 0 : passStringToWasm0(context_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
283
|
+
var len1 = WASM_VECTOR_LEN;
|
|
284
|
+
const ret = wasm.wasmreader_fromBlob(ptr0, len0, blob, ptr1, len1);
|
|
285
|
+
return ret;
|
|
539
286
|
}
|
|
540
287
|
/**
|
|
541
288
|
* Attempts to create a new `WasmReader` from an asset format, a `Blob` of the bytes of the initial segment, and a fragment `Blob`.
|
|
@@ -571,20 +318,29 @@ export class WasmReader {
|
|
|
571
318
|
}
|
|
572
319
|
}
|
|
573
320
|
/**
|
|
574
|
-
*
|
|
575
|
-
*
|
|
576
|
-
* @param {string} format
|
|
577
|
-
* @param {Blob} blob
|
|
578
|
-
* @param {string | null} [context_json]
|
|
579
|
-
* @returns {Promise<WasmReader>}
|
|
321
|
+
* Returns the asset's manifest store.
|
|
322
|
+
* @returns {any}
|
|
580
323
|
*/
|
|
581
|
-
|
|
582
|
-
const
|
|
324
|
+
manifestStore() {
|
|
325
|
+
const ret = wasm.wasmreader_manifestStore(this.__wbg_ptr);
|
|
326
|
+
if (ret[2]) {
|
|
327
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
328
|
+
}
|
|
329
|
+
return takeFromExternrefTable0(ret[0]);
|
|
330
|
+
}
|
|
331
|
+
/**
|
|
332
|
+
* Accepts a URI reference to a binary object in the resource store and returns a `js_sys::Uint8Array` containing the resource's bytes.
|
|
333
|
+
* @param {string} uri
|
|
334
|
+
* @returns {Uint8Array}
|
|
335
|
+
*/
|
|
336
|
+
resourceToBytes(uri) {
|
|
337
|
+
const ptr0 = passStringToWasm0(uri, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
583
338
|
const len0 = WASM_VECTOR_LEN;
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
339
|
+
const ret = wasm.wasmreader_resourceToBytes(this.__wbg_ptr, ptr0, len0);
|
|
340
|
+
if (ret[2]) {
|
|
341
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
342
|
+
}
|
|
343
|
+
return takeFromExternrefTable0(ret[0]);
|
|
588
344
|
}
|
|
589
345
|
}
|
|
590
346
|
if (Symbol.dispose) WasmReader.prototype[Symbol.dispose] = WasmReader.prototype.free;
|
|
@@ -623,6 +379,12 @@ export class WasmSigner {
|
|
|
623
379
|
if (Symbol.dispose) WasmSigner.prototype[Symbol.dispose] = WasmSigner.prototype.free;
|
|
624
380
|
|
|
625
381
|
/**
|
|
382
|
+
*
|
|
383
|
+
* * NOTE: we can only return Err(JsString) or Err(JsValue) as error types here, because for some as-of-yet unknown
|
|
384
|
+
* * reason, wasm-bindgen appears to mishandle JsErrors when created in a Firefox web worker.
|
|
385
|
+
* *
|
|
386
|
+
* * See: https://github.com/wasm-bindgen/wasm-bindgen/issues/4961
|
|
387
|
+
*
|
|
626
388
|
* Accepts a JSON-serialized string to be loaded as c2pa-rs settings.
|
|
627
389
|
* @param {string} settings
|
|
628
390
|
*/
|
|
@@ -642,602 +404,849 @@ export function run() {
|
|
|
642
404
|
wasm.run();
|
|
643
405
|
}
|
|
644
406
|
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
407
|
+
function __wbg_get_imports() {
|
|
408
|
+
const import0 = {
|
|
409
|
+
__proto__: null,
|
|
410
|
+
__wbg_Error_83742b46f01ce22d: function(arg0, arg1) {
|
|
411
|
+
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
412
|
+
return ret;
|
|
413
|
+
},
|
|
414
|
+
__wbg_Number_a5a435bd7bbec835: function(arg0) {
|
|
415
|
+
const ret = Number(arg0);
|
|
416
|
+
return ret;
|
|
417
|
+
},
|
|
418
|
+
__wbg___wbindgen_bigint_get_as_i64_447a76b5c6ef7bda: function(arg0, arg1) {
|
|
419
|
+
const v = arg1;
|
|
420
|
+
const ret = typeof(v) === 'bigint' ? v : undefined;
|
|
421
|
+
getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
|
|
422
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
423
|
+
},
|
|
424
|
+
__wbg___wbindgen_boolean_get_c0f3f60bac5a78d1: function(arg0) {
|
|
425
|
+
const v = arg0;
|
|
426
|
+
const ret = typeof(v) === 'boolean' ? v : undefined;
|
|
427
|
+
return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
|
|
428
|
+
},
|
|
429
|
+
__wbg___wbindgen_debug_string_5398f5bb970e0daa: function(arg0, arg1) {
|
|
430
|
+
const ret = debugString(arg1);
|
|
431
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
432
|
+
const len1 = WASM_VECTOR_LEN;
|
|
433
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
434
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
435
|
+
},
|
|
436
|
+
__wbg___wbindgen_in_41dbb8413020e076: function(arg0, arg1) {
|
|
437
|
+
const ret = arg0 in arg1;
|
|
438
|
+
return ret;
|
|
439
|
+
},
|
|
440
|
+
__wbg___wbindgen_is_bigint_e2141d4f045b7eda: function(arg0) {
|
|
441
|
+
const ret = typeof(arg0) === 'bigint';
|
|
442
|
+
return ret;
|
|
443
|
+
},
|
|
444
|
+
__wbg___wbindgen_is_function_3c846841762788c1: function(arg0) {
|
|
445
|
+
const ret = typeof(arg0) === 'function';
|
|
446
|
+
return ret;
|
|
447
|
+
},
|
|
448
|
+
__wbg___wbindgen_is_object_781bc9f159099513: function(arg0) {
|
|
449
|
+
const val = arg0;
|
|
450
|
+
const ret = typeof(val) === 'object' && val !== null;
|
|
451
|
+
return ret;
|
|
452
|
+
},
|
|
453
|
+
__wbg___wbindgen_is_string_7ef6b97b02428fae: function(arg0) {
|
|
454
|
+
const ret = typeof(arg0) === 'string';
|
|
455
|
+
return ret;
|
|
456
|
+
},
|
|
457
|
+
__wbg___wbindgen_is_undefined_52709e72fb9f179c: function(arg0) {
|
|
458
|
+
const ret = arg0 === undefined;
|
|
459
|
+
return ret;
|
|
460
|
+
},
|
|
461
|
+
__wbg___wbindgen_jsval_eq_ee31bfad3e536463: function(arg0, arg1) {
|
|
462
|
+
const ret = arg0 === arg1;
|
|
463
|
+
return ret;
|
|
464
|
+
},
|
|
465
|
+
__wbg___wbindgen_jsval_loose_eq_5bcc3bed3c69e72b: function(arg0, arg1) {
|
|
466
|
+
const ret = arg0 == arg1;
|
|
467
|
+
return ret;
|
|
468
|
+
},
|
|
469
|
+
__wbg___wbindgen_number_get_34bb9d9dcfa21373: function(arg0, arg1) {
|
|
470
|
+
const obj = arg1;
|
|
471
|
+
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
472
|
+
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
473
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
474
|
+
},
|
|
475
|
+
__wbg___wbindgen_string_get_395e606bd0ee4427: function(arg0, arg1) {
|
|
476
|
+
const obj = arg1;
|
|
477
|
+
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
478
|
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
479
|
+
var len1 = WASM_VECTOR_LEN;
|
|
480
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
481
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
482
|
+
},
|
|
483
|
+
__wbg___wbindgen_throw_6ddd609b62940d55: function(arg0, arg1) {
|
|
484
|
+
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
485
|
+
},
|
|
486
|
+
__wbg__wbg_cb_unref_6b5b6b8576d35cb1: function(arg0) {
|
|
487
|
+
arg0._wbg_cb_unref();
|
|
488
|
+
},
|
|
489
|
+
__wbg_abort_5ef96933660780b7: function(arg0) {
|
|
490
|
+
arg0.abort();
|
|
491
|
+
},
|
|
492
|
+
__wbg_abort_6479c2d794ebf2ee: function(arg0, arg1) {
|
|
493
|
+
arg0.abort(arg1);
|
|
494
|
+
},
|
|
495
|
+
__wbg_append_608dfb635ee8998f: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
496
|
+
arg0.append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
497
|
+
}, arguments); },
|
|
498
|
+
__wbg_arrayBuffer_eb8e9ca620af2a19: function() { return handleError(function (arg0) {
|
|
499
|
+
const ret = arg0.arrayBuffer();
|
|
500
|
+
return ret;
|
|
501
|
+
}, arguments); },
|
|
502
|
+
__wbg_byteLength_607b856aa6c5a508: function(arg0) {
|
|
503
|
+
const ret = arg0.byteLength;
|
|
504
|
+
return ret;
|
|
505
|
+
},
|
|
506
|
+
__wbg_call_2d781c1f4d5c0ef8: function() { return handleError(function (arg0, arg1, arg2) {
|
|
507
|
+
const ret = arg0.call(arg1, arg2);
|
|
508
|
+
return ret;
|
|
509
|
+
}, arguments); },
|
|
510
|
+
__wbg_call_e133b57c9155d22c: function() { return handleError(function (arg0, arg1) {
|
|
511
|
+
const ret = arg0.call(arg1);
|
|
512
|
+
return ret;
|
|
513
|
+
}, arguments); },
|
|
514
|
+
__wbg_clearTimeout_6b8d9a38b9263d65: function(arg0) {
|
|
515
|
+
const ret = clearTimeout(arg0);
|
|
516
|
+
return ret;
|
|
517
|
+
},
|
|
518
|
+
__wbg_crypto_38df2bab126b63dc: function(arg0) {
|
|
519
|
+
const ret = arg0.crypto;
|
|
520
|
+
return ret;
|
|
521
|
+
},
|
|
522
|
+
__wbg_done_08ce71ee07e3bd17: function(arg0) {
|
|
523
|
+
const ret = arg0.done;
|
|
524
|
+
return ret;
|
|
525
|
+
},
|
|
526
|
+
__wbg_entries_e8a20ff8c9757101: function(arg0) {
|
|
527
|
+
const ret = Object.entries(arg0);
|
|
528
|
+
return ret;
|
|
529
|
+
},
|
|
530
|
+
__wbg_error_a6fa202b58aa1cd3: function(arg0, arg1) {
|
|
531
|
+
let deferred0_0;
|
|
532
|
+
let deferred0_1;
|
|
533
|
+
try {
|
|
534
|
+
deferred0_0 = arg0;
|
|
535
|
+
deferred0_1 = arg1;
|
|
536
|
+
console.error(getStringFromWasm0(arg0, arg1));
|
|
537
|
+
} finally {
|
|
538
|
+
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
539
|
+
}
|
|
540
|
+
},
|
|
541
|
+
__wbg_fetch_5550a88cf343aaa9: function(arg0, arg1) {
|
|
542
|
+
const ret = arg0.fetch(arg1);
|
|
543
|
+
return ret;
|
|
544
|
+
},
|
|
545
|
+
__wbg_fetch_9dad4fe911207b37: function(arg0) {
|
|
546
|
+
const ret = fetch(arg0);
|
|
547
|
+
return ret;
|
|
548
|
+
},
|
|
549
|
+
__wbg_from_4bdf88943703fd48: function(arg0) {
|
|
550
|
+
const ret = Array.from(arg0);
|
|
551
|
+
return ret;
|
|
552
|
+
},
|
|
553
|
+
__wbg_getRandomValues_3dda8830c2565714: function() { return handleError(function (arg0, arg1) {
|
|
554
|
+
globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
|
|
555
|
+
}, arguments); },
|
|
556
|
+
__wbg_getRandomValues_3f44b700395062e5: function() { return handleError(function (arg0, arg1) {
|
|
557
|
+
globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
|
|
558
|
+
}, arguments); },
|
|
559
|
+
__wbg_getRandomValues_c44a50d8cfdaebeb: function() { return handleError(function (arg0, arg1) {
|
|
560
|
+
arg0.getRandomValues(arg1);
|
|
561
|
+
}, arguments); },
|
|
562
|
+
__wbg_getTime_1dad7b5386ddd2d9: function(arg0) {
|
|
563
|
+
const ret = arg0.getTime();
|
|
564
|
+
return ret;
|
|
565
|
+
},
|
|
566
|
+
__wbg_get_326e41e095fb2575: function() { return handleError(function (arg0, arg1) {
|
|
567
|
+
const ret = Reflect.get(arg0, arg1);
|
|
568
|
+
return ret;
|
|
569
|
+
}, arguments); },
|
|
570
|
+
__wbg_get_3ef1eba1850ade27: function() { return handleError(function (arg0, arg1) {
|
|
571
|
+
const ret = Reflect.get(arg0, arg1);
|
|
572
|
+
return ret;
|
|
573
|
+
}, arguments); },
|
|
574
|
+
__wbg_get_a8ee5c45dabc1b3b: function(arg0, arg1) {
|
|
575
|
+
const ret = arg0[arg1 >>> 0];
|
|
576
|
+
return ret;
|
|
577
|
+
},
|
|
578
|
+
__wbg_get_unchecked_329cfe50afab7352: function(arg0, arg1) {
|
|
579
|
+
const ret = arg0[arg1 >>> 0];
|
|
580
|
+
return ret;
|
|
581
|
+
},
|
|
582
|
+
__wbg_get_with_ref_key_6412cf3094599694: function(arg0, arg1) {
|
|
583
|
+
const ret = arg0[arg1];
|
|
584
|
+
return ret;
|
|
585
|
+
},
|
|
586
|
+
__wbg_has_926ef2ff40b308cf: function() { return handleError(function (arg0, arg1) {
|
|
587
|
+
const ret = Reflect.has(arg0, arg1);
|
|
588
|
+
return ret;
|
|
589
|
+
}, arguments); },
|
|
590
|
+
__wbg_headers_eb2234545f9ff993: function(arg0) {
|
|
591
|
+
const ret = arg0.headers;
|
|
592
|
+
return ret;
|
|
593
|
+
},
|
|
594
|
+
__wbg_instanceof_ArrayBuffer_101e2bf31071a9f6: function(arg0) {
|
|
595
|
+
let result;
|
|
596
|
+
try {
|
|
597
|
+
result = arg0 instanceof ArrayBuffer;
|
|
598
|
+
} catch (_) {
|
|
599
|
+
result = false;
|
|
600
|
+
}
|
|
601
|
+
const ret = result;
|
|
602
|
+
return ret;
|
|
603
|
+
},
|
|
604
|
+
__wbg_instanceof_Map_f194b366846aca0c: function(arg0) {
|
|
605
|
+
let result;
|
|
606
|
+
try {
|
|
607
|
+
result = arg0 instanceof Map;
|
|
608
|
+
} catch (_) {
|
|
609
|
+
result = false;
|
|
610
|
+
}
|
|
611
|
+
const ret = result;
|
|
612
|
+
return ret;
|
|
613
|
+
},
|
|
614
|
+
__wbg_instanceof_Promise_7c3bdd7805c2c6e6: function(arg0) {
|
|
615
|
+
let result;
|
|
616
|
+
try {
|
|
617
|
+
result = arg0 instanceof Promise;
|
|
618
|
+
} catch (_) {
|
|
619
|
+
result = false;
|
|
620
|
+
}
|
|
621
|
+
const ret = result;
|
|
622
|
+
return ret;
|
|
623
|
+
},
|
|
624
|
+
__wbg_instanceof_Response_9b4d9fd451e051b1: function(arg0) {
|
|
625
|
+
let result;
|
|
626
|
+
try {
|
|
627
|
+
result = arg0 instanceof Response;
|
|
628
|
+
} catch (_) {
|
|
629
|
+
result = false;
|
|
630
|
+
}
|
|
631
|
+
const ret = result;
|
|
632
|
+
return ret;
|
|
633
|
+
},
|
|
634
|
+
__wbg_instanceof_Uint8Array_740438561a5b956d: function(arg0) {
|
|
635
|
+
let result;
|
|
636
|
+
try {
|
|
637
|
+
result = arg0 instanceof Uint8Array;
|
|
638
|
+
} catch (_) {
|
|
639
|
+
result = false;
|
|
640
|
+
}
|
|
641
|
+
const ret = result;
|
|
642
|
+
return ret;
|
|
643
|
+
},
|
|
644
|
+
__wbg_isArray_33b91feb269ff46e: function(arg0) {
|
|
645
|
+
const ret = Array.isArray(arg0);
|
|
646
|
+
return ret;
|
|
647
|
+
},
|
|
648
|
+
__wbg_isSafeInteger_ecd6a7f9c3e053cd: function(arg0) {
|
|
649
|
+
const ret = Number.isSafeInteger(arg0);
|
|
650
|
+
return ret;
|
|
651
|
+
},
|
|
652
|
+
__wbg_iterator_d8f549ec8fb061b1: function() {
|
|
653
|
+
const ret = Symbol.iterator;
|
|
654
|
+
return ret;
|
|
655
|
+
},
|
|
656
|
+
__wbg_length_b3416cf66a5452c8: function(arg0) {
|
|
657
|
+
const ret = arg0.length;
|
|
658
|
+
return ret;
|
|
659
|
+
},
|
|
660
|
+
__wbg_length_ea16607d7b61445b: function(arg0) {
|
|
661
|
+
const ret = arg0.length;
|
|
662
|
+
return ret;
|
|
663
|
+
},
|
|
664
|
+
__wbg_msCrypto_bd5a034af96bcba6: function(arg0) {
|
|
665
|
+
const ret = arg0.msCrypto;
|
|
666
|
+
return ret;
|
|
667
|
+
},
|
|
668
|
+
__wbg_new_0837727332ac86ba: function() { return handleError(function () {
|
|
669
|
+
const ret = new Headers();
|
|
670
|
+
return ret;
|
|
671
|
+
}, arguments); },
|
|
672
|
+
__wbg_new_0_1dcafdf5e786e876: function() {
|
|
673
|
+
const ret = new Date();
|
|
674
|
+
return ret;
|
|
675
|
+
},
|
|
676
|
+
__wbg_new_227d7c05414eb861: function() {
|
|
677
|
+
const ret = new Error();
|
|
678
|
+
return ret;
|
|
679
|
+
},
|
|
680
|
+
__wbg_new_338f3b13aa93419b: function() { return handleError(function () {
|
|
681
|
+
const ret = new FileReaderSync();
|
|
682
|
+
return ret;
|
|
683
|
+
}, arguments); },
|
|
684
|
+
__wbg_new_49d5571bd3f0c4d4: function() {
|
|
685
|
+
const ret = new Map();
|
|
686
|
+
return ret;
|
|
687
|
+
},
|
|
688
|
+
__wbg_new_5f486cdf45a04d78: function(arg0) {
|
|
689
|
+
const ret = new Uint8Array(arg0);
|
|
690
|
+
return ret;
|
|
691
|
+
},
|
|
692
|
+
__wbg_new_a70fbab9066b301f: function() {
|
|
693
|
+
const ret = new Array();
|
|
694
|
+
return ret;
|
|
695
|
+
},
|
|
696
|
+
__wbg_new_ab79df5bd7c26067: function() {
|
|
697
|
+
const ret = new Object();
|
|
698
|
+
return ret;
|
|
699
|
+
},
|
|
700
|
+
__wbg_new_c518c60af666645b: function() { return handleError(function () {
|
|
701
|
+
const ret = new AbortController();
|
|
702
|
+
return ret;
|
|
703
|
+
}, arguments); },
|
|
704
|
+
__wbg_new_from_slice_22da9388ac046e50: function(arg0, arg1) {
|
|
705
|
+
const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
|
|
706
|
+
return ret;
|
|
707
|
+
},
|
|
708
|
+
__wbg_new_typed_aaaeaf29cf802876: function(arg0, arg1) {
|
|
709
|
+
try {
|
|
710
|
+
var state0 = {a: arg0, b: arg1};
|
|
711
|
+
var cb0 = (arg0, arg1) => {
|
|
712
|
+
const a = state0.a;
|
|
713
|
+
state0.a = 0;
|
|
714
|
+
try {
|
|
715
|
+
return wasm_bindgen__convert__closures_____invoke__h27acc2ed1032081e(a, state0.b, arg0, arg1);
|
|
716
|
+
} finally {
|
|
717
|
+
state0.a = a;
|
|
718
|
+
}
|
|
719
|
+
};
|
|
720
|
+
const ret = new Promise(cb0);
|
|
721
|
+
return ret;
|
|
722
|
+
} finally {
|
|
723
|
+
state0.a = state0.b = 0;
|
|
724
|
+
}
|
|
725
|
+
},
|
|
726
|
+
__wbg_new_with_length_825018a1616e9e55: function(arg0) {
|
|
727
|
+
const ret = new Uint8Array(arg0 >>> 0);
|
|
728
|
+
return ret;
|
|
729
|
+
},
|
|
730
|
+
__wbg_new_with_str_and_init_b4b54d1a819bc724: function() { return handleError(function (arg0, arg1, arg2) {
|
|
731
|
+
const ret = new Request(getStringFromWasm0(arg0, arg1), arg2);
|
|
732
|
+
return ret;
|
|
733
|
+
}, arguments); },
|
|
734
|
+
__wbg_next_11b99ee6237339e3: function() { return handleError(function (arg0) {
|
|
735
|
+
const ret = arg0.next();
|
|
736
|
+
return ret;
|
|
737
|
+
}, arguments); },
|
|
738
|
+
__wbg_next_e01a967809d1aa68: function(arg0) {
|
|
739
|
+
const ret = arg0.next;
|
|
740
|
+
return ret;
|
|
741
|
+
},
|
|
742
|
+
__wbg_node_84ea875411254db1: function(arg0) {
|
|
743
|
+
const ret = arg0.node;
|
|
744
|
+
return ret;
|
|
745
|
+
},
|
|
746
|
+
__wbg_now_16f0c993d5dd6c27: function() {
|
|
747
|
+
const ret = Date.now();
|
|
748
|
+
return ret;
|
|
749
|
+
},
|
|
750
|
+
__wbg_process_44c7a14e11e9f69e: function(arg0) {
|
|
751
|
+
const ret = arg0.process;
|
|
752
|
+
return ret;
|
|
753
|
+
},
|
|
754
|
+
__wbg_prototypesetcall_d62e5099504357e6: function(arg0, arg1, arg2) {
|
|
755
|
+
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
|
|
756
|
+
},
|
|
757
|
+
__wbg_queueMicrotask_0c399741342fb10f: function(arg0) {
|
|
758
|
+
const ret = arg0.queueMicrotask;
|
|
759
|
+
return ret;
|
|
760
|
+
},
|
|
761
|
+
__wbg_queueMicrotask_a082d78ce798393e: function(arg0) {
|
|
762
|
+
queueMicrotask(arg0);
|
|
763
|
+
},
|
|
764
|
+
__wbg_randomFillSync_6c25eac9869eb53c: function() { return handleError(function (arg0, arg1) {
|
|
765
|
+
arg0.randomFillSync(arg1);
|
|
766
|
+
}, arguments); },
|
|
767
|
+
__wbg_readAsArrayBuffer_762e6372375b4632: function() { return handleError(function (arg0, arg1) {
|
|
768
|
+
const ret = arg0.readAsArrayBuffer(arg1);
|
|
769
|
+
return ret;
|
|
770
|
+
}, arguments); },
|
|
771
|
+
__wbg_require_b4edbdcf3e2a1ef0: function() { return handleError(function () {
|
|
772
|
+
const ret = module.require;
|
|
773
|
+
return ret;
|
|
774
|
+
}, arguments); },
|
|
775
|
+
__wbg_resolve_ae8d83246e5bcc12: function(arg0) {
|
|
776
|
+
const ret = Promise.resolve(arg0);
|
|
777
|
+
return ret;
|
|
778
|
+
},
|
|
779
|
+
__wbg_setTimeout_f757f00851f76c42: function(arg0, arg1) {
|
|
780
|
+
const ret = setTimeout(arg0, arg1);
|
|
781
|
+
return ret;
|
|
782
|
+
},
|
|
783
|
+
__wbg_set_282384002438957f: function(arg0, arg1, arg2) {
|
|
784
|
+
arg0[arg1 >>> 0] = arg2;
|
|
785
|
+
},
|
|
786
|
+
__wbg_set_6be42768c690e380: function(arg0, arg1, arg2) {
|
|
787
|
+
arg0[arg1] = arg2;
|
|
788
|
+
},
|
|
789
|
+
__wbg_set_8c0b3ffcf05d61c2: function(arg0, arg1, arg2) {
|
|
790
|
+
arg0.set(getArrayU8FromWasm0(arg1, arg2));
|
|
791
|
+
},
|
|
792
|
+
__wbg_set_bf7251625df30a02: function(arg0, arg1, arg2) {
|
|
793
|
+
const ret = arg0.set(arg1, arg2);
|
|
794
|
+
return ret;
|
|
795
|
+
},
|
|
796
|
+
__wbg_set_body_a3d856b097dfda04: function(arg0, arg1) {
|
|
797
|
+
arg0.body = arg1;
|
|
798
|
+
},
|
|
799
|
+
__wbg_set_cache_ec7e430c6056ebda: function(arg0, arg1) {
|
|
800
|
+
arg0.cache = __wbindgen_enum_RequestCache[arg1];
|
|
801
|
+
},
|
|
802
|
+
__wbg_set_credentials_ed63183445882c65: function(arg0, arg1) {
|
|
803
|
+
arg0.credentials = __wbindgen_enum_RequestCredentials[arg1];
|
|
804
|
+
},
|
|
805
|
+
__wbg_set_headers_3c8fecc693b75327: function(arg0, arg1) {
|
|
806
|
+
arg0.headers = arg1;
|
|
807
|
+
},
|
|
808
|
+
__wbg_set_method_8c015e8bcafd7be1: function(arg0, arg1, arg2) {
|
|
809
|
+
arg0.method = getStringFromWasm0(arg1, arg2);
|
|
810
|
+
},
|
|
811
|
+
__wbg_set_mode_5a87f2c809cf37c2: function(arg0, arg1) {
|
|
812
|
+
arg0.mode = __wbindgen_enum_RequestMode[arg1];
|
|
813
|
+
},
|
|
814
|
+
__wbg_set_signal_0cebecb698f25d21: function(arg0, arg1) {
|
|
815
|
+
arg0.signal = arg1;
|
|
816
|
+
},
|
|
817
|
+
__wbg_signal_166e1da31adcac18: function(arg0) {
|
|
818
|
+
const ret = arg0.signal;
|
|
819
|
+
return ret;
|
|
820
|
+
},
|
|
821
|
+
__wbg_size_819df95195daae81: function(arg0) {
|
|
822
|
+
const ret = arg0.size;
|
|
823
|
+
return ret;
|
|
824
|
+
},
|
|
825
|
+
__wbg_slice_f55d290dcc799204: function() { return handleError(function (arg0, arg1, arg2) {
|
|
826
|
+
const ret = arg0.slice(arg1, arg2);
|
|
827
|
+
return ret;
|
|
828
|
+
}, arguments); },
|
|
829
|
+
__wbg_stack_3b0d974bbf31e44f: function(arg0, arg1) {
|
|
830
|
+
const ret = arg1.stack;
|
|
831
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
832
|
+
const len1 = WASM_VECTOR_LEN;
|
|
833
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
834
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
835
|
+
},
|
|
836
|
+
__wbg_static_accessor_GLOBAL_8adb955bd33fac2f: function() {
|
|
837
|
+
const ret = typeof global === 'undefined' ? null : global;
|
|
838
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
839
|
+
},
|
|
840
|
+
__wbg_static_accessor_GLOBAL_THIS_ad356e0db91c7913: function() {
|
|
841
|
+
const ret = typeof globalThis === 'undefined' ? null : globalThis;
|
|
842
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
843
|
+
},
|
|
844
|
+
__wbg_static_accessor_SELF_f207c857566db248: function() {
|
|
845
|
+
const ret = typeof self === 'undefined' ? null : self;
|
|
846
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
847
|
+
},
|
|
848
|
+
__wbg_static_accessor_WINDOW_bb9f1ba69d61b386: function() {
|
|
849
|
+
const ret = typeof window === 'undefined' ? null : window;
|
|
850
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
851
|
+
},
|
|
852
|
+
__wbg_status_318629ab93a22955: function(arg0) {
|
|
853
|
+
const ret = arg0.status;
|
|
854
|
+
return ret;
|
|
855
|
+
},
|
|
856
|
+
__wbg_stringify_5ae93966a84901ac: function() { return handleError(function (arg0) {
|
|
857
|
+
const ret = JSON.stringify(arg0);
|
|
858
|
+
return ret;
|
|
859
|
+
}, arguments); },
|
|
860
|
+
__wbg_subarray_a068d24e39478a8a: function(arg0, arg1, arg2) {
|
|
861
|
+
const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
|
|
862
|
+
return ret;
|
|
863
|
+
},
|
|
864
|
+
__wbg_then_098abe61755d12f6: function(arg0, arg1) {
|
|
865
|
+
const ret = arg0.then(arg1);
|
|
866
|
+
return ret;
|
|
867
|
+
},
|
|
868
|
+
__wbg_then_9e335f6dd892bc11: function(arg0, arg1, arg2) {
|
|
869
|
+
const ret = arg0.then(arg1, arg2);
|
|
870
|
+
return ret;
|
|
871
|
+
},
|
|
872
|
+
__wbg_url_7fefc1820fba4e0c: function(arg0, arg1) {
|
|
873
|
+
const ret = arg1.url;
|
|
874
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
875
|
+
const len1 = WASM_VECTOR_LEN;
|
|
876
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
877
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
878
|
+
},
|
|
879
|
+
__wbg_valueOf_3dcf9bcf2e496cb2: function(arg0) {
|
|
880
|
+
const ret = arg0.valueOf();
|
|
881
|
+
return ret;
|
|
882
|
+
},
|
|
883
|
+
__wbg_value_21fc78aab0322612: function(arg0) {
|
|
884
|
+
const ret = arg0.value;
|
|
885
|
+
return ret;
|
|
886
|
+
},
|
|
887
|
+
__wbg_versions_276b2795b1c6a219: function(arg0) {
|
|
888
|
+
const ret = arg0.versions;
|
|
889
|
+
return ret;
|
|
890
|
+
},
|
|
891
|
+
__wbg_wasmreader_new: function(arg0) {
|
|
892
|
+
const ret = WasmReader.__wrap(arg0);
|
|
893
|
+
return ret;
|
|
894
|
+
},
|
|
895
|
+
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
|
896
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 1501, function: Function { arguments: [], shim_idx: 1502, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
897
|
+
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h65b3b0e0904996a4, wasm_bindgen__convert__closures_____invoke__h11a8a009ad66a767);
|
|
898
|
+
return ret;
|
|
899
|
+
},
|
|
900
|
+
__wbindgen_cast_0000000000000002: function(arg0, arg1) {
|
|
901
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 1504, function: Function { arguments: [Externref], shim_idx: 2953, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
902
|
+
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__hc0a5e156ad330742, wasm_bindgen__convert__closures_____invoke__h21611001dce0af13);
|
|
903
|
+
return ret;
|
|
904
|
+
},
|
|
905
|
+
__wbindgen_cast_0000000000000003: function(arg0) {
|
|
906
|
+
// Cast intrinsic for `F64 -> Externref`.
|
|
907
|
+
const ret = arg0;
|
|
908
|
+
return ret;
|
|
909
|
+
},
|
|
910
|
+
__wbindgen_cast_0000000000000004: function(arg0) {
|
|
911
|
+
// Cast intrinsic for `I64 -> Externref`.
|
|
912
|
+
const ret = arg0;
|
|
913
|
+
return ret;
|
|
914
|
+
},
|
|
915
|
+
__wbindgen_cast_0000000000000005: function(arg0, arg1) {
|
|
916
|
+
// Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
|
|
917
|
+
const ret = getArrayU8FromWasm0(arg0, arg1);
|
|
918
|
+
return ret;
|
|
919
|
+
},
|
|
920
|
+
__wbindgen_cast_0000000000000006: function(arg0, arg1) {
|
|
921
|
+
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
922
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
923
|
+
return ret;
|
|
924
|
+
},
|
|
925
|
+
__wbindgen_cast_0000000000000007: function(arg0) {
|
|
926
|
+
// Cast intrinsic for `U64 -> Externref`.
|
|
927
|
+
const ret = BigInt.asUintN(64, arg0);
|
|
928
|
+
return ret;
|
|
929
|
+
},
|
|
930
|
+
__wbindgen_cast_0000000000000008: function(arg0, arg1) {
|
|
931
|
+
var v0 = getArrayU8FromWasm0(arg0, arg1).slice();
|
|
932
|
+
wasm.__wbindgen_free(arg0, arg1 * 1, 1);
|
|
933
|
+
// Cast intrinsic for `Vector(U8) -> Externref`.
|
|
934
|
+
const ret = v0;
|
|
935
|
+
return ret;
|
|
936
|
+
},
|
|
937
|
+
__wbindgen_init_externref_table: function() {
|
|
938
|
+
const table = wasm.__wbindgen_externrefs;
|
|
939
|
+
const offset = table.grow(4);
|
|
940
|
+
table.set(0, undefined);
|
|
941
|
+
table.set(offset + 0, undefined);
|
|
942
|
+
table.set(offset + 1, null);
|
|
943
|
+
table.set(offset + 2, true);
|
|
944
|
+
table.set(offset + 3, false);
|
|
945
|
+
},
|
|
946
|
+
};
|
|
947
|
+
return {
|
|
948
|
+
__proto__: null,
|
|
949
|
+
"./c2pa_bg.js": import0,
|
|
950
|
+
};
|
|
951
|
+
}
|
|
668
952
|
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
953
|
+
function wasm_bindgen__convert__closures_____invoke__h11a8a009ad66a767(arg0, arg1) {
|
|
954
|
+
wasm.wasm_bindgen__convert__closures_____invoke__h11a8a009ad66a767(arg0, arg1);
|
|
955
|
+
}
|
|
956
|
+
|
|
957
|
+
function wasm_bindgen__convert__closures_____invoke__h21611001dce0af13(arg0, arg1, arg2) {
|
|
958
|
+
const ret = wasm.wasm_bindgen__convert__closures_____invoke__h21611001dce0af13(arg0, arg1, arg2);
|
|
959
|
+
if (ret[1]) {
|
|
960
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
674
961
|
}
|
|
675
962
|
}
|
|
676
963
|
|
|
677
|
-
function
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
}
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
return
|
|
717
|
-
}
|
|
718
|
-
|
|
719
|
-
const
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
const ret = typeof(arg0) === 'string';
|
|
725
|
-
return ret;
|
|
726
|
-
};
|
|
727
|
-
imports.wbg.__wbg___wbindgen_is_undefined_f6b95eab589e0269 = function(arg0) {
|
|
728
|
-
const ret = arg0 === undefined;
|
|
729
|
-
return ret;
|
|
730
|
-
};
|
|
731
|
-
imports.wbg.__wbg___wbindgen_jsval_eq_b6101cc9cef1fe36 = function(arg0, arg1) {
|
|
732
|
-
const ret = arg0 === arg1;
|
|
733
|
-
return ret;
|
|
734
|
-
};
|
|
735
|
-
imports.wbg.__wbg___wbindgen_jsval_loose_eq_766057600fdd1b0d = function(arg0, arg1) {
|
|
736
|
-
const ret = arg0 == arg1;
|
|
737
|
-
return ret;
|
|
738
|
-
};
|
|
739
|
-
imports.wbg.__wbg___wbindgen_number_get_9619185a74197f95 = function(arg0, arg1) {
|
|
740
|
-
const obj = arg1;
|
|
741
|
-
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
742
|
-
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
743
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
744
|
-
};
|
|
745
|
-
imports.wbg.__wbg___wbindgen_string_get_a2a31e16edf96e42 = function(arg0, arg1) {
|
|
746
|
-
const obj = arg1;
|
|
747
|
-
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
748
|
-
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
749
|
-
var len1 = WASM_VECTOR_LEN;
|
|
750
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
751
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
752
|
-
};
|
|
753
|
-
imports.wbg.__wbg___wbindgen_throw_dd24417ed36fc46e = function(arg0, arg1) {
|
|
754
|
-
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
755
|
-
};
|
|
756
|
-
imports.wbg.__wbg__wbg_cb_unref_87dfb5aaa0cbcea7 = function(arg0) {
|
|
757
|
-
arg0._wbg_cb_unref();
|
|
758
|
-
};
|
|
759
|
-
imports.wbg.__wbg_abort_07646c894ebbf2bd = function(arg0) {
|
|
760
|
-
arg0.abort();
|
|
761
|
-
};
|
|
762
|
-
imports.wbg.__wbg_abort_399ecbcfd6ef3c8e = function(arg0, arg1) {
|
|
763
|
-
arg0.abort(arg1);
|
|
764
|
-
};
|
|
765
|
-
imports.wbg.__wbg_append_c5cbdf46455cc776 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
766
|
-
arg0.append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
767
|
-
}, arguments) };
|
|
768
|
-
imports.wbg.__wbg_arrayBuffer_c04af4fce566092d = function() { return handleError(function (arg0) {
|
|
769
|
-
const ret = arg0.arrayBuffer();
|
|
770
|
-
return ret;
|
|
771
|
-
}, arguments) };
|
|
772
|
-
imports.wbg.__wbg_byteLength_faa9938885bdeee6 = function(arg0) {
|
|
773
|
-
const ret = arg0.byteLength;
|
|
774
|
-
return ret;
|
|
775
|
-
};
|
|
776
|
-
imports.wbg.__wbg_call_3020136f7a2d6e44 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
777
|
-
const ret = arg0.call(arg1, arg2);
|
|
778
|
-
return ret;
|
|
779
|
-
}, arguments) };
|
|
780
|
-
imports.wbg.__wbg_call_abb4ff46ce38be40 = function() { return handleError(function (arg0, arg1) {
|
|
781
|
-
const ret = arg0.call(arg1);
|
|
782
|
-
return ret;
|
|
783
|
-
}, arguments) };
|
|
784
|
-
imports.wbg.__wbg_clearTimeout_7a42b49784aea641 = function(arg0) {
|
|
785
|
-
const ret = clearTimeout(arg0);
|
|
786
|
-
return ret;
|
|
787
|
-
};
|
|
788
|
-
imports.wbg.__wbg_crypto_574e78ad8b13b65f = function(arg0) {
|
|
789
|
-
const ret = arg0.crypto;
|
|
790
|
-
return ret;
|
|
791
|
-
};
|
|
792
|
-
imports.wbg.__wbg_done_62ea16af4ce34b24 = function(arg0) {
|
|
793
|
-
const ret = arg0.done;
|
|
794
|
-
return ret;
|
|
795
|
-
};
|
|
796
|
-
imports.wbg.__wbg_entries_83c79938054e065f = function(arg0) {
|
|
797
|
-
const ret = Object.entries(arg0);
|
|
798
|
-
return ret;
|
|
799
|
-
};
|
|
800
|
-
imports.wbg.__wbg_error_7534b8e9a36f1ab4 = function(arg0, arg1) {
|
|
801
|
-
let deferred0_0;
|
|
802
|
-
let deferred0_1;
|
|
803
|
-
try {
|
|
804
|
-
deferred0_0 = arg0;
|
|
805
|
-
deferred0_1 = arg1;
|
|
806
|
-
console.error(getStringFromWasm0(arg0, arg1));
|
|
807
|
-
} finally {
|
|
808
|
-
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
964
|
+
function wasm_bindgen__convert__closures_____invoke__h27acc2ed1032081e(arg0, arg1, arg2, arg3) {
|
|
965
|
+
wasm.wasm_bindgen__convert__closures_____invoke__h27acc2ed1032081e(arg0, arg1, arg2, arg3);
|
|
966
|
+
}
|
|
967
|
+
|
|
968
|
+
|
|
969
|
+
const __wbindgen_enum_RequestCache = ["default", "no-store", "reload", "no-cache", "force-cache", "only-if-cached"];
|
|
970
|
+
|
|
971
|
+
|
|
972
|
+
const __wbindgen_enum_RequestCredentials = ["omit", "same-origin", "include"];
|
|
973
|
+
|
|
974
|
+
|
|
975
|
+
const __wbindgen_enum_RequestMode = ["same-origin", "no-cors", "cors", "navigate"];
|
|
976
|
+
const WasmBuilderFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
977
|
+
? { register: () => {}, unregister: () => {} }
|
|
978
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_wasmbuilder_free(ptr >>> 0, 1));
|
|
979
|
+
const WasmReaderFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
980
|
+
? { register: () => {}, unregister: () => {} }
|
|
981
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_wasmreader_free(ptr >>> 0, 1));
|
|
982
|
+
const WasmSignerFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
983
|
+
? { register: () => {}, unregister: () => {} }
|
|
984
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_wasmsigner_free(ptr >>> 0, 1));
|
|
985
|
+
|
|
986
|
+
function addToExternrefTable0(obj) {
|
|
987
|
+
const idx = wasm.__externref_table_alloc();
|
|
988
|
+
wasm.__wbindgen_externrefs.set(idx, obj);
|
|
989
|
+
return idx;
|
|
990
|
+
}
|
|
991
|
+
|
|
992
|
+
const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
|
|
993
|
+
? { register: () => {}, unregister: () => {} }
|
|
994
|
+
: new FinalizationRegistry(state => state.dtor(state.a, state.b));
|
|
995
|
+
|
|
996
|
+
function debugString(val) {
|
|
997
|
+
// primitive types
|
|
998
|
+
const type = typeof val;
|
|
999
|
+
if (type == 'number' || type == 'boolean' || val == null) {
|
|
1000
|
+
return `${val}`;
|
|
1001
|
+
}
|
|
1002
|
+
if (type == 'string') {
|
|
1003
|
+
return `"${val}"`;
|
|
1004
|
+
}
|
|
1005
|
+
if (type == 'symbol') {
|
|
1006
|
+
const description = val.description;
|
|
1007
|
+
if (description == null) {
|
|
1008
|
+
return 'Symbol';
|
|
1009
|
+
} else {
|
|
1010
|
+
return `Symbol(${description})`;
|
|
809
1011
|
}
|
|
810
|
-
}
|
|
811
|
-
|
|
812
|
-
const
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
return ret;
|
|
818
|
-
};
|
|
819
|
-
imports.wbg.__wbg_from_29a8414a7a7cd19d = function(arg0) {
|
|
820
|
-
const ret = Array.from(arg0);
|
|
821
|
-
return ret;
|
|
822
|
-
};
|
|
823
|
-
imports.wbg.__wbg_getRandomValues_1c61fac11405ffdc = function() { return handleError(function (arg0, arg1) {
|
|
824
|
-
globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
|
|
825
|
-
}, arguments) };
|
|
826
|
-
imports.wbg.__wbg_getRandomValues_38a1ff1ea09f6cc7 = function() { return handleError(function (arg0, arg1) {
|
|
827
|
-
globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
|
|
828
|
-
}, arguments) };
|
|
829
|
-
imports.wbg.__wbg_getRandomValues_b8f5dbd5f3995a9e = function() { return handleError(function (arg0, arg1) {
|
|
830
|
-
arg0.getRandomValues(arg1);
|
|
831
|
-
}, arguments) };
|
|
832
|
-
imports.wbg.__wbg_getTime_ad1e9878a735af08 = function(arg0) {
|
|
833
|
-
const ret = arg0.getTime();
|
|
834
|
-
return ret;
|
|
835
|
-
};
|
|
836
|
-
imports.wbg.__wbg_get_6b7bd52aca3f9671 = function(arg0, arg1) {
|
|
837
|
-
const ret = arg0[arg1 >>> 0];
|
|
838
|
-
return ret;
|
|
839
|
-
};
|
|
840
|
-
imports.wbg.__wbg_get_af9dab7e9603ea93 = function() { return handleError(function (arg0, arg1) {
|
|
841
|
-
const ret = Reflect.get(arg0, arg1);
|
|
842
|
-
return ret;
|
|
843
|
-
}, arguments) };
|
|
844
|
-
imports.wbg.__wbg_get_with_ref_key_1dc361bd10053bfe = function(arg0, arg1) {
|
|
845
|
-
const ret = arg0[arg1];
|
|
846
|
-
return ret;
|
|
847
|
-
};
|
|
848
|
-
imports.wbg.__wbg_has_0e670569d65d3a45 = function() { return handleError(function (arg0, arg1) {
|
|
849
|
-
const ret = Reflect.has(arg0, arg1);
|
|
850
|
-
return ret;
|
|
851
|
-
}, arguments) };
|
|
852
|
-
imports.wbg.__wbg_headers_654c30e1bcccc552 = function(arg0) {
|
|
853
|
-
const ret = arg0.headers;
|
|
854
|
-
return ret;
|
|
855
|
-
};
|
|
856
|
-
imports.wbg.__wbg_instanceof_ArrayBuffer_f3320d2419cd0355 = function(arg0) {
|
|
857
|
-
let result;
|
|
858
|
-
try {
|
|
859
|
-
result = arg0 instanceof ArrayBuffer;
|
|
860
|
-
} catch (_) {
|
|
861
|
-
result = false;
|
|
1012
|
+
}
|
|
1013
|
+
if (type == 'function') {
|
|
1014
|
+
const name = val.name;
|
|
1015
|
+
if (typeof name == 'string' && name.length > 0) {
|
|
1016
|
+
return `Function(${name})`;
|
|
1017
|
+
} else {
|
|
1018
|
+
return 'Function';
|
|
862
1019
|
}
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
let
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
} catch (_) {
|
|
871
|
-
result = false;
|
|
1020
|
+
}
|
|
1021
|
+
// objects
|
|
1022
|
+
if (Array.isArray(val)) {
|
|
1023
|
+
const length = val.length;
|
|
1024
|
+
let debug = '[';
|
|
1025
|
+
if (length > 0) {
|
|
1026
|
+
debug += debugString(val[0]);
|
|
872
1027
|
}
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
1028
|
+
for(let i = 1; i < length; i++) {
|
|
1029
|
+
debug += ', ' + debugString(val[i]);
|
|
1030
|
+
}
|
|
1031
|
+
debug += ']';
|
|
1032
|
+
return debug;
|
|
1033
|
+
}
|
|
1034
|
+
// Test for built-in
|
|
1035
|
+
const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
|
|
1036
|
+
let className;
|
|
1037
|
+
if (builtInMatches && builtInMatches.length > 1) {
|
|
1038
|
+
className = builtInMatches[1];
|
|
1039
|
+
} else {
|
|
1040
|
+
// Failed to match the standard '[object ClassName]'
|
|
1041
|
+
return toString.call(val);
|
|
1042
|
+
}
|
|
1043
|
+
if (className == 'Object') {
|
|
1044
|
+
// we're a user defined class or Object
|
|
1045
|
+
// JSON.stringify avoids problems with cycles, and is generally much
|
|
1046
|
+
// easier than looping through ownProperties of `val`.
|
|
878
1047
|
try {
|
|
879
|
-
|
|
1048
|
+
return 'Object(' + JSON.stringify(val) + ')';
|
|
880
1049
|
} catch (_) {
|
|
881
|
-
|
|
1050
|
+
return 'Object';
|
|
882
1051
|
}
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
1052
|
+
}
|
|
1053
|
+
// errors
|
|
1054
|
+
if (val instanceof Error) {
|
|
1055
|
+
return `${val.name}: ${val.message}\n${val.stack}`;
|
|
1056
|
+
}
|
|
1057
|
+
// TODO we could test for more things here, like `Set`s and `Map`s.
|
|
1058
|
+
return className;
|
|
1059
|
+
}
|
|
1060
|
+
|
|
1061
|
+
function getArrayU8FromWasm0(ptr, len) {
|
|
1062
|
+
ptr = ptr >>> 0;
|
|
1063
|
+
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
1064
|
+
}
|
|
1065
|
+
|
|
1066
|
+
let cachedDataViewMemory0 = null;
|
|
1067
|
+
function getDataViewMemory0() {
|
|
1068
|
+
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
|
|
1069
|
+
cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
|
|
1070
|
+
}
|
|
1071
|
+
return cachedDataViewMemory0;
|
|
1072
|
+
}
|
|
1073
|
+
|
|
1074
|
+
function getStringFromWasm0(ptr, len) {
|
|
1075
|
+
ptr = ptr >>> 0;
|
|
1076
|
+
return decodeText(ptr, len);
|
|
1077
|
+
}
|
|
1078
|
+
|
|
1079
|
+
let cachedUint8ArrayMemory0 = null;
|
|
1080
|
+
function getUint8ArrayMemory0() {
|
|
1081
|
+
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
1082
|
+
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
1083
|
+
}
|
|
1084
|
+
return cachedUint8ArrayMemory0;
|
|
1085
|
+
}
|
|
1086
|
+
|
|
1087
|
+
function handleError(f, args) {
|
|
1088
|
+
try {
|
|
1089
|
+
return f.apply(this, args);
|
|
1090
|
+
} catch (e) {
|
|
1091
|
+
const idx = addToExternrefTable0(e);
|
|
1092
|
+
wasm.__wbindgen_exn_store(idx);
|
|
1093
|
+
}
|
|
1094
|
+
}
|
|
1095
|
+
|
|
1096
|
+
function isLikeNone(x) {
|
|
1097
|
+
return x === undefined || x === null;
|
|
1098
|
+
}
|
|
1099
|
+
|
|
1100
|
+
function makeMutClosure(arg0, arg1, dtor, f) {
|
|
1101
|
+
const state = { a: arg0, b: arg1, cnt: 1, dtor };
|
|
1102
|
+
const real = (...args) => {
|
|
1103
|
+
|
|
1104
|
+
// First up with a closure we increment the internal reference
|
|
1105
|
+
// count. This ensures that the Rust closure environment won't
|
|
1106
|
+
// be deallocated while we're invoking it.
|
|
1107
|
+
state.cnt++;
|
|
1108
|
+
const a = state.a;
|
|
1109
|
+
state.a = 0;
|
|
888
1110
|
try {
|
|
889
|
-
|
|
890
|
-
}
|
|
891
|
-
|
|
1111
|
+
return f(a, state.b, ...args);
|
|
1112
|
+
} finally {
|
|
1113
|
+
state.a = a;
|
|
1114
|
+
real._wbg_cb_unref();
|
|
892
1115
|
}
|
|
893
|
-
const ret = result;
|
|
894
|
-
return ret;
|
|
895
1116
|
};
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
result = false;
|
|
1117
|
+
real._wbg_cb_unref = () => {
|
|
1118
|
+
if (--state.cnt === 0) {
|
|
1119
|
+
state.dtor(state.a, state.b);
|
|
1120
|
+
state.a = 0;
|
|
1121
|
+
CLOSURE_DTORS.unregister(state);
|
|
902
1122
|
}
|
|
903
|
-
const ret = result;
|
|
904
|
-
return ret;
|
|
905
|
-
};
|
|
906
|
-
imports.wbg.__wbg_isArray_51fd9e6422c0a395 = function(arg0) {
|
|
907
|
-
const ret = Array.isArray(arg0);
|
|
908
|
-
return ret;
|
|
909
|
-
};
|
|
910
|
-
imports.wbg.__wbg_isSafeInteger_ae7d3f054d55fa16 = function(arg0) {
|
|
911
|
-
const ret = Number.isSafeInteger(arg0);
|
|
912
|
-
return ret;
|
|
913
|
-
};
|
|
914
|
-
imports.wbg.__wbg_iterator_27b7c8b35ab3e86b = function() {
|
|
915
|
-
const ret = Symbol.iterator;
|
|
916
|
-
return ret;
|
|
917
|
-
};
|
|
918
|
-
imports.wbg.__wbg_length_22ac23eaec9d8053 = function(arg0) {
|
|
919
|
-
const ret = arg0.length;
|
|
920
|
-
return ret;
|
|
921
|
-
};
|
|
922
|
-
imports.wbg.__wbg_length_d45040a40c570362 = function(arg0) {
|
|
923
|
-
const ret = arg0.length;
|
|
924
|
-
return ret;
|
|
925
|
-
};
|
|
926
|
-
imports.wbg.__wbg_msCrypto_a61aeb35a24c1329 = function(arg0) {
|
|
927
|
-
const ret = arg0.msCrypto;
|
|
928
|
-
return ret;
|
|
929
|
-
};
|
|
930
|
-
imports.wbg.__wbg_new_0_23cedd11d9b40c9d = function() {
|
|
931
|
-
const ret = new Date();
|
|
932
|
-
return ret;
|
|
933
|
-
};
|
|
934
|
-
imports.wbg.__wbg_new_1ba21ce319a06297 = function() {
|
|
935
|
-
const ret = new Object();
|
|
936
|
-
return ret;
|
|
937
|
-
};
|
|
938
|
-
imports.wbg.__wbg_new_25f239778d6112b9 = function() {
|
|
939
|
-
const ret = new Array();
|
|
940
|
-
return ret;
|
|
941
|
-
};
|
|
942
|
-
imports.wbg.__wbg_new_3c79b3bb1b32b7d3 = function() { return handleError(function () {
|
|
943
|
-
const ret = new Headers();
|
|
944
|
-
return ret;
|
|
945
|
-
}, arguments) };
|
|
946
|
-
imports.wbg.__wbg_new_6421f6084cc5bc5a = function(arg0) {
|
|
947
|
-
const ret = new Uint8Array(arg0);
|
|
948
|
-
return ret;
|
|
949
|
-
};
|
|
950
|
-
imports.wbg.__wbg_new_881a222c65f168fc = function() { return handleError(function () {
|
|
951
|
-
const ret = new AbortController();
|
|
952
|
-
return ret;
|
|
953
|
-
}, arguments) };
|
|
954
|
-
imports.wbg.__wbg_new_8a6f238a6ece86ea = function() {
|
|
955
|
-
const ret = new Error();
|
|
956
|
-
return ret;
|
|
957
|
-
};
|
|
958
|
-
imports.wbg.__wbg_new_b546ae120718850e = function() {
|
|
959
|
-
const ret = new Map();
|
|
960
|
-
return ret;
|
|
961
|
-
};
|
|
962
|
-
imports.wbg.__wbg_new_bd4ee84941f474fa = function() { return handleError(function () {
|
|
963
|
-
const ret = new FileReaderSync();
|
|
964
|
-
return ret;
|
|
965
|
-
}, arguments) };
|
|
966
|
-
imports.wbg.__wbg_new_df1173567d5ff028 = function(arg0, arg1) {
|
|
967
|
-
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
968
|
-
return ret;
|
|
969
1123
|
};
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
1124
|
+
CLOSURE_DTORS.register(real, state, state);
|
|
1125
|
+
return real;
|
|
1126
|
+
}
|
|
1127
|
+
|
|
1128
|
+
function passStringToWasm0(arg, malloc, realloc) {
|
|
1129
|
+
if (realloc === undefined) {
|
|
1130
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
1131
|
+
const ptr = malloc(buf.length, 1) >>> 0;
|
|
1132
|
+
getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
1133
|
+
WASM_VECTOR_LEN = buf.length;
|
|
1134
|
+
return ptr;
|
|
1135
|
+
}
|
|
1136
|
+
|
|
1137
|
+
let len = arg.length;
|
|
1138
|
+
let ptr = malloc(len, 1) >>> 0;
|
|
1139
|
+
|
|
1140
|
+
const mem = getUint8ArrayMemory0();
|
|
1141
|
+
|
|
1142
|
+
let offset = 0;
|
|
1143
|
+
|
|
1144
|
+
for (; offset < len; offset++) {
|
|
1145
|
+
const code = arg.charCodeAt(offset);
|
|
1146
|
+
if (code > 0x7F) break;
|
|
1147
|
+
mem[ptr + offset] = code;
|
|
1148
|
+
}
|
|
1149
|
+
if (offset !== len) {
|
|
1150
|
+
if (offset !== 0) {
|
|
1151
|
+
arg = arg.slice(offset);
|
|
986
1152
|
}
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
const ret =
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
return ret;
|
|
999
|
-
};
|
|
1000
|
-
imports.wbg.__wbg_new_with_str_and_init_c5748f76f5108934 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
1001
|
-
const ret = new Request(getStringFromWasm0(arg0, arg1), arg2);
|
|
1002
|
-
return ret;
|
|
1003
|
-
}, arguments) };
|
|
1004
|
-
imports.wbg.__wbg_next_138a17bbf04e926c = function(arg0) {
|
|
1005
|
-
const ret = arg0.next;
|
|
1006
|
-
return ret;
|
|
1007
|
-
};
|
|
1008
|
-
imports.wbg.__wbg_next_3cfe5c0fe2a4cc53 = function() { return handleError(function (arg0) {
|
|
1009
|
-
const ret = arg0.next();
|
|
1010
|
-
return ret;
|
|
1011
|
-
}, arguments) };
|
|
1012
|
-
imports.wbg.__wbg_node_905d3e251edff8a2 = function(arg0) {
|
|
1013
|
-
const ret = arg0.node;
|
|
1014
|
-
return ret;
|
|
1015
|
-
};
|
|
1016
|
-
imports.wbg.__wbg_now_69d776cd24f5215b = function() {
|
|
1017
|
-
const ret = Date.now();
|
|
1018
|
-
return ret;
|
|
1019
|
-
};
|
|
1020
|
-
imports.wbg.__wbg_process_dc0fbacc7c1c06f7 = function(arg0) {
|
|
1021
|
-
const ret = arg0.process;
|
|
1022
|
-
return ret;
|
|
1023
|
-
};
|
|
1024
|
-
imports.wbg.__wbg_prototypesetcall_dfe9b766cdc1f1fd = function(arg0, arg1, arg2) {
|
|
1025
|
-
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
|
|
1026
|
-
};
|
|
1027
|
-
imports.wbg.__wbg_queueMicrotask_9b549dfce8865860 = function(arg0) {
|
|
1028
|
-
const ret = arg0.queueMicrotask;
|
|
1029
|
-
return ret;
|
|
1030
|
-
};
|
|
1031
|
-
imports.wbg.__wbg_queueMicrotask_fca69f5bfad613a5 = function(arg0) {
|
|
1032
|
-
queueMicrotask(arg0);
|
|
1033
|
-
};
|
|
1034
|
-
imports.wbg.__wbg_randomFillSync_ac0988aba3254290 = function() { return handleError(function (arg0, arg1) {
|
|
1035
|
-
arg0.randomFillSync(arg1);
|
|
1036
|
-
}, arguments) };
|
|
1037
|
-
imports.wbg.__wbg_readAsArrayBuffer_5a7ad12aa99daa2f = function() { return handleError(function (arg0, arg1) {
|
|
1038
|
-
const ret = arg0.readAsArrayBuffer(arg1);
|
|
1039
|
-
return ret;
|
|
1040
|
-
}, arguments) };
|
|
1041
|
-
imports.wbg.__wbg_require_60cc747a6bc5215a = function() { return handleError(function () {
|
|
1042
|
-
const ret = module.require;
|
|
1043
|
-
return ret;
|
|
1044
|
-
}, arguments) };
|
|
1045
|
-
imports.wbg.__wbg_resolve_fd5bfbaa4ce36e1e = function(arg0) {
|
|
1046
|
-
const ret = Promise.resolve(arg0);
|
|
1047
|
-
return ret;
|
|
1048
|
-
};
|
|
1049
|
-
imports.wbg.__wbg_setTimeout_7bb3429662ab1e70 = function(arg0, arg1) {
|
|
1050
|
-
const ret = setTimeout(arg0, arg1);
|
|
1051
|
-
return ret;
|
|
1052
|
-
};
|
|
1053
|
-
imports.wbg.__wbg_set_169e13b608078b7b = function(arg0, arg1, arg2) {
|
|
1054
|
-
arg0.set(getArrayU8FromWasm0(arg1, arg2));
|
|
1055
|
-
};
|
|
1056
|
-
imports.wbg.__wbg_set_3f1d0b984ed272ed = function(arg0, arg1, arg2) {
|
|
1057
|
-
arg0[arg1] = arg2;
|
|
1058
|
-
};
|
|
1059
|
-
imports.wbg.__wbg_set_7df433eea03a5c14 = function(arg0, arg1, arg2) {
|
|
1060
|
-
arg0[arg1 >>> 0] = arg2;
|
|
1061
|
-
};
|
|
1062
|
-
imports.wbg.__wbg_set_body_8e743242d6076a4f = function(arg0, arg1) {
|
|
1063
|
-
arg0.body = arg1;
|
|
1064
|
-
};
|
|
1065
|
-
imports.wbg.__wbg_set_cache_0e437c7c8e838b9b = function(arg0, arg1) {
|
|
1066
|
-
arg0.cache = __wbindgen_enum_RequestCache[arg1];
|
|
1067
|
-
};
|
|
1068
|
-
imports.wbg.__wbg_set_credentials_55ae7c3c106fd5be = function(arg0, arg1) {
|
|
1069
|
-
arg0.credentials = __wbindgen_enum_RequestCredentials[arg1];
|
|
1070
|
-
};
|
|
1071
|
-
imports.wbg.__wbg_set_efaaf145b9377369 = function(arg0, arg1, arg2) {
|
|
1072
|
-
const ret = arg0.set(arg1, arg2);
|
|
1073
|
-
return ret;
|
|
1074
|
-
};
|
|
1075
|
-
imports.wbg.__wbg_set_headers_5671cf088e114d2b = function(arg0, arg1) {
|
|
1076
|
-
arg0.headers = arg1;
|
|
1077
|
-
};
|
|
1078
|
-
imports.wbg.__wbg_set_method_76c69e41b3570627 = function(arg0, arg1, arg2) {
|
|
1079
|
-
arg0.method = getStringFromWasm0(arg1, arg2);
|
|
1080
|
-
};
|
|
1081
|
-
imports.wbg.__wbg_set_mode_611016a6818fc690 = function(arg0, arg1) {
|
|
1082
|
-
arg0.mode = __wbindgen_enum_RequestMode[arg1];
|
|
1083
|
-
};
|
|
1084
|
-
imports.wbg.__wbg_set_signal_e89be862d0091009 = function(arg0, arg1) {
|
|
1085
|
-
arg0.signal = arg1;
|
|
1086
|
-
};
|
|
1087
|
-
imports.wbg.__wbg_signal_3c14fbdc89694b39 = function(arg0) {
|
|
1088
|
-
const ret = arg0.signal;
|
|
1089
|
-
return ret;
|
|
1090
|
-
};
|
|
1091
|
-
imports.wbg.__wbg_size_82fbdb656de23326 = function(arg0) {
|
|
1092
|
-
const ret = arg0.size;
|
|
1093
|
-
return ret;
|
|
1094
|
-
};
|
|
1095
|
-
imports.wbg.__wbg_slice_3518c924243cda3a = function() { return handleError(function (arg0, arg1, arg2) {
|
|
1096
|
-
const ret = arg0.slice(arg1, arg2);
|
|
1097
|
-
return ret;
|
|
1098
|
-
}, arguments) };
|
|
1099
|
-
imports.wbg.__wbg_stack_0ed75d68575b0f3c = function(arg0, arg1) {
|
|
1100
|
-
const ret = arg1.stack;
|
|
1101
|
-
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1102
|
-
const len1 = WASM_VECTOR_LEN;
|
|
1103
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1104
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1105
|
-
};
|
|
1106
|
-
imports.wbg.__wbg_static_accessor_GLOBAL_769e6b65d6557335 = function() {
|
|
1107
|
-
const ret = typeof global === 'undefined' ? null : global;
|
|
1108
|
-
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1109
|
-
};
|
|
1110
|
-
imports.wbg.__wbg_static_accessor_GLOBAL_THIS_60cf02db4de8e1c1 = function() {
|
|
1111
|
-
const ret = typeof globalThis === 'undefined' ? null : globalThis;
|
|
1112
|
-
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1113
|
-
};
|
|
1114
|
-
imports.wbg.__wbg_static_accessor_SELF_08f5a74c69739274 = function() {
|
|
1115
|
-
const ret = typeof self === 'undefined' ? null : self;
|
|
1116
|
-
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1117
|
-
};
|
|
1118
|
-
imports.wbg.__wbg_static_accessor_WINDOW_a8924b26aa92d024 = function() {
|
|
1119
|
-
const ret = typeof window === 'undefined' ? null : window;
|
|
1120
|
-
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1121
|
-
};
|
|
1122
|
-
imports.wbg.__wbg_status_9bfc680efca4bdfd = function(arg0) {
|
|
1123
|
-
const ret = arg0.status;
|
|
1124
|
-
return ret;
|
|
1125
|
-
};
|
|
1126
|
-
imports.wbg.__wbg_stringify_655a6390e1f5eb6b = function() { return handleError(function (arg0) {
|
|
1127
|
-
const ret = JSON.stringify(arg0);
|
|
1128
|
-
return ret;
|
|
1129
|
-
}, arguments) };
|
|
1130
|
-
imports.wbg.__wbg_subarray_845f2f5bce7d061a = function(arg0, arg1, arg2) {
|
|
1131
|
-
const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
|
|
1132
|
-
return ret;
|
|
1133
|
-
};
|
|
1134
|
-
imports.wbg.__wbg_then_429f7caf1026411d = function(arg0, arg1, arg2) {
|
|
1135
|
-
const ret = arg0.then(arg1, arg2);
|
|
1136
|
-
return ret;
|
|
1137
|
-
};
|
|
1138
|
-
imports.wbg.__wbg_then_4f95312d68691235 = function(arg0, arg1) {
|
|
1139
|
-
const ret = arg0.then(arg1);
|
|
1140
|
-
return ret;
|
|
1141
|
-
};
|
|
1142
|
-
imports.wbg.__wbg_url_b6d11838a4f95198 = function(arg0, arg1) {
|
|
1143
|
-
const ret = arg1.url;
|
|
1144
|
-
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1145
|
-
const len1 = WASM_VECTOR_LEN;
|
|
1146
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1147
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1148
|
-
};
|
|
1149
|
-
imports.wbg.__wbg_valueOf_17c63ed1b225597a = function(arg0) {
|
|
1150
|
-
const ret = arg0.valueOf();
|
|
1151
|
-
return ret;
|
|
1152
|
-
};
|
|
1153
|
-
imports.wbg.__wbg_value_57b7b035e117f7ee = function(arg0) {
|
|
1154
|
-
const ret = arg0.value;
|
|
1155
|
-
return ret;
|
|
1156
|
-
};
|
|
1157
|
-
imports.wbg.__wbg_versions_c01dfd4722a88165 = function(arg0) {
|
|
1158
|
-
const ret = arg0.versions;
|
|
1159
|
-
return ret;
|
|
1160
|
-
};
|
|
1161
|
-
imports.wbg.__wbg_wasmreader_new = function(arg0) {
|
|
1162
|
-
const ret = WasmReader.__wrap(arg0);
|
|
1163
|
-
return ret;
|
|
1164
|
-
};
|
|
1165
|
-
imports.wbg.__wbindgen_cast_0bcf4d5a20a2764c = function(arg0, arg1) {
|
|
1166
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx: 1300, function: Function { arguments: [], shim_idx: 1301, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1167
|
-
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h9cd45bdf09c25ec5, wasm_bindgen__convert__closures_____invoke__h6743aa07e10cb0d4);
|
|
1168
|
-
return ret;
|
|
1169
|
-
};
|
|
1170
|
-
imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
|
|
1171
|
-
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
1172
|
-
const ret = getStringFromWasm0(arg0, arg1);
|
|
1173
|
-
return ret;
|
|
1174
|
-
};
|
|
1175
|
-
imports.wbg.__wbindgen_cast_2ddd8a25ff58642a = function(arg0, arg1) {
|
|
1176
|
-
// Cast intrinsic for `I128 -> Externref`.
|
|
1177
|
-
const ret = (BigInt.asUintN(64, arg0) | (arg1 << BigInt(64)));
|
|
1178
|
-
return ret;
|
|
1179
|
-
};
|
|
1180
|
-
imports.wbg.__wbindgen_cast_4625c577ab2ec9ee = function(arg0) {
|
|
1181
|
-
// Cast intrinsic for `U64 -> Externref`.
|
|
1182
|
-
const ret = BigInt.asUintN(64, arg0);
|
|
1183
|
-
return ret;
|
|
1184
|
-
};
|
|
1185
|
-
imports.wbg.__wbindgen_cast_77bc3e92745e9a35 = function(arg0, arg1) {
|
|
1186
|
-
var v0 = getArrayU8FromWasm0(arg0, arg1).slice();
|
|
1187
|
-
wasm.__wbindgen_free(arg0, arg1 * 1, 1);
|
|
1188
|
-
// Cast intrinsic for `Vector(U8) -> Externref`.
|
|
1189
|
-
const ret = v0;
|
|
1190
|
-
return ret;
|
|
1191
|
-
};
|
|
1192
|
-
imports.wbg.__wbindgen_cast_815cc8b6fd6cc840 = function(arg0, arg1) {
|
|
1193
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx: 1303, function: Function { arguments: [Externref], shim_idx: 1304, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1194
|
-
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h628fe959fcf32094, wasm_bindgen__convert__closures_____invoke__hfa979f81ae70afaa);
|
|
1195
|
-
return ret;
|
|
1196
|
-
};
|
|
1197
|
-
imports.wbg.__wbindgen_cast_9ae0607507abb057 = function(arg0) {
|
|
1198
|
-
// Cast intrinsic for `I64 -> Externref`.
|
|
1199
|
-
const ret = arg0;
|
|
1200
|
-
return ret;
|
|
1201
|
-
};
|
|
1202
|
-
imports.wbg.__wbindgen_cast_cb9088102bce6b30 = function(arg0, arg1) {
|
|
1203
|
-
// Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
|
|
1204
|
-
const ret = getArrayU8FromWasm0(arg0, arg1);
|
|
1205
|
-
return ret;
|
|
1206
|
-
};
|
|
1207
|
-
imports.wbg.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {
|
|
1208
|
-
// Cast intrinsic for `F64 -> Externref`.
|
|
1209
|
-
const ret = arg0;
|
|
1210
|
-
return ret;
|
|
1211
|
-
};
|
|
1212
|
-
imports.wbg.__wbindgen_init_externref_table = function() {
|
|
1213
|
-
const table = wasm.__wbindgen_externrefs;
|
|
1214
|
-
const offset = table.grow(4);
|
|
1215
|
-
table.set(0, undefined);
|
|
1216
|
-
table.set(offset + 0, undefined);
|
|
1217
|
-
table.set(offset + 1, null);
|
|
1218
|
-
table.set(offset + 2, true);
|
|
1219
|
-
table.set(offset + 3, false);
|
|
1220
|
-
};
|
|
1153
|
+
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
1154
|
+
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
1155
|
+
const ret = cachedTextEncoder.encodeInto(arg, view);
|
|
1156
|
+
|
|
1157
|
+
offset += ret.written;
|
|
1158
|
+
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
1159
|
+
}
|
|
1160
|
+
|
|
1161
|
+
WASM_VECTOR_LEN = offset;
|
|
1162
|
+
return ptr;
|
|
1163
|
+
}
|
|
1221
1164
|
|
|
1222
|
-
|
|
1165
|
+
function takeFromExternrefTable0(idx) {
|
|
1166
|
+
const value = wasm.__wbindgen_externrefs.get(idx);
|
|
1167
|
+
wasm.__externref_table_dealloc(idx);
|
|
1168
|
+
return value;
|
|
1169
|
+
}
|
|
1170
|
+
|
|
1171
|
+
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
1172
|
+
cachedTextDecoder.decode();
|
|
1173
|
+
const MAX_SAFARI_DECODE_BYTES = 2146435072;
|
|
1174
|
+
let numBytesDecoded = 0;
|
|
1175
|
+
function decodeText(ptr, len) {
|
|
1176
|
+
numBytesDecoded += len;
|
|
1177
|
+
if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
|
|
1178
|
+
cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
1179
|
+
cachedTextDecoder.decode();
|
|
1180
|
+
numBytesDecoded = len;
|
|
1181
|
+
}
|
|
1182
|
+
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
1183
|
+
}
|
|
1184
|
+
|
|
1185
|
+
const cachedTextEncoder = new TextEncoder();
|
|
1186
|
+
|
|
1187
|
+
if (!('encodeInto' in cachedTextEncoder)) {
|
|
1188
|
+
cachedTextEncoder.encodeInto = function (arg, view) {
|
|
1189
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
1190
|
+
view.set(buf);
|
|
1191
|
+
return {
|
|
1192
|
+
read: arg.length,
|
|
1193
|
+
written: buf.length
|
|
1194
|
+
};
|
|
1195
|
+
};
|
|
1223
1196
|
}
|
|
1224
1197
|
|
|
1198
|
+
let WASM_VECTOR_LEN = 0;
|
|
1199
|
+
|
|
1200
|
+
let wasmModule, wasm;
|
|
1225
1201
|
function __wbg_finalize_init(instance, module) {
|
|
1226
1202
|
wasm = instance.exports;
|
|
1227
|
-
|
|
1203
|
+
wasmModule = module;
|
|
1228
1204
|
cachedDataViewMemory0 = null;
|
|
1229
1205
|
cachedUint8ArrayMemory0 = null;
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
1206
|
wasm.__wbindgen_start();
|
|
1233
1207
|
return wasm;
|
|
1234
1208
|
}
|
|
1235
1209
|
|
|
1210
|
+
async function __wbg_load(module, imports) {
|
|
1211
|
+
if (typeof Response === 'function' && module instanceof Response) {
|
|
1212
|
+
if (typeof WebAssembly.instantiateStreaming === 'function') {
|
|
1213
|
+
try {
|
|
1214
|
+
return await WebAssembly.instantiateStreaming(module, imports);
|
|
1215
|
+
} catch (e) {
|
|
1216
|
+
const validResponse = module.ok && expectedResponseType(module.type);
|
|
1217
|
+
|
|
1218
|
+
if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
|
|
1219
|
+
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);
|
|
1220
|
+
|
|
1221
|
+
} else { throw e; }
|
|
1222
|
+
}
|
|
1223
|
+
}
|
|
1224
|
+
|
|
1225
|
+
const bytes = await module.arrayBuffer();
|
|
1226
|
+
return await WebAssembly.instantiate(bytes, imports);
|
|
1227
|
+
} else {
|
|
1228
|
+
const instance = await WebAssembly.instantiate(module, imports);
|
|
1229
|
+
|
|
1230
|
+
if (instance instanceof WebAssembly.Instance) {
|
|
1231
|
+
return { instance, module };
|
|
1232
|
+
} else {
|
|
1233
|
+
return instance;
|
|
1234
|
+
}
|
|
1235
|
+
}
|
|
1236
|
+
|
|
1237
|
+
function expectedResponseType(type) {
|
|
1238
|
+
switch (type) {
|
|
1239
|
+
case 'basic': case 'cors': case 'default': return true;
|
|
1240
|
+
}
|
|
1241
|
+
return false;
|
|
1242
|
+
}
|
|
1243
|
+
}
|
|
1244
|
+
|
|
1236
1245
|
function initSync(module) {
|
|
1237
1246
|
if (wasm !== undefined) return wasm;
|
|
1238
1247
|
|
|
1239
1248
|
|
|
1240
|
-
if (
|
|
1249
|
+
if (module !== undefined) {
|
|
1241
1250
|
if (Object.getPrototypeOf(module) === Object.prototype) {
|
|
1242
1251
|
({module} = module)
|
|
1243
1252
|
} else {
|
|
@@ -1257,7 +1266,7 @@ async function __wbg_init(module_or_path) {
|
|
|
1257
1266
|
if (wasm !== undefined) return wasm;
|
|
1258
1267
|
|
|
1259
1268
|
|
|
1260
|
-
if (
|
|
1269
|
+
if (module_or_path !== undefined) {
|
|
1261
1270
|
if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
|
|
1262
1271
|
({module_or_path} = module_or_path)
|
|
1263
1272
|
} else {
|
|
@@ -1277,6 +1286,5 @@ async function __wbg_init(module_or_path) {
|
|
|
1277
1286
|
return __wbg_finalize_init(instance, module);
|
|
1278
1287
|
}
|
|
1279
1288
|
|
|
1280
|
-
export { initSync };
|
|
1281
|
-
export
|
|
1282
|
-
export const WASM_SRI = "sha512-emM3xZBux5bBdEv6EFS+y5SmKnxnEVbNgsjbsOLnC/YYm55pviVrgdOxU8iQUisOISQvXrTj7H8vvsgYVlpeLg==";
|
|
1289
|
+
export { initSync, __wbg_init as default };
|
|
1290
|
+
export const WASM_SRI = "sha512-C4pp0ebkfSxUgWcCNLI63fbUFlxX3TEviCAwM+2qm/TNRzJf6l2BNqZwktlUrG6bthan8VOeBuMb411BUChb2Q==";
|