@tarojs/taro 2.2.18 → 2.2.21

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.
package/dist/taro.js CHANGED
@@ -4,83 +4,60 @@
4
4
  (factory((global.Taro = {})));
5
5
  }(this, (function (exports) { 'use strict';
6
6
 
7
- function ownKeys(object, enumerableOnly) {
8
- var keys = Object.keys(object);
9
-
7
+ function ownKeys(e, r) {
8
+ var t = Object.keys(e);
10
9
  if (Object.getOwnPropertySymbols) {
11
- var symbols = Object.getOwnPropertySymbols(object);
12
-
13
- if (enumerableOnly) {
14
- symbols = symbols.filter(function (sym) {
15
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
16
- });
17
- }
18
-
19
- keys.push.apply(keys, symbols);
10
+ var o = Object.getOwnPropertySymbols(e);
11
+ r && (o = o.filter(function (r) {
12
+ return Object.getOwnPropertyDescriptor(e, r).enumerable;
13
+ })), t.push.apply(t, o);
14
+ }
15
+ return t;
16
+ }
17
+ function _objectSpread2(e) {
18
+ for (var r = 1; r < arguments.length; r++) {
19
+ var t = null != arguments[r] ? arguments[r] : {};
20
+ r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {
21
+ _defineProperty(e, r, t[r]);
22
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
23
+ Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
24
+ });
20
25
  }
21
-
22
- return keys;
26
+ return e;
23
27
  }
24
-
25
- function _objectSpread2(target) {
26
- for (var i = 1; i < arguments.length; i++) {
27
- var source = arguments[i] != null ? arguments[i] : {};
28
-
29
- if (i % 2) {
30
- ownKeys(Object(source), true).forEach(function (key) {
31
- _defineProperty(target, key, source[key]);
32
- });
33
- } else if (Object.getOwnPropertyDescriptors) {
34
- Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
35
- } else {
36
- ownKeys(Object(source)).forEach(function (key) {
37
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
38
- });
39
- }
40
- }
41
-
42
- return target;
43
- }
44
-
45
- function _typeof(obj) {
28
+ function _typeof(o) {
46
29
  "@babel/helpers - typeof";
47
30
 
48
- if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
49
- _typeof = function (obj) {
50
- return typeof obj;
51
- };
52
- } else {
53
- _typeof = function (obj) {
54
- return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
55
- };
56
- }
57
-
58
- return _typeof(obj);
31
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
32
+ return typeof o;
33
+ } : function (o) {
34
+ return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
35
+ }, _typeof(o);
59
36
  }
60
-
61
37
  function _classCallCheck(instance, Constructor) {
62
38
  if (!(instance instanceof Constructor)) {
63
39
  throw new TypeError("Cannot call a class as a function");
64
40
  }
65
41
  }
66
-
67
42
  function _defineProperties(target, props) {
68
43
  for (var i = 0; i < props.length; i++) {
69
44
  var descriptor = props[i];
70
45
  descriptor.enumerable = descriptor.enumerable || false;
71
46
  descriptor.configurable = true;
72
47
  if ("value" in descriptor) descriptor.writable = true;
73
- Object.defineProperty(target, descriptor.key, descriptor);
48
+ Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
74
49
  }
75
50
  }
76
-
77
51
  function _createClass(Constructor, protoProps, staticProps) {
78
52
  if (protoProps) _defineProperties(Constructor.prototype, protoProps);
79
53
  if (staticProps) _defineProperties(Constructor, staticProps);
54
+ Object.defineProperty(Constructor, "prototype", {
55
+ writable: false
56
+ });
80
57
  return Constructor;
81
58
  }
82
-
83
59
  function _defineProperty(obj, key, value) {
60
+ key = _toPropertyKey(key);
84
61
  if (key in obj) {
85
62
  Object.defineProperty(obj, key, {
86
63
  value: value,
@@ -91,15 +68,12 @@
91
68
  } else {
92
69
  obj[key] = value;
93
70
  }
94
-
95
71
  return obj;
96
72
  }
97
-
98
73
  function _inherits(subClass, superClass) {
99
74
  if (typeof superClass !== "function" && superClass !== null) {
100
75
  throw new TypeError("Super expression must either be null or a function");
101
76
  }
102
-
103
77
  subClass.prototype = Object.create(superClass && superClass.prototype, {
104
78
  constructor: {
105
79
  value: subClass,
@@ -107,30 +81,28 @@
107
81
  configurable: true
108
82
  }
109
83
  });
84
+ Object.defineProperty(subClass, "prototype", {
85
+ writable: false
86
+ });
110
87
  if (superClass) _setPrototypeOf(subClass, superClass);
111
88
  }
112
-
113
89
  function _getPrototypeOf(o) {
114
- _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
90
+ _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
115
91
  return o.__proto__ || Object.getPrototypeOf(o);
116
92
  };
117
93
  return _getPrototypeOf(o);
118
94
  }
119
-
120
95
  function _setPrototypeOf(o, p) {
121
- _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
96
+ _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
122
97
  o.__proto__ = p;
123
98
  return o;
124
99
  };
125
-
126
100
  return _setPrototypeOf(o, p);
127
101
  }
128
-
129
102
  function _isNativeReflectConstruct() {
130
103
  if (typeof Reflect === "undefined" || !Reflect.construct) return false;
131
104
  if (Reflect.construct.sham) return false;
132
105
  if (typeof Proxy === "function") return true;
133
-
134
106
  try {
135
107
  Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
136
108
  return true;
@@ -138,10 +110,9 @@
138
110
  return false;
139
111
  }
140
112
  }
141
-
142
113
  function _construct(Parent, args, Class) {
143
114
  if (_isNativeReflectConstruct()) {
144
- _construct = Reflect.construct;
115
+ _construct = Reflect.construct.bind();
145
116
  } else {
146
117
  _construct = function _construct(Parent, args, Class) {
147
118
  var a = [null];
@@ -152,34 +123,29 @@
152
123
  return instance;
153
124
  };
154
125
  }
155
-
156
126
  return _construct.apply(null, arguments);
157
127
  }
158
-
159
128
  function _isNativeFunction(fn) {
160
- return Function.toString.call(fn).indexOf("[native code]") !== -1;
129
+ try {
130
+ return Function.toString.call(fn).indexOf("[native code]") !== -1;
131
+ } catch (e) {
132
+ return typeof fn === "function";
133
+ }
161
134
  }
162
-
163
135
  function _wrapNativeSuper(Class) {
164
136
  var _cache = typeof Map === "function" ? new Map() : undefined;
165
-
166
137
  _wrapNativeSuper = function _wrapNativeSuper(Class) {
167
138
  if (Class === null || !_isNativeFunction(Class)) return Class;
168
-
169
139
  if (typeof Class !== "function") {
170
140
  throw new TypeError("Super expression must either be null or a function");
171
141
  }
172
-
173
142
  if (typeof _cache !== "undefined") {
174
143
  if (_cache.has(Class)) return _cache.get(Class);
175
-
176
144
  _cache.set(Class, Wrapper);
177
145
  }
178
-
179
146
  function Wrapper() {
180
147
  return _construct(Class, arguments, _getPrototypeOf(this).constructor);
181
148
  }
182
-
183
149
  Wrapper.prototype = Object.create(Class.prototype, {
184
150
  constructor: {
185
151
  value: Wrapper,
@@ -190,59 +156,45 @@
190
156
  });
191
157
  return _setPrototypeOf(Wrapper, Class);
192
158
  };
193
-
194
159
  return _wrapNativeSuper(Class);
195
160
  }
196
-
197
161
  function _assertThisInitialized(self) {
198
162
  if (self === void 0) {
199
163
  throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
200
164
  }
201
-
202
165
  return self;
203
166
  }
204
-
205
167
  function _possibleConstructorReturn(self, call) {
206
168
  if (call && (typeof call === "object" || typeof call === "function")) {
207
169
  return call;
208
170
  } else if (call !== void 0) {
209
171
  throw new TypeError("Derived constructors may only return object or undefined");
210
172
  }
211
-
212
173
  return _assertThisInitialized(self);
213
174
  }
214
-
215
175
  function _createSuper(Derived) {
216
176
  var hasNativeReflectConstruct = _isNativeReflectConstruct();
217
-
218
177
  return function _createSuperInternal() {
219
178
  var Super = _getPrototypeOf(Derived),
220
- result;
221
-
179
+ result;
222
180
  if (hasNativeReflectConstruct) {
223
181
  var NewTarget = _getPrototypeOf(this).constructor;
224
-
225
182
  result = Reflect.construct(Super, arguments, NewTarget);
226
183
  } else {
227
184
  result = Super.apply(this, arguments);
228
185
  }
229
-
230
186
  return _possibleConstructorReturn(this, result);
231
187
  };
232
188
  }
233
-
234
189
  function _toConsumableArray(arr) {
235
190
  return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
236
191
  }
237
-
238
192
  function _arrayWithoutHoles(arr) {
239
193
  if (Array.isArray(arr)) return _arrayLikeToArray(arr);
240
194
  }
241
-
242
195
  function _iterableToArray(iter) {
243
196
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
244
197
  }
245
-
246
198
  function _unsupportedIterableToArray(o, minLen) {
247
199
  if (!o) return;
248
200
  if (typeof o === "string") return _arrayLikeToArray(o, minLen);
@@ -251,18 +203,28 @@
251
203
  if (n === "Map" || n === "Set") return Array.from(o);
252
204
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
253
205
  }
254
-
255
206
  function _arrayLikeToArray(arr, len) {
256
207
  if (len == null || len > arr.length) len = arr.length;
257
-
258
208
  for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
259
-
260
209
  return arr2;
261
210
  }
262
-
263
211
  function _nonIterableSpread() {
264
212
  throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
265
213
  }
214
+ function _toPrimitive(input, hint) {
215
+ if (typeof input !== "object" || input === null) return input;
216
+ var prim = input[Symbol.toPrimitive];
217
+ if (prim !== undefined) {
218
+ var res = prim.call(input, hint || "default");
219
+ if (typeof res !== "object") return res;
220
+ throw new TypeError("@@toPrimitive must return a primitive value.");
221
+ }
222
+ return (hint === "string" ? String : Number)(input);
223
+ }
224
+ function _toPropertyKey(arg) {
225
+ var key = _toPrimitive(arg, "string");
226
+ return typeof key === "symbol" ? key : String(key);
227
+ }
266
228
 
267
229
  if (typeof Object.assign !== 'function') {
268
230
  // Must be writable: true, enumerable: false, configurable: true
@@ -272,12 +234,9 @@
272
234
  // TypeError if undefined or null
273
235
  throw new TypeError('Cannot convert undefined or null to object');
274
236
  }
275
-
276
237
  var to = Object(target);
277
-
278
238
  for (var index = 1; index < arguments.length; index++) {
279
239
  var nextSource = arguments[index];
280
-
281
240
  if (nextSource != null) {
282
241
  // Skip over if undefined or null
283
242
  for (var nextKey in nextSource) {
@@ -288,90 +247,69 @@
288
247
  }
289
248
  }
290
249
  }
291
-
292
250
  return to;
293
251
  };
294
252
  }
295
-
296
253
  if (typeof Object.defineProperties !== 'function') {
297
254
  Object.defineProperties = function (obj, properties) {
298
255
  function convertToDescriptor(desc) {
299
256
  function hasProperty(obj, prop) {
300
257
  return Object.prototype.hasOwnProperty.call(obj, prop);
301
258
  }
302
-
303
259
  function isCallable(v) {
304
260
  // NB: modify as necessary if other values than functions are callable.
305
261
  return typeof v === 'function';
306
262
  }
307
-
308
263
  if (_typeof(desc) !== 'object' || desc === null) {
309
264
  throw new TypeError('bad desc');
310
265
  }
311
-
312
266
  var d = {};
313
267
  if (hasProperty(desc, 'enumerable')) d.enumerable = !!desc.enumerable;
314
-
315
268
  if (hasProperty(desc, 'configurable')) {
316
269
  d.configurable = !!desc.configurable;
317
270
  }
318
-
319
271
  if (hasProperty(desc, 'value')) d.value = desc.value;
320
272
  if (hasProperty(desc, 'writable')) d.writable = !!desc.writable;
321
-
322
273
  if (hasProperty(desc, 'get')) {
323
274
  var g = desc.get;
324
-
325
275
  if (!isCallable(g) && typeof g !== 'undefined') {
326
276
  throw new TypeError('bad get');
327
277
  }
328
-
329
278
  d.get = g;
330
279
  }
331
-
332
280
  if (hasProperty(desc, 'set')) {
333
281
  var s = desc.set;
334
-
335
282
  if (!isCallable(s) && typeof s !== 'undefined') {
336
283
  throw new TypeError('bad set');
337
284
  }
338
-
339
285
  d.set = s;
340
286
  }
341
-
342
287
  if (('get' in d || 'set' in d) && ('value' in d || 'writable' in d)) {
343
288
  throw new TypeError('identity-confused descriptor');
344
289
  }
345
-
346
290
  return d;
347
291
  }
348
-
349
292
  if (_typeof(obj) !== 'object' || obj === null) throw new TypeError('bad obj');
350
293
  properties = Object(properties);
351
294
  var keys = Object.keys(properties);
352
295
  var descs = [];
353
-
354
296
  for (var i = 0; i < keys.length; i++) {
355
297
  descs.push([keys[i], convertToDescriptor(properties[keys[i]])]);
356
298
  }
357
-
358
299
  for (var i = 0; i < descs.length; i++) {
359
300
  Object.defineProperty(obj, descs[i][0], descs[i][1]);
360
301
  }
361
-
362
302
  return obj;
363
303
  };
364
304
  }
365
305
 
366
- var Component = function Component(props) {
306
+ var Component = /*#__PURE__*/_createClass(function Component(props) {
367
307
  _classCallCheck(this, Component);
368
-
369
308
  this.state = {};
370
309
  this.props = props || {};
371
- };
310
+ });
372
311
 
373
312
  /* eslint-disable */
374
-
375
313
  /**
376
314
  * lodash (Custom Build) <https://lodash.com/>
377
315
  * Build: `lodash modularize exports="npm" -o ./`
@@ -382,50 +320,51 @@
382
320
 
383
321
  /** Used as the `TypeError` message for "Functions" methods. */
384
322
  var FUNC_ERROR_TEXT = 'Expected a function';
385
- /** Used to stand-in for `undefined` hash values. */
386
323
 
324
+ /** Used to stand-in for `undefined` hash values. */
387
325
  var HASH_UNDEFINED = '__lodash_hash_undefined__';
388
- /** Used as references for various `Number` constants. */
389
326
 
327
+ /** Used as references for various `Number` constants. */
390
328
  var INFINITY = 1 / 0;
391
- /** `Object#toString` result references. */
392
329
 
330
+ /** `Object#toString` result references. */
393
331
  var funcTag = '[object Function]',
394
- genTag = '[object GeneratorFunction]',
395
- symbolTag = '[object Symbol]';
396
- /** Used to match property names within property paths. */
332
+ genTag = '[object GeneratorFunction]',
333
+ symbolTag = '[object Symbol]';
397
334
 
335
+ /** Used to match property names within property paths. */
398
336
  var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
399
- reIsPlainProp = /^\w*$/,
400
- reLeadingDot = /^\./,
401
- rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
337
+ reIsPlainProp = /^\w*$/,
338
+ reLeadingDot = /^\./,
339
+ rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
340
+
402
341
  /**
403
342
  * Used to match `RegExp`
404
343
  * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
405
344
  */
406
-
407
345
  var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
408
- /** Used to match backslashes in property paths. */
409
346
 
347
+ /** Used to match backslashes in property paths. */
410
348
  var reEscapeChar = /\\(\\)?/g;
411
- /** Used to detect host constructors (Safari). */
412
349
 
350
+ /** Used to detect host constructors (Safari). */
413
351
  var reIsHostCtor = /^\[object .+?Constructor\]$/;
414
- /** Detect free variable `global` from Node.js. */
415
352
 
353
+ /** Detect free variable `global` from Node.js. */
416
354
  var freeGlobal = (typeof global === "undefined" ? "undefined" : _typeof(global)) === 'object' && global && global.Object === Object && global;
417
- /** Detect free variable `self`. */
418
355
 
356
+ /** Detect free variable `self`. */
419
357
  var freeSelf = (typeof self === "undefined" ? "undefined" : _typeof(self)) === 'object' && self && self.Object === Object && self;
420
- /** Used as a reference to the global object. */
421
358
 
359
+ /** Used as a reference to the global object. */
422
360
  var root = freeGlobal || freeSelf || Function('return this')();
423
- /** Used as references for various `Number` constants. */
424
361
 
362
+ /** Used as references for various `Number` constants. */
425
363
  var MAX_SAFE_INTEGER = 9007199254740991;
426
- /** Used to detect unsigned integer values. */
427
364
 
365
+ /** Used to detect unsigned integer values. */
428
366
  var reIsUint = /^(?:0|[1-9]\d*)$/;
367
+
429
368
  /**
430
369
  * Gets the value at `key` of `object`.
431
370
  *
@@ -434,10 +373,10 @@
434
373
  * @param {string} key The key of the property to get.
435
374
  * @returns {*} Returns the property value.
436
375
  */
437
-
438
376
  function getValue(object, key) {
439
377
  return object == null ? undefined : object[key];
440
378
  }
379
+
441
380
  /**
442
381
  * Checks if `value` is a host object in IE < 9.
443
382
  *
@@ -445,65 +384,60 @@
445
384
  * @param {*} value The value to check.
446
385
  * @returns {boolean} Returns `true` if `value` is a host object, else `false`.
447
386
  */
448
-
449
-
450
387
  function isHostObject(value) {
451
388
  // Many host objects are `Object` objects that can coerce to strings
452
389
  // despite having improperly defined `toString` methods.
453
390
  var result = false;
454
-
455
391
  if (value != null && typeof value.toString !== 'function') {
456
392
  try {
457
393
  result = !!(value + '');
458
394
  } catch (e) {}
459
395
  }
460
-
461
396
  return result;
462
397
  }
463
- /** Used for built-in method references. */
464
-
465
398
 
399
+ /** Used for built-in method references. */
466
400
  var arrayProto = Array.prototype,
467
- funcProto = Function.prototype,
468
- objectProto = Object.prototype;
469
- /** Used to detect overreaching core-js shims. */
401
+ funcProto = Function.prototype,
402
+ objectProto = Object.prototype;
470
403
 
404
+ /** Used to detect overreaching core-js shims. */
471
405
  var coreJsData = root['__core-js_shared__'];
472
- /** Used to detect methods masquerading as native. */
473
406
 
407
+ /** Used to detect methods masquerading as native. */
474
408
  var maskSrcKey = function () {
475
409
  var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
476
410
  return uid ? 'Symbol(src)_1.' + uid : '';
477
411
  }();
478
- /** Used to resolve the decompiled source of functions. */
479
-
480
412
 
413
+ /** Used to resolve the decompiled source of functions. */
481
414
  var funcToString = funcProto.toString;
482
- /** Used to check objects for own properties. */
483
415
 
416
+ /** Used to check objects for own properties. */
484
417
  var hasOwnProperty = objectProto.hasOwnProperty;
418
+
485
419
  /**
486
420
  * Used to resolve the
487
421
  * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
488
422
  * of values.
489
423
  */
490
-
491
424
  var objectToString = objectProto.toString;
492
- /** Used to detect if a method is native. */
493
425
 
426
+ /** Used to detect if a method is native. */
494
427
  var reIsNative = RegExp('^' + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&').replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$');
495
- /** Built-in value references. */
496
428
 
429
+ /** Built-in value references. */
497
430
  var _Symbol = root.Symbol,
498
- splice = arrayProto.splice;
499
- /* Built-in method references that are verified to be native. */
431
+ splice = arrayProto.splice;
500
432
 
433
+ /* Built-in method references that are verified to be native. */
501
434
  var Map$1 = getNative(root, 'Map'),
502
- nativeCreate = getNative(Object, 'create');
503
- /** Used to convert symbols to primitives and strings. */
435
+ nativeCreate = getNative(Object, 'create');
504
436
 
437
+ /** Used to convert symbols to primitives and strings. */
505
438
  var symbolProto = _Symbol ? _Symbol.prototype : undefined,
506
- symbolToString = symbolProto ? symbolProto.toString : undefined;
439
+ symbolToString = symbolProto ? symbolProto.toString : undefined;
440
+
507
441
  /**
508
442
  * Creates a hash object.
509
443
  *
@@ -511,17 +445,16 @@
511
445
  * @constructor
512
446
  * @param {Array} [entries] The key-value pairs to cache.
513
447
  */
514
-
515
448
  function Hash(entries) {
516
449
  var index = -1,
517
- length = entries ? entries.length : 0;
450
+ length = entries ? entries.length : 0;
518
451
  this.clear();
519
-
520
452
  while (++index < length) {
521
453
  var entry = entries[index];
522
454
  this.set(entry[0], entry[1]);
523
455
  }
524
456
  }
457
+
525
458
  /**
526
459
  * Removes all key-value entries from the hash.
527
460
  *
@@ -529,11 +462,10 @@
529
462
  * @name clear
530
463
  * @memberOf Hash
531
464
  */
532
-
533
-
534
465
  function hashClear() {
535
466
  this.__data__ = nativeCreate ? nativeCreate(null) : {};
536
467
  }
468
+
537
469
  /**
538
470
  * Removes `key` and its value from the hash.
539
471
  *
@@ -544,11 +476,10 @@
544
476
  * @param {string} key The key of the value to remove.
545
477
  * @returns {boolean} Returns `true` if the entry was removed, else `false`.
546
478
  */
547
-
548
-
549
479
  function hashDelete(key) {
550
480
  return this.has(key) && delete this.__data__[key];
551
481
  }
482
+
552
483
  /**
553
484
  * Gets the hash value for `key`.
554
485
  *
@@ -558,18 +489,15 @@
558
489
  * @param {string} key The key of the value to get.
559
490
  * @returns {*} Returns the entry value.
560
491
  */
561
-
562
-
563
492
  function hashGet(key) {
564
493
  var data = this.__data__;
565
-
566
494
  if (nativeCreate) {
567
495
  var result = data[key];
568
496
  return result === HASH_UNDEFINED ? undefined : result;
569
497
  }
570
-
571
498
  return hasOwnProperty.call(data, key) ? data[key] : undefined;
572
499
  }
500
+
573
501
  /**
574
502
  * Checks if a hash value for `key` exists.
575
503
  *
@@ -579,12 +507,11 @@
579
507
  * @param {string} key The key of the entry to check.
580
508
  * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
581
509
  */
582
-
583
-
584
510
  function hashHas(key) {
585
511
  var data = this.__data__;
586
512
  return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);
587
513
  }
