@contentauth/c2pa-web 0.15.0 → 0.15.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/c2pa-DIv7lJlp.js +886 -0
- package/dist/c2pa_worker.js +255 -203
- package/dist/common.d.ts +1 -1
- package/dist/common.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/inline.js +10 -10
- package/dist/lib/builder.d.ts +15 -3
- package/dist/lib/builder.d.ts.map +1 -1
- package/dist/lib/signer.d.ts +75 -0
- package/dist/lib/signer.d.ts.map +1 -1
- package/dist/lib/worker/rpc.d.ts +7 -5
- package/dist/lib/worker/rpc.d.ts.map +1 -1
- package/dist/lib/worker/workerManager.d.ts +2 -1
- package/dist/lib/worker/workerManager.d.ts.map +1 -1
- package/dist/resources/c2pa_bg.wasm +0 -0
- package/package.json +2 -2
- package/dist/c2pa-Pcrzki0G.js +0 -826
package/dist/c2pa_worker.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var $ = (r, e) => () => (e || r((e = { exports: {} }).exports, e), e.exports);
|
|
2
|
+
var be = $((le, P) => {
|
|
3
3
|
class h {
|
|
4
4
|
static __wrap(e) {
|
|
5
5
|
const t = Object.create(h.prototype);
|
|
6
|
-
return t.__wbg_ptr = e,
|
|
6
|
+
return t.__wbg_ptr = e, z.register(t, t.__wbg_ptr, t), t;
|
|
7
7
|
}
|
|
8
8
|
__destroy_into_raw() {
|
|
9
9
|
const e = this.__wbg_ptr;
|
|
10
|
-
return this.__wbg_ptr = 0,
|
|
10
|
+
return this.__wbg_ptr = 0, z.unregister(this), e;
|
|
11
11
|
}
|
|
12
12
|
free() {
|
|
13
13
|
const e = this.__destroy_into_raw();
|
|
@@ -20,7 +20,7 @@ var ue = G((be, C) => {
|
|
|
20
20
|
addAction(e) {
|
|
21
21
|
const t = o.wasmbuilder_addAction(this.__wbg_ptr, e);
|
|
22
22
|
if (t[1])
|
|
23
|
-
throw
|
|
23
|
+
throw b(t[0]);
|
|
24
24
|
}
|
|
25
25
|
/**
|
|
26
26
|
* Add an assertion to the manifest under `label` with the given `data`.
|
|
@@ -28,9 +28,9 @@ var ue = G((be, C) => {
|
|
|
28
28
|
* @param {any} data
|
|
29
29
|
*/
|
|
30
30
|
addAssertion(e, t) {
|
|
31
|
-
const n =
|
|
31
|
+
const n = d(e, o.__wbindgen_malloc, o.__wbindgen_realloc), _ = a, c = o.wasmbuilder_addAssertion(this.__wbg_ptr, n, _, t);
|
|
32
32
|
if (c[1])
|
|
33
|
-
throw
|
|
33
|
+
throw b(c[0]);
|
|
34
34
|
}
|
|
35
35
|
/**
|
|
36
36
|
* Add an ingredient to the manifest from a JSON ingredient definition without a blob
|
|
@@ -40,9 +40,9 @@ var ue = G((be, C) => {
|
|
|
40
40
|
* @param {string} json
|
|
41
41
|
*/
|
|
42
42
|
addIngredient(e) {
|
|
43
|
-
const t =
|
|
43
|
+
const t = d(e, o.__wbindgen_malloc, o.__wbindgen_realloc), n = a, _ = o.wasmbuilder_addIngredient(this.__wbg_ptr, t, n);
|
|
44
44
|
if (_[1])
|
|
45
|
-
throw
|
|
45
|
+
throw b(_[0]);
|
|
46
46
|
}
|
|
47
47
|
/**
|
|
48
48
|
* Add an ingredient to the manifest from a JSON ingredient definition and a [`Blob`].
|
|
@@ -57,8 +57,8 @@ var ue = G((be, C) => {
|
|
|
57
57
|
* @returns {Promise<void>}
|
|
58
58
|
*/
|
|
59
59
|
addIngredientFromBlob(e, t, n) {
|
|
60
|
-
const _ =
|
|
61
|
-
return o.wasmbuilder_addIngredientFromBlob(this.__wbg_ptr, _, c,
|
|
60
|
+
const _ = d(e, o.__wbindgen_malloc, o.__wbindgen_realloc), c = a, s = d(t, o.__wbindgen_malloc, o.__wbindgen_realloc), i = a;
|
|
61
|
+
return o.wasmbuilder_addIngredientFromBlob(this.__wbg_ptr, _, c, s, i, n);
|
|
62
62
|
}
|
|
63
63
|
/**
|
|
64
64
|
* Add a redaction for a JUMBF URI with the given reason.
|
|
@@ -69,9 +69,9 @@ var ue = G((be, C) => {
|
|
|
69
69
|
* @param {any} reason
|
|
70
70
|
*/
|
|
71
71
|
addRedaction(e, t) {
|
|
72
|
-
const n =
|
|
72
|
+
const n = d(e, o.__wbindgen_malloc, o.__wbindgen_realloc), _ = a, c = o.wasmbuilder_addRedaction(this.__wbg_ptr, n, _, t);
|
|
73
73
|
if (c[1])
|
|
74
|
-
throw
|
|
74
|
+
throw b(c[0]);
|
|
75
75
|
}
|
|
76
76
|
/**
|
|
77
77
|
* Add a [`Blob`] to the manifest as a resource. The ID must match an identifier in the manifest.
|
|
@@ -79,9 +79,9 @@ var ue = G((be, C) => {
|
|
|
79
79
|
* @param {Blob} blob
|
|
80
80
|
*/
|
|
81
81
|
addResourceFromBlob(e, t) {
|
|
82
|
-
const n =
|
|
82
|
+
const n = d(e, o.__wbindgen_malloc, o.__wbindgen_realloc), _ = a, c = o.wasmbuilder_addResourceFromBlob(this.__wbg_ptr, n, _, t);
|
|
83
83
|
if (c[1])
|
|
84
|
-
throw
|
|
84
|
+
throw b(c[0]);
|
|
85
85
|
}
|
|
86
86
|
/**
|
|
87
87
|
* Retains actions and ingredients together in one step, per
|
|
@@ -96,9 +96,9 @@ var ue = G((be, C) => {
|
|
|
96
96
|
* @param {Uint32Array} ingredient_indices
|
|
97
97
|
*/
|
|
98
98
|
filterActionsAndIngredientsAt(e, t) {
|
|
99
|
-
const n = E(e, o.__wbindgen_malloc), _ = a, c = E(t, o.__wbindgen_malloc),
|
|
100
|
-
if (
|
|
101
|
-
throw
|
|
99
|
+
const n = E(e, o.__wbindgen_malloc), _ = a, c = E(t, o.__wbindgen_malloc), s = a, i = o.wasmbuilder_filterActionsAndIngredientsAt(this.__wbg_ptr, n, _, c, s);
|
|
100
|
+
if (i[1])
|
|
101
|
+
throw b(i[0]);
|
|
102
102
|
}
|
|
103
103
|
/**
|
|
104
104
|
* Retains only the actions at the given 0-based indices into the actions currently returned
|
|
@@ -120,7 +120,7 @@ var ue = G((be, C) => {
|
|
|
120
120
|
filterActionsAt(e) {
|
|
121
121
|
const t = E(e, o.__wbindgen_malloc), n = a, _ = o.wasmbuilder_filterActionsAt(this.__wbg_ptr, t, n);
|
|
122
122
|
if (_[1])
|
|
123
|
-
throw
|
|
123
|
+
throw b(_[0]);
|
|
124
124
|
}
|
|
125
125
|
/**
|
|
126
126
|
* Retains ingredients, rescuing an otherwise-orphaned ingredient when its 0-based index into
|
|
@@ -134,7 +134,7 @@ var ue = G((be, C) => {
|
|
|
134
134
|
filterIngredientsAt(e) {
|
|
135
135
|
const t = E(e, o.__wbindgen_malloc), n = a, _ = o.wasmbuilder_filterIngredientsAt(this.__wbg_ptr, t, n);
|
|
136
136
|
if (_[1])
|
|
137
|
-
throw
|
|
137
|
+
throw b(_[0]);
|
|
138
138
|
}
|
|
139
139
|
/**
|
|
140
140
|
* Attempts to create a new `WasmBuilder` from a builder archive.
|
|
@@ -144,10 +144,10 @@ var ue = G((be, C) => {
|
|
|
144
144
|
* @returns {WasmBuilder}
|
|
145
145
|
*/
|
|
146
146
|
static fromArchive(e, t) {
|
|
147
|
-
var n = w(t) ? 0 :
|
|
147
|
+
var n = w(t) ? 0 : d(t, o.__wbindgen_malloc, o.__wbindgen_realloc), _ = a;
|
|
148
148
|
const c = o.wasmbuilder_fromArchive(e, n, _);
|
|
149
149
|
if (c[2])
|
|
150
|
-
throw
|
|
150
|
+
throw b(c[1]);
|
|
151
151
|
return h.__wrap(c[0]);
|
|
152
152
|
}
|
|
153
153
|
/**
|
|
@@ -158,12 +158,12 @@ var ue = G((be, C) => {
|
|
|
158
158
|
* @returns {WasmBuilder}
|
|
159
159
|
*/
|
|
160
160
|
static fromJson(e, t) {
|
|
161
|
-
const n =
|
|
162
|
-
var c = w(t) ? 0 :
|
|
163
|
-
const
|
|
164
|
-
if (
|
|
165
|
-
throw
|
|
166
|
-
return h.__wrap(
|
|
161
|
+
const n = d(e, o.__wbindgen_malloc, o.__wbindgen_realloc), _ = a;
|
|
162
|
+
var c = w(t) ? 0 : d(t, o.__wbindgen_malloc, o.__wbindgen_realloc), s = a;
|
|
163
|
+
const i = o.wasmbuilder_fromJson(n, _, c, s);
|
|
164
|
+
if (i[2])
|
|
165
|
+
throw b(i[1]);
|
|
166
|
+
return h.__wrap(i[0]);
|
|
167
167
|
}
|
|
168
168
|
/**
|
|
169
169
|
* Get the current manifest definition.
|
|
@@ -172,8 +172,8 @@ var ue = G((be, C) => {
|
|
|
172
172
|
getDefinition() {
|
|
173
173
|
const e = o.wasmbuilder_getDefinition(this.__wbg_ptr);
|
|
174
174
|
if (e[2])
|
|
175
|
-
throw
|
|
176
|
-
return
|
|
175
|
+
throw b(e[1]);
|
|
176
|
+
return b(e[0]);
|
|
177
177
|
}
|
|
178
178
|
/**
|
|
179
179
|
* Creates a new `WasmBuilder` with a minimal manifest definition.
|
|
@@ -182,10 +182,10 @@ var ue = G((be, C) => {
|
|
|
182
182
|
* @returns {WasmBuilder}
|
|
183
183
|
*/
|
|
184
184
|
static new(e) {
|
|
185
|
-
var t = w(e) ? 0 :
|
|
185
|
+
var t = w(e) ? 0 : d(e, o.__wbindgen_malloc, o.__wbindgen_realloc), n = a;
|
|
186
186
|
const _ = o.wasmbuilder_new(t, n);
|
|
187
187
|
if (_[2])
|
|
188
|
-
throw
|
|
188
|
+
throw b(_[1]);
|
|
189
189
|
return h.__wrap(_[0]);
|
|
190
190
|
}
|
|
191
191
|
/**
|
|
@@ -195,7 +195,7 @@ var ue = G((be, C) => {
|
|
|
195
195
|
setIntent(e) {
|
|
196
196
|
const t = o.wasmbuilder_setIntent(this.__wbg_ptr, e);
|
|
197
197
|
if (t[1])
|
|
198
|
-
throw
|
|
198
|
+
throw b(t[0]);
|
|
199
199
|
}
|
|
200
200
|
/**
|
|
201
201
|
* Sets the state of the no_embed flag.
|
|
@@ -212,7 +212,7 @@ var ue = G((be, C) => {
|
|
|
212
212
|
* @param {string} url
|
|
213
213
|
*/
|
|
214
214
|
setRemoteUrl(e) {
|
|
215
|
-
const t =
|
|
215
|
+
const t = d(e, o.__wbindgen_malloc, o.__wbindgen_realloc), n = a;
|
|
216
216
|
o.wasmbuilder_setRemoteUrl(this.__wbg_ptr, t, n);
|
|
217
217
|
}
|
|
218
218
|
/**
|
|
@@ -221,32 +221,40 @@ var ue = G((be, C) => {
|
|
|
221
221
|
* @param {Blob} blob
|
|
222
222
|
*/
|
|
223
223
|
setThumbnailFromBlob(e, t) {
|
|
224
|
-
const n =
|
|
224
|
+
const n = d(e, o.__wbindgen_malloc, o.__wbindgen_realloc), _ = a, c = o.wasmbuilder_setThumbnailFromBlob(this.__wbg_ptr, n, _, t);
|
|
225
225
|
if (c[1])
|
|
226
|
-
throw
|
|
226
|
+
throw b(c[0]);
|
|
227
227
|
}
|
|
228
228
|
/**
|
|
229
229
|
* Sign an asset using the provided SignerDefinition, format, and source Blob.
|
|
230
|
+
*
|
|
231
|
+
* `identity_assertions` is an array of `IdentityAssertionDefinition` (see
|
|
232
|
+
* `wasm_identity_assertion`'s typescript_custom_section); pass an empty
|
|
233
|
+
* array when no CAWG identity assertions are requested.
|
|
230
234
|
* @param {SignerDefinition} signer_definition
|
|
235
|
+
* @param {any} identity_assertions
|
|
231
236
|
* @param {string} format
|
|
232
237
|
* @param {Blob} source
|
|
233
238
|
* @returns {Promise<Uint8Array>}
|
|
234
239
|
*/
|
|
235
|
-
sign(e, t, n) {
|
|
236
|
-
const
|
|
237
|
-
return o.wasmbuilder_sign(this.__wbg_ptr, e,
|
|
240
|
+
sign(e, t, n, _) {
|
|
241
|
+
const c = d(n, o.__wbindgen_malloc, o.__wbindgen_realloc), s = a;
|
|
242
|
+
return o.wasmbuilder_sign(this.__wbg_ptr, e, t, c, s, _);
|
|
238
243
|
}
|
|
239
244
|
/**
|
|
240
245
|
* Sign an asset using the provided SignerDefinition, format, and source Blob.
|
|
241
246
|
* Use this method to get both the manifest bytes and the bytes of the signed asset.
|
|
247
|
+
*
|
|
248
|
+
* See [`Self::sign`] for `identity_assertions`.
|
|
242
249
|
* @param {SignerDefinition} signer_definition
|
|
250
|
+
* @param {any} identity_assertions
|
|
243
251
|
* @param {string} format
|
|
244
252
|
* @param {Blob} source
|
|
245
253
|
* @returns {Promise<any>}
|
|
246
254
|
*/
|
|
247
|
-
signAndGetManifestBytes(e, t, n) {
|
|
248
|
-
const
|
|
249
|
-
return o.wasmbuilder_signAndGetManifestBytes(this.__wbg_ptr, e,
|
|
255
|
+
signAndGetManifestBytes(e, t, n, _) {
|
|
256
|
+
const c = d(n, o.__wbindgen_malloc, o.__wbindgen_realloc), s = a;
|
|
257
|
+
return o.wasmbuilder_signAndGetManifestBytes(this.__wbg_ptr, e, t, c, s, _);
|
|
250
258
|
}
|
|
251
259
|
/**
|
|
252
260
|
* "Save" a builder to an archive.
|
|
@@ -255,8 +263,8 @@ var ue = G((be, C) => {
|
|
|
255
263
|
toArchive() {
|
|
256
264
|
const e = o.wasmbuilder_toArchive(this.__wbg_ptr);
|
|
257
265
|
if (e[2])
|
|
258
|
-
throw
|
|
259
|
-
return
|
|
266
|
+
throw b(e[1]);
|
|
267
|
+
return b(e[0]);
|
|
260
268
|
}
|
|
261
269
|
/**
|
|
262
270
|
* Replaces the actions in the `c2pa.actions`/`c2pa.actions.v2` assertions with
|
|
@@ -285,13 +293,13 @@ var ue = G((be, C) => {
|
|
|
285
293
|
updateActionsAt(e) {
|
|
286
294
|
const t = o.wasmbuilder_updateActionsAt(this.__wbg_ptr, e);
|
|
287
295
|
if (t[1])
|
|
288
|
-
throw
|
|
296
|
+
throw b(t[0]);
|
|
289
297
|
}
|
|
290
298
|
}
|
|
291
299
|
Symbol.dispose && (h.prototype[Symbol.dispose] = h.prototype.free);
|
|
292
|
-
class
|
|
300
|
+
class M {
|
|
293
301
|
static __wrap(e) {
|
|
294
|
-
const t = Object.create(
|
|
302
|
+
const t = Object.create(M.prototype);
|
|
295
303
|
return t.__wbg_ptr = e, N.register(t, t.__wbg_ptr, t), t;
|
|
296
304
|
}
|
|
297
305
|
__destroy_into_raw() {
|
|
@@ -318,8 +326,8 @@ var ue = G((be, C) => {
|
|
|
318
326
|
activeManifest() {
|
|
319
327
|
const e = o.wasmreader_activeManifest(this.__wbg_ptr);
|
|
320
328
|
if (e[2])
|
|
321
|
-
throw
|
|
322
|
-
return
|
|
329
|
+
throw b(e[1]);
|
|
330
|
+
return b(e[0]);
|
|
323
331
|
}
|
|
324
332
|
/**
|
|
325
333
|
* Returns the asset's manifest store as crJSON.
|
|
@@ -343,9 +351,9 @@ var ue = G((be, C) => {
|
|
|
343
351
|
* @returns {Promise<WasmReader>}
|
|
344
352
|
*/
|
|
345
353
|
static fromBlob(e, t, n) {
|
|
346
|
-
const _ =
|
|
347
|
-
var
|
|
348
|
-
return o.wasmreader_fromBlob(_, c, t,
|
|
354
|
+
const _ = d(e, o.__wbindgen_malloc, o.__wbindgen_realloc), c = a;
|
|
355
|
+
var s = w(n) ? 0 : d(n, o.__wbindgen_malloc, o.__wbindgen_realloc), i = a;
|
|
356
|
+
return o.wasmreader_fromBlob(_, c, t, s, i);
|
|
349
357
|
}
|
|
350
358
|
/**
|
|
351
359
|
* Attempts to create a new `WasmReader` from an asset format, a `Blob` of the bytes of the initial segment, and a fragment `Blob`.
|
|
@@ -357,9 +365,28 @@ var ue = G((be, C) => {
|
|
|
357
365
|
* @returns {Promise<WasmReader>}
|
|
358
366
|
*/
|
|
359
367
|
static fromBlobFragment(e, t, n, _) {
|
|
360
|
-
const c =
|
|
361
|
-
var
|
|
362
|
-
return o.wasmreader_fromBlobFragment(c,
|
|
368
|
+
const c = d(e, o.__wbindgen_malloc, o.__wbindgen_realloc), s = a;
|
|
369
|
+
var i = w(_) ? 0 : d(_, o.__wbindgen_malloc, o.__wbindgen_realloc), u = a;
|
|
370
|
+
return o.wasmreader_fromBlobFragment(c, s, t, n, i, u);
|
|
371
|
+
}
|
|
372
|
+
/**
|
|
373
|
+
* Attempts to create a new `WasmReader` from an asset format and the asset's raw bytes.
|
|
374
|
+
*
|
|
375
|
+
* Unlike [`WasmReader::from_blob`], this entry point does not use any browser-only Web
|
|
376
|
+
* APIs (`Blob`, `FileReaderSync`). The bytes are read from an in-memory [`Cursor`], which
|
|
377
|
+
* implements [`Read`] + [`Seek`], so this can be called from non-browser JavaScript
|
|
378
|
+
* runtimes such as Node.js, Deno, Bun, and Cloudflare Workers (workerd).
|
|
379
|
+
*
|
|
380
|
+
* Optionally accepts a context JSON string to configure the reader.
|
|
381
|
+
* @param {string} format
|
|
382
|
+
* @param {Uint8Array} bytes
|
|
383
|
+
* @param {string | null} [context_json]
|
|
384
|
+
* @returns {Promise<WasmReader>}
|
|
385
|
+
*/
|
|
386
|
+
static fromBytes(e, t, n) {
|
|
387
|
+
const _ = d(e, o.__wbindgen_malloc, o.__wbindgen_realloc), c = a, s = ne(t, o.__wbindgen_malloc), i = a;
|
|
388
|
+
var u = w(n) ? 0 : d(n, o.__wbindgen_malloc, o.__wbindgen_realloc), g = a;
|
|
389
|
+
return o.wasmreader_fromBytes(_, c, s, i, u, g);
|
|
363
390
|
}
|
|
364
391
|
/**
|
|
365
392
|
* Returns a JSON representation of the asset's manifest store.
|
|
@@ -381,8 +408,8 @@ var ue = G((be, C) => {
|
|
|
381
408
|
manifestStore() {
|
|
382
409
|
const e = o.wasmreader_manifestStore(this.__wbg_ptr);
|
|
383
410
|
if (e[2])
|
|
384
|
-
throw
|
|
385
|
-
return
|
|
411
|
+
throw b(e[1]);
|
|
412
|
+
return b(e[0]);
|
|
386
413
|
}
|
|
387
414
|
/**
|
|
388
415
|
* Accepts a URI reference to a binary object in the resource store and returns a `js_sys::Uint8Array` containing the resource's bytes.
|
|
@@ -390,14 +417,14 @@ var ue = G((be, C) => {
|
|
|
390
417
|
* @returns {Uint8Array}
|
|
391
418
|
*/
|
|
392
419
|
resourceToBytes(e) {
|
|
393
|
-
const t =
|
|
420
|
+
const t = d(e, o.__wbindgen_malloc, o.__wbindgen_realloc), n = a, _ = o.wasmreader_resourceToBytes(this.__wbg_ptr, t, n);
|
|
394
421
|
if (_[2])
|
|
395
|
-
throw
|
|
396
|
-
return
|
|
422
|
+
throw b(_[1]);
|
|
423
|
+
return b(_[0]);
|
|
397
424
|
}
|
|
398
425
|
}
|
|
399
|
-
Symbol.dispose && (
|
|
400
|
-
function
|
|
426
|
+
Symbol.dispose && (M.prototype[Symbol.dispose] = M.prototype.free);
|
|
427
|
+
function H() {
|
|
401
428
|
return {
|
|
402
429
|
__proto__: null,
|
|
403
430
|
"./c2pa_bg.js": {
|
|
@@ -408,6 +435,10 @@ var ue = G((be, C) => {
|
|
|
408
435
|
__wbg_Number_6b506e6536831eaa: function(e) {
|
|
409
436
|
return Number(e);
|
|
410
437
|
},
|
|
438
|
+
__wbg_String_8564e559799eccda: function(e, t) {
|
|
439
|
+
const n = String(t), _ = d(n, o.__wbindgen_malloc, o.__wbindgen_realloc), c = a;
|
|
440
|
+
m().setInt32(e + 4, c, !0), m().setInt32(e + 0, _, !0);
|
|
441
|
+
},
|
|
411
442
|
__wbg___wbindgen_bigint_get_as_i64_38130e98eecd467d: function(e, t) {
|
|
412
443
|
const n = t, _ = typeof n == "bigint" ? n : void 0;
|
|
413
444
|
m().setBigInt64(e + 8, w(_) ? BigInt(0) : _, !0), m().setInt32(e + 0, !w(_), !0);
|
|
@@ -417,7 +448,7 @@ var ue = G((be, C) => {
|
|
|
417
448
|
return w(n) ? 16777215 : n ? 1 : 0;
|
|
418
449
|
},
|
|
419
450
|
__wbg___wbindgen_debug_string_0accd80f45e5faa2: function(e, t) {
|
|
420
|
-
const n = x(t), _ =
|
|
451
|
+
const n = x(t), _ = d(n, o.__wbindgen_malloc, o.__wbindgen_realloc), c = a;
|
|
421
452
|
m().setInt32(e + 4, c, !0), m().setInt32(e + 0, _, !0);
|
|
422
453
|
},
|
|
423
454
|
__wbg___wbindgen_in_70a403a56e771704: function(e, t) {
|
|
@@ -429,6 +460,9 @@ var ue = G((be, C) => {
|
|
|
429
460
|
__wbg___wbindgen_is_function_754e9f305ff6029e: function(e) {
|
|
430
461
|
return typeof e == "function";
|
|
431
462
|
},
|
|
463
|
+
__wbg___wbindgen_is_null_87c3bfe968c6a5ad: function(e) {
|
|
464
|
+
return e === null;
|
|
465
|
+
},
|
|
432
466
|
__wbg___wbindgen_is_object_56732c2bc353f41d: function(e) {
|
|
433
467
|
const t = e;
|
|
434
468
|
return typeof t == "object" && t !== null;
|
|
@@ -451,8 +485,8 @@ var ue = G((be, C) => {
|
|
|
451
485
|
},
|
|
452
486
|
__wbg___wbindgen_string_get_72bdf95d3ae505b1: function(e, t) {
|
|
453
487
|
const n = t, _ = typeof n == "string" ? n : void 0;
|
|
454
|
-
var c = w(_) ? 0 :
|
|
455
|
-
m().setInt32(e + 4,
|
|
488
|
+
var c = w(_) ? 0 : d(_, o.__wbindgen_malloc, o.__wbindgen_realloc), s = a;
|
|
489
|
+
m().setInt32(e + 4, s, !0), m().setInt32(e + 0, c, !0);
|
|
456
490
|
},
|
|
457
491
|
__wbg___wbindgen_throw_1506f2235d1bdba0: function(e, t) {
|
|
458
492
|
throw new Error(y(e, t));
|
|
@@ -520,17 +554,17 @@ var ue = G((be, C) => {
|
|
|
520
554
|
},
|
|
521
555
|
__wbg_getRandomValues_3f44b700395062e5: function() {
|
|
522
556
|
return l(function(e, t) {
|
|
523
|
-
globalThis.crypto.getRandomValues(
|
|
557
|
+
globalThis.crypto.getRandomValues(v(e, t));
|
|
524
558
|
}, arguments);
|
|
525
559
|
},
|
|
526
560
|
__wbg_getRandomValues_76dfc69825c9c552: function() {
|
|
527
561
|
return l(function(e, t) {
|
|
528
|
-
globalThis.crypto.getRandomValues(
|
|
562
|
+
globalThis.crypto.getRandomValues(v(e, t));
|
|
529
563
|
}, arguments);
|
|
530
564
|
},
|
|
531
565
|
__wbg_getRandomValues_8aa3112c6615eef6: function() {
|
|
532
566
|
return l(function(e, t) {
|
|
533
|
-
globalThis.crypto.getRandomValues(
|
|
567
|
+
globalThis.crypto.getRandomValues(v(e, t));
|
|
534
568
|
}, arguments);
|
|
535
569
|
},
|
|
536
570
|
__wbg_getRandomValues_c44a50d8cfdaebeb: function() {
|
|
@@ -665,15 +699,15 @@ var ue = G((be, C) => {
|
|
|
665
699
|
}, arguments);
|
|
666
700
|
},
|
|
667
701
|
__wbg_new_from_slice_18fa1f71286d66b8: function(e, t) {
|
|
668
|
-
return new Uint8Array(
|
|
702
|
+
return new Uint8Array(v(e, t));
|
|
669
703
|
},
|
|
670
704
|
__wbg_new_typed_bf31d18f92484486: function(e, t) {
|
|
671
705
|
try {
|
|
672
|
-
var n = { a: e, b: t }, _ = (
|
|
706
|
+
var n = { a: e, b: t }, _ = (s, i) => {
|
|
673
707
|
const u = n.a;
|
|
674
708
|
n.a = 0;
|
|
675
709
|
try {
|
|
676
|
-
return
|
|
710
|
+
return K(u, n.b, s, i);
|
|
677
711
|
} finally {
|
|
678
712
|
n.a = u;
|
|
679
713
|
}
|
|
@@ -709,7 +743,7 @@ var ue = G((be, C) => {
|
|
|
709
743
|
return e.process;
|
|
710
744
|
},
|
|
711
745
|
__wbg_prototypesetcall_3249fc62a0fafa30: function(e, t, n) {
|
|
712
|
-
Uint8Array.prototype.set.call(
|
|
746
|
+
Uint8Array.prototype.set.call(v(e, t), n);
|
|
713
747
|
},
|
|
714
748
|
__wbg_queueMicrotask_35c611f4a14830b2: function(e) {
|
|
715
749
|
queueMicrotask(e);
|
|
@@ -729,7 +763,7 @@ var ue = G((be, C) => {
|
|
|
729
763
|
},
|
|
730
764
|
__wbg_require_b4edbdcf3e2a1ef0: function() {
|
|
731
765
|
return l(function() {
|
|
732
|
-
return
|
|
766
|
+
return P.require;
|
|
733
767
|
}, arguments);
|
|
734
768
|
},
|
|
735
769
|
__wbg_resolve_25a7e548d5881dca: function(e) {
|
|
@@ -739,7 +773,7 @@ var ue = G((be, C) => {
|
|
|
739
773
|
return setTimeout(e, t);
|
|
740
774
|
},
|
|
741
775
|
__wbg_set_29c99a8aac1c01e5: function(e, t, n) {
|
|
742
|
-
e.set(
|
|
776
|
+
e.set(v(t, n));
|
|
743
777
|
},
|
|
744
778
|
__wbg_set_52b1e1eb5bed906a: function(e, t, n) {
|
|
745
779
|
return e.set(t, n);
|
|
@@ -751,10 +785,10 @@ var ue = G((be, C) => {
|
|
|
751
785
|
e.body = t;
|
|
752
786
|
},
|
|
753
787
|
__wbg_set_cache_488ea16c11cbf20d: function(e, t) {
|
|
754
|
-
e.cache =
|
|
788
|
+
e.cache = Q[t];
|
|
755
789
|
},
|
|
756
790
|
__wbg_set_credentials_fa9c491a27c4bdf0: function(e, t) {
|
|
757
|
-
e.credentials =
|
|
791
|
+
e.credentials = Z[t];
|
|
758
792
|
},
|
|
759
793
|
__wbg_set_dca99999bba88a9a: function(e, t, n) {
|
|
760
794
|
e[t >>> 0] = n;
|
|
@@ -766,7 +800,7 @@ var ue = G((be, C) => {
|
|
|
766
800
|
e.method = y(t, n);
|
|
767
801
|
},
|
|
768
802
|
__wbg_set_mode_c90e3667002857d4: function(e, t) {
|
|
769
|
-
e.mode =
|
|
803
|
+
e.mode = ee[t];
|
|
770
804
|
},
|
|
771
805
|
__wbg_set_signal_d9da62b3f215c821: function(e, t) {
|
|
772
806
|
e.signal = t;
|
|
@@ -783,24 +817,24 @@ var ue = G((be, C) => {
|
|
|
783
817
|
}, arguments);
|
|
784
818
|
},
|
|
785
819
|
__wbg_stack_3b0d974bbf31e44f: function(e, t) {
|
|
786
|
-
const n = t.stack, _ =
|
|
820
|
+
const n = t.stack, _ = d(n, o.__wbindgen_malloc, o.__wbindgen_realloc), c = a;
|
|
787
821
|
m().setInt32(e + 4, c, !0), m().setInt32(e + 0, _, !0);
|
|
788
822
|
},
|
|
789
823
|
__wbg_static_accessor_GLOBAL_9d53f2689e622ca1: function() {
|
|
790
824
|
const e = typeof global > "u" ? null : global;
|
|
791
|
-
return w(e) ? 0 :
|
|
825
|
+
return w(e) ? 0 : S(e);
|
|
792
826
|
},
|
|
793
827
|
__wbg_static_accessor_GLOBAL_THIS_a1a35cec07001a8a: function() {
|
|
794
828
|
const e = typeof globalThis > "u" ? null : globalThis;
|
|
795
|
-
return w(e) ? 0 :
|
|
829
|
+
return w(e) ? 0 : S(e);
|
|
796
830
|
},
|
|
797
831
|
__wbg_static_accessor_SELF_4c59f6c7ea29a144: function() {
|
|
798
832
|
const e = typeof self > "u" ? null : self;
|
|
799
|
-
return w(e) ? 0 :
|
|
833
|
+
return w(e) ? 0 : S(e);
|
|
800
834
|
},
|
|
801
835
|
__wbg_static_accessor_WINDOW_e70ae9f2eb052253: function() {
|
|
802
836
|
const e = typeof window > "u" ? null : window;
|
|
803
|
-
return w(e) ? 0 :
|
|
837
|
+
return w(e) ? 0 : S(e);
|
|
804
838
|
},
|
|
805
839
|
__wbg_status_00549d55b78d949e: function(e) {
|
|
806
840
|
return e.status;
|
|
@@ -820,7 +854,7 @@ var ue = G((be, C) => {
|
|
|
820
854
|
return e.then(t);
|
|
821
855
|
},
|
|
822
856
|
__wbg_url_6808f1c468f2d0cd: function(e, t) {
|
|
823
|
-
const n = t.url, _ =
|
|
857
|
+
const n = t.url, _ = d(n, o.__wbindgen_malloc, o.__wbindgen_realloc), c = a;
|
|
824
858
|
m().setInt32(e + 4, c, !0), m().setInt32(e + 0, _, !0);
|
|
825
859
|
},
|
|
826
860
|
__wbg_valueOf_41ae57308c1f031c: function(e) {
|
|
@@ -833,13 +867,13 @@ var ue = G((be, C) => {
|
|
|
833
867
|
return e.versions;
|
|
834
868
|
},
|
|
835
869
|
__wbg_wasmreader_new: function(e) {
|
|
836
|
-
return
|
|
870
|
+
return M.__wrap(e);
|
|
837
871
|
},
|
|
838
872
|
__wbindgen_cast_0000000000000001: function(e, t) {
|
|
839
|
-
return
|
|
873
|
+
return L(e, t, Y);
|
|
840
874
|
},
|
|
841
875
|
__wbindgen_cast_0000000000000002: function(e, t) {
|
|
842
|
-
return
|
|
876
|
+
return L(e, t, X);
|
|
843
877
|
},
|
|
844
878
|
__wbindgen_cast_0000000000000003: function(e) {
|
|
845
879
|
return e;
|
|
@@ -848,7 +882,7 @@ var ue = G((be, C) => {
|
|
|
848
882
|
return e;
|
|
849
883
|
},
|
|
850
884
|
__wbindgen_cast_0000000000000005: function(e, t) {
|
|
851
|
-
return
|
|
885
|
+
return v(e, t);
|
|
852
886
|
},
|
|
853
887
|
__wbindgen_cast_0000000000000006: function(e, t) {
|
|
854
888
|
return y(e, t);
|
|
@@ -857,7 +891,7 @@ var ue = G((be, C) => {
|
|
|
857
891
|
return BigInt.asUintN(64, e);
|
|
858
892
|
},
|
|
859
893
|
__wbindgen_cast_0000000000000008: function(e, t) {
|
|
860
|
-
var n =
|
|
894
|
+
var n = v(e, t).slice();
|
|
861
895
|
return o.__wbindgen_free(e, t * 1, 1), n;
|
|
862
896
|
},
|
|
863
897
|
__wbindgen_init_externref_table: function() {
|
|
@@ -867,28 +901,28 @@ var ue = G((be, C) => {
|
|
|
867
901
|
}
|
|
868
902
|
};
|
|
869
903
|
}
|
|
870
|
-
function
|
|
904
|
+
function X(r, e) {
|
|
871
905
|
o.wasm_bindgen_4d7940e3be85a6dc___convert__closures_____invoke_______true_(r, e);
|
|
872
906
|
}
|
|
873
|
-
function
|
|
907
|
+
function Y(r, e, t) {
|
|
874
908
|
const n = o.wasm_bindgen_4d7940e3be85a6dc___convert__closures_____invoke___wasm_bindgen_4d7940e3be85a6dc___JsValue__core_ed718c3d60ebd546___result__Result_____wasm_bindgen_4d7940e3be85a6dc___JsError___true_(r, e, t);
|
|
875
909
|
if (n[1])
|
|
876
|
-
throw
|
|
910
|
+
throw b(n[0]);
|
|
877
911
|
}
|
|
878
|
-
function
|
|
912
|
+
function K(r, e, t, n) {
|
|
879
913
|
o.wasm_bindgen_4d7940e3be85a6dc___convert__closures_____invoke___js_sys_a576b80f2209464___Function_fn_wasm_bindgen_4d7940e3be85a6dc___JsValue_____wasm_bindgen_4d7940e3be85a6dc___sys__Undefined___js_sys_a576b80f2209464___Function_fn_wasm_bindgen_4d7940e3be85a6dc___JsValue_____wasm_bindgen_4d7940e3be85a6dc___sys__Undefined_______true_(r, e, t, n);
|
|
880
914
|
}
|
|
881
|
-
const
|
|
915
|
+
const Q = ["default", "no-store", "reload", "no-cache", "force-cache", "only-if-cached"], Z = ["omit", "same-origin", "include"], ee = ["same-origin", "no-cors", "cors", "navigate"], z = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
882
916
|
}, unregister: () => {
|
|
883
917
|
} } : new FinalizationRegistry((r) => o.__wbg_wasmbuilder_free(r, 1)), N = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
884
918
|
}, unregister: () => {
|
|
885
919
|
} } : new FinalizationRegistry((r) => o.__wbg_wasmreader_free(r, 1));
|
|
886
920
|
typeof FinalizationRegistry > "u" || new FinalizationRegistry((r) => o.__wbg_wasmsigner_free(r, 1));
|
|
887
|
-
function
|
|
921
|
+
function S(r) {
|
|
888
922
|
const e = o.__externref_table_alloc();
|
|
889
923
|
return o.__wbindgen_externrefs.set(e, r), e;
|
|
890
924
|
}
|
|
891
|
-
const
|
|
925
|
+
const J = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
892
926
|
}, unregister: () => {
|
|
893
927
|
} } : new FinalizationRegistry((r) => o.__wbindgen_destroy_closure(r.a, r.b));
|
|
894
928
|
function x(r) {
|
|
@@ -909,8 +943,8 @@ var ue = G((be, C) => {
|
|
|
909
943
|
const _ = r.length;
|
|
910
944
|
let c = "[";
|
|
911
945
|
_ > 0 && (c += x(r[0]));
|
|
912
|
-
for (let
|
|
913
|
-
c += ", " + x(r[
|
|
946
|
+
for (let s = 1; s < _; s++)
|
|
947
|
+
c += ", " + x(r[s]);
|
|
914
948
|
return c += "]", c;
|
|
915
949
|
}
|
|
916
950
|
const t = /\[object ([^\]]+)\]/.exec(toString.call(r));
|
|
@@ -928,84 +962,88 @@ var ue = G((be, C) => {
|
|
|
928
962
|
return r instanceof Error ? `${r.name}: ${r.message}
|
|
929
963
|
${r.stack}` : n;
|
|
930
964
|
}
|
|
931
|
-
function
|
|
932
|
-
return r = r >>> 0,
|
|
965
|
+
function v(r, e) {
|
|
966
|
+
return r = r >>> 0, R().subarray(r / 1, r / 1 + e);
|
|
933
967
|
}
|
|
934
|
-
let
|
|
968
|
+
let I = null;
|
|
935
969
|
function m() {
|
|
936
|
-
return (
|
|
970
|
+
return (I === null || I.buffer.detached === !0 || I.buffer.detached === void 0 && I.buffer !== o.memory.buffer) && (I = new DataView(o.memory.buffer)), I;
|
|
937
971
|
}
|
|
938
972
|
function y(r, e) {
|
|
939
|
-
return
|
|
973
|
+
return _e(r >>> 0, e);
|
|
940
974
|
}
|
|
941
975
|
let B = null;
|
|
942
|
-
function
|
|
976
|
+
function te() {
|
|
943
977
|
return (B === null || B.byteLength === 0) && (B = new Uint32Array(o.memory.buffer)), B;
|
|
944
978
|
}
|
|
945
|
-
let
|
|
946
|
-
function
|
|
947
|
-
return (
|
|
979
|
+
let T = null;
|
|
980
|
+
function R() {
|
|
981
|
+
return (T === null || T.byteLength === 0) && (T = new Uint8Array(o.memory.buffer)), T;
|
|
948
982
|
}
|
|
949
983
|
function l(r, e) {
|
|
950
984
|
try {
|
|
951
985
|
return r.apply(this, e);
|
|
952
986
|
} catch (t) {
|
|
953
|
-
const n =
|
|
987
|
+
const n = S(t);
|
|
954
988
|
o.__wbindgen_exn_store(n);
|
|
955
989
|
}
|
|
956
990
|
}
|
|
957
991
|
function w(r) {
|
|
958
992
|
return r == null;
|
|
959
993
|
}
|
|
960
|
-
function
|
|
994
|
+
function L(r, e, t) {
|
|
961
995
|
const n = { a: r, b: e, cnt: 1 }, _ = (...c) => {
|
|
962
996
|
n.cnt++;
|
|
963
|
-
const
|
|
997
|
+
const s = n.a;
|
|
964
998
|
n.a = 0;
|
|
965
999
|
try {
|
|
966
|
-
return t(
|
|
1000
|
+
return t(s, n.b, ...c);
|
|
967
1001
|
} finally {
|
|
968
|
-
n.a =
|
|
1002
|
+
n.a = s, _._wbg_cb_unref();
|
|
969
1003
|
}
|
|
970
1004
|
};
|
|
971
1005
|
return _._wbg_cb_unref = () => {
|
|
972
|
-
--n.cnt === 0 && (o.__wbindgen_destroy_closure(n.a, n.b), n.a = 0,
|
|
973
|
-
},
|
|
1006
|
+
--n.cnt === 0 && (o.__wbindgen_destroy_closure(n.a, n.b), n.a = 0, J.unregister(n));
|
|
1007
|
+
}, J.register(_, n, n), _;
|
|
974
1008
|
}
|
|
975
1009
|
function E(r, e) {
|
|
976
1010
|
const t = e(r.length * 4, 4) >>> 0;
|
|
977
|
-
return
|
|
1011
|
+
return te().set(r, t / 4), a = r.length, t;
|
|
978
1012
|
}
|
|
979
|
-
function
|
|
1013
|
+
function ne(r, e) {
|
|
1014
|
+
const t = e(r.length * 1, 1) >>> 0;
|
|
1015
|
+
return R().set(r, t / 1), a = r.length, t;
|
|
1016
|
+
}
|
|
1017
|
+
function d(r, e, t) {
|
|
980
1018
|
if (t === void 0) {
|
|
981
|
-
const
|
|
982
|
-
return
|
|
1019
|
+
const i = j.encode(r), u = e(i.length, 1) >>> 0;
|
|
1020
|
+
return R().subarray(u, u + i.length).set(i), a = i.length, u;
|
|
983
1021
|
}
|
|
984
1022
|
let n = r.length, _ = e(n, 1) >>> 0;
|
|
985
|
-
const c =
|
|
986
|
-
let
|
|
987
|
-
for (;
|
|
988
|
-
const
|
|
989
|
-
if (
|
|
990
|
-
c[_ +
|
|
1023
|
+
const c = R();
|
|
1024
|
+
let s = 0;
|
|
1025
|
+
for (; s < n; s++) {
|
|
1026
|
+
const i = r.charCodeAt(s);
|
|
1027
|
+
if (i > 127) break;
|
|
1028
|
+
c[_ + s] = i;
|
|
991
1029
|
}
|
|
992
|
-
if (
|
|
993
|
-
|
|
994
|
-
const
|
|
995
|
-
|
|
1030
|
+
if (s !== n) {
|
|
1031
|
+
s !== 0 && (r = r.slice(s)), _ = t(_, n, n = s + r.length * 3, 1) >>> 0;
|
|
1032
|
+
const i = R().subarray(_ + s, _ + n), u = j.encodeInto(r, i);
|
|
1033
|
+
s += u.written, _ = t(_, n, s, 1) >>> 0;
|
|
996
1034
|
}
|
|
997
|
-
return a =
|
|
1035
|
+
return a = s, _;
|
|
998
1036
|
}
|
|
999
|
-
function
|
|
1037
|
+
function b(r) {
|
|
1000
1038
|
const e = o.__wbindgen_externrefs.get(r);
|
|
1001
1039
|
return o.__externref_table_dealloc(r), e;
|
|
1002
1040
|
}
|
|
1003
1041
|
let O = new TextDecoder("utf-8", { ignoreBOM: !0, fatal: !0 });
|
|
1004
1042
|
O.decode();
|
|
1005
|
-
const
|
|
1043
|
+
const re = 2146435072;
|
|
1006
1044
|
let U = 0;
|
|
1007
|
-
function
|
|
1008
|
-
return U += e, U >=
|
|
1045
|
+
function _e(r, e) {
|
|
1046
|
+
return U += e, U >= re && (O = new TextDecoder("utf-8", { ignoreBOM: !0, fatal: !0 }), O.decode(), U = e), O.decode(R().subarray(r, r + e));
|
|
1009
1047
|
}
|
|
1010
1048
|
const j = new TextEncoder();
|
|
1011
1049
|
"encodeInto" in j || (j.encodeInto = function(r, e) {
|
|
@@ -1016,18 +1054,18 @@ ${r.stack}` : n;
|
|
|
1016
1054
|
};
|
|
1017
1055
|
});
|
|
1018
1056
|
let a = 0, o;
|
|
1019
|
-
function
|
|
1020
|
-
return o = r.exports,
|
|
1057
|
+
function oe(r, e) {
|
|
1058
|
+
return o = r.exports, I = null, B = null, T = null, o.__wbindgen_start(), o;
|
|
1021
1059
|
}
|
|
1022
|
-
function
|
|
1060
|
+
function ce(r) {
|
|
1023
1061
|
if (o !== void 0) return o;
|
|
1024
1062
|
r !== void 0 && (Object.getPrototypeOf(r) === Object.prototype ? { module: r } = r : console.warn("using deprecated parameters for `initSync()`; pass a single object instead"));
|
|
1025
|
-
const e =
|
|
1063
|
+
const e = H();
|
|
1026
1064
|
r instanceof WebAssembly.Module || (r = new WebAssembly.Module(r));
|
|
1027
1065
|
const t = new WebAssembly.Instance(r, e);
|
|
1028
|
-
return
|
|
1066
|
+
return oe(t);
|
|
1029
1067
|
}
|
|
1030
|
-
function
|
|
1068
|
+
function W() {
|
|
1031
1069
|
let r = 0;
|
|
1032
1070
|
const e = /* @__PURE__ */ new Map();
|
|
1033
1071
|
return {
|
|
@@ -1047,17 +1085,17 @@ ${r.stack}` : n;
|
|
|
1047
1085
|
};
|
|
1048
1086
|
}
|
|
1049
1087
|
const q = Symbol("transfer");
|
|
1050
|
-
function
|
|
1088
|
+
function F(r, e) {
|
|
1051
1089
|
return {
|
|
1052
1090
|
type: q,
|
|
1053
1091
|
value: r,
|
|
1054
1092
|
transfer: e ? Array.isArray(e) ? e : [e] : [r]
|
|
1055
1093
|
};
|
|
1056
1094
|
}
|
|
1057
|
-
function
|
|
1095
|
+
function V(r) {
|
|
1058
1096
|
return !!(r && typeof r == "object" && Reflect.get(r, "type") === q);
|
|
1059
1097
|
}
|
|
1060
|
-
function
|
|
1098
|
+
function C(r = "default") {
|
|
1061
1099
|
return {
|
|
1062
1100
|
createTx(e) {
|
|
1063
1101
|
const t = /* @__PURE__ */ new Map(), n = e ?? self;
|
|
@@ -1065,21 +1103,21 @@ ${r.stack}` : n;
|
|
|
1065
1103
|
const { data: c } = _;
|
|
1066
1104
|
if (c.channelName !== r)
|
|
1067
1105
|
return;
|
|
1068
|
-
const { id:
|
|
1069
|
-
g && (u ? g.reject(u) : g.resolve(
|
|
1106
|
+
const { id: s, result: i, error: u } = c, g = t.get(s);
|
|
1107
|
+
g && (u ? g.reject(u) : g.resolve(i), t.delete(s));
|
|
1070
1108
|
}), new Proxy(
|
|
1071
1109
|
{},
|
|
1072
1110
|
{
|
|
1073
1111
|
get(_, c) {
|
|
1074
|
-
return (...
|
|
1075
|
-
const
|
|
1076
|
-
return
|
|
1077
|
-
|
|
1112
|
+
return (...s) => {
|
|
1113
|
+
const i = se(), u = [], g = [];
|
|
1114
|
+
return s.forEach((A) => {
|
|
1115
|
+
V(A) ? (u.push(A.value), g.push(...A.transfer)) : u.push(A);
|
|
1078
1116
|
}), n.postMessage(
|
|
1079
|
-
{ method: c, args: u, id:
|
|
1117
|
+
{ method: c, args: u, id: i, channelName: r },
|
|
1080
1118
|
{ transfer: g }
|
|
1081
|
-
), new Promise((
|
|
1082
|
-
t.set(
|
|
1119
|
+
), new Promise((A, G) => {
|
|
1120
|
+
t.set(i, { resolve: A, reject: G });
|
|
1083
1121
|
});
|
|
1084
1122
|
};
|
|
1085
1123
|
}
|
|
@@ -1092,10 +1130,10 @@ ${r.stack}` : n;
|
|
|
1092
1130
|
const { data: c } = _;
|
|
1093
1131
|
if (c.channelName !== r)
|
|
1094
1132
|
return;
|
|
1095
|
-
const { method:
|
|
1133
|
+
const { method: s, args: i, id: u } = c;
|
|
1096
1134
|
try {
|
|
1097
|
-
const g = await e[
|
|
1098
|
-
|
|
1135
|
+
const g = await e[s](...i);
|
|
1136
|
+
V(g) ? n.postMessage(
|
|
1099
1137
|
{ result: g.value, id: u, channelName: r },
|
|
1100
1138
|
{ transfer: g.transfer }
|
|
1101
1139
|
) : n.postMessage({ result: g, id: u, channelName: r });
|
|
@@ -1106,28 +1144,40 @@ ${r.stack}` : n;
|
|
|
1106
1144
|
}
|
|
1107
1145
|
};
|
|
1108
1146
|
}
|
|
1109
|
-
function
|
|
1147
|
+
function se() {
|
|
1110
1148
|
return new Array(4).fill(0).map(() => Math.floor(Math.random() * Number.MAX_SAFE_INTEGER).toString(16)).join("-");
|
|
1111
1149
|
}
|
|
1112
|
-
const { rx:
|
|
1113
|
-
function
|
|
1150
|
+
const { rx: ie } = C(), { createTx: ae } = C("worker");
|
|
1151
|
+
function ue(r) {
|
|
1114
1152
|
if (!(r != null && r.manifests))
|
|
1115
1153
|
return r;
|
|
1116
1154
|
const e = r.manifests, t = Object.assign(/* @__PURE__ */ Object.create(null), e), n = Object.getPrototypeOf(e);
|
|
1117
1155
|
return n !== null && n !== Object.prototype && (t.__proto__ = n), r.manifests = t, r;
|
|
1118
1156
|
}
|
|
1119
|
-
const p =
|
|
1120
|
-
|
|
1121
|
-
|
|
1157
|
+
const p = W(), f = W(), k = ae();
|
|
1158
|
+
function D(r) {
|
|
1159
|
+
return r.map((e) => ({
|
|
1160
|
+
sigType: e.sigType,
|
|
1161
|
+
reserveSize: e.reserveSize,
|
|
1162
|
+
referencedAssertions: e.referencedAssertions,
|
|
1163
|
+
roles: e.roles,
|
|
1164
|
+
sign: async (t) => {
|
|
1165
|
+
const n = t.referencedAssertions.map((c) => c.hash.buffer);
|
|
1166
|
+
return await k.cawgSign(e.requestId, F(t, n));
|
|
1167
|
+
}
|
|
1168
|
+
}));
|
|
1169
|
+
}
|
|
1170
|
+
ie(
|
|
1171
|
+
de({
|
|
1122
1172
|
async initWorker(r) {
|
|
1123
|
-
|
|
1173
|
+
ce({ module: r });
|
|
1124
1174
|
},
|
|
1125
1175
|
async reader_fromBlob(r, e, t) {
|
|
1126
|
-
const n = await
|
|
1176
|
+
const n = await M.fromBlob(r, e, t);
|
|
1127
1177
|
return p.add(n);
|
|
1128
1178
|
},
|
|
1129
1179
|
async reader_fromBlobFragment(r, e, t, n) {
|
|
1130
|
-
const _ = await
|
|
1180
|
+
const _ = await M.fromBlobFragment(
|
|
1131
1181
|
r,
|
|
1132
1182
|
e,
|
|
1133
1183
|
t,
|
|
@@ -1140,7 +1190,7 @@ ${r.stack}` : n;
|
|
|
1140
1190
|
},
|
|
1141
1191
|
reader_manifestStore(r) {
|
|
1142
1192
|
const e = p.get(r);
|
|
1143
|
-
return
|
|
1193
|
+
return ue(e.manifestStore());
|
|
1144
1194
|
},
|
|
1145
1195
|
reader_activeManifest(r) {
|
|
1146
1196
|
return p.get(r).activeManifest();
|
|
@@ -1153,119 +1203,121 @@ ${r.stack}` : n;
|
|
|
1153
1203
|
},
|
|
1154
1204
|
reader_resourceToBytes(r, e) {
|
|
1155
1205
|
const n = p.get(r).resourceToBytes(e);
|
|
1156
|
-
return
|
|
1206
|
+
return F(n, n.buffer);
|
|
1157
1207
|
},
|
|
1158
1208
|
reader_free(r) {
|
|
1159
1209
|
p.get(r).free(), p.remove(r);
|
|
1160
1210
|
},
|
|
1161
1211
|
builder_new(r) {
|
|
1162
1212
|
const e = h.new(r);
|
|
1163
|
-
return
|
|
1213
|
+
return f.add(e);
|
|
1164
1214
|
},
|
|
1165
1215
|
builder_fromJson(r, e) {
|
|
1166
1216
|
const t = h.fromJson(r, e);
|
|
1167
|
-
return
|
|
1217
|
+
return f.add(t);
|
|
1168
1218
|
},
|
|
1169
1219
|
builder_fromArchive(r, e) {
|
|
1170
1220
|
const t = h.fromArchive(r, e);
|
|
1171
|
-
return
|
|
1221
|
+
return f.add(t);
|
|
1172
1222
|
},
|
|
1173
1223
|
builder_setIntent(r, e) {
|
|
1174
|
-
|
|
1224
|
+
f.get(r).setIntent(e);
|
|
1175
1225
|
},
|
|
1176
1226
|
builder_addAction(r, e) {
|
|
1177
|
-
|
|
1227
|
+
f.get(r).addAction(e);
|
|
1178
1228
|
},
|
|
1179
1229
|
builder_addAssertion(r, e, t) {
|
|
1180
|
-
|
|
1230
|
+
f.get(r).addAssertion(e, t);
|
|
1181
1231
|
},
|
|
1182
1232
|
builder_addRedaction(r, e, t) {
|
|
1183
|
-
|
|
1233
|
+
f.get(r).addRedaction(e, t);
|
|
1184
1234
|
},
|
|
1185
1235
|
builder_filterActionsAt(r, e) {
|
|
1186
|
-
|
|
1236
|
+
f.get(r).filterActionsAt(Uint32Array.from(e));
|
|
1187
1237
|
},
|
|
1188
1238
|
builder_updateActionsAt(r, e) {
|
|
1189
|
-
|
|
1239
|
+
f.get(r).updateActionsAt(e);
|
|
1190
1240
|
},
|
|
1191
1241
|
builder_filterIngredientsAt(r, e) {
|
|
1192
|
-
|
|
1242
|
+
f.get(r).filterIngredientsAt(Uint32Array.from(e));
|
|
1193
1243
|
},
|
|
1194
1244
|
builder_filterActionsAndIngredientsAt(r, e, t) {
|
|
1195
|
-
|
|
1245
|
+
f.get(r).filterActionsAndIngredientsAt(
|
|
1196
1246
|
Uint32Array.from(e),
|
|
1197
1247
|
Uint32Array.from(t)
|
|
1198
1248
|
);
|
|
1199
1249
|
},
|
|
1200
1250
|
builder_setRemoteUrl(r, e) {
|
|
1201
|
-
|
|
1251
|
+
f.get(r).setRemoteUrl(e);
|
|
1202
1252
|
},
|
|
1203
1253
|
builder_setNoEmbed(r, e) {
|
|
1204
|
-
|
|
1254
|
+
f.get(r).setNoEmbed(e);
|
|
1205
1255
|
},
|
|
1206
1256
|
builder_setThumbnailFromBlob(r, e, t) {
|
|
1207
|
-
|
|
1257
|
+
f.get(r).setThumbnailFromBlob(e, t);
|
|
1208
1258
|
},
|
|
1209
1259
|
builder_addIngredient(r, e) {
|
|
1210
|
-
|
|
1260
|
+
f.get(r).addIngredient(e);
|
|
1211
1261
|
},
|
|
1212
1262
|
async builder_addIngredientFromBlob(r, e, t, n) {
|
|
1213
|
-
await
|
|
1263
|
+
await f.get(r).addIngredientFromBlob(e, t, n);
|
|
1214
1264
|
},
|
|
1215
1265
|
builder_addResourceFromBlob(r, e, t) {
|
|
1216
|
-
|
|
1266
|
+
f.get(r).addResourceFromBlob(e, t);
|
|
1217
1267
|
},
|
|
1218
1268
|
builder_getDefinition(r) {
|
|
1219
|
-
return
|
|
1269
|
+
return f.get(r).getDefinition();
|
|
1220
1270
|
},
|
|
1221
1271
|
builder_toArchive(r) {
|
|
1222
|
-
const t =
|
|
1223
|
-
return
|
|
1272
|
+
const t = f.get(r).toArchive();
|
|
1273
|
+
return F(t, t.buffer);
|
|
1224
1274
|
},
|
|
1225
|
-
async builder_sign(r, e, t, n, _) {
|
|
1226
|
-
const i = await
|
|
1275
|
+
async builder_sign(r, e, t, n, _, c) {
|
|
1276
|
+
const i = await f.get(r).sign(
|
|
1227
1277
|
{
|
|
1228
1278
|
reserveSize: t.reserveSize,
|
|
1229
1279
|
alg: t.alg,
|
|
1230
|
-
sign: async (
|
|
1280
|
+
sign: async (u) => await k.sign(
|
|
1231
1281
|
e,
|
|
1232
|
-
|
|
1282
|
+
F(u, u.buffer),
|
|
1233
1283
|
t.reserveSize
|
|
1234
1284
|
)
|
|
1235
1285
|
},
|
|
1236
|
-
n,
|
|
1237
|
-
_
|
|
1286
|
+
D(n),
|
|
1287
|
+
_,
|
|
1288
|
+
c
|
|
1238
1289
|
);
|
|
1239
|
-
return
|
|
1290
|
+
return F(i, i.buffer);
|
|
1240
1291
|
},
|
|
1241
|
-
async builder_signAndGetManifestBytes(r, e, t, n, _) {
|
|
1242
|
-
const
|
|
1292
|
+
async builder_signAndGetManifestBytes(r, e, t, n, _, c) {
|
|
1293
|
+
const s = f.get(r), { manifest: i, asset: u } = await s.signAndGetManifestBytes(
|
|
1243
1294
|
{
|
|
1244
1295
|
reserveSize: t.reserveSize,
|
|
1245
1296
|
alg: t.alg,
|
|
1246
|
-
sign: async (
|
|
1297
|
+
sign: async (g) => await k.sign(
|
|
1247
1298
|
e,
|
|
1248
|
-
|
|
1299
|
+
F(g, g.buffer),
|
|
1249
1300
|
t.reserveSize
|
|
1250
1301
|
)
|
|
1251
1302
|
},
|
|
1252
|
-
n,
|
|
1253
|
-
_
|
|
1303
|
+
D(n),
|
|
1304
|
+
_,
|
|
1305
|
+
c
|
|
1254
1306
|
);
|
|
1255
|
-
return
|
|
1307
|
+
return F(
|
|
1256
1308
|
{
|
|
1257
1309
|
manifest: i,
|
|
1258
|
-
asset:
|
|
1310
|
+
asset: u
|
|
1259
1311
|
},
|
|
1260
|
-
[i.buffer,
|
|
1312
|
+
[i.buffer, u.buffer]
|
|
1261
1313
|
);
|
|
1262
1314
|
},
|
|
1263
1315
|
builder_free(r) {
|
|
1264
|
-
|
|
1316
|
+
f.get(r).free(), f.remove(r);
|
|
1265
1317
|
}
|
|
1266
1318
|
})
|
|
1267
1319
|
);
|
|
1268
|
-
function
|
|
1320
|
+
function de(r) {
|
|
1269
1321
|
const e = {};
|
|
1270
1322
|
for (const [t, n] of Object.entries(r))
|
|
1271
1323
|
e[t] = async (..._) => {
|
|
@@ -1278,4 +1330,4 @@ ${r.stack}` : n;
|
|
|
1278
1330
|
return e;
|
|
1279
1331
|
}
|
|
1280
1332
|
});
|
|
1281
|
-
export default
|
|
1333
|
+
export default be();
|