awv3
Version:
AWV client CAD framework
1,385 lines (1,384 loc) • 535 kB
JSON
{
"type": "Program",
"start": 0,
"end": 4827,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 143,
"column": 0
}
},
"sourceType": "module",
"body": [
{
"type": "ExportDefaultDeclaration",
"start": 0,
"end": 4826,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 142,
"column": 1
}
},
"declaration": {
"type": "ClassDeclaration",
"start": 15,
"end": 4826,
"loc": {
"start": {
"line": 1,
"column": 15
},
"end": {
"line": 142,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 21,
"end": 27,
"loc": {
"start": {
"line": 1,
"column": 21
},
"end": {
"line": 1,
"column": 27
}
},
"name": "Events"
},
"superClass": null,
"body": {
"type": "ClassBody",
"start": 28,
"end": 4826,
"loc": {
"start": {
"line": 1,
"column": 28
},
"end": {
"line": 142,
"column": 1
}
},
"body": [
{
"type": "MethodDefinition",
"start": 34,
"end": 130,
"loc": {
"start": {
"line": 2,
"column": 4
},
"end": {
"line": 5,
"column": 5
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 34,
"end": 45,
"loc": {
"start": {
"line": 2,
"column": 4
},
"end": {
"line": 2,
"column": 15
}
},
"name": "constructor"
},
"static": false,
"kind": "constructor",
"value": {
"type": "FunctionExpression",
"start": 45,
"end": 130,
"loc": {
"start": {
"line": 2,
"column": 15
},
"end": {
"line": 5,
"column": 5
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start": 48,
"end": 130,
"loc": {
"start": {
"line": 2,
"column": 18
},
"end": {
"line": 5,
"column": 5
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 58,
"end": 86,
"loc": {
"start": {
"line": 3,
"column": 8
},
"end": {
"line": 3,
"column": 36
}
},
"expression": {
"type": "AssignmentExpression",
"start": 58,
"end": 85,
"loc": {
"start": {
"line": 3,
"column": 8
},
"end": {
"line": 3,
"column": 35
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 58,
"end": 73,
"loc": {
"start": {
"line": 3,
"column": 8
},
"end": {
"line": 3,
"column": 23
}
},
"object": {
"type": "ThisExpression",
"start": 58,
"end": 62,
"loc": {
"start": {
"line": 3,
"column": 8
},
"end": {
"line": 3,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"start": 63,
"end": 73,
"loc": {
"start": {
"line": 3,
"column": 13
},
"end": {
"line": 3,
"column": 23
}
},
"name": "_callbacks"
},
"computed": false
},
"right": {
"type": "Identifier",
"start": 76,
"end": 85,
"loc": {
"start": {
"line": 3,
"column": 26
},
"end": {
"line": 3,
"column": 35
}
},
"name": "undefined"
}
}
},
{
"type": "ExpressionStatement",
"start": 95,
"end": 124,
"loc": {
"start": {
"line": 4,
"column": 8
},
"end": {
"line": 4,
"column": 37
}
},
"expression": {
"type": "AssignmentExpression",
"start": 95,
"end": 123,
"loc": {
"start": {
"line": 4,
"column": 8
},
"end": {
"line": 4,
"column": 36
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 95,
"end": 111,
"loc": {
"start": {
"line": 4,
"column": 8
},
"end": {
"line": 4,
"column": 24
}
},
"object": {
"type": "ThisExpression",
"start": 95,
"end": 99,
"loc": {
"start": {
"line": 4,
"column": 8
},
"end": {
"line": 4,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"start": 100,
"end": 111,
"loc": {
"start": {
"line": 4,
"column": 13
},
"end": {
"line": 4,
"column": 24
}
},
"name": "_inspectors"
},
"computed": false
},
"right": {
"type": "Identifier",
"start": 114,
"end": 123,
"loc": {
"start": {
"line": 4,
"column": 27
},
"end": {
"line": 4,
"column": 36
}
},
"name": "undefined"
}
}
}
]
}
}
},
{
"type": "MethodDefinition",
"start": 136,
"end": 203,
"loc": {
"start": {
"line": 7,
"column": 4
},
"end": {
"line": 9,
"column": 5
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 136,
"end": 140,
"loc": {
"start": {
"line": 7,
"column": 4
},
"end": {
"line": 7,
"column": 8
}
},
"name": "once"
},
"static": false,
"kind": "method",
"value": {
"type": "FunctionExpression",
"start": 140,
"end": 203,
"loc": {
"start": {
"line": 7,
"column": 8
},
"end": {
"line": 9,
"column": 5
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "Identifier",
"start": 141,
"end": 145,
"loc": {
"start": {
"line": 7,
"column": 9
},
"end": {
"line": 7,
"column": 13
}
},
"name": "type"
},
{
"type": "Identifier",
"start": 147,
"end": 155,
"loc": {
"start": {
"line": 7,
"column": 15
},
"end": {
"line": 7,
"column": 23
}
},
"name": "callback"
}
],
"body": {
"type": "BlockStatement",
"start": 157,
"end": 203,
"loc": {
"start": {
"line": 7,
"column": 25
},
"end": {
"line": 9,
"column": 5
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 167,
"end": 197,
"loc": {
"start": {
"line": 8,
"column": 8
},
"end": {
"line": 8,
"column": 38
}
},
"expression": {
"type": "CallExpression",
"start": 167,
"end": 196,
"loc": {
"start": {
"line": 8,
"column": 8
},
"end": {
"line": 8,
"column": 37
}
},
"callee": {
"type": "MemberExpression",
"start": 167,
"end": 174,
"loc": {
"start": {
"line": 8,
"column": 8
},
"end": {
"line": 8,
"column": 15
}
},
"object": {
"type": "ThisExpression",
"start": 167,
"end": 171,
"loc": {
"start": {
"line": 8,
"column": 8
},
"end": {
"line": 8,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"start": 172,
"end": 174,
"loc": {
"start": {
"line": 8,
"column": 13
},
"end": {
"line": 8,
"column": 15
}
},
"name": "on"
},
"computed": false
},
"arguments": [
{
"type": "Identifier",
"start": 175,
"end": 179,
"loc": {
"start": {
"line": 8,
"column": 16
},
"end": {
"line": 8,
"column": 20
}
},
"name": "type"
},
{
"type": "Identifier",
"start": 181,
"end": 189,
"loc": {
"start": {
"line": 8,
"column": 22
},
"end": {
"line": 8,
"column": 30
}
},
"name": "callback"
},
{
"type": "Literal",
"start": 191,
"end": 195,
"loc": {
"start": {
"line": 8,
"column": 32
},
"end": {
"line": 8,
"column": 36
}
},
"value": true,
"rawValue": true,
"raw": "true"
}
]
}
}
]
}
}
},
{
"type": "MethodDefinition",
"start": 209,
"end": 1395,
"loc": {
"start": {
"line": 11,
"column": 4
},
"end": {
"line": 43,
"column": 5
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 209,
"end": 211,
"loc": {
"start": {
"line": 11,
"column": 4
},
"end": {
"line": 11,
"column": 6
}
},
"name": "on"
},
"static": false,
"kind": "method",
"value": {
"type": "FunctionExpression",
"start": 211,
"end": 1395,
"loc": {
"start": {
"line": 11,
"column": 6
},
"end": {
"line": 43,
"column": 5
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "AssignmentPattern",
"start": 212,
"end": 221,
"loc": {
"start": {
"line": 11,
"column": 7
},
"end": {
"line": 11,
"column": 16
}
},
"operator": "=",
"left": {
"type": "Identifier",
"start": 212,
"end": 216,
"loc": {
"start": {
"line": 11,
"column": 7
},
"end": {
"line": 11,
"column": 11
}
},
"name": "arg1"
},
"right": {
"type": "ObjectExpression",
"start": 219,
"end": 221,
"loc": {
"start": {
"line": 11,
"column": 14
},
"end": {
"line": 11,
"column": 16
}
},
"properties": []
}
},
{
"type": "AssignmentPattern",
"start": 223,
"end": 239,
"loc": {
"start": {
"line": 11,
"column": 18
},
"end": {
"line": 11,
"column": 34
}
},
"operator": "=",
"left": {
"type": "Identifier",
"start": 223,
"end": 227,
"loc": {
"start": {
"line": 11,
"column": 18
},
"end": {
"line": 11,
"column": 22
}
},
"name": "arg2"
},
"right": {
"type": "Identifier",
"start": 230,
"end": 239,
"loc": {
"start": {
"line": 11,
"column": 25
},
"end": {
"line": 11,
"column": 34
}
},
"name": "undefined"
}
},
{
"type": "AssignmentPattern",
"start": 241,
"end": 255,
"loc": {
"start": {
"line": 11,
"column": 36
},
"end": {
"line": 11,
"column": 50
}
},
"operator": "=",
"left": {
"type": "Identifier",
"start": 241,
"end": 247,
"loc": {
"start": {
"line": 11,
"column": 36
},
"end": {
"line": 11,
"column": 42
}
},
"name": "remove"
},
"right": {
"type": "Literal",
"start": 250,
"end": 255,
"loc": {
"start": {
"line": 11,
"column": 45
},
"end": {
"line": 11,
"column": 50
}
},
"value": false,
"rawValue": false,
"raw": "false"
}
}
],
"body": {
"type": "BlockStatement",
"start": 257,
"end": 1395,
"loc": {
"start": {
"line": 11,
"column": 52
},
"end": {
"line": 43,
"column": 5
}
},
"body": [
{
"type": "IfStatement",
"start": 267,
"end": 312,
"loc": {
"start": {
"line": 12,
"column": 8
},
"end": {
"line": 12,
"column": 53
}
},
"test": {
"type": "UnaryExpression",
"start": 271,
"end": 289,
"loc": {
"start": {
"line": 12,
"column": 12
},
"end": {
"line": 12,
"column": 30
}
},
"operator": "!",
"prefix": true,
"argument": {
"type": "UnaryExpression",
"start": 272,
"end": 289,
"loc": {
"start": {
"line": 12,
"column": 13
},
"end": {
"line": 12,
"column": 30
}
},
"operator": "!",
"prefix": true,
"argument": {
"type": "UnaryExpression",
"start": 273,
"end": 289,
"loc": {
"start": {
"line": 12,
"column": 14
},
"end": {
"line": 12,
"column": 30
}
},
"operator": "!",
"prefix": true,
"argument": {
"type": "MemberExpression",
"start": 274,
"end": 289,
"loc": {
"start": {
"line": 12,
"column": 15
},
"end": {
"line": 12,
"column": 30
}
},
"object": {
"type": "ThisExpression",
"start": 274,
"end": 278,
"loc": {
"start": {
"line": 12,
"column": 15
},
"end": {
"line": 12,
"column": 19
}
}
},
"property": {
"type": "Identifier",
"start": 279,
"end": 289,
"loc": {
"start": {
"line": 12,
"column": 20
},
"end": {
"line": 12,
"column": 30
}
},
"name": "_callbacks"
},
"computed": false
}
}
}
},
"consequent": {
"type": "ExpressionStatement",
"start": 291,
"end": 312,
"loc": {
"start": {
"line": 12,
"column": 32
},
"end": {
"line": 12,
"column": 53
}
},
"expression": {
"type": "AssignmentExpression",
"start": 291,
"end": 311,
"loc": {
"start": {
"line": 12,
"column": 32
},
"end": {
"line": 12,
"column": 52
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 291,
"end": 306,
"loc": {
"start": {
"line": 12,
"column": 32
},
"end": {
"line": 12,
"column": 47
}
},
"object": {
"type": "ThisExpression",
"start": 291,
"end": 295,
"loc": {
"start": {
"line": 12,
"column": 32
},
"end": {
"line": 12,
"column": 36
}
}
},
"property": {
"type": "Identifier",
"start": 296,
"end": 306,
"loc": {
"start": {
"line": 12,
"column": 37
},
"end": {
"line": 12,
"column": 47
}
},
"name": "_callbacks"
},
"computed": false
},
"right": {
"type": "ObjectExpression",
"start": 309,
"end": 311,
"loc": {
"start": {
"line": 12,
"column": 50
},
"end": {
"line": 12,
"column": 52
}
},
"properties": []
}
}
},
"alternate": null
},
{
"type": "IfStatement",
"start": 321,
"end": 1367,
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 40,
"column": 9
}
},
"test": {
"type": "LogicalExpression",
"start": 325,
"end": 402,
"loc": {
"start": {
"line": 13,
"column": 12
},
"end": {
"line": 13,
"column": 89
}
},
"left": {
"type": "CallExpression",
"start": 325,
"end": 344,
"loc": {
"start": {
"line": 13,
"column": 12
},
"end": {
"line": 13,
"column": 31
}
},
"callee": {
"type": "MemberExpression",
"start": 325,
"end": 338,
"loc": {
"start": {
"line": 13,
"column": 12
},
"end": {
"line": 13,
"column": 25
}
},
"object": {
"type": "Identifier",
"start": 325,
"end": 330,
"loc": {
"start": {
"line": 13,
"column": 12
},
"end": {
"line": 13,
"column": 17
}
},
"name": "Array"
},
"property": {
"type": "Identifier",
"start": 331,
"end": 338,
"loc": {
"start": {
"line": 13,
"column": 18
},
"end": {
"line": 13,
"column": 25
}
},
"name": "isArray"
},
"computed": false
},
"arguments": [
{
"type": "Identifier",
"start": 339,
"end": 343,
"loc": {
"start": {
"line": 13,
"column": 26
},
"end": {
"line": 13,
"column": 30
}
},
"name": "arg1"
}
]
},
"operator": "||",
"right": {
"type": "LogicalExpression",
"start": 348,
"end": 402,
"loc": {
"start": {
"line": 13,
"column": 35
},
"end": {
"line": 13,
"column": 89
}
},
"left": {
"type": "BinaryExpression",
"start": 348,
"end": 372,
"loc": {
"start": {
"line": 13,
"column": 35
},
"end": {
"line": 13,
"column": 59
}
},
"left": {
"type": "UnaryExpression",
"start": 348,
"end": 359,
"loc": {
"start": {
"line": 13,
"column": 35
},
"end": {
"line": 13,
"column": 46
}
},
"operator": "typeof",
"prefix": true,
"argument": {
"type": "Identifier",
"start": 355,
"end": 359,
"loc": {
"start": {
"line": 13,
"column": 42
},
"end": {
"line": 13,
"column": 46
}
},
"name": "arg1"
}
},
"operator": "===",
"right": {
"type": "Literal",
"start": 364,
"end": 372,
"loc": {
"start": {
"line": 13,
"column": 51
},
"end": {
"line": 13,
"column": 59
}
},
"value": "string",
"rawValue": "string",
"raw": "'string'"
}
},
"operator": "&&",
"right": {
"type": "BinaryExpression",
"start": 376,
"end": 402,
"loc": {
"start": {
"line": 13,
"column": 63
},
"end": {
"line": 13,
"column": 89
}
},
"left": {
"type": "UnaryExpression",
"start": 376,
"end": 387,
"loc": {
"start": {
"line": 13,
"column": 63
},
"end": {
"line": 13,
"column": 74
}
},
"operator": "typeof",
"prefix": true,
"argument": {
"type": "Identifier",
"start": 383,
"end": 387,
"loc": {
"start": {
"line": 13,
"column": 70
},
"end": {
"line": 13,
"column": 74
}
},
"name": "arg2"
}
},
"operator": "===",
"right": {
"type": "Literal",
"start": 392,
"end": 402,
"loc": {
"start": {
"line": 13,
"column": 79
},
"end": {
"line": 13,
"column": 89
}
},
"value": "function",
"rawValue": "function",
"raw": "'function'"
}
}
}
},
"consequent": {
"type": "BlockStatement",
"start": 404,
"end": 1075,
"loc": {
"start": {
"line": 13,
"column": 91
},
"end": {
"line": 32,
"column": 9
}
},
"body": [
{
"type": "VariableDeclaration",
"start": 451,
"end": 499,
"loc": {
"start": {
"line": 16,
"column": 12
},
"end": {
"line": 16,
"column": 60
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 455,
"end": 498,
"loc": {
"start": {
"line": 16,
"column": 16
},
"end": {
"line": 16,
"column": 59
}
},
"id": {
"type": "Identifier",
"start": 455,
"end": 460,
"loc": {
"start": {
"line": 16,
"column": 16
},
"end": {
"line": 16,
"column": 21
}
},
"name": "types",
"leadingComments": null
},
"init": {
"type": "ConditionalExpression",
"start": 463,
"end": 498,
"loc": {
"start": {
"line": 16,
"column": 24
},
"end": {
"line": 16,
"column": 59
}
},
"test": {
"type": "CallExpression",
"start": 463,
"end": 482,
"loc": {
"start": {
"line": 16,
"column": 24
},
"end": {
"line": 16,
"column": 43
}
},
"callee": {
"type": "MemberExpression",
"start": 463,
"end": 476,
"loc": {
"start": {
"line": 16,
"column": 24
},
"end": {
"line": 16,
"column": 37
}
},
"object": {
"type": "Identifier",
"start": 463,
"end": 468,
"loc": {
"start": {
"line": 16,
"column": 24
},
"end": {
"line": 16,
"column": 29
}
},
"name": "Array"
},
"property": {
"type": "Identifier",
"start": 469,
"end": 476,
"loc": {
"start": {
"line": 16,
"column": 30
},
"end": {
"line": 16,
"column": 37
}
},