diff --git a/dist/store.v0.3.1.js b/dist/store.v0.3.1.js
new file mode 100644
index 0000000..c912ba1
--- /dev/null
+++ b/dist/store.v0.3.1.js
@@ -0,0 +1 @@
+(function(global,factory){if(typeof define === "function" && define.amd){define("Store",["exports","module","array.prototype.find"],factory);}else if(typeof exports !== "undefined" && typeof module !== "undefined"){factory(exports,module,require("array.prototype.find"));}else {var mod={exports:{}};factory(mod.exports,mod,global.arrayPrototype);global.Store = mod.exports;}})(this,function(exports,module,_arrayPrototypeFind){"use strict";var _createClass=(function(){function defineProperties(target,props){for(var i=0;i < props.length;i++) {var descriptor=props[i];descriptor.enumerable = descriptor.enumerable || false;descriptor.configurable = true;if("value" in descriptor)descriptor.writable = true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};})();function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}var Store=(function(){_createClass(Store,null,[{key:"attr",value:function attr(name,options){if(name && typeof name === 'object'){return Store.attr(null,name);}else {return {type:"attr","default":options && options["default"],deserialize:function deserialize(data,key){return data.attributes && data.attributes[name || key];}};}}},{key:"hasOne",value:function hasOne(name,options){if(name && typeof name === 'object'){return Store.hasOne(null,name);}else {return {type:"has-one",inverse:options && options.inverse,deserialize:function deserialize(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);}}}};}}},{key:"hasMany",value:function 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 deserialize(data,key){var _this=this;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(function(c){return _this.find(c.type,c.id);});}}}};}}}]);function Store(){_classCallCheck(this,Store);this._data = {};this._types = {};}_createClass(Store,[{key:"add",value:function add(object){var _this2=this;if(object){if(object.type && object.id){(function(){var resource=_this2.find(object.type,object.id);var definition=_this2._types[object.type];Object.keys(definition).forEach(function(fieldName){if(fieldName[0] !== "_"){_this2._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");}}},{key:"define",value:function define(names,definition){var _this3=this;names = names.constructor === Array?names:[names];definition._names = names;names.forEach(function(name){if(!_this3._types[name]){_this3._types[name] = definition;}else {throw new Error("The type '" + name + "' has already been defined.");}});}},{key:"find",value:function find(type,id){var _this4=this;if(type){var _ret2=(function(){var definition=_this4._types[type];if(definition){if(!_this4._data[type]){(function(){var collection={};definition._names.forEach(function(t){return _this4._data[t] = collection;});})();}if(id){if(!_this4._data[type][id]){_this4._data[type][id] = {_dependents:[],type:type,id:id};Object.keys(definition).forEach(function(key){if(key[0] !== "_"){_this4._data[type][id][key] = definition[key]["default"];}});}return {v:_this4._data[type][id]};}else {return {v:Object.keys(_this4._data[type]).map(function(x){return _this4._data[type][x];})};}}else {throw new TypeError("Unknown type '" + type + "'");}})();if(typeof _ret2 === "object")return _ret2.v;}else {throw new TypeError("You must provide a type");}}},{key:"push",value:function push(root){var _this5=this;if(root.data.constructor === Array){root.data.forEach(function(x){return _this5.add(x);});}else {this.add(root.data);}if(root.included){root.included.forEach(function(x){return _this5.add(x);});}}},{key:"remove",value:function remove(type,id){var _this6=this;if(type){if(this._types[type]){if(id){var resource=this._data[type][id];if(resource){this._remove(resource);}}else {Object.keys(this._data[type]).forEach(function(id){return _this6.remove(type,id);});}}else {throw new TypeError("Unknown type '" + type + "'");}}else {throw new TypeError("You must provide a type to remove");}}},{key:"_addField",value:function _addField(object,resource,definition,fieldName){var _this7=this;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(function(r){if(resource[fieldName].indexOf(r) !== -1){_this7._removeInverseRelationship(resource,fieldName,r,field);}});newValue.forEach(function(r){_this7._addInverseRelationship(resource,fieldName,r,field);});}resource[fieldName] = newValue;}}},{key:"_addInverseRelationship",value:function _addInverseRelationship(sourceResource,sourceFieldName,targetResource,sourceField){var targetDefinition=this._types[targetResource.type];var sourceDefinition=this._types[sourceResource.type];if(targetDefinition){var targetFieldName=[sourceField.inverse].concat(sourceDefinition._names).find(function(x){return targetDefinition[x];});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 + "')");}}}},{key:"_remove",value:function _remove(resource){var _this8=this;resource._dependents.forEach(function(dependent){var dependentResource=_this8._data[dependent.type][dependent.id];switch(_this8._types[dependent.type][dependent.fieldName].type){case "has-one":{dependentResource[dependent.fieldName] = null;break;}case "has-many":{var index=dependentResource[dependent.fieldName].indexOf(resource);if(index !== -1){dependentResource[dependent.fieldName].splice(index,1);}break;}default:{break;}}dependentResource._dependents = dependentResource._dependents.filter(function(d){return !(d.type === resource.type && d.id === resource.id);});});delete this._data[resource.type][resource.id];}},{key:"_removeInverseRelationship",value:function _removeInverseRelationship(sourceResource,sourceFieldName,targetResource,sourceField){var targetDefinition=this._types[targetResource.type];var targetFieldName=sourceField.inverse || sourceResource.type;var targetField=targetDefinition && targetDefinition[targetFieldName];targetResource._dependents = targetResource._dependents.filter(function(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(function(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(function(r){return !(r.type === targetResource.type && r.id === targetResource.id && r.fieldName === targetFieldName);});targetResource[targetFieldName] = targetResource[targetFieldName].filter(function(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 + "')");}}}]);return Store;})();module.exports = Store;});
diff --git a/docs/v0.3.1/ast/source/src/store.js.json b/docs/v0.3.1/ast/source/src/store.js.json
new file mode 100644
index 0000000..fb62a4f
--- /dev/null
+++ b/docs/v0.3.1/ast/source/src/store.js.json
@@ -0,0 +1,25985 @@
+{
+ "type": "Program",
+ "body": [
+ {
+ "type": "ImportDeclaration",
+ "specifiers": [],
+ "source": {
+ "type": "Literal",
+ "value": "array.prototype.find",
+ "raw": "\"array.prototype.find\"",
+ "range": [
+ 7,
+ 29
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 7
+ },
+ "end": {
+ "line": 1,
+ "column": 29
+ }
+ }
+ },
+ "range": [
+ 0,
+ 30
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 30
+ }
+ }
+ },
+ {
+ "type": "ExportDefaultDeclaration",
+ "declaration": {
+ "type": "ClassDeclaration",
+ "id": {
+ "type": "Identifier",
+ "name": "Store",
+ "range": [
+ 53,
+ 58
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 21
+ },
+ "end": {
+ "line": 3,
+ "column": 26
+ }
+ }
+ },
+ "superClass": null,
+ "body": {
+ "type": "ClassBody",
+ "body": [
+ {
+ "type": "MethodDefinition",
+ "key": {
+ "type": "Identifier",
+ "name": "attr",
+ "range": [
+ 396,
+ 400
+ ],
+ "loc": {
+ "start": {
+ "line": 14,
+ "column": 9
+ },
+ "end": {
+ "line": 14,
+ "column": 13
+ }
+ }
+ },
+ "value": {
+ "type": "FunctionExpression",
+ "id": null,
+ "params": [
+ {
+ "type": "Identifier",
+ "name": "name",
+ "range": [
+ 401,
+ 405
+ ],
+ "loc": {
+ "start": {
+ "line": 14,
+ "column": 14
+ },
+ "end": {
+ "line": 14,
+ "column": 18
+ }
+ }
+ },
+ {
+ "type": "Identifier",
+ "name": "options",
+ "range": [
+ 407,
+ 414
+ ],
+ "loc": {
+ "start": {
+ "line": 14,
+ "column": 20
+ },
+ "end": {
+ "line": 14,
+ "column": 27
+ }
+ }
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "IfStatement",
+ "test": {
+ "type": "LogicalExpression",
+ "operator": "&&",
+ "left": {
+ "type": "Identifier",
+ "name": "name",
+ "range": [
+ 426,
+ 430
+ ],
+ "loc": {
+ "start": {
+ "line": 15,
+ "column": 8
+ },
+ "end": {
+ "line": 15,
+ "column": 12
+ }
+ }
+ },
+ "right": {
+ "type": "BinaryExpression",
+ "operator": "===",
+ "left": {
+ "type": "UnaryExpression",
+ "operator": "typeof",
+ "argument": {
+ "type": "Identifier",
+ "name": "name",
+ "range": [
+ 441,
+ 445
+ ],
+ "loc": {
+ "start": {
+ "line": 15,
+ "column": 23
+ },
+ "end": {
+ "line": 15,
+ "column": 27
+ }
+ }
+ },
+ "prefix": true,
+ "range": [
+ 434,
+ 445
+ ],
+ "loc": {
+ "start": {
+ "line": 15,
+ "column": 16
+ },
+ "end": {
+ "line": 15,
+ "column": 27
+ }
+ }
+ },
+ "right": {
+ "type": "Literal",
+ "value": "object",
+ "raw": "'object'",
+ "range": [
+ 450,
+ 458
+ ],
+ "loc": {
+ "start": {
+ "line": 15,
+ "column": 32
+ },
+ "end": {
+ "line": 15,
+ "column": 40
+ }
+ }
+ },
+ "range": [
+ 434,
+ 458
+ ],
+ "loc": {
+ "start": {
+ "line": 15,
+ "column": 16
+ },
+ "end": {
+ "line": 15,
+ "column": 40
+ }
+ }
+ },
+ "range": [
+ 426,
+ 458
+ ],
+ "loc": {
+ "start": {
+ "line": 15,
+ "column": 8
+ },
+ "end": {
+ "line": 15,
+ "column": 40
+ }
+ }
+ },
+ "consequent": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "ReturnStatement",
+ "argument": {
+ "type": "CallExpression",
+ "callee": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "Store",
+ "range": [
+ 475,
+ 480
+ ],
+ "loc": {
+ "start": {
+ "line": 16,
+ "column": 13
+ },
+ "end": {
+ "line": 16,
+ "column": 18
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "attr",
+ "range": [
+ 481,
+ 485
+ ],
+ "loc": {
+ "start": {
+ "line": 16,
+ "column": 19
+ },
+ "end": {
+ "line": 16,
+ "column": 23
+ }
+ }
+ },
+ "range": [
+ 475,
+ 485
+ ],
+ "loc": {
+ "start": {
+ "line": 16,
+ "column": 13
+ },
+ "end": {
+ "line": 16,
+ "column": 23
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "Literal",
+ "value": null,
+ "raw": "null",
+ "range": [
+ 486,
+ 490
+ ],
+ "loc": {
+ "start": {
+ "line": 16,
+ "column": 24
+ },
+ "end": {
+ "line": 16,
+ "column": 28
+ }
+ }
+ },
+ {
+ "type": "Identifier",
+ "name": "name",
+ "range": [
+ 492,
+ 496
+ ],
+ "loc": {
+ "start": {
+ "line": 16,
+ "column": 30
+ },
+ "end": {
+ "line": 16,
+ "column": 34
+ }
+ }
+ }
+ ],
+ "range": [
+ 475,
+ 497
+ ],
+ "loc": {
+ "start": {
+ "line": 16,
+ "column": 13
+ },
+ "end": {
+ "line": 16,
+ "column": 35
+ }
+ }
+ },
+ "range": [
+ 468,
+ 498
+ ],
+ "loc": {
+ "start": {
+ "line": 16,
+ "column": 6
+ },
+ "end": {
+ "line": 16,
+ "column": 36
+ }
+ }
+ }
+ ],
+ "range": [
+ 460,
+ 504
+ ],
+ "loc": {
+ "start": {
+ "line": 15,
+ "column": 42
+ },
+ "end": {
+ "line": 17,
+ "column": 5
+ }
+ }
+ },
+ "alternate": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "ReturnStatement",
+ "argument": {
+ "type": "ObjectExpression",
+ "properties": [
+ {
+ "type": "Property",
+ "key": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 535,
+ 539
+ ],
+ "loc": {
+ "start": {
+ "line": 19,
+ "column": 8
+ },
+ "end": {
+ "line": 19,
+ "column": 12
+ }
+ }
+ },
+ "value": {
+ "type": "Literal",
+ "value": "attr",
+ "raw": "\"attr\"",
+ "range": [
+ 541,
+ 547
+ ],
+ "loc": {
+ "start": {
+ "line": 19,
+ "column": 14
+ },
+ "end": {
+ "line": 19,
+ "column": 20
+ }
+ }
+ },
+ "kind": "init",
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "range": [
+ 535,
+ 547
+ ],
+ "loc": {
+ "start": {
+ "line": 19,
+ "column": 8
+ },
+ "end": {
+ "line": 19,
+ "column": 20
+ }
+ }
+ },
+ {
+ "type": "Property",
+ "key": {
+ "type": "Identifier",
+ "name": "default",
+ "range": [
+ 557,
+ 564
+ ],
+ "loc": {
+ "start": {
+ "line": 20,
+ "column": 8
+ },
+ "end": {
+ "line": 20,
+ "column": 15
+ }
+ }
+ },
+ "value": {
+ "type": "LogicalExpression",
+ "operator": "&&",
+ "left": {
+ "type": "Identifier",
+ "name": "options",
+ "range": [
+ 566,
+ 573
+ ],
+ "loc": {
+ "start": {
+ "line": 20,
+ "column": 17
+ },
+ "end": {
+ "line": 20,
+ "column": 24
+ }
+ }
+ },
+ "right": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "options",
+ "range": [
+ 577,
+ 584
+ ],
+ "loc": {
+ "start": {
+ "line": 20,
+ "column": 28
+ },
+ "end": {
+ "line": 20,
+ "column": 35
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "default",
+ "range": [
+ 585,
+ 592
+ ],
+ "loc": {
+ "start": {
+ "line": 20,
+ "column": 36
+ },
+ "end": {
+ "line": 20,
+ "column": 43
+ }
+ }
+ },
+ "range": [
+ 577,
+ 592
+ ],
+ "loc": {
+ "start": {
+ "line": 20,
+ "column": 28
+ },
+ "end": {
+ "line": 20,
+ "column": 43
+ }
+ }
+ },
+ "range": [
+ 566,
+ 592
+ ],
+ "loc": {
+ "start": {
+ "line": 20,
+ "column": 17
+ },
+ "end": {
+ "line": 20,
+ "column": 43
+ }
+ }
+ },
+ "kind": "init",
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "range": [
+ 557,
+ 592
+ ],
+ "loc": {
+ "start": {
+ "line": 20,
+ "column": 8
+ },
+ "end": {
+ "line": 20,
+ "column": 43
+ }
+ }
+ },
+ {
+ "type": "Property",
+ "key": {
+ "type": "Identifier",
+ "name": "deserialize",
+ "range": [
+ 602,
+ 613
+ ],
+ "loc": {
+ "start": {
+ "line": 21,
+ "column": 8
+ },
+ "end": {
+ "line": 21,
+ "column": 19
+ }
+ }
+ },
+ "value": {
+ "type": "FunctionExpression",
+ "id": null,
+ "params": [
+ {
+ "type": "Identifier",
+ "name": "data",
+ "range": [
+ 625,
+ 629
+ ],
+ "loc": {
+ "start": {
+ "line": 21,
+ "column": 31
+ },
+ "end": {
+ "line": 21,
+ "column": 35
+ }
+ }
+ },
+ {
+ "type": "Identifier",
+ "name": "key",
+ "range": [
+ 631,
+ 634
+ ],
+ "loc": {
+ "start": {
+ "line": 21,
+ "column": 37
+ },
+ "end": {
+ "line": 21,
+ "column": 40
+ }
+ }
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "ReturnStatement",
+ "argument": {
+ "type": "LogicalExpression",
+ "operator": "&&",
+ "left": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "data",
+ "range": [
+ 655,
+ 659
+ ],
+ "loc": {
+ "start": {
+ "line": 22,
+ "column": 17
+ },
+ "end": {
+ "line": 22,
+ "column": 21
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "attributes",
+ "range": [
+ 660,
+ 670
+ ],
+ "loc": {
+ "start": {
+ "line": 22,
+ "column": 22
+ },
+ "end": {
+ "line": 22,
+ "column": 32
+ }
+ }
+ },
+ "range": [
+ 655,
+ 670
+ ],
+ "loc": {
+ "start": {
+ "line": 22,
+ "column": 17
+ },
+ "end": {
+ "line": 22,
+ "column": 32
+ }
+ }
+ },
+ "right": {
+ "type": "MemberExpression",
+ "computed": true,
+ "object": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "data",
+ "range": [
+ 674,
+ 678
+ ],
+ "loc": {
+ "start": {
+ "line": 22,
+ "column": 36
+ },
+ "end": {
+ "line": 22,
+ "column": 40
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "attributes",
+ "range": [
+ 679,
+ 689
+ ],
+ "loc": {
+ "start": {
+ "line": 22,
+ "column": 41
+ },
+ "end": {
+ "line": 22,
+ "column": 51
+ }
+ }
+ },
+ "range": [
+ 674,
+ 689
+ ],
+ "loc": {
+ "start": {
+ "line": 22,
+ "column": 36
+ },
+ "end": {
+ "line": 22,
+ "column": 51
+ }
+ }
+ },
+ "property": {
+ "type": "LogicalExpression",
+ "operator": "||",
+ "left": {
+ "type": "Identifier",
+ "name": "name",
+ "range": [
+ 690,
+ 694
+ ],
+ "loc": {
+ "start": {
+ "line": 22,
+ "column": 52
+ },
+ "end": {
+ "line": 22,
+ "column": 56
+ }
+ }
+ },
+ "right": {
+ "type": "Identifier",
+ "name": "key",
+ "range": [
+ 698,
+ 701
+ ],
+ "loc": {
+ "start": {
+ "line": 22,
+ "column": 60
+ },
+ "end": {
+ "line": 22,
+ "column": 63
+ }
+ }
+ },
+ "range": [
+ 690,
+ 701
+ ],
+ "loc": {
+ "start": {
+ "line": 22,
+ "column": 52
+ },
+ "end": {
+ "line": 22,
+ "column": 63
+ }
+ }
+ },
+ "range": [
+ 674,
+ 702
+ ],
+ "loc": {
+ "start": {
+ "line": 22,
+ "column": 36
+ },
+ "end": {
+ "line": 22,
+ "column": 64
+ }
+ }
+ },
+ "range": [
+ 655,
+ 702
+ ],
+ "loc": {
+ "start": {
+ "line": 22,
+ "column": 17
+ },
+ "end": {
+ "line": 22,
+ "column": 64
+ }
+ }
+ },
+ "range": [
+ 648,
+ 703
+ ],
+ "loc": {
+ "start": {
+ "line": 22,
+ "column": 10
+ },
+ "end": {
+ "line": 22,
+ "column": 65
+ }
+ }
+ }
+ ],
+ "range": [
+ 636,
+ 713
+ ],
+ "loc": {
+ "start": {
+ "line": 21,
+ "column": 42
+ },
+ "end": {
+ "line": 23,
+ "column": 9
+ }
+ }
+ },
+ "generator": false,
+ "expression": false,
+ "range": [
+ 615,
+ 713
+ ],
+ "loc": {
+ "start": {
+ "line": 21,
+ "column": 21
+ },
+ "end": {
+ "line": 23,
+ "column": 9
+ }
+ }
+ },
+ "kind": "init",
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "range": [
+ 602,
+ 713
+ ],
+ "loc": {
+ "start": {
+ "line": 21,
+ "column": 8
+ },
+ "end": {
+ "line": 23,
+ "column": 9
+ }
+ }
+ }
+ ],
+ "range": [
+ 525,
+ 721
+ ],
+ "loc": {
+ "start": {
+ "line": 18,
+ "column": 13
+ },
+ "end": {
+ "line": 24,
+ "column": 7
+ }
+ }
+ },
+ "range": [
+ 518,
+ 722
+ ],
+ "loc": {
+ "start": {
+ "line": 18,
+ "column": 6
+ },
+ "end": {
+ "line": 24,
+ "column": 8
+ }
+ }
+ }
+ ],
+ "range": [
+ 510,
+ 728
+ ],
+ "loc": {
+ "start": {
+ "line": 17,
+ "column": 11
+ },
+ "end": {
+ "line": 25,
+ "column": 5
+ }
+ }
+ },
+ "range": [
+ 422,
+ 728
+ ],
+ "loc": {
+ "start": {
+ "line": 15,
+ "column": 4
+ },
+ "end": {
+ "line": 25,
+ "column": 5
+ }
+ }
+ }
+ ],
+ "range": [
+ 416,
+ 732
+ ],
+ "loc": {
+ "start": {
+ "line": 14,
+ "column": 29
+ },
+ "end": {
+ "line": 26,
+ "column": 3
+ }
+ }
+ },
+ "generator": false,
+ "expression": false,
+ "range": [
+ 400,
+ 732
+ ],
+ "loc": {
+ "start": {
+ "line": 14,
+ "column": 13
+ },
+ "end": {
+ "line": 26,
+ "column": 3
+ }
+ }
+ },
+ "kind": "method",
+ "computed": false,
+ "range": [
+ 389,
+ 732
+ ],
+ "loc": {
+ "start": {
+ "line": 14,
+ "column": 2
+ },
+ "end": {
+ "line": 26,
+ "column": 3
+ }
+ },
+ "leadingComments": [
+ {
+ "type": "Block",
+ "value": "*\n * Creates a field definition for an attribute.\n *\n * @since 0.1.0\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": [
+ 64,
+ 386
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 2
+ },
+ "end": {
+ "line": 13,
+ "column": 5
+ }
+ }
+ }
+ ],
+ "trailingComments": [
+ {
+ "type": "Block",
+ "value": "*\n * Creates a field definition for an has-one relationship.\n *\n * @since 0.1.0\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": [
+ 736,
+ 1073
+ ],
+ "loc": {
+ "start": {
+ "line": 28,
+ "column": 2
+ },
+ "end": {
+ "line": 36,
+ "column": 5
+ }
+ }
+ }
+ ],
+ "static": true
+ },
+ {
+ "type": "MethodDefinition",
+ "key": {
+ "type": "Identifier",
+ "name": "hasOne",
+ "range": [
+ 1083,
+ 1089
+ ],
+ "loc": {
+ "start": {
+ "line": 37,
+ "column": 9
+ },
+ "end": {
+ "line": 37,
+ "column": 15
+ }
+ }
+ },
+ "value": {
+ "type": "FunctionExpression",
+ "id": null,
+ "params": [
+ {
+ "type": "Identifier",
+ "name": "name",
+ "range": [
+ 1090,
+ 1094
+ ],
+ "loc": {
+ "start": {
+ "line": 37,
+ "column": 16
+ },
+ "end": {
+ "line": 37,
+ "column": 20
+ }
+ }
+ },
+ {
+ "type": "Identifier",
+ "name": "options",
+ "range": [
+ 1096,
+ 1103
+ ],
+ "loc": {
+ "start": {
+ "line": 37,
+ "column": 22
+ },
+ "end": {
+ "line": 37,
+ "column": 29
+ }
+ }
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "IfStatement",
+ "test": {
+ "type": "LogicalExpression",
+ "operator": "&&",
+ "left": {
+ "type": "Identifier",
+ "name": "name",
+ "range": [
+ 1115,
+ 1119
+ ],
+ "loc": {
+ "start": {
+ "line": 38,
+ "column": 8
+ },
+ "end": {
+ "line": 38,
+ "column": 12
+ }
+ }
+ },
+ "right": {
+ "type": "BinaryExpression",
+ "operator": "===",
+ "left": {
+ "type": "UnaryExpression",
+ "operator": "typeof",
+ "argument": {
+ "type": "Identifier",
+ "name": "name",
+ "range": [
+ 1130,
+ 1134
+ ],
+ "loc": {
+ "start": {
+ "line": 38,
+ "column": 23
+ },
+ "end": {
+ "line": 38,
+ "column": 27
+ }
+ }
+ },
+ "prefix": true,
+ "range": [
+ 1123,
+ 1134
+ ],
+ "loc": {
+ "start": {
+ "line": 38,
+ "column": 16
+ },
+ "end": {
+ "line": 38,
+ "column": 27
+ }
+ }
+ },
+ "right": {
+ "type": "Literal",
+ "value": "object",
+ "raw": "'object'",
+ "range": [
+ 1139,
+ 1147
+ ],
+ "loc": {
+ "start": {
+ "line": 38,
+ "column": 32
+ },
+ "end": {
+ "line": 38,
+ "column": 40
+ }
+ }
+ },
+ "range": [
+ 1123,
+ 1147
+ ],
+ "loc": {
+ "start": {
+ "line": 38,
+ "column": 16
+ },
+ "end": {
+ "line": 38,
+ "column": 40
+ }
+ }
+ },
+ "range": [
+ 1115,
+ 1147
+ ],
+ "loc": {
+ "start": {
+ "line": 38,
+ "column": 8
+ },
+ "end": {
+ "line": 38,
+ "column": 40
+ }
+ }
+ },
+ "consequent": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "ReturnStatement",
+ "argument": {
+ "type": "CallExpression",
+ "callee": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "Store",
+ "range": [
+ 1164,
+ 1169
+ ],
+ "loc": {
+ "start": {
+ "line": 39,
+ "column": 13
+ },
+ "end": {
+ "line": 39,
+ "column": 18
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "hasOne",
+ "range": [
+ 1170,
+ 1176
+ ],
+ "loc": {
+ "start": {
+ "line": 39,
+ "column": 19
+ },
+ "end": {
+ "line": 39,
+ "column": 25
+ }
+ }
+ },
+ "range": [
+ 1164,
+ 1176
+ ],
+ "loc": {
+ "start": {
+ "line": 39,
+ "column": 13
+ },
+ "end": {
+ "line": 39,
+ "column": 25
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "Literal",
+ "value": null,
+ "raw": "null",
+ "range": [
+ 1177,
+ 1181
+ ],
+ "loc": {
+ "start": {
+ "line": 39,
+ "column": 26
+ },
+ "end": {
+ "line": 39,
+ "column": 30
+ }
+ }
+ },
+ {
+ "type": "Identifier",
+ "name": "name",
+ "range": [
+ 1183,
+ 1187
+ ],
+ "loc": {
+ "start": {
+ "line": 39,
+ "column": 32
+ },
+ "end": {
+ "line": 39,
+ "column": 36
+ }
+ }
+ }
+ ],
+ "range": [
+ 1164,
+ 1188
+ ],
+ "loc": {
+ "start": {
+ "line": 39,
+ "column": 13
+ },
+ "end": {
+ "line": 39,
+ "column": 37
+ }
+ }
+ },
+ "range": [
+ 1157,
+ 1189
+ ],
+ "loc": {
+ "start": {
+ "line": 39,
+ "column": 6
+ },
+ "end": {
+ "line": 39,
+ "column": 38
+ }
+ }
+ }
+ ],
+ "range": [
+ 1149,
+ 1195
+ ],
+ "loc": {
+ "start": {
+ "line": 38,
+ "column": 42
+ },
+ "end": {
+ "line": 40,
+ "column": 5
+ }
+ }
+ },
+ "alternate": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "ReturnStatement",
+ "argument": {
+ "type": "ObjectExpression",
+ "properties": [
+ {
+ "type": "Property",
+ "key": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 1226,
+ 1230
+ ],
+ "loc": {
+ "start": {
+ "line": 42,
+ "column": 8
+ },
+ "end": {
+ "line": 42,
+ "column": 12
+ }
+ }
+ },
+ "value": {
+ "type": "Literal",
+ "value": "has-one",
+ "raw": "\"has-one\"",
+ "range": [
+ 1232,
+ 1241
+ ],
+ "loc": {
+ "start": {
+ "line": 42,
+ "column": 14
+ },
+ "end": {
+ "line": 42,
+ "column": 23
+ }
+ }
+ },
+ "kind": "init",
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "range": [
+ 1226,
+ 1241
+ ],
+ "loc": {
+ "start": {
+ "line": 42,
+ "column": 8
+ },
+ "end": {
+ "line": 42,
+ "column": 23
+ }
+ }
+ },
+ {
+ "type": "Property",
+ "key": {
+ "type": "Identifier",
+ "name": "inverse",
+ "range": [
+ 1251,
+ 1258
+ ],
+ "loc": {
+ "start": {
+ "line": 43,
+ "column": 8
+ },
+ "end": {
+ "line": 43,
+ "column": 15
+ }
+ }
+ },
+ "value": {
+ "type": "LogicalExpression",
+ "operator": "&&",
+ "left": {
+ "type": "Identifier",
+ "name": "options",
+ "range": [
+ 1260,
+ 1267
+ ],
+ "loc": {
+ "start": {
+ "line": 43,
+ "column": 17
+ },
+ "end": {
+ "line": 43,
+ "column": 24
+ }
+ }
+ },
+ "right": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "options",
+ "range": [
+ 1271,
+ 1278
+ ],
+ "loc": {
+ "start": {
+ "line": 43,
+ "column": 28
+ },
+ "end": {
+ "line": 43,
+ "column": 35
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "inverse",
+ "range": [
+ 1279,
+ 1286
+ ],
+ "loc": {
+ "start": {
+ "line": 43,
+ "column": 36
+ },
+ "end": {
+ "line": 43,
+ "column": 43
+ }
+ }
+ },
+ "range": [
+ 1271,
+ 1286
+ ],
+ "loc": {
+ "start": {
+ "line": 43,
+ "column": 28
+ },
+ "end": {
+ "line": 43,
+ "column": 43
+ }
+ }
+ },
+ "range": [
+ 1260,
+ 1286
+ ],
+ "loc": {
+ "start": {
+ "line": 43,
+ "column": 17
+ },
+ "end": {
+ "line": 43,
+ "column": 43
+ }
+ }
+ },
+ "kind": "init",
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "range": [
+ 1251,
+ 1286
+ ],
+ "loc": {
+ "start": {
+ "line": 43,
+ "column": 8
+ },
+ "end": {
+ "line": 43,
+ "column": 43
+ }
+ }
+ },
+ {
+ "type": "Property",
+ "key": {
+ "type": "Identifier",
+ "name": "deserialize",
+ "range": [
+ 1296,
+ 1307
+ ],
+ "loc": {
+ "start": {
+ "line": 44,
+ "column": 8
+ },
+ "end": {
+ "line": 44,
+ "column": 19
+ }
+ }
+ },
+ "value": {
+ "type": "FunctionExpression",
+ "id": null,
+ "params": [
+ {
+ "type": "Identifier",
+ "name": "data",
+ "range": [
+ 1319,
+ 1323
+ ],
+ "loc": {
+ "start": {
+ "line": 44,
+ "column": 31
+ },
+ "end": {
+ "line": 44,
+ "column": 35
+ }
+ }
+ },
+ {
+ "type": "Identifier",
+ "name": "key",
+ "range": [
+ 1325,
+ 1328
+ ],
+ "loc": {
+ "start": {
+ "line": 44,
+ "column": 37
+ },
+ "end": {
+ "line": 44,
+ "column": 40
+ }
+ }
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "expression": {
+ "type": "AssignmentExpression",
+ "operator": "=",
+ "left": {
+ "type": "Identifier",
+ "name": "name",
+ "range": [
+ 1342,
+ 1346
+ ],
+ "loc": {
+ "start": {
+ "line": 45,
+ "column": 10
+ },
+ "end": {
+ "line": 45,
+ "column": 14
+ }
+ }
+ },
+ "right": {
+ "type": "LogicalExpression",
+ "operator": "||",
+ "left": {
+ "type": "Identifier",
+ "name": "name",
+ "range": [
+ 1349,
+ 1353
+ ],
+ "loc": {
+ "start": {
+ "line": 45,
+ "column": 17
+ },
+ "end": {
+ "line": 45,
+ "column": 21
+ }
+ }
+ },
+ "right": {
+ "type": "Identifier",
+ "name": "key",
+ "range": [
+ 1357,
+ 1360
+ ],
+ "loc": {
+ "start": {
+ "line": 45,
+ "column": 25
+ },
+ "end": {
+ "line": 45,
+ "column": 28
+ }
+ }
+ },
+ "range": [
+ 1349,
+ 1360
+ ],
+ "loc": {
+ "start": {
+ "line": 45,
+ "column": 17
+ },
+ "end": {
+ "line": 45,
+ "column": 28
+ }
+ }
+ },
+ "range": [
+ 1342,
+ 1360
+ ],
+ "loc": {
+ "start": {
+ "line": 45,
+ "column": 10
+ },
+ "end": {
+ "line": 45,
+ "column": 28
+ }
+ }
+ },
+ "range": [
+ 1342,
+ 1361
+ ],
+ "loc": {
+ "start": {
+ "line": 45,
+ "column": 10
+ },
+ "end": {
+ "line": 45,
+ "column": 29
+ }
+ }
+ },
+ {
+ "type": "IfStatement",
+ "test": {
+ "type": "LogicalExpression",
+ "operator": "&&",
+ "left": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "data",
+ "range": [
+ 1376,
+ 1380
+ ],
+ "loc": {
+ "start": {
+ "line": 46,
+ "column": 14
+ },
+ "end": {
+ "line": 46,
+ "column": 18
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "relationships",
+ "range": [
+ 1381,
+ 1394
+ ],
+ "loc": {
+ "start": {
+ "line": 46,
+ "column": 19
+ },
+ "end": {
+ "line": 46,
+ "column": 32
+ }
+ }
+ },
+ "range": [
+ 1376,
+ 1394
+ ],
+ "loc": {
+ "start": {
+ "line": 46,
+ "column": 14
+ },
+ "end": {
+ "line": 46,
+ "column": 32
+ }
+ }
+ },
+ "right": {
+ "type": "MemberExpression",
+ "computed": true,
+ "object": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "data",
+ "range": [
+ 1398,
+ 1402
+ ],
+ "loc": {
+ "start": {
+ "line": 46,
+ "column": 36
+ },
+ "end": {
+ "line": 46,
+ "column": 40
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "relationships",
+ "range": [
+ 1403,
+ 1416
+ ],
+ "loc": {
+ "start": {
+ "line": 46,
+ "column": 41
+ },
+ "end": {
+ "line": 46,
+ "column": 54
+ }
+ }
+ },
+ "range": [
+ 1398,
+ 1416
+ ],
+ "loc": {
+ "start": {
+ "line": 46,
+ "column": 36
+ },
+ "end": {
+ "line": 46,
+ "column": 54
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "name",
+ "range": [
+ 1417,
+ 1421
+ ],
+ "loc": {
+ "start": {
+ "line": 46,
+ "column": 55
+ },
+ "end": {
+ "line": 46,
+ "column": 59
+ }
+ }
+ },
+ "range": [
+ 1398,
+ 1422
+ ],
+ "loc": {
+ "start": {
+ "line": 46,
+ "column": 36
+ },
+ "end": {
+ "line": 46,
+ "column": 60
+ }
+ }
+ },
+ "range": [
+ 1376,
+ 1422
+ ],
+ "loc": {
+ "start": {
+ "line": 46,
+ "column": 14
+ },
+ "end": {
+ "line": 46,
+ "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": [
+ 1442,
+ 1446
+ ],
+ "loc": {
+ "start": {
+ "line": 47,
+ "column": 16
+ },
+ "end": {
+ "line": 47,
+ "column": 20
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "relationships",
+ "range": [
+ 1447,
+ 1460
+ ],
+ "loc": {
+ "start": {
+ "line": 47,
+ "column": 21
+ },
+ "end": {
+ "line": 47,
+ "column": 34
+ }
+ }
+ },
+ "range": [
+ 1442,
+ 1460
+ ],
+ "loc": {
+ "start": {
+ "line": 47,
+ "column": 16
+ },
+ "end": {
+ "line": 47,
+ "column": 34
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "name",
+ "range": [
+ 1461,
+ 1465
+ ],
+ "loc": {
+ "start": {
+ "line": 47,
+ "column": 35
+ },
+ "end": {
+ "line": 47,
+ "column": 39
+ }
+ }
+ },
+ "range": [
+ 1442,
+ 1466
+ ],
+ "loc": {
+ "start": {
+ "line": 47,
+ "column": 16
+ },
+ "end": {
+ "line": 47,
+ "column": 40
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "data",
+ "range": [
+ 1467,
+ 1471
+ ],
+ "loc": {
+ "start": {
+ "line": 47,
+ "column": 41
+ },
+ "end": {
+ "line": 47,
+ "column": 45
+ }
+ }
+ },
+ "range": [
+ 1442,
+ 1471
+ ],
+ "loc": {
+ "start": {
+ "line": 47,
+ "column": 16
+ },
+ "end": {
+ "line": 47,
+ "column": 45
+ }
+ }
+ },
+ "right": {
+ "type": "Literal",
+ "value": null,
+ "raw": "null",
+ "range": [
+ 1476,
+ 1480
+ ],
+ "loc": {
+ "start": {
+ "line": 47,
+ "column": 50
+ },
+ "end": {
+ "line": 47,
+ "column": 54
+ }
+ }
+ },
+ "range": [
+ 1442,
+ 1480
+ ],
+ "loc": {
+ "start": {
+ "line": 47,
+ "column": 16
+ },
+ "end": {
+ "line": 47,
+ "column": 54
+ }
+ }
+ },
+ "consequent": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "ReturnStatement",
+ "argument": {
+ "type": "Literal",
+ "value": null,
+ "raw": "null",
+ "range": [
+ 1505,
+ 1509
+ ],
+ "loc": {
+ "start": {
+ "line": 48,
+ "column": 21
+ },
+ "end": {
+ "line": 48,
+ "column": 25
+ }
+ }
+ },
+ "range": [
+ 1498,
+ 1510
+ ],
+ "loc": {
+ "start": {
+ "line": 48,
+ "column": 14
+ },
+ "end": {
+ "line": 48,
+ "column": 26
+ }
+ }
+ }
+ ],
+ "range": [
+ 1482,
+ 1524
+ ],
+ "loc": {
+ "start": {
+ "line": 47,
+ "column": 56
+ },
+ "end": {
+ "line": 49,
+ "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": [
+ 1534,
+ 1538
+ ],
+ "loc": {
+ "start": {
+ "line": 49,
+ "column": 23
+ },
+ "end": {
+ "line": 49,
+ "column": 27
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "relationships",
+ "range": [
+ 1539,
+ 1552
+ ],
+ "loc": {
+ "start": {
+ "line": 49,
+ "column": 28
+ },
+ "end": {
+ "line": 49,
+ "column": 41
+ }
+ }
+ },
+ "range": [
+ 1534,
+ 1552
+ ],
+ "loc": {
+ "start": {
+ "line": 49,
+ "column": 23
+ },
+ "end": {
+ "line": 49,
+ "column": 41
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "name",
+ "range": [
+ 1553,
+ 1557
+ ],
+ "loc": {
+ "start": {
+ "line": 49,
+ "column": 42
+ },
+ "end": {
+ "line": 49,
+ "column": 46
+ }
+ }
+ },
+ "range": [
+ 1534,
+ 1558
+ ],
+ "loc": {
+ "start": {
+ "line": 49,
+ "column": 23
+ },
+ "end": {
+ "line": 49,
+ "column": 47
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "data",
+ "range": [
+ 1559,
+ 1563
+ ],
+ "loc": {
+ "start": {
+ "line": 49,
+ "column": 48
+ },
+ "end": {
+ "line": 49,
+ "column": 52
+ }
+ }
+ },
+ "range": [
+ 1534,
+ 1563
+ ],
+ "loc": {
+ "start": {
+ "line": 49,
+ "column": 23
+ },
+ "end": {
+ "line": 49,
+ "column": 52
+ }
+ }
+ },
+ "consequent": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "ReturnStatement",
+ "argument": {
+ "type": "CallExpression",
+ "callee": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "ThisExpression",
+ "range": [
+ 1588,
+ 1592
+ ],
+ "loc": {
+ "start": {
+ "line": 50,
+ "column": 21
+ },
+ "end": {
+ "line": 50,
+ "column": 25
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "find",
+ "range": [
+ 1593,
+ 1597
+ ],
+ "loc": {
+ "start": {
+ "line": 50,
+ "column": 26
+ },
+ "end": {
+ "line": 50,
+ "column": 30
+ }
+ }
+ },
+ "range": [
+ 1588,
+ 1597
+ ],
+ "loc": {
+ "start": {
+ "line": 50,
+ "column": 21
+ },
+ "end": {
+ "line": 50,
+ "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": [
+ 1598,
+ 1602
+ ],
+ "loc": {
+ "start": {
+ "line": 50,
+ "column": 31
+ },
+ "end": {
+ "line": 50,
+ "column": 35
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "relationships",
+ "range": [
+ 1603,
+ 1616
+ ],
+ "loc": {
+ "start": {
+ "line": 50,
+ "column": 36
+ },
+ "end": {
+ "line": 50,
+ "column": 49
+ }
+ }
+ },
+ "range": [
+ 1598,
+ 1616
+ ],
+ "loc": {
+ "start": {
+ "line": 50,
+ "column": 31
+ },
+ "end": {
+ "line": 50,
+ "column": 49
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "name",
+ "range": [
+ 1617,
+ 1621
+ ],
+ "loc": {
+ "start": {
+ "line": 50,
+ "column": 50
+ },
+ "end": {
+ "line": 50,
+ "column": 54
+ }
+ }
+ },
+ "range": [
+ 1598,
+ 1622
+ ],
+ "loc": {
+ "start": {
+ "line": 50,
+ "column": 31
+ },
+ "end": {
+ "line": 50,
+ "column": 55
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "data",
+ "range": [
+ 1623,
+ 1627
+ ],
+ "loc": {
+ "start": {
+ "line": 50,
+ "column": 56
+ },
+ "end": {
+ "line": 50,
+ "column": 60
+ }
+ }
+ },
+ "range": [
+ 1598,
+ 1627
+ ],
+ "loc": {
+ "start": {
+ "line": 50,
+ "column": 31
+ },
+ "end": {
+ "line": 50,
+ "column": 60
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 1628,
+ 1632
+ ],
+ "loc": {
+ "start": {
+ "line": 50,
+ "column": 61
+ },
+ "end": {
+ "line": 50,
+ "column": 65
+ }
+ }
+ },
+ "range": [
+ 1598,
+ 1632
+ ],
+ "loc": {
+ "start": {
+ "line": 50,
+ "column": 31
+ },
+ "end": {
+ "line": 50,
+ "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": [
+ 1634,
+ 1638
+ ],
+ "loc": {
+ "start": {
+ "line": 50,
+ "column": 67
+ },
+ "end": {
+ "line": 50,
+ "column": 71
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "relationships",
+ "range": [
+ 1639,
+ 1652
+ ],
+ "loc": {
+ "start": {
+ "line": 50,
+ "column": 72
+ },
+ "end": {
+ "line": 50,
+ "column": 85
+ }
+ }
+ },
+ "range": [
+ 1634,
+ 1652
+ ],
+ "loc": {
+ "start": {
+ "line": 50,
+ "column": 67
+ },
+ "end": {
+ "line": 50,
+ "column": 85
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "name",
+ "range": [
+ 1653,
+ 1657
+ ],
+ "loc": {
+ "start": {
+ "line": 50,
+ "column": 86
+ },
+ "end": {
+ "line": 50,
+ "column": 90
+ }
+ }
+ },
+ "range": [
+ 1634,
+ 1658
+ ],
+ "loc": {
+ "start": {
+ "line": 50,
+ "column": 67
+ },
+ "end": {
+ "line": 50,
+ "column": 91
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "data",
+ "range": [
+ 1659,
+ 1663
+ ],
+ "loc": {
+ "start": {
+ "line": 50,
+ "column": 92
+ },
+ "end": {
+ "line": 50,
+ "column": 96
+ }
+ }
+ },
+ "range": [
+ 1634,
+ 1663
+ ],
+ "loc": {
+ "start": {
+ "line": 50,
+ "column": 67
+ },
+ "end": {
+ "line": 50,
+ "column": 96
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "id",
+ "range": [
+ 1664,
+ 1666
+ ],
+ "loc": {
+ "start": {
+ "line": 50,
+ "column": 97
+ },
+ "end": {
+ "line": 50,
+ "column": 99
+ }
+ }
+ },
+ "range": [
+ 1634,
+ 1666
+ ],
+ "loc": {
+ "start": {
+ "line": 50,
+ "column": 67
+ },
+ "end": {
+ "line": 50,
+ "column": 99
+ }
+ }
+ }
+ ],
+ "range": [
+ 1588,
+ 1667
+ ],
+ "loc": {
+ "start": {
+ "line": 50,
+ "column": 21
+ },
+ "end": {
+ "line": 50,
+ "column": 100
+ }
+ }
+ },
+ "range": [
+ 1581,
+ 1668
+ ],
+ "loc": {
+ "start": {
+ "line": 50,
+ "column": 14
+ },
+ "end": {
+ "line": 50,
+ "column": 101
+ }
+ }
+ }
+ ],
+ "range": [
+ 1565,
+ 1682
+ ],
+ "loc": {
+ "start": {
+ "line": 49,
+ "column": 54
+ },
+ "end": {
+ "line": 51,
+ "column": 13
+ }
+ }
+ },
+ "alternate": null,
+ "range": [
+ 1530,
+ 1682
+ ],
+ "loc": {
+ "start": {
+ "line": 49,
+ "column": 19
+ },
+ "end": {
+ "line": 51,
+ "column": 13
+ }
+ }
+ },
+ "range": [
+ 1438,
+ 1682
+ ],
+ "loc": {
+ "start": {
+ "line": 47,
+ "column": 12
+ },
+ "end": {
+ "line": 51,
+ "column": 13
+ }
+ }
+ }
+ ],
+ "range": [
+ 1424,
+ 1694
+ ],
+ "loc": {
+ "start": {
+ "line": 46,
+ "column": 62
+ },
+ "end": {
+ "line": 52,
+ "column": 11
+ }
+ }
+ },
+ "alternate": null,
+ "range": [
+ 1372,
+ 1694
+ ],
+ "loc": {
+ "start": {
+ "line": 46,
+ "column": 10
+ },
+ "end": {
+ "line": 52,
+ "column": 11
+ }
+ }
+ }
+ ],
+ "range": [
+ 1330,
+ 1704
+ ],
+ "loc": {
+ "start": {
+ "line": 44,
+ "column": 42
+ },
+ "end": {
+ "line": 53,
+ "column": 9
+ }
+ }
+ },
+ "generator": false,
+ "expression": false,
+ "range": [
+ 1309,
+ 1704
+ ],
+ "loc": {
+ "start": {
+ "line": 44,
+ "column": 21
+ },
+ "end": {
+ "line": 53,
+ "column": 9
+ }
+ }
+ },
+ "kind": "init",
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "range": [
+ 1296,
+ 1704
+ ],
+ "loc": {
+ "start": {
+ "line": 44,
+ "column": 8
+ },
+ "end": {
+ "line": 53,
+ "column": 9
+ }
+ }
+ }
+ ],
+ "range": [
+ 1216,
+ 1712
+ ],
+ "loc": {
+ "start": {
+ "line": 41,
+ "column": 13
+ },
+ "end": {
+ "line": 54,
+ "column": 7
+ }
+ }
+ },
+ "range": [
+ 1209,
+ 1713
+ ],
+ "loc": {
+ "start": {
+ "line": 41,
+ "column": 6
+ },
+ "end": {
+ "line": 54,
+ "column": 8
+ }
+ }
+ }
+ ],
+ "range": [
+ 1201,
+ 1719
+ ],
+ "loc": {
+ "start": {
+ "line": 40,
+ "column": 11
+ },
+ "end": {
+ "line": 55,
+ "column": 5
+ }
+ }
+ },
+ "range": [
+ 1111,
+ 1719
+ ],
+ "loc": {
+ "start": {
+ "line": 38,
+ "column": 4
+ },
+ "end": {
+ "line": 55,
+ "column": 5
+ }
+ }
+ }
+ ],
+ "range": [
+ 1105,
+ 1723
+ ],
+ "loc": {
+ "start": {
+ "line": 37,
+ "column": 31
+ },
+ "end": {
+ "line": 56,
+ "column": 3
+ }
+ }
+ },
+ "generator": false,
+ "expression": false,
+ "range": [
+ 1089,
+ 1723
+ ],
+ "loc": {
+ "start": {
+ "line": 37,
+ "column": 15
+ },
+ "end": {
+ "line": 56,
+ "column": 3
+ }
+ }
+ },
+ "kind": "method",
+ "computed": false,
+ "range": [
+ 1076,
+ 1723
+ ],
+ "loc": {
+ "start": {
+ "line": 37,
+ "column": 2
+ },
+ "end": {
+ "line": 56,
+ "column": 3
+ }
+ },
+ "leadingComments": [
+ {
+ "type": "Block",
+ "value": "*\n * Creates a field definition for an has-one relationship.\n *\n * @since 0.1.0\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": [
+ 736,
+ 1073
+ ],
+ "loc": {
+ "start": {
+ "line": 28,
+ "column": 2
+ },
+ "end": {
+ "line": 36,
+ "column": 5
+ }
+ }
+ }
+ ],
+ "trailingComments": [
+ {
+ "type": "Block",
+ "value": "*\n * Creates a field definition for an has-many relationship.\n *\n * @since 0.1.0\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": [
+ 1727,
+ 2065
+ ],
+ "loc": {
+ "start": {
+ "line": 58,
+ "column": 2
+ },
+ "end": {
+ "line": 66,
+ "column": 5
+ }
+ }
+ }
+ ],
+ "static": true
+ },
+ {
+ "type": "MethodDefinition",
+ "key": {
+ "type": "Identifier",
+ "name": "hasMany",
+ "range": [
+ 2075,
+ 2082
+ ],
+ "loc": {
+ "start": {
+ "line": 67,
+ "column": 9
+ },
+ "end": {
+ "line": 67,
+ "column": 16
+ }
+ }
+ },
+ "value": {
+ "type": "FunctionExpression",
+ "id": null,
+ "params": [
+ {
+ "type": "Identifier",
+ "name": "name",
+ "range": [
+ 2083,
+ 2087
+ ],
+ "loc": {
+ "start": {
+ "line": 67,
+ "column": 17
+ },
+ "end": {
+ "line": 67,
+ "column": 21
+ }
+ }
+ },
+ {
+ "type": "Identifier",
+ "name": "options",
+ "range": [
+ 2089,
+ 2096
+ ],
+ "loc": {
+ "start": {
+ "line": 67,
+ "column": 23
+ },
+ "end": {
+ "line": 67,
+ "column": 30
+ }
+ }
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "IfStatement",
+ "test": {
+ "type": "LogicalExpression",
+ "operator": "&&",
+ "left": {
+ "type": "Identifier",
+ "name": "name",
+ "range": [
+ 2108,
+ 2112
+ ],
+ "loc": {
+ "start": {
+ "line": 68,
+ "column": 8
+ },
+ "end": {
+ "line": 68,
+ "column": 12
+ }
+ }
+ },
+ "right": {
+ "type": "BinaryExpression",
+ "operator": "===",
+ "left": {
+ "type": "UnaryExpression",
+ "operator": "typeof",
+ "argument": {
+ "type": "Identifier",
+ "name": "name",
+ "range": [
+ 2123,
+ 2127
+ ],
+ "loc": {
+ "start": {
+ "line": 68,
+ "column": 23
+ },
+ "end": {
+ "line": 68,
+ "column": 27
+ }
+ }
+ },
+ "prefix": true,
+ "range": [
+ 2116,
+ 2127
+ ],
+ "loc": {
+ "start": {
+ "line": 68,
+ "column": 16
+ },
+ "end": {
+ "line": 68,
+ "column": 27
+ }
+ }
+ },
+ "right": {
+ "type": "Literal",
+ "value": "object",
+ "raw": "'object'",
+ "range": [
+ 2132,
+ 2140
+ ],
+ "loc": {
+ "start": {
+ "line": 68,
+ "column": 32
+ },
+ "end": {
+ "line": 68,
+ "column": 40
+ }
+ }
+ },
+ "range": [
+ 2116,
+ 2140
+ ],
+ "loc": {
+ "start": {
+ "line": 68,
+ "column": 16
+ },
+ "end": {
+ "line": 68,
+ "column": 40
+ }
+ }
+ },
+ "range": [
+ 2108,
+ 2140
+ ],
+ "loc": {
+ "start": {
+ "line": 68,
+ "column": 8
+ },
+ "end": {
+ "line": 68,
+ "column": 40
+ }
+ }
+ },
+ "consequent": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "ReturnStatement",
+ "argument": {
+ "type": "CallExpression",
+ "callee": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "Store",
+ "range": [
+ 2157,
+ 2162
+ ],
+ "loc": {
+ "start": {
+ "line": 69,
+ "column": 13
+ },
+ "end": {
+ "line": 69,
+ "column": 18
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "hasMany",
+ "range": [
+ 2163,
+ 2170
+ ],
+ "loc": {
+ "start": {
+ "line": 69,
+ "column": 19
+ },
+ "end": {
+ "line": 69,
+ "column": 26
+ }
+ }
+ },
+ "range": [
+ 2157,
+ 2170
+ ],
+ "loc": {
+ "start": {
+ "line": 69,
+ "column": 13
+ },
+ "end": {
+ "line": 69,
+ "column": 26
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "Literal",
+ "value": null,
+ "raw": "null",
+ "range": [
+ 2171,
+ 2175
+ ],
+ "loc": {
+ "start": {
+ "line": 69,
+ "column": 27
+ },
+ "end": {
+ "line": 69,
+ "column": 31
+ }
+ }
+ },
+ {
+ "type": "Identifier",
+ "name": "name",
+ "range": [
+ 2177,
+ 2181
+ ],
+ "loc": {
+ "start": {
+ "line": 69,
+ "column": 33
+ },
+ "end": {
+ "line": 69,
+ "column": 37
+ }
+ }
+ }
+ ],
+ "range": [
+ 2157,
+ 2182
+ ],
+ "loc": {
+ "start": {
+ "line": 69,
+ "column": 13
+ },
+ "end": {
+ "line": 69,
+ "column": 38
+ }
+ }
+ },
+ "range": [
+ 2150,
+ 2183
+ ],
+ "loc": {
+ "start": {
+ "line": 69,
+ "column": 6
+ },
+ "end": {
+ "line": 69,
+ "column": 39
+ }
+ }
+ }
+ ],
+ "range": [
+ 2142,
+ 2189
+ ],
+ "loc": {
+ "start": {
+ "line": 68,
+ "column": 42
+ },
+ "end": {
+ "line": 70,
+ "column": 5
+ }
+ }
+ },
+ "alternate": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "ReturnStatement",
+ "argument": {
+ "type": "ObjectExpression",
+ "properties": [
+ {
+ "type": "Property",
+ "key": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 2220,
+ 2224
+ ],
+ "loc": {
+ "start": {
+ "line": 72,
+ "column": 8
+ },
+ "end": {
+ "line": 72,
+ "column": 12
+ }
+ }
+ },
+ "value": {
+ "type": "Literal",
+ "value": "has-many",
+ "raw": "\"has-many\"",
+ "range": [
+ 2226,
+ 2236
+ ],
+ "loc": {
+ "start": {
+ "line": 72,
+ "column": 14
+ },
+ "end": {
+ "line": 72,
+ "column": 24
+ }
+ }
+ },
+ "kind": "init",
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "range": [
+ 2220,
+ 2236
+ ],
+ "loc": {
+ "start": {
+ "line": 72,
+ "column": 8
+ },
+ "end": {
+ "line": 72,
+ "column": 24
+ }
+ }
+ },
+ {
+ "type": "Property",
+ "key": {
+ "type": "Identifier",
+ "name": "default",
+ "range": [
+ 2246,
+ 2253
+ ],
+ "loc": {
+ "start": {
+ "line": 73,
+ "column": 8
+ },
+ "end": {
+ "line": 73,
+ "column": 15
+ }
+ }
+ },
+ "value": {
+ "type": "ArrayExpression",
+ "elements": [],
+ "range": [
+ 2255,
+ 2257
+ ],
+ "loc": {
+ "start": {
+ "line": 73,
+ "column": 17
+ },
+ "end": {
+ "line": 73,
+ "column": 19
+ }
+ }
+ },
+ "kind": "init",
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "range": [
+ 2246,
+ 2257
+ ],
+ "loc": {
+ "start": {
+ "line": 73,
+ "column": 8
+ },
+ "end": {
+ "line": 73,
+ "column": 19
+ }
+ }
+ },
+ {
+ "type": "Property",
+ "key": {
+ "type": "Identifier",
+ "name": "inverse",
+ "range": [
+ 2267,
+ 2274
+ ],
+ "loc": {
+ "start": {
+ "line": 74,
+ "column": 8
+ },
+ "end": {
+ "line": 74,
+ "column": 15
+ }
+ }
+ },
+ "value": {
+ "type": "LogicalExpression",
+ "operator": "&&",
+ "left": {
+ "type": "Identifier",
+ "name": "options",
+ "range": [
+ 2276,
+ 2283
+ ],
+ "loc": {
+ "start": {
+ "line": 74,
+ "column": 17
+ },
+ "end": {
+ "line": 74,
+ "column": 24
+ }
+ }
+ },
+ "right": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "options",
+ "range": [
+ 2287,
+ 2294
+ ],
+ "loc": {
+ "start": {
+ "line": 74,
+ "column": 28
+ },
+ "end": {
+ "line": 74,
+ "column": 35
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "inverse",
+ "range": [
+ 2295,
+ 2302
+ ],
+ "loc": {
+ "start": {
+ "line": 74,
+ "column": 36
+ },
+ "end": {
+ "line": 74,
+ "column": 43
+ }
+ }
+ },
+ "range": [
+ 2287,
+ 2302
+ ],
+ "loc": {
+ "start": {
+ "line": 74,
+ "column": 28
+ },
+ "end": {
+ "line": 74,
+ "column": 43
+ }
+ }
+ },
+ "range": [
+ 2276,
+ 2302
+ ],
+ "loc": {
+ "start": {
+ "line": 74,
+ "column": 17
+ },
+ "end": {
+ "line": 74,
+ "column": 43
+ }
+ }
+ },
+ "kind": "init",
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "range": [
+ 2267,
+ 2302
+ ],
+ "loc": {
+ "start": {
+ "line": 74,
+ "column": 8
+ },
+ "end": {
+ "line": 74,
+ "column": 43
+ }
+ }
+ },
+ {
+ "type": "Property",
+ "key": {
+ "type": "Identifier",
+ "name": "deserialize",
+ "range": [
+ 2312,
+ 2323
+ ],
+ "loc": {
+ "start": {
+ "line": 75,
+ "column": 8
+ },
+ "end": {
+ "line": 75,
+ "column": 19
+ }
+ }
+ },
+ "value": {
+ "type": "FunctionExpression",
+ "id": null,
+ "params": [
+ {
+ "type": "Identifier",
+ "name": "data",
+ "range": [
+ 2335,
+ 2339
+ ],
+ "loc": {
+ "start": {
+ "line": 75,
+ "column": 31
+ },
+ "end": {
+ "line": 75,
+ "column": 35
+ }
+ }
+ },
+ {
+ "type": "Identifier",
+ "name": "key",
+ "range": [
+ 2341,
+ 2344
+ ],
+ "loc": {
+ "start": {
+ "line": 75,
+ "column": 37
+ },
+ "end": {
+ "line": 75,
+ "column": 40
+ }
+ }
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "expression": {
+ "type": "AssignmentExpression",
+ "operator": "=",
+ "left": {
+ "type": "Identifier",
+ "name": "name",
+ "range": [
+ 2358,
+ 2362
+ ],
+ "loc": {
+ "start": {
+ "line": 76,
+ "column": 10
+ },
+ "end": {
+ "line": 76,
+ "column": 14
+ }
+ }
+ },
+ "right": {
+ "type": "LogicalExpression",
+ "operator": "||",
+ "left": {
+ "type": "Identifier",
+ "name": "name",
+ "range": [
+ 2365,
+ 2369
+ ],
+ "loc": {
+ "start": {
+ "line": 76,
+ "column": 17
+ },
+ "end": {
+ "line": 76,
+ "column": 21
+ }
+ }
+ },
+ "right": {
+ "type": "Identifier",
+ "name": "key",
+ "range": [
+ 2373,
+ 2376
+ ],
+ "loc": {
+ "start": {
+ "line": 76,
+ "column": 25
+ },
+ "end": {
+ "line": 76,
+ "column": 28
+ }
+ }
+ },
+ "range": [
+ 2365,
+ 2376
+ ],
+ "loc": {
+ "start": {
+ "line": 76,
+ "column": 17
+ },
+ "end": {
+ "line": 76,
+ "column": 28
+ }
+ }
+ },
+ "range": [
+ 2358,
+ 2376
+ ],
+ "loc": {
+ "start": {
+ "line": 76,
+ "column": 10
+ },
+ "end": {
+ "line": 76,
+ "column": 28
+ }
+ }
+ },
+ "range": [
+ 2358,
+ 2377
+ ],
+ "loc": {
+ "start": {
+ "line": 76,
+ "column": 10
+ },
+ "end": {
+ "line": 76,
+ "column": 29
+ }
+ }
+ },
+ {
+ "type": "IfStatement",
+ "test": {
+ "type": "LogicalExpression",
+ "operator": "&&",
+ "left": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "data",
+ "range": [
+ 2392,
+ 2396
+ ],
+ "loc": {
+ "start": {
+ "line": 77,
+ "column": 14
+ },
+ "end": {
+ "line": 77,
+ "column": 18
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "relationships",
+ "range": [
+ 2397,
+ 2410
+ ],
+ "loc": {
+ "start": {
+ "line": 77,
+ "column": 19
+ },
+ "end": {
+ "line": 77,
+ "column": 32
+ }
+ }
+ },
+ "range": [
+ 2392,
+ 2410
+ ],
+ "loc": {
+ "start": {
+ "line": 77,
+ "column": 14
+ },
+ "end": {
+ "line": 77,
+ "column": 32
+ }
+ }
+ },
+ "right": {
+ "type": "MemberExpression",
+ "computed": true,
+ "object": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "data",
+ "range": [
+ 2414,
+ 2418
+ ],
+ "loc": {
+ "start": {
+ "line": 77,
+ "column": 36
+ },
+ "end": {
+ "line": 77,
+ "column": 40
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "relationships",
+ "range": [
+ 2419,
+ 2432
+ ],
+ "loc": {
+ "start": {
+ "line": 77,
+ "column": 41
+ },
+ "end": {
+ "line": 77,
+ "column": 54
+ }
+ }
+ },
+ "range": [
+ 2414,
+ 2432
+ ],
+ "loc": {
+ "start": {
+ "line": 77,
+ "column": 36
+ },
+ "end": {
+ "line": 77,
+ "column": 54
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "name",
+ "range": [
+ 2433,
+ 2437
+ ],
+ "loc": {
+ "start": {
+ "line": 77,
+ "column": 55
+ },
+ "end": {
+ "line": 77,
+ "column": 59
+ }
+ }
+ },
+ "range": [
+ 2414,
+ 2438
+ ],
+ "loc": {
+ "start": {
+ "line": 77,
+ "column": 36
+ },
+ "end": {
+ "line": 77,
+ "column": 60
+ }
+ }
+ },
+ "range": [
+ 2392,
+ 2438
+ ],
+ "loc": {
+ "start": {
+ "line": 77,
+ "column": 14
+ },
+ "end": {
+ "line": 77,
+ "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": [
+ 2458,
+ 2462
+ ],
+ "loc": {
+ "start": {
+ "line": 78,
+ "column": 16
+ },
+ "end": {
+ "line": 78,
+ "column": 20
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "relationships",
+ "range": [
+ 2463,
+ 2476
+ ],
+ "loc": {
+ "start": {
+ "line": 78,
+ "column": 21
+ },
+ "end": {
+ "line": 78,
+ "column": 34
+ }
+ }
+ },
+ "range": [
+ 2458,
+ 2476
+ ],
+ "loc": {
+ "start": {
+ "line": 78,
+ "column": 16
+ },
+ "end": {
+ "line": 78,
+ "column": 34
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "name",
+ "range": [
+ 2477,
+ 2481
+ ],
+ "loc": {
+ "start": {
+ "line": 78,
+ "column": 35
+ },
+ "end": {
+ "line": 78,
+ "column": 39
+ }
+ }
+ },
+ "range": [
+ 2458,
+ 2482
+ ],
+ "loc": {
+ "start": {
+ "line": 78,
+ "column": 16
+ },
+ "end": {
+ "line": 78,
+ "column": 40
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "data",
+ "range": [
+ 2483,
+ 2487
+ ],
+ "loc": {
+ "start": {
+ "line": 78,
+ "column": 41
+ },
+ "end": {
+ "line": 78,
+ "column": 45
+ }
+ }
+ },
+ "range": [
+ 2458,
+ 2487
+ ],
+ "loc": {
+ "start": {
+ "line": 78,
+ "column": 16
+ },
+ "end": {
+ "line": 78,
+ "column": 45
+ }
+ }
+ },
+ "right": {
+ "type": "Literal",
+ "value": null,
+ "raw": "null",
+ "range": [
+ 2492,
+ 2496
+ ],
+ "loc": {
+ "start": {
+ "line": 78,
+ "column": 50
+ },
+ "end": {
+ "line": 78,
+ "column": 54
+ }
+ }
+ },
+ "range": [
+ 2458,
+ 2496
+ ],
+ "loc": {
+ "start": {
+ "line": 78,
+ "column": 16
+ },
+ "end": {
+ "line": 78,
+ "column": 54
+ }
+ }
+ },
+ "consequent": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "ReturnStatement",
+ "argument": {
+ "type": "ArrayExpression",
+ "elements": [],
+ "range": [
+ 2521,
+ 2523
+ ],
+ "loc": {
+ "start": {
+ "line": 79,
+ "column": 21
+ },
+ "end": {
+ "line": 79,
+ "column": 23
+ }
+ }
+ },
+ "range": [
+ 2514,
+ 2524
+ ],
+ "loc": {
+ "start": {
+ "line": 79,
+ "column": 14
+ },
+ "end": {
+ "line": 79,
+ "column": 24
+ }
+ }
+ }
+ ],
+ "range": [
+ 2498,
+ 2538
+ ],
+ "loc": {
+ "start": {
+ "line": 78,
+ "column": 56
+ },
+ "end": {
+ "line": 80,
+ "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": [
+ 2548,
+ 2552
+ ],
+ "loc": {
+ "start": {
+ "line": 80,
+ "column": 23
+ },
+ "end": {
+ "line": 80,
+ "column": 27
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "relationships",
+ "range": [
+ 2553,
+ 2566
+ ],
+ "loc": {
+ "start": {
+ "line": 80,
+ "column": 28
+ },
+ "end": {
+ "line": 80,
+ "column": 41
+ }
+ }
+ },
+ "range": [
+ 2548,
+ 2566
+ ],
+ "loc": {
+ "start": {
+ "line": 80,
+ "column": 23
+ },
+ "end": {
+ "line": 80,
+ "column": 41
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "name",
+ "range": [
+ 2567,
+ 2571
+ ],
+ "loc": {
+ "start": {
+ "line": 80,
+ "column": 42
+ },
+ "end": {
+ "line": 80,
+ "column": 46
+ }
+ }
+ },
+ "range": [
+ 2548,
+ 2572
+ ],
+ "loc": {
+ "start": {
+ "line": 80,
+ "column": 23
+ },
+ "end": {
+ "line": 80,
+ "column": 47
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "data",
+ "range": [
+ 2573,
+ 2577
+ ],
+ "loc": {
+ "start": {
+ "line": 80,
+ "column": 48
+ },
+ "end": {
+ "line": 80,
+ "column": 52
+ }
+ }
+ },
+ "range": [
+ 2548,
+ 2577
+ ],
+ "loc": {
+ "start": {
+ "line": 80,
+ "column": 23
+ },
+ "end": {
+ "line": 80,
+ "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": [
+ 2602,
+ 2606
+ ],
+ "loc": {
+ "start": {
+ "line": 81,
+ "column": 21
+ },
+ "end": {
+ "line": 81,
+ "column": 25
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "relationships",
+ "range": [
+ 2607,
+ 2620
+ ],
+ "loc": {
+ "start": {
+ "line": 81,
+ "column": 26
+ },
+ "end": {
+ "line": 81,
+ "column": 39
+ }
+ }
+ },
+ "range": [
+ 2602,
+ 2620
+ ],
+ "loc": {
+ "start": {
+ "line": 81,
+ "column": 21
+ },
+ "end": {
+ "line": 81,
+ "column": 39
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "name",
+ "range": [
+ 2621,
+ 2625
+ ],
+ "loc": {
+ "start": {
+ "line": 81,
+ "column": 40
+ },
+ "end": {
+ "line": 81,
+ "column": 44
+ }
+ }
+ },
+ "range": [
+ 2602,
+ 2626
+ ],
+ "loc": {
+ "start": {
+ "line": 81,
+ "column": 21
+ },
+ "end": {
+ "line": 81,
+ "column": 45
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "data",
+ "range": [
+ 2627,
+ 2631
+ ],
+ "loc": {
+ "start": {
+ "line": 81,
+ "column": 46
+ },
+ "end": {
+ "line": 81,
+ "column": 50
+ }
+ }
+ },
+ "range": [
+ 2602,
+ 2631
+ ],
+ "loc": {
+ "start": {
+ "line": 81,
+ "column": 21
+ },
+ "end": {
+ "line": 81,
+ "column": 50
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "map",
+ "range": [
+ 2632,
+ 2635
+ ],
+ "loc": {
+ "start": {
+ "line": 81,
+ "column": 51
+ },
+ "end": {
+ "line": 81,
+ "column": 54
+ }
+ }
+ },
+ "range": [
+ 2602,
+ 2635
+ ],
+ "loc": {
+ "start": {
+ "line": 81,
+ "column": 21
+ },
+ "end": {
+ "line": 81,
+ "column": 54
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "ArrowFunctionExpression",
+ "id": null,
+ "params": [
+ {
+ "type": "Identifier",
+ "name": "c",
+ "range": [
+ 2637,
+ 2638
+ ],
+ "loc": {
+ "start": {
+ "line": 81,
+ "column": 56
+ },
+ "end": {
+ "line": 81,
+ "column": 57
+ }
+ }
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "ReturnStatement",
+ "argument": {
+ "type": "CallExpression",
+ "callee": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "ThisExpression",
+ "range": [
+ 2668,
+ 2672
+ ],
+ "loc": {
+ "start": {
+ "line": 82,
+ "column": 23
+ },
+ "end": {
+ "line": 82,
+ "column": 27
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "find",
+ "range": [
+ 2673,
+ 2677
+ ],
+ "loc": {
+ "start": {
+ "line": 82,
+ "column": 28
+ },
+ "end": {
+ "line": 82,
+ "column": 32
+ }
+ }
+ },
+ "range": [
+ 2668,
+ 2677
+ ],
+ "loc": {
+ "start": {
+ "line": 82,
+ "column": 23
+ },
+ "end": {
+ "line": 82,
+ "column": 32
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "c",
+ "range": [
+ 2678,
+ 2679
+ ],
+ "loc": {
+ "start": {
+ "line": 82,
+ "column": 33
+ },
+ "end": {
+ "line": 82,
+ "column": 34
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 2680,
+ 2684
+ ],
+ "loc": {
+ "start": {
+ "line": 82,
+ "column": 35
+ },
+ "end": {
+ "line": 82,
+ "column": 39
+ }
+ }
+ },
+ "range": [
+ 2678,
+ 2684
+ ],
+ "loc": {
+ "start": {
+ "line": 82,
+ "column": 33
+ },
+ "end": {
+ "line": 82,
+ "column": 39
+ }
+ }
+ },
+ {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "c",
+ "range": [
+ 2686,
+ 2687
+ ],
+ "loc": {
+ "start": {
+ "line": 82,
+ "column": 41
+ },
+ "end": {
+ "line": 82,
+ "column": 42
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "id",
+ "range": [
+ 2688,
+ 2690
+ ],
+ "loc": {
+ "start": {
+ "line": 82,
+ "column": 43
+ },
+ "end": {
+ "line": 82,
+ "column": 45
+ }
+ }
+ },
+ "range": [
+ 2686,
+ 2690
+ ],
+ "loc": {
+ "start": {
+ "line": 82,
+ "column": 41
+ },
+ "end": {
+ "line": 82,
+ "column": 45
+ }
+ }
+ }
+ ],
+ "range": [
+ 2668,
+ 2691
+ ],
+ "loc": {
+ "start": {
+ "line": 82,
+ "column": 23
+ },
+ "end": {
+ "line": 82,
+ "column": 46
+ }
+ }
+ },
+ "range": [
+ 2661,
+ 2692
+ ],
+ "loc": {
+ "start": {
+ "line": 82,
+ "column": 16
+ },
+ "end": {
+ "line": 82,
+ "column": 47
+ }
+ }
+ }
+ ],
+ "range": [
+ 2643,
+ 2708
+ ],
+ "loc": {
+ "start": {
+ "line": 81,
+ "column": 62
+ },
+ "end": {
+ "line": 83,
+ "column": 15
+ }
+ }
+ },
+ "generator": false,
+ "expression": false,
+ "range": [
+ 2636,
+ 2708
+ ],
+ "loc": {
+ "start": {
+ "line": 81,
+ "column": 55
+ },
+ "end": {
+ "line": 83,
+ "column": 15
+ }
+ }
+ }
+ ],
+ "range": [
+ 2602,
+ 2709
+ ],
+ "loc": {
+ "start": {
+ "line": 81,
+ "column": 21
+ },
+ "end": {
+ "line": 83,
+ "column": 16
+ }
+ }
+ },
+ "range": [
+ 2595,
+ 2710
+ ],
+ "loc": {
+ "start": {
+ "line": 81,
+ "column": 14
+ },
+ "end": {
+ "line": 83,
+ "column": 17
+ }
+ }
+ }
+ ],
+ "range": [
+ 2579,
+ 2724
+ ],
+ "loc": {
+ "start": {
+ "line": 80,
+ "column": 54
+ },
+ "end": {
+ "line": 84,
+ "column": 13
+ }
+ }
+ },
+ "alternate": null,
+ "range": [
+ 2544,
+ 2724
+ ],
+ "loc": {
+ "start": {
+ "line": 80,
+ "column": 19
+ },
+ "end": {
+ "line": 84,
+ "column": 13
+ }
+ }
+ },
+ "range": [
+ 2454,
+ 2724
+ ],
+ "loc": {
+ "start": {
+ "line": 78,
+ "column": 12
+ },
+ "end": {
+ "line": 84,
+ "column": 13
+ }
+ }
+ }
+ ],
+ "range": [
+ 2440,
+ 2736
+ ],
+ "loc": {
+ "start": {
+ "line": 77,
+ "column": 62
+ },
+ "end": {
+ "line": 85,
+ "column": 11
+ }
+ }
+ },
+ "alternate": null,
+ "range": [
+ 2388,
+ 2736
+ ],
+ "loc": {
+ "start": {
+ "line": 77,
+ "column": 10
+ },
+ "end": {
+ "line": 85,
+ "column": 11
+ }
+ }
+ }
+ ],
+ "range": [
+ 2346,
+ 2746
+ ],
+ "loc": {
+ "start": {
+ "line": 75,
+ "column": 42
+ },
+ "end": {
+ "line": 86,
+ "column": 9
+ }
+ }
+ },
+ "generator": false,
+ "expression": false,
+ "range": [
+ 2325,
+ 2746
+ ],
+ "loc": {
+ "start": {
+ "line": 75,
+ "column": 21
+ },
+ "end": {
+ "line": 86,
+ "column": 9
+ }
+ }
+ },
+ "kind": "init",
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "range": [
+ 2312,
+ 2746
+ ],
+ "loc": {
+ "start": {
+ "line": 75,
+ "column": 8
+ },
+ "end": {
+ "line": 86,
+ "column": 9
+ }
+ }
+ }
+ ],
+ "range": [
+ 2210,
+ 2754
+ ],
+ "loc": {
+ "start": {
+ "line": 71,
+ "column": 13
+ },
+ "end": {
+ "line": 87,
+ "column": 7
+ }
+ }
+ },
+ "range": [
+ 2203,
+ 2755
+ ],
+ "loc": {
+ "start": {
+ "line": 71,
+ "column": 6
+ },
+ "end": {
+ "line": 87,
+ "column": 8
+ }
+ }
+ }
+ ],
+ "range": [
+ 2195,
+ 2761
+ ],
+ "loc": {
+ "start": {
+ "line": 70,
+ "column": 11
+ },
+ "end": {
+ "line": 88,
+ "column": 5
+ }
+ }
+ },
+ "range": [
+ 2104,
+ 2761
+ ],
+ "loc": {
+ "start": {
+ "line": 68,
+ "column": 4
+ },
+ "end": {
+ "line": 88,
+ "column": 5
+ }
+ }
+ }
+ ],
+ "range": [
+ 2098,
+ 2765
+ ],
+ "loc": {
+ "start": {
+ "line": 67,
+ "column": 32
+ },
+ "end": {
+ "line": 89,
+ "column": 3
+ }
+ }
+ },
+ "generator": false,
+ "expression": false,
+ "range": [
+ 2082,
+ 2765
+ ],
+ "loc": {
+ "start": {
+ "line": 67,
+ "column": 16
+ },
+ "end": {
+ "line": 89,
+ "column": 3
+ }
+ }
+ },
+ "kind": "method",
+ "computed": false,
+ "range": [
+ 2068,
+ 2765
+ ],
+ "loc": {
+ "start": {
+ "line": 67,
+ "column": 2
+ },
+ "end": {
+ "line": 89,
+ "column": 3
+ }
+ },
+ "leadingComments": [
+ {
+ "type": "Block",
+ "value": "*\n * Creates a field definition for an has-many relationship.\n *\n * @since 0.1.0\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": [
+ 1727,
+ 2065
+ ],
+ "loc": {
+ "start": {
+ "line": 58,
+ "column": 2
+ },
+ "end": {
+ "line": 66,
+ "column": 5
+ }
+ }
+ }
+ ],
+ "static": true
+ },
+ {
+ "type": "MethodDefinition",
+ "key": {
+ "type": "Identifier",
+ "name": "constructor",
+ "range": [
+ 2769,
+ 2780
+ ],
+ "loc": {
+ "start": {
+ "line": 91,
+ "column": 2
+ },
+ "end": {
+ "line": 91,
+ "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": [
+ 2789,
+ 2793
+ ],
+ "loc": {
+ "start": {
+ "line": 92,
+ "column": 4
+ },
+ "end": {
+ "line": 92,
+ "column": 8
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "_data",
+ "range": [
+ 2794,
+ 2799
+ ],
+ "loc": {
+ "start": {
+ "line": 92,
+ "column": 9
+ },
+ "end": {
+ "line": 92,
+ "column": 14
+ }
+ }
+ },
+ "range": [
+ 2789,
+ 2799
+ ],
+ "loc": {
+ "start": {
+ "line": 92,
+ "column": 4
+ },
+ "end": {
+ "line": 92,
+ "column": 14
+ }
+ }
+ },
+ "right": {
+ "type": "ObjectExpression",
+ "properties": [],
+ "range": [
+ 2802,
+ 2804
+ ],
+ "loc": {
+ "start": {
+ "line": 92,
+ "column": 17
+ },
+ "end": {
+ "line": 92,
+ "column": 19
+ }
+ }
+ },
+ "range": [
+ 2789,
+ 2804
+ ],
+ "loc": {
+ "start": {
+ "line": 92,
+ "column": 4
+ },
+ "end": {
+ "line": 92,
+ "column": 19
+ }
+ }
+ },
+ "range": [
+ 2789,
+ 2805
+ ],
+ "loc": {
+ "start": {
+ "line": 92,
+ "column": 4
+ },
+ "end": {
+ "line": 92,
+ "column": 20
+ }
+ }
+ },
+ {
+ "type": "ExpressionStatement",
+ "expression": {
+ "type": "AssignmentExpression",
+ "operator": "=",
+ "left": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "ThisExpression",
+ "range": [
+ 2810,
+ 2814
+ ],
+ "loc": {
+ "start": {
+ "line": 93,
+ "column": 4
+ },
+ "end": {
+ "line": 93,
+ "column": 8
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "_types",
+ "range": [
+ 2815,
+ 2821
+ ],
+ "loc": {
+ "start": {
+ "line": 93,
+ "column": 9
+ },
+ "end": {
+ "line": 93,
+ "column": 15
+ }
+ }
+ },
+ "range": [
+ 2810,
+ 2821
+ ],
+ "loc": {
+ "start": {
+ "line": 93,
+ "column": 4
+ },
+ "end": {
+ "line": 93,
+ "column": 15
+ }
+ }
+ },
+ "right": {
+ "type": "ObjectExpression",
+ "properties": [],
+ "range": [
+ 2824,
+ 2826
+ ],
+ "loc": {
+ "start": {
+ "line": 93,
+ "column": 18
+ },
+ "end": {
+ "line": 93,
+ "column": 20
+ }
+ }
+ },
+ "range": [
+ 2810,
+ 2826
+ ],
+ "loc": {
+ "start": {
+ "line": 93,
+ "column": 4
+ },
+ "end": {
+ "line": 93,
+ "column": 20
+ }
+ }
+ },
+ "range": [
+ 2810,
+ 2827
+ ],
+ "loc": {
+ "start": {
+ "line": 93,
+ "column": 4
+ },
+ "end": {
+ "line": 93,
+ "column": 21
+ }
+ }
+ }
+ ],
+ "range": [
+ 2783,
+ 2831
+ ],
+ "loc": {
+ "start": {
+ "line": 91,
+ "column": 16
+ },
+ "end": {
+ "line": 94,
+ "column": 3
+ }
+ }
+ },
+ "generator": false,
+ "expression": false,
+ "range": [
+ 2780,
+ 2831
+ ],
+ "loc": {
+ "start": {
+ "line": 91,
+ "column": 13
+ },
+ "end": {
+ "line": 94,
+ "column": 3
+ }
+ }
+ },
+ "kind": "constructor",
+ "computed": false,
+ "range": [
+ 2769,
+ 2831
+ ],
+ "loc": {
+ "start": {
+ "line": 91,
+ "column": 2
+ },
+ "end": {
+ "line": 94,
+ "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 * @since 0.1.0\n * @param {!Object} object - Resource Object to add. See:\n http://jsonapi.org/format/#document-resource-objects\n * @return {undefined} - Nothing.\n ",
+ "range": [
+ 2835,
+ 3127
+ ],
+ "loc": {
+ "start": {
+ "line": 96,
+ "column": 2
+ },
+ "end": {
+ "line": 104,
+ "column": 5
+ }
+ }
+ }
+ ],
+ "static": false
+ },
+ {
+ "type": "MethodDefinition",
+ "key": {
+ "type": "Identifier",
+ "name": "add",
+ "range": [
+ 3130,
+ 3133
+ ],
+ "loc": {
+ "start": {
+ "line": 105,
+ "column": 2
+ },
+ "end": {
+ "line": 105,
+ "column": 5
+ }
+ }
+ },
+ "value": {
+ "type": "FunctionExpression",
+ "id": null,
+ "params": [
+ {
+ "type": "Identifier",
+ "name": "object",
+ "range": [
+ 3134,
+ 3140
+ ],
+ "loc": {
+ "start": {
+ "line": 105,
+ "column": 6
+ },
+ "end": {
+ "line": 105,
+ "column": 12
+ }
+ }
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "IfStatement",
+ "test": {
+ "type": "Identifier",
+ "name": "object",
+ "range": [
+ 3152,
+ 3158
+ ],
+ "loc": {
+ "start": {
+ "line": 106,
+ "column": 8
+ },
+ "end": {
+ "line": 106,
+ "column": 14
+ }
+ }
+ },
+ "consequent": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "IfStatement",
+ "test": {
+ "type": "LogicalExpression",
+ "operator": "&&",
+ "left": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "object",
+ "range": [
+ 3172,
+ 3178
+ ],
+ "loc": {
+ "start": {
+ "line": 107,
+ "column": 10
+ },
+ "end": {
+ "line": 107,
+ "column": 16
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 3179,
+ 3183
+ ],
+ "loc": {
+ "start": {
+ "line": 107,
+ "column": 17
+ },
+ "end": {
+ "line": 107,
+ "column": 21
+ }
+ }
+ },
+ "range": [
+ 3172,
+ 3183
+ ],
+ "loc": {
+ "start": {
+ "line": 107,
+ "column": 10
+ },
+ "end": {
+ "line": 107,
+ "column": 21
+ }
+ }
+ },
+ "right": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "object",
+ "range": [
+ 3187,
+ 3193
+ ],
+ "loc": {
+ "start": {
+ "line": 107,
+ "column": 25
+ },
+ "end": {
+ "line": 107,
+ "column": 31
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "id",
+ "range": [
+ 3194,
+ 3196
+ ],
+ "loc": {
+ "start": {
+ "line": 107,
+ "column": 32
+ },
+ "end": {
+ "line": 107,
+ "column": 34
+ }
+ }
+ },
+ "range": [
+ 3187,
+ 3196
+ ],
+ "loc": {
+ "start": {
+ "line": 107,
+ "column": 25
+ },
+ "end": {
+ "line": 107,
+ "column": 34
+ }
+ }
+ },
+ "range": [
+ 3172,
+ 3196
+ ],
+ "loc": {
+ "start": {
+ "line": 107,
+ "column": 10
+ },
+ "end": {
+ "line": 107,
+ "column": 34
+ }
+ }
+ },
+ "consequent": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "id": {
+ "type": "Identifier",
+ "name": "resource",
+ "range": [
+ 3212,
+ 3220
+ ],
+ "loc": {
+ "start": {
+ "line": 108,
+ "column": 12
+ },
+ "end": {
+ "line": 108,
+ "column": 20
+ }
+ }
+ },
+ "init": {
+ "type": "CallExpression",
+ "callee": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "ThisExpression",
+ "range": [
+ 3223,
+ 3227
+ ],
+ "loc": {
+ "start": {
+ "line": 108,
+ "column": 23
+ },
+ "end": {
+ "line": 108,
+ "column": 27
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "find",
+ "range": [
+ 3228,
+ 3232
+ ],
+ "loc": {
+ "start": {
+ "line": 108,
+ "column": 28
+ },
+ "end": {
+ "line": 108,
+ "column": 32
+ }
+ }
+ },
+ "range": [
+ 3223,
+ 3232
+ ],
+ "loc": {
+ "start": {
+ "line": 108,
+ "column": 23
+ },
+ "end": {
+ "line": 108,
+ "column": 32
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "object",
+ "range": [
+ 3233,
+ 3239
+ ],
+ "loc": {
+ "start": {
+ "line": 108,
+ "column": 33
+ },
+ "end": {
+ "line": 108,
+ "column": 39
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 3240,
+ 3244
+ ],
+ "loc": {
+ "start": {
+ "line": 108,
+ "column": 40
+ },
+ "end": {
+ "line": 108,
+ "column": 44
+ }
+ }
+ },
+ "range": [
+ 3233,
+ 3244
+ ],
+ "loc": {
+ "start": {
+ "line": 108,
+ "column": 33
+ },
+ "end": {
+ "line": 108,
+ "column": 44
+ }
+ }
+ },
+ {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "object",
+ "range": [
+ 3246,
+ 3252
+ ],
+ "loc": {
+ "start": {
+ "line": 108,
+ "column": 46
+ },
+ "end": {
+ "line": 108,
+ "column": 52
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "id",
+ "range": [
+ 3253,
+ 3255
+ ],
+ "loc": {
+ "start": {
+ "line": 108,
+ "column": 53
+ },
+ "end": {
+ "line": 108,
+ "column": 55
+ }
+ }
+ },
+ "range": [
+ 3246,
+ 3255
+ ],
+ "loc": {
+ "start": {
+ "line": 108,
+ "column": 46
+ },
+ "end": {
+ "line": 108,
+ "column": 55
+ }
+ }
+ }
+ ],
+ "range": [
+ 3223,
+ 3256
+ ],
+ "loc": {
+ "start": {
+ "line": 108,
+ "column": 23
+ },
+ "end": {
+ "line": 108,
+ "column": 56
+ }
+ }
+ },
+ "range": [
+ 3212,
+ 3256
+ ],
+ "loc": {
+ "start": {
+ "line": 108,
+ "column": 12
+ },
+ "end": {
+ "line": 108,
+ "column": 56
+ }
+ }
+ }
+ ],
+ "kind": "let",
+ "range": [
+ 3208,
+ 3257
+ ],
+ "loc": {
+ "start": {
+ "line": 108,
+ "column": 8
+ },
+ "end": {
+ "line": 108,
+ "column": 57
+ }
+ }
+ },
+ {
+ "type": "VariableDeclaration",
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "id": {
+ "type": "Identifier",
+ "name": "definition",
+ "range": [
+ 3270,
+ 3280
+ ],
+ "loc": {
+ "start": {
+ "line": 109,
+ "column": 12
+ },
+ "end": {
+ "line": 109,
+ "column": 22
+ }
+ }
+ },
+ "init": {
+ "type": "MemberExpression",
+ "computed": true,
+ "object": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "ThisExpression",
+ "range": [
+ 3283,
+ 3287
+ ],
+ "loc": {
+ "start": {
+ "line": 109,
+ "column": 25
+ },
+ "end": {
+ "line": 109,
+ "column": 29
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "_types",
+ "range": [
+ 3288,
+ 3294
+ ],
+ "loc": {
+ "start": {
+ "line": 109,
+ "column": 30
+ },
+ "end": {
+ "line": 109,
+ "column": 36
+ }
+ }
+ },
+ "range": [
+ 3283,
+ 3294
+ ],
+ "loc": {
+ "start": {
+ "line": 109,
+ "column": 25
+ },
+ "end": {
+ "line": 109,
+ "column": 36
+ }
+ }
+ },
+ "property": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "object",
+ "range": [
+ 3295,
+ 3301
+ ],
+ "loc": {
+ "start": {
+ "line": 109,
+ "column": 37
+ },
+ "end": {
+ "line": 109,
+ "column": 43
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 3302,
+ 3306
+ ],
+ "loc": {
+ "start": {
+ "line": 109,
+ "column": 44
+ },
+ "end": {
+ "line": 109,
+ "column": 48
+ }
+ }
+ },
+ "range": [
+ 3295,
+ 3306
+ ],
+ "loc": {
+ "start": {
+ "line": 109,
+ "column": 37
+ },
+ "end": {
+ "line": 109,
+ "column": 48
+ }
+ }
+ },
+ "range": [
+ 3283,
+ 3307
+ ],
+ "loc": {
+ "start": {
+ "line": 109,
+ "column": 25
+ },
+ "end": {
+ "line": 109,
+ "column": 49
+ }
+ }
+ },
+ "range": [
+ 3270,
+ 3307
+ ],
+ "loc": {
+ "start": {
+ "line": 109,
+ "column": 12
+ },
+ "end": {
+ "line": 109,
+ "column": 49
+ }
+ }
+ }
+ ],
+ "kind": "let",
+ "range": [
+ 3266,
+ 3308
+ ],
+ "loc": {
+ "start": {
+ "line": 109,
+ "column": 8
+ },
+ "end": {
+ "line": 109,
+ "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": [
+ 3317,
+ 3323
+ ],
+ "loc": {
+ "start": {
+ "line": 110,
+ "column": 8
+ },
+ "end": {
+ "line": 110,
+ "column": 14
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "keys",
+ "range": [
+ 3324,
+ 3328
+ ],
+ "loc": {
+ "start": {
+ "line": 110,
+ "column": 15
+ },
+ "end": {
+ "line": 110,
+ "column": 19
+ }
+ }
+ },
+ "range": [
+ 3317,
+ 3328
+ ],
+ "loc": {
+ "start": {
+ "line": 110,
+ "column": 8
+ },
+ "end": {
+ "line": 110,
+ "column": 19
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "Identifier",
+ "name": "definition",
+ "range": [
+ 3329,
+ 3339
+ ],
+ "loc": {
+ "start": {
+ "line": 110,
+ "column": 20
+ },
+ "end": {
+ "line": 110,
+ "column": 30
+ }
+ }
+ }
+ ],
+ "range": [
+ 3317,
+ 3340
+ ],
+ "loc": {
+ "start": {
+ "line": 110,
+ "column": 8
+ },
+ "end": {
+ "line": 110,
+ "column": 31
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "forEach",
+ "range": [
+ 3341,
+ 3348
+ ],
+ "loc": {
+ "start": {
+ "line": 110,
+ "column": 32
+ },
+ "end": {
+ "line": 110,
+ "column": 39
+ }
+ }
+ },
+ "range": [
+ 3317,
+ 3348
+ ],
+ "loc": {
+ "start": {
+ "line": 110,
+ "column": 8
+ },
+ "end": {
+ "line": 110,
+ "column": 39
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "ArrowFunctionExpression",
+ "id": null,
+ "params": [
+ {
+ "type": "Identifier",
+ "name": "fieldName",
+ "range": [
+ 3349,
+ 3358
+ ],
+ "loc": {
+ "start": {
+ "line": 110,
+ "column": 40
+ },
+ "end": {
+ "line": 110,
+ "column": 49
+ }
+ }
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "IfStatement",
+ "test": {
+ "type": "BinaryExpression",
+ "operator": "!==",
+ "left": {
+ "type": "MemberExpression",
+ "computed": true,
+ "object": {
+ "type": "Identifier",
+ "name": "fieldName",
+ "range": [
+ 3378,
+ 3387
+ ],
+ "loc": {
+ "start": {
+ "line": 111,
+ "column": 14
+ },
+ "end": {
+ "line": 111,
+ "column": 23
+ }
+ }
+ },
+ "property": {
+ "type": "Literal",
+ "value": 0,
+ "raw": "0",
+ "range": [
+ 3388,
+ 3389
+ ],
+ "loc": {
+ "start": {
+ "line": 111,
+ "column": 24
+ },
+ "end": {
+ "line": 111,
+ "column": 25
+ }
+ }
+ },
+ "range": [
+ 3378,
+ 3390
+ ],
+ "loc": {
+ "start": {
+ "line": 111,
+ "column": 14
+ },
+ "end": {
+ "line": 111,
+ "column": 26
+ }
+ }
+ },
+ "right": {
+ "type": "Literal",
+ "value": "_",
+ "raw": "\"_\"",
+ "range": [
+ 3395,
+ 3398
+ ],
+ "loc": {
+ "start": {
+ "line": 111,
+ "column": 31
+ },
+ "end": {
+ "line": 111,
+ "column": 34
+ }
+ }
+ },
+ "range": [
+ 3378,
+ 3398
+ ],
+ "loc": {
+ "start": {
+ "line": 111,
+ "column": 14
+ },
+ "end": {
+ "line": 111,
+ "column": 34
+ }
+ }
+ },
+ "consequent": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "expression": {
+ "type": "CallExpression",
+ "callee": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "ThisExpression",
+ "range": [
+ 3414,
+ 3418
+ ],
+ "loc": {
+ "start": {
+ "line": 112,
+ "column": 12
+ },
+ "end": {
+ "line": 112,
+ "column": 16
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "_addField",
+ "range": [
+ 3419,
+ 3428
+ ],
+ "loc": {
+ "start": {
+ "line": 112,
+ "column": 17
+ },
+ "end": {
+ "line": 112,
+ "column": 26
+ }
+ }
+ },
+ "range": [
+ 3414,
+ 3428
+ ],
+ "loc": {
+ "start": {
+ "line": 112,
+ "column": 12
+ },
+ "end": {
+ "line": 112,
+ "column": 26
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "Identifier",
+ "name": "object",
+ "range": [
+ 3429,
+ 3435
+ ],
+ "loc": {
+ "start": {
+ "line": 112,
+ "column": 27
+ },
+ "end": {
+ "line": 112,
+ "column": 33
+ }
+ }
+ },
+ {
+ "type": "Identifier",
+ "name": "resource",
+ "range": [
+ 3437,
+ 3445
+ ],
+ "loc": {
+ "start": {
+ "line": 112,
+ "column": 35
+ },
+ "end": {
+ "line": 112,
+ "column": 43
+ }
+ }
+ },
+ {
+ "type": "Identifier",
+ "name": "definition",
+ "range": [
+ 3447,
+ 3457
+ ],
+ "loc": {
+ "start": {
+ "line": 112,
+ "column": 45
+ },
+ "end": {
+ "line": 112,
+ "column": 55
+ }
+ }
+ },
+ {
+ "type": "Identifier",
+ "name": "fieldName",
+ "range": [
+ 3459,
+ 3468
+ ],
+ "loc": {
+ "start": {
+ "line": 112,
+ "column": 57
+ },
+ "end": {
+ "line": 112,
+ "column": 66
+ }
+ }
+ }
+ ],
+ "range": [
+ 3414,
+ 3469
+ ],
+ "loc": {
+ "start": {
+ "line": 112,
+ "column": 12
+ },
+ "end": {
+ "line": 112,
+ "column": 67
+ }
+ }
+ },
+ "range": [
+ 3414,
+ 3470
+ ],
+ "loc": {
+ "start": {
+ "line": 112,
+ "column": 12
+ },
+ "end": {
+ "line": 112,
+ "column": 68
+ }
+ }
+ }
+ ],
+ "range": [
+ 3400,
+ 3482
+ ],
+ "loc": {
+ "start": {
+ "line": 111,
+ "column": 36
+ },
+ "end": {
+ "line": 113,
+ "column": 11
+ }
+ }
+ },
+ "alternate": null,
+ "range": [
+ 3374,
+ 3482
+ ],
+ "loc": {
+ "start": {
+ "line": 111,
+ "column": 10
+ },
+ "end": {
+ "line": 113,
+ "column": 11
+ }
+ }
+ }
+ ],
+ "range": [
+ 3362,
+ 3492
+ ],
+ "loc": {
+ "start": {
+ "line": 110,
+ "column": 53
+ },
+ "end": {
+ "line": 114,
+ "column": 9
+ }
+ }
+ },
+ "generator": false,
+ "expression": false,
+ "range": [
+ 3349,
+ 3492
+ ],
+ "loc": {
+ "start": {
+ "line": 110,
+ "column": 40
+ },
+ "end": {
+ "line": 114,
+ "column": 9
+ }
+ }
+ }
+ ],
+ "range": [
+ 3317,
+ 3493
+ ],
+ "loc": {
+ "start": {
+ "line": 110,
+ "column": 8
+ },
+ "end": {
+ "line": 114,
+ "column": 10
+ }
+ }
+ },
+ "range": [
+ 3317,
+ 3494
+ ],
+ "loc": {
+ "start": {
+ "line": 110,
+ "column": 8
+ },
+ "end": {
+ "line": 114,
+ "column": 11
+ }
+ }
+ }
+ ],
+ "range": [
+ 3198,
+ 3502
+ ],
+ "loc": {
+ "start": {
+ "line": 107,
+ "column": 36
+ },
+ "end": {
+ "line": 115,
+ "column": 7
+ }
+ }
+ },
+ "alternate": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "ThrowStatement",
+ "argument": {
+ "type": "NewExpression",
+ "callee": {
+ "type": "Identifier",
+ "name": "TypeError",
+ "range": [
+ 3528,
+ 3537
+ ],
+ "loc": {
+ "start": {
+ "line": 116,
+ "column": 18
+ },
+ "end": {
+ "line": 116,
+ "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": [
+ 3538,
+ 3572
+ ],
+ "loc": {
+ "start": {
+ "line": 116,
+ "column": 28
+ },
+ "end": {
+ "line": 116,
+ "column": 62
+ }
+ }
+ }
+ ],
+ "expressions": [],
+ "range": [
+ 3538,
+ 3572
+ ],
+ "loc": {
+ "start": {
+ "line": 116,
+ "column": 28
+ },
+ "end": {
+ "line": 116,
+ "column": 62
+ }
+ }
+ }
+ ],
+ "range": [
+ 3524,
+ 3573
+ ],
+ "loc": {
+ "start": {
+ "line": 116,
+ "column": 14
+ },
+ "end": {
+ "line": 116,
+ "column": 63
+ }
+ }
+ },
+ "range": [
+ 3518,
+ 3574
+ ],
+ "loc": {
+ "start": {
+ "line": 116,
+ "column": 8
+ },
+ "end": {
+ "line": 116,
+ "column": 64
+ }
+ }
+ }
+ ],
+ "range": [
+ 3508,
+ 3582
+ ],
+ "loc": {
+ "start": {
+ "line": 115,
+ "column": 13
+ },
+ "end": {
+ "line": 117,
+ "column": 7
+ }
+ }
+ },
+ "range": [
+ 3168,
+ 3582
+ ],
+ "loc": {
+ "start": {
+ "line": 107,
+ "column": 6
+ },
+ "end": {
+ "line": 117,
+ "column": 7
+ }
+ }
+ }
+ ],
+ "range": [
+ 3160,
+ 3588
+ ],
+ "loc": {
+ "start": {
+ "line": 106,
+ "column": 16
+ },
+ "end": {
+ "line": 118,
+ "column": 5
+ }
+ }
+ },
+ "alternate": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "ThrowStatement",
+ "argument": {
+ "type": "NewExpression",
+ "callee": {
+ "type": "Identifier",
+ "name": "TypeError",
+ "range": [
+ 3612,
+ 3621
+ ],
+ "loc": {
+ "start": {
+ "line": 119,
+ "column": 16
+ },
+ "end": {
+ "line": 119,
+ "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": [
+ 3622,
+ 3652
+ ],
+ "loc": {
+ "start": {
+ "line": 119,
+ "column": 26
+ },
+ "end": {
+ "line": 119,
+ "column": 56
+ }
+ }
+ }
+ ],
+ "expressions": [],
+ "range": [
+ 3622,
+ 3652
+ ],
+ "loc": {
+ "start": {
+ "line": 119,
+ "column": 26
+ },
+ "end": {
+ "line": 119,
+ "column": 56
+ }
+ }
+ }
+ ],
+ "range": [
+ 3608,
+ 3653
+ ],
+ "loc": {
+ "start": {
+ "line": 119,
+ "column": 12
+ },
+ "end": {
+ "line": 119,
+ "column": 57
+ }
+ }
+ },
+ "range": [
+ 3602,
+ 3654
+ ],
+ "loc": {
+ "start": {
+ "line": 119,
+ "column": 6
+ },
+ "end": {
+ "line": 119,
+ "column": 58
+ }
+ }
+ }
+ ],
+ "range": [
+ 3594,
+ 3660
+ ],
+ "loc": {
+ "start": {
+ "line": 118,
+ "column": 11
+ },
+ "end": {
+ "line": 120,
+ "column": 5
+ }
+ }
+ },
+ "range": [
+ 3148,
+ 3660
+ ],
+ "loc": {
+ "start": {
+ "line": 106,
+ "column": 4
+ },
+ "end": {
+ "line": 120,
+ "column": 5
+ }
+ }
+ }
+ ],
+ "range": [
+ 3142,
+ 3664
+ ],
+ "loc": {
+ "start": {
+ "line": 105,
+ "column": 14
+ },
+ "end": {
+ "line": 121,
+ "column": 3
+ }
+ }
+ },
+ "generator": false,
+ "expression": false,
+ "range": [
+ 3133,
+ 3664
+ ],
+ "loc": {
+ "start": {
+ "line": 105,
+ "column": 5
+ },
+ "end": {
+ "line": 121,
+ "column": 3
+ }
+ }
+ },
+ "kind": "method",
+ "computed": false,
+ "range": [
+ 3130,
+ 3664
+ ],
+ "loc": {
+ "start": {
+ "line": 105,
+ "column": 2
+ },
+ "end": {
+ "line": 121,
+ "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 * @since 0.1.0\n * @param {!Object} object - Resource Object to add. See:\n http://jsonapi.org/format/#document-resource-objects\n * @return {undefined} - Nothing.\n ",
+ "range": [
+ 2835,
+ 3127
+ ],
+ "loc": {
+ "start": {
+ "line": 96,
+ "column": 2
+ },
+ "end": {
+ "line": 104,
+ "column": 5
+ }
+ }
+ }
+ ],
+ "trailingComments": [
+ {
+ "type": "Block",
+ "value": "*\n * Defines a type of resource.\n *\n * @since 0.2.0\n * @param {!string|string[]} names - Name(s) of the resource.\n * @param {!Object} definition - The resource's definition.\n * @return {undefined} - Nothing.\n ",
+ "range": [
+ 3668,
+ 3895
+ ],
+ "loc": {
+ "start": {
+ "line": 123,
+ "column": 2
+ },
+ "end": {
+ "line": 130,
+ "column": 5
+ }
+ }
+ }
+ ],
+ "static": false
+ },
+ {
+ "type": "MethodDefinition",
+ "key": {
+ "type": "Identifier",
+ "name": "define",
+ "range": [
+ 3898,
+ 3904
+ ],
+ "loc": {
+ "start": {
+ "line": 131,
+ "column": 2
+ },
+ "end": {
+ "line": 131,
+ "column": 8
+ }
+ }
+ },
+ "value": {
+ "type": "FunctionExpression",
+ "id": null,
+ "params": [
+ {
+ "type": "Identifier",
+ "name": "names",
+ "range": [
+ 3905,
+ 3910
+ ],
+ "loc": {
+ "start": {
+ "line": 131,
+ "column": 9
+ },
+ "end": {
+ "line": 131,
+ "column": 14
+ }
+ }
+ },
+ {
+ "type": "Identifier",
+ "name": "definition",
+ "range": [
+ 3912,
+ 3922
+ ],
+ "loc": {
+ "start": {
+ "line": 131,
+ "column": 16
+ },
+ "end": {
+ "line": 131,
+ "column": 26
+ }
+ }
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "expression": {
+ "type": "AssignmentExpression",
+ "operator": "=",
+ "left": {
+ "type": "Identifier",
+ "name": "names",
+ "range": [
+ 3930,
+ 3935
+ ],
+ "loc": {
+ "start": {
+ "line": 132,
+ "column": 4
+ },
+ "end": {
+ "line": 132,
+ "column": 9
+ }
+ }
+ },
+ "right": {
+ "type": "ConditionalExpression",
+ "test": {
+ "type": "BinaryExpression",
+ "operator": "===",
+ "left": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "names",
+ "range": [
+ 3939,
+ 3944
+ ],
+ "loc": {
+ "start": {
+ "line": 132,
+ "column": 13
+ },
+ "end": {
+ "line": 132,
+ "column": 18
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "constructor",
+ "range": [
+ 3945,
+ 3956
+ ],
+ "loc": {
+ "start": {
+ "line": 132,
+ "column": 19
+ },
+ "end": {
+ "line": 132,
+ "column": 30
+ }
+ }
+ },
+ "range": [
+ 3939,
+ 3956
+ ],
+ "loc": {
+ "start": {
+ "line": 132,
+ "column": 13
+ },
+ "end": {
+ "line": 132,
+ "column": 30
+ }
+ }
+ },
+ "right": {
+ "type": "Identifier",
+ "name": "Array",
+ "range": [
+ 3961,
+ 3966
+ ],
+ "loc": {
+ "start": {
+ "line": 132,
+ "column": 35
+ },
+ "end": {
+ "line": 132,
+ "column": 40
+ }
+ }
+ },
+ "range": [
+ 3939,
+ 3966
+ ],
+ "loc": {
+ "start": {
+ "line": 132,
+ "column": 13
+ },
+ "end": {
+ "line": 132,
+ "column": 40
+ }
+ }
+ },
+ "consequent": {
+ "type": "Identifier",
+ "name": "names",
+ "range": [
+ 3970,
+ 3975
+ ],
+ "loc": {
+ "start": {
+ "line": 132,
+ "column": 44
+ },
+ "end": {
+ "line": 132,
+ "column": 49
+ }
+ }
+ },
+ "alternate": {
+ "type": "ArrayExpression",
+ "elements": [
+ {
+ "type": "Identifier",
+ "name": "names",
+ "range": [
+ 3980,
+ 3985
+ ],
+ "loc": {
+ "start": {
+ "line": 132,
+ "column": 54
+ },
+ "end": {
+ "line": 132,
+ "column": 59
+ }
+ }
+ }
+ ],
+ "range": [
+ 3978,
+ 3987
+ ],
+ "loc": {
+ "start": {
+ "line": 132,
+ "column": 52
+ },
+ "end": {
+ "line": 132,
+ "column": 61
+ }
+ }
+ },
+ "range": [
+ 3938,
+ 3987
+ ],
+ "loc": {
+ "start": {
+ "line": 132,
+ "column": 12
+ },
+ "end": {
+ "line": 132,
+ "column": 61
+ }
+ }
+ },
+ "range": [
+ 3930,
+ 3987
+ ],
+ "loc": {
+ "start": {
+ "line": 132,
+ "column": 4
+ },
+ "end": {
+ "line": 132,
+ "column": 61
+ }
+ }
+ },
+ "range": [
+ 3930,
+ 3988
+ ],
+ "loc": {
+ "start": {
+ "line": 132,
+ "column": 4
+ },
+ "end": {
+ "line": 132,
+ "column": 62
+ }
+ }
+ },
+ {
+ "type": "ExpressionStatement",
+ "expression": {
+ "type": "AssignmentExpression",
+ "operator": "=",
+ "left": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "definition",
+ "range": [
+ 3993,
+ 4003
+ ],
+ "loc": {
+ "start": {
+ "line": 133,
+ "column": 4
+ },
+ "end": {
+ "line": 133,
+ "column": 14
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "_names",
+ "range": [
+ 4004,
+ 4010
+ ],
+ "loc": {
+ "start": {
+ "line": 133,
+ "column": 15
+ },
+ "end": {
+ "line": 133,
+ "column": 21
+ }
+ }
+ },
+ "range": [
+ 3993,
+ 4010
+ ],
+ "loc": {
+ "start": {
+ "line": 133,
+ "column": 4
+ },
+ "end": {
+ "line": 133,
+ "column": 21
+ }
+ }
+ },
+ "right": {
+ "type": "Identifier",
+ "name": "names",
+ "range": [
+ 4013,
+ 4018
+ ],
+ "loc": {
+ "start": {
+ "line": 133,
+ "column": 24
+ },
+ "end": {
+ "line": 133,
+ "column": 29
+ }
+ }
+ },
+ "range": [
+ 3993,
+ 4018
+ ],
+ "loc": {
+ "start": {
+ "line": 133,
+ "column": 4
+ },
+ "end": {
+ "line": 133,
+ "column": 29
+ }
+ }
+ },
+ "range": [
+ 3993,
+ 4019
+ ],
+ "loc": {
+ "start": {
+ "line": 133,
+ "column": 4
+ },
+ "end": {
+ "line": 133,
+ "column": 30
+ }
+ }
+ },
+ {
+ "type": "ExpressionStatement",
+ "expression": {
+ "type": "CallExpression",
+ "callee": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "names",
+ "range": [
+ 4024,
+ 4029
+ ],
+ "loc": {
+ "start": {
+ "line": 134,
+ "column": 4
+ },
+ "end": {
+ "line": 134,
+ "column": 9
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "forEach",
+ "range": [
+ 4030,
+ 4037
+ ],
+ "loc": {
+ "start": {
+ "line": 134,
+ "column": 10
+ },
+ "end": {
+ "line": 134,
+ "column": 17
+ }
+ }
+ },
+ "range": [
+ 4024,
+ 4037
+ ],
+ "loc": {
+ "start": {
+ "line": 134,
+ "column": 4
+ },
+ "end": {
+ "line": 134,
+ "column": 17
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "ArrowFunctionExpression",
+ "id": null,
+ "params": [
+ {
+ "type": "Identifier",
+ "name": "name",
+ "range": [
+ 4038,
+ 4042
+ ],
+ "loc": {
+ "start": {
+ "line": 134,
+ "column": 18
+ },
+ "end": {
+ "line": 134,
+ "column": 22
+ }
+ }
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "IfStatement",
+ "test": {
+ "type": "UnaryExpression",
+ "operator": "!",
+ "argument": {
+ "type": "MemberExpression",
+ "computed": true,
+ "object": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "ThisExpression",
+ "range": [
+ 4059,
+ 4063
+ ],
+ "loc": {
+ "start": {
+ "line": 135,
+ "column": 11
+ },
+ "end": {
+ "line": 135,
+ "column": 15
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "_types",
+ "range": [
+ 4064,
+ 4070
+ ],
+ "loc": {
+ "start": {
+ "line": 135,
+ "column": 16
+ },
+ "end": {
+ "line": 135,
+ "column": 22
+ }
+ }
+ },
+ "range": [
+ 4059,
+ 4070
+ ],
+ "loc": {
+ "start": {
+ "line": 135,
+ "column": 11
+ },
+ "end": {
+ "line": 135,
+ "column": 22
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "name",
+ "range": [
+ 4071,
+ 4075
+ ],
+ "loc": {
+ "start": {
+ "line": 135,
+ "column": 23
+ },
+ "end": {
+ "line": 135,
+ "column": 27
+ }
+ }
+ },
+ "range": [
+ 4059,
+ 4076
+ ],
+ "loc": {
+ "start": {
+ "line": 135,
+ "column": 11
+ },
+ "end": {
+ "line": 135,
+ "column": 28
+ }
+ }
+ },
+ "prefix": true,
+ "range": [
+ 4058,
+ 4076
+ ],
+ "loc": {
+ "start": {
+ "line": 135,
+ "column": 10
+ },
+ "end": {
+ "line": 135,
+ "column": 28
+ }
+ }
+ },
+ "consequent": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "expression": {
+ "type": "AssignmentExpression",
+ "operator": "=",
+ "left": {
+ "type": "MemberExpression",
+ "computed": true,
+ "object": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "ThisExpression",
+ "range": [
+ 4088,
+ 4092
+ ],
+ "loc": {
+ "start": {
+ "line": 136,
+ "column": 8
+ },
+ "end": {
+ "line": 136,
+ "column": 12
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "_types",
+ "range": [
+ 4093,
+ 4099
+ ],
+ "loc": {
+ "start": {
+ "line": 136,
+ "column": 13
+ },
+ "end": {
+ "line": 136,
+ "column": 19
+ }
+ }
+ },
+ "range": [
+ 4088,
+ 4099
+ ],
+ "loc": {
+ "start": {
+ "line": 136,
+ "column": 8
+ },
+ "end": {
+ "line": 136,
+ "column": 19
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "name",
+ "range": [
+ 4100,
+ 4104
+ ],
+ "loc": {
+ "start": {
+ "line": 136,
+ "column": 20
+ },
+ "end": {
+ "line": 136,
+ "column": 24
+ }
+ }
+ },
+ "range": [
+ 4088,
+ 4105
+ ],
+ "loc": {
+ "start": {
+ "line": 136,
+ "column": 8
+ },
+ "end": {
+ "line": 136,
+ "column": 25
+ }
+ }
+ },
+ "right": {
+ "type": "Identifier",
+ "name": "definition",
+ "range": [
+ 4108,
+ 4118
+ ],
+ "loc": {
+ "start": {
+ "line": 136,
+ "column": 28
+ },
+ "end": {
+ "line": 136,
+ "column": 38
+ }
+ }
+ },
+ "range": [
+ 4088,
+ 4118
+ ],
+ "loc": {
+ "start": {
+ "line": 136,
+ "column": 8
+ },
+ "end": {
+ "line": 136,
+ "column": 38
+ }
+ }
+ },
+ "range": [
+ 4088,
+ 4119
+ ],
+ "loc": {
+ "start": {
+ "line": 136,
+ "column": 8
+ },
+ "end": {
+ "line": 136,
+ "column": 39
+ }
+ }
+ }
+ ],
+ "range": [
+ 4078,
+ 4127
+ ],
+ "loc": {
+ "start": {
+ "line": 135,
+ "column": 30
+ },
+ "end": {
+ "line": 137,
+ "column": 7
+ }
+ }
+ },
+ "alternate": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "ThrowStatement",
+ "argument": {
+ "type": "NewExpression",
+ "callee": {
+ "type": "Identifier",
+ "name": "Error",
+ "range": [
+ 4153,
+ 4158
+ ],
+ "loc": {
+ "start": {
+ "line": 138,
+ "column": 18
+ },
+ "end": {
+ "line": 138,
+ "column": 23
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "TemplateLiteral",
+ "quasis": [
+ {
+ "type": "TemplateElement",
+ "value": {
+ "raw": "The type '",
+ "cooked": "The type '"
+ },
+ "tail": false,
+ "range": [
+ 4159,
+ 4172
+ ],
+ "loc": {
+ "start": {
+ "line": 138,
+ "column": 24
+ },
+ "end": {
+ "line": 138,
+ "column": 37
+ }
+ }
+ },
+ {
+ "type": "TemplateElement",
+ "value": {
+ "raw": "' has already been defined.",
+ "cooked": "' has already been defined."
+ },
+ "tail": true,
+ "range": [
+ 4176,
+ 4205
+ ],
+ "loc": {
+ "start": {
+ "line": 138,
+ "column": 41
+ },
+ "end": {
+ "line": 138,
+ "column": 70
+ }
+ }
+ }
+ ],
+ "expressions": [
+ {
+ "type": "Identifier",
+ "name": "name",
+ "range": [
+ 4172,
+ 4176
+ ],
+ "loc": {
+ "start": {
+ "line": 138,
+ "column": 37
+ },
+ "end": {
+ "line": 138,
+ "column": 41
+ }
+ }
+ }
+ ],
+ "range": [
+ 4159,
+ 4205
+ ],
+ "loc": {
+ "start": {
+ "line": 138,
+ "column": 24
+ },
+ "end": {
+ "line": 138,
+ "column": 70
+ }
+ }
+ }
+ ],
+ "range": [
+ 4149,
+ 4206
+ ],
+ "loc": {
+ "start": {
+ "line": 138,
+ "column": 14
+ },
+ "end": {
+ "line": 138,
+ "column": 71
+ }
+ }
+ },
+ "range": [
+ 4143,
+ 4207
+ ],
+ "loc": {
+ "start": {
+ "line": 138,
+ "column": 8
+ },
+ "end": {
+ "line": 138,
+ "column": 72
+ }
+ }
+ }
+ ],
+ "range": [
+ 4133,
+ 4215
+ ],
+ "loc": {
+ "start": {
+ "line": 137,
+ "column": 13
+ },
+ "end": {
+ "line": 139,
+ "column": 7
+ }
+ }
+ },
+ "range": [
+ 4054,
+ 4215
+ ],
+ "loc": {
+ "start": {
+ "line": 135,
+ "column": 6
+ },
+ "end": {
+ "line": 139,
+ "column": 7
+ }
+ }
+ }
+ ],
+ "range": [
+ 4046,
+ 4221
+ ],
+ "loc": {
+ "start": {
+ "line": 134,
+ "column": 26
+ },
+ "end": {
+ "line": 140,
+ "column": 5
+ }
+ }
+ },
+ "generator": false,
+ "expression": false,
+ "range": [
+ 4038,
+ 4221
+ ],
+ "loc": {
+ "start": {
+ "line": 134,
+ "column": 18
+ },
+ "end": {
+ "line": 140,
+ "column": 5
+ }
+ }
+ }
+ ],
+ "range": [
+ 4024,
+ 4222
+ ],
+ "loc": {
+ "start": {
+ "line": 134,
+ "column": 4
+ },
+ "end": {
+ "line": 140,
+ "column": 6
+ }
+ }
+ },
+ "range": [
+ 4024,
+ 4223
+ ],
+ "loc": {
+ "start": {
+ "line": 134,
+ "column": 4
+ },
+ "end": {
+ "line": 140,
+ "column": 7
+ }
+ }
+ }
+ ],
+ "range": [
+ 3924,
+ 4227
+ ],
+ "loc": {
+ "start": {
+ "line": 131,
+ "column": 28
+ },
+ "end": {
+ "line": 141,
+ "column": 3
+ }
+ }
+ },
+ "generator": false,
+ "expression": false,
+ "range": [
+ 3904,
+ 4227
+ ],
+ "loc": {
+ "start": {
+ "line": 131,
+ "column": 8
+ },
+ "end": {
+ "line": 141,
+ "column": 3
+ }
+ }
+ },
+ "kind": "method",
+ "computed": false,
+ "range": [
+ 3898,
+ 4227
+ ],
+ "loc": {
+ "start": {
+ "line": 131,
+ "column": 2
+ },
+ "end": {
+ "line": 141,
+ "column": 3
+ }
+ },
+ "leadingComments": [
+ {
+ "type": "Block",
+ "value": "*\n * Defines a type of resource.\n *\n * @since 0.2.0\n * @param {!string|string[]} names - Name(s) of the resource.\n * @param {!Object} definition - The resource's definition.\n * @return {undefined} - Nothing.\n ",
+ "range": [
+ 3668,
+ 3895
+ ],
+ "loc": {
+ "start": {
+ "line": 123,
+ "column": 2
+ },
+ "end": {
+ "line": 130,
+ "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 * @since 0.1.0\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": [
+ 4231,
+ 4741
+ ],
+ "loc": {
+ "start": {
+ "line": 143,
+ "column": 2
+ },
+ "end": {
+ "line": 154,
+ "column": 5
+ }
+ }
+ }
+ ],
+ "static": false
+ },
+ {
+ "type": "MethodDefinition",
+ "key": {
+ "type": "Identifier",
+ "name": "find",
+ "range": [
+ 4744,
+ 4748
+ ],
+ "loc": {
+ "start": {
+ "line": 155,
+ "column": 2
+ },
+ "end": {
+ "line": 155,
+ "column": 6
+ }
+ }
+ },
+ "value": {
+ "type": "FunctionExpression",
+ "id": null,
+ "params": [
+ {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 4749,
+ 4753
+ ],
+ "loc": {
+ "start": {
+ "line": 155,
+ "column": 7
+ },
+ "end": {
+ "line": 155,
+ "column": 11
+ }
+ }
+ },
+ {
+ "type": "Identifier",
+ "name": "id",
+ "range": [
+ 4755,
+ 4757
+ ],
+ "loc": {
+ "start": {
+ "line": 155,
+ "column": 13
+ },
+ "end": {
+ "line": 155,
+ "column": 15
+ }
+ }
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "IfStatement",
+ "test": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 4769,
+ 4773
+ ],
+ "loc": {
+ "start": {
+ "line": 156,
+ "column": 8
+ },
+ "end": {
+ "line": 156,
+ "column": 12
+ }
+ }
+ },
+ "consequent": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "id": {
+ "type": "Identifier",
+ "name": "definition",
+ "range": [
+ 4787,
+ 4797
+ ],
+ "loc": {
+ "start": {
+ "line": 157,
+ "column": 10
+ },
+ "end": {
+ "line": 157,
+ "column": 20
+ }
+ }
+ },
+ "init": {
+ "type": "MemberExpression",
+ "computed": true,
+ "object": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "ThisExpression",
+ "range": [
+ 4800,
+ 4804
+ ],
+ "loc": {
+ "start": {
+ "line": 157,
+ "column": 23
+ },
+ "end": {
+ "line": 157,
+ "column": 27
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "_types",
+ "range": [
+ 4805,
+ 4811
+ ],
+ "loc": {
+ "start": {
+ "line": 157,
+ "column": 28
+ },
+ "end": {
+ "line": 157,
+ "column": 34
+ }
+ }
+ },
+ "range": [
+ 4800,
+ 4811
+ ],
+ "loc": {
+ "start": {
+ "line": 157,
+ "column": 23
+ },
+ "end": {
+ "line": 157,
+ "column": 34
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 4812,
+ 4816
+ ],
+ "loc": {
+ "start": {
+ "line": 157,
+ "column": 35
+ },
+ "end": {
+ "line": 157,
+ "column": 39
+ }
+ }
+ },
+ "range": [
+ 4800,
+ 4817
+ ],
+ "loc": {
+ "start": {
+ "line": 157,
+ "column": 23
+ },
+ "end": {
+ "line": 157,
+ "column": 40
+ }
+ }
+ },
+ "range": [
+ 4787,
+ 4817
+ ],
+ "loc": {
+ "start": {
+ "line": 157,
+ "column": 10
+ },
+ "end": {
+ "line": 157,
+ "column": 40
+ }
+ }
+ }
+ ],
+ "kind": "let",
+ "range": [
+ 4783,
+ 4818
+ ],
+ "loc": {
+ "start": {
+ "line": 157,
+ "column": 6
+ },
+ "end": {
+ "line": 157,
+ "column": 41
+ }
+ }
+ },
+ {
+ "type": "IfStatement",
+ "test": {
+ "type": "Identifier",
+ "name": "definition",
+ "range": [
+ 4829,
+ 4839
+ ],
+ "loc": {
+ "start": {
+ "line": 158,
+ "column": 10
+ },
+ "end": {
+ "line": 158,
+ "column": 20
+ }
+ }
+ },
+ "consequent": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "IfStatement",
+ "test": {
+ "type": "UnaryExpression",
+ "operator": "!",
+ "argument": {
+ "type": "MemberExpression",
+ "computed": true,
+ "object": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "ThisExpression",
+ "range": [
+ 4856,
+ 4860
+ ],
+ "loc": {
+ "start": {
+ "line": 159,
+ "column": 13
+ },
+ "end": {
+ "line": 159,
+ "column": 17
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "_data",
+ "range": [
+ 4861,
+ 4866
+ ],
+ "loc": {
+ "start": {
+ "line": 159,
+ "column": 18
+ },
+ "end": {
+ "line": 159,
+ "column": 23
+ }
+ }
+ },
+ "range": [
+ 4856,
+ 4866
+ ],
+ "loc": {
+ "start": {
+ "line": 159,
+ "column": 13
+ },
+ "end": {
+ "line": 159,
+ "column": 23
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 4867,
+ 4871
+ ],
+ "loc": {
+ "start": {
+ "line": 159,
+ "column": 24
+ },
+ "end": {
+ "line": 159,
+ "column": 28
+ }
+ }
+ },
+ "range": [
+ 4856,
+ 4872
+ ],
+ "loc": {
+ "start": {
+ "line": 159,
+ "column": 13
+ },
+ "end": {
+ "line": 159,
+ "column": 29
+ }
+ }
+ },
+ "prefix": true,
+ "range": [
+ 4855,
+ 4872
+ ],
+ "loc": {
+ "start": {
+ "line": 159,
+ "column": 12
+ },
+ "end": {
+ "line": 159,
+ "column": 29
+ }
+ }
+ },
+ "consequent": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "id": {
+ "type": "Identifier",
+ "name": "collection",
+ "range": [
+ 4890,
+ 4900
+ ],
+ "loc": {
+ "start": {
+ "line": 160,
+ "column": 14
+ },
+ "end": {
+ "line": 160,
+ "column": 24
+ }
+ }
+ },
+ "init": {
+ "type": "ObjectExpression",
+ "properties": [],
+ "range": [
+ 4903,
+ 4905
+ ],
+ "loc": {
+ "start": {
+ "line": 160,
+ "column": 27
+ },
+ "end": {
+ "line": 160,
+ "column": 29
+ }
+ }
+ },
+ "range": [
+ 4890,
+ 4905
+ ],
+ "loc": {
+ "start": {
+ "line": 160,
+ "column": 14
+ },
+ "end": {
+ "line": 160,
+ "column": 29
+ }
+ }
+ }
+ ],
+ "kind": "let",
+ "range": [
+ 4886,
+ 4906
+ ],
+ "loc": {
+ "start": {
+ "line": 160,
+ "column": 10
+ },
+ "end": {
+ "line": 160,
+ "column": 30
+ }
+ }
+ },
+ {
+ "type": "ExpressionStatement",
+ "expression": {
+ "type": "CallExpression",
+ "callee": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "definition",
+ "range": [
+ 4917,
+ 4927
+ ],
+ "loc": {
+ "start": {
+ "line": 161,
+ "column": 10
+ },
+ "end": {
+ "line": 161,
+ "column": 20
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "_names",
+ "range": [
+ 4928,
+ 4934
+ ],
+ "loc": {
+ "start": {
+ "line": 161,
+ "column": 21
+ },
+ "end": {
+ "line": 161,
+ "column": 27
+ }
+ }
+ },
+ "range": [
+ 4917,
+ 4934
+ ],
+ "loc": {
+ "start": {
+ "line": 161,
+ "column": 10
+ },
+ "end": {
+ "line": 161,
+ "column": 27
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "forEach",
+ "range": [
+ 4935,
+ 4942
+ ],
+ "loc": {
+ "start": {
+ "line": 161,
+ "column": 28
+ },
+ "end": {
+ "line": 161,
+ "column": 35
+ }
+ }
+ },
+ "range": [
+ 4917,
+ 4942
+ ],
+ "loc": {
+ "start": {
+ "line": 161,
+ "column": 10
+ },
+ "end": {
+ "line": 161,
+ "column": 35
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "ArrowFunctionExpression",
+ "id": null,
+ "params": [
+ {
+ "type": "Identifier",
+ "name": "t",
+ "range": [
+ 4943,
+ 4944
+ ],
+ "loc": {
+ "start": {
+ "line": 161,
+ "column": 36
+ },
+ "end": {
+ "line": 161,
+ "column": 37
+ }
+ }
+ }
+ ],
+ "body": {
+ "type": "AssignmentExpression",
+ "operator": "=",
+ "left": {
+ "type": "MemberExpression",
+ "computed": true,
+ "object": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "ThisExpression",
+ "range": [
+ 4948,
+ 4952
+ ],
+ "loc": {
+ "start": {
+ "line": 161,
+ "column": 41
+ },
+ "end": {
+ "line": 161,
+ "column": 45
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "_data",
+ "range": [
+ 4953,
+ 4958
+ ],
+ "loc": {
+ "start": {
+ "line": 161,
+ "column": 46
+ },
+ "end": {
+ "line": 161,
+ "column": 51
+ }
+ }
+ },
+ "range": [
+ 4948,
+ 4958
+ ],
+ "loc": {
+ "start": {
+ "line": 161,
+ "column": 41
+ },
+ "end": {
+ "line": 161,
+ "column": 51
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "t",
+ "range": [
+ 4959,
+ 4960
+ ],
+ "loc": {
+ "start": {
+ "line": 161,
+ "column": 52
+ },
+ "end": {
+ "line": 161,
+ "column": 53
+ }
+ }
+ },
+ "range": [
+ 4948,
+ 4961
+ ],
+ "loc": {
+ "start": {
+ "line": 161,
+ "column": 41
+ },
+ "end": {
+ "line": 161,
+ "column": 54
+ }
+ }
+ },
+ "right": {
+ "type": "Identifier",
+ "name": "collection",
+ "range": [
+ 4964,
+ 4974
+ ],
+ "loc": {
+ "start": {
+ "line": 161,
+ "column": 57
+ },
+ "end": {
+ "line": 161,
+ "column": 67
+ }
+ }
+ },
+ "range": [
+ 4948,
+ 4974
+ ],
+ "loc": {
+ "start": {
+ "line": 161,
+ "column": 41
+ },
+ "end": {
+ "line": 161,
+ "column": 67
+ }
+ }
+ },
+ "generator": false,
+ "expression": true,
+ "range": [
+ 4943,
+ 4974
+ ],
+ "loc": {
+ "start": {
+ "line": 161,
+ "column": 36
+ },
+ "end": {
+ "line": 161,
+ "column": 67
+ }
+ }
+ }
+ ],
+ "range": [
+ 4917,
+ 4975
+ ],
+ "loc": {
+ "start": {
+ "line": 161,
+ "column": 10
+ },
+ "end": {
+ "line": 161,
+ "column": 68
+ }
+ }
+ },
+ "range": [
+ 4917,
+ 4976
+ ],
+ "loc": {
+ "start": {
+ "line": 161,
+ "column": 10
+ },
+ "end": {
+ "line": 161,
+ "column": 69
+ }
+ }
+ }
+ ],
+ "range": [
+ 4874,
+ 4986
+ ],
+ "loc": {
+ "start": {
+ "line": 159,
+ "column": 31
+ },
+ "end": {
+ "line": 162,
+ "column": 9
+ }
+ }
+ },
+ "alternate": null,
+ "range": [
+ 4851,
+ 4986
+ ],
+ "loc": {
+ "start": {
+ "line": 159,
+ "column": 8
+ },
+ "end": {
+ "line": 162,
+ "column": 9
+ }
+ }
+ },
+ {
+ "type": "IfStatement",
+ "test": {
+ "type": "Identifier",
+ "name": "id",
+ "range": [
+ 4999,
+ 5001
+ ],
+ "loc": {
+ "start": {
+ "line": 163,
+ "column": 12
+ },
+ "end": {
+ "line": 163,
+ "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": [
+ 5020,
+ 5024
+ ],
+ "loc": {
+ "start": {
+ "line": 164,
+ "column": 15
+ },
+ "end": {
+ "line": 164,
+ "column": 19
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "_data",
+ "range": [
+ 5025,
+ 5030
+ ],
+ "loc": {
+ "start": {
+ "line": 164,
+ "column": 20
+ },
+ "end": {
+ "line": 164,
+ "column": 25
+ }
+ }
+ },
+ "range": [
+ 5020,
+ 5030
+ ],
+ "loc": {
+ "start": {
+ "line": 164,
+ "column": 15
+ },
+ "end": {
+ "line": 164,
+ "column": 25
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 5031,
+ 5035
+ ],
+ "loc": {
+ "start": {
+ "line": 164,
+ "column": 26
+ },
+ "end": {
+ "line": 164,
+ "column": 30
+ }
+ }
+ },
+ "range": [
+ 5020,
+ 5036
+ ],
+ "loc": {
+ "start": {
+ "line": 164,
+ "column": 15
+ },
+ "end": {
+ "line": 164,
+ "column": 31
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "id",
+ "range": [
+ 5037,
+ 5039
+ ],
+ "loc": {
+ "start": {
+ "line": 164,
+ "column": 32
+ },
+ "end": {
+ "line": 164,
+ "column": 34
+ }
+ }
+ },
+ "range": [
+ 5020,
+ 5040
+ ],
+ "loc": {
+ "start": {
+ "line": 164,
+ "column": 15
+ },
+ "end": {
+ "line": 164,
+ "column": 35
+ }
+ }
+ },
+ "prefix": true,
+ "range": [
+ 5019,
+ 5040
+ ],
+ "loc": {
+ "start": {
+ "line": 164,
+ "column": 14
+ },
+ "end": {
+ "line": 164,
+ "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": [
+ 5056,
+ 5060
+ ],
+ "loc": {
+ "start": {
+ "line": 165,
+ "column": 12
+ },
+ "end": {
+ "line": 165,
+ "column": 16
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "_data",
+ "range": [
+ 5061,
+ 5066
+ ],
+ "loc": {
+ "start": {
+ "line": 165,
+ "column": 17
+ },
+ "end": {
+ "line": 165,
+ "column": 22
+ }
+ }
+ },
+ "range": [
+ 5056,
+ 5066
+ ],
+ "loc": {
+ "start": {
+ "line": 165,
+ "column": 12
+ },
+ "end": {
+ "line": 165,
+ "column": 22
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 5067,
+ 5071
+ ],
+ "loc": {
+ "start": {
+ "line": 165,
+ "column": 23
+ },
+ "end": {
+ "line": 165,
+ "column": 27
+ }
+ }
+ },
+ "range": [
+ 5056,
+ 5072
+ ],
+ "loc": {
+ "start": {
+ "line": 165,
+ "column": 12
+ },
+ "end": {
+ "line": 165,
+ "column": 28
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "id",
+ "range": [
+ 5073,
+ 5075
+ ],
+ "loc": {
+ "start": {
+ "line": 165,
+ "column": 29
+ },
+ "end": {
+ "line": 165,
+ "column": 31
+ }
+ }
+ },
+ "range": [
+ 5056,
+ 5076
+ ],
+ "loc": {
+ "start": {
+ "line": 165,
+ "column": 12
+ },
+ "end": {
+ "line": 165,
+ "column": 32
+ }
+ }
+ },
+ "right": {
+ "type": "ObjectExpression",
+ "properties": [
+ {
+ "type": "Property",
+ "key": {
+ "type": "Identifier",
+ "name": "_dependents",
+ "range": [
+ 5095,
+ 5106
+ ],
+ "loc": {
+ "start": {
+ "line": 166,
+ "column": 14
+ },
+ "end": {
+ "line": 166,
+ "column": 25
+ }
+ }
+ },
+ "value": {
+ "type": "ArrayExpression",
+ "elements": [],
+ "range": [
+ 5108,
+ 5110
+ ],
+ "loc": {
+ "start": {
+ "line": 166,
+ "column": 27
+ },
+ "end": {
+ "line": 166,
+ "column": 29
+ }
+ }
+ },
+ "kind": "init",
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "range": [
+ 5095,
+ 5110
+ ],
+ "loc": {
+ "start": {
+ "line": 166,
+ "column": 14
+ },
+ "end": {
+ "line": 166,
+ "column": 29
+ }
+ }
+ },
+ {
+ "type": "Property",
+ "key": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 5126,
+ 5130
+ ],
+ "loc": {
+ "start": {
+ "line": 167,
+ "column": 14
+ },
+ "end": {
+ "line": 167,
+ "column": 18
+ }
+ }
+ },
+ "value": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 5132,
+ 5136
+ ],
+ "loc": {
+ "start": {
+ "line": 167,
+ "column": 20
+ },
+ "end": {
+ "line": 167,
+ "column": 24
+ }
+ }
+ },
+ "kind": "init",
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "range": [
+ 5126,
+ 5136
+ ],
+ "loc": {
+ "start": {
+ "line": 167,
+ "column": 14
+ },
+ "end": {
+ "line": 167,
+ "column": 24
+ }
+ }
+ },
+ {
+ "type": "Property",
+ "key": {
+ "type": "Identifier",
+ "name": "id",
+ "range": [
+ 5152,
+ 5154
+ ],
+ "loc": {
+ "start": {
+ "line": 168,
+ "column": 14
+ },
+ "end": {
+ "line": 168,
+ "column": 16
+ }
+ }
+ },
+ "value": {
+ "type": "Identifier",
+ "name": "id",
+ "range": [
+ 5156,
+ 5158
+ ],
+ "loc": {
+ "start": {
+ "line": 168,
+ "column": 18
+ },
+ "end": {
+ "line": 168,
+ "column": 20
+ }
+ }
+ },
+ "kind": "init",
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "range": [
+ 5152,
+ 5158
+ ],
+ "loc": {
+ "start": {
+ "line": 168,
+ "column": 14
+ },
+ "end": {
+ "line": 168,
+ "column": 20
+ }
+ }
+ }
+ ],
+ "range": [
+ 5079,
+ 5172
+ ],
+ "loc": {
+ "start": {
+ "line": 165,
+ "column": 35
+ },
+ "end": {
+ "line": 169,
+ "column": 13
+ }
+ }
+ },
+ "range": [
+ 5056,
+ 5172
+ ],
+ "loc": {
+ "start": {
+ "line": 165,
+ "column": 12
+ },
+ "end": {
+ "line": 169,
+ "column": 13
+ }
+ }
+ },
+ "range": [
+ 5056,
+ 5173
+ ],
+ "loc": {
+ "start": {
+ "line": 165,
+ "column": 12
+ },
+ "end": {
+ "line": 169,
+ "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": [
+ 5186,
+ 5192
+ ],
+ "loc": {
+ "start": {
+ "line": 170,
+ "column": 12
+ },
+ "end": {
+ "line": 170,
+ "column": 18
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "keys",
+ "range": [
+ 5193,
+ 5197
+ ],
+ "loc": {
+ "start": {
+ "line": 170,
+ "column": 19
+ },
+ "end": {
+ "line": 170,
+ "column": 23
+ }
+ }
+ },
+ "range": [
+ 5186,
+ 5197
+ ],
+ "loc": {
+ "start": {
+ "line": 170,
+ "column": 12
+ },
+ "end": {
+ "line": 170,
+ "column": 23
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "Identifier",
+ "name": "definition",
+ "range": [
+ 5198,
+ 5208
+ ],
+ "loc": {
+ "start": {
+ "line": 170,
+ "column": 24
+ },
+ "end": {
+ "line": 170,
+ "column": 34
+ }
+ }
+ }
+ ],
+ "range": [
+ 5186,
+ 5209
+ ],
+ "loc": {
+ "start": {
+ "line": 170,
+ "column": 12
+ },
+ "end": {
+ "line": 170,
+ "column": 35
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "forEach",
+ "range": [
+ 5210,
+ 5217
+ ],
+ "loc": {
+ "start": {
+ "line": 170,
+ "column": 36
+ },
+ "end": {
+ "line": 170,
+ "column": 43
+ }
+ }
+ },
+ "range": [
+ 5186,
+ 5217
+ ],
+ "loc": {
+ "start": {
+ "line": 170,
+ "column": 12
+ },
+ "end": {
+ "line": 170,
+ "column": 43
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "ArrowFunctionExpression",
+ "id": null,
+ "params": [
+ {
+ "type": "Identifier",
+ "name": "key",
+ "range": [
+ 5218,
+ 5221
+ ],
+ "loc": {
+ "start": {
+ "line": 170,
+ "column": 44
+ },
+ "end": {
+ "line": 170,
+ "column": 47
+ }
+ }
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "IfStatement",
+ "test": {
+ "type": "BinaryExpression",
+ "operator": "!==",
+ "left": {
+ "type": "MemberExpression",
+ "computed": true,
+ "object": {
+ "type": "Identifier",
+ "name": "key",
+ "range": [
+ 5245,
+ 5248
+ ],
+ "loc": {
+ "start": {
+ "line": 171,
+ "column": 18
+ },
+ "end": {
+ "line": 171,
+ "column": 21
+ }
+ }
+ },
+ "property": {
+ "type": "Literal",
+ "value": 0,
+ "raw": "0",
+ "range": [
+ 5249,
+ 5250
+ ],
+ "loc": {
+ "start": {
+ "line": 171,
+ "column": 22
+ },
+ "end": {
+ "line": 171,
+ "column": 23
+ }
+ }
+ },
+ "range": [
+ 5245,
+ 5251
+ ],
+ "loc": {
+ "start": {
+ "line": 171,
+ "column": 18
+ },
+ "end": {
+ "line": 171,
+ "column": 24
+ }
+ }
+ },
+ "right": {
+ "type": "Literal",
+ "value": "_",
+ "raw": "\"_\"",
+ "range": [
+ 5256,
+ 5259
+ ],
+ "loc": {
+ "start": {
+ "line": 171,
+ "column": 29
+ },
+ "end": {
+ "line": 171,
+ "column": 32
+ }
+ }
+ },
+ "range": [
+ 5245,
+ 5259
+ ],
+ "loc": {
+ "start": {
+ "line": 171,
+ "column": 18
+ },
+ "end": {
+ "line": 171,
+ "column": 32
+ }
+ }
+ },
+ "consequent": {
+ "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": [
+ 5279,
+ 5283
+ ],
+ "loc": {
+ "start": {
+ "line": 172,
+ "column": 16
+ },
+ "end": {
+ "line": 172,
+ "column": 20
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "_data",
+ "range": [
+ 5284,
+ 5289
+ ],
+ "loc": {
+ "start": {
+ "line": 172,
+ "column": 21
+ },
+ "end": {
+ "line": 172,
+ "column": 26
+ }
+ }
+ },
+ "range": [
+ 5279,
+ 5289
+ ],
+ "loc": {
+ "start": {
+ "line": 172,
+ "column": 16
+ },
+ "end": {
+ "line": 172,
+ "column": 26
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 5290,
+ 5294
+ ],
+ "loc": {
+ "start": {
+ "line": 172,
+ "column": 27
+ },
+ "end": {
+ "line": 172,
+ "column": 31
+ }
+ }
+ },
+ "range": [
+ 5279,
+ 5295
+ ],
+ "loc": {
+ "start": {
+ "line": 172,
+ "column": 16
+ },
+ "end": {
+ "line": 172,
+ "column": 32
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "id",
+ "range": [
+ 5296,
+ 5298
+ ],
+ "loc": {
+ "start": {
+ "line": 172,
+ "column": 33
+ },
+ "end": {
+ "line": 172,
+ "column": 35
+ }
+ }
+ },
+ "range": [
+ 5279,
+ 5299
+ ],
+ "loc": {
+ "start": {
+ "line": 172,
+ "column": 16
+ },
+ "end": {
+ "line": 172,
+ "column": 36
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "key",
+ "range": [
+ 5300,
+ 5303
+ ],
+ "loc": {
+ "start": {
+ "line": 172,
+ "column": 37
+ },
+ "end": {
+ "line": 172,
+ "column": 40
+ }
+ }
+ },
+ "range": [
+ 5279,
+ 5304
+ ],
+ "loc": {
+ "start": {
+ "line": 172,
+ "column": 16
+ },
+ "end": {
+ "line": 172,
+ "column": 41
+ }
+ }
+ },
+ "right": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "MemberExpression",
+ "computed": true,
+ "object": {
+ "type": "Identifier",
+ "name": "definition",
+ "range": [
+ 5307,
+ 5317
+ ],
+ "loc": {
+ "start": {
+ "line": 172,
+ "column": 44
+ },
+ "end": {
+ "line": 172,
+ "column": 54
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "key",
+ "range": [
+ 5318,
+ 5321
+ ],
+ "loc": {
+ "start": {
+ "line": 172,
+ "column": 55
+ },
+ "end": {
+ "line": 172,
+ "column": 58
+ }
+ }
+ },
+ "range": [
+ 5307,
+ 5322
+ ],
+ "loc": {
+ "start": {
+ "line": 172,
+ "column": 44
+ },
+ "end": {
+ "line": 172,
+ "column": 59
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "default",
+ "range": [
+ 5323,
+ 5330
+ ],
+ "loc": {
+ "start": {
+ "line": 172,
+ "column": 60
+ },
+ "end": {
+ "line": 172,
+ "column": 67
+ }
+ }
+ },
+ "range": [
+ 5307,
+ 5330
+ ],
+ "loc": {
+ "start": {
+ "line": 172,
+ "column": 44
+ },
+ "end": {
+ "line": 172,
+ "column": 67
+ }
+ }
+ },
+ "range": [
+ 5279,
+ 5330
+ ],
+ "loc": {
+ "start": {
+ "line": 172,
+ "column": 16
+ },
+ "end": {
+ "line": 172,
+ "column": 67
+ }
+ }
+ },
+ "range": [
+ 5279,
+ 5331
+ ],
+ "loc": {
+ "start": {
+ "line": 172,
+ "column": 16
+ },
+ "end": {
+ "line": 172,
+ "column": 68
+ }
+ }
+ }
+ ],
+ "range": [
+ 5261,
+ 5347
+ ],
+ "loc": {
+ "start": {
+ "line": 171,
+ "column": 34
+ },
+ "end": {
+ "line": 173,
+ "column": 15
+ }
+ }
+ },
+ "alternate": null,
+ "range": [
+ 5241,
+ 5347
+ ],
+ "loc": {
+ "start": {
+ "line": 171,
+ "column": 14
+ },
+ "end": {
+ "line": 173,
+ "column": 15
+ }
+ }
+ }
+ ],
+ "range": [
+ 5225,
+ 5361
+ ],
+ "loc": {
+ "start": {
+ "line": 170,
+ "column": 51
+ },
+ "end": {
+ "line": 174,
+ "column": 13
+ }
+ }
+ },
+ "generator": false,
+ "expression": false,
+ "range": [
+ 5218,
+ 5361
+ ],
+ "loc": {
+ "start": {
+ "line": 170,
+ "column": 44
+ },
+ "end": {
+ "line": 174,
+ "column": 13
+ }
+ }
+ }
+ ],
+ "range": [
+ 5186,
+ 5362
+ ],
+ "loc": {
+ "start": {
+ "line": 170,
+ "column": 12
+ },
+ "end": {
+ "line": 174,
+ "column": 14
+ }
+ }
+ },
+ "range": [
+ 5186,
+ 5363
+ ],
+ "loc": {
+ "start": {
+ "line": 170,
+ "column": 12
+ },
+ "end": {
+ "line": 174,
+ "column": 15
+ }
+ }
+ }
+ ],
+ "range": [
+ 5042,
+ 5375
+ ],
+ "loc": {
+ "start": {
+ "line": 164,
+ "column": 37
+ },
+ "end": {
+ "line": 175,
+ "column": 11
+ }
+ }
+ },
+ "alternate": null,
+ "range": [
+ 5015,
+ 5375
+ ],
+ "loc": {
+ "start": {
+ "line": 164,
+ "column": 10
+ },
+ "end": {
+ "line": 175,
+ "column": 11
+ }
+ }
+ },
+ {
+ "type": "ReturnStatement",
+ "argument": {
+ "type": "MemberExpression",
+ "computed": true,
+ "object": {
+ "type": "MemberExpression",
+ "computed": true,
+ "object": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "ThisExpression",
+ "range": [
+ 5393,
+ 5397
+ ],
+ "loc": {
+ "start": {
+ "line": 176,
+ "column": 17
+ },
+ "end": {
+ "line": 176,
+ "column": 21
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "_data",
+ "range": [
+ 5398,
+ 5403
+ ],
+ "loc": {
+ "start": {
+ "line": 176,
+ "column": 22
+ },
+ "end": {
+ "line": 176,
+ "column": 27
+ }
+ }
+ },
+ "range": [
+ 5393,
+ 5403
+ ],
+ "loc": {
+ "start": {
+ "line": 176,
+ "column": 17
+ },
+ "end": {
+ "line": 176,
+ "column": 27
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 5404,
+ 5408
+ ],
+ "loc": {
+ "start": {
+ "line": 176,
+ "column": 28
+ },
+ "end": {
+ "line": 176,
+ "column": 32
+ }
+ }
+ },
+ "range": [
+ 5393,
+ 5409
+ ],
+ "loc": {
+ "start": {
+ "line": 176,
+ "column": 17
+ },
+ "end": {
+ "line": 176,
+ "column": 33
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "id",
+ "range": [
+ 5410,
+ 5412
+ ],
+ "loc": {
+ "start": {
+ "line": 176,
+ "column": 34
+ },
+ "end": {
+ "line": 176,
+ "column": 36
+ }
+ }
+ },
+ "range": [
+ 5393,
+ 5413
+ ],
+ "loc": {
+ "start": {
+ "line": 176,
+ "column": 17
+ },
+ "end": {
+ "line": 176,
+ "column": 37
+ }
+ }
+ },
+ "range": [
+ 5386,
+ 5414
+ ],
+ "loc": {
+ "start": {
+ "line": 176,
+ "column": 10
+ },
+ "end": {
+ "line": 176,
+ "column": 38
+ }
+ }
+ }
+ ],
+ "range": [
+ 5003,
+ 5424
+ ],
+ "loc": {
+ "start": {
+ "line": 163,
+ "column": 16
+ },
+ "end": {
+ "line": 177,
+ "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": [
+ 5449,
+ 5455
+ ],
+ "loc": {
+ "start": {
+ "line": 178,
+ "column": 17
+ },
+ "end": {
+ "line": 178,
+ "column": 23
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "keys",
+ "range": [
+ 5456,
+ 5460
+ ],
+ "loc": {
+ "start": {
+ "line": 178,
+ "column": 24
+ },
+ "end": {
+ "line": 178,
+ "column": 28
+ }
+ }
+ },
+ "range": [
+ 5449,
+ 5460
+ ],
+ "loc": {
+ "start": {
+ "line": 178,
+ "column": 17
+ },
+ "end": {
+ "line": 178,
+ "column": 28
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "MemberExpression",
+ "computed": true,
+ "object": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "ThisExpression",
+ "range": [
+ 5461,
+ 5465
+ ],
+ "loc": {
+ "start": {
+ "line": 178,
+ "column": 29
+ },
+ "end": {
+ "line": 178,
+ "column": 33
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "_data",
+ "range": [
+ 5466,
+ 5471
+ ],
+ "loc": {
+ "start": {
+ "line": 178,
+ "column": 34
+ },
+ "end": {
+ "line": 178,
+ "column": 39
+ }
+ }
+ },
+ "range": [
+ 5461,
+ 5471
+ ],
+ "loc": {
+ "start": {
+ "line": 178,
+ "column": 29
+ },
+ "end": {
+ "line": 178,
+ "column": 39
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 5472,
+ 5476
+ ],
+ "loc": {
+ "start": {
+ "line": 178,
+ "column": 40
+ },
+ "end": {
+ "line": 178,
+ "column": 44
+ }
+ }
+ },
+ "range": [
+ 5461,
+ 5477
+ ],
+ "loc": {
+ "start": {
+ "line": 178,
+ "column": 29
+ },
+ "end": {
+ "line": 178,
+ "column": 45
+ }
+ }
+ }
+ ],
+ "range": [
+ 5449,
+ 5478
+ ],
+ "loc": {
+ "start": {
+ "line": 178,
+ "column": 17
+ },
+ "end": {
+ "line": 178,
+ "column": 46
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "map",
+ "range": [
+ 5479,
+ 5482
+ ],
+ "loc": {
+ "start": {
+ "line": 178,
+ "column": 47
+ },
+ "end": {
+ "line": 178,
+ "column": 50
+ }
+ }
+ },
+ "range": [
+ 5449,
+ 5482
+ ],
+ "loc": {
+ "start": {
+ "line": 178,
+ "column": 17
+ },
+ "end": {
+ "line": 178,
+ "column": 50
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "ArrowFunctionExpression",
+ "id": null,
+ "params": [
+ {
+ "type": "Identifier",
+ "name": "x",
+ "range": [
+ 5483,
+ 5484
+ ],
+ "loc": {
+ "start": {
+ "line": 178,
+ "column": 51
+ },
+ "end": {
+ "line": 178,
+ "column": 52
+ }
+ }
+ }
+ ],
+ "body": {
+ "type": "MemberExpression",
+ "computed": true,
+ "object": {
+ "type": "MemberExpression",
+ "computed": true,
+ "object": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "ThisExpression",
+ "range": [
+ 5488,
+ 5492
+ ],
+ "loc": {
+ "start": {
+ "line": 178,
+ "column": 56
+ },
+ "end": {
+ "line": 178,
+ "column": 60
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "_data",
+ "range": [
+ 5493,
+ 5498
+ ],
+ "loc": {
+ "start": {
+ "line": 178,
+ "column": 61
+ },
+ "end": {
+ "line": 178,
+ "column": 66
+ }
+ }
+ },
+ "range": [
+ 5488,
+ 5498
+ ],
+ "loc": {
+ "start": {
+ "line": 178,
+ "column": 56
+ },
+ "end": {
+ "line": 178,
+ "column": 66
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 5499,
+ 5503
+ ],
+ "loc": {
+ "start": {
+ "line": 178,
+ "column": 67
+ },
+ "end": {
+ "line": 178,
+ "column": 71
+ }
+ }
+ },
+ "range": [
+ 5488,
+ 5504
+ ],
+ "loc": {
+ "start": {
+ "line": 178,
+ "column": 56
+ },
+ "end": {
+ "line": 178,
+ "column": 72
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "x",
+ "range": [
+ 5505,
+ 5506
+ ],
+ "loc": {
+ "start": {
+ "line": 178,
+ "column": 73
+ },
+ "end": {
+ "line": 178,
+ "column": 74
+ }
+ }
+ },
+ "range": [
+ 5488,
+ 5507
+ ],
+ "loc": {
+ "start": {
+ "line": 178,
+ "column": 56
+ },
+ "end": {
+ "line": 178,
+ "column": 75
+ }
+ }
+ },
+ "generator": false,
+ "expression": true,
+ "range": [
+ 5483,
+ 5507
+ ],
+ "loc": {
+ "start": {
+ "line": 178,
+ "column": 51
+ },
+ "end": {
+ "line": 178,
+ "column": 75
+ }
+ }
+ }
+ ],
+ "range": [
+ 5449,
+ 5508
+ ],
+ "loc": {
+ "start": {
+ "line": 178,
+ "column": 17
+ },
+ "end": {
+ "line": 178,
+ "column": 76
+ }
+ }
+ },
+ "range": [
+ 5442,
+ 5509
+ ],
+ "loc": {
+ "start": {
+ "line": 178,
+ "column": 10
+ },
+ "end": {
+ "line": 178,
+ "column": 77
+ }
+ }
+ }
+ ],
+ "range": [
+ 5430,
+ 5519
+ ],
+ "loc": {
+ "start": {
+ "line": 177,
+ "column": 15
+ },
+ "end": {
+ "line": 179,
+ "column": 9
+ }
+ }
+ },
+ "range": [
+ 4995,
+ 5519
+ ],
+ "loc": {
+ "start": {
+ "line": 163,
+ "column": 8
+ },
+ "end": {
+ "line": 179,
+ "column": 9
+ }
+ }
+ }
+ ],
+ "range": [
+ 4841,
+ 5527
+ ],
+ "loc": {
+ "start": {
+ "line": 158,
+ "column": 22
+ },
+ "end": {
+ "line": 180,
+ "column": 7
+ }
+ }
+ },
+ "alternate": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "ThrowStatement",
+ "argument": {
+ "type": "NewExpression",
+ "callee": {
+ "type": "Identifier",
+ "name": "TypeError",
+ "range": [
+ 5553,
+ 5562
+ ],
+ "loc": {
+ "start": {
+ "line": 181,
+ "column": 18
+ },
+ "end": {
+ "line": 181,
+ "column": 27
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "TemplateLiteral",
+ "quasis": [
+ {
+ "type": "TemplateElement",
+ "value": {
+ "raw": "Unknown type '",
+ "cooked": "Unknown type '"
+ },
+ "tail": false,
+ "range": [
+ 5563,
+ 5580
+ ],
+ "loc": {
+ "start": {
+ "line": 181,
+ "column": 28
+ },
+ "end": {
+ "line": 181,
+ "column": 45
+ }
+ }
+ },
+ {
+ "type": "TemplateElement",
+ "value": {
+ "raw": "'",
+ "cooked": "'"
+ },
+ "tail": true,
+ "range": [
+ 5584,
+ 5587
+ ],
+ "loc": {
+ "start": {
+ "line": 181,
+ "column": 49
+ },
+ "end": {
+ "line": 181,
+ "column": 52
+ }
+ }
+ }
+ ],
+ "expressions": [
+ {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 5580,
+ 5584
+ ],
+ "loc": {
+ "start": {
+ "line": 181,
+ "column": 45
+ },
+ "end": {
+ "line": 181,
+ "column": 49
+ }
+ }
+ }
+ ],
+ "range": [
+ 5563,
+ 5587
+ ],
+ "loc": {
+ "start": {
+ "line": 181,
+ "column": 28
+ },
+ "end": {
+ "line": 181,
+ "column": 52
+ }
+ }
+ }
+ ],
+ "range": [
+ 5549,
+ 5588
+ ],
+ "loc": {
+ "start": {
+ "line": 181,
+ "column": 14
+ },
+ "end": {
+ "line": 181,
+ "column": 53
+ }
+ }
+ },
+ "range": [
+ 5543,
+ 5589
+ ],
+ "loc": {
+ "start": {
+ "line": 181,
+ "column": 8
+ },
+ "end": {
+ "line": 181,
+ "column": 54
+ }
+ }
+ }
+ ],
+ "range": [
+ 5533,
+ 5597
+ ],
+ "loc": {
+ "start": {
+ "line": 180,
+ "column": 13
+ },
+ "end": {
+ "line": 182,
+ "column": 7
+ }
+ }
+ },
+ "range": [
+ 4825,
+ 5597
+ ],
+ "loc": {
+ "start": {
+ "line": 158,
+ "column": 6
+ },
+ "end": {
+ "line": 182,
+ "column": 7
+ }
+ }
+ }
+ ],
+ "range": [
+ 4775,
+ 5603
+ ],
+ "loc": {
+ "start": {
+ "line": 156,
+ "column": 14
+ },
+ "end": {
+ "line": 183,
+ "column": 5
+ }
+ }
+ },
+ "alternate": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "ThrowStatement",
+ "argument": {
+ "type": "NewExpression",
+ "callee": {
+ "type": "Identifier",
+ "name": "TypeError",
+ "range": [
+ 5627,
+ 5636
+ ],
+ "loc": {
+ "start": {
+ "line": 184,
+ "column": 16
+ },
+ "end": {
+ "line": 184,
+ "column": 25
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "TemplateLiteral",
+ "quasis": [
+ {
+ "type": "TemplateElement",
+ "value": {
+ "raw": "You must provide a type",
+ "cooked": "You must provide a type"
+ },
+ "tail": true,
+ "range": [
+ 5637,
+ 5662
+ ],
+ "loc": {
+ "start": {
+ "line": 184,
+ "column": 26
+ },
+ "end": {
+ "line": 184,
+ "column": 51
+ }
+ }
+ }
+ ],
+ "expressions": [],
+ "range": [
+ 5637,
+ 5662
+ ],
+ "loc": {
+ "start": {
+ "line": 184,
+ "column": 26
+ },
+ "end": {
+ "line": 184,
+ "column": 51
+ }
+ }
+ }
+ ],
+ "range": [
+ 5623,
+ 5663
+ ],
+ "loc": {
+ "start": {
+ "line": 184,
+ "column": 12
+ },
+ "end": {
+ "line": 184,
+ "column": 52
+ }
+ }
+ },
+ "range": [
+ 5617,
+ 5664
+ ],
+ "loc": {
+ "start": {
+ "line": 184,
+ "column": 6
+ },
+ "end": {
+ "line": 184,
+ "column": 53
+ }
+ }
+ }
+ ],
+ "range": [
+ 5609,
+ 5670
+ ],
+ "loc": {
+ "start": {
+ "line": 183,
+ "column": 11
+ },
+ "end": {
+ "line": 185,
+ "column": 5
+ }
+ }
+ },
+ "range": [
+ 4765,
+ 5670
+ ],
+ "loc": {
+ "start": {
+ "line": 156,
+ "column": 4
+ },
+ "end": {
+ "line": 185,
+ "column": 5
+ }
+ }
+ }
+ ],
+ "range": [
+ 4759,
+ 5674
+ ],
+ "loc": {
+ "start": {
+ "line": 155,
+ "column": 17
+ },
+ "end": {
+ "line": 186,
+ "column": 3
+ }
+ }
+ },
+ "generator": false,
+ "expression": false,
+ "range": [
+ 4748,
+ 5674
+ ],
+ "loc": {
+ "start": {
+ "line": 155,
+ "column": 6
+ },
+ "end": {
+ "line": 186,
+ "column": 3
+ }
+ }
+ },
+ "kind": "method",
+ "computed": false,
+ "range": [
+ 4744,
+ 5674
+ ],
+ "loc": {
+ "start": {
+ "line": 155,
+ "column": 2
+ },
+ "end": {
+ "line": 186,
+ "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 * @since 0.1.0\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": [
+ 4231,
+ 4741
+ ],
+ "loc": {
+ "start": {
+ "line": 143,
+ "column": 2
+ },
+ "end": {
+ "line": 154,
+ "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 * @since 0.1.0\n * @param {Object} root - Top Level Object to push. See:\n http://jsonapi.org/format/#document-top-level\n * @return {undefined} - Nothing.\n ",
+ "range": [
+ 5678,
+ 6012
+ ],
+ "loc": {
+ "start": {
+ "line": 188,
+ "column": 2
+ },
+ "end": {
+ "line": 196,
+ "column": 5
+ }
+ }
+ }
+ ],
+ "static": false
+ },
+ {
+ "type": "MethodDefinition",
+ "key": {
+ "type": "Identifier",
+ "name": "push",
+ "range": [
+ 6015,
+ 6019
+ ],
+ "loc": {
+ "start": {
+ "line": 197,
+ "column": 2
+ },
+ "end": {
+ "line": 197,
+ "column": 6
+ }
+ }
+ },
+ "value": {
+ "type": "FunctionExpression",
+ "id": null,
+ "params": [
+ {
+ "type": "Identifier",
+ "name": "root",
+ "range": [
+ 6020,
+ 6024
+ ],
+ "loc": {
+ "start": {
+ "line": 197,
+ "column": 7
+ },
+ "end": {
+ "line": 197,
+ "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": [
+ 6036,
+ 6040
+ ],
+ "loc": {
+ "start": {
+ "line": 198,
+ "column": 8
+ },
+ "end": {
+ "line": 198,
+ "column": 12
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "data",
+ "range": [
+ 6041,
+ 6045
+ ],
+ "loc": {
+ "start": {
+ "line": 198,
+ "column": 13
+ },
+ "end": {
+ "line": 198,
+ "column": 17
+ }
+ }
+ },
+ "range": [
+ 6036,
+ 6045
+ ],
+ "loc": {
+ "start": {
+ "line": 198,
+ "column": 8
+ },
+ "end": {
+ "line": 198,
+ "column": 17
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "constructor",
+ "range": [
+ 6046,
+ 6057
+ ],
+ "loc": {
+ "start": {
+ "line": 198,
+ "column": 18
+ },
+ "end": {
+ "line": 198,
+ "column": 29
+ }
+ }
+ },
+ "range": [
+ 6036,
+ 6057
+ ],
+ "loc": {
+ "start": {
+ "line": 198,
+ "column": 8
+ },
+ "end": {
+ "line": 198,
+ "column": 29
+ }
+ }
+ },
+ "right": {
+ "type": "Identifier",
+ "name": "Array",
+ "range": [
+ 6062,
+ 6067
+ ],
+ "loc": {
+ "start": {
+ "line": 198,
+ "column": 34
+ },
+ "end": {
+ "line": 198,
+ "column": 39
+ }
+ }
+ },
+ "range": [
+ 6036,
+ 6067
+ ],
+ "loc": {
+ "start": {
+ "line": 198,
+ "column": 8
+ },
+ "end": {
+ "line": 198,
+ "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": [
+ 6077,
+ 6081
+ ],
+ "loc": {
+ "start": {
+ "line": 199,
+ "column": 6
+ },
+ "end": {
+ "line": 199,
+ "column": 10
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "data",
+ "range": [
+ 6082,
+ 6086
+ ],
+ "loc": {
+ "start": {
+ "line": 199,
+ "column": 11
+ },
+ "end": {
+ "line": 199,
+ "column": 15
+ }
+ }
+ },
+ "range": [
+ 6077,
+ 6086
+ ],
+ "loc": {
+ "start": {
+ "line": 199,
+ "column": 6
+ },
+ "end": {
+ "line": 199,
+ "column": 15
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "forEach",
+ "range": [
+ 6087,
+ 6094
+ ],
+ "loc": {
+ "start": {
+ "line": 199,
+ "column": 16
+ },
+ "end": {
+ "line": 199,
+ "column": 23
+ }
+ }
+ },
+ "range": [
+ 6077,
+ 6094
+ ],
+ "loc": {
+ "start": {
+ "line": 199,
+ "column": 6
+ },
+ "end": {
+ "line": 199,
+ "column": 23
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "ArrowFunctionExpression",
+ "id": null,
+ "params": [
+ {
+ "type": "Identifier",
+ "name": "x",
+ "range": [
+ 6095,
+ 6096
+ ],
+ "loc": {
+ "start": {
+ "line": 199,
+ "column": 24
+ },
+ "end": {
+ "line": 199,
+ "column": 25
+ }
+ }
+ }
+ ],
+ "body": {
+ "type": "CallExpression",
+ "callee": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "ThisExpression",
+ "range": [
+ 6100,
+ 6104
+ ],
+ "loc": {
+ "start": {
+ "line": 199,
+ "column": 29
+ },
+ "end": {
+ "line": 199,
+ "column": 33
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "add",
+ "range": [
+ 6105,
+ 6108
+ ],
+ "loc": {
+ "start": {
+ "line": 199,
+ "column": 34
+ },
+ "end": {
+ "line": 199,
+ "column": 37
+ }
+ }
+ },
+ "range": [
+ 6100,
+ 6108
+ ],
+ "loc": {
+ "start": {
+ "line": 199,
+ "column": 29
+ },
+ "end": {
+ "line": 199,
+ "column": 37
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "Identifier",
+ "name": "x",
+ "range": [
+ 6109,
+ 6110
+ ],
+ "loc": {
+ "start": {
+ "line": 199,
+ "column": 38
+ },
+ "end": {
+ "line": 199,
+ "column": 39
+ }
+ }
+ }
+ ],
+ "range": [
+ 6100,
+ 6111
+ ],
+ "loc": {
+ "start": {
+ "line": 199,
+ "column": 29
+ },
+ "end": {
+ "line": 199,
+ "column": 40
+ }
+ }
+ },
+ "generator": false,
+ "expression": true,
+ "range": [
+ 6095,
+ 6111
+ ],
+ "loc": {
+ "start": {
+ "line": 199,
+ "column": 24
+ },
+ "end": {
+ "line": 199,
+ "column": 40
+ }
+ }
+ }
+ ],
+ "range": [
+ 6077,
+ 6112
+ ],
+ "loc": {
+ "start": {
+ "line": 199,
+ "column": 6
+ },
+ "end": {
+ "line": 199,
+ "column": 41
+ }
+ }
+ },
+ "range": [
+ 6077,
+ 6113
+ ],
+ "loc": {
+ "start": {
+ "line": 199,
+ "column": 6
+ },
+ "end": {
+ "line": 199,
+ "column": 42
+ }
+ }
+ }
+ ],
+ "range": [
+ 6069,
+ 6119
+ ],
+ "loc": {
+ "start": {
+ "line": 198,
+ "column": 41
+ },
+ "end": {
+ "line": 200,
+ "column": 5
+ }
+ }
+ },
+ "alternate": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "expression": {
+ "type": "CallExpression",
+ "callee": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "ThisExpression",
+ "range": [
+ 6133,
+ 6137
+ ],
+ "loc": {
+ "start": {
+ "line": 201,
+ "column": 6
+ },
+ "end": {
+ "line": 201,
+ "column": 10
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "add",
+ "range": [
+ 6138,
+ 6141
+ ],
+ "loc": {
+ "start": {
+ "line": 201,
+ "column": 11
+ },
+ "end": {
+ "line": 201,
+ "column": 14
+ }
+ }
+ },
+ "range": [
+ 6133,
+ 6141
+ ],
+ "loc": {
+ "start": {
+ "line": 201,
+ "column": 6
+ },
+ "end": {
+ "line": 201,
+ "column": 14
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "root",
+ "range": [
+ 6142,
+ 6146
+ ],
+ "loc": {
+ "start": {
+ "line": 201,
+ "column": 15
+ },
+ "end": {
+ "line": 201,
+ "column": 19
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "data",
+ "range": [
+ 6147,
+ 6151
+ ],
+ "loc": {
+ "start": {
+ "line": 201,
+ "column": 20
+ },
+ "end": {
+ "line": 201,
+ "column": 24
+ }
+ }
+ },
+ "range": [
+ 6142,
+ 6151
+ ],
+ "loc": {
+ "start": {
+ "line": 201,
+ "column": 15
+ },
+ "end": {
+ "line": 201,
+ "column": 24
+ }
+ }
+ }
+ ],
+ "range": [
+ 6133,
+ 6152
+ ],
+ "loc": {
+ "start": {
+ "line": 201,
+ "column": 6
+ },
+ "end": {
+ "line": 201,
+ "column": 25
+ }
+ }
+ },
+ "range": [
+ 6133,
+ 6153
+ ],
+ "loc": {
+ "start": {
+ "line": 201,
+ "column": 6
+ },
+ "end": {
+ "line": 201,
+ "column": 26
+ }
+ }
+ }
+ ],
+ "range": [
+ 6125,
+ 6159
+ ],
+ "loc": {
+ "start": {
+ "line": 200,
+ "column": 11
+ },
+ "end": {
+ "line": 202,
+ "column": 5
+ }
+ }
+ },
+ "range": [
+ 6032,
+ 6159
+ ],
+ "loc": {
+ "start": {
+ "line": 198,
+ "column": 4
+ },
+ "end": {
+ "line": 202,
+ "column": 5
+ }
+ }
+ },
+ {
+ "type": "IfStatement",
+ "test": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "root",
+ "range": [
+ 6168,
+ 6172
+ ],
+ "loc": {
+ "start": {
+ "line": 203,
+ "column": 8
+ },
+ "end": {
+ "line": 203,
+ "column": 12
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "included",
+ "range": [
+ 6173,
+ 6181
+ ],
+ "loc": {
+ "start": {
+ "line": 203,
+ "column": 13
+ },
+ "end": {
+ "line": 203,
+ "column": 21
+ }
+ }
+ },
+ "range": [
+ 6168,
+ 6181
+ ],
+ "loc": {
+ "start": {
+ "line": 203,
+ "column": 8
+ },
+ "end": {
+ "line": 203,
+ "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": [
+ 6191,
+ 6195
+ ],
+ "loc": {
+ "start": {
+ "line": 204,
+ "column": 6
+ },
+ "end": {
+ "line": 204,
+ "column": 10
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "included",
+ "range": [
+ 6196,
+ 6204
+ ],
+ "loc": {
+ "start": {
+ "line": 204,
+ "column": 11
+ },
+ "end": {
+ "line": 204,
+ "column": 19
+ }
+ }
+ },
+ "range": [
+ 6191,
+ 6204
+ ],
+ "loc": {
+ "start": {
+ "line": 204,
+ "column": 6
+ },
+ "end": {
+ "line": 204,
+ "column": 19
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "forEach",
+ "range": [
+ 6205,
+ 6212
+ ],
+ "loc": {
+ "start": {
+ "line": 204,
+ "column": 20
+ },
+ "end": {
+ "line": 204,
+ "column": 27
+ }
+ }
+ },
+ "range": [
+ 6191,
+ 6212
+ ],
+ "loc": {
+ "start": {
+ "line": 204,
+ "column": 6
+ },
+ "end": {
+ "line": 204,
+ "column": 27
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "ArrowFunctionExpression",
+ "id": null,
+ "params": [
+ {
+ "type": "Identifier",
+ "name": "x",
+ "range": [
+ 6213,
+ 6214
+ ],
+ "loc": {
+ "start": {
+ "line": 204,
+ "column": 28
+ },
+ "end": {
+ "line": 204,
+ "column": 29
+ }
+ }
+ }
+ ],
+ "body": {
+ "type": "CallExpression",
+ "callee": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "ThisExpression",
+ "range": [
+ 6218,
+ 6222
+ ],
+ "loc": {
+ "start": {
+ "line": 204,
+ "column": 33
+ },
+ "end": {
+ "line": 204,
+ "column": 37
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "add",
+ "range": [
+ 6223,
+ 6226
+ ],
+ "loc": {
+ "start": {
+ "line": 204,
+ "column": 38
+ },
+ "end": {
+ "line": 204,
+ "column": 41
+ }
+ }
+ },
+ "range": [
+ 6218,
+ 6226
+ ],
+ "loc": {
+ "start": {
+ "line": 204,
+ "column": 33
+ },
+ "end": {
+ "line": 204,
+ "column": 41
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "Identifier",
+ "name": "x",
+ "range": [
+ 6227,
+ 6228
+ ],
+ "loc": {
+ "start": {
+ "line": 204,
+ "column": 42
+ },
+ "end": {
+ "line": 204,
+ "column": 43
+ }
+ }
+ }
+ ],
+ "range": [
+ 6218,
+ 6229
+ ],
+ "loc": {
+ "start": {
+ "line": 204,
+ "column": 33
+ },
+ "end": {
+ "line": 204,
+ "column": 44
+ }
+ }
+ },
+ "generator": false,
+ "expression": true,
+ "range": [
+ 6213,
+ 6229
+ ],
+ "loc": {
+ "start": {
+ "line": 204,
+ "column": 28
+ },
+ "end": {
+ "line": 204,
+ "column": 44
+ }
+ }
+ }
+ ],
+ "range": [
+ 6191,
+ 6230
+ ],
+ "loc": {
+ "start": {
+ "line": 204,
+ "column": 6
+ },
+ "end": {
+ "line": 204,
+ "column": 45
+ }
+ }
+ },
+ "range": [
+ 6191,
+ 6231
+ ],
+ "loc": {
+ "start": {
+ "line": 204,
+ "column": 6
+ },
+ "end": {
+ "line": 204,
+ "column": 46
+ }
+ }
+ }
+ ],
+ "range": [
+ 6183,
+ 6237
+ ],
+ "loc": {
+ "start": {
+ "line": 203,
+ "column": 23
+ },
+ "end": {
+ "line": 205,
+ "column": 5
+ }
+ }
+ },
+ "alternate": null,
+ "range": [
+ 6164,
+ 6237
+ ],
+ "loc": {
+ "start": {
+ "line": 203,
+ "column": 4
+ },
+ "end": {
+ "line": 205,
+ "column": 5
+ }
+ }
+ }
+ ],
+ "range": [
+ 6026,
+ 6241
+ ],
+ "loc": {
+ "start": {
+ "line": 197,
+ "column": 13
+ },
+ "end": {
+ "line": 206,
+ "column": 3
+ }
+ }
+ },
+ "generator": false,
+ "expression": false,
+ "range": [
+ 6019,
+ 6241
+ ],
+ "loc": {
+ "start": {
+ "line": 197,
+ "column": 6
+ },
+ "end": {
+ "line": 206,
+ "column": 3
+ }
+ }
+ },
+ "kind": "method",
+ "computed": false,
+ "range": [
+ 6015,
+ 6241
+ ],
+ "loc": {
+ "start": {
+ "line": 197,
+ "column": 2
+ },
+ "end": {
+ "line": 206,
+ "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 * @since 0.1.0\n * @param {Object} root - Top Level Object to push. See:\n http://jsonapi.org/format/#document-top-level\n * @return {undefined} - Nothing.\n ",
+ "range": [
+ 5678,
+ 6012
+ ],
+ "loc": {
+ "start": {
+ "line": 188,
+ "column": 2
+ },
+ "end": {
+ "line": 196,
+ "column": 5
+ }
+ }
+ }
+ ],
+ "trailingComments": [
+ {
+ "type": "Block",
+ "value": "*\n * Remove a resource or collection of resources from the store.\n *\n * @since 0.1.0\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} - Nothing.\n ",
+ "range": [
+ 6245,
+ 6587
+ ],
+ "loc": {
+ "start": {
+ "line": 208,
+ "column": 2
+ },
+ "end": {
+ "line": 216,
+ "column": 5
+ }
+ }
+ }
+ ],
+ "static": false
+ },
+ {
+ "type": "MethodDefinition",
+ "key": {
+ "type": "Identifier",
+ "name": "remove",
+ "range": [
+ 6590,
+ 6596
+ ],
+ "loc": {
+ "start": {
+ "line": 217,
+ "column": 2
+ },
+ "end": {
+ "line": 217,
+ "column": 8
+ }
+ }
+ },
+ "value": {
+ "type": "FunctionExpression",
+ "id": null,
+ "params": [
+ {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 6597,
+ 6601
+ ],
+ "loc": {
+ "start": {
+ "line": 217,
+ "column": 9
+ },
+ "end": {
+ "line": 217,
+ "column": 13
+ }
+ }
+ },
+ {
+ "type": "Identifier",
+ "name": "id",
+ "range": [
+ 6603,
+ 6605
+ ],
+ "loc": {
+ "start": {
+ "line": 217,
+ "column": 15
+ },
+ "end": {
+ "line": 217,
+ "column": 17
+ }
+ }
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "IfStatement",
+ "test": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 6617,
+ 6621
+ ],
+ "loc": {
+ "start": {
+ "line": 218,
+ "column": 8
+ },
+ "end": {
+ "line": 218,
+ "column": 12
+ }
+ }
+ },
+ "consequent": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "IfStatement",
+ "test": {
+ "type": "MemberExpression",
+ "computed": true,
+ "object": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "ThisExpression",
+ "range": [
+ 6635,
+ 6639
+ ],
+ "loc": {
+ "start": {
+ "line": 219,
+ "column": 10
+ },
+ "end": {
+ "line": 219,
+ "column": 14
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "_types",
+ "range": [
+ 6640,
+ 6646
+ ],
+ "loc": {
+ "start": {
+ "line": 219,
+ "column": 15
+ },
+ "end": {
+ "line": 219,
+ "column": 21
+ }
+ }
+ },
+ "range": [
+ 6635,
+ 6646
+ ],
+ "loc": {
+ "start": {
+ "line": 219,
+ "column": 10
+ },
+ "end": {
+ "line": 219,
+ "column": 21
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 6647,
+ 6651
+ ],
+ "loc": {
+ "start": {
+ "line": 219,
+ "column": 22
+ },
+ "end": {
+ "line": 219,
+ "column": 26
+ }
+ }
+ },
+ "range": [
+ 6635,
+ 6652
+ ],
+ "loc": {
+ "start": {
+ "line": 219,
+ "column": 10
+ },
+ "end": {
+ "line": 219,
+ "column": 27
+ }
+ }
+ },
+ "consequent": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "IfStatement",
+ "test": {
+ "type": "Identifier",
+ "name": "id",
+ "range": [
+ 6668,
+ 6670
+ ],
+ "loc": {
+ "start": {
+ "line": 220,
+ "column": 12
+ },
+ "end": {
+ "line": 220,
+ "column": 14
+ }
+ }
+ },
+ "consequent": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "id": {
+ "type": "Identifier",
+ "name": "resource",
+ "range": [
+ 6688,
+ 6696
+ ],
+ "loc": {
+ "start": {
+ "line": 221,
+ "column": 14
+ },
+ "end": {
+ "line": 221,
+ "column": 22
+ }
+ }
+ },
+ "init": {
+ "type": "MemberExpression",
+ "computed": true,
+ "object": {
+ "type": "MemberExpression",
+ "computed": true,
+ "object": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "ThisExpression",
+ "range": [
+ 6699,
+ 6703
+ ],
+ "loc": {
+ "start": {
+ "line": 221,
+ "column": 25
+ },
+ "end": {
+ "line": 221,
+ "column": 29
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "_data",
+ "range": [
+ 6704,
+ 6709
+ ],
+ "loc": {
+ "start": {
+ "line": 221,
+ "column": 30
+ },
+ "end": {
+ "line": 221,
+ "column": 35
+ }
+ }
+ },
+ "range": [
+ 6699,
+ 6709
+ ],
+ "loc": {
+ "start": {
+ "line": 221,
+ "column": 25
+ },
+ "end": {
+ "line": 221,
+ "column": 35
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 6710,
+ 6714
+ ],
+ "loc": {
+ "start": {
+ "line": 221,
+ "column": 36
+ },
+ "end": {
+ "line": 221,
+ "column": 40
+ }
+ }
+ },
+ "range": [
+ 6699,
+ 6715
+ ],
+ "loc": {
+ "start": {
+ "line": 221,
+ "column": 25
+ },
+ "end": {
+ "line": 221,
+ "column": 41
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "id",
+ "range": [
+ 6716,
+ 6718
+ ],
+ "loc": {
+ "start": {
+ "line": 221,
+ "column": 42
+ },
+ "end": {
+ "line": 221,
+ "column": 44
+ }
+ }
+ },
+ "range": [
+ 6699,
+ 6719
+ ],
+ "loc": {
+ "start": {
+ "line": 221,
+ "column": 25
+ },
+ "end": {
+ "line": 221,
+ "column": 45
+ }
+ }
+ },
+ "range": [
+ 6688,
+ 6719
+ ],
+ "loc": {
+ "start": {
+ "line": 221,
+ "column": 14
+ },
+ "end": {
+ "line": 221,
+ "column": 45
+ }
+ }
+ }
+ ],
+ "kind": "let",
+ "range": [
+ 6684,
+ 6720
+ ],
+ "loc": {
+ "start": {
+ "line": 221,
+ "column": 10
+ },
+ "end": {
+ "line": 221,
+ "column": 46
+ }
+ }
+ },
+ {
+ "type": "IfStatement",
+ "test": {
+ "type": "Identifier",
+ "name": "resource",
+ "range": [
+ 6735,
+ 6743
+ ],
+ "loc": {
+ "start": {
+ "line": 222,
+ "column": 14
+ },
+ "end": {
+ "line": 222,
+ "column": 22
+ }
+ }
+ },
+ "consequent": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "expression": {
+ "type": "CallExpression",
+ "callee": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "ThisExpression",
+ "range": [
+ 6759,
+ 6763
+ ],
+ "loc": {
+ "start": {
+ "line": 223,
+ "column": 12
+ },
+ "end": {
+ "line": 223,
+ "column": 16
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "_remove",
+ "range": [
+ 6764,
+ 6771
+ ],
+ "loc": {
+ "start": {
+ "line": 223,
+ "column": 17
+ },
+ "end": {
+ "line": 223,
+ "column": 24
+ }
+ }
+ },
+ "range": [
+ 6759,
+ 6771
+ ],
+ "loc": {
+ "start": {
+ "line": 223,
+ "column": 12
+ },
+ "end": {
+ "line": 223,
+ "column": 24
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "Identifier",
+ "name": "resource",
+ "range": [
+ 6772,
+ 6780
+ ],
+ "loc": {
+ "start": {
+ "line": 223,
+ "column": 25
+ },
+ "end": {
+ "line": 223,
+ "column": 33
+ }
+ }
+ }
+ ],
+ "range": [
+ 6759,
+ 6781
+ ],
+ "loc": {
+ "start": {
+ "line": 223,
+ "column": 12
+ },
+ "end": {
+ "line": 223,
+ "column": 34
+ }
+ }
+ },
+ "range": [
+ 6759,
+ 6782
+ ],
+ "loc": {
+ "start": {
+ "line": 223,
+ "column": 12
+ },
+ "end": {
+ "line": 223,
+ "column": 35
+ }
+ }
+ }
+ ],
+ "range": [
+ 6745,
+ 6794
+ ],
+ "loc": {
+ "start": {
+ "line": 222,
+ "column": 24
+ },
+ "end": {
+ "line": 224,
+ "column": 11
+ }
+ }
+ },
+ "alternate": null,
+ "range": [
+ 6731,
+ 6794
+ ],
+ "loc": {
+ "start": {
+ "line": 222,
+ "column": 10
+ },
+ "end": {
+ "line": 224,
+ "column": 11
+ }
+ }
+ }
+ ],
+ "range": [
+ 6672,
+ 6804
+ ],
+ "loc": {
+ "start": {
+ "line": 220,
+ "column": 16
+ },
+ "end": {
+ "line": 225,
+ "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": [
+ 6822,
+ 6828
+ ],
+ "loc": {
+ "start": {
+ "line": 226,
+ "column": 10
+ },
+ "end": {
+ "line": 226,
+ "column": 16
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "keys",
+ "range": [
+ 6829,
+ 6833
+ ],
+ "loc": {
+ "start": {
+ "line": 226,
+ "column": 17
+ },
+ "end": {
+ "line": 226,
+ "column": 21
+ }
+ }
+ },
+ "range": [
+ 6822,
+ 6833
+ ],
+ "loc": {
+ "start": {
+ "line": 226,
+ "column": 10
+ },
+ "end": {
+ "line": 226,
+ "column": 21
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "MemberExpression",
+ "computed": true,
+ "object": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "ThisExpression",
+ "range": [
+ 6834,
+ 6838
+ ],
+ "loc": {
+ "start": {
+ "line": 226,
+ "column": 22
+ },
+ "end": {
+ "line": 226,
+ "column": 26
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "_data",
+ "range": [
+ 6839,
+ 6844
+ ],
+ "loc": {
+ "start": {
+ "line": 226,
+ "column": 27
+ },
+ "end": {
+ "line": 226,
+ "column": 32
+ }
+ }
+ },
+ "range": [
+ 6834,
+ 6844
+ ],
+ "loc": {
+ "start": {
+ "line": 226,
+ "column": 22
+ },
+ "end": {
+ "line": 226,
+ "column": 32
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 6845,
+ 6849
+ ],
+ "loc": {
+ "start": {
+ "line": 226,
+ "column": 33
+ },
+ "end": {
+ "line": 226,
+ "column": 37
+ }
+ }
+ },
+ "range": [
+ 6834,
+ 6850
+ ],
+ "loc": {
+ "start": {
+ "line": 226,
+ "column": 22
+ },
+ "end": {
+ "line": 226,
+ "column": 38
+ }
+ }
+ }
+ ],
+ "range": [
+ 6822,
+ 6851
+ ],
+ "loc": {
+ "start": {
+ "line": 226,
+ "column": 10
+ },
+ "end": {
+ "line": 226,
+ "column": 39
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "forEach",
+ "range": [
+ 6852,
+ 6859
+ ],
+ "loc": {
+ "start": {
+ "line": 226,
+ "column": 40
+ },
+ "end": {
+ "line": 226,
+ "column": 47
+ }
+ }
+ },
+ "range": [
+ 6822,
+ 6859
+ ],
+ "loc": {
+ "start": {
+ "line": 226,
+ "column": 10
+ },
+ "end": {
+ "line": 226,
+ "column": 47
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "ArrowFunctionExpression",
+ "id": null,
+ "params": [
+ {
+ "type": "Identifier",
+ "name": "id",
+ "range": [
+ 6860,
+ 6862
+ ],
+ "loc": {
+ "start": {
+ "line": 226,
+ "column": 48
+ },
+ "end": {
+ "line": 226,
+ "column": 50
+ }
+ }
+ }
+ ],
+ "body": {
+ "type": "CallExpression",
+ "callee": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "ThisExpression",
+ "range": [
+ 6866,
+ 6870
+ ],
+ "loc": {
+ "start": {
+ "line": 226,
+ "column": 54
+ },
+ "end": {
+ "line": 226,
+ "column": 58
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "remove",
+ "range": [
+ 6871,
+ 6877
+ ],
+ "loc": {
+ "start": {
+ "line": 226,
+ "column": 59
+ },
+ "end": {
+ "line": 226,
+ "column": 65
+ }
+ }
+ },
+ "range": [
+ 6866,
+ 6877
+ ],
+ "loc": {
+ "start": {
+ "line": 226,
+ "column": 54
+ },
+ "end": {
+ "line": 226,
+ "column": 65
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 6878,
+ 6882
+ ],
+ "loc": {
+ "start": {
+ "line": 226,
+ "column": 66
+ },
+ "end": {
+ "line": 226,
+ "column": 70
+ }
+ }
+ },
+ {
+ "type": "Identifier",
+ "name": "id",
+ "range": [
+ 6884,
+ 6886
+ ],
+ "loc": {
+ "start": {
+ "line": 226,
+ "column": 72
+ },
+ "end": {
+ "line": 226,
+ "column": 74
+ }
+ }
+ }
+ ],
+ "range": [
+ 6866,
+ 6887
+ ],
+ "loc": {
+ "start": {
+ "line": 226,
+ "column": 54
+ },
+ "end": {
+ "line": 226,
+ "column": 75
+ }
+ }
+ },
+ "generator": false,
+ "expression": true,
+ "range": [
+ 6860,
+ 6887
+ ],
+ "loc": {
+ "start": {
+ "line": 226,
+ "column": 48
+ },
+ "end": {
+ "line": 226,
+ "column": 75
+ }
+ }
+ }
+ ],
+ "range": [
+ 6822,
+ 6888
+ ],
+ "loc": {
+ "start": {
+ "line": 226,
+ "column": 10
+ },
+ "end": {
+ "line": 226,
+ "column": 76
+ }
+ }
+ },
+ "range": [
+ 6822,
+ 6889
+ ],
+ "loc": {
+ "start": {
+ "line": 226,
+ "column": 10
+ },
+ "end": {
+ "line": 226,
+ "column": 77
+ }
+ }
+ }
+ ],
+ "range": [
+ 6810,
+ 6899
+ ],
+ "loc": {
+ "start": {
+ "line": 225,
+ "column": 15
+ },
+ "end": {
+ "line": 227,
+ "column": 9
+ }
+ }
+ },
+ "range": [
+ 6664,
+ 6899
+ ],
+ "loc": {
+ "start": {
+ "line": 220,
+ "column": 8
+ },
+ "end": {
+ "line": 227,
+ "column": 9
+ }
+ }
+ }
+ ],
+ "range": [
+ 6654,
+ 6907
+ ],
+ "loc": {
+ "start": {
+ "line": 219,
+ "column": 29
+ },
+ "end": {
+ "line": 228,
+ "column": 7
+ }
+ }
+ },
+ "alternate": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "ThrowStatement",
+ "argument": {
+ "type": "NewExpression",
+ "callee": {
+ "type": "Identifier",
+ "name": "TypeError",
+ "range": [
+ 6933,
+ 6942
+ ],
+ "loc": {
+ "start": {
+ "line": 229,
+ "column": 18
+ },
+ "end": {
+ "line": 229,
+ "column": 27
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "TemplateLiteral",
+ "quasis": [
+ {
+ "type": "TemplateElement",
+ "value": {
+ "raw": "Unknown type '",
+ "cooked": "Unknown type '"
+ },
+ "tail": false,
+ "range": [
+ 6943,
+ 6960
+ ],
+ "loc": {
+ "start": {
+ "line": 229,
+ "column": 28
+ },
+ "end": {
+ "line": 229,
+ "column": 45
+ }
+ }
+ },
+ {
+ "type": "TemplateElement",
+ "value": {
+ "raw": "'",
+ "cooked": "'"
+ },
+ "tail": true,
+ "range": [
+ 6964,
+ 6967
+ ],
+ "loc": {
+ "start": {
+ "line": 229,
+ "column": 49
+ },
+ "end": {
+ "line": 229,
+ "column": 52
+ }
+ }
+ }
+ ],
+ "expressions": [
+ {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 6960,
+ 6964
+ ],
+ "loc": {
+ "start": {
+ "line": 229,
+ "column": 45
+ },
+ "end": {
+ "line": 229,
+ "column": 49
+ }
+ }
+ }
+ ],
+ "range": [
+ 6943,
+ 6967
+ ],
+ "loc": {
+ "start": {
+ "line": 229,
+ "column": 28
+ },
+ "end": {
+ "line": 229,
+ "column": 52
+ }
+ }
+ }
+ ],
+ "range": [
+ 6929,
+ 6968
+ ],
+ "loc": {
+ "start": {
+ "line": 229,
+ "column": 14
+ },
+ "end": {
+ "line": 229,
+ "column": 53
+ }
+ }
+ },
+ "range": [
+ 6923,
+ 6969
+ ],
+ "loc": {
+ "start": {
+ "line": 229,
+ "column": 8
+ },
+ "end": {
+ "line": 229,
+ "column": 54
+ }
+ }
+ }
+ ],
+ "range": [
+ 6913,
+ 6977
+ ],
+ "loc": {
+ "start": {
+ "line": 228,
+ "column": 13
+ },
+ "end": {
+ "line": 230,
+ "column": 7
+ }
+ }
+ },
+ "range": [
+ 6631,
+ 6977
+ ],
+ "loc": {
+ "start": {
+ "line": 219,
+ "column": 6
+ },
+ "end": {
+ "line": 230,
+ "column": 7
+ }
+ }
+ }
+ ],
+ "range": [
+ 6623,
+ 6983
+ ],
+ "loc": {
+ "start": {
+ "line": 218,
+ "column": 14
+ },
+ "end": {
+ "line": 231,
+ "column": 5
+ }
+ }
+ },
+ "alternate": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "ThrowStatement",
+ "argument": {
+ "type": "NewExpression",
+ "callee": {
+ "type": "Identifier",
+ "name": "TypeError",
+ "range": [
+ 7007,
+ 7016
+ ],
+ "loc": {
+ "start": {
+ "line": 232,
+ "column": 16
+ },
+ "end": {
+ "line": 232,
+ "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": [
+ 7017,
+ 7052
+ ],
+ "loc": {
+ "start": {
+ "line": 232,
+ "column": 26
+ },
+ "end": {
+ "line": 232,
+ "column": 61
+ }
+ }
+ }
+ ],
+ "expressions": [],
+ "range": [
+ 7017,
+ 7052
+ ],
+ "loc": {
+ "start": {
+ "line": 232,
+ "column": 26
+ },
+ "end": {
+ "line": 232,
+ "column": 61
+ }
+ }
+ }
+ ],
+ "range": [
+ 7003,
+ 7053
+ ],
+ "loc": {
+ "start": {
+ "line": 232,
+ "column": 12
+ },
+ "end": {
+ "line": 232,
+ "column": 62
+ }
+ }
+ },
+ "range": [
+ 6997,
+ 7054
+ ],
+ "loc": {
+ "start": {
+ "line": 232,
+ "column": 6
+ },
+ "end": {
+ "line": 232,
+ "column": 63
+ }
+ }
+ }
+ ],
+ "range": [
+ 6989,
+ 7060
+ ],
+ "loc": {
+ "start": {
+ "line": 231,
+ "column": 11
+ },
+ "end": {
+ "line": 233,
+ "column": 5
+ }
+ }
+ },
+ "range": [
+ 6613,
+ 7060
+ ],
+ "loc": {
+ "start": {
+ "line": 218,
+ "column": 4
+ },
+ "end": {
+ "line": 233,
+ "column": 5
+ }
+ }
+ }
+ ],
+ "range": [
+ 6607,
+ 7064
+ ],
+ "loc": {
+ "start": {
+ "line": 217,
+ "column": 19
+ },
+ "end": {
+ "line": 234,
+ "column": 3
+ }
+ }
+ },
+ "generator": false,
+ "expression": false,
+ "range": [
+ 6596,
+ 7064
+ ],
+ "loc": {
+ "start": {
+ "line": 217,
+ "column": 8
+ },
+ "end": {
+ "line": 234,
+ "column": 3
+ }
+ }
+ },
+ "kind": "method",
+ "computed": false,
+ "range": [
+ 6590,
+ 7064
+ ],
+ "loc": {
+ "start": {
+ "line": 217,
+ "column": 2
+ },
+ "end": {
+ "line": 234,
+ "column": 3
+ }
+ },
+ "leadingComments": [
+ {
+ "type": "Block",
+ "value": "*\n * Remove a resource or collection of resources from the store.\n *\n * @since 0.1.0\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} - Nothing.\n ",
+ "range": [
+ 6245,
+ 6587
+ ],
+ "loc": {
+ "start": {
+ "line": 208,
+ "column": 2
+ },
+ "end": {
+ "line": 216,
+ "column": 5
+ }
+ }
+ }
+ ],
+ "static": false
+ },
+ {
+ "type": "MethodDefinition",
+ "key": {
+ "type": "Identifier",
+ "name": "_addField",
+ "range": [
+ 7068,
+ 7077
+ ],
+ "loc": {
+ "start": {
+ "line": 236,
+ "column": 2
+ },
+ "end": {
+ "line": 236,
+ "column": 11
+ }
+ }
+ },
+ "value": {
+ "type": "FunctionExpression",
+ "id": null,
+ "params": [
+ {
+ "type": "Identifier",
+ "name": "object",
+ "range": [
+ 7078,
+ 7084
+ ],
+ "loc": {
+ "start": {
+ "line": 236,
+ "column": 12
+ },
+ "end": {
+ "line": 236,
+ "column": 18
+ }
+ }
+ },
+ {
+ "type": "Identifier",
+ "name": "resource",
+ "range": [
+ 7086,
+ 7094
+ ],
+ "loc": {
+ "start": {
+ "line": 236,
+ "column": 20
+ },
+ "end": {
+ "line": 236,
+ "column": 28
+ }
+ }
+ },
+ {
+ "type": "Identifier",
+ "name": "definition",
+ "range": [
+ 7096,
+ 7106
+ ],
+ "loc": {
+ "start": {
+ "line": 236,
+ "column": 30
+ },
+ "end": {
+ "line": 236,
+ "column": 40
+ }
+ }
+ },
+ {
+ "type": "Identifier",
+ "name": "fieldName",
+ "range": [
+ 7108,
+ 7117
+ ],
+ "loc": {
+ "start": {
+ "line": 236,
+ "column": 42
+ },
+ "end": {
+ "line": 236,
+ "column": 51
+ }
+ }
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "id": {
+ "type": "Identifier",
+ "name": "field",
+ "range": [
+ 7129,
+ 7134
+ ],
+ "loc": {
+ "start": {
+ "line": 237,
+ "column": 8
+ },
+ "end": {
+ "line": 237,
+ "column": 13
+ }
+ }
+ },
+ "init": {
+ "type": "MemberExpression",
+ "computed": true,
+ "object": {
+ "type": "Identifier",
+ "name": "definition",
+ "range": [
+ 7137,
+ 7147
+ ],
+ "loc": {
+ "start": {
+ "line": 237,
+ "column": 16
+ },
+ "end": {
+ "line": 237,
+ "column": 26
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "fieldName",
+ "range": [
+ 7148,
+ 7157
+ ],
+ "loc": {
+ "start": {
+ "line": 237,
+ "column": 27
+ },
+ "end": {
+ "line": 237,
+ "column": 36
+ }
+ }
+ },
+ "range": [
+ 7137,
+ 7158
+ ],
+ "loc": {
+ "start": {
+ "line": 237,
+ "column": 16
+ },
+ "end": {
+ "line": 237,
+ "column": 37
+ }
+ }
+ },
+ "range": [
+ 7129,
+ 7158
+ ],
+ "loc": {
+ "start": {
+ "line": 237,
+ "column": 8
+ },
+ "end": {
+ "line": 237,
+ "column": 37
+ }
+ }
+ }
+ ],
+ "kind": "var",
+ "range": [
+ 7125,
+ 7159
+ ],
+ "loc": {
+ "start": {
+ "line": 237,
+ "column": 4
+ },
+ "end": {
+ "line": 237,
+ "column": 38
+ }
+ }
+ },
+ {
+ "type": "VariableDeclaration",
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "id": {
+ "type": "Identifier",
+ "name": "newValue",
+ "range": [
+ 7168,
+ 7176
+ ],
+ "loc": {
+ "start": {
+ "line": 238,
+ "column": 8
+ },
+ "end": {
+ "line": 238,
+ "column": 16
+ }
+ }
+ },
+ "init": {
+ "type": "CallExpression",
+ "callee": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "field",
+ "range": [
+ 7179,
+ 7184
+ ],
+ "loc": {
+ "start": {
+ "line": 238,
+ "column": 19
+ },
+ "end": {
+ "line": 238,
+ "column": 24
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "deserialize",
+ "range": [
+ 7185,
+ 7196
+ ],
+ "loc": {
+ "start": {
+ "line": 238,
+ "column": 25
+ },
+ "end": {
+ "line": 238,
+ "column": 36
+ }
+ }
+ },
+ "range": [
+ 7179,
+ 7196
+ ],
+ "loc": {
+ "start": {
+ "line": 238,
+ "column": 19
+ },
+ "end": {
+ "line": 238,
+ "column": 36
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "call",
+ "range": [
+ 7197,
+ 7201
+ ],
+ "loc": {
+ "start": {
+ "line": 238,
+ "column": 37
+ },
+ "end": {
+ "line": 238,
+ "column": 41
+ }
+ }
+ },
+ "range": [
+ 7179,
+ 7201
+ ],
+ "loc": {
+ "start": {
+ "line": 238,
+ "column": 19
+ },
+ "end": {
+ "line": 238,
+ "column": 41
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "ThisExpression",
+ "range": [
+ 7202,
+ 7206
+ ],
+ "loc": {
+ "start": {
+ "line": 238,
+ "column": 42
+ },
+ "end": {
+ "line": 238,
+ "column": 46
+ }
+ }
+ },
+ {
+ "type": "Identifier",
+ "name": "object",
+ "range": [
+ 7208,
+ 7214
+ ],
+ "loc": {
+ "start": {
+ "line": 238,
+ "column": 48
+ },
+ "end": {
+ "line": 238,
+ "column": 54
+ }
+ }
+ },
+ {
+ "type": "Identifier",
+ "name": "fieldName",
+ "range": [
+ 7216,
+ 7225
+ ],
+ "loc": {
+ "start": {
+ "line": 238,
+ "column": 56
+ },
+ "end": {
+ "line": 238,
+ "column": 65
+ }
+ }
+ }
+ ],
+ "range": [
+ 7179,
+ 7226
+ ],
+ "loc": {
+ "start": {
+ "line": 238,
+ "column": 19
+ },
+ "end": {
+ "line": 238,
+ "column": 66
+ }
+ }
+ },
+ "range": [
+ 7168,
+ 7226
+ ],
+ "loc": {
+ "start": {
+ "line": 238,
+ "column": 8
+ },
+ "end": {
+ "line": 238,
+ "column": 66
+ }
+ }
+ }
+ ],
+ "kind": "var",
+ "range": [
+ 7164,
+ 7227
+ ],
+ "loc": {
+ "start": {
+ "line": 238,
+ "column": 4
+ },
+ "end": {
+ "line": 238,
+ "column": 67
+ }
+ }
+ },
+ {
+ "type": "IfStatement",
+ "test": {
+ "type": "BinaryExpression",
+ "operator": "!==",
+ "left": {
+ "type": "UnaryExpression",
+ "operator": "typeof",
+ "argument": {
+ "type": "Identifier",
+ "name": "newValue",
+ "range": [
+ 7243,
+ 7251
+ ],
+ "loc": {
+ "start": {
+ "line": 239,
+ "column": 15
+ },
+ "end": {
+ "line": 239,
+ "column": 23
+ }
+ }
+ },
+ "prefix": true,
+ "range": [
+ 7236,
+ 7251
+ ],
+ "loc": {
+ "start": {
+ "line": 239,
+ "column": 8
+ },
+ "end": {
+ "line": 239,
+ "column": 23
+ }
+ }
+ },
+ "right": {
+ "type": "Literal",
+ "value": "undefined",
+ "raw": "\"undefined\"",
+ "range": [
+ 7256,
+ 7267
+ ],
+ "loc": {
+ "start": {
+ "line": 239,
+ "column": 28
+ },
+ "end": {
+ "line": 239,
+ "column": 39
+ }
+ }
+ },
+ "range": [
+ 7236,
+ 7267
+ ],
+ "loc": {
+ "start": {
+ "line": 239,
+ "column": 8
+ },
+ "end": {
+ "line": 239,
+ "column": 39
+ }
+ }
+ },
+ "consequent": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "IfStatement",
+ "test": {
+ "type": "BinaryExpression",
+ "operator": "===",
+ "left": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "field",
+ "range": [
+ 7281,
+ 7286
+ ],
+ "loc": {
+ "start": {
+ "line": 240,
+ "column": 10
+ },
+ "end": {
+ "line": 240,
+ "column": 15
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 7287,
+ 7291
+ ],
+ "loc": {
+ "start": {
+ "line": 240,
+ "column": 16
+ },
+ "end": {
+ "line": 240,
+ "column": 20
+ }
+ }
+ },
+ "range": [
+ 7281,
+ 7291
+ ],
+ "loc": {
+ "start": {
+ "line": 240,
+ "column": 10
+ },
+ "end": {
+ "line": 240,
+ "column": 20
+ }
+ }
+ },
+ "right": {
+ "type": "Literal",
+ "value": "has-one",
+ "raw": "\"has-one\"",
+ "range": [
+ 7296,
+ 7305
+ ],
+ "loc": {
+ "start": {
+ "line": 240,
+ "column": 25
+ },
+ "end": {
+ "line": 240,
+ "column": 34
+ }
+ }
+ },
+ "range": [
+ 7281,
+ 7305
+ ],
+ "loc": {
+ "start": {
+ "line": 240,
+ "column": 10
+ },
+ "end": {
+ "line": 240,
+ "column": 34
+ }
+ }
+ },
+ "consequent": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "IfStatement",
+ "test": {
+ "type": "MemberExpression",
+ "computed": true,
+ "object": {
+ "type": "Identifier",
+ "name": "resource",
+ "range": [
+ 7321,
+ 7329
+ ],
+ "loc": {
+ "start": {
+ "line": 241,
+ "column": 12
+ },
+ "end": {
+ "line": 241,
+ "column": 20
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "fieldName",
+ "range": [
+ 7330,
+ 7339
+ ],
+ "loc": {
+ "start": {
+ "line": 241,
+ "column": 21
+ },
+ "end": {
+ "line": 241,
+ "column": 30
+ }
+ }
+ },
+ "range": [
+ 7321,
+ 7340
+ ],
+ "loc": {
+ "start": {
+ "line": 241,
+ "column": 12
+ },
+ "end": {
+ "line": 241,
+ "column": 31
+ }
+ }
+ },
+ "consequent": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "expression": {
+ "type": "CallExpression",
+ "callee": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "ThisExpression",
+ "range": [
+ 7354,
+ 7358
+ ],
+ "loc": {
+ "start": {
+ "line": 242,
+ "column": 10
+ },
+ "end": {
+ "line": 242,
+ "column": 14
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "_removeInverseRelationship",
+ "range": [
+ 7359,
+ 7385
+ ],
+ "loc": {
+ "start": {
+ "line": 242,
+ "column": 15
+ },
+ "end": {
+ "line": 242,
+ "column": 41
+ }
+ }
+ },
+ "range": [
+ 7354,
+ 7385
+ ],
+ "loc": {
+ "start": {
+ "line": 242,
+ "column": 10
+ },
+ "end": {
+ "line": 242,
+ "column": 41
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "Identifier",
+ "name": "resource",
+ "range": [
+ 7386,
+ 7394
+ ],
+ "loc": {
+ "start": {
+ "line": 242,
+ "column": 42
+ },
+ "end": {
+ "line": 242,
+ "column": 50
+ }
+ }
+ },
+ {
+ "type": "Identifier",
+ "name": "fieldName",
+ "range": [
+ 7396,
+ 7405
+ ],
+ "loc": {
+ "start": {
+ "line": 242,
+ "column": 52
+ },
+ "end": {
+ "line": 242,
+ "column": 61
+ }
+ }
+ },
+ {
+ "type": "MemberExpression",
+ "computed": true,
+ "object": {
+ "type": "Identifier",
+ "name": "resource",
+ "range": [
+ 7407,
+ 7415
+ ],
+ "loc": {
+ "start": {
+ "line": 242,
+ "column": 63
+ },
+ "end": {
+ "line": 242,
+ "column": 71
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "fieldName",
+ "range": [
+ 7416,
+ 7425
+ ],
+ "loc": {
+ "start": {
+ "line": 242,
+ "column": 72
+ },
+ "end": {
+ "line": 242,
+ "column": 81
+ }
+ }
+ },
+ "range": [
+ 7407,
+ 7426
+ ],
+ "loc": {
+ "start": {
+ "line": 242,
+ "column": 63
+ },
+ "end": {
+ "line": 242,
+ "column": 82
+ }
+ }
+ },
+ {
+ "type": "Identifier",
+ "name": "field",
+ "range": [
+ 7428,
+ 7433
+ ],
+ "loc": {
+ "start": {
+ "line": 242,
+ "column": 84
+ },
+ "end": {
+ "line": 242,
+ "column": 89
+ }
+ }
+ }
+ ],
+ "range": [
+ 7354,
+ 7434
+ ],
+ "loc": {
+ "start": {
+ "line": 242,
+ "column": 10
+ },
+ "end": {
+ "line": 242,
+ "column": 90
+ }
+ }
+ },
+ "range": [
+ 7354,
+ 7435
+ ],
+ "loc": {
+ "start": {
+ "line": 242,
+ "column": 10
+ },
+ "end": {
+ "line": 242,
+ "column": 91
+ }
+ }
+ }
+ ],
+ "range": [
+ 7342,
+ 7445
+ ],
+ "loc": {
+ "start": {
+ "line": 241,
+ "column": 33
+ },
+ "end": {
+ "line": 243,
+ "column": 9
+ }
+ }
+ },
+ "alternate": null,
+ "range": [
+ 7317,
+ 7445
+ ],
+ "loc": {
+ "start": {
+ "line": 241,
+ "column": 8
+ },
+ "end": {
+ "line": 243,
+ "column": 9
+ }
+ }
+ },
+ {
+ "type": "IfStatement",
+ "test": {
+ "type": "Identifier",
+ "name": "newValue",
+ "range": [
+ 7458,
+ 7466
+ ],
+ "loc": {
+ "start": {
+ "line": 244,
+ "column": 12
+ },
+ "end": {
+ "line": 244,
+ "column": 20
+ }
+ }
+ },
+ "consequent": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "expression": {
+ "type": "CallExpression",
+ "callee": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "ThisExpression",
+ "range": [
+ 7480,
+ 7484
+ ],
+ "loc": {
+ "start": {
+ "line": 245,
+ "column": 10
+ },
+ "end": {
+ "line": 245,
+ "column": 14
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "_addInverseRelationship",
+ "range": [
+ 7485,
+ 7508
+ ],
+ "loc": {
+ "start": {
+ "line": 245,
+ "column": 15
+ },
+ "end": {
+ "line": 245,
+ "column": 38
+ }
+ }
+ },
+ "range": [
+ 7480,
+ 7508
+ ],
+ "loc": {
+ "start": {
+ "line": 245,
+ "column": 10
+ },
+ "end": {
+ "line": 245,
+ "column": 38
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "Identifier",
+ "name": "resource",
+ "range": [
+ 7509,
+ 7517
+ ],
+ "loc": {
+ "start": {
+ "line": 245,
+ "column": 39
+ },
+ "end": {
+ "line": 245,
+ "column": 47
+ }
+ }
+ },
+ {
+ "type": "Identifier",
+ "name": "fieldName",
+ "range": [
+ 7519,
+ 7528
+ ],
+ "loc": {
+ "start": {
+ "line": 245,
+ "column": 49
+ },
+ "end": {
+ "line": 245,
+ "column": 58
+ }
+ }
+ },
+ {
+ "type": "Identifier",
+ "name": "newValue",
+ "range": [
+ 7530,
+ 7538
+ ],
+ "loc": {
+ "start": {
+ "line": 245,
+ "column": 60
+ },
+ "end": {
+ "line": 245,
+ "column": 68
+ }
+ }
+ },
+ {
+ "type": "Identifier",
+ "name": "field",
+ "range": [
+ 7540,
+ 7545
+ ],
+ "loc": {
+ "start": {
+ "line": 245,
+ "column": 70
+ },
+ "end": {
+ "line": 245,
+ "column": 75
+ }
+ }
+ }
+ ],
+ "range": [
+ 7480,
+ 7546
+ ],
+ "loc": {
+ "start": {
+ "line": 245,
+ "column": 10
+ },
+ "end": {
+ "line": 245,
+ "column": 76
+ }
+ }
+ },
+ "range": [
+ 7480,
+ 7547
+ ],
+ "loc": {
+ "start": {
+ "line": 245,
+ "column": 10
+ },
+ "end": {
+ "line": 245,
+ "column": 77
+ }
+ }
+ }
+ ],
+ "range": [
+ 7468,
+ 7557
+ ],
+ "loc": {
+ "start": {
+ "line": 244,
+ "column": 22
+ },
+ "end": {
+ "line": 246,
+ "column": 9
+ }
+ }
+ },
+ "alternate": null,
+ "range": [
+ 7454,
+ 7557
+ ],
+ "loc": {
+ "start": {
+ "line": 244,
+ "column": 8
+ },
+ "end": {
+ "line": 246,
+ "column": 9
+ }
+ }
+ }
+ ],
+ "range": [
+ 7307,
+ 7565
+ ],
+ "loc": {
+ "start": {
+ "line": 240,
+ "column": 36
+ },
+ "end": {
+ "line": 247,
+ "column": 7
+ }
+ }
+ },
+ "alternate": {
+ "type": "IfStatement",
+ "test": {
+ "type": "BinaryExpression",
+ "operator": "===",
+ "left": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "field",
+ "range": [
+ 7575,
+ 7580
+ ],
+ "loc": {
+ "start": {
+ "line": 247,
+ "column": 17
+ },
+ "end": {
+ "line": 247,
+ "column": 22
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 7581,
+ 7585
+ ],
+ "loc": {
+ "start": {
+ "line": 247,
+ "column": 23
+ },
+ "end": {
+ "line": 247,
+ "column": 27
+ }
+ }
+ },
+ "range": [
+ 7575,
+ 7585
+ ],
+ "loc": {
+ "start": {
+ "line": 247,
+ "column": 17
+ },
+ "end": {
+ "line": 247,
+ "column": 27
+ }
+ }
+ },
+ "right": {
+ "type": "Literal",
+ "value": "has-many",
+ "raw": "\"has-many\"",
+ "range": [
+ 7590,
+ 7600
+ ],
+ "loc": {
+ "start": {
+ "line": 247,
+ "column": 32
+ },
+ "end": {
+ "line": 247,
+ "column": 42
+ }
+ }
+ },
+ "range": [
+ 7575,
+ 7600
+ ],
+ "loc": {
+ "start": {
+ "line": 247,
+ "column": 17
+ },
+ "end": {
+ "line": 247,
+ "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": [
+ 7612,
+ 7620
+ ],
+ "loc": {
+ "start": {
+ "line": 248,
+ "column": 8
+ },
+ "end": {
+ "line": 248,
+ "column": 16
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "fieldName",
+ "range": [
+ 7621,
+ 7630
+ ],
+ "loc": {
+ "start": {
+ "line": 248,
+ "column": 17
+ },
+ "end": {
+ "line": 248,
+ "column": 26
+ }
+ }
+ },
+ "range": [
+ 7612,
+ 7631
+ ],
+ "loc": {
+ "start": {
+ "line": 248,
+ "column": 8
+ },
+ "end": {
+ "line": 248,
+ "column": 27
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "forEach",
+ "range": [
+ 7632,
+ 7639
+ ],
+ "loc": {
+ "start": {
+ "line": 248,
+ "column": 28
+ },
+ "end": {
+ "line": 248,
+ "column": 35
+ }
+ }
+ },
+ "range": [
+ 7612,
+ 7639
+ ],
+ "loc": {
+ "start": {
+ "line": 248,
+ "column": 8
+ },
+ "end": {
+ "line": 248,
+ "column": 35
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "ArrowFunctionExpression",
+ "id": null,
+ "params": [
+ {
+ "type": "Identifier",
+ "name": "r",
+ "range": [
+ 7640,
+ 7641
+ ],
+ "loc": {
+ "start": {
+ "line": 248,
+ "column": 36
+ },
+ "end": {
+ "line": 248,
+ "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": [
+ 7661,
+ 7669
+ ],
+ "loc": {
+ "start": {
+ "line": 249,
+ "column": 14
+ },
+ "end": {
+ "line": 249,
+ "column": 22
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "fieldName",
+ "range": [
+ 7670,
+ 7679
+ ],
+ "loc": {
+ "start": {
+ "line": 249,
+ "column": 23
+ },
+ "end": {
+ "line": 249,
+ "column": 32
+ }
+ }
+ },
+ "range": [
+ 7661,
+ 7680
+ ],
+ "loc": {
+ "start": {
+ "line": 249,
+ "column": 14
+ },
+ "end": {
+ "line": 249,
+ "column": 33
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "indexOf",
+ "range": [
+ 7681,
+ 7688
+ ],
+ "loc": {
+ "start": {
+ "line": 249,
+ "column": 34
+ },
+ "end": {
+ "line": 249,
+ "column": 41
+ }
+ }
+ },
+ "range": [
+ 7661,
+ 7688
+ ],
+ "loc": {
+ "start": {
+ "line": 249,
+ "column": 14
+ },
+ "end": {
+ "line": 249,
+ "column": 41
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "Identifier",
+ "name": "r",
+ "range": [
+ 7689,
+ 7690
+ ],
+ "loc": {
+ "start": {
+ "line": 249,
+ "column": 42
+ },
+ "end": {
+ "line": 249,
+ "column": 43
+ }
+ }
+ }
+ ],
+ "range": [
+ 7661,
+ 7691
+ ],
+ "loc": {
+ "start": {
+ "line": 249,
+ "column": 14
+ },
+ "end": {
+ "line": 249,
+ "column": 44
+ }
+ }
+ },
+ "right": {
+ "type": "UnaryExpression",
+ "operator": "-",
+ "argument": {
+ "type": "Literal",
+ "value": 1,
+ "raw": "1",
+ "range": [
+ 7697,
+ 7698
+ ],
+ "loc": {
+ "start": {
+ "line": 249,
+ "column": 50
+ },
+ "end": {
+ "line": 249,
+ "column": 51
+ }
+ }
+ },
+ "prefix": true,
+ "range": [
+ 7696,
+ 7698
+ ],
+ "loc": {
+ "start": {
+ "line": 249,
+ "column": 49
+ },
+ "end": {
+ "line": 249,
+ "column": 51
+ }
+ }
+ },
+ "range": [
+ 7661,
+ 7698
+ ],
+ "loc": {
+ "start": {
+ "line": 249,
+ "column": 14
+ },
+ "end": {
+ "line": 249,
+ "column": 51
+ }
+ }
+ },
+ "consequent": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "expression": {
+ "type": "CallExpression",
+ "callee": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "ThisExpression",
+ "range": [
+ 7714,
+ 7718
+ ],
+ "loc": {
+ "start": {
+ "line": 250,
+ "column": 12
+ },
+ "end": {
+ "line": 250,
+ "column": 16
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "_removeInverseRelationship",
+ "range": [
+ 7719,
+ 7745
+ ],
+ "loc": {
+ "start": {
+ "line": 250,
+ "column": 17
+ },
+ "end": {
+ "line": 250,
+ "column": 43
+ }
+ }
+ },
+ "range": [
+ 7714,
+ 7745
+ ],
+ "loc": {
+ "start": {
+ "line": 250,
+ "column": 12
+ },
+ "end": {
+ "line": 250,
+ "column": 43
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "Identifier",
+ "name": "resource",
+ "range": [
+ 7746,
+ 7754
+ ],
+ "loc": {
+ "start": {
+ "line": 250,
+ "column": 44
+ },
+ "end": {
+ "line": 250,
+ "column": 52
+ }
+ }
+ },
+ {
+ "type": "Identifier",
+ "name": "fieldName",
+ "range": [
+ 7756,
+ 7765
+ ],
+ "loc": {
+ "start": {
+ "line": 250,
+ "column": 54
+ },
+ "end": {
+ "line": 250,
+ "column": 63
+ }
+ }
+ },
+ {
+ "type": "Identifier",
+ "name": "r",
+ "range": [
+ 7767,
+ 7768
+ ],
+ "loc": {
+ "start": {
+ "line": 250,
+ "column": 65
+ },
+ "end": {
+ "line": 250,
+ "column": 66
+ }
+ }
+ },
+ {
+ "type": "Identifier",
+ "name": "field",
+ "range": [
+ 7770,
+ 7775
+ ],
+ "loc": {
+ "start": {
+ "line": 250,
+ "column": 68
+ },
+ "end": {
+ "line": 250,
+ "column": 73
+ }
+ }
+ }
+ ],
+ "range": [
+ 7714,
+ 7776
+ ],
+ "loc": {
+ "start": {
+ "line": 250,
+ "column": 12
+ },
+ "end": {
+ "line": 250,
+ "column": 74
+ }
+ }
+ },
+ "range": [
+ 7714,
+ 7777
+ ],
+ "loc": {
+ "start": {
+ "line": 250,
+ "column": 12
+ },
+ "end": {
+ "line": 250,
+ "column": 75
+ }
+ }
+ }
+ ],
+ "range": [
+ 7700,
+ 7789
+ ],
+ "loc": {
+ "start": {
+ "line": 249,
+ "column": 53
+ },
+ "end": {
+ "line": 251,
+ "column": 11
+ }
+ }
+ },
+ "alternate": null,
+ "range": [
+ 7657,
+ 7789
+ ],
+ "loc": {
+ "start": {
+ "line": 249,
+ "column": 10
+ },
+ "end": {
+ "line": 251,
+ "column": 11
+ }
+ }
+ }
+ ],
+ "range": [
+ 7645,
+ 7799
+ ],
+ "loc": {
+ "start": {
+ "line": 248,
+ "column": 41
+ },
+ "end": {
+ "line": 252,
+ "column": 9
+ }
+ }
+ },
+ "generator": false,
+ "expression": false,
+ "range": [
+ 7640,
+ 7799
+ ],
+ "loc": {
+ "start": {
+ "line": 248,
+ "column": 36
+ },
+ "end": {
+ "line": 252,
+ "column": 9
+ }
+ }
+ }
+ ],
+ "range": [
+ 7612,
+ 7800
+ ],
+ "loc": {
+ "start": {
+ "line": 248,
+ "column": 8
+ },
+ "end": {
+ "line": 252,
+ "column": 10
+ }
+ }
+ },
+ "range": [
+ 7612,
+ 7801
+ ],
+ "loc": {
+ "start": {
+ "line": 248,
+ "column": 8
+ },
+ "end": {
+ "line": 252,
+ "column": 11
+ }
+ }
+ },
+ {
+ "type": "ExpressionStatement",
+ "expression": {
+ "type": "CallExpression",
+ "callee": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "newValue",
+ "range": [
+ 7810,
+ 7818
+ ],
+ "loc": {
+ "start": {
+ "line": 253,
+ "column": 8
+ },
+ "end": {
+ "line": 253,
+ "column": 16
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "forEach",
+ "range": [
+ 7819,
+ 7826
+ ],
+ "loc": {
+ "start": {
+ "line": 253,
+ "column": 17
+ },
+ "end": {
+ "line": 253,
+ "column": 24
+ }
+ }
+ },
+ "range": [
+ 7810,
+ 7826
+ ],
+ "loc": {
+ "start": {
+ "line": 253,
+ "column": 8
+ },
+ "end": {
+ "line": 253,
+ "column": 24
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "ArrowFunctionExpression",
+ "id": null,
+ "params": [
+ {
+ "type": "Identifier",
+ "name": "r",
+ "range": [
+ 7827,
+ 7828
+ ],
+ "loc": {
+ "start": {
+ "line": 253,
+ "column": 25
+ },
+ "end": {
+ "line": 253,
+ "column": 26
+ }
+ }
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "expression": {
+ "type": "CallExpression",
+ "callee": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "ThisExpression",
+ "range": [
+ 7844,
+ 7848
+ ],
+ "loc": {
+ "start": {
+ "line": 254,
+ "column": 10
+ },
+ "end": {
+ "line": 254,
+ "column": 14
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "_addInverseRelationship",
+ "range": [
+ 7849,
+ 7872
+ ],
+ "loc": {
+ "start": {
+ "line": 254,
+ "column": 15
+ },
+ "end": {
+ "line": 254,
+ "column": 38
+ }
+ }
+ },
+ "range": [
+ 7844,
+ 7872
+ ],
+ "loc": {
+ "start": {
+ "line": 254,
+ "column": 10
+ },
+ "end": {
+ "line": 254,
+ "column": 38
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "Identifier",
+ "name": "resource",
+ "range": [
+ 7873,
+ 7881
+ ],
+ "loc": {
+ "start": {
+ "line": 254,
+ "column": 39
+ },
+ "end": {
+ "line": 254,
+ "column": 47
+ }
+ }
+ },
+ {
+ "type": "Identifier",
+ "name": "fieldName",
+ "range": [
+ 7883,
+ 7892
+ ],
+ "loc": {
+ "start": {
+ "line": 254,
+ "column": 49
+ },
+ "end": {
+ "line": 254,
+ "column": 58
+ }
+ }
+ },
+ {
+ "type": "Identifier",
+ "name": "r",
+ "range": [
+ 7894,
+ 7895
+ ],
+ "loc": {
+ "start": {
+ "line": 254,
+ "column": 60
+ },
+ "end": {
+ "line": 254,
+ "column": 61
+ }
+ }
+ },
+ {
+ "type": "Identifier",
+ "name": "field",
+ "range": [
+ 7897,
+ 7902
+ ],
+ "loc": {
+ "start": {
+ "line": 254,
+ "column": 63
+ },
+ "end": {
+ "line": 254,
+ "column": 68
+ }
+ }
+ }
+ ],
+ "range": [
+ 7844,
+ 7903
+ ],
+ "loc": {
+ "start": {
+ "line": 254,
+ "column": 10
+ },
+ "end": {
+ "line": 254,
+ "column": 69
+ }
+ }
+ },
+ "range": [
+ 7844,
+ 7904
+ ],
+ "loc": {
+ "start": {
+ "line": 254,
+ "column": 10
+ },
+ "end": {
+ "line": 254,
+ "column": 70
+ }
+ }
+ }
+ ],
+ "range": [
+ 7832,
+ 7914
+ ],
+ "loc": {
+ "start": {
+ "line": 253,
+ "column": 30
+ },
+ "end": {
+ "line": 255,
+ "column": 9
+ }
+ }
+ },
+ "generator": false,
+ "expression": false,
+ "range": [
+ 7827,
+ 7914
+ ],
+ "loc": {
+ "start": {
+ "line": 253,
+ "column": 25
+ },
+ "end": {
+ "line": 255,
+ "column": 9
+ }
+ }
+ }
+ ],
+ "range": [
+ 7810,
+ 7915
+ ],
+ "loc": {
+ "start": {
+ "line": 253,
+ "column": 8
+ },
+ "end": {
+ "line": 255,
+ "column": 10
+ }
+ }
+ },
+ "range": [
+ 7810,
+ 7916
+ ],
+ "loc": {
+ "start": {
+ "line": 253,
+ "column": 8
+ },
+ "end": {
+ "line": 255,
+ "column": 11
+ }
+ }
+ }
+ ],
+ "range": [
+ 7602,
+ 7924
+ ],
+ "loc": {
+ "start": {
+ "line": 247,
+ "column": 44
+ },
+ "end": {
+ "line": 256,
+ "column": 7
+ }
+ }
+ },
+ "alternate": null,
+ "range": [
+ 7571,
+ 7924
+ ],
+ "loc": {
+ "start": {
+ "line": 247,
+ "column": 13
+ },
+ "end": {
+ "line": 256,
+ "column": 7
+ }
+ }
+ },
+ "range": [
+ 7277,
+ 7924
+ ],
+ "loc": {
+ "start": {
+ "line": 240,
+ "column": 6
+ },
+ "end": {
+ "line": 256,
+ "column": 7
+ }
+ }
+ },
+ {
+ "type": "ExpressionStatement",
+ "expression": {
+ "type": "AssignmentExpression",
+ "operator": "=",
+ "left": {
+ "type": "MemberExpression",
+ "computed": true,
+ "object": {
+ "type": "Identifier",
+ "name": "resource",
+ "range": [
+ 7931,
+ 7939
+ ],
+ "loc": {
+ "start": {
+ "line": 257,
+ "column": 6
+ },
+ "end": {
+ "line": 257,
+ "column": 14
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "fieldName",
+ "range": [
+ 7940,
+ 7949
+ ],
+ "loc": {
+ "start": {
+ "line": 257,
+ "column": 15
+ },
+ "end": {
+ "line": 257,
+ "column": 24
+ }
+ }
+ },
+ "range": [
+ 7931,
+ 7950
+ ],
+ "loc": {
+ "start": {
+ "line": 257,
+ "column": 6
+ },
+ "end": {
+ "line": 257,
+ "column": 25
+ }
+ }
+ },
+ "right": {
+ "type": "Identifier",
+ "name": "newValue",
+ "range": [
+ 7953,
+ 7961
+ ],
+ "loc": {
+ "start": {
+ "line": 257,
+ "column": 28
+ },
+ "end": {
+ "line": 257,
+ "column": 36
+ }
+ }
+ },
+ "range": [
+ 7931,
+ 7961
+ ],
+ "loc": {
+ "start": {
+ "line": 257,
+ "column": 6
+ },
+ "end": {
+ "line": 257,
+ "column": 36
+ }
+ }
+ },
+ "range": [
+ 7931,
+ 7962
+ ],
+ "loc": {
+ "start": {
+ "line": 257,
+ "column": 6
+ },
+ "end": {
+ "line": 257,
+ "column": 37
+ }
+ }
+ }
+ ],
+ "range": [
+ 7269,
+ 7968
+ ],
+ "loc": {
+ "start": {
+ "line": 239,
+ "column": 41
+ },
+ "end": {
+ "line": 258,
+ "column": 5
+ }
+ }
+ },
+ "alternate": null,
+ "range": [
+ 7232,
+ 7968
+ ],
+ "loc": {
+ "start": {
+ "line": 239,
+ "column": 4
+ },
+ "end": {
+ "line": 258,
+ "column": 5
+ }
+ }
+ }
+ ],
+ "range": [
+ 7119,
+ 7972
+ ],
+ "loc": {
+ "start": {
+ "line": 236,
+ "column": 53
+ },
+ "end": {
+ "line": 259,
+ "column": 3
+ }
+ }
+ },
+ "generator": false,
+ "expression": false,
+ "range": [
+ 7077,
+ 7972
+ ],
+ "loc": {
+ "start": {
+ "line": 236,
+ "column": 11
+ },
+ "end": {
+ "line": 259,
+ "column": 3
+ }
+ }
+ },
+ "kind": "method",
+ "computed": false,
+ "range": [
+ 7068,
+ 7972
+ ],
+ "loc": {
+ "start": {
+ "line": 236,
+ "column": 2
+ },
+ "end": {
+ "line": 259,
+ "column": 3
+ }
+ },
+ "static": false
+ },
+ {
+ "type": "MethodDefinition",
+ "key": {
+ "type": "Identifier",
+ "name": "_addInverseRelationship",
+ "range": [
+ 7976,
+ 7999
+ ],
+ "loc": {
+ "start": {
+ "line": 261,
+ "column": 2
+ },
+ "end": {
+ "line": 261,
+ "column": 25
+ }
+ }
+ },
+ "value": {
+ "type": "FunctionExpression",
+ "id": null,
+ "params": [
+ {
+ "type": "Identifier",
+ "name": "sourceResource",
+ "range": [
+ 8000,
+ 8014
+ ],
+ "loc": {
+ "start": {
+ "line": 261,
+ "column": 26
+ },
+ "end": {
+ "line": 261,
+ "column": 40
+ }
+ }
+ },
+ {
+ "type": "Identifier",
+ "name": "sourceFieldName",
+ "range": [
+ 8016,
+ 8031
+ ],
+ "loc": {
+ "start": {
+ "line": 261,
+ "column": 42
+ },
+ "end": {
+ "line": 261,
+ "column": 57
+ }
+ }
+ },
+ {
+ "type": "Identifier",
+ "name": "targetResource",
+ "range": [
+ 8033,
+ 8047
+ ],
+ "loc": {
+ "start": {
+ "line": 261,
+ "column": 59
+ },
+ "end": {
+ "line": 261,
+ "column": 73
+ }
+ }
+ },
+ {
+ "type": "Identifier",
+ "name": "sourceField",
+ "range": [
+ 8049,
+ 8060
+ ],
+ "loc": {
+ "start": {
+ "line": 261,
+ "column": 75
+ },
+ "end": {
+ "line": 261,
+ "column": 86
+ }
+ }
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "id": {
+ "type": "Identifier",
+ "name": "targetDefinition",
+ "range": [
+ 8072,
+ 8088
+ ],
+ "loc": {
+ "start": {
+ "line": 262,
+ "column": 8
+ },
+ "end": {
+ "line": 262,
+ "column": 24
+ }
+ }
+ },
+ "init": {
+ "type": "MemberExpression",
+ "computed": true,
+ "object": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "ThisExpression",
+ "range": [
+ 8091,
+ 8095
+ ],
+ "loc": {
+ "start": {
+ "line": 262,
+ "column": 27
+ },
+ "end": {
+ "line": 262,
+ "column": 31
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "_types",
+ "range": [
+ 8096,
+ 8102
+ ],
+ "loc": {
+ "start": {
+ "line": 262,
+ "column": 32
+ },
+ "end": {
+ "line": 262,
+ "column": 38
+ }
+ }
+ },
+ "range": [
+ 8091,
+ 8102
+ ],
+ "loc": {
+ "start": {
+ "line": 262,
+ "column": 27
+ },
+ "end": {
+ "line": 262,
+ "column": 38
+ }
+ }
+ },
+ "property": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "targetResource",
+ "range": [
+ 8103,
+ 8117
+ ],
+ "loc": {
+ "start": {
+ "line": 262,
+ "column": 39
+ },
+ "end": {
+ "line": 262,
+ "column": 53
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 8118,
+ 8122
+ ],
+ "loc": {
+ "start": {
+ "line": 262,
+ "column": 54
+ },
+ "end": {
+ "line": 262,
+ "column": 58
+ }
+ }
+ },
+ "range": [
+ 8103,
+ 8122
+ ],
+ "loc": {
+ "start": {
+ "line": 262,
+ "column": 39
+ },
+ "end": {
+ "line": 262,
+ "column": 58
+ }
+ }
+ },
+ "range": [
+ 8091,
+ 8123
+ ],
+ "loc": {
+ "start": {
+ "line": 262,
+ "column": 27
+ },
+ "end": {
+ "line": 262,
+ "column": 59
+ }
+ }
+ },
+ "range": [
+ 8072,
+ 8123
+ ],
+ "loc": {
+ "start": {
+ "line": 262,
+ "column": 8
+ },
+ "end": {
+ "line": 262,
+ "column": 59
+ }
+ }
+ }
+ ],
+ "kind": "var",
+ "range": [
+ 8068,
+ 8124
+ ],
+ "loc": {
+ "start": {
+ "line": 262,
+ "column": 4
+ },
+ "end": {
+ "line": 262,
+ "column": 60
+ }
+ }
+ },
+ {
+ "type": "VariableDeclaration",
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "id": {
+ "type": "Identifier",
+ "name": "sourceDefinition",
+ "range": [
+ 8133,
+ 8149
+ ],
+ "loc": {
+ "start": {
+ "line": 263,
+ "column": 8
+ },
+ "end": {
+ "line": 263,
+ "column": 24
+ }
+ }
+ },
+ "init": {
+ "type": "MemberExpression",
+ "computed": true,
+ "object": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "ThisExpression",
+ "range": [
+ 8152,
+ 8156
+ ],
+ "loc": {
+ "start": {
+ "line": 263,
+ "column": 27
+ },
+ "end": {
+ "line": 263,
+ "column": 31
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "_types",
+ "range": [
+ 8157,
+ 8163
+ ],
+ "loc": {
+ "start": {
+ "line": 263,
+ "column": 32
+ },
+ "end": {
+ "line": 263,
+ "column": 38
+ }
+ }
+ },
+ "range": [
+ 8152,
+ 8163
+ ],
+ "loc": {
+ "start": {
+ "line": 263,
+ "column": 27
+ },
+ "end": {
+ "line": 263,
+ "column": 38
+ }
+ }
+ },
+ "property": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "sourceResource",
+ "range": [
+ 8164,
+ 8178
+ ],
+ "loc": {
+ "start": {
+ "line": 263,
+ "column": 39
+ },
+ "end": {
+ "line": 263,
+ "column": 53
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 8179,
+ 8183
+ ],
+ "loc": {
+ "start": {
+ "line": 263,
+ "column": 54
+ },
+ "end": {
+ "line": 263,
+ "column": 58
+ }
+ }
+ },
+ "range": [
+ 8164,
+ 8183
+ ],
+ "loc": {
+ "start": {
+ "line": 263,
+ "column": 39
+ },
+ "end": {
+ "line": 263,
+ "column": 58
+ }
+ }
+ },
+ "range": [
+ 8152,
+ 8184
+ ],
+ "loc": {
+ "start": {
+ "line": 263,
+ "column": 27
+ },
+ "end": {
+ "line": 263,
+ "column": 59
+ }
+ }
+ },
+ "range": [
+ 8133,
+ 8184
+ ],
+ "loc": {
+ "start": {
+ "line": 263,
+ "column": 8
+ },
+ "end": {
+ "line": 263,
+ "column": 59
+ }
+ }
+ }
+ ],
+ "kind": "var",
+ "range": [
+ 8129,
+ 8185
+ ],
+ "loc": {
+ "start": {
+ "line": 263,
+ "column": 4
+ },
+ "end": {
+ "line": 263,
+ "column": 60
+ }
+ }
+ },
+ {
+ "type": "IfStatement",
+ "test": {
+ "type": "Identifier",
+ "name": "targetDefinition",
+ "range": [
+ 8194,
+ 8210
+ ],
+ "loc": {
+ "start": {
+ "line": 264,
+ "column": 8
+ },
+ "end": {
+ "line": 264,
+ "column": 24
+ }
+ }
+ },
+ "consequent": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "id": {
+ "type": "Identifier",
+ "name": "targetFieldName",
+ "range": [
+ 8224,
+ 8239
+ ],
+ "loc": {
+ "start": {
+ "line": 265,
+ "column": 10
+ },
+ "end": {
+ "line": 265,
+ "column": 25
+ }
+ }
+ },
+ "init": {
+ "type": "CallExpression",
+ "callee": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "CallExpression",
+ "callee": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "ArrayExpression",
+ "elements": [
+ {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "sourceField",
+ "range": [
+ 8244,
+ 8255
+ ],
+ "loc": {
+ "start": {
+ "line": 265,
+ "column": 30
+ },
+ "end": {
+ "line": 265,
+ "column": 41
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "inverse",
+ "range": [
+ 8256,
+ 8263
+ ],
+ "loc": {
+ "start": {
+ "line": 265,
+ "column": 42
+ },
+ "end": {
+ "line": 265,
+ "column": 49
+ }
+ }
+ },
+ "range": [
+ 8244,
+ 8263
+ ],
+ "loc": {
+ "start": {
+ "line": 265,
+ "column": 30
+ },
+ "end": {
+ "line": 265,
+ "column": 49
+ }
+ }
+ }
+ ],
+ "range": [
+ 8242,
+ 8265
+ ],
+ "loc": {
+ "start": {
+ "line": 265,
+ "column": 28
+ },
+ "end": {
+ "line": 265,
+ "column": 51
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "concat",
+ "range": [
+ 8266,
+ 8272
+ ],
+ "loc": {
+ "start": {
+ "line": 265,
+ "column": 52
+ },
+ "end": {
+ "line": 265,
+ "column": 58
+ }
+ }
+ },
+ "range": [
+ 8242,
+ 8272
+ ],
+ "loc": {
+ "start": {
+ "line": 265,
+ "column": 28
+ },
+ "end": {
+ "line": 265,
+ "column": 58
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "sourceDefinition",
+ "range": [
+ 8273,
+ 8289
+ ],
+ "loc": {
+ "start": {
+ "line": 265,
+ "column": 59
+ },
+ "end": {
+ "line": 265,
+ "column": 75
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "_names",
+ "range": [
+ 8290,
+ 8296
+ ],
+ "loc": {
+ "start": {
+ "line": 265,
+ "column": 76
+ },
+ "end": {
+ "line": 265,
+ "column": 82
+ }
+ }
+ },
+ "range": [
+ 8273,
+ 8296
+ ],
+ "loc": {
+ "start": {
+ "line": 265,
+ "column": 59
+ },
+ "end": {
+ "line": 265,
+ "column": 82
+ }
+ }
+ }
+ ],
+ "range": [
+ 8242,
+ 8297
+ ],
+ "loc": {
+ "start": {
+ "line": 265,
+ "column": 28
+ },
+ "end": {
+ "line": 265,
+ "column": 83
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "find",
+ "range": [
+ 8298,
+ 8302
+ ],
+ "loc": {
+ "start": {
+ "line": 265,
+ "column": 84
+ },
+ "end": {
+ "line": 265,
+ "column": 88
+ }
+ }
+ },
+ "range": [
+ 8242,
+ 8302
+ ],
+ "loc": {
+ "start": {
+ "line": 265,
+ "column": 28
+ },
+ "end": {
+ "line": 265,
+ "column": 88
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "ArrowFunctionExpression",
+ "id": null,
+ "params": [
+ {
+ "type": "Identifier",
+ "name": "x",
+ "range": [
+ 8303,
+ 8304
+ ],
+ "loc": {
+ "start": {
+ "line": 265,
+ "column": 89
+ },
+ "end": {
+ "line": 265,
+ "column": 90
+ }
+ }
+ }
+ ],
+ "body": {
+ "type": "MemberExpression",
+ "computed": true,
+ "object": {
+ "type": "Identifier",
+ "name": "targetDefinition",
+ "range": [
+ 8308,
+ 8324
+ ],
+ "loc": {
+ "start": {
+ "line": 265,
+ "column": 94
+ },
+ "end": {
+ "line": 265,
+ "column": 110
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "x",
+ "range": [
+ 8325,
+ 8326
+ ],
+ "loc": {
+ "start": {
+ "line": 265,
+ "column": 111
+ },
+ "end": {
+ "line": 265,
+ "column": 112
+ }
+ }
+ },
+ "range": [
+ 8308,
+ 8327
+ ],
+ "loc": {
+ "start": {
+ "line": 265,
+ "column": 94
+ },
+ "end": {
+ "line": 265,
+ "column": 113
+ }
+ }
+ },
+ "generator": false,
+ "expression": true,
+ "range": [
+ 8303,
+ 8327
+ ],
+ "loc": {
+ "start": {
+ "line": 265,
+ "column": 89
+ },
+ "end": {
+ "line": 265,
+ "column": 113
+ }
+ }
+ }
+ ],
+ "range": [
+ 8242,
+ 8328
+ ],
+ "loc": {
+ "start": {
+ "line": 265,
+ "column": 28
+ },
+ "end": {
+ "line": 265,
+ "column": 114
+ }
+ }
+ },
+ "range": [
+ 8224,
+ 8328
+ ],
+ "loc": {
+ "start": {
+ "line": 265,
+ "column": 10
+ },
+ "end": {
+ "line": 265,
+ "column": 114
+ }
+ }
+ }
+ ],
+ "kind": "let",
+ "range": [
+ 8220,
+ 8329
+ ],
+ "loc": {
+ "start": {
+ "line": 265,
+ "column": 6
+ },
+ "end": {
+ "line": 265,
+ "column": 115
+ }
+ }
+ },
+ {
+ "type": "VariableDeclaration",
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "id": {
+ "type": "Identifier",
+ "name": "targetField",
+ "range": [
+ 8340,
+ 8351
+ ],
+ "loc": {
+ "start": {
+ "line": 266,
+ "column": 10
+ },
+ "end": {
+ "line": 266,
+ "column": 21
+ }
+ }
+ },
+ "init": {
+ "type": "LogicalExpression",
+ "operator": "&&",
+ "left": {
+ "type": "Identifier",
+ "name": "targetDefinition",
+ "range": [
+ 8354,
+ 8370
+ ],
+ "loc": {
+ "start": {
+ "line": 266,
+ "column": 24
+ },
+ "end": {
+ "line": 266,
+ "column": 40
+ }
+ }
+ },
+ "right": {
+ "type": "MemberExpression",
+ "computed": true,
+ "object": {
+ "type": "Identifier",
+ "name": "targetDefinition",
+ "range": [
+ 8374,
+ 8390
+ ],
+ "loc": {
+ "start": {
+ "line": 266,
+ "column": 44
+ },
+ "end": {
+ "line": 266,
+ "column": 60
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "targetFieldName",
+ "range": [
+ 8391,
+ 8406
+ ],
+ "loc": {
+ "start": {
+ "line": 266,
+ "column": 61
+ },
+ "end": {
+ "line": 266,
+ "column": 76
+ }
+ }
+ },
+ "range": [
+ 8374,
+ 8407
+ ],
+ "loc": {
+ "start": {
+ "line": 266,
+ "column": 44
+ },
+ "end": {
+ "line": 266,
+ "column": 77
+ }
+ }
+ },
+ "range": [
+ 8354,
+ 8407
+ ],
+ "loc": {
+ "start": {
+ "line": 266,
+ "column": 24
+ },
+ "end": {
+ "line": 266,
+ "column": 77
+ }
+ }
+ },
+ "range": [
+ 8340,
+ 8407
+ ],
+ "loc": {
+ "start": {
+ "line": 266,
+ "column": 10
+ },
+ "end": {
+ "line": 266,
+ "column": 77
+ }
+ }
+ }
+ ],
+ "kind": "let",
+ "range": [
+ 8336,
+ 8408
+ ],
+ "loc": {
+ "start": {
+ "line": 266,
+ "column": 6
+ },
+ "end": {
+ "line": 266,
+ "column": 78
+ }
+ }
+ },
+ {
+ "type": "ExpressionStatement",
+ "expression": {
+ "type": "CallExpression",
+ "callee": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "targetResource",
+ "range": [
+ 8415,
+ 8429
+ ],
+ "loc": {
+ "start": {
+ "line": 267,
+ "column": 6
+ },
+ "end": {
+ "line": 267,
+ "column": 20
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "_dependents",
+ "range": [
+ 8430,
+ 8441
+ ],
+ "loc": {
+ "start": {
+ "line": 267,
+ "column": 21
+ },
+ "end": {
+ "line": 267,
+ "column": 32
+ }
+ }
+ },
+ "range": [
+ 8415,
+ 8441
+ ],
+ "loc": {
+ "start": {
+ "line": 267,
+ "column": 6
+ },
+ "end": {
+ "line": 267,
+ "column": 32
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "push",
+ "range": [
+ 8442,
+ 8446
+ ],
+ "loc": {
+ "start": {
+ "line": 267,
+ "column": 33
+ },
+ "end": {
+ "line": 267,
+ "column": 37
+ }
+ }
+ },
+ "range": [
+ 8415,
+ 8446
+ ],
+ "loc": {
+ "start": {
+ "line": 267,
+ "column": 6
+ },
+ "end": {
+ "line": 267,
+ "column": 37
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "ObjectExpression",
+ "properties": [
+ {
+ "type": "Property",
+ "key": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 8449,
+ 8453
+ ],
+ "loc": {
+ "start": {
+ "line": 267,
+ "column": 40
+ },
+ "end": {
+ "line": 267,
+ "column": 44
+ }
+ }
+ },
+ "value": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "sourceResource",
+ "range": [
+ 8455,
+ 8469
+ ],
+ "loc": {
+ "start": {
+ "line": 267,
+ "column": 46
+ },
+ "end": {
+ "line": 267,
+ "column": 60
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 8470,
+ 8474
+ ],
+ "loc": {
+ "start": {
+ "line": 267,
+ "column": 61
+ },
+ "end": {
+ "line": 267,
+ "column": 65
+ }
+ }
+ },
+ "range": [
+ 8455,
+ 8474
+ ],
+ "loc": {
+ "start": {
+ "line": 267,
+ "column": 46
+ },
+ "end": {
+ "line": 267,
+ "column": 65
+ }
+ }
+ },
+ "kind": "init",
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "range": [
+ 8449,
+ 8474
+ ],
+ "loc": {
+ "start": {
+ "line": 267,
+ "column": 40
+ },
+ "end": {
+ "line": 267,
+ "column": 65
+ }
+ }
+ },
+ {
+ "type": "Property",
+ "key": {
+ "type": "Identifier",
+ "name": "id",
+ "range": [
+ 8476,
+ 8478
+ ],
+ "loc": {
+ "start": {
+ "line": 267,
+ "column": 67
+ },
+ "end": {
+ "line": 267,
+ "column": 69
+ }
+ }
+ },
+ "value": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "sourceResource",
+ "range": [
+ 8480,
+ 8494
+ ],
+ "loc": {
+ "start": {
+ "line": 267,
+ "column": 71
+ },
+ "end": {
+ "line": 267,
+ "column": 85
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "id",
+ "range": [
+ 8495,
+ 8497
+ ],
+ "loc": {
+ "start": {
+ "line": 267,
+ "column": 86
+ },
+ "end": {
+ "line": 267,
+ "column": 88
+ }
+ }
+ },
+ "range": [
+ 8480,
+ 8497
+ ],
+ "loc": {
+ "start": {
+ "line": 267,
+ "column": 71
+ },
+ "end": {
+ "line": 267,
+ "column": 88
+ }
+ }
+ },
+ "kind": "init",
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "range": [
+ 8476,
+ 8497
+ ],
+ "loc": {
+ "start": {
+ "line": 267,
+ "column": 67
+ },
+ "end": {
+ "line": 267,
+ "column": 88
+ }
+ }
+ },
+ {
+ "type": "Property",
+ "key": {
+ "type": "Identifier",
+ "name": "fieldName",
+ "range": [
+ 8499,
+ 8508
+ ],
+ "loc": {
+ "start": {
+ "line": 267,
+ "column": 90
+ },
+ "end": {
+ "line": 267,
+ "column": 99
+ }
+ }
+ },
+ "value": {
+ "type": "Identifier",
+ "name": "sourceFieldName",
+ "range": [
+ 8510,
+ 8525
+ ],
+ "loc": {
+ "start": {
+ "line": 267,
+ "column": 101
+ },
+ "end": {
+ "line": 267,
+ "column": 116
+ }
+ }
+ },
+ "kind": "init",
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "range": [
+ 8499,
+ 8525
+ ],
+ "loc": {
+ "start": {
+ "line": 267,
+ "column": 90
+ },
+ "end": {
+ "line": 267,
+ "column": 116
+ }
+ }
+ }
+ ],
+ "range": [
+ 8447,
+ 8527
+ ],
+ "loc": {
+ "start": {
+ "line": 267,
+ "column": 38
+ },
+ "end": {
+ "line": 267,
+ "column": 118
+ }
+ }
+ }
+ ],
+ "range": [
+ 8415,
+ 8528
+ ],
+ "loc": {
+ "start": {
+ "line": 267,
+ "column": 6
+ },
+ "end": {
+ "line": 267,
+ "column": 119
+ }
+ }
+ },
+ "range": [
+ 8415,
+ 8529
+ ],
+ "loc": {
+ "start": {
+ "line": 267,
+ "column": 6
+ },
+ "end": {
+ "line": 267,
+ "column": 120
+ }
+ }
+ },
+ {
+ "type": "IfStatement",
+ "test": {
+ "type": "Identifier",
+ "name": "targetField",
+ "range": [
+ 8540,
+ 8551
+ ],
+ "loc": {
+ "start": {
+ "line": 268,
+ "column": 10
+ },
+ "end": {
+ "line": 268,
+ "column": 21
+ }
+ }
+ },
+ "consequent": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "IfStatement",
+ "test": {
+ "type": "BinaryExpression",
+ "operator": "===",
+ "left": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "targetField",
+ "range": [
+ 8567,
+ 8578
+ ],
+ "loc": {
+ "start": {
+ "line": 269,
+ "column": 12
+ },
+ "end": {
+ "line": 269,
+ "column": 23
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 8579,
+ 8583
+ ],
+ "loc": {
+ "start": {
+ "line": 269,
+ "column": 24
+ },
+ "end": {
+ "line": 269,
+ "column": 28
+ }
+ }
+ },
+ "range": [
+ 8567,
+ 8583
+ ],
+ "loc": {
+ "start": {
+ "line": 269,
+ "column": 12
+ },
+ "end": {
+ "line": 269,
+ "column": 28
+ }
+ }
+ },
+ "right": {
+ "type": "Literal",
+ "value": "has-one",
+ "raw": "\"has-one\"",
+ "range": [
+ 8588,
+ 8597
+ ],
+ "loc": {
+ "start": {
+ "line": 269,
+ "column": 33
+ },
+ "end": {
+ "line": 269,
+ "column": 42
+ }
+ }
+ },
+ "range": [
+ 8567,
+ 8597
+ ],
+ "loc": {
+ "start": {
+ "line": 269,
+ "column": 12
+ },
+ "end": {
+ "line": 269,
+ "column": 42
+ }
+ }
+ },
+ "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": [
+ 8611,
+ 8625
+ ],
+ "loc": {
+ "start": {
+ "line": 270,
+ "column": 10
+ },
+ "end": {
+ "line": 270,
+ "column": 24
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "_dependents",
+ "range": [
+ 8626,
+ 8637
+ ],
+ "loc": {
+ "start": {
+ "line": 270,
+ "column": 25
+ },
+ "end": {
+ "line": 270,
+ "column": 36
+ }
+ }
+ },
+ "range": [
+ 8611,
+ 8637
+ ],
+ "loc": {
+ "start": {
+ "line": 270,
+ "column": 10
+ },
+ "end": {
+ "line": 270,
+ "column": 36
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "push",
+ "range": [
+ 8638,
+ 8642
+ ],
+ "loc": {
+ "start": {
+ "line": 270,
+ "column": 37
+ },
+ "end": {
+ "line": 270,
+ "column": 41
+ }
+ }
+ },
+ "range": [
+ 8611,
+ 8642
+ ],
+ "loc": {
+ "start": {
+ "line": 270,
+ "column": 10
+ },
+ "end": {
+ "line": 270,
+ "column": 41
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "ObjectExpression",
+ "properties": [
+ {
+ "type": "Property",
+ "key": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 8645,
+ 8649
+ ],
+ "loc": {
+ "start": {
+ "line": 270,
+ "column": 44
+ },
+ "end": {
+ "line": 270,
+ "column": 48
+ }
+ }
+ },
+ "value": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "targetResource",
+ "range": [
+ 8651,
+ 8665
+ ],
+ "loc": {
+ "start": {
+ "line": 270,
+ "column": 50
+ },
+ "end": {
+ "line": 270,
+ "column": 64
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 8666,
+ 8670
+ ],
+ "loc": {
+ "start": {
+ "line": 270,
+ "column": 65
+ },
+ "end": {
+ "line": 270,
+ "column": 69
+ }
+ }
+ },
+ "range": [
+ 8651,
+ 8670
+ ],
+ "loc": {
+ "start": {
+ "line": 270,
+ "column": 50
+ },
+ "end": {
+ "line": 270,
+ "column": 69
+ }
+ }
+ },
+ "kind": "init",
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "range": [
+ 8645,
+ 8670
+ ],
+ "loc": {
+ "start": {
+ "line": 270,
+ "column": 44
+ },
+ "end": {
+ "line": 270,
+ "column": 69
+ }
+ }
+ },
+ {
+ "type": "Property",
+ "key": {
+ "type": "Identifier",
+ "name": "id",
+ "range": [
+ 8672,
+ 8674
+ ],
+ "loc": {
+ "start": {
+ "line": 270,
+ "column": 71
+ },
+ "end": {
+ "line": 270,
+ "column": 73
+ }
+ }
+ },
+ "value": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "targetResource",
+ "range": [
+ 8676,
+ 8690
+ ],
+ "loc": {
+ "start": {
+ "line": 270,
+ "column": 75
+ },
+ "end": {
+ "line": 270,
+ "column": 89
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "id",
+ "range": [
+ 8691,
+ 8693
+ ],
+ "loc": {
+ "start": {
+ "line": 270,
+ "column": 90
+ },
+ "end": {
+ "line": 270,
+ "column": 92
+ }
+ }
+ },
+ "range": [
+ 8676,
+ 8693
+ ],
+ "loc": {
+ "start": {
+ "line": 270,
+ "column": 75
+ },
+ "end": {
+ "line": 270,
+ "column": 92
+ }
+ }
+ },
+ "kind": "init",
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "range": [
+ 8672,
+ 8693
+ ],
+ "loc": {
+ "start": {
+ "line": 270,
+ "column": 71
+ },
+ "end": {
+ "line": 270,
+ "column": 92
+ }
+ }
+ },
+ {
+ "type": "Property",
+ "key": {
+ "type": "Identifier",
+ "name": "fieldName",
+ "range": [
+ 8695,
+ 8704
+ ],
+ "loc": {
+ "start": {
+ "line": 270,
+ "column": 94
+ },
+ "end": {
+ "line": 270,
+ "column": 103
+ }
+ }
+ },
+ "value": {
+ "type": "Identifier",
+ "name": "targetFieldName",
+ "range": [
+ 8706,
+ 8721
+ ],
+ "loc": {
+ "start": {
+ "line": 270,
+ "column": 105
+ },
+ "end": {
+ "line": 270,
+ "column": 120
+ }
+ }
+ },
+ "kind": "init",
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "range": [
+ 8695,
+ 8721
+ ],
+ "loc": {
+ "start": {
+ "line": 270,
+ "column": 94
+ },
+ "end": {
+ "line": 270,
+ "column": 120
+ }
+ }
+ }
+ ],
+ "range": [
+ 8643,
+ 8723
+ ],
+ "loc": {
+ "start": {
+ "line": 270,
+ "column": 42
+ },
+ "end": {
+ "line": 270,
+ "column": 122
+ }
+ }
+ }
+ ],
+ "range": [
+ 8611,
+ 8724
+ ],
+ "loc": {
+ "start": {
+ "line": 270,
+ "column": 10
+ },
+ "end": {
+ "line": 270,
+ "column": 123
+ }
+ }
+ },
+ "range": [
+ 8611,
+ 8725
+ ],
+ "loc": {
+ "start": {
+ "line": 270,
+ "column": 10
+ },
+ "end": {
+ "line": 270,
+ "column": 124
+ }
+ }
+ },
+ {
+ "type": "ExpressionStatement",
+ "expression": {
+ "type": "AssignmentExpression",
+ "operator": "=",
+ "left": {
+ "type": "MemberExpression",
+ "computed": true,
+ "object": {
+ "type": "Identifier",
+ "name": "targetResource",
+ "range": [
+ 8736,
+ 8750
+ ],
+ "loc": {
+ "start": {
+ "line": 271,
+ "column": 10
+ },
+ "end": {
+ "line": 271,
+ "column": 24
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "targetFieldName",
+ "range": [
+ 8751,
+ 8766
+ ],
+ "loc": {
+ "start": {
+ "line": 271,
+ "column": 25
+ },
+ "end": {
+ "line": 271,
+ "column": 40
+ }
+ }
+ },
+ "range": [
+ 8736,
+ 8767
+ ],
+ "loc": {
+ "start": {
+ "line": 271,
+ "column": 10
+ },
+ "end": {
+ "line": 271,
+ "column": 41
+ }
+ }
+ },
+ "right": {
+ "type": "Identifier",
+ "name": "sourceResource",
+ "range": [
+ 8770,
+ 8784
+ ],
+ "loc": {
+ "start": {
+ "line": 271,
+ "column": 44
+ },
+ "end": {
+ "line": 271,
+ "column": 58
+ }
+ }
+ },
+ "range": [
+ 8736,
+ 8784
+ ],
+ "loc": {
+ "start": {
+ "line": 271,
+ "column": 10
+ },
+ "end": {
+ "line": 271,
+ "column": 58
+ }
+ }
+ },
+ "range": [
+ 8736,
+ 8785
+ ],
+ "loc": {
+ "start": {
+ "line": 271,
+ "column": 10
+ },
+ "end": {
+ "line": 271,
+ "column": 59
+ }
+ }
+ }
+ ],
+ "range": [
+ 8599,
+ 8795
+ ],
+ "loc": {
+ "start": {
+ "line": 269,
+ "column": 44
+ },
+ "end": {
+ "line": 272,
+ "column": 9
+ }
+ }
+ },
+ "alternate": {
+ "type": "IfStatement",
+ "test": {
+ "type": "BinaryExpression",
+ "operator": "===",
+ "left": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "targetField",
+ "range": [
+ 8805,
+ 8816
+ ],
+ "loc": {
+ "start": {
+ "line": 272,
+ "column": 19
+ },
+ "end": {
+ "line": 272,
+ "column": 30
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 8817,
+ 8821
+ ],
+ "loc": {
+ "start": {
+ "line": 272,
+ "column": 31
+ },
+ "end": {
+ "line": 272,
+ "column": 35
+ }
+ }
+ },
+ "range": [
+ 8805,
+ 8821
+ ],
+ "loc": {
+ "start": {
+ "line": 272,
+ "column": 19
+ },
+ "end": {
+ "line": 272,
+ "column": 35
+ }
+ }
+ },
+ "right": {
+ "type": "Literal",
+ "value": "has-many",
+ "raw": "\"has-many\"",
+ "range": [
+ 8826,
+ 8836
+ ],
+ "loc": {
+ "start": {
+ "line": 272,
+ "column": 40
+ },
+ "end": {
+ "line": 272,
+ "column": 50
+ }
+ }
+ },
+ "range": [
+ 8805,
+ 8836
+ ],
+ "loc": {
+ "start": {
+ "line": 272,
+ "column": 19
+ },
+ "end": {
+ "line": 272,
+ "column": 50
+ }
+ }
+ },
+ "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": [
+ 8850,
+ 8864
+ ],
+ "loc": {
+ "start": {
+ "line": 273,
+ "column": 10
+ },
+ "end": {
+ "line": 273,
+ "column": 24
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "_dependents",
+ "range": [
+ 8865,
+ 8876
+ ],
+ "loc": {
+ "start": {
+ "line": 273,
+ "column": 25
+ },
+ "end": {
+ "line": 273,
+ "column": 36
+ }
+ }
+ },
+ "range": [
+ 8850,
+ 8876
+ ],
+ "loc": {
+ "start": {
+ "line": 273,
+ "column": 10
+ },
+ "end": {
+ "line": 273,
+ "column": 36
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "push",
+ "range": [
+ 8877,
+ 8881
+ ],
+ "loc": {
+ "start": {
+ "line": 273,
+ "column": 37
+ },
+ "end": {
+ "line": 273,
+ "column": 41
+ }
+ }
+ },
+ "range": [
+ 8850,
+ 8881
+ ],
+ "loc": {
+ "start": {
+ "line": 273,
+ "column": 10
+ },
+ "end": {
+ "line": 273,
+ "column": 41
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "ObjectExpression",
+ "properties": [
+ {
+ "type": "Property",
+ "key": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 8884,
+ 8888
+ ],
+ "loc": {
+ "start": {
+ "line": 273,
+ "column": 44
+ },
+ "end": {
+ "line": 273,
+ "column": 48
+ }
+ }
+ },
+ "value": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "targetResource",
+ "range": [
+ 8890,
+ 8904
+ ],
+ "loc": {
+ "start": {
+ "line": 273,
+ "column": 50
+ },
+ "end": {
+ "line": 273,
+ "column": 64
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 8905,
+ 8909
+ ],
+ "loc": {
+ "start": {
+ "line": 273,
+ "column": 65
+ },
+ "end": {
+ "line": 273,
+ "column": 69
+ }
+ }
+ },
+ "range": [
+ 8890,
+ 8909
+ ],
+ "loc": {
+ "start": {
+ "line": 273,
+ "column": 50
+ },
+ "end": {
+ "line": 273,
+ "column": 69
+ }
+ }
+ },
+ "kind": "init",
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "range": [
+ 8884,
+ 8909
+ ],
+ "loc": {
+ "start": {
+ "line": 273,
+ "column": 44
+ },
+ "end": {
+ "line": 273,
+ "column": 69
+ }
+ }
+ },
+ {
+ "type": "Property",
+ "key": {
+ "type": "Identifier",
+ "name": "id",
+ "range": [
+ 8911,
+ 8913
+ ],
+ "loc": {
+ "start": {
+ "line": 273,
+ "column": 71
+ },
+ "end": {
+ "line": 273,
+ "column": 73
+ }
+ }
+ },
+ "value": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "targetResource",
+ "range": [
+ 8915,
+ 8929
+ ],
+ "loc": {
+ "start": {
+ "line": 273,
+ "column": 75
+ },
+ "end": {
+ "line": 273,
+ "column": 89
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "id",
+ "range": [
+ 8930,
+ 8932
+ ],
+ "loc": {
+ "start": {
+ "line": 273,
+ "column": 90
+ },
+ "end": {
+ "line": 273,
+ "column": 92
+ }
+ }
+ },
+ "range": [
+ 8915,
+ 8932
+ ],
+ "loc": {
+ "start": {
+ "line": 273,
+ "column": 75
+ },
+ "end": {
+ "line": 273,
+ "column": 92
+ }
+ }
+ },
+ "kind": "init",
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "range": [
+ 8911,
+ 8932
+ ],
+ "loc": {
+ "start": {
+ "line": 273,
+ "column": 71
+ },
+ "end": {
+ "line": 273,
+ "column": 92
+ }
+ }
+ },
+ {
+ "type": "Property",
+ "key": {
+ "type": "Identifier",
+ "name": "fieldName",
+ "range": [
+ 8934,
+ 8943
+ ],
+ "loc": {
+ "start": {
+ "line": 273,
+ "column": 94
+ },
+ "end": {
+ "line": 273,
+ "column": 103
+ }
+ }
+ },
+ "value": {
+ "type": "Identifier",
+ "name": "targetFieldName",
+ "range": [
+ 8945,
+ 8960
+ ],
+ "loc": {
+ "start": {
+ "line": 273,
+ "column": 105
+ },
+ "end": {
+ "line": 273,
+ "column": 120
+ }
+ }
+ },
+ "kind": "init",
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "range": [
+ 8934,
+ 8960
+ ],
+ "loc": {
+ "start": {
+ "line": 273,
+ "column": 94
+ },
+ "end": {
+ "line": 273,
+ "column": 120
+ }
+ }
+ }
+ ],
+ "range": [
+ 8882,
+ 8962
+ ],
+ "loc": {
+ "start": {
+ "line": 273,
+ "column": 42
+ },
+ "end": {
+ "line": 273,
+ "column": 122
+ }
+ }
+ }
+ ],
+ "range": [
+ 8850,
+ 8963
+ ],
+ "loc": {
+ "start": {
+ "line": 273,
+ "column": 10
+ },
+ "end": {
+ "line": 273,
+ "column": 123
+ }
+ }
+ },
+ "range": [
+ 8850,
+ 8964
+ ],
+ "loc": {
+ "start": {
+ "line": 273,
+ "column": 10
+ },
+ "end": {
+ "line": 273,
+ "column": 124
+ }
+ }
+ },
+ {
+ "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": [
+ 8979,
+ 8993
+ ],
+ "loc": {
+ "start": {
+ "line": 274,
+ "column": 14
+ },
+ "end": {
+ "line": 274,
+ "column": 28
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "targetFieldName",
+ "range": [
+ 8994,
+ 9009
+ ],
+ "loc": {
+ "start": {
+ "line": 274,
+ "column": 29
+ },
+ "end": {
+ "line": 274,
+ "column": 44
+ }
+ }
+ },
+ "range": [
+ 8979,
+ 9010
+ ],
+ "loc": {
+ "start": {
+ "line": 274,
+ "column": 14
+ },
+ "end": {
+ "line": 274,
+ "column": 45
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "indexOf",
+ "range": [
+ 9011,
+ 9018
+ ],
+ "loc": {
+ "start": {
+ "line": 274,
+ "column": 46
+ },
+ "end": {
+ "line": 274,
+ "column": 53
+ }
+ }
+ },
+ "range": [
+ 8979,
+ 9018
+ ],
+ "loc": {
+ "start": {
+ "line": 274,
+ "column": 14
+ },
+ "end": {
+ "line": 274,
+ "column": 53
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "Identifier",
+ "name": "sourceResource",
+ "range": [
+ 9019,
+ 9033
+ ],
+ "loc": {
+ "start": {
+ "line": 274,
+ "column": 54
+ },
+ "end": {
+ "line": 274,
+ "column": 68
+ }
+ }
+ }
+ ],
+ "range": [
+ 8979,
+ 9034
+ ],
+ "loc": {
+ "start": {
+ "line": 274,
+ "column": 14
+ },
+ "end": {
+ "line": 274,
+ "column": 69
+ }
+ }
+ },
+ "right": {
+ "type": "UnaryExpression",
+ "operator": "-",
+ "argument": {
+ "type": "Literal",
+ "value": 1,
+ "raw": "1",
+ "range": [
+ 9040,
+ 9041
+ ],
+ "loc": {
+ "start": {
+ "line": 274,
+ "column": 75
+ },
+ "end": {
+ "line": 274,
+ "column": 76
+ }
+ }
+ },
+ "prefix": true,
+ "range": [
+ 9039,
+ 9041
+ ],
+ "loc": {
+ "start": {
+ "line": 274,
+ "column": 74
+ },
+ "end": {
+ "line": 274,
+ "column": 76
+ }
+ }
+ },
+ "range": [
+ 8979,
+ 9041
+ ],
+ "loc": {
+ "start": {
+ "line": 274,
+ "column": 14
+ },
+ "end": {
+ "line": 274,
+ "column": 76
+ }
+ }
+ },
+ "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": [
+ 9057,
+ 9071
+ ],
+ "loc": {
+ "start": {
+ "line": 275,
+ "column": 12
+ },
+ "end": {
+ "line": 275,
+ "column": 26
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "targetFieldName",
+ "range": [
+ 9072,
+ 9087
+ ],
+ "loc": {
+ "start": {
+ "line": 275,
+ "column": 27
+ },
+ "end": {
+ "line": 275,
+ "column": 42
+ }
+ }
+ },
+ "range": [
+ 9057,
+ 9088
+ ],
+ "loc": {
+ "start": {
+ "line": 275,
+ "column": 12
+ },
+ "end": {
+ "line": 275,
+ "column": 43
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "push",
+ "range": [
+ 9089,
+ 9093
+ ],
+ "loc": {
+ "start": {
+ "line": 275,
+ "column": 44
+ },
+ "end": {
+ "line": 275,
+ "column": 48
+ }
+ }
+ },
+ "range": [
+ 9057,
+ 9093
+ ],
+ "loc": {
+ "start": {
+ "line": 275,
+ "column": 12
+ },
+ "end": {
+ "line": 275,
+ "column": 48
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "Identifier",
+ "name": "sourceResource",
+ "range": [
+ 9094,
+ 9108
+ ],
+ "loc": {
+ "start": {
+ "line": 275,
+ "column": 49
+ },
+ "end": {
+ "line": 275,
+ "column": 63
+ }
+ }
+ }
+ ],
+ "range": [
+ 9057,
+ 9109
+ ],
+ "loc": {
+ "start": {
+ "line": 275,
+ "column": 12
+ },
+ "end": {
+ "line": 275,
+ "column": 64
+ }
+ }
+ },
+ "range": [
+ 9057,
+ 9110
+ ],
+ "loc": {
+ "start": {
+ "line": 275,
+ "column": 12
+ },
+ "end": {
+ "line": 275,
+ "column": 65
+ }
+ }
+ }
+ ],
+ "range": [
+ 9043,
+ 9122
+ ],
+ "loc": {
+ "start": {
+ "line": 274,
+ "column": 78
+ },
+ "end": {
+ "line": 276,
+ "column": 11
+ }
+ }
+ },
+ "alternate": null,
+ "range": [
+ 8975,
+ 9122
+ ],
+ "loc": {
+ "start": {
+ "line": 274,
+ "column": 10
+ },
+ "end": {
+ "line": 276,
+ "column": 11
+ }
+ }
+ }
+ ],
+ "range": [
+ 8838,
+ 9132
+ ],
+ "loc": {
+ "start": {
+ "line": 272,
+ "column": 52
+ },
+ "end": {
+ "line": 277,
+ "column": 9
+ }
+ }
+ },
+ "alternate": {
+ "type": "IfStatement",
+ "test": {
+ "type": "BinaryExpression",
+ "operator": "===",
+ "left": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "targetField",
+ "range": [
+ 9142,
+ 9153
+ ],
+ "loc": {
+ "start": {
+ "line": 277,
+ "column": 19
+ },
+ "end": {
+ "line": 277,
+ "column": 30
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 9154,
+ 9158
+ ],
+ "loc": {
+ "start": {
+ "line": 277,
+ "column": 31
+ },
+ "end": {
+ "line": 277,
+ "column": 35
+ }
+ }
+ },
+ "range": [
+ 9142,
+ 9158
+ ],
+ "loc": {
+ "start": {
+ "line": 277,
+ "column": 19
+ },
+ "end": {
+ "line": 277,
+ "column": 35
+ }
+ }
+ },
+ "right": {
+ "type": "Literal",
+ "value": "attr",
+ "raw": "\"attr\"",
+ "range": [
+ 9163,
+ 9169
+ ],
+ "loc": {
+ "start": {
+ "line": 277,
+ "column": 40
+ },
+ "end": {
+ "line": 277,
+ "column": 46
+ }
+ }
+ },
+ "range": [
+ 9142,
+ 9169
+ ],
+ "loc": {
+ "start": {
+ "line": 277,
+ "column": 19
+ },
+ "end": {
+ "line": 277,
+ "column": 46
+ }
+ }
+ },
+ "consequent": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "ThrowStatement",
+ "argument": {
+ "type": "NewExpression",
+ "callee": {
+ "type": "Identifier",
+ "name": "Error",
+ "range": [
+ 9193,
+ 9198
+ ],
+ "loc": {
+ "start": {
+ "line": 278,
+ "column": 20
+ },
+ "end": {
+ "line": 278,
+ "column": 25
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "TemplateLiteral",
+ "quasis": [
+ {
+ "type": "TemplateElement",
+ "value": {
+ "raw": "The the inverse relationship for '",
+ "cooked": "The the inverse relationship for '"
+ },
+ "tail": false,
+ "range": [
+ 9199,
+ 9236
+ ],
+ "loc": {
+ "start": {
+ "line": 278,
+ "column": 26
+ },
+ "end": {
+ "line": 278,
+ "column": 63
+ }
+ }
+ },
+ {
+ "type": "TemplateElement",
+ "value": {
+ "raw": "' is an attribute ('",
+ "cooked": "' is an attribute ('"
+ },
+ "tail": false,
+ "range": [
+ 9251,
+ 9274
+ ],
+ "loc": {
+ "start": {
+ "line": 278,
+ "column": 78
+ },
+ "end": {
+ "line": 278,
+ "column": 101
+ }
+ }
+ },
+ {
+ "type": "TemplateElement",
+ "value": {
+ "raw": "')",
+ "cooked": "')"
+ },
+ "tail": true,
+ "range": [
+ 9289,
+ 9293
+ ],
+ "loc": {
+ "start": {
+ "line": 278,
+ "column": 116
+ },
+ "end": {
+ "line": 278,
+ "column": 120
+ }
+ }
+ }
+ ],
+ "expressions": [
+ {
+ "type": "Identifier",
+ "name": "sourceFieldName",
+ "range": [
+ 9236,
+ 9251
+ ],
+ "loc": {
+ "start": {
+ "line": 278,
+ "column": 63
+ },
+ "end": {
+ "line": 278,
+ "column": 78
+ }
+ }
+ },
+ {
+ "type": "Identifier",
+ "name": "targetFieldName",
+ "range": [
+ 9274,
+ 9289
+ ],
+ "loc": {
+ "start": {
+ "line": 278,
+ "column": 101
+ },
+ "end": {
+ "line": 278,
+ "column": 116
+ }
+ }
+ }
+ ],
+ "range": [
+ 9199,
+ 9293
+ ],
+ "loc": {
+ "start": {
+ "line": 278,
+ "column": 26
+ },
+ "end": {
+ "line": 278,
+ "column": 120
+ }
+ }
+ }
+ ],
+ "range": [
+ 9189,
+ 9294
+ ],
+ "loc": {
+ "start": {
+ "line": 278,
+ "column": 16
+ },
+ "end": {
+ "line": 278,
+ "column": 121
+ }
+ }
+ },
+ "range": [
+ 9183,
+ 9295
+ ],
+ "loc": {
+ "start": {
+ "line": 278,
+ "column": 10
+ },
+ "end": {
+ "line": 278,
+ "column": 122
+ }
+ }
+ }
+ ],
+ "range": [
+ 9171,
+ 9305
+ ],
+ "loc": {
+ "start": {
+ "line": 277,
+ "column": 48
+ },
+ "end": {
+ "line": 279,
+ "column": 9
+ }
+ }
+ },
+ "alternate": null,
+ "range": [
+ 9138,
+ 9305
+ ],
+ "loc": {
+ "start": {
+ "line": 277,
+ "column": 15
+ },
+ "end": {
+ "line": 279,
+ "column": 9
+ }
+ }
+ },
+ "range": [
+ 8801,
+ 9305
+ ],
+ "loc": {
+ "start": {
+ "line": 272,
+ "column": 15
+ },
+ "end": {
+ "line": 279,
+ "column": 9
+ }
+ }
+ },
+ "range": [
+ 8563,
+ 9305
+ ],
+ "loc": {
+ "start": {
+ "line": 269,
+ "column": 8
+ },
+ "end": {
+ "line": 279,
+ "column": 9
+ }
+ }
+ }
+ ],
+ "range": [
+ 8553,
+ 9313
+ ],
+ "loc": {
+ "start": {
+ "line": 268,
+ "column": 23
+ },
+ "end": {
+ "line": 280,
+ "column": 7
+ }
+ }
+ },
+ "alternate": {
+ "type": "IfStatement",
+ "test": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "sourceField",
+ "range": [
+ 9323,
+ 9334
+ ],
+ "loc": {
+ "start": {
+ "line": 280,
+ "column": 17
+ },
+ "end": {
+ "line": 280,
+ "column": 28
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "inverse",
+ "range": [
+ 9335,
+ 9342
+ ],
+ "loc": {
+ "start": {
+ "line": 280,
+ "column": 29
+ },
+ "end": {
+ "line": 280,
+ "column": 36
+ }
+ }
+ },
+ "range": [
+ 9323,
+ 9342
+ ],
+ "loc": {
+ "start": {
+ "line": 280,
+ "column": 17
+ },
+ "end": {
+ "line": 280,
+ "column": 36
+ }
+ }
+ },
+ "consequent": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "ThrowStatement",
+ "argument": {
+ "type": "NewExpression",
+ "callee": {
+ "type": "Identifier",
+ "name": "Error",
+ "range": [
+ 9364,
+ 9369
+ ],
+ "loc": {
+ "start": {
+ "line": 281,
+ "column": 18
+ },
+ "end": {
+ "line": 281,
+ "column": 23
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "TemplateLiteral",
+ "quasis": [
+ {
+ "type": "TemplateElement",
+ "value": {
+ "raw": "The the inverse relationship for '",
+ "cooked": "The the inverse relationship for '"
+ },
+ "tail": false,
+ "range": [
+ 9370,
+ 9407
+ ],
+ "loc": {
+ "start": {
+ "line": 281,
+ "column": 24
+ },
+ "end": {
+ "line": 281,
+ "column": 61
+ }
+ }
+ },
+ {
+ "type": "TemplateElement",
+ "value": {
+ "raw": "' is missing ('",
+ "cooked": "' is missing ('"
+ },
+ "tail": false,
+ "range": [
+ 9422,
+ 9440
+ ],
+ "loc": {
+ "start": {
+ "line": 281,
+ "column": 76
+ },
+ "end": {
+ "line": 281,
+ "column": 94
+ }
+ }
+ },
+ {
+ "type": "TemplateElement",
+ "value": {
+ "raw": "')",
+ "cooked": "')"
+ },
+ "tail": true,
+ "range": [
+ 9459,
+ 9463
+ ],
+ "loc": {
+ "start": {
+ "line": 281,
+ "column": 113
+ },
+ "end": {
+ "line": 281,
+ "column": 117
+ }
+ }
+ }
+ ],
+ "expressions": [
+ {
+ "type": "Identifier",
+ "name": "sourceFieldName",
+ "range": [
+ 9407,
+ 9422
+ ],
+ "loc": {
+ "start": {
+ "line": 281,
+ "column": 61
+ },
+ "end": {
+ "line": 281,
+ "column": 76
+ }
+ }
+ },
+ {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "sourceField",
+ "range": [
+ 9440,
+ 9451
+ ],
+ "loc": {
+ "start": {
+ "line": 281,
+ "column": 94
+ },
+ "end": {
+ "line": 281,
+ "column": 105
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "inverse",
+ "range": [
+ 9452,
+ 9459
+ ],
+ "loc": {
+ "start": {
+ "line": 281,
+ "column": 106
+ },
+ "end": {
+ "line": 281,
+ "column": 113
+ }
+ }
+ },
+ "range": [
+ 9440,
+ 9459
+ ],
+ "loc": {
+ "start": {
+ "line": 281,
+ "column": 94
+ },
+ "end": {
+ "line": 281,
+ "column": 113
+ }
+ }
+ }
+ ],
+ "range": [
+ 9370,
+ 9463
+ ],
+ "loc": {
+ "start": {
+ "line": 281,
+ "column": 24
+ },
+ "end": {
+ "line": 281,
+ "column": 117
+ }
+ }
+ }
+ ],
+ "range": [
+ 9360,
+ 9464
+ ],
+ "loc": {
+ "start": {
+ "line": 281,
+ "column": 14
+ },
+ "end": {
+ "line": 281,
+ "column": 118
+ }
+ }
+ },
+ "range": [
+ 9354,
+ 9465
+ ],
+ "loc": {
+ "start": {
+ "line": 281,
+ "column": 8
+ },
+ "end": {
+ "line": 281,
+ "column": 119
+ }
+ }
+ }
+ ],
+ "range": [
+ 9344,
+ 9473
+ ],
+ "loc": {
+ "start": {
+ "line": 280,
+ "column": 38
+ },
+ "end": {
+ "line": 282,
+ "column": 7
+ }
+ }
+ },
+ "alternate": null,
+ "range": [
+ 9319,
+ 9473
+ ],
+ "loc": {
+ "start": {
+ "line": 280,
+ "column": 13
+ },
+ "end": {
+ "line": 282,
+ "column": 7
+ }
+ }
+ },
+ "range": [
+ 8536,
+ 9473
+ ],
+ "loc": {
+ "start": {
+ "line": 268,
+ "column": 6
+ },
+ "end": {
+ "line": 282,
+ "column": 7
+ }
+ }
+ }
+ ],
+ "range": [
+ 8212,
+ 9479
+ ],
+ "loc": {
+ "start": {
+ "line": 264,
+ "column": 26
+ },
+ "end": {
+ "line": 283,
+ "column": 5
+ }
+ }
+ },
+ "alternate": null,
+ "range": [
+ 8190,
+ 9479
+ ],
+ "loc": {
+ "start": {
+ "line": 264,
+ "column": 4
+ },
+ "end": {
+ "line": 283,
+ "column": 5
+ }
+ }
+ }
+ ],
+ "range": [
+ 8062,
+ 9483
+ ],
+ "loc": {
+ "start": {
+ "line": 261,
+ "column": 88
+ },
+ "end": {
+ "line": 284,
+ "column": 3
+ }
+ }
+ },
+ "generator": false,
+ "expression": false,
+ "range": [
+ 7999,
+ 9483
+ ],
+ "loc": {
+ "start": {
+ "line": 261,
+ "column": 25
+ },
+ "end": {
+ "line": 284,
+ "column": 3
+ }
+ }
+ },
+ "kind": "method",
+ "computed": false,
+ "range": [
+ 7976,
+ 9483
+ ],
+ "loc": {
+ "start": {
+ "line": 261,
+ "column": 2
+ },
+ "end": {
+ "line": 284,
+ "column": 3
+ }
+ },
+ "static": false
+ },
+ {
+ "type": "MethodDefinition",
+ "key": {
+ "type": "Identifier",
+ "name": "_remove",
+ "range": [
+ 9487,
+ 9494
+ ],
+ "loc": {
+ "start": {
+ "line": 286,
+ "column": 2
+ },
+ "end": {
+ "line": 286,
+ "column": 9
+ }
+ }
+ },
+ "value": {
+ "type": "FunctionExpression",
+ "id": null,
+ "params": [
+ {
+ "type": "Identifier",
+ "name": "resource",
+ "range": [
+ 9495,
+ 9503
+ ],
+ "loc": {
+ "start": {
+ "line": 286,
+ "column": 10
+ },
+ "end": {
+ "line": 286,
+ "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": [
+ 9511,
+ 9519
+ ],
+ "loc": {
+ "start": {
+ "line": 287,
+ "column": 4
+ },
+ "end": {
+ "line": 287,
+ "column": 12
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "_dependents",
+ "range": [
+ 9520,
+ 9531
+ ],
+ "loc": {
+ "start": {
+ "line": 287,
+ "column": 13
+ },
+ "end": {
+ "line": 287,
+ "column": 24
+ }
+ }
+ },
+ "range": [
+ 9511,
+ 9531
+ ],
+ "loc": {
+ "start": {
+ "line": 287,
+ "column": 4
+ },
+ "end": {
+ "line": 287,
+ "column": 24
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "forEach",
+ "range": [
+ 9532,
+ 9539
+ ],
+ "loc": {
+ "start": {
+ "line": 287,
+ "column": 25
+ },
+ "end": {
+ "line": 287,
+ "column": 32
+ }
+ }
+ },
+ "range": [
+ 9511,
+ 9539
+ ],
+ "loc": {
+ "start": {
+ "line": 287,
+ "column": 4
+ },
+ "end": {
+ "line": 287,
+ "column": 32
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "ArrowFunctionExpression",
+ "id": null,
+ "params": [
+ {
+ "type": "Identifier",
+ "name": "dependent",
+ "range": [
+ 9540,
+ 9549
+ ],
+ "loc": {
+ "start": {
+ "line": 287,
+ "column": 33
+ },
+ "end": {
+ "line": 287,
+ "column": 42
+ }
+ }
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "id": {
+ "type": "Identifier",
+ "name": "dependentResource",
+ "range": [
+ 9565,
+ 9582
+ ],
+ "loc": {
+ "start": {
+ "line": 288,
+ "column": 10
+ },
+ "end": {
+ "line": 288,
+ "column": 27
+ }
+ }
+ },
+ "init": {
+ "type": "MemberExpression",
+ "computed": true,
+ "object": {
+ "type": "MemberExpression",
+ "computed": true,
+ "object": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "ThisExpression",
+ "range": [
+ 9585,
+ 9589
+ ],
+ "loc": {
+ "start": {
+ "line": 288,
+ "column": 30
+ },
+ "end": {
+ "line": 288,
+ "column": 34
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "_data",
+ "range": [
+ 9590,
+ 9595
+ ],
+ "loc": {
+ "start": {
+ "line": 288,
+ "column": 35
+ },
+ "end": {
+ "line": 288,
+ "column": 40
+ }
+ }
+ },
+ "range": [
+ 9585,
+ 9595
+ ],
+ "loc": {
+ "start": {
+ "line": 288,
+ "column": 30
+ },
+ "end": {
+ "line": 288,
+ "column": 40
+ }
+ }
+ },
+ "property": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "dependent",
+ "range": [
+ 9596,
+ 9605
+ ],
+ "loc": {
+ "start": {
+ "line": 288,
+ "column": 41
+ },
+ "end": {
+ "line": 288,
+ "column": 50
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 9606,
+ 9610
+ ],
+ "loc": {
+ "start": {
+ "line": 288,
+ "column": 51
+ },
+ "end": {
+ "line": 288,
+ "column": 55
+ }
+ }
+ },
+ "range": [
+ 9596,
+ 9610
+ ],
+ "loc": {
+ "start": {
+ "line": 288,
+ "column": 41
+ },
+ "end": {
+ "line": 288,
+ "column": 55
+ }
+ }
+ },
+ "range": [
+ 9585,
+ 9611
+ ],
+ "loc": {
+ "start": {
+ "line": 288,
+ "column": 30
+ },
+ "end": {
+ "line": 288,
+ "column": 56
+ }
+ }
+ },
+ "property": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "dependent",
+ "range": [
+ 9612,
+ 9621
+ ],
+ "loc": {
+ "start": {
+ "line": 288,
+ "column": 57
+ },
+ "end": {
+ "line": 288,
+ "column": 66
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "id",
+ "range": [
+ 9622,
+ 9624
+ ],
+ "loc": {
+ "start": {
+ "line": 288,
+ "column": 67
+ },
+ "end": {
+ "line": 288,
+ "column": 69
+ }
+ }
+ },
+ "range": [
+ 9612,
+ 9624
+ ],
+ "loc": {
+ "start": {
+ "line": 288,
+ "column": 57
+ },
+ "end": {
+ "line": 288,
+ "column": 69
+ }
+ }
+ },
+ "range": [
+ 9585,
+ 9625
+ ],
+ "loc": {
+ "start": {
+ "line": 288,
+ "column": 30
+ },
+ "end": {
+ "line": 288,
+ "column": 70
+ }
+ }
+ },
+ "range": [
+ 9565,
+ 9625
+ ],
+ "loc": {
+ "start": {
+ "line": 288,
+ "column": 10
+ },
+ "end": {
+ "line": 288,
+ "column": 70
+ }
+ }
+ }
+ ],
+ "kind": "let",
+ "range": [
+ 9561,
+ 9626
+ ],
+ "loc": {
+ "start": {
+ "line": 288,
+ "column": 6
+ },
+ "end": {
+ "line": 288,
+ "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": "ThisExpression",
+ "range": [
+ 9641,
+ 9645
+ ],
+ "loc": {
+ "start": {
+ "line": 289,
+ "column": 14
+ },
+ "end": {
+ "line": 289,
+ "column": 18
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "_types",
+ "range": [
+ 9646,
+ 9652
+ ],
+ "loc": {
+ "start": {
+ "line": 289,
+ "column": 19
+ },
+ "end": {
+ "line": 289,
+ "column": 25
+ }
+ }
+ },
+ "range": [
+ 9641,
+ 9652
+ ],
+ "loc": {
+ "start": {
+ "line": 289,
+ "column": 14
+ },
+ "end": {
+ "line": 289,
+ "column": 25
+ }
+ }
+ },
+ "property": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "dependent",
+ "range": [
+ 9653,
+ 9662
+ ],
+ "loc": {
+ "start": {
+ "line": 289,
+ "column": 26
+ },
+ "end": {
+ "line": 289,
+ "column": 35
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 9663,
+ 9667
+ ],
+ "loc": {
+ "start": {
+ "line": 289,
+ "column": 36
+ },
+ "end": {
+ "line": 289,
+ "column": 40
+ }
+ }
+ },
+ "range": [
+ 9653,
+ 9667
+ ],
+ "loc": {
+ "start": {
+ "line": 289,
+ "column": 26
+ },
+ "end": {
+ "line": 289,
+ "column": 40
+ }
+ }
+ },
+ "range": [
+ 9641,
+ 9668
+ ],
+ "loc": {
+ "start": {
+ "line": 289,
+ "column": 14
+ },
+ "end": {
+ "line": 289,
+ "column": 41
+ }
+ }
+ },
+ "property": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "dependent",
+ "range": [
+ 9669,
+ 9678
+ ],
+ "loc": {
+ "start": {
+ "line": 289,
+ "column": 42
+ },
+ "end": {
+ "line": 289,
+ "column": 51
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "fieldName",
+ "range": [
+ 9679,
+ 9688
+ ],
+ "loc": {
+ "start": {
+ "line": 289,
+ "column": 52
+ },
+ "end": {
+ "line": 289,
+ "column": 61
+ }
+ }
+ },
+ "range": [
+ 9669,
+ 9688
+ ],
+ "loc": {
+ "start": {
+ "line": 289,
+ "column": 42
+ },
+ "end": {
+ "line": 289,
+ "column": 61
+ }
+ }
+ },
+ "range": [
+ 9641,
+ 9689
+ ],
+ "loc": {
+ "start": {
+ "line": 289,
+ "column": 14
+ },
+ "end": {
+ "line": 289,
+ "column": 62
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 9690,
+ 9694
+ ],
+ "loc": {
+ "start": {
+ "line": 289,
+ "column": 63
+ },
+ "end": {
+ "line": 289,
+ "column": 67
+ }
+ }
+ },
+ "range": [
+ 9641,
+ 9694
+ ],
+ "loc": {
+ "start": {
+ "line": 289,
+ "column": 14
+ },
+ "end": {
+ "line": 289,
+ "column": 67
+ }
+ }
+ },
+ "cases": [
+ {
+ "type": "SwitchCase",
+ "test": {
+ "type": "Literal",
+ "value": "has-one",
+ "raw": "\"has-one\"",
+ "range": [
+ 9711,
+ 9720
+ ],
+ "loc": {
+ "start": {
+ "line": 290,
+ "column": 13
+ },
+ "end": {
+ "line": 290,
+ "column": 22
+ }
+ }
+ },
+ "consequent": [
+ {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "expression": {
+ "type": "AssignmentExpression",
+ "operator": "=",
+ "left": {
+ "type": "MemberExpression",
+ "computed": true,
+ "object": {
+ "type": "Identifier",
+ "name": "dependentResource",
+ "range": [
+ 9734,
+ 9751
+ ],
+ "loc": {
+ "start": {
+ "line": 291,
+ "column": 10
+ },
+ "end": {
+ "line": 291,
+ "column": 27
+ }
+ }
+ },
+ "property": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "dependent",
+ "range": [
+ 9752,
+ 9761
+ ],
+ "loc": {
+ "start": {
+ "line": 291,
+ "column": 28
+ },
+ "end": {
+ "line": 291,
+ "column": 37
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "fieldName",
+ "range": [
+ 9762,
+ 9771
+ ],
+ "loc": {
+ "start": {
+ "line": 291,
+ "column": 38
+ },
+ "end": {
+ "line": 291,
+ "column": 47
+ }
+ }
+ },
+ "range": [
+ 9752,
+ 9771
+ ],
+ "loc": {
+ "start": {
+ "line": 291,
+ "column": 28
+ },
+ "end": {
+ "line": 291,
+ "column": 47
+ }
+ }
+ },
+ "range": [
+ 9734,
+ 9772
+ ],
+ "loc": {
+ "start": {
+ "line": 291,
+ "column": 10
+ },
+ "end": {
+ "line": 291,
+ "column": 48
+ }
+ }
+ },
+ "right": {
+ "type": "Literal",
+ "value": null,
+ "raw": "null",
+ "range": [
+ 9775,
+ 9779
+ ],
+ "loc": {
+ "start": {
+ "line": 291,
+ "column": 51
+ },
+ "end": {
+ "line": 291,
+ "column": 55
+ }
+ }
+ },
+ "range": [
+ 9734,
+ 9779
+ ],
+ "loc": {
+ "start": {
+ "line": 291,
+ "column": 10
+ },
+ "end": {
+ "line": 291,
+ "column": 55
+ }
+ }
+ },
+ "range": [
+ 9734,
+ 9780
+ ],
+ "loc": {
+ "start": {
+ "line": 291,
+ "column": 10
+ },
+ "end": {
+ "line": 291,
+ "column": 56
+ }
+ }
+ },
+ {
+ "type": "BreakStatement",
+ "label": null,
+ "range": [
+ 9791,
+ 9797
+ ],
+ "loc": {
+ "start": {
+ "line": 292,
+ "column": 10
+ },
+ "end": {
+ "line": 292,
+ "column": 16
+ }
+ }
+ }
+ ],
+ "range": [
+ 9722,
+ 9807
+ ],
+ "loc": {
+ "start": {
+ "line": 290,
+ "column": 24
+ },
+ "end": {
+ "line": 293,
+ "column": 9
+ }
+ }
+ }
+ ],
+ "range": [
+ 9706,
+ 9807
+ ],
+ "loc": {
+ "start": {
+ "line": 290,
+ "column": 8
+ },
+ "end": {
+ "line": 293,
+ "column": 9
+ }
+ }
+ },
+ {
+ "type": "SwitchCase",
+ "test": {
+ "type": "Literal",
+ "value": "has-many",
+ "raw": "\"has-many\"",
+ "range": [
+ 9821,
+ 9831
+ ],
+ "loc": {
+ "start": {
+ "line": 294,
+ "column": 13
+ },
+ "end": {
+ "line": 294,
+ "column": 23
+ }
+ }
+ },
+ "consequent": [
+ {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "id": {
+ "type": "Identifier",
+ "name": "index",
+ "range": [
+ 9849,
+ 9854
+ ],
+ "loc": {
+ "start": {
+ "line": 295,
+ "column": 14
+ },
+ "end": {
+ "line": 295,
+ "column": 19
+ }
+ }
+ },
+ "init": {
+ "type": "CallExpression",
+ "callee": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "MemberExpression",
+ "computed": true,
+ "object": {
+ "type": "Identifier",
+ "name": "dependentResource",
+ "range": [
+ 9857,
+ 9874
+ ],
+ "loc": {
+ "start": {
+ "line": 295,
+ "column": 22
+ },
+ "end": {
+ "line": 295,
+ "column": 39
+ }
+ }
+ },
+ "property": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "dependent",
+ "range": [
+ 9875,
+ 9884
+ ],
+ "loc": {
+ "start": {
+ "line": 295,
+ "column": 40
+ },
+ "end": {
+ "line": 295,
+ "column": 49
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "fieldName",
+ "range": [
+ 9885,
+ 9894
+ ],
+ "loc": {
+ "start": {
+ "line": 295,
+ "column": 50
+ },
+ "end": {
+ "line": 295,
+ "column": 59
+ }
+ }
+ },
+ "range": [
+ 9875,
+ 9894
+ ],
+ "loc": {
+ "start": {
+ "line": 295,
+ "column": 40
+ },
+ "end": {
+ "line": 295,
+ "column": 59
+ }
+ }
+ },
+ "range": [
+ 9857,
+ 9895
+ ],
+ "loc": {
+ "start": {
+ "line": 295,
+ "column": 22
+ },
+ "end": {
+ "line": 295,
+ "column": 60
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "indexOf",
+ "range": [
+ 9896,
+ 9903
+ ],
+ "loc": {
+ "start": {
+ "line": 295,
+ "column": 61
+ },
+ "end": {
+ "line": 295,
+ "column": 68
+ }
+ }
+ },
+ "range": [
+ 9857,
+ 9903
+ ],
+ "loc": {
+ "start": {
+ "line": 295,
+ "column": 22
+ },
+ "end": {
+ "line": 295,
+ "column": 68
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "Identifier",
+ "name": "resource",
+ "range": [
+ 9904,
+ 9912
+ ],
+ "loc": {
+ "start": {
+ "line": 295,
+ "column": 69
+ },
+ "end": {
+ "line": 295,
+ "column": 77
+ }
+ }
+ }
+ ],
+ "range": [
+ 9857,
+ 9913
+ ],
+ "loc": {
+ "start": {
+ "line": 295,
+ "column": 22
+ },
+ "end": {
+ "line": 295,
+ "column": 78
+ }
+ }
+ },
+ "range": [
+ 9849,
+ 9913
+ ],
+ "loc": {
+ "start": {
+ "line": 295,
+ "column": 14
+ },
+ "end": {
+ "line": 295,
+ "column": 78
+ }
+ }
+ }
+ ],
+ "kind": "let",
+ "range": [
+ 9845,
+ 9914
+ ],
+ "loc": {
+ "start": {
+ "line": 295,
+ "column": 10
+ },
+ "end": {
+ "line": 295,
+ "column": 79
+ }
+ }
+ },
+ {
+ "type": "IfStatement",
+ "test": {
+ "type": "BinaryExpression",
+ "operator": "!==",
+ "left": {
+ "type": "Identifier",
+ "name": "index",
+ "range": [
+ 9929,
+ 9934
+ ],
+ "loc": {
+ "start": {
+ "line": 296,
+ "column": 14
+ },
+ "end": {
+ "line": 296,
+ "column": 19
+ }
+ }
+ },
+ "right": {
+ "type": "UnaryExpression",
+ "operator": "-",
+ "argument": {
+ "type": "Literal",
+ "value": 1,
+ "raw": "1",
+ "range": [
+ 9940,
+ 9941
+ ],
+ "loc": {
+ "start": {
+ "line": 296,
+ "column": 25
+ },
+ "end": {
+ "line": 296,
+ "column": 26
+ }
+ }
+ },
+ "prefix": true,
+ "range": [
+ 9939,
+ 9941
+ ],
+ "loc": {
+ "start": {
+ "line": 296,
+ "column": 24
+ },
+ "end": {
+ "line": 296,
+ "column": 26
+ }
+ }
+ },
+ "range": [
+ 9929,
+ 9941
+ ],
+ "loc": {
+ "start": {
+ "line": 296,
+ "column": 14
+ },
+ "end": {
+ "line": 296,
+ "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": [
+ 9957,
+ 9974
+ ],
+ "loc": {
+ "start": {
+ "line": 297,
+ "column": 12
+ },
+ "end": {
+ "line": 297,
+ "column": 29
+ }
+ }
+ },
+ "property": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "dependent",
+ "range": [
+ 9975,
+ 9984
+ ],
+ "loc": {
+ "start": {
+ "line": 297,
+ "column": 30
+ },
+ "end": {
+ "line": 297,
+ "column": 39
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "fieldName",
+ "range": [
+ 9985,
+ 9994
+ ],
+ "loc": {
+ "start": {
+ "line": 297,
+ "column": 40
+ },
+ "end": {
+ "line": 297,
+ "column": 49
+ }
+ }
+ },
+ "range": [
+ 9975,
+ 9994
+ ],
+ "loc": {
+ "start": {
+ "line": 297,
+ "column": 30
+ },
+ "end": {
+ "line": 297,
+ "column": 49
+ }
+ }
+ },
+ "range": [
+ 9957,
+ 9995
+ ],
+ "loc": {
+ "start": {
+ "line": 297,
+ "column": 12
+ },
+ "end": {
+ "line": 297,
+ "column": 50
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "splice",
+ "range": [
+ 9996,
+ 10002
+ ],
+ "loc": {
+ "start": {
+ "line": 297,
+ "column": 51
+ },
+ "end": {
+ "line": 297,
+ "column": 57
+ }
+ }
+ },
+ "range": [
+ 9957,
+ 10002
+ ],
+ "loc": {
+ "start": {
+ "line": 297,
+ "column": 12
+ },
+ "end": {
+ "line": 297,
+ "column": 57
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "Identifier",
+ "name": "index",
+ "range": [
+ 10003,
+ 10008
+ ],
+ "loc": {
+ "start": {
+ "line": 297,
+ "column": 58
+ },
+ "end": {
+ "line": 297,
+ "column": 63
+ }
+ }
+ },
+ {
+ "type": "Literal",
+ "value": 1,
+ "raw": "1",
+ "range": [
+ 10010,
+ 10011
+ ],
+ "loc": {
+ "start": {
+ "line": 297,
+ "column": 65
+ },
+ "end": {
+ "line": 297,
+ "column": 66
+ }
+ }
+ }
+ ],
+ "range": [
+ 9957,
+ 10012
+ ],
+ "loc": {
+ "start": {
+ "line": 297,
+ "column": 12
+ },
+ "end": {
+ "line": 297,
+ "column": 67
+ }
+ }
+ },
+ "range": [
+ 9957,
+ 10013
+ ],
+ "loc": {
+ "start": {
+ "line": 297,
+ "column": 12
+ },
+ "end": {
+ "line": 297,
+ "column": 68
+ }
+ }
+ }
+ ],
+ "range": [
+ 9943,
+ 10025
+ ],
+ "loc": {
+ "start": {
+ "line": 296,
+ "column": 28
+ },
+ "end": {
+ "line": 298,
+ "column": 11
+ }
+ }
+ },
+ "alternate": null,
+ "range": [
+ 9925,
+ 10025
+ ],
+ "loc": {
+ "start": {
+ "line": 296,
+ "column": 10
+ },
+ "end": {
+ "line": 298,
+ "column": 11
+ }
+ }
+ },
+ {
+ "type": "BreakStatement",
+ "label": null,
+ "range": [
+ 10036,
+ 10042
+ ],
+ "loc": {
+ "start": {
+ "line": 299,
+ "column": 10
+ },
+ "end": {
+ "line": 299,
+ "column": 16
+ }
+ }
+ }
+ ],
+ "range": [
+ 9833,
+ 10052
+ ],
+ "loc": {
+ "start": {
+ "line": 294,
+ "column": 25
+ },
+ "end": {
+ "line": 300,
+ "column": 9
+ }
+ }
+ }
+ ],
+ "range": [
+ 9816,
+ 10052
+ ],
+ "loc": {
+ "start": {
+ "line": 294,
+ "column": 8
+ },
+ "end": {
+ "line": 300,
+ "column": 9
+ }
+ }
+ },
+ {
+ "type": "SwitchCase",
+ "test": null,
+ "consequent": [
+ {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "BreakStatement",
+ "label": null,
+ "range": [
+ 10082,
+ 10088
+ ],
+ "loc": {
+ "start": {
+ "line": 302,
+ "column": 10
+ },
+ "end": {
+ "line": 302,
+ "column": 16
+ }
+ }
+ }
+ ],
+ "range": [
+ 10070,
+ 10098
+ ],
+ "loc": {
+ "start": {
+ "line": 301,
+ "column": 17
+ },
+ "end": {
+ "line": 303,
+ "column": 9
+ }
+ }
+ }
+ ],
+ "range": [
+ 10061,
+ 10098
+ ],
+ "loc": {
+ "start": {
+ "line": 301,
+ "column": 8
+ },
+ "end": {
+ "line": 303,
+ "column": 9
+ }
+ }
+ }
+ ],
+ "range": [
+ 9633,
+ 10106
+ ],
+ "loc": {
+ "start": {
+ "line": 289,
+ "column": 6
+ },
+ "end": {
+ "line": 304,
+ "column": 7
+ }
+ },
+ "trailingComments": [
+ {
+ "type": "Line",
+ "value": " TODO: This only needs to be run once for each dependent.",
+ "range": [
+ 10113,
+ 10172
+ ],
+ "loc": {
+ "start": {
+ "line": 305,
+ "column": 6
+ },
+ "end": {
+ "line": 305,
+ "column": 65
+ }
+ }
+ }
+ ]
+ },
+ {
+ "type": "ExpressionStatement",
+ "expression": {
+ "type": "AssignmentExpression",
+ "operator": "=",
+ "left": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "dependentResource",
+ "range": [
+ 10179,
+ 10196
+ ],
+ "loc": {
+ "start": {
+ "line": 306,
+ "column": 6
+ },
+ "end": {
+ "line": 306,
+ "column": 23
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "_dependents",
+ "range": [
+ 10197,
+ 10208
+ ],
+ "loc": {
+ "start": {
+ "line": 306,
+ "column": 24
+ },
+ "end": {
+ "line": 306,
+ "column": 35
+ }
+ }
+ },
+ "range": [
+ 10179,
+ 10208
+ ],
+ "loc": {
+ "start": {
+ "line": 306,
+ "column": 6
+ },
+ "end": {
+ "line": 306,
+ "column": 35
+ }
+ }
+ },
+ "right": {
+ "type": "CallExpression",
+ "callee": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "dependentResource",
+ "range": [
+ 10211,
+ 10228
+ ],
+ "loc": {
+ "start": {
+ "line": 306,
+ "column": 38
+ },
+ "end": {
+ "line": 306,
+ "column": 55
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "_dependents",
+ "range": [
+ 10229,
+ 10240
+ ],
+ "loc": {
+ "start": {
+ "line": 306,
+ "column": 56
+ },
+ "end": {
+ "line": 306,
+ "column": 67
+ }
+ }
+ },
+ "range": [
+ 10211,
+ 10240
+ ],
+ "loc": {
+ "start": {
+ "line": 306,
+ "column": 38
+ },
+ "end": {
+ "line": 306,
+ "column": 67
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "filter",
+ "range": [
+ 10241,
+ 10247
+ ],
+ "loc": {
+ "start": {
+ "line": 306,
+ "column": 68
+ },
+ "end": {
+ "line": 306,
+ "column": 74
+ }
+ }
+ },
+ "range": [
+ 10211,
+ 10247
+ ],
+ "loc": {
+ "start": {
+ "line": 306,
+ "column": 38
+ },
+ "end": {
+ "line": 306,
+ "column": 74
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "ArrowFunctionExpression",
+ "id": null,
+ "params": [
+ {
+ "type": "Identifier",
+ "name": "d",
+ "range": [
+ 10248,
+ 10249
+ ],
+ "loc": {
+ "start": {
+ "line": 306,
+ "column": 75
+ },
+ "end": {
+ "line": 306,
+ "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": [
+ 10272,
+ 10273
+ ],
+ "loc": {
+ "start": {
+ "line": 307,
+ "column": 17
+ },
+ "end": {
+ "line": 307,
+ "column": 18
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 10274,
+ 10278
+ ],
+ "loc": {
+ "start": {
+ "line": 307,
+ "column": 19
+ },
+ "end": {
+ "line": 307,
+ "column": 23
+ }
+ }
+ },
+ "range": [
+ 10272,
+ 10278
+ ],
+ "loc": {
+ "start": {
+ "line": 307,
+ "column": 17
+ },
+ "end": {
+ "line": 307,
+ "column": 23
+ }
+ }
+ },
+ "right": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "resource",
+ "range": [
+ 10283,
+ 10291
+ ],
+ "loc": {
+ "start": {
+ "line": 307,
+ "column": 28
+ },
+ "end": {
+ "line": 307,
+ "column": 36
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 10292,
+ 10296
+ ],
+ "loc": {
+ "start": {
+ "line": 307,
+ "column": 37
+ },
+ "end": {
+ "line": 307,
+ "column": 41
+ }
+ }
+ },
+ "range": [
+ 10283,
+ 10296
+ ],
+ "loc": {
+ "start": {
+ "line": 307,
+ "column": 28
+ },
+ "end": {
+ "line": 307,
+ "column": 41
+ }
+ }
+ },
+ "range": [
+ 10272,
+ 10296
+ ],
+ "loc": {
+ "start": {
+ "line": 307,
+ "column": 17
+ },
+ "end": {
+ "line": 307,
+ "column": 41
+ }
+ }
+ },
+ "right": {
+ "type": "BinaryExpression",
+ "operator": "===",
+ "left": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "d",
+ "range": [
+ 10300,
+ 10301
+ ],
+ "loc": {
+ "start": {
+ "line": 307,
+ "column": 45
+ },
+ "end": {
+ "line": 307,
+ "column": 46
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "id",
+ "range": [
+ 10302,
+ 10304
+ ],
+ "loc": {
+ "start": {
+ "line": 307,
+ "column": 47
+ },
+ "end": {
+ "line": 307,
+ "column": 49
+ }
+ }
+ },
+ "range": [
+ 10300,
+ 10304
+ ],
+ "loc": {
+ "start": {
+ "line": 307,
+ "column": 45
+ },
+ "end": {
+ "line": 307,
+ "column": 49
+ }
+ }
+ },
+ "right": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "resource",
+ "range": [
+ 10309,
+ 10317
+ ],
+ "loc": {
+ "start": {
+ "line": 307,
+ "column": 54
+ },
+ "end": {
+ "line": 307,
+ "column": 62
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "id",
+ "range": [
+ 10318,
+ 10320
+ ],
+ "loc": {
+ "start": {
+ "line": 307,
+ "column": 63
+ },
+ "end": {
+ "line": 307,
+ "column": 65
+ }
+ }
+ },
+ "range": [
+ 10309,
+ 10320
+ ],
+ "loc": {
+ "start": {
+ "line": 307,
+ "column": 54
+ },
+ "end": {
+ "line": 307,
+ "column": 65
+ }
+ }
+ },
+ "range": [
+ 10300,
+ 10320
+ ],
+ "loc": {
+ "start": {
+ "line": 307,
+ "column": 45
+ },
+ "end": {
+ "line": 307,
+ "column": 65
+ }
+ }
+ },
+ "range": [
+ 10272,
+ 10320
+ ],
+ "loc": {
+ "start": {
+ "line": 307,
+ "column": 17
+ },
+ "end": {
+ "line": 307,
+ "column": 65
+ }
+ }
+ },
+ "prefix": true,
+ "range": [
+ 10270,
+ 10321
+ ],
+ "loc": {
+ "start": {
+ "line": 307,
+ "column": 15
+ },
+ "end": {
+ "line": 307,
+ "column": 66
+ }
+ }
+ },
+ "range": [
+ 10263,
+ 10322
+ ],
+ "loc": {
+ "start": {
+ "line": 307,
+ "column": 8
+ },
+ "end": {
+ "line": 307,
+ "column": 67
+ }
+ }
+ }
+ ],
+ "range": [
+ 10253,
+ 10330
+ ],
+ "loc": {
+ "start": {
+ "line": 306,
+ "column": 80
+ },
+ "end": {
+ "line": 308,
+ "column": 7
+ }
+ }
+ },
+ "generator": false,
+ "expression": false,
+ "range": [
+ 10248,
+ 10330
+ ],
+ "loc": {
+ "start": {
+ "line": 306,
+ "column": 75
+ },
+ "end": {
+ "line": 308,
+ "column": 7
+ }
+ }
+ }
+ ],
+ "range": [
+ 10211,
+ 10331
+ ],
+ "loc": {
+ "start": {
+ "line": 306,
+ "column": 38
+ },
+ "end": {
+ "line": 308,
+ "column": 8
+ }
+ }
+ },
+ "range": [
+ 10179,
+ 10331
+ ],
+ "loc": {
+ "start": {
+ "line": 306,
+ "column": 6
+ },
+ "end": {
+ "line": 308,
+ "column": 8
+ }
+ }
+ },
+ "range": [
+ 10179,
+ 10332
+ ],
+ "loc": {
+ "start": {
+ "line": 306,
+ "column": 6
+ },
+ "end": {
+ "line": 308,
+ "column": 9
+ }
+ },
+ "leadingComments": [
+ {
+ "type": "Line",
+ "value": " TODO: This only needs to be run once for each dependent.",
+ "range": [
+ 10113,
+ 10172
+ ],
+ "loc": {
+ "start": {
+ "line": 305,
+ "column": 6
+ },
+ "end": {
+ "line": 305,
+ "column": 65
+ }
+ }
+ }
+ ]
+ }
+ ],
+ "range": [
+ 9553,
+ 10338
+ ],
+ "loc": {
+ "start": {
+ "line": 287,
+ "column": 46
+ },
+ "end": {
+ "line": 309,
+ "column": 5
+ }
+ }
+ },
+ "generator": false,
+ "expression": false,
+ "range": [
+ 9540,
+ 10338
+ ],
+ "loc": {
+ "start": {
+ "line": 287,
+ "column": 33
+ },
+ "end": {
+ "line": 309,
+ "column": 5
+ }
+ }
+ }
+ ],
+ "range": [
+ 9511,
+ 10339
+ ],
+ "loc": {
+ "start": {
+ "line": 287,
+ "column": 4
+ },
+ "end": {
+ "line": 309,
+ "column": 6
+ }
+ }
+ },
+ "range": [
+ 9511,
+ 10340
+ ],
+ "loc": {
+ "start": {
+ "line": 287,
+ "column": 4
+ },
+ "end": {
+ "line": 309,
+ "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": [
+ 10352,
+ 10356
+ ],
+ "loc": {
+ "start": {
+ "line": 310,
+ "column": 11
+ },
+ "end": {
+ "line": 310,
+ "column": 15
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "_data",
+ "range": [
+ 10357,
+ 10362
+ ],
+ "loc": {
+ "start": {
+ "line": 310,
+ "column": 16
+ },
+ "end": {
+ "line": 310,
+ "column": 21
+ }
+ }
+ },
+ "range": [
+ 10352,
+ 10362
+ ],
+ "loc": {
+ "start": {
+ "line": 310,
+ "column": 11
+ },
+ "end": {
+ "line": 310,
+ "column": 21
+ }
+ }
+ },
+ "property": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "resource",
+ "range": [
+ 10363,
+ 10371
+ ],
+ "loc": {
+ "start": {
+ "line": 310,
+ "column": 22
+ },
+ "end": {
+ "line": 310,
+ "column": 30
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 10372,
+ 10376
+ ],
+ "loc": {
+ "start": {
+ "line": 310,
+ "column": 31
+ },
+ "end": {
+ "line": 310,
+ "column": 35
+ }
+ }
+ },
+ "range": [
+ 10363,
+ 10376
+ ],
+ "loc": {
+ "start": {
+ "line": 310,
+ "column": 22
+ },
+ "end": {
+ "line": 310,
+ "column": 35
+ }
+ }
+ },
+ "range": [
+ 10352,
+ 10377
+ ],
+ "loc": {
+ "start": {
+ "line": 310,
+ "column": 11
+ },
+ "end": {
+ "line": 310,
+ "column": 36
+ }
+ }
+ },
+ "property": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "resource",
+ "range": [
+ 10378,
+ 10386
+ ],
+ "loc": {
+ "start": {
+ "line": 310,
+ "column": 37
+ },
+ "end": {
+ "line": 310,
+ "column": 45
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "id",
+ "range": [
+ 10387,
+ 10389
+ ],
+ "loc": {
+ "start": {
+ "line": 310,
+ "column": 46
+ },
+ "end": {
+ "line": 310,
+ "column": 48
+ }
+ }
+ },
+ "range": [
+ 10378,
+ 10389
+ ],
+ "loc": {
+ "start": {
+ "line": 310,
+ "column": 37
+ },
+ "end": {
+ "line": 310,
+ "column": 48
+ }
+ }
+ },
+ "range": [
+ 10352,
+ 10390
+ ],
+ "loc": {
+ "start": {
+ "line": 310,
+ "column": 11
+ },
+ "end": {
+ "line": 310,
+ "column": 49
+ }
+ }
+ },
+ "prefix": true,
+ "range": [
+ 10345,
+ 10390
+ ],
+ "loc": {
+ "start": {
+ "line": 310,
+ "column": 4
+ },
+ "end": {
+ "line": 310,
+ "column": 49
+ }
+ }
+ },
+ "range": [
+ 10345,
+ 10391
+ ],
+ "loc": {
+ "start": {
+ "line": 310,
+ "column": 4
+ },
+ "end": {
+ "line": 310,
+ "column": 50
+ }
+ }
+ }
+ ],
+ "range": [
+ 9505,
+ 10395
+ ],
+ "loc": {
+ "start": {
+ "line": 286,
+ "column": 20
+ },
+ "end": {
+ "line": 311,
+ "column": 3
+ }
+ }
+ },
+ "generator": false,
+ "expression": false,
+ "range": [
+ 9494,
+ 10395
+ ],
+ "loc": {
+ "start": {
+ "line": 286,
+ "column": 9
+ },
+ "end": {
+ "line": 311,
+ "column": 3
+ }
+ }
+ },
+ "kind": "method",
+ "computed": false,
+ "range": [
+ 9487,
+ 10395
+ ],
+ "loc": {
+ "start": {
+ "line": 286,
+ "column": 2
+ },
+ "end": {
+ "line": 311,
+ "column": 3
+ }
+ },
+ "static": false
+ },
+ {
+ "type": "MethodDefinition",
+ "key": {
+ "type": "Identifier",
+ "name": "_removeInverseRelationship",
+ "range": [
+ 10399,
+ 10425
+ ],
+ "loc": {
+ "start": {
+ "line": 313,
+ "column": 2
+ },
+ "end": {
+ "line": 313,
+ "column": 28
+ }
+ }
+ },
+ "value": {
+ "type": "FunctionExpression",
+ "id": null,
+ "params": [
+ {
+ "type": "Identifier",
+ "name": "sourceResource",
+ "range": [
+ 10426,
+ 10440
+ ],
+ "loc": {
+ "start": {
+ "line": 313,
+ "column": 29
+ },
+ "end": {
+ "line": 313,
+ "column": 43
+ }
+ }
+ },
+ {
+ "type": "Identifier",
+ "name": "sourceFieldName",
+ "range": [
+ 10442,
+ 10457
+ ],
+ "loc": {
+ "start": {
+ "line": 313,
+ "column": 45
+ },
+ "end": {
+ "line": 313,
+ "column": 60
+ }
+ }
+ },
+ {
+ "type": "Identifier",
+ "name": "targetResource",
+ "range": [
+ 10459,
+ 10473
+ ],
+ "loc": {
+ "start": {
+ "line": 313,
+ "column": 62
+ },
+ "end": {
+ "line": 313,
+ "column": 76
+ }
+ }
+ },
+ {
+ "type": "Identifier",
+ "name": "sourceField",
+ "range": [
+ 10475,
+ 10486
+ ],
+ "loc": {
+ "start": {
+ "line": 313,
+ "column": 78
+ },
+ "end": {
+ "line": 313,
+ "column": 89
+ }
+ }
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "id": {
+ "type": "Identifier",
+ "name": "targetDefinition",
+ "range": [
+ 10498,
+ 10514
+ ],
+ "loc": {
+ "start": {
+ "line": 314,
+ "column": 8
+ },
+ "end": {
+ "line": 314,
+ "column": 24
+ }
+ }
+ },
+ "init": {
+ "type": "MemberExpression",
+ "computed": true,
+ "object": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "ThisExpression",
+ "range": [
+ 10517,
+ 10521
+ ],
+ "loc": {
+ "start": {
+ "line": 314,
+ "column": 27
+ },
+ "end": {
+ "line": 314,
+ "column": 31
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "_types",
+ "range": [
+ 10522,
+ 10528
+ ],
+ "loc": {
+ "start": {
+ "line": 314,
+ "column": 32
+ },
+ "end": {
+ "line": 314,
+ "column": 38
+ }
+ }
+ },
+ "range": [
+ 10517,
+ 10528
+ ],
+ "loc": {
+ "start": {
+ "line": 314,
+ "column": 27
+ },
+ "end": {
+ "line": 314,
+ "column": 38
+ }
+ }
+ },
+ "property": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "targetResource",
+ "range": [
+ 10529,
+ 10543
+ ],
+ "loc": {
+ "start": {
+ "line": 314,
+ "column": 39
+ },
+ "end": {
+ "line": 314,
+ "column": 53
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 10544,
+ 10548
+ ],
+ "loc": {
+ "start": {
+ "line": 314,
+ "column": 54
+ },
+ "end": {
+ "line": 314,
+ "column": 58
+ }
+ }
+ },
+ "range": [
+ 10529,
+ 10548
+ ],
+ "loc": {
+ "start": {
+ "line": 314,
+ "column": 39
+ },
+ "end": {
+ "line": 314,
+ "column": 58
+ }
+ }
+ },
+ "range": [
+ 10517,
+ 10549
+ ],
+ "loc": {
+ "start": {
+ "line": 314,
+ "column": 27
+ },
+ "end": {
+ "line": 314,
+ "column": 59
+ }
+ }
+ },
+ "range": [
+ 10498,
+ 10549
+ ],
+ "loc": {
+ "start": {
+ "line": 314,
+ "column": 8
+ },
+ "end": {
+ "line": 314,
+ "column": 59
+ }
+ }
+ }
+ ],
+ "kind": "var",
+ "range": [
+ 10494,
+ 10550
+ ],
+ "loc": {
+ "start": {
+ "line": 314,
+ "column": 4
+ },
+ "end": {
+ "line": 314,
+ "column": 60
+ }
+ }
+ },
+ {
+ "type": "VariableDeclaration",
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "id": {
+ "type": "Identifier",
+ "name": "targetFieldName",
+ "range": [
+ 10559,
+ 10574
+ ],
+ "loc": {
+ "start": {
+ "line": 315,
+ "column": 8
+ },
+ "end": {
+ "line": 315,
+ "column": 23
+ }
+ }
+ },
+ "init": {
+ "type": "LogicalExpression",
+ "operator": "||",
+ "left": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "sourceField",
+ "range": [
+ 10577,
+ 10588
+ ],
+ "loc": {
+ "start": {
+ "line": 315,
+ "column": 26
+ },
+ "end": {
+ "line": 315,
+ "column": 37
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "inverse",
+ "range": [
+ 10589,
+ 10596
+ ],
+ "loc": {
+ "start": {
+ "line": 315,
+ "column": 38
+ },
+ "end": {
+ "line": 315,
+ "column": 45
+ }
+ }
+ },
+ "range": [
+ 10577,
+ 10596
+ ],
+ "loc": {
+ "start": {
+ "line": 315,
+ "column": 26
+ },
+ "end": {
+ "line": 315,
+ "column": 45
+ }
+ }
+ },
+ "right": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "sourceResource",
+ "range": [
+ 10600,
+ 10614
+ ],
+ "loc": {
+ "start": {
+ "line": 315,
+ "column": 49
+ },
+ "end": {
+ "line": 315,
+ "column": 63
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 10615,
+ 10619
+ ],
+ "loc": {
+ "start": {
+ "line": 315,
+ "column": 64
+ },
+ "end": {
+ "line": 315,
+ "column": 68
+ }
+ }
+ },
+ "range": [
+ 10600,
+ 10619
+ ],
+ "loc": {
+ "start": {
+ "line": 315,
+ "column": 49
+ },
+ "end": {
+ "line": 315,
+ "column": 68
+ }
+ }
+ },
+ "range": [
+ 10577,
+ 10619
+ ],
+ "loc": {
+ "start": {
+ "line": 315,
+ "column": 26
+ },
+ "end": {
+ "line": 315,
+ "column": 68
+ }
+ }
+ },
+ "range": [
+ 10559,
+ 10619
+ ],
+ "loc": {
+ "start": {
+ "line": 315,
+ "column": 8
+ },
+ "end": {
+ "line": 315,
+ "column": 68
+ }
+ }
+ }
+ ],
+ "kind": "var",
+ "range": [
+ 10555,
+ 10620
+ ],
+ "loc": {
+ "start": {
+ "line": 315,
+ "column": 4
+ },
+ "end": {
+ "line": 315,
+ "column": 69
+ }
+ }
+ },
+ {
+ "type": "VariableDeclaration",
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "id": {
+ "type": "Identifier",
+ "name": "targetField",
+ "range": [
+ 10629,
+ 10640
+ ],
+ "loc": {
+ "start": {
+ "line": 316,
+ "column": 8
+ },
+ "end": {
+ "line": 316,
+ "column": 19
+ }
+ }
+ },
+ "init": {
+ "type": "LogicalExpression",
+ "operator": "&&",
+ "left": {
+ "type": "Identifier",
+ "name": "targetDefinition",
+ "range": [
+ 10643,
+ 10659
+ ],
+ "loc": {
+ "start": {
+ "line": 316,
+ "column": 22
+ },
+ "end": {
+ "line": 316,
+ "column": 38
+ }
+ }
+ },
+ "right": {
+ "type": "MemberExpression",
+ "computed": true,
+ "object": {
+ "type": "Identifier",
+ "name": "targetDefinition",
+ "range": [
+ 10663,
+ 10679
+ ],
+ "loc": {
+ "start": {
+ "line": 316,
+ "column": 42
+ },
+ "end": {
+ "line": 316,
+ "column": 58
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "targetFieldName",
+ "range": [
+ 10680,
+ 10695
+ ],
+ "loc": {
+ "start": {
+ "line": 316,
+ "column": 59
+ },
+ "end": {
+ "line": 316,
+ "column": 74
+ }
+ }
+ },
+ "range": [
+ 10663,
+ 10696
+ ],
+ "loc": {
+ "start": {
+ "line": 316,
+ "column": 42
+ },
+ "end": {
+ "line": 316,
+ "column": 75
+ }
+ }
+ },
+ "range": [
+ 10643,
+ 10696
+ ],
+ "loc": {
+ "start": {
+ "line": 316,
+ "column": 22
+ },
+ "end": {
+ "line": 316,
+ "column": 75
+ }
+ }
+ },
+ "range": [
+ 10629,
+ 10696
+ ],
+ "loc": {
+ "start": {
+ "line": 316,
+ "column": 8
+ },
+ "end": {
+ "line": 316,
+ "column": 75
+ }
+ }
+ }
+ ],
+ "kind": "var",
+ "range": [
+ 10625,
+ 10697
+ ],
+ "loc": {
+ "start": {
+ "line": 316,
+ "column": 4
+ },
+ "end": {
+ "line": 316,
+ "column": 76
+ }
+ }
+ },
+ {
+ "type": "ExpressionStatement",
+ "expression": {
+ "type": "AssignmentExpression",
+ "operator": "=",
+ "left": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "targetResource",
+ "range": [
+ 10702,
+ 10716
+ ],
+ "loc": {
+ "start": {
+ "line": 317,
+ "column": 4
+ },
+ "end": {
+ "line": 317,
+ "column": 18
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "_dependents",
+ "range": [
+ 10717,
+ 10728
+ ],
+ "loc": {
+ "start": {
+ "line": 317,
+ "column": 19
+ },
+ "end": {
+ "line": 317,
+ "column": 30
+ }
+ }
+ },
+ "range": [
+ 10702,
+ 10728
+ ],
+ "loc": {
+ "start": {
+ "line": 317,
+ "column": 4
+ },
+ "end": {
+ "line": 317,
+ "column": 30
+ }
+ }
+ },
+ "right": {
+ "type": "CallExpression",
+ "callee": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "targetResource",
+ "range": [
+ 10731,
+ 10745
+ ],
+ "loc": {
+ "start": {
+ "line": 317,
+ "column": 33
+ },
+ "end": {
+ "line": 317,
+ "column": 47
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "_dependents",
+ "range": [
+ 10746,
+ 10757
+ ],
+ "loc": {
+ "start": {
+ "line": 317,
+ "column": 48
+ },
+ "end": {
+ "line": 317,
+ "column": 59
+ }
+ }
+ },
+ "range": [
+ 10731,
+ 10757
+ ],
+ "loc": {
+ "start": {
+ "line": 317,
+ "column": 33
+ },
+ "end": {
+ "line": 317,
+ "column": 59
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "filter",
+ "range": [
+ 10758,
+ 10764
+ ],
+ "loc": {
+ "start": {
+ "line": 317,
+ "column": 60
+ },
+ "end": {
+ "line": 317,
+ "column": 66
+ }
+ }
+ },
+ "range": [
+ 10731,
+ 10764
+ ],
+ "loc": {
+ "start": {
+ "line": 317,
+ "column": 33
+ },
+ "end": {
+ "line": 317,
+ "column": 66
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "ArrowFunctionExpression",
+ "id": null,
+ "params": [
+ {
+ "type": "Identifier",
+ "name": "r",
+ "range": [
+ 10765,
+ 10766
+ ],
+ "loc": {
+ "start": {
+ "line": 317,
+ "column": 67
+ },
+ "end": {
+ "line": 317,
+ "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": [
+ 10787,
+ 10788
+ ],
+ "loc": {
+ "start": {
+ "line": 318,
+ "column": 15
+ },
+ "end": {
+ "line": 318,
+ "column": 16
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 10789,
+ 10793
+ ],
+ "loc": {
+ "start": {
+ "line": 318,
+ "column": 17
+ },
+ "end": {
+ "line": 318,
+ "column": 21
+ }
+ }
+ },
+ "range": [
+ 10787,
+ 10793
+ ],
+ "loc": {
+ "start": {
+ "line": 318,
+ "column": 15
+ },
+ "end": {
+ "line": 318,
+ "column": 21
+ }
+ }
+ },
+ "right": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "sourceResource",
+ "range": [
+ 10798,
+ 10812
+ ],
+ "loc": {
+ "start": {
+ "line": 318,
+ "column": 26
+ },
+ "end": {
+ "line": 318,
+ "column": 40
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 10813,
+ 10817
+ ],
+ "loc": {
+ "start": {
+ "line": 318,
+ "column": 41
+ },
+ "end": {
+ "line": 318,
+ "column": 45
+ }
+ }
+ },
+ "range": [
+ 10798,
+ 10817
+ ],
+ "loc": {
+ "start": {
+ "line": 318,
+ "column": 26
+ },
+ "end": {
+ "line": 318,
+ "column": 45
+ }
+ }
+ },
+ "range": [
+ 10787,
+ 10817
+ ],
+ "loc": {
+ "start": {
+ "line": 318,
+ "column": 15
+ },
+ "end": {
+ "line": 318,
+ "column": 45
+ }
+ }
+ },
+ "right": {
+ "type": "BinaryExpression",
+ "operator": "===",
+ "left": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "r",
+ "range": [
+ 10821,
+ 10822
+ ],
+ "loc": {
+ "start": {
+ "line": 318,
+ "column": 49
+ },
+ "end": {
+ "line": 318,
+ "column": 50
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "id",
+ "range": [
+ 10823,
+ 10825
+ ],
+ "loc": {
+ "start": {
+ "line": 318,
+ "column": 51
+ },
+ "end": {
+ "line": 318,
+ "column": 53
+ }
+ }
+ },
+ "range": [
+ 10821,
+ 10825
+ ],
+ "loc": {
+ "start": {
+ "line": 318,
+ "column": 49
+ },
+ "end": {
+ "line": 318,
+ "column": 53
+ }
+ }
+ },
+ "right": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "sourceResource",
+ "range": [
+ 10830,
+ 10844
+ ],
+ "loc": {
+ "start": {
+ "line": 318,
+ "column": 58
+ },
+ "end": {
+ "line": 318,
+ "column": 72
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "id",
+ "range": [
+ 10845,
+ 10847
+ ],
+ "loc": {
+ "start": {
+ "line": 318,
+ "column": 73
+ },
+ "end": {
+ "line": 318,
+ "column": 75
+ }
+ }
+ },
+ "range": [
+ 10830,
+ 10847
+ ],
+ "loc": {
+ "start": {
+ "line": 318,
+ "column": 58
+ },
+ "end": {
+ "line": 318,
+ "column": 75
+ }
+ }
+ },
+ "range": [
+ 10821,
+ 10847
+ ],
+ "loc": {
+ "start": {
+ "line": 318,
+ "column": 49
+ },
+ "end": {
+ "line": 318,
+ "column": 75
+ }
+ }
+ },
+ "range": [
+ 10787,
+ 10847
+ ],
+ "loc": {
+ "start": {
+ "line": 318,
+ "column": 15
+ },
+ "end": {
+ "line": 318,
+ "column": 75
+ }
+ }
+ },
+ "right": {
+ "type": "BinaryExpression",
+ "operator": "===",
+ "left": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "r",
+ "range": [
+ 10851,
+ 10852
+ ],
+ "loc": {
+ "start": {
+ "line": 318,
+ "column": 79
+ },
+ "end": {
+ "line": 318,
+ "column": 80
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "fieldName",
+ "range": [
+ 10853,
+ 10862
+ ],
+ "loc": {
+ "start": {
+ "line": 318,
+ "column": 81
+ },
+ "end": {
+ "line": 318,
+ "column": 90
+ }
+ }
+ },
+ "range": [
+ 10851,
+ 10862
+ ],
+ "loc": {
+ "start": {
+ "line": 318,
+ "column": 79
+ },
+ "end": {
+ "line": 318,
+ "column": 90
+ }
+ }
+ },
+ "right": {
+ "type": "Identifier",
+ "name": "sourceFieldName",
+ "range": [
+ 10867,
+ 10882
+ ],
+ "loc": {
+ "start": {
+ "line": 318,
+ "column": 95
+ },
+ "end": {
+ "line": 318,
+ "column": 110
+ }
+ }
+ },
+ "range": [
+ 10851,
+ 10882
+ ],
+ "loc": {
+ "start": {
+ "line": 318,
+ "column": 79
+ },
+ "end": {
+ "line": 318,
+ "column": 110
+ }
+ }
+ },
+ "range": [
+ 10787,
+ 10882
+ ],
+ "loc": {
+ "start": {
+ "line": 318,
+ "column": 15
+ },
+ "end": {
+ "line": 318,
+ "column": 110
+ }
+ }
+ },
+ "prefix": true,
+ "range": [
+ 10785,
+ 10883
+ ],
+ "loc": {
+ "start": {
+ "line": 318,
+ "column": 13
+ },
+ "end": {
+ "line": 318,
+ "column": 111
+ }
+ }
+ },
+ "range": [
+ 10778,
+ 10884
+ ],
+ "loc": {
+ "start": {
+ "line": 318,
+ "column": 6
+ },
+ "end": {
+ "line": 318,
+ "column": 112
+ }
+ }
+ }
+ ],
+ "range": [
+ 10770,
+ 10890
+ ],
+ "loc": {
+ "start": {
+ "line": 317,
+ "column": 72
+ },
+ "end": {
+ "line": 319,
+ "column": 5
+ }
+ }
+ },
+ "generator": false,
+ "expression": false,
+ "range": [
+ 10765,
+ 10890
+ ],
+ "loc": {
+ "start": {
+ "line": 317,
+ "column": 67
+ },
+ "end": {
+ "line": 319,
+ "column": 5
+ }
+ }
+ }
+ ],
+ "range": [
+ 10731,
+ 10891
+ ],
+ "loc": {
+ "start": {
+ "line": 317,
+ "column": 33
+ },
+ "end": {
+ "line": 319,
+ "column": 6
+ }
+ }
+ },
+ "range": [
+ 10702,
+ 10891
+ ],
+ "loc": {
+ "start": {
+ "line": 317,
+ "column": 4
+ },
+ "end": {
+ "line": 319,
+ "column": 6
+ }
+ }
+ },
+ "range": [
+ 10702,
+ 10892
+ ],
+ "loc": {
+ "start": {
+ "line": 317,
+ "column": 4
+ },
+ "end": {
+ "line": 319,
+ "column": 7
+ }
+ }
+ },
+ {
+ "type": "IfStatement",
+ "test": {
+ "type": "Identifier",
+ "name": "targetField",
+ "range": [
+ 10901,
+ 10912
+ ],
+ "loc": {
+ "start": {
+ "line": 320,
+ "column": 8
+ },
+ "end": {
+ "line": 320,
+ "column": 19
+ }
+ }
+ },
+ "consequent": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "IfStatement",
+ "test": {
+ "type": "BinaryExpression",
+ "operator": "===",
+ "left": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "targetField",
+ "range": [
+ 10926,
+ 10937
+ ],
+ "loc": {
+ "start": {
+ "line": 321,
+ "column": 10
+ },
+ "end": {
+ "line": 321,
+ "column": 21
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 10938,
+ 10942
+ ],
+ "loc": {
+ "start": {
+ "line": 321,
+ "column": 22
+ },
+ "end": {
+ "line": 321,
+ "column": 26
+ }
+ }
+ },
+ "range": [
+ 10926,
+ 10942
+ ],
+ "loc": {
+ "start": {
+ "line": 321,
+ "column": 10
+ },
+ "end": {
+ "line": 321,
+ "column": 26
+ }
+ }
+ },
+ "right": {
+ "type": "Literal",
+ "value": "has-one",
+ "raw": "\"has-one\"",
+ "range": [
+ 10947,
+ 10956
+ ],
+ "loc": {
+ "start": {
+ "line": 321,
+ "column": 31
+ },
+ "end": {
+ "line": 321,
+ "column": 40
+ }
+ }
+ },
+ "range": [
+ 10926,
+ 10956
+ ],
+ "loc": {
+ "start": {
+ "line": 321,
+ "column": 10
+ },
+ "end": {
+ "line": 321,
+ "column": 40
+ }
+ }
+ },
+ "consequent": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "expression": {
+ "type": "AssignmentExpression",
+ "operator": "=",
+ "left": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "sourceResource",
+ "range": [
+ 10968,
+ 10982
+ ],
+ "loc": {
+ "start": {
+ "line": 322,
+ "column": 8
+ },
+ "end": {
+ "line": 322,
+ "column": 22
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "_dependents",
+ "range": [
+ 10983,
+ 10994
+ ],
+ "loc": {
+ "start": {
+ "line": 322,
+ "column": 23
+ },
+ "end": {
+ "line": 322,
+ "column": 34
+ }
+ }
+ },
+ "range": [
+ 10968,
+ 10994
+ ],
+ "loc": {
+ "start": {
+ "line": 322,
+ "column": 8
+ },
+ "end": {
+ "line": 322,
+ "column": 34
+ }
+ }
+ },
+ "right": {
+ "type": "CallExpression",
+ "callee": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "sourceResource",
+ "range": [
+ 10997,
+ 11011
+ ],
+ "loc": {
+ "start": {
+ "line": 322,
+ "column": 37
+ },
+ "end": {
+ "line": 322,
+ "column": 51
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "_dependents",
+ "range": [
+ 11012,
+ 11023
+ ],
+ "loc": {
+ "start": {
+ "line": 322,
+ "column": 52
+ },
+ "end": {
+ "line": 322,
+ "column": 63
+ }
+ }
+ },
+ "range": [
+ 10997,
+ 11023
+ ],
+ "loc": {
+ "start": {
+ "line": 322,
+ "column": 37
+ },
+ "end": {
+ "line": 322,
+ "column": 63
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "filter",
+ "range": [
+ 11024,
+ 11030
+ ],
+ "loc": {
+ "start": {
+ "line": 322,
+ "column": 64
+ },
+ "end": {
+ "line": 322,
+ "column": 70
+ }
+ }
+ },
+ "range": [
+ 10997,
+ 11030
+ ],
+ "loc": {
+ "start": {
+ "line": 322,
+ "column": 37
+ },
+ "end": {
+ "line": 322,
+ "column": 70
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "ArrowFunctionExpression",
+ "id": null,
+ "params": [
+ {
+ "type": "Identifier",
+ "name": "r",
+ "range": [
+ 11031,
+ 11032
+ ],
+ "loc": {
+ "start": {
+ "line": 322,
+ "column": 71
+ },
+ "end": {
+ "line": 322,
+ "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": [
+ 11057,
+ 11058
+ ],
+ "loc": {
+ "start": {
+ "line": 323,
+ "column": 19
+ },
+ "end": {
+ "line": 323,
+ "column": 20
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 11059,
+ 11063
+ ],
+ "loc": {
+ "start": {
+ "line": 323,
+ "column": 21
+ },
+ "end": {
+ "line": 323,
+ "column": 25
+ }
+ }
+ },
+ "range": [
+ 11057,
+ 11063
+ ],
+ "loc": {
+ "start": {
+ "line": 323,
+ "column": 19
+ },
+ "end": {
+ "line": 323,
+ "column": 25
+ }
+ }
+ },
+ "right": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "targetResource",
+ "range": [
+ 11068,
+ 11082
+ ],
+ "loc": {
+ "start": {
+ "line": 323,
+ "column": 30
+ },
+ "end": {
+ "line": 323,
+ "column": 44
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 11083,
+ 11087
+ ],
+ "loc": {
+ "start": {
+ "line": 323,
+ "column": 45
+ },
+ "end": {
+ "line": 323,
+ "column": 49
+ }
+ }
+ },
+ "range": [
+ 11068,
+ 11087
+ ],
+ "loc": {
+ "start": {
+ "line": 323,
+ "column": 30
+ },
+ "end": {
+ "line": 323,
+ "column": 49
+ }
+ }
+ },
+ "range": [
+ 11057,
+ 11087
+ ],
+ "loc": {
+ "start": {
+ "line": 323,
+ "column": 19
+ },
+ "end": {
+ "line": 323,
+ "column": 49
+ }
+ }
+ },
+ "right": {
+ "type": "BinaryExpression",
+ "operator": "===",
+ "left": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "r",
+ "range": [
+ 11091,
+ 11092
+ ],
+ "loc": {
+ "start": {
+ "line": 323,
+ "column": 53
+ },
+ "end": {
+ "line": 323,
+ "column": 54
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "id",
+ "range": [
+ 11093,
+ 11095
+ ],
+ "loc": {
+ "start": {
+ "line": 323,
+ "column": 55
+ },
+ "end": {
+ "line": 323,
+ "column": 57
+ }
+ }
+ },
+ "range": [
+ 11091,
+ 11095
+ ],
+ "loc": {
+ "start": {
+ "line": 323,
+ "column": 53
+ },
+ "end": {
+ "line": 323,
+ "column": 57
+ }
+ }
+ },
+ "right": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "targetResource",
+ "range": [
+ 11100,
+ 11114
+ ],
+ "loc": {
+ "start": {
+ "line": 323,
+ "column": 62
+ },
+ "end": {
+ "line": 323,
+ "column": 76
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "id",
+ "range": [
+ 11115,
+ 11117
+ ],
+ "loc": {
+ "start": {
+ "line": 323,
+ "column": 77
+ },
+ "end": {
+ "line": 323,
+ "column": 79
+ }
+ }
+ },
+ "range": [
+ 11100,
+ 11117
+ ],
+ "loc": {
+ "start": {
+ "line": 323,
+ "column": 62
+ },
+ "end": {
+ "line": 323,
+ "column": 79
+ }
+ }
+ },
+ "range": [
+ 11091,
+ 11117
+ ],
+ "loc": {
+ "start": {
+ "line": 323,
+ "column": 53
+ },
+ "end": {
+ "line": 323,
+ "column": 79
+ }
+ }
+ },
+ "range": [
+ 11057,
+ 11117
+ ],
+ "loc": {
+ "start": {
+ "line": 323,
+ "column": 19
+ },
+ "end": {
+ "line": 323,
+ "column": 79
+ }
+ }
+ },
+ "right": {
+ "type": "BinaryExpression",
+ "operator": "===",
+ "left": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "r",
+ "range": [
+ 11121,
+ 11122
+ ],
+ "loc": {
+ "start": {
+ "line": 323,
+ "column": 83
+ },
+ "end": {
+ "line": 323,
+ "column": 84
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "fieldName",
+ "range": [
+ 11123,
+ 11132
+ ],
+ "loc": {
+ "start": {
+ "line": 323,
+ "column": 85
+ },
+ "end": {
+ "line": 323,
+ "column": 94
+ }
+ }
+ },
+ "range": [
+ 11121,
+ 11132
+ ],
+ "loc": {
+ "start": {
+ "line": 323,
+ "column": 83
+ },
+ "end": {
+ "line": 323,
+ "column": 94
+ }
+ }
+ },
+ "right": {
+ "type": "Identifier",
+ "name": "targetFieldName",
+ "range": [
+ 11137,
+ 11152
+ ],
+ "loc": {
+ "start": {
+ "line": 323,
+ "column": 99
+ },
+ "end": {
+ "line": 323,
+ "column": 114
+ }
+ }
+ },
+ "range": [
+ 11121,
+ 11152
+ ],
+ "loc": {
+ "start": {
+ "line": 323,
+ "column": 83
+ },
+ "end": {
+ "line": 323,
+ "column": 114
+ }
+ }
+ },
+ "range": [
+ 11057,
+ 11152
+ ],
+ "loc": {
+ "start": {
+ "line": 323,
+ "column": 19
+ },
+ "end": {
+ "line": 323,
+ "column": 114
+ }
+ }
+ },
+ "prefix": true,
+ "range": [
+ 11055,
+ 11153
+ ],
+ "loc": {
+ "start": {
+ "line": 323,
+ "column": 17
+ },
+ "end": {
+ "line": 323,
+ "column": 115
+ }
+ }
+ },
+ "range": [
+ 11048,
+ 11154
+ ],
+ "loc": {
+ "start": {
+ "line": 323,
+ "column": 10
+ },
+ "end": {
+ "line": 323,
+ "column": 116
+ }
+ }
+ }
+ ],
+ "range": [
+ 11036,
+ 11164
+ ],
+ "loc": {
+ "start": {
+ "line": 322,
+ "column": 76
+ },
+ "end": {
+ "line": 324,
+ "column": 9
+ }
+ }
+ },
+ "generator": false,
+ "expression": false,
+ "range": [
+ 11031,
+ 11164
+ ],
+ "loc": {
+ "start": {
+ "line": 322,
+ "column": 71
+ },
+ "end": {
+ "line": 324,
+ "column": 9
+ }
+ }
+ }
+ ],
+ "range": [
+ 10997,
+ 11165
+ ],
+ "loc": {
+ "start": {
+ "line": 322,
+ "column": 37
+ },
+ "end": {
+ "line": 324,
+ "column": 10
+ }
+ }
+ },
+ "range": [
+ 10968,
+ 11165
+ ],
+ "loc": {
+ "start": {
+ "line": 322,
+ "column": 8
+ },
+ "end": {
+ "line": 324,
+ "column": 10
+ }
+ }
+ },
+ "range": [
+ 10968,
+ 11166
+ ],
+ "loc": {
+ "start": {
+ "line": 322,
+ "column": 8
+ },
+ "end": {
+ "line": 324,
+ "column": 11
+ }
+ }
+ },
+ {
+ "type": "ExpressionStatement",
+ "expression": {
+ "type": "AssignmentExpression",
+ "operator": "=",
+ "left": {
+ "type": "MemberExpression",
+ "computed": true,
+ "object": {
+ "type": "Identifier",
+ "name": "targetResource",
+ "range": [
+ 11175,
+ 11189
+ ],
+ "loc": {
+ "start": {
+ "line": 325,
+ "column": 8
+ },
+ "end": {
+ "line": 325,
+ "column": 22
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "targetFieldName",
+ "range": [
+ 11190,
+ 11205
+ ],
+ "loc": {
+ "start": {
+ "line": 325,
+ "column": 23
+ },
+ "end": {
+ "line": 325,
+ "column": 38
+ }
+ }
+ },
+ "range": [
+ 11175,
+ 11206
+ ],
+ "loc": {
+ "start": {
+ "line": 325,
+ "column": 8
+ },
+ "end": {
+ "line": 325,
+ "column": 39
+ }
+ }
+ },
+ "right": {
+ "type": "Literal",
+ "value": null,
+ "raw": "null",
+ "range": [
+ 11209,
+ 11213
+ ],
+ "loc": {
+ "start": {
+ "line": 325,
+ "column": 42
+ },
+ "end": {
+ "line": 325,
+ "column": 46
+ }
+ }
+ },
+ "range": [
+ 11175,
+ 11213
+ ],
+ "loc": {
+ "start": {
+ "line": 325,
+ "column": 8
+ },
+ "end": {
+ "line": 325,
+ "column": 46
+ }
+ }
+ },
+ "range": [
+ 11175,
+ 11214
+ ],
+ "loc": {
+ "start": {
+ "line": 325,
+ "column": 8
+ },
+ "end": {
+ "line": 325,
+ "column": 47
+ }
+ }
+ }
+ ],
+ "range": [
+ 10958,
+ 11222
+ ],
+ "loc": {
+ "start": {
+ "line": 321,
+ "column": 42
+ },
+ "end": {
+ "line": 326,
+ "column": 7
+ }
+ }
+ },
+ "alternate": {
+ "type": "IfStatement",
+ "test": {
+ "type": "BinaryExpression",
+ "operator": "===",
+ "left": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "targetField",
+ "range": [
+ 11232,
+ 11243
+ ],
+ "loc": {
+ "start": {
+ "line": 326,
+ "column": 17
+ },
+ "end": {
+ "line": 326,
+ "column": 28
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 11244,
+ 11248
+ ],
+ "loc": {
+ "start": {
+ "line": 326,
+ "column": 29
+ },
+ "end": {
+ "line": 326,
+ "column": 33
+ }
+ }
+ },
+ "range": [
+ 11232,
+ 11248
+ ],
+ "loc": {
+ "start": {
+ "line": 326,
+ "column": 17
+ },
+ "end": {
+ "line": 326,
+ "column": 33
+ }
+ }
+ },
+ "right": {
+ "type": "Literal",
+ "value": "has-many",
+ "raw": "\"has-many\"",
+ "range": [
+ 11253,
+ 11263
+ ],
+ "loc": {
+ "start": {
+ "line": 326,
+ "column": 38
+ },
+ "end": {
+ "line": 326,
+ "column": 48
+ }
+ }
+ },
+ "range": [
+ 11232,
+ 11263
+ ],
+ "loc": {
+ "start": {
+ "line": 326,
+ "column": 17
+ },
+ "end": {
+ "line": 326,
+ "column": 48
+ }
+ }
+ },
+ "consequent": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "expression": {
+ "type": "AssignmentExpression",
+ "operator": "=",
+ "left": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "sourceResource",
+ "range": [
+ 11275,
+ 11289
+ ],
+ "loc": {
+ "start": {
+ "line": 327,
+ "column": 8
+ },
+ "end": {
+ "line": 327,
+ "column": 22
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "_dependents",
+ "range": [
+ 11290,
+ 11301
+ ],
+ "loc": {
+ "start": {
+ "line": 327,
+ "column": 23
+ },
+ "end": {
+ "line": 327,
+ "column": 34
+ }
+ }
+ },
+ "range": [
+ 11275,
+ 11301
+ ],
+ "loc": {
+ "start": {
+ "line": 327,
+ "column": 8
+ },
+ "end": {
+ "line": 327,
+ "column": 34
+ }
+ }
+ },
+ "right": {
+ "type": "CallExpression",
+ "callee": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "sourceResource",
+ "range": [
+ 11304,
+ 11318
+ ],
+ "loc": {
+ "start": {
+ "line": 327,
+ "column": 37
+ },
+ "end": {
+ "line": 327,
+ "column": 51
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "_dependents",
+ "range": [
+ 11319,
+ 11330
+ ],
+ "loc": {
+ "start": {
+ "line": 327,
+ "column": 52
+ },
+ "end": {
+ "line": 327,
+ "column": 63
+ }
+ }
+ },
+ "range": [
+ 11304,
+ 11330
+ ],
+ "loc": {
+ "start": {
+ "line": 327,
+ "column": 37
+ },
+ "end": {
+ "line": 327,
+ "column": 63
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "filter",
+ "range": [
+ 11331,
+ 11337
+ ],
+ "loc": {
+ "start": {
+ "line": 327,
+ "column": 64
+ },
+ "end": {
+ "line": 327,
+ "column": 70
+ }
+ }
+ },
+ "range": [
+ 11304,
+ 11337
+ ],
+ "loc": {
+ "start": {
+ "line": 327,
+ "column": 37
+ },
+ "end": {
+ "line": 327,
+ "column": 70
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "ArrowFunctionExpression",
+ "id": null,
+ "params": [
+ {
+ "type": "Identifier",
+ "name": "r",
+ "range": [
+ 11338,
+ 11339
+ ],
+ "loc": {
+ "start": {
+ "line": 327,
+ "column": 71
+ },
+ "end": {
+ "line": 327,
+ "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": [
+ 11364,
+ 11365
+ ],
+ "loc": {
+ "start": {
+ "line": 328,
+ "column": 19
+ },
+ "end": {
+ "line": 328,
+ "column": 20
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 11366,
+ 11370
+ ],
+ "loc": {
+ "start": {
+ "line": 328,
+ "column": 21
+ },
+ "end": {
+ "line": 328,
+ "column": 25
+ }
+ }
+ },
+ "range": [
+ 11364,
+ 11370
+ ],
+ "loc": {
+ "start": {
+ "line": 328,
+ "column": 19
+ },
+ "end": {
+ "line": 328,
+ "column": 25
+ }
+ }
+ },
+ "right": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "targetResource",
+ "range": [
+ 11375,
+ 11389
+ ],
+ "loc": {
+ "start": {
+ "line": 328,
+ "column": 30
+ },
+ "end": {
+ "line": 328,
+ "column": 44
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 11390,
+ 11394
+ ],
+ "loc": {
+ "start": {
+ "line": 328,
+ "column": 45
+ },
+ "end": {
+ "line": 328,
+ "column": 49
+ }
+ }
+ },
+ "range": [
+ 11375,
+ 11394
+ ],
+ "loc": {
+ "start": {
+ "line": 328,
+ "column": 30
+ },
+ "end": {
+ "line": 328,
+ "column": 49
+ }
+ }
+ },
+ "range": [
+ 11364,
+ 11394
+ ],
+ "loc": {
+ "start": {
+ "line": 328,
+ "column": 19
+ },
+ "end": {
+ "line": 328,
+ "column": 49
+ }
+ }
+ },
+ "right": {
+ "type": "BinaryExpression",
+ "operator": "===",
+ "left": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "r",
+ "range": [
+ 11398,
+ 11399
+ ],
+ "loc": {
+ "start": {
+ "line": 328,
+ "column": 53
+ },
+ "end": {
+ "line": 328,
+ "column": 54
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "id",
+ "range": [
+ 11400,
+ 11402
+ ],
+ "loc": {
+ "start": {
+ "line": 328,
+ "column": 55
+ },
+ "end": {
+ "line": 328,
+ "column": 57
+ }
+ }
+ },
+ "range": [
+ 11398,
+ 11402
+ ],
+ "loc": {
+ "start": {
+ "line": 328,
+ "column": 53
+ },
+ "end": {
+ "line": 328,
+ "column": 57
+ }
+ }
+ },
+ "right": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "targetResource",
+ "range": [
+ 11407,
+ 11421
+ ],
+ "loc": {
+ "start": {
+ "line": 328,
+ "column": 62
+ },
+ "end": {
+ "line": 328,
+ "column": 76
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "id",
+ "range": [
+ 11422,
+ 11424
+ ],
+ "loc": {
+ "start": {
+ "line": 328,
+ "column": 77
+ },
+ "end": {
+ "line": 328,
+ "column": 79
+ }
+ }
+ },
+ "range": [
+ 11407,
+ 11424
+ ],
+ "loc": {
+ "start": {
+ "line": 328,
+ "column": 62
+ },
+ "end": {
+ "line": 328,
+ "column": 79
+ }
+ }
+ },
+ "range": [
+ 11398,
+ 11424
+ ],
+ "loc": {
+ "start": {
+ "line": 328,
+ "column": 53
+ },
+ "end": {
+ "line": 328,
+ "column": 79
+ }
+ }
+ },
+ "range": [
+ 11364,
+ 11424
+ ],
+ "loc": {
+ "start": {
+ "line": 328,
+ "column": 19
+ },
+ "end": {
+ "line": 328,
+ "column": 79
+ }
+ }
+ },
+ "right": {
+ "type": "BinaryExpression",
+ "operator": "===",
+ "left": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "r",
+ "range": [
+ 11428,
+ 11429
+ ],
+ "loc": {
+ "start": {
+ "line": 328,
+ "column": 83
+ },
+ "end": {
+ "line": 328,
+ "column": 84
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "fieldName",
+ "range": [
+ 11430,
+ 11439
+ ],
+ "loc": {
+ "start": {
+ "line": 328,
+ "column": 85
+ },
+ "end": {
+ "line": 328,
+ "column": 94
+ }
+ }
+ },
+ "range": [
+ 11428,
+ 11439
+ ],
+ "loc": {
+ "start": {
+ "line": 328,
+ "column": 83
+ },
+ "end": {
+ "line": 328,
+ "column": 94
+ }
+ }
+ },
+ "right": {
+ "type": "Identifier",
+ "name": "targetFieldName",
+ "range": [
+ 11444,
+ 11459
+ ],
+ "loc": {
+ "start": {
+ "line": 328,
+ "column": 99
+ },
+ "end": {
+ "line": 328,
+ "column": 114
+ }
+ }
+ },
+ "range": [
+ 11428,
+ 11459
+ ],
+ "loc": {
+ "start": {
+ "line": 328,
+ "column": 83
+ },
+ "end": {
+ "line": 328,
+ "column": 114
+ }
+ }
+ },
+ "range": [
+ 11364,
+ 11459
+ ],
+ "loc": {
+ "start": {
+ "line": 328,
+ "column": 19
+ },
+ "end": {
+ "line": 328,
+ "column": 114
+ }
+ }
+ },
+ "prefix": true,
+ "range": [
+ 11362,
+ 11460
+ ],
+ "loc": {
+ "start": {
+ "line": 328,
+ "column": 17
+ },
+ "end": {
+ "line": 328,
+ "column": 115
+ }
+ }
+ },
+ "range": [
+ 11355,
+ 11461
+ ],
+ "loc": {
+ "start": {
+ "line": 328,
+ "column": 10
+ },
+ "end": {
+ "line": 328,
+ "column": 116
+ }
+ }
+ }
+ ],
+ "range": [
+ 11343,
+ 11471
+ ],
+ "loc": {
+ "start": {
+ "line": 327,
+ "column": 76
+ },
+ "end": {
+ "line": 329,
+ "column": 9
+ }
+ }
+ },
+ "generator": false,
+ "expression": false,
+ "range": [
+ 11338,
+ 11471
+ ],
+ "loc": {
+ "start": {
+ "line": 327,
+ "column": 71
+ },
+ "end": {
+ "line": 329,
+ "column": 9
+ }
+ }
+ }
+ ],
+ "range": [
+ 11304,
+ 11472
+ ],
+ "loc": {
+ "start": {
+ "line": 327,
+ "column": 37
+ },
+ "end": {
+ "line": 329,
+ "column": 10
+ }
+ }
+ },
+ "range": [
+ 11275,
+ 11472
+ ],
+ "loc": {
+ "start": {
+ "line": 327,
+ "column": 8
+ },
+ "end": {
+ "line": 329,
+ "column": 10
+ }
+ }
+ },
+ "range": [
+ 11275,
+ 11473
+ ],
+ "loc": {
+ "start": {
+ "line": 327,
+ "column": 8
+ },
+ "end": {
+ "line": 329,
+ "column": 11
+ }
+ }
+ },
+ {
+ "type": "ExpressionStatement",
+ "expression": {
+ "type": "AssignmentExpression",
+ "operator": "=",
+ "left": {
+ "type": "MemberExpression",
+ "computed": true,
+ "object": {
+ "type": "Identifier",
+ "name": "targetResource",
+ "range": [
+ 11482,
+ 11496
+ ],
+ "loc": {
+ "start": {
+ "line": 330,
+ "column": 8
+ },
+ "end": {
+ "line": 330,
+ "column": 22
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "targetFieldName",
+ "range": [
+ 11497,
+ 11512
+ ],
+ "loc": {
+ "start": {
+ "line": 330,
+ "column": 23
+ },
+ "end": {
+ "line": 330,
+ "column": 38
+ }
+ }
+ },
+ "range": [
+ 11482,
+ 11513
+ ],
+ "loc": {
+ "start": {
+ "line": 330,
+ "column": 8
+ },
+ "end": {
+ "line": 330,
+ "column": 39
+ }
+ }
+ },
+ "right": {
+ "type": "CallExpression",
+ "callee": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "MemberExpression",
+ "computed": true,
+ "object": {
+ "type": "Identifier",
+ "name": "targetResource",
+ "range": [
+ 11516,
+ 11530
+ ],
+ "loc": {
+ "start": {
+ "line": 330,
+ "column": 42
+ },
+ "end": {
+ "line": 330,
+ "column": 56
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "targetFieldName",
+ "range": [
+ 11531,
+ 11546
+ ],
+ "loc": {
+ "start": {
+ "line": 330,
+ "column": 57
+ },
+ "end": {
+ "line": 330,
+ "column": 72
+ }
+ }
+ },
+ "range": [
+ 11516,
+ 11547
+ ],
+ "loc": {
+ "start": {
+ "line": 330,
+ "column": 42
+ },
+ "end": {
+ "line": 330,
+ "column": 73
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "filter",
+ "range": [
+ 11548,
+ 11554
+ ],
+ "loc": {
+ "start": {
+ "line": 330,
+ "column": 74
+ },
+ "end": {
+ "line": 330,
+ "column": 80
+ }
+ }
+ },
+ "range": [
+ 11516,
+ 11554
+ ],
+ "loc": {
+ "start": {
+ "line": 330,
+ "column": 42
+ },
+ "end": {
+ "line": 330,
+ "column": 80
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "ArrowFunctionExpression",
+ "id": null,
+ "params": [
+ {
+ "type": "Identifier",
+ "name": "r",
+ "range": [
+ 11555,
+ 11556
+ ],
+ "loc": {
+ "start": {
+ "line": 330,
+ "column": 81
+ },
+ "end": {
+ "line": 330,
+ "column": 82
+ }
+ }
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "ReturnStatement",
+ "argument": {
+ "type": "BinaryExpression",
+ "operator": "!==",
+ "left": {
+ "type": "Identifier",
+ "name": "r",
+ "range": [
+ 11579,
+ 11580
+ ],
+ "loc": {
+ "start": {
+ "line": 331,
+ "column": 17
+ },
+ "end": {
+ "line": 331,
+ "column": 18
+ }
+ }
+ },
+ "right": {
+ "type": "Identifier",
+ "name": "sourceResource",
+ "range": [
+ 11585,
+ 11599
+ ],
+ "loc": {
+ "start": {
+ "line": 331,
+ "column": 23
+ },
+ "end": {
+ "line": 331,
+ "column": 37
+ }
+ }
+ },
+ "range": [
+ 11579,
+ 11599
+ ],
+ "loc": {
+ "start": {
+ "line": 331,
+ "column": 17
+ },
+ "end": {
+ "line": 331,
+ "column": 37
+ }
+ }
+ },
+ "range": [
+ 11572,
+ 11600
+ ],
+ "loc": {
+ "start": {
+ "line": 331,
+ "column": 10
+ },
+ "end": {
+ "line": 331,
+ "column": 38
+ }
+ }
+ }
+ ],
+ "range": [
+ 11560,
+ 11610
+ ],
+ "loc": {
+ "start": {
+ "line": 330,
+ "column": 86
+ },
+ "end": {
+ "line": 332,
+ "column": 9
+ }
+ }
+ },
+ "generator": false,
+ "expression": false,
+ "range": [
+ 11555,
+ 11610
+ ],
+ "loc": {
+ "start": {
+ "line": 330,
+ "column": 81
+ },
+ "end": {
+ "line": 332,
+ "column": 9
+ }
+ }
+ }
+ ],
+ "range": [
+ 11516,
+ 11611
+ ],
+ "loc": {
+ "start": {
+ "line": 330,
+ "column": 42
+ },
+ "end": {
+ "line": 332,
+ "column": 10
+ }
+ }
+ },
+ "range": [
+ 11482,
+ 11611
+ ],
+ "loc": {
+ "start": {
+ "line": 330,
+ "column": 8
+ },
+ "end": {
+ "line": 332,
+ "column": 10
+ }
+ }
+ },
+ "range": [
+ 11482,
+ 11612
+ ],
+ "loc": {
+ "start": {
+ "line": 330,
+ "column": 8
+ },
+ "end": {
+ "line": 332,
+ "column": 11
+ }
+ }
+ }
+ ],
+ "range": [
+ 11265,
+ 11620
+ ],
+ "loc": {
+ "start": {
+ "line": 326,
+ "column": 50
+ },
+ "end": {
+ "line": 333,
+ "column": 7
+ }
+ }
+ },
+ "alternate": {
+ "type": "IfStatement",
+ "test": {
+ "type": "BinaryExpression",
+ "operator": "===",
+ "left": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "targetField",
+ "range": [
+ 11630,
+ 11641
+ ],
+ "loc": {
+ "start": {
+ "line": 333,
+ "column": 17
+ },
+ "end": {
+ "line": 333,
+ "column": 28
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "type",
+ "range": [
+ 11642,
+ 11646
+ ],
+ "loc": {
+ "start": {
+ "line": 333,
+ "column": 29
+ },
+ "end": {
+ "line": 333,
+ "column": 33
+ }
+ }
+ },
+ "range": [
+ 11630,
+ 11646
+ ],
+ "loc": {
+ "start": {
+ "line": 333,
+ "column": 17
+ },
+ "end": {
+ "line": 333,
+ "column": 33
+ }
+ }
+ },
+ "right": {
+ "type": "Literal",
+ "value": "attr",
+ "raw": "\"attr\"",
+ "range": [
+ 11651,
+ 11657
+ ],
+ "loc": {
+ "start": {
+ "line": 333,
+ "column": 38
+ },
+ "end": {
+ "line": 333,
+ "column": 44
+ }
+ }
+ },
+ "range": [
+ 11630,
+ 11657
+ ],
+ "loc": {
+ "start": {
+ "line": 333,
+ "column": 17
+ },
+ "end": {
+ "line": 333,
+ "column": 44
+ }
+ }
+ },
+ "consequent": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "ThrowStatement",
+ "argument": {
+ "type": "NewExpression",
+ "callee": {
+ "type": "Identifier",
+ "name": "Error",
+ "range": [
+ 11679,
+ 11684
+ ],
+ "loc": {
+ "start": {
+ "line": 334,
+ "column": 18
+ },
+ "end": {
+ "line": 334,
+ "column": 23
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "TemplateLiteral",
+ "quasis": [
+ {
+ "type": "TemplateElement",
+ "value": {
+ "raw": "The the inverse relationship for '",
+ "cooked": "The the inverse relationship for '"
+ },
+ "tail": false,
+ "range": [
+ 11685,
+ 11722
+ ],
+ "loc": {
+ "start": {
+ "line": 334,
+ "column": 24
+ },
+ "end": {
+ "line": 334,
+ "column": 61
+ }
+ }
+ },
+ {
+ "type": "TemplateElement",
+ "value": {
+ "raw": "' is an attribute ('",
+ "cooked": "' is an attribute ('"
+ },
+ "tail": false,
+ "range": [
+ 11737,
+ 11760
+ ],
+ "loc": {
+ "start": {
+ "line": 334,
+ "column": 76
+ },
+ "end": {
+ "line": 334,
+ "column": 99
+ }
+ }
+ },
+ {
+ "type": "TemplateElement",
+ "value": {
+ "raw": "')",
+ "cooked": "')"
+ },
+ "tail": true,
+ "range": [
+ 11775,
+ 11779
+ ],
+ "loc": {
+ "start": {
+ "line": 334,
+ "column": 114
+ },
+ "end": {
+ "line": 334,
+ "column": 118
+ }
+ }
+ }
+ ],
+ "expressions": [
+ {
+ "type": "Identifier",
+ "name": "sourceFieldName",
+ "range": [
+ 11722,
+ 11737
+ ],
+ "loc": {
+ "start": {
+ "line": 334,
+ "column": 61
+ },
+ "end": {
+ "line": 334,
+ "column": 76
+ }
+ }
+ },
+ {
+ "type": "Identifier",
+ "name": "targetFieldName",
+ "range": [
+ 11760,
+ 11775
+ ],
+ "loc": {
+ "start": {
+ "line": 334,
+ "column": 99
+ },
+ "end": {
+ "line": 334,
+ "column": 114
+ }
+ }
+ }
+ ],
+ "range": [
+ 11685,
+ 11779
+ ],
+ "loc": {
+ "start": {
+ "line": 334,
+ "column": 24
+ },
+ "end": {
+ "line": 334,
+ "column": 118
+ }
+ }
+ }
+ ],
+ "range": [
+ 11675,
+ 11780
+ ],
+ "loc": {
+ "start": {
+ "line": 334,
+ "column": 14
+ },
+ "end": {
+ "line": 334,
+ "column": 119
+ }
+ }
+ },
+ "range": [
+ 11669,
+ 11781
+ ],
+ "loc": {
+ "start": {
+ "line": 334,
+ "column": 8
+ },
+ "end": {
+ "line": 334,
+ "column": 120
+ }
+ }
+ }
+ ],
+ "range": [
+ 11659,
+ 11789
+ ],
+ "loc": {
+ "start": {
+ "line": 333,
+ "column": 46
+ },
+ "end": {
+ "line": 335,
+ "column": 7
+ }
+ }
+ },
+ "alternate": null,
+ "range": [
+ 11626,
+ 11789
+ ],
+ "loc": {
+ "start": {
+ "line": 333,
+ "column": 13
+ },
+ "end": {
+ "line": 335,
+ "column": 7
+ }
+ }
+ },
+ "range": [
+ 11228,
+ 11789
+ ],
+ "loc": {
+ "start": {
+ "line": 326,
+ "column": 13
+ },
+ "end": {
+ "line": 335,
+ "column": 7
+ }
+ }
+ },
+ "range": [
+ 10922,
+ 11789
+ ],
+ "loc": {
+ "start": {
+ "line": 321,
+ "column": 6
+ },
+ "end": {
+ "line": 335,
+ "column": 7
+ }
+ }
+ }
+ ],
+ "range": [
+ 10914,
+ 11795
+ ],
+ "loc": {
+ "start": {
+ "line": 320,
+ "column": 21
+ },
+ "end": {
+ "line": 336,
+ "column": 5
+ }
+ }
+ },
+ "alternate": {
+ "type": "IfStatement",
+ "test": {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "sourceField",
+ "range": [
+ 11805,
+ 11816
+ ],
+ "loc": {
+ "start": {
+ "line": 336,
+ "column": 15
+ },
+ "end": {
+ "line": 336,
+ "column": 26
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "inverse",
+ "range": [
+ 11817,
+ 11824
+ ],
+ "loc": {
+ "start": {
+ "line": 336,
+ "column": 27
+ },
+ "end": {
+ "line": 336,
+ "column": 34
+ }
+ }
+ },
+ "range": [
+ 11805,
+ 11824
+ ],
+ "loc": {
+ "start": {
+ "line": 336,
+ "column": 15
+ },
+ "end": {
+ "line": 336,
+ "column": 34
+ }
+ }
+ },
+ "consequent": {
+ "type": "BlockStatement",
+ "body": [
+ {
+ "type": "ThrowStatement",
+ "argument": {
+ "type": "NewExpression",
+ "callee": {
+ "type": "Identifier",
+ "name": "Error",
+ "range": [
+ 11844,
+ 11849
+ ],
+ "loc": {
+ "start": {
+ "line": 337,
+ "column": 16
+ },
+ "end": {
+ "line": 337,
+ "column": 21
+ }
+ }
+ },
+ "arguments": [
+ {
+ "type": "TemplateLiteral",
+ "quasis": [
+ {
+ "type": "TemplateElement",
+ "value": {
+ "raw": "The the inverse relationship for '",
+ "cooked": "The the inverse relationship for '"
+ },
+ "tail": false,
+ "range": [
+ 11850,
+ 11887
+ ],
+ "loc": {
+ "start": {
+ "line": 337,
+ "column": 22
+ },
+ "end": {
+ "line": 337,
+ "column": 59
+ }
+ }
+ },
+ {
+ "type": "TemplateElement",
+ "value": {
+ "raw": "' is missing ('",
+ "cooked": "' is missing ('"
+ },
+ "tail": false,
+ "range": [
+ 11902,
+ 11920
+ ],
+ "loc": {
+ "start": {
+ "line": 337,
+ "column": 74
+ },
+ "end": {
+ "line": 337,
+ "column": 92
+ }
+ }
+ },
+ {
+ "type": "TemplateElement",
+ "value": {
+ "raw": "')",
+ "cooked": "')"
+ },
+ "tail": true,
+ "range": [
+ 11939,
+ 11943
+ ],
+ "loc": {
+ "start": {
+ "line": 337,
+ "column": 111
+ },
+ "end": {
+ "line": 337,
+ "column": 115
+ }
+ }
+ }
+ ],
+ "expressions": [
+ {
+ "type": "Identifier",
+ "name": "sourceFieldName",
+ "range": [
+ 11887,
+ 11902
+ ],
+ "loc": {
+ "start": {
+ "line": 337,
+ "column": 59
+ },
+ "end": {
+ "line": 337,
+ "column": 74
+ }
+ }
+ },
+ {
+ "type": "MemberExpression",
+ "computed": false,
+ "object": {
+ "type": "Identifier",
+ "name": "sourceField",
+ "range": [
+ 11920,
+ 11931
+ ],
+ "loc": {
+ "start": {
+ "line": 337,
+ "column": 92
+ },
+ "end": {
+ "line": 337,
+ "column": 103
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "inverse",
+ "range": [
+ 11932,
+ 11939
+ ],
+ "loc": {
+ "start": {
+ "line": 337,
+ "column": 104
+ },
+ "end": {
+ "line": 337,
+ "column": 111
+ }
+ }
+ },
+ "range": [
+ 11920,
+ 11939
+ ],
+ "loc": {
+ "start": {
+ "line": 337,
+ "column": 92
+ },
+ "end": {
+ "line": 337,
+ "column": 111
+ }
+ }
+ }
+ ],
+ "range": [
+ 11850,
+ 11943
+ ],
+ "loc": {
+ "start": {
+ "line": 337,
+ "column": 22
+ },
+ "end": {
+ "line": 337,
+ "column": 115
+ }
+ }
+ }
+ ],
+ "range": [
+ 11840,
+ 11944
+ ],
+ "loc": {
+ "start": {
+ "line": 337,
+ "column": 12
+ },
+ "end": {
+ "line": 337,
+ "column": 116
+ }
+ }
+ },
+ "range": [
+ 11834,
+ 11945
+ ],
+ "loc": {
+ "start": {
+ "line": 337,
+ "column": 6
+ },
+ "end": {
+ "line": 337,
+ "column": 117
+ }
+ }
+ }
+ ],
+ "range": [
+ 11826,
+ 11951
+ ],
+ "loc": {
+ "start": {
+ "line": 336,
+ "column": 36
+ },
+ "end": {
+ "line": 338,
+ "column": 5
+ }
+ }
+ },
+ "alternate": null,
+ "range": [
+ 11801,
+ 11951
+ ],
+ "loc": {
+ "start": {
+ "line": 336,
+ "column": 11
+ },
+ "end": {
+ "line": 338,
+ "column": 5
+ }
+ }
+ },
+ "range": [
+ 10897,
+ 11951
+ ],
+ "loc": {
+ "start": {
+ "line": 320,
+ "column": 4
+ },
+ "end": {
+ "line": 338,
+ "column": 5
+ }
+ }
+ }
+ ],
+ "range": [
+ 10488,
+ 11955
+ ],
+ "loc": {
+ "start": {
+ "line": 313,
+ "column": 91
+ },
+ "end": {
+ "line": 339,
+ "column": 3
+ }
+ }
+ },
+ "generator": false,
+ "expression": false,
+ "range": [
+ 10425,
+ 11955
+ ],
+ "loc": {
+ "start": {
+ "line": 313,
+ "column": 28
+ },
+ "end": {
+ "line": 339,
+ "column": 3
+ }
+ }
+ },
+ "kind": "method",
+ "computed": false,
+ "range": [
+ 10399,
+ 11955
+ ],
+ "loc": {
+ "start": {
+ "line": 313,
+ "column": 2
+ },
+ "end": {
+ "line": 339,
+ "column": 3
+ }
+ },
+ "static": false
+ }
+ ],
+ "range": [
+ 59,
+ 11958
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 27
+ },
+ "end": {
+ "line": 341,
+ "column": 1
+ }
+ }
+ },
+ "range": [
+ 47,
+ 11958
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 15
+ },
+ "end": {
+ "line": 341,
+ "column": 1
+ }
+ },
+ "leadingComments": [],
+ "trailingComments": []
+ },
+ "range": [
+ 32,
+ 11958
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 0
+ },
+ "end": {
+ "line": 341,
+ "column": 1
+ }
+ }
+ }
+ ],
+ "sourceType": "module",
+ "range": [
+ 0,
+ 11958
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 341,
+ "column": 1
+ }
+ },
+ "comments": [
+ {
+ "type": "Block",
+ "value": "*\n * Creates a field definition for an attribute.\n *\n * @since 0.1.0\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": [
+ 64,
+ 386
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 2
+ },
+ "end": {
+ "line": 13,
+ "column": 5
+ }
+ }
+ },
+ {
+ "type": "Block",
+ "value": "*\n * Creates a field definition for an has-one relationship.\n *\n * @since 0.1.0\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": [
+ 736,
+ 1073
+ ],
+ "loc": {
+ "start": {
+ "line": 28,
+ "column": 2
+ },
+ "end": {
+ "line": 36,
+ "column": 5
+ }
+ }
+ },
+ {
+ "type": "Block",
+ "value": "*\n * Creates a field definition for an has-many relationship.\n *\n * @since 0.1.0\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": [
+ 1727,
+ 2065
+ ],
+ "loc": {
+ "start": {
+ "line": 58,
+ "column": 2
+ },
+ "end": {
+ "line": 66,
+ "column": 5
+ }
+ }
+ },
+ {
+ "type": "Block",
+ "value": "*\n * Add an individual resource to the store. This is used internally by the\n * `push()` method.\n *\n * @since 0.1.0\n * @param {!Object} object - Resource Object to add. See:\n http://jsonapi.org/format/#document-resource-objects\n * @return {undefined} - Nothing.\n ",
+ "range": [
+ 2835,
+ 3127
+ ],
+ "loc": {
+ "start": {
+ "line": 96,
+ "column": 2
+ },
+ "end": {
+ "line": 104,
+ "column": 5
+ }
+ }
+ },
+ {
+ "type": "Block",
+ "value": "*\n * Defines a type of resource.\n *\n * @since 0.2.0\n * @param {!string|string[]} names - Name(s) of the resource.\n * @param {!Object} definition - The resource's definition.\n * @return {undefined} - Nothing.\n ",
+ "range": [
+ 3668,
+ 3895
+ ],
+ "loc": {
+ "start": {
+ "line": 123,
+ "column": 2
+ },
+ "end": {
+ "line": 130,
+ "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 * @since 0.1.0\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": [
+ 4231,
+ 4741
+ ],
+ "loc": {
+ "start": {
+ "line": 143,
+ "column": 2
+ },
+ "end": {
+ "line": 154,
+ "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 * @since 0.1.0\n * @param {Object} root - Top Level Object to push. See:\n http://jsonapi.org/format/#document-top-level\n * @return {undefined} - Nothing.\n ",
+ "range": [
+ 5678,
+ 6012
+ ],
+ "loc": {
+ "start": {
+ "line": 188,
+ "column": 2
+ },
+ "end": {
+ "line": 196,
+ "column": 5
+ }
+ }
+ },
+ {
+ "type": "Block",
+ "value": "*\n * Remove a resource or collection of resources from the store.\n *\n * @since 0.1.0\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} - Nothing.\n ",
+ "range": [
+ 6245,
+ 6587
+ ],
+ "loc": {
+ "start": {
+ "line": 208,
+ "column": 2
+ },
+ "end": {
+ "line": 216,
+ "column": 5
+ }
+ }
+ },
+ {
+ "type": "Line",
+ "value": " TODO: This only needs to be run once for each dependent.",
+ "range": [
+ 10113,
+ 10172
+ ],
+ "loc": {
+ "start": {
+ "line": 305,
+ "column": 6
+ },
+ "end": {
+ "line": 305,
+ "column": 65
+ }
+ }
+ }
+ ]
+}
\ No newline at end of file
diff --git a/docs/v0.3.1/badge.svg b/docs/v0.3.1/badge.svg
new file mode 100644
index 0000000..5e1ca25
--- /dev/null
+++ b/docs/v0.3.1/badge.svg
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+ document
+ document
+ 80%
+ 80%
+
+
diff --git a/docs/v0.3.1/class/src/store.js~Store.html b/docs/v0.3.1/class/src/store.js~Store.html
new file mode 100644
index 0000000..856b8a7
--- /dev/null
+++ b/docs/v0.3.1/class/src/store.js~Store.html
@@ -0,0 +1,1026 @@
+
+
+
+
+
+ Store | API Document
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Store
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Static Method Summary
+ Static Public Methods
+
+
+
+
+ public
+ static
+
+
+
+
+
+
+
+
+
+
Creates a field definition for an attribute.
+
+
+
+
+ since 0.1.0
+
+
+
+
+ public
+ static
+
+
+
+
+
+
+
+
+
+
Creates a field definition for an has-many relationship.
+
+
+
+
+ since 0.1.0
+
+
+
+
+ public
+ static
+
+
+
+
+
+
+
+
+
+
Creates a field definition for an has-one relationship.
+
+
+
+
+ since 0.1.0
+
+
+
+
+
+
Constructor Summary
+ Public Constructor
+
+
+
+
+ public
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Method Summary
+ Public Methods
+
+
+
+
+ public
+
+
+
+
+
+
+
+
+
+
+
Add an individual resource to the store.
+
+
+
+
+ since 0.1.0
+
+
+
+
+ public
+
+
+
+
+
+
+
+
+
+
+
Defines a type of resource.
+
+
+
+
+ since 0.2.0
+
+
+
+
+ public
+
+
+
+
+
+
+
+
+
+
+
Find a resource or entire collection of resources.
+
+
+
+
+ since 0.1.0
+
+
+
+
+ public
+
+
+
+
+
+
+
+
+
+
+
Add a JSON API response to the store.
+
+
+
+
+ since 0.1.0
+
+
+
+
+ public
+
+
+
+
+
+
+
+
+
+
+
Remove a resource or collection of resources from the store.
+
+
+
+
+ since 0.1.0
+
+
+
+
+
+
+
+
+
+
Static Public Methods
+
+
+
+ public
+ static
+
+
+
+ attr (name: string , options: Object ): Object
+
+
+ since 0.1.0
+ 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
+
+
+ since 0.1.0
+ 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
+
+
+ since 0.1.0
+ 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
+
+
+ since 0.1.0
+ source
+
+
+
+
+
+
+
Add an individual resource to the store. This is used internally by the
+push() method.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ public
+
+
+
+
+ define (names: string | string [] , definition: Object ): undefined
+
+
+ since 0.2.0
+ source
+
+
+
+
+
+
+
Defines a type of resource.
+
+
+
+
+
+
Params:
+
+
+ Name Type Attribute Description
+
+
+
+
+ names
+ string | string []
+
+ Name(s) of the resource.
+
+
+
+ definition
+ Object
+
+ The resource's definition.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ public
+
+
+
+
+ find (type: string , id: string ): Object | Object []
+
+
+ since 0.1.0
+ source
+
+
+
+
+
+
+
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
+
+
+ since 0.1.0
+ 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.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ public
+
+
+
+
+ remove (type: string , id: string ): undefined
+
+
+ since 0.1.0
+ source
+
+
+
+
+
+
+
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.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/v0.3.1/coverage.json b/docs/v0.3.1/coverage.json
new file mode 100644
index 0000000..a3138b2
--- /dev/null
+++ b/docs/v0.3.1/coverage.json
@@ -0,0 +1,11 @@
+{
+ "coverage": "80%",
+ "expectCount": 10,
+ "actualCount": 8,
+ "files": {
+ "src/store.js": {
+ "expectCount": 10,
+ "actualCount": 8
+ }
+ }
+}
\ No newline at end of file
diff --git a/docs/v0.3.1/css/prettify-tomorrow.css b/docs/v0.3.1/css/prettify-tomorrow.css
new file mode 100644
index 0000000..b6f92a7
--- /dev/null
+++ b/docs/v0.3.1/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/v0.3.1/css/style.css b/docs/v0.3.1/css/style.css
new file mode 100644
index 0000000..939ea95
--- /dev/null
+++ b/docs/v0.3.1/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/v0.3.1/dump.json b/docs/v0.3.1/dump.json
new file mode 100644
index 0000000..2fbc868
--- /dev/null
+++ b/docs/v0.3.1/dump.json
@@ -0,0 +1,1220 @@
+[
+ {
+ "kind": "file",
+ "static": true,
+ "variation": null,
+ "name": "src/store.js",
+ "memberof": null,
+ "longname": "src/store.js",
+ "access": null,
+ "description": null,
+ "lineNumber": 1,
+ "content": "import \"array.prototype.find\";\n\nexport default class Store {\n\n /**\n * Creates a field definition for an attribute.\n *\n * @since 0.1.0\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 * @since 0.1.0\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 * @since 0.1.0\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 this._types = {};\n }\n\n /**\n * Add an individual resource to the store. This is used internally by the\n * `push()` method.\n *\n * @since 0.1.0\n * @param {!Object} object - Resource Object to add. See:\n http://jsonapi.org/format/#document-resource-objects\n * @return {undefined} - Nothing.\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 = this._types[object.type];\n Object.keys(definition).forEach(fieldName => {\n if (fieldName[0] !== \"_\") {\n this._addField(object, resource, definition, fieldName);\n }\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 * Defines a type of resource.\n *\n * @since 0.2.0\n * @param {!string|string[]} names - Name(s) of the resource.\n * @param {!Object} definition - The resource's definition.\n * @return {undefined} - Nothing.\n */\n define(names, definition) {\n names = (names.constructor === Array) ? names : [ names ];\n definition._names = names;\n names.forEach(name => {\n if (!this._types[name]) {\n this._types[name] = definition;\n } else {\n throw new Error(`The type '${name}' has already been defined.`);\n }\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 * @since 0.1.0\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 if (type) {\n let definition = this._types[type];\n if (definition) {\n if (!this._data[type]) {\n let collection = {};\n definition._names.forEach(t => this._data[t] = collection);\n }\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 if (key[0] !== \"_\") {\n this._data[type][id][key] = definition[key].default;\n }\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 * @since 0.1.0\n * @param {Object} root - Top Level Object to push. See:\n http://jsonapi.org/format/#document-top-level\n * @return {undefined} - Nothing.\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 * @since 0.1.0\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} - Nothing.\n */\n remove(type, id) {\n if (type) {\n if (this._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 = this._types[targetResource.type];\n var sourceDefinition = this._types[sourceResource.type];\n if (targetDefinition) {\n let targetFieldName = [ sourceField.inverse ].concat(sourceDefinition._names).find(x => targetDefinition[x]);\n let 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\n _remove(resource) {\n resource._dependents.forEach(dependent => {\n let dependentResource = this._data[dependent.type][dependent.id];\n switch (this._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 = this._types[targetResource.type];\n var targetFieldName = sourceField.inverse || sourceResource.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"
+ },
+ {
+ "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": 3,
+ "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": 14,
+ "since": "0.1.0",
+ "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": 37,
+ "since": "0.1.0",
+ "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": 67,
+ "since": "0.1.0",
+ "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": 91,
+ "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": 92,
+ "undocument": true,
+ "type": {
+ "types": [
+ "*"
+ ]
+ }
+ },
+ {
+ "kind": "member",
+ "static": false,
+ "variation": null,
+ "name": "_types",
+ "memberof": "src/store.js~Store",
+ "longname": "src/store.js~Store#_types",
+ "access": null,
+ "description": null,
+ "lineNumber": 93,
+ "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": 105,
+ "since": "0.1.0",
+ "params": [
+ {
+ "nullable": false,
+ "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": "Nothing."
+ },
+ "generator": false
+ },
+ {
+ "kind": "method",
+ "static": false,
+ "variation": null,
+ "name": "define",
+ "memberof": "src/store.js~Store",
+ "longname": "src/store.js~Store#define",
+ "access": null,
+ "description": "Defines a type of resource.",
+ "lineNumber": 131,
+ "since": "0.2.0",
+ "params": [
+ {
+ "nullable": false,
+ "types": [
+ "string",
+ "string[]"
+ ],
+ "spread": false,
+ "optional": false,
+ "name": "names",
+ "description": "Name(s) of the resource."
+ },
+ {
+ "nullable": false,
+ "types": [
+ "Object"
+ ],
+ "spread": false,
+ "optional": false,
+ "name": "definition",
+ "description": "The resource's definition."
+ }
+ ],
+ "return": {
+ "nullable": null,
+ "types": [
+ "undefined"
+ ],
+ "spread": false,
+ "description": "Nothing."
+ },
+ "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": 155,
+ "since": "0.1.0",
+ "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": 197,
+ "since": "0.1.0",
+ "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": "Nothing."
+ },
+ "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": 217,
+ "since": "0.1.0",
+ "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": "Nothing."
+ },
+ "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": 236,
+ "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": 261,
+ "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": 286,
+ "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": 313,
+ "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/v0.3.1/file/src/store.js.html b/docs/v0.3.1/file/src/store.js.html
new file mode 100644
index 0000000..8c4a8da
--- /dev/null
+++ b/docs/v0.3.1/file/src/store.js.html
@@ -0,0 +1,406 @@
+
+
+
+
+
+ src/store.js | API Document
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+src/store.js
+
import "array.prototype.find";
+
+export default class Store {
+
+ /**
+ * Creates a field definition for an attribute.
+ *
+ * @since 0.1.0
+ * @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.
+ *
+ * @since 0.1.0
+ * @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.
+ *
+ * @since 0.1.0
+ * @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 = {};
+ this._types = {};
+ }
+
+ /**
+ * Add an individual resource to the store. This is used internally by the
+ * `push()` method.
+ *
+ * @since 0.1.0
+ * @param {!Object} object - Resource Object to add. See:
+ http://jsonapi.org/format/#document-resource-objects
+ * @return {undefined} - Nothing.
+ */
+ add(object) {
+ if (object) {
+ if (object.type && object.id) {
+ let resource = this.find(object.type, object.id);
+ let definition = this._types[object.type];
+ Object.keys(definition).forEach(fieldName => {
+ if (fieldName[0] !== "_") {
+ 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`);
+ }
+ }
+
+ /**
+ * Defines a type of resource.
+ *
+ * @since 0.2.0
+ * @param {!string|string[]} names - Name(s) of the resource.
+ * @param {!Object} definition - The resource's definition.
+ * @return {undefined} - Nothing.
+ */
+ define(names, definition) {
+ names = (names.constructor === Array) ? names : [ names ];
+ definition._names = names;
+ names.forEach(name => {
+ if (!this._types[name]) {
+ this._types[name] = definition;
+ } else {
+ throw new Error(`The type '${name}' has already been defined.`);
+ }
+ });
+ }
+
+ /**
+ * 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.
+ *
+ * @since 0.1.0
+ * @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) {
+ if (type) {
+ let definition = this._types[type];
+ if (definition) {
+ if (!this._data[type]) {
+ let collection = {};
+ definition._names.forEach(t => this._data[t] = collection);
+ }
+ if (id) {
+ if (!this._data[type][id]) {
+ this._data[type][id] = {
+ _dependents: [],
+ type: type,
+ id: id
+ };
+ Object.keys(definition).forEach(key => {
+ if (key[0] !== "_") {
+ 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.
+ *
+ * @since 0.1.0
+ * @param {Object} root - Top Level Object to push. See:
+ http://jsonapi.org/format/#document-top-level
+ * @return {undefined} - Nothing.
+ */
+ 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.
+ *
+ * @since 0.1.0
+ * @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} - Nothing.
+ */
+ remove(type, id) {
+ if (type) {
+ if (this._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 = this._types[targetResource.type];
+ var sourceDefinition = this._types[sourceResource.type];
+ if (targetDefinition) {
+ let targetFieldName = [ sourceField.inverse ].concat(sourceDefinition._names).find(x => targetDefinition[x]);
+ let 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 (this._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 = this._types[targetResource.type];
+ var targetFieldName = sourceField.inverse || sourceResource.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}')`);
+ }
+ }
+
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/v0.3.1/identifiers.html b/docs/v0.3.1/identifiers.html
new file mode 100644
index 0000000..19025ae
--- /dev/null
+++ b/docs/v0.3.1/identifiers.html
@@ -0,0 +1,100 @@
+
+
+
+
+
+ Index | API Document
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Identifier
+
Class Summary
+ Static Public Class Summary
+
+
+
+
+ public
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/v0.3.1/image/badge.svg b/docs/v0.3.1/image/badge.svg
new file mode 100644
index 0000000..324db4c
--- /dev/null
+++ b/docs/v0.3.1/image/badge.svg
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+ document
+ document
+ @ratio@
+ @ratio@
+
+
diff --git a/docs/v0.3.1/image/github.png b/docs/v0.3.1/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/v0.3.1/image/search.png b/docs/v0.3.1/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/v0.3.1/index.html b/docs/v0.3.1/index.html
new file mode 100644
index 0000000..1eac88f
--- /dev/null
+++ b/docs/v0.3.1/index.html
@@ -0,0 +1,142 @@
+
+
+
+
+
+ API Document
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+JSON API Store
+
JSON API Store takes JSON API data and creates plain
+JavaScript objects for the resources it describes. It will link-up
+relationships automatically and update both sides of reciprocal relationships
+when either side is modified.
+
Usage
+
At the moment you need to do your own AJAX requests, but there are plans to add
+AJAX methods to create, read, update and destroy resources in the future. For
+now you can just push the responses from your own requests to the store:
+
+// Create a new store instance.
+var store = new Store();
+
+// Define the "categories" type.
+store.define("categories", {
+ title: Store.attr(),
+ products: Store.hasMany({ inverse: "category" })
+});
+
+// Define the "products" type.
+store.define("products", {
+ title: Store.attr(),
+ category: Store.hasOne()
+});
+
+// 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"
+ }
+ }
+ ]
+});
+
+store.find("products", "1").title; // "Example Book"
+store.find("categories", "1").title; // "Books"
+
+store.find("products", "1").category === store.find("categories", "1"); // true
+store.find("categories", "1").products[0] === store.find("products", "1"); // true
+
+
Installing
+
NPM
+
npm i json-api-store
+Bower
+
bower i json-api-store
+Manually
+
Grab the store.js file.
+
Documentation
+
Documentation is available in the docs directory. Online documentation is coming soon.
+
Roadmap
+
+automated release process
+event listeners for listening to changes
+create, read, update & destroy AJAX methods
+ES6 classes for type definitions
+a way to query the local data?
+adapters for CRUD actions / isomorphic support?
+support for links & pagination
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/v0.3.1/script/inherited-summary.js b/docs/v0.3.1/script/inherited-summary.js
new file mode 100644
index 0000000..0a35b6d
--- /dev/null
+++ b/docs/v0.3.1/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/v0.3.1/script/inner-link.js b/docs/v0.3.1/script/inner-link.js
new file mode 100644
index 0000000..7762cb2
--- /dev/null
+++ b/docs/v0.3.1/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/v0.3.1/script/patch-for-local.js b/docs/v0.3.1/script/patch-for-local.js
new file mode 100644
index 0000000..5756d13
--- /dev/null
+++ b/docs/v0.3.1/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/v0.3.1/script/prettify/Apache-License-2.0.txt b/docs/v0.3.1/script/prettify/Apache-License-2.0.txt
new file mode 100644
index 0000000..d645695
--- /dev/null
+++ b/docs/v0.3.1/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/v0.3.1/script/prettify/prettify.js b/docs/v0.3.1/script/prettify/prettify.js
new file mode 100644
index 0000000..eef5ad7
--- /dev/null
+++ b/docs/v0.3.1/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 8/10
+
+
+
+
+ File
+ Identifier
+ Document
+ Size
+ Lines
+ Updated
+
+
+
+
+
+ src/store.js
+ Store
+ 80 % 8/10
+ 11959 byte
+ 341
+ 2015-08-06 02:52:31 (UTC)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+