{ "type": "File", "start": 0, "end": 6772, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 192, "column": 0 } }, "program": { "type": "Program", "start": 0, "end": 6772, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 192, "column": 0 } }, "sourceType": "module", "body": [ { "type": "ImportDeclaration", "start": 23, "end": 71, "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 48 } }, "specifiers": [ { "type": "ImportSpecifier", "start": 32, "end": 43, "loc": { "start": { "line": 2, "column": 9 }, "end": { "line": 2, "column": 20 } }, "imported": { "type": "Identifier", "start": 32, "end": 43, "loc": { "start": { "line": 2, "column": 9 }, "end": { "line": 2, "column": 20 }, "identifierName": "Application" }, "name": "Application", "leadingComments": null }, "local": { "type": "Identifier", "start": 32, "end": 43, "loc": { "start": { "line": 2, "column": 9 }, "end": { "line": 2, "column": 20 }, "identifierName": "Application" }, "name": "Application" }, "leadingComments": null } ], "source": { "type": "StringLiteral", "start": 51, "end": 70, "loc": { "start": { "line": 2, "column": 28 }, "end": { "line": 2, "column": 47 } }, "extra": { "rawValue": "../../application", "raw": "\"../../application\"" }, "value": "../../application" }, "leadingComments": [ { "type": "CommentBlock", "value": " typehints:start ", "start": 0, "end": 21, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 21 } } } ], "trailingComments": [ { "type": "CommentBlock", "value": " typehints:end ", "start": 73, "end": 92, "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 3, "column": 19 } } } ] }, { "type": "ImportDeclaration", "start": 96, "end": 149, "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 5, "column": 53 } }, "specifiers": [ { "type": "ImportSpecifier", "start": 105, "end": 124, "loc": { "start": { "line": 5, "column": 9 }, "end": { "line": 5, "column": 28 } }, "imported": { "type": "Identifier", "start": 105, "end": 124, "loc": { "start": { "line": 5, "column": 9 }, "end": { "line": 5, "column": 28 }, "identifierName": "AdProviderInterface" }, "name": "AdProviderInterface", "leadingComments": null }, "local": { "type": "Identifier", "start": 105, "end": 124, "loc": { "start": { "line": 5, "column": 9 }, "end": { "line": 5, "column": 28 }, "identifierName": "AdProviderInterface" }, "name": "AdProviderInterface" }, "leadingComments": null } ], "source": { "type": "StringLiteral", "start": 132, "end": 148, "loc": { "start": { "line": 5, "column": 36 }, "end": { "line": 5, "column": 52 } }, "extra": { "rawValue": "../ad_provider", "raw": "\"../ad_provider\"" }, "value": "../ad_provider" }, "leadingComments": [ { "type": "CommentBlock", "value": " typehints:end ", "start": 73, "end": 92, "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 3, "column": 19 } } } ] }, { "type": "ImportDeclaration", "start": 151, "end": 201, "loc": { "start": { "line": 6, "column": 0 }, "end": { "line": 6, "column": 50 } }, "specifiers": [ { "type": "ImportSpecifier", "start": 160, "end": 172, "loc": { "start": { "line": 6, "column": 9 }, "end": { "line": 6, "column": 21 } }, "imported": { "type": "Identifier", "start": 160, "end": 172, "loc": { "start": { "line": 6, "column": 9 }, "end": { "line": 6, "column": 21 }, "identifierName": "createLogger" }, "name": "createLogger" }, "local": { "type": "Identifier", "start": 160, "end": 172, "loc": { "start": { "line": 6, "column": 9 }, "end": { "line": 6, "column": 21 }, "identifierName": "createLogger" }, "name": "createLogger" } } ], "source": { "type": "StringLiteral", "start": 180, "end": 200, "loc": { "start": { "line": 6, "column": 29 }, "end": { "line": 6, "column": 49 } }, "extra": { "rawValue": "../../core/logging", "raw": "\"../../core/logging\"" }, "value": "../../core/logging" } }, { "type": "ImportDeclaration", "start": 203, "end": 261, "loc": { "start": { "line": 7, "column": 0 }, "end": { "line": 7, "column": 58 } }, "specifiers": [ { "type": "ImportSpecifier", "start": 212, "end": 225, "loc": { "start": { "line": 7, "column": 9 }, "end": { "line": 7, "column": 22 } }, "imported": { "type": "Identifier", "start": 212, "end": 225, "loc": { "start": { "line": 7, "column": 9 }, "end": { "line": 7, "column": 22 }, "identifierName": "ClickDetector" }, "name": "ClickDetector" }, "local": { "type": "Identifier", "start": 212, "end": 225, "loc": { "start": { "line": 7, "column": 9 }, "end": { "line": 7, "column": 22 }, "identifierName": "ClickDetector" }, "name": "ClickDetector" } } ], "source": { "type": "StringLiteral", "start": 233, "end": 260, "loc": { "start": { "line": 7, "column": 30 }, "end": { "line": 7, "column": 57 } }, "extra": { "rawValue": "../../core/click_detector", "raw": "\"../../core/click_detector\"" }, "value": "../../core/click_detector" } }, { "type": "ImportDeclaration", "start": 263, "end": 304, "loc": { "start": { "line": 8, "column": 0 }, "end": { "line": 8, "column": 41 } }, "specifiers": [ { "type": "ImportSpecifier", "start": 272, "end": 277, "loc": { "start": { "line": 8, "column": 9 }, "end": { "line": 8, "column": 14 } }, "imported": { "type": "Identifier", "start": 272, "end": 277, "loc": { "start": { "line": 8, "column": 9 }, "end": { "line": 8, "column": 14 }, "identifierName": "clamp" }, "name": "clamp" }, "local": { "type": "Identifier", "start": 272, "end": 277, "loc": { "start": { "line": 8, "column": 9 }, "end": { "line": 8, "column": 14 }, "identifierName": "clamp" }, "name": "clamp" } } ], "source": { "type": "StringLiteral", "start": 285, "end": 303, "loc": { "start": { "line": 8, "column": 22 }, "end": { "line": 8, "column": 40 } }, "extra": { "rawValue": "../../core/utils", "raw": "\"../../core/utils\"" }, "value": "../../core/utils" } }, { "type": "ImportDeclaration", "start": 306, "end": 345, "loc": { "start": { "line": 9, "column": 0 }, "end": { "line": 9, "column": 39 } }, "specifiers": [ { "type": "ImportSpecifier", "start": 315, "end": 316, "loc": { "start": { "line": 9, "column": 9 }, "end": { "line": 9, "column": 10 } }, "imported": { "type": "Identifier", "start": 315, "end": 316, "loc": { "start": { "line": 9, "column": 9 }, "end": { "line": 9, "column": 10 }, "identifierName": "T" }, "name": "T" }, "local": { "type": "Identifier", "start": 315, "end": 316, "loc": { "start": { "line": 9, "column": 9 }, "end": { "line": 9, "column": 10 }, "identifierName": "T" }, "name": "T" } } ], "source": { "type": "StringLiteral", "start": 324, "end": 344, "loc": { "start": { "line": 9, "column": 18 }, "end": { "line": 9, "column": 38 } }, "extra": { "rawValue": "../../translations", "raw": "\"../../translations\"" }, "value": "../../translations" } }, { "type": "VariableDeclaration", "start": 349, "end": 400, "loc": { "start": { "line": 11, "column": 0 }, "end": { "line": 11, "column": 51 } }, "declarations": [ { "type": "VariableDeclarator", "start": 355, "end": 399, "loc": { "start": { "line": 11, "column": 6 }, "end": { "line": 11, "column": 50 } }, "id": { "type": "Identifier", "start": 355, "end": 361, "loc": { "start": { "line": 11, "column": 6 }, "end": { "line": 11, "column": 12 }, "identifierName": "logger" }, "name": "logger" }, "init": { "type": "CallExpression", "start": 364, "end": 399, "loc": { "start": { "line": 11, "column": 15 }, "end": { "line": 11, "column": 50 } }, "callee": { "type": "Identifier", "start": 364, "end": 376, "loc": { "start": { "line": 11, "column": 15 }, "end": { "line": 11, "column": 27 }, "identifierName": "createLogger" }, "name": "createLogger" }, "arguments": [ { "type": "StringLiteral", "start": 377, "end": 398, "loc": { "start": { "line": 11, "column": 28 }, "end": { "line": 11, "column": 49 } }, "extra": { "rawValue": "adprovider/adinplay", "raw": "\"adprovider/adinplay\"" }, "value": "adprovider/adinplay" } ] } } ], "kind": "const" }, { "type": "VariableDeclaration", "start": 404, "end": 471, "loc": { "start": { "line": 13, "column": 0 }, "end": { "line": 13, "column": 67 } }, "declarations": [ { "type": "VariableDeclarator", "start": 410, "end": 470, "loc": { "start": { "line": 13, "column": 6 }, "end": { "line": 13, "column": 66 } }, "id": { "type": "Identifier", "start": 410, "end": 438, "loc": { "start": { "line": 13, "column": 6 }, "end": { "line": 13, "column": 34 }, "identifierName": "minimumTimeBetweenVideoAdsMs" }, "name": "minimumTimeBetweenVideoAdsMs" }, "init": { "type": "ConditionalExpression", "start": 441, "end": 470, "loc": { "start": { "line": 13, "column": 37 }, "end": { "line": 13, "column": 66 } }, "test": { "type": "Identifier", "start": 441, "end": 449, "loc": { "start": { "line": 13, "column": 37 }, "end": { "line": 13, "column": 45 }, "identifierName": "G_IS_DEV" }, "name": "G_IS_DEV" }, "consequent": { "type": "NumericLiteral", "start": 452, "end": 453, "loc": { "start": { "line": 13, "column": 48 }, "end": { "line": 13, "column": 49 } }, "extra": { "rawValue": 1, "raw": "1" }, "value": 1 }, "alternate": { "type": "BinaryExpression", "start": 456, "end": 470, "loc": { "start": { "line": 13, "column": 52 }, "end": { "line": 13, "column": 66 } }, "left": { "type": "BinaryExpression", "start": 456, "end": 463, "loc": { "start": { "line": 13, "column": 52 }, "end": { "line": 13, "column": 59 } }, "left": { "type": "NumericLiteral", "start": 456, "end": 458, "loc": { "start": { "line": 13, "column": 52 }, "end": { "line": 13, "column": 54 } }, "extra": { "rawValue": 15, "raw": "15" }, "value": 15 }, "operator": "*", "right": { "type": "NumericLiteral", "start": 461, "end": 463, "loc": { "start": { "line": 13, "column": 57 }, "end": { "line": 13, "column": 59 } }, "extra": { "rawValue": 60, "raw": "60" }, "value": 60 } }, "operator": "*", "right": { "type": "NumericLiteral", "start": 466, "end": 470, "loc": { "start": { "line": 13, "column": 62 }, "end": { "line": 13, "column": 66 } }, "extra": { "rawValue": 1000, "raw": "1000" }, "value": 1000 } } } } ], "kind": "const" }, { "type": "ExportNamedDeclaration", "start": 475, "end": 6770, "loc": { "start": { "line": 15, "column": 0 }, "end": { "line": 191, "column": 1 } }, "specifiers": [], "source": null, "declaration": { "type": "ClassDeclaration", "start": 482, "end": 6770, "loc": { "start": { "line": 15, "column": 7 }, "end": { "line": 191, "column": 1 } }, "id": { "type": "Identifier", "start": 488, "end": 506, "loc": { "start": { "line": 15, "column": 13 }, "end": { "line": 15, "column": 31 }, "identifierName": "AdinplayAdProvider" }, "name": "AdinplayAdProvider" }, "superClass": { "type": "Identifier", "start": 515, "end": 534, "loc": { "start": { "line": 15, "column": 40 }, "end": { "line": 15, "column": 59 }, "identifierName": "AdProviderInterface" }, "name": "AdProviderInterface" }, "body": { "type": "ClassBody", "start": 535, "end": 6770, "loc": { "start": { "line": 15, "column": 60 }, "end": { "line": 191, "column": 1 } }, "body": [ { "type": "ClassMethod", "start": 601, "end": 1260, "loc": { "start": { "line": 20, "column": 4 }, "end": { "line": 44, "column": 5 } }, "static": false, "computed": false, "key": { "type": "Identifier", "start": 601, "end": 612, "loc": { "start": { "line": 20, "column": 4 }, "end": { "line": 20, "column": 15 }, "identifierName": "constructor" }, "name": "constructor", "leadingComments": null }, "kind": "constructor", "id": null, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 613, "end": 616, "loc": { "start": { "line": 20, "column": 16 }, "end": { "line": 20, "column": 19 }, "identifierName": "app" }, "name": "app" } ], "body": { "type": "BlockStatement", "start": 618, "end": 1260, "loc": { "start": { "line": 20, "column": 21 }, "end": { "line": 44, "column": 5 } }, "body": [ { "type": "ExpressionStatement", "start": 629, "end": 640, "loc": { "start": { "line": 21, "column": 8 }, "end": { "line": 21, "column": 19 } }, "expression": { "type": "CallExpression", "start": 629, "end": 639, "loc": { "start": { "line": 21, "column": 8 }, "end": { "line": 21, "column": 18 } }, "callee": { "type": "Super", "start": 629, "end": 634, "loc": { "start": { "line": 21, "column": 8 }, "end": { "line": 21, "column": 13 } } }, "arguments": [ { "type": "Identifier", "start": 635, "end": 638, "loc": { "start": { "line": 21, "column": 14 }, "end": { "line": 21, "column": 17 }, "identifierName": "app" }, "name": "app" } ] }, "trailingComments": [ { "type": "CommentBlock", "value": "* @type {ClickDetector} ", "start": 652, "end": 680, "loc": { "start": { "line": 23, "column": 8 }, "end": { "line": 23, "column": 36 } } } ] }, { "type": "ExpressionStatement", "start": 690, "end": 726, "loc": { "start": { "line": 24, "column": 8 }, "end": { "line": 24, "column": 44 } }, "expression": { "type": "AssignmentExpression", "start": 690, "end": 725, "loc": { "start": { "line": 24, "column": 8 }, "end": { "line": 24, "column": 43 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 690, "end": 718, "loc": { "start": { "line": 24, "column": 8 }, "end": { "line": 24, "column": 36 } }, "object": { "type": "ThisExpression", "start": 690, "end": 694, "loc": { "start": { "line": 24, "column": 8 }, "end": { "line": 24, "column": 12 } }, "leadingComments": null }, "property": { "type": "Identifier", "start": 695, "end": 718, "loc": { "start": { "line": 24, "column": 13 }, "end": { "line": 24, "column": 36 }, "identifierName": "getOnSteamClickDetector" }, "name": "getOnSteamClickDetector" }, "computed": false, "leadingComments": null }, "right": { "type": "NullLiteral", "start": 721, "end": 725, "loc": { "start": { "line": 24, "column": 39 }, "end": { "line": 24, "column": 43 } } }, "leadingComments": null }, "leadingComments": [ { "type": "CommentBlock", "value": "* @type {ClickDetector} ", "start": 652, "end": 680, "loc": { "start": { "line": 23, "column": 8 }, "end": { "line": 23, "column": 36 } } } ], "trailingComments": [ { "type": "CommentBlock", "value": "* @type {Element} ", "start": 738, "end": 760, "loc": { "start": { "line": 26, "column": 8 }, "end": { "line": 26, "column": 30 } } } ] }, { "type": "ExpressionStatement", "start": 770, "end": 805, "loc": { "start": { "line": 27, "column": 8 }, "end": { "line": 27, "column": 43 } }, "expression": { "type": "AssignmentExpression", "start": 770, "end": 804, "loc": { "start": { "line": 27, "column": 8 }, "end": { "line": 27, "column": 42 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 770, "end": 797, "loc": { "start": { "line": 27, "column": 8 }, "end": { "line": 27, "column": 35 } }, "object": { "type": "ThisExpression", "start": 770, "end": 774, "loc": { "start": { "line": 27, "column": 8 }, "end": { "line": 27, "column": 12 } }, "leadingComments": null }, "property": { "type": "Identifier", "start": 775, "end": 797, "loc": { "start": { "line": 27, "column": 13 }, "end": { "line": 27, "column": 35 }, "identifierName": "adContainerMainElement" }, "name": "adContainerMainElement" }, "computed": false, "leadingComments": null }, "right": { "type": "NullLiteral", "start": 800, "end": 804, "loc": { "start": { "line": 27, "column": 38 }, "end": { "line": 27, "column": 42 } } }, "leadingComments": null }, "leadingComments": [ { "type": "CommentBlock", "value": "* @type {Element} ", "start": 738, "end": 760, "loc": { "start": { "line": 26, "column": 8 }, "end": { "line": 26, "column": 30 } } } ], "trailingComments": [ { "type": "CommentBlock", "value": "*\r\n * The resolve function to finish the current video ad. Null if none is currently running\r\n * @type {Function}\r\n ", "start": 817, "end": 961, "loc": { "start": { "line": 29, "column": 8 }, "end": { "line": 32, "column": 11 } } } ] }, { "type": "ExpressionStatement", "start": 971, "end": 1006, "loc": { "start": { "line": 33, "column": 8 }, "end": { "line": 33, "column": 43 } }, "expression": { "type": "AssignmentExpression", "start": 971, "end": 1005, "loc": { "start": { "line": 33, "column": 8 }, "end": { "line": 33, "column": 42 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 971, "end": 998, "loc": { "start": { "line": 33, "column": 8 }, "end": { "line": 33, "column": 35 } }, "object": { "type": "ThisExpression", "start": 971, "end": 975, "loc": { "start": { "line": 33, "column": 8 }, "end": { "line": 33, "column": 12 } }, "leadingComments": null }, "property": { "type": "Identifier", "start": 976, "end": 998, "loc": { "start": { "line": 33, "column": 13 }, "end": { "line": 33, "column": 35 }, "identifierName": "videoAdResolveFunction" }, "name": "videoAdResolveFunction" }, "computed": false, "leadingComments": null }, "right": { "type": "NullLiteral", "start": 1001, "end": 1005, "loc": { "start": { "line": 33, "column": 38 }, "end": { "line": 33, "column": 42 } } }, "leadingComments": null }, "leadingComments": [ { "type": "CommentBlock", "value": "*\r\n * The resolve function to finish the current video ad. Null if none is currently running\r\n * @type {Function}\r\n ", "start": 817, "end": 961, "loc": { "start": { "line": 29, "column": 8 }, "end": { "line": 32, "column": 11 } } } ], "trailingComments": [ { "type": "CommentBlock", "value": "*\r\n * The current timer which will timeout the resolve\r\n ", "start": 1018, "end": 1095, "loc": { "start": { "line": 35, "column": 8 }, "end": { "line": 37, "column": 11 } } } ] }, { "type": "ExpressionStatement", "start": 1105, "end": 1137, "loc": { "start": { "line": 38, "column": 8 }, "end": { "line": 38, "column": 40 } }, "expression": { "type": "AssignmentExpression", "start": 1105, "end": 1136, "loc": { "start": { "line": 38, "column": 8 }, "end": { "line": 38, "column": 39 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 1105, "end": 1129, "loc": { "start": { "line": 38, "column": 8 }, "end": { "line": 38, "column": 32 } }, "object": { "type": "ThisExpression", "start": 1105, "end": 1109, "loc": { "start": { "line": 38, "column": 8 }, "end": { "line": 38, "column": 12 } }, "leadingComments": null }, "property": { "type": "Identifier", "start": 1110, "end": 1129, "loc": { "start": { "line": 38, "column": 13 }, "end": { "line": 38, "column": 32 }, "identifierName": "videoAdResolveTimer" }, "name": "videoAdResolveTimer" }, "computed": false, "leadingComments": null }, "right": { "type": "NullLiteral", "start": 1132, "end": 1136, "loc": { "start": { "line": 38, "column": 35 }, "end": { "line": 38, "column": 39 } } }, "leadingComments": null }, "leadingComments": [ { "type": "CommentBlock", "value": "*\r\n * The current timer which will timeout the resolve\r\n ", "start": 1018, "end": 1095, "loc": { "start": { "line": 35, "column": 8 }, "end": { "line": 37, "column": 11 } } } ], "trailingComments": [ { "type": "CommentBlock", "value": "*\r\n * When we showed the last video ad\r\n ", "start": 1149, "end": 1210, "loc": { "start": { "line": 40, "column": 8 }, "end": { "line": 42, "column": 11 } } } ] }, { "type": "ExpressionStatement", "start": 1220, "end": 1253, "loc": { "start": { "line": 43, "column": 8 }, "end": { "line": 43, "column": 41 } }, "expression": { "type": "AssignmentExpression", "start": 1220, "end": 1252, "loc": { "start": { "line": 43, "column": 8 }, "end": { "line": 43, "column": 40 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 1220, "end": 1244, "loc": { "start": { "line": 43, "column": 8 }, "end": { "line": 43, "column": 32 } }, "object": { "type": "ThisExpression", "start": 1220, "end": 1224, "loc": { "start": { "line": 43, "column": 8 }, "end": { "line": 43, "column": 12 } }, "leadingComments": null }, "property": { "type": "Identifier", "start": 1225, "end": 1244, "loc": { "start": { "line": 43, "column": 13 }, "end": { "line": 43, "column": 32 }, "identifierName": "lastVideoAdShowTime" }, "name": "lastVideoAdShowTime" }, "computed": false, "leadingComments": null }, "right": { "type": "UnaryExpression", "start": 1247, "end": 1252, "loc": { "start": { "line": 43, "column": 35 }, "end": { "line": 43, "column": 40 } }, "operator": "-", "prefix": true, "argument": { "type": "NumericLiteral", "start": 1248, "end": 1252, "loc": { "start": { "line": 43, "column": 36 }, "end": { "line": 43, "column": 40 } }, "extra": { "rawValue": 100000000000000000000, "raw": "1e20" }, "value": 100000000000000000000 }, "extra": { "parenthesizedArgument": false } }, "leadingComments": null }, "leadingComments": [ { "type": "CommentBlock", "value": "*\r\n * When we showed the last video ad\r\n ", "start": 1149, "end": 1210, "loc": { "start": { "line": 40, "column": 8 }, "end": { "line": 42, "column": 11 } } } ] } ], "directives": [] }, "leadingComments": [ { "type": "CommentBlock", "value": "*\r\n *\r\n * @param {Application} app\r\n ", "start": 542, "end": 595, "loc": { "start": { "line": 16, "column": 4 }, "end": { "line": 19, "column": 7 } } } ] }, { "type": "ClassMethod", "start": 1268, "end": 1310, "loc": { "start": { "line": 46, "column": 4 }, "end": { "line": 48, "column": 5 } }, "static": false, "computed": false, "key": { "type": "Identifier", "start": 1268, "end": 1277, "loc": { "start": { "line": 46, "column": 4 }, "end": { "line": 46, "column": 13 }, "identifierName": "getHasAds" }, "name": "getHasAds" }, "kind": "method", "id": null, "generator": false, "expression": false, "async": false, "params": [], "body": { "type": "BlockStatement", "start": 1280, "end": 1310, "loc": { "start": { "line": 46, "column": 16 }, "end": { "line": 48, "column": 5 } }, "body": [ { "type": "ReturnStatement", "start": 1291, "end": 1303, "loc": { "start": { "line": 47, "column": 8 }, "end": { "line": 47, "column": 20 } }, "argument": { "type": "BooleanLiteral", "start": 1298, "end": 1302, "loc": { "start": { "line": 47, "column": 15 }, "end": { "line": 47, "column": 19 } }, "value": true } } ], "directives": [] } }, { "type": "ClassMethod", "start": 1318, "end": 1543, "loc": { "start": { "line": 50, "column": 4 }, "end": { "line": 56, "column": 5 } }, "static": false, "computed": false, "key": { "type": "Identifier", "start": 1318, "end": 1335, "loc": { "start": { "line": 50, "column": 4 }, "end": { "line": 50, "column": 21 }, "identifierName": "getCanShowVideoAd" }, "name": "getCanShowVideoAd" }, "kind": "method", "id": null, "generator": false, "expression": false, "async": false, "params": [], "body": { "type": "BlockStatement", "start": 1338, "end": 1543, "loc": { "start": { "line": 50, "column": 24 }, "end": { "line": 56, "column": 5 } }, "body": [ { "type": "ReturnStatement", "start": 1349, "end": 1536, "loc": { "start": { "line": 51, "column": 8 }, "end": { "line": 55, "column": 10 } }, "argument": { "type": "LogicalExpression", "start": 1371, "end": 1524, "loc": { "start": { "line": 52, "column": 12 }, "end": { "line": 54, "column": 87 } }, "left": { "type": "LogicalExpression", "start": 1371, "end": 1432, "loc": { "start": { "line": 52, "column": 12 }, "end": { "line": 53, "column": 40 } }, "left": { "type": "CallExpression", "start": 1371, "end": 1387, "loc": { "start": { "line": 52, "column": 12 }, "end": { "line": 52, "column": 28 } }, "callee": { "type": "MemberExpression", "start": 1371, "end": 1385, "loc": { "start": { "line": 52, "column": 12 }, "end": { "line": 52, "column": 26 } }, "object": { "type": "ThisExpression", "start": 1371, "end": 1375, "loc": { "start": { "line": 52, "column": 12 }, "end": { "line": 52, "column": 16 } } }, "property": { "type": "Identifier", "start": 1376, "end": 1385, "loc": { "start": { "line": 52, "column": 17 }, "end": { "line": 52, "column": 26 }, "identifierName": "getHasAds" }, "name": "getHasAds" }, "computed": false }, "arguments": [] }, "operator": "&&", "right": { "type": "UnaryExpression", "start": 1404, "end": 1432, "loc": { "start": { "line": 53, "column": 12 }, "end": { "line": 53, "column": 40 } }, "operator": "!", "prefix": true, "argument": { "type": "MemberExpression", "start": 1405, "end": 1432, "loc": { "start": { "line": 53, "column": 13 }, "end": { "line": 53, "column": 40 } }, "object": { "type": "ThisExpression", "start": 1405, "end": 1409, "loc": { "start": { "line": 53, "column": 13 }, "end": { "line": 53, "column": 17 } } }, "property": { "type": "Identifier", "start": 1410, "end": 1432, "loc": { "start": { "line": 53, "column": 18 }, "end": { "line": 53, "column": 40 }, "identifierName": "videoAdResolveFunction" }, "name": "videoAdResolveFunction" }, "computed": false }, "extra": { "parenthesizedArgument": false } } }, "operator": "&&", "right": { "type": "BinaryExpression", "start": 1449, "end": 1524, "loc": { "start": { "line": 54, "column": 12 }, "end": { "line": 54, "column": 87 } }, "left": { "type": "BinaryExpression", "start": 1449, "end": 1493, "loc": { "start": { "line": 54, "column": 12 }, "end": { "line": 54, "column": 56 } }, "left": { "type": "CallExpression", "start": 1449, "end": 1466, "loc": { "start": { "line": 54, "column": 12 }, "end": { "line": 54, "column": 29 } }, "callee": { "type": "MemberExpression", "start": 1449, "end": 1464, "loc": { "start": { "line": 54, "column": 12 }, "end": { "line": 54, "column": 27 } }, "object": { "type": "Identifier", "start": 1449, "end": 1460, "loc": { "start": { "line": 54, "column": 12 }, "end": { "line": 54, "column": 23 }, "identifierName": "performance" }, "name": "performance" }, "property": { "type": "Identifier", "start": 1461, "end": 1464, "loc": { "start": { "line": 54, "column": 24 }, "end": { "line": 54, "column": 27 }, "identifierName": "now" }, "name": "now" }, "computed": false }, "arguments": [] }, "operator": "-", "right": { "type": "MemberExpression", "start": 1469, "end": 1493, "loc": { "start": { "line": 54, "column": 32 }, "end": { "line": 54, "column": 56 } }, "object": { "type": "ThisExpression", "start": 1469, "end": 1473, "loc": { "start": { "line": 54, "column": 32 }, "end": { "line": 54, "column": 36 } } }, "property": { "type": "Identifier", "start": 1474, "end": 1493, "loc": { "start": { "line": 54, "column": 37 }, "end": { "line": 54, "column": 56 }, "identifierName": "lastVideoAdShowTime" }, "name": "lastVideoAdShowTime" }, "computed": false } }, "operator": ">", "right": { "type": "Identifier", "start": 1496, "end": 1524, "loc": { "start": { "line": 54, "column": 59 }, "end": { "line": 54, "column": 87 }, "identifierName": "minimumTimeBetweenVideoAdsMs" }, "name": "minimumTimeBetweenVideoAdsMs" } }, "extra": { "parenthesized": true, "parenStart": 1356 } } } ], "directives": [] } }, { "type": "ClassMethod", "start": 1551, "end": 4673, "loc": { "start": { "line": 58, "column": 4 }, "end": { "line": 141, "column": 5 } }, "static": false, "computed": false, "key": { "type": "Identifier", "start": 1551, "end": 1561, "loc": { "start": { "line": 58, "column": 4 }, "end": { "line": 58, "column": 14 }, "identifierName": "initialize" }, "name": "initialize" }, "kind": "method", "id": null, "generator": false, "expression": false, "async": false, "params": [], "body": { "type": "BlockStatement", "start": 1564, "end": 4673, "loc": { "start": { "line": 58, "column": 17 }, "end": { "line": 141, "column": 5 } }, "body": [ { "type": "IfStatement", "start": 1646, "end": 1720, "loc": { "start": { "line": 60, "column": 8 }, "end": { "line": 62, "column": 9 } }, "test": { "type": "UnaryExpression", "start": 1650, "end": 1667, "loc": { "start": { "line": 60, "column": 12 }, "end": { "line": 60, "column": 29 } }, "operator": "!", "prefix": true, "argument": { "type": "CallExpression", "start": 1651, "end": 1667, "loc": { "start": { "line": 60, "column": 13 }, "end": { "line": 60, "column": 29 } }, "callee": { "type": "MemberExpression", "start": 1651, "end": 1665, "loc": { "start": { "line": 60, "column": 13 }, "end": { "line": 60, "column": 27 } }, "object": { "type": "ThisExpression", "start": 1651, "end": 1655, "loc": { "start": { "line": 60, "column": 13 }, "end": { "line": 60, "column": 17 } }, "leadingComments": null }, "property": { "type": "Identifier", "start": 1656, "end": 1665, "loc": { "start": { "line": 60, "column": 18 }, "end": { "line": 60, "column": 27 }, "identifierName": "getHasAds" }, "name": "getHasAds" }, "computed": false, "leadingComments": null }, "arguments": [], "leadingComments": null }, "extra": { "parenthesizedArgument": false }, "leadingComments": null }, "consequent": { "type": "BlockStatement", "start": 1669, "end": 1720, "loc": { "start": { "line": 60, "column": 31 }, "end": { "line": 62, "column": 9 } }, "body": [ { "type": "ReturnStatement", "start": 1684, "end": 1709, "loc": { "start": { "line": 61, "column": 12 }, "end": { "line": 61, "column": 37 } }, "argument": { "type": "CallExpression", "start": 1691, "end": 1708, "loc": { "start": { "line": 61, "column": 19 }, "end": { "line": 61, "column": 36 } }, "callee": { "type": "MemberExpression", "start": 1691, "end": 1706, "loc": { "start": { "line": 61, "column": 19 }, "end": { "line": 61, "column": 34 } }, "object": { "type": "Identifier", "start": 1691, "end": 1698, "loc": { "start": { "line": 61, "column": 19 }, "end": { "line": 61, "column": 26 }, "identifierName": "Promise" }, "name": "Promise" }, "property": { "type": "Identifier", "start": 1699, "end": 1706, "loc": { "start": { "line": 61, "column": 27 }, "end": { "line": 61, "column": 34 }, "identifierName": "resolve" }, "name": "resolve" }, "computed": false }, "arguments": [] } } ], "directives": [] }, "alternate": null, "leadingComments": [ { "type": "CommentLine", "value": " No point to initialize everything if ads are not supported", "start": 1575, "end": 1636, "loc": { "start": { "line": 59, "column": 8 }, "end": { "line": 59, "column": 69 } } } ] }, { "type": "ExpressionStatement", "start": 1732, "end": 1771, "loc": { "start": { "line": 64, "column": 8 }, "end": { "line": 64, "column": 47 } }, "expression": { "type": "CallExpression", "start": 1732, "end": 1770, "loc": { "start": { "line": 64, "column": 8 }, "end": { "line": 64, "column": 46 } }, "callee": { "type": "MemberExpression", "start": 1732, "end": 1742, "loc": { "start": { "line": 64, "column": 8 }, "end": { "line": 64, "column": 18 } }, "object": { "type": "Identifier", "start": 1732, "end": 1738, "loc": { "start": { "line": 64, "column": 8 }, "end": { "line": 64, "column": 14 }, "identifierName": "logger" }, "name": "logger" }, "property": { "type": "Identifier", "start": 1739, "end": 1742, "loc": { "start": { "line": 64, "column": 15 }, "end": { "line": 64, "column": 18 }, "identifierName": "log" }, "name": "log" }, "computed": false }, "arguments": [ { "type": "StringLiteral", "start": 1743, "end": 1769, "loc": { "start": { "line": 64, "column": 19 }, "end": { "line": 64, "column": 45 } }, "extra": { "rawValue": "🎬 Initializing Adinplay", "raw": "\"🎬 Initializing Adinplay\"" }, "value": "🎬 Initializing Adinplay" } ] }, "trailingComments": [ { "type": "CommentLine", "value": " Add the preroll element", "start": 1783, "end": 1809, "loc": { "start": { "line": 66, "column": 8 }, "end": { "line": 66, "column": 34 } } } ] }, { "type": "ExpressionStatement", "start": 1819, "end": 1879, "loc": { "start": { "line": 67, "column": 8 }, "end": { "line": 67, "column": 68 } }, "expression": { "type": "AssignmentExpression", "start": 1819, "end": 1878, "loc": { "start": { "line": 67, "column": 8 }, "end": { "line": 67, "column": 67 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 1819, "end": 1846, "loc": { "start": { "line": 67, "column": 8 }, "end": { "line": 67, "column": 35 } }, "object": { "type": "ThisExpression", "start": 1819, "end": 1823, "loc": { "start": { "line": 67, "column": 8 }, "end": { "line": 67, "column": 12 } }, "leadingComments": null }, "property": { "type": "Identifier", "start": 1824, "end": 1846, "loc": { "start": { "line": 67, "column": 13 }, "end": { "line": 67, "column": 35 }, "identifierName": "adContainerMainElement" }, "name": "adContainerMainElement" }, "computed": false, "leadingComments": null }, "right": { "type": "CallExpression", "start": 1849, "end": 1878, "loc": { "start": { "line": 67, "column": 38 }, "end": { "line": 67, "column": 67 } }, "callee": { "type": "MemberExpression", "start": 1849, "end": 1871, "loc": { "start": { "line": 67, "column": 38 }, "end": { "line": 67, "column": 60 } }, "object": { "type": "Identifier", "start": 1849, "end": 1857, "loc": { "start": { "line": 67, "column": 38 }, "end": { "line": 67, "column": 46 }, "identifierName": "document" }, "name": "document" }, "property": { "type": "Identifier", "start": 1858, "end": 1871, "loc": { "start": { "line": 67, "column": 47 }, "end": { "line": 67, "column": 60 }, "identifierName": "createElement" }, "name": "createElement" }, "computed": false }, "arguments": [ { "type": "StringLiteral", "start": 1872, "end": 1877, "loc": { "start": { "line": 67, "column": 61 }, "end": { "line": 67, "column": 66 } }, "extra": { "rawValue": "div", "raw": "\"div\"" }, "value": "div" } ] }, "leadingComments": null }, "leadingComments": [ { "type": "CommentLine", "value": " Add the preroll element", "start": 1783, "end": 1809, "loc": { "start": { "line": 66, "column": 8 }, "end": { "line": 66, "column": 34 } } } ] }, { "type": "ExpressionStatement", "start": 1889, "end": 1947, "loc": { "start": { "line": 68, "column": 8 }, "end": { "line": 68, "column": 66 } }, "expression": { "type": "AssignmentExpression", "start": 1889, "end": 1946, "loc": { "start": { "line": 68, "column": 8 }, "end": { "line": 68, "column": 65 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 1889, "end": 1919, "loc": { "start": { "line": 68, "column": 8 }, "end": { "line": 68, "column": 38 } }, "object": { "type": "MemberExpression", "start": 1889, "end": 1916, "loc": { "start": { "line": 68, "column": 8 }, "end": { "line": 68, "column": 35 } }, "object": { "type": "ThisExpression", "start": 1889, "end": 1893, "loc": { "start": { "line": 68, "column": 8 }, "end": { "line": 68, "column": 12 } } }, "property": { "type": "Identifier", "start": 1894, "end": 1916, "loc": { "start": { "line": 68, "column": 13 }, "end": { "line": 68, "column": 35 }, "identifierName": "adContainerMainElement" }, "name": "adContainerMainElement" }, "computed": false }, "property": { "type": "Identifier", "start": 1917, "end": 1919, "loc": { "start": { "line": 68, "column": 36 }, "end": { "line": 68, "column": 38 }, "identifierName": "id" }, "name": "id" }, "computed": false }, "right": { "type": "StringLiteral", "start": 1922, "end": 1946, "loc": { "start": { "line": 68, "column": 41 }, "end": { "line": 68, "column": 65 } }, "extra": { "rawValue": "adinplayVideoContainer", "raw": "\"adinplayVideoContainer\"" }, "value": "adinplayVideoContainer" } } }, { "type": "ExpressionStatement", "start": 1957, "end": 2133, "loc": { "start": { "line": 69, "column": 8 }, "end": { "line": 75, "column": 10 } }, "expression": { "type": "AssignmentExpression", "start": 1957, "end": 2132, "loc": { "start": { "line": 69, "column": 8 }, "end": { "line": 75, "column": 9 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 1957, "end": 1994, "loc": { "start": { "line": 69, "column": 8 }, "end": { "line": 69, "column": 45 } }, "object": { "type": "MemberExpression", "start": 1957, "end": 1984, "loc": { "start": { "line": 69, "column": 8 }, "end": { "line": 69, "column": 35 } }, "object": { "type": "ThisExpression", "start": 1957, "end": 1961, "loc": { "start": { "line": 69, "column": 8 }, "end": { "line": 69, "column": 12 } } }, "property": { "type": "Identifier", "start": 1962, "end": 1984, "loc": { "start": { "line": 69, "column": 13 }, "end": { "line": 69, "column": 35 }, "identifierName": "adContainerMainElement" }, "name": "adContainerMainElement" }, "computed": false }, "property": { "type": "Identifier", "start": 1985, "end": 1994, "loc": { "start": { "line": 69, "column": 36 }, "end": { "line": 69, "column": 45 }, "identifierName": "innerHTML" }, "name": "innerHTML" }, "computed": false }, "right": { "type": "TemplateLiteral", "start": 1997, "end": 2132, "loc": { "start": { "line": 69, "column": 48 }, "end": { "line": 75, "column": 9 } }, "expressions": [], "quasis": [ { "type": "TemplateElement", "start": 1998, "end": 2131, "loc": { "start": { "line": 69, "column": 49 }, "end": { "line": 75, "column": 8 } }, "value": { "raw": "\n