@contentauth/c2pa-web 0.9.0 → 0.11.0
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/c2pa-BhHHemvP.js +402 -0
- package/dist/c2pa_worker.js +1155 -0
- package/dist/index.js +1 -1
- package/dist/inline.js +2 -2
- package/dist/lib/c2pa.d.ts +9 -0
- package/dist/lib/c2pa.d.ts.map +1 -1
- package/dist/lib/worker/workerManager.d.ts +11 -0
- package/dist/lib/worker/workerManager.d.ts.map +1 -1
- package/package.json +7 -3
- package/dist/c2pa-Cy_f_Zk_.js +0 -395
|
@@ -0,0 +1,1155 @@
|
|
|
1
|
+
var V = (r, e) => () => (e || r((e = { exports: {} }).exports, e), e.exports);
|
|
2
|
+
var ie = V((ae, C) => {
|
|
3
|
+
class h {
|
|
4
|
+
static __wrap(e) {
|
|
5
|
+
const t = Object.create(h.prototype);
|
|
6
|
+
return t.__wbg_ptr = e, x.register(t, t.__wbg_ptr, t), t;
|
|
7
|
+
}
|
|
8
|
+
__destroy_into_raw() {
|
|
9
|
+
const e = this.__wbg_ptr;
|
|
10
|
+
return this.__wbg_ptr = 0, x.unregister(this), e;
|
|
11
|
+
}
|
|
12
|
+
free() {
|
|
13
|
+
const e = this.__destroy_into_raw();
|
|
14
|
+
o.__wbg_wasmbuilder_free(e, 0);
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Add an action to the manifest's `Actions` assertion.
|
|
18
|
+
* @param {any} action
|
|
19
|
+
*/
|
|
20
|
+
addAction(e) {
|
|
21
|
+
const t = o.wasmbuilder_addAction(this.__wbg_ptr, e);
|
|
22
|
+
if (t[1])
|
|
23
|
+
throw d(t[0]);
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Add an ingredient to the manifest from a JSON ingredient definition without a blob
|
|
27
|
+
*
|
|
28
|
+
* # Arguments
|
|
29
|
+
* * `ingredient_json` - A JSON string representing the ingredient.
|
|
30
|
+
* @param {string} json
|
|
31
|
+
*/
|
|
32
|
+
addIngredient(e) {
|
|
33
|
+
const t = b(e, o.__wbindgen_malloc, o.__wbindgen_realloc), n = u, _ = o.wasmbuilder_addIngredient(this.__wbg_ptr, t, n);
|
|
34
|
+
if (_[1])
|
|
35
|
+
throw d(_[0]);
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Add an ingredient to the manifest from a JSON ingredient definition and a [`Blob`].
|
|
39
|
+
*
|
|
40
|
+
* # Arguments
|
|
41
|
+
* * `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.
|
|
42
|
+
* * `format` - The format of the ingredient.
|
|
43
|
+
* * `blob` - A [`Blob`] representing an asset which should be included as an ingredient.
|
|
44
|
+
* @param {string} json
|
|
45
|
+
* @param {string} format
|
|
46
|
+
* @param {Blob} blob
|
|
47
|
+
* @returns {Promise<void>}
|
|
48
|
+
*/
|
|
49
|
+
addIngredientFromBlob(e, t, n) {
|
|
50
|
+
const _ = b(e, o.__wbindgen_malloc, o.__wbindgen_realloc), c = u, i = b(t, o.__wbindgen_malloc, o.__wbindgen_realloc), s = u;
|
|
51
|
+
return o.wasmbuilder_addIngredientFromBlob(this.__wbg_ptr, _, c, i, s, n);
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Add a redaction for a JUMBF URI with the given reason.
|
|
55
|
+
*
|
|
56
|
+
* Adds the URI to the builder's redaction list and appends a `c2pa.redacted` action
|
|
57
|
+
* with the reason and URI parameter, as required by the C2PA spec.
|
|
58
|
+
* @param {string} uri
|
|
59
|
+
* @param {any} reason
|
|
60
|
+
*/
|
|
61
|
+
addRedaction(e, t) {
|
|
62
|
+
const n = b(e, o.__wbindgen_malloc, o.__wbindgen_realloc), _ = u, c = o.wasmbuilder_addRedaction(this.__wbg_ptr, n, _, t);
|
|
63
|
+
if (c[1])
|
|
64
|
+
throw d(c[0]);
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Add a [`Blob`] to the manifest as a resource. The ID must match an identifier in the manifest.
|
|
68
|
+
* @param {string} id
|
|
69
|
+
* @param {Blob} blob
|
|
70
|
+
*/
|
|
71
|
+
addResourceFromBlob(e, t) {
|
|
72
|
+
const n = b(e, o.__wbindgen_malloc, o.__wbindgen_realloc), _ = u, c = o.wasmbuilder_addResourceFromBlob(this.__wbg_ptr, n, _, t);
|
|
73
|
+
if (c[1])
|
|
74
|
+
throw d(c[0]);
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Attempts to create a new `WasmBuilder` from a builder archive.
|
|
78
|
+
* Optionally accepts a context JSON string to configure the builder.
|
|
79
|
+
* @param {Blob} archive
|
|
80
|
+
* @param {string | null} [context_json]
|
|
81
|
+
* @returns {WasmBuilder}
|
|
82
|
+
*/
|
|
83
|
+
static fromArchive(e, t) {
|
|
84
|
+
var n = w(t) ? 0 : b(t, o.__wbindgen_malloc, o.__wbindgen_realloc), _ = u;
|
|
85
|
+
const c = o.wasmbuilder_fromArchive(e, n, _);
|
|
86
|
+
if (c[2])
|
|
87
|
+
throw d(c[1]);
|
|
88
|
+
return h.__wrap(c[0]);
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Attempts to create a new `WasmBuilder` from a JSON ManifestDefinition string.
|
|
92
|
+
* Optionally accepts a context JSON string to configure the builder.
|
|
93
|
+
* @param {string} json
|
|
94
|
+
* @param {string | null} [context_json]
|
|
95
|
+
* @returns {WasmBuilder}
|
|
96
|
+
*/
|
|
97
|
+
static fromJson(e, t) {
|
|
98
|
+
const n = b(e, o.__wbindgen_malloc, o.__wbindgen_realloc), _ = u;
|
|
99
|
+
var c = w(t) ? 0 : b(t, o.__wbindgen_malloc, o.__wbindgen_realloc), i = u;
|
|
100
|
+
const s = o.wasmbuilder_fromJson(n, _, c, i);
|
|
101
|
+
if (s[2])
|
|
102
|
+
throw d(s[1]);
|
|
103
|
+
return h.__wrap(s[0]);
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Get the current manifest definition.
|
|
107
|
+
* @returns {string}
|
|
108
|
+
*/
|
|
109
|
+
getDefinition() {
|
|
110
|
+
const e = o.wasmbuilder_getDefinition(this.__wbg_ptr);
|
|
111
|
+
if (e[2])
|
|
112
|
+
throw d(e[1]);
|
|
113
|
+
return d(e[0]);
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Creates a new `WasmBuilder` with a minimal manifest definition.
|
|
117
|
+
* Optionally accepts a context JSON string to configure the builder.
|
|
118
|
+
* @param {string | null} [context_json]
|
|
119
|
+
* @returns {WasmBuilder}
|
|
120
|
+
*/
|
|
121
|
+
static new(e) {
|
|
122
|
+
var t = w(e) ? 0 : b(e, o.__wbindgen_malloc, o.__wbindgen_realloc), n = u;
|
|
123
|
+
const _ = o.wasmbuilder_new(t, n);
|
|
124
|
+
if (_[2])
|
|
125
|
+
throw d(_[1]);
|
|
126
|
+
return h.__wrap(_[0]);
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Sets the builder "intent."
|
|
130
|
+
* @param {any} json_intent
|
|
131
|
+
*/
|
|
132
|
+
setIntent(e) {
|
|
133
|
+
const t = o.wasmbuilder_setIntent(this.__wbg_ptr, e);
|
|
134
|
+
if (t[1])
|
|
135
|
+
throw d(t[0]);
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Sets the state of the no_embed flag.
|
|
139
|
+
* @param {boolean} no_embed
|
|
140
|
+
*/
|
|
141
|
+
setNoEmbed(e) {
|
|
142
|
+
o.wasmbuilder_setNoEmbed(this.__wbg_ptr, e);
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Sets the remote_url for a remote manifest.
|
|
146
|
+
*
|
|
147
|
+
* The URL must return the manifest data and is injected into the destination asset when signing.
|
|
148
|
+
* For remote-only manifests, set the `no_embed` flag to `true`.
|
|
149
|
+
* @param {string} url
|
|
150
|
+
*/
|
|
151
|
+
setRemoteUrl(e) {
|
|
152
|
+
const t = b(e, o.__wbindgen_malloc, o.__wbindgen_realloc), n = u;
|
|
153
|
+
o.wasmbuilder_setRemoteUrl(this.__wbg_ptr, t, n);
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* Sets a thumbnail from a [`Blob`] to be included in the manifest. The thumbnail should represent the asset being signed.
|
|
157
|
+
* @param {string} format
|
|
158
|
+
* @param {Blob} blob
|
|
159
|
+
*/
|
|
160
|
+
setThumbnailFromBlob(e, t) {
|
|
161
|
+
const n = b(e, o.__wbindgen_malloc, o.__wbindgen_realloc), _ = u, c = o.wasmbuilder_setThumbnailFromBlob(this.__wbg_ptr, n, _, t);
|
|
162
|
+
if (c[1])
|
|
163
|
+
throw d(c[0]);
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* Sign an asset using the provided SignerDefinition, format, and source Blob.
|
|
167
|
+
* @param {SignerDefinition} signer_definition
|
|
168
|
+
* @param {string} format
|
|
169
|
+
* @param {Blob} source
|
|
170
|
+
* @returns {Promise<Uint8Array>}
|
|
171
|
+
*/
|
|
172
|
+
sign(e, t, n) {
|
|
173
|
+
const _ = b(t, o.__wbindgen_malloc, o.__wbindgen_realloc), c = u;
|
|
174
|
+
return o.wasmbuilder_sign(this.__wbg_ptr, e, _, c, n);
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* Sign an asset using the provided SignerDefinition, format, and source Blob.
|
|
178
|
+
* Use this method to get both the manifest bytes and the bytes of the signed asset.
|
|
179
|
+
* @param {SignerDefinition} signer_definition
|
|
180
|
+
* @param {string} format
|
|
181
|
+
* @param {Blob} source
|
|
182
|
+
* @returns {Promise<any>}
|
|
183
|
+
*/
|
|
184
|
+
signAndGetManifestBytes(e, t, n) {
|
|
185
|
+
const _ = b(t, o.__wbindgen_malloc, o.__wbindgen_realloc), c = u;
|
|
186
|
+
return o.wasmbuilder_signAndGetManifestBytes(this.__wbg_ptr, e, _, c, n);
|
|
187
|
+
}
|
|
188
|
+
/**
|
|
189
|
+
* "Save" a builder to an archive.
|
|
190
|
+
* @returns {Uint8Array}
|
|
191
|
+
*/
|
|
192
|
+
toArchive() {
|
|
193
|
+
const e = o.wasmbuilder_toArchive(this.__wbg_ptr);
|
|
194
|
+
if (e[2])
|
|
195
|
+
throw d(e[1]);
|
|
196
|
+
return d(e[0]);
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
Symbol.dispose && (h.prototype[Symbol.dispose] = h.prototype.free);
|
|
200
|
+
class F {
|
|
201
|
+
static __wrap(e) {
|
|
202
|
+
const t = Object.create(F.prototype);
|
|
203
|
+
return t.__wbg_ptr = e, k.register(t, t.__wbg_ptr, t), t;
|
|
204
|
+
}
|
|
205
|
+
__destroy_into_raw() {
|
|
206
|
+
const e = this.__wbg_ptr;
|
|
207
|
+
return this.__wbg_ptr = 0, k.unregister(this), e;
|
|
208
|
+
}
|
|
209
|
+
free() {
|
|
210
|
+
const e = this.__destroy_into_raw();
|
|
211
|
+
o.__wbg_wasmreader_free(e, 0);
|
|
212
|
+
}
|
|
213
|
+
/**
|
|
214
|
+
* Returns the label of the asset's active manifest.
|
|
215
|
+
* @returns {string | undefined}
|
|
216
|
+
*/
|
|
217
|
+
activeLabel() {
|
|
218
|
+
const e = o.wasmreader_activeLabel(this.__wbg_ptr);
|
|
219
|
+
let t;
|
|
220
|
+
return e[0] !== 0 && (t = y(e[0], e[1]).slice(), o.__wbindgen_free(e[0], e[1] * 1, 1)), t;
|
|
221
|
+
}
|
|
222
|
+
/**
|
|
223
|
+
* Returns the asset's active manifest.
|
|
224
|
+
* @returns {any}
|
|
225
|
+
*/
|
|
226
|
+
activeManifest() {
|
|
227
|
+
const e = o.wasmreader_activeManifest(this.__wbg_ptr);
|
|
228
|
+
if (e[2])
|
|
229
|
+
throw d(e[1]);
|
|
230
|
+
return d(e[0]);
|
|
231
|
+
}
|
|
232
|
+
/**
|
|
233
|
+
* Returns the asset's manifest store as crJSON.
|
|
234
|
+
* @returns {string}
|
|
235
|
+
*/
|
|
236
|
+
crJson() {
|
|
237
|
+
let e, t;
|
|
238
|
+
try {
|
|
239
|
+
const n = o.wasmreader_crJson(this.__wbg_ptr);
|
|
240
|
+
return e = n[0], t = n[1], y(n[0], n[1]);
|
|
241
|
+
} finally {
|
|
242
|
+
o.__wbindgen_free(e, t, 1);
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
/**
|
|
246
|
+
* Attempts to create a new `WasmReader` from an asset format and `Blob` of the asset's bytes.
|
|
247
|
+
* Optionally accepts a context JSON string to configure the reader.
|
|
248
|
+
* @param {string} format
|
|
249
|
+
* @param {Blob} blob
|
|
250
|
+
* @param {string | null} [context_json]
|
|
251
|
+
* @returns {Promise<WasmReader>}
|
|
252
|
+
*/
|
|
253
|
+
static fromBlob(e, t, n) {
|
|
254
|
+
const _ = b(e, o.__wbindgen_malloc, o.__wbindgen_realloc), c = u;
|
|
255
|
+
var i = w(n) ? 0 : b(n, o.__wbindgen_malloc, o.__wbindgen_realloc), s = u;
|
|
256
|
+
return o.wasmreader_fromBlob(_, c, t, i, s);
|
|
257
|
+
}
|
|
258
|
+
/**
|
|
259
|
+
* Attempts to create a new `WasmReader` from an asset format, a `Blob` of the bytes of the initial segment, and a fragment `Blob`.
|
|
260
|
+
* Optionally accepts a context JSON string to configure the reader.
|
|
261
|
+
* @param {string} format
|
|
262
|
+
* @param {Blob} init
|
|
263
|
+
* @param {Blob} fragment
|
|
264
|
+
* @param {string | null} [context_json]
|
|
265
|
+
* @returns {Promise<WasmReader>}
|
|
266
|
+
*/
|
|
267
|
+
static fromBlobFragment(e, t, n, _) {
|
|
268
|
+
const c = b(e, o.__wbindgen_malloc, o.__wbindgen_realloc), i = u;
|
|
269
|
+
var s = w(_) ? 0 : b(_, o.__wbindgen_malloc, o.__wbindgen_realloc), a = u;
|
|
270
|
+
return o.wasmreader_fromBlobFragment(c, i, t, n, s, a);
|
|
271
|
+
}
|
|
272
|
+
/**
|
|
273
|
+
* Returns a JSON representation of the asset's manifest store.
|
|
274
|
+
* @returns {string}
|
|
275
|
+
*/
|
|
276
|
+
json() {
|
|
277
|
+
let e, t;
|
|
278
|
+
try {
|
|
279
|
+
const n = o.wasmreader_json(this.__wbg_ptr);
|
|
280
|
+
return e = n[0], t = n[1], y(n[0], n[1]);
|
|
281
|
+
} finally {
|
|
282
|
+
o.__wbindgen_free(e, t, 1);
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
/**
|
|
286
|
+
* Returns the asset's manifest store.
|
|
287
|
+
* @returns {any}
|
|
288
|
+
*/
|
|
289
|
+
manifestStore() {
|
|
290
|
+
const e = o.wasmreader_manifestStore(this.__wbg_ptr);
|
|
291
|
+
if (e[2])
|
|
292
|
+
throw d(e[1]);
|
|
293
|
+
return d(e[0]);
|
|
294
|
+
}
|
|
295
|
+
/**
|
|
296
|
+
* Accepts a URI reference to a binary object in the resource store and returns a `js_sys::Uint8Array` containing the resource's bytes.
|
|
297
|
+
* @param {string} uri
|
|
298
|
+
* @returns {Uint8Array}
|
|
299
|
+
*/
|
|
300
|
+
resourceToBytes(e) {
|
|
301
|
+
const t = b(e, o.__wbindgen_malloc, o.__wbindgen_realloc), n = u, _ = o.wasmreader_resourceToBytes(this.__wbg_ptr, t, n);
|
|
302
|
+
if (_[2])
|
|
303
|
+
throw d(_[1]);
|
|
304
|
+
return d(_[0]);
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
Symbol.dispose && (F.prototype[Symbol.dispose] = F.prototype.free);
|
|
308
|
+
function G(r) {
|
|
309
|
+
const e = b(r, o.__wbindgen_malloc, o.__wbindgen_realloc), t = u, n = o.loadSettings(e, t);
|
|
310
|
+
if (n[1])
|
|
311
|
+
throw d(n[0]);
|
|
312
|
+
}
|
|
313
|
+
function P() {
|
|
314
|
+
return {
|
|
315
|
+
__proto__: null,
|
|
316
|
+
"./c2pa_bg.js": {
|
|
317
|
+
__proto__: null,
|
|
318
|
+
__wbg_Error_ef53bc310eb298a0: function(e, t) {
|
|
319
|
+
return Error(y(e, t));
|
|
320
|
+
},
|
|
321
|
+
__wbg_Number_6b506e6536831eaa: function(e) {
|
|
322
|
+
return Number(e);
|
|
323
|
+
},
|
|
324
|
+
__wbg___wbindgen_bigint_get_as_i64_38130e98eecd467d: function(e, t) {
|
|
325
|
+
const n = t, _ = typeof n == "bigint" ? n : void 0;
|
|
326
|
+
m().setBigInt64(e + 8, w(_) ? BigInt(0) : _, !0), m().setInt32(e + 0, !w(_), !0);
|
|
327
|
+
},
|
|
328
|
+
__wbg___wbindgen_boolean_get_1a45e2c38d4d41b9: function(e) {
|
|
329
|
+
const t = e, n = typeof t == "boolean" ? t : void 0;
|
|
330
|
+
return w(n) ? 16777215 : n ? 1 : 0;
|
|
331
|
+
},
|
|
332
|
+
__wbg___wbindgen_debug_string_0accd80f45e5faa2: function(e, t) {
|
|
333
|
+
const n = O(t), _ = b(n, o.__wbindgen_malloc, o.__wbindgen_realloc), c = u;
|
|
334
|
+
m().setInt32(e + 4, c, !0), m().setInt32(e + 0, _, !0);
|
|
335
|
+
},
|
|
336
|
+
__wbg___wbindgen_in_70a403a56e771704: function(e, t) {
|
|
337
|
+
return e in t;
|
|
338
|
+
},
|
|
339
|
+
__wbg___wbindgen_is_bigint_6ffd6468a9bc44b9: function(e) {
|
|
340
|
+
return typeof e == "bigint";
|
|
341
|
+
},
|
|
342
|
+
__wbg___wbindgen_is_function_754e9f305ff6029e: function(e) {
|
|
343
|
+
return typeof e == "function";
|
|
344
|
+
},
|
|
345
|
+
__wbg___wbindgen_is_object_56732c2bc353f41d: function(e) {
|
|
346
|
+
const t = e;
|
|
347
|
+
return typeof t == "object" && t !== null;
|
|
348
|
+
},
|
|
349
|
+
__wbg___wbindgen_is_string_c236cabd84a4d769: function(e) {
|
|
350
|
+
return typeof e == "string";
|
|
351
|
+
},
|
|
352
|
+
__wbg___wbindgen_is_undefined_67b456be8673d3d7: function(e) {
|
|
353
|
+
return e === void 0;
|
|
354
|
+
},
|
|
355
|
+
__wbg___wbindgen_jsval_eq_1068e624fa87f6ab: function(e, t) {
|
|
356
|
+
return e === t;
|
|
357
|
+
},
|
|
358
|
+
__wbg___wbindgen_jsval_loose_eq_2c56564c75129511: function(e, t) {
|
|
359
|
+
return e == t;
|
|
360
|
+
},
|
|
361
|
+
__wbg___wbindgen_number_get_9bb1761122181af2: function(e, t) {
|
|
362
|
+
const n = t, _ = typeof n == "number" ? n : void 0;
|
|
363
|
+
m().setFloat64(e + 8, w(_) ? 0 : _, !0), m().setInt32(e + 0, !w(_), !0);
|
|
364
|
+
},
|
|
365
|
+
__wbg___wbindgen_string_get_72bdf95d3ae505b1: function(e, t) {
|
|
366
|
+
const n = t, _ = typeof n == "string" ? n : void 0;
|
|
367
|
+
var c = w(_) ? 0 : b(_, o.__wbindgen_malloc, o.__wbindgen_realloc), i = u;
|
|
368
|
+
m().setInt32(e + 4, i, !0), m().setInt32(e + 0, c, !0);
|
|
369
|
+
},
|
|
370
|
+
__wbg___wbindgen_throw_1506f2235d1bdba0: function(e, t) {
|
|
371
|
+
throw new Error(y(e, t));
|
|
372
|
+
},
|
|
373
|
+
__wbg__wbg_cb_unref_61db23ac97f16c31: function(e) {
|
|
374
|
+
e._wbg_cb_unref();
|
|
375
|
+
},
|
|
376
|
+
__wbg_abort_2ec46222bf378517: function(e) {
|
|
377
|
+
e.abort();
|
|
378
|
+
},
|
|
379
|
+
__wbg_abort_b29d719932441c95: function(e, t) {
|
|
380
|
+
e.abort(t);
|
|
381
|
+
},
|
|
382
|
+
__wbg_append_e1746995edcb0170: function() {
|
|
383
|
+
return f(function(e, t, n, _, c) {
|
|
384
|
+
e.append(y(t, n), y(_, c));
|
|
385
|
+
}, arguments);
|
|
386
|
+
},
|
|
387
|
+
__wbg_arrayBuffer_05927079aabe6d46: function() {
|
|
388
|
+
return f(function(e) {
|
|
389
|
+
return e.arrayBuffer();
|
|
390
|
+
}, arguments);
|
|
391
|
+
},
|
|
392
|
+
__wbg_byteLength_2c6dc3b4b85d3547: function(e) {
|
|
393
|
+
return e.byteLength;
|
|
394
|
+
},
|
|
395
|
+
__wbg_call_8a89609d89f6608a: function() {
|
|
396
|
+
return f(function(e, t) {
|
|
397
|
+
return e.call(t);
|
|
398
|
+
}, arguments);
|
|
399
|
+
},
|
|
400
|
+
__wbg_call_9c758de292015997: function() {
|
|
401
|
+
return f(function(e, t, n) {
|
|
402
|
+
return e.call(t, n);
|
|
403
|
+
}, arguments);
|
|
404
|
+
},
|
|
405
|
+
__wbg_clearTimeout_6b8d9a38b9263d65: function(e) {
|
|
406
|
+
return clearTimeout(e);
|
|
407
|
+
},
|
|
408
|
+
__wbg_crypto_38df2bab126b63dc: function(e) {
|
|
409
|
+
return e.crypto;
|
|
410
|
+
},
|
|
411
|
+
__wbg_done_60cf307fcc680536: function(e) {
|
|
412
|
+
return e.done;
|
|
413
|
+
},
|
|
414
|
+
__wbg_entries_04b37a02507f1713: function(e) {
|
|
415
|
+
return Object.entries(e);
|
|
416
|
+
},
|
|
417
|
+
__wbg_error_a6fa202b58aa1cd3: function(e, t) {
|
|
418
|
+
let n, _;
|
|
419
|
+
try {
|
|
420
|
+
n = e, _ = t, console.error(y(e, t));
|
|
421
|
+
} finally {
|
|
422
|
+
o.__wbindgen_free(n, _, 1);
|
|
423
|
+
}
|
|
424
|
+
},
|
|
425
|
+
__wbg_fetch_344c8d3849002659: function(e, t) {
|
|
426
|
+
return e.fetch(t);
|
|
427
|
+
},
|
|
428
|
+
__wbg_fetch_9dad4fe911207b37: function(e) {
|
|
429
|
+
return fetch(e);
|
|
430
|
+
},
|
|
431
|
+
__wbg_from_d300fe49deab18f5: function(e) {
|
|
432
|
+
return Array.from(e);
|
|
433
|
+
},
|
|
434
|
+
__wbg_getRandomValues_3f44b700395062e5: function() {
|
|
435
|
+
return f(function(e, t) {
|
|
436
|
+
globalThis.crypto.getRandomValues(v(e, t));
|
|
437
|
+
}, arguments);
|
|
438
|
+
},
|
|
439
|
+
__wbg_getRandomValues_8aa3112c6615eef6: function() {
|
|
440
|
+
return f(function(e, t) {
|
|
441
|
+
globalThis.crypto.getRandomValues(v(e, t));
|
|
442
|
+
}, arguments);
|
|
443
|
+
},
|
|
444
|
+
__wbg_getRandomValues_c44a50d8cfdaebeb: function() {
|
|
445
|
+
return f(function(e, t) {
|
|
446
|
+
e.getRandomValues(t);
|
|
447
|
+
}, arguments);
|
|
448
|
+
},
|
|
449
|
+
__wbg_getTime_00b3f7db575e4ef5: function(e) {
|
|
450
|
+
return e.getTime();
|
|
451
|
+
},
|
|
452
|
+
__wbg_get_1f8f054ddbaa7db2: function() {
|
|
453
|
+
return f(function(e, t) {
|
|
454
|
+
return Reflect.get(e, t);
|
|
455
|
+
}, arguments);
|
|
456
|
+
},
|
|
457
|
+
__wbg_get_2b48c7d0d006a781: function(e, t) {
|
|
458
|
+
return e[t >>> 0];
|
|
459
|
+
},
|
|
460
|
+
__wbg_get_de6a0f7d4d18a304: function() {
|
|
461
|
+
return f(function(e, t) {
|
|
462
|
+
return Reflect.get(e, t);
|
|
463
|
+
}, arguments);
|
|
464
|
+
},
|
|
465
|
+
__wbg_get_unchecked_33f6e5c9e2f2d6b2: function(e, t) {
|
|
466
|
+
return e[t >>> 0];
|
|
467
|
+
},
|
|
468
|
+
__wbg_get_with_ref_key_6412cf3094599694: function(e, t) {
|
|
469
|
+
return e[t];
|
|
470
|
+
},
|
|
471
|
+
__wbg_has_73740b27f436fed3: function() {
|
|
472
|
+
return f(function(e, t) {
|
|
473
|
+
return Reflect.has(e, t);
|
|
474
|
+
}, arguments);
|
|
475
|
+
},
|
|
476
|
+
__wbg_headers_0feb63d2d374b44a: function(e) {
|
|
477
|
+
return e.headers;
|
|
478
|
+
},
|
|
479
|
+
__wbg_instanceof_ArrayBuffer_8f49811467741499: function(e) {
|
|
480
|
+
let t;
|
|
481
|
+
try {
|
|
482
|
+
t = e instanceof ArrayBuffer;
|
|
483
|
+
} catch {
|
|
484
|
+
t = !1;
|
|
485
|
+
}
|
|
486
|
+
return t;
|
|
487
|
+
},
|
|
488
|
+
__wbg_instanceof_Map_9fc06d9a951bcee6: function(e) {
|
|
489
|
+
let t;
|
|
490
|
+
try {
|
|
491
|
+
t = e instanceof Map;
|
|
492
|
+
} catch {
|
|
493
|
+
t = !1;
|
|
494
|
+
}
|
|
495
|
+
return t;
|
|
496
|
+
},
|
|
497
|
+
__wbg_instanceof_Promise_d0db99486956c8e8: function(e) {
|
|
498
|
+
let t;
|
|
499
|
+
try {
|
|
500
|
+
t = e instanceof Promise;
|
|
501
|
+
} catch {
|
|
502
|
+
t = !1;
|
|
503
|
+
}
|
|
504
|
+
return t;
|
|
505
|
+
},
|
|
506
|
+
__wbg_instanceof_Response_cb984bd66d7bd408: function(e) {
|
|
507
|
+
let t;
|
|
508
|
+
try {
|
|
509
|
+
t = e instanceof Response;
|
|
510
|
+
} catch {
|
|
511
|
+
t = !1;
|
|
512
|
+
}
|
|
513
|
+
return t;
|
|
514
|
+
},
|
|
515
|
+
__wbg_instanceof_Uint8Array_86f30649f63ef9c2: function(e) {
|
|
516
|
+
let t;
|
|
517
|
+
try {
|
|
518
|
+
t = e instanceof Uint8Array;
|
|
519
|
+
} catch {
|
|
520
|
+
t = !1;
|
|
521
|
+
}
|
|
522
|
+
return t;
|
|
523
|
+
},
|
|
524
|
+
__wbg_isArray_67c2c9c4313f4448: function(e) {
|
|
525
|
+
return Array.isArray(e);
|
|
526
|
+
},
|
|
527
|
+
__wbg_isSafeInteger_66acec27e09e99a7: function(e) {
|
|
528
|
+
return Number.isSafeInteger(e);
|
|
529
|
+
},
|
|
530
|
+
__wbg_iterator_8732428d309e270e: function() {
|
|
531
|
+
return Symbol.iterator;
|
|
532
|
+
},
|
|
533
|
+
__wbg_length_4a591ecaa01354d9: function(e) {
|
|
534
|
+
return e.length;
|
|
535
|
+
},
|
|
536
|
+
__wbg_length_66f1a4b2e9026940: function(e) {
|
|
537
|
+
return e.length;
|
|
538
|
+
},
|
|
539
|
+
__wbg_msCrypto_bd5a034af96bcba6: function(e) {
|
|
540
|
+
return e.msCrypto;
|
|
541
|
+
},
|
|
542
|
+
__wbg_new_0_445c13a750296eb6: function() {
|
|
543
|
+
return /* @__PURE__ */ new Date();
|
|
544
|
+
},
|
|
545
|
+
__wbg_new_0d09705104e164af: function() {
|
|
546
|
+
return f(function() {
|
|
547
|
+
return new AbortController();
|
|
548
|
+
}, arguments);
|
|
549
|
+
},
|
|
550
|
+
__wbg_new_227d7c05414eb861: function() {
|
|
551
|
+
return new Error();
|
|
552
|
+
},
|
|
553
|
+
__wbg_new_578aeef4b6b94378: function(e) {
|
|
554
|
+
return new Uint8Array(e);
|
|
555
|
+
},
|
|
556
|
+
__wbg_new_622fc80556be2e26: function() {
|
|
557
|
+
return /* @__PURE__ */ new Map();
|
|
558
|
+
},
|
|
559
|
+
__wbg_new_a1b9f645bba64f0f: function() {
|
|
560
|
+
return f(function() {
|
|
561
|
+
return new FileReaderSync();
|
|
562
|
+
}, arguments);
|
|
563
|
+
},
|
|
564
|
+
__wbg_new_ce1ab61c1c2b300d: function() {
|
|
565
|
+
return new Object();
|
|
566
|
+
},
|
|
567
|
+
__wbg_new_d90091b82fdf5b91: function() {
|
|
568
|
+
return new Array();
|
|
569
|
+
},
|
|
570
|
+
__wbg_new_e436d06bc8e77460: function() {
|
|
571
|
+
return f(function() {
|
|
572
|
+
return new Headers();
|
|
573
|
+
}, arguments);
|
|
574
|
+
},
|
|
575
|
+
__wbg_new_from_slice_18fa1f71286d66b8: function(e, t) {
|
|
576
|
+
return new Uint8Array(v(e, t));
|
|
577
|
+
},
|
|
578
|
+
__wbg_new_typed_bf31d18f92484486: function(e, t) {
|
|
579
|
+
try {
|
|
580
|
+
var n = { a: e, b: t }, _ = (i, s) => {
|
|
581
|
+
const a = n.a;
|
|
582
|
+
n.a = 0;
|
|
583
|
+
try {
|
|
584
|
+
return X(a, n.b, i, s);
|
|
585
|
+
} finally {
|
|
586
|
+
n.a = a;
|
|
587
|
+
}
|
|
588
|
+
};
|
|
589
|
+
return new Promise(_);
|
|
590
|
+
} finally {
|
|
591
|
+
n.a = 0;
|
|
592
|
+
}
|
|
593
|
+
},
|
|
594
|
+
__wbg_new_with_length_36a4998e27b014c5: function(e) {
|
|
595
|
+
return new Uint8Array(e >>> 0);
|
|
596
|
+
},
|
|
597
|
+
__wbg_new_with_str_and_init_bcd02b79a793d27f: function() {
|
|
598
|
+
return f(function(e, t, n) {
|
|
599
|
+
return new Request(y(e, t), n);
|
|
600
|
+
}, arguments);
|
|
601
|
+
},
|
|
602
|
+
__wbg_next_9e03acdf51c4960d: function(e) {
|
|
603
|
+
return e.next;
|
|
604
|
+
},
|
|
605
|
+
__wbg_next_eb8ca7351fa27906: function() {
|
|
606
|
+
return f(function(e) {
|
|
607
|
+
return e.next();
|
|
608
|
+
}, arguments);
|
|
609
|
+
},
|
|
610
|
+
__wbg_node_84ea875411254db1: function(e) {
|
|
611
|
+
return e.node;
|
|
612
|
+
},
|
|
613
|
+
__wbg_now_190933fa139cc119: function() {
|
|
614
|
+
return Date.now();
|
|
615
|
+
},
|
|
616
|
+
__wbg_process_44c7a14e11e9f69e: function(e) {
|
|
617
|
+
return e.process;
|
|
618
|
+
},
|
|
619
|
+
__wbg_prototypesetcall_3249fc62a0fafa30: function(e, t, n) {
|
|
620
|
+
Uint8Array.prototype.set.call(v(e, t), n);
|
|
621
|
+
},
|
|
622
|
+
__wbg_queueMicrotask_35c611f4a14830b2: function(e) {
|
|
623
|
+
queueMicrotask(e);
|
|
624
|
+
},
|
|
625
|
+
__wbg_queueMicrotask_404ed0a58e0b63cc: function(e) {
|
|
626
|
+
return e.queueMicrotask;
|
|
627
|
+
},
|
|
628
|
+
__wbg_randomFillSync_6c25eac9869eb53c: function() {
|
|
629
|
+
return f(function(e, t) {
|
|
630
|
+
e.randomFillSync(t);
|
|
631
|
+
}, arguments);
|
|
632
|
+
},
|
|
633
|
+
__wbg_readAsArrayBuffer_f1b8da05559618d9: function() {
|
|
634
|
+
return f(function(e, t) {
|
|
635
|
+
return e.readAsArrayBuffer(t);
|
|
636
|
+
}, arguments);
|
|
637
|
+
},
|
|
638
|
+
__wbg_require_b4edbdcf3e2a1ef0: function() {
|
|
639
|
+
return f(function() {
|
|
640
|
+
return C.require;
|
|
641
|
+
}, arguments);
|
|
642
|
+
},
|
|
643
|
+
__wbg_resolve_25a7e548d5881dca: function(e) {
|
|
644
|
+
return Promise.resolve(e);
|
|
645
|
+
},
|
|
646
|
+
__wbg_setTimeout_f757f00851f76c42: function(e, t) {
|
|
647
|
+
return setTimeout(e, t);
|
|
648
|
+
},
|
|
649
|
+
__wbg_set_29c99a8aac1c01e5: function(e, t, n) {
|
|
650
|
+
e.set(v(t, n));
|
|
651
|
+
},
|
|
652
|
+
__wbg_set_52b1e1eb5bed906a: function(e, t, n) {
|
|
653
|
+
return e.set(t, n);
|
|
654
|
+
},
|
|
655
|
+
__wbg_set_6be42768c690e380: function(e, t, n) {
|
|
656
|
+
e[t] = n;
|
|
657
|
+
},
|
|
658
|
+
__wbg_set_body_36614c7e61546809: function(e, t) {
|
|
659
|
+
e.body = t;
|
|
660
|
+
},
|
|
661
|
+
__wbg_set_cache_488ea16c11cbf20d: function(e, t) {
|
|
662
|
+
e.cache = Y[t];
|
|
663
|
+
},
|
|
664
|
+
__wbg_set_credentials_fa9c491a27c4bdf0: function(e, t) {
|
|
665
|
+
e.credentials = K[t];
|
|
666
|
+
},
|
|
667
|
+
__wbg_set_dca99999bba88a9a: function(e, t, n) {
|
|
668
|
+
e[t >>> 0] = n;
|
|
669
|
+
},
|
|
670
|
+
__wbg_set_headers_7c1e39ece7826bec: function(e, t) {
|
|
671
|
+
e.headers = t;
|
|
672
|
+
},
|
|
673
|
+
__wbg_set_method_7a6811dec7a4feff: function(e, t, n) {
|
|
674
|
+
e.method = y(t, n);
|
|
675
|
+
},
|
|
676
|
+
__wbg_set_mode_c90e3667002857d4: function(e, t) {
|
|
677
|
+
e.mode = Q[t];
|
|
678
|
+
},
|
|
679
|
+
__wbg_set_signal_d9da62b3f215c821: function(e, t) {
|
|
680
|
+
e.signal = t;
|
|
681
|
+
},
|
|
682
|
+
__wbg_signal_e03304a84df9ed09: function(e) {
|
|
683
|
+
return e.signal;
|
|
684
|
+
},
|
|
685
|
+
__wbg_size_9970092b88b1094c: function(e) {
|
|
686
|
+
return e.size;
|
|
687
|
+
},
|
|
688
|
+
__wbg_slice_02bb778501725738: function() {
|
|
689
|
+
return f(function(e, t, n) {
|
|
690
|
+
return e.slice(t, n);
|
|
691
|
+
}, arguments);
|
|
692
|
+
},
|
|
693
|
+
__wbg_stack_3b0d974bbf31e44f: function(e, t) {
|
|
694
|
+
const n = t.stack, _ = b(n, o.__wbindgen_malloc, o.__wbindgen_realloc), c = u;
|
|
695
|
+
m().setInt32(e + 4, c, !0), m().setInt32(e + 0, _, !0);
|
|
696
|
+
},
|
|
697
|
+
__wbg_static_accessor_GLOBAL_9d53f2689e622ca1: function() {
|
|
698
|
+
const e = typeof global > "u" ? null : global;
|
|
699
|
+
return w(e) ? 0 : S(e);
|
|
700
|
+
},
|
|
701
|
+
__wbg_static_accessor_GLOBAL_THIS_a1a35cec07001a8a: function() {
|
|
702
|
+
const e = typeof globalThis > "u" ? null : globalThis;
|
|
703
|
+
return w(e) ? 0 : S(e);
|
|
704
|
+
},
|
|
705
|
+
__wbg_static_accessor_SELF_4c59f6c7ea29a144: function() {
|
|
706
|
+
const e = typeof self > "u" ? null : self;
|
|
707
|
+
return w(e) ? 0 : S(e);
|
|
708
|
+
},
|
|
709
|
+
__wbg_static_accessor_WINDOW_e70ae9f2eb052253: function() {
|
|
710
|
+
const e = typeof window > "u" ? null : window;
|
|
711
|
+
return w(e) ? 0 : S(e);
|
|
712
|
+
},
|
|
713
|
+
__wbg_status_00549d55b78d949e: function(e) {
|
|
714
|
+
return e.status;
|
|
715
|
+
},
|
|
716
|
+
__wbg_stringify_8286df6dcc591521: function() {
|
|
717
|
+
return f(function(e) {
|
|
718
|
+
return JSON.stringify(e);
|
|
719
|
+
}, arguments);
|
|
720
|
+
},
|
|
721
|
+
__wbg_subarray_4aa221f6a4f5ab22: function(e, t, n) {
|
|
722
|
+
return e.subarray(t >>> 0, n >>> 0);
|
|
723
|
+
},
|
|
724
|
+
__wbg_then_18f476d590e58992: function(e, t, n) {
|
|
725
|
+
return e.then(t, n);
|
|
726
|
+
},
|
|
727
|
+
__wbg_then_ac7b025999b52837: function(e, t) {
|
|
728
|
+
return e.then(t);
|
|
729
|
+
},
|
|
730
|
+
__wbg_url_6808f1c468f2d0cd: function(e, t) {
|
|
731
|
+
const n = t.url, _ = b(n, o.__wbindgen_malloc, o.__wbindgen_realloc), c = u;
|
|
732
|
+
m().setInt32(e + 4, c, !0), m().setInt32(e + 0, _, !0);
|
|
733
|
+
},
|
|
734
|
+
__wbg_valueOf_41ae57308c1f031c: function(e) {
|
|
735
|
+
return e.valueOf();
|
|
736
|
+
},
|
|
737
|
+
__wbg_value_f3625092ee4b37f4: function(e) {
|
|
738
|
+
return e.value;
|
|
739
|
+
},
|
|
740
|
+
__wbg_versions_276b2795b1c6a219: function(e) {
|
|
741
|
+
return e.versions;
|
|
742
|
+
},
|
|
743
|
+
__wbg_wasmreader_new: function(e) {
|
|
744
|
+
return F.__wrap(e);
|
|
745
|
+
},
|
|
746
|
+
__wbindgen_cast_0000000000000001: function(e, t) {
|
|
747
|
+
return z(e, t, H);
|
|
748
|
+
},
|
|
749
|
+
__wbindgen_cast_0000000000000002: function(e, t) {
|
|
750
|
+
return z(e, t, $);
|
|
751
|
+
},
|
|
752
|
+
__wbindgen_cast_0000000000000003: function(e) {
|
|
753
|
+
return e;
|
|
754
|
+
},
|
|
755
|
+
__wbindgen_cast_0000000000000004: function(e) {
|
|
756
|
+
return e;
|
|
757
|
+
},
|
|
758
|
+
__wbindgen_cast_0000000000000005: function(e, t) {
|
|
759
|
+
return v(e, t);
|
|
760
|
+
},
|
|
761
|
+
__wbindgen_cast_0000000000000006: function(e, t) {
|
|
762
|
+
return y(e, t);
|
|
763
|
+
},
|
|
764
|
+
__wbindgen_cast_0000000000000007: function(e) {
|
|
765
|
+
return BigInt.asUintN(64, e);
|
|
766
|
+
},
|
|
767
|
+
__wbindgen_cast_0000000000000008: function(e, t) {
|
|
768
|
+
var n = v(e, t).slice();
|
|
769
|
+
return o.__wbindgen_free(e, t * 1, 1), n;
|
|
770
|
+
},
|
|
771
|
+
__wbindgen_init_externref_table: function() {
|
|
772
|
+
const e = o.__wbindgen_externrefs, t = e.grow(4);
|
|
773
|
+
e.set(0, void 0), e.set(t + 0, void 0), e.set(t + 1, null), e.set(t + 2, !0), e.set(t + 3, !1);
|
|
774
|
+
}
|
|
775
|
+
}
|
|
776
|
+
};
|
|
777
|
+
}
|
|
778
|
+
function $(r, e) {
|
|
779
|
+
o.wasm_bindgen__convert__closures_____invoke__h9ad77c532ffa5b9e(r, e);
|
|
780
|
+
}
|
|
781
|
+
function H(r, e, t) {
|
|
782
|
+
const n = o.wasm_bindgen__convert__closures_____invoke__hf2acc361175a8d00(r, e, t);
|
|
783
|
+
if (n[1])
|
|
784
|
+
throw d(n[0]);
|
|
785
|
+
}
|
|
786
|
+
function X(r, e, t, n) {
|
|
787
|
+
o.wasm_bindgen__convert__closures_____invoke__h53f6302d12a3bd57(r, e, t, n);
|
|
788
|
+
}
|
|
789
|
+
const Y = ["default", "no-store", "reload", "no-cache", "force-cache", "only-if-cached"], K = ["omit", "same-origin", "include"], Q = ["same-origin", "no-cors", "cors", "navigate"], x = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
790
|
+
}, unregister: () => {
|
|
791
|
+
} } : new FinalizationRegistry((r) => o.__wbg_wasmbuilder_free(r, 1)), k = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
792
|
+
}, unregister: () => {
|
|
793
|
+
} } : new FinalizationRegistry((r) => o.__wbg_wasmreader_free(r, 1));
|
|
794
|
+
typeof FinalizationRegistry > "u" || new FinalizationRegistry((r) => o.__wbg_wasmsigner_free(r, 1));
|
|
795
|
+
function S(r) {
|
|
796
|
+
const e = o.__externref_table_alloc();
|
|
797
|
+
return o.__wbindgen_externrefs.set(e, r), e;
|
|
798
|
+
}
|
|
799
|
+
const N = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
800
|
+
}, unregister: () => {
|
|
801
|
+
} } : new FinalizationRegistry((r) => o.__wbindgen_destroy_closure(r.a, r.b));
|
|
802
|
+
function O(r) {
|
|
803
|
+
const e = typeof r;
|
|
804
|
+
if (e == "number" || e == "boolean" || r == null)
|
|
805
|
+
return `${r}`;
|
|
806
|
+
if (e == "string")
|
|
807
|
+
return `"${r}"`;
|
|
808
|
+
if (e == "symbol") {
|
|
809
|
+
const _ = r.description;
|
|
810
|
+
return _ == null ? "Symbol" : `Symbol(${_})`;
|
|
811
|
+
}
|
|
812
|
+
if (e == "function") {
|
|
813
|
+
const _ = r.name;
|
|
814
|
+
return typeof _ == "string" && _.length > 0 ? `Function(${_})` : "Function";
|
|
815
|
+
}
|
|
816
|
+
if (Array.isArray(r)) {
|
|
817
|
+
const _ = r.length;
|
|
818
|
+
let c = "[";
|
|
819
|
+
_ > 0 && (c += O(r[0]));
|
|
820
|
+
for (let i = 1; i < _; i++)
|
|
821
|
+
c += ", " + O(r[i]);
|
|
822
|
+
return c += "]", c;
|
|
823
|
+
}
|
|
824
|
+
const t = /\[object ([^\]]+)\]/.exec(toString.call(r));
|
|
825
|
+
let n;
|
|
826
|
+
if (t && t.length > 1)
|
|
827
|
+
n = t[1];
|
|
828
|
+
else
|
|
829
|
+
return toString.call(r);
|
|
830
|
+
if (n == "Object")
|
|
831
|
+
try {
|
|
832
|
+
return "Object(" + JSON.stringify(r) + ")";
|
|
833
|
+
} catch {
|
|
834
|
+
return "Object";
|
|
835
|
+
}
|
|
836
|
+
return r instanceof Error ? `${r.name}: ${r.message}
|
|
837
|
+
${r.stack}` : n;
|
|
838
|
+
}
|
|
839
|
+
function v(r, e) {
|
|
840
|
+
return r = r >>> 0, M().subarray(r / 1, r / 1 + e);
|
|
841
|
+
}
|
|
842
|
+
let A = null;
|
|
843
|
+
function m() {
|
|
844
|
+
return (A === null || A.buffer.detached === !0 || A.buffer.detached === void 0 && A.buffer !== o.memory.buffer) && (A = new DataView(o.memory.buffer)), A;
|
|
845
|
+
}
|
|
846
|
+
function y(r, e) {
|
|
847
|
+
return ee(r >>> 0, e);
|
|
848
|
+
}
|
|
849
|
+
let B = null;
|
|
850
|
+
function M() {
|
|
851
|
+
return (B === null || B.byteLength === 0) && (B = new Uint8Array(o.memory.buffer)), B;
|
|
852
|
+
}
|
|
853
|
+
function f(r, e) {
|
|
854
|
+
try {
|
|
855
|
+
return r.apply(this, e);
|
|
856
|
+
} catch (t) {
|
|
857
|
+
const n = S(t);
|
|
858
|
+
o.__wbindgen_exn_store(n);
|
|
859
|
+
}
|
|
860
|
+
}
|
|
861
|
+
function w(r) {
|
|
862
|
+
return r == null;
|
|
863
|
+
}
|
|
864
|
+
function z(r, e, t) {
|
|
865
|
+
const n = { a: r, b: e, cnt: 1 }, _ = (...c) => {
|
|
866
|
+
n.cnt++;
|
|
867
|
+
const i = n.a;
|
|
868
|
+
n.a = 0;
|
|
869
|
+
try {
|
|
870
|
+
return t(i, n.b, ...c);
|
|
871
|
+
} finally {
|
|
872
|
+
n.a = i, _._wbg_cb_unref();
|
|
873
|
+
}
|
|
874
|
+
};
|
|
875
|
+
return _._wbg_cb_unref = () => {
|
|
876
|
+
--n.cnt === 0 && (o.__wbindgen_destroy_closure(n.a, n.b), n.a = 0, N.unregister(n));
|
|
877
|
+
}, N.register(_, n, n), _;
|
|
878
|
+
}
|
|
879
|
+
function b(r, e, t) {
|
|
880
|
+
if (t === void 0) {
|
|
881
|
+
const s = T.encode(r), a = e(s.length, 1) >>> 0;
|
|
882
|
+
return M().subarray(a, a + s.length).set(s), u = s.length, a;
|
|
883
|
+
}
|
|
884
|
+
let n = r.length, _ = e(n, 1) >>> 0;
|
|
885
|
+
const c = M();
|
|
886
|
+
let i = 0;
|
|
887
|
+
for (; i < n; i++) {
|
|
888
|
+
const s = r.charCodeAt(i);
|
|
889
|
+
if (s > 127) break;
|
|
890
|
+
c[_ + i] = s;
|
|
891
|
+
}
|
|
892
|
+
if (i !== n) {
|
|
893
|
+
i !== 0 && (r = r.slice(i)), _ = t(_, n, n = i + r.length * 3, 1) >>> 0;
|
|
894
|
+
const s = M().subarray(_ + i, _ + n), a = T.encodeInto(r, s);
|
|
895
|
+
i += a.written, _ = t(_, n, i, 1) >>> 0;
|
|
896
|
+
}
|
|
897
|
+
return u = i, _;
|
|
898
|
+
}
|
|
899
|
+
function d(r) {
|
|
900
|
+
const e = o.__wbindgen_externrefs.get(r);
|
|
901
|
+
return o.__externref_table_dealloc(r), e;
|
|
902
|
+
}
|
|
903
|
+
let E = new TextDecoder("utf-8", { ignoreBOM: !0, fatal: !0 });
|
|
904
|
+
E.decode();
|
|
905
|
+
const Z = 2146435072;
|
|
906
|
+
let j = 0;
|
|
907
|
+
function ee(r, e) {
|
|
908
|
+
return j += e, j >= Z && (E = new TextDecoder("utf-8", { ignoreBOM: !0, fatal: !0 }), E.decode(), j = e), E.decode(M().subarray(r, r + e));
|
|
909
|
+
}
|
|
910
|
+
const T = new TextEncoder();
|
|
911
|
+
"encodeInto" in T || (T.encodeInto = function(r, e) {
|
|
912
|
+
const t = T.encode(r);
|
|
913
|
+
return e.set(t), {
|
|
914
|
+
read: r.length,
|
|
915
|
+
written: t.length
|
|
916
|
+
};
|
|
917
|
+
});
|
|
918
|
+
let u = 0, o;
|
|
919
|
+
function te(r, e) {
|
|
920
|
+
return o = r.exports, A = null, B = null, o.__wbindgen_start(), o;
|
|
921
|
+
}
|
|
922
|
+
function ne(r) {
|
|
923
|
+
if (o !== void 0) return o;
|
|
924
|
+
r !== void 0 && (Object.getPrototypeOf(r) === Object.prototype ? { module: r } = r : console.warn("using deprecated parameters for `initSync()`; pass a single object instead"));
|
|
925
|
+
const e = P();
|
|
926
|
+
r instanceof WebAssembly.Module || (r = new WebAssembly.Module(r));
|
|
927
|
+
const t = new WebAssembly.Instance(r, e);
|
|
928
|
+
return te(t);
|
|
929
|
+
}
|
|
930
|
+
function U() {
|
|
931
|
+
let r = 0;
|
|
932
|
+
const e = /* @__PURE__ */ new Map();
|
|
933
|
+
return {
|
|
934
|
+
add(t) {
|
|
935
|
+
const n = r++;
|
|
936
|
+
return e.set(n, t), n;
|
|
937
|
+
},
|
|
938
|
+
get(t) {
|
|
939
|
+
const n = e.get(t);
|
|
940
|
+
if (!n)
|
|
941
|
+
throw new Error("Attempted to use an object that has been freed");
|
|
942
|
+
return n;
|
|
943
|
+
},
|
|
944
|
+
remove(t) {
|
|
945
|
+
return e.delete(t);
|
|
946
|
+
}
|
|
947
|
+
};
|
|
948
|
+
}
|
|
949
|
+
const q = Symbol("transfer");
|
|
950
|
+
function R(r, e) {
|
|
951
|
+
return {
|
|
952
|
+
type: q,
|
|
953
|
+
value: r,
|
|
954
|
+
transfer: e ? Array.isArray(e) ? e : [e] : [r]
|
|
955
|
+
};
|
|
956
|
+
}
|
|
957
|
+
function D(r) {
|
|
958
|
+
return !!(r && typeof r == "object" && Reflect.get(r, "type") === q);
|
|
959
|
+
}
|
|
960
|
+
function W(r = "default") {
|
|
961
|
+
return {
|
|
962
|
+
createTx(e) {
|
|
963
|
+
const t = /* @__PURE__ */ new Map(), n = e ?? self;
|
|
964
|
+
return n.addEventListener("message", (_) => {
|
|
965
|
+
const { data: c } = _;
|
|
966
|
+
if (c.channelName !== r)
|
|
967
|
+
return;
|
|
968
|
+
const { id: i, result: s, error: a } = c, g = t.get(i);
|
|
969
|
+
g && (a ? g.reject(a) : g.resolve(s), t.delete(i));
|
|
970
|
+
}), new Proxy(
|
|
971
|
+
{},
|
|
972
|
+
{
|
|
973
|
+
get(_, c) {
|
|
974
|
+
return (...i) => {
|
|
975
|
+
const s = re(), a = [], g = [];
|
|
976
|
+
return i.forEach((I) => {
|
|
977
|
+
D(I) ? (a.push(I.value), g.push(...I.transfer)) : a.push(I);
|
|
978
|
+
}), n.postMessage(
|
|
979
|
+
{ method: c, args: a, id: s, channelName: r },
|
|
980
|
+
{ transfer: g }
|
|
981
|
+
), new Promise((I, J) => {
|
|
982
|
+
t.set(s, { resolve: I, reject: J });
|
|
983
|
+
});
|
|
984
|
+
};
|
|
985
|
+
}
|
|
986
|
+
}
|
|
987
|
+
);
|
|
988
|
+
},
|
|
989
|
+
rx(e, t) {
|
|
990
|
+
const n = t ?? self;
|
|
991
|
+
n.addEventListener("message", async (_) => {
|
|
992
|
+
const { data: c } = _;
|
|
993
|
+
if (c.channelName !== r)
|
|
994
|
+
return;
|
|
995
|
+
const { method: i, args: s, id: a } = c;
|
|
996
|
+
try {
|
|
997
|
+
const g = await e[i](...s);
|
|
998
|
+
D(g) ? n.postMessage(
|
|
999
|
+
{ result: g.value, id: a, channelName: r },
|
|
1000
|
+
{ transfer: g.transfer }
|
|
1001
|
+
) : n.postMessage({ result: g, id: a, channelName: r });
|
|
1002
|
+
} catch (g) {
|
|
1003
|
+
n.postMessage({ error: g, id: a, channelName: r });
|
|
1004
|
+
}
|
|
1005
|
+
});
|
|
1006
|
+
}
|
|
1007
|
+
};
|
|
1008
|
+
}
|
|
1009
|
+
function re() {
|
|
1010
|
+
return new Array(4).fill(0).map(() => Math.floor(Math.random() * Number.MAX_SAFE_INTEGER).toString(16)).join("-");
|
|
1011
|
+
}
|
|
1012
|
+
const { rx: _e } = W(), { createTx: oe } = W("worker"), p = U(), l = U(), L = oe();
|
|
1013
|
+
_e(
|
|
1014
|
+
ce({
|
|
1015
|
+
async initWorker(r, e) {
|
|
1016
|
+
ne({ module: r }), e && G(e);
|
|
1017
|
+
},
|
|
1018
|
+
async reader_fromBlob(r, e, t) {
|
|
1019
|
+
const n = await F.fromBlob(r, e, t);
|
|
1020
|
+
return p.add(n);
|
|
1021
|
+
},
|
|
1022
|
+
async reader_fromBlobFragment(r, e, t, n) {
|
|
1023
|
+
const _ = await F.fromBlobFragment(
|
|
1024
|
+
r,
|
|
1025
|
+
e,
|
|
1026
|
+
t,
|
|
1027
|
+
n
|
|
1028
|
+
);
|
|
1029
|
+
return p.add(_);
|
|
1030
|
+
},
|
|
1031
|
+
reader_activeLabel(r) {
|
|
1032
|
+
return p.get(r).activeLabel() ?? null;
|
|
1033
|
+
},
|
|
1034
|
+
reader_manifestStore(r) {
|
|
1035
|
+
return p.get(r).manifestStore();
|
|
1036
|
+
},
|
|
1037
|
+
reader_activeManifest(r) {
|
|
1038
|
+
return p.get(r).activeManifest();
|
|
1039
|
+
},
|
|
1040
|
+
reader_json(r) {
|
|
1041
|
+
return p.get(r).json();
|
|
1042
|
+
},
|
|
1043
|
+
reader_crJson(r) {
|
|
1044
|
+
return p.get(r).crJson();
|
|
1045
|
+
},
|
|
1046
|
+
reader_resourceToBytes(r, e) {
|
|
1047
|
+
const n = p.get(r).resourceToBytes(e);
|
|
1048
|
+
return R(n, n.buffer);
|
|
1049
|
+
},
|
|
1050
|
+
reader_free(r) {
|
|
1051
|
+
p.get(r).free(), p.remove(r);
|
|
1052
|
+
},
|
|
1053
|
+
builder_new(r) {
|
|
1054
|
+
const e = h.new(r);
|
|
1055
|
+
return l.add(e);
|
|
1056
|
+
},
|
|
1057
|
+
builder_fromJson(r, e) {
|
|
1058
|
+
const t = h.fromJson(r, e);
|
|
1059
|
+
return l.add(t);
|
|
1060
|
+
},
|
|
1061
|
+
builder_fromArchive(r, e) {
|
|
1062
|
+
const t = h.fromArchive(r, e);
|
|
1063
|
+
return l.add(t);
|
|
1064
|
+
},
|
|
1065
|
+
builder_setIntent(r, e) {
|
|
1066
|
+
l.get(r).setIntent(e);
|
|
1067
|
+
},
|
|
1068
|
+
builder_addAction(r, e) {
|
|
1069
|
+
l.get(r).addAction(e);
|
|
1070
|
+
},
|
|
1071
|
+
builder_addRedaction(r, e, t) {
|
|
1072
|
+
l.get(r).addRedaction(e, t);
|
|
1073
|
+
},
|
|
1074
|
+
builder_setRemoteUrl(r, e) {
|
|
1075
|
+
l.get(r).setRemoteUrl(e);
|
|
1076
|
+
},
|
|
1077
|
+
builder_setNoEmbed(r, e) {
|
|
1078
|
+
l.get(r).setNoEmbed(e);
|
|
1079
|
+
},
|
|
1080
|
+
builder_setThumbnailFromBlob(r, e, t) {
|
|
1081
|
+
l.get(r).setThumbnailFromBlob(e, t);
|
|
1082
|
+
},
|
|
1083
|
+
builder_addIngredient(r, e) {
|
|
1084
|
+
l.get(r).addIngredient(e);
|
|
1085
|
+
},
|
|
1086
|
+
async builder_addIngredientFromBlob(r, e, t, n) {
|
|
1087
|
+
await l.get(r).addIngredientFromBlob(e, t, n);
|
|
1088
|
+
},
|
|
1089
|
+
builder_addResourceFromBlob(r, e, t) {
|
|
1090
|
+
l.get(r).addResourceFromBlob(e, t);
|
|
1091
|
+
},
|
|
1092
|
+
builder_getDefinition(r) {
|
|
1093
|
+
return l.get(r).getDefinition();
|
|
1094
|
+
},
|
|
1095
|
+
builder_toArchive(r) {
|
|
1096
|
+
const t = l.get(r).toArchive();
|
|
1097
|
+
return R(t, t.buffer);
|
|
1098
|
+
},
|
|
1099
|
+
async builder_sign(r, e, t, n, _) {
|
|
1100
|
+
const i = await l.get(r).sign(
|
|
1101
|
+
{
|
|
1102
|
+
reserveSize: t.reserveSize,
|
|
1103
|
+
alg: t.alg,
|
|
1104
|
+
sign: async (s) => await L.sign(
|
|
1105
|
+
e,
|
|
1106
|
+
R(s, s.buffer),
|
|
1107
|
+
t.reserveSize
|
|
1108
|
+
)
|
|
1109
|
+
},
|
|
1110
|
+
n,
|
|
1111
|
+
_
|
|
1112
|
+
);
|
|
1113
|
+
return R(i, i.buffer);
|
|
1114
|
+
},
|
|
1115
|
+
async builder_signAndGetManifestBytes(r, e, t, n, _) {
|
|
1116
|
+
const c = l.get(r), { manifest: i, asset: s } = await c.signAndGetManifestBytes(
|
|
1117
|
+
{
|
|
1118
|
+
reserveSize: t.reserveSize,
|
|
1119
|
+
alg: t.alg,
|
|
1120
|
+
sign: async (a) => await L.sign(
|
|
1121
|
+
e,
|
|
1122
|
+
R(a, a.buffer),
|
|
1123
|
+
t.reserveSize
|
|
1124
|
+
)
|
|
1125
|
+
},
|
|
1126
|
+
n,
|
|
1127
|
+
_
|
|
1128
|
+
);
|
|
1129
|
+
return R(
|
|
1130
|
+
{
|
|
1131
|
+
manifest: i,
|
|
1132
|
+
asset: s
|
|
1133
|
+
},
|
|
1134
|
+
[i.buffer, s.buffer]
|
|
1135
|
+
);
|
|
1136
|
+
},
|
|
1137
|
+
builder_free(r) {
|
|
1138
|
+
l.get(r).free(), l.remove(r);
|
|
1139
|
+
}
|
|
1140
|
+
})
|
|
1141
|
+
);
|
|
1142
|
+
function ce(r) {
|
|
1143
|
+
const e = {};
|
|
1144
|
+
for (const [t, n] of Object.entries(r))
|
|
1145
|
+
e[t] = async (..._) => {
|
|
1146
|
+
try {
|
|
1147
|
+
return await n(..._);
|
|
1148
|
+
} catch (c) {
|
|
1149
|
+
throw typeof c == "string" ? new Error(c) : c;
|
|
1150
|
+
}
|
|
1151
|
+
};
|
|
1152
|
+
return e;
|
|
1153
|
+
}
|
|
1154
|
+
});
|
|
1155
|
+
export default ie();
|