fluxxor-rails 1.4.2 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7b6d32a893e4ec3097ec4d59f726bb692e950d89
4
- data.tar.gz: a84d5308516767f364898bc4fab340805ff6bd78
3
+ metadata.gz: 3ef884df7d54fece25d83fdaff68aca6ce2b04cd
4
+ data.tar.gz: 422f629a88869d171f0e047ae67df93eb019c43c
5
5
  SHA512:
6
- metadata.gz: 3d400b59589858b2ab674455bb81e4972af3cc37db68cface0c722719c19551fbf6e9b6bebe278c4f1f10ebe8ffda0b540d4a91bf79820a3f7d00338d41f2cac
7
- data.tar.gz: d735cd3b449b51e1a19edfda23fc6280bb65528ae000ebcfec40f9b9d68a794a3f48709ee5f3b7c31b3af42b99e6637b1c8689c76182f458adef683c0cec2049
6
+ metadata.gz: fbbec4c8d1ee047dab95746906855c26249e1aa69428f9de7fc453157444e1b2525fe0ff7c5c4f5a1bd85b70ecf74e7c2cb8c4e15825ca6abb6fdd5cdb824038
7
+ data.tar.gz: fc72ec36d0e6c78217aabacee92c1d3994aed1bf652925d0a92716055dbc55afb4f846ad3ffa363f0f0c434bc7f19b3b80437f490bb2fdbac0c2526972e289f4
@@ -1,5 +1,5 @@
1
1
  module Fluxxor
2
2
  module Rails
3
- VERSION = '1.4.2'
3
+ VERSION = '1.5.0'
4
4
  end
5
5
  end
@@ -99,3 +99,8 @@ Compiled fluxxor.js (1ms) (pid 18880)
99
99
  Served asset /fluxxor.js - 200 OK (7ms)
100
100
  Started GET "/assets/fluxxor.js" for 127.0.0.1 at 2015-09-23 13:53:19 -0500
101
101
  Served asset /fluxxor.js - 200 OK (0ms)
