awv3
Version:
AWV client CAD framework
1,464 lines (1,463 loc) • 592 kB
JSON
{
"type": "Program",
"start": 0,
"end": 5551,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 161,
"column": 0
}
},
"sourceType": "module",
"body": [
{
"type": "ImportDeclaration",
"start": 0,
"end": 39,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 39
}
},
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"start": 7,
"end": 17,
"loc": {
"start": {
"line": 1,
"column": 7
},
"end": {
"line": 1,
"column": 17
}
},
"local": {
"type": "Identifier",
"start": 12,
"end": 17,
"loc": {
"start": {
"line": 1,
"column": 12
},
"end": {
"line": 1,
"column": 17
}
},
"name": "Error"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 23,
"end": 38,
"loc": {
"start": {
"line": 1,
"column": 23
},
"end": {
"line": 1,
"column": 38
}
},
"value": "../core/error",
"rawValue": "../core/error",
"raw": "'../core/error'"
}
},
{
"type": "ImportDeclaration",
"start": 41,
"end": 77,
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 2,
"column": 36
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 48,
"end": 54,
"loc": {
"start": {
"line": 2,
"column": 7
},
"end": {
"line": 2,
"column": 13
}
},
"local": {
"type": "Identifier",
"start": 48,
"end": 54,
"loc": {
"start": {
"line": 2,
"column": 7
},
"end": {
"line": 2,
"column": 13
}
},
"name": "Events"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 60,
"end": 76,
"loc": {
"start": {
"line": 2,
"column": 19
},
"end": {
"line": 2,
"column": 35
}
},
"value": "../core/events",
"rawValue": "../core/events",
"raw": "'../core/events'"
}
},
{
"type": "ImportDeclaration",
"start": 79,
"end": 128,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 3,
"column": 49
}
},
"specifiers": [],
"source": {
"type": "Literal",
"start": 86,
"end": 127,
"loc": {
"start": {
"line": 3,
"column": 7
},
"end": {
"line": 3,
"column": 48
}
},
"value": "event-listener-with-options/js/polyfill",
"rawValue": "event-listener-with-options/js/polyfill",
"raw": "'event-listener-with-options/js/polyfill'"
}
},
{
"type": "FunctionDeclaration",
"start": 132,
"end": 541,
"loc": {
"start": {
"line": 5,
"column": 0
},
"end": {
"line": 17,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 141,
"end": 153,
"loc": {
"start": {
"line": 5,
"column": 9
},
"end": {
"line": 5,
"column": 21
}
},
"name": "createStates"
},
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "Identifier",
"start": 154,
"end": 157,
"loc": {
"start": {
"line": 5,
"column": 22
},
"end": {
"line": 5,
"column": 25
}
},
"name": "dom"
},
{
"type": "Identifier",
"start": 159,
"end": 165,
"loc": {
"start": {
"line": 5,
"column": 27
},
"end": {
"line": 5,
"column": 33
}
},
"name": "events"
},
{
"type": "Identifier",
"start": 167,
"end": 175,
"loc": {
"start": {
"line": 5,
"column": 35
},
"end": {
"line": 5,
"column": 43
}
},
"name": "listener"
},
{
"type": "AssignmentPattern",
"start": 177,
"end": 196,
"loc": {
"start": {
"line": 5,
"column": 45
},
"end": {
"line": 5,
"column": 64
}
},
"operator": "=",
"left": {
"type": "Identifier",
"start": 177,
"end": 184,
"loc": {
"start": {
"line": 5,
"column": 45
},
"end": {
"line": 5,
"column": 52
}
},
"name": "options"
},
"right": {
"type": "Identifier",
"start": 187,
"end": 196,
"loc": {
"start": {
"line": 5,
"column": 55
},
"end": {
"line": 5,
"column": 64
}
},
"name": "undefined"
}
}
],
"body": {
"type": "BlockStatement",
"start": 198,
"end": 541,
"loc": {
"start": {
"line": 5,
"column": 66
},
"end": {
"line": 17,
"column": 1
}
},
"body": [
{
"type": "ReturnStatement",
"start": 205,
"end": 538,
"loc": {
"start": {
"line": 6,
"column": 4
},
"end": {
"line": 16,
"column": 12
}
},
"argument": {
"type": "CallExpression",
"start": 212,
"end": 537,
"loc": {
"start": {
"line": 6,
"column": 11
},
"end": {
"line": 16,
"column": 11
}
},
"callee": {
"type": "MemberExpression",
"start": 212,
"end": 225,
"loc": {
"start": {
"line": 6,
"column": 11
},
"end": {
"line": 6,
"column": 24
}
},
"object": {
"type": "Identifier",
"start": 212,
"end": 218,
"loc": {
"start": {
"line": 6,
"column": 11
},
"end": {
"line": 6,
"column": 17
}
},
"name": "events"
},
"property": {
"type": "Identifier",
"start": 219,
"end": 225,
"loc": {
"start": {
"line": 6,
"column": 18
},
"end": {
"line": 6,
"column": 24
}
},
"name": "reduce"
},
"computed": false
},
"arguments": [
{
"type": "ArrowFunctionExpression",
"start": 226,
"end": 531,
"loc": {
"start": {
"line": 6,
"column": 25
},
"end": {
"line": 16,
"column": 5
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "Identifier",
"start": 227,
"end": 231,
"loc": {
"start": {
"line": 6,
"column": 26
},
"end": {
"line": 6,
"column": 30
}
},
"name": "prev"
},
{
"type": "Identifier",
"start": 233,
"end": 237,
"loc": {
"start": {
"line": 6,
"column": 32
},
"end": {
"line": 6,
"column": 36
}
},
"name": "name"
}
],
"body": {
"type": "BlockStatement",
"start": 242,
"end": 531,
"loc": {
"start": {
"line": 6,
"column": 41
},
"end": {
"line": 16,
"column": 5
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 253,
"end": 299,
"loc": {
"start": {
"line": 7,
"column": 8
},
"end": {
"line": 7,
"column": 54
}
},
"expression": {
"type": "CallExpression",
"start": 253,
"end": 298,
"loc": {
"start": {
"line": 7,
"column": 8
},
"end": {
"line": 7,
"column": 53
}
},
"callee": {
"type": "MemberExpression",
"start": 253,
"end": 273,
"loc": {
"start": {
"line": 7,
"column": 8
},
"end": {
"line": 7,
"column": 28
}
},
"object": {
"type": "Identifier",
"start": 253,
"end": 256,
"loc": {
"start": {
"line": 7,
"column": 8
},
"end": {
"line": 7,
"column": 11
}
},
"name": "dom"
},
"property": {
"type": "Identifier",
"start": 257,
"end": 273,
"loc": {
"start": {
"line": 7,
"column": 12
},
"end": {
"line": 7,
"column": 28
}
},
"name": "addEventListener"
},
"computed": false
},
"arguments": [
{
"type": "Identifier",
"start": 274,
"end": 278,
"loc": {
"start": {
"line": 7,
"column": 29
},
"end": {
"line": 7,
"column": 33
}
},
"name": "name"
},
{
"type": "Identifier",
"start": 280,
"end": 288,
"loc": {
"start": {
"line": 7,
"column": 35
},
"end": {
"line": 7,
"column": 43
}
},
"name": "listener"
},
{
"type": "Identifier",
"start": 290,
"end": 297,
"loc": {
"start": {
"line": 7,
"column": 45
},
"end": {
"line": 7,
"column": 52
}
},
"name": "options"
}
]
}
},
{
"type": "ReturnStatement",
"start": 309,
"end": 524,
"loc": {
"start": {
"line": 8,
"column": 8
},
"end": {
"line": 15,
"column": 10
}
},
"argument": {
"type": "ObjectExpression",
"start": 316,
"end": 523,
"loc": {
"start": {
"line": 8,
"column": 15
},
"end": {
"line": 15,
"column": 9
}
},
"properties": [
{
"type": "SpreadProperty",
"start": 331,
"end": 338,
"loc": {
"start": {
"line": 9,
"column": 12
},
"end": {
"line": 9,
"column": 19
}
},
"argument": {
"type": "Identifier",
"start": 334,
"end": 338,
"loc": {
"start": {
"line": 9,
"column": 15
},
"end": {
"line": 9,
"column": 19
}
},
"name": "prev"
}
},
{
"type": "Property",
"start": 353,
"end": 512,
"loc": {
"start": {
"line": 10,
"column": 12
},
"end": {
"line": 14,
"column": 13
}
},
"method": false,
"shorthand": false,
"computed": true,
"key": {
"type": "Identifier",
"start": 354,
"end": 358,
"loc": {
"start": {
"line": 10,
"column": 13
},
"end": {
"line": 10,
"column": 17
}
},
"name": "name"
},
"value": {
"type": "ObjectExpression",
"start": 361,
"end": 512,
"loc": {
"start": {
"line": 10,
"column": 20
},
"end": {
"line": 14,
"column": 13
}
},
"properties": [
{
"type": "Property",
"start": 380,
"end": 390,
"loc": {
"start": {
"line": 11,
"column": 16
},
"end": {
"line": 11,
"column": 26
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 380,
"end": 384,
"loc": {
"start": {
"line": 11,
"column": 16
},
"end": {
"line": 11,
"column": 20
}
},
"name": "type"
},
"value": {
"type": "Identifier",
"start": 386,
"end": 390,
"loc": {
"start": {
"line": 11,
"column": 22
},
"end": {
"line": 11,
"column": 26
}
},
"name": "name"
},
"kind": "init"
},
{
"type": "Property",
"start": 409,
"end": 425,
"loc": {
"start": {
"line": 12,
"column": 16
},
"end": {
"line": 12,
"column": 32
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 409,
"end": 418,
"loc": {
"start": {
"line": 12,
"column": 16
},
"end": {
"line": 12,
"column": 25
}
},
"name": "fulfilled"
},
"value": {
"type": "Literal",
"start": 420,
"end": 425,
"loc": {
"start": {
"line": 12,
"column": 27
},
"end": {
"line": 12,
"column": 32
}
},
"value": false,
"rawValue": false,
"raw": "false"
},
"kind": "init"
},
{
"type": "Property",
"start": 444,
"end": 497,
"loc": {
"start": {
"line": 13,
"column": 16
},
"end": {
"line": 13,
"column": 69
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 444,
"end": 450,
"loc": {
"start": {
"line": 13,
"column": 16
},
"end": {
"line": 13,
"column": 22
}
},
"name": "detach"
},
"value": {
"type": "ArrowFunctionExpression",
"start": 452,
"end": 497,
"loc": {
"start": {
"line": 13,
"column": 24
},
"end": {
"line": 13,
"column": 69
}
},
"id": null,
"generator": false,
"expression": true,
"async": false,
"params": [],
"body": {
"type": "CallExpression",
"start": 458,
"end": 497,
"loc": {
"start": {
"line": 13,
"column": 30
},
"end": {
"line": 13,
"column": 69
}
},
"callee": {
"type": "MemberExpression",
"start": 458,
"end": 481,
"loc": {
"start": {
"line": 13,
"column": 30
},
"end": {
"line": 13,
"column": 53
}
},
"object": {
"type": "Identifier",
"start": 458,
"end": 461,
"loc": {
"start": {
"line": 13,
"column": 30
},
"end": {
"line": 13,
"column": 33
}
},
"name": "dom"
},
"property": {
"type": "Identifier",
"start": 462,
"end": 481,
"loc": {
"start": {
"line": 13,
"column": 34
},
"end": {
"line": 13,
"column": 53
}
},
"name": "removeEventListener"
},
"computed": false
},
"arguments": [
{
"type": "Identifier",
"start": 482,
"end": 486,
"loc": {
"start": {
"line": 13,
"column": 54
},
"end": {
"line": 13,
"column": 58
}
},
"name": "name"
},
{
"type": "Identifier",
"start": 488,
"end": 496,
"loc": {
"start": {
"line": 13,
"column": 60
},
"end": {
"line": 13,
"column": 68
}
},
"name": "listener"
}
]
}
},
"kind": "init"
}
]
},
"kind": "init"
}
]
}
}
]
}
},
{
"type": "ObjectExpression",
"start": 533,
"end": 536,
"loc": {
"start": {
"line": 16,
"column": 7
},
"end": {
"line": 16,
"column": 10
}
},
"properties": []
}
]
}
}
]
}
},
{
"type": "ExportDefaultDeclaration",
"start": 545,
"end": 5549,
"loc": {
"start": {
"line": 19,
"column": 0
},
"end": {
"line": 160,
"column": 1
}
},
"declaration": {
"type": "ClassDeclaration",
"start": 560,
"end": 5549,
"loc": {
"start": {
"line": 19,
"column": 15
},
"end": {
"line": 160,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 566,
"end": 569,
"loc": {
"start": {
"line": 19,
"column": 21
},
"end": {
"line": 19,
"column": 24
}
},
"name": "Dom"
},
"superClass": null,
"body": {
"type": "ClassBody",
"start": 570,
"end": 5549,
"loc": {
"start": {
"line": 19,
"column": 25
},
"end": {
"line": 160,
"column": 1
}
},
"body": [
{
"type": "MethodDefinition",
"start": 577,
"end": 1836,
"loc": {
"start": {
"line": 20,
"column": 4
},
"end": {
"line": 58,
"column": 5
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 577,
"end": 588,
"loc": {
"start": {
"line": 20,
"column": 4
},
"end": {
"line": 20,
"column": 15
}
},
"name": "constructor"
},
"static": false,
"kind": "constructor",
"value": {
"type": "FunctionExpression",
"start": 588,
"end": 1836,
"loc": {
"start": {
"line": 20,
"column": 15
},
"end": {
"line": 58,
"column": 5
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "AssignmentPattern",
"start": 589,
"end": 623,
"loc": {
"start": {
"line": 20,
"column": 16
},
"end": {
"line": 20,
"column": 50
}
},
"operator": "=",
"left": {
"type": "Identifier",
"start": 589,
"end": 593,
"loc": {
"start": {
"line": 20,
"column": 16
},
"end": {
"line": 20,
"column": 20
}
},
"name": "view"
},
"right": {
"type": "CallExpression",
"start": 596,
"end": 623,
"loc": {
"start": {
"line": 20,
"column": 23
},
"end": {
"line": 20,
"column": 50
}
},
"callee": {
"type": "MemberExpression",
"start": 596,
"end": 605,
"loc": {
"start": {
"line": 20,
"column": 23
},
"end": {
"line": 20,
"column": 32
}
},
"object": {
"type": "Identifier",
"start": 596,
"end": 601,
"loc": {
"start": {
"line": 20,
"column": 23
},
"end": {
"line": 20,
"column": 28
}
},
"name": "Error"
},
"property": {
"type": "Identifier",
"start": 602,
"end": 605,
"loc": {
"start": {
"line": 20,
"column": 29
},
"end": {
"line": 20,
"column": 32
}
},
"name": "log"
},
"computed": false
},
"arguments": [
{
"type": "Literal",
"start": 606,
"end": 622,
"loc": {
"start": {
"line": 20,
"column": 33
},
"end": {
"line": 20,
"column": 49
}
},
"value": "View undefined",
"rawValue": "View undefined",
"raw": "\"View undefined\""
}
]
}
},
{
"type": "AssignmentPattern",
"start": 625,
"end": 638,
"loc": {
"start": {
"line": 20,
"column": 52
},
"end": {
"line": 20,
"column": 65
}
},
"operator": "=",
"left": {
"type": "Identifier",
"start": 625,
"end": 633,
"loc": {
"start": {
"line": 20,
"column": 52
},
"end": {
"line": 20,
"column": 60
}
},
"name": "handlers"
},
"right": {
"type": "ObjectExpression",
"start": 636,
"end": 638,
"loc": {
"start": {
"line": 20,
"column": 63
},
"end": {
"line": 20,
"column": 65
}
},
"properties": []
}
}
],
"body": {
"type": "BlockStatement",
"start": 640,
"end": 1836,
"loc": {
"start": {
"line": 20,
"column": 67
},
"end": {
"line": 58,
"column": 5
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 651,
"end": 668,
"loc": {
"start": {
"line": 21,
"column": 8
},
"end": {
"line": 21,
"column": 25
}
},
"expression": {
"type": "AssignmentExpression",
"start": 651,
"end": 667,
"loc": {
"start": {
"line": 21,
"column": 8
},
"end": {
"line": 21,
"column": 24
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 651,
"end": 660,
"loc": {
"start": {
"line": 21,
"column": 8
},
"end": {
"line": 21,
"column": 17
}
},
"object": {
"type": "ThisExpression",
"start": 651,
"end": 655,
"loc": {
"start": {
"line": 21,
"column": 8
},
"end": {
"line": 21,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"start": 656,
"end": 660,
"loc": {
"start": {
"line": 21,
"column": 13
},
"end": {
"line": 21,
"column": 17
}
},
"name": "view"
},
"computed": false
},
"right": {
"type": "Identifier",
"start": 663,
"end": 667,
"loc": {
"start": {
"line": 21,
"column": 20
},
"end": {
"line": 21,
"column": 24
}
},
"name": "view"
}
}
},
{
"type": "ExpressionStatement",
"start": 678,
"end": 704,
"loc": {
"start": {
"line": 22,
"column": 8
},
"end": {
"line": 22,
"column": 34
}
},
"expression": {
"type": "AssignmentExpression",
"start": 678,
"end": 703,
"loc": {
"start": {
"line": 22,
"column": 8
},
"end": {
"line": 22,
"column": 33
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 678,
"end": 689,
"loc": {
"start": {
"line": 22,
"column": 8
},
"end": {
"line": 22,
"column": 19
}
},
"object": {
"type": "ThisExpression",
"start": 678,
"end": 682,
"loc": {
"start": {
"line": 22,
"column": 8
},
"end": {
"line": 22,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"start": 683,
"end": 689,
"loc": {
"start": {
"line": 22,
"column": 13
},
"end": {
"line": 22,
"column": 19
}
},
"name": "canvas"
},
"computed": false
},
"right": {
"type": "MemberExpression",
"start": 692,
"end": 703,