UNPKG

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