parse 3.5.1-beta.1 → 4.0.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/README.md +17 -4
  2. package/dist/parse.js +421 -347
  3. package/dist/parse.min.js +2 -2
  4. package/dist/parse.weapp.js +421 -347
  5. package/dist/parse.weapp.min.js +2 -2
  6. package/lib/browser/CoreManager.js +1 -1
  7. package/lib/browser/EventuallyQueue.js +31 -27
  8. package/lib/browser/LiveQueryClient.js +6 -2
  9. package/lib/browser/LocalDatastore.js +20 -20
  10. package/lib/browser/LocalDatastoreController.js +16 -14
  11. package/lib/browser/LocalDatastoreController.react-native.js +10 -10
  12. package/lib/browser/ParseCLP.js +32 -32
  13. package/lib/browser/ParseFile.js +26 -15
  14. package/lib/browser/ParseLiveQuery.js +6 -6
  15. package/lib/browser/ParseObject.js +84 -69
  16. package/lib/browser/ParseOp.js +3 -1
  17. package/lib/browser/ParseQuery.js +115 -88
  18. package/lib/browser/ParseUser.js +74 -64
  19. package/lib/browser/RESTController.js +6 -7
  20. package/lib/node/CoreManager.js +1 -1
  21. package/lib/node/ObjectStateMutations.js +14 -43
  22. package/lib/node/ParseCLP.js +12 -41
  23. package/lib/node/ParseFile.js +15 -41
  24. package/lib/node/ParseObject.js +13 -41
  25. package/lib/node/ParseQuery.js +3 -1
  26. package/lib/node/RESTController.js +2 -43
  27. package/lib/react-native/CoreManager.js +1 -1
  28. package/lib/react-native/LiveQueryClient.js +6 -2
  29. package/lib/react-native/LocalDatastore.js +3 -2
  30. package/lib/react-native/ParseCLP.js +32 -32
  31. package/lib/react-native/ParseFile.js +9 -3
  32. package/lib/react-native/ParseObject.js +14 -9
  33. package/lib/react-native/ParseOp.js +3 -1
  34. package/lib/react-native/ParseQuery.js +21 -7
  35. package/lib/react-native/RESTController.js +6 -7
  36. package/lib/weapp/CoreManager.js +1 -1
  37. package/lib/weapp/EventuallyQueue.js +31 -27
  38. package/lib/weapp/LiveQueryClient.js +6 -2
  39. package/lib/weapp/LocalDatastore.js +20 -20
  40. package/lib/weapp/LocalDatastoreController.js +16 -14
  41. package/lib/weapp/LocalDatastoreController.react-native.js +10 -10
  42. package/lib/weapp/ParseCLP.js +32 -32
  43. package/lib/weapp/ParseFile.js +26 -15
  44. package/lib/weapp/ParseLiveQuery.js +6 -6
  45. package/lib/weapp/ParseObject.js +84 -69
  46. package/lib/weapp/ParseOp.js +3 -1
  47. package/lib/weapp/ParseQuery.js +115 -88
  48. package/lib/weapp/ParseUser.js +74 -64
  49. package/lib/weapp/RESTController.js +6 -7
  50. package/package.json +6 -2
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Parse JavaScript SDK v3.5.1-beta.1
2
+ * Parse JavaScript SDK v4.0.0-alpha.1
3
3
  *
4
4
  * The source tree of this library can be found at
5
5
  * https://github.com/ParsePlatform/Parse-SDK-JS
@@ -699,7 +699,7 @@ var config
699
699
  SERVER_AUTH_TOKEN: null,
700
700
  LIVEQUERY_SERVER_URL: null,
701
701
  ENCRYPTED_KEY: null,
702
- VERSION: 'js' + "3.5.1-beta.1",
702
+ VERSION: 'js' + "4.0.0-alpha.1",
703
703
  APPLICATION_ID: null,
704
704
  JAVASCRIPT_KEY: null,
705
705
  MASTER_KEY: null,
@@ -1543,7 +1543,7 @@ var EventuallyQueue = {
1543
1543
 
1544
1544
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
1545
1545
  var queueData, queueId, index, prop;
1546
- return _regeneratorRuntime().wrap(function (_context) {
1546
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
1547
1547
  while (1) {
1548
1548
  switch (_context.prev = _context.next) {
1549
1549
  case 0:
@@ -1586,10 +1586,10 @@ var EventuallyQueue = {
1586
1586
  }, _callee);
1587
1587
  }))();
1588
1588
  },
