lodash-rails 0.9.2 → 0.10.0

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -18,6 +18,6 @@ Add the necessary library to `app/assets/javascripts/application.js`:
18
18
 
19
19
  ## What's included?
20
20
 
21
- * Lo-Dash 0.9.2 (lodash, lodash.min)
21
+ * Lo-Dash 0.10.0 (lodash, lodash.min)
22
22
 
23
23
  Copyright Richard Hubers, released under the MIT License.
@@ -1,5 +1,5 @@
1
1
  module LoDash
2
2
  module Rails
3
- VERSION = "0.9.2"
3
+ VERSION = "0.10.0"
4
4
  end
5
5
  end
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Lo-Dash v0.9.2 <http://lodash.com>
2
+ * Lo-Dash 0.10.0 <http://lodash.com>
3
3
  * (c) 2012 John-David Dalton <http://allyoucanleet.com/>
4
4
  * Based on Underscore.js 1.4.2 <http://underscorejs.org>
5
5
  * (c) 2009-2012 Jeremy Ashkenas, DocumentCloud Inc.
@@ -417,6 +417,16 @@
417
417
  'return result'
418
418
  );
419
419
 
420
+ /** Reusable iterator options for `assign` and `defaults` */
421
+ var assignIteratorOptions = {
422
+ 'args': 'object, source, guard',
423
+ 'top':
424
+ 'for (var argsIndex = 1, argsLength = typeof guard == \'number\' ? 2 : arguments.length; argsIndex < argsLength; argsIndex++) {\n' +
425
+ ' if ((iteratee = arguments[argsIndex])) {',
426
+ 'objectLoop': 'result[index] = value',
427
+ 'bottom': ' }\n}'
428
+ };
429
+
420
430
  /**
421
431
  * Reusable iterator options shared by `forEach`, `forIn`, and `forOwn`.
422
432
  */
@@ -427,17 +437,6 @@
427
437
  'objectLoop': 'if (callback(value, index, collection) === false) return result'
428
438
  };
429
439
 
430
- /** Reusable iterator options for `defaults`, and `extend` */
431
- var extendIteratorOptions = {
432
- 'useHas': false,
433
- 'args': 'object',
434
- 'top':
435
- 'for (var argsIndex = 1, argsLength = arguments.length; argsIndex < argsLength; argsIndex++) {\n' +
436
- ' if (iteratee = arguments[argsIndex]) {',
437
- 'objectLoop': 'result[index] = value',
438
- 'bottom': ' }\n}'
439
- };
440
-
441
440
  /** Reusable iterator options for `forIn` and `forOwn` */
