rizzo-next
Version:
The next generation of Lonely Planet's style guide and pattern library.
1,361 lines (1,360 loc) • 895 kB
JSON
{
"type": "Program",
"start": 0,
"end": 4402,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 157,
"column": 0
}
},
"sourceType": "module",
"body": [
{
"type": "ImportDeclaration",
"start": 33,
"end": 74,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 3,
"column": 41
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 40,
"end": 51,
"loc": {
"start": {
"line": 3,
"column": 7
},
"end": {
"line": 3,
"column": 18
}
},
"local": {
"type": "Identifier",
"start": 40,
"end": 51,
"loc": {
"start": {
"line": 3,
"column": 7
},
"end": {
"line": 3,
"column": 18
}
},
"name": "VideoPlayer",
"leadingComments": null
},
"leadingComments": null
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 57,
"end": 73,
"loc": {
"start": {
"line": 3,
"column": 24
},
"end": {
"line": 3,
"column": 40
}
},
"value": "./video_player",
"rawValue": "./video_player",
"raw": "\"./video_player\""
},
"leadingComments": [
{
"type": "Block",
"value": " global brightcove, BCMAPI ",
"start": 0,
"end": 31,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 31
}
},
"range": [
0,
31
]
}
]
},
{
"type": "VariableDeclaration",
"start": 76,
"end": 119,
"loc": {
"start": {
"line": 5,
"column": 0
},
"end": {
"line": 5,
"column": 43
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 80,
"end": 118,
"loc": {
"start": {
"line": 5,
"column": 4
},
"end": {
"line": 5,
"column": 42
}
},
"id": {
"type": "Identifier",
"start": 80,
"end": 88,
"loc": {
"start": {
"line": 5,
"column": 4
},
"end": {
"line": 5,
"column": 12
}
},
"name": "template"
},
"init": {
"type": "CallExpression",
"start": 91,
"end": 118,
"loc": {
"start": {
"line": 5,
"column": 15
},
"end": {
"line": 5,
"column": 42
}
},
"callee": {
"type": "Identifier",
"start": 91,
"end": 98,
"loc": {
"start": {
"line": 5,
"column": 15
},
"end": {
"line": 5,
"column": 22
}
},
"name": "require"
},
"arguments": [
{
"type": "Literal",
"start": 99,
"end": 117,
"loc": {
"start": {
"line": 5,
"column": 23
},
"end": {
"line": 5,
"column": 41
}
},
"value": "./brightcove.hbs",
"rawValue": "./brightcove.hbs",
"raw": "\"./brightcove.hbs\""
}
]
}
}
],
"kind": "let"
},
{
"type": "Identifier",
"start": 121,
"end": 4373,
"loc": {
"start": {
"line": 7,
"column": 0
},
"end": {
"line": 154,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 127,
"end": 137,
"loc": {
"start": {
"line": 7,
"column": 6
},
"end": {
"line": 7,
"column": 16
}
},
"name": "Brightcove"
},
"superClass": {
"type": "Identifier",
"start": 146,
"end": 157,
"loc": {
"start": {
"line": 7,
"column": 25
},
"end": {
"line": 7,
"column": 36
}
},
"name": "VideoPlayer"
},
"body": {
"type": "ClassBody",
"start": 158,
"end": 4373,
"loc": {
"start": {
"line": 7,
"column": 37
},
"end": {
"line": 154,
"column": 1
}
},
"body": [
{
"type": "MethodDefinition",
"start": 162,
"end": 316,
"loc": {
"start": {
"line": 8,
"column": 2
},
"end": {
"line": 13,
"column": 3
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 166,
"end": 173,
"loc": {
"start": {
"line": 8,
"column": 6
},
"end": {
"line": 8,
"column": 13
}
},
"name": "scripts"
},
"static": false,
"kind": "get",
"value": {
"type": "FunctionExpression",
"start": 173,
"end": 316,
"loc": {
"start": {
"line": 8,
"column": 13
},
"end": {
"line": 13,
"column": 3
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start": 176,
"end": 316,
"loc": {
"start": {
"line": 8,
"column": 16
},
"end": {
"line": 13,
"column": 3
}
},
"body": [
{
"type": "ReturnStatement",
"start": 182,
"end": 312,
"loc": {
"start": {
"line": 9,
"column": 4
},
"end": {
"line": 12,
"column": 6
}
},
"argument": {
"type": "ArrayExpression",
"start": 189,
"end": 311,
"loc": {
"start": {
"line": 9,
"column": 11
},
"end": {
"line": 12,
"column": 5
}
},
"elements": [
{
"type": "Literal",
"start": 197,
"end": 238,
"loc": {
"start": {
"line": 10,
"column": 6
},
"end": {
"line": 10,
"column": 47
}
},
"value": "https://files.brightcove.com/bc-mapi.js",
"rawValue": "https://files.brightcove.com/bc-mapi.js",
"raw": "\"https://files.brightcove.com/bc-mapi.js\""
},
{
"type": "Literal",
"start": 246,
"end": 305,
"loc": {
"start": {
"line": 11,
"column": 6
},
"end": {
"line": 11,
"column": 65
}
},
"value": "https://sadmin.brightcove.com/js/BrightcoveExperiences.js",
"rawValue": "https://sadmin.brightcove.com/js/BrightcoveExperiences.js",
"raw": "\"https://sadmin.brightcove.com/js/BrightcoveExperiences.js\""
}
]
}
}
]
}
}
},
{
"type": "MethodDefinition",
"start": 319,
"end": 411,
"loc": {
"start": {
"line": 14,
"column": 2
},
"end": {
"line": 18,
"column": 3
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 319,
"end": 329,
"loc": {
"start": {
"line": 14,
"column": 2
},
"end": {
"line": 14,
"column": 12
}
},
"name": "initialize"
},
"static": false,
"kind": "method",
"value": {
"type": "FunctionExpression",
"start": 329,
"end": 411,
"loc": {
"start": {
"line": 14,
"column": 12
},
"end": {
"line": 18,
"column": 3
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "Identifier",
"start": 330,
"end": 337,
"loc": {
"start": {
"line": 14,
"column": 13
},
"end": {
"line": 14,
"column": 20
}
},
"name": "options"
}
],
"body": {
"type": "BlockStatement",
"start": 339,
"end": 411,
"loc": {
"start": {
"line": 14,
"column": 22
},
"end": {
"line": 18,
"column": 3
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 345,
"end": 371,
"loc": {
"start": {
"line": 15,
"column": 4
},
"end": {
"line": 15,
"column": 30
}
},
"expression": {
"type": "CallExpression",
"start": 345,
"end": 370,
"loc": {
"start": {
"line": 15,
"column": 4
},
"end": {
"line": 15,
"column": 29
}
},
"callee": {
"type": "MemberExpression",
"start": 345,
"end": 361,
"loc": {
"start": {
"line": 15,
"column": 4
},
"end": {
"line": 15,
"column": 20
}
},
"object": {
"type": "Super",
"start": 345,
"end": 350,
"loc": {
"start": {
"line": 15,
"column": 4
},
"end": {
"line": 15,
"column": 9
}
}
},
"property": {
"type": "Identifier",
"start": 351,
"end": 361,
"loc": {
"start": {
"line": 15,
"column": 10
},
"end": {
"line": 15,
"column": 20
}
},
"name": "initialize"
},
"computed": false
},
"arguments": [
{
"type": "Identifier",
"start": 362,
"end": 369,
"loc": {
"start": {
"line": 15,
"column": 21
},
"end": {
"line": 15,
"column": 28
}
},
"name": "options"
}
]
}
},
{
"type": "ExpressionStatement",
"start": 377,
"end": 407,
"loc": {
"start": {
"line": 17,
"column": 4
},
"end": {
"line": 17,
"column": 34
}
},
"expression": {
"type": "AssignmentExpression",
"start": 377,
"end": 406,
"loc": {
"start": {
"line": 17,
"column": 4
},
"end": {
"line": 17,
"column": 33
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 377,
"end": 387,
"loc": {
"start": {
"line": 17,
"column": 4
},
"end": {
"line": 17,
"column": 14
}
},
"object": {
"type": "Identifier",
"start": 377,
"end": 383,
"loc": {
"start": {
"line": 17,
"column": 4
},
"end": {
"line": 17,
"column": 10
}
},
"name": "window"
},
"property": {
"type": "Identifier",
"start": 384,
"end": 387,
"loc": {
"start": {
"line": 17,
"column": 11
},
"end": {
"line": 17,
"column": 14
}
},
"name": "BCL"
},
"computed": false
},
"right": {
"type": "LogicalExpression",
"start": 390,
"end": 406,
"loc": {
"start": {
"line": 17,
"column": 17
},
"end": {
"line": 17,
"column": 33
}
},
"left": {
"type": "MemberExpression",
"start": 390,
"end": 400,
"loc": {
"start": {
"line": 17,
"column": 17
},
"end": {
"line": 17,
"column": 27
}
},
"object": {
"type": "Identifier",
"start": 390,
"end": 396,
"loc": {
"start": {
"line": 17,
"column": 17
},
"end": {
"line": 17,
"column": 23
}
},
"name": "window"
},
"property": {
"type": "Identifier",
"start": 397,
"end": 400,
"loc": {
"start": {
"line": 17,
"column": 24
},
"end": {
"line": 17,
"column": 27
}
},
"name": "BCL"
},
"computed": false
},
"operator": "||",
"right": {
"type": "ObjectExpression",
"start": 404,
"end": 406,
"loc": {
"start": {
"line": 17,
"column": 31
},
"end": {
"line": 17,
"column": 33
}
},
"properties": []
}
}
}
}
],
"trailingComments": null
},
"trailingComments": null
},
"trailingComments": [
{
"type": "Block",
"value": "*\n * Search for a video by it's Atlas ID\n * @returns {Promise}\n ",
"start": 415,
"end": 489,
"loc": {
"start": {
"line": 20,
"column": 2
},
"end": {
"line": 23,
"column": 5
}
},
"range": [
415,
489
]
}
]
},
{
"type": "MethodDefinition",
"start": 492,
"end": 673,
"loc": {
"start": {
"line": 24,
"column": 2
},
"end": {
"line": 32,
"column": 3
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 492,
"end": 498,
"loc": {
"start": {
"line": 24,
"column": 2
},
"end": {
"line": 24,
"column": 8
}
},
"name": "search",
"leadingComments": null
},
"static": false,
"kind": "method",
"value": {
"type": "FunctionExpression",
"start": 498,
"end": 673,
"loc": {
"start": {
"line": 24,
"column": 8
},
"end": {
"line": 32,
"column": 3
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start": 501,
"end": 673,
"loc": {
"start": {
"line": 24,
"column": 11
},
"end": {
"line": 32,
"column": 3
}
},
"body": [
{
"type": "ReturnStatement",
"start": 507,
"end": 669,
"loc": {
"start": {
"line": 25,
"column": 4
},
"end": {
"line": 31,
"column": 7
}
},
"argument": {
"type": "NewExpression",
"start": 514,
"end": 668,
"loc": {
"start": {
"line": 25,
"column": 11
},
"end": {
"line": 31,
"column": 6
}
},
"callee": {
"type": "Identifier",
"start": 518,
"end": 525,
"loc": {
"start": {
"line": 25,
"column": 15
},
"end": {
"line": 25,
"column": 22
}
},
"name": "Promise"
},
"arguments": [
{
"type": "ArrowFunctionExpression",
"start": 526,
"end": 667,
"loc": {
"start": {
"line": 25,
"column": 23
},
"end": {
"line": 31,
"column": 5
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "Identifier",
"start": 527,
"end": 534,
"loc": {
"start": {
"line": 25,
"column": 24
},
"end": {
"line": 25,
"column": 31
}
},
"name": "resolve"
}
],
"body": {
"type": "BlockStatement",
"start": 539,
"end": 667,
"loc": {
"start": {
"line": 25,
"column": 36
},
"end": {
"line": 31,
"column": 5
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 547,
"end": 623,
"loc": {
"start": {
"line": 26,
"column": 6
},
"end": {
"line": 28,
"column": 9
}
},
"expression": {
"type": "CallExpression",
"start": 547,
"end": 622,
"loc": {
"start": {
"line": 26,
"column": 6
},
"end": {
"line": 28,
"column": 8
}
},
"callee": {
"type": "MemberExpression",
"start": 547,
"end": 560,
"loc": {
"start": {
"line": 26,
"column": 6
},
"end": {
"line": 26,
"column": 19
}
},
"object": {
"type": "Identifier",
"start": 547,
"end": 553,
"loc": {
"start": {
"line": 26,
"column": 6
},
"end": {
"line": 26,
"column": 12
}
},
"name": "BCMAPI"
},
"property": {
"type": "Identifier",
"start": 554,
"end": 560,
"loc": {
"start": {
"line": 26,
"column": 13
},
"end": {
"line": 26,
"column": 19
}
},
"name": "search"
},
"computed": false
},
"arguments": [
{
"type": "ObjectExpression",
"start": 561,
"end": 621,
"loc": {
"start": {
"line": 26,
"column": 20
},
"end": {
"line": 28,
"column": 7
}
},
"properties": [
{
"type": "Property",
"start": 571,
"end": 613,
"loc": {
"start": {
"line": 27,
"column": 8
},
"end": {
"line": 27,
"column": 50
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 571,
"end": 574,
"loc": {
"start": {
"line": 27,
"column": 8
},
"end": {
"line": 27,
"column": 11
}
},
"name": "all"
},
"value": {
"type": "TemplateLiteral",
"start": 576,
"end": 613,
"loc": {
"start": {
"line": 27,
"column": 13
},
"end": {
"line": 27,
"column": 50
}
},
"expressions": [
{
"type": "MemberExpression",
"start": 588,
"end": 611,
"loc": {
"start": {
"line": 27,
"column": 25
},
"end": {
"line": 27,
"column": 48
}
},
"object": {
"type": "MemberExpression",
"start": 588,
"end": 603,
"loc": {
"start": {
"line": 27,
"column": 25
},
"end": {
"line": 27,
"column": 40
}
},
"object": {
"type": "MemberExpression",
"start": 588,
"end": 597,
"loc": {
"start": {
"line": 27,
"column": 25
},
"end": {
"line": 27,
"column": 34
}
},
"object": {
"type": "Identifier",
"start": 588,
"end": 594,
"loc": {
"start": {
"line": 27,
"column": 25
},
"end": {
"line": 27,
"column": 31
}
},
"name": "window"
},
"property": {
"type": "Identifier",
"start": 595,
"end": 597,
"loc": {
"start": {
"line": 27,
"column": 32
},
"end": {
"line": 27,
"column": 34
}
},
"name": "lp"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 598,
"end": 603,
"loc": {
"start": {
"line": 27,
"column": 35
},
"end": {
"line": 27,
"column": 40
}
},
"name": "place"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 604,
"end": 611,
"loc": {
"start": {
"line": 27,
"column": 41
},
"end": {
"line": 27,
"column": 48
}
},
"name": "atlasId"
},
"computed": false
}
],
"quasis": [
{
"type": "TemplateElement",
"start": 577,
"end": 586,
"loc": {
"start": {
"line": 27,
"column": 14
},
"end": {
"line": 27,
"column": 23
}
},
"value": {
"raw": "atlas_id:",
"cooked": "atlas_id:"
},
"tail": false
},
{
"type": "TemplateElement",
"start": 612,
"end": 612,
"loc": {
"start": {
"line": 27,
"column": 49
},
"end": {
"line": 27,
"column": 49
}
},
"value": {
"raw": "",
"cooked": ""
},
"tail": true
}
]
},
"kind": "init"
}
]
}
]
}
},
{
"type": "ExpressionStatement",
"start": 631,
"end": 661,
"loc": {
"start": {
"line": 30,
"column": 6
},
"end": {
"line": 30,
"column": 36
}
},
"expression": {
"type": "AssignmentExpression",
"start": 631,
"end": 660,
"loc": {
"start": {
"line": 30,
"column": 6
},
"end": {
"line": 30,
"column": 35
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 631,
"end": 650,
"loc": {
"start": {
"line": 30,
"column": 6
},
"end": {
"line": 30,
"column": 25
}
},
"object": {
"type": "ThisExpression",
"start": 631,
"end": 635,
"loc": {
"start": {
"line": 30,
"column": 6
},
"end": {
"line": 30,
"column": 10
}
}
},
"property": {
"type": "Identifier",
"start": 636,
"end": 650,
"loc": {
"start": {
"line": 30,
"column": 11
},
"end": {
"line": 30,
"column": 25
}
},
"name": "searchResolver"
},
"computed": false
},
"right": {
"type": "Identifier",
"start": 653,
"end": 660,
"loc": {
"start": {
"line": 30,
"column": 28
},
"end": {
"line": 30,
"column": 35
}
},
"name": "resolve"
}
}
}
]
}
}
]
}
}
],
"trailingComments": null
},
"trailingComments": null
},
"leadingComments": [
{
"type": "Block",
"value": "*\n * Search for a video by it's Atlas ID\n * @returns {Promise}\n ",
"start": 415,
"end": 489,
"loc": {
"start": {
"line": 20,
"column": 2
},
"end": {
"line": 23,
"column": 5
}