@eva/plugin-evax 1.2.7-fix.1 → 1.2.7-fix.4

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.
@@ -1,408 +1,268 @@
1
- (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@eva/eva.js')) :
3
- typeof define === 'function' && define.amd ? define(['exports', '@eva/eva.js'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.EVA = global.EVA || {}, global.EVA.plugin = global.EVA.plugin || {}, global.EVA.plugin.EVAX = {}), global.EVA));
5
- }(this, (function (exports, eva_js) { 'use strict';
6
-
7
- /*! *****************************************************************************
8
- Copyright (c) Microsoft Corporation.
9
-
10
- Permission to use, copy, modify, and/or distribute this software for any
11
- purpose with or without fee is hereby granted.
12
-
13
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
14
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
15
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
16
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
17
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
18
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
19
- PERFORMANCE OF THIS SOFTWARE.
20
- ***************************************************************************** */
21
- /* global Reflect, Promise */
22
-
23
- var extendStatics = function(d, b) {
24
- extendStatics = Object.setPrototypeOf ||
25
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
26
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
27
- return extendStatics(d, b);
28
- };
29
-
30
- function __extends(d, b) {
31
- extendStatics(d, b);
32
- function __() { this.constructor = d; }
33
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
34
- }
35
-
36
- function __decorate(decorators, target, key, desc) {
37
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
38
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
39
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
40
- return c > 3 && r && Object.defineProperty(target, key, r), r;
41
- }
42
-
43
- function __values(o) {
44
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
45
- if (m) return m.call(o);
46
- if (o && typeof o.length === "number") return {
47
- next: function () {
48
- if (o && i >= o.length) o = void 0;
49
- return { value: o && o[i++], done: !o };
50
- }
51
- };
52
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
53
- }
54
-
55
- function __read(o, n) {
56
- var m = typeof Symbol === "function" && o[Symbol.iterator];
57
- if (!m) return o;
58
- var i = m.call(o), r, ar = [], e;
59
- try {
60
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
61
- }
62
- catch (error) { e = { error: error }; }
63
- finally {
64
- try {
65
- if (r && !r.done && (m = i["return"])) m.call(i);
66
- }
67
- finally { if (e) throw e.error; }
68
- }
69
- return ar;
70
- }
71
-
72
- function __spread() {
73
- for (var ar = [], i = 0; i < arguments.length; i++)
74
- ar = ar.concat(__read(arguments[i]));
75
- return ar;
76
- }
77
-
78
- var EvaXComponent = (function (_super) {
79
- __extends(EvaXComponent, _super);
80
- function EvaXComponent(gameObject) {
81
- var _this = _super.call(this, gameObject) || this;
82
- _this.events = {};
83
- return _this;
84
- }
85
- EvaXComponent.prototype.init = function (option) {
86
- if (option === void 0) { option = { events: {} }; }
87
- var events = option.events;
88
- this.events = events || {};
89
- };
90
- EvaXComponent.componentName = 'EvaX';
91
- __decorate([
92
- eva_js.decorators.IDEProp
93
- ], EvaXComponent.prototype, "events", void 0);
94
- return EvaXComponent;
95
- }(eva_js.Component));
96
- var EvaXComponent$1 = EvaXComponent;
97
-
98
- function createCommonjsModule(fn) {
99
- var module = { exports: {} };
100
- return fn(module, module.exports), module.exports;
1
+ window.EVA = window.EVA || {};
2
+ window.EVA.plugin = window.EVA.plugin || {};
3
+ var _EVA_IIFE_EVAX = function (exports, eva_js) {
4
+ 'use strict';
5
+
6
+ var _extendStatics = function extendStatics(d, b) {
7
+ _extendStatics = Object.setPrototypeOf || {
8
+ __proto__: []
9
+ } instanceof Array && function (d, b) {
10
+ d.__proto__ = b;
11
+ } || function (d, b) {
12
+ for (var p in b) {
13
+ if (b.hasOwnProperty(p)) d[p] = b[p];
14
+ }
15
+ };
16
+ return _extendStatics(d, b);
17
+ };
18
+ function __extends(d, b) {
19
+ _extendStatics(d, b);
20
+ function __() {
21
+ this.constructor = d;
22
+ }
23
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
24
+ }
25
+ function __decorate(decorators, target, key, desc) {
26
+ var c = arguments.length,
27
+ r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
28
+ d;
29
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) {
30
+ if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
31
+ }
32
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
33
+ }
34
+ function __values(o) {
35
+ var s = typeof Symbol === "function" && Symbol.iterator,
36
+ m = s && o[s],
37
+ i = 0;
38
+ if (m) return m.call(o);
39
+ if (o && typeof o.length === "number") return {
40
+ next: function next() {
41
+ if (o && i >= o.length) o = void 0;
42
+ return {
43
+ value: o && o[i++],
44
+ done: !o
45
+ };
46
+ }
47
+ };
48
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
49
+ }
50
+ function __read(o, n) {
51
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
52
+ if (!m) return o;
53
+ var i = m.call(o),
54
+ r,
55
+ ar = [],
56
+ e;
57
+ try {
58
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) {
59
+ ar.push(r.value);
60
+ }
61
+ } catch (error) {
62
+ e = {
63
+ error: error
64
+ };
65
+ } finally {
66
+ try {
67
+ if (r && !r.done && (m = i["return"])) m.call(i);
68
+ } finally {
69
+ if (e) throw e.error;
70
+ }
101
71
  }
72
+ return ar;
73
+ }
74
+ function __spread() {
75
+ for (var ar = [], i = 0; i < arguments.length; i++) {
76
+ ar = ar.concat(__read(arguments[i]));
77
+ }
78
+ return ar;
79
+ }
80
+ var EvaXComponent = function (_super) {
81
+ __extends(EvaXComponent, _super);
82
+ function EvaXComponent(gameObject) {
83
+ var _this = _super.call(this, gameObject) || this;
84
+ _this.events = {};
85
+ return _this;
86
+ }
87
+ EvaXComponent.prototype.init = function (option) {
88
+ if (option === void 0) {
89
+ option = {
90
+ events: {}
91
+ };
92
+ }
93
+ var events = option.events;
94
+ this.events = events || {};
95
+ };
96
+ EvaXComponent.componentName = 'EvaX';
97
+ return EvaXComponent;
98
+ }(eva_js.Component);
99
+ var EvaXComponent$1 = EvaXComponent;
100
+ function createCommonjsModule(fn) {
101
+ var module = {
102
+ exports: {}
103
+ };
104
+ return fn(module, module.exports), module.exports;
105
+ }
106
+ var eventemitter3 = createCommonjsModule(function (module) {
107
+ var has = Object.prototype.hasOwnProperty,
108
+ prefix = '~';
102
109
 
103
- var eventemitter3 = createCommonjsModule(function (module) {
104
-
105
- var has = Object.prototype.hasOwnProperty
106
- , prefix = '~';
107
-
108
- /**
109
- * Constructor to create a storage for our `EE` objects.
110
- * An `Events` instance is a plain object whose properties are event names.
111
- *
112
- * @constructor
113
- * @private
114
- */
115
110
  function Events() {}
116
111
 
117
- //
118
- // We try to not inherit from `Object.prototype`. In some engines creating an
119
- // instance in this way is faster than calling `Object.create(null)` directly.
120
- // If `Object.create(null)` is not supported we prefix the event names with a
121
- // character to make sure that the built-in object properties are not
122
- // overridden or used as an attack vector.
123
- //
124
112
  if (Object.create) {
125
113
  Events.prototype = Object.create(null);
126
114
 
127
- //
128
- // This hack is needed because the `__proto__` property is still inherited in
129
- // some old browsers like Android 4, iPhone 5.1, Opera 11 and Safari 5.
130
- //
131
115
  if (!new Events().__proto__) prefix = false;
132
116
  }
133
117
 
134
- /**
135
- * Representation of a single event listener.
136
- *
137
- * @param {Function} fn The listener function.
138
- * @param {*} context The context to invoke the listener with.
139
- * @param {Boolean} [once=false] Specify if the listener is a one-time listener.
140
- * @constructor
141
- * @private
142
- */
143
118
  function EE(fn, context, once) {
144
119
  this.fn = fn;
145
120
  this.context = context;
146
121
  this.once = once || false;
147
122
  }
148
123
 
149
- /**
150
- * Add a listener for a given event.
151
- *
152
- * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.
153
- * @param {(String|Symbol)} event The event name.
154
- * @param {Function} fn The listener function.
155
- * @param {*} context The context to invoke the listener with.
156
- * @param {Boolean} once Specify if the listener is a one-time listener.
157
- * @returns {EventEmitter}
158
- * @private
159
- */
160
124
  function addListener(emitter, event, fn, context, once) {
161
125
  if (typeof fn !== 'function') {
162
126
  throw new TypeError('The listener must be a function');
163
127
  }
164
-
165
- var listener = new EE(fn, context || emitter, once)
166
- , evt = prefix ? prefix + event : event;
167
-
168
- if (!emitter._events[evt]) emitter._events[evt] = listener, emitter._eventsCount++;
169
- else if (!emitter._events[evt].fn) emitter._events[evt].push(listener);
170
- else emitter._events[evt] = [emitter._events[evt], listener];
171
-
128
+ var listener = new EE(fn, context || emitter, once),
129
+ evt = prefix ? prefix + event : event;
130
+ if (!emitter._events[evt]) emitter._events[evt] = listener, emitter._eventsCount++;else if (!emitter._events[evt].fn) emitter._events[evt].push(listener);else emitter._events[evt] = [emitter._events[evt], listener];
172
131
  return emitter;
173
132
  }
174
133
 
175
- /**
176
- * Clear event by name.
177
- *
178
- * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.
179
- * @param {(String|Symbol)} evt The Event name.
180
- * @private
181
- */
182
134
  function clearEvent(emitter, evt) {
183
- if (--emitter._eventsCount === 0) emitter._events = new Events();
184
- else delete emitter._events[evt];
135
+ if (--emitter._eventsCount === 0) emitter._events = new Events();else delete emitter._events[evt];
185
136
  }
186
137
 
187
- /**
188
- * Minimal `EventEmitter` interface that is molded against the Node.js
189
- * `EventEmitter` interface.
190
- *
191
- * @constructor
192
- * @public
193
- */
194
138
  function EventEmitter() {
195
139
  this._events = new Events();
196
140
  this._eventsCount = 0;
197
141
  }
198
142
 
199
- /**
200
- * Return an array listing the events for which the emitter has registered
201
- * listeners.
202
- *
203
- * @returns {Array}
204
- * @public
205
- */
206
143
  EventEmitter.prototype.eventNames = function eventNames() {
207
- var names = []
208
- , events
209
- , name;
210
-
144
+ var names = [],
145
+ events,
146
+ name;
211
147
  if (this._eventsCount === 0) return names;
212
-
213
- for (name in (events = this._events)) {
148
+ for (name in events = this._events) {
214
149
  if (has.call(events, name)) names.push(prefix ? name.slice(1) : name);
215
150
  }
216
-
217
151
  if (Object.getOwnPropertySymbols) {
218
152
  return names.concat(Object.getOwnPropertySymbols(events));
219
153
  }
220
-
221
154
  return names;
222
155
  };
223
156
 
224
- /**
225
- * Return the listeners registered for a given event.
226
- *
227
- * @param {(String|Symbol)} event The event name.
228
- * @returns {Array} The registered listeners.
229
- * @public
230
- */
231
157
  EventEmitter.prototype.listeners = function listeners(event) {
232
- var evt = prefix ? prefix + event : event
233
- , handlers = this._events[evt];
234
-
158
+ var evt = prefix ? prefix + event : event,
159
+ handlers = this._events[evt];
235
160
  if (!handlers) return [];
236
161
  if (handlers.fn) return [handlers.fn];
237
-
238
162
  for (var i = 0, l = handlers.length, ee = new Array(l); i < l; i++) {
239
163
  ee[i] = handlers[i].fn;
240
164
  }
241
-
242
165
  return ee;
243
166
  };
244
167
 
245
- /**
246
- * Return the number of listeners listening to a given event.
247
- *
248
- * @param {(String|Symbol)} event The event name.
249
- * @returns {Number} The number of listeners.
250
- * @public
251
- */
252
168
  EventEmitter.prototype.listenerCount = function listenerCount(event) {
253
- var evt = prefix ? prefix + event : event
254
- , listeners = this._events[evt];
255
-
169
+ var evt = prefix ? prefix + event : event,
170
+ listeners = this._events[evt];
256
171
  if (!listeners) return 0;
257
172
  if (listeners.fn) return 1;
258
173
  return listeners.length;
259
174
  };
260
175
 
261
- /**
262
- * Calls each of the listeners registered for a given event.
263
- *
264
- * @param {(String|Symbol)} event The event name.
265
- * @returns {Boolean} `true` if the event had listeners, else `false`.
266
- * @public
267
- */
268
176
  EventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) {
269
177
  var evt = prefix ? prefix + event : event;
270
-
271
178
  if (!this._events[evt]) return false;
272
-
273
- var listeners = this._events[evt]
274
- , len = arguments.length
275
- , args
276
- , i;
277
-
179
+ var listeners = this._events[evt],
180
+ len = arguments.length,
181
+ args,
182
+ i;
278
183
  if (listeners.fn) {
279
184
  if (listeners.once) this.removeListener(event, listeners.fn, undefined, true);
280
-
281
185
  switch (len) {
282
- case 1: return listeners.fn.call(listeners.context), true;
283
- case 2: return listeners.fn.call(listeners.context, a1), true;
284
- case 3: return listeners.fn.call(listeners.context, a1, a2), true;
285
- case 4: return listeners.fn.call(listeners.context, a1, a2, a3), true;
286
- case 5: return listeners.fn.call(listeners.context, a1, a2, a3, a4), true;
287
- case 6: return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;
186
+ case 1:
187
+ return listeners.fn.call(listeners.context), true;
188
+ case 2:
189
+ return listeners.fn.call(listeners.context, a1), true;
190
+ case 3:
191
+ return listeners.fn.call(listeners.context, a1, a2), true;
192
+ case 4:
193
+ return listeners.fn.call(listeners.context, a1, a2, a3), true;
194
+ case 5:
195
+ return listeners.fn.call(listeners.context, a1, a2, a3, a4), true;
196
+ case 6:
197
+ return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;
288
198
  }
289
-
290
- for (i = 1, args = new Array(len -1); i < len; i++) {
199
+ for (i = 1, args = new Array(len - 1); i < len; i++) {
291
200
  args[i - 1] = arguments[i];
292
201
  }
293
-
294
202
  listeners.fn.apply(listeners.context, args);
295
203
  } else {
296
- var length = listeners.length
297
- , j;
298
-
204
+ var length = listeners.length,
205
+ j;
299
206
  for (i = 0; i < length; i++) {
300
207
  if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true);
301
-
302
208
  switch (len) {
303
- case 1: listeners[i].fn.call(listeners[i].context); break;
304
- case 2: listeners[i].fn.call(listeners[i].context, a1); break;
305
- case 3: listeners[i].fn.call(listeners[i].context, a1, a2); break;
306
- case 4: listeners[i].fn.call(listeners[i].context, a1, a2, a3); break;
209
+ case 1:
210
+ listeners[i].fn.call(listeners[i].context);
211
+ break;
212
+ case 2:
213
+ listeners[i].fn.call(listeners[i].context, a1);
214
+ break;
215
+ case 3:
216
+ listeners[i].fn.call(listeners[i].context, a1, a2);
217
+ break;
218
+ case 4:
219
+ listeners[i].fn.call(listeners[i].context, a1, a2, a3);
220
+ break;
307
221
  default:
308
- if (!args) for (j = 1, args = new Array(len -1); j < len; j++) {
222
+ if (!args) for (j = 1, args = new Array(len - 1); j < len; j++) {
309
223
  args[j - 1] = arguments[j];
310
224
  }
311
-
312
225
  listeners[i].fn.apply(listeners[i].context, args);
313
226
  }
314
227
  }
315
228
  }
316
-
317
229
  return true;
318
230
  };
319
231
 
320
- /**
321
- * Add a listener for a given event.
322
- *
323
- * @param {(String|Symbol)} event The event name.
324
- * @param {Function} fn The listener function.
325
- * @param {*} [context=this] The context to invoke the listener with.
326
- * @returns {EventEmitter} `this`.
327
- * @public
328
- */
329
232
  EventEmitter.prototype.on = function on(event, fn, context) {
330
233
  return addListener(this, event, fn, context, false);
331
234
  };
332
235
 
333
- /**
334
- * Add a one-time listener for a given event.
335
- *
336
- * @param {(String|Symbol)} event The event name.
337
- * @param {Function} fn The listener function.
338
- * @param {*} [context=this] The context to invoke the listener with.
339
- * @returns {EventEmitter} `this`.
340
- * @public
341
- */
342
236
  EventEmitter.prototype.once = function once(event, fn, context) {
343
237
  return addListener(this, event, fn, context, true);
344
238
  };
345
239
 
346
- /**
347
- * Remove the listeners of a given event.
348
- *
349
- * @param {(String|Symbol)} event The event name.
350
- * @param {Function} fn Only remove the listeners that match this function.
351
- * @param {*} context Only remove the listeners that have this context.
352
- * @param {Boolean} once Only remove one-time listeners.
353
- * @returns {EventEmitter} `this`.
354
- * @public
355
- */
356
240
  EventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) {
357
241
  var evt = prefix ? prefix + event : event;
358
-
359
242
  if (!this._events[evt]) return this;
360
243
  if (!fn) {
361
244
  clearEvent(this, evt);
362
245
  return this;
363
246
  }
364
-
365
247
  var listeners = this._events[evt];
366
-
367
248
  if (listeners.fn) {
368
- if (
369
- listeners.fn === fn &&
370
- (!once || listeners.once) &&
371
- (!context || listeners.context === context)
372
- ) {
249
+ if (listeners.fn === fn && (!once || listeners.once) && (!context || listeners.context === context)) {
373
250
  clearEvent(this, evt);
374
251
  }
375
252
  } else {
376
253
  for (var i = 0, events = [], length = listeners.length; i < length; i++) {
377
- if (
378
- listeners[i].fn !== fn ||
379
- (once && !listeners[i].once) ||
380
- (context && listeners[i].context !== context)
381
- ) {
254
+ if (listeners[i].fn !== fn || once && !listeners[i].once || context && listeners[i].context !== context) {
382
255
  events.push(listeners[i]);
383
256
  }
384
257
  }
385
258
 
386
- //
387
- // Reset the array, or remove it completely if we have no more listeners.
388
- //
389
- if (events.length) this._events[evt] = events.length === 1 ? events[0] : events;
390
- else clearEvent(this, evt);
259
+ if (events.length) this._events[evt] = events.length === 1 ? events[0] : events;else clearEvent(this, evt);
391
260
  }
392
-
393
261
  return this;
394
262
  };
395
263
 
396
- /**
397
- * Remove all listeners, or those of the specified event.
398
- *
399
- * @param {(String|Symbol)} [event] The event name.
400
- * @returns {EventEmitter} `this`.
401
- * @public
402
- */
403
264
  EventEmitter.prototype.removeAllListeners = function removeAllListeners(event) {
404
265
  var evt;
405
-
406
266
  if (event) {
407
267
  evt = prefix ? prefix + event : event;
408
268
  if (this._events[evt]) clearEvent(this, evt);
@@ -410,2551 +270,1330 @@
410
270
  this._events = new Events();
411
271
  this._eventsCount = 0;
412
272
  }
413
-
414
273
  return this;
415
274
  };
416
275
 
417
- //
418
- // Alias methods names because people roll like that.
419
- //
420
276
  EventEmitter.prototype.off = EventEmitter.prototype.removeListener;
421
277
  EventEmitter.prototype.addListener = EventEmitter.prototype.on;
422
278
 
423
- //
424
- // Expose the prefix.
425
- //
426
279
  EventEmitter.prefixed = prefix;
427
280
 
428
- //
429
- // Allow `EventEmitter` to be imported as module namespace.
430
- //
431
281
  EventEmitter.EventEmitter = EventEmitter;
432
282
 
433
- //
434
- // Expose the module.
435
- //
436
283
  {
437
284
  module.exports = EventEmitter;
438
285
  }
439
- });
286
+ });
287
+ var EventEmitter = eventemitter3;
440
288
 
441
- var EventEmitter = eventemitter3;
442
-
443
- /**
444
- * Removes all key-value entries from the list cache.
445
- *
446
- * @private
447
- * @name clear
448
- * @memberOf ListCache
449
- */
450
- function listCacheClear() {
451
- this.__data__ = [];
452
- this.size = 0;
453
- }
289
+ function listCacheClear() {
290
+ this.__data__ = [];
291
+ this.size = 0;
292
+ }
454
293
 
455
- /**
456
- * Performs a
457
- * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
458
- * comparison between two values to determine if they are equivalent.
459
- *
460
- * @static
461
- * @memberOf _
462
- * @since 4.0.0
463
- * @category Lang
464
- * @param {*} value The value to compare.
465
- * @param {*} other The other value to compare.
466
- * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
467
- * @example
468
- *
469
- * var object = { 'a': 1 };
470
- * var other = { 'a': 1 };
471
- *
472
- * _.eq(object, object);
473
- * // => true
474
- *
475
- * _.eq(object, other);
476
- * // => false
477
- *
478
- * _.eq('a', 'a');
479
- * // => true
480
- *
481
- * _.eq('a', Object('a'));
482
- * // => false
483
- *
484
- * _.eq(NaN, NaN);
485
- * // => true
486
- */
487
- function eq(value, other) {
488
- return value === other || (value !== value && other !== other);
489
- }
294
+ function eq(value, other) {
295
+ return value === other || value !== value && other !== other;
296
+ }
490
297
 
491
- /**
492
- * Gets the index at which the `key` is found in `array` of key-value pairs.
493
- *
494
- * @private
495
- * @param {Array} array The array to inspect.
496
- * @param {*} key The key to search for.
497
- * @returns {number} Returns the index of the matched value, else `-1`.
498
- */
499
- function assocIndexOf(array, key) {
500
- var length = array.length;
501
- while (length--) {
502
- if (eq(array[length][0], key)) {
503
- return length;
504
- }
298
+ function assocIndexOf(array, key) {
299
+ var length = array.length;
300
+ while (length--) {
301
+ if (eq(array[length][0], key)) {
302
+ return length;
505
303
  }
506
- return -1;
507
304
  }
305
+ return -1;
306
+ }
508
307
 
509
- /** Used for built-in method references. */
510
- var arrayProto = Array.prototype;
511
-
512
- /** Built-in value references. */
513
- var splice = arrayProto.splice;
514
-
515
- /**
516
- * Removes `key` and its value from the list cache.
517
- *
518
- * @private
519
- * @name delete
520
- * @memberOf ListCache
521
- * @param {string} key The key of the value to remove.
522
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
523
- */
524
- function listCacheDelete(key) {
525
- var data = this.__data__,
526
- index = assocIndexOf(data, key);
527
-
528
- if (index < 0) {
529
- return false;
530
- }
531
- var lastIndex = data.length - 1;
532
- if (index == lastIndex) {
533
- data.pop();
534
- } else {
535
- splice.call(data, index, 1);
536
- }
537
- --this.size;
538
- return true;
539
- }
308
+ var arrayProto = Array.prototype;
540
309
 
541
- /**
542
- * Gets the list cache value for `key`.
543
- *
544
- * @private
545
- * @name get
546
- * @memberOf ListCache
547
- * @param {string} key The key of the value to get.
548
- * @returns {*} Returns the entry value.
549
- */
550
- function listCacheGet(key) {
551
- var data = this.__data__,
552
- index = assocIndexOf(data, key);
553
-
554
- return index < 0 ? undefined : data[index][1];
555
- }
310
+ var splice = arrayProto.splice;
556
311
 
557
- /**
558
- * Checks if a list cache value for `key` exists.
559
- *
560
- * @private
561
- * @name has
562
- * @memberOf ListCache
563
- * @param {string} key The key of the entry to check.
564
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
565
- */
566
- function listCacheHas(key) {
567
- return assocIndexOf(this.__data__, key) > -1;
312
+ function listCacheDelete(key) {
313
+ var data = this.__data__,
314
+ index = assocIndexOf(data, key);
315
+ if (index < 0) {
316
+ return false;
568
317
  }
569
-
570
- /**
571
- * Sets the list cache `key` to `value`.
572
- *
573
- * @private
574
- * @name set
575
- * @memberOf ListCache
576
- * @param {string} key The key of the value to set.
577
- * @param {*} value The value to set.
578
- * @returns {Object} Returns the list cache instance.
579
- */
580
- function listCacheSet(key, value) {
581
- var data = this.__data__,
582
- index = assocIndexOf(data, key);
583
-
584
- if (index < 0) {
585
- ++this.size;
586
- data.push([key, value]);
318
+ var lastIndex = data.length - 1;
319
+ if (index == lastIndex) {
320
+ data.pop();
321
+ } else {
322
+ splice.call(data, index, 1);
323
+ }
324
+ --this.size;
325
+ return true;
326
+ }
327
+
328
+ function listCacheGet(key) {
329
+ var data = this.__data__,
330
+ index = assocIndexOf(data, key);
331
+ return index < 0 ? undefined : data[index][1];
332
+ }
333
+
334
+ function listCacheHas(key) {
335
+ return assocIndexOf(this.__data__, key) > -1;
336
+ }
337
+
338
+ function listCacheSet(key, value) {
339
+ var data = this.__data__,
340
+ index = assocIndexOf(data, key);
341
+ if (index < 0) {
342
+ ++this.size;
343
+ data.push([key, value]);
344
+ } else {
345
+ data[index][1] = value;
346
+ }
347
+ return this;
348
+ }
349
+
350
+ function ListCache(entries) {
351
+ var index = -1,
352
+ length = entries == null ? 0 : entries.length;
353
+ this.clear();
354
+ while (++index < length) {
355
+ var entry = entries[index];
356
+ this.set(entry[0], entry[1]);
357
+ }
358
+ }
359
+
360
+ ListCache.prototype.clear = listCacheClear;
361
+ ListCache.prototype['delete'] = listCacheDelete;
362
+ ListCache.prototype.get = listCacheGet;
363
+ ListCache.prototype.has = listCacheHas;
364
+ ListCache.prototype.set = listCacheSet;
365
+
366
+ function stackClear() {
367
+ this.__data__ = new ListCache();
368
+ this.size = 0;
369
+ }
370
+
371
+ function stackDelete(key) {
372
+ var data = this.__data__,
373
+ result = data['delete'](key);
374
+ this.size = data.size;
375
+ return result;
376
+ }
377
+
378
+ function stackGet(key) {
379
+ return this.__data__.get(key);
380
+ }
381
+
382
+ function stackHas(key) {
383
+ return this.__data__.has(key);
384
+ }
385
+
386
+ var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
387
+ var freeGlobal$1 = freeGlobal;
388
+
389
+ var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
390
+
391
+ var root = freeGlobal$1 || freeSelf || Function('return this')();
392
+ var root$1 = root;
393
+
394
+ var Symbol$1 = root$1.Symbol;
395
+ var Symbol$2 = Symbol$1;
396
+
397
+ var objectProto$c = Object.prototype;
398
+
399
+ var hasOwnProperty$9 = objectProto$c.hasOwnProperty;
400
+
401
+ var nativeObjectToString$1 = objectProto$c.toString;
402
+
403
+ var symToStringTag$1 = Symbol$2 ? Symbol$2.toStringTag : undefined;
404
+
405
+ function getRawTag(value) {
406
+ var isOwn = hasOwnProperty$9.call(value, symToStringTag$1),
407
+ tag = value[symToStringTag$1];
408
+ try {
409
+ value[symToStringTag$1] = undefined;
410
+ var unmasked = true;
411
+ } catch (e) {}
412
+ var result = nativeObjectToString$1.call(value);
413
+ if (unmasked) {
414
+ if (isOwn) {
415
+ value[symToStringTag$1] = tag;
587
416
  } else {
588
- data[index][1] = value;
589
- }
590
- return this;
591
- }
592
-
593
- /**
594
- * Creates an list cache object.
595
- *
596
- * @private
597
- * @constructor
598
- * @param {Array} [entries] The key-value pairs to cache.
599
- */
600
- function ListCache(entries) {
601
- var index = -1,
602
- length = entries == null ? 0 : entries.length;
603
-
604
- this.clear();
605
- while (++index < length) {
606
- var entry = entries[index];
607
- this.set(entry[0], entry[1]);
417
+ delete value[symToStringTag$1];
608
418
  }
609
419
  }
420
+ return result;
421
+ }
610
422
 
611
- // Add methods to `ListCache`.
612
- ListCache.prototype.clear = listCacheClear;
613
- ListCache.prototype['delete'] = listCacheDelete;
614
- ListCache.prototype.get = listCacheGet;
615
- ListCache.prototype.has = listCacheHas;
616
- ListCache.prototype.set = listCacheSet;
617
-
618
- /**
619
- * Removes all key-value entries from the stack.
620
- *
621
- * @private
622
- * @name clear
623
- * @memberOf Stack
624
- */
625
- function stackClear() {
626
- this.__data__ = new ListCache;
627
- this.size = 0;
628
- }
629
-
630
- /**
631
- * Removes `key` and its value from the stack.
632
- *
633
- * @private
634
- * @name delete
635
- * @memberOf Stack
636
- * @param {string} key The key of the value to remove.
637
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
638
- */
639
- function stackDelete(key) {
640
- var data = this.__data__,
641
- result = data['delete'](key);
642
-
643
- this.size = data.size;
644
- return result;
645
- }
646
-
647
- /**
648
- * Gets the stack value for `key`.
649
- *
650
- * @private
651
- * @name get
652
- * @memberOf Stack
653
- * @param {string} key The key of the value to get.
654
- * @returns {*} Returns the entry value.
655
- */
656
- function stackGet(key) {
657
- return this.__data__.get(key);
658
- }
423
+ var objectProto$b = Object.prototype;
659
424
 
660
- /**
661
- * Checks if a stack value for `key` exists.
662
- *
663
- * @private
664
- * @name has
665
- * @memberOf Stack
666
- * @param {string} key The key of the entry to check.
667
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
668
- */
669
- function stackHas(key) {
670
- return this.__data__.has(key);
671
- }
425
+ var nativeObjectToString = objectProto$b.toString;
672
426
 
673
- /** Detect free variable `global` from Node.js. */
674
- var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
427
+ function objectToString(value) {
428
+ return nativeObjectToString.call(value);
429
+ }
675
430
 
676
- var freeGlobal$1 = freeGlobal;
431
+ var nullTag = '[object Null]',
432
+ undefinedTag = '[object Undefined]';
677
433
 
678
- /** Detect free variable `self`. */
679
- var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
434
+ var symToStringTag = Symbol$2 ? Symbol$2.toStringTag : undefined;
680
435
 
681
- /** Used as a reference to the global object. */
682
- var root = freeGlobal$1 || freeSelf || Function('return this')();
436
+ function baseGetTag(value) {
437
+ if (value == null) {
438
+ return value === undefined ? undefinedTag : nullTag;
439
+ }
440
+ return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);
441
+ }
683
442
 
684
- var root$1 = root;
443
+ function isObject(value) {
444
+ var type = typeof value;
445
+ return value != null && (type == 'object' || type == 'function');
446
+ }
685
447
 
686
- /** Built-in value references. */
687
- var Symbol$1 = root$1.Symbol;
448
+ var asyncTag = '[object AsyncFunction]',
449
+ funcTag$2 = '[object Function]',
450
+ genTag$1 = '[object GeneratorFunction]',
451
+ proxyTag = '[object Proxy]';
688
452
 
689
- var Symbol$2 = Symbol$1;
453
+ function isFunction(value) {
454
+ if (!isObject(value)) {
455
+ return false;
456
+ }
457
+ var tag = baseGetTag(value);
458
+ return tag == funcTag$2 || tag == genTag$1 || tag == asyncTag || tag == proxyTag;
459
+ }
690
460
 
691
- /** Used for built-in method references. */
692
- var objectProto$c = Object.prototype;
461
+ var coreJsData = root$1['__core-js_shared__'];
462
+ var coreJsData$1 = coreJsData;
693
463
 
694
- /** Used to check objects for own properties. */
695
- var hasOwnProperty$9 = objectProto$c.hasOwnProperty;
464
+ var maskSrcKey = function () {
465
+ var uid = /[^.]+$/.exec(coreJsData$1 && coreJsData$1.keys && coreJsData$1.keys.IE_PROTO || '');
466
+ return uid ? 'Symbol(src)_1.' + uid : '';
467
+ }();
696
468
 
697
- /**
698
- * Used to resolve the
699
- * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
700
- * of values.
701
- */
702
- var nativeObjectToString$1 = objectProto$c.toString;
469
+ function isMasked(func) {
470
+ return !!maskSrcKey && maskSrcKey in func;
471
+ }
703
472
 
704
- /** Built-in value references. */
705
- var symToStringTag$1 = Symbol$2 ? Symbol$2.toStringTag : undefined;
473
+ var funcProto$1 = Function.prototype;
706
474
 
707
- /**
708
- * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
709
- *
710
- * @private
711
- * @param {*} value The value to query.
712
- * @returns {string} Returns the raw `toStringTag`.
713
- */
714
- function getRawTag(value) {
715
- var isOwn = hasOwnProperty$9.call(value, symToStringTag$1),
716
- tag = value[symToStringTag$1];
475
+ var funcToString$1 = funcProto$1.toString;
717
476
 
477
+ function toSource(func) {
478
+ if (func != null) {
718
479
  try {
719
- value[symToStringTag$1] = undefined;
720
- var unmasked = true;
480
+ return funcToString$1.call(func);
481
+ } catch (e) {}
482
+ try {
483
+ return func + '';
721
484
  } catch (e) {}
722
-
723
- var result = nativeObjectToString$1.call(value);
724
- if (unmasked) {
725
- if (isOwn) {
726
- value[symToStringTag$1] = tag;
727
- } else {
728
- delete value[symToStringTag$1];
729
- }
730
- }
731
- return result;
732
485
  }
486
+ return '';
487
+ }
733
488
 
734
- /** Used for built-in method references. */
735
- var objectProto$b = Object.prototype;
736
-
737
- /**
738
- * Used to resolve the
739
- * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
740
- * of values.
741
- */
742
- var nativeObjectToString = objectProto$b.toString;
743
-
744
- /**
745
- * Converts `value` to a string using `Object.prototype.toString`.
746
- *
747
- * @private
748
- * @param {*} value The value to convert.
749
- * @returns {string} Returns the converted string.
750
- */
751
- function objectToString(value) {
752
- return nativeObjectToString.call(value);
753
- }
489
+ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
754
490
 
755
- /** `Object#toString` result references. */
756
- var nullTag = '[object Null]',
757
- undefinedTag = '[object Undefined]';
758
-
759
- /** Built-in value references. */
760
- var symToStringTag = Symbol$2 ? Symbol$2.toStringTag : undefined;
761
-
762
- /**
763
- * The base implementation of `getTag` without fallbacks for buggy environments.
764
- *
765
- * @private
766
- * @param {*} value The value to query.
767
- * @returns {string} Returns the `toStringTag`.
768
- */
769
- function baseGetTag(value) {
770
- if (value == null) {
771
- return value === undefined ? undefinedTag : nullTag;
772
- }
773
- return (symToStringTag && symToStringTag in Object(value))
774
- ? getRawTag(value)
775
- : objectToString(value);
776
- }
491
+ var reIsHostCtor = /^\[object .+?Constructor\]$/;
777
492
 
778
- /**
779
- * Checks if `value` is the
780
- * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
781
- * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
782
- *
783
- * @static
784
- * @memberOf _
785
- * @since 0.1.0
786
- * @category Lang
787
- * @param {*} value The value to check.
788
- * @returns {boolean} Returns `true` if `value` is an object, else `false`.
789
- * @example
790
- *
791
- * _.isObject({});
792
- * // => true
793
- *
794
- * _.isObject([1, 2, 3]);
795
- * // => true
796
- *
797
- * _.isObject(_.noop);
798
- * // => true
799
- *
800
- * _.isObject(null);
801
- * // => false
802
- */
803
- function isObject(value) {
804
- var type = typeof value;
805
- return value != null && (type == 'object' || type == 'function');
806
- }
493
+ var funcProto = Function.prototype,
494
+ objectProto$a = Object.prototype;
807
495
 
808
- /** `Object#toString` result references. */
809
- var asyncTag = '[object AsyncFunction]',
810
- funcTag$2 = '[object Function]',
811
- genTag$1 = '[object GeneratorFunction]',
812
- proxyTag = '[object Proxy]';
813
-
814
- /**
815
- * Checks if `value` is classified as a `Function` object.
816
- *
817
- * @static
818
- * @memberOf _
819
- * @since 0.1.0
820
- * @category Lang
821
- * @param {*} value The value to check.
822
- * @returns {boolean} Returns `true` if `value` is a function, else `false`.
823
- * @example
824
- *
825
- * _.isFunction(_);
826
- * // => true
827
- *
828
- * _.isFunction(/abc/);
829
- * // => false
830
- */
831
- function isFunction(value) {
832
- if (!isObject(value)) {
833
- return false;
834
- }
835
- // The use of `Object#toString` avoids issues with the `typeof` operator
836
- // in Safari 9 which returns 'object' for typed arrays and other constructors.
837
- var tag = baseGetTag(value);
838
- return tag == funcTag$2 || tag == genTag$1 || tag == asyncTag || tag == proxyTag;
839
- }
496
+ var funcToString = funcProto.toString;
840
497
 
841
- /** Used to detect overreaching core-js shims. */
842
- var coreJsData = root$1['__core-js_shared__'];
843
-
844
- var coreJsData$1 = coreJsData;
845
-
846
- /** Used to detect methods masquerading as native. */
847
- var maskSrcKey = (function() {
848
- var uid = /[^.]+$/.exec(coreJsData$1 && coreJsData$1.keys && coreJsData$1.keys.IE_PROTO || '');
849
- return uid ? ('Symbol(src)_1.' + uid) : '';
850
- }());
851
-
852
- /**
853
- * Checks if `func` has its source masked.
854
- *
855
- * @private
856
- * @param {Function} func The function to check.
857
- * @returns {boolean} Returns `true` if `func` is masked, else `false`.
858
- */
859
- function isMasked(func) {
860
- return !!maskSrcKey && (maskSrcKey in func);
861
- }
498
+ var hasOwnProperty$8 = objectProto$a.hasOwnProperty;
862
499
 
863
- /** Used for built-in method references. */
864
- var funcProto$1 = Function.prototype;
865
-
866
- /** Used to resolve the decompiled source of functions. */
867
- var funcToString$1 = funcProto$1.toString;
868
-
869
- /**
870
- * Converts `func` to its source code.
871
- *
872
- * @private
873
- * @param {Function} func The function to convert.
874
- * @returns {string} Returns the source code.
875
- */
876
- function toSource(func) {
877
- if (func != null) {
878
- try {
879
- return funcToString$1.call(func);
880
- } catch (e) {}
881
- try {
882
- return (func + '');
883
- } catch (e) {}
884
- }
885
- return '';
886
- }
500
+ var reIsNative = RegExp('^' + funcToString.call(hasOwnProperty$8).replace(reRegExpChar, '\\$&').replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$');
887
501
 
888
- /**
889
- * Used to match `RegExp`
890
- * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
891
- */
892
- var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
893
-
894
- /** Used to detect host constructors (Safari). */
895
- var reIsHostCtor = /^\[object .+?Constructor\]$/;
896
-
897
- /** Used for built-in method references. */
898
- var funcProto = Function.prototype,
899
- objectProto$a = Object.prototype;
900
-
901
- /** Used to resolve the decompiled source of functions. */
902
- var funcToString = funcProto.toString;
903
-
904
- /** Used to check objects for own properties. */
905
- var hasOwnProperty$8 = objectProto$a.hasOwnProperty;
906
-
907
- /** Used to detect if a method is native. */
908
- var reIsNative = RegExp('^' +
909
- funcToString.call(hasOwnProperty$8).replace(reRegExpChar, '\\$&')
910
- .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
911
- );
912
-
913
- /**
914
- * The base implementation of `_.isNative` without bad shim checks.
915
- *
916
- * @private
917
- * @param {*} value The value to check.
918
- * @returns {boolean} Returns `true` if `value` is a native function,
919
- * else `false`.
920
- */
921
- function baseIsNative(value) {
922
- if (!isObject(value) || isMasked(value)) {
923
- return false;
924
- }
925
- var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
926
- return pattern.test(toSource(value));
502
+ function baseIsNative(value) {
503
+ if (!isObject(value) || isMasked(value)) {
504
+ return false;
927
505
  }
506
+ var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
507
+ return pattern.test(toSource(value));
508
+ }
928
509
 
929
- /**
930
- * Gets the value at `key` of `object`.
931
- *
932
- * @private
933
- * @param {Object} [object] The object to query.
934
- * @param {string} key The key of the property to get.
935
- * @returns {*} Returns the property value.
936
- */
937
- function getValue(object, key) {
938
- return object == null ? undefined : object[key];
939
- }
510
+ function getValue(object, key) {
511
+ return object == null ? undefined : object[key];
512
+ }
940
513
 
941
- /**
942
- * Gets the native function at `key` of `object`.
943
- *
944
- * @private
945
- * @param {Object} object The object to query.
946
- * @param {string} key The key of the method to get.
947
- * @returns {*} Returns the function if it's native, else `undefined`.
948
- */
949
- function getNative(object, key) {
950
- var value = getValue(object, key);
951
- return baseIsNative(value) ? value : undefined;
952
- }
514
+ function getNative(object, key) {
515
+ var value = getValue(object, key);
516
+ return baseIsNative(value) ? value : undefined;
517
+ }
953
518
 
954
- /* Built-in method references that are verified to be native. */
955
- var Map$1 = getNative(root$1, 'Map');
519
+ var Map$1 = getNative(root$1, 'Map');
520
+ var Map$2 = Map$1;
956
521
 
957
- var Map$2 = Map$1;
522
+ var nativeCreate = getNative(Object, 'create');
523
+ var nativeCreate$1 = nativeCreate;
958
524
 
959
- /* Built-in method references that are verified to be native. */
960
- var nativeCreate = getNative(Object, 'create');
525
+ function hashClear() {
526
+ this.__data__ = nativeCreate$1 ? nativeCreate$1(null) : {};
527
+ this.size = 0;
528
+ }
961
529
 
962
- var nativeCreate$1 = nativeCreate;
530
+ function hashDelete(key) {
531
+ var result = this.has(key) && delete this.__data__[key];
532
+ this.size -= result ? 1 : 0;
533
+ return result;
534
+ }
963
535
 
964
- /**
965
- * Removes all key-value entries from the hash.
966
- *
967
- * @private
968
- * @name clear
969
- * @memberOf Hash
970
- */
971
- function hashClear() {
972
- this.__data__ = nativeCreate$1 ? nativeCreate$1(null) : {};
973
- this.size = 0;
974
- }
536
+ var HASH_UNDEFINED$1 = '__lodash_hash_undefined__';
975
537
 
976
- /**
977
- * Removes `key` and its value from the hash.
978
- *
979
- * @private
980
- * @name delete
981
- * @memberOf Hash
982
- * @param {Object} hash The hash to modify.
983
- * @param {string} key The key of the value to remove.
984
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
985
- */
986
- function hashDelete(key) {
987
- var result = this.has(key) && delete this.__data__[key];
988
- this.size -= result ? 1 : 0;
989
- return result;
990
- }
538
+ var objectProto$9 = Object.prototype;
991
539
 
992
- /** Used to stand-in for `undefined` hash values. */
993
- var HASH_UNDEFINED$1 = '__lodash_hash_undefined__';
994
-
995
- /** Used for built-in method references. */
996
- var objectProto$9 = Object.prototype;
997
-
998
- /** Used to check objects for own properties. */
999
- var hasOwnProperty$7 = objectProto$9.hasOwnProperty;
1000
-
1001
- /**
1002
- * Gets the hash value for `key`.
1003
- *
1004
- * @private
1005
- * @name get
1006
- * @memberOf Hash
1007
- * @param {string} key The key of the value to get.
1008
- * @returns {*} Returns the entry value.
1009
- */
1010
- function hashGet(key) {
1011
- var data = this.__data__;
1012
- if (nativeCreate$1) {
1013
- var result = data[key];
1014
- return result === HASH_UNDEFINED$1 ? undefined : result;
1015
- }
1016
- return hasOwnProperty$7.call(data, key) ? data[key] : undefined;
1017
- }
540
+ var hasOwnProperty$7 = objectProto$9.hasOwnProperty;
1018
541
 
1019
- /** Used for built-in method references. */
1020
- var objectProto$8 = Object.prototype;
1021
-
1022
- /** Used to check objects for own properties. */
1023
- var hasOwnProperty$6 = objectProto$8.hasOwnProperty;
1024
-
1025
- /**
1026
- * Checks if a hash value for `key` exists.
1027
- *
1028
- * @private
1029
- * @name has
1030
- * @memberOf Hash
1031
- * @param {string} key The key of the entry to check.
1032
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
1033
- */
1034
- function hashHas(key) {
1035
- var data = this.__data__;
1036
- return nativeCreate$1 ? (data[key] !== undefined) : hasOwnProperty$6.call(data, key);
542
+ function hashGet(key) {
543
+ var data = this.__data__;
544
+ if (nativeCreate$1) {
545
+ var result = data[key];
546
+ return result === HASH_UNDEFINED$1 ? undefined : result;
1037
547
  }
548
+ return hasOwnProperty$7.call(data, key) ? data[key] : undefined;
549
+ }
1038
550
 
1039
- /** Used to stand-in for `undefined` hash values. */
1040
- var HASH_UNDEFINED = '__lodash_hash_undefined__';
1041
-
1042
- /**
1043
- * Sets the hash `key` to `value`.
1044
- *
1045
- * @private
1046
- * @name set
1047
- * @memberOf Hash
1048
- * @param {string} key The key of the value to set.
1049
- * @param {*} value The value to set.
1050
- * @returns {Object} Returns the hash instance.
1051
- */
1052
- function hashSet(key, value) {
1053
- var data = this.__data__;
1054
- this.size += this.has(key) ? 0 : 1;
1055
- data[key] = (nativeCreate$1 && value === undefined) ? HASH_UNDEFINED : value;
1056
- return this;
1057
- }
551
+ var objectProto$8 = Object.prototype;
1058
552
 
1059
- /**
1060
- * Creates a hash object.
1061
- *
1062
- * @private
1063
- * @constructor
1064
- * @param {Array} [entries] The key-value pairs to cache.
1065
- */
1066
- function Hash(entries) {
1067
- var index = -1,
1068
- length = entries == null ? 0 : entries.length;
1069
-
1070
- this.clear();
1071
- while (++index < length) {
1072
- var entry = entries[index];
1073
- this.set(entry[0], entry[1]);
1074
- }
1075
- }
553
+ var hasOwnProperty$6 = objectProto$8.hasOwnProperty;
1076
554
 
1077
- // Add methods to `Hash`.
1078
- Hash.prototype.clear = hashClear;
1079
- Hash.prototype['delete'] = hashDelete;
1080
- Hash.prototype.get = hashGet;
1081
- Hash.prototype.has = hashHas;
1082
- Hash.prototype.set = hashSet;
1083
-
1084
- /**
1085
- * Removes all key-value entries from the map.
1086
- *
1087
- * @private
1088
- * @name clear
1089
- * @memberOf MapCache
1090
- */
1091
- function mapCacheClear() {
1092
- this.size = 0;
1093
- this.__data__ = {
1094
- 'hash': new Hash,
1095
- 'map': new (Map$2 || ListCache),
1096
- 'string': new Hash
1097
- };
1098
- }
555
+ function hashHas(key) {
556
+ var data = this.__data__;
557
+ return nativeCreate$1 ? data[key] !== undefined : hasOwnProperty$6.call(data, key);
558
+ }
1099
559
 
1100
- /**
1101
- * Checks if `value` is suitable for use as unique object key.
1102
- *
1103
- * @private
1104
- * @param {*} value The value to check.
1105
- * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
1106
- */
1107
- function isKeyable(value) {
1108
- var type = typeof value;
1109
- return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
1110
- ? (value !== '__proto__')
1111
- : (value === null);
1112
- }
560
+ var HASH_UNDEFINED = '__lodash_hash_undefined__';
1113
561
 
1114
- /**
1115
- * Gets the data for `map`.
1116
- *
1117
- * @private
1118
- * @param {Object} map The map to query.
1119
- * @param {string} key The reference key.
1120
- * @returns {*} Returns the map data.
1121
- */
1122
- function getMapData(map, key) {
1123
- var data = map.__data__;
1124
- return isKeyable(key)
1125
- ? data[typeof key == 'string' ? 'string' : 'hash']
1126
- : data.map;
1127
- }
562
+ function hashSet(key, value) {
563
+ var data = this.__data__;
564
+ this.size += this.has(key) ? 0 : 1;
565
+ data[key] = nativeCreate$1 && value === undefined ? HASH_UNDEFINED : value;
566
+ return this;
567
+ }
1128
568
 
1129
- /**
1130
- * Removes `key` and its value from the map.
1131
- *
1132
- * @private
1133
- * @name delete
1134
- * @memberOf MapCache
1135
- * @param {string} key The key of the value to remove.
1136
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
1137
- */
1138
- function mapCacheDelete(key) {
1139
- var result = getMapData(this, key)['delete'](key);
1140
- this.size -= result ? 1 : 0;
1141
- return result;
569
+ function Hash(entries) {
570
+ var index = -1,
571
+ length = entries == null ? 0 : entries.length;
572
+ this.clear();
573
+ while (++index < length) {
574
+ var entry = entries[index];
575
+ this.set(entry[0], entry[1]);
1142
576
  }
577
+ }
1143
578
 
1144
- /**
1145
- * Gets the map value for `key`.
1146
- *
1147
- * @private
1148
- * @name get
1149
- * @memberOf MapCache
1150
- * @param {string} key The key of the value to get.
1151
- * @returns {*} Returns the entry value.
1152
- */
1153
- function mapCacheGet(key) {
1154
- return getMapData(this, key).get(key);
1155
- }
579
+ Hash.prototype.clear = hashClear;
580
+ Hash.prototype['delete'] = hashDelete;
581
+ Hash.prototype.get = hashGet;
582
+ Hash.prototype.has = hashHas;
583
+ Hash.prototype.set = hashSet;
1156
584
 
1157
- /**
1158
- * Checks if a map value for `key` exists.
1159
- *
1160
- * @private
1161
- * @name has
1162
- * @memberOf MapCache
1163
- * @param {string} key The key of the entry to check.
1164
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
1165
- */
1166
- function mapCacheHas(key) {
1167
- return getMapData(this, key).has(key);
585
+ function mapCacheClear() {
586
+ this.size = 0;
587
+ this.__data__ = {
588
+ 'hash': new Hash(),
589
+ 'map': new (Map$2 || ListCache)(),
590
+ 'string': new Hash()
591
+ };
592
+ }
593
+
594
+ function isKeyable(value) {
595
+ var type = typeof value;
596
+ return type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean' ? value !== '__proto__' : value === null;
597
+ }
598
+
599
+ function getMapData(map, key) {
600
+ var data = map.__data__;
601
+ return isKeyable(key) ? data[typeof key == 'string' ? 'string' : 'hash'] : data.map;
602
+ }
603
+
604
+ function mapCacheDelete(key) {
605
+ var result = getMapData(this, key)['delete'](key);
606
+ this.size -= result ? 1 : 0;
607
+ return result;
608
+ }
609
+
610
+ function mapCacheGet(key) {
611
+ return getMapData(this, key).get(key);
612
+ }
613
+
614
+ function mapCacheHas(key) {
615
+ return getMapData(this, key).has(key);
616
+ }
617
+
618
+ function mapCacheSet(key, value) {
619
+ var data = getMapData(this, key),
620
+ size = data.size;
621
+ data.set(key, value);
622
+ this.size += data.size == size ? 0 : 1;
623
+ return this;
624
+ }
625
+
626
+ function MapCache(entries) {
627
+ var index = -1,
628
+ length = entries == null ? 0 : entries.length;
629
+ this.clear();
630
+ while (++index < length) {
631
+ var entry = entries[index];
632
+ this.set(entry[0], entry[1]);
633
+ }
634
+ }
635
+
636
+ MapCache.prototype.clear = mapCacheClear;
637
+ MapCache.prototype['delete'] = mapCacheDelete;
638
+ MapCache.prototype.get = mapCacheGet;
639
+ MapCache.prototype.has = mapCacheHas;
640
+ MapCache.prototype.set = mapCacheSet;
641
+
642
+ var LARGE_ARRAY_SIZE = 200;
643
+
644
+ function stackSet(key, value) {
645
+ var data = this.__data__;
646
+ if (data instanceof ListCache) {
647
+ var pairs = data.__data__;
648
+ if (!Map$2 || pairs.length < LARGE_ARRAY_SIZE - 1) {
649
+ pairs.push([key, value]);
650
+ this.size = ++data.size;
651
+ return this;
652
+ }
653
+ data = this.__data__ = new MapCache(pairs);
654
+ }
655
+ data.set(key, value);
656
+ this.size = data.size;
657
+ return this;
658
+ }
659
+
660
+ function Stack(entries) {
661
+ var data = this.__data__ = new ListCache(entries);
662
+ this.size = data.size;
663
+ }
664
+
665
+ Stack.prototype.clear = stackClear;
666
+ Stack.prototype['delete'] = stackDelete;
667
+ Stack.prototype.get = stackGet;
668
+ Stack.prototype.has = stackHas;
669
+ Stack.prototype.set = stackSet;
670
+
671
+ function arrayEach(array, iteratee) {
672
+ var index = -1,
673
+ length = array == null ? 0 : array.length;
674
+ while (++index < length) {
675
+ if (iteratee(array[index], index, array) === false) {
676
+ break;
677
+ }
1168
678
  }
1169
-
1170
- /**
1171
- * Sets the map `key` to `value`.
1172
- *
1173
- * @private
1174
- * @name set
1175
- * @memberOf MapCache
1176
- * @param {string} key The key of the value to set.
1177
- * @param {*} value The value to set.
1178
- * @returns {Object} Returns the map cache instance.
1179
- */
1180
- function mapCacheSet(key, value) {
1181
- var data = getMapData(this, key),
1182
- size = data.size;
1183
-
1184
- data.set(key, value);
1185
- this.size += data.size == size ? 0 : 1;
1186
- return this;
679
+ return array;
680
+ }
681
+ var defineProperty$1 = function () {
682
+ try {
683
+ var func = getNative(Object, 'defineProperty');
684
+ func({}, '', {});
685
+ return func;
686
+ } catch (e) {}
687
+ }();
688
+ var defineProperty$2 = defineProperty$1;
689
+
690
+ function baseAssignValue(object, key, value) {
691
+ if (key == '__proto__' && defineProperty$2) {
692
+ defineProperty$2(object, key, {
693
+ 'configurable': true,
694
+ 'enumerable': true,
695
+ 'value': value,
696
+ 'writable': true
697
+ });
698
+ } else {
699
+ object[key] = value;
1187
700
  }
701
+ }
1188
702
 
1189
- /**
1190
- * Creates a map cache object to store key-value pairs.
1191
- *
1192
- * @private
1193
- * @constructor
1194
- * @param {Array} [entries] The key-value pairs to cache.
1195
- */
1196
- function MapCache(entries) {
1197
- var index = -1,
1198
- length = entries == null ? 0 : entries.length;
1199
-
1200
- this.clear();
1201
- while (++index < length) {
1202
- var entry = entries[index];
1203
- this.set(entry[0], entry[1]);
1204
- }
1205
- }
703
+ var objectProto$7 = Object.prototype;
1206
704
 
1207
- // Add methods to `MapCache`.
1208
- MapCache.prototype.clear = mapCacheClear;
1209
- MapCache.prototype['delete'] = mapCacheDelete;
1210
- MapCache.prototype.get = mapCacheGet;
1211
- MapCache.prototype.has = mapCacheHas;
1212
- MapCache.prototype.set = mapCacheSet;
1213
-
1214
- /** Used as the size to enable large array optimizations. */
1215
- var LARGE_ARRAY_SIZE = 200;
1216
-
1217
- /**
1218
- * Sets the stack `key` to `value`.
1219
- *
1220
- * @private
1221
- * @name set
1222
- * @memberOf Stack
1223
- * @param {string} key The key of the value to set.
1224
- * @param {*} value The value to set.
1225
- * @returns {Object} Returns the stack cache instance.
1226
- */
1227
- function stackSet(key, value) {
1228
- var data = this.__data__;
1229
- if (data instanceof ListCache) {
1230
- var pairs = data.__data__;
1231
- if (!Map$2 || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
1232
- pairs.push([key, value]);
1233
- this.size = ++data.size;
1234
- return this;
1235
- }
1236
- data = this.__data__ = new MapCache(pairs);
1237
- }
1238
- data.set(key, value);
1239
- this.size = data.size;
1240
- return this;
1241
- }
705
+ var hasOwnProperty$5 = objectProto$7.hasOwnProperty;
1242
706
 
1243
- /**
1244
- * Creates a stack cache object to store key-value pairs.
1245
- *
1246
- * @private
1247
- * @constructor
1248
- * @param {Array} [entries] The key-value pairs to cache.
1249
- */
1250
- function Stack(entries) {
1251
- var data = this.__data__ = new ListCache(entries);
1252
- this.size = data.size;
707
+ function assignValue(object, key, value) {
708
+ var objValue = object[key];
709
+ if (!(hasOwnProperty$5.call(object, key) && eq(objValue, value)) || value === undefined && !(key in object)) {
710
+ baseAssignValue(object, key, value);
1253
711
  }
712
+ }
1254
713
 
1255
- // Add methods to `Stack`.
1256
- Stack.prototype.clear = stackClear;
1257
- Stack.prototype['delete'] = stackDelete;
1258
- Stack.prototype.get = stackGet;
1259
- Stack.prototype.has = stackHas;
1260
- Stack.prototype.set = stackSet;
1261
-
1262
- /**
1263
- * A specialized version of `_.forEach` for arrays without support for
1264
- * iteratee shorthands.
1265
- *
1266
- * @private
1267
- * @param {Array} [array] The array to iterate over.
1268
- * @param {Function} iteratee The function invoked per iteration.
1269
- * @returns {Array} Returns `array`.
1270
- */
1271
- function arrayEach(array, iteratee) {
1272
- var index = -1,
1273
- length = array == null ? 0 : array.length;
1274
-
1275
- while (++index < length) {
1276
- if (iteratee(array[index], index, array) === false) {
1277
- break;
1278
- }
714
+ function copyObject(source, props, object, customizer) {
715
+ var isNew = !object;
716
+ object || (object = {});
717
+ var index = -1,
718
+ length = props.length;
719
+ while (++index < length) {
720
+ var key = props[index];
721
+ var newValue = customizer ? customizer(object[key], source[key], key, object, source) : undefined;
722
+ if (newValue === undefined) {
723
+ newValue = source[key];
1279
724
  }
1280
- return array;
1281
- }
1282
-
1283
- var defineProperty$1 = (function() {
1284
- try {
1285
- var func = getNative(Object, 'defineProperty');
1286
- func({}, '', {});
1287
- return func;
1288
- } catch (e) {}
1289
- }());
1290
-
1291
- var defineProperty$2 = defineProperty$1;
1292
-
1293
- /**
1294
- * The base implementation of `assignValue` and `assignMergeValue` without
1295
- * value checks.
1296
- *
1297
- * @private
1298
- * @param {Object} object The object to modify.
1299
- * @param {string} key The key of the property to assign.
1300
- * @param {*} value The value to assign.
1301
- */
1302
- function baseAssignValue(object, key, value) {
1303
- if (key == '__proto__' && defineProperty$2) {
1304
- defineProperty$2(object, key, {
1305
- 'configurable': true,
1306
- 'enumerable': true,
1307
- 'value': value,
1308
- 'writable': true
1309
- });
725
+ if (isNew) {
726
+ baseAssignValue(object, key, newValue);
1310
727
  } else {
1311
- object[key] = value;
728
+ assignValue(object, key, newValue);
1312
729
  }
1313
730
  }
731
+ return object;
732
+ }
1314
733
 
1315
- /** Used for built-in method references. */
1316
- var objectProto$7 = Object.prototype;
1317
-
1318
- /** Used to check objects for own properties. */
1319
- var hasOwnProperty$5 = objectProto$7.hasOwnProperty;
1320
-
1321
- /**
1322
- * Assigns `value` to `key` of `object` if the existing value is not equivalent
1323
- * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
1324
- * for equality comparisons.
1325
- *
1326
- * @private
1327
- * @param {Object} object The object to modify.
1328
- * @param {string} key The key of the property to assign.
1329
- * @param {*} value The value to assign.
1330
- */
1331
- function assignValue(object, key, value) {
1332
- var objValue = object[key];
1333
- if (!(hasOwnProperty$5.call(object, key) && eq(objValue, value)) ||
1334
- (value === undefined && !(key in object))) {
1335
- baseAssignValue(object, key, value);
1336
- }
734
+ function baseTimes(n, iteratee) {
735
+ var index = -1,
736
+ result = Array(n);
737
+ while (++index < n) {
738
+ result[index] = iteratee(index);
1337
739
  }
740
+ return result;
741
+ }
1338
742
 
1339
- /**
1340
- * Copies properties of `source` to `object`.
1341
- *
1342
- * @private
1343
- * @param {Object} source The object to copy properties from.
1344
- * @param {Array} props The property identifiers to copy.
1345
- * @param {Object} [object={}] The object to copy properties to.
1346
- * @param {Function} [customizer] The function to customize copied values.
1347
- * @returns {Object} Returns `object`.
1348
- */
1349
- function copyObject(source, props, object, customizer) {
1350
- var isNew = !object;
1351
- object || (object = {});
1352
-
1353
- var index = -1,
1354
- length = props.length;
1355
-
1356
- while (++index < length) {
1357
- var key = props[index];
1358
-
1359
- var newValue = customizer
1360
- ? customizer(object[key], source[key], key, object, source)
1361
- : undefined;
1362
-
1363
- if (newValue === undefined) {
1364
- newValue = source[key];
1365
- }
1366
- if (isNew) {
1367
- baseAssignValue(object, key, newValue);
1368
- } else {
1369
- assignValue(object, key, newValue);
1370
- }
1371
- }
1372
- return object;
1373
- }
743
+ function isObjectLike(value) {
744
+ return value != null && typeof value == 'object';
745
+ }
1374
746
 
1375
- /**
1376
- * The base implementation of `_.times` without support for iteratee shorthands
1377
- * or max array length checks.
1378
- *
1379
- * @private
1380
- * @param {number} n The number of times to invoke `iteratee`.
1381
- * @param {Function} iteratee The function invoked per iteration.
1382
- * @returns {Array} Returns the array of results.
1383
- */
1384
- function baseTimes(n, iteratee) {
1385
- var index = -1,
1386
- result = Array(n);
1387
-
1388
- while (++index < n) {
1389
- result[index] = iteratee(index);
1390
- }
1391
- return result;
1392
- }
747
+ var argsTag$2 = '[object Arguments]';
1393
748
 
1394
- /**
1395
- * Checks if `value` is object-like. A value is object-like if it's not `null`
1396
- * and has a `typeof` result of "object".
1397
- *
1398
- * @static
1399
- * @memberOf _
1400
- * @since 4.0.0
1401
- * @category Lang
1402
- * @param {*} value The value to check.
1403
- * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
1404
- * @example
1405
- *
1406
- * _.isObjectLike({});
1407
- * // => true
1408
- *
1409
- * _.isObjectLike([1, 2, 3]);
1410
- * // => true
1411
- *
1412
- * _.isObjectLike(_.noop);
1413
- * // => false
1414
- *
1415
- * _.isObjectLike(null);
1416
- * // => false
1417
- */
1418
- function isObjectLike(value) {
1419
- return value != null && typeof value == 'object';
1420
- }
749
+ function baseIsArguments(value) {
750
+ return isObjectLike(value) && baseGetTag(value) == argsTag$2;
751
+ }
1421
752
 
1422
- /** `Object#toString` result references. */
1423
- var argsTag$2 = '[object Arguments]';
1424
-
1425
- /**
1426
- * The base implementation of `_.isArguments`.
1427
- *
1428
- * @private
1429
- * @param {*} value The value to check.
1430
- * @returns {boolean} Returns `true` if `value` is an `arguments` object,
1431
- */
1432
- function baseIsArguments(value) {
1433
- return isObjectLike(value) && baseGetTag(value) == argsTag$2;
1434
- }
753
+ var objectProto$6 = Object.prototype;
1435
754
 
1436
- /** Used for built-in method references. */
1437
- var objectProto$6 = Object.prototype;
1438
-
1439
- /** Used to check objects for own properties. */
1440
- var hasOwnProperty$4 = objectProto$6.hasOwnProperty;
1441
-
1442
- /** Built-in value references. */
1443
- var propertyIsEnumerable$1 = objectProto$6.propertyIsEnumerable;
1444
-
1445
- /**
1446
- * Checks if `value` is likely an `arguments` object.
1447
- *
1448
- * @static
1449
- * @memberOf _
1450
- * @since 0.1.0
1451
- * @category Lang
1452
- * @param {*} value The value to check.
1453
- * @returns {boolean} Returns `true` if `value` is an `arguments` object,
1454
- * else `false`.
1455
- * @example
1456
- *
1457
- * _.isArguments(function() { return arguments; }());
1458
- * // => true
1459
- *
1460
- * _.isArguments([1, 2, 3]);
1461
- * // => false
1462
- */
1463
- var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
1464
- return isObjectLike(value) && hasOwnProperty$4.call(value, 'callee') &&
1465
- !propertyIsEnumerable$1.call(value, 'callee');
1466
- };
755
+ var hasOwnProperty$4 = objectProto$6.hasOwnProperty;
1467
756
 
1468
- var isArguments$1 = isArguments;
1469
-
1470
- /**
1471
- * Checks if `value` is classified as an `Array` object.
1472
- *
1473
- * @static
1474
- * @memberOf _
1475
- * @since 0.1.0
1476
- * @category Lang
1477
- * @param {*} value The value to check.
1478
- * @returns {boolean} Returns `true` if `value` is an array, else `false`.
1479
- * @example
1480
- *
1481
- * _.isArray([1, 2, 3]);
1482
- * // => true
1483
- *
1484
- * _.isArray(document.body.children);
1485
- * // => false
1486
- *
1487
- * _.isArray('abc');
1488
- * // => false
1489
- *
1490
- * _.isArray(_.noop);
1491
- * // => false
1492
- */
1493
- var isArray = Array.isArray;
1494
-
1495
- var isArray$1 = isArray;
1496
-
1497
- /**
1498
- * This method returns `false`.
1499
- *
1500
- * @static
1501
- * @memberOf _
1502
- * @since 4.13.0
1503
- * @category Util
1504
- * @returns {boolean} Returns `false`.
1505
- * @example
1506
- *
1507
- * _.times(2, _.stubFalse);
1508
- * // => [false, false]
1509
- */
1510
- function stubFalse() {
1511
- return false;
1512
- }
757
+ var propertyIsEnumerable$1 = objectProto$6.propertyIsEnumerable;
1513
758
 
1514
- /** Detect free variable `exports`. */
1515
- var freeExports$2 = typeof exports == 'object' && exports && !exports.nodeType && exports;
1516
-
1517
- /** Detect free variable `module`. */
1518
- var freeModule$2 = freeExports$2 && typeof module == 'object' && module && !module.nodeType && module;
1519
-
1520
- /** Detect the popular CommonJS extension `module.exports`. */
1521
- var moduleExports$2 = freeModule$2 && freeModule$2.exports === freeExports$2;
1522
-
1523
- /** Built-in value references. */
1524
- var Buffer$1 = moduleExports$2 ? root$1.Buffer : undefined;
1525
-
1526
- /* Built-in method references for those with the same name as other `lodash` methods. */
1527
- var nativeIsBuffer = Buffer$1 ? Buffer$1.isBuffer : undefined;
1528
-
1529
- /**
1530
- * Checks if `value` is a buffer.
1531
- *
1532
- * @static
1533
- * @memberOf _
1534
- * @since 4.3.0
1535
- * @category Lang
1536
- * @param {*} value The value to check.
1537
- * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
1538
- * @example
1539
- *
1540
- * _.isBuffer(new Buffer(2));
1541
- * // => true
1542
- *
1543
- * _.isBuffer(new Uint8Array(2));
1544
- * // => false
1545
- */
1546
- var isBuffer = nativeIsBuffer || stubFalse;
1547
-
1548
- var isBuffer$1 = isBuffer;
1549
-
1550
- /** Used as references for various `Number` constants. */
1551
- var MAX_SAFE_INTEGER$1 = 9007199254740991;
1552
-
1553
- /** Used to detect unsigned integer values. */
1554
- var reIsUint = /^(?:0|[1-9]\d*)$/;
1555
-
1556
- /**
1557
- * Checks if `value` is a valid array-like index.
1558
- *
1559
- * @private
1560
- * @param {*} value The value to check.
1561
- * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
1562
- * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
1563
- */
1564
- function isIndex(value, length) {
1565
- var type = typeof value;
1566
- length = length == null ? MAX_SAFE_INTEGER$1 : length;
1567
-
1568
- return !!length &&
1569
- (type == 'number' ||
1570
- (type != 'symbol' && reIsUint.test(value))) &&
1571
- (value > -1 && value % 1 == 0 && value < length);
1572
- }
759
+ var isArguments = baseIsArguments(function () {
760
+ return arguments;
761
+ }()) ? baseIsArguments : function (value) {
762
+ return isObjectLike(value) && hasOwnProperty$4.call(value, 'callee') && !propertyIsEnumerable$1.call(value, 'callee');
763
+ };
764
+ var isArguments$1 = isArguments;
1573
765
 
1574
- /** Used as references for various `Number` constants. */
1575
- var MAX_SAFE_INTEGER = 9007199254740991;
1576
-
1577
- /**
1578
- * Checks if `value` is a valid array-like length.
1579
- *
1580
- * **Note:** This method is loosely based on
1581
- * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
1582
- *
1583
- * @static
1584
- * @memberOf _
1585
- * @since 4.0.0
1586
- * @category Lang
1587
- * @param {*} value The value to check.
1588
- * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
1589
- * @example
1590
- *
1591
- * _.isLength(3);
1592
- * // => true
1593
- *
1594
- * _.isLength(Number.MIN_VALUE);
1595
- * // => false
1596
- *
1597
- * _.isLength(Infinity);
1598
- * // => false
1599
- *
1600
- * _.isLength('3');
1601
- * // => false
1602
- */
1603
- function isLength(value) {
1604
- return typeof value == 'number' &&
1605
- value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
1606
- }
766
+ var isArray = Array.isArray;
767
+ var isArray$1 = isArray;
1607
768
 
1608
- /** `Object#toString` result references. */
1609
- var argsTag$1 = '[object Arguments]',
1610
- arrayTag$1 = '[object Array]',
1611
- boolTag$2 = '[object Boolean]',
1612
- dateTag$2 = '[object Date]',
1613
- errorTag$1 = '[object Error]',
1614
- funcTag$1 = '[object Function]',
1615
- mapTag$4 = '[object Map]',
1616
- numberTag$2 = '[object Number]',
1617
- objectTag$2 = '[object Object]',
1618
- regexpTag$2 = '[object RegExp]',
1619
- setTag$4 = '[object Set]',
1620
- stringTag$2 = '[object String]',
1621
- weakMapTag$2 = '[object WeakMap]';
1622
-
1623
- var arrayBufferTag$2 = '[object ArrayBuffer]',
1624
- dataViewTag$3 = '[object DataView]',
1625
- float32Tag$2 = '[object Float32Array]',
1626
- float64Tag$2 = '[object Float64Array]',
1627
- int8Tag$2 = '[object Int8Array]',
1628
- int16Tag$2 = '[object Int16Array]',
1629
- int32Tag$2 = '[object Int32Array]',
1630
- uint8Tag$2 = '[object Uint8Array]',
1631
- uint8ClampedTag$2 = '[object Uint8ClampedArray]',
1632
- uint16Tag$2 = '[object Uint16Array]',
1633
- uint32Tag$2 = '[object Uint32Array]';
1634
-
1635
- /** Used to identify `toStringTag` values of typed arrays. */
1636
- var typedArrayTags = {};
1637
- typedArrayTags[float32Tag$2] = typedArrayTags[float64Tag$2] =
1638
- typedArrayTags[int8Tag$2] = typedArrayTags[int16Tag$2] =
1639
- typedArrayTags[int32Tag$2] = typedArrayTags[uint8Tag$2] =
1640
- typedArrayTags[uint8ClampedTag$2] = typedArrayTags[uint16Tag$2] =
1641
- typedArrayTags[uint32Tag$2] = true;
1642
- typedArrayTags[argsTag$1] = typedArrayTags[arrayTag$1] =
1643
- typedArrayTags[arrayBufferTag$2] = typedArrayTags[boolTag$2] =
1644
- typedArrayTags[dataViewTag$3] = typedArrayTags[dateTag$2] =
1645
- typedArrayTags[errorTag$1] = typedArrayTags[funcTag$1] =
1646
- typedArrayTags[mapTag$4] = typedArrayTags[numberTag$2] =
1647
- typedArrayTags[objectTag$2] = typedArrayTags[regexpTag$2] =
1648
- typedArrayTags[setTag$4] = typedArrayTags[stringTag$2] =
1649
- typedArrayTags[weakMapTag$2] = false;
1650
-
1651
- /**
1652
- * The base implementation of `_.isTypedArray` without Node.js optimizations.
1653
- *
1654
- * @private
1655
- * @param {*} value The value to check.
1656
- * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
1657
- */
1658
- function baseIsTypedArray(value) {
1659
- return isObjectLike(value) &&
1660
- isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
1661
- }
769
+ function stubFalse() {
770
+ return false;
771
+ }
1662
772
 
1663
- /**
1664
- * The base implementation of `_.unary` without support for storing metadata.
1665
- *
1666
- * @private
1667
- * @param {Function} func The function to cap arguments for.
1668
- * @returns {Function} Returns the new capped function.
1669
- */
1670
- function baseUnary(func) {
1671
- return function(value) {
1672
- return func(value);
1673
- };
1674
- }
773
+ var freeExports$2 = typeof exports == 'object' && exports && !exports.nodeType && exports;
1675
774
 
1676
- /** Detect free variable `exports`. */
1677
- var freeExports$1 = typeof exports == 'object' && exports && !exports.nodeType && exports;
775
+ var freeModule$2 = freeExports$2 && typeof module == 'object' && module && !module.nodeType && module;
1678
776
 
1679
- /** Detect free variable `module`. */
1680
- var freeModule$1 = freeExports$1 && typeof module == 'object' && module && !module.nodeType && module;
777
+ var moduleExports$2 = freeModule$2 && freeModule$2.exports === freeExports$2;
1681
778
 
1682
- /** Detect the popular CommonJS extension `module.exports`. */
1683
- var moduleExports$1 = freeModule$1 && freeModule$1.exports === freeExports$1;
779
+ var Buffer$1 = moduleExports$2 ? root$1.Buffer : undefined;
1684
780
 
1685
- /** Detect free variable `process` from Node.js. */
1686
- var freeProcess = moduleExports$1 && freeGlobal$1.process;
781
+ var nativeIsBuffer = Buffer$1 ? Buffer$1.isBuffer : undefined;
1687
782
 
1688
- /** Used to access faster Node.js helpers. */
1689
- var nodeUtil = (function() {
1690
- try {
1691
- // Use `util.types` for Node.js 10+.
1692
- var types = freeModule$1 && freeModule$1.require && freeModule$1.require('util').types;
783
+ var isBuffer = nativeIsBuffer || stubFalse;
784
+ var isBuffer$1 = isBuffer;
1693
785
 
1694
- if (types) {
1695
- return types;
1696
- }
786
+ var MAX_SAFE_INTEGER$1 = 9007199254740991;
1697
787
 
1698
- // Legacy `process.binding('util')` for Node.js < 10.
1699
- return freeProcess && freeProcess.binding && freeProcess.binding('util');
1700
- } catch (e) {}
1701
- }());
1702
-
1703
- var nodeUtil$1 = nodeUtil;
1704
-
1705
- /* Node.js helper references. */
1706
- var nodeIsTypedArray = nodeUtil$1 && nodeUtil$1.isTypedArray;
1707
-
1708
- /**
1709
- * Checks if `value` is classified as a typed array.
1710
- *
1711
- * @static
1712
- * @memberOf _
1713
- * @since 3.0.0
1714
- * @category Lang
1715
- * @param {*} value The value to check.
1716
- * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
1717
- * @example
1718
- *
1719
- * _.isTypedArray(new Uint8Array);
1720
- * // => true
1721
- *
1722
- * _.isTypedArray([]);
1723
- * // => false
1724
- */
1725
- var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
1726
-
1727
- var isTypedArray$1 = isTypedArray;
1728
-
1729
- /** Used for built-in method references. */
1730
- var objectProto$5 = Object.prototype;
1731
-
1732
- /** Used to check objects for own properties. */
1733
- var hasOwnProperty$3 = objectProto$5.hasOwnProperty;
1734
-
1735
- /**
1736
- * Creates an array of the enumerable property names of the array-like `value`.
1737
- *
1738
- * @private
1739
- * @param {*} value The value to query.
1740
- * @param {boolean} inherited Specify returning inherited property names.
1741
- * @returns {Array} Returns the array of property names.
1742
- */
1743
- function arrayLikeKeys(value, inherited) {
1744
- var isArr = isArray$1(value),
1745
- isArg = !isArr && isArguments$1(value),
1746
- isBuff = !isArr && !isArg && isBuffer$1(value),
1747
- isType = !isArr && !isArg && !isBuff && isTypedArray$1(value),
1748
- skipIndexes = isArr || isArg || isBuff || isType,
1749
- result = skipIndexes ? baseTimes(value.length, String) : [],
1750
- length = result.length;
1751
-
1752
- for (var key in value) {
1753
- if ((inherited || hasOwnProperty$3.call(value, key)) &&
1754
- !(skipIndexes && (
1755
- // Safari 9 has enumerable `arguments.length` in strict mode.
1756
- key == 'length' ||
1757
- // Node.js 0.10 has enumerable non-index properties on buffers.
1758
- (isBuff && (key == 'offset' || key == 'parent')) ||
1759
- // PhantomJS 2 has enumerable non-index properties on typed arrays.
1760
- (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
1761
- // Skip index properties.
1762
- isIndex(key, length)
1763
- ))) {
1764
- result.push(key);
1765
- }
1766
- }
1767
- return result;
1768
- }
788
+ var reIsUint = /^(?:0|[1-9]\d*)$/;
1769
789
 
1770
- /** Used for built-in method references. */
1771
- var objectProto$4 = Object.prototype;
1772
-
1773
- /**
1774
- * Checks if `value` is likely a prototype object.
1775
- *
1776
- * @private
1777
- * @param {*} value The value to check.
1778
- * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
1779
- */
1780
- function isPrototype(value) {
1781
- var Ctor = value && value.constructor,
1782
- proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto$4;
1783
-
1784
- return value === proto;
1785
- }
1786
-
1787
- /**
1788
- * Creates a unary function that invokes `func` with its argument transformed.
1789
- *
1790
- * @private
1791
- * @param {Function} func The function to wrap.
1792
- * @param {Function} transform The argument transform.
1793
- * @returns {Function} Returns the new function.
1794
- */
1795
- function overArg(func, transform) {
1796
- return function(arg) {
1797
- return func(transform(arg));
1798
- };
1799
- }
790
+ function isIndex(value, length) {
791
+ var type = typeof value;
792
+ length = length == null ? MAX_SAFE_INTEGER$1 : length;
793
+ return !!length && (type == 'number' || type != 'symbol' && reIsUint.test(value)) && value > -1 && value % 1 == 0 && value < length;
794
+ }
1800
795
 
1801
- /* Built-in method references for those with the same name as other `lodash` methods. */
1802
- var nativeKeys = overArg(Object.keys, Object);
796
+ var MAX_SAFE_INTEGER = 9007199254740991;
1803
797
 
1804
- var nativeKeys$1 = nativeKeys;
798
+ function isLength(value) {
799
+ return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
800
+ }
1805
801
 
1806
- /** Used for built-in method references. */
1807
- var objectProto$3 = Object.prototype;
802
+ var argsTag$1 = '[object Arguments]',
803
+ arrayTag$1 = '[object Array]',
804
+ boolTag$2 = '[object Boolean]',
805
+ dateTag$2 = '[object Date]',
806
+ errorTag$1 = '[object Error]',
807
+ funcTag$1 = '[object Function]',
808
+ mapTag$4 = '[object Map]',
809
+ numberTag$2 = '[object Number]',
810
+ objectTag$2 = '[object Object]',
811
+ regexpTag$2 = '[object RegExp]',
812
+ setTag$4 = '[object Set]',
813
+ stringTag$2 = '[object String]',
814
+ weakMapTag$2 = '[object WeakMap]';
815
+ var arrayBufferTag$2 = '[object ArrayBuffer]',
816
+ dataViewTag$3 = '[object DataView]',
817
+ float32Tag$2 = '[object Float32Array]',
818
+ float64Tag$2 = '[object Float64Array]',
819
+ int8Tag$2 = '[object Int8Array]',
820
+ int16Tag$2 = '[object Int16Array]',
821
+ int32Tag$2 = '[object Int32Array]',
822
+ uint8Tag$2 = '[object Uint8Array]',
823
+ uint8ClampedTag$2 = '[object Uint8ClampedArray]',
824
+ uint16Tag$2 = '[object Uint16Array]',
825
+ uint32Tag$2 = '[object Uint32Array]';
1808
826
 
1809
- /** Used to check objects for own properties. */
1810
- var hasOwnProperty$2 = objectProto$3.hasOwnProperty;
827
+ var typedArrayTags = {};
828
+ typedArrayTags[float32Tag$2] = typedArrayTags[float64Tag$2] = typedArrayTags[int8Tag$2] = typedArrayTags[int16Tag$2] = typedArrayTags[int32Tag$2] = typedArrayTags[uint8Tag$2] = typedArrayTags[uint8ClampedTag$2] = typedArrayTags[uint16Tag$2] = typedArrayTags[uint32Tag$2] = true;
829
+ typedArrayTags[argsTag$1] = typedArrayTags[arrayTag$1] = typedArrayTags[arrayBufferTag$2] = typedArrayTags[boolTag$2] = typedArrayTags[dataViewTag$3] = typedArrayTags[dateTag$2] = typedArrayTags[errorTag$1] = typedArrayTags[funcTag$1] = typedArrayTags[mapTag$4] = typedArrayTags[numberTag$2] = typedArrayTags[objectTag$2] = typedArrayTags[regexpTag$2] = typedArrayTags[setTag$4] = typedArrayTags[stringTag$2] = typedArrayTags[weakMapTag$2] = false;
1811
830
 
1812
- /**
1813
- * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
1814
- *
1815
- * @private
1816
- * @param {Object} object The object to query.
1817
- * @returns {Array} Returns the array of property names.
1818
- */
1819
- function baseKeys(object) {
1820
- if (!isPrototype(object)) {
1821
- return nativeKeys$1(object);
1822
- }
1823
- var result = [];
1824
- for (var key in Object(object)) {
1825
- if (hasOwnProperty$2.call(object, key) && key != 'constructor') {
1826
- result.push(key);
1827
- }
1828
- }
1829
- return result;
1830
- }
831
+ function baseIsTypedArray(value) {
832
+ return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
833
+ }
834
+
835
+ function baseUnary(func) {
836
+ return function (value) {
837
+ return func(value);
838
+ };
839
+ }
1831
840
 
1832
- /**
1833
- * Checks if `value` is array-like. A value is considered array-like if it's
1834
- * not a function and has a `value.length` that's an integer greater than or
1835
- * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
1836
- *
1837
- * @static
1838
- * @memberOf _
1839
- * @since 4.0.0
1840
- * @category Lang
1841
- * @param {*} value The value to check.
1842
- * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
1843
- * @example
1844
- *
1845
- * _.isArrayLike([1, 2, 3]);
1846
- * // => true
1847
- *
1848
- * _.isArrayLike(document.body.children);
1849
- * // => true
1850
- *
1851
- * _.isArrayLike('abc');
1852
- * // => true
1853
- *
1854
- * _.isArrayLike(_.noop);
1855
- * // => false
1856
- */
1857
- function isArrayLike(value) {
1858
- return value != null && isLength(value.length) && !isFunction(value);
1859
- }
841
+ var freeExports$1 = typeof exports == 'object' && exports && !exports.nodeType && exports;
1860
842
 
1861
- /**
1862
- * Creates an array of the own enumerable property names of `object`.
1863
- *
1864
- * **Note:** Non-object values are coerced to objects. See the
1865
- * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
1866
- * for more details.
1867
- *
1868
- * @static
1869
- * @since 0.1.0
1870
- * @memberOf _
1871
- * @category Object
1872
- * @param {Object} object The object to query.
1873
- * @returns {Array} Returns the array of property names.
1874
- * @example
1875
- *
1876
- * function Foo() {
1877
- * this.a = 1;
1878
- * this.b = 2;
1879
- * }
1880
- *
1881
- * Foo.prototype.c = 3;
1882
- *
1883
- * _.keys(new Foo);
1884
- * // => ['a', 'b'] (iteration order is not guaranteed)
1885
- *
1886
- * _.keys('hi');
1887
- * // => ['0', '1']
1888
- */
1889
- function keys(object) {
1890
- return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
1891
- }
843
+ var freeModule$1 = freeExports$1 && typeof module == 'object' && module && !module.nodeType && module;
1892
844
 
1893
- /**
1894
- * The base implementation of `_.assign` without support for multiple sources
1895
- * or `customizer` functions.
1896
- *
1897
- * @private
1898
- * @param {Object} object The destination object.
1899
- * @param {Object} source The source object.
1900
- * @returns {Object} Returns `object`.
1901
- */
1902
- function baseAssign(object, source) {
1903
- return object && copyObject(source, keys(source), object);
1904
- }
845
+ var moduleExports$1 = freeModule$1 && freeModule$1.exports === freeExports$1;
1905
846
 
1906
- /**
1907
- * This function is like
1908
- * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
1909
- * except that it includes inherited enumerable properties.
1910
- *
1911
- * @private
1912
- * @param {Object} object The object to query.
1913
- * @returns {Array} Returns the array of property names.
1914
- */
1915
- function nativeKeysIn(object) {
1916
- var result = [];
1917
- if (object != null) {
1918
- for (var key in Object(object)) {
1919
- result.push(key);
1920
- }
1921
- }
1922
- return result;
1923
- }
847
+ var freeProcess = moduleExports$1 && freeGlobal$1.process;
1924
848
 
1925
- /** Used for built-in method references. */
1926
- var objectProto$2 = Object.prototype;
1927
-
1928
- /** Used to check objects for own properties. */
1929
- var hasOwnProperty$1 = objectProto$2.hasOwnProperty;
1930
-
1931
- /**
1932
- * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.
1933
- *
1934
- * @private
1935
- * @param {Object} object The object to query.
1936
- * @returns {Array} Returns the array of property names.
1937
- */
1938
- function baseKeysIn(object) {
1939
- if (!isObject(object)) {
1940
- return nativeKeysIn(object);
849
+ var nodeUtil = function () {
850
+ try {
851
+ var types = freeModule$1 && freeModule$1.require && freeModule$1.require('util').types;
852
+ if (types) {
853
+ return types;
1941
854
  }
1942
- var isProto = isPrototype(object),
1943
- result = [];
1944
855
 
1945
- for (var key in object) {
1946
- if (!(key == 'constructor' && (isProto || !hasOwnProperty$1.call(object, key)))) {
1947
- result.push(key);
1948
- }
856
+ return freeProcess && freeProcess.binding && freeProcess.binding('util');
857
+ } catch (e) {}
858
+ }();
859
+ var nodeUtil$1 = nodeUtil;
860
+
861
+ var nodeIsTypedArray = nodeUtil$1 && nodeUtil$1.isTypedArray;
862
+
863
+ var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
864
+ var isTypedArray$1 = isTypedArray;
865
+
866
+ var objectProto$5 = Object.prototype;
867
+
868
+ var hasOwnProperty$3 = objectProto$5.hasOwnProperty;
869
+
870
+ function arrayLikeKeys(value, inherited) {
871
+ var isArr = isArray$1(value),
872
+ isArg = !isArr && isArguments$1(value),
873
+ isBuff = !isArr && !isArg && isBuffer$1(value),
874
+ isType = !isArr && !isArg && !isBuff && isTypedArray$1(value),
875
+ skipIndexes = isArr || isArg || isBuff || isType,
876
+ result = skipIndexes ? baseTimes(value.length, String) : [],
877
+ length = result.length;
878
+ for (var key in value) {
879
+ if ((inherited || hasOwnProperty$3.call(value, key)) && !(skipIndexes && (
880
+ key == 'length' ||
881
+ isBuff && (key == 'offset' || key == 'parent') ||
882
+ isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset') ||
883
+ isIndex(key, length)))) {
884
+ result.push(key);
1949
885
  }
1950
- return result;
1951
886
  }
887
+ return result;
888
+ }
1952
889
 
1953
- /**
1954
- * Creates an array of the own and inherited enumerable property names of `object`.
1955
- *
1956
- * **Note:** Non-object values are coerced to objects.
1957
- *
1958
- * @static
1959
- * @memberOf _
1960
- * @since 3.0.0
1961
- * @category Object
1962
- * @param {Object} object The object to query.
1963
- * @returns {Array} Returns the array of property names.
1964
- * @example
1965
- *
1966
- * function Foo() {
1967
- * this.a = 1;
1968
- * this.b = 2;
1969
- * }
1970
- *
1971
- * Foo.prototype.c = 3;
1972
- *
1973
- * _.keysIn(new Foo);
1974
- * // => ['a', 'b', 'c'] (iteration order is not guaranteed)
1975
- */
1976
- function keysIn(object) {
1977
- return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
1978
- }
890
+ var objectProto$4 = Object.prototype;
1979
891
 
1980
- /**
1981
- * The base implementation of `_.assignIn` without support for multiple sources
1982
- * or `customizer` functions.
1983
- *
1984
- * @private
1985
- * @param {Object} object The destination object.
1986
- * @param {Object} source The source object.
1987
- * @returns {Object} Returns `object`.
1988
- */
1989
- function baseAssignIn(object, source) {
1990
- return object && copyObject(source, keysIn(source), object);
1991
- }
892
+ function isPrototype(value) {
893
+ var Ctor = value && value.constructor,
894
+ proto = typeof Ctor == 'function' && Ctor.prototype || objectProto$4;
895
+ return value === proto;
896
+ }
1992
897
 
1993
- /** Detect free variable `exports`. */
1994
- var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
1995
-
1996
- /** Detect free variable `module`. */
1997
- var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
1998
-
1999
- /** Detect the popular CommonJS extension `module.exports`. */
2000
- var moduleExports = freeModule && freeModule.exports === freeExports;
2001
-
2002
- /** Built-in value references. */
2003
- var Buffer = moduleExports ? root$1.Buffer : undefined,
2004
- allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;
2005
-
2006
- /**
2007
- * Creates a clone of `buffer`.
2008
- *
2009
- * @private
2010
- * @param {Buffer} buffer The buffer to clone.
2011
- * @param {boolean} [isDeep] Specify a deep clone.
2012
- * @returns {Buffer} Returns the cloned buffer.
2013
- */
2014
- function cloneBuffer(buffer, isDeep) {
2015
- if (isDeep) {
2016
- return buffer.slice();
2017
- }
2018
- var length = buffer.length,
2019
- result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
898
+ function overArg(func, transform) {
899
+ return function (arg) {
900
+ return func(transform(arg));
901
+ };
902
+ }
2020
903
 
2021
- buffer.copy(result);
2022
- return result;
2023
- }
904
+ var nativeKeys = overArg(Object.keys, Object);
905
+ var nativeKeys$1 = nativeKeys;
906
+
907
+ var objectProto$3 = Object.prototype;
2024
908
 
2025
- /**
2026
- * Copies the values of `source` to `array`.
2027
- *
2028
- * @private
2029
- * @param {Array} source The array to copy values from.
2030
- * @param {Array} [array=[]] The array to copy values to.
2031
- * @returns {Array} Returns `array`.
2032
- */
2033
- function copyArray(source, array) {
2034
- var index = -1,
2035
- length = source.length;
2036
-
2037
- array || (array = Array(length));
2038
- while (++index < length) {
2039
- array[index] = source[index];
909
+ var hasOwnProperty$2 = objectProto$3.hasOwnProperty;
910
+
911
+ function baseKeys(object) {
912
+ if (!isPrototype(object)) {
913
+ return nativeKeys$1(object);
914
+ }
915
+ var result = [];
916
+ for (var key in Object(object)) {
917
+ if (hasOwnProperty$2.call(object, key) && key != 'constructor') {
918
+ result.push(key);
2040
919
  }
2041
- return array;
2042
920
  }
921
+ return result;
922
+ }
2043
923
 
2044
- /**
2045
- * A specialized version of `_.filter` for arrays without support for
2046
- * iteratee shorthands.
2047
- *
2048
- * @private
2049
- * @param {Array} [array] The array to iterate over.
2050
- * @param {Function} predicate The function invoked per iteration.
2051
- * @returns {Array} Returns the new filtered array.
2052
- */
2053
- function arrayFilter(array, predicate) {
2054
- var index = -1,
2055
- length = array == null ? 0 : array.length,
2056
- resIndex = 0,
2057
- result = [];
2058
-
2059
- while (++index < length) {
2060
- var value = array[index];
2061
- if (predicate(value, index, array)) {
2062
- result[resIndex++] = value;
2063
- }
924
+ function isArrayLike(value) {
925
+ return value != null && isLength(value.length) && !isFunction(value);
926
+ }
927
+
928
+ function keys(object) {
929
+ return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
930
+ }
931
+
932
+ function baseAssign(object, source) {
933
+ return object && copyObject(source, keys(source), object);
934
+ }
935
+
936
+ function nativeKeysIn(object) {
937
+ var result = [];
938
+ if (object != null) {
939
+ for (var key in Object(object)) {
940
+ result.push(key);
2064
941
  }
2065
- return result;
2066
942
  }
943
+ return result;
944
+ }
2067
945
 
2068
- /**
2069
- * This method returns a new empty array.
2070
- *
2071
- * @static
2072
- * @memberOf _
2073
- * @since 4.13.0
2074
- * @category Util
2075
- * @returns {Array} Returns the new empty array.
2076
- * @example
2077
- *
2078
- * var arrays = _.times(2, _.stubArray);
2079
- *
2080
- * console.log(arrays);
2081
- * // => [[], []]
2082
- *
2083
- * console.log(arrays[0] === arrays[1]);
2084
- * // => false
2085
- */
2086
- function stubArray() {
2087
- return [];
2088
- }
946
+ var objectProto$2 = Object.prototype;
2089
947
 
2090
- /** Used for built-in method references. */
2091
- var objectProto$1 = Object.prototype;
2092
-
2093
- /** Built-in value references. */
2094
- var propertyIsEnumerable = objectProto$1.propertyIsEnumerable;
2095
-
2096
- /* Built-in method references for those with the same name as other `lodash` methods. */
2097
- var nativeGetSymbols$1 = Object.getOwnPropertySymbols;
2098
-
2099
- /**
2100
- * Creates an array of the own enumerable symbols of `object`.
2101
- *
2102
- * @private
2103
- * @param {Object} object The object to query.
2104
- * @returns {Array} Returns the array of symbols.
2105
- */
2106
- var getSymbols = !nativeGetSymbols$1 ? stubArray : function(object) {
2107
- if (object == null) {
2108
- return [];
2109
- }
2110
- object = Object(object);
2111
- return arrayFilter(nativeGetSymbols$1(object), function(symbol) {
2112
- return propertyIsEnumerable.call(object, symbol);
2113
- });
2114
- };
948
+ var hasOwnProperty$1 = objectProto$2.hasOwnProperty;
2115
949
 
2116
- var getSymbols$1 = getSymbols;
2117
-
2118
- /**
2119
- * Copies own symbols of `source` to `object`.
2120
- *
2121
- * @private
2122
- * @param {Object} source The object to copy symbols from.
2123
- * @param {Object} [object={}] The object to copy symbols to.
2124
- * @returns {Object} Returns `object`.
2125
- */
2126
- function copySymbols(source, object) {
2127
- return copyObject(source, getSymbols$1(source), object);
950
+ function baseKeysIn(object) {
951
+ if (!isObject(object)) {
952
+ return nativeKeysIn(object);
2128
953
  }
2129
-
2130
- /**
2131
- * Appends the elements of `values` to `array`.
2132
- *
2133
- * @private
2134
- * @param {Array} array The array to modify.
2135
- * @param {Array} values The values to append.
2136
- * @returns {Array} Returns `array`.
2137
- */
2138
- function arrayPush(array, values) {
2139
- var index = -1,
2140
- length = values.length,
2141
- offset = array.length;
2142
-
2143
- while (++index < length) {
2144
- array[offset + index] = values[index];
954
+ var isProto = isPrototype(object),
955
+ result = [];
956
+ for (var key in object) {
957
+ if (!(key == 'constructor' && (isProto || !hasOwnProperty$1.call(object, key)))) {
958
+ result.push(key);
2145
959
  }
2146
- return array;
2147
960
  }
961
+ return result;
962
+ }
2148
963
 
2149
- /** Built-in value references. */
2150
- var getPrototype = overArg(Object.getPrototypeOf, Object);
2151
-
2152
- var getPrototype$1 = getPrototype;
2153
-
2154
- /* Built-in method references for those with the same name as other `lodash` methods. */
2155
- var nativeGetSymbols = Object.getOwnPropertySymbols;
2156
-
2157
- /**
2158
- * Creates an array of the own and inherited enumerable symbols of `object`.
2159
- *
2160
- * @private
2161
- * @param {Object} object The object to query.
2162
- * @returns {Array} Returns the array of symbols.
2163
- */
2164
- var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {
2165
- var result = [];
2166
- while (object) {
2167
- arrayPush(result, getSymbols$1(object));
2168
- object = getPrototype$1(object);
2169
- }
2170
- return result;
2171
- };
964
+ function keysIn(object) {
965
+ return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
966
+ }
2172
967
 
2173
- var getSymbolsIn$1 = getSymbolsIn;
2174
-
2175
- /**
2176
- * Copies own and inherited symbols of `source` to `object`.
2177
- *
2178
- * @private
2179
- * @param {Object} source The object to copy symbols from.
2180
- * @param {Object} [object={}] The object to copy symbols to.
2181
- * @returns {Object} Returns `object`.
2182
- */
2183
- function copySymbolsIn(source, object) {
2184
- return copyObject(source, getSymbolsIn$1(source), object);
2185
- }
968
+ function baseAssignIn(object, source) {
969
+ return object && copyObject(source, keysIn(source), object);
970
+ }
2186
971
 
2187
- /**
2188
- * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
2189
- * `keysFunc` and `symbolsFunc` to get the enumerable property names and
2190
- * symbols of `object`.
2191
- *
2192
- * @private
2193
- * @param {Object} object The object to query.
2194
- * @param {Function} keysFunc The function to get the keys of `object`.
2195
- * @param {Function} symbolsFunc The function to get the symbols of `object`.
2196
- * @returns {Array} Returns the array of property names and symbols.
2197
- */
2198
- function baseGetAllKeys(object, keysFunc, symbolsFunc) {
2199
- var result = keysFunc(object);
2200
- return isArray$1(object) ? result : arrayPush(result, symbolsFunc(object));
2201
- }
972
+ var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
2202
973
 
2203
- /**
2204
- * Creates an array of own enumerable property names and symbols of `object`.
2205
- *
2206
- * @private
2207
- * @param {Object} object The object to query.
2208
- * @returns {Array} Returns the array of property names and symbols.
2209
- */
2210
- function getAllKeys(object) {
2211
- return baseGetAllKeys(object, keys, getSymbols$1);
2212
- }
974
+ var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
975
+
976
+ var moduleExports = freeModule && freeModule.exports === freeExports;
977
+
978
+ var Buffer = moduleExports ? root$1.Buffer : undefined,
979
+ allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;
2213
980
 
2214
- /**
2215
- * Creates an array of own and inherited enumerable property names and
2216
- * symbols of `object`.
2217
- *
2218
- * @private
2219
- * @param {Object} object The object to query.
2220
- * @returns {Array} Returns the array of property names and symbols.
2221
- */
2222
- function getAllKeysIn(object) {
2223
- return baseGetAllKeys(object, keysIn, getSymbolsIn$1);
981
+ function cloneBuffer(buffer, isDeep) {
982
+ if (isDeep) {
983
+ return buffer.slice();
2224
984
  }
985
+ var length = buffer.length,
986
+ result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
987
+ buffer.copy(result);
988
+ return result;
989
+ }
2225
990
 
2226
- /* Built-in method references that are verified to be native. */
2227
- var DataView = getNative(root$1, 'DataView');
2228
-
2229
- var DataView$1 = DataView;
2230
-
2231
- /* Built-in method references that are verified to be native. */
2232
- var Promise$1 = getNative(root$1, 'Promise');
2233
-
2234
- var Promise$2 = Promise$1;
2235
-
2236
- /* Built-in method references that are verified to be native. */
2237
- var Set = getNative(root$1, 'Set');
2238
-
2239
- var Set$1 = Set;
2240
-
2241
- /* Built-in method references that are verified to be native. */
2242
- var WeakMap = getNative(root$1, 'WeakMap');
2243
-
2244
- var WeakMap$1 = WeakMap;
2245
-
2246
- /** `Object#toString` result references. */
2247
- var mapTag$3 = '[object Map]',
2248
- objectTag$1 = '[object Object]',
2249
- promiseTag = '[object Promise]',
2250
- setTag$3 = '[object Set]',
2251
- weakMapTag$1 = '[object WeakMap]';
2252
-
2253
- var dataViewTag$2 = '[object DataView]';
2254
-
2255
- /** Used to detect maps, sets, and weakmaps. */
2256
- var dataViewCtorString = toSource(DataView$1),
2257
- mapCtorString = toSource(Map$2),
2258
- promiseCtorString = toSource(Promise$2),
2259
- setCtorString = toSource(Set$1),
2260
- weakMapCtorString = toSource(WeakMap$1);
2261
-
2262
- /**
2263
- * Gets the `toStringTag` of `value`.
2264
- *
2265
- * @private
2266
- * @param {*} value The value to query.
2267
- * @returns {string} Returns the `toStringTag`.
2268
- */
2269
- var getTag = baseGetTag;
2270
-
2271
- // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
2272
- if ((DataView$1 && getTag(new DataView$1(new ArrayBuffer(1))) != dataViewTag$2) ||
2273
- (Map$2 && getTag(new Map$2) != mapTag$3) ||
2274
- (Promise$2 && getTag(Promise$2.resolve()) != promiseTag) ||
2275
- (Set$1 && getTag(new Set$1) != setTag$3) ||
2276
- (WeakMap$1 && getTag(new WeakMap$1) != weakMapTag$1)) {
2277
- getTag = function(value) {
2278
- var result = baseGetTag(value),
2279
- Ctor = result == objectTag$1 ? value.constructor : undefined,
2280
- ctorString = Ctor ? toSource(Ctor) : '';
2281
-
2282
- if (ctorString) {
2283
- switch (ctorString) {
2284
- case dataViewCtorString: return dataViewTag$2;
2285
- case mapCtorString: return mapTag$3;
2286
- case promiseCtorString: return promiseTag;
2287
- case setCtorString: return setTag$3;
2288
- case weakMapCtorString: return weakMapTag$1;
2289
- }
2290
- }
2291
- return result;
2292
- };
991
+ function copyArray(source, array) {
992
+ var index = -1,
993
+ length = source.length;
994
+ array || (array = Array(length));
995
+ while (++index < length) {
996
+ array[index] = source[index];
2293
997
  }
998
+ return array;
999
+ }
2294
1000
 
2295
- var getTag$1 = getTag;
2296
-
2297
- /** Used for built-in method references. */
2298
- var objectProto = Object.prototype;
2299
-
2300
- /** Used to check objects for own properties. */
2301
- var hasOwnProperty = objectProto.hasOwnProperty;
2302
-
2303
- /**
2304
- * Initializes an array clone.
2305
- *
2306
- * @private
2307
- * @param {Array} array The array to clone.
2308
- * @returns {Array} Returns the initialized clone.
2309
- */
2310
- function initCloneArray(array) {
2311
- var length = array.length,
2312
- result = new array.constructor(length);
2313
-
2314
- // Add properties assigned by `RegExp#exec`.
2315
- if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
2316
- result.index = array.index;
2317
- result.input = array.input;
1001
+ function arrayFilter(array, predicate) {
1002
+ var index = -1,
1003
+ length = array == null ? 0 : array.length,
1004
+ resIndex = 0,
1005
+ result = [];
1006
+ while (++index < length) {
1007
+ var value = array[index];
1008
+ if (predicate(value, index, array)) {
1009
+ result[resIndex++] = value;
2318
1010
  }
2319
- return result;
2320
1011
  }
1012
+ return result;
1013
+ }
2321
1014
 
2322
- /** Built-in value references. */
2323
- var Uint8Array = root$1.Uint8Array;
2324
-
2325
- var Uint8Array$1 = Uint8Array;
2326
-
2327
- /**
2328
- * Creates a clone of `arrayBuffer`.
2329
- *
2330
- * @private
2331
- * @param {ArrayBuffer} arrayBuffer The array buffer to clone.
2332
- * @returns {ArrayBuffer} Returns the cloned array buffer.
2333
- */
2334
- function cloneArrayBuffer(arrayBuffer) {
2335
- var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
2336
- new Uint8Array$1(result).set(new Uint8Array$1(arrayBuffer));
2337
- return result;
2338
- }
1015
+ function stubArray() {
1016
+ return [];
1017
+ }
2339
1018
 
2340
- /**
2341
- * Creates a clone of `dataView`.
2342
- *
2343
- * @private
2344
- * @param {Object} dataView The data view to clone.
2345
- * @param {boolean} [isDeep] Specify a deep clone.
2346
- * @returns {Object} Returns the cloned data view.
2347
- */
2348
- function cloneDataView(dataView, isDeep) {
2349
- var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
2350
- return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
2351
- }
1019
+ var objectProto$1 = Object.prototype;
2352
1020
 
2353
- /** Used to match `RegExp` flags from their coerced string values. */
2354
- var reFlags = /\w*$/;
2355
-
2356
- /**
2357
- * Creates a clone of `regexp`.
2358
- *
2359
- * @private
2360
- * @param {Object} regexp The regexp to clone.
2361
- * @returns {Object} Returns the cloned regexp.
2362
- */
2363
- function cloneRegExp(regexp) {
2364
- var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
2365
- result.lastIndex = regexp.lastIndex;
2366
- return result;
2367
- }
1021
+ var propertyIsEnumerable = objectProto$1.propertyIsEnumerable;
2368
1022
 
2369
- /** Used to convert symbols to primitives and strings. */
2370
- var symbolProto = Symbol$2 ? Symbol$2.prototype : undefined,
2371
- symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
2372
-
2373
- /**
2374
- * Creates a clone of the `symbol` object.
2375
- *
2376
- * @private
2377
- * @param {Object} symbol The symbol object to clone.
2378
- * @returns {Object} Returns the cloned symbol object.
2379
- */
2380
- function cloneSymbol(symbol) {
2381
- return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
2382
- }
1023
+ var nativeGetSymbols$1 = Object.getOwnPropertySymbols;
2383
1024
 
2384
- /**
2385
- * Creates a clone of `typedArray`.
2386
- *
2387
- * @private
2388
- * @param {Object} typedArray The typed array to clone.
2389
- * @param {boolean} [isDeep] Specify a deep clone.
2390
- * @returns {Object} Returns the cloned typed array.
2391
- */
2392
- function cloneTypedArray(typedArray, isDeep) {
2393
- var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
2394
- return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
1025
+ var getSymbols = !nativeGetSymbols$1 ? stubArray : function (object) {
1026
+ if (object == null) {
1027
+ return [];
2395
1028
  }
2396
-
2397
- /** `Object#toString` result references. */
2398
- var boolTag$1 = '[object Boolean]',
2399
- dateTag$1 = '[object Date]',
2400
- mapTag$2 = '[object Map]',
2401
- numberTag$1 = '[object Number]',
2402
- regexpTag$1 = '[object RegExp]',
2403
- setTag$2 = '[object Set]',
2404
- stringTag$1 = '[object String]',
2405
- symbolTag$1 = '[object Symbol]';
2406
-
2407
- var arrayBufferTag$1 = '[object ArrayBuffer]',
2408
- dataViewTag$1 = '[object DataView]',
2409
- float32Tag$1 = '[object Float32Array]',
2410
- float64Tag$1 = '[object Float64Array]',
2411
- int8Tag$1 = '[object Int8Array]',
2412
- int16Tag$1 = '[object Int16Array]',
2413
- int32Tag$1 = '[object Int32Array]',
2414
- uint8Tag$1 = '[object Uint8Array]',
2415
- uint8ClampedTag$1 = '[object Uint8ClampedArray]',
2416
- uint16Tag$1 = '[object Uint16Array]',
2417
- uint32Tag$1 = '[object Uint32Array]';
2418
-
2419
- /**
2420
- * Initializes an object clone based on its `toStringTag`.
2421
- *
2422
- * **Note:** This function only supports cloning values with tags of
2423
- * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.
2424
- *
2425
- * @private
2426
- * @param {Object} object The object to clone.
2427
- * @param {string} tag The `toStringTag` of the object to clone.
2428
- * @param {boolean} [isDeep] Specify a deep clone.
2429
- * @returns {Object} Returns the initialized clone.
2430
- */
2431
- function initCloneByTag(object, tag, isDeep) {
2432
- var Ctor = object.constructor;
2433
- switch (tag) {
2434
- case arrayBufferTag$1:
2435
- return cloneArrayBuffer(object);
2436
-
2437
- case boolTag$1:
2438
- case dateTag$1:
2439
- return new Ctor(+object);
2440
-
2441
- case dataViewTag$1:
2442
- return cloneDataView(object, isDeep);
2443
-
2444
- case float32Tag$1: case float64Tag$1:
2445
- case int8Tag$1: case int16Tag$1: case int32Tag$1:
2446
- case uint8Tag$1: case uint8ClampedTag$1: case uint16Tag$1: case uint32Tag$1:
2447
- return cloneTypedArray(object, isDeep);
2448
-
2449
- case mapTag$2:
2450
- return new Ctor;
2451
-
2452
- case numberTag$1:
2453
- case stringTag$1:
2454
- return new Ctor(object);
2455
-
2456
- case regexpTag$1:
2457
- return cloneRegExp(object);
2458
-
2459
- case setTag$2:
2460
- return new Ctor;
2461
-
2462
- case symbolTag$1:
2463
- return cloneSymbol(object);
1029
+ object = Object(object);
1030
+ return arrayFilter(nativeGetSymbols$1(object), function (symbol) {
1031
+ return propertyIsEnumerable.call(object, symbol);
1032
+ });
1033
+ };
1034
+ var getSymbols$1 = getSymbols;
1035
+
1036
+ function copySymbols(source, object) {
1037
+ return copyObject(source, getSymbols$1(source), object);
1038
+ }
1039
+
1040
+ function arrayPush(array, values) {
1041
+ var index = -1,
1042
+ length = values.length,
1043
+ offset = array.length;
1044
+ while (++index < length) {
1045
+ array[offset + index] = values[index];
1046
+ }
1047
+ return array;
1048
+ }
1049
+
1050
+ var getPrototype = overArg(Object.getPrototypeOf, Object);
1051
+ var getPrototype$1 = getPrototype;
1052
+
1053
+ var nativeGetSymbols = Object.getOwnPropertySymbols;
1054
+
1055
+ var getSymbolsIn = !nativeGetSymbols ? stubArray : function (object) {
1056
+ var result = [];
1057
+ while (object) {
1058
+ arrayPush(result, getSymbols$1(object));
1059
+ object = getPrototype$1(object);
1060
+ }
1061
+ return result;
1062
+ };
1063
+ var getSymbolsIn$1 = getSymbolsIn;
1064
+
1065
+ function copySymbolsIn(source, object) {
1066
+ return copyObject(source, getSymbolsIn$1(source), object);
1067
+ }
1068
+
1069
+ function baseGetAllKeys(object, keysFunc, symbolsFunc) {
1070
+ var result = keysFunc(object);
1071
+ return isArray$1(object) ? result : arrayPush(result, symbolsFunc(object));
1072
+ }
1073
+
1074
+ function getAllKeys(object) {
1075
+ return baseGetAllKeys(object, keys, getSymbols$1);
1076
+ }
1077
+
1078
+ function getAllKeysIn(object) {
1079
+ return baseGetAllKeys(object, keysIn, getSymbolsIn$1);
1080
+ }
1081
+
1082
+ var DataView = getNative(root$1, 'DataView');
1083
+ var DataView$1 = DataView;
1084
+
1085
+ var Promise$1 = getNative(root$1, 'Promise');
1086
+ var Promise$2 = Promise$1;
1087
+
1088
+ var Set = getNative(root$1, 'Set');
1089
+ var Set$1 = Set;
1090
+
1091
+ var WeakMap = getNative(root$1, 'WeakMap');
1092
+ var WeakMap$1 = WeakMap;
1093
+
1094
+ var mapTag$3 = '[object Map]',
1095
+ objectTag$1 = '[object Object]',
1096
+ promiseTag = '[object Promise]',
1097
+ setTag$3 = '[object Set]',
1098
+ weakMapTag$1 = '[object WeakMap]';
1099
+ var dataViewTag$2 = '[object DataView]';
1100
+
1101
+ var dataViewCtorString = toSource(DataView$1),
1102
+ mapCtorString = toSource(Map$2),
1103
+ promiseCtorString = toSource(Promise$2),
1104
+ setCtorString = toSource(Set$1),
1105
+ weakMapCtorString = toSource(WeakMap$1);
1106
+
1107
+ var getTag = baseGetTag;
1108
+
1109
+ if (DataView$1 && getTag(new DataView$1(new ArrayBuffer(1))) != dataViewTag$2 || Map$2 && getTag(new Map$2()) != mapTag$3 || Promise$2 && getTag(Promise$2.resolve()) != promiseTag || Set$1 && getTag(new Set$1()) != setTag$3 || WeakMap$1 && getTag(new WeakMap$1()) != weakMapTag$1) {
1110
+ getTag = function getTag(value) {
1111
+ var result = baseGetTag(value),
1112
+ Ctor = result == objectTag$1 ? value.constructor : undefined,
1113
+ ctorString = Ctor ? toSource(Ctor) : '';
1114
+ if (ctorString) {
1115
+ switch (ctorString) {
1116
+ case dataViewCtorString:
1117
+ return dataViewTag$2;
1118
+ case mapCtorString:
1119
+ return mapTag$3;
1120
+ case promiseCtorString:
1121
+ return promiseTag;
1122
+ case setCtorString:
1123
+ return setTag$3;
1124
+ case weakMapCtorString:
1125
+ return weakMapTag$1;
1126
+ }
1127
+ }
1128
+ return result;
1129
+ };
1130
+ }
1131
+ var getTag$1 = getTag;
1132
+
1133
+ var objectProto = Object.prototype;
1134
+
1135
+ var hasOwnProperty = objectProto.hasOwnProperty;
1136
+
1137
+ function initCloneArray(array) {
1138
+ var length = array.length,
1139
+ result = new array.constructor(length);
1140
+
1141
+ if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
1142
+ result.index = array.index;
1143
+ result.input = array.input;
1144
+ }
1145
+ return result;
1146
+ }
1147
+
1148
+ var Uint8Array = root$1.Uint8Array;
1149
+ var Uint8Array$1 = Uint8Array;
1150
+
1151
+ function cloneArrayBuffer(arrayBuffer) {
1152
+ var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
1153
+ new Uint8Array$1(result).set(new Uint8Array$1(arrayBuffer));
1154
+ return result;
1155
+ }
1156
+
1157
+ function cloneDataView(dataView, isDeep) {
1158
+ var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
1159
+ return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
1160
+ }
1161
+
1162
+ var reFlags = /\w*$/;
1163
+
1164
+ function cloneRegExp(regexp) {
1165
+ var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
1166
+ result.lastIndex = regexp.lastIndex;
1167
+ return result;
1168
+ }
1169
+
1170
+ var symbolProto = Symbol$2 ? Symbol$2.prototype : undefined,
1171
+ symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
1172
+
1173
+ function cloneSymbol(symbol) {
1174
+ return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
1175
+ }
1176
+
1177
+ function cloneTypedArray(typedArray, isDeep) {
1178
+ var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
1179
+ return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
1180
+ }
1181
+
1182
+ var boolTag$1 = '[object Boolean]',
1183
+ dateTag$1 = '[object Date]',
1184
+ mapTag$2 = '[object Map]',
1185
+ numberTag$1 = '[object Number]',
1186
+ regexpTag$1 = '[object RegExp]',
1187
+ setTag$2 = '[object Set]',
1188
+ stringTag$1 = '[object String]',
1189
+ symbolTag$1 = '[object Symbol]';
1190
+ var arrayBufferTag$1 = '[object ArrayBuffer]',
1191
+ dataViewTag$1 = '[object DataView]',
1192
+ float32Tag$1 = '[object Float32Array]',
1193
+ float64Tag$1 = '[object Float64Array]',
1194
+ int8Tag$1 = '[object Int8Array]',
1195
+ int16Tag$1 = '[object Int16Array]',
1196
+ int32Tag$1 = '[object Int32Array]',
1197
+ uint8Tag$1 = '[object Uint8Array]',
1198
+ uint8ClampedTag$1 = '[object Uint8ClampedArray]',
1199
+ uint16Tag$1 = '[object Uint16Array]',
1200
+ uint32Tag$1 = '[object Uint32Array]';
1201
+
1202
+ function initCloneByTag(object, tag, isDeep) {
1203
+ var Ctor = object.constructor;
1204
+ switch (tag) {
1205
+ case arrayBufferTag$1:
1206
+ return cloneArrayBuffer(object);
1207
+ case boolTag$1:
1208
+ case dateTag$1:
1209
+ return new Ctor(+object);
1210
+ case dataViewTag$1:
1211
+ return cloneDataView(object, isDeep);
1212
+ case float32Tag$1:
1213
+ case float64Tag$1:
1214
+ case int8Tag$1:
1215
+ case int16Tag$1:
1216
+ case int32Tag$1:
1217
+ case uint8Tag$1:
1218
+ case uint8ClampedTag$1:
1219
+ case uint16Tag$1:
1220
+ case uint32Tag$1:
1221
+ return cloneTypedArray(object, isDeep);
1222
+ case mapTag$2:
1223
+ return new Ctor();
1224
+ case numberTag$1:
1225
+ case stringTag$1:
1226
+ return new Ctor(object);
1227
+ case regexpTag$1:
1228
+ return cloneRegExp(object);
1229
+ case setTag$2:
1230
+ return new Ctor();
1231
+ case symbolTag$1:
1232
+ return cloneSymbol(object);
1233
+ }
1234
+ }
1235
+
1236
+ var objectCreate = Object.create;
1237
+
1238
+ var baseCreate = function () {
1239
+ function object() {}
1240
+ return function (proto) {
1241
+ if (!isObject(proto)) {
1242
+ return {};
2464
1243
  }
1244
+ if (objectCreate) {
1245
+ return objectCreate(proto);
1246
+ }
1247
+ object.prototype = proto;
1248
+ var result = new object();
1249
+ object.prototype = undefined;
1250
+ return result;
1251
+ };
1252
+ }();
1253
+ var baseCreate$1 = baseCreate;
1254
+
1255
+ function initCloneObject(object) {
1256
+ return typeof object.constructor == 'function' && !isPrototype(object) ? baseCreate$1(getPrototype$1(object)) : {};
1257
+ }
1258
+
1259
+ var mapTag$1 = '[object Map]';
1260
+
1261
+ function baseIsMap(value) {
1262
+ return isObjectLike(value) && getTag$1(value) == mapTag$1;
1263
+ }
1264
+
1265
+ var nodeIsMap = nodeUtil$1 && nodeUtil$1.isMap;
1266
+
1267
+ var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;
1268
+ var isMap$1 = isMap;
1269
+
1270
+ var setTag$1 = '[object Set]';
1271
+
1272
+ function baseIsSet(value) {
1273
+ return isObjectLike(value) && getTag$1(value) == setTag$1;
1274
+ }
1275
+
1276
+ var nodeIsSet = nodeUtil$1 && nodeUtil$1.isSet;
1277
+
1278
+ var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
1279
+ var isSet$1 = isSet;
1280
+
1281
+ var CLONE_DEEP_FLAG$1 = 1,
1282
+ CLONE_FLAT_FLAG = 2,
1283
+ CLONE_SYMBOLS_FLAG$1 = 4;
1284
+
1285
+ var argsTag = '[object Arguments]',
1286
+ arrayTag = '[object Array]',
1287
+ boolTag = '[object Boolean]',
1288
+ dateTag = '[object Date]',
1289
+ errorTag = '[object Error]',
1290
+ funcTag = '[object Function]',
1291
+ genTag = '[object GeneratorFunction]',
1292
+ mapTag = '[object Map]',
1293
+ numberTag = '[object Number]',
1294
+ objectTag = '[object Object]',
1295
+ regexpTag = '[object RegExp]',
1296
+ setTag = '[object Set]',
1297
+ stringTag = '[object String]',
1298
+ symbolTag = '[object Symbol]',
1299
+ weakMapTag = '[object WeakMap]';
1300
+ var arrayBufferTag = '[object ArrayBuffer]',
1301
+ dataViewTag = '[object DataView]',
1302
+ float32Tag = '[object Float32Array]',
1303
+ float64Tag = '[object Float64Array]',
1304
+ int8Tag = '[object Int8Array]',
1305
+ int16Tag = '[object Int16Array]',
1306
+ int32Tag = '[object Int32Array]',
1307
+ uint8Tag = '[object Uint8Array]',
1308
+ uint8ClampedTag = '[object Uint8ClampedArray]',
1309
+ uint16Tag = '[object Uint16Array]',
1310
+ uint32Tag = '[object Uint32Array]';
1311
+
1312
+ var cloneableTags = {};
1313
+ cloneableTags[argsTag] = cloneableTags[arrayTag] = cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = cloneableTags[boolTag] = cloneableTags[dateTag] = cloneableTags[float32Tag] = cloneableTags[float64Tag] = cloneableTags[int8Tag] = cloneableTags[int16Tag] = cloneableTags[int32Tag] = cloneableTags[mapTag] = cloneableTags[numberTag] = cloneableTags[objectTag] = cloneableTags[regexpTag] = cloneableTags[setTag] = cloneableTags[stringTag] = cloneableTags[symbolTag] = cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
1314
+ cloneableTags[errorTag] = cloneableTags[funcTag] = cloneableTags[weakMapTag] = false;
1315
+
1316
+ function baseClone(value, bitmask, customizer, key, object, stack) {
1317
+ var result,
1318
+ isDeep = bitmask & CLONE_DEEP_FLAG$1,
1319
+ isFlat = bitmask & CLONE_FLAT_FLAG,
1320
+ isFull = bitmask & CLONE_SYMBOLS_FLAG$1;
1321
+ if (customizer) {
1322
+ result = object ? customizer(value, key, object, stack) : customizer(value);
1323
+ }
1324
+ if (result !== undefined) {
1325
+ return result;
2465
1326
  }
2466
-
2467
- /** Built-in value references. */
2468
- var objectCreate = Object.create;
2469
-
2470
- /**
2471
- * The base implementation of `_.create` without support for assigning
2472
- * properties to the created object.
2473
- *
2474
- * @private
2475
- * @param {Object} proto The object to inherit from.
2476
- * @returns {Object} Returns the new object.
2477
- */
2478
- var baseCreate = (function() {
2479
- function object() {}
2480
- return function(proto) {
2481
- if (!isObject(proto)) {
2482
- return {};
1327
+ if (!isObject(value)) {
1328
+ return value;
1329
+ }
1330
+ var isArr = isArray$1(value);
1331
+ if (isArr) {
1332
+ result = initCloneArray(value);
1333
+ if (!isDeep) {
1334
+ return copyArray(value, result);
1335
+ }
1336
+ } else {
1337
+ var tag = getTag$1(value),
1338
+ isFunc = tag == funcTag || tag == genTag;
1339
+ if (isBuffer$1(value)) {
1340
+ return cloneBuffer(value, isDeep);
1341
+ }
1342
+ if (tag == objectTag || tag == argsTag || isFunc && !object) {
1343
+ result = isFlat || isFunc ? {} : initCloneObject(value);
1344
+ if (!isDeep) {
1345
+ return isFlat ? copySymbolsIn(value, baseAssignIn(result, value)) : copySymbols(value, baseAssign(result, value));
2483
1346
  }
2484
- if (objectCreate) {
2485
- return objectCreate(proto);
1347
+ } else {
1348
+ if (!cloneableTags[tag]) {
1349
+ return object ? value : {};
2486
1350
  }
2487
- object.prototype = proto;
2488
- var result = new object;
2489
- object.prototype = undefined;
2490
- return result;
2491
- };
2492
- }());
2493
-
2494
- var baseCreate$1 = baseCreate;
2495
-
2496
- /**
2497
- * Initializes an object clone.
2498
- *
2499
- * @private
2500
- * @param {Object} object The object to clone.
2501
- * @returns {Object} Returns the initialized clone.
2502
- */
2503
- function initCloneObject(object) {
2504
- return (typeof object.constructor == 'function' && !isPrototype(object))
2505
- ? baseCreate$1(getPrototype$1(object))
2506
- : {};
1351
+ result = initCloneByTag(value, tag, isDeep);
1352
+ }
2507
1353
  }
2508
-
2509
- /** `Object#toString` result references. */
2510
- var mapTag$1 = '[object Map]';
2511
-
2512
- /**
2513
- * The base implementation of `_.isMap` without Node.js optimizations.
2514
- *
2515
- * @private
2516
- * @param {*} value The value to check.
2517
- * @returns {boolean} Returns `true` if `value` is a map, else `false`.
2518
- */
2519
- function baseIsMap(value) {
2520
- return isObjectLike(value) && getTag$1(value) == mapTag$1;
1354
+ stack || (stack = new Stack());
1355
+ var stacked = stack.get(value);
1356
+ if (stacked) {
1357
+ return stacked;
2521
1358
  }
2522
-
2523
- /* Node.js helper references. */
2524
- var nodeIsMap = nodeUtil$1 && nodeUtil$1.isMap;
2525
-
2526
- /**
2527
- * Checks if `value` is classified as a `Map` object.
2528
- *
2529
- * @static
2530
- * @memberOf _
2531
- * @since 4.3.0
2532
- * @category Lang
2533
- * @param {*} value The value to check.
2534
- * @returns {boolean} Returns `true` if `value` is a map, else `false`.
2535
- * @example
2536
- *
2537
- * _.isMap(new Map);
2538
- * // => true
2539
- *
2540
- * _.isMap(new WeakMap);
2541
- * // => false
2542
- */
2543
- var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;
2544
-
2545
- var isMap$1 = isMap;
2546
-
2547
- /** `Object#toString` result references. */
2548
- var setTag$1 = '[object Set]';
2549
-
2550
- /**
2551
- * The base implementation of `_.isSet` without Node.js optimizations.
2552
- *
2553
- * @private
2554
- * @param {*} value The value to check.
2555
- * @returns {boolean} Returns `true` if `value` is a set, else `false`.
2556
- */
2557
- function baseIsSet(value) {
2558
- return isObjectLike(value) && getTag$1(value) == setTag$1;
1359
+ stack.set(value, result);
1360
+ if (isSet$1(value)) {
1361
+ value.forEach(function (subValue) {
1362
+ result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
1363
+ });
1364
+ } else if (isMap$1(value)) {
1365
+ value.forEach(function (subValue, key) {
1366
+ result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));
1367
+ });
2559
1368
  }
2560
-
2561
- /* Node.js helper references. */
2562
- var nodeIsSet = nodeUtil$1 && nodeUtil$1.isSet;
2563
-
2564
- /**
2565
- * Checks if `value` is classified as a `Set` object.
2566
- *
2567
- * @static
2568
- * @memberOf _
2569
- * @since 4.3.0
2570
- * @category Lang
2571
- * @param {*} value The value to check.
2572
- * @returns {boolean} Returns `true` if `value` is a set, else `false`.
2573
- * @example
2574
- *
2575
- * _.isSet(new Set);
2576
- * // => true
2577
- *
2578
- * _.isSet(new WeakSet);
2579
- * // => false
2580
- */
2581
- var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
2582
-
2583
- var isSet$1 = isSet;
2584
-
2585
- /** Used to compose bitmasks for cloning. */
2586
- var CLONE_DEEP_FLAG$1 = 1,
2587
- CLONE_FLAT_FLAG = 2,
2588
- CLONE_SYMBOLS_FLAG$1 = 4;
2589
-
2590
- /** `Object#toString` result references. */
2591
- var argsTag = '[object Arguments]',
2592
- arrayTag = '[object Array]',
2593
- boolTag = '[object Boolean]',
2594
- dateTag = '[object Date]',
2595
- errorTag = '[object Error]',
2596
- funcTag = '[object Function]',
2597
- genTag = '[object GeneratorFunction]',
2598
- mapTag = '[object Map]',
2599
- numberTag = '[object Number]',
2600
- objectTag = '[object Object]',
2601
- regexpTag = '[object RegExp]',
2602
- setTag = '[object Set]',
2603
- stringTag = '[object String]',
2604
- symbolTag = '[object Symbol]',
2605
- weakMapTag = '[object WeakMap]';
2606
-
2607
- var arrayBufferTag = '[object ArrayBuffer]',
2608
- dataViewTag = '[object DataView]',
2609
- float32Tag = '[object Float32Array]',
2610
- float64Tag = '[object Float64Array]',
2611
- int8Tag = '[object Int8Array]',
2612
- int16Tag = '[object Int16Array]',
2613
- int32Tag = '[object Int32Array]',
2614
- uint8Tag = '[object Uint8Array]',
2615
- uint8ClampedTag = '[object Uint8ClampedArray]',
2616
- uint16Tag = '[object Uint16Array]',
2617
- uint32Tag = '[object Uint32Array]';
2618
-
2619
- /** Used to identify `toStringTag` values supported by `_.clone`. */
2620
- var cloneableTags = {};
2621
- cloneableTags[argsTag] = cloneableTags[arrayTag] =
2622
- cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =
2623
- cloneableTags[boolTag] = cloneableTags[dateTag] =
2624
- cloneableTags[float32Tag] = cloneableTags[float64Tag] =
2625
- cloneableTags[int8Tag] = cloneableTags[int16Tag] =
2626
- cloneableTags[int32Tag] = cloneableTags[mapTag] =
2627
- cloneableTags[numberTag] = cloneableTags[objectTag] =
2628
- cloneableTags[regexpTag] = cloneableTags[setTag] =
2629
- cloneableTags[stringTag] = cloneableTags[symbolTag] =
2630
- cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =
2631
- cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
2632
- cloneableTags[errorTag] = cloneableTags[funcTag] =
2633
- cloneableTags[weakMapTag] = false;
2634
-
2635
- /**
2636
- * The base implementation of `_.clone` and `_.cloneDeep` which tracks
2637
- * traversed objects.
2638
- *
2639
- * @private
2640
- * @param {*} value The value to clone.
2641
- * @param {boolean} bitmask The bitmask flags.
2642
- * 1 - Deep clone
2643
- * 2 - Flatten inherited properties
2644
- * 4 - Clone symbols
2645
- * @param {Function} [customizer] The function to customize cloning.
2646
- * @param {string} [key] The key of `value`.
2647
- * @param {Object} [object] The parent object of `value`.
2648
- * @param {Object} [stack] Tracks traversed objects and their clone counterparts.
2649
- * @returns {*} Returns the cloned value.
2650
- */
2651
- function baseClone(value, bitmask, customizer, key, object, stack) {
2652
- var result,
2653
- isDeep = bitmask & CLONE_DEEP_FLAG$1,
2654
- isFlat = bitmask & CLONE_FLAT_FLAG,
2655
- isFull = bitmask & CLONE_SYMBOLS_FLAG$1;
2656
-
2657
- if (customizer) {
2658
- result = object ? customizer(value, key, object, stack) : customizer(value);
1369
+ var keysFunc = isFull ? isFlat ? getAllKeysIn : getAllKeys : isFlat ? keysIn : keys;
1370
+ var props = isArr ? undefined : keysFunc(value);
1371
+ arrayEach(props || value, function (subValue, key) {
1372
+ if (props) {
1373
+ key = subValue;
1374
+ subValue = value[key];
2659
1375
  }
2660
- if (result !== undefined) {
2661
- return result;
1376
+ assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));
1377
+ });
1378
+ return result;
1379
+ }
1380
+
1381
+ var CLONE_DEEP_FLAG = 1,
1382
+ CLONE_SYMBOLS_FLAG = 4;
1383
+
1384
+ function cloneDeep(value) {
1385
+ return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);
1386
+ }
1387
+ var _defineCache = new Map();
1388
+ function defineProperty(key, deep, store, originKey, originStore, callback) {
1389
+ if (!_defineCache.has(store)) {
1390
+ _defineCache.set(store, []);
1391
+ }
1392
+ if (_defineCache.get(store).indexOf(key) > -1) {
1393
+ return;
1394
+ }
1395
+ _defineCache.get(store).push(key);
1396
+ var props = key.split('.');
1397
+ var obj = store;
1398
+ var length = props.length;
1399
+ for (var i = 0; i < length - 1; i++) {
1400
+ if (obj[props[i]] === undefined) {
1401
+ return;
2662
1402
  }
2663
- if (!isObject(value)) {
2664
- return value;
1403
+ obj = obj[props[i]];
1404
+ }
1405
+ var value = obj[props[length - 1]];
1406
+ if (deep && isObject(value)) {
1407
+ for (var key_1 in value) {
1408
+ defineProperty(key_1, deep, value, originKey, originStore, callback);
2665
1409
  }
2666
- var isArr = isArray$1(value);
2667
- if (isArr) {
2668
- result = initCloneArray(value);
2669
- if (!isDeep) {
2670
- return copyArray(value, result);
1410
+ }
1411
+ var _key = "_" + props[length - 1];
1412
+ obj[_key] = value;
1413
+ Object.defineProperty(obj, _key, {
1414
+ enumerable: false
1415
+ });
1416
+ Object.defineProperty(obj, props[length - 1], {
1417
+ set: function set(val) {
1418
+ var oldStore = cloneDeep(originStore);
1419
+ obj["_" + props[length - 1]] = val;
1420
+ callback(originKey, oldStore);
1421
+ if (deep && isObject(val)) {
1422
+ _defineCache.delete(obj);
1423
+ for (var key_2 in val) {
1424
+ defineProperty(key_2, deep, val, originKey, originStore, callback);
1425
+ }
2671
1426
  }
1427
+ },
1428
+ get: function get() {
1429
+ return obj["_" + props[length - 1]];
1430
+ }
1431
+ });
1432
+ }
1433
+ function updateStore(store, newStore, force) {
1434
+ for (var key in store) {
1435
+ if (!(key in newStore)) {
1436
+ continue;
1437
+ }
1438
+ if (typeof store[key] === 'object') {
1439
+ updateStore(store[key], newStore[key], force);
2672
1440
  } else {
2673
- var tag = getTag$1(value),
2674
- isFunc = tag == funcTag || tag == genTag;
2675
-
2676
- if (isBuffer$1(value)) {
2677
- return cloneBuffer(value, isDeep);
1441
+ if (force || store[key] !== newStore[key]) {
1442
+ store[key] = newStore[key];
2678
1443
  }
2679
- if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
2680
- result = (isFlat || isFunc) ? {} : initCloneObject(value);
2681
- if (!isDeep) {
2682
- return isFlat
2683
- ? copySymbolsIn(value, baseAssignIn(result, value))
2684
- : copySymbols(value, baseAssign(result, value));
2685
- }
2686
- } else {
2687
- if (!cloneableTags[tag]) {
2688
- return object ? value : {};
1444
+ }
1445
+ }
1446
+ }
1447
+ var EvaXSystem = function (_super) {
1448
+ __extends(EvaXSystem, _super);
1449
+ function EvaXSystem() {
1450
+ var _this = _super !== null && _super.apply(this, arguments) || this;
1451
+ _this.changeList = [];
1452
+ return _this;
1453
+ }
1454
+ EvaXSystem.prototype.init = function (_a) {
1455
+ var _b = (_a === void 0 ? {
1456
+ store: {}
1457
+ } : _a).store,
1458
+ store = _b === void 0 ? {} : _b;
1459
+ this.ee = new EventEmitter();
1460
+ this.store = store;
1461
+ this.bindDefaultListener();
1462
+ };
1463
+ EvaXSystem.prototype.bindDefaultListener = function () {
1464
+ var _this = this;
1465
+ this.ee.on('evax.updateStore', function (store) {
1466
+ _this.updateStore(store);
1467
+ });
1468
+ this.ee.on('evax.forceUpdateStore', function (store) {
1469
+ _this.forceUpdateStore(store);
1470
+ });
1471
+ };
1472
+ EvaXSystem.prototype.changeCallback = function (key, oldStore) {
1473
+ this.changeList.push({
1474
+ key: key,
1475
+ oldStore: oldStore
1476
+ });
1477
+ };
1478
+ EvaXSystem.prototype.updateStore = function (store) {
1479
+ updateStore(this.store, store, false);
1480
+ };
1481
+ EvaXSystem.prototype.forceUpdateStore = function (store) {
1482
+ updateStore(this.store, store, true);
1483
+ };
1484
+ EvaXSystem.prototype.bindListener = function (key, deep) {
1485
+ var _this = this;
1486
+ if (key.indexOf('store.') === -1) {
1487
+ return;
1488
+ }
1489
+ var realKey = key.split('.').slice(1).join('.');
1490
+ defineProperty(realKey, deep, this.store, key, this.store, function (key, oldStore) {
1491
+ return _this.changeCallback(key, oldStore);
1492
+ });
1493
+ };
1494
+ EvaXSystem.prototype.update = function () {
1495
+ var e_1, _a;
1496
+ var changes = this.componentObserver.clear();
1497
+ try {
1498
+ for (var changes_1 = __values(changes), changes_1_1 = changes_1.next(); !changes_1_1.done; changes_1_1 = changes_1.next()) {
1499
+ var changed = changes_1_1.value;
1500
+ switch (changed.type) {
1501
+ case eva_js.OBSERVER_TYPE.ADD:
1502
+ this.add(changed);
1503
+ break;
1504
+ case eva_js.OBSERVER_TYPE.REMOVE:
1505
+ this.remove(changed);
1506
+ break;
2689
1507
  }
2690
- result = initCloneByTag(value, tag, isDeep);
1508
+ }
1509
+ } catch (e_1_1) {
1510
+ e_1 = {
1511
+ error: e_1_1
1512
+ };
1513
+ } finally {
1514
+ try {
1515
+ if (changes_1_1 && !changes_1_1.done && (_a = changes_1.return)) _a.call(changes_1);
1516
+ } finally {
1517
+ if (e_1) throw e_1.error;
2691
1518
  }
2692
1519
  }
2693
- // Check for circular references and return its corresponding clone.
2694
- stack || (stack = new Stack);
2695
- var stacked = stack.get(value);
2696
- if (stacked) {
2697
- return stacked;
1520
+ };
1521
+ EvaXSystem.prototype.lateUpdate = function () {
1522
+ var e_2, _a;
1523
+ try {
1524
+ for (var _b = __values(this.changeList), _c = _b.next(); !_c.done; _c = _b.next()) {
1525
+ var item = _c.value;
1526
+ this.ee.emit(item.key, this.store, item.oldStore);
1527
+ }
1528
+ } catch (e_2_1) {
1529
+ e_2 = {
1530
+ error: e_2_1
1531
+ };
1532
+ } finally {
1533
+ try {
1534
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
1535
+ } finally {
1536
+ if (e_2) throw e_2.error;
1537
+ }
2698
1538
  }
2699
- stack.set(value, result);
2700
-
2701
- if (isSet$1(value)) {
2702
- value.forEach(function(subValue) {
2703
- result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
2704
- });
2705
- } else if (isMap$1(value)) {
2706
- value.forEach(function(subValue, key) {
2707
- result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));
2708
- });
1539
+ this.changeList = [];
1540
+ };
1541
+ EvaXSystem.prototype.add = function (changed) {
1542
+ var component = changed.component;
1543
+ component.evax = this;
1544
+ for (var key in component.events) {
1545
+ if (component.events[key]) {
1546
+ this.bindListener(key, !!component.events[key].deep);
1547
+ var func = void 0;
1548
+ if (component.events[key] instanceof Function) {
1549
+ func = component.events[key];
1550
+ } else {
1551
+ func = component.events[key].handler;
1552
+ }
1553
+ this.ee.on(key, func.bind(component));
1554
+ }
2709
1555
  }
2710
-
2711
- var keysFunc = isFull
2712
- ? (isFlat ? getAllKeysIn : getAllKeys)
2713
- : (isFlat ? keysIn : keys);
2714
-
2715
- var props = isArr ? undefined : keysFunc(value);
2716
- arrayEach(props || value, function(subValue, key) {
2717
- if (props) {
2718
- key = subValue;
2719
- subValue = value[key];
1556
+ };
1557
+ EvaXSystem.prototype.remove = function (changed) {
1558
+ var component = changed.component;
1559
+ for (var key in component.events) {
1560
+ if (component.events[key] instanceof Function) {
1561
+ this.ee.off(key, component.events[key].bind(component));
2720
1562
  }
2721
- // Recursively populate clone (susceptible to call stack limits).
2722
- assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));
2723
- });
2724
- return result;
2725
- }
2726
-
2727
- /** Used to compose bitmasks for cloning. */
2728
- var CLONE_DEEP_FLAG = 1,
2729
- CLONE_SYMBOLS_FLAG = 4;
2730
-
2731
- /**
2732
- * This method is like `_.clone` except that it recursively clones `value`.
2733
- *
2734
- * @static
2735
- * @memberOf _
2736
- * @since 1.0.0
2737
- * @category Lang
2738
- * @param {*} value The value to recursively clone.
2739
- * @returns {*} Returns the deep cloned value.
2740
- * @see _.clone
2741
- * @example
2742
- *
2743
- * var objects = [{ 'a': 1 }, { 'b': 2 }];
2744
- *
2745
- * var deep = _.cloneDeep(objects);
2746
- * console.log(deep[0] === objects[0]);
2747
- * // => false
2748
- */
2749
- function cloneDeep(value) {
2750
- return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);
2751
- }
2752
-
2753
- var _defineCache = new Map();
2754
- function defineProperty(key, deep, store, originKey, originStore, callback) {
2755
- if (!_defineCache.has(store)) {
2756
- _defineCache.set(store, []);
2757
- }
2758
- if (_defineCache.get(store).indexOf(key) > -1) {
2759
- return;
2760
- }
2761
- _defineCache.get(store).push(key);
2762
- var props = key.split('.');
2763
- var obj = store;
2764
- var length = props.length;
2765
- for (var i = 0; i < length - 1; i++) {
2766
- if (obj[props[i]] === undefined) {
2767
- return;
2768
- }
2769
- obj = obj[props[i]];
2770
- }
2771
- var value = obj[props[length - 1]];
2772
- if (deep && isObject(value)) {
2773
- for (var key_1 in value) {
2774
- defineProperty(key_1, deep, value, originKey, originStore, callback);
2775
- }
2776
- }
2777
- var _key = "_" + props[length - 1];
2778
- obj[_key] = value;
2779
- Object.defineProperty(obj, _key, {
2780
- enumerable: false,
2781
- });
2782
- Object.defineProperty(obj, props[length - 1], {
2783
- set: function (val) {
2784
- var oldStore = cloneDeep(originStore);
2785
- obj["_" + props[length - 1]] = val;
2786
- callback(originKey, oldStore);
2787
- if (deep && isObject(val)) {
2788
- _defineCache.delete(obj);
2789
- for (var key_2 in val) {
2790
- defineProperty(key_2, deep, val, originKey, originStore, callback);
2791
- }
2792
- }
2793
- },
2794
- get: function () {
2795
- return obj["_" + props[length - 1]];
2796
- },
2797
- });
2798
- }
2799
- function updateStore(store, newStore, force) {
2800
- for (var key in store) {
2801
- if (!(key in newStore)) {
2802
- continue;
2803
- }
2804
- if (typeof store[key] === 'object') {
2805
- updateStore(store[key], newStore[key], force);
2806
- }
2807
- else {
2808
- if (force || store[key] !== newStore[key]) {
2809
- store[key] = newStore[key];
2810
- }
2811
- }
2812
- }
2813
- }
2814
-
2815
- var EvaXSystem = (function (_super) {
2816
- __extends(EvaXSystem, _super);
2817
- function EvaXSystem() {
2818
- var _this = _super !== null && _super.apply(this, arguments) || this;
2819
- _this.changeList = [];
2820
- return _this;
2821
- }
2822
- EvaXSystem.prototype.init = function (_a) {
2823
- var _b = (_a === void 0 ? { store: {} } : _a).store, store = _b === void 0 ? {} : _b;
2824
- this.ee = new EventEmitter();
2825
- this.store = store;
2826
- this.bindDefaultListener();
2827
- };
2828
- EvaXSystem.prototype.bindDefaultListener = function () {
2829
- var _this = this;
2830
- this.ee.on('evax.updateStore', function (store) {
2831
- _this.updateStore(store);
2832
- });
2833
- this.ee.on('evax.forceUpdateStore', function (store) {
2834
- _this.forceUpdateStore(store);
2835
- });
2836
- };
2837
- EvaXSystem.prototype.changeCallback = function (key, oldStore) {
2838
- this.changeList.push({
2839
- key: key,
2840
- oldStore: oldStore,
2841
- });
2842
- };
2843
- EvaXSystem.prototype.updateStore = function (store) {
2844
- updateStore(this.store, store, false);
2845
- };
2846
- EvaXSystem.prototype.forceUpdateStore = function (store) {
2847
- updateStore(this.store, store, true);
2848
- };
2849
- EvaXSystem.prototype.bindListener = function (key, deep) {
2850
- var _this = this;
2851
- if (key.indexOf('store.') === -1) {
2852
- return;
2853
- }
2854
- var realKey = key.split('.').slice(1).join('.');
2855
- defineProperty(realKey, deep, this.store, key, this.store, function (key, oldStore) { return _this.changeCallback(key, oldStore); });
2856
- };
2857
- EvaXSystem.prototype.update = function () {
2858
- var e_1, _a;
2859
- var changes = this.componentObserver.clear();
2860
- try {
2861
- for (var changes_1 = __values(changes), changes_1_1 = changes_1.next(); !changes_1_1.done; changes_1_1 = changes_1.next()) {
2862
- var changed = changes_1_1.value;
2863
- switch (changed.type) {
2864
- case eva_js.OBSERVER_TYPE.ADD:
2865
- this.add(changed);
2866
- break;
2867
- case eva_js.OBSERVER_TYPE.REMOVE:
2868
- this.remove(changed);
2869
- break;
2870
- }
2871
- }
2872
- }
2873
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
2874
- finally {
2875
- try {
2876
- if (changes_1_1 && !changes_1_1.done && (_a = changes_1.return)) _a.call(changes_1);
2877
- }
2878
- finally { if (e_1) throw e_1.error; }
2879
- }
2880
- };
2881
- EvaXSystem.prototype.lateUpdate = function () {
2882
- var e_2, _a;
2883
- try {
2884
- for (var _b = __values(this.changeList), _c = _b.next(); !_c.done; _c = _b.next()) {
2885
- var item = _c.value;
2886
- this.ee.emit(item.key, this.store, item.oldStore);
2887
- }
2888
- }
2889
- catch (e_2_1) { e_2 = { error: e_2_1 }; }
2890
- finally {
2891
- try {
2892
- if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
2893
- }
2894
- finally { if (e_2) throw e_2.error; }
2895
- }
2896
- this.changeList = [];
2897
- };
2898
- EvaXSystem.prototype.add = function (changed) {
2899
- var component = changed.component;
2900
- component.evax = this;
2901
- for (var key in component.events) {
2902
- if (component.events[key]) {
2903
- this.bindListener(key, !!component.events[key].deep);
2904
- var func = void 0;
2905
- if (component.events[key] instanceof Function) {
2906
- func = component.events[key];
2907
- }
2908
- else {
2909
- func = component.events[key].handler;
2910
- }
2911
- this.ee.on(key, func.bind(component));
2912
- }
2913
- }
2914
- };
2915
- EvaXSystem.prototype.remove = function (changed) {
2916
- var component = changed.component;
2917
- for (var key in component.events) {
2918
- if (component.events[key] instanceof Function) {
2919
- this.ee.off(key, component.events[key].bind(component));
2920
- }
2921
- }
2922
- };
2923
- EvaXSystem.prototype.on = function (eventName, func) {
2924
- return this.ee.on(eventName, func, this);
2925
- };
2926
- EvaXSystem.prototype.off = function (eventName, func) {
2927
- return this.ee.off(eventName, func);
2928
- };
2929
- EvaXSystem.prototype.emit = function (eventName) {
2930
- var _a;
2931
- var args = [];
2932
- for (var _i = 1; _i < arguments.length; _i++) {
2933
- args[_i - 1] = arguments[_i];
2934
- }
2935
- return (_a = this.ee).emit.apply(_a, __spread([eventName], args));
2936
- };
2937
- EvaXSystem.prototype.onDestroy = function () { };
2938
- EvaXSystem.systemName = 'EvaX';
2939
- EvaXSystem = __decorate([
2940
- eva_js.decorators.componentObserver({
2941
- EvaX: [],
2942
- })
2943
- ], EvaXSystem);
2944
- return EvaXSystem;
2945
- }(eva_js.System));
2946
- var EvaXSystem$1 = EvaXSystem;
2947
-
2948
- var index = {
2949
- Components: [EvaXComponent$1],
2950
- Systems: [EvaXSystem$1],
1563
+ }
2951
1564
  };
2952
-
2953
- exports.EvaX = EvaXComponent$1;
2954
- exports.EvaXSystem = EvaXSystem$1;
2955
- exports['default'] = index;
2956
-
2957
- Object.defineProperty(exports, '__esModule', { value: true });
2958
-
2959
- })));
2960
- //# sourceMappingURL=EVA.plugin.EVAX.js.map
1565
+ EvaXSystem.prototype.on = function (eventName, func) {
1566
+ return this.ee.on(eventName, func, this);
1567
+ };
1568
+ EvaXSystem.prototype.off = function (eventName, func) {
1569
+ return this.ee.off(eventName, func);
1570
+ };
1571
+ EvaXSystem.prototype.emit = function (eventName) {
1572
+ var _a;
1573
+ var args = [];
1574
+ for (var _i = 1; _i < arguments.length; _i++) {
1575
+ args[_i - 1] = arguments[_i];
1576
+ }
1577
+ return (_a = this.ee).emit.apply(_a, __spread([eventName], args));
1578
+ };
1579
+ EvaXSystem.prototype.onDestroy = function () {};
1580
+ EvaXSystem.systemName = 'EvaX';
1581
+ EvaXSystem = __decorate([eva_js.decorators.componentObserver({
1582
+ EvaX: []
1583
+ })], EvaXSystem);
1584
+ return EvaXSystem;
1585
+ }(eva_js.System);
1586
+ var EvaXSystem$1 = EvaXSystem;
1587
+ var index = {
1588
+ Components: [EvaXComponent$1],
1589
+ Systems: [EvaXSystem$1]
1590
+ };
1591
+ exports.EvaX = EvaXComponent$1;
1592
+ exports.EvaXSystem = EvaXSystem$1;
1593
+ exports["default"] = index;
1594
+ Object.defineProperty(exports, '__esModule', {
1595
+ value: true
1596
+ });
1597
+ return exports;
1598
+ }({}, EVA);
1599
+ window.EVA.plugin.EVAX = window.EVA.plugin.EVAX || _EVA_IIFE_EVAX;