@witchcraft/expressit 0.0.2
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 +86 -0
- package/dist/ast/builders/array.d.ts +8 -0
- package/dist/ast/builders/array.d.ts.map +1 -0
- package/dist/ast/builders/array.js +31 -0
- package/dist/ast/builders/condition.d.ts +20 -0
- package/dist/ast/builders/condition.d.ts.map +1 -0
- package/dist/ast/builders/condition.js +28 -0
- package/dist/ast/builders/delim.d.ts +11 -0
- package/dist/ast/builders/delim.d.ts.map +1 -0
- package/dist/ast/builders/delim.js +20 -0
- package/dist/ast/builders/error.d.ts +9 -0
- package/dist/ast/builders/error.d.ts.map +1 -0
- package/dist/ast/builders/error.js +16 -0
- package/dist/ast/builders/expression.d.ts +12 -0
- package/dist/ast/builders/expression.d.ts.map +1 -0
- package/dist/ast/builders/expression.js +31 -0
- package/dist/ast/builders/group.d.ts +20 -0
- package/dist/ast/builders/group.d.ts.map +1 -0
- package/dist/ast/builders/group.js +47 -0
- package/dist/ast/builders/index.d.ts +12 -0
- package/dist/ast/builders/index.d.ts.map +1 -0
- package/dist/ast/builders/index.js +24 -0
- package/dist/ast/builders/isFullPos.d.ts +6 -0
- package/dist/ast/builders/isFullPos.d.ts.map +1 -0
- package/dist/ast/builders/isFullPos.js +6 -0
- package/dist/ast/builders/pos.d.ts +21 -0
- package/dist/ast/builders/pos.d.ts.map +1 -0
- package/dist/ast/builders/pos.js +28 -0
- package/dist/ast/builders/token.d.ts +12 -0
- package/dist/ast/builders/token.d.ts.map +1 -0
- package/dist/ast/builders/token.js +26 -0
- package/dist/ast/builders/type.d.ts +6 -0
- package/dist/ast/builders/type.d.ts.map +1 -0
- package/dist/ast/builders/type.js +37 -0
- package/dist/ast/builders/variable.d.ts +17 -0
- package/dist/ast/builders/variable.d.ts.map +1 -0
- package/dist/ast/builders/variable.js +62 -0
- package/dist/ast/classes/ArrayNode.d.ts +18 -0
- package/dist/ast/classes/ArrayNode.d.ts.map +1 -0
- package/dist/ast/classes/ArrayNode.js +55 -0
- package/dist/ast/classes/Condition.d.ts +13 -0
- package/dist/ast/classes/Condition.d.ts.map +1 -0
- package/dist/ast/classes/Condition.js +21 -0
- package/dist/ast/classes/ConditionNode.d.ts +73 -0
- package/dist/ast/classes/ConditionNode.d.ts.map +1 -0
- package/dist/ast/classes/ConditionNode.js +101 -0
- package/dist/ast/classes/ErrorToken.d.ts +27 -0
- package/dist/ast/classes/ErrorToken.d.ts.map +1 -0
- package/dist/ast/classes/ErrorToken.js +47 -0
- package/dist/ast/classes/Expression.d.ts +13 -0
- package/dist/ast/classes/Expression.d.ts.map +1 -0
- package/dist/ast/classes/Expression.js +19 -0
- package/dist/ast/classes/ExpressionNode.d.ts +21 -0
- package/dist/ast/classes/ExpressionNode.d.ts.map +1 -0
- package/dist/ast/classes/ExpressionNode.js +57 -0
- package/dist/ast/classes/GroupNode.d.ts +64 -0
- package/dist/ast/classes/GroupNode.d.ts.map +1 -0
- package/dist/ast/classes/GroupNode.js +69 -0
- package/dist/ast/classes/Node.d.ts +22 -0
- package/dist/ast/classes/Node.d.ts.map +1 -0
- package/dist/ast/classes/Node.js +28 -0
- package/dist/ast/classes/Token.d.ts +27 -0
- package/dist/ast/classes/Token.d.ts.map +1 -0
- package/dist/ast/classes/Token.js +28 -0
- package/dist/ast/classes/ValidToken.d.ts +26 -0
- package/dist/ast/classes/ValidToken.d.ts.map +1 -0
- package/dist/ast/classes/ValidToken.js +49 -0
- package/dist/ast/classes/VariableNode.d.ts +33 -0
- package/dist/ast/classes/VariableNode.d.ts.map +1 -0
- package/dist/ast/classes/VariableNode.js +58 -0
- package/dist/ast/classes/index.d.ts +12 -0
- package/dist/ast/classes/index.d.ts.map +1 -0
- package/dist/ast/classes/index.js +24 -0
- package/dist/ast/handlers.d.ts +42 -0
- package/dist/ast/handlers.d.ts.map +1 -0
- package/dist/ast/handlers.js +150 -0
- package/dist/ast/index.d.ts +4 -0
- package/dist/ast/index.d.ts.map +1 -0
- package/dist/ast/index.js +8 -0
- package/dist/examples/advancedValueComparer.d.ts +3 -0
- package/dist/examples/advancedValueComparer.d.ts.map +1 -0
- package/dist/examples/advancedValueComparer.js +28 -0
- package/dist/examples/shortcutContextParser.d.ts +22 -0
- package/dist/examples/shortcutContextParser.d.ts.map +1 -0
- package/dist/examples/shortcutContextParser.js +126 -0
- package/dist/global.d.js +1 -0
- package/dist/grammar/ParserBase.d.ts +51 -0
- package/dist/grammar/ParserBase.d.ts.map +1 -0
- package/dist/grammar/ParserBase.js +516 -0
- package/dist/grammar/createTokens.d.ts +56 -0
- package/dist/grammar/createTokens.d.ts.map +1 -0
- package/dist/grammar/createTokens.js +843 -0
- package/dist/grammar/index.d.ts +3 -0
- package/dist/grammar/index.d.ts.map +1 -0
- package/dist/grammar/index.js +6 -0
- package/dist/helpers/errors.d.ts +9 -0
- package/dist/helpers/errors.d.ts.map +1 -0
- package/dist/helpers/errors.js +41 -0
- package/dist/helpers/general/applyBoolean.d.ts +3 -0
- package/dist/helpers/general/applyBoolean.d.ts.map +1 -0
- package/dist/helpers/general/applyBoolean.js +17 -0
- package/dist/helpers/general/applyPrefix.d.ts +4 -0
- package/dist/helpers/general/applyPrefix.d.ts.map +1 -0
- package/dist/helpers/general/applyPrefix.js +9 -0
- package/dist/helpers/general/defaultConditionNormalizer.d.ts +3 -0
- package/dist/helpers/general/defaultConditionNormalizer.d.ts.map +1 -0
- package/dist/helpers/general/defaultConditionNormalizer.js +6 -0
- package/dist/helpers/general/defaultKeyParser.d.ts +3 -0
- package/dist/helpers/general/defaultKeyParser.d.ts.map +1 -0
- package/dist/helpers/general/defaultKeyParser.js +8 -0
- package/dist/helpers/general/defaultPrefixApplier.d.ts +3 -0
- package/dist/helpers/general/defaultPrefixApplier.d.ts.map +1 -0
- package/dist/helpers/general/defaultPrefixApplier.js +6 -0
- package/dist/helpers/general/defaultValueComparer.d.ts +3 -0
- package/dist/helpers/general/defaultValueComparer.d.ts.map +1 -0
- package/dist/helpers/general/defaultValueComparer.js +6 -0
- package/dist/helpers/general/index.d.ts +7 -0
- package/dist/helpers/general/index.d.ts.map +1 -0
- package/dist/helpers/general/index.js +14 -0
- package/dist/helpers/index.d.ts +4 -0
- package/dist/helpers/index.d.ts.map +1 -0
- package/dist/helpers/index.js +8 -0
- package/dist/helpers/parser/assignParents.d.ts +4 -0
- package/dist/helpers/parser/assignParents.d.ts.map +1 -0
- package/dist/helpers/parser/assignParents.js +71 -0
- package/dist/helpers/parser/checkParserOpts.d.ts +3 -0
- package/dist/helpers/parser/checkParserOpts.d.ts.map +1 -0
- package/dist/helpers/parser/checkParserOpts.js +126 -0
- package/dist/helpers/parser/extractPosition.d.ts +9 -0
- package/dist/helpers/parser/extractPosition.d.ts.map +1 -0
- package/dist/helpers/parser/extractPosition.js +9 -0
- package/dist/helpers/parser/getUnclosedRightParenCount.d.ts +5 -0
- package/dist/helpers/parser/getUnclosedRightParenCount.d.ts.map +1 -0
- package/dist/helpers/parser/getUnclosedRightParenCount.js +20 -0
- package/dist/helpers/parser/index.d.ts +9 -0
- package/dist/helpers/parser/index.d.ts.map +1 -0
- package/dist/helpers/parser/index.js +18 -0
- package/dist/helpers/parser/parseParserOptions.d.ts +4 -0
- package/dist/helpers/parser/parseParserOptions.d.ts.map +1 -0
- package/dist/helpers/parser/parseParserOptions.js +45 -0
- package/dist/helpers/parser/seal.d.ts +8 -0
- package/dist/helpers/parser/seal.d.ts.map +1 -0
- package/dist/helpers/parser/seal.js +10 -0
- package/dist/helpers/parser/setParent.d.ts +6 -0
- package/dist/helpers/parser/setParent.d.ts.map +1 -0
- package/dist/helpers/parser/setParent.js +4 -0
- package/dist/helpers/parser/unescape.d.ts +3 -0
- package/dist/helpers/parser/unescape.d.ts.map +1 -0
- package/dist/helpers/parser/unescape.js +6 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +17 -0
- package/dist/methods/autocomplete.d.ts +18 -0
- package/dist/methods/autocomplete.d.ts.map +1 -0
- package/dist/methods/autocomplete.js +109 -0
- package/dist/methods/autoreplace.d.ts +13 -0
- package/dist/methods/autoreplace.d.ts.map +1 -0
- package/dist/methods/autoreplace.js +36 -0
- package/dist/methods/autosuggest.d.ts +28 -0
- package/dist/methods/autosuggest.d.ts.map +1 -0
- package/dist/methods/autosuggest.js +371 -0
- package/dist/methods/evaluate.d.ts +11 -0
- package/dist/methods/evaluate.d.ts.map +1 -0
- package/dist/methods/evaluate.js +30 -0
- package/dist/methods/getBestIndex.d.ts +19 -0
- package/dist/methods/getBestIndex.d.ts.map +1 -0
- package/dist/methods/getBestIndex.js +53 -0
- package/dist/methods/getIndexes.d.ts +17 -0
- package/dist/methods/getIndexes.d.ts.map +1 -0
- package/dist/methods/getIndexes.js +97 -0
- package/dist/methods/index.d.ts +9 -0
- package/dist/methods/index.d.ts.map +1 -0
- package/dist/methods/index.js +18 -0
- package/dist/methods/normalize.d.ts +12 -0
- package/dist/methods/normalize.d.ts.map +1 -0
- package/dist/methods/normalize.js +99 -0
- package/dist/methods/validate.d.ts +11 -0
- package/dist/methods/validate.d.ts.map +1 -0
- package/dist/methods/validate.js +111 -0
- package/dist/package.js +7 -0
- package/dist/package.json.js +193 -0
- package/dist/parser.d.ts +58 -0
- package/dist/parser.d.ts.map +1 -0
- package/dist/parser.js +136 -0
- package/dist/types/ast.d.ts +70 -0
- package/dist/types/ast.d.ts.map +1 -0
- package/dist/types/ast.js +29 -0
- package/dist/types/autocomplete.d.ts +143 -0
- package/dist/types/autocomplete.d.ts.map +1 -0
- package/dist/types/autocomplete.js +24 -0
- package/dist/types/errors.d.ts +34 -0
- package/dist/types/errors.d.ts.map +1 -0
- package/dist/types/errors.js +10 -0
- package/dist/types/index.d.ts +5 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +9 -0
- package/dist/types/parser.d.ts +451 -0
- package/dist/types/parser.d.ts.map +1 -0
- package/dist/types/parser.js +1 -0
- package/dist/utils/extractTokens.d.ts +8 -0
- package/dist/utils/extractTokens.d.ts.map +1 -0
- package/dist/utils/extractTokens.js +50 -0
- package/dist/utils/getCursorInfo.d.ts +7 -0
- package/dist/utils/getCursorInfo.d.ts.map +1 -0
- package/dist/utils/getCursorInfo.js +86 -0
- package/dist/utils/getOppositeDelimiter.d.ts +6 -0
- package/dist/utils/getOppositeDelimiter.d.ts.map +1 -0
- package/dist/utils/getOppositeDelimiter.js +35 -0
- package/dist/utils/getSurroundingErrors.d.ts +25 -0
- package/dist/utils/getSurroundingErrors.d.ts.map +1 -0
- package/dist/utils/getSurroundingErrors.js +37 -0
- package/dist/utils/index.d.ts +10 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +20 -0
- package/dist/utils/isBracket.d.ts +3 -0
- package/dist/utils/isBracket.d.ts.map +1 -0
- package/dist/utils/isBracket.js +7 -0
- package/dist/utils/isDelimiter.d.ts +6 -0
- package/dist/utils/isDelimiter.d.ts.map +1 -0
- package/dist/utils/isDelimiter.js +17 -0
- package/dist/utils/isParen.d.ts +3 -0
- package/dist/utils/isParen.d.ts.map +1 -0
- package/dist/utils/isParen.js +7 -0
- package/dist/utils/isQuote.d.ts +4 -0
- package/dist/utils/isQuote.d.ts.map +1 -0
- package/dist/utils/isQuote.js +7 -0
- package/dist/utils/prettyAst.d.ts +35 -0
- package/dist/utils/prettyAst.d.ts.map +1 -0
- package/dist/utils/prettyAst.js +112 -0
- package/package.json +152 -0
- package/src/ast/builders/array.ts +45 -0
- package/src/ast/builders/condition.ts +56 -0
- package/src/ast/builders/delim.ts +39 -0
- package/src/ast/builders/error.ts +22 -0
- package/src/ast/builders/expression.ts +66 -0
- package/src/ast/builders/group.ts +79 -0
- package/src/ast/builders/index.ts +13 -0
- package/src/ast/builders/isFullPos.ts +10 -0
- package/src/ast/builders/pos.ts +57 -0
- package/src/ast/builders/token.ts +46 -0
- package/src/ast/builders/type.ts +32 -0
- package/src/ast/builders/variable.ts +89 -0
- package/src/ast/classes/ArrayNode.ts +46 -0
- package/src/ast/classes/Condition.ts +22 -0
- package/src/ast/classes/ConditionNode.ts +141 -0
- package/src/ast/classes/ErrorToken.ts +49 -0
- package/src/ast/classes/Expression.ts +26 -0
- package/src/ast/classes/ExpressionNode.ts +62 -0
- package/src/ast/classes/GroupNode.ts +127 -0
- package/src/ast/classes/Node.ts +47 -0
- package/src/ast/classes/Token.ts +59 -0
- package/src/ast/classes/ValidToken.ts +56 -0
- package/src/ast/classes/VariableNode.ts +67 -0
- package/src/ast/classes/index.ts +13 -0
- package/src/ast/handlers.ts +190 -0
- package/src/ast/index.ts +5 -0
- package/src/examples/advancedValueComparer.ts +31 -0
- package/src/examples/shortcutContextParser.ts +140 -0
- package/src/global.d.ts +4 -0
- package/src/grammar/ParserBase.ts +715 -0
- package/src/grammar/createTokens.ts +512 -0
- package/src/grammar/index.ts +4 -0
- package/src/helpers/errors.ts +45 -0
- package/src/helpers/general/applyBoolean.ts +9 -0
- package/src/helpers/general/applyPrefix.ts +7 -0
- package/src/helpers/general/defaultConditionNormalizer.ts +9 -0
- package/src/helpers/general/defaultKeyParser.ts +8 -0
- package/src/helpers/general/defaultPrefixApplier.ts +7 -0
- package/src/helpers/general/defaultValueComparer.ts +7 -0
- package/src/helpers/general/index.ts +8 -0
- package/src/helpers/index.ts +5 -0
- package/src/helpers/parser/assignParents.ts +51 -0
- package/src/helpers/parser/checkParserOpts.ts +143 -0
- package/src/helpers/parser/extractPosition.ts +15 -0
- package/src/helpers/parser/getUnclosedRightParenCount.ts +22 -0
- package/src/helpers/parser/index.ts +10 -0
- package/src/helpers/parser/parseParserOptions.ts +54 -0
- package/src/helpers/parser/seal.ts +14 -0
- package/src/helpers/parser/setParent.ts +5 -0
- package/src/helpers/parser/unescape.ts +4 -0
- package/src/index.ts +7 -0
- package/src/methods/autocomplete.ts +128 -0
- package/src/methods/autoreplace.ts +46 -0
- package/src/methods/autosuggest.ts +543 -0
- package/src/methods/evaluate.ts +37 -0
- package/src/methods/getBestIndex.ts +53 -0
- package/src/methods/getIndexes.ts +99 -0
- package/src/methods/index.ts +10 -0
- package/src/methods/normalize.ts +138 -0
- package/src/methods/validate.ts +141 -0
- package/src/package.js +11 -0
- package/src/parser.ts +183 -0
- package/src/types/ast.ts +148 -0
- package/src/types/autocomplete.ts +152 -0
- package/src/types/errors.ts +40 -0
- package/src/types/index.ts +6 -0
- package/src/types/parser.ts +479 -0
- package/src/utils/extractTokens.ts +67 -0
- package/src/utils/getCursorInfo.ts +106 -0
- package/src/utils/getOppositeDelimiter.ts +36 -0
- package/src/utils/getSurroundingErrors.ts +57 -0
- package/src/utils/index.ts +11 -0
- package/src/utils/isBracket.ts +6 -0
- package/src/utils/isDelimiter.ts +18 -0
- package/src/utils/isParen.ts +6 -0
- package/src/utils/isQuote.ts +6 -0
- package/src/utils/prettyAst.ts +152 -0
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { pos } from "./pos.js";
|
|
2
|
+
import { token } from "./token.js";
|
|
3
|
+
import { TOKEN_TYPE } from "../../types/ast.js";
|
|
4
|
+
import { VariableNode } from "../classes/VariableNode.js";
|
|
5
|
+
function variable(prefix, value, quote, position) {
|
|
6
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
7
|
+
if (typeof value === "string") {
|
|
8
|
+
value = token(TOKEN_TYPE.VALUE, value, position);
|
|
9
|
+
}
|
|
10
|
+
position = pos(value);
|
|
11
|
+
const node = {
|
|
12
|
+
value,
|
|
13
|
+
prefix
|
|
14
|
+
};
|
|
15
|
+
if (quote) {
|
|
16
|
+
node.quote = {};
|
|
17
|
+
const quoteLeftPos = (position == null ? void 0 : position.start) !== void 0 ? pos({ start: position.start }, { fill: true }) : void 0;
|
|
18
|
+
if (quote.left) {
|
|
19
|
+
if (quoteLeftPos)
|
|
20
|
+
quoteLeftPos.start -= 1;
|
|
21
|
+
node.quote.left = token(quote.type, quoteFromType(quote.type), quoteLeftPos);
|
|
22
|
+
} else {
|
|
23
|
+
node.quote.left = token(quote.type, void 0, quoteLeftPos);
|
|
24
|
+
}
|
|
25
|
+
const quoteRightPos = (position == null ? void 0 : position.end) !== void 0 ? pos({ end: position.end }, { fill: true }) : void 0;
|
|
26
|
+
if (quote.right) {
|
|
27
|
+
if (quoteRightPos)
|
|
28
|
+
quoteRightPos.end += 1;
|
|
29
|
+
node.quote.right = token(quote.type, quoteFromType(quote.type), quoteRightPos);
|
|
30
|
+
} else {
|
|
31
|
+
node.quote.right = token(quote.type, void 0, quoteRightPos);
|
|
32
|
+
}
|
|
33
|
+
if (quote.flags) {
|
|
34
|
+
const start = node.quote.right.end;
|
|
35
|
+
node.quote.flags = token(TOKEN_TYPE.VALUE, quote.flags, {
|
|
36
|
+
start,
|
|
37
|
+
end: start + ((_a = quote.flags) == null ? void 0 : _a.length)
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
node.start = ((_b = node.prefix) == null ? void 0 : _b.start) ?? ((_c = node.quote) == null ? void 0 : _c.left.start) ?? ((_d = node.value) == null ? void 0 : _d.start) ?? ((_e = node.quote) == null ? void 0 : _e.right.start);
|
|
42
|
+
node.end = ((_g = (_f = node.quote) == null ? void 0 : _f.flags) == null ? void 0 : _g.end) ?? ((_h = node.quote) == null ? void 0 : _h.right.end) ?? ((_i = node.value) == null ? void 0 : _i.end) ?? ((_j = node.quote) == null ? void 0 : _j.left.end);
|
|
43
|
+
const instance = new VariableNode(node);
|
|
44
|
+
return instance;
|
|
45
|
+
}
|
|
46
|
+
function quoteFromType(type) {
|
|
47
|
+
switch (type) {
|
|
48
|
+
case TOKEN_TYPE.BACKTICK:
|
|
49
|
+
return "`";
|
|
50
|
+
case TOKEN_TYPE.DOUBLEQUOTE:
|
|
51
|
+
return '"';
|
|
52
|
+
case TOKEN_TYPE.SINGLEQUOTE:
|
|
53
|
+
return "'";
|
|
54
|
+
case TOKEN_TYPE.REGEX:
|
|
55
|
+
return "/";
|
|
56
|
+
case void 0:
|
|
57
|
+
return "";
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
export {
|
|
61
|
+
variable
|
|
62
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ConditionNode } from "./ConditionNode.js";
|
|
2
|
+
import { Node } from "./Node.js";
|
|
3
|
+
import type { VariableNode } from "./VariableNode.js";
|
|
4
|
+
import { AST_TYPE, type NodeDelimiters, type TOKEN_TYPE } from "../../types/ast.js";
|
|
5
|
+
export declare class ArrayNode<TValid extends boolean = boolean> extends Node<AST_TYPE.ARRAY> {
|
|
6
|
+
#private;
|
|
7
|
+
readonly values: VariableNode[];
|
|
8
|
+
readonly bracket: NodeDelimiters<TOKEN_TYPE.BRACKETL, TOKEN_TYPE.BRACKETR>;
|
|
9
|
+
get parent(): ConditionNode | undefined;
|
|
10
|
+
set parent(value: ConditionNode | undefined);
|
|
11
|
+
constructor({ values, bracket, start, end }: {
|
|
12
|
+
values: ArrayNode<TValid>["values"];
|
|
13
|
+
bracket: ArrayNode<TValid>["bracket"];
|
|
14
|
+
start: number;
|
|
15
|
+
end: number;
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=ArrayNode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ArrayNode.d.ts","sourceRoot":"","sources":["../../../src/ast/classes/ArrayNode.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AACvD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAEhC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAErD,OAAO,EAAE,QAAQ,EAAE,KAAK,cAAc,EAAE,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAGnF,qBAAa,SAAS,CACrB,MAAM,SAAS,OAAO,GAAG,OAAO,CAC/B,SAAQ,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC;;IAC7B,QAAQ,CAAC,MAAM,EAAE,YAAY,EAAE,CAAA;IAE/B,QAAQ,CAAC,OAAO,EAAE,cAAc,CAAC,UAAU,CAAC,QAAQ,EAAE,UAAU,CAAC,QAAQ,CAAC,CAAA;IAM1E,IAAI,MAAM,IAAI,aAAa,GAAG,SAAS,CAEtC;IAED,IAAI,MAAM,CAAC,KAAK,EAAE,aAAa,GAAG,SAAS,EAI1C;gBAEW,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE;QAC5C,MAAM,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,CAAA;QACnC,OAAO,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,CAAA;QACrC,KAAK,EAAE,MAAM,CAAA;QACb,GAAG,EAAE,MAAM,CAAA;KACX;CAWD"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
+
var __publicField = (obj, key, value) => {
|
|
4
|
+
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5
|
+
return value;
|
|
6
|
+
};
|
|
7
|
+
var __accessCheck = (obj, member, msg) => {
|
|
8
|
+
if (!member.has(obj))
|
|
9
|
+
throw TypeError("Cannot " + msg);
|
|
10
|
+
};
|
|
11
|
+
var __privateGet = (obj, member, getter) => {
|
|
12
|
+
__accessCheck(obj, member, "read from private field");
|
|
13
|
+
return getter ? getter.call(obj) : member.get(obj);
|
|
14
|
+
};
|
|
15
|
+
var __privateAdd = (obj, member, value) => {
|
|
16
|
+
if (member.has(obj))
|
|
17
|
+
throw TypeError("Cannot add the same private member more than once");
|
|
18
|
+
member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
19
|
+
};
|
|
20
|
+
var __privateSet = (obj, member, value, setter) => {
|
|
21
|
+
__accessCheck(obj, member, "write to private field");
|
|
22
|
+
setter ? setter.call(obj, value) : member.set(obj, value);
|
|
23
|
+
return value;
|
|
24
|
+
};
|
|
25
|
+
var _parent, _setParent;
|
|
26
|
+
import { Node } from "./Node.js";
|
|
27
|
+
import { ValidToken } from "./ValidToken.js";
|
|
28
|
+
import { AST_TYPE } from "../../types/ast.js";
|
|
29
|
+
class ArrayNode extends Node {
|
|
30
|
+
constructor({ values, bracket, start, end }) {
|
|
31
|
+
super(AST_TYPE.ARRAY, start, end);
|
|
32
|
+
__publicField(this, "values");
|
|
33
|
+
__publicField(this, "bracket");
|
|
34
|
+
__privateAdd(this, _parent, void 0);
|
|
35
|
+
__privateAdd(this, _setParent, false);
|
|
36
|
+
this.values = values;
|
|
37
|
+
this.bracket = bracket;
|
|
38
|
+
this.valid = this.values.every((val) => val.valid) && this.bracket.left instanceof ValidToken && this.bracket.right instanceof ValidToken;
|
|
39
|
+
}
|
|
40
|
+
get parent() {
|
|
41
|
+
return __privateGet(this, _parent);
|
|
42
|
+
}
|
|
43
|
+
set parent(value) {
|
|
44
|
+
if (__privateGet(this, _setParent)) {
|
|
45
|
+
throw new Error("parent property is readonly");
|
|
46
|
+
}
|
|
47
|
+
__privateSet(this, _parent, value);
|
|
48
|
+
__privateSet(this, _setParent, true);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
_parent = new WeakMap();
|
|
52
|
+
_setParent = new WeakMap();
|
|
53
|
+
export {
|
|
54
|
+
ArrayNode
|
|
55
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare class Condition<TOp extends string = string, TValue = any> {
|
|
2
|
+
readonly value: TValue;
|
|
3
|
+
readonly operator?: TOp;
|
|
4
|
+
readonly property: string[];
|
|
5
|
+
readonly negate: boolean;
|
|
6
|
+
constructor({ property, operator, value, negate }: {
|
|
7
|
+
property: Condition<TOp, TValue>["property"];
|
|
8
|
+
operator: Condition<TOp, TValue>["operator"];
|
|
9
|
+
value: Condition<TOp, TValue>["value"];
|
|
10
|
+
negate: Condition<TOp, TValue>["negate"];
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=Condition.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Condition.d.ts","sourceRoot":"","sources":["../../../src/ast/classes/Condition.ts"],"names":[],"mappings":"AAAA,qBAAa,SAAS,CAAC,GAAG,SAAS,MAAM,GAAG,MAAM,EAAE,MAAM,GAAG,GAAG;IAC/D,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IAEtB,QAAQ,CAAC,QAAQ,CAAC,EAAE,GAAG,CAAA;IAEvB,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,CAAA;IAE3B,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAA;gBAEZ,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE;QAClD,QAAQ,EAAE,SAAS,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC,UAAU,CAAC,CAAA;QAC5C,QAAQ,EAAE,SAAS,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC,UAAU,CAAC,CAAA;QAC5C,KAAK,EAAE,SAAS,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC,OAAO,CAAC,CAAA;QACtC,MAAM,EAAE,SAAS,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC,QAAQ,CAAC,CAAA;KACxC;CAMD"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
+
var __publicField = (obj, key, value) => {
|
|
4
|
+
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5
|
+
return value;
|
|
6
|
+
};
|
|
7
|
+
class Condition {
|
|
8
|
+
constructor({ property, operator, value, negate }) {
|
|
9
|
+
__publicField(this, "value");
|
|
10
|
+
__publicField(this, "operator");
|
|
11
|
+
__publicField(this, "property");
|
|
12
|
+
__publicField(this, "negate");
|
|
13
|
+
this.value = value;
|
|
14
|
+
this.operator = operator;
|
|
15
|
+
this.property = property;
|
|
16
|
+
this.negate = negate;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
export {
|
|
20
|
+
Condition
|
|
21
|
+
};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import type { ArrayNode } from "./ArrayNode.js";
|
|
2
|
+
import type { ErrorToken } from "./ErrorToken.js";
|
|
3
|
+
import type { ExpressionNode } from "./ExpressionNode.js";
|
|
4
|
+
import type { GroupNode } from "./GroupNode.js";
|
|
5
|
+
import { Node } from "./Node.js";
|
|
6
|
+
import { ValidToken } from "./ValidToken.js";
|
|
7
|
+
import { VariableNode } from "./VariableNode.js";
|
|
8
|
+
import { type AnyToken, AST_TYPE, type TOKEN_TYPE } from "../../types/ast.js";
|
|
9
|
+
/**
|
|
10
|
+
* A condition is composed of a `variable`, @see Variable , and, if it's negated, a "not" `operator` token, @see ValidToken .
|
|
11
|
+
*
|
|
12
|
+
* The `value` property refers to the boolean value of the condition (not to the string value of the variable). See the `operator` property.
|
|
13
|
+
*/
|
|
14
|
+
export declare class ConditionNode<TValid extends boolean = boolean, TOperator extends ValidToken<TOKEN_TYPE.NOT> | undefined = ValidToken<TOKEN_TYPE.NOT> | undefined> extends Node<AST_TYPE.CONDITION> {
|
|
15
|
+
#private;
|
|
16
|
+
/**
|
|
17
|
+
* Contains a value node which could be a variable, an array node (if enabled), or a group.
|
|
18
|
+
*
|
|
19
|
+
* Might be an error in cases like:
|
|
20
|
+
* - just passing a negation operator
|
|
21
|
+
* - if condition property operators are used and you have an input like just `[SEP]`, `op[SEP]`, `prop[SEP]op[SEP]`, `[CUSTOM OP]`, or `prop[CUSTOM OP]` where the variable is missing.
|
|
22
|
+
*/
|
|
23
|
+
readonly value: VariableNode<TValid> | ArrayNode<TValid> | GroupNode<TValid> | (TValid extends false ? ErrorToken<TOKEN_TYPE.VALUE> : never);
|
|
24
|
+
/**
|
|
25
|
+
* If the condition was negated, contains the "not" token, @see ValidToken , the condition was negated with.
|
|
26
|
+
*/
|
|
27
|
+
readonly operator?: ValidToken<TOKEN_TYPE.NOT>;
|
|
28
|
+
/**
|
|
29
|
+
* If condition property operators are used, this will contain the property (as a variable), or an error token if it was missing (but some separator or operator was passed).
|
|
30
|
+
*
|
|
31
|
+
* While the property is a variable and can be a quoted variable, it cannot be a prefixed variable string.
|
|
32
|
+
*
|
|
33
|
+
* See the corresponding @see ParserOptions for more details.
|
|
34
|
+
*/
|
|
35
|
+
readonly property?: VariableNode | (TValid extends false ? ErrorToken<TOKEN_TYPE.VALUE> : never);
|
|
36
|
+
/**
|
|
37
|
+
* If condition property operators are used, this will contain the operator.
|
|
38
|
+
*
|
|
39
|
+
* If a "short" form was used, this will contain an `OP_CUSTOM` type token, and the condition's `sep` will always be undefined.
|
|
40
|
+
*
|
|
41
|
+
* If a "long/expanded" form was used, this will contain a `VALUE` type token, and at least one of condition's `sep` tokens will be defined.
|
|
42
|
+
*
|
|
43
|
+
* See the corresponding @see ParserOptions for more details.
|
|
44
|
+
*/
|
|
45
|
+
readonly propertyOperator?: AnyToken<TOKEN_TYPE.OP_CUSTOM | TOKEN_TYPE.VALUE>;
|
|
46
|
+
/**
|
|
47
|
+
* If "long/expanded" form condition property operators are used, this will contain the separators, otherwise it is undefined.
|
|
48
|
+
*
|
|
49
|
+
* If it's defined, either both side will be valid tokens, or only the left, while the right might be undefined or an error token.
|
|
50
|
+
*
|
|
51
|
+
* This is because given a string like `[SEP]val` which would produce an error like `[MISSING PROPERTY ERROR][SEP]var`, the separator is always interpreted as being the left one. And even if we have a situation like `op[SEP]var`, it is always interpreted by the parser as `prop[SEP]var`.
|
|
52
|
+
*
|
|
53
|
+
* Why might the right be undefined instead of an error token? This is because we don't need a separator between the operator and a group, `prop[SEP]op(group)`, but we do between a variable in cases like `prop[SEP]op"var"` which would produce an error token on the right side (we could parse this but it just looks inconsistent).
|
|
54
|
+
*
|
|
55
|
+
* See the corresponding @see ParserOptions for more details.
|
|
56
|
+
*/
|
|
57
|
+
readonly sep?: {
|
|
58
|
+
left?: AnyToken<TOKEN_TYPE.OP_EXPANDED_SEP>;
|
|
59
|
+
right?: AnyToken<TOKEN_TYPE.OP_EXPANDED_SEP>;
|
|
60
|
+
};
|
|
61
|
+
get parent(): GroupNode | ExpressionNode | undefined;
|
|
62
|
+
set parent(value: GroupNode | ExpressionNode | undefined);
|
|
63
|
+
constructor({ property, propertyOperator, sep, value, start, end, operator }: {
|
|
64
|
+
operator?: TOperator;
|
|
65
|
+
property?: ConditionNode<TValid>["property"];
|
|
66
|
+
propertyOperator?: ConditionNode<TValid>["propertyOperator"];
|
|
67
|
+
sep?: ConditionNode<TValid>["sep"];
|
|
68
|
+
value: ConditionNode<TValid>["value"];
|
|
69
|
+
start: number;
|
|
70
|
+
end: number;
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
//# sourceMappingURL=ConditionNode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConditionNode.d.ts","sourceRoot":"","sources":["../../../src/ast/classes/ConditionNode.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC/C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AACzD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC/C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAEhD,OAAO,EAAE,KAAK,QAAQ,EAAE,QAAQ,EAAE,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAG7E;;;;GAIG;AACH,qBAAa,aAAa,CACzB,MAAM,SAAS,OAAO,GAAG,OAAO,EAChC,SAAS,SACR,UAAU,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,SAAS,GACtC,UAAU,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,SAAS,CACtC,SAAQ,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC;;IACjC;;;;;;OAMG;IACH,QAAQ,CAAC,KAAK,EACZ,YAAY,CAAC,MAAM,CAAC,GACpB,SAAS,CAAC,MAAM,CAAC,GACjB,SAAS,CAAC,MAAM,CAAC,GACjB,CAAC,MAAM,SAAS,KAAK,GAAG,UAAU,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,CAAA;IAE/D;;OAEG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,UAAU,CAAC,UAAU,CAAC,GAAG,CAAC,CAAA;IAE9C;;;;;;OAMG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,YAAY,GAAG,CAAC,MAAM,SAAS,KAAK,GAAG,UAAU,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,CAAA;IAEhG;;;;;;;;OAQG;IACH,QAAQ,CAAC,gBAAgB,CAAC,EAAE,QAAQ,CAAC,UAAU,CAAC,SAAS,GAAG,UAAU,CAAC,KAAK,CAAC,CAAA;IAE7E;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,GAAG,CAAC,EAAE;QACd,IAAI,CAAC,EAAE,QAAQ,CAAC,UAAU,CAAC,eAAe,CAAC,CAAA;QAC3C,KAAK,CAAC,EAAE,QAAQ,CAAC,UAAU,CAAC,eAAe,CAAC,CAAA;KAC5C,CAAA;IAMD,IAAI,MAAM,IAAI,SAAS,GACvB,cAAc,GACd,SAAS,CAER;IAED,IAAI,MAAM,CAAC,KAAK,EAAE,SAAS,GAC3B,cAAc,GACd,SAAS,EAKR;gBAEW,EAAE,QAAQ,EAAE,gBAAgB,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,QAAQ,EAAE,EAAE;QAC7E,QAAQ,CAAC,EAAE,SAAS,CAAA;QACpB,QAAQ,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC,UAAU,CAAC,CAAA;QAC5C,gBAAgB,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC,kBAAkB,CAAC,CAAA;QAC5D,GAAG,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,CAAA;QAClC,KAAK,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAA;QACrC,KAAK,EAAE,MAAM,CAAA;QACb,GAAG,EAAE,MAAM,CAAA;KACX;CAoCD"}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
+
var __publicField = (obj, key, value) => {
|
|
4
|
+
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5
|
+
return value;
|
|
6
|
+
};
|
|
7
|
+
var __accessCheck = (obj, member, msg) => {
|
|
8
|
+
if (!member.has(obj))
|
|
9
|
+
throw TypeError("Cannot " + msg);
|
|
10
|
+
};
|
|
11
|
+
var __privateGet = (obj, member, getter) => {
|
|
12
|
+
__accessCheck(obj, member, "read from private field");
|
|
13
|
+
return getter ? getter.call(obj) : member.get(obj);
|
|
14
|
+
};
|
|
15
|
+
var __privateAdd = (obj, member, value) => {
|
|
16
|
+
if (member.has(obj))
|
|
17
|
+
throw TypeError("Cannot add the same private member more than once");
|
|
18
|
+
member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
19
|
+
};
|
|
20
|
+
var __privateSet = (obj, member, value, setter) => {
|
|
21
|
+
__accessCheck(obj, member, "write to private field");
|
|
22
|
+
setter ? setter.call(obj, value) : member.set(obj, value);
|
|
23
|
+
return value;
|
|
24
|
+
};
|
|
25
|
+
var _parent, _setParent;
|
|
26
|
+
import { Node } from "./Node.js";
|
|
27
|
+
import { ValidToken } from "./ValidToken.js";
|
|
28
|
+
import { VariableNode } from "./VariableNode.js";
|
|
29
|
+
import { AST_TYPE } from "../../types/ast.js";
|
|
30
|
+
class ConditionNode extends Node {
|
|
31
|
+
constructor({ property, propertyOperator, sep, value, start, end, operator }) {
|
|
32
|
+
var _a, _b;
|
|
33
|
+
super(AST_TYPE.CONDITION, start, end);
|
|
34
|
+
/**
|
|
35
|
+
* Contains a value node which could be a variable, an array node (if enabled), or a group.
|
|
36
|
+
*
|
|
37
|
+
* Might be an error in cases like:
|
|
38
|
+
* - just passing a negation operator
|
|
39
|
+
* - if condition property operators are used and you have an input like just `[SEP]`, `op[SEP]`, `prop[SEP]op[SEP]`, `[CUSTOM OP]`, or `prop[CUSTOM OP]` where the variable is missing.
|
|
40
|
+
*/
|
|
41
|
+
__publicField(this, "value");
|
|
42
|
+
/**
|
|
43
|
+
* If the condition was negated, contains the "not" token, @see ValidToken , the condition was negated with.
|
|
44
|
+
*/
|
|
45
|
+
__publicField(this, "operator");
|
|
46
|
+
/**
|
|
47
|
+
* If condition property operators are used, this will contain the property (as a variable), or an error token if it was missing (but some separator or operator was passed).
|
|
48
|
+
*
|
|
49
|
+
* While the property is a variable and can be a quoted variable, it cannot be a prefixed variable string.
|
|
50
|
+
*
|
|
51
|
+
* See the corresponding @see ParserOptions for more details.
|
|
52
|
+
*/
|
|
53
|
+
__publicField(this, "property");
|
|
54
|
+
/**
|
|
55
|
+
* If condition property operators are used, this will contain the operator.
|
|
56
|
+
*
|
|
57
|
+
* If a "short" form was used, this will contain an `OP_CUSTOM` type token, and the condition's `sep` will always be undefined.
|
|
58
|
+
*
|
|
59
|
+
* If a "long/expanded" form was used, this will contain a `VALUE` type token, and at least one of condition's `sep` tokens will be defined.
|
|
60
|
+
*
|
|
61
|
+
* See the corresponding @see ParserOptions for more details.
|
|
62
|
+
*/
|
|
63
|
+
__publicField(this, "propertyOperator");
|
|
64
|
+
/**
|
|
65
|
+
* If "long/expanded" form condition property operators are used, this will contain the separators, otherwise it is undefined.
|
|
66
|
+
*
|
|
67
|
+
* If it's defined, either both side will be valid tokens, or only the left, while the right might be undefined or an error token.
|
|
68
|
+
*
|
|
69
|
+
* This is because given a string like `[SEP]val` which would produce an error like `[MISSING PROPERTY ERROR][SEP]var`, the separator is always interpreted as being the left one. And even if we have a situation like `op[SEP]var`, it is always interpreted by the parser as `prop[SEP]var`.
|
|
70
|
+
*
|
|
71
|
+
* Why might the right be undefined instead of an error token? This is because we don't need a separator between the operator and a group, `prop[SEP]op(group)`, but we do between a variable in cases like `prop[SEP]op"var"` which would produce an error token on the right side (we could parse this but it just looks inconsistent).
|
|
72
|
+
*
|
|
73
|
+
* See the corresponding @see ParserOptions for more details.
|
|
74
|
+
*/
|
|
75
|
+
__publicField(this, "sep");
|
|
76
|
+
__privateAdd(this, _parent, void 0);
|
|
77
|
+
__privateAdd(this, _setParent, false);
|
|
78
|
+
this.value = value;
|
|
79
|
+
this.operator = operator;
|
|
80
|
+
this.property = property;
|
|
81
|
+
this.propertyOperator = propertyOperator;
|
|
82
|
+
this.sep = sep;
|
|
83
|
+
this.operator = operator;
|
|
84
|
+
this.valid = (this.operator === void 0 || this.operator instanceof ValidToken) && this.value instanceof Node && this.value.valid && (this.property === void 0 && this.propertyOperator === void 0 && this.sep === void 0 || this.property instanceof VariableNode && (this.propertyOperator instanceof ValidToken || ((_a = this.sep) == null ? void 0 : _a.left) instanceof ValidToken && (this.sep.right === void 0 || ((_b = this.sep) == null ? void 0 : _b.right) instanceof ValidToken)));
|
|
85
|
+
}
|
|
86
|
+
get parent() {
|
|
87
|
+
return __privateGet(this, _parent);
|
|
88
|
+
}
|
|
89
|
+
set parent(value) {
|
|
90
|
+
if (__privateGet(this, _setParent)) {
|
|
91
|
+
throw new Error("parent property is readonly");
|
|
92
|
+
}
|
|
93
|
+
__privateSet(this, _parent, value);
|
|
94
|
+
__privateSet(this, _setParent, true);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
_parent = new WeakMap();
|
|
98
|
+
_setParent = new WeakMap();
|
|
99
|
+
export {
|
|
100
|
+
ConditionNode
|
|
101
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { ConditionNode } from "./ConditionNode.js";
|
|
2
|
+
import type { ExpressionNode } from "./ExpressionNode.js";
|
|
3
|
+
import type { GroupNode } from "./GroupNode.js";
|
|
4
|
+
import { Token } from "./Token.js";
|
|
5
|
+
import type { VariableNode } from "./VariableNode.js";
|
|
6
|
+
import type { TOKEN_TYPE } from "../../types/ast.js";
|
|
7
|
+
/**
|
|
8
|
+
* The class for invalid recovery tokens.
|
|
9
|
+
*
|
|
10
|
+
* Unlike valid tokens, error tokens:
|
|
11
|
+
*
|
|
12
|
+
* - Have no value.
|
|
13
|
+
* - Contain an extra property, `expected` with an array of tokens *that would have fixed the issue* (NOT every possible token that could be there).
|
|
14
|
+
* - The start end positions will always be equal. An invalid token has no length.
|
|
15
|
+
*/
|
|
16
|
+
export declare class ErrorToken<TExpected extends TOKEN_TYPE = TOKEN_TYPE> extends Token<false, never, never, TExpected[]> {
|
|
17
|
+
#private;
|
|
18
|
+
readonly expected: TExpected[];
|
|
19
|
+
get parent(): VariableNode | GroupNode | ExpressionNode | ConditionNode;
|
|
20
|
+
set parent(value: VariableNode | GroupNode | ExpressionNode | ConditionNode);
|
|
21
|
+
constructor({ expected, start, end }: {
|
|
22
|
+
expected: TExpected[];
|
|
23
|
+
start: number;
|
|
24
|
+
end: number;
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=ErrorToken.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ErrorToken.d.ts","sourceRoot":"","sources":["../../../src/ast/classes/ErrorToken.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AACvD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AACzD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC/C,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAClC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAErD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAEpD;;;;;;;;GAQG;AACH,qBAAa,UAAU,CACtB,SAAS,SAAS,UAAU,GAAG,UAAU,CACxC,SAAQ,KAAK,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC;;IAChD,QAAQ,CAAC,QAAQ,EAAE,SAAS,EAAE,CAAA;IAI9B,IAAI,MAAM,IAAI,YAAY,GAC1B,SAAS,GACT,cAAc,GACd,aAAa,CAEZ;IAED,IAAI,MAAM,CAAC,KAAK,EAAE,YAAY,GAC9B,SAAS,GACT,cAAc,GACd,aAAa,EAIZ;gBAEW,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE;QACrC,QAAQ,EAAE,SAAS,EAAE,CAAA;QACrB,KAAK,EAAE,MAAM,CAAA;QACb,GAAG,EAAE,MAAM,CAAA;KACX;CAID"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
+
var __publicField = (obj, key, value) => {
|
|
4
|
+
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5
|
+
return value;
|
|
6
|
+
};
|
|
7
|
+
var __accessCheck = (obj, member, msg) => {
|
|
8
|
+
if (!member.has(obj))
|
|
9
|
+
throw TypeError("Cannot " + msg);
|
|
10
|
+
};
|
|
11
|
+
var __privateGet = (obj, member, getter) => {
|
|
12
|
+
__accessCheck(obj, member, "read from private field");
|
|
13
|
+
return getter ? getter.call(obj) : member.get(obj);
|
|
14
|
+
};
|
|
15
|
+
var __privateAdd = (obj, member, value) => {
|
|
16
|
+
if (member.has(obj))
|
|
17
|
+
throw TypeError("Cannot add the same private member more than once");
|
|
18
|
+
member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
19
|
+
};
|
|
20
|
+
var __privateSet = (obj, member, value, setter) => {
|
|
21
|
+
__accessCheck(obj, member, "write to private field");
|
|
22
|
+
setter ? setter.call(obj, value) : member.set(obj, value);
|
|
23
|
+
return value;
|
|
24
|
+
};
|
|
25
|
+
var _parent;
|
|
26
|
+
import { Token } from "./Token.js";
|
|
27
|
+
class ErrorToken extends Token {
|
|
28
|
+
constructor({ expected, start, end }) {
|
|
29
|
+
super(start, end);
|
|
30
|
+
__publicField(this, "expected");
|
|
31
|
+
__privateAdd(this, _parent, void 0);
|
|
32
|
+
this.expected = expected;
|
|
33
|
+
}
|
|
34
|
+
get parent() {
|
|
35
|
+
return __privateGet(this, _parent);
|
|
36
|
+
}
|
|
37
|
+
set parent(value) {
|
|
38
|
+
if (__privateGet(this, _parent)) {
|
|
39
|
+
throw new Error("parent property is readonly");
|
|
40
|
+
}
|
|
41
|
+
__privateSet(this, _parent, value);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
_parent = new WeakMap();
|
|
45
|
+
export {
|
|
46
|
+
ErrorToken
|
|
47
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Condition } from "./Condition.js";
|
|
2
|
+
import type { TokenBooleanTypes } from "../../types/ast.js";
|
|
3
|
+
export declare class Expression<TType extends string = string, TValue = any> {
|
|
4
|
+
readonly left: Expression<TType, TValue> | Condition<TType, TValue>;
|
|
5
|
+
readonly right: Expression<TType, TValue> | Condition<TType, TValue>;
|
|
6
|
+
readonly operator: TokenBooleanTypes;
|
|
7
|
+
constructor({ operator, left, right }: {
|
|
8
|
+
operator: Expression<TType, TValue>["operator"];
|
|
9
|
+
right: Expression<TType, TValue>["right"];
|
|
10
|
+
left: Expression<TType, TValue>["left"];
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=Expression.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Expression.d.ts","sourceRoot":"","sources":["../../../src/ast/classes/Expression.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAE/C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAG3D,qBAAa,UAAU,CAAC,KAAK,SAAS,MAAM,GAAG,MAAM,EAAE,MAAM,GAAG,GAAG;IAClE,QAAQ,CAAC,IAAI,EACX,UAAU,CAAC,KAAK,EAAE,MAAM,CAAC,GACzB,SAAS,CAAC,KAAK,EAAE,MAAM,CAAC,CAAA;IAE1B,QAAQ,CAAC,KAAK,EACZ,UAAU,CAAC,KAAK,EAAE,MAAM,CAAC,GACzB,SAAS,CAAC,KAAK,EAAE,MAAM,CAAC,CAAA;IAE1B,QAAQ,CAAC,QAAQ,EAAE,iBAAiB,CAAA;gBAExB,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE;QACtC,QAAQ,EAAE,UAAU,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,UAAU,CAAC,CAAA;QAC/C,KAAK,EAAE,UAAU,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,OAAO,CAAC,CAAA;QACzC,IAAI,EAAE,UAAU,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,MAAM,CAAC,CAAA;KACvC;CAKD"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
+
var __publicField = (obj, key, value) => {
|
|
4
|
+
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5
|
+
return value;
|
|
6
|
+
};
|
|
7
|
+
class Expression {
|
|
8
|
+
constructor({ operator, left, right }) {
|
|
9
|
+
__publicField(this, "left");
|
|
10
|
+
__publicField(this, "right");
|
|
11
|
+
__publicField(this, "operator");
|
|
12
|
+
this.operator = operator;
|
|
13
|
+
this.right = right;
|
|
14
|
+
this.left = left;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
export {
|
|
18
|
+
Expression
|
|
19
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { ConditionNode } from "./ConditionNode.js";
|
|
2
|
+
import type { ErrorToken } from "./ErrorToken.js";
|
|
3
|
+
import type { GroupNode } from "./GroupNode.js";
|
|
4
|
+
import { Node } from "./Node.js";
|
|
5
|
+
import { type AnyToken, AST_TYPE, type TOKEN_TYPE, type TokenBooleanTypes } from "../../types/ast.js";
|
|
6
|
+
export declare class ExpressionNode<TValid extends boolean = boolean> extends Node<AST_TYPE.EXPRESSION> {
|
|
7
|
+
#private;
|
|
8
|
+
readonly operator: AnyToken<TokenBooleanTypes>;
|
|
9
|
+
readonly left: ExpressionNode<TValid> | ConditionNode<TValid> | GroupNode<TValid> | (TValid extends false ? ErrorToken<TOKEN_TYPE.VALUE> : never);
|
|
10
|
+
readonly right: ExpressionNode<TValid> | ConditionNode<TValid> | GroupNode<TValid> | (TValid extends false ? ErrorToken<TOKEN_TYPE.VALUE> : never);
|
|
11
|
+
get parent(): GroupNode | undefined;
|
|
12
|
+
set parent(value: GroupNode | undefined);
|
|
13
|
+
constructor({ operator, left, right, start, end }: {
|
|
14
|
+
operator: ExpressionNode<TValid>["operator"];
|
|
15
|
+
right: ExpressionNode<TValid>["right"];
|
|
16
|
+
left: ExpressionNode<TValid>["left"];
|
|
17
|
+
start: number;
|
|
18
|
+
end: number;
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=ExpressionNode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExpressionNode.d.ts","sourceRoot":"","sources":["../../../src/ast/classes/ExpressionNode.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AACvD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC/C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAGhC,OAAO,EAAE,KAAK,QAAQ,EAAE,QAAQ,EAAE,KAAK,UAAU,EAAE,KAAK,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAGrG,qBAAa,cAAc,CAC1B,MAAM,SAAS,OAAO,GAAG,OAAO,CAEhC,SAAQ,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC;;IACjC,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC,iBAAiB,CAAC,CAAA;IAE9C,QAAQ,CAAC,IAAI,EACX,cAAc,CAAC,MAAM,CAAC,GACtB,aAAa,CAAC,MAAM,CAAC,GACrB,SAAS,CAAC,MAAM,CAAC,GACjB,CAAC,MAAM,SAAS,KAAK,GAAG,UAAU,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,CAAA;IAE/D,QAAQ,CAAC,KAAK,EACZ,cAAc,CAAC,MAAM,CAAC,GACtB,aAAa,CAAC,MAAM,CAAC,GACrB,SAAS,CAAC,MAAM,CAAC,GACjB,CAAC,MAAM,SAAS,KAAK,GAAG,UAAU,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,CAAA;IAM/D,IAAI,MAAM,IAAI,SAAS,GAAG,SAAS,CAElC;IAED,IAAI,MAAM,CAAC,KAAK,EAAE,SAAS,GAAG,SAAS,EAItC;gBAEW,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE;QAClD,QAAQ,EAAE,cAAc,CAAC,MAAM,CAAC,CAAC,UAAU,CAAC,CAAA;QAC5C,KAAK,EAAE,cAAc,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAA;QACtC,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAA;QACpC,KAAK,EAAE,MAAM,CAAA;QACb,GAAG,EAAE,MAAM,CAAA;KACX;CAcD"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
+
var __publicField = (obj, key, value) => {
|
|
4
|
+
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5
|
+
return value;
|
|
6
|
+
};
|
|
7
|
+
var __accessCheck = (obj, member, msg) => {
|
|
8
|
+
if (!member.has(obj))
|
|
9
|
+
throw TypeError("Cannot " + msg);
|
|
10
|
+
};
|
|
11
|
+
var __privateGet = (obj, member, getter) => {
|
|
12
|
+
__accessCheck(obj, member, "read from private field");
|
|
13
|
+
return getter ? getter.call(obj) : member.get(obj);
|
|
14
|
+
};
|
|
15
|
+
var __privateAdd = (obj, member, value) => {
|
|
16
|
+
if (member.has(obj))
|
|
17
|
+
throw TypeError("Cannot add the same private member more than once");
|
|
18
|
+
member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
19
|
+
};
|
|
20
|
+
var __privateSet = (obj, member, value, setter) => {
|
|
21
|
+
__accessCheck(obj, member, "write to private field");
|
|
22
|
+
setter ? setter.call(obj, value) : member.set(obj, value);
|
|
23
|
+
return value;
|
|
24
|
+
};
|
|
25
|
+
var _parent, _setParent;
|
|
26
|
+
import { Node } from "./Node.js";
|
|
27
|
+
import { ValidToken } from "./ValidToken.js";
|
|
28
|
+
import { AST_TYPE } from "../../types/ast.js";
|
|
29
|
+
class ExpressionNode extends Node {
|
|
30
|
+
constructor({ operator, left, right, start, end }) {
|
|
31
|
+
super(AST_TYPE.EXPRESSION, start, end);
|
|
32
|
+
__publicField(this, "operator");
|
|
33
|
+
__publicField(this, "left");
|
|
34
|
+
__publicField(this, "right");
|
|
35
|
+
__privateAdd(this, _parent, void 0);
|
|
36
|
+
__privateAdd(this, _setParent, false);
|
|
37
|
+
this.operator = operator;
|
|
38
|
+
this.right = right;
|
|
39
|
+
this.left = left;
|
|
40
|
+
this.valid = this.operator instanceof ValidToken && this.left instanceof Node && this.left.valid && this.right instanceof Node && this.right.valid;
|
|
41
|
+
}
|
|
42
|
+
get parent() {
|
|
43
|
+
return __privateGet(this, _parent);
|
|
44
|
+
}
|
|
45
|
+
set parent(value) {
|
|
46
|
+
if (__privateGet(this, _setParent)) {
|
|
47
|
+
throw new Error("parent property is readonly");
|
|
48
|
+
}
|
|
49
|
+
__privateSet(this, _parent, value);
|
|
50
|
+
__privateSet(this, _setParent, true);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
_parent = new WeakMap();
|
|
54
|
+
_setParent = new WeakMap();
|
|
55
|
+
export {
|
|
56
|
+
ExpressionNode
|
|
57
|
+
};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import type { ConditionNode } from "./ConditionNode.js";
|
|
2
|
+
import type { ErrorToken } from "./ErrorToken.js";
|
|
3
|
+
import type { ExpressionNode } from "./ExpressionNode.js";
|
|
4
|
+
import { Node } from "./Node.js";
|
|
5
|
+
import { ValidToken } from "./ValidToken.js";
|
|
6
|
+
import { AST_TYPE, type NodeDelimiters, type TOKEN_TYPE } from "../../types/ast.js";
|
|
7
|
+
/**
|
|
8
|
+
* A node that symbolizes a parenthesized expression (might be negated), and if `prefixableGroups` is enabled, a prefixed expression @see ParserOptions .
|
|
9
|
+
*
|
|
10
|
+
* ```txt
|
|
11
|
+
* (a || b)
|
|
12
|
+
* |----| ExpressionNode
|
|
13
|
+
* |------| GroupNode
|
|
14
|
+
*
|
|
15
|
+
* !(a || b)
|
|
16
|
+
* ^ prefix: "not" Token
|
|
17
|
+
* |----| ExpressionNode
|
|
18
|
+
* |-------| GroupNode
|
|
19
|
+
* ```
|
|
20
|
+
*
|
|
21
|
+
* If `prefixableGroups` is enabled:
|
|
22
|
+
* ```txt
|
|
23
|
+
* prefix(a || b)
|
|
24
|
+
* |----| prefix: ConditionNode
|
|
25
|
+
* |----| ExpressionNode
|
|
26
|
+
* |------------| GroupNode
|
|
27
|
+
*
|
|
28
|
+
* !prefix(a || b)
|
|
29
|
+
* |-----| prefix: ConditionNode
|
|
30
|
+
* |----| ExpressionNode
|
|
31
|
+
* |-------------| GroupNode
|
|
32
|
+
*
|
|
33
|
+
* !(a || b)
|
|
34
|
+
* ^ prefix: STILL a "not" Token
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
export declare class GroupNode<TValid extends boolean = boolean, TPrefixable extends boolean = true, TPrefix extends TPrefixable extends true ? ConditionNode<TValid> | ValidToken<TOKEN_TYPE.NOT> | undefined : ValidToken<TOKEN_TYPE.NOT> | undefined = TPrefixable extends true ? ConditionNode<TValid> | ValidToken<TOKEN_TYPE.NOT> | undefined : ValidToken<TOKEN_TYPE.NOT>> extends Node<AST_TYPE.GROUP> {
|
|
38
|
+
#private;
|
|
39
|
+
/**
|
|
40
|
+
* If the condition is negated this will contain a "not" **token**, @see ValidToken .
|
|
41
|
+
*
|
|
42
|
+
* If `prefixableGroups` is enabled and the group is prefixed by a **condition**, this will be an @see ConditionNode.
|
|
43
|
+
*
|
|
44
|
+
* **Careful:** `!(a)` here this would not be a **condition** since it's just a regular negation.
|
|
45
|
+
*
|
|
46
|
+
* See examples at @see GroupNode .
|
|
47
|
+
*/
|
|
48
|
+
readonly prefix: TPrefix;
|
|
49
|
+
expression: ConditionNode<TValid> | GroupNode<TValid> | ExpressionNode<TValid> | (TValid extends false ? ErrorToken<TOKEN_TYPE.VALUE> : never);
|
|
50
|
+
/**
|
|
51
|
+
* The parenthesis tokens, @see ValidToken . These will always be defined (although not necessarily with valid tokens).
|
|
52
|
+
*/
|
|
53
|
+
readonly paren: NodeDelimiters<TOKEN_TYPE.PARENL, TOKEN_TYPE.PARENR>;
|
|
54
|
+
get parent(): ExpressionNode | undefined;
|
|
55
|
+
set parent(value: ExpressionNode | undefined);
|
|
56
|
+
constructor({ prefix, expression, paren, start, end }: {
|
|
57
|
+
prefix: TPrefix;
|
|
58
|
+
expression: GroupNode<TValid>["expression"];
|
|
59
|
+
paren: GroupNode<TValid>["paren"];
|
|
60
|
+
start: number;
|
|
61
|
+
end: number;
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
//# sourceMappingURL=GroupNode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GroupNode.d.ts","sourceRoot":"","sources":["../../../src/ast/classes/GroupNode.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AACvD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AACzD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAE5C,OAAO,EAAE,QAAQ,EAAE,KAAK,cAAc,EAAE,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAGnF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,qBAAa,SAAS,CACrB,MAAM,SAAS,OAAO,GAAG,OAAO,EAChC,WAAW,SAAS,OAAO,GAAG,IAAI,EAClC,OAAO,SACN,WAAW,SAAS,IAAI,GACrB,aAAa,CAAC,MAAM,CAAC,GACvB,UAAU,CAAC,UAAU,CAAC,GAAG,CAAC,GAC1B,SAAS,GACP,UAAU,CAAC,UAAU,CAAC,GAAG,CAAC,GAC5B,SAAS,GACV,WAAW,SAAS,IAAI,GACrB,aAAa,CAAC,MAAM,CAAC,GACvB,UAAU,CAAC,UAAU,CAAC,GAAG,CAAC,GAC1B,SAAS,GACP,UAAU,CAAC,UAAU,CAAC,GAAG,CAAC,CAE9B,SAAQ,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC;;IAC5B;;;;;;;;OAQG;IACH,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAA;IAExB,UAAU,EACR,aAAa,CAAC,MAAM,CAAC,GACrB,SAAS,CAAC,MAAM,CAAC,GACjB,cAAc,CAAC,MAAM,CAAC,GACtB,CAAC,MAAM,SAAS,KAAK,GAAG,UAAU,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,CAAA;IAE/D;;OAEG;IACH,QAAQ,CAAC,KAAK,EAAE,cAAc,CAAC,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,MAAM,CAAC,CAAA;IAMpE,IAAI,MAAM,IAAI,cAAc,GAAG,SAAS,CAEvC;IAED,IAAI,MAAM,CAAC,KAAK,EAAE,cAAc,GAAG,SAAS,EAI3C;gBAEW,EAAE,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE;QACtD,MAAM,EAAE,OAAO,CAAA;QACf,UAAU,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC,YAAY,CAAC,CAAA;QAC3C,KAAK,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAA;QACjC,KAAK,EAAE,MAAM,CAAA;QACb,GAAG,EAAE,MAAM,CAAA;KACX;CA0BD"}
|