awv3
Version:
⚡ AWV3 embedded CAD
1,635 lines (1,634 loc) • 180 kB
JSON
{
"type": "File",
"start": 0,
"end": 1232,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 28,
"column": 0
}
},
"program": {
"type": "Program",
"start": 0,
"end": 1232,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 28,
"column": 0
}
},
"sourceType": "module",
"body": [
{
"type": "ImportDeclaration",
"start": 0,
"end": 33,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 33
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 7,
"end": 18,
"loc": {
"start": {
"line": 1,
"column": 7
},
"end": {
"line": 1,
"column": 18
}
},
"local": {
"type": "Identifier",
"start": 7,
"end": 18,
"loc": {
"start": {
"line": 1,
"column": 7
},
"end": {
"line": 1,
"column": 18
},
"identifierName": "DragHandler"
},
"name": "DragHandler"
}
}
],
"source": {
"type": "StringLiteral",
"start": 24,
"end": 32,
"loc": {
"start": {
"line": 1,
"column": 24
},
"end": {
"line": 1,
"column": 32
}
},
"extra": {
"rawValue": "./drag",
"raw": "'./drag'"
},
"value": "./drag"
}
},
{
"type": "ImportDeclaration",
"start": 34,
"end": 69,
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 2,
"column": 35
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 41,
"end": 53,
"loc": {
"start": {
"line": 2,
"column": 7
},
"end": {
"line": 2,
"column": 19
}
},
"local": {
"type": "Identifier",
"start": 41,
"end": 53,
"loc": {
"start": {
"line": 2,
"column": 7
},
"end": {
"line": 2,
"column": 19
},
"identifierName": "PointHandler"
},
"name": "PointHandler"
}
}
],
"source": {
"type": "StringLiteral",
"start": 59,
"end": 68,
"loc": {
"start": {
"line": 2,
"column": 25
},
"end": {
"line": 2,
"column": 34
}
},
"extra": {
"rawValue": "./point",
"raw": "'./point'"
},
"value": "./point"
}
},
{
"type": "ImportDeclaration",
"start": 70,
"end": 103,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 3,
"column": 33
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 77,
"end": 88,
"loc": {
"start": {
"line": 3,
"column": 7
},
"end": {
"line": 3,
"column": 18
}
},
"local": {
"type": "Identifier",
"start": 77,
"end": 88,
"loc": {
"start": {
"line": 3,
"column": 7
},
"end": {
"line": 3,
"column": 18
},
"identifierName": "LineHandler"
},
"name": "LineHandler"
}
}
],
"source": {
"type": "StringLiteral",
"start": 94,
"end": 102,
"loc": {
"start": {
"line": 3,
"column": 24
},
"end": {
"line": 3,
"column": 32
}
},
"extra": {
"rawValue": "./line",
"raw": "'./line'"
},
"value": "./line"
}
},
{
"type": "ImportDeclaration",
"start": 104,
"end": 147,
"loc": {
"start": {
"line": 4,
"column": 0
},
"end": {
"line": 4,
"column": 43
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 111,
"end": 127,
"loc": {
"start": {
"line": 4,
"column": 7
},
"end": {
"line": 4,
"column": 23
}
},
"local": {
"type": "Identifier",
"start": 111,
"end": 127,
"loc": {
"start": {
"line": 4,
"column": 7
},
"end": {
"line": 4,
"column": 23
},
"identifierName": "ArcCenterHandler"
},
"name": "ArcCenterHandler"
}
}
],
"source": {
"type": "StringLiteral",
"start": 133,
"end": 146,
"loc": {
"start": {
"line": 4,
"column": 29
},
"end": {
"line": 4,
"column": 42
}
},
"extra": {
"rawValue": "./arccenter",
"raw": "'./arccenter'"
},
"value": "./arccenter"
}
},
{
"type": "ImportDeclaration",
"start": 148,
"end": 193,
"loc": {
"start": {
"line": 5,
"column": 0
},
"end": {
"line": 5,
"column": 45
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 155,
"end": 172,
"loc": {
"start": {
"line": 5,
"column": 7
},
"end": {
"line": 5,
"column": 24
}
},
"local": {
"type": "Identifier",
"start": 155,
"end": 172,
"loc": {
"start": {
"line": 5,
"column": 7
},
"end": {
"line": 5,
"column": 24
},
"identifierName": "ArcControlHandler"
},
"name": "ArcControlHandler"
}
}
],
"source": {
"type": "StringLiteral",
"start": 178,
"end": 192,
"loc": {
"start": {
"line": 5,
"column": 30
},
"end": {
"line": 5,
"column": 44
}
},
"extra": {
"rawValue": "./arccontrol",
"raw": "'./arccontrol'"
},
"value": "./arccontrol"
}
},
{
"type": "ImportDeclaration",
"start": 194,
"end": 237,
"loc": {
"start": {
"line": 6,
"column": 0
},
"end": {
"line": 6,
"column": 43
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 201,
"end": 217,
"loc": {
"start": {
"line": 6,
"column": 7
},
"end": {
"line": 6,
"column": 23
}
},
"local": {
"type": "Identifier",
"start": 201,
"end": 217,
"loc": {
"start": {
"line": 6,
"column": 7
},
"end": {
"line": 6,
"column": 23
},
"identifierName": "ArcMiddleHandler"
},
"name": "ArcMiddleHandler"
}
}
],
"source": {
"type": "StringLiteral",
"start": 223,
"end": 236,
"loc": {
"start": {
"line": 6,
"column": 29
},
"end": {
"line": 6,
"column": 42
}
},
"extra": {
"rawValue": "./arcmiddle",
"raw": "'./arcmiddle'"
},
"value": "./arcmiddle"
}
},
{
"type": "ImportDeclaration",
"start": 238,
"end": 283,
"loc": {
"start": {
"line": 7,
"column": 0
},
"end": {
"line": 7,
"column": 45
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 245,
"end": 262,
"loc": {
"start": {
"line": 7,
"column": 7
},
"end": {
"line": 7,
"column": 24
}
},
"local": {
"type": "Identifier",
"start": 245,
"end": 262,
"loc": {
"start": {
"line": 7,
"column": 7
},
"end": {
"line": 7,
"column": 24
},
"identifierName": "ArcTangentHandler"
},
"name": "ArcTangentHandler"
}
}
],
"source": {
"type": "StringLiteral",
"start": 268,
"end": 282,
"loc": {
"start": {
"line": 7,
"column": 30
},
"end": {
"line": 7,
"column": 44
}
},
"extra": {
"rawValue": "./arctangent",
"raw": "'./arctangent'"
},
"value": "./arctangent"
}
},
{
"type": "ImportDeclaration",
"start": 284,
"end": 325,
"loc": {
"start": {
"line": 8,
"column": 0
},
"end": {
"line": 8,
"column": 41
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 291,
"end": 306,
"loc": {
"start": {
"line": 8,
"column": 7
},
"end": {
"line": 8,
"column": 22
}
},
"local": {
"type": "Identifier",
"start": 291,
"end": 306,
"loc": {
"start": {
"line": 8,
"column": 7
},
"end": {
"line": 8,
"column": 22
},
"identifierName": "PolylineHandler"
},
"name": "PolylineHandler"
}
}
],
"source": {
"type": "StringLiteral",
"start": 312,
"end": 324,
"loc": {
"start": {
"line": 8,
"column": 28
},
"end": {
"line": 8,
"column": 40
}
},
"extra": {
"rawValue": "./polyline",
"raw": "'./polyline'"
},
"value": "./polyline"
}
},
{
"type": "ImportDeclaration",
"start": 326,
"end": 361,
"loc": {
"start": {
"line": 9,
"column": 0
},
"end": {
"line": 9,
"column": 35
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 333,
"end": 345,
"loc": {
"start": {
"line": 9,
"column": 7
},
"end": {
"line": 9,
"column": 19
}
},
"local": {
"type": "Identifier",
"start": 333,
"end": 345,
"loc": {
"start": {
"line": 9,
"column": 7
},
"end": {
"line": 9,
"column": 19
},
"identifierName": "AngleHandler"
},
"name": "AngleHandler"
}
}
],
"source": {
"type": "StringLiteral",
"start": 351,
"end": 360,
"loc": {
"start": {
"line": 9,
"column": 25
},
"end": {
"line": 9,
"column": 34
}
},
"extra": {
"rawValue": "./angle",
"raw": "'./angle'"
},
"value": "./angle"
}
},
{
"type": "ExportDefaultDeclaration",
"start": 363,
"end": 1045,
"loc": {
"start": {
"line": 11,
"column": 0
},
"end": {
"line": 23,
"column": 1
}
},
"declaration": {
"type": "FunctionDeclaration",
"start": 378,
"end": 1045,
"loc": {
"start": {
"line": 11,
"column": 15
},
"end": {
"line": 23,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 387,
"end": 394,
"loc": {
"start": {
"line": 11,
"column": 24
},
"end": {
"line": 11,
"column": 31
},
"identifierName": "Handler"
},
"name": "Handler"
},
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "Identifier",
"start": 395,
"end": 403,
"loc": {
"start": {
"line": 11,
"column": 32
},
"end": {
"line": 11,
"column": 40
},
"identifierName": "sketcher"
},
"name": "sketcher"
},
{
"type": "Identifier",
"start": 405,
"end": 409,
"loc": {
"start": {
"line": 11,
"column": 42
},
"end": {
"line": 11,
"column": 46
},
"identifierName": "name"
},
"name": "name"
}
],
"body": {
"type": "BlockStatement",
"start": 411,
"end": 1045,
"loc": {
"start": {
"line": 11,
"column": 48
},
"end": {
"line": 23,
"column": 1
}
},
"body": [
{
"type": "SwitchStatement",
"start": 417,
"end": 1043,
"loc": {
"start": {
"line": 12,
"column": 4
},
"end": {
"line": 22,
"column": 5
}
},
"discriminant": {
"type": "Identifier",
"start": 425,
"end": 429,
"loc": {
"start": {
"line": 12,
"column": 12
},
"end": {
"line": 12,
"column": 16
},
"identifierName": "name"
},
"name": "name"
},
"cases": [
{
"type": "SwitchCase",
"start": 441,
"end": 493,
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 13,
"column": 60
}
},
"consequent": [
{
"type": "ReturnStatement",
"start": 454,
"end": 493,
"loc": {
"start": {
"line": 13,
"column": 21
},
"end": {
"line": 13,
"column": 60
}
},
"argument": {
"type": "NewExpression",
"start": 461,
"end": 492,
"loc": {
"start": {
"line": 13,
"column": 28
},
"end": {
"line": 13,
"column": 59
}
},
"callee": {
"type": "Identifier",
"start": 465,
"end": 476,
"loc": {
"start": {
"line": 13,
"column": 32
},
"end": {
"line": 13,
"column": 43
},
"identifierName": "DragHandler"
},
"name": "DragHandler"
},
"arguments": [
{
"type": "Identifier",
"start": 477,
"end": 485,
"loc": {
"start": {
"line": 13,
"column": 44
},
"end": {
"line": 13,
"column": 52
},
"identifierName": "sketcher"
},
"name": "sketcher"
},
{
"type": "Identifier",
"start": 487,
"end": 491,
"loc": {
"start": {
"line": 13,
"column": 54
},
"end": {
"line": 13,
"column": 58
},
"identifierName": "name"
},
"name": "name"
}
]
}
}
],
"test": {
"type": "StringLiteral",
"start": 446,
"end": 452,
"loc": {
"start": {
"line": 13,
"column": 13
},
"end": {
"line": 13,
"column": 19
}
},
"extra": {
"rawValue": "drag",
"raw": "'drag'"
},
"value": "drag"
}
},
{
"type": "SwitchCase",
"start": 502,
"end": 556,
"loc": {
"start": {
"line": 14,
"column": 8
},
"end": {
"line": 14,
"column": 62
}
},
"consequent": [
{
"type": "ReturnStatement",
"start": 516,
"end": 556,
"loc": {
"start": {
"line": 14,
"column": 22
},
"end": {
"line": 14,
"column": 62
}
},
"argument": {
"type": "NewExpression",
"start": 523,
"end": 555,
"loc": {
"start": {
"line": 14,
"column": 29
},
"end": {
"line": 14,
"column": 61
}
},
"callee": {
"type": "Identifier",
"start": 527,
"end": 539,
"loc": {
"start": {
"line": 14,
"column": 33
},
"end": {
"line": 14,
"column": 45
},
"identifierName": "PointHandler"
},
"name": "PointHandler"
},
"arguments": [
{
"type": "Identifier",
"start": 540,
"end": 548,
"loc": {
"start": {
"line": 14,
"column": 46
},
"end": {
"line": 14,
"column": 54
},
"identifierName": "sketcher"
},
"name": "sketcher"
},
{
"type": "Identifier",
"start": 550,
"end": 554,
"loc": {
"start": {
"line": 14,
"column": 56
},
"end": {
"line": 14,
"column": 60
},
"identifierName": "name"
},
"name": "name"
}
]
}
}
],
"test": {
"type": "StringLiteral",
"start": 507,
"end": 514,
"loc": {
"start": {
"line": 14,
"column": 13
},
"end": {
"line": 14,
"column": 20
}
},
"extra": {
"rawValue": "point",
"raw": "'point'"
},
"value": "point"
}
},
{
"type": "SwitchCase",
"start": 565,
"end": 617,
"loc": {
"start": {
"line": 15,
"column": 8
},
"end": {
"line": 15,
"column": 60
}
},
"consequent": [
{
"type": "ReturnStatement",
"start": 578,
"end": 617,
"loc": {
"start": {
"line": 15,
"column": 21
},
"end": {
"line": 15,
"column": 60
}
},
"argument": {
"type": "NewExpression",
"start": 585,
"end": 616,
"loc": {
"start": {
"line": 15,
"column": 28
},
"end": {
"line": 15,
"column": 59
}
},
"callee": {
"type": "Identifier",
"start": 589,
"end": 600,
"loc": {
"start": {
"line": 15,
"column": 32
},
"end": {
"line": 15,
"column": 43
},
"identifierName": "LineHandler"
},
"name": "LineHandler"
},
"arguments": [
{
"type": "Identifier",
"start": 601,
"end": 609,
"loc": {
"start": {
"line": 15,
"column": 44
},
"end": {
"line": 15,
"column": 52
},
"identifierName": "sketcher"
},
"name": "sketcher"
},
{
"type": "Identifier",
"start": 611,
"end": 615,
"loc": {
"start": {
"line": 15,
"column": 54
},
"end": {
"line": 15,
"column": 58
},
"identifierName": "name"
},
"name": "name"
}
]
}
}
],
"test": {
"type": "StringLiteral",
"start": 570,
"end": 576,
"loc": {
"start": {
"line": 15,
"column": 13
},
"end": {
"line": 15,
"column": 19
}
},
"extra": {
"rawValue": "line",
"raw": "'line'"
},
"value": "line"
}
},
{
"type": "SwitchCase",
"start": 626,
"end": 688,
"loc": {
"start": {
"line": 16,
"column": 8
},
"end": {
"line": 16,
"column": 70
}
},
"consequent": [
{
"type": "ReturnStatement",
"start": 644,
"end": 688,
"loc": {
"start": {
"line": 16,
"column": 26
},
"end": {
"line": 16,
"column": 70
}
},
"argument": {
"type": "NewExpression",
"start": 651,
"end": 687,
"loc": {
"start": {
"line": 16,
"column": 33
},
"end": {
"line": 16,
"column": 69
}
},
"callee": {
"type": "Identifier",
"start": 655,
"end": 671,
"loc": {
"start": {
"line": 16,
"column": 37
},
"end": {
"line": 16,
"column": 53
},
"identifierName": "ArcCenterHandler"
},
"name": "ArcCenterHandler"
},
"arguments": [
{
"type": "Identifier",
"start": 672,
"end": 680,
"loc": {
"start": {
"line": 16,
"column": 54
},
"end": {
"line": 16,
"column": 62
},
"identifierName": "sketcher"
},
"name": "sketcher"
},
{
"type": "Identifier",
"start": 682,
"end": 686,
"loc": {
"start": {
"line": 16,
"column": 64
},
"end": {
"line": 16,
"column": 68
},
"identifierName": "name"
},
"name": "name"
}
]
}
}
],
"test": {
"type": "StringLiteral",
"start": 631,
"end": 642,
"loc": {
"start": {
"line": 16,
"column": 13
},
"end": {
"line": 16,
"column": 24
}
},
"extra": {
"rawValue": "arccenter",
"raw": "'arccenter'"
},
"value": "arccenter"
}
},
{
"type": "SwitchCase",
"start": 697,
"end": 761,
"loc": {
"start": {
"line": 17,
"column": 8
},
"end": {
"line": 17,
"column": 72
}
},
"consequent": [
{
"type": "ReturnStatement",
"start": 716,
"end": 761,
"loc": {
"start": {
"line": 17,
"column": 27
},
"end": {
"line": 17,
"column": 72
}
},
"argument": {
"type": "NewExpression",
"start": 723,
"end": 760,
"loc": {
"start": {
"line": 17,
"column": 34
},
"end": {
"line": 17,
"column": 71
}
},
"callee": {
"type": "Identifier",
"start": 727,
"end": 744,
"loc": {
"start": {
"line": 17,
"column": 38
},
"end": {
"line": 17,
"column": 55
},
"identifierName": "ArcControlHandler"
},
"name": "ArcControlHandler"
},
"arguments": [
{
"type": "Identifier",
"start": 745,
"end": 753,
"loc": {
"start": {
"line": 17,
"column": 56
},
"end": {
"line": 17,
"column": 64
},
"identifierName": "sketcher"
},
"name": "sketcher"
},
{
"type": "Identifier",
"start": 755,
"end": 759,
"loc": {
"start": {
"line": 17,
"column": 66
},
"end": {
"line": 17,
"column": 70
},
"identifierName": "name"
},
"name": "name"
}
]
}
}
],
"test": {
"type": "StringLiteral",
"start": 702,
"end": 714,
"loc": {
"start": {
"line": 17,
"column": 13
},
"end": {
"line": 17,
"column": 25
}
},
"extra": {
"rawValue": "arccontrol",
"raw": "'arccontrol'"
},
"value": "arccontrol"
}
},
{
"type": "SwitchCase",
"start": 770,
"end": 832,
"loc": {
"start": {
"line": 18,
"column": 8
},
"end": {
"line": 18,
"column": 70
}
},
"consequent": [
{
"type": "ReturnStatement",
"start": 788,
"end": 832,
"loc": {
"start": {
"line": 18,
"column": 26
},
"end": {
"line": 18,
"column": 70
}
},
"argument": {
"type": "NewExpression",
"start": 795,
"end": 831,
"loc": {
"start": {
"line": 18,
"column": 33
},
"end": {
"line": 18,
"column": 69
}
},
"callee": {
"type": "Identifier",
"start": 799,
"end": 815,
"loc": {
"start": {
"line": 18,
"column": 37
},
"end": {
"line": 18,
"column": 53
},
"identifierName": "ArcMiddleHandler"
},
"name": "ArcMiddleHandler"
},
"arguments": [
{
"type": "Identifier",
"start": 816,
"end": 824,
"loc": {
"start": {
"line": 18,
"column": 54
},
"end": {
"line": 18,
"column": 62
},
"identifierName": "sketcher"
},
"name": "sketcher"
},
{
"type": "Identifier",
"start": 826,
"end": 830,
"loc": {
"start": {
"line": 18,
"column": 64
},
"end": {
"line": 18,
"column": 68
},
"identifierName": "name"
},
"name": "name"
}
]
}
}
],
"test": {
"type": "StringLiteral",
"start": 775,
"end": 786,
"loc": {
"start": {
"line": 18,
"column": 13
},
"end": {
"line": 18,
"column": 24
}
},
"extra": {
"rawValue": "arcmiddle",
"raw": "'arcmiddle'"
},
"value": "arcmiddle"
}
},
{
"type": "SwitchCase",
"start": 841,
"end": 905,
"loc": {
"start": {
"line": 19,
"column": 8
},
"end": {
"line": 19,
"column": 72
}
},
"consequent": [
{
"type": "ReturnStatement",
"start": 860,
"end": 905,
"loc": {
"start": {
"line": 19,
"column": 27
},
"end": {
"line": 19,
"column": 72
}
},
"argument": {
"type": "NewExpression",
"start": 867,
"end": 904,
"loc": {
"start": {
"line": 19,
"column": 34
},
"end": {
"line": 19,
"column": 71
}
},
"callee": {
"type": "Identifier",
"start": 871,
"end": 888,
"loc": {
"start": {
"line": 19,
"column": 38
},
"end": {
"line": 19,
"column": 55
},
"identifierName": "ArcTangentHandler"
},
"name": "ArcTangentHandler"
},
"arguments": [
{
"type": "Identifier",
"start": 889,
"end": 897,
"loc": {
"start": {
"line": 19,
"column": 56
},
"end": {
"line": 19,
"column": 64
},
"identifierName": "sketcher"
},
"name": "sketcher"
},
{
"type": "Identifier",
"start": 899,
"end": 903,
"loc": {
"start": {
"line": 19,
"column": 66
},
"end": {
"line": 19,
"column": 70
},
"identifierName": "name"
},
"name": "name"
}
]
}
}
],
"test": {
"type": "StringLiteral",
"start": 846,
"end": 858,
"loc": {
"start": {
"line": 19,
"column": 13
},
"end": {
"line": 19,
"column": 25
}
},
"extra": {
"rawValue": "arctangent",
"raw": "'arctangent'"
},
"value": "arctangent"
}
},
{
"type": "SwitchCase",
"start": 914,
"end": 974,
"loc": {
"start": {
"line": 20,
"column": 8
},
"end": {
"line": 20,
"column": 68