awv3
Version:
⚡ AWV3 embedded CAD
1,345 lines (1,344 loc) • 312 kB
JSON
{
"type": "File",
"start": 0,
"end": 1496,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 54,
"column": 0
}
},
"program": {
"type": "Program",
"start": 0,
"end": 1496,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 54,
"column": 0
}
},
"sourceType": "module",
"body": [
{
"type": "ImportDeclaration",
"start": 0,
"end": 36,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 36
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 7,
"end": 13,
"loc": {
"start": {
"line": 1,
"column": 7
},
"end": {
"line": 1,
"column": 13
}
},
"local": {
"type": "Identifier",
"start": 7,
"end": 13,
"loc": {
"start": {
"line": 1,
"column": 7
},
"end": {
"line": 1,
"column": 13
},
"identifierName": "Events"
},
"name": "Events"
}
}
],
"source": {
"type": "StringLiteral",
"start": 19,
"end": 35,
"loc": {
"start": {
"line": 1,
"column": 19
},
"end": {
"line": 1,
"column": 35
}
},
"extra": {
"rawValue": "../core/events",
"raw": "'../core/events'"
},
"value": "../core/events"
}
},
{
"type": "ImportDeclaration",
"start": 37,
"end": 62,
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 2,
"column": 25
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 44,
"end": 46,
"loc": {
"start": {
"line": 2,
"column": 7
},
"end": {
"line": 2,
"column": 9
}
},
"local": {
"type": "Identifier",
"start": 44,
"end": 46,
"loc": {
"start": {
"line": 2,
"column": 7
},
"end": {
"line": 2,
"column": 9
},
"identifierName": "v4"
},
"name": "v4"
}
}
],
"source": {
"type": "StringLiteral",
"start": 52,
"end": 61,
"loc": {
"start": {
"line": 2,
"column": 15
},
"end": {
"line": 2,
"column": 24
}
},
"extra": {
"rawValue": "uuid-v4",
"raw": "'uuid-v4'"
},
"value": "uuid-v4"
}
},
{
"type": "ExportDefaultDeclaration",
"start": 64,
"end": 1495,
"loc": {
"start": {
"line": 4,
"column": 0
},
"end": {
"line": 53,
"column": 1
}
},
"declaration": {
"type": "ClassDeclaration",
"start": 79,
"end": 1495,
"loc": {
"start": {
"line": 4,
"column": 15
},
"end": {
"line": 53,
"column": 1
}
},
"id": null,
"superClass": {
"type": "Identifier",
"start": 93,
"end": 99,
"loc": {
"start": {
"line": 4,
"column": 29
},
"end": {
"line": 4,
"column": 35
},
"identifierName": "Events"
},
"name": "Events"
},
"body": {
"type": "ClassBody",
"start": 100,
"end": 1495,
"loc": {
"start": {
"line": 4,
"column": 36
},
"end": {
"line": 53,
"column": 1
}
},
"body": [
{
"type": "ClassMethod",
"start": 107,
"end": 404,
"loc": {
"start": {
"line": 6,
"column": 4
},
"end": {
"line": 17,
"column": 5
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 107,
"end": 118,
"loc": {
"start": {
"line": 6,
"column": 4
},
"end": {
"line": 6,
"column": 15
},
"identifierName": "constructor"
},
"name": "constructor"
},
"static": false,
"kind": "constructor",
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "AssignmentPattern",
"start": 119,
"end": 131,
"loc": {
"start": {
"line": 6,
"column": 16
},
"end": {
"line": 6,
"column": 28
}
},
"left": {
"type": "Identifier",
"start": 119,
"end": 126,
"loc": {
"start": {
"line": 6,
"column": 16
},
"end": {
"line": 6,
"column": 23
},
"identifierName": "options"
},
"name": "options"
},
"right": {
"type": "ObjectExpression",
"start": 129,
"end": 131,
"loc": {
"start": {
"line": 6,
"column": 26
},
"end": {
"line": 6,
"column": 28
}
},
"properties": []
}
}
],
"body": {
"type": "BlockStatement",
"start": 133,
"end": 404,
"loc": {
"start": {
"line": 6,
"column": 30
},
"end": {
"line": 17,
"column": 5
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 143,
"end": 151,
"loc": {
"start": {
"line": 7,
"column": 8
},
"end": {
"line": 7,
"column": 16
}
},
"expression": {
"type": "CallExpression",
"start": 143,
"end": 150,
"loc": {
"start": {
"line": 7,
"column": 8
},
"end": {
"line": 7,
"column": 15
}
},
"callee": {
"type": "Super",
"start": 143,
"end": 148,
"loc": {
"start": {
"line": 7,
"column": 8
},
"end": {
"line": 7,
"column": 13
}
}
},
"arguments": []
}
},
{
"type": "IfStatement",
"start": 161,
"end": 398,
"loc": {
"start": {
"line": 9,
"column": 8
},
"end": {
"line": 16,
"column": 9
}
},
"test": {
"type": "BinaryExpression",
"start": 165,
"end": 182,
"loc": {
"start": {
"line": 9,
"column": 12
},
"end": {
"line": 9,
"column": 29
}
},
"left": {
"type": "Identifier",
"start": 165,
"end": 172,
"loc": {
"start": {
"line": 9,
"column": 12
},
"end": {
"line": 9,
"column": 19
},
"identifierName": "options"
},
"name": "options"
},
"operator": "!==",
"right": {
"type": "BooleanLiteral",
"start": 177,
"end": 182,
"loc": {
"start": {
"line": 9,
"column": 24
},
"end": {
"line": 9,
"column": 29
}
},
"value": false
}
},
"consequent": {
"type": "BlockStatement",
"start": 184,
"end": 398,
"loc": {
"start": {
"line": 9,
"column": 31
},
"end": {
"line": 16,
"column": 9
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 198,
"end": 213,
"loc": {
"start": {
"line": 10,
"column": 12
},
"end": {
"line": 10,
"column": 27
}
},
"expression": {
"type": "AssignmentExpression",
"start": 198,
"end": 212,
"loc": {
"start": {
"line": 10,
"column": 12
},
"end": {
"line": 10,
"column": 26
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 198,
"end": 205,
"loc": {
"start": {
"line": 10,
"column": 12
},
"end": {
"line": 10,
"column": 19
}
},
"object": {
"type": "ThisExpression",
"start": 198,
"end": 202,
"loc": {
"start": {
"line": 10,
"column": 12
},
"end": {
"line": 10,
"column": 16
}
}
},
"property": {
"type": "Identifier",
"start": 203,
"end": 205,
"loc": {
"start": {
"line": 10,
"column": 17
},
"end": {
"line": 10,
"column": 19
},
"identifierName": "id"
},
"name": "id"
},
"computed": false
},
"right": {
"type": "CallExpression",
"start": 208,
"end": 212,
"loc": {
"start": {
"line": 10,
"column": 22
},
"end": {
"line": 10,
"column": 26
}
},
"callee": {
"type": "Identifier",
"start": 208,
"end": 210,
"loc": {
"start": {
"line": 10,
"column": 22
},
"end": {
"line": 10,
"column": 24
},
"identifierName": "v4"
},
"name": "v4"
},
"arguments": []
}
}
},
{
"type": "ExpressionStatement",
"start": 226,
"end": 245,
"loc": {
"start": {
"line": 11,
"column": 12
},
"end": {
"line": 11,
"column": 31
}
},
"expression": {
"type": "AssignmentExpression",
"start": 226,
"end": 244,
"loc": {
"start": {
"line": 11,
"column": 12
},
"end": {
"line": 11,
"column": 30
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 226,
"end": 236,
"loc": {
"start": {
"line": 11,
"column": 12
},
"end": {
"line": 11,
"column": 22
}
},
"object": {
"type": "ThisExpression",
"start": 226,
"end": 230,
"loc": {
"start": {
"line": 11,
"column": 12
},
"end": {
"line": 11,
"column": 16
}
}
},
"property": {
"type": "Identifier",
"start": 231,
"end": 236,
"loc": {
"start": {
"line": 11,
"column": 17
},
"end": {
"line": 11,
"column": 22
},
"identifierName": "alive"
},
"name": "alive"
},
"computed": false
},
"right": {
"type": "BooleanLiteral",
"start": 239,
"end": 244,
"loc": {
"start": {
"line": 11,
"column": 25
},
"end": {
"line": 11,
"column": 30
}
},
"value": false
}
}
},
{
"type": "ExpressionStatement",
"start": 258,
"end": 281,
"loc": {
"start": {
"line": 12,
"column": 12
},
"end": {
"line": 12,
"column": 35
}
},
"expression": {
"type": "AssignmentExpression",
"start": 258,
"end": 280,
"loc": {
"start": {
"line": 12,
"column": 12
},
"end": {
"line": 12,
"column": 34
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 258,
"end": 270,
"loc": {
"start": {
"line": 12,
"column": 12
},
"end": {
"line": 12,
"column": 24
}
},
"object": {
"type": "ThisExpression",
"start": 258,
"end": 262,
"loc": {
"start": {
"line": 12,
"column": 12
},
"end": {
"line": 12,
"column": 16
}
}
},
"property": {
"type": "Identifier",
"start": 263,
"end": 270,
"loc": {
"start": {
"line": 12,
"column": 17
},
"end": {
"line": 12,
"column": 24
},
"identifierName": "options"
},
"name": "options"
},
"computed": false
},
"right": {
"type": "Identifier",
"start": 273,
"end": 280,
"loc": {
"start": {
"line": 12,
"column": 27
},
"end": {
"line": 12,
"column": 34
},
"identifierName": "options"
},
"name": "options"
}
}
},
{
"type": "ExpressionStatement",
"start": 294,
"end": 318,
"loc": {
"start": {
"line": 13,
"column": 12
},
"end": {
"line": 13,
"column": 36
}
},
"expression": {
"type": "AssignmentExpression",
"start": 294,
"end": 317,
"loc": {
"start": {
"line": 13,
"column": 12
},
"end": {
"line": 13,
"column": 35
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 294,
"end": 305,
"loc": {
"start": {
"line": 13,
"column": 12
},
"end": {
"line": 13,
"column": 23
}
},
"object": {
"type": "ThisExpression",
"start": 294,
"end": 298,
"loc": {
"start": {
"line": 13,
"column": 12
},
"end": {
"line": 13,
"column": 16
}
}
},
"property": {
"type": "Identifier",
"start": 299,
"end": 305,
"loc": {
"start": {
"line": 13,
"column": 17
},
"end": {
"line": 13,
"column": 23
},
"identifierName": "socket"
},
"name": "socket"
},
"computed": false
},
"right": {
"type": "Identifier",
"start": 308,
"end": 317,
"loc": {
"start": {
"line": 13,
"column": 26
},
"end": {
"line": 13,
"column": 35
},
"identifierName": "undefined"
},
"name": "undefined"
}
}
},
{
"type": "ExpressionStatement",
"start": 331,
"end": 354,
"loc": {
"start": {
"line": 14,
"column": 12
},
"end": {
"line": 14,
"column": 35
}
},
"expression": {
"type": "AssignmentExpression",
"start": 331,
"end": 353,
"loc": {
"start": {
"line": 14,
"column": 12
},
"end": {
"line": 14,
"column": 34
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 331,
"end": 341,
"loc": {
"start": {
"line": 14,
"column": 12
},
"end": {
"line": 14,
"column": 22
}
},
"object": {
"type": "ThisExpression",
"start": 331,
"end": 335,
"loc": {
"start": {
"line": 14,
"column": 12
},
"end": {
"line": 14,
"column": 16
}
}
},
"property": {
"type": "Identifier",
"start": 336,
"end": 341,
"loc": {
"start": {
"line": 14,
"column": 17
},
"end": {
"line": 14,
"column": 22
},
"identifierName": "tasks"
},
"name": "tasks"
},
"computed": false
},
"right": {
"type": "NewExpression",
"start": 344,
"end": 353,
"loc": {
"start": {
"line": 14,
"column": 25
},
"end": {
"line": 14,
"column": 34
}
},
"callee": {
"type": "Identifier",
"start": 348,
"end": 351,
"loc": {
"start": {
"line": 14,
"column": 29
},
"end": {
"line": 14,
"column": 32
},
"identifierName": "Map"
},
"name": "Map"
},
"arguments": []
}
}
},
{
"type": "ExpressionStatement",
"start": 367,
"end": 388,
"loc": {
"start": {
"line": 15,
"column": 12
},
"end": {
"line": 15,
"column": 33
}
},
"expression": {
"type": "AssignmentExpression",
"start": 367,
"end": 387,
"loc": {
"start": {
"line": 15,
"column": 12
},
"end": {
"line": 15,
"column": 32
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 367,
"end": 375,
"loc": {
"start": {
"line": 15,
"column": 12
},
"end": {
"line": 15,
"column": 20
}
},
"object": {
"type": "ThisExpression",
"start": 367,
"end": 371,
"loc": {
"start": {
"line": 15,
"column": 12
},
"end": {
"line": 15,
"column": 16
}
}
},
"property": {
"type": "Identifier",
"start": 372,
"end": 375,
"loc": {
"start": {
"line": 15,
"column": 17
},
"end": {
"line": 15,
"column": 20
},
"identifierName": "url"
},
"name": "url"
},
"computed": false
},
"right": {
"type": "Identifier",
"start": 378,
"end": 387,
"loc": {
"start": {
"line": 15,
"column": 23
},
"end": {
"line": 15,
"column": 32
},
"identifierName": "undefined"
},
"name": "undefined"
}
}
}
],
"directives": []
},
"alternate": null
}
],
"directives": []
}
},
{
"type": "ClassMethod",
"start": 410,
"end": 508,
"loc": {
"start": {
"line": 19,
"column": 4
},
"end": {
"line": 21,
"column": 5
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 410,
"end": 417,
"loc": {
"start": {
"line": 19,
"column": 4
},
"end": {
"line": 19,
"column": 11
},
"identifierName": "execute"
},
"name": "execute"
},
"static": false,
"kind": "method",
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "Identifier",
"start": 418,
"end": 422,
"loc": {
"start": {
"line": 19,
"column": 12
},
"end": {
"line": 19,
"column": 16
},
"identifierName": "task"
},
"name": "task"
},
{
"type": "Identifier",
"start": 424,
"end": 431,
"loc": {
"start": {
"line": 19,
"column": 18
},
"end": {
"line": 19,
"column": 25
},
"identifierName": "factory"
},
"name": "factory"
}
],
"body": {
"type": "BlockStatement",
"start": 433,
"end": 508,
"loc": {
"start": {
"line": 19,
"column": 27
},
"end": {
"line": 21,
"column": 5
}
},
"body": [
{
"type": "ReturnStatement",
"start": 443,
"end": 502,
"loc": {
"start": {
"line": 20,
"column": 8
},
"end": {
"line": 20,
"column": 67
}
},
"argument": {
"type": "CallExpression",
"start": 450,
"end": 501,
"loc": {
"start": {
"line": 20,
"column": 15
},
"end": {
"line": 20,
"column": 66
}
},
"callee": {
"type": "MemberExpression",
"start": 450,
"end": 462,
"loc": {
"start": {
"line": 20,
"column": 15
},
"end": {
"line": 20,
"column": 27
}
},
"object": {
"type": "ThisExpression",
"start": 450,
"end": 454,
"loc": {
"start": {
"line": 20,
"column": 15
},
"end": {
"line": 20,
"column": 19
}
}
},
"property": {
"type": "Identifier",
"start": 455,
"end": 462,
"loc": {
"start": {
"line": 20,
"column": 20
},
"end": {
"line": 20,
"column": 27
},
"identifierName": "request"
},
"name": "request"
},
"computed": false
},
"arguments": [
{
"type": "ObjectExpression",
"start": 463,
"end": 491,
"loc": {
"start": {
"line": 20,
"column": 28
},
"end": {
"line": 20,
"column": 56
}
},
"properties": [
{
"type": "ObjectProperty",
"start": 465,
"end": 483,
"loc": {
"start": {
"line": 20,
"column": 30
},
"end": {
"line": 20,
"column": 48
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 465,
"end": 472,
"loc": {
"start": {
"line": 20,
"column": 30
},
"end": {
"line": 20,
"column": 37
},
"identifierName": "command"
},
"name": "command"
},
"value": {
"type": "StringLiteral",
"start": 474,
"end": 483,
"loc": {
"start": {
"line": 20,
"column": 39
},
"end": {
"line": 20,
"column": 48
}
},
"extra": {
"rawValue": "Execute",
"raw": "'Execute'"
},
"value": "Execute"
}
},
{
"type": "ObjectProperty",
"start": 485,
"end": 489,
"loc": {
"start": {
"line": 20,
"column": 50
},
"end": {
"line": 20,
"column": 54
}
},
"method": false,
"shorthand": true,
"computed": false,
"key": {
"type": "Identifier",
"start": 485,
"end": 489,
"loc": {
"start": {
"line": 20,
"column": 50
},
"end": {
"line": 20,
"column": 54
},
"identifierName": "task"
},
"name": "task"
},
"value": {
"type": "Identifier",