514
+
588
515
  /**
589
516
  * Sets the hash `key` to `value`.
590
517
  *
@@ -595,20 +522,19 @@
595
522
  * @param {*} value The value to set.
596
523
  * @returns {Object} Returns the hash instance.
597
524
  */
598
-
599
-
600
525
  function hashSet(key, value) {
601
526
  var data = this.__data__;
602
527
  data[key] = nativeCreate && value === undefined ? HASH_UNDEFINED : value;
603
528
  return this;
604
- } // Add methods to `Hash`.
605
-
529
+ }
606
530
 
531
+ // Add methods to `Hash`.
607
532
  Hash.prototype.clear = hashClear;
608
533
  Hash.prototype['delete'] = hashDelete;
609
534
  Hash.prototype.get = hashGet;
610
535
  Hash.prototype.has = hashHas;
611
536
  Hash.prototype.set = hashSet;
537
+
612
538
  /**
613
539
  * Creates an list cache object.
614
540
  *
@@ -616,17 +542,16 @@
616
542
  * @constructor
617
543
  * @param {Array} [entries] The key-value pairs to cache.
618
544
  */
619
-
620
545
  function ListCache(entries) {
621
546
  var index = -1,
622
- length = entries ? entries.length : 0;
547
+ length = entries ? entries.length : 0;
623
548
  this.clear();
624
-
625
549
  while (++index < length) {
626
550
  var entry = entries[index];
627
551
  this.set(entry[0], entry[1]);
628
552
  }
629
553
  }
