awv3
Version:
⚡ AWV3 embedded CAD
1,345 lines (1,344 loc) • 313 kB
JSON
{
"type": "File",
"start": 0,
"end": 1490,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 52,
"column": 0
}
},
"program": {
"type": "Program",
"start": 0,
"end": 1490,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 52,
"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": 1489,
"loc": {
"start": {
"line": 4,
"column": 0
},
"end": {
"line": 51,
"column": 1
}
},
"declaration": {
"type": "ClassDeclaration",
"start": 79,
"end": 1489,
"loc": {
"start": {
"line": 4,
"column": 15
},
"end": {
"line": 51,
"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": 1489,
"loc": {
"start": {
"line": 4,
"column": 36
},
"end": {
"line": 51,
"column": 1
}
},
"body": [
{
"type": "ClassMethod",
"start": 106,
"end": 403,
"loc": {
"start": {
"line": 5,
"column": 4
},
"end": {
"line": 16,
"column": 5
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 106,
"end": 117,
"loc": {
"start": {
"line": 5,
"column": 4
},
"end": {
"line": 5,
"column": 15
},
"identifierName": "constructor"
},
"name": "constructor"
},
"static": false,
"kind": "constructor",
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "AssignmentPattern",
"start": 118,
"end": 130,
"loc": {
"start": {
"line": 5,
"column": 16
},
"end": {
"line": 5,
"column": 28
}
},
"left": {
"type": "Identifier",
"start": 118,
"end": 125,
"loc": {
"start": {
"line": 5,
"column": 16
},
"end": {
"line": 5,
"column": 23
},
"identifierName": "options"
},
"name": "options"
},
"right": {
"type": "ObjectExpression",
"start": 128,
"end": 130,
"loc": {
"start": {
"line": 5,
"column": 26
},
"end": {
"line": 5,
"column": 28
}
},
"properties": []
}
}
],
"body": {
"type": "BlockStatement",
"start": 132,
"end": 403,
"loc": {
"start": {
"line": 5,
"column": 30
},
"end": {
"line": 16,
"column": 5
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 142,
"end": 150,
"loc": {
"start": {
"line": 6,
"column": 8
},
"end": {
"line": 6,
"column": 16
}
},
"expression": {
"type": "CallExpression",
"start": 142,
"end": 149,
"loc": {
"start": {
"line": 6,
"column": 8
},
"end": {
"line": 6,
"column": 15
}
},
"callee": {
"type": "Super",
"start": 142,
"end": 147,
"loc": {
"start": {
"line": 6,
"column": 8
},
"end": {
"line": 6,
"column": 13
}
}
},
"arguments": []
}
},
{
"type": "IfStatement",
"start": 160,
"end": 397,
"loc": {
"start": {
"line": 8,
"column": 8
},
"end": {
"line": 15,
"column": 9
}
},
"test": {
"type": "BinaryExpression",
"start": 164,
"end": 181,
"loc": {
"start": {
"line": 8,
"column": 12
},
"end": {
"line": 8,
"column": 29
}
},
"left": {
"type": "Identifier",
"start": 164,
"end": 171,
"loc": {
"start": {
"line": 8,
"column": 12
},
"end": {
"line": 8,
"column": 19
},
"identifierName": "options"
},
"name": "options"
},
"operator": "!==",
"right": {
"type": "BooleanLiteral",
"start": 176,
"end": 181,
"loc": {
"start": {
"line": 8,
"column": 24
},
"end": {
"line": 8,
"column": 29
}
},
"value": false
}
},
"consequent": {
"type": "BlockStatement",
"start": 183,
"end": 397,
"loc": {
"start": {
"line": 8,
"column": 31
},
"end": {
"line": 15,
"column": 9
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 197,
"end": 212,
"loc": {
"start": {
"line": 9,
"column": 12
},
"end": {
"line": 9,
"column": 27
}
},
"expression": {
"type": "AssignmentExpression",
"start": 197,
"end": 211,
"loc": {
"start": {
"line": 9,
"column": 12
},
"end": {
"line": 9,
"column": 26
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 197,
"end": 204,
"loc": {
"start": {
"line": 9,
"column": 12
},
"end": {
"line": 9,
"column": 19
}
},
"object": {
"type": "ThisExpression",
"start": 197,
"end": 201,
"loc": {
"start": {
"line": 9,
"column": 12
},
"end": {
"line": 9,
"column": 16
}
}
},
"property": {
"type": "Identifier",
"start": 202,
"end": 204,
"loc": {
"start": {
"line": 9,
"column": 17
},
"end": {
"line": 9,
"column": 19
},
"identifierName": "id"
},
"name": "id"
},
"computed": false
},
"right": {
"type": "CallExpression",
"start": 207,
"end": 211,
"loc": {
"start": {
"line": 9,
"column": 22
},
"end": {
"line": 9,
"column": 26
}
},
"callee": {
"type": "Identifier",
"start": 207,
"end": 209,
"loc": {
"start": {
"line": 9,
"column": 22
},
"end": {
"line": 9,
"column": 24
},
"identifierName": "v4"
},
"name": "v4"
},
"arguments": []
}
}
},
{
"type": "ExpressionStatement",
"start": 225,
"end": 244,
"loc": {
"start": {
"line": 10,
"column": 12
},
"end": {
"line": 10,
"column": 31
}
},
"expression": {
"type": "AssignmentExpression",
"start": 225,
"end": 243,
"loc": {
"start": {
"line": 10,
"column": 12
},
"end": {
"line": 10,
"column": 30
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 225,
"end": 235,
"loc": {
"start": {
"line": 10,
"column": 12
},
"end": {
"line": 10,
"column": 22
}
},
"object": {
"type": "ThisExpression",
"start": 225,
"end": 229,
"loc": {
"start": {
"line": 10,
"column": 12
},
"end": {
"line": 10,
"column": 16
}
}
},
"property": {
"type": "Identifier",
"start": 230,
"end": 235,
"loc": {
"start": {
"line": 10,
"column": 17
},
"end": {
"line": 10,
"column": 22
},
"identifierName": "alive"
},
"name": "alive"
},
"computed": false
},
"right": {
"type": "BooleanLiteral",
"start": 238,
"end": 243,
"loc": {
"start": {
"line": 10,
"column": 25
},
"end": {
"line": 10,
"column": 30
}
},
"value": false
}
}
},
{
"type": "ExpressionStatement",
"start": 257,
"end": 280,
"loc": {
"start": {
"line": 11,
"column": 12
},
"end": {
"line": 11,
"column": 35
}
},
"expression": {
"type": "AssignmentExpression",
"start": 257,
"end": 279,
"loc": {
"start": {
"line": 11,
"column": 12
},
"end": {
"line": 11,
"column": 34
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 257,
"end": 269,
"loc": {
"start": {
"line": 11,
"column": 12
},
"end": {
"line": 11,
"column": 24
}
},
"object": {
"type": "ThisExpression",
"start": 257,
"end": 261,
"loc": {
"start": {
"line": 11,
"column": 12
},
"end": {
"line": 11,
"column": 16
}
}
},
"property": {
"type": "Identifier",
"start": 262,
"end": 269,
"loc": {
"start": {
"line": 11,
"column": 17
},
"end": {
"line": 11,
"column": 24
},
"identifierName": "options"
},
"name": "options"
},
"computed": false
},
"right": {
"type": "Identifier",
"start": 272,
"end": 279,
"loc": {
"start": {
"line": 11,
"column": 27
},
"end": {
"line": 11,
"column": 34
},
"identifierName": "options"
},
"name": "options"
}
}
},
{
"type": "ExpressionStatement",
"start": 293,
"end": 317,
"loc": {
"start": {
"line": 12,
"column": 12
},
"end": {
"line": 12,
"column": 36
}
},
"expression": {
"type": "AssignmentExpression",
"start": 293,
"end": 316,
"loc": {
"start": {
"line": 12,
"column": 12
},
"end": {
"line": 12,
"column": 35
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 293,
"end": 304,
"loc": {
"start": {
"line": 12,
"column": 12
},
"end": {
"line": 12,
"column": 23
}
},
"object": {
"type": "ThisExpression",
"start": 293,
"end": 297,
"loc": {
"start": {
"line": 12,
"column": 12
},
"end": {
"line": 12,
"column": 16
}
}
},
"property": {
"type": "Identifier",
"start": 298,
"end": 304,
"loc": {
"start": {
"line": 12,
"column": 17
},
"end": {
"line": 12,
"column": 23
},
"identifierName": "socket"
},
"name": "socket"
},
"computed": false
},
"right": {
"type": "Identifier",
"start": 307,
"end": 316,
"loc": {
"start": {
"line": 12,
"column": 26
},
"end": {
"line": 12,
"column": 35
},
"identifierName": "undefined"
},
"name": "undefined"
}
}
},
{
"type": "ExpressionStatement",
"start": 330,
"end": 353,
"loc": {
"start": {
"line": 13,
"column": 12
},
"end": {
"line": 13,
"column": 35
}
},
"expression": {
"type": "AssignmentExpression",
"start": 330,
"end": 352,
"loc": {
"start": {
"line": 13,
"column": 12
},
"end": {
"line": 13,
"column": 34
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 330,
"end": 340,
"loc": {
"start": {
"line": 13,
"column": 12
},
"end": {
"line": 13,
"column": 22
}
},
"object": {
"type": "ThisExpression",
"start": 330,
"end": 334,
"loc": {
"start": {
"line": 13,
"column": 12
},
"end": {
"line": 13,
"column": 16
}
}
},
"property": {
"type": "Identifier",
"start": 335,
"end": 340,
"loc": {
"start": {
"line": 13,
"column": 17
},
"end": {
"line": 13,
"column": 22
},
"identifierName": "tasks"
},
"name": "tasks"
},
"computed": false
},
"right": {
"type": "NewExpression",
"start": 343,
"end": 352,
"loc": {
"start": {
"line": 13,
"column": 25
},
"end": {
"line": 13,
"column": 34
}
},
"callee": {
"type": "Identifier",
"start": 347,
"end": 350,
"loc": {
"start": {
"line": 13,
"column": 29
},
"end": {
"line": 13,
"column": 32
},
"identifierName": "Map"
},
"name": "Map"
},
"arguments": []
}
}
},
{
"type": "ExpressionStatement",
"start": 366,
"end": 387,
"loc": {
"start": {
"line": 14,
"column": 12
},
"end": {
"line": 14,
"column": 33
}
},
"expression": {
"type": "AssignmentExpression",
"start": 366,
"end": 386,
"loc": {
"start": {
"line": 14,
"column": 12
},
"end": {
"line": 14,
"column": 32
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 366,
"end": 374,
"loc": {
"start": {
"line": 14,
"column": 12
},
"end": {
"line": 14,
"column": 20
}
},
"object": {
"type": "ThisExpression",
"start": 366,
"end": 370,
"loc": {
"start": {
"line": 14,
"column": 12
},
"end": {
"line": 14,
"column": 16
}
}
},
"property": {
"type": "Identifier",
"start": 371,
"end": 374,
"loc": {
"start": {
"line": 14,
"column": 17
},
"end": {
"line": 14,
"column": 20
},
"identifierName": "url"
},
"name": "url"
},
"computed": false
},
"right": {
"type": "Identifier",
"start": 377,
"end": 386,
"loc": {
"start": {
"line": 14,
"column": 23
},
"end": {
"line": 14,
"column": 32
},
"identifierName": "undefined"
},
"name": "undefined"
}
}
}
],
"directives": []
},
"alternate": null
}
],
"directives": []
}
},
{
"type": "ClassMethod",
"start": 409,
"end": 507,
"loc": {
"start": {
"line": 18,
"column": 4
},
"end": {
"line": 20,
"column": 5
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 409,
"end": 416,
"loc": {
"start": {
"line": 18,
"column": 4
},
"end": {
"line": 18,
"column": 11
},
"identifierName": "execute"
},
"name": "execute"
},
"static": false,
"kind": "method",
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "Identifier",
"start": 417,
"end": 421,
"loc": {
"start": {
"line": 18,
"column": 12
},
"end": {
"line": 18,
"column": 16
},
"identifierName": "task"
},
"name": "task"
},
{
"type": "Identifier",
"start": 423,
"end": 430,
"loc": {
"start": {
"line": 18,
"column": 18
},
"end": {
"line": 18,
"column": 25
},
"identifierName": "factory"
},
"name": "factory"
}
],
"body": {
"type": "BlockStatement",
"start": 432,
"end": 507,
"loc": {
"start": {
"line": 18,
"column": 27
},
"end": {
"line": 20,
"column": 5
}
},
"body": [
{
"type": "ReturnStatement",
"start": 442,
"end": 501,
"loc": {
"start": {
"line": 19,
"column": 8
},
"end": {
"line": 19,
"column": 67
}
},
"argument": {
"type": "CallExpression",
"start": 449,
"end": 500,
"loc": {
"start": {
"line": 19,
"column": 15
},
"end": {
"line": 19,
"column": 66
}
},
"callee": {
"type": "MemberExpression",
"start": 449,
"end": 461,
"loc": {
"start": {
"line": 19,
"column": 15
},
"end": {
"line": 19,
"column": 27
}
},
"object": {
"type": "ThisExpression",
"start": 449,
"end": 453,
"loc": {
"start": {
"line": 19,
"column": 15
},
"end": {
"line": 19,
"column": 19
}
}
},
"property": {
"type": "Identifier",
"start": 454,
"end": 461,
"loc": {
"start": {
"line": 19,
"column": 20
},
"end": {
"line": 19,
"column": 27
},
"identifierName": "request"
},
"name": "request"
},
"computed": false
},
"arguments": [
{
"type": "ObjectExpression",
"start": 462,
"end": 490,
"loc": {
"start": {
"line": 19,
"column": 28
},
"end": {
"line": 19,
"column": 56
}
},
"properties": [
{
"type": "ObjectProperty",
"start": 464,
"end": 482,
"loc": {
"start": {
"line": 19,
"column": 30
},
"end": {
"line": 19,
"column": 48
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 464,
"end": 471,
"loc": {
"start": {
"line": 19,
"column": 30
},
"end": {
"line": 19,
"column": 37
},
"identifierName": "command"
},
"name": "command"
},
"value": {
"type": "StringLiteral",
"start": 473,
"end": 482,
"loc": {
"start": {
"line": 19,
"column": 39
},
"end": {
"line": 19,
"column": 48
}
},
"extra": {
"rawValue": "Execute",
"raw": "'Execute'"
},
"value": "Execute"
}
},
{
"type": "ObjectProperty",
"start": 484,
"end": 488,
"loc": {
"start": {
"line": 19,
"column": 50
},
"end": {
"line": 19,
"column": 54
}
},
"method": false,
"shorthand": true,
"computed": false,
"key": {
"type": "Identifier",
"start": 484,
"end": 488,
"loc": {
"start": {
"line": 19,
"column": 50
},
"end": {
"line": 19,
"column": 54
},
"identifierName": "task"
},
"name": "task"
},
"value": {
"type": "Identifier",