@contentauth/c2pa-web 0.14.3 → 0.14.5
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-ClWjHDBi.js → c2pa-CJjzMta6.js} +185 -260
- package/dist/c2pa_worker.js +79 -79
- package/dist/common.d.ts +0 -1
- package/dist/common.d.ts.map +1 -1
- package/dist/index.js +17 -19
- package/dist/inline.js +3 -6
- package/dist/lib/reader.d.ts.map +1 -1
- package/dist/resources/c2pa_bg.wasm +0 -0
- package/package.json +4 -4
- package/dist/lib/error.d.ts +0 -12
- package/dist/lib/error.d.ts.map +0 -1
- package/dist/lib/supportedFormats.d.ts +0 -11
- package/dist/lib/supportedFormats.d.ts.map +0 -1
package/dist/c2pa_worker.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
var G = (r, e) => () => (e || r((e = { exports: {} }).exports, e), e.exports);
|
|
2
|
-
var
|
|
2
|
+
var de = G((fe, C) => {
|
|
3
3
|
class h {
|
|
4
4
|
static __wrap(e) {
|
|
5
5
|
const t = Object.create(h.prototype);
|
|
@@ -20,7 +20,7 @@ var be = G((de, C) => {
|
|
|
20
20
|
addAction(e) {
|
|
21
21
|
const t = o.wasmbuilder_addAction(this.__wbg_ptr, e);
|
|
22
22
|
if (t[1])
|
|
23
|
-
throw
|
|
23
|
+
throw d(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 be = G((de, C) => {
|
|
|
28
28
|
* @param {any} data
|
|
29
29
|
*/
|
|
30
30
|
addAssertion(e, t) {
|
|
31
|
-
const n =
|
|
31
|
+
const n = b(e, o.__wbindgen_malloc, o.__wbindgen_realloc), _ = a, c = o.wasmbuilder_addAssertion(this.__wbg_ptr, n, _, t);
|
|
32
32
|
if (c[1])
|
|
33
|
-
throw
|
|
33
|
+
throw d(c[0]);
|
|
34
34
|
}
|
|
35
35
|
/**
|
|
36
36
|
* Add an ingredient to the manifest from a JSON ingredient definition without a blob
|
|
@@ -40,9 +40,9 @@ var be = G((de, C) => {
|
|
|
40
40
|
* @param {string} json
|
|
41
41
|
*/
|
|
42
42
|
addIngredient(e) {
|
|
43
|
-
const t =
|
|
43
|
+
const t = b(e, o.__wbindgen_malloc, o.__wbindgen_realloc), n = a, _ = o.wasmbuilder_addIngredient(this.__wbg_ptr, t, n);
|
|
44
44
|
if (_[1])
|
|
45
|
-
throw
|
|
45
|
+
throw d(_[0]);
|
|
46
46
|
}
|
|
47
47
|
/**
|
|
48
48
|
* Add an ingredient to the manifest from a JSON ingredient definition and a [`Blob`].
|
|
@@ -57,7 +57,7 @@ var be = G((de, C) => {
|
|
|
57
57
|
* @returns {Promise<void>}
|
|
58
58
|
*/
|
|
59
59
|
addIngredientFromBlob(e, t, n) {
|
|
60
|
-
const _ =
|
|
60
|
+
const _ = b(e, o.__wbindgen_malloc, o.__wbindgen_realloc), c = a, i = b(t, o.__wbindgen_malloc, o.__wbindgen_realloc), s = a;
|
|
61
61
|
return o.wasmbuilder_addIngredientFromBlob(this.__wbg_ptr, _, c, i, s, n);
|
|
62
62
|
}
|
|
63
63
|
/**
|
|
@@ -69,9 +69,9 @@ var be = G((de, C) => {
|
|
|
69
69
|
* @param {any} reason
|
|
70
70
|
*/
|
|
71
71
|
addRedaction(e, t) {
|
|
72
|
-
const n =
|
|
72
|
+
const n = b(e, o.__wbindgen_malloc, o.__wbindgen_realloc), _ = a, c = o.wasmbuilder_addRedaction(this.__wbg_ptr, n, _, t);
|
|
73
73
|
if (c[1])
|
|
74
|
-
throw
|
|
74
|
+
throw d(c[0]);
|
|
75
75
|
}
|
|
76
76
|
/**
|
|
77
77
|
* Add a [`Blob`] to the manifest as a resource. The ID must match an identifier in the manifest.
|
|
@@ -79,9 +79,9 @@ var be = G((de, C) => {
|
|
|
79
79
|
* @param {Blob} blob
|
|
80
80
|
*/
|
|
81
81
|
addResourceFromBlob(e, t) {
|
|
82
|
-
const n =
|
|
82
|
+
const n = b(e, o.__wbindgen_malloc, o.__wbindgen_realloc), _ = a, c = o.wasmbuilder_addResourceFromBlob(this.__wbg_ptr, n, _, t);
|
|
83
83
|
if (c[1])
|
|
84
|
-
throw
|
|
84
|
+
throw d(c[0]);
|
|
85
85
|
}
|
|
86
86
|
/**
|
|
87
87
|
* Retains actions and ingredients together in one step, per
|
|
@@ -98,7 +98,7 @@ var be = G((de, C) => {
|
|
|
98
98
|
filterActionsAndIngredientsAt(e, t) {
|
|
99
99
|
const n = E(e, o.__wbindgen_malloc), _ = a, c = E(t, o.__wbindgen_malloc), i = a, s = o.wasmbuilder_filterActionsAndIngredientsAt(this.__wbg_ptr, n, _, c, i);
|
|
100
100
|
if (s[1])
|
|
101
|
-
throw
|
|
101
|
+
throw d(s[0]);
|
|
102
102
|
}
|
|
103
103
|
/**
|
|
104
104
|
* Retains only the actions at the given 0-based indices into the actions currently returned
|
|
@@ -120,7 +120,7 @@ var be = G((de, C) => {
|
|
|
120
120
|
filterActionsAt(e) {
|
|
121
121
|
const t = E(e, o.__wbindgen_malloc), n = a, _ = o.wasmbuilder_filterActionsAt(this.__wbg_ptr, t, n);
|
|
122
122
|
if (_[1])
|
|
123
|
-
throw
|
|
123
|
+
throw d(_[0]);
|
|
124
124
|
}
|
|
125
125
|
/**
|
|
126
126
|
* Retains ingredients, rescuing an otherwise-orphaned ingredient when its 0-based index into
|
|
@@ -134,7 +134,7 @@ var be = G((de, C) => {
|
|
|
134
134
|
filterIngredientsAt(e) {
|
|
135
135
|
const t = E(e, o.__wbindgen_malloc), n = a, _ = o.wasmbuilder_filterIngredientsAt(this.__wbg_ptr, t, n);
|
|
136
136
|
if (_[1])
|
|
137
|
-
throw
|
|
137
|
+
throw d(_[0]);
|
|
138
138
|
}
|
|
139
139
|
/**
|
|
140
140
|
* Attempts to create a new `WasmBuilder` from a builder archive.
|
|
@@ -144,10 +144,10 @@ var be = G((de, C) => {
|
|
|
144
144
|
* @returns {WasmBuilder}
|
|
145
145
|
*/
|
|
146
146
|
static fromArchive(e, t) {
|
|
147
|
-
var n = w(t) ? 0 :
|
|
147
|
+
var n = w(t) ? 0 : b(t, o.__wbindgen_malloc, o.__wbindgen_realloc), _ = a;
|
|
148
148
|
const c = o.wasmbuilder_fromArchive(e, n, _);
|
|
149
149
|
if (c[2])
|
|
150
|
-
throw
|
|
150
|
+
throw d(c[1]);
|
|
151
151
|
return h.__wrap(c[0]);
|
|
152
152
|
}
|
|
153
153
|
/**
|
|
@@ -158,11 +158,11 @@ var be = G((de, C) => {
|
|
|
158
158
|
* @returns {WasmBuilder}
|
|
159
159
|
*/
|
|
160
160
|
static fromJson(e, t) {
|
|
161
|
-
const n =
|
|
162
|
-
var c = w(t) ? 0 :
|
|
161
|
+
const n = b(e, o.__wbindgen_malloc, o.__wbindgen_realloc), _ = a;
|
|
162
|
+
var c = w(t) ? 0 : b(t, o.__wbindgen_malloc, o.__wbindgen_realloc), i = a;
|
|
163
163
|
const s = o.wasmbuilder_fromJson(n, _, c, i);
|
|
164
164
|
if (s[2])
|
|
165
|
-
throw
|
|
165
|
+
throw d(s[1]);
|
|
166
166
|
return h.__wrap(s[0]);
|
|
167
167
|
}
|
|
168
168
|
/**
|
|
@@ -172,8 +172,8 @@ var be = G((de, C) => {
|
|
|
172
172
|
getDefinition() {
|
|
173
173
|
const e = o.wasmbuilder_getDefinition(this.__wbg_ptr);
|
|
174
174
|
if (e[2])
|
|
175
|
-
throw
|
|
176
|
-
return
|
|
175
|
+
throw d(e[1]);
|
|
176
|
+
return d(e[0]);
|
|
177
177
|
}
|
|
178
178
|
/**
|
|
179
179
|
* Creates a new `WasmBuilder` with a minimal manifest definition.
|
|
@@ -182,10 +182,10 @@ var be = G((de, C) => {
|
|
|
182
182
|
* @returns {WasmBuilder}
|
|
183
183
|
*/
|
|
184
184
|
static new(e) {
|
|
185
|
-
var t = w(e) ? 0 :
|
|
185
|
+
var t = w(e) ? 0 : b(e, o.__wbindgen_malloc, o.__wbindgen_realloc), n = a;
|
|
186
186
|
const _ = o.wasmbuilder_new(t, n);
|
|
187
187
|
if (_[2])
|
|
188
|
-
throw
|
|
188
|
+
throw d(_[1]);
|
|
189
189
|
return h.__wrap(_[0]);
|
|
190
190
|
}
|
|
191
191
|
/**
|
|
@@ -195,7 +195,7 @@ var be = G((de, C) => {
|
|
|
195
195
|
setIntent(e) {
|
|
196
196
|
const t = o.wasmbuilder_setIntent(this.__wbg_ptr, e);
|
|
197
197
|
if (t[1])
|
|
198
|
-
throw
|
|
198
|
+
throw d(t[0]);
|
|
199
199
|
}
|
|
200
200
|
/**
|
|
201
201
|
* Sets the state of the no_embed flag.
|
|
@@ -212,7 +212,7 @@ var be = G((de, C) => {
|
|
|
212
212
|
* @param {string} url
|
|
213
213
|
*/
|
|
214
214
|
setRemoteUrl(e) {
|
|
215
|
-
const t =
|
|
215
|
+
const t = b(e, o.__wbindgen_malloc, o.__wbindgen_realloc), n = a;
|
|
216
216
|
o.wasmbuilder_setRemoteUrl(this.__wbg_ptr, t, n);
|
|
217
217
|
}
|
|
218
218
|
/**
|
|
@@ -221,9 +221,9 @@ var be = G((de, C) => {
|
|
|
221
221
|
* @param {Blob} blob
|
|
222
222
|
*/
|
|
223
223
|
setThumbnailFromBlob(e, t) {
|
|
224
|
-
const n =
|
|
224
|
+
const n = b(e, o.__wbindgen_malloc, o.__wbindgen_realloc), _ = a, c = o.wasmbuilder_setThumbnailFromBlob(this.__wbg_ptr, n, _, t);
|
|
225
225
|
if (c[1])
|
|
226
|
-
throw
|
|
226
|
+
throw d(c[0]);
|
|
227
227
|
}
|
|
228
228
|
/**
|
|
229
229
|
* Sign an asset using the provided SignerDefinition, format, and source Blob.
|
|
@@ -233,7 +233,7 @@ var be = G((de, C) => {
|
|
|
233
233
|
* @returns {Promise<Uint8Array>}
|
|
234
234
|
*/
|
|
235
235
|
sign(e, t, n) {
|
|
236
|
-
const _ =
|
|
236
|
+
const _ = b(t, o.__wbindgen_malloc, o.__wbindgen_realloc), c = a;
|
|
237
237
|
return o.wasmbuilder_sign(this.__wbg_ptr, e, _, c, n);
|
|
238
238
|
}
|
|
239
239
|
/**
|
|
@@ -245,7 +245,7 @@ var be = G((de, C) => {
|
|
|
245
245
|
* @returns {Promise<any>}
|
|
246
246
|
*/
|
|
247
247
|
signAndGetManifestBytes(e, t, n) {
|
|
248
|
-
const _ =
|
|
248
|
+
const _ = b(t, o.__wbindgen_malloc, o.__wbindgen_realloc), c = a;
|
|
249
249
|
return o.wasmbuilder_signAndGetManifestBytes(this.__wbg_ptr, e, _, c, n);
|
|
250
250
|
}
|
|
251
251
|
/**
|
|
@@ -255,8 +255,8 @@ var be = G((de, C) => {
|
|
|
255
255
|
toArchive() {
|
|
256
256
|
const e = o.wasmbuilder_toArchive(this.__wbg_ptr);
|
|
257
257
|
if (e[2])
|
|
258
|
-
throw
|
|
259
|
-
return
|
|
258
|
+
throw d(e[1]);
|
|
259
|
+
return d(e[0]);
|
|
260
260
|
}
|
|
261
261
|
/**
|
|
262
262
|
* Replaces the actions in the `c2pa.actions`/`c2pa.actions.v2` assertions with
|
|
@@ -285,7 +285,7 @@ var be = G((de, C) => {
|
|
|
285
285
|
updateActionsAt(e) {
|
|
286
286
|
const t = o.wasmbuilder_updateActionsAt(this.__wbg_ptr, e);
|
|
287
287
|
if (t[1])
|
|
288
|
-
throw
|
|
288
|
+
throw d(t[0]);
|
|
289
289
|
}
|
|
290
290
|
}
|
|
291
291
|
Symbol.dispose && (h.prototype[Symbol.dispose] = h.prototype.free);
|
|
@@ -318,8 +318,8 @@ var be = G((de, C) => {
|
|
|
318
318
|
activeManifest() {
|
|
319
319
|
const e = o.wasmreader_activeManifest(this.__wbg_ptr);
|
|
320
320
|
if (e[2])
|
|
321
|
-
throw
|
|
322
|
-
return
|
|
321
|
+
throw d(e[1]);
|
|
322
|
+
return d(e[0]);
|
|
323
323
|
}
|
|
324
324
|
/**
|
|
325
325
|
* Returns the asset's manifest store as crJSON.
|
|
@@ -343,8 +343,8 @@ var be = G((de, C) => {
|
|
|
343
343
|
* @returns {Promise<WasmReader>}
|
|
344
344
|
*/
|
|
345
345
|
static fromBlob(e, t, n) {
|
|
346
|
-
const _ =
|
|
347
|
-
var i = w(n) ? 0 :
|
|
346
|
+
const _ = b(e, o.__wbindgen_malloc, o.__wbindgen_realloc), c = a;
|
|
347
|
+
var i = w(n) ? 0 : b(n, o.__wbindgen_malloc, o.__wbindgen_realloc), s = a;
|
|
348
348
|
return o.wasmreader_fromBlob(_, c, t, i, s);
|
|
349
349
|
}
|
|
350
350
|
/**
|
|
@@ -357,8 +357,8 @@ var be = G((de, C) => {
|
|
|
357
357
|
* @returns {Promise<WasmReader>}
|
|
358
358
|
*/
|
|
359
359
|
static fromBlobFragment(e, t, n, _) {
|
|
360
|
-
const c =
|
|
361
|
-
var s = w(_) ? 0 :
|
|
360
|
+
const c = b(e, o.__wbindgen_malloc, o.__wbindgen_realloc), i = a;
|
|
361
|
+
var s = w(_) ? 0 : b(_, o.__wbindgen_malloc, o.__wbindgen_realloc), u = a;
|
|
362
362
|
return o.wasmreader_fromBlobFragment(c, i, t, n, s, u);
|
|
363
363
|
}
|
|
364
364
|
/**
|
|
@@ -381,8 +381,8 @@ var be = G((de, C) => {
|
|
|
381
381
|
manifestStore() {
|
|
382
382
|
const e = o.wasmreader_manifestStore(this.__wbg_ptr);
|
|
383
383
|
if (e[2])
|
|
384
|
-
throw
|
|
385
|
-
return
|
|
384
|
+
throw d(e[1]);
|
|
385
|
+
return d(e[0]);
|
|
386
386
|
}
|
|
387
387
|
/**
|
|
388
388
|
* Accepts a URI reference to a binary object in the resource store and returns a `js_sys::Uint8Array` containing the resource's bytes.
|
|
@@ -390,17 +390,17 @@ var be = G((de, C) => {
|
|
|
390
390
|
* @returns {Uint8Array}
|
|
391
391
|
*/
|
|
392
392
|
resourceToBytes(e) {
|
|
393
|
-
const t =
|
|
393
|
+
const t = b(e, o.__wbindgen_malloc, o.__wbindgen_realloc), n = a, _ = o.wasmreader_resourceToBytes(this.__wbg_ptr, t, n);
|
|
394
394
|
if (_[2])
|
|
395
|
-
throw
|
|
396
|
-
return
|
|
395
|
+
throw d(_[1]);
|
|
396
|
+
return d(_[0]);
|
|
397
397
|
}
|
|
398
398
|
}
|
|
399
399
|
Symbol.dispose && (I.prototype[Symbol.dispose] = I.prototype.free);
|
|
400
400
|
function $(r) {
|
|
401
|
-
const e =
|
|
401
|
+
const e = b(r, o.__wbindgen_malloc, o.__wbindgen_realloc), t = a, n = o.loadSettings(e, t);
|
|
402
402
|
if (n[1])
|
|
403
|
-
throw
|
|
403
|
+
throw d(n[0]);
|
|
404
404
|
}
|
|
405
405
|
function H() {
|
|
406
406
|
return {
|
|
@@ -422,7 +422,7 @@ var be = G((de, C) => {
|
|
|
422
422
|
return w(n) ? 16777215 : n ? 1 : 0;
|
|
423
423
|
},
|
|
424
424
|
__wbg___wbindgen_debug_string_0accd80f45e5faa2: function(e, t) {
|
|
425
|
-
const n = x(t), _ =
|
|
425
|
+
const n = x(t), _ = b(n, o.__wbindgen_malloc, o.__wbindgen_realloc), c = a;
|
|
426
426
|
m().setInt32(e + 4, c, !0), m().setInt32(e + 0, _, !0);
|
|
427
427
|
},
|
|
428
428
|
__wbg___wbindgen_in_70a403a56e771704: function(e, t) {
|
|
@@ -456,7 +456,7 @@ var be = G((de, C) => {
|
|
|
456
456
|
},
|
|
457
457
|
__wbg___wbindgen_string_get_72bdf95d3ae505b1: function(e, t) {
|
|
458
458
|
const n = t, _ = typeof n == "string" ? n : void 0;
|
|
459
|
-
var c = w(_) ? 0 :
|
|
459
|
+
var c = w(_) ? 0 : b(_, o.__wbindgen_malloc, o.__wbindgen_realloc), i = a;
|
|
460
460
|
m().setInt32(e + 4, i, !0), m().setInt32(e + 0, c, !0);
|
|
461
461
|
},
|
|
462
462
|
__wbg___wbindgen_throw_1506f2235d1bdba0: function(e, t) {
|
|
@@ -788,7 +788,7 @@ var be = G((de, C) => {
|
|
|
788
788
|
}, arguments);
|
|
789
789
|
},
|
|
790
790
|
__wbg_stack_3b0d974bbf31e44f: function(e, t) {
|
|
791
|
-
const n = t.stack, _ =
|
|
791
|
+
const n = t.stack, _ = b(n, o.__wbindgen_malloc, o.__wbindgen_realloc), c = a;
|
|
792
792
|
m().setInt32(e + 4, c, !0), m().setInt32(e + 0, _, !0);
|
|
793
793
|
},
|
|
794
794
|
__wbg_static_accessor_GLOBAL_9d53f2689e622ca1: function() {
|
|
@@ -825,7 +825,7 @@ var be = G((de, C) => {
|
|
|
825
825
|
return e.then(t);
|
|
826
826
|
},
|
|
827
827
|
__wbg_url_6808f1c468f2d0cd: function(e, t) {
|
|
828
|
-
const n = t.url, _ =
|
|
828
|
+
const n = t.url, _ = b(n, o.__wbindgen_malloc, o.__wbindgen_realloc), c = a;
|
|
829
829
|
m().setInt32(e + 4, c, !0), m().setInt32(e + 0, _, !0);
|
|
830
830
|
},
|
|
831
831
|
__wbg_valueOf_41ae57308c1f031c: function(e) {
|
|
@@ -873,15 +873,15 @@ var be = G((de, C) => {
|
|
|
873
873
|
};
|
|
874
874
|
}
|
|
875
875
|
function X(r, e) {
|
|
876
|
-
o.
|
|
876
|
+
o.wasm_bindgen_4d7940e3be85a6dc___convert__closures_____invoke_______true_(r, e);
|
|
877
877
|
}
|
|
878
878
|
function Y(r, e, t) {
|
|
879
|
-
const n = o.
|
|
879
|
+
const n = o.wasm_bindgen_4d7940e3be85a6dc___convert__closures_____invoke___wasm_bindgen_4d7940e3be85a6dc___JsValue__core_ed718c3d60ebd546___result__Result_____wasm_bindgen_4d7940e3be85a6dc___JsError___true_(r, e, t);
|
|
880
880
|
if (n[1])
|
|
881
|
-
throw
|
|
881
|
+
throw d(n[0]);
|
|
882
882
|
}
|
|
883
883
|
function K(r, e, t, n) {
|
|
884
|
-
o.
|
|
884
|
+
o.wasm_bindgen_4d7940e3be85a6dc___convert__closures_____invoke___js_sys_a576b80f2209464___Function_fn_wasm_bindgen_4d7940e3be85a6dc___JsValue_____wasm_bindgen_4d7940e3be85a6dc___sys__Undefined___js_sys_a576b80f2209464___Function_fn_wasm_bindgen_4d7940e3be85a6dc___JsValue_____wasm_bindgen_4d7940e3be85a6dc___sys__Undefined_______true_(r, e, t, n);
|
|
885
885
|
}
|
|
886
886
|
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"], k = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
887
887
|
}, unregister: () => {
|
|
@@ -981,7 +981,7 @@ ${r.stack}` : n;
|
|
|
981
981
|
const t = e(r.length * 4, 4) >>> 0;
|
|
982
982
|
return te().set(r, t / 4), a = r.length, t;
|
|
983
983
|
}
|
|
984
|
-
function
|
|
984
|
+
function b(r, e, t) {
|
|
985
985
|
if (t === void 0) {
|
|
986
986
|
const s = j.encode(r), u = e(s.length, 1) >>> 0;
|
|
987
987
|
return T().subarray(u, u + s.length).set(s), a = s.length, u;
|
|
@@ -1001,7 +1001,7 @@ ${r.stack}` : n;
|
|
|
1001
1001
|
}
|
|
1002
1002
|
return a = i, _;
|
|
1003
1003
|
}
|
|
1004
|
-
function
|
|
1004
|
+
function d(r) {
|
|
1005
1005
|
const e = o.__wbindgen_externrefs.get(r);
|
|
1006
1006
|
return o.__externref_table_dealloc(r), e;
|
|
1007
1007
|
}
|
|
@@ -1121,7 +1121,7 @@ ${r.stack}` : n;
|
|
|
1121
1121
|
const e = r.manifests, t = Object.assign(/* @__PURE__ */ Object.create(null), e), n = Object.getPrototypeOf(e);
|
|
1122
1122
|
return n !== null && n !== Object.prototype && r.active_manifest && (t[r.active_manifest] = n), r.manifests = t, r;
|
|
1123
1123
|
}
|
|
1124
|
-
const p = D(),
|
|
1124
|
+
const p = D(), f = D(), V = se();
|
|
1125
1125
|
ie(
|
|
1126
1126
|
ue({
|
|
1127
1127
|
async initWorker(r, e) {
|
|
@@ -1165,70 +1165,70 @@ ${r.stack}` : n;
|
|
|
1165
1165
|
},
|
|
1166
1166
|
builder_new(r) {
|
|
1167
1167
|
const e = h.new(r);
|
|
1168
|
-
return
|
|
1168
|
+
return f.add(e);
|
|
1169
1169
|
},
|
|
1170
1170
|
builder_fromJson(r, e) {
|
|
1171
1171
|
const t = h.fromJson(r, e);
|
|
1172
|
-
return
|
|
1172
|
+
return f.add(t);
|
|
1173
1173
|
},
|
|
1174
1174
|
builder_fromArchive(r, e) {
|
|
1175
1175
|
const t = h.fromArchive(r, e);
|
|
1176
|
-
return
|
|
1176
|
+
return f.add(t);
|
|
1177
1177
|
},
|
|
1178
1178
|
builder_setIntent(r, e) {
|
|
1179
|
-
|
|
1179
|
+
f.get(r).setIntent(e);
|
|
1180
1180
|
},
|
|
1181
1181
|
builder_addAction(r, e) {
|
|
1182
|
-
|
|
1182
|
+
f.get(r).addAction(e);
|
|
1183
1183
|
},
|
|
1184
1184
|
builder_addAssertion(r, e, t) {
|
|
1185
|
-
|
|
1185
|
+
f.get(r).addAssertion(e, t);
|
|
1186
1186
|
},
|
|
1187
1187
|
builder_addRedaction(r, e, t) {
|
|
1188
|
-
|
|
1188
|
+
f.get(r).addRedaction(e, t);
|
|
1189
1189
|
},
|
|
1190
1190
|
builder_filterActionsAt(r, e) {
|
|
1191
|
-
|
|
1191
|
+
f.get(r).filterActionsAt(Uint32Array.from(e));
|
|
1192
1192
|
},
|
|
1193
1193
|
builder_updateActionsAt(r, e) {
|
|
1194
|
-
|
|
1194
|
+
f.get(r).updateActionsAt(e);
|
|
1195
1195
|
},
|
|
1196
1196
|
builder_filterIngredientsAt(r, e) {
|
|
1197
|
-
|
|
1197
|
+
f.get(r).filterIngredientsAt(Uint32Array.from(e));
|
|
1198
1198
|
},
|
|
1199
1199
|
builder_filterActionsAndIngredientsAt(r, e, t) {
|
|
1200
|
-
|
|
1200
|
+
f.get(r).filterActionsAndIngredientsAt(
|
|
1201
1201
|
Uint32Array.from(e),
|
|
1202
1202
|
Uint32Array.from(t)
|
|
1203
1203
|
);
|
|
1204
1204
|
},
|
|
1205
1205
|
builder_setRemoteUrl(r, e) {
|
|
1206
|
-
|
|
1206
|
+
f.get(r).setRemoteUrl(e);
|
|
1207
1207
|
},
|
|
1208
1208
|
builder_setNoEmbed(r, e) {
|
|
1209
|
-
|
|
1209
|
+
f.get(r).setNoEmbed(e);
|
|
1210
1210
|
},
|
|
1211
1211
|
builder_setThumbnailFromBlob(r, e, t) {
|
|
1212
|
-
|
|
1212
|
+
f.get(r).setThumbnailFromBlob(e, t);
|
|
1213
1213
|
},
|
|
1214
1214
|
builder_addIngredient(r, e) {
|
|
1215
|
-
|
|
1215
|
+
f.get(r).addIngredient(e);
|
|
1216
1216
|
},
|
|
1217
1217
|
async builder_addIngredientFromBlob(r, e, t, n) {
|
|
1218
|
-
await
|
|
1218
|
+
await f.get(r).addIngredientFromBlob(e, t, n);
|
|
1219
1219
|
},
|
|
1220
1220
|
builder_addResourceFromBlob(r, e, t) {
|
|
1221
|
-
|
|
1221
|
+
f.get(r).addResourceFromBlob(e, t);
|
|
1222
1222
|
},
|
|
1223
1223
|
builder_getDefinition(r) {
|
|
1224
|
-
return
|
|
1224
|
+
return f.get(r).getDefinition();
|
|
1225
1225
|
},
|
|
1226
1226
|
builder_toArchive(r) {
|
|
1227
|
-
const t =
|
|
1227
|
+
const t = f.get(r).toArchive();
|
|
1228
1228
|
return M(t, t.buffer);
|
|
1229
1229
|
},
|
|
1230
1230
|
async builder_sign(r, e, t, n, _) {
|
|
1231
|
-
const i = await
|
|
1231
|
+
const i = await f.get(r).sign(
|
|
1232
1232
|
{
|
|
1233
1233
|
reserveSize: t.reserveSize,
|
|
1234
1234
|
alg: t.alg,
|
|
@@ -1244,7 +1244,7 @@ ${r.stack}` : n;
|
|
|
1244
1244
|
return M(i, i.buffer);
|
|
1245
1245
|
},
|
|
1246
1246
|
async builder_signAndGetManifestBytes(r, e, t, n, _) {
|
|
1247
|
-
const c =
|
|
1247
|
+
const c = f.get(r), { manifest: i, asset: s } = await c.signAndGetManifestBytes(
|
|
1248
1248
|
{
|
|
1249
1249
|
reserveSize: t.reserveSize,
|
|
1250
1250
|
alg: t.alg,
|
|
@@ -1266,7 +1266,7 @@ ${r.stack}` : n;
|
|
|
1266
1266
|
);
|
|
1267
1267
|
},
|
|
1268
1268
|
builder_free(r) {
|
|
1269
|
-
|
|
1269
|
+
f.get(r).free(), f.remove(r);
|
|
1270
1270
|
}
|
|
1271
1271
|
})
|
|
1272
1272
|
);
|
|
@@ -1283,4 +1283,4 @@ ${r.stack}` : n;
|
|
|
1283
1283
|
return e;
|
|
1284
1284
|
}
|
|
1285
1285
|
});
|
|
1286
|
-
export default
|
|
1286
|
+
export default de();
|
package/dist/common.d.ts
CHANGED
|
@@ -10,6 +10,5 @@ export type * from './lib/c2pa.js';
|
|
|
10
10
|
export type { Reader, ReaderFactory } from './lib/reader.js';
|
|
11
11
|
export type { Builder, BuilderFactory, ManifestAndAssetBytes } from './lib/builder.js';
|
|
12
12
|
export type { Signer, SigningAlg } from './lib/signer.js';
|
|
13
|
-
export { isSupportedReaderFormat, READER_SUPPORTED_FORMATS } from './lib/supportedFormats.js';
|
|
14
13
|
export type * from '@contentauth/c2pa-types';
|
|
15
14
|
//# sourceMappingURL=common.d.ts.map
|
package/dist/common.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../src/common.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,mBAAmB,eAAe,CAAC;AAEnC,YAAY,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAE7D,YAAY,EACV,OAAO,EACP,cAAc,EACd,qBAAqB,EACtB,MAAM,kBAAkB,CAAC;AAE1B,YAAY,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../src/common.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,mBAAmB,eAAe,CAAC;AAEnC,YAAY,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAE7D,YAAY,EACV,OAAO,EACP,cAAc,EACd,qBAAqB,EACtB,MAAM,kBAAkB,CAAC;AAE1B,YAAY,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAG1D,mBAAmB,yBAAyB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,26 +1,24 @@
|
|
|
1
|
-
import { A as
|
|
1
|
+
import { A as a, D as t, a as r, b as _, c as E, d as T, e as A, f as S, g as i, h as R, i as g, j as o, k as n, l as L, m as D, n as l, r as F, o as M, s as c, p as f, v as I } from "./c2pa-CJjzMta6.js";
|
|
2
2
|
export {
|
|
3
|
-
|
|
3
|
+
a as AssetTooLargeError,
|
|
4
4
|
t as DEFAULT_INITIAL_RETRY_DELAY_MS,
|
|
5
5
|
r as DEFAULT_MAX_RESPONSE_BYTES,
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
R as createC2pa,
|
|
6
|
+
_ as DEFAULT_MAX_RETRIES,
|
|
7
|
+
E as DEFAULT_MAX_RETRY_AFTER_MS,
|
|
8
|
+
T as DEFAULT_MAX_RETRY_DELAY_MS,
|
|
9
|
+
A as DEFAULT_MAX_SIZE_IN_BYTES,
|
|
10
|
+
S as createC2pa,
|
|
12
11
|
i as createCawgTrustSettings,
|
|
13
|
-
|
|
12
|
+
R as createTrustSettings,
|
|
14
13
|
g as createVerifySettings,
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
M as loadSettingsFromUrl,
|
|
14
|
+
o as defaultIsRetryableStatus,
|
|
15
|
+
n as fetchWithRetry,
|
|
16
|
+
L as fetchWithRetryRaw,
|
|
17
|
+
D as loadSettingsFromUrl,
|
|
20
18
|
l as mergeSettings,
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
19
|
+
F as resolveSettings,
|
|
20
|
+
M as resolveTrustSettings,
|
|
21
|
+
c as settingsToJson,
|
|
22
|
+
f as snakeCaseify,
|
|
23
|
+
I as validateAssetSize
|
|
26
24
|
};
|