UNPKG

awv3

Version:
1,455 lines (1,454 loc) 242 kB
{ "type": "Program", "start": 0, "end": 2487, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 69, "column": 0 } }, "sourceType": "module", "body": [ { "type": "ImportDeclaration", "start": 0, "end": 23, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 23 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 7, "end": 8, "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 8 } }, "local": { "type": "Identifier", "start": 7, "end": 8, "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 8 } }, "name": "$" } } ], "importKind": "value", "source": { "type": "Literal", "start": 14, "end": 22, "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 22 } }, "value": "jquery", "rawValue": "jquery", "raw": "'jquery'" }, "trailingComments": [ { "type": "CommentLine", "value": " Thank you very much, Microsoft ...", "start": 27, "end": 64, "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 3, "column": 37 } }, "range": [ 27, 64 ] } ] }, { "type": "ExpressionStatement", "start": 66, "end": 84, "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 4, "column": 18 } }, "expression": { "type": "AssignmentExpression", "start": 66, "end": 83, "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 4, "column": 17 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 66, "end": 79, "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 4, "column": 13 } }, "object": { "type": "Identifier", "start": 66, "end": 72, "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 4, "column": 6 } }, "name": "window", "leadingComments": null }, "property": { "type": "Identifier", "start": 73, "end": 79, "loc": { "start": { "line": 4, "column": 7 }, "end": { "line": 4, "column": 13 } }, "name": "jQuery" }, "computed": false, "leadingComments": null }, "right": { "type": "Identifier", "start": 82, "end": 83, "loc": { "start": { "line": 4, "column": 16 }, "end": { "line": 4, "column": 17 } }, "name": "$" }, "leadingComments": null }, "leadingComments": [ { "type": "CommentLine", "value": " Thank you very much, Microsoft ...", "start": 27, "end": 64, "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 3, "column": 37 } }, "range": [ 27, 64 ] } ] }, { "type": "ExpressionStatement", "start": 85, "end": 114, "loc": { "start": { "line": 4, "column": 19 }, "end": { "line": 4, "column": 48 } }, "expression": { "type": "CallExpression", "start": 85, "end": 113, "loc": { "start": { "line": 4, "column": 19 }, "end": { "line": 4, "column": 47 } }, "callee": { "type": "Identifier", "start": 85, "end": 92, "loc": { "start": { "line": 4, "column": 19 }, "end": { "line": 4, "column": 26 } }, "name": "require" }, "arguments": [ { "type": "Literal", "start": 93, "end": 112, "loc": { "start": { "line": 4, "column": 27 }, "end": { "line": 4, "column": 46 } }, "value": "ms-signalr-client", "rawValue": "ms-signalr-client", "raw": "'ms-signalr-client'" } ] } }, { "type": "ExportDefaultDeclaration", "start": 118, "end": 2485, "loc": { "start": { "line": 6, "column": 0 }, "end": { "line": 68, "column": 1 } }, "declaration": { "type": "FunctionDeclaration", "start": 133, "end": 2485, "loc": { "start": { "line": 6, "column": 15 }, "end": { "line": 68, "column": 1 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 142, "end": 147, "loc": { "start": { "line": 6, "column": 24 }, "end": { "line": 6, "column": 29 } }, "name": "scope" } ], "body": { "type": "BlockStatement", "start": 149, "end": 2485, "loc": { "start": { "line": 6, "column": 31 }, "end": { "line": 68, "column": 1 } }, "body": [ { "type": "VariableDeclaration", "start": 156, "end": 180, "loc": { "start": { "line": 7, "column": 4 }, "end": { "line": 7, "column": 28 } }, "declarations": [ { "type": "VariableDeclarator", "start": 160, "end": 179, "loc": { "start": { "line": 7, "column": 8 }, "end": { "line": 7, "column": 27 } }, "id": { "type": "Identifier", "start": 160, "end": 167, "loc": { "start": { "line": 7, "column": 8 }, "end": { "line": 7, "column": 15 } }, "name": "signalR" }, "init": { "type": "MemberExpression", "start": 170, "end": 179, "loc": { "start": { "line": 7, "column": 18 }, "end": { "line": 7, "column": 27 } }, "object": { "type": "Identifier", "start": 170, "end": 171, "loc": { "start": { "line": 7, "column": 18 }, "end": { "line": 7, "column": 19 } }, "name": "$" }, "property": { "type": "Identifier", "start": 172, "end": 179, "loc": { "start": { "line": 7, "column": 20 }, "end": { "line": 7, "column": 27 } }, "name": "signalR" }, "computed": false } } ], "kind": "var" }, { "type": "FunctionDeclaration", "start": 186, "end": 336, "loc": { "start": { "line": 8, "column": 4 }, "end": { "line": 12, "column": 5 } }, "id": { "type": "Identifier", "start": 195, "end": 212, "loc": { "start": { "line": 8, "column": 13 }, "end": { "line": 8, "column": 30 } }, "name": "makeProxyCallback" }, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 213, "end": 216, "loc": { "start": { "line": 8, "column": 31 }, "end": { "line": 8, "column": 34 } }, "name": "hub" }, { "type": "Identifier", "start": 218, "end": 226, "loc": { "start": { "line": 8, "column": 36 }, "end": { "line": 8, "column": 44 } }, "name": "callback" } ], "body": { "type": "BlockStatement", "start": 228, "end": 336, "loc": { "start": { "line": 8, "column": 46 }, "end": { "line": 12, "column": 5 } }, "body": [ { "type": "ReturnStatement", "start": 239, "end": 329, "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 11, "column": 10 } }, "argument": { "type": "FunctionExpression", "start": 246, "end": 328, "loc": { "start": { "line": 9, "column": 15 }, "end": { "line": 11, "column": 9 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [], "body": { "type": "BlockStatement", "start": 258, "end": 328, "loc": { "start": { "line": 9, "column": 27 }, "end": { "line": 11, "column": 9 } }, "body": [ { "type": "ExpressionStatement", "start": 273, "end": 317, "loc": { "start": { "line": 10, "column": 12 }, "end": { "line": 10, "column": 56 } }, "expression": { "type": "CallExpression", "start": 273, "end": 316, "loc": { "start": { "line": 10, "column": 12 }, "end": { "line": 10, "column": 55 } }, "callee": { "type": "MemberExpression", "start": 273, "end": 287, "loc": { "start": { "line": 10, "column": 12 }, "end": { "line": 10, "column": 26 } }, "object": { "type": "Identifier", "start": 273, "end": 281, "loc": { "start": { "line": 10, "column": 12 }, "end": { "line": 10, "column": 20 } }, "name": "callback" }, "property": { "type": "Identifier", "start": 282, "end": 287, "loc": { "start": { "line": 10, "column": 21 }, "end": { "line": 10, "column": 26 } }, "name": "apply" }, "computed": false }, "arguments": [ { "type": "Identifier", "start": 288, "end": 291, "loc": { "start": { "line": 10, "column": 27 }, "end": { "line": 10, "column": 30 } }, "name": "hub" }, { "type": "CallExpression", "start": 293, "end": 315, "loc": { "start": { "line": 10, "column": 32 }, "end": { "line": 10, "column": 54 } }, "callee": { "type": "MemberExpression", "start": 293, "end": 304, "loc": { "start": { "line": 10, "column": 32 }, "end": { "line": 10, "column": 43 } }, "object": { "type": "Identifier", "start": 293, "end": 294, "loc": { "start": { "line": 10, "column": 32 }, "end": { "line": 10, "column": 33 } }, "name": "$" }, "property": { "type": "Identifier", "start": 295, "end": 304, "loc": { "start": { "line": 10, "column": 34 }, "end": { "line": 10, "column": 43 } }, "name": "makeArray" }, "computed": false }, "arguments": [ { "type": "Identifier", "start": 305, "end": 314, "loc": { "start": { "line": 10, "column": 44 }, "end": { "line": 10, "column": 53 } }, "name": "arguments" } ] } ] } } ] } } } ] } }, { "type": "FunctionDeclaration", "start": 344, "end": 1297, "loc": { "start": { "line": 14, "column": 4 }, "end": { "line": 39, "column": 5 } }, "id": { "type": "Identifier", "start": 353, "end": 371, "loc": { "start": { "line": 14, "column": 13 }, "end": { "line": 14, "column": 31 } }, "name": "registerHubProxies" }, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 372, "end": 380, "loc": { "start": { "line": 14, "column": 32 }, "end": { "line": 14, "column": 40 } }, "name": "instance" }, { "type": "Identifier", "start": 382, "end": 397, "loc": { "start": { "line": 14, "column": 42 }, "end": { "line": 14, "column": 57 } }, "name": "shouldSubscribe" } ], "body": { "type": "BlockStatement", "start": 399, "end": 1297, "loc": { "start": { "line": 14, "column": 59 }, "end": { "line": 39, "column": 5 } }, "body": [ { "type": "VariableDeclaration", "start": 410, "end": 467, "loc": { "start": { "line": 15, "column": 8 }, "end": { "line": 15, "column": 65 } }, "declarations": [ { "type": "VariableDeclarator", "start": 414, "end": 417, "loc": { "start": { "line": 15, "column": 12 }, "end": { "line": 15, "column": 15 } }, "id": { "type": "Identifier", "start": 414, "end": 417, "loc": { "start": { "line": 15, "column": 12 }, "end": { "line": 15, "column": 15 } }, "name": "key" }, "init": null }, { "type": "VariableDeclarator", "start": 419, "end": 422, "loc": { "start": { "line": 15, "column": 17 }, "end": { "line": 15, "column": 20 } }, "id": { "type": "Identifier", "start": 419, "end": 422, "loc": { "start": { "line": 15, "column": 17 }, "end": { "line": 15, "column": 20 } }, "name": "hub" }, "init": null }, { "type": "VariableDeclarator", "start": 424, "end": 433, "loc": { "start": { "line": 15, "column": 22 }, "end": { "line": 15, "column": 31 } }, "id": { "type": "Identifier", "start": 424, "end": 433, "loc": { "start": { "line": 15, "column": 22 }, "end": { "line": 15, "column": 31 } }, "name": "memberKey" }, "init": null }, { "type": "VariableDeclarator", "start": 435, "end": 446, "loc": { "start": { "line": 15, "column": 33 }, "end": { "line": 15, "column": 44 } }, "id": { "type": "Identifier", "start": 435, "end": 446, "loc": { "start": { "line": 15, "column": 33 }, "end": { "line": 15, "column": 44 } }, "name": "memberValue" }, "init": null }, { "type": "VariableDeclarator", "start": 448, "end": 466, "loc": { "start": { "line": 15, "column": 46 }, "end": { "line": 15, "column": 64 } }, "id": { "type": "Identifier", "start": 448, "end": 466, "loc": { "start": { "line": 15, "column": 46 }, "end": { "line": 15, "column": 64 } }, "name": "subscriptionMethod" }, "init": null } ], "kind": "var" }, { "type": "ForInStatement", "start": 477, "end": 1290, "loc": { "start": { "line": 16, "column": 8 }, "end": { "line": 38, "column": 9 } }, "left": { "type": "Identifier", "start": 482, "end": 485, "loc": { "start": { "line": 16, "column": 13 }, "end": { "line": 16, "column": 16 } }, "name": "key" }, "right": { "type": "Identifier", "start": 489, "end": 497, "loc": { "start": { "line": 16, "column": 20 }, "end": { "line": 16, "column": 28 } }, "name": "instance" }, "body": { "type": "BlockStatement", "start": 499, "end": 1290, "loc": { "start": { "line": 16, "column": 30 }, "end": { "line": 38, "column": 9 } }, "body": [ { "type": "IfStatement", "start": 514, "end": 1279, "loc": { "start": { "line": 17, "column": 12 }, "end": { "line": 37, "column": 13 } }, "test": { "type": "CallExpression", "start": 518, "end": 546, "loc": { "start": { "line": 17, "column": 16 }, "end": { "line": 17, "column": 44 } }, "callee": { "type": "MemberExpression", "start": 518, "end": 541, "loc": { "start": { "line": 17, "column": 16 }, "end": { "line": 17, "column": 39 } }, "object": { "type": "Identifier", "start": 518, "end": 526, "loc": { "start": { "line": 17, "column": 16 }, "end": { "line": 17, "column": 24 } }, "name": "instance" }, "property": { "type": "Identifier", "start": 527, "end": 541, "loc": { "start": { "line": 17, "column": 25 }, "end": { "line": 17, "column": 39 } }, "name": "hasOwnProperty" }, "computed": false }, "arguments": [ { "type": "Identifier", "start": 542, "end": 545, "loc": { "start": { "line": 17, "column": 40 }, "end": { "line": 17, "column": 43 } }, "name": "key" } ] }, "consequent": { "type": "BlockStatement", "start": 548, "end": 1279, "loc": { "start": { "line": 17, "column": 46 }, "end": { "line": 37, "column": 13 } }, "body": [ { "type": "ExpressionStatement", "start": 567, "end": 587, "loc": { "start": { "line": 18, "column": 16 }, "end": { "line": 18, "column": 36 } }, "expression": { "type": "AssignmentExpression", "start": 567, "end": 586, "loc": { "start": { "line": 18, "column": 16 }, "end": { "line": 18, "column": 35 } }, "operator": "=", "left": { "type": "Identifier", "start": 567, "end": 570, "loc": { "start": { "line": 18, "column": 16 }, "end": { "line": 18, "column": 19 } }, "name": "hub" }, "right": { "type": "MemberExpression", "start": 573, "end": 586, "loc": { "start": { "line": 18, "column": 22 }, "end": { "line": 18, "column": 35 } }, "object": { "type": "Identifier", "start": 573, "end": 581, "loc": { "start": { "line": 18, "column": 22 }, "end": { "line": 18, "column": 30 } }, "name": "instance" }, "property": { "type": "Identifier", "start": 582, "end": 585, "loc": { "start": { "line": 18, "column": 31 }, "end": { "line": 18, "column": 34 } }, "name": "key" }, "computed": true } } }, { "type": "IfStatement", "start": 607, "end": 657, "loc": { "start": { "line": 20, "column": 16 }, "end": { "line": 21, "column": 29 } }, "test": { "type": "UnaryExpression", "start": 611, "end": 625, "loc": { "start": { "line": 20, "column": 20 }, "end": { "line": 20, "column": 34 } }, "operator": "!", "prefix": true, "argument": { "type": "MemberExpression", "start": 613, "end": 624, "loc": { "start": { "line": 20, "column": 22 }, "end": { "line": 20, "column": 33 } }, "object": { "type": "Identifier", "start": 613, "end": 616, "loc": { "start": { "line": 20, "column": 22 }, "end": { "line": 20, "column": 25 } }, "name": "hub" }, "property": { "type": "Identifier", "start": 617, "end": 624, "loc": { "start": { "line": 20, "column": 26 }, "end": { "line": 20, "column": 33 } }, "name": "hubName" }, "computed": false, "parenthesizedExpression": true } }, "consequent": { "type": "ContinueStatement", "start": 648, "end": 657, "loc": { "start": { "line": 21, "column": 20 }, "end": { "line": 21, "column": 29 } }, "label": null }, "alternate": null }, { "type": "IfStatement", "start": 677, "end": 845, "loc": { "start": { "line": 23, "column": 16 }, "end": { "line": 27, "column": 17 } }, "test": { "type": "Identifier", "start": 681, "end": 696, "loc": { "start": { "line": 23, "column": 20 }, "end": { "line": 23, "column": 35 } }, "name": "shouldSubscribe" }, "consequent": { "type": "BlockStatement", "start": 698, "end": 768, "loc": { "start": { "line": 23, "column": 37 }, "end": { "line": 25, "column": 17 } }, "body": [ { "type": "ExpressionStatement", "start": 721, "end": 749, "loc": { "start": { "line": 24, "column": 20 }, "end": { "line": 24, "column": 48 } }, "expression": { "type": "AssignmentExpression", "start": 721, "end": 748,