554
+
630
555
  /**
631
556
  * Removes all key-value entries from the list cache.
632
557
  *
@@ -634,11 +559,10 @@
634
559
  * @name clear
635
560
  * @memberOf ListCache
636
561
  */
637
-
638
-
639
562
  function listCacheClear() {
640
563
  this.__data__ = [];
641
564
  }
565
+
642
566
  /**
643
567
  * Removes `key` and its value from the list cache.
644
568
  *
@@ -648,26 +572,21 @@
648
572
  * @param {string} key The key of the value to remove.
649
573
  * @returns {boolean} Returns `true` if the entry was removed, else `false`.
650
574
  */
651
-
652
-
653
575
  function listCacheDelete(key) {
654
576
  var data = this.__data__,
655
- index = assocIndexOf(data, key);
656
-
577
+ index = assocIndexOf(data, key);
657
578
  if (index < 0) {
658
579
  return false;
659
580
  }
660
-
661
581
  var lastIndex = data.length - 1;
662
-
663
582
  if (index == lastIndex) {
664
583
  data.pop();
665
584
  } else {
666
585
  splice.call(data, index, 1);
667
586
  }
668
-
669
587
  return true;
670
588
  }
589
+
671
590
  /**
672
591
  * Gets the list cache value for `key`.
673
592
  *
@@ -677,13 +596,12 @@
677
596
  * @param {string} key The key of the value to get.
678
597
  * @returns {*} Returns the entry value.
679
598
  */
680
-
681
-
682
599
  function listCacheGet(key) {
683
600
  var data = this.__data__,
684
- index = assocIndexOf(data, key);
601
+ index = assocIndexOf(data, key);
685
602
  return index < 0 ? undefined : data[index][1];
686
603
  }
604
+
687
605
  /**
688
606
  * Checks if a list cache value for `key` exists.
689
607
  *
@@ -693,11 +611,10 @@
693
611
  * @param {string} key The key of the entry to check.
694
612
  * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
695
613
  */
696
-
697
-
698
614
  function listCacheHas(key) {
699
615
  return assocIndexOf(this.__data__, key) > -1;
700
616
  }
617
+
701
618
  /**
702
619
  * Sets the list cache `key` to `value`.
703
620
  *
@@ -708,27 +625,24 @@
708
625
  * @param {*} value The value to set.
709
626
  * @returns {Object} Returns the list cache instance.
710
627
  */
711
-
712
-
713
628
  function listCacheSet(key, value) {
714
629
  var data = this.__data__,
715
- index = assocIndexOf(data, key);
716
-
630
+ index = assocIndexOf(data, key);
717
631
  if (index < 0) {
718
632
  data.push([key, value]);
719
633
  } else {
720
634
  data[index][1] = value;
721
635
  }
722
-
723
636
  return this;
724
- } // Add methods to `ListCache`.
725
-
637
+ }
726
638
 
639
+ // Add methods to `ListCache`.
727
640
  ListCache.prototype.clear = listCacheClear;
728
641
  ListCache.prototype['delete'] = listCacheDelete;
729
642
  ListCache.prototype.get = listCacheGet;
730
643
  ListCache.prototype.has = listCacheHas;
731
644
  ListCache.prototype.set = listCacheSet;
645
+
732
646
  /**
733
647
  * Creates a map cache object to store key-value pairs.
734
648
  *
@@ -736,17 +650,16 @@
736
650
  * @constructor
737
651
  * @param {Array} [entries] The key-value pairs to cache.
738
652
  */
739
-
740
653
  function MapCache(entries) {
741
654
  var index = -1,
742
- length = entries ? entries.length : 0;
655
+ length = entries ? entries.length : 0;
743
656
  this.clear();
744
-
745
657
  while (++index < length) {
746
658
  var entry = entries[index];
747
659
  this.set(entry[0], entry[1]);
748
660
  }
749
661
  }
662
+
750
663
  /**
751
664
  * Removes all key-value entries from the map.
752
665
  *
@@ -754,8 +667,6 @@
754
667
  * @name clear
755
668
  * @memberOf MapCache
756
669
  */
757
-
758
-
759
670
  function mapCacheClear() {
760
671
  this.__data__ = {
761
672
  hash: new Hash(),
@@ -763,6 +674,7 @@
763
674
  string: new Hash()
764
675
  };
765
676
  }
