@contentauth/c2pa-web 0.17.1 → 0.17.3
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 +5 -1
- package/dist/builder-D78ulkM4.js +661 -0
- package/dist/c2pa_worker.js +482 -350
- package/dist/index.js +1 -1
- package/dist/inline.js +3 -3
- package/dist/lib/builder.d.ts.map +1 -1
- package/dist/lib/reader.d.ts.map +1 -1
- package/dist/lib/worker/rpc.d.ts +19 -10
- package/dist/lib/worker/rpc.d.ts.map +1 -1
- package/dist/lib/worker/workerManager.d.ts +3 -1
- package/dist/lib/worker/workerManager.d.ts.map +1 -1
- package/dist/resources/c2pa_bg.wasm +0 -0
- package/package.json +3 -3
- package/dist/builder-CaTgrAW1.js +0 -617
package/dist/c2pa_worker.js
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
class
|
|
1
|
+
var Q = (r, e) => () => (e || r((e = { exports: {} }).exports, e), e.exports);
|
|
2
|
+
var Ae = Q((Fe, Y) => {
|
|
3
|
+
class p {
|
|
4
4
|
static __wrap(e) {
|
|
5
|
-
const t = Object.create(
|
|
6
|
-
return t.__wbg_ptr = e,
|
|
5
|
+
const t = Object.create(p.prototype);
|
|
6
|
+
return t.__wbg_ptr = e, J.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, J.unregister(this), e;
|
|
11
11
|
}
|
|
12
12
|
free() {
|
|
13
13
|
const e = this.__destroy_into_raw();
|
|
14
|
-
|
|
14
|
+
_.__wbg_wasmbuilder_free(e, 0);
|
|
15
15
|
}
|
|
16
16
|
/**
|
|
17
17
|
* Add an action to the manifest's `Actions` assertion.
|
|
18
18
|
* @param {any} action
|
|
19
19
|
*/
|
|
20
20
|
addAction(e) {
|
|
21
|
-
const t =
|
|
21
|
+
const t = _.wasmbuilder_addAction(this.__wbg_ptr, e);
|
|
22
22
|
if (t[1])
|
|
23
|
-
throw
|
|
23
|
+
throw u(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 fe = $((ge, C) => {
|
|
|
28
28
|
* @param {any} data
|
|
29
29
|
*/
|
|
30
30
|
addAssertion(e, t) {
|
|
31
|
-
const n =
|
|
32
|
-
if (
|
|
33
|
-
throw
|
|
31
|
+
const n = d(e, _.__wbindgen_malloc, _.__wbindgen_realloc), o = a, i = _.wasmbuilder_addAssertion(this.__wbg_ptr, n, o, t);
|
|
32
|
+
if (i[1])
|
|
33
|
+
throw u(i[0]);
|
|
34
34
|
}
|
|
35
35
|
/**
|
|
36
36
|
* Add an ingredient to the manifest from a JSON ingredient definition and a [`Blob`].
|
|
@@ -45,8 +45,8 @@ var fe = $((ge, C) => {
|
|
|
45
45
|
* @returns {Promise<void>}
|
|
46
46
|
*/
|
|
47
47
|
addIngredientFromBlob(e, t, n) {
|
|
48
|
-
const
|
|
49
|
-
return
|
|
48
|
+
const o = d(e, _.__wbindgen_malloc, _.__wbindgen_realloc), i = a, s = d(t, _.__wbindgen_malloc, _.__wbindgen_realloc), c = a;
|
|
49
|
+
return _.wasmbuilder_addIngredientFromBlob(this.__wbg_ptr, o, i, s, c, n);
|
|
50
50
|
}
|
|
51
51
|
/**
|
|
52
52
|
* Add an ingredient to the manifest from a JSON ingredient definition without a blob
|
|
@@ -56,9 +56,9 @@ var fe = $((ge, C) => {
|
|
|
56
56
|
* @param {string} json
|
|
57
57
|
*/
|
|
58
58
|
addIngredient(e) {
|
|
59
|
-
const t =
|
|
60
|
-
if (
|
|
61
|
-
throw
|
|
59
|
+
const t = d(e, _.__wbindgen_malloc, _.__wbindgen_realloc), n = a, o = _.wasmbuilder_addIngredient(this.__wbg_ptr, t, n);
|
|
60
|
+
if (o[1])
|
|
61
|
+
throw u(o[0]);
|
|
62
62
|
}
|
|
63
63
|
/**
|
|
64
64
|
* Add a redaction for a JUMBF URI with the given reason.
|
|
@@ -69,9 +69,9 @@ var fe = $((ge, C) => {
|
|
|
69
69
|
* @param {any} reason
|
|
70
70
|
*/
|
|
71
71
|
addRedaction(e, t) {
|
|
72
|
-
const n =
|
|
73
|
-
if (
|
|
74
|
-
throw
|
|
72
|
+
const n = d(e, _.__wbindgen_malloc, _.__wbindgen_realloc), o = a, i = _.wasmbuilder_addRedaction(this.__wbg_ptr, n, o, t);
|
|
73
|
+
if (i[1])
|
|
74
|
+
throw u(i[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 fe = $((ge, C) => {
|
|
|
79
79
|
* @param {Blob} blob
|
|
80
80
|
*/
|
|
81
81
|
addResourceFromBlob(e, t) {
|
|
82
|
-
const n =
|
|
83
|
-
if (
|
|
84
|
-
throw
|
|
82
|
+
const n = d(e, _.__wbindgen_malloc, _.__wbindgen_realloc), o = a, i = _.wasmbuilder_addResourceFromBlob(this.__wbg_ptr, n, o, t);
|
|
83
|
+
if (i[1])
|
|
84
|
+
throw u(i[0]);
|
|
85
85
|
}
|
|
86
86
|
/**
|
|
87
87
|
* Retains actions and ingredients together in one step, per
|
|
@@ -96,9 +96,9 @@ var fe = $((ge, C) => {
|
|
|
96
96
|
* @param {Uint32Array} ingredient_indices
|
|
97
97
|
*/
|
|
98
98
|
filterActionsAndIngredientsAt(e, t) {
|
|
99
|
-
const n =
|
|
100
|
-
if (
|
|
101
|
-
throw
|
|
99
|
+
const n = W(e, _.__wbindgen_malloc), o = a, i = W(t, _.__wbindgen_malloc), s = a, c = _.wasmbuilder_filterActionsAndIngredientsAt(this.__wbg_ptr, n, o, i, s);
|
|
100
|
+
if (c[1])
|
|
101
|
+
throw u(c[0]);
|
|
102
102
|
}
|
|
103
103
|
/**
|
|
104
104
|
* Retains only the actions at the given 0-based indices into the actions currently returned
|
|
@@ -118,9 +118,9 @@ var fe = $((ge, C) => {
|
|
|
118
118
|
* @param {Uint32Array} indices
|
|
119
119
|
*/
|
|
120
120
|
filterActionsAt(e) {
|
|
121
|
-
const t =
|
|
122
|
-
if (
|
|
123
|
-
throw
|
|
121
|
+
const t = W(e, _.__wbindgen_malloc), n = a, o = _.wasmbuilder_filterActionsAt(this.__wbg_ptr, t, n);
|
|
122
|
+
if (o[1])
|
|
123
|
+
throw u(o[0]);
|
|
124
124
|
}
|
|
125
125
|
/**
|
|
126
126
|
* Retains ingredients, rescuing an otherwise-orphaned ingredient when its 0-based index into
|
|
@@ -132,9 +132,22 @@ var fe = $((ge, C) => {
|
|
|
132
132
|
* @param {Uint32Array} indices
|
|
133
133
|
*/
|
|
134
134
|
filterIngredientsAt(e) {
|
|
135
|
-
const t =
|
|
136
|
-
if (
|
|
137
|
-
throw
|
|
135
|
+
const t = W(e, _.__wbindgen_malloc), n = a, o = _.wasmbuilder_filterIngredientsAt(this.__wbg_ptr, t, n);
|
|
136
|
+
if (o[1])
|
|
137
|
+
throw u(o[0]);
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Creates a builder from an archive sharing the handle's settings.
|
|
141
|
+
* @param {Blob} archive
|
|
142
|
+
* @param {WasmContext} context
|
|
143
|
+
* @returns {WasmBuilder}
|
|
144
|
+
*/
|
|
145
|
+
static fromArchiveWithContext(e, t) {
|
|
146
|
+
C(t, M);
|
|
147
|
+
const n = _.wasmbuilder_fromArchiveWithContext(e, t.__wbg_ptr);
|
|
148
|
+
if (n[2])
|
|
149
|
+
throw u(n[1]);
|
|
150
|
+
return p.__wrap(n[0]);
|
|
138
151
|
}
|
|
139
152
|
/**
|
|
140
153
|
* Attempts to create a new `WasmBuilder` from a builder archive.
|
|
@@ -144,11 +157,25 @@ var fe = $((ge, C) => {
|
|
|
144
157
|
* @returns {WasmBuilder}
|
|
145
158
|
*/
|
|
146
159
|
static fromArchive(e, t) {
|
|
147
|
-
var n = w(t) ? 0 :
|
|
148
|
-
const
|
|
149
|
-
if (
|
|
150
|
-
throw
|
|
151
|
-
return
|
|
160
|
+
var n = w(t) ? 0 : d(t, _.__wbindgen_malloc, _.__wbindgen_realloc), o = a;
|
|
161
|
+
const i = _.wasmbuilder_fromArchive(e, n, o);
|
|
162
|
+
if (i[2])
|
|
163
|
+
throw u(i[1]);
|
|
164
|
+
return p.__wrap(i[0]);
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* Creates a builder from manifest JSON sharing the handle's settings.
|
|
168
|
+
* @param {string} json
|
|
169
|
+
* @param {WasmContext} context
|
|
170
|
+
* @returns {WasmBuilder}
|
|
171
|
+
*/
|
|
172
|
+
static fromJsonWithContext(e, t) {
|
|
173
|
+
const n = d(e, _.__wbindgen_malloc, _.__wbindgen_realloc), o = a;
|
|
174
|
+
C(t, M);
|
|
175
|
+
const i = _.wasmbuilder_fromJsonWithContext(n, o, t.__wbg_ptr);
|
|
176
|
+
if (i[2])
|
|
177
|
+
throw u(i[1]);
|
|
178
|
+
return p.__wrap(i[0]);
|
|
152
179
|
}
|
|
153
180
|
/**
|
|
154
181
|
* Attempts to create a new `WasmBuilder` from a JSON ManifestDefinition string.
|
|
@@ -158,22 +185,34 @@ var fe = $((ge, C) => {
|
|
|
158
185
|
* @returns {WasmBuilder}
|
|
159
186
|
*/
|
|
160
187
|
static fromJson(e, t) {
|
|
161
|
-
const n =
|
|
162
|
-
var
|
|
163
|
-
const
|
|
164
|
-
if (
|
|
165
|
-
throw
|
|
166
|
-
return
|
|
188
|
+
const n = d(e, _.__wbindgen_malloc, _.__wbindgen_realloc), o = a;
|
|
189
|
+
var i = w(t) ? 0 : d(t, _.__wbindgen_malloc, _.__wbindgen_realloc), s = a;
|
|
190
|
+
const c = _.wasmbuilder_fromJson(n, o, i, s);
|
|
191
|
+
if (c[2])
|
|
192
|
+
throw u(c[1]);
|
|
193
|
+
return p.__wrap(c[0]);
|
|
167
194
|
}
|
|
168
195
|
/**
|
|
169
196
|
* Get the current manifest definition.
|
|
170
197
|
* @returns {string}
|
|
171
198
|
*/
|
|
172
199
|
getDefinition() {
|
|
173
|
-
const e =
|
|
200
|
+
const e = _.wasmbuilder_getDefinition(this.__wbg_ptr);
|
|
174
201
|
if (e[2])
|
|
175
|
-
throw
|
|
176
|
-
return
|
|
202
|
+
throw u(e[1]);
|
|
203
|
+
return u(e[0]);
|
|
204
|
+
}
|
|
205
|
+
/**
|
|
206
|
+
* Creates a builder sharing the handle's settings, with independent manifest state.
|
|
207
|
+
* @param {WasmContext} context
|
|
208
|
+
* @returns {WasmBuilder}
|
|
209
|
+
*/
|
|
210
|
+
static newWithContext(e) {
|
|
211
|
+
C(e, M);
|
|
212
|
+
const t = _.wasmbuilder_newWithContext(e.__wbg_ptr);
|
|
213
|
+
if (t[2])
|
|
214
|
+
throw u(t[1]);
|
|
215
|
+
return p.__wrap(t[0]);
|
|
177
216
|
}
|
|
178
217
|
/**
|
|
179
218
|
* Creates a new `WasmBuilder` with a minimal manifest definition.
|
|
@@ -182,27 +221,27 @@ var fe = $((ge, C) => {
|
|
|
182
221
|
* @returns {WasmBuilder}
|
|
183
222
|
*/
|
|
184
223
|
static new(e) {
|
|
185
|
-
var t = w(e) ? 0 :
|
|
186
|
-
const
|
|
187
|
-
if (
|
|
188
|
-
throw
|
|
189
|
-
return
|
|
224
|
+
var t = w(e) ? 0 : d(e, _.__wbindgen_malloc, _.__wbindgen_realloc), n = a;
|
|
225
|
+
const o = _.wasmbuilder_new(t, n);
|
|
226
|
+
if (o[2])
|
|
227
|
+
throw u(o[1]);
|
|
228
|
+
return p.__wrap(o[0]);
|
|
190
229
|
}
|
|
191
230
|
/**
|
|
192
231
|
* Sets the builder "intent."
|
|
193
232
|
* @param {any} json_intent
|
|
194
233
|
*/
|
|
195
234
|
setIntent(e) {
|
|
196
|
-
const t =
|
|
235
|
+
const t = _.wasmbuilder_setIntent(this.__wbg_ptr, e);
|
|
197
236
|
if (t[1])
|
|
198
|
-
throw
|
|
237
|
+
throw u(t[0]);
|
|
199
238
|
}
|
|
200
239
|
/**
|
|
201
240
|
* Sets the state of the no_embed flag.
|
|
202
241
|
* @param {boolean} no_embed
|
|
203
242
|
*/
|
|
204
243
|
setNoEmbed(e) {
|
|
205
|
-
|
|
244
|
+
_.wasmbuilder_setNoEmbed(this.__wbg_ptr, e);
|
|
206
245
|
}
|
|
207
246
|
/**
|
|
208
247
|
* Sets the remote_url for a remote manifest.
|
|
@@ -212,8 +251,8 @@ var fe = $((ge, C) => {
|
|
|
212
251
|
* @param {string} url
|
|
213
252
|
*/
|
|
214
253
|
setRemoteUrl(e) {
|
|
215
|
-
const t =
|
|
216
|
-
|
|
254
|
+
const t = d(e, _.__wbindgen_malloc, _.__wbindgen_realloc), n = a;
|
|
255
|
+
_.wasmbuilder_setRemoteUrl(this.__wbg_ptr, t, n);
|
|
217
256
|
}
|
|
218
257
|
/**
|
|
219
258
|
* Sets a thumbnail from a [`Blob`] to be included in the manifest. The thumbnail should represent the asset being signed.
|
|
@@ -221,9 +260,9 @@ var fe = $((ge, C) => {
|
|
|
221
260
|
* @param {Blob} blob
|
|
222
261
|
*/
|
|
223
262
|
setThumbnailFromBlob(e, t) {
|
|
224
|
-
const n =
|
|
225
|
-
if (
|
|
226
|
-
throw
|
|
263
|
+
const n = d(e, _.__wbindgen_malloc, _.__wbindgen_realloc), o = a, i = _.wasmbuilder_setThumbnailFromBlob(this.__wbg_ptr, n, o, t);
|
|
264
|
+
if (i[1])
|
|
265
|
+
throw u(i[0]);
|
|
227
266
|
}
|
|
228
267
|
/**
|
|
229
268
|
* Sign an asset using the provided SignerDefinition, format, and source Blob.
|
|
@@ -236,9 +275,9 @@ var fe = $((ge, C) => {
|
|
|
236
275
|
* @param {Blob} source
|
|
237
276
|
* @returns {Promise<any>}
|
|
238
277
|
*/
|
|
239
|
-
signAndGetManifestBytes(e, t, n,
|
|
240
|
-
const
|
|
241
|
-
return
|
|
278
|
+
signAndGetManifestBytes(e, t, n, o) {
|
|
279
|
+
const i = d(n, _.__wbindgen_malloc, _.__wbindgen_realloc), s = a;
|
|
280
|
+
return _.wasmbuilder_signAndGetManifestBytes(this.__wbg_ptr, e, t, i, s, o);
|
|
242
281
|
}
|
|
243
282
|
/**
|
|
244
283
|
* Sign an asset using the provided SignerDefinition, format, and source Blob.
|
|
@@ -252,19 +291,19 @@ var fe = $((ge, C) => {
|
|
|
252
291
|
* @param {Blob} source
|
|
253
292
|
* @returns {Promise<Uint8Array>}
|
|
254
293
|
*/
|
|
255
|
-
sign(e, t, n,
|
|
256
|
-
const
|
|
257
|
-
return
|
|
294
|
+
sign(e, t, n, o) {
|
|
295
|
+
const i = d(n, _.__wbindgen_malloc, _.__wbindgen_realloc), s = a;
|
|
296
|
+
return _.wasmbuilder_sign(this.__wbg_ptr, e, t, i, s, o);
|
|
258
297
|
}
|
|
259
298
|
/**
|
|
260
299
|
* "Save" a builder to an archive.
|
|
261
300
|
* @returns {Uint8Array}
|
|
262
301
|
*/
|
|
263
302
|
toArchive() {
|
|
264
|
-
const e =
|
|
303
|
+
const e = _.wasmbuilder_toArchive(this.__wbg_ptr);
|
|
265
304
|
if (e[2])
|
|
266
|
-
throw
|
|
267
|
-
return
|
|
305
|
+
throw u(e[1]);
|
|
306
|
+
return u(e[0]);
|
|
268
307
|
}
|
|
269
308
|
/**
|
|
270
309
|
* Replaces the actions in the `c2pa.actions`/`c2pa.actions.v2` assertions with
|
|
@@ -291,9 +330,9 @@ var fe = $((ge, C) => {
|
|
|
291
330
|
* @param {any} action_groups
|
|
292
331
|
*/
|
|
293
332
|
updateActionsAt(e) {
|
|
294
|
-
const t =
|
|
333
|
+
const t = _.wasmbuilder_updateActionsAt(this.__wbg_ptr, e);
|
|
295
334
|
if (t[1])
|
|
296
|
-
throw
|
|
335
|
+
throw u(t[0]);
|
|
297
336
|
}
|
|
298
337
|
/**
|
|
299
338
|
* Replaces the data of every assertion with an exact matching label, in positional order.
|
|
@@ -302,9 +341,9 @@ var fe = $((ge, C) => {
|
|
|
302
341
|
* @param {any} data
|
|
303
342
|
*/
|
|
304
343
|
updateAssertionsAt(e, t) {
|
|
305
|
-
const n =
|
|
306
|
-
if (
|
|
307
|
-
throw
|
|
344
|
+
const n = d(e, _.__wbindgen_malloc, _.__wbindgen_realloc), o = a, i = _.wasmbuilder_updateAssertionsAt(this.__wbg_ptr, n, o, t);
|
|
345
|
+
if (i[1])
|
|
346
|
+
throw u(i[0]);
|
|
308
347
|
}
|
|
309
348
|
/**
|
|
310
349
|
* Updates a (known) property in the manifest definition.
|
|
@@ -312,43 +351,65 @@ var fe = $((ge, C) => {
|
|
|
312
351
|
* @param {any} value
|
|
313
352
|
*/
|
|
314
353
|
updateManifestProperty(e, t) {
|
|
315
|
-
const n =
|
|
316
|
-
if (
|
|
317
|
-
throw
|
|
354
|
+
const n = d(e, _.__wbindgen_malloc, _.__wbindgen_realloc), o = a, i = _.wasmbuilder_updateManifestProperty(this.__wbg_ptr, n, o, t);
|
|
355
|
+
if (i[1])
|
|
356
|
+
throw u(i[0]);
|
|
318
357
|
}
|
|
319
358
|
}
|
|
320
|
-
Symbol.dispose && (
|
|
359
|
+
Symbol.dispose && (p.prototype[Symbol.dispose] = p.prototype.free);
|
|
321
360
|
class M {
|
|
361
|
+
__destroy_into_raw() {
|
|
362
|
+
const e = this.__wbg_ptr;
|
|
363
|
+
return this.__wbg_ptr = 0, D.unregister(this), e;
|
|
364
|
+
}
|
|
365
|
+
free() {
|
|
366
|
+
const e = this.__destroy_into_raw();
|
|
367
|
+
_.__wbg_wasmcontext_free(e, 0);
|
|
368
|
+
}
|
|
369
|
+
/**
|
|
370
|
+
* Parses settings once. Omit the JSON argument to use default settings.
|
|
371
|
+
* @param {string | null} [context_json]
|
|
372
|
+
*/
|
|
373
|
+
constructor(e) {
|
|
374
|
+
var t = w(e) ? 0 : d(e, _.__wbindgen_malloc, _.__wbindgen_realloc), n = a;
|
|
375
|
+
const o = _.wasmcontext_new(t, n);
|
|
376
|
+
if (o[2])
|
|
377
|
+
throw u(o[1]);
|
|
378
|
+
return this.__wbg_ptr = o[0], D.register(this, this.__wbg_ptr, this), this;
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
Symbol.dispose && (M.prototype[Symbol.dispose] = M.prototype.free);
|
|
382
|
+
class I {
|
|
322
383
|
static __wrap(e) {
|
|
323
|
-
const t = Object.create(
|
|
324
|
-
return t.__wbg_ptr = e,
|
|
384
|
+
const t = Object.create(I.prototype);
|
|
385
|
+
return t.__wbg_ptr = e, L.register(t, t.__wbg_ptr, t), t;
|
|
325
386
|
}
|
|
326
387
|
__destroy_into_raw() {
|
|
327
388
|
const e = this.__wbg_ptr;
|
|
328
|
-
return this.__wbg_ptr = 0,
|
|
389
|
+
return this.__wbg_ptr = 0, L.unregister(this), e;
|
|
329
390
|
}
|
|
330
391
|
free() {
|
|
331
392
|
const e = this.__destroy_into_raw();
|
|
332
|
-
|
|
393
|
+
_.__wbg_wasmreader_free(e, 0);
|
|
333
394
|
}
|
|
334
395
|
/**
|
|
335
396
|
* Returns the label of the asset's active manifest.
|
|
336
397
|
* @returns {string | undefined}
|
|
337
398
|
*/
|
|
338
399
|
activeLabel() {
|
|
339
|
-
const e =
|
|
400
|
+
const e = _.wasmreader_activeLabel(this.__wbg_ptr);
|
|
340
401
|
let t;
|
|
341
|
-
return e[0] !== 0 && (t =
|
|
402
|
+
return e[0] !== 0 && (t = y(e[0], e[1]), _.__wbindgen_free(e[0], e[1] * 1, 1)), t;
|
|
342
403
|
}
|
|
343
404
|
/**
|
|
344
405
|
* Returns the asset's active manifest.
|
|
345
406
|
* @returns {any}
|
|
346
407
|
*/
|
|
347
408
|
activeManifest() {
|
|
348
|
-
const e =
|
|
409
|
+
const e = _.wasmreader_activeManifest(this.__wbg_ptr);
|
|
349
410
|
if (e[2])
|
|
350
|
-
throw
|
|
351
|
-
return
|
|
411
|
+
throw u(e[1]);
|
|
412
|
+
return u(e[0]);
|
|
352
413
|
}
|
|
353
414
|
/**
|
|
354
415
|
* Returns the asset's manifest store as crJSON.
|
|
@@ -357,12 +418,25 @@ var fe = $((ge, C) => {
|
|
|
357
418
|
crJson() {
|
|
358
419
|
let e, t;
|
|
359
420
|
try {
|
|
360
|
-
const n =
|
|
361
|
-
return e = n[0], t = n[1],
|
|
421
|
+
const n = _.wasmreader_crJson(this.__wbg_ptr);
|
|
422
|
+
return e = n[0], t = n[1], y(n[0], n[1]);
|
|
362
423
|
} finally {
|
|
363
|
-
|
|
424
|
+
_.__wbindgen_free(e, t, 1);
|
|
364
425
|
}
|
|
365
426
|
}
|
|
427
|
+
/**
|
|
428
|
+
* Creates a fragment reader sharing the handle's settings.
|
|
429
|
+
* The handle can be freed immediately, even while the returned Promise is pending.
|
|
430
|
+
* @param {string} format
|
|
431
|
+
* @param {Blob} init
|
|
432
|
+
* @param {Blob} fragment
|
|
433
|
+
* @param {WasmContext} context
|
|
434
|
+
* @returns {Promise<WasmReader>}
|
|
435
|
+
*/
|
|
436
|
+
static fromBlobFragmentWithContext(e, t, n, o) {
|
|
437
|
+
const i = d(e, _.__wbindgen_malloc, _.__wbindgen_realloc), s = a;
|
|
438
|
+
return C(o, M), _.wasmreader_fromBlobFragmentWithContext(i, s, t, n, o.__wbg_ptr);
|
|
439
|
+
}
|
|
366
440
|
/**
|
|
367
441
|
* Attempts to create a new `WasmReader` from an asset format, a `Blob` of the bytes of the initial segment, and a fragment `Blob`.
|
|
368
442
|
* Optionally accepts a context JSON string to configure the reader.
|
|
@@ -372,10 +446,22 @@ var fe = $((ge, C) => {
|
|
|
372
446
|
* @param {string | null} [context_json]
|
|
373
447
|
* @returns {Promise<WasmReader>}
|
|
374
448
|
*/
|
|
375
|
-
static fromBlobFragment(e, t, n,
|
|
376
|
-
const
|
|
377
|
-
var
|
|
378
|
-
return
|
|
449
|
+
static fromBlobFragment(e, t, n, o) {
|
|
450
|
+
const i = d(e, _.__wbindgen_malloc, _.__wbindgen_realloc), s = a;
|
|
451
|
+
var c = w(o) ? 0 : d(o, _.__wbindgen_malloc, _.__wbindgen_realloc), f = a;
|
|
452
|
+
return _.wasmreader_fromBlobFragment(i, s, t, n, c, f);
|
|
453
|
+
}
|
|
454
|
+
/**
|
|
455
|
+
* Creates a reader sharing the handle's settings.
|
|
456
|
+
* The handle can be freed immediately, even while the returned Promise is pending.
|
|
457
|
+
* @param {string} format
|
|
458
|
+
* @param {Blob} blob
|
|
459
|
+
* @param {WasmContext} context
|
|
460
|
+
* @returns {Promise<WasmReader>}
|
|
461
|
+
*/
|
|
462
|
+
static fromBlobWithContext(e, t, n) {
|
|
463
|
+
const o = d(e, _.__wbindgen_malloc, _.__wbindgen_realloc), i = a;
|
|
464
|
+
return C(n, M), _.wasmreader_fromBlobWithContext(o, i, t, n.__wbg_ptr);
|
|
379
465
|
}
|
|
380
466
|
/**
|
|
381
467
|
* Attempts to create a new `WasmReader` from an asset format and `Blob` of the asset's bytes.
|
|
@@ -386,9 +472,9 @@ var fe = $((ge, C) => {
|
|
|
386
472
|
* @returns {Promise<WasmReader>}
|
|
387
473
|
*/
|
|
388
474
|
static fromBlob(e, t, n) {
|
|
389
|
-
const
|
|
390
|
-
var s = w(n) ? 0 :
|
|
391
|
-
return
|
|
475
|
+
const o = d(e, _.__wbindgen_malloc, _.__wbindgen_realloc), i = a;
|
|
476
|
+
var s = w(n) ? 0 : d(n, _.__wbindgen_malloc, _.__wbindgen_realloc), c = a;
|
|
477
|
+
return _.wasmreader_fromBlob(o, i, t, s, c);
|
|
392
478
|
}
|
|
393
479
|
/**
|
|
394
480
|
* Attempts to create a new `WasmReader` from an asset format and the asset's raw bytes.
|
|
@@ -405,9 +491,9 @@ var fe = $((ge, C) => {
|
|
|
405
491
|
* @returns {Promise<WasmReader>}
|
|
406
492
|
*/
|
|
407
493
|
static fromBytes(e, t, n) {
|
|
408
|
-
const
|
|
409
|
-
var
|
|
410
|
-
return
|
|
494
|
+
const o = d(e, _.__wbindgen_malloc, _.__wbindgen_realloc), i = a, s = ce(t, _.__wbindgen_malloc), c = a;
|
|
495
|
+
var f = w(n) ? 0 : d(n, _.__wbindgen_malloc, _.__wbindgen_realloc), g = a;
|
|
496
|
+
return _.wasmreader_fromBytes(o, i, s, c, f, g);
|
|
411
497
|
}
|
|
412
498
|
/**
|
|
413
499
|
* Returns a JSON representation of the asset's manifest store.
|
|
@@ -416,10 +502,10 @@ var fe = $((ge, C) => {
|
|
|
416
502
|
json() {
|
|
417
503
|
let e, t;
|
|
418
504
|
try {
|
|
419
|
-
const n =
|
|
420
|
-
return e = n[0], t = n[1],
|
|
505
|
+
const n = _.wasmreader_json(this.__wbg_ptr);
|
|
506
|
+
return e = n[0], t = n[1], y(n[0], n[1]);
|
|
421
507
|
} finally {
|
|
422
|
-
|
|
508
|
+
_.__wbindgen_free(e, t, 1);
|
|
423
509
|
}
|
|
424
510
|
}
|
|
425
511
|
/**
|
|
@@ -427,10 +513,10 @@ var fe = $((ge, C) => {
|
|
|
427
513
|
* @returns {any}
|
|
428
514
|
*/
|
|
429
515
|
manifestStore() {
|
|
430
|
-
const e =
|
|
516
|
+
const e = _.wasmreader_manifestStore(this.__wbg_ptr);
|
|
431
517
|
if (e[2])
|
|
432
|
-
throw
|
|
433
|
-
return
|
|
518
|
+
throw u(e[1]);
|
|
519
|
+
return u(e[0]);
|
|
434
520
|
}
|
|
435
521
|
/**
|
|
436
522
|
* Accepts a URI reference to a binary object in the resource store and returns a `js_sys::Uint8Array` containing the resource's bytes.
|
|
@@ -438,46 +524,46 @@ var fe = $((ge, C) => {
|
|
|
438
524
|
* @returns {Uint8Array}
|
|
439
525
|
*/
|
|
440
526
|
resourceToBytes(e) {
|
|
441
|
-
const t =
|
|
442
|
-
if (
|
|
443
|
-
throw
|
|
444
|
-
return
|
|
527
|
+
const t = d(e, _.__wbindgen_malloc, _.__wbindgen_realloc), n = a, o = _.wasmreader_resourceToBytes(this.__wbg_ptr, t, n);
|
|
528
|
+
if (o[2])
|
|
529
|
+
throw u(o[1]);
|
|
530
|
+
return u(o[0]);
|
|
445
531
|
}
|
|
446
532
|
}
|
|
447
|
-
Symbol.dispose && (
|
|
448
|
-
function
|
|
449
|
-
const e =
|
|
533
|
+
Symbol.dispose && (I.prototype[Symbol.dispose] = I.prototype.free);
|
|
534
|
+
function Z(r) {
|
|
535
|
+
const e = _.encodeSignerPayload(r);
|
|
450
536
|
if (e[3])
|
|
451
|
-
throw
|
|
537
|
+
throw u(e[2]);
|
|
452
538
|
var t = A(e[0], e[1]).slice();
|
|
453
|
-
return
|
|
539
|
+
return _.__wbindgen_free(e[0], e[1] * 1, 1), t;
|
|
454
540
|
}
|
|
455
|
-
function
|
|
541
|
+
function ee() {
|
|
456
542
|
return {
|
|
457
543
|
__proto__: null,
|
|
458
544
|
"./c2pa_bg.js": {
|
|
459
545
|
__proto__: null,
|
|
460
546
|
__wbg_Error_30c8987f7c2ed4e2: function(e, t) {
|
|
461
|
-
return Error(
|
|
547
|
+
return Error(y(e, t));
|
|
462
548
|
},
|
|
463
549
|
__wbg_Number_14af1003b8dd5ead: function(e) {
|
|
464
550
|
return Number(e);
|
|
465
551
|
},
|
|
466
552
|
__wbg_String_8564e559799eccda: function(e, t) {
|
|
467
|
-
const n = String(t),
|
|
468
|
-
m().setInt32(e + 4,
|
|
553
|
+
const n = String(t), o = d(n, _.__wbindgen_malloc, _.__wbindgen_realloc), i = a;
|
|
554
|
+
m().setInt32(e + 4, i, !0), m().setInt32(e + 0, o, !0);
|
|
469
555
|
},
|
|
470
556
|
__wbg___wbindgen_bigint_get_as_i64_a2383202b9353e4c: function(e, t) {
|
|
471
|
-
const n = t,
|
|
472
|
-
m().setBigInt64(e + 8, w(
|
|
557
|
+
const n = t, o = typeof n == "bigint" ? n : void 0;
|
|
558
|
+
m().setBigInt64(e + 8, w(o) ? BigInt(0) : o, !0), m().setInt32(e + 0, !w(o), !0);
|
|
473
559
|
},
|
|
474
560
|
__wbg___wbindgen_boolean_get_5b446f51afd21013: function(e) {
|
|
475
561
|
const t = e, n = typeof t == "boolean" ? t : void 0;
|
|
476
562
|
return w(n) ? 16777215 : n ? 1 : 0;
|
|
477
563
|
},
|
|
478
564
|
__wbg___wbindgen_debug_string_4687d8d8c2017d52: function(e, t) {
|
|
479
|
-
const n =
|
|
480
|
-
m().setInt32(e + 4,
|
|
565
|
+
const n = k(t), o = d(n, _.__wbindgen_malloc, _.__wbindgen_realloc), i = a;
|
|
566
|
+
m().setInt32(e + 4, i, !0), m().setInt32(e + 0, o, !0);
|
|
481
567
|
},
|
|
482
568
|
__wbg___wbindgen_in_92f62ee1427d9e49: function(e, t) {
|
|
483
569
|
return e in t;
|
|
@@ -508,16 +594,16 @@ var fe = $((ge, C) => {
|
|
|
508
594
|
return e == t;
|
|
509
595
|
},
|
|
510
596
|
__wbg___wbindgen_number_get_2e0e7dee9f701a71: function(e, t) {
|
|
511
|
-
const n = t,
|
|
512
|
-
m().setFloat64(e + 8, w(
|
|
597
|
+
const n = t, o = typeof n == "number" ? n : void 0;
|
|
598
|
+
m().setFloat64(e + 8, w(o) ? 0 : o, !0), m().setInt32(e + 0, !w(o), !0);
|
|
513
599
|
},
|
|
514
600
|
__wbg___wbindgen_string_get_0380ccaa2f57f0d9: function(e, t) {
|
|
515
|
-
const n = t,
|
|
516
|
-
var
|
|
517
|
-
m().setInt32(e + 4, s, !0), m().setInt32(e + 0,
|
|
601
|
+
const n = t, o = typeof n == "string" ? n : void 0;
|
|
602
|
+
var i = w(o) ? 0 : d(o, _.__wbindgen_malloc, _.__wbindgen_realloc), s = a;
|
|
603
|
+
m().setInt32(e + 4, s, !0), m().setInt32(e + 0, i, !0);
|
|
518
604
|
},
|
|
519
605
|
__wbg___wbindgen_throw_41e9ee4f547fc59a: function(e, t) {
|
|
520
|
-
throw new Error(
|
|
606
|
+
throw new Error(y(e, t));
|
|
521
607
|
},
|
|
522
608
|
__wbg__wbg_cb_unref_dcc1a90847f04c41: function(e) {
|
|
523
609
|
e._wbg_cb_unref();
|
|
@@ -529,8 +615,8 @@ var fe = $((ge, C) => {
|
|
|
529
615
|
e.abort();
|
|
530
616
|
},
|
|
531
617
|
__wbg_append_1938ed58fb5613b8: function() {
|
|
532
|
-
return l(function(e, t, n,
|
|
533
|
-
e.append(
|
|
618
|
+
return l(function(e, t, n, o, i) {
|
|
619
|
+
e.append(y(t, n), y(o, i));
|
|
534
620
|
}, arguments);
|
|
535
621
|
},
|
|
536
622
|
__wbg_arrayBuffer_f07be74819944ea2: function() {
|
|
@@ -564,11 +650,11 @@ var fe = $((ge, C) => {
|
|
|
564
650
|
return Object.entries(e);
|
|
565
651
|
},
|
|
566
652
|
__wbg_error_757e9472f8410341: function(e, t) {
|
|
567
|
-
let n,
|
|
653
|
+
let n, o;
|
|
568
654
|
try {
|
|
569
|
-
n = e,
|
|
655
|
+
n = e, o = t, console.error(y(e, t));
|
|
570
656
|
} finally {
|
|
571
|
-
|
|
657
|
+
_.__wbindgen_free(n, o, 1);
|
|
572
658
|
}
|
|
573
659
|
},
|
|
574
660
|
__wbg_fetch_9dad4fe911207b37: function(e) {
|
|
@@ -731,16 +817,16 @@ var fe = $((ge, C) => {
|
|
|
731
817
|
},
|
|
732
818
|
__wbg_new_typed_b01cb72a8af741a3: function(e, t) {
|
|
733
819
|
try {
|
|
734
|
-
var n = { a: e, b: t },
|
|
735
|
-
const
|
|
820
|
+
var n = { a: e, b: t }, o = (s, c) => {
|
|
821
|
+
const f = n.a;
|
|
736
822
|
n.a = 0;
|
|
737
823
|
try {
|
|
738
|
-
return
|
|
824
|
+
return re(f, n.b, s, c);
|
|
739
825
|
} finally {
|
|
740
|
-
n.a =
|
|
826
|
+
n.a = f;
|
|
741
827
|
}
|
|
742
828
|
};
|
|
743
|
-
return new Promise(
|
|
829
|
+
return new Promise(o);
|
|
744
830
|
} finally {
|
|
745
831
|
n.a = 0;
|
|
746
832
|
}
|
|
@@ -750,7 +836,7 @@ var fe = $((ge, C) => {
|
|
|
750
836
|
},
|
|
751
837
|
__wbg_new_with_str_and_init_4618dee4e950224f: function() {
|
|
752
838
|
return l(function(e, t, n) {
|
|
753
|
-
return new Request(
|
|
839
|
+
return new Request(y(e, t), n);
|
|
754
840
|
}, arguments);
|
|
755
841
|
},
|
|
756
842
|
__wbg_next_33784799010f1bbe: function(e) {
|
|
@@ -797,7 +883,7 @@ var fe = $((ge, C) => {
|
|
|
797
883
|
},
|
|
798
884
|
__wbg_require_b4edbdcf3e2a1ef0: function() {
|
|
799
885
|
return l(function() {
|
|
800
|
-
return
|
|
886
|
+
return Y.require;
|
|
801
887
|
}, arguments);
|
|
802
888
|
},
|
|
803
889
|
__wbg_resolve_0076e10020304ede: function(e) {
|
|
@@ -822,19 +908,19 @@ var fe = $((ge, C) => {
|
|
|
822
908
|
e.body = t;
|
|
823
909
|
},
|
|
824
910
|
__wbg_set_cache_7507c4cc5938ccc7: function(e, t) {
|
|
825
|
-
e.cache =
|
|
911
|
+
e.cache = _e[t];
|
|
826
912
|
},
|
|
827
913
|
__wbg_set_credentials_e0dcce31ca532b7d: function(e, t) {
|
|
828
|
-
e.credentials =
|
|
914
|
+
e.credentials = oe[t];
|
|
829
915
|
},
|
|
830
916
|
__wbg_set_headers_40ad33dcf016613f: function(e, t) {
|
|
831
917
|
e.headers = t;
|
|
832
918
|
},
|
|
833
919
|
__wbg_set_method_dcb32343247ec427: function(e, t, n) {
|
|
834
|
-
e.method =
|
|
920
|
+
e.method = y(t, n);
|
|
835
921
|
},
|
|
836
922
|
__wbg_set_mode_74e772635acb96ec: function(e, t) {
|
|
837
|
-
e.mode =
|
|
923
|
+
e.mode = ie[t];
|
|
838
924
|
},
|
|
839
925
|
__wbg_set_signal_2dbd377604627f26: function(e, t) {
|
|
840
926
|
e.signal = t;
|
|
@@ -851,24 +937,24 @@ var fe = $((ge, C) => {
|
|
|
851
937
|
}, arguments);
|
|
852
938
|
},
|
|
853
939
|
__wbg_stack_3b0d974bbf31e44f: function(e, t) {
|
|
854
|
-
const n = t.stack,
|
|
855
|
-
m().setInt32(e + 4,
|
|
940
|
+
const n = t.stack, o = d(n, _.__wbindgen_malloc, _.__wbindgen_realloc), i = a;
|
|
941
|
+
m().setInt32(e + 4, i, !0), m().setInt32(e + 0, o, !0);
|
|
856
942
|
},
|
|
857
943
|
__wbg_static_accessor_GLOBAL_266715b9d96ba635: function() {
|
|
858
944
|
const e = typeof global > "u" ? null : global;
|
|
859
|
-
return w(e) ? 0 :
|
|
945
|
+
return w(e) ? 0 : x(e);
|
|
860
946
|
},
|
|
861
947
|
__wbg_static_accessor_GLOBAL_THIS_10fb7dc1ae063179: function() {
|
|
862
948
|
const e = typeof globalThis > "u" ? null : globalThis;
|
|
863
|
-
return w(e) ? 0 :
|
|
949
|
+
return w(e) ? 0 : x(e);
|
|
864
950
|
},
|
|
865
951
|
__wbg_static_accessor_SELF_0b583911f537483a: function() {
|
|
866
952
|
const e = typeof self > "u" ? null : self;
|
|
867
|
-
return w(e) ? 0 :
|
|
953
|
+
return w(e) ? 0 : x(e);
|
|
868
954
|
},
|
|
869
955
|
__wbg_static_accessor_WINDOW_d7f903d1508cbdc4: function() {
|
|
870
956
|
const e = typeof window > "u" ? null : window;
|
|
871
|
-
return w(e) ? 0 :
|
|
957
|
+
return w(e) ? 0 : x(e);
|
|
872
958
|
},
|
|
873
959
|
__wbg_status_ce0a98d3c57125f3: function(e) {
|
|
874
960
|
return e.status;
|
|
@@ -888,8 +974,8 @@ var fe = $((ge, C) => {
|
|
|
888
974
|
return e.then(t);
|
|
889
975
|
},
|
|
890
976
|
__wbg_url_8e28edeab4cd6bed: function(e, t) {
|
|
891
|
-
const n = t.url,
|
|
892
|
-
m().setInt32(e + 4,
|
|
977
|
+
const n = t.url, o = d(n, _.__wbindgen_malloc, _.__wbindgen_realloc), i = a;
|
|
978
|
+
m().setInt32(e + 4, i, !0), m().setInt32(e + 0, o, !0);
|
|
893
979
|
},
|
|
894
980
|
__wbg_valueOf_6abcff09c8156bb6: function(e) {
|
|
895
981
|
return e.valueOf();
|
|
@@ -901,13 +987,13 @@ var fe = $((ge, C) => {
|
|
|
901
987
|
return e.versions;
|
|
902
988
|
},
|
|
903
989
|
__wbg_wasmreader_new: function(e) {
|
|
904
|
-
return
|
|
990
|
+
return I.__wrap(e);
|
|
905
991
|
},
|
|
906
992
|
__wbindgen_generic_0000000000000001: function(e, t) {
|
|
907
|
-
return
|
|
993
|
+
return P(e, t, ne);
|
|
908
994
|
},
|
|
909
995
|
__wbindgen_generic_0000000000000002: function(e, t) {
|
|
910
|
-
return
|
|
996
|
+
return P(e, t, te);
|
|
911
997
|
},
|
|
912
998
|
__wbindgen_generic_0000000000000003: function(e) {
|
|
913
999
|
return e;
|
|
@@ -919,67 +1005,73 @@ var fe = $((ge, C) => {
|
|
|
919
1005
|
return A(e, t);
|
|
920
1006
|
},
|
|
921
1007
|
__wbindgen_generic_0000000000000006: function(e, t) {
|
|
922
|
-
return
|
|
1008
|
+
return y(e, t);
|
|
923
1009
|
},
|
|
924
1010
|
__wbindgen_generic_0000000000000007: function(e) {
|
|
925
1011
|
return BigInt.asUintN(64, e);
|
|
926
1012
|
},
|
|
927
1013
|
__wbindgen_generic_0000000000000008: function(e, t) {
|
|
928
1014
|
var n = A(e, t).slice();
|
|
929
|
-
return
|
|
1015
|
+
return _.__wbindgen_free(e, t * 1, 1), n;
|
|
930
1016
|
},
|
|
931
1017
|
__wbindgen_init_externref_table: function() {
|
|
932
|
-
const e =
|
|
1018
|
+
const e = _.__wbindgen_externrefs, t = e.grow(4);
|
|
933
1019
|
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);
|
|
934
1020
|
}
|
|
935
1021
|
}
|
|
936
1022
|
};
|
|
937
1023
|
}
|
|
938
|
-
function
|
|
939
|
-
|
|
1024
|
+
function te(r, e) {
|
|
1025
|
+
_.wasm_bindgen_749495e350e70745___convert__closures_____invoke_______true_(r, e);
|
|
940
1026
|
}
|
|
941
|
-
function
|
|
942
|
-
const n =
|
|
1027
|
+
function ne(r, e, t) {
|
|
1028
|
+
const n = _.wasm_bindgen_749495e350e70745___convert__closures_____invoke___wasm_bindgen_749495e350e70745___JsValue__core_6a51abefd5362b2___result__Result_____wasm_bindgen_749495e350e70745___JsError___true_(r, e, t);
|
|
943
1029
|
if (n[1])
|
|
944
|
-
throw
|
|
1030
|
+
throw u(n[0]);
|
|
945
1031
|
}
|
|
946
|
-
function
|
|
947
|
-
|
|
1032
|
+
function re(r, e, t, n) {
|
|
1033
|
+
_.wasm_bindgen_749495e350e70745___convert__closures_____invoke___js_sys_a6a8441767b3b579___Function_fn_wasm_bindgen_749495e350e70745___JsValue_____wasm_bindgen_749495e350e70745___sys__Undefined___js_sys_a6a8441767b3b579___Function_fn_wasm_bindgen_749495e350e70745___JsValue_____wasm_bindgen_749495e350e70745___sys__Undefined_______true_(r, e, t, n);
|
|
948
1034
|
}
|
|
949
|
-
const
|
|
1035
|
+
const _e = ["default", "no-store", "reload", "no-cache", "force-cache", "only-if-cached"], oe = ["omit", "same-origin", "include"], ie = ["same-origin", "no-cors", "cors", "navigate"], J = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
950
1036
|
}, unregister: () => {
|
|
951
|
-
} } : new FinalizationRegistry((r) =>
|
|
1037
|
+
} } : new FinalizationRegistry((r) => _.__wbg_wasmbuilder_free(r, 1)), D = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
952
1038
|
}, unregister: () => {
|
|
953
|
-
} } : new FinalizationRegistry((r) =>
|
|
954
|
-
typeof FinalizationRegistry > "u" || new FinalizationRegistry((r) => o.__wbg_wasmsigner_free(r, 1));
|
|
955
|
-
function R(r) {
|
|
956
|
-
const e = o.__externref_table_alloc();
|
|
957
|
-
return o.__wbindgen_externrefs.set(e, r), e;
|
|
958
|
-
}
|
|
959
|
-
const J = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
1039
|
+
} } : new FinalizationRegistry((r) => _.__wbg_wasmcontext_free(r, 1)), L = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
960
1040
|
}, unregister: () => {
|
|
961
|
-
} } : new FinalizationRegistry((r) =>
|
|
1041
|
+
} } : new FinalizationRegistry((r) => _.__wbg_wasmreader_free(r, 1));
|
|
1042
|
+
typeof FinalizationRegistry > "u" || new FinalizationRegistry((r) => _.__wbg_wasmsigner_free(r, 1));
|
|
962
1043
|
function x(r) {
|
|
1044
|
+
const e = _.__externref_table_alloc();
|
|
1045
|
+
return _.__wbindgen_externrefs.set(e, r), e;
|
|
1046
|
+
}
|
|
1047
|
+
function C(r, e) {
|
|
1048
|
+
if (!(r instanceof e))
|
|
1049
|
+
throw new Error(`expected instance of ${e.name}`);
|
|
1050
|
+
}
|
|
1051
|
+
const V = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
1052
|
+
}, unregister: () => {
|
|
1053
|
+
} } : new FinalizationRegistry((r) => _.__wbindgen_destroy_closure(r.a, r.b));
|
|
1054
|
+
function k(r) {
|
|
963
1055
|
const e = typeof r;
|
|
964
1056
|
if (e == "number" || e == "boolean" || r == null)
|
|
965
1057
|
return `${r}`;
|
|
966
1058
|
if (e == "string")
|
|
967
1059
|
return `"${r}"`;
|
|
968
1060
|
if (e == "symbol") {
|
|
969
|
-
const
|
|
970
|
-
return
|
|
1061
|
+
const o = r.description;
|
|
1062
|
+
return o == null ? "Symbol" : `Symbol(${o})`;
|
|
971
1063
|
}
|
|
972
1064
|
if (e == "function") {
|
|
973
|
-
const
|
|
974
|
-
return typeof
|
|
1065
|
+
const o = r.name;
|
|
1066
|
+
return typeof o == "string" && o.length > 0 ? `Function(${o})` : "Function";
|
|
975
1067
|
}
|
|
976
1068
|
if (Array.isArray(r)) {
|
|
977
|
-
const
|
|
978
|
-
let
|
|
979
|
-
|
|
980
|
-
for (let s = 1; s <
|
|
981
|
-
|
|
982
|
-
return
|
|
1069
|
+
const o = r.length;
|
|
1070
|
+
let i = "[";
|
|
1071
|
+
o > 0 && (i += k(r[0]));
|
|
1072
|
+
for (let s = 1; s < o; s++)
|
|
1073
|
+
i += ", " + k(r[s]);
|
|
1074
|
+
return i += "]", i;
|
|
983
1075
|
}
|
|
984
1076
|
const t = /\[object ([^\]]+)\]/.exec(toString.call(r));
|
|
985
1077
|
let n;
|
|
@@ -997,109 +1089,109 @@ var fe = $((ge, C) => {
|
|
|
997
1089
|
${r.stack}` : n;
|
|
998
1090
|
}
|
|
999
1091
|
function A(r, e) {
|
|
1000
|
-
return r = r >>> 0,
|
|
1092
|
+
return r = r >>> 0, R().subarray(r / 1, r / 1 + e);
|
|
1001
1093
|
}
|
|
1002
|
-
let
|
|
1094
|
+
let S = null;
|
|
1003
1095
|
function m() {
|
|
1004
|
-
return (
|
|
1096
|
+
return (S === null || S.buffer.detached === !0 || S.buffer.detached === void 0 && S.buffer !== _.memory.buffer) && (S = new DataView(_.memory.buffer)), S;
|
|
1005
1097
|
}
|
|
1006
|
-
function
|
|
1007
|
-
return
|
|
1098
|
+
function y(r, e) {
|
|
1099
|
+
return ue(r >>> 0, e);
|
|
1008
1100
|
}
|
|
1009
|
-
let
|
|
1010
|
-
function
|
|
1011
|
-
return (
|
|
1101
|
+
let j = null;
|
|
1102
|
+
function se() {
|
|
1103
|
+
return (j === null || j.byteLength === 0) && (j = new Uint32Array(_.memory.buffer)), j;
|
|
1012
1104
|
}
|
|
1013
|
-
let
|
|
1014
|
-
function
|
|
1015
|
-
return (
|
|
1105
|
+
let E = null;
|
|
1106
|
+
function R() {
|
|
1107
|
+
return (E === null || E.byteLength === 0) && (E = new Uint8Array(_.memory.buffer)), E;
|
|
1016
1108
|
}
|
|
1017
1109
|
function l(r, e) {
|
|
1018
1110
|
try {
|
|
1019
1111
|
return r.apply(this, e);
|
|
1020
1112
|
} catch (t) {
|
|
1021
|
-
const n =
|
|
1022
|
-
|
|
1113
|
+
const n = x(t);
|
|
1114
|
+
_.__wbindgen_exn_store(n);
|
|
1023
1115
|
}
|
|
1024
1116
|
}
|
|
1025
1117
|
function w(r) {
|
|
1026
1118
|
return r == null;
|
|
1027
1119
|
}
|
|
1028
|
-
function
|
|
1029
|
-
const n = { a: r, b: e, cnt: 1 },
|
|
1120
|
+
function P(r, e, t) {
|
|
1121
|
+
const n = { a: r, b: e, cnt: 1 }, o = (...i) => {
|
|
1030
1122
|
n.cnt++;
|
|
1031
1123
|
const s = n.a;
|
|
1032
1124
|
n.a = 0;
|
|
1033
1125
|
try {
|
|
1034
|
-
return t(s, n.b, ...
|
|
1126
|
+
return t(s, n.b, ...i);
|
|
1035
1127
|
} finally {
|
|
1036
|
-
n.a = s,
|
|
1128
|
+
n.a = s, o._wbg_cb_unref();
|
|
1037
1129
|
}
|
|
1038
1130
|
};
|
|
1039
|
-
return
|
|
1040
|
-
--n.cnt === 0 && (
|
|
1041
|
-
},
|
|
1131
|
+
return o._wbg_cb_unref = () => {
|
|
1132
|
+
--n.cnt === 0 && (_.__wbindgen_destroy_closure(n.a, n.b), n.a = 0, V.unregister(n));
|
|
1133
|
+
}, V.register(o, n, n), o;
|
|
1042
1134
|
}
|
|
1043
|
-
function
|
|
1135
|
+
function W(r, e) {
|
|
1044
1136
|
const t = e(r.length * 4, 4) >>> 0;
|
|
1045
|
-
return
|
|
1137
|
+
return se().set(r, t / 4), a = r.length, t;
|
|
1046
1138
|
}
|
|
1047
|
-
function
|
|
1139
|
+
function ce(r, e) {
|
|
1048
1140
|
const t = e(r.length * 1, 1) >>> 0;
|
|
1049
|
-
return
|
|
1141
|
+
return R().set(r, t / 1), a = r.length, t;
|
|
1050
1142
|
}
|
|
1051
|
-
function
|
|
1143
|
+
function d(r, e, t) {
|
|
1052
1144
|
if (t === void 0) {
|
|
1053
|
-
const
|
|
1054
|
-
return
|
|
1145
|
+
const c = O.encode(r), f = e(c.length, 1) >>> 0;
|
|
1146
|
+
return R().subarray(f, f + c.length).set(c), a = c.length, f;
|
|
1055
1147
|
}
|
|
1056
|
-
let n = r.length,
|
|
1057
|
-
const
|
|
1148
|
+
let n = r.length, o = e(n, 1) >>> 0;
|
|
1149
|
+
const i = R();
|
|
1058
1150
|
let s = 0;
|
|
1059
1151
|
for (; s < n; s++) {
|
|
1060
|
-
const
|
|
1061
|
-
if (
|
|
1062
|
-
|
|
1152
|
+
const c = r.charCodeAt(s);
|
|
1153
|
+
if (c > 127) break;
|
|
1154
|
+
i[o + s] = c;
|
|
1063
1155
|
}
|
|
1064
1156
|
if (s !== n) {
|
|
1065
|
-
s !== 0 && (r = r.slice(s)),
|
|
1066
|
-
const
|
|
1067
|
-
s +=
|
|
1157
|
+
s !== 0 && (r = r.slice(s)), o = t(o, n, n = s + r.length * 3, 1) >>> 0;
|
|
1158
|
+
const c = R().subarray(o + s, o + n), f = O.encodeInto(r, c);
|
|
1159
|
+
s += f.written, o = t(o, n, s, 1) >>> 0;
|
|
1068
1160
|
}
|
|
1069
|
-
return a = s,
|
|
1161
|
+
return a = s, o;
|
|
1070
1162
|
}
|
|
1071
|
-
function
|
|
1072
|
-
const e =
|
|
1073
|
-
return
|
|
1163
|
+
function u(r) {
|
|
1164
|
+
const e = _.__wbindgen_externrefs.get(r);
|
|
1165
|
+
return _.__externref_table_dealloc(r), e;
|
|
1074
1166
|
}
|
|
1075
|
-
let
|
|
1076
|
-
|
|
1077
|
-
const
|
|
1078
|
-
let
|
|
1079
|
-
function
|
|
1080
|
-
return
|
|
1167
|
+
let z = new TextDecoder("utf-8", { ignoreBOM: !0, fatal: !0 });
|
|
1168
|
+
z.decode();
|
|
1169
|
+
const ae = 2146435072;
|
|
1170
|
+
let N = 0;
|
|
1171
|
+
function ue(r, e) {
|
|
1172
|
+
return N += e, N >= ae && (z = new TextDecoder("utf-8", { ignoreBOM: !0, fatal: !0 }), z.decode(), N = e), z.decode(R().subarray(r, r + e));
|
|
1081
1173
|
}
|
|
1082
|
-
const
|
|
1083
|
-
"encodeInto" in
|
|
1084
|
-
const t =
|
|
1174
|
+
const O = new TextEncoder();
|
|
1175
|
+
"encodeInto" in O || (O.encodeInto = function(r, e) {
|
|
1176
|
+
const t = O.encode(r);
|
|
1085
1177
|
return e.set(t), {
|
|
1086
1178
|
read: r.length,
|
|
1087
1179
|
written: t.length
|
|
1088
1180
|
};
|
|
1089
1181
|
});
|
|
1090
|
-
let a = 0,
|
|
1091
|
-
function
|
|
1092
|
-
return
|
|
1182
|
+
let a = 0, _;
|
|
1183
|
+
function de(r, e) {
|
|
1184
|
+
return _ = r.exports, S = null, j = null, E = null, _.__wbindgen_start(), _;
|
|
1093
1185
|
}
|
|
1094
|
-
function
|
|
1095
|
-
if (
|
|
1186
|
+
function fe(r) {
|
|
1187
|
+
if (_ !== void 0) return _;
|
|
1096
1188
|
r !== void 0 && (Object.getPrototypeOf(r) === Object.prototype ? { module: r } = r : console.warn("using deprecated parameters for `initSync()`; pass a single object instead"));
|
|
1097
|
-
const e =
|
|
1189
|
+
const e = ee();
|
|
1098
1190
|
r instanceof WebAssembly.Module || (r = new WebAssembly.Module(r));
|
|
1099
1191
|
const t = new WebAssembly.Instance(r, e);
|
|
1100
|
-
return
|
|
1192
|
+
return de(t);
|
|
1101
1193
|
}
|
|
1102
|
-
function
|
|
1194
|
+
function $() {
|
|
1103
1195
|
let r = 0;
|
|
1104
1196
|
const e = /* @__PURE__ */ new Map();
|
|
1105
1197
|
return {
|
|
@@ -1118,40 +1210,40 @@ ${r.stack}` : n;
|
|
|
1118
1210
|
}
|
|
1119
1211
|
};
|
|
1120
1212
|
}
|
|
1121
|
-
const
|
|
1122
|
-
function
|
|
1213
|
+
const H = Symbol("transfer");
|
|
1214
|
+
function F(r, e) {
|
|
1123
1215
|
return {
|
|
1124
|
-
type:
|
|
1216
|
+
type: H,
|
|
1125
1217
|
value: r,
|
|
1126
1218
|
transfer: e ? Array.isArray(e) ? e : [e] : [r]
|
|
1127
1219
|
};
|
|
1128
1220
|
}
|
|
1129
|
-
function
|
|
1130
|
-
return !!(r && typeof r == "object" && Reflect.get(r, "type") ===
|
|
1221
|
+
function q(r) {
|
|
1222
|
+
return !!(r && typeof r == "object" && Reflect.get(r, "type") === H);
|
|
1131
1223
|
}
|
|
1132
|
-
function
|
|
1224
|
+
function X(r = "default") {
|
|
1133
1225
|
return {
|
|
1134
1226
|
createTx(e) {
|
|
1135
1227
|
const t = /* @__PURE__ */ new Map(), n = e ?? self;
|
|
1136
|
-
return n.addEventListener("message", (
|
|
1137
|
-
const { data:
|
|
1138
|
-
if (
|
|
1228
|
+
return n.addEventListener("message", (o) => {
|
|
1229
|
+
const { data: i } = o;
|
|
1230
|
+
if (i.channelName !== r)
|
|
1139
1231
|
return;
|
|
1140
|
-
const { id: s, result:
|
|
1141
|
-
g && (
|
|
1232
|
+
const { id: s, result: c, error: f } = i, g = t.get(s);
|
|
1233
|
+
g && (f ? g.reject(f) : g.resolve(c), t.delete(s));
|
|
1142
1234
|
}), new Proxy(
|
|
1143
1235
|
{},
|
|
1144
1236
|
{
|
|
1145
|
-
get(
|
|
1237
|
+
get(o, i) {
|
|
1146
1238
|
return (...s) => {
|
|
1147
|
-
const
|
|
1239
|
+
const c = be(), f = [], g = [];
|
|
1148
1240
|
return s.forEach((v) => {
|
|
1149
|
-
|
|
1241
|
+
q(v) ? (f.push(v.value), g.push(...v.transfer)) : f.push(v);
|
|
1150
1242
|
}), n.postMessage(
|
|
1151
|
-
{ method:
|
|
1243
|
+
{ method: i, args: f, id: c, channelName: r },
|
|
1152
1244
|
{ transfer: g }
|
|
1153
|
-
), new Promise((v,
|
|
1154
|
-
t.set(
|
|
1245
|
+
), new Promise((v, K) => {
|
|
1246
|
+
t.set(c, { resolve: v, reject: K });
|
|
1155
1247
|
});
|
|
1156
1248
|
};
|
|
1157
1249
|
}
|
|
@@ -1160,218 +1252,258 @@ ${r.stack}` : n;
|
|
|
1160
1252
|
},
|
|
1161
1253
|
rx(e, t) {
|
|
1162
1254
|
const n = t ?? self;
|
|
1163
|
-
n.addEventListener("message", async (
|
|
1164
|
-
const { data:
|
|
1165
|
-
if (
|
|
1255
|
+
n.addEventListener("message", async (o) => {
|
|
1256
|
+
const { data: i } = o;
|
|
1257
|
+
if (i.channelName !== r)
|
|
1166
1258
|
return;
|
|
1167
|
-
const { method: s, args:
|
|
1259
|
+
const { method: s, args: c, id: f } = i;
|
|
1168
1260
|
try {
|
|
1169
|
-
const g = await e[s](...
|
|
1170
|
-
|
|
1171
|
-
{ result: g.value, id:
|
|
1261
|
+
const g = await e[s](...c);
|
|
1262
|
+
q(g) ? n.postMessage(
|
|
1263
|
+
{ result: g.value, id: f, channelName: r },
|
|
1172
1264
|
{ transfer: g.transfer }
|
|
1173
|
-
) : n.postMessage({ result: g, id:
|
|
1265
|
+
) : n.postMessage({ result: g, id: f, channelName: r });
|
|
1174
1266
|
} catch (g) {
|
|
1175
|
-
n.postMessage({ error: g, id:
|
|
1267
|
+
n.postMessage({ error: g, id: f, channelName: r });
|
|
1176
1268
|
}
|
|
1177
1269
|
});
|
|
1178
1270
|
}
|
|
1179
1271
|
};
|
|
1180
1272
|
}
|
|
1181
|
-
function
|
|
1273
|
+
function be() {
|
|
1182
1274
|
return new Array(4).fill(0).map(() => Math.floor(Math.random() * Number.MAX_SAFE_INTEGER).toString(16)).join("-");
|
|
1183
1275
|
}
|
|
1184
|
-
const { rx:
|
|
1185
|
-
function
|
|
1276
|
+
const le = 16, ge = "context-missing", { rx: we } = X(), { createTx: me } = X("worker");
|
|
1277
|
+
function pe(r) {
|
|
1186
1278
|
if (!(r != null && r.manifests))
|
|
1187
1279
|
return r;
|
|
1188
1280
|
const e = r.manifests, t = Object.assign(/* @__PURE__ */ Object.create(null), e), n = Object.getPrototypeOf(e);
|
|
1189
1281
|
return n !== null && n !== Object.prototype && (t.__proto__ = n), r.manifests = t, r;
|
|
1190
1282
|
}
|
|
1191
|
-
const
|
|
1192
|
-
function
|
|
1283
|
+
const h = $(), b = $(), B = /* @__PURE__ */ new Map(), U = me();
|
|
1284
|
+
function ye(r) {
|
|
1285
|
+
const e = B.get(r.id);
|
|
1286
|
+
if (e !== void 0)
|
|
1287
|
+
return e;
|
|
1288
|
+
if (r.json !== void 0) {
|
|
1289
|
+
const t = new M(r.json);
|
|
1290
|
+
if (B.size === le) {
|
|
1291
|
+
const n = B.entries().next().value;
|
|
1292
|
+
if (n !== void 0) {
|
|
1293
|
+
const [o, i] = n;
|
|
1294
|
+
i.free(), B.delete(o);
|
|
1295
|
+
}
|
|
1296
|
+
}
|
|
1297
|
+
return B.set(r.id, t), t;
|
|
1298
|
+
}
|
|
1299
|
+
}
|
|
1300
|
+
async function T(r, e) {
|
|
1301
|
+
const t = ye(r);
|
|
1302
|
+
if (t === void 0)
|
|
1303
|
+
return ge;
|
|
1304
|
+
try {
|
|
1305
|
+
return await e(t);
|
|
1306
|
+
} finally {
|
|
1307
|
+
r.json !== void 0 && await U.context_registered(r.id);
|
|
1308
|
+
}
|
|
1309
|
+
}
|
|
1310
|
+
function G(r) {
|
|
1193
1311
|
return r.map((e) => ({
|
|
1194
1312
|
sigType: e.sigType,
|
|
1195
1313
|
reserveSize: e.reserveSize,
|
|
1196
1314
|
referencedAssertions: e.referencedAssertions,
|
|
1197
1315
|
roles: e.roles,
|
|
1198
1316
|
sign: async (t) => {
|
|
1199
|
-
const n = t.referencedAssertions.map((
|
|
1200
|
-
return await
|
|
1317
|
+
const n = t.referencedAssertions.map((i) => i.hash.buffer);
|
|
1318
|
+
return await U.cawgSign(e.requestId, F(t, n));
|
|
1201
1319
|
}
|
|
1202
1320
|
}));
|
|
1203
1321
|
}
|
|
1204
|
-
|
|
1205
|
-
|
|
1322
|
+
we(
|
|
1323
|
+
he({
|
|
1206
1324
|
async initWorker(r) {
|
|
1207
|
-
|
|
1325
|
+
fe({ module: r });
|
|
1208
1326
|
},
|
|
1209
1327
|
encodeSignerPayload(r) {
|
|
1210
|
-
const e =
|
|
1211
|
-
return
|
|
1328
|
+
const e = Z(r);
|
|
1329
|
+
return F(e, e.buffer);
|
|
1212
1330
|
},
|
|
1213
1331
|
async reader_fromBlob(r, e, t) {
|
|
1214
|
-
|
|
1215
|
-
|
|
1332
|
+
return T(
|
|
1333
|
+
t,
|
|
1334
|
+
async (n) => h.add(
|
|
1335
|
+
await I.fromBlobWithContext(r, e, n)
|
|
1336
|
+
)
|
|
1337
|
+
);
|
|
1216
1338
|
},
|
|
1217
1339
|
async reader_fromBlobFragment(r, e, t, n) {
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1340
|
+
return T(
|
|
1341
|
+
n,
|
|
1342
|
+
async (o) => h.add(
|
|
1343
|
+
await I.fromBlobFragmentWithContext(
|
|
1344
|
+
r,
|
|
1345
|
+
e,
|
|
1346
|
+
t,
|
|
1347
|
+
o
|
|
1348
|
+
)
|
|
1349
|
+
)
|
|
1223
1350
|
);
|
|
1224
|
-
return y.add(_);
|
|
1225
1351
|
},
|
|
1226
1352
|
reader_activeLabel(r) {
|
|
1227
|
-
return
|
|
1353
|
+
return h.get(r).activeLabel() ?? null;
|
|
1228
1354
|
},
|
|
1229
1355
|
reader_manifestStore(r) {
|
|
1230
|
-
const e =
|
|
1231
|
-
return
|
|
1356
|
+
const e = h.get(r);
|
|
1357
|
+
return pe(e.manifestStore());
|
|
1232
1358
|
},
|
|
1233
1359
|
reader_activeManifest(r) {
|
|
1234
|
-
return
|
|
1360
|
+
return h.get(r).activeManifest();
|
|
1235
1361
|
},
|
|
1236
1362
|
reader_json(r) {
|
|
1237
|
-
return
|
|
1363
|
+
return h.get(r).json();
|
|
1238
1364
|
},
|
|
1239
1365
|
reader_crJson(r) {
|
|
1240
|
-
return
|
|
1366
|
+
return h.get(r).crJson();
|
|
1241
1367
|
},
|
|
1242
1368
|
reader_resourceToBytes(r, e) {
|
|
1243
|
-
const n =
|
|
1244
|
-
return
|
|
1369
|
+
const n = h.get(r).resourceToBytes(e);
|
|
1370
|
+
return F(n, n.buffer);
|
|
1245
1371
|
},
|
|
1246
1372
|
reader_free(r) {
|
|
1247
|
-
|
|
1373
|
+
h.get(r).free(), h.remove(r);
|
|
1248
1374
|
},
|
|
1249
|
-
builder_new(r) {
|
|
1250
|
-
|
|
1251
|
-
|
|
1375
|
+
async builder_new(r) {
|
|
1376
|
+
return T(
|
|
1377
|
+
r,
|
|
1378
|
+
(e) => b.add(p.newWithContext(e))
|
|
1379
|
+
);
|
|
1252
1380
|
},
|
|
1253
|
-
builder_fromJson(r, e) {
|
|
1254
|
-
|
|
1255
|
-
|
|
1381
|
+
async builder_fromJson(r, e) {
|
|
1382
|
+
return T(
|
|
1383
|
+
e,
|
|
1384
|
+
(t) => b.add(p.fromJsonWithContext(r, t))
|
|
1385
|
+
);
|
|
1256
1386
|
},
|
|
1257
|
-
builder_fromArchive(r, e) {
|
|
1258
|
-
|
|
1259
|
-
|
|
1387
|
+
async builder_fromArchive(r, e) {
|
|
1388
|
+
return T(
|
|
1389
|
+
e,
|
|
1390
|
+
(t) => b.add(p.fromArchiveWithContext(r, t))
|
|
1391
|
+
);
|
|
1260
1392
|
},
|
|
1261
1393
|
builder_setIntent(r, e) {
|
|
1262
|
-
|
|
1394
|
+
b.get(r).setIntent(e);
|
|
1263
1395
|
},
|
|
1264
1396
|
builder_addAction(r, e) {
|
|
1265
|
-
|
|
1397
|
+
b.get(r).addAction(e);
|
|
1266
1398
|
},
|
|
1267
1399
|
builder_addAssertion(r, e, t) {
|
|
1268
|
-
|
|
1400
|
+
b.get(r).addAssertion(e, t);
|
|
1269
1401
|
},
|
|
1270
1402
|
builder_updateAssertionsAt(r, e, t) {
|
|
1271
|
-
|
|
1403
|
+
b.get(r).updateAssertionsAt(e, t);
|
|
1272
1404
|
},
|
|
1273
1405
|
builder_addRedaction(r, e, t) {
|
|
1274
|
-
|
|
1406
|
+
b.get(r).addRedaction(e, t);
|
|
1275
1407
|
},
|
|
1276
1408
|
builder_filterActionsAt(r, e) {
|
|
1277
|
-
|
|
1409
|
+
b.get(r).filterActionsAt(Uint32Array.from(e));
|
|
1278
1410
|
},
|
|
1279
1411
|
builder_updateActionsAt(r, e) {
|
|
1280
|
-
|
|
1412
|
+
b.get(r).updateActionsAt(e);
|
|
1281
1413
|
},
|
|
1282
1414
|
builder_filterIngredientsAt(r, e) {
|
|
1283
|
-
|
|
1415
|
+
b.get(r).filterIngredientsAt(Uint32Array.from(e));
|
|
1284
1416
|
},
|
|
1285
1417
|
builder_filterActionsAndIngredientsAt(r, e, t) {
|
|
1286
|
-
|
|
1418
|
+
b.get(r).filterActionsAndIngredientsAt(
|
|
1287
1419
|
Uint32Array.from(e),
|
|
1288
1420
|
Uint32Array.from(t)
|
|
1289
1421
|
);
|
|
1290
1422
|
},
|
|
1291
1423
|
builder_setRemoteUrl(r, e) {
|
|
1292
|
-
|
|
1424
|
+
b.get(r).setRemoteUrl(e);
|
|
1293
1425
|
},
|
|
1294
1426
|
builder_setNoEmbed(r, e) {
|
|
1295
|
-
|
|
1427
|
+
b.get(r).setNoEmbed(e);
|
|
1296
1428
|
},
|
|
1297
1429
|
builder_updateManifestProperty(r, e, t) {
|
|
1298
|
-
|
|
1430
|
+
b.get(r).updateManifestProperty(e, t);
|
|
1299
1431
|
},
|
|
1300
1432
|
builder_setThumbnailFromBlob(r, e, t) {
|
|
1301
|
-
|
|
1433
|
+
b.get(r).setThumbnailFromBlob(e, t);
|
|
1302
1434
|
},
|
|
1303
1435
|
builder_addIngredient(r, e) {
|
|
1304
|
-
|
|
1436
|
+
b.get(r).addIngredient(e);
|
|
1305
1437
|
},
|
|
1306
1438
|
async builder_addIngredientFromBlob(r, e, t, n) {
|
|
1307
|
-
await
|
|
1439
|
+
await b.get(r).addIngredientFromBlob(e, t, n);
|
|
1308
1440
|
},
|
|
1309
1441
|
builder_addResourceFromBlob(r, e, t) {
|
|
1310
|
-
|
|
1442
|
+
b.get(r).addResourceFromBlob(e, t);
|
|
1311
1443
|
},
|
|
1312
1444
|
builder_getDefinition(r) {
|
|
1313
|
-
return
|
|
1445
|
+
return b.get(r).getDefinition();
|
|
1314
1446
|
},
|
|
1315
1447
|
builder_toArchive(r) {
|
|
1316
|
-
const t =
|
|
1317
|
-
return
|
|
1448
|
+
const t = b.get(r).toArchive();
|
|
1449
|
+
return F(t, t.buffer);
|
|
1318
1450
|
},
|
|
1319
|
-
async builder_sign(r, e, t, n,
|
|
1320
|
-
const
|
|
1451
|
+
async builder_sign(r, e, t, n, o, i) {
|
|
1452
|
+
const c = await b.get(r).sign(
|
|
1321
1453
|
{
|
|
1322
1454
|
reserveSize: t.reserveSize,
|
|
1323
1455
|
alg: t.alg,
|
|
1324
|
-
sign: async (
|
|
1456
|
+
sign: async (f) => await U.sign(
|
|
1325
1457
|
e,
|
|
1326
|
-
|
|
1458
|
+
F(f, f.buffer),
|
|
1327
1459
|
t.reserveSize
|
|
1328
1460
|
)
|
|
1329
1461
|
},
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1462
|
+
G(n),
|
|
1463
|
+
o,
|
|
1464
|
+
i
|
|
1333
1465
|
);
|
|
1334
|
-
return
|
|
1466
|
+
return F(c, c.buffer);
|
|
1335
1467
|
},
|
|
1336
|
-
async builder_signAndGetManifestBytes(r, e, t, n,
|
|
1337
|
-
const s =
|
|
1468
|
+
async builder_signAndGetManifestBytes(r, e, t, n, o, i) {
|
|
1469
|
+
const s = b.get(r), { manifest: c, asset: f } = await s.signAndGetManifestBytes(
|
|
1338
1470
|
{
|
|
1339
1471
|
reserveSize: t.reserveSize,
|
|
1340
1472
|
alg: t.alg,
|
|
1341
|
-
sign: async (g) => await
|
|
1473
|
+
sign: async (g) => await U.sign(
|
|
1342
1474
|
e,
|
|
1343
|
-
|
|
1475
|
+
F(g, g.buffer),
|
|
1344
1476
|
t.reserveSize
|
|
1345
1477
|
)
|
|
1346
1478
|
},
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1479
|
+
G(n),
|
|
1480
|
+
o,
|
|
1481
|
+
i
|
|
1350
1482
|
);
|
|
1351
|
-
return
|
|
1483
|
+
return F(
|
|
1352
1484
|
{
|
|
1353
|
-
manifest:
|
|
1354
|
-
asset:
|
|
1485
|
+
manifest: c,
|
|
1486
|
+
asset: f
|
|
1355
1487
|
},
|
|
1356
|
-
[
|
|
1488
|
+
[c.buffer, f.buffer]
|
|
1357
1489
|
);
|
|
1358
1490
|
},
|
|
1359
1491
|
builder_free(r) {
|
|
1360
|
-
|
|
1492
|
+
b.get(r).free(), b.remove(r);
|
|
1361
1493
|
}
|
|
1362
1494
|
})
|
|
1363
1495
|
);
|
|
1364
|
-
function
|
|
1496
|
+
function he(r) {
|
|
1365
1497
|
const e = {};
|
|
1366
1498
|
for (const [t, n] of Object.entries(r))
|
|
1367
|
-
e[t] = async (...
|
|
1499
|
+
e[t] = async (...o) => {
|
|
1368
1500
|
try {
|
|
1369
|
-
return await n(...
|
|
1370
|
-
} catch (
|
|
1371
|
-
throw typeof
|
|
1501
|
+
return await n(...o);
|
|
1502
|
+
} catch (i) {
|
|
1503
|
+
throw typeof i == "string" ? new Error(i) : i;
|
|
1372
1504
|
}
|
|
1373
1505
|
};
|
|
1374
1506
|
return e;
|
|
1375
1507
|
}
|
|
1376
1508
|
});
|
|
1377
|
-
export default
|
|
1509
|
+
export default Ae();
|