@contentauth/c2pa-web 0.12.3 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/c2pa-B5kyABlZ.js +466 -0
- package/dist/c2pa_worker.js +242 -192
- package/dist/index.js +1 -1
- package/dist/inline.js +4 -4
- package/dist/lib/builder.d.ts +28 -0
- package/dist/lib/builder.d.ts.map +1 -1
- package/dist/lib/settings.d.ts +1 -0
- package/dist/lib/settings.d.ts.map +1 -1
- package/dist/lib/worker/rpc.d.ts +4 -0
- package/dist/lib/worker/rpc.d.ts.map +1 -1
- package/dist/resources/c2pa_bg.wasm +0 -0
- package/package.json +3 -3
- package/dist/c2pa-LNRKNp10.js +0 -404
package/dist/c2pa_worker.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var G = (r, e) => () => (e || r((e = { exports: {} }).exports, e), e.exports);
|
|
2
|
+
var fe = G((de, C) => {
|
|
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, U.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, U.unregister(this), e;
|
|
11
11
|
}
|
|
12
12
|
free() {
|
|
13
13
|
const e = this.__destroy_into_raw();
|
|
@@ -20,7 +20,7 @@ var ie = C((ue, q) => {
|
|
|
20
20
|
addAction(e) {
|
|
21
21
|
const t = o.wasmbuilder_addAction(this.__wbg_ptr, e);
|
|
22
22
|
if (t[1])
|
|
23
|
-
throw
|
|
23
|
+
throw f(t[0]);
|
|
24
24
|
}
|
|
25
25
|
/**
|
|
26
26
|
* Add an ingredient to the manifest from a JSON ingredient definition without a blob
|
|
@@ -30,9 +30,9 @@ var ie = C((ue, q) => {
|
|
|
30
30
|
* @param {string} json
|
|
31
31
|
*/
|
|
32
32
|
addIngredient(e) {
|
|
33
|
-
const t =
|
|
33
|
+
const t = b(e, o.__wbindgen_malloc, o.__wbindgen_realloc), n = a, _ = o.wasmbuilder_addIngredient(this.__wbg_ptr, t, n);
|
|
34
34
|
if (_[1])
|
|
35
|
-
throw
|
|
35
|
+
throw f(_[0]);
|
|
36
36
|
}
|
|
37
37
|
/**
|
|
38
38
|
* Add an ingredient to the manifest from a JSON ingredient definition and a [`Blob`].
|
|
@@ -47,8 +47,8 @@ var ie = C((ue, q) => {
|
|
|
47
47
|
* @returns {Promise<void>}
|
|
48
48
|
*/
|
|
49
49
|
addIngredientFromBlob(e, t, n) {
|
|
50
|
-
const _ =
|
|
51
|
-
return o.wasmbuilder_addIngredientFromBlob(this.__wbg_ptr, _, c,
|
|
50
|
+
const _ = b(e, o.__wbindgen_malloc, o.__wbindgen_realloc), c = a, i = b(t, o.__wbindgen_malloc, o.__wbindgen_realloc), s = a;
|
|
51
|
+
return o.wasmbuilder_addIngredientFromBlob(this.__wbg_ptr, _, c, i, s, n);
|
|
52
52
|
}
|
|
53
53
|
/**
|
|
54
54
|
* Add a redaction for a JUMBF URI with the given reason.
|
|
@@ -59,9 +59,9 @@ var ie = C((ue, q) => {
|
|
|
59
59
|
* @param {any} reason
|
|
60
60
|
*/
|
|
61
61
|
addRedaction(e, t) {
|
|
62
|
-
const n =
|
|
62
|
+
const n = b(e, o.__wbindgen_malloc, o.__wbindgen_realloc), _ = a, c = o.wasmbuilder_addRedaction(this.__wbg_ptr, n, _, t);
|
|
63
63
|
if (c[1])
|
|
64
|
-
throw
|
|
64
|
+
throw f(c[0]);
|
|
65
65
|
}
|
|
66
66
|
/**
|
|
67
67
|
* Add a [`Blob`] to the manifest as a resource. The ID must match an identifier in the manifest.
|
|
@@ -69,9 +69,45 @@ var ie = C((ue, q) => {
|
|
|
69
69
|
* @param {Blob} blob
|
|
70
70
|
*/
|
|
71
71
|
addResourceFromBlob(e, t) {
|
|
72
|
-
const n =
|
|
72
|
+
const n = b(e, o.__wbindgen_malloc, o.__wbindgen_realloc), _ = a, c = o.wasmbuilder_addResourceFromBlob(this.__wbg_ptr, n, _, t);
|
|
73
73
|
if (c[1])
|
|
74
|
-
throw
|
|
74
|
+
throw f(c[0]);
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Retains only the actions at the given 0-based indices into the actions currently returned
|
|
78
|
+
* by [`Self::get_definition`]'s `c2pa.actions` assertion.
|
|
79
|
+
*
|
|
80
|
+
* The inception action, `c2pa.created` or `c2pa.opened`, is always kept regardless of
|
|
81
|
+
* `indices`, and is moved to index 0 if needed, so the manifest stays valid per the C2PA
|
|
82
|
+
* spec. Sets `allActionsIncluded = false` when anything is removed.
|
|
83
|
+
*
|
|
84
|
+
* Indices are resolved on the JS side, rather than accepting a predicate here, because the
|
|
85
|
+
* builder lives in a worker and JS callbacks can't be invoked synchronously across that
|
|
86
|
+
* boundary.
|
|
87
|
+
*
|
|
88
|
+
* This does not touch ingredients. Call [`Self::filter_ingredients_at`] with an empty list
|
|
89
|
+
* to drop all orphans afterwards if you also want to drop ingredients now orphaned by the
|
|
90
|
+
* removed actions.
|
|
91
|
+
* @param {Uint32Array} indices
|
|
92
|
+
*/
|
|
93
|
+
filterActionsAt(e) {
|
|
94
|
+
const t = J(e, o.__wbindgen_malloc), n = a, _ = o.wasmbuilder_filterActionsAt(this.__wbg_ptr, t, n);
|
|
95
|
+
if (_[1])
|
|
96
|
+
throw f(_[0]);
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Retains ingredients, rescuing an otherwise-orphaned ingredient when its 0-based index into
|
|
100
|
+
* [`Self::get_definition`]'s `ingredients` array is present in `indices`. Referenced and
|
|
101
|
+
* `parentOf` ingredients are always kept, per `Builder::filter_ingredients`; `indices` can
|
|
102
|
+
* only rescue an orphan, never drop a referenced or lineage ingredient.
|
|
103
|
+
*
|
|
104
|
+
* See [`Self::filter_actions_at`] for why this takes indices rather than a predicate.
|
|
105
|
+
* @param {Uint32Array} indices
|
|
106
|
+
*/
|
|
107
|
+
filterIngredientsAt(e) {
|
|
108
|
+
const t = J(e, o.__wbindgen_malloc), n = a, _ = o.wasmbuilder_filterIngredientsAt(this.__wbg_ptr, t, n);
|
|
109
|
+
if (_[1])
|
|
110
|
+
throw f(_[0]);
|
|
75
111
|
}
|
|
76
112
|
/**
|
|
77
113
|
* Attempts to create a new `WasmBuilder` from a builder archive.
|
|
@@ -81,10 +117,10 @@ var ie = C((ue, q) => {
|
|
|
81
117
|
* @returns {WasmBuilder}
|
|
82
118
|
*/
|
|
83
119
|
static fromArchive(e, t) {
|
|
84
|
-
var n = w(t) ? 0 :
|
|
120
|
+
var n = w(t) ? 0 : b(t, o.__wbindgen_malloc, o.__wbindgen_realloc), _ = a;
|
|
85
121
|
const c = o.wasmbuilder_fromArchive(e, n, _);
|
|
86
122
|
if (c[2])
|
|
87
|
-
throw
|
|
123
|
+
throw f(c[1]);
|
|
88
124
|
return h.__wrap(c[0]);
|
|
89
125
|
}
|
|
90
126
|
/**
|
|
@@ -95,12 +131,12 @@ var ie = C((ue, q) => {
|
|
|
95
131
|
* @returns {WasmBuilder}
|
|
96
132
|
*/
|
|
97
133
|
static fromJson(e, t) {
|
|
98
|
-
const n =
|
|
99
|
-
var c = w(t) ? 0 :
|
|
100
|
-
const
|
|
101
|
-
if (
|
|
102
|
-
throw
|
|
103
|
-
return h.__wrap(
|
|
134
|
+
const n = b(e, o.__wbindgen_malloc, o.__wbindgen_realloc), _ = a;
|
|
135
|
+
var c = w(t) ? 0 : b(t, o.__wbindgen_malloc, o.__wbindgen_realloc), i = a;
|
|
136
|
+
const s = o.wasmbuilder_fromJson(n, _, c, i);
|
|
137
|
+
if (s[2])
|
|
138
|
+
throw f(s[1]);
|
|
139
|
+
return h.__wrap(s[0]);
|
|
104
140
|
}
|
|
105
141
|
/**
|
|
106
142
|
* Get the current manifest definition.
|
|
@@ -109,8 +145,8 @@ var ie = C((ue, q) => {
|
|
|
109
145
|
getDefinition() {
|
|
110
146
|
const e = o.wasmbuilder_getDefinition(this.__wbg_ptr);
|
|
111
147
|
if (e[2])
|
|
112
|
-
throw
|
|
113
|
-
return
|
|
148
|
+
throw f(e[1]);
|
|
149
|
+
return f(e[0]);
|
|
114
150
|
}
|
|
115
151
|
/**
|
|
116
152
|
* Creates a new `WasmBuilder` with a minimal manifest definition.
|
|
@@ -119,10 +155,10 @@ var ie = C((ue, q) => {
|
|
|
119
155
|
* @returns {WasmBuilder}
|
|
120
156
|
*/
|
|
121
157
|
static new(e) {
|
|
122
|
-
var t = w(e) ? 0 :
|
|
158
|
+
var t = w(e) ? 0 : b(e, o.__wbindgen_malloc, o.__wbindgen_realloc), n = a;
|
|
123
159
|
const _ = o.wasmbuilder_new(t, n);
|
|
124
160
|
if (_[2])
|
|
125
|
-
throw
|
|
161
|
+
throw f(_[1]);
|
|
126
162
|
return h.__wrap(_[0]);
|
|
127
163
|
}
|
|
128
164
|
/**
|
|
@@ -132,7 +168,7 @@ var ie = C((ue, q) => {
|
|
|
132
168
|
setIntent(e) {
|
|
133
169
|
const t = o.wasmbuilder_setIntent(this.__wbg_ptr, e);
|
|
134
170
|
if (t[1])
|
|
135
|
-
throw
|
|
171
|
+
throw f(t[0]);
|
|
136
172
|
}
|
|
137
173
|
/**
|
|
138
174
|
* Sets the state of the no_embed flag.
|
|
@@ -149,7 +185,7 @@ var ie = C((ue, q) => {
|
|
|
149
185
|
* @param {string} url
|
|
150
186
|
*/
|
|
151
187
|
setRemoteUrl(e) {
|
|
152
|
-
const t =
|
|
188
|
+
const t = b(e, o.__wbindgen_malloc, o.__wbindgen_realloc), n = a;
|
|
153
189
|
o.wasmbuilder_setRemoteUrl(this.__wbg_ptr, t, n);
|
|
154
190
|
}
|
|
155
191
|
/**
|
|
@@ -158,9 +194,9 @@ var ie = C((ue, q) => {
|
|
|
158
194
|
* @param {Blob} blob
|
|
159
195
|
*/
|
|
160
196
|
setThumbnailFromBlob(e, t) {
|
|
161
|
-
const n =
|
|
197
|
+
const n = b(e, o.__wbindgen_malloc, o.__wbindgen_realloc), _ = a, c = o.wasmbuilder_setThumbnailFromBlob(this.__wbg_ptr, n, _, t);
|
|
162
198
|
if (c[1])
|
|
163
|
-
throw
|
|
199
|
+
throw f(c[0]);
|
|
164
200
|
}
|
|
165
201
|
/**
|
|
166
202
|
* Sign an asset using the provided SignerDefinition, format, and source Blob.
|
|
@@ -170,7 +206,7 @@ var ie = C((ue, q) => {
|
|
|
170
206
|
* @returns {Promise<Uint8Array>}
|
|
171
207
|
*/
|
|
172
208
|
sign(e, t, n) {
|
|
173
|
-
const _ =
|
|
209
|
+
const _ = b(t, o.__wbindgen_malloc, o.__wbindgen_realloc), c = a;
|
|
174
210
|
return o.wasmbuilder_sign(this.__wbg_ptr, e, _, c, n);
|
|
175
211
|
}
|
|
176
212
|
/**
|
|
@@ -182,7 +218,7 @@ var ie = C((ue, q) => {
|
|
|
182
218
|
* @returns {Promise<any>}
|
|
183
219
|
*/
|
|
184
220
|
signAndGetManifestBytes(e, t, n) {
|
|
185
|
-
const _ =
|
|
221
|
+
const _ = b(t, o.__wbindgen_malloc, o.__wbindgen_realloc), c = a;
|
|
186
222
|
return o.wasmbuilder_signAndGetManifestBytes(this.__wbg_ptr, e, _, c, n);
|
|
187
223
|
}
|
|
188
224
|
/**
|
|
@@ -192,8 +228,8 @@ var ie = C((ue, q) => {
|
|
|
192
228
|
toArchive() {
|
|
193
229
|
const e = o.wasmbuilder_toArchive(this.__wbg_ptr);
|
|
194
230
|
if (e[2])
|
|
195
|
-
throw
|
|
196
|
-
return
|
|
231
|
+
throw f(e[1]);
|
|
232
|
+
return f(e[0]);
|
|
197
233
|
}
|
|
198
234
|
}
|
|
199
235
|
Symbol.dispose && (h.prototype[Symbol.dispose] = h.prototype.free);
|
|
@@ -226,8 +262,8 @@ var ie = C((ue, q) => {
|
|
|
226
262
|
activeManifest() {
|
|
227
263
|
const e = o.wasmreader_activeManifest(this.__wbg_ptr);
|
|
228
264
|
if (e[2])
|
|
229
|
-
throw
|
|
230
|
-
return
|
|
265
|
+
throw f(e[1]);
|
|
266
|
+
return f(e[0]);
|
|
231
267
|
}
|
|
232
268
|
/**
|
|
233
269
|
* Returns the asset's manifest store as crJSON.
|
|
@@ -251,9 +287,9 @@ var ie = C((ue, q) => {
|
|
|
251
287
|
* @returns {Promise<WasmReader>}
|
|
252
288
|
*/
|
|
253
289
|
static fromBlob(e, t, n) {
|
|
254
|
-
const _ =
|
|
255
|
-
var
|
|
256
|
-
return o.wasmreader_fromBlob(_, c, t,
|
|
290
|
+
const _ = b(e, o.__wbindgen_malloc, o.__wbindgen_realloc), c = a;
|
|
291
|
+
var i = w(n) ? 0 : b(n, o.__wbindgen_malloc, o.__wbindgen_realloc), s = a;
|
|
292
|
+
return o.wasmreader_fromBlob(_, c, t, i, s);
|
|
257
293
|
}
|
|
258
294
|
/**
|
|
259
295
|
* Attempts to create a new `WasmReader` from an asset format, a `Blob` of the bytes of the initial segment, and a fragment `Blob`.
|
|
@@ -265,9 +301,9 @@ var ie = C((ue, q) => {
|
|
|
265
301
|
* @returns {Promise<WasmReader>}
|
|
266
302
|
*/
|
|
267
303
|
static fromBlobFragment(e, t, n, _) {
|
|
268
|
-
const c =
|
|
269
|
-
var
|
|
270
|
-
return o.wasmreader_fromBlobFragment(c,
|
|
304
|
+
const c = b(e, o.__wbindgen_malloc, o.__wbindgen_realloc), i = a;
|
|
305
|
+
var s = w(_) ? 0 : b(_, o.__wbindgen_malloc, o.__wbindgen_realloc), u = a;
|
|
306
|
+
return o.wasmreader_fromBlobFragment(c, i, t, n, s, u);
|
|
271
307
|
}
|
|
272
308
|
/**
|
|
273
309
|
* Returns a JSON representation of the asset's manifest store.
|
|
@@ -289,8 +325,8 @@ var ie = C((ue, q) => {
|
|
|
289
325
|
manifestStore() {
|
|
290
326
|
const e = o.wasmreader_manifestStore(this.__wbg_ptr);
|
|
291
327
|
if (e[2])
|
|
292
|
-
throw
|
|
293
|
-
return
|
|
328
|
+
throw f(e[1]);
|
|
329
|
+
return f(e[0]);
|
|
294
330
|
}
|
|
295
331
|
/**
|
|
296
332
|
* Accepts a URI reference to a binary object in the resource store and returns a `js_sys::Uint8Array` containing the resource's bytes.
|
|
@@ -298,19 +334,19 @@ var ie = C((ue, q) => {
|
|
|
298
334
|
* @returns {Uint8Array}
|
|
299
335
|
*/
|
|
300
336
|
resourceToBytes(e) {
|
|
301
|
-
const t =
|
|
337
|
+
const t = b(e, o.__wbindgen_malloc, o.__wbindgen_realloc), n = a, _ = o.wasmreader_resourceToBytes(this.__wbg_ptr, t, n);
|
|
302
338
|
if (_[2])
|
|
303
|
-
throw
|
|
304
|
-
return
|
|
339
|
+
throw f(_[1]);
|
|
340
|
+
return f(_[0]);
|
|
305
341
|
}
|
|
306
342
|
}
|
|
307
343
|
Symbol.dispose && (F.prototype[Symbol.dispose] = F.prototype.free);
|
|
308
|
-
function
|
|
309
|
-
const e =
|
|
344
|
+
function $(r) {
|
|
345
|
+
const e = b(r, o.__wbindgen_malloc, o.__wbindgen_realloc), t = a, n = o.loadSettings(e, t);
|
|
310
346
|
if (n[1])
|
|
311
|
-
throw
|
|
347
|
+
throw f(n[0]);
|
|
312
348
|
}
|
|
313
|
-
function
|
|
349
|
+
function H() {
|
|
314
350
|
return {
|
|
315
351
|
__proto__: null,
|
|
316
352
|
"./c2pa_bg.js": {
|
|
@@ -330,7 +366,7 @@ var ie = C((ue, q) => {
|
|
|
330
366
|
return w(n) ? 16777215 : n ? 1 : 0;
|
|
331
367
|
},
|
|
332
368
|
__wbg___wbindgen_debug_string_0accd80f45e5faa2: function(e, t) {
|
|
333
|
-
const n =
|
|
369
|
+
const n = x(t), _ = b(n, o.__wbindgen_malloc, o.__wbindgen_realloc), c = a;
|
|
334
370
|
m().setInt32(e + 4, c, !0), m().setInt32(e + 0, _, !0);
|
|
335
371
|
},
|
|
336
372
|
__wbg___wbindgen_in_70a403a56e771704: function(e, t) {
|
|
@@ -364,8 +400,8 @@ var ie = C((ue, q) => {
|
|
|
364
400
|
},
|
|
365
401
|
__wbg___wbindgen_string_get_72bdf95d3ae505b1: function(e, t) {
|
|
366
402
|
const n = t, _ = typeof n == "string" ? n : void 0;
|
|
367
|
-
var c = w(_) ? 0 :
|
|
368
|
-
m().setInt32(e + 4,
|
|
403
|
+
var c = w(_) ? 0 : b(_, o.__wbindgen_malloc, o.__wbindgen_realloc), i = a;
|
|
404
|
+
m().setInt32(e + 4, i, !0), m().setInt32(e + 0, c, !0);
|
|
369
405
|
},
|
|
370
406
|
__wbg___wbindgen_throw_1506f2235d1bdba0: function(e, t) {
|
|
371
407
|
throw new Error(y(e, t));
|
|
@@ -380,12 +416,12 @@ var ie = C((ue, q) => {
|
|
|
380
416
|
e.abort(t);
|
|
381
417
|
},
|
|
382
418
|
__wbg_append_e1746995edcb0170: function() {
|
|
383
|
-
return
|
|
419
|
+
return d(function(e, t, n, _, c) {
|
|
384
420
|
e.append(y(t, n), y(_, c));
|
|
385
421
|
}, arguments);
|
|
386
422
|
},
|
|
387
423
|
__wbg_arrayBuffer_05927079aabe6d46: function() {
|
|
388
|
-
return
|
|
424
|
+
return d(function(e) {
|
|
389
425
|
return e.arrayBuffer();
|
|
390
426
|
}, arguments);
|
|
391
427
|
},
|
|
@@ -393,12 +429,12 @@ var ie = C((ue, q) => {
|
|
|
393
429
|
return e.byteLength;
|
|
394
430
|
},
|
|
395
431
|
__wbg_call_8a89609d89f6608a: function() {
|
|
396
|
-
return
|
|
432
|
+
return d(function(e, t) {
|
|
397
433
|
return e.call(t);
|
|
398
434
|
}, arguments);
|
|
399
435
|
},
|
|
400
436
|
__wbg_call_9c758de292015997: function() {
|
|
401
|
-
return
|
|
437
|
+
return d(function(e, t, n) {
|
|
402
438
|
return e.call(t, n);
|
|
403
439
|
}, arguments);
|
|
404
440
|
},
|
|
@@ -432,22 +468,22 @@ var ie = C((ue, q) => {
|
|
|
432
468
|
return Array.from(e);
|
|
433
469
|
},
|
|
434
470
|
__wbg_getRandomValues_3f44b700395062e5: function() {
|
|
435
|
-
return
|
|
436
|
-
globalThis.crypto.getRandomValues(
|
|
471
|
+
return d(function(e, t) {
|
|
472
|
+
globalThis.crypto.getRandomValues(A(e, t));
|
|
437
473
|
}, arguments);
|
|
438
474
|
},
|
|
439
475
|
__wbg_getRandomValues_76dfc69825c9c552: function() {
|
|
440
|
-
return
|
|
441
|
-
globalThis.crypto.getRandomValues(
|
|
476
|
+
return d(function(e, t) {
|
|
477
|
+
globalThis.crypto.getRandomValues(A(e, t));
|
|
442
478
|
}, arguments);
|
|
443
479
|
},
|
|
444
480
|
__wbg_getRandomValues_8aa3112c6615eef6: function() {
|
|
445
|
-
return
|
|
446
|
-
globalThis.crypto.getRandomValues(
|
|
481
|
+
return d(function(e, t) {
|
|
482
|
+
globalThis.crypto.getRandomValues(A(e, t));
|
|
447
483
|
}, arguments);
|
|
448
484
|
},
|
|
449
485
|
__wbg_getRandomValues_c44a50d8cfdaebeb: function() {
|
|
450
|
-
return
|
|
486
|
+
return d(function(e, t) {
|
|
451
487
|
e.getRandomValues(t);
|
|
452
488
|
}, arguments);
|
|
453
489
|
},
|
|
@@ -455,7 +491,7 @@ var ie = C((ue, q) => {
|
|
|
455
491
|
return e.getTime();
|
|
456
492
|
},
|
|
457
493
|
__wbg_get_1f8f054ddbaa7db2: function() {
|
|
458
|
-
return
|
|
494
|
+
return d(function(e, t) {
|
|
459
495
|
return Reflect.get(e, t);
|
|
460
496
|
}, arguments);
|
|
461
497
|
},
|
|
@@ -463,7 +499,7 @@ var ie = C((ue, q) => {
|
|
|
463
499
|
return e[t >>> 0];
|
|
464
500
|
},
|
|
465
501
|
__wbg_get_de6a0f7d4d18a304: function() {
|
|
466
|
-
return
|
|
502
|
+
return d(function(e, t) {
|
|
467
503
|
return Reflect.get(e, t);
|
|
468
504
|
}, arguments);
|
|
469
505
|
},
|
|
@@ -474,7 +510,7 @@ var ie = C((ue, q) => {
|
|
|
474
510
|
return e[t];
|
|
475
511
|
},
|
|
476
512
|
__wbg_has_73740b27f436fed3: function() {
|
|
477
|
-
return
|
|
513
|
+
return d(function(e, t) {
|
|
478
514
|
return Reflect.has(e, t);
|
|
479
515
|
}, arguments);
|
|
480
516
|
},
|
|
@@ -548,7 +584,7 @@ var ie = C((ue, q) => {
|
|
|
548
584
|
return /* @__PURE__ */ new Date();
|
|
549
585
|
},
|
|
550
586
|
__wbg_new_0d09705104e164af: function() {
|
|
551
|
-
return
|
|
587
|
+
return d(function() {
|
|
552
588
|
return new AbortController();
|
|
553
589
|
}, arguments);
|
|
554
590
|
},
|
|
@@ -562,7 +598,7 @@ var ie = C((ue, q) => {
|
|
|
562
598
|
return /* @__PURE__ */ new Map();
|
|
563
599
|
},
|
|
564
600
|
__wbg_new_a1b9f645bba64f0f: function() {
|
|
565
|
-
return
|
|
601
|
+
return d(function() {
|
|
566
602
|
return new FileReaderSync();
|
|
567
603
|
}, arguments);
|
|
568
604
|
},
|
|
@@ -573,22 +609,22 @@ var ie = C((ue, q) => {
|
|
|
573
609
|
return new Array();
|
|
574
610
|
},
|
|
575
611
|
__wbg_new_e436d06bc8e77460: function() {
|
|
576
|
-
return
|
|
612
|
+
return d(function() {
|
|
577
613
|
return new Headers();
|
|
578
614
|
}, arguments);
|
|
579
615
|
},
|
|
580
616
|
__wbg_new_from_slice_18fa1f71286d66b8: function(e, t) {
|
|
581
|
-
return new Uint8Array(
|
|
617
|
+
return new Uint8Array(A(e, t));
|
|
582
618
|
},
|
|
583
619
|
__wbg_new_typed_bf31d18f92484486: function(e, t) {
|
|
584
620
|
try {
|
|
585
|
-
var n = { a: e, b: t }, _ = (
|
|
586
|
-
const
|
|
621
|
+
var n = { a: e, b: t }, _ = (i, s) => {
|
|
622
|
+
const u = n.a;
|
|
587
623
|
n.a = 0;
|
|
588
624
|
try {
|
|
589
|
-
return
|
|
625
|
+
return K(u, n.b, i, s);
|
|
590
626
|
} finally {
|
|
591
|
-
n.a =
|
|
627
|
+
n.a = u;
|
|
592
628
|
}
|
|
593
629
|
};
|
|
594
630
|
return new Promise(_);
|
|
@@ -600,7 +636,7 @@ var ie = C((ue, q) => {
|
|
|
600
636
|
return new Uint8Array(e >>> 0);
|
|
601
637
|
},
|
|
602
638
|
__wbg_new_with_str_and_init_bcd02b79a793d27f: function() {
|
|
603
|
-
return
|
|
639
|
+
return d(function(e, t, n) {
|
|
604
640
|
return new Request(y(e, t), n);
|
|
605
641
|
}, arguments);
|
|
606
642
|
},
|
|
@@ -608,7 +644,7 @@ var ie = C((ue, q) => {
|
|
|
608
644
|
return e.next;
|
|
609
645
|
},
|
|
610
646
|
__wbg_next_eb8ca7351fa27906: function() {
|
|
611
|
-
return
|
|
647
|
+
return d(function(e) {
|
|
612
648
|
return e.next();
|
|
613
649
|
}, arguments);
|
|
614
650
|
},
|
|
@@ -622,7 +658,7 @@ var ie = C((ue, q) => {
|
|
|
622
658
|
return e.process;
|
|
623
659
|
},
|
|
624
660
|
__wbg_prototypesetcall_3249fc62a0fafa30: function(e, t, n) {
|
|
625
|
-
Uint8Array.prototype.set.call(
|
|
661
|
+
Uint8Array.prototype.set.call(A(e, t), n);
|
|
626
662
|
},
|
|
627
663
|
__wbg_queueMicrotask_35c611f4a14830b2: function(e) {
|
|
628
664
|
queueMicrotask(e);
|
|
@@ -631,18 +667,18 @@ var ie = C((ue, q) => {
|
|
|
631
667
|
return e.queueMicrotask;
|
|
632
668
|
},
|
|
633
669
|
__wbg_randomFillSync_6c25eac9869eb53c: function() {
|
|
634
|
-
return
|
|
670
|
+
return d(function(e, t) {
|
|
635
671
|
e.randomFillSync(t);
|
|
636
672
|
}, arguments);
|
|
637
673
|
},
|
|
638
674
|
__wbg_readAsArrayBuffer_f1b8da05559618d9: function() {
|
|
639
|
-
return
|
|
675
|
+
return d(function(e, t) {
|
|
640
676
|
return e.readAsArrayBuffer(t);
|
|
641
677
|
}, arguments);
|
|
642
678
|
},
|
|
643
679
|
__wbg_require_b4edbdcf3e2a1ef0: function() {
|
|
644
|
-
return
|
|
645
|
-
return
|
|
680
|
+
return d(function() {
|
|
681
|
+
return C.require;
|
|
646
682
|
}, arguments);
|
|
647
683
|
},
|
|
648
684
|
__wbg_resolve_25a7e548d5881dca: function(e) {
|
|
@@ -652,7 +688,7 @@ var ie = C((ue, q) => {
|
|
|
652
688
|
return setTimeout(e, t);
|
|
653
689
|
},
|
|
654
690
|
__wbg_set_29c99a8aac1c01e5: function(e, t, n) {
|
|
655
|
-
e.set(
|
|
691
|
+
e.set(A(t, n));
|
|
656
692
|
},
|
|
657
693
|
__wbg_set_52b1e1eb5bed906a: function(e, t, n) {
|
|
658
694
|
return e.set(t, n);
|
|
@@ -664,10 +700,10 @@ var ie = C((ue, q) => {
|
|
|
664
700
|
e.body = t;
|
|
665
701
|
},
|
|
666
702
|
__wbg_set_cache_488ea16c11cbf20d: function(e, t) {
|
|
667
|
-
e.cache =
|
|
703
|
+
e.cache = Q[t];
|
|
668
704
|
},
|
|
669
705
|
__wbg_set_credentials_fa9c491a27c4bdf0: function(e, t) {
|
|
670
|
-
e.credentials =
|
|
706
|
+
e.credentials = Z[t];
|
|
671
707
|
},
|
|
672
708
|
__wbg_set_dca99999bba88a9a: function(e, t, n) {
|
|
673
709
|
e[t >>> 0] = n;
|
|
@@ -679,7 +715,7 @@ var ie = C((ue, q) => {
|
|
|
679
715
|
e.method = y(t, n);
|
|
680
716
|
},
|
|
681
717
|
__wbg_set_mode_c90e3667002857d4: function(e, t) {
|
|
682
|
-
e.mode =
|
|
718
|
+
e.mode = ee[t];
|
|
683
719
|
},
|
|
684
720
|
__wbg_set_signal_d9da62b3f215c821: function(e, t) {
|
|
685
721
|
e.signal = t;
|
|
@@ -691,35 +727,35 @@ var ie = C((ue, q) => {
|
|
|
691
727
|
return e.size;
|
|
692
728
|
},
|
|
693
729
|
__wbg_slice_02bb778501725738: function() {
|
|
694
|
-
return
|
|
730
|
+
return d(function(e, t, n) {
|
|
695
731
|
return e.slice(t, n);
|
|
696
732
|
}, arguments);
|
|
697
733
|
},
|
|
698
734
|
__wbg_stack_3b0d974bbf31e44f: function(e, t) {
|
|
699
|
-
const n = t.stack, _ =
|
|
735
|
+
const n = t.stack, _ = b(n, o.__wbindgen_malloc, o.__wbindgen_realloc), c = a;
|
|
700
736
|
m().setInt32(e + 4, c, !0), m().setInt32(e + 0, _, !0);
|
|
701
737
|
},
|
|
702
738
|
__wbg_static_accessor_GLOBAL_9d53f2689e622ca1: function() {
|
|
703
739
|
const e = typeof global > "u" ? null : global;
|
|
704
|
-
return w(e) ? 0 :
|
|
740
|
+
return w(e) ? 0 : R(e);
|
|
705
741
|
},
|
|
706
742
|
__wbg_static_accessor_GLOBAL_THIS_a1a35cec07001a8a: function() {
|
|
707
743
|
const e = typeof globalThis > "u" ? null : globalThis;
|
|
708
|
-
return w(e) ? 0 :
|
|
744
|
+
return w(e) ? 0 : R(e);
|
|
709
745
|
},
|
|
710
746
|
__wbg_static_accessor_SELF_4c59f6c7ea29a144: function() {
|
|
711
747
|
const e = typeof self > "u" ? null : self;
|
|
712
|
-
return w(e) ? 0 :
|
|
748
|
+
return w(e) ? 0 : R(e);
|
|
713
749
|
},
|
|
714
750
|
__wbg_static_accessor_WINDOW_e70ae9f2eb052253: function() {
|
|
715
751
|
const e = typeof window > "u" ? null : window;
|
|
716
|
-
return w(e) ? 0 :
|
|
752
|
+
return w(e) ? 0 : R(e);
|
|
717
753
|
},
|
|
718
754
|
__wbg_status_00549d55b78d949e: function(e) {
|
|
719
755
|
return e.status;
|
|
720
756
|
},
|
|
721
757
|
__wbg_stringify_8286df6dcc591521: function() {
|
|
722
|
-
return
|
|
758
|
+
return d(function(e) {
|
|
723
759
|
return JSON.stringify(e);
|
|
724
760
|
}, arguments);
|
|
725
761
|
},
|
|
@@ -733,7 +769,7 @@ var ie = C((ue, q) => {
|
|
|
733
769
|
return e.then(t);
|
|
734
770
|
},
|
|
735
771
|
__wbg_url_6808f1c468f2d0cd: function(e, t) {
|
|
736
|
-
const n = t.url, _ =
|
|
772
|
+
const n = t.url, _ = b(n, o.__wbindgen_malloc, o.__wbindgen_realloc), c = a;
|
|
737
773
|
m().setInt32(e + 4, c, !0), m().setInt32(e + 0, _, !0);
|
|
738
774
|
},
|
|
739
775
|
__wbg_valueOf_41ae57308c1f031c: function(e) {
|
|
@@ -749,10 +785,10 @@ var ie = C((ue, q) => {
|
|
|
749
785
|
return F.__wrap(e);
|
|
750
786
|
},
|
|
751
787
|
__wbindgen_cast_0000000000000001: function(e, t) {
|
|
752
|
-
return z(e, t,
|
|
788
|
+
return z(e, t, Y);
|
|
753
789
|
},
|
|
754
790
|
__wbindgen_cast_0000000000000002: function(e, t) {
|
|
755
|
-
return z(e, t,
|
|
791
|
+
return z(e, t, X);
|
|
756
792
|
},
|
|
757
793
|
__wbindgen_cast_0000000000000003: function(e) {
|
|
758
794
|
return e;
|
|
@@ -761,7 +797,7 @@ var ie = C((ue, q) => {
|
|
|
761
797
|
return e;
|
|
762
798
|
},
|
|
763
799
|
__wbindgen_cast_0000000000000005: function(e, t) {
|
|
764
|
-
return
|
|
800
|
+
return A(e, t);
|
|
765
801
|
},
|
|
766
802
|
__wbindgen_cast_0000000000000006: function(e, t) {
|
|
767
803
|
return y(e, t);
|
|
@@ -770,7 +806,7 @@ var ie = C((ue, q) => {
|
|
|
770
806
|
return BigInt.asUintN(64, e);
|
|
771
807
|
},
|
|
772
808
|
__wbindgen_cast_0000000000000008: function(e, t) {
|
|
773
|
-
var n =
|
|
809
|
+
var n = A(e, t).slice();
|
|
774
810
|
return o.__wbindgen_free(e, t * 1, 1), n;
|
|
775
811
|
},
|
|
776
812
|
__wbindgen_init_externref_table: function() {
|
|
@@ -780,31 +816,31 @@ var ie = C((ue, q) => {
|
|
|
780
816
|
}
|
|
781
817
|
};
|
|
782
818
|
}
|
|
783
|
-
function
|
|
819
|
+
function X(r, e) {
|
|
784
820
|
o.wasm_bindgen_304c265eb9e6f0af___convert__closures_____invoke_______true_(r, e);
|
|
785
821
|
}
|
|
786
|
-
function
|
|
822
|
+
function Y(r, e, t) {
|
|
787
823
|
const n = o.wasm_bindgen_304c265eb9e6f0af___convert__closures_____invoke___wasm_bindgen_304c265eb9e6f0af___JsValue__core_9b3796e30d99ddb7___result__Result_____wasm_bindgen_304c265eb9e6f0af___JsError___true_(r, e, t);
|
|
788
824
|
if (n[1])
|
|
789
|
-
throw
|
|
825
|
+
throw f(n[0]);
|
|
790
826
|
}
|
|
791
|
-
function
|
|
827
|
+
function K(r, e, t, n) {
|
|
792
828
|
o.wasm_bindgen_304c265eb9e6f0af___convert__closures_____invoke___js_sys_74e7014fb12660c3___Function_fn_wasm_bindgen_304c265eb9e6f0af___JsValue_____wasm_bindgen_304c265eb9e6f0af___sys__Undefined___js_sys_74e7014fb12660c3___Function_fn_wasm_bindgen_304c265eb9e6f0af___JsValue_____wasm_bindgen_304c265eb9e6f0af___sys__Undefined_______true_(r, e, t, n);
|
|
793
829
|
}
|
|
794
|
-
const
|
|
830
|
+
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"], U = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
795
831
|
}, unregister: () => {
|
|
796
832
|
} } : new FinalizationRegistry((r) => o.__wbg_wasmbuilder_free(r, 1)), k = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
797
833
|
}, unregister: () => {
|
|
798
834
|
} } : new FinalizationRegistry((r) => o.__wbg_wasmreader_free(r, 1));
|
|
799
835
|
typeof FinalizationRegistry > "u" || new FinalizationRegistry((r) => o.__wbg_wasmsigner_free(r, 1));
|
|
800
|
-
function
|
|
836
|
+
function R(r) {
|
|
801
837
|
const e = o.__externref_table_alloc();
|
|
802
838
|
return o.__wbindgen_externrefs.set(e, r), e;
|
|
803
839
|
}
|
|
804
840
|
const N = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
805
841
|
}, unregister: () => {
|
|
806
842
|
} } : new FinalizationRegistry((r) => o.__wbindgen_destroy_closure(r.a, r.b));
|
|
807
|
-
function
|
|
843
|
+
function x(r) {
|
|
808
844
|
const e = typeof r;
|
|
809
845
|
if (e == "number" || e == "boolean" || r == null)
|
|
810
846
|
return `${r}`;
|
|
@@ -821,9 +857,9 @@ var ie = C((ue, q) => {
|
|
|
821
857
|
if (Array.isArray(r)) {
|
|
822
858
|
const _ = r.length;
|
|
823
859
|
let c = "[";
|
|
824
|
-
_ > 0 && (c +=
|
|
825
|
-
for (let
|
|
826
|
-
c += ", " +
|
|
860
|
+
_ > 0 && (c += x(r[0]));
|
|
861
|
+
for (let i = 1; i < _; i++)
|
|
862
|
+
c += ", " + x(r[i]);
|
|
827
863
|
return c += "]", c;
|
|
828
864
|
}
|
|
829
865
|
const t = /\[object ([^\]]+)\]/.exec(toString.call(r));
|
|
@@ -841,25 +877,29 @@ var ie = C((ue, q) => {
|
|
|
841
877
|
return r instanceof Error ? `${r.name}: ${r.message}
|
|
842
878
|
${r.stack}` : n;
|
|
843
879
|
}
|
|
844
|
-
function
|
|
845
|
-
return r = r >>> 0,
|
|
880
|
+
function A(r, e) {
|
|
881
|
+
return r = r >>> 0, T().subarray(r / 1, r / 1 + e);
|
|
846
882
|
}
|
|
847
|
-
let
|
|
883
|
+
let v = null;
|
|
848
884
|
function m() {
|
|
849
|
-
return (
|
|
885
|
+
return (v === null || v.buffer.detached === !0 || v.buffer.detached === void 0 && v.buffer !== o.memory.buffer) && (v = new DataView(o.memory.buffer)), v;
|
|
850
886
|
}
|
|
851
887
|
function y(r, e) {
|
|
852
|
-
return
|
|
888
|
+
return re(r >>> 0, e);
|
|
853
889
|
}
|
|
854
890
|
let S = null;
|
|
855
|
-
function
|
|
856
|
-
return (S === null || S.byteLength === 0) && (S = new
|
|
891
|
+
function te() {
|
|
892
|
+
return (S === null || S.byteLength === 0) && (S = new Uint32Array(o.memory.buffer)), S;
|
|
857
893
|
}
|
|
858
|
-
|
|
894
|
+
let B = null;
|
|
895
|
+
function T() {
|
|
896
|
+
return (B === null || B.byteLength === 0) && (B = new Uint8Array(o.memory.buffer)), B;
|
|
897
|
+
}
|
|
898
|
+
function d(r, e) {
|
|
859
899
|
try {
|
|
860
900
|
return r.apply(this, e);
|
|
861
901
|
} catch (t) {
|
|
862
|
-
const n =
|
|
902
|
+
const n = R(t);
|
|
863
903
|
o.__wbindgen_exn_store(n);
|
|
864
904
|
}
|
|
865
905
|
}
|
|
@@ -869,48 +909,52 @@ ${r.stack}` : n;
|
|
|
869
909
|
function z(r, e, t) {
|
|
870
910
|
const n = { a: r, b: e, cnt: 1 }, _ = (...c) => {
|
|
871
911
|
n.cnt++;
|
|
872
|
-
const
|
|
912
|
+
const i = n.a;
|
|
873
913
|
n.a = 0;
|
|
874
914
|
try {
|
|
875
|
-
return t(
|
|
915
|
+
return t(i, n.b, ...c);
|
|
876
916
|
} finally {
|
|
877
|
-
n.a =
|
|
917
|
+
n.a = i, _._wbg_cb_unref();
|
|
878
918
|
}
|
|
879
919
|
};
|
|
880
920
|
return _._wbg_cb_unref = () => {
|
|
881
921
|
--n.cnt === 0 && (o.__wbindgen_destroy_closure(n.a, n.b), n.a = 0, N.unregister(n));
|
|
882
922
|
}, N.register(_, n, n), _;
|
|
883
923
|
}
|
|
884
|
-
function
|
|
924
|
+
function J(r, e) {
|
|
925
|
+
const t = e(r.length * 4, 4) >>> 0;
|
|
926
|
+
return te().set(r, t / 4), a = r.length, t;
|
|
927
|
+
}
|
|
928
|
+
function b(r, e, t) {
|
|
885
929
|
if (t === void 0) {
|
|
886
|
-
const
|
|
887
|
-
return
|
|
930
|
+
const s = j.encode(r), u = e(s.length, 1) >>> 0;
|
|
931
|
+
return T().subarray(u, u + s.length).set(s), a = s.length, u;
|
|
888
932
|
}
|
|
889
933
|
let n = r.length, _ = e(n, 1) >>> 0;
|
|
890
|
-
const c =
|
|
891
|
-
let
|
|
892
|
-
for (;
|
|
893
|
-
const
|
|
894
|
-
if (
|
|
895
|
-
c[_ +
|
|
934
|
+
const c = T();
|
|
935
|
+
let i = 0;
|
|
936
|
+
for (; i < n; i++) {
|
|
937
|
+
const s = r.charCodeAt(i);
|
|
938
|
+
if (s > 127) break;
|
|
939
|
+
c[_ + i] = s;
|
|
896
940
|
}
|
|
897
|
-
if (
|
|
898
|
-
|
|
899
|
-
const
|
|
900
|
-
|
|
941
|
+
if (i !== n) {
|
|
942
|
+
i !== 0 && (r = r.slice(i)), _ = t(_, n, n = i + r.length * 3, 1) >>> 0;
|
|
943
|
+
const s = T().subarray(_ + i, _ + n), u = j.encodeInto(r, s);
|
|
944
|
+
i += u.written, _ = t(_, n, i, 1) >>> 0;
|
|
901
945
|
}
|
|
902
|
-
return
|
|
946
|
+
return a = i, _;
|
|
903
947
|
}
|
|
904
|
-
function
|
|
948
|
+
function f(r) {
|
|
905
949
|
const e = o.__wbindgen_externrefs.get(r);
|
|
906
950
|
return o.__externref_table_dealloc(r), e;
|
|
907
951
|
}
|
|
908
|
-
let
|
|
909
|
-
|
|
910
|
-
const
|
|
911
|
-
let
|
|
912
|
-
function
|
|
913
|
-
return
|
|
952
|
+
let E = new TextDecoder("utf-8", { ignoreBOM: !0, fatal: !0 });
|
|
953
|
+
E.decode();
|
|
954
|
+
const ne = 2146435072;
|
|
955
|
+
let O = 0;
|
|
956
|
+
function re(r, e) {
|
|
957
|
+
return O += e, O >= ne && (E = new TextDecoder("utf-8", { ignoreBOM: !0, fatal: !0 }), E.decode(), O = e), E.decode(T().subarray(r, r + e));
|
|
914
958
|
}
|
|
915
959
|
const j = new TextEncoder();
|
|
916
960
|
"encodeInto" in j || (j.encodeInto = function(r, e) {
|
|
@@ -920,19 +964,19 @@ ${r.stack}` : n;
|
|
|
920
964
|
written: t.length
|
|
921
965
|
};
|
|
922
966
|
});
|
|
923
|
-
let
|
|
924
|
-
function
|
|
925
|
-
return o = r.exports,
|
|
967
|
+
let a = 0, o;
|
|
968
|
+
function _e(r, e) {
|
|
969
|
+
return o = r.exports, v = null, S = null, B = null, o.__wbindgen_start(), o;
|
|
926
970
|
}
|
|
927
|
-
function
|
|
971
|
+
function oe(r) {
|
|
928
972
|
if (o !== void 0) return o;
|
|
929
973
|
r !== void 0 && (Object.getPrototypeOf(r) === Object.prototype ? { module: r } = r : console.warn("using deprecated parameters for `initSync()`; pass a single object instead"));
|
|
930
|
-
const e =
|
|
974
|
+
const e = H();
|
|
931
975
|
r instanceof WebAssembly.Module || (r = new WebAssembly.Module(r));
|
|
932
976
|
const t = new WebAssembly.Instance(r, e);
|
|
933
|
-
return
|
|
977
|
+
return _e(t);
|
|
934
978
|
}
|
|
935
|
-
function
|
|
979
|
+
function D() {
|
|
936
980
|
let r = 0;
|
|
937
981
|
const e = /* @__PURE__ */ new Map();
|
|
938
982
|
return {
|
|
@@ -951,18 +995,18 @@ ${r.stack}` : n;
|
|
|
951
995
|
}
|
|
952
996
|
};
|
|
953
997
|
}
|
|
954
|
-
const
|
|
955
|
-
function
|
|
998
|
+
const q = Symbol("transfer");
|
|
999
|
+
function M(r, e) {
|
|
956
1000
|
return {
|
|
957
|
-
type:
|
|
1001
|
+
type: q,
|
|
958
1002
|
value: r,
|
|
959
1003
|
transfer: e ? Array.isArray(e) ? e : [e] : [r]
|
|
960
1004
|
};
|
|
961
1005
|
}
|
|
962
|
-
function
|
|
963
|
-
return !!(r && typeof r == "object" && Reflect.get(r, "type") ===
|
|
1006
|
+
function L(r) {
|
|
1007
|
+
return !!(r && typeof r == "object" && Reflect.get(r, "type") === q);
|
|
964
1008
|
}
|
|
965
|
-
function
|
|
1009
|
+
function W(r = "default") {
|
|
966
1010
|
return {
|
|
967
1011
|
createTx(e) {
|
|
968
1012
|
const t = /* @__PURE__ */ new Map(), n = e ?? self;
|
|
@@ -970,21 +1014,21 @@ ${r.stack}` : n;
|
|
|
970
1014
|
const { data: c } = _;
|
|
971
1015
|
if (c.channelName !== r)
|
|
972
1016
|
return;
|
|
973
|
-
const { id:
|
|
974
|
-
g && (
|
|
1017
|
+
const { id: i, result: s, error: u } = c, g = t.get(i);
|
|
1018
|
+
g && (u ? g.reject(u) : g.resolve(s), t.delete(i));
|
|
975
1019
|
}), new Proxy(
|
|
976
1020
|
{},
|
|
977
1021
|
{
|
|
978
1022
|
get(_, c) {
|
|
979
|
-
return (...
|
|
980
|
-
const
|
|
981
|
-
return
|
|
982
|
-
|
|
1023
|
+
return (...i) => {
|
|
1024
|
+
const s = ce(), u = [], g = [];
|
|
1025
|
+
return i.forEach((I) => {
|
|
1026
|
+
L(I) ? (u.push(I.value), g.push(...I.transfer)) : u.push(I);
|
|
983
1027
|
}), n.postMessage(
|
|
984
|
-
{ method: c, args:
|
|
1028
|
+
{ method: c, args: u, id: s, channelName: r },
|
|
985
1029
|
{ transfer: g }
|
|
986
|
-
), new Promise((
|
|
987
|
-
t.set(
|
|
1030
|
+
), new Promise((I, P) => {
|
|
1031
|
+
t.set(s, { resolve: I, reject: P });
|
|
988
1032
|
});
|
|
989
1033
|
};
|
|
990
1034
|
}
|
|
@@ -997,35 +1041,35 @@ ${r.stack}` : n;
|
|
|
997
1041
|
const { data: c } = _;
|
|
998
1042
|
if (c.channelName !== r)
|
|
999
1043
|
return;
|
|
1000
|
-
const { method:
|
|
1044
|
+
const { method: i, args: s, id: u } = c;
|
|
1001
1045
|
try {
|
|
1002
|
-
const g = await e[
|
|
1003
|
-
|
|
1004
|
-
{ result: g.value, id:
|
|
1046
|
+
const g = await e[i](...s);
|
|
1047
|
+
L(g) ? n.postMessage(
|
|
1048
|
+
{ result: g.value, id: u, channelName: r },
|
|
1005
1049
|
{ transfer: g.transfer }
|
|
1006
|
-
) : n.postMessage({ result: g, id:
|
|
1050
|
+
) : n.postMessage({ result: g, id: u, channelName: r });
|
|
1007
1051
|
} catch (g) {
|
|
1008
|
-
n.postMessage({ error: g, id:
|
|
1052
|
+
n.postMessage({ error: g, id: u, channelName: r });
|
|
1009
1053
|
}
|
|
1010
1054
|
});
|
|
1011
1055
|
}
|
|
1012
1056
|
};
|
|
1013
1057
|
}
|
|
1014
|
-
function
|
|
1058
|
+
function ce() {
|
|
1015
1059
|
return new Array(4).fill(0).map(() => Math.floor(Math.random() * Number.MAX_SAFE_INTEGER).toString(16)).join("-");
|
|
1016
1060
|
}
|
|
1017
|
-
const { rx:
|
|
1018
|
-
function
|
|
1061
|
+
const { rx: ie } = W(), { createTx: se } = W("worker");
|
|
1062
|
+
function ae(r) {
|
|
1019
1063
|
if (!(r != null && r.manifests))
|
|
1020
1064
|
return r;
|
|
1021
1065
|
const e = r.manifests, t = Object.assign(/* @__PURE__ */ Object.create(null), e), n = Object.getPrototypeOf(e);
|
|
1022
1066
|
return n !== null && n !== Object.prototype && r.active_manifest && (t[r.active_manifest] = n), r.manifests = t, r;
|
|
1023
1067
|
}
|
|
1024
|
-
const p =
|
|
1025
|
-
|
|
1026
|
-
|
|
1068
|
+
const p = D(), l = D(), V = se();
|
|
1069
|
+
ie(
|
|
1070
|
+
ue({
|
|
1027
1071
|
async initWorker(r, e) {
|
|
1028
|
-
|
|
1072
|
+
oe({ module: r }), e && $(e);
|
|
1029
1073
|
},
|
|
1030
1074
|
async reader_fromBlob(r, e, t) {
|
|
1031
1075
|
const n = await F.fromBlob(r, e, t);
|
|
@@ -1045,7 +1089,7 @@ ${r.stack}` : n;
|
|
|
1045
1089
|
},
|
|
1046
1090
|
reader_manifestStore(r) {
|
|
1047
1091
|
const e = p.get(r);
|
|
1048
|
-
return
|
|
1092
|
+
return ae(e.manifestStore());
|
|
1049
1093
|
},
|
|
1050
1094
|
reader_activeManifest(r) {
|
|
1051
1095
|
return p.get(r).activeManifest();
|
|
@@ -1058,7 +1102,7 @@ ${r.stack}` : n;
|
|
|
1058
1102
|
},
|
|
1059
1103
|
reader_resourceToBytes(r, e) {
|
|
1060
1104
|
const n = p.get(r).resourceToBytes(e);
|
|
1061
|
-
return
|
|
1105
|
+
return M(n, n.buffer);
|
|
1062
1106
|
},
|
|
1063
1107
|
reader_free(r) {
|
|
1064
1108
|
p.get(r).free(), p.remove(r);
|
|
@@ -1084,6 +1128,12 @@ ${r.stack}` : n;
|
|
|
1084
1128
|
builder_addRedaction(r, e, t) {
|
|
1085
1129
|
l.get(r).addRedaction(e, t);
|
|
1086
1130
|
},
|
|
1131
|
+
builder_filterActionsAt(r, e) {
|
|
1132
|
+
l.get(r).filterActionsAt(Uint32Array.from(e));
|
|
1133
|
+
},
|
|
1134
|
+
builder_filterIngredientsAt(r, e) {
|
|
1135
|
+
l.get(r).filterIngredientsAt(Uint32Array.from(e));
|
|
1136
|
+
},
|
|
1087
1137
|
builder_setRemoteUrl(r, e) {
|
|
1088
1138
|
l.get(r).setRemoteUrl(e);
|
|
1089
1139
|
},
|
|
@@ -1107,44 +1157,44 @@ ${r.stack}` : n;
|
|
|
1107
1157
|
},
|
|
1108
1158
|
builder_toArchive(r) {
|
|
1109
1159
|
const t = l.get(r).toArchive();
|
|
1110
|
-
return
|
|
1160
|
+
return M(t, t.buffer);
|
|
1111
1161
|
},
|
|
1112
1162
|
async builder_sign(r, e, t, n, _) {
|
|
1113
|
-
const
|
|
1163
|
+
const i = await l.get(r).sign(
|
|
1114
1164
|
{
|
|
1115
1165
|
reserveSize: t.reserveSize,
|
|
1116
1166
|
alg: t.alg,
|
|
1117
|
-
sign: async (
|
|
1167
|
+
sign: async (s) => await V.sign(
|
|
1118
1168
|
e,
|
|
1119
|
-
|
|
1169
|
+
M(s, s.buffer),
|
|
1120
1170
|
t.reserveSize
|
|
1121
1171
|
)
|
|
1122
1172
|
},
|
|
1123
1173
|
n,
|
|
1124
1174
|
_
|
|
1125
1175
|
);
|
|
1126
|
-
return
|
|
1176
|
+
return M(i, i.buffer);
|
|
1127
1177
|
},
|
|
1128
1178
|
async builder_signAndGetManifestBytes(r, e, t, n, _) {
|
|
1129
|
-
const c = l.get(r), { manifest:
|
|
1179
|
+
const c = l.get(r), { manifest: i, asset: s } = await c.signAndGetManifestBytes(
|
|
1130
1180
|
{
|
|
1131
1181
|
reserveSize: t.reserveSize,
|
|
1132
1182
|
alg: t.alg,
|
|
1133
|
-
sign: async (
|
|
1183
|
+
sign: async (u) => await V.sign(
|
|
1134
1184
|
e,
|
|
1135
|
-
|
|
1185
|
+
M(u, u.buffer),
|
|
1136
1186
|
t.reserveSize
|
|
1137
1187
|
)
|
|
1138
1188
|
},
|
|
1139
1189
|
n,
|
|
1140
1190
|
_
|
|
1141
1191
|
);
|
|
1142
|
-
return
|
|
1192
|
+
return M(
|
|
1143
1193
|
{
|
|
1144
|
-
manifest:
|
|
1145
|
-
asset:
|
|
1194
|
+
manifest: i,
|
|
1195
|
+
asset: s
|
|
1146
1196
|
},
|
|
1147
|
-
[
|
|
1197
|
+
[i.buffer, s.buffer]
|
|
1148
1198
|
);
|
|
1149
1199
|
},
|
|
1150
1200
|
builder_free(r) {
|
|
@@ -1152,7 +1202,7 @@ ${r.stack}` : n;
|
|
|
1152
1202
|
}
|
|
1153
1203
|
})
|
|
1154
1204
|
);
|
|
1155
|
-
function
|
|
1205
|
+
function ue(r) {
|
|
1156
1206
|
const e = {};
|
|
1157
1207
|
for (const [t, n] of Object.entries(r))
|
|
1158
1208
|
e[t] = async (..._) => {
|
|
@@ -1165,4 +1215,4 @@ ${r.stack}` : n;
|
|
|
1165
1215
|
return e;
|
|
1166
1216
|
}
|
|
1167
1217
|
});
|
|
1168
|
-
export default
|
|
1218
|
+
export default fe();
|