677
+
766
678
  /**
767
679
  * Removes `key` and its value from the map.
768
680
  *
@@ -772,11 +684,10 @@
772
684
  * @param {string} key The key of the value to remove.
773
685
  * @returns {boolean} Returns `true` if the entry was removed, else `false`.
774
686
  */
775
-
776
-
777
687
  function mapCacheDelete(key) {
778
688
  return getMapData(this, key)['delete'](key);
779
689
  }
690
+
780
691
  /**
781
692
  * Gets the map value for `key`.
782
693
  *
@@ -786,11 +697,10 @@
786
697
  * @param {string} key The key of the value to get.
787
698
  * @returns {*} Returns the entry value.
788
699
  */
789
-
790
-
791
700
  function mapCacheGet(key) {
792
701
  return getMapData(this, key).get(key);
793
702
  }
703
+
794
704
  /**
795
705
  * Checks if a map value for `key` exists.
796
706
  *
@@ -800,11 +710,10 @@
800
710
  * @param {string} key The key of the entry to check.
801
711
  * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
802
712
  */
803
-
804
-
805
713
  function mapCacheHas(key) {
806
714
  return getMapData(this, key).has(key);
807
715
  }
716
+
808
717
  /**
809
718
  * Sets the map `key` to `value`.
810
719
  *
@@ -815,19 +724,18 @@
815
724
  * @param {*} value The value to set.
816
725
  * @returns {Object} Returns the map cache instance.
817
726
  */
818
-
819
-
820
727
  function mapCacheSet(key, value) {
821
728
  getMapData(this, key).set(key, value);
822
729
  return this;
823
- } // Add methods to `MapCache`.
824
-
730
+ }
825
731
 
732
+ // Add methods to `MapCache`.
826
733
  MapCache.prototype.clear = mapCacheClear;
827
734
  MapCache.prototype['delete'] = mapCacheDelete;
828
735
  MapCache.prototype.get = mapCacheGet;
829
736
  MapCache.prototype.has = mapCacheHas;
830
737
  MapCache.prototype.set = mapCacheSet;
738
+
831
739
  /**
832
740
  * Gets the index at which the `key` is found in `array` of key-value pairs.
833
741
  *
@@ -836,18 +744,16 @@
836
744
  * @param {*} key The key to search for.
837
745
  * @returns {number} Returns the index of the matched value, else `-1`.
838
746
  */
839
-
840
747
  function assocIndexOf(array, key) {
841
748
  var length = array.length;
842
-
843
749
  while (length--) {
844
750
  if (eq(array[length][0], key)) {
845
751
  return length;
846
752
  }
847
753
  }
848
-
849
754
  return -1;
850
755
  }
756
+
851
757
  /**
852
758
  * The base implementation of `_.get` without support for default values.
853
759
  *
@@ -856,19 +762,16 @@
856
762
  * @param {Array|string} path The path of the property to get.
857
763
  * @returns {*} Returns the resolved value.
858
764
  */
859
-
860
-
861
765
  function baseGet(object, path) {
862
766
  path = isKey(path, object) ? [path] : castPath(path);
863
767
  var index = 0,
864
- length = path.length;
865
-
768
+ length = path.length;
866
769
  while (object != null && index < length) {
867
770
  object = object[toKey(path[index++])];
868
771
  }
869
-
870
772
  return index && index == length ? object : undefined;
871
773
  }
774
+
872
775
  /**
873
776
  * The base implementation of `_.isNative` without bad shim checks.
874
777
  *
@@ -877,15 +780,14 @@
877
780
  * @returns {boolean} Returns `true` if `value` is a native function,
878
781
  * else `false`.
879
782
  */
880
-
881
783
  function baseIsNative(value) {
882
784
  if (!isObject(value) || isMasked(value)) {
883
785
  return false;
884
786
  }
885
-
886
787
  var pattern = isFunction(value) || isHostObject(value) ? reIsNative : reIsHostCtor;
887
788
  return pattern.test(toSource(value));
888
789
  }
790
+
889
791
  /**
890
792
  * The base implementation of `_.toString` which doesn't convert nullish
891
793
  * values to empty strings.
@@ -894,21 +796,18 @@
894
796
  * @param {*} value The value to process.
895
797
  * @returns {string} Returns the string.
896
798
  */
897
-
898
-
899
799
  function baseToString(value) {
900
800
  // Exit early for strings to avoid a performance hit in some environments.
901
801
  if (typeof value === 'string') {
902
802
  return value;
903
803
  }
904
-
905
804
  if (isSymbol(value)) {
906
805
  return symbolToString ? symbolToString.call(value) : '';
907
806
  }
908
-
909
807
  var result = value + '';
910
808
  return result == '0' && 1 / value == -INFINITY ? '-0' : result;
911
809
  }
810
+
912
811
  /**
913
812
  * Casts `value` to a path array if it's not one.
914
813
  *
@@ -916,11 +815,10 @@
916
815
  * @param {*} value The value to inspect.
917
816
  * @returns {Array} Returns the cast property path array.
918
817
  */
919
-
920
-
921
818
  function castPath(value) {
922
819
  return isArray(value) ? value : stringToPath(value);
923
820
  }
821
+
924
822
  /**
925
823
  * Gets the data for `map`.
926
824
  *
@@ -929,12 +827,11 @@
929
827
  * @param {string} key The reference key.
930
828
  * @returns {*} Returns the map data.
931
829
  */
932
-
933
-
934
830
  function getMapData(map, key) {
935
831
  var data = map.__data__;
936
832
  return isKeyable(key) ? data[typeof key === 'string' ? 'string' : 'hash'] : data.map;
937
833
  }
834
+
938
835
  /**
939
836
  * Gets the native function at `key` of `object`.
940
837
  *
@@ -943,12 +840,11 @@
943
840
  * @param {string} key The key of the method to get.
944
841
  * @returns {*} Returns the function if it's native, else `undefined`.
945
842
  */
946
-
947
-
948
843
  function getNative(object, key) {
949
844
  var value = getValue(object, key);
950
845
  return baseIsNative(value) ? value : undefined;
951
846
  }
847
+
952
848
  /**
953
849
  * Checks if `value` is a property name and not a property path.
954
850
  *
@@ -957,21 +853,17 @@
957
853
  * @param {Object} [object] The object to query keys on.
958
854
  * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
959
855
  */
960
-
961
-
962
856
  function isKey(value, object) {
963
857
  if (isArray(value)) {
964
858
  return false;
965
859
  }
966
-
967
860
  var type = _typeof(value);
968
-
969
861
  if (type == 'number' || type == 'symbol' || type == 'boolean' || value == null || isSymbol(value)) {
970
862
  return true;
971
863
  }
972
-
973
864
  return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object(object);
974
865
  }
866
+
975
867
  /**
976
868
  * Checks if `value` is suitable for use as unique object key.
977
869
  *
@@ -979,13 +871,11 @@
979
871
  * @param {*} value The value to check.
980
872
  * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
981
873
  */
982
-
983
-
984
874
  function isKeyable(value) {
985
875
  var type = _typeof(value);
986
-
987
876
  return type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean' ? value !== '__proto__' : value === null;
988
877
  }
878
+
989
879
  /**
990
880
  * Checks if `func` has its source masked.
991
881
  *
@@ -993,11 +883,10 @@
993
883
  * @param {Function} func The function to check.
994
884
  * @returns {boolean} Returns `true` if `func` is masked, else `false`.
995
885
  */
996
-
997
-
998
886
  function isMasked(func) {
999
887
  return !!maskSrcKey && maskSrcKey in func;
1000
888
  }
889
+
1001
890
  /**
1002
891
  * Converts `string` to a property path array.
1003
892
  *
@@ -1005,21 +894,18 @@
1005
894
  * @param {string} string The string to convert.
1006
895
  * @returns {Array} Returns the property path array.
1007
896
  */
1008
-
1009
-
1010
897
  var stringToPath = memoize(function (string) {
1011
898
  string = toString(string);
1012
899
  var result = [];
1013
-
1014
900
  if (reLeadingDot.test(string)) {
1015
901
  result.push('');
1016
902
  }
1017
-
1018
903
  string.replace(rePropName, function (match, number, quote, string) {
1019
904
  result.push(quote ? string.replace(reEscapeChar, '$1') : number || match);
1020
905
  });
1021
906
  return result;
1022
907
  });
908
+
1023
909
  /**
1024
910
  * Converts `value` to a string key if it's not a string or symbol.
1025
911
  *
@@ -1027,15 +913,14 @@
1027
913
  * @param {*} value The value to inspect.
1028
914
  * @returns {string|symbol} Returns the key.
1029
915
  */
1030
-
1031
916
  function toKey(value) {
1032
917
  if (typeof value === 'string' || isSymbol(value)) {
1033
918
  return value;
1034
919
  }
1035
-
1036
920
  var result = value + '';
1037
921
  return result == '0' && 1 / value == -INFINITY ? '-0' : result;
1038
922
  }
923
+
1039
924
  /**
1040
925
  * Converts `func` to its source code.
1041
926
  *
@@ -1043,21 +928,18 @@
1043
928
  * @param {Function} func The function to process.
1044
929
  * @returns {string} Returns the source code.
1045
930
  */
1046
-
1047
-
1048
931
  function toSource(func) {
1049
932
  if (func != null) {
1050
933
  try {
1051
934
  return funcToString.call(func);
1052
935
  } catch (e) {}
1053
-
1054
936
  try {
1055
937
  return func + '';
1056
938
  } catch (e) {}
1057
939
  }
1058
-
1059
940
  return '';
1060
941
  }
