awv3
Version:
AWV client CAD framework
1,290 lines (1,289 loc) • 68.3 kB
JSON
{
"type": "Program",
"start": 0,
"end": 834,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 36,
"column": 0
}
},
"sourceType": "module",
"body": [
{
"type": "ExportDefaultDeclaration",
"start": 0,
"end": 603,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 24,
"column": 1
}
},
"declaration": {
"type": "ClassDeclaration",
"start": 15,
"end": 603,
"loc": {
"start": {
"line": 1,
"column": 15
},
"end": {
"line": 24,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 21,
"end": 28,
"loc": {
"start": {
"line": 1,
"column": 21
},
"end": {
"line": 1,
"column": 28
}
},
"name": "Element"
},
"superClass": null,
"body": {
"type": "ClassBody",
"start": 29,
"end": 603,
"loc": {
"start": {
"line": 1,
"column": 29
},
"end": {
"line": 24,
"column": 1
}
},
"body": [
{
"type": "MethodDefinition",
"start": 36,
"end": 498,
"loc": {
"start": {
"line": 2,
"column": 4
},
"end": {
"line": 19,
"column": 5
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 36,
"end": 47,
"loc": {
"start": {
"line": 2,
"column": 4
},
"end": {
"line": 2,
"column": 15
}
},
"name": "constructor"
},
"static": false,
"kind": "constructor",
"value": {
"type": "FunctionExpression",
"start": 47,
"end": 498,
"loc": {
"start": {
"line": 2,
"column": 15
},
"end": {
"line": 19,
"column": 5
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "Identifier",
"start": 48,
"end": 55,
"loc": {
"start": {
"line": 2,
"column": 16
},
"end": {
"line": 2,
"column": 23
}
},
"name": "options"
}
],
"body": {
"type": "BlockStatement",
"start": 57,
"end": 498,
"loc": {
"start": {
"line": 2,
"column": 25
},
"end": {
"line": 19,
"column": 5
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 70,
"end": 417,
"loc": {
"start": {
"line": 4,
"column": 8
},
"end": {
"line": 16,
"column": 10
}
},
"expression": {
"type": "AssignmentExpression",
"start": 70,
"end": 416,
"loc": {
"start": {
"line": 4,
"column": 8
},
"end": {
"line": 16,
"column": 9
}
},
"operator": "=",
"left": {
"type": "Identifier",
"start": 70,
"end": 77,
"loc": {
"start": {
"line": 4,
"column": 8
},
"end": {
"line": 4,
"column": 15
}
},
"name": "options"
},
"right": {
"type": "ObjectExpression",
"start": 80,
"end": 416,
"loc": {
"start": {
"line": 4,
"column": 18
},
"end": {
"line": 16,
"column": 9
}
},
"properties": [
{
"type": "Property",
"start": 95,
"end": 110,
"loc": {
"start": {
"line": 5,
"column": 12
},
"end": {
"line": 5,
"column": 27
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 95,
"end": 99,
"loc": {
"start": {
"line": 5,
"column": 12
},
"end": {
"line": 5,
"column": 16
}
},
"name": "type"
},
"value": {
"type": "Identifier",
"start": 101,
"end": 110,
"loc": {
"start": {
"line": 5,
"column": 18
},
"end": {
"line": 5,
"column": 27
}
},
"name": "undefined"
},
"kind": "init"
},
{
"type": "Property",
"start": 125,
"end": 143,
"loc": {
"start": {
"line": 6,
"column": 12
},
"end": {
"line": 6,
"column": 30
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 125,
"end": 132,
"loc": {
"start": {
"line": 6,
"column": 12
},
"end": {
"line": 6,
"column": 19
}
},
"name": "tooltip"
},
"value": {
"type": "Identifier",
"start": 134,
"end": 143,
"loc": {
"start": {
"line": 6,
"column": 21
},
"end": {
"line": 6,
"column": 30
}
},
"name": "undefined"
},
"kind": "init"
},
{
"type": "Property",
"start": 158,
"end": 174,
"loc": {
"start": {
"line": 7,
"column": 12
},
"end": {
"line": 7,
"column": 28
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 158,
"end": 163,
"loc": {
"start": {
"line": 7,
"column": 12
},
"end": {
"line": 7,
"column": 17
}
},
"name": "error"
},
"value": {
"type": "Identifier",
"start": 165,
"end": 174,
"loc": {
"start": {
"line": 7,
"column": 19
},
"end": {
"line": 7,
"column": 28
}
},
"name": "undefined"
},
"kind": "init"
},
{
"type": "Property",
"start": 189,
"end": 208,
"loc": {
"start": {
"line": 8,
"column": 12
},
"end": {
"line": 8,
"column": 31
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 189,
"end": 197,
"loc": {
"start": {
"line": 8,
"column": 12
},
"end": {
"line": 8,
"column": 20
}
},
"name": "callback"
},
"value": {
"type": "Identifier",
"start": 199,
"end": 208,
"loc": {
"start": {
"line": 8,
"column": 22
},
"end": {
"line": 8,
"column": 31
}
},
"name": "undefined"
},
"kind": "init"
},
{
"type": "Property",
"start": 223,
"end": 236,
"loc": {
"start": {
"line": 9,
"column": 12
},
"end": {
"line": 9,
"column": 25
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 223,
"end": 227,
"loc": {
"start": {
"line": 9,
"column": 12
},
"end": {
"line": 9,
"column": 16
}
},
"name": "name"
},
"value": {
"type": "Literal",
"start": 229,
"end": 236,
"loc": {
"start": {
"line": 9,
"column": 18
},
"end": {
"line": 9,
"column": 25
}
},
"value": "Value",
"rawValue": "Value",
"raw": "'Value'"
},
"kind": "init"
},
{
"type": "Property",
"start": 251,
"end": 264,
"loc": {
"start": {
"line": 10,
"column": 12
},
"end": {
"line": 10,
"column": 25
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 251,
"end": 258,
"loc": {
"start": {
"line": 10,
"column": 12
},
"end": {
"line": 10,
"column": 19
}
},
"name": "visible"
},
"value": {
"type": "Literal",
"start": 260,
"end": 264,
"loc": {
"start": {
"line": 10,
"column": 21
},
"end": {
"line": 10,
"column": 25
}
},
"value": true,
"rawValue": true,
"raw": "true"
},
"kind": "init"
},
{
"type": "Property",
"start": 279,
"end": 292,
"loc": {
"start": {
"line": 11,
"column": 12
},
"end": {
"line": 11,
"column": 25
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 279,
"end": 286,
"loc": {
"start": {
"line": 11,
"column": 12
},
"end": {
"line": 11,
"column": 19
}
},
"name": "enabled"
},
"value": {
"type": "Literal",
"start": 288,
"end": 292,
"loc": {
"start": {
"line": 11,
"column": 21
},
"end": {
"line": 11,
"column": 25
}
},
"value": true,
"rawValue": true,
"raw": "true"
},
"kind": "init"
},
{
"type": "Property",
"start": 307,
"end": 322,
"loc": {
"start": {
"line": 12,
"column": 12
},
"end": {
"line": 12,
"column": 27
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 307,
"end": 315,
"loc": {
"start": {
"line": 12,
"column": 12
},
"end": {
"line": 12,
"column": 20
}
},
"name": "optional"
},
"value": {
"type": "Literal",
"start": 317,
"end": 322,
"loc": {
"start": {
"line": 12,
"column": 22
},
"end": {
"line": 12,
"column": 27
}
},
"value": false,
"rawValue": false,
"raw": "false"
},
"kind": "init"
},
{
"type": "Property",
"start": 337,
"end": 350,
"loc": {
"start": {
"line": 13,
"column": 12
},
"end": {
"line": 13,
"column": 25
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 337,
"end": 343,
"loc": {
"start": {
"line": 13,
"column": 12
},
"end": {
"line": 13,
"column": 18
}
},
"name": "active"
},
"value": {
"type": "Literal",
"start": 345,
"end": 350,
"loc": {
"start": {
"line": 13,
"column": 20
},
"end": {
"line": 13,
"column": 25
}
},
"value": false,
"rawValue": false,
"raw": "false"
},
"kind": "init"
},
{
"type": "Property",
"start": 365,
"end": 380,
"loc": {
"start": {
"line": 14,
"column": 12
},
"end": {
"line": 14,
"column": 27
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 365,
"end": 374,
"loc": {
"start": {
"line": 14,
"column": 12
},
"end": {
"line": 14,
"column": 21
}
},
"name": "canToggle"
},
"value": {
"type": "Literal",
"start": 376,
"end": 380,
"loc": {
"start": {
"line": 14,
"column": 23
},
"end": {
"line": 14,
"column": 27
}
},
"value": true,
"rawValue": true,
"raw": "true"
},
"kind": "init"
},
{
"type": "SpreadProperty",
"start": 395,
"end": 405,
"loc": {
"start": {
"line": 15,
"column": 12
},
"end": {
"line": 15,
"column": 22
}
},
"argument": {
"type": "Identifier",
"start": 398,
"end": 405,
"loc": {
"start": {
"line": 15,
"column": 15
},
"end": {
"line": 15,
"column": 22
}
},
"name": "options"
}
}
]
}
}
},
{
"type": "ExpressionStatement",
"start": 429,
"end": 491,
"loc": {
"start": {
"line": 18,
"column": 8
},
"end": {
"line": 18,
"column": 70
}
},
"expression": {
"type": "CallExpression",
"start": 429,
"end": 490,
"loc": {
"start": {
"line": 18,
"column": 8
},
"end": {
"line": 18,
"column": 69
}
},
"callee": {
"type": "MemberExpression",
"start": 429,
"end": 457,
"loc": {
"start": {
"line": 18,
"column": 8
},
"end": {
"line": 18,
"column": 36
}
},
"object": {
"type": "CallExpression",
"start": 429,
"end": 449,
"loc": {
"start": {
"line": 18,
"column": 8
},
"end": {
"line": 18,
"column": 28
}
},
"callee": {
"type": "MemberExpression",
"start": 429,
"end": 440,
"loc": {
"start": {
"line": 18,
"column": 8
},
"end": {
"line": 18,
"column": 19
}
},
"object": {
"type": "Identifier",
"start": 429,
"end": 435,
"loc": {
"start": {
"line": 18,
"column": 8
},
"end": {
"line": 18,
"column": 14
}
},
"name": "Object"
},
"property": {
"type": "Identifier",
"start": 436,
"end": 440,
"loc": {
"start": {
"line": 18,
"column": 15
},
"end": {
"line": 18,
"column": 19
}
},
"name": "keys"
},
"computed": false
},
"arguments": [
{
"type": "Identifier",
"start": 441,
"end": 448,
"loc": {
"start": {
"line": 18,
"column": 20
},
"end": {
"line": 18,
"column": 27
}
},
"name": "options"
}
]
},
"property": {
"type": "Identifier",
"start": 450,
"end": 457,
"loc": {
"start": {
"line": 18,
"column": 29
},
"end": {
"line": 18,
"column": 36
}
},
"name": "forEach"
},
"computed": false
},
"arguments": [
{
"type": "ArrowFunctionExpression",
"start": 458,
"end": 489,
"loc": {
"start": {
"line": 18,
"column": 37
},
"end": {
"line": 18,
"column": 68
}
},
"id": null,
"generator": false,
"expression": true,
"async": false,
"params": [
{
"type": "Identifier",
"start": 458,
"end": 461,
"loc": {
"start": {
"line": 18,
"column": 37
},
"end": {
"line": 18,
"column": 40
}
},
"name": "key"
}
],
"body": {
"type": "AssignmentExpression",
"start": 465,
"end": 489,
"loc": {
"start": {
"line": 18,
"column": 44
},
"end": {
"line": 18,
"column": 68
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 465,
"end": 474,
"loc": {
"start": {
"line": 18,
"column": 44
},
"end": {
"line": 18,
"column": 53
}
},
"object": {
"type": "ThisExpression",
"start": 465,
"end": 469,
"loc": {
"start": {
"line": 18,
"column": 44
},
"end": {
"line": 18,
"column": 48
}
}
},
"property": {
"type": "Identifier",
"start": 470,
"end": 473,
"loc": {
"start": {
"line": 18,
"column": 49
},
"end": {
"line": 18,
"column": 52
}
},
"name": "key"
},
"computed": true
},
"right": {
"type": "MemberExpression",
"start": 477,
"end": 489,
"loc": {
"start": {
"line": 18,
"column": 56
},
"end": {
"line": 18,
"column": 68
}
},
"object": {
"type": "Identifier",
"start": 477,
"end": 484,
"loc": {
"start": {
"line": 18,
"column": 56
},
"end": {
"line": 18,
"column": 63
}
},
"name": "options"
},
"property": {
"type": "Identifier",
"start": 485,
"end": 488,
"loc": {
"start": {
"line": 18,
"column": 64
},
"end": {
"line": 18,
"column": 67
}
},
"name": "key"
},
"computed": true
}
}
}
]
}
}
]
}
}
},
{
"type": "MethodDefinition",
"start": 506,
"end": 600,
"loc": {
"start": {
"line": 21,
"column": 4
},
"end": {
"line": 23,
"column": 5
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 510,
"end": 519,
"loc": {
"start": {
"line": 21,
"column": 8
},
"end": {
"line": 21,
"column": 17
}
},
"name": "fulfilled"
},
"static": false,
"kind": "get",
"value": {
"type": "FunctionExpression",
"start": 519,
"end": 600,
"loc": {
"start": {
"line": 21,
"column": 17
},
"end": {
"line": 23,
"column": 5
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start": 522,
"end": 600,
"loc": {
"start": {
"line": 21,
"column": 20
},
"end": {
"line": 23,
"column": 5
}
},
"body": [
{
"type": "ReturnStatement",
"start": 533,
"end": 593,
"loc": {
"start": {
"line": 22,
"column": 8
},
"end": {
"line": 22,
"column": 68
}
},
"argument": {
"type": "LogicalExpression",
"start": 540,
"end": 592,
"loc": {
"start": {
"line": 22,
"column": 15
},
"end": {
"line": 22,
"column": 67
}
},
"left": {
"type": "MemberExpression",
"start": 540,
"end": 553,
"loc": {
"start": {
"line": 22,
"column": 15
},
"end": {
"line": 22,
"column": 28
}
},
"object": {
"type": "ThisExpression",
"start": 540,
"end": 544,
"loc": {
"start": {
"line": 22,
"column": 15
},
"end": {
"line": 22,
"column": 19
}
}
},
"property": {
"type": "Identifier",
"start": 545,
"end": 553,
"loc": {
"start": {
"line": 22,
"column": 20
},
"end": {
"line": 22,
"column": 28
}
},
"name": "optional"
},
"computed": false
},
"operator": "||",
"right": {
"type": "LogicalExpression",
"start": 557,
"end": 592,
"loc": {
"start": {
"line": 22,
"column": 32
},
"end": {
"line": 22,
"column": 67
}
},
"left": {
"type": "MemberExpression",
"start": 557,
"end": 567,
"loc": {
"start": {
"line": 22,
"column": 32
},
"end": {
"line": 22,
"column": 42
}
},
"object": {
"type": "ThisExpression",
"start": 557,
"end": 561,
"loc": {
"start": {
"line": 22,
"column": 32
},
"end": {
"line": 22,
"column": 36
}
}
},
"property": {
"type": "Identifier",
"start": 562,
"end": 567,
"loc": {
"start": {
"line": 22,
"column": 37
},
"end": {
"line": 22,
"column": 42
}
},
"name": "value"
},
"computed": false
},
"operator": "&&",
"right": {
"type": "BinaryExpression",
"start": 571,
"end": 592,
"loc": {
"start": {
"line": 22,
"column": 46
},
"end": {