102
+ Started GET "/assets/fluxxor.js" for 127.0.0.1 at 2015-09-23 13:53:43 -0500
103
+ Compiled fluxxor.js (1ms) (pid 19423)
104
+ Served asset /fluxxor.js - 200 OK (7ms)
105
+ Started GET "/assets/fluxxor.js" for 127.0.0.1 at 2015-09-23 13:53:43 -0500
106
+ Served asset /fluxxor.js - 200 OK (0ms)
@@ -79,46 +79,55 @@ return /******/ (function(modules) { // webpackBootstrap
79
79
  /* 1 */
80
80
  /***/ function(module, exports, __webpack_require__) {
81
81
 
82
- module.exports = "1.4.2"
82
+ module.exports = "1.5.0"
83
83
 
84
84
  /***/ },
85
85
  /* 2 */
86
86
  /***/ function(module, exports, __webpack_require__) {
87
87
 
88
- var _clone = __webpack_require__(10),
89
- _mapValues = __webpack_require__(11),
90
- _forOwn = __webpack_require__(12),
91
- _intersection = __webpack_require__(15),
92
- _keys = __webpack_require__(13),
93
- _map = __webpack_require__(17),
94
- _each = __webpack_require__(18),
95
- _size = __webpack_require__(19),
96
- _findKey = __webpack_require__(14),
97
- _uniq = __webpack_require__(16);
88
+ var _clone = __webpack_require__(12),
89
+ _mapValues = __webpack_require__(13),
90
+ _forOwn = __webpack_require__(14),
91
+ _intersection = __webpack_require__(19),
92
+ _keys = __webpack_require__(15),
93
+ _map = __webpack_require__(21),
94
+ _each = __webpack_require__(22),
95
+ _size = __webpack_require__(23),
96
+ _findKey = __webpack_require__(16),
97
+ _uniq = __webpack_require__(20);
98
98
 
99
99
  var Dispatcher = function(stores) {
100
- this.stores = stores;
100
+ this.stores = {};
101
101
  this.currentDispatch = null;
102
+ this.currentActionType = null;
102
103
  this.waitingToDispatch = [];
103
104
 
104
105
  for (var key in stores) {
105
106
  if (stores.hasOwnProperty(key)) {
106
- stores[key].dispatcher = this;
107
+ this.addStore(key, stores[key]);
107
108
  }
108
109
  }
109
110
  };
110
111
 
111
- Dispatcher.prototype.dispatch = function(action) {
112
- if (this.currentDispatch) {
113
- throw new Error("Cannot dispatch an action while another action is being dispatched");
114
- }
112
+ Dispatcher.prototype.addStore = function(name, store) {
113
+ store.dispatcher = this;
114
+ this.stores[name] = store;
115
+ };
115
116
 
117
+ Dispatcher.prototype.dispatch = function(action) {
116
118
  if (!action || !action.type) {
117
119
  throw new Error("Can only dispatch actions with a 'type' property");
118
120
  }
119
121
 
122
+ if (this.currentDispatch) {
123
+ var complaint = "Cannot dispatch an action ('" + action.type + "') while another action ('" +
124
+ this.currentActionType + "') is being dispatched";
125
+ throw new Error(complaint);
126
+ }
127
+
120
128
  this.waitingToDispatch = _clone(this.stores);
121
129
 
130
+ this.currentActionType = action.type;
122
131
  this.currentDispatch = _mapValues(this.stores, function() {
123
132
  return { resolved: false, waitingOn: [], waitCallback: null };
124
133
  });
@@ -126,6 +135,7 @@ return /******/ (function(modules) { // webpackBootstrap
126
135
  try {
127
136
  this.doDispatchLoop(action);
128
137
  } finally {
138
+ this.currentActionType = null;
129
139
  this.currentDispatch = null;
130
140
  }
131
141
  };
@@ -165,7 +175,7 @@ return /******/ (function(modules) { // webpackBootstrap
165
175
  }
166
176
  }, this);
167
177
 
168
- if (!dispatchedThisLoop.length) {
178
+ if (_keys(this.waitingToDispatch).length && !dispatchedThisLoop.length) {
169
179
  var storesWithCircularWaits = _keys(this.waitingToDispatch).join(", ");
170
180
  throw new Error("Indirect circular wait detected among: " + storesWithCircularWaits);
171
181
  }
@@ -225,47 +235,124 @@ return /******/ (function(modules) { // webpackBootstrap
225
235
  /* 3 */
226
236
  /***/ function(module, exports, __webpack_require__) {
227
237
 
238
+ var EventEmitter = __webpack_require__(9),
239
+ inherits = __webpack_require__(11),
240
+ objectPath = __webpack_require__(10),
241
+ _each = __webpack_require__(22),
242
+ _reduce = __webpack_require__(24),
243
+ _isFunction = __webpack_require__(17),
244
+ _isString = __webpack_require__(18);
245
+
228
246
  var Dispatcher = __webpack_require__(2);
229
247
 
230
- function bindActions(target, actions, dispatchBinder) {
231
- for (var key in actions) {
232
- if (actions.hasOwnProperty(key)) {
233
- if (typeof actions[key] === "function") {
234
- target[key] = actions[key].bind(dispatchBinder);
235
- } else if (typeof actions[key] === "object") {
236
- target[key] = {};
237
- bindActions(target[key], actions[key], dispatchBinder);
248
+ var findLeaves = function(obj, path, callback) {
249
+ path = path || [];
250
+
251
+ for (var key in obj) {
252
+ if (obj.hasOwnProperty(key)) {
253
+ if (_isFunction(obj[key])) {
254
+ callback(path.concat(key), obj[key]);
255
+ } else {
256
+ findLeaves(obj[key], path.concat(key), callback);
238
257
  }
239
258
  }
240
259
  }
241
- }
260
+ };
242
261
 
243
262
  var Flux = function(stores, actions) {
244
- var dispatcher = new Dispatcher(stores),
245
- dispatchBinder = {
246
- flux: this,
247
- dispatch: function(type, payload) {
248
- dispatcher.dispatch({type: type, payload: payload});
249
- }
250
- };
251
-
252
- this.dispatcher = dispatcher;
263
+ EventEmitter.call(this);
264
+ this.dispatcher = new Dispatcher(stores);
253
265
  this.actions = {};
254
- this.stores = stores;
266
+ this.stores = {};
267
+
268
+ var dispatcher = this.dispatcher;
269
+ var flux = this;
270
+ this.dispatchBinder = {
271
+ flux: flux,
272
+ dispatch: function(type, payload) {
273
+ try {
274
+ flux.emit("dispatch", type, payload);
275
+ } finally {
276
+ dispatcher.dispatch({type: type, payload: payload});
277
+ }
278
+ }
279
+ };
255
280
 
256
- bindActions(this.actions, actions, dispatchBinder);
281
+ this.addActions(actions);
282
+ this.addStores(stores);
283
+ };
257
284
 
258
- for (var key in stores) {
259
- if (stores.hasOwnProperty(key)) {
260
- stores[key].flux = this;
285
+ inherits(Flux, EventEmitter);
286
+
287
+ Flux.prototype.addActions = function(actions) {
288
+ findLeaves(actions, [], this.addAction.bind(this));
289
+ };
290
+
291
+ // addAction has two signatures:
292
+ // 1: string[, string, string, string...], actionFunction
293
+ // 2: arrayOfStrings, actionFunction
294
+ Flux.prototype.addAction = function() {
295
+ if (arguments.length < 2) {
296
+ throw new Error("addAction requires at least two arguments, a string (or array of strings) and a function");
297
+ }
298
+
299
+ var args = Array.prototype.slice.call(arguments);
300
+
301
+ if (!_isFunction(args[args.length - 1])) {
302
+ throw new Error("The last argument to addAction must be a function");
303
+ }
304
+
305
+ var func = args.pop().bind(this.dispatchBinder);
306
+
307
+ if (!_isString(args[0])) {
308
+ args = args[0];
309
+ }
310
+
311
+ var leadingPaths = _reduce(args, function(acc, next) {
312
+ if (acc) {
313
+ var nextPath = acc[acc.length - 1].concat([next]);
314
+ return acc.concat([nextPath]);
315
+ } else {
316
+ return [[next]];
261
317
  }
318
+ }, null);
319
+
320
+ // Detect trying to replace a function at any point in the path
321
+ _each(leadingPaths, function(path) {
322
+ if (_isFunction(objectPath.get(this.actions, path))) {
323
+ throw new Error("An action named " + args.join(".") + " already exists");
324
+ }
325
+ }, this);
326
+
327
+ // Detect trying to replace a namespace at the final point in the path
328
+ if (objectPath.get(this.actions, args)) {
329
+ throw new Error("A namespace named " + args.join(".") + " already exists");
262
330
  }
331
+
332
+ objectPath.set(this.actions, args, func, true);
263
333
  };
264
334
 
265
335
  Flux.prototype.store = function(name) {
266
336
  return this.stores[name];
267
337
  };
268
338
 
339
+ Flux.prototype.addStore = function(name, store) {
340
+ if (name in this.stores) {
341
+ throw new Error("A store named '" + name + "' already exists");
342
+ }
343
+ store.flux = this;
344
+ this.stores[name] = store;
345
+ this.dispatcher.addStore(name, store);
346
+ };
347
+
348
+ Flux.prototype.addStores = function(stores) {
349
+ for (var key in stores) {
350
+ if (stores.hasOwnProperty(key)) {
351
+ this.addStore(key, stores[key]);
352
+ }
353
+ }
354
+ };
355
+
269
356
  module.exports = Flux;
270
357
 
271
358
 
@@ -275,22 +362,29 @@ return /******/ (function(modules) { // webpackBootstrap
275
362
 
276
363
  var FluxMixin = function(React) {
277
364
  return {
278
- propTypes: {
279
- flux: React.PropTypes.object.isRequired
365
+ componentWillMount: function() {
366
+ if (!this.props.flux && (!this.context || !this.context.flux)) {
367
+ var namePart = this.constructor.displayName ? " of " + this.constructor.displayName : "";
368
+ throw new Error("Could not find flux on this.props or this.context" + namePart);
369
+ }
280
370
  },
281
371
 
282
372
  childContextTypes: {
283
373
  flux: React.PropTypes.object
284
374
  },
285
375
 
376
+ contextTypes: {
377
+ flux: React.PropTypes.object
378
+ },
379
+
286
380
  getChildContext: function() {
287
381
  return {
288
- flux: this.props.flux
382
+ flux: this.getFlux()
289
383
  };
290
384
  },
291
385
 
292
386
  getFlux: function() {
293
- return this.props.flux;
387
+ return this.props.flux || (this.context && this.context.flux);
294
388
  }
295
389
  };
296
390
  };
@@ -309,6 +403,15 @@ return /******/ (function(modules) { // webpackBootstrap
309
403
 
310
404
  var FluxChildMixin = function(React) {
311
405
  return {
406
+ componentWillMount: function() {
407
+ if (console && console.warn) {
408
+ var namePart = this.constructor.displayName ? " in " + this.constructor.displayName : "",
409
+ message = "Fluxxor.FluxChildMixin was found in use" + namePart + ", " +
410
+ "but has been deprecated. Use Fluxxor.FluxMixin instead.";
411
+ console.warn(message);
412
+ }
413
+ },
414
+
312
415
  contextTypes: {
313
416
  flux: React.PropTypes.object
314
417
  },
@@ -331,7 +434,7 @@ return /******/ (function(modules) { // webpackBootstrap
331
434
  /* 6 */
332
435
  /***/ function(module, exports, __webpack_require__) {
333
436
 
334
- var _each = __webpack_require__(18);
437
+ var _each = __webpack_require__(22);
335
438
 
336
439
  var StoreWatchMixin = function() {
337
440
  var storeNames = Array.prototype.slice.call(arguments);
@@ -375,9 +478,10 @@ return /******/ (function(modules) { // webpackBootstrap
375
478
  /* 7 */
376
479
  /***/ function(module, exports, __webpack_require__) {
377
480
 
378
- var _each = __webpack_require__(18),
481
+ var _each = __webpack_require__(22),
482
+ _isFunction = __webpack_require__(17),
379
483
  Store = __webpack_require__(8),
380
- inherits = __webpack_require__(9);
484
+ inherits = __webpack_require__(11);
381
485
 
382
486
  var RESERVED_KEYS = ["flux", "waitFor"];
383
487
 
@@ -394,10 +498,10 @@ return /******/ (function(modules) { // webpackBootstrap
394
498
 
395
499
  for (var key in spec) {
396
500
  if (key === "actions") {
397
- this.__actions__ = spec[key];
501
+ this.bindActions(spec[key]);
398
502
  } else if (key === "initialize") {
399
503
  // do nothing
400
- } else if (typeof spec[key] === "function") {
504
+ } else if (_isFunction(spec[key])) {
401
505
  this[key] = spec[key].bind(this);
402
506
  } else {
403
507
  this[key] = spec[key];
@@ -420,8 +524,10 @@ return /******/ (function(modules) { // webpackBootstrap
420
524
  /* 8 */
421
525
  /***/ function(module, exports, __webpack_require__) {
422
526
 
423
- var EventEmitter = __webpack_require__(20),
424
- inherits = __webpack_require__(9);
527
+ var EventEmitter = __webpack_require__(9),
528
+ inherits = __webpack_require__(11),
529
+ _isFunction = __webpack_require__(17),
530
+ _isObject = __webpack_require__(25);
425
531
 
426
532
  function Store(dispatcher) {
427
533
  this.dispatcher = dispatcher;
@@ -434,10 +540,12 @@ return /******/ (function(modules) { // webpackBootstrap
434
540
  Store.prototype.__handleAction__ = function(action) {
435
541
  var handler;
436
542
  if (!!(handler = this.__actions__[action.type])) {
437
- if (typeof handler === "function") {
543
+ if (_isFunction(handler)) {
438
544
  handler.call(this, action.payload, action.type);
439
- } else if (handler && typeof this[handler] === "function") {
545
+ } else if (handler && _isFunction(this[handler])) {
440
546
  this[handler].call(this, action.payload, action.type);
547
+ } else {
548
+ throw new Error("The handler for action type " + action.type + " is not a function");
441
549
  }
442
550
  return true;
443
551
  } else {
@@ -447,19 +555,37 @@ return /******/ (function(modules) { // webpackBootstrap
447
555
 
448
556
  Store.prototype.bindActions = function() {
449
557
  var actions = Array.prototype.slice.call(arguments);
450
- if (actions.length % 2 !== 0) {
558
+
559
+ if (actions.length > 1 && actions.length % 2 !== 0) {
451
560
  throw new Error("bindActions must take an even number of arguments.");
452
561
  }
453
562
 
454
- for (var i = 0; i < actions.length; i += 2) {
455
- var type = actions[i],
456
- handler = actions[i+1];
457
-
458
- if (!type) {
459
- throw new Error("Argument " + (i+1) + " to bindActions is a falsy value");
563
+ var bindAction = function(type, handler) {
564
+ if (!handler) {
565
+ throw new Error("The handler for action type " + type + " is falsy");
460
566
  }
461
567
 
462
568
  this.__actions__[type] = handler;
569
+ }.bind(this);
570
+
571
+ if (actions.length === 1 && _isObject(actions[0])) {
572
+ actions = actions[0];
573
+ for (var key in actions) {
574
+ if (actions.hasOwnProperty(key)) {
575
+ bindAction(key, actions[key]);
576
+ }
577
+ }
578
+ } else {
579
+ for (var i = 0; i < actions.length; i += 2) {
580
+ var type = actions[i],
581
+ handler = actions[i+1];
582
+
583
+ if (!type) {
584
+ throw new Error("Argument " + (i+1) + " to bindActions is a falsy value");
585
+ }
586
+
587
+ bindAction(type, handler);
588
+ }
463
589
  }
464
590
  };
465
591
 
@@ -474,179 +600,635 @@ return /******/ (function(modules) { // webpackBootstrap
474
600
  /* 9 */
475
601
  /***/ function(module, exports, __webpack_require__) {
476
602
 
477
- if (typeof Object.create === 'function') {
478
- // implementation from standard node.js 'util' module
479
- module.exports = function inherits(ctor, superCtor) {
480
- ctor.super_ = superCtor
481
- ctor.prototype = Object.create(superCtor.prototype, {
482
- constructor: {
483
- value: ctor,
484
- enumerable: false,
485
- writable: true,
486
- configurable: true
487
- }
488
- });
489
- };
490
- } else {
491
- // old school shim for old browsers
492
- module.exports = function inherits(ctor, superCtor) {
493
- ctor.super_ = superCtor
494
- var TempCtor = function () {}
495
- TempCtor.prototype = superCtor.prototype
496
- ctor.prototype = new TempCtor()
497
- ctor.prototype.constructor = ctor
498
- }
499
- }
500
-
501
-
502
- /***/ },
503
- /* 10 */
504
- /***/ function(module, exports, __webpack_require__) {
505
-
506
- /**
507
- * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/>
508
- * Build: `lodash modularize modern exports="node" -o ./modern/`
509
- * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
510
- * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
511
- * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
512
- * Available under MIT license <http://lodash.com/license>
513
- */
514
- var baseClone = __webpack_require__(24),
515
- baseCreateCallback = __webpack_require__(25);
603
+ 'use strict';
516
604
 
517
605
  /**
518
- * Creates a clone of `value`. If `isDeep` is `true` nested objects will also
519
- * be cloned, otherwise they will be assigned by reference. If a callback
520
- * is provided it will be executed to produce the cloned values. If the
521
- * callback returns `undefined` cloning will be handled by the method instead.
522
- * The callback is bound to `thisArg` and invoked with one argument; (value).
523
- *
524
- * @static
525
- * @memberOf _
526
- * @category Objects
527
- * @param {*} value The value to clone.
528
- * @param {boolean} [isDeep=false] Specify a deep clone.
529
- * @param {Function} [callback] The function to customize cloning values.
530
- * @param {*} [thisArg] The `this` binding of `callback`.
531
- * @returns {*} Returns the cloned value.
532
- * @example
533
- *
534
- * var characters = [
535
- * { 'name': 'barney', 'age': 36 },
536
- * { 'name': 'fred', 'age': 40 }
537
- * ];
538
- *
539
- * var shallow = _.clone(characters);
540
- * shallow[0] === characters[0];
541
- * // => true
542
- *
543
- * var deep = _.clone(characters, true);
544
- * deep[0] === characters[0];
545
- * // => false
546
- *
547
- * _.mixin({
548
- * 'clone': _.partialRight(_.clone, function(value) {
549
- * return _.isElement(value) ? value.cloneNode(false) : undefined;
550
- * })
551
- * });
606
+ * Representation of a single EventEmitter function.
552
607
  *
553
- * var clone = _.clone(document.body);
554
- * clone.childNodes.length;
555
- * // => 0
608
+ * @param {Function} fn Event handler to be called.
609
+ * @param {Mixed} context Context for function execution.
610
+ * @param {Boolean} once Only emit once
611
+ * @api private
556
612
  */
557
- function clone(value, isDeep, callback, thisArg) {
558
- // allows working with "Collections" methods without using their `index`
559
- // and `collection` arguments for `isDeep` and `callback`
560
- if (typeof isDeep != 'boolean' && isDeep != null) {
561
- thisArg = callback;
562
- callback = isDeep;
563
- isDeep = false;
564
- }
565
- return baseClone(value, isDeep, typeof callback == 'function' && baseCreateCallback(callback, thisArg, 1));
613
+ function EE(fn, context, once) {
614
+ this.fn = fn;
615
+ this.context = context;
616
+ this.once = once || false;
566
617
  }
567
618
 
568
- module.exports = clone;
569
-
570
-
571
- /***/ },
572
- /* 11 */
573
- /***/ function(module, exports, __webpack_require__) {
574
-
575
619
  /**
576
- * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/>
577
- * Build: `lodash modularize modern exports="node" -o ./modern/`
578
- * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
579
- * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
580
- * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
581
- * Available under MIT license <http://lodash.com/license>
620
+ * Minimal EventEmitter interface that is molded against the Node.js
621
+ * EventEmitter interface.
622
+ *
623
+ * @constructor
624
+ * @api public
582
625
  */
583
- var createCallback = __webpack_require__(37),
584
- forOwn = __webpack_require__(12);
626
+ function EventEmitter() { /* Nothing to set */ }
585
627
 
586
628
  /**
587
- * Creates an object with the same keys as `object` and values generated by
588
- * running each own enumerable property of `object` through the callback.
589
- * The callback is bound to `thisArg` and invoked with three arguments;
590
- * (value, key, object).
591
- *
592
- * If a property name is provided for `callback` the created "_.pluck" style
593
- * callback will return the property value of the given element.
594
- *
595
- * If an object is provided for `callback` the created "_.where" style callback
596
- * will return `true` for elements that have the properties of the given object,
597
- * else `false`.
598
- *
599
- * @static
600
- * @memberOf _
601
- * @category Objects
602
- * @param {Object} object The object to iterate over.
603
- * @param {Function|Object|string} [callback=identity] The function called
604
- * per iteration. If a property name or object is provided it will be used
605
- * to create a "_.pluck" or "_.where" style callback, respectively.
606
- * @param {*} [thisArg] The `this` binding of `callback`.
607
- * @returns {Array} Returns a new object with values of the results of each `callback` execution.
608
- * @example
609
- *
610
- * _.mapValues({ 'a': 1, 'b': 2, 'c': 3} , function(num) { return num * 3; });
611
- * // => { 'a': 3, 'b': 6, 'c': 9 }
612
- *
613
- * var characters = {
614
- * 'fred': { 'name': 'fred', 'age': 40 },
615
- * 'pebbles': { 'name': 'pebbles', 'age': 1 }
616
- * };
629
+ * Holds the assigned EventEmitters by name.
617
630
  *
618
- * // using "_.pluck" callback shorthand
619
- * _.mapValues(characters, 'age');
620
- * // => { 'fred': 40, 'pebbles': 1 }
631
+ * @type {Object}
632
+ * @private
621
633
  */
622
- function mapValues(object, callback, thisArg) {
623
- var result = {};
624
- callback = createCallback(callback, thisArg, 3);
625
-
626
- forOwn(object, function(value, key, object) {
627
- result[key] = callback(value, key, object);
628
- });
629
- return result;
630
- }
634
+ EventEmitter.prototype._events = undefined;
631
635
 
632
- module.exports = mapValues;
633
-
634
-
635
- /***/ },
636
- /* 12 */
637
- /***/ function(module, exports, __webpack_require__) {
638
-
639
636
  /**
640
- * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/>
641
- * Build: `lodash modularize modern exports="node" -o ./modern/`
642
- * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
643
- * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
644
- * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
645
- * Available under MIT license <http://lodash.com/license>
637
+ * Return a list of assigned event listeners.
638
+ *
639
+ * @param {String} event The events that should be listed.
640
+ * @returns {Array}
641
+ * @api public
646
642
  */
647
- var baseCreateCallback = __webpack_require__(25),
648
- keys = __webpack_require__(13),
649
- objectTypes = __webpack_require__(26);
643
+ EventEmitter.prototype.listeners = function listeners(event) {
644
+ if (!this._events || !this._events[event]) return [];
645
+
646
+ for (var i = 0, l = this._events[event].length, ee = []; i < l; i++) {
647
+ ee.push(this._events[event][i].fn);
648
+ }
649
+
650
+ return ee;
651
+ };
652
+
653
+ /**
654
+ * Emit an event to all registered event listeners.
655
+ *
656
+ * @param {String} event The name of the event.
657
+ * @returns {Boolean} Indication if we've emitted an event.
658
+ * @api public
659
+ */
660
+ EventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) {
661
+ if (!this._events || !this._events[event]) return false;
662
+
663
+ var listeners = this._events[event]
664
+ , length = listeners.length
665
+ , len = arguments.length
666
+ , ee = listeners[0]
667
+ , args
668
+ , i, j;
669
+
670
+ if (1 === length) {
671
+ if (ee.once) this.removeListener(event, ee.fn, true);
672
+
673
+ switch (len) {
674
+ case 1: return ee.fn.call(ee.context), true;
675
+ case 2: return ee.fn.call(ee.context, a1), true;
676
+ case 3: return ee.fn.call(ee.context, a1, a2), true;
677
+ case 4: return ee.fn.call(ee.context, a1, a2, a3), true;
678
+ case 5: return ee.fn.call(ee.context, a1, a2, a3, a4), true;
679
+ case 6: return ee.fn.call(ee.context, a1, a2, a3, a4, a5), true;
680
+ }
681
+
682
+ for (i = 1, args = new Array(len -1); i < len; i++) {
683
+ args[i - 1] = arguments[i];
684
+ }
685
+
686
+ ee.fn.apply(ee.context, args);
687
+ } else {
688
+ for (i = 0; i < length; i++) {
689
+ if (listeners[i].once) this.removeListener(event, listeners[i].fn, true);
690
+
691
+ switch (len) {
692
+ case 1: listeners[i].fn.call(listeners[i].context); break;
693
+ case 2: listeners[i].fn.call(listeners[i].context, a1); break;
694
+ case 3: listeners[i].fn.call(listeners[i].context, a1, a2); break;
695
+ default:
696
+ if (!args) for (j = 1, args = new Array(len -1); j < len; j++) {
697
+ args[j - 1] = arguments[j];
698
+ }
699
+
700
+ listeners[i].fn.apply(listeners[i].context, args);
701
+ }
702
+ }
703
+ }
704
+
705
+ return true;
706
+ };
707
+
708
+ /**
709
+ * Register a new EventListener for the given event.
710
+ *
711
+ * @param {String} event Name of the event.
712
+ * @param {Functon} fn Callback function.
713
+ * @param {Mixed} context The context of the function.
714
+ * @api public
715
+ */
716
+ EventEmitter.prototype.on = function on(event, fn, context) {
717
+ if (!this._events) this._events = {};
718
+ if (!this._events[event]) this._events[event] = [];
719
+ this._events[event].push(new EE( fn, context || this ));
720
+
721
+ return this;
722
+ };
723
+
724
+ /**
725
+ * Add an EventListener that's only called once.
726
+ *
727
+ * @param {String} event Name of the event.
728
+ * @param {Function} fn Callback function.
729
+ * @param {Mixed} context The context of the function.
730
+ * @api public
731
+ */
732
+ EventEmitter.prototype.once = function once(event, fn, context) {
733
+ if (!this._events) this._events = {};
734
+ if (!this._events[event]) this._events[event] = [];
735
+ this._events[event].push(new EE(fn, context || this, true ));
736
+
737
+ return this;
738
+ };
739
+
740
+ /**
741
+ * Remove event listeners.
742
+ *
743
+ * @param {String} event The event we want to remove.
744
+ * @param {Function} fn The listener that we need to find.
745
+ * @param {Boolean} once Only remove once listeners.
746
+ * @api public
747
+ */
748
+ EventEmitter.prototype.removeListener = function removeListener(event, fn, once) {
749
+ if (!this._events || !this._events[event]) return this;
750
+
751
+ var listeners = this._events[event]
752
+ , events = [];
753
+
754
+ if (fn) for (var i = 0, length = listeners.length; i < length; i++) {
755
+ if (listeners[i].fn !== fn && listeners[i].once !== once) {
756
+ events.push(listeners[i]);
757
+ }
758
+ }
759
+
760
+ //
761
+ // Reset the array, or remove it completely if we have no more listeners.
762
+ //
763
+ if (events.length) this._events[event] = events;
764
+ else this._events[event] = null;
765
+
766
+ return this;
767
+ };
768
+
769
+ /**
770
+ * Remove all listeners or only the listeners for the specified event.
771
+ *
772
+ * @param {String} event The event want to remove all listeners for.
773
+ * @api public
774
+ */
775
+ EventEmitter.prototype.removeAllListeners = function removeAllListeners(event) {
776
+ if (!this._events) return this;
777
+
778
+ if (event) this._events[event] = null;
779
+ else this._events = {};
780
+
781
+ return this;
782
+ };
783
+
784
+ //
785
+ // Alias methods names because people roll like that.
786
+ //
787
+ EventEmitter.prototype.off = EventEmitter.prototype.removeListener;
788
+ EventEmitter.prototype.addListener = EventEmitter.prototype.on;
789
+
790
+ //
791
+ // This function doesn't apply anymore.
792
+ //
793
+ EventEmitter.prototype.setMaxListeners = function setMaxListeners() {
794
+ return this;
795
+ };
796
+
797
+ //
798
+ // Expose the module.
799
+ //
800
+ EventEmitter.EventEmitter = EventEmitter;
801
+ EventEmitter.EventEmitter2 = EventEmitter;
802
+ EventEmitter.EventEmitter3 = EventEmitter;
803
+
804
+ if ('object' === typeof module && module.exports) {
805
+ module.exports = EventEmitter;
806
+ }
807
+
808
+
809
+ /***/ },
810
+ /* 10 */
811
+ /***/ function(module, exports, __webpack_require__) {
812
+
813
+ var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (root, factory){
814
+ 'use strict';
815
+
816
+ /*istanbul ignore next:cant test*/
817
+ if (typeof module === 'object' && typeof module.exports === 'object') {
818
+ module.exports = factory();
819
+ } else if (true) {
820
+ // AMD. Register as an anonymous module.
821
+ !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (factory.apply(null, __WEBPACK_AMD_DEFINE_ARRAY__)), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
822
+ } else {
823
+ // Browser globals
824
+ root.objectPath = factory();
825
+ }
826
+ })(this, function(){
827
+ 'use strict';
828
+
829
+ var
830
+ toStr = Object.prototype.toString,
831
+ _hasOwnProperty = Object.prototype.hasOwnProperty;
832
+
833
+ function isEmpty(value){
834
+ if (!value) {
835
+ return true;
836
+ }
837
+ if (isArray(value) && value.length === 0) {
838
+ return true;
839
+ } else {
840
+ for (var i in value) {
841
+ if (_hasOwnProperty.call(value, i)) {
842
+ return false;
843
+ }
844
+ }
845
+ return true;
846
+ }
847
+ }
848
+
849
+ function toString(type){
850
+ return toStr.call(type);
851
+ }
852
+
853
+ function isNumber(value){
854
+ return typeof value === 'number' || toString(value) === "[object Number]";
855
+ }
856
+
857
+ function isString(obj){
858
+ return typeof obj === 'string' || toString(obj) === "[object String]";
859
+ }
860
+
861
+ function isObject(obj){
862
+ return typeof obj === 'object' && toString(obj) === "[object Object]";
863
+ }
864
+
865
+ function isArray(obj){
866
+ return typeof obj === 'object' && typeof obj.length === 'number' && toString(obj) === '[object Array]';
867
+ }
868
+
869
+ function isBoolean(obj){
870
+ return typeof obj === 'boolean' || toString(obj) === '[object Boolean]';
871
+ }
872
+
873
+ function getKey(key){
874
+ var intKey = parseInt(key);
875
+ if (intKey.toString() === key) {
876
+ return intKey;
877
+ }
878
+ return key;
879
+ }
880
+
881
+ function set(obj, path, value, doNotReplace){
882
+ if (isNumber(path)) {
883
+ path = [path];
884
+ }
885
+ if (isEmpty(path)) {
886
+ return obj;
887
+ }
888
+ if (isString(path)) {
889
+ return set(obj, path.split('.'), value, doNotReplace);
890
+ }
891
+ var currentPath = getKey(path[0]);
892
+
893
+ if (path.length === 1) {
894
+ var oldVal = obj[currentPath];
895
+ if (oldVal === void 0 || !doNotReplace) {
896
+ obj[currentPath] = value;
897
+ }
898
+ return oldVal;
899
+ }
900
+
901
+ if (obj[currentPath] === void 0) {
902
+ if (isNumber(currentPath)) {
903
+ obj[currentPath] = [];
904
+ } else {
905
+ obj[currentPath] = {};
906
+ }
907
+ }
908
+
909
+ return set(obj[currentPath], path.slice(1), value, doNotReplace);
910
+ }
911
+
912
+ function del(obj, path) {
913
+ if (isNumber(path)) {
914
+ path = [path];
915
+ }
916
+
917
+ if (isEmpty(obj)) {
918
+ return void 0;
919
+ }
920
+
921
+ if (isEmpty(path)) {
922
+ return obj;
923
+ }
924
+ if(isString(path)) {
925
+ return del(obj, path.split('.'));
926
+ }
927
+
928
+ var currentPath = getKey(path[0]);
929
+ var oldVal = obj[currentPath];
930
+
931
+ if(path.length === 1) {
932
+ if (oldVal !== void 0) {
933
+ if (isArray(obj)) {
934
+ obj.splice(currentPath, 1);
935
+ } else {
936
+ delete obj[currentPath];
937
+ }
938
+ }
939
+ } else {
940
+ if (obj[currentPath] !== void 0) {
941
+ return del(obj[currentPath], path.slice(1));
942
+ }
943
+ }
944
+
945
+ return obj;
946
+ }
947
+
948
+ var objectPath = {};
949
+
950
+ objectPath.ensureExists = function (obj, path, value){
951
+ return set(obj, path, value, true);
952
+ };
953
+
954
+ objectPath.set = function (obj, path, value, doNotReplace){
955
+ return set(obj, path, value, doNotReplace);
956
+ };
957
+
958
+ objectPath.insert = function (obj, path, value, at){
959
+ var arr = objectPath.get(obj, path);
960
+ at = ~~at;
961
+ if (!isArray(arr)) {
962
+ arr = [];
963
+ objectPath.set(obj, path, arr);
964
+ }
965
+ arr.splice(at, 0, value);
966
+ };
967
+
968
+ objectPath.empty = function(obj, path) {
969
+ if (isEmpty(path)) {
970
+ return obj;
971
+ }
972
+ if (isEmpty(obj)) {
973
+ return void 0;
974
+ }
975
+
976
+ var value, i;
977
+ if (!(value = objectPath.get(obj, path))) {
978
+ return obj;
979
+ }
980
+
981
+ if (isString(value)) {
982
+ return objectPath.set(obj, path, '');
983
+ } else if (isBoolean(value)) {
984
+ return objectPath.set(obj, path, false);
985
+ } else if (isNumber(value)) {
986
+ return objectPath.set(obj, path, 0);
987
+ } else if (isArray(value)) {
988
+ value.length = 0;
989
+ } else if (isObject(value)) {
990
+ for (i in value) {
991
+ if (_hasOwnProperty.call(value, i)) {
992
+ delete value[i];
993
+ }
994
+ }
995
+ } else {
996
+ return objectPath.set(obj, path, null);
997
+ }
998
+ };
999
+
1000
+ objectPath.push = function (obj, path /*, values */){
1001
+ var arr = objectPath.get(obj, path);
1002
+ if (!isArray(arr)) {
1003
+ arr = [];
1004
+ objectPath.set(obj, path, arr);
1005
+ }
1006
+
1007
+ arr.push.apply(arr, Array.prototype.slice.call(arguments, 2));
1008
+ };
1009
+
1010
+ objectPath.coalesce = function (obj, paths, defaultValue) {
1011
+ var value;
1012
+
1013
+ for (var i = 0, len = paths.length; i < len; i++) {
1014
+ if ((value = objectPath.get(obj, paths[i])) !== void 0) {
1015
+ return value;
1016
+ }
1017
+ }
1018
+
1019
+ return defaultValue;
1020
+ };
1021
+
1022
+ objectPath.get = function (obj, path, defaultValue){
1023
+ if (isNumber(path)) {
1024
+ path = [path];
1025
+ }
1026
+ if (isEmpty(path)) {
1027
+ return obj;
1028
+ }
1029
+ if (isEmpty(obj)) {
1030
+ return defaultValue;
1031
+ }
1032
+ if (isString(path)) {
1033
+ return objectPath.get(obj, path.split('.'), defaultValue);
1034
+ }
1035
+
1036
+ var currentPath = getKey(path[0]);
1037
+
1038
+ if (path.length === 1) {
1039
+ if (obj[currentPath] === void 0) {
1040
+ return defaultValue;
1041
+ }
1042
+ return obj[currentPath];
1043
+ }
1044
+
1045
+ return objectPath.get(obj[currentPath], path.slice(1), defaultValue);
1046
+ };
1047
+
1048
+ objectPath.del = function(obj, path) {
1049
+ return del(obj, path);
1050
+ };
1051
+
1052
+ return objectPath;
1053
+ });
1054
+
1055
+ /***/ },
1056
+ /* 11 */
1057
+ /***/ function(module, exports, __webpack_require__) {
1058
+
1059
+ if (typeof Object.create === 'function') {
1060
+ // implementation from standard node.js 'util' module
1061
+ module.exports = function inherits(ctor, superCtor) {
1062
+ ctor.super_ = superCtor
1063
+ ctor.prototype = Object.create(superCtor.prototype, {
1064
+ constructor: {
1065
+ value: ctor,
1066
+ enumerable: false,
1067
+ writable: true,
1068
+ configurable: true
1069
+ }
1070
+ });
1071
+ };
1072
+ } else {
1073
+ // old school shim for old browsers
1074
+ module.exports = function inherits(ctor, superCtor) {
1075
+ ctor.super_ = superCtor
1076
+ var TempCtor = function () {}
1077
+ TempCtor.prototype = superCtor.prototype
1078
+ ctor.prototype = new TempCtor()
1079
+ ctor.prototype.constructor = ctor
1080
+ }
1081
+ }
1082
+
1083
+
1084
+ /***/ },
1085
+ /* 12 */
1086
+ /***/ function(module, exports, __webpack_require__) {
1087
+
1088
+ /**
1089
+ * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/>
1090
+ * Build: `lodash modularize modern exports="node" -o ./modern/`
1091
+ * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
1092
+ * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
1093
+ * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
1094
+ * Available under MIT license <http://lodash.com/license>
1095
+ */
1096
+ var baseClone = __webpack_require__(29),
1097
+ baseCreateCallback = __webpack_require__(30);
1098
+
1099
+ /**
1100
+ * Creates a clone of `value`. If `isDeep` is `true` nested objects will also
1101
+ * be cloned, otherwise they will be assigned by reference. If a callback
1102
+ * is provided it will be executed to produce the cloned values. If the
1103
+ * callback returns `undefined` cloning will be handled by the method instead.
1104
+ * The callback is bound to `thisArg` and invoked with one argument; (value).
1105
+ *
1106
+ * @static
1107
+ * @memberOf _
1108
+ * @category Objects
1109
+ * @param {*} value The value to clone.
1110
+ * @param {boolean} [isDeep=false] Specify a deep clone.
1111
+ * @param {Function} [callback] The function to customize cloning values.
1112
+ * @param {*} [thisArg] The `this` binding of `callback`.
1113
+ * @returns {*} Returns the cloned value.
1114
+ * @example
1115
+ *
1116
+ * var characters = [
1117
+ * { 'name': 'barney', 'age': 36 },
1118
+ * { 'name': 'fred', 'age': 40 }
1119
+ * ];
1120
+ *
1121
+ * var shallow = _.clone(characters);
1122
+ * shallow[0] === characters[0];
1123
+ * // => true
1124
+ *
1125
+ * var deep = _.clone(characters, true);
1126
+ * deep[0] === characters[0];
1127
+ * // => false
1128
+ *
1129
+ * _.mixin({
1130
+ * 'clone': _.partialRight(_.clone, function(value) {
1131
+ * return _.isElement(value) ? value.cloneNode(false) : undefined;
1132
+ * })
1133
+ * });
1134
+ *
1135
+ * var clone = _.clone(document.body);
1136
+ * clone.childNodes.length;
1137
+ * // => 0
1138
+ */
1139
+ function clone(value, isDeep, callback, thisArg) {
1140
+ // allows working with "Collections" methods without using their `index`
1141
+ // and `collection` arguments for `isDeep` and `callback`
1142
+ if (typeof isDeep != 'boolean' && isDeep != null) {
1143
+ thisArg = callback;
1144
+ callback = isDeep;
1145
+ isDeep = false;
1146
+ }
1147
+ return baseClone(value, isDeep, typeof callback == 'function' && baseCreateCallback(callback, thisArg, 1));
1148
+ }
1149
+
1150
+ module.exports = clone;
1151
+
1152
+
1153
+ /***/ },
1154
+ /* 13 */
1155
+ /***/ function(module, exports, __webpack_require__) {
1156
+
1157
+ /**
1158
+ * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/>
1159
+ * Build: `lodash modularize modern exports="node" -o ./modern/`
1160
+ * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
1161
+ * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
1162
+ * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
1163
+ * Available under MIT license <http://lodash.com/license>
1164
+ */
1165
+ var createCallback = __webpack_require__(28),
1166
+ forOwn = __webpack_require__(14);
1167
+
1168
+ /**
1169
+ * Creates an object with the same keys as `object` and values generated by
1170
+ * running each own enumerable property of `object` through the callback.
1171
+ * The callback is bound to `thisArg` and invoked with three arguments;
1172
+ * (value, key, object).
1173
+ *
1174
+ * If a property name is provided for `callback` the created "_.pluck" style
1175
+ * callback will return the property value of the given element.
1176
+ *
1177
+ * If an object is provided for `callback` the created "_.where" style callback
1178
+ * will return `true` for elements that have the properties of the given object,
1179
+ * else `false`.
1180
+ *
1181
+ * @static
1182
+ * @memberOf _
1183
+ * @category Objects
1184
+ * @param {Object} object The object to iterate over.
1185
+ * @param {Function|Object|string} [callback=identity] The function called
1186
+ * per iteration. If a property name or object is provided it will be used
1187
+ * to create a "_.pluck" or "_.where" style callback, respectively.
1188
+ * @param {*} [thisArg] The `this` binding of `callback`.
1189
+ * @returns {Array} Returns a new object with values of the results of each `callback` execution.
1190
+ * @example
1191
+ *
1192
+ * _.mapValues({ 'a': 1, 'b': 2, 'c': 3} , function(num) { return num * 3; });
1193
+ * // => { 'a': 3, 'b': 6, 'c': 9 }
1194
+ *
1195
+ * var characters = {
1196
+ * 'fred': { 'name': 'fred', 'age': 40 },
1197
+ * 'pebbles': { 'name': 'pebbles', 'age': 1 }
1198
+ * };
1199
+ *
1200
+ * // using "_.pluck" callback shorthand
1201
+ * _.mapValues(characters, 'age');
1202
+ * // => { 'fred': 40, 'pebbles': 1 }
1203
+ */
1204
+ function mapValues(object, callback, thisArg) {
1205
+ var result = {};
1206
+ callback = createCallback(callback, thisArg, 3);
1207
+
1208
+ forOwn(object, function(value, key, object) {
1209
+ result[key] = callback(value, key, object);
1210
+ });
1211
+ return result;
1212
+ }
1213
+
1214
+ module.exports = mapValues;
1215
+
1216
+
1217
+ /***/ },
1218
+ /* 14 */
1219
+ /***/ function(module, exports, __webpack_require__) {
1220
+
1221
+ /**
1222
+ * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/>
1223
+ * Build: `lodash modularize modern exports="node" -o ./modern/`
1224
+ * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
1225
+ * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
1226
+ * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
1227
+ * Available under MIT license <http://lodash.com/license>
1228
+ */
1229
+ var baseCreateCallback = __webpack_require__(30),
1230
+ keys = __webpack_require__(15),
1231
+ objectTypes = __webpack_require__(31);
650
1232
 
651
1233
  /**
652
1234
  * Iterates over own enumerable properties of an object, executing the callback
@@ -689,7 +1271,7 @@ return /******/ (function(modules) { // webpackBootstrap
689
1271
 
690
1272
 
691
1273
  /***/ },
692
- /* 13 */
1274
+ /* 15 */
693
1275
  /***/ function(module, exports, __webpack_require__) {
694
1276
 
695
1277
  /**
@@ -700,9 +1282,9 @@ return /******/ (function(modules) { // webpackBootstrap
700
1282
  * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
701
1283
  * Available under MIT license <http://lodash.com/license>
702
1284
  */
703
- var isNative = __webpack_require__(27),
704
- isObject = __webpack_require__(21),
705
- shimKeys = __webpack_require__(28);
1285
+ var isNative = __webpack_require__(32),
1286
+ isObject = __webpack_require__(25),
1287
+ shimKeys = __webpack_require__(33);
706
1288
 
707
1289
  /* Native method shortcuts for methods with the same name as other `lodash` methods */
708
1290
  var nativeKeys = isNative(nativeKeys = Object.keys) && nativeKeys;
@@ -731,7 +1313,7 @@ return /******/ (function(modules) { // webpackBootstrap
731
1313
 
732
1314
 
733
1315
  /***/ },
734
- /* 14 */
1316
+ /* 16 */
735
1317
  /***/ function(module, exports, __webpack_require__) {
736
1318
 
737
1319
  /**
@@ -742,8 +1324,8 @@ return /******/ (function(modules) { // webpackBootstrap
742
1324
  * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
743
1325
  * Available under MIT license <http://lodash.com/license>
744
1326
  */
745
- var createCallback = __webpack_require__(37),
746
- forOwn = __webpack_require__(12);
1327
+ var createCallback = __webpack_require__(28),
1328
+ forOwn = __webpack_require__(14);
747
1329
 
748
1330
  /**
749
1331
  * This method is like `_.findIndex` except that it returns the key of the
@@ -802,7 +1384,83 @@ return /******/ (function(modules) { // webpackBootstrap
802
1384
 
803
1385
 
804
1386
  /***/ },
805
- /* 15 */
1387
+ /* 17 */
1388
+ /***/ function(module, exports, __webpack_require__) {
1389
+
1390
+ /**
1391
+ * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/>
1392
+ * Build: `lodash modularize modern exports="node" -o ./modern/`
1393
+ * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
1394
+ * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
1395
+ * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
1396
+ * Available under MIT license <http://lodash.com/license>
1397
+ */
1398
+
1399
+ /**
1400
+ * Checks if `value` is a function.
1401
+ *
1402
+ * @static
1403
+ * @memberOf _
1404
+ * @category Objects
1405
+ * @param {*} value The value to check.
1406
+ * @returns {boolean} Returns `true` if the `value` is a function, else `false`.
1407
+ * @example
1408
+ *
1409
+ * _.isFunction(_);
1410
+ * // => true
1411
+ */
1412
+ function isFunction(value) {
1413
+ return typeof value == 'function';
1414
+ }
1415
+
1416
+ module.exports = isFunction;
1417
+
1418
+
1419
+ /***/ },
1420
+ /* 18 */
1421
+ /***/ function(module, exports, __webpack_require__) {
1422
+
1423
+ /**
1424
+ * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/>
1425
+ * Build: `lodash modularize modern exports="node" -o ./modern/`
1426
+ * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
1427
+ * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
1428
+ * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
1429
+ * Available under MIT license <http://lodash.com/license>
1430
+ */
1431
+
1432
+ /** `Object#toString` result shortcuts */
1433
+ var stringClass = '[object String]';
1434
+
1435
+ /** Used for native method references */
1436
+ var objectProto = Object.prototype;
1437
+
1438
+ /** Used to resolve the internal [[Class]] of values */
1439
+ var toString = objectProto.toString;
1440
+
1441
+ /**
1442
+ * Checks if `value` is a string.
1443
+ *
1444
+ * @static
1445
+ * @memberOf _
1446
+ * @category Objects
1447
+ * @param {*} value The value to check.
1448
+ * @returns {boolean} Returns `true` if the `value` is a string, else `false`.
1449
+ * @example
1450
+ *
1451
+ * _.isString('fred');
1452
+ * // => true
1453
+ */
1454
+ function isString(value) {
1455
+ return typeof value == 'string' ||
1456
+ value && typeof value == 'object' && toString.call(value) == stringClass || false;
1457
+ }
1458
+
1459
+ module.exports = isString;
1460
+
1461
+
1462
+ /***/ },
1463
+ /* 19 */
806
1464
  /***/ function(module, exports, __webpack_require__) {
807
1465
 
808
1466
  /**
@@ -813,15 +1471,15 @@ return /******/ (function(modules) { // webpackBootstrap
813
1471
  * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
814
1472
  * Available under MIT license <http://lodash.com/license>
815
1473
  */
816
- var baseIndexOf = __webpack_require__(29),
817
- cacheIndexOf = __webpack_require__(30),
818
- createCache = __webpack_require__(31),
819
- getArray = __webpack_require__(32),
820
- isArguments = __webpack_require__(22),
821
- isArray = __webpack_require__(23),
822
- largeArraySize = __webpack_require__(33),
823
- releaseArray = __webpack_require__(34),
824
- releaseObject = __webpack_require__(35);
1474
+ var baseIndexOf = __webpack_require__(34),
1475
+ cacheIndexOf = __webpack_require__(35),
1476
+ createCache = __webpack_require__(36),
1477
+ getArray = __webpack_require__(37),
1478
+ isArguments = __webpack_require__(26),
1479
+ isArray = __webpack_require__(27),
1480
+ largeArraySize = __webpack_require__(38),
1481
+ releaseArray = __webpack_require__(39),
1482
+ releaseObject = __webpack_require__(40);
825
1483
 
826
1484
  /**
827
1485
  * Creates an array of unique values present in all provided arrays using
@@ -891,7 +1549,7 @@ return /******/ (function(modules) { // webpackBootstrap
891
1549
 
892
1550
 
893
1551
  /***/ },
894
- /* 16 */
1552
+ /* 20 */
895
1553
  /***/ function(module, exports, __webpack_require__) {
896
1554
 
897
1555
  /**
@@ -902,8 +1560,8 @@ return /******/ (function(modules) { // webpackBootstrap
902
1560
  * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
903
1561
  * Available under MIT license <http://lodash.com/license>
904
1562
  */
905
- var baseUniq = __webpack_require__(36),
906
- createCallback = __webpack_require__(37);
1563
+ var baseUniq = __webpack_require__(41),
1564
+ createCallback = __webpack_require__(28);
907
1565
 
908
1566
  /**
909
1567
  * Creates a duplicate-value-free version of an array using strict equality
@@ -966,7 +1624,7 @@ return /******/ (function(modules) { // webpackBootstrap
966
1624
 
967
1625
 
968
1626
  /***/ },
969
- /* 17 */
1627
+ /* 21 */
970
1628
  /***/ function(module, exports, __webpack_require__) {
971
1629
 
972
1630
  /**
@@ -977,8 +1635,8 @@ return /******/ (function(modules) { // webpackBootstrap
977
1635
  * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
978
1636
  * Available under MIT license <http://lodash.com/license>
979
1637
  */
980
- var createCallback = __webpack_require__(37),
981
- forOwn = __webpack_require__(12);
1638
+ var createCallback = __webpack_require__(28),
1639
+ forOwn = __webpack_require__(14);
982
1640
 
983
1641
  /**
984
1642
  * Creates an array of values by running each element in the collection
@@ -1042,7 +1700,7 @@ return /******/ (function(modules) { // webpackBootstrap
1042
1700
 
1043
1701
 
1044
1702
  /***/ },
1045
- /* 18 */
1703
+ /* 22 */
1046
1704
  /***/ function(module, exports, __webpack_require__) {
1047
1705
 
1048
1706
  /**
@@ -1053,8 +1711,8 @@ return /******/ (function(modules) { // webpackBootstrap
1053
1711
  * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
1054
1712
  * Available under MIT license <http://lodash.com/license>
1055
1713
  */
1056
- var baseCreateCallback = __webpack_require__(25),
1057
- forOwn = __webpack_require__(12);
1714
+ var baseCreateCallback = __webpack_require__(30),
1715
+ forOwn = __webpack_require__(14);
1058
1716
 
1059
1717
  /**
1060
1718
  * Iterates over elements of a collection, executing the callback for each
@@ -1080,282 +1738,145 @@ return /******/ (function(modules) { // webpackBootstrap
1080
1738
  * // => logs each number and returns '1,2,3'
1081
1739
  *
1082
1740
  * _.forEach({ 'one': 1, 'two': 2, 'three': 3 }, function(num) { console.log(num); });
1083
- * // => logs each number and returns the object (property order is not guaranteed across environments)
1084
- */
1085
- function forEach(collection, callback, thisArg) {
1086
- var index = -1,
1087
- length = collection ? collection.length : 0;
1088
-
1089
- callback = callback && typeof thisArg == 'undefined' ? callback : baseCreateCallback(callback, thisArg, 3);
1090
- if (typeof length == 'number') {
1091
- while (++index < length) {
1092
- if (callback(collection[index], index, collection) === false) {
1093
- break;
1094
- }
1095
- }
1096
- } else {
1097
- forOwn(collection, callback);
1098
- }
1099
- return collection;
1100
- }
1101
-
1102
- module.exports = forEach;
1103
-
1104
-
1105
- /***/ },
1106
- /* 19 */
1107
- /***/ function(module, exports, __webpack_require__) {
1108
-
1109
- /**
1110
- * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/>
1111
- * Build: `lodash modularize modern exports="node" -o ./modern/`
1112
- * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
1113
- * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
1114
- * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
1115
- * Available under MIT license <http://lodash.com/license>
1116
- */
1117
- var keys = __webpack_require__(13);
1118
-
1119
- /**
1120
- * Gets the size of the `collection` by returning `collection.length` for arrays
1121
- * and array-like objects or the number of own enumerable properties for objects.
1122
- *
1123
- * @static
1124
- * @memberOf _
1125
- * @category Collections
1126
- * @param {Array|Object|string} collection The collection to inspect.
1127
- * @returns {number} Returns `collection.length` or number of own enumerable properties.
1128
- * @example
1129
- *
1130
- * _.size([1, 2]);
1131
- * // => 2
1132
- *
1133
- * _.size({ 'one': 1, 'two': 2, 'three': 3 });
1134
- * // => 3
1135
- *
1136
- * _.size('pebbles');
1137
- * // => 7
1138
- */
1139
- function size(collection) {
1140
- var length = collection ? collection.length : 0;
1141
- return typeof length == 'number' ? length : keys(collection).length;
1142
- }
1143
-
1144
- module.exports = size;
1145
-
1146
-
1147
- /***/ },
1148
- /* 20 */
1149
- /***/ function(module, exports, __webpack_require__) {
1150
-
1151
- 'use strict';
1152
-
1153
- /**
1154
- * Representation of a single EventEmitter function.
1155
- *
1156
- * @param {Function} fn Event handler to be called.
1157
- * @param {Mixed} context Context for function execution.
1158
- * @param {Boolean} once Only emit once
1159
- * @api private
1160
- */
1161
- function EE(fn, context, once) {
1162
- this.fn = fn;
1163
- this.context = context;
1164
- this.once = once || false;
1165
- }
1166
-
1167
- /**
1168
- * Minimal EventEmitter interface that is molded against the Node.js
1169
- * EventEmitter interface.
1170
- *
1171
- * @constructor
1172
- * @api public
1173
- */
1174
- function EventEmitter() { /* Nothing to set */ }
1175
-
1176
- /**
1177
- * Holds the assigned EventEmitters by name.
1178
- *
1179
- * @type {Object}
1180
- * @private
1181
- */
1182
- EventEmitter.prototype._events = undefined;
1183
-
1184
- /**
1185
- * Return a list of assigned event listeners.
1186
- *
1187
- * @param {String} event The events that should be listed.
1188
- * @returns {Array}
1189
- * @api public
1190
- */
1191
- EventEmitter.prototype.listeners = function listeners(event) {
1192
- if (!this._events || !this._events[event]) return [];
1193
-
1194
- for (var i = 0, l = this._events[event].length, ee = []; i < l; i++) {
1195
- ee.push(this._events[event][i].fn);
1196
- }
1197
-
1198
- return ee;
1199
- };
1200
-
1201
- /**
1202
- * Emit an event to all registered event listeners.
1203
- *
1204
- * @param {String} event The name of the event.
1205
- * @returns {Boolean} Indication if we've emitted an event.
1206
- * @api public
1207
- */
1208
- EventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) {
1209
- if (!this._events || !this._events[event]) return false;
1210
-
1211
- var listeners = this._events[event]
1212
- , length = listeners.length
1213
- , len = arguments.length
1214
- , ee = listeners[0]
1215
- , args
1216
- , i, j;
1217
-
1218
- if (1 === length) {
1219
- if (ee.once) this.removeListener(event, ee.fn, true);
1220
-
1221
- switch (len) {
1222
- case 1: return ee.fn.call(ee.context), true;
1223
- case 2: return ee.fn.call(ee.context, a1), true;
1224
- case 3: return ee.fn.call(ee.context, a1, a2), true;
1225
- case 4: return ee.fn.call(ee.context, a1, a2, a3), true;
1226
- case 5: return ee.fn.call(ee.context, a1, a2, a3, a4), true;
1227
- case 6: return ee.fn.call(ee.context, a1, a2, a3, a4, a5), true;
1228
- }
1229
-
1230
- for (i = 1, args = new Array(len -1); i < len; i++) {
1231
- args[i - 1] = arguments[i];
1232
- }
1233
-
1234
- ee.fn.apply(ee.context, args);
1235
- } else {
1236
- for (i = 0; i < length; i++) {
1237
- if (listeners[i].once) this.removeListener(event, listeners[i].fn, true);
1238
-
1239
- switch (len) {
1240
- case 1: listeners[i].fn.call(listeners[i].context); break;
1241
- case 2: listeners[i].fn.call(listeners[i].context, a1); break;
1242
- case 3: listeners[i].fn.call(listeners[i].context, a1, a2); break;
1243
- default:
1244
- if (!args) for (j = 1, args = new Array(len -1); j < len; j++) {
1245
- args[j - 1] = arguments[j];
1246
- }
1741
+ * // => logs each number and returns the object (property order is not guaranteed across environments)
1742
+ */
1743
+ function forEach(collection, callback, thisArg) {
1744
+ var index = -1,
1745
+ length = collection ? collection.length : 0;
1247
1746
 
1248
- listeners[i].fn.apply(listeners[i].context, args);
1747
+ callback = callback && typeof thisArg == 'undefined' ? callback : baseCreateCallback(callback, thisArg, 3);
1748
+ if (typeof length == 'number') {
1749
+ while (++index < length) {
1750
+ if (callback(collection[index], index, collection) === false) {
1751
+ break;
1249
1752
  }
1250
1753
  }
1754
+ } else {
1755
+ forOwn(collection, callback);
1251
1756
  }
1757
+ return collection;
1758
+ }
1252
1759
 
1253
- return true;
1254
- };
1255
-
1760
+ module.exports = forEach;
1761
+
1762
+
1763
+ /***/ },
1764
+ /* 23 */
1765
+ /***/ function(module, exports, __webpack_require__) {
1766
+
1256
1767
  /**
1257
- * Register a new EventListener for the given event.
1258
- *
1259
- * @param {String} event Name of the event.
1260
- * @param {Functon} fn Callback function.
1261
- * @param {Mixed} context The context of the function.
1262
- * @api public
1768
+ * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/>
1769
+ * Build: `lodash modularize modern exports="node" -o ./modern/`
1770
+ * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
1771
+ * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
1772
+ * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
1773
+ * Available under MIT license <http://lodash.com/license>
1263
1774
  */
1264
- EventEmitter.prototype.on = function on(event, fn, context) {
1265
- if (!this._events) this._events = {};
1266
- if (!this._events[event]) this._events[event] = [];
1267
- this._events[event].push(new EE( fn, context || this ));
1268
-
1269
- return this;
1270
- };
1775
+ var keys = __webpack_require__(15);
1271
1776
 
1272
1777
  /**
1273
- * Add an EventListener that's only called once.
1778
+ * Gets the size of the `collection` by returning `collection.length` for arrays
1779
+ * and array-like objects or the number of own enumerable properties for objects.
1274
1780
  *
1275
- * @param {String} event Name of the event.
1276
- * @param {Function} fn Callback function.
1277
- * @param {Mixed} context The context of the function.
1278
- * @api public
1781
+ * @static
1782
+ * @memberOf _
1783
+ * @category Collections
1784
+ * @param {Array|Object|string} collection The collection to inspect.
1785
+ * @returns {number} Returns `collection.length` or number of own enumerable properties.
1786
+ * @example
1787
+ *
1788
+ * _.size([1, 2]);
1789
+ * // => 2
1790
+ *
1791
+ * _.size({ 'one': 1, 'two': 2, 'three': 3 });
1792
+ * // => 3
1793
+ *
1794
+ * _.size('pebbles');
1795
+ * // => 7
1279
1796
  */
1280
- EventEmitter.prototype.once = function once(event, fn, context) {
1281
- if (!this._events) this._events = {};
1282
- if (!this._events[event]) this._events[event] = [];
1283
- this._events[event].push(new EE(fn, context || this, true ));
1284
-
1285
- return this;
1286
- };
1797
+ function size(collection) {
1798
+ var length = collection ? collection.length : 0;
1799
+ return typeof length == 'number' ? length : keys(collection).length;
1800
+ }
1287
1801
 
1802
+ module.exports = size;
1803
+
1804
+
1805
+ /***/ },
1806
+ /* 24 */
1807
+ /***/ function(module, exports, __webpack_require__) {
1808
+
1288
1809
  /**
1289
- * Remove event listeners.
1290
- *
1291
- * @param {String} event The event we want to remove.
1292
- * @param {Function} fn The listener that we need to find.
1293
- * @param {Boolean} once Only remove once listeners.
1294
- * @api public
1810
+ * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/>
1811
+ * Build: `lodash modularize modern exports="node" -o ./modern/`
1812
+ * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
1813
+ * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
1814
+ * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
1815
+ * Available under MIT license <http://lodash.com/license>
1295
1816
  */
1296
- EventEmitter.prototype.removeListener = function removeListener(event, fn, once) {
1297
- if (!this._events || !this._events[event]) return this;
1298
-
1299
- var listeners = this._events[event]
1300
- , events = [];
1301
-
1302
- if (fn) for (var i = 0, length = listeners.length; i < length; i++) {
1303
- if (listeners[i].fn !== fn && listeners[i].once !== once) {
1304
- events.push(listeners[i]);
1305
- }
1306
- }
1307
-
1308
- //
1309
- // Reset the array, or remove it completely if we have no more listeners.
1310
- //
1311
- if (events.length) this._events[event] = events;
1312
- else this._events[event] = null;
1313
-
1314
- return this;
1315
- };
1817
+ var createCallback = __webpack_require__(28),
1818
+ forOwn = __webpack_require__(14);
1316
1819
 
1317
1820
  /**
1318
- * Remove all listeners or only the listeners for the specified event.
1821
+ * Reduces a collection to a value which is the accumulated result of running
1822
+ * each element in the collection through the callback, where each successive
1823
+ * callback execution consumes the return value of the previous execution. If
1824
+ * `accumulator` is not provided the first element of the collection will be
1825
+ * used as the initial `accumulator` value. The callback is bound to `thisArg`
1826
+ * and invoked with four arguments; (accumulator, value, index|key, collection).
1319
1827
  *
1320
- * @param {String} event The event want to remove all listeners for.
1321
- * @api public
1828
+ * @static
1829
+ * @memberOf _
1830
+ * @alias foldl, inject
1831
+ * @category Collections
1832
+ * @param {Array|Object|string} collection The collection to iterate over.
1833
+ * @param {Function} [callback=identity] The function called per iteration.
1834
+ * @param {*} [accumulator] Initial value of the accumulator.
1835
+ * @param {*} [thisArg] The `this` binding of `callback`.
1836
+ * @returns {*} Returns the accumulated value.
1837
+ * @example
1838
+ *
1839
+ * var sum = _.reduce([1, 2, 3], function(sum, num) {
1840
+ * return sum + num;
1841
+ * });
1842
+ * // => 6
1843
+ *
1844
+ * var mapped = _.reduce({ 'a': 1, 'b': 2, 'c': 3 }, function(result, num, key) {
1845
+ * result[key] = num * 3;
1846
+ * return result;
1847
+ * }, {});
1848
+ * // => { 'a': 3, 'b': 6, 'c': 9 }
1322
1849
  */
1323
- EventEmitter.prototype.removeAllListeners = function removeAllListeners(event) {
1324
- if (!this._events) return this;
1325
-
1326
- if (event) this._events[event] = null;
1327
- else this._events = {};
1328
-
1329
- return this;
1330
- };
1331
-
1332
- //
1333
- // Alias methods names because people roll like that.
1334
- //
1335
- EventEmitter.prototype.off = EventEmitter.prototype.removeListener;
1336
- EventEmitter.prototype.addListener = EventEmitter.prototype.on;
1850
+ function reduce(collection, callback, accumulator, thisArg) {
1851
+ if (!collection) return accumulator;
1852
+ var noaccum = arguments.length < 3;
1853
+ callback = createCallback(callback, thisArg, 4);
1337
1854
 
1338
- //
1339
- // This function doesn't apply anymore.
1340
- //
1341
- EventEmitter.prototype.setMaxListeners = function setMaxListeners() {
1342
- return this;
1343
- };
1344
-
1345
- //
1346
- // Expose the module.
1347
- //
1348
- EventEmitter.EventEmitter = EventEmitter;
1349
- EventEmitter.EventEmitter2 = EventEmitter;
1350
- EventEmitter.EventEmitter3 = EventEmitter;
1855
+ var index = -1,
1856
+ length = collection.length;
1351
1857
 
1352
- if ('object' === typeof module && module.exports) {
1353
- module.exports = EventEmitter;
1858
+ if (typeof length == 'number') {
1859
+ if (noaccum) {
1860
+ accumulator = collection[++index];
1861
+ }
1862
+ while (++index < length) {
1863
+ accumulator = callback(accumulator, collection[index], index, collection);
1864
+ }
1865
+ } else {
1866
+ forOwn(collection, function(value, index, collection) {
1867
+ accumulator = noaccum
1868
+ ? (noaccum = false, value)
1869
+ : callback(accumulator, value, index, collection)
1870
+ });
1871
+ }
1872
+ return accumulator;
1354
1873
  }
1874
+
1875
+ module.exports = reduce;
1355
1876
 
1356
1877
 
1357
1878
  /***/ },
1358
- /* 21 */
1879
+ /* 25 */
1359
1880
  /***/ function(module, exports, __webpack_require__) {
1360
1881
 
1361
1882
  /**
@@ -1366,7 +1887,7 @@ return /******/ (function(modules) { // webpackBootstrap
1366
1887
  * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
1367
1888
  * Available under MIT license <http://lodash.com/license>
1368
1889
  */
1369
- var objectTypes = __webpack_require__(26);
1890
+ var objectTypes = __webpack_require__(31);
1370
1891
 
1371
1892
  /**
1372
1893
  * Checks if `value` is the language type of Object.
@@ -1400,7 +1921,7 @@ return /******/ (function(modules) { // webpackBootstrap
1400
1921
 
1401
1922
 
1402
1923
  /***/ },
1403
- /* 22 */
1924
+ /* 26 */
1404
1925
  /***/ function(module, exports, __webpack_require__) {
1405
1926
 
1406
1927
  /**
@@ -1446,7 +1967,7 @@ return /******/ (function(modules) { // webpackBootstrap
1446
1967
 
1447
1968
 
1448
1969
  /***/ },
1449
- /* 23 */
1970
+ /* 27 */
1450
1971
  /***/ function(module, exports, __webpack_require__) {
1451
1972
 
1452
1973
  /**
@@ -1457,7 +1978,7 @@ return /******/ (function(modules) { // webpackBootstrap
1457
1978
  * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
1458
1979
  * Available under MIT license <http://lodash.com/license>
1459
1980
  */
1460
- var isNative = __webpack_require__(27);
1981
+ var isNative = __webpack_require__(32);
1461
1982
 
1462
1983
  /** `Object#toString` result shortcuts */
1463
1984
  var arrayClass = '[object Array]';
@@ -1493,11 +2014,98 @@ return /******/ (function(modules) { // webpackBootstrap
1493
2014
  toString.call(value) == arrayClass || false;
1494
2015
  };
1495
2016
 
1496
- module.exports = isArray;
2017
+ module.exports = isArray;
2018
+
2019
+
2020
+ /***/ },
2021
+ /* 28 */
2022
+ /***/ function(module, exports, __webpack_require__) {
2023
+
2024
+ /**
2025
+ * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/>
2026
+ * Build: `lodash modularize modern exports="node" -o ./modern/`
2027
+ * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
2028
+ * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
2029
+ * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
2030
+ * Available under MIT license <http://lodash.com/license>
2031
+ */
2032
+ var baseCreateCallback = __webpack_require__(30),
2033
+ baseIsEqual = __webpack_require__(42),
2034
+ isObject = __webpack_require__(25),
2035
+ keys = __webpack_require__(15),
2036
+ property = __webpack_require__(54);
2037
+
2038
+ /**
2039
+ * Produces a callback bound to an optional `thisArg`. If `func` is a property
2040
+ * name the created callback will return the property value for a given element.
2041
+ * If `func` is an object the created callback will return `true` for elements
2042
+ * that contain the equivalent object properties, otherwise it will return `false`.
2043
+ *
2044
+ * @static
2045
+ * @memberOf _
2046
+ * @category Utilities
2047
+ * @param {*} [func=identity] The value to convert to a callback.
2048
+ * @param {*} [thisArg] The `this` binding of the created callback.
2049
+ * @param {number} [argCount] The number of arguments the callback accepts.
2050
+ * @returns {Function} Returns a callback function.
2051
+ * @example
2052
+ *
2053
+ * var characters = [
2054
+ * { 'name': 'barney', 'age': 36 },
2055
+ * { 'name': 'fred', 'age': 40 }
2056
+ * ];
2057
+ *
2058
+ * // wrap to create custom callback shorthands
2059
+ * _.createCallback = _.wrap(_.createCallback, function(func, callback, thisArg) {
2060
+ * var match = /^(.+?)__([gl]t)(.+)$/.exec(callback);
2061
+ * return !match ? func(callback, thisArg) : function(object) {
2062
+ * return match[2] == 'gt' ? object[match[1]] > match[3] : object[match[1]] < match[3];
2063
+ * };
2064
+ * });
2065
+ *
2066
+ * _.filter(characters, 'age__gt38');
2067
+ * // => [{ 'name': 'fred', 'age': 40 }]
2068
+ */
2069
+ function createCallback(func, thisArg, argCount) {
2070
+ var type = typeof func;
2071
+ if (func == null || type == 'function') {
2072
+ return baseCreateCallback(func, thisArg, argCount);
2073
+ }
2074
+ // handle "_.pluck" style callback shorthands
2075
+ if (type != 'object') {
2076
+ return property(func);
2077
+ }
2078
+ var props = keys(func),
2079
+ key = props[0],
2080
+ a = func[key];
2081
+
2082
+ // handle "_.where" style callback shorthands
2083
+ if (props.length == 1 && a === a && !isObject(a)) {
2084
+ // fast path the common case of providing an object with a single
2085
+ // property containing a primitive value
2086
+ return function(object) {
2087
+ var b = object[key];
2088
+ return a === b && (a !== 0 || (1 / a == 1 / b));
2089
+ };
2090
+ }
2091
+ return function(object) {
2092
+ var length = props.length,
2093
+ result = false;
2094
+
2095
+ while (length--) {
2096
+ if (!(result = baseIsEqual(object[props[length]], func[props[length]], null, true))) {
2097
+ break;
2098
+ }
2099
+ }
2100
+ return result;
2101
+ };
2102
+ }
2103
+
2104
+ module.exports = createCallback;
1497
2105
 
1498
2106
 
1499
2107
  /***/ },
1500
- /* 24 */
2108
+ /* 29 */
1501
2109
  /***/ function(module, exports, __webpack_require__) {
1502
2110
 
1503
2111
  /**
@@ -1508,14 +2116,14 @@ return /******/ (function(modules) { // webpackBootstrap
1508
2116
  * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
1509
2117
  * Available under MIT license <http://lodash.com/license>
1510
2118
  */
1511
- var assign = __webpack_require__(41),
1512
- forEach = __webpack_require__(18),
1513
- forOwn = __webpack_require__(12),
1514
- getArray = __webpack_require__(32),
1515
- isArray = __webpack_require__(23),
1516
- isObject = __webpack_require__(21),
1517
- releaseArray = __webpack_require__(34),
1518
- slice = __webpack_require__(42);
2119
+ var assign = __webpack_require__(43),
2120
+ forEach = __webpack_require__(22),
2121
+ forOwn = __webpack_require__(14),
2122
+ getArray = __webpack_require__(37),
2123
+ isArray = __webpack_require__(27),
2124
+ isObject = __webpack_require__(25),
2125
+ releaseArray = __webpack_require__(39),
2126
+ slice = __webpack_require__(44);
1519
2127
 
1520
2128
  /** Used to match regexp flags from their coerced string values */
1521
2129
  var reFlags = /\w*$/;
@@ -1655,7 +2263,7 @@ return /******/ (function(modules) { // webpackBootstrap
1655
2263
 
1656
2264
 
1657
2265
  /***/ },
1658
- /* 25 */
2266
+ /* 30 */
1659
2267
  /***/ function(module, exports, __webpack_require__) {
1660
2268
 
1661
2269
  /**
@@ -1666,10 +2274,10 @@ return /******/ (function(modules) { // webpackBootstrap
1666
2274
  * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
1667
2275
  * Available under MIT license <http://lodash.com/license>
1668
2276
  */
1669
- var bind = __webpack_require__(38),
1670
- identity = __webpack_require__(50),
1671
- setBindData = __webpack_require__(39),
1672
- support = __webpack_require__(40);
2277
+ var bind = __webpack_require__(45),
2278
+ identity = __webpack_require__(55),
2279
+ setBindData = __webpack_require__(46),
2280
+ support = __webpack_require__(47);
1673
2281
 
1674
2282
  /** Used to detected named functions */
1675
2283
  var reFuncName = /^\s*function[ \n\r\t]+\w/;
@@ -1741,7 +2349,7 @@ return /******/ (function(modules) { // webpackBootstrap
1741
2349
 
1742
2350
 
1743
2351
  /***/ },
1744
- /* 26 */
2352
+ /* 31 */
1745
2353
  /***/ function(module, exports, __webpack_require__) {
1746
2354
 
1747
2355
  /**
@@ -1767,7 +2375,7 @@ return /******/ (function(modules) { // webpackBootstrap
1767
2375
 
1768
2376
 
1769
2377
  /***/ },
1770
- /* 27 */
2378
+ /* 32 */
1771
2379
  /***/ function(module, exports, __webpack_require__) {
1772
2380
 
1773
2381
  /**
@@ -1807,7 +2415,7 @@ return /******/ (function(modules) { // webpackBootstrap
1807
2415
 
1808
2416
 
1809
2417
  /***/ },
1810
- /* 28 */
2418
+ /* 33 */
1811
2419
  /***/ function(module, exports, __webpack_require__) {
1812
2420
 
1813
2421
  /**
@@ -1818,7 +2426,7 @@ return /******/ (function(modules) { // webpackBootstrap
1818
2426
  * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
1819
2427
  * Available under MIT license <http://lodash.com/license>
1820
2428
  */
1821
- var objectTypes = __webpack_require__(26);
2429
+ var objectTypes = __webpack_require__(31);
1822
2430
 
1823
2431
  /** Used for native method references */
1824
2432
  var objectProto = Object.prototype;
@@ -1851,7 +2459,7 @@ return /******/ (function(modules) { // webpackBootstrap
1851
2459
 
1852
2460
 
1853
2461
  /***/ },
1854
- /* 29 */
2462
+ /* 34 */
1855
2463
  /***/ function(module, exports, __webpack_require__) {
1856
2464
 
1857
2465
  /**
@@ -1889,7 +2497,7 @@ return /******/ (function(modules) { // webpackBootstrap
1889
2497
 
1890
2498
 
1891
2499
  /***/ },
1892
- /* 30 */
2500
+ /* 35 */
1893
2501
  /***/ function(module, exports, __webpack_require__) {
1894
2502
 
1895
2503
  /**
@@ -1900,8 +2508,8 @@ return /******/ (function(modules) { // webpackBootstrap
1900
2508
  * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
1901
2509
  * Available under MIT license <http://lodash.com/license>
1902
2510
  */
1903
- var baseIndexOf = __webpack_require__(29),
1904
- keyPrefix = __webpack_require__(43);
2511
+ var baseIndexOf = __webpack_require__(34),
2512
+ keyPrefix = __webpack_require__(48);
1905
2513
 
1906
2514
  /**
1907
2515
  * An implementation of `_.contains` for cache objects that mimics the return
@@ -1934,7 +2542,7 @@ return /******/ (function(modules) { // webpackBootstrap
1934
2542
 
1935
2543
 
1936
2544
  /***/ },
1937
- /* 31 */
2545
+ /* 36 */
1938
2546
  /***/ function(module, exports, __webpack_require__) {
1939
2547
 
1940
2548
  /**
@@ -1945,9 +2553,9 @@ return /******/ (function(modules) { // webpackBootstrap
1945
2553
  * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
1946
2554
  * Available under MIT license <http://lodash.com/license>
1947
2555
  */
1948
- var cachePush = __webpack_require__(44),
1949
- getObject = __webpack_require__(45),
1950
- releaseObject = __webpack_require__(35);
2556
+ var cachePush = __webpack_require__(49),
2557
+ getObject = __webpack_require__(50),
2558
+ releaseObject = __webpack_require__(40);
1951
2559
 
1952
2560
  /**
1953
2561
  * Creates a cache object to optimize linear searches of large arrays.
@@ -1985,7 +2593,7 @@ return /******/ (function(modules) { // webpackBootstrap
1985
2593
 
1986
2594
 
1987
2595
  /***/ },
1988
- /* 32 */
2596
+ /* 37 */
1989
2597
  /***/ function(module, exports, __webpack_require__) {
1990
2598
 
1991
2599
  /**
@@ -1996,7 +2604,7 @@ return /******/ (function(modules) { // webpackBootstrap
1996
2604
  * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
1997
2605
  * Available under MIT license <http://lodash.com/license>
1998
2606
  */
1999
- var arrayPool = __webpack_require__(46);
2607
+ var arrayPool = __webpack_require__(51);
2000
2608
 
2001
2609
  /**
2002
2610
  * Gets an array from the array pool or creates a new one if the pool is empty.
@@ -2012,7 +2620,7 @@ return /******/ (function(modules) { // webpackBootstrap
2012
2620
 
2013
2621
 
2014
2622
  /***/ },
2015
- /* 33 */
2623
+ /* 38 */
2016
2624
  /***/ function(module, exports, __webpack_require__) {
2017
2625
 
2018
2626
  /**
@@ -2031,7 +2639,7 @@ return /******/ (function(modules) { // webpackBootstrap
2031
2639
 
2032
2640
 
2033
2641
  /***/ },
2034
- /* 34 */
2642
+ /* 39 */
2035
2643
  /***/ function(module, exports, __webpack_require__) {
2036
2644
 
2037
2645
  /**
@@ -2042,8 +2650,8 @@ return /******/ (function(modules) { // webpackBootstrap
2042
2650
  * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
2043
2651
  * Available under MIT license <http://lodash.com/license>
2044
2652
  */
2045
- var arrayPool = __webpack_require__(46),
2046
- maxPoolSize = __webpack_require__(47);
2653
+ var arrayPool = __webpack_require__(51),
2654
+ maxPoolSize = __webpack_require__(52);
2047
2655
 
2048
2656
  /**
2049
2657
  * Releases the given array back to the array pool.
@@ -2062,7 +2670,7 @@ return /******/ (function(modules) { // webpackBootstrap
2062
2670
 
2063
2671
 
2064
2672
  /***/ },
2065
- /* 35 */
2673
+ /* 40 */
2066
2674
  /***/ function(module, exports, __webpack_require__) {
2067
2675
 
2068
2676
  /**
@@ -2073,8 +2681,8 @@ return /******/ (function(modules) { // webpackBootstrap
2073
2681
  * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
2074
2682
  * Available under MIT license <http://lodash.com/license>
2075
2683
  */
2076
- var maxPoolSize = __webpack_require__(47),
2077
- objectPool = __webpack_require__(49);
2684
+ var maxPoolSize = __webpack_require__(52),
2685
+ objectPool = __webpack_require__(53);
2078
2686
 
2079
2687
  /**
2080
2688
  * Releases the given object back to the object pool.
@@ -2097,7 +2705,7 @@ return /******/ (function(modules) { // webpackBootstrap
2097
2705
 
2098
2706
 
2099
2707
  /***/ },
2100
- /* 36 */
2708
+ /* 41 */
2101
2709
  /***/ function(module, exports, __webpack_require__) {
2102
2710
 
2103
2711
  /**
@@ -2108,13 +2716,13 @@ return /******/ (function(modules) { // webpackBootstrap
2108
2716
  * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
2109
2717
  * Available under MIT license <http://lodash.com/license>
2110
2718
  */
2111
- var baseIndexOf = __webpack_require__(29),
2112
- cacheIndexOf = __webpack_require__(30),
2113
- createCache = __webpack_require__(31),
2114
- getArray = __webpack_require__(32),
2115
- largeArraySize = __webpack_require__(33),
2116
- releaseArray = __webpack_require__(34),
2117
- releaseObject = __webpack_require__(35);
2719
+ var baseIndexOf = __webpack_require__(34),
2720
+ cacheIndexOf = __webpack_require__(35),
2721
+ createCache = __webpack_require__(36),
2722
+ getArray = __webpack_require__(37),
2723
+ largeArraySize = __webpack_require__(38),
2724
+ releaseArray = __webpack_require__(39),
2725
+ releaseObject = __webpack_require__(40);
2118
2726
 
2119
2727
  /**
2120
2728
  * The base implementation of `_.uniq` without support for callback shorthands
@@ -2167,7 +2775,7 @@ return /******/ (function(modules) { // webpackBootstrap
2167
2775
 
2168
2776
 
2169
2777
  /***/ },
2170
- /* 37 */
2778
+ /* 42 */
2171
2779
  /***/ function(module, exports, __webpack_require__) {
2172
2780
 
2173
2781
  /**
@@ -2178,225 +2786,211 @@ return /******/ (function(modules) { // webpackBootstrap
2178
2786
  * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
2179
2787
  * Available under MIT license <http://lodash.com/license>
2180
2788
  */
2181
- var baseCreateCallback = __webpack_require__(25),
2182
- baseIsEqual = __webpack_require__(48),
2183
- isObject = __webpack_require__(21),
2184
- keys = __webpack_require__(13),
2185
- property = __webpack_require__(51);
2789
+ var forIn = __webpack_require__(56),
2790
+ getArray = __webpack_require__(37),
2791
+ isFunction = __webpack_require__(17),
2792
+ objectTypes = __webpack_require__(31),
2793
+ releaseArray = __webpack_require__(39);
2794
+
2795
+ /** `Object#toString` result shortcuts */
2796
+ var argsClass = '[object Arguments]',
2797
+ arrayClass = '[object Array]',
2798
+ boolClass = '[object Boolean]',
2799
+ dateClass = '[object Date]',
2800
+ numberClass = '[object Number]',
2801
+ objectClass = '[object Object]',
2802
+ regexpClass = '[object RegExp]',
2803
+ stringClass = '[object String]';
2804
+
2805
+ /** Used for native method references */
2806
+ var objectProto = Object.prototype;
2807
+
2808
+ /** Used to resolve the internal [[Class]] of values */
2809
+ var toString = objectProto.toString;
2810
+
2811
+ /** Native method shortcuts */
2812
+ var hasOwnProperty = objectProto.hasOwnProperty;
2186
2813
 
2187
2814
  /**
2188
- * Produces a callback bound to an optional `thisArg`. If `func` is a property
2189
- * name the created callback will return the property value for a given element.
2190
- * If `func` is an object the created callback will return `true` for elements
2191
- * that contain the equivalent object properties, otherwise it will return `false`.
2192
- *
2193
- * @static
2194
- * @memberOf _
2195
- * @category Utilities
2196
- * @param {*} [func=identity] The value to convert to a callback.
2197
- * @param {*} [thisArg] The `this` binding of the created callback.
2198
- * @param {number} [argCount] The number of arguments the callback accepts.
2199
- * @returns {Function} Returns a callback function.
2200
- * @example
2201
- *
2202
- * var characters = [
2203
- * { 'name': 'barney', 'age': 36 },
2204
- * { 'name': 'fred', 'age': 40 }
2205
- * ];
2206
- *
2207
- * // wrap to create custom callback shorthands
2208
- * _.createCallback = _.wrap(_.createCallback, function(func, callback, thisArg) {
2209
- * var match = /^(.+?)__([gl]t)(.+)$/.exec(callback);
2210
- * return !match ? func(callback, thisArg) : function(object) {
2211
- * return match[2] == 'gt' ? object[match[1]] > match[3] : object[match[1]] < match[3];
2212
- * };
2213
- * });
2815
+ * The base implementation of `_.isEqual`, without support for `thisArg` binding,
2816
+ * that allows partial "_.where" style comparisons.
2214
2817
  *
2215
- * _.filter(characters, 'age__gt38');
2216
- * // => [{ 'name': 'fred', 'age': 40 }]
2818
+ * @private
2819
+ * @param {*} a The value to compare.
2820
+ * @param {*} b The other value to compare.
2821
+ * @param {Function} [callback] The function to customize comparing values.
2822
+ * @param {Function} [isWhere=false] A flag to indicate performing partial comparisons.
2823
+ * @param {Array} [stackA=[]] Tracks traversed `a` objects.
2824
+ * @param {Array} [stackB=[]] Tracks traversed `b` objects.
2825
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
2217
2826
  */
2218
- function createCallback(func, thisArg, argCount) {
2219
- var type = typeof func;
2220
- if (func == null || type == 'function') {
2221
- return baseCreateCallback(func, thisArg, argCount);
2827
+ function baseIsEqual(a, b, callback, isWhere, stackA, stackB) {
2828
+ // used to indicate that when comparing objects, `a` has at least the properties of `b`
2829
+ if (callback) {
2830
+ var result = callback(a, b);
2831
+ if (typeof result != 'undefined') {
2832
+ return !!result;
2833
+ }
2222
2834
  }
2223
- // handle "_.pluck" style callback shorthands
2224
- if (type != 'object') {
2225
- return property(func);
2835
+ // exit early for identical values
2836
+ if (a === b) {
2837
+ // treat `+0` vs. `-0` as not equal
2838
+ return a !== 0 || (1 / a == 1 / b);
2226
2839
  }
2227
- var props = keys(func),
2228
- key = props[0],
2229
- a = func[key];
2840
+ var type = typeof a,
2841
+ otherType = typeof b;
2230
2842
 
2231
- // handle "_.where" style callback shorthands
2232
- if (props.length == 1 && a === a && !isObject(a)) {
2233
- // fast path the common case of providing an object with a single
2234
- // property containing a primitive value
2235
- return function(object) {
2236
- var b = object[key];
2237
- return a === b && (a !== 0 || (1 / a == 1 / b));
2238
- };
2843
+ // exit early for unlike primitive values
2844
+ if (a === a &&
2845
+ !(a && objectTypes[type]) &&
2846
+ !(b && objectTypes[otherType])) {
2847
+ return false;
2239
2848
  }
2240
- return function(object) {
2241
- var length = props.length,
2242
- result = false;
2243
-
2244
- while (length--) {
2245
- if (!(result = baseIsEqual(object[props[length]], func[props[length]], null, true))) {
2246
- break;
2247
- }
2248
- }
2249
- return result;
2250
- };
2251
- }
2252
-
2253
- module.exports = createCallback;
2254
-
2255
-
2256
- /***/ },
2257
- /* 38 */
2258
- /***/ function(module, exports, __webpack_require__) {
2259
-
2260
- /**
2261
- * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/>
2262
- * Build: `lodash modularize modern exports="node" -o ./modern/`
2263
- * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
2264
- * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
2265
- * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
2266
- * Available under MIT license <http://lodash.com/license>
2267
- */
2268
- var createWrapper = __webpack_require__(52),
2269
- slice = __webpack_require__(42);
2849
+ // exit early for `null` and `undefined` avoiding ES3's Function#call behavior
2850
+ // http://es5.github.io/#x15.3.4.4
2851
+ if (a == null || b == null) {
2852
+ return a === b;
2853
+ }
2854
+ // compare [[Class]] names
2855
+ var className = toString.call(a),
2856
+ otherClass = toString.call(b);
2270
2857
 
2271
- /**
2272
- * Creates a function that, when called, invokes `func` with the `this`
2273
- * binding of `thisArg` and prepends any additional `bind` arguments to those
2274
- * provided to the bound function.
2275
- *
2276
- * @static
2277
- * @memberOf _
2278
- * @category Functions
2279
- * @param {Function} func The function to bind.
2280
- * @param {*} [thisArg] The `this` binding of `func`.
2281
- * @param {...*} [arg] Arguments to be partially applied.
2282
- * @returns {Function} Returns the new bound function.
2283
- * @example
2284
- *
2285
- * var func = function(greeting) {
2286
- * return greeting + ' ' + this.name;
2287
- * };
2288
- *
2289
- * func = _.bind(func, { 'name': 'fred' }, 'hi');
2290
- * func();
2291
- * // => 'hi fred'
2292
- */
2293
- function bind(func, thisArg) {
2294
- return arguments.length > 2
2295
- ? createWrapper(func, 17, slice(arguments, 2), null, thisArg)
2296
- : createWrapper(func, 1, null, null, thisArg);
2297
- }
2858
+ if (className == argsClass) {
2859
+ className = objectClass;
2860
+ }
2861
+ if (otherClass == argsClass) {
2862
+ otherClass = objectClass;
2863
+ }
2864
+ if (className != otherClass) {
2865
+ return false;
2866
+ }
2867
+ switch (className) {
2868
+ case boolClass:
2869
+ case dateClass:
2870
+ // coerce dates and booleans to numbers, dates to milliseconds and booleans
2871
+ // to `1` or `0` treating invalid dates coerced to `NaN` as not equal
2872
+ return +a == +b;
2298
2873
 
2299
- module.exports = bind;
2300
-
2301
-
2302
- /***/ },
2303
- /* 39 */
2304
- /***/ function(module, exports, __webpack_require__) {
2305
-
2306
- /**
2307
- * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/>
2308
- * Build: `lodash modularize modern exports="node" -o ./modern/`
2309
- * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
2310
- * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
2311
- * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
2312
- * Available under MIT license <http://lodash.com/license>
2313
- */
2314
- var isNative = __webpack_require__(27),
2315
- noop = __webpack_require__(53);
2874
+ case numberClass:
2875
+ // treat `NaN` vs. `NaN` as equal
2876
+ return (a != +a)
2877
+ ? b != +b
2878
+ // but treat `+0` vs. `-0` as not equal
2879
+ : (a == 0 ? (1 / a == 1 / b) : a == +b);
2316
2880
 
2317
- /** Used as the property descriptor for `__bindData__` */
2318
- var descriptor = {
2319
- 'configurable': false,
2320
- 'enumerable': false,
2321
- 'value': null,
2322
- 'writable': false
2323
- };
2881
+ case regexpClass:
2882
+ case stringClass:
2883
+ // coerce regexes to strings (http://es5.github.io/#x15.10.6.4)
2884
+ // treat string primitives and their corresponding object instances as equal
2885
+ return a == String(b);
2886
+ }
2887
+ var isArr = className == arrayClass;
2888
+ if (!isArr) {
2889
+ // unwrap any `lodash` wrapped values
2890
+ var aWrapped = hasOwnProperty.call(a, '__wrapped__'),
2891
+ bWrapped = hasOwnProperty.call(b, '__wrapped__');
2324
2892
 
2325
- /** Used to set meta data on functions */
2326
- var defineProperty = (function() {
2327
- // IE 8 only accepts DOM elements
2328
- try {
2329
- var o = {},
2330
- func = isNative(func = Object.defineProperty) && func,
2331
- result = func(o, o, o) && func;
2332
- } catch(e) { }
2333
- return result;
2334
- }());
2893
+ if (aWrapped || bWrapped) {
2894
+ return baseIsEqual(aWrapped ? a.__wrapped__ : a, bWrapped ? b.__wrapped__ : b, callback, isWhere, stackA, stackB);
2895
+ }
2896
+ // exit for functions and DOM nodes
2897
+ if (className != objectClass) {
2898
+ return false;
2899
+ }
2900
+ // in older versions of Opera, `arguments` objects have `Array` constructors
2901
+ var ctorA = a.constructor,
2902
+ ctorB = b.constructor;
2335
2903
 
2336
- /**
2337
- * Sets `this` binding data on a given function.
2338
- *
2339
- * @private
2340
- * @param {Function} func The function to set data on.
2341
- * @param {Array} value The data array to set.
2342
- */
2343
- var setBindData = !defineProperty ? noop : function(func, value) {
2344
- descriptor.value = value;
2345
- defineProperty(func, '__bindData__', descriptor);
2346
- };
2904
+ // non `Object` object instances with different constructors are not equal
2905
+ if (ctorA != ctorB &&
2906
+ !(isFunction(ctorA) && ctorA instanceof ctorA && isFunction(ctorB) && ctorB instanceof ctorB) &&
2907
+ ('constructor' in a && 'constructor' in b)
2908
+ ) {
2909
+ return false;
2910
+ }
2911
+ }
2912
+ // assume cyclic structures are equal
2913
+ // the algorithm for detecting cyclic structures is adapted from ES 5.1
2914
+ // section 15.12.3, abstract operation `JO` (http://es5.github.io/#x15.12.3)
2915
+ var initedStack = !stackA;
2916
+ stackA || (stackA = getArray());
2917
+ stackB || (stackB = getArray());
2347
2918
 
2348
- module.exports = setBindData;
2349
-
2350
-
2351
- /***/ },
2352
- /* 40 */
2353
- /***/ function(module, exports, __webpack_require__) {
2354
-
2355
- /* WEBPACK VAR INJECTION */(function(global) {/**
2356
- * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/>
2357
- * Build: `lodash modularize modern exports="node" -o ./modern/`
2358
- * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
2359
- * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
2360
- * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
2361
- * Available under MIT license <http://lodash.com/license>
2362
- */
2363
- var isNative = __webpack_require__(27);
2919
+ var length = stackA.length;
2920
+ while (length--) {
2921
+ if (stackA[length] == a) {
2922
+ return stackB[length] == b;
2923
+ }
2924
+ }
2925
+ var size = 0;
2926
+ result = true;
2364
2927
 
2365
- /** Used to detect functions containing a `this` reference */
2366
- var reThis = /\bthis\b/;
2928
+ // add `a` and `b` to the stack of traversed objects
2929
+ stackA.push(a);
2930
+ stackB.push(b);
2367
2931
 
2368
- /**
2369
- * An object used to flag environments features.
2370
- *
2371
- * @static
2372
- * @memberOf _
2373
- * @type Object
2374
- */
2375
- var support = {};
2932
+ // recursively compare objects and arrays (susceptible to call stack limits)
2933
+ if (isArr) {
2934
+ // compare lengths to determine if a deep comparison is necessary
2935
+ length = a.length;
2936
+ size = b.length;
2937
+ result = size == length;
2376
2938
 
2377
- /**
2378
- * Detect if functions can be decompiled by `Function#toString`
2379
- * (all but PS3 and older Opera mobile browsers & avoided in Windows 8 apps).
2380
- *
2381
- * @memberOf _.support
2382
- * @type boolean
2383
- */
2384
- support.funcDecomp = !isNative(global.WinRTError) && reThis.test(function() { return this; });
2939
+ if (result || isWhere) {
2940
+ // deep compare the contents, ignoring non-numeric properties
2941
+ while (size--) {
2942
+ var index = length,
2943
+ value = b[size];
2385
2944
 
2386
- /**
2387
- * Detect if `Function#name` is supported (all but IE).
2388
- *
2389
- * @memberOf _.support
2390
- * @type boolean
2391
- */
2392
- support.funcNames = typeof Function.name == 'string';
2945
+ if (isWhere) {
2946
+ while (index--) {
2947
+ if ((result = baseIsEqual(a[index], value, callback, isWhere, stackA, stackB))) {
2948
+ break;
2949
+ }
2950
+ }
2951
+ } else if (!(result = baseIsEqual(a[size], value, callback, isWhere, stackA, stackB))) {
2952
+ break;
2953
+ }
2954
+ }
2955
+ }
2956
+ }
2957
+ else {
2958
+ // deep compare objects using `forIn`, instead of `forOwn`, to avoid `Object.keys`
2959
+ // which, in this case, is more costly
2960
+ forIn(b, function(value, key, b) {
2961
+ if (hasOwnProperty.call(b, key)) {
2962
+ // count the number of properties.
2963
+ size++;
2964
+ // deep compare each property value.
2965
+ return (result = hasOwnProperty.call(a, key) && baseIsEqual(a[key], value, callback, isWhere, stackA, stackB));
2966
+ }
2967
+ });
2393
2968
 
2394
- module.exports = support;
2969
+ if (result && !isWhere) {
2970
+ // ensure both objects have the same number of properties
2971
+ forIn(a, function(value, key, a) {
2972
+ if (hasOwnProperty.call(a, key)) {
2973
+ // `size` will be `-1` if `a` has more properties than `b`
2974
+ return (result = --size > -1);
2975
+ }
2976
+ });
2977
+ }
2978
+ }
2979
+ stackA.pop();
2980
+ stackB.pop();
2395
2981
 
2396
- /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
2982
+ if (initedStack) {
2983
+ releaseArray(stackA);
2984
+ releaseArray(stackB);
2985
+ }
2986
+ return result;
2987
+ }
2988
+
2989
+ module.exports = baseIsEqual;
2990
+
2397
2991
 
2398
2992
  /***/ },
2399
- /* 41 */
2993
+ /* 43 */
2400
2994
  /***/ function(module, exports, __webpack_require__) {
2401
2995
 
2402
2996
  /**
@@ -2407,9 +3001,9 @@ return /******/ (function(modules) { // webpackBootstrap
2407
3001
  * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
2408
3002
  * Available under MIT license <http://lodash.com/license>
2409
3003
  */
2410
- var baseCreateCallback = __webpack_require__(25),
2411
- keys = __webpack_require__(13),
2412
- objectTypes = __webpack_require__(26);
3004
+ var baseCreateCallback = __webpack_require__(30),
3005
+ keys = __webpack_require__(15),
3006
+ objectTypes = __webpack_require__(31);
2413
3007
 
2414
3008
  /**
2415
3009
  * Assigns own enumerable properties of source object(s) to the destination
@@ -2472,7 +3066,7 @@ return /******/ (function(modules) { // webpackBootstrap
2472
3066
 
2473
3067
 
2474
3068
  /***/ },
2475
- /* 42 */
3069
+ /* 44 */
2476
3070
  /***/ function(module, exports, __webpack_require__) {
2477
3071
 
2478
3072
  /**
@@ -2516,7 +3110,7 @@ return /******/ (function(modules) { // webpackBootstrap
2516
3110
 
2517
3111
 
2518
3112
  /***/ },
2519
- /* 43 */
3113
+ /* 45 */
2520
3114
  /***/ function(module, exports, __webpack_require__) {
2521
3115
 
2522
3116
  /**
@@ -2527,15 +3121,42 @@ return /******/ (function(modules) { // webpackBootstrap
2527
3121
  * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
2528
3122
  * Available under MIT license <http://lodash.com/license>
2529
3123
  */
3124
+ var createWrapper = __webpack_require__(57),
3125
+ slice = __webpack_require__(44);
2530
3126
 
2531
- /** Used to prefix keys to avoid issues with `__proto__` and properties on `Object.prototype` */
2532
- var keyPrefix = +new Date + '';
3127
+ /**
3128
+ * Creates a function that, when called, invokes `func` with the `this`
3129
+ * binding of `thisArg` and prepends any additional `bind` arguments to those
3130
+ * provided to the bound function.
3131
+ *
3132
+ * @static
3133
+ * @memberOf _
3134
+ * @category Functions
3135
+ * @param {Function} func The function to bind.
3136
+ * @param {*} [thisArg] The `this` binding of `func`.
3137
+ * @param {...*} [arg] Arguments to be partially applied.
3138
+ * @returns {Function} Returns the new bound function.
3139
+ * @example
3140
+ *
3141
+ * var func = function(greeting) {
3142
+ * return greeting + ' ' + this.name;
3143
+ * };
3144
+ *
3145
+ * func = _.bind(func, { 'name': 'fred' }, 'hi');
3146
+ * func();
3147
+ * // => 'hi fred'
3148
+ */
3149
+ function bind(func, thisArg) {
3150
+ return arguments.length > 2
3151
+ ? createWrapper(func, 17, slice(arguments, 2), null, thisArg)
3152
+ : createWrapper(func, 1, null, null, thisArg);
3153
+ }
2533
3154
 
2534
- module.exports = keyPrefix;
3155
+ module.exports = bind;
2535
3156
 
2536
3157
 
2537
3158
  /***/ },
2538
- /* 44 */
3159
+ /* 46 */
2539
3160
  /***/ function(module, exports, __webpack_require__) {
2540
3161
 
2541
3162
  /**
@@ -2546,43 +3167,48 @@ return /******/ (function(modules) { // webpackBootstrap
2546
3167
  * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
2547
3168
  * Available under MIT license <http://lodash.com/license>
2548
3169
  */
2549
- var keyPrefix = __webpack_require__(43);
3170
+ var isNative = __webpack_require__(32),
3171
+ noop = __webpack_require__(58);
3172
+
3173
+ /** Used as the property descriptor for `__bindData__` */
3174
+ var descriptor = {
3175
+ 'configurable': false,
3176
+ 'enumerable': false,
3177
+ 'value': null,
3178
+ 'writable': false
3179
+ };
3180
+
3181
+ /** Used to set meta data on functions */
3182
+ var defineProperty = (function() {
3183
+ // IE 8 only accepts DOM elements
3184
+ try {
3185
+ var o = {},
3186
+ func = isNative(func = Object.defineProperty) && func,
3187
+ result = func(o, o, o) && func;
3188
+ } catch(e) { }
3189
+ return result;
3190
+ }());
2550
3191
 
2551
3192
  /**
2552
- * Adds a given value to the corresponding cache object.
3193
+ * Sets `this` binding data on a given function.
2553
3194
  *
2554
3195
  * @private
2555
- * @param {*} value The value to add to the cache.
3196
+ * @param {Function} func The function to set data on.
3197
+ * @param {Array} value The data array to set.
2556
3198
  */
2557
- function cachePush(value) {
2558
- var cache = this.cache,
2559
- type = typeof value;
2560
-
2561
- if (type == 'boolean' || value == null) {
2562
- cache[value] = true;
2563
- } else {
2564
- if (type != 'number' && type != 'string') {
2565
- type = 'object';
2566
- }
2567
- var key = type == 'number' ? value : keyPrefix + value,
2568
- typeCache = cache[type] || (cache[type] = {});
2569
-
2570
- if (type == 'object') {
2571
- (typeCache[key] || (typeCache[key] = [])).push(value);
2572
- } else {
2573
- typeCache[key] = true;
2574
- }
2575
- }
2576
- }
3199
+ var setBindData = !defineProperty ? noop : function(func, value) {
3200
+ descriptor.value = value;
3201
+ defineProperty(func, '__bindData__', descriptor);
3202
+ };
2577
3203
 
2578
- module.exports = cachePush;
3204
+ module.exports = setBindData;
2579
3205
 
2580
3206
 
2581
3207
  /***/ },
2582
- /* 45 */
3208
+ /* 47 */
2583
3209
  /***/ function(module, exports, __webpack_require__) {
2584
3210
 
2585
- /**
3211
+ /* WEBPACK VAR INJECTION */(function(global) {/**
2586
3212
  * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/>
2587
3213
  * Build: `lodash modularize modern exports="node" -o ./modern/`
2588
3214
  * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
@@ -2590,37 +3216,43 @@ return /******/ (function(modules) { // webpackBootstrap
2590
3216
  * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
2591
3217
  * Available under MIT license <http://lodash.com/license>
2592
3218
  */
2593
- var objectPool = __webpack_require__(49);
3219
+ var isNative = __webpack_require__(32);
3220
+
3221
+ /** Used to detect functions containing a `this` reference */
3222
+ var reThis = /\bthis\b/;
2594
3223
 
2595
3224
  /**
2596
- * Gets an object from the object pool or creates a new one if the pool is empty.
3225
+ * An object used to flag environments features.
2597
3226
  *
2598
- * @private
2599
- * @returns {Object} The object from the pool.
3227
+ * @static
3228
+ * @memberOf _
3229
+ * @type Object
3230
+ */
3231
+ var support = {};
3232
+
3233
+ /**
3234
+ * Detect if functions can be decompiled by `Function#toString`
3235
+ * (all but PS3 and older Opera mobile browsers & avoided in Windows 8 apps).
3236
+ *
3237
+ * @memberOf _.support
3238
+ * @type boolean
3239
+ */
3240
+ support.funcDecomp = !isNative(global.WinRTError) && reThis.test(function() { return this; });
3241
+
3242
+ /**
3243
+ * Detect if `Function#name` is supported (all but IE).
3244
+ *
3245
+ * @memberOf _.support
3246
+ * @type boolean
2600
3247
  */
2601
- function getObject() {
2602
- return objectPool.pop() || {
2603
- 'array': null,
2604
- 'cache': null,
2605
- 'criteria': null,
2606
- 'false': false,
2607
- 'index': 0,
2608
- 'null': false,
2609
- 'number': null,
2610
- 'object': null,
2611
- 'push': null,
2612
- 'string': null,
2613
- 'true': false,
2614
- 'undefined': false,
2615
- 'value': null
2616
- };
2617
- }
3248
+ support.funcNames = typeof Function.name == 'string';
2618
3249
 
2619
- module.exports = getObject;
2620
-
3250
+ module.exports = support;
3251
+
3252
+ /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
2621
3253
 
2622
3254
  /***/ },
2623
- /* 46 */
3255
+ /* 48 */
2624
3256
  /***/ function(module, exports, __webpack_require__) {
2625
3257
 
2626
3258
  /**
@@ -2632,14 +3264,14 @@ return /******/ (function(modules) { // webpackBootstrap
2632
3264
  * Available under MIT license <http://lodash.com/license>
2633
3265
  */
2634
3266
 
2635
- /** Used to pool arrays and objects used internally */
2636
- var arrayPool = [];
3267
+ /** Used to prefix keys to avoid issues with `__proto__` and properties on `Object.prototype` */
3268
+ var keyPrefix = +new Date + '';
2637
3269
 
2638
- module.exports = arrayPool;
3270
+ module.exports = keyPrefix;
2639
3271
 
2640
3272
 
2641
3273
  /***/ },
2642
- /* 47 */
3274
+ /* 49 */
2643
3275
  /***/ function(module, exports, __webpack_require__) {
2644
3276
 
2645
3277
  /**
@@ -2650,15 +3282,40 @@ return /******/ (function(modules) { // webpackBootstrap
2650
3282
  * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
2651
3283
  * Available under MIT license <http://lodash.com/license>
2652
3284
  */
3285
+ var keyPrefix = __webpack_require__(48);
2653
3286
 
2654
- /** Used as the max size of the `arrayPool` and `objectPool` */
2655
- var maxPoolSize = 40;
3287
+ /**
3288
+ * Adds a given value to the corresponding cache object.
3289
+ *
3290
+ * @private
3291
+ * @param {*} value The value to add to the cache.
3292
+ */
3293
+ function cachePush(value) {
3294
+ var cache = this.cache,
3295
+ type = typeof value;
2656
3296
 
2657
- module.exports = maxPoolSize;
3297
+ if (type == 'boolean' || value == null) {
3298
+ cache[value] = true;
3299
+ } else {
3300
+ if (type != 'number' && type != 'string') {
3301
+ type = 'object';
3302
+ }
3303
+ var key = type == 'number' ? value : keyPrefix + value,
3304
+ typeCache = cache[type] || (cache[type] = {});
3305
+
3306
+ if (type == 'object') {
3307
+ (typeCache[key] || (typeCache[key] = [])).push(value);
3308
+ } else {
3309
+ typeCache[key] = true;
3310
+ }
3311
+ }
3312
+ }
3313
+
3314
+ module.exports = cachePush;
2658
3315
 
2659
3316
 
2660
3317
  /***/ },
2661
- /* 48 */
3318
+ /* 50 */
2662
3319
  /***/ function(module, exports, __webpack_require__) {
2663
3320
 
2664
3321
  /**
@@ -2669,211 +3326,37 @@ return /******/ (function(modules) { // webpackBootstrap
2669
3326
  * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
2670
3327
  * Available under MIT license <http://lodash.com/license>
2671
3328
  */
2672
- var forIn = __webpack_require__(54),
2673
- getArray = __webpack_require__(32),
2674
- isFunction = __webpack_require__(55),
2675
- objectTypes = __webpack_require__(26),
2676
- releaseArray = __webpack_require__(34);
2677
-
2678
- /** `Object#toString` result shortcuts */
2679
- var argsClass = '[object Arguments]',
2680
- arrayClass = '[object Array]',
2681
- boolClass = '[object Boolean]',
2682
- dateClass = '[object Date]',
2683
- numberClass = '[object Number]',
2684
- objectClass = '[object Object]',
2685
- regexpClass = '[object RegExp]',
2686
- stringClass = '[object String]';
2687
-
2688
- /** Used for native method references */
2689
- var objectProto = Object.prototype;
2690
-
2691
- /** Used to resolve the internal [[Class]] of values */
2692
- var toString = objectProto.toString;
2693
-
2694
- /** Native method shortcuts */
2695
- var hasOwnProperty = objectProto.hasOwnProperty;
3329
+ var objectPool = __webpack_require__(53);
2696
3330
 
2697
3331
  /**
2698
- * The base implementation of `_.isEqual`, without support for `thisArg` binding,
2699
- * that allows partial "_.where" style comparisons.
3332
+ * Gets an object from the object pool or creates a new one if the pool is empty.
2700
3333
  *
2701
3334
  * @private
2702
- * @param {*} a The value to compare.
2703
- * @param {*} b The other value to compare.
2704
- * @param {Function} [callback] The function to customize comparing values.
2705
- * @param {Function} [isWhere=false] A flag to indicate performing partial comparisons.
2706
- * @param {Array} [stackA=[]] Tracks traversed `a` objects.
2707
- * @param {Array} [stackB=[]] Tracks traversed `b` objects.
2708
- * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
2709
- */
2710
- function baseIsEqual(a, b, callback, isWhere, stackA, stackB) {
2711
- // used to indicate that when comparing objects, `a` has at least the properties of `b`
2712
- if (callback) {
2713
- var result = callback(a, b);
2714
- if (typeof result != 'undefined') {
2715
- return !!result;
2716
- }
2717
- }
2718
- // exit early for identical values
2719
- if (a === b) {
2720
- // treat `+0` vs. `-0` as not equal
2721
- return a !== 0 || (1 / a == 1 / b);
2722
- }
2723
- var type = typeof a,
2724
- otherType = typeof b;
2725
-
2726
- // exit early for unlike primitive values
2727
- if (a === a &&
2728
- !(a && objectTypes[type]) &&
2729
- !(b && objectTypes[otherType])) {
2730
- return false;
2731
- }
2732
- // exit early for `null` and `undefined` avoiding ES3's Function#call behavior
2733
- // http://es5.github.io/#x15.3.4.4
2734
- if (a == null || b == null) {
2735
- return a === b;
2736
- }
2737
- // compare [[Class]] names
2738
- var className = toString.call(a),
2739
- otherClass = toString.call(b);
2740
-
2741
- if (className == argsClass) {
2742
- className = objectClass;
2743
- }
2744
- if (otherClass == argsClass) {
2745
- otherClass = objectClass;
2746
- }
2747
- if (className != otherClass) {
2748
- return false;
2749
- }
2750
- switch (className) {
2751
- case boolClass:
2752
- case dateClass:
2753
- // coerce dates and booleans to numbers, dates to milliseconds and booleans
2754
- // to `1` or `0` treating invalid dates coerced to `NaN` as not equal
2755
- return +a == +b;
2756
-
2757
- case numberClass:
2758
- // treat `NaN` vs. `NaN` as equal
2759
- return (a != +a)
2760
- ? b != +b
2761
- // but treat `+0` vs. `-0` as not equal
2762
- : (a == 0 ? (1 / a == 1 / b) : a == +b);
2763
-
2764
- case regexpClass:
2765
- case stringClass:
2766
- // coerce regexes to strings (http://es5.github.io/#x15.10.6.4)
2767
- // treat string primitives and their corresponding object instances as equal
2768
- return a == String(b);
2769
- }
2770
- var isArr = className == arrayClass;
2771
- if (!isArr) {
2772
- // unwrap any `lodash` wrapped values
2773
- var aWrapped = hasOwnProperty.call(a, '__wrapped__'),
2774
- bWrapped = hasOwnProperty.call(b, '__wrapped__');
2775
-
2776
- if (aWrapped || bWrapped) {
2777
- return baseIsEqual(aWrapped ? a.__wrapped__ : a, bWrapped ? b.__wrapped__ : b, callback, isWhere, stackA, stackB);
2778
- }
2779
- // exit for functions and DOM nodes
2780
- if (className != objectClass) {
2781
- return false;
2782
- }
2783
- // in older versions of Opera, `arguments` objects have `Array` constructors
2784
- var ctorA = a.constructor,
2785
- ctorB = b.constructor;
2786
-
2787
- // non `Object` object instances with different constructors are not equal
2788
- if (ctorA != ctorB &&
2789
- !(isFunction(ctorA) && ctorA instanceof ctorA && isFunction(ctorB) && ctorB instanceof ctorB) &&
2790
- ('constructor' in a && 'constructor' in b)
2791
- ) {
2792
- return false;
2793
- }
2794
- }
2795
- // assume cyclic structures are equal
2796
- // the algorithm for detecting cyclic structures is adapted from ES 5.1
2797
- // section 15.12.3, abstract operation `JO` (http://es5.github.io/#x15.12.3)
2798
- var initedStack = !stackA;
2799
- stackA || (stackA = getArray());
2800
- stackB || (stackB = getArray());
2801
-
2802
- var length = stackA.length;
2803
- while (length--) {
2804
- if (stackA[length] == a) {
2805
- return stackB[length] == b;
2806
- }
2807
- }
2808
- var size = 0;
2809
- result = true;
2810
-
2811
- // add `a` and `b` to the stack of traversed objects
2812
- stackA.push(a);
2813
- stackB.push(b);
2814
-
2815
- // recursively compare objects and arrays (susceptible to call stack limits)
2816
- if (isArr) {
2817
- // compare lengths to determine if a deep comparison is necessary
2818
- length = a.length;
2819
- size = b.length;
2820
- result = size == length;
2821
-
2822
- if (result || isWhere) {
2823
- // deep compare the contents, ignoring non-numeric properties
2824
- while (size--) {
2825
- var index = length,
2826
- value = b[size];
2827
-
2828
- if (isWhere) {
2829
- while (index--) {
2830
- if ((result = baseIsEqual(a[index], value, callback, isWhere, stackA, stackB))) {
2831
- break;
2832
- }
2833
- }
2834
- } else if (!(result = baseIsEqual(a[size], value, callback, isWhere, stackA, stackB))) {
2835
- break;
2836
- }
2837
- }
2838
- }
2839
- }
2840
- else {
2841
- // deep compare objects using `forIn`, instead of `forOwn`, to avoid `Object.keys`
2842
- // which, in this case, is more costly
2843
- forIn(b, function(value, key, b) {
2844
- if (hasOwnProperty.call(b, key)) {
2845
- // count the number of properties.
2846
- size++;
2847
- // deep compare each property value.
2848
- return (result = hasOwnProperty.call(a, key) && baseIsEqual(a[key], value, callback, isWhere, stackA, stackB));
2849
- }
2850
- });
2851
-
2852
- if (result && !isWhere) {
2853
- // ensure both objects have the same number of properties
2854
- forIn(a, function(value, key, a) {
2855
- if (hasOwnProperty.call(a, key)) {
2856
- // `size` will be `-1` if `a` has more properties than `b`
2857
- return (result = --size > -1);
2858
- }
2859
- });
2860
- }
2861
- }
2862
- stackA.pop();
2863
- stackB.pop();
2864
-
2865
- if (initedStack) {
2866
- releaseArray(stackA);
2867
- releaseArray(stackB);
2868
- }
2869
- return result;
3335
+ * @returns {Object} The object from the pool.
3336
+ */
3337
+ function getObject() {
3338
+ return objectPool.pop() || {
3339
+ 'array': null,
3340
+ 'cache': null,
3341
+ 'criteria': null,
3342
+ 'false': false,
3343
+ 'index': 0,
3344
+ 'null': false,
3345
+ 'number': null,
3346
+ 'object': null,
3347
+ 'push': null,
3348
+ 'string': null,
3349
+ 'true': false,
3350
+ 'undefined': false,
3351
+ 'value': null
3352
+ };
2870
3353
  }
2871
3354
 
2872
- module.exports = baseIsEqual;
3355
+ module.exports = getObject;
2873
3356
 
2874
3357
 
2875
3358
  /***/ },
2876
- /* 49 */
3359
+ /* 51 */
2877
3360
  /***/ function(module, exports, __webpack_require__) {
2878
3361
 
2879
3362
  /**
@@ -2886,13 +3369,13 @@ return /******/ (function(modules) { // webpackBootstrap
2886
3369
  */
2887
3370
 
2888
3371
  /** Used to pool arrays and objects used internally */
2889
- var objectPool = [];
3372
+ var arrayPool = [];
2890
3373
 
2891
- module.exports = objectPool;
3374
+ module.exports = arrayPool;
2892
3375
 
2893
3376
 
2894
3377
  /***/ },
2895
- /* 50 */
3378
+ /* 52 */
2896
3379
  /***/ function(module, exports, __webpack_require__) {
2897
3380
 
2898
3381
  /**
@@ -2904,29 +3387,33 @@ return /******/ (function(modules) { // webpackBootstrap
2904
3387
  * Available under MIT license <http://lodash.com/license>
2905
3388
  */
2906
3389
 
3390
+ /** Used as the max size of the `arrayPool` and `objectPool` */
3391
+ var maxPoolSize = 40;
3392
+
3393
+ module.exports = maxPoolSize;
3394
+
3395
+
3396
+ /***/ },
3397
+ /* 53 */
3398
+ /***/ function(module, exports, __webpack_require__) {
3399
+
2907
3400
  /**
2908
- * This method returns the first argument provided to it.
2909
- *
2910
- * @static
2911
- * @memberOf _
2912
- * @category Utilities
2913
- * @param {*} value Any value.
2914
- * @returns {*} Returns `value`.
2915
- * @example
2916
- *
2917
- * var object = { 'name': 'fred' };
2918
- * _.identity(object) === object;
2919
- * // => true
3401
+ * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/>
3402
+ * Build: `lodash modularize modern exports="node" -o ./modern/`
3403
+ * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
3404
+ * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
3405
+ * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
3406
+ * Available under MIT license <http://lodash.com/license>
2920
3407
  */
2921
- function identity(value) {
2922
- return value;
2923
- }
2924
3408
 
2925
- module.exports = identity;
3409
+ /** Used to pool arrays and objects used internally */
3410
+ var objectPool = [];
3411
+
3412
+ module.exports = objectPool;
2926
3413
 
2927
3414
 
2928
3415
  /***/ },
2929
- /* 51 */
3416
+ /* 54 */
2930
3417
  /***/ function(module, exports, __webpack_require__) {
2931
3418
 
2932
3419
  /**
@@ -2972,7 +3459,101 @@ return /******/ (function(modules) { // webpackBootstrap
2972
3459
 
2973
3460
 
2974
3461
  /***/ },
2975
- /* 52 */
3462
+ /* 55 */
3463
+ /***/ function(module, exports, __webpack_require__) {
3464
+
3465
+ /**
3466
+ * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/>
3467
+ * Build: `lodash modularize modern exports="node" -o ./modern/`
3468
+ * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
3469
+ * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
3470
+ * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
3471
+ * Available under MIT license <http://lodash.com/license>
3472
+ */
3473
+
3474
+ /**
3475
+ * This method returns the first argument provided to it.
3476
+ *
3477
+ * @static
3478
+ * @memberOf _
3479
+ * @category Utilities
3480
+ * @param {*} value Any value.
3481
+ * @returns {*} Returns `value`.
3482
+ * @example
3483
+ *
3484
+ * var object = { 'name': 'fred' };
3485
+ * _.identity(object) === object;
3486
+ * // => true
3487
+ */
3488
+ function identity(value) {
3489
+ return value;
3490
+ }
3491
+
3492
+ module.exports = identity;
3493
+
3494
+
3495
+ /***/ },
3496
+ /* 56 */
3497
+ /***/ function(module, exports, __webpack_require__) {
3498
+
3499
+ /**
3500
+ * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/>
3501
+ * Build: `lodash modularize modern exports="node" -o ./modern/`
3502
+ * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
3503
+ * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
3504
+ * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
3505
+ * Available under MIT license <http://lodash.com/license>
3506
+ */
3507
+ var baseCreateCallback = __webpack_require__(30),
3508
+ objectTypes = __webpack_require__(31);
3509
+
3510
+ /**
3511
+ * Iterates over own and inherited enumerable properties of an object,
3512
+ * executing the callback for each property. The callback is bound to `thisArg`
3513
+ * and invoked with three arguments; (value, key, object). Callbacks may exit
3514
+ * iteration early by explicitly returning `false`.
3515
+ *
3516
+ * @static
3517
+ * @memberOf _
3518
+ * @type Function
3519
+ * @category Objects
3520
+ * @param {Object} object The object to iterate over.
3521
+ * @param {Function} [callback=identity] The function called per iteration.
3522
+ * @param {*} [thisArg] The `this` binding of `callback`.
3523
+ * @returns {Object} Returns `object`.
3524
+ * @example
3525
+ *
3526
+ * function Shape() {
3527
+ * this.x = 0;
3528
+ * this.y = 0;
3529
+ * }
3530
+ *
3531
+ * Shape.prototype.move = function(x, y) {
3532
+ * this.x += x;
3533
+ * this.y += y;
3534
+ * };
3535
+ *
3536
+ * _.forIn(new Shape, function(value, key) {
3537
+ * console.log(key);
3538
+ * });
3539
+ * // => logs 'x', 'y', and 'move' (property order is not guaranteed across environments)
3540
+ */
3541
+ var forIn = function(collection, callback, thisArg) {
3542
+ var index, iterable = collection, result = iterable;
3543
+ if (!iterable) return result;
3544
+ if (!objectTypes[typeof iterable]) return result;
3545
+ callback = callback && typeof thisArg == 'undefined' ? callback : baseCreateCallback(callback, thisArg, 3);
3546
+ for (index in iterable) {
3547
+ if (callback(iterable[index], index, collection) === false) return result;
3548
+ }
3549
+ return result
3550
+ };
3551
+
3552
+ module.exports = forIn;
3553
+
3554
+
3555
+ /***/ },
3556
+ /* 57 */
2976
3557
  /***/ function(module, exports, __webpack_require__) {
2977
3558
 
2978
3559
  /**
@@ -2983,10 +3564,10 @@ return /******/ (function(modules) { // webpackBootstrap
2983
3564
  * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
2984
3565
  * Available under MIT license <http://lodash.com/license>
2985
3566
  */
2986
- var baseBind = __webpack_require__(56),
2987
- baseCreateWrapper = __webpack_require__(57),
2988
- isFunction = __webpack_require__(55),
2989
- slice = __webpack_require__(42);
3567
+ var baseBind = __webpack_require__(59),
3568
+ baseCreateWrapper = __webpack_require__(60),
3569
+ isFunction = __webpack_require__(17),
3570
+ slice = __webpack_require__(44);
2990
3571
 
2991
3572
  /**
2992
3573
  * Used for `Array` method references.
@@ -3084,7 +3665,7 @@ return /******/ (function(modules) { // webpackBootstrap
3084
3665
 
3085
3666
 
3086
3667
  /***/ },
3087
- /* 53 */
3668
+ /* 58 */
3088
3669
  /***/ function(module, exports, __webpack_require__) {
3089
3670
 
3090
3671
  /**
@@ -3116,100 +3697,7 @@ return /******/ (function(modules) { // webpackBootstrap
3116
3697
 
3117
3698
 
3118
3699
  /***/ },
3119
- /* 54 */
3120
- /***/ function(module, exports, __webpack_require__) {
3121
-
3122
- /**
3123
- * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/>
3124
- * Build: `lodash modularize modern exports="node" -o ./modern/`
3125
- * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
3126
- * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
3127
- * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
3128
- * Available under MIT license <http://lodash.com/license>
3129
- */
3130
- var baseCreateCallback = __webpack_require__(25),
3131
- objectTypes = __webpack_require__(26);
3132
-
3133
- /**
3134
- * Iterates over own and inherited enumerable properties of an object,
3135
- * executing the callback for each property. The callback is bound to `thisArg`
3136
- * and invoked with three arguments; (value, key, object). Callbacks may exit
3137
- * iteration early by explicitly returning `false`.
3138
- *
3139
- * @static
3140
- * @memberOf _
3141
- * @type Function
3142
- * @category Objects
3143
- * @param {Object} object The object to iterate over.
3144
- * @param {Function} [callback=identity] The function called per iteration.
3145
- * @param {*} [thisArg] The `this` binding of `callback`.
3146
- * @returns {Object} Returns `object`.
3147
- * @example
3148
- *
3149
- * function Shape() {
3150
- * this.x = 0;
3151
- * this.y = 0;
3152
- * }
3153
- *
3154
- * Shape.prototype.move = function(x, y) {
3155
- * this.x += x;
3156
- * this.y += y;
3157
- * };
3158
- *
3159
- * _.forIn(new Shape, function(value, key) {
3160
- * console.log(key);
3161
- * });
3162
- * // => logs 'x', 'y', and 'move' (property order is not guaranteed across environments)
3163
- */
3164
- var forIn = function(collection, callback, thisArg) {
3165
- var index, iterable = collection, result = iterable;
3166
- if (!iterable) return result;
3167
- if (!objectTypes[typeof iterable]) return result;
3168
- callback = callback && typeof thisArg == 'undefined' ? callback : baseCreateCallback(callback, thisArg, 3);
3169
- for (index in iterable) {
3170
- if (callback(iterable[index], index, collection) === false) return result;
3171
- }
3172
- return result
3173
- };
3174
-
3175
- module.exports = forIn;
3176
-
3177
-
3178
- /***/ },
3179
- /* 55 */
3180
- /***/ function(module, exports, __webpack_require__) {
3181
-
3182
- /**
3183
- * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/>
3184
- * Build: `lodash modularize modern exports="node" -o ./modern/`
3185
- * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
3186
- * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
3187
- * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
3188
- * Available under MIT license <http://lodash.com/license>
3189
- */
3190
-
3191
- /**
3192
- * Checks if `value` is a function.
3193
- *
3194
- * @static
3195
- * @memberOf _
3196
- * @category Objects
3197
- * @param {*} value The value to check.
3198
- * @returns {boolean} Returns `true` if the `value` is a function, else `false`.
3199
- * @example
3200
- *
3201
- * _.isFunction(_);
3202
- * // => true
3203
- */
3204
- function isFunction(value) {
3205
- return typeof value == 'function';
3206
- }
3207
-
3208
- module.exports = isFunction;
3209
-
3210
-
3211
- /***/ },
3212
- /* 56 */
3700
+ /* 59 */
3213
3701
  /***/ function(module, exports, __webpack_require__) {
3214
3702
 
3215
3703
  /**
@@ -3220,10 +3708,10 @@ return /******/ (function(modules) { // webpackBootstrap
3220
3708
  * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
3221
3709
  * Available under MIT license <http://lodash.com/license>
3222
3710
  */
3223
- var baseCreate = __webpack_require__(58),
3224
- isObject = __webpack_require__(21),
3225
- setBindData = __webpack_require__(39),
3226
- slice = __webpack_require__(42);
3711
+ var baseCreate = __webpack_require__(61),
3712
+ isObject = __webpack_require__(25),
3713
+ setBindData = __webpack_require__(46),
3714
+ slice = __webpack_require__(44);
3227
3715
 
3228
3716
  /**
3229
3717
  * Used for `Array` method references.
@@ -3277,7 +3765,7 @@ return /******/ (function(modules) { // webpackBootstrap
3277
3765
 
3278
3766
 
3279
3767
  /***/ },
3280
- /* 57 */
3768
+ /* 60 */
3281
3769
  /***/ function(module, exports, __webpack_require__) {
3282
3770
 
3283
3771
  /**
@@ -3288,10 +3776,10 @@ return /******/ (function(modules) { // webpackBootstrap
3288
3776
  * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
3289
3777
  * Available under MIT license <http://lodash.com/license>
3290
3778
  */
3291
- var baseCreate = __webpack_require__(58),
3292
- isObject = __webpack_require__(21),
3293
- setBindData = __webpack_require__(39),
3294
- slice = __webpack_require__(42);
3779
+ var baseCreate = __webpack_require__(61),
3780
+ isObject = __webpack_require__(25),
3781
+ setBindData = __webpack_require__(46),
3782
+ slice = __webpack_require__(44);
3295
3783
 
3296
3784
  /**
3297
3785
  * Used for `Array` method references.
@@ -3361,7 +3849,7 @@ return /******/ (function(modules) { // webpackBootstrap
3361
3849
 
3362
3850
 
3363
3851
  /***/ },
3364
- /* 58 */
3852
+ /* 61 */
3365
3853
  /***/ function(module, exports, __webpack_require__) {
3366
3854
 
3367
3855
  /* WEBPACK VAR INJECTION */(function(global) {/**
@@ -3372,9 +3860,9 @@ return /******/ (function(modules) { // webpackBootstrap
3372
3860
  * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
3373
3861
  * Available under MIT license <http://lodash.com/license>
3374
3862
  */
3375
- var isNative = __webpack_require__(27),
3376
- isObject = __webpack_require__(21),
3377
- noop = __webpack_require__(53);
3863
+ var isNative = __webpack_require__(32),
3864
+ isObject = __webpack_require__(25),
3865
+ noop = __webpack_require__(58);
3378
3866
 
3379
3867
  /* Native method shortcuts for methods with the same name as other `lodash` methods */
3380
3868
  var nativeCreate = isNative(nativeCreate = Object.create) && nativeCreate;