@plurnk/plurnk-mimetypes-text-graphql 0.2.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/LICENSE +21 -0
- package/README.md +15 -0
- package/dist/TextGraphql.d.ts +7 -0
- package/dist/TextGraphql.d.ts.map +1 -0
- package/dist/TextGraphql.js +191 -0
- package/dist/TextGraphql.js.map +1 -0
- package/dist/generated/GraphQLLexer.d.ts +89 -0
- package/dist/generated/GraphQLLexer.d.ts.map +1 -0
- package/dist/generated/GraphQLLexer.js +389 -0
- package/dist/generated/GraphQLLexer.js.map +1 -0
- package/dist/generated/GraphQLParser.d.ts +785 -0
- package/dist/generated/GraphQLParser.d.ts.map +1 -0
- package/dist/generated/GraphQLParser.js +5470 -0
- package/dist/generated/GraphQLParser.js.map +1 -0
- package/dist/generated/GraphQLVisitor.d.ts +522 -0
- package/dist/generated/GraphQLVisitor.d.ts.map +1 -0
- package/dist/generated/GraphQLVisitor.js +449 -0
- package/dist/generated/GraphQLVisitor.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -0
- package/grammar/GraphQL.g4 +571 -0
- package/package.json +56 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 PossumTech Laboratories
|
|
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/README.md
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# @plurnk/plurnk-mimetypes-text-graphql
|
|
2
|
+
|
|
3
|
+
application/graphql mimetype handler for plurnk-service. ANTLR-backed extraction using grammars-v4's `graphql` grammar.
|
|
4
|
+
|
|
5
|
+
## Symbols emitted
|
|
6
|
+
|
|
7
|
+
Per SPEC §3 inclusion policy: classes, functions, methods, fields, interfaces, enums, types, modules, variables, constants. Imports excluded; locals inside function bodies excluded.
|
|
8
|
+
|
|
9
|
+
## Install
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm install @plurnk/plurnk-mimetypes-text-graphql
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Auto-discovered by `@plurnk/plurnk-mimetypes` when installed alongside it.
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { AntlrExtractor } from "@plurnk/plurnk-mimetypes";
|
|
2
|
+
import type { ExtractionVisitor } from "@plurnk/plurnk-mimetypes";
|
|
3
|
+
export default class TextGraphql extends AntlrExtractor {
|
|
4
|
+
protected parseTree(content: string): unknown;
|
|
5
|
+
protected createVisitor(): ExtractionVisitor;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=TextGraphql.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextGraphql.d.ts","sourceRoot":"","sources":["../src/TextGraphql.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAiB,MAAM,0BAA0B,CAAC;AACzE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAWlE,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,cAAc;IACnD,SAAS,CAAC,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO;IAQ7C,SAAS,CAAC,aAAa,IAAI,iBAAiB;CAG/C"}
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
import { AntlrExtractor, withExtractor } from "@plurnk/plurnk-mimetypes";
|
|
2
|
+
import { CharStream, CommonTokenStream } from "antlr4ng";
|
|
3
|
+
import { GraphQLLexer } from "./generated/GraphQLLexer.js";
|
|
4
|
+
import { GraphQLParser } from "./generated/GraphQLParser.js";
|
|
5
|
+
import { GraphQLVisitor } from "./generated/GraphQLVisitor.js";
|
|
6
|
+
// application/graphql handler. ANTLR grammar from grammars-v4/graphql.
|
|
7
|
+
//
|
|
8
|
+
// Parser entry rule: document. The grammar covers both SDL schemas
|
|
9
|
+
// (type/input/enum/interface/union/scalar/directive/schema) and
|
|
10
|
+
// executable documents (query/mutation/subscription/fragment).
|
|
11
|
+
export default class TextGraphql extends AntlrExtractor {
|
|
12
|
+
parseTree(content) {
|
|
13
|
+
const lexer = new GraphQLLexer(CharStream.fromString(content));
|
|
14
|
+
const tokens = new CommonTokenStream(lexer);
|
|
15
|
+
const parser = new GraphQLParser(tokens);
|
|
16
|
+
parser.removeErrorListeners();
|
|
17
|
+
return parser.document();
|
|
18
|
+
}
|
|
19
|
+
createVisitor() {
|
|
20
|
+
return new TextGraphqlVisitor();
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
// SPEC §3 mapping for GraphQL:
|
|
24
|
+
// type X { ... } → class; fieldDefinition → field/method
|
|
25
|
+
// input X { ... } → class; inputValueDefinition → field
|
|
26
|
+
// interface X { ... } → interface
|
|
27
|
+
// union X = A | B | C → type
|
|
28
|
+
// enum X { A B C } → enum
|
|
29
|
+
// scalar X → type
|
|
30
|
+
// directive @x on ... → function (`@x` rendered with leading @)
|
|
31
|
+
// schema { query: Q ... } → module (top-level entry container)
|
|
32
|
+
// query/mutation/subscription → method (named operations; anon skipped)
|
|
33
|
+
// fragment X on Y { ... } → method (rendered as `fragment X`)
|
|
34
|
+
class TextGraphqlVisitor extends withExtractor(GraphQLVisitor) {
|
|
35
|
+
visitObjectTypeDefinition = (ctx) => {
|
|
36
|
+
if (this.inBody)
|
|
37
|
+
return null;
|
|
38
|
+
const name = nameText(ctx.name?.());
|
|
39
|
+
if (!name)
|
|
40
|
+
return null;
|
|
41
|
+
this.addSymbol("class", name, ctx);
|
|
42
|
+
this.visitChildren(ctx);
|
|
43
|
+
return null;
|
|
44
|
+
};
|
|
45
|
+
visitInterfaceTypeDefinition = (ctx) => {
|
|
46
|
+
if (this.inBody)
|
|
47
|
+
return null;
|
|
48
|
+
const name = nameText(ctx.name?.());
|
|
49
|
+
if (!name)
|
|
50
|
+
return null;
|
|
51
|
+
this.addSymbol("interface", name, ctx);
|
|
52
|
+
this.visitChildren(ctx);
|
|
53
|
+
return null;
|
|
54
|
+
};
|
|
55
|
+
visitUnionTypeDefinition = (ctx) => {
|
|
56
|
+
if (this.inBody)
|
|
57
|
+
return null;
|
|
58
|
+
const name = nameText(ctx.name?.());
|
|
59
|
+
if (name)
|
|
60
|
+
this.addSymbol("type", name, ctx);
|
|
61
|
+
return null;
|
|
62
|
+
};
|
|
63
|
+
visitEnumTypeDefinition = (ctx) => {
|
|
64
|
+
if (this.inBody)
|
|
65
|
+
return null;
|
|
66
|
+
const name = nameText(ctx.name?.());
|
|
67
|
+
if (name)
|
|
68
|
+
this.addSymbol("enum", name, ctx);
|
|
69
|
+
return null;
|
|
70
|
+
};
|
|
71
|
+
visitScalarTypeDefinition = (ctx) => {
|
|
72
|
+
if (this.inBody)
|
|
73
|
+
return null;
|
|
74
|
+
const name = nameText(ctx.name?.());
|
|
75
|
+
if (name)
|
|
76
|
+
this.addSymbol("type", name, ctx);
|
|
77
|
+
return null;
|
|
78
|
+
};
|
|
79
|
+
visitInputObjectTypeDefinition = (ctx) => {
|
|
80
|
+
if (this.inBody)
|
|
81
|
+
return null;
|
|
82
|
+
const name = nameText(ctx.name?.());
|
|
83
|
+
if (!name)
|
|
84
|
+
return null;
|
|
85
|
+
// Grammar quirk: when `input` appears as an argument name inside a
|
|
86
|
+
// field's argumentsDefinition (`createPost(input: CreatePostInput!)`),
|
|
87
|
+
// ANTLR's prediction sometimes resolves the bare `input` token
|
|
88
|
+
// followed by `: TypeName!` as a degenerate inputObjectTypeDefinition
|
|
89
|
+
// with a colon-prefixed name. Skip those spurious matches — real
|
|
90
|
+
// SDL input definitions are followed by `{`, not a type expression.
|
|
91
|
+
if (name.startsWith(":") || name.startsWith("!"))
|
|
92
|
+
return null;
|
|
93
|
+
this.addSymbol("class", name, ctx);
|
|
94
|
+
const ivs = findDescendants(ctx, "InputValueDefinitionContext");
|
|
95
|
+
for (const iv of ivs) {
|
|
96
|
+
const nm = nameText(iv.name?.());
|
|
97
|
+
if (nm)
|
|
98
|
+
this.addSymbol("field", nm, ctx);
|
|
99
|
+
}
|
|
100
|
+
return null;
|
|
101
|
+
};
|
|
102
|
+
visitFieldDefinition = (ctx) => {
|
|
103
|
+
if (this.inBody)
|
|
104
|
+
return null;
|
|
105
|
+
const name = nameText(ctx.name?.());
|
|
106
|
+
if (!name)
|
|
107
|
+
return null;
|
|
108
|
+
// A field with argumentsDefinition reads as a method (resolver
|
|
109
|
+
// that takes inputs); a bare field is a property.
|
|
110
|
+
const args = ctx.argumentsDefinition?.();
|
|
111
|
+
if (args) {
|
|
112
|
+
const params = extractGraphqlArgs(args);
|
|
113
|
+
this.addSymbol("method", name, ctx, params);
|
|
114
|
+
}
|
|
115
|
+
else {
|
|
116
|
+
this.addSymbol("field", name, ctx);
|
|
117
|
+
}
|
|
118
|
+
return null;
|
|
119
|
+
};
|
|
120
|
+
visitDirectiveDefinition = (ctx) => {
|
|
121
|
+
if (this.inBody)
|
|
122
|
+
return null;
|
|
123
|
+
const name = nameText(ctx.name?.());
|
|
124
|
+
if (!name)
|
|
125
|
+
return null;
|
|
126
|
+
const args = ctx.argumentsDefinition?.();
|
|
127
|
+
const params = args ? extractGraphqlArgs(args) : [];
|
|
128
|
+
this.addSymbol("function", `@${name}`, ctx, params);
|
|
129
|
+
return null;
|
|
130
|
+
};
|
|
131
|
+
visitSchemaDefinition = (ctx) => {
|
|
132
|
+
if (this.inBody)
|
|
133
|
+
return null;
|
|
134
|
+
this.addSymbol("module", "schema", ctx);
|
|
135
|
+
return null;
|
|
136
|
+
};
|
|
137
|
+
visitOperationDefinition = (ctx) => {
|
|
138
|
+
if (this.inBody)
|
|
139
|
+
return null;
|
|
140
|
+
const name = nameText(ctx.name?.());
|
|
141
|
+
if (!name)
|
|
142
|
+
return null;
|
|
143
|
+
const opType = ctx.operationType?.()?.getText?.() ?? "query";
|
|
144
|
+
this.addSymbol("method", `${opType} ${name}`, ctx);
|
|
145
|
+
return null;
|
|
146
|
+
};
|
|
147
|
+
visitFragmentDefinition = (ctx) => {
|
|
148
|
+
if (this.inBody)
|
|
149
|
+
return null;
|
|
150
|
+
const fn = ctx.fragmentName?.();
|
|
151
|
+
const name = nameText(fn);
|
|
152
|
+
if (name)
|
|
153
|
+
this.addSymbol("method", `fragment ${name}`, ctx);
|
|
154
|
+
return null;
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
function nameText(ctx) {
|
|
158
|
+
if (!ctx)
|
|
159
|
+
return null;
|
|
160
|
+
return ctx.getText?.() ?? null;
|
|
161
|
+
}
|
|
162
|
+
function extractGraphqlArgs(args) {
|
|
163
|
+
if (!args)
|
|
164
|
+
return [];
|
|
165
|
+
const node = args;
|
|
166
|
+
const raw = node.inputValueDefinition?.();
|
|
167
|
+
const arr = Array.isArray(raw) ? raw : raw ? [raw] : [];
|
|
168
|
+
const out = [];
|
|
169
|
+
for (const a of arr) {
|
|
170
|
+
const nm = nameText(a.name?.());
|
|
171
|
+
if (nm)
|
|
172
|
+
out.push(nm);
|
|
173
|
+
}
|
|
174
|
+
return out;
|
|
175
|
+
}
|
|
176
|
+
function findDescendants(root, ctxName) {
|
|
177
|
+
const out = [];
|
|
178
|
+
const stack = [root];
|
|
179
|
+
while (stack.length > 0) {
|
|
180
|
+
const node = stack.pop();
|
|
181
|
+
if (!node)
|
|
182
|
+
continue;
|
|
183
|
+
if (node.constructor?.name === ctxName)
|
|
184
|
+
out.push(node);
|
|
185
|
+
const count = node.getChildCount?.() ?? 0;
|
|
186
|
+
for (let i = 0; i < count; i += 1)
|
|
187
|
+
stack.push(node.getChild?.(i));
|
|
188
|
+
}
|
|
189
|
+
return out;
|
|
190
|
+
}
|
|
191
|
+
//# sourceMappingURL=TextGraphql.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextGraphql.js","sourceRoot":"","sources":["../src/TextGraphql.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAEzE,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAE/D,uEAAuE;AACvE,EAAE;AACF,mEAAmE;AACnE,gEAAgE;AAChE,+DAA+D;AAC/D,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,cAAc;IACzC,SAAS,CAAC,OAAe;QAC/B,MAAM,KAAK,GAAG,IAAI,YAAY,CAAC,UAAU,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC;QAC/D,M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AAG,GAAc,EAAE,CAAC;IAC1B,MAAM,KAAK,GAAc,CAAC,IAAI,CAAC,CAAC;IAChC,OAAO,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACtB,MAAM,IAAI,GAAG,KAAK,CAAC,GAAG,EAIrB,CAAC;QACF,IAAI,CAAC,IAAI;YAAE,SAAS;QACpB,IAAI,IAAI,CAAC,WAAW,EAAE,IAAI,KAAK,OAAO;YAAE,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACvD,MAAM,KAAK,GAAG,IAAI,CAAC,aAAa,EAAE,EAAE,IAAI,CAAC,CAAC;QAC1C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,EAAE,CAAC,IAAI,CAAC;YAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;IACtE,CAAC;IACD,OAAO,GAAG,CAAC;AACf,CAAC"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import * as antlr from "antlr4ng";
|
|
2
|
+
export declare class GraphQLLexer extends antlr.Lexer {
|
|
3
|
+
static readonly T__0 = 1;
|
|
4
|
+
static readonly T__1 = 2;
|
|
5
|
+
static readonly T__2 = 3;
|
|
6
|
+
static readonly T__3 = 4;
|
|
7
|
+
static readonly T__4 = 5;
|
|
8
|
+
static readonly T__5 = 6;
|
|
9
|
+
static readonly T__6 = 7;
|
|
10
|
+
static readonly T__7 = 8;
|
|
11
|
+
static readonly T__8 = 9;
|
|
12
|
+
static readonly T__9 = 10;
|
|
13
|
+
static readonly T__10 = 11;
|
|
14
|
+
static readonly T__11 = 12;
|
|
15
|
+
static readonly T__12 = 13;
|
|
16
|
+
static readonly T__13 = 14;
|
|
17
|
+
static readonly T__14 = 15;
|
|
18
|
+
static readonly T__15 = 16;
|
|
19
|
+
static readonly T__16 = 17;
|
|
20
|
+
static readonly T__17 = 18;
|
|
21
|
+
static readonly T__18 = 19;
|
|
22
|
+
static readonly T__19 = 20;
|
|
23
|
+
static readonly T__20 = 21;
|
|
24
|
+
static readonly T__21 = 22;
|
|
25
|
+
static readonly T__22 = 23;
|
|
26
|
+
static readonly T__23 = 24;
|
|
27
|
+
static readonly T__24 = 25;
|
|
28
|
+
static readonly T__25 = 26;
|
|
29
|
+
static readonly T__26 = 27;
|
|
30
|
+
static readonly T__27 = 28;
|
|
31
|
+
static readonly T__28 = 29;
|
|
32
|
+
static readonly T__29 = 30;
|
|
33
|
+
static readonly T__30 = 31;
|
|
34
|
+
static readonly T__31 = 32;
|
|
35
|
+
static readonly T__32 = 33;
|
|
36
|
+
static readonly T__33 = 34;
|
|
37
|
+
static readonly T__34 = 35;
|
|
38
|
+
static readonly T__35 = 36;
|
|
39
|
+
static readonly T__36 = 37;
|
|
40
|
+
static readonly T__37 = 38;
|
|
41
|
+
static readonly T__38 = 39;
|
|
42
|
+
static readonly T__39 = 40;
|
|
43
|
+
static readonly T__40 = 41;
|
|
44
|
+
static readonly T__41 = 42;
|
|
45
|
+
static readonly T__42 = 43;
|
|
46
|
+
static readonly T__43 = 44;
|
|
47
|
+
static readonly T__44 = 45;
|
|
48
|
+
static readonly T__45 = 46;
|
|
49
|
+
static readonly T__46 = 47;
|
|
50
|
+
static readonly T__47 = 48;
|
|
51
|
+
static readonly T__48 = 49;
|
|
52
|
+
static readonly T__49 = 50;
|
|
53
|
+
static readonly T__50 = 51;
|
|
54
|
+
static readonly T__51 = 52;
|
|
55
|
+
static readonly NAME = 53;
|
|
56
|
+
static readonly STRING = 54;
|
|
57
|
+
static readonly BLOCK_STRING = 55;
|
|
58
|
+
static readonly ID = 56;
|
|
59
|
+
static readonly FLOAT = 57;
|
|
60
|
+
static readonly INT = 58;
|
|
61
|
+
static readonly PUNCTUATOR = 59;
|
|
62
|
+
static readonly WS = 60;
|
|
63
|
+
static readonly COMMA = 61;
|
|
64
|
+
static readonly LineComment = 62;
|
|
65
|
+
static readonly UNICODE_BOM = 63;
|
|
66
|
+
static readonly UTF8_BOM = 64;
|
|
67
|
+
static readonly UTF16_BOM = 65;
|
|
68
|
+
static readonly UTF32_BOM = 66;
|
|
69
|
+
static readonly channelNames: string[];
|
|
70
|
+
static readonly literalNames: (string | null)[];
|
|
71
|
+
static readonly symbolicNames: (string | null)[];
|
|
72
|
+
static readonly modeNames: string[];
|
|
73
|
+
static readonly ruleNames: string[];
|
|
74
|
+
constructor(input: antlr.CharStream);
|
|
75
|
+
get grammarFileName(): string;
|
|
76
|
+
get literalNames(): (string | null)[];
|
|
77
|
+
get symbolicNames(): (string | null)[];
|
|
78
|
+
get ruleNames(): string[];
|
|
79
|
+
get serializedATN(): number[];
|
|
80
|
+
get channelNames(): string[];
|
|
81
|
+
get modeNames(): string[];
|
|
82
|
+
static readonly _serializedATN: number[];
|
|
83
|
+
private static __ATN;
|
|
84
|
+
static get _ATN(): antlr.ATN;
|
|
85
|
+
private static readonly vocabulary;
|
|
86
|
+
get vocabulary(): antlr.Vocabulary;
|
|
87
|
+
private static readonly decisionsToDFA;
|
|
88
|
+
}
|
|
89
|
+
//# sourceMappingURL=GraphQLLexer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GraphQLLexer.d.ts","sourceRoot":"","sources":["../../src/generated/GraphQLLexer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,UAAU,CAAC;AAIlC,qBAAa,YAAa,SAAQ,KAAK,CAAC,KAAK;IACzC,gBAAuB,IAAI,KAAK;IAChC,gBAAuB,IAAI,KAAK;IAChC,gBAAuB,IAAI,KAAK;IAChC,gBAAuB,IAAI,KAAK;IAChC,gBAAuB,IAAI,KAAK;IAChC,gBAAuB,IAAI,KAAK;IAChC,gBAAuB,IAAI,KAAK;IAChC,gBAAuB,IAAI,KAAK;IAChC,gBAAuB,IAAI,KAAK;IAChC,gBAAuB,IAAI,MAAM;IACjC,gBAAuB,KAAK,MAAM;IAClC,gBAAuB,KAAK,MAAM;IACl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