UNPKG

@xailabs/altx

Version:

Flux flavor based on alt.js

1,868 lines 46.7 kB
{ "type": "File", "start": 0, "end": 215, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 8, "column": 0 } }, "program": { "type": "Program", "start": 0, "end": 215, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 8, "column": 0 } }, "sourceType": "module", "body": [ { "type": "ExportDefaultDeclaration", "start": 0, "end": 213, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 7, "column": 1 } }, "declaration": { "type": "FunctionDeclaration", "start": 15, "end": 213, "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 7, "column": 1 } }, "id": { "type": "Identifier", "start": 24, "end": 34, "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 34 }, "identifierName": "getSources" }, "name": "getSources" }, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 35, "end": 40, "loc": { "start": { "line": 1, "column": 35 }, "end": { "line": 1, "column": 40 }, "identifierName": "calls" }, "name": "calls" } ], "body": { "type": "BlockStatement", "start": 42, "end": 213, "loc": { "start": { "line": 1, "column": 42 }, "end": { "line": 7, "column": 1 } }, "body": [ { "type": "ReturnStatement", "start": 49, "end": 210, "loc": { "start": { "line": 2, "column": 4 }, "end": { "line": 6, "column": 11 } }, "argument": { "type": "CallExpression", "start": 56, "end": 209, "loc": { "start": { "line": 2, "column": 11 }, "end": { "line": 6, "column": 10 } }, "callee": { "type": "MemberExpression", "start": 56, "end": 68, "loc": { "start": { "line": 2, "column": 11 }, "end": { "line": 2, "column": 23 } }, "object": { "type": "Identifier", "start": 56, "end": 61, "loc": { "start": { "line": 2, "column": 11 }, "end": { "line": 2, "column": 16 }, "identifierName": "calls" }, "name": "calls" }, "property": { "type": "Identifier", "start": 62, "end": 68, "loc": { "start": { "line": 2, "column": 17 }, "end": { "line": 2, "column": 23 }, "identifierName": "reduce" }, "name": "reduce" }, "computed": false }, "arguments": [ { "type": "ArrowFunctionExpression", "start": 69, "end": 204, "loc": { "start": { "line": 2, "column": 24 }, "end": { "line": 6, "column": 5 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 70, "end": 80, "loc": { "start": { "line": 2, "column": 25 }, "end": { "line": 2, "column": 35 }, "identifierName": "dataSource" }, "name": "dataSource" }, { "type": "Identifier", "start": 82, "end": 86, "loc": { "start": { "line": 2, "column": 37 }, "end": { "line": 2, "column": 41 }, "identifierName": "call" }, "name": "call" } ], "body": { "type": "BlockStatement", "start": 91, "end": 204, "loc": { "start": { "line": 2, "column": 46 }, "end": { "line": 6, "column": 5 } }, "body": [ { "type": "ReturnStatement", "start": 102, "end": 197, "loc": { "start": { "line": 3, "column": 8 }, "end": { "line": 5, "column": 11 } }, "argument": { "type": "CallExpression", "start": 109, "end": 196, "loc": { "start": { "line": 3, "column": 15 }, "end": { "line": 5, "column": 10 } }, "callee": { "type": "MemberExpression", "start": 109, "end": 122, "loc": { "start": { "line": 3, "column": 15 }, "end": { "line": 3, "column": 28 } }, "object": { "type": "Identifier", "start": 109, "end": 115, "loc": { "start": { "line": 3, "column": 15 }, "end": { "line": 3, "column": 21 }, "identifierName": "Object" }, "name": "Object" }, "property": { "type": "Identifier", "start": 116, "end": 122, "loc": { "start": { "line": 3, "column": 22 }, "end": { "line": 3, "column": 28 }, "identifierName": "assign" }, "name": "assign" }, "computed": false }, "arguments": [ { "type": "Identifier", "start": 123, "end": 133, "loc": { "start": { "line": 3, "column": 29 }, "end": { "line": 3, "column": 39 }, "identifierName": "dataSource" }, "name": "dataSource" }, { "type": "ObjectExpression", "start": 135, "end": 195, "loc": { "start": { "line": 3, "column": 41 }, "end": { "line": 5, "column": 9 } }, "properties": [ { "type": "ObjectProperty", "start": 150, "end": 184, "loc": { "start": { "line": 4, "column": 12 }, "end": { "line": 4, "column": 46 } }, "method": false, "shorthand": false, "computed": true, "key": { "type": "MemberExpression", "start": 151, "end": 160, "loc": { "start": { "line": 4, "column": 13 }, "end": { "line": 4, "column": 22 } }, "object": { "type": "Identifier", "start": 151, "end": 155, "loc": { "start": { "line": 4, "column": 13 }, "end": { "line": 4, "column": 17 }, "identifierName": "call" }, "name": "call" }, "property": { "type": "Identifier", "start": 156, "end": 160, "loc": { "start": { "line": 4, "column": 18 }, "end": { "line": 4, "column": 22 }, "identifierName": "name" }, "name": "name" }, "computed": false }, "value": { "type": "ArrowFunctionExpression", "start": 163, "end": 184, "loc": { "start": { "line": 4, "column": 25 }, "end": { "line": 4, "column": 46 } }, "id": null, "generator": false, "expression": true, "async": false, "params": [], "body": { "type": "MemberExpression", "start": 169, "end": 184, "loc": { "start": { "line": 4, "column": 31 }, "end": { "line": 4, "column": 46 } }, "object": { "type": "Identifier", "start": 169, "end": 173, "loc": { "start": { "line": 4, "column": 31 }, "end": { "line": 4, "column": 35 }, "identifierName": "call" }, "name": "call" }, "property": { "type": "Identifier", "start": 174, "end": 184, "loc": { "start": { "line": 4, "column": 36 }, "end": { "line": 4, "column": 46 }, "identifierName": "dataSource" }, "name": "dataSource" }, "computed": false } } } ] } ] } } ], "directives": [] } }, { "type": "ObjectExpression", "start": 206, "end": 208, "loc": { "start": { "line": 6, "column": 7 }, "end": { "line": 6, "column": 9 } }, "properties": [] } ] } } ], "directives": [] }, "leadingComments": [], "trailingComments": [] } } ], "directives": [] }, "comments": [], "tokens": [ { "type": { "label": "export", "keyword": "export", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "export", "start": 0, "end": 6, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 6 } } }, { "type": { "label": "default", "keyword": "default", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "default", "start": 7, "end": 14, "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 14 } } }, { "type": { "label": "function", "keyword": "function", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "function", "start": 15, "end": 23, "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 23 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "getSources", "start": 24, "end": 34, "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 34 } } }, { "type": { "label": "(", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 34, "end": 35, "loc": { "start": { "line": 1, "column": 34 }, "end": { "line": 1, "column": 35 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "calls", "start": 35, "end": 40, "loc": { "start": { "line": 1, "column": 35 }, "end": { "line": 1, "column": 40 } } }, { "type": { "label": ")", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 40, "end": 41, "loc": { "start": { "line": 1, "column": 40 }, "end": { "line": 1, "column": 41 } } }, { "type": { "label": "{", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 42, "end": 43, "loc": { "start": { "line": 1, "column": 42 }, "end": { "line": 1, "column": 43 } } }, { "type": { "label": "return", "keyword": "return", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "return", "start": 49, "end": 55, "loc": { "start": { "line": 2, "column": 4 }, "end": { "line": 2, "column": 10 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "calls", "start": 56, "end": 61, "loc": { "start": { "line": 2, "column": 11 }, "end": { "line": 2, "column": 16 } } }, { "type": { "label": ".", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 61, "end": 62, "loc": { "start": { "line": 2, "column": 16 }, "end": { "line": 2, "column": 17 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "reduce", "start": 62, "end": 68, "loc": { "start": { "line": 2, "column": 17 }, "end": { "line": 2, "column": 23 } } }, { "type": { "label": "(", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 68, "end": 69, "loc": { "start": { "line": 2, "column": 23 }, "end": { "line": 2, "column": 24 } } }, { "type": { "label": "(", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 69, "end": 70, "loc": { "start": { "line": 2, "column": 24 }, "end": { "line": 2, "column": 25 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "dataSource", "start": 70, "end": 80, "loc": { "start": { "line": 2, "column": 25 }, "end": { "line": 2, "column": 35 } } }, { "type": { "label": ",", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 80, "end": 81, "loc": { "start": { "line": 2, "column": 35 }, "end": { "line": 2, "column": 36 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "call", "start": 82, "end": 86, "loc": { "start": { "line": 2, "column": 37 }, "end": { "line": 2, "column": 41 } } }, { "type": { "label": ")", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 86, "end": 87, "loc": { "start": { "line": 2, "column": 41 }, "end": { "line": 2, "column": 42 } } }, { "type": { "label": "=>", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 88, "end": 90, "loc": { "start": { "line": 2, "column": 43 }, "end": { "line": 2, "column": 45 } } }, { "type": { "label": "{", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 91, "end": 92, "loc": { "start": { "line": 2, "column": 46 }, "end": { "line": 2, "column": 47 } } }, { "type": { "label": "return", "keyword": "return", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "return", "start": 102, "end": 108, "loc": { "start": { "line": 3, "column": 8 }, "end": { "line": 3, "column": 14 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "Object", "start": 109, "end": 115, "loc": { "start": { "line": 3, "column": 15 }, "end": { "line": 3, "column": 21 } } }, { "type": { "label": ".", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 115, "end": 116, "loc": { "start": { "line": 3, "column": 21 }, "end": { "line": 3, "column": 22 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "assign", "start": 116, "end": 122, "loc": { "start": { "line": 3, "column": 22 }, "end": { "line": 3, "column": 28 } } }, { "type": { "label": "(", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 122, "end": 123, "loc": { "start": { "line": 3, "column": 28 }, "end": { "line": 3, "column": 29 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "dataSource", "start": 123, "end": 133, "loc": { "start": { "line": 3, "column": 29 }, "end": { "line": 3, "column": 39 } } }, { "type": { "label": ",", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 133, "end": 134, "loc": { "start": { "line": 3, "column": 39 }, "end": { "line": 3, "column": 40 } } }, { "type": { "label": "{", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 135, "end": 136, "loc": { "start": { "line": 3, "column": 41 }, "end": { "line": 3, "column": 42 } } }, { "type": { "label": "[", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 150, "end": 151, "loc": { "start": { "line": 4, "column": 12 }, "end": { "line": 4, "column": 13 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "call", "start": 151, "end": 155, "loc": { "start": { "line": 4, "column": 13 }, "end": { "line": 4, "column": 17 } } }, { "type": { "label": ".", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 155, "end": 156, "loc": { "start": { "line": 4, "column": 17 }, "end": { "line": 4, "column": 18 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "name", "start": 156, "end": 160, "loc": { "start": { "line": 4, "column": 18 }, "end": { "line": 4, "column": 22 } } }, { "type": { "label": "]", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 160, "end": 161, "loc": { "start": { "line": 4, "column": 22 }, "end": { "line": 4, "column": 23 } } }, { "type": { "label": ":", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 161, "end": 162, "loc": { "start": { "line": 4, "column": 23 }, "end": { "line": 4, "column": 24 } } }, { "type": { "label": "(", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 163, "end": 164, "loc": { "start": { "line": 4, "column": 25 }, "end": { "line": 4, "column": 26 } } }, { "type": { "label": ")", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 164, "end": 165, "loc": { "start": { "line": 4, "column": 26 }, "end": { "line": 4, "column": 27 } } }, { "type": { "label": "=>", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 166, "end": 168, "loc": { "start": { "line": 4, "column": 28 }, "end": { "line": 4, "column": 30 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "call", "start": 169, "end": 173, "loc": { "start": { "line": 4, "column": 31 }, "end": { "line": 4, "column": 35 } } }, { "type": { "label": ".", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 173, "end": 174, "loc": { "start": { "line": 4, "column": 35 }, "end": { "line": 4, "column": 36 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "dataSource", "start": 174, "end": 184, "loc": { "start": { "line": 4, "column": 36 }, "end": { "line": 4, "column": 46 } } }, { "type": { "label": "}", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 194, "end": 195, "loc": { "start": { "line": 5, "column": 8 }, "end": { "line": 5, "column": 9 } } }, { "type": { "label": ")", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 195, "end": 196, "loc": { "start": { "line": 5, "column": 9 }, "end": { "line": 5, "column": 10 } } }, { "type": { "label": ";", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 196, "end": 197, "loc": { "start": { "line": 5, "column": 10 }, "end": { "line": 5, "column": 11 } } }, { "type": { "label": "}", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 203, "end": 204, "loc": { "start": { "line": 6, "column": 4 }, "end": { "line": 6, "column": 5 } } }, { "type": { "label": ",", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 204, "end": 205, "loc": { "start": { "line": 6, "column": 5 }, "end": { "line": 6, "column": 6 } } }, { "type": { "label": "{", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 206, "end": 207, "loc": { "start": { "line": 6, "column": 7 }, "end": { "line": 6, "column": 8 } } }, { "type": { "label": "}", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 207, "end": 208, "loc": { "start": { "line": 6, "column": 8 }, "end": { "line": 6, "column": 9 } } }, { "type": { "label": ")", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 208, "end": 209, "loc": { "start": { "line": 6, "column": 9 }, "end": { "line": 6, "column": 10 } } }, { "type": { "label": ";", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 209, "end": 210, "loc": { "start": { "line": 6, "column": 10 }, "end": { "line": 6, "column": 11 } } }, { "type": { "label": "}", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 212, "end": 213, "loc": { "start": { "line": 7, "column": 0 }, "end": { "line": 7, "column": 1 } } }, { "type": { "label": "eof", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 215, "end": 215, "loc": { "start": { "line": 8, "column": 0 }, "end": { "line": 8, "column": 0 } } } ] }