442
441
  var forOwnIteratorOptions = {
443
442
  'arrayLoop': null
@@ -537,12 +536,15 @@
537
536
  function createBound(func, thisArg, partialArgs) {
538
537
  var isFunc = isFunction(func),
539
538
  isPartial = !partialArgs,
540
- methodName = func;
539
+ key = thisArg;
541
540
 
542
541
  // juggle arguments
543
542
  if (isPartial) {
544
543
  partialArgs = thisArg;
545
544
  }
545
+ if (!isFunc) {
546
+ thisArg = func;
547
+ }
546
548
 
547
549
  function bound() {
548
550
  // `Function#bind` spec
@@ -551,7 +553,7 @@
551
553
  thisBinding = isPartial ? this : thisArg;
552
554
 
553
555
  if (!isFunc) {
554
- func = thisArg[methodName];
556
+ func = thisArg[key];
555
557
  }
556
558
  if (partialArgs.length) {
557
559
  args = args.length
@@ -697,6 +699,25 @@
697
699
 
698
700
  /*--------------------------------------------------------------------------*/
699
701
 
702
+ /**
703
+ * Assigns own enumerable properties of source object(s) to the `destination`
704
+ * object. Subsequent sources will overwrite propery assignments of previous
705
+ * sources.
706
+ *
707
+ * @static
708
+ * @memberOf _
709
+ * @alias extend
710
+ * @category Objects
711
+ * @param {Object} object The destination object.
712
+ * @param {Object} [source1, source2, ...] The source objects.
713
+ * @returns {Object} Returns the destination object.
714
+ * @example
715
+ *
716
+ * _.assign({ 'name': 'moe' }, { 'age': 40 });
717
+ * // => { 'name': 'moe', 'age': 40 }
718
+ */
719
+ var assign = createIterator(assignIteratorOptions);
720
+
700
721
  /**
701
722
  * Checks if `value` is an `arguments` object.
702
723
  *
@@ -756,7 +777,7 @@
756
777
  });
757
778
 
758
779
  /**
759
- * Iterates over `object`'s own enumerable properties, executing the `callback`
780
+ * Iterates over an object's own enumerable properties, executing the `callback`
760
781
  * for each property. The `callback` is bound to `thisArg` and invoked with three
761
782
  * arguments; (value, key, object). Callbacks may exit iteration early by explicitly
762
783
  * returning `false`.
@@ -915,7 +936,7 @@
915
936
  if (!isObj || !deep) {
916
937
  // don't clone functions
917
938
  return isObj
918
- ? (isArr ? slice.call(value) : extend({}, value))
939
+ ? (isArr ? slice.call(value) : assign({}, value))
919
940
  : value;
920
941
  }
921
942
 
@@ -959,7 +980,7 @@
959
980
  }
960
981
 
961
982
  /**
962
- * Assigns enumerable properties of the default object(s) to the `destination`
983
+ * Assigns own enumerable properties of source object(s) to the `destination`
963
984
  * object for all `destination` properties that resolve to `null`/`undefined`.
964
985
  * Once a property is set, additional defaults of the same property will be
965
986
  * ignored.
@@ -976,28 +997,10 @@
976
997
  * _.defaults(iceCream, { 'flavor': 'vanilla', 'sprinkles': 'rainbow' });
977
998
  * // => { 'flavor': 'chocolate', 'sprinkles': 'rainbow' }
978
999
  */
979
- var defaults = createIterator(extendIteratorOptions, {
980
- 'objectLoop': 'if (result[index] == null) ' + extendIteratorOptions.objectLoop
1000
+ var defaults = createIterator(assignIteratorOptions, {
1001
+ 'objectLoop': 'if (result[index] == null) ' + assignIteratorOptions.objectLoop
981
1002
  });
982
1003
 
983
- /**
984
- * Assigns enumerable properties of the source object(s) to the `destination`
985
- * object. Subsequent sources will overwrite propery assignments of previous
986
- * sources.
987
- *
988
- * @static
989
- * @memberOf _
990
- * @category Objects
991
- * @param {Object} object The destination object.
992
- * @param {Object} [source1, source2, ...] The source objects.
993
- * @returns {Object} Returns the destination object.
994
- * @example
995
- *
996
- * _.extend({ 'name': 'moe' }, { 'age': 40 });
997
- * // => { 'name': 'moe', 'age': 40 }
998
- */
999
- var extend = createIterator(extendIteratorOptions);
1000
-
1001
1004
  /**
1002
1005
  * Creates a sorted array of all enumerable properties, own and inherited,
1003
1006
  * of `object` that have function values.
@@ -1630,10 +1633,14 @@
1630
1633
  stackA = args[3],
1631
1634
  stackB = args[4];
1632
1635
 
1633
- if (indicator !== objectRef) {
1636
+ if (indicator !== indicatorObject) {
1634
1637
  stackA = [];
1635
1638
  stackB = [];
1636
- length = args.length;
1639
+
1640
+ // work with `_.reduce` by only using its callback `accumulator` and `value` arguments
1641
+ if (typeof indicator != 'number') {
1642
+ length = args.length;
1643
+ }
1637
1644
  }
1638
1645
  while (++index < length) {
1639
1646
  forOwn(args[index], function(source, key) {
@@ -1658,7 +1665,7 @@
1658
1665
  : (isPlainObject(value) ? value : {})
1659
1666
  );
1660
1667
  // recursively merge objects and arrays (susceptible to call stack limits)
1661
- object[key] = merge(value, source, objectRef, stackA, stackB);
1668
+ object[key] = merge(value, source, indicatorObject, stackA, stackB);
1662
1669
  }
1663
1670
  } else if (source != null) {
1664
1671
  object[key] = source;
@@ -1836,18 +1843,23 @@
1836
1843
  */
1837
1844
  function contains(collection, target, fromIndex) {
1838
1845
  var index = -1,
1839
- length = collection ? collection.length : 0;
1846
+ length = collection ? collection.length : 0,
1847
+ result = false;
1840
1848
 
1841
1849
  fromIndex = (fromIndex < 0 ? nativeMax(0, length + fromIndex) : fromIndex) || 0;
1842
1850
  if (typeof length == 'number') {
1843
- return (isString(collection)
1851
+ result = (isString(collection)
1844
1852
  ? collection.indexOf(target, fromIndex)
1845
1853
  : indexOf(collection, target, fromIndex)
1846
1854
  ) > -1;
1855
+ } else {
1856
+ forEach(collection, function(value) {
1857
+ if (++index >= fromIndex) {
1858
+ return !(result = value === target);
1859
+ }
1860
+ });
1847
1861
  }
1848
- return some(collection, function(value) {
1849
- return ++index >= fromIndex && value === target;
1850
- });
1862
+ return result;
1851
1863
  }
1852
1864
 
1853
1865
  /**
@@ -1947,11 +1959,24 @@
1947
1959
  function filter(collection, callback, thisArg) {
1948
1960
  var result = [];
1949
1961
  callback = createCallback(callback, thisArg);
1950
- forEach(collection, function(value, index, collection) {
1951
- if (callback(value, index, collection)) {
1952
- result.push(value);
1962
+
1963
+ if (isArray(collection)) {
1964
+ var index = -1,
1965
+ length = collection.length;
1966
+
1967
+ while (++index < length) {
1968
+ var value = collection[index];
1969
+ if (callback(value, index, collection)) {
1970
+ result.push(value);
1971
+ }
1953
1972
  }
1954
- });
1973
+ } else {
1974
+ forEach(collection, function(value, index, collection) {
1975
+ if (callback(value, index, collection)) {
1976
+ result.push(value);
1977
+ }
1978
+ });
1979
+ }
1955
1980
  return result;
1956
1981
  }
1957
1982
 
@@ -2407,7 +2432,7 @@
2407
2432
  * else `false`.
2408
2433
  * @example
2409
2434
  *
2410
- * _.some([null, 0, 'yes', false]);
2435
+ * _.some([null, 0, 'yes', false], Boolean);
2411
2436
  * // => true
2412
2437
  */
2413
2438
  function some(collection, callback, thisArg) {
@@ -2419,7 +2444,7 @@
2419
2444
  length = collection.length;
2420
2445
 
2421
2446
  while (++index < length) {
2422
- if (result = callback(collection[index], index, collection)) {
2447
+ if ((result = callback(collection[index], index, collection))) {
2423
2448
  break;
2424
2449
  }
2425
2450
  }
@@ -2519,10 +2544,7 @@
2519
2544
  * // => [{ 'name': 'moe', 'age': 40 }]
2520
2545
  */
2521
2546
  function where(collection, properties) {
2522
- var props = [];
2523
- forIn(properties, function(value, prop) {
2524
- props.push(prop);
2525
- });
2547
+ var props = keys(properties);
2526
2548
  return filter(collection, function(object) {
2527
2549
  var length = props.length;
2528
2550
  while (length--) {
@@ -3225,6 +3247,44 @@
3225
3247
  return object;
3226
3248
  }
3227
3249
 
3250
+ /**
3251
+ * Creates a function that, when called, invokes the method at `object[key]`
3252
+ * and prepends any additional `bindKey` arguments to those passed to the bound
3253
+ * function. This method differs from `_.bind` by allowing bound functions to
3254
+ * reference methods that will be redefined or don't yet exist.
3255
+ * See http://michaux.ca/articles/lazy-function-definition-pattern.
3256
+ *
3257
+ * @static
3258
+ * @memberOf _
3259
+ * @category Functions
3260
+ * @param {Object} object The object the method belongs to.
3261
+ * @param {String} key The key of the method.
3262
+ * @param {Mixed} [arg1, arg2, ...] Arguments to be partially applied.
3263
+ * @returns {Function} Returns the new bound function.
3264
+ * @example
3265
+ *
3266
+ * var object = {
3267
+ * 'name': 'moe',
3268
+ * 'greet': function(greeting) {
3269
+ * return greeting + ' ' + this.name;
3270
+ * }
3271
+ * };
3272
+ *
3273
+ * var func = _.bindKey(object, 'greet', 'hi');
3274
+ * func();
3275
+ * // => 'hi moe'
3276
+ *
3277
+ * object.greet = function(greeting) {
3278
+ * return greeting + ', ' + this.name + '!';
3279
+ * };
3280
+ *
3281
+ * func();
3282
+ * // => 'hi, moe!'
3283
+ */
3284
+ function bindKey(object, key) {
3285
+ return createBound(object, key, slice.call(arguments, 2));
3286
+ }
3287
+
3228
3288
  /**
3229
3289
  * Creates a function that is the composition of the passed functions,
3230
3290
  * where each function consumes the return value of the function that follows.
@@ -3346,43 +3406,6 @@
3346
3406
  return setTimeout(function() { func.apply(undefined, args); }, 1);
3347
3407
  }
3348
3408
 
3349
- /**
3350
- * Creates a function that, when called, invokes `object[methodName]` and
3351
- * prepends any additional `lateBind` arguments to those passed to the bound
3352
- * function. This method differs from `_.bind` by allowing bound functions to
3353
- * reference methods that will be redefined or don't yet exist.
3354
- *
3355
- * @static
3356
- * @memberOf _
3357
- * @category Functions
3358
- * @param {Object} object The object the method belongs to.
3359
- * @param {String} methodName The method name.
3360
- * @param {Mixed} [arg1, arg2, ...] Arguments to be partially applied.
3361
- * @returns {Function} Returns the new bound function.
3362
- * @example
3363
- *
3364
- * var object = {
3365
- * 'name': 'moe',
3366
- * 'greet': function(greeting) {
3367
- * return greeting + ' ' + this.name;
3368
- * }
3369
- * };
3370
- *
3371
- * var func = _.lateBind(object, 'greet', 'hi');
3372
- * func();
3373
- * // => 'hi moe'
3374
- *
3375
- * object.greet = function(greeting) {
3376
- * return greeting + ', ' + this.name + '!';
3377
- * };
3378
- *
3379
- * func();
3380
- * // => 'hi, moe!'
3381
- */
3382
- function lateBind(object, methodName) {
3383
- return createBound(methodName, object, slice.call(arguments, 2));
3384
- }
3385
-
3386
3409
  /**
3387
3410
  * Creates a function that memoizes the result of `func`. If `resolver` is
3388
3411
  * passed, it will be used to determine the cache key for storing the result
@@ -4057,12 +4080,14 @@
4057
4080
  * @memberOf _
4058
4081
  * @type String
4059
4082
  */
4060
- lodash.VERSION = '0.9.2';
4083
+ lodash.VERSION = '0.10.0';
4061
4084
 
4062
4085
  // assign static methods
4086
+ lodash.assign = assign;
4063
4087
  lodash.after = after;
4064
4088
  lodash.bind = bind;
4065
4089
  lodash.bindAll = bindAll;
4090
+ lodash.bindKey = bindKey;
4066
4091
  lodash.chain = chain;
4067
4092
  lodash.clone = clone;
4068
4093
  lodash.compact = compact;
@@ -4076,7 +4101,6 @@
4076
4101
  lodash.difference = difference;
4077
4102
  lodash.escape = escape;
4078
4103
  lodash.every = every;
4079
- lodash.extend = extend;
4080
4104
  lodash.filter = filter;
4081
4105
  lodash.find = find;
4082
4106
  lodash.first = first;
@@ -4113,7 +4137,6 @@
4113
4137
  lodash.keys = keys;
4114
4138
  lodash.last = last;
4115
4139
  lodash.lastIndexOf = lastIndexOf;
4116
- lodash.lateBind = lateBind;
4117
4140
  lodash.map = map;
4118
4141
  lodash.max = max;
4119
4142
  lodash.memoize = memoize;
@@ -4162,6 +4185,7 @@
4162
4185
  lodash.detect = find;
4163
4186
  lodash.drop = rest;
4164
4187
  lodash.each = forEach;
4188
+ lodash.extend = assign;
4165
4189
  lodash.foldl = reduce;
4166
4190
  lodash.foldr = reduceRight;
4167
4191
  lodash.head = first;
@@ -1,40 +1,40 @@
1
1
  /*!
2
- Lo-Dash 0.9.2 lodash.com/license
2
+ Lo-Dash 0.10.0 lodash.com/license
3
3
  Underscore.js 1.4.2 underscorejs.org/LICENSE
4
4
  */
5
- ;(function(e,t){function s(e){if(e&&e.__wrapped__)return e;if(!(this instanceof s))return new s(e);this.__wrapped__=e}function o(e,t,n){t||(t=0);var r=e.length,i=r-t>=(n||Y);if(i)for(var s={},n=t-1;++n<r;){var o=e[n]+"";(yt.call(s,o)?s[o]:s[o]=[]).push(e[n])}return function(n){if(i){var r=n+"";return yt.call(s,r)&&-1<q(s[r],n)}return-1<q(e,n,t)}}function u(e){return e.charCodeAt(0)}function a(e,n){var r=e.b,i=n.b,e=e.a,n=n.a;if(e!==n){if(e>n||e===t)return 1;if(e<n||n===t)return-1}return r<i?-1:1}function f
6
- (e,t,n){function r(){var u=arguments,a=s?this:t;return i||(e=t[o]),n.length&&(u=u.length?n.concat(Et.call(u)):n),this instanceof r?(d.prototype=e.prototype,a=new d,u=e.apply(a,u),T(u)?u:a):e.apply(a,u)}var i=x(e),s=!n,o=e;return s&&(n=t),r}function l(e,n){return e?"function"!=typeof e?function(t){return t[e]}:n!==t?function(t,r,i){return e.call(n,t,r,i)}:e:X}function c(){for(var e={b:"",c:"",e:It,f:Kt,g:"",h:Ut,i:Xt,j:pt,k:"",l:n},t,r=0;t=arguments[r];r++)for(var i in t)e[i]=t[i];t=e.a,e.d=/^[^,]+/
7
- .exec(t)[0],r="var h,v,k="+e.d+",s="+e.d+";if(!"+e.d+")return s;"+e.k+";",e.b?(r+="var l=k.length;h=-1;if(typeof l=='number'){",e.i&&(r+="if(j(k)){k=k.split('')}"),r+="while(++h<l){v=k[h];"+e.b+"}}else {"):e.h&&(r+="var l=k.length;h=-1;if(l&&i(k)){while(++h<l){v=k[h+=''];"+e.g+"}}else {"),e.e||(r+="var t=typeof k=='function'&&r.call(k,'prototype');");if(e.f&&e.l)r+="var p=-1,q=o[typeof k]?m(k):[],l=q.length;while(++p<l){h=q[p];",e.e||(r+="if(!(t&&h=='prototype')){"),r+="v=k[h];"+e.g+"",e.e||(r+="}"
8
- );else{r+="for(h in k){";if(!e.e||e.l)r+="if(",e.e||(r+="!(t&&h=='prototype')"),!e.e&&e.l&&(r+="&&"),e.l&&(r+="g.call(k,h)"),r+="){";r+="v=k[h];"+e.g+";";if(!e.e||e.l)r+="}"}r+="}";if(e.e){r+="var f=k.constructor;";for(i=0;7>i;i++)r+="h='"+e.j[i]+"';if(","constructor"==e.j[i]&&(r+="!(f&&f.prototype===k)&&"),r+="g.call(k,h)){v=k[h];"+e.g+"}"}if(e.b||e.h)r+="}";return r+=e.c+";return s",Function("e,g,i,j,o,m,r","return function("+t+"){"+r+"}")(l,yt,m,N,Gt,kt,wt)}function h(e){return"\\"+Yt[e]}function p
9
- (e){return sn[e]}function d(){}function v(e){return on[e]}function m(e){return St.call(e)==Mt}function g(e){var t=i;if(!e||"object"!=typeof e||m(e))return t;var n=e.constructor;return(!Vt||"function"==typeof e.toString||"string"!=typeof (e+""))&&(!x(n)||n instanceof n)?qt?(nn(e,function(e,n,r){return t=!yt.call(r,n),i}),t===i):(nn(e,function(e,n){t=n}),t===i||yt.call(e,t)):t}function y(e){var t=[];return rn(e,function(e,n){t.push(n)}),t}function b(e,t,n,s,o){if(e==r)return e;n&&(t=i);if(n=T(e)){var u=
10
- St.call(e);if(!Qt[u]||zt&&m(e))return e;var a=u==_t,n=a||(u==Bt?ln(e):n)}if(!n||!t)return n?a?Et.call(e):an({},e):e;n=e.constructor;switch(u){case Dt:case Pt:return new n(+e);case Ht:case Ft:return new n(e);case jt:return n(e.source,st.exec(e))}s||(s=[]),o||(o=[]);for(u=s.length;u--;)if(s[u]==e)return o[u];var f=a?n(e.length):{};return s.push(e),o.push(f),(a?hn:rn)(e,function(e,n){f[n]=b(e,t,r,s,o)}),f}function w(e){var t=[];return nn(e,function(e,n){x(e)&&t.push(n)}),t.sort()}function E(e){var t=
11
- {};return rn(e,function(e,n){t[e]=n}),t}function S(e,t,s,o){if(e===t)return 0!==e||1/e==1/t;if(e==r||t==r)return e===t;var u=St.call(e);if(u!=St.call(t))return i;switch(u){case Dt:case Pt:return+e==+t;case Ht:return e!=+e?t!=+t:0==e?1/e==1/t:e==+t;case jt:case Ft:return e==t+""}var a=u==_t||u==Mt;if(zt&&!a&&(a=m(e))&&!m(t))return i;if(!a){if(e.__wrapped__||t.__wrapped__)return S(e.__wrapped__||e,t.__wrapped__||t);if(u!=Bt||Vt&&("function"!=typeof e.toString&&"string"==typeof (e+"")||"function"!=typeof
12
- t.toString&&"string"==typeof (t+"")))return i;var u=e.constructor,f=t.constructor;if(u!=f&&(!x(u)||!(u instanceof u&&x(f)&&f instanceof f)))return i}s||(s=[]),o||(o=[]);for(u=s.length;u--;)if(s[u]==e)return o[u]==t;var u=-1,f=n,l=0;s.push(e),o.push(t);if(a){l=e.length;if(f=l==t.length)for(;l--&&(f=S(e[l],t[l],s,o)););return f}for(var c in e)if(yt.call(e,c)&&(l++,!yt.call(t,c)||!S(e[c],t[c],s,o)))return i;for(c in t)if(yt.call(t,c)&&!(l--))return i;if(It)for(;7>++u;)if(c=pt[u],yt.call(e,c)&&(!yt.call
13
- (t,c)||!S(e[c],t[c],s,o)))return i;return n}function x(e){return"function"==typeof e}function T(e){return e?Gt[typeof e]:i}function N(e){return St.call(e)==Ft}function C(e,t,n){var i=arguments,s=0,o=2,u=i[3],a=i[4];n!==Q&&(u=[],a=[],o=i.length);for(;++s<o;)rn(i[s],function(t,n){var i,s,o;if(t&&((s=fn(t))||ln(t))){for(var f=u.length;f--;)if(i=u[f]==t)break;i?e[n]=a[f]:(u.push(t),a.push(o=(o=e[n],s)?fn(o)?o:[]:ln(o)?o:{}),e[n]=C(o,t,Q,u,a))}else t!=r&&(e[n]=t)});return e}function k(e){var t=[];return rn
14
- (e,function(e){t.push(e)}),t}function L(e,t,n){var r=-1,i=e?e.length:0,n=(0>n?Lt(0,i+n):n)||0;return"number"==typeof i?-1<(N(e)?e.indexOf(t,n):q(e,t,n)):j(e,function(e){return++r>=n&&e===t})}function A(e,t,r){var i=n,t=l(t,r);if(fn(e))for(var r=-1,s=e.length;++r<s&&(i=!!t(e[r],r,e)););else hn(e,function(e,n,r){return i=!!t(e,n,r)});return i}function O(e,t,n){var r=[],t=l(t,n);return hn(e,function(e,n,i){t(e,n,i)&&r.push(e)}),r}function M(e,t,n){var r,t=l(t,n);return hn(e,function(e,n,s){if(t(e,n,
15
- s))return r=e,i}),r}function _(e,t,n){var r=-1,i=e?e.length:0,s=Array("number"==typeof i?i:0),t=l(t,n);if(fn(e))for(;++r<i;)s[r]=t(e[r],r,e);else hn(e,function(e,n,i){s[++r]=t(e,n,i)});return s}function D(e,t,n){var r=-Infinity,i=-1,s=e?e.length:0,o=r;if(t||!fn(e))t=!t&&N(e)?u:l(t,n),hn(e,function(e,n,i){n=t(e,n,i),n>r&&(r=n,o=e)});else for(;++i<s;)e[i]>o&&(o=e[i]);return o}function P(e,t){var n=[];return hn(e,function(e){n.push(e[t])}),n}function H(e,t,n,r){var s=3>arguments.length,t=l(t,r);return hn
16
- (e,function(e,r,o){n=s?(s=i,e):t(n,e,r,o)}),n}function B(e,t,n,r){var s=e,o=e?e.length:0,u=3>arguments.length;if("number"!=typeof o)var a=cn(e),o=a.length;else Xt&&N(e)&&(s=e.split(""));return hn(e,function(e,f,l){f=a?a[--o]:--o,n=u?(u=i,s[f]):t.call(r,n,s[f],f,l)}),n}function j(e,t,n){var r,t=l(t,n);if(fn(e))for(var n=-1,i=e.length;++n<i&&!(r=t(e[n],n,e)););else hn(e,function(e,n,i){return!(r=t(e,n,i))});return!!r}function F(e,t,n){if(e)return t==r||n?e[0]:Et.call(e,0,t)}function I(e,t){for(var n=-1
17
- ,r=e?e.length:0,i=[];++n<r;){var s=e[n];fn(s)?bt.apply(i,t?s:I(s)):i.push(s)}return i}function q(e,t,n){var r=-1,i=e?e.length:0;if("number"==typeof n)r=(0>n?Lt(0,i+n):n||0)-1;else if(n)return r=U(e,t),e[r]===t?r:-1;for(;++r<i;)if(e[r]===t)return r;return-1}function R(e,t,n){return e?Et.call(e,t==r||n?1:t):[]}function U(e,t,n,r){for(var i=0,s=e?e.length:i,n=n?l(n,r):X,t=n(t);i<s;)r=i+s>>>1,n(e[r])<t?i=r+1:s=r;return i}function z(e,t,n,r){var s=-1,o=e?e.length:0,u=[],a=u;"function"==typeof t&&(r=n,
18
- n=t,t=i);var f=!t&&74<o;if(f)var c={};n&&(a=[],n=l(n,r));for(;++s<o;){var r=e[s],h=n?n(r,s,e):r;f&&(a=yt.call(c,h+"")?c[h]:c[h]=[]);if(t?!s||a[a.length-1]!==h:0>q(a,h))(n||f)&&a.push(h),u.push(r)}return u}function W(e,t){return Jt||xt&&2<arguments.length?xt.call.apply(xt,arguments):f(e,t,Et.call(arguments,2))}function X(e){return e}function V(e){hn(w(e),function(t){var r=s[t]=e[t];s.prototype[t]=function(){var e=[this.__wrapped__];return bt.apply(e,arguments),e=r.apply(s,e),this.__chain__&&(e=new
19
- s(e),e.__chain__=n),e}})}var n=!0,r=null,i=!1,$="object"==typeof exports&&exports,J="object"==typeof global&&global;J.global===J&&(e=J);var K=[],Q=new function(){},G=0,Y=30,Z=e._,et=/[-?+=!~*%&^<>|{(\/]|\[\D|\b(?:delete|in|instanceof|new|typeof|void)\b/,tt=/&(?:amp|lt|gt|quot|#x27);/g,nt=/\b__p\+='';/g,rt=/\b(__p\+=)''\+/g,it=/(__e\(.*?\)|\b__t\))\+'';/g,st=/\w*$/,ot=/(?:__e|__t=)\(\s*(?![\d\s"']|this\.)/g,ut=RegExp("^"+(Q.valueOf+"").replace(/[.*+?^=!:${}()|[\]\/\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g
20
- ,".+?")+"$"),at=/\$\{((?:(?=\\?)\\?[\s\S])*?)}/g,ft=/<%=([\s\S]+?)%>/g,lt=/($^)/,ct=/[&<>"']/g,ht=/['\n\r\t\u2028\u2029\\]/g,pt="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),dt=Math.ceil,vt=K.concat,mt=Math.floor,gt=ut.test(gt=Object.getPrototypeOf)&&gt,yt=Q.hasOwnProperty,bt=K.push,wt=Q.propertyIsEnumerable,Et=K.slice,St=Q.toString,xt=ut.test(xt=Et.bind)&&xt,Tt=ut.test(Tt=Array.isArray)&&Tt,Nt=e.isFinite,Ct=e.isNaN,kt=ut.test(kt=Object
21
- .keys)&&kt,Lt=Math.max,At=Math.min,Ot=Math.random,Mt="[object Arguments]",_t="[object Array]",Dt="[object Boolean]",Pt="[object Date]",Ht="[object Number]",Bt="[object Object]",jt="[object RegExp]",Ft="[object String]",It,qt,Rt=(Rt={0:1,length:1},K.splice.call(Rt,0,1),Rt[0]),Ut=n;(function(){function e(){this.x=1}var t=[];e.prototype={valueOf:1,y:1};for(var n in new e)t.push(n);for(n in arguments)Ut=!n;It=!/valueOf/.test(t),qt="x"!=t[0]})(1);var zt=!m(arguments),Wt="x"!=Et.call("x")[0],Xt="xx"!="x"
22
- [0]+Object("x")[0];try{var Vt=("[object Object]",St.call(e.document||0)==Bt)}catch($t){}var Jt=xt&&/\n|Opera/.test(xt+St.call(e.opera)),Kt=kt&&/^.+$|true/.test(kt+!!e.attachEvent),Qt={};Qt[Mt]=Qt["[object Function]"]=i,Qt[_t]=Qt[Dt]=Qt[Pt]=Qt[Ht]=Qt[Bt]=Qt[jt]=Qt[Ft]=n;var Gt={"boolean":i,"function":n,object:n,number:i,string:i,"undefined":i},Yt={"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"};s.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,
23
- interpolate:ft,variable:""};var Zt={a:"d,c,u",k:"c=e(c,u)",b:"if(c(v,h,d)===false)return s",g:"if(c(v,h,d)===false)return s"},en={l:i,a:"n",k:"for(var a=1,b=arguments.length;a<b;a++){if(k=arguments[a]){",g:"s[h]=v",c:"}}"},tn={b:r};zt&&(m=function(e){return e?yt.call(e,"callee"):i});var nn=c(Zt,tn,{l:i}),rn=c(Zt,tn),sn={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;"},on=E(sn),un=c(en,{g:"if(s[h]==null)"+en.g}),an=c(en),fn=Tt||function(e){return St.call(e)==_t};x(/x/)&&(x=function(e){
24
- return"[object Function]"==St.call(e)});var ln=gt?function(e){if(!e||"object"!=typeof e)return i;var t=e.valueOf,n="function"==typeof t&&(n=gt(t))&&gt(n);return n?e==n||gt(e)==n&&!m(e):g(e)}:g,cn=kt?function(e){return"function"==typeof e&&wt.call(e,"prototype")?y(e):T(e)?kt(e):[]}:y,hn=c(Zt);s.VERSION="0.9.2",s.after=function(e,t){return 1>e?t():function(){if(1>--e)return t.apply(this,arguments)}},s.bind=W,s.bindAll=function(e){for(var t=arguments,n=1<t.length?0:(t=w(e),-1),r=t.length;++n<r;){var i=
25
- t[n];e[i]=W(e[i],e)}return e},s.chain=function(e){return e=new s(e),e.__chain__=n,e},s.clone=b,s.compact=function(e){for(var t=-1,n=e?e.length:0,r=[];++t<n;){var i=e[t];i&&r.push(i)}return r},s.compose=function(){var e=arguments;return function(){for(var t=arguments,n=e.length;n--;)t=[e[n].apply(this,t)];return t[0]}},s.contains=L,s.countBy=function(e,t,n){var r={},t=l(t,n);return hn(e,function(e,n,i){n=t(e,n,i),yt.call(r,n)?r[n]++:r[n]=1}),r},s.debounce=function(e,t,n){function i(){a=r,n||(o=e.apply
26
- (u,s))}var s,o,u,a;return function(){var r=n&&!a;return s=arguments,u=this,clearTimeout(a),a=setTimeout(i,t),r&&(o=e.apply(u,s)),o}},s.defaults=un,s.defer=function(e){var n=Et.call(arguments,1);return setTimeout(function(){e.apply(t,n)},1)},s.delay=function(e,n){var r=Et.call(arguments,2);return setTimeout(function(){e.apply(t,r)},n)},s.difference=function(e){for(var t=-1,n=e?e.length:0,r=vt.apply(K,arguments),r=o(r,n),i=[];++t<n;){var s=e[t];r(s)||i.push(s)}return i},s.escape=function(e){return e==
27
- r?"":(e+"").replace(ct,p)},s.every=A,s.extend=an,s.filter=O,s.find=M,s.first=F,s.flatten=I,s.forEach=hn,s.forIn=nn,s.forOwn=rn,s.functions=w,s.groupBy=function(e,t,n){var r={},t=l(t,n);return hn(e,function(e,n,i){n=t(e,n,i),(yt.call(r,n)?r[n]:r[n]=[]).push(e)}),r},s.has=function(e,t){return e?yt.call(e,t):i},s.identity=X,s.indexOf=q,s.initial=function(e,t,n){return e?Et.call(e,0,-(t==r||n?1:t)):[]},s.intersection=function(e){var t=arguments,n=t.length,r={},i=[];return hn(e,function(e){if(0>q(i,e)
28
- ){for(var s=n;--s;)if(!(r[s]||(r[s]=o(t[s])))(e))return;i.push(e)}}),i},s.invert=E,s.invoke=function(e,t){var n=Et.call(arguments,2),r="function"==typeof t,i=[];return hn(e,function(e){i.push((r?t:e[t]).apply(e,n))}),i},s.isArguments=m,s.isArray=fn,s.isBoolean=function(e){return e===n||e===i||St.call(e)==Dt},s.isDate=function(e){return St.call(e)==Pt},s.isElement=function(e){return e?1===e.nodeType:i},s.isEmpty=function(e){var t=n;if(!e)return t;var r=St.call(e),s=e.length;return r==_t||r==Ft||r==
29
- Mt||zt&&m(e)||r==Bt&&"number"==typeof s&&x(e.splice)?!s:(rn(e,function(){return t=i}),t)},s.isEqual=S,s.isFinite=function(e){return Nt(e)&&!Ct(parseFloat(e))},s.isFunction=x,s.isNaN=function(e){return St.call(e)==Ht&&e!=+e},s.isNull=function(e){return e===r},s.isNumber=function(e){return St.call(e)==Ht},s.isObject=T,s.isPlainObject=ln,s.isRegExp=function(e){return St.call(e)==jt},s.isString=N,s.isUndefined=function(e){return e===t},s.keys=cn,s.last=function(e,t,n){if(e){var i=e.length;return t==r||
30
- n?e[i-1]:Et.call(e,-t||i)}},s.lastIndexOf=function(e,t,n){var r=e?e.length:0;for("number"==typeof n&&(r=(0>n?Lt(0,r+n):At(n,r-1))+1);r--;)if(e[r]===t)return r;return-1},s.lateBind=function(e,t){return f(t,e,Et.call(arguments,2))},s.map=_,s.max=D,s.memoize=function(e,t){var n={};return function(){var r=t?t.apply(this,arguments):arguments[0];return yt.call(n,r)?n[r]:n[r]=e.apply(this,arguments)}},s.merge=C,s.min=function(e,t,n){var r=Infinity,i=-1,s=e?e.length:0,o=r;if(t||!fn(e))t=!t&&N(e)?u:l(t,n)
31
- ,hn(e,function(e,n,i){n=t(e,n,i),n<r&&(r=n,o=e)});else for(;++i<s;)e[i]<o&&(o=e[i]);return o},s.mixin=V,s.noConflict=function(){return e._=Z,this},s.object=function(e,t){for(var n=-1,r=e?e.length:0,i={};++n<r;){var s=e[n];t?i[s]=t[n]:i[s[0]]=s[1]}return i},s.omit=function(e,t,n){var r="function"==typeof t,i={};if(r)t=l(t,n);else var s=vt.apply(K,arguments);return nn(e,function(e,n,o){if(r?!t(e,n,o):0>q(s,n,1))i[n]=e}),i},s.once=function(e){var t,s=i;return function(){return s?t:(s=n,t=e.apply(this
32
- ,arguments),e=r,t)}},s.pairs=function(e){var t=[];return rn(e,function(e,n){t.push([n,e])}),t},s.partial=function(e){return f(e,Et.call(arguments,1))},s.pick=function(e,t,n){var r={};if("function"!=typeof t)for(var i=0,s=vt.apply(K,arguments),o=s.length;++i<o;){var u=s[i];u in e&&(r[u]=e[u])}else t=l(t,n),nn(e,function(e,n,i){t(e,n,i)&&(r[n]=e)});return r},s.pluck=P,s.random=function(e,t){return e==r&&t==r&&(t=1),e=+e||0,t==r&&(t=e,e=0),e+mt(Ot()*((+t||0)-e+1))},s.range=function(e,t,n){e=+e||0,n=+
33
- n||1,t==r&&(t=e,e=0);for(var i=-1,t=Lt(0,dt((t-e)/n)),s=Array(t);++i<t;)s[i]=e,e+=n;return s},s.reduce=H,s.reduceRight=B,s.reject=function(e,t,n){return t=l(t,n),O(e,function(e,n,r){return!t(e,n,r)})},s.rest=R,s.result=function(e,t){var n=e?e[t]:r;return x(n)?e[t]():n},s.shuffle=function(e){var t=-1,n=Array(e?e.length:0);return hn(e,function(e){var r=mt(Ot()*(++t+1));n[t]=n[r],n[r]=e}),n},s.size=function(e){var t=e?e.length:0;return"number"==typeof t?t:cn(e).length},s.some=j,s.sortBy=function(e,t
34
- ,n){var r=[],t=l(t,n);hn(e,function(e,n,i){r.push({a:t(e,n,i),b:n,c:e})}),e=r.length;for(r.sort(a);e--;)r[e]=r[e].c;return r},s.sortedIndex=U,s.tap=function(e,t){return t(e),e},s.template=function(e,t,n){e||(e=""),n||(n={});var r,i,o=s.templateSettings,u=0,a=n.interpolate||o.interpolate||lt,f="__p += '",l=n.variable||o.variable,c=l;e.replace(RegExp((n.escape||o.escape||lt).source+"|"+a.source+"|"+(a===ft?at:lt).source+"|"+(n.evaluate||o.evaluate||lt).source+"|$","g"),function(t,n,i,s,o,a){i||(i=s
35
- ),f+=e.slice(u,a).replace(ht,h),f+=n?"'+__e("+n+")+'":o?"';"+o+";__p+='":i?"'+((__t=("+i+"))==null?'':__t)+'":"",r||(r=o||et.test(n||i)),u=a+t.length}),f+="';",c||(l="obj",r?f="with("+l+"){"+f+"}":(n=RegExp("(\\(\\s*)"+l+"\\."+l+"\\b","g"),f=f.replace(ot,"$&"+l+".").replace(n,"$1__d"))),f=(r?f.replace(nt,""):f).replace(rt,"$1").replace(it,"$1;"),f="function("+l+"){"+(c?"":l+"||("+l+"={});")+"var __t,__p='',__e=_.escape"+(r?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":
36
- (c?"":",__d="+l+"."+l+"||"+l)+";")+f+"return __p}";try{i=Function("_","return "+f)(s)}catch(p){throw p.source=f,p}return t?i(t):(i.source=f,i)},s.throttle=function(e,t){function n(){a=new Date,u=r,s=e.apply(o,i)}var i,s,o,u,a=0;return function(){var r=new Date,f=t-(r-a);return i=arguments,o=this,0>=f?(clearTimeout(u),a=r,s=e.apply(o,i)):u||(u=setTimeout(n,f)),s}},s.times=function(e,t,n){for(var e=+e||0,r=-1,i=Array(e);++r<e;)i[r]=t.call(n,r);return i},s.toArray=function(e){return e&&"number"==typeof
37
- e.length?(Wt?N(e):"string"==typeof e)?e.split(""):Et.call(e):k(e)},s.unescape=function(e){return e==r?"":(e+"").replace(tt,v)},s.union=function(){return z(vt.apply(K,arguments))},s.uniq=z,s.uniqueId=function(e){var t=G++;return e?e+t:t},s.values=k,s.where=function(e,t){var n=[];return nn(t,function(e,t){n.push(t)}),O(e,function(e){for(var r=n.length;r--;){var i=e[n[r]]===t[n[r]];if(!i)break}return!!i})},s.without=function(e){for(var t=-1,n=e?e.length:0,r=o(arguments,1,20),i=[];++t<n;){var s=e[t];
38
- r(s)||i.push(s)}return i},s.wrap=function(e,t){return function(){var n=[e];return bt.apply(n,arguments),t.apply(this,n)}},s.zip=function(e){for(var t=-1,n=e?D(P(arguments,"length")):0,r=Array(n);++t<n;)r[t]=P(arguments,t);return r},s.all=A,s.any=j,s.collect=_,s.detect=M,s.drop=R,s.each=hn,s.foldl=H,s.foldr=B,s.head=F,s.include=L,s.inject=H,s.methods=w,s.select=O,s.tail=R,s.take=F,s.unique=z,V(s),s.prototype.chain=function(){return this.__chain__=n,this},s.prototype.value=function(){return this.__wrapped__
39
- },hn("pop push reverse shift sort splice unshift".split(" "),function(e){var t=K[e];s.prototype[e]=function(){var e=this.__wrapped__;return t.apply(e,arguments),Rt&&e.length===0&&delete e[0],this.__chain__&&(e=new s(e),e.__chain__=n),e}}),hn(["concat","join","slice"],function(e){var t=K[e];s.prototype[e]=function(){var e=t.apply(this.__wrapped__,arguments);return this.__chain__&&(e=new s(e),e.__chain__=n),e}}),typeof define=="function"&&typeof define.amd=="object"&&define.amd?(e._=s,define(function(
40
- ){return s})):$?"object"==typeof module&&module&&module.exports==$?(module.exports=s)._=s:$._=s:e._=s})(this);
5
+ ;(function(e,t){function s(e){if(e&&e.__wrapped__)return e;if(!(this instanceof s))return new s(e);this.__wrapped__=e}function o(e,t,n){t||(t=0);var r=e.length,i=r-t>=(n||Z);if(i)for(var s={},n=t-1;++n<r;){var o=e[n]+"";(bt.call(s,o)?s[o]:s[o]=[]).push(e[n])}return function(n){if(i){var r=n+"";return bt.call(s,r)&&-1<q(s[r],n)}return-1<q(e,n,t)}}function u(e){return e.charCodeAt(0)}function a(e,n){var r=e.b,i=n.b,e=e.a,n=n.a;if(e!==n){if(e>n||e===t)return 1;if(e<n||n===t)return-1}return r<i?-1:1}function f
6
+ (e,t,n){function r(){var u=arguments,a=s?this:t;return i||(e=t[o]),n.length&&(u=u.length?n.concat(St.call(u)):n),this instanceof r?(d.prototype=e.prototype,a=new d,u=e.apply(a,u),T(u)?u:a):e.apply(a,u)}var i=x(e),s=!n,o=t;return s&&(n=t),i||(t=e),r}function l(e,n){return e?"function"!=typeof e?function(t){return t[e]}:n!==t?function(t,r,i){return e.call(n,t,r,i)}:e:X}function c(){for(var e={b:"",c:"",e:qt,f:Qt,g:"",h:zt,i:Vt,j:dt,k:"",l:n},t,r=0;t=arguments[r];r++)for(var i in t)e[i]=t[i];t=e.a,e
7
+ .d=/^[^,]+/.exec(t)[0],r="var i,x,l="+e.d+",t="+e.d+";if(!"+e.d+")return t;"+e.k+";",e.b?(r+="var m=l.length;i=-1;if(typeof m=='number'){",e.i&&(r+="if(k(l)){l=l.split('')}"),r+="while(++i<m){x=l[i];"+e.b+"}}else {"):e.h&&(r+="var m=l.length;i=-1;if(m&&j(l)){while(++i<m){x=l[i+=''];"+e.g+"}}else {"),e.e||(r+="var u=typeof l=='function'&&s.call(l,'prototype');");if(e.f&&e.l)r+="var q=-1,r=p[typeof l]?n(l):[],m=r.length;while(++q<m){i=r[q];",e.e||(r+="if(!(u&&i=='prototype')){"),r+="x=l[i];"+e.g+""
8
+ ,e.e||(r+="}");else{r+="for(i in l){";if(!e.e||e.l)r+="if(",e.e||(r+="!(u&&i=='prototype')"),!e.e&&e.l&&(r+="&&"),e.l&&(r+="h.call(l,i)"),r+="){";r+="x=l[i];"+e.g+";";if(!e.e||e.l)r+="}"}r+="}";if(e.e){r+="var f=l.constructor;";for(i=0;7>i;i++)r+="i='"+e.j[i]+"';if(","constructor"==e.j[i]&&(r+="!(f&&f.prototype===l)&&"),r+="h.call(l,i)){x=l[i];"+e.g+"}"}if(e.b||e.h)r+="}";return r+=e.c+";return t",Function("e,h,j,k,p,n,s","return function("+t+"){"+r+"}")(l,bt,m,N,Yt,Lt,Et)}function h(e){return"\\"+
9
+ Zt[e]}function p(e){return un[e]}function d(){}function v(e){return an[e]}function m(e){return xt.call(e)==_t}function g(e){var t=i;if(!e||"object"!=typeof e||m(e))return t;var n=e.constructor;return(!$t||"function"==typeof e.toString||"string"!=typeof (e+""))&&(!x(n)||n instanceof n)?Rt?(sn(e,function(e,n,r){return t=!bt.call(r,n),i}),t===i):(sn(e,function(e,n){t=n}),t===i||bt.call(e,t)):t}function y(e){var t=[];return on(e,function(e,n){t.push(n)}),t}function b(e,t,n,s,o){if(e==r)return e;n&&(t=
10
+ i);if(n=T(e)){var u=xt.call(e);if(!Gt[u]||Wt&&m(e))return e;var a=u==Dt,n=a||(u==jt?cn(e):n)}if(!n||!t)return n?a?St.call(e):rn({},e):e;n=e.constructor;switch(u){case Pt:case Ht:return new n(+e);case Bt:case It:return new n(e);case Ft:return n(e.source,ot.exec(e))}s||(s=[]),o||(o=[]);for(u=s.length;u--;)if(s[u]==e)return o[u];var f=a?n(e.length):{};return s.push(e),o.push(f),(a?pn:on)(e,function(e,n){f[n]=b(e,t,r,s,o)}),f}function w(e){var t=[];return sn(e,function(e,n){x(e)&&t.push(n)}),t.sort()
11
+ }function E(e){var t={};return on(e,function(e,n){t[e]=n}),t}function S(e,t,s,o){if(e===t)return 0!==e||1/e==1/t;if(e==r||t==r)return e===t;var u=xt.call(e);if(u!=xt.call(t))return i;switch(u){case Pt:case Ht:return+e==+t;case Bt:return e!=+e?t!=+t:0==e?1/e==1/t:e==+t;case Ft:case It:return e==t+""}var a=u==Dt||u==_t;if(Wt&&!a&&(a=m(e))&&!m(t))return i;if(!a){if(e.__wrapped__||t.__wrapped__)return S(e.__wrapped__||e,t.__wrapped__||t);if(u!=jt||$t&&("function"!=typeof e.toString&&"string"==typeof
12
+ (e+"")||"function"!=typeof t.toString&&"string"==typeof (t+"")))return i;var u=e.constructor,f=t.constructor;if(u!=f&&(!x(u)||!(u instanceof u&&x(f)&&f instanceof f)))return i}s||(s=[]),o||(o=[]);for(u=s.length;u--;)if(s[u]==e)return o[u]==t;var u=-1,f=n,l=0;s.push(e),o.push(t);if(a){l=e.length;if(f=l==t.length)for(;l--&&(f=S(e[l],t[l],s,o)););return f}for(var c in e)if(bt.call(e,c)&&(l++,!bt.call(t,c)||!S(e[c],t[c],s,o)))return i;for(c in t)if(bt.call(t,c)&&!(l--))return i;if(qt)for(;7>++u;)if(c=
13
+ dt[u],bt.call(e,c)&&(!bt.call(t,c)||!S(e[c],t[c],s,o)))return i;return n}function x(e){return"function"==typeof e}function T(e){return e?Yt[typeof e]:i}function N(e){return xt.call(e)==It}function C(e,t,n){var i=arguments,s=0,o=2,u=i[3],a=i[4];n!==Y&&(u=[],a=[],"number"!=typeof n&&(o=i.length));for(;++s<o;)on(i[s],function(t,n){var i,s,o;if(t&&((s=ln(t))||cn(t))){for(var f=u.length;f--;)if(i=u[f]==t)break;i?e[n]=a[f]:(u.push(t),a.push(o=(o=e[n],s)?ln(o)?o:[]:cn(o)?o:{}),e[n]=C(o,t,Y,u,a))}else t!=
14
+ r&&(e[n]=t)});return e}function k(e){var t=[];return on(e,function(e){t.push(e)}),t}function L(e,t,n){var r=-1,s=e?e.length:0,o=i,n=(0>n?At(0,s+n):n)||0;return"number"==typeof s?o=-1<(N(e)?e.indexOf(t,n):q(e,t,n)):pn(e,function(e){if(++r>=n)return!(o=e===t)}),o}function A(e,t,r){var i=n,t=l(t,r);if(ln(e))for(var r=-1,s=e.length;++r<s&&(i=!!t(e[r],r,e)););else pn(e,function(e,n,r){return i=!!t(e,n,r)});return i}function O(e,t,n){var r=[],t=l(t,n);if(ln(e))for(var n=-1,i=e.length;++n<i;){var s=e[n]
15
+ ;t(s,n,e)&&r.push(s)}else pn(e,function(e,n,i){t(e,n,i)&&r.push(e)});return r}function M(e,t,n){var r,t=l(t,n);return pn(e,function(e,n,s){if(t(e,n,s))return r=e,i}),r}function _(e,t,n){var r=-1,i=e?e.length:0,s=Array("number"==typeof i?i:0),t=l(t,n);if(ln(e))for(;++r<i;)s[r]=t(e[r],r,e);else pn(e,function(e,n,i){s[++r]=t(e,n,i)});return s}function D(e,t,n){var r=-Infinity,i=-1,s=e?e.length:0,o=r;if(t||!ln(e))t=!t&&N(e)?u:l(t,n),pn(e,function(e,n,i){n=t(e,n,i),n>r&&(r=n,o=e)});else for(;++i<s;)e[
16
+ i]>o&&(o=e[i]);return o}function P(e,t){var n=[];return pn(e,function(e){n.push(e[t])}),n}function H(e,t,n,r){var s=3>arguments.length,t=l(t,r);return pn(e,function(e,r,o){n=s?(s=i,e):t(n,e,r,o)}),n}function B(e,t,n,r){var s=e,o=e?e.length:0,u=3>arguments.length;if("number"!=typeof o)var a=hn(e),o=a.length;else Vt&&N(e)&&(s=e.split(""));return pn(e,function(e,f,l){f=a?a[--o]:--o,n=u?(u=i,s[f]):t.call(r,n,s[f],f,l)}),n}function j(e,t,n){var r,t=l(t,n);if(ln(e))for(var n=-1,i=e.length;++n<i&&!(r=t(
17
+ e[n],n,e)););else pn(e,function(e,n,i){return!(r=t(e,n,i))});return!!r}function F(e,t,n){if(e)return t==r||n?e[0]:St.call(e,0,t)}function I(e,t){for(var n=-1,r=e?e.length:0,i=[];++n<r;){var s=e[n];ln(s)?wt.apply(i,t?s:I(s)):i.push(s)}return i}function q(e,t,n){var r=-1,i=e?e.length:0;if("number"==typeof n)r=(0>n?At(0,i+n):n||0)-1;else if(n)return r=U(e,t),e[r]===t?r:-1;for(;++r<i;)if(e[r]===t)return r;return-1}function R(e,t,n){return e?St.call(e,t==r||n?1:t):[]}function U(e,t,n,r){for(var i=0,s=
18
+ e?e.length:i,n=n?l(n,r):X,t=n(t);i<s;)r=i+s>>>1,n(e[r])<t?i=r+1:s=r;return i}function z(e,t,n,r){var s=-1,o=e?e.length:0,u=[],a=u;"function"==typeof t&&(r=n,n=t,t=i);var f=!t&&74<o;if(f)var c={};n&&(a=[],n=l(n,r));for(;++s<o;){var r=e[s],h=n?n(r,s,e):r;f&&(a=bt.call(c,h+"")?c[h]:c[h]=[]);if(t?!s||a[a.length-1]!==h:0>q(a,h))(n||f)&&a.push(h),u.push(r)}return u}function W(e,t){return Kt||Tt&&2<arguments.length?Tt.call.apply(Tt,arguments):f(e,t,St.call(arguments,2))}function X(e){return e}function V
19
+ (e){pn(w(e),function(t){var r=s[t]=e[t];s.prototype[t]=function(){var e=[this.__wrapped__];return wt.apply(e,arguments),e=r.apply(s,e),this.__chain__&&(e=new s(e),e.__chain__=n),e}})}var n=!0,r=null,i=!1,$="object"==typeof exports&&exports,J="object"==typeof global&&global;J.global===J&&(e=J);var K=[],Q=new function(){},G=0,Y=Q,Z=30,et=e._,tt=/[-?+=!~*%&^<>|{(\/]|\[\D|\b(?:delete|in|instanceof|new|typeof|void)\b/,nt=/&(?:amp|lt|gt|quot|#x27);/g,rt=/\b__p\+='';/g,it=/\b(__p\+=)''\+/g,st=/(__e\(.*?\)|\b__t\))\+'';/g
20
+ ,ot=/\w*$/,ut=/(?:__e|__t=)\(\s*(?![\d\s"']|this\.)/g,at=RegExp("^"+(Q.valueOf+"").replace(/[.*+?^=!:${}()|[\]\/\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),ft=/\$\{((?:(?=\\?)\\?[\s\S])*?)}/g,lt=/<%=([\s\S]+?)%>/g,ct=/($^)/,ht=/[&<>"']/g,pt=/['\n\r\t\u2028\u2029\\]/g,dt="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),vt=Math.ceil,mt=K.concat,gt=Math.floor,yt=at.test(yt=Object.getPrototypeOf)&&yt,bt=Q.hasOwnProperty,wt=K.push,Et=
21
+ Q.propertyIsEnumerable,St=K.slice,xt=Q.toString,Tt=at.test(Tt=St.bind)&&Tt,Nt=at.test(Nt=Array.isArray)&&Nt,Ct=e.isFinite,kt=e.isNaN,Lt=at.test(Lt=Object.keys)&&Lt,At=Math.max,Ot=Math.min,Mt=Math.random,_t="[object Arguments]",Dt="[object Array]",Pt="[object Boolean]",Ht="[object Date]",Bt="[object Number]",jt="[object Object]",Ft="[object RegExp]",It="[object String]",qt,Rt,Ut=(Ut={0:1,length:1},K.splice.call(Ut,0,1),Ut[0]),zt=n;(function(){function e(){this.x=1}var t=[];e.prototype={valueOf:1,y
22
+ :1};for(var n in new e)t.push(n);for(n in arguments)zt=!n;qt=!/valueOf/.test(t),Rt="x"!=t[0]})(1);var Wt=!m(arguments),Xt="x"!=St.call("x")[0],Vt="xx"!="x"[0]+Object("x")[0];try{var $t=("[object Object]",xt.call(e.document||0)==jt)}catch(Jt){}var Kt=Tt&&/\n|Opera/.test(Tt+xt.call(e.opera)),Qt=Lt&&/^.+$|true/.test(Lt+!!e.attachEvent),Gt={};Gt[_t]=Gt["[object Function]"]=i,Gt[Dt]=Gt[Pt]=Gt[Ht]=Gt[Bt]=Gt[jt]=Gt[Ft]=Gt[It]=n;var Yt={"boolean":i,"function":n,object:n,number:i,string:i,"undefined":i},Zt=
23
+ {"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"};s.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:lt,variable:""};var en={a:"o,v,g",k:"for(var a=1,b=typeof g=='number'?2:arguments.length;a<b;a++){if((l=arguments[a])){",g:"t[i]=x",c:"}}"},tn={a:"d,c,w",k:"c=e(c,w)",b:"if(c(x,i,d)===false)return t",g:"if(c(x,i,d)===false)return t"},nn={b:r},rn=c(en);Wt&&(m=function(e){return e?bt.call(e,"callee"):i});var sn=c(tn,nn,{l:i}),on=c(tn,nn
24
+ ),un={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;"},an=E(un),fn=c(en,{g:"if(t[i]==null)"+en.g}),ln=Nt||function(e){return xt.call(e)==Dt};x(/x/)&&(x=function(e){return"[object Function]"==xt.call(e)});var cn=yt?function(e){if(!e||"object"!=typeof e)return i;var t=e.valueOf,n="function"==typeof t&&(n=yt(t))&&yt(n);return n?e==n||yt(e)==n&&!m(e):g(e)}:g,hn=Lt?function(e){return"function"==typeof e&&Et.call(e,"prototype")?y(e):T(e)?Lt(e):[]}:y,pn=c(tn);s.VERSION="0.10.0",s.assign=rn,s
25
+ .after=function(e,t){return 1>e?t():function(){if(1>--e)return t.apply(this,arguments)}},s.bind=W,s.bindAll=function(e){for(var t=arguments,n=1<t.length?0:(t=w(e),-1),r=t.length;++n<r;){var i=t[n];e[i]=W(e[i],e)}return e},s.bindKey=function(e,t){return f(e,t,St.call(arguments,2))},s.chain=function(e){return e=new s(e),e.__chain__=n,e},s.clone=b,s.compact=function(e){for(var t=-1,n=e?e.length:0,r=[];++t<n;){var i=e[t];i&&r.push(i)}return r},s.compose=function(){var e=arguments;return function(){for(
26
+ var t=arguments,n=e.length;n--;)t=[e[n].apply(this,t)];return t[0]}},s.contains=L,s.countBy=function(e,t,n){var r={},t=l(t,n);return pn(e,function(e,n,i){n=t(e,n,i),bt.call(r,n)?r[n]++:r[n]=1}),r},s.debounce=function(e,t,n){function i(){a=r,n||(o=e.apply(u,s))}var s,o,u,a;return function(){var r=n&&!a;return s=arguments,u=this,clearTimeout(a),a=setTimeout(i,t),r&&(o=e.apply(u,s)),o}},s.defaults=fn,s.defer=function(e){var n=St.call(arguments,1);return setTimeout(function(){e.apply(t,n)},1)},s.delay=
27
+ function(e,n){var r=St.call(arguments,2);return setTimeout(function(){e.apply(t,r)},n)},s.difference=function(e){for(var t=-1,n=e?e.length:0,r=mt.apply(K,arguments),r=o(r,n),i=[];++t<n;){var s=e[t];r(s)||i.push(s)}return i},s.escape=function(e){return e==r?"":(e+"").replace(ht,p)},s.every=A,s.filter=O,s.find=M,s.first=F,s.flatten=I,s.forEach=pn,s.forIn=sn,s.forOwn=on,s.functions=w,s.groupBy=function(e,t,n){var r={},t=l(t,n);return pn(e,function(e,n,i){n=t(e,n,i),(bt.call(r,n)?r[n]:r[n]=[]).push(e
28
+ )}),r},s.has=function(e,t){return e?bt.call(e,t):i},s.identity=X,s.indexOf=q,s.initial=function(e,t,n){return e?St.call(e,0,-(t==r||n?1:t)):[]},s.intersection=function(e){var t=arguments,n=t.length,r={},i=[];return pn(e,function(e){if(0>q(i,e)){for(var s=n;--s;)if(!(r[s]||(r[s]=o(t[s])))(e))return;i.push(e)}}),i},s.invert=E,s.invoke=function(e,t){var n=St.call(arguments,2),r="function"==typeof t,i=[];return pn(e,function(e){i.push((r?t:e[t]).apply(e,n))}),i},s.isArguments=m,s.isArray=ln,s.isBoolean=
29
+ function(e){return e===n||e===i||xt.call(e)==Pt},s.isDate=function(e){return xt.call(e)==Ht},s.isElement=function(e){return e?1===e.nodeType:i},s.isEmpty=function(e){var t=n;if(!e)return t;var r=xt.call(e),s=e.length;return r==Dt||r==It||r==_t||Wt&&m(e)||r==jt&&"number"==typeof s&&x(e.splice)?!s:(on(e,function(){return t=i}),t)},s.isEqual=S,s.isFinite=function(e){return Ct(e)&&!kt(parseFloat(e))},s.isFunction=x,s.isNaN=function(e){return xt.call(e)==Bt&&e!=+e},s.isNull=function(e){return e===r},s
30
+ .isNumber=function(e){return xt.call(e)==Bt},s.isObject=T,s.isPlainObject=cn,s.isRegExp=function(e){return xt.call(e)==Ft},s.isString=N,s.isUndefined=function(e){return e===t},s.keys=hn,s.last=function(e,t,n){if(e){var i=e.length;return t==r||n?e[i-1]:St.call(e,-t||i)}},s.lastIndexOf=function(e,t,n){var r=e?e.length:0;for("number"==typeof n&&(r=(0>n?At(0,r+n):Ot(n,r-1))+1);r--;)if(e[r]===t)return r;return-1},s.map=_,s.max=D,s.memoize=function(e,t){var n={};return function(){var r=t?t.apply(this,arguments
31
+ ):arguments[0];return bt.call(n,r)?n[r]:n[r]=e.apply(this,arguments)}},s.merge=C,s.min=function(e,t,n){var r=Infinity,i=-1,s=e?e.length:0,o=r;if(t||!ln(e))t=!t&&N(e)?u:l(t,n),pn(e,function(e,n,i){n=t(e,n,i),n<r&&(r=n,o=e)});else for(;++i<s;)e[i]<o&&(o=e[i]);return o},s.mixin=V,s.noConflict=function(){return e._=et,this},s.object=function(e,t){for(var n=-1,r=e?e.length:0,i={};++n<r;){var s=e[n];t?i[s]=t[n]:i[s[0]]=s[1]}return i},s.omit=function(e,t,n){var r="function"==typeof t,i={};if(r)t=l(t,n);
32
+ else var s=mt.apply(K,arguments);return sn(e,function(e,n,o){if(r?!t(e,n,o):0>q(s,n,1))i[n]=e}),i},s.once=function(e){var t,s=i;return function(){return s?t:(s=n,t=e.apply(this,arguments),e=r,t)}},s.pairs=function(e){var t=[];return on(e,function(e,n){t.push([n,e])}),t},s.partial=function(e){return f(e,St.call(arguments,1))},s.pick=function(e,t,n){var r={};if("function"!=typeof t)for(var i=0,s=mt.apply(K,arguments),o=s.length;++i<o;){var u=s[i];u in e&&(r[u]=e[u])}else t=l(t,n),sn(e,function(e,n,
33
+ i){t(e,n,i)&&(r[n]=e)});return r},s.pluck=P,s.random=function(e,t){return e==r&&t==r&&(t=1),e=+e||0,t==r&&(t=e,e=0),e+gt(Mt()*((+t||0)-e+1))},s.range=function(e,t,n){e=+e||0,n=+n||1,t==r&&(t=e,e=0);for(var i=-1,t=At(0,vt((t-e)/n)),s=Array(t);++i<t;)s[i]=e,e+=n;return s},s.reduce=H,s.reduceRight=B,s.reject=function(e,t,n){return t=l(t,n),O(e,function(e,n,r){return!t(e,n,r)})},s.rest=R,s.result=function(e,t){var n=e?e[t]:r;return x(n)?e[t]():n},s.shuffle=function(e){var t=-1,n=Array(e?e.length:0);return pn
34
+ (e,function(e){var r=gt(Mt()*(++t+1));n[t]=n[r],n[r]=e}),n},s.size=function(e){var t=e?e.length:0;return"number"==typeof t?t:hn(e).length},s.some=j,s.sortBy=function(e,t,n){var r=[],t=l(t,n);pn(e,function(e,n,i){r.push({a:t(e,n,i),b:n,c:e})}),e=r.length;for(r.sort(a);e--;)r[e]=r[e].c;return r},s.sortedIndex=U,s.tap=function(e,t){return t(e),e},s.template=function(e,t,n){e||(e=""),n||(n={});var r,i,o=s.templateSettings,u=0,a=n.interpolate||o.interpolate||ct,f="__p += '",l=n.variable||o.variable,c=
35
+ l;e.replace(RegExp((n.escape||o.escape||ct).source+"|"+a.source+"|"+(a===lt?ft:ct).source+"|"+(n.evaluate||o.evaluate||ct).source+"|$","g"),function(t,n,i,s,o,a){i||(i=s),f+=e.slice(u,a).replace(pt,h),f+=n?"'+__e("+n+")+'":o?"';"+o+";__p+='":i?"'+((__t=("+i+"))==null?'':__t)+'":"",r||(r=o||tt.test(n||i)),u=a+t.length}),f+="';",c||(l="obj",r?f="with("+l+"){"+f+"}":(n=RegExp("(\\(\\s*)"+l+"\\."+l+"\\b","g"),f=f.replace(ut,"$&"+l+".").replace(n,"$1__d"))),f=(r?f.replace(rt,""):f).replace(it,"$1").replace
36
+ (st,"$1;"),f="function("+l+"){"+(c?"":l+"||("+l+"={});")+"var __t,__p='',__e=_.escape"+(r?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":(c?"":",__d="+l+"."+l+"||"+l)+";")+f+"return __p}";try{i=Function("_","return "+f)(s)}catch(p){throw p.source=f,p}return t?i(t):(i.source=f,i)},s.throttle=function(e,t){function n(){a=new Date,u=r,s=e.apply(o,i)}var i,s,o,u,a=0;return function(){var r=new Date,f=t-(r-a);return i=arguments,o=this,0>=f?(clearTimeout(u),a=r,s=e.apply(o,i)
37
+ ):u||(u=setTimeout(n,f)),s}},s.times=function(e,t,n){for(var e=+e||0,r=-1,i=Array(e);++r<e;)i[r]=t.call(n,r);return i},s.toArray=function(e){return e&&"number"==typeof e.length?(Xt?N(e):"string"==typeof e)?e.split(""):St.call(e):k(e)},s.unescape=function(e){return e==r?"":(e+"").replace(nt,v)},s.union=function(){return z(mt.apply(K,arguments))},s.uniq=z,s.uniqueId=function(e){var t=G++;return e?e+t:t},s.values=k,s.where=function(e,t){var n=hn(t);return O(e,function(e){for(var r=n.length;r--;){var i=
38
+ e[n[r]]===t[n[r]];if(!i)break}return!!i})},s.without=function(e){for(var t=-1,n=e?e.length:0,r=o(arguments,1,20),i=[];++t<n;){var s=e[t];r(s)||i.push(s)}return i},s.wrap=function(e,t){return function(){var n=[e];return wt.apply(n,arguments),t.apply(this,n)}},s.zip=function(e){for(var t=-1,n=e?D(P(arguments,"length")):0,r=Array(n);++t<n;)r[t]=P(arguments,t);return r},s.all=A,s.any=j,s.collect=_,s.detect=M,s.drop=R,s.each=pn,s.extend=rn,s.foldl=H,s.foldr=B,s.head=F,s.include=L,s.inject=H,s.methods=
39
+ w,s.select=O,s.tail=R,s.take=F,s.unique=z,V(s),s.prototype.chain=function(){return this.__chain__=n,this},s.prototype.value=function(){return this.__wrapped__},pn("pop push reverse shift sort splice unshift".split(" "),function(e){var t=K[e];s.prototype[e]=function(){var e=this.__wrapped__;return t.apply(e,arguments),Ut&&e.length===0&&delete e[0],this.__chain__&&(e=new s(e),e.__chain__=n),e}}),pn(["concat","join","slice"],function(e){var t=K[e];s.prototype[e]=function(){var e=t.apply(this.__wrapped__
40
+ ,arguments);return this.__chain__&&(e=new s(e),e.__chain__=n),e}}),typeof define=="function"&&typeof define.amd=="object"&&define.amd?(e._=s,define(function(){return s})):$?"object"==typeof module&&module&&module.exports==$?(module.exports=s)._=s:$._=s:e._=s})(this);
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lodash-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.2
4
+ version: 0.10.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-11-10 00:00:00.000000000 Z
12
+ date: 2012-11-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: railties