@contentauth/c2pa-web 0.13.4 → 0.14.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/README.md +6 -4
- package/dist/{c2pa-Di8FrHc6.js → c2pa-ClWjHDBi.js} +361 -251
- package/dist/common.d.ts +0 -1
- package/dist/common.d.ts.map +1 -1
- package/dist/index.d.ts +1 -13
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +23 -3
- package/dist/inline.js +12 -12
- package/dist/lib/builder.d.ts +1 -1
- package/dist/lib/builder.d.ts.map +1 -1
- package/dist/lib/c2pa.d.ts +14 -1
- package/dist/lib/c2pa.d.ts.map +1 -1
- package/dist/lib/error.d.ts +0 -3
- package/dist/lib/error.d.ts.map +1 -1
- package/dist/lib/reader.d.ts +1 -1
- package/dist/lib/reader.d.ts.map +1 -1
- package/dist/lib/signer.d.ts +2 -9
- package/dist/lib/signer.d.ts.map +1 -1
- package/dist/resources/c2pa_bg.wasm +0 -0
- package/package.json +29 -6
- package/LICENSE +0 -21
- package/dist/lib/settings.d.ts +0 -106
- package/dist/lib/settings.d.ts.map +0 -1
package/dist/lib/builder.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { WorkerManager } from './worker/workerManager.js';
|
|
2
2
|
import { Signer } from './signer.js';
|
|
3
3
|
import { Action, BuilderIntent, C2paReason, Ingredient, ManifestDefinition } from '@contentauth/c2pa-types';
|
|
4
|
-
import { Settings } from '
|
|
4
|
+
import { Settings } from '@contentauth/c2pa-utilities';
|
|
5
5
|
/**
|
|
6
6
|
* Functions that permit the creation of Builder objects.
|
|
7
7
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"builder.d.ts","sourceRoot":"","sources":["../../src/lib/builder.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAA0B,KAAK,MAAM,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AoB,EAAE,UAAU,EAChC,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,IAAI,KACP,OAAO,CAAC,IAAI,CAAC,CAAC;IAEnB;;;;;OAKG;IACH,mBAAmB,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAEvE;;;;OAIG;IACH,aAAa,EAAE,MAAM,OAAO,CAAC,kBAAkB,CAAC,CAAC;IAEjD;;;;;OAKG;IACH,SAAS,EAAE,MAAM,OAAO,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,CAAC;IAElD;;;;OAIG;IACH,IAAI,EAAE,CACJ,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,IAAI,KACP,OAAO,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,CAAC;IAEtC;;;;OAIG;IACH,uBAAuB,EAAE,CACvB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,IAAI,KACP,OAAO,CAAC,qBAAqB,CAAC,CAAC;IAEpC;;OAEG;IACH,IAAI,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC3B;AAkCD,MAAM,WAAW,qBAAqB;IACpC,QAAQ,EAAE,UAAU,CAAC,WAAW,CAAC,CAAC;IAClC,KAAK,EAAE,UAAU,CAAC,WAAW,CAAC,CAAC;CAChC;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,aAAa,EAAE,QAAQ,CAAC,EAAE,QAAQ,GAAG,cAAc,CA8C/F"}
|
package/dist/lib/c2pa.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReaderFactory } from './reader.js';
|
|
2
|
-
import { Settings } from '
|
|
2
|
+
import { Settings } from '@contentauth/c2pa-utilities';
|
|
3
3
|
import { BuilderFactory } from './builder.js';
|
|
4
4
|
export interface Config {
|
|
5
5
|
/**
|
|
@@ -34,5 +34,18 @@ export interface C2paSdk {
|
|
|
34
34
|
*/
|
|
35
35
|
dispose: () => void;
|
|
36
36
|
}
|
|
37
|
+
/**
|
|
38
|
+
* Creates a new instance of c2pa-web by setting up a web worker and preparing a WASM binary.
|
|
39
|
+
*
|
|
40
|
+
* @param config - SDK configuration object.
|
|
41
|
+
* @returns An object providing access to factory methods for creating new reader objects.
|
|
42
|
+
*
|
|
43
|
+
* @example Creating a new SDK instance and reader:
|
|
44
|
+
* ```
|
|
45
|
+
* const c2pa = await createC2pa({ wasmSrc: 'url/hosting/wasm/binary' });
|
|
46
|
+
*
|
|
47
|
+
* const reader = await c2pa.reader.fromBlob(imageBlob.type, imageBlob);
|
|
48
|
+
* ```
|
|
49
|
+
*/
|
|
37
50
|
export declare function createC2pa(config: Config): Promise<C2paSdk>;
|
|
38
51
|
//# sourceMappingURL=c2pa.d.ts.map
|
package/dist/lib/c2pa.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"c2pa.d.ts","sourceRoot":"","sources":["../../src/lib/c2pa.ts"],"names":[],"mappings":"AASA,OAAO,EAAuB,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjE,OAAO,EAAE,QAAQ,EAAmB,MAAM,
|
|
1
|
+
{"version":3,"file":"c2pa.d.ts","sourceRoot":"","sources":["../../src/lib/c2pa.ts"],"names":[],"mappings":"AASA,OAAO,EAAuB,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjE,OAAO,EAAE,QAAQ,EAAmB,MAAM,6BAA6B,CAAC;AACxE,OAAO,EAAE,cAAc,EAAwB,MAAM,cAAc,CAAC;AAEpE,MAAM,WAAW,MAAM;IACrB;;OAEG;IACH,OAAO,EAAE,MAAM,GAAG,WAAW,CAAC,MAAM,CAAC;IAErC;;;;;;;OAOG;IACH,SAAS,CAAC,EAAE,GAAG,CAAC;IAEhB;;OAEG;IACH,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACrB;AAED,MAAM,WAAW,OAAO;IACtB;;OAEG;IACH,MAAM,EAAE,aAAa,CAAC;IAEtB;;OAEG;IACH,OAAO,EAAE,cAAc,CAAC;IAExB;;OAEG;IACH,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAcjE"}
|
package/dist/lib/error.d.ts
CHANGED
|
@@ -6,9 +6,6 @@
|
|
|
6
6
|
* accordance with the terms of the Adobe license agreement accompanying
|
|
7
7
|
* it.
|
|
8
8
|
*/
|
|
9
|
-
export declare class AssetTooLargeError extends Error {
|
|
10
|
-
constructor(size: number);
|
|
11
|
-
}
|
|
12
9
|
export declare class UnsupportedFormatError extends Error {
|
|
13
10
|
constructor(format: string);
|
|
14
11
|
}
|
package/dist/lib/error.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../src/lib/error.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;
|
|
1
|
+
{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../src/lib/error.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,qBAAa,sBAAuB,SAAQ,KAAK;gBACnC,MAAM,EAAE,MAAM;CAI3B"}
|
package/dist/lib/reader.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Manifest, ManifestStore } from '@contentauth/c2pa-types';
|
|
2
2
|
import { WorkerManager } from './worker/workerManager.js';
|
|
3
|
-
import { Settings } from '
|
|
3
|
+
import { Settings } from '@contentauth/c2pa-utilities';
|
|
4
4
|
export declare const MAX_SIZE_IN_BYTES: number;
|
|
5
5
|
/**
|
|
6
6
|
* A collection of functions that permit the creation of Reader objects from various sources.
|
package/dist/lib/reader.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reader.d.ts","sourceRoot":"","s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OAEG;IACH,MAAM,EAAE,MAAM,OAAO,CAAC,GAAG,CAAC,CAAC;IAE3B;;;;;;;;;;;;;;OAcG;IACH,eAAe,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,CAAC;IAEnE;;OAEG;IACH,IAAI,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC3B;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,aAAa,EAAE,QAAQ,CAAC,EAAE,QAAQ,GAAG,aAAa,CAsE7F"}
|
package/dist/lib/signer.d.ts
CHANGED
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
* All Rights Reserved.
|
|
4
|
-
*
|
|
5
|
-
* NOTICE: Adobe permits you to use, modify, and distribute this file in
|
|
6
|
-
* accordance with the terms of the Adobe license agreement accompanying
|
|
7
|
-
* it.
|
|
8
|
-
*/
|
|
9
|
-
export type SigningAlg = 'es256' | 'es384' | 'es512' | 'ps256' | 'ps384' | 'ps512' | 'ed25519';
|
|
1
|
+
import { SigningAlg } from '@contentauth/c2pa-utilities';
|
|
2
|
+
export type { SigningAlg };
|
|
10
3
|
export interface Signer {
|
|
11
4
|
sign: (data: Uint8Array<ArrayBuffer>, reserveSize: number) => Promise<Uint8Array<ArrayBuffer>>;
|
|
12
5
|
reserveSize: () => Promise<number>;
|
package/dist/lib/signer.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signer.d.ts","sourceRoot":"","sources":["../../src/lib/signer.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,
|
|
1
|
+
{"version":3,"file":"signer.d.ts","sourceRoot":"","sources":["../../src/lib/signer.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAE9D,YAAY,EAAE,UAAU,EAAE,CAAC;AAE3B,MAAM,WAAW,MAAM;IACrB,IAAI,EAAE,CACJ,IAAI,EAAE,UAAU,CAAC,WAAW,CAAC,EAC7B,WAAW,EAAE,MAAM,KAChB,OAAO,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,CAAC;IACtC,WAAW,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,CAAC;IACnC,GAAG,EAAE,UAAU,CAAC;CACjB;AAED,MAAM,WAAW,0BAA0B;IACzC,WAAW,EAAE,MAAM,CAAC;IACpB,GAAG,EAAE,UAAU,CAAC;CACjB;AAED,wBAAsB,sBAAsB,CAC1C,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,0BAA0B,CAAC,CAQrC"}
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentauth/c2pa-web",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -16,25 +16,48 @@
|
|
|
16
16
|
"./package.json": "./package.json",
|
|
17
17
|
"./resources/c2pa.wasm": "./dist/resources/c2pa_bg.wasm",
|
|
18
18
|
".": {
|
|
19
|
+
"development": "./src/index.ts",
|
|
19
20
|
"types": "./dist/index.d.ts",
|
|
20
21
|
"import": "./dist/index.js",
|
|
21
22
|
"default": "./dist/index.js"
|
|
22
23
|
},
|
|
23
24
|
"./inline": {
|
|
25
|
+
"development": "./src/inline.ts",
|
|
24
26
|
"types": "./dist/inline.d.ts",
|
|
25
27
|
"import": "./dist/inline.js",
|
|
26
28
|
"default": "./dist/inline.js"
|
|
27
29
|
},
|
|
28
30
|
"./c2pa_worker": {
|
|
31
|
+
"development": "./src/lib/worker.ts",
|
|
29
32
|
"import": "./dist/c2pa_worker.js",
|
|
30
33
|
"default": "./dist/c2pa_worker.js"
|
|
31
34
|
}
|
|
32
35
|
},
|
|
36
|
+
"publishConfig": {
|
|
37
|
+
"exports": {
|
|
38
|
+
"./package.json": "./package.json",
|
|
39
|
+
"./resources/c2pa.wasm": "./dist/resources/c2pa_bg.wasm",
|
|
40
|
+
".": {
|
|
41
|
+
"types": "./dist/index.d.ts",
|
|
42
|
+
"import": "./dist/index.js",
|
|
43
|
+
"default": "./dist/index.js"
|
|
44
|
+
},
|
|
45
|
+
"./inline": {
|
|
46
|
+
"types": "./dist/inline.d.ts",
|
|
47
|
+
"import": "./dist/inline.js",
|
|
48
|
+
"default": "./dist/inline.js"
|
|
49
|
+
},
|
|
50
|
+
"./c2pa_worker": {
|
|
51
|
+
"import": "./dist/c2pa_worker.js",
|
|
52
|
+
"default": "./dist/c2pa_worker.js"
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
},
|
|
33
56
|
"dependencies": {
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"@contentauth/c2pa-
|
|
37
|
-
"
|
|
57
|
+
"@contentauth/c2pa-types": "workspace:*",
|
|
58
|
+
"@contentauth/c2pa-utilities": "workspace:*",
|
|
59
|
+
"@contentauth/c2pa-wasm": "workspace:*",
|
|
60
|
+
"highgain": "^0.1.0"
|
|
38
61
|
},
|
|
39
62
|
"devDependencies": {
|
|
40
63
|
"@playwright/test": "^1.60.0",
|
|
@@ -49,4 +72,4 @@
|
|
|
49
72
|
"scripts": {
|
|
50
73
|
"build:docs": "typedoc src/index.ts src/inline.ts"
|
|
51
74
|
}
|
|
52
|
-
}
|
|
75
|
+
}
|
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
© Copyright 2025 Adobe. All rights reserved.
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
package/dist/lib/settings.d.ts
DELETED
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright 2025 Adobe
|
|
3
|
-
* All Rights Reserved.
|
|
4
|
-
*
|
|
5
|
-
* NOTICE: Adobe permits you to use, modify, and distribute this file in
|
|
6
|
-
* accordance with the terms of the Adobe license agreement accompanying
|
|
7
|
-
* it.
|
|
8
|
-
*/
|
|
9
|
-
/**
|
|
10
|
-
* Settings configuration for C2PA operations.
|
|
11
|
-
*
|
|
12
|
-
* Encapsulates settings and configuration options for Reader and Builder operations.
|
|
13
|
-
* It provides a flexible way to configure SDK behavior including the verification configuration,
|
|
14
|
-
* trust configuration, and builder options.
|
|
15
|
-
*
|
|
16
|
-
* @example
|
|
17
|
-
* ```typescript
|
|
18
|
-
* const context: Context = {
|
|
19
|
-
* verify: {
|
|
20
|
-
* verifyTrust: true,
|
|
21
|
-
* verifyAfterReading: true
|
|
22
|
-
* },
|
|
23
|
-
* trust: {
|
|
24
|
-
* trustAnchors: 'https://example.com/anchors.pem'
|
|
25
|
-
* }
|
|
26
|
-
* };
|
|
27
|
-
*
|
|
28
|
-
* const reader = await c2pa.reader.fromBlob(blob.type, blob, JSON.stringify(context));
|
|
29
|
-
* ```
|
|
30
|
-
*/
|
|
31
|
-
export interface Settings {
|
|
32
|
-
/**
|
|
33
|
-
* Trust configuration for C2PA claim validation.
|
|
34
|
-
*/
|
|
35
|
-
trust?: TrustSettings;
|
|
36
|
-
/**
|
|
37
|
-
* Trust configuration for CAWG identity validation.
|
|
38
|
-
*/
|
|
39
|
-
cawgTrust?: CawgTrustSettings;
|
|
40
|
-
/**
|
|
41
|
-
* Verification settings.
|
|
42
|
-
*/
|
|
43
|
-
verify?: VerifySettings;
|
|
44
|
-
/**
|
|
45
|
-
* Builder settings.
|
|
46
|
-
*/
|
|
47
|
-
builder?: BuilderSettings;
|
|
48
|
-
}
|
|
49
|
-
export interface TrustSettings {
|
|
50
|
-
/**
|
|
51
|
-
* "User" trust anchors. Any asset validated off of this trust list will will have a "signingCredential.trusted" result with an explanation noting the trust source is a "User" anchor.
|
|
52
|
-
*
|
|
53
|
-
* Possible values are: the text content of a .pem file, a URL to fetch a .pem file from, or an array of URLs that will be fetched and concatenated.
|
|
54
|
-
*/
|
|
55
|
-
userAnchors?: string | string[];
|
|
56
|
-
/**
|
|
57
|
-
* "System" trust anchors. Any asset validated off of this trust list will will have a "signingCredential.trusted" result with an explanation noting the trust source is a "System" anchor.
|
|
58
|
-
*
|
|
59
|
-
* Possible values are: the text content of a .pem file, a URL to fetch a .pem file from, or an array of URLs that will be fetched and concatenated.
|
|
60
|
-
*/
|
|
61
|
-
trustAnchors?: string | string[];
|
|
62
|
-
/**
|
|
63
|
-
* Trust store
|
|
64
|
-
*
|
|
65
|
-
* Possible values are: the text content of a .cfg file, a URL to fetch a .cfg file from, or an array of URLs that will be fetched and concatenated.
|
|
66
|
-
*/
|
|
67
|
-
trustConfig?: string | string[];
|
|
68
|
-
/**
|
|
69
|
-
* End-entity certificates.
|
|
70
|
-
*
|
|
71
|
-
* Possible values are: the text content of a end-entity cert file, a URL to fetch a end-entity cert file from, or an array of URLs that will be fetched and concatenated.
|
|
72
|
-
*/
|
|
73
|
-
allowedList?: string | string[];
|
|
74
|
-
}
|
|
75
|
-
export interface CawgTrustSettings extends TrustSettings {
|
|
76
|
-
/**
|
|
77
|
-
* Enable CAWG trust validation. The default value is "true."
|
|
78
|
-
*/
|
|
79
|
-
verifyTrustList?: boolean;
|
|
80
|
-
}
|
|
81
|
-
export interface VerifySettings {
|
|
82
|
-
/**
|
|
83
|
-
* Enable trust validation. The default value is "true."
|
|
84
|
-
*/
|
|
85
|
-
verifyTrust?: boolean;
|
|
86
|
-
verifyAfterReading?: boolean;
|
|
87
|
-
}
|
|
88
|
-
export interface BuilderSettings {
|
|
89
|
-
/**
|
|
90
|
-
* Whether to generate a C2PA archive (instead of zip) when writing the manifest builder.
|
|
91
|
-
*/
|
|
92
|
-
generateC2paArchive?: boolean;
|
|
93
|
-
}
|
|
94
|
-
export declare const MAX_RESPONSE_SIZE: number;
|
|
95
|
-
/**
|
|
96
|
-
* Resolves settings by merging override settings on top of base settings, resolving any embedded
|
|
97
|
-
* trust list URLs on top of those, and then finally serializing the result for consumption by c2pa-rs.
|
|
98
|
-
*
|
|
99
|
-
* @param baseSettings Settings established at SDK initialization time.
|
|
100
|
-
* @param overrideSettings Optional override settings. Keys present in overrideSettings win over keys in baseSettings.
|
|
101
|
-
* @returns A JSON-serialized string containing all resolved settings values, ready to be consumed by c2pa-rs.
|
|
102
|
-
* Returns undefined when neither argument is provided.
|
|
103
|
-
*/
|
|
104
|
-
export declare function resolveSettings(baseSettings: Settings | undefined, overrideSettings: Settings | undefined): Promise<string | undefined>;
|
|
105
|
-
export declare const TRUST_MAX_RETRY_AFTER_MS = 30000;
|
|
106
|
-
//# sourceMappingURL=settings.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"settings.d.ts","sourceR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