942
+
1061
943
  /**
1062
944
  * Creates a function that memoizes the result of `func`. If `resolver` is
1063
945
  * provided, it determines the cache key for storing the result based on the
@@ -1102,33 +984,28 @@
1102
984
  * // Replace `_.memoize.Cache`.
1103
985
  * _.memoize.Cache = WeakMap;
1104
986
  */
1105
-
1106
-
1107
987
  function memoize(func, resolver) {
1108
988
  if (typeof func !== 'function' || resolver && typeof resolver !== 'function') {
1109
989
  throw new TypeError(FUNC_ERROR_TEXT);
1110
990
  }
1111
-
1112
991
  var memoized = function memoized() {
1113
992
  var args = arguments,
1114
- key = resolver ? resolver.apply(this, args) : args[0],
1115
- cache = memoized.cache;
1116
-
993
+ key = resolver ? resolver.apply(this, args) : args[0],
994
+ cache = memoized.cache;
1117
995
  if (cache.has(key)) {
1118
996
  return cache.get(key);
1119
997
  }
1120
-
1121
998
  var result = func.apply(this, args);
1122
999
  memoized.cache = cache.set(key, result);
1123
1000
  return result;
1124
1001
  };
1125
-
1126
1002
  memoized.cache = new (memoize.Cache || MapCache)();
1127
1003
  return memoized;
1128
- } // Assign cache to `_.memoize`.
1129
-
1004
+ }
1130
1005
 
1006
+ // Assign cache to `_.memoize`.
1131
1007
  memoize.Cache = MapCache;
1008
+
1132
1009
  /**
1133
1010
  * Performs a
1134
1011
  * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
@@ -1161,10 +1038,10 @@
1161
1038
  * _.eq(NaN, NaN);
1162
1039
  * // => true
1163
1040
  */
1164
-
1165
1041
  function eq(value, other) {
1166
1042
  return value === other || value !== value && other !== other;
1167
1043
  }
1044
+
1168
1045
  /**
1169
1046
  * Checks if `value` is classified as an `Array` object.
1170
1047
  *
@@ -1188,9 +1065,8 @@
1188
1065
  * _.isArray(_.noop);
1189
1066
  * // => false
1190
1067
  */
1191
-
1192
-
1193
1068
  var isArray = Array.isArray;
1069
+
1194
1070
  /**
1195
1071
  * Checks if `value` is classified as a `Function` object.
1196
1072
  *
@@ -1208,13 +1084,13 @@
1208
1084
  * _.isFunction(/abc/);
1209
1085
  * // => false
1210
1086
  */
1211
-
1212
1087
  function isFunction(value) {
1213
1088
  // The use of `Object#toString` avoids issues with the `typeof` operator
1214
1089
  // in Safari 8-9 which returns 'object' for typed array and other constructors.
1215
1090
  var tag = isObject(value) ? objectToString.call(value) : '';
1216
1091
  return tag == funcTag || tag == genTag;
1217
1092
  }
1093
+
1218
1094
  /**
1219
1095
  * Checks if `value` is the
1220
1096
  * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
@@ -1240,13 +1116,11 @@
1240
1116
  * _.isObject(null);
1241
1117
  * // => false
1242
1118
  */
1243
-
1244
-
1245
1119
  function isObject(value) {
1246
1120
  var type = _typeof(value);
1247
-
1248
1121
  return !!value && (type == 'object' || type == 'function');
1249
1122
  }
1123
+
1250
1124
  /**
1251
1125
  * Checks if `value` is object-like. A value is object-like if it's not `null`
1252
1126
  * and has a `typeof` result of "object".
@@ -1271,11 +1145,10 @@
1271
1145
  * _.isObjectLike(null);
1272
1146
  * // => false
1273
1147
  */
1274
-
1275
-
1276
1148
  function isObjectLike(value) {
1277
1149
  return !!value && _typeof(value) === 'object';
1278
1150
  }
1151
+
1279
1152
  /**
1280
1153
  * Checks if `value` is classified as a `Symbol` primitive or object.
1281
1154
  *
@@ -1293,11 +1166,10 @@
1293
1166
  * _.isSymbol('abc');
1294
1167
  * // => false
1295
1168
  */
1296
-
1297
-
1298
1169
  function isSymbol(value) {
1299
1170
  return _typeof(value) === 'symbol' || isObjectLike(value) && objectToString.call(value) == symbolTag;
1300
1171
  }
1172
+
1301
1173
  /**
1302
1174
  * Converts `value` to a string. An empty string is returned for `null`
1303
1175
  * and `undefined` values. The sign of `-0` is preserved.
@@ -1319,11 +1191,10 @@
1319
1191
  * _.toString([1, 2, 3]);
1320
1192
  * // => '1,2,3'
1321
1193
  */
1322
-
1323
-
1324
1194
  function toString(value) {
1325
1195
  return value == null ? '' : baseToString(value);
1326
1196
  }
1197
+
1327
1198
  /**
1328
1199
  * Checks if `value` is a valid array-like index.
1329
1200
  *
@@ -1332,14 +1203,12 @@
1332
1203
  * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
1333
1204
  * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
1334
1205
  */
1335
-
1336
-
1337
1206
  function isIndex(value, length) {
1338
1207
  var type = _typeof(value);
1339
-
1340
1208
  length = length == null ? MAX_SAFE_INTEGER : length;
1341
1209
  return !!length && (type == 'number' || type != 'symbol' && reIsUint.test(value)) && value > -1 && value % 1 == 0 && value < length;
1342
1210
  }
1211
+
1343
1212
  /**
1344
1213
  * The base implementation of `assignValue` and `assignMergeValue` without
1345
1214
  * value checks.
@@ -1349,8 +1218,6 @@
1349
1218
  * @param {string} key The key of the property to assign.
1350
1219
  * @param {*} value The value to assign.
1351
1220
  */
