UNPKG

awv3

Version:
1,457 lines (1,456 loc) 1.18 MB
{ "type": "File", "start": 0, "end": 5526, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 162, "column": 0 } }, "program": { "type": "Program", "start": 0, "end": 5526, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 162, "column": 0 } }, "sourceType": "module", "body": [ { "type": "ExportDefaultDeclaration", "start": 0, "end": 5525, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 161, "column": 1 } }, "declaration": { "type": "ClassDeclaration", "start": 15, "end": 5525, "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 161, "column": 1 } }, "id": { "type": "Identifier", "start": 21, "end": 27, "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 27 }, "identifierName": "Events" }, "name": "Events" }, "superClass": null, "body": { "type": "ClassBody", "start": 28, "end": 5525, "loc": { "start": { "line": 1, "column": 28 }, "end": { "line": 161, "column": 1 } }, "body": [ { "type": "ClassMethod", "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 }, "identifierName": "constructor" }, "name": "constructor" }, "static": false, "kind": "constructor", "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 }, "identifierName": "_callbacks" }, "name": "_callbacks" }, "computed": false }, "right": { "type": "Identifier", "start": 76, "end": 85, "loc": { "start": { "line": 3, "column": 26 }, "end": { "line": 3, "column": 35 }, "identifierName": "undefined" }, "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 }, "identifierName": "_inspectors" }, "name": "_inspectors" }, "computed": false }, "right": { "type": "Identifier", "start": 114, "end": 123, "loc": { "start": { "line": 4, "column": 27 }, "end": { "line": 4, "column": 36 }, "identifierName": "undefined" }, "name": "undefined" } } } ], "directives": [] } }, { "type": "ClassMethod", "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 }, "identifierName": "once" }, "name": "once" }, "static": false, "kind": "method", "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 }, "identifierName": "type" }, "name": "type" }, { "type": "Identifier", "start": 147, "end": 155, "loc": { "start": { "line": 7, "column": 15 }, "end": { "line": 7, "column": 23 }, "identifierName": "callback" }, "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 }, "identifierName": "on" }, "name": "on" }, "computed": false }, "arguments": [ { "type": "Identifier", "start": 175, "end": 179, "loc": { "start": { "line": 8, "column": 16 }, "end": { "line": 8, "column": 20 }, "identifierName": "type" }, "name": "type" }, { "type": "Identifier", "start": 181, "end": 189, "loc": { "start": { "line": 8, "column": 22 }, "end": { "line": 8, "column": 30 }, "identifierName": "callback" }, "name": "callback" }, { "type": "BooleanLiteral", "start": 191, "end": 195, "loc": { "start": { "line": 8, "column": 32 }, "end": { "line": 8, "column": 36 } }, "value": true } ] } } ], "directives": [] } }, { "type": "ClassMethod", "start": 209, "end": 283, "loc": { "start": { "line": 11, "column": 4 }, "end": { "line": 13, "column": 5 } }, "computed": false, "key": { "type": "Identifier", "start": 209, "end": 216, "loc": { "start": { "line": 11, "column": 4 }, "end": { "line": 11, "column": 11 }, "identifierName": "onFirst" }, "name": "onFirst" }, "static": false, "kind": "method", "id": null, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 217, "end": 221, "loc": { "start": { "line": 11, "column": 12 }, "end": { "line": 11, "column": 16 }, "identifierName": "type" }, "name": "type" }, { "type": "Identifier", "start": 223, "end": 231, "loc": { "start": { "line": 11, "column": 18 }, "end": { "line": 11, "column": 26 }, "identifierName": "callback" }, "name": "callback" } ], "body": { "type": "BlockStatement", "start": 233, "end": 283, "loc": { "start": { "line": 11, "column": 28 }, "end": { "line": 13, "column": 5 } }, "body": [ { "type": "ExpressionStatement", "start": 243, "end": 277, "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 42 } }, "expression": { "type": "CallExpression", "start": 243, "end": 276, "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 41 } }, "callee": { "type": "MemberExpression", "start": 243, "end": 250, "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 15 } }, "object": { "type": "ThisExpression", "start": 243, "end": 247, "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 12 } } }, "property": { "type": "Identifier", "start": 248, "end": 250, "loc": { "start": { "line": 12, "column": 13 }, "end": { "line": 12, "column": 15 }, "identifierName": "on" }, "name": "on" }, "computed": false }, "arguments": [ { "type": "Identifier", "start": 251, "end": 255, "loc": { "start": { "line": 12, "column": 16 }, "end": { "line": 12, "column": 20 }, "identifierName": "type" }, "name": "type" }, { "type": "Identifier", "start": 257, "end": 265, "loc": { "start": { "line": 12, "column": 22 }, "end": { "line": 12, "column": 30 }, "identifierName": "callback" }, "name": "callback" }, { "type": "BooleanLiteral", "start": 267, "end": 272, "loc": { "start": { "line": 12, "column": 32 }, "end": { "line": 12, "column": 37 } }, "value": false }, { "type": "NumericLiteral", "start": 274, "end": 275, "loc": { "start": { "line": 12, "column": 39 }, "end": { "line": 12, "column": 40 } }, "extra": { "rawValue": 1, "raw": "1" }, "value": 1 } ] } } ], "directives": [] } }, { "type": "ClassMethod", "start": 289, "end": 363, "loc": { "start": { "line": 15, "column": 4 }, "end": { "line": 17, "column": 5 } }, "computed": false, "key": { "type": "Identifier", "start": 289, "end": 295, "loc": { "start": { "line": 15, "column": 4 }, "end": { "line": 15, "column": 10 }, "identifierName": "onLast" }, "name": "onLast" }, "static": false, "kind": "method", "id": null, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 296, "end": 300, "loc": { "start": { "line": 15, "column": 11 }, "end": { "line": 15, "column": 15 }, "identifierName": "type" }, "name": "type" }, { "type": "Identifier", "start": 302, "end": 310, "loc": { "start": { "line": 15, "column": 17 }, "end": { "line": 15, "column": 25 }, "identifierName": "callback" }, "name": "callback" } ], "body": { "type": "BlockStatement", "start": 312, "end": 363, "loc": { "start": { "line": 15, "column": 27 }, "end": { "line": 17, "column": 5 } }, "body": [ { "type": "ExpressionStatement", "start": 322, "end": 357, "loc": { "start": { "line": 16, "column": 8 }, "end": { "line": 16, "column": 43 } }, "expression": { "type": "CallExpression", "start": 322, "end": 356, "loc": { "start": { "line": 16, "column": 8 }, "end": { "line": 16, "column": 42 } }, "callee": { "type": "MemberExpression", "start": 322, "end": 329, "loc": { "start": { "line": 16, "column": 8 }, "end": { "line": 16, "column": 15 } }, "object": { "type": "ThisExpression", "start": 322, "end": 326, "loc": { "start": { "line": 16, "column": 8 }, "end": { "line": 16, "column": 12 } } }, "property": { "type": "Identifier", "start": 327, "end": 329, "loc": { "start": { "line": 16, "column": 13 }, "end": { "line": 16, "column": 15 }, "identifierName": "on" }, "name": "on" }, "computed": false }, "arguments": [ { "type": "Identifier", "start": 330, "end": 334, "loc": { "start": { "line": 16, "column": 16 }, "end": { "line": 16, "column": 20 }, "identifierName": "type" }, "name": "type" }, { "type": "Identifier", "start": 336, "end": 344, "loc": { "start": { "line": 16, "column": 22 }, "end": { "line": 16, "column": 30 }, "identifierName": "callback" }, "name": "callback" }, { "type": "BooleanLiteral", "start": 346, "end": 351, "loc": { "start": { "line": 16, "column": 32 }, "end": { "line": 16, "column": 37 } }, "value": false }, { "type": "UnaryExpression", "start": 353, "end": 355, "loc": { "start": { "line": 16, "column": 39 }, "end": { "line": 16, "column": 41 } }, "operator": "-", "prefix": true, "argument": { "type": "NumericLiteral", "start": 354, "end": 355, "loc": { "start": { "line": 16, "column": 40 }, "end": { "line": 16, "column": 41 } }, "extra": { "rawValue": 1, "raw": "1" }, "value": 1 }, "extra": { "parenthesizedArgument": false } } ] } } ], "directives": [] } }, { "type": "ClassMethod", "start": 369, "end": 1726, "loc": { "start": { "line": 19, "column": 4 }, "end": { "line": 54, "column": 5 } }, "computed": false, "key": { "type": "Identifier", "start": 369, "end": 371, "loc": { "start": { "line": 19, "column": 4 }, "end": { "line": 19, "column": 6 }, "identifierName": "on" }, "name": "on" }, "static": false, "kind": "method", "id": null, "generator": false, "expression": false, "async": false, "params": [ { "type": "AssignmentPattern", "start": 372, "end": 381, "loc": { "start": { "line": 19, "column": 7 }, "end": { "line": 19, "column": 16 } }, "left": { "type": "Identifier", "start": 372, "end": 376, "loc": { "start": { "line": 19, "column": 7 }, "end": { "line": 19, "column": 11 }, "identifierName": "arg1" }, "name": "arg1" }, "right": { "type": "ObjectExpression", "start": 379, "end": 381, "loc": { "start": { "line": 19, "column": 14 }, "end": { "line": 19, "column": 16 } }, "properties": [] } }, { "type": "AssignmentPattern", "start": 383, "end": 399, "loc": { "start": { "line": 19, "column": 18 }, "end": { "line": 19, "column": 34 } }, "left": { "type": "Identifier", "start": 383, "end": 387, "loc": { "start": { "line": 19, "column": 18 }, "end": { "line": 19, "column": 22 }, "identifierName": "arg2" }, "name": "arg2" }, "right": { "type": "Identifier", "start": 390, "end": 399, "loc": { "start": { "line": 19, "column": 25 }, "end": { "line": 19, "column": 34 }, "identifierName": "undefined" }, "name": "undefined" } }, { "type": "AssignmentPattern", "start": 401, "end": 415, "loc": { "start": { "line": 19, "column": 36 }, "end": { "line": 19, "column": 50 } }, "left": { "type": "Identifier", "start": 401, "end": 407, "loc": { "start": { "line": 19, "column": 36 }, "end": { "line": 19, "column": 42 }, "identifierName": "remove" }, "name": "remove" }, "right": { "type": "BooleanLiteral", "start": 410, "end": 415, "loc": { "start": { "line": 19, "column": 45 }, "end": { "line": 19, "column": 50 } }, "value": false } }, { "type": "AssignmentPattern", "start": 417, "end": 437, "loc": { "start": { "line": 19, "column": 52 }, "end": { "line": 19, "column": 72 } }, "left": { "type": "Identifier", "start": 417, "end": 425, "loc": { "start": { "line": 19, "column": 52 }, "end": { "line": 19, "column": 60 }, "identifierName": "priority" }, "name": "priority" }, "right": { "type": "Identifier", "start": 428, "end": 437, "loc": { "start": { "line": 19, "column": 63 }, "end": { "line": 19, "column": 72 }, "identifierName": "undefined" }, "name": "undefined" } } ], "body": { "type": "BlockStatement", "start": 439, "end": 1726, "loc": { "start": { "line": 19, "column": 74 }, "end": { "line": 54, "column": 5 } }, "body": [ { "type": "IfStatement", "start": 449, "end": 492, "loc": { "start": { "line": 20, "column": 8 }, "end": { "line": 20, "column": 51 } }, "test": { "type": "UnaryExpression", "start": 453, "end": 469, "loc": { "start": { "line": 20, "column": 12 }, "end": { "line": 20, "column": 28 } }, "operator": "!", "prefix": true, "argument": { "type": "MemberExpression", "start": 454, "end": 469, "loc": { "start": { "line": 20, "column": 13 }, "end": { "line": 20, "column": 28 } }, "object": { "type": "ThisExpression", "start": 454, "end": 458, "loc": { "start": { "line": 20, "column": 13 }, "end": { "line": 20, "column": 17 } } }, "property": { "type": "Identifier", "start": 459, "end": 469, "loc": { "start": { "line": 20, "column": 18 }, "end": { "line": 20, "column": 28 }, "identifierName": "_callbacks" }, "name": "_callbacks" }, "computed": false }, "extra": { "parenthesizedArgument": false } }, "consequent": { "type": "ExpressionStatement", "start": 471, "end": 492, "loc": { "start": { "line": 20, "column": 30 }, "end": { "line": 20, "column": 51 } }, "expression": { "type": "AssignmentExpression", "start": 471, "end": 491, "loc": { "start": { "line": 20, "column": 30 }, "end": { "line": 20, "column": 50 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 471, "end": 486, "loc": { "start": { "line": 20, "column": 30 }, "end": { "line": 20, "column": 45 } }, "object": { "type": "ThisExpression", "start": 471, "end": 475, "loc": { "start": { "line": 20, "column": 30 }, "end": { "line": 20, "column": 34