1589
- store: function (data) {
1589
+ store: function store(data) {
1590
1590
  return _Storage.default.setItemAsync(QUEUE_KEY, (0, _stringify.default)(data));
1591
1591
  },
1592
- load: function () {
1592
+ load: function load() {
1593
1593
  return _Storage.default.getItemAsync(QUEUE_KEY);
1594
1594
  },
1595
1595
 
@@ -1601,11 +1601,13 @@ var EventuallyQueue = {
1601
1601
  * @returns {Promise<Array>}
1602
1602
  * @static
1603
1603
  */
1604
- getQueue: function ()
1604
+ getQueue: function getQueue()
1605
1605
  /*: Promise<Array>*/
1606
1606
  {
1607
+ var _this2 = this;
1608
+
1607
1609
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
1608
- return _regeneratorRuntime().wrap(function (_context2) {
1610
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
1609
1611
  while (1) {
1610
1612
  switch (_context2.prev = _context2.next) {
1611
1613
  case 0:
@@ -1616,7 +1618,7 @@ var EventuallyQueue = {
1616
1618
 
1617
1619
  _context2.t0 = JSON;
1618
1620
  _context2.next = 4;
1619
- return this.load();
1621
+ return _this2.load();
1620
1622
 
1621
1623
  case 4:
1622
1624
  _context2.t1 = _context2.sent;
@@ -1653,7 +1655,7 @@ var EventuallyQueue = {
1653
1655
  * @static
1654
1656
  * @ignore
1655
1657
  */
1656
- setQueue: function (queue
1658
+ setQueue: function setQueue(queue
1657
1659
  /*: Queue*/
1658
1660
  )
1659
1661
  /*: Promise<void>*/
@@ -1670,7 +1672,7 @@ var EventuallyQueue = {
1670
1672
  * @static
1671
1673
  * @ignore
1672
1674
  */
1673
- remove: function (queueId
1675
+ remove: function remove(queueId
1674
1676
  /*: string*/
1675
1677
  )
1676
1678
  /*: Promise<void>*/
@@ -1679,7 +1681,7 @@ var EventuallyQueue = {
1679
1681
 
1680
1682
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
1681
1683
  var queueData, index;
1682
- return _regeneratorRuntime().wrap(function (_context3) {
1684
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
1683
1685
  while (1) {
1684
1686
  switch (_context3.prev = _context3.next) {
1685
1687
  case 0:
@@ -1716,7 +1718,7 @@ var EventuallyQueue = {
1716
1718
  * @returns {Promise} A promise that is fulfilled when queue is cleared.
1717
1719
  * @static
1718
1720
  */
1719
- clear: function ()
1721
+ clear: function clear()
1720
1722
  /*: Promise*/
1721
1723
  {
1722
1724
  queueCache = [];
@@ -1732,7 +1734,7 @@ var EventuallyQueue = {
1732
1734
  * @static
1733
1735
  * @ignore
1734
1736
  */
1735
- queueItemExists: function (queue
1737
+ queueItemExists: function queueItemExists(queue
1736
1738
  /*: Queue*/
1737
1739
  , queueId
1738
1740
  /*: string*/
@@ -1752,17 +1754,19 @@ var EventuallyQueue = {
1752
1754
  * @returns {number}
1753
1755
  * @static
1754
1756
  */
1755
- length: function ()
1757
+ length: function length()
1756
1758
  /*: number*/
1757
1759
  {
1760
+ var _this4 = this;
1761
+
1758
1762
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
1759
1763
  var queueData;
1760
- return _regeneratorRuntime().wrap(function (_context4) {
1764
+ return _regeneratorRuntime().wrap(function _callee4$(_context4) {
1761
1765
  while (1) {
1762
1766
  switch (_context4.prev = _context4.next) {
1763
1767
  case 0:
1764
1768
  _context4.next = 2;
1765
- return this.getQueue();
1769
+ return _this4.getQueue();
1766
1770
 
1767
1771
  case 2:
1768
1772
  queueData = _context4.sent;
@@ -1785,14 +1789,14 @@ var EventuallyQueue = {
1785
1789
  * @returns {Promise<boolean>} Returns true if queue was sent successfully.
1786
1790
  * @static
1787
1791
  */
1788
- sendQueue: function ()
1792
+ sendQueue: function sendQueue()
1789
1793
  /*: Promise<boolean>*/
1790
1794
  {
1791
1795
  var _this5 = this;
1792
1796
 
1793
1797
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
1794
1798
  var queue, queueData, i, queueObject, id, hash, className, ObjectType;
1795
- return _regeneratorRuntime().wrap(function (_context5) {
1799
+ return _regeneratorRuntime().wrap(function _callee5$(_context5) {
1796
1800
  while (1) {
1797
1801
  switch (_context5.prev = _context5.next) {
1798
1802
  case 0:
@@ -1878,7 +1882,7 @@ var EventuallyQueue = {
1878
1882
  * @static
1879
1883
  * @ignore
1880
1884
  */
1881
- sendQueueCallback: function (object
1885
+ sendQueueCallback: function sendQueueCallback(object
1882
1886
  /*: ParseObject*/
1883
1887
  , queueObject
1884
1888
  /*: QueueObject*/
@@ -1888,7 +1892,7 @@ var EventuallyQueue = {
1888
1892
  var _this6 = this;
1889
1893
 
1890
1894
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
1891
- return _regeneratorRuntime().wrap(function (_context6) {
1895
+ return _regeneratorRuntime().wrap(function _callee6$(_context6) {
1892
1896
  while (1) {
1893
1897
  switch (_context6.prev = _context6.next) {
1894
1898
  case 0:
@@ -1986,7 +1990,7 @@ var EventuallyQueue = {
1986
1990
  * @param [ms] Milliseconds to ping the server. Default 2000ms
1987
1991
  * @static
1988
1992
  */
1989
- poll: function () {
1993
+ poll: function poll() {
1990
1994
  var _this7 = this;
1991
1995
 
1992
1996
  var ms
@@ -2021,7 +2025,7 @@ var EventuallyQueue = {
2021
2025
  * @name Parse.EventuallyQueue.stopPoll
2022
2026
  * @static
2023
2027
  */
2024
- stopPoll: function () {
2028
+ stopPoll: function stopPoll() {
2025
2029
  clearInterval(polling);
2026
2030
  polling = undefined;
2027
2031
  },
@@ -2034,25 +2038,25 @@ var EventuallyQueue = {
2034
2038
  * @returns {boolean}
2035
2039
  * @static
2036
2040
  */
2037
- isPolling: function ()
2041
+ isPolling: function isPolling()
2038
2042
  /*: boolean*/
2039
2043
  {
2040
2044
  return !!polling;
2041
2045
  },
2042
- _setPolling: function (flag
2046
+ _setPolling: function _setPolling(flag
2043
2047
  /*: boolean*/
2044
2048
  ) {
2045
2049
  polling = flag;
2046
2050
  },
2047
2051
  process: {
2048
- create: function (ObjectType, queueObject) {
2052
+ create: function create(ObjectType, queueObject) {
2049
2053
  var object = new ObjectType();
2050
2054
  return EventuallyQueue.sendQueueCallback(object, queueObject);
2051
2055
  },
2052
- byId: function (ObjectType, queueObject) {
2056
+ byId: function byId(ObjectType, queueObject) {
2053
2057
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7() {
2054
2058
  var sessionToken, query, results;
2055
- return _regeneratorRuntime().wrap(function (_context7) {
2059
+ return _regeneratorRuntime().wrap(function _callee7$(_context7) {
2056
2060
  while (1) {
2057
2061
  switch (_context7.prev = _context7.next) {
2058
2062
  case 0:
@@ -2076,10 +2080,10 @@ var EventuallyQueue = {
2076
2080
  }, _callee7);
2077
2081
  }))();
2078
2082
  },
2079
- byHash: function (ObjectType, queueObject) {
2083
+ byHash: function byHash(ObjectType, queueObject) {
2080
2084
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {
2081
2085
  var sessionToken, query, results;
2082
- return _regeneratorRuntime().wrap(function (_context8) {
2086
+ return _regeneratorRuntime().wrap(function _callee8$(_context8) {
2083
2087
  while (1) {
2084
2088
  switch (_context8.prev = _context8.next) {
2085
2089
  case 0:
@@ -2806,6 +2810,8 @@ var LiveQueryClient = /*#__PURE__*/function (_EventEmitter) {
2806
2810
  )
2807
2811
  /*: LiveQuerySubscription*/
2808
2812
  {
2813
+ var _this2 = this;
2814
+
2809
2815
  if (!query) {
2810
2816
  return;
2811
2817
  }
@@ -2832,7 +2838,7 @@ var LiveQueryClient = /*#__PURE__*/function (_EventEmitter) {
2832
2838
  this.subscriptions.set(this.requestId, subscription);
2833
2839
  this.requestId += 1;
2834
2840
  this.connectPromise.then(function () {
2835
- this.socket.send((0, _stringify.default)(subscribeRequest));
2841
+ _this2.socket.send((0, _stringify.default)(subscribeRequest));
2836
2842
  });
2837
2843
  return subscription;
2838
2844
  }
@@ -2847,6 +2853,8 @@ var LiveQueryClient = /*#__PURE__*/function (_EventEmitter) {
2847
2853
  value: function (subscription
2848
2854
  /*: Object*/
2849
2855
  ) {
2856
+ var _this3 = this;
2857
+
2850
2858
  if (!subscription) {
2851
2859
  return;
2852
2860
  }
@@ -2857,7 +2865,7 @@ var LiveQueryClient = /*#__PURE__*/function (_EventEmitter) {
2857
2865
  requestId: subscription.id
2858
2866
  };
2859
2867
  this.connectPromise.then(function () {
2860
- this.socket.send((0, _stringify.default)(unsubscribeRequest));
2868
+ _this3.socket.send((0, _stringify.default)(unsubscribeRequest));
2861
2869
  });
2862
2870
  }
2863
2871
  /**
@@ -3996,7 +4004,7 @@ var LocalDatastore = {
3996
4004
 
3997
4005
  var pinName, toPinPromises, objectKeys, _iterator, _step, parent, children, parentKey, json, objectKey, fromPinPromise, _yield$Promise$all, _yield$Promise$all2, pinned, toPin;
3998
4006
 
3999
- return _regeneratorRuntime().wrap(function (_context2) {
4007
+ return _regeneratorRuntime().wrap(function _callee$(_context2) {
4000
4008
  while (1) {
4001
4009
  switch (_context2.prev = _context2.next) {
4002
4010
  case 0:
@@ -4050,7 +4058,7 @@ var LocalDatastore = {
4050
4058
  },
4051
4059
  // Removes object and children keys from pin name
4052
4060
  // Keeps the object and children pinned
4053
- _handleUnPinAllWithName: function (name
4061
+ _handleUnPinAllWithName: function _handleUnPinAllWithName(name
4054
4062
  /*: string*/
4055
4063
  , objects
4056
4064
  /*: Array<ParseObject>*/
@@ -4060,7 +4068,7 @@ var LocalDatastore = {
4060
4068
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
4061
4069
  var localDatastore, pinName, promises, objectKeys, _iterator2, _step2, _objectKeys, _context3, parent, children, parentKey, pinned, _iterator3, _step3, objectKey, hasReference, key, pinnedObjects;
4062
4070
 
4063
- return _regeneratorRuntime().wrap(function (_context4) {
4071
+ return _regeneratorRuntime().wrap(function _callee2$(_context4) {
4064
4072
  while (1) {
4065
4073
  switch (_context4.prev = _context4.next) {
4066
4074
  case 0:
@@ -4182,7 +4190,7 @@ var LocalDatastore = {
4182
4190
  }))();
4183
4191
  },
4184
4192
  // Retrieve all pointer fields from object recursively
4185
- _getChildren: function (object
4193
+ _getChildren: function _getChildren(object
4186
4194
  /*: ParseObject*/
4187
4195
  ) {
4188
4196
  var encountered = {};
@@ -4197,7 +4205,7 @@ var LocalDatastore = {
4197
4205
 
4198
4206
  return encountered;
4199
4207
  },
4200
- _traverse: function (object
4208
+ _traverse: function _traverse(object
4201
4209
  /*: any*/
4202
4210
  , encountered
4203
4211
  /*: any*/
@@ -4227,7 +4235,7 @@ var LocalDatastore = {
4227
4235
  }
4228
4236
  },
4229
4237
  // Transform keys in pin name to objects
4230
- _serializeObjectsFromPinName: function (name
4238
+ _serializeObjectsFromPinName: function _serializeObjectsFromPinName(name
4231
4239
  /*: string*/
4232
4240
  ) {
4233
4241
  var _this3 = this;
@@ -4236,7 +4244,7 @@ var LocalDatastore = {
4236
4244
  var _context5, _concatInstanceProper, _context6;
4237
4245
 
4238
4246
  var localDatastore, allObjects, key, pinName, pinned, promises, objects;
4239
- return _regeneratorRuntime().wrap(function (_context7) {
4247
+ return _regeneratorRuntime().wrap(function _callee3$(_context7) {
4240
4248
  while (1) {
4241
4249
  switch (_context7.prev = _context7.next) {
4242
4250
  case 0:
@@ -4296,7 +4304,7 @@ var LocalDatastore = {
4296
4304
  // Replaces object pointers with pinned pointers
4297
4305
  // The object pointers may contain old data
4298
4306
  // Uses Breadth First Search Algorithm
4299
- _serializeObject: function (objectKey
4307
+ _serializeObject: function _serializeObject(objectKey
4300
4308
  /*: string*/
4301
4309
  , localDatastore
4302
4310
  /*: any*/
@@ -4305,7 +4313,7 @@ var LocalDatastore = {
4305
4313
 
4306
4314
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
4307
4315
  var LDS, root, queue, meta, uniqueId, nodeId, subTreeRoot, field, value, key, pointer;
4308
- return _regeneratorRuntime().wrap(function (_context8) {
4316
+ return _regeneratorRuntime().wrap(function _callee4$(_context8) {
4309
4317
  while (1) {
4310
4318
  switch (_context8.prev = _context8.next) {
4311
4319
  case 0:
@@ -4371,7 +4379,7 @@ var LocalDatastore = {
4371
4379
  },
4372
4380
  // Called when an object is save / fetched
4373
4381
  // Update object pin value
4374
- _updateObjectIfPinned: function (object
4382
+ _updateObjectIfPinned: function _updateObjectIfPinned(object
4375
4383
  /*: ParseObject*/
4376
4384
  )
4377
4385
  /*: Promise<void>*/
@@ -4380,7 +4388,7 @@ var LocalDatastore = {
4380
4388
 
4381
4389
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
4382
4390
  var objectKey, pinned;
4383
- return _regeneratorRuntime().wrap(function (_context9) {
4391
+ return _regeneratorRuntime().wrap(function _callee5$(_context9) {
4384
4392
  while (1) {
4385
4393
  switch (_context9.prev = _context9.next) {
4386
4394
  case 0:
@@ -4420,14 +4428,14 @@ var LocalDatastore = {
4420
4428
  // Called when object is destroyed
4421
4429
  // Unpin object and remove all references from pin names
4422
4430
  // TODO: Destroy children?
4423
- _destroyObjectIfPinned: function (object
4431
+ _destroyObjectIfPinned: function _destroyObjectIfPinned(object
4424
4432
  /*: ParseObject*/
4425
4433
  ) {
4426
4434
  var _this6 = this;
4427
4435
 
4428
4436
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
4429
4437
  var localDatastore, objectKey, pin, promises, key, pinned;
4430
- return _regeneratorRuntime().wrap(function (_context10) {
4438
+ return _regeneratorRuntime().wrap(function _callee6$(_context10) {
4431
4439
  while (1) {
4432
4440
  switch (_context10.prev = _context10.next) {
4433
4441
  case 0:
@@ -4489,7 +4497,7 @@ var LocalDatastore = {
4489
4497
  }))();
4490
4498
  },
4491
4499
  // Update pin and references of the unsaved object
4492
- _updateLocalIdForObject: function (localId
4500
+ _updateLocalIdForObject: function _updateLocalIdForObject(localId
4493
4501
  /*: string*/
4494
4502
  , object
4495
4503
  /*: ParseObject*/
@@ -4500,7 +4508,7 @@ var LocalDatastore = {
4500
4508
  var _context11, _context12;
4501
4509
 
4502
4510
  var localKey, objectKey, unsaved, promises, localDatastore, key, pinned;
4503
- return _regeneratorRuntime().wrap(function (_context13) {
4511
+ return _regeneratorRuntime().wrap(function _callee7$(_context13) {
4504
4512
  while (1) {
4505
4513
  switch (_context13.prev = _context13.next) {
4506
4514
  case 0:
@@ -4572,7 +4580,7 @@ var LocalDatastore = {
4572
4580
  * @name Parse.LocalDatastore.updateFromServer
4573
4581
  * @static
4574
4582
  */
4575
- updateFromServer: function () {
4583
+ updateFromServer: function updateFromServer() {
4576
4584
  var _this8 = this;
4577
4585
 
4578
4586
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {
@@ -4580,7 +4588,7 @@ var LocalDatastore = {
4580
4588
 
4581
4589
  var localDatastore, keys, key, pointersHash, _i, _keys, _key, _key$split, _key$split2, className, objectId, queryPromises, responses, objects, pinPromises;
4582
4590
 
4583
- return _regeneratorRuntime().wrap(function (_context15) {
4591
+ return _regeneratorRuntime().wrap(function _callee8$(_context15) {
4584
4592
  while (1) {
4585
4593
  switch (_context15.prev = _context15.next) {
4586
4594
  case 0:
@@ -4699,7 +4707,7 @@ var LocalDatastore = {
4699
4707
  }, _callee8, null, [[24, 35]]);
4700
4708
  }))();
4701
4709
  },
4702
- getKeyForObject: function (object
4710
+ getKeyForObject: function getKeyForObject(object
4703
4711
  /*: any*/
4704
4712
  ) {
4705
4713
  var _context16, _context17;
@@ -4708,7 +4716,7 @@ var LocalDatastore = {
4708
4716
 
4709
4717
  return (0, _concat.default)(_context16 = (0, _concat.default)(_context17 = "".concat(_LocalDatastoreUtils.OBJECT_PREFIX)).call(_context17, object.className, "_")).call(_context16, objectId);
4710
4718
  },
4711
- getPinName: function (pinName
4719
+ getPinName: function getPinName(pinName
4712
4720
  /*: ?string*/
4713
4721
  ) {
4714
4722
  if (!pinName || pinName === _LocalDatastoreUtils.DEFAULT_PIN) {
@@ -4717,7 +4725,7 @@ var LocalDatastore = {
4717
4725
 
4718
4726
  return _LocalDatastoreUtils.PIN_PREFIX + pinName;
4719
4727
  },
4720
- checkIfEnabled: function () {
4728
+ checkIfEnabled: function checkIfEnabled() {
4721
4729
  if (!this.isEnabled) {
4722
4730
  console.error('Parse.enableLocalDatastore() must be called first');
4723
4731
  }
@@ -5221,7 +5229,7 @@ var LocalDatastoreController = {
5221
5229
  {
5222
5230
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
5223
5231
  var values, objects;
5224
- return _regeneratorRuntime().wrap(function (_context) {
5232
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
5225
5233
  while (1) {
5226
5234
  switch (_context.prev = _context.next) {
5227
5235
  case 0:
@@ -5250,7 +5258,7 @@ var LocalDatastoreController = {
5250
5258
  }, _callee);
5251
5259
  }))();
5252
5260
  },
5253
- pinWithName: function (name
5261
+ pinWithName: function pinWithName(name
5254
5262
  /*: string*/
5255
5263
  , value
5256
5264
  /*: any*/
@@ -5258,17 +5266,17 @@ var LocalDatastoreController = {
5258
5266
  var values = (0, _stringify.default)(value);
5259
5267
  return _Storage.default.setItemAsync(name, values);
5260
5268
  },
5261
- unPinWithName: function (name
5269
+ unPinWithName: function unPinWithName(name
5262
5270
  /*: string*/
5263
5271
  ) {
5264
5272
  return _Storage.default.removeItemAsync(name);
5265
5273
  },
5266
- getAllContents: function ()
5274
+ getAllContents: function getAllContents()
5267
5275
  /*: Object*/
5268
5276
  {
5269
5277
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
5270
5278
  var keys;
5271
- return _regeneratorRuntime().wrap(function (_context3) {
5279
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
5272
5280
  while (1) {
5273
5281
  switch (_context3.prev = _context3.next) {
5274
5282
  case 0:
@@ -5280,7 +5288,7 @@ var LocalDatastoreController = {
5280
5288
  return _context3.abrupt("return", (0, _reduce.default)(keys).call(keys, /*#__PURE__*/function () {
5281
5289
  var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(previousPromise, key) {
5282
5290
  var LDS, value;
5283
- return _regeneratorRuntime().wrap(function (_context2) {
5291
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
5284
5292
  while (1) {
5285
5293
  switch (_context2.prev = _context2.next) {
5286
5294
  case 0:
@@ -5318,7 +5326,7 @@ var LocalDatastoreController = {
5318
5326
  }, _callee2);
5319
5327
  }));
5320
5328
 
5321
- return function () {
5329
+ return function (_x, _x2) {
5322
5330
  return _ref.apply(this, arguments);
5323
5331
  };
5324
5332
  }(), _promise.default.resolve({})));
@@ -5332,12 +5340,12 @@ var LocalDatastoreController = {
5332
5340
  }))();
5333
5341
  },
5334
5342
  // Used for testing
5335
- getRawStorage: function ()
5343
+ getRawStorage: function getRawStorage()
5336
5344
  /*: Object*/
5337
5345
  {
5338
5346
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
5339
5347
  var keys;
5340
- return _regeneratorRuntime().wrap(function (_context5) {
5348
+ return _regeneratorRuntime().wrap(function _callee5$(_context5) {
5341
5349
  while (1) {
5342
5350
  switch (_context5.prev = _context5.next) {
5343
5351
  case 0:
@@ -5349,7 +5357,7 @@ var LocalDatastoreController = {
5349
5357
  return _context5.abrupt("return", (0, _reduce.default)(keys).call(keys, /*#__PURE__*/function () {
5350
5358
  var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(previousPromise, key) {
5351
5359
  var LDS, value;
5352
- return _regeneratorRuntime().wrap(function (_context4) {
5360
+ return _regeneratorRuntime().wrap(function _callee4$(_context4) {
5353
5361
  while (1) {
5354
5362
  switch (_context4.prev = _context4.next) {
5355
5363
  case 0:
@@ -5374,7 +5382,7 @@ var LocalDatastoreController = {
5374
5382
  }, _callee4);
5375
5383
  }));
5376
5384
 
5377
- return function () {
5385
+ return function (_x3, _x4) {
5378
5386
  return _ref2.apply(this, arguments);
5379
5387
  };
5380
5388
  }(), _promise.default.resolve({})));
@@ -5387,13 +5395,15 @@ var LocalDatastoreController = {
5387
5395
  }, _callee5);
5388
5396
  }))();
5389
5397
  },
5390
- clear: function ()
5398
+ clear: function clear()
5391
5399
  /*: Promise*/
5392
5400
  {
5401
+ var _this = this;
5402
+
5393
5403
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
5394
5404
  var keys, toRemove, _iterator, _step, key, promises;
5395
5405
 
5396
- return _regeneratorRuntime().wrap(function (_context6) {
5406
+ return _regeneratorRuntime().wrap(function _callee6$(_context6) {
5397
5407
  while (1) {
5398
5408
  switch (_context6.prev = _context6.next) {
5399
5409
  case 0:
@@ -5419,7 +5429,7 @@ var LocalDatastoreController = {
5419
5429
  _iterator.f();
5420
5430
  }
5421
5431
 
5422
- promises = (0, _map.default)(toRemove).call(toRemove, this.unPinWithName);
5432
+ promises = (0, _map.default)(toRemove).call(toRemove, _this.unPinWithName);
5423
5433
  return _context6.abrupt("return", _promise.default.all(promises));
5424
5434
 
5425
5435
  case 8:
@@ -7805,7 +7815,7 @@ var ParseCLP = /*#__PURE__*/function () {
7805
7815
  _step;
7806
7816
 
7807
7817
  try {
7808
- var _loop = function () {
7818
+ var _loop = function _loop() {
7809
7819
  var _step$value = (0, _slicedToArray2.default)(_step.value, 2),
7810
7820
  operation = _step$value[0],
7811
7821
  group = _step$value[1];
@@ -7936,7 +7946,7 @@ var ParseCLP = /*#__PURE__*/function () {
7936
7946
 
7937
7947
  (0, _createClass2.default)(ParseCLP, [{
7938
7948
  key: "toJSON",
7939
- value: function ()
7949
+ value: function toJSON()
7940
7950
  /*: PermissionsMap*/
7941
7951
  {
7942
7952
  return _objectSpread({}, this.permissionsMap);
@@ -7950,7 +7960,7 @@ var ParseCLP = /*#__PURE__*/function () {
7950
7960
 
7951
7961
  }, {
7952
7962
  key: "equals",
7953
- value: function (other
7963
+ value: function equals(other
7954
7964
  /*: ParseCLP*/
7955
7965
  )
7956
7966
  /*: boolean*/
@@ -7993,7 +8003,7 @@ var ParseCLP = /*#__PURE__*/function () {
7993
8003
  }
7994
8004
  }, {
7995
8005
  key: "_getRoleName",
7996
- value: function (role
8006
+ value: function _getRoleName(role
7997
8007
  /*: ParseRole | string*/
7998
8008
  )
7999
8009
  /*: string*/
@@ -8013,7 +8023,7 @@ var ParseCLP = /*#__PURE__*/function () {
8013
8023
  }
8014
8024
  }, {
8015
8025
  key: "_parseEntity",
8016
- value: function (entity
8026
+ value: function _parseEntity(entity
8017
8027
  /*: Entity*/
8018
8028
  ) {
8019
8029
  var userId = entity;
@@ -8036,7 +8046,7 @@ var ParseCLP = /*#__PURE__*/function () {
8036
8046
  }
8037
8047
  }, {
8038
8048
  key: "_setAccess",
8039
- value: function (permission
8049
+ value: function _setAccess(permission
8040
8050
  /*: string*/
8041
8051
  , userId
8042
8052
  /*: Entity*/
@@ -8068,7 +8078,7 @@ var ParseCLP = /*#__PURE__*/function () {
8068
8078
  }
8069
8079
  }, {
8070
8080
  key: "_getAccess",
8071
- value: function (permission
8081
+ value: function _getAccess(permission
8072
8082
  /*: string*/
8073
8083
  , userId
8074
8084
  /*: Entity*/
@@ -8091,7 +8101,7 @@ var ParseCLP = /*#__PURE__*/function () {
8091
8101
  }
8092
8102
  }, {
8093
8103
  key: "_setArrayAccess",
8094
- value: function (permission
8104
+ value: function _setArrayAccess(permission
8095
8105
  /*: string*/
8096
8106
  , userId
8097
8107
  /*: Entity*/
@@ -8117,7 +8127,7 @@ var ParseCLP = /*#__PURE__*/function () {
8117
8127
  }
8118
8128
  }, {
8119
8129
  key: "_setGroupPointerPermission",
8120
- value: function (operation
8130
+ value: function _setGroupPointerPermission(operation
8121
8131
  /*: string*/
8122
8132
  , pointerFields
8123
8133
  /*: string[]*/
@@ -8140,7 +8150,7 @@ var ParseCLP = /*#__PURE__*/function () {
8140
8150
  }
8141
8151
  }, {
8142
8152
  key: "_getGroupPointerPermissions",
8143
- value: function (operation
8153
+ value: function _getGroupPointerPermissions(operation
8144
8154
  /*: string*/
8145
8155
  )
8146
8156
  /*: string[]*/
@@ -8155,7 +8165,7 @@ var ParseCLP = /*#__PURE__*/function () {
8155
8165
 
8156
8166
  }, {
8157
8167
  key: "setReadUserFields",
8158
- value: function (pointerFields
8168
+ value: function setReadUserFields(pointerFields
8159
8169
  /*: string[]*/
8160
8170
  ) {
8161
8171
  this._setGroupPointerPermission('readUserFields', pointerFields);
@@ -8166,7 +8176,7 @@ var ParseCLP = /*#__PURE__*/function () {
8166
8176
 
8167
8177
  }, {
8168
8178
  key: "getReadUserFields",
8169
- value: function ()
8179
+ value: function getReadUserFields()
8170
8180
  /*: string[]*/
8171
8181
  {
8172
8182
  return this._getGroupPointerPermissions('readUserFields');
@@ -8179,7 +8189,7 @@ var ParseCLP = /*#__PURE__*/function () {
8179
8189
 
8180
8190
  }, {
8181
8191
  key: "setWriteUserFields",
8182
- value: function (pointerFields
8192
+ value: function setWriteUserFields(pointerFields
8183
8193
  /*: string[]*/
8184
8194
  ) {
8185
8195
  this._setGroupPointerPermission('writeUserFields', pointerFields);
@@ -8190,7 +8200,7 @@ var ParseCLP = /*#__PURE__*/function () {
8190
8200
 
8191
8201
  }, {
8192
8202
  key: "getWriteUserFields",
8193
- value: function ()
8203
+ value: function getWriteUserFields()
8194
8204
  /*: string[]*/
8195
8205
  {
8196
8206
  return this._getGroupPointerPermissions('writeUserFields');
@@ -8204,7 +8214,7 @@ var ParseCLP = /*#__PURE__*/function () {
8204
8214
 
8205
8215
  }, {
8206
8216
  key: "setProtectedFields",
8207
- value: function (userId
8217
+ value: function setProtectedFields(userId
8208
8218
  /*: Entity*/
8209
8219
  , fields
8210
8220
  /*: string[]*/
@@ -8220,7 +8230,7 @@ var ParseCLP = /*#__PURE__*/function () {
8220
8230
 
8221
8231
  }, {
8222
8232
  key: "getProtectedFields",
8223
- value: function (userId
8233
+ value: function getProtectedFields(userId
8224
8234
  /*: Entity*/
8225
8235
  )
8226
8236
  /*: string[]*/
@@ -8236,7 +8246,7 @@ var ParseCLP = /*#__PURE__*/function () {
8236
8246
 
8237
8247
  }, {
8238
8248
  key: "setReadAccess",
8239
- value: function (userId
8249
+ value: function setReadAccess(userId
8240
8250
  /*: Entity*/
8241
8251
  , allowed
8242
8252
  /*: boolean*/
@@ -8259,7 +8269,7 @@ var ParseCLP = /*#__PURE__*/function () {
8259
8269
 
8260
8270
  }, {
8261
8271
  key: "getReadAccess",
8262
- value: function (userId
8272
+ value: function getReadAccess(userId
8263
8273
  /*: Entity*/
8264
8274
  )
8265
8275
  /*: boolean*/
@@ -8275,7 +8285,7 @@ var ParseCLP = /*#__PURE__*/function () {
8275
8285
 
8276
8286
  }, {
8277
8287
  key: "setWriteAccess",
8278
- value: function (userId
8288
+ value: function setWriteAccess(userId
8279
8289
  /*: Entity*/
8280
8290
  , allowed
8281
8291
  /*: boolean*/
@@ -8300,7 +8310,7 @@ var ParseCLP = /*#__PURE__*/function () {
8300
8310
 
8301
8311
  }, {
8302
8312
  key: "getWriteAccess",
8303
- value: function (userId
8313
+ value: function getWriteAccess(userId
8304
8314
  /*: Entity*/
8305
8315
  )
8306
8316
  /*: boolean*/
@@ -8315,7 +8325,7 @@ var ParseCLP = /*#__PURE__*/function () {
8315
8325
 
8316
8326
  }, {
8317
8327
  key: "setPublicReadAccess",
8318
- value: function (allowed
8328
+ value: function setPublicReadAccess(allowed
8319
8329
  /*: boolean*/
8320
8330
  ) {
8321
8331
  this.setReadAccess(PUBLIC_KEY, allowed);
@@ -8328,7 +8338,7 @@ var ParseCLP = /*#__PURE__*/function () {
8328
8338
 
8329
8339
  }, {
8330
8340
  key: "getPublicReadAccess",
8331
- value: function ()
8341
+ value: function getPublicReadAccess()
8332
8342
  /*: boolean*/
8333
8343
  {
8334
8344
  return this.getReadAccess(PUBLIC_KEY);
@@ -8341,7 +8351,7 @@ var ParseCLP = /*#__PURE__*/function () {
8341
8351
 
8342
8352
  }, {
8343
8353
  key: "setPublicWriteAccess",
8344
- value: function (allowed
8354
+ value: function setPublicWriteAccess(allowed
8345
8355
  /*: boolean*/
8346
8356
  ) {
8347
8357
  this.setWriteAccess(PUBLIC_KEY, allowed);
@@ -8354,7 +8364,7 @@ var ParseCLP = /*#__PURE__*/function () {
8354
8364
 
8355
8365
  }, {
8356
8366
  key: "getPublicWriteAccess",
8357
- value: function ()
8367
+ value: function getPublicWriteAccess()
8358
8368
  /*: boolean*/
8359
8369
  {
8360
8370
  return this.getWriteAccess(PUBLIC_KEY);
@@ -8367,7 +8377,7 @@ var ParseCLP = /*#__PURE__*/function () {
8367
8377
 
8368
8378
  }, {
8369
8379
  key: "setPublicProtectedFields",
8370
- value: function (fields
8380
+ value: function setPublicProtectedFields(fields
8371
8381
  /*: string[]*/
8372
8382
  ) {
8373
8383
  this.setProtectedFields(PUBLIC_KEY, fields);
@@ -8380,7 +8390,7 @@ var ParseCLP = /*#__PURE__*/function () {
8380
8390
 
8381
8391
  }, {
8382
8392
  key: "getPublicProtectedFields",
8383
- value: function ()
8393
+ value: function getPublicProtectedFields()
8384
8394
  /*: string[]*/
8385
8395
  {
8386
8396
  return this.getProtectedFields(PUBLIC_KEY);
@@ -8397,7 +8407,7 @@ var ParseCLP = /*#__PURE__*/function () {
8397
8407
 
8398
8408
  }, {
8399
8409
  key: "getRoleReadAccess",
8400
- value: function (role
8410
+ value: function getRoleReadAccess(role
8401
8411
  /*: ParseRole | string*/
8402
8412
  )
8403
8413
  /*: boolean*/
@@ -8416,7 +8426,7 @@ var ParseCLP = /*#__PURE__*/function () {
8416
8426
 
8417
8427
  }, {
8418
8428
  key: "getRoleWriteAccess",
8419
- value: function (role
8429
+ value: function getRoleWriteAccess(role
8420
8430
  /*: ParseRole | string*/
8421
8431
  )
8422
8432
  /*: boolean*/
@@ -8434,7 +8444,7 @@ var ParseCLP = /*#__PURE__*/function () {
8434
8444
 
8435
8445
  }, {
8436
8446
  key: "setRoleReadAccess",
8437
- value: function (role
8447
+ value: function setRoleReadAccess(role
8438
8448
  /*: ParseRole | string*/
8439
8449
  , allowed
8440
8450
  /*: boolean*/
@@ -8452,7 +8462,7 @@ var ParseCLP = /*#__PURE__*/function () {
8452
8462
 
8453
8463
  }, {
8454
8464
  key: "setRoleWriteAccess",
8455
- value: function (role
8465
+ value: function setRoleWriteAccess(role
8456
8466
  /*: ParseRole | string*/
8457
8467
  , allowed
8458
8468
  /*: boolean*/
@@ -8471,7 +8481,7 @@ var ParseCLP = /*#__PURE__*/function () {
8471
8481
 
8472
8482
  }, {
8473
8483
  key: "getRoleProtectedFields",
8474
- value: function (role
8484
+ value: function getRoleProtectedFields(role
8475
8485
  /*: ParseRole | string*/
8476
8486
  )
8477
8487
  /*: string[]*/
@@ -8489,7 +8499,7 @@ var ParseCLP = /*#__PURE__*/function () {
8489
8499
 
8490
8500
  }, {
8491
8501
  key: "setRoleProtectedFields",
8492
- value: function (role
8502
+ value: function setRoleProtectedFields(role
8493
8503
  /*: ParseRole | string*/
8494
8504
  , fields
8495
8505
  /*: string[]*/
@@ -10067,6 +10077,8 @@ var ParseFile = /*#__PURE__*/function () {
10067
10077
  key: "getData",
10068
10078
  value: function () {
10069
10079
  var _getData = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
10080
+ var _this = this;
10081
+
10070
10082
  var options, controller, result;
10071
10083
  return _regeneratorRuntime().wrap(function (_context4) {
10072
10084
  while (1) {
@@ -10090,7 +10102,7 @@ var ParseFile = /*#__PURE__*/function () {
10090
10102
  case 4:
10091
10103
  options = {
10092
10104
  requestTask: function (task) {
10093
- return this._requestTask = task;
10105
+ return _this._requestTask = task;
10094
10106
  }
10095
10107
  };
10096
10108
  controller = _CoreManager.default.getFileController();
@@ -10110,9 +10122,11 @@ var ParseFile = /*#__PURE__*/function () {
10110
10122
  }, _callee, this);
10111
10123
  }));
10112
10124
 
10113
- return function () {
10125
+ function getData() {
10114
10126
  return _getData.apply(this, arguments);
10115
- };
10127
+ }
10128
+
10129
+ return getData;
10116
10130
  }()
10117
10131
  /**
10118
10132
  * Gets the name of the file. Before save is called, this is the filename
@@ -10357,11 +10371,13 @@ var ParseFile = /*#__PURE__*/function () {
10357
10371
  value: function (metadata
10358
10372
  /*: any*/
10359
10373
  ) {
10374
+ var _this4 = this;
10375
+
10360
10376
  if (metadata && (0, _typeof2.default)(metadata) === 'object') {
10361
10377
  var _context5;
10362
10378
 
10363
10379
  (0, _forEach.default)(_context5 = (0, _keys.default)(metadata)).call(_context5, function (key) {
10364
- this.addMetadata(key, metadata[key]);
10380
+ _this4.addMetadata(key, metadata[key]);
10365
10381
  });
10366
10382
  }
10367
10383
  }
@@ -10394,11 +10410,13 @@ var ParseFile = /*#__PURE__*/function () {
10394
10410
  value: function (tags
10395
10411
  /*: any*/
10396
10412
  ) {
10413
+ var _this5 = this;
10414
+
10397
10415
  if (tags && (0, _typeof2.default)(tags) === 'object') {
10398
10416
  var _context6;
10399
10417
 
10400
10418
  (0, _forEach.default)(_context6 = (0, _keys.default)(tags)).call(_context6, function (key) {
10401
- this.addTag(key, tags[key]);
10419
+ _this5.addTag(key, tags[key]);
10402
10420
  });
10403
10421
  }
10404
10422
  }
@@ -10469,7 +10487,7 @@ var DefaultController = {
10469
10487
  ) {
10470
10488
  var base64Data, _base64Data$split, _base64Data$split2, first, second, data, newSource;
10471
10489
 
10472
- return _regeneratorRuntime().wrap(function (_context7) {
10490
+ return _regeneratorRuntime().wrap(function _callee2$(_context7) {
10473
10491
  while (1) {
10474
10492
  switch (_context7.prev = _context7.next) {
10475
10493
  case 0:
@@ -10524,11 +10542,13 @@ var DefaultController = {
10524
10542
  }, _callee2);
10525
10543
  }));
10526
10544
 
10527
- return function () {
10545
+ function saveFile(_x, _x2, _x3) {
10528
10546
  return _saveFile.apply(this, arguments);
10529
- };
10547
+ }
10548
+
10549
+ return saveFile;
10530
10550
  }(),
10531
- saveBase64: function (name
10551
+ saveBase64: function saveBase64(name
10532
10552
  /*: string*/
10533
10553
  , source
10534
10554
  /*: FileSource*/
@@ -10555,16 +10575,17 @@ var DefaultController = {
10555
10575
  data._ContentType = source.type;
10556
10576
  }
10557
10577
 
10558
- return _CoreManager.default.getRESTController().request('POST', 'files/' + name, data, options);
10578
+ var path = 'files/' + name;
10579
+ return _CoreManager.default.getRESTController().request('POST', path, data, options);
10559
10580
  },
10560
- download: function (uri, options) {
10581
+ download: function download(uri, options) {
10561
10582
  if (XHR) {
10562
10583
  return this.downloadAjax(uri, options);
10563
10584
  } else {
10564
10585
  return _promise.default.reject('Cannot make a request: No definition of XMLHttpRequest was found.');
10565
10586
  }
10566
10587
  },
10567
- downloadAjax: function (uri, options) {
10588
+ downloadAjax: function downloadAjax(uri, options) {
10568
10589
  return new _promise.default(function (resolve, reject) {
10569
10590
  var xhr = new XHR();
10570
10591
  xhr.open('GET', uri, true);
@@ -10594,7 +10615,7 @@ var DefaultController = {
10594
10615
  xhr.send();
10595
10616
  });
10596
10617
  },
10597
- deleteFile: function (name
10618
+ deleteFile: function deleteFile(name
10598
10619
  /*: string*/
10599
10620
  , options
10600
10621
  /*:: ?: FullOptions*/
@@ -10623,12 +10644,12 @@ var DefaultController = {
10623
10644
  }
10624
10645
  });
10625
10646
  },
10626
- _setXHR: function (xhr
10647
+ _setXHR: function _setXHR(xhr
10627
10648
  /*: any*/
10628
10649
  ) {
10629
10650
  XHR = xhr;
10630
10651
  },
10631
- _getXHR: function () {
10652
+ _getXHR: function _getXHR() {
10632
10653
  return XHR;
10633
10654
  }
10634
10655
  };
@@ -11447,7 +11468,7 @@ var LiveQuery = new _EventEmitter.default();
11447
11468
 
11448
11469
  LiveQuery.open = /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
11449
11470
  var liveQueryClient;
11450
- return _regeneratorRuntime().wrap(function (_context) {
11471
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
11451
11472
  while (1) {
11452
11473
  switch (_context.prev = _context.next) {
11453
11474
  case 0:
@@ -11475,7 +11496,7 @@ LiveQuery.open = /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_reg
11475
11496
 
11476
11497
  LiveQuery.close = /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
11477
11498
  var liveQueryClient;
11478
- return _regeneratorRuntime().wrap(function (_context2) {
11499
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
11479
11500
  while (1) {
11480
11501
  switch (_context2.prev = _context2.next) {
11481
11502
  case 0:
@@ -11499,18 +11520,18 @@ var _default = LiveQuery;
11499
11520
  exports.default = _default;
11500
11521
  var defaultLiveQueryClient;
11501
11522
  var DefaultLiveQueryController = {
11502
- setDefaultLiveQueryClient: function (liveQueryClient
11523
+ setDefaultLiveQueryClient: function setDefaultLiveQueryClient(liveQueryClient
11503
11524
  /*: LiveQueryClient*/
11504
11525
  ) {
11505
11526
  defaultLiveQueryClient = liveQueryClient;
11506
11527
  },
11507
- getDefaultLiveQueryClient: function ()
11528
+ getDefaultLiveQueryClient: function getDefaultLiveQueryClient()
11508
11529
  /*: Promise<LiveQueryClient>*/
11509
11530
  {
11510
11531
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
11511
11532
  var _yield$Promise$all, _yield$Promise$all2, currentUser, installationId, sessionToken, liveQueryServerURL, serverURL, protocol, host, applicationId, javascriptKey, masterKey;
11512
11533
 
11513
- return _regeneratorRuntime().wrap(function (_context3) {
11534
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
11514
11535
  while (1) {
11515
11536
  switch (_context3.prev = _context3.next) {
11516
11537
  case 0:
@@ -11581,7 +11602,7 @@ var DefaultLiveQueryController = {
11581
11602
  }, _callee3);
11582
11603
  }))();
11583
11604
  },
11584
- _clearCachedDefaultClient: function () {
11605
+ _clearCachedDefaultClient: function _clearCachedDefaultClient() {
11585
11606
  defaultLiveQueryClient = null;
11586
11607
  }
11587
11608
  };
@@ -13530,7 +13551,7 @@ var ParseObject = /*#__PURE__*/function () {
13530
13551
  /*:: ?: RequestOptions*/
13531
13552
  ) {
13532
13553
  var query;
13533
- return _regeneratorRuntime().wrap(function (_context) {
13554
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
13534
13555
  while (1) {
13535
13556
  switch (_context.prev = _context.next) {
13536
13557
  case 0:
@@ -13572,9 +13593,11 @@ var ParseObject = /*#__PURE__*/function () {
13572
13593
  }, _callee, this, [[2, 9]]);
13573
13594
  }));
13574
13595
 
13575
- return function () {
13596
+ function exists(_x) {
13576
13597
  return _exists.apply(this, arguments);
13577
- };
13598
+ }
13599
+
13600
+ return exists;
13578
13601
  }()
13579
13602
  /**
13580
13603
  * Checks if the model is currently in a valid state.
@@ -13584,7 +13607,7 @@ var ParseObject = /*#__PURE__*/function () {
13584
13607
 
13585
13608
  }, {
13586
13609
  key: "isValid",
13587
- value: function ()
13610
+ value: function isValid()
13588
13611
  /*: boolean*/
13589
13612
  {
13590
13613
  return !this.validate(this.attributes);
@@ -13602,7 +13625,7 @@ var ParseObject = /*#__PURE__*/function () {
13602
13625
 
13603
13626
  }, {
13604
13627
  key: "validate",
13605
- value: function (attrs
13628
+ value: function validate(attrs
13606
13629
  /*: AttributeMap*/
13607
13630
  )
13608
13631
  /*: ParseError | boolean*/
@@ -13628,7 +13651,7 @@ var ParseObject = /*#__PURE__*/function () {
13628
13651
 
13629
13652
  }, {
13630
13653
  key: "getACL",
13631
- value: function ()
13654
+ value: function getACL()
13632
13655
  /*: ?ParseACL*/
13633
13656
  {
13634
13657
  var acl = this.get('ACL');
@@ -13650,7 +13673,7 @@ var ParseObject = /*#__PURE__*/function () {
13650
13673
 
13651
13674
  }, {
13652
13675
  key: "setACL",
13653
- value: function (acl
13676
+ value: function setACL(acl
13654
13677
  /*: ParseACL*/
13655
13678
  , options
13656
13679
  /*:: ?: mixed*/
@@ -13667,7 +13690,7 @@ var ParseObject = /*#__PURE__*/function () {
13667
13690
 
13668
13691
  }, {
13669
13692
  key: "revert",
13670
- value: function ()
13693
+ value: function revert()
13671
13694
  /*: void*/
13672
13695
  {
13673
13696
  var keysToRevert;
@@ -13709,7 +13732,7 @@ var ParseObject = /*#__PURE__*/function () {
13709
13732
 
13710
13733
  }, {
13711
13734
  key: "clear",
13712
- value: function ()
13735
+ value: function clear()
13713
13736
  /*: ParseObject | boolean*/
13714
13737
  {
13715
13738
  var attributes = this.attributes;
@@ -13750,7 +13773,7 @@ var ParseObject = /*#__PURE__*/function () {
13750
13773
 
13751
13774
  }, {
13752
13775
  key: "fetch",
13753
- value: function (options
13776
+ value: function fetch(options
13754
13777
  /*: RequestOptions*/
13755
13778
  )
13756
13779
  /*: Promise*/
@@ -13815,7 +13838,7 @@ var ParseObject = /*#__PURE__*/function () {
13815
13838
 
13816
13839
  }, {
13817
13840
  key: "fetchWithInclude",
13818
- value: function (keys
13841
+ value: function fetchWithInclude(keys
13819
13842
  /*: String | Array<string | Array<string>>*/
13820
13843
  , options
13821
13844
  /*: RequestOptions*/
@@ -13857,7 +13880,7 @@ var ParseObject = /*#__PURE__*/function () {
13857
13880
  var _saveEventually = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(options
13858
13881
  /*: SaveOptions*/
13859
13882
  ) {
13860
- return _regeneratorRuntime().wrap(function (_context4) {
13883
+ return _regeneratorRuntime().wrap(function _callee2$(_context4) {
13861
13884
  while (1) {
13862
13885
  switch (_context4.prev = _context4.next) {
13863
13886
  case 0:
@@ -13895,9 +13918,11 @@ var ParseObject = /*#__PURE__*/function () {
13895
13918
  }, _callee2, this, [[0, 5]]);
13896
13919
  }));
13897
13920
 
13898
- return function () {
13921
+ function saveEventually(_x2) {
13899
13922
  return _saveEventually.apply(this, arguments);
13900
- };
13923
+ }
13924
+
13925
+ return saveEventually;
13901
13926
  }()
13902
13927
  /**
13903
13928
  * Set a hash of model attributes, and save the model to the server.
@@ -13965,7 +13990,7 @@ var ParseObject = /*#__PURE__*/function () {
13965
13990
 
13966
13991
  }, {
13967
13992
  key: "save",
13968
- value: function (arg1
13993
+ value: function save(arg1
13969
13994
  /*: ?string | { [attr: string]: mixed }*/
13970
13995
  , arg2
13971
13996
  /*: SaveOptions | mixed*/
@@ -13974,6 +13999,8 @@ var ParseObject = /*#__PURE__*/function () {
13974
13999
  )
13975
14000
  /*: Promise*/
13976
14001
  {
14002
+ var _this = this;
14003
+
13977
14004
  var attrs;
13978
14005
  var options;
13979
14006
 
@@ -14022,7 +14049,7 @@ var ParseObject = /*#__PURE__*/function () {
14022
14049
 
14023
14050
  var unsaved = options.cascadeSave !== false ? (0, _unsavedChildren.default)(this) : null;
14024
14051
  return controller.save(unsaved, saveOptions).then(function () {
14025
- return controller.save(this, saveOptions);
14052
+ return controller.save(_this, saveOptions);
14026
14053
  });
14027
14054
  }
14028
14055
  /**
@@ -14054,7 +14081,7 @@ var ParseObject = /*#__PURE__*/function () {
14054
14081
  var _destroyEventually = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(options
14055
14082
  /*: RequestOptions*/
14056
14083
  ) {
14057
- return _regeneratorRuntime().wrap(function (_context5) {
14084
+ return _regeneratorRuntime().wrap(function _callee3$(_context5) {
14058
14085
  while (1) {
14059
14086
  switch (_context5.prev = _context5.next) {
14060
14087
  case 0:
@@ -14092,9 +14119,11 @@ var ParseObject = /*#__PURE__*/function () {
14092
14119
  }, _callee3, this, [[0, 5]]);
14093
14120
  }));
14094
14121
 
14095
- return function () {
14122
+ function destroyEventually(_x3) {
14096
14123
  return _destroyEventually.apply(this, arguments);
14097
- };
14124
+ }
14125
+
14126
+ return destroyEventually;
14098
14127
  }()
14099
14128
  /**
14100
14129
  * Destroy this model on the server if it was already persisted.
@@ -14113,7 +14142,7 @@ var ParseObject = /*#__PURE__*/function () {
14113
14142
 
14114
14143
  }, {
14115
14144
  key: "destroy",
14116
- value: function (options
14145
+ value: function destroy(options
14117
14146
  /*: RequestOptions*/
14118
14147
  )
14119
14148
  /*: Promise*/
@@ -14158,7 +14187,7 @@ var ParseObject = /*#__PURE__*/function () {
14158
14187
 
14159
14188
  }, {
14160
14189
  key: "pin",
14161
- value: function ()
14190
+ value: function pin()
14162
14191
  /*: Promise<void>*/
14163
14192
  {
14164
14193
  return ParseObject.pinAllWithName(_LocalDatastoreUtils.DEFAULT_PIN, [this]);
@@ -14176,7 +14205,7 @@ var ParseObject = /*#__PURE__*/function () {
14176
14205
 
14177
14206
  }, {
14178
14207
  key: "unPin",
14179
- value: function ()
14208
+ value: function unPin()
14180
14209
  /*: Promise<void>*/
14181
14210
  {
14182
14211
  return ParseObject.unPinAllWithName(_LocalDatastoreUtils.DEFAULT_PIN, [this]);
@@ -14196,7 +14225,7 @@ var ParseObject = /*#__PURE__*/function () {
14196
14225
  value: function () {
14197
14226
  var _isPinned = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
14198
14227
  var localDatastore, objectKey, pin;
14199
- return _regeneratorRuntime().wrap(function (_context6) {
14228
+ return _regeneratorRuntime().wrap(function _callee4$(_context6) {
14200
14229
  while (1) {
14201
14230
  switch (_context6.prev = _context6.next) {
14202
14231
  case 0:
@@ -14226,9 +14255,11 @@ var ParseObject = /*#__PURE__*/function () {
14226
14255
  }, _callee4, this);
14227
14256
  }));
14228
14257
 
14229
- return function () {
14258
+ function isPinned() {
14230
14259
  return _isPinned.apply(this, arguments);
14231
- };
14260
+ }
14261
+
14262
+ return isPinned;
14232
14263
  }()
14233
14264
  /**
14234
14265
  * Asynchronously stores the objects and every object they point to in the local datastore, recursively.
@@ -14249,7 +14280,7 @@ var ParseObject = /*#__PURE__*/function () {
14249
14280
 
14250
14281
  }, {
14251
14282
  key: "pinWithName",
14252
- value: function (name
14283
+ value: function pinWithName(name
14253
14284
  /*: string*/
14254
14285
  )
14255
14286
  /*: Promise<void>*/
@@ -14269,7 +14300,7 @@ var ParseObject = /*#__PURE__*/function () {
14269
14300
 
14270
14301
  }, {
14271
14302
  key: "unPinWithName",
14272
- value: function (name
14303
+ value: function unPinWithName(name
14273
14304
  /*: string*/
14274
14305
  )
14275
14306
  /*: Promise<void>*/
@@ -14294,7 +14325,7 @@ var ParseObject = /*#__PURE__*/function () {
14294
14325
  value: function () {
14295
14326
  var _fetchFromLocalDatastore = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
14296
14327
  var localDatastore, objectKey, pinned, result;
14297
- return _regeneratorRuntime().wrap(function (_context7) {
14328
+ return _regeneratorRuntime().wrap(function _callee5$(_context7) {
14298
14329
  while (1) {
14299
14330
  switch (_context7.prev = _context7.next) {
14300
14331
  case 0:
@@ -14337,20 +14368,22 @@ var ParseObject = /*#__PURE__*/function () {
14337
14368
  }, _callee5, this);
14338
14369
  }));
14339
14370
 
14340
- return function () {
14371
+ function fetchFromLocalDatastore() {
14341
14372
  return _fetchFromLocalDatastore.apply(this, arguments);
14342
- };
14373
+ }
14374
+
14375
+ return fetchFromLocalDatastore;
14343
14376
  }()
14344
14377
  /** Static methods **/
14345
14378
 
14346
14379
  }], [{
14347
14380
  key: "_getClassMap",
14348
- value: function () {
14381
+ value: function _getClassMap() {
14349
14382
  return classMap;
14350
14383
  }
14351
14384
  }, {
14352
14385
  key: "_clearAllState",
14353
- value: function () {
14386
+ value: function _clearAllState() {
14354
14387
  var stateController = _CoreManager.default.getObjectStateController();
14355
14388
 
14356
14389
  stateController.clearAllState();
@@ -14384,7 +14417,7 @@ var ParseObject = /*#__PURE__*/function () {
14384
14417
 
14385
14418
  }, {
14386
14419
  key: "fetchAll",
14387
- value: function (list
14420
+ value: function fetchAll(list
14388
14421
  /*: Array<ParseObject>*/
14389
14422
  ) {
14390
14423
  var options
@@ -14438,7 +14471,7 @@ var ParseObject = /*#__PURE__*/function () {
14438
14471
 
14439
14472
  }, {
14440
14473
  key: "fetchAllWithInclude",
14441
- value: function (list
14474
+ value: function fetchAllWithInclude(list
14442
14475
  /*: Array<ParseObject>*/
14443
14476
  , keys
14444
14477
  /*: String | Array<string | Array<string>>*/
@@ -14482,7 +14515,7 @@ var ParseObject = /*#__PURE__*/function () {
14482
14515
 
14483
14516
  }, {
14484
14517
  key: "fetchAllIfNeededWithInclude",
14485
- value: function (list
14518
+ value: function fetchAllIfNeededWithInclude(list
14486
14519
  /*: Array<ParseObject>*/
14487
14520
  , keys
14488
14521
  /*: String | Array<string | Array<string>>*/
@@ -14514,7 +14547,7 @@ var ParseObject = /*#__PURE__*/function () {
14514
14547
 
14515
14548
  }, {
14516
14549
  key: "fetchAllIfNeeded",
14517
- value: function (list
14550
+ value: function fetchAllIfNeeded(list
14518
14551
  /*: Array<ParseObject>*/
14519
14552
  , options) {
14520
14553
  options = options || {};
@@ -14536,7 +14569,7 @@ var ParseObject = /*#__PURE__*/function () {
14536
14569
  }
14537
14570
  }, {
14538
14571
  key: "handleIncludeOptions",
14539
- value: function (options) {
14572
+ value: function handleIncludeOptions(options) {
14540
14573
  var include = [];
14541
14574
 
14542
14575
  if ((0, _isArray.default)(options.include)) {
@@ -14604,7 +14637,7 @@ var ParseObject = /*#__PURE__*/function () {
14604
14637
 
14605
14638
  }, {
14606
14639
  key: "destroyAll",
14607
- value: function (list
14640
+ value: function destroyAll(list
14608
14641
  /*: Array<ParseObject>*/
14609
14642
  ) {
14610
14643
  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
@@ -14649,7 +14682,7 @@ var ParseObject = /*#__PURE__*/function () {
14649
14682
 
14650
14683
  }, {
14651
14684
  key: "saveAll",
14652
- value: function (list
14685
+ value: function saveAll(list
14653
14686
  /*: Array<ParseObject>*/
14654
14687
  ) {
14655
14688
  var options
@@ -14692,7 +14725,7 @@ var ParseObject = /*#__PURE__*/function () {
14692
14725
 
14693
14726
  }, {
14694
14727
  key: "createWithoutData",
14695
- value: function (id
14728
+ value: function createWithoutData(id
14696
14729
  /*: string*/
14697
14730
  ) {
14698
14731
  var obj = new this();
@@ -14712,7 +14745,7 @@ var ParseObject = /*#__PURE__*/function () {
14712
14745
 
14713
14746
  }, {
14714
14747
  key: "fromJSON",
14715
- value: function (json
14748
+ value: function fromJSON(json
14716
14749
  /*: any*/
14717
14750
  , override
14718
14751
  /*:: ?: boolean*/
@@ -14776,7 +14809,7 @@ var ParseObject = /*#__PURE__*/function () {
14776
14809
 
14777
14810
  }, {
14778
14811
  key: "registerSubclass",
14779
- value: function (className
14812
+ value: function registerSubclass(className
14780
14813
  /*: string*/
14781
14814
  , constructor
14782
14815
  /*: any*/
@@ -14807,7 +14840,7 @@ var ParseObject = /*#__PURE__*/function () {
14807
14840
 
14808
14841
  }, {
14809
14842
  key: "unregisterSubclass",
14810
- value: function (className
14843
+ value: function unregisterSubclass(className
14811
14844
  /*: string*/
14812
14845
  ) {
14813
14846
  if (typeof className !== 'string') {
@@ -14856,7 +14889,7 @@ var ParseObject = /*#__PURE__*/function () {
14856
14889
 
14857
14890
  }, {
14858
14891
  key: "extend",
14859
- value: function (className
14892
+ value: function extend(className
14860
14893
  /*: any*/
14861
14894
  , protoProps
14862
14895
  /*: any*/
@@ -14885,7 +14918,7 @@ var ParseObject = /*#__PURE__*/function () {
14885
14918
  parentProto = classMap[adjustedClassName].prototype;
14886
14919
  }
14887
14920
 
14888
- var ParseObjectSubclass = function (attributes, options) {
14921
+ var ParseObjectSubclass = function ParseObjectSubclass(attributes, options) {
14889
14922
  this.className = adjustedClassName;
14890
14923
  this._objCount = objectCount++; // Enable legacy initializers
14891
14924
 
@@ -14960,7 +14993,7 @@ var ParseObject = /*#__PURE__*/function () {
14960
14993
 
14961
14994
  }, {
14962
14995
  key: "enableSingleInstance",
14963
- value: function () {
14996
+ value: function enableSingleInstance() {
14964
14997
  singleInstance = true;
14965
14998
 
14966
14999
  _CoreManager.default.setObjectStateController(SingleInstanceStateController);
@@ -14976,7 +15009,7 @@ var ParseObject = /*#__PURE__*/function () {
14976
15009
 
14977
15010
  }, {
14978
15011
  key: "disableSingleInstance",
14979
- value: function () {
15012
+ value: function disableSingleInstance() {
14980
15013
  singleInstance = false;
14981
15014
 
14982
15015
  _CoreManager.default.setObjectStateController(UniqueInstanceStateController);
@@ -15002,7 +15035,7 @@ var ParseObject = /*#__PURE__*/function () {
15002
15035
 
15003
15036
  }, {
15004
15037
  key: "pinAll",
15005
- value: function (objects
15038
+ value: function pinAll(objects
15006
15039
  /*: Array<ParseObject>*/
15007
15040
  )
15008
15041
  /*: Promise<void>*/
@@ -15036,7 +15069,7 @@ var ParseObject = /*#__PURE__*/function () {
15036
15069
 
15037
15070
  }, {
15038
15071
  key: "pinAllWithName",
15039
- value: function (name
15072
+ value: function pinAllWithName(name
15040
15073
  /*: string*/
15041
15074
  , objects
15042
15075
  /*: Array<ParseObject>*/
@@ -15066,7 +15099,7 @@ var ParseObject = /*#__PURE__*/function () {
15066
15099
 
15067
15100
  }, {
15068
15101
  key: "unPinAll",
15069
- value: function (objects
15102
+ value: function unPinAll(objects
15070
15103
  /*: Array<ParseObject>*/
15071
15104
  )
15072
15105
  /*: Promise<void>*/
@@ -15094,7 +15127,7 @@ var ParseObject = /*#__PURE__*/function () {
15094
15127
 
15095
15128
  }, {
15096
15129
  key: "unPinAllWithName",
15097
- value: function (name
15130
+ value: function unPinAllWithName(name
15098
15131
  /*: string*/
15099
15132
  , objects
15100
15133
  /*: Array<ParseObject>*/
@@ -15122,7 +15155,7 @@ var ParseObject = /*#__PURE__*/function () {
15122
15155
 
15123
15156
  }, {
15124
15157
  key: "unPinAllObjects",
15125
- value: function ()
15158
+ value: function unPinAllObjects()
15126
15159
  /*: Promise<void>*/
15127
15160
  {
15128
15161
  var localDatastore = _CoreManager.default.getLocalDatastore();
@@ -15148,7 +15181,7 @@ var ParseObject = /*#__PURE__*/function () {
15148
15181
 
15149
15182
  }, {
15150
15183
  key: "unPinAllObjectsWithName",
15151
- value: function (name
15184
+ value: function unPinAllObjectsWithName(name
15152
15185
  /*: string*/
15153
15186
  )
15154
15187
  /*: Promise<void>*/
@@ -15166,7 +15199,7 @@ var ParseObject = /*#__PURE__*/function () {
15166
15199
  }();
15167
15200
 
15168
15201
  var DefaultController = {
15169
- fetch: function (target
15202
+ fetch: function fetch(target
15170
15203
  /*: ParseObject | Array<ParseObject>*/
15171
15204
  , forceFetch
15172
15205
  /*: boolean*/
@@ -15228,7 +15261,7 @@ var DefaultController = {
15228
15261
  var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(objects) {
15229
15262
  var idMap, i, obj, _i, _obj, id, _iterator2, _step2, object;
15230
15263
 
15231
- return _regeneratorRuntime().wrap(function (_context9) {
15264
+ return _regeneratorRuntime().wrap(function _callee6$(_context9) {
15232
15265
  while (1) {
15233
15266
  switch (_context9.prev = _context9.next) {
15234
15267
  case 0:
@@ -15326,7 +15359,7 @@ var DefaultController = {
15326
15359
  }, _callee6, null, [[13, 23, 26, 29]]);
15327
15360
  }));
15328
15361
 
15329
- return function () {
15362
+ return function (_x4) {
15330
15363
  return _ref.apply(this, arguments);
15331
15364
  };
15332
15365
  }());
@@ -15345,7 +15378,7 @@ var DefaultController = {
15345
15378
 
15346
15379
  return RESTController.request('GET', 'classes/' + target.className + '/' + target._getId(), params, options).then( /*#__PURE__*/function () {
15347
15380
  var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(response) {
15348
- return _regeneratorRuntime().wrap(function (_context10) {
15381
+ return _regeneratorRuntime().wrap(function _callee7$(_context10) {
15349
15382
  while (1) {
15350
15383
  switch (_context10.prev = _context10.next) {
15351
15384
  case 0:
@@ -15369,7 +15402,7 @@ var DefaultController = {
15369
15402
  }, _callee7);
15370
15403
  }));
15371
15404
 
15372
- return function () {
15405
+ return function (_x5) {
15373
15406
  return _ref2.apply(this, arguments);
15374
15407
  };
15375
15408
  }());
@@ -15377,7 +15410,7 @@ var DefaultController = {
15377
15410
 
15378
15411
  return _promise.default.resolve();
15379
15412
  },
15380
- destroy: function (target
15413
+ destroy: function destroy(target
15381
15414
  /*: ParseObject | Array<ParseObject>*/
15382
15415
  , options
15383
15416
  /*: RequestOptions*/
@@ -15386,7 +15419,7 @@ var DefaultController = {
15386
15419
  {
15387
15420
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10() {
15388
15421
  var batchSize, localDatastore, RESTController, batches, deleteCompleted, errors;
15389
- return _regeneratorRuntime().wrap(function (_context13) {
15422
+ return _regeneratorRuntime().wrap(function _callee10$(_context13) {
15390
15423
  while (1) {
15391
15424
  switch (_context13.prev = _context13.next) {
15392
15425
  case 0:
@@ -15451,7 +15484,7 @@ var DefaultController = {
15451
15484
  return _context13.abrupt("return", deleteCompleted.then( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {
15452
15485
  var aggregate, _iterator3, _step3, object;
15453
15486
 
15454
- return _regeneratorRuntime().wrap(function (_context11) {
15487
+ return _regeneratorRuntime().wrap(function _callee8$(_context11) {
15455
15488
  while (1) {
15456
15489
  switch (_context11.prev = _context11.next) {
15457
15490
  case 0:
@@ -15519,7 +15552,7 @@ var DefaultController = {
15519
15552
  }
15520
15553
 
15521
15554
  return _context13.abrupt("return", RESTController.request('DELETE', 'classes/' + target.className + '/' + target._getId(), {}, options).then( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9() {
15522
- return _regeneratorRuntime().wrap(function (_context12) {
15555
+ return _regeneratorRuntime().wrap(function _callee9$(_context12) {
15523
15556
  while (1) {
15524
15557
  switch (_context12.prev = _context12.next) {
15525
15558
  case 0:
@@ -15548,7 +15581,7 @@ var DefaultController = {
15548
15581
  }, _callee10);
15549
15582
  }))();
15550
15583
  },
15551
- save: function (target
15584
+ save: function save(target
15552
15585
  /*: ParseObject | Array<ParseObject | ParseFile>*/
15553
15586
  , options
15554
15587
  /*: RequestOptions*/
@@ -15627,8 +15660,8 @@ var DefaultController = {
15627
15660
  (0, _forEach.default)(batch).call(batch, function (obj, index) {
15628
15661
  var ready = new _promiseUtils.resolvingPromise();
15629
15662
  batchReady.push(ready);
15630
- stateController.pushPendingState(obj._getStateIdentifier());
15631
- batchTasks.push(stateController.enqueueTask(obj._getStateIdentifier(), function () {
15663
+
15664
+ var task = function task() {
15632
15665
  ready.resolve();
15633
15666
  return batchReturned.then(function (responses) {
15634
15667
  if (responses[index].hasOwnProperty('success')) {
@@ -15649,7 +15682,10 @@ var DefaultController = {
15649
15682
  obj._handleSaveError();
15650
15683
  }
15651
15684
  });
15652
- }));
15685
+ };
15686
+
15687
+ stateController.pushPendingState(obj._getStateIdentifier());
15688
+ batchTasks.push(stateController.enqueueTask(obj._getStateIdentifier(), task));
15653
15689
  });
15654
15690
  (0, _promiseUtils.when)(batchReady).then(function () {
15655
15691
  // Kick off the batch request
@@ -15668,7 +15704,7 @@ var DefaultController = {
15668
15704
  }).then( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11() {
15669
15705
  var _iterator4, _step4, object;
15670
15706
 
15671
- return _regeneratorRuntime().wrap(function (_context14) {
15707
+ return _regeneratorRuntime().wrap(function _callee11$(_context14) {
15672
15708
  while (1) {
15673
15709
  switch (_context14.prev = _context14.next) {
15674
15710
  case 0:
@@ -15743,7 +15779,7 @@ var DefaultController = {
15743
15779
 
15744
15780
  var targetCopy = target;
15745
15781
 
15746
- var task = function () {
15782
+ var task = function task() {
15747
15783
  var params = targetCopy._getSaveParams();
15748
15784
 
15749
15785
  return RESTController.request(params.method, params.path, params.body, options).then(function (response) {
@@ -15760,7 +15796,7 @@ var DefaultController = {
15760
15796
 
15761
15797
  stateController.pushPendingState(target._getStateIdentifier());
15762
15798
  return stateController.enqueueTask(target._getStateIdentifier(), task).then( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12() {
15763
- return _regeneratorRuntime().wrap(function (_context15) {
15799
+ return _regeneratorRuntime().wrap(function _callee12$(_context15) {
15764
15800
  while (1) {
15765
15801
  switch (_context15.prev = _context15.next) {
15766
15802
  case 0:
@@ -16577,10 +16613,12 @@ var RelationOp = /*#__PURE__*/function (_Op7) {
16577
16613
  value: function ()
16578
16614
  /*: { __op?: string, objects?: mixed, ops?: mixed }*/
16579
16615
  {
16616
+ var _this7 = this;
16617
+
16580
16618
  var idToPointer = function (id) {
16581
16619
  return {
16582
16620
  __type: 'Pointer',
16583
- className: this._targetClassName,
16621
+ className: _this7._targetClassName,
16584
16622
  objectId: id
16585
16623
  };
16586
16624
  };
@@ -17786,9 +17824,11 @@ var ParseQuery = /*#__PURE__*/function () {
17786
17824
  }, _callee, this);
17787
17825
  }));
17788
17826
 
17789
- return function () {
17827
+ function _handleOfflineQuery() {
17790
17828
  return _handleOfflineQuery2.apply(this, arguments);
17791
- };
17829
+ }
17830
+
17831
+ return _handleOfflineQuery;
17792
17832
  }()
17793
17833
  /**
17794
17834
  * Returns a JSON representation of this query.
@@ -18134,7 +18174,7 @@ var ParseQuery = /*#__PURE__*/function () {
18134
18174
  /*:: ?: BatchOptions*/
18135
18175
  ) {
18136
18176
  var result;
18137
- return _regeneratorRuntime().wrap(function (_context7) {
18177
+ return _regeneratorRuntime().wrap(function _callee2$(_context7) {
18138
18178
  while (1) {
18139
18179
  switch (_context7.prev = _context7.next) {
18140
18180
  case 0:
@@ -18161,9 +18201,11 @@ var ParseQuery = /*#__PURE__*/function () {
18161
18201
  }, _callee2, this);
18162
18202
  }));
18163
18203
 
18164
- return function () {
18204
+ function findAll(_x2) {
18165
18205
  return _findAll.apply(this, arguments);
18166
- };
18206
+ }
18207
+
18208
+ return findAll;
18167
18209
  }()
18168
18210
  /**
18169
18211
  * Counts the number of objects that match this query.
@@ -18182,7 +18224,7 @@ var ParseQuery = /*#__PURE__*/function () {
18182
18224
 
18183
18225
  }, {
18184
18226
  key: "count",
18185
- value: function (options
18227
+ value: function count(options
18186
18228
  /*:: ?: FullOptions*/
18187
18229
  )
18188
18230
  /*: Promise<number>*/
@@ -18224,7 +18266,7 @@ var ParseQuery = /*#__PURE__*/function () {
18224
18266
 
18225
18267
  }, {
18226
18268
  key: "distinct",
18227
- value: function (key
18269
+ value: function distinct(key
18228
18270
  /*: string*/
18229
18271
  , options
18230
18272
  /*:: ?: FullOptions*/
@@ -18266,7 +18308,7 @@ var ParseQuery = /*#__PURE__*/function () {
18266
18308
 
18267
18309
  }, {
18268
18310
  key: "aggregate",
18269
- value: function (pipeline
18311
+ value: function aggregate(pipeline
18270
18312
  /*: mixed*/
18271
18313
  , options
18272
18314
  /*:: ?: FullOptions*/
@@ -18329,11 +18371,13 @@ var ParseQuery = /*#__PURE__*/function () {
18329
18371
 
18330
18372
  }, {
18331
18373
  key: "first",
18332
- value: function (options
18374
+ value: function first(options
18333
18375
  /*:: ?: FullOptions*/
18334
18376
  )
18335
18377
  /*: Promise<ParseObject | void>*/
18336
18378
  {
18379
+ var _this4 = this;
18380
+
18337
18381
  options = options || {};
18338
18382
  var findOptions = {};
18339
18383
 
@@ -18375,7 +18419,7 @@ var ParseQuery = /*#__PURE__*/function () {
18375
18419
  }
18376
18420
 
18377
18421
  if (!objects[0].className) {
18378
- objects[0].className = this.className;
18422
+ objects[0].className = _this4.className;
18379
18423
  } // Make sure the data object contains keys for all objects that
18380
18424
  // have been requested with a select, so that our cached state
18381
18425
  // updates correctly.
@@ -18416,7 +18460,7 @@ var ParseQuery = /*#__PURE__*/function () {
18416
18460
 
18417
18461
  }, {
18418
18462
  key: "eachBatch",
18419
- value: function (callback
18463
+ value: function eachBatch(callback
18420
18464
  /*: (objs: Array<ParseObject>) => Promise<*>*/
18421
18465
  , options
18422
18466
  /*:: ?: BatchOptions*/
@@ -18428,7 +18472,8 @@ var ParseQuery = /*#__PURE__*/function () {
18428
18472
  options = options || {};
18429
18473
 
18430
18474
  if (this._order || this._skip || this._limit >= 0) {
18431
- return _promise.default.reject('Cannot iterate on a query with sort, skip, or limit.');
18475
+ var error = 'Cannot iterate on a query with sort, skip, or limit.';
18476
+ return _promise.default.reject(error);
18432
18477
  }
18433
18478
 
18434
18479
  var query = new ParseQuery(this.className);
@@ -18493,7 +18538,7 @@ var ParseQuery = /*#__PURE__*/function () {
18493
18538
  }, /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
18494
18539
  var _yield$Promise$all, _yield$Promise$all2, results;
18495
18540
 
18496
- return _regeneratorRuntime().wrap(function (_context10) {
18541
+ return _regeneratorRuntime().wrap(function _callee3$(_context10) {
18497
18542
  while (1) {
18498
18543
  switch (_context10.prev = _context10.next) {
18499
18544
  case 0:
@@ -18563,7 +18608,7 @@ var ParseQuery = /*#__PURE__*/function () {
18563
18608
 
18564
18609
  }, {
18565
18610
  key: "each",
18566
- value: function (callback
18611
+ value: function each(callback
18567
18612
  /*: (obj: ParseObject) => any*/
18568
18613
  , options
18569
18614
  /*:: ?: BatchOptions*/
@@ -18590,7 +18635,7 @@ var ParseQuery = /*#__PURE__*/function () {
18590
18635
 
18591
18636
  }, {
18592
18637
  key: "hint",
18593
- value: function (value
18638
+ value: function hint(value
18594
18639
  /*: mixed*/
18595
18640
  )
18596
18641
  /*: ParseQuery*/
@@ -18611,7 +18656,7 @@ var ParseQuery = /*#__PURE__*/function () {
18611
18656
 
18612
18657
  }, {
18613
18658
  key: "explain",
18614
- value: function ()
18659
+ value: function explain()
18615
18660
  /*: ParseQuery*/
18616
18661
  {
18617
18662
  var _explain
@@ -18657,8 +18702,10 @@ var ParseQuery = /*#__PURE__*/function () {
18657
18702
  , options
18658
18703
  /*:: ?: BatchOptions*/
18659
18704
  ) {
18705
+ var _this5 = this;
18706
+
18660
18707
  var array, index;
18661
- return _regeneratorRuntime().wrap(function (_context11) {
18708
+ return _regeneratorRuntime().wrap(function _callee4$(_context11) {
18662
18709
  while (1) {
18663
18710
  switch (_context11.prev = _context11.next) {
18664
18711
  case 0:
@@ -18666,7 +18713,7 @@ var ParseQuery = /*#__PURE__*/function () {
18666
18713
  index = 0;
18667
18714
  _context11.next = 4;
18668
18715
  return this.each(function (object) {
18669
- return _promise.default.resolve(callback(object, index, this)).then(function (result) {
18716
+ return _promise.default.resolve(callback(object, index, _this5)).then(function (result) {
18670
18717
  array.push(result);
18671
18718
  index += 1;
18672
18719
  });
@@ -18683,9 +18730,11 @@ var ParseQuery = /*#__PURE__*/function () {
18683
18730
  }, _callee4, this);
18684
18731
  }));
18685
18732
 
18686
- return function () {
18733
+ function map(_x3, _x4) {
18687
18734
  return _map.apply(this, arguments);
18688
- };
18735
+ }
18736
+
18737
+ return map;
18689
18738
  }()
18690
18739
  /**
18691
18740
  * Iterates over each result of a query, calling a callback for each one. If
@@ -18722,7 +18771,7 @@ var ParseQuery = /*#__PURE__*/function () {
18722
18771
  /*:: ?: BatchOptions*/
18723
18772
  ) {
18724
18773
  var accumulator, index;
18725
- return _regeneratorRuntime().wrap(function (_context12) {
18774
+ return _regeneratorRuntime().wrap(function _callee5$(_context12) {
18726
18775
  while (1) {
18727
18776
  switch (_context12.prev = _context12.next) {
18728
18777
  case 0:
@@ -18763,9 +18812,11 @@ var ParseQuery = /*#__PURE__*/function () {
18763
18812
  }, _callee5, this);
18764
18813
  }));
18765
18814
 
18766
- return function () {
18815
+ function reduce(_x5, _x6, _x7) {
18767
18816
  return _reduce.apply(this, arguments);
18768
- };
18817
+ }
18818
+
18819
+ return reduce;
18769
18820
  }()
18770
18821
  /**
18771
18822
  * Iterates over each result of a query, calling a callback for each one. If
@@ -18799,8 +18850,10 @@ var ParseQuery = /*#__PURE__*/function () {
18799
18850
  , options
18800
18851
  /*:: ?: BatchOptions*/
18801
18852
  ) {
18853
+ var _this6 = this;
18854
+
18802
18855
  var array, index;
18803
- return _regeneratorRuntime().wrap(function (_context13) {
18856
+ return _regeneratorRuntime().wrap(function _callee6$(_context13) {
18804
18857
  while (1) {
18805
18858
  switch (_context13.prev = _context13.next) {
18806
18859
  case 0:
@@ -18808,7 +18861,7 @@ var ParseQuery = /*#__PURE__*/function () {
18808
18861
  index = 0;
18809
18862
  _context13.next = 4;
18810
18863
  return this.each(function (object) {
18811
- return _promise.default.resolve(callback(object, index, this)).then(function (flag) {
18864
+ return _promise.default.resolve(callback(object, index, _this6)).then(function (flag) {
18812
18865
  if (flag) {
18813
18866
  array.push(object);
18814
18867
  }
@@ -18828,9 +18881,11 @@ var ParseQuery = /*#__PURE__*/function () {
18828
18881
  }, _callee6, this);
18829
18882
  }));
18830
18883
 
18831
- return function () {
18884
+ function filter(_x8, _x9) {
18832
18885
  return _filter.apply(this, arguments);
18833
- };
18886
+ }
18887
+
18888
+ return filter;
18834
18889
  }()
18835
18890
  /** Query Conditions **/
18836
18891
 
@@ -18845,13 +18900,15 @@ var ParseQuery = /*#__PURE__*/function () {
18845
18900
 
18846
18901
  }, {
18847
18902
  key: "equalTo",
18848
- value: function (key
18903
+ value: function equalTo(key
18849
18904
  /*: string | { [key: string]: any }*/
18850
18905
  , value
18851
18906
  /*: ?mixed*/
18852
18907
  )
18853
18908
  /*: ParseQuery*/
18854
18909
  {
18910
+ var _this7 = this;
18911
+
18855
18912
  if (key && (0, _typeof2.default)(key) === 'object') {
18856
18913
  var _context14;
18857
18914
 
@@ -18860,7 +18917,7 @@ var ParseQuery = /*#__PURE__*/function () {
18860
18917
  k = _ref3[0],
18861
18918
  val = _ref3[1];
18862
18919
 
18863
- return this.equalTo(k, val);
18920
+ return _this7.equalTo(k, val);
18864
18921
  });
18865
18922
  return this;
18866
18923
  }
@@ -18883,13 +18940,15 @@ var ParseQuery = /*#__PURE__*/function () {
18883
18940
 
18884
18941
  }, {
18885
18942
  key: "notEqualTo",
18886
- value: function (key
18943
+ value: function notEqualTo(key
18887
18944
  /*: string | { [key: string]: any }*/
18888
18945
  , value
18889
18946
  /*: ?mixed*/
18890
18947
  )
18891
18948
  /*: ParseQuery*/
18892
18949
  {
18950
+ var _this8 = this;
18951
+
18893
18952
  if (key && (0, _typeof2.default)(key) === 'object') {
18894
18953
  var _context15;
18895
18954
 
@@ -18898,7 +18957,7 @@ var ParseQuery = /*#__PURE__*/function () {
18898
18957
  k = _ref5[0],
18899
18958
  val = _ref5[1];
18900
18959
 
18901
- return this.notEqualTo(k, val);
18960
+ return _this8.notEqualTo(k, val);
18902
18961
  });
18903
18962
  return this;
18904
18963
  }
@@ -18916,7 +18975,7 @@ var ParseQuery = /*#__PURE__*/function () {
18916
18975
 
18917
18976
  }, {
18918
18977
  key: "lessThan",
18919
- value: function (key
18978
+ value: function lessThan(key
18920
18979
  /*: string*/
18921
18980
  , value
18922
18981
  /*: mixed*/
@@ -18936,7 +18995,7 @@ var ParseQuery = /*#__PURE__*/function () {
18936
18995
 
18937
18996
  }, {
18938
18997
  key: "greaterThan",
18939
- value: function (key
18998
+ value: function greaterThan(key
18940
18999
  /*: string*/
18941
19000
  , value
18942
19001
  /*: mixed*/
@@ -18956,7 +19015,7 @@ var ParseQuery = /*#__PURE__*/function () {
18956
19015
 
18957
19016
  }, {
18958
19017
  key: "lessThanOrEqualTo",
18959
- value: function (key
19018
+ value: function lessThanOrEqualTo(key
18960
19019
  /*: string*/
18961
19020
  , value
18962
19021
  /*: mixed*/
@@ -18976,7 +19035,7 @@ var ParseQuery = /*#__PURE__*/function () {
18976
19035
 
18977
19036
  }, {
18978
19037
  key: "greaterThanOrEqualTo",
18979
- value: function (key
19038
+ value: function greaterThanOrEqualTo(key
18980
19039
  /*: string*/
18981
19040
  , value
18982
19041
  /*: mixed*/
@@ -18996,7 +19055,7 @@ var ParseQuery = /*#__PURE__*/function () {
18996
19055
 
18997
19056
  }, {
18998
19057
  key: "containedIn",
18999
- value: function (key
19058
+ value: function containedIn(key
19000
19059
  /*: string*/
19001
19060
  , value
19002
19061
  /*: mixed*/
@@ -19016,7 +19075,7 @@ var ParseQuery = /*#__PURE__*/function () {
19016
19075
 
19017
19076
  }, {
19018
19077
  key: "notContainedIn",
19019
- value: function (key
19078
+ value: function notContainedIn(key
19020
19079
  /*: string*/
19021
19080
  , value
19022
19081
  /*: mixed*/
@@ -19036,7 +19095,7 @@ var ParseQuery = /*#__PURE__*/function () {
19036
19095
 
19037
19096
  }, {
19038
19097
  key: "containedBy",
19039
- value: function (key
19098
+ value: function containedBy(key
19040
19099
  /*: string*/
19041
19100
  , values
19042
19101
  /*: Array<mixed>*/
@@ -19056,7 +19115,7 @@ var ParseQuery = /*#__PURE__*/function () {
19056
19115
 
19057
19116
  }, {
19058
19117
  key: "containsAll",
19059
- value: function (key
19118
+ value: function containsAll(key
19060
19119
  /*: string*/
19061
19120
  , values
19062
19121
  /*: Array<mixed>*/
@@ -19076,20 +19135,22 @@ var ParseQuery = /*#__PURE__*/function () {
19076
19135
 
19077
19136
  }, {
19078
19137
  key: "containsAllStartingWith",
19079
- value: function (key
19138
+ value: function containsAllStartingWith(key
19080
19139
  /*: string*/
19081
19140
  , values
19082
19141
  /*: Array<string>*/
19083
19142
  )
19084
19143
  /*: ParseQuery*/
19085
19144
  {
19145
+ var _this = this;
19146
+
19086
19147
  if (!(0, _isArray.default)(values)) {
19087
19148
  values = [values];
19088
19149
  }
19089
19150
 
19090
19151
  var regexObject = (0, _map2.default)(values).call(values, function (value) {
19091
19152
  return {
19092
- $regex: this._regexStartWith(value)
19153
+ $regex: _this._regexStartWith(value)
19093
19154
  };
19094
19155
  });
19095
19156
  return this.containsAll(key, regexObject);
@@ -19103,7 +19164,7 @@ var ParseQuery = /*#__PURE__*/function () {
19103
19164
 
19104
19165
  }, {
19105
19166
  key: "exists",
19106
- value: function (key
19167
+ value: function exists(key
19107
19168
  /*: string*/
19108
19169
  )
19109
19170
  /*: ParseQuery*/
@@ -19119,7 +19180,7 @@ var ParseQuery = /*#__PURE__*/function () {
19119
19180
 
19120
19181
  }, {
19121
19182
  key: "doesNotExist",
19122
- value: function (key
19183
+ value: function doesNotExist(key
19123
19184
  /*: string*/
19124
19185
  )
19125
19186
  /*: ParseQuery*/
@@ -19139,7 +19200,7 @@ var ParseQuery = /*#__PURE__*/function () {
19139
19200
 
19140
19201
  }, {
19141
19202
  key: "matches",
19142
- value: function (key
19203
+ value: function matches(key
19143
19204
  /*: string*/
19144
19205
  , regex
19145
19206
  /*: RegExp*/
@@ -19180,7 +19241,7 @@ var ParseQuery = /*#__PURE__*/function () {
19180
19241
 
19181
19242
  }, {
19182
19243
  key: "matchesQuery",
19183
- value: function (key
19244
+ value: function matchesQuery(key
19184
19245
  /*: string*/
19185
19246
  , query
19186
19247
  /*: ParseQuery*/
@@ -19203,7 +19264,7 @@ var ParseQuery = /*#__PURE__*/function () {
19203
19264
 
19204
19265
  }, {
19205
19266
  key: "doesNotMatchQuery",
19206
- value: function (key
19267
+ value: function doesNotMatchQuery(key
19207
19268
  /*: string*/
19208
19269
  , query
19209
19270
  /*: ParseQuery*/
@@ -19228,7 +19289,7 @@ var ParseQuery = /*#__PURE__*/function () {
19228
19289
 
19229
19290
  }, {
19230
19291
  key: "matchesKeyInQuery",
19231
- value: function (key
19292
+ value: function matchesKeyInQuery(key
19232
19293
  /*: string*/
19233
19294
  , queryKey
19234
19295
  /*: string*/
@@ -19258,7 +19319,7 @@ var ParseQuery = /*#__PURE__*/function () {
19258
19319
 
19259
19320
  }, {
19260
19321
  key: "doesNotMatchKeyInQuery",
19261
- value: function (key
19322
+ value: function doesNotMatchKeyInQuery(key
19262
19323
  /*: string*/
19263
19324
  , queryKey
19264
19325
  /*: string*/
@@ -19285,7 +19346,7 @@ var ParseQuery = /*#__PURE__*/function () {
19285
19346
 
19286
19347
  }, {
19287
19348
  key: "contains",
19288
- value: function (key
19349
+ value: function contains(key
19289
19350
  /*: string*/
19290
19351
  , substring
19291
19352
  /*: string*/
@@ -19330,7 +19391,7 @@ var ParseQuery = /*#__PURE__*/function () {
19330
19391
 
19331
19392
  }, {
19332
19393
  key: "fullText",
19333
- value: function (key
19394
+ value: function fullText(key
19334
19395
  /*: string*/
19335
19396
  , value
19336
19397
  /*: string*/
@@ -19387,7 +19448,7 @@ var ParseQuery = /*#__PURE__*/function () {
19387
19448
 
19388
19449
  }, {
19389
19450
  key: "sortByTextScore",
19390
- value: function () {
19451
+ value: function sortByTextScore() {
19391
19452
  this.ascending('$score');
19392
19453
  this.select(['$score']);
19393
19454
  return this;
@@ -19405,7 +19466,7 @@ var ParseQuery = /*#__PURE__*/function () {
19405
19466
 
19406
19467
  }, {
19407
19468
  key: "startsWith",
19408
- value: function (key
19469
+ value: function startsWith(key
19409
19470
  /*: string*/
19410
19471
  , prefix
19411
19472
  /*: string*/
@@ -19432,7 +19493,7 @@ var ParseQuery = /*#__PURE__*/function () {
19432
19493
 
19433
19494
  }, {
19434
19495
  key: "endsWith",
19435
- value: function (key
19496
+ value: function endsWith(key
19436
19497
  /*: string*/
19437
19498
  , suffix
19438
19499
  /*: string*/
@@ -19458,7 +19519,7 @@ var ParseQuery = /*#__PURE__*/function () {
19458
19519
 
19459
19520
  }, {
19460
19521
  key: "near",
19461
- value: function (key
19522
+ value: function near(key
19462
19523
  /*: string*/
19463
19524
  , point
19464
19525
  /*: ParseGeoPoint*/
@@ -19487,7 +19548,7 @@ var ParseQuery = /*#__PURE__*/function () {
19487
19548
 
19488
19549
  }, {
19489
19550
  key: "withinRadians",
19490
- value: function (key
19551
+ value: function withinRadians(key
19491
19552
  /*: string*/
19492
19553
  , point
19493
19554
  /*: ParseGeoPoint*/
@@ -19523,7 +19584,7 @@ var ParseQuery = /*#__PURE__*/function () {
19523
19584
 
19524
19585
  }, {
19525
19586
  key: "withinMiles",
19526
- value: function (key
19587
+ value: function withinMiles(key
19527
19588
  /*: string*/
19528
19589
  , point
19529
19590
  /*: ParseGeoPoint*/
@@ -19552,7 +19613,7 @@ var ParseQuery = /*#__PURE__*/function () {
19552
19613
 
19553
19614
  }, {
19554
19615
  key: "withinKilometers",
19555
- value: function (key
19616
+ value: function withinKilometers(key
19556
19617
  /*: string*/
19557
19618
  , point
19558
19619
  /*: ParseGeoPoint*/
@@ -19580,7 +19641,7 @@ var ParseQuery = /*#__PURE__*/function () {
19580
19641
 
19581
19642
  }, {
19582
19643
  key: "withinGeoBox",
19583
- value: function (key
19644
+ value: function withinGeoBox(key
19584
19645
  /*: string*/
19585
19646
  , southwest
19586
19647
  /*: ParseGeoPoint*/
@@ -19617,7 +19678,7 @@ var ParseQuery = /*#__PURE__*/function () {
19617
19678
 
19618
19679
  }, {
19619
19680
  key: "withinPolygon",
19620
- value: function (key
19681
+ value: function withinPolygon(key
19621
19682
  /*: string*/
19622
19683
  , points
19623
19684
  /*: Array<Array<number>>*/
@@ -19639,7 +19700,7 @@ var ParseQuery = /*#__PURE__*/function () {
19639
19700
 
19640
19701
  }, {
19641
19702
  key: "polygonContains",
19642
- value: function (key
19703
+ value: function polygonContains(key
19643
19704
  /*: string*/
19644
19705
  , point
19645
19706
  /*: ParseGeoPoint*/
@@ -19662,7 +19723,7 @@ var ParseQuery = /*#__PURE__*/function () {
19662
19723
 
19663
19724
  }, {
19664
19725
  key: "ascending",
19665
- value: function ()
19726
+ value: function ascending()
19666
19727
  /*: ParseQuery*/
19667
19728
  {
19668
19729
  this._order = [];
@@ -19684,7 +19745,7 @@ var ParseQuery = /*#__PURE__*/function () {
19684
19745
 
19685
19746
  }, {
19686
19747
  key: "addAscending",
19687
- value: function ()
19748
+ value: function addAscending()
19688
19749
  /*: ParseQuery*/
19689
19750
  {
19690
19751
  var _this9 = this;
@@ -19718,7 +19779,7 @@ var ParseQuery = /*#__PURE__*/function () {
19718
19779
 
19719
19780
  }, {
19720
19781
  key: "descending",
19721
- value: function ()
19782
+ value: function descending()
19722
19783
  /*: ParseQuery*/
19723
19784
  {
19724
19785
  this._order = [];
@@ -19740,7 +19801,7 @@ var ParseQuery = /*#__PURE__*/function () {
19740
19801
 
19741
19802
  }, {
19742
19803
  key: "addDescending",
19743
- value: function ()
19804
+ value: function addDescending()
19744
19805
  /*: ParseQuery*/
19745
19806
  {
19746
19807
  var _this10 = this;
@@ -19779,7 +19840,7 @@ var ParseQuery = /*#__PURE__*/function () {
19779
19840
 
19780
19841
  }, {
19781
19842
  key: "skip",
19782
- value: function (n
19843
+ value: function skip(n
19783
19844
  /*: number*/
19784
19845
  )
19785
19846
  /*: ParseQuery*/
@@ -19800,7 +19861,7 @@ var ParseQuery = /*#__PURE__*/function () {
19800
19861
 
19801
19862
  }, {
19802
19863
  key: "limit",
19803
- value: function (n
19864
+ value: function limit(n
19804
19865
  /*: number*/
19805
19866
  )
19806
19867
  /*: ParseQuery*/
@@ -19824,7 +19885,7 @@ var ParseQuery = /*#__PURE__*/function () {
19824
19885
 
19825
19886
  }, {
19826
19887
  key: "withCount",
19827
- value: function ()
19888
+ value: function withCount()
19828
19889
  /*: ParseQuery*/
19829
19890
  {
19830
19891
  var includeCount
@@ -19852,7 +19913,7 @@ var ParseQuery = /*#__PURE__*/function () {
19852
19913
 
19853
19914
  }, {
19854
19915
  key: "include",
19855
- value: function ()
19916
+ value: function include()
19856
19917
  /*: ParseQuery*/
19857
19918
  {
19858
19919
  var _this11 = this;
@@ -19882,7 +19943,7 @@ var ParseQuery = /*#__PURE__*/function () {
19882
19943
 
19883
19944
  }, {
19884
19945
  key: "includeAll",
19885
- value: function ()
19946
+ value: function includeAll()
19886
19947
  /*: ParseQuery*/
19887
19948
  {
19888
19949
  return this.include('*');
@@ -19898,7 +19959,7 @@ var ParseQuery = /*#__PURE__*/function () {
19898
19959
 
19899
19960
  }, {
19900
19961
  key: "select",
19901
- value: function ()
19962
+ value: function select()
19902
19963
  /*: ParseQuery*/
19903
19964
  {
19904
19965
  var _this12 = this;
@@ -19934,7 +19995,7 @@ var ParseQuery = /*#__PURE__*/function () {
19934
19995
 
19935
19996
  }, {
19936
19997
  key: "exclude",
19937
- value: function ()
19998
+ value: function exclude()
19938
19999
  /*: ParseQuery*/
19939
20000
  {
19940
20001
  var _this13 = this;
@@ -19965,7 +20026,7 @@ var ParseQuery = /*#__PURE__*/function () {
19965
20026
 
19966
20027
  }, {
19967
20028
  key: "readPreference",
19968
- value: function (_readPreference
20029
+ value: function readPreference(_readPreference
19969
20030
  /*: string*/
19970
20031
  , includeReadPreference
19971
20032
  /*:: ?: string*/
@@ -19994,7 +20055,7 @@ var ParseQuery = /*#__PURE__*/function () {
19994
20055
  /*:: ?: string*/
19995
20056
  ) {
19996
20057
  var currentUser, liveQueryClient, subscription;
19997
- return _regeneratorRuntime().wrap(function (_context22) {
20058
+ return _regeneratorRuntime().wrap(function _callee7$(_context22) {
19998
20059
  while (1) {
19999
20060
  switch (_context22.prev = _context22.next) {
20000
20061
  case 0:
@@ -20031,9 +20092,11 @@ var ParseQuery = /*#__PURE__*/function () {
20031
20092
  }, _callee7, this);
20032
20093
  }));
20033
20094
 
20034
- return function () {
20095
+ function subscribe(_x10) {
20035
20096
  return _subscribe.apply(this, arguments);
20036
- };
20097
+ }
20098
+
20099
+ return subscribe;
20037
20100
  }()
20038
20101
  /**
20039
20102
  * Constructs a Parse.Query that is the OR of the passed in queries. For
@@ -20056,7 +20119,7 @@ var ParseQuery = /*#__PURE__*/function () {
20056
20119
  *
20057
20120
  * @returns {Parse.Query} Returns the query, so you can chain this call.
20058
20121
  */
20059
- function ()
20122
+ function fromNetwork()
20060
20123
  /*: ParseQuery*/
20061
20124
  {
20062
20125
  this._queriesLocalDatastore = false;
@@ -20071,7 +20134,7 @@ var ParseQuery = /*#__PURE__*/function () {
20071
20134
 
20072
20135
  }, {
20073
20136
  key: "fromLocalDatastore",
20074
- value: function ()
20137
+ value: function fromLocalDatastore()
20075
20138
  /*: ParseQuery*/
20076
20139
  {
20077
20140
  return this.fromPinWithName(null);
@@ -20084,7 +20147,7 @@ var ParseQuery = /*#__PURE__*/function () {
20084
20147
 
20085
20148
  }, {
20086
20149
  key: "fromPin",
20087
- value: function ()
20150
+ value: function fromPin()
20088
20151
  /*: ParseQuery*/
20089
20152
  {
20090
20153
  return this.fromPinWithName(_LocalDatastoreUtils.DEFAULT_PIN);
@@ -20098,7 +20161,7 @@ var ParseQuery = /*#__PURE__*/function () {
20098
20161
 
20099
20162
  }, {
20100
20163
  key: "fromPinWithName",
20101
- value: function (name
20164
+ value: function fromPinWithName(name
20102
20165
  /*:: ?: string*/
20103
20166
  )
20104
20167
  /*: ParseQuery*/
@@ -20120,9 +20183,11 @@ var ParseQuery = /*#__PURE__*/function () {
20120
20183
 
20121
20184
  }, {
20122
20185
  key: "cancel",
20123
- value: function ()
20186
+ value: function cancel()
20124
20187
  /*: ParseQuery*/
20125
20188
  {
20189
+ var _this14 = this;
20190
+
20126
20191
  if (this._xhrRequest.task && typeof this._xhrRequest.task.abort === 'function') {
20127
20192
  this._xhrRequest.task._aborted = true;
20128
20193
 
@@ -20136,12 +20201,12 @@ var ParseQuery = /*#__PURE__*/function () {
20136
20201
  }
20137
20202
 
20138
20203
  return this._xhrRequest.onchange = function () {
20139
- return this.cancel();
20204
+ return _this14.cancel();
20140
20205
  };
20141
20206
  }
20142
20207
  }, {
20143
20208
  key: "_setRequestTask",
20144
- value: function (options) {
20209
+ value: function _setRequestTask(options) {
20145
20210
  var _this15 = this;
20146
20211
 
20147
20212
  options.requestTask = function (task) {
@@ -20152,7 +20217,7 @@ var ParseQuery = /*#__PURE__*/function () {
20152
20217
  }
20153
20218
  }], [{
20154
20219
  key: "fromJSON",
20155
- value: function (className
20220
+ value: function fromJSON(className
20156
20221
  /*: string*/
20157
20222
  , json
20158
20223
  /*: QueryJSON*/
@@ -20164,7 +20229,7 @@ var ParseQuery = /*#__PURE__*/function () {
20164
20229
  }
20165
20230
  }, {
20166
20231
  key: "or",
20167
- value: function ()
20232
+ value: function or()
20168
20233
  /*: ParseQuery*/
20169
20234
  {
20170
20235
  for (var _len8 = arguments.length, queries = new Array(_len8), _key12 = 0; _key12 < _len8; _key12++) {
@@ -20194,7 +20259,7 @@ var ParseQuery = /*#__PURE__*/function () {
20194
20259
 
20195
20260
  }, {
20196
20261
  key: "and",
20197
- value: function ()
20262
+ value: function and()
20198
20263
  /*: ParseQuery*/
20199
20264
  {
20200
20265
  for (var _len9 = arguments.length, queries = new Array(_len9), _key13 = 0; _key13 < _len9; _key13++) {
@@ -20224,7 +20289,7 @@ var ParseQuery = /*#__PURE__*/function () {
20224
20289
 
20225
20290
  }, {
20226
20291
  key: "nor",
20227
- value: function ()
20292
+ value: function nor()
20228
20293
  /*: ParseQuery*/
20229
20294
  {
20230
20295
  for (var _len10 = arguments.length, queries = new Array(_len10), _key14 = 0; _key14 < _len10; _key14++) {
@@ -20244,7 +20309,7 @@ var ParseQuery = /*#__PURE__*/function () {
20244
20309
  }();
20245
20310
 
20246
20311
  var DefaultController = {
20247
- find: function (className
20312
+ find: function find(className
20248
20313
  /*: string*/
20249
20314
  , params
20250
20315
  /*: QueryJSON*/
@@ -20257,7 +20322,7 @@ var DefaultController = {
20257
20322
 
20258
20323
  return RESTController.request('GET', 'classes/' + className, params, options);
20259
20324
  },
20260
- aggregate: function (className
20325
+ aggregate: function aggregate(className
20261
20326
  /*: string*/
20262
20327
  , params
20263
20328
  /*: any*/
@@ -22486,7 +22551,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22486
22551
  value: function () {
22487
22552
  var _isCurrentAsync = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
22488
22553
  var current;
22489
- return _regeneratorRuntime().wrap(function (_context) {
22554
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
22490
22555
  while (1) {
22491
22556
  switch (_context.prev = _context.next) {
22492
22557
  case 0:
@@ -22505,9 +22570,11 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22505
22570
  }, _callee, this);
22506
22571
  }));
22507
22572
 
22508
- return function () {
22573
+ function isCurrentAsync() {
22509
22574
  return _isCurrentAsync.apply(this, arguments);
22510
- };
22575
+ }
22576
+
22577
+ return isCurrentAsync;
22511
22578
  }()
22512
22579
  /**
22513
22580
  * Returns get("username").
@@ -22517,7 +22584,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22517
22584
 
22518
22585
  }, {
22519
22586
  key: "getUsername",
22520
- value: function ()
22587
+ value: function getUsername()
22521
22588
  /*: ?string*/
22522
22589
  {
22523
22590
  var username = this.get('username');
@@ -22536,7 +22603,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22536
22603
 
22537
22604
  }, {
22538
22605
  key: "setUsername",
22539
- value: function (username
22606
+ value: function setUsername(username
22540
22607
  /*: string*/
22541
22608
  ) {
22542
22609
  // Strip anonymity
@@ -22557,7 +22624,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22557
22624
 
22558
22625
  }, {
22559
22626
  key: "setPassword",
22560
- value: function (password
22627
+ value: function setPassword(password
22561
22628
  /*: string*/
22562
22629
  ) {
22563
22630
  this.set('password', password);
@@ -22570,7 +22637,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22570
22637
 
22571
22638
  }, {
22572
22639
  key: "getEmail",
22573
- value: function ()
22640
+ value: function getEmail()
22574
22641
  /*: ?string*/
22575
22642
  {
22576
22643
  var email = this.get('email');
@@ -22590,7 +22657,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22590
22657
 
22591
22658
  }, {
22592
22659
  key: "setEmail",
22593
- value: function (email
22660
+ value: function setEmail(email
22594
22661
  /*: string*/
22595
22662
  ) {
22596
22663
  return this.set('email', email);
@@ -22605,7 +22672,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22605
22672
 
22606
22673
  }, {
22607
22674
  key: "getSessionToken",
22608
- value: function ()
22675
+ value: function getSessionToken()
22609
22676
  /*: ?string*/
22610
22677
  {
22611
22678
  var token = this.get('sessionToken');
@@ -22624,7 +22691,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22624
22691
 
22625
22692
  }, {
22626
22693
  key: "authenticated",
22627
- value: function ()
22694
+ value: function authenticated()
22628
22695
  /*: boolean*/
22629
22696
  {
22630
22697
  var current = ParseUser.current();
@@ -22646,7 +22713,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22646
22713
 
22647
22714
  }, {
22648
22715
  key: "signUp",
22649
- value: function (attrs
22716
+ value: function signUp(attrs
22650
22717
  /*: AttributeMap*/
22651
22718
  , options
22652
22719
  /*:: ?: FullOptions*/
@@ -22686,7 +22753,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22686
22753
 
22687
22754
  }, {
22688
22755
  key: "logIn",
22689
- value: function (options
22756
+ value: function logIn(options
22690
22757
  /*:: ?: FullOptions*/
22691
22758
  )
22692
22759
  /*: Promise<ParseUser>*/
@@ -22730,7 +22797,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22730
22797
  current,
22731
22798
  _args2 = arguments;
22732
22799
 
22733
- return _regeneratorRuntime().wrap(function (_context2) {
22800
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
22734
22801
  while (1) {
22735
22802
  switch (_context2.prev = _context2.next) {
22736
22803
  case 0:
@@ -22766,9 +22833,11 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22766
22833
  }, _callee2, this);
22767
22834
  }));
22768
22835
 
22769
- return function () {
22836
+ function save() {
22770
22837
  return _save.apply(this, arguments);
22771
- };
22838
+ }
22839
+
22840
+ return save;
22772
22841
  }()
22773
22842
  /**
22774
22843
  * Wrap the default destroy behavior with functionality that logs out
@@ -22788,7 +22857,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22788
22857
  current,
22789
22858
  _args3 = arguments;
22790
22859
 
22791
- return _regeneratorRuntime().wrap(function (_context3) {
22860
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
22792
22861
  while (1) {
22793
22862
  switch (_context3.prev = _context3.next) {
22794
22863
  case 0:
@@ -22824,9 +22893,11 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22824
22893
  }, _callee3, this);
22825
22894
  }));
22826
22895
 
22827
- return function () {
22896
+ function destroy() {
22828
22897
  return _destroy.apply(this, arguments);
22829
- };
22898
+ }
22899
+
22900
+ return destroy;
22830
22901
  }()
22831
22902
  /**
22832
22903
  * Wrap the default fetch behavior with functionality to save to local
@@ -22846,7 +22917,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22846
22917
  current,
22847
22918
  _args4 = arguments;
22848
22919
 
22849
- return _regeneratorRuntime().wrap(function (_context4) {
22920
+ return _regeneratorRuntime().wrap(function _callee4$(_context4) {
22850
22921
  while (1) {
22851
22922
  switch (_context4.prev = _context4.next) {
22852
22923
  case 0:
@@ -22882,9 +22953,11 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22882
22953
  }, _callee4, this);
22883
22954
  }));
22884
22955
 
22885
- return function () {
22956
+ function fetch() {
22886
22957
  return _fetch.apply(this, arguments);
22887
- };
22958
+ }
22959
+
22960
+ return fetch;
22888
22961
  }()
22889
22962
  /**
22890
22963
  * Wrap the default fetchWithInclude behavior with functionality to save to local
@@ -22904,7 +22977,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22904
22977
  current,
22905
22978
  _args5 = arguments;
22906
22979
 
22907
- return _regeneratorRuntime().wrap(function (_context5) {
22980
+ return _regeneratorRuntime().wrap(function _callee5$(_context5) {
22908
22981
  while (1) {
22909
22982
  switch (_context5.prev = _context5.next) {
22910
22983
  case 0:
@@ -22940,9 +23013,11 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22940
23013
  }, _callee5, this);
22941
23014
  }));
22942
23015
 
22943
- return function () {
23016
+ function fetchWithInclude() {
22944
23017
  return _fetchWithInclude.apply(this, arguments);
22945
- };
23018
+ }
23019
+
23020
+ return fetchWithInclude;
22946
23021
  }()
22947
23022
  /**
22948
23023
  * Verify whether a given password is the password of the current user.
@@ -22955,7 +23030,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22955
23030
 
22956
23031
  }, {
22957
23032
  key: "verifyPassword",
22958
- value: function (password
23033
+ value: function verifyPassword(password
22959
23034
  /*: string*/
22960
23035
  , options
22961
23036
  /*:: ?: RequestOptions*/
@@ -22967,7 +23042,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22967
23042
  }
22968
23043
  }], [{
22969
23044
  key: "readOnlyAttributes",
22970
- value: function () {
23045
+ value: function readOnlyAttributes() {
22971
23046
  return ['sessionToken'];
22972
23047
  }
22973
23048
  /**
@@ -22981,7 +23056,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22981
23056
 
22982
23057
  }, {
22983
23058
  key: "extend",
22984
- value: function (protoProps
23059
+ value: function extend(protoProps
22985
23060
  /*: { [prop: string]: any }*/
22986
23061
  , classProps
22987
23062
  /*: { [prop: string]: any }*/
@@ -23024,7 +23099,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23024
23099
 
23025
23100
  }, {
23026
23101
  key: "current",
23027
- value: function ()
23102
+ value: function current()
23028
23103
  /*: ?ParseUser*/
23029
23104
  {
23030
23105
  if (!canUseCurrentUser) {
@@ -23045,7 +23120,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23045
23120
 
23046
23121
  }, {
23047
23122
  key: "currentAsync",
23048
- value: function ()
23123
+ value: function currentAsync()
23049
23124
  /*: Promise<?ParseUser>*/
23050
23125
  {
23051
23126
  if (!canUseCurrentUser) {
@@ -23073,7 +23148,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23073
23148
 
23074
23149
  }, {
23075
23150
  key: "signUp",
23076
- value: function (username
23151
+ value: function signUp(username
23077
23152
  /*: string*/
23078
23153
  , password
23079
23154
  /*: string*/
@@ -23103,7 +23178,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23103
23178
 
23104
23179
  }, {
23105
23180
  key: "logIn",
23106
- value: function (username
23181
+ value: function logIn(username
23107
23182
  /*: string*/
23108
23183
  , password
23109
23184
  /*: string*/
@@ -23139,7 +23214,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23139
23214
 
23140
23215
  }, {
23141
23216
  key: "become",
23142
- value: function (sessionToken
23217
+ value: function become(sessionToken
23143
23218
  /*: string*/
23144
23219
  , options
23145
23220
  /*:: ?: RequestOptions*/
@@ -23175,7 +23250,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23175
23250
 
23176
23251
  }, {
23177
23252
  key: "me",
23178
- value: function (sessionToken
23253
+ value: function me(sessionToken
23179
23254
  /*: string*/
23180
23255
  ) {
23181
23256
  var options
@@ -23210,7 +23285,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23210
23285
 
23211
23286
  }, {
23212
23287
  key: "hydrate",
23213
- value: function (userJSON
23288
+ value: function hydrate(userJSON
23214
23289
  /*: AttributeMap*/
23215
23290
  ) {
23216
23291
  var controller = _CoreManager.default.getUserController();
@@ -23230,7 +23305,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23230
23305
 
23231
23306
  }, {
23232
23307
  key: "logInWith",
23233
- value: function (provider
23308
+ value: function logInWith(provider
23234
23309
  /*: any*/
23235
23310
  , options
23236
23311
  /*: { authData?: AuthData }*/
@@ -23255,7 +23330,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23255
23330
 
23256
23331
  }, {
23257
23332
  key: "logOut",
23258
- value: function () {
23333
+ value: function logOut() {
23259
23334
  var options
23260
23335
  /*: RequestOptions*/
23261
23336
  = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
@@ -23278,7 +23353,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23278
23353
 
23279
23354
  }, {
23280
23355
  key: "requestPasswordReset",
23281
- value: function (email
23356
+ value: function requestPasswordReset(email
23282
23357
  /*: string*/
23283
23358
  , options
23284
23359
  /*:: ?: RequestOptions*/
@@ -23306,7 +23381,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23306
23381
 
23307
23382
  }, {
23308
23383
  key: "requestEmailVerification",
23309
- value: function (email
23384
+ value: function requestEmailVerification(email
23310
23385
  /*: string*/
23311
23386
  , options
23312
23387
  /*:: ?: RequestOptions*/
@@ -23335,7 +23410,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23335
23410
 
23336
23411
  }, {
23337
23412
  key: "verifyPassword",
23338
- value: function (username
23413
+ value: function verifyPassword(username
23339
23414
  /*: string*/
23340
23415
  , password
23341
23416
  /*: string*/
@@ -23373,7 +23448,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23373
23448
 
23374
23449
  }, {
23375
23450
  key: "allowCustomUserClass",
23376
- value: function (isAllowed
23451
+ value: function allowCustomUserClass(isAllowed
23377
23452
  /*: boolean*/
23378
23453
  ) {
23379
23454
  _CoreManager.default.set('PERFORM_USER_REWRITE', !isAllowed);
@@ -23395,7 +23470,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23395
23470
 
23396
23471
  }, {
23397
23472
  key: "enableRevocableSession",
23398
- value: function (options
23473
+ value: function enableRevocableSession(options
23399
23474
  /*:: ?: RequestOptions*/
23400
23475
  ) {
23401
23476
  options = options || {};
@@ -23422,7 +23497,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23422
23497
 
23423
23498
  }, {
23424
23499
  key: "enableUnsafeCurrentUser",
23425
- value: function () {
23500
+ value: function enableUnsafeCurrentUser() {
23426
23501
  canUseCurrentUser = true;
23427
23502
  }
23428
23503
  /**
@@ -23435,7 +23510,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23435
23510
 
23436
23511
  }, {
23437
23512
  key: "disableUnsafeCurrentUser",
23438
- value: function () {
23513
+ value: function disableUnsafeCurrentUser() {
23439
23514
  canUseCurrentUser = false;
23440
23515
  }
23441
23516
  /**
@@ -23453,7 +23528,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23453
23528
 
23454
23529
  }, {
23455
23530
  key: "_registerAuthenticationProvider",
23456
- value: function (provider
23531
+ value: function _registerAuthenticationProvider(provider
23457
23532
  /*: any*/
23458
23533
  ) {
23459
23534
  authProviders[provider.getAuthType()] = provider; // Synchronize the current user with the auth provider.
@@ -23475,7 +23550,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23475
23550
 
23476
23551
  }, {
23477
23552
  key: "_logInWith",
23478
- value: function (provider
23553
+ value: function _logInWith(provider
23479
23554
  /*: any*/
23480
23555
  , options
23481
23556
  /*: { authData?: AuthData }*/
@@ -23487,13 +23562,13 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23487
23562
  }
23488
23563
  }, {
23489
23564
  key: "_clearCache",
23490
- value: function () {
23565
+ value: function _clearCache() {
23491
23566
  currentUserCache = null;
23492
23567
  currentUserCacheMatchesDisk = false;
23493
23568
  }
23494
23569
  }, {
23495
23570
  key: "_setCurrentUserCache",
23496
- value: function (user
23571
+ value: function _setCurrentUserCache(user
23497
23572
  /*: ParseUser*/
23498
23573
  ) {
23499
23574
  currentUserCache = user;
@@ -23505,7 +23580,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23505
23580
  _ParseObject2.default.registerSubclass('_User', ParseUser);
23506
23581
 
23507
23582
  var DefaultController = {
23508
- updateUserOnDisk: function (user) {
23583
+ updateUserOnDisk: function updateUserOnDisk(user) {
23509
23584
  var path = _Storage.default.generatePath(CURRENT_USER_KEY);
23510
23585
 
23511
23586
  var json = user.toJSON();
@@ -23523,14 +23598,14 @@ var DefaultController = {
23523
23598
  return user;
23524
23599
  });
23525
23600
  },
23526
- removeUserFromDisk: function () {
23601
+ removeUserFromDisk: function removeUserFromDisk() {
23527
23602
  var path = _Storage.default.generatePath(CURRENT_USER_KEY);
23528
23603
 
23529
23604
  currentUserCacheMatchesDisk = true;
23530
23605
  currentUserCache = null;
23531
23606
  return _Storage.default.removeItemAsync(path);
23532
23607
  },
23533
- setCurrentUser: function (user) {
23608
+ setCurrentUser: function setCurrentUser(user) {
23534
23609
  currentUserCache = user;
23535
23610
 
23536
23611
  user._cleanupAuthData();
@@ -23539,7 +23614,7 @@ var DefaultController = {
23539
23614
 
23540
23615
  return DefaultController.updateUserOnDisk(user);
23541
23616
  },
23542
- currentUser: function ()
23617
+ currentUser: function currentUser()
23543
23618
  /*: ?ParseUser*/
23544
23619
  {
23545
23620
  if (currentUserCache) {
@@ -23598,7 +23673,7 @@ var DefaultController = {
23598
23673
 
23599
23674
  return current;
23600
23675
  },
23601
- currentUserAsync: function ()
23676
+ currentUserAsync: function currentUserAsync()
23602
23677
  /*: Promise<?ParseUser>*/
23603
23678
  {
23604
23679
  if (currentUserCache) {
@@ -23653,7 +23728,7 @@ var DefaultController = {
23653
23728
  return _promise.default.resolve(current);
23654
23729
  });
23655
23730
  },
23656
- signUp: function (user
23731
+ signUp: function signUp(user
23657
23732
  /*: ParseUser*/
23658
23733
  , attrs
23659
23734
  /*: AttributeMap*/
@@ -23686,7 +23761,7 @@ var DefaultController = {
23686
23761
  return user;
23687
23762
  });
23688
23763
  },
23689
- logIn: function (user
23764
+ logIn: function logIn(user
23690
23765
  /*: ParseUser*/
23691
23766
  , options
23692
23767
  /*: RequestOptions*/
@@ -23720,7 +23795,7 @@ var DefaultController = {
23720
23795
  return DefaultController.setCurrentUser(user);
23721
23796
  });
23722
23797
  },
23723
- become: function (user
23798
+ become: function become(user
23724
23799
  /*: ParseUser*/
23725
23800
  , options
23726
23801
  /*: RequestOptions*/
@@ -23737,7 +23812,7 @@ var DefaultController = {
23737
23812
  return DefaultController.setCurrentUser(user);
23738
23813
  });
23739
23814
  },
23740
- hydrate: function (user
23815
+ hydrate: function hydrate(user
23741
23816
  /*: ParseUser*/
23742
23817
  , userJSON
23743
23818
  /*: AttributeMap*/
@@ -23754,7 +23829,7 @@ var DefaultController = {
23754
23829
  return _promise.default.resolve(user);
23755
23830
  }
23756
23831
  },
23757
- me: function (user
23832
+ me: function me(user
23758
23833
  /*: ParseUser*/
23759
23834
  , options
23760
23835
  /*: RequestOptions*/
@@ -23771,7 +23846,7 @@ var DefaultController = {
23771
23846
  return user;
23772
23847
  });
23773
23848
  },
23774
- logOut: function (options
23849
+ logOut: function logOut(options
23775
23850
  /*: RequestOptions*/
23776
23851
  )
23777
23852
  /*: Promise<ParseUser>*/
@@ -23810,7 +23885,7 @@ var DefaultController = {
23810
23885
  return promise;
23811
23886
  });
23812
23887
  },
23813
- requestPasswordReset: function (email
23888
+ requestPasswordReset: function requestPasswordReset(email
23814
23889
  /*: string*/
23815
23890
  , options
23816
23891
  /*: RequestOptions*/
@@ -23821,14 +23896,14 @@ var DefaultController = {
23821
23896
  email: email
23822
23897
  }, options);
23823
23898
  },
23824
- upgradeToRevocableSession: function (user
23899
+ upgradeToRevocableSession: function upgradeToRevocableSession(user
23825
23900
  /*: ParseUser*/
23826
23901
  , options
23827
23902
  /*: RequestOptions*/
23828
23903
  ) {
23829
23904
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
23830
23905
  var token, RESTController, result, session, current;
23831
- return _regeneratorRuntime().wrap(function (_context6) {
23906
+ return _regeneratorRuntime().wrap(function _callee6$(_context6) {
23832
23907
  while (1) {
23833
23908
  switch (_context6.prev = _context6.next) {
23834
23909
  case 0:
@@ -23881,7 +23956,7 @@ var DefaultController = {
23881
23956
  }, _callee6);
23882
23957
  }))();
23883
23958
  },
23884
- linkWith: function (user
23959
+ linkWith: function linkWith(user
23885
23960
  /*: ParseUser*/
23886
23961
  , authData
23887
23962
  /*: AuthData*/
@@ -23898,7 +23973,7 @@ var DefaultController = {
23898
23973
  return user;
23899
23974
  });
23900
23975
  },
23901
- verifyPassword: function (username
23976
+ verifyPassword: function verifyPassword(username
23902
23977
  /*: string*/
23903
23978
  , password
23904
23979
  /*: string*/
@@ -23912,7 +23987,7 @@ var DefaultController = {
23912
23987
  password: password
23913
23988
  }, options);
23914
23989
  },
23915
- requestEmailVerification: function (email
23990
+ requestEmailVerification: function requestEmailVerification(email
23916
23991
  /*: string*/
23917
23992
  , options
23918
23993
  /*: RequestOptions*/
@@ -24254,7 +24329,7 @@ var RESTController = {
24254
24329
  var requestId = isIdempotent ? uuidv4() : '';
24255
24330
  var attempts = 0;
24256
24331
 
24257
- var dispatch = function dispatch() {
24332
+ (function dispatch() {
24258
24333
  if (XHR == null) {
24259
24334
  throw new Error('Cannot make a request: No definition of XMLHttpRequest was found.');
24260
24335
  }
@@ -24383,12 +24458,11 @@ var RESTController = {
24383
24458
  if (options && typeof options.requestTask === 'function') {
24384
24459
  options.requestTask(xhr);
24385
24460
  }
24386
- };
24461
+ })();
24387
24462
 
24388
- dispatch();
24389
24463
  return promise;
24390
24464
  },
24391
- request: function (method
24465
+ request: function request(method
24392
24466
  /*: string*/
24393
24467
  , path
24394
24468
  /*: string*/
@@ -24503,7 +24577,7 @@ var RESTController = {
24503
24577
  });
24504
24578
  }).catch(RESTController.handleError);
24505
24579
  },
24506
- handleError: function (response) {
24580
+ handleError: function handleError(response) {
24507
24581
  // Transform the error into an instance of ParseError by trying to parse
24508
24582
  // the error string as JSON
24509
24583
  var error;
@@ -24523,12 +24597,12 @@ var RESTController = {
24523
24597
 
24524
24598
  return _promise.default.reject(error);
24525
24599
  },
24526
- _setXHR: function (xhr
24600
+ _setXHR: function _setXHR(xhr
24527
24601
  /*: any*/
24528
24602
  ) {
24529
24603
  XHR = xhr;
24530
24604
  },
24531
- _getXHR: function () {
24605
+ _getXHR: function _getXHR() {
24532
24606
  return XHR;
24533
24607
  }
24534
24608
  };