@faubulous/mentor-rdf 0.2.21 → 0.2.23
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/out/rdf/individual-repository.d.ts +2 -1
- package/out/rdf/individual-repository.js +3 -2
- package/out/rdf/individual-repository.js.map +1 -1
- package/out/rdf/parsers/tokenizer.js +2 -1
- package/out/rdf/parsers/tokenizer.js.map +1 -1
- package/out/rdf/parsers/trig-syntax-parser.d.ts +1 -1
- package/out/rdf/parsers/trig-syntax-parser.js +2 -2
- package/out/rdf/parsers/trig-syntax-parser.js.map +1 -1
- package/out/rdf/parsers/turtle-syntax-parser.d.ts +13 -0
- package/out/rdf/parsers/turtle-syntax-parser.js +29 -0
- package/out/rdf/parsers/turtle-syntax-parser.js.map +1 -0
- package/out/rdf/resource-repository.d.ts +1 -1
- package/out/rdf/resource-repository.js +1 -1
- package/out/rdf/vocabulary-repository.d.ts +6 -0
- package/out/rdf/vocabulary-repository.js +16 -0
- package/out/rdf/vocabulary-repository.js.map +1 -1
- package/package.json +1 -1
|
@@ -10,9 +10,10 @@ export declare class IndividualRepository extends PropertyRepository {
|
|
|
10
10
|
* Get all classes that have instances or all types of a specific individual.
|
|
11
11
|
* @param graphUris The graph URIs to search.
|
|
12
12
|
* @param subjectUri The URI of a subject for which to get the types (optional).
|
|
13
|
+
* @param options Options for retrieving the individuals.
|
|
13
14
|
* @returns A list of all individual types, or all types of a specific individual.
|
|
14
15
|
*/
|
|
15
|
-
getIndividualTypes(graphUris: string | string[] | undefined, subjectUri?: string): string[];
|
|
16
|
+
getIndividualTypes(graphUris: string | string[] | undefined, subjectUri?: string, options?: DefinitionQueryOptions): string[];
|
|
16
17
|
/**
|
|
17
18
|
* Get all individuals in the repository.
|
|
18
19
|
* @param typeUri The type of the individuals to get.
|
|
@@ -14,14 +14,15 @@ class IndividualRepository extends property_repository_1.PropertyRepository {
|
|
|
14
14
|
* Get all classes that have instances or all types of a specific individual.
|
|
15
15
|
* @param graphUris The graph URIs to search.
|
|
16
16
|
* @param subjectUri The URI of a subject for which to get the types (optional).
|
|
17
|
+
* @param options Options for retrieving the individuals.
|
|
17
18
|
* @returns A list of all individual types, or all types of a specific individual.
|
|
18
19
|
*/
|
|
19
|
-
getIndividualTypes(graphUris, subjectUri) {
|
|
20
|
+
getIndividualTypes(graphUris, subjectUri, options) {
|
|
20
21
|
const result = new Set();
|
|
21
22
|
const subject = subjectUri ? new n3.NamedNode(subjectUri) : null;
|
|
22
23
|
for (const q of this.store.match(graphUris, subject, ontologies_1.rdf.type, ontologies_1.owl.NamedIndividual)) {
|
|
23
24
|
const s = q.subject;
|
|
24
|
-
if (this.skip(graphUris, s)) {
|
|
25
|
+
if (this.skip(graphUris, s, options)) {
|
|
25
26
|
continue;
|
|
26
27
|
}
|
|
27
28
|
for (const p of this.store.match(graphUris, s, ontologies_1.rdf.type, null)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"individual-repository.js","sourceRoot":"","sources":["../../src/rdf/individual-repository.ts"],"names":[],"mappings":";;;;AAAA,+CAAyB;AACzB,8CAAyC;AAEzC,+DAA2D;AAG3D;;GAEG;AACH,MAAa,oBAAqB,SAAQ,wCAAkB;IACxD,YAAY,KAAY,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAE3C
|
|
1
|
+
{"version":3,"file":"individual-repository.js","sourceRoot":"","sources":["../../src/rdf/individual-repository.ts"],"names":[],"mappings":";;;;AAAA,+CAAyB;AACzB,8CAAyC;AAEzC,+DAA2D;AAG3D;;GAEG;AACH,MAAa,oBAAqB,SAAQ,wCAAkB;IACxD,YAAY,KAAY,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAE3C;;;;;;OAMG;IACH,kBAAkB,CAAC,SAAwC,EAAE,UAAmB,EAAE,OAAgC;QAC9G,MAAM,MAAM,GAAG,IAAI,GAAG,EAAU,CAAC;QACjC,MAAM,OAAO,GAAG,UAAU,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CAAC,SAAS,EAAE,CAAC,CAAC,KAAK,EAAE,OAAO,CAAC,EAAE;gBAChE,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;aACvB;SACJ;QAED,OAAO,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC9B,CAAC;IAED;;;;;OAKG;IACH,gBAAgB,CAAC,SAAwC,EAAE,UAAkB,EAAE,OAAe;QAC1F,MAAM,OAAO,GAAG,IAAI,EAAE,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;QAC7C,MAAM,IAAI,GAAG,IAAI,EAAE,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;QAEvC,KAAK,MAAM,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,SAAS,EAAE,OAAO,EAAE,gBAAG,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE;YAClE,MAAM,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC;YAEnB,IAAI,CAAC,CAAC,QAAQ,IAAI,WAAW,EAAE;gBAC3B,SAAS;aACZ;YAED,IAAI,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,YAAY,CAAC,SAAS,EAAE,CAAC,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,EAAE;gBACrE,OAAO,IAAI,CAAC;aACf;SACJ;QAED,OAAO,KAAK,CAAC;IACjB,CAAC;CACJ;AAjFD,oDAiFC"}
|
|
@@ -5,6 +5,7 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const rdf_syntax_1 = require("./rdf-syntax");
|
|
6
6
|
const trig_syntax_parser_1 = require("./trig-syntax-parser");
|
|
7
7
|
const sparql_syntax_parser_1 = require("./sparql-syntax-parser");
|
|
8
|
+
const turtle_syntax_parser_1 = require("./turtle-syntax-parser");
|
|
8
9
|
/**
|
|
9
10
|
* Parses RDF data into tokens.
|
|
10
11
|
*/
|
|
@@ -18,7 +19,7 @@ class Tokenizer {
|
|
|
18
19
|
return { tokens, syntaxErrors: errors, semanticErrors };
|
|
19
20
|
}
|
|
20
21
|
else {
|
|
21
|
-
const parser = new trig_syntax_parser_1.TrigSyntaxParser();
|
|
22
|
+
const parser = syntax === rdf_syntax_1.RdfSyntax.TriG ? new trig_syntax_parser_1.TrigSyntaxParser() : new turtle_syntax_parser_1.TurtleSyntaxParser();
|
|
22
23
|
const { errors, semanticErrors, comments } = parser.parse(data);
|
|
23
24
|
const tokens = [...parser.input, ...comments];
|
|
24
25
|
return { tokens, syntaxErrors: errors, semanticErrors };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokenizer.js","sourceRoot":"","sources":["../../../src/rdf/parsers/tokenizer.ts"],"names":[],"mappings":";;;;AAEA,6CAAyC;AACzC,6DAAwD;AACxD,iEAA4D;AAW5D;;GAEG;AACH,MAAa,SAAS;IAClB,MAAM,CAAO,SAAS,CAAC,IAAY,EAAE,MAAiB;;YAClD,IAAI,MAAM,KAAK,sBAAS,CAAC,MAAM,EAAE;gBAC7B,MAAM,MAAM,GAAG,IAAI,yCAAkB,EAAE,CAAC;gBAExC,MAAM,EAAE,MAAM,EAAE,cAAc,EAAE,QAAQ,EAAE,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;gBAChE,MAAM,MAAM,GAAG,CAAC,GAAG,MAAM,CAAC,KAAK,EAAE,GAAG,QAAQ,CAAC,CAAC;gBAE9C,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,cAAc,EAAE,CAAC;aAC3D;iBAAM;gBACH,MAAM,MAAM,GAAG,IAAI,qCAAgB,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"tokenizer.js","sourceRoot":"","sources":["../../../src/rdf/parsers/tokenizer.ts"],"names":[],"mappings":";;;;AAEA,6CAAyC;AACzC,6DAAwD;AACxD,iEAA4D;AAC5D,iEAA4D;AAW5D;;GAEG;AACH,MAAa,SAAS;IAClB,MAAM,CAAO,SAAS,CAAC,IAAY,EAAE,MAAiB;;YAClD,IAAI,MAAM,KAAK,sBAAS,CAAC,MAAM,EAAE;gBAC7B,MAAM,MAAM,GAAG,IAAI,yCAAkB,EAAE,CAAC;gBAExC,MAAM,EAAE,MAAM,EAAE,cAAc,EAAE,QAAQ,EAAE,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;gBAChE,MAAM,MAAM,GAAG,CAAC,GAAG,MAAM,CAAC,KAAK,EAAE,GAAG,QAAQ,CAAC,CAAC;gBAE9C,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,cAAc,EAAE,CAAC;aAC3D;iBAAM;gBACH,MAAM,MAAM,GAAG,MAAM,KAAK,sBAAS,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,qCAAgB,EAAE,CAAC,CAAC,CAAC,IAAI,yCAAkB,EAAE,CAAC;gBAE7F,MAAM,EAAE,MAAM,EAAE,cAAc,EAAE,QAAQ,EAAE,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;gBAChE,MAAM,MAAM,GAAG,CAAC,GAAG,MAAM,CAAC,KAAK,EAAE,GAAG,QAAQ,CAAC,CAAC;gBAE9C,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,cAAc,EAAE,CAAC;aAC3D;QACL,CAAC;KAAA;CACJ;AAlBD,8BAkBC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IRecognitionException, IToken } from "chevrotain";
|
|
2
2
|
import { TrigParser } from "millan";
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* A TriG document parser that also returns comments.
|
|
5
5
|
*/
|
|
6
6
|
export declare class TrigSyntaxParser extends TrigParser {
|
|
7
7
|
parse: (document: string) => {
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.TrigSyntaxParser = void 0;
|
|
4
4
|
const millan_1 = require("millan");
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* A TriG document parser that also returns comments.
|
|
7
7
|
*/
|
|
8
8
|
class TrigSyntaxParser extends millan_1.TrigParser {
|
|
9
9
|
constructor() {
|
|
@@ -11,7 +11,7 @@ class TrigSyntaxParser extends millan_1.TrigParser {
|
|
|
11
11
|
this.parse = (document) => {
|
|
12
12
|
const result = this.lexer.tokenize(document);
|
|
13
13
|
this.input = result.tokens;
|
|
14
|
-
const cst = this.
|
|
14
|
+
const cst = this.trigDoc(0, ['standard']);
|
|
15
15
|
const errors = [...this.errors];
|
|
16
16
|
const semanticErrors = [...this.semanticErrors];
|
|
17
17
|
const comments = result.groups.comments || [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trig-syntax-parser.js","sourceRoot":"","sources":["../../../src/rdf/parsers/trig-syntax-parser.ts"],"names":[],"mappings":";;;AACA,mCAAoC;AAEpC;;GAEG;AACH,MAAa,gBAAiB,SAAQ,mBAAU;IAAhD;;QACW,UAAK,GAAG,CAAC,QAAgB,EAK9B,EAAE;YACA,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;YAE7C,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC;YAE3B,MAAM,GAAG,GAAG,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"trig-syntax-parser.js","sourceRoot":"","sources":["../../../src/rdf/parsers/trig-syntax-parser.ts"],"names":[],"mappings":";;;AACA,mCAAoC;AAEpC;;GAEG;AACH,MAAa,gBAAiB,SAAQ,mBAAU;IAAhD;;QACW,UAAK,GAAG,CAAC,QAAgB,EAK9B,EAAE;YACA,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;YAE7C,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC;YAE3B,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC;YAC1C,MAAM,MAAM,GAA4B,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC;YACzD,MAAM,cAAc,GAA4B,CAAC,GAAG,IAAI,CAAC,cAAc,CAAC,CAAC;YACzE,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,QAAQ,IAAI,EAAE,CAAC;YAE9C,IAAI,CAAC,iBAAiB,EAAE,CAAC;YAEzB,OAAO;gBACH,MAAM;gBACN,cAAc;gBACd,QAAQ;gBACR,GAAG;aACN,CAAC;QACN,CAAC,CAAC;IACN,CAAC;CAAA;AAzBD,4CAyBC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IRecognitionException, IToken } from "chevrotain";
|
|
2
|
+
import { TrigParser } from "millan";
|
|
3
|
+
/**
|
|
4
|
+
* A Turtle document parser that also returns comments.
|
|
5
|
+
*/
|
|
6
|
+
export declare class TurtleSyntaxParser extends TrigParser {
|
|
7
|
+
parse: (document: string) => {
|
|
8
|
+
errors: IRecognitionException[];
|
|
9
|
+
semanticErrors: IRecognitionException[];
|
|
10
|
+
comments: IToken[];
|
|
11
|
+
cst: any;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TurtleSyntaxParser = void 0;
|
|
4
|
+
const millan_1 = require("millan");
|
|
5
|
+
/**
|
|
6
|
+
* A Turtle document parser that also returns comments.
|
|
7
|
+
*/
|
|
8
|
+
class TurtleSyntaxParser extends millan_1.TrigParser {
|
|
9
|
+
constructor() {
|
|
10
|
+
super(...arguments);
|
|
11
|
+
this.parse = (document) => {
|
|
12
|
+
const result = this.lexer.tokenize(document);
|
|
13
|
+
this.input = result.tokens;
|
|
14
|
+
const cst = this.turtleDoc(0, ['standard']);
|
|
15
|
+
const errors = [...this.errors];
|
|
16
|
+
const semanticErrors = [...this.semanticErrors];
|
|
17
|
+
const comments = result.groups.comments || [];
|
|
18
|
+
this.resetManagedState();
|
|
19
|
+
return {
|
|
20
|
+
errors,
|
|
21
|
+
semanticErrors,
|
|
22
|
+
comments,
|
|
23
|
+
cst,
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
exports.TurtleSyntaxParser = TurtleSyntaxParser;
|
|
29
|
+
//# sourceMappingURL=turtle-syntax-parser.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"turtle-syntax-parser.js","sourceRoot":"","sources":["../../../src/rdf/parsers/turtle-syntax-parser.ts"],"names":[],"mappings":";;;AACA,mCAAoC;AAEpC;;GAEG;AACH,MAAa,kBAAmB,SAAQ,mBAAU;IAAlD;;QACW,UAAK,GAAG,CAAC,QAAgB,EAK9B,EAAE;YACA,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;YAE7C,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC;YAE3B,MAAM,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC;YAC5C,MAAM,MAAM,GAA4B,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC;YACzD,MAAM,cAAc,GAA4B,CAAC,GAAG,IAAI,CAAC,cAAc,CAAC,CAAC;YACzE,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,QAAQ,IAAI,EAAE,CAAC;YAE9C,IAAI,CAAC,iBAAiB,EAAE,CAAC;YAEzB,OAAO;gBACH,MAAM;gBACN,cAAc;gBACd,QAAQ;gBACR,GAAG;aACN,CAAC;QACN,CAAC,CAAC;IACN,CAAC;CAAA;AAzBD,gDAyBC"}
|
|
@@ -39,7 +39,7 @@ export declare class ResourceRepository {
|
|
|
39
39
|
*/
|
|
40
40
|
hasSubject(graphUris: string | string[] | undefined, subjectUri: string): boolean;
|
|
41
41
|
/**
|
|
42
|
-
* Indicate if a node is explicitly defined by the given URI using the rdfs:isDefinedBy property.
|
|
42
|
+
* Indicate if a node is explicitly defined by the given URI using the `rdfs:isDefinedBy` property.
|
|
43
43
|
* @param graphUris URIs of the graphs to search.
|
|
44
44
|
* @param node A named node to check if it is defined by the given URI.
|
|
45
45
|
* @param definedBy URI of the vocabulary that defines the resource (rdfs:isDefinedBy).
|
|
@@ -37,7 +37,7 @@ class ResourceRepository {
|
|
|
37
37
|
return false;
|
|
38
38
|
}
|
|
39
39
|
/**
|
|
40
|
-
* Indicate if a node is explicitly defined by the given URI using the rdfs:isDefinedBy property.
|
|
40
|
+
* Indicate if a node is explicitly defined by the given URI using the `rdfs:isDefinedBy` property.
|
|
41
41
|
* @param graphUris URIs of the graphs to search.
|
|
42
42
|
* @param node A named node to check if it is defined by the given URI.
|
|
43
43
|
* @param definedBy URI of the vocabulary that defines the resource (rdfs:isDefinedBy).
|
|
@@ -34,4 +34,10 @@ export declare class VocabularyRepository extends IndividualRepository {
|
|
|
34
34
|
* @returns The version of the ontology, or undefined if it is not found.
|
|
35
35
|
*/
|
|
36
36
|
getOntologyVersionInfo(graphUris: string | string[] | undefined, ontologyUri: string): string | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* Get the sources of definitions for a given graph. These are the objects of `rdfs:isDefinedBy` triples.
|
|
39
|
+
* @param graphUris URIs of the graphs to search.
|
|
40
|
+
* @returns A list of sources of definitions for the given graph.
|
|
41
|
+
*/
|
|
42
|
+
getDefinitionSources(graphUris: string | string[] | undefined): string[];
|
|
37
43
|
}
|
|
@@ -76,6 +76,22 @@ class VocabularyRepository extends individual_repository_1.IndividualRepository
|
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
|
+
/**
|
|
80
|
+
* Get the sources of definitions for a given graph. These are the objects of `rdfs:isDefinedBy` triples.
|
|
81
|
+
* @param graphUris URIs of the graphs to search.
|
|
82
|
+
* @returns A list of sources of definitions for the given graph.
|
|
83
|
+
*/
|
|
84
|
+
getDefinitionSources(graphUris) {
|
|
85
|
+
const result = new Set();
|
|
86
|
+
for (const q of this.store.match(graphUris, null, ontologies_1.rdfs.isDefinedBy, null)) {
|
|
87
|
+
const o = q.object;
|
|
88
|
+
if (o.termType != "NamedNode") {
|
|
89
|
+
continue;
|
|
90
|
+
}
|
|
91
|
+
result.add(o.value);
|
|
92
|
+
}
|
|
93
|
+
return Array.from(result);
|
|
94
|
+
}
|
|
79
95
|
}
|
|
80
96
|
exports.VocabularyRepository = VocabularyRepository;
|
|
81
97
|
//# sourceMappingURL=vocabulary-repository.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vocabulary-repository.js","sourceRoot":"","sources":["../../src/rdf/vocabulary-repository.ts"],"names":[],"mappings":";;;;AAAA,+CAAyB;AACzB,
|
|
1
|
+
{"version":3,"file":"vocabulary-repository.js","sourceRoot":"","sources":["../../src/rdf/vocabulary-repository.ts"],"names":[],"mappings":";;;;AAAA,+CAAyB;AACzB,8CAAqD;AACrD,mEAA+D;AAE/D;;GAEG;AACH,MAAa,oBAAqB,SAAQ,4CAAoB;IAC1D;;;;OAIG;IACI,iBAAiB,CAAC,SAAwC;QAC7D,MAAM,MAAM,GAAG,IAAI,GAAG,EAAU,CAAC;QAEjC,KAAK,MAAM,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,SAAS,EAAE,IAAI,EAAE,gBAAG,CAAC,IAAI,EAAE,iBAAI,CAAC,aAAa,CAAC,EAAE;YAC7E,MAAM,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC;YAEpB,IAAI,CAAC,CAAC,QAAQ,IAAI,WAAW,EAAE;gBAC3B,SAAS;aACZ;YAED,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;SACvB;QAED,OAAO,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC9B,CAAC;I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