1352
-
1353
-
1354
1221
  function baseAssignValue(object, key, value) {
1355
1222
  if (key == '__proto__') {
1356
1223
  Object.defineProperty(object, key, {
@@ -1363,10 +1230,10 @@
1363
1230
  object[key] = value;
1364
1231
  }
1365
1232
  }
1366
- /** Used to check objects for own properties. */
1367
-
1368
1233
 
1234
+ /** Used to check objects for own properties. */
1369
1235
  var hasOwnProperty = Object.prototype.hasOwnProperty;
1236
+
1370
1237
  /**
1371
1238
  * Assigns `value` to `key` of `object` if the existing value is not equivalent
1372
1239
  * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
@@ -1377,14 +1244,13 @@
1377
1244
  * @param {string} key The key of the property to assign.
1378
1245
  * @param {*} value The value to assign.
1379
1246
  */
1380
-
1381
1247
  function assignValue(object, key, value) {
1382
1248
  var objValue = object[key];
1383
-
1384
1249
  if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || value === undefined && !(key in object)) {
1385
1250
  baseAssignValue(object, key, value);
1386
1251
  }
1387
1252
  }
1253
+
1388
1254
  /**
1389
1255
  * The base implementation of `set`.
1390
1256
  *
@@ -1395,36 +1261,28 @@
1395
1261
  * @param {Function} [customizer] The function to customize path creation.
1396
1262
  * @returns {Object} Returns `object`.
1397
1263
  */
1398
-
1399
-
1400
1264
  function baseSet(object, path, value, customizer) {
1401
1265
  if (!isObject(object)) {
1402
1266
  return object;
1403
1267
  }
1404
-
1405
1268
  path = castPath(path, object);
1406
1269
  var length = path.length;
1407
1270
  var lastIndex = length - 1;
1408
1271
  var index = -1;
1409
1272
  var nested = object;
1410
-
1411
1273
  while (nested != null && ++index < length) {
1412
1274
  var key = toKey(path[index]);
1413
1275
  var newValue = value;
1414
-
1415
1276
  if (index != lastIndex) {
1416
1277
  var objValue = nested[key];
1417
1278
  newValue = customizer ? customizer(objValue, key, nested) : undefined;
1418
-
1419
1279
  if (newValue === undefined) {
1420
1280
  newValue = isObject(objValue) ? objValue : isIndex(path[index + 1]) ? [] : {};
1421
1281
  }
1422
1282
  }
1423
-
1424
1283
  assignValue(nested, key, newValue);
1425
1284
  nested = nested[key];
1426
1285
  }
1427
-
1428
1286
  return object;
1429
1287
  }
1430
1288
 
@@ -1453,7 +1311,6 @@
1453
1311
  * _.get(object, 'a.b.c', 'default');
1454
1312
  * // => 'default'
1455
1313
  */
1456
-
1457
1314
  function get(object, path, defaultValue) {
1458
1315
  var result = object == null ? undefined : baseGet(object, path);
1459
1316
  return result === undefined ? defaultValue : result;
@@ -1486,42 +1343,33 @@
1486
1343
  * console.log(object.x[0].y.z)
1487
1344
  * // => 5
1488
1345
  */
1489
-
1490
1346
  function set$1(object, path, value) {
1491
1347
  return object == null ? object : baseSet(object, path, value);
1492
1348
  }
1493
1349
 
1494
1350
  var upperCasePattern = /([A-Z])/g;
1495
-
1496
1351
  function dashify(str) {
1497
1352
  return str.replace(upperCasePattern, dashLower);
1498
1353
  }
1499
-
1500
1354
  function dashLower(c) {
1501
1355
  return '-' + c.toLowerCase();
1502
1356
  }
1503
-
1504
1357
  function isObject$1(val) {
1505
1358
  return val != null && _typeof(val) === 'object' && Array.isArray(val) === false;
1506
1359
  }
1507
-
1508
1360
  function inlineStyle(obj) {
1509
1361
  if (obj == null) {
1510
1362
  return '';
1511
1363
  }
1512
-
1513
1364
  if (typeof obj === 'string') {
1514
1365
  return obj;
1515
1366
  }
1516
-
1517
1367
  if (obj === null || obj === undefined) {
1518
1368
  return '';
1519
1369
  }
1520
-
1521
1370
  if (!isObject$1(obj)) {
1522
1371
  throw new TypeError('style 只能是一个对象或字符串。');
1523
1372
  }
1524
-
1525
1373
  return Object.keys(obj).map(function (key) {
1526
1374
  return dashify(key).concat(':').concat(obj[key]);
1527
1375
  }).join(';');
@@ -1538,99 +1386,82 @@
1538
1386
  QQ: 'QQ',
1539
1387
  JD: 'JD'
1540
1388
  };
1541
- var _env = null; // 一个taro项目肯定运行同样的环境
1389
+ var _env = null;
1542
1390
 
1391
+ // 一个taro项目肯定运行同样的环境
1543
1392
  function getEnv() {
1544
1393
  if (_env) return _env;
1545
-
1546
1394
  if (typeof jd !== 'undefined' && jd.getSystemInfo) {
1547
1395
  _env = ENV_TYPE.JD;
1548
1396
  return ENV_TYPE.JD;
1549
1397
  }
1550
-
1551
1398
  if (typeof qq !== 'undefined' && qq.getSystemInfo) {
1552
1399
  _env = ENV_TYPE.QQ;
1553
1400
  return ENV_TYPE.QQ;
1554
1401
  }
1555
-
1556
1402
  if (typeof tt !== 'undefined' && tt.getSystemInfo) {
1557
1403
  _env = ENV_TYPE.TT;
1558
1404
  return ENV_TYPE.TT;
1559
1405
  }
1560
-
1561
1406
  if (typeof wx !== 'undefined' && wx.getSystemInfo) {
1562
1407
  _env = ENV_TYPE.WEAPP;
1563
1408
  return ENV_TYPE.WEAPP;
1564
1409
  }
1565
-
1566
1410
  if (typeof swan !== 'undefined' && swan.getSystemInfo) {
1567
1411
  _env = ENV_TYPE.SWAN;
1568
1412
  return ENV_TYPE.SWAN;
1569
1413
  }
1570
-
1571
1414
  if (typeof my !== 'undefined' && my.getSystemInfo) {
1572
1415
  _env = ENV_TYPE.ALIPAY;
1573
1416
  return ENV_TYPE.ALIPAY;
1574
1417
  }
1575
-
1576
1418
  if (typeof global !== 'undefined' && global.__fbGenNativeModule) {
1577
1419
  _env = ENV_TYPE.RN;
1578
1420
  return ENV_TYPE.RN;
1579
1421
  }
1580
-
1581
1422
  if (typeof global !== 'undefined' && global.getManifestField) {
1582
1423
  _env = ENV_TYPE.QUICKAPP;
1583
1424
  return ENV_TYPE.QUICKAPP;
1584
1425
  }
1585
-
1586
1426
  if (typeof window !== 'undefined') {
1587
1427
  _env = ENV_TYPE.WEB;
1588
1428
  return ENV_TYPE.WEB;
1589
1429
  }
1590
-
1591
1430
  return 'Unknown environment';
1592
1431
  }
1593
1432
 
1594
1433
  function isObject$2(arg) {
1595
1434
  return arg === Object(arg) && typeof arg !== 'function';
1596
1435
  }
1597
-
1598
1436
  var env = null;
1599
1437
  function getOriginal(item) {
1600
1438
  if (env === null) {
1601
1439
  env = getEnv();
1602
1440
  }
1603
-
1604
1441
  if (isObject$2(item)) {
1605
1442
  return item[env === ENV_TYPE.SWAN ? 'privateOriginal' : '$original'] || item;
1606
1443
  }
1607
-
1608
1444
  return item;
1609
1445
  }
1610
1446
 
1611
1447
  var Events = /*#__PURE__*/function () {
1612
1448
  function Events(opts) {
1613
1449
  _classCallCheck(this, Events);
1614
-
1615
1450
  if (typeof opts !== 'undefined' && opts.callbacks) {
1616
1451
  this.callbacks = opts.callbacks;
1617
1452
  } else {
1618
1453
  this.callbacks = {};
1619
1454
  }
1620
1455
  }
1621
-
1622
1456
  _createClass(Events, [{
1623
1457
  key: "on",
1624
1458
  value: function on(events, callback, context) {
1625
1459
  var calls, event, node, tail, list;
1626
-
1627
1460
  if (!callback) {
1628
1461
  return this;
1629
1462
  }
1630
-
1631
1463
  events = events.split(Events.eventSplitter);
1632
1464
  calls = this.callbacks;
1633
-
1634
1465
  while (event = events.shift()) {
1635
1466
  list = calls[event];
1636
1467
  node = list ? list.tail : {};
@@ -1642,24 +1473,19 @@
1642
1473
  next: list ? list.next : node
1643
1474
  };
1644
1475
  }
1645
-
1646
1476
  return this;
1647
1477
  }
1648
1478
  }, {
1649
1479
  key: "once",
1650
1480
  value: function once(events, callback, context) {
1651
1481
  var _this = this;
1652
-
1653
1482
  var wrapper = function wrapper() {
1654
1483
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
1655
1484
  args[_key] = arguments[_key];
1656
1485
  }
1657
-
1658
1486
  callback.apply(_this, args);
1659
-
1660
1487
  _this.off(events, wrapper, context);
1661
1488
  };
1662
-
1663
1489
  this.on(events, wrapper, context);
1664
1490
  return this;
1665
1491
  }
@@ -1667,69 +1493,53 @@
1667
1493
  key: "off",
1668
1494
  value: function off(events, callback, context) {
1669
1495
  var event, calls, node, tail, cb, ctx;
1670
-
1671
1496
  if (!(calls = this.callbacks)) {
1672
1497
  return this;
1673
1498
  }
1674
-
1675
1499
  if (!(events || callback || context)) {
1676
1500
  delete this.callbacks;
1677
1501
  return this;
1678
1502
  }
1679
-
1680
1503
  events = events ? events.split(Events.eventSplitter) : Object.keys(calls);
1681
-
1682
1504
  while (event = events.shift()) {
1683
1505
  node = calls[event];
1684
1506
  delete calls[event];
1685
-
1686
1507
  if (!node || !(callback || context)) {
1687
1508
  continue;
1688
1509
  }
1689
-
1690
1510
  tail = node.tail;
1691
-
1692
1511
  while ((node = node.next) !== tail) {
1693
1512
  cb = node.callback;
1694
1513
  ctx = node.context;
1695
-
1696
1514
  if (callback && cb !== callback || context && ctx !== context) {
1697
1515
  this.on(event, cb, ctx);
1698
1516
  }
1699
1517
  }
1700
1518
  }
1701
-
1702
1519
  return this;
1703
1520
  }
1704
1521
  }, {
1705
1522
  key: "trigger",
1706
1523
  value: function trigger(events) {
1707
1524
  var event, node, calls, tail, rest;
1708
-
1709
1525
  if (!(calls = this.callbacks)) {
1710
1526
  return this;
1711
1527
  }
1712
-
1713
1528
  events = events.split(Events.eventSplitter);
1714
1529
  rest = [].slice.call(arguments, 1);
1715
-
1716
1530
  while (event = events.shift()) {
1717
1531
  if (node = calls[event]) {
1718
1532
  tail = node.tail;
1719
-
1720
1533
  while ((node = node.next) !== tail) {
1721
1534
  node.callback.apply(node.context || this, rest);
1722
1535
  }
1723
1536
  }
1724
1537
  }
1725
-
1726
1538
  return this;
1727
1539
  }
1728
1540
  }]);
1729
-
1730
1541
  return Events;
1731
1542
  }();
1732
-
1733
1543
  Events.eventSplitter = /\s+/;
1734
1544
 
1735
1545
  function render() {}
@@ -1739,6 +1549,7 @@
1739
1549
  current: null
1740
1550
  };
1741
1551
  }
1552
+
1742
1553
  /**
1743
1554
  * 赋值 ref
1744
1555
  * @param {Object} ref ref 对象/ref 函数/ref 字符串
@@ -1746,11 +1557,9 @@
1746
1557
  * @param {Object} component 组件实例
1747
1558
  * @param {Object} refs 字符串 ref 搜集器
1748
1559
  */
1749
-
1750
1560
  function commitAttachRef(ref, target, component, refs) {
1751
1561
  var isInit = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
1752
1562
  if (isInit && !target) return;
1753
-
1754
1563
  if ('refName' in ref && ref['refName']) {
1755
1564
  refs[ref.refName] = target;
1756
1565
  } else if ('fn' in ref && typeof ref['fn'] === 'function') {
@@ -1767,7 +1576,6 @@
1767
1576
  } else if (ref['fn'] && _typeof(ref['fn']) === 'object' && 'current' in ref['fn']) {
1768
1577
  ref['fn'].current = null;
1769
1578
  }
1770
-
1771
1579
  if ('target' in ref) delete ref['target'];
1772
1580
  });
1773
1581
  component.refs = {};
@@ -1775,29 +1583,22 @@
1775
1583
  }
