UNPKG

284 kBJavaScriptView Raw
1/*
2 * testdouble@3.16.1
3 *
4 * A minimal test double library for TDD with JavaScript
5 *
6 * https://github.com/testdouble/testdouble.js
7 */
8(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.td = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
9// Copyright Joyent, Inc. and other Node contributors.
10//
11// Permission is hereby granted, free of charge, to any person obtaining a
12// copy of this software and associated documentation files (the
13// "Software"), to deal in the Software without restriction, including
14// without limitation the rights to use, copy, modify, merge, publish,
15// distribute, sublicense, and/or sell copies of the Software, and to permit
16// persons to whom the Software is furnished to do so, subject to the
17// following conditions:
18//
19// The above copyright notice and this permission notice shall be included
20// in all copies or substantial portions of the Software.
21//
22// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
23// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
24// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
25// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
26// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
27// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
28// USE OR OTHER DEALINGS IN THE SOFTWARE.
29
30var objectCreate = Object.create || objectCreatePolyfill
31var objectKeys = Object.keys || objectKeysPolyfill
32var bind = Function.prototype.bind || functionBindPolyfill
33
34function EventEmitter() {
35 if (!this._events || !Object.prototype.hasOwnProperty.call(this, '_events')) {
36 this._events = objectCreate(null);
37 this._eventsCount = 0;
38 }
39
40 this._maxListeners = this._maxListeners || undefined;
41}
42module.exports = EventEmitter;
43
44// Backwards-compat with node 0.10.x
45EventEmitter.EventEmitter = EventEmitter;
46
47EventEmitter.prototype._events = undefined;
48EventEmitter.prototype._maxListeners = undefined;
49
50// By default EventEmitters will print a warning if more than 10 listeners are
51// added to it. This is a useful default which helps finding memory leaks.
52var defaultMaxListeners = 10;
53
54var hasDefineProperty;
55try {
56 var o = {};
57 if (Object.defineProperty) Object.defineProperty(o, 'x', { value: 0 });
58 hasDefineProperty = o.x === 0;
59} catch (err) { hasDefineProperty = false }
60if (hasDefineProperty) {
61 Object.defineProperty(EventEmitter, 'defaultMaxListeners', {
62 enumerable: true,
63 get: function() {
64 return defaultMaxListeners;
65 },
66 set: function(arg) {
67 // check whether the input is a positive number (whose value is zero or
68 // greater and not a NaN).
69 if (typeof arg !== 'number' || arg < 0 || arg !== arg)
70 throw new TypeError('"defaultMaxListeners" must be a positive number');
71 defaultMaxListeners = arg;
72 }
73 });
74} else {
75 EventEmitter.defaultMaxListeners = defaultMaxListeners;
76}
77
78// Obviously not all Emitters should be limited to 10. This function allows
79// that to be increased. Set to zero for unlimited.
80EventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {
81 if (typeof n !== 'number' || n < 0 || isNaN(n))
82 throw new TypeError('"n" argument must be a positive number');
83 this._maxListeners = n;
84 return this;
85};
86
87function $getMaxListeners(that) {
88 if (that._maxListeners === undefined)
89 return EventEmitter.defaultMaxListeners;
90 return that._maxListeners;
91}
92
93EventEmitter.prototype.getMaxListeners = function getMaxListeners() {
94 return $getMaxListeners(this);
95};
96
97// These standalone emit* functions are used to optimize calling of event
98// handlers for fast cases because emit() itself often has a variable number of
99// arguments and can be deoptimized because of that. These functions always have
100// the same number of arguments and thus do not get deoptimized, so the code
101// inside them can execute faster.
102function emitNone(handler, isFn, self) {
103 if (isFn)
104 handler.call(self);
105 else {
106 var len = handler.length;
107 var listeners = arrayClone(handler, len);
108 for (var i = 0; i < len; ++i)
109 listeners[i].call(self);
110 }
111}
112function emitOne(handler, isFn, self, arg1) {
113 if (isFn)
114 handler.call(self, arg1);
115 else {
116 var len = handler.length;
117 var listeners = arrayClone(handler, len);
118 for (var i = 0; i < len; ++i)
119 listeners[i].call(self, arg1);
120 }
121}
122function emitTwo(handler, isFn, self, arg1, arg2) {
123 if (isFn)
124 handler.call(self, arg1, arg2);
125 else {
126 var len = handler.length;
127 var listeners = arrayClone(handler, len);
128 for (var i = 0; i < len; ++i)
129 listeners[i].call(self, arg1, arg2);
130 }
131}
132function emitThree(handler, isFn, self, arg1, arg2, arg3) {
133 if (isFn)
134 handler.call(self, arg1, arg2, arg3);
135 else {
136 var len = handler.length;
137 var listeners = arrayClone(handler, len);
138 for (var i = 0; i < len; ++i)
139 listeners[i].call(self, arg1, arg2, arg3);
140 }
141}
142
143function emitMany(handler, isFn, self, args) {
144 if (isFn)
145 handler.apply(self, args);
146 else {
147 var len = handler.length;
148 var listeners = arrayClone(handler, len);
149 for (var i = 0; i < len; ++i)
150 listeners[i].apply(self, args);
151 }
152}
153
154EventEmitter.prototype.emit = function emit(type) {
155 var er, handler, len, args, i, events;
156 var doError = (type === 'error');
157
158 events = this._events;
159 if (events)
160 doError = (doError && events.error == null);
161 else if (!doError)
162 return false;
163
164 // If there is no 'error' event listener then throw.
165 if (doError) {
166 if (arguments.length > 1)
167 er = arguments[1];
168 if (er instanceof Error) {
169 throw er; // Unhandled 'error' event
170 } else {
171 // At least give some kind of context to the user
172 var err = new Error('Unhandled "error" event. (' + er + ')');
173 err.context = er;
174 throw err;
175 }
176 return false;
177 }
178
179 handler = events[type];
180
181 if (!handler)
182 return false;
183
184 var isFn = typeof handler === 'function';
185 len = arguments.length;
186 switch (len) {
187 // fast cases
188 case 1:
189 emitNone(handler, isFn, this);
190 break;
191 case 2:
192 emitOne(handler, isFn, this, arguments[1]);
193 break;
194 case 3:
195 emitTwo(handler, isFn, this, arguments[1], arguments[2]);
196 break;
197 case 4:
198 emitThree(handler, isFn, this, arguments[1], arguments[2], arguments[3]);
199 break;
200 // slower
201 default:
202 args = new Array(len - 1);
203 for (i = 1; i < len; i++)
204 args[i - 1] = arguments[i];
205 emitMany(handler, isFn, this, args);
206 }
207
208 return true;
209};
210
211function _addListener(target, type, listener, prepend) {
212 var m;
213 var events;
214 var existing;
215
216 if (typeof listener !== 'function')
217 throw new TypeError('"listener" argument must be a function');
218
219 events = target._events;
220 if (!events) {
221 events = target._events = objectCreate(null);
222 target._eventsCount = 0;
223 } else {
224 // To avoid recursion in the case that type === "newListener"! Before
225 // adding it to the listeners, first emit "newListener".
226 if (events.newListener) {
227 target.emit('newListener', type,
228 listener.listener ? listener.listener : listener);
229
230 // Re-assign `events` because a newListener handler could have caused the
231 // this._events to be assigned to a new object
232 events = target._events;
233 }
234 existing = events[type];
235 }
236
237 if (!existing) {
238 // Optimize the case of one listener. Don't need the extra array object.
239 existing = events[type] = listener;
240 ++target._eventsCount;
241 } else {
242 if (typeof existing === 'function') {
243 // Adding the second element, need to change to array.
244 existing = events[type] =
245 prepend ? [listener, existing] : [existing, listener];
246 } else {
247 // If we've already got an array, just append.
248 if (prepend) {
249 existing.unshift(listener);
250 } else {
251 existing.push(listener);
252 }
253 }
254
255 // Check for listener leak
256 if (!existing.warned) {
257 m = $getMaxListeners(target);
258 if (m && m > 0 && existing.length > m) {
259 existing.warned = true;
260 var w = new Error('Possible EventEmitter memory leak detected. ' +
261 existing.length + ' "' + String(type) + '" listeners ' +
262 'added. Use emitter.setMaxListeners() to ' +
263 'increase limit.');
264 w.name = 'MaxListenersExceededWarning';
265 w.emitter = target;
266 w.type = type;
267 w.count = existing.length;
268 if (typeof console === 'object' && console.warn) {
269 console.warn('%s: %s', w.name, w.message);
270 }
271 }
272 }
273 }
274
275 return target;
276}
277
278EventEmitter.prototype.addListener = function addListener(type, listener) {
279 return _addListener(this, type, listener, false);
280};
281
282EventEmitter.prototype.on = EventEmitter.prototype.addListener;
283
284EventEmitter.prototype.prependListener =
285 function prependListener(type, listener) {
286 return _addListener(this, type, listener, true);
287 };
288
289function onceWrapper() {
290 if (!this.fired) {
291 this.target.removeListener(this.type, this.wrapFn);
292 this.fired = true;
293 switch (arguments.length) {
294 case 0:
295 return this.listener.call(this.target);
296 case 1:
297 return this.listener.call(this.target, arguments[0]);
298 case 2:
299 return this.listener.call(this.target, arguments[0], arguments[1]);
300 case 3:
301 return this.listener.call(this.target, arguments[0], arguments[1],
302 arguments[2]);
303 default:
304 var args = new Array(arguments.length);
305 for (var i = 0; i < args.length; ++i)
306 args[i] = arguments[i];
307 this.listener.apply(this.target, args);
308 }
309 }
310}
311
312function _onceWrap(target, type, listener) {
313 var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };
314 var wrapped = bind.call(onceWrapper, state);
315 wrapped.listener = listener;
316 state.wrapFn = wrapped;
317 return wrapped;
318}
319
320EventEmitter.prototype.once = function once(type, listener) {
321 if (typeof listener !== 'function')
322 throw new TypeError('"listener" argument must be a function');
323 this.on(type, _onceWrap(this, type, listener));
324 return this;
325};
326
327EventEmitter.prototype.prependOnceListener =
328 function prependOnceListener(type, listener) {
329 if (typeof listener !== 'function')
330 throw new TypeError('"listener" argument must be a function');
331 this.prependListener(type, _onceWrap(this, type, listener));
332 return this;
333 };
334
335// Emits a 'removeListener' event if and only if the listener was removed.
336EventEmitter.prototype.removeListener =
337 function removeListener(type, listener) {
338 var list, events, position, i, originalListener;
339
340 if (typeof listener !== 'function')
341 throw new TypeError('"listener" argument must be a function');
342
343 events = this._events;
344 if (!events)
345 return this;
346
347 list = events[type];
348 if (!list)
349 return this;
350
351 if (list === listener || list.listener === listener) {
352 if (--this._eventsCount === 0)
353 this._events = objectCreate(null);
354 else {
355 delete events[type];
356 if (events.removeListener)
357 this.emit('removeListener', type, list.listener || listener);
358 }
359 } else if (typeof list !== 'function') {
360 position = -1;
361
362 for (i = list.length - 1; i >= 0; i--) {
363 if (list[i] === listener || list[i].listener === listener) {
364 originalListener = list[i].listener;
365 position = i;
366 break;
367 }
368 }
369
370 if (position < 0)
371 return this;
372
373 if (position === 0)
374 list.shift();
375 else
376 spliceOne(list, position);
377
378 if (list.length === 1)
379 events[type] = list[0];
380
381 if (events.removeListener)
382 this.emit('removeListener', type, originalListener || listener);
383 }
384
385 return this;
386 };
387
388EventEmitter.prototype.removeAllListeners =
389 function removeAllListeners(type) {
390 var listeners, events, i;
391
392 events = this._events;
393 if (!events)
394 return this;
395
396 // not listening for removeListener, no need to emit
397 if (!events.removeListener) {
398 if (arguments.length === 0) {
399 this._events = objectCreate(null);
400 this._eventsCount = 0;
401 } else if (events[type]) {
402 if (--this._eventsCount === 0)
403 this._events = objectCreate(null);
404 else
405 delete events[type];
406 }
407 return this;
408 }
409
410 // emit removeListener for all listeners on all events
411 if (arguments.length === 0) {
412 var keys = objectKeys(events);
413 var key;
414 for (i = 0; i < keys.length; ++i) {
415 key = keys[i];
416 if (key === 'removeListener') continue;
417 this.removeAllListeners(key);
418 }
419 this.removeAllListeners('removeListener');
420 this._events = objectCreate(null);
421 this._eventsCount = 0;
422 return this;
423 }
424
425 listeners = events[type];
426
427 if (typeof listeners === 'function') {
428 this.removeListener(type, listeners);
429 } else if (listeners) {
430 // LIFO order
431 for (i = listeners.length - 1; i >= 0; i--) {
432 this.removeListener(type, listeners[i]);
433 }
434 }
435
436 return this;
437 };
438
439function _listeners(target, type, unwrap) {
440 var events = target._events;
441
442 if (!events)
443 return [];
444
445 var evlistener = events[type];
446 if (!evlistener)
447 return [];
448
449 if (typeof evlistener === 'function')
450 return unwrap ? [evlistener.listener || evlistener] : [evlistener];
451
452 return unwrap ? unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);
453}
454
455EventEmitter.prototype.listeners = function listeners(type) {
456 return _listeners(this, type, true);
457};
458
459EventEmitter.prototype.rawListeners = function rawListeners(type) {
460 return _listeners(this, type, false);
461};
462
463EventEmitter.listenerCount = function(emitter, type) {
464 if (typeof emitter.listenerCount === 'function') {
465 return emitter.listenerCount(type);
466 } else {
467 return listenerCount.call(emitter, type);
468 }
469};
470
471EventEmitter.prototype.listenerCount = listenerCount;
472function listenerCount(type) {
473 var events = this._events;
474
475 if (events) {
476 var evlistener = events[type];
477
478 if (typeof evlistener === 'function') {
479 return 1;
480 } else if (evlistener) {
481 return evlistener.length;
482 }
483 }
484
485 return 0;
486}
487
488EventEmitter.prototype.eventNames = function eventNames() {
489 return this._eventsCount > 0 ? Reflect.ownKeys(this._events) : [];
490};
491
492// About 1.5x faster than the two-arg version of Array#splice().
493function spliceOne(list, index) {
494 for (var i = index, k = i + 1, n = list.length; k < n; i += 1, k += 1)
495 list[i] = list[k];
496 list.pop();
497}
498
499function arrayClone(arr, n) {
500 var copy = new Array(n);
501 for (var i = 0; i < n; ++i)
502 copy[i] = arr[i];
503 return copy;
504}
505
506function unwrapListeners(arr) {
507 var ret = new Array(arr.length);
508 for (var i = 0; i < ret.length; ++i) {
509 ret[i] = arr[i].listener || arr[i];
510 }
511 return ret;
512}
513
514function objectCreatePolyfill(proto) {
515 var F = function() {};
516 F.prototype = proto;
517 return new F;
518}
519function objectKeysPolyfill(obj) {
520 var keys = [];
521 for (var k in obj) if (Object.prototype.hasOwnProperty.call(obj, k)) {
522 keys.push(k);
523 }
524 return k;
525}
526function functionBindPolyfill(context) {
527 var fn = this;
528 return function () {
529 return fn.apply(context, arguments);
530 };
531}
532
533},{}],2:[function(require,module,exports){
534'use strict';
535var toString = Object.prototype.toString;
536
537module.exports = function (x) {
538 var prototype;
539 return toString.call(x) === '[object Object]' && (prototype = Object.getPrototypeOf(x), prototype === null || prototype === Object.getPrototypeOf({}));
540};
541
542},{}],3:[function(require,module,exports){
543'use strict';
544module.exports = function (re) {
545 return Object.prototype.toString.call(re) === '[object RegExp]';
546};
547
548},{}],4:[function(require,module,exports){
549var getNative = require('./_getNative'),
550 root = require('./_root');
551
552/* Built-in method references that are verified to be native. */
553var DataView = getNative(root, 'DataView');
554
555module.exports = DataView;
556
557},{"./_getNative":105,"./_root":151}],5:[function(require,module,exports){
558var hashClear = require('./_hashClear'),
559 hashDelete = require('./_hashDelete'),
560 hashGet = require('./_hashGet'),
561 hashHas = require('./_hashHas'),
562 hashSet = require('./_hashSet');
563
564/**
565 * Creates a hash object.
566 *
567 * @private
568 * @constructor
569 * @param {Array} [entries] The key-value pairs to cache.
570 */
571function Hash(entries) {
572 var index = -1,
573 length = entries == null ? 0 : entries.length;
574
575 this.clear();
576 while (++index < length) {
577 var entry = entries[index];
578 this.set(entry[0], entry[1]);
579 }
580}
581
582// Add methods to `Hash`.
583Hash.prototype.clear = hashClear;
584Hash.prototype['delete'] = hashDelete;
585Hash.prototype.get = hashGet;
586Hash.prototype.has = hashHas;
587Hash.prototype.set = hashSet;
588
589module.exports = Hash;
590
591},{"./_hashClear":114,"./_hashDelete":115,"./_hashGet":116,"./_hashHas":117,"./_hashSet":118}],6:[function(require,module,exports){
592var listCacheClear = require('./_listCacheClear'),
593 listCacheDelete = require('./_listCacheDelete'),
594 listCacheGet = require('./_listCacheGet'),
595 listCacheHas = require('./_listCacheHas'),
596 listCacheSet = require('./_listCacheSet');
597
598/**
599 * Creates an list cache object.
600 *
601 * @private
602 * @constructor
603 * @param {Array} [entries] The key-value pairs to cache.
604 */
605function ListCache(entries) {
606 var index = -1,
607 length = entries == null ? 0 : entries.length;
608
609 this.clear();
610 while (++index < length) {
611 var entry = entries[index];
612 this.set(entry[0], entry[1]);
613 }
614}
615
616// Add methods to `ListCache`.
617ListCache.prototype.clear = listCacheClear;
618ListCache.prototype['delete'] = listCacheDelete;
619ListCache.prototype.get = listCacheGet;
620ListCache.prototype.has = listCacheHas;
621ListCache.prototype.set = listCacheSet;
622
623module.exports = ListCache;
624
625},{"./_listCacheClear":130,"./_listCacheDelete":131,"./_listCacheGet":132,"./_listCacheHas":133,"./_listCacheSet":134}],7:[function(require,module,exports){
626var getNative = require('./_getNative'),
627 root = require('./_root');
628
629/* Built-in method references that are verified to be native. */
630var Map = getNative(root, 'Map');
631
632module.exports = Map;
633
634},{"./_getNative":105,"./_root":151}],8:[function(require,module,exports){
635var mapCacheClear = require('./_mapCacheClear'),
636 mapCacheDelete = require('./_mapCacheDelete'),
637 mapCacheGet = require('./_mapCacheGet'),
638 mapCacheHas = require('./_mapCacheHas'),
639 mapCacheSet = require('./_mapCacheSet');
640
641/**
642 * Creates a map cache object to store key-value pairs.
643 *
644 * @private
645 * @constructor
646 * @param {Array} [entries] The key-value pairs to cache.
647 */
648function MapCache(entries) {
649 var index = -1,
650 length = entries == null ? 0 : entries.length;
651
652 this.clear();
653 while (++index < length) {
654 var entry = entries[index];
655 this.set(entry[0], entry[1]);
656 }
657}
658
659// Add methods to `MapCache`.
660MapCache.prototype.clear = mapCacheClear;
661MapCache.prototype['delete'] = mapCacheDelete;
662MapCache.prototype.get = mapCacheGet;
663MapCache.prototype.has = mapCacheHas;
664MapCache.prototype.set = mapCacheSet;
665
666module.exports = MapCache;
667
668},{"./_mapCacheClear":135,"./_mapCacheDelete":136,"./_mapCacheGet":137,"./_mapCacheHas":138,"./_mapCacheSet":139}],9:[function(require,module,exports){
669var getNative = require('./_getNative'),
670 root = require('./_root');
671
672/* Built-in method references that are verified to be native. */
673var Promise = getNative(root, 'Promise');
674
675module.exports = Promise;
676
677},{"./_getNative":105,"./_root":151}],10:[function(require,module,exports){
678var getNative = require('./_getNative'),
679 root = require('./_root');
680
681/* Built-in method references that are verified to be native. */
682var Set = getNative(root, 'Set');
683
684module.exports = Set;
685
686},{"./_getNative":105,"./_root":151}],11:[function(require,module,exports){
687var MapCache = require('./_MapCache'),
688 setCacheAdd = require('./_setCacheAdd'),
689 setCacheHas = require('./_setCacheHas');
690
691/**
692 *
693 * Creates an array cache object to store unique values.
694 *
695 * @private
696 * @constructor
697 * @param {Array} [values] The values to cache.
698 */
699function SetCache(values) {
700 var index = -1,
701 length = values == null ? 0 : values.length;
702
703 this.__data__ = new MapCache;
704 while (++index < length) {
705 this.add(values[index]);
706 }
707}
708
709// Add methods to `SetCache`.
710SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
711SetCache.prototype.has = setCacheHas;
712
713module.exports = SetCache;
714
715},{"./_MapCache":8,"./_setCacheAdd":152,"./_setCacheHas":153}],12:[function(require,module,exports){
716var ListCache = require('./_ListCache'),
717 stackClear = require('./_stackClear'),
718 stackDelete = require('./_stackDelete'),
719 stackGet = require('./_stackGet'),
720 stackHas = require('./_stackHas'),
721 stackSet = require('./_stackSet');
722
723/**
724 * Creates a stack cache object to store key-value pairs.
725 *
726 * @private
727 * @constructor
728 * @param {Array} [entries] The key-value pairs to cache.
729 */
730function Stack(entries) {
731 var data = this.__data__ = new ListCache(entries);
732 this.size = data.size;
733}
734
735// Add methods to `Stack`.
736Stack.prototype.clear = stackClear;
737Stack.prototype['delete'] = stackDelete;
738Stack.prototype.get = stackGet;
739Stack.prototype.has = stackHas;
740Stack.prototype.set = stackSet;
741
742module.exports = Stack;
743
744},{"./_ListCache":6,"./_stackClear":157,"./_stackDelete":158,"./_stackGet":159,"./_stackHas":160,"./_stackSet":161}],13:[function(require,module,exports){
745var root = require('./_root');
746
747/** Built-in value references. */
748var Symbol = root.Symbol;
749
750module.exports = Symbol;
751
752},{"./_root":151}],14:[function(require,module,exports){
753var root = require('./_root');
754
755/** Built-in value references. */
756var Uint8Array = root.Uint8Array;
757
758module.exports = Uint8Array;
759
760},{"./_root":151}],15:[function(require,module,exports){
761var getNative = require('./_getNative'),
762 root = require('./_root');
763
764/* Built-in method references that are verified to be native. */
765var WeakMap = getNative(root, 'WeakMap');
766
767module.exports = WeakMap;
768
769},{"./_getNative":105,"./_root":151}],16:[function(require,module,exports){
770/**
771 * A faster alternative to `Function#apply`, this function invokes `func`
772 * with the `this` binding of `thisArg` and the arguments of `args`.
773 *
774 * @private
775 * @param {Function} func The function to invoke.
776 * @param {*} thisArg The `this` binding of `func`.
777 * @param {Array} args The arguments to invoke `func` with.
778 * @returns {*} Returns the result of `func`.
779 */
780function apply(func, thisArg, args) {
781 switch (args.length) {
782 case 0: return func.call(thisArg);
783 case 1: return func.call(thisArg, args[0]);
784 case 2: return func.call(thisArg, args[0], args[1]);
785 case 3: return func.call(thisArg, args[0], args[1], args[2]);
786 }
787 return func.apply(thisArg, args);
788}
789
790module.exports = apply;
791
792},{}],17:[function(require,module,exports){
793/**
794 * A specialized version of `baseAggregator` for arrays.
795 *
796 * @private
797 * @param {Array} [array] The array to iterate over.
798 * @param {Function} setter The function to set `accumulator` values.
799 * @param {Function} iteratee The iteratee to transform keys.
800 * @param {Object} accumulator The initial aggregated object.
801 * @returns {Function} Returns `accumulator`.
802 */
803function arrayAggregator(array, setter, iteratee, accumulator) {
804 var index = -1,
805 length = array == null ? 0 : array.length;
806
807 while (++index < length) {
808 var value = array[index];
809 setter(accumulator, value, iteratee(value), array);
810 }
811 return accumulator;
812}
813
814module.exports = arrayAggregator;
815
816},{}],18:[function(require,module,exports){
817/**
818 * A specialized version of `_.forEach` for arrays without support for
819 * iteratee shorthands.
820 *
821 * @private
822 * @param {Array} [array] The array to iterate over.
823 * @param {Function} iteratee The function invoked per iteration.
824 * @returns {Array} Returns `array`.
825 */
826function arrayEach(array, iteratee) {
827 var index = -1,
828 length = array == null ? 0 : array.length;
829
830 while (++index < length) {
831 if (iteratee(array[index], index, array) === false) {
832 break;
833 }
834 }
835 return array;
836}
837
838module.exports = arrayEach;
839
840},{}],19:[function(require,module,exports){
841/**
842 * A specialized version of `_.every` for arrays without support for
843 * iteratee shorthands.
844 *
845 * @private
846 * @param {Array} [array] The array to iterate over.
847 * @param {Function} predicate The function invoked per iteration.
848 * @returns {boolean} Returns `true` if all elements pass the predicate check,
849 * else `false`.
850 */
851function arrayEvery(array, predicate) {
852 var index = -1,
853 length = array == null ? 0 : array.length;
854
855 while (++index < length) {
856 if (!predicate(array[index], index, array)) {
857 return false;
858 }
859 }
860 return true;
861}
862
863module.exports = arrayEvery;
864
865},{}],20:[function(require,module,exports){
866/**
867 * A specialized version of `_.filter` for arrays without support for
868 * iteratee shorthands.
869 *
870 * @private
871 * @param {Array} [array] The array to iterate over.
872 * @param {Function} predicate The function invoked per iteration.
873 * @returns {Array} Returns the new filtered array.
874 */
875function arrayFilter(array, predicate) {
876 var index = -1,
877 length = array == null ? 0 : array.length,
878 resIndex = 0,
879 result = [];
880
881 while (++index < length) {
882 var value = array[index];
883 if (predicate(value, index, array)) {
884 result[resIndex++] = value;
885 }
886 }
887 return result;
888}
889
890module.exports = arrayFilter;
891
892},{}],21:[function(require,module,exports){
893var baseTimes = require('./_baseTimes'),
894 isArguments = require('./isArguments'),
895 isArray = require('./isArray'),
896 isBuffer = require('./isBuffer'),
897 isIndex = require('./_isIndex'),
898 isTypedArray = require('./isTypedArray');
899
900/** Used for built-in method references. */
901var objectProto = Object.prototype;
902
903/** Used to check objects for own properties. */
904var hasOwnProperty = objectProto.hasOwnProperty;
905
906/**
907 * Creates an array of the enumerable property names of the array-like `value`.
908 *
909 * @private
910 * @param {*} value The value to query.
911 * @param {boolean} inherited Specify returning inherited property names.
912 * @returns {Array} Returns the array of property names.
913 */
914function arrayLikeKeys(value, inherited) {
915 var isArr = isArray(value),
916 isArg = !isArr && isArguments(value),
917 isBuff = !isArr && !isArg && isBuffer(value),
918 isType = !isArr && !isArg && !isBuff && isTypedArray(value),
919 skipIndexes = isArr || isArg || isBuff || isType,
920 result = skipIndexes ? baseTimes(value.length, String) : [],
921 length = result.length;
922
923 for (var key in value) {
924 if ((inherited || hasOwnProperty.call(value, key)) &&
925 !(skipIndexes && (
926 // Safari 9 has enumerable `arguments.length` in strict mode.
927 key == 'length' ||
928 // Node.js 0.10 has enumerable non-index properties on buffers.
929 (isBuff && (key == 'offset' || key == 'parent')) ||
930 // PhantomJS 2 has enumerable non-index properties on typed arrays.
931 (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
932 // Skip index properties.
933 isIndex(key, length)
934 ))) {
935 result.push(key);
936 }
937 }
938 return result;
939}
940
941module.exports = arrayLikeKeys;
942
943},{"./_baseTimes":71,"./_isIndex":122,"./isArguments":194,"./isArray":195,"./isBuffer":198,"./isTypedArray":212}],22:[function(require,module,exports){
944/**
945 * A specialized version of `_.map` for arrays without support for iteratee
946 * shorthands.
947 *
948 * @private
949 * @param {Array} [array] The array to iterate over.
950 * @param {Function} iteratee The function invoked per iteration.
951 * @returns {Array} Returns the new mapped array.
952 */
953function arrayMap(array, iteratee) {
954 var index = -1,
955 length = array == null ? 0 : array.length,
956 result = Array(length);
957
958 while (++index < length) {
959 result[index] = iteratee(array[index], index, array);
960 }
961 return result;
962}
963
964module.exports = arrayMap;
965
966},{}],23:[function(require,module,exports){
967/**
968 * Appends the elements of `values` to `array`.
969 *
970 * @private
971 * @param {Array} array The array to modify.
972 * @param {Array} values The values to append.
973 * @returns {Array} Returns `array`.
974 */
975function arrayPush(array, values) {
976 var index = -1,
977 length = values.length,
978 offset = array.length;
979
980 while (++index < length) {
981 array[offset + index] = values[index];
982 }
983 return array;
984}
985
986module.exports = arrayPush;
987
988},{}],24:[function(require,module,exports){
989/**
990 * A specialized version of `_.reduce` for arrays without support for
991 * iteratee shorthands.
992 *
993 * @private
994 * @param {Array} [array] The array to iterate over.
995 * @param {Function} iteratee The function invoked per iteration.
996 * @param {*} [accumulator] The initial value.
997 * @param {boolean} [initAccum] Specify using the first element of `array` as
998 * the initial value.
999 * @returns {*} Returns the accumulated value.
1000 */
1001function arrayReduce(array, iteratee, accumulator, initAccum) {
1002 var index = -1,
1003 length = array == null ? 0 : array.length;
1004
1005 if (initAccum && length) {
1006 accumulator = array[++index];
1007 }
1008 while (++index < length) {
1009 accumulator = iteratee(accumulator, array[index], index, array);
1010 }
1011 return accumulator;
1012}
1013
1014module.exports = arrayReduce;
1015
1016},{}],25:[function(require,module,exports){
1017/**
1018 * A specialized version of `_.some` for arrays without support for iteratee
1019 * shorthands.
1020 *
1021 * @private
1022 * @param {Array} [array] The array to iterate over.
1023 * @param {Function} predicate The function invoked per iteration.
1024 * @returns {boolean} Returns `true` if any element passes the predicate check,
1025 * else `false`.
1026 */
1027function arraySome(array, predicate) {
1028 var index = -1,
1029 length = array == null ? 0 : array.length;
1030
1031 while (++index < length) {
1032 if (predicate(array[index], index, array)) {
1033 return true;
1034 }
1035 }
1036 return false;
1037}
1038
1039module.exports = arraySome;
1040
1041},{}],26:[function(require,module,exports){
1042/**
1043 * Converts an ASCII `string` to an array.
1044 *
1045 * @private
1046 * @param {string} string The string to convert.
1047 * @returns {Array} Returns the converted array.
1048 */
1049function asciiToArray(string) {
1050 return string.split('');
1051}
1052
1053module.exports = asciiToArray;
1054
1055},{}],27:[function(require,module,exports){
1056var baseAssignValue = require('./_baseAssignValue'),
1057 eq = require('./eq');
1058
1059/** Used for built-in method references. */
1060var objectProto = Object.prototype;
1061
1062/** Used to check objects for own properties. */
1063var hasOwnProperty = objectProto.hasOwnProperty;
1064
1065/**
1066 * Assigns `value` to `key` of `object` if the existing value is not equivalent
1067 * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
1068 * for equality comparisons.
1069 *
1070 * @private
1071 * @param {Object} object The object to modify.
1072 * @param {string} key The key of the property to assign.
1073 * @param {*} value The value to assign.
1074 */
1075function assignValue(object, key, value) {
1076 var objValue = object[key];
1077 if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
1078 (value === undefined && !(key in object))) {
1079 baseAssignValue(object, key, value);
1080 }
1081}
1082
1083module.exports = assignValue;
1084
1085},{"./_baseAssignValue":32,"./eq":179}],28:[function(require,module,exports){
1086var eq = require('./eq');
1087
1088/**
1089 * Gets the index at which the `key` is found in `array` of key-value pairs.
1090 *
1091 * @private
1092 * @param {Array} array The array to inspect.
1093 * @param {*} key The key to search for.
1094 * @returns {number} Returns the index of the matched value, else `-1`.
1095 */
1096function assocIndexOf(array, key) {
1097 var length = array.length;
1098 while (length--) {
1099 if (eq(array[length][0], key)) {
1100 return length;
1101 }
1102 }
1103 return -1;
1104}
1105
1106module.exports = assocIndexOf;
1107
1108},{"./eq":179}],29:[function(require,module,exports){
1109var baseEach = require('./_baseEach');
1110
1111/**
1112 * Aggregates elements of `collection` on `accumulator` with keys transformed
1113 * by `iteratee` and values set by `setter`.
1114 *
1115 * @private
1116 * @param {Array|Object} collection The collection to iterate over.
1117 * @param {Function} setter The function to set `accumulator` values.
1118 * @param {Function} iteratee The iteratee to transform keys.
1119 * @param {Object} accumulator The initial aggregated object.
1120 * @returns {Function} Returns `accumulator`.
1121 */
1122function baseAggregator(collection, setter, iteratee, accumulator) {
1123 baseEach(collection, function(value, key, collection) {
1124 setter(accumulator, value, iteratee(value), collection);
1125 });
1126 return accumulator;
1127}
1128
1129module.exports = baseAggregator;
1130
1131},{"./_baseEach":36}],30:[function(require,module,exports){
1132var copyObject = require('./_copyObject'),
1133 keys = require('./keys');
1134
1135/**
1136 * The base implementation of `_.assign` without support for multiple sources
1137 * or `customizer` functions.
1138 *
1139 * @private
1140 * @param {Object} object The destination object.
1141 * @param {Object} source The source object.
1142 * @returns {Object} Returns `object`.
1143 */
1144function baseAssign(object, source) {
1145 return object && copyObject(source, keys(source), object);
1146}
1147
1148module.exports = baseAssign;
1149
1150},{"./_copyObject":86,"./keys":213}],31:[function(require,module,exports){
1151var copyObject = require('./_copyObject'),
1152 keysIn = require('./keysIn');
1153
1154/**
1155 * The base implementation of `_.assignIn` without support for multiple sources
1156 * or `customizer` functions.
1157 *
1158 * @private
1159 * @param {Object} object The destination object.
1160 * @param {Object} source The source object.
1161 * @returns {Object} Returns `object`.
1162 */
1163function baseAssignIn(object, source) {
1164 return object && copyObject(source, keysIn(source), object);
1165}
1166
1167module.exports = baseAssignIn;
1168
1169},{"./_copyObject":86,"./keysIn":214}],32:[function(require,module,exports){
1170var defineProperty = require('./_defineProperty');
1171
1172/**
1173 * The base implementation of `assignValue` and `assignMergeValue` without
1174 * value checks.
1175 *
1176 * @private
1177 * @param {Object} object The object to modify.
1178 * @param {string} key The key of the property to assign.
1179 * @param {*} value The value to assign.
1180 */
1181function baseAssignValue(object, key, value) {
1182 if (key == '__proto__' && defineProperty) {
1183 defineProperty(object, key, {
1184 'configurable': true,
1185 'enumerable': true,
1186 'value': value,
1187 'writable': true
1188 });
1189 } else {
1190 object[key] = value;
1191 }
1192}
1193
1194module.exports = baseAssignValue;
1195
1196},{"./_defineProperty":96}],33:[function(require,module,exports){
1197var Stack = require('./_Stack'),
1198 arrayEach = require('./_arrayEach'),
1199 assignValue = require('./_assignValue'),
1200 baseAssign = require('./_baseAssign'),
1201 baseAssignIn = require('./_baseAssignIn'),
1202 cloneBuffer = require('./_cloneBuffer'),
1203 copyArray = require('./_copyArray'),
1204 copySymbols = require('./_copySymbols'),
1205 copySymbolsIn = require('./_copySymbolsIn'),
1206 getAllKeys = require('./_getAllKeys'),
1207 getAllKeysIn = require('./_getAllKeysIn'),
1208 getTag = require('./_getTag'),
1209 initCloneArray = require('./_initCloneArray'),
1210 initCloneByTag = require('./_initCloneByTag'),
1211 initCloneObject = require('./_initCloneObject'),
1212 isArray = require('./isArray'),
1213 isBuffer = require('./isBuffer'),
1214 isMap = require('./isMap'),
1215 isObject = require('./isObject'),
1216 isSet = require('./isSet'),
1217 keys = require('./keys');
1218
1219/** Used to compose bitmasks for cloning. */
1220var CLONE_DEEP_FLAG = 1,
1221 CLONE_FLAT_FLAG = 2,
1222 CLONE_SYMBOLS_FLAG = 4;
1223
1224/** `Object#toString` result references. */
1225var argsTag = '[object Arguments]',
1226 arrayTag = '[object Array]',
1227 boolTag = '[object Boolean]',
1228 dateTag = '[object Date]',
1229 errorTag = '[object Error]',
1230 funcTag = '[object Function]',
1231 genTag = '[object GeneratorFunction]',
1232 mapTag = '[object Map]',
1233 numberTag = '[object Number]',
1234 objectTag = '[object Object]',
1235 regexpTag = '[object RegExp]',
1236 setTag = '[object Set]',
1237 stringTag = '[object String]',
1238 symbolTag = '[object Symbol]',
1239 weakMapTag = '[object WeakMap]';
1240
1241var arrayBufferTag = '[object ArrayBuffer]',
1242 dataViewTag = '[object DataView]',
1243 float32Tag = '[object Float32Array]',
1244 float64Tag = '[object Float64Array]',
1245 int8Tag = '[object Int8Array]',
1246 int16Tag = '[object Int16Array]',
1247 int32Tag = '[object Int32Array]',
1248 uint8Tag = '[object Uint8Array]',
1249 uint8ClampedTag = '[object Uint8ClampedArray]',
1250 uint16Tag = '[object Uint16Array]',
1251 uint32Tag = '[object Uint32Array]';
1252
1253/** Used to identify `toStringTag` values supported by `_.clone`. */
1254var cloneableTags = {};
1255cloneableTags[argsTag] = cloneableTags[arrayTag] =
1256cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =
1257cloneableTags[boolTag] = cloneableTags[dateTag] =
1258cloneableTags[float32Tag] = cloneableTags[float64Tag] =
1259cloneableTags[int8Tag] = cloneableTags[int16Tag] =
1260cloneableTags[int32Tag] = cloneableTags[mapTag] =
1261cloneableTags[numberTag] = cloneableTags[objectTag] =
1262cloneableTags[regexpTag] = cloneableTags[setTag] =
1263cloneableTags[stringTag] = cloneableTags[symbolTag] =
1264cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =
1265cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
1266cloneableTags[errorTag] = cloneableTags[funcTag] =
1267cloneableTags[weakMapTag] = false;
1268
1269/**
1270 * The base implementation of `_.clone` and `_.cloneDeep` which tracks
1271 * traversed objects.
1272 *
1273 * @private
1274 * @param {*} value The value to clone.
1275 * @param {boolean} bitmask The bitmask flags.
1276 * 1 - Deep clone
1277 * 2 - Flatten inherited properties
1278 * 4 - Clone symbols
1279 * @param {Function} [customizer] The function to customize cloning.
1280 * @param {string} [key] The key of `value`.
1281 * @param {Object} [object] The parent object of `value`.
1282 * @param {Object} [stack] Tracks traversed objects and their clone counterparts.
1283 * @returns {*} Returns the cloned value.
1284 */
1285function baseClone(value, bitmask, customizer, key, object, stack) {
1286 var result,
1287 isDeep = bitmask & CLONE_DEEP_FLAG,
1288 isFlat = bitmask & CLONE_FLAT_FLAG,
1289 isFull = bitmask & CLONE_SYMBOLS_FLAG;
1290
1291 if (customizer) {
1292 result = object ? customizer(value, key, object, stack) : customizer(value);
1293 }
1294 if (result !== undefined) {
1295 return result;
1296 }
1297 if (!isObject(value)) {
1298 return value;
1299 }
1300 var isArr = isArray(value);
1301 if (isArr) {
1302 result = initCloneArray(value);
1303 if (!isDeep) {
1304 return copyArray(value, result);
1305 }
1306 } else {
1307 var tag = getTag(value),
1308 isFunc = tag == funcTag || tag == genTag;
1309
1310 if (isBuffer(value)) {
1311 return cloneBuffer(value, isDeep);
1312 }
1313 if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
1314 result = (isFlat || isFunc) ? {} : initCloneObject(value);
1315 if (!isDeep) {
1316 return isFlat
1317 ? copySymbolsIn(value, baseAssignIn(result, value))
1318 : copySymbols(value, baseAssign(result, value));
1319 }
1320 } else {
1321 if (!cloneableTags[tag]) {
1322 return object ? value : {};
1323 }
1324 result = initCloneByTag(value, tag, isDeep);
1325 }
1326 }
1327 // Check for circular references and return its corresponding clone.
1328 stack || (stack = new Stack);
1329 var stacked = stack.get(value);
1330 if (stacked) {
1331 return stacked;
1332 }
1333 stack.set(value, result);
1334
1335 if (isSet(value)) {
1336 value.forEach(function(subValue) {
1337 result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
1338 });
1339 } else if (isMap(value)) {
1340 value.forEach(function(subValue, key) {
1341 result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));
1342 });
1343 }
1344
1345 var keysFunc = isFull
1346 ? (isFlat ? getAllKeysIn : getAllKeys)
1347 : (isFlat ? keysIn : keys);
1348
1349 var props = isArr ? undefined : keysFunc(value);
1350 arrayEach(props || value, function(subValue, key) {
1351 if (props) {
1352 key = subValue;
1353 subValue = value[key];
1354 }
1355 // Recursively populate clone (susceptible to call stack limits).
1356 assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));
1357 });
1358 return result;
1359}
1360
1361module.exports = baseClone;
1362
1363},{"./_Stack":12,"./_arrayEach":18,"./_assignValue":27,"./_baseAssign":30,"./_baseAssignIn":31,"./_cloneBuffer":80,"./_copyArray":85,"./_copySymbols":87,"./_copySymbolsIn":88,"./_getAllKeys":101,"./_getAllKeysIn":102,"./_getTag":110,"./_initCloneArray":119,"./_initCloneByTag":120,"./_initCloneObject":121,"./isArray":195,"./isBuffer":198,"./isMap":204,"./isObject":206,"./isSet":209,"./keys":213}],34:[function(require,module,exports){
1364var isObject = require('./isObject');
1365
1366/** Built-in value references. */
1367var objectCreate = Object.create;
1368
1369/**
1370 * The base implementation of `_.create` without support for assigning
1371 * properties to the created object.
1372 *
1373 * @private
1374 * @param {Object} proto The object to inherit from.
1375 * @returns {Object} Returns the new object.
1376 */
1377var baseCreate = (function() {
1378 function object() {}
1379 return function(proto) {
1380 if (!isObject(proto)) {
1381 return {};
1382 }
1383 if (objectCreate) {
1384 return objectCreate(proto);
1385 }
1386 object.prototype = proto;
1387 var result = new object;
1388 object.prototype = undefined;
1389 return result;
1390 };
1391}());
1392
1393module.exports = baseCreate;
1394
1395},{"./isObject":206}],35:[function(require,module,exports){
1396/** Error message constants. */
1397var FUNC_ERROR_TEXT = 'Expected a function';
1398
1399/**
1400 * The base implementation of `_.delay` and `_.defer` which accepts `args`
1401 * to provide to `func`.
1402 *
1403 * @private
1404 * @param {Function} func The function to delay.
1405 * @param {number} wait The number of milliseconds to delay invocation.
1406 * @param {Array} args The arguments to provide to `func`.
1407 * @returns {number|Object} Returns the timer id or timeout object.
1408 */
1409function baseDelay(func, wait, args) {
1410 if (typeof func != 'function') {
1411 throw new TypeError(FUNC_ERROR_TEXT);
1412 }
1413 return setTimeout(function() { func.apply(undefined, args); }, wait);
1414}
1415
1416module.exports = baseDelay;
1417
1418},{}],36:[function(require,module,exports){
1419var baseForOwn = require('./_baseForOwn'),
1420 createBaseEach = require('./_createBaseEach');
1421
1422/**
1423 * The base implementation of `_.forEach` without support for iteratee shorthands.
1424 *
1425 * @private
1426 * @param {Array|Object} collection The collection to iterate over.
1427 * @param {Function} iteratee The function invoked per iteration.
1428 * @returns {Array|Object} Returns `collection`.
1429 */
1430var baseEach = createBaseEach(baseForOwn);
1431
1432module.exports = baseEach;
1433
1434},{"./_baseForOwn":41,"./_createBaseEach":92}],37:[function(require,module,exports){
1435var baseEach = require('./_baseEach');
1436
1437/**
1438 * The base implementation of `_.every` without support for iteratee shorthands.
1439 *
1440 * @private
1441 * @param {Array|Object} collection The collection to iterate over.
1442 * @param {Function} predicate The function invoked per iteration.
1443 * @returns {boolean} Returns `true` if all elements pass the predicate check,
1444 * else `false`
1445 */
1446function baseEvery(collection, predicate) {
1447 var result = true;
1448 baseEach(collection, function(value, index, collection) {
1449 result = !!predicate(value, index, collection);
1450 return result;
1451 });
1452 return result;
1453}
1454
1455module.exports = baseEvery;
1456
1457},{"./_baseEach":36}],38:[function(require,module,exports){
1458var baseEach = require('./_baseEach');
1459
1460/**
1461 * The base implementation of `_.filter` without support for iteratee shorthands.
1462 *
1463 * @private
1464 * @param {Array|Object} collection The collection to iterate over.
1465 * @param {Function} predicate The function invoked per iteration.
1466 * @returns {Array} Returns the new filtered array.
1467 */
1468function baseFilter(collection, predicate) {
1469 var result = [];
1470 baseEach(collection, function(value, index, collection) {
1471 if (predicate(value, index, collection)) {
1472 result.push(value);
1473 }
1474 });
1475 return result;
1476}
1477
1478module.exports = baseFilter;
1479
1480},{"./_baseEach":36}],39:[function(require,module,exports){
1481/**
1482 * The base implementation of `_.findIndex` and `_.findLastIndex` without
1483 * support for iteratee shorthands.
1484 *
1485 * @private
1486 * @param {Array} array The array to inspect.
1487 * @param {Function} predicate The function invoked per iteration.
1488 * @param {number} fromIndex The index to search from.
1489 * @param {boolean} [fromRight] Specify iterating from right to left.
1490 * @returns {number} Returns the index of the matched value, else `-1`.
1491 */
1492function baseFindIndex(array, predicate, fromIndex, fromRight) {
1493 var length = array.length,
1494 index = fromIndex + (fromRight ? 1 : -1);
1495
1496 while ((fromRight ? index-- : ++index < length)) {
1497 if (predicate(array[index], index, array)) {
1498 return index;
1499 }
1500 }
1501 return -1;
1502}
1503
1504module.exports = baseFindIndex;
1505
1506},{}],40:[function(require,module,exports){
1507var createBaseFor = require('./_createBaseFor');
1508
1509/**
1510 * The base implementation of `baseForOwn` which iterates over `object`
1511 * properties returned by `keysFunc` and invokes `iteratee` for each property.
1512 * Iteratee functions may exit iteration early by explicitly returning `false`.
1513 *
1514 * @private
1515 * @param {Object} object The object to iterate over.
1516 * @param {Function} iteratee The function invoked per iteration.
1517 * @param {Function} keysFunc The function to get the keys of `object`.
1518 * @returns {Object} Returns `object`.
1519 */
1520var baseFor = createBaseFor();
1521
1522module.exports = baseFor;
1523
1524},{"./_createBaseFor":93}],41:[function(require,module,exports){
1525var baseFor = require('./_baseFor'),
1526 keys = require('./keys');
1527
1528/**
1529 * The base implementation of `_.forOwn` without support for iteratee shorthands.
1530 *
1531 * @private
1532 * @param {Object} object The object to iterate over.
1533 * @param {Function} iteratee The function invoked per iteration.
1534 * @returns {Object} Returns `object`.
1535 */
1536function baseForOwn(object, iteratee) {
1537 return object && baseFor(object, iteratee, keys);
1538}
1539
1540module.exports = baseForOwn;
1541
1542},{"./_baseFor":40,"./keys":213}],42:[function(require,module,exports){
1543var castPath = require('./_castPath'),
1544 toKey = require('./_toKey');
1545
1546/**
1547 * The base implementation of `_.get` without support for default values.
1548 *
1549 * @private
1550 * @param {Object} object The object to query.
1551 * @param {Array|string} path The path of the property to get.
1552 * @returns {*} Returns the resolved value.
1553 */
1554function baseGet(object, path) {
1555 path = castPath(path, object);
1556
1557 var index = 0,
1558 length = path.length;
1559
1560 while (object != null && index < length) {
1561 object = object[toKey(path[index++])];
1562 }
1563 return (index && index == length) ? object : undefined;
1564}
1565
1566module.exports = baseGet;
1567
1568},{"./_castPath":77,"./_toKey":165}],43:[function(require,module,exports){
1569var arrayPush = require('./_arrayPush'),
1570 isArray = require('./isArray');
1571
1572/**
1573 * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
1574 * `keysFunc` and `symbolsFunc` to get the enumerable property names and
1575 * symbols of `object`.
1576 *
1577 * @private
1578 * @param {Object} object The object to query.
1579 * @param {Function} keysFunc The function to get the keys of `object`.
1580 * @param {Function} symbolsFunc The function to get the symbols of `object`.
1581 * @returns {Array} Returns the array of property names and symbols.
1582 */
1583function baseGetAllKeys(object, keysFunc, symbolsFunc) {
1584 var result = keysFunc(object);
1585 return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
1586}
1587
1588module.exports = baseGetAllKeys;
1589
1590},{"./_arrayPush":23,"./isArray":195}],44:[function(require,module,exports){
1591var Symbol = require('./_Symbol'),
1592 getRawTag = require('./_getRawTag'),
1593 objectToString = require('./_objectToString');
1594
1595/** `Object#toString` result references. */
1596var nullTag = '[object Null]',
1597 undefinedTag = '[object Undefined]';
1598
1599/** Built-in value references. */
1600var symToStringTag = Symbol ? Symbol.toStringTag : undefined;
1601
1602/**
1603 * The base implementation of `getTag` without fallbacks for buggy environments.
1604 *
1605 * @private
1606 * @param {*} value The value to query.
1607 * @returns {string} Returns the `toStringTag`.
1608 */
1609function baseGetTag(value) {
1610 if (value == null) {
1611 return value === undefined ? undefinedTag : nullTag;
1612 }
1613 return (symToStringTag && symToStringTag in Object(value))
1614 ? getRawTag(value)
1615 : objectToString(value);
1616}
1617
1618module.exports = baseGetTag;
1619
1620},{"./_Symbol":13,"./_getRawTag":107,"./_objectToString":147}],45:[function(require,module,exports){
1621/**
1622 * The base implementation of `_.hasIn` without support for deep paths.
1623 *
1624 * @private
1625 * @param {Object} [object] The object to query.
1626 * @param {Array|string} key The key to check.
1627 * @returns {boolean} Returns `true` if `key` exists, else `false`.
1628 */
1629function baseHasIn(object, key) {
1630 return object != null && key in Object(object);
1631}
1632
1633module.exports = baseHasIn;
1634
1635},{}],46:[function(require,module,exports){
1636var baseFindIndex = require('./_baseFindIndex'),
1637 baseIsNaN = require('./_baseIsNaN'),
1638 strictIndexOf = require('./_strictIndexOf');
1639
1640/**
1641 * The base implementation of `_.indexOf` without `fromIndex` bounds checks.
1642 *
1643 * @private
1644 * @param {Array} array The array to inspect.
1645 * @param {*} value The value to search for.
1646 * @param {number} fromIndex The index to search from.
1647 * @returns {number} Returns the index of the matched value, else `-1`.
1648 */
1649function baseIndexOf(array, value, fromIndex) {
1650 return value === value
1651 ? strictIndexOf(array, value, fromIndex)
1652 : baseFindIndex(array, baseIsNaN, fromIndex);
1653}
1654
1655module.exports = baseIndexOf;
1656
1657},{"./_baseFindIndex":39,"./_baseIsNaN":53,"./_strictIndexOf":162}],47:[function(require,module,exports){
1658var apply = require('./_apply'),
1659 castPath = require('./_castPath'),
1660 last = require('./last'),
1661 parent = require('./_parent'),
1662 toKey = require('./_toKey');
1663
1664/**
1665 * The base implementation of `_.invoke` without support for individual
1666 * method arguments.
1667 *
1668 * @private
1669 * @param {Object} object The object to query.
1670 * @param {Array|string} path The path of the method to invoke.
1671 * @param {Array} args The arguments to invoke the method with.
1672 * @returns {*} Returns the result of the invoked method.
1673 */
1674function baseInvoke(object, path, args) {
1675 path = castPath(path, object);
1676 object = parent(object, path);
1677 var func = object == null ? object : object[toKey(last(path))];
1678 return func == null ? undefined : apply(func, object, args);
1679}
1680
1681module.exports = baseInvoke;
1682
1683},{"./_apply":16,"./_castPath":77,"./_parent":150,"./_toKey":165,"./last":215}],48:[function(require,module,exports){
1684var baseGetTag = require('./_baseGetTag'),
1685 isObjectLike = require('./isObjectLike');
1686
1687/** `Object#toString` result references. */
1688var argsTag = '[object Arguments]';
1689
1690/**
1691 * The base implementation of `_.isArguments`.
1692 *
1693 * @private
1694 * @param {*} value The value to check.
1695 * @returns {boolean} Returns `true` if `value` is an `arguments` object,
1696 */
1697function baseIsArguments(value) {
1698 return isObjectLike(value) && baseGetTag(value) == argsTag;
1699}
1700
1701module.exports = baseIsArguments;
1702
1703},{"./_baseGetTag":44,"./isObjectLike":207}],49:[function(require,module,exports){
1704var baseIsEqualDeep = require('./_baseIsEqualDeep'),
1705 isObjectLike = require('./isObjectLike');
1706
1707/**
1708 * The base implementation of `_.isEqual` which supports partial comparisons
1709 * and tracks traversed objects.
1710 *
1711 * @private
1712 * @param {*} value The value to compare.
1713 * @param {*} other The other value to compare.
1714 * @param {boolean} bitmask The bitmask flags.
1715 * 1 - Unordered comparison
1716 * 2 - Partial comparison
1717 * @param {Function} [customizer] The function to customize comparisons.
1718 * @param {Object} [stack] Tracks traversed `value` and `other` objects.
1719 * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
1720 */
1721function baseIsEqual(value, other, bitmask, customizer, stack) {
1722 if (value === other) {
1723 return true;
1724 }
1725 if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {
1726 return value !== value && other !== other;
1727 }
1728 return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
1729}
1730
1731module.exports = baseIsEqual;
1732
1733},{"./_baseIsEqualDeep":50,"./isObjectLike":207}],50:[function(require,module,exports){
1734var Stack = require('./_Stack'),
1735 equalArrays = require('./_equalArrays'),
1736 equalByTag = require('./_equalByTag'),
1737 equalObjects = require('./_equalObjects'),
1738 getTag = require('./_getTag'),
1739 isArray = require('./isArray'),
1740 isBuffer = require('./isBuffer'),
1741 isTypedArray = require('./isTypedArray');
1742
1743/** Used to compose bitmasks for value comparisons. */
1744var COMPARE_PARTIAL_FLAG = 1;
1745
1746/** `Object#toString` result references. */
1747var argsTag = '[object Arguments]',
1748 arrayTag = '[object Array]',
1749 objectTag = '[object Object]';
1750
1751/** Used for built-in method references. */
1752var objectProto = Object.prototype;
1753
1754/** Used to check objects for own properties. */
1755var hasOwnProperty = objectProto.hasOwnProperty;
1756
1757/**
1758 * A specialized version of `baseIsEqual` for arrays and objects which performs
1759 * deep comparisons and tracks traversed objects enabling objects with circular
1760 * references to be compared.
1761 *
1762 * @private
1763 * @param {Object} object The object to compare.
1764 * @param {Object} other The other object to compare.
1765 * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
1766 * @param {Function} customizer The function to customize comparisons.
1767 * @param {Function} equalFunc The function to determine equivalents of values.
1768 * @param {Object} [stack] Tracks traversed `object` and `other` objects.
1769 * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
1770 */
1771function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
1772 var objIsArr = isArray(object),
1773 othIsArr = isArray(other),
1774 objTag = objIsArr ? arrayTag : getTag(object),
1775 othTag = othIsArr ? arrayTag : getTag(other);
1776
1777 objTag = objTag == argsTag ? objectTag : objTag;
1778 othTag = othTag == argsTag ? objectTag : othTag;
1779
1780 var objIsObj = objTag == objectTag,
1781 othIsObj = othTag == objectTag,
1782 isSameTag = objTag == othTag;
1783
1784 if (isSameTag && isBuffer(object)) {
1785 if (!isBuffer(other)) {
1786 return false;
1787 }
1788 objIsArr = true;
1789 objIsObj = false;
1790 }
1791 if (isSameTag && !objIsObj) {
1792 stack || (stack = new Stack);
1793 return (objIsArr || isTypedArray(object))
1794 ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)
1795 : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
1796 }
1797 if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
1798 var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
1799 othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
1800
1801 if (objIsWrapped || othIsWrapped) {
1802 var objUnwrapped = objIsWrapped ? object.value() : object,
1803 othUnwrapped = othIsWrapped ? other.value() : other;
1804
1805 stack || (stack = new Stack);
1806 return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
1807 }
1808 }
1809 if (!isSameTag) {
1810 return false;
1811 }
1812 stack || (stack = new Stack);
1813 return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
1814}
1815
1816module.exports = baseIsEqualDeep;
1817
1818},{"./_Stack":12,"./_equalArrays":97,"./_equalByTag":98,"./_equalObjects":99,"./_getTag":110,"./isArray":195,"./isBuffer":198,"./isTypedArray":212}],51:[function(require,module,exports){
1819var getTag = require('./_getTag'),
1820 isObjectLike = require('./isObjectLike');
1821
1822/** `Object#toString` result references. */
1823var mapTag = '[object Map]';
1824
1825/**
1826 * The base implementation of `_.isMap` without Node.js optimizations.
1827 *
1828 * @private
1829 * @param {*} value The value to check.
1830 * @returns {boolean} Returns `true` if `value` is a map, else `false`.
1831 */
1832function baseIsMap(value) {
1833 return isObjectLike(value) && getTag(value) == mapTag;
1834}
1835
1836module.exports = baseIsMap;
1837
1838},{"./_getTag":110,"./isObjectLike":207}],52:[function(require,module,exports){
1839var Stack = require('./_Stack'),
1840 baseIsEqual = require('./_baseIsEqual');
1841
1842/** Used to compose bitmasks for value comparisons. */
1843var COMPARE_PARTIAL_FLAG = 1,
1844 COMPARE_UNORDERED_FLAG = 2;
1845
1846/**
1847 * The base implementation of `_.isMatch` without support for iteratee shorthands.
1848 *
1849 * @private
1850 * @param {Object} object The object to inspect.
1851 * @param {Object} source The object of property values to match.
1852 * @param {Array} matchData The property names, values, and compare flags to match.
1853 * @param {Function} [customizer] The function to customize comparisons.
1854 * @returns {boolean} Returns `true` if `object` is a match, else `false`.
1855 */
1856function baseIsMatch(object, source, matchData, customizer) {
1857 var index = matchData.length,
1858 length = index,
1859 noCustomizer = !customizer;
1860
1861 if (object == null) {
1862 return !length;
1863 }
1864 object = Object(object);
1865 while (index--) {
1866 var data = matchData[index];
1867 if ((noCustomizer && data[2])
1868 ? data[1] !== object[data[0]]
1869 : !(data[0] in object)
1870 ) {
1871 return false;
1872 }
1873 }
1874 while (++index < length) {
1875 data = matchData[index];
1876 var key = data[0],
1877 objValue = object[key],
1878 srcValue = data[1];
1879
1880 if (noCustomizer && data[2]) {
1881 if (objValue === undefined && !(key in object)) {
1882 return false;
1883 }
1884 } else {
1885 var stack = new Stack;
1886 if (customizer) {
1887 var result = customizer(objValue, srcValue, key, object, source, stack);
1888 }
1889 if (!(result === undefined
1890 ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)
1891 : result
1892 )) {
1893 return false;
1894 }
1895 }
1896 }
1897 return true;
1898}
1899
1900module.exports = baseIsMatch;
1901
1902},{"./_Stack":12,"./_baseIsEqual":49}],53:[function(require,module,exports){
1903/**
1904 * The base implementation of `_.isNaN` without support for number objects.
1905 *
1906 * @private
1907 * @param {*} value The value to check.
1908 * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
1909 */
1910function baseIsNaN(value) {
1911 return value !== value;
1912}
1913
1914module.exports = baseIsNaN;
1915
1916},{}],54:[function(require,module,exports){
1917var isFunction = require('./isFunction'),
1918 isMasked = require('./_isMasked'),
1919 isObject = require('./isObject'),
1920 toSource = require('./_toSource');
1921
1922/**
1923 * Used to match `RegExp`
1924 * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
1925 */
1926var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
1927
1928/** Used to detect host constructors (Safari). */
1929var reIsHostCtor = /^\[object .+?Constructor\]$/;
1930
1931/** Used for built-in method references. */
1932var funcProto = Function.prototype,
1933 objectProto = Object.prototype;
1934
1935/** Used to resolve the decompiled source of functions. */
1936var funcToString = funcProto.toString;
1937
1938/** Used to check objects for own properties. */
1939var hasOwnProperty = objectProto.hasOwnProperty;
1940
1941/** Used to detect if a method is native. */
1942var reIsNative = RegExp('^' +
1943 funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
1944 .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
1945);
1946
1947/**
1948 * The base implementation of `_.isNative` without bad shim checks.
1949 *
1950 * @private
1951 * @param {*} value The value to check.
1952 * @returns {boolean} Returns `true` if `value` is a native function,
1953 * else `false`.
1954 */
1955function baseIsNative(value) {
1956 if (!isObject(value) || isMasked(value)) {
1957 return false;
1958 }
1959 var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
1960 return pattern.test(toSource(value));
1961}
1962
1963module.exports = baseIsNative;
1964
1965},{"./_isMasked":126,"./_toSource":166,"./isFunction":202,"./isObject":206}],55:[function(require,module,exports){
1966var baseGetTag = require('./_baseGetTag'),
1967 isObjectLike = require('./isObjectLike');
1968
1969/** `Object#toString` result references. */
1970var regexpTag = '[object RegExp]';
1971
1972/**
1973 * The base implementation of `_.isRegExp` without Node.js optimizations.
1974 *
1975 * @private
1976 * @param {*} value The value to check.
1977 * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.
1978 */
1979function baseIsRegExp(value) {
1980 return isObjectLike(value) && baseGetTag(value) == regexpTag;
1981}
1982
1983module.exports = baseIsRegExp;
1984
1985},{"./_baseGetTag":44,"./isObjectLike":207}],56:[function(require,module,exports){
1986var getTag = require('./_getTag'),
1987 isObjectLike = require('./isObjectLike');
1988
1989/** `Object#toString` result references. */
1990var setTag = '[object Set]';
1991
1992/**
1993 * The base implementation of `_.isSet` without Node.js optimizations.
1994 *
1995 * @private
1996 * @param {*} value The value to check.
1997 * @returns {boolean} Returns `true` if `value` is a set, else `false`.
1998 */
1999function baseIsSet(value) {
2000 return isObjectLike(value) && getTag(value) == setTag;
2001}
2002
2003module.exports = baseIsSet;
2004
2005},{"./_getTag":110,"./isObjectLike":207}],57:[function(require,module,exports){
2006var baseGetTag = require('./_baseGetTag'),
2007 isLength = require('./isLength'),
2008 isObjectLike = require('./isObjectLike');
2009
2010/** `Object#toString` result references. */
2011var argsTag = '[object Arguments]',
2012 arrayTag = '[object Array]',
2013 boolTag = '[object Boolean]',
2014 dateTag = '[object Date]',
2015 errorTag = '[object Error]',
2016 funcTag = '[object Function]',
2017 mapTag = '[object Map]',
2018 numberTag = '[object Number]',
2019 objectTag = '[object Object]',
2020 regexpTag = '[object RegExp]',
2021 setTag = '[object Set]',
2022 stringTag = '[object String]',
2023 weakMapTag = '[object WeakMap]';
2024
2025var arrayBufferTag = '[object ArrayBuffer]',
2026 dataViewTag = '[object DataView]',
2027 float32Tag = '[object Float32Array]',
2028 float64Tag = '[object Float64Array]',
2029 int8Tag = '[object Int8Array]',
2030 int16Tag = '[object Int16Array]',
2031 int32Tag = '[object Int32Array]',
2032 uint8Tag = '[object Uint8Array]',
2033 uint8ClampedTag = '[object Uint8ClampedArray]',
2034 uint16Tag = '[object Uint16Array]',
2035 uint32Tag = '[object Uint32Array]';
2036
2037/** Used to identify `toStringTag` values of typed arrays. */
2038var typedArrayTags = {};
2039typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
2040typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
2041typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
2042typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
2043typedArrayTags[uint32Tag] = true;
2044typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
2045typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
2046typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
2047typedArrayTags[errorTag] = typedArrayTags[funcTag] =
2048typedArrayTags[mapTag] = typedArrayTags[numberTag] =
2049typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
2050typedArrayTags[setTag] = typedArrayTags[stringTag] =
2051typedArrayTags[weakMapTag] = false;
2052
2053/**
2054 * The base implementation of `_.isTypedArray` without Node.js optimizations.
2055 *
2056 * @private
2057 * @param {*} value The value to check.
2058 * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
2059 */
2060function baseIsTypedArray(value) {
2061 return isObjectLike(value) &&
2062 isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
2063}
2064
2065module.exports = baseIsTypedArray;
2066
2067},{"./_baseGetTag":44,"./isLength":203,"./isObjectLike":207}],58:[function(require,module,exports){
2068var baseMatches = require('./_baseMatches'),
2069 baseMatchesProperty = require('./_baseMatchesProperty'),
2070 identity = require('./identity'),
2071 isArray = require('./isArray'),
2072 property = require('./property');
2073
2074/**
2075 * The base implementation of `_.iteratee`.
2076 *
2077 * @private
2078 * @param {*} [value=_.identity] The value to convert to an iteratee.
2079 * @returns {Function} Returns the iteratee.
2080 */
2081function baseIteratee(value) {
2082 // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.
2083 // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.
2084 if (typeof value == 'function') {
2085 return value;
2086 }
2087 if (value == null) {
2088 return identity;
2089 }
2090 if (typeof value == 'object') {
2091 return isArray(value)
2092 ? baseMatchesProperty(value[0], value[1])
2093 : baseMatches(value);
2094 }
2095 return property(value);
2096}
2097
2098module.exports = baseIteratee;
2099
2100},{"./_baseMatches":62,"./_baseMatchesProperty":63,"./identity":191,"./isArray":195,"./property":219}],59:[function(require,module,exports){
2101var isPrototype = require('./_isPrototype'),
2102 nativeKeys = require('./_nativeKeys');
2103
2104/** Used for built-in method references. */
2105var objectProto = Object.prototype;
2106
2107/** Used to check objects for own properties. */
2108var hasOwnProperty = objectProto.hasOwnProperty;
2109
2110/**
2111 * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
2112 *
2113 * @private
2114 * @param {Object} object The object to query.
2115 * @returns {Array} Returns the array of property names.
2116 */
2117function baseKeys(object) {
2118 if (!isPrototype(object)) {
2119 return nativeKeys(object);
2120 }
2121 var result = [];
2122 for (var key in Object(object)) {
2123 if (hasOwnProperty.call(object, key) && key != 'constructor') {
2124 result.push(key);
2125 }
2126 }
2127 return result;
2128}
2129
2130module.exports = baseKeys;
2131
2132},{"./_isPrototype":127,"./_nativeKeys":144}],60:[function(require,module,exports){
2133var isObject = require('./isObject'),
2134 isPrototype = require('./_isPrototype'),
2135 nativeKeysIn = require('./_nativeKeysIn');
2136
2137/** Used for built-in method references. */
2138var objectProto = Object.prototype;
2139
2140/** Used to check objects for own properties. */
2141var hasOwnProperty = objectProto.hasOwnProperty;
2142
2143/**
2144 * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.
2145 *
2146 * @private
2147 * @param {Object} object The object to query.
2148 * @returns {Array} Returns the array of property names.
2149 */
2150function baseKeysIn(object) {
2151 if (!isObject(object)) {
2152 return nativeKeysIn(object);
2153 }
2154 var isProto = isPrototype(object),
2155 result = [];
2156
2157 for (var key in object) {
2158 if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
2159 result.push(key);
2160 }
2161 }
2162 return result;
2163}
2164
2165module.exports = baseKeysIn;
2166
2167},{"./_isPrototype":127,"./_nativeKeysIn":145,"./isObject":206}],61:[function(require,module,exports){
2168var baseEach = require('./_baseEach'),
2169 isArrayLike = require('./isArrayLike');
2170
2171/**
2172 * The base implementation of `_.map` without support for iteratee shorthands.
2173 *
2174 * @private
2175 * @param {Array|Object} collection The collection to iterate over.
2176 * @param {Function} iteratee The function invoked per iteration.
2177 * @returns {Array} Returns the new mapped array.
2178 */
2179function baseMap(collection, iteratee) {
2180 var index = -1,
2181 result = isArrayLike(collection) ? Array(collection.length) : [];
2182
2183 baseEach(collection, function(value, key, collection) {
2184 result[++index] = iteratee(value, key, collection);
2185 });
2186 return result;
2187}
2188
2189module.exports = baseMap;
2190
2191},{"./_baseEach":36,"./isArrayLike":196}],62:[function(require,module,exports){
2192var baseIsMatch = require('./_baseIsMatch'),
2193 getMatchData = require('./_getMatchData'),
2194 matchesStrictComparable = require('./_matchesStrictComparable');
2195
2196/**
2197 * The base implementation of `_.matches` which doesn't clone `source`.
2198 *
2199 * @private
2200 * @param {Object} source The object of property values to match.
2201 * @returns {Function} Returns the new spec function.
2202 */
2203function baseMatches(source) {
2204 var matchData = getMatchData(source);
2205 if (matchData.length == 1 && matchData[0][2]) {
2206 return matchesStrictComparable(matchData[0][0], matchData[0][1]);
2207 }
2208 return function(object) {
2209 return object === source || baseIsMatch(object, source, matchData);
2210 };
2211}
2212
2213module.exports = baseMatches;
2214
2215},{"./_baseIsMatch":52,"./_getMatchData":104,"./_matchesStrictComparable":141}],63:[function(require,module,exports){
2216var baseIsEqual = require('./_baseIsEqual'),
2217 get = require('./get'),
2218 hasIn = require('./hasIn'),
2219 isKey = require('./_isKey'),
2220 isStrictComparable = require('./_isStrictComparable'),
2221 matchesStrictComparable = require('./_matchesStrictComparable'),
2222 toKey = require('./_toKey');
2223
2224/** Used to compose bitmasks for value comparisons. */
2225var COMPARE_PARTIAL_FLAG = 1,
2226 COMPARE_UNORDERED_FLAG = 2;
2227
2228/**
2229 * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.
2230 *
2231 * @private
2232 * @param {string} path The path of the property to get.
2233 * @param {*} srcValue The value to match.
2234 * @returns {Function} Returns the new spec function.
2235 */
2236function baseMatchesProperty(path, srcValue) {
2237 if (isKey(path) && isStrictComparable(srcValue)) {
2238 return matchesStrictComparable(toKey(path), srcValue);
2239 }
2240 return function(object) {
2241 var objValue = get(object, path);
2242 return (objValue === undefined && objValue === srcValue)
2243 ? hasIn(object, path)
2244 : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
2245 };
2246}
2247
2248module.exports = baseMatchesProperty;
2249
2250},{"./_baseIsEqual":49,"./_isKey":124,"./_isStrictComparable":128,"./_matchesStrictComparable":141,"./_toKey":165,"./get":188,"./hasIn":190}],64:[function(require,module,exports){
2251/**
2252 * The base implementation of `_.property` without support for deep paths.
2253 *
2254 * @private
2255 * @param {string} key The key of the property to get.
2256 * @returns {Function} Returns the new accessor function.
2257 */
2258function baseProperty(key) {
2259 return function(object) {
2260 return object == null ? undefined : object[key];
2261 };
2262}
2263
2264module.exports = baseProperty;
2265
2266},{}],65:[function(require,module,exports){
2267var baseGet = require('./_baseGet');
2268
2269/**
2270 * A specialized version of `baseProperty` which supports deep paths.
2271 *
2272 * @private
2273 * @param {Array|string} path The path of the property to get.
2274 * @returns {Function} Returns the new accessor function.
2275 */
2276function basePropertyDeep(path) {
2277 return function(object) {
2278 return baseGet(object, path);
2279 };
2280}
2281
2282module.exports = basePropertyDeep;
2283
2284},{"./_baseGet":42}],66:[function(require,module,exports){
2285/**
2286 * The base implementation of `_.reduce` and `_.reduceRight`, without support
2287 * for iteratee shorthands, which iterates over `collection` using `eachFunc`.
2288 *
2289 * @private
2290 * @param {Array|Object} collection The collection to iterate over.
2291 * @param {Function} iteratee The function invoked per iteration.
2292 * @param {*} accumulator The initial value.
2293 * @param {boolean} initAccum Specify using the first or last element of
2294 * `collection` as the initial value.
2295 * @param {Function} eachFunc The function to iterate over `collection`.
2296 * @returns {*} Returns the accumulated value.
2297 */
2298function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {
2299 eachFunc(collection, function(value, index, collection) {
2300 accumulator = initAccum
2301 ? (initAccum = false, value)
2302 : iteratee(accumulator, value, index, collection);
2303 });
2304 return accumulator;
2305}
2306
2307module.exports = baseReduce;
2308
2309},{}],67:[function(require,module,exports){
2310var identity = require('./identity'),
2311 overRest = require('./_overRest'),
2312 setToString = require('./_setToString');
2313
2314/**
2315 * The base implementation of `_.rest` which doesn't validate or coerce arguments.
2316 *
2317 * @private
2318 * @param {Function} func The function to apply a rest parameter to.
2319 * @param {number} [start=func.length-1] The start position of the rest parameter.
2320 * @returns {Function} Returns the new function.
2321 */
2322function baseRest(func, start) {
2323 return setToString(overRest(func, start, identity), func + '');
2324}
2325
2326module.exports = baseRest;
2327
2328},{"./_overRest":149,"./_setToString":155,"./identity":191}],68:[function(require,module,exports){
2329var constant = require('./constant'),
2330 defineProperty = require('./_defineProperty'),
2331 identity = require('./identity');
2332
2333/**
2334 * The base implementation of `setToString` without support for hot loop shorting.
2335 *
2336 * @private
2337 * @param {Function} func The function to modify.
2338 * @param {Function} string The `toString` result.
2339 * @returns {Function} Returns `func`.
2340 */
2341var baseSetToString = !defineProperty ? identity : function(func, string) {
2342 return defineProperty(func, 'toString', {
2343 'configurable': true,
2344 'enumerable': false,
2345 'value': constant(string),
2346 'writable': true
2347 });
2348};
2349
2350module.exports = baseSetToString;
2351
2352},{"./_defineProperty":96,"./constant":175,"./identity":191}],69:[function(require,module,exports){
2353/**
2354 * The base implementation of `_.slice` without an iteratee call guard.
2355 *
2356 * @private
2357 * @param {Array} array The array to slice.
2358 * @param {number} [start=0] The start position.
2359 * @param {number} [end=array.length] The end position.
2360 * @returns {Array} Returns the slice of `array`.
2361 */
2362function baseSlice(array, start, end) {
2363 var index = -1,
2364 length = array.length;
2365
2366 if (start < 0) {
2367 start = -start > length ? 0 : (length + start);
2368 }
2369 end = end > length ? length : end;
2370 if (end < 0) {
2371 end += length;
2372 }
2373 length = start > end ? 0 : ((end - start) >>> 0);
2374 start >>>= 0;
2375
2376 var result = Array(length);
2377 while (++index < length) {
2378 result[index] = array[index + start];
2379 }
2380 return result;
2381}
2382
2383module.exports = baseSlice;
2384
2385},{}],70:[function(require,module,exports){
2386var baseEach = require('./_baseEach');
2387
2388/**
2389 * The base implementation of `_.some` without support for iteratee shorthands.
2390 *
2391 * @private
2392 * @param {Array|Object} collection The collection to iterate over.
2393 * @param {Function} predicate The function invoked per iteration.
2394 * @returns {boolean} Returns `true` if any element passes the predicate check,
2395 * else `false`.
2396 */
2397function baseSome(collection, predicate) {
2398 var result;
2399
2400 baseEach(collection, function(value, index, collection) {
2401 result = predicate(value, index, collection);
2402 return !result;
2403 });
2404 return !!result;
2405}
2406
2407module.exports = baseSome;
2408
2409},{"./_baseEach":36}],71:[function(require,module,exports){
2410/**
2411 * The base implementation of `_.times` without support for iteratee shorthands
2412 * or max array length checks.
2413 *
2414 * @private
2415 * @param {number} n The number of times to invoke `iteratee`.
2416 * @param {Function} iteratee The function invoked per iteration.
2417 * @returns {Array} Returns the array of results.
2418 */
2419function baseTimes(n, iteratee) {
2420 var index = -1,
2421 result = Array(n);
2422
2423 while (++index < n) {
2424 result[index] = iteratee(index);
2425 }
2426 return result;
2427}
2428
2429module.exports = baseTimes;
2430
2431},{}],72:[function(require,module,exports){
2432var Symbol = require('./_Symbol'),
2433 arrayMap = require('./_arrayMap'),
2434 isArray = require('./isArray'),
2435 isSymbol = require('./isSymbol');
2436
2437/** Used as references for various `Number` constants. */
2438var INFINITY = 1 / 0;
2439
2440/** Used to convert symbols to primitives and strings. */
2441var symbolProto = Symbol ? Symbol.prototype : undefined,
2442 symbolToString = symbolProto ? symbolProto.toString : undefined;
2443
2444/**
2445 * The base implementation of `_.toString` which doesn't convert nullish
2446 * values to empty strings.
2447 *
2448 * @private
2449 * @param {*} value The value to process.
2450 * @returns {string} Returns the string.
2451 */
2452function baseToString(value) {
2453 // Exit early for strings to avoid a performance hit in some environments.
2454 if (typeof value == 'string') {
2455 return value;
2456 }
2457 if (isArray(value)) {
2458 // Recursively convert values (susceptible to call stack limits).
2459 return arrayMap(value, baseToString) + '';
2460 }
2461 if (isSymbol(value)) {
2462 return symbolToString ? symbolToString.call(value) : '';
2463 }
2464 var result = (value + '');
2465 return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
2466}
2467
2468module.exports = baseToString;
2469
2470},{"./_Symbol":13,"./_arrayMap":22,"./isArray":195,"./isSymbol":211}],73:[function(require,module,exports){
2471/**
2472 * The base implementation of `_.unary` without support for storing metadata.
2473 *
2474 * @private
2475 * @param {Function} func The function to cap arguments for.
2476 * @returns {Function} Returns the new capped function.
2477 */
2478function baseUnary(func) {
2479 return function(value) {
2480 return func(value);
2481 };
2482}
2483
2484module.exports = baseUnary;
2485
2486},{}],74:[function(require,module,exports){
2487var arrayMap = require('./_arrayMap');
2488
2489/**
2490 * The base implementation of `_.values` and `_.valuesIn` which creates an
2491 * array of `object` property values corresponding to the property names
2492 * of `props`.
2493 *
2494 * @private
2495 * @param {Object} object The object to query.
2496 * @param {Array} props The property names to get values for.
2497 * @returns {Object} Returns the array of property values.
2498 */
2499function baseValues(object, props) {
2500 return arrayMap(props, function(key) {
2501 return object[key];
2502 });
2503}
2504
2505module.exports = baseValues;
2506
2507},{"./_arrayMap":22}],75:[function(require,module,exports){
2508/**
2509 * Checks if a `cache` value for `key` exists.
2510 *
2511 * @private
2512 * @param {Object} cache The cache to query.
2513 * @param {string} key The key of the entry to check.
2514 * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
2515 */
2516function cacheHas(cache, key) {
2517 return cache.has(key);
2518}
2519
2520module.exports = cacheHas;
2521
2522},{}],76:[function(require,module,exports){
2523var identity = require('./identity');
2524
2525/**
2526 * Casts `value` to `identity` if it's not a function.
2527 *
2528 * @private
2529 * @param {*} value The value to inspect.
2530 * @returns {Function} Returns cast function.
2531 */
2532function castFunction(value) {
2533 return typeof value == 'function' ? value : identity;
2534}
2535
2536module.exports = castFunction;
2537
2538},{"./identity":191}],77:[function(require,module,exports){
2539var isArray = require('./isArray'),
2540 isKey = require('./_isKey'),
2541 stringToPath = require('./_stringToPath'),
2542 toString = require('./toString');
2543
2544/**
2545 * Casts `value` to a path array if it's not one.
2546 *
2547 * @private
2548 * @param {*} value The value to inspect.
2549 * @param {Object} [object] The object to query keys on.
2550 * @returns {Array} Returns the cast property path array.
2551 */
2552function castPath(value, object) {
2553 if (isArray(value)) {
2554 return value;
2555 }
2556 return isKey(value, object) ? [value] : stringToPath(toString(value));
2557}
2558
2559module.exports = castPath;
2560
2561},{"./_isKey":124,"./_stringToPath":164,"./isArray":195,"./toString":230}],78:[function(require,module,exports){
2562var baseSlice = require('./_baseSlice');
2563
2564/**
2565 * Casts `array` to a slice if it's needed.
2566 *
2567 * @private
2568 * @param {Array} array The array to inspect.
2569 * @param {number} start The start position.
2570 * @param {number} [end=array.length] The end position.
2571 * @returns {Array} Returns the cast slice.
2572 */
2573function castSlice(array, start, end) {
2574 var length = array.length;
2575 end = end === undefined ? length : end;
2576 return (!start && end >= length) ? array : baseSlice(array, start, end);
2577}
2578
2579module.exports = castSlice;
2580
2581},{"./_baseSlice":69}],79:[function(require,module,exports){
2582var Uint8Array = require('./_Uint8Array');
2583
2584/**
2585 * Creates a clone of `arrayBuffer`.
2586 *
2587 * @private
2588 * @param {ArrayBuffer} arrayBuffer The array buffer to clone.
2589 * @returns {ArrayBuffer} Returns the cloned array buffer.
2590 */
2591function cloneArrayBuffer(arrayBuffer) {
2592 var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
2593 new Uint8Array(result).set(new Uint8Array(arrayBuffer));
2594 return result;
2595}
2596
2597module.exports = cloneArrayBuffer;
2598
2599},{"./_Uint8Array":14}],80:[function(require,module,exports){
2600var root = require('./_root');
2601
2602/** Detect free variable `exports`. */
2603var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
2604
2605/** Detect free variable `module`. */
2606var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
2607
2608/** Detect the popular CommonJS extension `module.exports`. */
2609var moduleExports = freeModule && freeModule.exports === freeExports;
2610
2611/** Built-in value references. */
2612var Buffer = moduleExports ? root.Buffer : undefined,
2613 allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;
2614
2615/**
2616 * Creates a clone of `buffer`.
2617 *
2618 * @private
2619 * @param {Buffer} buffer The buffer to clone.
2620 * @param {boolean} [isDeep] Specify a deep clone.
2621 * @returns {Buffer} Returns the cloned buffer.
2622 */
2623function cloneBuffer(buffer, isDeep) {
2624 if (isDeep) {
2625 return buffer.slice();
2626 }
2627 var length = buffer.length,
2628 result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
2629
2630 buffer.copy(result);
2631 return result;
2632}
2633
2634module.exports = cloneBuffer;
2635
2636},{"./_root":151}],81:[function(require,module,exports){
2637var cloneArrayBuffer = require('./_cloneArrayBuffer');
2638
2639/**
2640 * Creates a clone of `dataView`.
2641 *
2642 * @private
2643 * @param {Object} dataView The data view to clone.
2644 * @param {boolean} [isDeep] Specify a deep clone.
2645 * @returns {Object} Returns the cloned data view.
2646 */
2647function cloneDataView(dataView, isDeep) {
2648 var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
2649 return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
2650}
2651
2652module.exports = cloneDataView;
2653
2654},{"./_cloneArrayBuffer":79}],82:[function(require,module,exports){
2655/** Used to match `RegExp` flags from their coerced string values. */
2656var reFlags = /\w*$/;
2657
2658/**
2659 * Creates a clone of `regexp`.
2660 *
2661 * @private
2662 * @param {Object} regexp The regexp to clone.
2663 * @returns {Object} Returns the cloned regexp.
2664 */
2665function cloneRegExp(regexp) {
2666 var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
2667 result.lastIndex = regexp.lastIndex;
2668 return result;
2669}
2670
2671module.exports = cloneRegExp;
2672
2673},{}],83:[function(require,module,exports){
2674var Symbol = require('./_Symbol');
2675
2676/** Used to convert symbols to primitives and strings. */
2677var symbolProto = Symbol ? Symbol.prototype : undefined,
2678 symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
2679
2680/**
2681 * Creates a clone of the `symbol` object.
2682 *
2683 * @private
2684 * @param {Object} symbol The symbol object to clone.
2685 * @returns {Object} Returns the cloned symbol object.
2686 */
2687function cloneSymbol(symbol) {
2688 return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
2689}
2690
2691module.exports = cloneSymbol;
2692
2693},{"./_Symbol":13}],84:[function(require,module,exports){
2694var cloneArrayBuffer = require('./_cloneArrayBuffer');
2695
2696/**
2697 * Creates a clone of `typedArray`.
2698 *
2699 * @private
2700 * @param {Object} typedArray The typed array to clone.
2701 * @param {boolean} [isDeep] Specify a deep clone.
2702 * @returns {Object} Returns the cloned typed array.
2703 */
2704function cloneTypedArray(typedArray, isDeep) {
2705 var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
2706 return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
2707}
2708
2709module.exports = cloneTypedArray;
2710
2711},{"./_cloneArrayBuffer":79}],85:[function(require,module,exports){
2712/**
2713 * Copies the values of `source` to `array`.
2714 *
2715 * @private
2716 * @param {Array} source The array to copy values from.
2717 * @param {Array} [array=[]] The array to copy values to.
2718 * @returns {Array} Returns `array`.
2719 */
2720function copyArray(source, array) {
2721 var index = -1,
2722 length = source.length;
2723
2724 array || (array = Array(length));
2725 while (++index < length) {
2726 array[index] = source[index];
2727 }
2728 return array;
2729}
2730
2731module.exports = copyArray;
2732
2733},{}],86:[function(require,module,exports){
2734var assignValue = require('./_assignValue'),
2735 baseAssignValue = require('./_baseAssignValue');
2736
2737/**
2738 * Copies properties of `source` to `object`.
2739 *
2740 * @private
2741 * @param {Object} source The object to copy properties from.
2742 * @param {Array} props The property identifiers to copy.
2743 * @param {Object} [object={}] The object to copy properties to.
2744 * @param {Function} [customizer] The function to customize copied values.
2745 * @returns {Object} Returns `object`.
2746 */
2747function copyObject(source, props, object, customizer) {
2748 var isNew = !object;
2749 object || (object = {});
2750
2751 var index = -1,
2752 length = props.length;
2753
2754 while (++index < length) {
2755 var key = props[index];
2756
2757 var newValue = customizer
2758 ? customizer(object[key], source[key], key, object, source)
2759 : undefined;
2760
2761 if (newValue === undefined) {
2762 newValue = source[key];
2763 }
2764 if (isNew) {
2765 baseAssignValue(object, key, newValue);
2766 } else {
2767 assignValue(object, key, newValue);
2768 }
2769 }
2770 return object;
2771}
2772
2773module.exports = copyObject;
2774
2775},{"./_assignValue":27,"./_baseAssignValue":32}],87:[function(require,module,exports){
2776var copyObject = require('./_copyObject'),
2777 getSymbols = require('./_getSymbols');
2778
2779/**
2780 * Copies own symbols of `source` to `object`.
2781 *
2782 * @private
2783 * @param {Object} source The object to copy symbols from.
2784 * @param {Object} [object={}] The object to copy symbols to.
2785 * @returns {Object} Returns `object`.
2786 */
2787function copySymbols(source, object) {
2788 return copyObject(source, getSymbols(source), object);
2789}
2790
2791module.exports = copySymbols;
2792
2793},{"./_copyObject":86,"./_getSymbols":108}],88:[function(require,module,exports){
2794var copyObject = require('./_copyObject'),
2795 getSymbolsIn = require('./_getSymbolsIn');
2796
2797/**
2798 * Copies own and inherited symbols of `source` to `object`.
2799 *
2800 * @private
2801 * @param {Object} source The object to copy symbols from.
2802 * @param {Object} [object={}] The object to copy symbols to.
2803 * @returns {Object} Returns `object`.
2804 */
2805function copySymbolsIn(source, object) {
2806 return copyObject(source, getSymbolsIn(source), object);
2807}
2808
2809module.exports = copySymbolsIn;
2810
2811},{"./_copyObject":86,"./_getSymbolsIn":109}],89:[function(require,module,exports){
2812var root = require('./_root');
2813
2814/** Used to detect overreaching core-js shims. */
2815var coreJsData = root['__core-js_shared__'];
2816
2817module.exports = coreJsData;
2818
2819},{"./_root":151}],90:[function(require,module,exports){
2820var arrayAggregator = require('./_arrayAggregator'),
2821 baseAggregator = require('./_baseAggregator'),
2822 baseIteratee = require('./_baseIteratee'),
2823 isArray = require('./isArray');
2824
2825/**
2826 * Creates a function like `_.groupBy`.
2827 *
2828 * @private
2829 * @param {Function} setter The function to set accumulator values.
2830 * @param {Function} [initializer] The accumulator object initializer.
2831 * @returns {Function} Returns the new aggregator function.
2832 */
2833function createAggregator(setter, initializer) {
2834 return function(collection, iteratee) {
2835 var func = isArray(collection) ? arrayAggregator : baseAggregator,
2836 accumulator = initializer ? initializer() : {};
2837
2838 return func(collection, setter, baseIteratee(iteratee, 2), accumulator);
2839 };
2840}
2841
2842module.exports = createAggregator;
2843
2844},{"./_arrayAggregator":17,"./_baseAggregator":29,"./_baseIteratee":58,"./isArray":195}],91:[function(require,module,exports){
2845var baseRest = require('./_baseRest'),
2846 isIterateeCall = require('./_isIterateeCall');
2847
2848/**
2849 * Creates a function like `_.assign`.
2850 *
2851 * @private
2852 * @param {Function} assigner The function to assign values.
2853 * @returns {Function} Returns the new assigner function.
2854 */
2855function createAssigner(assigner) {
2856 return baseRest(function(object, sources) {
2857 var index = -1,
2858 length = sources.length,
2859 customizer = length > 1 ? sources[length - 1] : undefined,
2860 guard = length > 2 ? sources[2] : undefined;
2861
2862 customizer = (assigner.length > 3 && typeof customizer == 'function')
2863 ? (length--, customizer)
2864 : undefined;
2865
2866 if (guard && isIterateeCall(sources[0], sources[1], guard)) {
2867 customizer = length < 3 ? undefined : customizer;
2868 length = 1;
2869 }
2870 object = Object(object);
2871 while (++index < length) {
2872 var source = sources[index];
2873 if (source) {
2874 assigner(object, source, index, customizer);
2875 }
2876 }
2877 return object;
2878 });
2879}
2880
2881module.exports = createAssigner;
2882
2883},{"./_baseRest":67,"./_isIterateeCall":123}],92:[function(require,module,exports){
2884var isArrayLike = require('./isArrayLike');
2885
2886/**
2887 * Creates a `baseEach` or `baseEachRight` function.
2888 *
2889 * @private
2890 * @param {Function} eachFunc The function to iterate over a collection.
2891 * @param {boolean} [fromRight] Specify iterating from right to left.
2892 * @returns {Function} Returns the new base function.
2893 */
2894function createBaseEach(eachFunc, fromRight) {
2895 return function(collection, iteratee) {
2896 if (collection == null) {
2897 return collection;
2898 }
2899 if (!isArrayLike(collection)) {
2900 return eachFunc(collection, iteratee);
2901 }
2902 var length = collection.length,
2903 index = fromRight ? length : -1,
2904 iterable = Object(collection);
2905
2906 while ((fromRight ? index-- : ++index < length)) {
2907 if (iteratee(iterable[index], index, iterable) === false) {
2908 break;
2909 }
2910 }
2911 return collection;
2912 };
2913}
2914
2915module.exports = createBaseEach;
2916
2917},{"./isArrayLike":196}],93:[function(require,module,exports){
2918/**
2919 * Creates a base function for methods like `_.forIn` and `_.forOwn`.
2920 *
2921 * @private
2922 * @param {boolean} [fromRight] Specify iterating from right to left.
2923 * @returns {Function} Returns the new base function.
2924 */
2925function createBaseFor(fromRight) {
2926 return function(object, iteratee, keysFunc) {
2927 var index = -1,
2928 iterable = Object(object),
2929 props = keysFunc(object),
2930 length = props.length;
2931
2932 while (length--) {
2933 var key = props[fromRight ? length : ++index];
2934 if (iteratee(iterable[key], key, iterable) === false) {
2935 break;
2936 }
2937 }
2938 return object;
2939 };
2940}
2941
2942module.exports = createBaseFor;
2943
2944},{}],94:[function(require,module,exports){
2945var castSlice = require('./_castSlice'),
2946 hasUnicode = require('./_hasUnicode'),
2947 stringToArray = require('./_stringToArray'),
2948 toString = require('./toString');
2949
2950/**
2951 * Creates a function like `_.lowerFirst`.
2952 *
2953 * @private
2954 * @param {string} methodName The name of the `String` case method to use.
2955 * @returns {Function} Returns the new case function.
2956 */
2957function createCaseFirst(methodName) {
2958 return function(string) {
2959 string = toString(string);
2960
2961 var strSymbols = hasUnicode(string)
2962 ? stringToArray(string)
2963 : undefined;
2964
2965 var chr = strSymbols
2966 ? strSymbols[0]
2967 : string.charAt(0);
2968
2969 var trailing = strSymbols
2970 ? castSlice(strSymbols, 1).join('')
2971 : string.slice(1);
2972
2973 return chr[methodName]() + trailing;
2974 };
2975}
2976
2977module.exports = createCaseFirst;
2978
2979},{"./_castSlice":78,"./_hasUnicode":113,"./_stringToArray":163,"./toString":230}],95:[function(require,module,exports){
2980var baseIteratee = require('./_baseIteratee'),
2981 isArrayLike = require('./isArrayLike'),
2982 keys = require('./keys');
2983
2984/**
2985 * Creates a `_.find` or `_.findLast` function.
2986 *
2987 * @private
2988 * @param {Function} findIndexFunc The function to find the collection index.
2989 * @returns {Function} Returns the new find function.
2990 */
2991function createFind(findIndexFunc) {
2992 return function(collection, predicate, fromIndex) {
2993 var iterable = Object(collection);
2994 if (!isArrayLike(collection)) {
2995 var iteratee = baseIteratee(predicate, 3);
2996 collection = keys(collection);
2997 predicate = function(key) { return iteratee(iterable[key], key, iterable); };
2998 }
2999 var index = findIndexFunc(collection, predicate, fromIndex);
3000 return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;
3001 };
3002}
3003
3004module.exports = createFind;
3005
3006},{"./_baseIteratee":58,"./isArrayLike":196,"./keys":213}],96:[function(require,module,exports){
3007var getNative = require('./_getNative');
3008
3009var defineProperty = (function() {
3010 try {
3011 var func = getNative(Object, 'defineProperty');
3012 func({}, '', {});
3013 return func;
3014 } catch (e) {}
3015}());
3016
3017module.exports = defineProperty;
3018
3019},{"./_getNative":105}],97:[function(require,module,exports){
3020var SetCache = require('./_SetCache'),
3021 arraySome = require('./_arraySome'),
3022 cacheHas = require('./_cacheHas');
3023
3024/** Used to compose bitmasks for value comparisons. */
3025var COMPARE_PARTIAL_FLAG = 1,
3026 COMPARE_UNORDERED_FLAG = 2;
3027
3028/**
3029 * A specialized version of `baseIsEqualDeep` for arrays with support for
3030 * partial deep comparisons.
3031 *
3032 * @private
3033 * @param {Array} array The array to compare.
3034 * @param {Array} other The other array to compare.
3035 * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
3036 * @param {Function} customizer The function to customize comparisons.
3037 * @param {Function} equalFunc The function to determine equivalents of values.
3038 * @param {Object} stack Tracks traversed `array` and `other` objects.
3039 * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
3040 */
3041function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
3042 var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
3043 arrLength = array.length,
3044 othLength = other.length;
3045
3046 if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
3047 return false;
3048 }
3049 // Assume cyclic values are equal.
3050 var stacked = stack.get(array);
3051 if (stacked && stack.get(other)) {
3052 return stacked == other;
3053 }
3054 var index = -1,
3055 result = true,
3056 seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;
3057
3058 stack.set(array, other);
3059 stack.set(other, array);
3060
3061 // Ignore non-index properties.
3062 while (++index < arrLength) {
3063 var arrValue = array[index],
3064 othValue = other[index];
3065
3066 if (customizer) {
3067 var compared = isPartial
3068 ? customizer(othValue, arrValue, index, other, array, stack)
3069 : customizer(arrValue, othValue, index, array, other, stack);
3070 }
3071 if (compared !== undefined) {
3072 if (compared) {
3073 continue;
3074 }
3075 result = false;
3076 break;
3077 }
3078 // Recursively compare arrays (susceptible to call stack limits).
3079 if (seen) {
3080 if (!arraySome(other, function(othValue, othIndex) {
3081 if (!cacheHas(seen, othIndex) &&
3082 (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
3083 return seen.push(othIndex);
3084 }
3085 })) {
3086 result = false;
3087 break;
3088 }
3089 } else if (!(
3090 arrValue === othValue ||
3091 equalFunc(arrValue, othValue, bitmask, customizer, stack)
3092 )) {
3093 result = false;
3094 break;
3095 }
3096 }
3097 stack['delete'](array);
3098 stack['delete'](other);
3099 return result;
3100}
3101
3102module.exports = equalArrays;
3103
3104},{"./_SetCache":11,"./_arraySome":25,"./_cacheHas":75}],98:[function(require,module,exports){
3105var Symbol = require('./_Symbol'),
3106 Uint8Array = require('./_Uint8Array'),
3107 eq = require('./eq'),
3108 equalArrays = require('./_equalArrays'),
3109 mapToArray = require('./_mapToArray'),
3110 setToArray = require('./_setToArray');
3111
3112/** Used to compose bitmasks for value comparisons. */
3113var COMPARE_PARTIAL_FLAG = 1,
3114 COMPARE_UNORDERED_FLAG = 2;
3115
3116/** `Object#toString` result references. */
3117var boolTag = '[object Boolean]',
3118 dateTag = '[object Date]',
3119 errorTag = '[object Error]',
3120 mapTag = '[object Map]',
3121 numberTag = '[object Number]',
3122 regexpTag = '[object RegExp]',
3123 setTag = '[object Set]',
3124 stringTag = '[object String]',
3125 symbolTag = '[object Symbol]';
3126
3127var arrayBufferTag = '[object ArrayBuffer]',
3128 dataViewTag = '[object DataView]';
3129
3130/** Used to convert symbols to primitives and strings. */
3131var symbolProto = Symbol ? Symbol.prototype : undefined,
3132 symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
3133
3134/**
3135 * A specialized version of `baseIsEqualDeep` for comparing objects of
3136 * the same `toStringTag`.
3137 *
3138 * **Note:** This function only supports comparing values with tags of
3139 * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
3140 *
3141 * @private
3142 * @param {Object} object The object to compare.
3143 * @param {Object} other The other object to compare.
3144 * @param {string} tag The `toStringTag` of the objects to compare.
3145 * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
3146 * @param {Function} customizer The function to customize comparisons.
3147 * @param {Function} equalFunc The function to determine equivalents of values.
3148 * @param {Object} stack Tracks traversed `object` and `other` objects.
3149 * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
3150 */
3151function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
3152 switch (tag) {
3153 case dataViewTag:
3154 if ((object.byteLength != other.byteLength) ||
3155 (object.byteOffset != other.byteOffset)) {
3156 return false;
3157 }
3158 object = object.buffer;
3159 other = other.buffer;
3160
3161 case arrayBufferTag:
3162 if ((object.byteLength != other.byteLength) ||
3163 !equalFunc(new Uint8Array(object), new Uint8Array(other))) {
3164 return false;
3165 }
3166 return true;
3167
3168 case boolTag:
3169 case dateTag:
3170 case numberTag:
3171 // Coerce booleans to `1` or `0` and dates to milliseconds.
3172 // Invalid dates are coerced to `NaN`.
3173 return eq(+object, +other);
3174
3175 case errorTag:
3176 return object.name == other.name && object.message == other.message;
3177
3178 case regexpTag:
3179 case stringTag:
3180 // Coerce regexes to strings and treat strings, primitives and objects,
3181 // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
3182 // for more details.
3183 return object == (other + '');
3184
3185 case mapTag:
3186 var convert = mapToArray;
3187
3188 case setTag:
3189 var isPartial = bitmask & COMPARE_PARTIAL_FLAG;
3190 convert || (convert = setToArray);
3191
3192 if (object.size != other.size && !isPartial) {
3193 return false;
3194 }
3195 // Assume cyclic values are equal.
3196 var stacked = stack.get(object);
3197 if (stacked) {
3198 return stacked == other;
3199 }
3200 bitmask |= COMPARE_UNORDERED_FLAG;
3201
3202 // Recursively compare objects (susceptible to call stack limits).
3203 stack.set(object, other);
3204 var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
3205 stack['delete'](object);
3206 return result;
3207
3208 case symbolTag:
3209 if (symbolValueOf) {
3210 return symbolValueOf.call(object) == symbolValueOf.call(other);
3211 }
3212 }
3213 return false;
3214}
3215
3216module.exports = equalByTag;
3217
3218},{"./_Symbol":13,"./_Uint8Array":14,"./_equalArrays":97,"./_mapToArray":140,"./_setToArray":154,"./eq":179}],99:[function(require,module,exports){
3219var getAllKeys = require('./_getAllKeys');
3220
3221/** Used to compose bitmasks for value comparisons. */
3222var COMPARE_PARTIAL_FLAG = 1;
3223
3224/** Used for built-in method references. */
3225var objectProto = Object.prototype;
3226
3227/** Used to check objects for own properties. */
3228var hasOwnProperty = objectProto.hasOwnProperty;
3229
3230/**
3231 * A specialized version of `baseIsEqualDeep` for objects with support for
3232 * partial deep comparisons.
3233 *
3234 * @private
3235 * @param {Object} object The object to compare.
3236 * @param {Object} other The other object to compare.
3237 * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
3238 * @param {Function} customizer The function to customize comparisons.
3239 * @param {Function} equalFunc The function to determine equivalents of values.
3240 * @param {Object} stack Tracks traversed `object` and `other` objects.
3241 * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
3242 */
3243function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
3244 var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
3245 objProps = getAllKeys(object),
3246 objLength = objProps.length,
3247 othProps = getAllKeys(other),
3248 othLength = othProps.length;
3249
3250 if (objLength != othLength && !isPartial) {
3251 return false;
3252 }
3253 var index = objLength;
3254 while (index--) {
3255 var key = objProps[index];
3256 if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
3257 return false;
3258 }
3259 }
3260 // Assume cyclic values are equal.
3261 var stacked = stack.get(object);
3262 if (stacked && stack.get(other)) {
3263 return stacked == other;
3264 }
3265 var result = true;
3266 stack.set(object, other);
3267 stack.set(other, object);
3268
3269 var skipCtor = isPartial;
3270 while (++index < objLength) {
3271 key = objProps[index];
3272 var objValue = object[key],
3273 othValue = other[key];
3274
3275 if (customizer) {
3276 var compared = isPartial
3277 ? customizer(othValue, objValue, key, other, object, stack)
3278 : customizer(objValue, othValue, key, object, other, stack);
3279 }
3280 // Recursively compare objects (susceptible to call stack limits).
3281 if (!(compared === undefined
3282 ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))
3283 : compared
3284 )) {
3285 result = false;
3286 break;
3287 }
3288 skipCtor || (skipCtor = key == 'constructor');
3289 }
3290 if (result && !skipCtor) {
3291 var objCtor = object.constructor,
3292 othCtor = other.constructor;
3293
3294 // Non `Object` object instances with different constructors are not equal.
3295 if (objCtor != othCtor &&
3296 ('constructor' in object && 'constructor' in other) &&
3297 !(typeof objCtor == 'function' && objCtor instanceof objCtor &&
3298 typeof othCtor == 'function' && othCtor instanceof othCtor)) {
3299 result = false;
3300 }
3301 }
3302 stack['delete'](object);
3303 stack['delete'](other);
3304 return result;
3305}
3306
3307module.exports = equalObjects;
3308
3309},{"./_getAllKeys":101}],100:[function(require,module,exports){
3310(function (global){
3311/** Detect free variable `global` from Node.js. */
3312var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
3313
3314module.exports = freeGlobal;
3315
3316}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
3317},{}],101:[function(require,module,exports){
3318var baseGetAllKeys = require('./_baseGetAllKeys'),
3319 getSymbols = require('./_getSymbols'),
3320 keys = require('./keys');
3321
3322/**
3323 * Creates an array of own enumerable property names and symbols of `object`.
3324 *
3325 * @private
3326 * @param {Object} object The object to query.
3327 * @returns {Array} Returns the array of property names and symbols.
3328 */
3329function getAllKeys(object) {
3330 return baseGetAllKeys(object, keys, getSymbols);
3331}
3332
3333module.exports = getAllKeys;
3334
3335},{"./_baseGetAllKeys":43,"./_getSymbols":108,"./keys":213}],102:[function(require,module,exports){
3336var baseGetAllKeys = require('./_baseGetAllKeys'),
3337 getSymbolsIn = require('./_getSymbolsIn'),
3338 keysIn = require('./keysIn');
3339
3340/**
3341 * Creates an array of own and inherited enumerable property names and
3342 * symbols of `object`.
3343 *
3344 * @private
3345 * @param {Object} object The object to query.
3346 * @returns {Array} Returns the array of property names and symbols.
3347 */
3348function getAllKeysIn(object) {
3349 return baseGetAllKeys(object, keysIn, getSymbolsIn);
3350}
3351
3352module.exports = getAllKeysIn;
3353
3354},{"./_baseGetAllKeys":43,"./_getSymbolsIn":109,"./keysIn":214}],103:[function(require,module,exports){
3355var isKeyable = require('./_isKeyable');
3356
3357/**
3358 * Gets the data for `map`.
3359 *
3360 * @private
3361 * @param {Object} map The map to query.
3362 * @param {string} key The reference key.
3363 * @returns {*} Returns the map data.
3364 */
3365function getMapData(map, key) {
3366 var data = map.__data__;
3367 return isKeyable(key)
3368 ? data[typeof key == 'string' ? 'string' : 'hash']
3369 : data.map;
3370}
3371
3372module.exports = getMapData;
3373
3374},{"./_isKeyable":125}],104:[function(require,module,exports){
3375var isStrictComparable = require('./_isStrictComparable'),
3376 keys = require('./keys');
3377
3378/**
3379 * Gets the property names, values, and compare flags of `object`.
3380 *
3381 * @private
3382 * @param {Object} object The object to query.
3383 * @returns {Array} Returns the match data of `object`.
3384 */
3385function getMatchData(object) {
3386 var result = keys(object),
3387 length = result.length;
3388
3389 while (length--) {
3390 var key = result[length],
3391 value = object[key];
3392
3393 result[length] = [key, value, isStrictComparable(value)];
3394 }
3395 return result;
3396}
3397
3398module.exports = getMatchData;
3399
3400},{"./_isStrictComparable":128,"./keys":213}],105:[function(require,module,exports){
3401var baseIsNative = require('./_baseIsNative'),
3402 getValue = require('./_getValue');
3403
3404/**
3405 * Gets the native function at `key` of `object`.
3406 *
3407 * @private
3408 * @param {Object} object The object to query.
3409 * @param {string} key The key of the method to get.
3410 * @returns {*} Returns the function if it's native, else `undefined`.
3411 */
3412function getNative(object, key) {
3413 var value = getValue(object, key);
3414 return baseIsNative(value) ? value : undefined;
3415}
3416
3417module.exports = getNative;
3418
3419},{"./_baseIsNative":54,"./_getValue":111}],106:[function(require,module,exports){
3420var overArg = require('./_overArg');
3421
3422/** Built-in value references. */
3423var getPrototype = overArg(Object.getPrototypeOf, Object);
3424
3425module.exports = getPrototype;
3426
3427},{"./_overArg":148}],107:[function(require,module,exports){
3428var Symbol = require('./_Symbol');
3429
3430/** Used for built-in method references. */
3431var objectProto = Object.prototype;
3432
3433/** Used to check objects for own properties. */
3434var hasOwnProperty = objectProto.hasOwnProperty;
3435
3436/**
3437 * Used to resolve the
3438 * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
3439 * of values.
3440 */
3441var nativeObjectToString = objectProto.toString;
3442
3443/** Built-in value references. */
3444var symToStringTag = Symbol ? Symbol.toStringTag : undefined;
3445
3446/**
3447 * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
3448 *
3449 * @private
3450 * @param {*} value The value to query.
3451 * @returns {string} Returns the raw `toStringTag`.
3452 */
3453function getRawTag(value) {
3454 var isOwn = hasOwnProperty.call(value, symToStringTag),
3455 tag = value[symToStringTag];
3456
3457 try {
3458 value[symToStringTag] = undefined;
3459 var unmasked = true;
3460 } catch (e) {}
3461
3462 var result = nativeObjectToString.call(value);
3463 if (unmasked) {
3464 if (isOwn) {
3465 value[symToStringTag] = tag;
3466 } else {
3467 delete value[symToStringTag];
3468 }
3469 }
3470 return result;
3471}
3472
3473module.exports = getRawTag;
3474
3475},{"./_Symbol":13}],108:[function(require,module,exports){
3476var arrayFilter = require('./_arrayFilter'),
3477 stubArray = require('./stubArray');
3478
3479/** Used for built-in method references. */
3480var objectProto = Object.prototype;
3481
3482/** Built-in value references. */
3483var propertyIsEnumerable = objectProto.propertyIsEnumerable;
3484
3485/* Built-in method references for those with the same name as other `lodash` methods. */
3486var nativeGetSymbols = Object.getOwnPropertySymbols;
3487
3488/**
3489 * Creates an array of the own enumerable symbols of `object`.
3490 *
3491 * @private
3492 * @param {Object} object The object to query.
3493 * @returns {Array} Returns the array of symbols.
3494 */
3495var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
3496 if (object == null) {
3497 return [];
3498 }
3499 object = Object(object);
3500 return arrayFilter(nativeGetSymbols(object), function(symbol) {
3501 return propertyIsEnumerable.call(object, symbol);
3502 });
3503};
3504
3505module.exports = getSymbols;
3506
3507},{"./_arrayFilter":20,"./stubArray":223}],109:[function(require,module,exports){
3508var arrayPush = require('./_arrayPush'),
3509 getPrototype = require('./_getPrototype'),
3510 getSymbols = require('./_getSymbols'),
3511 stubArray = require('./stubArray');
3512
3513/* Built-in method references for those with the same name as other `lodash` methods. */
3514var nativeGetSymbols = Object.getOwnPropertySymbols;
3515
3516/**
3517 * Creates an array of the own and inherited enumerable symbols of `object`.
3518 *
3519 * @private
3520 * @param {Object} object The object to query.
3521 * @returns {Array} Returns the array of symbols.
3522 */
3523var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {
3524 var result = [];
3525 while (object) {
3526 arrayPush(result, getSymbols(object));
3527 object = getPrototype(object);
3528 }
3529 return result;
3530};
3531
3532module.exports = getSymbolsIn;
3533
3534},{"./_arrayPush":23,"./_getPrototype":106,"./_getSymbols":108,"./stubArray":223}],110:[function(require,module,exports){
3535var DataView = require('./_DataView'),
3536 Map = require('./_Map'),
3537 Promise = require('./_Promise'),
3538 Set = require('./_Set'),
3539 WeakMap = require('./_WeakMap'),
3540 baseGetTag = require('./_baseGetTag'),
3541 toSource = require('./_toSource');
3542
3543/** `Object#toString` result references. */
3544var mapTag = '[object Map]',
3545 objectTag = '[object Object]',
3546 promiseTag = '[object Promise]',
3547 setTag = '[object Set]',
3548 weakMapTag = '[object WeakMap]';
3549
3550var dataViewTag = '[object DataView]';
3551
3552/** Used to detect maps, sets, and weakmaps. */
3553var dataViewCtorString = toSource(DataView),
3554 mapCtorString = toSource(Map),
3555 promiseCtorString = toSource(Promise),
3556 setCtorString = toSource(Set),
3557 weakMapCtorString = toSource(WeakMap);
3558
3559/**
3560 * Gets the `toStringTag` of `value`.
3561 *
3562 * @private
3563 * @param {*} value The value to query.
3564 * @returns {string} Returns the `toStringTag`.
3565 */
3566var getTag = baseGetTag;
3567
3568// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
3569if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
3570 (Map && getTag(new Map) != mapTag) ||
3571 (Promise && getTag(Promise.resolve()) != promiseTag) ||
3572 (Set && getTag(new Set) != setTag) ||
3573 (WeakMap && getTag(new WeakMap) != weakMapTag)) {
3574 getTag = function(value) {
3575 var result = baseGetTag(value),
3576 Ctor = result == objectTag ? value.constructor : undefined,
3577 ctorString = Ctor ? toSource(Ctor) : '';
3578
3579 if (ctorString) {
3580 switch (ctorString) {
3581 case dataViewCtorString: return dataViewTag;
3582 case mapCtorString: return mapTag;
3583 case promiseCtorString: return promiseTag;
3584 case setCtorString: return setTag;
3585 case weakMapCtorString: return weakMapTag;
3586 }
3587 }
3588 return result;
3589 };
3590}
3591
3592module.exports = getTag;
3593
3594},{"./_DataView":4,"./_Map":7,"./_Promise":9,"./_Set":10,"./_WeakMap":15,"./_baseGetTag":44,"./_toSource":166}],111:[function(require,module,exports){
3595/**
3596 * Gets the value at `key` of `object`.
3597 *
3598 * @private
3599 * @param {Object} [object] The object to query.
3600 * @param {string} key The key of the property to get.
3601 * @returns {*} Returns the property value.
3602 */
3603function getValue(object, key) {
3604 return object == null ? undefined : object[key];
3605}
3606
3607module.exports = getValue;
3608
3609},{}],112:[function(require,module,exports){
3610var castPath = require('./_castPath'),
3611 isArguments = require('./isArguments'),
3612 isArray = require('./isArray'),
3613 isIndex = require('./_isIndex'),
3614 isLength = require('./isLength'),
3615 toKey = require('./_toKey');
3616
3617/**
3618 * Checks if `path` exists on `object`.
3619 *
3620 * @private
3621 * @param {Object} object The object to query.
3622 * @param {Array|string} path The path to check.
3623 * @param {Function} hasFunc The function to check properties.
3624 * @returns {boolean} Returns `true` if `path` exists, else `false`.
3625 */
3626function hasPath(object, path, hasFunc) {
3627 path = castPath(path, object);
3628
3629 var index = -1,
3630 length = path.length,
3631 result = false;
3632
3633 while (++index < length) {
3634 var key = toKey(path[index]);
3635 if (!(result = object != null && hasFunc(object, key))) {
3636 break;
3637 }
3638 object = object[key];
3639 }
3640 if (result || ++index != length) {
3641 return result;
3642 }
3643 length = object == null ? 0 : object.length;
3644 return !!length && isLength(length) && isIndex(key, length) &&
3645 (isArray(object) || isArguments(object));
3646}
3647
3648module.exports = hasPath;
3649
3650},{"./_castPath":77,"./_isIndex":122,"./_toKey":165,"./isArguments":194,"./isArray":195,"./isLength":203}],113:[function(require,module,exports){
3651/** Used to compose unicode character classes. */
3652var rsAstralRange = '\\ud800-\\udfff',
3653 rsComboMarksRange = '\\u0300-\\u036f',
3654 reComboHalfMarksRange = '\\ufe20-\\ufe2f',
3655 rsComboSymbolsRange = '\\u20d0-\\u20ff',
3656 rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,
3657 rsVarRange = '\\ufe0e\\ufe0f';
3658
3659/** Used to compose unicode capture groups. */
3660var rsZWJ = '\\u200d';
3661
3662/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */
3663var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']');
3664
3665/**
3666 * Checks if `string` contains Unicode symbols.
3667 *
3668 * @private
3669 * @param {string} string The string to inspect.
3670 * @returns {boolean} Returns `true` if a symbol is found, else `false`.
3671 */
3672function hasUnicode(string) {
3673 return reHasUnicode.test(string);
3674}
3675
3676module.exports = hasUnicode;
3677
3678},{}],114:[function(require,module,exports){
3679var nativeCreate = require('./_nativeCreate');
3680
3681/**
3682 * Removes all key-value entries from the hash.
3683 *
3684 * @private
3685 * @name clear
3686 * @memberOf Hash
3687 */
3688function hashClear() {
3689 this.__data__ = nativeCreate ? nativeCreate(null) : {};
3690 this.size = 0;
3691}
3692
3693module.exports = hashClear;
3694
3695},{"./_nativeCreate":143}],115:[function(require,module,exports){
3696/**
3697 * Removes `key` and its value from the hash.
3698 *
3699 * @private
3700 * @name delete
3701 * @memberOf Hash
3702 * @param {Object} hash The hash to modify.
3703 * @param {string} key The key of the value to remove.
3704 * @returns {boolean} Returns `true` if the entry was removed, else `false`.
3705 */
3706function hashDelete(key) {
3707 var result = this.has(key) && delete this.__data__[key];
3708 this.size -= result ? 1 : 0;
3709 return result;
3710}
3711
3712module.exports = hashDelete;
3713
3714},{}],116:[function(require,module,exports){
3715var nativeCreate = require('./_nativeCreate');
3716
3717/** Used to stand-in for `undefined` hash values. */
3718var HASH_UNDEFINED = '__lodash_hash_undefined__';
3719
3720/** Used for built-in method references. */
3721var objectProto = Object.prototype;
3722
3723/** Used to check objects for own properties. */
3724var hasOwnProperty = objectProto.hasOwnProperty;
3725
3726/**
3727 * Gets the hash value for `key`.
3728 *
3729 * @private
3730 * @name get
3731 * @memberOf Hash
3732 * @param {string} key The key of the value to get.
3733 * @returns {*} Returns the entry value.
3734 */
3735function hashGet(key) {
3736 var data = this.__data__;
3737 if (nativeCreate) {
3738 var result = data[key];
3739 return result === HASH_UNDEFINED ? undefined : result;
3740 }
3741 return hasOwnProperty.call(data, key) ? data[key] : undefined;
3742}
3743
3744module.exports = hashGet;
3745
3746},{"./_nativeCreate":143}],117:[function(require,module,exports){
3747var nativeCreate = require('./_nativeCreate');
3748
3749/** Used for built-in method references. */
3750var objectProto = Object.prototype;
3751
3752/** Used to check objects for own properties. */
3753var hasOwnProperty = objectProto.hasOwnProperty;
3754
3755/**
3756 * Checks if a hash value for `key` exists.
3757 *
3758 * @private
3759 * @name has
3760 * @memberOf Hash
3761 * @param {string} key The key of the entry to check.
3762 * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
3763 */
3764function hashHas(key) {
3765 var data = this.__data__;
3766 return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);
3767}
3768
3769module.exports = hashHas;
3770
3771},{"./_nativeCreate":143}],118:[function(require,module,exports){
3772var nativeCreate = require('./_nativeCreate');
3773
3774/** Used to stand-in for `undefined` hash values. */
3775var HASH_UNDEFINED = '__lodash_hash_undefined__';
3776
3777/**
3778 * Sets the hash `key` to `value`.
3779 *
3780 * @private
3781 * @name set
3782 * @memberOf Hash
3783 * @param {string} key The key of the value to set.
3784 * @param {*} value The value to set.
3785 * @returns {Object} Returns the hash instance.
3786 */
3787function hashSet(key, value) {
3788 var data = this.__data__;
3789 this.size += this.has(key) ? 0 : 1;
3790 data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
3791 return this;
3792}
3793
3794module.exports = hashSet;
3795
3796},{"./_nativeCreate":143}],119:[function(require,module,exports){
3797/** Used for built-in method references. */
3798var objectProto = Object.prototype;
3799
3800/** Used to check objects for own properties. */
3801var hasOwnProperty = objectProto.hasOwnProperty;
3802
3803/**
3804 * Initializes an array clone.
3805 *
3806 * @private
3807 * @param {Array} array The array to clone.
3808 * @returns {Array} Returns the initialized clone.
3809 */
3810function initCloneArray(array) {
3811 var length = array.length,
3812 result = new array.constructor(length);
3813
3814 // Add properties assigned by `RegExp#exec`.
3815 if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
3816 result.index = array.index;
3817 result.input = array.input;
3818 }
3819 return result;
3820}
3821
3822module.exports = initCloneArray;
3823
3824},{}],120:[function(require,module,exports){
3825var cloneArrayBuffer = require('./_cloneArrayBuffer'),
3826 cloneDataView = require('./_cloneDataView'),
3827 cloneRegExp = require('./_cloneRegExp'),
3828 cloneSymbol = require('./_cloneSymbol'),
3829 cloneTypedArray = require('./_cloneTypedArray');
3830
3831/** `Object#toString` result references. */
3832var boolTag = '[object Boolean]',
3833 dateTag = '[object Date]',
3834 mapTag = '[object Map]',
3835 numberTag = '[object Number]',
3836 regexpTag = '[object RegExp]',
3837 setTag = '[object Set]',
3838 stringTag = '[object String]',
3839 symbolTag = '[object Symbol]';
3840
3841var arrayBufferTag = '[object ArrayBuffer]',
3842 dataViewTag = '[object DataView]',
3843 float32Tag = '[object Float32Array]',
3844 float64Tag = '[object Float64Array]',
3845 int8Tag = '[object Int8Array]',
3846 int16Tag = '[object Int16Array]',
3847 int32Tag = '[object Int32Array]',
3848 uint8Tag = '[object Uint8Array]',
3849 uint8ClampedTag = '[object Uint8ClampedArray]',
3850 uint16Tag = '[object Uint16Array]',
3851 uint32Tag = '[object Uint32Array]';
3852
3853/**
3854 * Initializes an object clone based on its `toStringTag`.
3855 *
3856 * **Note:** This function only supports cloning values with tags of
3857 * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.
3858 *
3859 * @private
3860 * @param {Object} object The object to clone.
3861 * @param {string} tag The `toStringTag` of the object to clone.
3862 * @param {boolean} [isDeep] Specify a deep clone.
3863 * @returns {Object} Returns the initialized clone.
3864 */
3865function initCloneByTag(object, tag, isDeep) {
3866 var Ctor = object.constructor;
3867 switch (tag) {
3868 case arrayBufferTag:
3869 return cloneArrayBuffer(object);
3870
3871 case boolTag:
3872 case dateTag:
3873 return new Ctor(+object);
3874
3875 case dataViewTag:
3876 return cloneDataView(object, isDeep);
3877
3878 case float32Tag: case float64Tag:
3879 case int8Tag: case int16Tag: case int32Tag:
3880 case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:
3881 return cloneTypedArray(object, isDeep);
3882
3883 case mapTag:
3884 return new Ctor;
3885
3886 case numberTag:
3887 case stringTag:
3888 return new Ctor(object);
3889
3890 case regexpTag:
3891 return cloneRegExp(object);
3892
3893 case setTag:
3894 return new Ctor;
3895
3896 case symbolTag:
3897 return cloneSymbol(object);
3898 }
3899}
3900
3901module.exports = initCloneByTag;
3902
3903},{"./_cloneArrayBuffer":79,"./_cloneDataView":81,"./_cloneRegExp":82,"./_cloneSymbol":83,"./_cloneTypedArray":84}],121:[function(require,module,exports){
3904var baseCreate = require('./_baseCreate'),
3905 getPrototype = require('./_getPrototype'),
3906 isPrototype = require('./_isPrototype');
3907
3908/**
3909 * Initializes an object clone.
3910 *
3911 * @private
3912 * @param {Object} object The object to clone.
3913 * @returns {Object} Returns the initialized clone.
3914 */
3915function initCloneObject(object) {
3916 return (typeof object.constructor == 'function' && !isPrototype(object))
3917 ? baseCreate(getPrototype(object))
3918 : {};
3919}
3920
3921module.exports = initCloneObject;
3922
3923},{"./_baseCreate":34,"./_getPrototype":106,"./_isPrototype":127}],122:[function(require,module,exports){
3924/** Used as references for various `Number` constants. */
3925var MAX_SAFE_INTEGER = 9007199254740991;
3926
3927/** Used to detect unsigned integer values. */
3928var reIsUint = /^(?:0|[1-9]\d*)$/;
3929
3930/**
3931 * Checks if `value` is a valid array-like index.
3932 *
3933 * @private
3934 * @param {*} value The value to check.
3935 * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
3936 * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
3937 */
3938function isIndex(value, length) {
3939 var type = typeof value;
3940 length = length == null ? MAX_SAFE_INTEGER : length;
3941
3942 return !!length &&
3943 (type == 'number' ||
3944 (type != 'symbol' && reIsUint.test(value))) &&
3945 (value > -1 && value % 1 == 0 && value < length);
3946}
3947
3948module.exports = isIndex;
3949
3950},{}],123:[function(require,module,exports){
3951var eq = require('./eq'),
3952 isArrayLike = require('./isArrayLike'),
3953 isIndex = require('./_isIndex'),
3954 isObject = require('./isObject');
3955
3956/**
3957 * Checks if the given arguments are from an iteratee call.
3958 *
3959 * @private
3960 * @param {*} value The potential iteratee value argument.
3961 * @param {*} index The potential iteratee index or key argument.
3962 * @param {*} object The potential iteratee object argument.
3963 * @returns {boolean} Returns `true` if the arguments are from an iteratee call,
3964 * else `false`.
3965 */
3966function isIterateeCall(value, index, object) {
3967 if (!isObject(object)) {
3968 return false;
3969 }
3970 var type = typeof index;
3971 if (type == 'number'
3972 ? (isArrayLike(object) && isIndex(index, object.length))
3973 : (type == 'string' && index in object)
3974 ) {
3975 return eq(object[index], value);
3976 }
3977 return false;
3978}
3979
3980module.exports = isIterateeCall;
3981
3982},{"./_isIndex":122,"./eq":179,"./isArrayLike":196,"./isObject":206}],124:[function(require,module,exports){
3983var isArray = require('./isArray'),
3984 isSymbol = require('./isSymbol');
3985
3986/** Used to match property names within property paths. */
3987var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
3988 reIsPlainProp = /^\w*$/;
3989
3990/**
3991 * Checks if `value` is a property name and not a property path.
3992 *
3993 * @private
3994 * @param {*} value The value to check.
3995 * @param {Object} [object] The object to query keys on.
3996 * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
3997 */
3998function isKey(value, object) {
3999 if (isArray(value)) {
4000 return false;
4001 }
4002 var type = typeof value;
4003 if (type == 'number' || type == 'symbol' || type == 'boolean' ||
4004 value == null || isSymbol(value)) {
4005 return true;
4006 }
4007 return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
4008 (object != null && value in Object(object));
4009}
4010
4011module.exports = isKey;
4012
4013},{"./isArray":195,"./isSymbol":211}],125:[function(require,module,exports){
4014/**
4015 * Checks if `value` is suitable for use as unique object key.
4016 *
4017 * @private
4018 * @param {*} value The value to check.
4019 * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
4020 */
4021function isKeyable(value) {
4022 var type = typeof value;
4023 return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
4024 ? (value !== '__proto__')
4025 : (value === null);
4026}
4027
4028module.exports = isKeyable;
4029
4030},{}],126:[function(require,module,exports){
4031var coreJsData = require('./_coreJsData');
4032
4033/** Used to detect methods masquerading as native. */
4034var maskSrcKey = (function() {
4035 var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
4036 return uid ? ('Symbol(src)_1.' + uid) : '';
4037}());
4038
4039/**
4040 * Checks if `func` has its source masked.
4041 *
4042 * @private
4043 * @param {Function} func The function to check.
4044 * @returns {boolean} Returns `true` if `func` is masked, else `false`.
4045 */
4046function isMasked(func) {
4047 return !!maskSrcKey && (maskSrcKey in func);
4048}
4049
4050module.exports = isMasked;
4051
4052},{"./_coreJsData":89}],127:[function(require,module,exports){
4053/** Used for built-in method references. */
4054var objectProto = Object.prototype;
4055
4056/**
4057 * Checks if `value` is likely a prototype object.
4058 *
4059 * @private
4060 * @param {*} value The value to check.
4061 * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
4062 */
4063function isPrototype(value) {
4064 var Ctor = value && value.constructor,
4065 proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
4066
4067 return value === proto;
4068}
4069
4070module.exports = isPrototype;
4071
4072},{}],128:[function(require,module,exports){
4073var isObject = require('./isObject');
4074
4075/**
4076 * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
4077 *
4078 * @private
4079 * @param {*} value The value to check.
4080 * @returns {boolean} Returns `true` if `value` if suitable for strict
4081 * equality comparisons, else `false`.
4082 */
4083function isStrictComparable(value) {
4084 return value === value && !isObject(value);
4085}
4086
4087module.exports = isStrictComparable;
4088
4089},{"./isObject":206}],129:[function(require,module,exports){
4090/**
4091 * Converts `iterator` to an array.
4092 *
4093 * @private
4094 * @param {Object} iterator The iterator to convert.
4095 * @returns {Array} Returns the converted array.
4096 */
4097function iteratorToArray(iterator) {
4098 var data,
4099 result = [];
4100
4101 while (!(data = iterator.next()).done) {
4102 result.push(data.value);
4103 }
4104 return result;
4105}
4106
4107module.exports = iteratorToArray;
4108
4109},{}],130:[function(require,module,exports){
4110/**
4111 * Removes all key-value entries from the list cache.
4112 *
4113 * @private
4114 * @name clear
4115 * @memberOf ListCache
4116 */
4117function listCacheClear() {
4118 this.__data__ = [];
4119 this.size = 0;
4120}
4121
4122module.exports = listCacheClear;
4123
4124},{}],131:[function(require,module,exports){
4125var assocIndexOf = require('./_assocIndexOf');
4126
4127/** Used for built-in method references. */
4128var arrayProto = Array.prototype;
4129
4130/** Built-in value references. */
4131var splice = arrayProto.splice;
4132
4133/**
4134 * Removes `key` and its value from the list cache.
4135 *
4136 * @private
4137 * @name delete
4138 * @memberOf ListCache
4139 * @param {string} key The key of the value to remove.
4140 * @returns {boolean} Returns `true` if the entry was removed, else `false`.
4141 */
4142function listCacheDelete(key) {
4143 var data = this.__data__,
4144 index = assocIndexOf(data, key);
4145
4146 if (index < 0) {
4147 return false;
4148 }
4149 var lastIndex = data.length - 1;
4150 if (index == lastIndex) {
4151 data.pop();
4152 } else {
4153 splice.call(data, index, 1);
4154 }
4155 --this.size;
4156 return true;
4157}
4158
4159module.exports = listCacheDelete;
4160
4161},{"./_assocIndexOf":28}],132:[function(require,module,exports){
4162var assocIndexOf = require('./_assocIndexOf');
4163
4164/**
4165 * Gets the list cache value for `key`.
4166 *
4167 * @private
4168 * @name get
4169 * @memberOf ListCache
4170 * @param {string} key The key of the value to get.
4171 * @returns {*} Returns the entry value.
4172 */
4173function listCacheGet(key) {
4174 var data = this.__data__,
4175 index = assocIndexOf(data, key);
4176
4177 return index < 0 ? undefined : data[index][1];
4178}
4179
4180module.exports = listCacheGet;
4181
4182},{"./_assocIndexOf":28}],133:[function(require,module,exports){
4183var assocIndexOf = require('./_assocIndexOf');
4184
4185/**
4186 * Checks if a list cache value for `key` exists.
4187 *
4188 * @private
4189 * @name has
4190 * @memberOf ListCache
4191 * @param {string} key The key of the entry to check.
4192 * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
4193 */
4194function listCacheHas(key) {
4195 return assocIndexOf(this.__data__, key) > -1;
4196}
4197
4198module.exports = listCacheHas;
4199
4200},{"./_assocIndexOf":28}],134:[function(require,module,exports){
4201var assocIndexOf = require('./_assocIndexOf');
4202
4203/**
4204 * Sets the list cache `key` to `value`.
4205 *
4206 * @private
4207 * @name set
4208 * @memberOf ListCache
4209 * @param {string} key The key of the value to set.
4210 * @param {*} value The value to set.
4211 * @returns {Object} Returns the list cache instance.
4212 */
4213function listCacheSet(key, value) {
4214 var data = this.__data__,
4215 index = assocIndexOf(data, key);
4216
4217 if (index < 0) {
4218 ++this.size;
4219 data.push([key, value]);
4220 } else {
4221 data[index][1] = value;
4222 }
4223 return this;
4224}
4225
4226module.exports = listCacheSet;
4227
4228},{"./_assocIndexOf":28}],135:[function(require,module,exports){
4229var Hash = require('./_Hash'),
4230 ListCache = require('./_ListCache'),
4231 Map = require('./_Map');
4232
4233/**
4234 * Removes all key-value entries from the map.
4235 *
4236 * @private
4237 * @name clear
4238 * @memberOf MapCache
4239 */
4240function mapCacheClear() {
4241 this.size = 0;
4242 this.__data__ = {
4243 'hash': new Hash,
4244 'map': new (Map || ListCache),
4245 'string': new Hash
4246 };
4247}
4248
4249module.exports = mapCacheClear;
4250
4251},{"./_Hash":5,"./_ListCache":6,"./_Map":7}],136:[function(require,module,exports){
4252var getMapData = require('./_getMapData');
4253
4254/**
4255 * Removes `key` and its value from the map.
4256 *
4257 * @private
4258 * @name delete
4259 * @memberOf MapCache
4260 * @param {string} key The key of the value to remove.
4261 * @returns {boolean} Returns `true` if the entry was removed, else `false`.
4262 */
4263function mapCacheDelete(key) {
4264 var result = getMapData(this, key)['delete'](key);
4265 this.size -= result ? 1 : 0;
4266 return result;
4267}
4268
4269module.exports = mapCacheDelete;
4270
4271},{"./_getMapData":103}],137:[function(require,module,exports){
4272var getMapData = require('./_getMapData');
4273
4274/**
4275 * Gets the map value for `key`.
4276 *
4277 * @private
4278 * @name get
4279 * @memberOf MapCache
4280 * @param {string} key The key of the value to get.
4281 * @returns {*} Returns the entry value.
4282 */
4283function mapCacheGet(key) {
4284 return getMapData(this, key).get(key);
4285}
4286
4287module.exports = mapCacheGet;
4288
4289},{"./_getMapData":103}],138:[function(require,module,exports){
4290var getMapData = require('./_getMapData');
4291
4292/**
4293 * Checks if a map value for `key` exists.
4294 *
4295 * @private
4296 * @name has
4297 * @memberOf MapCache
4298 * @param {string} key The key of the entry to check.
4299 * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
4300 */
4301function mapCacheHas(key) {
4302 return getMapData(this, key).has(key);
4303}
4304
4305module.exports = mapCacheHas;
4306
4307},{"./_getMapData":103}],139:[function(require,module,exports){
4308var getMapData = require('./_getMapData');
4309
4310/**
4311 * Sets the map `key` to `value`.
4312 *
4313 * @private
4314 * @name set
4315 * @memberOf MapCache
4316 * @param {string} key The key of the value to set.
4317 * @param {*} value The value to set.
4318 * @returns {Object} Returns the map cache instance.
4319 */
4320function mapCacheSet(key, value) {
4321 var data = getMapData(this, key),
4322 size = data.size;
4323
4324 data.set(key, value);
4325 this.size += data.size == size ? 0 : 1;
4326 return this;
4327}
4328
4329module.exports = mapCacheSet;
4330
4331},{"./_getMapData":103}],140:[function(require,module,exports){
4332/**
4333 * Converts `map` to its key-value pairs.
4334 *
4335 * @private
4336 * @param {Object} map The map to convert.
4337 * @returns {Array} Returns the key-value pairs.
4338 */
4339function mapToArray(map) {
4340 var index = -1,
4341 result = Array(map.size);
4342
4343 map.forEach(function(value, key) {
4344 result[++index] = [key, value];
4345 });
4346 return result;
4347}
4348
4349module.exports = mapToArray;
4350
4351},{}],141:[function(require,module,exports){
4352/**
4353 * A specialized version of `matchesProperty` for source values suitable
4354 * for strict equality comparisons, i.e. `===`.
4355 *
4356 * @private
4357 * @param {string} key The key of the property to get.
4358 * @param {*} srcValue The value to match.
4359 * @returns {Function} Returns the new spec function.
4360 */
4361function matchesStrictComparable(key, srcValue) {
4362 return function(object) {
4363 if (object == null) {
4364 return false;
4365 }
4366 return object[key] === srcValue &&
4367 (srcValue !== undefined || (key in Object(object)));
4368 };
4369}
4370
4371module.exports = matchesStrictComparable;
4372
4373},{}],142:[function(require,module,exports){
4374var memoize = require('./memoize');
4375
4376/** Used as the maximum memoize cache size. */
4377var MAX_MEMOIZE_SIZE = 500;
4378
4379/**
4380 * A specialized version of `_.memoize` which clears the memoized function's
4381 * cache when it exceeds `MAX_MEMOIZE_SIZE`.
4382 *
4383 * @private
4384 * @param {Function} func The function to have its output memoized.
4385 * @returns {Function} Returns the new memoized function.
4386 */
4387function memoizeCapped(func) {
4388 var result = memoize(func, function(key) {
4389 if (cache.size === MAX_MEMOIZE_SIZE) {
4390 cache.clear();
4391 }
4392 return key;
4393 });
4394
4395 var cache = result.cache;
4396 return result;
4397}
4398
4399module.exports = memoizeCapped;
4400
4401},{"./memoize":217}],143:[function(require,module,exports){
4402var getNative = require('./_getNative');
4403
4404/* Built-in method references that are verified to be native. */
4405var nativeCreate = getNative(Object, 'create');
4406
4407module.exports = nativeCreate;
4408
4409},{"./_getNative":105}],144:[function(require,module,exports){
4410var overArg = require('./_overArg');
4411
4412/* Built-in method references for those with the same name as other `lodash` methods. */
4413var nativeKeys = overArg(Object.keys, Object);
4414
4415module.exports = nativeKeys;
4416
4417},{"./_overArg":148}],145:[function(require,module,exports){
4418/**
4419 * This function is like
4420 * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
4421 * except that it includes inherited enumerable properties.
4422 *
4423 * @private
4424 * @param {Object} object The object to query.
4425 * @returns {Array} Returns the array of property names.
4426 */
4427function nativeKeysIn(object) {
4428 var result = [];
4429 if (object != null) {
4430 for (var key in Object(object)) {
4431 result.push(key);
4432 }
4433 }
4434 return result;
4435}
4436
4437module.exports = nativeKeysIn;
4438
4439},{}],146:[function(require,module,exports){
4440var freeGlobal = require('./_freeGlobal');
4441
4442/** Detect free variable `exports`. */
4443var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
4444
4445/** Detect free variable `module`. */
4446var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
4447
4448/** Detect the popular CommonJS extension `module.exports`. */
4449var moduleExports = freeModule && freeModule.exports === freeExports;
4450
4451/** Detect free variable `process` from Node.js. */
4452var freeProcess = moduleExports && freeGlobal.process;
4453
4454/** Used to access faster Node.js helpers. */
4455var nodeUtil = (function() {
4456 try {
4457 // Use `util.types` for Node.js 10+.
4458 var types = freeModule && freeModule.require && freeModule.require('util').types;
4459
4460 if (types) {
4461 return types;
4462 }
4463
4464 // Legacy `process.binding('util')` for Node.js < 10.
4465 return freeProcess && freeProcess.binding && freeProcess.binding('util');
4466 } catch (e) {}
4467}());
4468
4469module.exports = nodeUtil;
4470
4471},{"./_freeGlobal":100}],147:[function(require,module,exports){
4472/** Used for built-in method references. */
4473var objectProto = Object.prototype;
4474
4475/**
4476 * Used to resolve the
4477 * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
4478 * of values.
4479 */
4480var nativeObjectToString = objectProto.toString;
4481
4482/**
4483 * Converts `value` to a string using `Object.prototype.toString`.
4484 *
4485 * @private
4486 * @param {*} value The value to convert.
4487 * @returns {string} Returns the converted string.
4488 */
4489function objectToString(value) {
4490 return nativeObjectToString.call(value);
4491}
4492
4493module.exports = objectToString;
4494
4495},{}],148:[function(require,module,exports){
4496/**
4497 * Creates a unary function that invokes `func` with its argument transformed.
4498 *
4499 * @private
4500 * @param {Function} func The function to wrap.
4501 * @param {Function} transform The argument transform.
4502 * @returns {Function} Returns the new function.
4503 */
4504function overArg(func, transform) {
4505 return function(arg) {
4506 return func(transform(arg));
4507 };
4508}
4509
4510module.exports = overArg;
4511
4512},{}],149:[function(require,module,exports){
4513var apply = require('./_apply');
4514
4515/* Built-in method references for those with the same name as other `lodash` methods. */
4516var nativeMax = Math.max;
4517
4518/**
4519 * A specialized version of `baseRest` which transforms the rest array.
4520 *
4521 * @private
4522 * @param {Function} func The function to apply a rest parameter to.
4523 * @param {number} [start=func.length-1] The start position of the rest parameter.
4524 * @param {Function} transform The rest array transform.
4525 * @returns {Function} Returns the new function.
4526 */
4527function overRest(func, start, transform) {
4528 start = nativeMax(start === undefined ? (func.length - 1) : start, 0);
4529 return function() {
4530 var args = arguments,
4531 index = -1,
4532 length = nativeMax(args.length - start, 0),
4533 array = Array(length);
4534
4535 while (++index < length) {
4536 array[index] = args[start + index];
4537 }
4538 index = -1;
4539 var otherArgs = Array(start + 1);
4540 while (++index < start) {
4541 otherArgs[index] = args[index];
4542 }
4543 otherArgs[start] = transform(array);
4544 return apply(func, this, otherArgs);
4545 };
4546}
4547
4548module.exports = overRest;
4549
4550},{"./_apply":16}],150:[function(require,module,exports){
4551var baseGet = require('./_baseGet'),
4552 baseSlice = require('./_baseSlice');
4553
4554/**
4555 * Gets the parent value at `path` of `object`.
4556 *
4557 * @private
4558 * @param {Object} object The object to query.
4559 * @param {Array} path The path to get the parent value of.
4560 * @returns {*} Returns the parent value.
4561 */
4562function parent(object, path) {
4563 return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));
4564}
4565
4566module.exports = parent;
4567
4568},{"./_baseGet":42,"./_baseSlice":69}],151:[function(require,module,exports){
4569var freeGlobal = require('./_freeGlobal');
4570
4571/** Detect free variable `self`. */
4572var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
4573
4574/** Used as a reference to the global object. */
4575var root = freeGlobal || freeSelf || Function('return this')();
4576
4577module.exports = root;
4578
4579},{"./_freeGlobal":100}],152:[function(require,module,exports){
4580/** Used to stand-in for `undefined` hash values. */
4581var HASH_UNDEFINED = '__lodash_hash_undefined__';
4582
4583/**
4584 * Adds `value` to the array cache.
4585 *
4586 * @private
4587 * @name add
4588 * @memberOf SetCache
4589 * @alias push
4590 * @param {*} value The value to cache.
4591 * @returns {Object} Returns the cache instance.
4592 */
4593function setCacheAdd(value) {
4594 this.__data__.set(value, HASH_UNDEFINED);
4595 return this;
4596}
4597
4598module.exports = setCacheAdd;
4599
4600},{}],153:[function(require,module,exports){
4601/**
4602 * Checks if `value` is in the array cache.
4603 *
4604 * @private
4605 * @name has
4606 * @memberOf SetCache
4607 * @param {*} value The value to search for.
4608 * @returns {number} Returns `true` if `value` is found, else `false`.
4609 */
4610function setCacheHas(value) {
4611 return this.__data__.has(value);
4612}
4613
4614module.exports = setCacheHas;
4615
4616},{}],154:[function(require,module,exports){
4617/**
4618 * Converts `set` to an array of its values.
4619 *
4620 * @private
4621 * @param {Object} set The set to convert.
4622 * @returns {Array} Returns the values.
4623 */
4624function setToArray(set) {
4625 var index = -1,
4626 result = Array(set.size);
4627
4628 set.forEach(function(value) {
4629 result[++index] = value;
4630 });
4631 return result;
4632}
4633
4634module.exports = setToArray;
4635
4636},{}],155:[function(require,module,exports){
4637var baseSetToString = require('./_baseSetToString'),
4638 shortOut = require('./_shortOut');
4639
4640/**
4641 * Sets the `toString` method of `func` to return `string`.
4642 *
4643 * @private
4644 * @param {Function} func The function to modify.
4645 * @param {Function} string The `toString` result.
4646 * @returns {Function} Returns `func`.
4647 */
4648var setToString = shortOut(baseSetToString);
4649
4650module.exports = setToString;
4651
4652},{"./_baseSetToString":68,"./_shortOut":156}],156:[function(require,module,exports){
4653/** Used to detect hot functions by number of calls within a span of milliseconds. */
4654var HOT_COUNT = 800,
4655 HOT_SPAN = 16;
4656
4657/* Built-in method references for those with the same name as other `lodash` methods. */
4658var nativeNow = Date.now;
4659
4660/**
4661 * Creates a function that'll short out and invoke `identity` instead
4662 * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`
4663 * milliseconds.
4664 *
4665 * @private
4666 * @param {Function} func The function to restrict.
4667 * @returns {Function} Returns the new shortable function.
4668 */
4669function shortOut(func) {
4670 var count = 0,
4671 lastCalled = 0;
4672
4673 return function() {
4674 var stamp = nativeNow(),
4675 remaining = HOT_SPAN - (stamp - lastCalled);
4676
4677 lastCalled = stamp;
4678 if (remaining > 0) {
4679 if (++count >= HOT_COUNT) {
4680 return arguments[0];
4681 }
4682 } else {
4683 count = 0;
4684 }
4685 return func.apply(undefined, arguments);
4686 };
4687}
4688
4689module.exports = shortOut;
4690
4691},{}],157:[function(require,module,exports){
4692var ListCache = require('./_ListCache');
4693
4694/**
4695 * Removes all key-value entries from the stack.
4696 *
4697 * @private
4698 * @name clear
4699 * @memberOf Stack
4700 */
4701function stackClear() {
4702 this.__data__ = new ListCache;
4703 this.size = 0;
4704}
4705
4706module.exports = stackClear;
4707
4708},{"./_ListCache":6}],158:[function(require,module,exports){
4709/**
4710 * Removes `key` and its value from the stack.
4711 *
4712 * @private
4713 * @name delete
4714 * @memberOf Stack
4715 * @param {string} key The key of the value to remove.
4716 * @returns {boolean} Returns `true` if the entry was removed, else `false`.
4717 */
4718function stackDelete(key) {
4719 var data = this.__data__,
4720 result = data['delete'](key);
4721
4722 this.size = data.size;
4723 return result;
4724}
4725
4726module.exports = stackDelete;
4727
4728},{}],159:[function(require,module,exports){
4729/**
4730 * Gets the stack value for `key`.
4731 *
4732 * @private
4733 * @name get
4734 * @memberOf Stack
4735 * @param {string} key The key of the value to get.
4736 * @returns {*} Returns the entry value.
4737 */
4738function stackGet(key) {
4739 return this.__data__.get(key);
4740}
4741
4742module.exports = stackGet;
4743
4744},{}],160:[function(require,module,exports){
4745/**
4746 * Checks if a stack value for `key` exists.
4747 *
4748 * @private
4749 * @name has
4750 * @memberOf Stack
4751 * @param {string} key The key of the entry to check.
4752 * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
4753 */
4754function stackHas(key) {
4755 return this.__data__.has(key);
4756}
4757
4758module.exports = stackHas;
4759
4760},{}],161:[function(require,module,exports){
4761var ListCache = require('./_ListCache'),
4762 Map = require('./_Map'),
4763 MapCache = require('./_MapCache');
4764
4765/** Used as the size to enable large array optimizations. */
4766var LARGE_ARRAY_SIZE = 200;
4767
4768/**
4769 * Sets the stack `key` to `value`.
4770 *
4771 * @private
4772 * @name set
4773 * @memberOf Stack
4774 * @param {string} key The key of the value to set.
4775 * @param {*} value The value to set.
4776 * @returns {Object} Returns the stack cache instance.
4777 */
4778function stackSet(key, value) {
4779 var data = this.__data__;
4780 if (data instanceof ListCache) {
4781 var pairs = data.__data__;
4782 if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
4783 pairs.push([key, value]);
4784 this.size = ++data.size;
4785 return this;
4786 }
4787 data = this.__data__ = new MapCache(pairs);
4788 }
4789 data.set(key, value);
4790 this.size = data.size;
4791 return this;
4792}
4793
4794module.exports = stackSet;
4795
4796},{"./_ListCache":6,"./_Map":7,"./_MapCache":8}],162:[function(require,module,exports){
4797/**
4798 * A specialized version of `_.indexOf` which performs strict equality
4799 * comparisons of values, i.e. `===`.
4800 *
4801 * @private
4802 * @param {Array} array The array to inspect.
4803 * @param {*} value The value to search for.
4804 * @param {number} fromIndex The index to search from.
4805 * @returns {number} Returns the index of the matched value, else `-1`.
4806 */
4807function strictIndexOf(array, value, fromIndex) {
4808 var index = fromIndex - 1,
4809 length = array.length;
4810
4811 while (++index < length) {
4812 if (array[index] === value) {
4813 return index;
4814 }
4815 }
4816 return -1;
4817}
4818
4819module.exports = strictIndexOf;
4820
4821},{}],163:[function(require,module,exports){
4822var asciiToArray = require('./_asciiToArray'),
4823 hasUnicode = require('./_hasUnicode'),
4824 unicodeToArray = require('./_unicodeToArray');
4825
4826/**
4827 * Converts `string` to an array.
4828 *
4829 * @private
4830 * @param {string} string The string to convert.
4831 * @returns {Array} Returns the converted array.
4832 */
4833function stringToArray(string) {
4834 return hasUnicode(string)
4835 ? unicodeToArray(string)
4836 : asciiToArray(string);
4837}
4838
4839module.exports = stringToArray;
4840
4841},{"./_asciiToArray":26,"./_hasUnicode":113,"./_unicodeToArray":167}],164:[function(require,module,exports){
4842var memoizeCapped = require('./_memoizeCapped');
4843
4844/** Used to match property names within property paths. */
4845var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
4846
4847/** Used to match backslashes in property paths. */
4848var reEscapeChar = /\\(\\)?/g;
4849
4850/**
4851 * Converts `string` to a property path array.
4852 *
4853 * @private
4854 * @param {string} string The string to convert.
4855 * @returns {Array} Returns the property path array.
4856 */
4857var stringToPath = memoizeCapped(function(string) {
4858 var result = [];
4859 if (string.charCodeAt(0) === 46 /* . */) {
4860 result.push('');
4861 }
4862 string.replace(rePropName, function(match, number, quote, subString) {
4863 result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));
4864 });
4865 return result;
4866});
4867
4868module.exports = stringToPath;
4869
4870},{"./_memoizeCapped":142}],165:[function(require,module,exports){
4871var isSymbol = require('./isSymbol');
4872
4873/** Used as references for various `Number` constants. */
4874var INFINITY = 1 / 0;
4875
4876/**
4877 * Converts `value` to a string key if it's not a string or symbol.
4878 *
4879 * @private
4880 * @param {*} value The value to inspect.
4881 * @returns {string|symbol} Returns the key.
4882 */
4883function toKey(value) {
4884 if (typeof value == 'string' || isSymbol(value)) {
4885 return value;
4886 }
4887 var result = (value + '');
4888 return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
4889}
4890
4891module.exports = toKey;
4892
4893},{"./isSymbol":211}],166:[function(require,module,exports){
4894/** Used for built-in method references. */
4895var funcProto = Function.prototype;
4896
4897/** Used to resolve the decompiled source of functions. */
4898var funcToString = funcProto.toString;
4899
4900/**
4901 * Converts `func` to its source code.
4902 *
4903 * @private
4904 * @param {Function} func The function to convert.
4905 * @returns {string} Returns the source code.
4906 */
4907function toSource(func) {
4908 if (func != null) {
4909 try {
4910 return funcToString.call(func);
4911 } catch (e) {}
4912 try {
4913 return (func + '');
4914 } catch (e) {}
4915 }
4916 return '';
4917}
4918
4919module.exports = toSource;
4920
4921},{}],167:[function(require,module,exports){
4922/** Used to compose unicode character classes. */
4923var rsAstralRange = '\\ud800-\\udfff',
4924 rsComboMarksRange = '\\u0300-\\u036f',
4925 reComboHalfMarksRange = '\\ufe20-\\ufe2f',
4926 rsComboSymbolsRange = '\\u20d0-\\u20ff',
4927 rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,
4928 rsVarRange = '\\ufe0e\\ufe0f';
4929
4930/** Used to compose unicode capture groups. */
4931var rsAstral = '[' + rsAstralRange + ']',
4932 rsCombo = '[' + rsComboRange + ']',
4933 rsFitz = '\\ud83c[\\udffb-\\udfff]',
4934 rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
4935 rsNonAstral = '[^' + rsAstralRange + ']',
4936 rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
4937 rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
4938 rsZWJ = '\\u200d';
4939
4940/** Used to compose unicode regexes. */
4941var reOptMod = rsModifier + '?',
4942 rsOptVar = '[' + rsVarRange + ']?',
4943 rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
4944 rsSeq = rsOptVar + reOptMod + rsOptJoin,
4945 rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';
4946
4947/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */
4948var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');
4949
4950/**
4951 * Converts a Unicode `string` to an array.
4952 *
4953 * @private
4954 * @param {string} string The string to convert.
4955 * @returns {Array} Returns the converted array.
4956 */
4957function unicodeToArray(string) {
4958 return string.match(reUnicode) || [];
4959}
4960
4961module.exports = unicodeToArray;
4962
4963},{}],168:[function(require,module,exports){
4964var assignValue = require('./_assignValue'),
4965 copyObject = require('./_copyObject'),
4966 createAssigner = require('./_createAssigner'),
4967 isArrayLike = require('./isArrayLike'),
4968 isPrototype = require('./_isPrototype'),
4969 keys = require('./keys');
4970
4971/** Used for built-in method references. */
4972var objectProto = Object.prototype;
4973
4974/** Used to check objects for own properties. */
4975var hasOwnProperty = objectProto.hasOwnProperty;
4976
4977/**
4978 * Assigns own enumerable string keyed properties of source objects to the
4979 * destination object. Source objects are applied from left to right.
4980 * Subsequent sources overwrite property assignments of previous sources.
4981 *
4982 * **Note:** This method mutates `object` and is loosely based on
4983 * [`Object.assign`](https://mdn.io/Object/assign).
4984 *
4985 * @static
4986 * @memberOf _
4987 * @since 0.10.0
4988 * @category Object
4989 * @param {Object} object The destination object.
4990 * @param {...Object} [sources] The source objects.
4991 * @returns {Object} Returns `object`.
4992 * @see _.assignIn
4993 * @example
4994 *
4995 * function Foo() {
4996 * this.a = 1;
4997 * }
4998 *
4999 * function Bar() {
5000 * this.c = 3;
5001 * }
5002 *
5003 * Foo.prototype.b = 2;
5004 * Bar.prototype.d = 4;
5005 *
5006 * _.assign({ 'a': 0 }, new Foo, new Bar);
5007 * // => { 'a': 1, 'c': 3 }
5008 */
5009var assign = createAssigner(function(object, source) {
5010 if (isPrototype(source) || isArrayLike(source)) {
5011 copyObject(source, keys(source), object);
5012 return;
5013 }
5014 for (var key in source) {
5015 if (hasOwnProperty.call(source, key)) {
5016 assignValue(object, key, source[key]);
5017 }
5018 }
5019});
5020
5021module.exports = assign;
5022
5023},{"./_assignValue":27,"./_copyObject":86,"./_createAssigner":91,"./_isPrototype":127,"./isArrayLike":196,"./keys":213}],169:[function(require,module,exports){
5024var copyObject = require('./_copyObject'),
5025 createAssigner = require('./_createAssigner'),
5026 keysIn = require('./keysIn');
5027
5028/**
5029 * This method is like `_.assign` except that it iterates over own and
5030 * inherited source properties.
5031 *
5032 * **Note:** This method mutates `object`.
5033 *
5034 * @static
5035 * @memberOf _
5036 * @since 4.0.0
5037 * @alias extend
5038 * @category Object
5039 * @param {Object} object The destination object.
5040 * @param {...Object} [sources] The source objects.
5041 * @returns {Object} Returns `object`.
5042 * @see _.assign
5043 * @example
5044 *
5045 * function Foo() {
5046 * this.a = 1;
5047 * }
5048 *
5049 * function Bar() {
5050 * this.c = 3;
5051 * }
5052 *
5053 * Foo.prototype.b = 2;
5054 * Bar.prototype.d = 4;
5055 *
5056 * _.assignIn({ 'a': 0 }, new Foo, new Bar);
5057 * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 }
5058 */
5059var assignIn = createAssigner(function(object, source) {
5060 copyObject(source, keysIn(source), object);
5061});
5062
5063module.exports = assignIn;
5064
5065},{"./_copyObject":86,"./_createAssigner":91,"./keysIn":214}],170:[function(require,module,exports){
5066var toString = require('./toString'),
5067 upperFirst = require('./upperFirst');
5068
5069/**
5070 * Converts the first character of `string` to upper case and the remaining
5071 * to lower case.
5072 *
5073 * @static
5074 * @memberOf _
5075 * @since 3.0.0
5076 * @category String
5077 * @param {string} [string=''] The string to capitalize.
5078 * @returns {string} Returns the capitalized string.
5079 * @example
5080 *
5081 * _.capitalize('FRED');
5082 * // => 'Fred'
5083 */
5084function capitalize(string) {
5085 return upperFirst(toString(string).toLowerCase());
5086}
5087
5088module.exports = capitalize;
5089
5090},{"./toString":230,"./upperFirst":232}],171:[function(require,module,exports){
5091var baseClone = require('./_baseClone');
5092
5093/** Used to compose bitmasks for cloning. */
5094var CLONE_SYMBOLS_FLAG = 4;
5095
5096/**
5097 * Creates a shallow clone of `value`.
5098 *
5099 * **Note:** This method is loosely based on the
5100 * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)
5101 * and supports cloning arrays, array buffers, booleans, date objects, maps,
5102 * numbers, `Object` objects, regexes, sets, strings, symbols, and typed
5103 * arrays. The own enumerable properties of `arguments` objects are cloned
5104 * as plain objects. An empty object is returned for uncloneable values such
5105 * as error objects, functions, DOM nodes, and WeakMaps.
5106 *
5107 * @static
5108 * @memberOf _
5109 * @since 0.1.0
5110 * @category Lang
5111 * @param {*} value The value to clone.
5112 * @returns {*} Returns the cloned value.
5113 * @see _.cloneDeep
5114 * @example
5115 *
5116 * var objects = [{ 'a': 1 }, { 'b': 2 }];
5117 *
5118 * var shallow = _.clone(objects);
5119 * console.log(shallow[0] === objects[0]);
5120 * // => true
5121 */
5122function clone(value) {
5123 return baseClone(value, CLONE_SYMBOLS_FLAG);
5124}
5125
5126module.exports = clone;
5127
5128},{"./_baseClone":33}],172:[function(require,module,exports){
5129var baseClone = require('./_baseClone');
5130
5131/** Used to compose bitmasks for cloning. */
5132var CLONE_DEEP_FLAG = 1,
5133 CLONE_SYMBOLS_FLAG = 4;
5134
5135/**
5136 * This method is like `_.clone` except that it recursively clones `value`.
5137 *
5138 * @static
5139 * @memberOf _
5140 * @since 1.0.0
5141 * @category Lang
5142 * @param {*} value The value to recursively clone.
5143 * @returns {*} Returns the deep cloned value.
5144 * @see _.clone
5145 * @example
5146 *
5147 * var objects = [{ 'a': 1 }, { 'b': 2 }];
5148 *
5149 * var deep = _.cloneDeep(objects);
5150 * console.log(deep[0] === objects[0]);
5151 * // => false
5152 */
5153function cloneDeep(value) {
5154 return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);
5155}
5156
5157module.exports = cloneDeep;
5158
5159},{"./_baseClone":33}],173:[function(require,module,exports){
5160var baseClone = require('./_baseClone');
5161
5162/** Used to compose bitmasks for cloning. */
5163var CLONE_DEEP_FLAG = 1,
5164 CLONE_SYMBOLS_FLAG = 4;
5165
5166/**
5167 * This method is like `_.cloneWith` except that it recursively clones `value`.
5168 *
5169 * @static
5170 * @memberOf _
5171 * @since 4.0.0
5172 * @category Lang
5173 * @param {*} value The value to recursively clone.
5174 * @param {Function} [customizer] The function to customize cloning.
5175 * @returns {*} Returns the deep cloned value.
5176 * @see _.cloneWith
5177 * @example
5178 *
5179 * function customizer(value) {
5180 * if (_.isElement(value)) {
5181 * return value.cloneNode(true);
5182 * }
5183 * }
5184 *
5185 * var el = _.cloneDeepWith(document.body, customizer);
5186 *
5187 * console.log(el === document.body);
5188 * // => false
5189 * console.log(el.nodeName);
5190 * // => 'BODY'
5191 * console.log(el.childNodes.length);
5192 * // => 20
5193 */
5194function cloneDeepWith(value, customizer) {
5195 customizer = typeof customizer == 'function' ? customizer : undefined;
5196 return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer);
5197}
5198
5199module.exports = cloneDeepWith;
5200
5201},{"./_baseClone":33}],174:[function(require,module,exports){
5202/**
5203 * Creates an array with all falsey values removed. The values `false`, `null`,
5204 * `0`, `""`, `undefined`, and `NaN` are falsey.
5205 *
5206 * @static
5207 * @memberOf _
5208 * @since 0.1.0
5209 * @category Array
5210 * @param {Array} array The array to compact.
5211 * @returns {Array} Returns the new array of filtered values.
5212 * @example
5213 *
5214 * _.compact([0, 1, false, 2, '', 3]);
5215 * // => [1, 2, 3]
5216 */
5217function compact(array) {
5218 var index = -1,
5219 length = array == null ? 0 : array.length,
5220 resIndex = 0,
5221 result = [];
5222
5223 while (++index < length) {
5224 var value = array[index];
5225 if (value) {
5226 result[resIndex++] = value;
5227 }
5228 }
5229 return result;
5230}
5231
5232module.exports = compact;
5233
5234},{}],175:[function(require,module,exports){
5235/**
5236 * Creates a function that returns `value`.
5237 *
5238 * @static
5239 * @memberOf _
5240 * @since 2.4.0
5241 * @category Util
5242 * @param {*} value The value to return from the new function.
5243 * @returns {Function} Returns the new constant function.
5244 * @example
5245 *
5246 * var objects = _.times(2, _.constant({ 'a': 1 }));
5247 *
5248 * console.log(objects);
5249 * // => [{ 'a': 1 }, { 'a': 1 }]
5250 *
5251 * console.log(objects[0] === objects[1]);
5252 * // => true
5253 */
5254function constant(value) {
5255 return function() {
5256 return value;
5257 };
5258}
5259
5260module.exports = constant;
5261
5262},{}],176:[function(require,module,exports){
5263var baseDelay = require('./_baseDelay'),
5264 baseRest = require('./_baseRest');
5265
5266/**
5267 * Defers invoking the `func` until the current call stack has cleared. Any
5268 * additional arguments are provided to `func` when it's invoked.
5269 *
5270 * @static
5271 * @memberOf _
5272 * @since 0.1.0
5273 * @category Function
5274 * @param {Function} func The function to defer.
5275 * @param {...*} [args] The arguments to invoke `func` with.
5276 * @returns {number} Returns the timer id.
5277 * @example
5278 *
5279 * _.defer(function(text) {
5280 * console.log(text);
5281 * }, 'deferred');
5282 * // => Logs 'deferred' after one millisecond.
5283 */
5284var defer = baseRest(function(func, args) {
5285 return baseDelay(func, 1, args);
5286});
5287
5288module.exports = defer;
5289
5290},{"./_baseDelay":35,"./_baseRest":67}],177:[function(require,module,exports){
5291var baseDelay = require('./_baseDelay'),
5292 baseRest = require('./_baseRest'),
5293 toNumber = require('./toNumber');
5294
5295/**
5296 * Invokes `func` after `wait` milliseconds. Any additional arguments are
5297 * provided to `func` when it's invoked.
5298 *
5299 * @static
5300 * @memberOf _
5301 * @since 0.1.0
5302 * @category Function
5303 * @param {Function} func The function to delay.
5304 * @param {number} wait The number of milliseconds to delay invocation.
5305 * @param {...*} [args] The arguments to invoke `func` with.
5306 * @returns {number} Returns the timer id.
5307 * @example
5308 *
5309 * _.delay(function(text) {
5310 * console.log(text);
5311 * }, 1000, 'later');
5312 * // => Logs 'later' after one second.
5313 */
5314var delay = baseRest(function(func, wait, args) {
5315 return baseDelay(func, toNumber(wait) || 0, args);
5316});
5317
5318module.exports = delay;
5319
5320},{"./_baseDelay":35,"./_baseRest":67,"./toNumber":229}],178:[function(require,module,exports){
5321module.exports = require('./forEach');
5322
5323},{"./forEach":187}],179:[function(require,module,exports){
5324/**
5325 * Performs a
5326 * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
5327 * comparison between two values to determine if they are equivalent.
5328 *
5329 * @static
5330 * @memberOf _
5331 * @since 4.0.0
5332 * @category Lang
5333 * @param {*} value The value to compare.
5334 * @param {*} other The other value to compare.
5335 * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
5336 * @example
5337 *
5338 * var object = { 'a': 1 };
5339 * var other = { 'a': 1 };
5340 *
5341 * _.eq(object, object);
5342 * // => true
5343 *
5344 * _.eq(object, other);
5345 * // => false
5346 *
5347 * _.eq('a', 'a');
5348 * // => true
5349 *
5350 * _.eq('a', Object('a'));
5351 * // => false
5352 *
5353 * _.eq(NaN, NaN);
5354 * // => true
5355 */
5356function eq(value, other) {
5357 return value === other || (value !== value && other !== other);
5358}
5359
5360module.exports = eq;
5361
5362},{}],180:[function(require,module,exports){
5363var arrayEvery = require('./_arrayEvery'),
5364 baseEvery = require('./_baseEvery'),
5365 baseIteratee = require('./_baseIteratee'),
5366 isArray = require('./isArray'),
5367 isIterateeCall = require('./_isIterateeCall');
5368
5369/**
5370 * Checks if `predicate` returns truthy for **all** elements of `collection`.
5371 * Iteration is stopped once `predicate` returns falsey. The predicate is
5372 * invoked with three arguments: (value, index|key, collection).
5373 *
5374 * **Note:** This method returns `true` for
5375 * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because
5376 * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of
5377 * elements of empty collections.
5378 *
5379 * @static
5380 * @memberOf _
5381 * @since 0.1.0
5382 * @category Collection
5383 * @param {Array|Object} collection The collection to iterate over.
5384 * @param {Function} [predicate=_.identity] The function invoked per iteration.
5385 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
5386 * @returns {boolean} Returns `true` if all elements pass the predicate check,
5387 * else `false`.
5388 * @example
5389 *
5390 * _.every([true, 1, null, 'yes'], Boolean);
5391 * // => false
5392 *
5393 * var users = [
5394 * { 'user': 'barney', 'age': 36, 'active': false },
5395 * { 'user': 'fred', 'age': 40, 'active': false }
5396 * ];
5397 *
5398 * // The `_.matches` iteratee shorthand.
5399 * _.every(users, { 'user': 'barney', 'active': false });
5400 * // => false
5401 *
5402 * // The `_.matchesProperty` iteratee shorthand.
5403 * _.every(users, ['active', false]);
5404 * // => true
5405 *
5406 * // The `_.property` iteratee shorthand.
5407 * _.every(users, 'active');
5408 * // => false
5409 */
5410function every(collection, predicate, guard) {
5411 var func = isArray(collection) ? arrayEvery : baseEvery;
5412 if (guard && isIterateeCall(collection, predicate, guard)) {
5413 predicate = undefined;
5414 }
5415 return func(collection, baseIteratee(predicate, 3));
5416}
5417
5418module.exports = every;
5419
5420},{"./_arrayEvery":19,"./_baseEvery":37,"./_baseIteratee":58,"./_isIterateeCall":123,"./isArray":195}],181:[function(require,module,exports){
5421module.exports = require('./assignIn');
5422
5423},{"./assignIn":169}],182:[function(require,module,exports){
5424var arrayFilter = require('./_arrayFilter'),
5425 baseFilter = require('./_baseFilter'),
5426 baseIteratee = require('./_baseIteratee'),
5427 isArray = require('./isArray');
5428
5429/**
5430 * Iterates over elements of `collection`, returning an array of all elements
5431 * `predicate` returns truthy for. The predicate is invoked with three
5432 * arguments: (value, index|key, collection).
5433 *
5434 * **Note:** Unlike `_.remove`, this method returns a new array.
5435 *
5436 * @static
5437 * @memberOf _
5438 * @since 0.1.0
5439 * @category Collection
5440 * @param {Array|Object} collection The collection to iterate over.
5441 * @param {Function} [predicate=_.identity] The function invoked per iteration.
5442 * @returns {Array} Returns the new filtered array.
5443 * @see _.reject
5444 * @example
5445 *
5446 * var users = [
5447 * { 'user': 'barney', 'age': 36, 'active': true },
5448 * { 'user': 'fred', 'age': 40, 'active': false }
5449 * ];
5450 *
5451 * _.filter(users, function(o) { return !o.active; });
5452 * // => objects for ['fred']
5453 *
5454 * // The `_.matches` iteratee shorthand.
5455 * _.filter(users, { 'age': 36, 'active': true });
5456 * // => objects for ['barney']
5457 *
5458 * // The `_.matchesProperty` iteratee shorthand.
5459 * _.filter(users, ['active', false]);
5460 * // => objects for ['fred']
5461 *
5462 * // The `_.property` iteratee shorthand.
5463 * _.filter(users, 'active');
5464 * // => objects for ['barney']
5465 */
5466function filter(collection, predicate) {
5467 var func = isArray(collection) ? arrayFilter : baseFilter;
5468 return func(collection, baseIteratee(predicate, 3));
5469}
5470
5471module.exports = filter;
5472
5473},{"./_arrayFilter":20,"./_baseFilter":38,"./_baseIteratee":58,"./isArray":195}],183:[function(require,module,exports){
5474var createFind = require('./_createFind'),
5475 findIndex = require('./findIndex');
5476
5477/**
5478 * Iterates over elements of `collection`, returning the first element
5479 * `predicate` returns truthy for. The predicate is invoked with three
5480 * arguments: (value, index|key, collection).
5481 *
5482 * @static
5483 * @memberOf _
5484 * @since 0.1.0
5485 * @category Collection
5486 * @param {Array|Object} collection The collection to inspect.
5487 * @param {Function} [predicate=_.identity] The function invoked per iteration.
5488 * @param {number} [fromIndex=0] The index to search from.
5489 * @returns {*} Returns the matched element, else `undefined`.
5490 * @example
5491 *
5492 * var users = [
5493 * { 'user': 'barney', 'age': 36, 'active': true },
5494 * { 'user': 'fred', 'age': 40, 'active': false },
5495 * { 'user': 'pebbles', 'age': 1, 'active': true }
5496 * ];
5497 *
5498 * _.find(users, function(o) { return o.age < 40; });
5499 * // => object for 'barney'
5500 *
5501 * // The `_.matches` iteratee shorthand.
5502 * _.find(users, { 'age': 1, 'active': true });
5503 * // => object for 'pebbles'
5504 *
5505 * // The `_.matchesProperty` iteratee shorthand.
5506 * _.find(users, ['active', false]);
5507 * // => object for 'fred'
5508 *
5509 * // The `_.property` iteratee shorthand.
5510 * _.find(users, 'active');
5511 * // => object for 'barney'
5512 */
5513var find = createFind(findIndex);
5514
5515module.exports = find;
5516
5517},{"./_createFind":95,"./findIndex":184}],184:[function(require,module,exports){
5518var baseFindIndex = require('./_baseFindIndex'),
5519 baseIteratee = require('./_baseIteratee'),
5520 toInteger = require('./toInteger');
5521
5522/* Built-in method references for those with the same name as other `lodash` methods. */
5523var nativeMax = Math.max;
5524
5525/**
5526 * This method is like `_.find` except that it returns the index of the first
5527 * element `predicate` returns truthy for instead of the element itself.
5528 *
5529 * @static
5530 * @memberOf _
5531 * @since 1.1.0
5532 * @category Array
5533 * @param {Array} array The array to inspect.
5534 * @param {Function} [predicate=_.identity] The function invoked per iteration.
5535 * @param {number} [fromIndex=0] The index to search from.
5536 * @returns {number} Returns the index of the found element, else `-1`.
5537 * @example
5538 *
5539 * var users = [
5540 * { 'user': 'barney', 'active': false },
5541 * { 'user': 'fred', 'active': false },
5542 * { 'user': 'pebbles', 'active': true }
5543 * ];
5544 *
5545 * _.findIndex(users, function(o) { return o.user == 'barney'; });
5546 * // => 0
5547 *
5548 * // The `_.matches` iteratee shorthand.
5549 * _.findIndex(users, { 'user': 'fred', 'active': false });
5550 * // => 1
5551 *
5552 * // The `_.matchesProperty` iteratee shorthand.
5553 * _.findIndex(users, ['active', false]);
5554 * // => 0
5555 *
5556 * // The `_.property` iteratee shorthand.
5557 * _.findIndex(users, 'active');
5558 * // => 2
5559 */
5560function findIndex(array, predicate, fromIndex) {
5561 var length = array == null ? 0 : array.length;
5562 if (!length) {
5563 return -1;
5564 }
5565 var index = fromIndex == null ? 0 : toInteger(fromIndex);
5566 if (index < 0) {
5567 index = nativeMax(length + index, 0);
5568 }
5569 return baseFindIndex(array, baseIteratee(predicate, 3), index);
5570}
5571
5572module.exports = findIndex;
5573
5574},{"./_baseFindIndex":39,"./_baseIteratee":58,"./toInteger":228}],185:[function(require,module,exports){
5575var createFind = require('./_createFind'),
5576 findLastIndex = require('./findLastIndex');
5577
5578/**
5579 * This method is like `_.find` except that it iterates over elements of
5580 * `collection` from right to left.
5581 *
5582 * @static
5583 * @memberOf _
5584 * @since 2.0.0
5585 * @category Collection
5586 * @param {Array|Object} collection The collection to inspect.
5587 * @param {Function} [predicate=_.identity] The function invoked per iteration.
5588 * @param {number} [fromIndex=collection.length-1] The index to search from.
5589 * @returns {*} Returns the matched element, else `undefined`.
5590 * @example
5591 *
5592 * _.findLast([1, 2, 3, 4], function(n) {
5593 * return n % 2 == 1;
5594 * });
5595 * // => 3
5596 */
5597var findLast = createFind(findLastIndex);
5598
5599module.exports = findLast;
5600
5601},{"./_createFind":95,"./findLastIndex":186}],186:[function(require,module,exports){
5602var baseFindIndex = require('./_baseFindIndex'),
5603 baseIteratee = require('./_baseIteratee'),
5604 toInteger = require('./toInteger');
5605
5606/* Built-in method references for those with the same name as other `lodash` methods. */
5607var nativeMax = Math.max,
5608 nativeMin = Math.min;
5609
5610/**
5611 * This method is like `_.findIndex` except that it iterates over elements
5612 * of `collection` from right to left.
5613 *
5614 * @static
5615 * @memberOf _
5616 * @since 2.0.0
5617 * @category Array
5618 * @param {Array} array The array to inspect.
5619 * @param {Function} [predicate=_.identity] The function invoked per iteration.
5620 * @param {number} [fromIndex=array.length-1] The index to search from.
5621 * @returns {number} Returns the index of the found element, else `-1`.
5622 * @example
5623 *
5624 * var users = [
5625 * { 'user': 'barney', 'active': true },
5626 * { 'user': 'fred', 'active': false },
5627 * { 'user': 'pebbles', 'active': false }
5628 * ];
5629 *
5630 * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; });
5631 * // => 2
5632 *
5633 * // The `_.matches` iteratee shorthand.
5634 * _.findLastIndex(users, { 'user': 'barney', 'active': true });
5635 * // => 0
5636 *
5637 * // The `_.matchesProperty` iteratee shorthand.
5638 * _.findLastIndex(users, ['active', false]);
5639 * // => 2
5640 *
5641 * // The `_.property` iteratee shorthand.
5642 * _.findLastIndex(users, 'active');
5643 * // => 0
5644 */
5645function findLastIndex(array, predicate, fromIndex) {
5646 var length = array == null ? 0 : array.length;
5647 if (!length) {
5648 return -1;
5649 }
5650 var index = length - 1;
5651 if (fromIndex !== undefined) {
5652 index = toInteger(fromIndex);
5653 index = fromIndex < 0
5654 ? nativeMax(length + index, 0)
5655 : nativeMin(index, length - 1);
5656 }
5657 return baseFindIndex(array, baseIteratee(predicate, 3), index, true);
5658}
5659
5660module.exports = findLastIndex;
5661
5662},{"./_baseFindIndex":39,"./_baseIteratee":58,"./toInteger":228}],187:[function(require,module,exports){
5663var arrayEach = require('./_arrayEach'),
5664 baseEach = require('./_baseEach'),
5665 castFunction = require('./_castFunction'),
5666 isArray = require('./isArray');
5667
5668/**
5669 * Iterates over elements of `collection` and invokes `iteratee` for each element.
5670 * The iteratee is invoked with three arguments: (value, index|key, collection).
5671 * Iteratee functions may exit iteration early by explicitly returning `false`.
5672 *
5673 * **Note:** As with other "Collections" methods, objects with a "length"
5674 * property are iterated like arrays. To avoid this behavior use `_.forIn`
5675 * or `_.forOwn` for object iteration.
5676 *
5677 * @static
5678 * @memberOf _
5679 * @since 0.1.0
5680 * @alias each
5681 * @category Collection
5682 * @param {Array|Object} collection The collection to iterate over.
5683 * @param {Function} [iteratee=_.identity] The function invoked per iteration.
5684 * @returns {Array|Object} Returns `collection`.
5685 * @see _.forEachRight
5686 * @example
5687 *
5688 * _.forEach([1, 2], function(value) {
5689 * console.log(value);
5690 * });
5691 * // => Logs `1` then `2`.
5692 *
5693 * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {
5694 * console.log(key);
5695 * });
5696 * // => Logs 'a' then 'b' (iteration order is not guaranteed).
5697 */
5698function forEach(collection, iteratee) {
5699 var func = isArray(collection) ? arrayEach : baseEach;
5700 return func(collection, castFunction(iteratee));
5701}
5702
5703module.exports = forEach;
5704
5705},{"./_arrayEach":18,"./_baseEach":36,"./_castFunction":76,"./isArray":195}],188:[function(require,module,exports){
5706var baseGet = require('./_baseGet');
5707
5708/**
5709 * Gets the value at `path` of `object`. If the resolved value is
5710 * `undefined`, the `defaultValue` is returned in its place.
5711 *
5712 * @static
5713 * @memberOf _
5714 * @since 3.7.0
5715 * @category Object
5716 * @param {Object} object The object to query.
5717 * @param {Array|string} path The path of the property to get.
5718 * @param {*} [defaultValue] The value returned for `undefined` resolved values.
5719 * @returns {*} Returns the resolved value.
5720 * @example
5721 *
5722 * var object = { 'a': [{ 'b': { 'c': 3 } }] };
5723 *
5724 * _.get(object, 'a[0].b.c');
5725 * // => 3
5726 *
5727 * _.get(object, ['a', '0', 'b', 'c']);
5728 * // => 3
5729 *
5730 * _.get(object, 'a.b.c', 'default');
5731 * // => 'default'
5732 */
5733function get(object, path, defaultValue) {
5734 var result = object == null ? undefined : baseGet(object, path);
5735 return result === undefined ? defaultValue : result;
5736}
5737
5738module.exports = get;
5739
5740},{"./_baseGet":42}],189:[function(require,module,exports){
5741var baseAssignValue = require('./_baseAssignValue'),
5742 createAggregator = require('./_createAggregator');
5743
5744/** Used for built-in method references. */
5745var objectProto = Object.prototype;
5746
5747/** Used to check objects for own properties. */
5748var hasOwnProperty = objectProto.hasOwnProperty;
5749
5750/**
5751 * Creates an object composed of keys generated from the results of running
5752 * each element of `collection` thru `iteratee`. The order of grouped values
5753 * is determined by the order they occur in `collection`. The corresponding
5754 * value of each key is an array of elements responsible for generating the
5755 * key. The iteratee is invoked with one argument: (value).
5756 *
5757 * @static
5758 * @memberOf _
5759 * @since 0.1.0
5760 * @category Collection
5761 * @param {Array|Object} collection The collection to iterate over.
5762 * @param {Function} [iteratee=_.identity] The iteratee to transform keys.
5763 * @returns {Object} Returns the composed aggregate object.
5764 * @example
5765 *
5766 * _.groupBy([6.1, 4.2, 6.3], Math.floor);
5767 * // => { '4': [4.2], '6': [6.1, 6.3] }
5768 *
5769 * // The `_.property` iteratee shorthand.
5770 * _.groupBy(['one', 'two', 'three'], 'length');
5771 * // => { '3': ['one', 'two'], '5': ['three'] }
5772 */
5773var groupBy = createAggregator(function(result, value, key) {
5774 if (hasOwnProperty.call(result, key)) {
5775 result[key].push(value);
5776 } else {
5777 baseAssignValue(result, key, [value]);
5778 }
5779});
5780
5781module.exports = groupBy;
5782
5783},{"./_baseAssignValue":32,"./_createAggregator":90}],190:[function(require,module,exports){
5784var baseHasIn = require('./_baseHasIn'),
5785 hasPath = require('./_hasPath');
5786
5787/**
5788 * Checks if `path` is a direct or inherited property of `object`.
5789 *
5790 * @static
5791 * @memberOf _
5792 * @since 4.0.0
5793 * @category Object
5794 * @param {Object} object The object to query.
5795 * @param {Array|string} path The path to check.
5796 * @returns {boolean} Returns `true` if `path` exists, else `false`.
5797 * @example
5798 *
5799 * var object = _.create({ 'a': _.create({ 'b': 2 }) });
5800 *
5801 * _.hasIn(object, 'a');
5802 * // => true
5803 *
5804 * _.hasIn(object, 'a.b');
5805 * // => true
5806 *
5807 * _.hasIn(object, ['a', 'b']);
5808 * // => true
5809 *
5810 * _.hasIn(object, 'b');
5811 * // => false
5812 */
5813function hasIn(object, path) {
5814 return object != null && hasPath(object, path, baseHasIn);
5815}
5816
5817module.exports = hasIn;
5818
5819},{"./_baseHasIn":45,"./_hasPath":112}],191:[function(require,module,exports){
5820/**
5821 * This method returns the first argument it receives.
5822 *
5823 * @static
5824 * @since 0.1.0
5825 * @memberOf _
5826 * @category Util
5827 * @param {*} value Any value.
5828 * @returns {*} Returns `value`.
5829 * @example
5830 *
5831 * var object = { 'a': 1 };
5832 *
5833 * console.log(_.identity(object) === object);
5834 * // => true
5835 */
5836function identity(value) {
5837 return value;
5838}
5839
5840module.exports = identity;
5841
5842},{}],192:[function(require,module,exports){
5843var baseIndexOf = require('./_baseIndexOf'),
5844 isArrayLike = require('./isArrayLike'),
5845 isString = require('./isString'),
5846 toInteger = require('./toInteger'),
5847 values = require('./values');
5848
5849/* Built-in method references for those with the same name as other `lodash` methods. */
5850var nativeMax = Math.max;
5851
5852/**
5853 * Checks if `value` is in `collection`. If `collection` is a string, it's
5854 * checked for a substring of `value`, otherwise
5855 * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
5856 * is used for equality comparisons. If `fromIndex` is negative, it's used as
5857 * the offset from the end of `collection`.
5858 *
5859 * @static
5860 * @memberOf _
5861 * @since 0.1.0
5862 * @category Collection
5863 * @param {Array|Object|string} collection The collection to inspect.
5864 * @param {*} value The value to search for.
5865 * @param {number} [fromIndex=0] The index to search from.
5866 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.
5867 * @returns {boolean} Returns `true` if `value` is found, else `false`.
5868 * @example
5869 *
5870 * _.includes([1, 2, 3], 1);
5871 * // => true
5872 *
5873 * _.includes([1, 2, 3], 1, 2);
5874 * // => false
5875 *
5876 * _.includes({ 'a': 1, 'b': 2 }, 1);
5877 * // => true
5878 *
5879 * _.includes('abcd', 'bc');
5880 * // => true
5881 */
5882function includes(collection, value, fromIndex, guard) {
5883 collection = isArrayLike(collection) ? collection : values(collection);
5884 fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0;
5885
5886 var length = collection.length;
5887 if (fromIndex < 0) {
5888 fromIndex = nativeMax(length + fromIndex, 0);
5889 }
5890 return isString(collection)
5891 ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1)
5892 : (!!length && baseIndexOf(collection, value, fromIndex) > -1);
5893}
5894
5895module.exports = includes;
5896
5897},{"./_baseIndexOf":46,"./isArrayLike":196,"./isString":210,"./toInteger":228,"./values":233}],193:[function(require,module,exports){
5898var baseInvoke = require('./_baseInvoke'),
5899 baseRest = require('./_baseRest');
5900
5901/**
5902 * Invokes the method at `path` of `object`.
5903 *
5904 * @static
5905 * @memberOf _
5906 * @since 4.0.0
5907 * @category Object
5908 * @param {Object} object The object to query.
5909 * @param {Array|string} path The path of the method to invoke.
5910 * @param {...*} [args] The arguments to invoke the method with.
5911 * @returns {*} Returns the result of the invoked method.
5912 * @example
5913 *
5914 * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] };
5915 *
5916 * _.invoke(object, 'a[0].b.c.slice', 1, 3);
5917 * // => [2, 3]
5918 */
5919var invoke = baseRest(baseInvoke);
5920
5921module.exports = invoke;
5922
5923},{"./_baseInvoke":47,"./_baseRest":67}],194:[function(require,module,exports){
5924var baseIsArguments = require('./_baseIsArguments'),
5925 isObjectLike = require('./isObjectLike');
5926
5927/** Used for built-in method references. */
5928var objectProto = Object.prototype;
5929
5930/** Used to check objects for own properties. */
5931var hasOwnProperty = objectProto.hasOwnProperty;
5932
5933/** Built-in value references. */
5934var propertyIsEnumerable = objectProto.propertyIsEnumerable;
5935
5936/**
5937 * Checks if `value` is likely an `arguments` object.
5938 *
5939 * @static
5940 * @memberOf _
5941 * @since 0.1.0
5942 * @category Lang
5943 * @param {*} value The value to check.
5944 * @returns {boolean} Returns `true` if `value` is an `arguments` object,
5945 * else `false`.
5946 * @example
5947 *
5948 * _.isArguments(function() { return arguments; }());
5949 * // => true
5950 *
5951 * _.isArguments([1, 2, 3]);
5952 * // => false
5953 */
5954var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
5955 return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&
5956 !propertyIsEnumerable.call(value, 'callee');
5957};
5958
5959module.exports = isArguments;
5960
5961},{"./_baseIsArguments":48,"./isObjectLike":207}],195:[function(require,module,exports){
5962/**
5963 * Checks if `value` is classified as an `Array` object.
5964 *
5965 * @static
5966 * @memberOf _
5967 * @since 0.1.0
5968 * @category Lang
5969 * @param {*} value The value to check.
5970 * @returns {boolean} Returns `true` if `value` is an array, else `false`.
5971 * @example
5972 *
5973 * _.isArray([1, 2, 3]);
5974 * // => true
5975 *
5976 * _.isArray(document.body.children);
5977 * // => false
5978 *
5979 * _.isArray('abc');
5980 * // => false
5981 *
5982 * _.isArray(_.noop);
5983 * // => false
5984 */
5985var isArray = Array.isArray;
5986
5987module.exports = isArray;
5988
5989},{}],196:[function(require,module,exports){
5990var isFunction = require('./isFunction'),
5991 isLength = require('./isLength');
5992
5993/**
5994 * Checks if `value` is array-like. A value is considered array-like if it's
5995 * not a function and has a `value.length` that's an integer greater than or
5996 * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
5997 *
5998 * @static
5999 * @memberOf _
6000 * @since 4.0.0
6001 * @category Lang
6002 * @param {*} value The value to check.
6003 * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
6004 * @example
6005 *
6006 * _.isArrayLike([1, 2, 3]);
6007 * // => true
6008 *
6009 * _.isArrayLike(document.body.children);
6010 * // => true
6011 *
6012 * _.isArrayLike('abc');
6013 * // => true
6014 *
6015 * _.isArrayLike(_.noop);
6016 * // => false
6017 */
6018function isArrayLike(value) {
6019 return value != null && isLength(value.length) && !isFunction(value);
6020}
6021
6022module.exports = isArrayLike;
6023
6024},{"./isFunction":202,"./isLength":203}],197:[function(require,module,exports){
6025var baseGetTag = require('./_baseGetTag'),
6026 isObjectLike = require('./isObjectLike');
6027
6028/** `Object#toString` result references. */
6029var boolTag = '[object Boolean]';
6030
6031/**
6032 * Checks if `value` is classified as a boolean primitive or object.
6033 *
6034 * @static
6035 * @memberOf _
6036 * @since 0.1.0
6037 * @category Lang
6038 * @param {*} value The value to check.
6039 * @returns {boolean} Returns `true` if `value` is a boolean, else `false`.
6040 * @example
6041 *
6042 * _.isBoolean(false);
6043 * // => true
6044 *
6045 * _.isBoolean(null);
6046 * // => false
6047 */
6048function isBoolean(value) {
6049 return value === true || value === false ||
6050 (isObjectLike(value) && baseGetTag(value) == boolTag);
6051}
6052
6053module.exports = isBoolean;
6054
6055},{"./_baseGetTag":44,"./isObjectLike":207}],198:[function(require,module,exports){
6056var root = require('./_root'),
6057 stubFalse = require('./stubFalse');
6058
6059/** Detect free variable `exports`. */
6060var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
6061
6062/** Detect free variable `module`. */
6063var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
6064
6065/** Detect the popular CommonJS extension `module.exports`. */
6066var moduleExports = freeModule && freeModule.exports === freeExports;
6067
6068/** Built-in value references. */
6069var Buffer = moduleExports ? root.Buffer : undefined;
6070
6071/* Built-in method references for those with the same name as other `lodash` methods. */
6072var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;
6073
6074/**
6075 * Checks if `value` is a buffer.
6076 *
6077 * @static
6078 * @memberOf _
6079 * @since 4.3.0
6080 * @category Lang
6081 * @param {*} value The value to check.
6082 * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
6083 * @example
6084 *
6085 * _.isBuffer(new Buffer(2));
6086 * // => true
6087 *
6088 * _.isBuffer(new Uint8Array(2));
6089 * // => false
6090 */
6091var isBuffer = nativeIsBuffer || stubFalse;
6092
6093module.exports = isBuffer;
6094
6095},{"./_root":151,"./stubFalse":224}],199:[function(require,module,exports){
6096var baseKeys = require('./_baseKeys'),
6097 getTag = require('./_getTag'),
6098 isArguments = require('./isArguments'),
6099 isArray = require('./isArray'),
6100 isArrayLike = require('./isArrayLike'),
6101 isBuffer = require('./isBuffer'),
6102 isPrototype = require('./_isPrototype'),
6103 isTypedArray = require('./isTypedArray');
6104
6105/** `Object#toString` result references. */
6106var mapTag = '[object Map]',
6107 setTag = '[object Set]';
6108
6109/** Used for built-in method references. */
6110var objectProto = Object.prototype;
6111
6112/** Used to check objects for own properties. */
6113var hasOwnProperty = objectProto.hasOwnProperty;
6114
6115/**
6116 * Checks if `value` is an empty object, collection, map, or set.
6117 *
6118 * Objects are considered empty if they have no own enumerable string keyed
6119 * properties.
6120 *
6121 * Array-like values such as `arguments` objects, arrays, buffers, strings, or
6122 * jQuery-like collections are considered empty if they have a `length` of `0`.
6123 * Similarly, maps and sets are considered empty if they have a `size` of `0`.
6124 *
6125 * @static
6126 * @memberOf _
6127 * @since 0.1.0
6128 * @category Lang
6129 * @param {*} value The value to check.
6130 * @returns {boolean} Returns `true` if `value` is empty, else `false`.
6131 * @example
6132 *
6133 * _.isEmpty(null);
6134 * // => true
6135 *
6136 * _.isEmpty(true);
6137 * // => true
6138 *
6139 * _.isEmpty(1);
6140 * // => true
6141 *
6142 * _.isEmpty([1, 2, 3]);
6143 * // => false
6144 *
6145 * _.isEmpty({ 'a': 1 });
6146 * // => false
6147 */
6148function isEmpty(value) {
6149 if (value == null) {
6150 return true;
6151 }
6152 if (isArrayLike(value) &&
6153 (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||
6154 isBuffer(value) || isTypedArray(value) || isArguments(value))) {
6155 return !value.length;
6156 }
6157 var tag = getTag(value);
6158 if (tag == mapTag || tag == setTag) {
6159 return !value.size;
6160 }
6161 if (isPrototype(value)) {
6162 return !baseKeys(value).length;
6163 }
6164 for (var key in value) {
6165 if (hasOwnProperty.call(value, key)) {
6166 return false;
6167 }
6168 }
6169 return true;
6170}
6171
6172module.exports = isEmpty;
6173
6174},{"./_baseKeys":59,"./_getTag":110,"./_isPrototype":127,"./isArguments":194,"./isArray":195,"./isArrayLike":196,"./isBuffer":198,"./isTypedArray":212}],200:[function(require,module,exports){
6175var baseIsEqual = require('./_baseIsEqual');
6176
6177/**
6178 * Performs a deep comparison between two values to determine if they are
6179 * equivalent.
6180 *
6181 * **Note:** This method supports comparing arrays, array buffers, booleans,
6182 * date objects, error objects, maps, numbers, `Object` objects, regexes,
6183 * sets, strings, symbols, and typed arrays. `Object` objects are compared
6184 * by their own, not inherited, enumerable properties. Functions and DOM
6185 * nodes are compared by strict equality, i.e. `===`.
6186 *
6187 * @static
6188 * @memberOf _
6189 * @since 0.1.0
6190 * @category Lang
6191 * @param {*} value The value to compare.
6192 * @param {*} other The other value to compare.
6193 * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
6194 * @example
6195 *
6196 * var object = { 'a': 1 };
6197 * var other = { 'a': 1 };
6198 *
6199 * _.isEqual(object, other);
6200 * // => true
6201 *
6202 * object === other;
6203 * // => false
6204 */
6205function isEqual(value, other) {
6206 return baseIsEqual(value, other);
6207}
6208
6209module.exports = isEqual;
6210
6211},{"./_baseIsEqual":49}],201:[function(require,module,exports){
6212var baseIsEqual = require('./_baseIsEqual');
6213
6214/**
6215 * This method is like `_.isEqual` except that it accepts `customizer` which
6216 * is invoked to compare values. If `customizer` returns `undefined`, comparisons
6217 * are handled by the method instead. The `customizer` is invoked with up to
6218 * six arguments: (objValue, othValue [, index|key, object, other, stack]).
6219 *
6220 * @static
6221 * @memberOf _
6222 * @since 4.0.0
6223 * @category Lang
6224 * @param {*} value The value to compare.
6225 * @param {*} other The other value to compare.
6226 * @param {Function} [customizer] The function to customize comparisons.
6227 * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
6228 * @example
6229 *
6230 * function isGreeting(value) {
6231 * return /^h(?:i|ello)$/.test(value);
6232 * }
6233 *
6234 * function customizer(objValue, othValue) {
6235 * if (isGreeting(objValue) && isGreeting(othValue)) {
6236 * return true;
6237 * }
6238 * }
6239 *
6240 * var array = ['hello', 'goodbye'];
6241 * var other = ['hi', 'goodbye'];
6242 *
6243 * _.isEqualWith(array, other, customizer);
6244 * // => true
6245 */
6246function isEqualWith(value, other, customizer) {
6247 customizer = typeof customizer == 'function' ? customizer : undefined;
6248 var result = customizer ? customizer(value, other) : undefined;
6249 return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result;
6250}
6251
6252module.exports = isEqualWith;
6253
6254},{"./_baseIsEqual":49}],202:[function(require,module,exports){
6255var baseGetTag = require('./_baseGetTag'),
6256 isObject = require('./isObject');
6257
6258/** `Object#toString` result references. */
6259var asyncTag = '[object AsyncFunction]',
6260 funcTag = '[object Function]',
6261 genTag = '[object GeneratorFunction]',
6262 proxyTag = '[object Proxy]';
6263
6264/**
6265 * Checks if `value` is classified as a `Function` object.
6266 *
6267 * @static
6268 * @memberOf _
6269 * @since 0.1.0
6270 * @category Lang
6271 * @param {*} value The value to check.
6272 * @returns {boolean} Returns `true` if `value` is a function, else `false`.
6273 * @example
6274 *
6275 * _.isFunction(_);
6276 * // => true
6277 *
6278 * _.isFunction(/abc/);
6279 * // => false
6280 */
6281function isFunction(value) {
6282 if (!isObject(value)) {
6283 return false;
6284 }
6285 // The use of `Object#toString` avoids issues with the `typeof` operator
6286 // in Safari 9 which returns 'object' for typed arrays and other constructors.
6287 var tag = baseGetTag(value);
6288 return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
6289}
6290
6291module.exports = isFunction;
6292
6293},{"./_baseGetTag":44,"./isObject":206}],203:[function(require,module,exports){
6294/** Used as references for various `Number` constants. */
6295var MAX_SAFE_INTEGER = 9007199254740991;
6296
6297/**
6298 * Checks if `value` is a valid array-like length.
6299 *
6300 * **Note:** This method is loosely based on
6301 * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
6302 *
6303 * @static
6304 * @memberOf _
6305 * @since 4.0.0
6306 * @category Lang
6307 * @param {*} value The value to check.
6308 * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
6309 * @example
6310 *
6311 * _.isLength(3);
6312 * // => true
6313 *
6314 * _.isLength(Number.MIN_VALUE);
6315 * // => false
6316 *
6317 * _.isLength(Infinity);
6318 * // => false
6319 *
6320 * _.isLength('3');
6321 * // => false
6322 */
6323function isLength(value) {
6324 return typeof value == 'number' &&
6325 value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
6326}
6327
6328module.exports = isLength;
6329
6330},{}],204:[function(require,module,exports){
6331var baseIsMap = require('./_baseIsMap'),
6332 baseUnary = require('./_baseUnary'),
6333 nodeUtil = require('./_nodeUtil');
6334
6335/* Node.js helper references. */
6336var nodeIsMap = nodeUtil && nodeUtil.isMap;
6337
6338/**
6339 * Checks if `value` is classified as a `Map` object.
6340 *
6341 * @static
6342 * @memberOf _
6343 * @since 4.3.0
6344 * @category Lang
6345 * @param {*} value The value to check.
6346 * @returns {boolean} Returns `true` if `value` is a map, else `false`.
6347 * @example
6348 *
6349 * _.isMap(new Map);
6350 * // => true
6351 *
6352 * _.isMap(new WeakMap);
6353 * // => false
6354 */
6355var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;
6356
6357module.exports = isMap;
6358
6359},{"./_baseIsMap":51,"./_baseUnary":73,"./_nodeUtil":146}],205:[function(require,module,exports){
6360var baseGetTag = require('./_baseGetTag'),
6361 isObjectLike = require('./isObjectLike');
6362
6363/** `Object#toString` result references. */
6364var numberTag = '[object Number]';
6365
6366/**
6367 * Checks if `value` is classified as a `Number` primitive or object.
6368 *
6369 * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are
6370 * classified as numbers, use the `_.isFinite` method.
6371 *
6372 * @static
6373 * @memberOf _
6374 * @since 0.1.0
6375 * @category Lang
6376 * @param {*} value The value to check.
6377 * @returns {boolean} Returns `true` if `value` is a number, else `false`.
6378 * @example
6379 *
6380 * _.isNumber(3);
6381 * // => true
6382 *
6383 * _.isNumber(Number.MIN_VALUE);
6384 * // => true
6385 *
6386 * _.isNumber(Infinity);
6387 * // => true
6388 *
6389 * _.isNumber('3');
6390 * // => false
6391 */
6392function isNumber(value) {
6393 return typeof value == 'number' ||
6394 (isObjectLike(value) && baseGetTag(value) == numberTag);
6395}
6396
6397module.exports = isNumber;
6398
6399},{"./_baseGetTag":44,"./isObjectLike":207}],206:[function(require,module,exports){
6400/**
6401 * Checks if `value` is the
6402 * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
6403 * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
6404 *
6405 * @static
6406 * @memberOf _
6407 * @since 0.1.0
6408 * @category Lang
6409 * @param {*} value The value to check.
6410 * @returns {boolean} Returns `true` if `value` is an object, else `false`.
6411 * @example
6412 *
6413 * _.isObject({});
6414 * // => true
6415 *
6416 * _.isObject([1, 2, 3]);
6417 * // => true
6418 *
6419 * _.isObject(_.noop);
6420 * // => true
6421 *
6422 * _.isObject(null);
6423 * // => false
6424 */
6425function isObject(value) {
6426 var type = typeof value;
6427 return value != null && (type == 'object' || type == 'function');
6428}
6429
6430module.exports = isObject;
6431
6432},{}],207:[function(require,module,exports){
6433/**
6434 * Checks if `value` is object-like. A value is object-like if it's not `null`
6435 * and has a `typeof` result of "object".
6436 *
6437 * @static
6438 * @memberOf _
6439 * @since 4.0.0
6440 * @category Lang
6441 * @param {*} value The value to check.
6442 * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
6443 * @example
6444 *
6445 * _.isObjectLike({});
6446 * // => true
6447 *
6448 * _.isObjectLike([1, 2, 3]);
6449 * // => true
6450 *
6451 * _.isObjectLike(_.noop);
6452 * // => false
6453 *
6454 * _.isObjectLike(null);
6455 * // => false
6456 */
6457function isObjectLike(value) {
6458 return value != null && typeof value == 'object';
6459}
6460
6461module.exports = isObjectLike;
6462
6463},{}],208:[function(require,module,exports){
6464var baseIsRegExp = require('./_baseIsRegExp'),
6465 baseUnary = require('./_baseUnary'),
6466 nodeUtil = require('./_nodeUtil');
6467
6468/* Node.js helper references. */
6469var nodeIsRegExp = nodeUtil && nodeUtil.isRegExp;
6470
6471/**
6472 * Checks if `value` is classified as a `RegExp` object.
6473 *
6474 * @static
6475 * @memberOf _
6476 * @since 0.1.0
6477 * @category Lang
6478 * @param {*} value The value to check.
6479 * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.
6480 * @example
6481 *
6482 * _.isRegExp(/abc/);
6483 * // => true
6484 *
6485 * _.isRegExp('/abc/');
6486 * // => false
6487 */
6488var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp;
6489
6490module.exports = isRegExp;
6491
6492},{"./_baseIsRegExp":55,"./_baseUnary":73,"./_nodeUtil":146}],209:[function(require,module,exports){
6493var baseIsSet = require('./_baseIsSet'),
6494 baseUnary = require('./_baseUnary'),
6495 nodeUtil = require('./_nodeUtil');
6496
6497/* Node.js helper references. */
6498var nodeIsSet = nodeUtil && nodeUtil.isSet;
6499
6500/**
6501 * Checks if `value` is classified as a `Set` object.
6502 *
6503 * @static
6504 * @memberOf _
6505 * @since 4.3.0
6506 * @category Lang
6507 * @param {*} value The value to check.
6508 * @returns {boolean} Returns `true` if `value` is a set, else `false`.
6509 * @example
6510 *
6511 * _.isSet(new Set);
6512 * // => true
6513 *
6514 * _.isSet(new WeakSet);
6515 * // => false
6516 */
6517var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
6518
6519module.exports = isSet;
6520
6521},{"./_baseIsSet":56,"./_baseUnary":73,"./_nodeUtil":146}],210:[function(require,module,exports){
6522var baseGetTag = require('./_baseGetTag'),
6523 isArray = require('./isArray'),
6524 isObjectLike = require('./isObjectLike');
6525
6526/** `Object#toString` result references. */
6527var stringTag = '[object String]';
6528
6529/**
6530 * Checks if `value` is classified as a `String` primitive or object.
6531 *
6532 * @static
6533 * @since 0.1.0
6534 * @memberOf _
6535 * @category Lang
6536 * @param {*} value The value to check.
6537 * @returns {boolean} Returns `true` if `value` is a string, else `false`.
6538 * @example
6539 *
6540 * _.isString('abc');
6541 * // => true
6542 *
6543 * _.isString(1);
6544 * // => false
6545 */
6546function isString(value) {
6547 return typeof value == 'string' ||
6548 (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);
6549}
6550
6551module.exports = isString;
6552
6553},{"./_baseGetTag":44,"./isArray":195,"./isObjectLike":207}],211:[function(require,module,exports){
6554var baseGetTag = require('./_baseGetTag'),
6555 isObjectLike = require('./isObjectLike');
6556
6557/** `Object#toString` result references. */
6558var symbolTag = '[object Symbol]';
6559
6560/**
6561 * Checks if `value` is classified as a `Symbol` primitive or object.
6562 *
6563 * @static
6564 * @memberOf _
6565 * @since 4.0.0
6566 * @category Lang
6567 * @param {*} value The value to check.
6568 * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
6569 * @example
6570 *
6571 * _.isSymbol(Symbol.iterator);
6572 * // => true
6573 *
6574 * _.isSymbol('abc');
6575 * // => false
6576 */
6577function isSymbol(value) {
6578 return typeof value == 'symbol' ||
6579 (isObjectLike(value) && baseGetTag(value) == symbolTag);
6580}
6581
6582module.exports = isSymbol;
6583
6584},{"./_baseGetTag":44,"./isObjectLike":207}],212:[function(require,module,exports){
6585var baseIsTypedArray = require('./_baseIsTypedArray'),
6586 baseUnary = require('./_baseUnary'),
6587 nodeUtil = require('./_nodeUtil');
6588
6589/* Node.js helper references. */
6590var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
6591
6592/**
6593 * Checks if `value` is classified as a typed array.
6594 *
6595 * @static
6596 * @memberOf _
6597 * @since 3.0.0
6598 * @category Lang
6599 * @param {*} value The value to check.
6600 * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
6601 * @example
6602 *
6603 * _.isTypedArray(new Uint8Array);
6604 * // => true
6605 *
6606 * _.isTypedArray([]);
6607 * // => false
6608 */
6609var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
6610
6611module.exports = isTypedArray;
6612
6613},{"./_baseIsTypedArray":57,"./_baseUnary":73,"./_nodeUtil":146}],213:[function(require,module,exports){
6614var arrayLikeKeys = require('./_arrayLikeKeys'),
6615 baseKeys = require('./_baseKeys'),
6616 isArrayLike = require('./isArrayLike');
6617
6618/**
6619 * Creates an array of the own enumerable property names of `object`.
6620 *
6621 * **Note:** Non-object values are coerced to objects. See the
6622 * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
6623 * for more details.
6624 *
6625 * @static
6626 * @since 0.1.0
6627 * @memberOf _
6628 * @category Object
6629 * @param {Object} object The object to query.
6630 * @returns {Array} Returns the array of property names.
6631 * @example
6632 *
6633 * function Foo() {
6634 * this.a = 1;
6635 * this.b = 2;
6636 * }
6637 *
6638 * Foo.prototype.c = 3;
6639 *
6640 * _.keys(new Foo);
6641 * // => ['a', 'b'] (iteration order is not guaranteed)
6642 *
6643 * _.keys('hi');
6644 * // => ['0', '1']
6645 */
6646function keys(object) {
6647 return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
6648}
6649
6650module.exports = keys;
6651
6652},{"./_arrayLikeKeys":21,"./_baseKeys":59,"./isArrayLike":196}],214:[function(require,module,exports){
6653var arrayLikeKeys = require('./_arrayLikeKeys'),
6654 baseKeysIn = require('./_baseKeysIn'),
6655 isArrayLike = require('./isArrayLike');
6656
6657/**
6658 * Creates an array of the own and inherited enumerable property names of `object`.
6659 *
6660 * **Note:** Non-object values are coerced to objects.
6661 *
6662 * @static
6663 * @memberOf _
6664 * @since 3.0.0
6665 * @category Object
6666 * @param {Object} object The object to query.
6667 * @returns {Array} Returns the array of property names.
6668 * @example
6669 *
6670 * function Foo() {
6671 * this.a = 1;
6672 * this.b = 2;
6673 * }
6674 *
6675 * Foo.prototype.c = 3;
6676 *
6677 * _.keysIn(new Foo);
6678 * // => ['a', 'b', 'c'] (iteration order is not guaranteed)
6679 */
6680function keysIn(object) {
6681 return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
6682}
6683
6684module.exports = keysIn;
6685
6686},{"./_arrayLikeKeys":21,"./_baseKeysIn":60,"./isArrayLike":196}],215:[function(require,module,exports){
6687/**
6688 * Gets the last element of `array`.
6689 *
6690 * @static
6691 * @memberOf _
6692 * @since 0.1.0
6693 * @category Array
6694 * @param {Array} array The array to query.
6695 * @returns {*} Returns the last element of `array`.
6696 * @example
6697 *
6698 * _.last([1, 2, 3]);
6699 * // => 3
6700 */
6701function last(array) {
6702 var length = array == null ? 0 : array.length;
6703 return length ? array[length - 1] : undefined;
6704}
6705
6706module.exports = last;
6707
6708},{}],216:[function(require,module,exports){
6709var arrayMap = require('./_arrayMap'),
6710 baseIteratee = require('./_baseIteratee'),
6711 baseMap = require('./_baseMap'),
6712 isArray = require('./isArray');
6713
6714/**
6715 * Creates an array of values by running each element in `collection` thru
6716 * `iteratee`. The iteratee is invoked with three arguments:
6717 * (value, index|key, collection).
6718 *
6719 * Many lodash methods are guarded to work as iteratees for methods like
6720 * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.
6721 *
6722 * The guarded methods are:
6723 * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,
6724 * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,
6725 * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,
6726 * `template`, `trim`, `trimEnd`, `trimStart`, and `words`
6727 *
6728 * @static
6729 * @memberOf _
6730 * @since 0.1.0
6731 * @category Collection
6732 * @param {Array|Object} collection The collection to iterate over.
6733 * @param {Function} [iteratee=_.identity] The function invoked per iteration.
6734 * @returns {Array} Returns the new mapped array.
6735 * @example
6736 *
6737 * function square(n) {
6738 * return n * n;
6739 * }
6740 *
6741 * _.map([4, 8], square);
6742 * // => [16, 64]
6743 *
6744 * _.map({ 'a': 4, 'b': 8 }, square);
6745 * // => [16, 64] (iteration order is not guaranteed)
6746 *
6747 * var users = [
6748 * { 'user': 'barney' },
6749 * { 'user': 'fred' }
6750 * ];
6751 *
6752 * // The `_.property` iteratee shorthand.
6753 * _.map(users, 'user');
6754 * // => ['barney', 'fred']
6755 */
6756function map(collection, iteratee) {
6757 var func = isArray(collection) ? arrayMap : baseMap;
6758 return func(collection, baseIteratee(iteratee, 3));
6759}
6760
6761module.exports = map;
6762
6763},{"./_arrayMap":22,"./_baseIteratee":58,"./_baseMap":61,"./isArray":195}],217:[function(require,module,exports){
6764var MapCache = require('./_MapCache');
6765
6766/** Error message constants. */
6767var FUNC_ERROR_TEXT = 'Expected a function';
6768
6769/**
6770 * Creates a function that memoizes the result of `func`. If `resolver` is
6771 * provided, it determines the cache key for storing the result based on the
6772 * arguments provided to the memoized function. By default, the first argument
6773 * provided to the memoized function is used as the map cache key. The `func`
6774 * is invoked with the `this` binding of the memoized function.
6775 *
6776 * **Note:** The cache is exposed as the `cache` property on the memoized
6777 * function. Its creation may be customized by replacing the `_.memoize.Cache`
6778 * constructor with one whose instances implement the
6779 * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
6780 * method interface of `clear`, `delete`, `get`, `has`, and `set`.
6781 *
6782 * @static
6783 * @memberOf _
6784 * @since 0.1.0
6785 * @category Function
6786 * @param {Function} func The function to have its output memoized.
6787 * @param {Function} [resolver] The function to resolve the cache key.
6788 * @returns {Function} Returns the new memoized function.
6789 * @example
6790 *
6791 * var object = { 'a': 1, 'b': 2 };
6792 * var other = { 'c': 3, 'd': 4 };
6793 *
6794 * var values = _.memoize(_.values);
6795 * values(object);
6796 * // => [1, 2]
6797 *
6798 * values(other);
6799 * // => [3, 4]
6800 *
6801 * object.a = 2;
6802 * values(object);
6803 * // => [1, 2]
6804 *
6805 * // Modify the result cache.
6806 * values.cache.set(object, ['a', 'b']);
6807 * values(object);
6808 * // => ['a', 'b']
6809 *
6810 * // Replace `_.memoize.Cache`.
6811 * _.memoize.Cache = WeakMap;
6812 */
6813function memoize(func, resolver) {
6814 if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
6815 throw new TypeError(FUNC_ERROR_TEXT);
6816 }
6817 var memoized = function() {
6818 var args = arguments,
6819 key = resolver ? resolver.apply(this, args) : args[0],
6820 cache = memoized.cache;
6821
6822 if (cache.has(key)) {
6823 return cache.get(key);
6824 }
6825 var result = func.apply(this, args);
6826 memoized.cache = cache.set(key, result) || cache;
6827 return result;
6828 };
6829 memoized.cache = new (memoize.Cache || MapCache);
6830 return memoized;
6831}
6832
6833// Expose `MapCache`.
6834memoize.Cache = MapCache;
6835
6836module.exports = memoize;
6837
6838},{"./_MapCache":8}],218:[function(require,module,exports){
6839/** Error message constants. */
6840var FUNC_ERROR_TEXT = 'Expected a function';
6841
6842/**
6843 * Creates a function that negates the result of the predicate `func`. The
6844 * `func` predicate is invoked with the `this` binding and arguments of the
6845 * created function.
6846 *
6847 * @static
6848 * @memberOf _
6849 * @since 3.0.0
6850 * @category Function
6851 * @param {Function} predicate The predicate to negate.
6852 * @returns {Function} Returns the new negated function.
6853 * @example
6854 *
6855 * function isEven(n) {
6856 * return n % 2 == 0;
6857 * }
6858 *
6859 * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));
6860 * // => [1, 3, 5]
6861 */
6862function negate(predicate) {
6863 if (typeof predicate != 'function') {
6864 throw new TypeError(FUNC_ERROR_TEXT);
6865 }
6866 return function() {
6867 var args = arguments;
6868 switch (args.length) {
6869 case 0: return !predicate.call(this);
6870 case 1: return !predicate.call(this, args[0]);
6871 case 2: return !predicate.call(this, args[0], args[1]);
6872 case 3: return !predicate.call(this, args[0], args[1], args[2]);
6873 }
6874 return !predicate.apply(this, args);
6875 };
6876}
6877
6878module.exports = negate;
6879
6880},{}],219:[function(require,module,exports){
6881var baseProperty = require('./_baseProperty'),
6882 basePropertyDeep = require('./_basePropertyDeep'),
6883 isKey = require('./_isKey'),
6884 toKey = require('./_toKey');
6885
6886/**
6887 * Creates a function that returns the value at `path` of a given object.
6888 *
6889 * @static
6890 * @memberOf _
6891 * @since 2.4.0
6892 * @category Util
6893 * @param {Array|string} path The path of the property to get.
6894 * @returns {Function} Returns the new accessor function.
6895 * @example
6896 *
6897 * var objects = [
6898 * { 'a': { 'b': 2 } },
6899 * { 'a': { 'b': 1 } }
6900 * ];
6901 *
6902 * _.map(objects, _.property('a.b'));
6903 * // => [2, 1]
6904 *
6905 * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');
6906 * // => [1, 2]
6907 */
6908function property(path) {
6909 return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
6910}
6911
6912module.exports = property;
6913
6914},{"./_baseProperty":64,"./_basePropertyDeep":65,"./_isKey":124,"./_toKey":165}],220:[function(require,module,exports){
6915var arrayReduce = require('./_arrayReduce'),
6916 baseEach = require('./_baseEach'),
6917 baseIteratee = require('./_baseIteratee'),
6918 baseReduce = require('./_baseReduce'),
6919 isArray = require('./isArray');
6920
6921/**
6922 * Reduces `collection` to a value which is the accumulated result of running
6923 * each element in `collection` thru `iteratee`, where each successive
6924 * invocation is supplied the return value of the previous. If `accumulator`
6925 * is not given, the first element of `collection` is used as the initial
6926 * value. The iteratee is invoked with four arguments:
6927 * (accumulator, value, index|key, collection).
6928 *
6929 * Many lodash methods are guarded to work as iteratees for methods like
6930 * `_.reduce`, `_.reduceRight`, and `_.transform`.
6931 *
6932 * The guarded methods are:
6933 * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,
6934 * and `sortBy`
6935 *
6936 * @static
6937 * @memberOf _
6938 * @since 0.1.0
6939 * @category Collection
6940 * @param {Array|Object} collection The collection to iterate over.
6941 * @param {Function} [iteratee=_.identity] The function invoked per iteration.
6942 * @param {*} [accumulator] The initial value.
6943 * @returns {*} Returns the accumulated value.
6944 * @see _.reduceRight
6945 * @example
6946 *
6947 * _.reduce([1, 2], function(sum, n) {
6948 * return sum + n;
6949 * }, 0);
6950 * // => 3
6951 *
6952 * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
6953 * (result[value] || (result[value] = [])).push(key);
6954 * return result;
6955 * }, {});
6956 * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)
6957 */
6958function reduce(collection, iteratee, accumulator) {
6959 var func = isArray(collection) ? arrayReduce : baseReduce,
6960 initAccum = arguments.length < 3;
6961
6962 return func(collection, baseIteratee(iteratee, 4), accumulator, initAccum, baseEach);
6963}
6964
6965module.exports = reduce;
6966
6967},{"./_arrayReduce":24,"./_baseEach":36,"./_baseIteratee":58,"./_baseReduce":66,"./isArray":195}],221:[function(require,module,exports){
6968var arrayFilter = require('./_arrayFilter'),
6969 baseFilter = require('./_baseFilter'),
6970 baseIteratee = require('./_baseIteratee'),
6971 isArray = require('./isArray'),
6972 negate = require('./negate');
6973
6974/**
6975 * The opposite of `_.filter`; this method returns the elements of `collection`
6976 * that `predicate` does **not** return truthy for.
6977 *
6978 * @static
6979 * @memberOf _
6980 * @since 0.1.0
6981 * @category Collection
6982 * @param {Array|Object} collection The collection to iterate over.
6983 * @param {Function} [predicate=_.identity] The function invoked per iteration.
6984 * @returns {Array} Returns the new filtered array.
6985 * @see _.filter
6986 * @example
6987 *
6988 * var users = [
6989 * { 'user': 'barney', 'age': 36, 'active': false },
6990 * { 'user': 'fred', 'age': 40, 'active': true }
6991 * ];
6992 *
6993 * _.reject(users, function(o) { return !o.active; });
6994 * // => objects for ['fred']
6995 *
6996 * // The `_.matches` iteratee shorthand.
6997 * _.reject(users, { 'age': 40, 'active': true });
6998 * // => objects for ['barney']
6999 *
7000 * // The `_.matchesProperty` iteratee shorthand.
7001 * _.reject(users, ['active', false]);
7002 * // => objects for ['fred']
7003 *
7004 * // The `_.property` iteratee shorthand.
7005 * _.reject(users, 'active');
7006 * // => objects for ['barney']
7007 */
7008function reject(collection, predicate) {
7009 var func = isArray(collection) ? arrayFilter : baseFilter;
7010 return func(collection, negate(baseIteratee(predicate, 3)));
7011}
7012
7013module.exports = reject;
7014
7015},{"./_arrayFilter":20,"./_baseFilter":38,"./_baseIteratee":58,"./isArray":195,"./negate":218}],222:[function(require,module,exports){
7016var arraySome = require('./_arraySome'),
7017 baseIteratee = require('./_baseIteratee'),
7018 baseSome = require('./_baseSome'),
7019 isArray = require('./isArray'),
7020 isIterateeCall = require('./_isIterateeCall');
7021
7022/**
7023 * Checks if `predicate` returns truthy for **any** element of `collection`.
7024 * Iteration is stopped once `predicate` returns truthy. The predicate is
7025 * invoked with three arguments: (value, index|key, collection).
7026 *
7027 * @static
7028 * @memberOf _
7029 * @since 0.1.0
7030 * @category Collection
7031 * @param {Array|Object} collection The collection to iterate over.
7032 * @param {Function} [predicate=_.identity] The function invoked per iteration.
7033 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
7034 * @returns {boolean} Returns `true` if any element passes the predicate check,
7035 * else `false`.
7036 * @example
7037 *
7038 * _.some([null, 0, 'yes', false], Boolean);
7039 * // => true
7040 *
7041 * var users = [
7042 * { 'user': 'barney', 'active': true },
7043 * { 'user': 'fred', 'active': false }
7044 * ];
7045 *
7046 * // The `_.matches` iteratee shorthand.
7047 * _.some(users, { 'user': 'barney', 'active': false });
7048 * // => false
7049 *
7050 * // The `_.matchesProperty` iteratee shorthand.
7051 * _.some(users, ['active', false]);
7052 * // => true
7053 *
7054 * // The `_.property` iteratee shorthand.
7055 * _.some(users, 'active');
7056 * // => true
7057 */
7058function some(collection, predicate, guard) {
7059 var func = isArray(collection) ? arraySome : baseSome;
7060 if (guard && isIterateeCall(collection, predicate, guard)) {
7061 predicate = undefined;
7062 }
7063 return func(collection, baseIteratee(predicate, 3));
7064}
7065
7066module.exports = some;
7067
7068},{"./_arraySome":25,"./_baseIteratee":58,"./_baseSome":70,"./_isIterateeCall":123,"./isArray":195}],223:[function(require,module,exports){
7069/**
7070 * This method returns a new empty array.
7071 *
7072 * @static
7073 * @memberOf _
7074 * @since 4.13.0
7075 * @category Util
7076 * @returns {Array} Returns the new empty array.
7077 * @example
7078 *
7079 * var arrays = _.times(2, _.stubArray);
7080 *
7081 * console.log(arrays);
7082 * // => [[], []]
7083 *
7084 * console.log(arrays[0] === arrays[1]);
7085 * // => false
7086 */
7087function stubArray() {
7088 return [];
7089}
7090
7091module.exports = stubArray;
7092
7093},{}],224:[function(require,module,exports){
7094/**
7095 * This method returns `false`.
7096 *
7097 * @static
7098 * @memberOf _
7099 * @since 4.13.0
7100 * @category Util
7101 * @returns {boolean} Returns `false`.
7102 * @example
7103 *
7104 * _.times(2, _.stubFalse);
7105 * // => [false, false]
7106 */
7107function stubFalse() {
7108 return false;
7109}
7110
7111module.exports = stubFalse;
7112
7113},{}],225:[function(require,module,exports){
7114/**
7115 * This method invokes `interceptor` and returns `value`. The interceptor
7116 * is invoked with one argument; (value). The purpose of this method is to
7117 * "tap into" a method chain sequence in order to modify intermediate results.
7118 *
7119 * @static
7120 * @memberOf _
7121 * @since 0.1.0
7122 * @category Seq
7123 * @param {*} value The value to provide to `interceptor`.
7124 * @param {Function} interceptor The function to invoke.
7125 * @returns {*} Returns `value`.
7126 * @example
7127 *
7128 * _([1, 2, 3])
7129 * .tap(function(array) {
7130 * // Mutate input array.
7131 * array.pop();
7132 * })
7133 * .reverse()
7134 * .value();
7135 * // => [2, 1]
7136 */
7137function tap(value, interceptor) {
7138 interceptor(value);
7139 return value;
7140}
7141
7142module.exports = tap;
7143
7144},{}],226:[function(require,module,exports){
7145var Symbol = require('./_Symbol'),
7146 copyArray = require('./_copyArray'),
7147 getTag = require('./_getTag'),
7148 isArrayLike = require('./isArrayLike'),
7149 isString = require('./isString'),
7150 iteratorToArray = require('./_iteratorToArray'),
7151 mapToArray = require('./_mapToArray'),
7152 setToArray = require('./_setToArray'),
7153 stringToArray = require('./_stringToArray'),
7154 values = require('./values');
7155
7156/** `Object#toString` result references. */
7157var mapTag = '[object Map]',
7158 setTag = '[object Set]';
7159
7160/** Built-in value references. */
7161var symIterator = Symbol ? Symbol.iterator : undefined;
7162
7163/**
7164 * Converts `value` to an array.
7165 *
7166 * @static
7167 * @since 0.1.0
7168 * @memberOf _
7169 * @category Lang
7170 * @param {*} value The value to convert.
7171 * @returns {Array} Returns the converted array.
7172 * @example
7173 *
7174 * _.toArray({ 'a': 1, 'b': 2 });
7175 * // => [1, 2]
7176 *
7177 * _.toArray('abc');
7178 * // => ['a', 'b', 'c']
7179 *
7180 * _.toArray(1);
7181 * // => []
7182 *
7183 * _.toArray(null);
7184 * // => []
7185 */
7186function toArray(value) {
7187 if (!value) {
7188 return [];
7189 }
7190 if (isArrayLike(value)) {
7191 return isString(value) ? stringToArray(value) : copyArray(value);
7192 }
7193 if (symIterator && value[symIterator]) {
7194 return iteratorToArray(value[symIterator]());
7195 }
7196 var tag = getTag(value),
7197 func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values);
7198
7199 return func(value);
7200}
7201
7202module.exports = toArray;
7203
7204},{"./_Symbol":13,"./_copyArray":85,"./_getTag":110,"./_iteratorToArray":129,"./_mapToArray":140,"./_setToArray":154,"./_stringToArray":163,"./isArrayLike":196,"./isString":210,"./values":233}],227:[function(require,module,exports){
7205var toNumber = require('./toNumber');
7206
7207/** Used as references for various `Number` constants. */
7208var INFINITY = 1 / 0,
7209 MAX_INTEGER = 1.7976931348623157e+308;
7210
7211/**
7212 * Converts `value` to a finite number.
7213 *
7214 * @static
7215 * @memberOf _
7216 * @since 4.12.0
7217 * @category Lang
7218 * @param {*} value The value to convert.
7219 * @returns {number} Returns the converted number.
7220 * @example
7221 *
7222 * _.toFinite(3.2);
7223 * // => 3.2
7224 *
7225 * _.toFinite(Number.MIN_VALUE);
7226 * // => 5e-324
7227 *
7228 * _.toFinite(Infinity);
7229 * // => 1.7976931348623157e+308
7230 *
7231 * _.toFinite('3.2');
7232 * // => 3.2
7233 */
7234function toFinite(value) {
7235 if (!value) {
7236 return value === 0 ? value : 0;
7237 }
7238 value = toNumber(value);
7239 if (value === INFINITY || value === -INFINITY) {
7240 var sign = (value < 0 ? -1 : 1);
7241 return sign * MAX_INTEGER;
7242 }
7243 return value === value ? value : 0;
7244}
7245
7246module.exports = toFinite;
7247
7248},{"./toNumber":229}],228:[function(require,module,exports){
7249var toFinite = require('./toFinite');
7250
7251/**
7252 * Converts `value` to an integer.
7253 *
7254 * **Note:** This method is loosely based on
7255 * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).
7256 *
7257 * @static
7258 * @memberOf _
7259 * @since 4.0.0
7260 * @category Lang
7261 * @param {*} value The value to convert.
7262 * @returns {number} Returns the converted integer.
7263 * @example
7264 *
7265 * _.toInteger(3.2);
7266 * // => 3
7267 *
7268 * _.toInteger(Number.MIN_VALUE);
7269 * // => 0
7270 *
7271 * _.toInteger(Infinity);
7272 * // => 1.7976931348623157e+308
7273 *
7274 * _.toInteger('3.2');
7275 * // => 3
7276 */
7277function toInteger(value) {
7278 var result = toFinite(value),
7279 remainder = result % 1;
7280
7281 return result === result ? (remainder ? result - remainder : result) : 0;
7282}
7283
7284module.exports = toInteger;
7285
7286},{"./toFinite":227}],229:[function(require,module,exports){
7287var isObject = require('./isObject'),
7288 isSymbol = require('./isSymbol');
7289
7290/** Used as references for various `Number` constants. */
7291var NAN = 0 / 0;
7292
7293/** Used to match leading and trailing whitespace. */
7294var reTrim = /^\s+|\s+$/g;
7295
7296/** Used to detect bad signed hexadecimal string values. */
7297var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
7298
7299/** Used to detect binary string values. */
7300var reIsBinary = /^0b[01]+$/i;
7301
7302/** Used to detect octal string values. */
7303var reIsOctal = /^0o[0-7]+$/i;
7304
7305/** Built-in method references without a dependency on `root`. */
7306var freeParseInt = parseInt;
7307
7308/**
7309 * Converts `value` to a number.
7310 *
7311 * @static
7312 * @memberOf _
7313 * @since 4.0.0
7314 * @category Lang
7315 * @param {*} value The value to process.
7316 * @returns {number} Returns the number.
7317 * @example
7318 *
7319 * _.toNumber(3.2);
7320 * // => 3.2
7321 *
7322 * _.toNumber(Number.MIN_VALUE);
7323 * // => 5e-324
7324 *
7325 * _.toNumber(Infinity);
7326 * // => Infinity
7327 *
7328 * _.toNumber('3.2');
7329 * // => 3.2
7330 */
7331function toNumber(value) {
7332 if (typeof value == 'number') {
7333 return value;
7334 }
7335 if (isSymbol(value)) {
7336 return NAN;
7337 }
7338 if (isObject(value)) {
7339 var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
7340 value = isObject(other) ? (other + '') : other;
7341 }
7342 if (typeof value != 'string') {
7343 return value === 0 ? value : +value;
7344 }
7345 value = value.replace(reTrim, '');
7346 var isBinary = reIsBinary.test(value);
7347 return (isBinary || reIsOctal.test(value))
7348 ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
7349 : (reIsBadHex.test(value) ? NAN : +value);
7350}
7351
7352module.exports = toNumber;
7353
7354},{"./isObject":206,"./isSymbol":211}],230:[function(require,module,exports){
7355var baseToString = require('./_baseToString');
7356
7357/**
7358 * Converts `value` to a string. An empty string is returned for `null`
7359 * and `undefined` values. The sign of `-0` is preserved.
7360 *
7361 * @static
7362 * @memberOf _
7363 * @since 4.0.0
7364 * @category Lang
7365 * @param {*} value The value to convert.
7366 * @returns {string} Returns the converted string.
7367 * @example
7368 *
7369 * _.toString(null);
7370 * // => ''
7371 *
7372 * _.toString(-0);
7373 * // => '-0'
7374 *
7375 * _.toString([1, 2, 3]);
7376 * // => '1,2,3'
7377 */
7378function toString(value) {
7379 return value == null ? '' : baseToString(value);
7380}
7381
7382module.exports = toString;
7383
7384},{"./_baseToString":72}],231:[function(require,module,exports){
7385var arrayEach = require('./_arrayEach'),
7386 baseCreate = require('./_baseCreate'),
7387 baseForOwn = require('./_baseForOwn'),
7388 baseIteratee = require('./_baseIteratee'),
7389 getPrototype = require('./_getPrototype'),
7390 isArray = require('./isArray'),
7391 isBuffer = require('./isBuffer'),
7392 isFunction = require('./isFunction'),
7393 isObject = require('./isObject'),
7394 isTypedArray = require('./isTypedArray');
7395
7396/**
7397 * An alternative to `_.reduce`; this method transforms `object` to a new
7398 * `accumulator` object which is the result of running each of its own
7399 * enumerable string keyed properties thru `iteratee`, with each invocation
7400 * potentially mutating the `accumulator` object. If `accumulator` is not
7401 * provided, a new object with the same `[[Prototype]]` will be used. The
7402 * iteratee is invoked with four arguments: (accumulator, value, key, object).
7403 * Iteratee functions may exit iteration early by explicitly returning `false`.
7404 *
7405 * @static
7406 * @memberOf _
7407 * @since 1.3.0
7408 * @category Object
7409 * @param {Object} object The object to iterate over.
7410 * @param {Function} [iteratee=_.identity] The function invoked per iteration.
7411 * @param {*} [accumulator] The custom accumulator value.
7412 * @returns {*} Returns the accumulated value.
7413 * @example
7414 *
7415 * _.transform([2, 3, 4], function(result, n) {
7416 * result.push(n *= n);
7417 * return n % 2 == 0;
7418 * }, []);
7419 * // => [4, 9]
7420 *
7421 * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
7422 * (result[value] || (result[value] = [])).push(key);
7423 * }, {});
7424 * // => { '1': ['a', 'c'], '2': ['b'] }
7425 */
7426function transform(object, iteratee, accumulator) {
7427 var isArr = isArray(object),
7428 isArrLike = isArr || isBuffer(object) || isTypedArray(object);
7429
7430 iteratee = baseIteratee(iteratee, 4);
7431 if (accumulator == null) {
7432 var Ctor = object && object.constructor;
7433 if (isArrLike) {
7434 accumulator = isArr ? new Ctor : [];
7435 }
7436 else if (isObject(object)) {
7437 accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {};
7438 }
7439 else {
7440 accumulator = {};
7441 }
7442 }
7443 (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) {
7444 return iteratee(accumulator, value, index, object);
7445 });
7446 return accumulator;
7447}
7448
7449module.exports = transform;
7450
7451},{"./_arrayEach":18,"./_baseCreate":34,"./_baseForOwn":41,"./_baseIteratee":58,"./_getPrototype":106,"./isArray":195,"./isBuffer":198,"./isFunction":202,"./isObject":206,"./isTypedArray":212}],232:[function(require,module,exports){
7452var createCaseFirst = require('./_createCaseFirst');
7453
7454/**
7455 * Converts the first character of `string` to upper case.
7456 *
7457 * @static
7458 * @memberOf _
7459 * @since 4.0.0
7460 * @category String
7461 * @param {string} [string=''] The string to convert.
7462 * @returns {string} Returns the converted string.
7463 * @example
7464 *
7465 * _.upperFirst('fred');
7466 * // => 'Fred'
7467 *
7468 * _.upperFirst('FRED');
7469 * // => 'FRED'
7470 */
7471var upperFirst = createCaseFirst('toUpperCase');
7472
7473module.exports = upperFirst;
7474
7475},{"./_createCaseFirst":94}],233:[function(require,module,exports){
7476var baseValues = require('./_baseValues'),
7477 keys = require('./keys');
7478
7479/**
7480 * Creates an array of the own enumerable string keyed property values of `object`.
7481 *
7482 * **Note:** Non-object values are coerced to objects.
7483 *
7484 * @static
7485 * @since 0.1.0
7486 * @memberOf _
7487 * @category Object
7488 * @param {Object} object The object to query.
7489 * @returns {Array} Returns the array of property values.
7490 * @example
7491 *
7492 * function Foo() {
7493 * this.a = 1;
7494 * this.b = 2;
7495 * }
7496 *
7497 * Foo.prototype.c = 3;
7498 *
7499 * _.values(new Foo);
7500 * // => [1, 2] (iteration order is not guaranteed)
7501 *
7502 * _.values('hi');
7503 * // => ['h', 'i']
7504 */
7505function values(object) {
7506 return object == null ? [] : baseValues(object, keys(object));
7507}
7508
7509module.exports = values;
7510
7511},{"./_baseValues":74,"./keys":213}],234:[function(require,module,exports){
7512'use strict';
7513var isRegexp = require('is-regexp');
7514var isPlainObj = require('is-plain-obj');
7515
7516module.exports = function (val, opts, pad) {
7517 var seen = [];
7518
7519 return (function stringify(val, opts, pad) {
7520 opts = opts || {};
7521 opts.indent = opts.indent || '\t';
7522 pad = pad || '';
7523 var tokens;
7524 if(opts.inlineCharacterLimit == void 0) {
7525 tokens = {
7526 newLine: '\n',
7527 newLineOrSpace: '\n',
7528 pad: pad,
7529 indent: pad + opts.indent
7530 };
7531 } else {
7532 tokens = {
7533 newLine: '@@__STRINGIFY_OBJECT_NEW_LINE__@@',
7534 newLineOrSpace: '@@__STRINGIFY_OBJECT_NEW_LINE_OR_SPACE__@@',
7535 pad: '@@__STRINGIFY_OBJECT_PAD__@@',
7536 indent: '@@__STRINGIFY_OBJECT_INDENT__@@'
7537 }
7538 }
7539 var expandWhiteSpace = function(string) {
7540 if (opts.inlineCharacterLimit == void 0) { return string; }
7541 var oneLined = string.
7542 replace(new RegExp(tokens.newLine, 'g'), '').
7543 replace(new RegExp(tokens.newLineOrSpace, 'g'), ' ').
7544 replace(new RegExp(tokens.pad + '|' + tokens.indent, 'g'), '');
7545
7546 if(oneLined.length <= opts.inlineCharacterLimit) {
7547 return oneLined;
7548 } else {
7549 return string.
7550 replace(new RegExp(tokens.newLine + '|' + tokens.newLineOrSpace, 'g'), '\n').
7551 replace(new RegExp(tokens.pad, 'g'), pad).
7552 replace(new RegExp(tokens.indent, 'g'), pad + opts.indent);
7553 }
7554 };
7555
7556 if (seen.indexOf(val) !== -1) {
7557 return '"[Circular]"';
7558 }
7559
7560 if (val === null ||
7561 val === undefined ||
7562 typeof val === 'number' ||
7563 typeof val === 'boolean' ||
7564 typeof val === 'function' ||
7565 isRegexp(val)) {
7566 return String(val);
7567 }
7568
7569 if (val instanceof Date) {
7570 return 'new Date(\'' + val.toISOString() + '\')';
7571 }
7572
7573 if (Array.isArray(val)) {
7574 if (val.length === 0) {
7575 return '[]';
7576 }
7577
7578 seen.push(val);
7579
7580 var ret = '[' + tokens.newLine + val.map(function (el, i) {
7581 var eol = val.length - 1 === i ? tokens.newLine : ',' + tokens.newLineOrSpace;
7582 var value = stringify(el, opts, pad + opts.indent);
7583 if (opts.transform) {
7584 value = opts.transform(val, i, value);
7585 }
7586 return tokens.indent + value + eol;
7587 }).join('') + tokens.pad + ']';
7588
7589 seen.pop(val);
7590
7591 return expandWhiteSpace(ret);
7592 }
7593
7594 if (isPlainObj(val)) {
7595 var objKeys = Object.keys(val);
7596
7597 if (objKeys.length === 0) {
7598 return '{}';
7599 }
7600
7601 seen.push(val);
7602
7603 var ret = '{' + tokens.newLine + objKeys.map(function (el, i) {
7604 if (opts.filter && !opts.filter(val, el)) {
7605 return '';
7606 }
7607
7608 var eol = objKeys.length - 1 === i ? tokens.newLine : ',' + tokens.newLineOrSpace;
7609 var key = /^[a-z$_][a-z$_0-9]*$/i.test(el) ? el : stringify(el, opts);
7610 var value = stringify(val[el], opts, pad + opts.indent);
7611 if (opts.transform) {
7612 value = opts.transform(val, el, value);
7613 }
7614 return tokens.indent + String(key) + ': ' + value + eol;
7615 }).join('') + tokens.pad + '}';
7616
7617 seen.pop(val);
7618
7619 return expandWhiteSpace(ret);
7620 }
7621
7622 val = String(val).replace(/[\r\n]/g, function (x) {
7623 return x === '\n' ? '\\n' : '\\r';
7624 });
7625
7626 if (opts.singleQuotes === false) {
7627 return '"' + val.replace(/"/g, '\\\"') + '"';
7628 }
7629
7630 return '\'' + val.replace(/'/g, '\\\'') + '\'';
7631 })(val, opts, pad);
7632};
7633
7634},{"is-plain-obj":2,"is-regexp":3}],235:[function(require,module,exports){
7635module.exports = function theredoc (strings, ...values) {
7636 const lines = withoutLeadingAndTrailingBlankLines(
7637 zipString(strings, values).split('\n')
7638 )
7639 return stripIndent(lines, smallestIndent(lines)).join('\n')
7640}
7641
7642function zipString (strings, values) {
7643 let s = ''
7644 strings.forEach((string, i) => {
7645 s += string + (values[i] || '')
7646 })
7647 return s
7648}
7649
7650function smallestIndent (lines) {
7651 let smallest = null
7652 lines.forEach(line => {
7653 const indent = line.search(/[^ ]/)
7654 if (indent !== -1 && (smallest === null || indent < smallest)) {
7655 smallest = indent
7656 }
7657 })
7658 return smallest
7659}
7660
7661function stripIndent (lines, spacesToStrip) {
7662 const findIndent = new RegExp(`^ {${spacesToStrip}}`)
7663 return lines.map(line => {
7664 if (findIndent.test(line)) {
7665 return line.replace(findIndent, '')
7666 } else {
7667 return line
7668 }
7669 })
7670}
7671
7672// Written verbosely to avoid the cost of slice (array copy) if unnecessary
7673function withoutLeadingAndTrailingBlankLines (lines) {
7674 const leadingBlankLine = isWhitespace(lines[0])
7675 const trailingBlankLine = isWhitespace(lines[lines.length - 1])
7676 if (leadingBlankLine || trailingBlankLine) {
7677 return lines.slice(
7678 leadingBlankLine ? 1 : 0,
7679 trailingBlankLine ? lines.length - 1 : lines.length
7680 )
7681 } else {
7682 return lines
7683 }
7684}
7685
7686function isWhitespace (s) {
7687 return /^\s*$/.test(s)
7688}
7689
7690},{}],236:[function(require,module,exports){
7691"use strict";
7692Object.defineProperty(exports, "__esModule", { value: true });
7693var lodash_1 = require("./wrap/lodash");
7694var is_matcher_1 = require("./matchers/is-matcher");
7695exports.default = (function (expectedArgs, actualArgs, config) {
7696 if (config === void 0) { config = {}; }
7697 if (arityMismatch(expectedArgs, actualArgs, config)) {
7698 return false;
7699 }
7700 else if (config.allowMatchers !== false) {
7701 return equalsWithMatchers(expectedArgs, actualArgs);
7702 }
7703 else {
7704 return lodash_1.default.isEqual(expectedArgs, actualArgs);
7705 }
7706});
7707var arityMismatch = function (expectedArgs, actualArgs, config) {
7708 return expectedArgs.length !== actualArgs.length && !config.ignoreExtraArgs;
7709};
7710var equalsWithMatchers = function (expectedArgs, actualArgs) {
7711 return lodash_1.default.every(expectedArgs, function (expectedArg, key) {
7712 return argumentMatchesExpectation(expectedArg, actualArgs[key]);
7713 });
7714};
7715var argumentMatchesExpectation = function (expectedArg, actualArg) {
7716 if (is_matcher_1.default(expectedArg)) {
7717 return matcherTestFor(expectedArg)(actualArg);
7718 }
7719 else {
7720 return lodash_1.default.isEqualWith(expectedArg, actualArg, function (expectedEl, actualEl) {
7721 if (is_matcher_1.default(expectedEl)) {
7722 return matcherTestFor(expectedEl)(actualEl);
7723 }
7724 });
7725 }
7726};
7727var matcherTestFor = function (matcher) {
7728 return matcher.__matches;
7729};
7730
7731},{"./matchers/is-matcher":264,"./wrap/lodash":281}],237:[function(require,module,exports){
7732"use strict";
7733Object.defineProperty(exports, "__esModule", { value: true });
7734var lodash_1 = require("./wrap/lodash");
7735var create_1 = require("./matchers/create");
7736var callback = create_1.default({
7737 name: 'callback',
7738 matches: function (matcherArgs, actual) {
7739 return lodash_1.default.isFunction(actual);
7740 },
7741 onCreate: function (matcherInstance, matcherArgs) {
7742 matcherInstance.args = matcherArgs;
7743 matcherInstance.__testdouble_callback = true;
7744 }
7745});
7746// Make callback itself quack like a matcher for its non-invoked use case.
7747callback.__name = 'callback';
7748callback.__matches = lodash_1.default.isFunction;
7749exports.default = callback;
7750
7751},{"./matchers/create":261,"./wrap/lodash":281}],238:[function(require,module,exports){
7752(function (global){
7753"use strict";
7754Object.defineProperty(exports, "__esModule", { value: true });
7755var lodash_1 = require("./wrap/lodash");
7756var log_1 = require("./log");
7757var anything_1 = require("./stringify/anything");
7758var DEFAULTS = {
7759 ignoreWarnings: false,
7760 promiseConstructor: global.Promise,
7761 suppressErrors: false
7762};
7763var DELETED_OPTIONS = ['extendWhenReplacingConstructors'];
7764var configData = lodash_1.default.extend({}, DEFAULTS);
7765exports.default = lodash_1.default.tap(function (overrides) {
7766 deleteDeletedOptions(overrides);
7767 ensureOverridesExist(overrides);
7768 return lodash_1.default.extend(configData, overrides);
7769}, function (config) {
7770 config.reset = function () {
7771 configData = lodash_1.default.extend({}, DEFAULTS);
7772 };
7773});
7774var deleteDeletedOptions = function (overrides) {
7775 lodash_1.default.each(overrides, function (val, key) {
7776 if (lodash_1.default.includes(DELETED_OPTIONS, key)) {
7777 log_1.default.warn('td.config', "\"" + key + "\" is no longer a valid configuration key. Remove it from your calls to td.config() or it may throw an error in the future. For more information, try hunting around our GitHub repo for it:\n\n https://github.com/testdouble/testdouble.js/search?q=" + key);
7778 delete overrides[key];
7779 }
7780 });
7781};
7782var ensureOverridesExist = function (overrides) {
7783 lodash_1.default.each(overrides, function (val, key) {
7784 if (!Object.prototype.hasOwnProperty.call(configData, key)) {
7785 log_1.default.error('td.config', "\"" + key + "\" is not a valid configuration key (valid keys are: " + anything_1.default(lodash_1.default.keys(configData)) + ")");
7786 }
7787 });
7788};
7789
7790}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
7791},{"./log":254,"./stringify/anything":276,"./wrap/lodash":281}],239:[function(require,module,exports){
7792"use strict";
7793Object.defineProperty(exports, "__esModule", { value: true });
7794var lodash_1 = require("./wrap/lodash");
7795var function_1 = require("./function");
7796var imitate_1 = require("./imitate");
7797exports.default = (function (typeOrNames) {
7798 return lodash_1.default.isFunction(typeOrNames)
7799 ? imitate_1.default(typeOrNames)
7800 : fakeConstructorFromNames(typeOrNames);
7801});
7802var fakeConstructorFromNames = function (funcNames) {
7803 return lodash_1.default.tap(function_1.default('(unnamed constructor)'), function (fakeConstructor) {
7804 fakeConstructor.prototype.toString = function () {
7805 return '[test double instance of constructor]';
7806 };
7807 lodash_1.default.each(funcNames, function (funcName) {
7808 fakeConstructor.prototype[funcName] = function_1.default("#" + String(funcName));
7809 });
7810 });
7811};
7812
7813},{"./function":241,"./imitate":243,"./wrap/lodash":281}],240:[function(require,module,exports){
7814"use strict";
7815Object.defineProperty(exports, "__esModule", { value: true });
7816var lodash_1 = require("./wrap/lodash");
7817var proxy_safe_clone_deep_with_1 = require("./wrap/proxy-safe-clone-deep-with");
7818var calls_1 = require("./store/calls");
7819var store_1 = require("./store");
7820var arguments_1 = require("./stringify/arguments");
7821var stubbings_1 = require("./store/stubbings");
7822function explain(testDouble) {
7823 if (lodash_1.default.isFunction(testDouble)) {
7824 return explainFunction(testDouble);
7825 }
7826 else if (lodash_1.default.isObject(testDouble)) {
7827 return explainObject(testDouble);
7828 }
7829 else {
7830 return explainNonTestDouble(testDouble);
7831 }
7832}
7833exports.default = explain;
7834function explainObject(obj) {
7835 var _a = explainChildren(obj), explanations = _a.explanations, children = _a.children;
7836 return {
7837 name: null,
7838 callCount: 0,
7839 calls: [],
7840 description: describeObject(explanations),
7841 children: children,
7842 isTestDouble: explanations.length > 0
7843 };
7844}
7845function explainChildren(thing) {
7846 var explanations = [];
7847 var children = proxy_safe_clone_deep_with_1.default(thing, function (val, key, obj, stack) {
7848 if (lodash_1.default.isFunction(val) && stack) {
7849 return lodash_1.default.tap(explainFunction(val), function (explanation) {
7850 if (explanation.isTestDouble)
7851 explanations.push(explanation);
7852 });
7853 }
7854 });
7855 return { explanations: explanations, children: children };
7856}
7857function describeObject(explanations) {
7858 var count = explanations.length;
7859 if (count === 0)
7860 return 'This object contains no test doubles';
7861 return "This object contains " + count + " test double function" + (count > 1 ? 's' : '') + ": [" + lodash_1.default.map(explanations, function (e) {
7862 return "\"" + e.name + "\"";
7863 }).join(', ') + "]";
7864}
7865function explainFunction(testDouble) {
7866 if (store_1.default.for(testDouble, false) == null) {
7867 return explainNonTestDouble(testDouble);
7868 }
7869 var calls = calls_1.default.for(testDouble);
7870 var stubs = stubbings_1.default.for(testDouble);
7871 var children = explainChildren(testDouble).children;
7872 return {
7873 name: store_1.default.for(testDouble).name,
7874 callCount: calls.length,
7875 calls: calls,
7876 description: testdoubleDescription(testDouble, stubs, calls) +
7877 stubbingDescription(stubs) +
7878 callDescription(calls),
7879 children: children,
7880 isTestDouble: true
7881 };
7882}
7883function explainNonTestDouble(thing) {
7884 return ({
7885 name: undefined,
7886 callCount: 0,
7887 calls: [],
7888 description: "This is not a test double" + (lodash_1.default.isFunction(thing) ? ' function' : '') + ".",
7889 isTestDouble: false
7890 });
7891}
7892function testdoubleDescription(testDouble, stubs, calls) {
7893 return "This test double " + stringifyName(testDouble) + "has " + stubs.length + " stubbings and " + calls.length + " invocations.";
7894}
7895function stubbingDescription(stubs) {
7896 return stubs.length > 0
7897 ? lodash_1.default.reduce(stubs, function (desc, stub) {
7898 return desc + ("\n - when called with `(" + arguments_1.default(stub.args) + ")`, then " + planFor(stub) + " " + argsFor(stub) + ".");
7899 }, '\n\nStubbings:')
7900 : '';
7901}
7902function planFor(stub) {
7903 switch (stub.config.plan) {
7904 case 'thenCallback': return 'callback';
7905 case 'thenResolve': return 'resolve';
7906 case 'thenReject': return 'reject';
7907 default: return 'return';
7908 }
7909}
7910function argsFor(stub) {
7911 switch (stub.config.plan) {
7912 case 'thenCallback': return "`(" + arguments_1.default(stub.stubbedValues, ', ') + ")`";
7913 default: return arguments_1.default(stub.stubbedValues, ', then ', '`');
7914 }
7915}
7916function callDescription(calls) {
7917 return calls.length > 0
7918 ? lodash_1.default.reduce(calls, function (desc, call) { return desc + ("\n - called with `(" + arguments_1.default(call.cloneArgs) + ")`."); }, '\n\nInvocations:')
7919 : '';
7920}
7921function stringifyName(testDouble) {
7922 var name = store_1.default.for(testDouble).name;
7923 return name ? "`" + name + "` " : '';
7924}
7925
7926},{"./store":274,"./store/calls":273,"./store/stubbings":275,"./stringify/arguments":277,"./wrap/lodash":281,"./wrap/proxy-safe-clone-deep-with":282}],241:[function(require,module,exports){
7927"use strict";
7928Object.defineProperty(exports, "__esModule", { value: true });
7929var lodash_1 = require("./wrap/lodash");
7930var calls_1 = require("./store/calls");
7931var store_1 = require("./store");
7932var stubbings_1 = require("./store/stubbings");
7933var imitate_1 = require("./imitate");
7934function func(nameOrFunc, __optionalName) {
7935 return lodash_1.default.isFunction(nameOrFunc)
7936 ? imitate_1.default(nameOrFunc)
7937 : createTestDoubleNamed(nameOrFunc || __optionalName);
7938}
7939exports.default = func;
7940var createTestDoubleNamed = function (name) {
7941 return lodash_1.default.tap(createTestDoubleFunction(), function (testDouble) {
7942 var entry = store_1.default.for(testDouble, true);
7943 if (name != null) {
7944 entry.name = name;
7945 testDouble.toString = function () { return "[test double for \"" + name + "\"]"; };
7946 }
7947 else {
7948 testDouble.toString = function () { return '[test double (unnamed)]'; };
7949 }
7950 });
7951};
7952var createTestDoubleFunction = function () {
7953 return function testDouble() {
7954 var args = [];
7955 for (var _i = 0; _i < arguments.length; _i++) {
7956 args[_i] = arguments[_i];
7957 }
7958 calls_1.default.log(testDouble, args, this);
7959 return stubbings_1.default.invoke(testDouble, args, this);
7960 };
7961};
7962
7963},{"./imitate":243,"./store":274,"./store/calls":273,"./store/stubbings":275,"./wrap/lodash":281}],242:[function(require,module,exports){
7964"use strict";
7965Object.defineProperty(exports, "__esModule", { value: true });
7966var lodash_1 = require("../wrap/lodash");
7967var function_1 = require("../function");
7968var is_generator_1 = require("./is-generator");
7969exports.default = (function (original, names) {
7970 if (lodash_1.default.isArray(original) || lodash_1.default.isArguments(original)) {
7971 return [];
7972 }
7973 else if (lodash_1.default.isFunction(original)) {
7974 if (is_generator_1.default(original)) {
7975 return original;
7976 }
7977 else {
7978 // TODO: this will become src/function/create and include parent reference instead of name joining here
7979 return function_1.default(lodash_1.default.map(names, String).join('') || '(anonymous function)');
7980 }
7981 }
7982 else {
7983 return lodash_1.default.clone(original);
7984 }
7985});
7986
7987},{"../function":241,"../wrap/lodash":281,"./is-generator":245}],243:[function(require,module,exports){
7988"use strict";
7989Object.defineProperty(exports, "__esModule", { value: true });
7990var initialize_names_1 = require("./initialize-names");
7991var create_imitation_1 = require("./create-imitation");
7992var overwrite_children_1 = require("./overwrite-children");
7993function imitate(original, names, encounteredObjects) {
7994 if (encounteredObjects === void 0) { encounteredObjects = new Map(); }
7995 if (encounteredObjects.has(original))
7996 return encounteredObjects.get(original);
7997 names = initialize_names_1.default(original, names);
7998 var target = create_imitation_1.default(original, names);
7999 encounteredObjects.set(original, target);
8000 overwrite_children_1.default(original, target, function (originalValue, name) {
8001 return imitate(originalValue, names.concat(name), encounteredObjects);
8002 });
8003 return target;
8004}
8005exports.default = imitate;
8006
8007},{"./create-imitation":242,"./initialize-names":244,"./overwrite-children":249}],244:[function(require,module,exports){
8008"use strict";
8009Object.defineProperty(exports, "__esModule", { value: true });
8010var lodash_1 = require("../wrap/lodash");
8011exports.default = (function (original, names) {
8012 if (lodash_1.default.isString(names))
8013 return [names];
8014 if (names != null)
8015 return names;
8016 if (lodash_1.default.isFunction(original) && original.name) {
8017 return [original.name];
8018 }
8019 else {
8020 return [];
8021 }
8022});
8023
8024},{"../wrap/lodash":281}],245:[function(require,module,exports){
8025"use strict";
8026Object.defineProperty(exports, "__esModule", { value: true });
8027var generatorsAreSupported = (function () {
8028 try {
8029 eval('(function* () {})'); // eslint-disable-line
8030 return true;
8031 }
8032 catch (e) {
8033 return false;
8034 }
8035})();
8036var GeneratorFunction = (function () {
8037 if (!generatorsAreSupported)
8038 return;
8039 var func = eval('(function* () {})'); // eslint-disable-line
8040 return Object.getPrototypeOf(func).constructor;
8041})();
8042exports.default = (function (func) {
8043 return generatorsAreSupported && func.constructor === GeneratorFunction;
8044});
8045
8046},{}],246:[function(require,module,exports){
8047"use strict";
8048Object.defineProperty(exports, "__esModule", { value: true });
8049var lodash_1 = require("../../wrap/lodash");
8050exports.default = (function (original, target, name, originalValue, targetValue) {
8051 if (name !== 'prototype' || !lodash_1.default.isFunction(original))
8052 return targetValue;
8053 targetValue.__proto__ = originalValue; // eslint-disable-line
8054 targetValue.constructor = target;
8055 return targetValue;
8056});
8057
8058},{"../../wrap/lodash":281}],247:[function(require,module,exports){
8059"use strict";
8060Object.defineProperty(exports, "__esModule", { value: true });
8061var lodash_1 = require("../../wrap/lodash");
8062exports.default = (function (target, props, visitor) {
8063 Object.defineProperties(target, lodash_1.default.transform(props, function (acc, descriptor, name) {
8064 if (propOnTargetAndNotWritable(target, name, descriptor)) {
8065 if (name === 'prototype') {
8066 // Functions' prototype is not configurable but is assignable:
8067 target.prototype = newValue(name, descriptor.value, visitor);
8068 }
8069 }
8070 else {
8071 acc[name] = {
8072 configurable: true,
8073 writable: true,
8074 value: newValue(name, descriptor.value, visitor),
8075 enumerable: descriptor.enumerable
8076 };
8077 }
8078 }));
8079});
8080var propOnTargetAndNotWritable = function (target, name, originalDescriptor) {
8081 var targetDescriptor = Object.getOwnPropertyDescriptor(target, name);
8082 if (targetDescriptor &&
8083 (!targetDescriptor.writable || !targetDescriptor.configurable)) {
8084 return true;
8085 }
8086};
8087var newValue = function (name, value, visitor) {
8088 return visitor ? visitor(name, value) : value;
8089};
8090
8091},{"../../wrap/lodash":281}],248:[function(require,module,exports){
8092"use strict";
8093Object.defineProperty(exports, "__esModule", { value: true });
8094var is_fakeable_1 = require("./is-fakeable");
8095var is_native_prototype_1 = require("./is-native-prototype");
8096function gatherProps(thing) {
8097 var props = {};
8098 while (is_fakeable_1.default(thing) && !is_native_prototype_1.default(thing)) {
8099 Object.getOwnPropertyNames(thing).forEach(function (propName) {
8100 if (!props[propName] && propName !== 'constructor') {
8101 props[propName] = Object.getOwnPropertyDescriptor(thing, propName);
8102 }
8103 });
8104 thing = Object.getPrototypeOf(thing);
8105 }
8106 return props;
8107}
8108exports.default = gatherProps;
8109
8110},{"./is-fakeable":250,"./is-native-prototype":251}],249:[function(require,module,exports){
8111"use strict";
8112Object.defineProperty(exports, "__esModule", { value: true });
8113var lodash_1 = require("../../wrap/lodash");
8114var is_fakeable_1 = require("./is-fakeable");
8115var gather_props_1 = require("./gather-props");
8116var copy_props_1 = require("./copy-props");
8117var chain_prototype_1 = require("./chain-prototype");
8118exports.default = (function (original, target, overwriteChild) {
8119 if (!is_fakeable_1.default(target))
8120 return;
8121 if (lodash_1.default.isArray(target)) {
8122 lodash_1.default.each(original, function (item, index) {
8123 return target.push(overwriteChild(item, "[" + index + "]"));
8124 });
8125 }
8126 else {
8127 copy_props_1.default(target, gather_props_1.default(original), function (name, originalValue) {
8128 return chain_prototype_1.default(original, target, name, originalValue, overwriteChild(originalValue, "." + name));
8129 });
8130 }
8131});
8132
8133},{"../../wrap/lodash":281,"./chain-prototype":246,"./copy-props":247,"./gather-props":248,"./is-fakeable":250}],250:[function(require,module,exports){
8134(function (global){
8135"use strict";
8136Object.defineProperty(exports, "__esModule", { value: true });
8137var lodash_1 = require("../../wrap/lodash");
8138var is_generator_1 = require("../is-generator");
8139exports.default = (function (thing) {
8140 return !(!lodash_1.default.isObject(thing) || isBoxedType(thing) || is_generator_1.default(thing));
8141});
8142var isBoxedType = function (thing) {
8143 return lodash_1.default.compact([
8144 Boolean,
8145 Date,
8146 Number,
8147 RegExp,
8148 String,
8149 global.Symbol
8150 ]).some(function (type) { return thing instanceof type; });
8151};
8152
8153}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
8154},{"../../wrap/lodash":281,"../is-generator":245}],251:[function(require,module,exports){
8155"use strict";
8156Object.defineProperty(exports, "__esModule", { value: true });
8157var lodash_1 = require("../../wrap/lodash");
8158function isNativePrototype(thing) {
8159 if (thing == null || !lodash_1.default.isFunction(thing.isPrototypeOf))
8160 return false;
8161 return lodash_1.default.some([Object, Function], function (nativeType) {
8162 return Object.prototype.isPrototypeOf.call(thing, nativeType);
8163 });
8164}
8165exports.default = isNativePrototype;
8166
8167},{"../../wrap/lodash":281}],252:[function(require,module,exports){
8168"use strict";
8169Object.defineProperty(exports, "__esModule", { value: true });
8170var function_1 = require("./function");
8171var object_1 = require("./object");
8172var constructor_1 = require("./constructor");
8173var instance_1 = require("./instance");
8174var imitate_1 = require("./imitate");
8175var when_1 = require("./when");
8176var verify_1 = require("./verify");
8177var matchers_1 = require("./matchers");
8178var replace_1 = require("./replace");
8179var explain_1 = require("./explain");
8180var reset_1 = require("./reset");
8181var config_1 = require("./config");
8182var callback_1 = require("./callback");
8183var version_1 = require("./version");
8184var quibble = require("quibble");
8185module.exports = {
8186 function: function_1.default,
8187 func: function_1.default,
8188 object: object_1.default,
8189 constructor: constructor_1.default,
8190 instance: instance_1.default,
8191 imitate: imitate_1.default,
8192 when: when_1.default,
8193 verify: verify_1.default,
8194 matchers: matchers_1.default,
8195 replace: replace_1.default,
8196 replaceEsm: replace_1.replaceEsm,
8197 explain: explain_1.default,
8198 reset: reset_1.default,
8199 config: config_1.default,
8200 callback: callback_1.default,
8201 version: version_1.default,
8202 quibble: quibble
8203};
8204
8205},{"./callback":237,"./config":238,"./constructor":239,"./explain":240,"./function":241,"./imitate":243,"./instance":253,"./matchers":262,"./object":266,"./replace":269,"./reset":272,"./verify":278,"./version":279,"./when":280,"quibble":268}],253:[function(require,module,exports){
8206"use strict";
8207Object.defineProperty(exports, "__esModule", { value: true });
8208var constructor_js_1 = require("./constructor.js");
8209function instance(typeOrNames) {
8210 return new (constructor_js_1.default(typeOrNames))();
8211}
8212exports.default = instance;
8213
8214},{"./constructor.js":239}],254:[function(require,module,exports){
8215"use strict";
8216Object.defineProperty(exports, "__esModule", { value: true });
8217var config_1 = require("./config");
8218exports.default = {
8219 warn: function (func, msg, url) {
8220 if (!config_1.default().ignoreWarnings && typeof console === 'object' && console.warn) {
8221 console.warn("Warning: testdouble.js - " + func + " - " + msg + withUrl(url));
8222 }
8223 },
8224 error: function (func, msg, url) {
8225 if (!config_1.default().suppressErrors) {
8226 throw new Error("Error: testdouble.js - " + func + " - " + msg + withUrl(url));
8227 }
8228 },
8229 fail: function (msg) {
8230 throw new Error(msg);
8231 }
8232};
8233var withUrl = function (url) {
8234 return url != null
8235 ? " (see: " + url + " )"
8236 : '';
8237};
8238
8239},{"./config":238}],255:[function(require,module,exports){
8240"use strict";
8241Object.defineProperty(exports, "__esModule", { value: true });
8242var create_1 = require("../create");
8243exports.default = create_1.default({
8244 name: 'anything',
8245 matches: function () { return true; }
8246});
8247
8248},{"../create":261}],256:[function(require,module,exports){
8249"use strict";
8250Object.defineProperty(exports, "__esModule", { value: true });
8251var create_1 = require("../create");
8252exports.default = create_1.default({
8253 name: 'argThat',
8254 matches: function (matcherArgs, actual) {
8255 var predicate = matcherArgs[0];
8256 return predicate(actual);
8257 }
8258});
8259
8260},{"../create":261}],257:[function(require,module,exports){
8261"use strict";
8262Object.defineProperty(exports, "__esModule", { value: true });
8263var create_1 = require("../create");
8264exports.default = (function () {
8265 var captor = {
8266 capture: create_1.default({
8267 name: 'captor.capture',
8268 matches: function (matcherArgs, actual) {
8269 return true;
8270 },
8271 afterSatisfaction: function (matcherArgs, actual) {
8272 captor.values = captor.values || [];
8273 captor.values.push(actual);
8274 captor.value = actual;
8275 }
8276 })
8277 };
8278 return captor;
8279});
8280
8281},{"../create":261}],258:[function(require,module,exports){
8282"use strict";
8283Object.defineProperty(exports, "__esModule", { value: true });
8284var lodash_1 = require("../../wrap/lodash");
8285var create_1 = require("../create");
8286var is_matcher_1 = require("../is-matcher");
8287exports.default = create_1.default({
8288 name: 'contains',
8289 matches: function (containings, actualArg) {
8290 if (containings.length === 0)
8291 return false;
8292 return lodash_1.default.every(containings, function (containing) {
8293 return argumentContains(containing, actualArg);
8294 });
8295 }
8296});
8297var argumentContains = function (containing, actualArg) {
8298 if (lodash_1.default.isArray(containing)) {
8299 return lodash_1.default.some(actualArg, function (actualElement) {
8300 return lodash_1.default.isEqualWith(containing, actualElement, equalish);
8301 });
8302 }
8303 else {
8304 return lodash_1.default.isEqualWith(containing, actualArg, equalish);
8305 }
8306};
8307var equalish = function (containing, actualArg) {
8308 if (lodash_1.default.isRegExp(containing)) {
8309 if (lodash_1.default.isString(actualArg)) {
8310 return containing.test(actualArg);
8311 }
8312 else if (lodash_1.default.isRegExp(actualArg)) {
8313 return containing.toString() === actualArg.toString();
8314 }
8315 else {
8316 return false;
8317 }
8318 }
8319 else if (is_matcher_1.default(containing)) {
8320 return containing.__matches(actualArg) ||
8321 lodash_1.default.some(actualArg, containing.__matches);
8322 }
8323 else if (containing instanceof Date) {
8324 return actualArg instanceof Date &&
8325 containing.getTime() === actualArg.getTime();
8326 }
8327 else if (containing instanceof Error) {
8328 return actualArg instanceof Error &&
8329 lodash_1.default.includes(actualArg.message, containing.message);
8330 }
8331 else if (lodash_1.default.isObjectLike(containing) && lodash_1.default.isObjectLike(actualArg)) {
8332 return containsPartialObject(containing, actualArg);
8333 }
8334 else if (lodash_1.default.isString(actualArg) || lodash_1.default.isArray(actualArg)) {
8335 return lodash_1.default.includes(actualArg, containing);
8336 }
8337 else {
8338 lodash_1.default.isEqual(actualArg, containing);
8339 }
8340};
8341var containsPartialObject = function (containing, actual) {
8342 return lodash_1.default.every(containing, function (val, key) {
8343 return lodash_1.default.isEqualWith(val, actual[key], equalish);
8344 });
8345};
8346
8347},{"../../wrap/lodash":281,"../create":261,"../is-matcher":264}],259:[function(require,module,exports){
8348"use strict";
8349Object.defineProperty(exports, "__esModule", { value: true });
8350var lodash_1 = require("../../wrap/lodash");
8351var create_1 = require("../create");
8352var arguments_1 = require("../../stringify/arguments");
8353exports.default = create_1.default({
8354 name: function (matcherArgs) {
8355 var desc = lodash_1.default.get(matcherArgs[0], 'name') || arguments_1.default(matcherArgs);
8356 return "isA(" + desc + ")";
8357 },
8358 matches: function (matcherArgs, actual) {
8359 var type = matcherArgs[0];
8360 if (type === Number) {
8361 return lodash_1.default.isNumber(actual);
8362 }
8363 else if (type === String) {
8364 return lodash_1.default.isString(actual);
8365 }
8366 else if (type === Boolean) {
8367 return lodash_1.default.isBoolean(actual);
8368 }
8369 else {
8370 return actual instanceof type;
8371 }
8372 }
8373});
8374
8375},{"../../stringify/arguments":277,"../../wrap/lodash":281,"../create":261}],260:[function(require,module,exports){
8376"use strict";
8377Object.defineProperty(exports, "__esModule", { value: true });
8378var lodash_1 = require("../../wrap/lodash");
8379var create_1 = require("../create");
8380exports.default = create_1.default({
8381 name: 'not',
8382 matches: function (matcherArgs, actual) {
8383 var expected = matcherArgs[0];
8384 return !lodash_1.default.isEqual(expected, actual);
8385 }
8386});
8387
8388},{"../../wrap/lodash":281,"../create":261}],261:[function(require,module,exports){
8389"use strict";
8390Object.defineProperty(exports, "__esModule", { value: true });
8391var lodash_1 = require("../wrap/lodash");
8392var arguments_1 = require("../stringify/arguments");
8393exports.default = (function (config) {
8394 return function () {
8395 var matcherArgs = [];
8396 for (var _i = 0; _i < arguments.length; _i++) {
8397 matcherArgs[_i] = arguments[_i];
8398 }
8399 return lodash_1.default.tap({
8400 __name: nameFor(config, matcherArgs),
8401 __matches: function (actualArg) {
8402 return config.matches(matcherArgs, actualArg);
8403 }
8404 }, function (matcherInstance) {
8405 matcherInstance.__matches.afterSatisfaction = function (actualArg) {
8406 lodash_1.default.invoke(config, 'afterSatisfaction', matcherArgs, actualArg);
8407 };
8408 lodash_1.default.invoke(config, 'onCreate', matcherInstance, matcherArgs);
8409 });
8410 };
8411});
8412var nameFor = function (config, matcherArgs) {
8413 if (lodash_1.default.isFunction(config.name)) {
8414 return config.name(matcherArgs);
8415 }
8416 else if (config.name != null) {
8417 return config.name + "(" + arguments_1.default(matcherArgs) + ")";
8418 }
8419 else {
8420 return "[Matcher for (" + arguments_1.default(matcherArgs) + ")]";
8421 }
8422};
8423
8424},{"../stringify/arguments":277,"../wrap/lodash":281}],262:[function(require,module,exports){
8425"use strict";
8426Object.defineProperty(exports, "__esModule", { value: true });
8427var create_1 = require("./create");
8428var captor_1 = require("./builtin/captor");
8429var is_a_1 = require("./builtin/is-a");
8430var contains_1 = require("./builtin/contains");
8431var anything_1 = require("./builtin/anything");
8432var arg_that_1 = require("./builtin/arg-that");
8433var not_1 = require("./builtin/not");
8434exports.default = {
8435 create: create_1.default,
8436 captor: captor_1.default,
8437 isA: is_a_1.default,
8438 anything: anything_1.default,
8439 contains: contains_1.default,
8440 argThat: arg_that_1.default,
8441 not: not_1.default
8442};
8443
8444},{"./builtin/anything":255,"./builtin/arg-that":256,"./builtin/captor":257,"./builtin/contains":258,"./builtin/is-a":259,"./builtin/not":260,"./create":261}],263:[function(require,module,exports){
8445"use strict";
8446Object.defineProperty(exports, "__esModule", { value: true });
8447var callback_1 = require("../callback");
8448function isCallback(obj) {
8449 return obj && (obj === callback_1.default || obj.__testdouble_callback === true);
8450}
8451exports.default = isCallback;
8452
8453},{"../callback":237}],264:[function(require,module,exports){
8454"use strict";
8455Object.defineProperty(exports, "__esModule", { value: true });
8456exports.default = (function (thing) {
8457 return thing && !thing[Symbol('__is_proxy')] && thing.__matches;
8458});
8459
8460},{}],265:[function(require,module,exports){
8461"use strict";
8462Object.defineProperty(exports, "__esModule", { value: true });
8463var lodash_1 = require("../wrap/lodash");
8464var is_matcher_1 = require("./is-matcher");
8465// TODO: after rewrite, update signature to take (Stubbing/Verification, Call)
8466function notifyAfterSatisfaction(expectedArgs, actualArgs) {
8467 lodash_1.default.each(expectedArgs, function (expectedArg, i) {
8468 if (is_matcher_1.default(expectedArg)) {
8469 lodash_1.default.invoke(expectedArg, '__matches.afterSatisfaction', actualArgs[i]);
8470 }
8471 });
8472}
8473exports.default = notifyAfterSatisfaction;
8474
8475},{"../wrap/lodash":281,"./is-matcher":264}],266:[function(require,module,exports){
8476"use strict";
8477Object.defineProperty(exports, "__esModule", { value: true });
8478var lodash_1 = require("./wrap/lodash");
8479var log_1 = require("./log");
8480var function_1 = require("./function");
8481var imitate_1 = require("./imitate");
8482var proxy_1 = require("./object/proxy");
8483var DEFAULT_OPTIONS = { excludeMethods: ['then'] };
8484function object(nameOrType, config) {
8485 return lodash_1.default.tap(fakeObject(nameOrType, config, arguments.length), function (obj) {
8486 addToStringToDouble(obj, nameOrType);
8487 });
8488}
8489exports.default = object;
8490var fakeObject = function (nameOrType, config, argCount) {
8491 if (lodash_1.default.isArray(nameOrType)) {
8492 return createTestDoublesForFunctionNames(nameOrType);
8493 }
8494 else if (lodash_1.default.isObjectLike(nameOrType)) {
8495 return imitate_1.default(nameOrType);
8496 }
8497 else if (lodash_1.default.isString(nameOrType) || argCount === 0) {
8498 return proxy_1.default(nameOrType, withDefaults(config));
8499 }
8500 else if (lodash_1.default.isFunction(nameOrType)) {
8501 ensureFunctionIsNotPassed();
8502 }
8503 else {
8504 ensureOtherGarbageIsNotPassed();
8505 }
8506};
8507var createTestDoublesForFunctionNames = function (names) {
8508 return lodash_1.default.transform(names, function (acc, funcName) {
8509 acc[funcName] = function_1.default("." + String(funcName));
8510 }, {});
8511};
8512var ensureFunctionIsNotPassed = function () {
8513 return log_1.default.error('td.object', 'Functions are not valid arguments to `td.object` (as of testdouble@2.0.0). Please use `td.function()`, `td.constructor()` or `td.instance()` instead for creating fake functions.');
8514};
8515var ensureOtherGarbageIsNotPassed = function () {
8516 return log_1.default.error('td.object', "To create a fake object with td.object(), pass it a plain object that contains\nfunctions, an array of function names, or (if your runtime supports ES Proxy\nobjects) a string name.\n\nIf you passed td.object an instance of a custom type, consider passing the\ntype's constructor to `td.constructor()` instead.\n");
8517};
8518var withDefaults = function (config) {
8519 return lodash_1.default.extend({}, DEFAULT_OPTIONS, config);
8520};
8521var addToStringToDouble = function (fakeObject, nameOrType) {
8522 var name = nameOf(nameOrType);
8523 fakeObject.toString = function () { return "[test double object" + (name ? " for \"" + name + "\"" : '') + "]"; };
8524};
8525var nameOf = function (nameOrType) {
8526 return lodash_1.default.isString(nameOrType)
8527 ? nameOrType
8528 : '';
8529};
8530
8531},{"./function":241,"./imitate":243,"./log":254,"./object/proxy":267,"./wrap/lodash":281}],267:[function(require,module,exports){
8532"use strict";
8533var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
8534 if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
8535 return cooked;
8536};
8537Object.defineProperty(exports, "__esModule", { value: true });
8538var theredoc = require("theredoc");
8539var lodash_1 = require("../wrap/lodash");
8540var log_1 = require("../log");
8541var function_1 = require("../function");
8542var store_1 = require("../store");
8543function proxy(name, _a) {
8544 var excludeMethods = (_a === void 0 ? {} : _a).excludeMethods;
8545 ensureProxySupport(name);
8546 return new Proxy({}, generateHandler(name, excludeMethods));
8547}
8548exports.default = proxy;
8549var ensureProxySupport = function (name) {
8550 if (typeof Proxy === 'undefined') {
8551 log_1.default.error('td.object', theredoc(templateObject_1 || (templateObject_1 = __makeTemplateObject([" The current runtime does not have Proxy support, which is what\n testdouble.js depends on when a string name is passed to `td.object()`.\n\n More details here:\n https://github.com/testdouble/testdouble.js/blob/master/docs/4-creating-test-doubles.md#objectobjectname\n\n Did you mean `td.object(['", "'])`?\n "], ["\\\n The current runtime does not have Proxy support, which is what\n testdouble.js depends on when a string name is passed to \\`td.object()\\`.\n\n More details here:\n https://github.com/testdouble/testdouble.js/blob/master/docs/4-creating-test-doubles.md#objectobjectname\n\n Did you mean \\`td.object(['", "'])\\`?\n "])), name));
8552 }
8553};
8554var generateHandler = function (internalName, excludeMethods) { return ({
8555 get: function (target, propKey) {
8556 return generateGet(target, propKey, internalName, excludeMethods);
8557 }
8558}); };
8559var generateGet = function (target, propKey, internalName, excludeMethods) {
8560 if (propKey === Symbol('__is_proxy')) {
8561 return true;
8562 }
8563 if (!Object.prototype.hasOwnProperty.call(target, propKey) &&
8564 !lodash_1.default.includes(excludeMethods, propKey)) {
8565 var nameWithProp = (internalName || '') + "." + String(propKey);
8566 var tdFunc = function_1.default(nameWithProp);
8567 var tdFuncProxy = new Proxy(tdFunc, generateHandler(nameWithProp, excludeMethods));
8568 store_1.default.registerAlias(tdFunc, tdFuncProxy);
8569 target[propKey] = tdFuncProxy;
8570 }
8571 return target[propKey];
8572};
8573var templateObject_1;
8574
8575},{"../function":241,"../log":254,"../store":274,"../wrap/lodash":281,"theredoc":235}],268:[function(require,module,exports){
8576module.exports = {
8577 absolutify: function absolutify() { },
8578 ignoreCallsFromThisFile: function ignoreCallsFromThisFile() { },
8579 reset: function reset() { }
8580};
8581
8582},{}],269:[function(require,module,exports){
8583"use strict";
8584Object.defineProperty(exports, "__esModule", { value: true });
8585var lodash_1 = require("../wrap/lodash");
8586var quibble = require("quibble");
8587var module_1 = require("./module");
8588var property_1 = require("./property");
8589quibble.ignoreCallsFromThisFile();
8590function default_1(target) {
8591 if (lodash_1.default.isString(target)) {
8592 return module_1.default.apply(void 0, arguments);
8593 }
8594 else {
8595 return property_1.default.apply(void 0, arguments);
8596 }
8597}
8598exports.default = default_1;
8599function replaceEsm(_modulePath, _namedExportReplacement, _defaultExportReplacement) {
8600 if (!quibble.isLoaderLoaded()) {
8601 throw new Error('testdouble ESM loader not loaded. You cannot replace ES modules without a loader. Run node with `--loader=testdouble`.');
8602 }
8603 // Sending arguments instead of the above arguments is crucial because `replaceEsModule`
8604 // uses arguments.length to figure out what to do.
8605 return module_1.replaceEsModule.apply(void 0, arguments);
8606}
8607exports.replaceEsm = replaceEsm;
8608
8609},{"../wrap/lodash":281,"./module":270,"./property":271,"quibble":268}],270:[function(require,module,exports){
8610"use strict";
8611Object.defineProperty(exports, "__esModule", { value: true });
8612exports.default = (function () {
8613 throw Error('Sorry, but CommonJS module replacement with td.replace() is only supported under Node.js runtimes.');
8614});
8615
8616},{}],271:[function(require,module,exports){
8617"use strict";
8618Object.defineProperty(exports, "__esModule", { value: true });
8619var lodash_1 = require("../wrap/lodash");
8620var imitate_1 = require("../imitate");
8621var log_1 = require("../log");
8622var reset_1 = require("../reset");
8623var anything_1 = require("../stringify/anything");
8624function default_1(object, property, manualReplacement) {
8625 var isManual = arguments.length > 2;
8626 var realThingExists = object[property] ||
8627 Object.prototype.hasOwnProperty.call(object, property);
8628 if (isManual || realThingExists) {
8629 var realThing_1 = object[property];
8630 return lodash_1.default.tap(getFake(isManual, property, manualReplacement, realThing_1), function (fakeThing) {
8631 object[property] = fakeThing;
8632 reset_1.default.onNextReset(function () {
8633 if (realThingExists) {
8634 object[property] = realThing_1;
8635 }
8636 else {
8637 delete object[property];
8638 }
8639 });
8640 });
8641 }
8642 else {
8643 log_1.default.error('td.replace', "No \"" + property + "\" property was found.");
8644 }
8645}
8646exports.default = default_1;
8647var getFake = function (isManual, property, manualReplacement, realThing) {
8648 if (isManual) {
8649 warnIfTypeMismatch(property, manualReplacement, realThing);
8650 return manualReplacement;
8651 }
8652 else {
8653 return imitate_1.default(realThing, [property]);
8654 }
8655};
8656var warnIfTypeMismatch = function (property, fakeThing, realThing) {
8657 var fakeType = typeof fakeThing;
8658 var realType = typeof realThing;
8659 if (realThing !== undefined && fakeType !== realType) {
8660 log_1.default.warn('td.replace', "property \"" + property + "\" " + anything_1.default(realThing) + " (" + lodash_1.default.capitalize(realType) + ") was replaced with " + anything_1.default(fakeThing) + ", which has a different type (" + lodash_1.default.capitalize(fakeType) + ").");
8661 }
8662};
8663
8664},{"../imitate":243,"../log":254,"../reset":272,"../stringify/anything":276,"../wrap/lodash":281}],272:[function(require,module,exports){
8665"use strict";
8666Object.defineProperty(exports, "__esModule", { value: true });
8667var lodash_1 = require("./wrap/lodash");
8668var quibble = require("quibble");
8669var store_1 = require("./store");
8670var onResetHandlers = [];
8671var onNextResetHandlers = [];
8672exports.default = lodash_1.default.tap(function () {
8673 store_1.default.reset();
8674 quibble.reset();
8675 lodash_1.default.each(onResetHandlers, function (resetHandler) {
8676 return resetHandler();
8677 });
8678 lodash_1.default.each(onNextResetHandlers, function (resetHandler) {
8679 return resetHandler();
8680 });
8681 onNextResetHandlers = [];
8682}, function (reset) {
8683 reset.onReset = function (func) {
8684 return onResetHandlers.push(func);
8685 };
8686 reset.onNextReset = function (func) {
8687 return onNextResetHandlers.push(func);
8688 };
8689});
8690
8691},{"./store":274,"./wrap/lodash":281,"quibble":268}],273:[function(require,module,exports){
8692"use strict";
8693Object.defineProperty(exports, "__esModule", { value: true });
8694var lodash_1 = require("../wrap/lodash");
8695var args_match_1 = require("../args-match");
8696var index_1 = require("./index");
8697var callHistory = []; // <-- remember this to pop our DSL of when(<call>)/verify(<call>)
8698index_1.default.onReset(function () { callHistory = []; });
8699exports.default = {
8700 log: function (testDouble, args, context) {
8701 index_1.default.for(testDouble).calls.push({ args: args, context: context, cloneArgs: lodash_1.default.cloneDeep(args) });
8702 return callHistory.push({ testDouble: testDouble, args: args, context: context });
8703 },
8704 pop: function () {
8705 return lodash_1.default.tap(callHistory.pop(), function (call) {
8706 if (call != null) {
8707 index_1.default.for(call.testDouble).calls.pop();
8708 }
8709 });
8710 },
8711 wasInvoked: function (testDouble, args, config) {
8712 var matchingInvocationCount = this.where(testDouble, args, config).length;
8713 if (config.times != null) {
8714 return matchingInvocationCount === config.times;
8715 }
8716 else {
8717 return matchingInvocationCount > 0;
8718 }
8719 },
8720 where: function (testDouble, args, config) {
8721 return lodash_1.default.filter(index_1.default.for(testDouble).calls, function (call) {
8722 var pastArgs = config.cloneArgs ? call.cloneArgs : call.args;
8723 return args_match_1.default(args, pastArgs, config);
8724 });
8725 },
8726 for: function (testDouble) {
8727 return index_1.default.for(testDouble).calls;
8728 }
8729};
8730
8731},{"../args-match":236,"../wrap/lodash":281,"./index":274}],274:[function(require,module,exports){
8732"use strict";
8733Object.defineProperty(exports, "__esModule", { value: true });
8734var lodash_1 = require("../wrap/lodash");
8735var events_1 = require("events");
8736var storeEmitter = new events_1.EventEmitter();
8737var globalStore = [];
8738var store = {
8739 onReset: function (func) {
8740 storeEmitter.on('reset', func);
8741 },
8742 reset: function () {
8743 globalStore = [];
8744 storeEmitter.emit('reset');
8745 },
8746 for: function (testDouble, createIfNew) {
8747 if (createIfNew === void 0) { createIfNew = true; }
8748 var entry = lodash_1.default.find(globalStore, function (e) { return testDouble === e.testDouble || testDouble === e.alias; });
8749 if (entry) {
8750 return entry;
8751 }
8752 else if (createIfNew) {
8753 return lodash_1.default.tap({
8754 testDouble: testDouble,
8755 stubbings: [],
8756 calls: [],
8757 verifications: []
8758 }, function (newEntry) {
8759 return globalStore.push(newEntry);
8760 });
8761 }
8762 },
8763 registerAlias: function (testDouble, alias) {
8764 store.for(testDouble).alias = alias;
8765 }
8766};
8767exports.default = store;
8768
8769},{"../wrap/lodash":281,"events":1}],275:[function(require,module,exports){
8770"use strict";
8771var __spreadArrays = (this && this.__spreadArrays) || function () {
8772 for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
8773 for (var r = Array(s), k = 0, i = 0; i < il; i++)
8774 for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
8775 r[k] = a[j];
8776 return r;
8777};
8778Object.defineProperty(exports, "__esModule", { value: true });
8779var lodash_1 = require("../wrap/lodash");
8780var args_match_1 = require("../args-match");
8781var is_callback_1 = require("../matchers/is-callback");
8782var notify_after_satisfaction_1 = require("../matchers/notify-after-satisfaction");
8783var config_1 = require("../config");
8784var log_1 = require("../log");
8785var index_1 = require("./index");
8786exports.default = {
8787 add: function (testDouble, args, stubbedValues, config) {
8788 return index_1.default.for(testDouble).stubbings.push({
8789 callCount: 0,
8790 stubbedValues: stubbedValues,
8791 args: config.cloneArgs ? lodash_1.default.cloneDeep(args) : args,
8792 config: config
8793 });
8794 },
8795 invoke: function (testDouble, actualArgs, actualContext) {
8796 var stubbing = stubbingFor(testDouble, actualArgs);
8797 if (stubbing) {
8798 notify_after_satisfaction_1.default(stubbing.args, actualArgs);
8799 return executePlan(stubbing, actualArgs, actualContext);
8800 }
8801 },
8802 for: function (testDouble) {
8803 return index_1.default.for(testDouble).stubbings;
8804 }
8805};
8806var stubbingFor = function (testDouble, actualArgs) {
8807 return lodash_1.default.findLast(index_1.default.for(testDouble).stubbings, function (stubbing) {
8808 return isSatisfied(stubbing, actualArgs);
8809 });
8810};
8811var executePlan = function (stubbing, actualArgs, actualContext) {
8812 var value = stubbedValueFor(stubbing);
8813 stubbing.callCount += 1;
8814 invokeCallbackFor(stubbing, actualArgs);
8815 switch (stubbing.config.plan) {
8816 case 'thenReturn': return value;
8817 case 'thenDo': return value.apply(actualContext, actualArgs);
8818 case 'thenThrow': throw value;
8819 case 'thenResolve': return createPromise(stubbing, value, true);
8820 case 'thenReject': return createPromise(stubbing, value, false);
8821 }
8822};
8823var invokeCallbackFor = function (stubbing, actualArgs) {
8824 if (lodash_1.default.some(stubbing.args, is_callback_1.default)) {
8825 lodash_1.default.each(stubbing.args, function (expectedArg, i) {
8826 if (is_callback_1.default(expectedArg)) {
8827 callCallback(stubbing, actualArgs[i], callbackArgs(stubbing, expectedArg));
8828 }
8829 });
8830 }
8831};
8832var callbackArgs = function (stubbing, expectedArg) {
8833 if (expectedArg.args != null) {
8834 return expectedArg.args;
8835 }
8836 else if (stubbing.config.plan === 'thenCallback') {
8837 return stubbing.stubbedValues;
8838 }
8839 else {
8840 return [];
8841 }
8842};
8843var callCallback = function (stubbing, callback, args) {
8844 if (stubbing.config.delay) {
8845 lodash_1.default.delay.apply(lodash_1.default, __spreadArrays([callback, stubbing.config.delay], args));
8846 }
8847 else if (stubbing.config.defer) {
8848 lodash_1.default.defer.apply(lodash_1.default, __spreadArrays([callback], args));
8849 }
8850 else {
8851 callback.apply(void 0, args); // eslint-disable-line
8852 }
8853};
8854var createPromise = function (stubbing, value, willResolve) {
8855 var Promise = config_1.default().promiseConstructor;
8856 ensurePromise(Promise);
8857 return new Promise(function (resolve, reject) {
8858 callCallback(stubbing, function () {
8859 return willResolve ? resolve(value) : reject(value);
8860 }, [value]);
8861 });
8862};
8863var stubbedValueFor = function (stubbing) {
8864 return stubbing.callCount < stubbing.stubbedValues.length
8865 ? stubbing.stubbedValues[stubbing.callCount]
8866 : lodash_1.default.last(stubbing.stubbedValues);
8867};
8868var isSatisfied = function (stubbing, actualArgs) {
8869 return args_match_1.default(stubbing.args, actualArgs, stubbing.config) &&
8870 hasTimesRemaining(stubbing);
8871};
8872var hasTimesRemaining = function (stubbing) {
8873 return stubbing.config.times == null
8874 ? true
8875 : stubbing.callCount < stubbing.config.times;
8876};
8877var ensurePromise = function (Promise) {
8878 if (Promise == null) {
8879 return log_1.default.error('td.when', "no promise constructor is set (perhaps this runtime lacks a native Promise\nfunction?), which means this stubbing can't return a promise to your\nsubject under test, resulting in this error. To resolve the issue, set\na promise constructor with `td.config`, like this:\n\n td.config({\n promiseConstructor: require('bluebird')\n })");
8880 }
8881};
8882
8883},{"../args-match":236,"../config":238,"../log":254,"../matchers/is-callback":263,"../matchers/notify-after-satisfaction":265,"../wrap/lodash":281,"./index":274}],276:[function(require,module,exports){
8884"use strict";
8885Object.defineProperty(exports, "__esModule", { value: true });
8886var lodash_1 = require("../wrap/lodash");
8887var is_matcher_1 = require("../matchers/is-matcher");
8888var stringifyObject = require("stringify-object-es5");
8889exports.default = (function (anything) {
8890 if (lodash_1.default.isString(anything)) {
8891 return stringifyString(anything);
8892 }
8893 else if (is_matcher_1.default(anything)) {
8894 return anything.__name;
8895 }
8896 else if (anything && anything[Symbol('__is_proxy')]) {
8897 return anything.toString();
8898 }
8899 else {
8900 return stringifyObject(anything, {
8901 indent: ' ',
8902 singleQuotes: false,
8903 inlineCharacterLimit: 65,
8904 transform: function (obj, prop, originalResult) {
8905 if (is_matcher_1.default(obj[prop])) {
8906 return obj[prop].__name;
8907 }
8908 else {
8909 return originalResult;
8910 }
8911 }
8912 });
8913 }
8914});
8915var stringifyString = function (string) {
8916 return lodash_1.default.includes(string, '\n')
8917 ? "\"\"\"\n" + string + "\n\"\"\""
8918 : "\"" + string.replace(new RegExp('"', 'g'), '\\"') + "\"";
8919};
8920
8921},{"../matchers/is-matcher":264,"../wrap/lodash":281,"stringify-object-es5":234}],277:[function(require,module,exports){
8922"use strict";
8923Object.defineProperty(exports, "__esModule", { value: true });
8924var lodash_1 = require("../wrap/lodash");
8925var anything_1 = require("./anything");
8926exports.default = (function (args, joiner, wrapper) {
8927 if (joiner === void 0) { joiner = ', '; }
8928 if (wrapper === void 0) { wrapper = ''; }
8929 return lodash_1.default.map(args, function (arg) {
8930 return "" + wrapper + anything_1.default(arg) + wrapper;
8931 }).join(joiner);
8932});
8933
8934},{"../wrap/lodash":281,"./anything":276}],278:[function(require,module,exports){
8935"use strict";
8936Object.defineProperty(exports, "__esModule", { value: true });
8937var lodash_1 = require("./wrap/lodash");
8938var args_match_1 = require("./args-match");
8939var calls_1 = require("./store/calls");
8940var log_1 = require("./log");
8941var store_1 = require("./store");
8942var arguments_1 = require("./stringify/arguments");
8943var stubbings_1 = require("./store/stubbings");
8944var notify_after_satisfaction_1 = require("./matchers/notify-after-satisfaction");
8945exports.default = (function (__userDoesRehearsalInvocationHere__, config) {
8946 if (config === void 0) { config = {}; }
8947 var last = calls_1.default.pop();
8948 ensureRehearsalOccurred(last);
8949 if (calls_1.default.wasInvoked(last.testDouble, last.args, config)) {
8950 notifyMatchers(last.testDouble, last.args, config);
8951 warnIfStubbed(last.testDouble, last.args);
8952 }
8953 else {
8954 log_1.default.fail(unsatisfiedErrorMessage(last.testDouble, last.args, config));
8955 }
8956});
8957var ensureRehearsalOccurred = function (last) {
8958 if (!last) {
8959 log_1.default.error('td.verify', "No test double invocation detected for `verify()`.\n\n Usage:\n verify(myTestDouble('foo'))");
8960 }
8961};
8962var notifyMatchers = function (testDouble, expectedArgs, config) {
8963 lodash_1.default.each(calls_1.default.where(testDouble, expectedArgs, config), function (invocation) {
8964 notify_after_satisfaction_1.default(expectedArgs, invocation.args);
8965 });
8966};
8967var warnIfStubbed = function (testDouble, actualArgs) {
8968 if (lodash_1.default.some(stubbings_1.default.for(testDouble), function (stubbing) {
8969 return args_match_1.default(stubbing.args, actualArgs, stubbing.config);
8970 })) {
8971 log_1.default.warn('td.verify', "test double" + stringifyName(testDouble) + " was both stubbed and verified with arguments (" + arguments_1.default(actualArgs) + "), which is redundant and probably unnecessary.", 'https://github.com/testdouble/testdouble.js/blob/master/docs/B-frequently-asked-questions.md#why-shouldnt-i-call-both-tdwhen-and-tdverify-for-a-single-interaction-with-a-test-double');
8972 }
8973};
8974var unsatisfiedErrorMessage = function (testDouble, args, config) {
8975 return baseSummary(testDouble, args, config) +
8976 matchedInvocationSummary(testDouble, args, config) +
8977 invocationSummary(testDouble, args, config);
8978};
8979var stringifyName = function (testDouble) {
8980 var name = store_1.default.for(testDouble).name;
8981 return name ? " `" + name + "`" : '';
8982};
8983var baseSummary = function (testDouble, args, config) {
8984 return "Unsatisfied verification on test double" + stringifyName(testDouble) + ".\n\n Wanted:\n - called with `(" + arguments_1.default(args) + ")`" + timesMessage(config) + ignoreMessage(config) + ".";
8985};
8986var invocationSummary = function (testDouble, args, config) {
8987 var calls = calls_1.default.for(testDouble);
8988 if (calls.length === 0) {
8989 return '\n\n But there were no invocations of the test double.';
8990 }
8991 else {
8992 return lodash_1.default.reduce(calls, function (desc, call) {
8993 return desc + ("\n - called with `(" + arguments_1.default(call.args) + ")`.");
8994 }, '\n\n All calls of the test double, in order were:');
8995 }
8996};
8997var matchedInvocationSummary = function (testDouble, args, config) {
8998 var calls = calls_1.default.where(testDouble, args, config);
8999 var expectedCalls = config.times || 0;
9000 if (calls.length === 0 || calls.length > expectedCalls) {
9001 return '';
9002 }
9003 else {
9004 return lodash_1.default.reduce(lodash_1.default.groupBy(calls, 'args'), function (desc, callsMatchingArgs, args) {
9005 return desc + ("\n - called " + pluralize(callsMatchingArgs.length, 'time') + " with `(" + arguments_1.default(callsMatchingArgs[0].args) + ")`.");
9006 }, "\n\n " + pluralize(calls.length, 'call') + " that satisfied this verification:");
9007 }
9008};
9009var pluralize = function (x, msg) {
9010 return x + " " + msg + (x === 1 ? '' : 's');
9011};
9012var timesMessage = function (config) {
9013 return config.times != null
9014 ? " " + pluralize(config.times, 'time')
9015 : '';
9016};
9017var ignoreMessage = function (config) {
9018 return config.ignoreExtraArgs != null
9019 ? ', ignoring any additional arguments'
9020 : '';
9021};
9022
9023},{"./args-match":236,"./log":254,"./matchers/notify-after-satisfaction":265,"./store":274,"./store/calls":273,"./store/stubbings":275,"./stringify/arguments":277,"./wrap/lodash":281}],279:[function(require,module,exports){
9024"use strict";
9025Object.defineProperty(exports, "__esModule", { value: true });
9026exports.default = '3.16.1';
9027
9028},{}],280:[function(require,module,exports){
9029"use strict";
9030Object.defineProperty(exports, "__esModule", { value: true });
9031var lodash_1 = require("./wrap/lodash");
9032var callback_1 = require("./callback");
9033var is_callback_1 = require("./matchers/is-callback");
9034var calls_1 = require("./store/calls");
9035var log_1 = require("./log");
9036var stubbings_1 = require("./store/stubbings");
9037var config_1 = require("./config");
9038function when(__userDoesRehearsalInvocationHere__, config) {
9039 if (config === void 0) { config = {}; }
9040 return ({
9041 thenReturn: function () {
9042 var stubbedValues = [];
9043 for (var _i = 0; _i < arguments.length; _i++) {
9044 stubbedValues[_i] = arguments[_i];
9045 }
9046 return addStubbing(stubbedValues, config, 'thenReturn');
9047 },
9048 thenCallback: function () {
9049 var stubbedValues = [];
9050 for (var _i = 0; _i < arguments.length; _i++) {
9051 stubbedValues[_i] = arguments[_i];
9052 }
9053 return addStubbing(stubbedValues, config, 'thenCallback');
9054 },
9055 thenDo: function () {
9056 var stubbedValues = [];
9057 for (var _i = 0; _i < arguments.length; _i++) {
9058 stubbedValues[_i] = arguments[_i];
9059 }
9060 return addStubbing(stubbedValues, config, 'thenDo');
9061 },
9062 thenThrow: function () {
9063 var stubbedValues = [];
9064 for (var _i = 0; _i < arguments.length; _i++) {
9065 stubbedValues[_i] = arguments[_i];
9066 }
9067 return addStubbing(stubbedValues, config, 'thenThrow');
9068 },
9069 thenResolve: function () {
9070 var stubbedValues = [];
9071 for (var _i = 0; _i < arguments.length; _i++) {
9072 stubbedValues[_i] = arguments[_i];
9073 }
9074 warnIfPromiseless();
9075 return addStubbing(stubbedValues, config, 'thenResolve');
9076 },
9077 thenReject: function () {
9078 var stubbedValues = [];
9079 for (var _i = 0; _i < arguments.length; _i++) {
9080 stubbedValues[_i] = arguments[_i];
9081 }
9082 warnIfPromiseless();
9083 return addStubbing(stubbedValues, config, 'thenReject');
9084 }
9085 });
9086}
9087exports.default = when;
9088function addStubbing(stubbedValues, config, plan) {
9089 var last = calls_1.default.pop();
9090 ensureRehearsalOccurred(last);
9091 lodash_1.default.assign(config, { plan: plan });
9092 stubbings_1.default.add(last.testDouble, concatImpliedCallback(last.args, config), stubbedValues, config);
9093 return last.testDouble;
9094}
9095function ensureRehearsalOccurred(last) {
9096 if (!last) {
9097 return log_1.default.error('td.when', "No test double invocation call detected for `when()`.\n\n Usage:\n when(myTestDouble('foo')).thenReturn('bar')");
9098 }
9099}
9100function concatImpliedCallback(args, config) {
9101 if (config.plan !== 'thenCallback') {
9102 return args;
9103 }
9104 else if (!lodash_1.default.some(args, is_callback_1.default)) {
9105 return args.concat(callback_1.default);
9106 }
9107 else {
9108 return args;
9109 }
9110}
9111function warnIfPromiseless() {
9112 if (config_1.default().promiseConstructor == null) {
9113 log_1.default.warn('td.when', "no promise constructor is set, so this `thenResolve` or `thenReject` stubbing\nwill fail if it's satisfied by an invocation on the test double. You can tell\ntestdouble.js which promise constructor to use with `td.config`, like so:\n\n td.config({\n promiseConstructor: require('bluebird')\n })");
9114 }
9115}
9116
9117},{"./callback":237,"./config":238,"./log":254,"./matchers/is-callback":263,"./store/calls":273,"./store/stubbings":275,"./wrap/lodash":281}],281:[function(require,module,exports){
9118"use strict";
9119Object.defineProperty(exports, "__esModule", { value: true });
9120var assign = require("lodash/assign");
9121var capitalize = require("lodash/capitalize");
9122var clone = require("lodash/clone");
9123var cloneDeep = require("lodash/cloneDeep");
9124var cloneDeepWith = require("lodash/cloneDeepWith");
9125var compact = require("lodash/compact");
9126var defer = require("lodash/defer");
9127var delay = require("lodash/delay");
9128var each = require("lodash/each");
9129var every = require("lodash/every");
9130var extend = require("lodash/extend");
9131var filter = require("lodash/filter");
9132var find = require("lodash/find");
9133var findLast = require("lodash/findLast");
9134var get = require("lodash/get");
9135var groupBy = require("lodash/groupBy");
9136var includes = require("lodash/includes");
9137var invoke = require("lodash/invoke");
9138var isArguments = require("lodash/isArguments");
9139var isArray = require("lodash/isArray");
9140var isBoolean = require("lodash/isBoolean");
9141var isEmpty = require("lodash/isEmpty");
9142var isEqual = require("lodash/isEqual");
9143var isEqualWith = require("lodash/isEqualWith");
9144var isFunction = require("lodash/isFunction");
9145var isNumber = require("lodash/isNumber");
9146var isObject = require("lodash/isObject");
9147var isObjectLike = require("lodash/isObjectLike");
9148var isRegExp = require("lodash/isRegExp");
9149var isString = require("lodash/isString");
9150var keys = require("lodash/keys");
9151var last = require("lodash/last");
9152var map = require("lodash/map");
9153var reduce = require("lodash/reduce");
9154var reject = require("lodash/reject");
9155var some = require("lodash/some");
9156var tap = require("lodash/tap");
9157var toArray = require("lodash/toArray");
9158var transform = require("lodash/transform");
9159exports.default = {
9160 assign: assign,
9161 capitalize: capitalize,
9162 clone: clone,
9163 cloneDeep: cloneDeep,
9164 cloneDeepWith: cloneDeepWith,
9165 compact: compact,
9166 defer: defer,
9167 delay: delay,
9168 each: each,
9169 every: every,
9170 extend: extend,
9171 filter: filter,
9172 find: find,
9173 findLast: findLast,
9174 get: get,
9175 groupBy: groupBy,
9176 includes: includes,
9177 invoke: invoke,
9178 isArguments: isArguments,
9179 isArray: isArray,
9180 isBoolean: isBoolean,
9181 isEmpty: isEmpty,
9182 isEqual: isEqual,
9183 isEqualWith: isEqualWith,
9184 isFunction: isFunction,
9185 isNumber: isNumber,
9186 isObject: isObject,
9187 isObjectLike: isObjectLike,
9188 isRegExp: isRegExp,
9189 isString: isString,
9190 keys: keys,
9191 last: last,
9192 map: map,
9193 reduce: reduce,
9194 reject: reject,
9195 some: some,
9196 tap: tap,
9197 toArray: toArray,
9198 transform: transform
9199};
9200
9201},{"lodash/assign":168,"lodash/capitalize":170,"lodash/clone":171,"lodash/cloneDeep":172,"lodash/cloneDeepWith":173,"lodash/compact":174,"lodash/defer":176,"lodash/delay":177,"lodash/each":178,"lodash/every":180,"lodash/extend":181,"lodash/filter":182,"lodash/find":183,"lodash/findLast":185,"lodash/get":188,"lodash/groupBy":189,"lodash/includes":192,"lodash/invoke":193,"lodash/isArguments":194,"lodash/isArray":195,"lodash/isBoolean":197,"lodash/isEmpty":199,"lodash/isEqual":200,"lodash/isEqualWith":201,"lodash/isFunction":202,"lodash/isNumber":205,"lodash/isObject":206,"lodash/isObjectLike":207,"lodash/isRegExp":208,"lodash/isString":210,"lodash/keys":213,"lodash/last":215,"lodash/map":216,"lodash/reduce":220,"lodash/reject":221,"lodash/some":222,"lodash/tap":225,"lodash/toArray":226,"lodash/transform":231}],282:[function(require,module,exports){
9202"use strict";
9203Object.defineProperty(exports, "__esModule", { value: true });
9204var lodash_1 = require("./lodash");
9205function proxySafeCloneDeepWith(thing, callback) {
9206 return lodash_1.default.cloneDeepWith(thing, function (val, key, obj, stack) {
9207 if (isSafeWithProxy(key)) {
9208 return callback(val, key, obj, stack);
9209 }
9210 });
9211}
9212exports.default = proxySafeCloneDeepWith;
9213function isSafeWithProxy(key) {
9214 return key &&
9215 key !== 'constructor' &&
9216 (!key.toString || key.toString() !== 'Symbol(Symbol.toStringTag)');
9217}
9218
9219},{"./lodash":281}]},{},[252])(252)
9220});