diff --git a/.gitignore b/.gitignore
index cd72d17..9daa824 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,2 @@
.DS_Store
node_modules
-docs
diff --git a/README.md b/README.md
index b15d2b1..b804426 100644
--- a/README.md
+++ b/README.md
@@ -64,6 +64,15 @@ category.products[0] === product; // true
```
+## Documentation
+
+Documentation is available in the `docs` directory. It can be re-generated with
+[esdoc](https://esdoc.org/):
+
+```
+esdoc -c esdoc.json
+```
+
## Tests
You can run tests once-off with NPM:
@@ -78,12 +87,9 @@ Alternatively, you can run tests in watch mode using [nodemon](http://nodemon.io
nodemon node_modules/jasmine/bin/jasmine.js
```
-## Documentation
-Documentation can be generated with [esdoc](https://esdoc.org/):
```
-esdoc -c esdoc.json
```
## Roadmap
diff --git a/docs/ast/source/src/store.js.json b/docs/ast/source/src/store.js.json
new file mode 100644
index 0000000..37b6250
--- /dev/null
+++ b/docs/ast/source/src/store.js.json
@@ -0,0 +1,23965 @@
+{
+ "type": "Program",
+ "body": [
+ {
+ "type": "ExportDefaultDeclaration",
+ "declaration": {
+ "type": "ClassDeclaration",
+ "id": {
+ "type": "Identifier",
+ "name": "Store",
+ "range": [
+ 21,
+ 26
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 21
+ },
+ "end": {
+ "line": 1,
+ "column": 26
+ }
+ }
+ },
+ "superClass": null,
+ "body": {
+ "type": "ClassBody",
+ "body": [
+ {
+ "type": "MethodDefinition",
+ "key": {
+ "type": "Identifier",
+ "name": "attr",
+ "range": [
+ 346,
+ 350
+ ],
+ "loc": {
+ "start": {
+ "line": 11,
+ "column": 9
+ },
+ "end": {
+ "line": 11,
+ "column": 13
+ }
+ }
+ },
+ "value": {
+ "type": "FunctionExpression",
+ "id": null,
+ "params": [
+ {
+ "type": "Identifier",
+ "name": "name",
+ "range": [
+ 351,
+ 355
+ ],
+ "loc": {
+ "start": {
+ "line": 11,
+ "column": 14
+ },
+ "end": {
+ "line": 11,
+ "column": 18
+ }
+ }
+ },
+ {
+ "type": "Identifier",
+ "name": "options",
+ "range": [
+ 357,
+ 364
+ ],
+ "loc": {
+ "start": {
+ "line": 11,
+ "column": 20
+ },
+ "end": {
+ "line": 11,
+ "column": 27
+ }
+ }
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "IfStatement",
+ "test": {
+ "type": "LogicalExpression",
+ "operator": "&&",
+ "left": {
+ "type": "Identifier",
+ "name": "name",
+ "range": [
+ 376,
+ 380
+ ],
+ "loc": {
+ "start": {
+ "line": 12,
+ "column": 8
+ },
+ "end": {
+ "line": 12,
+ "column": 12
+ }
+ }
+ },
+ "right": {
+ "type": "BinaryExpression",
+ "operator": "===",
+ "left": {
+ "type": "UnaryExpression",
+ "operator": "typeof",
+ "argument": {
+ "type": "Identifier",
+ "name": "name",
+ "range": [
+ 391,
+ 395
+ ],
+ "loc": {
+ "start": {
+ "line": 12,
+ "column": 23
+ },
+ "end": {
+ "line": 12,
+ "column": 27
+ }
+ }
+ },
+ "prefix": true,
+ "range": [
+ 384,
+ 395
+ ],
+ "loc": {
+ "start": {
+ "line": 12,
+ "column": 16
+ },
+ "end": {
+ "line": 12,
+ "column": 27
+ }
+ }
+ },
+ "right": {
+ "type": "Literal",
+ "value": "object",
+ "raw": "'object'",
+ "range": [
+ 400,
+ 408
+ ],
+ "loc": {
+ "start": {
+ "line": 12,
+ "column": 32
+ },
+ "end": {
+ "line": 12,
+ "column": 40
+ }
+ }
+ },
+ "range": [
+ 384,
+ 408
+ ],
+ "loc": {
+ "start": {
+ "line": 12,
+ "column": 16
+ },
+ "end": {
+ "line": 12,
+ "column": 40
+ }
+ }
+ },
+ "range": [
+ 376,
+ 408
+ ],
+ "loc": {
+ "start": {
+ "line": 12,
+ "column": 8
+ },
+ "end": {
+ "line": 12,
+ "column": 40
+ }
+ }
+ },
+ "consequent": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "ReturnStatement",
+ "argument": {
+ "type": "CallExpression",
+ "callee": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "Store",
+ "range": [
+ 425,
+ 430
+ ],
+ "loc": {
+ "start": {
+ "line": 13,
+ "column": 13
+ },
+ "end": {
+ "line": 13,
+ "column": 18
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "attr",
+ "range": [
+ 431,
+ 435
+ ],
+ "loc": {
+ "start": {
+ "line": 13,
+ "column": 19
+ },
+ "end": {
+ "line": 13,
+ "column": 23
+ }
+ }
+ },
+ "range": [
+ 425,
+ 435
+ ],
+ "loc": {
+ "start": {
+ "line": 13,
+ "column": 13
+ },
+ "end": {
+ "line": 13,
+ "column": 23
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "Literal",
+ "value": null,
+ "raw": "null",
+ "range": [
+ 436,
+ 440
+ ],
+ "loc": {
+ "start": {
+ "line": 13,
+ "column": 24
+ },
+ "end": {
+ "line": 13,
+ "column": 28
+ }
+ }
+ },
+ {
+ "type": "Identifier",
+ "name": "name",
+ "range": [
+ 442,
+ 446
+ ],
+ "loc": {
+ "start": {
+ "line": 13,
+ "column": 30
+ },
+ "end": {
+ "line": 13,
+ "column": 34
+ }
+ }
+ }
+ ],
+ "range": [
+ 425,
+ 447
+ ],
+ "loc": {
+ "start": {
+ "line": 13,
+ "column": 13
+ },
+ "end": {
+ "line": 13,
+ "column": 35
+ }
+ }
+ },
+ "range": [
+ 418,
+ 448
+ ],
+ "loc": {
+ "start": {
+ "line": 13,
+ "column": 6
+ },
+ "end": {
+ "line": 13,
+ "column": 36
+ }
+ }
+ }
+ ],
+ "range": [
+ 410,
+ 454
+ ],
+ "loc": {
+ "start": {
+ "line": 12,
+ "column": 42
+ },
+ "end": {
+ "line": 14,
+ "column": 5
+ }
+ }
+ },
+ "alternate": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "ReturnStatement",
+ "argument": {
+ "type": "ObjectExpression",
+ "properties": [
+ {
+ "type": "Property",
+ "key": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 485,
+ 489
+ ],
+ "loc": {
+ "start": {
+ "line": 16,
+ "column": 8
+ },
+ "end": {
+ "line": 16,
+ "column": 12
+ }
+ }
+ },
+ "value": {
+ "type": "Literal",
+ "value": "attr",
+ "raw": "\"attr\"",
+ "range": [
+ 491,
+ 497
+ ],
+ "loc": {
+ "start": {
+ "line": 16,
+ "column": 14
+ },
+ "end": {
+ "line": 16,
+ "column": 20
+ }
+ }
+ },
+ "kind": "init",
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "range": [
+ 485,
+ 497
+ ],
+ "loc": {
+ "start": {
+ "line": 16,
+ "column": 8
+ },
+ "end": {
+ "line": 16,
+ "column": 20
+ }
+ }
+ },
+ {
+ "type": "Property",
+ "key": {
+ "type": "Identifier",
+ "name": "default",
+ "range": [
+ 507,
+ 514
+ ],
+ "loc": {
+ "start": {
+ "line": 17,
+ "column": 8
+ },
+ "end": {
+ "line": 17,
+ "column": 15
+ }
+ }
+ },
+ "value": {
+ "type": "LogicalExpression",
+ "operator": "&&",
+ "left": {
+ "type": "Identifier",
+ "name": "options",
+ "range": [
+ 516,
+ 523
+ ],
+ "loc": {
+ "start": {
+ "line": 17,
+ "column": 17
+ },
+ "end": {
+ "line": 17,
+ "column": 24
+ }
+ }
+ },
+ "right": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "options",
+ "range": [
+ 527,
+ 534
+ ],
+ "loc": {
+ "start": {
+ "line": 17,
+ "column": 28
+ },
+ "end": {
+ "line": 17,
+ "column": 35
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "default",
+ "range": [
+ 535,
+ 542
+ ],
+ "loc": {
+ "start": {
+ "line": 17,
+ "column": 36
+ },
+ "end": {
+ "line": 17,
+ "column": 43
+ }
+ }
+ },
+ "range": [
+ 527,
+ 542
+ ],
+ "loc": {
+ "start": {
+ "line": 17,
+ "column": 28
+ },
+ "end": {
+ "line": 17,
+ "column": 43
+ }
+ }
+ },
+ "range": [
+ 516,
+ 542
+ ],
+ "loc": {
+ "start": {
+ "line": 17,
+ "column": 17
+ },
+ "end": {
+ "line": 17,
+ "column": 43
+ }
+ }
+ },
+ "kind": "init",
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "range": [
+ 507,
+ 542
+ ],
+ "loc": {
+ "start": {
+ "line": 17,
+ "column": 8
+ },
+ "end": {
+ "line": 17,
+ "column": 43
+ }
+ }
+ },
+ {
+ "type": "Property",
+ "key": {
+ "type": "Identifier",
+ "name": "deserialize",
+ "range": [
+ 552,
+ 563
+ ],
+ "loc": {
+ "start": {
+ "line": 18,
+ "column": 8
+ },
+ "end": {
+ "line": 18,
+ "column": 19
+ }
+ }
+ },
+ "value": {
+ "type": "FunctionExpression",
+ "id": null,
+ "params": [
+ {
+ "type": "Identifier",
+ "name": "data",
+ "range": [
+ 575,
+ 579
+ ],
+ "loc": {
+ "start": {
+ "line": 18,
+ "column": 31
+ },
+ "end": {
+ "line": 18,
+ "column": 35
+ }
+ }
+ },
+ {
+ "type": "Identifier",
+ "name": "key",
+ "range": [
+ 581,
+ 584
+ ],
+ "loc": {
+ "start": {
+ "line": 18,
+ "column": 37
+ },
+ "end": {
+ "line": 18,
+ "column": 40
+ }
+ }
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "ReturnStatement",
+ "argument": {
+ "type": "LogicalExpression",
+ "operator": "&&",
+ "left": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "data",
+ "range": [
+ 605,
+ 609
+ ],
+ "loc": {
+ "start": {
+ "line": 19,
+ "column": 17
+ },
+ "end": {
+ "line": 19,
+ "column": 21
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "attributes",
+ "range": [
+ 610,
+ 620
+ ],
+ "loc": {
+ "start": {
+ "line": 19,
+ "column": 22
+ },
+ "end": {
+ "line": 19,
+ "column": 32
+ }
+ }
+ },
+ "range": [
+ 605,
+ 620
+ ],
+ "loc": {
+ "start": {
+ "line": 19,
+ "column": 17
+ },
+ "end": {
+ "line": 19,
+ "column": 32
+ }
+ }
+ },
+ "right": {
+ "type": "MemberExpression",
+ "computed": true,
+ "object": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "data",
+ "range": [
+ 624,
+ 628
+ ],
+ "loc": {
+ "start": {
+ "line": 19,
+ "column": 36
+ },
+ "end": {
+ "line": 19,
+ "column": 40
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "attributes",
+ "range": [
+ 629,
+ 639
+ ],
+ "loc": {
+ "start": {
+ "line": 19,
+ "column": 41
+ },
+ "end": {
+ "line": 19,
+ "column": 51
+ }
+ }
+ },
+ "range": [
+ 624,
+ 639
+ ],
+ "loc": {
+ "start": {
+ "line": 19,
+ "column": 36
+ },
+ "end": {
+ "line": 19,
+ "column": 51
+ }
+ }
+ },
+ "property": {
+ "type": "LogicalExpression",
+ "operator": "||",
+ "left": {
+ "type": "Identifier",
+ "name": "name",
+ "range": [
+ 640,
+ 644
+ ],
+ "loc": {
+ "start": {
+ "line": 19,
+ "column": 52
+ },
+ "end": {
+ "line": 19,
+ "column": 56
+ }
+ }
+ },
+ "right": {
+ "type": "Identifier",
+ "name": "key",
+ "range": [
+ 648,
+ 651
+ ],
+ "loc": {
+ "start": {
+ "line": 19,
+ "column": 60
+ },
+ "end": {
+ "line": 19,
+ "column": 63
+ }
+ }
+ },
+ "range": [
+ 640,
+ 651
+ ],
+ "loc": {
+ "start": {
+ "line": 19,
+ "column": 52
+ },
+ "end": {
+ "line": 19,
+ "column": 63
+ }
+ }
+ },
+ "range": [
+ 624,
+ 652
+ ],
+ "loc": {
+ "start": {
+ "line": 19,
+ "column": 36
+ },
+ "end": {
+ "line": 19,
+ "column": 64
+ }
+ }
+ },
+ "range": [
+ 605,
+ 652
+ ],
+ "loc": {
+ "start": {
+ "line": 19,
+ "column": 17
+ },
+ "end": {
+ "line": 19,
+ "column": 64
+ }
+ }
+ },
+ "range": [
+ 598,
+ 653
+ ],
+ "loc": {
+ "start": {
+ "line": 19,
+ "column": 10
+ },
+ "end": {
+ "line": 19,
+ "column": 65
+ }
+ }
+ }
+ ],
+ "range": [
+ 586,
+ 663
+ ],
+ "loc": {
+ "start": {
+ "line": 18,
+ "column": 42
+ },
+ "end": {
+ "line": 20,
+ "column": 9
+ }
+ }
+ },
+ "generator": false,
+ "expression": false,
+ "range": [
+ 565,
+ 663
+ ],
+ "loc": {
+ "start": {
+ "line": 18,
+ "column": 21
+ },
+ "end": {
+ "line": 20,
+ "column": 9
+ }
+ }
+ },
+ "kind": "init",
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "range": [
+ 552,
+ 663
+ ],
+ "loc": {
+ "start": {
+ "line": 18,
+ "column": 8
+ },
+ "end": {
+ "line": 20,
+ "column": 9
+ }
+ }
+ }
+ ],
+ "range": [
+ 475,
+ 671
+ ],
+ "loc": {
+ "start": {
+ "line": 15,
+ "column": 13
+ },
+ "end": {
+ "line": 21,
+ "column": 7
+ }
+ }
+ },
+ "range": [
+ 468,
+ 672
+ ],
+ "loc": {
+ "start": {
+ "line": 15,
+ "column": 6
+ },
+ "end": {
+ "line": 21,
+ "column": 8
+ }
+ }
+ }
+ ],
+ "range": [
+ 460,
+ 678
+ ],
+ "loc": {
+ "start": {
+ "line": 14,
+ "column": 11
+ },
+ "end": {
+ "line": 22,
+ "column": 5
+ }
+ }
+ },
+ "range": [
+ 372,
+ 678
+ ],
+ "loc": {
+ "start": {
+ "line": 12,
+ "column": 4
+ },
+ "end": {
+ "line": 22,
+ "column": 5
+ }
+ }
+ }
+ ],
+ "range": [
+ 366,
+ 682
+ ],
+ "loc": {
+ "start": {
+ "line": 11,
+ "column": 29
+ },
+ "end": {
+ "line": 23,
+ "column": 3
+ }
+ }
+ },
+ "generator": false,
+ "expression": false,
+ "range": [
+ 350,
+ 682
+ ],
+ "loc": {
+ "start": {
+ "line": 11,
+ "column": 13
+ },
+ "end": {
+ "line": 23,
+ "column": 3
+ }
+ }
+ },
+ "kind": "method",
+ "computed": false,
+ "range": [
+ 339,
+ 682
+ ],
+ "loc": {
+ "start": {
+ "line": 11,
+ "column": 2
+ },
+ "end": {
+ "line": 23,
+ "column": 3
+ }
+ },
+ "leadingComments": [
+ {
+ "type": "Block",
+ "value": "*\n * Creates a field definition for an attribute.\n *\n * @param {string} [name] - Name of the property to map this field from.\n * @param {Object} [options] - An options object.\n * @param {string} [options.default] - Default value for this field.\n * @return {Object} - Field definition.\n ",
+ "range": [
+ 32,
+ 336
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 2
+ },
+ "end": {
+ "line": 10,
+ "column": 5
+ }
+ }
+ }
+ ],
+ "trailingComments": [
+ {
+ "type": "Block",
+ "value": "*\n * Creates a field definition for an has-one relationship.\n *\n * @param {string} [name] - Name of the property to map this field from.\n * @param {Object} [options] - An options object.\n * @param {string} [options.inverse] - Name of the inverse relationship.\n * @return {Object} - Field definition.\n ",
+ "range": [
+ 686,
+ 1005
+ ],
+ "loc": {
+ "start": {
+ "line": 25,
+ "column": 2
+ },
+ "end": {
+ "line": 32,
+ "column": 5
+ }
+ }
+ }
+ ],
+ "static": true
+ },
+ {
+ "type": "MethodDefinition",
+ "key": {
+ "type": "Identifier",
+ "name": "hasOne",
+ "range": [
+ 1015,
+ 1021
+ ],
+ "loc": {
+ "start": {
+ "line": 33,
+ "column": 9
+ },
+ "end": {
+ "line": 33,
+ "column": 15
+ }
+ }
+ },
+ "value": {
+ "type": "FunctionExpression",
+ "id": null,
+ "params": [
+ {
+ "type": "Identifier",
+ "name": "name",
+ "range": [
+ 1022,
+ 1026
+ ],
+ "loc": {
+ "start": {
+ "line": 33,
+ "column": 16
+ },
+ "end": {
+ "line": 33,
+ "column": 20
+ }
+ }
+ },
+ {
+ "type": "Identifier",
+ "name": "options",
+ "range": [
+ 1028,
+ 1035
+ ],
+ "loc": {
+ "start": {
+ "line": 33,
+ "column": 22
+ },
+ "end": {
+ "line": 33,
+ "column": 29
+ }
+ }
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "IfStatement",
+ "test": {
+ "type": "LogicalExpression",
+ "operator": "&&",
+ "left": {
+ "type": "Identifier",
+ "name": "name",
+ "range": [
+ 1047,
+ 1051
+ ],
+ "loc": {
+ "start": {
+ "line": 34,
+ "column": 8
+ },
+ "end": {
+ "line": 34,
+ "column": 12
+ }
+ }
+ },
+ "right": {
+ "type": "BinaryExpression",
+ "operator": "===",
+ "left": {
+ "type": "UnaryExpression",
+ "operator": "typeof",
+ "argument": {
+ "type": "Identifier",
+ "name": "name",
+ "range": [
+ 1062,
+ 1066
+ ],
+ "loc": {
+ "start": {
+ "line": 34,
+ "column": 23
+ },
+ "end": {
+ "line": 34,
+ "column": 27
+ }
+ }
+ },
+ "prefix": true,
+ "range": [
+ 1055,
+ 1066
+ ],
+ "loc": {
+ "start": {
+ "line": 34,
+ "column": 16
+ },
+ "end": {
+ "line": 34,
+ "column": 27
+ }
+ }
+ },
+ "right": {
+ "type": "Literal",
+ "value": "object",
+ "raw": "'object'",
+ "range": [
+ 1071,
+ 1079
+ ],
+ "loc": {
+ "start": {
+ "line": 34,
+ "column": 32
+ },
+ "end": {
+ "line": 34,
+ "column": 40
+ }
+ }
+ },
+ "range": [
+ 1055,
+ 1079
+ ],
+ "loc": {
+ "start": {
+ "line": 34,
+ "column": 16
+ },
+ "end": {
+ "line": 34,
+ "column": 40
+ }
+ }
+ },
+ "range": [
+ 1047,
+ 1079
+ ],
+ "loc": {
+ "start": {
+ "line": 34,
+ "column": 8
+ },
+ "end": {
+ "line": 34,
+ "column": 40
+ }
+ }
+ },
+ "consequent": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "ReturnStatement",
+ "argument": {
+ "type": "CallExpression",
+ "callee": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "Store",
+ "range": [
+ 1096,
+ 1101
+ ],
+ "loc": {
+ "start": {
+ "line": 35,
+ "column": 13
+ },
+ "end": {
+ "line": 35,
+ "column": 18
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "hasOne",
+ "range": [
+ 1102,
+ 1108
+ ],
+ "loc": {
+ "start": {
+ "line": 35,
+ "column": 19
+ },
+ "end": {
+ "line": 35,
+ "column": 25
+ }
+ }
+ },
+ "range": [
+ 1096,
+ 1108
+ ],
+ "loc": {
+ "start": {
+ "line": 35,
+ "column": 13
+ },
+ "end": {
+ "line": 35,
+ "column": 25
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "Literal",
+ "value": null,
+ "raw": "null",
+ "range": [
+ 1109,
+ 1113
+ ],
+ "loc": {
+ "start": {
+ "line": 35,
+ "column": 26
+ },
+ "end": {
+ "line": 35,
+ "column": 30
+ }
+ }
+ },
+ {
+ "type": "Identifier",
+ "name": "name",
+ "range": [
+ 1115,
+ 1119
+ ],
+ "loc": {
+ "start": {
+ "line": 35,
+ "column": 32
+ },
+ "end": {
+ "line": 35,
+ "column": 36
+ }
+ }
+ }
+ ],
+ "range": [
+ 1096,
+ 1120
+ ],
+ "loc": {
+ "start": {
+ "line": 35,
+ "column": 13
+ },
+ "end": {
+ "line": 35,
+ "column": 37
+ }
+ }
+ },
+ "range": [
+ 1089,
+ 1121
+ ],
+ "loc": {
+ "start": {
+ "line": 35,
+ "column": 6
+ },
+ "end": {
+ "line": 35,
+ "column": 38
+ }
+ }
+ }
+ ],
+ "range": [
+ 1081,
+ 1127
+ ],
+ "loc": {
+ "start": {
+ "line": 34,
+ "column": 42
+ },
+ "end": {
+ "line": 36,
+ "column": 5
+ }
+ }
+ },
+ "alternate": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "ReturnStatement",
+ "argument": {
+ "type": "ObjectExpression",
+ "properties": [
+ {
+ "type": "Property",
+ "key": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 1158,
+ 1162
+ ],
+ "loc": {
+ "start": {
+ "line": 38,
+ "column": 8
+ },
+ "end": {
+ "line": 38,
+ "column": 12
+ }
+ }
+ },
+ "value": {
+ "type": "Literal",
+ "value": "has-one",
+ "raw": "\"has-one\"",
+ "range": [
+ 1164,
+ 1173
+ ],
+ "loc": {
+ "start": {
+ "line": 38,
+ "column": 14
+ },
+ "end": {
+ "line": 38,
+ "column": 23
+ }
+ }
+ },
+ "kind": "init",
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "range": [
+ 1158,
+ 1173
+ ],
+ "loc": {
+ "start": {
+ "line": 38,
+ "column": 8
+ },
+ "end": {
+ "line": 38,
+ "column": 23
+ }
+ }
+ },
+ {
+ "type": "Property",
+ "key": {
+ "type": "Identifier",
+ "name": "inverse",
+ "range": [
+ 1183,
+ 1190
+ ],
+ "loc": {
+ "start": {
+ "line": 39,
+ "column": 8
+ },
+ "end": {
+ "line": 39,
+ "column": 15
+ }
+ }
+ },
+ "value": {
+ "type": "LogicalExpression",
+ "operator": "&&",
+ "left": {
+ "type": "Identifier",
+ "name": "options",
+ "range": [
+ 1192,
+ 1199
+ ],
+ "loc": {
+ "start": {
+ "line": 39,
+ "column": 17
+ },
+ "end": {
+ "line": 39,
+ "column": 24
+ }
+ }
+ },
+ "right": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "options",
+ "range": [
+ 1203,
+ 1210
+ ],
+ "loc": {
+ "start": {
+ "line": 39,
+ "column": 28
+ },
+ "end": {
+ "line": 39,
+ "column": 35
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "inverse",
+ "range": [
+ 1211,
+ 1218
+ ],
+ "loc": {
+ "start": {
+ "line": 39,
+ "column": 36
+ },
+ "end": {
+ "line": 39,
+ "column": 43
+ }
+ }
+ },
+ "range": [
+ 1203,
+ 1218
+ ],
+ "loc": {
+ "start": {
+ "line": 39,
+ "column": 28
+ },
+ "end": {
+ "line": 39,
+ "column": 43
+ }
+ }
+ },
+ "range": [
+ 1192,
+ 1218
+ ],
+ "loc": {
+ "start": {
+ "line": 39,
+ "column": 17
+ },
+ "end": {
+ "line": 39,
+ "column": 43
+ }
+ }
+ },
+ "kind": "init",
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "range": [
+ 1183,
+ 1218
+ ],
+ "loc": {
+ "start": {
+ "line": 39,
+ "column": 8
+ },
+ "end": {
+ "line": 39,
+ "column": 43
+ }
+ }
+ },
+ {
+ "type": "Property",
+ "key": {
+ "type": "Identifier",
+ "name": "deserialize",
+ "range": [
+ 1228,
+ 1239
+ ],
+ "loc": {
+ "start": {
+ "line": 40,
+ "column": 8
+ },
+ "end": {
+ "line": 40,
+ "column": 19
+ }
+ }
+ },
+ "value": {
+ "type": "FunctionExpression",
+ "id": null,
+ "params": [
+ {
+ "type": "Identifier",
+ "name": "data",
+ "range": [
+ 1251,
+ 1255
+ ],
+ "loc": {
+ "start": {
+ "line": 40,
+ "column": 31
+ },
+ "end": {
+ "line": 40,
+ "column": 35
+ }
+ }
+ },
+ {
+ "type": "Identifier",
+ "name": "key",
+ "range": [
+ 1257,
+ 1260
+ ],
+ "loc": {
+ "start": {
+ "line": 40,
+ "column": 37
+ },
+ "end": {
+ "line": 40,
+ "column": 40
+ }
+ }
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "expression": {
+ "type": "AssignmentExpression",
+ "operator": "=",
+ "left": {
+ "type": "Identifier",
+ "name": "name",
+ "range": [
+ 1274,
+ 1278
+ ],
+ "loc": {
+ "start": {
+ "line": 41,
+ "column": 10
+ },
+ "end": {
+ "line": 41,
+ "column": 14
+ }
+ }
+ },
+ "right": {
+ "type": "LogicalExpression",
+ "operator": "||",
+ "left": {
+ "type": "Identifier",
+ "name": "name",
+ "range": [
+ 1281,
+ 1285
+ ],
+ "loc": {
+ "start": {
+ "line": 41,
+ "column": 17
+ },
+ "end": {
+ "line": 41,
+ "column": 21
+ }
+ }
+ },
+ "right": {
+ "type": "Identifier",
+ "name": "key",
+ "range": [
+ 1289,
+ 1292
+ ],
+ "loc": {
+ "start": {
+ "line": 41,
+ "column": 25
+ },
+ "end": {
+ "line": 41,
+ "column": 28
+ }
+ }
+ },
+ "range": [
+ 1281,
+ 1292
+ ],
+ "loc": {
+ "start": {
+ "line": 41,
+ "column": 17
+ },
+ "end": {
+ "line": 41,
+ "column": 28
+ }
+ }
+ },
+ "range": [
+ 1274,
+ 1292
+ ],
+ "loc": {
+ "start": {
+ "line": 41,
+ "column": 10
+ },
+ "end": {
+ "line": 41,
+ "column": 28
+ }
+ }
+ },
+ "range": [
+ 1274,
+ 1293
+ ],
+ "loc": {
+ "start": {
+ "line": 41,
+ "column": 10
+ },
+ "end": {
+ "line": 41,
+ "column": 29
+ }
+ }
+ },
+ {
+ "type": "IfStatement",
+ "test": {
+ "type": "LogicalExpression",
+ "operator": "&&",
+ "left": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "data",
+ "range": [
+ 1308,
+ 1312
+ ],
+ "loc": {
+ "start": {
+ "line": 42,
+ "column": 14
+ },
+ "end": {
+ "line": 42,
+ "column": 18
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "relationships",
+ "range": [
+ 1313,
+ 1326
+ ],
+ "loc": {
+ "start": {
+ "line": 42,
+ "column": 19
+ },
+ "end": {
+ "line": 42,
+ "column": 32
+ }
+ }
+ },
+ "range": [
+ 1308,
+ 1326
+ ],
+ "loc": {
+ "start": {
+ "line": 42,
+ "column": 14
+ },
+ "end": {
+ "line": 42,
+ "column": 32
+ }
+ }
+ },
+ "right": {
+ "type": "MemberExpression",
+ "computed": true,
+ "object": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "data",
+ "range": [
+ 1330,
+ 1334
+ ],
+ "loc": {
+ "start": {
+ "line": 42,
+ "column": 36
+ },
+ "end": {
+ "line": 42,
+ "column": 40
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "relationships",
+ "range": [
+ 1335,
+ 1348
+ ],
+ "loc": {
+ "start": {
+ "line": 42,
+ "column": 41
+ },
+ "end": {
+ "line": 42,
+ "column": 54
+ }
+ }
+ },
+ "range": [
+ 1330,
+ 1348
+ ],
+ "loc": {
+ "start": {
+ "line": 42,
+ "column": 36
+ },
+ "end": {
+ "line": 42,
+ "column": 54
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "name",
+ "range": [
+ 1349,
+ 1353
+ ],
+ "loc": {
+ "start": {
+ "line": 42,
+ "column": 55
+ },
+ "end": {
+ "line": 42,
+ "column": 59
+ }
+ }
+ },
+ "range": [
+ 1330,
+ 1354
+ ],
+ "loc": {
+ "start": {
+ "line": 42,
+ "column": 36
+ },
+ "end": {
+ "line": 42,
+ "column": 60
+ }
+ }
+ },
+ "range": [
+ 1308,
+ 1354
+ ],
+ "loc": {
+ "start": {
+ "line": 42,
+ "column": 14
+ },
+ "end": {
+ "line": 42,
+ "column": 60
+ }
+ }
+ },
+ "consequent": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "IfStatement",
+ "test": {
+ "type": "BinaryExpression",
+ "operator": "===",
+ "left": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "MemberExpression",
+ "computed": true,
+ "object": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "data",
+ "range": [
+ 1374,
+ 1378
+ ],
+ "loc": {
+ "start": {
+ "line": 43,
+ "column": 16
+ },
+ "end": {
+ "line": 43,
+ "column": 20
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "relationships",
+ "range": [
+ 1379,
+ 1392
+ ],
+ "loc": {
+ "start": {
+ "line": 43,
+ "column": 21
+ },
+ "end": {
+ "line": 43,
+ "column": 34
+ }
+ }
+ },
+ "range": [
+ 1374,
+ 1392
+ ],
+ "loc": {
+ "start": {
+ "line": 43,
+ "column": 16
+ },
+ "end": {
+ "line": 43,
+ "column": 34
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "name",
+ "range": [
+ 1393,
+ 1397
+ ],
+ "loc": {
+ "start": {
+ "line": 43,
+ "column": 35
+ },
+ "end": {
+ "line": 43,
+ "column": 39
+ }
+ }
+ },
+ "range": [
+ 1374,
+ 1398
+ ],
+ "loc": {
+ "start": {
+ "line": 43,
+ "column": 16
+ },
+ "end": {
+ "line": 43,
+ "column": 40
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "data",
+ "range": [
+ 1399,
+ 1403
+ ],
+ "loc": {
+ "start": {
+ "line": 43,
+ "column": 41
+ },
+ "end": {
+ "line": 43,
+ "column": 45
+ }
+ }
+ },
+ "range": [
+ 1374,
+ 1403
+ ],
+ "loc": {
+ "start": {
+ "line": 43,
+ "column": 16
+ },
+ "end": {
+ "line": 43,
+ "column": 45
+ }
+ }
+ },
+ "right": {
+ "type": "Literal",
+ "value": null,
+ "raw": "null",
+ "range": [
+ 1408,
+ 1412
+ ],
+ "loc": {
+ "start": {
+ "line": 43,
+ "column": 50
+ },
+ "end": {
+ "line": 43,
+ "column": 54
+ }
+ }
+ },
+ "range": [
+ 1374,
+ 1412
+ ],
+ "loc": {
+ "start": {
+ "line": 43,
+ "column": 16
+ },
+ "end": {
+ "line": 43,
+ "column": 54
+ }
+ }
+ },
+ "consequent": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "ReturnStatement",
+ "argument": {
+ "type": "Literal",
+ "value": null,
+ "raw": "null",
+ "range": [
+ 1437,
+ 1441
+ ],
+ "loc": {
+ "start": {
+ "line": 44,
+ "column": 21
+ },
+ "end": {
+ "line": 44,
+ "column": 25
+ }
+ }
+ },
+ "range": [
+ 1430,
+ 1442
+ ],
+ "loc": {
+ "start": {
+ "line": 44,
+ "column": 14
+ },
+ "end": {
+ "line": 44,
+ "column": 26
+ }
+ }
+ }
+ ],
+ "range": [
+ 1414,
+ 1456
+ ],
+ "loc": {
+ "start": {
+ "line": 43,
+ "column": 56
+ },
+ "end": {
+ "line": 45,
+ "column": 13
+ }
+ }
+ },
+ "alternate": {
+ "type": "IfStatement",
+ "test": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "MemberExpression",
+ "computed": true,
+ "object": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "data",
+ "range": [
+ 1466,
+ 1470
+ ],
+ "loc": {
+ "start": {
+ "line": 45,
+ "column": 23
+ },
+ "end": {
+ "line": 45,
+ "column": 27
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "relationships",
+ "range": [
+ 1471,
+ 1484
+ ],
+ "loc": {
+ "start": {
+ "line": 45,
+ "column": 28
+ },
+ "end": {
+ "line": 45,
+ "column": 41
+ }
+ }
+ },
+ "range": [
+ 1466,
+ 1484
+ ],
+ "loc": {
+ "start": {
+ "line": 45,
+ "column": 23
+ },
+ "end": {
+ "line": 45,
+ "column": 41
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "name",
+ "range": [
+ 1485,
+ 1489
+ ],
+ "loc": {
+ "start": {
+ "line": 45,
+ "column": 42
+ },
+ "end": {
+ "line": 45,
+ "column": 46
+ }
+ }
+ },
+ "range": [
+ 1466,
+ 1490
+ ],
+ "loc": {
+ "start": {
+ "line": 45,
+ "column": 23
+ },
+ "end": {
+ "line": 45,
+ "column": 47
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "data",
+ "range": [
+ 1491,
+ 1495
+ ],
+ "loc": {
+ "start": {
+ "line": 45,
+ "column": 48
+ },
+ "end": {
+ "line": 45,
+ "column": 52
+ }
+ }
+ },
+ "range": [
+ 1466,
+ 1495
+ ],
+ "loc": {
+ "start": {
+ "line": 45,
+ "column": 23
+ },
+ "end": {
+ "line": 45,
+ "column": 52
+ }
+ }
+ },
+ "consequent": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "ReturnStatement",
+ "argument": {
+ "type": "CallExpression",
+ "callee": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "ThisExpression",
+ "range": [
+ 1520,
+ 1524
+ ],
+ "loc": {
+ "start": {
+ "line": 46,
+ "column": 21
+ },
+ "end": {
+ "line": 46,
+ "column": 25
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "find",
+ "range": [
+ 1525,
+ 1529
+ ],
+ "loc": {
+ "start": {
+ "line": 46,
+ "column": 26
+ },
+ "end": {
+ "line": 46,
+ "column": 30
+ }
+ }
+ },
+ "range": [
+ 1520,
+ 1529
+ ],
+ "loc": {
+ "start": {
+ "line": 46,
+ "column": 21
+ },
+ "end": {
+ "line": 46,
+ "column": 30
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "MemberExpression",
+ "computed": true,
+ "object": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "data",
+ "range": [
+ 1530,
+ 1534
+ ],
+ "loc": {
+ "start": {
+ "line": 46,
+ "column": 31
+ },
+ "end": {
+ "line": 46,
+ "column": 35
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "relationships",
+ "range": [
+ 1535,
+ 1548
+ ],
+ "loc": {
+ "start": {
+ "line": 46,
+ "column": 36
+ },
+ "end": {
+ "line": 46,
+ "column": 49
+ }
+ }
+ },
+ "range": [
+ 1530,
+ 1548
+ ],
+ "loc": {
+ "start": {
+ "line": 46,
+ "column": 31
+ },
+ "end": {
+ "line": 46,
+ "column": 49
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "name",
+ "range": [
+ 1549,
+ 1553
+ ],
+ "loc": {
+ "start": {
+ "line": 46,
+ "column": 50
+ },
+ "end": {
+ "line": 46,
+ "column": 54
+ }
+ }
+ },
+ "range": [
+ 1530,
+ 1554
+ ],
+ "loc": {
+ "start": {
+ "line": 46,
+ "column": 31
+ },
+ "end": {
+ "line": 46,
+ "column": 55
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "data",
+ "range": [
+ 1555,
+ 1559
+ ],
+ "loc": {
+ "start": {
+ "line": 46,
+ "column": 56
+ },
+ "end": {
+ "line": 46,
+ "column": 60
+ }
+ }
+ },
+ "range": [
+ 1530,
+ 1559
+ ],
+ "loc": {
+ "start": {
+ "line": 46,
+ "column": 31
+ },
+ "end": {
+ "line": 46,
+ "column": 60
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 1560,
+ 1564
+ ],
+ "loc": {
+ "start": {
+ "line": 46,
+ "column": 61
+ },
+ "end": {
+ "line": 46,
+ "column": 65
+ }
+ }
+ },
+ "range": [
+ 1530,
+ 1564
+ ],
+ "loc": {
+ "start": {
+ "line": 46,
+ "column": 31
+ },
+ "end": {
+ "line": 46,
+ "column": 65
+ }
+ }
+ },
+ {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "MemberExpression",
+ "computed": true,
+ "object": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "data",
+ "range": [
+ 1566,
+ 1570
+ ],
+ "loc": {
+ "start": {
+ "line": 46,
+ "column": 67
+ },
+ "end": {
+ "line": 46,
+ "column": 71
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "relationships",
+ "range": [
+ 1571,
+ 1584
+ ],
+ "loc": {
+ "start": {
+ "line": 46,
+ "column": 72
+ },
+ "end": {
+ "line": 46,
+ "column": 85
+ }
+ }
+ },
+ "range": [
+ 1566,
+ 1584
+ ],
+ "loc": {
+ "start": {
+ "line": 46,
+ "column": 67
+ },
+ "end": {
+ "line": 46,
+ "column": 85
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "name",
+ "range": [
+ 1585,
+ 1589
+ ],
+ "loc": {
+ "start": {
+ "line": 46,
+ "column": 86
+ },
+ "end": {
+ "line": 46,
+ "column": 90
+ }
+ }
+ },
+ "range": [
+ 1566,
+ 1590
+ ],
+ "loc": {
+ "start": {
+ "line": 46,
+ "column": 67
+ },
+ "end": {
+ "line": 46,
+ "column": 91
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "data",
+ "range": [
+ 1591,
+ 1595
+ ],
+ "loc": {
+ "start": {
+ "line": 46,
+ "column": 92
+ },
+ "end": {
+ "line": 46,
+ "column": 96
+ }
+ }
+ },
+ "range": [
+ 1566,
+ 1595
+ ],
+ "loc": {
+ "start": {
+ "line": 46,
+ "column": 67
+ },
+ "end": {
+ "line": 46,
+ "column": 96
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "id",
+ "range": [
+ 1596,
+ 1598
+ ],
+ "loc": {
+ "start": {
+ "line": 46,
+ "column": 97
+ },
+ "end": {
+ "line": 46,
+ "column": 99
+ }
+ }
+ },
+ "range": [
+ 1566,
+ 1598
+ ],
+ "loc": {
+ "start": {
+ "line": 46,
+ "column": 67
+ },
+ "end": {
+ "line": 46,
+ "column": 99
+ }
+ }
+ }
+ ],
+ "range": [
+ 1520,
+ 1599
+ ],
+ "loc": {
+ "start": {
+ "line": 46,
+ "column": 21
+ },
+ "end": {
+ "line": 46,
+ "column": 100
+ }
+ }
+ },
+ "range": [
+ 1513,
+ 1600
+ ],
+ "loc": {
+ "start": {
+ "line": 46,
+ "column": 14
+ },
+ "end": {
+ "line": 46,
+ "column": 101
+ }
+ }
+ }
+ ],
+ "range": [
+ 1497,
+ 1614
+ ],
+ "loc": {
+ "start": {
+ "line": 45,
+ "column": 54
+ },
+ "end": {
+ "line": 47,
+ "column": 13
+ }
+ }
+ },
+ "alternate": null,
+ "range": [
+ 1462,
+ 1614
+ ],
+ "loc": {
+ "start": {
+ "line": 45,
+ "column": 19
+ },
+ "end": {
+ "line": 47,
+ "column": 13
+ }
+ }
+ },
+ "range": [
+ 1370,
+ 1614
+ ],
+ "loc": {
+ "start": {
+ "line": 43,
+ "column": 12
+ },
+ "end": {
+ "line": 47,
+ "column": 13
+ }
+ }
+ }
+ ],
+ "range": [
+ 1356,
+ 1626
+ ],
+ "loc": {
+ "start": {
+ "line": 42,
+ "column": 62
+ },
+ "end": {
+ "line": 48,
+ "column": 11
+ }
+ }
+ },
+ "alternate": null,
+ "range": [
+ 1304,
+ 1626
+ ],
+ "loc": {
+ "start": {
+ "line": 42,
+ "column": 10
+ },
+ "end": {
+ "line": 48,
+ "column": 11
+ }
+ }
+ }
+ ],
+ "range": [
+ 1262,
+ 1636
+ ],
+ "loc": {
+ "start": {
+ "line": 40,
+ "column": 42
+ },
+ "end": {
+ "line": 49,
+ "column": 9
+ }
+ }
+ },
+ "generator": false,
+ "expression": false,
+ "range": [
+ 1241,
+ 1636
+ ],
+ "loc": {
+ "start": {
+ "line": 40,
+ "column": 21
+ },
+ "end": {
+ "line": 49,
+ "column": 9
+ }
+ }
+ },
+ "kind": "init",
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "range": [
+ 1228,
+ 1636
+ ],
+ "loc": {
+ "start": {
+ "line": 40,
+ "column": 8
+ },
+ "end": {
+ "line": 49,
+ "column": 9
+ }
+ }
+ }
+ ],
+ "range": [
+ 1148,
+ 1644
+ ],
+ "loc": {
+ "start": {
+ "line": 37,
+ "column": 13
+ },
+ "end": {
+ "line": 50,
+ "column": 7
+ }
+ }
+ },
+ "range": [
+ 1141,
+ 1645
+ ],
+ "loc": {
+ "start": {
+ "line": 37,
+ "column": 6
+ },
+ "end": {
+ "line": 50,
+ "column": 8
+ }
+ }
+ }
+ ],
+ "range": [
+ 1133,
+ 1651
+ ],
+ "loc": {
+ "start": {
+ "line": 36,
+ "column": 11
+ },
+ "end": {
+ "line": 51,
+ "column": 5
+ }
+ }
+ },
+ "range": [
+ 1043,
+ 1651
+ ],
+ "loc": {
+ "start": {
+ "line": 34,
+ "column": 4
+ },
+ "end": {
+ "line": 51,
+ "column": 5
+ }
+ }
+ }
+ ],
+ "range": [
+ 1037,
+ 1655
+ ],
+ "loc": {
+ "start": {
+ "line": 33,
+ "column": 31
+ },
+ "end": {
+ "line": 52,
+ "column": 3
+ }
+ }
+ },
+ "generator": false,
+ "expression": false,
+ "range": [
+ 1021,
+ 1655
+ ],
+ "loc": {
+ "start": {
+ "line": 33,
+ "column": 15
+ },
+ "end": {
+ "line": 52,
+ "column": 3
+ }
+ }
+ },
+ "kind": "method",
+ "computed": false,
+ "range": [
+ 1008,
+ 1655
+ ],
+ "loc": {
+ "start": {
+ "line": 33,
+ "column": 2
+ },
+ "end": {
+ "line": 52,
+ "column": 3
+ }
+ },
+ "leadingComments": [
+ {
+ "type": "Block",
+ "value": "*\n * Creates a field definition for an has-one relationship.\n *\n * @param {string} [name] - Name of the property to map this field from.\n * @param {Object} [options] - An options object.\n * @param {string} [options.inverse] - Name of the inverse relationship.\n * @return {Object} - Field definition.\n ",
+ "range": [
+ 686,
+ 1005
+ ],
+ "loc": {
+ "start": {
+ "line": 25,
+ "column": 2
+ },
+ "end": {
+ "line": 32,
+ "column": 5
+ }
+ }
+ }
+ ],
+ "trailingComments": [
+ {
+ "type": "Block",
+ "value": "*\n * Creates a field definition for an has-many relationship.\n *\n * @param {string} [name] - Name of the property to map this field from.\n * @param {Object} [options] - An options object.\n * @param {string} [options.inverse] - Name of the inverse relationship.\n * @return {Object} - Field definition.\n ",
+ "range": [
+ 1659,
+ 1979
+ ],
+ "loc": {
+ "start": {
+ "line": 54,
+ "column": 2
+ },
+ "end": {
+ "line": 61,
+ "column": 5
+ }
+ }
+ }
+ ],
+ "static": true
+ },
+ {
+ "type": "MethodDefinition",
+ "key": {
+ "type": "Identifier",
+ "name": "hasMany",
+ "range": [
+ 1989,
+ 1996
+ ],
+ "loc": {
+ "start": {
+ "line": 62,
+ "column": 9
+ },
+ "end": {
+ "line": 62,
+ "column": 16
+ }
+ }
+ },
+ "value": {
+ "type": "FunctionExpression",
+ "id": null,
+ "params": [
+ {
+ "type": "Identifier",
+ "name": "name",
+ "range": [
+ 1997,
+ 2001
+ ],
+ "loc": {
+ "start": {
+ "line": 62,
+ "column": 17
+ },
+ "end": {
+ "line": 62,
+ "column": 21
+ }
+ }
+ },
+ {
+ "type": "Identifier",
+ "name": "options",
+ "range": [
+ 2003,
+ 2010
+ ],
+ "loc": {
+ "start": {
+ "line": 62,
+ "column": 23
+ },
+ "end": {
+ "line": 62,
+ "column": 30
+ }
+ }
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "IfStatement",
+ "test": {
+ "type": "LogicalExpression",
+ "operator": "&&",
+ "left": {
+ "type": "Identifier",
+ "name": "name",
+ "range": [
+ 2022,
+ 2026
+ ],
+ "loc": {
+ "start": {
+ "line": 63,
+ "column": 8
+ },
+ "end": {
+ "line": 63,
+ "column": 12
+ }
+ }
+ },
+ "right": {
+ "type": "BinaryExpression",
+ "operator": "===",
+ "left": {
+ "type": "UnaryExpression",
+ "operator": "typeof",
+ "argument": {
+ "type": "Identifier",
+ "name": "name",
+ "range": [
+ 2037,
+ 2041
+ ],
+ "loc": {
+ "start": {
+ "line": 63,
+ "column": 23
+ },
+ "end": {
+ "line": 63,
+ "column": 27
+ }
+ }
+ },
+ "prefix": true,
+ "range": [
+ 2030,
+ 2041
+ ],
+ "loc": {
+ "start": {
+ "line": 63,
+ "column": 16
+ },
+ "end": {
+ "line": 63,
+ "column": 27
+ }
+ }
+ },
+ "right": {
+ "type": "Literal",
+ "value": "object",
+ "raw": "'object'",
+ "range": [
+ 2046,
+ 2054
+ ],
+ "loc": {
+ "start": {
+ "line": 63,
+ "column": 32
+ },
+ "end": {
+ "line": 63,
+ "column": 40
+ }
+ }
+ },
+ "range": [
+ 2030,
+ 2054
+ ],
+ "loc": {
+ "start": {
+ "line": 63,
+ "column": 16
+ },
+ "end": {
+ "line": 63,
+ "column": 40
+ }
+ }
+ },
+ "range": [
+ 2022,
+ 2054
+ ],
+ "loc": {
+ "start": {
+ "line": 63,
+ "column": 8
+ },
+ "end": {
+ "line": 63,
+ "column": 40
+ }
+ }
+ },
+ "consequent": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "ReturnStatement",
+ "argument": {
+ "type": "CallExpression",
+ "callee": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "Store",
+ "range": [
+ 2071,
+ 2076
+ ],
+ "loc": {
+ "start": {
+ "line": 64,
+ "column": 13
+ },
+ "end": {
+ "line": 64,
+ "column": 18
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "hasMany",
+ "range": [
+ 2077,
+ 2084
+ ],
+ "loc": {
+ "start": {
+ "line": 64,
+ "column": 19
+ },
+ "end": {
+ "line": 64,
+ "column": 26
+ }
+ }
+ },
+ "range": [
+ 2071,
+ 2084
+ ],
+ "loc": {
+ "start": {
+ "line": 64,
+ "column": 13
+ },
+ "end": {
+ "line": 64,
+ "column": 26
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "Literal",
+ "value": null,
+ "raw": "null",
+ "range": [
+ 2085,
+ 2089
+ ],
+ "loc": {
+ "start": {
+ "line": 64,
+ "column": 27
+ },
+ "end": {
+ "line": 64,
+ "column": 31
+ }
+ }
+ },
+ {
+ "type": "Identifier",
+ "name": "name",
+ "range": [
+ 2091,
+ 2095
+ ],
+ "loc": {
+ "start": {
+ "line": 64,
+ "column": 33
+ },
+ "end": {
+ "line": 64,
+ "column": 37
+ }
+ }
+ }
+ ],
+ "range": [
+ 2071,
+ 2096
+ ],
+ "loc": {
+ "start": {
+ "line": 64,
+ "column": 13
+ },
+ "end": {
+ "line": 64,
+ "column": 38
+ }
+ }
+ },
+ "range": [
+ 2064,
+ 2097
+ ],
+ "loc": {
+ "start": {
+ "line": 64,
+ "column": 6
+ },
+ "end": {
+ "line": 64,
+ "column": 39
+ }
+ }
+ }
+ ],
+ "range": [
+ 2056,
+ 2103
+ ],
+ "loc": {
+ "start": {
+ "line": 63,
+ "column": 42
+ },
+ "end": {
+ "line": 65,
+ "column": 5
+ }
+ }
+ },
+ "alternate": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "ReturnStatement",
+ "argument": {
+ "type": "ObjectExpression",
+ "properties": [
+ {
+ "type": "Property",
+ "key": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 2134,
+ 2138
+ ],
+ "loc": {
+ "start": {
+ "line": 67,
+ "column": 8
+ },
+ "end": {
+ "line": 67,
+ "column": 12
+ }
+ }
+ },
+ "value": {
+ "type": "Literal",
+ "value": "has-many",
+ "raw": "\"has-many\"",
+ "range": [
+ 2140,
+ 2150
+ ],
+ "loc": {
+ "start": {
+ "line": 67,
+ "column": 14
+ },
+ "end": {
+ "line": 67,
+ "column": 24
+ }
+ }
+ },
+ "kind": "init",
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "range": [
+ 2134,
+ 2150
+ ],
+ "loc": {
+ "start": {
+ "line": 67,
+ "column": 8
+ },
+ "end": {
+ "line": 67,
+ "column": 24
+ }
+ }
+ },
+ {
+ "type": "Property",
+ "key": {
+ "type": "Identifier",
+ "name": "default",
+ "range": [
+ 2160,
+ 2167
+ ],
+ "loc": {
+ "start": {
+ "line": 68,
+ "column": 8
+ },
+ "end": {
+ "line": 68,
+ "column": 15
+ }
+ }
+ },
+ "value": {
+ "type": "ArrayExpression",
+ "elements": [],
+ "range": [
+ 2169,
+ 2171
+ ],
+ "loc": {
+ "start": {
+ "line": 68,
+ "column": 17
+ },
+ "end": {
+ "line": 68,
+ "column": 19
+ }
+ }
+ },
+ "kind": "init",
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "range": [
+ 2160,
+ 2171
+ ],
+ "loc": {
+ "start": {
+ "line": 68,
+ "column": 8
+ },
+ "end": {
+ "line": 68,
+ "column": 19
+ }
+ }
+ },
+ {
+ "type": "Property",
+ "key": {
+ "type": "Identifier",
+ "name": "inverse",
+ "range": [
+ 2181,
+ 2188
+ ],
+ "loc": {
+ "start": {
+ "line": 69,
+ "column": 8
+ },
+ "end": {
+ "line": 69,
+ "column": 15
+ }
+ }
+ },
+ "value": {
+ "type": "LogicalExpression",
+ "operator": "&&",
+ "left": {
+ "type": "Identifier",
+ "name": "options",
+ "range": [
+ 2190,
+ 2197
+ ],
+ "loc": {
+ "start": {
+ "line": 69,
+ "column": 17
+ },
+ "end": {
+ "line": 69,
+ "column": 24
+ }
+ }
+ },
+ "right": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "options",
+ "range": [
+ 2201,
+ 2208
+ ],
+ "loc": {
+ "start": {
+ "line": 69,
+ "column": 28
+ },
+ "end": {
+ "line": 69,
+ "column": 35
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "inverse",
+ "range": [
+ 2209,
+ 2216
+ ],
+ "loc": {
+ "start": {
+ "line": 69,
+ "column": 36
+ },
+ "end": {
+ "line": 69,
+ "column": 43
+ }
+ }
+ },
+ "range": [
+ 2201,
+ 2216
+ ],
+ "loc": {
+ "start": {
+ "line": 69,
+ "column": 28
+ },
+ "end": {
+ "line": 69,
+ "column": 43
+ }
+ }
+ },
+ "range": [
+ 2190,
+ 2216
+ ],
+ "loc": {
+ "start": {
+ "line": 69,
+ "column": 17
+ },
+ "end": {
+ "line": 69,
+ "column": 43
+ }
+ }
+ },
+ "kind": "init",
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "range": [
+ 2181,
+ 2216
+ ],
+ "loc": {
+ "start": {
+ "line": 69,
+ "column": 8
+ },
+ "end": {
+ "line": 69,
+ "column": 43
+ }
+ }
+ },
+ {
+ "type": "Property",
+ "key": {
+ "type": "Identifier",
+ "name": "deserialize",
+ "range": [
+ 2226,
+ 2237
+ ],
+ "loc": {
+ "start": {
+ "line": 70,
+ "column": 8
+ },
+ "end": {
+ "line": 70,
+ "column": 19
+ }
+ }
+ },
+ "value": {
+ "type": "FunctionExpression",
+ "id": null,
+ "params": [
+ {
+ "type": "Identifier",
+ "name": "data",
+ "range": [
+ 2249,
+ 2253
+ ],
+ "loc": {
+ "start": {
+ "line": 70,
+ "column": 31
+ },
+ "end": {
+ "line": 70,
+ "column": 35
+ }
+ }
+ },
+ {
+ "type": "Identifier",
+ "name": "key",
+ "range": [
+ 2255,
+ 2258
+ ],
+ "loc": {
+ "start": {
+ "line": 70,
+ "column": 37
+ },
+ "end": {
+ "line": 70,
+ "column": 40
+ }
+ }
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "expression": {
+ "type": "AssignmentExpression",
+ "operator": "=",
+ "left": {
+ "type": "Identifier",
+ "name": "name",
+ "range": [
+ 2272,
+ 2276
+ ],
+ "loc": {
+ "start": {
+ "line": 71,
+ "column": 10
+ },
+ "end": {
+ "line": 71,
+ "column": 14
+ }
+ }
+ },
+ "right": {
+ "type": "LogicalExpression",
+ "operator": "||",
+ "left": {
+ "type": "Identifier",
+ "name": "name",
+ "range": [
+ 2279,
+ 2283
+ ],
+ "loc": {
+ "start": {
+ "line": 71,
+ "column": 17
+ },
+ "end": {
+ "line": 71,
+ "column": 21
+ }
+ }
+ },
+ "right": {
+ "type": "Identifier",
+ "name": "key",
+ "range": [
+ 2287,
+ 2290
+ ],
+ "loc": {
+ "start": {
+ "line": 71,
+ "column": 25
+ },
+ "end": {
+ "line": 71,
+ "column": 28
+ }
+ }
+ },
+ "range": [
+ 2279,
+ 2290
+ ],
+ "loc": {
+ "start": {
+ "line": 71,
+ "column": 17
+ },
+ "end": {
+ "line": 71,
+ "column": 28
+ }
+ }
+ },
+ "range": [
+ 2272,
+ 2290
+ ],
+ "loc": {
+ "start": {
+ "line": 71,
+ "column": 10
+ },
+ "end": {
+ "line": 71,
+ "column": 28
+ }
+ }
+ },
+ "range": [
+ 2272,
+ 2291
+ ],
+ "loc": {
+ "start": {
+ "line": 71,
+ "column": 10
+ },
+ "end": {
+ "line": 71,
+ "column": 29
+ }
+ }
+ },
+ {
+ "type": "IfStatement",
+ "test": {
+ "type": "LogicalExpression",
+ "operator": "&&",
+ "left": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "data",
+ "range": [
+ 2306,
+ 2310
+ ],
+ "loc": {
+ "start": {
+ "line": 72,
+ "column": 14
+ },
+ "end": {
+ "line": 72,
+ "column": 18
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "relationships",
+ "range": [
+ 2311,
+ 2324
+ ],
+ "loc": {
+ "start": {
+ "line": 72,
+ "column": 19
+ },
+ "end": {
+ "line": 72,
+ "column": 32
+ }
+ }
+ },
+ "range": [
+ 2306,
+ 2324
+ ],
+ "loc": {
+ "start": {
+ "line": 72,
+ "column": 14
+ },
+ "end": {
+ "line": 72,
+ "column": 32
+ }
+ }
+ },
+ "right": {
+ "type": "MemberExpression",
+ "computed": true,
+ "object": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "data",
+ "range": [
+ 2328,
+ 2332
+ ],
+ "loc": {
+ "start": {
+ "line": 72,
+ "column": 36
+ },
+ "end": {
+ "line": 72,
+ "column": 40
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "relationships",
+ "range": [
+ 2333,
+ 2346
+ ],
+ "loc": {
+ "start": {
+ "line": 72,
+ "column": 41
+ },
+ "end": {
+ "line": 72,
+ "column": 54
+ }
+ }
+ },
+ "range": [
+ 2328,
+ 2346
+ ],
+ "loc": {
+ "start": {
+ "line": 72,
+ "column": 36
+ },
+ "end": {
+ "line": 72,
+ "column": 54
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "name",
+ "range": [
+ 2347,
+ 2351
+ ],
+ "loc": {
+ "start": {
+ "line": 72,
+ "column": 55
+ },
+ "end": {
+ "line": 72,
+ "column": 59
+ }
+ }
+ },
+ "range": [
+ 2328,
+ 2352
+ ],
+ "loc": {
+ "start": {
+ "line": 72,
+ "column": 36
+ },
+ "end": {
+ "line": 72,
+ "column": 60
+ }
+ }
+ },
+ "range": [
+ 2306,
+ 2352
+ ],
+ "loc": {
+ "start": {
+ "line": 72,
+ "column": 14
+ },
+ "end": {
+ "line": 72,
+ "column": 60
+ }
+ }
+ },
+ "consequent": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "IfStatement",
+ "test": {
+ "type": "BinaryExpression",
+ "operator": "===",
+ "left": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "MemberExpression",
+ "computed": true,
+ "object": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "data",
+ "range": [
+ 2372,
+ 2376
+ ],
+ "loc": {
+ "start": {
+ "line": 73,
+ "column": 16
+ },
+ "end": {
+ "line": 73,
+ "column": 20
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "relationships",
+ "range": [
+ 2377,
+ 2390
+ ],
+ "loc": {
+ "start": {
+ "line": 73,
+ "column": 21
+ },
+ "end": {
+ "line": 73,
+ "column": 34
+ }
+ }
+ },
+ "range": [
+ 2372,
+ 2390
+ ],
+ "loc": {
+ "start": {
+ "line": 73,
+ "column": 16
+ },
+ "end": {
+ "line": 73,
+ "column": 34
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "name",
+ "range": [
+ 2391,
+ 2395
+ ],
+ "loc": {
+ "start": {
+ "line": 73,
+ "column": 35
+ },
+ "end": {
+ "line": 73,
+ "column": 39
+ }
+ }
+ },
+ "range": [
+ 2372,
+ 2396
+ ],
+ "loc": {
+ "start": {
+ "line": 73,
+ "column": 16
+ },
+ "end": {
+ "line": 73,
+ "column": 40
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "data",
+ "range": [
+ 2397,
+ 2401
+ ],
+ "loc": {
+ "start": {
+ "line": 73,
+ "column": 41
+ },
+ "end": {
+ "line": 73,
+ "column": 45
+ }
+ }
+ },
+ "range": [
+ 2372,
+ 2401
+ ],
+ "loc": {
+ "start": {
+ "line": 73,
+ "column": 16
+ },
+ "end": {
+ "line": 73,
+ "column": 45
+ }
+ }
+ },
+ "right": {
+ "type": "Literal",
+ "value": null,
+ "raw": "null",
+ "range": [
+ 2406,
+ 2410
+ ],
+ "loc": {
+ "start": {
+ "line": 73,
+ "column": 50
+ },
+ "end": {
+ "line": 73,
+ "column": 54
+ }
+ }
+ },
+ "range": [
+ 2372,
+ 2410
+ ],
+ "loc": {
+ "start": {
+ "line": 73,
+ "column": 16
+ },
+ "end": {
+ "line": 73,
+ "column": 54
+ }
+ }
+ },
+ "consequent": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "ReturnStatement",
+ "argument": {
+ "type": "ArrayExpression",
+ "elements": [],
+ "range": [
+ 2435,
+ 2437
+ ],
+ "loc": {
+ "start": {
+ "line": 74,
+ "column": 21
+ },
+ "end": {
+ "line": 74,
+ "column": 23
+ }
+ }
+ },
+ "range": [
+ 2428,
+ 2438
+ ],
+ "loc": {
+ "start": {
+ "line": 74,
+ "column": 14
+ },
+ "end": {
+ "line": 74,
+ "column": 24
+ }
+ }
+ }
+ ],
+ "range": [
+ 2412,
+ 2452
+ ],
+ "loc": {
+ "start": {
+ "line": 73,
+ "column": 56
+ },
+ "end": {
+ "line": 75,
+ "column": 13
+ }
+ }
+ },
+ "alternate": {
+ "type": "IfStatement",
+ "test": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "MemberExpression",
+ "computed": true,
+ "object": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "data",
+ "range": [
+ 2462,
+ 2466
+ ],
+ "loc": {
+ "start": {
+ "line": 75,
+ "column": 23
+ },
+ "end": {
+ "line": 75,
+ "column": 27
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "relationships",
+ "range": [
+ 2467,
+ 2480
+ ],
+ "loc": {
+ "start": {
+ "line": 75,
+ "column": 28
+ },
+ "end": {
+ "line": 75,
+ "column": 41
+ }
+ }
+ },
+ "range": [
+ 2462,
+ 2480
+ ],
+ "loc": {
+ "start": {
+ "line": 75,
+ "column": 23
+ },
+ "end": {
+ "line": 75,
+ "column": 41
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "name",
+ "range": [
+ 2481,
+ 2485
+ ],
+ "loc": {
+ "start": {
+ "line": 75,
+ "column": 42
+ },
+ "end": {
+ "line": 75,
+ "column": 46
+ }
+ }
+ },
+ "range": [
+ 2462,
+ 2486
+ ],
+ "loc": {
+ "start": {
+ "line": 75,
+ "column": 23
+ },
+ "end": {
+ "line": 75,
+ "column": 47
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "data",
+ "range": [
+ 2487,
+ 2491
+ ],
+ "loc": {
+ "start": {
+ "line": 75,
+ "column": 48
+ },
+ "end": {
+ "line": 75,
+ "column": 52
+ }
+ }
+ },
+ "range": [
+ 2462,
+ 2491
+ ],
+ "loc": {
+ "start": {
+ "line": 75,
+ "column": 23
+ },
+ "end": {
+ "line": 75,
+ "column": 52
+ }
+ }
+ },
+ "consequent": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "ReturnStatement",
+ "argument": {
+ "type": "CallExpression",
+ "callee": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "MemberExpression",
+ "computed": true,
+ "object": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "data",
+ "range": [
+ 2516,
+ 2520
+ ],
+ "loc": {
+ "start": {
+ "line": 76,
+ "column": 21
+ },
+ "end": {
+ "line": 76,
+ "column": 25
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "relationships",
+ "range": [
+ 2521,
+ 2534
+ ],
+ "loc": {
+ "start": {
+ "line": 76,
+ "column": 26
+ },
+ "end": {
+ "line": 76,
+ "column": 39
+ }
+ }
+ },
+ "range": [
+ 2516,
+ 2534
+ ],
+ "loc": {
+ "start": {
+ "line": 76,
+ "column": 21
+ },
+ "end": {
+ "line": 76,
+ "column": 39
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "name",
+ "range": [
+ 2535,
+ 2539
+ ],
+ "loc": {
+ "start": {
+ "line": 76,
+ "column": 40
+ },
+ "end": {
+ "line": 76,
+ "column": 44
+ }
+ }
+ },
+ "range": [
+ 2516,
+ 2540
+ ],
+ "loc": {
+ "start": {
+ "line": 76,
+ "column": 21
+ },
+ "end": {
+ "line": 76,
+ "column": 45
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "data",
+ "range": [
+ 2541,
+ 2545
+ ],
+ "loc": {
+ "start": {
+ "line": 76,
+ "column": 46
+ },
+ "end": {
+ "line": 76,
+ "column": 50
+ }
+ }
+ },
+ "range": [
+ 2516,
+ 2545
+ ],
+ "loc": {
+ "start": {
+ "line": 76,
+ "column": 21
+ },
+ "end": {
+ "line": 76,
+ "column": 50
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "map",
+ "range": [
+ 2546,
+ 2549
+ ],
+ "loc": {
+ "start": {
+ "line": 76,
+ "column": 51
+ },
+ "end": {
+ "line": 76,
+ "column": 54
+ }
+ }
+ },
+ "range": [
+ 2516,
+ 2549
+ ],
+ "loc": {
+ "start": {
+ "line": 76,
+ "column": 21
+ },
+ "end": {
+ "line": 76,
+ "column": 54
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "ArrowFunctionExpression",
+ "id": null,
+ "params": [
+ {
+ "type": "Identifier",
+ "name": "c",
+ "range": [
+ 2551,
+ 2552
+ ],
+ "loc": {
+ "start": {
+ "line": 76,
+ "column": 56
+ },
+ "end": {
+ "line": 76,
+ "column": 57
+ }
+ }
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "ReturnStatement",
+ "argument": {
+ "type": "CallExpression",
+ "callee": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "ThisExpression",
+ "range": [
+ 2582,
+ 2586
+ ],
+ "loc": {
+ "start": {
+ "line": 77,
+ "column": 23
+ },
+ "end": {
+ "line": 77,
+ "column": 27
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "find",
+ "range": [
+ 2587,
+ 2591
+ ],
+ "loc": {
+ "start": {
+ "line": 77,
+ "column": 28
+ },
+ "end": {
+ "line": 77,
+ "column": 32
+ }
+ }
+ },
+ "range": [
+ 2582,
+ 2591
+ ],
+ "loc": {
+ "start": {
+ "line": 77,
+ "column": 23
+ },
+ "end": {
+ "line": 77,
+ "column": 32
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "c",
+ "range": [
+ 2592,
+ 2593
+ ],
+ "loc": {
+ "start": {
+ "line": 77,
+ "column": 33
+ },
+ "end": {
+ "line": 77,
+ "column": 34
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 2594,
+ 2598
+ ],
+ "loc": {
+ "start": {
+ "line": 77,
+ "column": 35
+ },
+ "end": {
+ "line": 77,
+ "column": 39
+ }
+ }
+ },
+ "range": [
+ 2592,
+ 2598
+ ],
+ "loc": {
+ "start": {
+ "line": 77,
+ "column": 33
+ },
+ "end": {
+ "line": 77,
+ "column": 39
+ }
+ }
+ },
+ {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "c",
+ "range": [
+ 2600,
+ 2601
+ ],
+ "loc": {
+ "start": {
+ "line": 77,
+ "column": 41
+ },
+ "end": {
+ "line": 77,
+ "column": 42
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "id",
+ "range": [
+ 2602,
+ 2604
+ ],
+ "loc": {
+ "start": {
+ "line": 77,
+ "column": 43
+ },
+ "end": {
+ "line": 77,
+ "column": 45
+ }
+ }
+ },
+ "range": [
+ 2600,
+ 2604
+ ],
+ "loc": {
+ "start": {
+ "line": 77,
+ "column": 41
+ },
+ "end": {
+ "line": 77,
+ "column": 45
+ }
+ }
+ }
+ ],
+ "range": [
+ 2582,
+ 2605
+ ],
+ "loc": {
+ "start": {
+ "line": 77,
+ "column": 23
+ },
+ "end": {
+ "line": 77,
+ "column": 46
+ }
+ }
+ },
+ "range": [
+ 2575,
+ 2606
+ ],
+ "loc": {
+ "start": {
+ "line": 77,
+ "column": 16
+ },
+ "end": {
+ "line": 77,
+ "column": 47
+ }
+ }
+ }
+ ],
+ "range": [
+ 2557,
+ 2622
+ ],
+ "loc": {
+ "start": {
+ "line": 76,
+ "column": 62
+ },
+ "end": {
+ "line": 78,
+ "column": 15
+ }
+ }
+ },
+ "generator": false,
+ "expression": false,
+ "range": [
+ 2550,
+ 2622
+ ],
+ "loc": {
+ "start": {
+ "line": 76,
+ "column": 55
+ },
+ "end": {
+ "line": 78,
+ "column": 15
+ }
+ }
+ }
+ ],
+ "range": [
+ 2516,
+ 2623
+ ],
+ "loc": {
+ "start": {
+ "line": 76,
+ "column": 21
+ },
+ "end": {
+ "line": 78,
+ "column": 16
+ }
+ }
+ },
+ "range": [
+ 2509,
+ 2624
+ ],
+ "loc": {
+ "start": {
+ "line": 76,
+ "column": 14
+ },
+ "end": {
+ "line": 78,
+ "column": 17
+ }
+ }
+ }
+ ],
+ "range": [
+ 2493,
+ 2638
+ ],
+ "loc": {
+ "start": {
+ "line": 75,
+ "column": 54
+ },
+ "end": {
+ "line": 79,
+ "column": 13
+ }
+ }
+ },
+ "alternate": null,
+ "range": [
+ 2458,
+ 2638
+ ],
+ "loc": {
+ "start": {
+ "line": 75,
+ "column": 19
+ },
+ "end": {
+ "line": 79,
+ "column": 13
+ }
+ }
+ },
+ "range": [
+ 2368,
+ 2638
+ ],
+ "loc": {
+ "start": {
+ "line": 73,
+ "column": 12
+ },
+ "end": {
+ "line": 79,
+ "column": 13
+ }
+ }
+ }
+ ],
+ "range": [
+ 2354,
+ 2650
+ ],
+ "loc": {
+ "start": {
+ "line": 72,
+ "column": 62
+ },
+ "end": {
+ "line": 80,
+ "column": 11
+ }
+ }
+ },
+ "alternate": null,
+ "range": [
+ 2302,
+ 2650
+ ],
+ "loc": {
+ "start": {
+ "line": 72,
+ "column": 10
+ },
+ "end": {
+ "line": 80,
+ "column": 11
+ }
+ }
+ }
+ ],
+ "range": [
+ 2260,
+ 2660
+ ],
+ "loc": {
+ "start": {
+ "line": 70,
+ "column": 42
+ },
+ "end": {
+ "line": 81,
+ "column": 9
+ }
+ }
+ },
+ "generator": false,
+ "expression": false,
+ "range": [
+ 2239,
+ 2660
+ ],
+ "loc": {
+ "start": {
+ "line": 70,
+ "column": 21
+ },
+ "end": {
+ "line": 81,
+ "column": 9
+ }
+ }
+ },
+ "kind": "init",
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "range": [
+ 2226,
+ 2660
+ ],
+ "loc": {
+ "start": {
+ "line": 70,
+ "column": 8
+ },
+ "end": {
+ "line": 81,
+ "column": 9
+ }
+ }
+ }
+ ],
+ "range": [
+ 2124,
+ 2668
+ ],
+ "loc": {
+ "start": {
+ "line": 66,
+ "column": 13
+ },
+ "end": {
+ "line": 82,
+ "column": 7
+ }
+ }
+ },
+ "range": [
+ 2117,
+ 2669
+ ],
+ "loc": {
+ "start": {
+ "line": 66,
+ "column": 6
+ },
+ "end": {
+ "line": 82,
+ "column": 8
+ }
+ }
+ }
+ ],
+ "range": [
+ 2109,
+ 2675
+ ],
+ "loc": {
+ "start": {
+ "line": 65,
+ "column": 11
+ },
+ "end": {
+ "line": 83,
+ "column": 5
+ }
+ }
+ },
+ "range": [
+ 2018,
+ 2675
+ ],
+ "loc": {
+ "start": {
+ "line": 63,
+ "column": 4
+ },
+ "end": {
+ "line": 83,
+ "column": 5
+ }
+ }
+ }
+ ],
+ "range": [
+ 2012,
+ 2679
+ ],
+ "loc": {
+ "start": {
+ "line": 62,
+ "column": 32
+ },
+ "end": {
+ "line": 84,
+ "column": 3
+ }
+ }
+ },
+ "generator": false,
+ "expression": false,
+ "range": [
+ 1996,
+ 2679
+ ],
+ "loc": {
+ "start": {
+ "line": 62,
+ "column": 16
+ },
+ "end": {
+ "line": 84,
+ "column": 3
+ }
+ }
+ },
+ "kind": "method",
+ "computed": false,
+ "range": [
+ 1982,
+ 2679
+ ],
+ "loc": {
+ "start": {
+ "line": 62,
+ "column": 2
+ },
+ "end": {
+ "line": 84,
+ "column": 3
+ }
+ },
+ "leadingComments": [
+ {
+ "type": "Block",
+ "value": "*\n * Creates a field definition for an has-many relationship.\n *\n * @param {string} [name] - Name of the property to map this field from.\n * @param {Object} [options] - An options object.\n * @param {string} [options.inverse] - Name of the inverse relationship.\n * @return {Object} - Field definition.\n ",
+ "range": [
+ 1659,
+ 1979
+ ],
+ "loc": {
+ "start": {
+ "line": 54,
+ "column": 2
+ },
+ "end": {
+ "line": 61,
+ "column": 5
+ }
+ }
+ }
+ ],
+ "static": true
+ },
+ {
+ "type": "MethodDefinition",
+ "key": {
+ "type": "Identifier",
+ "name": "constructor",
+ "range": [
+ 2683,
+ 2694
+ ],
+ "loc": {
+ "start": {
+ "line": 86,
+ "column": 2
+ },
+ "end": {
+ "line": 86,
+ "column": 13
+ }
+ }
+ },
+ "value": {
+ "type": "FunctionExpression",
+ "id": null,
+ "params": [],
+ "body": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "expression": {
+ "type": "AssignmentExpression",
+ "operator": "=",
+ "left": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "ThisExpression",
+ "range": [
+ 2703,
+ 2707
+ ],
+ "loc": {
+ "start": {
+ "line": 87,
+ "column": 4
+ },
+ "end": {
+ "line": 87,
+ "column": 8
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "_data",
+ "range": [
+ 2708,
+ 2713
+ ],
+ "loc": {
+ "start": {
+ "line": 87,
+ "column": 9
+ },
+ "end": {
+ "line": 87,
+ "column": 14
+ }
+ }
+ },
+ "range": [
+ 2703,
+ 2713
+ ],
+ "loc": {
+ "start": {
+ "line": 87,
+ "column": 4
+ },
+ "end": {
+ "line": 87,
+ "column": 14
+ }
+ }
+ },
+ "right": {
+ "type": "ObjectExpression",
+ "properties": [],
+ "range": [
+ 2716,
+ 2718
+ ],
+ "loc": {
+ "start": {
+ "line": 87,
+ "column": 17
+ },
+ "end": {
+ "line": 87,
+ "column": 19
+ }
+ }
+ },
+ "range": [
+ 2703,
+ 2718
+ ],
+ "loc": {
+ "start": {
+ "line": 87,
+ "column": 4
+ },
+ "end": {
+ "line": 87,
+ "column": 19
+ }
+ }
+ },
+ "range": [
+ 2703,
+ 2719
+ ],
+ "loc": {
+ "start": {
+ "line": 87,
+ "column": 4
+ },
+ "end": {
+ "line": 87,
+ "column": 20
+ }
+ }
+ }
+ ],
+ "range": [
+ 2697,
+ 2723
+ ],
+ "loc": {
+ "start": {
+ "line": 86,
+ "column": 16
+ },
+ "end": {
+ "line": 88,
+ "column": 3
+ }
+ }
+ },
+ "generator": false,
+ "expression": false,
+ "range": [
+ 2694,
+ 2723
+ ],
+ "loc": {
+ "start": {
+ "line": 86,
+ "column": 13
+ },
+ "end": {
+ "line": 88,
+ "column": 3
+ }
+ }
+ },
+ "kind": "constructor",
+ "computed": false,
+ "range": [
+ 2683,
+ 2723
+ ],
+ "loc": {
+ "start": {
+ "line": 86,
+ "column": 2
+ },
+ "end": {
+ "line": 88,
+ "column": 3
+ }
+ },
+ "trailingComments": [
+ {
+ "type": "Block",
+ "value": "*\n * Add an individual resource to the store. This is used internally by the\n * `push()` method.\n *\n * @param {Object} object - Resource Object to add. See:\n http://jsonapi.org/format/#document-resource-objects\n * @return {undefined} - Doesn't return anything.\n ",
+ "range": [
+ 2727,
+ 3032
+ ],
+ "loc": {
+ "start": {
+ "line": 90,
+ "column": 2
+ },
+ "end": {
+ "line": 97,
+ "column": 5
+ }
+ }
+ }
+ ],
+ "static": false
+ },
+ {
+ "type": "MethodDefinition",
+ "key": {
+ "type": "Identifier",
+ "name": "add",
+ "range": [
+ 3035,
+ 3038
+ ],
+ "loc": {
+ "start": {
+ "line": 98,
+ "column": 2
+ },
+ "end": {
+ "line": 98,
+ "column": 5
+ }
+ }
+ },
+ "value": {
+ "type": "FunctionExpression",
+ "id": null,
+ "params": [
+ {
+ "type": "Identifier",
+ "name": "object",
+ "range": [
+ 3039,
+ 3045
+ ],
+ "loc": {
+ "start": {
+ "line": 98,
+ "column": 6
+ },
+ "end": {
+ "line": 98,
+ "column": 12
+ }
+ }
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "IfStatement",
+ "test": {
+ "type": "Identifier",
+ "name": "object",
+ "range": [
+ 3057,
+ 3063
+ ],
+ "loc": {
+ "start": {
+ "line": 99,
+ "column": 8
+ },
+ "end": {
+ "line": 99,
+ "column": 14
+ }
+ }
+ },
+ "consequent": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "IfStatement",
+ "test": {
+ "type": "LogicalExpression",
+ "operator": "&&",
+ "left": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "object",
+ "range": [
+ 3077,
+ 3083
+ ],
+ "loc": {
+ "start": {
+ "line": 100,
+ "column": 10
+ },
+ "end": {
+ "line": 100,
+ "column": 16
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 3084,
+ 3088
+ ],
+ "loc": {
+ "start": {
+ "line": 100,
+ "column": 17
+ },
+ "end": {
+ "line": 100,
+ "column": 21
+ }
+ }
+ },
+ "range": [
+ 3077,
+ 3088
+ ],
+ "loc": {
+ "start": {
+ "line": 100,
+ "column": 10
+ },
+ "end": {
+ "line": 100,
+ "column": 21
+ }
+ }
+ },
+ "right": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "object",
+ "range": [
+ 3092,
+ 3098
+ ],
+ "loc": {
+ "start": {
+ "line": 100,
+ "column": 25
+ },
+ "end": {
+ "line": 100,
+ "column": 31
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "id",
+ "range": [
+ 3099,
+ 3101
+ ],
+ "loc": {
+ "start": {
+ "line": 100,
+ "column": 32
+ },
+ "end": {
+ "line": 100,
+ "column": 34
+ }
+ }
+ },
+ "range": [
+ 3092,
+ 3101
+ ],
+ "loc": {
+ "start": {
+ "line": 100,
+ "column": 25
+ },
+ "end": {
+ "line": 100,
+ "column": 34
+ }
+ }
+ },
+ "range": [
+ 3077,
+ 3101
+ ],
+ "loc": {
+ "start": {
+ "line": 100,
+ "column": 10
+ },
+ "end": {
+ "line": 100,
+ "column": 34
+ }
+ }
+ },
+ "consequent": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "id": {
+ "type": "Identifier",
+ "name": "resource",
+ "range": [
+ 3117,
+ 3125
+ ],
+ "loc": {
+ "start": {
+ "line": 101,
+ "column": 12
+ },
+ "end": {
+ "line": 101,
+ "column": 20
+ }
+ }
+ },
+ "init": {
+ "type": "CallExpression",
+ "callee": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "ThisExpression",
+ "range": [
+ 3128,
+ 3132
+ ],
+ "loc": {
+ "start": {
+ "line": 101,
+ "column": 23
+ },
+ "end": {
+ "line": 101,
+ "column": 27
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "find",
+ "range": [
+ 3133,
+ 3137
+ ],
+ "loc": {
+ "start": {
+ "line": 101,
+ "column": 28
+ },
+ "end": {
+ "line": 101,
+ "column": 32
+ }
+ }
+ },
+ "range": [
+ 3128,
+ 3137
+ ],
+ "loc": {
+ "start": {
+ "line": 101,
+ "column": 23
+ },
+ "end": {
+ "line": 101,
+ "column": 32
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "object",
+ "range": [
+ 3138,
+ 3144
+ ],
+ "loc": {
+ "start": {
+ "line": 101,
+ "column": 33
+ },
+ "end": {
+ "line": 101,
+ "column": 39
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 3145,
+ 3149
+ ],
+ "loc": {
+ "start": {
+ "line": 101,
+ "column": 40
+ },
+ "end": {
+ "line": 101,
+ "column": 44
+ }
+ }
+ },
+ "range": [
+ 3138,
+ 3149
+ ],
+ "loc": {
+ "start": {
+ "line": 101,
+ "column": 33
+ },
+ "end": {
+ "line": 101,
+ "column": 44
+ }
+ }
+ },
+ {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "object",
+ "range": [
+ 3151,
+ 3157
+ ],
+ "loc": {
+ "start": {
+ "line": 101,
+ "column": 46
+ },
+ "end": {
+ "line": 101,
+ "column": 52
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "id",
+ "range": [
+ 3158,
+ 3160
+ ],
+ "loc": {
+ "start": {
+ "line": 101,
+ "column": 53
+ },
+ "end": {
+ "line": 101,
+ "column": 55
+ }
+ }
+ },
+ "range": [
+ 3151,
+ 3160
+ ],
+ "loc": {
+ "start": {
+ "line": 101,
+ "column": 46
+ },
+ "end": {
+ "line": 101,
+ "column": 55
+ }
+ }
+ }
+ ],
+ "range": [
+ 3128,
+ 3161
+ ],
+ "loc": {
+ "start": {
+ "line": 101,
+ "column": 23
+ },
+ "end": {
+ "line": 101,
+ "column": 56
+ }
+ }
+ },
+ "range": [
+ 3117,
+ 3161
+ ],
+ "loc": {
+ "start": {
+ "line": 101,
+ "column": 12
+ },
+ "end": {
+ "line": 101,
+ "column": 56
+ }
+ }
+ }
+ ],
+ "kind": "let",
+ "range": [
+ 3113,
+ 3162
+ ],
+ "loc": {
+ "start": {
+ "line": 101,
+ "column": 8
+ },
+ "end": {
+ "line": 101,
+ "column": 57
+ }
+ }
+ },
+ {
+ "type": "VariableDeclaration",
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "id": {
+ "type": "Identifier",
+ "name": "definition",
+ "range": [
+ 3175,
+ 3185
+ ],
+ "loc": {
+ "start": {
+ "line": 102,
+ "column": 12
+ },
+ "end": {
+ "line": 102,
+ "column": 22
+ }
+ }
+ },
+ "init": {
+ "type": "MemberExpression",
+ "computed": true,
+ "object": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "Store",
+ "range": [
+ 3188,
+ 3193
+ ],
+ "loc": {
+ "start": {
+ "line": 102,
+ "column": 25
+ },
+ "end": {
+ "line": 102,
+ "column": 30
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "types",
+ "range": [
+ 3194,
+ 3199
+ ],
+ "loc": {
+ "start": {
+ "line": 102,
+ "column": 31
+ },
+ "end": {
+ "line": 102,
+ "column": 36
+ }
+ }
+ },
+ "range": [
+ 3188,
+ 3199
+ ],
+ "loc": {
+ "start": {
+ "line": 102,
+ "column": 25
+ },
+ "end": {
+ "line": 102,
+ "column": 36
+ }
+ }
+ },
+ "property": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "object",
+ "range": [
+ 3200,
+ 3206
+ ],
+ "loc": {
+ "start": {
+ "line": 102,
+ "column": 37
+ },
+ "end": {
+ "line": 102,
+ "column": 43
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 3207,
+ 3211
+ ],
+ "loc": {
+ "start": {
+ "line": 102,
+ "column": 44
+ },
+ "end": {
+ "line": 102,
+ "column": 48
+ }
+ }
+ },
+ "range": [
+ 3200,
+ 3211
+ ],
+ "loc": {
+ "start": {
+ "line": 102,
+ "column": 37
+ },
+ "end": {
+ "line": 102,
+ "column": 48
+ }
+ }
+ },
+ "range": [
+ 3188,
+ 3212
+ ],
+ "loc": {
+ "start": {
+ "line": 102,
+ "column": 25
+ },
+ "end": {
+ "line": 102,
+ "column": 49
+ }
+ }
+ },
+ "range": [
+ 3175,
+ 3212
+ ],
+ "loc": {
+ "start": {
+ "line": 102,
+ "column": 12
+ },
+ "end": {
+ "line": 102,
+ "column": 49
+ }
+ }
+ }
+ ],
+ "kind": "let",
+ "range": [
+ 3171,
+ 3213
+ ],
+ "loc": {
+ "start": {
+ "line": 102,
+ "column": 8
+ },
+ "end": {
+ "line": 102,
+ "column": 50
+ }
+ }
+ },
+ {
+ "type": "ExpressionStatement",
+ "expression": {
+ "type": "CallExpression",
+ "callee": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "CallExpression",
+ "callee": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "Object",
+ "range": [
+ 3222,
+ 3228
+ ],
+ "loc": {
+ "start": {
+ "line": 103,
+ "column": 8
+ },
+ "end": {
+ "line": 103,
+ "column": 14
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "keys",
+ "range": [
+ 3229,
+ 3233
+ ],
+ "loc": {
+ "start": {
+ "line": 103,
+ "column": 15
+ },
+ "end": {
+ "line": 103,
+ "column": 19
+ }
+ }
+ },
+ "range": [
+ 3222,
+ 3233
+ ],
+ "loc": {
+ "start": {
+ "line": 103,
+ "column": 8
+ },
+ "end": {
+ "line": 103,
+ "column": 19
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "Identifier",
+ "name": "definition",
+ "range": [
+ 3234,
+ 3244
+ ],
+ "loc": {
+ "start": {
+ "line": 103,
+ "column": 20
+ },
+ "end": {
+ "line": 103,
+ "column": 30
+ }
+ }
+ }
+ ],
+ "range": [
+ 3222,
+ 3245
+ ],
+ "loc": {
+ "start": {
+ "line": 103,
+ "column": 8
+ },
+ "end": {
+ "line": 103,
+ "column": 31
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "forEach",
+ "range": [
+ 3246,
+ 3253
+ ],
+ "loc": {
+ "start": {
+ "line": 103,
+ "column": 32
+ },
+ "end": {
+ "line": 103,
+ "column": 39
+ }
+ }
+ },
+ "range": [
+ 3222,
+ 3253
+ ],
+ "loc": {
+ "start": {
+ "line": 103,
+ "column": 8
+ },
+ "end": {
+ "line": 103,
+ "column": 39
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "ArrowFunctionExpression",
+ "id": null,
+ "params": [
+ {
+ "type": "Identifier",
+ "name": "fieldName",
+ "range": [
+ 3254,
+ 3263
+ ],
+ "loc": {
+ "start": {
+ "line": 103,
+ "column": 40
+ },
+ "end": {
+ "line": 103,
+ "column": 49
+ }
+ }
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "expression": {
+ "type": "CallExpression",
+ "callee": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "ThisExpression",
+ "range": [
+ 3279,
+ 3283
+ ],
+ "loc": {
+ "start": {
+ "line": 104,
+ "column": 10
+ },
+ "end": {
+ "line": 104,
+ "column": 14
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "_addField",
+ "range": [
+ 3284,
+ 3293
+ ],
+ "loc": {
+ "start": {
+ "line": 104,
+ "column": 15
+ },
+ "end": {
+ "line": 104,
+ "column": 24
+ }
+ }
+ },
+ "range": [
+ 3279,
+ 3293
+ ],
+ "loc": {
+ "start": {
+ "line": 104,
+ "column": 10
+ },
+ "end": {
+ "line": 104,
+ "column": 24
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "Identifier",
+ "name": "object",
+ "range": [
+ 3294,
+ 3300
+ ],
+ "loc": {
+ "start": {
+ "line": 104,
+ "column": 25
+ },
+ "end": {
+ "line": 104,
+ "column": 31
+ }
+ }
+ },
+ {
+ "type": "Identifier",
+ "name": "resource",
+ "range": [
+ 3302,
+ 3310
+ ],
+ "loc": {
+ "start": {
+ "line": 104,
+ "column": 33
+ },
+ "end": {
+ "line": 104,
+ "column": 41
+ }
+ }
+ },
+ {
+ "type": "Identifier",
+ "name": "definition",
+ "range": [
+ 3312,
+ 3322
+ ],
+ "loc": {
+ "start": {
+ "line": 104,
+ "column": 43
+ },
+ "end": {
+ "line": 104,
+ "column": 53
+ }
+ }
+ },
+ {
+ "type": "Identifier",
+ "name": "fieldName",
+ "range": [
+ 3324,
+ 3333
+ ],
+ "loc": {
+ "start": {
+ "line": 104,
+ "column": 55
+ },
+ "end": {
+ "line": 104,
+ "column": 64
+ }
+ }
+ }
+ ],
+ "range": [
+ 3279,
+ 3334
+ ],
+ "loc": {
+ "start": {
+ "line": 104,
+ "column": 10
+ },
+ "end": {
+ "line": 104,
+ "column": 65
+ }
+ }
+ },
+ "range": [
+ 3279,
+ 3335
+ ],
+ "loc": {
+ "start": {
+ "line": 104,
+ "column": 10
+ },
+ "end": {
+ "line": 104,
+ "column": 66
+ }
+ }
+ }
+ ],
+ "range": [
+ 3267,
+ 3345
+ ],
+ "loc": {
+ "start": {
+ "line": 103,
+ "column": 53
+ },
+ "end": {
+ "line": 105,
+ "column": 9
+ }
+ }
+ },
+ "generator": false,
+ "expression": false,
+ "range": [
+ 3254,
+ 3345
+ ],
+ "loc": {
+ "start": {
+ "line": 103,
+ "column": 40
+ },
+ "end": {
+ "line": 105,
+ "column": 9
+ }
+ }
+ }
+ ],
+ "range": [
+ 3222,
+ 3346
+ ],
+ "loc": {
+ "start": {
+ "line": 103,
+ "column": 8
+ },
+ "end": {
+ "line": 105,
+ "column": 10
+ }
+ }
+ },
+ "range": [
+ 3222,
+ 3347
+ ],
+ "loc": {
+ "start": {
+ "line": 103,
+ "column": 8
+ },
+ "end": {
+ "line": 105,
+ "column": 11
+ }
+ }
+ }
+ ],
+ "range": [
+ 3103,
+ 3355
+ ],
+ "loc": {
+ "start": {
+ "line": 100,
+ "column": 36
+ },
+ "end": {
+ "line": 106,
+ "column": 7
+ }
+ }
+ },
+ "alternate": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "ThrowStatement",
+ "argument": {
+ "type": "NewExpression",
+ "callee": {
+ "type": "Identifier",
+ "name": "TypeError",
+ "range": [
+ 3381,
+ 3390
+ ],
+ "loc": {
+ "start": {
+ "line": 107,
+ "column": 18
+ },
+ "end": {
+ "line": 107,
+ "column": 27
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "TemplateLiteral",
+ "quasis": [
+ {
+ "type": "TemplateElement",
+ "value": {
+ "raw": "The data must have a type and id",
+ "cooked": "The data must have a type and id"
+ },
+ "tail": true,
+ "range": [
+ 3391,
+ 3425
+ ],
+ "loc": {
+ "start": {
+ "line": 107,
+ "column": 28
+ },
+ "end": {
+ "line": 107,
+ "column": 62
+ }
+ }
+ }
+ ],
+ "expressions": [],
+ "range": [
+ 3391,
+ 3425
+ ],
+ "loc": {
+ "start": {
+ "line": 107,
+ "column": 28
+ },
+ "end": {
+ "line": 107,
+ "column": 62
+ }
+ }
+ }
+ ],
+ "range": [
+ 3377,
+ 3426
+ ],
+ "loc": {
+ "start": {
+ "line": 107,
+ "column": 14
+ },
+ "end": {
+ "line": 107,
+ "column": 63
+ }
+ }
+ },
+ "range": [
+ 3371,
+ 3427
+ ],
+ "loc": {
+ "start": {
+ "line": 107,
+ "column": 8
+ },
+ "end": {
+ "line": 107,
+ "column": 64
+ }
+ }
+ }
+ ],
+ "range": [
+ 3361,
+ 3435
+ ],
+ "loc": {
+ "start": {
+ "line": 106,
+ "column": 13
+ },
+ "end": {
+ "line": 108,
+ "column": 7
+ }
+ }
+ },
+ "range": [
+ 3073,
+ 3435
+ ],
+ "loc": {
+ "start": {
+ "line": 100,
+ "column": 6
+ },
+ "end": {
+ "line": 108,
+ "column": 7
+ }
+ }
+ }
+ ],
+ "range": [
+ 3065,
+ 3441
+ ],
+ "loc": {
+ "start": {
+ "line": 99,
+ "column": 16
+ },
+ "end": {
+ "line": 109,
+ "column": 5
+ }
+ }
+ },
+ "alternate": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "ThrowStatement",
+ "argument": {
+ "type": "NewExpression",
+ "callee": {
+ "type": "Identifier",
+ "name": "TypeError",
+ "range": [
+ 3465,
+ 3474
+ ],
+ "loc": {
+ "start": {
+ "line": 110,
+ "column": 16
+ },
+ "end": {
+ "line": 110,
+ "column": 25
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "TemplateLiteral",
+ "quasis": [
+ {
+ "type": "TemplateElement",
+ "value": {
+ "raw": "You must provide data to add",
+ "cooked": "You must provide data to add"
+ },
+ "tail": true,
+ "range": [
+ 3475,
+ 3505
+ ],
+ "loc": {
+ "start": {
+ "line": 110,
+ "column": 26
+ },
+ "end": {
+ "line": 110,
+ "column": 56
+ }
+ }
+ }
+ ],
+ "expressions": [],
+ "range": [
+ 3475,
+ 3505
+ ],
+ "loc": {
+ "start": {
+ "line": 110,
+ "column": 26
+ },
+ "end": {
+ "line": 110,
+ "column": 56
+ }
+ }
+ }
+ ],
+ "range": [
+ 3461,
+ 3506
+ ],
+ "loc": {
+ "start": {
+ "line": 110,
+ "column": 12
+ },
+ "end": {
+ "line": 110,
+ "column": 57
+ }
+ }
+ },
+ "range": [
+ 3455,
+ 3507
+ ],
+ "loc": {
+ "start": {
+ "line": 110,
+ "column": 6
+ },
+ "end": {
+ "line": 110,
+ "column": 58
+ }
+ }
+ }
+ ],
+ "range": [
+ 3447,
+ 3513
+ ],
+ "loc": {
+ "start": {
+ "line": 109,
+ "column": 11
+ },
+ "end": {
+ "line": 111,
+ "column": 5
+ }
+ }
+ },
+ "range": [
+ 3053,
+ 3513
+ ],
+ "loc": {
+ "start": {
+ "line": 99,
+ "column": 4
+ },
+ "end": {
+ "line": 111,
+ "column": 5
+ }
+ }
+ }
+ ],
+ "range": [
+ 3047,
+ 3517
+ ],
+ "loc": {
+ "start": {
+ "line": 98,
+ "column": 14
+ },
+ "end": {
+ "line": 112,
+ "column": 3
+ }
+ }
+ },
+ "generator": false,
+ "expression": false,
+ "range": [
+ 3038,
+ 3517
+ ],
+ "loc": {
+ "start": {
+ "line": 98,
+ "column": 5
+ },
+ "end": {
+ "line": 112,
+ "column": 3
+ }
+ }
+ },
+ "kind": "method",
+ "computed": false,
+ "range": [
+ 3035,
+ 3517
+ ],
+ "loc": {
+ "start": {
+ "line": 98,
+ "column": 2
+ },
+ "end": {
+ "line": 112,
+ "column": 3
+ }
+ },
+ "leadingComments": [
+ {
+ "type": "Block",
+ "value": "*\n * Add an individual resource to the store. This is used internally by the\n * `push()` method.\n *\n * @param {Object} object - Resource Object to add. See:\n http://jsonapi.org/format/#document-resource-objects\n * @return {undefined} - Doesn't return anything.\n ",
+ "range": [
+ 2727,
+ 3032
+ ],
+ "loc": {
+ "start": {
+ "line": 90,
+ "column": 2
+ },
+ "end": {
+ "line": 97,
+ "column": 5
+ }
+ }
+ }
+ ],
+ "trailingComments": [
+ {
+ "type": "Block",
+ "value": "*\n * Find a resource or entire collection of resources.\n *\n * NOTE: If the resource hasn't been loaded via an add() or push() call it\n * will be automatically created when find is called.\n *\n * @param {!string} type - Type of the resource(s) to find.\n * @param {string} [id] - The id of the resource to find. If omitted all\n * resources of the type will be returned.\n * @return {Object|Object[]} - Either the resource or an array of resources.\n ",
+ "range": [
+ 3521,
+ 4013
+ ],
+ "loc": {
+ "start": {
+ "line": 114,
+ "column": 2
+ },
+ "end": {
+ "line": 124,
+ "column": 5
+ }
+ }
+ }
+ ],
+ "static": false
+ },
+ {
+ "type": "MethodDefinition",
+ "key": {
+ "type": "Identifier",
+ "name": "find",
+ "range": [
+ 4016,
+ 4020
+ ],
+ "loc": {
+ "start": {
+ "line": 125,
+ "column": 2
+ },
+ "end": {
+ "line": 125,
+ "column": 6
+ }
+ }
+ },
+ "value": {
+ "type": "FunctionExpression",
+ "id": null,
+ "params": [
+ {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 4021,
+ 4025
+ ],
+ "loc": {
+ "start": {
+ "line": 125,
+ "column": 7
+ },
+ "end": {
+ "line": 125,
+ "column": 11
+ }
+ }
+ },
+ {
+ "type": "Identifier",
+ "name": "id",
+ "range": [
+ 4027,
+ 4029
+ ],
+ "loc": {
+ "start": {
+ "line": 125,
+ "column": 13
+ },
+ "end": {
+ "line": 125,
+ "column": 15
+ }
+ }
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "id": {
+ "type": "Identifier",
+ "name": "definition",
+ "range": [
+ 4041,
+ 4051
+ ],
+ "loc": {
+ "start": {
+ "line": 126,
+ "column": 8
+ },
+ "end": {
+ "line": 126,
+ "column": 18
+ }
+ }
+ },
+ "init": null,
+ "range": [
+ 4041,
+ 4051
+ ],
+ "loc": {
+ "start": {
+ "line": 126,
+ "column": 8
+ },
+ "end": {
+ "line": 126,
+ "column": 18
+ }
+ }
+ }
+ ],
+ "kind": "var",
+ "range": [
+ 4037,
+ 4052
+ ],
+ "loc": {
+ "start": {
+ "line": 126,
+ "column": 4
+ },
+ "end": {
+ "line": 126,
+ "column": 19
+ }
+ }
+ },
+ {
+ "type": "IfStatement",
+ "test": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 4061,
+ 4065
+ ],
+ "loc": {
+ "start": {
+ "line": 127,
+ "column": 8
+ },
+ "end": {
+ "line": 127,
+ "column": 12
+ }
+ }
+ },
+ "consequent": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "expression": {
+ "type": "AssignmentExpression",
+ "operator": "=",
+ "left": {
+ "type": "Identifier",
+ "name": "definition",
+ "range": [
+ 4075,
+ 4085
+ ],
+ "loc": {
+ "start": {
+ "line": 128,
+ "column": 6
+ },
+ "end": {
+ "line": 128,
+ "column": 16
+ }
+ }
+ },
+ "right": {
+ "type": "MemberExpression",
+ "computed": true,
+ "object": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "Store",
+ "range": [
+ 4088,
+ 4093
+ ],
+ "loc": {
+ "start": {
+ "line": 128,
+ "column": 19
+ },
+ "end": {
+ "line": 128,
+ "column": 24
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "types",
+ "range": [
+ 4094,
+ 4099
+ ],
+ "loc": {
+ "start": {
+ "line": 128,
+ "column": 25
+ },
+ "end": {
+ "line": 128,
+ "column": 30
+ }
+ }
+ },
+ "range": [
+ 4088,
+ 4099
+ ],
+ "loc": {
+ "start": {
+ "line": 128,
+ "column": 19
+ },
+ "end": {
+ "line": 128,
+ "column": 30
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 4100,
+ 4104
+ ],
+ "loc": {
+ "start": {
+ "line": 128,
+ "column": 31
+ },
+ "end": {
+ "line": 128,
+ "column": 35
+ }
+ }
+ },
+ "range": [
+ 4088,
+ 4105
+ ],
+ "loc": {
+ "start": {
+ "line": 128,
+ "column": 19
+ },
+ "end": {
+ "line": 128,
+ "column": 36
+ }
+ }
+ },
+ "range": [
+ 4075,
+ 4105
+ ],
+ "loc": {
+ "start": {
+ "line": 128,
+ "column": 6
+ },
+ "end": {
+ "line": 128,
+ "column": 36
+ }
+ }
+ },
+ "range": [
+ 4075,
+ 4106
+ ],
+ "loc": {
+ "start": {
+ "line": 128,
+ "column": 6
+ },
+ "end": {
+ "line": 128,
+ "column": 37
+ }
+ }
+ },
+ {
+ "type": "IfStatement",
+ "test": {
+ "type": "Identifier",
+ "name": "definition",
+ "range": [
+ 4117,
+ 4127
+ ],
+ "loc": {
+ "start": {
+ "line": 129,
+ "column": 10
+ },
+ "end": {
+ "line": 129,
+ "column": 20
+ }
+ }
+ },
+ "consequent": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "expression": {
+ "type": "AssignmentExpression",
+ "operator": "=",
+ "left": {
+ "type": "MemberExpression",
+ "computed": true,
+ "object": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "ThisExpression",
+ "range": [
+ 4139,
+ 4143
+ ],
+ "loc": {
+ "start": {
+ "line": 130,
+ "column": 8
+ },
+ "end": {
+ "line": 130,
+ "column": 12
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "_data",
+ "range": [
+ 4144,
+ 4149
+ ],
+ "loc": {
+ "start": {
+ "line": 130,
+ "column": 13
+ },
+ "end": {
+ "line": 130,
+ "column": 18
+ }
+ }
+ },
+ "range": [
+ 4139,
+ 4149
+ ],
+ "loc": {
+ "start": {
+ "line": 130,
+ "column": 8
+ },
+ "end": {
+ "line": 130,
+ "column": 18
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 4150,
+ 4154
+ ],
+ "loc": {
+ "start": {
+ "line": 130,
+ "column": 19
+ },
+ "end": {
+ "line": 130,
+ "column": 23
+ }
+ }
+ },
+ "range": [
+ 4139,
+ 4155
+ ],
+ "loc": {
+ "start": {
+ "line": 130,
+ "column": 8
+ },
+ "end": {
+ "line": 130,
+ "column": 24
+ }
+ }
+ },
+ "right": {
+ "type": "LogicalExpression",
+ "operator": "||",
+ "left": {
+ "type": "MemberExpression",
+ "computed": true,
+ "object": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "ThisExpression",
+ "range": [
+ 4158,
+ 4162
+ ],
+ "loc": {
+ "start": {
+ "line": 130,
+ "column": 27
+ },
+ "end": {
+ "line": 130,
+ "column": 31
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "_data",
+ "range": [
+ 4163,
+ 4168
+ ],
+ "loc": {
+ "start": {
+ "line": 130,
+ "column": 32
+ },
+ "end": {
+ "line": 130,
+ "column": 37
+ }
+ }
+ },
+ "range": [
+ 4158,
+ 4168
+ ],
+ "loc": {
+ "start": {
+ "line": 130,
+ "column": 27
+ },
+ "end": {
+ "line": 130,
+ "column": 37
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 4169,
+ 4173
+ ],
+ "loc": {
+ "start": {
+ "line": 130,
+ "column": 38
+ },
+ "end": {
+ "line": 130,
+ "column": 42
+ }
+ }
+ },
+ "range": [
+ 4158,
+ 4174
+ ],
+ "loc": {
+ "start": {
+ "line": 130,
+ "column": 27
+ },
+ "end": {
+ "line": 130,
+ "column": 43
+ }
+ }
+ },
+ "right": {
+ "type": "ObjectExpression",
+ "properties": [],
+ "range": [
+ 4178,
+ 4180
+ ],
+ "loc": {
+ "start": {
+ "line": 130,
+ "column": 47
+ },
+ "end": {
+ "line": 130,
+ "column": 49
+ }
+ }
+ },
+ "range": [
+ 4158,
+ 4180
+ ],
+ "loc": {
+ "start": {
+ "line": 130,
+ "column": 27
+ },
+ "end": {
+ "line": 130,
+ "column": 49
+ }
+ }
+ },
+ "range": [
+ 4139,
+ 4180
+ ],
+ "loc": {
+ "start": {
+ "line": 130,
+ "column": 8
+ },
+ "end": {
+ "line": 130,
+ "column": 49
+ }
+ }
+ },
+ "range": [
+ 4139,
+ 4181
+ ],
+ "loc": {
+ "start": {
+ "line": 130,
+ "column": 8
+ },
+ "end": {
+ "line": 130,
+ "column": 50
+ }
+ }
+ },
+ {
+ "type": "IfStatement",
+ "test": {
+ "type": "Identifier",
+ "name": "id",
+ "range": [
+ 4194,
+ 4196
+ ],
+ "loc": {
+ "start": {
+ "line": 131,
+ "column": 12
+ },
+ "end": {
+ "line": 131,
+ "column": 14
+ }
+ }
+ },
+ "consequent": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "IfStatement",
+ "test": {
+ "type": "UnaryExpression",
+ "operator": "!",
+ "argument": {
+ "type": "MemberExpression",
+ "computed": true,
+ "object": {
+ "type": "MemberExpression",
+ "computed": true,
+ "object": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "ThisExpression",
+ "range": [
+ 4215,
+ 4219
+ ],
+ "loc": {
+ "start": {
+ "line": 132,
+ "column": 15
+ },
+ "end": {
+ "line": 132,
+ "column": 19
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "_data",
+ "range": [
+ 4220,
+ 4225
+ ],
+ "loc": {
+ "start": {
+ "line": 132,
+ "column": 20
+ },
+ "end": {
+ "line": 132,
+ "column": 25
+ }
+ }
+ },
+ "range": [
+ 4215,
+ 4225
+ ],
+ "loc": {
+ "start": {
+ "line": 132,
+ "column": 15
+ },
+ "end": {
+ "line": 132,
+ "column": 25
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 4226,
+ 4230
+ ],
+ "loc": {
+ "start": {
+ "line": 132,
+ "column": 26
+ },
+ "end": {
+ "line": 132,
+ "column": 30
+ }
+ }
+ },
+ "range": [
+ 4215,
+ 4231
+ ],
+ "loc": {
+ "start": {
+ "line": 132,
+ "column": 15
+ },
+ "end": {
+ "line": 132,
+ "column": 31
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "id",
+ "range": [
+ 4232,
+ 4234
+ ],
+ "loc": {
+ "start": {
+ "line": 132,
+ "column": 32
+ },
+ "end": {
+ "line": 132,
+ "column": 34
+ }
+ }
+ },
+ "range": [
+ 4215,
+ 4235
+ ],
+ "loc": {
+ "start": {
+ "line": 132,
+ "column": 15
+ },
+ "end": {
+ "line": 132,
+ "column": 35
+ }
+ }
+ },
+ "prefix": true,
+ "range": [
+ 4214,
+ 4235
+ ],
+ "loc": {
+ "start": {
+ "line": 132,
+ "column": 14
+ },
+ "end": {
+ "line": 132,
+ "column": 35
+ }
+ }
+ },
+ "consequent": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "expression": {
+ "type": "AssignmentExpression",
+ "operator": "=",
+ "left": {
+ "type": "MemberExpression",
+ "computed": true,
+ "object": {
+ "type": "MemberExpression",
+ "computed": true,
+ "object": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "ThisExpression",
+ "range": [
+ 4251,
+ 4255
+ ],
+ "loc": {
+ "start": {
+ "line": 133,
+ "column": 12
+ },
+ "end": {
+ "line": 133,
+ "column": 16
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "_data",
+ "range": [
+ 4256,
+ 4261
+ ],
+ "loc": {
+ "start": {
+ "line": 133,
+ "column": 17
+ },
+ "end": {
+ "line": 133,
+ "column": 22
+ }
+ }
+ },
+ "range": [
+ 4251,
+ 4261
+ ],
+ "loc": {
+ "start": {
+ "line": 133,
+ "column": 12
+ },
+ "end": {
+ "line": 133,
+ "column": 22
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 4262,
+ 4266
+ ],
+ "loc": {
+ "start": {
+ "line": 133,
+ "column": 23
+ },
+ "end": {
+ "line": 133,
+ "column": 27
+ }
+ }
+ },
+ "range": [
+ 4251,
+ 4267
+ ],
+ "loc": {
+ "start": {
+ "line": 133,
+ "column": 12
+ },
+ "end": {
+ "line": 133,
+ "column": 28
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "id",
+ "range": [
+ 4268,
+ 4270
+ ],
+ "loc": {
+ "start": {
+ "line": 133,
+ "column": 29
+ },
+ "end": {
+ "line": 133,
+ "column": 31
+ }
+ }
+ },
+ "range": [
+ 4251,
+ 4271
+ ],
+ "loc": {
+ "start": {
+ "line": 133,
+ "column": 12
+ },
+ "end": {
+ "line": 133,
+ "column": 32
+ }
+ }
+ },
+ "right": {
+ "type": "ObjectExpression",
+ "properties": [
+ {
+ "type": "Property",
+ "key": {
+ "type": "Identifier",
+ "name": "_dependents",
+ "range": [
+ 4290,
+ 4301
+ ],
+ "loc": {
+ "start": {
+ "line": 134,
+ "column": 14
+ },
+ "end": {
+ "line": 134,
+ "column": 25
+ }
+ }
+ },
+ "value": {
+ "type": "ArrayExpression",
+ "elements": [],
+ "range": [
+ 4303,
+ 4305
+ ],
+ "loc": {
+ "start": {
+ "line": 134,
+ "column": 27
+ },
+ "end": {
+ "line": 134,
+ "column": 29
+ }
+ }
+ },
+ "kind": "init",
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "range": [
+ 4290,
+ 4305
+ ],
+ "loc": {
+ "start": {
+ "line": 134,
+ "column": 14
+ },
+ "end": {
+ "line": 134,
+ "column": 29
+ }
+ }
+ },
+ {
+ "type": "Property",
+ "key": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 4321,
+ 4325
+ ],
+ "loc": {
+ "start": {
+ "line": 135,
+ "column": 14
+ },
+ "end": {
+ "line": 135,
+ "column": 18
+ }
+ }
+ },
+ "value": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 4327,
+ 4331
+ ],
+ "loc": {
+ "start": {
+ "line": 135,
+ "column": 20
+ },
+ "end": {
+ "line": 135,
+ "column": 24
+ }
+ }
+ },
+ "kind": "init",
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "range": [
+ 4321,
+ 4331
+ ],
+ "loc": {
+ "start": {
+ "line": 135,
+ "column": 14
+ },
+ "end": {
+ "line": 135,
+ "column": 24
+ }
+ }
+ },
+ {
+ "type": "Property",
+ "key": {
+ "type": "Identifier",
+ "name": "id",
+ "range": [
+ 4347,
+ 4349
+ ],
+ "loc": {
+ "start": {
+ "line": 136,
+ "column": 14
+ },
+ "end": {
+ "line": 136,
+ "column": 16
+ }
+ }
+ },
+ "value": {
+ "type": "Identifier",
+ "name": "id",
+ "range": [
+ 4351,
+ 4353
+ ],
+ "loc": {
+ "start": {
+ "line": 136,
+ "column": 18
+ },
+ "end": {
+ "line": 136,
+ "column": 20
+ }
+ }
+ },
+ "kind": "init",
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "range": [
+ 4347,
+ 4353
+ ],
+ "loc": {
+ "start": {
+ "line": 136,
+ "column": 14
+ },
+ "end": {
+ "line": 136,
+ "column": 20
+ }
+ }
+ }
+ ],
+ "range": [
+ 4274,
+ 4367
+ ],
+ "loc": {
+ "start": {
+ "line": 133,
+ "column": 35
+ },
+ "end": {
+ "line": 137,
+ "column": 13
+ }
+ }
+ },
+ "range": [
+ 4251,
+ 4367
+ ],
+ "loc": {
+ "start": {
+ "line": 133,
+ "column": 12
+ },
+ "end": {
+ "line": 137,
+ "column": 13
+ }
+ }
+ },
+ "range": [
+ 4251,
+ 4368
+ ],
+ "loc": {
+ "start": {
+ "line": 133,
+ "column": 12
+ },
+ "end": {
+ "line": 137,
+ "column": 14
+ }
+ }
+ },
+ {
+ "type": "ExpressionStatement",
+ "expression": {
+ "type": "CallExpression",
+ "callee": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "CallExpression",
+ "callee": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "Object",
+ "range": [
+ 4381,
+ 4387
+ ],
+ "loc": {
+ "start": {
+ "line": 138,
+ "column": 12
+ },
+ "end": {
+ "line": 138,
+ "column": 18
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "keys",
+ "range": [
+ 4388,
+ 4392
+ ],
+ "loc": {
+ "start": {
+ "line": 138,
+ "column": 19
+ },
+ "end": {
+ "line": 138,
+ "column": 23
+ }
+ }
+ },
+ "range": [
+ 4381,
+ 4392
+ ],
+ "loc": {
+ "start": {
+ "line": 138,
+ "column": 12
+ },
+ "end": {
+ "line": 138,
+ "column": 23
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "Identifier",
+ "name": "definition",
+ "range": [
+ 4393,
+ 4403
+ ],
+ "loc": {
+ "start": {
+ "line": 138,
+ "column": 24
+ },
+ "end": {
+ "line": 138,
+ "column": 34
+ }
+ }
+ }
+ ],
+ "range": [
+ 4381,
+ 4404
+ ],
+ "loc": {
+ "start": {
+ "line": 138,
+ "column": 12
+ },
+ "end": {
+ "line": 138,
+ "column": 35
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "forEach",
+ "range": [
+ 4405,
+ 4412
+ ],
+ "loc": {
+ "start": {
+ "line": 138,
+ "column": 36
+ },
+ "end": {
+ "line": 138,
+ "column": 43
+ }
+ }
+ },
+ "range": [
+ 4381,
+ 4412
+ ],
+ "loc": {
+ "start": {
+ "line": 138,
+ "column": 12
+ },
+ "end": {
+ "line": 138,
+ "column": 43
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "ArrowFunctionExpression",
+ "id": null,
+ "params": [
+ {
+ "type": "Identifier",
+ "name": "key",
+ "range": [
+ 4413,
+ 4416
+ ],
+ "loc": {
+ "start": {
+ "line": 138,
+ "column": 44
+ },
+ "end": {
+ "line": 138,
+ "column": 47
+ }
+ }
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "expression": {
+ "type": "AssignmentExpression",
+ "operator": "=",
+ "left": {
+ "type": "MemberExpression",
+ "computed": true,
+ "object": {
+ "type": "MemberExpression",
+ "computed": true,
+ "object": {
+ "type": "MemberExpression",
+ "computed": true,
+ "object": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "ThisExpression",
+ "range": [
+ 4436,
+ 4440
+ ],
+ "loc": {
+ "start": {
+ "line": 139,
+ "column": 14
+ },
+ "end": {
+ "line": 139,
+ "column": 18
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "_data",
+ "range": [
+ 4441,
+ 4446
+ ],
+ "loc": {
+ "start": {
+ "line": 139,
+ "column": 19
+ },
+ "end": {
+ "line": 139,
+ "column": 24
+ }
+ }
+ },
+ "range": [
+ 4436,
+ 4446
+ ],
+ "loc": {
+ "start": {
+ "line": 139,
+ "column": 14
+ },
+ "end": {
+ "line": 139,
+ "column": 24
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 4447,
+ 4451
+ ],
+ "loc": {
+ "start": {
+ "line": 139,
+ "column": 25
+ },
+ "end": {
+ "line": 139,
+ "column": 29
+ }
+ }
+ },
+ "range": [
+ 4436,
+ 4452
+ ],
+ "loc": {
+ "start": {
+ "line": 139,
+ "column": 14
+ },
+ "end": {
+ "line": 139,
+ "column": 30
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "id",
+ "range": [
+ 4453,
+ 4455
+ ],
+ "loc": {
+ "start": {
+ "line": 139,
+ "column": 31
+ },
+ "end": {
+ "line": 139,
+ "column": 33
+ }
+ }
+ },
+ "range": [
+ 4436,
+ 4456
+ ],
+ "loc": {
+ "start": {
+ "line": 139,
+ "column": 14
+ },
+ "end": {
+ "line": 139,
+ "column": 34
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "key",
+ "range": [
+ 4457,
+ 4460
+ ],
+ "loc": {
+ "start": {
+ "line": 139,
+ "column": 35
+ },
+ "end": {
+ "line": 139,
+ "column": 38
+ }
+ }
+ },
+ "range": [
+ 4436,
+ 4461
+ ],
+ "loc": {
+ "start": {
+ "line": 139,
+ "column": 14
+ },
+ "end": {
+ "line": 139,
+ "column": 39
+ }
+ }
+ },
+ "right": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "MemberExpression",
+ "computed": true,
+ "object": {
+ "type": "Identifier",
+ "name": "definition",
+ "range": [
+ 4464,
+ 4474
+ ],
+ "loc": {
+ "start": {
+ "line": 139,
+ "column": 42
+ },
+ "end": {
+ "line": 139,
+ "column": 52
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "key",
+ "range": [
+ 4475,
+ 4478
+ ],
+ "loc": {
+ "start": {
+ "line": 139,
+ "column": 53
+ },
+ "end": {
+ "line": 139,
+ "column": 56
+ }
+ }
+ },
+ "range": [
+ 4464,
+ 4479
+ ],
+ "loc": {
+ "start": {
+ "line": 139,
+ "column": 42
+ },
+ "end": {
+ "line": 139,
+ "column": 57
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "default",
+ "range": [
+ 4480,
+ 4487
+ ],
+ "loc": {
+ "start": {
+ "line": 139,
+ "column": 58
+ },
+ "end": {
+ "line": 139,
+ "column": 65
+ }
+ }
+ },
+ "range": [
+ 4464,
+ 4487
+ ],
+ "loc": {
+ "start": {
+ "line": 139,
+ "column": 42
+ },
+ "end": {
+ "line": 139,
+ "column": 65
+ }
+ }
+ },
+ "range": [
+ 4436,
+ 4487
+ ],
+ "loc": {
+ "start": {
+ "line": 139,
+ "column": 14
+ },
+ "end": {
+ "line": 139,
+ "column": 65
+ }
+ }
+ },
+ "range": [
+ 4436,
+ 4488
+ ],
+ "loc": {
+ "start": {
+ "line": 139,
+ "column": 14
+ },
+ "end": {
+ "line": 139,
+ "column": 66
+ }
+ }
+ }
+ ],
+ "range": [
+ 4420,
+ 4502
+ ],
+ "loc": {
+ "start": {
+ "line": 138,
+ "column": 51
+ },
+ "end": {
+ "line": 140,
+ "column": 13
+ }
+ }
+ },
+ "generator": false,
+ "expression": false,
+ "range": [
+ 4413,
+ 4502
+ ],
+ "loc": {
+ "start": {
+ "line": 138,
+ "column": 44
+ },
+ "end": {
+ "line": 140,
+ "column": 13
+ }
+ }
+ }
+ ],
+ "range": [
+ 4381,
+ 4503
+ ],
+ "loc": {
+ "start": {
+ "line": 138,
+ "column": 12
+ },
+ "end": {
+ "line": 140,
+ "column": 14
+ }
+ }
+ },
+ "range": [
+ 4381,
+ 4504
+ ],
+ "loc": {
+ "start": {
+ "line": 138,
+ "column": 12
+ },
+ "end": {
+ "line": 140,
+ "column": 15
+ }
+ }
+ }
+ ],
+ "range": [
+ 4237,
+ 4516
+ ],
+ "loc": {
+ "start": {
+ "line": 132,
+ "column": 37
+ },
+ "end": {
+ "line": 141,
+ "column": 11
+ }
+ }
+ },
+ "alternate": null,
+ "range": [
+ 4210,
+ 4516
+ ],
+ "loc": {
+ "start": {
+ "line": 132,
+ "column": 10
+ },
+ "end": {
+ "line": 141,
+ "column": 11
+ }
+ }
+ },
+ {
+ "type": "ReturnStatement",
+ "argument": {
+ "type": "MemberExpression",
+ "computed": true,
+ "object": {
+ "type": "MemberExpression",
+ "computed": true,
+ "object": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "ThisExpression",
+ "range": [
+ 4534,
+ 4538
+ ],
+ "loc": {
+ "start": {
+ "line": 142,
+ "column": 17
+ },
+ "end": {
+ "line": 142,
+ "column": 21
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "_data",
+ "range": [
+ 4539,
+ 4544
+ ],
+ "loc": {
+ "start": {
+ "line": 142,
+ "column": 22
+ },
+ "end": {
+ "line": 142,
+ "column": 27
+ }
+ }
+ },
+ "range": [
+ 4534,
+ 4544
+ ],
+ "loc": {
+ "start": {
+ "line": 142,
+ "column": 17
+ },
+ "end": {
+ "line": 142,
+ "column": 27
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 4545,
+ 4549
+ ],
+ "loc": {
+ "start": {
+ "line": 142,
+ "column": 28
+ },
+ "end": {
+ "line": 142,
+ "column": 32
+ }
+ }
+ },
+ "range": [
+ 4534,
+ 4550
+ ],
+ "loc": {
+ "start": {
+ "line": 142,
+ "column": 17
+ },
+ "end": {
+ "line": 142,
+ "column": 33
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "id",
+ "range": [
+ 4551,
+ 4553
+ ],
+ "loc": {
+ "start": {
+ "line": 142,
+ "column": 34
+ },
+ "end": {
+ "line": 142,
+ "column": 36
+ }
+ }
+ },
+ "range": [
+ 4534,
+ 4554
+ ],
+ "loc": {
+ "start": {
+ "line": 142,
+ "column": 17
+ },
+ "end": {
+ "line": 142,
+ "column": 37
+ }
+ }
+ },
+ "range": [
+ 4527,
+ 4555
+ ],
+ "loc": {
+ "start": {
+ "line": 142,
+ "column": 10
+ },
+ "end": {
+ "line": 142,
+ "column": 38
+ }
+ }
+ }
+ ],
+ "range": [
+ 4198,
+ 4565
+ ],
+ "loc": {
+ "start": {
+ "line": 131,
+ "column": 16
+ },
+ "end": {
+ "line": 143,
+ "column": 9
+ }
+ }
+ },
+ "alternate": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "ReturnStatement",
+ "argument": {
+ "type": "CallExpression",
+ "callee": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "CallExpression",
+ "callee": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "Object",
+ "range": [
+ 4590,
+ 4596
+ ],
+ "loc": {
+ "start": {
+ "line": 144,
+ "column": 17
+ },
+ "end": {
+ "line": 144,
+ "column": 23
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "keys",
+ "range": [
+ 4597,
+ 4601
+ ],
+ "loc": {
+ "start": {
+ "line": 144,
+ "column": 24
+ },
+ "end": {
+ "line": 144,
+ "column": 28
+ }
+ }
+ },
+ "range": [
+ 4590,
+ 4601
+ ],
+ "loc": {
+ "start": {
+ "line": 144,
+ "column": 17
+ },
+ "end": {
+ "line": 144,
+ "column": 28
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "MemberExpression",
+ "computed": true,
+ "object": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "ThisExpression",
+ "range": [
+ 4602,
+ 4606
+ ],
+ "loc": {
+ "start": {
+ "line": 144,
+ "column": 29
+ },
+ "end": {
+ "line": 144,
+ "column": 33
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "_data",
+ "range": [
+ 4607,
+ 4612
+ ],
+ "loc": {
+ "start": {
+ "line": 144,
+ "column": 34
+ },
+ "end": {
+ "line": 144,
+ "column": 39
+ }
+ }
+ },
+ "range": [
+ 4602,
+ 4612
+ ],
+ "loc": {
+ "start": {
+ "line": 144,
+ "column": 29
+ },
+ "end": {
+ "line": 144,
+ "column": 39
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 4613,
+ 4617
+ ],
+ "loc": {
+ "start": {
+ "line": 144,
+ "column": 40
+ },
+ "end": {
+ "line": 144,
+ "column": 44
+ }
+ }
+ },
+ "range": [
+ 4602,
+ 4618
+ ],
+ "loc": {
+ "start": {
+ "line": 144,
+ "column": 29
+ },
+ "end": {
+ "line": 144,
+ "column": 45
+ }
+ }
+ }
+ ],
+ "range": [
+ 4590,
+ 4619
+ ],
+ "loc": {
+ "start": {
+ "line": 144,
+ "column": 17
+ },
+ "end": {
+ "line": 144,
+ "column": 46
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "map",
+ "range": [
+ 4620,
+ 4623
+ ],
+ "loc": {
+ "start": {
+ "line": 144,
+ "column": 47
+ },
+ "end": {
+ "line": 144,
+ "column": 50
+ }
+ }
+ },
+ "range": [
+ 4590,
+ 4623
+ ],
+ "loc": {
+ "start": {
+ "line": 144,
+ "column": 17
+ },
+ "end": {
+ "line": 144,
+ "column": 50
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "ArrowFunctionExpression",
+ "id": null,
+ "params": [
+ {
+ "type": "Identifier",
+ "name": "x",
+ "range": [
+ 4624,
+ 4625
+ ],
+ "loc": {
+ "start": {
+ "line": 144,
+ "column": 51
+ },
+ "end": {
+ "line": 144,
+ "column": 52
+ }
+ }
+ }
+ ],
+ "body": {
+ "type": "MemberExpression",
+ "computed": true,
+ "object": {
+ "type": "MemberExpression",
+ "computed": true,
+ "object": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "ThisExpression",
+ "range": [
+ 4629,
+ 4633
+ ],
+ "loc": {
+ "start": {
+ "line": 144,
+ "column": 56
+ },
+ "end": {
+ "line": 144,
+ "column": 60
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "_data",
+ "range": [
+ 4634,
+ 4639
+ ],
+ "loc": {
+ "start": {
+ "line": 144,
+ "column": 61
+ },
+ "end": {
+ "line": 144,
+ "column": 66
+ }
+ }
+ },
+ "range": [
+ 4629,
+ 4639
+ ],
+ "loc": {
+ "start": {
+ "line": 144,
+ "column": 56
+ },
+ "end": {
+ "line": 144,
+ "column": 66
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 4640,
+ 4644
+ ],
+ "loc": {
+ "start": {
+ "line": 144,
+ "column": 67
+ },
+ "end": {
+ "line": 144,
+ "column": 71
+ }
+ }
+ },
+ "range": [
+ 4629,
+ 4645
+ ],
+ "loc": {
+ "start": {
+ "line": 144,
+ "column": 56
+ },
+ "end": {
+ "line": 144,
+ "column": 72
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "x",
+ "range": [
+ 4646,
+ 4647
+ ],
+ "loc": {
+ "start": {
+ "line": 144,
+ "column": 73
+ },
+ "end": {
+ "line": 144,
+ "column": 74
+ }
+ }
+ },
+ "range": [
+ 4629,
+ 4648
+ ],
+ "loc": {
+ "start": {
+ "line": 144,
+ "column": 56
+ },
+ "end": {
+ "line": 144,
+ "column": 75
+ }
+ }
+ },
+ "generator": false,
+ "expression": true,
+ "range": [
+ 4624,
+ 4648
+ ],
+ "loc": {
+ "start": {
+ "line": 144,
+ "column": 51
+ },
+ "end": {
+ "line": 144,
+ "column": 75
+ }
+ }
+ }
+ ],
+ "range": [
+ 4590,
+ 4649
+ ],
+ "loc": {
+ "start": {
+ "line": 144,
+ "column": 17
+ },
+ "end": {
+ "line": 144,
+ "column": 76
+ }
+ }
+ },
+ "range": [
+ 4583,
+ 4650
+ ],
+ "loc": {
+ "start": {
+ "line": 144,
+ "column": 10
+ },
+ "end": {
+ "line": 144,
+ "column": 77
+ }
+ }
+ }
+ ],
+ "range": [
+ 4571,
+ 4660
+ ],
+ "loc": {
+ "start": {
+ "line": 143,
+ "column": 15
+ },
+ "end": {
+ "line": 145,
+ "column": 9
+ }
+ }
+ },
+ "range": [
+ 4190,
+ 4660
+ ],
+ "loc": {
+ "start": {
+ "line": 131,
+ "column": 8
+ },
+ "end": {
+ "line": 145,
+ "column": 9
+ }
+ }
+ }
+ ],
+ "range": [
+ 4129,
+ 4668
+ ],
+ "loc": {
+ "start": {
+ "line": 129,
+ "column": 22
+ },
+ "end": {
+ "line": 146,
+ "column": 7
+ }
+ }
+ },
+ "alternate": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "ThrowStatement",
+ "argument": {
+ "type": "NewExpression",
+ "callee": {
+ "type": "Identifier",
+ "name": "TypeError",
+ "range": [
+ 4694,
+ 4703
+ ],
+ "loc": {
+ "start": {
+ "line": 147,
+ "column": 18
+ },
+ "end": {
+ "line": 147,
+ "column": 27
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "TemplateLiteral",
+ "quasis": [
+ {
+ "type": "TemplateElement",
+ "value": {
+ "raw": "Unknown type '",
+ "cooked": "Unknown type '"
+ },
+ "tail": false,
+ "range": [
+ 4704,
+ 4721
+ ],
+ "loc": {
+ "start": {
+ "line": 147,
+ "column": 28
+ },
+ "end": {
+ "line": 147,
+ "column": 45
+ }
+ }
+ },
+ {
+ "type": "TemplateElement",
+ "value": {
+ "raw": "'",
+ "cooked": "'"
+ },
+ "tail": true,
+ "range": [
+ 4725,
+ 4728
+ ],
+ "loc": {
+ "start": {
+ "line": 147,
+ "column": 49
+ },
+ "end": {
+ "line": 147,
+ "column": 52
+ }
+ }
+ }
+ ],
+ "expressions": [
+ {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 4721,
+ 4725
+ ],
+ "loc": {
+ "start": {
+ "line": 147,
+ "column": 45
+ },
+ "end": {
+ "line": 147,
+ "column": 49
+ }
+ }
+ }
+ ],
+ "range": [
+ 4704,
+ 4728
+ ],
+ "loc": {
+ "start": {
+ "line": 147,
+ "column": 28
+ },
+ "end": {
+ "line": 147,
+ "column": 52
+ }
+ }
+ }
+ ],
+ "range": [
+ 4690,
+ 4729
+ ],
+ "loc": {
+ "start": {
+ "line": 147,
+ "column": 14
+ },
+ "end": {
+ "line": 147,
+ "column": 53
+ }
+ }
+ },
+ "range": [
+ 4684,
+ 4730
+ ],
+ "loc": {
+ "start": {
+ "line": 147,
+ "column": 8
+ },
+ "end": {
+ "line": 147,
+ "column": 54
+ }
+ }
+ }
+ ],
+ "range": [
+ 4674,
+ 4738
+ ],
+ "loc": {
+ "start": {
+ "line": 146,
+ "column": 13
+ },
+ "end": {
+ "line": 148,
+ "column": 7
+ }
+ }
+ },
+ "range": [
+ 4113,
+ 4738
+ ],
+ "loc": {
+ "start": {
+ "line": 129,
+ "column": 6
+ },
+ "end": {
+ "line": 148,
+ "column": 7
+ }
+ }
+ }
+ ],
+ "range": [
+ 4067,
+ 4744
+ ],
+ "loc": {
+ "start": {
+ "line": 127,
+ "column": 14
+ },
+ "end": {
+ "line": 149,
+ "column": 5
+ }
+ }
+ },
+ "alternate": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "ThrowStatement",
+ "argument": {
+ "type": "NewExpression",
+ "callee": {
+ "type": "Identifier",
+ "name": "TypeError",
+ "range": [
+ 4768,
+ 4777
+ ],
+ "loc": {
+ "start": {
+ "line": 150,
+ "column": 16
+ },
+ "end": {
+ "line": 150,
+ "column": 25
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "TemplateLiteral",
+ "quasis": [
+ {
+ "type": "TemplateElement",
+ "value": {
+ "raw": "You must provide a type",
+ "cooked": "You must provide a type"
+ },
+ "tail": true,
+ "range": [
+ 4778,
+ 4803
+ ],
+ "loc": {
+ "start": {
+ "line": 150,
+ "column": 26
+ },
+ "end": {
+ "line": 150,
+ "column": 51
+ }
+ }
+ }
+ ],
+ "expressions": [],
+ "range": [
+ 4778,
+ 4803
+ ],
+ "loc": {
+ "start": {
+ "line": 150,
+ "column": 26
+ },
+ "end": {
+ "line": 150,
+ "column": 51
+ }
+ }
+ }
+ ],
+ "range": [
+ 4764,
+ 4804
+ ],
+ "loc": {
+ "start": {
+ "line": 150,
+ "column": 12
+ },
+ "end": {
+ "line": 150,
+ "column": 52
+ }
+ }
+ },
+ "range": [
+ 4758,
+ 4805
+ ],
+ "loc": {
+ "start": {
+ "line": 150,
+ "column": 6
+ },
+ "end": {
+ "line": 150,
+ "column": 53
+ }
+ }
+ }
+ ],
+ "range": [
+ 4750,
+ 4811
+ ],
+ "loc": {
+ "start": {
+ "line": 149,
+ "column": 11
+ },
+ "end": {
+ "line": 151,
+ "column": 5
+ }
+ }
+ },
+ "range": [
+ 4057,
+ 4811
+ ],
+ "loc": {
+ "start": {
+ "line": 127,
+ "column": 4
+ },
+ "end": {
+ "line": 151,
+ "column": 5
+ }
+ }
+ }
+ ],
+ "range": [
+ 4031,
+ 4815
+ ],
+ "loc": {
+ "start": {
+ "line": 125,
+ "column": 17
+ },
+ "end": {
+ "line": 152,
+ "column": 3
+ }
+ }
+ },
+ "generator": false,
+ "expression": false,
+ "range": [
+ 4020,
+ 4815
+ ],
+ "loc": {
+ "start": {
+ "line": 125,
+ "column": 6
+ },
+ "end": {
+ "line": 152,
+ "column": 3
+ }
+ }
+ },
+ "kind": "method",
+ "computed": false,
+ "range": [
+ 4016,
+ 4815
+ ],
+ "loc": {
+ "start": {
+ "line": 125,
+ "column": 2
+ },
+ "end": {
+ "line": 152,
+ "column": 3
+ }
+ },
+ "leadingComments": [
+ {
+ "type": "Block",
+ "value": "*\n * Find a resource or entire collection of resources.\n *\n * NOTE: If the resource hasn't been loaded via an add() or push() call it\n * will be automatically created when find is called.\n *\n * @param {!string} type - Type of the resource(s) to find.\n * @param {string} [id] - The id of the resource to find. If omitted all\n * resources of the type will be returned.\n * @return {Object|Object[]} - Either the resource or an array of resources.\n ",
+ "range": [
+ 3521,
+ 4013
+ ],
+ "loc": {
+ "start": {
+ "line": 114,
+ "column": 2
+ },
+ "end": {
+ "line": 124,
+ "column": 5
+ }
+ }
+ }
+ ],
+ "trailingComments": [
+ {
+ "type": "Block",
+ "value": "*\n * Add a JSON API response to the store. This method can be used to handle a\n * successful GET or POST response from the server.\n *\n * @param {Object} root - Top Level Object to push. See:\n http://jsonapi.org/format/#document-top-level\n * @return {undefined} - Doesn't return anything.\n ",
+ "range": [
+ 4819,
+ 5151
+ ],
+ "loc": {
+ "start": {
+ "line": 154,
+ "column": 2
+ },
+ "end": {
+ "line": 161,
+ "column": 5
+ }
+ }
+ }
+ ],
+ "static": false
+ },
+ {
+ "type": "MethodDefinition",
+ "key": {
+ "type": "Identifier",
+ "name": "push",
+ "range": [
+ 5154,
+ 5158
+ ],
+ "loc": {
+ "start": {
+ "line": 162,
+ "column": 2
+ },
+ "end": {
+ "line": 162,
+ "column": 6
+ }
+ }
+ },
+ "value": {
+ "type": "FunctionExpression",
+ "id": null,
+ "params": [
+ {
+ "type": "Identifier",
+ "name": "root",
+ "range": [
+ 5159,
+ 5163
+ ],
+ "loc": {
+ "start": {
+ "line": 162,
+ "column": 7
+ },
+ "end": {
+ "line": 162,
+ "column": 11
+ }
+ }
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "IfStatement",
+ "test": {
+ "type": "BinaryExpression",
+ "operator": "===",
+ "left": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "root",
+ "range": [
+ 5175,
+ 5179
+ ],
+ "loc": {
+ "start": {
+ "line": 163,
+ "column": 8
+ },
+ "end": {
+ "line": 163,
+ "column": 12
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "data",
+ "range": [
+ 5180,
+ 5184
+ ],
+ "loc": {
+ "start": {
+ "line": 163,
+ "column": 13
+ },
+ "end": {
+ "line": 163,
+ "column": 17
+ }
+ }
+ },
+ "range": [
+ 5175,
+ 5184
+ ],
+ "loc": {
+ "start": {
+ "line": 163,
+ "column": 8
+ },
+ "end": {
+ "line": 163,
+ "column": 17
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "constructor",
+ "range": [
+ 5185,
+ 5196
+ ],
+ "loc": {
+ "start": {
+ "line": 163,
+ "column": 18
+ },
+ "end": {
+ "line": 163,
+ "column": 29
+ }
+ }
+ },
+ "range": [
+ 5175,
+ 5196
+ ],
+ "loc": {
+ "start": {
+ "line": 163,
+ "column": 8
+ },
+ "end": {
+ "line": 163,
+ "column": 29
+ }
+ }
+ },
+ "right": {
+ "type": "Identifier",
+ "name": "Array",
+ "range": [
+ 5201,
+ 5206
+ ],
+ "loc": {
+ "start": {
+ "line": 163,
+ "column": 34
+ },
+ "end": {
+ "line": 163,
+ "column": 39
+ }
+ }
+ },
+ "range": [
+ 5175,
+ 5206
+ ],
+ "loc": {
+ "start": {
+ "line": 163,
+ "column": 8
+ },
+ "end": {
+ "line": 163,
+ "column": 39
+ }
+ }
+ },
+ "consequent": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "expression": {
+ "type": "CallExpression",
+ "callee": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "root",
+ "range": [
+ 5216,
+ 5220
+ ],
+ "loc": {
+ "start": {
+ "line": 164,
+ "column": 6
+ },
+ "end": {
+ "line": 164,
+ "column": 10
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "data",
+ "range": [
+ 5221,
+ 5225
+ ],
+ "loc": {
+ "start": {
+ "line": 164,
+ "column": 11
+ },
+ "end": {
+ "line": 164,
+ "column": 15
+ }
+ }
+ },
+ "range": [
+ 5216,
+ 5225
+ ],
+ "loc": {
+ "start": {
+ "line": 164,
+ "column": 6
+ },
+ "end": {
+ "line": 164,
+ "column": 15
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "forEach",
+ "range": [
+ 5226,
+ 5233
+ ],
+ "loc": {
+ "start": {
+ "line": 164,
+ "column": 16
+ },
+ "end": {
+ "line": 164,
+ "column": 23
+ }
+ }
+ },
+ "range": [
+ 5216,
+ 5233
+ ],
+ "loc": {
+ "start": {
+ "line": 164,
+ "column": 6
+ },
+ "end": {
+ "line": 164,
+ "column": 23
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "ArrowFunctionExpression",
+ "id": null,
+ "params": [
+ {
+ "type": "Identifier",
+ "name": "x",
+ "range": [
+ 5234,
+ 5235
+ ],
+ "loc": {
+ "start": {
+ "line": 164,
+ "column": 24
+ },
+ "end": {
+ "line": 164,
+ "column": 25
+ }
+ }
+ }
+ ],
+ "body": {
+ "type": "CallExpression",
+ "callee": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "ThisExpression",
+ "range": [
+ 5239,
+ 5243
+ ],
+ "loc": {
+ "start": {
+ "line": 164,
+ "column": 29
+ },
+ "end": {
+ "line": 164,
+ "column": 33
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "add",
+ "range": [
+ 5244,
+ 5247
+ ],
+ "loc": {
+ "start": {
+ "line": 164,
+ "column": 34
+ },
+ "end": {
+ "line": 164,
+ "column": 37
+ }
+ }
+ },
+ "range": [
+ 5239,
+ 5247
+ ],
+ "loc": {
+ "start": {
+ "line": 164,
+ "column": 29
+ },
+ "end": {
+ "line": 164,
+ "column": 37
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "Identifier",
+ "name": "x",
+ "range": [
+ 5248,
+ 5249
+ ],
+ "loc": {
+ "start": {
+ "line": 164,
+ "column": 38
+ },
+ "end": {
+ "line": 164,
+ "column": 39
+ }
+ }
+ }
+ ],
+ "range": [
+ 5239,
+ 5250
+ ],
+ "loc": {
+ "start": {
+ "line": 164,
+ "column": 29
+ },
+ "end": {
+ "line": 164,
+ "column": 40
+ }
+ }
+ },
+ "generator": false,
+ "expression": true,
+ "range": [
+ 5234,
+ 5250
+ ],
+ "loc": {
+ "start": {
+ "line": 164,
+ "column": 24
+ },
+ "end": {
+ "line": 164,
+ "column": 40
+ }
+ }
+ }
+ ],
+ "range": [
+ 5216,
+ 5251
+ ],
+ "loc": {
+ "start": {
+ "line": 164,
+ "column": 6
+ },
+ "end": {
+ "line": 164,
+ "column": 41
+ }
+ }
+ },
+ "range": [
+ 5216,
+ 5252
+ ],
+ "loc": {
+ "start": {
+ "line": 164,
+ "column": 6
+ },
+ "end": {
+ "line": 164,
+ "column": 42
+ }
+ }
+ }
+ ],
+ "range": [
+ 5208,
+ 5258
+ ],
+ "loc": {
+ "start": {
+ "line": 163,
+ "column": 41
+ },
+ "end": {
+ "line": 165,
+ "column": 5
+ }
+ }
+ },
+ "alternate": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "expression": {
+ "type": "CallExpression",
+ "callee": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "ThisExpression",
+ "range": [
+ 5272,
+ 5276
+ ],
+ "loc": {
+ "start": {
+ "line": 166,
+ "column": 6
+ },
+ "end": {
+ "line": 166,
+ "column": 10
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "add",
+ "range": [
+ 5277,
+ 5280
+ ],
+ "loc": {
+ "start": {
+ "line": 166,
+ "column": 11
+ },
+ "end": {
+ "line": 166,
+ "column": 14
+ }
+ }
+ },
+ "range": [
+ 5272,
+ 5280
+ ],
+ "loc": {
+ "start": {
+ "line": 166,
+ "column": 6
+ },
+ "end": {
+ "line": 166,
+ "column": 14
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "root",
+ "range": [
+ 5281,
+ 5285
+ ],
+ "loc": {
+ "start": {
+ "line": 166,
+ "column": 15
+ },
+ "end": {
+ "line": 166,
+ "column": 19
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "data",
+ "range": [
+ 5286,
+ 5290
+ ],
+ "loc": {
+ "start": {
+ "line": 166,
+ "column": 20
+ },
+ "end": {
+ "line": 166,
+ "column": 24
+ }
+ }
+ },
+ "range": [
+ 5281,
+ 5290
+ ],
+ "loc": {
+ "start": {
+ "line": 166,
+ "column": 15
+ },
+ "end": {
+ "line": 166,
+ "column": 24
+ }
+ }
+ }
+ ],
+ "range": [
+ 5272,
+ 5291
+ ],
+ "loc": {
+ "start": {
+ "line": 166,
+ "column": 6
+ },
+ "end": {
+ "line": 166,
+ "column": 25
+ }
+ }
+ },
+ "range": [
+ 5272,
+ 5292
+ ],
+ "loc": {
+ "start": {
+ "line": 166,
+ "column": 6
+ },
+ "end": {
+ "line": 166,
+ "column": 26
+ }
+ }
+ }
+ ],
+ "range": [
+ 5264,
+ 5298
+ ],
+ "loc": {
+ "start": {
+ "line": 165,
+ "column": 11
+ },
+ "end": {
+ "line": 167,
+ "column": 5
+ }
+ }
+ },
+ "range": [
+ 5171,
+ 5298
+ ],
+ "loc": {
+ "start": {
+ "line": 163,
+ "column": 4
+ },
+ "end": {
+ "line": 167,
+ "column": 5
+ }
+ }
+ },
+ {
+ "type": "IfStatement",
+ "test": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "root",
+ "range": [
+ 5307,
+ 5311
+ ],
+ "loc": {
+ "start": {
+ "line": 168,
+ "column": 8
+ },
+ "end": {
+ "line": 168,
+ "column": 12
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "included",
+ "range": [
+ 5312,
+ 5320
+ ],
+ "loc": {
+ "start": {
+ "line": 168,
+ "column": 13
+ },
+ "end": {
+ "line": 168,
+ "column": 21
+ }
+ }
+ },
+ "range": [
+ 5307,
+ 5320
+ ],
+ "loc": {
+ "start": {
+ "line": 168,
+ "column": 8
+ },
+ "end": {
+ "line": 168,
+ "column": 21
+ }
+ }
+ },
+ "consequent": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "expression": {
+ "type": "CallExpression",
+ "callee": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "root",
+ "range": [
+ 5330,
+ 5334
+ ],
+ "loc": {
+ "start": {
+ "line": 169,
+ "column": 6
+ },
+ "end": {
+ "line": 169,
+ "column": 10
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "included",
+ "range": [
+ 5335,
+ 5343
+ ],
+ "loc": {
+ "start": {
+ "line": 169,
+ "column": 11
+ },
+ "end": {
+ "line": 169,
+ "column": 19
+ }
+ }
+ },
+ "range": [
+ 5330,
+ 5343
+ ],
+ "loc": {
+ "start": {
+ "line": 169,
+ "column": 6
+ },
+ "end": {
+ "line": 169,
+ "column": 19
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "forEach",
+ "range": [
+ 5344,
+ 5351
+ ],
+ "loc": {
+ "start": {
+ "line": 169,
+ "column": 20
+ },
+ "end": {
+ "line": 169,
+ "column": 27
+ }
+ }
+ },
+ "range": [
+ 5330,
+ 5351
+ ],
+ "loc": {
+ "start": {
+ "line": 169,
+ "column": 6
+ },
+ "end": {
+ "line": 169,
+ "column": 27
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "ArrowFunctionExpression",
+ "id": null,
+ "params": [
+ {
+ "type": "Identifier",
+ "name": "x",
+ "range": [
+ 5352,
+ 5353
+ ],
+ "loc": {
+ "start": {
+ "line": 169,
+ "column": 28
+ },
+ "end": {
+ "line": 169,
+ "column": 29
+ }
+ }
+ }
+ ],
+ "body": {
+ "type": "CallExpression",
+ "callee": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "ThisExpression",
+ "range": [
+ 5357,
+ 5361
+ ],
+ "loc": {
+ "start": {
+ "line": 169,
+ "column": 33
+ },
+ "end": {
+ "line": 169,
+ "column": 37
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "add",
+ "range": [
+ 5362,
+ 5365
+ ],
+ "loc": {
+ "start": {
+ "line": 169,
+ "column": 38
+ },
+ "end": {
+ "line": 169,
+ "column": 41
+ }
+ }
+ },
+ "range": [
+ 5357,
+ 5365
+ ],
+ "loc": {
+ "start": {
+ "line": 169,
+ "column": 33
+ },
+ "end": {
+ "line": 169,
+ "column": 41
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "Identifier",
+ "name": "x",
+ "range": [
+ 5366,
+ 5367
+ ],
+ "loc": {
+ "start": {
+ "line": 169,
+ "column": 42
+ },
+ "end": {
+ "line": 169,
+ "column": 43
+ }
+ }
+ }
+ ],
+ "range": [
+ 5357,
+ 5368
+ ],
+ "loc": {
+ "start": {
+ "line": 169,
+ "column": 33
+ },
+ "end": {
+ "line": 169,
+ "column": 44
+ }
+ }
+ },
+ "generator": false,
+ "expression": true,
+ "range": [
+ 5352,
+ 5368
+ ],
+ "loc": {
+ "start": {
+ "line": 169,
+ "column": 28
+ },
+ "end": {
+ "line": 169,
+ "column": 44
+ }
+ }
+ }
+ ],
+ "range": [
+ 5330,
+ 5369
+ ],
+ "loc": {
+ "start": {
+ "line": 169,
+ "column": 6
+ },
+ "end": {
+ "line": 169,
+ "column": 45
+ }
+ }
+ },
+ "range": [
+ 5330,
+ 5370
+ ],
+ "loc": {
+ "start": {
+ "line": 169,
+ "column": 6
+ },
+ "end": {
+ "line": 169,
+ "column": 46
+ }
+ }
+ }
+ ],
+ "range": [
+ 5322,
+ 5376
+ ],
+ "loc": {
+ "start": {
+ "line": 168,
+ "column": 23
+ },
+ "end": {
+ "line": 170,
+ "column": 5
+ }
+ }
+ },
+ "alternate": null,
+ "range": [
+ 5303,
+ 5376
+ ],
+ "loc": {
+ "start": {
+ "line": 168,
+ "column": 4
+ },
+ "end": {
+ "line": 170,
+ "column": 5
+ }
+ }
+ }
+ ],
+ "range": [
+ 5165,
+ 5380
+ ],
+ "loc": {
+ "start": {
+ "line": 162,
+ "column": 13
+ },
+ "end": {
+ "line": 171,
+ "column": 3
+ }
+ }
+ },
+ "generator": false,
+ "expression": false,
+ "range": [
+ 5158,
+ 5380
+ ],
+ "loc": {
+ "start": {
+ "line": 162,
+ "column": 6
+ },
+ "end": {
+ "line": 171,
+ "column": 3
+ }
+ }
+ },
+ "kind": "method",
+ "computed": false,
+ "range": [
+ 5154,
+ 5380
+ ],
+ "loc": {
+ "start": {
+ "line": 162,
+ "column": 2
+ },
+ "end": {
+ "line": 171,
+ "column": 3
+ }
+ },
+ "leadingComments": [
+ {
+ "type": "Block",
+ "value": "*\n * Add a JSON API response to the store. This method can be used to handle a\n * successful GET or POST response from the server.\n *\n * @param {Object} root - Top Level Object to push. See:\n http://jsonapi.org/format/#document-top-level\n * @return {undefined} - Doesn't return anything.\n ",
+ "range": [
+ 4819,
+ 5151
+ ],
+ "loc": {
+ "start": {
+ "line": 154,
+ "column": 2
+ },
+ "end": {
+ "line": 161,
+ "column": 5
+ }
+ }
+ }
+ ],
+ "trailingComments": [
+ {
+ "type": "Block",
+ "value": "*\n * Remove a resource or collection of resources from the store.\n *\n * @param {!string} type - Type of the resource(s) to remove.\n * @param {string} [id] - The id of the resource to remove. If omitted all\n * resources of the type will be removed.\n * @return {undefined} - Doesn't return anything.\n ",
+ "range": [
+ 5384,
+ 5724
+ ],
+ "loc": {
+ "start": {
+ "line": 173,
+ "column": 2
+ },
+ "end": {
+ "line": 180,
+ "column": 5
+ }
+ }
+ }
+ ],
+ "static": false
+ },
+ {
+ "type": "MethodDefinition",
+ "key": {
+ "type": "Identifier",
+ "name": "remove",
+ "range": [
+ 5727,
+ 5733
+ ],
+ "loc": {
+ "start": {
+ "line": 181,
+ "column": 2
+ },
+ "end": {
+ "line": 181,
+ "column": 8
+ }
+ }
+ },
+ "value": {
+ "type": "FunctionExpression",
+ "id": null,
+ "params": [
+ {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 5734,
+ 5738
+ ],
+ "loc": {
+ "start": {
+ "line": 181,
+ "column": 9
+ },
+ "end": {
+ "line": 181,
+ "column": 13
+ }
+ }
+ },
+ {
+ "type": "Identifier",
+ "name": "id",
+ "range": [
+ 5740,
+ 5742
+ ],
+ "loc": {
+ "start": {
+ "line": 181,
+ "column": 15
+ },
+ "end": {
+ "line": 181,
+ "column": 17
+ }
+ }
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "IfStatement",
+ "test": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 5754,
+ 5758
+ ],
+ "loc": {
+ "start": {
+ "line": 182,
+ "column": 8
+ },
+ "end": {
+ "line": 182,
+ "column": 12
+ }
+ }
+ },
+ "consequent": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "IfStatement",
+ "test": {
+ "type": "MemberExpression",
+ "computed": true,
+ "object": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "Store",
+ "range": [
+ 5772,
+ 5777
+ ],
+ "loc": {
+ "start": {
+ "line": 183,
+ "column": 10
+ },
+ "end": {
+ "line": 183,
+ "column": 15
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "types",
+ "range": [
+ 5778,
+ 5783
+ ],
+ "loc": {
+ "start": {
+ "line": 183,
+ "column": 16
+ },
+ "end": {
+ "line": 183,
+ "column": 21
+ }
+ }
+ },
+ "range": [
+ 5772,
+ 5783
+ ],
+ "loc": {
+ "start": {
+ "line": 183,
+ "column": 10
+ },
+ "end": {
+ "line": 183,
+ "column": 21
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 5784,
+ 5788
+ ],
+ "loc": {
+ "start": {
+ "line": 183,
+ "column": 22
+ },
+ "end": {
+ "line": 183,
+ "column": 26
+ }
+ }
+ },
+ "range": [
+ 5772,
+ 5789
+ ],
+ "loc": {
+ "start": {
+ "line": 183,
+ "column": 10
+ },
+ "end": {
+ "line": 183,
+ "column": 27
+ }
+ }
+ },
+ "consequent": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "IfStatement",
+ "test": {
+ "type": "Identifier",
+ "name": "id",
+ "range": [
+ 5805,
+ 5807
+ ],
+ "loc": {
+ "start": {
+ "line": 184,
+ "column": 12
+ },
+ "end": {
+ "line": 184,
+ "column": 14
+ }
+ }
+ },
+ "consequent": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "id": {
+ "type": "Identifier",
+ "name": "resource",
+ "range": [
+ 5825,
+ 5833
+ ],
+ "loc": {
+ "start": {
+ "line": 185,
+ "column": 14
+ },
+ "end": {
+ "line": 185,
+ "column": 22
+ }
+ }
+ },
+ "init": {
+ "type": "MemberExpression",
+ "computed": true,
+ "object": {
+ "type": "MemberExpression",
+ "computed": true,
+ "object": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "ThisExpression",
+ "range": [
+ 5836,
+ 5840
+ ],
+ "loc": {
+ "start": {
+ "line": 185,
+ "column": 25
+ },
+ "end": {
+ "line": 185,
+ "column": 29
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "_data",
+ "range": [
+ 5841,
+ 5846
+ ],
+ "loc": {
+ "start": {
+ "line": 185,
+ "column": 30
+ },
+ "end": {
+ "line": 185,
+ "column": 35
+ }
+ }
+ },
+ "range": [
+ 5836,
+ 5846
+ ],
+ "loc": {
+ "start": {
+ "line": 185,
+ "column": 25
+ },
+ "end": {
+ "line": 185,
+ "column": 35
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 5847,
+ 5851
+ ],
+ "loc": {
+ "start": {
+ "line": 185,
+ "column": 36
+ },
+ "end": {
+ "line": 185,
+ "column": 40
+ }
+ }
+ },
+ "range": [
+ 5836,
+ 5852
+ ],
+ "loc": {
+ "start": {
+ "line": 185,
+ "column": 25
+ },
+ "end": {
+ "line": 185,
+ "column": 41
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "id",
+ "range": [
+ 5853,
+ 5855
+ ],
+ "loc": {
+ "start": {
+ "line": 185,
+ "column": 42
+ },
+ "end": {
+ "line": 185,
+ "column": 44
+ }
+ }
+ },
+ "range": [
+ 5836,
+ 5856
+ ],
+ "loc": {
+ "start": {
+ "line": 185,
+ "column": 25
+ },
+ "end": {
+ "line": 185,
+ "column": 45
+ }
+ }
+ },
+ "range": [
+ 5825,
+ 5856
+ ],
+ "loc": {
+ "start": {
+ "line": 185,
+ "column": 14
+ },
+ "end": {
+ "line": 185,
+ "column": 45
+ }
+ }
+ }
+ ],
+ "kind": "let",
+ "range": [
+ 5821,
+ 5857
+ ],
+ "loc": {
+ "start": {
+ "line": 185,
+ "column": 10
+ },
+ "end": {
+ "line": 185,
+ "column": 46
+ }
+ }
+ },
+ {
+ "type": "IfStatement",
+ "test": {
+ "type": "Identifier",
+ "name": "resource",
+ "range": [
+ 5872,
+ 5880
+ ],
+ "loc": {
+ "start": {
+ "line": 186,
+ "column": 14
+ },
+ "end": {
+ "line": 186,
+ "column": 22
+ }
+ }
+ },
+ "consequent": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "expression": {
+ "type": "CallExpression",
+ "callee": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "ThisExpression",
+ "range": [
+ 5896,
+ 5900
+ ],
+ "loc": {
+ "start": {
+ "line": 187,
+ "column": 12
+ },
+ "end": {
+ "line": 187,
+ "column": 16
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "_remove",
+ "range": [
+ 5901,
+ 5908
+ ],
+ "loc": {
+ "start": {
+ "line": 187,
+ "column": 17
+ },
+ "end": {
+ "line": 187,
+ "column": 24
+ }
+ }
+ },
+ "range": [
+ 5896,
+ 5908
+ ],
+ "loc": {
+ "start": {
+ "line": 187,
+ "column": 12
+ },
+ "end": {
+ "line": 187,
+ "column": 24
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "Identifier",
+ "name": "resource",
+ "range": [
+ 5909,
+ 5917
+ ],
+ "loc": {
+ "start": {
+ "line": 187,
+ "column": 25
+ },
+ "end": {
+ "line": 187,
+ "column": 33
+ }
+ }
+ }
+ ],
+ "range": [
+ 5896,
+ 5918
+ ],
+ "loc": {
+ "start": {
+ "line": 187,
+ "column": 12
+ },
+ "end": {
+ "line": 187,
+ "column": 34
+ }
+ }
+ },
+ "range": [
+ 5896,
+ 5919
+ ],
+ "loc": {
+ "start": {
+ "line": 187,
+ "column": 12
+ },
+ "end": {
+ "line": 187,
+ "column": 35
+ }
+ }
+ }
+ ],
+ "range": [
+ 5882,
+ 5931
+ ],
+ "loc": {
+ "start": {
+ "line": 186,
+ "column": 24
+ },
+ "end": {
+ "line": 188,
+ "column": 11
+ }
+ }
+ },
+ "alternate": null,
+ "range": [
+ 5868,
+ 5931
+ ],
+ "loc": {
+ "start": {
+ "line": 186,
+ "column": 10
+ },
+ "end": {
+ "line": 188,
+ "column": 11
+ }
+ }
+ }
+ ],
+ "range": [
+ 5809,
+ 5941
+ ],
+ "loc": {
+ "start": {
+ "line": 184,
+ "column": 16
+ },
+ "end": {
+ "line": 189,
+ "column": 9
+ }
+ }
+ },
+ "alternate": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "expression": {
+ "type": "CallExpression",
+ "callee": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "CallExpression",
+ "callee": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "Object",
+ "range": [
+ 5959,
+ 5965
+ ],
+ "loc": {
+ "start": {
+ "line": 190,
+ "column": 10
+ },
+ "end": {
+ "line": 190,
+ "column": 16
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "keys",
+ "range": [
+ 5966,
+ 5970
+ ],
+ "loc": {
+ "start": {
+ "line": 190,
+ "column": 17
+ },
+ "end": {
+ "line": 190,
+ "column": 21
+ }
+ }
+ },
+ "range": [
+ 5959,
+ 5970
+ ],
+ "loc": {
+ "start": {
+ "line": 190,
+ "column": 10
+ },
+ "end": {
+ "line": 190,
+ "column": 21
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "MemberExpression",
+ "computed": true,
+ "object": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "ThisExpression",
+ "range": [
+ 5971,
+ 5975
+ ],
+ "loc": {
+ "start": {
+ "line": 190,
+ "column": 22
+ },
+ "end": {
+ "line": 190,
+ "column": 26
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "_data",
+ "range": [
+ 5976,
+ 5981
+ ],
+ "loc": {
+ "start": {
+ "line": 190,
+ "column": 27
+ },
+ "end": {
+ "line": 190,
+ "column": 32
+ }
+ }
+ },
+ "range": [
+ 5971,
+ 5981
+ ],
+ "loc": {
+ "start": {
+ "line": 190,
+ "column": 22
+ },
+ "end": {
+ "line": 190,
+ "column": 32
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 5982,
+ 5986
+ ],
+ "loc": {
+ "start": {
+ "line": 190,
+ "column": 33
+ },
+ "end": {
+ "line": 190,
+ "column": 37
+ }
+ }
+ },
+ "range": [
+ 5971,
+ 5987
+ ],
+ "loc": {
+ "start": {
+ "line": 190,
+ "column": 22
+ },
+ "end": {
+ "line": 190,
+ "column": 38
+ }
+ }
+ }
+ ],
+ "range": [
+ 5959,
+ 5988
+ ],
+ "loc": {
+ "start": {
+ "line": 190,
+ "column": 10
+ },
+ "end": {
+ "line": 190,
+ "column": 39
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "forEach",
+ "range": [
+ 5989,
+ 5996
+ ],
+ "loc": {
+ "start": {
+ "line": 190,
+ "column": 40
+ },
+ "end": {
+ "line": 190,
+ "column": 47
+ }
+ }
+ },
+ "range": [
+ 5959,
+ 5996
+ ],
+ "loc": {
+ "start": {
+ "line": 190,
+ "column": 10
+ },
+ "end": {
+ "line": 190,
+ "column": 47
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "ArrowFunctionExpression",
+ "id": null,
+ "params": [
+ {
+ "type": "Identifier",
+ "name": "id",
+ "range": [
+ 5997,
+ 5999
+ ],
+ "loc": {
+ "start": {
+ "line": 190,
+ "column": 48
+ },
+ "end": {
+ "line": 190,
+ "column": 50
+ }
+ }
+ }
+ ],
+ "body": {
+ "type": "CallExpression",
+ "callee": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "ThisExpression",
+ "range": [
+ 6003,
+ 6007
+ ],
+ "loc": {
+ "start": {
+ "line": 190,
+ "column": 54
+ },
+ "end": {
+ "line": 190,
+ "column": 58
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "remove",
+ "range": [
+ 6008,
+ 6014
+ ],
+ "loc": {
+ "start": {
+ "line": 190,
+ "column": 59
+ },
+ "end": {
+ "line": 190,
+ "column": 65
+ }
+ }
+ },
+ "range": [
+ 6003,
+ 6014
+ ],
+ "loc": {
+ "start": {
+ "line": 190,
+ "column": 54
+ },
+ "end": {
+ "line": 190,
+ "column": 65
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 6015,
+ 6019
+ ],
+ "loc": {
+ "start": {
+ "line": 190,
+ "column": 66
+ },
+ "end": {
+ "line": 190,
+ "column": 70
+ }
+ }
+ },
+ {
+ "type": "Identifier",
+ "name": "id",
+ "range": [
+ 6021,
+ 6023
+ ],
+ "loc": {
+ "start": {
+ "line": 190,
+ "column": 72
+ },
+ "end": {
+ "line": 190,
+ "column": 74
+ }
+ }
+ }
+ ],
+ "range": [
+ 6003,
+ 6024
+ ],
+ "loc": {
+ "start": {
+ "line": 190,
+ "column": 54
+ },
+ "end": {
+ "line": 190,
+ "column": 75
+ }
+ }
+ },
+ "generator": false,
+ "expression": true,
+ "range": [
+ 5997,
+ 6024
+ ],
+ "loc": {
+ "start": {
+ "line": 190,
+ "column": 48
+ },
+ "end": {
+ "line": 190,
+ "column": 75
+ }
+ }
+ }
+ ],
+ "range": [
+ 5959,
+ 6025
+ ],
+ "loc": {
+ "start": {
+ "line": 190,
+ "column": 10
+ },
+ "end": {
+ "line": 190,
+ "column": 76
+ }
+ }
+ },
+ "range": [
+ 5959,
+ 6026
+ ],
+ "loc": {
+ "start": {
+ "line": 190,
+ "column": 10
+ },
+ "end": {
+ "line": 190,
+ "column": 77
+ }
+ }
+ }
+ ],
+ "range": [
+ 5947,
+ 6036
+ ],
+ "loc": {
+ "start": {
+ "line": 189,
+ "column": 15
+ },
+ "end": {
+ "line": 191,
+ "column": 9
+ }
+ }
+ },
+ "range": [
+ 5801,
+ 6036
+ ],
+ "loc": {
+ "start": {
+ "line": 184,
+ "column": 8
+ },
+ "end": {
+ "line": 191,
+ "column": 9
+ }
+ }
+ }
+ ],
+ "range": [
+ 5791,
+ 6044
+ ],
+ "loc": {
+ "start": {
+ "line": 183,
+ "column": 29
+ },
+ "end": {
+ "line": 192,
+ "column": 7
+ }
+ }
+ },
+ "alternate": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "ThrowStatement",
+ "argument": {
+ "type": "NewExpression",
+ "callee": {
+ "type": "Identifier",
+ "name": "TypeError",
+ "range": [
+ 6070,
+ 6079
+ ],
+ "loc": {
+ "start": {
+ "line": 193,
+ "column": 18
+ },
+ "end": {
+ "line": 193,
+ "column": 27
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "TemplateLiteral",
+ "quasis": [
+ {
+ "type": "TemplateElement",
+ "value": {
+ "raw": "Unknown type '",
+ "cooked": "Unknown type '"
+ },
+ "tail": false,
+ "range": [
+ 6080,
+ 6097
+ ],
+ "loc": {
+ "start": {
+ "line": 193,
+ "column": 28
+ },
+ "end": {
+ "line": 193,
+ "column": 45
+ }
+ }
+ },
+ {
+ "type": "TemplateElement",
+ "value": {
+ "raw": "'",
+ "cooked": "'"
+ },
+ "tail": true,
+ "range": [
+ 6101,
+ 6104
+ ],
+ "loc": {
+ "start": {
+ "line": 193,
+ "column": 49
+ },
+ "end": {
+ "line": 193,
+ "column": 52
+ }
+ }
+ }
+ ],
+ "expressions": [
+ {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 6097,
+ 6101
+ ],
+ "loc": {
+ "start": {
+ "line": 193,
+ "column": 45
+ },
+ "end": {
+ "line": 193,
+ "column": 49
+ }
+ }
+ }
+ ],
+ "range": [
+ 6080,
+ 6104
+ ],
+ "loc": {
+ "start": {
+ "line": 193,
+ "column": 28
+ },
+ "end": {
+ "line": 193,
+ "column": 52
+ }
+ }
+ }
+ ],
+ "range": [
+ 6066,
+ 6105
+ ],
+ "loc": {
+ "start": {
+ "line": 193,
+ "column": 14
+ },
+ "end": {
+ "line": 193,
+ "column": 53
+ }
+ }
+ },
+ "range": [
+ 6060,
+ 6106
+ ],
+ "loc": {
+ "start": {
+ "line": 193,
+ "column": 8
+ },
+ "end": {
+ "line": 193,
+ "column": 54
+ }
+ }
+ }
+ ],
+ "range": [
+ 6050,
+ 6114
+ ],
+ "loc": {
+ "start": {
+ "line": 192,
+ "column": 13
+ },
+ "end": {
+ "line": 194,
+ "column": 7
+ }
+ }
+ },
+ "range": [
+ 5768,
+ 6114
+ ],
+ "loc": {
+ "start": {
+ "line": 183,
+ "column": 6
+ },
+ "end": {
+ "line": 194,
+ "column": 7
+ }
+ }
+ }
+ ],
+ "range": [
+ 5760,
+ 6120
+ ],
+ "loc": {
+ "start": {
+ "line": 182,
+ "column": 14
+ },
+ "end": {
+ "line": 195,
+ "column": 5
+ }
+ }
+ },
+ "alternate": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "ThrowStatement",
+ "argument": {
+ "type": "NewExpression",
+ "callee": {
+ "type": "Identifier",
+ "name": "TypeError",
+ "range": [
+ 6144,
+ 6153
+ ],
+ "loc": {
+ "start": {
+ "line": 196,
+ "column": 16
+ },
+ "end": {
+ "line": 196,
+ "column": 25
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "TemplateLiteral",
+ "quasis": [
+ {
+ "type": "TemplateElement",
+ "value": {
+ "raw": "You must provide a type to remove",
+ "cooked": "You must provide a type to remove"
+ },
+ "tail": true,
+ "range": [
+ 6154,
+ 6189
+ ],
+ "loc": {
+ "start": {
+ "line": 196,
+ "column": 26
+ },
+ "end": {
+ "line": 196,
+ "column": 61
+ }
+ }
+ }
+ ],
+ "expressions": [],
+ "range": [
+ 6154,
+ 6189
+ ],
+ "loc": {
+ "start": {
+ "line": 196,
+ "column": 26
+ },
+ "end": {
+ "line": 196,
+ "column": 61
+ }
+ }
+ }
+ ],
+ "range": [
+ 6140,
+ 6190
+ ],
+ "loc": {
+ "start": {
+ "line": 196,
+ "column": 12
+ },
+ "end": {
+ "line": 196,
+ "column": 62
+ }
+ }
+ },
+ "range": [
+ 6134,
+ 6191
+ ],
+ "loc": {
+ "start": {
+ "line": 196,
+ "column": 6
+ },
+ "end": {
+ "line": 196,
+ "column": 63
+ }
+ }
+ }
+ ],
+ "range": [
+ 6126,
+ 6197
+ ],
+ "loc": {
+ "start": {
+ "line": 195,
+ "column": 11
+ },
+ "end": {
+ "line": 197,
+ "column": 5
+ }
+ }
+ },
+ "range": [
+ 5750,
+ 6197
+ ],
+ "loc": {
+ "start": {
+ "line": 182,
+ "column": 4
+ },
+ "end": {
+ "line": 197,
+ "column": 5
+ }
+ }
+ }
+ ],
+ "range": [
+ 5744,
+ 6201
+ ],
+ "loc": {
+ "start": {
+ "line": 181,
+ "column": 19
+ },
+ "end": {
+ "line": 198,
+ "column": 3
+ }
+ }
+ },
+ "generator": false,
+ "expression": false,
+ "range": [
+ 5733,
+ 6201
+ ],
+ "loc": {
+ "start": {
+ "line": 181,
+ "column": 8
+ },
+ "end": {
+ "line": 198,
+ "column": 3
+ }
+ }
+ },
+ "kind": "method",
+ "computed": false,
+ "range": [
+ 5727,
+ 6201
+ ],
+ "loc": {
+ "start": {
+ "line": 181,
+ "column": 2
+ },
+ "end": {
+ "line": 198,
+ "column": 3
+ }
+ },
+ "leadingComments": [
+ {
+ "type": "Block",
+ "value": "*\n * Remove a resource or collection of resources from the store.\n *\n * @param {!string} type - Type of the resource(s) to remove.\n * @param {string} [id] - The id of the resource to remove. If omitted all\n * resources of the type will be removed.\n * @return {undefined} - Doesn't return anything.\n ",
+ "range": [
+ 5384,
+ 5724
+ ],
+ "loc": {
+ "start": {
+ "line": 173,
+ "column": 2
+ },
+ "end": {
+ "line": 180,
+ "column": 5
+ }
+ }
+ }
+ ],
+ "static": false
+ },
+ {
+ "type": "MethodDefinition",
+ "key": {
+ "type": "Identifier",
+ "name": "_addField",
+ "range": [
+ 6205,
+ 6214
+ ],
+ "loc": {
+ "start": {
+ "line": 200,
+ "column": 2
+ },
+ "end": {
+ "line": 200,
+ "column": 11
+ }
+ }
+ },
+ "value": {
+ "type": "FunctionExpression",
+ "id": null,
+ "params": [
+ {
+ "type": "Identifier",
+ "name": "object",
+ "range": [
+ 6215,
+ 6221
+ ],
+ "loc": {
+ "start": {
+ "line": 200,
+ "column": 12
+ },
+ "end": {
+ "line": 200,
+ "column": 18
+ }
+ }
+ },
+ {
+ "type": "Identifier",
+ "name": "resource",
+ "range": [
+ 6223,
+ 6231
+ ],
+ "loc": {
+ "start": {
+ "line": 200,
+ "column": 20
+ },
+ "end": {
+ "line": 200,
+ "column": 28
+ }
+ }
+ },
+ {
+ "type": "Identifier",
+ "name": "definition",
+ "range": [
+ 6233,
+ 6243
+ ],
+ "loc": {
+ "start": {
+ "line": 200,
+ "column": 30
+ },
+ "end": {
+ "line": 200,
+ "column": 40
+ }
+ }
+ },
+ {
+ "type": "Identifier",
+ "name": "fieldName",
+ "range": [
+ 6245,
+ 6254
+ ],
+ "loc": {
+ "start": {
+ "line": 200,
+ "column": 42
+ },
+ "end": {
+ "line": 200,
+ "column": 51
+ }
+ }
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "id": {
+ "type": "Identifier",
+ "name": "field",
+ "range": [
+ 6266,
+ 6271
+ ],
+ "loc": {
+ "start": {
+ "line": 201,
+ "column": 8
+ },
+ "end": {
+ "line": 201,
+ "column": 13
+ }
+ }
+ },
+ "init": {
+ "type": "MemberExpression",
+ "computed": true,
+ "object": {
+ "type": "Identifier",
+ "name": "definition",
+ "range": [
+ 6274,
+ 6284
+ ],
+ "loc": {
+ "start": {
+ "line": 201,
+ "column": 16
+ },
+ "end": {
+ "line": 201,
+ "column": 26
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "fieldName",
+ "range": [
+ 6285,
+ 6294
+ ],
+ "loc": {
+ "start": {
+ "line": 201,
+ "column": 27
+ },
+ "end": {
+ "line": 201,
+ "column": 36
+ }
+ }
+ },
+ "range": [
+ 6274,
+ 6295
+ ],
+ "loc": {
+ "start": {
+ "line": 201,
+ "column": 16
+ },
+ "end": {
+ "line": 201,
+ "column": 37
+ }
+ }
+ },
+ "range": [
+ 6266,
+ 6295
+ ],
+ "loc": {
+ "start": {
+ "line": 201,
+ "column": 8
+ },
+ "end": {
+ "line": 201,
+ "column": 37
+ }
+ }
+ }
+ ],
+ "kind": "var",
+ "range": [
+ 6262,
+ 6296
+ ],
+ "loc": {
+ "start": {
+ "line": 201,
+ "column": 4
+ },
+ "end": {
+ "line": 201,
+ "column": 38
+ }
+ }
+ },
+ {
+ "type": "VariableDeclaration",
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "id": {
+ "type": "Identifier",
+ "name": "newValue",
+ "range": [
+ 6305,
+ 6313
+ ],
+ "loc": {
+ "start": {
+ "line": 202,
+ "column": 8
+ },
+ "end": {
+ "line": 202,
+ "column": 16
+ }
+ }
+ },
+ "init": {
+ "type": "CallExpression",
+ "callee": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "field",
+ "range": [
+ 6316,
+ 6321
+ ],
+ "loc": {
+ "start": {
+ "line": 202,
+ "column": 19
+ },
+ "end": {
+ "line": 202,
+ "column": 24
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "deserialize",
+ "range": [
+ 6322,
+ 6333
+ ],
+ "loc": {
+ "start": {
+ "line": 202,
+ "column": 25
+ },
+ "end": {
+ "line": 202,
+ "column": 36
+ }
+ }
+ },
+ "range": [
+ 6316,
+ 6333
+ ],
+ "loc": {
+ "start": {
+ "line": 202,
+ "column": 19
+ },
+ "end": {
+ "line": 202,
+ "column": 36
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "call",
+ "range": [
+ 6334,
+ 6338
+ ],
+ "loc": {
+ "start": {
+ "line": 202,
+ "column": 37
+ },
+ "end": {
+ "line": 202,
+ "column": 41
+ }
+ }
+ },
+ "range": [
+ 6316,
+ 6338
+ ],
+ "loc": {
+ "start": {
+ "line": 202,
+ "column": 19
+ },
+ "end": {
+ "line": 202,
+ "column": 41
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "ThisExpression",
+ "range": [
+ 6339,
+ 6343
+ ],
+ "loc": {
+ "start": {
+ "line": 202,
+ "column": 42
+ },
+ "end": {
+ "line": 202,
+ "column": 46
+ }
+ }
+ },
+ {
+ "type": "Identifier",
+ "name": "object",
+ "range": [
+ 6345,
+ 6351
+ ],
+ "loc": {
+ "start": {
+ "line": 202,
+ "column": 48
+ },
+ "end": {
+ "line": 202,
+ "column": 54
+ }
+ }
+ },
+ {
+ "type": "Identifier",
+ "name": "fieldName",
+ "range": [
+ 6353,
+ 6362
+ ],
+ "loc": {
+ "start": {
+ "line": 202,
+ "column": 56
+ },
+ "end": {
+ "line": 202,
+ "column": 65
+ }
+ }
+ }
+ ],
+ "range": [
+ 6316,
+ 6363
+ ],
+ "loc": {
+ "start": {
+ "line": 202,
+ "column": 19
+ },
+ "end": {
+ "line": 202,
+ "column": 66
+ }
+ }
+ },
+ "range": [
+ 6305,
+ 6363
+ ],
+ "loc": {
+ "start": {
+ "line": 202,
+ "column": 8
+ },
+ "end": {
+ "line": 202,
+ "column": 66
+ }
+ }
+ }
+ ],
+ "kind": "var",
+ "range": [
+ 6301,
+ 6364
+ ],
+ "loc": {
+ "start": {
+ "line": 202,
+ "column": 4
+ },
+ "end": {
+ "line": 202,
+ "column": 67
+ }
+ }
+ },
+ {
+ "type": "IfStatement",
+ "test": {
+ "type": "BinaryExpression",
+ "operator": "!==",
+ "left": {
+ "type": "UnaryExpression",
+ "operator": "typeof",
+ "argument": {
+ "type": "Identifier",
+ "name": "newValue",
+ "range": [
+ 6380,
+ 6388
+ ],
+ "loc": {
+ "start": {
+ "line": 203,
+ "column": 15
+ },
+ "end": {
+ "line": 203,
+ "column": 23
+ }
+ }
+ },
+ "prefix": true,
+ "range": [
+ 6373,
+ 6388
+ ],
+ "loc": {
+ "start": {
+ "line": 203,
+ "column": 8
+ },
+ "end": {
+ "line": 203,
+ "column": 23
+ }
+ }
+ },
+ "right": {
+ "type": "Literal",
+ "value": "undefined",
+ "raw": "\"undefined\"",
+ "range": [
+ 6393,
+ 6404
+ ],
+ "loc": {
+ "start": {
+ "line": 203,
+ "column": 28
+ },
+ "end": {
+ "line": 203,
+ "column": 39
+ }
+ }
+ },
+ "range": [
+ 6373,
+ 6404
+ ],
+ "loc": {
+ "start": {
+ "line": 203,
+ "column": 8
+ },
+ "end": {
+ "line": 203,
+ "column": 39
+ }
+ }
+ },
+ "consequent": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "IfStatement",
+ "test": {
+ "type": "BinaryExpression",
+ "operator": "===",
+ "left": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "field",
+ "range": [
+ 6418,
+ 6423
+ ],
+ "loc": {
+ "start": {
+ "line": 204,
+ "column": 10
+ },
+ "end": {
+ "line": 204,
+ "column": 15
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 6424,
+ 6428
+ ],
+ "loc": {
+ "start": {
+ "line": 204,
+ "column": 16
+ },
+ "end": {
+ "line": 204,
+ "column": 20
+ }
+ }
+ },
+ "range": [
+ 6418,
+ 6428
+ ],
+ "loc": {
+ "start": {
+ "line": 204,
+ "column": 10
+ },
+ "end": {
+ "line": 204,
+ "column": 20
+ }
+ }
+ },
+ "right": {
+ "type": "Literal",
+ "value": "has-one",
+ "raw": "\"has-one\"",
+ "range": [
+ 6433,
+ 6442
+ ],
+ "loc": {
+ "start": {
+ "line": 204,
+ "column": 25
+ },
+ "end": {
+ "line": 204,
+ "column": 34
+ }
+ }
+ },
+ "range": [
+ 6418,
+ 6442
+ ],
+ "loc": {
+ "start": {
+ "line": 204,
+ "column": 10
+ },
+ "end": {
+ "line": 204,
+ "column": 34
+ }
+ }
+ },
+ "consequent": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "IfStatement",
+ "test": {
+ "type": "MemberExpression",
+ "computed": true,
+ "object": {
+ "type": "Identifier",
+ "name": "resource",
+ "range": [
+ 6458,
+ 6466
+ ],
+ "loc": {
+ "start": {
+ "line": 205,
+ "column": 12
+ },
+ "end": {
+ "line": 205,
+ "column": 20
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "fieldName",
+ "range": [
+ 6467,
+ 6476
+ ],
+ "loc": {
+ "start": {
+ "line": 205,
+ "column": 21
+ },
+ "end": {
+ "line": 205,
+ "column": 30
+ }
+ }
+ },
+ "range": [
+ 6458,
+ 6477
+ ],
+ "loc": {
+ "start": {
+ "line": 205,
+ "column": 12
+ },
+ "end": {
+ "line": 205,
+ "column": 31
+ }
+ }
+ },
+ "consequent": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "expression": {
+ "type": "CallExpression",
+ "callee": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "ThisExpression",
+ "range": [
+ 6491,
+ 6495
+ ],
+ "loc": {
+ "start": {
+ "line": 206,
+ "column": 10
+ },
+ "end": {
+ "line": 206,
+ "column": 14
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "_removeInverseRelationship",
+ "range": [
+ 6496,
+ 6522
+ ],
+ "loc": {
+ "start": {
+ "line": 206,
+ "column": 15
+ },
+ "end": {
+ "line": 206,
+ "column": 41
+ }
+ }
+ },
+ "range": [
+ 6491,
+ 6522
+ ],
+ "loc": {
+ "start": {
+ "line": 206,
+ "column": 10
+ },
+ "end": {
+ "line": 206,
+ "column": 41
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "Identifier",
+ "name": "resource",
+ "range": [
+ 6523,
+ 6531
+ ],
+ "loc": {
+ "start": {
+ "line": 206,
+ "column": 42
+ },
+ "end": {
+ "line": 206,
+ "column": 50
+ }
+ }
+ },
+ {
+ "type": "Identifier",
+ "name": "fieldName",
+ "range": [
+ 6533,
+ 6542
+ ],
+ "loc": {
+ "start": {
+ "line": 206,
+ "column": 52
+ },
+ "end": {
+ "line": 206,
+ "column": 61
+ }
+ }
+ },
+ {
+ "type": "MemberExpression",
+ "computed": true,
+ "object": {
+ "type": "Identifier",
+ "name": "resource",
+ "range": [
+ 6544,
+ 6552
+ ],
+ "loc": {
+ "start": {
+ "line": 206,
+ "column": 63
+ },
+ "end": {
+ "line": 206,
+ "column": 71
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "fieldName",
+ "range": [
+ 6553,
+ 6562
+ ],
+ "loc": {
+ "start": {
+ "line": 206,
+ "column": 72
+ },
+ "end": {
+ "line": 206,
+ "column": 81
+ }
+ }
+ },
+ "range": [
+ 6544,
+ 6563
+ ],
+ "loc": {
+ "start": {
+ "line": 206,
+ "column": 63
+ },
+ "end": {
+ "line": 206,
+ "column": 82
+ }
+ }
+ },
+ {
+ "type": "Identifier",
+ "name": "field",
+ "range": [
+ 6565,
+ 6570
+ ],
+ "loc": {
+ "start": {
+ "line": 206,
+ "column": 84
+ },
+ "end": {
+ "line": 206,
+ "column": 89
+ }
+ }
+ }
+ ],
+ "range": [
+ 6491,
+ 6571
+ ],
+ "loc": {
+ "start": {
+ "line": 206,
+ "column": 10
+ },
+ "end": {
+ "line": 206,
+ "column": 90
+ }
+ }
+ },
+ "range": [
+ 6491,
+ 6572
+ ],
+ "loc": {
+ "start": {
+ "line": 206,
+ "column": 10
+ },
+ "end": {
+ "line": 206,
+ "column": 91
+ }
+ }
+ }
+ ],
+ "range": [
+ 6479,
+ 6582
+ ],
+ "loc": {
+ "start": {
+ "line": 205,
+ "column": 33
+ },
+ "end": {
+ "line": 207,
+ "column": 9
+ }
+ }
+ },
+ "alternate": null,
+ "range": [
+ 6454,
+ 6582
+ ],
+ "loc": {
+ "start": {
+ "line": 205,
+ "column": 8
+ },
+ "end": {
+ "line": 207,
+ "column": 9
+ }
+ }
+ },
+ {
+ "type": "IfStatement",
+ "test": {
+ "type": "Identifier",
+ "name": "newValue",
+ "range": [
+ 6595,
+ 6603
+ ],
+ "loc": {
+ "start": {
+ "line": 208,
+ "column": 12
+ },
+ "end": {
+ "line": 208,
+ "column": 20
+ }
+ }
+ },
+ "consequent": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "expression": {
+ "type": "CallExpression",
+ "callee": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "ThisExpression",
+ "range": [
+ 6617,
+ 6621
+ ],
+ "loc": {
+ "start": {
+ "line": 209,
+ "column": 10
+ },
+ "end": {
+ "line": 209,
+ "column": 14
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "_addInverseRelationship",
+ "range": [
+ 6622,
+ 6645
+ ],
+ "loc": {
+ "start": {
+ "line": 209,
+ "column": 15
+ },
+ "end": {
+ "line": 209,
+ "column": 38
+ }
+ }
+ },
+ "range": [
+ 6617,
+ 6645
+ ],
+ "loc": {
+ "start": {
+ "line": 209,
+ "column": 10
+ },
+ "end": {
+ "line": 209,
+ "column": 38
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "Identifier",
+ "name": "resource",
+ "range": [
+ 6646,
+ 6654
+ ],
+ "loc": {
+ "start": {
+ "line": 209,
+ "column": 39
+ },
+ "end": {
+ "line": 209,
+ "column": 47
+ }
+ }
+ },
+ {
+ "type": "Identifier",
+ "name": "fieldName",
+ "range": [
+ 6656,
+ 6665
+ ],
+ "loc": {
+ "start": {
+ "line": 209,
+ "column": 49
+ },
+ "end": {
+ "line": 209,
+ "column": 58
+ }
+ }
+ },
+ {
+ "type": "Identifier",
+ "name": "newValue",
+ "range": [
+ 6667,
+ 6675
+ ],
+ "loc": {
+ "start": {
+ "line": 209,
+ "column": 60
+ },
+ "end": {
+ "line": 209,
+ "column": 68
+ }
+ }
+ },
+ {
+ "type": "Identifier",
+ "name": "field",
+ "range": [
+ 6677,
+ 6682
+ ],
+ "loc": {
+ "start": {
+ "line": 209,
+ "column": 70
+ },
+ "end": {
+ "line": 209,
+ "column": 75
+ }
+ }
+ }
+ ],
+ "range": [
+ 6617,
+ 6683
+ ],
+ "loc": {
+ "start": {
+ "line": 209,
+ "column": 10
+ },
+ "end": {
+ "line": 209,
+ "column": 76
+ }
+ }
+ },
+ "range": [
+ 6617,
+ 6684
+ ],
+ "loc": {
+ "start": {
+ "line": 209,
+ "column": 10
+ },
+ "end": {
+ "line": 209,
+ "column": 77
+ }
+ }
+ }
+ ],
+ "range": [
+ 6605,
+ 6694
+ ],
+ "loc": {
+ "start": {
+ "line": 208,
+ "column": 22
+ },
+ "end": {
+ "line": 210,
+ "column": 9
+ }
+ }
+ },
+ "alternate": null,
+ "range": [
+ 6591,
+ 6694
+ ],
+ "loc": {
+ "start": {
+ "line": 208,
+ "column": 8
+ },
+ "end": {
+ "line": 210,
+ "column": 9
+ }
+ }
+ }
+ ],
+ "range": [
+ 6444,
+ 6702
+ ],
+ "loc": {
+ "start": {
+ "line": 204,
+ "column": 36
+ },
+ "end": {
+ "line": 211,
+ "column": 7
+ }
+ }
+ },
+ "alternate": {
+ "type": "IfStatement",
+ "test": {
+ "type": "BinaryExpression",
+ "operator": "===",
+ "left": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "field",
+ "range": [
+ 6712,
+ 6717
+ ],
+ "loc": {
+ "start": {
+ "line": 211,
+ "column": 17
+ },
+ "end": {
+ "line": 211,
+ "column": 22
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 6718,
+ 6722
+ ],
+ "loc": {
+ "start": {
+ "line": 211,
+ "column": 23
+ },
+ "end": {
+ "line": 211,
+ "column": 27
+ }
+ }
+ },
+ "range": [
+ 6712,
+ 6722
+ ],
+ "loc": {
+ "start": {
+ "line": 211,
+ "column": 17
+ },
+ "end": {
+ "line": 211,
+ "column": 27
+ }
+ }
+ },
+ "right": {
+ "type": "Literal",
+ "value": "has-many",
+ "raw": "\"has-many\"",
+ "range": [
+ 6727,
+ 6737
+ ],
+ "loc": {
+ "start": {
+ "line": 211,
+ "column": 32
+ },
+ "end": {
+ "line": 211,
+ "column": 42
+ }
+ }
+ },
+ "range": [
+ 6712,
+ 6737
+ ],
+ "loc": {
+ "start": {
+ "line": 211,
+ "column": 17
+ },
+ "end": {
+ "line": 211,
+ "column": 42
+ }
+ }
+ },
+ "consequent": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "expression": {
+ "type": "CallExpression",
+ "callee": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "MemberExpression",
+ "computed": true,
+ "object": {
+ "type": "Identifier",
+ "name": "resource",
+ "range": [
+ 6749,
+ 6757
+ ],
+ "loc": {
+ "start": {
+ "line": 212,
+ "column": 8
+ },
+ "end": {
+ "line": 212,
+ "column": 16
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "fieldName",
+ "range": [
+ 6758,
+ 6767
+ ],
+ "loc": {
+ "start": {
+ "line": 212,
+ "column": 17
+ },
+ "end": {
+ "line": 212,
+ "column": 26
+ }
+ }
+ },
+ "range": [
+ 6749,
+ 6768
+ ],
+ "loc": {
+ "start": {
+ "line": 212,
+ "column": 8
+ },
+ "end": {
+ "line": 212,
+ "column": 27
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "forEach",
+ "range": [
+ 6769,
+ 6776
+ ],
+ "loc": {
+ "start": {
+ "line": 212,
+ "column": 28
+ },
+ "end": {
+ "line": 212,
+ "column": 35
+ }
+ }
+ },
+ "range": [
+ 6749,
+ 6776
+ ],
+ "loc": {
+ "start": {
+ "line": 212,
+ "column": 8
+ },
+ "end": {
+ "line": 212,
+ "column": 35
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "ArrowFunctionExpression",
+ "id": null,
+ "params": [
+ {
+ "type": "Identifier",
+ "name": "r",
+ "range": [
+ 6777,
+ 6778
+ ],
+ "loc": {
+ "start": {
+ "line": 212,
+ "column": 36
+ },
+ "end": {
+ "line": 212,
+ "column": 37
+ }
+ }
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "IfStatement",
+ "test": {
+ "type": "BinaryExpression",
+ "operator": "!==",
+ "left": {
+ "type": "CallExpression",
+ "callee": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "MemberExpression",
+ "computed": true,
+ "object": {
+ "type": "Identifier",
+ "name": "resource",
+ "range": [
+ 6798,
+ 6806
+ ],
+ "loc": {
+ "start": {
+ "line": 213,
+ "column": 14
+ },
+ "end": {
+ "line": 213,
+ "column": 22
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "fieldName",
+ "range": [
+ 6807,
+ 6816
+ ],
+ "loc": {
+ "start": {
+ "line": 213,
+ "column": 23
+ },
+ "end": {
+ "line": 213,
+ "column": 32
+ }
+ }
+ },
+ "range": [
+ 6798,
+ 6817
+ ],
+ "loc": {
+ "start": {
+ "line": 213,
+ "column": 14
+ },
+ "end": {
+ "line": 213,
+ "column": 33
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "indexOf",
+ "range": [
+ 6818,
+ 6825
+ ],
+ "loc": {
+ "start": {
+ "line": 213,
+ "column": 34
+ },
+ "end": {
+ "line": 213,
+ "column": 41
+ }
+ }
+ },
+ "range": [
+ 6798,
+ 6825
+ ],
+ "loc": {
+ "start": {
+ "line": 213,
+ "column": 14
+ },
+ "end": {
+ "line": 213,
+ "column": 41
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "Identifier",
+ "name": "r",
+ "range": [
+ 6826,
+ 6827
+ ],
+ "loc": {
+ "start": {
+ "line": 213,
+ "column": 42
+ },
+ "end": {
+ "line": 213,
+ "column": 43
+ }
+ }
+ }
+ ],
+ "range": [
+ 6798,
+ 6828
+ ],
+ "loc": {
+ "start": {
+ "line": 213,
+ "column": 14
+ },
+ "end": {
+ "line": 213,
+ "column": 44
+ }
+ }
+ },
+ "right": {
+ "type": "UnaryExpression",
+ "operator": "-",
+ "argument": {
+ "type": "Literal",
+ "value": 1,
+ "raw": "1",
+ "range": [
+ 6834,
+ 6835
+ ],
+ "loc": {
+ "start": {
+ "line": 213,
+ "column": 50
+ },
+ "end": {
+ "line": 213,
+ "column": 51
+ }
+ }
+ },
+ "prefix": true,
+ "range": [
+ 6833,
+ 6835
+ ],
+ "loc": {
+ "start": {
+ "line": 213,
+ "column": 49
+ },
+ "end": {
+ "line": 213,
+ "column": 51
+ }
+ }
+ },
+ "range": [
+ 6798,
+ 6835
+ ],
+ "loc": {
+ "start": {
+ "line": 213,
+ "column": 14
+ },
+ "end": {
+ "line": 213,
+ "column": 51
+ }
+ }
+ },
+ "consequent": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "expression": {
+ "type": "CallExpression",
+ "callee": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "ThisExpression",
+ "range": [
+ 6851,
+ 6855
+ ],
+ "loc": {
+ "start": {
+ "line": 214,
+ "column": 12
+ },
+ "end": {
+ "line": 214,
+ "column": 16
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "_removeInverseRelationship",
+ "range": [
+ 6856,
+ 6882
+ ],
+ "loc": {
+ "start": {
+ "line": 214,
+ "column": 17
+ },
+ "end": {
+ "line": 214,
+ "column": 43
+ }
+ }
+ },
+ "range": [
+ 6851,
+ 6882
+ ],
+ "loc": {
+ "start": {
+ "line": 214,
+ "column": 12
+ },
+ "end": {
+ "line": 214,
+ "column": 43
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "Identifier",
+ "name": "resource",
+ "range": [
+ 6883,
+ 6891
+ ],
+ "loc": {
+ "start": {
+ "line": 214,
+ "column": 44
+ },
+ "end": {
+ "line": 214,
+ "column": 52
+ }
+ }
+ },
+ {
+ "type": "Identifier",
+ "name": "fieldName",
+ "range": [
+ 6893,
+ 6902
+ ],
+ "loc": {
+ "start": {
+ "line": 214,
+ "column": 54
+ },
+ "end": {
+ "line": 214,
+ "column": 63
+ }
+ }
+ },
+ {
+ "type": "Identifier",
+ "name": "r",
+ "range": [
+ 6904,
+ 6905
+ ],
+ "loc": {
+ "start": {
+ "line": 214,
+ "column": 65
+ },
+ "end": {
+ "line": 214,
+ "column": 66
+ }
+ }
+ },
+ {
+ "type": "Identifier",
+ "name": "field",
+ "range": [
+ 6907,
+ 6912
+ ],
+ "loc": {
+ "start": {
+ "line": 214,
+ "column": 68
+ },
+ "end": {
+ "line": 214,
+ "column": 73
+ }
+ }
+ }
+ ],
+ "range": [
+ 6851,
+ 6913
+ ],
+ "loc": {
+ "start": {
+ "line": 214,
+ "column": 12
+ },
+ "end": {
+ "line": 214,
+ "column": 74
+ }
+ }
+ },
+ "range": [
+ 6851,
+ 6914
+ ],
+ "loc": {
+ "start": {
+ "line": 214,
+ "column": 12
+ },
+ "end": {
+ "line": 214,
+ "column": 75
+ }
+ }
+ }
+ ],
+ "range": [
+ 6837,
+ 6926
+ ],
+ "loc": {
+ "start": {
+ "line": 213,
+ "column": 53
+ },
+ "end": {
+ "line": 215,
+ "column": 11
+ }
+ }
+ },
+ "alternate": null,
+ "range": [
+ 6794,
+ 6926
+ ],
+ "loc": {
+ "start": {
+ "line": 213,
+ "column": 10
+ },
+ "end": {
+ "line": 215,
+ "column": 11
+ }
+ }
+ }
+ ],
+ "range": [
+ 6782,
+ 6936
+ ],
+ "loc": {
+ "start": {
+ "line": 212,
+ "column": 41
+ },
+ "end": {
+ "line": 216,
+ "column": 9
+ }
+ }
+ },
+ "generator": false,
+ "expression": false,
+ "range": [
+ 6777,
+ 6936
+ ],
+ "loc": {
+ "start": {
+ "line": 212,
+ "column": 36
+ },
+ "end": {
+ "line": 216,
+ "column": 9
+ }
+ }
+ }
+ ],
+ "range": [
+ 6749,
+ 6937
+ ],
+ "loc": {
+ "start": {
+ "line": 212,
+ "column": 8
+ },
+ "end": {
+ "line": 216,
+ "column": 10
+ }
+ }
+ },
+ "range": [
+ 6749,
+ 6938
+ ],
+ "loc": {
+ "start": {
+ "line": 212,
+ "column": 8
+ },
+ "end": {
+ "line": 216,
+ "column": 11
+ }
+ }
+ },
+ {
+ "type": "ExpressionStatement",
+ "expression": {
+ "type": "CallExpression",
+ "callee": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "newValue",
+ "range": [
+ 6947,
+ 6955
+ ],
+ "loc": {
+ "start": {
+ "line": 217,
+ "column": 8
+ },
+ "end": {
+ "line": 217,
+ "column": 16
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "forEach",
+ "range": [
+ 6956,
+ 6963
+ ],
+ "loc": {
+ "start": {
+ "line": 217,
+ "column": 17
+ },
+ "end": {
+ "line": 217,
+ "column": 24
+ }
+ }
+ },
+ "range": [
+ 6947,
+ 6963
+ ],
+ "loc": {
+ "start": {
+ "line": 217,
+ "column": 8
+ },
+ "end": {
+ "line": 217,
+ "column": 24
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "ArrowFunctionExpression",
+ "id": null,
+ "params": [
+ {
+ "type": "Identifier",
+ "name": "r",
+ "range": [
+ 6964,
+ 6965
+ ],
+ "loc": {
+ "start": {
+ "line": 217,
+ "column": 25
+ },
+ "end": {
+ "line": 217,
+ "column": 26
+ }
+ }
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "expression": {
+ "type": "CallExpression",
+ "callee": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "ThisExpression",
+ "range": [
+ 6981,
+ 6985
+ ],
+ "loc": {
+ "start": {
+ "line": 218,
+ "column": 10
+ },
+ "end": {
+ "line": 218,
+ "column": 14
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "_addInverseRelationship",
+ "range": [
+ 6986,
+ 7009
+ ],
+ "loc": {
+ "start": {
+ "line": 218,
+ "column": 15
+ },
+ "end": {
+ "line": 218,
+ "column": 38
+ }
+ }
+ },
+ "range": [
+ 6981,
+ 7009
+ ],
+ "loc": {
+ "start": {
+ "line": 218,
+ "column": 10
+ },
+ "end": {
+ "line": 218,
+ "column": 38
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "Identifier",
+ "name": "resource",
+ "range": [
+ 7010,
+ 7018
+ ],
+ "loc": {
+ "start": {
+ "line": 218,
+ "column": 39
+ },
+ "end": {
+ "line": 218,
+ "column": 47
+ }
+ }
+ },
+ {
+ "type": "Identifier",
+ "name": "fieldName",
+ "range": [
+ 7020,
+ 7029
+ ],
+ "loc": {
+ "start": {
+ "line": 218,
+ "column": 49
+ },
+ "end": {
+ "line": 218,
+ "column": 58
+ }
+ }
+ },
+ {
+ "type": "Identifier",
+ "name": "r",
+ "range": [
+ 7031,
+ 7032
+ ],
+ "loc": {
+ "start": {
+ "line": 218,
+ "column": 60
+ },
+ "end": {
+ "line": 218,
+ "column": 61
+ }
+ }
+ },
+ {
+ "type": "Identifier",
+ "name": "field",
+ "range": [
+ 7034,
+ 7039
+ ],
+ "loc": {
+ "start": {
+ "line": 218,
+ "column": 63
+ },
+ "end": {
+ "line": 218,
+ "column": 68
+ }
+ }
+ }
+ ],
+ "range": [
+ 6981,
+ 7040
+ ],
+ "loc": {
+ "start": {
+ "line": 218,
+ "column": 10
+ },
+ "end": {
+ "line": 218,
+ "column": 69
+ }
+ }
+ },
+ "range": [
+ 6981,
+ 7041
+ ],
+ "loc": {
+ "start": {
+ "line": 218,
+ "column": 10
+ },
+ "end": {
+ "line": 218,
+ "column": 70
+ }
+ }
+ }
+ ],
+ "range": [
+ 6969,
+ 7051
+ ],
+ "loc": {
+ "start": {
+ "line": 217,
+ "column": 30
+ },
+ "end": {
+ "line": 219,
+ "column": 9
+ }
+ }
+ },
+ "generator": false,
+ "expression": false,
+ "range": [
+ 6964,
+ 7051
+ ],
+ "loc": {
+ "start": {
+ "line": 217,
+ "column": 25
+ },
+ "end": {
+ "line": 219,
+ "column": 9
+ }
+ }
+ }
+ ],
+ "range": [
+ 6947,
+ 7052
+ ],
+ "loc": {
+ "start": {
+ "line": 217,
+ "column": 8
+ },
+ "end": {
+ "line": 219,
+ "column": 10
+ }
+ }
+ },
+ "range": [
+ 6947,
+ 7053
+ ],
+ "loc": {
+ "start": {
+ "line": 217,
+ "column": 8
+ },
+ "end": {
+ "line": 219,
+ "column": 11
+ }
+ }
+ }
+ ],
+ "range": [
+ 6739,
+ 7061
+ ],
+ "loc": {
+ "start": {
+ "line": 211,
+ "column": 44
+ },
+ "end": {
+ "line": 220,
+ "column": 7
+ }
+ }
+ },
+ "alternate": null,
+ "range": [
+ 6708,
+ 7061
+ ],
+ "loc": {
+ "start": {
+ "line": 211,
+ "column": 13
+ },
+ "end": {
+ "line": 220,
+ "column": 7
+ }
+ }
+ },
+ "range": [
+ 6414,
+ 7061
+ ],
+ "loc": {
+ "start": {
+ "line": 204,
+ "column": 6
+ },
+ "end": {
+ "line": 220,
+ "column": 7
+ }
+ }
+ },
+ {
+ "type": "ExpressionStatement",
+ "expression": {
+ "type": "AssignmentExpression",
+ "operator": "=",
+ "left": {
+ "type": "MemberExpression",
+ "computed": true,
+ "object": {
+ "type": "Identifier",
+ "name": "resource",
+ "range": [
+ 7068,
+ 7076
+ ],
+ "loc": {
+ "start": {
+ "line": 221,
+ "column": 6
+ },
+ "end": {
+ "line": 221,
+ "column": 14
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "fieldName",
+ "range": [
+ 7077,
+ 7086
+ ],
+ "loc": {
+ "start": {
+ "line": 221,
+ "column": 15
+ },
+ "end": {
+ "line": 221,
+ "column": 24
+ }
+ }
+ },
+ "range": [
+ 7068,
+ 7087
+ ],
+ "loc": {
+ "start": {
+ "line": 221,
+ "column": 6
+ },
+ "end": {
+ "line": 221,
+ "column": 25
+ }
+ }
+ },
+ "right": {
+ "type": "Identifier",
+ "name": "newValue",
+ "range": [
+ 7090,
+ 7098
+ ],
+ "loc": {
+ "start": {
+ "line": 221,
+ "column": 28
+ },
+ "end": {
+ "line": 221,
+ "column": 36
+ }
+ }
+ },
+ "range": [
+ 7068,
+ 7098
+ ],
+ "loc": {
+ "start": {
+ "line": 221,
+ "column": 6
+ },
+ "end": {
+ "line": 221,
+ "column": 36
+ }
+ }
+ },
+ "range": [
+ 7068,
+ 7099
+ ],
+ "loc": {
+ "start": {
+ "line": 221,
+ "column": 6
+ },
+ "end": {
+ "line": 221,
+ "column": 37
+ }
+ }
+ }
+ ],
+ "range": [
+ 6406,
+ 7105
+ ],
+ "loc": {
+ "start": {
+ "line": 203,
+ "column": 41
+ },
+ "end": {
+ "line": 222,
+ "column": 5
+ }
+ }
+ },
+ "alternate": null,
+ "range": [
+ 6369,
+ 7105
+ ],
+ "loc": {
+ "start": {
+ "line": 203,
+ "column": 4
+ },
+ "end": {
+ "line": 222,
+ "column": 5
+ }
+ }
+ }
+ ],
+ "range": [
+ 6256,
+ 7109
+ ],
+ "loc": {
+ "start": {
+ "line": 200,
+ "column": 53
+ },
+ "end": {
+ "line": 223,
+ "column": 3
+ }
+ }
+ },
+ "generator": false,
+ "expression": false,
+ "range": [
+ 6214,
+ 7109
+ ],
+ "loc": {
+ "start": {
+ "line": 200,
+ "column": 11
+ },
+ "end": {
+ "line": 223,
+ "column": 3
+ }
+ }
+ },
+ "kind": "method",
+ "computed": false,
+ "range": [
+ 6205,
+ 7109
+ ],
+ "loc": {
+ "start": {
+ "line": 200,
+ "column": 2
+ },
+ "end": {
+ "line": 223,
+ "column": 3
+ }
+ },
+ "static": false
+ },
+ {
+ "type": "MethodDefinition",
+ "key": {
+ "type": "Identifier",
+ "name": "_addInverseRelationship",
+ "range": [
+ 7113,
+ 7136
+ ],
+ "loc": {
+ "start": {
+ "line": 225,
+ "column": 2
+ },
+ "end": {
+ "line": 225,
+ "column": 25
+ }
+ }
+ },
+ "value": {
+ "type": "FunctionExpression",
+ "id": null,
+ "params": [
+ {
+ "type": "Identifier",
+ "name": "sourceResource",
+ "range": [
+ 7137,
+ 7151
+ ],
+ "loc": {
+ "start": {
+ "line": 225,
+ "column": 26
+ },
+ "end": {
+ "line": 225,
+ "column": 40
+ }
+ }
+ },
+ {
+ "type": "Identifier",
+ "name": "sourceFieldName",
+ "range": [
+ 7153,
+ 7168
+ ],
+ "loc": {
+ "start": {
+ "line": 225,
+ "column": 42
+ },
+ "end": {
+ "line": 225,
+ "column": 57
+ }
+ }
+ },
+ {
+ "type": "Identifier",
+ "name": "targetResource",
+ "range": [
+ 7170,
+ 7184
+ ],
+ "loc": {
+ "start": {
+ "line": 225,
+ "column": 59
+ },
+ "end": {
+ "line": 225,
+ "column": 73
+ }
+ }
+ },
+ {
+ "type": "Identifier",
+ "name": "sourceField",
+ "range": [
+ 7186,
+ 7197
+ ],
+ "loc": {
+ "start": {
+ "line": 225,
+ "column": 75
+ },
+ "end": {
+ "line": 225,
+ "column": 86
+ }
+ }
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "id": {
+ "type": "Identifier",
+ "name": "targetDefinition",
+ "range": [
+ 7209,
+ 7225
+ ],
+ "loc": {
+ "start": {
+ "line": 226,
+ "column": 8
+ },
+ "end": {
+ "line": 226,
+ "column": 24
+ }
+ }
+ },
+ "init": {
+ "type": "MemberExpression",
+ "computed": true,
+ "object": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "Store",
+ "range": [
+ 7228,
+ 7233
+ ],
+ "loc": {
+ "start": {
+ "line": 226,
+ "column": 27
+ },
+ "end": {
+ "line": 226,
+ "column": 32
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "types",
+ "range": [
+ 7234,
+ 7239
+ ],
+ "loc": {
+ "start": {
+ "line": 226,
+ "column": 33
+ },
+ "end": {
+ "line": 226,
+ "column": 38
+ }
+ }
+ },
+ "range": [
+ 7228,
+ 7239
+ ],
+ "loc": {
+ "start": {
+ "line": 226,
+ "column": 27
+ },
+ "end": {
+ "line": 226,
+ "column": 38
+ }
+ }
+ },
+ "property": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "targetResource",
+ "range": [
+ 7240,
+ 7254
+ ],
+ "loc": {
+ "start": {
+ "line": 226,
+ "column": 39
+ },
+ "end": {
+ "line": 226,
+ "column": 53
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 7255,
+ 7259
+ ],
+ "loc": {
+ "start": {
+ "line": 226,
+ "column": 54
+ },
+ "end": {
+ "line": 226,
+ "column": 58
+ }
+ }
+ },
+ "range": [
+ 7240,
+ 7259
+ ],
+ "loc": {
+ "start": {
+ "line": 226,
+ "column": 39
+ },
+ "end": {
+ "line": 226,
+ "column": 58
+ }
+ }
+ },
+ "range": [
+ 7228,
+ 7260
+ ],
+ "loc": {
+ "start": {
+ "line": 226,
+ "column": 27
+ },
+ "end": {
+ "line": 226,
+ "column": 59
+ }
+ }
+ },
+ "range": [
+ 7209,
+ 7260
+ ],
+ "loc": {
+ "start": {
+ "line": 226,
+ "column": 8
+ },
+ "end": {
+ "line": 226,
+ "column": 59
+ }
+ }
+ }
+ ],
+ "kind": "var",
+ "range": [
+ 7205,
+ 7261
+ ],
+ "loc": {
+ "start": {
+ "line": 226,
+ "column": 4
+ },
+ "end": {
+ "line": 226,
+ "column": 60
+ }
+ }
+ },
+ {
+ "type": "VariableDeclaration",
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "id": {
+ "type": "Identifier",
+ "name": "targetFieldName",
+ "range": [
+ 7270,
+ 7285
+ ],
+ "loc": {
+ "start": {
+ "line": 227,
+ "column": 8
+ },
+ "end": {
+ "line": 227,
+ "column": 23
+ }
+ }
+ },
+ "init": {
+ "type": "LogicalExpression",
+ "operator": "||",
+ "left": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "sourceField",
+ "range": [
+ 7288,
+ 7299
+ ],
+ "loc": {
+ "start": {
+ "line": 227,
+ "column": 26
+ },
+ "end": {
+ "line": 227,
+ "column": 37
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "inverse",
+ "range": [
+ 7300,
+ 7307
+ ],
+ "loc": {
+ "start": {
+ "line": 227,
+ "column": 38
+ },
+ "end": {
+ "line": 227,
+ "column": 45
+ }
+ }
+ },
+ "range": [
+ 7288,
+ 7307
+ ],
+ "loc": {
+ "start": {
+ "line": 227,
+ "column": 26
+ },
+ "end": {
+ "line": 227,
+ "column": 45
+ }
+ }
+ },
+ "right": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "targetResource",
+ "range": [
+ 7311,
+ 7325
+ ],
+ "loc": {
+ "start": {
+ "line": 227,
+ "column": 49
+ },
+ "end": {
+ "line": 227,
+ "column": 63
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 7326,
+ 7330
+ ],
+ "loc": {
+ "start": {
+ "line": 227,
+ "column": 64
+ },
+ "end": {
+ "line": 227,
+ "column": 68
+ }
+ }
+ },
+ "range": [
+ 7311,
+ 7330
+ ],
+ "loc": {
+ "start": {
+ "line": 227,
+ "column": 49
+ },
+ "end": {
+ "line": 227,
+ "column": 68
+ }
+ }
+ },
+ "range": [
+ 7288,
+ 7330
+ ],
+ "loc": {
+ "start": {
+ "line": 227,
+ "column": 26
+ },
+ "end": {
+ "line": 227,
+ "column": 68
+ }
+ }
+ },
+ "range": [
+ 7270,
+ 7330
+ ],
+ "loc": {
+ "start": {
+ "line": 227,
+ "column": 8
+ },
+ "end": {
+ "line": 227,
+ "column": 68
+ }
+ }
+ }
+ ],
+ "kind": "var",
+ "range": [
+ 7266,
+ 7331
+ ],
+ "loc": {
+ "start": {
+ "line": 227,
+ "column": 4
+ },
+ "end": {
+ "line": 227,
+ "column": 69
+ }
+ }
+ },
+ {
+ "type": "VariableDeclaration",
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "id": {
+ "type": "Identifier",
+ "name": "targetField",
+ "range": [
+ 7340,
+ 7351
+ ],
+ "loc": {
+ "start": {
+ "line": 228,
+ "column": 8
+ },
+ "end": {
+ "line": 228,
+ "column": 19
+ }
+ }
+ },
+ "init": {
+ "type": "LogicalExpression",
+ "operator": "&&",
+ "left": {
+ "type": "Identifier",
+ "name": "targetDefinition",
+ "range": [
+ 7354,
+ 7370
+ ],
+ "loc": {
+ "start": {
+ "line": 228,
+ "column": 22
+ },
+ "end": {
+ "line": 228,
+ "column": 38
+ }
+ }
+ },
+ "right": {
+ "type": "MemberExpression",
+ "computed": true,
+ "object": {
+ "type": "Identifier",
+ "name": "targetDefinition",
+ "range": [
+ 7374,
+ 7390
+ ],
+ "loc": {
+ "start": {
+ "line": 228,
+ "column": 42
+ },
+ "end": {
+ "line": 228,
+ "column": 58
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "targetFieldName",
+ "range": [
+ 7391,
+ 7406
+ ],
+ "loc": {
+ "start": {
+ "line": 228,
+ "column": 59
+ },
+ "end": {
+ "line": 228,
+ "column": 74
+ }
+ }
+ },
+ "range": [
+ 7374,
+ 7407
+ ],
+ "loc": {
+ "start": {
+ "line": 228,
+ "column": 42
+ },
+ "end": {
+ "line": 228,
+ "column": 75
+ }
+ }
+ },
+ "range": [
+ 7354,
+ 7407
+ ],
+ "loc": {
+ "start": {
+ "line": 228,
+ "column": 22
+ },
+ "end": {
+ "line": 228,
+ "column": 75
+ }
+ }
+ },
+ "range": [
+ 7340,
+ 7407
+ ],
+ "loc": {
+ "start": {
+ "line": 228,
+ "column": 8
+ },
+ "end": {
+ "line": 228,
+ "column": 75
+ }
+ }
+ }
+ ],
+ "kind": "var",
+ "range": [
+ 7336,
+ 7408
+ ],
+ "loc": {
+ "start": {
+ "line": 228,
+ "column": 4
+ },
+ "end": {
+ "line": 228,
+ "column": 76
+ }
+ }
+ },
+ {
+ "type": "ExpressionStatement",
+ "expression": {
+ "type": "CallExpression",
+ "callee": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "targetResource",
+ "range": [
+ 7413,
+ 7427
+ ],
+ "loc": {
+ "start": {
+ "line": 229,
+ "column": 4
+ },
+ "end": {
+ "line": 229,
+ "column": 18
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "_dependents",
+ "range": [
+ 7428,
+ 7439
+ ],
+ "loc": {
+ "start": {
+ "line": 229,
+ "column": 19
+ },
+ "end": {
+ "line": 229,
+ "column": 30
+ }
+ }
+ },
+ "range": [
+ 7413,
+ 7439
+ ],
+ "loc": {
+ "start": {
+ "line": 229,
+ "column": 4
+ },
+ "end": {
+ "line": 229,
+ "column": 30
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "push",
+ "range": [
+ 7440,
+ 7444
+ ],
+ "loc": {
+ "start": {
+ "line": 229,
+ "column": 31
+ },
+ "end": {
+ "line": 229,
+ "column": 35
+ }
+ }
+ },
+ "range": [
+ 7413,
+ 7444
+ ],
+ "loc": {
+ "start": {
+ "line": 229,
+ "column": 4
+ },
+ "end": {
+ "line": 229,
+ "column": 35
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "ObjectExpression",
+ "properties": [
+ {
+ "type": "Property",
+ "key": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 7447,
+ 7451
+ ],
+ "loc": {
+ "start": {
+ "line": 229,
+ "column": 38
+ },
+ "end": {
+ "line": 229,
+ "column": 42
+ }
+ }
+ },
+ "value": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "sourceResource",
+ "range": [
+ 7453,
+ 7467
+ ],
+ "loc": {
+ "start": {
+ "line": 229,
+ "column": 44
+ },
+ "end": {
+ "line": 229,
+ "column": 58
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 7468,
+ 7472
+ ],
+ "loc": {
+ "start": {
+ "line": 229,
+ "column": 59
+ },
+ "end": {
+ "line": 229,
+ "column": 63
+ }
+ }
+ },
+ "range": [
+ 7453,
+ 7472
+ ],
+ "loc": {
+ "start": {
+ "line": 229,
+ "column": 44
+ },
+ "end": {
+ "line": 229,
+ "column": 63
+ }
+ }
+ },
+ "kind": "init",
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "range": [
+ 7447,
+ 7472
+ ],
+ "loc": {
+ "start": {
+ "line": 229,
+ "column": 38
+ },
+ "end": {
+ "line": 229,
+ "column": 63
+ }
+ }
+ },
+ {
+ "type": "Property",
+ "key": {
+ "type": "Identifier",
+ "name": "id",
+ "range": [
+ 7474,
+ 7476
+ ],
+ "loc": {
+ "start": {
+ "line": 229,
+ "column": 65
+ },
+ "end": {
+ "line": 229,
+ "column": 67
+ }
+ }
+ },
+ "value": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "sourceResource",
+ "range": [
+ 7478,
+ 7492
+ ],
+ "loc": {
+ "start": {
+ "line": 229,
+ "column": 69
+ },
+ "end": {
+ "line": 229,
+ "column": 83
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "id",
+ "range": [
+ 7493,
+ 7495
+ ],
+ "loc": {
+ "start": {
+ "line": 229,
+ "column": 84
+ },
+ "end": {
+ "line": 229,
+ "column": 86
+ }
+ }
+ },
+ "range": [
+ 7478,
+ 7495
+ ],
+ "loc": {
+ "start": {
+ "line": 229,
+ "column": 69
+ },
+ "end": {
+ "line": 229,
+ "column": 86
+ }
+ }
+ },
+ "kind": "init",
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "range": [
+ 7474,
+ 7495
+ ],
+ "loc": {
+ "start": {
+ "line": 229,
+ "column": 65
+ },
+ "end": {
+ "line": 229,
+ "column": 86
+ }
+ }
+ },
+ {
+ "type": "Property",
+ "key": {
+ "type": "Identifier",
+ "name": "fieldName",
+ "range": [
+ 7497,
+ 7506
+ ],
+ "loc": {
+ "start": {
+ "line": 229,
+ "column": 88
+ },
+ "end": {
+ "line": 229,
+ "column": 97
+ }
+ }
+ },
+ "value": {
+ "type": "Identifier",
+ "name": "sourceFieldName",
+ "range": [
+ 7508,
+ 7523
+ ],
+ "loc": {
+ "start": {
+ "line": 229,
+ "column": 99
+ },
+ "end": {
+ "line": 229,
+ "column": 114
+ }
+ }
+ },
+ "kind": "init",
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "range": [
+ 7497,
+ 7523
+ ],
+ "loc": {
+ "start": {
+ "line": 229,
+ "column": 88
+ },
+ "end": {
+ "line": 229,
+ "column": 114
+ }
+ }
+ }
+ ],
+ "range": [
+ 7445,
+ 7525
+ ],
+ "loc": {
+ "start": {
+ "line": 229,
+ "column": 36
+ },
+ "end": {
+ "line": 229,
+ "column": 116
+ }
+ }
+ }
+ ],
+ "range": [
+ 7413,
+ 7526
+ ],
+ "loc": {
+ "start": {
+ "line": 229,
+ "column": 4
+ },
+ "end": {
+ "line": 229,
+ "column": 117
+ }
+ }
+ },
+ "range": [
+ 7413,
+ 7527
+ ],
+ "loc": {
+ "start": {
+ "line": 229,
+ "column": 4
+ },
+ "end": {
+ "line": 229,
+ "column": 118
+ }
+ }
+ },
+ {
+ "type": "IfStatement",
+ "test": {
+ "type": "Identifier",
+ "name": "targetField",
+ "range": [
+ 7536,
+ 7547
+ ],
+ "loc": {
+ "start": {
+ "line": 230,
+ "column": 8
+ },
+ "end": {
+ "line": 230,
+ "column": 19
+ }
+ }
+ },
+ "consequent": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "IfStatement",
+ "test": {
+ "type": "BinaryExpression",
+ "operator": "===",
+ "left": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "targetField",
+ "range": [
+ 7561,
+ 7572
+ ],
+ "loc": {
+ "start": {
+ "line": 231,
+ "column": 10
+ },
+ "end": {
+ "line": 231,
+ "column": 21
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 7573,
+ 7577
+ ],
+ "loc": {
+ "start": {
+ "line": 231,
+ "column": 22
+ },
+ "end": {
+ "line": 231,
+ "column": 26
+ }
+ }
+ },
+ "range": [
+ 7561,
+ 7577
+ ],
+ "loc": {
+ "start": {
+ "line": 231,
+ "column": 10
+ },
+ "end": {
+ "line": 231,
+ "column": 26
+ }
+ }
+ },
+ "right": {
+ "type": "Literal",
+ "value": "has-one",
+ "raw": "\"has-one\"",
+ "range": [
+ 7582,
+ 7591
+ ],
+ "loc": {
+ "start": {
+ "line": 231,
+ "column": 31
+ },
+ "end": {
+ "line": 231,
+ "column": 40
+ }
+ }
+ },
+ "range": [
+ 7561,
+ 7591
+ ],
+ "loc": {
+ "start": {
+ "line": 231,
+ "column": 10
+ },
+ "end": {
+ "line": 231,
+ "column": 40
+ }
+ }
+ },
+ "consequent": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "expression": {
+ "type": "CallExpression",
+ "callee": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "sourceResource",
+ "range": [
+ 7603,
+ 7617
+ ],
+ "loc": {
+ "start": {
+ "line": 232,
+ "column": 8
+ },
+ "end": {
+ "line": 232,
+ "column": 22
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "_dependents",
+ "range": [
+ 7618,
+ 7629
+ ],
+ "loc": {
+ "start": {
+ "line": 232,
+ "column": 23
+ },
+ "end": {
+ "line": 232,
+ "column": 34
+ }
+ }
+ },
+ "range": [
+ 7603,
+ 7629
+ ],
+ "loc": {
+ "start": {
+ "line": 232,
+ "column": 8
+ },
+ "end": {
+ "line": 232,
+ "column": 34
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "push",
+ "range": [
+ 7630,
+ 7634
+ ],
+ "loc": {
+ "start": {
+ "line": 232,
+ "column": 35
+ },
+ "end": {
+ "line": 232,
+ "column": 39
+ }
+ }
+ },
+ "range": [
+ 7603,
+ 7634
+ ],
+ "loc": {
+ "start": {
+ "line": 232,
+ "column": 8
+ },
+ "end": {
+ "line": 232,
+ "column": 39
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "ObjectExpression",
+ "properties": [
+ {
+ "type": "Property",
+ "key": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 7637,
+ 7641
+ ],
+ "loc": {
+ "start": {
+ "line": 232,
+ "column": 42
+ },
+ "end": {
+ "line": 232,
+ "column": 46
+ }
+ }
+ },
+ "value": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "targetResource",
+ "range": [
+ 7643,
+ 7657
+ ],
+ "loc": {
+ "start": {
+ "line": 232,
+ "column": 48
+ },
+ "end": {
+ "line": 232,
+ "column": 62
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 7658,
+ 7662
+ ],
+ "loc": {
+ "start": {
+ "line": 232,
+ "column": 63
+ },
+ "end": {
+ "line": 232,
+ "column": 67
+ }
+ }
+ },
+ "range": [
+ 7643,
+ 7662
+ ],
+ "loc": {
+ "start": {
+ "line": 232,
+ "column": 48
+ },
+ "end": {
+ "line": 232,
+ "column": 67
+ }
+ }
+ },
+ "kind": "init",
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "range": [
+ 7637,
+ 7662
+ ],
+ "loc": {
+ "start": {
+ "line": 232,
+ "column": 42
+ },
+ "end": {
+ "line": 232,
+ "column": 67
+ }
+ }
+ },
+ {
+ "type": "Property",
+ "key": {
+ "type": "Identifier",
+ "name": "id",
+ "range": [
+ 7664,
+ 7666
+ ],
+ "loc": {
+ "start": {
+ "line": 232,
+ "column": 69
+ },
+ "end": {
+ "line": 232,
+ "column": 71
+ }
+ }
+ },
+ "value": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "targetResource",
+ "range": [
+ 7668,
+ 7682
+ ],
+ "loc": {
+ "start": {
+ "line": 232,
+ "column": 73
+ },
+ "end": {
+ "line": 232,
+ "column": 87
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "id",
+ "range": [
+ 7683,
+ 7685
+ ],
+ "loc": {
+ "start": {
+ "line": 232,
+ "column": 88
+ },
+ "end": {
+ "line": 232,
+ "column": 90
+ }
+ }
+ },
+ "range": [
+ 7668,
+ 7685
+ ],
+ "loc": {
+ "start": {
+ "line": 232,
+ "column": 73
+ },
+ "end": {
+ "line": 232,
+ "column": 90
+ }
+ }
+ },
+ "kind": "init",
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "range": [
+ 7664,
+ 7685
+ ],
+ "loc": {
+ "start": {
+ "line": 232,
+ "column": 69
+ },
+ "end": {
+ "line": 232,
+ "column": 90
+ }
+ }
+ },
+ {
+ "type": "Property",
+ "key": {
+ "type": "Identifier",
+ "name": "fieldName",
+ "range": [
+ 7687,
+ 7696
+ ],
+ "loc": {
+ "start": {
+ "line": 232,
+ "column": 92
+ },
+ "end": {
+ "line": 232,
+ "column": 101
+ }
+ }
+ },
+ "value": {
+ "type": "Identifier",
+ "name": "targetFieldName",
+ "range": [
+ 7698,
+ 7713
+ ],
+ "loc": {
+ "start": {
+ "line": 232,
+ "column": 103
+ },
+ "end": {
+ "line": 232,
+ "column": 118
+ }
+ }
+ },
+ "kind": "init",
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "range": [
+ 7687,
+ 7713
+ ],
+ "loc": {
+ "start": {
+ "line": 232,
+ "column": 92
+ },
+ "end": {
+ "line": 232,
+ "column": 118
+ }
+ }
+ }
+ ],
+ "range": [
+ 7635,
+ 7715
+ ],
+ "loc": {
+ "start": {
+ "line": 232,
+ "column": 40
+ },
+ "end": {
+ "line": 232,
+ "column": 120
+ }
+ }
+ }
+ ],
+ "range": [
+ 7603,
+ 7716
+ ],
+ "loc": {
+ "start": {
+ "line": 232,
+ "column": 8
+ },
+ "end": {
+ "line": 232,
+ "column": 121
+ }
+ }
+ },
+ "range": [
+ 7603,
+ 7717
+ ],
+ "loc": {
+ "start": {
+ "line": 232,
+ "column": 8
+ },
+ "end": {
+ "line": 232,
+ "column": 122
+ }
+ }
+ },
+ {
+ "type": "ExpressionStatement",
+ "expression": {
+ "type": "AssignmentExpression",
+ "operator": "=",
+ "left": {
+ "type": "MemberExpression",
+ "computed": true,
+ "object": {
+ "type": "Identifier",
+ "name": "targetResource",
+ "range": [
+ 7726,
+ 7740
+ ],
+ "loc": {
+ "start": {
+ "line": 233,
+ "column": 8
+ },
+ "end": {
+ "line": 233,
+ "column": 22
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "targetFieldName",
+ "range": [
+ 7741,
+ 7756
+ ],
+ "loc": {
+ "start": {
+ "line": 233,
+ "column": 23
+ },
+ "end": {
+ "line": 233,
+ "column": 38
+ }
+ }
+ },
+ "range": [
+ 7726,
+ 7757
+ ],
+ "loc": {
+ "start": {
+ "line": 233,
+ "column": 8
+ },
+ "end": {
+ "line": 233,
+ "column": 39
+ }
+ }
+ },
+ "right": {
+ "type": "Identifier",
+ "name": "sourceResource",
+ "range": [
+ 7760,
+ 7774
+ ],
+ "loc": {
+ "start": {
+ "line": 233,
+ "column": 42
+ },
+ "end": {
+ "line": 233,
+ "column": 56
+ }
+ }
+ },
+ "range": [
+ 7726,
+ 7774
+ ],
+ "loc": {
+ "start": {
+ "line": 233,
+ "column": 8
+ },
+ "end": {
+ "line": 233,
+ "column": 56
+ }
+ }
+ },
+ "range": [
+ 7726,
+ 7775
+ ],
+ "loc": {
+ "start": {
+ "line": 233,
+ "column": 8
+ },
+ "end": {
+ "line": 233,
+ "column": 57
+ }
+ }
+ }
+ ],
+ "range": [
+ 7593,
+ 7783
+ ],
+ "loc": {
+ "start": {
+ "line": 231,
+ "column": 42
+ },
+ "end": {
+ "line": 234,
+ "column": 7
+ }
+ }
+ },
+ "alternate": {
+ "type": "IfStatement",
+ "test": {
+ "type": "BinaryExpression",
+ "operator": "===",
+ "left": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "targetField",
+ "range": [
+ 7793,
+ 7804
+ ],
+ "loc": {
+ "start": {
+ "line": 234,
+ "column": 17
+ },
+ "end": {
+ "line": 234,
+ "column": 28
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 7805,
+ 7809
+ ],
+ "loc": {
+ "start": {
+ "line": 234,
+ "column": 29
+ },
+ "end": {
+ "line": 234,
+ "column": 33
+ }
+ }
+ },
+ "range": [
+ 7793,
+ 7809
+ ],
+ "loc": {
+ "start": {
+ "line": 234,
+ "column": 17
+ },
+ "end": {
+ "line": 234,
+ "column": 33
+ }
+ }
+ },
+ "right": {
+ "type": "Literal",
+ "value": "has-many",
+ "raw": "\"has-many\"",
+ "range": [
+ 7814,
+ 7824
+ ],
+ "loc": {
+ "start": {
+ "line": 234,
+ "column": 38
+ },
+ "end": {
+ "line": 234,
+ "column": 48
+ }
+ }
+ },
+ "range": [
+ 7793,
+ 7824
+ ],
+ "loc": {
+ "start": {
+ "line": 234,
+ "column": 17
+ },
+ "end": {
+ "line": 234,
+ "column": 48
+ }
+ }
+ },
+ "consequent": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "expression": {
+ "type": "CallExpression",
+ "callee": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "sourceResource",
+ "range": [
+ 7836,
+ 7850
+ ],
+ "loc": {
+ "start": {
+ "line": 235,
+ "column": 8
+ },
+ "end": {
+ "line": 235,
+ "column": 22
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "_dependents",
+ "range": [
+ 7851,
+ 7862
+ ],
+ "loc": {
+ "start": {
+ "line": 235,
+ "column": 23
+ },
+ "end": {
+ "line": 235,
+ "column": 34
+ }
+ }
+ },
+ "range": [
+ 7836,
+ 7862
+ ],
+ "loc": {
+ "start": {
+ "line": 235,
+ "column": 8
+ },
+ "end": {
+ "line": 235,
+ "column": 34
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "push",
+ "range": [
+ 7863,
+ 7867
+ ],
+ "loc": {
+ "start": {
+ "line": 235,
+ "column": 35
+ },
+ "end": {
+ "line": 235,
+ "column": 39
+ }
+ }
+ },
+ "range": [
+ 7836,
+ 7867
+ ],
+ "loc": {
+ "start": {
+ "line": 235,
+ "column": 8
+ },
+ "end": {
+ "line": 235,
+ "column": 39
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "ObjectExpression",
+ "properties": [
+ {
+ "type": "Property",
+ "key": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 7870,
+ 7874
+ ],
+ "loc": {
+ "start": {
+ "line": 235,
+ "column": 42
+ },
+ "end": {
+ "line": 235,
+ "column": 46
+ }
+ }
+ },
+ "value": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "targetResource",
+ "range": [
+ 7876,
+ 7890
+ ],
+ "loc": {
+ "start": {
+ "line": 235,
+ "column": 48
+ },
+ "end": {
+ "line": 235,
+ "column": 62
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 7891,
+ 7895
+ ],
+ "loc": {
+ "start": {
+ "line": 235,
+ "column": 63
+ },
+ "end": {
+ "line": 235,
+ "column": 67
+ }
+ }
+ },
+ "range": [
+ 7876,
+ 7895
+ ],
+ "loc": {
+ "start": {
+ "line": 235,
+ "column": 48
+ },
+ "end": {
+ "line": 235,
+ "column": 67
+ }
+ }
+ },
+ "kind": "init",
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "range": [
+ 7870,
+ 7895
+ ],
+ "loc": {
+ "start": {
+ "line": 235,
+ "column": 42
+ },
+ "end": {
+ "line": 235,
+ "column": 67
+ }
+ }
+ },
+ {
+ "type": "Property",
+ "key": {
+ "type": "Identifier",
+ "name": "id",
+ "range": [
+ 7897,
+ 7899
+ ],
+ "loc": {
+ "start": {
+ "line": 235,
+ "column": 69
+ },
+ "end": {
+ "line": 235,
+ "column": 71
+ }
+ }
+ },
+ "value": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "targetResource",
+ "range": [
+ 7901,
+ 7915
+ ],
+ "loc": {
+ "start": {
+ "line": 235,
+ "column": 73
+ },
+ "end": {
+ "line": 235,
+ "column": 87
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "id",
+ "range": [
+ 7916,
+ 7918
+ ],
+ "loc": {
+ "start": {
+ "line": 235,
+ "column": 88
+ },
+ "end": {
+ "line": 235,
+ "column": 90
+ }
+ }
+ },
+ "range": [
+ 7901,
+ 7918
+ ],
+ "loc": {
+ "start": {
+ "line": 235,
+ "column": 73
+ },
+ "end": {
+ "line": 235,
+ "column": 90
+ }
+ }
+ },
+ "kind": "init",
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "range": [
+ 7897,
+ 7918
+ ],
+ "loc": {
+ "start": {
+ "line": 235,
+ "column": 69
+ },
+ "end": {
+ "line": 235,
+ "column": 90
+ }
+ }
+ },
+ {
+ "type": "Property",
+ "key": {
+ "type": "Identifier",
+ "name": "fieldName",
+ "range": [
+ 7920,
+ 7929
+ ],
+ "loc": {
+ "start": {
+ "line": 235,
+ "column": 92
+ },
+ "end": {
+ "line": 235,
+ "column": 101
+ }
+ }
+ },
+ "value": {
+ "type": "Identifier",
+ "name": "targetFieldName",
+ "range": [
+ 7931,
+ 7946
+ ],
+ "loc": {
+ "start": {
+ "line": 235,
+ "column": 103
+ },
+ "end": {
+ "line": 235,
+ "column": 118
+ }
+ }
+ },
+ "kind": "init",
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "range": [
+ 7920,
+ 7946
+ ],
+ "loc": {
+ "start": {
+ "line": 235,
+ "column": 92
+ },
+ "end": {
+ "line": 235,
+ "column": 118
+ }
+ }
+ }
+ ],
+ "range": [
+ 7868,
+ 7948
+ ],
+ "loc": {
+ "start": {
+ "line": 235,
+ "column": 40
+ },
+ "end": {
+ "line": 235,
+ "column": 120
+ }
+ }
+ }
+ ],
+ "range": [
+ 7836,
+ 7949
+ ],
+ "loc": {
+ "start": {
+ "line": 235,
+ "column": 8
+ },
+ "end": {
+ "line": 235,
+ "column": 121
+ }
+ }
+ },
+ "range": [
+ 7836,
+ 7950
+ ],
+ "loc": {
+ "start": {
+ "line": 235,
+ "column": 8
+ },
+ "end": {
+ "line": 235,
+ "column": 122
+ }
+ }
+ },
+ {
+ "type": "IfStatement",
+ "test": {
+ "type": "BinaryExpression",
+ "operator": "===",
+ "left": {
+ "type": "CallExpression",
+ "callee": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "MemberExpression",
+ "computed": true,
+ "object": {
+ "type": "Identifier",
+ "name": "targetResource",
+ "range": [
+ 7963,
+ 7977
+ ],
+ "loc": {
+ "start": {
+ "line": 236,
+ "column": 12
+ },
+ "end": {
+ "line": 236,
+ "column": 26
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "targetFieldName",
+ "range": [
+ 7978,
+ 7993
+ ],
+ "loc": {
+ "start": {
+ "line": 236,
+ "column": 27
+ },
+ "end": {
+ "line": 236,
+ "column": 42
+ }
+ }
+ },
+ "range": [
+ 7963,
+ 7994
+ ],
+ "loc": {
+ "start": {
+ "line": 236,
+ "column": 12
+ },
+ "end": {
+ "line": 236,
+ "column": 43
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "indexOf",
+ "range": [
+ 7995,
+ 8002
+ ],
+ "loc": {
+ "start": {
+ "line": 236,
+ "column": 44
+ },
+ "end": {
+ "line": 236,
+ "column": 51
+ }
+ }
+ },
+ "range": [
+ 7963,
+ 8002
+ ],
+ "loc": {
+ "start": {
+ "line": 236,
+ "column": 12
+ },
+ "end": {
+ "line": 236,
+ "column": 51
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "Identifier",
+ "name": "sourceResource",
+ "range": [
+ 8003,
+ 8017
+ ],
+ "loc": {
+ "start": {
+ "line": 236,
+ "column": 52
+ },
+ "end": {
+ "line": 236,
+ "column": 66
+ }
+ }
+ }
+ ],
+ "range": [
+ 7963,
+ 8018
+ ],
+ "loc": {
+ "start": {
+ "line": 236,
+ "column": 12
+ },
+ "end": {
+ "line": 236,
+ "column": 67
+ }
+ }
+ },
+ "right": {
+ "type": "UnaryExpression",
+ "operator": "-",
+ "argument": {
+ "type": "Literal",
+ "value": 1,
+ "raw": "1",
+ "range": [
+ 8024,
+ 8025
+ ],
+ "loc": {
+ "start": {
+ "line": 236,
+ "column": 73
+ },
+ "end": {
+ "line": 236,
+ "column": 74
+ }
+ }
+ },
+ "prefix": true,
+ "range": [
+ 8023,
+ 8025
+ ],
+ "loc": {
+ "start": {
+ "line": 236,
+ "column": 72
+ },
+ "end": {
+ "line": 236,
+ "column": 74
+ }
+ }
+ },
+ "range": [
+ 7963,
+ 8025
+ ],
+ "loc": {
+ "start": {
+ "line": 236,
+ "column": 12
+ },
+ "end": {
+ "line": 236,
+ "column": 74
+ }
+ }
+ },
+ "consequent": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "expression": {
+ "type": "CallExpression",
+ "callee": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "MemberExpression",
+ "computed": true,
+ "object": {
+ "type": "Identifier",
+ "name": "targetResource",
+ "range": [
+ 8039,
+ 8053
+ ],
+ "loc": {
+ "start": {
+ "line": 237,
+ "column": 10
+ },
+ "end": {
+ "line": 237,
+ "column": 24
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "targetFieldName",
+ "range": [
+ 8054,
+ 8069
+ ],
+ "loc": {
+ "start": {
+ "line": 237,
+ "column": 25
+ },
+ "end": {
+ "line": 237,
+ "column": 40
+ }
+ }
+ },
+ "range": [
+ 8039,
+ 8070
+ ],
+ "loc": {
+ "start": {
+ "line": 237,
+ "column": 10
+ },
+ "end": {
+ "line": 237,
+ "column": 41
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "push",
+ "range": [
+ 8071,
+ 8075
+ ],
+ "loc": {
+ "start": {
+ "line": 237,
+ "column": 42
+ },
+ "end": {
+ "line": 237,
+ "column": 46
+ }
+ }
+ },
+ "range": [
+ 8039,
+ 8075
+ ],
+ "loc": {
+ "start": {
+ "line": 237,
+ "column": 10
+ },
+ "end": {
+ "line": 237,
+ "column": 46
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "Identifier",
+ "name": "sourceResource",
+ "range": [
+ 8076,
+ 8090
+ ],
+ "loc": {
+ "start": {
+ "line": 237,
+ "column": 47
+ },
+ "end": {
+ "line": 237,
+ "column": 61
+ }
+ }
+ }
+ ],
+ "range": [
+ 8039,
+ 8091
+ ],
+ "loc": {
+ "start": {
+ "line": 237,
+ "column": 10
+ },
+ "end": {
+ "line": 237,
+ "column": 62
+ }
+ }
+ },
+ "range": [
+ 8039,
+ 8092
+ ],
+ "loc": {
+ "start": {
+ "line": 237,
+ "column": 10
+ },
+ "end": {
+ "line": 237,
+ "column": 63
+ }
+ }
+ }
+ ],
+ "range": [
+ 8027,
+ 8102
+ ],
+ "loc": {
+ "start": {
+ "line": 236,
+ "column": 76
+ },
+ "end": {
+ "line": 238,
+ "column": 9
+ }
+ }
+ },
+ "alternate": null,
+ "range": [
+ 7959,
+ 8102
+ ],
+ "loc": {
+ "start": {
+ "line": 236,
+ "column": 8
+ },
+ "end": {
+ "line": 238,
+ "column": 9
+ }
+ }
+ }
+ ],
+ "range": [
+ 7826,
+ 8110
+ ],
+ "loc": {
+ "start": {
+ "line": 234,
+ "column": 50
+ },
+ "end": {
+ "line": 239,
+ "column": 7
+ }
+ }
+ },
+ "alternate": {
+ "type": "IfStatement",
+ "test": {
+ "type": "BinaryExpression",
+ "operator": "===",
+ "left": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "targetField",
+ "range": [
+ 8120,
+ 8131
+ ],
+ "loc": {
+ "start": {
+ "line": 239,
+ "column": 17
+ },
+ "end": {
+ "line": 239,
+ "column": 28
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 8132,
+ 8136
+ ],
+ "loc": {
+ "start": {
+ "line": 239,
+ "column": 29
+ },
+ "end": {
+ "line": 239,
+ "column": 33
+ }
+ }
+ },
+ "range": [
+ 8120,
+ 8136
+ ],
+ "loc": {
+ "start": {
+ "line": 239,
+ "column": 17
+ },
+ "end": {
+ "line": 239,
+ "column": 33
+ }
+ }
+ },
+ "right": {
+ "type": "Literal",
+ "value": "attr",
+ "raw": "\"attr\"",
+ "range": [
+ 8141,
+ 8147
+ ],
+ "loc": {
+ "start": {
+ "line": 239,
+ "column": 38
+ },
+ "end": {
+ "line": 239,
+ "column": 44
+ }
+ }
+ },
+ "range": [
+ 8120,
+ 8147
+ ],
+ "loc": {
+ "start": {
+ "line": 239,
+ "column": 17
+ },
+ "end": {
+ "line": 239,
+ "column": 44
+ }
+ }
+ },
+ "consequent": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "ThrowStatement",
+ "argument": {
+ "type": "NewExpression",
+ "callee": {
+ "type": "Identifier",
+ "name": "Error",
+ "range": [
+ 8169,
+ 8174
+ ],
+ "loc": {
+ "start": {
+ "line": 240,
+ "column": 18
+ },
+ "end": {
+ "line": 240,
+ "column": 23
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "TemplateLiteral",
+ "quasis": [
+ {
+ "type": "TemplateElement",
+ "value": {
+ "raw": "The the inverse relationship for '",
+ "cooked": "The the inverse relationship for '"
+ },
+ "tail": false,
+ "range": [
+ 8175,
+ 8212
+ ],
+ "loc": {
+ "start": {
+ "line": 240,
+ "column": 24
+ },
+ "end": {
+ "line": 240,
+ "column": 61
+ }
+ }
+ },
+ {
+ "type": "TemplateElement",
+ "value": {
+ "raw": "' is an attribute ('",
+ "cooked": "' is an attribute ('"
+ },
+ "tail": false,
+ "range": [
+ 8227,
+ 8250
+ ],
+ "loc": {
+ "start": {
+ "line": 240,
+ "column": 76
+ },
+ "end": {
+ "line": 240,
+ "column": 99
+ }
+ }
+ },
+ {
+ "type": "TemplateElement",
+ "value": {
+ "raw": "')",
+ "cooked": "')"
+ },
+ "tail": true,
+ "range": [
+ 8265,
+ 8269
+ ],
+ "loc": {
+ "start": {
+ "line": 240,
+ "column": 114
+ },
+ "end": {
+ "line": 240,
+ "column": 118
+ }
+ }
+ }
+ ],
+ "expressions": [
+ {
+ "type": "Identifier",
+ "name": "sourceFieldName",
+ "range": [
+ 8212,
+ 8227
+ ],
+ "loc": {
+ "start": {
+ "line": 240,
+ "column": 61
+ },
+ "end": {
+ "line": 240,
+ "column": 76
+ }
+ }
+ },
+ {
+ "type": "Identifier",
+ "name": "targetFieldName",
+ "range": [
+ 8250,
+ 8265
+ ],
+ "loc": {
+ "start": {
+ "line": 240,
+ "column": 99
+ },
+ "end": {
+ "line": 240,
+ "column": 114
+ }
+ }
+ }
+ ],
+ "range": [
+ 8175,
+ 8269
+ ],
+ "loc": {
+ "start": {
+ "line": 240,
+ "column": 24
+ },
+ "end": {
+ "line": 240,
+ "column": 118
+ }
+ }
+ }
+ ],
+ "range": [
+ 8165,
+ 8270
+ ],
+ "loc": {
+ "start": {
+ "line": 240,
+ "column": 14
+ },
+ "end": {
+ "line": 240,
+ "column": 119
+ }
+ }
+ },
+ "range": [
+ 8159,
+ 8271
+ ],
+ "loc": {
+ "start": {
+ "line": 240,
+ "column": 8
+ },
+ "end": {
+ "line": 240,
+ "column": 120
+ }
+ }
+ }
+ ],
+ "range": [
+ 8149,
+ 8279
+ ],
+ "loc": {
+ "start": {
+ "line": 239,
+ "column": 46
+ },
+ "end": {
+ "line": 241,
+ "column": 7
+ }
+ }
+ },
+ "alternate": null,
+ "range": [
+ 8116,
+ 8279
+ ],
+ "loc": {
+ "start": {
+ "line": 239,
+ "column": 13
+ },
+ "end": {
+ "line": 241,
+ "column": 7
+ }
+ }
+ },
+ "range": [
+ 7789,
+ 8279
+ ],
+ "loc": {
+ "start": {
+ "line": 234,
+ "column": 13
+ },
+ "end": {
+ "line": 241,
+ "column": 7
+ }
+ }
+ },
+ "range": [
+ 7557,
+ 8279
+ ],
+ "loc": {
+ "start": {
+ "line": 231,
+ "column": 6
+ },
+ "end": {
+ "line": 241,
+ "column": 7
+ }
+ }
+ }
+ ],
+ "range": [
+ 7549,
+ 8285
+ ],
+ "loc": {
+ "start": {
+ "line": 230,
+ "column": 21
+ },
+ "end": {
+ "line": 242,
+ "column": 5
+ }
+ }
+ },
+ "alternate": {
+ "type": "IfStatement",
+ "test": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "sourceField",
+ "range": [
+ 8295,
+ 8306
+ ],
+ "loc": {
+ "start": {
+ "line": 242,
+ "column": 15
+ },
+ "end": {
+ "line": 242,
+ "column": 26
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "inverse",
+ "range": [
+ 8307,
+ 8314
+ ],
+ "loc": {
+ "start": {
+ "line": 242,
+ "column": 27
+ },
+ "end": {
+ "line": 242,
+ "column": 34
+ }
+ }
+ },
+ "range": [
+ 8295,
+ 8314
+ ],
+ "loc": {
+ "start": {
+ "line": 242,
+ "column": 15
+ },
+ "end": {
+ "line": 242,
+ "column": 34
+ }
+ }
+ },
+ "consequent": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "ThrowStatement",
+ "argument": {
+ "type": "NewExpression",
+ "callee": {
+ "type": "Identifier",
+ "name": "Error",
+ "range": [
+ 8334,
+ 8339
+ ],
+ "loc": {
+ "start": {
+ "line": 243,
+ "column": 16
+ },
+ "end": {
+ "line": 243,
+ "column": 21
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "TemplateLiteral",
+ "quasis": [
+ {
+ "type": "TemplateElement",
+ "value": {
+ "raw": "The the inverse relationship for '",
+ "cooked": "The the inverse relationship for '"
+ },
+ "tail": false,
+ "range": [
+ 8340,
+ 8377
+ ],
+ "loc": {
+ "start": {
+ "line": 243,
+ "column": 22
+ },
+ "end": {
+ "line": 243,
+ "column": 59
+ }
+ }
+ },
+ {
+ "type": "TemplateElement",
+ "value": {
+ "raw": "' is missing ('",
+ "cooked": "' is missing ('"
+ },
+ "tail": false,
+ "range": [
+ 8392,
+ 8410
+ ],
+ "loc": {
+ "start": {
+ "line": 243,
+ "column": 74
+ },
+ "end": {
+ "line": 243,
+ "column": 92
+ }
+ }
+ },
+ {
+ "type": "TemplateElement",
+ "value": {
+ "raw": "')",
+ "cooked": "')"
+ },
+ "tail": true,
+ "range": [
+ 8429,
+ 8433
+ ],
+ "loc": {
+ "start": {
+ "line": 243,
+ "column": 111
+ },
+ "end": {
+ "line": 243,
+ "column": 115
+ }
+ }
+ }
+ ],
+ "expressions": [
+ {
+ "type": "Identifier",
+ "name": "sourceFieldName",
+ "range": [
+ 8377,
+ 8392
+ ],
+ "loc": {
+ "start": {
+ "line": 243,
+ "column": 59
+ },
+ "end": {
+ "line": 243,
+ "column": 74
+ }
+ }
+ },
+ {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "sourceField",
+ "range": [
+ 8410,
+ 8421
+ ],
+ "loc": {
+ "start": {
+ "line": 243,
+ "column": 92
+ },
+ "end": {
+ "line": 243,
+ "column": 103
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "inverse",
+ "range": [
+ 8422,
+ 8429
+ ],
+ "loc": {
+ "start": {
+ "line": 243,
+ "column": 104
+ },
+ "end": {
+ "line": 243,
+ "column": 111
+ }
+ }
+ },
+ "range": [
+ 8410,
+ 8429
+ ],
+ "loc": {
+ "start": {
+ "line": 243,
+ "column": 92
+ },
+ "end": {
+ "line": 243,
+ "column": 111
+ }
+ }
+ }
+ ],
+ "range": [
+ 8340,
+ 8433
+ ],
+ "loc": {
+ "start": {
+ "line": 243,
+ "column": 22
+ },
+ "end": {
+ "line": 243,
+ "column": 115
+ }
+ }
+ }
+ ],
+ "range": [
+ 8330,
+ 8434
+ ],
+ "loc": {
+ "start": {
+ "line": 243,
+ "column": 12
+ },
+ "end": {
+ "line": 243,
+ "column": 116
+ }
+ }
+ },
+ "range": [
+ 8324,
+ 8435
+ ],
+ "loc": {
+ "start": {
+ "line": 243,
+ "column": 6
+ },
+ "end": {
+ "line": 243,
+ "column": 117
+ }
+ }
+ }
+ ],
+ "range": [
+ 8316,
+ 8441
+ ],
+ "loc": {
+ "start": {
+ "line": 242,
+ "column": 36
+ },
+ "end": {
+ "line": 244,
+ "column": 5
+ }
+ }
+ },
+ "alternate": null,
+ "range": [
+ 8291,
+ 8441
+ ],
+ "loc": {
+ "start": {
+ "line": 242,
+ "column": 11
+ },
+ "end": {
+ "line": 244,
+ "column": 5
+ }
+ }
+ },
+ "range": [
+ 7532,
+ 8441
+ ],
+ "loc": {
+ "start": {
+ "line": 230,
+ "column": 4
+ },
+ "end": {
+ "line": 244,
+ "column": 5
+ }
+ }
+ }
+ ],
+ "range": [
+ 7199,
+ 8445
+ ],
+ "loc": {
+ "start": {
+ "line": 225,
+ "column": 88
+ },
+ "end": {
+ "line": 245,
+ "column": 3
+ }
+ }
+ },
+ "generator": false,
+ "expression": false,
+ "range": [
+ 7136,
+ 8445
+ ],
+ "loc": {
+ "start": {
+ "line": 225,
+ "column": 25
+ },
+ "end": {
+ "line": 245,
+ "column": 3
+ }
+ }
+ },
+ "kind": "method",
+ "computed": false,
+ "range": [
+ 7113,
+ 8445
+ ],
+ "loc": {
+ "start": {
+ "line": 225,
+ "column": 2
+ },
+ "end": {
+ "line": 245,
+ "column": 3
+ }
+ },
+ "static": false
+ },
+ {
+ "type": "MethodDefinition",
+ "key": {
+ "type": "Identifier",
+ "name": "_remove",
+ "range": [
+ 8449,
+ 8456
+ ],
+ "loc": {
+ "start": {
+ "line": 247,
+ "column": 2
+ },
+ "end": {
+ "line": 247,
+ "column": 9
+ }
+ }
+ },
+ "value": {
+ "type": "FunctionExpression",
+ "id": null,
+ "params": [
+ {
+ "type": "Identifier",
+ "name": "resource",
+ "range": [
+ 8457,
+ 8465
+ ],
+ "loc": {
+ "start": {
+ "line": 247,
+ "column": 10
+ },
+ "end": {
+ "line": 247,
+ "column": 18
+ }
+ }
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "expression": {
+ "type": "CallExpression",
+ "callee": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "resource",
+ "range": [
+ 8473,
+ 8481
+ ],
+ "loc": {
+ "start": {
+ "line": 248,
+ "column": 4
+ },
+ "end": {
+ "line": 248,
+ "column": 12
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "_dependents",
+ "range": [
+ 8482,
+ 8493
+ ],
+ "loc": {
+ "start": {
+ "line": 248,
+ "column": 13
+ },
+ "end": {
+ "line": 248,
+ "column": 24
+ }
+ }
+ },
+ "range": [
+ 8473,
+ 8493
+ ],
+ "loc": {
+ "start": {
+ "line": 248,
+ "column": 4
+ },
+ "end": {
+ "line": 248,
+ "column": 24
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "forEach",
+ "range": [
+ 8494,
+ 8501
+ ],
+ "loc": {
+ "start": {
+ "line": 248,
+ "column": 25
+ },
+ "end": {
+ "line": 248,
+ "column": 32
+ }
+ }
+ },
+ "range": [
+ 8473,
+ 8501
+ ],
+ "loc": {
+ "start": {
+ "line": 248,
+ "column": 4
+ },
+ "end": {
+ "line": 248,
+ "column": 32
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "ArrowFunctionExpression",
+ "id": null,
+ "params": [
+ {
+ "type": "Identifier",
+ "name": "dependent",
+ "range": [
+ 8502,
+ 8511
+ ],
+ "loc": {
+ "start": {
+ "line": 248,
+ "column": 33
+ },
+ "end": {
+ "line": 248,
+ "column": 42
+ }
+ }
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "id": {
+ "type": "Identifier",
+ "name": "dependentResource",
+ "range": [
+ 8527,
+ 8544
+ ],
+ "loc": {
+ "start": {
+ "line": 249,
+ "column": 10
+ },
+ "end": {
+ "line": 249,
+ "column": 27
+ }
+ }
+ },
+ "init": {
+ "type": "MemberExpression",
+ "computed": true,
+ "object": {
+ "type": "MemberExpression",
+ "computed": true,
+ "object": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "ThisExpression",
+ "range": [
+ 8547,
+ 8551
+ ],
+ "loc": {
+ "start": {
+ "line": 249,
+ "column": 30
+ },
+ "end": {
+ "line": 249,
+ "column": 34
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "_data",
+ "range": [
+ 8552,
+ 8557
+ ],
+ "loc": {
+ "start": {
+ "line": 249,
+ "column": 35
+ },
+ "end": {
+ "line": 249,
+ "column": 40
+ }
+ }
+ },
+ "range": [
+ 8547,
+ 8557
+ ],
+ "loc": {
+ "start": {
+ "line": 249,
+ "column": 30
+ },
+ "end": {
+ "line": 249,
+ "column": 40
+ }
+ }
+ },
+ "property": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "dependent",
+ "range": [
+ 8558,
+ 8567
+ ],
+ "loc": {
+ "start": {
+ "line": 249,
+ "column": 41
+ },
+ "end": {
+ "line": 249,
+ "column": 50
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 8568,
+ 8572
+ ],
+ "loc": {
+ "start": {
+ "line": 249,
+ "column": 51
+ },
+ "end": {
+ "line": 249,
+ "column": 55
+ }
+ }
+ },
+ "range": [
+ 8558,
+ 8572
+ ],
+ "loc": {
+ "start": {
+ "line": 249,
+ "column": 41
+ },
+ "end": {
+ "line": 249,
+ "column": 55
+ }
+ }
+ },
+ "range": [
+ 8547,
+ 8573
+ ],
+ "loc": {
+ "start": {
+ "line": 249,
+ "column": 30
+ },
+ "end": {
+ "line": 249,
+ "column": 56
+ }
+ }
+ },
+ "property": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "dependent",
+ "range": [
+ 8574,
+ 8583
+ ],
+ "loc": {
+ "start": {
+ "line": 249,
+ "column": 57
+ },
+ "end": {
+ "line": 249,
+ "column": 66
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "id",
+ "range": [
+ 8584,
+ 8586
+ ],
+ "loc": {
+ "start": {
+ "line": 249,
+ "column": 67
+ },
+ "end": {
+ "line": 249,
+ "column": 69
+ }
+ }
+ },
+ "range": [
+ 8574,
+ 8586
+ ],
+ "loc": {
+ "start": {
+ "line": 249,
+ "column": 57
+ },
+ "end": {
+ "line": 249,
+ "column": 69
+ }
+ }
+ },
+ "range": [
+ 8547,
+ 8587
+ ],
+ "loc": {
+ "start": {
+ "line": 249,
+ "column": 30
+ },
+ "end": {
+ "line": 249,
+ "column": 70
+ }
+ }
+ },
+ "range": [
+ 8527,
+ 8587
+ ],
+ "loc": {
+ "start": {
+ "line": 249,
+ "column": 10
+ },
+ "end": {
+ "line": 249,
+ "column": 70
+ }
+ }
+ }
+ ],
+ "kind": "let",
+ "range": [
+ 8523,
+ 8588
+ ],
+ "loc": {
+ "start": {
+ "line": 249,
+ "column": 6
+ },
+ "end": {
+ "line": 249,
+ "column": 71
+ }
+ }
+ },
+ {
+ "type": "SwitchStatement",
+ "discriminant": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "MemberExpression",
+ "computed": true,
+ "object": {
+ "type": "MemberExpression",
+ "computed": true,
+ "object": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "Store",
+ "range": [
+ 8603,
+ 8608
+ ],
+ "loc": {
+ "start": {
+ "line": 250,
+ "column": 14
+ },
+ "end": {
+ "line": 250,
+ "column": 19
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "types",
+ "range": [
+ 8609,
+ 8614
+ ],
+ "loc": {
+ "start": {
+ "line": 250,
+ "column": 20
+ },
+ "end": {
+ "line": 250,
+ "column": 25
+ }
+ }
+ },
+ "range": [
+ 8603,
+ 8614
+ ],
+ "loc": {
+ "start": {
+ "line": 250,
+ "column": 14
+ },
+ "end": {
+ "line": 250,
+ "column": 25
+ }
+ }
+ },
+ "property": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "dependent",
+ "range": [
+ 8615,
+ 8624
+ ],
+ "loc": {
+ "start": {
+ "line": 250,
+ "column": 26
+ },
+ "end": {
+ "line": 250,
+ "column": 35
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 8625,
+ 8629
+ ],
+ "loc": {
+ "start": {
+ "line": 250,
+ "column": 36
+ },
+ "end": {
+ "line": 250,
+ "column": 40
+ }
+ }
+ },
+ "range": [
+ 8615,
+ 8629
+ ],
+ "loc": {
+ "start": {
+ "line": 250,
+ "column": 26
+ },
+ "end": {
+ "line": 250,
+ "column": 40
+ }
+ }
+ },
+ "range": [
+ 8603,
+ 8630
+ ],
+ "loc": {
+ "start": {
+ "line": 250,
+ "column": 14
+ },
+ "end": {
+ "line": 250,
+ "column": 41
+ }
+ }
+ },
+ "property": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "dependent",
+ "range": [
+ 8631,
+ 8640
+ ],
+ "loc": {
+ "start": {
+ "line": 250,
+ "column": 42
+ },
+ "end": {
+ "line": 250,
+ "column": 51
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "fieldName",
+ "range": [
+ 8641,
+ 8650
+ ],
+ "loc": {
+ "start": {
+ "line": 250,
+ "column": 52
+ },
+ "end": {
+ "line": 250,
+ "column": 61
+ }
+ }
+ },
+ "range": [
+ 8631,
+ 8650
+ ],
+ "loc": {
+ "start": {
+ "line": 250,
+ "column": 42
+ },
+ "end": {
+ "line": 250,
+ "column": 61
+ }
+ }
+ },
+ "range": [
+ 8603,
+ 8651
+ ],
+ "loc": {
+ "start": {
+ "line": 250,
+ "column": 14
+ },
+ "end": {
+ "line": 250,
+ "column": 62
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 8652,
+ 8656
+ ],
+ "loc": {
+ "start": {
+ "line": 250,
+ "column": 63
+ },
+ "end": {
+ "line": 250,
+ "column": 67
+ }
+ }
+ },
+ "range": [
+ 8603,
+ 8656
+ ],
+ "loc": {
+ "start": {
+ "line": 250,
+ "column": 14
+ },
+ "end": {
+ "line": 250,
+ "column": 67
+ }
+ }
+ },
+ "cases": [
+ {
+ "type": "SwitchCase",
+ "test": {
+ "type": "Literal",
+ "value": "has-one",
+ "raw": "\"has-one\"",
+ "range": [
+ 8673,
+ 8682
+ ],
+ "loc": {
+ "start": {
+ "line": 251,
+ "column": 13
+ },
+ "end": {
+ "line": 251,
+ "column": 22
+ }
+ }
+ },
+ "consequent": [
+ {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "expression": {
+ "type": "AssignmentExpression",
+ "operator": "=",
+ "left": {
+ "type": "MemberExpression",
+ "computed": true,
+ "object": {
+ "type": "Identifier",
+ "name": "dependentResource",
+ "range": [
+ 8696,
+ 8713
+ ],
+ "loc": {
+ "start": {
+ "line": 252,
+ "column": 10
+ },
+ "end": {
+ "line": 252,
+ "column": 27
+ }
+ }
+ },
+ "property": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "dependent",
+ "range": [
+ 8714,
+ 8723
+ ],
+ "loc": {
+ "start": {
+ "line": 252,
+ "column": 28
+ },
+ "end": {
+ "line": 252,
+ "column": 37
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "fieldName",
+ "range": [
+ 8724,
+ 8733
+ ],
+ "loc": {
+ "start": {
+ "line": 252,
+ "column": 38
+ },
+ "end": {
+ "line": 252,
+ "column": 47
+ }
+ }
+ },
+ "range": [
+ 8714,
+ 8733
+ ],
+ "loc": {
+ "start": {
+ "line": 252,
+ "column": 28
+ },
+ "end": {
+ "line": 252,
+ "column": 47
+ }
+ }
+ },
+ "range": [
+ 8696,
+ 8734
+ ],
+ "loc": {
+ "start": {
+ "line": 252,
+ "column": 10
+ },
+ "end": {
+ "line": 252,
+ "column": 48
+ }
+ }
+ },
+ "right": {
+ "type": "Literal",
+ "value": null,
+ "raw": "null",
+ "range": [
+ 8737,
+ 8741
+ ],
+ "loc": {
+ "start": {
+ "line": 252,
+ "column": 51
+ },
+ "end": {
+ "line": 252,
+ "column": 55
+ }
+ }
+ },
+ "range": [
+ 8696,
+ 8741
+ ],
+ "loc": {
+ "start": {
+ "line": 252,
+ "column": 10
+ },
+ "end": {
+ "line": 252,
+ "column": 55
+ }
+ }
+ },
+ "range": [
+ 8696,
+ 8742
+ ],
+ "loc": {
+ "start": {
+ "line": 252,
+ "column": 10
+ },
+ "end": {
+ "line": 252,
+ "column": 56
+ }
+ }
+ },
+ {
+ "type": "BreakStatement",
+ "label": null,
+ "range": [
+ 8753,
+ 8759
+ ],
+ "loc": {
+ "start": {
+ "line": 253,
+ "column": 10
+ },
+ "end": {
+ "line": 253,
+ "column": 16
+ }
+ }
+ }
+ ],
+ "range": [
+ 8684,
+ 8769
+ ],
+ "loc": {
+ "start": {
+ "line": 251,
+ "column": 24
+ },
+ "end": {
+ "line": 254,
+ "column": 9
+ }
+ }
+ }
+ ],
+ "range": [
+ 8668,
+ 8769
+ ],
+ "loc": {
+ "start": {
+ "line": 251,
+ "column": 8
+ },
+ "end": {
+ "line": 254,
+ "column": 9
+ }
+ }
+ },
+ {
+ "type": "SwitchCase",
+ "test": {
+ "type": "Literal",
+ "value": "has-many",
+ "raw": "\"has-many\"",
+ "range": [
+ 8783,
+ 8793
+ ],
+ "loc": {
+ "start": {
+ "line": 255,
+ "column": 13
+ },
+ "end": {
+ "line": 255,
+ "column": 23
+ }
+ }
+ },
+ "consequent": [
+ {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "id": {
+ "type": "Identifier",
+ "name": "index",
+ "range": [
+ 8811,
+ 8816
+ ],
+ "loc": {
+ "start": {
+ "line": 256,
+ "column": 14
+ },
+ "end": {
+ "line": 256,
+ "column": 19
+ }
+ }
+ },
+ "init": {
+ "type": "CallExpression",
+ "callee": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "MemberExpression",
+ "computed": true,
+ "object": {
+ "type": "Identifier",
+ "name": "dependentResource",
+ "range": [
+ 8819,
+ 8836
+ ],
+ "loc": {
+ "start": {
+ "line": 256,
+ "column": 22
+ },
+ "end": {
+ "line": 256,
+ "column": 39
+ }
+ }
+ },
+ "property": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "dependent",
+ "range": [
+ 8837,
+ 8846
+ ],
+ "loc": {
+ "start": {
+ "line": 256,
+ "column": 40
+ },
+ "end": {
+ "line": 256,
+ "column": 49
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "fieldName",
+ "range": [
+ 8847,
+ 8856
+ ],
+ "loc": {
+ "start": {
+ "line": 256,
+ "column": 50
+ },
+ "end": {
+ "line": 256,
+ "column": 59
+ }
+ }
+ },
+ "range": [
+ 8837,
+ 8856
+ ],
+ "loc": {
+ "start": {
+ "line": 256,
+ "column": 40
+ },
+ "end": {
+ "line": 256,
+ "column": 59
+ }
+ }
+ },
+ "range": [
+ 8819,
+ 8857
+ ],
+ "loc": {
+ "start": {
+ "line": 256,
+ "column": 22
+ },
+ "end": {
+ "line": 256,
+ "column": 60
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "indexOf",
+ "range": [
+ 8858,
+ 8865
+ ],
+ "loc": {
+ "start": {
+ "line": 256,
+ "column": 61
+ },
+ "end": {
+ "line": 256,
+ "column": 68
+ }
+ }
+ },
+ "range": [
+ 8819,
+ 8865
+ ],
+ "loc": {
+ "start": {
+ "line": 256,
+ "column": 22
+ },
+ "end": {
+ "line": 256,
+ "column": 68
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "Identifier",
+ "name": "resource",
+ "range": [
+ 8866,
+ 8874
+ ],
+ "loc": {
+ "start": {
+ "line": 256,
+ "column": 69
+ },
+ "end": {
+ "line": 256,
+ "column": 77
+ }
+ }
+ }
+ ],
+ "range": [
+ 8819,
+ 8875
+ ],
+ "loc": {
+ "start": {
+ "line": 256,
+ "column": 22
+ },
+ "end": {
+ "line": 256,
+ "column": 78
+ }
+ }
+ },
+ "range": [
+ 8811,
+ 8875
+ ],
+ "loc": {
+ "start": {
+ "line": 256,
+ "column": 14
+ },
+ "end": {
+ "line": 256,
+ "column": 78
+ }
+ }
+ }
+ ],
+ "kind": "let",
+ "range": [
+ 8807,
+ 8876
+ ],
+ "loc": {
+ "start": {
+ "line": 256,
+ "column": 10
+ },
+ "end": {
+ "line": 256,
+ "column": 79
+ }
+ }
+ },
+ {
+ "type": "IfStatement",
+ "test": {
+ "type": "BinaryExpression",
+ "operator": "!==",
+ "left": {
+ "type": "Identifier",
+ "name": "index",
+ "range": [
+ 8891,
+ 8896
+ ],
+ "loc": {
+ "start": {
+ "line": 257,
+ "column": 14
+ },
+ "end": {
+ "line": 257,
+ "column": 19
+ }
+ }
+ },
+ "right": {
+ "type": "UnaryExpression",
+ "operator": "-",
+ "argument": {
+ "type": "Literal",
+ "value": 1,
+ "raw": "1",
+ "range": [
+ 8902,
+ 8903
+ ],
+ "loc": {
+ "start": {
+ "line": 257,
+ "column": 25
+ },
+ "end": {
+ "line": 257,
+ "column": 26
+ }
+ }
+ },
+ "prefix": true,
+ "range": [
+ 8901,
+ 8903
+ ],
+ "loc": {
+ "start": {
+ "line": 257,
+ "column": 24
+ },
+ "end": {
+ "line": 257,
+ "column": 26
+ }
+ }
+ },
+ "range": [
+ 8891,
+ 8903
+ ],
+ "loc": {
+ "start": {
+ "line": 257,
+ "column": 14
+ },
+ "end": {
+ "line": 257,
+ "column": 26
+ }
+ }
+ },
+ "consequent": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "expression": {
+ "type": "CallExpression",
+ "callee": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "MemberExpression",
+ "computed": true,
+ "object": {
+ "type": "Identifier",
+ "name": "dependentResource",
+ "range": [
+ 8919,
+ 8936
+ ],
+ "loc": {
+ "start": {
+ "line": 258,
+ "column": 12
+ },
+ "end": {
+ "line": 258,
+ "column": 29
+ }
+ }
+ },
+ "property": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "dependent",
+ "range": [
+ 8937,
+ 8946
+ ],
+ "loc": {
+ "start": {
+ "line": 258,
+ "column": 30
+ },
+ "end": {
+ "line": 258,
+ "column": 39
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "fieldName",
+ "range": [
+ 8947,
+ 8956
+ ],
+ "loc": {
+ "start": {
+ "line": 258,
+ "column": 40
+ },
+ "end": {
+ "line": 258,
+ "column": 49
+ }
+ }
+ },
+ "range": [
+ 8937,
+ 8956
+ ],
+ "loc": {
+ "start": {
+ "line": 258,
+ "column": 30
+ },
+ "end": {
+ "line": 258,
+ "column": 49
+ }
+ }
+ },
+ "range": [
+ 8919,
+ 8957
+ ],
+ "loc": {
+ "start": {
+ "line": 258,
+ "column": 12
+ },
+ "end": {
+ "line": 258,
+ "column": 50
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "splice",
+ "range": [
+ 8958,
+ 8964
+ ],
+ "loc": {
+ "start": {
+ "line": 258,
+ "column": 51
+ },
+ "end": {
+ "line": 258,
+ "column": 57
+ }
+ }
+ },
+ "range": [
+ 8919,
+ 8964
+ ],
+ "loc": {
+ "start": {
+ "line": 258,
+ "column": 12
+ },
+ "end": {
+ "line": 258,
+ "column": 57
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "Identifier",
+ "name": "index",
+ "range": [
+ 8965,
+ 8970
+ ],
+ "loc": {
+ "start": {
+ "line": 258,
+ "column": 58
+ },
+ "end": {
+ "line": 258,
+ "column": 63
+ }
+ }
+ },
+ {
+ "type": "Literal",
+ "value": 1,
+ "raw": "1",
+ "range": [
+ 8972,
+ 8973
+ ],
+ "loc": {
+ "start": {
+ "line": 258,
+ "column": 65
+ },
+ "end": {
+ "line": 258,
+ "column": 66
+ }
+ }
+ }
+ ],
+ "range": [
+ 8919,
+ 8974
+ ],
+ "loc": {
+ "start": {
+ "line": 258,
+ "column": 12
+ },
+ "end": {
+ "line": 258,
+ "column": 67
+ }
+ }
+ },
+ "range": [
+ 8919,
+ 8975
+ ],
+ "loc": {
+ "start": {
+ "line": 258,
+ "column": 12
+ },
+ "end": {
+ "line": 258,
+ "column": 68
+ }
+ }
+ }
+ ],
+ "range": [
+ 8905,
+ 8987
+ ],
+ "loc": {
+ "start": {
+ "line": 257,
+ "column": 28
+ },
+ "end": {
+ "line": 259,
+ "column": 11
+ }
+ }
+ },
+ "alternate": null,
+ "range": [
+ 8887,
+ 8987
+ ],
+ "loc": {
+ "start": {
+ "line": 257,
+ "column": 10
+ },
+ "end": {
+ "line": 259,
+ "column": 11
+ }
+ }
+ },
+ {
+ "type": "BreakStatement",
+ "label": null,
+ "range": [
+ 8998,
+ 9004
+ ],
+ "loc": {
+ "start": {
+ "line": 260,
+ "column": 10
+ },
+ "end": {
+ "line": 260,
+ "column": 16
+ }
+ }
+ }
+ ],
+ "range": [
+ 8795,
+ 9014
+ ],
+ "loc": {
+ "start": {
+ "line": 255,
+ "column": 25
+ },
+ "end": {
+ "line": 261,
+ "column": 9
+ }
+ }
+ }
+ ],
+ "range": [
+ 8778,
+ 9014
+ ],
+ "loc": {
+ "start": {
+ "line": 255,
+ "column": 8
+ },
+ "end": {
+ "line": 261,
+ "column": 9
+ }
+ }
+ },
+ {
+ "type": "SwitchCase",
+ "test": null,
+ "consequent": [
+ {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "BreakStatement",
+ "label": null,
+ "range": [
+ 9044,
+ 9050
+ ],
+ "loc": {
+ "start": {
+ "line": 263,
+ "column": 10
+ },
+ "end": {
+ "line": 263,
+ "column": 16
+ }
+ }
+ }
+ ],
+ "range": [
+ 9032,
+ 9060
+ ],
+ "loc": {
+ "start": {
+ "line": 262,
+ "column": 17
+ },
+ "end": {
+ "line": 264,
+ "column": 9
+ }
+ }
+ }
+ ],
+ "range": [
+ 9023,
+ 9060
+ ],
+ "loc": {
+ "start": {
+ "line": 262,
+ "column": 8
+ },
+ "end": {
+ "line": 264,
+ "column": 9
+ }
+ }
+ }
+ ],
+ "range": [
+ 8595,
+ 9068
+ ],
+ "loc": {
+ "start": {
+ "line": 250,
+ "column": 6
+ },
+ "end": {
+ "line": 265,
+ "column": 7
+ }
+ },
+ "trailingComments": [
+ {
+ "type": "Line",
+ "value": " TODO: This only needs to be run once for each dependent.",
+ "range": [
+ 9075,
+ 9134
+ ],
+ "loc": {
+ "start": {
+ "line": 266,
+ "column": 6
+ },
+ "end": {
+ "line": 266,
+ "column": 65
+ }
+ }
+ }
+ ]
+ },
+ {
+ "type": "ExpressionStatement",
+ "expression": {
+ "type": "AssignmentExpression",
+ "operator": "=",
+ "left": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "dependentResource",
+ "range": [
+ 9141,
+ 9158
+ ],
+ "loc": {
+ "start": {
+ "line": 267,
+ "column": 6
+ },
+ "end": {
+ "line": 267,
+ "column": 23
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "_dependents",
+ "range": [
+ 9159,
+ 9170
+ ],
+ "loc": {
+ "start": {
+ "line": 267,
+ "column": 24
+ },
+ "end": {
+ "line": 267,
+ "column": 35
+ }
+ }
+ },
+ "range": [
+ 9141,
+ 9170
+ ],
+ "loc": {
+ "start": {
+ "line": 267,
+ "column": 6
+ },
+ "end": {
+ "line": 267,
+ "column": 35
+ }
+ }
+ },
+ "right": {
+ "type": "CallExpression",
+ "callee": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "dependentResource",
+ "range": [
+ 9173,
+ 9190
+ ],
+ "loc": {
+ "start": {
+ "line": 267,
+ "column": 38
+ },
+ "end": {
+ "line": 267,
+ "column": 55
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "_dependents",
+ "range": [
+ 9191,
+ 9202
+ ],
+ "loc": {
+ "start": {
+ "line": 267,
+ "column": 56
+ },
+ "end": {
+ "line": 267,
+ "column": 67
+ }
+ }
+ },
+ "range": [
+ 9173,
+ 9202
+ ],
+ "loc": {
+ "start": {
+ "line": 267,
+ "column": 38
+ },
+ "end": {
+ "line": 267,
+ "column": 67
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "filter",
+ "range": [
+ 9203,
+ 9209
+ ],
+ "loc": {
+ "start": {
+ "line": 267,
+ "column": 68
+ },
+ "end": {
+ "line": 267,
+ "column": 74
+ }
+ }
+ },
+ "range": [
+ 9173,
+ 9209
+ ],
+ "loc": {
+ "start": {
+ "line": 267,
+ "column": 38
+ },
+ "end": {
+ "line": 267,
+ "column": 74
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "ArrowFunctionExpression",
+ "id": null,
+ "params": [
+ {
+ "type": "Identifier",
+ "name": "d",
+ "range": [
+ 9210,
+ 9211
+ ],
+ "loc": {
+ "start": {
+ "line": 267,
+ "column": 75
+ },
+ "end": {
+ "line": 267,
+ "column": 76
+ }
+ }
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "ReturnStatement",
+ "argument": {
+ "type": "UnaryExpression",
+ "operator": "!",
+ "argument": {
+ "type": "LogicalExpression",
+ "operator": "&&",
+ "left": {
+ "type": "BinaryExpression",
+ "operator": "===",
+ "left": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "d",
+ "range": [
+ 9234,
+ 9235
+ ],
+ "loc": {
+ "start": {
+ "line": 268,
+ "column": 17
+ },
+ "end": {
+ "line": 268,
+ "column": 18
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 9236,
+ 9240
+ ],
+ "loc": {
+ "start": {
+ "line": 268,
+ "column": 19
+ },
+ "end": {
+ "line": 268,
+ "column": 23
+ }
+ }
+ },
+ "range": [
+ 9234,
+ 9240
+ ],
+ "loc": {
+ "start": {
+ "line": 268,
+ "column": 17
+ },
+ "end": {
+ "line": 268,
+ "column": 23
+ }
+ }
+ },
+ "right": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "resource",
+ "range": [
+ 9245,
+ 9253
+ ],
+ "loc": {
+ "start": {
+ "line": 268,
+ "column": 28
+ },
+ "end": {
+ "line": 268,
+ "column": 36
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 9254,
+ 9258
+ ],
+ "loc": {
+ "start": {
+ "line": 268,
+ "column": 37
+ },
+ "end": {
+ "line": 268,
+ "column": 41
+ }
+ }
+ },
+ "range": [
+ 9245,
+ 9258
+ ],
+ "loc": {
+ "start": {
+ "line": 268,
+ "column": 28
+ },
+ "end": {
+ "line": 268,
+ "column": 41
+ }
+ }
+ },
+ "range": [
+ 9234,
+ 9258
+ ],
+ "loc": {
+ "start": {
+ "line": 268,
+ "column": 17
+ },
+ "end": {
+ "line": 268,
+ "column": 41
+ }
+ }
+ },
+ "right": {
+ "type": "BinaryExpression",
+ "operator": "===",
+ "left": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "d",
+ "range": [
+ 9262,
+ 9263
+ ],
+ "loc": {
+ "start": {
+ "line": 268,
+ "column": 45
+ },
+ "end": {
+ "line": 268,
+ "column": 46
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "id",
+ "range": [
+ 9264,
+ 9266
+ ],
+ "loc": {
+ "start": {
+ "line": 268,
+ "column": 47
+ },
+ "end": {
+ "line": 268,
+ "column": 49
+ }
+ }
+ },
+ "range": [
+ 9262,
+ 9266
+ ],
+ "loc": {
+ "start": {
+ "line": 268,
+ "column": 45
+ },
+ "end": {
+ "line": 268,
+ "column": 49
+ }
+ }
+ },
+ "right": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "resource",
+ "range": [
+ 9271,
+ 9279
+ ],
+ "loc": {
+ "start": {
+ "line": 268,
+ "column": 54
+ },
+ "end": {
+ "line": 268,
+ "column": 62
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "id",
+ "range": [
+ 9280,
+ 9282
+ ],
+ "loc": {
+ "start": {
+ "line": 268,
+ "column": 63
+ },
+ "end": {
+ "line": 268,
+ "column": 65
+ }
+ }
+ },
+ "range": [
+ 9271,
+ 9282
+ ],
+ "loc": {
+ "start": {
+ "line": 268,
+ "column": 54
+ },
+ "end": {
+ "line": 268,
+ "column": 65
+ }
+ }
+ },
+ "range": [
+ 9262,
+ 9282
+ ],
+ "loc": {
+ "start": {
+ "line": 268,
+ "column": 45
+ },
+ "end": {
+ "line": 268,
+ "column": 65
+ }
+ }
+ },
+ "range": [
+ 9234,
+ 9282
+ ],
+ "loc": {
+ "start": {
+ "line": 268,
+ "column": 17
+ },
+ "end": {
+ "line": 268,
+ "column": 65
+ }
+ }
+ },
+ "prefix": true,
+ "range": [
+ 9232,
+ 9283
+ ],
+ "loc": {
+ "start": {
+ "line": 268,
+ "column": 15
+ },
+ "end": {
+ "line": 268,
+ "column": 66
+ }
+ }
+ },
+ "range": [
+ 9225,
+ 9284
+ ],
+ "loc": {
+ "start": {
+ "line": 268,
+ "column": 8
+ },
+ "end": {
+ "line": 268,
+ "column": 67
+ }
+ }
+ }
+ ],
+ "range": [
+ 9215,
+ 9292
+ ],
+ "loc": {
+ "start": {
+ "line": 267,
+ "column": 80
+ },
+ "end": {
+ "line": 269,
+ "column": 7
+ }
+ }
+ },
+ "generator": false,
+ "expression": false,
+ "range": [
+ 9210,
+ 9292
+ ],
+ "loc": {
+ "start": {
+ "line": 267,
+ "column": 75
+ },
+ "end": {
+ "line": 269,
+ "column": 7
+ }
+ }
+ }
+ ],
+ "range": [
+ 9173,
+ 9293
+ ],
+ "loc": {
+ "start": {
+ "line": 267,
+ "column": 38
+ },
+ "end": {
+ "line": 269,
+ "column": 8
+ }
+ }
+ },
+ "range": [
+ 9141,
+ 9293
+ ],
+ "loc": {
+ "start": {
+ "line": 267,
+ "column": 6
+ },
+ "end": {
+ "line": 269,
+ "column": 8
+ }
+ }
+ },
+ "range": [
+ 9141,
+ 9294
+ ],
+ "loc": {
+ "start": {
+ "line": 267,
+ "column": 6
+ },
+ "end": {
+ "line": 269,
+ "column": 9
+ }
+ },
+ "leadingComments": [
+ {
+ "type": "Line",
+ "value": " TODO: This only needs to be run once for each dependent.",
+ "range": [
+ 9075,
+ 9134
+ ],
+ "loc": {
+ "start": {
+ "line": 266,
+ "column": 6
+ },
+ "end": {
+ "line": 266,
+ "column": 65
+ }
+ }
+ }
+ ]
+ }
+ ],
+ "range": [
+ 8515,
+ 9300
+ ],
+ "loc": {
+ "start": {
+ "line": 248,
+ "column": 46
+ },
+ "end": {
+ "line": 270,
+ "column": 5
+ }
+ }
+ },
+ "generator": false,
+ "expression": false,
+ "range": [
+ 8502,
+ 9300
+ ],
+ "loc": {
+ "start": {
+ "line": 248,
+ "column": 33
+ },
+ "end": {
+ "line": 270,
+ "column": 5
+ }
+ }
+ }
+ ],
+ "range": [
+ 8473,
+ 9301
+ ],
+ "loc": {
+ "start": {
+ "line": 248,
+ "column": 4
+ },
+ "end": {
+ "line": 270,
+ "column": 6
+ }
+ }
+ },
+ "range": [
+ 8473,
+ 9302
+ ],
+ "loc": {
+ "start": {
+ "line": 248,
+ "column": 4
+ },
+ "end": {
+ "line": 270,
+ "column": 7
+ }
+ }
+ },
+ {
+ "type": "ExpressionStatement",
+ "expression": {
+ "type": "UnaryExpression",
+ "operator": "delete",
+ "argument": {
+ "type": "MemberExpression",
+ "computed": true,
+ "object": {
+ "type": "MemberExpression",
+ "computed": true,
+ "object": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "ThisExpression",
+ "range": [
+ 9314,
+ 9318
+ ],
+ "loc": {
+ "start": {
+ "line": 271,
+ "column": 11
+ },
+ "end": {
+ "line": 271,
+ "column": 15
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "_data",
+ "range": [
+ 9319,
+ 9324
+ ],
+ "loc": {
+ "start": {
+ "line": 271,
+ "column": 16
+ },
+ "end": {
+ "line": 271,
+ "column": 21
+ }
+ }
+ },
+ "range": [
+ 9314,
+ 9324
+ ],
+ "loc": {
+ "start": {
+ "line": 271,
+ "column": 11
+ },
+ "end": {
+ "line": 271,
+ "column": 21
+ }
+ }
+ },
+ "property": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "resource",
+ "range": [
+ 9325,
+ 9333
+ ],
+ "loc": {
+ "start": {
+ "line": 271,
+ "column": 22
+ },
+ "end": {
+ "line": 271,
+ "column": 30
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 9334,
+ 9338
+ ],
+ "loc": {
+ "start": {
+ "line": 271,
+ "column": 31
+ },
+ "end": {
+ "line": 271,
+ "column": 35
+ }
+ }
+ },
+ "range": [
+ 9325,
+ 9338
+ ],
+ "loc": {
+ "start": {
+ "line": 271,
+ "column": 22
+ },
+ "end": {
+ "line": 271,
+ "column": 35
+ }
+ }
+ },
+ "range": [
+ 9314,
+ 9339
+ ],
+ "loc": {
+ "start": {
+ "line": 271,
+ "column": 11
+ },
+ "end": {
+ "line": 271,
+ "column": 36
+ }
+ }
+ },
+ "property": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "resource",
+ "range": [
+ 9340,
+ 9348
+ ],
+ "loc": {
+ "start": {
+ "line": 271,
+ "column": 37
+ },
+ "end": {
+ "line": 271,
+ "column": 45
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "id",
+ "range": [
+ 9349,
+ 9351
+ ],
+ "loc": {
+ "start": {
+ "line": 271,
+ "column": 46
+ },
+ "end": {
+ "line": 271,
+ "column": 48
+ }
+ }
+ },
+ "range": [
+ 9340,
+ 9351
+ ],
+ "loc": {
+ "start": {
+ "line": 271,
+ "column": 37
+ },
+ "end": {
+ "line": 271,
+ "column": 48
+ }
+ }
+ },
+ "range": [
+ 9314,
+ 9352
+ ],
+ "loc": {
+ "start": {
+ "line": 271,
+ "column": 11
+ },
+ "end": {
+ "line": 271,
+ "column": 49
+ }
+ }
+ },
+ "prefix": true,
+ "range": [
+ 9307,
+ 9352
+ ],
+ "loc": {
+ "start": {
+ "line": 271,
+ "column": 4
+ },
+ "end": {
+ "line": 271,
+ "column": 49
+ }
+ }
+ },
+ "range": [
+ 9307,
+ 9353
+ ],
+ "loc": {
+ "start": {
+ "line": 271,
+ "column": 4
+ },
+ "end": {
+ "line": 271,
+ "column": 50
+ }
+ }
+ }
+ ],
+ "range": [
+ 8467,
+ 9357
+ ],
+ "loc": {
+ "start": {
+ "line": 247,
+ "column": 20
+ },
+ "end": {
+ "line": 272,
+ "column": 3
+ }
+ }
+ },
+ "generator": false,
+ "expression": false,
+ "range": [
+ 8456,
+ 9357
+ ],
+ "loc": {
+ "start": {
+ "line": 247,
+ "column": 9
+ },
+ "end": {
+ "line": 272,
+ "column": 3
+ }
+ }
+ },
+ "kind": "method",
+ "computed": false,
+ "range": [
+ 8449,
+ 9357
+ ],
+ "loc": {
+ "start": {
+ "line": 247,
+ "column": 2
+ },
+ "end": {
+ "line": 272,
+ "column": 3
+ }
+ },
+ "static": false
+ },
+ {
+ "type": "MethodDefinition",
+ "key": {
+ "type": "Identifier",
+ "name": "_removeInverseRelationship",
+ "range": [
+ 9361,
+ 9387
+ ],
+ "loc": {
+ "start": {
+ "line": 274,
+ "column": 2
+ },
+ "end": {
+ "line": 274,
+ "column": 28
+ }
+ }
+ },
+ "value": {
+ "type": "FunctionExpression",
+ "id": null,
+ "params": [
+ {
+ "type": "Identifier",
+ "name": "sourceResource",
+ "range": [
+ 9388,
+ 9402
+ ],
+ "loc": {
+ "start": {
+ "line": 274,
+ "column": 29
+ },
+ "end": {
+ "line": 274,
+ "column": 43
+ }
+ }
+ },
+ {
+ "type": "Identifier",
+ "name": "sourceFieldName",
+ "range": [
+ 9404,
+ 9419
+ ],
+ "loc": {
+ "start": {
+ "line": 274,
+ "column": 45
+ },
+ "end": {
+ "line": 274,
+ "column": 60
+ }
+ }
+ },
+ {
+ "type": "Identifier",
+ "name": "targetResource",
+ "range": [
+ 9421,
+ 9435
+ ],
+ "loc": {
+ "start": {
+ "line": 274,
+ "column": 62
+ },
+ "end": {
+ "line": 274,
+ "column": 76
+ }
+ }
+ },
+ {
+ "type": "Identifier",
+ "name": "sourceField",
+ "range": [
+ 9437,
+ 9448
+ ],
+ "loc": {
+ "start": {
+ "line": 274,
+ "column": 78
+ },
+ "end": {
+ "line": 274,
+ "column": 89
+ }
+ }
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "id": {
+ "type": "Identifier",
+ "name": "targetDefinition",
+ "range": [
+ 9460,
+ 9476
+ ],
+ "loc": {
+ "start": {
+ "line": 275,
+ "column": 8
+ },
+ "end": {
+ "line": 275,
+ "column": 24
+ }
+ }
+ },
+ "init": {
+ "type": "MemberExpression",
+ "computed": true,
+ "object": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "Store",
+ "range": [
+ 9479,
+ 9484
+ ],
+ "loc": {
+ "start": {
+ "line": 275,
+ "column": 27
+ },
+ "end": {
+ "line": 275,
+ "column": 32
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "types",
+ "range": [
+ 9485,
+ 9490
+ ],
+ "loc": {
+ "start": {
+ "line": 275,
+ "column": 33
+ },
+ "end": {
+ "line": 275,
+ "column": 38
+ }
+ }
+ },
+ "range": [
+ 9479,
+ 9490
+ ],
+ "loc": {
+ "start": {
+ "line": 275,
+ "column": 27
+ },
+ "end": {
+ "line": 275,
+ "column": 38
+ }
+ }
+ },
+ "property": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "targetResource",
+ "range": [
+ 9491,
+ 9505
+ ],
+ "loc": {
+ "start": {
+ "line": 275,
+ "column": 39
+ },
+ "end": {
+ "line": 275,
+ "column": 53
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 9506,
+ 9510
+ ],
+ "loc": {
+ "start": {
+ "line": 275,
+ "column": 54
+ },
+ "end": {
+ "line": 275,
+ "column": 58
+ }
+ }
+ },
+ "range": [
+ 9491,
+ 9510
+ ],
+ "loc": {
+ "start": {
+ "line": 275,
+ "column": 39
+ },
+ "end": {
+ "line": 275,
+ "column": 58
+ }
+ }
+ },
+ "range": [
+ 9479,
+ 9511
+ ],
+ "loc": {
+ "start": {
+ "line": 275,
+ "column": 27
+ },
+ "end": {
+ "line": 275,
+ "column": 59
+ }
+ }
+ },
+ "range": [
+ 9460,
+ 9511
+ ],
+ "loc": {
+ "start": {
+ "line": 275,
+ "column": 8
+ },
+ "end": {
+ "line": 275,
+ "column": 59
+ }
+ }
+ }
+ ],
+ "kind": "var",
+ "range": [
+ 9456,
+ 9512
+ ],
+ "loc": {
+ "start": {
+ "line": 275,
+ "column": 4
+ },
+ "end": {
+ "line": 275,
+ "column": 60
+ }
+ }
+ },
+ {
+ "type": "VariableDeclaration",
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "id": {
+ "type": "Identifier",
+ "name": "targetFieldName",
+ "range": [
+ 9521,
+ 9536
+ ],
+ "loc": {
+ "start": {
+ "line": 276,
+ "column": 8
+ },
+ "end": {
+ "line": 276,
+ "column": 23
+ }
+ }
+ },
+ "init": {
+ "type": "LogicalExpression",
+ "operator": "||",
+ "left": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "sourceField",
+ "range": [
+ 9539,
+ 9550
+ ],
+ "loc": {
+ "start": {
+ "line": 276,
+ "column": 26
+ },
+ "end": {
+ "line": 276,
+ "column": 37
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "inverse",
+ "range": [
+ 9551,
+ 9558
+ ],
+ "loc": {
+ "start": {
+ "line": 276,
+ "column": 38
+ },
+ "end": {
+ "line": 276,
+ "column": 45
+ }
+ }
+ },
+ "range": [
+ 9539,
+ 9558
+ ],
+ "loc": {
+ "start": {
+ "line": 276,
+ "column": 26
+ },
+ "end": {
+ "line": 276,
+ "column": 45
+ }
+ }
+ },
+ "right": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "targetResource",
+ "range": [
+ 9562,
+ 9576
+ ],
+ "loc": {
+ "start": {
+ "line": 276,
+ "column": 49
+ },
+ "end": {
+ "line": 276,
+ "column": 63
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 9577,
+ 9581
+ ],
+ "loc": {
+ "start": {
+ "line": 276,
+ "column": 64
+ },
+ "end": {
+ "line": 276,
+ "column": 68
+ }
+ }
+ },
+ "range": [
+ 9562,
+ 9581
+ ],
+ "loc": {
+ "start": {
+ "line": 276,
+ "column": 49
+ },
+ "end": {
+ "line": 276,
+ "column": 68
+ }
+ }
+ },
+ "range": [
+ 9539,
+ 9581
+ ],
+ "loc": {
+ "start": {
+ "line": 276,
+ "column": 26
+ },
+ "end": {
+ "line": 276,
+ "column": 68
+ }
+ }
+ },
+ "range": [
+ 9521,
+ 9581
+ ],
+ "loc": {
+ "start": {
+ "line": 276,
+ "column": 8
+ },
+ "end": {
+ "line": 276,
+ "column": 68
+ }
+ }
+ }
+ ],
+ "kind": "var",
+ "range": [
+ 9517,
+ 9582
+ ],
+ "loc": {
+ "start": {
+ "line": 276,
+ "column": 4
+ },
+ "end": {
+ "line": 276,
+ "column": 69
+ }
+ }
+ },
+ {
+ "type": "VariableDeclaration",
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "id": {
+ "type": "Identifier",
+ "name": "targetField",
+ "range": [
+ 9591,
+ 9602
+ ],
+ "loc": {
+ "start": {
+ "line": 277,
+ "column": 8
+ },
+ "end": {
+ "line": 277,
+ "column": 19
+ }
+ }
+ },
+ "init": {
+ "type": "LogicalExpression",
+ "operator": "&&",
+ "left": {
+ "type": "Identifier",
+ "name": "targetDefinition",
+ "range": [
+ 9605,
+ 9621
+ ],
+ "loc": {
+ "start": {
+ "line": 277,
+ "column": 22
+ },
+ "end": {
+ "line": 277,
+ "column": 38
+ }
+ }
+ },
+ "right": {
+ "type": "MemberExpression",
+ "computed": true,
+ "object": {
+ "type": "Identifier",
+ "name": "targetDefinition",
+ "range": [
+ 9625,
+ 9641
+ ],
+ "loc": {
+ "start": {
+ "line": 277,
+ "column": 42
+ },
+ "end": {
+ "line": 277,
+ "column": 58
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "targetFieldName",
+ "range": [
+ 9642,
+ 9657
+ ],
+ "loc": {
+ "start": {
+ "line": 277,
+ "column": 59
+ },
+ "end": {
+ "line": 277,
+ "column": 74
+ }
+ }
+ },
+ "range": [
+ 9625,
+ 9658
+ ],
+ "loc": {
+ "start": {
+ "line": 277,
+ "column": 42
+ },
+ "end": {
+ "line": 277,
+ "column": 75
+ }
+ }
+ },
+ "range": [
+ 9605,
+ 9658
+ ],
+ "loc": {
+ "start": {
+ "line": 277,
+ "column": 22
+ },
+ "end": {
+ "line": 277,
+ "column": 75
+ }
+ }
+ },
+ "range": [
+ 9591,
+ 9658
+ ],
+ "loc": {
+ "start": {
+ "line": 277,
+ "column": 8
+ },
+ "end": {
+ "line": 277,
+ "column": 75
+ }
+ }
+ }
+ ],
+ "kind": "var",
+ "range": [
+ 9587,
+ 9659
+ ],
+ "loc": {
+ "start": {
+ "line": 277,
+ "column": 4
+ },
+ "end": {
+ "line": 277,
+ "column": 76
+ }
+ }
+ },
+ {
+ "type": "ExpressionStatement",
+ "expression": {
+ "type": "AssignmentExpression",
+ "operator": "=",
+ "left": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "targetResource",
+ "range": [
+ 9664,
+ 9678
+ ],
+ "loc": {
+ "start": {
+ "line": 278,
+ "column": 4
+ },
+ "end": {
+ "line": 278,
+ "column": 18
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "_dependents",
+ "range": [
+ 9679,
+ 9690
+ ],
+ "loc": {
+ "start": {
+ "line": 278,
+ "column": 19
+ },
+ "end": {
+ "line": 278,
+ "column": 30
+ }
+ }
+ },
+ "range": [
+ 9664,
+ 9690
+ ],
+ "loc": {
+ "start": {
+ "line": 278,
+ "column": 4
+ },
+ "end": {
+ "line": 278,
+ "column": 30
+ }
+ }
+ },
+ "right": {
+ "type": "CallExpression",
+ "callee": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "targetResource",
+ "range": [
+ 9693,
+ 9707
+ ],
+ "loc": {
+ "start": {
+ "line": 278,
+ "column": 33
+ },
+ "end": {
+ "line": 278,
+ "column": 47
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "_dependents",
+ "range": [
+ 9708,
+ 9719
+ ],
+ "loc": {
+ "start": {
+ "line": 278,
+ "column": 48
+ },
+ "end": {
+ "line": 278,
+ "column": 59
+ }
+ }
+ },
+ "range": [
+ 9693,
+ 9719
+ ],
+ "loc": {
+ "start": {
+ "line": 278,
+ "column": 33
+ },
+ "end": {
+ "line": 278,
+ "column": 59
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "filter",
+ "range": [
+ 9720,
+ 9726
+ ],
+ "loc": {
+ "start": {
+ "line": 278,
+ "column": 60
+ },
+ "end": {
+ "line": 278,
+ "column": 66
+ }
+ }
+ },
+ "range": [
+ 9693,
+ 9726
+ ],
+ "loc": {
+ "start": {
+ "line": 278,
+ "column": 33
+ },
+ "end": {
+ "line": 278,
+ "column": 66
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "ArrowFunctionExpression",
+ "id": null,
+ "params": [
+ {
+ "type": "Identifier",
+ "name": "r",
+ "range": [
+ 9727,
+ 9728
+ ],
+ "loc": {
+ "start": {
+ "line": 278,
+ "column": 67
+ },
+ "end": {
+ "line": 278,
+ "column": 68
+ }
+ }
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "ReturnStatement",
+ "argument": {
+ "type": "UnaryExpression",
+ "operator": "!",
+ "argument": {
+ "type": "LogicalExpression",
+ "operator": "&&",
+ "left": {
+ "type": "LogicalExpression",
+ "operator": "&&",
+ "left": {
+ "type": "BinaryExpression",
+ "operator": "===",
+ "left": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "r",
+ "range": [
+ 9749,
+ 9750
+ ],
+ "loc": {
+ "start": {
+ "line": 279,
+ "column": 15
+ },
+ "end": {
+ "line": 279,
+ "column": 16
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 9751,
+ 9755
+ ],
+ "loc": {
+ "start": {
+ "line": 279,
+ "column": 17
+ },
+ "end": {
+ "line": 279,
+ "column": 21
+ }
+ }
+ },
+ "range": [
+ 9749,
+ 9755
+ ],
+ "loc": {
+ "start": {
+ "line": 279,
+ "column": 15
+ },
+ "end": {
+ "line": 279,
+ "column": 21
+ }
+ }
+ },
+ "right": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "sourceResource",
+ "range": [
+ 9760,
+ 9774
+ ],
+ "loc": {
+ "start": {
+ "line": 279,
+ "column": 26
+ },
+ "end": {
+ "line": 279,
+ "column": 40
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 9775,
+ 9779
+ ],
+ "loc": {
+ "start": {
+ "line": 279,
+ "column": 41
+ },
+ "end": {
+ "line": 279,
+ "column": 45
+ }
+ }
+ },
+ "range": [
+ 9760,
+ 9779
+ ],
+ "loc": {
+ "start": {
+ "line": 279,
+ "column": 26
+ },
+ "end": {
+ "line": 279,
+ "column": 45
+ }
+ }
+ },
+ "range": [
+ 9749,
+ 9779
+ ],
+ "loc": {
+ "start": {
+ "line": 279,
+ "column": 15
+ },
+ "end": {
+ "line": 279,
+ "column": 45
+ }
+ }
+ },
+ "right": {
+ "type": "BinaryExpression",
+ "operator": "===",
+ "left": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "r",
+ "range": [
+ 9783,
+ 9784
+ ],
+ "loc": {
+ "start": {
+ "line": 279,
+ "column": 49
+ },
+ "end": {
+ "line": 279,
+ "column": 50
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "id",
+ "range": [
+ 9785,
+ 9787
+ ],
+ "loc": {
+ "start": {
+ "line": 279,
+ "column": 51
+ },
+ "end": {
+ "line": 279,
+ "column": 53
+ }
+ }
+ },
+ "range": [
+ 9783,
+ 9787
+ ],
+ "loc": {
+ "start": {
+ "line": 279,
+ "column": 49
+ },
+ "end": {
+ "line": 279,
+ "column": 53
+ }
+ }
+ },
+ "right": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "sourceResource",
+ "range": [
+ 9792,
+ 9806
+ ],
+ "loc": {
+ "start": {
+ "line": 279,
+ "column": 58
+ },
+ "end": {
+ "line": 279,
+ "column": 72
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "id",
+ "range": [
+ 9807,
+ 9809
+ ],
+ "loc": {
+ "start": {
+ "line": 279,
+ "column": 73
+ },
+ "end": {
+ "line": 279,
+ "column": 75
+ }
+ }
+ },
+ "range": [
+ 9792,
+ 9809
+ ],
+ "loc": {
+ "start": {
+ "line": 279,
+ "column": 58
+ },
+ "end": {
+ "line": 279,
+ "column": 75
+ }
+ }
+ },
+ "range": [
+ 9783,
+ 9809
+ ],
+ "loc": {
+ "start": {
+ "line": 279,
+ "column": 49
+ },
+ "end": {
+ "line": 279,
+ "column": 75
+ }
+ }
+ },
+ "range": [
+ 9749,
+ 9809
+ ],
+ "loc": {
+ "start": {
+ "line": 279,
+ "column": 15
+ },
+ "end": {
+ "line": 279,
+ "column": 75
+ }
+ }
+ },
+ "right": {
+ "type": "BinaryExpression",
+ "operator": "===",
+ "left": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "r",
+ "range": [
+ 9813,
+ 9814
+ ],
+ "loc": {
+ "start": {
+ "line": 279,
+ "column": 79
+ },
+ "end": {
+ "line": 279,
+ "column": 80
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "fieldName",
+ "range": [
+ 9815,
+ 9824
+ ],
+ "loc": {
+ "start": {
+ "line": 279,
+ "column": 81
+ },
+ "end": {
+ "line": 279,
+ "column": 90
+ }
+ }
+ },
+ "range": [
+ 9813,
+ 9824
+ ],
+ "loc": {
+ "start": {
+ "line": 279,
+ "column": 79
+ },
+ "end": {
+ "line": 279,
+ "column": 90
+ }
+ }
+ },
+ "right": {
+ "type": "Identifier",
+ "name": "sourceFieldName",
+ "range": [
+ 9829,
+ 9844
+ ],
+ "loc": {
+ "start": {
+ "line": 279,
+ "column": 95
+ },
+ "end": {
+ "line": 279,
+ "column": 110
+ }
+ }
+ },
+ "range": [
+ 9813,
+ 9844
+ ],
+ "loc": {
+ "start": {
+ "line": 279,
+ "column": 79
+ },
+ "end": {
+ "line": 279,
+ "column": 110
+ }
+ }
+ },
+ "range": [
+ 9749,
+ 9844
+ ],
+ "loc": {
+ "start": {
+ "line": 279,
+ "column": 15
+ },
+ "end": {
+ "line": 279,
+ "column": 110
+ }
+ }
+ },
+ "prefix": true,
+ "range": [
+ 9747,
+ 9845
+ ],
+ "loc": {
+ "start": {
+ "line": 279,
+ "column": 13
+ },
+ "end": {
+ "line": 279,
+ "column": 111
+ }
+ }
+ },
+ "range": [
+ 9740,
+ 9846
+ ],
+ "loc": {
+ "start": {
+ "line": 279,
+ "column": 6
+ },
+ "end": {
+ "line": 279,
+ "column": 112
+ }
+ }
+ }
+ ],
+ "range": [
+ 9732,
+ 9852
+ ],
+ "loc": {
+ "start": {
+ "line": 278,
+ "column": 72
+ },
+ "end": {
+ "line": 280,
+ "column": 5
+ }
+ }
+ },
+ "generator": false,
+ "expression": false,
+ "range": [
+ 9727,
+ 9852
+ ],
+ "loc": {
+ "start": {
+ "line": 278,
+ "column": 67
+ },
+ "end": {
+ "line": 280,
+ "column": 5
+ }
+ }
+ }
+ ],
+ "range": [
+ 9693,
+ 9853
+ ],
+ "loc": {
+ "start": {
+ "line": 278,
+ "column": 33
+ },
+ "end": {
+ "line": 280,
+ "column": 6
+ }
+ }
+ },
+ "range": [
+ 9664,
+ 9853
+ ],
+ "loc": {
+ "start": {
+ "line": 278,
+ "column": 4
+ },
+ "end": {
+ "line": 280,
+ "column": 6
+ }
+ }
+ },
+ "range": [
+ 9664,
+ 9854
+ ],
+ "loc": {
+ "start": {
+ "line": 278,
+ "column": 4
+ },
+ "end": {
+ "line": 280,
+ "column": 7
+ }
+ }
+ },
+ {
+ "type": "IfStatement",
+ "test": {
+ "type": "Identifier",
+ "name": "targetField",
+ "range": [
+ 9863,
+ 9874
+ ],
+ "loc": {
+ "start": {
+ "line": 281,
+ "column": 8
+ },
+ "end": {
+ "line": 281,
+ "column": 19
+ }
+ }
+ },
+ "consequent": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "IfStatement",
+ "test": {
+ "type": "BinaryExpression",
+ "operator": "===",
+ "left": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "targetField",
+ "range": [
+ 9888,
+ 9899
+ ],
+ "loc": {
+ "start": {
+ "line": 282,
+ "column": 10
+ },
+ "end": {
+ "line": 282,
+ "column": 21
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 9900,
+ 9904
+ ],
+ "loc": {
+ "start": {
+ "line": 282,
+ "column": 22
+ },
+ "end": {
+ "line": 282,
+ "column": 26
+ }
+ }
+ },
+ "range": [
+ 9888,
+ 9904
+ ],
+ "loc": {
+ "start": {
+ "line": 282,
+ "column": 10
+ },
+ "end": {
+ "line": 282,
+ "column": 26
+ }
+ }
+ },
+ "right": {
+ "type": "Literal",
+ "value": "has-one",
+ "raw": "\"has-one\"",
+ "range": [
+ 9909,
+ 9918
+ ],
+ "loc": {
+ "start": {
+ "line": 282,
+ "column": 31
+ },
+ "end": {
+ "line": 282,
+ "column": 40
+ }
+ }
+ },
+ "range": [
+ 9888,
+ 9918
+ ],
+ "loc": {
+ "start": {
+ "line": 282,
+ "column": 10
+ },
+ "end": {
+ "line": 282,
+ "column": 40
+ }
+ }
+ },
+ "consequent": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "expression": {
+ "type": "AssignmentExpression",
+ "operator": "=",
+ "left": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "sourceResource",
+ "range": [
+ 9930,
+ 9944
+ ],
+ "loc": {
+ "start": {
+ "line": 283,
+ "column": 8
+ },
+ "end": {
+ "line": 283,
+ "column": 22
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "_dependents",
+ "range": [
+ 9945,
+ 9956
+ ],
+ "loc": {
+ "start": {
+ "line": 283,
+ "column": 23
+ },
+ "end": {
+ "line": 283,
+ "column": 34
+ }
+ }
+ },
+ "range": [
+ 9930,
+ 9956
+ ],
+ "loc": {
+ "start": {
+ "line": 283,
+ "column": 8
+ },
+ "end": {
+ "line": 283,
+ "column": 34
+ }
+ }
+ },
+ "right": {
+ "type": "CallExpression",
+ "callee": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "sourceResource",
+ "range": [
+ 9959,
+ 9973
+ ],
+ "loc": {
+ "start": {
+ "line": 283,
+ "column": 37
+ },
+ "end": {
+ "line": 283,
+ "column": 51
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "_dependents",
+ "range": [
+ 9974,
+ 9985
+ ],
+ "loc": {
+ "start": {
+ "line": 283,
+ "column": 52
+ },
+ "end": {
+ "line": 283,
+ "column": 63
+ }
+ }
+ },
+ "range": [
+ 9959,
+ 9985
+ ],
+ "loc": {
+ "start": {
+ "line": 283,
+ "column": 37
+ },
+ "end": {
+ "line": 283,
+ "column": 63
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "filter",
+ "range": [
+ 9986,
+ 9992
+ ],
+ "loc": {
+ "start": {
+ "line": 283,
+ "column": 64
+ },
+ "end": {
+ "line": 283,
+ "column": 70
+ }
+ }
+ },
+ "range": [
+ 9959,
+ 9992
+ ],
+ "loc": {
+ "start": {
+ "line": 283,
+ "column": 37
+ },
+ "end": {
+ "line": 283,
+ "column": 70
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "ArrowFunctionExpression",
+ "id": null,
+ "params": [
+ {
+ "type": "Identifier",
+ "name": "r",
+ "range": [
+ 9993,
+ 9994
+ ],
+ "loc": {
+ "start": {
+ "line": 283,
+ "column": 71
+ },
+ "end": {
+ "line": 283,
+ "column": 72
+ }
+ }
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "ReturnStatement",
+ "argument": {
+ "type": "UnaryExpression",
+ "operator": "!",
+ "argument": {
+ "type": "LogicalExpression",
+ "operator": "&&",
+ "left": {
+ "type": "LogicalExpression",
+ "operator": "&&",
+ "left": {
+ "type": "BinaryExpression",
+ "operator": "===",
+ "left": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "r",
+ "range": [
+ 10019,
+ 10020
+ ],
+ "loc": {
+ "start": {
+ "line": 284,
+ "column": 19
+ },
+ "end": {
+ "line": 284,
+ "column": 20
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 10021,
+ 10025
+ ],
+ "loc": {
+ "start": {
+ "line": 284,
+ "column": 21
+ },
+ "end": {
+ "line": 284,
+ "column": 25
+ }
+ }
+ },
+ "range": [
+ 10019,
+ 10025
+ ],
+ "loc": {
+ "start": {
+ "line": 284,
+ "column": 19
+ },
+ "end": {
+ "line": 284,
+ "column": 25
+ }
+ }
+ },
+ "right": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "targetResource",
+ "range": [
+ 10030,
+ 10044
+ ],
+ "loc": {
+ "start": {
+ "line": 284,
+ "column": 30
+ },
+ "end": {
+ "line": 284,
+ "column": 44
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 10045,
+ 10049
+ ],
+ "loc": {
+ "start": {
+ "line": 284,
+ "column": 45
+ },
+ "end": {
+ "line": 284,
+ "column": 49
+ }
+ }
+ },
+ "range": [
+ 10030,
+ 10049
+ ],
+ "loc": {
+ "start": {
+ "line": 284,
+ "column": 30
+ },
+ "end": {
+ "line": 284,
+ "column": 49
+ }
+ }
+ },
+ "range": [
+ 10019,
+ 10049
+ ],
+ "loc": {
+ "start": {
+ "line": 284,
+ "column": 19
+ },
+ "end": {
+ "line": 284,
+ "column": 49
+ }
+ }
+ },
+ "right": {
+ "type": "BinaryExpression",
+ "operator": "===",
+ "left": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "r",
+ "range": [
+ 10053,
+ 10054
+ ],
+ "loc": {
+ "start": {
+ "line": 284,
+ "column": 53
+ },
+ "end": {
+ "line": 284,
+ "column": 54
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "id",
+ "range": [
+ 10055,
+ 10057
+ ],
+ "loc": {
+ "start": {
+ "line": 284,
+ "column": 55
+ },
+ "end": {
+ "line": 284,
+ "column": 57
+ }
+ }
+ },
+ "range": [
+ 10053,
+ 10057
+ ],
+ "loc": {
+ "start": {
+ "line": 284,
+ "column": 53
+ },
+ "end": {
+ "line": 284,
+ "column": 57
+ }
+ }
+ },
+ "right": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "targetResource",
+ "range": [
+ 10062,
+ 10076
+ ],
+ "loc": {
+ "start": {
+ "line": 284,
+ "column": 62
+ },
+ "end": {
+ "line": 284,
+ "column": 76
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "id",
+ "range": [
+ 10077,
+ 10079
+ ],
+ "loc": {
+ "start": {
+ "line": 284,
+ "column": 77
+ },
+ "end": {
+ "line": 284,
+ "column": 79
+ }
+ }
+ },
+ "range": [
+ 10062,
+ 10079
+ ],
+ "loc": {
+ "start": {
+ "line": 284,
+ "column": 62
+ },
+ "end": {
+ "line": 284,
+ "column": 79
+ }
+ }
+ },
+ "range": [
+ 10053,
+ 10079
+ ],
+ "loc": {
+ "start": {
+ "line": 284,
+ "column": 53
+ },
+ "end": {
+ "line": 284,
+ "column": 79
+ }
+ }
+ },
+ "range": [
+ 10019,
+ 10079
+ ],
+ "loc": {
+ "start": {
+ "line": 284,
+ "column": 19
+ },
+ "end": {
+ "line": 284,
+ "column": 79
+ }
+ }
+ },
+ "right": {
+ "type": "BinaryExpression",
+ "operator": "===",
+ "left": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "r",
+ "range": [
+ 10083,
+ 10084
+ ],
+ "loc": {
+ "start": {
+ "line": 284,
+ "column": 83
+ },
+ "end": {
+ "line": 284,
+ "column": 84
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "fieldName",
+ "range": [
+ 10085,
+ 10094
+ ],
+ "loc": {
+ "start": {
+ "line": 284,
+ "column": 85
+ },
+ "end": {
+ "line": 284,
+ "column": 94
+ }
+ }
+ },
+ "range": [
+ 10083,
+ 10094
+ ],
+ "loc": {
+ "start": {
+ "line": 284,
+ "column": 83
+ },
+ "end": {
+ "line": 284,
+ "column": 94
+ }
+ }
+ },
+ "right": {
+ "type": "Identifier",
+ "name": "targetFieldName",
+ "range": [
+ 10099,
+ 10114
+ ],
+ "loc": {
+ "start": {
+ "line": 284,
+ "column": 99
+ },
+ "end": {
+ "line": 284,
+ "column": 114
+ }
+ }
+ },
+ "range": [
+ 10083,
+ 10114
+ ],
+ "loc": {
+ "start": {
+ "line": 284,
+ "column": 83
+ },
+ "end": {
+ "line": 284,
+ "column": 114
+ }
+ }
+ },
+ "range": [
+ 10019,
+ 10114
+ ],
+ "loc": {
+ "start": {
+ "line": 284,
+ "column": 19
+ },
+ "end": {
+ "line": 284,
+ "column": 114
+ }
+ }
+ },
+ "prefix": true,
+ "range": [
+ 10017,
+ 10115
+ ],
+ "loc": {
+ "start": {
+ "line": 284,
+ "column": 17
+ },
+ "end": {
+ "line": 284,
+ "column": 115
+ }
+ }
+ },
+ "range": [
+ 10010,
+ 10116
+ ],
+ "loc": {
+ "start": {
+ "line": 284,
+ "column": 10
+ },
+ "end": {
+ "line": 284,
+ "column": 116
+ }
+ }
+ }
+ ],
+ "range": [
+ 9998,
+ 10126
+ ],
+ "loc": {
+ "start": {
+ "line": 283,
+ "column": 76
+ },
+ "end": {
+ "line": 285,
+ "column": 9
+ }
+ }
+ },
+ "generator": false,
+ "expression": false,
+ "range": [
+ 9993,
+ 10126
+ ],
+ "loc": {
+ "start": {
+ "line": 283,
+ "column": 71
+ },
+ "end": {
+ "line": 285,
+ "column": 9
+ }
+ }
+ }
+ ],
+ "range": [
+ 9959,
+ 10127
+ ],
+ "loc": {
+ "start": {
+ "line": 283,
+ "column": 37
+ },
+ "end": {
+ "line": 285,
+ "column": 10
+ }
+ }
+ },
+ "range": [
+ 9930,
+ 10127
+ ],
+ "loc": {
+ "start": {
+ "line": 283,
+ "column": 8
+ },
+ "end": {
+ "line": 285,
+ "column": 10
+ }
+ }
+ },
+ "range": [
+ 9930,
+ 10128
+ ],
+ "loc": {
+ "start": {
+ "line": 283,
+ "column": 8
+ },
+ "end": {
+ "line": 285,
+ "column": 11
+ }
+ }
+ },
+ {
+ "type": "ExpressionStatement",
+ "expression": {
+ "type": "AssignmentExpression",
+ "operator": "=",
+ "left": {
+ "type": "MemberExpression",
+ "computed": true,
+ "object": {
+ "type": "Identifier",
+ "name": "targetResource",
+ "range": [
+ 10137,
+ 10151
+ ],
+ "loc": {
+ "start": {
+ "line": 286,
+ "column": 8
+ },
+ "end": {
+ "line": 286,
+ "column": 22
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "targetFieldName",
+ "range": [
+ 10152,
+ 10167
+ ],
+ "loc": {
+ "start": {
+ "line": 286,
+ "column": 23
+ },
+ "end": {
+ "line": 286,
+ "column": 38
+ }
+ }
+ },
+ "range": [
+ 10137,
+ 10168
+ ],
+ "loc": {
+ "start": {
+ "line": 286,
+ "column": 8
+ },
+ "end": {
+ "line": 286,
+ "column": 39
+ }
+ }
+ },
+ "right": {
+ "type": "Literal",
+ "value": null,
+ "raw": "null",
+ "range": [
+ 10171,
+ 10175
+ ],
+ "loc": {
+ "start": {
+ "line": 286,
+ "column": 42
+ },
+ "end": {
+ "line": 286,
+ "column": 46
+ }
+ }
+ },
+ "range": [
+ 10137,
+ 10175
+ ],
+ "loc": {
+ "start": {
+ "line": 286,
+ "column": 8
+ },
+ "end": {
+ "line": 286,
+ "column": 46
+ }
+ }
+ },
+ "range": [
+ 10137,
+ 10176
+ ],
+ "loc": {
+ "start": {
+ "line": 286,
+ "column": 8
+ },
+ "end": {
+ "line": 286,
+ "column": 47
+ }
+ }
+ }
+ ],
+ "range": [
+ 9920,
+ 10184
+ ],
+ "loc": {
+ "start": {
+ "line": 282,
+ "column": 42
+ },
+ "end": {
+ "line": 287,
+ "column": 7
+ }
+ }
+ },
+ "alternate": {
+ "type": "IfStatement",
+ "test": {
+ "type": "BinaryExpression",
+ "operator": "===",
+ "left": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "targetField",
+ "range": [
+ 10194,
+ 10205
+ ],
+ "loc": {
+ "start": {
+ "line": 287,
+ "column": 17
+ },
+ "end": {
+ "line": 287,
+ "column": 28
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 10206,
+ 10210
+ ],
+ "loc": {
+ "start": {
+ "line": 287,
+ "column": 29
+ },
+ "end": {
+ "line": 287,
+ "column": 33
+ }
+ }
+ },
+ "range": [
+ 10194,
+ 10210
+ ],
+ "loc": {
+ "start": {
+ "line": 287,
+ "column": 17
+ },
+ "end": {
+ "line": 287,
+ "column": 33
+ }
+ }
+ },
+ "right": {
+ "type": "Literal",
+ "value": "has-many",
+ "raw": "\"has-many\"",
+ "range": [
+ 10215,
+ 10225
+ ],
+ "loc": {
+ "start": {
+ "line": 287,
+ "column": 38
+ },
+ "end": {
+ "line": 287,
+ "column": 48
+ }
+ }
+ },
+ "range": [
+ 10194,
+ 10225
+ ],
+ "loc": {
+ "start": {
+ "line": 287,
+ "column": 17
+ },
+ "end": {
+ "line": 287,
+ "column": 48
+ }
+ }
+ },
+ "consequent": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "expression": {
+ "type": "AssignmentExpression",
+ "operator": "=",
+ "left": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "sourceResource",
+ "range": [
+ 10237,
+ 10251
+ ],
+ "loc": {
+ "start": {
+ "line": 288,
+ "column": 8
+ },
+ "end": {
+ "line": 288,
+ "column": 22
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "_dependents",
+ "range": [
+ 10252,
+ 10263
+ ],
+ "loc": {
+ "start": {
+ "line": 288,
+ "column": 23
+ },
+ "end": {
+ "line": 288,
+ "column": 34
+ }
+ }
+ },
+ "range": [
+ 10237,
+ 10263
+ ],
+ "loc": {
+ "start": {
+ "line": 288,
+ "column": 8
+ },
+ "end": {
+ "line": 288,
+ "column": 34
+ }
+ }
+ },
+ "right": {
+ "type": "CallExpression",
+ "callee": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "sourceResource",
+ "range": [
+ 10266,
+ 10280
+ ],
+ "loc": {
+ "start": {
+ "line": 288,
+ "column": 37
+ },
+ "end": {
+ "line": 288,
+ "column": 51
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "_dependents",
+ "range": [
+ 10281,
+ 10292
+ ],
+ "loc": {
+ "start": {
+ "line": 288,
+ "column": 52
+ },
+ "end": {
+ "line": 288,
+ "column": 63
+ }
+ }
+ },
+ "range": [
+ 10266,
+ 10292
+ ],
+ "loc": {
+ "start": {
+ "line": 288,
+ "column": 37
+ },
+ "end": {
+ "line": 288,
+ "column": 63
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "filter",
+ "range": [
+ 10293,
+ 10299
+ ],
+ "loc": {
+ "start": {
+ "line": 288,
+ "column": 64
+ },
+ "end": {
+ "line": 288,
+ "column": 70
+ }
+ }
+ },
+ "range": [
+ 10266,
+ 10299
+ ],
+ "loc": {
+ "start": {
+ "line": 288,
+ "column": 37
+ },
+ "end": {
+ "line": 288,
+ "column": 70
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "ArrowFunctionExpression",
+ "id": null,
+ "params": [
+ {
+ "type": "Identifier",
+ "name": "r",
+ "range": [
+ 10300,
+ 10301
+ ],
+ "loc": {
+ "start": {
+ "line": 288,
+ "column": 71
+ },
+ "end": {
+ "line": 288,
+ "column": 72
+ }
+ }
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "ReturnStatement",
+ "argument": {
+ "type": "UnaryExpression",
+ "operator": "!",
+ "argument": {
+ "type": "LogicalExpression",
+ "operator": "&&",
+ "left": {
+ "type": "LogicalExpression",
+ "operator": "&&",
+ "left": {
+ "type": "BinaryExpression",
+ "operator": "===",
+ "left": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "r",
+ "range": [
+ 10326,
+ 10327
+ ],
+ "loc": {
+ "start": {
+ "line": 289,
+ "column": 19
+ },
+ "end": {
+ "line": 289,
+ "column": 20
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 10328,
+ 10332
+ ],
+ "loc": {
+ "start": {
+ "line": 289,
+ "column": 21
+ },
+ "end": {
+ "line": 289,
+ "column": 25
+ }
+ }
+ },
+ "range": [
+ 10326,
+ 10332
+ ],
+ "loc": {
+ "start": {
+ "line": 289,
+ "column": 19
+ },
+ "end": {
+ "line": 289,
+ "column": 25
+ }
+ }
+ },
+ "right": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "targetResource",
+ "range": [
+ 10337,
+ 10351
+ ],
+ "loc": {
+ "start": {
+ "line": 289,
+ "column": 30
+ },
+ "end": {
+ "line": 289,
+ "column": 44
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 10352,
+ 10356
+ ],
+ "loc": {
+ "start": {
+ "line": 289,
+ "column": 45
+ },
+ "end": {
+ "line": 289,
+ "column": 49
+ }
+ }
+ },
+ "range": [
+ 10337,
+ 10356
+ ],
+ "loc": {
+ "start": {
+ "line": 289,
+ "column": 30
+ },
+ "end": {
+ "line": 289,
+ "column": 49
+ }
+ }
+ },
+ "range": [
+ 10326,
+ 10356
+ ],
+ "loc": {
+ "start": {
+ "line": 289,
+ "column": 19
+ },
+ "end": {
+ "line": 289,
+ "column": 49
+ }
+ }
+ },
+ "right": {
+ "type": "BinaryExpression",
+ "operator": "===",
+ "left": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "r",
+ "range": [
+ 10360,
+ 10361
+ ],
+ "loc": {
+ "start": {
+ "line": 289,
+ "column": 53
+ },
+ "end": {
+ "line": 289,
+ "column": 54
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "id",
+ "range": [
+ 10362,
+ 10364
+ ],
+ "loc": {
+ "start": {
+ "line": 289,
+ "column": 55
+ },
+ "end": {
+ "line": 289,
+ "column": 57
+ }
+ }
+ },
+ "range": [
+ 10360,
+ 10364
+ ],
+ "loc": {
+ "start": {
+ "line": 289,
+ "column": 53
+ },
+ "end": {
+ "line": 289,
+ "column": 57
+ }
+ }
+ },
+ "right": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "targetResource",
+ "range": [
+ 10369,
+ 10383
+ ],
+ "loc": {
+ "start": {
+ "line": 289,
+ "column": 62
+ },
+ "end": {
+ "line": 289,
+ "column": 76
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "id",
+ "range": [
+ 10384,
+ 10386
+ ],
+ "loc": {
+ "start": {
+ "line": 289,
+ "column": 77
+ },
+ "end": {
+ "line": 289,
+ "column": 79
+ }
+ }
+ },
+ "range": [
+ 10369,
+ 10386
+ ],
+ "loc": {
+ "start": {
+ "line": 289,
+ "column": 62
+ },
+ "end": {
+ "line": 289,
+ "column": 79
+ }
+ }
+ },
+ "range": [
+ 10360,
+ 10386
+ ],
+ "loc": {
+ "start": {
+ "line": 289,
+ "column": 53
+ },
+ "end": {
+ "line": 289,
+ "column": 79
+ }
+ }
+ },
+ "range": [
+ 10326,
+ 10386
+ ],
+ "loc": {
+ "start": {
+ "line": 289,
+ "column": 19
+ },
+ "end": {
+ "line": 289,
+ "column": 79
+ }
+ }
+ },
+ "right": {
+ "type": "BinaryExpression",
+ "operator": "===",
+ "left": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "r",
+ "range": [
+ 10390,
+ 10391
+ ],
+ "loc": {
+ "start": {
+ "line": 289,
+ "column": 83
+ },
+ "end": {
+ "line": 289,
+ "column": 84
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "fieldName",
+ "range": [
+ 10392,
+ 10401
+ ],
+ "loc": {
+ "start": {
+ "line": 289,
+ "column": 85
+ },
+ "end": {
+ "line": 289,
+ "column": 94
+ }
+ }
+ },
+ "range": [
+ 10390,
+ 10401
+ ],
+ "loc": {
+ "start": {
+ "line": 289,
+ "column": 83
+ },
+ "end": {
+ "line": 289,
+ "column": 94
+ }
+ }
+ },
+ "right": {
+ "type": "Identifier",
+ "name": "targetFieldName",
+ "range": [
+ 10406,
+ 10421
+ ],
+ "loc": {
+ "start": {
+ "line": 289,
+ "column": 99
+ },
+ "end": {
+ "line": 289,
+ "column": 114
+ }
+ }
+ },
+ "range": [
+ 10390,
+ 10421
+ ],
+ "loc": {
+ "start": {
+ "line": 289,
+ "column": 83
+ },
+ "end": {
+ "line": 289,
+ "column": 114
+ }
+ }
+ },
+ "range": [
+ 10326,
+ 10421
+ ],
+ "loc": {
+ "start": {
+ "line": 289,
+ "column": 19
+ },
+ "end": {
+ "line": 289,
+ "column": 114
+ }
+ }
+ },
+ "prefix": true,
+ "range": [
+ 10324,
+ 10422
+ ],
+ "loc": {
+ "start": {
+ "line": 289,
+ "column": 17
+ },
+ "end": {
+ "line": 289,
+ "column": 115
+ }
+ }
+ },
+ "range": [
+ 10317,
+ 10423
+ ],
+ "loc": {
+ "start": {
+ "line": 289,
+ "column": 10
+ },
+ "end": {
+ "line": 289,
+ "column": 116
+ }
+ }
+ }
+ ],
+ "range": [
+ 10305,
+ 10433
+ ],
+ "loc": {
+ "start": {
+ "line": 288,
+ "column": 76
+ },
+ "end": {
+ "line": 290,
+ "column": 9
+ }
+ }
+ },
+ "generator": false,
+ "expression": false,
+ "range": [
+ 10300,
+ 10433
+ ],
+ "loc": {
+ "start": {
+ "line": 288,
+ "column": 71
+ },
+ "end": {
+ "line": 290,
+ "column": 9
+ }
+ }
+ }
+ ],
+ "range": [
+ 10266,
+ 10434
+ ],
+ "loc": {
+ "start": {
+ "line": 288,
+ "column": 37
+ },
+ "end": {
+ "line": 290,
+ "column": 10
+ }
+ }
+ },
+ "range": [
+ 10237,
+ 10434
+ ],
+ "loc": {
+ "start": {
+ "line": 288,
+ "column": 8
+ },
+ "end": {
+ "line": 290,
+ "column": 10
+ }
+ }
+ },
+ "range": [
+ 10237,
+ 10435
+ ],
+ "loc": {
+ "start": {
+ "line": 288,
+ "column": 8
+ },
+ "end": {
+ "line": 290,
+ "column": 11
+ }
+ }
+ },
+ {
+ "type": "ExpressionStatement",
+ "expression": {
+ "type": "AssignmentExpression",
+ "operator": "=",
+ "left": {
+ "type": "MemberExpression",
+ "computed": true,
+ "object": {
+ "type": "Identifier",
+ "name": "targetResource",
+ "range": [
+ 10444,
+ 10458
+ ],
+ "loc": {
+ "start": {
+ "line": 291,
+ "column": 8
+ },
+ "end": {
+ "line": 291,
+ "column": 22
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "targetFieldName",
+ "range": [
+ 10459,
+ 10474
+ ],
+ "loc": {
+ "start": {
+ "line": 291,
+ "column": 23
+ },
+ "end": {
+ "line": 291,
+ "column": 38
+ }
+ }
+ },
+ "range": [
+ 10444,
+ 10475
+ ],
+ "loc": {
+ "start": {
+ "line": 291,
+ "column": 8
+ },
+ "end": {
+ "line": 291,
+ "column": 39
+ }
+ }
+ },
+ "right": {
+ "type": "CallExpression",
+ "callee": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "MemberExpression",
+ "computed": true,
+ "object": {
+ "type": "Identifier",
+ "name": "targetResource",
+ "range": [
+ 10478,
+ 10492
+ ],
+ "loc": {
+ "start": {
+ "line": 291,
+ "column": 42
+ },
+ "end": {
+ "line": 291,
+ "column": 56
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "targetFieldName",
+ "range": [
+ 10493,
+ 10508
+ ],
+ "loc": {
+ "start": {
+ "line": 291,
+ "column": 57
+ },
+ "end": {
+ "line": 291,
+ "column": 72
+ }
+ }
+ },
+ "range": [
+ 10478,
+ 10509
+ ],
+ "loc": {
+ "start": {
+ "line": 291,
+ "column": 42
+ },
+ "end": {
+ "line": 291,
+ "column": 73
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "filter",
+ "range": [
+ 10510,
+ 10516
+ ],
+ "loc": {
+ "start": {
+ "line": 291,
+ "column": 74
+ },
+ "end": {
+ "line": 291,
+ "column": 80
+ }
+ }
+ },
+ "range": [
+ 10478,
+ 10516
+ ],
+ "loc": {
+ "start": {
+ "line": 291,
+ "column": 42
+ },
+ "end": {
+ "line": 291,
+ "column": 80
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "ArrowFunctionExpression",
+ "id": null,
+ "params": [
+ {
+ "type": "Identifier",
+ "name": "r",
+ "range": [
+ 10517,
+ 10518
+ ],
+ "loc": {
+ "start": {
+ "line": 291,
+ "column": 81
+ },
+ "end": {
+ "line": 291,
+ "column": 82
+ }
+ }
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "ReturnStatement",
+ "argument": {
+ "type": "BinaryExpression",
+ "operator": "!==",
+ "left": {
+ "type": "Identifier",
+ "name": "r",
+ "range": [
+ 10541,
+ 10542
+ ],
+ "loc": {
+ "start": {
+ "line": 292,
+ "column": 17
+ },
+ "end": {
+ "line": 292,
+ "column": 18
+ }
+ }
+ },
+ "right": {
+ "type": "Identifier",
+ "name": "sourceResource",
+ "range": [
+ 10547,
+ 10561
+ ],
+ "loc": {
+ "start": {
+ "line": 292,
+ "column": 23
+ },
+ "end": {
+ "line": 292,
+ "column": 37
+ }
+ }
+ },
+ "range": [
+ 10541,
+ 10561
+ ],
+ "loc": {
+ "start": {
+ "line": 292,
+ "column": 17
+ },
+ "end": {
+ "line": 292,
+ "column": 37
+ }
+ }
+ },
+ "range": [
+ 10534,
+ 10562
+ ],
+ "loc": {
+ "start": {
+ "line": 292,
+ "column": 10
+ },
+ "end": {
+ "line": 292,
+ "column": 38
+ }
+ }
+ }
+ ],
+ "range": [
+ 10522,
+ 10572
+ ],
+ "loc": {
+ "start": {
+ "line": 291,
+ "column": 86
+ },
+ "end": {
+ "line": 293,
+ "column": 9
+ }
+ }
+ },
+ "generator": false,
+ "expression": false,
+ "range": [
+ 10517,
+ 10572
+ ],
+ "loc": {
+ "start": {
+ "line": 291,
+ "column": 81
+ },
+ "end": {
+ "line": 293,
+ "column": 9
+ }
+ }
+ }
+ ],
+ "range": [
+ 10478,
+ 10573
+ ],
+ "loc": {
+ "start": {
+ "line": 291,
+ "column": 42
+ },
+ "end": {
+ "line": 293,
+ "column": 10
+ }
+ }
+ },
+ "range": [
+ 10444,
+ 10573
+ ],
+ "loc": {
+ "start": {
+ "line": 291,
+ "column": 8
+ },
+ "end": {
+ "line": 293,
+ "column": 10
+ }
+ }
+ },
+ "range": [
+ 10444,
+ 10574
+ ],
+ "loc": {
+ "start": {
+ "line": 291,
+ "column": 8
+ },
+ "end": {
+ "line": 293,
+ "column": 11
+ }
+ }
+ }
+ ],
+ "range": [
+ 10227,
+ 10582
+ ],
+ "loc": {
+ "start": {
+ "line": 287,
+ "column": 50
+ },
+ "end": {
+ "line": 294,
+ "column": 7
+ }
+ }
+ },
+ "alternate": {
+ "type": "IfStatement",
+ "test": {
+ "type": "BinaryExpression",
+ "operator": "===",
+ "left": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "targetField",
+ "range": [
+ 10592,
+ 10603
+ ],
+ "loc": {
+ "start": {
+ "line": 294,
+ "column": 17
+ },
+ "end": {
+ "line": 294,
+ "column": 28
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 10604,
+ 10608
+ ],
+ "loc": {
+ "start": {
+ "line": 294,
+ "column": 29
+ },
+ "end": {
+ "line": 294,
+ "column": 33
+ }
+ }
+ },
+ "range": [
+ 10592,
+ 10608
+ ],
+ "loc": {
+ "start": {
+ "line": 294,
+ "column": 17
+ },
+ "end": {
+ "line": 294,
+ "column": 33
+ }
+ }
+ },
+ "right": {
+ "type": "Literal",
+ "value": "attr",
+ "raw": "\"attr\"",
+ "range": [
+ 10613,
+ 10619
+ ],
+ "loc": {
+ "start": {
+ "line": 294,
+ "column": 38
+ },
+ "end": {
+ "line": 294,
+ "column": 44
+ }
+ }
+ },
+ "range": [
+ 10592,
+ 10619
+ ],
+ "loc": {
+ "start": {
+ "line": 294,
+ "column": 17
+ },
+ "end": {
+ "line": 294,
+ "column": 44
+ }
+ }
+ },
+ "consequent": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "ThrowStatement",
+ "argument": {
+ "type": "NewExpression",
+ "callee": {
+ "type": "Identifier",
+ "name": "Error",
+ "range": [
+ 10641,
+ 10646
+ ],
+ "loc": {
+ "start": {
+ "line": 295,
+ "column": 18
+ },
+ "end": {
+ "line": 295,
+ "column": 23
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "TemplateLiteral",
+ "quasis": [
+ {
+ "type": "TemplateElement",
+ "value": {
+ "raw": "The the inverse relationship for '",
+ "cooked": "The the inverse relationship for '"
+ },
+ "tail": false,
+ "range": [
+ 10647,
+ 10684
+ ],
+ "loc": {
+ "start": {
+ "line": 295,
+ "column": 24
+ },
+ "end": {
+ "line": 295,
+ "column": 61
+ }
+ }
+ },
+ {
+ "type": "TemplateElement",
+ "value": {
+ "raw": "' is an attribute ('",
+ "cooked": "' is an attribute ('"
+ },
+ "tail": false,
+ "range": [
+ 10699,
+ 10722
+ ],
+ "loc": {
+ "start": {
+ "line": 295,
+ "column": 76
+ },
+ "end": {
+ "line": 295,
+ "column": 99
+ }
+ }
+ },
+ {
+ "type": "TemplateElement",
+ "value": {
+ "raw": "')",
+ "cooked": "')"
+ },
+ "tail": true,
+ "range": [
+ 10737,
+ 10741
+ ],
+ "loc": {
+ "start": {
+ "line": 295,
+ "column": 114
+ },
+ "end": {
+ "line": 295,
+ "column": 118
+ }
+ }
+ }
+ ],
+ "expressions": [
+ {
+ "type": "Identifier",
+ "name": "sourceFieldName",
+ "range": [
+ 10684,
+ 10699
+ ],
+ "loc": {
+ "start": {
+ "line": 295,
+ "column": 61
+ },
+ "end": {
+ "line": 295,
+ "column": 76
+ }
+ }
+ },
+ {
+ "type": "Identifier",
+ "name": "targetFieldName",
+ "range": [
+ 10722,
+ 10737
+ ],
+ "loc": {
+ "start": {
+ "line": 295,
+ "column": 99
+ },
+ "end": {
+ "line": 295,
+ "column": 114
+ }
+ }
+ }
+ ],
+ "range": [
+ 10647,
+ 10741
+ ],
+ "loc": {
+ "start": {
+ "line": 295,
+ "column": 24
+ },
+ "end": {
+ "line": 295,
+ "column": 118
+ }
+ }
+ }
+ ],
+ "range": [
+ 10637,
+ 10742
+ ],
+ "loc": {
+ "start": {
+ "line": 295,
+ "column": 14
+ },
+ "end": {
+ "line": 295,
+ "column": 119
+ }
+ }
+ },
+ "range": [
+ 10631,
+ 10743
+ ],
+ "loc": {
+ "start": {
+ "line": 295,
+ "column": 8
+ },
+ "end": {
+ "line": 295,
+ "column": 120
+ }
+ }
+ }
+ ],
+ "range": [
+ 10621,
+ 10751
+ ],
+ "loc": {
+ "start": {
+ "line": 294,
+ "column": 46
+ },
+ "end": {
+ "line": 296,
+ "column": 7
+ }
+ }
+ },
+ "alternate": null,
+ "range": [
+ 10588,
+ 10751
+ ],
+ "loc": {
+ "start": {
+ "line": 294,
+ "column": 13
+ },
+ "end": {
+ "line": 296,
+ "column": 7
+ }
+ }
+ },
+ "range": [
+ 10190,
+ 10751
+ ],
+ "loc": {
+ "start": {
+ "line": 287,
+ "column": 13
+ },
+ "end": {
+ "line": 296,
+ "column": 7
+ }
+ }
+ },
+ "range": [
+ 9884,
+ 10751
+ ],
+ "loc": {
+ "start": {
+ "line": 282,
+ "column": 6
+ },
+ "end": {
+ "line": 296,
+ "column": 7
+ }
+ }
+ }
+ ],
+ "range": [
+ 9876,
+ 10757
+ ],
+ "loc": {
+ "start": {
+ "line": 281,
+ "column": 21
+ },
+ "end": {
+ "line": 297,
+ "column": 5
+ }
+ }
+ },
+ "alternate": {
+ "type": "IfStatement",
+ "test": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "sourceField",
+ "range": [
+ 10767,
+ 10778
+ ],
+ "loc": {
+ "start": {
+ "line": 297,
+ "column": 15
+ },
+ "end": {
+ "line": 297,
+ "column": 26
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "inverse",
+ "range": [
+ 10779,
+ 10786
+ ],
+ "loc": {
+ "start": {
+ "line": 297,
+ "column": 27
+ },
+ "end": {
+ "line": 297,
+ "column": 34
+ }
+ }
+ },
+ "range": [
+ 10767,
+ 10786
+ ],
+ "loc": {
+ "start": {
+ "line": 297,
+ "column": 15
+ },
+ "end": {
+ "line": 297,
+ "column": 34
+ }
+ }
+ },
+ "consequent": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "ThrowStatement",
+ "argument": {
+ "type": "NewExpression",
+ "callee": {
+ "type": "Identifier",
+ "name": "Error",
+ "range": [
+ 10806,
+ 10811
+ ],
+ "loc": {
+ "start": {
+ "line": 298,
+ "column": 16
+ },
+ "end": {
+ "line": 298,
+ "column": 21
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "TemplateLiteral",
+ "quasis": [
+ {
+ "type": "TemplateElement",
+ "value": {
+ "raw": "The the inverse relationship for '",
+ "cooked": "The the inverse relationship for '"
+ },
+ "tail": false,
+ "range": [
+ 10812,
+ 10849
+ ],
+ "loc": {
+ "start": {
+ "line": 298,
+ "column": 22
+ },
+ "end": {
+ "line": 298,
+ "column": 59
+ }
+ }
+ },
+ {
+ "type": "TemplateElement",
+ "value": {
+ "raw": "' is missing ('",
+ "cooked": "' is missing ('"
+ },
+ "tail": false,
+ "range": [
+ 10864,
+ 10882
+ ],
+ "loc": {
+ "start": {
+ "line": 298,
+ "column": 74
+ },
+ "end": {
+ "line": 298,
+ "column": 92
+ }
+ }
+ },
+ {
+ "type": "TemplateElement",
+ "value": {
+ "raw": "')",
+ "cooked": "')"
+ },
+ "tail": true,
+ "range": [
+ 10901,
+ 10905
+ ],
+ "loc": {
+ "start": {
+ "line": 298,
+ "column": 111
+ },
+ "end": {
+ "line": 298,
+ "column": 115
+ }
+ }
+ }
+ ],
+ "expressions": [
+ {
+ "type": "Identifier",
+ "name": "sourceFieldName",
+ "range": [
+ 10849,
+ 10864
+ ],
+ "loc": {
+ "start": {
+ "line": 298,
+ "column": 59
+ },
+ "end": {
+ "line": 298,
+ "column": 74
+ }
+ }
+ },
+ {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "sourceField",
+ "range": [
+ 10882,
+ 10893
+ ],
+ "loc": {
+ "start": {
+ "line": 298,
+ "column": 92
+ },
+ "end": {
+ "line": 298,
+ "column": 103
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "inverse",
+ "range": [
+ 10894,
+ 10901
+ ],
+ "loc": {
+ "start": {
+ "line": 298,
+ "column": 104
+ },
+ "end": {
+ "line": 298,
+ "column": 111
+ }
+ }
+ },
+ "range": [
+ 10882,
+ 10901
+ ],
+ "loc": {
+ "start": {
+ "line": 298,
+ "column": 92
+ },
+ "end": {
+ "line": 298,
+ "column": 111
+ }
+ }
+ }
+ ],
+ "range": [
+ 10812,
+ 10905
+ ],
+ "loc": {
+ "start": {
+ "line": 298,
+ "column": 22
+ },
+ "end": {
+ "line": 298,
+ "column": 115
+ }
+ }
+ }
+ ],
+ "range": [
+ 10802,
+ 10906
+ ],
+ "loc": {
+ "start": {
+ "line": 298,
+ "column": 12
+ },
+ "end": {
+ "line": 298,
+ "column": 116
+ }
+ }
+ },
+ "range": [
+ 10796,
+ 10907
+ ],
+ "loc": {
+ "start": {
+ "line": 298,
+ "column": 6
+ },
+ "end": {
+ "line": 298,
+ "column": 117
+ }
+ }
+ }
+ ],
+ "range": [
+ 10788,
+ 10913
+ ],
+ "loc": {
+ "start": {
+ "line": 297,
+ "column": 36
+ },
+ "end": {
+ "line": 299,
+ "column": 5
+ }
+ }
+ },
+ "alternate": null,
+ "range": [
+ 10763,
+ 10913
+ ],
+ "loc": {
+ "start": {
+ "line": 297,
+ "column": 11
+ },
+ "end": {
+ "line": 299,
+ "column": 5
+ }
+ }
+ },
+ "range": [
+ 9859,
+ 10913
+ ],
+ "loc": {
+ "start": {
+ "line": 281,
+ "column": 4
+ },
+ "end": {
+ "line": 299,
+ "column": 5
+ }
+ }
+ }
+ ],
+ "range": [
+ 9450,
+ 10917
+ ],
+ "loc": {
+ "start": {
+ "line": 274,
+ "column": 91
+ },
+ "end": {
+ "line": 300,
+ "column": 3
+ }
+ }
+ },
+ "generator": false,
+ "expression": false,
+ "range": [
+ 9387,
+ 10917
+ ],
+ "loc": {
+ "start": {
+ "line": 274,
+ "column": 28
+ },
+ "end": {
+ "line": 300,
+ "column": 3
+ }
+ }
+ },
+ "kind": "method",
+ "computed": false,
+ "range": [
+ 9361,
+ 10917
+ ],
+ "loc": {
+ "start": {
+ "line": 274,
+ "column": 2
+ },
+ "end": {
+ "line": 300,
+ "column": 3
+ }
+ },
+ "static": false
+ }
+ ],
+ "range": [
+ 27,
+ 10920
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 27
+ },
+ "end": {
+ "line": 302,
+ "column": 1
+ }
+ }
+ },
+ "range": [
+ 15,
+ 10920
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 15
+ },
+ "end": {
+ "line": 302,
+ "column": 1
+ }
+ },
+ "leadingComments": [],
+ "trailingComments": []
+ },
+ "range": [
+ 0,
+ 10920
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 302,
+ "column": 1
+ }
+ }
+ },
+ {
+ "type": "ExpressionStatement",
+ "expression": {
+ "type": "AssignmentExpression",
+ "operator": "=",
+ "left": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "Store",
+ "range": [
+ 10922,
+ 10927
+ ],
+ "loc": {
+ "start": {
+ "line": 304,
+ "column": 0
+ },
+ "end": {
+ "line": 304,
+ "column": 5
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "types",
+ "range": [
+ 10928,
+ 10933
+ ],
+ "loc": {
+ "start": {
+ "line": 304,
+ "column": 6
+ },
+ "end": {
+ "line": 304,
+ "column": 11
+ }
+ }
+ },
+ "range": [
+ 10922,
+ 10933
+ ],
+ "loc": {
+ "start": {
+ "line": 304,
+ "column": 0
+ },
+ "end": {
+ "line": 304,
+ "column": 11
+ }
+ }
+ },
+ "right": {
+ "type": "ObjectExpression",
+ "properties": [],
+ "range": [
+ 10936,
+ 10938
+ ],
+ "loc": {
+ "start": {
+ "line": 304,
+ "column": 14
+ },
+ "end": {
+ "line": 304,
+ "column": 16
+ }
+ }
+ },
+ "range": [
+ 10922,
+ 10938
+ ],
+ "loc": {
+ "start": {
+ "line": 304,
+ "column": 0
+ },
+ "end": {
+ "line": 304,
+ "column": 16
+ }
+ }
+ },
+ "range": [
+ 10922,
+ 10939
+ ],
+ "loc": {
+ "start": {
+ "line": 304,
+ "column": 0
+ },
+ "end": {
+ "line": 304,
+ "column": 17
+ }
+ }
+ }
+ ],
+ "sourceType": "module",
+ "range": [
+ 0,
+ 10939
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 304,
+ "column": 17
+ }
+ },
+ "comments": [
+ {
+ "type": "Block",
+ "value": "*\n * Creates a field definition for an attribute.\n *\n * @param {string} [name] - Name of the property to map this field from.\n * @param {Object} [options] - An options object.\n * @param {string} [options.default] - Default value for this field.\n * @return {Object} - Field definition.\n ",
+ "range": [
+ 32,
+ 336
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 2
+ },
+ "end": {
+ "line": 10,
+ "column": 5
+ }
+ }
+ },
+ {
+ "type": "Block",
+ "value": "*\n * Creates a field definition for an has-one relationship.\n *\n * @param {string} [name] - Name of the property to map this field from.\n * @param {Object} [options] - An options object.\n * @param {string} [options.inverse] - Name of the inverse relationship.\n * @return {Object} - Field definition.\n ",
+ "range": [
+ 686,
+ 1005
+ ],
+ "loc": {
+ "start": {
+ "line": 25,
+ "column": 2
+ },
+ "end": {
+ "line": 32,
+ "column": 5
+ }
+ }
+ },
+ {
+ "type": "Block",
+ "value": "*\n * Creates a field definition for an has-many relationship.\n *\n * @param {string} [name] - Name of the property to map this field from.\n * @param {Object} [options] - An options object.\n * @param {string} [options.inverse] - Name of the inverse relationship.\n * @return {Object} - Field definition.\n ",
+ "range": [
+ 1659,
+ 1979
+ ],
+ "loc": {
+ "start": {
+ "line": 54,
+ "column": 2
+ },
+ "end": {
+ "line": 61,
+ "column": 5
+ }
+ }
+ },
+ {
+ "type": "Block",
+ "value": "*\n * Add an individual resource to the store. This is used internally by the\n * `push()` method.\n *\n * @param {Object} object - Resource Object to add. See:\n http://jsonapi.org/format/#document-resource-objects\n * @return {undefined} - Doesn't return anything.\n ",
+ "range": [
+ 2727,
+ 3032
+ ],
+ "loc": {
+ "start": {
+ "line": 90,
+ "column": 2
+ },
+ "end": {
+ "line": 97,
+ "column": 5
+ }
+ }
+ },
+ {
+ "type": "Block",
+ "value": "*\n * Find a resource or entire collection of resources.\n *\n * NOTE: If the resource hasn't been loaded via an add() or push() call it\n * will be automatically created when find is called.\n *\n * @param {!string} type - Type of the resource(s) to find.\n * @param {string} [id] - The id of the resource to find. If omitted all\n * resources of the type will be returned.\n * @return {Object|Object[]} - Either the resource or an array of resources.\n ",
+ "range": [
+ 3521,
+ 4013
+ ],
+ "loc": {
+ "start": {
+ "line": 114,
+ "column": 2
+ },
+ "end": {
+ "line": 124,
+ "column": 5
+ }
+ }
+ },
+ {
+ "type": "Block",
+ "value": "*\n * Add a JSON API response to the store. This method can be used to handle a\n * successful GET or POST response from the server.\n *\n * @param {Object} root - Top Level Object to push. See:\n http://jsonapi.org/format/#document-top-level\n * @return {undefined} - Doesn't return anything.\n ",
+ "range": [
+ 4819,
+ 5151
+ ],
+ "loc": {
+ "start": {
+ "line": 154,
+ "column": 2
+ },
+ "end": {
+ "line": 161,
+ "column": 5
+ }
+ }
+ },
+ {
+ "type": "Block",
+ "value": "*\n * Remove a resource or collection of resources from the store.\n *\n * @param {!string} type - Type of the resource(s) to remove.\n * @param {string} [id] - The id of the resource to remove. If omitted all\n * resources of the type will be removed.\n * @return {undefined} - Doesn't return anything.\n ",
+ "range": [
+ 5384,
+ 5724
+ ],
+ "loc": {
+ "start": {
+ "line": 173,
+ "column": 2
+ },
+ "end": {
+ "line": 180,
+ "column": 5
+ }
+ }
+ },
+ {
+ "type": "Line",
+ "value": " TODO: This only needs to be run once for each dependent.",
+ "range": [
+ 9075,
+ 9134
+ ],
+ "loc": {
+ "start": {
+ "line": 266,
+ "column": 6
+ },
+ "end": {
+ "line": 266,
+ "column": 65
+ }
+ }
+ }
+ ]
+}
\ No newline at end of file
diff --git a/docs/badge.svg b/docs/badge.svg
new file mode 100644
index 0000000..c44d5ab
--- /dev/null
+++ b/docs/badge.svg
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+ document
+ document
+ 77%
+ 77%
+
+
diff --git a/docs/class/src/store.js~Store.html b/docs/class/src/store.js~Store.html
new file mode 100644
index 0000000..f6c3ffd
--- /dev/null
+++ b/docs/class/src/store.js~Store.html
@@ -0,0 +1,925 @@
+
+
+
+
+
+ Store | API Document
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Store
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Static Method Summary
+ Static Public Methods
+
+
+
+
+ public
+ static
+
+
+
+
+
+
+
+
+
+
Creates a field definition for an attribute.
+
+
+
+
+
+
+
+
+
+ public
+ static
+
+
+
+
+
+
+
+
+
+
Creates a field definition for an has-many relationship.
+
+
+
+
+
+
+
+
+
+ public
+ static
+
+
+
+
+
+
+
+
+
+
Creates a field definition for an has-one relationship.
+
+
+
+
+
+
+
+
+
+
+
Constructor Summary
+ Public Constructor
+
+
+
+
+ public
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Method Summary
+ Public Methods
+
+
+
+
+ public
+
+
+
+
+
+
+
+
+
+
+
Add an individual resource to the store.
+
+
+
+
+
+
+
+
+
+ public
+
+
+
+
+
+
+
+
+
+
+
Find a resource or entire collection of resources.
+
+
+
+
+
+
+
+
+
+ public
+
+
+
+
+
+
+
+
+
+
+
Add a JSON API response to the store.
+
+
+
+
+
+
+
+
+
+ public
+
+
+
+
+
+
+
+
+
+
+
Remove a resource or collection of resources from the store.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Static Public Methods
+
+
+
+ public
+ static
+
+
+
+ attr (name: string , options: Object ): Object
+
+
+
+ source
+
+
+
+
+
+
+
Creates a field definition for an attribute.
+
+
+
+
+
+
Params:
+
+
+ Name Type Attribute Description
+
+
+
+
+ name
+ string
+
+ Name of the property to map this field from.
+
+
+
+ options
+ Object
+
+ An options object.
+
+
+
+ options.default
+ string
+
+ Default value for this field.
+
+
+
+
+
+
+
+
+
Return:
+
+
+ Object
+ Field definition.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ public
+ static
+
+
+
+ hasMany (name: string , options: Object ): Object
+
+
+
+ source
+
+
+
+
+
+
+
Creates a field definition for an has-many relationship.
+
+
+
+
+
+
Params:
+
+
+ Name Type Attribute Description
+
+
+
+
+ name
+ string
+
+ Name of the property to map this field from.
+
+
+
+ options
+ Object
+
+ An options object.
+
+
+
+ options.inverse
+ string
+
+ Name of the inverse relationship.
+
+
+
+
+
+
+
+
+
Return:
+
+
+ Object
+ Field definition.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ public
+ static
+
+
+
+ hasOne (name: string , options: Object ): Object
+
+
+
+ source
+
+
+
+
+
+
+
Creates a field definition for an has-one relationship.
+
+
+
+
+
+
Params:
+
+
+ Name Type Attribute Description
+
+
+
+
+ name
+ string
+
+ Name of the property to map this field from.
+
+
+
+ options
+ Object
+
+ An options object.
+
+
+
+ options.inverse
+ string
+
+ Name of the inverse relationship.
+
+
+
+
+
+
+
+
+
Return:
+
+
+ Object
+ Field definition.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Public Constructors
+
+
+
+ public
+
+
+
+
+ constructor
+
+
+
+ source
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Public Methods
+
+
+
+ public
+
+
+
+
+ add (object: Object ): undefined
+
+
+
+ source
+
+
+
+
+
+
+
Add an individual resource to the store. This is used internally by the
+push() method.
+
+
+
+
+
+
+
+
Return:
+
+
+ undefined
+ Doesn't return anything.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Find a resource or entire collection of resources.
+
NOTE: If the resource hasn't been loaded via an add() or push() call it
+will be automatically created when find is called.
+
+
+
+
+
+
Params:
+
+
+ Name Type Attribute Description
+
+
+
+
+ type
+ string
+
+ Type of the resource(s) to find.
+
+
+
+ id
+ string
+
+ The id of the resource to find. If omitted all
+ resources of the type will be returned.
+
+
+
+
+
+
+
+
+
Return:
+
+
+ Object | Object []
+ Either the resource or an array of resources.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ public
+
+
+
+
+ push (root: Object ): undefined
+
+
+
+ source
+
+
+
+
+
+
+
Add a JSON API response to the store. This method can be used to handle a
+successful GET or POST response from the server.
+
+
+
+
+
+
+
+
Return:
+
+
+ undefined
+ Doesn't return anything.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Remove a resource or collection of resources from the store.
+
+
+
+
+
+
Params:
+
+
+ Name Type Attribute Description
+
+
+
+
+ type
+ string
+
+ Type of the resource(s) to remove.
+
+
+
+ id
+ string
+
+ The id of the resource to remove. If omitted all
+ resources of the type will be removed.
+
+
+
+
+
+
+
+
+
Return:
+
+
+ undefined
+ Doesn't return anything.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/coverage.json b/docs/coverage.json
new file mode 100644
index 0000000..6a09681
--- /dev/null
+++ b/docs/coverage.json
@@ -0,0 +1,11 @@
+{
+ "coverage": "77.77%",
+ "expectCount": 9,
+ "actualCount": 7,
+ "files": {
+ "src/store.js": {
+ "expectCount": 9,
+ "actualCount": 7
+ }
+ }
+}
\ No newline at end of file
diff --git a/docs/css/prettify-tomorrow.css b/docs/css/prettify-tomorrow.css
new file mode 100644
index 0000000..b6f92a7
--- /dev/null
+++ b/docs/css/prettify-tomorrow.css
@@ -0,0 +1,132 @@
+/* Tomorrow Theme */
+/* Original theme - https://github.com/chriskempson/tomorrow-theme */
+/* Pretty printing styles. Used with prettify.js. */
+/* SPAN elements with the classes below are added by prettyprint. */
+/* plain text */
+.pln {
+ color: #4d4d4c; }
+
+@media screen {
+ /* string content */
+ .str {
+ color: #718c00; }
+
+ /* a keyword */
+ .kwd {
+ color: #8959a8; }
+
+ /* a comment */
+ .com {
+ color: #8e908c; }
+
+ /* a type name */
+ .typ {
+ color: #4271ae; }
+
+ /* a literal value */
+ .lit {
+ color: #f5871f; }
+
+ /* punctuation */
+ .pun {
+ color: #4d4d4c; }
+
+ /* lisp open bracket */
+ .opn {
+ color: #4d4d4c; }
+
+ /* lisp close bracket */
+ .clo {
+ color: #4d4d4c; }
+
+ /* a markup tag name */
+ .tag {
+ color: #c82829; }
+
+ /* a markup attribute name */
+ .atn {
+ color: #f5871f; }
+
+ /* a markup attribute value */
+ .atv {
+ color: #3e999f; }
+
+ /* a declaration */
+ .dec {
+ color: #f5871f; }
+
+ /* a variable name */
+ .var {
+ color: #c82829; }
+
+ /* a function name */
+ .fun {
+ color: #4271ae; } }
+/* Use higher contrast and text-weight for printable form. */
+@media print, projection {
+ .str {
+ color: #060; }
+
+ .kwd {
+ color: #006;
+ font-weight: bold; }
+
+ .com {
+ color: #600;
+ font-style: italic; }
+
+ .typ {
+ color: #404;
+ font-weight: bold; }
+
+ .lit {
+ color: #044; }
+
+ .pun, .opn, .clo {
+ color: #440; }
+
+ .tag {
+ color: #006;
+ font-weight: bold; }
+
+ .atn {
+ color: #404; }
+
+ .atv {
+ color: #060; } }
+/* Style */
+/*
+pre.prettyprint {
+ background: white;
+ font-family: Consolas, Monaco, 'Andale Mono', monospace;
+ font-size: 12px;
+ line-height: 1.5;
+ border: 1px solid #ccc;
+ padding: 10px; }
+*/
+
+/* Specify class=linenums on a pre to get line numbering */
+ol.linenums {
+ margin-top: 0;
+ margin-bottom: 0; }
+
+/* IE indents via margin-left */
+li.L0,
+li.L1,
+li.L2,
+li.L3,
+li.L4,
+li.L5,
+li.L6,
+li.L7,
+li.L8,
+li.L9 {
+ /* */ }
+
+/* Alternate shading for lines */
+li.L1,
+li.L3,
+li.L5,
+li.L7,
+li.L9 {
+ /* */ }
diff --git a/docs/css/style.css b/docs/css/style.css
new file mode 100644
index 0000000..939ea95
--- /dev/null
+++ b/docs/css/style.css
@@ -0,0 +1,717 @@
+@import url(https://fonts.googleapis.com/css?family=Roboto:400,300,700);
+
+* {
+ margin: 0;
+ padding: 0;
+ text-decoration: none;
+}
+
+html
+{
+ font-family: 'Roboto', sans-serif;
+ overflow: auto;
+ font-size: 14px;
+ color: #4d4e53;
+ background-color: #F9F9F9;
+}
+
+a {
+ /*color: #0095dd;*/
+ color:rgb(37, 138, 175);
+}
+
+code a:hover {
+ text-decoration: underline;
+}
+
+ul, ol {
+ padding-left: 20px;
+}
+
+ul li {
+ list-style: disc;
+ margin: 4px 0;
+}
+
+ol li {
+ margin: 4px 0;
+}
+
+h1 {
+ margin-bottom: 10px;
+ font-size: 34px;
+ font-weight: 300;
+ border-bottom: solid 1px #ddd;
+}
+
+h2 {
+ margin-top: 24px;
+ margin-bottom: 10px;
+ font-size: 20px;
+ border-bottom: solid 1px #ddd;
+ font-weight: 300;
+}
+
+h3 {
+ position: relative;
+ font-size: 16px;
+ margin-bottom: 12px;
+ background-color: #E2E2E2;
+ padding: 4px;
+ font-weight: 300;
+}
+
+p {
+ margin-bottom: 15px;
+ line-height: 19px;
+}
+
+pre.prettyprint {
+ padding: 4px;
+ border: solid 1px #ddd;
+ margin: 4px 0;
+}
+
+p > code,
+li > code {
+ padding: 0 4px;
+ background: #ddd;
+}
+
+.import-path pre.prettyprint {
+ border: none;
+ padding: 0;
+}
+
+.layout-container {
+ /*display: flex;*/
+ /*flex-direction: row;*/
+ /*justify-content: flex-start;*/
+ /*align-items: stretch;*/
+}
+
+.layout-container > header {
+ height: 40px;
+ line-height: 40px;
+ font-size: 16px;
+ padding: 0 10px;
+ margin: 0;
+ position: fixed;
+ width: 100%;
+ z-index: 1;
+ background-color: #F9F9F9;
+ top: 0;
+ border-bottom: solid 1px #E02130;
+}
+.layout-container > header > a{
+ margin: 0 5px;
+}
+
+.layout-container > header > a.repo-url-github {
+ font-size: 0;
+ display: inline-block;
+ width: 20px;
+ height: 38px;
+ background: url("../image/github.png") no-repeat center;
+ background-size: 20px;
+ vertical-align: top;
+}
+
+.navigation {
+ position: fixed;
+ top: 0;
+ left: 0;
+ box-sizing: border-box;
+ width: 200px;
+ height: 100%;
+ padding-top: 40px;
+ padding-left: 15px;
+ padding-bottom: 20px;
+ overflow-x: scroll;
+ box-shadow: rgba(255, 255, 255, 1) -1px 0 0 inset;
+ border-right: 1px solid rgba(0, 0, 0, 0.1);
+}
+
+.navigation h1 {
+ border: none;
+ font-size: 18px;
+}
+
+.navigation h2 {
+ margin: 15px 0 4px;
+ font-size: 16px;
+ border: none;
+}
+
+.navigation h2 a {
+ color: inherit;
+}
+
+.navigation ul {
+ padding: 0;
+}
+
+.navigation li {
+ list-style: none;
+ margin: 4px 0;
+}
+
+h1 .version,
+h1 .url a {
+ font-size: 14px;
+ color: #aaa;
+}
+
+.content {
+ margin-top: 40px;
+ margin-left: 200px;
+ padding: 10px 50px 10px 20px;
+}
+
+.header-notice {
+ font-size: 14px;
+ color: #aaa;
+ margin: 0;
+}
+
+.expression-extends .prettyprint {
+ margin-left: 10px;
+ background: white;
+}
+
+.extends-chain {
+ border-bottom: 1px solid#ddd;
+ padding-bottom: 10px;
+ margin-bottom: 10px;
+}
+
+.extends-chain span:nth-of-type(1) {
+ padding-left: 10px;
+}
+
+.extends-chain > div {
+ margin: 5px 0;
+}
+
+.description table {
+ font-size: 14px;
+ border-spacing: 0;
+ border: 0;
+ border-collapse: collapse;
+}
+
+.description thead {
+ background: #999;
+ color: white;
+}
+
+.description table td,
+.description table th {
+ border: solid 1px #ddd;
+ padding: 4px;
+ font-weight: normal;
+}
+
+.flat-list ul {
+ padding-left: 0;
+}
+
+.flat-list li {
+ display: inline;
+ list-style: none;
+}
+
+table.summary {
+ width: 100%;
+ margin: 10px 0;
+ border-spacing: 0;
+ border: 0;
+ border-collapse: collapse;
+}
+
+table.summary thead {
+ background: #999;
+ color: white;
+}
+
+table.summary td {
+ border: solid 1px #ddd;
+ padding: 4px 10px;
+}
+
+table.summary tbody td:nth-child(1) {
+ text-align: right;
+ white-space: nowrap;
+ min-width: 64px;
+ vertical-align: top;
+}
+
+table.summary tbody td:nth-child(2) {
+ width: 100%;
+ border-right: none;
+}
+
+table.summary tbody td:nth-child(3) {
+ white-space: nowrap;
+ border-left: none;
+ vertical-align: top;
+}
+
+table.summary td > div:nth-of-type(2) {
+ padding-top: 4px;
+ padding-left: 15px;
+}
+
+table.summary td p {
+ margin-bottom: 0;
+}
+
+.inherited-summary thead td {
+ padding-left: 2px;
+}
+
+.inherited-summary thead a {
+ color: white;
+}
+
+.inherited-summary .summary tbody {
+ display: none;
+}
+
+.inherited-summary .summary .toggle {
+ padding: 0 4px;
+ font-size: 12px;
+ cursor: pointer;
+}
+.inherited-summary .summary .toggle.closed:before {
+ content: "â–¶";
+}
+.inherited-summary .summary .toggle.opened:before {
+ content: "â–¼";
+}
+
+.member, .method {
+ margin-bottom: 24px;
+}
+
+table.params {
+ width: 100%;
+ margin: 10px 0;
+ border-spacing: 0;
+ border: 0;
+ border-collapse: collapse;
+}
+
+table.params thead {
+ background: #eee;
+ color: #aaa;
+}
+
+table.params td {
+ padding: 4px;
+ border: solid 1px #ddd;
+}
+
+table.params td p {
+ margin: 0;
+}
+
+.content .detail > * {
+ margin: 15px 0;
+}
+
+.content .detail > h3 {
+ color: black;
+}
+
+.content .detail > div {
+ margin-left: 10px;
+}
+
+.content .detail > .import-path {
+ margin-top: -8px;
+}
+
+.content .detail + .detail {
+ margin-top: 30px;
+}
+
+.content .detail .throw td:first-child {
+ padding-right: 10px;
+}
+
+.content .detail h4 + :not(pre) {
+ padding-left: 0;
+ margin-left: 10px;
+}
+
+.content .detail h4 + ul li {
+ list-style: none;
+}
+
+.return-param * {
+ display: inline;
+}
+
+.argument-params {
+ margin-bottom: 20px;
+}
+
+.return-type {
+ padding-right: 10px;
+ font-weight: normal;
+}
+
+.return-desc {
+ margin-left: 10px;
+ margin-top: 4px;
+}
+
+.return-desc p {
+ margin: 0;
+}
+
+.deprecated, .experimental, .instance-docs {
+ border-left: solid 5px orange;
+ padding-left: 4px;
+ margin: 4px 0;
+}
+
+tr.listen p,
+tr.throw p,
+tr.emit p{
+ margin-bottom: 10px;
+}
+
+.version, .since {
+ color: #aaa;
+}
+
+h3 .right-info {
+ position: absolute;
+ right: 4px;
+ font-size: 14px;
+}
+
+.version + .since:before {
+ content: '| ';
+}
+
+.see {
+ margin-top: 10px;
+}
+
+.see h4 {
+ margin: 4px 0;
+}
+
+.content .detail h4 + .example-doc {
+ margin: 6px 0;
+}
+
+.example-caption {
+ position: relative;
+ bottom: -1px;
+ display: inline-block;
+ padding: 4px;
+ border: solid 1px #ddd;
+ border-bottom: none;
+ font-style: italic;
+ background-color: #eee;
+ font-weight: bold;
+}
+
+.example-caption + pre.source-code {
+ margin-top: 0;
+}
+
+footer, .file-footer {
+ text-align: right;
+ font-style: italic;
+ font-weight: 100;
+ font-size: 13px;
+ margin-right: 50px;
+ margin-left: 220px;
+ border-top: 1px solid #ddd;
+ padding-top: 30px;
+ margin-top: 20px;
+ padding-bottom: 10px;
+}
+
+pre.source-code {
+ background: white;
+ border: solid 1px #ddd;
+ padding: 4px;
+}
+
+pre.source-code.line-number {
+ padding: 0;
+}
+
+pre.source-code ol {
+ background: #eee;
+ padding-left: 40px;
+}
+
+pre.source-code li {
+ background: white;
+ padding-left: 4px;
+ list-style: decimal;
+ margin: 0;
+}
+
+pre.source-code.line-number li.active {
+ background: rgb(255, 255, 150);
+}
+
+table.files-summary {
+ width: 100%;
+ margin: 10px 0;
+ border-spacing: 0;
+ border: 0;
+ border-collapse: collapse;
+ text-align: right;
+}
+
+table.files-summary tbody tr:hover {
+ background: #eee;
+}
+
+table.files-summary td:first-child,
+table.files-summary td:nth-of-type(2) {
+ text-align: left;
+}
+
+table.files-summary[data-use-coverage="false"] td.coverage {
+ display: none;
+}
+
+table.files-summary thead {
+ background: #999;
+ color: white;
+}
+
+table.files-summary td {
+ border: solid 1px #ddd;
+ padding: 4px 10px;
+ vertical-align: top;
+}
+
+table.files-summary td.identifiers > span {
+ display: block;
+ margin-top: 4px;
+}
+table.files-summary td.identifiers > span:first-child {
+ margin-top: 0;
+}
+
+table.files-summary .coverage-count {
+ font-size: 12px;
+ color: #aaa;
+ display: inline-block;
+ min-width: 40px;
+}
+
+.total-coverage-count {
+ position: relative;
+ bottom: 2px;
+ font-size: 12px;
+ color: #666;
+ font-weight: 500;
+ padding-left: 5px;
+}
+
+table.test-summary thead {
+ background: #999;
+ color: white;
+}
+
+table.test-summary thead .test-description {
+ width: 50%;
+}
+
+table.test-summary {
+ width: 100%;
+ margin: 10px 0;
+ border-spacing: 0;
+ border: 0;
+ border-collapse: collapse;
+}
+
+table.test-summary thead .test-count {
+ width: 3em;
+}
+
+table.test-summary tbody tr:hover {
+ background-color: #eee;
+}
+
+table.test-summary td {
+ border: solid 1px #ddd;
+ padding: 4px 10px;
+ vertical-align: top;
+}
+
+table.test-summary td p {
+ margin: 0;
+}
+
+table.test-summary tr.test-describe .toggle {
+ display: inline-block;
+ float: left;
+ margin-right: 4px;
+ cursor: pointer;
+}
+
+table.test-summary tr.test-describe .toggle.opened:before {
+ content: 'â–¼';
+}
+
+table.test-summary tr.test-describe .toggle.closed:before {
+ content: 'â–¶';
+}
+
+table.test-summary .test-target > span {
+ display: block;
+ margin-top: 4px;
+}
+table.test-summary .test-target > span:first-child {
+ margin-top: 0;
+}
+
+.inner-link-active {
+ background: rgb(255, 255, 150);
+}
+
+/* search box */
+.search-box {
+ position: absolute;
+ top: 10px;
+ right: 50px;
+ padding-right: 8px;
+ padding-bottom: 10px;
+ line-height: normal;
+ font-size: 12px;
+}
+
+.search-box img {
+ width: 20px;
+ vertical-align: top;
+}
+
+.search-input {
+ display: inline;
+ visibility: hidden;
+ width: 0;
+ padding: 2px;
+ height: 1.5em;
+ outline: none;
+ background: transparent;
+ border: 1px #0af;
+ border-style: none none solid none;
+ vertical-align: bottom;
+}
+
+.search-input-edge {
+ display: none;
+ width: 1px;
+ height: 5px;
+ background-color: #0af;
+ vertical-align: bottom;
+}
+
+.search-result {
+ position: absolute;
+ display: none;
+ height: 600px;
+ width: 100%;
+ padding: 0;
+ margin-top: 5px;
+ margin-left: 24px;
+ background: white;
+ box-shadow: 1px 1px 4px rgb(0,0,0);
+ white-space: nowrap;
+ overflow-y: scroll;
+}
+
+.search-result-import-path {
+ color: #aaa;
+ font-size: 12px;
+}
+
+.search-result li {
+ list-style: none;
+ padding: 2px 4px;
+}
+
+.search-result li a {
+ display: block;
+}
+
+.search-result li.selected {
+ background: #ddd;
+}
+
+.search-result li.search-separator {
+ background: rgb(37, 138, 175);
+ color: white;
+}
+
+.search-box.active .search-input {
+ visibility: visible;
+ transition: width 0.2s ease-out;
+ width: 300px;
+}
+
+.search-box.active .search-input-edge {
+ display: inline-block;
+}
+
+/* coverage badge */
+.esdoc-coverage {
+ display: inline-block;
+ height: 20px;
+ vertical-align: top;
+}
+
+h1 .esdoc-coverage {
+ position: relative;
+ top: -4px;
+}
+
+.esdoc-coverage-wrap {
+ color: white;
+ font-size: 12px;
+ font-weight: 500;
+}
+
+.esdoc-coverage-label {
+ padding: 3px 4px 3px 6px;
+ background: linear-gradient(to bottom, #5e5e5e 0%,#4c4c4c 100%);
+ border-radius: 4px 0 0 4px;
+ display: inline-block;
+ height: 20px;
+ box-sizing: border-box;
+ line-height: 14px;
+}
+
+.esdoc-coverage-ratio {
+ padding: 3px 6px 3px 4px;
+ border-radius: 0 4px 4px 0;
+ display: inline-block;
+ height: 20px;
+ box-sizing: border-box;
+ line-height: 14px;
+}
+
+.esdoc-coverage-low {
+ background: linear-gradient(to bottom, #db654f 0%,#c9533d 100%);
+}
+
+.esdoc-coverage-middle {
+ background: linear-gradient(to bottom, #dab226 0%,#c9a179 100%);
+}
+
+.esdoc-coverage-high {
+ background: linear-gradient(to bottom, #4fc921 0%,#3eb810 100%);
+}
diff --git a/docs/dump.json b/docs/dump.json
new file mode 100644
index 0000000..41c8873
--- /dev/null
+++ b/docs/dump.json
@@ -0,0 +1,1152 @@
+[
+ {
+ "kind": "file",
+ "static": true,
+ "variation": null,
+ "name": "src/store.js",
+ "memberof": null,
+ "longname": "src/store.js",
+ "access": null,
+ "description": null,
+ "lineNumber": 1,
+ "content": "export default class Store {\n\n /**\n * Creates a field definition for an attribute.\n *\n * @param {string} [name] - Name of the property to map this field from.\n * @param {Object} [options] - An options object.\n * @param {string} [options.default] - Default value for this field.\n * @return {Object} - Field definition.\n */\n static attr(name, options) {\n if (name && typeof name === 'object') {\n return Store.attr(null, name);\n } else {\n return {\n type: \"attr\",\n default: options && options.default,\n deserialize: function (data, key) {\n return data.attributes && data.attributes[name || key];\n }\n };\n }\n }\n\n /**\n * Creates a field definition for an has-one relationship.\n *\n * @param {string} [name] - Name of the property to map this field from.\n * @param {Object} [options] - An options object.\n * @param {string} [options.inverse] - Name of the inverse relationship.\n * @return {Object} - Field definition.\n */\n static hasOne(name, options) {\n if (name && typeof name === 'object') {\n return Store.hasOne(null, name);\n } else {\n return {\n type: \"has-one\",\n inverse: options && options.inverse,\n deserialize: function (data, key) {\n name = name || key;\n if (data.relationships && data.relationships[name]) {\n if (data.relationships[name].data === null) {\n return null;\n } else if (data.relationships[name].data) {\n return this.find(data.relationships[name].data.type, data.relationships[name].data.id);\n }\n }\n }\n };\n }\n }\n\n /**\n * Creates a field definition for an has-many relationship.\n *\n * @param {string} [name] - Name of the property to map this field from.\n * @param {Object} [options] - An options object.\n * @param {string} [options.inverse] - Name of the inverse relationship.\n * @return {Object} - Field definition.\n */\n static hasMany(name, options) {\n if (name && typeof name === 'object') {\n return Store.hasMany(null, name);\n } else {\n return {\n type: \"has-many\",\n default: [],\n inverse: options && options.inverse,\n deserialize: function (data, key) {\n name = name || key;\n if (data.relationships && data.relationships[name]) {\n if (data.relationships[name].data === null) {\n return [];\n } else if (data.relationships[name].data) {\n return data.relationships[name].data.map((c) => {\n return this.find(c.type, c.id);\n });\n }\n }\n }\n };\n }\n }\n\n constructor() {\n this._data = {};\n }\n\n /**\n * Add an individual resource to the store. This is used internally by the\n * `push()` method.\n *\n * @param {Object} object - Resource Object to add. See:\n http://jsonapi.org/format/#document-resource-objects\n * @return {undefined} - Doesn't return anything.\n */\n add(object) {\n if (object) {\n if (object.type && object.id) {\n let resource = this.find(object.type, object.id);\n let definition = Store.types[object.type];\n Object.keys(definition).forEach(fieldName => {\n this._addField(object, resource, definition, fieldName);\n });\n } else {\n throw new TypeError(`The data must have a type and id`);\n }\n } else {\n throw new TypeError(`You must provide data to add`);\n }\n }\n\n /**\n * Find a resource or entire collection of resources.\n *\n * NOTE: If the resource hasn't been loaded via an add() or push() call it\n * will be automatically created when find is called.\n *\n * @param {!string} type - Type of the resource(s) to find.\n * @param {string} [id] - The id of the resource to find. If omitted all\n * resources of the type will be returned.\n * @return {Object|Object[]} - Either the resource or an array of resources.\n */\n find(type, id) {\n var definition;\n if (type) {\n definition = Store.types[type];\n if (definition) {\n this._data[type] = this._data[type] || {};\n if (id) {\n if (!this._data[type][id]) {\n this._data[type][id] = {\n _dependents: [],\n type: type,\n id: id\n };\n Object.keys(definition).forEach(key => {\n this._data[type][id][key] = definition[key].default;\n });\n }\n return this._data[type][id];\n } else {\n return Object.keys(this._data[type]).map(x => this._data[type][x]);\n }\n } else {\n throw new TypeError(`Unknown type '${type}'`);\n }\n } else {\n throw new TypeError(`You must provide a type`);\n }\n }\n\n /**\n * Add a JSON API response to the store. This method can be used to handle a\n * successful GET or POST response from the server.\n *\n * @param {Object} root - Top Level Object to push. See:\n http://jsonapi.org/format/#document-top-level\n * @return {undefined} - Doesn't return anything.\n */\n push(root) {\n if (root.data.constructor === Array) {\n root.data.forEach(x => this.add(x));\n } else {\n this.add(root.data);\n }\n if (root.included) {\n root.included.forEach(x => this.add(x));\n }\n }\n\n /**\n * Remove a resource or collection of resources from the store.\n *\n * @param {!string} type - Type of the resource(s) to remove.\n * @param {string} [id] - The id of the resource to remove. If omitted all\n * resources of the type will be removed.\n * @return {undefined} - Doesn't return anything.\n */\n remove(type, id) {\n if (type) {\n if (Store.types[type]) {\n if (id) {\n let resource = this._data[type][id];\n if (resource) {\n this._remove(resource);\n }\n } else {\n Object.keys(this._data[type]).forEach(id => this.remove(type, id));\n }\n } else {\n throw new TypeError(`Unknown type '${type}'`);\n }\n } else {\n throw new TypeError(`You must provide a type to remove`);\n }\n }\n\n _addField(object, resource, definition, fieldName) {\n var field = definition[fieldName];\n var newValue = field.deserialize.call(this, object, fieldName);\n if (typeof newValue !== \"undefined\") {\n if (field.type === \"has-one\") {\n if (resource[fieldName]) {\n this._removeInverseRelationship(resource, fieldName, resource[fieldName], field);\n }\n if (newValue) {\n this._addInverseRelationship(resource, fieldName, newValue, field);\n }\n } else if (field.type === \"has-many\") {\n resource[fieldName].forEach(r => {\n if (resource[fieldName].indexOf(r) !== -1) {\n this._removeInverseRelationship(resource, fieldName, r, field);\n }\n });\n newValue.forEach(r => {\n this._addInverseRelationship(resource, fieldName, r, field);\n });\n }\n resource[fieldName] = newValue;\n }\n }\n\n _addInverseRelationship(sourceResource, sourceFieldName, targetResource, sourceField) {\n var targetDefinition = Store.types[targetResource.type];\n var targetFieldName = sourceField.inverse || targetResource.type;\n var targetField = targetDefinition && targetDefinition[targetFieldName];\n targetResource._dependents.push({ type: sourceResource.type, id: sourceResource.id, fieldName: sourceFieldName });\n if (targetField) {\n if (targetField.type === \"has-one\") {\n sourceResource._dependents.push({ type: targetResource.type, id: targetResource.id, fieldName: targetFieldName });\n targetResource[targetFieldName] = sourceResource;\n } else if (targetField.type === \"has-many\") {\n sourceResource._dependents.push({ type: targetResource.type, id: targetResource.id, fieldName: targetFieldName });\n if (targetResource[targetFieldName].indexOf(sourceResource) === -1) {\n targetResource[targetFieldName].push(sourceResource);\n }\n } else if (targetField.type === \"attr\") {\n throw new Error(`The the inverse relationship for '${sourceFieldName}' is an attribute ('${targetFieldName}')`);\n }\n } else if (sourceField.inverse) {\n throw new Error(`The the inverse relationship for '${sourceFieldName}' is missing ('${sourceField.inverse}')`);\n }\n }\n\n _remove(resource) {\n resource._dependents.forEach(dependent => {\n let dependentResource = this._data[dependent.type][dependent.id];\n switch (Store.types[dependent.type][dependent.fieldName].type) {\n case \"has-one\": {\n dependentResource[dependent.fieldName] = null;\n break;\n }\n case \"has-many\": {\n let index = dependentResource[dependent.fieldName].indexOf(resource);\n if (index !== -1) {\n dependentResource[dependent.fieldName].splice(index, 1);\n }\n break;\n }\n default: {\n break;\n }\n }\n // TODO: This only needs to be run once for each dependent.\n dependentResource._dependents = dependentResource._dependents.filter(d => {\n return !(d.type === resource.type && d.id === resource.id);\n });\n });\n delete this._data[resource.type][resource.id];\n }\n\n _removeInverseRelationship(sourceResource, sourceFieldName, targetResource, sourceField) {\n var targetDefinition = Store.types[targetResource.type];\n var targetFieldName = sourceField.inverse || targetResource.type;\n var targetField = targetDefinition && targetDefinition[targetFieldName];\n targetResource._dependents = targetResource._dependents.filter(r => {\n return !(r.type === sourceResource.type && r.id === sourceResource.id && r.fieldName === sourceFieldName);\n });\n if (targetField) {\n if (targetField.type === \"has-one\") {\n sourceResource._dependents = sourceResource._dependents.filter(r => {\n return !(r.type === targetResource.type && r.id === targetResource.id && r.fieldName === targetFieldName);\n });\n targetResource[targetFieldName] = null;\n } else if (targetField.type === \"has-many\") {\n sourceResource._dependents = sourceResource._dependents.filter(r => {\n return !(r.type === targetResource.type && r.id === targetResource.id && r.fieldName === targetFieldName);\n });\n targetResource[targetFieldName] = targetResource[targetFieldName].filter(r => {\n return r !== sourceResource;\n });\n } else if (targetField.type === \"attr\") {\n throw new Error(`The the inverse relationship for '${sourceFieldName}' is an attribute ('${targetFieldName}')`);\n }\n } else if (sourceField.inverse) {\n throw new Error(`The the inverse relationship for '${sourceFieldName}' is missing ('${sourceField.inverse}')`);\n }\n }\n\n}\n\nStore.types = {};\n"
+ },
+ {
+ "kind": "class",
+ "static": true,
+ "variation": null,
+ "name": "Store",
+ "memberof": "src/store.js",
+ "longname": "src/store.js~Store",
+ "access": null,
+ "export": true,
+ "importPath": "json-api-store/src/store.js",
+ "importStyle": "Store",
+ "description": null,
+ "lineNumber": 1,
+ "undocument": true,
+ "interface": false
+ },
+ {
+ "kind": "method",
+ "static": true,
+ "variation": null,
+ "name": "attr",
+ "memberof": "src/store.js~Store",
+ "longname": "src/store.js~Store.attr",
+ "access": null,
+ "description": "Creates a field definition for an attribute.",
+ "lineNumber": 11,
+ "params": [
+ {
+ "nullable": null,
+ "types": [
+ "string"
+ ],
+ "spread": false,
+ "optional": true,
+ "name": "name",
+ "description": "Name of the property to map this field from."
+ },
+ {
+ "nullable": null,
+ "types": [
+ "Object"
+ ],
+ "spread": false,
+ "optional": true,
+ "name": "options",
+ "description": "An options object."
+ },
+ {
+ "nullable": null,
+ "types": [
+ "string"
+ ],
+ "spread": false,
+ "optional": true,
+ "name": "options.default",
+ "description": "Default value for this field."
+ }
+ ],
+ "return": {
+ "nullable": null,
+ "types": [
+ "Object"
+ ],
+ "spread": false,
+ "description": "Field definition."
+ },
+ "generator": false
+ },
+ {
+ "kind": "method",
+ "static": true,
+ "variation": null,
+ "name": "hasOne",
+ "memberof": "src/store.js~Store",
+ "longname": "src/store.js~Store.hasOne",
+ "access": null,
+ "description": "Creates a field definition for an has-one relationship.",
+ "lineNumber": 33,
+ "params": [
+ {
+ "nullable": null,
+ "types": [
+ "string"
+ ],
+ "spread": false,
+ "optional": true,
+ "name": "name",
+ "description": "Name of the property to map this field from."
+ },
+ {
+ "nullable": null,
+ "types": [
+ "Object"
+ ],
+ "spread": false,
+ "optional": true,
+ "name": "options",
+ "description": "An options object."
+ },
+ {
+ "nullable": null,
+ "types": [
+ "string"
+ ],
+ "spread": false,
+ "optional": true,
+ "name": "options.inverse",
+ "description": "Name of the inverse relationship."
+ }
+ ],
+ "return": {
+ "nullable": null,
+ "types": [
+ "Object"
+ ],
+ "spread": false,
+ "description": "Field definition."
+ },
+ "generator": false
+ },
+ {
+ "kind": "method",
+ "static": true,
+ "variation": null,
+ "name": "hasMany",
+ "memberof": "src/store.js~Store",
+ "longname": "src/store.js~Store.hasMany",
+ "access": null,
+ "description": "Creates a field definition for an has-many relationship.",
+ "lineNumber": 62,
+ "params": [
+ {
+ "nullable": null,
+ "types": [
+ "string"
+ ],
+ "spread": false,
+ "optional": true,
+ "name": "name",
+ "description": "Name of the property to map this field from."
+ },
+ {
+ "nullable": null,
+ "types": [
+ "Object"
+ ],
+ "spread": false,
+ "optional": true,
+ "name": "options",
+ "description": "An options object."
+ },
+ {
+ "nullable": null,
+ "types": [
+ "string"
+ ],
+ "spread": false,
+ "optional": true,
+ "name": "options.inverse",
+ "description": "Name of the inverse relationship."
+ }
+ ],
+ "return": {
+ "nullable": null,
+ "types": [
+ "Object"
+ ],
+ "spread": false,
+ "description": "Field definition."
+ },
+ "generator": false
+ },
+ {
+ "kind": "constructor",
+ "static": false,
+ "variation": null,
+ "name": "constructor",
+ "memberof": "src/store.js~Store",
+ "longname": "src/store.js~Store#constructor",
+ "access": null,
+ "description": null,
+ "lineNumber": 86,
+ "undocument": true,
+ "params": [],
+ "generator": false
+ },
+ {
+ "kind": "member",
+ "static": false,
+ "variation": null,
+ "name": "_data",
+ "memberof": "src/store.js~Store",
+ "longname": "src/store.js~Store#_data",
+ "access": null,
+ "description": null,
+ "lineNumber": 87,
+ "undocument": true,
+ "type": {
+ "types": [
+ "*"
+ ]
+ }
+ },
+ {
+ "kind": "method",
+ "static": false,
+ "variation": null,
+ "name": "add",
+ "memberof": "src/store.js~Store",
+ "longname": "src/store.js~Store#add",
+ "access": null,
+ "description": "Add an individual resource to the store. This is used internally by the\n`push()` method.",
+ "lineNumber": 98,
+ "params": [
+ {
+ "nullable": null,
+ "types": [
+ "Object"
+ ],
+ "spread": false,
+ "optional": false,
+ "name": "object",
+ "description": "Resource Object to add. See:\n http://jsonapi.org/format/#document-resource-objects"
+ }
+ ],
+ "return": {
+ "nullable": null,
+ "types": [
+ "undefined"
+ ],
+ "spread": false,
+ "description": "Doesn't return anything."
+ },
+ "generator": false
+ },
+ {
+ "kind": "method",
+ "static": false,
+ "variation": null,
+ "name": "find",
+ "memberof": "src/store.js~Store",
+ "longname": "src/store.js~Store#find",
+ "access": null,
+ "description": "Find a resource or entire collection of resources.\n\nNOTE: If the resource hasn't been loaded via an add() or push() call it\nwill be automatically created when find is called.",
+ "lineNumber": 125,
+ "params": [
+ {
+ "nullable": false,
+ "types": [
+ "string"
+ ],
+ "spread": false,
+ "optional": false,
+ "name": "type",
+ "description": "Type of the resource(s) to find."
+ },
+ {
+ "nullable": null,
+ "types": [
+ "string"
+ ],
+ "spread": false,
+ "optional": true,
+ "name": "id",
+ "description": "The id of the resource to find. If omitted all\n resources of the type will be returned."
+ }
+ ],
+ "return": {
+ "nullable": null,
+ "types": [
+ "Object",
+ "Object[]"
+ ],
+ "spread": false,
+ "description": "Either the resource or an array of resources."
+ },
+ "generator": false
+ },
+ {
+ "kind": "method",
+ "static": false,
+ "variation": null,
+ "name": "push",
+ "memberof": "src/store.js~Store",
+ "longname": "src/store.js~Store#push",
+ "access": null,
+ "description": "Add a JSON API response to the store. This method can be used to handle a\nsuccessful GET or POST response from the server.",
+ "lineNumber": 162,
+ "params": [
+ {
+ "nullable": null,
+ "types": [
+ "Object"
+ ],
+ "spread": false,
+ "optional": false,
+ "name": "root",
+ "description": "Top Level Object to push. See:\n http://jsonapi.org/format/#document-top-level"
+ }
+ ],
+ "return": {
+ "nullable": null,
+ "types": [
+ "undefined"
+ ],
+ "spread": false,
+ "description": "Doesn't return anything."
+ },
+ "generator": false
+ },
+ {
+ "kind": "method",
+ "static": false,
+ "variation": null,
+ "name": "remove",
+ "memberof": "src/store.js~Store",
+ "longname": "src/store.js~Store#remove",
+ "access": null,
+ "description": "Remove a resource or collection of resources from the store.",
+ "lineNumber": 181,
+ "params": [
+ {
+ "nullable": false,
+ "types": [
+ "string"
+ ],
+ "spread": false,
+ "optional": false,
+ "name": "type",
+ "description": "Type of the resource(s) to remove."
+ },
+ {
+ "nullable": null,
+ "types": [
+ "string"
+ ],
+ "spread": false,
+ "optional": true,
+ "name": "id",
+ "description": "The id of the resource to remove. If omitted all\n resources of the type will be removed."
+ }
+ ],
+ "return": {
+ "nullable": null,
+ "types": [
+ "undefined"
+ ],
+ "spread": false,
+ "description": "Doesn't return anything."
+ },
+ "generator": false
+ },
+ {
+ "kind": "method",
+ "static": false,
+ "variation": null,
+ "name": "_addField",
+ "memberof": "src/store.js~Store",
+ "longname": "src/store.js~Store#_addField",
+ "access": null,
+ "description": null,
+ "lineNumber": 200,
+ "undocument": true,
+ "params": [
+ {
+ "name": "object",
+ "types": [
+ "*"
+ ]
+ },
+ {
+ "name": "resource",
+ "types": [
+ "*"
+ ]
+ },
+ {
+ "name": "definition",
+ "types": [
+ "*"
+ ]
+ },
+ {
+ "name": "fieldName",
+ "types": [
+ "*"
+ ]
+ }
+ ],
+ "generator": false
+ },
+ {
+ "kind": "method",
+ "static": false,
+ "variation": null,
+ "name": "_addInverseRelationship",
+ "memberof": "src/store.js~Store",
+ "longname": "src/store.js~Store#_addInverseRelationship",
+ "access": null,
+ "description": null,
+ "lineNumber": 225,
+ "undocument": true,
+ "params": [
+ {
+ "name": "sourceResource",
+ "types": [
+ "*"
+ ]
+ },
+ {
+ "name": "sourceFieldName",
+ "types": [
+ "*"
+ ]
+ },
+ {
+ "name": "targetResource",
+ "types": [
+ "*"
+ ]
+ },
+ {
+ "name": "sourceField",
+ "types": [
+ "*"
+ ]
+ }
+ ],
+ "generator": false
+ },
+ {
+ "kind": "method",
+ "static": false,
+ "variation": null,
+ "name": "_remove",
+ "memberof": "src/store.js~Store",
+ "longname": "src/store.js~Store#_remove",
+ "access": null,
+ "description": null,
+ "lineNumber": 247,
+ "undocument": true,
+ "params": [
+ {
+ "name": "resource",
+ "types": [
+ "*"
+ ]
+ }
+ ],
+ "generator": false
+ },
+ {
+ "kind": "method",
+ "static": false,
+ "variation": null,
+ "name": "_removeInverseRelationship",
+ "memberof": "src/store.js~Store",
+ "longname": "src/store.js~Store#_removeInverseRelationship",
+ "access": null,
+ "description": null,
+ "lineNumber": 274,
+ "undocument": true,
+ "params": [
+ {
+ "name": "sourceResource",
+ "types": [
+ "*"
+ ]
+ },
+ {
+ "name": "sourceFieldName",
+ "types": [
+ "*"
+ ]
+ },
+ {
+ "name": "targetResource",
+ "types": [
+ "*"
+ ]
+ },
+ {
+ "name": "sourceField",
+ "types": [
+ "*"
+ ]
+ }
+ ],
+ "generator": false
+ },
+ {
+ "kind": "external",
+ "static": true,
+ "variation": null,
+ "name": "Infinity",
+ "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Infinity",
+ "memberof": "BuiltinExternal/ECMAScriptExternal.js",
+ "longname": "BuiltinExternal/ECMAScriptExternal.js~Infinity",
+ "access": null,
+ "description": null,
+ "builtinExternal": true
+ },
+ {
+ "kind": "external",
+ "static": true,
+ "variation": null,
+ "name": "NaN",
+ "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/NaN",
+ "memberof": "BuiltinExternal/ECMAScriptExternal.js",
+ "longname": "BuiltinExternal/ECMAScriptExternal.js~NaN",
+ "access": null,
+ "description": null,
+ "builtinExternal": true
+ },
+ {
+ "kind": "external",
+ "static": true,
+ "variation": null,
+ "name": "undefined",
+ "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined",
+ "memberof": "BuiltinExternal/ECMAScriptExternal.js",
+ "longname": "BuiltinExternal/ECMAScriptExternal.js~undefined",
+ "access": null,
+ "description": null,
+ "builtinExternal": true
+ },
+ {
+ "kind": "external",
+ "static": true,
+ "variation": null,
+ "name": "null",
+ "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/null",
+ "memberof": "BuiltinExternal/ECMAScriptExternal.js",
+ "longname": "BuiltinExternal/ECMAScriptExternal.js~null",
+ "access": null,
+ "description": null,
+ "builtinExternal": true
+ },
+ {
+ "kind": "external",
+ "static": true,
+ "variation": null,
+ "name": "Object",
+ "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object",
+ "memberof": "BuiltinExternal/ECMAScriptExternal.js",
+ "longname": "BuiltinExternal/ECMAScriptExternal.js~Object",
+ "access": null,
+ "description": null,
+ "builtinExternal": true
+ },
+ {
+ "kind": "external",
+ "static": true,
+ "variation": null,
+ "name": "object",
+ "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object",
+ "memberof": "BuiltinExternal/ECMAScriptExternal.js",
+ "longname": "BuiltinExternal/ECMAScriptExternal.js~object",
+ "access": null,
+ "description": null,
+ "builtinExternal": true
+ },
+ {
+ "kind": "external",
+ "static": true,
+ "variation": null,
+ "name": "Function",
+ "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function",
+ "memberof": "BuiltinExternal/ECMAScriptExternal.js",
+ "longname": "BuiltinExternal/ECMAScriptExternal.js~Function",
+ "access": null,
+ "description": null,
+ "builtinExternal": true
+ },
+ {
+ "kind": "external",
+ "static": true,
+ "variation": null,
+ "name": "function",
+ "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function",
+ "memberof": "BuiltinExternal/ECMAScriptExternal.js",
+ "longname": "BuiltinExternal/ECMAScriptExternal.js~function",
+ "access": null,
+ "description": null,
+ "builtinExternal": true
+ },
+ {
+ "kind": "external",
+ "static": true,
+ "variation": null,
+ "name": "Boolean",
+ "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean",
+ "memberof": "BuiltinExternal/ECMAScriptExternal.js",
+ "longname": "BuiltinExternal/ECMAScriptExternal.js~Boolean",
+ "access": null,
+ "description": null,
+ "builtinExternal": true
+ },
+ {
+ "kind": "external",
+ "static": true,
+ "variation": null,
+ "name": "boolean",
+ "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean",
+ "memberof": "BuiltinExternal/ECMAScriptExternal.js",
+ "longname": "BuiltinExternal/ECMAScriptExternal.js~boolean",
+ "access": null,
+ "description": null,
+ "builtinExternal": true
+ },
+ {
+ "kind": "external",
+ "static": true,
+ "variation": null,
+ "name": "Symbol",
+ "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol",
+ "memberof": "BuiltinExternal/ECMAScriptExternal.js",
+ "longname": "BuiltinExternal/ECMAScriptExternal.js~Symbol",
+ "access": null,
+ "description": null,
+ "builtinExternal": true
+ },
+ {
+ "kind": "external",
+ "static": true,
+ "variation": null,
+ "name": "Error",
+ "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error",
+ "memberof": "BuiltinExternal/ECMAScriptExternal.js",
+ "longname": "BuiltinExternal/ECMAScriptExternal.js~Error",
+ "access": null,
+ "description": null,
+ "builtinExternal": true
+ },
+ {
+ "kind": "external",
+ "static": true,
+ "variation": null,
+ "name": "EvalError",
+ "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/EvalError",
+ "memberof": "BuiltinExternal/ECMAScriptExternal.js",
+ "longname": "BuiltinExternal/ECMAScriptExternal.js~EvalError",
+ "access": null,
+ "description": null,
+ "builtinExternal": true
+ },
+ {
+ "kind": "external",
+ "static": true,
+ "variation": null,
+ "name": "InternalError",
+ "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/InternalError",
+ "memberof": "BuiltinExternal/ECMAScriptExternal.js",
+ "longname": "BuiltinExternal/ECMAScriptExternal.js~InternalError",
+ "access": null,
+ "description": null,
+ "builtinExternal": true
+ },
+ {
+ "kind": "external",
+ "static": true,
+ "variation": null,
+ "name": "RangeError",
+ "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RangeError",
+ "memberof": "BuiltinExternal/ECMAScriptExternal.js",
+ "longname": "BuiltinExternal/ECMAScriptExternal.js~RangeError",
+ "access": null,
+ "description": null,
+ "builtinExternal": true
+ },
+ {
+ "kind": "external",
+ "static": true,
+ "variation": null,
+ "name": "ReferenceError",
+ "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ReferenceError",
+ "memberof": "BuiltinExternal/ECMAScriptExternal.js",
+ "longname": "BuiltinExternal/ECMAScriptExternal.js~ReferenceError",
+ "access": null,
+ "description": null,
+ "builtinExternal": true
+ },
+ {
+ "kind": "external",
+ "static": true,
+ "variation": null,
+ "name": "SyntaxError",
+ "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SyntaxError",
+ "memberof": "BuiltinExternal/ECMAScriptExternal.js",
+ "longname": "BuiltinExternal/ECMAScriptExternal.js~SyntaxError",
+ "access": null,
+ "description": null,
+ "builtinExternal": true
+ },
+ {
+ "kind": "external",
+ "static": true,
+ "variation": null,
+ "name": "TypeError",
+ "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypeError",
+ "memberof": "BuiltinExternal/ECMAScriptExternal.js",
+ "longname": "BuiltinExternal/ECMAScriptExternal.js~TypeError",
+ "access": null,
+ "description": null,
+ "builtinExternal": true
+ },
+ {
+ "kind": "external",
+ "static": true,
+ "variation": null,
+ "name": "URIError",
+ "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/URIError",
+ "memberof": "BuiltinExternal/ECMAScriptExternal.js",
+ "longname": "BuiltinExternal/ECMAScriptExternal.js~URIError",
+ "access": null,
+ "description": null,
+ "builtinExternal": true
+ },
+ {
+ "kind": "external",
+ "static": true,
+ "variation": null,
+ "name": "Number",
+ "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number",
+ "memberof": "BuiltinExternal/ECMAScriptExternal.js",
+ "longname": "BuiltinExternal/ECMAScriptExternal.js~Number",
+ "access": null,
+ "description": null,
+ "builtinExternal": true
+ },
+ {
+ "kind": "external",
+ "static": true,
+ "variation": null,
+ "name": "number",
+ "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number",
+ "memberof": "BuiltinExternal/ECMAScriptExternal.js",
+ "longname": "BuiltinExternal/ECMAScriptExternal.js~number",
+ "access": null,
+ "description": null,
+ "builtinExternal": true
+ },
+ {
+ "kind": "external",
+ "static": true,
+ "variation": null,
+ "name": "Date",
+ "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date",
+ "memberof": "BuiltinExternal/ECMAScriptExternal.js",
+ "longname": "BuiltinExternal/ECMAScriptExternal.js~Date",
+ "access": null,
+ "description": null,
+ "builtinExternal": true
+ },
+ {
+ "kind": "external",
+ "static": true,
+ "variation": null,
+ "name": "String",
+ "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String",
+ "memberof": "BuiltinExternal/ECMAScriptExternal.js",
+ "longname": "BuiltinExternal/ECMAScriptExternal.js~String",
+ "access": null,
+ "description": null,
+ "builtinExternal": true
+ },
+ {
+ "kind": "external",
+ "static": true,
+ "variation": null,
+ "name": "string",
+ "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String",
+ "memberof": "BuiltinExternal/ECMAScriptExternal.js",
+ "longname": "BuiltinExternal/ECMAScriptExternal.js~string",
+ "access": null,
+ "description": null,
+ "builtinExternal": true
+ },
+ {
+ "kind": "external",
+ "static": true,
+ "variation": null,
+ "name": "RegExp",
+ "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp",
+ "memberof": "BuiltinExternal/ECMAScriptExternal.js",
+ "longname": "BuiltinExternal/ECMAScriptExternal.js~RegExp",
+ "access": null,
+ "description": null,
+ "builtinExternal": true
+ },
+ {
+ "kind": "external",
+ "static": true,
+ "variation": null,
+ "name": "Array",
+ "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array",
+ "memberof": "BuiltinExternal/ECMAScriptExternal.js",
+ "longname": "BuiltinExternal/ECMAScriptExternal.js~Array",
+ "access": null,
+ "description": null,
+ "builtinExternal": true
+ },
+ {
+ "kind": "external",
+ "static": true,
+ "variation": null,
+ "name": "Int8Array",
+ "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int8Array",
+ "memberof": "BuiltinExternal/ECMAScriptExternal.js",
+ "longname": "BuiltinExternal/ECMAScriptExternal.js~Int8Array",
+ "access": null,
+ "description": null,
+ "builtinExternal": true
+ },
+ {
+ "kind": "external",
+ "static": true,
+ "variation": null,
+ "name": "Uint8Array",
+ "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array",
+ "memberof": "BuiltinExternal/ECMAScriptExternal.js",
+ "longname": "BuiltinExternal/ECMAScriptExternal.js~Uint8Array",
+ "access": null,
+ "description": null,
+ "builtinExternal": true
+ },
+ {
+ "kind": "external",
+ "static": true,
+ "variation": null,
+ "name": "Uint8ClampedArray",
+ "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8ClampedArray",
+ "memberof": "BuiltinExternal/ECMAScriptExternal.js",
+ "longname": "BuiltinExternal/ECMAScriptExternal.js~Uint8ClampedArray",
+ "access": null,
+ "description": null,
+ "builtinExternal": true
+ },
+ {
+ "kind": "external",
+ "static": true,
+ "variation": null,
+ "name": "Int16Array",
+ "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int16Array",
+ "memberof": "BuiltinExternal/ECMAScriptExternal.js",
+ "longname": "BuiltinExternal/ECMAScriptExternal.js~Int16Array",
+ "access": null,
+ "description": null,
+ "builtinExternal": true
+ },
+ {
+ "kind": "external",
+ "static": true,
+ "variation": null,
+ "name": "Uint16Array",
+ "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint16Array",
+ "memberof": "BuiltinExternal/ECMAScriptExternal.js",
+ "longname": "BuiltinExternal/ECMAScriptExternal.js~Uint16Array",
+ "access": null,
+ "description": null,
+ "builtinExternal": true
+ },
+ {
+ "kind": "external",
+ "static": true,
+ "variation": null,
+ "name": "Int32Array",
+ "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int32Array",
+ "memberof": "BuiltinExternal/ECMAScriptExternal.js",
+ "longname": "BuiltinExternal/ECMAScriptExternal.js~Int32Array",
+ "access": null,
+ "description": null,
+ "builtinExternal": true
+ },
+ {
+ "kind": "external",
+ "static": true,
+ "variation": null,
+ "name": "Uint32Array",
+ "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint32Array",
+ "memberof": "BuiltinExternal/ECMAScriptExternal.js",
+ "longname": "BuiltinExternal/ECMAScriptExternal.js~Uint32Array",
+ "access": null,
+ "description": null,
+ "builtinExternal": true
+ },
+ {
+ "kind": "external",
+ "static": true,
+ "variation": null,
+ "name": "Float32Array",
+ "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float32Array",
+ "memberof": "BuiltinExternal/ECMAScriptExternal.js",
+ "longname": "BuiltinExternal/ECMAScriptExternal.js~Float32Array",
+ "access": null,
+ "description": null,
+ "builtinExternal": true
+ },
+ {
+ "kind": "external",
+ "static": true,
+ "variation": null,
+ "name": "Float64Array",
+ "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float64Array",
+ "memberof": "BuiltinExternal/ECMAScriptExternal.js",
+ "longname": "BuiltinExternal/ECMAScriptExternal.js~Float64Array",
+ "access": null,
+ "description": null,
+ "builtinExternal": true
+ },
+ {
+ "kind": "external",
+ "static": true,
+ "variation": null,
+ "name": "Map",
+ "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map",
+ "memberof": "BuiltinExternal/ECMAScriptExternal.js",
+ "longname": "BuiltinExternal/ECMAScriptExternal.js~Map",
+ "access": null,
+ "description": null,
+ "builtinExternal": true
+ },
+ {
+ "kind": "external",
+ "static": true,
+ "variation": null,
+ "name": "Set",
+ "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set",
+ "memberof": "BuiltinExternal/ECMAScriptExternal.js",
+ "longname": "BuiltinExternal/ECMAScriptExternal.js~Set",
+ "access": null,
+ "description": null,
+ "builtinExternal": true
+ },
+ {
+ "kind": "external",
+ "static": true,
+ "variation": null,
+ "name": "WeakMap",
+ "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap",
+ "memberof": "BuiltinExternal/ECMAScriptExternal.js",
+ "longname": "BuiltinExternal/ECMAScriptExternal.js~WeakMap",
+ "access": null,
+ "description": null,
+ "builtinExternal": true
+ },
+ {
+ "kind": "external",
+ "static": true,
+ "variation": null,
+ "name": "WeakSet",
+ "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakSet",
+ "memberof": "BuiltinExternal/ECMAScriptExternal.js",
+ "longname": "BuiltinExternal/ECMAScriptExternal.js~WeakSet",
+ "access": null,
+ "description": null,
+ "builtinExternal": true
+ },
+ {
+ "kind": "external",
+ "static": true,
+ "variation": null,
+ "name": "ArrayBuffer",
+ "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer",
+ "memberof": "BuiltinExternal/ECMAScriptExternal.js",
+ "longname": "BuiltinExternal/ECMAScriptExternal.js~ArrayBuffer",
+ "access": null,
+ "description": null,
+ "builtinExternal": true
+ },
+ {
+ "kind": "external",
+ "static": true,
+ "variation": null,
+ "name": "DataView",
+ "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView",
+ "memberof": "BuiltinExternal/ECMAScriptExternal.js",
+ "longname": "BuiltinExternal/ECMAScriptExternal.js~DataView",
+ "access": null,
+ "description": null,
+ "builtinExternal": true
+ },
+ {
+ "kind": "external",
+ "static": true,
+ "variation": null,
+ "name": "JSON",
+ "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON",
+ "memberof": "BuiltinExternal/ECMAScriptExternal.js",
+ "longname": "BuiltinExternal/ECMAScriptExternal.js~JSON",
+ "access": null,
+ "description": null,
+ "builtinExternal": true
+ },
+ {
+ "kind": "external",
+ "static": true,
+ "variation": null,
+ "name": "Promise",
+ "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise",
+ "memberof": "BuiltinExternal/ECMAScriptExternal.js",
+ "longname": "BuiltinExternal/ECMAScriptExternal.js~Promise",
+ "access": null,
+ "description": null,
+ "builtinExternal": true
+ },
+ {
+ "kind": "external",
+ "static": true,
+ "variation": null,
+ "name": "Generator",
+ "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Generator",
+ "memberof": "BuiltinExternal/ECMAScriptExternal.js",
+ "longname": "BuiltinExternal/ECMAScriptExternal.js~Generator",
+ "access": null,
+ "description": null,
+ "builtinExternal": true
+ },
+ {
+ "kind": "external",
+ "static": true,
+ "variation": null,
+ "name": "GeneratorFunction",
+ "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/GeneratorFunction",
+ "memberof": "BuiltinExternal/ECMAScriptExternal.js",
+ "longname": "BuiltinExternal/ECMAScriptExternal.js~GeneratorFunction",
+ "access": null,
+ "description": null,
+ "builtinExternal": true
+ },
+ {
+ "kind": "external",
+ "static": true,
+ "variation": null,
+ "name": "Reflect",
+ "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect",
+ "memberof": "BuiltinExternal/ECMAScriptExternal.js",
+ "longname": "BuiltinExternal/ECMAScriptExternal.js~Reflect",
+ "access": null,
+ "description": null,
+ "builtinExternal": true
+ },
+ {
+ "kind": "external",
+ "static": true,
+ "variation": null,
+ "name": "Proxy",
+ "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy",
+ "memberof": "BuiltinExternal/ECMAScriptExternal.js",
+ "longname": "BuiltinExternal/ECMAScriptExternal.js~Proxy",
+ "access": null,
+ "description": null,
+ "builtinExternal": true
+ },
+ {
+ "kind": "external",
+ "static": true,
+ "variation": null,
+ "name": "CanvasRenderingContext2D",
+ "externalLink": "https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D",
+ "memberof": "BuiltinExternal/WebAPIExternal.js",
+ "longname": "BuiltinExternal/WebAPIExternal.js~CanvasRenderingContext2D",
+ "access": null,
+ "description": null,
+ "builtinExternal": true
+ },
+ {
+ "kind": "external",
+ "static": true,
+ "variation": null,
+ "name": "DocumentFragment",
+ "externalLink": "https://developer.mozilla.org/en-US/docs/Web/API/DocumentFragment",
+ "memberof": "BuiltinExternal/WebAPIExternal.js",
+ "longname": "BuiltinExternal/WebAPIExternal.js~DocumentFragment",
+ "access": null,
+ "description": null,
+ "builtinExternal": true
+ },
+ {
+ "kind": "external",
+ "static": true,
+ "variation": null,
+ "name": "Element",
+ "externalLink": "https://developer.mozilla.org/en-US/docs/Web/API/Element",
+ "memberof": "BuiltinExternal/WebAPIExternal.js",
+ "longname": "BuiltinExternal/WebAPIExternal.js~Element",
+ "access": null,
+ "description": null,
+ "builtinExternal": true
+ },
+ {
+ "kind": "external",
+ "static": true,
+ "variation": null,
+ "name": "Event",
+ "externalLink": "https://developer.mozilla.org/en-US/docs/Web/API/Event",
+ "memberof": "BuiltinExternal/WebAPIExternal.js",
+ "longname": "BuiltinExternal/WebAPIExternal.js~Event",
+ "access": null,
+ "description": null,
+ "builtinExternal": true
+ },
+ {
+ "kind": "external",
+ "static": true,
+ "variation": null,
+ "name": "Node",
+ "externalLink": "https://developer.mozilla.org/en-US/docs/Web/API/Node",
+ "memberof": "BuiltinExternal/WebAPIExternal.js",
+ "longname": "BuiltinExternal/WebAPIExternal.js~Node",
+ "access": null,
+ "description": null,
+ "builtinExternal": true
+ },
+ {
+ "kind": "external",
+ "static": true,
+ "variation": null,
+ "name": "NodeList",
+ "externalLink": "https://developer.mozilla.org/en-US/docs/Web/API/NodeList",
+ "memberof": "BuiltinExternal/WebAPIExternal.js",
+ "longname": "BuiltinExternal/WebAPIExternal.js~NodeList",
+ "access": null,
+ "description": null,
+ "builtinExternal": true
+ },
+ {
+ "kind": "external",
+ "static": true,
+ "variation": null,
+ "name": "XMLHttpRequest",
+ "externalLink": "https://developer.mozilla.org/en/docs/Web/API/XMLHttpRequest",
+ "memberof": "BuiltinExternal/WebAPIExternal.js",
+ "longname": "BuiltinExternal/WebAPIExternal.js~XMLHttpRequest",
+ "access": null,
+ "description": null,
+ "builtinExternal": true
+ }
+]
\ No newline at end of file
diff --git a/docs/file/src/store.js.html b/docs/file/src/store.js.html
new file mode 100644
index 0000000..b9ed169
--- /dev/null
+++ b/docs/file/src/store.js.html
@@ -0,0 +1,369 @@
+
+
+
+
+
+ src/store.js | API Document
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+src/store.js
+
export default class Store {
+
+ /**
+ * Creates a field definition for an attribute.
+ *
+ * @param {string} [name] - Name of the property to map this field from.
+ * @param {Object} [options] - An options object.
+ * @param {string} [options.default] - Default value for this field.
+ * @return {Object} - Field definition.
+ */
+ static attr(name, options) {
+ if (name && typeof name === 'object') {
+ return Store.attr(null, name);
+ } else {
+ return {
+ type: "attr",
+ default: options && options.default,
+ deserialize: function (data, key) {
+ return data.attributes && data.attributes[name || key];
+ }
+ };
+ }
+ }
+
+ /**
+ * Creates a field definition for an has-one relationship.
+ *
+ * @param {string} [name] - Name of the property to map this field from.
+ * @param {Object} [options] - An options object.
+ * @param {string} [options.inverse] - Name of the inverse relationship.
+ * @return {Object} - Field definition.
+ */
+ static hasOne(name, options) {
+ if (name && typeof name === 'object') {
+ return Store.hasOne(null, name);
+ } else {
+ return {
+ type: "has-one",
+ inverse: options && options.inverse,
+ deserialize: function (data, key) {
+ name = name || key;
+ if (data.relationships && data.relationships[name]) {
+ if (data.relationships[name].data === null) {
+ return null;
+ } else if (data.relationships[name].data) {
+ return this.find(data.relationships[name].data.type, data.relationships[name].data.id);
+ }
+ }
+ }
+ };
+ }
+ }
+
+ /**
+ * Creates a field definition for an has-many relationship.
+ *
+ * @param {string} [name] - Name of the property to map this field from.
+ * @param {Object} [options] - An options object.
+ * @param {string} [options.inverse] - Name of the inverse relationship.
+ * @return {Object} - Field definition.
+ */
+ static hasMany(name, options) {
+ if (name && typeof name === 'object') {
+ return Store.hasMany(null, name);
+ } else {
+ return {
+ type: "has-many",
+ default: [],
+ inverse: options && options.inverse,
+ deserialize: function (data, key) {
+ name = name || key;
+ if (data.relationships && data.relationships[name]) {
+ if (data.relationships[name].data === null) {
+ return [];
+ } else if (data.relationships[name].data) {
+ return data.relationships[name].data.map((c) => {
+ return this.find(c.type, c.id);
+ });
+ }
+ }
+ }
+ };
+ }
+ }
+
+ constructor() {
+ this._data = {};
+ }
+
+ /**
+ * Add an individual resource to the store. This is used internally by the
+ * `push()` method.
+ *
+ * @param {Object} object - Resource Object to add. See:
+ http://jsonapi.org/format/#document-resource-objects
+ * @return {undefined} - Doesn't return anything.
+ */
+ add(object) {
+ if (object) {
+ if (object.type && object.id) {
+ let resource = this.find(object.type, object.id);
+ let definition = Store.types[object.type];
+ Object.keys(definition).forEach(fieldName => {
+ this._addField(object, resource, definition, fieldName);
+ });
+ } else {
+ throw new TypeError(`The data must have a type and id`);
+ }
+ } else {
+ throw new TypeError(`You must provide data to add`);
+ }
+ }
+
+ /**
+ * Find a resource or entire collection of resources.
+ *
+ * NOTE: If the resource hasn't been loaded via an add() or push() call it
+ * will be automatically created when find is called.
+ *
+ * @param {!string} type - Type of the resource(s) to find.
+ * @param {string} [id] - The id of the resource to find. If omitted all
+ * resources of the type will be returned.
+ * @return {Object|Object[]} - Either the resource or an array of resources.
+ */
+ find(type, id) {
+ var definition;
+ if (type) {
+ definition = Store.types[type];
+ if (definition) {
+ this._data[type] = this._data[type] || {};
+ if (id) {
+ if (!this._data[type][id]) {
+ this._data[type][id] = {
+ _dependents: [],
+ type: type,
+ id: id
+ };
+ Object.keys(definition).forEach(key => {
+ this._data[type][id][key] = definition[key].default;
+ });
+ }
+ return this._data[type][id];
+ } else {
+ return Object.keys(this._data[type]).map(x => this._data[type][x]);
+ }
+ } else {
+ throw new TypeError(`Unknown type '${type}'`);
+ }
+ } else {
+ throw new TypeError(`You must provide a type`);
+ }
+ }
+
+ /**
+ * Add a JSON API response to the store. This method can be used to handle a
+ * successful GET or POST response from the server.
+ *
+ * @param {Object} root - Top Level Object to push. See:
+ http://jsonapi.org/format/#document-top-level
+ * @return {undefined} - Doesn't return anything.
+ */
+ push(root) {
+ if (root.data.constructor === Array) {
+ root.data.forEach(x => this.add(x));
+ } else {
+ this.add(root.data);
+ }
+ if (root.included) {
+ root.included.forEach(x => this.add(x));
+ }
+ }
+
+ /**
+ * Remove a resource or collection of resources from the store.
+ *
+ * @param {!string} type - Type of the resource(s) to remove.
+ * @param {string} [id] - The id of the resource to remove. If omitted all
+ * resources of the type will be removed.
+ * @return {undefined} - Doesn't return anything.
+ */
+ remove(type, id) {
+ if (type) {
+ if (Store.types[type]) {
+ if (id) {
+ let resource = this._data[type][id];
+ if (resource) {
+ this._remove(resource);
+ }
+ } else {
+ Object.keys(this._data[type]).forEach(id => this.remove(type, id));
+ }
+ } else {
+ throw new TypeError(`Unknown type '${type}'`);
+ }
+ } else {
+ throw new TypeError(`You must provide a type to remove`);
+ }
+ }
+
+ _addField(object, resource, definition, fieldName) {
+ var field = definition[fieldName];
+ var newValue = field.deserialize.call(this, object, fieldName);
+ if (typeof newValue !== "undefined") {
+ if (field.type === "has-one") {
+ if (resource[fieldName]) {
+ this._removeInverseRelationship(resource, fieldName, resource[fieldName], field);
+ }
+ if (newValue) {
+ this._addInverseRelationship(resource, fieldName, newValue, field);
+ }
+ } else if (field.type === "has-many") {
+ resource[fieldName].forEach(r => {
+ if (resource[fieldName].indexOf(r) !== -1) {
+ this._removeInverseRelationship(resource, fieldName, r, field);
+ }
+ });
+ newValue.forEach(r => {
+ this._addInverseRelationship(resource, fieldName, r, field);
+ });
+ }
+ resource[fieldName] = newValue;
+ }
+ }
+
+ _addInverseRelationship(sourceResource, sourceFieldName, targetResource, sourceField) {
+ var targetDefinition = Store.types[targetResource.type];
+ var targetFieldName = sourceField.inverse || targetResource.type;
+ var targetField = targetDefinition && targetDefinition[targetFieldName];
+ targetResource._dependents.push({ type: sourceResource.type, id: sourceResource.id, fieldName: sourceFieldName });
+ if (targetField) {
+ if (targetField.type === "has-one") {
+ sourceResource._dependents.push({ type: targetResource.type, id: targetResource.id, fieldName: targetFieldName });
+ targetResource[targetFieldName] = sourceResource;
+ } else if (targetField.type === "has-many") {
+ sourceResource._dependents.push({ type: targetResource.type, id: targetResource.id, fieldName: targetFieldName });
+ if (targetResource[targetFieldName].indexOf(sourceResource) === -1) {
+ targetResource[targetFieldName].push(sourceResource);
+ }
+ } else if (targetField.type === "attr") {
+ throw new Error(`The the inverse relationship for '${sourceFieldName}' is an attribute ('${targetFieldName}')`);
+ }
+ } else if (sourceField.inverse) {
+ throw new Error(`The the inverse relationship for '${sourceFieldName}' is missing ('${sourceField.inverse}')`);
+ }
+ }
+
+ _remove(resource) {
+ resource._dependents.forEach(dependent => {
+ let dependentResource = this._data[dependent.type][dependent.id];
+ switch (Store.types[dependent.type][dependent.fieldName].type) {
+ case "has-one": {
+ dependentResource[dependent.fieldName] = null;
+ break;
+ }
+ case "has-many": {
+ let index = dependentResource[dependent.fieldName].indexOf(resource);
+ if (index !== -1) {
+ dependentResource[dependent.fieldName].splice(index, 1);
+ }
+ break;
+ }
+ default: {
+ break;
+ }
+ }
+ // TODO: This only needs to be run once for each dependent.
+ dependentResource._dependents = dependentResource._dependents.filter(d => {
+ return !(d.type === resource.type && d.id === resource.id);
+ });
+ });
+ delete this._data[resource.type][resource.id];
+ }
+
+ _removeInverseRelationship(sourceResource, sourceFieldName, targetResource, sourceField) {
+ var targetDefinition = Store.types[targetResource.type];
+ var targetFieldName = sourceField.inverse || targetResource.type;
+ var targetField = targetDefinition && targetDefinition[targetFieldName];
+ targetResource._dependents = targetResource._dependents.filter(r => {
+ return !(r.type === sourceResource.type && r.id === sourceResource.id && r.fieldName === sourceFieldName);
+ });
+ if (targetField) {
+ if (targetField.type === "has-one") {
+ sourceResource._dependents = sourceResource._dependents.filter(r => {
+ return !(r.type === targetResource.type && r.id === targetResource.id && r.fieldName === targetFieldName);
+ });
+ targetResource[targetFieldName] = null;
+ } else if (targetField.type === "has-many") {
+ sourceResource._dependents = sourceResource._dependents.filter(r => {
+ return !(r.type === targetResource.type && r.id === targetResource.id && r.fieldName === targetFieldName);
+ });
+ targetResource[targetFieldName] = targetResource[targetFieldName].filter(r => {
+ return r !== sourceResource;
+ });
+ } else if (targetField.type === "attr") {
+ throw new Error(`The the inverse relationship for '${sourceFieldName}' is an attribute ('${targetFieldName}')`);
+ }
+ } else if (sourceField.inverse) {
+ throw new Error(`The the inverse relationship for '${sourceFieldName}' is missing ('${sourceField.inverse}')`);
+ }
+ }
+
+}
+
+Store.types = {};
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/identifiers.html b/docs/identifiers.html
new file mode 100644
index 0000000..19025ae
--- /dev/null
+++ b/docs/identifiers.html
@@ -0,0 +1,100 @@
+
+
+
+
+
+ Index | API Document
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Identifier
+
Class Summary
+ Static Public Class Summary
+
+
+
+
+ public
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/image/badge.svg b/docs/image/badge.svg
new file mode 100644
index 0000000..324db4c
--- /dev/null
+++ b/docs/image/badge.svg
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+ document
+ document
+ @ratio@
+ @ratio@
+
+
diff --git a/docs/image/github.png b/docs/image/github.png
new file mode 100644
index 0000000000000000000000000000000000000000..ea6ff545a246caa64074ba809bbc86fcb8589071
GIT binary patch
literal 4268
zcmeAS@N?(olHy`uVBq!ia0y~yV5k6L4mJh`2Fnz)OAHJQk|nMYCBgY=CFO}lsSJ)O
z`AMk?p1FzXsX?iUDV2pMQ*9U+m{l@EB1$5BeXNr6bM+EIYV;~{3m8Da#=fE;F*!T6
zL?J0PJu}Z%>HY5gN(z}Nwo2iqz6QPp&Z!xh9#uuD!Bu`C$yM3OmMKd1b_zBXRu#Dg
zxv3?I3Kh9IdBs*0wn|`gt@4VkK*IV;3ScEA*|tg$M@9GsC^+XAr7D=}8S5q+7#b>=
znduptn3|ax>L?f)7#ist80j0B=^C0?nVMM{nJYknlAVH0QA(Oskc%7CuA-DQTcwPW
zk^(Dz{qpj1y>er{{GxPyLrY6bkQqisxCgqow*eWSOjjhNnfE$}v3=O8_{9OHt!~%UoJp+)JAb!m)@b$&7G&dKny0|1L
z72#g21{a4^7NqJ2r55Lx7A2}6#Z40`Tsp!z
zltV&xG&-oVK7NaS>zC6t`)YIXL_}k9Az?X8cr@J
z4p(R_U}}ol`}hBw(!Aes=Pb+L7k|4|J->LL>E^WJnbrG`|9bn^_WJgHE}@}QHwNvP
zq|xHFCFkBEQ@Obdjwazhn~j
zr!%JWZ)KHpUU=PU_wg+=v=?k%=+E>`j{Ao64ZDh-mN?ej3F^8J4PSh|(9T%Z$XcUx
zoFZ^EM&sdfk$Sk(u@Pfw+-*V@)eae4v_fk!`m~6s?F`$x=YE;JKV|2&3Cfoi`Le!PwTGE!N6i0Po~qu|
znSt{f`xu@yS29Z!SU)gizjgA{XBFuM%#1(dH?s5WxNmfBm0$4bv(w)QpXhG(*`kuL
zqxoY*!oxJxEjO7qCME>wJM2*YFoSb#e&o|5k6#^Iy40Fa)^3ZMSp(yDHJfEKnF=1v{O#3jOlU{vOcUt$6p(x{9ek
zT26~6?P`_oyzuODYvVZuZrOilEAGrncI0=k%vhjrw4Il`R=DYF>g8R`QL~b3cYgWJ
z$QG;3oWCgb^n2dPzvJGC=DlZIa=WdWTe|v!8blTt7YTy6H@QFn&z5T|`Zn?y9_wKlA`jY;xr+DLvQs{8Q>VsMhBmvd-*W<-#4Dr@t`I+;`^t$MSBbQ}uf`
zoYaUjW0NyE_%q;VRJ5pndwSr+oklx$D?3Ntn|$#0?hA7-e0Q~+VXad8IPm9Pw@cTH
zFC0Fcxz=@mnvDMW%?p;NzhG8(eDC_RFD0@0I`gJf<;2f>*ZfW>%>C=`z?$?qWLEd)
znK~P6xNN0&g+#H`3BGRn)-mDdKg)o1H)3<-R
zJHGO6J;$>`;da1;%ghEgr{_3C#kbs)Q@$^h8M=={VeQ+BEu1Sd<}{UhJ&&2cvQth>
zA?DON1)+&))?b2OGwu)g&nr;Co@jdbvx4`mi66N>J8So`)E=9`ysoXz?V=6GwR=S;
zq!m|Z|7F-0x=`Sn{;&UwHb$9W6HcgkRoi<`>(a|<*;}`SdVH2i41X^Er+96n23JAR
z#>t}6TSC14E$eAe%{esHYi4oP<)d|bj^{3T`pCpVV%guOcFDUNIBRv|L#0gw+Ad%((?Nu5c;x-Z|$-BdfweCf86@|Hu-=PZ7B_HM$?Ycn<$L{ExSkV@aV
zW9iK)iQ<#v3-lL@nfiCtI#%a{7EZ}aXL`3_%8#Vex<%2Y3J;8y9tn@in|OPb54S;V^7hEQ
zd9B-4U17T8rTFlzL_%%e&dPaug75rVmqZH|7`L|AZ@f`+nz7Ynb|&M$6Q4fmvTtR`
z{^5Cb^PZaSW6KVoWLYDqx_sl)r_m;Nx}>LRh;F;`>67mA43$-^H;$d_>O8xJVf!a(
z-eogf{q(k7V2WA!#cbQQ7dG6vOCPR_iCko{)beoAXPviGF8y8MlG(I2@`aPg+WvOJz=9Je{`Sb?DVq49=j!_2LHAQ
zb+-Ll7{sRYBcR)8El+66?*5#~-cwhLY8zTfx}5RqT|fPH^J3A>7IJ1rnLn0xNq(Gg
zwO{9w@RO>=)xUolnLkiHHFc)S#szCho;#nIq4?+7;zf761@vCqoNp<9d18(*!{f2
zyz0WYrYzlH^N@SlAJZjPn-__$_`#B~mx(Q!|I`N0Vo`CEtkXK*`L{CuKWp*4>yW^+
zztJz8Bp%*jYPs#YZ2tDyAM(;|)p&xLk1gMO{cc^micH0tHphP~xzP*>=NtYVwb1rV
z>^FUOg>U9WkH7=oA1bas@8WdN^_g*zX-DN*-3`AY_cgvz``6R7?u_z^EstG~bzV6g
z&=go|y*F`txG~c-rq5ivKijIDxb5t>wsw+0{e7AKzzc?I)%EdhaaCS%^Gu7vo!9&d
ze|+clkp;;;6Xdr}ei*&sV&&HV#uF2b-kJV7oj>8j`>elzl_EW7YQ{hLX(=}E`oX7i{d^{xlb;>UDPHP9_
znv_H0NgPIzkG-1jac%byKKAU}qXz9`dXJRK=P^3J(^7uurgqPW$!x~Nyj7F@Zn&)f
zJdtzzzG(+E-mSj&g6~Ln=1p@Rql4|)Qj1x`(?sv6%ZnH9c)e8HN3%3G_qeFU{)ZDP
z?1SPZ(lfih{5rkFeu5+GmhNx78AdZ6b<16kKL2~O_L(g=CcNZbXYlX6-jk@;_wSao
zZ;)>*TG>~79eTd)w?g_{O?j^1rxGnTh&6qeH(dc0T^-{#a($ET+F_+-J$m+%M7?_*m%5
z9G)$xB^u*##Gf!Rl^)vP5eEZbPyiaXAW1j7feKu$7+$Z)1eb$1%-*cxr
z{ZC_QyDKGpV6jTn9`%oVdt23}oldNqd$W2`!0Ag%+;?0~S(u_z+xem1w`X(xE_wTU
zrTyW0+-mxpR`TCobz(nH|9=;ra;v82Cc-PfPy-_vj0c#Nxd(@*~Y
zm{poru}0vATO89iHgmU>JI#WJW7W5ruWIk~
zWnYbNKk4@LyI3K9A@#z1my`#mI38}Ay(`G=^FEbqf98*UF$sSxC;k;`tvT^z;evg4
zEN{tQT%h&z)PgYKxqm)Q^PK-8-855+$277m>yz&y4dYyEmFOLojAAGB9~jy7f
zL~ullakwP}Y`v*w{r>N_W4qZs@0dR*mJEnhkBwIldT}sEq$j%jzF}Yc(q(f(8VWKu
z+c_TMmD%91tUtv3#q48U;SUc5ZZBC~yOBv}LZw;TY_9(3vQnzuho3bb62YD*+f2qAt}xC2J#S{J_)I&t;ucLK6Tg
Cd!TIq
literal 0
HcmV?d00001
diff --git a/docs/image/search.png b/docs/image/search.png
new file mode 100644
index 0000000000000000000000000000000000000000..f5d84b697dad0c856a822c2df0a0da46ee3e9be3
GIT binary patch
literal 12704
zcmeAS@N?(olHy`uVBq!ia0y~yV6iFfq_LO)7d$|)7e=epeR2r
zGbfdS!9uV#^nU*B5D~l1{GcUb_6ia1?OjLLhXzOQl$Kh1jLmcM(zjk>OJCm5Qh8!!
z-nmkm{r1aktNg1Q&Ds7iI^1OD_pnjqWlO5Q`R%|K&){~gRh}NzFOKjls=Z|meYm?U
zNj>;T%-3J1E$>@Cw|*XX+r>6MbL%Y0(2i-V*UdezGIjEDu_^O>yDn|M;>~Kl|?=
zncLa!e3toe*^Gs0HPiIkIYJc|kE`4IDcW=PUC??hx|U-Po6VjZY5Lm}|cKNNdtR>{g$mHsm}ncJ~ff|9l^
zKH&bs#YNdqOgHK3N-ygr0rQNe9NFt;W}|9!qNVll=|n>%|4TwScPlOXA0Kb&*(APK
zcTwO{>*MPS_MhAsVIO>x@sE7c<~Ih?>B37knBSQFhQs@y)j>X1uA*EkQLW3h8ec!}
z@h=S#v+@i0^v9uAqa*O#&G%Bj&i4Ono3+7P`-`&w1w)hQx55hS!WpIJm+Y2jXWPHw
zvpL1K`^UMr`?9l3{uF-hz1y98+-yVMv2BNb+*rR+_fKvRlXXH>*R+MFK9n8etWcJ<
zjbXg3%KJM1LF9#7LAN$8Ui#{1;{|24gZ3xv&Rp90@WQHpi~g<5TM@rP{K|dntQJY@
zWh%8=wc39*YSnA?|N3;5MD9}hs}ehP-$XrD%iZty&R4xry*@rs_-dWbKb`Vt&!0^;(i=o}#>-7!{$%fmH=N(j^8A(ED^bF=Im>rzweCk22@`%*wz+KA
zkA)mYeV`@B6r;(n-Y
zSjPPI-(+C}E2{^&IzFl=j33RlDhzY|!c{W+!r9n5w)=dGJXe=pGdm?3esle*^_rYD
zr*;^{UUhF5J!>L*{;7sp`HsDZx)-bLYgX!e;dt-&KG(9lJh|_pUE2R2vVI+w5xqjV
z_N~Cz{ZhBuKKRu8C@j-16JEZk@Yk?b_ULtQOje%wmQU(kALQ&NfOv
zH>Yst&Yk9tE7Y8?tYcijDX=>G!+(~X$~-2Qo#`87-FCiTbmy?Z;qs6F4?cVL%=Y#5
z_4x&x^`^P9#VJ-;yd^fcYwQjt-be*0M;l?mJBxBTcSh?ui_x#JJ1zz1<159AW6
zWp~6y?ksxxdtKO}Lnj&+ENmE3A#<#tO?O`YoC}$%0c1to&yd?*5fp68_xrMOtETq5Qd(&cU|)i>`O%
zD(~9+`oi14wX2?ftT9^9*?58L-l0}*^|Z9KbFIeDlqT;En;g6)!SUI5z71DON=mM*
ziQN3GKdL~GU9#Ym!wnYwxBq^>-!GkF+u@Vf7JTVYh1{lnZ#Vp2zB+8}FJ8Odhfgr(
zn$2(Az!CRrlB#!_;^b-xr}D)=^SIA3am@EAugv-S>Z)|(B5ezmH8Xis&Np0bGB15~
zWzC{Ri++EYa_GL(3pI6r{_`D28Cu>eJX8FaaeZB^|MlzFPcLBqf1;s^ZH>sDNs}hc
z@tmxt>*V%bU>nodI0FfVO?#DZ$k~^?2)KG}ZFDq`S?dMo0}Z)N(>vF_E>|qFcW^5Y
z<@mGwm`h5Hyu**Wo^|iI8eRo3_c)wzkY`&XXw$Q+PBhqi-V@thcK3K6tiJR3@RVs!
zC9c+*HoS^dm6Vvm_?XpS?&l#bmHx#G&$_3j@3C#JIz2&t;>(khW&9IEr?>y$n62o?
z&3T5W`K`}!k;%Ue6+SXaU7x-o@XZv9;F`w$PCwEt6ozd#?q**~7_X?=33-=+IW@npf$2*L3r6Ft0MUd3mT$#`07AMGvuy
zvEK|Ea@N1PvNHI7viNno`&nB();>5p*ZTYCiic<2I_~mDom5_TMY7?=+r!T%K=Ul_7OwDd_{dw&>OJ^H!S?3k}_;a;{t-w*b`L^iOif20$pP!ri|9(kz
zN4z=nEf)VU)1RzT2a+>5ZthyCY_(lNApY^AZ_@?#8Vc;Kci%Z@^K-GCI?LsmvvzIS
zw5Q6^@!(~Sf7QPfpV%)YwolhJ2v}57qgSK$(_s9?6<=$s#f0(
zw)*&U(!-NByH7B%9`#F?k!bePn<3;a6nv~fEx?qg!tP_lyagRTTK^_Vt>!$E!FFM<
zZ1>5N+mnhuZJsgbPUaRvmiOAsGv%&NldFt*Q`Z05a9PEjntZor+n)268EVDmr%&8E
z=jfI0dH#khvD*?)B(X4;%f2I6`N&GSMWqb$*+0BG#H_2U%Wjr)qktvFqSnGL_uHGBtd^FR
zn|^&3xnjtgTFduTJXu=MYEt3`9qIn^hjr#X+b%zQBKg7R!!*5Et@XY!vu#w2&o}&-
zb9kHVZLyB?)4IC4?ru1;{*1D0jrgK>L05Ed^W;pQeKO_Kio!rm_WS;-^=juiq?zY&
z%+t9ybN1}tY%K4MrwRX(le&F*hWxkaJ&Pam-ng~!$UUDu%qdpStnYEkp9p$2KeXwz
zu*8RhKc78&_AJG6C8(!!Y~N8EbZw#v?I
z*^^ctT~F%dUd?OsdB1jn
z!G^fKJUfIQO#EH8-dUli-qTF#|Fmn@uCZTR7rQ%r{p~yMVR3PF%5ihPu(-T0`|kaH
zyUULP{ddo6FJ6h}|F=nW-L06J6?5j#|G(p9Qu~<)7Tee_me#7pD1PYND%hy+y39_x
zx{m3gbhZ}1P`A+J1OIJIz-@s{l$
z>x?+1$t^#{6BU&H+&^A2Eh|P~m10#Z+a%?UKUE6ucb#3&`GD<`h~5d!*u4|)-t9lO
z;fl*CgHO9YJvi8$dfxtjO>^guzXy8CkJK6D+}N<(tw*Ae^^eWjeyh7{n8hEhUhX&d
zmt$@1-mA?1c|~c}k$t+W_F>NM~#k(%2Hz^AanQXk>di=n$pf{8F!yfwVXl{`B
zY9!kk*m?Dd?lVa=EIK%&`K7jc!NK40f9pbi^~cOmO=DayF?$-T+>}kJ=4+O)>lWxgujW|rbJ>Na
zgPrY$umAm@(R5v8js(Y#?~4{KGCOieRxRP!*PmVwY+D;8W;z|+Kf!3ilm}C%OnK5H
zXZy>NrT^E~YbkZI|E47=eLU~{D*F7{wu(Jb5fK`T@02U4$=v7vCX=y*DM9DRiqBn#
z+xd-8f9@_x{i-6mWU`uXRLg>$UNd=_A9UPEoXxs%wbTdY@*Srd3Up$)pRW^pFVF#%(%JpY}TJoEyWM*{!Kh6r)a3N
zQAUUBnw$u8CzsqKmA~wcjXqoAd~7S3J|C@{^5Ub-xmdQA>XO{6_lC~Q!Xs`1oteqcCLP<>vR~z}
zL(IX$zZlB1_eCvEoO@8`S7c3-lH~U4>NP){YLxbU+@|(?ske`Jj8IOP_vJplBgvT`aPYA4X5m8BISa2E^>D3w;=~ZO
z*Epr)hg;1O(S=909oZ39bL6QVb2FEm7)OA0P5+xj^J|+YKTrO-dYmWb#`}=K@!m2reQ(xKlvL^);>0UvH9BA-DT_bO*aaim+1IWFgab+LcbzS<=fop2aK;88#sLU
z^!fAtwu!5Ca!(Yp)`du`Jt{ob;1=(7#`}%+=8p84hYm0tY<}#$wefiE{OKEnxZ;Z%leOzMr{KQMaPuK_h!J>8@BAd3v
zU6o3dxH$QH=cn^dY+HVYCB@%rXbri%goF7n3xBvpsHW|QIhk2mmn;??XDDi9{J8eV
zjn+jm+D_5Z1!oP!t{ir-KX~}XOtXX4>$Yv%Hgn&m$&4R$S)N(?Udzm8p0#5m<7wA}
z(c5xvUiEmn{&I?l)L|>%ijJeTY+HUt+-lgu`dv4*Q%YioMumiF@YK7FbG~mlbs`V4
z>`j58(HC5LUPkC~$p!tKZ6et`{lK3vVY#G_eT=#Lu3Zz`lWbR`8ZTlqW8E{`MLX6P
z=bfEpn%{C>_TiR@8eO~al)baIE$9%|UhswE-WTKg-kq-J5D+DKY04=*{WCP9?d(ay)NqHp)1A<&OX0&tEGxvifM!UhXU8x
zYdG~ktcX?#61F!>y7;U(H}{a+eD=iP{s#}$-kLgw$gTCeb2@X)iWLvIs}@a6{%H4c
z=a0DV&RMrw#Qbs&TvV)O@2b*{pXz%_gf(X!y8PSVLN$NB)BM`TI@dP$gWOk`4~DKg
z`Tc;AqJ>(-=5U@R$+G`rEX>cZ=9;9teed46P1AKUr^&28`TdgGlH3R<-LoAA6Xs2v
zSlFs&78MnxQ87#Ak+N9szU$Y_YD!wShA!ooHp`hJ_PXHylFGwvyzW~bDDu@y3f%YR
z`4OG{=9bCU-WwV}y^VO5B&TxtO5WSeaGsTU(#Hj{$IBLLS4MPup1Rd07S(gC@ul0#
zSw?#WfB*z
znE8B|%PDdBVyna|R*gKN;163Yloe!VB{>A&<~SjHE%Y?cd8_HOas`ZSHve5NTYG+S
z>Mchhc}WH4lmonMOT2GCb92m_(x}OK_>M+<>WtG3U^CBrU7`2n($d_kOq~6n0`MET
zcNGtREJs?!E#+g$HM5c$B)6dTfRj$~v>-o8Pw!057#bq`zvmN;^#LVaS^~n@&alI8U|5hX=
zaBxrk`XR*9R9!vYi{r1u?##rwvBD;Jb2&YnG6Z8Ed_cg6PXL(V$)
zj2qtgU3K+~p8eq-^TQPj-9KDgAAi3=J8H4gz)Ya+zGrwoT%UyTiFNSpGld7T24zj+MW#;&j80sG4`Vx}Hr9GQI~nd
zC8d4emX)wC&C2HH^Le0Y2r3s}1nm)eJYzvwec8!Lszv(!^&RnrUH)GN9
z3>|US{HLd;zE_@FA3fQWV^8I*4+7o4c``n4+`^d2{Vw{Hkf}jI;0G2Sx8>V17_N3R
z_CB1qX_JxZY1Xfg9xb=#>Bv8N{N0pieww##HCTsjoD#?Oi&L)2fA)i?PoF=pUoEa<
z|2D~?rhCTe%PCX0nJws)mfrA1c+an81^*ALRjTIl0OeY7K7A6~seO&n?Y%;IV?@MeZiArMSpn7QH
zqR`T8R^hm1pE`D@ZQim#GT>Ek=|=f2^K(|$H#|^W8~(f`rgDGb|G(e;H~0S8a7%fg
z$o#C$@yTzpAD<|(VP;vsa^=hNf|}iChYhNZ>G;nMmU(pXg?DFVXKlOMM-yiW35AM?
zzfe3$-Y>(jp%n;zTqJ*<6w+lr>^7cP8IVsf}#6lgo|VD0>%H9gkW
zHF=v3CxIIhrpOJ6J-c@83S&9w_I-8n(j)WF%&`o}LEp^T)aMzb378&t9XR%-rwW
z)9Cnq=>qN|4#%q8B-fwiB5qf#3Pa~@tNQxt?!T+2X3a5b5Dk37YHKavE$Mgq!z-I3
zm#jraMJMmkn*a1wl0sUWcw^*Z?sw`LOCBy@44pn@%9D&E?mqL46zqiJGevfDcuh6@
zr`i1HnHqC5SDd?h`>g~AX016km7mVvQE5)ydA{L?N6pi^lkcXiusn8mUx}>WIA=7nSZcdrtM3eqMZjM}CanwYQH#j&HktY||b^=SN)kR)wyvYt~+P
zYrDn6e*toFOq&HS%e7rvXeA*K-{F76+)9AgMbS`qqwNRrcN=Fm?r36vyxVZn*BNO-
z7dCWpadE9`EW8kye%36aMc21R(e7eSu*$N~wSQO4)Q{evswMC;;^8A*mX9fC+a9m_
z%d+kkf5x#4YqKLK_bd4ATYuB<$jQhfCp8j6wtKXt-OD*J&7)1d>`~K=ugP!OyqypC
ze%gPv?{Zkpp}l1rh2J$6-q@6S`r6~{Wo!2>h`lIzqGMn6gE*Fx`!*&YKX?53hsOP{
zZZ=ClEf*0JGkbGqXYq8okZ;NdxsG)g+<(W}th2Z7)|Slq_ctaVU*EX%w8EX1Sxn5F
z-1j~{KEAuFtLv7c#(kfKcKiMI3P*f*{BrNh>O%(CnK%BP-_c#VLqhFV@&zYxSO0GH
znnM#eJm8$SXV0F!i`{yodJgQnqh8aus?%gowL;Z<u7I^sI}!xmotUT`@6NpQqG$-CSd-p6
z*l5t|GF}J$7n=I|`vc=9@ybuD3f!lfx~V#QhjOf-&BKI;hgySEMEGYOOy_y-GOcZ5
z=_Rv;AMLwRTgqnSolp2-xHm(}B~DGCo_k-ht{mIy%OCD*RIyoKxXR%EcqhM7V6uTc
z^8#m{xL0r9)NI+bspxluJny~6b+37P_SiAi*B(wVZff$o$ldi*@X+nZOeY+1Q&+qOvA11t~A#^uQ_15s4}C#|7TvHgQ(JD>-JUK9U0;s
z#kMY8v?$5^-}h|Q*qID*96U<}cH9nJpHi~wx(?3?-?&iki=Vq9r=R}n^MOTuSCDo=
za?Q@uGkP`n9$n_RxU!u=?!fcLZ{NNl23pxH-m)z}JI{8v0;p*h7IsYpG18jIV)(6T
z$qUH`(f+Lb-%j5?SJ!#0qMtG52a}-ERUSJ&XO7t)D#iZKcMdBPQ$CpfG}z(6_QV|l
zJd^!piY@yj+wOn*Xvz5h`7fp^Q!Nr37CmncbPmr3)V)?_b|tvbDyfH*{j7
zgT#UttWMQQQcf>_|GmmH{B;e|h(~zfpoA^O-MGEU$+j6u$k@j-2rnoXatT@WxdR{wCcFODQ>D%<}_6RKF2-Z*eGVSi|eMdg*Udywgdi8%~CQ^E4q>*N=MR8^k*!(EU0{>d=0Wfgiq
zpD*xUIpy%$xiv@rKi#ptmht}i$B*jy?w_A$U;poJ`uy5$j5QXuTIwtzYWYbIn$#ye
zmF1c-=MU4I+UiegA9#!s)R|`-E0vojd*GYcw(A@B_M~rlYW-ivXo1rQmfbcJ0|Np+
zn5?U+;W@j|xH3vZ!lKLPLu$k>&eetgrR}Vp6SsQ1trFbRVf!+oz~Nq_)G1c>m`|GB
zoSe)8`@Sb;U440Zx%S1swo*cygN=e`Klm!qytMDxNcf^(5Ox^n8QJnn_&OcLmCNL&4EKBCFc+H2-rMi`TjK}^?vV-p8A{H&)bEC%1S+q%h_D@-t^%5dd3D3
z+x|T&;-WeAy!*6mR~=fBbhRu~KXv22eQ~>XWN*B6svw2s@`v4qNwq6=760z%7S0Mc
zF*B>%y=>XD<~Y6w*S9b8o2#YtBYejUN#XvzKepC4UCzlVU)*gi7IU33f5q+{Ze47<
zc3i&TFt6o{&F?BiDUN+?!YRD*{EqyB#V;z~yZm^*dw$_t
zOJ83TTmIC=x_^;)uW0%AR^KmcME2a9aG<1Jhv)eD-jtfj)!#oGm$F?5;PY~8zxl^>
z#=8sisyZ)vFL>el{OH-ei9)ukS=ajqoY2zQtWd-MSuS2aOs2;5@eS^U)jYA+do66=
zomkzh#Wu(3qO?QjYwJTwRf&Ro?lE{C4w<(5uq)*Z{
zzw9cfE)u`*zEVz*?IQQ=2eCbzJ+J)EoH;Y6TlUh^z26@3|0$Ztm{RnKCyh7k{)&Su
zUd!wM6SyGWHShb8+j>49nR9rot|(r(Zfat(Cn7xj
z`mJ`c(s<3Pd%KT>U0nR&Xvf@5n>IcC`SWLd^NXpECIqn@fGi`hs1!<)e{-wpee|qZ
zv+Ba5qpPjhM77F;zw9aR?p>7b%KYu#SLe19$~iB-O;h0TQWRS%u>bX+71!5VDdglc
z{}xNQ-}LU)wG{cEMcnPPp9XxnlVV&Ixvf)6va>{H*8n*|U2&
z51C6URq%GrYe?A1_TT@&wC72o&H?WvbJ_#n?bi5iaO7?5pZX0ucUGSN_4V~r)^iJg
zf>M3fk!hmbd;uT!^iQ29Rp4(RKJ%LB;Wl3B)-xZtI38*IDX_HLEaxDa{}E
z^4^brD(rNvE%y0`N}=cVHQ(OcoNVzw`A%{6wB(=PIhjRl-zy(vySVs4rM&u@gX(M=
zRriE*cfAPwu%}<}+5=^f{7JLOFB%p1juY%eKGb|!2}&hDC0N#IS+HGTXlDzrw#dGwQ6;jc;8@a&HODv}wO){1dmtfq
zk^8}50g;vmw#*Sh-A&JJ&jw~+P^l8xvqJBY-))Hl3s_n89hPSa+H%D;I38G4n|ffy
zbdjH@di?ty^09qR--+>{rAAKr8+M;UW4OYB(ifcH@UeS22LDiNFg
zd(Zr0N@n1Fv-N;h`q4ni57D47xO-r(nNdUew}0&K9+%$En0?ahr)HIi&1B`)8{{hVK!82=u472{84^F}?`ME{uA73a)6oB0A
zSTV6QE8#)AfUTb7(u2Z<20JvXBnw|XI-hdDi|y6x*XMob+x;~*$ZMO*7L_LAl5est
zUrbc=Z`Sj3bDz(hb)4tCX0grr3O2uaHa{&k?U{T`T1bfb&WSG?6^fieKd<
zQ;zZIOKz)JGnFSHuu(O`K|V5b&QdqavtKkSrm?Y{^_s&N8N%SM@ArpCZe?R*$BVrt
z#m~;{arsy<#Vl}H#hj}=30J2#{+pG)x{_qF
z==GkpolAG0Wcc%y^~}ZB2W0l>NH
z4rz6l&zj%=^J!h|ZnixYb0y~~`l*~rkVsf2&hvidm9BNUQE6$<^aGAD)F!u0=h|#z
zF2ZAQ+4%g~6DN*~iHYrN54?T1_9B14fqnL$tR)qg=NlaGIlsrlVVOF&^OwsOX%)|Y
zPV8V#YM2@4aKw6zSmZs8l*;M}Pxs!8cCr8Z`tC`8BL}uc#s_@#t@NY5E1j-hp>M_&
z7jO1sE|1Cq23LK?NmFE)4*pK6to+%#w?Ly}ug{0cJSqnnT=h9OG1-}@tEZRgvv9@f
z3;$7J_B3+1=sjse1K;sId#VFV&nF!h+0!uRK-SxYhDFQo_e<=Vu_5Q?rk71qnwH;>
zcUduqv1?utJ7ZjUc=*Z%OCG%ZE-EN>fWg&&@8mq;77?4TbxIDw5({3u{3^0*YdqsF
zo_$+=*7tXu31Hh`bMa}!#>ITSITyCxHMj~Cm3Ay4c5*U5CJON)G6+by9Sh1z2={eg(
zoo1dTrx;xIL)jkBpFeS8;e^x9N1u1PPhh++@!(R>y@1{~>;C@u`1t3WOI3&Uy;Yg}
zBodZA@7U(zcWYzi=V#m^dt6pLGE6z(&ZbfIZgMYUcW#gt>-pNeNF_;+nT%a=r$oMK
zGsNCnyQ#V9dcW8|XSOc}4i}4$iwo?&e7sM#+SP0EgPn&py%m|~fy7&{#b3R8b*q=B
zh)wv96vdPS)@&M8D+_O5y!g>4pL5Q%OQ%`vPc{^>S){5~vM;o*Ub1LWlG3?1Q#Q|h
zsCr)UyaID0D1i#TwLctbo1~r|{6VJh#N-nW20Q^@gr3XZyu0$*vu9Up&o6lJHMRNv
z$p%J{c-f_{S+iz+uI*n26;e@a4tD`7u=@tnY)|e%MPIv@mwX<+zuY
zmHp#gwrI}IFC2ZB;!bh=S7&ZBJaF;$Kfc3zcmF?f;!XI5?YsZ$%WT;(h5w&FTTgPs
z%zMlAoWr-V-n<+1MpB`yNM!ex`9(+bQw~J1X;jVM!PoTNAvE;rzKFh*>1JZacl_CS
zQWVbIjqbQxygF>Hmh_q2GauNJ+xJgoJS@Rcxa|A0mBGu!ju(f!?P2}_%9Uw`8|wf6
z+tw+pe(l+_XZPC7OGRh2+Es3mSdw8;`|HbFY4f~48uxCB?5W`SSZ*(Taqjt
z9Uc8XVt?J=g)Vno4tlq!$~m*~q%7!vaktCoy%e*rgvh22S+|t^k+HFRvoA3J{^N1*
zwKLoPNsPB81TJQ0W>#)nupoiU<$YE3o5^`O)z#H6XPIUTiCJ%)+m!Cja)HlCpt(_4
z-LK@@_3QTWAt5G4wzhw}4f%}I%#C*ceSUtve&qJNyVfV0mOW5CEzz&eoMv=kZ}IbU
zyAB;X#FkQ3-=urm#aN+izfIAT6Y)0x|9n=T^WeFSjry98GDZmo%-mu+Kb*?SzUeDg
zna@aKYk9}C?fv748&8E87$5d-wVmh9#*>op{oP%4gWS|yKR-V+mnUKz^Rr|bj^&E$
z#q5x77S>fOtHkOanIBu6fZun`DdtPo)@n#%hEdH>lXcA__o=UkGrp~4(~ouYN4xt^YcIHckBP0I`RDF
R7X}6f22WQ%mvv4FO#nljU3&lk
literal 0
HcmV?d00001
diff --git a/docs/index.html b/docs/index.html
new file mode 100644
index 0000000..cf81ba5
--- /dev/null
+++ b/docs/index.html
@@ -0,0 +1,138 @@
+
+
+
+
+
+ API Document
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+JSON API Store
+
JSON API Store (JAS) is browser store that implements the JSON API specification (version 1.0).
+
Example Usage
+
At the moment you need to do your own AJAX requests, but JAS will store you data and maintain the relationships.
+
+// Define the "categories" type.
+Store.type["categories"] = {
+ title: Store.attr(),
+ products: Store.hasMany({ inverse: "category" })
+};
+
+// Define the "products" type.
+Store.type["products"] = {
+ title: Store.attr(),
+ category: Store.hasOne()
+};
+
+// Create a new store instance.
+var store = new Store();
+
+// Add data - this can just be the response from a GET request to your API.
+store.push({
+ "data": {
+ "type": "products",
+ "id": "1",
+ "attributes": {
+ "title": "Example Book"
+ },
+ "relationships": {
+ "category": {
+ "data": {
+ "type": "categories",
+ "id": "1"
+ }
+ }
+ }
+ },
+ "included": [
+ {
+ "type": "categories",
+ "id": "1",
+ "attributes": {
+ "title": "Books"
+ }
+ }
+ ]
+});
+
+// Get the product from the store.
+var product = store.find("products", "1");
+// Get the category from the store.
+var category = store.find("categories", "1");
+
+product.title; // "Example Book"
+category.title; // "Books"
+
+product.category === category; // true
+category.products[0] === product; // true
+
+
Tests
+
You can run tests once-off with NPM:
+
npm test
+Alternatively, you can run tests in watch mode using nodemon :
+
nodemon node_modules/jasmine/bin/jasmine.js
+Roadmap
+
+documentation
+create, read, update & destroy AJAX methods
+event listeners for listening to changes
+type definitions using classes (aka, models)
+simple support for pluralisations/pseudonyms
+maybe a way to query the local data
+support for links & pagination
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/script/inherited-summary.js b/docs/script/inherited-summary.js
new file mode 100644
index 0000000..0a35b6d
--- /dev/null
+++ b/docs/script/inherited-summary.js
@@ -0,0 +1,28 @@
+(function(){
+ function toggle(ev) {
+ var button = ev.target;
+ var parent = ev.target.parentElement;
+ while(parent) {
+ if (parent.tagName === 'TABLE' && parent.classList.contains('summary')) break;
+ parent = parent.parentElement;
+ }
+
+ if (!parent) return;
+
+ var tbody = parent.querySelector('tbody');
+ if (button.classList.contains('opened')) {
+ button.classList.remove('opened');
+ button.classList.add('closed');
+ tbody.style.display = 'none';
+ } else {
+ button.classList.remove('closed');
+ button.classList.add('opened');
+ tbody.style.display = 'block';
+ }
+ }
+
+ var buttons = document.querySelectorAll('.inherited-summary thead .toggle');
+ for (var i = 0; i < buttons.length; i++) {
+ buttons[i].addEventListener('click', toggle);
+ }
+})();
diff --git a/docs/script/inner-link.js b/docs/script/inner-link.js
new file mode 100644
index 0000000..7762cb2
--- /dev/null
+++ b/docs/script/inner-link.js
@@ -0,0 +1,18 @@
+// inner link(#foo) can not correctly scroll, because page has fixed header,
+// so, I manually scroll.
+(function(){
+ function adjust() {
+ window.scrollBy(0, -55);
+ var el = document.querySelector('.inner-link-active');
+ if (el) el.classList.remove('inner-link-active');
+
+ var el = document.querySelector(location.hash);
+ if (el) el.classList.add('inner-link-active');
+ }
+
+ window.addEventListener('hashchange', adjust);
+
+ if (location.hash) {
+ setTimeout(adjust, 0);
+ }
+})();
diff --git a/docs/script/patch-for-local.js b/docs/script/patch-for-local.js
new file mode 100644
index 0000000..5756d13
--- /dev/null
+++ b/docs/script/patch-for-local.js
@@ -0,0 +1,8 @@
+(function(){
+ if (location.protocol === 'file:') {
+ var elms = document.querySelectorAll('a[href="./"]');
+ for (var i = 0; i < elms.length; i++) {
+ elms[i].href = './index.html';
+ }
+ }
+})();
diff --git a/docs/script/prettify/Apache-License-2.0.txt b/docs/script/prettify/Apache-License-2.0.txt
new file mode 100644
index 0000000..d645695
--- /dev/null
+++ b/docs/script/prettify/Apache-License-2.0.txt
@@ -0,0 +1,202 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/docs/script/prettify/prettify.js b/docs/script/prettify/prettify.js
new file mode 100644
index 0000000..eef5ad7
--- /dev/null
+++ b/docs/script/prettify/prettify.js
@@ -0,0 +1,28 @@
+var q=null;window.PR_SHOULD_USE_CONTINUATION=!0;
+(function(){function L(a){function m(a){var f=a.charCodeAt(0);if(f!==92)return f;var b=a.charAt(1);return(f=r[b])?f:"0"<=b&&b<="7"?parseInt(a.substring(1),8):b==="u"||b==="x"?parseInt(a.substring(2),16):a.charCodeAt(1)}function e(a){if(a<32)return(a<16?"\\x0":"\\x")+a.toString(16);a=String.fromCharCode(a);if(a==="\\"||a==="-"||a==="["||a==="]")a="\\"+a;return a}function h(a){for(var f=a.substring(1,a.length-1).match(/\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g),a=
+[],b=[],o=f[0]==="^",c=o?1:0,i=f.length;c122||(d<65||j>90||b.push([Math.max(65,j)|32,Math.min(d,90)|32]),d<97||j>122||b.push([Math.max(97,j)&-33,Math.min(d,122)&-33]))}}b.sort(function(a,f){return a[0]-f[0]||f[1]-a[1]});f=[];j=[NaN,NaN];for(c=0;ci[0]&&(i[1]+1>i[0]&&b.push("-"),b.push(e(i[1])));b.push("]");return b.join("")}function y(a){for(var f=a.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g),b=f.length,d=[],c=0,i=0;c=2&&a==="["?f[c]=h(j):a!=="\\"&&(f[c]=j.replace(/[A-Za-z]/g,function(a){a=a.charCodeAt(0);return"["+String.fromCharCode(a&-33,a|32)+"]"}));return f.join("")}for(var t=0,s=!1,l=!1,p=0,d=a.length;p=5&&"lang-"===b.substring(0,5))&&!(o&&typeof o[1]==="string"))c=!1,b="src";c||(r[f]=b)}i=d;d+=f.length;if(c){c=o[1];var j=f.indexOf(c),k=j+c.length;o[2]&&(k=f.length-o[2].length,j=k-c.length);b=b.substring(5);B(l+i,f.substring(0,j),e,p);B(l+i+j,c,C(b,c),p);B(l+i+k,f.substring(k),e,p)}else p.push(l+i,b)}a.e=p}var h={},y;(function(){for(var e=a.concat(m),
+l=[],p={},d=0,g=e.length;d=0;)h[n.charAt(k)]=r;r=r[1];n=""+r;p.hasOwnProperty(n)||(l.push(r),p[n]=q)}l.push(/[\S\s]/);y=L(l)})();var t=m.length;return e}function u(a){var m=[],e=[];a.tripleQuotedStrings?m.push(["str",/^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/,q,"'\""]):a.multiLineStrings?m.push(["str",/^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/,
+q,"'\"`"]):m.push(["str",/^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,q,"\"'"]);a.verbatimStrings&&e.push(["str",/^@"(?:[^"]|"")*(?:"|$)/,q]);var h=a.hashComments;h&&(a.cStyleComments?(h>1?m.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,q,"#"]):m.push(["com",/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\n\r]*)/,q,"#"]),e.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,q])):m.push(["com",/^#[^\n\r]*/,
+q,"#"]));a.cStyleComments&&(e.push(["com",/^\/\/[^\n\r]*/,q]),e.push(["com",/^\/\*[\S\s]*?(?:\*\/|$)/,q]));a.regexLiterals&&e.push(["lang-regex",/^(?:^^\.?|[!+-]|!=|!==|#|%|%=|&|&&|&&=|&=|\(|\*|\*=|\+=|,|-=|->|\/|\/=|:|::|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|[?@[^]|\^=|\^\^|\^\^=|{|\||\|=|\|\||\|\|=|~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\s*(\/(?=[^*/])(?:[^/[\\]|\\[\S\s]|\[(?:[^\\\]]|\\[\S\s])*(?:]|$))+\/)/]);(h=a.types)&&e.push(["typ",h]);a=(""+a.keywords).replace(/^ | $/g,
+"");a.length&&e.push(["kwd",RegExp("^(?:"+a.replace(/[\s,]+/g,"|")+")\\b"),q]);m.push(["pln",/^\s+/,q," \r\n\t\xa0"]);e.push(["lit",/^@[$_a-z][\w$@]*/i,q],["typ",/^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,q],["pln",/^[$_a-z][\w$@]*/i,q],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,q,"0123456789"],["pln",/^\\[\S\s]?/,q],["pun",/^.[^\s\w"-$'./@\\`]*/,q]);return x(m,e)}function D(a,m){function e(a){switch(a.nodeType){case 1:if(k.test(a.className))break;if("BR"===a.nodeName)h(a),
+a.parentNode&&a.parentNode.removeChild(a);else for(a=a.firstChild;a;a=a.nextSibling)e(a);break;case 3:case 4:if(p){var b=a.nodeValue,d=b.match(t);if(d){var c=b.substring(0,d.index);a.nodeValue=c;(b=b.substring(d.index+d[0].length))&&a.parentNode.insertBefore(s.createTextNode(b),a.nextSibling);h(a);c||a.parentNode.removeChild(a)}}}}function h(a){function b(a,d){var e=d?a.cloneNode(!1):a,f=a.parentNode;if(f){var f=b(f,1),g=a.nextSibling;f.appendChild(e);for(var h=g;h;h=g)g=h.nextSibling,f.appendChild(h)}return e}
+for(;!a.nextSibling;)if(a=a.parentNode,!a)return;for(var a=b(a.nextSibling,0),e;(e=a.parentNode)&&e.nodeType===1;)a=e;d.push(a)}var k=/(?:^|\s)nocode(?:\s|$)/,t=/\r\n?|\n/,s=a.ownerDocument,l;a.currentStyle?l=a.currentStyle.whiteSpace:window.getComputedStyle&&(l=s.defaultView.getComputedStyle(a,q).getPropertyValue("white-space"));var p=l&&"pre"===l.substring(0,3);for(l=s.createElement("LI");a.firstChild;)l.appendChild(a.firstChild);for(var d=[l],g=0;g=0;){var h=m[e];A.hasOwnProperty(h)?window.console&&console.warn("cannot override language handler %s",h):A[h]=a}}function C(a,m){if(!a||!A.hasOwnProperty(a))a=/^\s*=o&&(h+=2);e>=c&&(a+=2)}}catch(w){"console"in window&&console.log(w&&w.stack?w.stack:w)}}var v=["break,continue,do,else,for,if,return,while"],w=[[v,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],
+"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],F=[w,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],G=[w,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"],
+H=[G,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"],w=[w,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],I=[v,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],
+J=[v,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],v=[v,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],K=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/,N=/\S/,O=u({keywords:[F,H,w,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END"+
+I,J,v],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),A={};k(O,["default-code"]);k(x([],[["pln",/^[^]+/],["dec",/^]*(?:>|$)/],["com",/^<\!--[\S\s]*?(?:--\>|$)/],["lang-",/^<\?([\S\s]+?)(?:\?>|$)/],["lang-",/^<%([\S\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\S\s]+?)<\/xmp\b[^>]*>/i],["lang-js",/^
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Source 7/9
+
+
+
+
+ File
+ Identifier
+ Document
+ Size
+ Lines
+ Updated
+
+
+
+
+
+ src/store.js
+ Store
+ 77 % 7/9
+ 10940 byte
+ 304
+ 2015-08-06 08:07:42 (UTC)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+