1776
1584
  var RefsArray = /*#__PURE__*/function (_Array) {
1777
1585
  _inherits(RefsArray, _Array);
1778
-
1779
1586
  var _super = _createSuper(RefsArray);
1780
-
1781
1587
  /**
1782
1588
  * @param {Array} initList
1783
1589
  */
1784
1590
  function RefsArray() {
1785
1591
  var _this;
1786
-
1787
1592
  var initList = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
1788
-
1789
1593
  _classCallCheck(this, RefsArray);
1790
-
1791
1594
  _this = _super.call.apply(_super, [this].concat(_toConsumableArray(initList)));
1792
1595
  _this.inited = false;
1793
1596
  return _this;
1794
1597
  }
1795
-
1796
1598
  _createClass(RefsArray, [{
1797
1599
  key: "pushRefs",
1798
1600
  value: function pushRefs($$refs) {
1799
1601
  var _this2 = this;
1800
-
1801
1602
  if (this.inited) return;
1802
1603
  $$refs.forEach(function (ref) {
1803
1604
  return _this2.pushRef(ref);
@@ -1813,20 +1614,16 @@
1813
1614
  !isExist && this.push(ref);
1814
1615
  }
1815
1616
  }]);
1816
-
1817
1617
  return RefsArray;
1818
1618
  }( /*#__PURE__*/_wrapNativeSuper(Array));
1819
1619
  function handleLoopRef(getElementById) {
1820
1620
  return function (component, id, type, handler) {
1821
1621
  if (!component) return null;
1822
1622
  var dom = getElementById(component, id, type);
1823
-
1824
1623
  var handlerType = _typeof(handler);
1825
-
1826
1624
  if (handlerType !== 'function' && handlerType !== 'object') {
1827
1625
  return console.warn("\u5FAA\u73AF Ref \u53EA\u652F\u6301\u51FD\u6570\u6216 createRef()\uFF0C\u5F53\u524D\u7C7B\u578B\u4E3A\uFF1A".concat(handlerType));
1828
1626
  }
1829
-
1830
1627
  if (handlerType === 'object') {
1831
1628
  handler.current = dom;
1832
1629
  } else if (handlerType === 'function') {
@@ -1839,27 +1636,20 @@
1839
1636
  function Chain(requestParams) {
1840
1637
  var interceptors = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
1841
1638
  var index = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
1842
-
1843
1639
  _classCallCheck(this, Chain);
1844
-
1845
1640
  this.index = index;
1846
1641
  this.requestParams = requestParams;
1847
1642
  this.interceptors = interceptors;
1848
1643
  }
1849
-
1850
1644
  _createClass(Chain, [{
1851
1645
  key: "proceed",
1852
1646
  value: function proceed(requestParams) {
1853
1647
  this.requestParams = requestParams;
1854
-
1855
1648
  if (this.index >= this.interceptors.length) {
1856
1649
  throw new Error('chain 参数错误, 请勿直接修改 request.chain');
1857
1650
  }
1858
-
1859
1651
  var nextInterceptor = this._getNextInterceptor();
1860
-
1861
1652
  var nextChain = this._getNextChain();
1862
-
1863
1653
  var p = nextInterceptor(nextChain);
1864
1654
  var res = p["catch"](function (err) {
1865
1655
  return Promise.reject(err);
@@ -1880,23 +1670,19 @@
1880
1670
  return new Chain(this.requestParams, this.interceptors, this.index + 1);
1881
1671
  }
1882
1672
  }]);
1883
-
1884
1673
  return Chain;
1885
1674
  }();
1886
1675
 
1887
1676
  var Link = /*#__PURE__*/function () {
1888
1677
  function Link(interceptor) {
1889
1678
  _classCallCheck(this, Link);
1890
-
1891
1679
  this.taroInterceptor = interceptor;
1892
1680
  this.chain = new Chain();
1893
1681
  }
1894
-
1895
1682
  _createClass(Link, [{
1896
1683
  key: "request",
1897
1684
  value: function request(requestParams) {
1898
1685
  var _this = this;
1899
-
1900
1686
  this.chain.interceptors = this.chain.interceptors.filter(function (interceptor) {
1901
1687
  return interceptor !== _this.taroInterceptor;
1902
1688
  });
@@ -1914,7 +1700,6 @@
1914
1700
  this.chain = new Chain();
1915
1701
  }
1916
1702
  }]);
1917
-
1918
1703
  return Link;
1919
1704
  }();
1920
1705
 
@@ -1942,8 +1727,8 @@
1942
1727
  function logInterceptor(chain) {
1943
1728
  var requestParams = chain.requestParams;
1944
1729
  var method = requestParams.method,
1945
- data = requestParams.data,
1946
- url = requestParams.url;
1730
+ data = requestParams.data,
1731
+ url = requestParams.url;
1947
1732
  console.log("http ".concat(method || 'GET', " --> ").concat(url, " data: "), data);
1948
1733
  var p = chain.proceed(requestParams);
1949
1734
  var res = p.then(function (res) {
@@ -2259,31 +2044,29 @@
2259
2044
  navigateBackSmartProgram: true,
2260
2045
  preloadSubPackage: true
2261
2046
  };
2262
-
2263
2047
  function initPxTransform(config) {
2264
2048
  var _config$designWidth = config.designWidth,
2265
- designWidth = _config$designWidth === void 0 ? 700 : _config$designWidth,
2266
- _config$deviceRatio = config.deviceRatio,
2267
- deviceRatio = _config$deviceRatio === void 0 ? {
2268
- '640': 2.34 / 2,
2269
- '750': 1,
2270
- '828': 1.81 / 2
2271
- } : _config$deviceRatio;
2049
+ designWidth = _config$designWidth === void 0 ? 700 : _config$designWidth,
2050
+ _config$deviceRatio = config.deviceRatio,
2051
+ deviceRatio = _config$deviceRatio === void 0 ? {
2052
+ '640': 2.34 / 2,
2053
+ '750': 1,
2054
+ '828': 1.81 / 2
2055
+ } : _config$deviceRatio;
2272
2056
  this.config = this.config || {};
2273
2057
  this.config.designWidth = designWidth;
2274
2058
  this.config.deviceRatio = deviceRatio;
2275
2059
  }
2276
2060
 
2061
+ // Object.is polyfill
2277
2062
  // https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Object/is
2278
-
2279
2063
  function objectIs(x, y) {
2280
2064
  if (x === y) {
2281
2065
  // Steps 1-5, 7-10
2282
2066
  // Steps 6.b-6.e: +0 != -0
2283
2067
  return x !== 0 || 1 / x === 1 / y;
2284
- } // eslint-disable-next-line no-self-compare
2285
-
2286
-
2068
+ }
2069
+ // eslint-disable-next-line no-self-compare
2287
2070
  return x !== x && y !== y;
2288
2071
  }
2289
2072
  function isFunction$1(arg) {
@@ -2314,7 +2097,6 @@
2314
2097
  index: 0
2315
2098
  };
2316
2099
  }
2317
-
2318
2100
  exports.Current = my.Current;
2319
2101
  } else {
2320
2102
  exports.Current = {
@@ -2323,30 +2105,24 @@
2323
2105
  };
2324
2106
  }
2325
2107
 
2326
- function forceUpdateCallback() {//
2108
+ function forceUpdateCallback() {
2109
+ //
2327
2110
  }
2328
-
2329
2111
  function getHooks(index) {
2330
2112
  if (exports.Current.current === null) {
2331
2113
  throw new Error("invalid hooks call: hooks can only be called in a stateless component.");
2332
2114
  }
2333
-
2334
2115
  var hooks = exports.Current.current.hooks;
2335
-
2336
2116
  if (index >= hooks.length) {
2337
2117
  hooks.push({});
2338
2118
  }
2339
-
2340
2119
  return hooks[index];
2341
2120
  }
2342
-
2343
2121
  function useState(initialState) {
2344
2122
  if (isFunction$1(initialState)) {
2345
2123
  initialState = initialState();
2346
2124
  }
2347
-
2348
2125
  var hook = getHooks(exports.Current.index++);
2349
-
2350
2126
  if (!hook.state) {
2351
2127
  hook.component = exports.Current.current;
2352
2128
  hook.state = [initialState, function (action) {
@@ -2357,20 +2133,16 @@
2357
2133
  hook.component.setState({}, forceUpdateCallback);
2358
2134
  }];
2359
2135
  }
2360
-
2361
2136
  return hook.state;
2362
2137
  }
2363
-
2364
2138
  function usePageLifecycle(callback, lifecycle) {
2365
2139
  var hook = getHooks(exports.Current.index++);
2366
-
2367
2140
  if (!hook.marked) {
2368
2141
  hook.marked = true;
2369
2142
  hook.component = exports.Current.current;
2370
2143
  hook.callback = callback;
2371
2144
  var component = hook.component;
2372
2145
  var originalLifecycle = component[lifecycle];
2373
-
2374
2146
  hook.component[lifecycle] = function () {
2375
2147
  var callback = hook.callback;
2376
2148
  originalLifecycle && originalLifecycle.call.apply(originalLifecycle, [component].concat(Array.prototype.slice.call(arguments)));
@@ -2380,7 +2152,6 @@
2380
2152
  hook.callback = callback;
2381
2153
  }
2382
2154
  }
2383
-
2384
2155
  function useDidShow(callback) {
2385
2156
  usePageLifecycle(callback, 'componentDidShow');
2386
2157
  }
@@ -2413,31 +2184,25 @@
2413
2184
  }
2414
2185
  function useRouter() {
2415
2186
  var hook = getHooks(exports.Current.index++);
2416
-
2417
2187
  if (!hook.router) {
2418
2188
  hook.component = exports.Current.current;
2419
2189
  hook.router = hook.component.$router;
2420
2190
  }
2421
-
2422
2191
  return hook.router;
2423
2192
  }
2424
2193
  function useScope() {
2425
2194
  var hook = getHooks(exports.Current.index++);
2426
-
2427
2195
  if (!hook.scope) {
2428
2196
  hook.component = exports.Current.current;
2429
2197
  hook.scope = hook.component.$scope;
2430
2198
  }
2431
-
2432
2199
  return hook.scope;
2433
2200
  }
2434
2201
  function useReducer(reducer, initialState, initializer) {
2435
2202
  if (isFunction$1(initialState)) {
2436
2203
  initialState = initialState();
2437
2204
  }
2438
-
2439
2205
  var hook = getHooks(exports.Current.index++);
2440
-
2441
2206
  if (!hook.state) {
2442
2207
  hook.component = exports.Current.current;
2443
2208
  hook.state = [isUndefined(initializer) ? initialState : initializer(initialState), function (action) {
@@ -2446,34 +2211,27 @@
2446
2211
  hook.component.setState({}, forceUpdateCallback);
2447
2212
  }];
2448
2213
  }
2449
-
2450
2214
  return hook.state;
2451
2215
  }
2452
-
2453
2216
  function areDepsChanged(prevDeps, deps) {
2454
2217
  if (isNullOrUndef(prevDeps) || isNullOrUndef(deps)) {
2455
2218
  return true;
2456
2219
  }
2457
-
2458
2220
  return deps.some(function (d, i) {
2459
2221
  return !objectIs(d, prevDeps[i]);
2460
2222
  });
2461
2223
  }
2462
-
2463
2224
  function invokeEffects(component, delay) {
2464
2225
  var effects = delay ? component.effects : component.layoutEffects;
2465
2226
  effects.forEach(function (hook) {
2466
2227
  if (isFunction$1(hook.cleanup)) {
2467
2228
  hook.cleanup();
2468
2229
  }
2469
-
2470
2230
  var result = hook.effect();
2471
-
2472
2231
  if (isFunction$1(result)) {
2473
2232
  hook.cleanup = result;
2474
2233
  }
2475
2234
  });
2476
-
2477
2235
  if (delay) {
2478
2236
  component.effects = [];
2479
2237
  } else {
@@ -2481,12 +2239,10 @@
2481
2239
  }
2482
2240
  }
2483
2241
  var scheduleEffectComponents = [];
2484
-
2485
2242
  function invokeScheduleEffects(component) {
2486
2243
  if (!component._afterScheduleEffect) {
2487
2244
  component._afterScheduleEffect = true;
2488
2245
  scheduleEffectComponents.push(component);
2489
-
2490
2246
  if (scheduleEffectComponents.length === 1) {
2491
2247
  defer(function () {
2492
2248
  setTimeout(function () {
@@ -2500,18 +2256,14 @@
2500
2256
  }
2501
2257
  }
2502
2258
  }
2503
-
2504
2259
  function useEffectImpl(effect, deps, delay) {
2505
2260
  var hook = getHooks(exports.Current.index++);
2506
-
2507
2261
  if (exports.Current.current._disableEffect || !exports.Current.current.__isReady) {
2508
2262
  return;
2509
2263
  }
2510
-
2511
2264
  if (areDepsChanged(hook.deps, deps)) {
2512
2265
  hook.effect = effect;
2513
2266
  hook.deps = deps;
2514
-
2515
2267
  if (delay) {
2516
2268
  exports.Current.current.effects = exports.Current.current.effects.concat(hook);
2517
2269
  invokeScheduleEffects(exports.Current.current);
@@ -2520,7 +2272,6 @@
2520
2272
  }
2521
2273
  }
2522
2274
  }
2523
-
2524
2275
  function useEffect(effect, deps) {
2525
2276
  useEffectImpl(effect, deps, true);
2526
2277
  }
@@ -2529,24 +2280,20 @@
2529
2280
  }
2530
2281
  function useRef(initialValue) {
2531
2282
  var hook = getHooks(exports.Current.index++);
2532
-
2533
2283
  if (!hook.ref) {
2534
2284
  hook.ref = {
2535
2285
  current: initialValue
2536
2286
  };
2537
2287
  }
2538
-
2539
2288
  return hook.ref;
2540
2289
  }
2541
2290
  function useMemo(factory, deps) {
2542
2291
  var hook = getHooks(exports.Current.index++);
2543
-
2544
2292
  if (areDepsChanged(hook.deps, deps)) {
2545
2293
  hook.deps = deps;
2546
2294
  hook.callback = factory;
2547
2295
  hook.value = factory();
2548
2296
  }
2549
-
2550
2297
  return hook.value;
2551
2298
  }
2552
2299
  function useCallback(callback, deps) {
@@ -2572,13 +2319,10 @@
2572
2319
  function useContext(_ref) {
2573
2320
  var context = _ref.context;
2574
2321
  var emitter = context.emitter;
2575
-
2576
2322
  if (emitter === null) {
2577
2323
  return context._defaultValue;
2578
2324
  }
2579
-
2580
2325
  var hook = getHooks(exports.Current.index++);
2581
-
2582
2326
  if (isUndefined(hook.context)) {
2583
2327
  hook.context = true;
2584
2328
  hook.component = exports.Current.current;
@@ -2589,20 +2333,16 @@
2589
2333
  }
2590
2334
  });
2591
2335
  }
2592
-
2593
2336
  return emitter.value;
2594
2337
  }
2595
2338
 
2596
2339
  var Emitter = /*#__PURE__*/function () {
2597
2340
  function Emitter() {
2598
2341
  var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
2599
-
2600
2342
  _classCallCheck(this, Emitter);
2601
-
2602
2343
  this.value = value;
2603
2344
  this.handlers = [];
2604
2345
  }
2605
-
2606
2346
  _createClass(Emitter, [{
2607
2347
  key: "on",
2608
2348
  value: function on(handler) {
@@ -2619,18 +2359,15 @@
2619
2359
  key: "set",
2620
2360
  value: function set(value) {
2621
2361
  var _this = this;
2622
-
2623
2362
  if (objectIs(value, this.value)) {
2624
2363
  return;
2625
2364
  }
2626
-
2627
2365
  this.value = value;
2628
2366
  this.handlers.forEach(function (h) {
2629
2367
  return h(_this.value);
2630
2368
  });
2631
2369
  }
2632
2370
  }]);
2633
-
2634
2371
  return Emitter;
2635
2372
  }();
2636
2373
 
@@ -2642,17 +2379,14 @@
2642
2379
  _id: contextId,
2643
2380
  _defaultValue: defaultValue
2644
2381
  };
2645
-
2646
2382
  function Provider(newValue) {
2647
2383
  var emitter = context.emitter;
2648
-
2649
2384
  if (!emitter) {
2650
2385
  context.emitter = new Emitter(defaultValue);
2651
2386
  } else {
2652
2387
  emitter.set(newValue);
2653
2388
  }
2654
2389
  }
2655
-
2656
2390
  return {
2657
2391
  Provider: Provider,
2658
2392
  context: context
@@ -2664,42 +2398,32 @@
2664
2398
  if (x === y) {
2665
2399
  return x !== 0 || 1 / x === 1 / y;
2666
2400
  }
2667
-
2668
2401
  return x !== x && y !== y;
2669
2402
  };
2670
-
2671
2403
  function shallowEqual(obj1, obj2) {
2672
2404
  if (_typeof(obj1) !== 'object' && _typeof(obj2) !== 'object') {
2673
2405
  return obj1 === obj2;
2674
2406
  }
2675
-
2676
2407
  if (obj1 === null && obj2 === null) {
2677
2408
  return true;
2678
2409
  }
2679
-
2680
2410
  if (obj1 === null || obj2 === null) {
2681
2411
  return false;
2682
2412
  }
2683
-
2684
2413
  if (objectIs$1(obj1, obj2)) {
2685
2414
  return true;
2686
2415
  }
2687
-
2688
2416
  var obj1Keys = obj1 ? Object.keys(obj1) : [];
2689
2417
  var obj2Keys = obj2 ? Object.keys(obj2) : [];
2690
-
2691
2418
  if (obj1Keys.length !== obj2Keys.length) {
2692
2419
  return false;
2693
2420
  }
2694
-
2695
2421
  for (var i = 0; i < obj1Keys.length; i++) {
2696
2422
  var obj1KeyItem = obj1Keys[i];
2697
-
2698
2423
  if (!obj2.hasOwnProperty(obj1KeyItem) || !objectIs$1(obj1[obj1KeyItem], obj2[obj1KeyItem])) {
2699
2424
  return false;
2700
2425
  }
2701
2426
  }
2702
-
2703
2427
  return true;
2704
2428
  }
2705
2429
 
@@ -2707,18 +2431,15 @@
2707
2431
  component.prototype.shouldComponentUpdate = function (nextProps) {
2708
2432
  return isFunction$1(propsAreEqual) ? !propsAreEqual(this.props, nextProps) : !shallowEqual(this.props, nextProps);
2709
2433
  };
2710
-
2711
2434
  return component;
2712
2435
  }
2713
2436
 
2714
2437
  /* eslint-disable camelcase */
2715
2438
 
2716
-
2717
2439
  if (process.env.TARO_ENV === 'alipay') {
2718
2440
  if (!my.taroEventCenter) {
2719
2441
  my.taroEventCenter = new Events();
2720
2442
  }
2721
-
2722
2443
  exports.eventCenter = my.taroEventCenter;
2723
2444
  } else {
2724
2445
  exports.eventCenter = new Events();