>r}function y(n,r){return n>>>r}function d(n){return~n}function w(n,r){return n==r}function A(n,r){return n===r}function b(n){return!n}function x(n,r){return n>r}function k(n,r){return r>n}function _(n,r){return n>=r}function q(n,r){return r>=n}var E=n._||require("underscore");E.mixin({add:r(u),sub:r(i),mul:r(o),div:r(c),mod:a,inc:f,dec:l,neg:s,eq:t(w),seq:t(A),neq:e(t(w)),sneq:e(t(A)),not:b,gt:t(x),lt:t(k),gte:t(_),lte:t(q),bitwiseAnd:r(p),bitwiseOr:r(m),bitwiseXor:r(v),bitwiseNot:d,bitwiseLeft:r(h),bitwiseRight:r(g),bitwiseZ:r(y)})}(this),function(n){var r=n._||require("underscore"),t=/\+/g,e=/\%20/g,u=/(?:([^\[]+))|(?:\[(.*?)\])/g,i=function(n){return decodeURIComponent(n.replace(t,"%20"))},o=function(n){return encodeURIComponent(n).replace(e,"+")},c=function(n,t,e){return r.isUndefined(e)&&(e=!0),r.isArray(t)?r.map(t,function(r,t){return c(e?t:n+"[]",r,!1)}).join("&"):r.isObject(t)?r.map(t,function(r,t){return c(e?t:n+"["+t+"]",r,!1)}).join("&"):o(n)+"="+o(t)};r.mixin({explode:function(n){return n.split("")},fromQuery:function(n){var t,e,o,c,a,f=n.split("&"),l={};return r.each(f,function(n){for(n=n.split("="),t=i(n[0]),o=t,a=l,u.lastIndex=0;null!==(e=u.exec(t));)r.isUndefined(e[1])?(c=e[2],a[o]=a[o]||(c?{}:[]),a=a[o]):c=e[1],o=c||r.size(a);a[o]=i(n[1])}),l},implode:function(n){return n.join("")},camelCase:function(n){return n.replace(/-([a-z])/g,function(n){return n[1].toUpperCase()})},toDash:function(n){return n=n.replace(/([A-Z])/g,function(n){return"-"+n.toLowerCase()}),"-"==n.charAt(0)?n.substr(1):n},toQuery:function(n){return c("",n)},strContains:function(n,r){if("string"!=typeof n)throw new TypeError;return-1!=n.indexOf(r)}})}(this),function(n){var r=n._||require("underscore");r.mixin({done:function(n){var t=r(n);return t.stopTrampoline=!0,t},trampoline:function(n){for(var t=n.apply(n,r.rest(arguments));r.isFunction(t)&&(t=t(),!(t instanceof r&&t.stopTrampoline)););return t.value()}})}(this);
\ No newline at end of file
diff --git a/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/docs/index.md b/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/docs/index.md
new file mode 100644
index 0000000..5d8cf3f
--- /dev/null
+++ b/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/docs/index.md
@@ -0,0 +1,79 @@
+# Underscore-contrib (0.3.0)
+
+> The brass buckles on Underscore's utility belt - a contributors' library for [Underscore](http://underscorejs.org/).
+
+## Introduction
+
+### Places
+
+ * [Documentation](http://documentcloud.github.io/underscore-contrib/)
+ * [Source repository](https://github.com/documentcloud/underscore-contrib)
+ * [Tickets and bug reports](https://github.com/documentcloud/underscore-contrib/issues?state=open)
+ * [Maintainer's website](http://www.fogus.me)
+
+### Why underscore-contrib?
+
+While Underscore provides a bevy of useful tools to support functional programming in JavaScript, it can't
+(and shouldn't) be everything to everyone. Underscore-contrib is intended as a home for functions that, for
+various reasons, don't belong in Underscore proper. In particular, it aims to be:
+
+ * a home for functions that are limited in scope, but solve certain point problems, and
+ * a proving ground for features that belong in Underscore proper, but need some advocacy and/or evolution
+(or devolution) to get them there.
+
+### Use
+
+#### In the Browser
+
+First, you'll need Underscore **version 1.6.0 or higher**. Then you can grab the relevant underscore-contrib sub-libraries and simply add something like
+the following to your pages:
+
+```html
+
+
+```
+
+At the moment there are no cross-contrib dependencies (i.e. each sub-library
+can stand by itself), but that may change in the future.
+
+#### In Node.js
+
+Using contrib in Node is very simple. Just install it with npm:
+
+```
+npm install underscore-contrib --save
+```
+
+Then require it within your project like so:
+
+```javascript
+var _ = require('underscore-contrib');
+```
+
+The `_` variable will be a copy of Underscore with contrib's methods already
+mixed in.
+
+### License
+
+_.contrib is open sourced under the [MIT license](https://github.com/documentcloud/underscore-contrib/blob/master/LICENSE).
+
+## Sub-libraries
+
+The _.contrib library currently contains a number of related capabilities, aggregated into the following files.
+
+ - [underscore.array.builders](#array.builders) - functions to build arrays
+ - [underscore.array.selectors](#array.selectors) - functions to take things from arrays
+ - [underscore.collections.walk](#collections.walk) - functions to walk and transform nested JavaScript objects
+ - [underscore.function.arity](#function.arity) - functions to manipulate and fix function argument arity
+ - [underscore.function.combinators](#function.combinators) - functions to combine functions to make new functions
+ - [underscore.function.iterators](#function.iterators) - functions to lazily produce, manipulate and consume sequence iterators
+ - [underscore.function.predicates](#function.predicates) - functions that return `true` or `false` based on some criteria
+ - [underscore.object.builders](#object.builders) - functions to build JavaScript objects
+ - [underscore.object.selectors](#object.selectors) - functions to pick things from JavaScript objects
+ - [underscore.util.existential](#util.existential) - functions that check for the existence or truthiness of JavaScript data types
+ - [underscore.util.operators](#util.operators) - functions that wrap common (or missing) JavaScript operators
+ - [underscore.util.strings](#util.strings) - functions to work with strings
+ - [underscore.util.trampolines](#util.trampolines) - functions to facilitate calling functions recursively without blowing the stack
+
+The links above are to the annotated source code. Full-blown _.contrib documentation is in the works. Contributors welcomed.
+
diff --git a/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/docs/underscore.array.builders.js.md b/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/docs/underscore.array.builders.js.md
new file mode 100644
index 0000000..0467e85
--- /dev/null
+++ b/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/docs/underscore.array.builders.js.md
@@ -0,0 +1,341 @@
+### array.builders
+
+> Functions to build arrays. View Annotated Source
+
+--------------------------------------------------------------------------------
+
+#### cat
+
+Signature: `_.cat(... arrays:Array ...)`
+
+The `_.cat` function provides a way to concatenate zero or more heterogeneous arrays into one.
+
+```javascript
+_.cat(); // 0-args
+//=> []
+
+_.cat([]); // 1-arg, empty array
+//=> []
+
+_.cat([1,2,3]); // 1-arg
+//=> [1,2,3]
+
+_.cat([1,2,3],[4,5,6]); // 2-args
+//=> [1,2,3,4,5,6]
+
+_.cat([1,2,3],[4,5,6],[7]); // 3+ args
+//=> [1,2,3,4,5,6,7]
+```
+
+Not every argument to `_.cat` needs to be an array; other types are accepted.
+
+Signature: `_.cat(... elems:Any ...)`
+
+```javascript
+_.cat(1,[2],3,4); // mixed args
+//=> [1,2,3,4]
+```
+
+The `_.cat` function will also work with the `arguments` object as if it were an array.
+
+Signature: `_.cat(... elems:Arguments ...)`
+
+```javascript
+function f(){ return _.cat(arguments, 4,5,6); }
+
+f(1,2,3);
+//=> [1,2,3,4,5,6]
+```
+
+--------------------------------------------------------------------------------
+
+#### chunk
+
+The `_.chunk` function, by default, accepts an array and a number and splits and returns a new array representing the original array split into some number of arrays of the given size:
+
+```javascript
+_.chunk([0,1,2,3], 2);
+//=> , [[0,1],[2,3]]
+```
+
+If the original array cannot completely fulfill the chunk scheme then the array returned will drop the undersized final chunk:
+
+```javascript
+_.chunk([0,1,2,3,4], 2);
+//=> , [[0,1],[2,3]]
+```
+
+You can pass an optional third argument to `_.chunk` to pad out the final array chunk should it fall short. If the value given as the third argument is *not* an array then it is repeated the needed number of times:
+
+```javascript
+_.chunk([0,1,2,3,4], 3, '_');
+//=> , [[0,1,2],[3,'_','_']]
+```
+
+If you given an array as the optional third argument then that array is used to pad in-place as needed:
+
+```javascript
+_.chunk([0,1,2,3,4], 3, ['a', 'b']);
+//=> , [[0,1,2],[3,'a','b']]
+```
+
+--------------------------------------------------------------------------------
+
+#### chunkAll
+
+The `_.chunkAll` function is similar to `_.chunk` except for the following. First, `_.chunkAll` will never drop short chunks from the end:
+
+```javascript
+_.chunkAll([0,1,2,3,4], 3);
+//=> , [[0,1,2],[3]]
+```
+
+Also, `_.chunkAll` takes an optional third argument signifying that paritions should be built from skipped regions:
+
+```javascript
+_.chunkAll(_.range(1), 2, 4);
+//=> [[0,1],[4,5],[8,9]]
+```
+
+--------------------------------------------------------------------------------
+
+#### cons
+
+Signature: `_.cons(head:Any, tail:Array)`
+
+The `_.cons` function provides a way to "construct" a new array by taking some element and putting it at the front of another array.
+
+```javascript
+_.cons(0, []);
+//=> [0]
+
+_.cons(1, [2]);
+//=> [1,2]
+
+_.cons([0], [1,2,3]);
+//=> [0,1,2,3]
+```
+
+The `_.cons` function also can be used to create pairs if the second argument is not an array.
+
+Signature: `_.cons(head:Any, tail:Any)`
+
+```javascript
+_.cons(1, 2);
+//=> [1,2]
+
+_.cons([1], 2);
+//=> [[1],2]
+```
+
+Finally, `_.cons` will operate with the `arguments` object.
+
+Signature: `_.cons(head:Any, tail:Arguments)`
+
+```javascript
+function f() { return _.cons(0, arguments) }
+
+f(1,2,3);
+//=> [0,1,2,3]
+```
+
+--------------------------------------------------------------------------------
+
+#### cycle
+
+The `_.cycle` function takes an integer value used to build an array of that size containing the number of iterations through the given array, strung end-to-end as many times as needed. An example is probably more instructive:
+
+```javascript
+_.cycle(5, [1,2,3]);
+//=> [1,2,3,1,2]
+```
+
+--------------------------------------------------------------------------------
+
+#### interpose
+
+The `_.interpose` function takes an array and an element and returns a new array with the given element inserted betwixt every element in the original array:
+
+```javascript
+_.interpose([1,2,3], 0);
+//=> [1,0,2,0,3]
+```
+
+If there are no betweens (i.e. empty and single-element arrays), then the original array is returned:
+
+```javascript
+_.interpose([1], 0);
+//=> [1]
+
+_.interpose([], 0);
+//=> []
+```
+
+--------------------------------------------------------------------------------
+
+#### iterateUntil
+
+The `_.iterateUntil` function takes a function used as a result generator, a function used as a stop-check and a seed value and returns an array of each generated result. The operation of `_.iterateUntil` is such that the result generator is passed the seed to start and each subsequent result which will continue **until** a result fails the check function (i.e. returns falsey). An example is best:
+
+```javascript
+var dec = function(n) { return n - 1; };
+var isPos = function(n) { return n > 0; };
+```
+
+The `dec` result generator takes a number and decrements it by one. The `isPos` predicate takes a number and returns `true` if it's positive. Using these two functions you can build an array of every number from `6` to `0`, inclusive:
+
+```javascript
+_.iterateUntil(dec, isPos, 6);
+//=> [5,4,3,2,1]
+```
+
+That is, the array only contains every number from `5` down to `1` because when the result of `dec` got to `0` the `isPos` check failed (i.e. went falsey) thus terminating the execution.
+
+--------------------------------------------------------------------------------
+
+#### keepIndexed
+
+The `_.keepIndexed` function takes an array and a function and returns a new array filled with the *non-null* return results of the given function on the elements or keys in the given array:
+
+```javascript
+_.keepIndexed([1,2,3], function(k) {
+ return i === 1 || i === 2;
+});
+
+//=> [false, true, true]
+```
+
+If you return either `null` or `undefined` then the result is dropped from the resulting array:
+
+```javascript
+_.keepIndexed(['a','b','c'], function(k, v) {
+ if (k === 1) return v;
+});
+
+//=> ['b']
+```
+
+--------------------------------------------------------------------------------
+
+#### mapcat
+
+There are times when a mapping operation produces results contained in arrays, but the final result should be flattened one level. For these circumstances you can use `_.mapcat` to produce results:
+
+```javascript
+var array = [1,2,null,4,undefined,6];
+
+var errors = _.mapcat(array, function(e,i) {
+ if (e == null) {
+ return ["Element @" + i + " is bad"];
+ }
+ else {
+ return [];
+ }
+});
+```
+Inspecting the contents of `errors` shows:
+
+```javascript
+["Element @2 is bad", "Element @4 is bad"]
+```
+
+The `_.mapcat` function is equivalent to `_.cat.apply(array, _.map(array,fun))`.
+
+--------------------------------------------------------------------------------
+
+#### reductions
+
+The `_.reductions` function is similar to Underscore's builtin `_.reduce` function except that it returns an array of every intermediate value in the folding operation:
+
+```javascript
+_.reductions([1,2,3,4,5], function(agg, n) {
+ return agg + n;
+}, 0);
+
+//=> [1,3,6,10,15]
+```
+
+The last element in the array returned from `_.reductions` is the answer that you would get if you had just chosen to use `_.reduce`.
+
+--------------------------------------------------------------------------------
+
+#### repeat
+
+Signature: `_.repeat(t:Integer, value:Any)`
+
+The `_.repeat` function takes an integer value used to build an array of that size containing the value given:
+
+```javascript
+_.repeat(5, 'a');
+//=> ['a','a','a','a','a']
+```
+
+--------------------------------------------------------------------------------
+
+#### splitAt
+
+The `_.splitAt` function takes an array and a numeric index and returns a new array with two embedded arrays representing a split of the original array at the index provided:
+
+```javascript
+_.splitAt([1,2,3,4,5], 2);
+//=> [[1,2],[3,4,5]]
+
+_.splitAt([1,2,3,4,5], 0);
+//=> [[],[1,2,3,4,5]]
+```
+
+The operation of `_.splitAt` is safe if the index provided is outside the range of legal indices:
+
+```javascript
+_.splitAt([1,2,3,4,5], 20000);
+//=> [[1,2,3,4,5],[]]
+
+_.splitAt([1,2,3,4,5], -1000);
+//=> [[],[1,2,3,4,5]]
+
+_.splitAt([], 0);
+//=> [[],[]]
+```
+
+--------------------------------------------------------------------------------
+
+#### takeSkipping
+
+The `_.takeSkipping` function takes an array and a number and returns a new array containing every nth element in the original array:
+
+```javascript
+_.takeSkipping(_.range(10), 2);
+//=> [0,2,4,6,8]
+```
+
+The `_.takeSkipping` function is safe against numbers larger or smaller than the array size:
+
+```javascript
+_.takeSkipping(_.range(10), 100000);
+//=> [0]
+
+_.takeSkipping(_.range(10), -100);
+//=> []
+```
+
+--------------------------------------------------------------------------------
+
+#### weave
+
+The `_.weave` function works similarly to `_.interpose` (shown above) except that it accepts an array used as the interposition values. In other words, `_.weave` takes two arrays and returns a new array with the original elements woven together. An example would help:
+
+```javascript
+_.weave(['a','b','c'], [1,2,3]);
+//=> ['a',1,'b',2,'c',3]
+```
+
+The array returned from `_.weave` will be as long as the longest array given with the woven entries stopping according to the shortest array:
+
+```javascript
+_.weave(['a','b','c'], [1]);
+//=> ['a',1,'b','c']
+```
+
+The `_.interleave` function is an alias for `_.weave`.
+
+--------------------------------------------------------------------------------
\ No newline at end of file
diff --git a/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/docs/underscore.array.selectors.js.md b/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/docs/underscore.array.selectors.js.md
new file mode 100644
index 0000000..42b7478
--- /dev/null
+++ b/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/docs/underscore.array.selectors.js.md
@@ -0,0 +1,165 @@
+### array.selectors
+
+> Functions to take things from arrays. View Annotated Source
+
+--------------------------------------------------------------------------------
+
+#### best
+
+**Signature:** `_.best(array:Array, fun:Function)`
+
+Returns the "best" value in an array based on the result of a given function.
+
+```javascript
+_.best([1, 2, 3, 4, 5], function(x, y) {
+ return x > y;
+});
+//=> 5
+```
+
+--------------------------------------------------------------------------------
+
+#### dropWhile
+
+**Signature:** `_.dropWhile(array:Array, pred:Function)`
+
+Drops elements for which the given function returns a truthy value.
+
+```javascript
+_.dropWhile([-2,-1,0,1,2], isNeg);
+//=> [0,1,2]
+```
+
+--------------------------------------------------------------------------------
+
+#### keep
+
+**Signature:** `_.keep(array:Array, fun:Function)`
+
+Returns an array of existy results of a function over a source array.
+
+```javascript
+_.keep([1, 2, 3, 4, 5], function(val) {
+ if (val % 3 === 0) {
+ return val;
+ }
+});
+// => [3]
+```
+
+--------------------------------------------------------------------------------
+
+#### nth
+
+**Signature:** `_.nth(array:Array, index:Number[, guard:Any])`
+
+The `_.nth` function is a convenience for the equivalent `array[n]`. The
+optional `guard` value allows `_.nth` to work correctly as a callback for
+`_.map`.
+
+```javascript
+_.nth(['a','b','c'], 2);
+//=> 'c'
+```
+
+If given an index out of bounds then `_.nth` will return `undefined`:
+
+```javascript
+_.nth(['a','b','c'], 2000);
+//=> undefined
+```
+
+The `_.nth` function can also be used in conjunction with `_.map` and `_.compact` like so:
+
+```javascript
+var b = [['a'],['b'],[]];
+
+_.compact(_.map(b, function(e) { return _.nth(e,0) }));
+//=> ['a','b']
+```
+
+If wrapping a function around `_.nth` is too tedious or you'd like to partially apply the index then Underscore-contrib offers any of `_.flip2`, `_.fix` or `rcurry2` to solve this.
+
+--------------------------------------------------------------------------------
+
+#### partitionBy
+
+**Signature:** `_.keep(array:Array, fun:Function)`
+
+Takes an array and partitions it into sub-arrays as the given predicate changes
+truth sense.
+
+```javascript
+_.partitionBy([1,2,2,3,1,1,5], _.isEven);
+// => [[1],[2,2],[3,1,1,5]]
+
+_.partitionBy([1,2,2,3,1,1,5], _.identity);
+// => [[1],[2,2],[3],[1,1],[5]]
+```
+
+--------------------------------------------------------------------------------
+
+#### second
+
+**Signature:** `_.second(array:Array, index:Number[, guard:Any])`
+
+The `_.second` function is a convenience for the equivalent `array[1]`. The
+optional `guard` value allows `_.second` to work correctly as a callback for
+`_.map`.
+
+```javascript
+_.second(['a','b']);
+//=> 'b'
+
+_.map([['a','b'], _.range(10,20)], _.second);
+//=> ['b',11]
+```
+
+You can also pass an optional number to the `_.second` function to take a number of elements from an array starting with the second element and ending at the given index:
+
+```javascript
+_.second(_.range(10), 5)
+//=> [1, 2, 3, 4]
+```
+
+--------------------------------------------------------------------------------
+
+#### takeWhile
+
+**Signature:** `_.takeWhile(array:Array, pred:Function)`
+
+The `_.takeWhile` function takes an array and a function and returns a new array containing the first n elements in the original array for which the given function returns a truthy value:
+
+```javascript
+var isNeg = function(n) { return n < 0; };
+
+_.takeWhile([-2,-1,0,1,2], isNeg);
+//=> [-2,-1]
+```
+
+--------------------------------------------------------------------------------
+
+#### third
+
+**Signature:** `_.third(array:Array, index:Number[, guard:Any])`
+
+The `_.third` function is a convenience for the equivalent `array[2]`. The
+optional `guard` value allows `_.third` to work correctly as a callback for
+`_.map`.
+
+```javascript
+_.third(['a','b','c']);
+//=> 'c'
+
+_.map([['a','b','c'], _.range(10,20)], _.third);
+//=> ['c',12]
+```
+
+You can also pass an optional number to the `_.third` function to take a number of elements from an array starting with the third element and ending at the given index:
+
+```javascript
+_.third(_.range(10), 5)
+//=> [2, 3, 4]
+```
+
+--------------------------------------------------------------------------------
\ No newline at end of file
diff --git a/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/docs/underscore.collections.walk.js.md b/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/docs/underscore.collections.walk.js.md
new file mode 100644
index 0000000..5c6b7c4
--- /dev/null
+++ b/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/docs/underscore.collections.walk.js.md
@@ -0,0 +1,15 @@
+### collections.walk
+
+> Functions to recursively walk collections which are trees.
+
+Documentation should use [Journo](https://github.com/jashkenas/journo) formats and standards.
+
+ _.walk = walk;
+ postorder: function(obj, visitor, context)
+ preorder: function(obj, visitor, context)
+ walk(obj, visitor, null, context)
+ map: function(obj, strategy, visitor, context)
+ pluck: function(obj, propertyName)
+ pluckRec: function(obj, propertyName)
+ _.walk.collect = _.walk.map;
+
diff --git a/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/docs/underscore.function.arity.js.md b/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/docs/underscore.function.arity.js.md
new file mode 100644
index 0000000..cc60249
--- /dev/null
+++ b/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/docs/underscore.function.arity.js.md
@@ -0,0 +1,333 @@
+### function.arity
+
+> Functions which manipulate the way functions work with their arguments.
+
+--------------------------------------------------------------------------------
+
+#### arity
+
+**Signature:** `_.arity(numberOfArgs:Number, fun:Function)`
+
+Returns a new function which is equivalent to `fun`, except that the new
+function's `length` property is equal to `numberOfArgs`. This does **not** limit
+the function to using that number of arguments. It's only effect is on the
+reported length.
+
+```javascript
+function addAll() {
+ var sum = 0;
+ for (var i = 0; i < arguments.length; i++) {
+ sum = sum + arguments[i];
+ }
+ return sum;
+}
+
+addAll.length
+// => 0
+
+var addAllWithFixedLength = _.arity(2, addAll);
+
+addAllWithFixedLength.length
+// => 2
+
+addAllWithFixedLength(1, 1, 1, 1);
+// => 4
+```
+
+--------------------------------------------------------------------------------
+
+#### binary
+
+**Signature:** `_.binary(fun:Function)`
+
+Returns a new function which accepts only two arguments and passes these
+arguments to `fun`. Additional arguments are discarded.
+
+```javascript
+function addAll() {
+ var sum = 0;
+ for (var i = 0; i < arguments.length; i++) {
+ sum = sum + arguments[i];
+ }
+ return sum;
+}
+
+var add2 = _.binary(addAll);
+
+add2(1, 1);
+// => 2
+
+add2(1, 1, 1, 1);
+// => 2
+```
+
+--------------------------------------------------------------------------------
+
+#### curry
+
+**Signature:** `_.curry(func:Function[, reverse:Boolean])`
+
+Returns a curried version of `func`. If `reverse` is true, arguments will be
+processed from right to left.
+
+```javascript
+function add3 (x, y, z) {
+ return x + y + z;
+}
+
+var curried = _.curry(add3);
+// => function
+
+curried(1);
+// => function
+
+curried(1)(2);
+// => function
+
+curried(1)(2)(3);
+// => 6
+```
+
+--------------------------------------------------------------------------------
+
+#### curry2
+
+**Signature:** `_.curry2(fun:Function)`
+
+Returns a curried version of `func`, but will curry exactly two arguments, no
+more or less.
+
+```javascript
+function add2 (a, b) {
+ return a + b;
+}
+
+var curried = _.curry2(add2);
+// => function
+
+curried(1);
+// => function
+
+curried(1)(2);
+// => 3
+```
+
+--------------------------------------------------------------------------------
+
+#### curry3
+
+**Signature:** `_.curry3(fun:Function)`
+
+Returns a curried version of `func`, but will curry exactly three arguments, no
+more or less.
+
+```javascript
+function add3 (a, b, c) {
+ return a + b + c;
+}
+
+var curried = _.curry3(add3);
+// => function
+
+curried(1);
+// => function
+
+curried(1)(2);
+// => function
+
+curried(1)(2)(3);
+// => 6
+```
+
+--------------------------------------------------------------------------------
+
+#### fix
+
+**Signature:** `_.fix(fun:Function[, value:Any...])`
+
+Fixes the arguments to a function based on the parameter template defined by
+the presence of values and the `_` placeholder.
+
+```javascript
+function add3 (a, b, c) {
+ return a + b + c;
+}
+
+var fixedFirstAndLast = _.fix(add3, 1, _, 3);
+// => function
+
+fixedFirstAndLast(2);
+// => 6
+
+fixedFirstAndLast(10);
+// => 14
+```
+
+--------------------------------------------------------------------------------
+
+#### quaternary
+
+**Signature:** `_.quaternary(fun:Function)`
+
+Returns a new function which accepts only four arguments and passes these
+arguments to `fun`. Additional arguments are discarded.
+
+```javascript
+function addAll() {
+ var sum = 0;
+ for (var i = 0; i < arguments.length; i++) {
+ sum = sum + arguments[i];
+ }
+ return sum;
+}
+
+var add4 = _.quaternary(addAll);
+
+add4(1, 1, 1, 1);
+// => 4
+
+add4(1, 1, 1, 1, 1, 1);
+// => 4
+```
+
+--------------------------------------------------------------------------------
+
+#### ternary
+
+**Signature:** `_.ternary(fun:Function)`
+
+Returns a new function which accepts only three arguments and passes these
+arguments to `fun`. Additional arguments are discarded.
+
+```javascript
+function addAll() {
+ var sum = 0;
+ for (var i = 0; i < arguments.length; i++) {
+ sum = sum + arguments[i];
+ }
+ return sum;
+}
+
+var add3 = _.ternary(addAll);
+
+add3(1, 1, 1);
+// => 3
+
+add3(1, 1, 1, 1, 1, 1);
+// => 3
+```
+
+--------------------------------------------------------------------------------
+
+#### unary
+
+**Signature:** `_.unary(fun:Function)`
+
+Returns a new function which accepts only one argument and passes this
+argument to `fun`. Additional arguments are discarded.
+
+```javascript
+function logArgs() {
+ console.log(arguments);
+}
+
+var logOneArg = _.unary(logArgs);
+
+logOneArg("first");
+// => ["first"]
+
+logOneArg("first", "second");
+// => ["first"]
+```
+
+--------------------------------------------------------------------------------
+
+#### rCurry
+
+**Signature:** `_.rCurry(func:Function)`
+
+Returns a curried version of `func` where arguments are processed from right
+to left.
+
+```javascript
+function divide (a, b) {
+ return a / b;
+}
+
+var curried = _.rCurry(divide);
+// => function
+
+curried(1);
+// => function
+
+curried(1)(2);
+// => 2
+
+curried(2)(1);
+// => 0.5
+```
+
+--------------------------------------------------------------------------------
+
+#### rcurry2
+
+**Signature:** `_.rcurry2(func:Function)`
+
+Returns a curried version of `func` where a maxium of two arguments are
+processed from right to left.
+
+```javascript
+function concat () {
+ var str = "";
+
+ for (var i = 0; i < arguments.length; i++) {
+ str = str + arguments[i];
+ }
+
+ return str;
+}
+
+var curried = _.rcurry2(concat);
+// => function
+
+curried("a");
+// => function
+
+curried("a")("b");
+// => "ba"
+
+```
+
+--------------------------------------------------------------------------------
+
+#### rcurry3
+
+**Signature:** `_.rcurry3(func:Function)`
+
+Returns a curried version of `func` where a maxium of three arguments are
+processed from right to left.
+
+```javascript
+function concat () {
+ var str = "";
+
+ for (var i = 0; i < arguments.length; i++) {
+ str = str + arguments[i];
+ }
+
+ return str;
+}
+
+var curried = _.rcurry3(concat);
+// => function
+
+curried("a");
+// => function
+
+curried("a")("b");
+// => function
+
+curried("a")("b")("c");
+// => "cba"
+
+```
diff --git a/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/docs/underscore.function.combinators.js.md b/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/docs/underscore.function.combinators.js.md
new file mode 100644
index 0000000..97b83d1
--- /dev/null
+++ b/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/docs/underscore.function.combinators.js.md
@@ -0,0 +1,424 @@
+### function.combinators
+
+> Functions that are combinators.
+
+--------------------------------------------------------------------------------
+
+#### always
+
+**Signature:** `_.always(value:Any)`
+
+**Aliases:** `_.k`
+
+Takes `value` and returns a function that will always return `value`.
+
+```javascript
+var platonicForm = _.always("Eternal & Unchangeable");
+
+platonicForm();
+// => "Eternal & Unchangeable"
+```
+
+--------------------------------------------------------------------------------
+
+#### bound
+
+**Signature:** `_.bound(obj:Object, fname:String)`
+
+Returns function property of an object by name, bound to object.
+
+```javascript
+var aristotle = {
+ name: "Aristotle",
+ telos: "flourishing",
+ stateTelos: function() {
+ return this.name + "'s telos is " + this.telos;
+ }
+};
+
+var stateAristotlesTelos = _.bound(aristotle, "stateTelos");
+
+stateAristotlesTelos();
+// => "Aristotle's Telos is flourishing"
+```
+
+--------------------------------------------------------------------------------
+
+#### comparator
+
+**Signature:** `_.comparator(fun:Function)`
+
+Takes a binary predicate-like function and returns a comparator function (return
+values of `-1`, `0`, `1`) which can be used as a callback for `_.sort` or
+`Array.prototype.sort`.
+
+```javascript
+var lessOrEqual = function(x, y) { return x <= y; };
+
+var arr = [0, 1, -2];
+
+arr.sort(_.comparator(lessOrEqual));
+// => [-2, 0, 1]
+```
+
+--------------------------------------------------------------------------------
+
+#### complement
+
+**Signature:** `_.complement(pred:Function)`
+
+Returns a function that reverses the sense of a given predicate-like.
+
+```javascript
+function isAugustine (val) {
+ return val === "Augustine";
+}
+
+isNotAugustine = _.complement(isAugustine);
+
+isNotAugustine("Dionysius");
+// => True
+```
+
+--------------------------------------------------------------------------------
+
+#### conjoin
+
+**Signature:** `_.conjoin(pred:Function...)`
+
+Composes multiple predicates into a single predicate that checks all elements
+of an array for conformance to **all** of the original predicates.
+
+```javascript
+function startsWithA (val) {
+ return val[0] === "A";
+}
+
+function endsWithE (val) {
+ return val[val.length - 1] === "e";
+}
+
+var names = ["Aristotle", "Aquinas", "Plato", "Augustine"];
+
+var startsAAndEndsE = _.conjoin(startsWithA, endsWithE);
+
+startsAAndEndsE(names);
+// => ["Aristotle", "Augustine"]
+```
+
+--------------------------------------------------------------------------------
+
+#### disjoin
+
+**Signature:** `_.disjoin(pred:Function...)`
+
+Composes multiple predicates into a single predicate that checks all elements
+of an array for conformance to **any** of the original predicates.
+
+```javascript
+function startsWithA (val) {
+ return val[0] === "A";
+}
+
+function endsWithE (val) {
+ return val[val.length - 1] === "e";
+}
+
+var names = ["Aristotle", "Aquinas", "Plato", "Augustine"];
+
+var startsAOrEndsE = _.disjoin(startsWithA, endsWithE);
+
+startsAOrEndsE(names);
+// => ["Aristotle", "Aquinas", "Augustine"]
+```
+
+--------------------------------------------------------------------------------
+
+#### juxt
+
+**Signature:** `_.juxt(fun:Function...)`
+
+Returns a function whose return value is an array of the results of calling
+each of the original functions with the arguments.
+
+```javascript
+function firstChar (val) {
+ return val[0];
+}
+
+function lastChar (val) {
+ return val[val.length - 1];
+}
+
+var firstAndLastChars = _.juxt(firstChar, lastChar);
+
+firstAndLastChars("Etruria");
+// => ["E", "a"]
+```
+
+--------------------------------------------------------------------------------
+
+#### flip
+
+**Signature:** `_.flip(fun:Function)`
+
+Returns a function that works identically to `fun`, but accepts the arguments
+in reverse order.
+
+```javascript
+function regionCapitol (region, capitol) {
+ return "The capitol of " + region + " is " + capitol;
+}
+
+capitolRegion = _.flip(regionCapitol);
+
+capitolRegion("Thessalonica", "Illyrica");
+// => "The capitol of Illyrica is Thessalonica"
+```
+
+--------------------------------------------------------------------------------
+
+
+#### flip2
+
+**Signature:** `_.flip2(fun:Function)`
+
+Returns a function that works identically to `fun`, but accepts the first two
+arguments in reverse order. The order of all other arguments remains the same.
+
+```javascript
+function regionCapitol (region, capitol) {
+ return "The capitol of " + region + " is " + capitol;
+}
+
+capitolRegion = _.flip2(regionCapitol);
+
+capitolRegion("Thessalonica", "Illyrica");
+// => "The capitol of Illyrica is Thessalonica"
+```
+
+--------------------------------------------------------------------------------
+
+#### fnull
+
+**Signature:** `_.fnull(fun:Function[, default:Any...])`
+
+Returns a function that protects `fun` from receiving non-existy values. Each
+subsequent value provided to `fnull` acts as the default to the original
+`fun` should a call receive non-existy values in the defaulted arg slots.
+
+```javascript
+function getLength (val) {
+ return val.length;
+}
+
+safeGetLength = _.fnull(getLength, []);
+
+safeGetLength([1, 2, 3]);
+// => 3
+
+safeGetLength(null);
+// => 0
+```
+
+--------------------------------------------------------------------------------
+
+#### functionalize
+
+**Signature:** `_.functionalize(fun:Function[, default:Any...])`
+
+Takes a method-style function (one which uses `this`) and pushes `this` into the
+argument list. The returned function uses its first argument as the
+receiver/context of the original function, and the rest of the arguments are
+used as the original's entire argument list.
+
+```javascript
+var militaryUnits = {
+ centuria: "80 men",
+ cohort: "480 men",
+ getDescription: function (unitName) {
+ return this[unitName];
+ }
+};
+
+var getDescription = _.functionalize(militaryUnits.getDescription);
+
+var rulers = {
+ Leonidas: "King of Sparta",
+ Augustus: "First Roman Emperor"
+};
+
+getDescription(rulers, "Augustus");
+// => "First Roman Emperor"
+```
+
+--------------------------------------------------------------------------------
+
+#### mapArgs
+
+**Signature:** `_.mapArgs(fun:Function)`
+
+Takes a target function and returns a new function which accepts a mapping
+function, which in turn returns a function that will map its arguments before
+calling the original target function.
+
+```javascript
+function doubleNum (x) { return 2 * x; }
+
+function squareNum (x) { return x * x; }
+
+var squareThenDouble = _.mapArgs(doubleNum)(squareNum);
+
+squareThenDouble(3);
+// => 18
+```
+
+--------------------------------------------------------------------------------
+
+#### mapArgsWith
+
+**Signature:** `_.mapArgs(mapFun:Function)`
+
+Takes a mapping function and returns a new combinator function which will take
+a target function and return a new version which maps its arguments with the
+mapping function before executing the body of the target function.
+
+```javascript
+function doubleNum (x) { return 2 * x; }
+
+function squareNum (x) { return x * x; }
+
+var squareArgs = _.mapArgsWith(squareNum);
+
+var squareThenDouble = squareArgs(doubleNum);
+
+squareThenDouble(3);
+// => 18
+```
+
+--------------------------------------------------------------------------------
+
+#### methodize
+
+**Signature:** `_.methodize(func:Function)`
+
+Takes a function and pulls the first argument out of the argument list and into
+`this` position. The returned function calls the original with its receiver
+(`this`) prepending the argument list. The original is called with a receiver
+of `null`.
+
+```javascript
+function describe (obj) {
+ return obj.name + ": " + obj.description;
+}
+
+var democritus = {
+ name: "Democritus",
+ description: "originator of the atomic hypothesis",
+ describe: _.methodize(describe)
+};
+
+democritus.describe();
+// => "Democritus: originator of the atomic hypothesis"
+```
+
+--------------------------------------------------------------------------------
+
+
+#### pipeline
+
+**Signature:** `_.pipeline(func:Function[, func2:Function...])` or `_.pipeline(funcArr:Array)`
+
+**Aliases:** `_.t`
+
+Takes a list of functions, either as an array or as individual arguments
+and returns a function that takes some value as its first argument and runs it
+through a pipeline of the original functions given.
+
+```javascript
+function halveNum (x) { return x / 2; };
+function squareNum (x) { return x * x; };
+function doubleNum (x) { return 2 * x; };
+
+var halveSquareDouble = _.pipeline(halveNum, squareNum, doubleNum);
+
+halveSquareDouble(1);
+// => 0.5
+
+var doubleSquareHalve = _.pipeline([doubleNum, squareNum, halveNum]);
+
+doubleSquareHalve(1);
+// => 2
+```
+
+--------------------------------------------------------------------------------
+
+#### splat
+
+**Signature:** `_.splat(fun:Function)`
+
+Takes a function expecting one or more arguments and returns a function
+that takes an array and uses its elements as the arguments to the original
+function. This roughly corresponds to the [spread operator][spread] in
+ECMAScript 6.
+
+```javascript
+function listTwoNames (a, b) {
+ return a.name + " & " + b.name;
+}
+
+var listTwoNamesFromArray = _.splat(listTwoNames);
+
+listTwoNamesFromArray([{ name: "Zeno" }, { name: "Parmenides"}]);
+// => "Zeno & Parmenides"
+```
+
+--------------------------------------------------------------------------------
+
+#### unsplat
+
+**Signature:** `_.unsplat(fun:Function)`
+
+**Aliases:** `_.unsplatr`
+
+Takes a function expecting an array as its *last* argument and returns a function
+which works identically, but takes a list of trailing arguments instead. Roughly
+corresponds to [rest parameters][rest] in ECMAScript 6.
+
+```javascript
+function joinWith (joiner, arr) {
+ return arr.join(joiner);
+}
+
+var joinArgsWith = _.unsplat(joinWith);
+
+joinArgsWith(" & ", "Plutarch", "Proclus");
+// => "Plutarch & Proclus"
+```
+
+--------------------------------------------------------------------------------
+
+#### unsplatl
+
+**Signature:** `_.unsplatl(fun:Function)`
+
+Similar to [unsplat](#unsplat), but takes a function expecting an array as its
+*first* argument and returns a function which works identically, but takes a
+list of leading arguments instead. Roughly corresponds to
+[rest parameters][rest] in ECMAScript 6.
+
+```javascript
+function joinWith (arr, joiner) {
+ return arr.join(joiner);
+}
+
+var joinArgsWith = _.unsplat(joinWith);
+
+joinArgsWith("Olympiodorus", "Syrianus", " & ");
+// => "Olympiodorus & Syrianus"
+```
+
+--------------------------------------------------------------------------------
+
+[spread]:https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_operator
+[rest]:https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions_and_function_scope/rest_parameters
\ No newline at end of file
diff --git a/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/docs/underscore.function.iterators.js.md b/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/docs/underscore.function.iterators.js.md
new file mode 100644
index 0000000..6659560
--- /dev/null
+++ b/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/docs/underscore.function.iterators.js.md
@@ -0,0 +1,419 @@
+### function.iterators
+
+> Functions to iterate over collections.
+
+--------------------------------------------------------------------------------
+
+#### iterators.accumulate
+
+**Signature:** `_.iterators.accumulate(iter:Function, binaryFn:Function, initial:Any)`
+
+Returns a function that when called will iterate one step with `iter` and return
+the value currently accumulated by using `binaryFn`. The function will return `undefined` once all values have been iterated over.
+
+```javascript
+var generalsIterator = _.iterators.List(["Hannibal", "Scipio"]);
+
+function countLetters(memo, element) {
+ return memo + element.length;
+}
+
+var generalsAcc = _.iterators.accumulate(generalsIterator, countLetters, 0);
+
+generalsAcc();
+// => 8
+
+generalsAcc();
+// => 14
+
+generalsAcc();
+// => undefined
+```
+
+--------------------------------------------------------------------------------
+
+#### iterators.accumulateWithReturn
+
+**Signature:** `_.iterators.accumulateWithReturn(iter:Function, binaryFn:Function, initial:Any)`
+
+Acts similarly to accumulate, except that `binaryFn` is expected to return an
+array of two elements. The value of the first element is given to the next run
+of `binaryFn`. The value of the second element is yielded by the iterator.
+
+
+```javascript
+var fiveIter = _.iterators.List([1, 2, 3, 4, 5]);
+
+function adderWithMessage (state, element) {
+ return [state + element, 'Total is ' + (state + element)];
+}
+
+var i = _.iterators.accumulateWithReturn(fiveIter, adderWithMessage, 0);
+
+i();
+// => "Total is 1"
+
+i();
+// => "Total is 3"
+
+i();
+// => "Total is 6"
+```
+
+--------------------------------------------------------------------------------
+
+#### iterators.drop
+
+**Signature:** `_.iterators.drop(iter:Function[, numberToDrop:Number])`
+
+Given an iterator function `iter`, will return a new iterator which iterates
+over the same values as `iter`, except that the first `numberToDrop` values
+will be omitted. If `numberToDrop` is not provided, it will default to `1`.
+
+```javascript
+var deityIter = _.iterators.List(["Zeus", "Apollo", "Athena", "Aphrodite"]);
+
+var goddessIter = _.iterators.drop(deityIter, 2);
+
+goddessIter();
+// => "Athena"
+
+goddessIter();
+// => "Aphrodite"
+```
+
+--------------------------------------------------------------------------------
+
+#### iterators.foldl
+
+**Signature:** `_.iterators.foldl(iter:Function, binaryFn:Function[, seed:Any])`
+
+**Aliases:** `iterators.reduce`
+
+Boils down the values given by `iter` into a single value. The `seed` is the
+initial state. The `binaryFn` is given two arguments: the `seed` and the
+current value yielded by `iter`.
+
+```javascript
+var sybylIter = _.iterators.List(["cumaean", "tiburtine"]);
+
+function commaString (a, b) { return a + ", " + b; }
+
+_.iterators.foldl(sybylIter, commaString);
+// => "cumaean, tiburtine"
+```
+
+--------------------------------------------------------------------------------
+
+#### iterators.K
+
+**Signature:** `_.iterators.K(value:Any)`
+
+**Aliases:** `iterators.constant`
+
+Returns a function that when invoked will always return `value`.
+
+```javascript
+var ceasar = _.iterators.K("Ceasar");
+
+ceasar();
+// => "ceasar"
+```
+
+--------------------------------------------------------------------------------
+
+#### iterators.List
+
+**Signature:** `_.iterators.List(array:Array)`
+
+Returns an iterater that when invoked will iterate over the contents of `array`.
+
+```javascript
+var triumvirIter = _.iterators.List(["Ceasar", "Pompey", "Crassus"];
+
+triumvirIter();
+// => "Ceasar"
+
+triumvirIter();
+// => "Pompey"
+
+triumvirIter();
+// => "Crassus"
+```
+
+--------------------------------------------------------------------------------
+
+#### iterators.map
+
+**Signature:** `_.iterators.map(iter:Function, unaryFn:Function)`
+
+Returns a new iterator function which on each iteration will return the result
+of running `iter`'s current value through `unaryFn`.
+
+```javascript
+var notablesIter = _.iterators.List(["Socrates", "Plato"]);
+
+function postfixAthenian (val) {
+ return val + ", Athenian";
+}
+
+var notableAtheniansIter = _.iterators.map(notablesIter, postfixAthenian);
+
+notableAtheniansIter();
+// => "Socrates, Athenian"
+
+notableAtheniansIter();
+// => "Plato, Athenian"
+```
+
+--------------------------------------------------------------------------------
+
+#### iterators.mapcat
+
+**Signature:** `_.iterators.mapcat(iter:Function, unaryFn:Function)`
+
+Returns an iterator which is the result of flattening the contents of `iter`,
+and mapping the results with `unaryFn`.
+
+```javascript
+function naturalSmallerThan (x) {
+ return _.iterators.List(_.range(0, x));
+}
+
+var treeIter = _.iterators.Tree([1, [2]]);
+
+var smallerThanIter = _.iterators.mapcat(treeIter, naturalSmallerThan);
+
+smallerThanIter();
+// => 0
+
+smallerThanIter();
+// => 0
+
+smallerThanIter();
+// => 1
+```
+
+--------------------------------------------------------------------------------
+
+#### iterators.numbers
+
+**Signature:** `_.iterators.numbers([start:Number])`
+
+Returns an iterator of integers which will begin with `start` and increment by
+one for each invocation. If `start` is not provided it will default to `1`.
+
+```javascript
+var twoAndUp = _.iterators.numbers(2);
+
+twoAndUp();
+// => 2
+
+twoAndUp();
+// => 3
+
+twoAndUp();
+// => 4
+```
+
+--------------------------------------------------------------------------------
+
+#### iterators.range
+
+**Signature:** `_.iterators.range([from:Number, to:Number, by:Number]);
+
+Returns an iterator whose values consist of numbers beginning with `from`, ending with `to`, in steps of size `by`.
+
+```javascript
+var by5 = _.iterators.range(5, Infinity, 5);
+
+by5();
+// => 5
+
+by5();
+// => 10
+
+by5();
+// => 15
+```
+
+--------------------------------------------------------------------------------
+
+#### iterators.reject
+
+**Signature:** `_.iterators.reject(iter:Function, unaryPredicatFn:Function)`
+
+Returns an iterator consisting of the values of `iter` which are not flagged
+`true` by `unaryPredicateFn`.
+
+```javascript
+var philosophers = ["Anaximander", "Socrates", "Heraclitus"];
+
+var philosophersIter = _.iterators.List(philosophers);
+
+function isSocrates (val) {
+ return val === "Socrates";
+}
+
+var preSocraticsIter = _.iterators.reject(philosophersIter, isSocrates);
+
+preSocraticsIter()
+// => "Anaximander"
+
+preSocraticsIter()
+// => "Heraclitus"
+```
+
+--------------------------------------------------------------------------------
+
+#### iterators.select
+
+**Signature:** `_.iterators.select(iter:Function, unaryPredicatFn:Function)`
+
+**Aliases:** `iterators.find`, `iteraters.filter`
+
+Returns an iterator consisting of the values of `iter` which are flagged
+`true` by `unaryPredicateFn`.
+
+```javascript
+var philosophers = ["Anaximander", "Socrates", "Heraclitus"];
+
+var philosophersIter = _.iterators.List(philosophers);
+
+function isSocrates (val) {
+ return val === "Socrates";
+}
+
+var socraticIter = _.iterators.select(philosophersIter, isSocrates);
+
+socraticIter()
+// => "Socrates"
+```
+
+--------------------------------------------------------------------------------
+
+#### iterators.slice
+
+**Signature:** `_.iterators.slice(iter:Function, numberToDrop:Number, numberToTake:Number)`
+
+Returns an iterator whose values consist of `iter`'s after removing
+`numberToDrop` from the head, and a maxiumum of `numberToTake` of the remaining.
+If `numberToTake` is not specified, all of `iter`'s remaining values will be
+used.
+
+```javascript
+var emperors = ["Augustus", "Tiberius", "Caligula", "Claudius"];
+
+var emperorsIter = _.iterators.List(emperors);
+
+var middleEmperorsIter = _.iterators.slice(emperorsIter, 1, 2);
+
+middleEmperorsIter();
+// => "Tiberius"
+
+middleEmperorsIter();
+// => "Caligula"
+
+middleEmperorsIter();
+// => undefined
+```
+
+--------------------------------------------------------------------------------
+
+#### iterators.take
+
+**Signature:** `_.iterators.take(iter:Function[, numberToTake:Number])`
+
+Returns an iterator consisting of the first `numberToTake` values yielded by
+`iter`. If `numberToTake` is not provided, it will default to `1`.
+
+```javascript
+var byzantineEmperors = ["Constantine", "Constantius", "Constans"];
+
+var byzantineEmperorsIter = _.iterators.List(byzantineEmperors);
+
+var firstTwoEmperorsIter = _.iterators.take(byzantineEmperorsIter, 2);
+
+firstTwoEmperorsIter();
+// => "Constantine"
+
+firstTwoEmperorsIter();
+// => "Constantius"
+
+firstTwoEmperorsIter();
+// => undefined
+```
+
+--------------------------------------------------------------------------------
+
+#### iterators.Tree
+
+**Signature:** `_.iterators.Tree(array:Array);`
+
+Returns an iterator that yields the individual values of a tree `array`.
+
+```javascript
+var rulers = ["Augustus", ["Constantine"], ["Leo", ["Charlemagne"]]];
+
+var rulersIter = _.iterators.Tree(rulers);
+
+rulersIter();
+// => "Augustus"
+
+rulersIter();
+// => "Constantine"
+
+rulersIter();
+// => "Leo"
+
+rulersIter();
+// => "Charlemagne"
+```
+
+--------------------------------------------------------------------------------
+
+#### iterators.unfold
+
+**Signature:** `_.iterators.unfold(seed:Any, unaryFn:Function)`
+
+```javascript
+function greatify (val) {
+ return val + " the Great";
+}
+
+var greatIter = _.iterators.unfold("Constantine", greatify);
+
+greatIter();
+// => "Constantine the Great"
+
+greatIter();
+// => "Constantine the Great the Great"
+
+greatIter();
+// => "Constantine the Great the Great the Great"
+```
+
+--------------------------------------------------------------------------------
+
+#### iterators.unfoldWithReturn
+
+**Signature:** `_.iterators.unfold(seed:Any, unaryFn:Function)`
+
+Acts similarly to unfold, except that `unaryFn` is expected to return an array
+with two elements. The value of the first element is given to the next run of
+`unaryFn`. The value of the second element is yielded by the iterator.
+
+```javascript
+var i = _.iterators.unfoldWithReturn(1, function(n) {
+ return [n + 1, n * n];
+});
+
+i();
+// => 1
+
+i();
+// => 4
+
+i();
+// => 9
+```
diff --git a/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/docs/underscore.function.predicates.js.md b/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/docs/underscore.function.predicates.js.md
new file mode 100644
index 0000000..6983b9b
--- /dev/null
+++ b/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/docs/underscore.function.predicates.js.md
@@ -0,0 +1,336 @@
+### function.predicates
+
+> Functions which return whether the input meets a condition.
+
+--------------------------------------------------------------------------------
+
+#### isAssociative
+
+**Signature:** `isAssociative(value:Any)`
+
+Returns a boolean indicating whether or not the value is an associative object.
+An associative object is one where its elements can be accessed via a key or
+index (e.g. arrays, `arguments`, objects).
+
+```javascript
+_.isAssociative(["Athens", "Sparta"]);
+// => true
+
+_.isAssociative(42);
+// => false
+```
+--------------------------------------------------------------------------------
+
+#### isDecreasing
+
+**Signature:** `_.isDecreasing(values:Any...)`
+
+Checks whether the arguments are monotonically decreasing values (i.e. whether
+each argument is less than the previous argument.)
+
+```javascript
+_.isDecreasing(3, 2, 1);
+// => true
+
+_.isDecreasing(15, 12, 2);
+// => true
+
+_.isDecreasing(2, 3);
+// => false
+```
+
+--------------------------------------------------------------------------------
+
+#### isEven
+
+**Signature:** `_.isEven(value:Any)`
+
+Checks whether the value is an even number.
+
+```javascript
+_.isEven(12);
+// => true
+
+_.isEven(3);
+// => false
+
+_.isEven({});
+// => false
+```
+
+--------------------------------------------------------------------------------
+
+#### isFloat
+
+**Signature:** `_.isFloat(value:Any)`
+
+Checks whether the value is a "float." For the purposes of this function, a float
+is a numeric value that is not an integer. A numeric value may be a number, a
+string containing a number, a `Number` object, etc.
+
+**NOTE:** JavaScript itself makes no distinction between integers and floats. For
+the purposes of this function both `1` and `1.0` are considered integers.
+
+```javascript
+_.isFloat(1.1);
+// => true
+
+_.isFloat(1);
+// => false
+
+_.isFloat(1.0);
+// => false
+
+_.isFloat("2.15");
+// => true
+```
+
+--------------------------------------------------------------------------------
+
+#### isIncreasing
+
+**Signature:** `_.isIncreasing(value:Any...)`
+
+Checks whether the arguments are monotonically increasing values (i.e. each
+argument is greater than the previous argument.)
+
+```javascript
+_.isIncreasing(1, 12, 15);
+// => true
+
+_.isIncreasing(1);
+// => true
+
+_.isIncreasing(5, 4);
+// => false
+```
+
+--------------------------------------------------------------------------------
+
+#### isIndexed
+
+**Signature:** `_.isIndexed(value:Any)`
+
+Checks whether the value is "indexed." An indexed value is one which accepts a
+numerical index to access its elements. (e.g. arrays and strings)
+
+**NOTE:** Underscore does not support cross-browser consistent use of strings as
+array-like values, so be wary in IE 8 when using string objects and in IE7 and
+earlier when using string literals & objects.
+
+```javascript
+_.isIndexed("Socrates");
+// => true
+
+_.isIndexed({poison: "hemlock"});
+// => false
+```
+
+--------------------------------------------------------------------------------
+
+#### isInstanceOf
+
+**Signature:** `_.isInstanceOf(value:Any, constructor:Function)`
+
+Checks whether the value is an instance of the constructor.
+
+```javascript
+_.isInstanceOf(new Date(), Date);
+// => true
+
+_.isInstanceOf("Hippocrates", RegExp);
+// => false
+```
+
+--------------------------------------------------------------------------------
+
+#### isInteger
+
+**Signature:** `_.isInteger(value:Any)`
+
+Checks whether the value is a numeric integer. A numeric value can be a string
+containing a number, a `Number` object, etc.
+
+```javascript
+_.isInteger(18);
+// => true
+
+_.isInteger("18");
+// => true
+
+_.isInteger(2.5);
+// => false
+
+_.isInteger(-1);
+// => true
+```
+
+--------------------------------------------------------------------------------
+
+#### isJSON
+
+**Signature:** `_.isJSON(value:Any)`
+
+Checks whether the value is valid JSON. [See the spec](http://www.json.org/) for
+more information on what constitutes valid JSON.
+
+**NOTE:** This function relies on `JSON.parse` which is not available in IE7 and
+earlier.
+
+```javascript
+_.isJSON('{ "name": "Crockford" }');
+// => true
+
+_.isJSON({ name: "Crocket" });
+// => false
+```
+
+--------------------------------------------------------------------------------
+
+#### isNegative
+
+**Signature:** `_.isNegative(value:Any)`
+
+Checks whether the value is a negative number.
+
+```javascript
+_.isNegative(-2);
+// => true
+
+_.isNegative(5);
+// => false
+```
+
+--------------------------------------------------------------------------------
+
+#### isNumeric
+
+**Signature:** `_.isNumeric(value:Any)`
+
+A numeric is something that contains a numeric value, regardless of its type. It
+can be a string containing a numeric value, exponential notation, a `Number`
+object, etc.
+
+```javascript
+_.isNumeric("14");
+// => true
+
+_.isNumeric("fourteen");
+// => false
+```
+
+--------------------------------------------------------------------------------
+
+#### isOdd
+
+**Signature:** `_.isOdd(value:Any)`
+
+Checks whether the value is an odd number.
+
+```javascript
+_.isOdd(3);
+// => true
+
+_.isOdd(2);
+// => false
+
+_.isOdd({});
+// => false
+```
+
+--------------------------------------------------------------------------------
+
+#### isPlainObject
+
+**Signature:** `_.isPlainObject(value:Any);`
+
+Checks whether the value is a "plain" object created as an object literal (`{}`)
+or explicitly constructed with `new Object()`. Instances of other constructors
+are **not** plain objects.
+
+```javascript
+_.isPlainObject({});
+// => true
+
+_.isPlainObject(new Date());
+// => false
+
+_.isPlainObject([]);
+// => false
+```
+
+--------------------------------------------------------------------------------
+
+#### isPositive
+
+**Signature:** `_.isPositive(value:Any)`
+
+Checks whether the value is a positive number.
+
+```javascript
+_.isPositive(21);
+// => true
+
+_.isPositive(-3);
+// => false
+```
+
+--------------------------------------------------------------------------------
+
+#### isSequential
+
+**Signature:** `_.isSequential(value:Any)`
+
+Checks whether the value is a sequential composite type (i.e. arrays and
+`arguments`).
+
+```javascript
+_.isSequential(["Herodotus", "Thucidydes");
+// => true
+
+_.isSequential(new Date);
+// => false
+```
+
+--------------------------------------------------------------------------------
+
+#### isValidDate
+
+**Signature:** `_.isValidDate(value:Any)`
+
+Checks whether the value is a valid date. That is, the value is both an instance
+of `Date` and it represents an actual date.
+
+Warning: This function does not verify
+whether the original input to `Date` is a real date. For instance,
+`new Date("02/30/2014")` is considered a valid date because `Date` coerces that
+into a representation of 03/02/2014. To validate strings representing a date,
+consider using a date/time library like [Moment.js.][momentjs]
+
+```javascript
+_.isValidDate(new Date("January 1, 1900"));
+// => true
+
+_.isValidDate(new Date("The Last Great Time War"));
+// => false
+```
+
+--------------------------------------------------------------------------------
+
+#### isZero
+
+**Signature:** `_.isZero(value:Any)`
+
+Checks whether the value is `0`.
+
+```javascript
+_.isZero(0);
+// => true
+
+_.isZero("Pythagoras");
+// => false
+```
+
+--------------------------------------------------------------------------------
+
+[momentjs]:http://momentjs.com/
\ No newline at end of file
diff --git a/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/docs/underscore.object.builders.js.md b/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/docs/underscore.object.builders.js.md
new file mode 100644
index 0000000..4f328b5
--- /dev/null
+++ b/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/docs/underscore.object.builders.js.md
@@ -0,0 +1,100 @@
+### object.builders
+
+> Functions to build objects.
+
+--------------------------------------------------------------------------------
+
+#### frequencies
+
+**Signature:** `_.frequencies(arr:Array)`
+
+Returns an object whose property keys are the values of `arr`'s elements. The
+property values are a count of how many times that value appeared in `arr`.
+
+```javascript
+var citations = ["Plato", "Aristotle", "Plotinus", "Plato"];
+
+_.frequencies(citations);
+// => { Plato: 2, Aristotle: 1, Plotinus: 1 }
+```
+
+--------------------------------------------------------------------------------
+
+#### merge
+
+**Signature:** `_.merge(obj1:Object[, obj:Object...])`
+
+Merges two or more objects starting with the left-most and applying the keys
+rightward.
+
+```javascript
+_.merge({ a: "alpha" }, { b: "beta" });
+// => { a: "alpha", b: "beta" }
+```
+
+--------------------------------------------------------------------------------
+
+#### renameKeys
+
+**Signature:** `_.renameKeys(obj:Object, keyMap:Object)`
+
+Takes an object (`obj`) and a map of keys (`keyMap`) and returns a new object
+where the keys of `obj` have been renamed as specified in `keyMap`.
+
+```javascript
+_.renameKeys({ a: 1, b: 2 }, { a: "alpha", b: "beta" });
+// => { alpha: 1, beta: 2 }
+```
+
+--------------------------------------------------------------------------------
+
+#### setPath
+
+**Signature:** `_.setPath(obj:Object, value:Any, ks:Array, defaultValue:Any)`
+
+Sets the value of a property at any depth in `obj` based on the path described
+by the `ks` array. If any of the properties in the `ks` path don't exist, they
+will be created with `defaultValue`.
+
+```javascript
+_.setPath({}, "Plotinus", ["Platonism", "Neoplatonism"], {});
+// => { Platonism: { Neoplatonism: "Plotinus" } }
+```
+
+--------------------------------------------------------------------------------
+
+#### snapshot
+
+**Signature:** `_.snapshot(obj:Object)`
+
+Snapshots/clones an object deeply.
+
+```javascript
+var schools = { plato: "Academy", aristotle: "Lyceum" };
+
+_.snapshot(schools);
+// => { plato: "Academy", aristotle: "Lyceum" }
+
+schools === _.snapshot(schools);
+// => false
+```
+
+--------------------------------------------------------------------------------
+
+**Signature:** `_.updatePath(obj:Object, fun:Function, ks:Array, defaultValue:Any)`
+
+Updates the value at any depth in a nested object based on the path described by
+the `ks` array. The function `fun` is called with the current value and is
+expected to return a replacement value. If no keys are provided, then the
+object itself is presented to `fun`. If a property in the path is missing, then
+it will be created with `defaultValue`.
+
+```javascript
+var imperialize = function (val) {
+ if (val == "Republic) return "Empire";
+ else return val;
+};
+
+_.updatePath({ rome: "Republic" }, imperialize, ["rome"]);
+// => { rome: "Empire" }
+```
diff --git a/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/docs/underscore.object.selectors.js.md b/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/docs/underscore.object.selectors.js.md
new file mode 100644
index 0000000..2143358
--- /dev/null
+++ b/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/docs/underscore.object.selectors.js.md
@@ -0,0 +1,184 @@
+### object.selectors
+
+> Functions to select values from an object.
+
+--------------------------------------------------------------------------------
+
+#### accessor
+
+**Signature:** `_.accessor(field:String)`
+
+Returns a function that will attempt to look up a named field in any object
+that it is given.
+
+```javascript
+var getName = _.accessor('name');
+
+getName({ name: 'Seneca' });
+// => 'Seneca'
+```
+
+--------------------------------------------------------------------------------
+
+#### dictionary
+
+**Signature:** `_.dictionary(obj:Object)`
+
+Given an object, returns a function that will attempt to look up a field that
+it is given.
+
+```javascript
+var generals = {
+ rome: "Scipio",
+ carthage: "Hannibal"
+};
+
+var getGeneralOf = _.dictionary(generals);
+
+_.getGeneralOf("rome");
+// => "Scipio"
+```
+
+--------------------------------------------------------------------------------
+
+#### getPath
+
+**Signature:** `_.getPath(obj:Object, ks:String|Array)`
+
+Gets the value at any depth in a nested object based on the path described by
+the keys given. Keys may be given as an array or as a dot-separated string.
+Returns `undefined` if the path cannot be reached.
+
+```javascript
+var countries = {
+ greece: {
+ athens: {
+ playwright: "Sophocles"
+ }
+ }
+ }
+};
+
+_.getPath(countries, "greece.athens.playwright");
+// => "Sophocles"
+
+_.getPath(countries, "greece.sparta.playwright");
+// => undefined
+
+_.getPath(countries, ["greece", "athens", "playwright"]);
+// => "Sophocles"
+
+_.getPath(countries, ["greece", "sparta", "playwright"]);
+// => undefined
+```
+
+--------------------------------------------------------------------------------
+
+#### hasPath
+
+**Signature:** `_.hasPath(obj:Object, ks:String|Array)`
+
+Returns a boolean indicating whether there is a property at the path described
+by the keys given. Keys may be given as an array or as a dot-separated string.
+
+```javascript
+var countries = {
+ greece: {
+ athens: {
+ playwright: "Sophocles"
+ }
+ }
+ }
+};
+
+_.hasPath(countries, "greece.athens.playwright");
+// => true
+
+_.hasPath(countries, "greece.sparta.playwright");
+// => false
+
+_.hasPath(countries, ["greece", "athens", "playwright"]);
+// => true
+
+_.hasPath(countries, ["greece", "sparta", "playwright"]);
+// => false
+```
+
+--------------------------------------------------------------------------------
+
+#### kv
+
+**Signature:** `_.kv(obj:Object, key:String)`
+
+Returns the key/value pair for a given property in an object, undefined if not found.
+
+```javascript
+var playAuthor = {
+ "Medea": "Aeschylus"
+};
+
+_.kv(playAuthor, "Medea");
+// => ["Medea", "Aeschylus"]
+
+_.kv(playAuthor, "Hamlet");
+// => undefined
+```
+
+--------------------------------------------------------------------------------
+
+#### omitWhen
+
+**Signature:** `_.omitWhen(obj, pred:Function)`
+
+Returns a copy of `obj` omitting any properties that the predicate (`pred`)
+function returns `true` for. The predicat function is invoked with each
+property value, like so: `pred(propValue)`.
+
+```javascript
+var playwrights = {
+ euripedes: "Greece",
+ shakespere: "England"
+};
+
+_.omitWhen(obj, function (country) { return country == "England" });
+// => { euripedes: "Greece" }
+```
+
+--------------------------------------------------------------------------------
+
+#### pickWhen
+
+**Signature:** `_.pickWhen(obj:Object, pred:Function)`
+
+Returns a copy of `obj` containing only properties that the predicate (`pred`)
+function returns `true` for. The predicate function is invoked with each
+property value, like so: `pred(propValue)`.
+
+```javascript
+var playwrights = {
+ euripedes: "Greece",
+ shakespere: "England"
+};
+
+_.pickWhen(obj, function (country) { return country == "England" });
+// => { shakespeare: "England" }
+```
+
+--------------------------------------------------------------------------------
+
+#### selectKeys
+
+**Signature:** `_.selectKeys(obj:Object, ks:Array);
+
+Returns a copy of `obj` containing only the properties listed in the `ks` array.
+
+```javascript
+var philosopherCities = {
+ Philo: "Alexandria",
+ Plato: "Athens",
+ Plotinus: "Rome"
+}
+
+_.selectKeys(philosopherCities, ["Plato", "Plotinus"]);
+// => { Plato: "Athens", Plotinus: "Rome" }
+```
diff --git a/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/docs/underscore.util.existential.js.md b/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/docs/underscore.util.existential.js.md
new file mode 100644
index 0000000..d5ca10a
--- /dev/null
+++ b/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/docs/underscore.util.existential.js.md
@@ -0,0 +1,118 @@
+### util.existential
+
+> Functions which deal with whether a value "exists."
+
+--------------------------------------------------------------------------------
+
+#### exists
+
+**Signature:** `_.exists(value:Any)`
+
+Checks whether or not the value is "existy." Both `null` and `undefined` are
+considered non-existy values. All other values are existy.
+
+```javascript
+_.exists(null);
+// => false
+
+_.exists(undefined);
+// => false
+
+_.exists({});
+// = > true
+
+_.exists("Sparta");
+// => true
+```
+
+--------------------------------------------------------------------------------
+
+#### falsey
+
+**Signature:** `_.falsey(value:Any)`
+
+Checks whether the value is falsey. A falsey value is one which coerces to
+`false` in a boolean context.
+
+```javascript
+_.falsey(0);
+// => true
+
+_.falsey("");
+// => true
+
+_.falsey({});
+// => false
+
+_.falsey("Corinth");
+// => false
+```
+
+--------------------------------------------------------------------------------
+
+#### firstExisting
+
+**Signature:** `_.firstExisting(value:Any[, value:Any...])`
+
+Returns the first existy argument from the argument list.
+
+```javascript
+_.firstExisting("Socrates", "Plato");
+// => "Socrates"
+
+_.firstExisting(null, undefined, "Heraclitus");
+// => "Heraclitus"
+```
+
+--------------------------------------------------------------------------------
+
+#### not
+
+**Signature:** `_.not(value:Any)`
+
+Returns a boolean which is the opposite of the truthiness of the original value.
+
+```javascript
+_.not(0);
+// => true
+
+_.not(1);
+// => false
+
+_.not(true);
+// => false
+
+_.not(false);
+// => true
+
+_.not({});
+// => false
+
+_.not(null);
+// => true
+```
+
+--------------------------------------------------------------------------------
+
+#### truthy
+
+**Signature:** `_.truthy(value:Any)`
+
+Checks whether the value is truthy. A truthy value is one which coerces to
+`true` in a boolean context.
+
+```javascript
+_.truthy({});
+// => true
+
+_.truthy("Athens");
+// => true
+
+_.truthy(0);
+// => false
+
+_.truthy("");
+// => false
+```
+
+--------------------------------------------------------------------------------
\ No newline at end of file
diff --git a/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/docs/underscore.util.operators.js.md b/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/docs/underscore.util.operators.js.md
new file mode 100644
index 0000000..027c88f
--- /dev/null
+++ b/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/docs/underscore.util.operators.js.md
@@ -0,0 +1,422 @@
+### util.operators
+
+> Functions which wrap JavaScript's operators.
+
+--------------------------------------------------------------------------------
+
+#### add
+
+**Signature:** `_.add(value:Number, value:Number[, value:Number...])`
+
+Returns the sum of the arguments.
+
+```javascript
+_.add(1, 2, 3, 4);
+// => 10
+```
+
+--------------------------------------------------------------------------------
+
+#### bitwiseAnd
+
+**Signature:** `_.bitwiseAnd(value:Any, value:Any[, value:Any...])`
+
+Returns the result of using the `&` operator on the arguments.
+
+```javascript
+_.bitwiseAnd(1, 3);
+// => 1
+
+_.bitwiseAnd(1, 3, 2);
+// => 0
+```
+
+--------------------------------------------------------------------------------
+
+#### bitwiseLeft
+
+**Signature:** `_.bitwiseLeft(value:Any, value:Any[, value:Any...])`
+
+Returns the result of using the `<<` operator on the arguments.
+
+```javascript
+_.bitwiseLeft(1, 3);
+// => 8
+
+_.bitwiseLeft(1, 3, 2);
+// => 32
+```
+
+--------------------------------------------------------------------------------
+
+#### bitwiseRight
+
+**Signature:** `_.bitwiseRight(value:Any, value:Any[, value:Any...])`
+
+Returns the result of using the `>>` operator on the arguments.
+
+```javascript
+_.bitwiseRight(3, 1);
+// => 1
+
+_.bitwiseRight(3, 1, 3);
+// => 0
+```
+
+--------------------------------------------------------------------------------
+
+#### bitwiseNot
+
+**Signature:** `_.bitwiseNot(value:Any)`
+
+Returns the result of using the `~` operator on the value.
+
+```javascript
+_.bitwiseNot(1);
+// => -2
+
+_.bitwiseOr(2);
+// => -3
+```
+
+--------------------------------------------------------------------------------
+
+#### bitwiseOr
+
+**Signature:** `_.bitwiseOr(value:Any, value:Any[, value:Any...])`
+
+Returns the result of using the `|` operator on the arguments.
+
+```javascript
+_.bitwiseOr(1, 3);
+// => 3
+
+_.bitwiseOr(1, 3, 4);
+// => 7
+```
+
+--------------------------------------------------------------------------------
+
+#### bitwiseXor
+
+**Signature:** `_.bitwiseXor(value:Any, value:Any[, value:Any...])`
+
+Returns the result of using the `^` operator on the arguments.
+
+```javascript
+_.bitwiseXor(1, 3);
+// => 2
+
+_.bitwiseXor(1, 3, 3);
+// => 1
+```
+
+--------------------------------------------------------------------------------
+
+#### bitwiseZ
+
+**Signature:** `_.bitwiseZ(value:Any, value:Any[, value:Any...])`
+
+Returns the result of using the `>>>` operator on the arguments.
+
+```javascript
+_.bitwiseZ(72, 32);
+// => 72
+
+_.bitwiseZ(72, 32, 2);
+// => 18
+```
+
+--------------------------------------------------------------------------------
+
+#### dec
+
+**Signature:** `_.dec(value:Number)`
+
+Returns the result of decrementing the value by `1`.
+
+```javascript
+_.dec(2);
+// => 1
+```
+
+--------------------------------------------------------------------------------
+
+#### div
+
+**Signature:** `_.div(value:Number, value:Number[, value:Number...])`
+
+Returns the quotient of the arguments.
+
+```javascript
+_.div(8, 2);
+// => 4
+
+_.div(8, 2, 2);
+// => 2
+```
+
+--------------------------------------------------------------------------------
+
+#### eq
+
+**Signature:** `_.eq(value:Any, value:Any[, value:Any...])`
+
+Compares the arguments with loose equality (`==`).
+
+```javascript
+_.eq(1, "1");
+// => true
+
+_.eq(1, 15);
+// => false
+
+_.eq(1, true, "1");
+// => true
+
+_.eq(1, 1, 15);
+// => false
+```
+
+--------------------------------------------------------------------------------
+
+#### gt
+
+**Signature:** `_.gt(value:Any, value:Any[, value:Any...])`
+
+Checks whether each argument is greater than the previous argument.
+
+```javascript
+_.gt(1, 2);
+// => true
+
+_.gt(1, 2, 3);
+// => true
+
+_.gt(1, 6, 2);
+// => false
+
+```
+
+--------------------------------------------------------------------------------
+
+#### gte
+
+**Signature:** `_.gte(value:Any, value:Any[, value:Any...])`
+
+Checks whether each argument is greater than or equal to the previous argument.
+
+```javascript
+_.gte(1, 2);
+// => true
+
+_.gte(1, 1, 3);
+// => true
+
+_.gte(1, 6, 2);
+// => false
+
+```
+
+--------------------------------------------------------------------------------
+
+#### inc
+
+**Signature:** `_.inc(value:Number)`
+
+Returns the result of incrementing the value by `1`.
+
+```javascript
+_.inc(2);
+// => 3
+```
+
+--------------------------------------------------------------------------------
+
+#### lt
+
+**Signature:** `_.lt(value:Any, value:Any[, value:Any...])`
+
+Checks whether each argument is less than the previous argument.
+
+```javascript
+_.lt(2, 1);
+// => true
+
+_.lt(2, 1, 0);
+// => true
+
+_.lt(2, 1, 12);
+// => false
+
+```
+
+--------------------------------------------------------------------------------
+
+#### lte
+
+**Signature:** `_.lte(value:Any, value:Any[, value:Any...])`
+
+Checks whether each argument is less than or equal to the previous argument.
+
+```javascript
+_.lte(2, 1);
+// => true
+
+_.lte(2, 1, 1);
+// => true
+
+_.lte(2, 1, 12);
+// => false
+
+```
+
+--------------------------------------------------------------------------------
+
+#### mul
+
+**Signature:** `_.mul(value:Number, value:Number[, value:Number...])`
+
+Returns the product of the arguments.
+
+```javascript
+_.mul(1, 2, 3, 4);
+// => 24
+```
+
+--------------------------------------------------------------------------------
+
+#### mod
+
+**Signature:** `_.mod(dividend:Number, divisor:Number)`
+
+Returns the remainder of dividing `dividend` by `divisor`.
+
+```javascript
+_.mod(26, 5);
+// => 1
+
+_.mod(14, 3);
+// => 2
+```
+
+--------------------------------------------------------------------------------
+
+#### neg
+
+**Signature:** `_.neg(num:Number)`
+
+Returns a new number with the opposite sign value of `num`.
+
+```javascript
+_.neg(5);
+// => -5
+
+_.neg(-3);
+// => 3
+```
+
+--------------------------------------------------------------------------------
+
+#### neq
+
+**Signature:** `_.neq(value:Any, value:Any[, value:Any...])`
+
+Checks whether each argument is not equal to the previous argument, using loose
+inequality (`!=`).
+
+```javascript
+_.neq(2, 1);
+// => true
+
+_.neq(2, 1, 1);
+// => true
+
+_.neq(1, 1);
+// => false
+
+```
+
+--------------------------------------------------------------------------------
+
+#### not
+
+**Signature:** `_.not(value:Any)`
+
+Returns a boolean which is the opposite of the truthiness of the original value.
+
+```javascript
+_.not(0);
+// => true
+
+_.not(1);
+// => false
+
+_.not(true);
+// => false
+
+_.not(false);
+// => true
+
+_.not({});
+// => false
+
+_.not(null);
+// => true
+```
+
+--------------------------------------------------------------------------------
+
+#### seq
+
+**Signature:** `_.seq(value:Any, value:Any[, value:Any...])`
+
+Checks whether the arguments are strictly equal (`===`) to each other.
+
+```javascript
+_.seq(2, 2);
+// => true
+
+_.seq(2, "2");
+// => false
+
+_.seq(2, 2, 2);
+// => true
+
+```
+
+--------------------------------------------------------------------------------
+
+#### sneq
+
+**Signature:** `_.sneq(value:Any, value:Any[, value:Any...])`
+
+Checks whether the arguments are strictly not equal (`!==`) to each other.
+
+```javascript
+_.sneq(2, 2);
+// => false
+
+_.sneq(2, "2");
+// => true
+
+_.sneq(2, 2, 2);
+// => false
+
+```
+
+--------------------------------------------------------------------------------
+
+#### sub
+
+**Signature:** `_.sub(value:Number, value:Number[, value:Number...])`
+
+Returns the difference of the arguments.
+
+```javascript
+_.sub(10, 3);
+// => 7
+
+_.sub(10, 3, 5);
+// => 2
+```
\ No newline at end of file
diff --git a/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/docs/underscore.util.strings.js.md b/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/docs/underscore.util.strings.js.md
new file mode 100644
index 0000000..7a1112d
--- /dev/null
+++ b/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/docs/underscore.util.strings.js.md
@@ -0,0 +1,98 @@
+### util.strings
+
+> Functions for working with strings.
+
+--------------------------------------------------------------------------------
+
+#### camelCase
+
+**Signature:** `_.camelCase(string:String)`
+
+Converts a dash-separated string to camel case. Opposite of [toDash](#todash).
+
+```javascript
+_.camelCase("ancient-greece");
+// => "ancientGreece"
+```
+
+--------------------------------------------------------------------------------
+
+#### explode
+
+**Signature:** `_.explode(s:String)`
+
+Explodes a string into an array of characters. Opposite of [implode](#implode).
+
+```javascript
+_.explode("Plato");
+// => ["P", "l", "a", "t", "o"]
+```
+
+--------------------------------------------------------------------------------
+
+#### fromQuery
+
+**Signature:** `_.fromQuery(str:String)`
+
+Takes a URL query string and converts it into an equivalent JavaScript object.
+Opposite of [toQuery](#toquery)
+
+```javascript
+_.fromQuery("forms%5Bperfect%5D=circle&forms%5Bimperfect%5D=square");
+// => { forms: { perfect: "circle", imperfect: "square" } }
+```
+
+--------------------------------------------------------------------------------
+
+#### implode
+
+**Signature:** `_.implode(a:Array)`
+
+Implodes an array of strings into a single string. Opposite of [explode](#explode).
+
+```javascript
+_.implode(["H", "o", "m", "e", "r"]);
+// => "Homer"
+```
+
+--------------------------------------------------------------------------------
+
+#### strContains
+
+**Signature:** `_.strContains(str:String, search:String)`
+
+Reports whether a string contains a search string.
+
+```javascript
+_.strContains("Acropolis", "polis");
+// => true
+```
+
+--------------------------------------------------------------------------------
+
+#### toDash
+
+**Signature:** `_.toDash(string:String)`
+
+Converts a camel case string to a dashed string. Opposite of [camelCase](#camelcase).
+
+```javascript
+_.toDash("thisIsSparta");
+// => "this-is-sparta"
+```
+
+--------------------------------------------------------------------------------
+
+#### toQuery
+
+**Signature:** `_.toQuery(obj:Object)`
+
+Takes an object and converts it into an equivalent URL query string. Opposite
+of [fromQuery](#fromquery).
+
+```javascript
+_.toQuery({ forms: { perfect: "circle", imperfect: "square" } });
+// => "forms%5Bperfect%5D=circle&forms%5Bimperfect%5D=square"
+```
+
+--------------------------------------------------------------------------------
\ No newline at end of file
diff --git a/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/docs/underscore.util.trampolines.js.md b/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/docs/underscore.util.trampolines.js.md
new file mode 100644
index 0000000..4ec7eb8
--- /dev/null
+++ b/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/docs/underscore.util.trampolines.js.md
@@ -0,0 +1,10 @@
+### util.trampolines
+
+> Trampoline functions.
+
+Documentation should use [Journo](https://github.com/jashkenas/journo) formats and standards.
+
+ done: function(value) {
+ trampoline: function(fun /*, args */) {
+
+--------------------------------------------------------------------------------
\ No newline at end of file
diff --git a/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/examples/walk-examples.js.md b/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/examples/walk-examples.js.md
new file mode 100644
index 0000000..4569c5b
--- /dev/null
+++ b/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/examples/walk-examples.js.md
@@ -0,0 +1,129 @@
+Examples for _.walk
+===================
+
+The _.walk module (underscore.collections.walk.js) provides implementations of
+the [Underscore collection functions](http://underscorejs.org/#collections)
+that are specialized for operating on nested JavaScript objects that form
+trees.
+
+Basic Traversal
+---------------
+
+The most basic operation on a tree is to iterate through all its nodes, which
+is provided by `_.walk.preorder` and `_.walk.postorder`. They can be used in
+much the same way as [Underscore's 'each' function][each]. For example, take
+a simple tree:
+
+[each]: http://underscorejs.org/#each
+
+ var tree = {
+ 'name': { 'first': 'Bucky', 'last': 'Fuller' },
+ 'occupations': ['designer', 'inventor']
+ };
+
+We can do a preorder traversal of the tree:
+
+ _.walk.preorder(tree, function(value, key, parent) {
+ console.log(key + ': ' + value);
+ });
+
+which produces the following output:
+
+ undefined: [object Object]
+ name: [object Object]
+ first: Bucky
+ last: Fuller
+ occupations: designer,inventor
+ 0: designer
+ 1: inventor
+
+A preorder traversal visits the nodes in the tree in a top-down fashion: first
+the root node is visited, then all of its child nodes are recursively visited.
+`_.walk.postorder` does the opposite, calling the visitor function for a node
+only after visiting all of its child nodes.
+
+Collection Functions
+--------------------
+
+The \_.walk module provides versions of most of the
+[Underscore collection functions](http://underscorejs.org/#collections), with
+some small differences that make them better suited for operating on trees. For
+example, you can use `_.walk.filter` to get a list of all the strings in a tree:
+
+ _.walk.filter(_.walk.preorder, _.isString);
+
+Like many other functions in _.walk, the argument to `filter` is a function
+indicating in what order the nodes should be visited. Currently, only
+`preorder` and `postorder` are supported.
+
+Custom Walkers
+--------------
+
+Sometimes, you have a tree structure that can't be naively traversed. A good
+example of this is a DOM tree: because each element has a reference to its
+parent, a naive walk would encounter circular references. To handle such cases,
+you can create a custom walker by invoking `_.walk` as a function, and passing
+it a function which returns the descendants of a given node. E.g.:
+
+ var domWalker = _.walk(function(el) {
+ return el.children;
+ });
+
+The resulting object has the same functions as `_.walk`, but parameterized
+to use the custom walking behavior:
+
+ var buttons = domWalker.filter(_.walk.preorder, function(el) {
+ return el.tagName === 'BUTTON';
+ });
+
+However, it's not actually necessary to create custom walkers for DOM nodes --
+_.walk handles DOM nodes specially by default.
+
+Parse Trees
+-----------
+
+A _parse tree_ is tree that represents the syntactic structure of a formal
+language. For example, the arithmetic expression `1 + (4 + 2) * 7` might have the
+following parse tree:
+
+ var tree = {
+ 'type': 'Addition',
+ 'left': { 'type': 'Value', 'value': 1 },
+ 'right': {
+ 'type': 'Multiplication',
+ 'left': {
+ 'type': 'Addition',
+ 'left': { 'type': 'Value', 'value': 4 },
+ 'right': { 'type': 'Value', 'value': 2 }
+ },
+ 'right': { 'type': 'Value', 'value': 7 }
+ }
+ };
+
+We can create a custom walker for this parse tree:
+
+ var parseTreeWalker = _.walk(function(node) {
+ return _.pick(node, 'left', 'right');
+ });
+
+Using the `find` function, we could find the first occurrence of the addition
+operator. It uses a pre-order traversal of the tree, so the following code
+will produce the root node (`tree`):
+
+ parseTreeWalker.find(tree, function(node) {
+ return node.type === 'Addition';
+ });
+
+We could use the `reduce` function to evaluate the arithmetic expression
+represented by the tree. The following code will produce `43`:
+
+ parseTreeWalker.reduce(tree, function(memo, node) {
+ if (node.type === 'Value') return node.value;
+ if (node.type === 'Addition') return memo.left + memo.right;
+ if (node.type === 'Multiplication') return memo.left * memo.right;
+ });
+
+When the visitor function is called on a node, the `memo` argument contains
+the results of calling `reduce` on each of the node's subtrees. To evaluate a
+node, we just need to add or multiply the results of the left and right
+subtrees of the node.
diff --git a/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/index.html b/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/index.html
new file mode 100644
index 0000000..8803096
--- /dev/null
+++ b/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/index.html
@@ -0,0 +1,1993 @@
+
+
+
+
+
+
+
+
+Underscore-contrib (0.3.0)
+
+The brass buckles on Underscore's utility belt - a contributors' library for Underscore.
+
+
+
+
+
+While Underscore provides a bevy of useful tools to support functional programming in JavaScript, it can't
+(and shouldn't) be everything to everyone. Underscore-contrib is intended as a home for functions that, for
+various reasons, don't belong in Underscore proper. In particular, it aims to be:
+
+- a home for functions that are limited in scope, but solve certain point problems, and
+- a proving ground for features that belong in Underscore proper, but need some advocacy and/or evolution
+(or devolution) to get them there.
+
+
+
+First, you'll need Underscore version 1.6.0 or higher. Then you can grab the relevant underscore-contrib sub-libraries and simply add something like
+the following to your pages:
+<script type="text/javascript" src="underscore.js"></script>
+<script type="text/javascript" src="underscore.object.builders.js"></script>
+At the moment there are no cross-contrib dependencies (i.e. each sub-library
+can stand by itself), but that may change in the future.
+
+Using contrib in Node is very simple. Just install it with npm:
+npm install underscore-contrib --save
+Then require it within your project like so:
+var _ = require('underscore-contrib');
+The _
variable will be a copy of Underscore with contrib's methods already
+mixed in.
+
+_.contrib is open sourced under the MIT license.
+
+The _.contrib library currently contains a number of related capabilities, aggregated into the following files.
+
+The links above are to the annotated source code. Full-blown _.contrib documentation is in the works. Contributors welcomed.
+
+
+Functions to build arrays. View Annotated Source
+
+
+
+Signature: _.cat(... arrays:Array ...)
+The _.cat
function provides a way to concatenate zero or more heterogeneous arrays into one.
+_.cat(); // 0-args
+//=> []
+
+_.cat([]); // 1-arg, empty array
+//=> []
+
+_.cat([1,2,3]); // 1-arg
+//=> [1,2,3]
+
+_.cat([1,2,3],[4,5,6]); // 2-args
+//=> [1,2,3,4,5,6]
+
+_.cat([1,2,3],[4,5,6],[7]); // 3+ args
+//=> [1,2,3,4,5,6,7]
+Not every argument to _.cat
needs to be an array; other types are accepted.
+Signature: _.cat(... elems:Any ...)
+_.cat(1,[2],3,4); // mixed args
+//=> [1,2,3,4]
+The _.cat
function will also work with the arguments
object as if it were an array.
+Signature: _.cat(... elems:Arguments ...)
+function f(){ return _.cat(arguments, 4,5,6); }
+
+f(1,2,3);
+//=> [1,2,3,4,5,6]
+
+
+The _.chunk
function, by default, accepts an array and a number and splits and returns a new array representing the original array split into some number of arrays of the given size:
+_.chunk([0,1,2,3], 2);
+//=> , [[0,1],[2,3]]
+If the original array cannot completely fulfill the chunk scheme then the array returned will drop the undersized final chunk:
+_.chunk([0,1,2,3,4], 2);
+//=> , [[0,1],[2,3]]
+You can pass an optional third argument to _.chunk
to pad out the final array chunk should it fall short. If the value given as the third argument is not an array then it is repeated the needed number of times:
+_.chunk([0,1,2,3,4], 3, '_');
+//=> , [[0,1,2],[3,'_','_']]
+If you given an array as the optional third argument then that array is used to pad in-place as needed:
+_.chunk([0,1,2,3,4], 3, ['a', 'b']);
+//=> , [[0,1,2],[3,'a','b']]
+
+
+The _.chunkAll
function is similar to _.chunk
except for the following. First, _.chunkAll
will never drop short chunks from the end:
+_.chunkAll([0,1,2,3,4], 3);
+//=> , [[0,1,2],[3]]
+Also, _.chunkAll
takes an optional third argument signifying that paritions should be built from skipped regions:
+_.chunkAll(_.range(1), 2, 4);
+//=> [[0,1],[4,5],[8,9]]
+
+
+Signature: _.cons(head:Any, tail:Array)
+The _.cons
function provides a way to "construct" a new array by taking some element and putting it at the front of another array.
+_.cons(0, []);
+//=> [0]
+
+_.cons(1, [2]);
+//=> [1,2]
+
+_.cons([0], [1,2,3]);
+//=> [0,1,2,3]
+The _.cons
function also can be used to create pairs if the second argument is not an array.
+Signature: _.cons(head:Any, tail:Any)
+_.cons(1, 2);
+//=> [1,2]
+
+_.cons([1], 2);
+//=> [[1],2]
+Finally, _.cons
will operate with the arguments
object.
+Signature: _.cons(head:Any, tail:Arguments)
+function f() { return _.cons(0, arguments) }
+
+f(1,2,3);
+//=> [0,1,2,3]
+
+
+The _.cycle
function takes an integer value used to build an array of that size containing the number of iterations through the given array, strung end-to-end as many times as needed. An example is probably more instructive:
+_.cycle(5, [1,2,3]);
+//=> [1,2,3,1,2]
+
+
+The _.interpose
function takes an array and an element and returns a new array with the given element inserted betwixt every element in the original array:
+_.interpose([1,2,3], 0);
+//=> [1,0,2,0,3]
+If there are no betweens (i.e. empty and single-element arrays), then the original array is returned:
+_.interpose([1], 0);
+//=> [1]
+
+_.interpose([], 0);
+//=> []
+
+
+The _.iterateUntil
function takes a function used as a result generator, a function used as a stop-check and a seed value and returns an array of each generated result. The operation of _.iterateUntil
is such that the result generator is passed the seed to start and each subsequent result which will continue until a result fails the check function (i.e. returns falsey). An example is best:
+var dec = function(n) { return n - 1; };
+var isPos = function(n) { return n > 0; };
+The dec
result generator takes a number and decrements it by one. The isPos
predicate takes a number and returns true
if it's positive. Using these two functions you can build an array of every number from 6
to 0
, inclusive:
+_.iterateUntil(dec, isPos, 6);
+//=> [5,4,3,2,1]
+That is, the array only contains every number from 5
down to 1
because when the result of dec
got to 0
the isPos
check failed (i.e. went falsey) thus terminating the execution.
+
+
+The _.keepIndexed
function takes an array and a function and returns a new array filled with the non-null return results of the given function on the elements or keys in the given array:
+_.keepIndexed([1,2,3], function(k) {
+ return i === 1 || i === 2;
+});
+
+//=> [false, true, true]
+If you return either null
or undefined
then the result is dropped from the resulting array:
+_.keepIndexed(['a','b','c'], function(k, v) {
+ if (k === 1) return v;
+});
+
+//=> ['b']
+
+
+There are times when a mapping operation produces results contained in arrays, but the final result should be flattened one level. For these circumstances you can use _.mapcat
to produce results:
+var array = [1,2,null,4,undefined,6];
+
+var errors = _.mapcat(array, function(e,i) {
+ if (e == null) {
+ return ["Element @" + i + " is bad"];
+ }
+ else {
+ return [];
+ }
+});
+Inspecting the contents of errors
shows:
+["Element @2 is bad", "Element @4 is bad"]
+The _.mapcat
function is equivalent to _.cat.apply(array, _.map(array,fun))
.
+
+
+The _.reductions
function is similar to Underscore's builtin _.reduce
function except that it returns an array of every intermediate value in the folding operation:
+_.reductions([1,2,3,4,5], function(agg, n) {
+ return agg + n;
+}, 0);
+
+//=> [1,3,6,10,15]
+The last element in the array returned from _.reductions
is the answer that you would get if you had just chosen to use _.reduce
.
+
+
+Signature: _.repeat(t:Integer, value:Any)
+The _.repeat
function takes an integer value used to build an array of that size containing the value given:
+_.repeat(5, 'a');
+//=> ['a','a','a','a','a']
+
+
+The _.splitAt
function takes an array and a numeric index and returns a new array with two embedded arrays representing a split of the original array at the index provided:
+_.splitAt([1,2,3,4,5], 2);
+//=> [[1,2],[3,4,5]]
+
+_.splitAt([1,2,3,4,5], 0);
+//=> [[],[1,2,3,4,5]]
+The operation of _.splitAt
is safe if the index provided is outside the range of legal indices:
+_.splitAt([1,2,3,4,5], 20000);
+//=> [[1,2,3,4,5],[]]
+
+_.splitAt([1,2,3,4,5], -1000);
+//=> [[],[1,2,3,4,5]]
+
+_.splitAt([], 0);
+//=> [[],[]]
+
+
+The _.takeSkipping
function takes an array and a number and returns a new array containing every nth element in the original array:
+_.takeSkipping(_.range(10), 2);
+//=> [0,2,4,6,8]
+The _.takeSkipping
function is safe against numbers larger or smaller than the array size:
+_.takeSkipping(_.range(10), 100000);
+//=> [0]
+
+_.takeSkipping(_.range(10), -100);
+//=> []
+
+
+The _.weave
function works similarly to _.interpose
(shown above) except that it accepts an array used as the interposition values. In other words, _.weave
takes two arrays and returns a new array with the original elements woven together. An example would help:
+_.weave(['a','b','c'], [1,2,3]);
+//=> ['a',1,'b',2,'c',3]
+The array returned from _.weave
will be as long as the longest array given with the woven entries stopping according to the shortest array:
+_.weave(['a','b','c'], [1]);
+//=> ['a',1,'b','c']
+The _.interleave
function is an alias for _.weave
.
+
+
+
+Functions to take things from arrays. View Annotated Source
+
+
+
+Signature: _.best(array:Array, fun:Function)
+Returns the "best" value in an array based on the result of a given function.
+_.best([1, 2, 3, 4, 5], function(x, y) {
+ return x > y;
+});
+//=> 5
+
+
+Signature: _.dropWhile(array:Array, pred:Function)
+Drops elements for which the given function returns a truthy value.
+_.dropWhile([-2,-1,0,1,2], isNeg);
+//=> [0,1,2]
+
+
+Signature: _.keep(array:Array, fun:Function)
+Returns an array of existy results of a function over a source array.
+_.keep([1, 2, 3, 4, 5], function(val) {
+ if (val % 3 === 0) {
+ return val;
+ }
+});
+// => [3]
+
+
+Signature: _.nth(array:Array, index:Number[, guard:Any])
+The _.nth
function is a convenience for the equivalent array[n]
. The
+optional guard
value allows _.nth
to work correctly as a callback for
+_.map
.
+_.nth(['a','b','c'], 2);
+//=> 'c'
+If given an index out of bounds then _.nth
will return undefined
:
+_.nth(['a','b','c'], 2000);
+//=> undefined
+The _.nth
function can also be used in conjunction with _.map
and _.compact
like so:
+var b = [['a'],['b'],[]];
+
+_.compact(_.map(b, function(e) { return _.nth(e,0) }));
+//=> ['a','b']
+If wrapping a function around _.nth
is too tedious or you'd like to partially apply the index then Underscore-contrib offers any of _.flip2
, _.fix
or rcurry2
to solve this.
+
+
+Signature: _.keep(array:Array, fun:Function)
+Takes an array and partitions it into sub-arrays as the given predicate changes
+truth sense.
+_.partitionBy([1,2,2,3,1,1,5], _.isEven);
+// => [[1],[2,2],[3,1,1,5]]
+
+_.partitionBy([1,2,2,3,1,1,5], _.identity);
+// => [[1],[2,2],[3],[1,1],[5]]
+
+
+Signature: _.second(array:Array, index:Number[, guard:Any])
+The _.second
function is a convenience for the equivalent array[1]
. The
+optional guard
value allows _.second
to work correctly as a callback for
+_.map
.
+_.second(['a','b']);
+//=> 'b'
+
+_.map([['a','b'], _.range(10,20)], _.second);
+//=> ['b',11]
+You can also pass an optional number to the _.second
function to take a number of elements from an array starting with the second element and ending at the given index:
+_.second(_.range(10), 5)
+//=> [1, 2, 3, 4]
+
+
+Signature: _.takeWhile(array:Array, pred:Function)
+The _.takeWhile
function takes an array and a function and returns a new array containing the first n elements in the original array for which the given function returns a truthy value:
+var isNeg = function(n) { return n < 0; };
+
+_.takeWhile([-2,-1,0,1,2], isNeg);
+//=> [-2,-1]
+
+
+Signature: _.third(array:Array, index:Number[, guard:Any])
+The _.third
function is a convenience for the equivalent array[2]
. The
+optional guard
value allows _.third
to work correctly as a callback for
+_.map
.
+_.third(['a','b','c']);
+//=> 'c'
+
+_.map([['a','b','c'], _.range(10,20)], _.third);
+//=> ['c',12]
+You can also pass an optional number to the _.third
function to take a number of elements from an array starting with the third element and ending at the given index:
+_.third(_.range(10), 5)
+//=> [2, 3, 4]
+
+
+
+Functions to recursively walk collections which are trees.
+
+Documentation should use Journo formats and standards.
+ _.walk = walk;
+ postorder: function(obj, visitor, context)
+ preorder: function(obj, visitor, context)
+ walk(obj, visitor, null, context)
+ map: function(obj, strategy, visitor, context)
+ pluck: function(obj, propertyName)
+ pluckRec: function(obj, propertyName)
+ _.walk.collect = _.walk.map;
+
+
+Functions which manipulate the way functions work with their arguments.
+
+
+
+Signature: _.arity(numberOfArgs:Number, fun:Function)
+Returns a new function which is equivalent to fun
, except that the new
+function's length
property is equal to numberOfArgs
. This does not limit
+the function to using that number of arguments. It's only effect is on the
+reported length.
+function addAll() {
+ var sum = 0;
+ for (var i = 0; i < arguments.length; i++) {
+ sum = sum + arguments[i];
+ }
+ return sum;
+}
+
+addAll.length
+// => 0
+
+var addAllWithFixedLength = _.arity(2, addAll);
+
+addAllWithFixedLength.length
+// => 2
+
+addAllWithFixedLength(1, 1, 1, 1);
+// => 4
+
+
+Signature: _.binary(fun:Function)
+Returns a new function which accepts only two arguments and passes these
+arguments to fun
. Additional arguments are discarded.
+function addAll() {
+ var sum = 0;
+ for (var i = 0; i < arguments.length; i++) {
+ sum = sum + arguments[i];
+ }
+ return sum;
+}
+
+var add2 = _.binary(addAll);
+
+add2(1, 1);
+// => 2
+
+add2(1, 1, 1, 1);
+// => 2
+
+
+Signature: _.curry(func:Function[, reverse:Boolean])
+Returns a curried version of func
. If reverse
is true, arguments will be
+processed from right to left.
+function add3 (x, y, z) {
+ return x + y + z;
+}
+
+var curried = _.curry(add3);
+// => function
+
+curried(1);
+// => function
+
+curried(1)(2);
+// => function
+
+curried(1)(2)(3);
+// => 6
+
+
+Signature: _.curry2(fun:Function)
+Returns a curried version of func
, but will curry exactly two arguments, no
+more or less.
+function add2 (a, b) {
+ return a + b;
+}
+
+var curried = _.curry2(add2);
+// => function
+
+curried(1);
+// => function
+
+curried(1)(2);
+// => 3
+
+
+Signature: _.curry3(fun:Function)
+Returns a curried version of func
, but will curry exactly three arguments, no
+more or less.
+function add3 (a, b, c) {
+ return a + b + c;
+}
+
+var curried = _.curry3(add3);
+// => function
+
+curried(1);
+// => function
+
+curried(1)(2);
+// => function
+
+curried(1)(2)(3);
+// => 6
+
+
+Signature: _.fix(fun:Function[, value:Any...])
+Fixes the arguments to a function based on the parameter template defined by
+the presence of values and the _
placeholder.
+function add3 (a, b, c) {
+ return a + b + c;
+}
+
+var fixedFirstAndLast = _.fix(add3, 1, _, 3);
+// => function
+
+fixedFirstAndLast(2);
+// => 6
+
+fixedFirstAndLast(10);
+// => 14
+
+
+Signature: _.quaternary(fun:Function)
+Returns a new function which accepts only four arguments and passes these
+arguments to fun
. Additional arguments are discarded.
+function addAll() {
+ var sum = 0;
+ for (var i = 0; i < arguments.length; i++) {
+ sum = sum + arguments[i];
+ }
+ return sum;
+}
+
+var add4 = _.quaternary(addAll);
+
+add4(1, 1, 1, 1);
+// => 4
+
+add4(1, 1, 1, 1, 1, 1);
+// => 4
+
+
+Signature: _.ternary(fun:Function)
+Returns a new function which accepts only three arguments and passes these
+arguments to fun
. Additional arguments are discarded.
+function addAll() {
+ var sum = 0;
+ for (var i = 0; i < arguments.length; i++) {
+ sum = sum + arguments[i];
+ }
+ return sum;
+}
+
+var add3 = _.ternary(addAll);
+
+add3(1, 1, 1);
+// => 3
+
+add3(1, 1, 1, 1, 1, 1);
+// => 3
+
+
+Signature: _.unary(fun:Function)
+Returns a new function which accepts only one argument and passes this
+argument to fun
. Additional arguments are discarded.
+function logArgs() {
+ console.log(arguments);
+}
+
+var logOneArg = _.unary(logArgs);
+
+logOneArg("first");
+// => ["first"]
+
+logOneArg("first", "second");
+// => ["first"]
+
+
+Signature: _.rCurry(func:Function)
+Returns a curried version of func
where arguments are processed from right
+to left.
+function divide (a, b) {
+ return a / b;
+}
+
+var curried = _.rCurry(divide);
+// => function
+
+curried(1);
+// => function
+
+curried(1)(2);
+// => 2
+
+curried(2)(1);
+// => 0.5
+
+
+Signature: _.rcurry2(func:Function)
+Returns a curried version of func
where a maxium of two arguments are
+processed from right to left.
+function concat () {
+ var str = "";
+
+ for (var i = 0; i < arguments.length; i++) {
+ str = str + arguments[i];
+ }
+
+ return str;
+}
+
+var curried = _.rcurry2(concat);
+// => function
+
+curried("a");
+// => function
+
+curried("a")("b");
+// => "ba"
+
+
+Signature: _.rcurry3(func:Function)
+Returns a curried version of func
where a maxium of three arguments are
+processed from right to left.
+function concat () {
+ var str = "";
+
+ for (var i = 0; i < arguments.length; i++) {
+ str = str + arguments[i];
+ }
+
+ return str;
+}
+
+var curried = _.rcurry3(concat);
+// => function
+
+curried("a");
+// => function
+
+curried("a")("b");
+// => function
+
+curried("a")("b")("c");
+// => "cba"
+
+
+Functions that are combinators.
+
+
+
+Signature: _.always(value:Any)
+Aliases: _.k
+Takes value
and returns a function that will always return value
.
+var platonicForm = _.always("Eternal & Unchangeable");
+
+platonicForm();
+// => "Eternal & Unchangeable"
+
+
+Signature: _.bound(obj:Object, fname:String)
+Returns function property of an object by name, bound to object.
+var aristotle = {
+ name: "Aristotle",
+ telos: "flourishing",
+ stateTelos: function() {
+ return this.name + "'s telos is " + this.telos;
+ }
+};
+
+var stateAristotlesTelos = _.bound(aristotle, "stateTelos");
+
+stateAristotlesTelos();
+// => "Aristotle's Telos is flourishing"
+
+
+Signature: _.comparator(fun:Function)
+Takes a binary predicate-like function and returns a comparator function (return
+values of -1
, 0
, 1
) which can be used as a callback for _.sort
or
+Array.prototype.sort
.
+var lessOrEqual = function(x, y) { return x <= y; };
+
+var arr = [0, 1, -2];
+
+arr.sort(_.comparator(lessOrEqual));
+// => [-2, 0, 1]
+
+
+Signature: _.complement(pred:Function)
+Returns a function that reverses the sense of a given predicate-like.
+function isAugustine (val) {
+ return val === "Augustine";
+}
+
+isNotAugustine = _.complement(isAugustine);
+
+isNotAugustine("Dionysius");
+// => True
+
+
+Signature: _.conjoin(pred:Function...)
+Composes multiple predicates into a single predicate that checks all elements
+of an array for conformance to all of the original predicates.
+function startsWithA (val) {
+ return val[0] === "A";
+}
+
+function endsWithE (val) {
+ return val[val.length - 1] === "e";
+}
+
+var names = ["Aristotle", "Aquinas", "Plato", "Augustine"];
+
+var startsAAndEndsE = _.conjoin(startsWithA, endsWithE);
+
+startsAAndEndsE(names);
+// => ["Aristotle", "Augustine"]
+
+
+Signature: _.disjoin(pred:Function...)
+Composes multiple predicates into a single predicate that checks all elements
+of an array for conformance to any of the original predicates.
+function startsWithA (val) {
+ return val[0] === "A";
+}
+
+function endsWithE (val) {
+ return val[val.length - 1] === "e";
+}
+
+var names = ["Aristotle", "Aquinas", "Plato", "Augustine"];
+
+var startsAOrEndsE = _.disjoin(startsWithA, endsWithE);
+
+startsAOrEndsE(names);
+// => ["Aristotle", "Aquinas", "Augustine"]
+
+
+Signature: _.juxt(fun:Function...)
+Returns a function whose return value is an array of the results of calling
+each of the original functions with the arguments.
+function firstChar (val) {
+ return val[0];
+}
+
+function lastChar (val) {
+ return val[val.length - 1];
+}
+
+var firstAndLastChars = _.juxt(firstChar, lastChar);
+
+firstAndLastChars("Etruria");
+// => ["E", "a"]
+
+
+Signature: _.flip(fun:Function)
+Returns a function that works identically to fun
, but accepts the arguments
+in reverse order.
+function regionCapitol (region, capitol) {
+ return "The capitol of " + region + " is " + capitol;
+}
+
+capitolRegion = _.flip(regionCapitol);
+
+capitolRegion("Thessalonica", "Illyrica");
+// => "The capitol of Illyrica is Thessalonica"
+
+
+Signature: _.flip2(fun:Function)
+Returns a function that works identically to fun
, but accepts the first two
+arguments in reverse order. The order of all other arguments remains the same.
+function regionCapitol (region, capitol) {
+ return "The capitol of " + region + " is " + capitol;
+}
+
+capitolRegion = _.flip2(regionCapitol);
+
+capitolRegion("Thessalonica", "Illyrica");
+// => "The capitol of Illyrica is Thessalonica"
+
+
+Signature: _.fnull(fun:Function[, default:Any...])
+Returns a function that protects fun
from receiving non-existy values. Each
+subsequent value provided to fnull
acts as the default to the original
+fun
should a call receive non-existy values in the defaulted arg slots.
+function getLength (val) {
+ return val.length;
+}
+
+safeGetLength = _.fnull(getLength, []);
+
+safeGetLength([1, 2, 3]);
+// => 3
+
+safeGetLength(null);
+// => 0
+
+
+Signature: _.functionalize(fun:Function[, default:Any...])
+Takes a method-style function (one which uses this
) and pushes this
into the
+argument list. The returned function uses its first argument as the
+receiver/context of the original function, and the rest of the arguments are
+used as the original's entire argument list.
+var militaryUnits = {
+ centuria: "80 men",
+ cohort: "480 men",
+ getDescription: function (unitName) {
+ return this[unitName];
+ }
+};
+
+var getDescription = _.functionalize(militaryUnits.getDescription);
+
+var rulers = {
+ Leonidas: "King of Sparta",
+ Augustus: "First Roman Emperor"
+};
+
+getDescription(rulers, "Augustus");
+// => "First Roman Emperor"
+
+
+Signature: _.mapArgs(fun:Function)
+Takes a target function and returns a new function which accepts a mapping
+function, which in turn returns a function that will map its arguments before
+calling the original target function.
+function doubleNum (x) { return 2 * x; }
+
+function squareNum (x) { return x * x; }
+
+var squareThenDouble = _.mapArgs(doubleNum)(squareNum);
+
+squareThenDouble(3);
+// => 18
+
+
+Signature: _.mapArgs(mapFun:Function)
+Takes a mapping function and returns a new combinator function which will take
+a target function and return a new version which maps its arguments with the
+mapping function before executing the body of the target function.
+function doubleNum (x) { return 2 * x; }
+
+function squareNum (x) { return x * x; }
+
+var squareArgs = _.mapArgsWith(squareNum);
+
+var squareThenDouble = squareArgs(doubleNum);
+
+squareThenDouble(3);
+// => 18
+
+
+Signature: _.methodize(func:Function)
+Takes a function and pulls the first argument out of the argument list and into
+this
position. The returned function calls the original with its receiver
+(this
) prepending the argument list. The original is called with a receiver
+of null
.
+function describe (obj) {
+ return obj.name + ": " + obj.description;
+}
+
+var democritus = {
+ name: "Democritus",
+ description: "originator of the atomic hypothesis",
+ describe: _.methodize(describe)
+};
+
+democritus.describe();
+// => "Democritus: originator of the atomic hypothesis"
+
+
+Signature: _.pipeline(func:Function[, func2:Function...])
or _.pipeline(funcArr:Array)
+Aliases: _.t
+Takes a list of functions, either as an array or as individual arguments
+and returns a function that takes some value as its first argument and runs it
+through a pipeline of the original functions given.
+function halveNum (x) { return x / 2; };
+function squareNum (x) { return x * x; };
+function doubleNum (x) { return 2 * x; };
+
+var halveSquareDouble = _.pipeline(halveNum, squareNum, doubleNum);
+
+halveSquareDouble(1);
+// => 0.5
+
+var doubleSquareHalve = _.pipeline([doubleNum, squareNum, halveNum]);
+
+doubleSquareHalve(1);
+// => 2
+
+
+Signature: _.splat(fun:Function)
+Takes a function expecting one or more arguments and returns a function
+that takes an array and uses its elements as the arguments to the original
+function. This roughly corresponds to the spread operator in
+ECMAScript 6.
+function listTwoNames (a, b) {
+ return a.name + " & " + b.name;
+}
+
+var listTwoNamesFromArray = _.splat(listTwoNames);
+
+listTwoNamesFromArray([{ name: "Zeno" }, { name: "Parmenides"}]);
+// => "Zeno & Parmenides"
+
+
+Signature: _.unsplat(fun:Function)
+Aliases: _.unsplatr
+Takes a function expecting an array as its last argument and returns a function
+which works identically, but takes a list of trailing arguments instead. Roughly
+corresponds to rest parameters in ECMAScript 6.
+function joinWith (joiner, arr) {
+ return arr.join(joiner);
+}
+
+var joinArgsWith = _.unsplat(joinWith);
+
+joinArgsWith(" & ", "Plutarch", "Proclus");
+// => "Plutarch & Proclus"
+
+
+Signature: _.unsplatl(fun:Function)
+Similar to unsplat, but takes a function expecting an array as its
+first argument and returns a function which works identically, but takes a
+list of leading arguments instead. Roughly corresponds to
+rest parameters in ECMAScript 6.
+function joinWith (arr, joiner) {
+ return arr.join(joiner);
+}
+
+var joinArgsWith = _.unsplat(joinWith);
+
+joinArgsWith("Olympiodorus", "Syrianus", " & ");
+// => "Olympiodorus & Syrianus"
+
+
+
+Functions to iterate over collections.
+
+
+
+Signature: _.iterators.accumulate(iter:Function, binaryFn:Function, initial:Any)
+Returns a function that when called will iterate one step with iter
and return
+the value currently accumulated by using binaryFn
. The function will return undefined
once all values have been iterated over.
+var generalsIterator = _.iterators.List(["Hannibal", "Scipio"]);
+
+function countLetters(memo, element) {
+ return memo + element.length;
+}
+
+var generalsAcc = _.iterators.accumulate(generalsIterator, countLetters, 0);
+
+generalsAcc();
+// => 8
+
+generalsAcc();
+// => 14
+
+generalsAcc();
+// => undefined
+
+
+Signature: _.iterators.accumulateWithReturn(iter:Function, binaryFn:Function, initial:Any)
+Acts similarly to accumulate, except that binaryFn
is expected to return an
+array of two elements. The value of the first element is given to the next run
+of binaryFn
. The value of the second element is yielded by the iterator.
+var fiveIter = _.iterators.List([1, 2, 3, 4, 5]);
+
+function adderWithMessage (state, element) {
+ return [state + element, 'Total is ' + (state + element)];
+}
+
+var i = _.iterators.accumulateWithReturn(fiveIter, adderWithMessage, 0);
+
+i();
+// => "Total is 1"
+
+i();
+// => "Total is 3"
+
+i();
+// => "Total is 6"
+
+
+Signature: _.iterators.drop(iter:Function[, numberToDrop:Number])
+Given an iterator function iter
, will return a new iterator which iterates
+over the same values as iter
, except that the first numberToDrop
values
+will be omitted. If numberToDrop
is not provided, it will default to 1
.
+var deityIter = _.iterators.List(["Zeus", "Apollo", "Athena", "Aphrodite"]);
+
+var goddessIter = _.iterators.drop(deityIter, 2);
+
+goddessIter();
+// => "Athena"
+
+goddessIter();
+// => "Aphrodite"
+
+
+Signature: _.iterators.foldl(iter:Function, binaryFn:Function[, seed:Any])
+Aliases: iterators.reduce
+Boils down the values given by iter
into a single value. The seed
is the
+initial state. The binaryFn
is given two arguments: the seed
and the
+current value yielded by iter
.
+var sybylIter = _.iterators.List(["cumaean", "tiburtine"]);
+
+function commaString (a, b) { return a + ", " + b; }
+
+_.iterators.foldl(sybylIter, commaString);
+// => "cumaean, tiburtine"
+
+
+Signature: _.iterators.K(value:Any)
+Aliases: iterators.constant
+Returns a function that when invoked will always return value
.
+var ceasar = _.iterators.K("Ceasar");
+
+ceasar();
+// => "ceasar"
+
+
+Signature: _.iterators.List(array:Array)
+Returns an iterater that when invoked will iterate over the contents of array
.
+var triumvirIter = _.iterators.List(["Ceasar", "Pompey", "Crassus"];
+
+triumvirIter();
+// => "Ceasar"
+
+triumvirIter();
+// => "Pompey"
+
+triumvirIter();
+// => "Crassus"
+
+
+Signature: _.iterators.map(iter:Function, unaryFn:Function)
+Returns a new iterator function which on each iteration will return the result
+of running iter
's current value through unaryFn
.
+var notablesIter = _.iterators.List(["Socrates", "Plato"]);
+
+function postfixAthenian (val) {
+ return val + ", Athenian";
+}
+
+var notableAtheniansIter = _.iterators.map(notablesIter, postfixAthenian);
+
+notableAtheniansIter();
+// => "Socrates, Athenian"
+
+notableAtheniansIter();
+// => "Plato, Athenian"
+
+
+Signature: _.iterators.mapcat(iter:Function, unaryFn:Function)
+Returns an iterator which is the result of flattening the contents of iter
,
+and mapping the results with unaryFn
.
+function naturalSmallerThan (x) {
+ return _.iterators.List(_.range(0, x));
+}
+
+var treeIter = _.iterators.Tree([1, [2]]);
+
+var smallerThanIter = _.iterators.mapcat(treeIter, naturalSmallerThan);
+
+smallerThanIter();
+// => 0
+
+smallerThanIter();
+// => 0
+
+smallerThanIter();
+// => 1
+
+
+Signature: _.iterators.numbers([start:Number])
+Returns an iterator of integers which will begin with start
and increment by
+one for each invocation. If start
is not provided it will default to 1
.
+var twoAndUp = _.iterators.numbers(2);
+
+twoAndUp();
+// => 2
+
+twoAndUp();
+// => 3
+
+twoAndUp();
+// => 4
+
+
+Signature: `_.iterators.range([from:Number, to:Number, by:Number]);
+Returns an iterator whose values consist of numbers beginning with from
, ending with to
, in steps of size by
.
+var by5 = _.iterators.range(5, Infinity, 5);
+
+by5();
+// => 5
+
+by5();
+// => 10
+
+by5();
+// => 15
+
+
+Signature: _.iterators.reject(iter:Function, unaryPredicatFn:Function)
+Returns an iterator consisting of the values of iter
which are not flagged
+true
by unaryPredicateFn
.
+var philosophers = ["Anaximander", "Socrates", "Heraclitus"];
+
+var philosophersIter = _.iterators.List(philosophers);
+
+function isSocrates (val) {
+ return val === "Socrates";
+}
+
+var preSocraticsIter = _.iterators.reject(philosophersIter, isSocrates);
+
+preSocraticsIter()
+// => "Anaximander"
+
+preSocraticsIter()
+// => "Heraclitus"
+
+
+Signature: _.iterators.select(iter:Function, unaryPredicatFn:Function)
+Aliases: iterators.find
, iteraters.filter
+Returns an iterator consisting of the values of iter
which are flagged
+true
by unaryPredicateFn
.
+var philosophers = ["Anaximander", "Socrates", "Heraclitus"];
+
+var philosophersIter = _.iterators.List(philosophers);
+
+function isSocrates (val) {
+ return val === "Socrates";
+}
+
+var socraticIter = _.iterators.select(philosophersIter, isSocrates);
+
+socraticIter()
+// => "Socrates"
+
+
+Signature: _.iterators.slice(iter:Function, numberToDrop:Number, numberToTake:Number)
+Returns an iterator whose values consist of iter
's after removing
+numberToDrop
from the head, and a maxiumum of numberToTake
of the remaining.
+If numberToTake
is not specified, all of iter
's remaining values will be
+used.
+var emperors = ["Augustus", "Tiberius", "Caligula", "Claudius"];
+
+var emperorsIter = _.iterators.List(emperors);
+
+var middleEmperorsIter = _.iterators.slice(emperorsIter, 1, 2);
+
+middleEmperorsIter();
+// => "Tiberius"
+
+middleEmperorsIter();
+// => "Caligula"
+
+middleEmperorsIter();
+// => undefined
+
+
+Signature: _.iterators.take(iter:Function[, numberToTake:Number])
+Returns an iterator consisting of the first numberToTake
values yielded by
+iter
. If numberToTake
is not provided, it will default to 1
.
+var byzantineEmperors = ["Constantine", "Constantius", "Constans"];
+
+var byzantineEmperorsIter = _.iterators.List(byzantineEmperors);
+
+var firstTwoEmperorsIter = _.iterators.take(byzantineEmperorsIter, 2);
+
+firstTwoEmperorsIter();
+// => "Constantine"
+
+firstTwoEmperorsIter();
+// => "Constantius"
+
+firstTwoEmperorsIter();
+// => undefined
+
+
+Signature: _.iterators.Tree(array:Array);
+Returns an iterator that yields the individual values of a tree array
.
+var rulers = ["Augustus", ["Constantine"], ["Leo", ["Charlemagne"]]];
+
+var rulersIter = _.iterators.Tree(rulers);
+
+rulersIter();
+// => "Augustus"
+
+rulersIter();
+// => "Constantine"
+
+rulersIter();
+// => "Leo"
+
+rulersIter();
+// => "Charlemagne"
+
+
+Signature: _.iterators.unfold(seed:Any, unaryFn:Function)
+function greatify (val) {
+ return val + " the Great";
+}
+
+var greatIter = _.iterators.unfold("Constantine", greatify);
+
+greatIter();
+// => "Constantine the Great"
+
+greatIter();
+// => "Constantine the Great the Great"
+
+greatIter();
+// => "Constantine the Great the Great the Great"
+
+
+Signature: _.iterators.unfold(seed:Any, unaryFn:Function)
+Acts similarly to unfold, except that unaryFn
is expected to return an array
+with two elements. The value of the first element is given to the next run of
+unaryFn
. The value of the second element is yielded by the iterator.
+var i = _.iterators.unfoldWithReturn(1, function(n) {
+ return [n + 1, n * n];
+});
+
+i();
+// => 1
+
+i();
+// => 4
+
+i();
+// => 9
+
+
+Functions which return whether the input meets a condition.
+
+
+
+Signature: isAssociative(value:Any)
+Returns a boolean indicating whether or not the value is an associative object.
+An associative object is one where its elements can be accessed via a key or
+index (e.g. arrays, arguments
, objects).
+_.isAssociative(["Athens", "Sparta"]);
+// => true
+
+_.isAssociative(42);
+// => false
+
+
+Signature: _.isDecreasing(values:Any...)
+Checks whether the arguments are monotonically decreasing values (i.e. whether
+each argument is less than the previous argument.)
+_.isDecreasing(3, 2, 1);
+// => true
+
+_.isDecreasing(15, 12, 2);
+// => true
+
+_.isDecreasing(2, 3);
+// => false
+
+
+Signature: _.isEven(value:Any)
+Checks whether the value is an even number.
+_.isEven(12);
+// => true
+
+_.isEven(3);
+// => false
+
+_.isEven({});
+// => false
+
+
+Signature: _.isFloat(value:Any)
+Checks whether the value is a "float." For the purposes of this function, a float
+is a numeric value that is not an integer. A numeric value may be a number, a
+string containing a number, a Number
object, etc.
+NOTE: JavaScript itself makes no distinction between integers and floats. For
+the purposes of this function both 1
and 1.0
are considered integers.
+_.isFloat(1.1);
+// => true
+
+_.isFloat(1);
+// => false
+
+_.isFloat(1.0);
+// => false
+
+_.isFloat("2.15");
+// => true
+
+
+Signature: _.isIncreasing(value:Any...)
+Checks whether the arguments are monotonically increasing values (i.e. each
+argument is greater than the previous argument.)
+_.isIncreasing(1, 12, 15);
+// => true
+
+_.isIncreasing(1);
+// => true
+
+_.isIncreasing(5, 4);
+// => false
+
+
+Signature: _.isIndexed(value:Any)
+Checks whether the value is "indexed." An indexed value is one which accepts a
+numerical index to access its elements. (e.g. arrays and strings)
+NOTE: Underscore does not support cross-browser consistent use of strings as
+array-like values, so be wary in IE 8 when using string objects and in IE7 and
+earlier when using string literals & objects.
+_.isIndexed("Socrates");
+// => true
+
+_.isIndexed({poison: "hemlock"});
+// => false
+
+
+Signature: _.isInstanceOf(value:Any, constructor:Function)
+Checks whether the value is an instance of the constructor.
+_.isInstanceOf(new Date(), Date);
+// => true
+
+_.isInstanceOf("Hippocrates", RegExp);
+// => false
+
+
+Signature: _.isInteger(value:Any)
+Checks whether the value is a numeric integer. A numeric value can be a string
+containing a number, a Number
object, etc.
+_.isInteger(18);
+// => true
+
+_.isInteger("18");
+// => true
+
+_.isInteger(2.5);
+// => false
+
+_.isInteger(-1);
+// => true
+
+
+Signature: _.isJSON(value:Any)
+Checks whether the value is valid JSON. See the spec for
+more information on what constitutes valid JSON.
+NOTE: This function relies on JSON.parse
which is not available in IE7 and
+earlier.
+_.isJSON('{ "name": "Crockford" }');
+// => true
+
+_.isJSON({ name: "Crocket" });
+// => false
+
+
+Signature: _.isNegative(value:Any)
+Checks whether the value is a negative number.
+_.isNegative(-2);
+// => true
+
+_.isNegative(5);
+// => false
+
+
+Signature: _.isNumeric(value:Any)
+A numeric is something that contains a numeric value, regardless of its type. It
+can be a string containing a numeric value, exponential notation, a Number
+object, etc.
+_.isNumeric("14");
+// => true
+
+_.isNumeric("fourteen");
+// => false
+
+
+Signature: _.isOdd(value:Any)
+Checks whether the value is an odd number.
+_.isOdd(3);
+// => true
+
+_.isOdd(2);
+// => false
+
+_.isOdd({});
+// => false
+
+
+Signature: _.isPlainObject(value:Any);
+Checks whether the value is a "plain" object created as an object literal ({}
)
+or explicitly constructed with new Object()
. Instances of other constructors
+are not plain objects.
+_.isPlainObject({});
+// => true
+
+_.isPlainObject(new Date());
+// => false
+
+_.isPlainObject([]);
+// => false
+
+
+Signature: _.isPositive(value:Any)
+Checks whether the value is a positive number.
+_.isPositive(21);
+// => true
+
+_.isPositive(-3);
+// => false
+
+
+Signature: _.isSequential(value:Any)
+Checks whether the value is a sequential composite type (i.e. arrays and
+arguments
).
+_.isSequential(["Herodotus", "Thucidydes");
+// => true
+
+_.isSequential(new Date);
+// => false
+
+
+Signature: _.isValidDate(value:Any)
+Checks whether the value is a valid date. That is, the value is both an instance
+of Date
and it represents an actual date.
+Warning: This function does not verify
+whether the original input to Date
is a real date. For instance,
+new Date("02/30/2014")
is considered a valid date because Date
coerces that
+into a representation of 03/02/2014. To validate strings representing a date,
+consider using a date/time library like Moment.js.
+_.isValidDate(new Date("January 1, 1900"));
+// => true
+
+_.isValidDate(new Date("The Last Great Time War"));
+// => false
+
+
+Signature: _.isZero(value:Any)
+Checks whether the value is 0
.
+_.isZero(0);
+// => true
+
+_.isZero("Pythagoras");
+// => false
+
+
+
+Functions to build objects.
+
+
+
+Signature: _.frequencies(arr:Array)
+Returns an object whose property keys are the values of arr
's elements. The
+property values are a count of how many times that value appeared in arr
.
+var citations = ["Plato", "Aristotle", "Plotinus", "Plato"];
+
+_.frequencies(citations);
+// => { Plato: 2, Aristotle: 1, Plotinus: 1 }
+
+
+Signature: _.merge(obj1:Object[, obj:Object...])
+Merges two or more objects starting with the left-most and applying the keys
+rightward.
+_.merge({ a: "alpha" }, { b: "beta" });
+// => { a: "alpha", b: "beta" }
+
+
+Signature: _.renameKeys(obj:Object, keyMap:Object)
+Takes an object (obj
) and a map of keys (keyMap
) and returns a new object
+where the keys of obj
have been renamed as specified in keyMap
.
+_.renameKeys({ a: 1, b: 2 }, { a: "alpha", b: "beta" });
+// => { alpha: 1, beta: 2 }
+
+
+Signature: _.setPath(obj:Object, value:Any, ks:Array, defaultValue:Any)
+Sets the value of a property at any depth in obj
based on the path described
+by the ks
array. If any of the properties in the ks
path don't exist, they
+will be created with defaultValue
.
+_.setPath({}, "Plotinus", ["Platonism", "Neoplatonism"], {});
+// => { Platonism: { Neoplatonism: "Plotinus" } }
+
+
+Signature: _.snapshot(obj:Object)
+Snapshots/clones an object deeply.
+var schools = { plato: "Academy", aristotle: "Lyceum" };
+
+_.snapshot(schools);
+// => { plato: "Academy", aristotle: "Lyceum" }
+
+schools === _.snapshot(schools);
+// => false
+
+Signature: _.updatePath(obj:Object, fun:Function, ks:Array, defaultValue:Any)
+Updates the value at any depth in a nested object based on the path described by
+the ks
array. The function fun
is called with the current value and is
+expected to return a replacement value. If no keys are provided, then the
+object itself is presented to fun
. If a property in the path is missing, then
+it will be created with defaultValue
.
+var imperialize = function (val) {
+ if (val == "Republic) return "Empire";
+ else return val;
+};
+
+_.updatePath({ rome: "Republic" }, imperialize, ["rome"]);
+// => { rome: "Empire" }
+
+
+Functions to select values from an object.
+
+
+
+Signature: _.accessor(field:String)
+Returns a function that will attempt to look up a named field in any object
+that it is given.
+var getName = _.accessor('name');
+
+getName({ name: 'Seneca' });
+// => 'Seneca'
+
+
+Signature: _.dictionary(obj:Object)
+Given an object, returns a function that will attempt to look up a field that
+it is given.
+var generals = {
+ rome: "Scipio",
+ carthage: "Hannibal"
+};
+
+var getGeneralOf = _.dictionary(generals);
+
+_.getGeneralOf("rome");
+// => "Scipio"
+
+
+Signature: _.getPath(obj:Object, ks:String|Array)
+Gets the value at any depth in a nested object based on the path described by
+the keys given. Keys may be given as an array or as a dot-separated string.
+Returns undefined
if the path cannot be reached.
+var countries = {
+ greece: {
+ athens: {
+ playwright: "Sophocles"
+ }
+ }
+ }
+};
+
+_.getPath(countries, "greece.athens.playwright");
+// => "Sophocles"
+
+_.getPath(countries, "greece.sparta.playwright");
+// => undefined
+
+_.getPath(countries, ["greece", "athens", "playwright"]);
+// => "Sophocles"
+
+_.getPath(countries, ["greece", "sparta", "playwright"]);
+// => undefined
+
+
+Signature: _.hasPath(obj:Object, ks:String|Array)
+Returns a boolean indicating whether there is a property at the path described
+by the keys given. Keys may be given as an array or as a dot-separated string.
+var countries = {
+ greece: {
+ athens: {
+ playwright: "Sophocles"
+ }
+ }
+ }
+};
+
+_.hasPath(countries, "greece.athens.playwright");
+// => true
+
+_.hasPath(countries, "greece.sparta.playwright");
+// => false
+
+_.hasPath(countries, ["greece", "athens", "playwright"]);
+// => true
+
+_.hasPath(countries, ["greece", "sparta", "playwright"]);
+// => false
+
+
+Signature: _.kv(obj:Object, key:String)
+Returns the key/value pair for a given property in an object, undefined if not found.
+var playAuthor = {
+ "Medea": "Aeschylus"
+};
+
+_.kv(playAuthor, "Medea");
+// => ["Medea", "Aeschylus"]
+
+_.kv(playAuthor, "Hamlet");
+// => undefined
+
+
+Signature: _.omitWhen(obj, pred:Function)
+Returns a copy of obj
omitting any properties that the predicate (pred
)
+function returns true
for. The predicat function is invoked with each
+property value, like so: pred(propValue)
.
+var playwrights = {
+ euripedes: "Greece",
+ shakespere: "England"
+};
+
+_.omitWhen(obj, function (country) { return country == "England" });
+// => { euripedes: "Greece" }
+
+
+Signature: _.pickWhen(obj:Object, pred:Function)
+Returns a copy of obj
containing only properties that the predicate (pred
)
+function returns true
for. The predicate function is invoked with each
+property value, like so: pred(propValue)
.
+var playwrights = {
+ euripedes: "Greece",
+ shakespere: "England"
+};
+
+_.pickWhen(obj, function (country) { return country == "England" });
+// => { shakespeare: "England" }
+
+
+Signature: `_.selectKeys(obj:Object, ks:Array);
+Returns a copy of obj
containing only the properties listed in the ks
array.
+var philosopherCities = {
+ Philo: "Alexandria",
+ Plato: "Athens",
+ Plotinus: "Rome"
+}
+
+_.selectKeys(philosopherCities, ["Plato", "Plotinus"]);
+// => { Plato: "Athens", Plotinus: "Rome" }
+
+
+Functions which deal with whether a value "exists."
+
+
+
+Signature: _.exists(value:Any)
+Checks whether or not the value is "existy." Both null
and undefined
are
+considered non-existy values. All other values are existy.
+_.exists(null);
+// => false
+
+_.exists(undefined);
+// => false
+
+_.exists({});
+// = > true
+
+_.exists("Sparta");
+// => true
+
+
+Signature: _.falsey(value:Any)
+Checks whether the value is falsey. A falsey value is one which coerces to
+false
in a boolean context.
+_.falsey(0);
+// => true
+
+_.falsey("");
+// => true
+
+_.falsey({});
+// => false
+
+_.falsey("Corinth");
+// => false
+
+
+Signature: _.firstExisting(value:Any[, value:Any...])
+Returns the first existy argument from the argument list.
+_.firstExisting("Socrates", "Plato");
+// => "Socrates"
+
+_.firstExisting(null, undefined, "Heraclitus");
+// => "Heraclitus"
+
+
+Signature: _.not(value:Any)
+Returns a boolean which is the opposite of the truthiness of the original value.
+_.not(0);
+// => true
+
+_.not(1);
+// => false
+
+_.not(true);
+// => false
+
+_.not(false);
+// => true
+
+_.not({});
+// => false
+
+_.not(null);
+// => true
+
+
+Signature: _.truthy(value:Any)
+Checks whether the value is truthy. A truthy value is one which coerces to
+true
in a boolean context.
+_.truthy({});
+// => true
+
+_.truthy("Athens");
+// => true
+
+_.truthy(0);
+// => false
+
+_.truthy("");
+// => false
+
+
+
+Functions which wrap JavaScript's operators.
+
+
+
+Signature: _.add(value:Number, value:Number[, value:Number...])
+Returns the sum of the arguments.
+_.add(1, 2, 3, 4);
+// => 10
+
+
+Signature: _.bitwiseAnd(value:Any, value:Any[, value:Any...])
+Returns the result of using the &
operator on the arguments.
+_.bitwiseAnd(1, 3);
+// => 1
+
+_.bitwiseAnd(1, 3, 2);
+// => 0
+
+
+Signature: _.bitwiseLeft(value:Any, value:Any[, value:Any...])
+Returns the result of using the <<
operator on the arguments.
+_.bitwiseLeft(1, 3);
+// => 8
+
+_.bitwiseLeft(1, 3, 2);
+// => 32
+
+
+Signature: _.bitwiseRight(value:Any, value:Any[, value:Any...])
+Returns the result of using the >>
operator on the arguments.
+_.bitwiseRight(3, 1);
+// => 1
+
+_.bitwiseRight(3, 1, 3);
+// => 0
+
+
+Signature: _.bitwiseNot(value:Any)
+Returns the result of using the ~
operator on the value.
+_.bitwiseNot(1);
+// => -2
+
+_.bitwiseOr(2);
+// => -3
+
+
+Signature: _.bitwiseOr(value:Any, value:Any[, value:Any...])
+Returns the result of using the |
operator on the arguments.
+_.bitwiseOr(1, 3);
+// => 3
+
+_.bitwiseOr(1, 3, 4);
+// => 7
+
+
+Signature: _.bitwiseXor(value:Any, value:Any[, value:Any...])
+Returns the result of using the ^
operator on the arguments.
+_.bitwiseXor(1, 3);
+// => 2
+
+_.bitwiseXor(1, 3, 3);
+// => 1
+
+
+Signature: _.bitwiseZ(value:Any, value:Any[, value:Any...])
+Returns the result of using the >>>
operator on the arguments.
+_.bitwiseZ(72, 32);
+// => 72
+
+_.bitwiseZ(72, 32, 2);
+// => 18
+
+
+Signature: _.dec(value:Number)
+Returns the result of decrementing the value by 1
.
+_.dec(2);
+// => 1
+
+
+Signature: _.div(value:Number, value:Number[, value:Number...])
+Returns the quotient of the arguments.
+_.div(8, 2);
+// => 4
+
+_.div(8, 2, 2);
+// => 2
+
+
+Signature: _.eq(value:Any, value:Any[, value:Any...])
+Compares the arguments with loose equality (==
).
+_.eq(1, "1");
+// => true
+
+_.eq(1, 15);
+// => false
+
+_.eq(1, true, "1");
+// => true
+
+_.eq(1, 1, 15);
+// => false
+
+
+Signature: _.gt(value:Any, value:Any[, value:Any...])
+Checks whether each argument is greater than the previous argument.
+_.gt(1, 2);
+// => true
+
+_.gt(1, 2, 3);
+// => true
+
+_.gt(1, 6, 2);
+// => false
+
+
+Signature: _.gte(value:Any, value:Any[, value:Any...])
+Checks whether each argument is greater than or equal to the previous argument.
+_.gte(1, 2);
+// => true
+
+_.gte(1, 1, 3);
+// => true
+
+_.gte(1, 6, 2);
+// => false
+
+
+Signature: _.inc(value:Number)
+Returns the result of incrementing the value by 1
.
+_.inc(2);
+// => 3
+
+
+Signature: _.lt(value:Any, value:Any[, value:Any...])
+Checks whether each argument is less than the previous argument.
+_.lt(2, 1);
+// => true
+
+_.lt(2, 1, 0);
+// => true
+
+_.lt(2, 1, 12);
+// => false
+
+
+Signature: _.lte(value:Any, value:Any[, value:Any...])
+Checks whether each argument is less than or equal to the previous argument.
+_.lte(2, 1);
+// => true
+
+_.lte(2, 1, 1);
+// => true
+
+_.lte(2, 1, 12);
+// => false
+
+
+Signature: _.mul(value:Number, value:Number[, value:Number...])
+Returns the product of the arguments.
+_.mul(1, 2, 3, 4);
+// => 24
+
+
+Signature: _.mod(dividend:Number, divisor:Number)
+Returns the remainder of dividing dividend
by divisor
.
+_.mod(26, 5);
+// => 1
+
+_.mod(14, 3);
+// => 2
+
+
+Signature: _.neg(num:Number)
+Returns a new number with the opposite sign value of num
.
+_.neg(5);
+// => -5
+
+_.neg(-3);
+// => 3
+
+
+Signature: _.neq(value:Any, value:Any[, value:Any...])
+Checks whether each argument is not equal to the previous argument, using loose
+inequality (!=
).
+_.neq(2, 1);
+// => true
+
+_.neq(2, 1, 1);
+// => true
+
+_.neq(1, 1);
+// => false
+
+
+Signature: _.not(value:Any)
+Returns a boolean which is the opposite of the truthiness of the original value.
+_.not(0);
+// => true
+
+_.not(1);
+// => false
+
+_.not(true);
+// => false
+
+_.not(false);
+// => true
+
+_.not({});
+// => false
+
+_.not(null);
+// => true
+
+
+Signature: _.seq(value:Any, value:Any[, value:Any...])
+Checks whether the arguments are strictly equal (===
) to each other.
+_.seq(2, 2);
+// => true
+
+_.seq(2, "2");
+// => false
+
+_.seq(2, 2, 2);
+// => true
+
+
+Signature: _.sneq(value:Any, value:Any[, value:Any...])
+Checks whether the arguments are strictly not equal (!==
) to each other.
+_.sneq(2, 2);
+// => false
+
+_.sneq(2, "2");
+// => true
+
+_.sneq(2, 2, 2);
+// => false
+
+
+Signature: _.sub(value:Number, value:Number[, value:Number...])
+Returns the difference of the arguments.
+_.sub(10, 3);
+// => 7
+
+_.sub(10, 3, 5);
+// => 2
+
+
+Functions for working with strings.
+
+
+
+Signature: _.camelCase(string:String)
+Converts a dash-separated string to camel case. Opposite of toDash.
+_.camelCase("ancient-greece");
+// => "ancientGreece"
+
+
+Signature: _.explode(s:String)
+Explodes a string into an array of characters. Opposite of implode.
+_.explode("Plato");
+// => ["P", "l", "a", "t", "o"]
+
+
+Signature: _.fromQuery(str:String)
+Takes a URL query string and converts it into an equivalent JavaScript object.
+Opposite of toQuery
+_.fromQuery("forms%5Bperfect%5D=circle&forms%5Bimperfect%5D=square");
+// => { forms: { perfect: "circle", imperfect: "square" } }
+
+
+Signature: _.implode(a:Array)
+Implodes an array of strings into a single string. Opposite of explode.
+_.implode(["H", "o", "m", "e", "r"]);
+// => "Homer"
+
+
+Signature: _.strContains(str:String, search:String)
+Reports whether a string contains a search string.
+_.strContains("Acropolis", "polis");
+// => true
+
+
+Signature: _.toDash(string:String)
+Converts a camel case string to a dashed string. Opposite of camelCase.
+_.toDash("thisIsSparta");
+// => "this-is-sparta"
+
+
+Signature: _.toQuery(obj:Object)
+Takes an object and converts it into an equivalent URL query string. Opposite
+of fromQuery.
+_.toQuery({ forms: { perfect: "circle", imperfect: "square" } });
+// => "forms%5Bperfect%5D=circle&forms%5Bimperfect%5D=square"
+
+
+
+Trampoline functions.
+
+Documentation should use Journo formats and standards.
+done: function(value) {
+trampoline: function(fun /*, args */) {
+
+
+
+
+- Contrib now requires Underscore 1.6.0 or higher.
+- Rename
partition
and partitionAll
to chunk
and chunkAll
to avoid name conflicts with Underscore's partition
- #115
+- Added
toQuery
and fromQuery
- #134
+- Switch
always
to an alias of Underscore's constant
. - #132
+- The combinators sub-library now supports method combinators - #14
+
+
+
+
diff --git a/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/index.js b/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/index.js
new file mode 100644
index 0000000..5d4bc17
--- /dev/null
+++ b/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/index.js
@@ -0,0 +1,16 @@
+require('./underscore.array.builders');
+require('./underscore.array.selectors');
+require('./underscore.collections.walk');
+require('./underscore.function.arity');
+require('./underscore.function.combinators');
+require('./underscore.function.dispatch');
+require('./underscore.function.iterators');
+require('./underscore.function.predicates');
+require('./underscore.object.builders');
+require('./underscore.object.selectors');
+require('./underscore.util.existential');
+require('./underscore.util.operators');
+require('./underscore.util.strings');
+require('./underscore.util.trampolines');
+
+module.exports = require('underscore');
diff --git a/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/node_modules/underscore/LICENSE b/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/node_modules/underscore/LICENSE
new file mode 100644
index 0000000..0d6b873
--- /dev/null
+++ b/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/node_modules/underscore/LICENSE
@@ -0,0 +1,23 @@
+Copyright (c) 2009-2014 Jeremy Ashkenas, DocumentCloud and Investigative
+Reporters & Editors
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/node_modules/underscore/README.md b/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/node_modules/underscore/README.md
new file mode 100644
index 0000000..c2ba259
--- /dev/null
+++ b/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/node_modules/underscore/README.md
@@ -0,0 +1,22 @@
+ __
+ /\ \ __
+ __ __ ___ \_\ \ __ _ __ ____ ___ ___ _ __ __ /\_\ ____
+ /\ \/\ \ /' _ `\ /'_ \ /'__`\/\ __\/ ,__\ / ___\ / __`\/\ __\/'__`\ \/\ \ /',__\
+ \ \ \_\ \/\ \/\ \/\ \ \ \/\ __/\ \ \//\__, `\/\ \__//\ \ \ \ \ \//\ __/ __ \ \ \/\__, `\
+ \ \____/\ \_\ \_\ \___,_\ \____\\ \_\\/\____/\ \____\ \____/\ \_\\ \____\/\_\ _\ \ \/\____/
+ \/___/ \/_/\/_/\/__,_ /\/____/ \/_/ \/___/ \/____/\/___/ \/_/ \/____/\/_//\ \_\ \/___/
+ \ \____/
+ \/___/
+
+Underscore.js is a utility-belt library for JavaScript that provides
+support for the usual functional suspects (each, map, reduce, filter...)
+without extending any core JavaScript objects.
+
+For Docs, License, Tests, and pre-packed downloads, see:
+http://underscorejs.org
+
+Underscore is an open-sourced component of DocumentCloud:
+https://github.com/documentcloud
+
+Many thanks to our contributors:
+https://github.com/jashkenas/underscore/contributors
diff --git a/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/node_modules/underscore/package.json b/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/node_modules/underscore/package.json
new file mode 100644
index 0000000..e9b4a8a
--- /dev/null
+++ b/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/node_modules/underscore/package.json
@@ -0,0 +1,67 @@
+{
+ "name": "underscore",
+ "description": "JavaScript's functional programming helper library.",
+ "homepage": "http://underscorejs.org",
+ "keywords": [
+ "util",
+ "functional",
+ "server",
+ "client",
+ "browser"
+ ],
+ "author": {
+ "name": "Jeremy Ashkenas",
+ "email": "jeremy@documentcloud.org"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/jashkenas/underscore.git"
+ },
+ "main": "underscore.js",
+ "version": "1.6.0",
+ "devDependencies": {
+ "docco": "0.6.x",
+ "phantomjs": "1.9.0-1",
+ "uglify-js": "2.4.x"
+ },
+ "scripts": {
+ "test": "phantomjs test/vendor/runner.js test/index.html?noglobals=true",
+ "build": "uglifyjs underscore.js -c \"evaluate=false\" --comments \"/ .*/\" -m --source-map underscore-min.map -o underscore-min.js",
+ "doc": "docco underscore.js"
+ },
+ "licenses": [
+ {
+ "type": "MIT",
+ "url": "https://raw.github.com/jashkenas/underscore/master/LICENSE"
+ }
+ ],
+ "files": [
+ "underscore.js",
+ "underscore-min.js",
+ "LICENSE"
+ ],
+ "bugs": {
+ "url": "https://github.com/jashkenas/underscore/issues"
+ },
+ "_id": "underscore@1.6.0",
+ "dist": {
+ "shasum": "8b38b10cacdef63337b8b24e4ff86d45aea529a8",
+ "tarball": "http://registry.npmjs.org/underscore/-/underscore-1.6.0.tgz"
+ },
+ "_from": "underscore@1.6.0",
+ "_npmVersion": "1.3.21",
+ "_npmUser": {
+ "name": "jashkenas",
+ "email": "jashkenas@gmail.com"
+ },
+ "maintainers": [
+ {
+ "name": "jashkenas",
+ "email": "jashkenas@gmail.com"
+ }
+ ],
+ "directories": {},
+ "_shasum": "8b38b10cacdef63337b8b24e4ff86d45aea529a8",
+ "_resolved": "https://registry.npmjs.org/underscore/-/underscore-1.6.0.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/node_modules/underscore/underscore-min.js b/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/node_modules/underscore/underscore-min.js
new file mode 100644
index 0000000..3434d6c
--- /dev/null
+++ b/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/node_modules/underscore/underscore-min.js
@@ -0,0 +1,6 @@
+// Underscore.js 1.6.0
+// http://underscorejs.org
+// (c) 2009-2014 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+// Underscore may be freely distributed under the MIT license.
+(function(){var n=this,t=n._,r={},e=Array.prototype,u=Object.prototype,i=Function.prototype,a=e.push,o=e.slice,c=e.concat,l=u.toString,f=u.hasOwnProperty,s=e.forEach,p=e.map,h=e.reduce,v=e.reduceRight,g=e.filter,d=e.every,m=e.some,y=e.indexOf,b=e.lastIndexOf,x=Array.isArray,w=Object.keys,_=i.bind,j=function(n){return n instanceof j?n:this instanceof j?void(this._wrapped=n):new j(n)};"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=j),exports._=j):n._=j,j.VERSION="1.6.0";var A=j.each=j.forEach=function(n,t,e){if(null==n)return n;if(s&&n.forEach===s)n.forEach(t,e);else if(n.length===+n.length){for(var u=0,i=n.length;i>u;u++)if(t.call(e,n[u],u,n)===r)return}else for(var a=j.keys(n),u=0,i=a.length;i>u;u++)if(t.call(e,n[a[u]],a[u],n)===r)return;return n};j.map=j.collect=function(n,t,r){var e=[];return null==n?e:p&&n.map===p?n.map(t,r):(A(n,function(n,u,i){e.push(t.call(r,n,u,i))}),e)};var O="Reduce of empty array with no initial value";j.reduce=j.foldl=j.inject=function(n,t,r,e){var u=arguments.length>2;if(null==n&&(n=[]),h&&n.reduce===h)return e&&(t=j.bind(t,e)),u?n.reduce(t,r):n.reduce(t);if(A(n,function(n,i,a){u?r=t.call(e,r,n,i,a):(r=n,u=!0)}),!u)throw new TypeError(O);return r},j.reduceRight=j.foldr=function(n,t,r,e){var u=arguments.length>2;if(null==n&&(n=[]),v&&n.reduceRight===v)return e&&(t=j.bind(t,e)),u?n.reduceRight(t,r):n.reduceRight(t);var i=n.length;if(i!==+i){var a=j.keys(n);i=a.length}if(A(n,function(o,c,l){c=a?a[--i]:--i,u?r=t.call(e,r,n[c],c,l):(r=n[c],u=!0)}),!u)throw new TypeError(O);return r},j.find=j.detect=function(n,t,r){var e;return k(n,function(n,u,i){return t.call(r,n,u,i)?(e=n,!0):void 0}),e},j.filter=j.select=function(n,t,r){var e=[];return null==n?e:g&&n.filter===g?n.filter(t,r):(A(n,function(n,u,i){t.call(r,n,u,i)&&e.push(n)}),e)},j.reject=function(n,t,r){return j.filter(n,function(n,e,u){return!t.call(r,n,e,u)},r)},j.every=j.all=function(n,t,e){t||(t=j.identity);var u=!0;return null==n?u:d&&n.every===d?n.every(t,e):(A(n,function(n,i,a){return(u=u&&t.call(e,n,i,a))?void 0:r}),!!u)};var k=j.some=j.any=function(n,t,e){t||(t=j.identity);var u=!1;return null==n?u:m&&n.some===m?n.some(t,e):(A(n,function(n,i,a){return u||(u=t.call(e,n,i,a))?r:void 0}),!!u)};j.contains=j.include=function(n,t){return null==n?!1:y&&n.indexOf===y?n.indexOf(t)!=-1:k(n,function(n){return n===t})},j.invoke=function(n,t){var r=o.call(arguments,2),e=j.isFunction(t);return j.map(n,function(n){return(e?t:n[t]).apply(n,r)})},j.pluck=function(n,t){return j.map(n,j.property(t))},j.where=function(n,t){return j.filter(n,j.matches(t))},j.findWhere=function(n,t){return j.find(n,j.matches(t))},j.max=function(n,t,r){if(!t&&j.isArray(n)&&n[0]===+n[0]&&n.length<65535)return Math.max.apply(Math,n);var e=-1/0,u=-1/0;return A(n,function(n,i,a){var o=t?t.call(r,n,i,a):n;o>u&&(e=n,u=o)}),e},j.min=function(n,t,r){if(!t&&j.isArray(n)&&n[0]===+n[0]&&n.length<65535)return Math.min.apply(Math,n);var e=1/0,u=1/0;return A(n,function(n,i,a){var o=t?t.call(r,n,i,a):n;u>o&&(e=n,u=o)}),e},j.shuffle=function(n){var t,r=0,e=[];return A(n,function(n){t=j.random(r++),e[r-1]=e[t],e[t]=n}),e},j.sample=function(n,t,r){return null==t||r?(n.length!==+n.length&&(n=j.values(n)),n[j.random(n.length-1)]):j.shuffle(n).slice(0,Math.max(0,t))};var E=function(n){return null==n?j.identity:j.isFunction(n)?n:j.property(n)};j.sortBy=function(n,t,r){return t=E(t),j.pluck(j.map(n,function(n,e,u){return{value:n,index:e,criteria:t.call(r,n,e,u)}}).sort(function(n,t){var r=n.criteria,e=t.criteria;if(r!==e){if(r>e||r===void 0)return 1;if(e>r||e===void 0)return-1}return n.index-t.index}),"value")};var F=function(n){return function(t,r,e){var u={};return r=E(r),A(t,function(i,a){var o=r.call(e,i,a,t);n(u,o,i)}),u}};j.groupBy=F(function(n,t,r){j.has(n,t)?n[t].push(r):n[t]=[r]}),j.indexBy=F(function(n,t,r){n[t]=r}),j.countBy=F(function(n,t){j.has(n,t)?n[t]++:n[t]=1}),j.sortedIndex=function(n,t,r,e){r=E(r);for(var u=r.call(e,t),i=0,a=n.length;a>i;){var o=i+a>>>1;r.call(e,n[o])t?[]:o.call(n,0,t)},j.initial=function(n,t,r){return o.call(n,0,n.length-(null==t||r?1:t))},j.last=function(n,t,r){return null==n?void 0:null==t||r?n[n.length-1]:o.call(n,Math.max(n.length-t,0))},j.rest=j.tail=j.drop=function(n,t,r){return o.call(n,null==t||r?1:t)},j.compact=function(n){return j.filter(n,j.identity)};var M=function(n,t,r){return t&&j.every(n,j.isArray)?c.apply(r,n):(A(n,function(n){j.isArray(n)||j.isArguments(n)?t?a.apply(r,n):M(n,t,r):r.push(n)}),r)};j.flatten=function(n,t){return M(n,t,[])},j.without=function(n){return j.difference(n,o.call(arguments,1))},j.partition=function(n,t){var r=[],e=[];return A(n,function(n){(t(n)?r:e).push(n)}),[r,e]},j.uniq=j.unique=function(n,t,r,e){j.isFunction(t)&&(e=r,r=t,t=!1);var u=r?j.map(n,r,e):n,i=[],a=[];return A(u,function(r,e){(t?e&&a[a.length-1]===r:j.contains(a,r))||(a.push(r),i.push(n[e]))}),i},j.union=function(){return j.uniq(j.flatten(arguments,!0))},j.intersection=function(n){var t=o.call(arguments,1);return j.filter(j.uniq(n),function(n){return j.every(t,function(t){return j.contains(t,n)})})},j.difference=function(n){var t=c.apply(e,o.call(arguments,1));return j.filter(n,function(n){return!j.contains(t,n)})},j.zip=function(){for(var n=j.max(j.pluck(arguments,"length").concat(0)),t=new Array(n),r=0;n>r;r++)t[r]=j.pluck(arguments,""+r);return t},j.object=function(n,t){if(null==n)return{};for(var r={},e=0,u=n.length;u>e;e++)t?r[n[e]]=t[e]:r[n[e][0]]=n[e][1];return r},j.indexOf=function(n,t,r){if(null==n)return-1;var e=0,u=n.length;if(r){if("number"!=typeof r)return e=j.sortedIndex(n,t),n[e]===t?e:-1;e=0>r?Math.max(0,u+r):r}if(y&&n.indexOf===y)return n.indexOf(t,r);for(;u>e;e++)if(n[e]===t)return e;return-1},j.lastIndexOf=function(n,t,r){if(null==n)return-1;var e=null!=r;if(b&&n.lastIndexOf===b)return e?n.lastIndexOf(t,r):n.lastIndexOf(t);for(var u=e?r:n.length;u--;)if(n[u]===t)return u;return-1},j.range=function(n,t,r){arguments.length<=1&&(t=n||0,n=0),r=arguments[2]||1;for(var e=Math.max(Math.ceil((t-n)/r),0),u=0,i=new Array(e);e>u;)i[u++]=n,n+=r;return i};var R=function(){};j.bind=function(n,t){var r,e;if(_&&n.bind===_)return _.apply(n,o.call(arguments,1));if(!j.isFunction(n))throw new TypeError;return r=o.call(arguments,2),e=function(){if(!(this instanceof e))return n.apply(t,r.concat(o.call(arguments)));R.prototype=n.prototype;var u=new R;R.prototype=null;var i=n.apply(u,r.concat(o.call(arguments)));return Object(i)===i?i:u}},j.partial=function(n){var t=o.call(arguments,1);return function(){for(var r=0,e=t.slice(),u=0,i=e.length;i>u;u++)e[u]===j&&(e[u]=arguments[r++]);for(;r=f?(clearTimeout(a),a=null,o=l,i=n.apply(e,u),e=u=null):a||r.trailing===!1||(a=setTimeout(c,f)),i}},j.debounce=function(n,t,r){var e,u,i,a,o,c=function(){var l=j.now()-a;t>l?e=setTimeout(c,t-l):(e=null,r||(o=n.apply(i,u),i=u=null))};return function(){i=this,u=arguments,a=j.now();var l=r&&!e;return e||(e=setTimeout(c,t)),l&&(o=n.apply(i,u),i=u=null),o}},j.once=function(n){var t,r=!1;return function(){return r?t:(r=!0,t=n.apply(this,arguments),n=null,t)}},j.wrap=function(n,t){return j.partial(t,n)},j.compose=function(){var n=arguments;return function(){for(var t=arguments,r=n.length-1;r>=0;r--)t=[n[r].apply(this,t)];return t[0]}},j.after=function(n,t){return function(){return--n<1?t.apply(this,arguments):void 0}},j.keys=function(n){if(!j.isObject(n))return[];if(w)return w(n);var t=[];for(var r in n)j.has(n,r)&&t.push(r);return t},j.values=function(n){for(var t=j.keys(n),r=t.length,e=new Array(r),u=0;r>u;u++)e[u]=n[t[u]];return e},j.pairs=function(n){for(var t=j.keys(n),r=t.length,e=new Array(r),u=0;r>u;u++)e[u]=[t[u],n[t[u]]];return e},j.invert=function(n){for(var t={},r=j.keys(n),e=0,u=r.length;u>e;e++)t[n[r[e]]]=r[e];return t},j.functions=j.methods=function(n){var t=[];for(var r in n)j.isFunction(n[r])&&t.push(r);return t.sort()},j.extend=function(n){return A(o.call(arguments,1),function(t){if(t)for(var r in t)n[r]=t[r]}),n},j.pick=function(n){var t={},r=c.apply(e,o.call(arguments,1));return A(r,function(r){r in n&&(t[r]=n[r])}),t},j.omit=function(n){var t={},r=c.apply(e,o.call(arguments,1));for(var u in n)j.contains(r,u)||(t[u]=n[u]);return t},j.defaults=function(n){return A(o.call(arguments,1),function(t){if(t)for(var r in t)n[r]===void 0&&(n[r]=t[r])}),n},j.clone=function(n){return j.isObject(n)?j.isArray(n)?n.slice():j.extend({},n):n},j.tap=function(n,t){return t(n),n};var S=function(n,t,r,e){if(n===t)return 0!==n||1/n==1/t;if(null==n||null==t)return n===t;n instanceof j&&(n=n._wrapped),t instanceof j&&(t=t._wrapped);var u=l.call(n);if(u!=l.call(t))return!1;switch(u){case"[object String]":return n==String(t);case"[object Number]":return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case"[object Date]":case"[object Boolean]":return+n==+t;case"[object RegExp]":return n.source==t.source&&n.global==t.global&&n.multiline==t.multiline&&n.ignoreCase==t.ignoreCase}if("object"!=typeof n||"object"!=typeof t)return!1;for(var i=r.length;i--;)if(r[i]==n)return e[i]==t;var a=n.constructor,o=t.constructor;if(a!==o&&!(j.isFunction(a)&&a instanceof a&&j.isFunction(o)&&o instanceof o)&&"constructor"in n&&"constructor"in t)return!1;r.push(n),e.push(t);var c=0,f=!0;if("[object Array]"==u){if(c=n.length,f=c==t.length)for(;c--&&(f=S(n[c],t[c],r,e)););}else{for(var s in n)if(j.has(n,s)&&(c++,!(f=j.has(t,s)&&S(n[s],t[s],r,e))))break;if(f){for(s in t)if(j.has(t,s)&&!c--)break;f=!c}}return r.pop(),e.pop(),f};j.isEqual=function(n,t){return S(n,t,[],[])},j.isEmpty=function(n){if(null==n)return!0;if(j.isArray(n)||j.isString(n))return 0===n.length;for(var t in n)if(j.has(n,t))return!1;return!0},j.isElement=function(n){return!(!n||1!==n.nodeType)},j.isArray=x||function(n){return"[object Array]"==l.call(n)},j.isObject=function(n){return n===Object(n)},A(["Arguments","Function","String","Number","Date","RegExp"],function(n){j["is"+n]=function(t){return l.call(t)=="[object "+n+"]"}}),j.isArguments(arguments)||(j.isArguments=function(n){return!(!n||!j.has(n,"callee"))}),"function"!=typeof/./&&(j.isFunction=function(n){return"function"==typeof n}),j.isFinite=function(n){return isFinite(n)&&!isNaN(parseFloat(n))},j.isNaN=function(n){return j.isNumber(n)&&n!=+n},j.isBoolean=function(n){return n===!0||n===!1||"[object Boolean]"==l.call(n)},j.isNull=function(n){return null===n},j.isUndefined=function(n){return n===void 0},j.has=function(n,t){return f.call(n,t)},j.noConflict=function(){return n._=t,this},j.identity=function(n){return n},j.constant=function(n){return function(){return n}},j.property=function(n){return function(t){return t[n]}},j.matches=function(n){return function(t){if(t===n)return!0;for(var r in n)if(n[r]!==t[r])return!1;return!0}},j.times=function(n,t,r){for(var e=Array(Math.max(0,n)),u=0;n>u;u++)e[u]=t.call(r,u);return e},j.random=function(n,t){return null==t&&(t=n,n=0),n+Math.floor(Math.random()*(t-n+1))},j.now=Date.now||function(){return(new Date).getTime()};var T={escape:{"&":"&","<":"<",">":">",'"':""","'":"'"}};T.unescape=j.invert(T.escape);var I={escape:new RegExp("["+j.keys(T.escape).join("")+"]","g"),unescape:new RegExp("("+j.keys(T.unescape).join("|")+")","g")};j.each(["escape","unescape"],function(n){j[n]=function(t){return null==t?"":(""+t).replace(I[n],function(t){return T[n][t]})}}),j.result=function(n,t){if(null==n)return void 0;var r=n[t];return j.isFunction(r)?r.call(n):r},j.mixin=function(n){A(j.functions(n),function(t){var r=j[t]=n[t];j.prototype[t]=function(){var n=[this._wrapped];return a.apply(n,arguments),z.call(this,r.apply(j,n))}})};var N=0;j.uniqueId=function(n){var t=++N+"";return n?n+t:t},j.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var q=/(.)^/,B={"'":"'","\\":"\\","\r":"r","\n":"n"," ":"t","\u2028":"u2028","\u2029":"u2029"},D=/\\|'|\r|\n|\t|\u2028|\u2029/g;j.template=function(n,t,r){var e;r=j.defaults({},r,j.templateSettings);var u=new RegExp([(r.escape||q).source,(r.interpolate||q).source,(r.evaluate||q).source].join("|")+"|$","g"),i=0,a="__p+='";n.replace(u,function(t,r,e,u,o){return a+=n.slice(i,o).replace(D,function(n){return"\\"+B[n]}),r&&(a+="'+\n((__t=("+r+"))==null?'':_.escape(__t))+\n'"),e&&(a+="'+\n((__t=("+e+"))==null?'':__t)+\n'"),u&&(a+="';\n"+u+"\n__p+='"),i=o+t.length,t}),a+="';\n",r.variable||(a="with(obj||{}){\n"+a+"}\n"),a="var __t,__p='',__j=Array.prototype.join,"+"print=function(){__p+=__j.call(arguments,'');};\n"+a+"return __p;\n";try{e=new Function(r.variable||"obj","_",a)}catch(o){throw o.source=a,o}if(t)return e(t,j);var c=function(n){return e.call(this,n,j)};return c.source="function("+(r.variable||"obj")+"){\n"+a+"}",c},j.chain=function(n){return j(n).chain()};var z=function(n){return this._chain?j(n).chain():n};j.mixin(j),A(["pop","push","reverse","shift","sort","splice","unshift"],function(n){var t=e[n];j.prototype[n]=function(){var r=this._wrapped;return t.apply(r,arguments),"shift"!=n&&"splice"!=n||0!==r.length||delete r[0],z.call(this,r)}}),A(["concat","join","slice"],function(n){var t=e[n];j.prototype[n]=function(){return z.call(this,t.apply(this._wrapped,arguments))}}),j.extend(j.prototype,{chain:function(){return this._chain=!0,this},value:function(){return this._wrapped}}),"function"==typeof define&&define.amd&&define("underscore",[],function(){return j})}).call(this);
+//# sourceMappingURL=underscore-min.map
\ No newline at end of file
diff --git a/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/node_modules/underscore/underscore.js b/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/node_modules/underscore/underscore.js
new file mode 100644
index 0000000..9a4cabe
--- /dev/null
+++ b/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/node_modules/underscore/underscore.js
@@ -0,0 +1,1343 @@
+// Underscore.js 1.6.0
+// http://underscorejs.org
+// (c) 2009-2014 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+// Underscore may be freely distributed under the MIT license.
+
+(function() {
+
+ // Baseline setup
+ // --------------
+
+ // Establish the root object, `window` in the browser, or `exports` on the server.
+ var root = this;
+
+ // Save the previous value of the `_` variable.
+ var previousUnderscore = root._;
+
+ // Establish the object that gets returned to break out of a loop iteration.
+ var breaker = {};
+
+ // Save bytes in the minified (but not gzipped) version:
+ var ArrayProto = Array.prototype, ObjProto = Object.prototype, FuncProto = Function.prototype;
+
+ // Create quick reference variables for speed access to core prototypes.
+ var
+ push = ArrayProto.push,
+ slice = ArrayProto.slice,
+ concat = ArrayProto.concat,
+ toString = ObjProto.toString,
+ hasOwnProperty = ObjProto.hasOwnProperty;
+
+ // All **ECMAScript 5** native function implementations that we hope to use
+ // are declared here.
+ var
+ nativeForEach = ArrayProto.forEach,
+ nativeMap = ArrayProto.map,
+ nativeReduce = ArrayProto.reduce,
+ nativeReduceRight = ArrayProto.reduceRight,
+ nativeFilter = ArrayProto.filter,
+ nativeEvery = ArrayProto.every,
+ nativeSome = ArrayProto.some,
+ nativeIndexOf = ArrayProto.indexOf,
+ nativeLastIndexOf = ArrayProto.lastIndexOf,
+ nativeIsArray = Array.isArray,
+ nativeKeys = Object.keys,
+ nativeBind = FuncProto.bind;
+
+ // Create a safe reference to the Underscore object for use below.
+ var _ = function(obj) {
+ if (obj instanceof _) return obj;
+ if (!(this instanceof _)) return new _(obj);
+ this._wrapped = obj;
+ };
+
+ // Export the Underscore object for **Node.js**, with
+ // backwards-compatibility for the old `require()` API. If we're in
+ // the browser, add `_` as a global object via a string identifier,
+ // for Closure Compiler "advanced" mode.
+ if (typeof exports !== 'undefined') {
+ if (typeof module !== 'undefined' && module.exports) {
+ exports = module.exports = _;
+ }
+ exports._ = _;
+ } else {
+ root._ = _;
+ }
+
+ // Current version.
+ _.VERSION = '1.6.0';
+
+ // Collection Functions
+ // --------------------
+
+ // The cornerstone, an `each` implementation, aka `forEach`.
+ // Handles objects with the built-in `forEach`, arrays, and raw objects.
+ // Delegates to **ECMAScript 5**'s native `forEach` if available.
+ var each = _.each = _.forEach = function(obj, iterator, context) {
+ if (obj == null) return obj;
+ if (nativeForEach && obj.forEach === nativeForEach) {
+ obj.forEach(iterator, context);
+ } else if (obj.length === +obj.length) {
+ for (var i = 0, length = obj.length; i < length; i++) {
+ if (iterator.call(context, obj[i], i, obj) === breaker) return;
+ }
+ } else {
+ var keys = _.keys(obj);
+ for (var i = 0, length = keys.length; i < length; i++) {
+ if (iterator.call(context, obj[keys[i]], keys[i], obj) === breaker) return;
+ }
+ }
+ return obj;
+ };
+
+ // Return the results of applying the iterator to each element.
+ // Delegates to **ECMAScript 5**'s native `map` if available.
+ _.map = _.collect = function(obj, iterator, context) {
+ var results = [];
+ if (obj == null) return results;
+ if (nativeMap && obj.map === nativeMap) return obj.map(iterator, context);
+ each(obj, function(value, index, list) {
+ results.push(iterator.call(context, value, index, list));
+ });
+ return results;
+ };
+
+ var reduceError = 'Reduce of empty array with no initial value';
+
+ // **Reduce** builds up a single result from a list of values, aka `inject`,
+ // or `foldl`. Delegates to **ECMAScript 5**'s native `reduce` if available.
+ _.reduce = _.foldl = _.inject = function(obj, iterator, memo, context) {
+ var initial = arguments.length > 2;
+ if (obj == null) obj = [];
+ if (nativeReduce && obj.reduce === nativeReduce) {
+ if (context) iterator = _.bind(iterator, context);
+ return initial ? obj.reduce(iterator, memo) : obj.reduce(iterator);
+ }
+ each(obj, function(value, index, list) {
+ if (!initial) {
+ memo = value;
+ initial = true;
+ } else {
+ memo = iterator.call(context, memo, value, index, list);
+ }
+ });
+ if (!initial) throw new TypeError(reduceError);
+ return memo;
+ };
+
+ // The right-associative version of reduce, also known as `foldr`.
+ // Delegates to **ECMAScript 5**'s native `reduceRight` if available.
+ _.reduceRight = _.foldr = function(obj, iterator, memo, context) {
+ var initial = arguments.length > 2;
+ if (obj == null) obj = [];
+ if (nativeReduceRight && obj.reduceRight === nativeReduceRight) {
+ if (context) iterator = _.bind(iterator, context);
+ return initial ? obj.reduceRight(iterator, memo) : obj.reduceRight(iterator);
+ }
+ var length = obj.length;
+ if (length !== +length) {
+ var keys = _.keys(obj);
+ length = keys.length;
+ }
+ each(obj, function(value, index, list) {
+ index = keys ? keys[--length] : --length;
+ if (!initial) {
+ memo = obj[index];
+ initial = true;
+ } else {
+ memo = iterator.call(context, memo, obj[index], index, list);
+ }
+ });
+ if (!initial) throw new TypeError(reduceError);
+ return memo;
+ };
+
+ // Return the first value which passes a truth test. Aliased as `detect`.
+ _.find = _.detect = function(obj, predicate, context) {
+ var result;
+ any(obj, function(value, index, list) {
+ if (predicate.call(context, value, index, list)) {
+ result = value;
+ return true;
+ }
+ });
+ return result;
+ };
+
+ // Return all the elements that pass a truth test.
+ // Delegates to **ECMAScript 5**'s native `filter` if available.
+ // Aliased as `select`.
+ _.filter = _.select = function(obj, predicate, context) {
+ var results = [];
+ if (obj == null) return results;
+ if (nativeFilter && obj.filter === nativeFilter) return obj.filter(predicate, context);
+ each(obj, function(value, index, list) {
+ if (predicate.call(context, value, index, list)) results.push(value);
+ });
+ return results;
+ };
+
+ // Return all the elements for which a truth test fails.
+ _.reject = function(obj, predicate, context) {
+ return _.filter(obj, function(value, index, list) {
+ return !predicate.call(context, value, index, list);
+ }, context);
+ };
+
+ // Determine whether all of the elements match a truth test.
+ // Delegates to **ECMAScript 5**'s native `every` if available.
+ // Aliased as `all`.
+ _.every = _.all = function(obj, predicate, context) {
+ predicate || (predicate = _.identity);
+ var result = true;
+ if (obj == null) return result;
+ if (nativeEvery && obj.every === nativeEvery) return obj.every(predicate, context);
+ each(obj, function(value, index, list) {
+ if (!(result = result && predicate.call(context, value, index, list))) return breaker;
+ });
+ return !!result;
+ };
+
+ // Determine if at least one element in the object matches a truth test.
+ // Delegates to **ECMAScript 5**'s native `some` if available.
+ // Aliased as `any`.
+ var any = _.some = _.any = function(obj, predicate, context) {
+ predicate || (predicate = _.identity);
+ var result = false;
+ if (obj == null) return result;
+ if (nativeSome && obj.some === nativeSome) return obj.some(predicate, context);
+ each(obj, function(value, index, list) {
+ if (result || (result = predicate.call(context, value, index, list))) return breaker;
+ });
+ return !!result;
+ };
+
+ // Determine if the array or object contains a given value (using `===`).
+ // Aliased as `include`.
+ _.contains = _.include = function(obj, target) {
+ if (obj == null) return false;
+ if (nativeIndexOf && obj.indexOf === nativeIndexOf) return obj.indexOf(target) != -1;
+ return any(obj, function(value) {
+ return value === target;
+ });
+ };
+
+ // Invoke a method (with arguments) on every item in a collection.
+ _.invoke = function(obj, method) {
+ var args = slice.call(arguments, 2);
+ var isFunc = _.isFunction(method);
+ return _.map(obj, function(value) {
+ return (isFunc ? method : value[method]).apply(value, args);
+ });
+ };
+
+ // Convenience version of a common use case of `map`: fetching a property.
+ _.pluck = function(obj, key) {
+ return _.map(obj, _.property(key));
+ };
+
+ // Convenience version of a common use case of `filter`: selecting only objects
+ // containing specific `key:value` pairs.
+ _.where = function(obj, attrs) {
+ return _.filter(obj, _.matches(attrs));
+ };
+
+ // Convenience version of a common use case of `find`: getting the first object
+ // containing specific `key:value` pairs.
+ _.findWhere = function(obj, attrs) {
+ return _.find(obj, _.matches(attrs));
+ };
+
+ // Return the maximum element or (element-based computation).
+ // Can't optimize arrays of integers longer than 65,535 elements.
+ // See [WebKit Bug 80797](https://bugs.webkit.org/show_bug.cgi?id=80797)
+ _.max = function(obj, iterator, context) {
+ if (!iterator && _.isArray(obj) && obj[0] === +obj[0] && obj.length < 65535) {
+ return Math.max.apply(Math, obj);
+ }
+ var result = -Infinity, lastComputed = -Infinity;
+ each(obj, function(value, index, list) {
+ var computed = iterator ? iterator.call(context, value, index, list) : value;
+ if (computed > lastComputed) {
+ result = value;
+ lastComputed = computed;
+ }
+ });
+ return result;
+ };
+
+ // Return the minimum element (or element-based computation).
+ _.min = function(obj, iterator, context) {
+ if (!iterator && _.isArray(obj) && obj[0] === +obj[0] && obj.length < 65535) {
+ return Math.min.apply(Math, obj);
+ }
+ var result = Infinity, lastComputed = Infinity;
+ each(obj, function(value, index, list) {
+ var computed = iterator ? iterator.call(context, value, index, list) : value;
+ if (computed < lastComputed) {
+ result = value;
+ lastComputed = computed;
+ }
+ });
+ return result;
+ };
+
+ // Shuffle an array, using the modern version of the
+ // [Fisher-Yates shuffle](http://en.wikipedia.org/wiki/Fisher–Yates_shuffle).
+ _.shuffle = function(obj) {
+ var rand;
+ var index = 0;
+ var shuffled = [];
+ each(obj, function(value) {
+ rand = _.random(index++);
+ shuffled[index - 1] = shuffled[rand];
+ shuffled[rand] = value;
+ });
+ return shuffled;
+ };
+
+ // Sample **n** random values from a collection.
+ // If **n** is not specified, returns a single random element.
+ // The internal `guard` argument allows it to work with `map`.
+ _.sample = function(obj, n, guard) {
+ if (n == null || guard) {
+ if (obj.length !== +obj.length) obj = _.values(obj);
+ return obj[_.random(obj.length - 1)];
+ }
+ return _.shuffle(obj).slice(0, Math.max(0, n));
+ };
+
+ // An internal function to generate lookup iterators.
+ var lookupIterator = function(value) {
+ if (value == null) return _.identity;
+ if (_.isFunction(value)) return value;
+ return _.property(value);
+ };
+
+ // Sort the object's values by a criterion produced by an iterator.
+ _.sortBy = function(obj, iterator, context) {
+ iterator = lookupIterator(iterator);
+ return _.pluck(_.map(obj, function(value, index, list) {
+ return {
+ value: value,
+ index: index,
+ criteria: iterator.call(context, value, index, list)
+ };
+ }).sort(function(left, right) {
+ var a = left.criteria;
+ var b = right.criteria;
+ if (a !== b) {
+ if (a > b || a === void 0) return 1;
+ if (a < b || b === void 0) return -1;
+ }
+ return left.index - right.index;
+ }), 'value');
+ };
+
+ // An internal function used for aggregate "group by" operations.
+ var group = function(behavior) {
+ return function(obj, iterator, context) {
+ var result = {};
+ iterator = lookupIterator(iterator);
+ each(obj, function(value, index) {
+ var key = iterator.call(context, value, index, obj);
+ behavior(result, key, value);
+ });
+ return result;
+ };
+ };
+
+ // Groups the object's values by a criterion. Pass either a string attribute
+ // to group by, or a function that returns the criterion.
+ _.groupBy = group(function(result, key, value) {
+ _.has(result, key) ? result[key].push(value) : result[key] = [value];
+ });
+
+ // Indexes the object's values by a criterion, similar to `groupBy`, but for
+ // when you know that your index values will be unique.
+ _.indexBy = group(function(result, key, value) {
+ result[key] = value;
+ });
+
+ // Counts instances of an object that group by a certain criterion. Pass
+ // either a string attribute to count by, or a function that returns the
+ // criterion.
+ _.countBy = group(function(result, key) {
+ _.has(result, key) ? result[key]++ : result[key] = 1;
+ });
+
+ // Use a comparator function to figure out the smallest index at which
+ // an object should be inserted so as to maintain order. Uses binary search.
+ _.sortedIndex = function(array, obj, iterator, context) {
+ iterator = lookupIterator(iterator);
+ var value = iterator.call(context, obj);
+ var low = 0, high = array.length;
+ while (low < high) {
+ var mid = (low + high) >>> 1;
+ iterator.call(context, array[mid]) < value ? low = mid + 1 : high = mid;
+ }
+ return low;
+ };
+
+ // Safely create a real, live array from anything iterable.
+ _.toArray = function(obj) {
+ if (!obj) return [];
+ if (_.isArray(obj)) return slice.call(obj);
+ if (obj.length === +obj.length) return _.map(obj, _.identity);
+ return _.values(obj);
+ };
+
+ // Return the number of elements in an object.
+ _.size = function(obj) {
+ if (obj == null) return 0;
+ return (obj.length === +obj.length) ? obj.length : _.keys(obj).length;
+ };
+
+ // Array Functions
+ // ---------------
+
+ // Get the first element of an array. Passing **n** will return the first N
+ // values in the array. Aliased as `head` and `take`. The **guard** check
+ // allows it to work with `_.map`.
+ _.first = _.head = _.take = function(array, n, guard) {
+ if (array == null) return void 0;
+ if ((n == null) || guard) return array[0];
+ if (n < 0) return [];
+ return slice.call(array, 0, n);
+ };
+
+ // Returns everything but the last entry of the array. Especially useful on
+ // the arguments object. Passing **n** will return all the values in
+ // the array, excluding the last N. The **guard** check allows it to work with
+ // `_.map`.
+ _.initial = function(array, n, guard) {
+ return slice.call(array, 0, array.length - ((n == null) || guard ? 1 : n));
+ };
+
+ // Get the last element of an array. Passing **n** will return the last N
+ // values in the array. The **guard** check allows it to work with `_.map`.
+ _.last = function(array, n, guard) {
+ if (array == null) return void 0;
+ if ((n == null) || guard) return array[array.length - 1];
+ return slice.call(array, Math.max(array.length - n, 0));
+ };
+
+ // Returns everything but the first entry of the array. Aliased as `tail` and `drop`.
+ // Especially useful on the arguments object. Passing an **n** will return
+ // the rest N values in the array. The **guard**
+ // check allows it to work with `_.map`.
+ _.rest = _.tail = _.drop = function(array, n, guard) {
+ return slice.call(array, (n == null) || guard ? 1 : n);
+ };
+
+ // Trim out all falsy values from an array.
+ _.compact = function(array) {
+ return _.filter(array, _.identity);
+ };
+
+ // Internal implementation of a recursive `flatten` function.
+ var flatten = function(input, shallow, output) {
+ if (shallow && _.every(input, _.isArray)) {
+ return concat.apply(output, input);
+ }
+ each(input, function(value) {
+ if (_.isArray(value) || _.isArguments(value)) {
+ shallow ? push.apply(output, value) : flatten(value, shallow, output);
+ } else {
+ output.push(value);
+ }
+ });
+ return output;
+ };
+
+ // Flatten out an array, either recursively (by default), or just one level.
+ _.flatten = function(array, shallow) {
+ return flatten(array, shallow, []);
+ };
+
+ // Return a version of the array that does not contain the specified value(s).
+ _.without = function(array) {
+ return _.difference(array, slice.call(arguments, 1));
+ };
+
+ // Split an array into two arrays: one whose elements all satisfy the given
+ // predicate, and one whose elements all do not satisfy the predicate.
+ _.partition = function(array, predicate) {
+ var pass = [], fail = [];
+ each(array, function(elem) {
+ (predicate(elem) ? pass : fail).push(elem);
+ });
+ return [pass, fail];
+ };
+
+ // Produce a duplicate-free version of the array. If the array has already
+ // been sorted, you have the option of using a faster algorithm.
+ // Aliased as `unique`.
+ _.uniq = _.unique = function(array, isSorted, iterator, context) {
+ if (_.isFunction(isSorted)) {
+ context = iterator;
+ iterator = isSorted;
+ isSorted = false;
+ }
+ var initial = iterator ? _.map(array, iterator, context) : array;
+ var results = [];
+ var seen = [];
+ each(initial, function(value, index) {
+ if (isSorted ? (!index || seen[seen.length - 1] !== value) : !_.contains(seen, value)) {
+ seen.push(value);
+ results.push(array[index]);
+ }
+ });
+ return results;
+ };
+
+ // Produce an array that contains the union: each distinct element from all of
+ // the passed-in arrays.
+ _.union = function() {
+ return _.uniq(_.flatten(arguments, true));
+ };
+
+ // Produce an array that contains every item shared between all the
+ // passed-in arrays.
+ _.intersection = function(array) {
+ var rest = slice.call(arguments, 1);
+ return _.filter(_.uniq(array), function(item) {
+ return _.every(rest, function(other) {
+ return _.contains(other, item);
+ });
+ });
+ };
+
+ // Take the difference between one array and a number of other arrays.
+ // Only the elements present in just the first array will remain.
+ _.difference = function(array) {
+ var rest = concat.apply(ArrayProto, slice.call(arguments, 1));
+ return _.filter(array, function(value){ return !_.contains(rest, value); });
+ };
+
+ // Zip together multiple lists into a single array -- elements that share
+ // an index go together.
+ _.zip = function() {
+ var length = _.max(_.pluck(arguments, 'length').concat(0));
+ var results = new Array(length);
+ for (var i = 0; i < length; i++) {
+ results[i] = _.pluck(arguments, '' + i);
+ }
+ return results;
+ };
+
+ // Converts lists into objects. Pass either a single array of `[key, value]`
+ // pairs, or two parallel arrays of the same length -- one of keys, and one of
+ // the corresponding values.
+ _.object = function(list, values) {
+ if (list == null) return {};
+ var result = {};
+ for (var i = 0, length = list.length; i < length; i++) {
+ if (values) {
+ result[list[i]] = values[i];
+ } else {
+ result[list[i][0]] = list[i][1];
+ }
+ }
+ return result;
+ };
+
+ // If the browser doesn't supply us with indexOf (I'm looking at you, **MSIE**),
+ // we need this function. Return the position of the first occurrence of an
+ // item in an array, or -1 if the item is not included in the array.
+ // Delegates to **ECMAScript 5**'s native `indexOf` if available.
+ // If the array is large and already in sort order, pass `true`
+ // for **isSorted** to use binary search.
+ _.indexOf = function(array, item, isSorted) {
+ if (array == null) return -1;
+ var i = 0, length = array.length;
+ if (isSorted) {
+ if (typeof isSorted == 'number') {
+ i = (isSorted < 0 ? Math.max(0, length + isSorted) : isSorted);
+ } else {
+ i = _.sortedIndex(array, item);
+ return array[i] === item ? i : -1;
+ }
+ }
+ if (nativeIndexOf && array.indexOf === nativeIndexOf) return array.indexOf(item, isSorted);
+ for (; i < length; i++) if (array[i] === item) return i;
+ return -1;
+ };
+
+ // Delegates to **ECMAScript 5**'s native `lastIndexOf` if available.
+ _.lastIndexOf = function(array, item, from) {
+ if (array == null) return -1;
+ var hasIndex = from != null;
+ if (nativeLastIndexOf && array.lastIndexOf === nativeLastIndexOf) {
+ return hasIndex ? array.lastIndexOf(item, from) : array.lastIndexOf(item);
+ }
+ var i = (hasIndex ? from : array.length);
+ while (i--) if (array[i] === item) return i;
+ return -1;
+ };
+
+ // Generate an integer Array containing an arithmetic progression. A port of
+ // the native Python `range()` function. See
+ // [the Python documentation](http://docs.python.org/library/functions.html#range).
+ _.range = function(start, stop, step) {
+ if (arguments.length <= 1) {
+ stop = start || 0;
+ start = 0;
+ }
+ step = arguments[2] || 1;
+
+ var length = Math.max(Math.ceil((stop - start) / step), 0);
+ var idx = 0;
+ var range = new Array(length);
+
+ while(idx < length) {
+ range[idx++] = start;
+ start += step;
+ }
+
+ return range;
+ };
+
+ // Function (ahem) Functions
+ // ------------------
+
+ // Reusable constructor function for prototype setting.
+ var ctor = function(){};
+
+ // Create a function bound to a given object (assigning `this`, and arguments,
+ // optionally). Delegates to **ECMAScript 5**'s native `Function.bind` if
+ // available.
+ _.bind = function(func, context) {
+ var args, bound;
+ if (nativeBind && func.bind === nativeBind) return nativeBind.apply(func, slice.call(arguments, 1));
+ if (!_.isFunction(func)) throw new TypeError;
+ args = slice.call(arguments, 2);
+ return bound = function() {
+ if (!(this instanceof bound)) return func.apply(context, args.concat(slice.call(arguments)));
+ ctor.prototype = func.prototype;
+ var self = new ctor;
+ ctor.prototype = null;
+ var result = func.apply(self, args.concat(slice.call(arguments)));
+ if (Object(result) === result) return result;
+ return self;
+ };
+ };
+
+ // Partially apply a function by creating a version that has had some of its
+ // arguments pre-filled, without changing its dynamic `this` context. _ acts
+ // as a placeholder, allowing any combination of arguments to be pre-filled.
+ _.partial = function(func) {
+ var boundArgs = slice.call(arguments, 1);
+ return function() {
+ var position = 0;
+ var args = boundArgs.slice();
+ for (var i = 0, length = args.length; i < length; i++) {
+ if (args[i] === _) args[i] = arguments[position++];
+ }
+ while (position < arguments.length) args.push(arguments[position++]);
+ return func.apply(this, args);
+ };
+ };
+
+ // Bind a number of an object's methods to that object. Remaining arguments
+ // are the method names to be bound. Useful for ensuring that all callbacks
+ // defined on an object belong to it.
+ _.bindAll = function(obj) {
+ var funcs = slice.call(arguments, 1);
+ if (funcs.length === 0) throw new Error('bindAll must be passed function names');
+ each(funcs, function(f) { obj[f] = _.bind(obj[f], obj); });
+ return obj;
+ };
+
+ // Memoize an expensive function by storing its results.
+ _.memoize = function(func, hasher) {
+ var memo = {};
+ hasher || (hasher = _.identity);
+ return function() {
+ var key = hasher.apply(this, arguments);
+ return _.has(memo, key) ? memo[key] : (memo[key] = func.apply(this, arguments));
+ };
+ };
+
+ // Delays a function for the given number of milliseconds, and then calls
+ // it with the arguments supplied.
+ _.delay = function(func, wait) {
+ var args = slice.call(arguments, 2);
+ return setTimeout(function(){ return func.apply(null, args); }, wait);
+ };
+
+ // Defers a function, scheduling it to run after the current call stack has
+ // cleared.
+ _.defer = function(func) {
+ return _.delay.apply(_, [func, 1].concat(slice.call(arguments, 1)));
+ };
+
+ // Returns a function, that, when invoked, will only be triggered at most once
+ // during a given window of time. Normally, the throttled function will run
+ // as much as it can, without ever going more than once per `wait` duration;
+ // but if you'd like to disable the execution on the leading edge, pass
+ // `{leading: false}`. To disable execution on the trailing edge, ditto.
+ _.throttle = function(func, wait, options) {
+ var context, args, result;
+ var timeout = null;
+ var previous = 0;
+ options || (options = {});
+ var later = function() {
+ previous = options.leading === false ? 0 : _.now();
+ timeout = null;
+ result = func.apply(context, args);
+ context = args = null;
+ };
+ return function() {
+ var now = _.now();
+ if (!previous && options.leading === false) previous = now;
+ var remaining = wait - (now - previous);
+ context = this;
+ args = arguments;
+ if (remaining <= 0) {
+ clearTimeout(timeout);
+ timeout = null;
+ previous = now;
+ result = func.apply(context, args);
+ context = args = null;
+ } else if (!timeout && options.trailing !== false) {
+ timeout = setTimeout(later, remaining);
+ }
+ return result;
+ };
+ };
+
+ // Returns a function, that, as long as it continues to be invoked, will not
+ // be triggered. The function will be called after it stops being called for
+ // N milliseconds. If `immediate` is passed, trigger the function on the
+ // leading edge, instead of the trailing.
+ _.debounce = function(func, wait, immediate) {
+ var timeout, args, context, timestamp, result;
+
+ var later = function() {
+ var last = _.now() - timestamp;
+ if (last < wait) {
+ timeout = setTimeout(later, wait - last);
+ } else {
+ timeout = null;
+ if (!immediate) {
+ result = func.apply(context, args);
+ context = args = null;
+ }
+ }
+ };
+
+ return function() {
+ context = this;
+ args = arguments;
+ timestamp = _.now();
+ var callNow = immediate && !timeout;
+ if (!timeout) {
+ timeout = setTimeout(later, wait);
+ }
+ if (callNow) {
+ result = func.apply(context, args);
+ context = args = null;
+ }
+
+ return result;
+ };
+ };
+
+ // Returns a function that will be executed at most one time, no matter how
+ // often you call it. Useful for lazy initialization.
+ _.once = function(func) {
+ var ran = false, memo;
+ return function() {
+ if (ran) return memo;
+ ran = true;
+ memo = func.apply(this, arguments);
+ func = null;
+ return memo;
+ };
+ };
+
+ // Returns the first function passed as an argument to the second,
+ // allowing you to adjust arguments, run code before and after, and
+ // conditionally execute the original function.
+ _.wrap = function(func, wrapper) {
+ return _.partial(wrapper, func);
+ };
+
+ // Returns a function that is the composition of a list of functions, each
+ // consuming the return value of the function that follows.
+ _.compose = function() {
+ var funcs = arguments;
+ return function() {
+ var args = arguments;
+ for (var i = funcs.length - 1; i >= 0; i--) {
+ args = [funcs[i].apply(this, args)];
+ }
+ return args[0];
+ };
+ };
+
+ // Returns a function that will only be executed after being called N times.
+ _.after = function(times, func) {
+ return function() {
+ if (--times < 1) {
+ return func.apply(this, arguments);
+ }
+ };
+ };
+
+ // Object Functions
+ // ----------------
+
+ // Retrieve the names of an object's properties.
+ // Delegates to **ECMAScript 5**'s native `Object.keys`
+ _.keys = function(obj) {
+ if (!_.isObject(obj)) return [];
+ if (nativeKeys) return nativeKeys(obj);
+ var keys = [];
+ for (var key in obj) if (_.has(obj, key)) keys.push(key);
+ return keys;
+ };
+
+ // Retrieve the values of an object's properties.
+ _.values = function(obj) {
+ var keys = _.keys(obj);
+ var length = keys.length;
+ var values = new Array(length);
+ for (var i = 0; i < length; i++) {
+ values[i] = obj[keys[i]];
+ }
+ return values;
+ };
+
+ // Convert an object into a list of `[key, value]` pairs.
+ _.pairs = function(obj) {
+ var keys = _.keys(obj);
+ var length = keys.length;
+ var pairs = new Array(length);
+ for (var i = 0; i < length; i++) {
+ pairs[i] = [keys[i], obj[keys[i]]];
+ }
+ return pairs;
+ };
+
+ // Invert the keys and values of an object. The values must be serializable.
+ _.invert = function(obj) {
+ var result = {};
+ var keys = _.keys(obj);
+ for (var i = 0, length = keys.length; i < length; i++) {
+ result[obj[keys[i]]] = keys[i];
+ }
+ return result;
+ };
+
+ // Return a sorted list of the function names available on the object.
+ // Aliased as `methods`
+ _.functions = _.methods = function(obj) {
+ var names = [];
+ for (var key in obj) {
+ if (_.isFunction(obj[key])) names.push(key);
+ }
+ return names.sort();
+ };
+
+ // Extend a given object with all the properties in passed-in object(s).
+ _.extend = function(obj) {
+ each(slice.call(arguments, 1), function(source) {
+ if (source) {
+ for (var prop in source) {
+ obj[prop] = source[prop];
+ }
+ }
+ });
+ return obj;
+ };
+
+ // Return a copy of the object only containing the whitelisted properties.
+ _.pick = function(obj) {
+ var copy = {};
+ var keys = concat.apply(ArrayProto, slice.call(arguments, 1));
+ each(keys, function(key) {
+ if (key in obj) copy[key] = obj[key];
+ });
+ return copy;
+ };
+
+ // Return a copy of the object without the blacklisted properties.
+ _.omit = function(obj) {
+ var copy = {};
+ var keys = concat.apply(ArrayProto, slice.call(arguments, 1));
+ for (var key in obj) {
+ if (!_.contains(keys, key)) copy[key] = obj[key];
+ }
+ return copy;
+ };
+
+ // Fill in a given object with default properties.
+ _.defaults = function(obj) {
+ each(slice.call(arguments, 1), function(source) {
+ if (source) {
+ for (var prop in source) {
+ if (obj[prop] === void 0) obj[prop] = source[prop];
+ }
+ }
+ });
+ return obj;
+ };
+
+ // Create a (shallow-cloned) duplicate of an object.
+ _.clone = function(obj) {
+ if (!_.isObject(obj)) return obj;
+ return _.isArray(obj) ? obj.slice() : _.extend({}, obj);
+ };
+
+ // Invokes interceptor with the obj, and then returns obj.
+ // The primary purpose of this method is to "tap into" a method chain, in
+ // order to perform operations on intermediate results within the chain.
+ _.tap = function(obj, interceptor) {
+ interceptor(obj);
+ return obj;
+ };
+
+ // Internal recursive comparison function for `isEqual`.
+ var eq = function(a, b, aStack, bStack) {
+ // Identical objects are equal. `0 === -0`, but they aren't identical.
+ // See the [Harmony `egal` proposal](http://wiki.ecmascript.org/doku.php?id=harmony:egal).
+ if (a === b) return a !== 0 || 1 / a == 1 / b;
+ // A strict comparison is necessary because `null == undefined`.
+ if (a == null || b == null) return a === b;
+ // Unwrap any wrapped objects.
+ if (a instanceof _) a = a._wrapped;
+ if (b instanceof _) b = b._wrapped;
+ // Compare `[[Class]]` names.
+ var className = toString.call(a);
+ if (className != toString.call(b)) return false;
+ switch (className) {
+ // Strings, numbers, dates, and booleans are compared by value.
+ case '[object String]':
+ // Primitives and their corresponding object wrappers are equivalent; thus, `"5"` is
+ // equivalent to `new String("5")`.
+ return a == String(b);
+ case '[object Number]':
+ // `NaN`s are equivalent, but non-reflexive. An `egal` comparison is performed for
+ // other numeric values.
+ return a != +a ? b != +b : (a == 0 ? 1 / a == 1 / b : a == +b);
+ case '[object Date]':
+ case '[object Boolean]':
+ // Coerce dates and booleans to numeric primitive values. Dates are compared by their
+ // millisecond representations. Note that invalid dates with millisecond representations
+ // of `NaN` are not equivalent.
+ return +a == +b;
+ // RegExps are compared by their source patterns and flags.
+ case '[object RegExp]':
+ return a.source == b.source &&
+ a.global == b.global &&
+ a.multiline == b.multiline &&
+ a.ignoreCase == b.ignoreCase;
+ }
+ if (typeof a != 'object' || typeof b != 'object') return false;
+ // Assume equality for cyclic structures. The algorithm for detecting cyclic
+ // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`.
+ var length = aStack.length;
+ while (length--) {
+ // Linear search. Performance is inversely proportional to the number of
+ // unique nested structures.
+ if (aStack[length] == a) return bStack[length] == b;
+ }
+ // Objects with different constructors are not equivalent, but `Object`s
+ // from different frames are.
+ var aCtor = a.constructor, bCtor = b.constructor;
+ if (aCtor !== bCtor && !(_.isFunction(aCtor) && (aCtor instanceof aCtor) &&
+ _.isFunction(bCtor) && (bCtor instanceof bCtor))
+ && ('constructor' in a && 'constructor' in b)) {
+ return false;
+ }
+ // Add the first object to the stack of traversed objects.
+ aStack.push(a);
+ bStack.push(b);
+ var size = 0, result = true;
+ // Recursively compare objects and arrays.
+ if (className == '[object Array]') {
+ // Compare array lengths to determine if a deep comparison is necessary.
+ size = a.length;
+ result = size == b.length;
+ if (result) {
+ // Deep compare the contents, ignoring non-numeric properties.
+ while (size--) {
+ if (!(result = eq(a[size], b[size], aStack, bStack))) break;
+ }
+ }
+ } else {
+ // Deep compare objects.
+ for (var key in a) {
+ if (_.has(a, key)) {
+ // Count the expected number of properties.
+ size++;
+ // Deep compare each member.
+ if (!(result = _.has(b, key) && eq(a[key], b[key], aStack, bStack))) break;
+ }
+ }
+ // Ensure that both objects contain the same number of properties.
+ if (result) {
+ for (key in b) {
+ if (_.has(b, key) && !(size--)) break;
+ }
+ result = !size;
+ }
+ }
+ // Remove the first object from the stack of traversed objects.
+ aStack.pop();
+ bStack.pop();
+ return result;
+ };
+
+ // Perform a deep comparison to check if two objects are equal.
+ _.isEqual = function(a, b) {
+ return eq(a, b, [], []);
+ };
+
+ // Is a given array, string, or object empty?
+ // An "empty" object has no enumerable own-properties.
+ _.isEmpty = function(obj) {
+ if (obj == null) return true;
+ if (_.isArray(obj) || _.isString(obj)) return obj.length === 0;
+ for (var key in obj) if (_.has(obj, key)) return false;
+ return true;
+ };
+
+ // Is a given value a DOM element?
+ _.isElement = function(obj) {
+ return !!(obj && obj.nodeType === 1);
+ };
+
+ // Is a given value an array?
+ // Delegates to ECMA5's native Array.isArray
+ _.isArray = nativeIsArray || function(obj) {
+ return toString.call(obj) == '[object Array]';
+ };
+
+ // Is a given variable an object?
+ _.isObject = function(obj) {
+ return obj === Object(obj);
+ };
+
+ // Add some isType methods: isArguments, isFunction, isString, isNumber, isDate, isRegExp.
+ each(['Arguments', 'Function', 'String', 'Number', 'Date', 'RegExp'], function(name) {
+ _['is' + name] = function(obj) {
+ return toString.call(obj) == '[object ' + name + ']';
+ };
+ });
+
+ // Define a fallback version of the method in browsers (ahem, IE), where
+ // there isn't any inspectable "Arguments" type.
+ if (!_.isArguments(arguments)) {
+ _.isArguments = function(obj) {
+ return !!(obj && _.has(obj, 'callee'));
+ };
+ }
+
+ // Optimize `isFunction` if appropriate.
+ if (typeof (/./) !== 'function') {
+ _.isFunction = function(obj) {
+ return typeof obj === 'function';
+ };
+ }
+
+ // Is a given object a finite number?
+ _.isFinite = function(obj) {
+ return isFinite(obj) && !isNaN(parseFloat(obj));
+ };
+
+ // Is the given value `NaN`? (NaN is the only number which does not equal itself).
+ _.isNaN = function(obj) {
+ return _.isNumber(obj) && obj != +obj;
+ };
+
+ // Is a given value a boolean?
+ _.isBoolean = function(obj) {
+ return obj === true || obj === false || toString.call(obj) == '[object Boolean]';
+ };
+
+ // Is a given value equal to null?
+ _.isNull = function(obj) {
+ return obj === null;
+ };
+
+ // Is a given variable undefined?
+ _.isUndefined = function(obj) {
+ return obj === void 0;
+ };
+
+ // Shortcut function for checking if an object has a given property directly
+ // on itself (in other words, not on a prototype).
+ _.has = function(obj, key) {
+ return hasOwnProperty.call(obj, key);
+ };
+
+ // Utility Functions
+ // -----------------
+
+ // Run Underscore.js in *noConflict* mode, returning the `_` variable to its
+ // previous owner. Returns a reference to the Underscore object.
+ _.noConflict = function() {
+ root._ = previousUnderscore;
+ return this;
+ };
+
+ // Keep the identity function around for default iterators.
+ _.identity = function(value) {
+ return value;
+ };
+
+ _.constant = function(value) {
+ return function () {
+ return value;
+ };
+ };
+
+ _.property = function(key) {
+ return function(obj) {
+ return obj[key];
+ };
+ };
+
+ // Returns a predicate for checking whether an object has a given set of `key:value` pairs.
+ _.matches = function(attrs) {
+ return function(obj) {
+ if (obj === attrs) return true; //avoid comparing an object to itself.
+ for (var key in attrs) {
+ if (attrs[key] !== obj[key])
+ return false;
+ }
+ return true;
+ }
+ };
+
+ // Run a function **n** times.
+ _.times = function(n, iterator, context) {
+ var accum = Array(Math.max(0, n));
+ for (var i = 0; i < n; i++) accum[i] = iterator.call(context, i);
+ return accum;
+ };
+
+ // Return a random integer between min and max (inclusive).
+ _.random = function(min, max) {
+ if (max == null) {
+ max = min;
+ min = 0;
+ }
+ return min + Math.floor(Math.random() * (max - min + 1));
+ };
+
+ // A (possibly faster) way to get the current timestamp as an integer.
+ _.now = Date.now || function() { return new Date().getTime(); };
+
+ // List of HTML entities for escaping.
+ var entityMap = {
+ escape: {
+ '&': '&',
+ '<': '<',
+ '>': '>',
+ '"': '"',
+ "'": '''
+ }
+ };
+ entityMap.unescape = _.invert(entityMap.escape);
+
+ // Regexes containing the keys and values listed immediately above.
+ var entityRegexes = {
+ escape: new RegExp('[' + _.keys(entityMap.escape).join('') + ']', 'g'),
+ unescape: new RegExp('(' + _.keys(entityMap.unescape).join('|') + ')', 'g')
+ };
+
+ // Functions for escaping and unescaping strings to/from HTML interpolation.
+ _.each(['escape', 'unescape'], function(method) {
+ _[method] = function(string) {
+ if (string == null) return '';
+ return ('' + string).replace(entityRegexes[method], function(match) {
+ return entityMap[method][match];
+ });
+ };
+ });
+
+ // If the value of the named `property` is a function then invoke it with the
+ // `object` as context; otherwise, return it.
+ _.result = function(object, property) {
+ if (object == null) return void 0;
+ var value = object[property];
+ return _.isFunction(value) ? value.call(object) : value;
+ };
+
+ // Add your own custom functions to the Underscore object.
+ _.mixin = function(obj) {
+ each(_.functions(obj), function(name) {
+ var func = _[name] = obj[name];
+ _.prototype[name] = function() {
+ var args = [this._wrapped];
+ push.apply(args, arguments);
+ return result.call(this, func.apply(_, args));
+ };
+ });
+ };
+
+ // Generate a unique integer id (unique within the entire client session).
+ // Useful for temporary DOM ids.
+ var idCounter = 0;
+ _.uniqueId = function(prefix) {
+ var id = ++idCounter + '';
+ return prefix ? prefix + id : id;
+ };
+
+ // By default, Underscore uses ERB-style template delimiters, change the
+ // following template settings to use alternative delimiters.
+ _.templateSettings = {
+ evaluate : /<%([\s\S]+?)%>/g,
+ interpolate : /<%=([\s\S]+?)%>/g,
+ escape : /<%-([\s\S]+?)%>/g
+ };
+
+ // When customizing `templateSettings`, if you don't want to define an
+ // interpolation, evaluation or escaping regex, we need one that is
+ // guaranteed not to match.
+ var noMatch = /(.)^/;
+
+ // Certain characters need to be escaped so that they can be put into a
+ // string literal.
+ var escapes = {
+ "'": "'",
+ '\\': '\\',
+ '\r': 'r',
+ '\n': 'n',
+ '\t': 't',
+ '\u2028': 'u2028',
+ '\u2029': 'u2029'
+ };
+
+ var escaper = /\\|'|\r|\n|\t|\u2028|\u2029/g;
+
+ // JavaScript micro-templating, similar to John Resig's implementation.
+ // Underscore templating handles arbitrary delimiters, preserves whitespace,
+ // and correctly escapes quotes within interpolated code.
+ _.template = function(text, data, settings) {
+ var render;
+ settings = _.defaults({}, settings, _.templateSettings);
+
+ // Combine delimiters into one regular expression via alternation.
+ var matcher = new RegExp([
+ (settings.escape || noMatch).source,
+ (settings.interpolate || noMatch).source,
+ (settings.evaluate || noMatch).source
+ ].join('|') + '|$', 'g');
+
+ // Compile the template source, escaping string literals appropriately.
+ var index = 0;
+ var source = "__p+='";
+ text.replace(matcher, function(match, escape, interpolate, evaluate, offset) {
+ source += text.slice(index, offset)
+ .replace(escaper, function(match) { return '\\' + escapes[match]; });
+
+ if (escape) {
+ source += "'+\n((__t=(" + escape + "))==null?'':_.escape(__t))+\n'";
+ }
+ if (interpolate) {
+ source += "'+\n((__t=(" + interpolate + "))==null?'':__t)+\n'";
+ }
+ if (evaluate) {
+ source += "';\n" + evaluate + "\n__p+='";
+ }
+ index = offset + match.length;
+ return match;
+ });
+ source += "';\n";
+
+ // If a variable is not specified, place data values in local scope.
+ if (!settings.variable) source = 'with(obj||{}){\n' + source + '}\n';
+
+ source = "var __t,__p='',__j=Array.prototype.join," +
+ "print=function(){__p+=__j.call(arguments,'');};\n" +
+ source + "return __p;\n";
+
+ try {
+ render = new Function(settings.variable || 'obj', '_', source);
+ } catch (e) {
+ e.source = source;
+ throw e;
+ }
+
+ if (data) return render(data, _);
+ var template = function(data) {
+ return render.call(this, data, _);
+ };
+
+ // Provide the compiled function source as a convenience for precompilation.
+ template.source = 'function(' + (settings.variable || 'obj') + '){\n' + source + '}';
+
+ return template;
+ };
+
+ // Add a "chain" function, which will delegate to the wrapper.
+ _.chain = function(obj) {
+ return _(obj).chain();
+ };
+
+ // OOP
+ // ---------------
+ // If Underscore is called as a function, it returns a wrapped object that
+ // can be used OO-style. This wrapper holds altered versions of all the
+ // underscore functions. Wrapped objects may be chained.
+
+ // Helper function to continue chaining intermediate results.
+ var result = function(obj) {
+ return this._chain ? _(obj).chain() : obj;
+ };
+
+ // Add all of the Underscore functions to the wrapper object.
+ _.mixin(_);
+
+ // Add all mutator Array functions to the wrapper.
+ each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) {
+ var method = ArrayProto[name];
+ _.prototype[name] = function() {
+ var obj = this._wrapped;
+ method.apply(obj, arguments);
+ if ((name == 'shift' || name == 'splice') && obj.length === 0) delete obj[0];
+ return result.call(this, obj);
+ };
+ });
+
+ // Add all accessor Array functions to the wrapper.
+ each(['concat', 'join', 'slice'], function(name) {
+ var method = ArrayProto[name];
+ _.prototype[name] = function() {
+ return result.call(this, method.apply(this._wrapped, arguments));
+ };
+ });
+
+ _.extend(_.prototype, {
+
+ // Start chaining a wrapped Underscore object.
+ chain: function() {
+ this._chain = true;
+ return this;
+ },
+
+ // Extracts the result from a wrapped and chained object.
+ value: function() {
+ return this._wrapped;
+ }
+
+ });
+
+ // AMD registration happens at the end for compatibility with AMD loaders
+ // that may not enforce next-turn semantics on modules. Even though general
+ // practice for AMD registration is to be anonymous, underscore registers
+ // as a named module because, like jQuery, it is a base library that is
+ // popular enough to be bundled in a third party lib, but not be part of
+ // an AMD load request. Those cases could generate an error when an
+ // anonymous define() is called outside of a loader request.
+ if (typeof define === 'function' && define.amd) {
+ define('underscore', [], function() {
+ return _;
+ });
+ }
+}).call(this);
diff --git a/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/package.json b/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/package.json
new file mode 100644
index 0000000..55168b0
--- /dev/null
+++ b/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/package.json
@@ -0,0 +1,61 @@
+{
+ "name": "underscore-contrib",
+ "version": "0.3.0",
+ "main": "index.js",
+ "dependencies": {
+ "underscore": "1.6.0"
+ },
+ "devDependencies": {
+ "grunt": "~0.4.1",
+ "grunt-contrib-concat": "0.3.0",
+ "grunt-contrib-uglify": "0.2.0",
+ "grunt-contrib-qunit": "~0.2.2",
+ "grunt-contrib-watch": "~0.5.3",
+ "grunt-contrib-jshint": "~0.6.4",
+ "grunt-docco": "~0.3.0",
+ "grunt-tocdoc": "~0.1.0",
+ "grunt-cli": "~0.1.11"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/documentcloud/underscore-contrib.git"
+ },
+ "license": "MIT",
+ "author": {
+ "name": "Fogus",
+ "email": "me@fogus.me",
+ "url": "http://www.fogus.me"
+ },
+ "scripts": {
+ "test": "node ./node_modules/grunt-cli/bin/grunt test"
+ },
+ "homepage": "https://github.com/documentcloud/underscore-contrib",
+ "description": "underscore-contrib ==================",
+ "bugs": {
+ "url": "https://github.com/documentcloud/underscore-contrib/issues"
+ },
+ "_id": "underscore-contrib@0.3.0",
+ "dist": {
+ "shasum": "665b66c24783f8fa2b18c9f8cbb0e2c7d48c26c7",
+ "tarball": "http://registry.npmjs.org/underscore-contrib/-/underscore-contrib-0.3.0.tgz"
+ },
+ "_from": "underscore-contrib@>=0.3.0 <0.4.0",
+ "_npmVersion": "1.3.21",
+ "_npmUser": {
+ "name": "joshuacc",
+ "email": "joshua.clanton@gmail.com"
+ },
+ "maintainers": [
+ {
+ "name": "fogus",
+ "email": "mefogus@gmail.com"
+ },
+ {
+ "name": "joshuacc",
+ "email": "joshua.clanton@gmail.com"
+ }
+ ],
+ "directories": {},
+ "_shasum": "665b66c24783f8fa2b18c9f8cbb0e2c7d48c26c7",
+ "_resolved": "https://registry.npmjs.org/underscore-contrib/-/underscore-contrib-0.3.0.tgz"
+}
diff --git a/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/test/array.builders.js b/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/test/array.builders.js
new file mode 100644
index 0000000..886f225
--- /dev/null
+++ b/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/test/array.builders.js
@@ -0,0 +1,200 @@
+$(document).ready(function() {
+
+ module("underscore.array.builders");
+
+ test("cat", function() {
+ // no args
+ deepEqual(_.cat(), [], 'should return an empty array when given no args');
+
+ // one arg
+ deepEqual(_.cat([]), [], 'should concatenate one empty array');
+ deepEqual(_.cat([1,2,3]), [1,2,3], 'should concatenate one homogenious array');
+ var result = _.cat([1, "2", [3], {n: 4}]);
+ deepEqual(result, [1, "2", [3], {n: 4}], 'should concatenate one heterogenious array');
+ result = (function(){ return _.cat(arguments); })(1, 2, 3);
+ deepEqual(result, [1, 2, 3], 'should concatenate the arguments object');
+
+ // two args
+ deepEqual(_.cat([1,2,3],[4,5,6]), [1,2,3,4,5,6], 'should concatenate two arrays');
+ result = (function(){ return _.cat(arguments, [4,5,6]); })(1,2,3);
+ deepEqual(result, [1,2,3,4,5,6], 'should concatenate an array and an arguments object');
+
+ // > 2 args
+ var a = [1,2,3];
+ var b = [4,5,6];
+ var c = [7,8,9];
+ var d = [0,0,0];
+ deepEqual(_.cat(a,b,c), [1,2,3,4,5,6,7,8,9], 'should concatenate three arrays');
+ deepEqual(_.cat(a,b,c,d), [1,2,3,4,5,6,7,8,9,0,0,0], 'should concatenate four arrays');
+ result = (function(){ return _.cat(arguments,b,c,d); }).apply(null, a);
+ deepEqual(result, [1,2,3,4,5,6,7,8,9,0,0,0], 'should concatenate four arrays, including an arguments object');
+
+ // heterogenious types
+ deepEqual(_.cat([1],2), [1,2], 'should concatenate mixed types');
+ deepEqual(_.cat([1],2,3), [1,2,3], 'should concatenate mixed types');
+ deepEqual(_.cat(1,2,3), [1,2,3], 'should concatenate mixed types');
+ result = (function(){ return _.cat(arguments, 4,5,6); })(1,2,3);
+ deepEqual(result, [1,2,3,4,5,6], 'should concatenate mixed types, including an arguments object');
+ });
+
+ test("cons", function() {
+ deepEqual(_.cons(0, []), [0], 'should insert the first arg into the array given as the second arg');
+ deepEqual(_.cons(1, [2]), [1,2], 'should insert the first arg into the array given as the second arg');
+ deepEqual(_.cons([0], [1,2,3]), [[0],1,2,3], 'should insert the first arg into the array given as the second arg');
+ deepEqual(_.cons(1, 2), [1,2], 'should create a pair if the second is not an array');
+ deepEqual(_.cons([1], 2), [[1],2], 'should create a pair if the second is not an array');
+ result = (function(){ return _.cons(0, arguments); })(1,2,3);
+ deepEqual(result, [0,1,2,3], 'should construct an array given an arguments object as the tail');
+
+ var a = [1,2,3];
+ var result = _.cons(0,a);
+
+ deepEqual(a, [1,2,3], 'should not modify the original tail');
+ });
+
+ test("chunk", function() {
+ var a = _.range(4);
+ var b = _.range(5);
+ var c = _.range(7);
+
+ deepEqual(_.chunk(a, 2), [[0,1],[2,3]], 'should chunk into the size given');
+ deepEqual(_.chunk(b, 2), [[0,1],[2,3]], 'should chunk into the size given. Extras are dropped');
+
+ var result = _.chunk(a, 2);
+ deepEqual(a, _.range(4), 'should not modify the original array');
+
+ deepEqual(_.chunk(c, 3, [7,8]), [[0,1,2],[3,4,5],[6,7,8]], 'should allow one to specify a padding array');
+ deepEqual(_.chunk(b, 3, 9), [[0,1,2],[3,4,9]], 'should allow one to specify a padding value');
+ });
+
+ test("chunkAll", function() {
+ var a = _.range(4);
+ var b = _.range(10);
+
+ deepEqual(_.chunkAll(a, 2), [[0,1],[2,3]], 'should chunk into the size given');
+ deepEqual(_.chunkAll(b, 4), [[0,1,2,3],[4,5,6,7],[8,9]], 'should chunk into the size given, with a small end');
+
+ var result = _.chunkAll(a, 2);
+ deepEqual(a, _.range(4), 'should not modify the original array');
+
+ deepEqual(_.chunkAll(b, 2, 4), [[0,1],[4,5],[8,9]], 'should chunk into the size given, with skips');
+ deepEqual(_.chunkAll(b, 3, 4), [[0,1,2],[4,5,6],[8,9]], 'should chunk into the size given, with skips and a small end');
+ });
+
+ test("mapcat", function() {
+ var a = [1,2,3];
+ var commaize = function(e) { return _.cons(e, [","]); };
+
+ deepEqual(_.mapcat(a, commaize), [1, ",", 2, ",", 3, ","], 'should return an array with all intermediate mapped arrays concatenated');
+ });
+
+ test("interpose", function() {
+ var a = [1,2,3];
+ var b = [1,2];
+ var c = [1];
+
+ deepEqual(_.interpose(a, 0), [1,0,2,0,3], 'should put the 2nd arg between the elements of the array given');
+ deepEqual(_.interpose(b, 0), [1,0,2], 'should put the 2nd arg between the elements of the array given');
+ deepEqual(_.interpose(c, 0), [1], 'should return the array given if nothing to interpose');
+ deepEqual(_.interpose([], 0), [], 'should return an empty array given an empty array');
+
+ var result = _.interpose(b,0);
+ deepEqual(b, [1,2], 'should not modify the original array');
+ });
+
+ test("weave", function() {
+ var a = [1,2,3];
+ var b = [1,2];
+ var c = ['a', 'b', 'c'];
+ var d = [1, [2]];
+
+ // zero
+ deepEqual(_.weave(), [], 'should weave zero arrays');
+
+ // one
+ deepEqual(_.weave([]), [], 'should weave one array');
+ deepEqual(_.weave([1,[2]]), [1,[2]], 'should weave one array');
+
+ // two
+ deepEqual(_.weave(a,b), [1,1,2,2,3], 'should weave two arrays');
+ deepEqual(_.weave(a,a), [1,1,2,2,3,3], 'should weave two arrays');
+ deepEqual(_.weave(c,a), ['a',1,'b',2,'c',3], 'should weave two arrays');
+ deepEqual(_.weave(a,d), [1,1,2,[2],3], 'should weave two arrays');
+
+ // > 2
+ deepEqual(_.weave(a,b,c), [1,1,'a',2,2,'b',3,'c'], 'should weave more than two arrays');
+ deepEqual(_.weave(a,b,c,d), [1,1,'a',1,2,2,'b',[2],3,'c'], 'should weave more than two arrays');
+ });
+
+ test("repeat", function() {
+ deepEqual(_.repeat(3,1), [1,1,1], 'should build an array of size n with the specified element in each slot');
+ deepEqual(_.repeat(0), [], 'should return an empty array if given zero and no repeat arg');
+ deepEqual(_.repeat(0,9999), [], 'should return an empty array if given zero and some repeat arg');
+ });
+
+ test("cycle", function() {
+ var a = [1,2,3];
+
+ deepEqual(_.cycle(3, a), [1,2,3,1,2,3,1,2,3], 'should build an array with the specified array contents repeated n times');
+ deepEqual(_.cycle(0, a), [], 'should return an empty array if told to repeat zero times');
+ deepEqual(_.cycle(-1000, a), [], 'should return an empty array if told to repeat negative times');
+ });
+
+ test("splitAt", function() {
+ var a = [1,2,3,4,5];
+
+ deepEqual(_.splitAt(a, 2), [[1,2],[3,4,5]], 'should bifurcate an array at a given index');
+ deepEqual(_.splitAt(a, 0), [[], [1,2,3,4,5]], 'should bifurcate an array at a given index');
+ deepEqual(_.splitAt(a, 5), [[1,2,3,4,5],[]], 'should bifurcate an array at a given index');
+ deepEqual(_.splitAt([], 5), [[],[]], 'should bifurcate an array at a given index');
+ });
+
+ test("iterateUntil", function() {
+ var dec = function(n) { return n - 1; };
+ var isPos = function(n) { return n > 0; };
+
+ deepEqual(_.iterateUntil(dec, isPos, 6), [5,4,3,2,1], 'should build an array, decrementing a number while positive');
+ });
+
+ test("takeSkipping", function() {
+ deepEqual(_.takeSkipping(_.range(5), 0), [], 'should take nothing if told to skip by zero');
+ deepEqual(_.takeSkipping(_.range(5), -1), [], 'should take nothing if told to skip by negative');
+ deepEqual(_.takeSkipping(_.range(5), 100), [0], 'should take first element if told to skip by big number');
+ deepEqual(_.takeSkipping(_.range(5), 1), [0,1,2,3,4], 'should take every element in an array');
+ deepEqual(_.takeSkipping(_.range(10), 2), [0,2,4,6,8], 'should take every 2nd element in an array');
+ });
+
+ test("reductions", function() {
+ var result = _.reductions([1,2,3,4,5], function(agg, n) {
+ return agg + n;
+ }, 0);
+
+ deepEqual(result, [1,3,6,10,15], 'should retain each intermediate step in a reduce');
+ });
+
+ test("keepIndexed", function() {
+ var a = ['a', 'b', 'c', 'd', 'e'];
+ var b = [-9, 0, 29, -7, 45, 3, -8];
+ var oddy = function(k, v) { return _.isOdd(k) ? v : undefined; };
+ var posy = function(k, v) { return _.isPositive(v) ? k : undefined; };
+
+ deepEqual(_.keepIndexed(a, _.isOdd), [false,true,false,true,false], 'runs the predciate on the index, and not the element');
+
+ deepEqual(_.keepIndexed(a, oddy), ['b', 'd'], 'keeps elements whose index passes a truthy test');
+ deepEqual(_.keepIndexed(b, posy), [2,4,5], 'keeps elements whose index passes a truthy test');
+ deepEqual(_.keepIndexed(_.range(10), oddy), [1,3,5,7,9], 'keeps elements whose index passes a truthy test');
+ });
+
+ test('reverseOrder', function() {
+ var arr = [1, 2, 3];
+
+ deepEqual(_.reverseOrder(arr), [3, 2, 1], 'returns an array whose elements are in the opposite order of the argument');
+ deepEqual(arr, [1, 2, 3], 'should not mutate the argument');
+
+ var throwingFn = function() { _.reverseOrder('string'); };
+ throws(throwingFn, TypeError, 'throws a TypeError when given a string');
+
+ var argObj = (function() { return arguments; })(1, 2, 3);
+ deepEqual(_.reverseOrder(argObj), [3, 2, 1], 'works with other array-like objects');
+ });
+});
diff --git a/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/test/array.selectors.js b/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/test/array.selectors.js
new file mode 100644
index 0000000..57538ac
--- /dev/null
+++ b/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/test/array.selectors.js
@@ -0,0 +1,77 @@
+$(document).ready(function() {
+
+ module("underscore.array.selectors");
+
+ test("second", function() {
+ var a = [1,2,3,4,5];
+
+ equal(_.second(a), 2, 'should retrieve the 2nd element in an array');
+ deepEqual(_.second(a, 5), [2,3,4,5], 'should retrieve all but the first element in an array');
+ deepEqual(_.map([a,_.rest(a)], _.second), [2,3], 'should be usable in _.map');
+ });
+
+ test("third", function() {
+ var a = [1,2,3,4,5];
+
+ equal(_.third(a), 3, 'should retrieve the 3rd element in an array');
+ deepEqual(_.third(a, 5), [3,4,5], 'should retrieve all but the first and second element in an array');
+ deepEqual(_.map([a,_.rest(a)], _.third), [3,4], 'should be usable in _.map');
+ });
+
+ test("takeWhile", function() {
+ var isNeg = function(n) { return n < 0; };
+
+ deepEqual(_.takeWhile([-2,-1,0,1,2], isNeg), [-2,-1], 'should take elements until a function goes truthy');
+ deepEqual(_.takeWhile([1,-2,-1,0,1,2], isNeg), [], 'should take elements until a function goes truthy');
+ });
+
+ test("dropWhile", function() {
+ var isNeg = function(n) { return n < 0; };
+
+ deepEqual(_.dropWhile([-2,-1,0,1,2], isNeg), [0,1,2], 'should drop elements until a function goes truthy');
+ deepEqual(_.dropWhile([0,1,2], isNeg), [0,1,2], 'should drop elements until a function goes truthy');
+ deepEqual(_.dropWhile([-2,-1], isNeg), [], 'should drop elements until a function goes truthy');
+ deepEqual(_.dropWhile([1,-2,-1,0,1,2], isNeg), [1,-2,-1,0,1,2], 'should take elements until a function goes truthy');
+ deepEqual(_.dropWhile([], isNeg), [], 'should handle empty arrays');
+ });
+
+ test("splitWith", function() {
+ var a = [1,2,3,4,5];
+ var lessEq3p = function(n) { return n <= 3; };
+ var lessEq3p$ = function(n) { return (n <= 3) ? true : null; };
+
+ deepEqual(_.splitWith(a, lessEq3p), [[1,2,3], [4,5]], 'should split an array when a function goes false');
+ deepEqual(_.splitWith(a, lessEq3p$), [[1,2,3], [4,5]], 'should split an array when a function goes false');
+ deepEqual(_.splitWith([], lessEq3p$), [[],[]], 'should split an empty array into two empty arrays');
+ });
+
+ test("partitionBy", function() {
+ var a = [1, 2, null, false, undefined, 3, 4];
+
+ deepEqual(_.partitionBy(a, _.truthy), [[1,2], [null, false, undefined], [3,4]], 'should partition an array as a given predicate changes truth sense');
+ });
+
+ test("best", function() {
+ var a = [1,2,3,4,5];
+
+ deepEqual(_.best(a, function(x,y) { return x > y; }), 5, 'should identify the best value based on criteria');
+ });
+
+ test("keep", function() {
+ var a = _.range(10);
+ var eveny = function(e) { return (_.isEven(e)) ? e : undefined; };
+
+ deepEqual(_.keep(a, eveny), [0,2,4,6,8], 'should keep only even numbers in a range tagged with null fails');
+ deepEqual(_.keep(a, _.isEven), [true, false, true, false, true, false, true, false, true, false], 'should keep all existy values corresponding to a predicate over a range');
+ });
+
+ test("nth", function() {
+ var a = ['a','b','c'];
+ var b = [['a'],['b'],[]];
+
+ equal(_.nth(a,0), 'a', 'should return the element at a given index into an array');
+ equal(_.nth(a,100), undefined, 'should return undefined if out of bounds');
+ deepEqual(_.map(b,function(e) { return _.nth(e,0); }), ['a','b',undefined], 'should be usable in _.map');
+ });
+});
+
diff --git a/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/test/collections.walk.js b/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/test/collections.walk.js
new file mode 100644
index 0000000..4e7ea04
--- /dev/null
+++ b/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/test/collections.walk.js
@@ -0,0 +1,216 @@
+$(document).ready(function() {
+
+ module("underscore.collections.walk");
+
+ var getSimpleTestTree = function() {
+ return {
+ val: 0,
+ l: { val: 1, l: { val: 2 }, r: { val: 3 } },
+ r: { val: 4, l: { val: 5 }, r: { val: 6 } }
+ };
+ };
+
+ var getMixedTestTree = function() {
+ return {
+ current:
+ { city: 'Munich', aliases: ['Muenchen'], population: 1378000 },
+ previous: [
+ { city: 'San Francisco', aliases: ['SF', 'San Fran'], population: 812826 },
+ { city: 'Toronto', aliases: ['TO', 'T-dot'], population: 2615000 }
+ ]
+ };
+ };
+
+ test("basic", function() {
+ // Updates the value of `node` to be the sum of the values of its subtrees.
+ // Ignores leaf nodes.
+ var visitor = function(node) {
+ if (node.l && node.r)
+ node.val = node.l.val + node.r.val;
+ };
+
+ var tree = getSimpleTestTree();
+ _.walk.postorder(tree, visitor);
+ equal(tree.val, 16, 'should visit subtrees first');
+
+ tree = getSimpleTestTree();
+ _.walk.preorder(tree, visitor);
+ equal(tree.val, 5, 'should visit subtrees after the node itself');
+ });
+
+ test("circularRefs", function() {
+ var tree = getSimpleTestTree();
+ tree.l.l.r = tree;
+ throws(function() { _.walk.preorder(tree, _.identity); }, TypeError, 'preorder throws an exception');
+ throws(function() { _.walk.postrder(tree, _.identity); }, TypeError, 'postorder throws an exception');
+
+ tree = getSimpleTestTree();
+ tree.r.l = tree.r;
+ throws(function() { _.walk.preorder(tree, _.identity); }, TypeError, 'exception for a self-referencing node');
+ });
+
+ test("simpleMap", function() {
+ var visitor = function(node, key, parent) {
+ if (_.has(node, 'val')) return node.val;
+ if (key !== 'val') throw new Error('Leaf node with incorrect key');
+ return this.leafChar || '-';
+ };
+ var visited = _.walk.map(getSimpleTestTree(), _.walk.preorder, visitor).join('');
+ equal(visited, '0-1-2-3-4-5-6-', 'pre-order map');
+
+ visited = _.walk.map(getSimpleTestTree(), _.walk.postorder, visitor).join('');
+ equal(visited, '---2-31--5-640', 'post-order map');
+
+ var context = { leafChar: '*' };
+ visited = _.walk.map(getSimpleTestTree(), _.walk.preorder, visitor, context).join('');
+ equal(visited, '0*1*2*3*4*5*6*', 'pre-order with context');
+
+ visited = _.walk.map(getSimpleTestTree(), _.walk.postorder, visitor, context).join('');
+ equal(visited, '***2*31**5*640', 'post-order with context');
+
+ if (document.querySelector) {
+ var root = document.querySelector('#map-test');
+ var ids = _.walk.map(root, _.walk.preorder, function(el) { return el.id; });
+ deepEqual(ids, ['map-test', 'id1', 'id2'], 'preorder map with DOM elements');
+
+ ids = _.walk.map(root, _.walk.postorder, function(el) { return el.id; });
+ deepEqual(ids, ['id1', 'id2', 'map-test'], 'postorder map with DOM elements');
+ }
+ });
+
+ test("mixedMap", function() {
+ var visitor = function(node, key, parent) {
+ return _.isString(node) ? node.toLowerCase() : null;
+ };
+
+ var tree = getMixedTestTree();
+ var preorderResult = _.walk.map(tree, _.walk.preorder, visitor);
+ equal(preorderResult.length, 19, 'all nodes are visited');
+ deepEqual(_.reject(preorderResult, _.isNull),
+ ['munich', 'muenchen', 'san francisco', 'sf', 'san fran', 'toronto', 'to', 't-dot'],
+ 'pre-order map on a mixed tree');
+
+ var postorderResult = _.walk.map(tree, _.walk.postorder, visitor);
+ deepEqual(preorderResult.sort(), postorderResult.sort(), 'post-order map on a mixed tree');
+
+ tree = [['foo'], tree];
+ var result = _.walk.map(tree, _.walk.postorder, visitor);
+ deepEqual(_.difference(result, postorderResult), ['foo'], 'map on list of trees');
+ });
+
+ test("pluck", function() {
+ var tree = getSimpleTestTree();
+ tree.val = { val: 'z' };
+
+ var plucked = _.walk.pluckRec(tree, 'val');
+ equal(plucked.shift(), tree.val);
+ equal(plucked.join(''), 'z123456', 'pluckRec is recursive');
+
+ plucked = _.walk.pluck(tree, 'val');
+ equal(plucked.shift(), tree.val);
+ equal(plucked.join(''), '123456', 'regular pluck is not recursive');
+
+ tree.l.r.foo = 42;
+ equal(_.walk.pluck(tree, 'foo'), 42, 'pluck a value from deep in the tree');
+
+ tree = getMixedTestTree();
+ deepEqual(_.walk.pluck(tree, 'city'), ['Munich', 'San Francisco', 'Toronto'], 'pluck from a mixed tree');
+ tree = [tree, { city: 'Loserville', population: 'you' }];
+ deepEqual(_.walk.pluck(tree, 'population'), [1378000, 812826, 2615000, 'you'], 'pluck from a list of trees');
+ });
+
+ test("reduce", function() {
+ var add = function(a, b) { return a + b; };
+ var leafMemo = [];
+ var sum = function(memo, node) {
+ if (_.isObject(node))
+ return _.reduce(memo, add, 0);
+
+ strictEqual(memo, leafMemo);
+ return node;
+ };
+ var tree = getSimpleTestTree();
+ equal(_.walk.reduce(tree, sum, leafMemo), 21);
+
+ // A more useful example: transforming a tree.
+
+ // Returns a new node where the left and right subtrees are swapped.
+ var mirror = function(memo, node) {
+ if (!_.has(node, 'r')) return node;
+ return _.extend(_.clone(node), { l: memo.r, r: memo.l });
+ };
+ // Returns the '-' for internal nodes, and the value itself for leaves.
+ var toString = function(node) { return _.has(node, 'val') ? '-' : node; };
+
+ tree = _.walk.reduce(getSimpleTestTree(), mirror);
+ equal(_.walk.reduce(tree, sum, leafMemo), 21);
+ equal(_.walk.map(tree, _.walk.preorder, toString).join(''), '-0-4-6-5-1-3-2', 'pre-order map');
+ });
+
+ test("find", function() {
+ var tree = getSimpleTestTree();
+
+ // Returns a visitor function that will succeed when a node with the given
+ // value is found, and then raise an exception the next time it's called.
+ var findValue = function(value) {
+ var found = false;
+ return function(node) {
+ if (found) throw 'already found!';
+ found = (node.val === value);
+ return found;
+ };
+ };
+
+ equal(_.walk.find(tree, findValue(0)).val, 0);
+ equal(_.walk.find(tree, findValue(6)).val, 6);
+ deepEqual(_.walk.find(tree, findValue(99)), undefined);
+ });
+
+ test("filter", function() {
+ var tree = getSimpleTestTree();
+ tree.r.val = '.oOo.'; // Remove one of the numbers.
+ var isEvenNumber = function(x) {
+ return _.isNumber(x) && x % 2 === 0;
+ };
+
+ equal(_.walk.filter(tree, _.walk.preorder, _.isObject).length, 7, 'filter objects');
+ equal(_.walk.filter(tree, _.walk.preorder, _.isNumber).length, 6, 'filter numbers');
+ equal(_.walk.filter(tree, _.walk.postorder, _.isNumber).length, 6, 'postorder filter numbers');
+ equal(_.walk.filter(tree, _.walk.preorder, isEvenNumber).length, 3, 'filter even numbers');
+
+ // With the identity function, only the value '0' should be omitted.
+ equal(_.walk.filter(tree, _.walk.preorder, _.identity).length, 13, 'filter on identity function');
+ });
+
+ test("reject", function() {
+ var tree = getSimpleTestTree();
+ tree.r.val = '.oOo.'; // Remove one of the numbers.
+
+ equal(_.walk.reject(tree, _.walk.preorder, _.isObject).length, 7, 'reject objects');
+ equal(_.walk.reject(tree, _.walk.preorder, _.isNumber).length, 8, 'reject numbers');
+ equal(_.walk.reject(tree, _.walk.postorder, _.isNumber).length, 8, 'postorder reject numbers');
+
+ // With the identity function, only the value '0' should be kept.
+ equal(_.walk.reject(tree, _.walk.preorder, _.identity).length, 1, 'reject with identity function');
+ });
+
+ test("customTraversal", function() {
+ var tree = getSimpleTestTree();
+
+ // Set up a walker that will not traverse the 'val' properties.
+ var walker = _.walk(function(node) {
+ return _.omit(node, 'val');
+ });
+ var visitor = function(node) {
+ if (!_.isObject(node)) throw new Error("Leaf value visited when it shouldn't be");
+ };
+ equal(walker.pluck(tree, 'val').length, 7, 'pluck with custom traversal');
+ equal(walker.pluckRec(tree, 'val').length, 7, 'pluckRec with custom traversal');
+
+ equal(walker.map(tree, _.walk.postorder, _.identity).length, 7, 'traversal strategy is dynamically scoped');
+
+ // Check that the default walker is unaffected.
+ equal(_.walk.map(tree, _.walk.postorder, _.identity).length, 14, 'default map still works');
+ equal(_.walk.pluckRec(tree, 'val').join(''), '0123456', 'default pluckRec still works');
+ });
+});
diff --git a/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/test/dist-concat.html b/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/test/dist-concat.html
new file mode 100644
index 0000000..a33892b
--- /dev/null
+++ b/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/test/dist-concat.html
@@ -0,0 +1,39 @@
+
+
+
+ Underscore-contrib Test Suite
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/test/dist-min.html b/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/test/dist-min.html
new file mode 100644
index 0000000..d87ed60
--- /dev/null
+++ b/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/test/dist-min.html
@@ -0,0 +1,39 @@
+
+
+
+ Underscore-contrib Test Suite
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/test/function.arity.js b/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/test/function.arity.js
new file mode 100644
index 0000000..1e5612c
--- /dev/null
+++ b/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/test/function.arity.js
@@ -0,0 +1,164 @@
+$(document).ready(function() {
+
+ module("underscore.function.arity");
+
+ test("fix", function() {
+ var over = function(t, m, b) { return t / m / b; };
+ var t = _.fix(over, 10, _, _);
+ equal(t(5, 2), 1, 'should return a function partially applied for some number of arbitrary args marked by _');
+ equal(t(10, 2), 0.5, 'should return a function partially applied for some number of arbitrary args marked by _');
+ equal(t(10, 5), 0.2, 'should return a function partially applied for some number of arbitrary args marked by _');
+
+ var f = function () {
+ return _.map(arguments, function (arg) {
+ return typeof arg;
+ }).join(', ');
+ };
+ var g = _.fix(f, _, _, 3);
+ equal(g(1), 'number, undefined, number', 'should fill "undefined" if argument not given');
+ g(1, 2);
+ equal(g(1), 'number, undefined, number', 'should not remember arguments between calls');
+
+ equal(_.fix(parseInt, _, 10)('11'), 11, 'should "fix" common js foibles');
+
+ equal(_.fix(f, _, 3)(1,'a'), 'number, number', 'should ignore extra parameters');
+
+ });
+
+ test("arity", function () {
+ function variadic () { return arguments.length; }
+ function unvariadic (a, b, c) { return arguments.length; }
+
+ equal( _.arity(unvariadic.length, variadic).length, unvariadic.length, "should set the length");
+ equal( _.arity(3, variadic)(1, 2, 3, 4, 5), unvariadic(1, 2, 3, 4, 5), "shouldn't trim arguments");
+ equal( _.arity(3, variadic)(1), unvariadic(1), "shouldn't pad arguments");
+
+ // this is the big use case for _.arity:
+
+ function reverse (list) {
+ return [].reduce.call(list, function (acc, element) {
+ acc.unshift(element);
+ return acc;
+ }, []);
+ }
+
+ function naiveFlip (fun) {
+ return function () {
+ return fun.apply(this, reverse(arguments));
+ };
+ }
+
+ function echo (a, b, c) { return [a, b, c]; }
+
+ deepEqual(naiveFlip(echo)(1, 2, 3), [3, 2, 1], "naive flip flips its arguments");
+ notEqual(naiveFlip(echo).length, echo.length, "naiveFlip gets its arity wrong");
+
+ function flipWithArity (fun) {
+ return _.arity(fun.length, naiveFlip(fun));
+ }
+
+ deepEqual(flipWithArity(echo)(1, 2, 3), [3, 2, 1], "flipWithArity flips its arguments");
+ equal(flipWithArity(echo).length, echo.length, "flipWithArity gets its arity correct");
+
+ });
+
+ test("curry", function() {
+ var func = function (x, y, z) {
+ return x + y + z;
+ },
+ curried = _.curry(func),
+ rCurried = _.rCurry(func);
+
+ equal(func(1, 2, 3), 6, "Test pure function");
+ equal(typeof curried, 'function', "Curry returns a function");
+ equal(typeof curried(1), 'function', "Curry returns a function after partial application");
+ equal(curried(1)(2)(3), 6, "Curry returns a value after total application");
+ equal(curried(1)(2)(3), 6, "Curry invocations have no side effects and do not interact with each other");
+ equal(curried(2)(4)(8), 14, "Curry invocations have no side effects and do not interact with each other");
+ equal(rCurried('a')('b')('c'), 'cba', "Flipped curry applies arguments in reverse.");
+
+ var addyz = curried(1);
+ equal(addyz(2)(3), 6, "Partial applications can be used multiple times");
+ equal(addyz(2)(4), 7, "Partial applications can be used multiple times");
+
+ var failure = false;
+ try {
+ curried(1, 2999);
+ } catch (e) {
+ failure = true;
+ } finally {
+ equal(failure, true, "Curried functions only accept one argument at a time");
+ }
+ });
+
+ test("curry2", function () {
+
+ function echo () { return [].slice.call(arguments, 0); }
+
+ deepEqual(echo(1, 2), [1, 2], "Control test");
+ deepEqual(_.curry2(echo)(1)(2), [1, 2], "Accepts curried arguments");
+
+ });
+
+ test("rcurry2", function () {
+
+ function echo () { return [].slice.call(arguments, 0); }
+
+ deepEqual(echo(1, 2), [1, 2], "Control test");
+ deepEqual(_.rcurry2(echo)(1)(2), [2, 1], "Reverses curried arguments");
+
+ });
+
+ test("curry3", function () {
+
+ function echo () { return [].slice.call(arguments, 0); }
+
+ deepEqual(echo(1, 2, 3), [1, 2, 3], "Control test");
+ deepEqual(_.curry3(echo)(1)(2)(3), [1, 2, 3], "Accepts curried arguments");
+
+ });
+
+ test("rcurry3", function () {
+
+ function echo () { return [].slice.call(arguments, 0); }
+
+ deepEqual(echo(1, 2, 3), [1, 2, 3], "Control test");
+ deepEqual(_.rcurry3(echo)(1)(2)(3), [3, 2, 1], "Reverses curried arguments");
+
+ });
+
+ test("enforce", function () {
+ function binary (a, b) {
+ return a + b;
+ }
+ function ternary (a, b, c) {
+ return a + b + c;
+ }
+ function altTernary (a, b, c) {
+ return a - b - c;
+ }
+ var fBinary = _.enforce(binary),
+ fTernary = _.enforce(ternary),
+ fAltTernary = _.enforce(altTernary),
+ failure = false;
+ try {
+ fBinary(1);
+ } catch (e) {
+ failure = true;
+ } finally {
+ equal(failure, true, "Binary must have two arguments.");
+ }
+ equal(fBinary(1, 2), 3, "Function returns after proper application");
+
+ failure = false;
+ try {
+ fTernary(1, 3);
+ } catch (e) {
+ failure = true;
+ } finally {
+ equal(failure, true, "Ternary must have three arguments.");
+ }
+ equal(fTernary(1, 2, 3), 6, "Function returns after proper application");
+ equal(fAltTernary(1, 2, 3), -4, "Function cache does not collide");
+ });
+});
diff --git a/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/test/function.combinators.js b/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/test/function.combinators.js
new file mode 100644
index 0000000..5f8adf6
--- /dev/null
+++ b/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/test/function.combinators.js
@@ -0,0 +1,258 @@
+$(document).ready(function() {
+
+ module("underscore.function.combinators");
+
+ test("always", function() {
+ equal(_.always(42)(10000), 42, 'should return a function that always returns the same value');
+ equal(_.always(42)(1,2,3), 42, 'should return a function that always returns the same value');
+ deepEqual(_.map([1,2,3], _.always(42)), [42,42,42], 'should return a function that always returns the same value');
+ });
+
+ test("pipeline", function() {
+ var run = _.pipeline(function(n) { return -n; }, function(n) { return "" + n; });
+ var run2 = _.pipeline([function(n) { return -n; }, function(n) { return "" + n; }]);
+ equal(run(42), "-42", 'should apply a series of functions, originall given variadically to an initial value');
+ equal(run2(42), "-42", 'should apply a series of functions, originally given in an array to an initial value');
+ });
+
+ test("conjoin", function() {
+ var isPositiveEven = _.conjoin(function(x) { return x > 0; }, function(x) { return (x & 1) === 0; });
+
+ equal(isPositiveEven([2,4,6,8]), true, 'should recognize when all elements satisfy a conjunction');
+ equal(isPositiveEven([2,4,6,7,8]), false, 'should recognize when an element fails to satisfy a conjunction');
+ });
+
+ test("disjoin", function() {
+ var orPositiveEven = _.disjoin(function(x) { return x > 0; }, function(x) { return (x & 1) === 0; });
+
+ equal(orPositiveEven([-1,2,3,4,5,6]), true, 'should recognize when all elements satisfy a disjunction');
+ equal(orPositiveEven([-1,-3]), false, 'should recognize when an element fails to satisfy a disjunction');
+ });
+
+ test("comparator", function() {
+ var lessOrEqual = function(x, y) { return x <= y; };
+ var a = [0, 1, -2];
+ var b = [100, 1, 0, 10, -1, -2, -1];
+
+ deepEqual(a.sort(_.comparator(lessOrEqual)), [-2, 0, 1], 'should return a function to convert a predicate to a comparator');
+ deepEqual(b.sort(_.comparator(lessOrEqual)), [-2, -1, -1, 0, 1, 10, 100], 'should return a function to convert a predicate to a comparator');
+ });
+
+ test("complement", function() {
+ var notOdd = _.complement(function(n) { return (n & 1) === 1; });
+
+ equal(notOdd(2), true, 'should return a function that is the opposite of the function given');
+ equal(notOdd(3), false, 'should return a function that is the opposite of the function given');
+
+ var obj = {
+ num: 1,
+ numIsPositive: function () { return this.num > 0; }
+ };
+ obj.numIsNotPositive = _.complement(obj.numIsPositive);
+
+ equal(obj.numIsNotPositive(), false, 'should function as a method combinator');
+ });
+
+ test('splat', function() {
+ var sumArgs = function () {
+ return _.reduce(arguments, function (a, b) { return a + b; }, 0);
+ };
+
+ var sumArray = _.splat(sumArgs);
+
+ equal(sumArray([1, 2, 3]), 6, 'should return a function that takes array elements as the arguments for the original function');
+
+ var obj = {
+ a: 1,
+ b: 2,
+ getPropsByName: function () {
+ var props = [];
+ for (var i = 0; i < arguments.length; i++) {
+ props.push(this[arguments[i]]);
+ }
+ return props;
+ }
+ };
+ obj.getPropsByNameArray = _.splat(obj.getPropsByName);
+
+ deepEqual(obj.getPropsByNameArray(['a', 'b']), [1, 2], 'should function as a method combinator');
+ });
+
+ test("unsplat", function() {
+ var echo = _.unsplat(function (args) { return args; }),
+ echo2 = _.unsplat(function (first, rest) { return [first, rest]; }),
+ echo3 = _.unsplat(function (first, second, rest) { return [first, second, rest]; });
+
+ deepEqual(echo(), [], 'should return no arguments');
+ deepEqual(echo(1), [1], 'should return the arguments provded');
+ deepEqual(echo(1,2), [1,2], 'should return the arguments provded');
+ deepEqual(echo(1,2,3), [1,2,3], 'should return the arguments provded');
+
+ deepEqual(echo2(), [void 0, []], 'should return no arguments');
+ deepEqual(echo2(1), [1, []], 'should return the arguments provded');
+ deepEqual(echo2(1,2), [1,[2]], 'should return the arguments provded');
+ deepEqual(echo2(1,2,3), [1,[2,3]], 'should return the arguments provded');
+ deepEqual(echo2(1,2,3,4), [1,[2,3,4]], 'should return the arguments provded');
+
+ deepEqual(echo3(), [void 0, void 0, []], 'should return no arguments');
+ deepEqual(echo3(1), [1, void 0, []], 'should return the arguments provded');
+ deepEqual(echo3(1,2), [1,2,[]], 'should return the arguments provded');
+ deepEqual(echo3(1,2,3), [1,2,[3]], 'should return the arguments provded');
+ deepEqual(echo3(1,2,3,4), [1,2,[3,4]], 'should return the arguments provded');
+ });
+
+ test("unsplatl", function() {
+ var echo = _.unsplatl(function (args) { return args; }),
+ echo2 = _.unsplatl(function (rest, ultimate) { return [rest, ultimate]; }),
+ echo3 = _.unsplatl(function (rest, penultimate, ultimate) { return [rest, penultimate, ultimate]; });
+
+ deepEqual(echo(), [], 'should return no arguments');
+ deepEqual(echo(1), [1], 'should return the arguments provded');
+ deepEqual(echo(1,2), [1,2], 'should return the arguments provded');
+ deepEqual(echo(1,2,3), [1,2,3], 'should return the arguments provded');
+
+ deepEqual(echo2(), [[], void 0], 'should return no arguments');
+ deepEqual(echo2(1), [[], 1], 'should return the arguments provded');
+ deepEqual(echo2(1,2), [[1], 2], 'should return the arguments provded');
+ deepEqual(echo2(1,2,3), [[1, 2], 3], 'should return the arguments provded');
+ deepEqual(echo2(1,2,3,4), [[1, 2, 3], 4], 'should return the arguments provded');
+
+ deepEqual(echo3(), [[], void 0, void 0], 'should return no arguments');
+ deepEqual(echo3(1), [[], 1, void 0], 'should return the arguments provded');
+ deepEqual(echo3(1,2), [[], 1, 2], 'should return the arguments provded');
+ deepEqual(echo3(1,2,3), [[1], 2, 3], 'should return the arguments provded');
+ deepEqual(echo3(1,2,3,4), [[1, 2], 3, 4], 'should return the arguments provded');
+ });
+
+ test("mapArgsWith", function () {
+ var echo = _.unsplatl(function (args) { return args; });
+ function timesTwo (n) { return n * 2; }
+ function plusOne (n) { return n + 1; }
+
+ deepEqual(_.mapArgsWith(timesTwo, echo)(), [], "should handle the empty case");
+ deepEqual(_.mapArgsWith(timesTwo, echo)(42), [84], "should handle one arg");
+ deepEqual(_.mapArgsWith(plusOne, echo)(1, 2, 3), [2, 3, 4], "should handle many args");
+
+ deepEqual(_.mapArgsWith(timesTwo)(echo)(), [], "should handle the empty case");
+ deepEqual(_.mapArgsWith(timesTwo)(echo)(42), [84], "should handle one arg");
+ deepEqual(_.mapArgsWith(plusOne)(echo)(1, 2, 3), [2, 3, 4], "should handle many args");
+ });
+
+ test("flip2", function() {
+ var div = function(n, d) { return n/d; };
+
+ equal(_.flip2(div)(10,2), 0.2, 'should return a function that flips the first two args to a function');
+
+ var obj = {
+ num: 5,
+ addToNum: function (a, b) { return [a + this.num, b + this.num]; }
+ };
+
+ obj.reversedAddToNum = _.flip2(obj.addToNum);
+
+ deepEqual(obj.reversedAddToNum(1, 2), [7, 6], 'should function as a method combinator.');
+ });
+
+ test("flip", function() {
+ var echo = function() { return Array.prototype.slice.call(arguments, 0); };
+
+ deepEqual(_.flip(echo)(1, 2, 3, 4), [4, 3, 2, 1], 'should return a function that flips the first three or more args to a function');
+
+ var obj = {
+ num: 5,
+ addToNum: function (a, b) { return [a + this.num, b + this.num]; }
+ };
+
+ obj.reversedAddToNum = _.flip(obj.addToNum);
+
+ deepEqual(obj.reversedAddToNum(1, 2), [7, 6], 'should function as a method combinator.');
+ });
+
+ test("fnull", function() {
+ var a = [1,2,3,null,5];
+ var b = [1,2,3,undefined,5];
+ var safeMult = _.fnull(function(total, n) { return total * n; }, 1, 1);
+
+ equal(_.reduce([1,2,3,5], safeMult), 30, 'should not fill in defaults when not needed');
+ equal(_.reduce(a, safeMult), 30, 'should fill in defaults for null');
+ equal(_.reduce(b, safeMult), 30, 'should fill in defaults for undefined');
+
+ var obj = {
+ a: 1,
+ fallback: "fallback value",
+ getPropByName: function (name) { return this[name]; }
+ };
+
+ obj.getPropByNameOrDefault = _.fnull(obj.getPropByName, "fallback");
+
+ equal(obj.getPropByNameOrDefault(), "fallback value", 'should function as a method combinator.');
+ });
+
+ test("juxt", function() {
+ var run = _.juxt(function(s, n) { return s.length + n; }, parseInt, _.always(108));
+
+ deepEqual(run('42', 10), [12, 42, 108], 'should return a function that returns an array of the originally supplied functions called');
+
+ var obj = {
+ name: "Elizabeth 1",
+ firstChar: function () { return this.name[0]; },
+ lastChar: function () { return this.name[this.name.length - 1]; }
+ };
+
+ obj.firstAndLastChars = _.juxt(obj.firstChar, obj.lastChar);
+
+ deepEqual(obj.firstAndLastChars(), ['E', '1'], 'should function as a method combinator.');
+ });
+
+ test("accessor", function() {
+ var f = _.accessor('a');
+
+ equal(f({a: 42}), 42, 'should retrieve a pluckable field');
+ equal(f({z: 42}), undefined, 'should fail to retrieve a field if not there');
+ });
+
+ test("bound", function() {
+ var obj = {
+ fun: function(b) {
+ return this.a + b;
+ },
+
+ a: 'hello ',
+
+ nofun: null
+ };
+
+ var f = _.bound(obj, 'fun');
+
+ equal(f('there'), 'hello there', 'should return concatenation of obj.a and string argument');
+ throws(function() {
+ _.bound(obj, 'nofun');
+ }, TypeError, 'should throw for non-function properties');
+ });
+
+ test("functionalize", function() {
+ var rect = {
+ x: 2,
+ y: 3,
+ area: function() {return this.x * this.y;},
+ extrude: function(z) {return _.merge(this, {z: z});}
+ };
+ var areaFunc = _.functionalize(rect.area),
+ extrudeFunc = _.functionalize(rect.extrude);
+ equal(areaFunc(rect), 6, "returned function's first arg becomes original method's `this`");
+ equal(extrudeFunc(rect, 4).z, 4, "all arguments are passed along");
+ });
+
+ test("methodize", function() {
+ function area(rect) {return rect.x * rect.y;}
+ function extrude(rect, z) {return _.merge(rect, {z: z});}
+ var rect = {
+ x: 2,
+ y: 3,
+ area: _.methodize(area),
+ extrude: _.methodize(extrude)
+ };
+ equal(rect.area(), 6, "returned method passes its receiver (`this`) as first arg to original function");
+ equal(rect.extrude(4).z, 4, "all arguments are passed along");
+ });
+});
diff --git a/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/test/function.dispatch.js b/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/test/function.dispatch.js
new file mode 100644
index 0000000..366a377
--- /dev/null
+++ b/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/test/function.dispatch.js
@@ -0,0 +1,14 @@
+$(document).ready(function() {
+
+ module("underscore.function.dispatch");
+
+ test('attempt', function() {
+ var obj = {x: '', y: function() { return true; }, z: function() { return _.toArray(arguments).join(''); }};
+ strictEqual(_.attempt(obj, 'x'), undefined);
+ strictEqual(_.attempt(obj, 'y'), true);
+ strictEqual(_.attempt(obj, 'z', 1, 2, 3), '123');
+ strictEqual(_.attempt(null, 'x'), undefined);
+ strictEqual(_.attempt(undefined, 'x'), undefined);
+ });
+
+});
diff --git a/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/test/function.iterators.js b/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/test/function.iterators.js
new file mode 100644
index 0000000..a24ca29
--- /dev/null
+++ b/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/test/function.iterators.js
@@ -0,0 +1,337 @@
+$(document).ready(function() {
+
+ function sum (x, y) { return x + y; }
+ function square (x) { return x * x; }
+ function odd (x) { return x % 2 === 1; }
+ function naturalSmallerThan (x) { return _.iterators.List(_.range(0, x)); }
+
+
+ module("underscore.function.iterators");
+
+ test("List", function() {
+ var i = _.iterators.List([1, 2, 3, 4, 5]);
+ equal(i(), 1, "should return the first element of the underlying array");
+ equal(i(), 2, "should return the next element of the underlying array");
+ equal(i(), 3, "should return the next element of the underlying array");
+ equal(i(), 4, "should return the next element of the underlying array");
+ equal(i(), 5, "should return the next element of the underlying array");
+ equal(i(), void 0, "should return undefined when out of elements");
+
+ i = _.iterators.List([1, [2, 3, [4]], 5]);
+ equal(i(), 1, "should return the first element of the underlying array");
+ notEqual(i(), 2, "should not do a deep traverse");
+ equal(i(), 5, "should return the next element of the underlying array");
+ equal(i(), void 0, "should return undefined when out of elements");
+
+ i = _.iterators.List([]);
+ equal(i(), void 0, "should return undefined when there are no elements");
+
+ i = _.iterators.List([[], [[]]]);
+ notEqual(i(), void 0, "should have a values given an empty tree");
+ });
+
+ test("Tree", function () {
+ var i = _.iterators.Tree([]);
+ equal(i(), void 0, "should return undefined for an empty array");
+
+ i = _.iterators.Tree([[], [[]]]);
+ equal(i(), void 0, "should return undefined for an empty tree");
+
+ i = _.iterators.Tree([1, 2, 3, 4, 5]);
+ equal(i(), 1, "should return the first element of the underlying array");
+ equal(i(), 2, "should return the next element of the underlying array");
+ equal(i(), 3, "should return the next element of the underlying array");
+ equal(i(), 4, "should return the next element of the underlying array");
+ equal(i(), 5, "should return the next element of the underlying array");
+ equal(i(), void 0, "should return undefined when out of elements");
+
+ i = _.iterators.Tree([1, [2, 3, [4]], 5]);
+ equal(i(), 1, "should return the first element of the underlying array");
+ equal(i(), 2, "should return the next element of the underlying array");
+ equal(i(), 3, "should return the next element of the underlying array");
+ equal(i(), 4, "should return the next element of the underlying array");
+ equal(i(), 5, "should return the next element of the underlying array");
+ equal(i(), void 0, "should return undefined when out of elements");
+ });
+
+ test("Reduce", function () {
+
+ equal( _.iterators.reduce(_.iterators.Tree([1, [2, 3, [4]], 5]), sum, 0), 15, "should fold an iterator with many elements");
+
+ equal( _.iterators.reduce(_.iterators.Tree([[[4], []]]), sum, 42), 46, "should fold an iterator with one element");
+
+ equal( _.iterators.reduce(_.iterators.Tree([[], [[]]]), sum, 42), 42, "should fold an empty iterator");
+
+ equal( _.iterators.reduce(_.iterators.Tree([1, [2, 3, [4]], 5]), sum), 15, "should fold an array with two or more elements");
+
+ equal( _.iterators.reduce(_.iterators.Tree([[[4], []]]), sum), 4, "should fold an array with one element");
+
+ equal( _.iterators.reduce(_.iterators.Tree([[[], []]]), sum), void 0, "should fold an array with no elements");
+ });
+
+ test("Accumulate", function () {
+ var i = _.iterators.accumulate(_.iterators.Tree([1, [2, 3, [4]], 5]), sum, 0);
+ equal(i(), 1, "should map an iterator with many elements");
+ equal(i(), 3, "should map an iterator with many elements");
+ equal(i(), 6, "should map an iterator with many elements");
+ equal(i(), 10, "should map an iterator with many elements");
+ equal(i(), 15, "should map an iterator with many elements");
+ equal(i(), void 0);
+
+ i = _.iterators.accumulate(_.iterators.Tree([[[4], []]]), sum, 42);
+ equal(i(), 46, "should map an iterator with one element");
+ equal(i(), void 0);
+
+ i = _.iterators.accumulate(_.iterators.Tree([[[], []]]), sum, 42);
+ equal(i(), void 0, "should map an empty iterator");
+
+ i = _.iterators.accumulate(_.iterators.Tree([1, [2, 3, [4]], 5]), sum);
+ equal(i(), 1, "should map an iterator with many elements");
+ equal(i(), 3, "should map an iterator with many elements");
+ equal(i(), 6, "should map an iterator with many elements");
+ equal(i(), 10, "should map an iterator with many elements");
+ equal(i(), 15, "should map an iterator with many elements");
+ equal(i(), void 0);
+
+ i = _.iterators.accumulate(_.iterators.Tree([[[4], []]]), sum);
+ equal(i(), 4, "should map an iterator with one element");
+ equal(i(), void 0);
+
+ i = _.iterators.accumulate(_.iterators.Tree([[[], []]]), sum);
+ equal(i(), void 0);
+
+ });
+
+ test("Map", function () {
+ var i = _.iterators.map(_.iterators.Tree([1, [2, 3, [4]], 5]), square);
+ equal(i(), 1, "should map an iterator with many elements");
+ equal(i(), 4, "should map an iterator with many elements");
+ equal(i(), 9, "should map an iterator with many elements");
+ equal(i(), 16, "should map an iterator with many elements");
+ equal(i(), 25, "should map an iterator with many elements");
+ equal(i(), void 0);
+
+ i = _.iterators.map(_.iterators.Tree([[[4], []]]), square);
+ equal(i(), 16, "should map an iterator with one element");
+ equal(i(), void 0);
+
+ i = _.iterators.map(_.iterators.Tree([[[], []]]), square);
+ equal(i(), void 0, "should map an empty iterator");
+ });
+
+ test("mapcat", function () {
+ var i = _.iterators.mapcat(_.iterators.Tree([1, [2]]), naturalSmallerThan);
+ equal(i(), 0, "should mapcat an iterator with many elements");
+ equal(i(), 0, "should mapcat an iterator with many elements");
+ equal(i(), 1, "should mapcat an iterator with many elements");
+ equal(i(), void 0);
+
+ i = _.iterators.mapcat(_.iterators.Tree([[[1], []]]), naturalSmallerThan);
+ equal(i(), 0, "should mapcat an iterator with one element");
+ equal(i(), void 0);
+
+ i = _.iterators.mapcat(_.iterators.Tree([[[], []]]), naturalSmallerThan);
+ equal(i(), void 0, "should mapcat an empty iterator");
+ });
+
+ test("filter", function() {
+ var i = _.iterators.filter(_.iterators.Tree([1, [2, 3, [4]], 5]), odd);
+ equal(i(),1);
+ equal(i(),3);
+ equal(i(),5);
+ equal(i(),void 0);
+
+ i = _.iterators.filter(_.iterators.Tree([[[4], []]]), odd);
+ equal(i(),void 0);
+
+ i = _.iterators.filter(_.iterators.Tree([[[], []]]), odd);
+ equal(i(),void 0);
+
+ i = _.iterators.filter(_.iterators.List([2, 4, 6, 8, 10]), odd);
+ equal(i(),void 0);
+ });
+
+ test("slice", function() {
+ expect(0);
+ test("with two parameter", function() {
+ expect(0);
+ test("should return an identity iterator", function() {
+ var i = _.iterators.slice(_.iterators.List([1, 2, 3, 4, 5]), 0);
+ equal(i(),1);
+ equal(i(),2);
+ equal(i(),3);
+ equal(i(),4);
+ equal(i(),5);
+ equal(i(),void 0);
+ });
+ test("should return a trailing iterator", function() {
+ var i = _.iterators.slice(_.iterators.List([1, 2, 3, 4, 5]), 1);
+ equal(i(),2);
+ equal(i(),3);
+ equal(i(),4);
+ equal(i(),5);
+ equal(i(),void 0);
+ });
+ test("should return an empty iterator when out of range", function() {
+ var i = _.iterators.slice(_.iterators.List([1, 2, 3, 4, 5]), 5);
+ equal(i(),void 0);
+ });
+ });
+ test("with three parameters", function() {
+ expect(0);
+ test("should return an identity iterator", function() {
+ var i = _.iterators.slice(_.iterators.List([1, 2, 3, 4, 5]), 0, 5);
+ equal(i(),1);
+ equal(i(),2);
+ equal(i(),3);
+ equal(i(),4);
+ equal(i(),5);
+ equal(i(),void 0);
+ i = _.iterators.slice(_.iterators.List([1, 2, 3, 4, 5]), 0, 99);
+ equal(i(),1);
+ equal(i(),2);
+ equal(i(),3);
+ equal(i(),4);
+ equal(i(),5);
+ equal(i(),void 0);
+ });
+ test("should return a leading iterator", function() {
+ var i = _.iterators.slice(_.iterators.List([1, 2, 3, 4, 5]), 0, 4);
+ equal(i(),1);
+ equal(i(),2);
+ equal(i(),3);
+ equal(i(),4);
+ equal(i(),void 0);
+ });
+ test("should return a trailing iterator", function() {
+ var i = _.iterators.slice(_.iterators.List([1, 2, 3, 4, 5]), 1, 4);
+ equal(i(),2);
+ equal(i(),3);
+ equal(i(),4);
+ equal(i(),5);
+ equal(i(),void 0);
+ i = _.iterators.slice(_.iterators.List([1, 2, 3, 4, 5]), 1, 99);
+ equal(i(),2);
+ equal(i(),3);
+ equal(i(),4);
+ equal(i(),5);
+ equal(i(),void 0);
+ });
+ test("should return an inner iterator", function() {
+ var i = _.iterators.slice(_.iterators.List([1, 2, 3, 4, 5]), 1, 3);
+ equal(i(),2);
+ equal(i(),3);
+ equal(i(),4);
+ equal(i(),void 0);
+ });
+ test("should return an empty iterator when given a zero length", function() {
+ var i = _.iterators.slice(_.iterators.List([1, 2, 3, 4, 5]), 1, 0);
+ equal(i(),void 0);
+ });
+ test("should return an empty iterator when out of range", function() {
+ var i = _.iterators.slice(_.iterators.List([1, 2, 3, 4, 5]), 5, 1);
+ equal(i(),void 0);
+ });
+ });
+ });
+
+ test("drop", function() {
+ expect(0);
+ test("should drop the number of items dropped", function() {
+ var i = _.iterators.drop(_.iterators.List([1, 2, 3, 4, 5]), 2);
+ equal(i(),3);
+ equal(i(),4);
+ equal(i(),5);
+ equal(i(),void 0);
+ });
+ test("should handle overdropping", function() {
+ var i = _.iterators.drop(_.iterators.List([1, 2, 3, 4, 5]), 99);
+ equal(i(),void 0);
+ });
+ test("should handle underdropping", function() {
+ var i = _.iterators.drop(_.iterators.List([1, 2, 3, 4, 5]), 0);
+ equal(i(),1);
+ equal(i(),2);
+ equal(i(),3);
+ equal(i(),4);
+ equal(i(),5);
+ equal(i(),void 0);
+ });
+ test("should default to one", function() {
+ var i = _.iterators.drop(_.iterators.List([1, 2, 3, 4, 5]));
+ equal(i(),2);
+ equal(i(),3);
+ equal(i(),4);
+ equal(i(),5);
+ equal(i(),void 0);
+ });
+ });
+
+ test("accumulateWithReturn", function() {
+ expect(0);
+ test("should pass the state and result in a pair", function() {
+ var i = _.iterators.accumulateWithReturn(_.iterators.List([1, 2, 3, 4, 5]), function(state, element) {
+ return [state + element, 'Total is ' + (state + element)];
+ }, 0);
+ equal(i(),'Total is 1');
+ equal(i(),'Total is 3');
+ equal(i(),'Total is 6');
+ equal(i(),'Total is 10');
+ equal(i(),'Total is 15');
+ });
+ });
+
+ test("unfold", function() {
+ expect(0);
+ test("should unfold and include the seed", function() {
+ var i = _.iterators.unfold(0, function(n) {
+ return n + 1;
+ });
+ equal(i(),0);
+ equal(i(),1);
+ equal(i(),2);
+ });
+ test("should not unfold without a seed", function() {
+ var i = _.iterators.unfold(void 0, function(n) {
+ return n + 1;
+ });
+ equal(i(),void 0);
+ equal(i(),void 0);
+ equal(i(),void 0);
+ equal(i(),void 0);
+ });
+ });
+
+ test("unfoldWithReturn", function() {
+ expect(0);
+ test("should unfold and throw off a value", function() {
+ var i = _.iterators.unfoldWithReturn(1, function(n) {
+ return [n + 1, n * n];
+ });
+ equal(i(),1);
+ equal(i(),4);
+ equal(i(),9);
+ equal(i(),16);
+ });
+ test("should halt if it returns undefined", function() {
+ var i = _.iterators.unfoldWithReturn(1, function(n) {
+ return [n + 1, n === 1 ? void 0 : n * n];
+ });
+ equal(i(),void 0);
+ equal(i(),void 0);
+ equal(i(),void 0);
+ equal(i(),void 0);
+ });
+ test("should halt if the state becomes undefined", function() {
+ var i = _.iterators.unfoldWithReturn(1, function(n) {
+ return [(n === 3 ? void 0 : n + 1), (n === void 0 ? 100 : n * n)];
+ });
+ equal(i(),1);
+ equal(i(),4);
+ equal(i(),9);
+ equal(i(),void 0);
+ });
+ });
+
+});
+
diff --git a/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/test/function.predicates.js b/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/test/function.predicates.js
new file mode 100644
index 0000000..770bde1
--- /dev/null
+++ b/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/test/function.predicates.js
@@ -0,0 +1,247 @@
+$(document).ready(function() {
+
+ module("underscore.function.predicates");
+
+ test("isInstanceOf", function() {
+ equal(_.isInstanceOf([], Array), true, 'should identify arrays');
+ equal(_.isInstanceOf(null, Array), false, 'should identify that null is not an array instance');
+ });
+
+ test("isAssociative", function() {
+ equal(_.isAssociative({}), true, 'should identify that a map is associative');
+ equal(_.isAssociative(function(){}), true, 'should identify that a function is associative');
+ equal(_.isAssociative([]), true, 'should identify that an array is associative');
+ equal(_.isAssociative(new Array(10)), true, 'should identify that an array is associative');
+
+ equal(_.isAssociative(1), false, 'should identify non-associative things');
+ equal(_.isAssociative(0), false, 'should identify non-associative things');
+ equal(_.isAssociative(-1), false, 'should identify non-associative things');
+ equal(_.isAssociative(3.14), false, 'should identify non-associative things');
+ equal(_.isAssociative('undefined'), false, 'should identify non-associative things');
+ equal(_.isAssociative(''), false, 'should identify non-associative things');
+ equal(_.isAssociative(NaN), false, 'should identify non-associative things');
+ equal(_.isAssociative(Infinity), false, 'should identify non-associative things');
+ equal(_.isAssociative(true), false, 'should identify non-associative things');
+ });
+
+ test("isIndexed", function() {
+ equal(_.isIndexed([]), true, 'should identify indexed objects');
+ equal(_.isIndexed([1,2,3]), true, 'should identify indexed objects');
+ equal(_.isIndexed(new Array(10)), true, 'should identify indexed objects');
+ equal(_.isIndexed(""), true, 'should identify indexed objects');
+ equal(_.isIndexed("abc"), true, 'should identify indexed objects');
+
+ equal(_.isIndexed(1), false, 'should identify when something is not an indexed object');
+ equal(_.isIndexed(0), false, 'should identify when something is not an indexed object');
+ equal(_.isIndexed(-1), false, 'should identify when something is not an indexed object');
+ equal(_.isIndexed(3.14), false, 'should identify when something is not an indexed object');
+ equal(_.isIndexed(undefined), false, 'should identify when something is not an indexed object');
+ equal(_.isIndexed(NaN), false, 'should identify when something is not an indexed object');
+ equal(_.isIndexed(Infinity), false, 'should identify when something is not an indexed object');
+ equal(_.isIndexed(true), false, 'should identify when something is not an indexed object');
+ equal(_.isIndexed(false), false, 'should identify when something is not an indexed object');
+ equal(_.isIndexed(function(){}), false, 'should identify when something is not an indexed object');
+ });
+
+ test("isSequential", function() {
+ equal(_.isSequential(new Array(10)), true, 'should identify sequential objects');
+ equal(_.isSequential([1,2]), true, 'should identify sequential objects');
+ equal(_.isSequential(arguments), true, 'should identify sequential objects');
+
+ equal(_.isSequential({}), false, 'should identify when something is not sequential');
+ equal(_.isSequential(function(){}), false, 'should identify when something is not sequential');
+ equal(_.isSequential(1), false, 'should identify when something is not sequential');
+ equal(_.isSequential(0), false, 'should identify when something is not sequential');
+ equal(_.isSequential(-1), false, 'should identify when something is not sequential');
+ equal(_.isSequential(3.14), false, 'should identify when something is not sequential');
+ equal(_.isSequential('undefined'), false, 'should identify when something is not sequential');
+ equal(_.isSequential(''), false, 'should identify when something is not sequential');
+ equal(_.isSequential(NaN), false, 'should identify when something is not sequential');
+ equal(_.isSequential(Infinity), false, 'should identify when something is not sequential');
+ equal(_.isSequential(true), false, 'should identify when something is not sequential');
+ });
+
+ test("isPlainObject", function() {
+ function SomeConstructor() {}
+ equal(_.isPlainObject({}), true, 'should identify empty objects');
+ equal(_.isPlainObject({a: 1, b: 2}), true, 'should identify objects');
+ equal(_.isPlainObject(Object.create(null)), false, 'should reject objects with no prototype');
+ equal(_.isPlainObject(new SomeConstructor), false, 'should reject instances constructed by something other than Object');
+
+ equal(_.isPlainObject([]), false, 'should identify when something is not a plain object');
+ equal(_.isPlainObject(function(){}), false, 'should identify when something is not a plain object');
+ equal(_.isPlainObject(null), false, 'should identify when something is not a plain object');
+ equal(_.isPlainObject(1), false, 'should identify when something is not a plain object');
+ equal(_.isPlainObject(0), false, 'should identify when something is not a plain object');
+ equal(_.isPlainObject(-1), false, 'should identify when something is not a plain object');
+ equal(_.isPlainObject(3.14), false, 'should identify when something is not a plain object');
+ equal(_.isPlainObject('undefined'), false, 'should identify when something is not a plain object');
+ equal(_.isPlainObject(''), false, 'should identify when something is not a plain object');
+ equal(_.isPlainObject(NaN), false, 'should identify when something is not a plain object');
+ equal(_.isPlainObject(Infinity), false, 'should identify when something is not a plain object');
+ equal(_.isPlainObject(true), false, 'should identify when something is not a plain object');
+ });
+
+
+ test("isEven", function() {
+ equal(_.isEven(0), true, 'should identify even numbers');
+ equal(_.isEven(2), true, 'should identify even numbers');
+ equal(_.isEven(-2), true, 'should identify even numbers');
+ equal(_.isEven(1), false, 'should identify non-even numbers');
+ equal(_.isEven(null), false, 'should return false for non-numbers');
+ equal(_.isEven(undefined), false, 'should return false for non-numbers');
+ equal(_.isEven([]), false, 'should return false for non-numbers');
+ equal(_.isEven(NaN), false, 'should return false for non-numbers');
+ });
+
+ test("isOdd", function() {
+ equal(_.isOdd(1), true, 'should identify odd numbers');
+ equal(_.isOdd(33), true, 'should identify odd numbers');
+ equal(_.isOdd(-55), true, 'should identify odd numbers');
+ equal(_.isOdd(10), false, 'should identify non-odd numbers');
+ equal(_.isOdd(null), false, 'should return false for non-numbers');
+ equal(_.isOdd(undefined), false, 'should return false for non-numbers');
+ equal(_.isOdd([]), false, 'should return false for non-numbers');
+ equal(_.isOdd(NaN), false, 'should return false for non-numbers');
+ });
+
+ test("isPositive", function() {
+ equal(_.isPositive(1), true, 'should identify positive numbers');
+ equal(_.isPositive(-1), false, 'should identify non-positive numbers');
+ equal(_.isPositive(0), false, 'should identify non-positive numbers');
+ equal(_.isPositive(+0), false, 'should identify non-positive numbers');
+ });
+
+ test("isNegative", function() {
+ equal(_.isNegative(-1), true, 'should identify negative numbers');
+ equal(_.isNegative(0), false, 'should identify non-negative numbers');
+ equal(_.isNegative(110), false, 'should identify non-negative numbers');
+ equal(_.isNegative(-0), false, 'should identify non-negative numbers');
+ });
+
+ test("isZero", function() {
+ equal(_.isZero(0), true, 'should know zero');
+ equal(_.isZero(-0), true, 'should know zero');
+ equal(_.isZero(+0), true, 'should know zero');
+ equal(_.isZero(1), false, 'should know non-zero');
+ equal(_.isZero(-1), false, 'should know non-zero');
+ });
+
+ test("isNumeric", function() {
+ // Integer Literals
+ equal(_.isNumeric("-10"), true, "should identify Negative integer string");
+ equal(_.isNumeric("0"), true, "should identify Zero string");
+ equal(_.isNumeric("5"), true, "should identify Positive integer string");
+ equal(_.isNumeric(-16), true, "should identify Negative integer number");
+ equal(_.isNumeric(0), true, "should identify Zero integer number");
+ equal(_.isNumeric(32), true, "should identify Positive integer number");
+ equal(_.isNumeric("040"), true, "should identify Octal integer literal string");
+ equal(_.isNumeric(0144), true, "should identify Octal integer literal");
+ equal(_.isNumeric("0xFF"), true, "should identify Hexadecimal integer literal string");
+ equal(_.isNumeric(0xFFF), true, "should identify Hexadecimal integer literal");
+
+ // Foating-Point Literals
+ equal(_.isNumeric("-1.6"), true, "should identify Negative floating point string");
+ equal(_.isNumeric("4.536"), true, "should identify Positive floating point string");
+ equal(_.isNumeric(-2.6), true, "should identify Negative floating point number");
+ equal(_.isNumeric(3.1415), true, "should identify Positive floating point number");
+ equal(_.isNumeric(8e5), true, "should identify Exponential notation");
+ equal(_.isNumeric("123e-2"), true, "should identify Exponential notation string");
+
+ // Non-Numeric values
+ equal(_.isNumeric(""), false, "should identify Empty string");
+ equal(_.isNumeric(" "), false, "should identify Whitespace characters string");
+ equal(_.isNumeric("\t\t"), false, "should identify Tab characters string");
+ equal(_.isNumeric("abcdefghijklm1234567890"), false, "should identify Alphanumeric character string");
+ equal(_.isNumeric("xabcdefx"), false, "should identify Non-numeric character string");
+ equal(_.isNumeric(true), false, "should identify Boolean true literal");
+ equal(_.isNumeric(false), false, "should identify Boolean false literal");
+ equal(_.isNumeric("bcfed5.2"), false, "should identify Number with preceding non-numeric characters");
+ equal(_.isNumeric("7.2acdgs"), false, "should identify Number with trailling non-numeric characters");
+ equal(_.isNumeric(undefined), false, "should identify Undefined value");
+ equal(_.isNumeric(null), false, "should identify Null value");
+ equal(_.isNumeric(NaN), false, "should identify NaN value");
+ equal(_.isNumeric(Infinity), false, "should identify Infinity primitive");
+ equal(_.isNumeric(Number.POSITIVE_INFINITY), false, "should identify Positive Infinity");
+ equal(_.isNumeric(Number.NEGATIVE_INFINITY), false, "should identify Negative Infinity");
+ equal(_.isNumeric(new Date(2009,1,1)), false, "should identify Date object");
+ equal(_.isNumeric({}), false, "should identify Empty object");
+ equal(_.isNumeric(function(){}), false, "should identify Instance of a function");
+ });
+
+ test("isInteger and isFloat", function() {
+ var integerChecks = [
+ {value: "-10", message: "should identify Negative integer string"},
+ {value: "0", message: "should identify Zero string"},
+ {value: "5", message: "should identify Positive integer string"},
+ {value: -16, message: "should identify Negative integer number"},
+ {value: 0, message: "should identify Zero integer number"},
+ {value: 32, message: "should identify Positive integer number"},
+ {value: "040", message: "should identify Octal integer literal string"},
+ {value: 0144, message: "should identify Octal integer literal"},
+ {value: "0xFF", message: "should identify Hexadecimal integer literal string"},
+ {value: 0xFFF, message: "should identify Hexadecimal integer literal"},
+ {value: 1.0, message: "should identify float versions of integers"},
+ {value: 8e5, message: "Exponential notation"}
+ ];
+
+ var floatChecks = [
+ {value: "-1.6", message: "should identify Negative floating point string"},
+ {value: "4.536", message: "should identify Positive floating point string"},
+ {value: -2.6, message: "should identify Negative floating point number"},
+ {value: 3.1415, message: "should identify Positive floating point number"},
+ {value: 8.11e1, message: "should identify Exponential notation "},
+ {value: "123e-2", message: "should identify Exponential notation string"}
+ ];
+
+ var negativeChecks = [
+ {value: "abc", message: "should identify non-numeric strings"},
+ {value: undefined, message: "should identify undefined"},
+ {value: NaN, message: "should identify NaN"},
+ {value: null, message: "should identify null"},
+ {value: Infinity, message: "should identify Infinity"}
+ ];
+
+ var testMultiple = function(cases, fn, result){
+ for (var i = 0; i < cases.length; i++) {
+ equal(fn(cases[i].value), result, cases[i].message);
+ }
+ };
+
+ testMultiple(integerChecks, _.isInteger, true);
+ testMultiple(floatChecks, _.isInteger, false);
+ testMultiple(negativeChecks, _.isInteger, false);
+
+ testMultiple(integerChecks, _.isFloat, false);
+ testMultiple(floatChecks, _.isFloat, true);
+ testMultiple(negativeChecks, _.isFloat, false);
+ });
+
+ test("isIncreasing", function() {
+ var inc = [1,2,3];
+ var incNM = [1,2,3,3,4];
+ var dec = [5,4,3,2,1];
+
+ equal(_.isIncreasing.apply(null, inc), true, 'should identify when its arguments monotonically increase');
+ equal(_.isIncreasing.apply(null, incNM), false, 'should identify when its arguments monotonically increase');
+ equal(_.isIncreasing.apply(null, dec), false, 'should identify when its arguments do not increase');
+ });
+
+ test("isDecreasing", function() {
+ var inc = [1,2,3];
+ var incNM = [1,2,3,3,4];
+ var dec = [5,4,3,2,1];
+ var decNM = [5,4,3,3,2,1];
+
+ equal(_.isDecreasing.apply(null, inc), false, 'should identify when its arguments monotonically decrease');
+ equal(_.isDecreasing.apply(null, incNM), false, 'should identify when its arguments monotonically decrease');
+ equal(_.isDecreasing.apply(null, dec), true, 'should identify when its arguments do not decrease');
+ equal(_.isDecreasing.apply(null, decNM), false, 'should identify when its arguments monotonically decrease');
+ });
+
+ test("isValidDate", function() {
+ equal(_.isValidDate(new Date), true, 'should recognize a fresh Date instance as valid');
+ equal(!_.isValidDate(new Date("bad date")), true, 'should recognize a Date constructed with gibberish');
+ });
+
+});
diff --git a/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/test/index.html b/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/test/index.html
new file mode 100644
index 0000000..f286bb5
--- /dev/null
+++ b/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/test/index.html
@@ -0,0 +1,52 @@
+
+
+
+ Underscore-contrib Test Suite
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/test/object.builders.js b/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/test/object.builders.js
new file mode 100644
index 0000000..02f7dec
--- /dev/null
+++ b/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/test/object.builders.js
@@ -0,0 +1,82 @@
+$(document).ready(function() {
+
+ module("underscore.object.builders");
+
+ test("merge", function() {
+ var o = {'a': 1, 'b': 2};
+
+ deepEqual(_.merge(o), {a: 1, b: 2}, 'should return a copy of the object if given only one');
+ deepEqual(_.merge({'a': 1, 'b': 2}, {b: 42}), {'a': 1, b: 42}, 'should merge two objects');
+ deepEqual(_.merge({a: 1, b: 2}, {b: 42}, {c: 3}), {a: 1, b: 42, c: 3}, 'should merge three or more objects');
+ deepEqual(_.merge({a: 1, b: 2}, {b: 42}, {c: 3}, {c: 4}), {a: 1, b: 42, c: 4}, 'should merge three or more objects');
+
+ var a = {'a': 1, 'b': 2};
+ var $ = _.merge(a, {'a': 42});
+
+ deepEqual(a, {'a': 1, 'b': 2}, 'should not modify the original');
+ });
+
+ test("renameKeys", function() {
+ deepEqual(_.renameKeys({'a': 1, 'b': 2}, {'a': 'A'}), {'b': 2, 'A': 1}, 'should rename the keys in the first object to the mapping in the second object');
+
+ var a = {'a': 1, 'b': 2};
+ var $ = _.renameKeys(a, {'a': 'A'});
+
+ deepEqual(a, {'a': 1, 'b': 2}, 'should not modify the original');
+ });
+
+ test("snapshot", function() {
+ var o = {'a': 1, 'b': 2};
+ var oSnap = _.snapshot(o);
+
+ var a = [1,2,3,4];
+ var aSnap = _.snapshot(a);
+
+ var n = [1,{a: 1, b: [1,2,3]},{},4];
+ var nSnap = _.snapshot(n);
+
+ var c = [1,{a: 1, b: [1,2,3]},{},4];
+ var cSnap = _.snapshot(c);
+ c[1].b = 42;
+
+ deepEqual(o, oSnap, 'should create a deep copy of an object');
+ deepEqual(a, aSnap, 'should create a deep copy of an array');
+ deepEqual(n, nSnap, 'should create a deep copy of an array');
+ deepEqual(nSnap, [1,{a: 1, b: [1,2,3]},{},4], 'should allow changes to the original to not change copies');
+ });
+
+ test("setPath", function() {
+ var obj = {a: {b: {c: 42, d: 108}}};
+ var ary = ['a', ['b', ['c', 'd'], 'e']];
+ var nest = [1, {a: 2, b: [3,4], c: 5}, 6];
+
+ deepEqual(_.setPath(obj, 9, ['a', 'b', 'c']), {a: {b: {c: 9, d: 108}}}, '');
+ deepEqual(_.setPath(ary, 9, [1, 1, 0]), ['a', ['b', [9, 'd'], 'e']], '');
+ deepEqual(_.setPath(nest, 9, [1, 'b', 1]), [1, {a: 2, b: [3,9], c: 5}, 6], '');
+
+ deepEqual(_.setPath(obj, 9, 'a'), {a: 9}, '');
+ deepEqual(_.setPath(ary, 9, 1), ['a', 9], '');
+
+ deepEqual(obj, {a: {b: {c: 42, d: 108}}}, 'should not modify the original object');
+ deepEqual(ary, ['a', ['b', ['c', 'd'], 'e']], 'should not modify the original array');
+ deepEqual(nest, [1, {a: 2, b: [3,4], c: 5}, 6], 'should not modify the original nested structure');
+ });
+
+ test("updatePath", function() {
+ var obj = {a: {b: {c: 42, d: 108}}};
+ var ary = ['a', ['b', ['c', 'd'], 'e']];
+ var nest = [1, {a: 2, b: [3,4], c: 5}, 6];
+
+ deepEqual(_.updatePath(obj, _.always(9), ['a', 'b', 'c']), {a: {b: {c: 9, d: 108}}}, '');
+ deepEqual(_.updatePath(ary, _.always(9), [1, 1, 0]), ['a', ['b', [9, 'd'], 'e']], '');
+ deepEqual(_.updatePath(nest, _.always(9), [1, 'b', 1]), [1, {a: 2, b: [3,9], c: 5}, 6], '');
+
+ deepEqual(_.updatePath(obj, _.always(9), 'a'), {a: 9}, '');
+ deepEqual(_.updatePath(ary, _.always(9), 1), ['a', 9], '');
+
+ deepEqual(obj, {a: {b: {c: 42, d: 108}}}, 'should not modify the original object');
+ deepEqual(ary, ['a', ['b', ['c', 'd'], 'e']], 'should not modify the original array');
+ deepEqual(nest, [1, {a: 2, b: [3,4], c: 5}, 6], 'should not modify the original nested structure');
+ });
+
+});
diff --git a/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/test/object.selectors.js b/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/test/object.selectors.js
new file mode 100644
index 0000000..2c57ab0
--- /dev/null
+++ b/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/test/object.selectors.js
@@ -0,0 +1,79 @@
+$(document).ready(function() {
+
+ module("underscore.object.selectors");
+
+ test("accessor", function() {
+ var a = [{a: 1, b: 2}, {c: 3}];
+
+ equal(_.accessor('a')(a[0]), 1, 'should return a function that plucks');
+ equal(_.accessor('a')(a[1]), undefined, 'should return a function that plucks, or returns undefined');
+ deepEqual(_.map(a, _.accessor('a')), [1, undefined], 'should return a function that plucks');
+ });
+
+ test("dictionary", function() {
+ var a = [{a: 1, b: 2}, {c: 3}];
+
+ equal(_.dictionary(a[0])('a'), 1, 'should return a function that acts as a dictionary');
+ equal(_.dictionary(a[1])('a'), undefined, 'should return a function that acts as a dictionary, or returns undefined');
+ });
+
+ test("selectKeys", function() {
+ deepEqual(_.selectKeys({'a': 1, 'b': 2}, ['a']), {'a': 1}, 'shold return a map of the desired keys');
+ deepEqual(_.selectKeys({'a': 1, 'b': 2}, ['z']), {}, 'shold return an empty map if the desired keys are not present');
+ });
+
+ test("kv", function() {
+ deepEqual(_.kv({'a': 1, 'b': 2}, 'a'), ['a', 1], 'should return the key/value pair at the desired key');
+ equal(_.kv({'a': 1, 'b': 2}, 'z'), undefined, 'shold return undefined if the desired key is not present');
+ });
+
+ test("getPath", function() {
+ var deepObject = { a: { b: { c: "c" } }, falseVal: false, nullVal: null, undefinedVal: undefined, arrayVal: ["arr"] };
+ var deepArr = [[["thirdLevel"]]];
+ var ks = ["a", "b", "c"];
+
+ strictEqual(_.getPath(deepObject, ks), "c", "should get a deep property's value from objects");
+ deepEqual(ks, ["a", "b", "c"], "should not have mutated ks argument");
+ strictEqual(_.getPath(deepArr, [0, 0, 0]), "thirdLevel", "should get a deep property's value from arrays");
+ strictEqual(_.getPath(deepObject, ["arrayVal", 0]), "arr", "should get a deep property's value from nested arrays and objects");
+
+ strictEqual(_.getPath(deepObject, ["undefinedVal"]), undefined, "should return undefined for undefined properties");
+ strictEqual(_.getPath(deepObject, ["a", "notHere"]), undefined, "should return undefined for non-existent properties");
+ strictEqual(_.getPath(deepObject, ["nullVal"]), null, "should return null for null properties");
+ strictEqual(_.getPath(deepObject, ["nullVal", "notHere", "notHereEither"]), undefined, "should return undefined for non-existent descendents of null properties");
+
+ strictEqual(_.getPath(deepObject, "a.b.c"), "c", "should work with keys written in dot notation");
+ });
+
+ test("hasPath", function() {
+ var deepObject = { a: { b: { c: "c" } }, falseVal: false, nullVal: null, undefinedVal: undefined, arrayVal: ["arr"] };
+ var ks = ["a", "b", "c"];
+
+ strictEqual(_.hasPath(deepObject, ["notHere", "notHereEither"]), false, "should return false if the path doesn't exist");
+ strictEqual(_.hasPath(deepObject, ks), true, "should return true if the path exists");
+ deepEqual(ks, ["a", "b", "c"], "should not have mutated ks argument");
+
+ strictEqual(_.hasPath(deepObject, ["arrayVal", 0]), true, "should return true for an array's index if it is defined");
+ strictEqual(_.hasPath(deepObject, ["arrayVal", 999]), false, "should return false for an array's index if it is not defined");
+
+ strictEqual(_.hasPath(deepObject, ["nullVal"]), true, "should return true for null properties");
+ strictEqual(_.hasPath(deepObject, ["undefinedVal"]), true, "should return true for properties that were explicitly assigned undefined");
+
+ strictEqual(_.hasPath(deepObject, ["nullVal", "notHere"]), false, "should return false for descendants of null properties");
+ strictEqual(_.hasPath(deepObject, ["undefinedVal", "notHere"]), false, "should return false for descendants of undefined properties");
+
+ strictEqual(_.hasPath(deepObject, "a.b.c"), true, "should work with keys written in dot notation.");
+ });
+
+ test("pickWhen", function() {
+ var a = {foo: true, bar: false, baz: 42};
+
+ deepEqual(_.pickWhen(a, _.truthy), {foo: true, baz: 42}, "should return an object with kvs that return a truthy value for the given predicate");
+ });
+
+ test("omitWhen", function() {
+ var a = {foo: [], bar: "", baz: "something", quux: ['a']};
+
+ deepEqual(_.omitWhen(a, _.isEmpty), {baz: "something", quux: ['a']}, "should return an object with kvs that return a falsey value for the given predicate");
+ });
+});
diff --git a/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/test/util.existential.js b/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/test/util.existential.js
new file mode 100644
index 0000000..82eaf6a
--- /dev/null
+++ b/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/test/util.existential.js
@@ -0,0 +1,63 @@
+$(document).ready(function() {
+
+ module("underscore.util.existential");
+
+ test("exists", function() {
+ equal(_.exists(null), false, 'should know that null is not existy');
+ equal(_.exists(undefined), false, 'should know that undefined is not existy');
+
+ equal(_.exists(1), true, 'should know that all but null and undefined are existy');
+ equal(_.exists(0), true, 'should know that all but null and undefined are existy');
+ equal(_.exists(-1), true, 'should know that all but null and undefined are existy');
+ equal(_.exists(3.14), true, 'should know that all but null and undefined are existy');
+ equal(_.exists('undefined'), true, 'should know that all but null and undefined are existy');
+ equal(_.exists(''), true, 'should know that all but null and undefined are existy');
+ equal(_.exists(NaN), true, 'should know that all but null and undefined are existy');
+ equal(_.exists(Infinity), true, 'should know that all but null and undefined are existy');
+ equal(_.exists(true), true, 'should know that all but null and undefined are existy');
+ equal(_.exists(false), true, 'should know that all but null and undefined are existy');
+ equal(_.exists(function(){}), true, 'should know that all but null and undefined are existy');
+ });
+
+ test("truthy", function() {
+ equal(_.truthy(null), false, 'should know that null, undefined and false are not truthy');
+ equal(_.truthy(undefined), false, 'should know that null, undefined and false are not truthy');
+ equal(_.truthy(false), false, 'should know that null, undefined and false are not truthy');
+
+ equal(_.truthy(1), true, 'should know that everything else is truthy');
+ equal(_.truthy(0), true, 'should know that everything else is truthy');
+ equal(_.truthy(-1), true, 'should know that everything else is truthy');
+ equal(_.truthy(3.14), true, 'should know that everything else is truthy');
+ equal(_.truthy('undefined'), true, 'should know that everything else is truthy');
+ equal(_.truthy(''), true, 'should know that everything else is truthy');
+ equal(_.truthy(NaN), true, 'should know that everything else is truthy');
+ equal(_.truthy(Infinity), true, 'should know that everything else is truthy');
+ equal(_.truthy(true), true, 'should know that everything else is truthy');
+ equal(_.truthy(function(){}), true, 'should know that everything else is truthy');
+ });
+
+ test("falsey", function() {
+ equal(_.falsey(null), true, 'should know that null, undefined and false are not falsey');
+ equal(_.falsey(undefined), true, 'should know that null, undefined and false are not falsey');
+ equal(_.falsey(false), true, 'should know that null, undefined and false are not falsey');
+
+ equal(_.falsey(1), false, 'should know that everything else is falsey');
+ equal(_.falsey(0), false, 'should know that everything else is falsey');
+ equal(_.falsey(-1), false, 'should know that everything else is falsey');
+ equal(_.falsey(3.14), false, 'should know that everything else is falsey');
+ equal(_.falsey('undefined'), false, 'should know that everything else is falsey');
+ equal(_.falsey(''), false, 'should know that everything else is falsey');
+ equal(_.falsey(NaN), false, 'should know that everything else is falsey');
+ equal(_.falsey(Infinity), false, 'should know that everything else is falsey');
+ equal(_.falsey(true), false, 'should know that everything else is falsey');
+ equal(_.falsey(function(){}), false, 'should know that everything else is falsey');
+ });
+
+ test('firstExisting', function() {
+ equal(_.firstExisting('first', 'second'), 'first', 'should return the first existing value');
+ equal(_.firstExisting(null, 'second'), 'second', 'should ignore null');
+ equal(_.firstExisting(void 0, 'second'), 'second', 'should ignore undefined');
+ equal(_.firstExisting(null, void 0, 'third'), 'third', 'should work with more arguments');
+ });
+
+});
diff --git a/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/test/util.operators.js b/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/test/util.operators.js
new file mode 100644
index 0000000..a91fb78
--- /dev/null
+++ b/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/test/util.operators.js
@@ -0,0 +1,141 @@
+$(document).ready(function() {
+
+ module("underscore.util.operators");
+
+ test("add", function() {
+ equal(_.add(1, 1), 2, '1 + 1 = 2');
+ equal(_.add(3, 5), 8, '3 + 5 = 8');
+ equal(_.add(1, 2, 3, 4), 10, 'adds multiple operands');
+ });
+
+ test("sub", function() {
+ equal(_.sub(1, 1), 0, '1 - 1 = 0');
+ equal(_.sub(5, 3), 2, '5 - 3 = 2');
+ equal(_.sub(10, 9, 8, 7), -14, 'subtracts multiple operands');
+ });
+
+ test("mul", function() {
+ equal(_.mul(1, 1), 1, '1 * 1 = 1');
+ equal(_.mul(5, 3), 15, '5 * 3 = 15');
+ equal(_.mul(1, 2, 3, 4), 24, 'multiplies multiple operands');
+ });
+
+ test("div", function() {
+ equal(_.div(1, 1), 1, '1 / 1 = 1');
+ equal(_.div(15, 3), 5, '15 / 3 = 5');
+ equal(_.div(15, 0), Infinity, '15 / 0 = Infinity');
+ equal(_.div(24, 2, 2, 2), 3, 'divides multiple operands');
+ });
+
+ test("mod", function() {
+ equal(_.mod(3, 2), 1, '3 / 2 = 1');
+ equal(_.mod(15, 3), 0, '15 / 3 = 0');
+ });
+
+ test("inc", function() {
+ equal(_.inc(1), 2, '++1 = 2');
+ equal(_.inc(15), 16, '++15 = 16');
+ });
+
+ test("dec", function() {
+ equal(_.dec(2), 1, '--2 = 1');
+ equal(_.dec(15), 14, '--15 = 15');
+ });
+
+ test("neg", function() {
+ equal(_.neg(2), -2, 'opposite of 2');
+ equal(_.neg(-2), 2, 'opposite of -2');
+ equal(_.neg(true), -1, 'opposite of true');
+ });
+
+ test("eq", function() {
+ equal(_.eq(1, 1), true, '1 == 1');
+ equal(_.eq(1, true), true, '1 == true');
+ equal(_.eq(1, false), false, '1 != false');
+ equal(_.eq(1, '1'), true, '1 == "1"');
+ equal(_.eq(1, 'one'), false, '1 != "one"');
+ equal(_.eq(0, 0), true, '0 == 0');
+ equal(_.eq(0, false), true, '0 == false');
+ equal(_.eq(0, '0'), true, '0 == "0"');
+ equal(_.eq({}, {}), false, '{} == {}');
+ equal(false, false, 'failing placeholder');
+ equal(_.eq(0, 0, 1), false, 'compares a list of arguments');
+ });
+ test("seq", function() {
+ equal(_.seq(1, 1), true, '1 === 1');
+ equal(_.seq(1, '1'), false, '1 !== "1"');
+ equal(_.seq(0, 0, 1), false, 'compares a list of arguments');
+ });
+ test("neq", function() {
+ equal(_.neq('a', 'b'), true, '"a" != "b"');
+ equal(_.neq(1, '1'), false, '1 == "1"');
+ equal(_.neq(0, 0, 1), true, 'compares a list of arguments');
+ });
+ test("sneq", function() {
+ equal(_.sneq('a', 'b'), true, '"a" !== "b"');
+ equal(_.sneq(1, '1'), true, '1 !== "1"');
+ equal(_.sneq(0, 0, 1), true, 'compares a list of arguments');
+ });
+ test("not", function() {
+ equal(_.not(true), false, 'converts true to false');
+ equal(_.not(false), true, 'converts false to true');
+ equal(_.not('truthy'), false, 'converts truthy values to false');
+ equal(_.not(null), true, 'converts falsy values to true');
+ });
+ test("gt", function() {
+ equal(_.gt(3, 2), true, '3 > 2');
+ equal(_.gt(1, 3), false, '1 > 3');
+ equal(_.gt(1, 2, 1), false, 'compares a list of arguments');
+ });
+ test("lt", function() {
+ equal(_.lt(3, 2), false, '3 < 2');
+ equal(_.lt(1, 3), true, '1 < 3');
+ equal(_.lt(1, 2, 1), false, 'compares a list of arguments');
+ });
+ test("gte", function() {
+ equal(_.gte(3, 2), true, '3 >= 2');
+ equal(_.gte(1, 3), false, '1 >= 3');
+ equal(_.gte(3, 3), true, '3 >= 3');
+ equal(_.gte(2, 3, 1), false, 'compares a list of arguments');
+ });
+ test("lte", function() {
+ equal(_.lte(3, 2), false, '3 <= 2');
+ equal(_.lte(1, 3), true, '1 <= 3');
+ equal(_.lte(3, 3), true, '3 <= 3');
+ equal(_.lte(2, 2, 1), false, 'compares a list of arguments');
+ });
+ test("bitwiseAnd", function() {
+ equal(_.bitwiseAnd(1, 1), 1, '1 & 1');
+ equal(_.bitwiseAnd(1, 0), 0, '1 & 0');
+ equal(_.bitwiseAnd(1, 1, 0), 0, 'operates on multiple arguments');
+ });
+ test("bitwiseOr", function() {
+ equal(_.bitwiseOr(1, 1), 1, '1 | 1');
+ equal(_.bitwiseOr(1, 0), 1, '1 | 0');
+ equal(_.bitwiseOr(1, 1, 2), 3, 'operates on multiple arguments');
+ });
+ test("bitwiseXor", function() {
+ equal(_.bitwiseXor(1, 1), 0, '1 ^ 1');
+ equal(_.bitwiseXor(1, 2), 3, '1 ^ 2');
+ equal(_.bitwiseXor(1, 2, 3), 0, 'operates on multiple arguments');
+ });
+ test("bitwiseNot", function() {
+ equal(_.bitwiseNot(1), -2, '~1');
+ equal(_.bitwiseNot(2), -3, '~2');
+ });
+ test("bitwiseLeft", function() {
+ equal(_.bitwiseLeft(1, 1), 2, '1 << 1');
+ equal(_.bitwiseLeft(1, 0), 1, '1 << 0');
+ equal(_.bitwiseLeft(1, 1, 1), 4, 'operates on multiple arguments');
+ });
+ test("bitwiseRight", function() {
+ equal(_.bitwiseRight(1, 1), 0, '1 >> 1');
+ equal(_.bitwiseRight(2, 1), 1, '2 >> 1');
+ equal(_.bitwiseRight(3, 1, 1), 0, 'operates on multiple arguments');
+ });
+ test("bitwiseZ", function() {
+ equal(_.bitwiseZ(-1, 1), 2147483647, '-1 >>> 1');
+ equal(_.bitwiseZ(-1, 1, 1), 1073741823, 'operates on multiple arguments');
+ });
+
+});
diff --git a/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/test/util.strings.js b/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/test/util.strings.js
new file mode 100644
index 0000000..dc7d071
--- /dev/null
+++ b/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/test/util.strings.js
@@ -0,0 +1,55 @@
+
+$(document).ready(function() {
+
+ module('underscore.util.strings');
+
+ test('explode', function() {
+ deepEqual(_.explode('Virgil'), ['V','i','r','g','i','l'], 'Should explode a string into an array of characters.');
+ });
+
+ test('fromQuery', function() {
+ var query = 'foo%5Bbar%5D%5Bbaz%5D%5Bblargl%5D=blah&foo%5Bbar%5D%5Bbaz%5D%5Bblargr%5D=woop&blar=bluh&abc[]=123&abc[]=234';
+ ok(_.isEqual(_.fromQuery(query), {
+ 'foo': {
+ 'bar': {
+ 'baz': {
+ 'blargl': 'blah',
+ 'blargr': 'woop'
+ }
+ }
+ },
+ 'blar': 'bluh',
+ 'abc': [
+ '123',
+ '234'
+ ]
+ }), 'can convert a query string to a hash');
+ });
+
+ test('implode', function() {
+ equal(_.implode(['H','o','m','e','r']), 'Homer', 'Should implode an array of characters into a single string.');
+ });
+
+ test('camelCase', function() {
+ equal(_.camelCase('punic-wars'), 'punicWars', 'Should convert a dashed-format string to camelCase.');
+ });
+
+ test('toDash', function() {
+ equal(_.toDash('trojanWar'), 'trojan-war', 'Should convert a camelCase string to dashed-format.');
+ equal(_.toDash('PersianWar'), 'persian-war', 'Should convert a PascalCase string to dashed-format.');
+ });
+
+ test('toQuery', function() {
+ var obj = {'foo&bar': 'baz', 'test': 'total success', 'nested': {'works': 'too'}, 'isn\'t': ['that', 'cool?']};
+ equal(_.toQuery(obj), 'foo%26bar=baz&test=total+success&nested%5Bworks%5D=too&isn\'t%5B%5D=that&isn\'t%5B%5D=cool%3F', 'can convert a hash to a query string');
+ equal(_.toQuery(obj), jQuery.param(obj), 'query serialization matchs jQuery.param()');
+ });
+
+ test('strContains', function() {
+ equal(_.strContains('Metaphysics', 'physics'), true, 'Should return true if string contains search string.');
+ equal(_.strContains('Poetics', 'prose'), false, 'Should return false if string does not contain search string.');
+
+ var thrower = function() { _.strContains([], ''); };
+ throws(thrower, TypeError, 'Throws TypeError if first argument is not a string.');
+ });
+});
diff --git a/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/test/util.trampolines.js b/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/test/util.trampolines.js
new file mode 100644
index 0000000..ae01118
--- /dev/null
+++ b/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/test/util.trampolines.js
@@ -0,0 +1,28 @@
+$(document).ready(function() {
+
+ module("underscore.util.trampolines");
+
+ test("trampoline", function() {
+ var oddOline = function(n) {
+ if (n === 0)
+ return _.done(false);
+ else
+ return _.partial(evenOline, Math.abs(n) - 1);
+ };
+
+ var evenOline = function(n) {
+ if (n === 0)
+ return _.done(true);
+ else
+ return _.partial(oddOline, Math.abs(n) - 1);
+ };
+
+ equal(_.trampoline(evenOline, 55000), true, 'should trampoline two mutually recursive functions');
+ equal(_.trampoline(evenOline, 0), true, 'should trampoline two mutually recursive functions');
+ equal(_.trampoline(evenOline, 111111), false, 'should trampoline two mutually recursive functions');
+ equal(_.trampoline(oddOline, 1), true, 'should trampoline two mutually recursive functions');
+ equal(_.trampoline(oddOline, 11111), true, 'should trampoline two mutually recursive functions');
+ equal(_.trampoline(oddOline, 22), false, 'should trampoline two mutually recursive functions');
+ });
+
+});
diff --git a/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/test/vendor/jquery.js b/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/test/vendor/jquery.js
new file mode 100644
index 0000000..3774ff9
--- /dev/null
+++ b/node_modules/jsdoc/node_modules/catharsis/node_modules/underscore-contrib/test/vendor/jquery.js
@@ -0,0 +1,9404 @@
+/*!
+ * jQuery JavaScript Library v1.7.2
+ * http://jquery.com/
+ *
+ * Copyright 2011, John Resig
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * Includes Sizzle.js
+ * http://sizzlejs.com/
+ * Copyright 2011, The Dojo Foundation
+ * Released under the MIT, BSD, and GPL Licenses.
+ *
+ * Date: Wed Mar 21 12:46:34 2012 -0700
+ */
+(function( window, undefined ) {
+
+// Use the correct document accordingly with window argument (sandbox)
+var document = window.document,
+ navigator = window.navigator,
+ location = window.location;
+var jQuery = (function() {
+
+// Define a local copy of jQuery
+var jQuery = function( selector, context ) {
+ // The jQuery object is actually just the init constructor 'enhanced'
+ return new jQuery.fn.init( selector, context, rootjQuery );
+ },
+
+ // Map over jQuery in case of overwrite
+ _jQuery = window.jQuery,
+
+ // Map over the $ in case of overwrite
+ _$ = window.$,
+
+ // A central reference to the root jQuery(document)
+ rootjQuery,
+
+ // A simple way to check for HTML strings or ID strings
+ // Prioritize #id over to avoid XSS via location.hash (#9521)
+ quickExpr = /^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,
+
+ // Check if a string has a non-whitespace character in it
+ rnotwhite = /\S/,
+
+ // Used for trimming whitespace
+ trimLeft = /^\s+/,
+ trimRight = /\s+$/,
+
+ // Match a standalone tag
+ rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>)?$/,
+
+ // JSON RegExp
+ rvalidchars = /^[\],:{}\s]*$/,
+ rvalidescape = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,
+ rvalidtokens = /"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
+ rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g,
+
+ // Useragent RegExp
+ rwebkit = /(webkit)[ \/]([\w.]+)/,
+ ropera = /(opera)(?:.*version)?[ \/]([\w.]+)/,
+ rmsie = /(msie) ([\w.]+)/,
+ rmozilla = /(mozilla)(?:.*? rv:([\w.]+))?/,
+
+ // Matches dashed string for camelizing
+ rdashAlpha = /-([a-z]|[0-9])/ig,
+ rmsPrefix = /^-ms-/,
+
+ // Used by jQuery.camelCase as callback to replace()
+ fcamelCase = function( all, letter ) {
+ return ( letter + "" ).toUpperCase();
+ },
+
+ // Keep a UserAgent string for use with jQuery.browser
+ userAgent = navigator.userAgent,
+
+ // For matching the engine and version of the browser
+ browserMatch,
+
+ // The deferred used on DOM ready
+ readyList,
+
+ // The ready event handler
+ DOMContentLoaded,
+
+ // Save a reference to some core methods
+ toString = Object.prototype.toString,
+ hasOwn = Object.prototype.hasOwnProperty,
+ push = Array.prototype.push,
+ slice = Array.prototype.slice,
+ trim = String.prototype.trim,
+ indexOf = Array.prototype.indexOf,
+
+ // [[Class]] -> type pairs
+ class2type = {};
+
+jQuery.fn = jQuery.prototype = {
+ constructor: jQuery,
+ init: function( selector, context, rootjQuery ) {
+ var match, elem, ret, doc;
+
+ // Handle $(""), $(null), or $(undefined)
+ if ( !selector ) {
+ return this;
+ }
+
+ // Handle $(DOMElement)
+ if ( selector.nodeType ) {
+ this.context = this[0] = selector;
+ this.length = 1;
+ return this;
+ }
+
+ // The body element only exists once, optimize finding it
+ if ( selector === "body" && !context && document.body ) {
+ this.context = document;
+ this[0] = document.body;
+ this.selector = selector;
+ this.length = 1;
+ return this;
+ }
+
+ // Handle HTML strings
+ if ( typeof selector === "string" ) {
+ // Are we dealing with HTML string or an ID?
+ if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) {
+ // Assume that strings that start and end with <> are HTML and skip the regex check
+ match = [ null, selector, null ];
+
+ } else {
+ match = quickExpr.exec( selector );
+ }
+
+ // Verify a match, and that no context was specified for #id
+ if ( match && (match[1] || !context) ) {
+
+ // HANDLE: $(html) -> $(array)
+ if ( match[1] ) {
+ context = context instanceof jQuery ? context[0] : context;
+ doc = ( context ? context.ownerDocument || context : document );
+
+ // If a single string is passed in and it's a single tag
+ // just do a createElement and skip the rest
+ ret = rsingleTag.exec( selector );
+
+ if ( ret ) {
+ if ( jQuery.isPlainObject( context ) ) {
+ selector = [ document.createElement( ret[1] ) ];
+ jQuery.fn.attr.call( selector, context, true );
+
+ } else {
+ selector = [ doc.createElement( ret[1] ) ];
+ }
+
+ } else {
+ ret = jQuery.buildFragment( [ match[1] ], [ doc ] );
+ selector = ( ret.cacheable ? jQuery.clone(ret.fragment) : ret.fragment ).childNodes;
+ }
+
+ return jQuery.merge( this, selector );
+
+ // HANDLE: $("#id")
+ } else {
+ elem = document.getElementById( match[2] );
+
+ // Check parentNode to catch when Blackberry 4.6 returns
+ // nodes that are no longer in the document #6963
+ if ( elem && elem.parentNode ) {
+ // Handle the case where IE and Opera return items
+ // by name instead of ID
+ if ( elem.id !== match[2] ) {
+ return rootjQuery.find( selector );
+ }
+
+ // Otherwise, we inject the element directly into the jQuery object
+ this.length = 1;
+ this[0] = elem;
+ }
+
+ this.context = document;
+ this.selector = selector;
+ return this;
+ }
+
+ // HANDLE: $(expr, $(...))
+ } else if ( !context || context.jquery ) {
+ return ( context || rootjQuery ).find( selector );
+
+ // HANDLE: $(expr, context)
+ // (which is just equivalent to: $(context).find(expr)
+ } else {
+ return this.constructor( context ).find( selector );
+ }
+
+ // HANDLE: $(function)
+ // Shortcut for document ready
+ } else if ( jQuery.isFunction( selector ) ) {
+ return rootjQuery.ready( selector );
+ }
+
+ if ( selector.selector !== undefined ) {
+ this.selector = selector.selector;
+ this.context = selector.context;
+ }
+
+ return jQuery.makeArray( selector, this );
+ },
+
+ // Start with an empty selector
+ selector: "",
+
+ // The current version of jQuery being used
+ jquery: "1.7.2",
+
+ // The default length of a jQuery object is 0
+ length: 0,
+
+ // The number of elements contained in the matched element set
+ size: function() {
+ return this.length;
+ },
+
+ toArray: function() {
+ return slice.call( this, 0 );
+ },
+
+ // Get the Nth element in the matched element set OR
+ // Get the whole matched element set as a clean array
+ get: function( num ) {
+ return num == null ?
+
+ // Return a 'clean' array
+ this.toArray() :
+
+ // Return just the object
+ ( num < 0 ? this[ this.length + num ] : this[ num ] );
+ },
+
+ // Take an array of elements and push it onto the stack
+ // (returning the new matched element set)
+ pushStack: function( elems, name, selector ) {
+ // Build a new jQuery matched element set
+ var ret = this.constructor();
+
+ if ( jQuery.isArray( elems ) ) {
+ push.apply( ret, elems );
+
+ } else {
+ jQuery.merge( ret, elems );
+ }
+
+ // Add the old object onto the stack (as a reference)
+ ret.prevObject = this;
+
+ ret.context = this.context;
+
+ if ( name === "find" ) {
+ ret.selector = this.selector + ( this.selector ? " " : "" ) + selector;
+ } else if ( name ) {
+ ret.selector = this.selector + "." + name + "(" + selector + ")";
+ }
+
+ // Return the newly-formed element set
+ return ret;
+ },
+
+ // Execute a callback for every element in the matched set.
+ // (You can seed the arguments with an array of args, but this is
+ // only used internally.)
+ each: function( callback, args ) {
+ return jQuery.each( this, callback, args );
+ },
+
+ ready: function( fn ) {
+ // Attach the listeners
+ jQuery.bindReady();
+
+ // Add the callback
+ readyList.add( fn );
+
+ return this;
+ },
+
+ eq: function( i ) {
+ i = +i;
+ return i === -1 ?
+ this.slice( i ) :
+ this.slice( i, i + 1 );
+ },
+
+ first: function() {
+ return this.eq( 0 );
+ },
+
+ last: function() {
+ return this.eq( -1 );
+ },
+
+ slice: function() {
+ return this.pushStack( slice.apply( this, arguments ),
+ "slice", slice.call(arguments).join(",") );
+ },
+
+ map: function( callback ) {
+ return this.pushStack( jQuery.map(this, function( elem, i ) {
+ return callback.call( elem, i, elem );
+ }));
+ },
+
+ end: function() {
+ return this.prevObject || this.constructor(null);
+ },
+
+ // For internal use only.
+ // Behaves like an Array's method, not like a jQuery method.
+ push: push,
+ sort: [].sort,
+ splice: [].splice
+};
+
+// Give the init function the jQuery prototype for later instantiation
+jQuery.fn.init.prototype = jQuery.fn;
+
+jQuery.extend = jQuery.fn.extend = function() {
+ var options, name, src, copy, copyIsArray, clone,
+ target = arguments[0] || {},
+ i = 1,
+ length = arguments.length,
+ deep = false;
+
+ // Handle a deep copy situation
+ if ( typeof target === "boolean" ) {
+ deep = target;
+ target = arguments[1] || {};
+ // skip the boolean and the target
+ i = 2;
+ }
+
+ // Handle case when target is a string or something (possible in deep copy)
+ if ( typeof target !== "object" && !jQuery.isFunction(target) ) {
+ target = {};
+ }
+
+ // extend jQuery itself if only one argument is passed
+ if ( length === i ) {
+ target = this;
+ --i;
+ }
+
+ for ( ; i < length; i++ ) {
+ // Only deal with non-null/undefined values
+ if ( (options = arguments[ i ]) != null ) {
+ // Extend the base object
+ for ( name in options ) {
+ src = target[ name ];
+ copy = options[ name ];
+
+ // Prevent never-ending loop
+ if ( target === copy ) {
+ continue;
+ }
+
+ // Recurse if we're merging plain objects or arrays
+ if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) {
+ if ( copyIsArray ) {
+ copyIsArray = false;
+ clone = src && jQuery.isArray(src) ? src : [];
+
+ } else {
+ clone = src && jQuery.isPlainObject(src) ? src : {};
+ }
+
+ // Never move original objects, clone them
+ target[ name ] = jQuery.extend( deep, clone, copy );
+
+ // Don't bring in undefined values
+ } else if ( copy !== undefined ) {
+ target[ name ] = copy;
+ }
+ }
+ }
+ }
+
+ // Return the modified object
+ return target;
+};
+
+jQuery.extend({
+ noConflict: function( deep ) {
+ if ( window.$ === jQuery ) {
+ window.$ = _$;
+ }
+
+ if ( deep && window.jQuery === jQuery ) {
+ window.jQuery = _jQuery;
+ }
+
+ return jQuery;
+ },
+
+ // Is the DOM ready to be used? Set to true once it occurs.
+ isReady: false,
+
+ // A counter to track how many items to wait for before
+ // the ready event fires. See #6781
+ readyWait: 1,
+
+ // Hold (or release) the ready event
+ holdReady: function( hold ) {
+ if ( hold ) {
+ jQuery.readyWait++;
+ } else {
+ jQuery.ready( true );
+ }
+ },
+
+ // Handle when the DOM is ready
+ ready: function( wait ) {
+ // Either a released hold or an DOMready/load event and not yet ready
+ if ( (wait === true && !--jQuery.readyWait) || (wait !== true && !jQuery.isReady) ) {
+ // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
+ if ( !document.body ) {
+ return setTimeout( jQuery.ready, 1 );
+ }
+
+ // Remember that the DOM is ready
+ jQuery.isReady = true;
+
+ // If a normal DOM Ready event fired, decrement, and wait if need be
+ if ( wait !== true && --jQuery.readyWait > 0 ) {
+ return;
+ }
+
+ // If there are functions bound, to execute
+ readyList.fireWith( document, [ jQuery ] );
+
+ // Trigger any bound ready events
+ if ( jQuery.fn.trigger ) {
+ jQuery( document ).trigger( "ready" ).off( "ready" );
+ }
+ }
+ },
+
+ bindReady: function() {
+ if ( readyList ) {
+ return;
+ }
+
+ readyList = jQuery.Callbacks( "once memory" );
+
+ // Catch cases where $(document).ready() is called after the
+ // browser event has already occurred.
+ if ( document.readyState === "complete" ) {
+ // Handle it asynchronously to allow scripts the opportunity to delay ready
+ return setTimeout( jQuery.ready, 1 );
+ }
+
+ // Mozilla, Opera and webkit nightlies currently support this event
+ if ( document.addEventListener ) {
+ // Use the handy event callback
+ document.addEventListener( "DOMContentLoaded", DOMContentLoaded, false );
+
+ // A fallback to window.onload, that will always work
+ window.addEventListener( "load", jQuery.ready, false );
+
+ // If IE event model is used
+ } else if ( document.attachEvent ) {
+ // ensure firing before onload,
+ // maybe late but safe also for iframes
+ document.attachEvent( "onreadystatechange", DOMContentLoaded );
+
+ // A fallback to window.onload, that will always work
+ window.attachEvent( "onload", jQuery.ready );
+
+ // If IE and not a frame
+ // continually check to see if the document is ready
+ var toplevel = false;
+
+ try {
+ toplevel = window.frameElement == null;
+ } catch(e) {}
+
+ if ( document.documentElement.doScroll && toplevel ) {
+ doScrollCheck();
+ }
+ }
+ },
+
+ // See test/unit/core.js for details concerning isFunction.
+ // Since version 1.3, DOM methods and functions like alert
+ // aren't supported. They return false on IE (#2968).
+ isFunction: function( obj ) {
+ return jQuery.type(obj) === "function";
+ },
+
+ isArray: Array.isArray || function( obj ) {
+ return jQuery.type(obj) === "array";
+ },
+
+ isWindow: function( obj ) {
+ return obj != null && obj == obj.window;
+ },
+
+ isNumeric: function( obj ) {
+ return !isNaN( parseFloat(obj) ) && isFinite( obj );
+ },
+
+ type: function( obj ) {
+ return obj == null ?
+ String( obj ) :
+ class2type[ toString.call(obj) ] || "object";
+ },
+
+ isPlainObject: function( obj ) {
+ // Must be an Object.
+ // Because of IE, we also have to check the presence of the constructor property.
+ // Make sure that DOM nodes and window objects don't pass through, as well
+ if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) {
+ return false;
+ }
+
+ try {
+ // Not own constructor property must be Object
+ if ( obj.constructor &&
+ !hasOwn.call(obj, "constructor") &&
+ !hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) {
+ return false;
+ }
+ } catch ( e ) {
+ // IE8,9 Will throw exceptions on certain host objects #9897
+ return false;
+ }
+
+ // Own properties are enumerated firstly, so to speed up,
+ // if last one is own, then all properties are own.
+
+ var key;
+ for ( key in obj ) {}
+
+ return key === undefined || hasOwn.call( obj, key );
+ },
+
+ isEmptyObject: function( obj ) {
+ for ( var name in obj ) {
+ return false;
+ }
+ return true;
+ },
+
+ error: function( msg ) {
+ throw new Error( msg );
+ },
+
+ parseJSON: function( data ) {
+ if ( typeof data !== "string" || !data ) {
+ return null;
+ }
+
+ // Make sure leading/trailing whitespace is removed (IE can't handle it)
+ data = jQuery.trim( data );
+
+ // Attempt to parse using the native JSON parser first
+ if ( window.JSON && window.JSON.parse ) {
+ return window.JSON.parse( data );
+ }
+
+ // Make sure the incoming data is actual JSON
+ // Logic borrowed from http://json.org/json2.js
+ if ( rvalidchars.test( data.replace( rvalidescape, "@" )
+ .replace( rvalidtokens, "]" )
+ .replace( rvalidbraces, "")) ) {
+
+ return ( new Function( "return " + data ) )();
+
+ }
+ jQuery.error( "Invalid JSON: " + data );
+ },
+
+ // Cross-browser xml parsing
+ parseXML: function( data ) {
+ if ( typeof data !== "string" || !data ) {
+ return null;
+ }
+ var xml, tmp;
+ try {
+ if ( window.DOMParser ) { // Standard
+ tmp = new DOMParser();
+ xml = tmp.parseFromString( data , "text/xml" );
+ } else { // IE
+ xml = new ActiveXObject( "Microsoft.XMLDOM" );
+ xml.async = "false";
+ xml.loadXML( data );
+ }
+ } catch( e ) {
+ xml = undefined;
+ }
+ if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) {
+ jQuery.error( "Invalid XML: " + data );
+ }
+ return xml;
+ },
+
+ noop: function() {},
+
+ // Evaluates a script in a global context
+ // Workarounds based on findings by Jim Driscoll
+ // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context
+ globalEval: function( data ) {
+ if ( data && rnotwhite.test( data ) ) {
+ // We use execScript on Internet Explorer
+ // We use an anonymous function so that context is window
+ // rather than jQuery in Firefox
+ ( window.execScript || function( data ) {
+ window[ "eval" ].call( window, data );
+ } )( data );
+ }
+ },
+
+ // Convert dashed to camelCase; used by the css and data modules
+ // Microsoft forgot to hump their vendor prefix (#9572)
+ camelCase: function( string ) {
+ return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
+ },
+
+ nodeName: function( elem, name ) {
+ return elem.nodeName && elem.nodeName.toUpperCase() === name.toUpperCase();
+ },
+
+ // args is for internal usage only
+ each: function( object, callback, args ) {
+ var name, i = 0,
+ length = object.length,
+ isObj = length === undefined || jQuery.isFunction( object );
+
+ if ( args ) {
+ if ( isObj ) {
+ for ( name in object ) {
+ if ( callback.apply( object[ name ], args ) === false ) {
+ break;
+ }
+ }
+ } else {
+ for ( ; i < length; ) {
+ if ( callback.apply( object[ i++ ], args ) === false ) {
+ break;
+ }
+ }
+ }
+
+ // A special, fast, case for the most common use of each
+ } else {
+ if ( isObj ) {
+ for ( name in object ) {
+ if ( callback.call( object[ name ], name, object[ name ] ) === false ) {
+ break;
+ }
+ }
+ } else {
+ for ( ; i < length; ) {
+ if ( callback.call( object[ i ], i, object[ i++ ] ) === false ) {
+ break;
+ }
+ }
+ }
+ }
+
+ return object;
+ },
+
+ // Use native String.trim function wherever possible
+ trim: trim ?
+ function( text ) {
+ return text == null ?
+ "" :
+ trim.call( text );
+ } :
+
+ // Otherwise use our own trimming functionality
+ function( text ) {
+ return text == null ?
+ "" :
+ text.toString().replace( trimLeft, "" ).replace( trimRight, "" );
+ },
+
+ // results is for internal usage only
+ makeArray: function( array, results ) {
+ var ret = results || [];
+
+ if ( array != null ) {
+ // The window, strings (and functions) also have 'length'
+ // Tweaked logic slightly to handle Blackberry 4.7 RegExp issues #6930
+ var type = jQuery.type( array );
+
+ if ( array.length == null || type === "string" || type === "function" || type === "regexp" || jQuery.isWindow( array ) ) {
+ push.call( ret, array );
+ } else {
+ jQuery.merge( ret, array );
+ }
+ }
+
+ return ret;
+ },
+
+ inArray: function( elem, array, i ) {
+ var len;
+
+ if ( array ) {
+ if ( indexOf ) {
+ return indexOf.call( array, elem, i );
+ }
+
+ len = array.length;
+ i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0;
+
+ for ( ; i < len; i++ ) {
+ // Skip accessing in sparse arrays
+ if ( i in array && array[ i ] === elem ) {
+ return i;
+ }
+ }
+ }
+
+ return -1;
+ },
+
+ merge: function( first, second ) {
+ var i = first.length,
+ j = 0;
+
+ if ( typeof second.length === "number" ) {
+ for ( var l = second.length; j < l; j++ ) {
+ first[ i++ ] = second[ j ];
+ }
+
+ } else {
+ while ( second[j] !== undefined ) {
+ first[ i++ ] = second[ j++ ];
+ }
+ }
+
+ first.length = i;
+
+ return first;
+ },
+
+ grep: function( elems, callback, inv ) {
+ var ret = [], retVal;
+ inv = !!inv;
+
+ // Go through the array, only saving the items
+ // that pass the validator function
+ for ( var i = 0, length = elems.length; i < length; i++ ) {
+ retVal = !!callback( elems[ i ], i );
+ if ( inv !== retVal ) {
+ ret.push( elems[ i ] );
+ }
+ }
+
+ return ret;
+ },
+
+ // arg is for internal usage only
+ map: function( elems, callback, arg ) {
+ var value, key, ret = [],
+ i = 0,
+ length = elems.length,
+ // jquery objects are treated as arrays
+ isArray = elems instanceof jQuery || length !== undefined && typeof length === "number" && ( ( length > 0 && elems[ 0 ] && elems[ length -1 ] ) || length === 0 || jQuery.isArray( elems ) ) ;
+
+ // Go through the array, translating each of the items to their
+ if ( isArray ) {
+ for ( ; i < length; i++ ) {
+ value = callback( elems[ i ], i, arg );
+
+ if ( value != null ) {
+ ret[ ret.length ] = value;
+ }
+ }
+
+ // Go through every key on the object,
+ } else {
+ for ( key in elems ) {
+ value = callback( elems[ key ], key, arg );
+
+ if ( value != null ) {
+ ret[ ret.length ] = value;
+ }
+ }
+ }
+
+ // Flatten any nested arrays
+ return ret.concat.apply( [], ret );
+ },
+
+ // A global GUID counter for objects
+ guid: 1,
+
+ // Bind a function to a context, optionally partially applying any
+ // arguments.
+ proxy: function( fn, context ) {
+ if ( typeof context === "string" ) {
+ var tmp = fn[ context ];
+ context = fn;
+ fn = tmp;
+ }
+
+ // Quick check to determine if target is callable, in the spec
+ // this throws a TypeError, but we will just return undefined.
+ if ( !jQuery.isFunction( fn ) ) {
+ return undefined;
+ }
+
+ // Simulated bind
+ var args = slice.call( arguments, 2 ),
+ proxy = function() {
+ return fn.apply( context, args.concat( slice.call( arguments ) ) );
+ };
+
+ // Set the guid of unique handler to the same of original handler, so it can be removed
+ proxy.guid = fn.guid = fn.guid || proxy.guid || jQuery.guid++;
+
+ return proxy;
+ },
+
+ // Mutifunctional method to get and set values to a collection
+ // The value/s can optionally be executed if it's a function
+ access: function( elems, fn, key, value, chainable, emptyGet, pass ) {
+ var exec,
+ bulk = key == null,
+ i = 0,
+ length = elems.length;
+
+ // Sets many values
+ if ( key && typeof key === "object" ) {
+ for ( i in key ) {
+ jQuery.access( elems, fn, i, key[i], 1, emptyGet, value );
+ }
+ chainable = 1;
+
+ // Sets one value
+ } else if ( value !== undefined ) {
+ // Optionally, function values get executed if exec is true
+ exec = pass === undefined && jQuery.isFunction( value );
+
+ if ( bulk ) {
+ // Bulk operations only iterate when executing function values
+ if ( exec ) {
+ exec = fn;
+ fn = function( elem, key, value ) {
+ return exec.call( jQuery( elem ), value );
+ };
+
+ // Otherwise they run against the entire set
+ } else {
+ fn.call( elems, value );
+ fn = null;
+ }
+ }
+
+ if ( fn ) {
+ for (; i < length; i++ ) {
+ fn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key ) ) : value, pass );
+ }
+ }
+
+ chainable = 1;
+ }
+
+ return chainable ?
+ elems :
+
+ // Gets
+ bulk ?
+ fn.call( elems ) :
+ length ? fn( elems[0], key ) : emptyGet;
+ },
+
+ now: function() {
+ return ( new Date() ).getTime();
+ },
+
+ // Use of jQuery.browser is frowned upon.
+ // More details: http://docs.jquery.com/Utilities/jQuery.browser
+ uaMatch: function( ua ) {
+ ua = ua.toLowerCase();
+
+ var match = rwebkit.exec( ua ) ||
+ ropera.exec( ua ) ||
+ rmsie.exec( ua ) ||
+ ua.indexOf("compatible") < 0 && rmozilla.exec( ua ) ||
+ [];
+
+ return { browser: match[1] || "", version: match[2] || "0" };
+ },
+
+ sub: function() {
+ function jQuerySub( selector, context ) {
+ return new jQuerySub.fn.init( selector, context );
+ }
+ jQuery.extend( true, jQuerySub, this );
+ jQuerySub.superclass = this;
+ jQuerySub.fn = jQuerySub.prototype = this();
+ jQuerySub.fn.constructor = jQuerySub;
+ jQuerySub.sub = this.sub;
+ jQuerySub.fn.init = function init( selector, context ) {
+ if ( context && context instanceof jQuery && !(context instanceof jQuerySub) ) {
+ context = jQuerySub( context );
+ }
+
+ return jQuery.fn.init.call( this, selector, context, rootjQuerySub );
+ };
+ jQuerySub.fn.init.prototype = jQuerySub.fn;
+ var rootjQuerySub = jQuerySub(document);
+ return jQuerySub;
+ },
+
+ browser: {}
+});
+
+// Populate the class2type map
+jQuery.each("Boolean Number String Function Array Date RegExp Object".split(" "), function(i, name) {
+ class2type[ "[object " + name + "]" ] = name.toLowerCase();
+});
+
+browserMatch = jQuery.uaMatch( userAgent );
+if ( browserMatch.browser ) {
+ jQuery.browser[ browserMatch.browser ] = true;
+ jQuery.browser.version = browserMatch.version;
+}
+
+// Deprecated, use jQuery.browser.webkit instead
+if ( jQuery.browser.webkit ) {
+ jQuery.browser.safari = true;
+}
+
+// IE doesn't match non-breaking spaces with \s
+if ( rnotwhite.test( "\xA0" ) ) {
+ trimLeft = /^[\s\xA0]+/;
+ trimRight = /[\s\xA0]+$/;
+}
+
+// All jQuery objects should point back to these
+rootjQuery = jQuery(document);
+
+// Cleanup functions for the document ready method
+if ( document.addEventListener ) {
+ DOMContentLoaded = function() {
+ document.removeEventListener( "DOMContentLoaded", DOMContentLoaded, false );
+ jQuery.ready();
+ };
+
+} else if ( document.attachEvent ) {
+ DOMContentLoaded = function() {
+ // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
+ if ( document.readyState === "complete" ) {
+ document.detachEvent( "onreadystatechange", DOMContentLoaded );
+ jQuery.ready();
+ }
+ };
+}
+
+// The DOM ready check for Internet Explorer
+function doScrollCheck() {
+ if ( jQuery.isReady ) {
+ return;
+ }
+
+ try {
+ // If IE is used, use the trick by Diego Perini
+ // http://javascript.nwbox.com/IEContentLoaded/
+ document.documentElement.doScroll("left");
+ } catch(e) {
+ setTimeout( doScrollCheck, 1 );
+ return;
+ }
+
+ // and execute any waiting functions
+ jQuery.ready();
+}
+
+return jQuery;
+
+})();
+
+
+// String to Object flags format cache
+var flagsCache = {};
+
+// Convert String-formatted flags into Object-formatted ones and store in cache
+function createFlags( flags ) {
+ var object = flagsCache[ flags ] = {},
+ i, length;
+ flags = flags.split( /\s+/ );
+ for ( i = 0, length = flags.length; i < length; i++ ) {
+ object[ flags[i] ] = true;
+ }
+ return object;
+}
+
+/*
+ * Create a callback list using the following parameters:
+ *
+ * flags: an optional list of space-separated flags that will change how
+ * the callback list behaves
+ *
+ * By default a callback list will act like an event callback list and can be
+ * "fired" multiple times.
+ *
+ * Possible flags:
+ *
+ * once: will ensure the callback list can only be fired once (like a Deferred)
+ *
+ * memory: will keep track of previous values and will call any callback added
+ * after the list has been fired right away with the latest "memorized"
+ * values (like a Deferred)
+ *
+ * unique: will ensure a callback can only be added once (no duplicate in the list)
+ *
+ * stopOnFalse: interrupt callings when a callback returns false
+ *
+ */
+jQuery.Callbacks = function( flags ) {
+
+ // Convert flags from String-formatted to Object-formatted
+ // (we check in cache first)
+ flags = flags ? ( flagsCache[ flags ] || createFlags( flags ) ) : {};
+
+ var // Actual callback list
+ list = [],
+ // Stack of fire calls for repeatable lists
+ stack = [],
+ // Last fire value (for non-forgettable lists)
+ memory,
+ // Flag to know if list was already fired
+ fired,
+ // Flag to know if list is currently firing
+ firing,
+ // First callback to fire (used internally by add and fireWith)
+ firingStart,
+ // End of the loop when firing
+ firingLength,
+ // Index of currently firing callback (modified by remove if needed)
+ firingIndex,
+ // Add one or several callbacks to the list
+ add = function( args ) {
+ var i,
+ length,
+ elem,
+ type,
+ actual;
+ for ( i = 0, length = args.length; i < length; i++ ) {
+ elem = args[ i ];
+ type = jQuery.type( elem );
+ if ( type === "array" ) {
+ // Inspect recursively
+ add( elem );
+ } else if ( type === "function" ) {
+ // Add if not in unique mode and callback is not in
+ if ( !flags.unique || !self.has( elem ) ) {
+ list.push( elem );
+ }
+ }
+ }
+ },
+ // Fire callbacks
+ fire = function( context, args ) {
+ args = args || [];
+ memory = !flags.memory || [ context, args ];
+ fired = true;
+ firing = true;
+ firingIndex = firingStart || 0;
+ firingStart = 0;
+ firingLength = list.length;
+ for ( ; list && firingIndex < firingLength; firingIndex++ ) {
+ if ( list[ firingIndex ].apply( context, args ) === false && flags.stopOnFalse ) {
+ memory = true; // Mark as halted
+ break;
+ }
+ }
+ firing = false;
+ if ( list ) {
+ if ( !flags.once ) {
+ if ( stack && stack.length ) {
+ memory = stack.shift();
+ self.fireWith( memory[ 0 ], memory[ 1 ] );
+ }
+ } else if ( memory === true ) {
+ self.disable();
+ } else {
+ list = [];
+ }
+ }
+ },
+ // Actual Callbacks object
+ self = {
+ // Add a callback or a collection of callbacks to the list
+ add: function() {
+ if ( list ) {
+ var length = list.length;
+ add( arguments );
+ // Do we need to add the callbacks to the
+ // current firing batch?
+ if ( firing ) {
+ firingLength = list.length;
+ // With memory, if we're not firing then
+ // we should call right away, unless previous
+ // firing was halted (stopOnFalse)
+ } else if ( memory && memory !== true ) {
+ firingStart = length;
+ fire( memory[ 0 ], memory[ 1 ] );
+ }
+ }
+ return this;
+ },
+ // Remove a callback from the list
+ remove: function() {
+ if ( list ) {
+ var args = arguments,
+ argIndex = 0,
+ argLength = args.length;
+ for ( ; argIndex < argLength ; argIndex++ ) {
+ for ( var i = 0; i < list.length; i++ ) {
+ if ( args[ argIndex ] === list[ i ] ) {
+ // Handle firingIndex and firingLength
+ if ( firing ) {
+ if ( i <= firingLength ) {
+ firingLength--;
+ if ( i <= firingIndex ) {
+ firingIndex--;
+ }
+ }
+ }
+ // Remove the element
+ list.splice( i--, 1 );
+ // If we have some unicity property then
+ // we only need to do this once
+ if ( flags.unique ) {
+ break;
+ }
+ }
+ }
+ }
+ }
+ return this;
+ },
+ // Control if a given callback is in the list
+ has: function( fn ) {
+ if ( list ) {
+ var i = 0,
+ length = list.length;
+ for ( ; i < length; i++ ) {
+ if ( fn === list[ i ] ) {
+ return true;
+ }
+ }
+ }
+ return false;
+ },
+ // Remove all callbacks from the list
+ empty: function() {
+ list = [];
+ return this;
+ },
+ // Have the list do nothing anymore
+ disable: function() {
+ list = stack = memory = undefined;
+ return this;
+ },
+ // Is it disabled?
+ disabled: function() {
+ return !list;
+ },
+ // Lock the list in its current state
+ lock: function() {
+ stack = undefined;
+ if ( !memory || memory === true ) {
+ self.disable();
+ }
+ return this;
+ },
+ // Is it locked?
+ locked: function() {
+ return !stack;
+ },
+ // Call all callbacks with the given context and arguments
+ fireWith: function( context, args ) {
+ if ( stack ) {
+ if ( firing ) {
+ if ( !flags.once ) {
+ stack.push( [ context, args ] );
+ }
+ } else if ( !( flags.once && memory ) ) {
+ fire( context, args );
+ }
+ }
+ return this;
+ },
+ // Call all the callbacks with the given arguments
+ fire: function() {
+ self.fireWith( this, arguments );
+ return this;
+ },
+ // To know if the callbacks have already been called at least once
+ fired: function() {
+ return !!fired;
+ }
+ };
+
+ return self;
+};
+
+
+
+
+var // Static reference to slice
+ sliceDeferred = [].slice;
+
+jQuery.extend({
+
+ Deferred: function( func ) {
+ var doneList = jQuery.Callbacks( "once memory" ),
+ failList = jQuery.Callbacks( "once memory" ),
+ progressList = jQuery.Callbacks( "memory" ),
+ state = "pending",
+ lists = {
+ resolve: doneList,
+ reject: failList,
+ notify: progressList
+ },
+ promise = {
+ done: doneList.add,
+ fail: failList.add,
+ progress: progressList.add,
+
+ state: function() {
+ return state;
+ },
+
+ // Deprecated
+ isResolved: doneList.fired,
+ isRejected: failList.fired,
+
+ then: function( doneCallbacks, failCallbacks, progressCallbacks ) {
+ deferred.done( doneCallbacks ).fail( failCallbacks ).progress( progressCallbacks );
+ return this;
+ },
+ always: function() {
+ deferred.done.apply( deferred, arguments ).fail.apply( deferred, arguments );
+ return this;
+ },
+ pipe: function( fnDone, fnFail, fnProgress ) {
+ return jQuery.Deferred(function( newDefer ) {
+ jQuery.each( {
+ done: [ fnDone, "resolve" ],
+ fail: [ fnFail, "reject" ],
+ progress: [ fnProgress, "notify" ]
+ }, function( handler, data ) {
+ var fn = data[ 0 ],
+ action = data[ 1 ],
+ returned;
+ if ( jQuery.isFunction( fn ) ) {
+ deferred[ handler ](function() {
+ returned = fn.apply( this, arguments );
+ if ( returned && jQuery.isFunction( returned.promise ) ) {
+ returned.promise().then( newDefer.resolve, newDefer.reject, newDefer.notify );
+ } else {
+ newDefer[ action + "With" ]( this === deferred ? newDefer : this, [ returned ] );
+ }
+ });
+ } else {
+ deferred[ handler ]( newDefer[ action ] );
+ }
+ });
+ }).promise();
+ },
+ // Get a promise for this deferred
+ // If obj is provided, the promise aspect is added to the object
+ promise: function( obj ) {
+ if ( obj == null ) {
+ obj = promise;
+ } else {
+ for ( var key in promise ) {
+ obj[ key ] = promise[ key ];
+ }
+ }
+ return obj;
+ }
+ },
+ deferred = promise.promise({}),
+ key;
+
+ for ( key in lists ) {
+ deferred[ key ] = lists[ key ].fire;
+ deferred[ key + "With" ] = lists[ key ].fireWith;
+ }
+
+ // Handle state
+ deferred.done( function() {
+ state = "resolved";
+ }, failList.disable, progressList.lock ).fail( function() {
+ state = "rejected";
+ }, doneList.disable, progressList.lock );
+
+ // Call given func if any
+ if ( func ) {
+ func.call( deferred, deferred );
+ }
+
+ // All done!
+ return deferred;
+ },
+
+ // Deferred helper
+ when: function( firstParam ) {
+ var args = sliceDeferred.call( arguments, 0 ),
+ i = 0,
+ length = args.length,
+ pValues = new Array( length ),
+ count = length,
+ pCount = length,
+ deferred = length <= 1 && firstParam && jQuery.isFunction( firstParam.promise ) ?
+ firstParam :
+ jQuery.Deferred(),
+ promise = deferred.promise();
+ function resolveFunc( i ) {
+ return function( value ) {
+ args[ i ] = arguments.length > 1 ? sliceDeferred.call( arguments, 0 ) : value;
+ if ( !( --count ) ) {
+ deferred.resolveWith( deferred, args );
+ }
+ };
+ }
+ function progressFunc( i ) {
+ return function( value ) {
+ pValues[ i ] = arguments.length > 1 ? sliceDeferred.call( arguments, 0 ) : value;
+ deferred.notifyWith( promise, pValues );
+ };
+ }
+ if ( length > 1 ) {
+ for ( ; i < length; i++ ) {
+ if ( args[ i ] && args[ i ].promise && jQuery.isFunction( args[ i ].promise ) ) {
+ args[ i ].promise().then( resolveFunc(i), deferred.reject, progressFunc(i) );
+ } else {
+ --count;
+ }
+ }
+ if ( !count ) {
+ deferred.resolveWith( deferred, args );
+ }
+ } else if ( deferred !== firstParam ) {
+ deferred.resolveWith( deferred, length ? [ firstParam ] : [] );
+ }
+ return promise;
+ }
+});
+
+
+
+
+jQuery.support = (function() {
+
+ var support,
+ all,
+ a,
+ select,
+ opt,
+ input,
+ fragment,
+ tds,
+ events,
+ eventName,
+ i,
+ isSupported,
+ div = document.createElement( "div" ),
+ documentElement = document.documentElement;
+
+ // Preliminary tests
+ div.setAttribute("className", "t");
+ div.innerHTML = " a";
+
+ all = div.getElementsByTagName( "*" );
+ a = div.getElementsByTagName( "a" )[ 0 ];
+
+ // Can't get basic test support
+ if ( !all || !all.length || !a ) {
+ return {};
+ }
+
+ // First batch of supports tests
+ select = document.createElement( "select" );
+ opt = select.appendChild( document.createElement("option") );
+ input = div.getElementsByTagName( "input" )[ 0 ];
+
+ support = {
+ // IE strips leading whitespace when .innerHTML is used
+ leadingWhitespace: ( div.firstChild.nodeType === 3 ),
+
+ // Make sure that tbody elements aren't automatically inserted
+ // IE will insert them into empty tables
+ tbody: !div.getElementsByTagName("tbody").length,
+
+ // Make sure that link elements get serialized correctly by innerHTML
+ // This requires a wrapper element in IE
+ htmlSerialize: !!div.getElementsByTagName("link").length,
+
+ // Get the style information from getAttribute
+ // (IE uses .cssText instead)
+ style: /top/.test( a.getAttribute("style") ),
+
+ // Make sure that URLs aren't manipulated
+ // (IE normalizes it by default)
+ hrefNormalized: ( a.getAttribute("href") === "/a" ),
+
+ // Make sure that element opacity exists
+ // (IE uses filter instead)
+ // Use a regex to work around a WebKit issue. See #5145
+ opacity: /^0.55/.test( a.style.opacity ),
+
+ // Verify style float existence
+ // (IE uses styleFloat instead of cssFloat)
+ cssFloat: !!a.style.cssFloat,
+
+ // Make sure that if no value is specified for a checkbox
+ // that it defaults to "on".
+ // (WebKit defaults to "" instead)
+ checkOn: ( input.value === "on" ),
+
+ // Make sure that a selected-by-default option has a working selected property.
+ // (WebKit defaults to false instead of true, IE too, if it's in an optgroup)
+ optSelected: opt.selected,
+
+ // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7)
+ getSetAttribute: div.className !== "t",
+
+ // Tests for enctype support on a form(#6743)
+ enctype: !!document.createElement("form").enctype,
+
+ // Makes sure cloning an html5 element does not cause problems
+ // Where outerHTML is undefined, this still works
+ html5Clone: document.createElement("nav").cloneNode( true ).outerHTML !== "<:nav>",
+
+ // Will be defined later
+ submitBubbles: true,
+ changeBubbles: true,
+ focusinBubbles: false,
+ deleteExpando: true,
+ noCloneEvent: true,
+ inlineBlockNeedsLayout: false,
+ shrinkWrapBlocks: false,
+ reliableMarginRight: true,
+ pixelMargin: true
+ };
+
+ // jQuery.boxModel DEPRECATED in 1.3, use jQuery.support.boxModel instead
+ jQuery.boxModel = support.boxModel = (document.compatMode === "CSS1Compat");
+
+ // Make sure checked status is properly cloned
+ input.checked = true;
+ support.noCloneChecked = input.cloneNode( true ).checked;
+
+ // Make sure that the options inside disabled selects aren't marked as disabled
+ // (WebKit marks them as disabled)
+ select.disabled = true;
+ support.optDisabled = !opt.disabled;
+
+ // Test to see if it's possible to delete an expando from an element
+ // Fails in Internet Explorer
+ try {
+ delete div.test;
+ } catch( e ) {
+ support.deleteExpando = false;
+ }
+
+ if ( !div.addEventListener && div.attachEvent && div.fireEvent ) {
+ div.attachEvent( "onclick", function() {
+ // Cloning a node shouldn't copy over any
+ // bound event handlers (IE does this)
+ support.noCloneEvent = false;
+ });
+ div.cloneNode( true ).fireEvent( "onclick" );
+ }
+
+ // Check if a radio maintains its value
+ // after being appended to the DOM
+ input = document.createElement("input");
+ input.value = "t";
+ input.setAttribute("type", "radio");
+ support.radioValue = input.value === "t";
+
+ input.setAttribute("checked", "checked");
+
+ // #11217 - WebKit loses check when the name is after the checked attribute
+ input.setAttribute( "name", "t" );
+
+ div.appendChild( input );
+ fragment = document.createDocumentFragment();
+ fragment.appendChild( div.lastChild );
+
+ // WebKit doesn't clone checked state correctly in fragments
+ support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked;
+
+ // Check if a disconnected checkbox will retain its checked
+ // value of true after appended to the DOM (IE6/7)
+ support.appendChecked = input.checked;
+
+ fragment.removeChild( input );
+ fragment.appendChild( div );
+
+ // Technique from Juriy Zaytsev
+ // http://perfectionkills.com/detecting-event-support-without-browser-sniffing/
+ // We only care about the case where non-standard event systems
+ // are used, namely in IE. Short-circuiting here helps us to
+ // avoid an eval call (in setAttribute) which can cause CSP
+ // to go haywire. See: https://developer.mozilla.org/en/Security/CSP
+ if ( div.attachEvent ) {
+ for ( i in {
+ submit: 1,
+ change: 1,
+ focusin: 1
+ }) {
+ eventName = "on" + i;
+ isSupported = ( eventName in div );
+ if ( !isSupported ) {
+ div.setAttribute( eventName, "return;" );
+ isSupported = ( typeof div[ eventName ] === "function" );
+ }
+ support[ i + "Bubbles" ] = isSupported;
+ }
+ }
+
+ fragment.removeChild( div );
+
+ // Null elements to avoid leaks in IE
+ fragment = select = opt = div = input = null;
+
+ // Run tests that need a body at doc ready
+ jQuery(function() {
+ var container, outer, inner, table, td, offsetSupport,
+ marginDiv, conMarginTop, style, html, positionTopLeftWidthHeight,
+ paddingMarginBorderVisibility, paddingMarginBorder,
+ body = document.getElementsByTagName("body")[0];
+
+ if ( !body ) {
+ // Return for frameset docs that don't have a body
+ return;
+ }
+
+ conMarginTop = 1;
+ paddingMarginBorder = "padding:0;margin:0;border:";
+ positionTopLeftWidthHeight = "position:absolute;top:0;left:0;width:1px;height:1px;";
+ paddingMarginBorderVisibility = paddingMarginBorder + "0;visibility:hidden;";
+ style = "style='" + positionTopLeftWidthHeight + paddingMarginBorder + "5px solid #000;";
+ html = "" +
+ "";
+
+ container = document.createElement("div");
+ container.style.cssText = paddingMarginBorderVisibility + "width:0;height:0;position:static;top:0;margin-top:" + conMarginTop + "px";
+ body.insertBefore( container, body.firstChild );
+
+ // Construct the test element
+ div = document.createElement("div");
+ container.appendChild( div );
+
+ // Check if table cells still have offsetWidth/Height when they are set
+ // to display:none and there are still other visible table cells in a
+ // table row; if so, offsetWidth/Height are not reliable for use when
+ // determining if an element has been hidden directly using
+ // display:none (it is still safe to use offsets if a parent element is
+ // hidden; don safety goggles and see bug #4512 for more information).
+ // (only IE 8 fails this test)
+ div.innerHTML = "";
+ tds = div.getElementsByTagName( "td" );
+ isSupported = ( tds[ 0 ].offsetHeight === 0 );
+
+ tds[ 0 ].style.display = "";
+ tds[ 1 ].style.display = "none";
+
+ // Check if empty table cells still have offsetWidth/Height
+ // (IE <= 8 fail this test)
+ support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 );
+
+ // Check if div with explicit width and no margin-right incorrectly
+ // gets computed margin-right based on width of container. For more
+ // info see bug #3333
+ // Fails in WebKit before Feb 2011 nightlies
+ // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
+ if ( window.getComputedStyle ) {
+ div.innerHTML = "";
+ marginDiv = document.createElement( "div" );
+ marginDiv.style.width = "0";
+ marginDiv.style.marginRight = "0";
+ div.style.width = "2px";
+ div.appendChild( marginDiv );
+ support.reliableMarginRight =
+ ( parseInt( ( window.getComputedStyle( marginDiv, null ) || { marginRight: 0 } ).marginRight, 10 ) || 0 ) === 0;
+ }
+
+ if ( typeof div.style.zoom !== "undefined" ) {
+ // Check if natively block-level elements act like inline-block
+ // elements when setting their display to 'inline' and giving
+ // them layout
+ // (IE < 8 does this)
+ div.innerHTML = "";
+ div.style.width = div.style.padding = "1px";
+ div.style.border = 0;
+ div.style.overflow = "hidden";
+ div.style.display = "inline";
+ div.style.zoom = 1;
+ support.inlineBlockNeedsLayout = ( div.offsetWidth === 3 );
+
+ // Check if elements with layout shrink-wrap their children
+ // (IE 6 does this)
+ div.style.display = "block";
+ div.style.overflow = "visible";
+ div.innerHTML = "";
+ support.shrinkWrapBlocks = ( div.offsetWidth !== 3 );
+ }
+
+ div.style.cssText = positionTopLeftWidthHeight + paddingMarginBorderVisibility;
+ div.innerHTML = html;
+
+ outer = div.firstChild;
+ inner = outer.firstChild;
+ td = outer.nextSibling.firstChild.firstChild;
+
+ offsetSupport = {
+ doesNotAddBorder: ( inner.offsetTop !== 5 ),
+ doesAddBorderForTableAndCells: ( td.offsetTop === 5 )
+ };
+
+ inner.style.position = "fixed";
+ inner.style.top = "20px";
+
+ // safari subtracts parent border width here which is 5px
+ offsetSupport.fixedPosition = ( inner.offsetTop === 20 || inner.offsetTop === 15 );
+ inner.style.position = inner.style.top = "";
+
+ outer.style.overflow = "hidden";
+ outer.style.position = "relative";
+
+ offsetSupport.subtractsBorderForOverflowNotVisible = ( inner.offsetTop === -5 );
+ offsetSupport.doesNotIncludeMarginInBodyOffset = ( body.offsetTop !== conMarginTop );
+
+ if ( window.getComputedStyle ) {
+ div.style.marginTop = "1%";
+ support.pixelMargin = ( window.getComputedStyle( div, null ) || { marginTop: 0 } ).marginTop !== "1%";
+ }
+
+ if ( typeof container.style.zoom !== "undefined" ) {
+ container.style.zoom = 1;
+ }
+
+ body.removeChild( container );
+ marginDiv = div = container = null;
+
+ jQuery.extend( support, offsetSupport );
+ });
+
+ return support;
+})();
+
+
+
+
+var rbrace = /^(?:\{.*\}|\[.*\])$/,
+ rmultiDash = /([A-Z])/g;
+
+jQuery.extend({
+ cache: {},
+
+ // Please use with caution
+ uuid: 0,
+
+ // Unique for each copy of jQuery on the page
+ // Non-digits removed to match rinlinejQuery
+ expando: "jQuery" + ( jQuery.fn.jquery + Math.random() ).replace( /\D/g, "" ),
+
+ // The following elements throw uncatchable exceptions if you
+ // attempt to add expando properties to them.
+ noData: {
+ "embed": true,
+ // Ban all objects except for Flash (which handle expandos)
+ "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",
+ "applet": true
+ },
+
+ hasData: function( elem ) {
+ elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ];
+ return !!elem && !isEmptyDataObject( elem );
+ },
+
+ data: function( elem, name, data, pvt /* Internal Use Only */ ) {
+ if ( !jQuery.acceptData( elem ) ) {
+ return;
+ }
+
+ var privateCache, thisCache, ret,
+ internalKey = jQuery.expando,
+ getByName = typeof name === "string",
+
+ // We have to handle DOM nodes and JS objects differently because IE6-7
+ // can't GC object references properly across the DOM-JS boundary
+ isNode = elem.nodeType,
+
+ // Only DOM nodes need the global jQuery cache; JS object data is
+ // attached directly to the object so GC can occur automatically
+ cache = isNode ? jQuery.cache : elem,
+
+ // Only defining an ID for JS objects if its cache already exists allows
+ // the code to shortcut on the same path as a DOM node with no cache
+ id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey,
+ isEvents = name === "events";
+
+ // Avoid doing any more work than we need to when trying to get data on an
+ // object that has no data at all
+ if ( (!id || !cache[id] || (!isEvents && !pvt && !cache[id].data)) && getByName && data === undefined ) {
+ return;
+ }
+
+ if ( !id ) {
+ // Only DOM nodes need a new unique ID for each element since their data
+ // ends up in the global cache
+ if ( isNode ) {
+ elem[ internalKey ] = id = ++jQuery.uuid;
+ } else {
+ id = internalKey;
+ }
+ }
+
+ if ( !cache[ id ] ) {
+ cache[ id ] = {};
+
+ // Avoids exposing jQuery metadata on plain JS objects when the object
+ // is serialized using JSON.stringify
+ if ( !isNode ) {
+ cache[ id ].toJSON = jQuery.noop;
+ }
+ }
+
+ // An object can be passed to jQuery.data instead of a key/value pair; this gets
+ // shallow copied over onto the existing cache
+ if ( typeof name === "object" || typeof name === "function" ) {
+ if ( pvt ) {
+ cache[ id ] = jQuery.extend( cache[ id ], name );
+ } else {
+ cache[ id ].data = jQuery.extend( cache[ id ].data, name );
+ }
+ }
+
+ privateCache = thisCache = cache[ id ];
+
+ // jQuery data() is stored in a separate object inside the object's internal data
+ // cache in order to avoid key collisions between internal data and user-defined
+ // data.
+ if ( !pvt ) {
+ if ( !thisCache.data ) {
+ thisCache.data = {};
+ }
+
+ thisCache = thisCache.data;
+ }
+
+ if ( data !== undefined ) {
+ thisCache[ jQuery.camelCase( name ) ] = data;
+ }
+
+ // Users should not attempt to inspect the internal events object using jQuery.data,
+ // it is undocumented and subject to change. But does anyone listen? No.
+ if ( isEvents && !thisCache[ name ] ) {
+ return privateCache.events;
+ }
+
+ // Check for both converted-to-camel and non-converted data property names
+ // If a data property was specified
+ if ( getByName ) {
+
+ // First Try to find as-is property data
+ ret = thisCache[ name ];
+
+ // Test for null|undefined property data
+ if ( ret == null ) {
+
+ // Try to find the camelCased property
+ ret = thisCache[ jQuery.camelCase( name ) ];
+ }
+ } else {
+ ret = thisCache;
+ }
+
+ return ret;
+ },
+
+ removeData: function( elem, name, pvt /* Internal Use Only */ ) {
+ if ( !jQuery.acceptData( elem ) ) {
+ return;
+ }
+
+ var thisCache, i, l,
+
+ // Reference to internal data cache key
+ internalKey = jQuery.expando,
+
+ isNode = elem.nodeType,
+
+ // See jQuery.data for more information
+ cache = isNode ? jQuery.cache : elem,
+
+ // See jQuery.data for more information
+ id = isNode ? elem[ internalKey ] : internalKey;
+
+ // If there is already no cache entry for this object, there is no
+ // purpose in continuing
+ if ( !cache[ id ] ) {
+ return;
+ }
+
+ if ( name ) {
+
+ thisCache = pvt ? cache[ id ] : cache[ id ].data;
+
+ if ( thisCache ) {
+
+ // Support array or space separated string names for data keys
+ if ( !jQuery.isArray( name ) ) {
+
+ // try the string as a key before any manipulation
+ if ( name in thisCache ) {
+ name = [ name ];
+ } else {
+
+ // split the camel cased version by spaces unless a key with the spaces exists
+ name = jQuery.camelCase( name );
+ if ( name in thisCache ) {
+ name = [ name ];
+ } else {
+ name = name.split( " " );
+ }
+ }
+ }
+
+ for ( i = 0, l = name.length; i < l; i++ ) {
+ delete thisCache[ name[i] ];
+ }
+
+ // If there is no data left in the cache, we want to continue
+ // and let the cache object itself get destroyed
+ if ( !( pvt ? isEmptyDataObject : jQuery.isEmptyObject )( thisCache ) ) {
+ return;
+ }
+ }
+ }
+
+ // See jQuery.data for more information
+ if ( !pvt ) {
+ delete cache[ id ].data;
+
+ // Don't destroy the parent cache unless the internal data object
+ // had been the only thing left in it
+ if ( !isEmptyDataObject(cache[ id ]) ) {
+ return;
+ }
+ }
+
+ // Browsers that fail expando deletion also refuse to delete expandos on
+ // the window, but it will allow it on all other JS objects; other browsers
+ // don't care
+ // Ensure that `cache` is not a window object #10080
+ if ( jQuery.support.deleteExpando || !cache.setInterval ) {
+ delete cache[ id ];
+ } else {
+ cache[ id ] = null;
+ }
+
+ // We destroyed the cache and need to eliminate the expando on the node to avoid
+ // false lookups in the cache for entries that no longer exist
+ if ( isNode ) {
+ // IE does not allow us to delete expando properties from nodes,
+ // nor does it have a removeAttribute function on Document nodes;
+ // we must handle all of these cases
+ if ( jQuery.support.deleteExpando ) {
+ delete elem[ internalKey ];
+ } else if ( elem.removeAttribute ) {
+ elem.removeAttribute( internalKey );
+ } else {
+ elem[ internalKey ] = null;
+ }
+ }
+ },
+
+ // For internal use only.
+ _data: function( elem, name, data ) {
+ return jQuery.data( elem, name, data, true );
+ },
+
+ // A method for determining if a DOM node can handle the data expando
+ acceptData: function( elem ) {
+ if ( elem.nodeName ) {
+ var match = jQuery.noData[ elem.nodeName.toLowerCase() ];
+
+ if ( match ) {
+ return !(match === true || elem.getAttribute("classid") !== match);
+ }
+ }
+
+ return true;
+ }
+});
+
+jQuery.fn.extend({
+ data: function( key, value ) {
+ var parts, part, attr, name, l,
+ elem = this[0],
+ i = 0,
+ data = null;
+
+ // Gets all values
+ if ( key === undefined ) {
+ if ( this.length ) {
+ data = jQuery.data( elem );
+
+ if ( elem.nodeType === 1 && !jQuery._data( elem, "parsedAttrs" ) ) {
+ attr = elem.attributes;
+ for ( l = attr.length; i < l; i++ ) {
+ name = attr[i].name;
+
+ if ( name.indexOf( "data-" ) === 0 ) {
+ name = jQuery.camelCase( name.substring(5) );
+
+ dataAttr( elem, name, data[ name ] );
+ }
+ }
+ jQuery._data( elem, "parsedAttrs", true );
+ }
+ }
+
+ return data;
+ }
+
+ // Sets multiple values
+ if ( typeof key === "object" ) {
+ return this.each(function() {
+ jQuery.data( this, key );
+ });
+ }
+
+ parts = key.split( ".", 2 );
+ parts[1] = parts[1] ? "." + parts[1] : "";
+ part = parts[1] + "!";
+
+ return jQuery.access( this, function( value ) {
+
+ if ( value === undefined ) {
+ data = this.triggerHandler( "getData" + part, [ parts[0] ] );
+
+ // Try to fetch any internally stored data first
+ if ( data === undefined && elem ) {
+ data = jQuery.data( elem, key );
+ data = dataAttr( elem, key, data );
+ }
+
+ return data === undefined && parts[1] ?
+ this.data( parts[0] ) :
+ data;
+ }
+
+ parts[1] = value;
+ this.each(function() {
+ var self = jQuery( this );
+
+ self.triggerHandler( "setData" + part, parts );
+ jQuery.data( this, key, value );
+ self.triggerHandler( "changeData" + part, parts );
+ });
+ }, null, value, arguments.length > 1, null, false );
+ },
+
+ removeData: function( key ) {
+ return this.each(function() {
+ jQuery.removeData( this, key );
+ });
+ }
+});
+
+function dataAttr( elem, key, data ) {
+ // If nothing was found internally, try to fetch any
+ // data from the HTML5 data-* attribute
+ if ( data === undefined && elem.nodeType === 1 ) {
+
+ var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase();
+
+ data = elem.getAttribute( name );
+
+ if ( typeof data === "string" ) {
+ try {
+ data = data === "true" ? true :
+ data === "false" ? false :
+ data === "null" ? null :
+ jQuery.isNumeric( data ) ? +data :
+ rbrace.test( data ) ? jQuery.parseJSON( data ) :
+ data;
+ } catch( e ) {}
+
+ // Make sure we set the data so it isn't changed later
+ jQuery.data( elem, key, data );
+
+ } else {
+ data = undefined;
+ }
+ }
+
+ return data;
+}
+
+// checks a cache object for emptiness
+function isEmptyDataObject( obj ) {
+ for ( var name in obj ) {
+
+ // if the public data object is empty, the private is still empty
+ if ( name === "data" && jQuery.isEmptyObject( obj[name] ) ) {
+ continue;
+ }
+ if ( name !== "toJSON" ) {
+ return false;
+ }
+ }
+
+ return true;
+}
+
+
+
+
+function handleQueueMarkDefer( elem, type, src ) {
+ var deferDataKey = type + "defer",
+ queueDataKey = type + "queue",
+ markDataKey = type + "mark",
+ defer = jQuery._data( elem, deferDataKey );
+ if ( defer &&
+ ( src === "queue" || !jQuery._data(elem, queueDataKey) ) &&
+ ( src === "mark" || !jQuery._data(elem, markDataKey) ) ) {
+ // Give room for hard-coded callbacks to fire first
+ // and eventually mark/queue something else on the element
+ setTimeout( function() {
+ if ( !jQuery._data( elem, queueDataKey ) &&
+ !jQuery._data( elem, markDataKey ) ) {
+ jQuery.removeData( elem, deferDataKey, true );
+ defer.fire();
+ }
+ }, 0 );
+ }
+}
+
+jQuery.extend({
+
+ _mark: function( elem, type ) {
+ if ( elem ) {
+ type = ( type || "fx" ) + "mark";
+ jQuery._data( elem, type, (jQuery._data( elem, type ) || 0) + 1 );
+ }
+ },
+
+ _unmark: function( force, elem, type ) {
+ if ( force !== true ) {
+ type = elem;
+ elem = force;
+ force = false;
+ }
+ if ( elem ) {
+ type = type || "fx";
+ var key = type + "mark",
+ count = force ? 0 : ( (jQuery._data( elem, key ) || 1) - 1 );
+ if ( count ) {
+ jQuery._data( elem, key, count );
+ } else {
+ jQuery.removeData( elem, key, true );
+ handleQueueMarkDefer( elem, type, "mark" );
+ }
+ }
+ },
+
+ queue: function( elem, type, data ) {
+ var q;
+ if ( elem ) {
+ type = ( type || "fx" ) + "queue";
+ q = jQuery._data( elem, type );
+
+ // Speed up dequeue by getting out quickly if this is just a lookup
+ if ( data ) {
+ if ( !q || jQuery.isArray(data) ) {
+ q = jQuery._data( elem, type, jQuery.makeArray(data) );
+ } else {
+ q.push( data );
+ }
+ }
+ return q || [];
+ }
+ },
+
+ dequeue: function( elem, type ) {
+ type = type || "fx";
+
+ var queue = jQuery.queue( elem, type ),
+ fn = queue.shift(),
+ hooks = {};
+
+ // If the fx queue is dequeued, always remove the progress sentinel
+ if ( fn === "inprogress" ) {
+ fn = queue.shift();
+ }
+
+ if ( fn ) {
+ // Add a progress sentinel to prevent the fx queue from being
+ // automatically dequeued
+ if ( type === "fx" ) {
+ queue.unshift( "inprogress" );
+ }
+
+ jQuery._data( elem, type + ".run", hooks );
+ fn.call( elem, function() {
+ jQuery.dequeue( elem, type );
+ }, hooks );
+ }
+
+ if ( !queue.length ) {
+ jQuery.removeData( elem, type + "queue " + type + ".run", true );
+ handleQueueMarkDefer( elem, type, "queue" );
+ }
+ }
+});
+
+jQuery.fn.extend({
+ queue: function( type, data ) {
+ var setter = 2;
+
+ if ( typeof type !== "string" ) {
+ data = type;
+ type = "fx";
+ setter--;
+ }
+
+ if ( arguments.length < setter ) {
+ return jQuery.queue( this[0], type );
+ }
+
+ return data === undefined ?
+ this :
+ this.each(function() {
+ var queue = jQuery.queue( this, type, data );
+
+ if ( type === "fx" && queue[0] !== "inprogress" ) {
+ jQuery.dequeue( this, type );
+ }
+ });
+ },
+ dequeue: function( type ) {
+ return this.each(function() {
+ jQuery.dequeue( this, type );
+ });
+ },
+ // Based off of the plugin by Clint Helfers, with permission.
+ // http://blindsignals.com/index.php/2009/07/jquery-delay/
+ delay: function( time, type ) {
+ time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;
+ type = type || "fx";
+
+ return this.queue( type, function( next, hooks ) {
+ var timeout = setTimeout( next, time );
+ hooks.stop = function() {
+ clearTimeout( timeout );
+ };
+ });
+ },
+ clearQueue: function( type ) {
+ return this.queue( type || "fx", [] );
+ },
+ // Get a promise resolved when queues of a certain type
+ // are emptied (fx is the type by default)
+ promise: function( type, object ) {
+ if ( typeof type !== "string" ) {
+ object = type;
+ type = undefined;
+ }
+ type = type || "fx";
+ var defer = jQuery.Deferred(),
+ elements = this,
+ i = elements.length,
+ count = 1,
+ deferDataKey = type + "defer",
+ queueDataKey = type + "queue",
+ markDataKey = type + "mark",
+ tmp;
+ function resolve() {
+ if ( !( --count ) ) {
+ defer.resolveWith( elements, [ elements ] );
+ }
+ }
+ while( i-- ) {
+ if (( tmp = jQuery.data( elements[ i ], deferDataKey, undefined, true ) ||
+ ( jQuery.data( elements[ i ], queueDataKey, undefined, true ) ||
+ jQuery.data( elements[ i ], markDataKey, undefined, true ) ) &&
+ jQuery.data( elements[ i ], deferDataKey, jQuery.Callbacks( "once memory" ), true ) )) {
+ count++;
+ tmp.add( resolve );
+ }
+ }
+ resolve();
+ return defer.promise( object );
+ }
+});
+
+
+
+
+var rclass = /[\n\t\r]/g,
+ rspace = /\s+/,
+ rreturn = /\r/g,
+ rtype = /^(?:button|input)$/i,
+ rfocusable = /^(?:button|input|object|select|textarea)$/i,
+ rclickable = /^a(?:rea)?$/i,
+ rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,
+ getSetAttribute = jQuery.support.getSetAttribute,
+ nodeHook, boolHook, fixSpecified;
+
+jQuery.fn.extend({
+ attr: function( name, value ) {
+ return jQuery.access( this, jQuery.attr, name, value, arguments.length > 1 );
+ },
+
+ removeAttr: function( name ) {
+ return this.each(function() {
+ jQuery.removeAttr( this, name );
+ });
+ },
+
+ prop: function( name, value ) {
+ return jQuery.access( this, jQuery.prop, name, value, arguments.length > 1 );
+ },
+
+ removeProp: function( name ) {
+ name = jQuery.propFix[ name ] || name;
+ return this.each(function() {
+ // try/catch handles cases where IE balks (such as removing a property on window)
+ try {
+ this[ name ] = undefined;
+ delete this[ name ];
+ } catch( e ) {}
+ });
+ },
+
+ addClass: function( value ) {
+ var classNames, i, l, elem,
+ setClass, c, cl;
+
+ if ( jQuery.isFunction( value ) ) {
+ return this.each(function( j ) {
+ jQuery( this ).addClass( value.call(this, j, this.className) );
+ });
+ }
+
+ if ( value && typeof value === "string" ) {
+ classNames = value.split( rspace );
+
+ for ( i = 0, l = this.length; i < l; i++ ) {
+ elem = this[ i ];
+
+ if ( elem.nodeType === 1 ) {
+ if ( !elem.className && classNames.length === 1 ) {
+ elem.className = value;
+
+ } else {
+ setClass = " " + elem.className + " ";
+
+ for ( c = 0, cl = classNames.length; c < cl; c++ ) {
+ if ( !~setClass.indexOf( " " + classNames[ c ] + " " ) ) {
+ setClass += classNames[ c ] + " ";
+ }
+ }
+ elem.className = jQuery.trim( setClass );
+ }
+ }
+ }
+ }
+
+ return this;
+ },
+
+ removeClass: function( value ) {
+ var classNames, i, l, elem, className, c, cl;
+
+ if ( jQuery.isFunction( value ) ) {
+ return this.each(function( j ) {
+ jQuery( this ).removeClass( value.call(this, j, this.className) );
+ });
+ }
+
+ if ( (value && typeof value === "string") || value === undefined ) {
+ classNames = ( value || "" ).split( rspace );
+
+ for ( i = 0, l = this.length; i < l; i++ ) {
+ elem = this[ i ];
+
+ if ( elem.nodeType === 1 && elem.className ) {
+ if ( value ) {
+ className = (" " + elem.className + " ").replace( rclass, " " );
+ for ( c = 0, cl = classNames.length; c < cl; c++ ) {
+ className = className.replace(" " + classNames[ c ] + " ", " ");
+ }
+ elem.className = jQuery.trim( className );
+
+ } else {
+ elem.className = "";
+ }
+ }
+ }
+ }
+
+ return this;
+ },
+
+ toggleClass: function( value, stateVal ) {
+ var type = typeof value,
+ isBool = typeof stateVal === "boolean";
+
+ if ( jQuery.isFunction( value ) ) {
+ return this.each(function( i ) {
+ jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal );
+ });
+ }
+
+ return this.each(function() {
+ if ( type === "string" ) {
+ // toggle individual class names
+ var className,
+ i = 0,
+ self = jQuery( this ),
+ state = stateVal,
+ classNames = value.split( rspace );
+
+ while ( (className = classNames[ i++ ]) ) {
+ // check each className given, space seperated list
+ state = isBool ? state : !self.hasClass( className );
+ self[ state ? "addClass" : "removeClass" ]( className );
+ }
+
+ } else if ( type === "undefined" || type === "boolean" ) {
+ if ( this.className ) {
+ // store className if set
+ jQuery._data( this, "__className__", this.className );
+ }
+
+ // toggle whole className
+ this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || "";
+ }
+ });
+ },
+
+ hasClass: function( selector ) {
+ var className = " " + selector + " ",
+ i = 0,
+ l = this.length;
+ for ( ; i < l; i++ ) {
+ if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) > -1 ) {
+ return true;
+ }
+ }
+
+ return false;
+ },
+
+ val: function( value ) {
+ var hooks, ret, isFunction,
+ elem = this[0];
+
+ if ( !arguments.length ) {
+ if ( elem ) {
+ hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ];
+
+ if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) {
+ return ret;
+ }
+
+ ret = elem.value;
+
+ return typeof ret === "string" ?
+ // handle most common string cases
+ ret.replace(rreturn, "") :
+ // handle cases where value is null/undef or number
+ ret == null ? "" : ret;
+ }
+
+ return;
+ }
+
+ isFunction = jQuery.isFunction( value );
+
+ return this.each(function( i ) {
+ var self = jQuery(this), val;
+
+ if ( this.nodeType !== 1 ) {
+ return;
+ }
+
+ if ( isFunction ) {
+ val = value.call( this, i, self.val() );
+ } else {
+ val = value;
+ }
+
+ // Treat null/undefined as ""; convert numbers to string
+ if ( val == null ) {
+ val = "";
+ } else if ( typeof val === "number" ) {
+ val += "";
+ } else if ( jQuery.isArray( val ) ) {
+ val = jQuery.map(val, function ( value ) {
+ return value == null ? "" : value + "";
+ });
+ }
+
+ hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];
+
+ // If set returns undefined, fall back to normal setting
+ if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) {
+ this.value = val;
+ }
+ });
+ }
+});
+
+jQuery.extend({
+ valHooks: {
+ option: {
+ get: function( elem ) {
+ // attributes.value is undefined in Blackberry 4.7 but
+ // uses .value. See #6932
+ var val = elem.attributes.value;
+ return !val || val.specified ? elem.value : elem.text;
+ }
+ },
+ select: {
+ get: function( elem ) {
+ var value, i, max, option,
+ index = elem.selectedIndex,
+ values = [],
+ options = elem.options,
+ one = elem.type === "select-one";
+
+ // Nothing was selected
+ if ( index < 0 ) {
+ return null;
+ }
+
+ // Loop through all the selected options
+ i = one ? index : 0;
+ max = one ? index + 1 : options.length;
+ for ( ; i < max; i++ ) {
+ option = options[ i ];
+
+ // Don't return options that are disabled or in a disabled optgroup
+ if ( option.selected && (jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null) &&
+ (!option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" )) ) {
+
+ // Get the specific value for the option
+ value = jQuery( option ).val();
+
+ // We don't need an array for one selects
+ if ( one ) {
+ return value;
+ }
+
+ // Multi-Selects return an array
+ values.push( value );
+ }
+ }
+
+ // Fixes Bug #2551 -- select.val() broken in IE after form.reset()
+ if ( one && !values.length && options.length ) {
+ return jQuery( options[ index ] ).val();
+ }
+
+ return values;
+ },
+
+ set: function( elem, value ) {
+ var values = jQuery.makeArray( value );
+
+ jQuery(elem).find("option").each(function() {
+ this.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0;
+ });
+
+ if ( !values.length ) {
+ elem.selectedIndex = -1;
+ }
+ return values;
+ }
+ }
+ },
+
+ attrFn: {
+ val: true,
+ css: true,
+ html: true,
+ text: true,
+ data: true,
+ width: true,
+ height: true,
+ offset: true
+ },
+
+ attr: function( elem, name, value, pass ) {
+ var ret, hooks, notxml,
+ nType = elem.nodeType;
+
+ // don't get/set attributes on text, comment and attribute nodes
+ if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
+ return;
+ }
+
+ if ( pass && name in jQuery.attrFn ) {
+ return jQuery( elem )[ name ]( value );
+ }
+
+ // Fallback to prop when attributes are not supported
+ if ( typeof elem.getAttribute === "undefined" ) {
+ return jQuery.prop( elem, name, value );
+ }
+
+ notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
+
+ // All attributes are lowercase
+ // Grab necessary hook if one is defined
+ if ( notxml ) {
+ name = name.toLowerCase();
+ hooks = jQuery.attrHooks[ name ] || ( rboolean.test( name ) ? boolHook : nodeHook );
+ }
+
+ if ( value !== undefined ) {
+
+ if ( value === null ) {
+ jQuery.removeAttr( elem, name );
+ return;
+
+ } else if ( hooks && "set" in hooks && notxml && (ret = hooks.set( elem, value, name )) !== undefined ) {
+ return ret;
+
+ } else {
+ elem.setAttribute( name, "" + value );
+ return value;
+ }
+
+ } else if ( hooks && "get" in hooks && notxml && (ret = hooks.get( elem, name )) !== null ) {
+ return ret;
+
+ } else {
+
+ ret = elem.getAttribute( name );
+
+ // Non-existent attributes return null, we normalize to undefined
+ return ret === null ?
+ undefined :
+ ret;
+ }
+ },
+
+ removeAttr: function( elem, value ) {
+ var propName, attrNames, name, l, isBool,
+ i = 0;
+
+ if ( value && elem.nodeType === 1 ) {
+ attrNames = value.toLowerCase().split( rspace );
+ l = attrNames.length;
+
+ for ( ; i < l; i++ ) {
+ name = attrNames[ i ];
+
+ if ( name ) {
+ propName = jQuery.propFix[ name ] || name;
+ isBool = rboolean.test( name );
+
+ // See #9699 for explanation of this approach (setting first, then removal)
+ // Do not do this for boolean attributes (see #10870)
+ if ( !isBool ) {
+ jQuery.attr( elem, name, "" );
+ }
+ elem.removeAttribute( getSetAttribute ? name : propName );
+
+ // Set corresponding property to false for boolean attributes
+ if ( isBool && propName in elem ) {
+ elem[ propName ] = false;
+ }
+ }
+ }
+ }
+ },
+
+ attrHooks: {
+ type: {
+ set: function( elem, value ) {
+ // We can't allow the type property to be changed (since it causes problems in IE)
+ if ( rtype.test( elem.nodeName ) && elem.parentNode ) {
+ jQuery.error( "type property can't be changed" );
+ } else if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) {
+ // Setting the type on a radio button after the value resets the value in IE6-9
+ // Reset value to it's default in case type is set after value
+ // This is for element creation
+ var val = elem.value;
+ elem.setAttribute( "type", value );
+ if ( val ) {
+ elem.value = val;
+ }
+ return value;
+ }
+ }
+ },
+ // Use the value property for back compat
+ // Use the nodeHook for button elements in IE6/7 (#1954)
+ value: {
+ get: function( elem, name ) {
+ if ( nodeHook && jQuery.nodeName( elem, "button" ) ) {
+ return nodeHook.get( elem, name );
+ }
+ return name in elem ?
+ elem.value :
+ null;
+ },
+ set: function( elem, value, name ) {
+ if ( nodeHook && jQuery.nodeName( elem, "button" ) ) {
+ return nodeHook.set( elem, value, name );
+ }
+ // Does not return so that setAttribute is also used
+ elem.value = value;
+ }
+ }
+ },
+
+ propFix: {
+ tabindex: "tabIndex",
+ readonly: "readOnly",
+ "for": "htmlFor",
+ "class": "className",
+ maxlength: "maxLength",
+ cellspacing: "cellSpacing",
+ cellpadding: "cellPadding",
+ rowspan: "rowSpan",
+ colspan: "colSpan",
+ usemap: "useMap",
+ frameborder: "frameBorder",
+ contenteditable: "contentEditable"
+ },
+
+ prop: function( elem, name, value ) {
+ var ret, hooks, notxml,
+ nType = elem.nodeType;
+
+ // don't get/set properties on text, comment and attribute nodes
+ if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
+ return;
+ }
+
+ notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
+
+ if ( notxml ) {
+ // Fix name and attach hooks
+ name = jQuery.propFix[ name ] || name;
+ hooks = jQuery.propHooks[ name ];
+ }
+
+ if ( value !== undefined ) {
+ if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) {
+ return ret;
+
+ } else {
+ return ( elem[ name ] = value );
+ }
+
+ } else {
+ if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) {
+ return ret;
+
+ } else {
+ return elem[ name ];
+ }
+ }
+ },
+
+ propHooks: {
+ tabIndex: {
+ get: function( elem ) {
+ // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set
+ // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
+ var attributeNode = elem.getAttributeNode("tabindex");
+
+ return attributeNode && attributeNode.specified ?
+ parseInt( attributeNode.value, 10 ) :
+ rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ?
+ 0 :
+ undefined;
+ }
+ }
+ }
+});
+
+// Add the tabIndex propHook to attrHooks for back-compat (different case is intentional)
+jQuery.attrHooks.tabindex = jQuery.propHooks.tabIndex;
+
+// Hook for boolean attributes
+boolHook = {
+ get: function( elem, name ) {
+ // Align boolean attributes with corresponding properties
+ // Fall back to attribute presence where some booleans are not supported
+ var attrNode,
+ property = jQuery.prop( elem, name );
+ return property === true || typeof property !== "boolean" && ( attrNode = elem.getAttributeNode(name) ) && attrNode.nodeValue !== false ?
+ name.toLowerCase() :
+ undefined;
+ },
+ set: function( elem, value, name ) {
+ var propName;
+ if ( value === false ) {
+ // Remove boolean attributes when set to false
+ jQuery.removeAttr( elem, name );
+ } else {
+ // value is true since we know at this point it's type boolean and not false
+ // Set boolean attributes to the same name and set the DOM property
+ propName = jQuery.propFix[ name ] || name;
+ if ( propName in elem ) {
+ // Only set the IDL specifically if it already exists on the element
+ elem[ propName ] = true;
+ }
+
+ elem.setAttribute( name, name.toLowerCase() );
+ }
+ return name;
+ }
+};
+
+// IE6/7 do not support getting/setting some attributes with get/setAttribute
+if ( !getSetAttribute ) {
+
+ fixSpecified = {
+ name: true,
+ id: true,
+ coords: true
+ };
+
+ // Use this for any attribute in IE6/7
+ // This fixes almost every IE6/7 issue
+ nodeHook = jQuery.valHooks.button = {
+ get: function( elem, name ) {
+ var ret;
+ ret = elem.getAttributeNode( name );
+ return ret && ( fixSpecified[ name ] ? ret.nodeValue !== "" : ret.specified ) ?
+ ret.nodeValue :
+ undefined;
+ },
+ set: function( elem, value, name ) {
+ // Set the existing or create a new attribute node
+ var ret = elem.getAttributeNode( name );
+ if ( !ret ) {
+ ret = document.createAttribute( name );
+ elem.setAttributeNode( ret );
+ }
+ return ( ret.nodeValue = value + "" );
+ }
+ };
+
+ // Apply the nodeHook to tabindex
+ jQuery.attrHooks.tabindex.set = nodeHook.set;
+
+ // Set width and height to auto instead of 0 on empty string( Bug #8150 )
+ // This is for removals
+ jQuery.each([ "width", "height" ], function( i, name ) {
+ jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], {
+ set: function( elem, value ) {
+ if ( value === "" ) {
+ elem.setAttribute( name, "auto" );
+ return value;
+ }
+ }
+ });
+ });
+
+ // Set contenteditable to false on removals(#10429)
+ // Setting to empty string throws an error as an invalid value
+ jQuery.attrHooks.contenteditable = {
+ get: nodeHook.get,
+ set: function( elem, value, name ) {
+ if ( value === "" ) {
+ value = "false";
+ }
+ nodeHook.set( elem, value, name );
+ }
+ };
+}
+
+
+// Some attributes require a special call on IE
+if ( !jQuery.support.hrefNormalized ) {
+ jQuery.each([ "href", "src", "width", "height" ], function( i, name ) {
+ jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], {
+ get: function( elem ) {
+ var ret = elem.getAttribute( name, 2 );
+ return ret === null ? undefined : ret;
+ }
+ });
+ });
+}
+
+if ( !jQuery.support.style ) {
+ jQuery.attrHooks.style = {
+ get: function( elem ) {
+ // Return undefined in the case of empty string
+ // Normalize to lowercase since IE uppercases css property names
+ return elem.style.cssText.toLowerCase() || undefined;
+ },
+ set: function( elem, value ) {
+ return ( elem.style.cssText = "" + value );
+ }
+ };
+}
+
+// Safari mis-reports the default selected property of an option
+// Accessing the parent's selectedIndex property fixes it
+if ( !jQuery.support.optSelected ) {
+ jQuery.propHooks.selected = jQuery.extend( jQuery.propHooks.selected, {
+ get: function( elem ) {
+ var parent = elem.parentNode;
+
+ if ( parent ) {
+ parent.selectedIndex;
+
+ // Make sure that it also works with optgroups, see #5701
+ if ( parent.parentNode ) {
+ parent.parentNode.selectedIndex;
+ }
+ }
+ return null;
+ }
+ });
+}
+
+// IE6/7 call enctype encoding
+if ( !jQuery.support.enctype ) {
+ jQuery.propFix.enctype = "encoding";
+}
+
+// Radios and checkboxes getter/setter
+if ( !jQuery.support.checkOn ) {
+ jQuery.each([ "radio", "checkbox" ], function() {
+ jQuery.valHooks[ this ] = {
+ get: function( elem ) {
+ // Handle the case where in Webkit "" is returned instead of "on" if a value isn't specified
+ return elem.getAttribute("value") === null ? "on" : elem.value;
+ }
+ };
+ });
+}
+jQuery.each([ "radio", "checkbox" ], function() {
+ jQuery.valHooks[ this ] = jQuery.extend( jQuery.valHooks[ this ], {
+ set: function( elem, value ) {
+ if ( jQuery.isArray( value ) ) {
+ return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 );
+ }
+ }
+ });
+});
+
+
+
+
+var rformElems = /^(?:textarea|input|select)$/i,
+ rtypenamespace = /^([^\.]*)?(?:\.(.+))?$/,
+ rhoverHack = /(?:^|\s)hover(\.\S+)?\b/,
+ rkeyEvent = /^key/,
+ rmouseEvent = /^(?:mouse|contextmenu)|click/,
+ rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,
+ rquickIs = /^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,
+ quickParse = function( selector ) {
+ var quick = rquickIs.exec( selector );
+ if ( quick ) {
+ // 0 1 2 3
+ // [ _, tag, id, class ]
+ quick[1] = ( quick[1] || "" ).toLowerCase();
+ quick[3] = quick[3] && new RegExp( "(?:^|\\s)" + quick[3] + "(?:\\s|$)" );
+ }
+ return quick;
+ },
+ quickIs = function( elem, m ) {
+ var attrs = elem.attributes || {};
+ return (
+ (!m[1] || elem.nodeName.toLowerCase() === m[1]) &&
+ (!m[2] || (attrs.id || {}).value === m[2]) &&
+ (!m[3] || m[3].test( (attrs[ "class" ] || {}).value ))
+ );
+ },
+ hoverHack = function( events ) {
+ return jQuery.event.special.hover ? events : events.replace( rhoverHack, "mouseenter$1 mouseleave$1" );
+ };
+
+/*
+ * Helper functions for managing events -- not part of the public interface.
+ * Props to Dean Edwards' addEvent library for many of the ideas.
+ */
+jQuery.event = {
+
+ add: function( elem, types, handler, data, selector ) {
+
+ var elemData, eventHandle, events,
+ t, tns, type, namespaces, handleObj,
+ handleObjIn, quick, handlers, special;
+
+ // Don't attach events to noData or text/comment nodes (allow plain objects tho)
+ if ( elem.nodeType === 3 || elem.nodeType === 8 || !types || !handler || !(elemData = jQuery._data( elem )) ) {
+ return;
+ }
+
+ // Caller can pass in an object of custom data in lieu of the handler
+ if ( handler.handler ) {
+ handleObjIn = handler;
+ handler = handleObjIn.handler;
+ selector = handleObjIn.selector;
+ }
+
+ // Make sure that the handler has a unique ID, used to find/remove it later
+ if ( !handler.guid ) {
+ handler.guid = jQuery.guid++;
+ }
+
+ // Init the element's event structure and main handler, if this is the first
+ events = elemData.events;
+ if ( !events ) {
+ elemData.events = events = {};
+ }
+ eventHandle = elemData.handle;
+ if ( !eventHandle ) {
+ elemData.handle = eventHandle = function( e ) {
+ // Discard the second event of a jQuery.event.trigger() and
+ // when an event is called after a page has unloaded
+ return typeof jQuery !== "undefined" && (!e || jQuery.event.triggered !== e.type) ?
+ jQuery.event.dispatch.apply( eventHandle.elem, arguments ) :
+ undefined;
+ };
+ // Add elem as a property of the handle fn to prevent a memory leak with IE non-native events
+ eventHandle.elem = elem;
+ }
+
+ // Handle multiple events separated by a space
+ // jQuery(...).bind("mouseover mouseout", fn);
+ types = jQuery.trim( hoverHack(types) ).split( " " );
+ for ( t = 0; t < types.length; t++ ) {
+
+ tns = rtypenamespace.exec( types[t] ) || [];
+ type = tns[1];
+ namespaces = ( tns[2] || "" ).split( "." ).sort();
+
+ // If event changes its type, use the special event handlers for the changed type
+ special = jQuery.event.special[ type ] || {};
+
+ // If selector defined, determine special event api type, otherwise given type
+ type = ( selector ? special.delegateType : special.bindType ) || type;
+
+ // Update special based on newly reset type
+ special = jQuery.event.special[ type ] || {};
+
+ // handleObj is passed to all event handlers
+ handleObj = jQuery.extend({
+ type: type,
+ origType: tns[1],
+ data: data,
+ handler: handler,
+ guid: handler.guid,
+ selector: selector,
+ quick: selector && quickParse( selector ),
+ namespace: namespaces.join(".")
+ }, handleObjIn );
+
+ // Init the event handler queue if we're the first
+ handlers = events[ type ];
+ if ( !handlers ) {
+ handlers = events[ type ] = [];
+ handlers.delegateCount = 0;
+
+ // Only use addEventListener/attachEvent if the special events handler returns false
+ if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) {
+ // Bind the global event handler to the element
+ if ( elem.addEventListener ) {
+ elem.addEventListener( type, eventHandle, false );
+
+ } else if ( elem.attachEvent ) {
+ elem.attachEvent( "on" + type, eventHandle );
+ }
+ }
+ }
+
+ if ( special.add ) {
+ special.add.call( elem, handleObj );
+
+ if ( !handleObj.handler.guid ) {
+ handleObj.handler.guid = handler.guid;
+ }
+ }
+
+ // Add to the element's handler list, delegates in front
+ if ( selector ) {
+ handlers.splice( handlers.delegateCount++, 0, handleObj );
+ } else {
+ handlers.push( handleObj );
+ }
+
+ // Keep track of which events have ever been used, for event optimization
+ jQuery.event.global[ type ] = true;
+ }
+
+ // Nullify elem to prevent memory leaks in IE
+ elem = null;
+ },
+
+ global: {},
+
+ // Detach an event or set of events from an element
+ remove: function( elem, types, handler, selector, mappedTypes ) {
+
+ var elemData = jQuery.hasData( elem ) && jQuery._data( elem ),
+ t, tns, type, origType, namespaces, origCount,
+ j, events, special, handle, eventType, handleObj;
+
+ if ( !elemData || !(events = elemData.events) ) {
+ return;
+ }
+
+ // Once for each type.namespace in types; type may be omitted
+ types = jQuery.trim( hoverHack( types || "" ) ).split(" ");
+ for ( t = 0; t < types.length; t++ ) {
+ tns = rtypenamespace.exec( types[t] ) || [];
+ type = origType = tns[1];
+ namespaces = tns[2];
+
+ // Unbind all events (on this namespace, if provided) for the element
+ if ( !type ) {
+ for ( type in events ) {
+ jQuery.event.remove( elem, type + types[ t ], handler, selector, true );
+ }
+ continue;
+ }
+
+ special = jQuery.event.special[ type ] || {};
+ type = ( selector? special.delegateType : special.bindType ) || type;
+ eventType = events[ type ] || [];
+ origCount = eventType.length;
+ namespaces = namespaces ? new RegExp("(^|\\.)" + namespaces.split(".").sort().join("\\.(?:.*\\.)?") + "(\\.|$)") : null;
+
+ // Remove matching events
+ for ( j = 0; j < eventType.length; j++ ) {
+ handleObj = eventType[ j ];
+
+ if ( ( mappedTypes || origType === handleObj.origType ) &&
+ ( !handler || handler.guid === handleObj.guid ) &&
+ ( !namespaces || namespaces.test( handleObj.namespace ) ) &&
+ ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) {
+ eventType.splice( j--, 1 );
+
+ if ( handleObj.selector ) {
+ eventType.delegateCount--;
+ }
+ if ( special.remove ) {
+ special.remove.call( elem, handleObj );
+ }
+ }
+ }
+
+ // Remove generic event handler if we removed something and no more handlers exist
+ // (avoids potential for endless recursion during removal of special event handlers)
+ if ( eventType.length === 0 && origCount !== eventType.length ) {
+ if ( !special.teardown || special.teardown.call( elem, namespaces ) === false ) {
+ jQuery.removeEvent( elem, type, elemData.handle );
+ }
+
+ delete events[ type ];
+ }
+ }
+
+ // Remove the expando if it's no longer used
+ if ( jQuery.isEmptyObject( events ) ) {
+ handle = elemData.handle;
+ if ( handle ) {
+ handle.elem = null;
+ }
+
+ // removeData also checks for emptiness and clears the expando if empty
+ // so use it instead of delete
+ jQuery.removeData( elem, [ "events", "handle" ], true );
+ }
+ },
+
+ // Events that are safe to short-circuit if no handlers are attached.
+ // Native DOM events should not be added, they may have inline handlers.
+ customEvent: {
+ "getData": true,
+ "setData": true,
+ "changeData": true
+ },
+
+ trigger: function( event, data, elem, onlyHandlers ) {
+ // Don't do events on text and comment nodes
+ if ( elem && (elem.nodeType === 3 || elem.nodeType === 8) ) {
+ return;
+ }
+
+ // Event object or event type
+ var type = event.type || event,
+ namespaces = [],
+ cache, exclusive, i, cur, old, ontype, special, handle, eventPath, bubbleType;
+
+ // focus/blur morphs to focusin/out; ensure we're not firing them right now
+ if ( rfocusMorph.test( type + jQuery.event.triggered ) ) {
+ return;
+ }
+
+ if ( type.indexOf( "!" ) >= 0 ) {
+ // Exclusive events trigger only for the exact event (no namespaces)
+ type = type.slice(0, -1);
+ exclusive = true;
+ }
+
+ if ( type.indexOf( "." ) >= 0 ) {
+ // Namespaced trigger; create a regexp to match event type in handle()
+ namespaces = type.split(".");
+ type = namespaces.shift();
+ namespaces.sort();
+ }
+
+ if ( (!elem || jQuery.event.customEvent[ type ]) && !jQuery.event.global[ type ] ) {
+ // No jQuery handlers for this event type, and it can't have inline handlers
+ return;
+ }
+
+ // Caller can pass in an Event, Object, or just an event type string
+ event = typeof event === "object" ?
+ // jQuery.Event object
+ event[ jQuery.expando ] ? event :
+ // Object literal
+ new jQuery.Event( type, event ) :
+ // Just the event type (string)
+ new jQuery.Event( type );
+
+ event.type = type;
+ event.isTrigger = true;
+ event.exclusive = exclusive;
+ event.namespace = namespaces.join( "." );
+ event.namespace_re = event.namespace? new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.)?") + "(\\.|$)") : null;
+ ontype = type.indexOf( ":" ) < 0 ? "on" + type : "";
+
+ // Handle a global trigger
+ if ( !elem ) {
+
+ // TODO: Stop taunting the data cache; remove global events and always attach to document
+ cache = jQuery.cache;
+ for ( i in cache ) {
+ if ( cache[ i ].events && cache[ i ].events[ type ] ) {
+ jQuery.event.trigger( event, data, cache[ i ].handle.elem, true );
+ }
+ }
+ return;
+ }
+
+ // Clean up the event in case it is being reused
+ event.result = undefined;
+ if ( !event.target ) {
+ event.target = elem;
+ }
+
+ // Clone any incoming data and prepend the event, creating the handler arg list
+ data = data != null ? jQuery.makeArray( data ) : [];
+ data.unshift( event );
+
+ // Allow special events to draw outside the lines
+ special = jQuery.event.special[ type ] || {};
+ if ( special.trigger && special.trigger.apply( elem, data ) === false ) {
+ return;
+ }
+
+ // Determine event propagation path in advance, per W3C events spec (#9951)
+ // Bubble up to document, then to window; watch for a global ownerDocument var (#9724)
+ eventPath = [[ elem, special.bindType || type ]];
+ if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) {
+
+ bubbleType = special.delegateType || type;
+ cur = rfocusMorph.test( bubbleType + type ) ? elem : elem.parentNode;
+ old = null;
+ for ( ; cur; cur = cur.parentNode ) {
+ eventPath.push([ cur, bubbleType ]);
+ old = cur;
+ }
+
+ // Only add window if we got to document (e.g., not plain obj or detached DOM)
+ if ( old && old === elem.ownerDocument ) {
+ eventPath.push([ old.defaultView || old.parentWindow || window, bubbleType ]);
+ }
+ }
+
+ // Fire handlers on the event path
+ for ( i = 0; i < eventPath.length && !event.isPropagationStopped(); i++ ) {
+
+ cur = eventPath[i][0];
+ event.type = eventPath[i][1];
+
+ handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" );
+ if ( handle ) {
+ handle.apply( cur, data );
+ }
+ // Note that this is a bare JS function and not a jQuery handler
+ handle = ontype && cur[ ontype ];
+ if ( handle && jQuery.acceptData( cur ) && handle.apply( cur, data ) === false ) {
+ event.preventDefault();
+ }
+ }
+ event.type = type;
+
+ // If nobody prevented the default action, do it now
+ if ( !onlyHandlers && !event.isDefaultPrevented() ) {
+
+ if ( (!special._default || special._default.apply( elem.ownerDocument, data ) === false) &&
+ !(type === "click" && jQuery.nodeName( elem, "a" )) && jQuery.acceptData( elem ) ) {
+
+ // Call a native DOM method on the target with the same name name as the event.
+ // Can't use an .isFunction() check here because IE6/7 fails that test.
+ // Don't do default actions on window, that's where global variables be (#6170)
+ // IE<9 dies on focus/blur to hidden element (#1486)
+ if ( ontype && elem[ type ] && ((type !== "focus" && type !== "blur") || event.target.offsetWidth !== 0) && !jQuery.isWindow( elem ) ) {
+
+ // Don't re-trigger an onFOO event when we call its FOO() method
+ old = elem[ ontype ];
+
+ if ( old ) {
+ elem[ ontype ] = null;
+ }
+
+ // Prevent re-triggering of the same event, since we already bubbled it above
+ jQuery.event.triggered = type;
+ elem[ type ]();
+ jQuery.event.triggered = undefined;
+
+ if ( old ) {
+ elem[ ontype ] = old;
+ }
+ }
+ }
+ }
+
+ return event.result;
+ },
+
+ dispatch: function( event ) {
+
+ // Make a writable jQuery.Event from the native event object
+ event = jQuery.event.fix( event || window.event );
+
+ var handlers = ( (jQuery._data( this, "events" ) || {} )[ event.type ] || []),
+ delegateCount = handlers.delegateCount,
+ args = [].slice.call( arguments, 0 ),
+ run_all = !event.exclusive && !event.namespace,
+ special = jQuery.event.special[ event.type ] || {},
+ handlerQueue = [],
+ i, j, cur, jqcur, ret, selMatch, matched, matches, handleObj, sel, related;
+
+ // Use the fix-ed jQuery.Event rather than the (read-only) native event
+ args[0] = event;
+ event.delegateTarget = this;
+
+ // Call the preDispatch hook for the mapped type, and let it bail if desired
+ if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {
+ return;
+ }
+
+ // Determine handlers that should run if there are delegated events
+ // Avoid non-left-click bubbling in Firefox (#3861)
+ if ( delegateCount && !(event.button && event.type === "click") ) {
+
+ // Pregenerate a single jQuery object for reuse with .is()
+ jqcur = jQuery(this);
+ jqcur.context = this.ownerDocument || this;
+
+ for ( cur = event.target; cur != this; cur = cur.parentNode || this ) {
+
+ // Don't process events on disabled elements (#6911, #8165)
+ if ( cur.disabled !== true ) {
+ selMatch = {};
+ matches = [];
+ jqcur[0] = cur;
+ for ( i = 0; i < delegateCount; i++ ) {
+ handleObj = handlers[ i ];
+ sel = handleObj.selector;
+
+ if ( selMatch[ sel ] === undefined ) {
+ selMatch[ sel ] = (
+ handleObj.quick ? quickIs( cur, handleObj.quick ) : jqcur.is( sel )
+ );
+ }
+ if ( selMatch[ sel ] ) {
+ matches.push( handleObj );
+ }
+ }
+ if ( matches.length ) {
+ handlerQueue.push({ elem: cur, matches: matches });
+ }
+ }
+ }
+ }
+
+ // Add the remaining (directly-bound) handlers
+ if ( handlers.length > delegateCount ) {
+ handlerQueue.push({ elem: this, matches: handlers.slice( delegateCount ) });
+ }
+
+ // Run delegates first; they may want to stop propagation beneath us
+ for ( i = 0; i < handlerQueue.length && !event.isPropagationStopped(); i++ ) {
+ matched = handlerQueue[ i ];
+ event.currentTarget = matched.elem;
+
+ for ( j = 0; j < matched.matches.length && !event.isImmediatePropagationStopped(); j++ ) {
+ handleObj = matched.matches[ j ];
+
+ // Triggered event must either 1) be non-exclusive and have no namespace, or
+ // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace).
+ if ( run_all || (!event.namespace && !handleObj.namespace) || event.namespace_re && event.namespace_re.test( handleObj.namespace ) ) {
+
+ event.data = handleObj.data;
+ event.handleObj = handleObj;
+
+ ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler )
+ .apply( matched.elem, args );
+
+ if ( ret !== undefined ) {
+ event.result = ret;
+ if ( ret === false ) {
+ event.preventDefault();
+ event.stopPropagation();
+ }
+ }
+ }
+ }
+ }
+
+ // Call the postDispatch hook for the mapped type
+ if ( special.postDispatch ) {
+ special.postDispatch.call( this, event );
+ }
+
+ return event.result;
+ },
+
+ // Includes some event props shared by KeyEvent and MouseEvent
+ // *** attrChange attrName relatedNode srcElement are not normalized, non-W3C, deprecated, will be removed in 1.8 ***
+ props: "attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),
+
+ fixHooks: {},
+
+ keyHooks: {
+ props: "char charCode key keyCode".split(" "),
+ filter: function( event, original ) {
+
+ // Add which for key events
+ if ( event.which == null ) {
+ event.which = original.charCode != null ? original.charCode : original.keyCode;
+ }
+
+ return event;
+ }
+ },
+
+ mouseHooks: {
+ props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),
+ filter: function( event, original ) {
+ var eventDoc, doc, body,
+ button = original.button,
+ fromElement = original.fromElement;
+
+ // Calculate pageX/Y if missing and clientX/Y available
+ if ( event.pageX == null && original.clientX != null ) {
+ eventDoc = event.target.ownerDocument || document;
+ doc = eventDoc.documentElement;
+ body = eventDoc.body;
+
+ event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 );
+ event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 );
+ }
+
+ // Add relatedTarget, if necessary
+ if ( !event.relatedTarget && fromElement ) {
+ event.relatedTarget = fromElement === event.target ? original.toElement : fromElement;
+ }
+
+ // Add which for click: 1 === left; 2 === middle; 3 === right
+ // Note: button is not normalized, so don't use it
+ if ( !event.which && button !== undefined ) {
+ event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) );
+ }
+
+ return event;
+ }
+ },
+
+ fix: function( event ) {
+ if ( event[ jQuery.expando ] ) {
+ return event;
+ }
+
+ // Create a writable copy of the event object and normalize some properties
+ var i, prop,
+ originalEvent = event,
+ fixHook = jQuery.event.fixHooks[ event.type ] || {},
+ copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props;
+
+ event = jQuery.Event( originalEvent );
+
+ for ( i = copy.length; i; ) {
+ prop = copy[ --i ];
+ event[ prop ] = originalEvent[ prop ];
+ }
+
+ // Fix target property, if necessary (#1925, IE 6/7/8 & Safari2)
+ if ( !event.target ) {
+ event.target = originalEvent.srcElement || document;
+ }
+
+ // Target should not be a text node (#504, Safari)
+ if ( event.target.nodeType === 3 ) {
+ event.target = event.target.parentNode;
+ }
+
+ // For mouse/key events; add metaKey if it's not there (#3368, IE6/7/8)
+ if ( event.metaKey === undefined ) {
+ event.metaKey = event.ctrlKey;
+ }
+
+ return fixHook.filter? fixHook.filter( event, originalEvent ) : event;
+ },
+
+ special: {
+ ready: {
+ // Make sure the ready event is setup
+ setup: jQuery.bindReady
+ },
+
+ load: {
+ // Prevent triggered image.load events from bubbling to window.load
+ noBubble: true
+ },
+
+ focus: {
+ delegateType: "focusin"
+ },
+ blur: {
+ delegateType: "focusout"
+ },
+
+ beforeunload: {
+ setup: function( data, namespaces, eventHandle ) {
+ // We only want to do this special case on windows
+ if ( jQuery.isWindow( this ) ) {
+ this.onbeforeunload = eventHandle;
+ }
+ },
+
+ teardown: function( namespaces, eventHandle ) {
+ if ( this.onbeforeunload === eventHandle ) {
+ this.onbeforeunload = null;
+ }
+ }
+ }
+ },
+
+ simulate: function( type, elem, event, bubble ) {
+ // Piggyback on a donor event to simulate a different one.
+ // Fake originalEvent to avoid donor's stopPropagation, but if the
+ // simulated event prevents default then we do the same on the donor.
+ var e = jQuery.extend(
+ new jQuery.Event(),
+ event,
+ { type: type,
+ isSimulated: true,
+ originalEvent: {}
+ }
+ );
+ if ( bubble ) {
+ jQuery.event.trigger( e, null, elem );
+ } else {
+ jQuery.event.dispatch.call( elem, e );
+ }
+ if ( e.isDefaultPrevented() ) {
+ event.preventDefault();
+ }
+ }
+};
+
+// Some plugins are using, but it's undocumented/deprecated and will be removed.
+// The 1.7 special event interface should provide all the hooks needed now.
+jQuery.event.handle = jQuery.event.dispatch;
+
+jQuery.removeEvent = document.removeEventListener ?
+ function( elem, type, handle ) {
+ if ( elem.removeEventListener ) {
+ elem.removeEventListener( type, handle, false );
+ }
+ } :
+ function( elem, type, handle ) {
+ if ( elem.detachEvent ) {
+ elem.detachEvent( "on" + type, handle );
+ }
+ };
+
+jQuery.Event = function( src, props ) {
+ // Allow instantiation without the 'new' keyword
+ if ( !(this instanceof jQuery.Event) ) {
+ return new jQuery.Event( src, props );
+ }
+
+ // Event object
+ if ( src && src.type ) {
+ this.originalEvent = src;
+ this.type = src.type;
+
+ // Events bubbling up the document may have been marked as prevented
+ // by a handler lower down the tree; reflect the correct value.
+ this.isDefaultPrevented = ( src.defaultPrevented || src.returnValue === false ||
+ src.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse;
+
+ // Event type
+ } else {
+ this.type = src;
+ }
+
+ // Put explicitly provided properties onto the event object
+ if ( props ) {
+ jQuery.extend( this, props );
+ }
+
+ // Create a timestamp if incoming event doesn't have one
+ this.timeStamp = src && src.timeStamp || jQuery.now();
+
+ // Mark it as fixed
+ this[ jQuery.expando ] = true;
+};
+
+function returnFalse() {
+ return false;
+}
+function returnTrue() {
+ return true;
+}
+
+// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
+// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
+jQuery.Event.prototype = {
+ preventDefault: function() {
+ this.isDefaultPrevented = returnTrue;
+
+ var e = this.originalEvent;
+ if ( !e ) {
+ return;
+ }
+
+ // if preventDefault exists run it on the original event
+ if ( e.preventDefault ) {
+ e.preventDefault();
+
+ // otherwise set the returnValue property of the original event to false (IE)
+ } else {
+ e.returnValue = false;
+ }
+ },
+ stopPropagation: function() {
+ this.isPropagationStopped = returnTrue;
+
+ var e = this.originalEvent;
+ if ( !e ) {
+ return;
+ }
+ // if stopPropagation exists run it on the original event
+ if ( e.stopPropagation ) {
+ e.stopPropagation();
+ }
+ // otherwise set the cancelBubble property of the original event to true (IE)
+ e.cancelBubble = true;
+ },
+ stopImmediatePropagation: function() {
+ this.isImmediatePropagationStopped = returnTrue;
+ this.stopPropagation();
+ },
+ isDefaultPrevented: returnFalse,
+ isPropagationStopped: returnFalse,
+ isImmediatePropagationStopped: returnFalse
+};
+
+// Create mouseenter/leave events using mouseover/out and event-time checks
+jQuery.each({
+ mouseenter: "mouseover",
+ mouseleave: "mouseout"
+}, function( orig, fix ) {
+ jQuery.event.special[ orig ] = {
+ delegateType: fix,
+ bindType: fix,
+
+ handle: function( event ) {
+ var target = this,
+ related = event.relatedTarget,
+ handleObj = event.handleObj,
+ selector = handleObj.selector,
+ ret;
+
+ // For mousenter/leave call the handler if related is outside the target.
+ // NB: No relatedTarget if the mouse left/entered the browser window
+ if ( !related || (related !== target && !jQuery.contains( target, related )) ) {
+ event.type = handleObj.origType;
+ ret = handleObj.handler.apply( this, arguments );
+ event.type = fix;
+ }
+ return ret;
+ }
+ };
+});
+
+// IE submit delegation
+if ( !jQuery.support.submitBubbles ) {
+
+ jQuery.event.special.submit = {
+ setup: function() {
+ // Only need this for delegated form submit events
+ if ( jQuery.nodeName( this, "form" ) ) {
+ return false;
+ }
+
+ // Lazy-add a submit handler when a descendant form may potentially be submitted
+ jQuery.event.add( this, "click._submit keypress._submit", function( e ) {
+ // Node name check avoids a VML-related crash in IE (#9807)
+ var elem = e.target,
+ form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.form : undefined;
+ if ( form && !form._submit_attached ) {
+ jQuery.event.add( form, "submit._submit", function( event ) {
+ event._submit_bubble = true;
+ });
+ form._submit_attached = true;
+ }
+ });
+ // return undefined since we don't need an event listener
+ },
+
+ postDispatch: function( event ) {
+ // If form was submitted by the user, bubble the event up the tree
+ if ( event._submit_bubble ) {
+ delete event._submit_bubble;
+ if ( this.parentNode && !event.isTrigger ) {
+ jQuery.event.simulate( "submit", this.parentNode, event, true );
+ }
+ }
+ },
+
+ teardown: function() {
+ // Only need this for delegated form submit events
+ if ( jQuery.nodeName( this, "form" ) ) {
+ return false;
+ }
+
+ // Remove delegated handlers; cleanData eventually reaps submit handlers attached above
+ jQuery.event.remove( this, "._submit" );
+ }
+ };
+}
+
+// IE change delegation and checkbox/radio fix
+if ( !jQuery.support.changeBubbles ) {
+
+ jQuery.event.special.change = {
+
+ setup: function() {
+
+ if ( rformElems.test( this.nodeName ) ) {
+ // IE doesn't fire change on a check/radio until blur; trigger it on click
+ // after a propertychange. Eat the blur-change in special.change.handle.
+ // This still fires onchange a second time for check/radio after blur.
+ if ( this.type === "checkbox" || this.type === "radio" ) {
+ jQuery.event.add( this, "propertychange._change", function( event ) {
+ if ( event.originalEvent.propertyName === "checked" ) {
+ this._just_changed = true;
+ }
+ });
+ jQuery.event.add( this, "click._change", function( event ) {
+ if ( this._just_changed && !event.isTrigger ) {
+ this._just_changed = false;
+ jQuery.event.simulate( "change", this, event, true );
+ }
+ });
+ }
+ return false;
+ }
+ // Delegated event; lazy-add a change handler on descendant inputs
+ jQuery.event.add( this, "beforeactivate._change", function( e ) {
+ var elem = e.target;
+
+ if ( rformElems.test( elem.nodeName ) && !elem._change_attached ) {
+ jQuery.event.add( elem, "change._change", function( event ) {
+ if ( this.parentNode && !event.isSimulated && !event.isTrigger ) {
+ jQuery.event.simulate( "change", this.parentNode, event, true );
+ }
+ });
+ elem._change_attached = true;
+ }
+ });
+ },
+
+ handle: function( event ) {
+ var elem = event.target;
+
+ // Swallow native change events from checkbox/radio, we already triggered them above
+ if ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== "radio" && elem.type !== "checkbox") ) {
+ return event.handleObj.handler.apply( this, arguments );
+ }
+ },
+
+ teardown: function() {
+ jQuery.event.remove( this, "._change" );
+
+ return rformElems.test( this.nodeName );
+ }
+ };
+}
+
+// Create "bubbling" focus and blur events
+if ( !jQuery.support.focusinBubbles ) {
+ jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) {
+
+ // Attach a single capturing handler while someone wants focusin/focusout
+ var attaches = 0,
+ handler = function( event ) {
+ jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true );
+ };
+
+ jQuery.event.special[ fix ] = {
+ setup: function() {
+ if ( attaches++ === 0 ) {
+ document.addEventListener( orig, handler, true );
+ }
+ },
+ teardown: function() {
+ if ( --attaches === 0 ) {
+ document.removeEventListener( orig, handler, true );
+ }
+ }
+ };
+ });
+}
+
+jQuery.fn.extend({
+
+ on: function( types, selector, data, fn, /*INTERNAL*/ one ) {
+ var origFn, type;
+
+ // Types can be a map of types/handlers
+ if ( typeof types === "object" ) {
+ // ( types-Object, selector, data )
+ if ( typeof selector !== "string" ) { // && selector != null
+ // ( types-Object, data )
+ data = data || selector;
+ selector = undefined;
+ }
+ for ( type in types ) {
+ this.on( type, selector, data, types[ type ], one );
+ }
+ return this;
+ }
+
+ if ( data == null && fn == null ) {
+ // ( types, fn )
+ fn = selector;
+ data = selector = undefined;
+ } else if ( fn == null ) {
+ if ( typeof selector === "string" ) {
+ // ( types, selector, fn )
+ fn = data;
+ data = undefined;
+ } else {
+ // ( types, data, fn )
+ fn = data;
+ data = selector;
+ selector = undefined;
+ }
+ }
+ if ( fn === false ) {
+ fn = returnFalse;
+ } else if ( !fn ) {
+ return this;
+ }
+
+ if ( one === 1 ) {
+ origFn = fn;
+ fn = function( event ) {
+ // Can use an empty set, since event contains the info
+ jQuery().off( event );
+ return origFn.apply( this, arguments );
+ };
+ // Use same guid so caller can remove using origFn
+ fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );
+ }
+ return this.each( function() {
+ jQuery.event.add( this, types, fn, data, selector );
+ });
+ },
+ one: function( types, selector, data, fn ) {
+ return this.on( types, selector, data, fn, 1 );
+ },
+ off: function( types, selector, fn ) {
+ if ( types && types.preventDefault && types.handleObj ) {
+ // ( event ) dispatched jQuery.Event
+ var handleObj = types.handleObj;
+ jQuery( types.delegateTarget ).off(
+ handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType,
+ handleObj.selector,
+ handleObj.handler
+ );
+ return this;
+ }
+ if ( typeof types === "object" ) {
+ // ( types-object [, selector] )
+ for ( var type in types ) {
+ this.off( type, selector, types[ type ] );
+ }
+ return this;
+ }
+ if ( selector === false || typeof selector === "function" ) {
+ // ( types [, fn] )
+ fn = selector;
+ selector = undefined;
+ }
+ if ( fn === false ) {
+ fn = returnFalse;
+ }
+ return this.each(function() {
+ jQuery.event.remove( this, types, fn, selector );
+ });
+ },
+
+ bind: function( types, data, fn ) {
+ return this.on( types, null, data, fn );
+ },
+ unbind: function( types, fn ) {
+ return this.off( types, null, fn );
+ },
+
+ live: function( types, data, fn ) {
+ jQuery( this.context ).on( types, this.selector, data, fn );
+ return this;
+ },
+ die: function( types, fn ) {
+ jQuery( this.context ).off( types, this.selector || "**", fn );
+ return this;
+ },
+
+ delegate: function( selector, types, data, fn ) {
+ return this.on( types, selector, data, fn );
+ },
+ undelegate: function( selector, types, fn ) {
+ // ( namespace ) or ( selector, types [, fn] )
+ return arguments.length == 1? this.off( selector, "**" ) : this.off( types, selector, fn );
+ },
+
+ trigger: function( type, data ) {
+ return this.each(function() {
+ jQuery.event.trigger( type, data, this );
+ });
+ },
+ triggerHandler: function( type, data ) {
+ if ( this[0] ) {
+ return jQuery.event.trigger( type, data, this[0], true );
+ }
+ },
+
+ toggle: function( fn ) {
+ // Save reference to arguments for access in closure
+ var args = arguments,
+ guid = fn.guid || jQuery.guid++,
+ i = 0,
+ toggler = function( event ) {
+ // Figure out which function to execute
+ var lastToggle = ( jQuery._data( this, "lastToggle" + fn.guid ) || 0 ) % i;
+ jQuery._data( this, "lastToggle" + fn.guid, lastToggle + 1 );
+
+ // Make sure that clicks stop
+ event.preventDefault();
+
+ // and execute the function
+ return args[ lastToggle ].apply( this, arguments ) || false;
+ };
+
+ // link all the functions, so any of them can unbind this click handler
+ toggler.guid = guid;
+ while ( i < args.length ) {
+ args[ i++ ].guid = guid;
+ }
+
+ return this.click( toggler );
+ },
+
+ hover: function( fnOver, fnOut ) {
+ return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );
+ }
+});
+
+jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " +
+ "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
+ "change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) {
+
+ // Handle event binding
+ jQuery.fn[ name ] = function( data, fn ) {
+ if ( fn == null ) {
+ fn = data;
+ data = null;
+ }
+
+ return arguments.length > 0 ?
+ this.on( name, null, data, fn ) :
+ this.trigger( name );
+ };
+
+ if ( jQuery.attrFn ) {
+ jQuery.attrFn[ name ] = true;
+ }
+
+ if ( rkeyEvent.test( name ) ) {
+ jQuery.event.fixHooks[ name ] = jQuery.event.keyHooks;
+ }
+
+ if ( rmouseEvent.test( name ) ) {
+ jQuery.event.fixHooks[ name ] = jQuery.event.mouseHooks;
+ }
+});
+
+
+
+/*!
+ * Sizzle CSS Selector Engine
+ * Copyright 2011, The Dojo Foundation
+ * Released under the MIT, BSD, and GPL Licenses.
+ * More information: http://sizzlejs.com/
+ */
+(function(){
+
+var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,
+ expando = "sizcache" + (Math.random() + '').replace('.', ''),
+ done = 0,
+ toString = Object.prototype.toString,
+ hasDuplicate = false,
+ baseHasDuplicate = true,
+ rBackslash = /\\/g,
+ rReturn = /\r\n/g,
+ rNonWord = /\W/;
+
+// Here we check if the JavaScript engine is using some sort of
+// optimization where it does not always call our comparision
+// function. If that is the case, discard the hasDuplicate value.
+// Thus far that includes Google Chrome.
+[0, 0].sort(function() {
+ baseHasDuplicate = false;
+ return 0;
+});
+
+var Sizzle = function( selector, context, results, seed ) {
+ results = results || [];
+ context = context || document;
+
+ var origContext = context;
+
+ if ( context.nodeType !== 1 && context.nodeType !== 9 ) {
+ return [];
+ }
+
+ if ( !selector || typeof selector !== "string" ) {
+ return results;
+ }
+
+ var m, set, checkSet, extra, ret, cur, pop, i,
+ prune = true,
+ contextXML = Sizzle.isXML( context ),
+ parts = [],
+ soFar = selector;
+
+ // Reset the position of the chunker regexp (start from head)
+ do {
+ chunker.exec( "" );
+ m = chunker.exec( soFar );
+
+ if ( m ) {
+ soFar = m[3];
+
+ parts.push( m[1] );
+
+ if ( m[2] ) {
+ extra = m[3];
+ break;
+ }
+ }
+ } while ( m );
+
+ if ( parts.length > 1 && origPOS.exec( selector ) ) {
+
+ if ( parts.length === 2 && Expr.relative[ parts[0] ] ) {
+ set = posProcess( parts[0] + parts[1], context, seed );
+
+ } else {
+ set = Expr.relative[ parts[0] ] ?
+ [ context ] :
+ Sizzle( parts.shift(), context );
+
+ while ( parts.length ) {
+ selector = parts.shift();
+
+ if ( Expr.relative[ selector ] ) {
+ selector += parts.shift();
+ }
+
+ set = posProcess( selector, set, seed );
+ }
+ }
+
+ } else {
+ // Take a shortcut and set the context if the root selector is an ID
+ // (but not if it'll be faster if the inner selector is an ID)
+ if ( !seed && parts.length > 1 && context.nodeType === 9 && !contextXML &&
+ Expr.match.ID.test(parts[0]) && !Expr.match.ID.test(parts[parts.length - 1]) ) {
+
+ ret = Sizzle.find( parts.shift(), context, contextXML );
+ context = ret.expr ?
+ Sizzle.filter( ret.expr, ret.set )[0] :
+ ret.set[0];
+ }
+
+ if ( context ) {
+ ret = seed ?
+ { expr: parts.pop(), set: makeArray(seed) } :
+ Sizzle.find( parts.pop(), parts.length === 1 && (parts[0] === "~" || parts[0] === "+") && context.parentNode ? context.parentNode : context, contextXML );
+
+ set = ret.expr ?
+ Sizzle.filter( ret.expr, ret.set ) :
+ ret.set;
+
+ if ( parts.length > 0 ) {
+ checkSet = makeArray( set );
+
+ } else {
+ prune = false;
+ }
+
+ while ( parts.length ) {
+ cur = parts.pop();
+ pop = cur;
+
+ if ( !Expr.relative[ cur ] ) {
+ cur = "";
+ } else {
+ pop = parts.pop();
+ }
+
+ if ( pop == null ) {
+ pop = context;
+ }
+
+ Expr.relative[ cur ]( checkSet, pop, contextXML );
+ }
+
+ } else {
+ checkSet = parts = [];
+ }
+ }
+
+ if ( !checkSet ) {
+ checkSet = set;
+ }
+
+ if ( !checkSet ) {
+ Sizzle.error( cur || selector );
+ }
+
+ if ( toString.call(checkSet) === "[object Array]" ) {
+ if ( !prune ) {
+ results.push.apply( results, checkSet );
+
+ } else if ( context && context.nodeType === 1 ) {
+ for ( i = 0; checkSet[i] != null; i++ ) {
+ if ( checkSet[i] && (checkSet[i] === true || checkSet[i].nodeType === 1 && Sizzle.contains(context, checkSet[i])) ) {
+ results.push( set[i] );
+ }
+ }
+
+ } else {
+ for ( i = 0; checkSet[i] != null; i++ ) {
+ if ( checkSet[i] && checkSet[i].nodeType === 1 ) {
+ results.push( set[i] );
+ }
+ }
+ }
+
+ } else {
+ makeArray( checkSet, results );
+ }
+
+ if ( extra ) {
+ Sizzle( extra, origContext, results, seed );
+ Sizzle.uniqueSort( results );
+ }
+
+ return results;
+};
+
+Sizzle.uniqueSort = function( results ) {
+ if ( sortOrder ) {
+ hasDuplicate = baseHasDuplicate;
+ results.sort( sortOrder );
+
+ if ( hasDuplicate ) {
+ for ( var i = 1; i < results.length; i++ ) {
+ if ( results[i] === results[ i - 1 ] ) {
+ results.splice( i--, 1 );
+ }
+ }
+ }
+ }
+
+ return results;
+};
+
+Sizzle.matches = function( expr, set ) {
+ return Sizzle( expr, null, null, set );
+};
+
+Sizzle.matchesSelector = function( node, expr ) {
+ return Sizzle( expr, null, null, [node] ).length > 0;
+};
+
+Sizzle.find = function( expr, context, isXML ) {
+ var set, i, len, match, type, left;
+
+ if ( !expr ) {
+ return [];
+ }
+
+ for ( i = 0, len = Expr.order.length; i < len; i++ ) {
+ type = Expr.order[i];
+
+ if ( (match = Expr.leftMatch[ type ].exec( expr )) ) {
+ left = match[1];
+ match.splice( 1, 1 );
+
+ if ( left.substr( left.length - 1 ) !== "\\" ) {
+ match[1] = (match[1] || "").replace( rBackslash, "" );
+ set = Expr.find[ type ]( match, context, isXML );
+
+ if ( set != null ) {
+ expr = expr.replace( Expr.match[ type ], "" );
+ break;
+ }
+ }
+ }
+ }
+
+ if ( !set ) {
+ set = typeof context.getElementsByTagName !== "undefined" ?
+ context.getElementsByTagName( "*" ) :
+ [];
+ }
+
+ return { set: set, expr: expr };
+};
+
+Sizzle.filter = function( expr, set, inplace, not ) {
+ var match, anyFound,
+ type, found, item, filter, left,
+ i, pass,
+ old = expr,
+ result = [],
+ curLoop = set,
+ isXMLFilter = set && set[0] && Sizzle.isXML( set[0] );
+
+ while ( expr && set.length ) {
+ for ( type in Expr.filter ) {
+ if ( (match = Expr.leftMatch[ type ].exec( expr )) != null && match[2] ) {
+ filter = Expr.filter[ type ];
+ left = match[1];
+
+ anyFound = false;
+
+ match.splice(1,1);
+
+ if ( left.substr( left.length - 1 ) === "\\" ) {
+ continue;
+ }
+
+ if ( curLoop === result ) {
+ result = [];
+ }
+
+ if ( Expr.preFilter[ type ] ) {
+ match = Expr.preFilter[ type ]( match, curLoop, inplace, result, not, isXMLFilter );
+
+ if ( !match ) {
+ anyFound = found = true;
+
+ } else if ( match === true ) {
+ continue;
+ }
+ }
+
+ if ( match ) {
+ for ( i = 0; (item = curLoop[i]) != null; i++ ) {
+ if ( item ) {
+ found = filter( item, match, i, curLoop );
+ pass = not ^ found;
+
+ if ( inplace && found != null ) {
+ if ( pass ) {
+ anyFound = true;
+
+ } else {
+ curLoop[i] = false;
+ }
+
+ } else if ( pass ) {
+ result.push( item );
+ anyFound = true;
+ }
+ }
+ }
+ }
+
+ if ( found !== undefined ) {
+ if ( !inplace ) {
+ curLoop = result;
+ }
+
+ expr = expr.replace( Expr.match[ type ], "" );
+
+ if ( !anyFound ) {
+ return [];
+ }
+
+ break;
+ }
+ }
+ }
+
+ // Improper expression
+ if ( expr === old ) {
+ if ( anyFound == null ) {
+ Sizzle.error( expr );
+
+ } else {
+ break;
+ }
+ }
+
+ old = expr;
+ }
+
+ return curLoop;
+};
+
+Sizzle.error = function( msg ) {
+ throw new Error( "Syntax error, unrecognized expression: " + msg );
+};
+
+/**
+ * Utility function for retreiving the text value of an array of DOM nodes
+ * @param {Array|Element} elem
+ */
+var getText = Sizzle.getText = function( elem ) {
+ var i, node,
+ nodeType = elem.nodeType,
+ ret = "";
+
+ if ( nodeType ) {
+ if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {
+ // Use textContent || innerText for elements
+ if ( typeof elem.textContent === 'string' ) {
+ return elem.textContent;
+ } else if ( typeof elem.innerText === 'string' ) {
+ // Replace IE's carriage returns
+ return elem.innerText.replace( rReturn, '' );
+ } else {
+ // Traverse it's children
+ for ( elem = elem.firstChild; elem; elem = elem.nextSibling) {
+ ret += getText( elem );
+ }
+ }
+ } else if ( nodeType === 3 || nodeType === 4 ) {
+ return elem.nodeValue;
+ }
+ } else {
+
+ // If no nodeType, this is expected to be an array
+ for ( i = 0; (node = elem[i]); i++ ) {
+ // Do not traverse comment nodes
+ if ( node.nodeType !== 8 ) {
+ ret += getText( node );
+ }
+ }
+ }
+ return ret;
+};
+
+var Expr = Sizzle.selectors = {
+ order: [ "ID", "NAME", "TAG" ],
+
+ match: {
+ ID: /#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,
+ CLASS: /\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,
+ NAME: /\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,
+ ATTR: /\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,
+ TAG: /^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,
+ CHILD: /:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,
+ POS: /:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,
+ PSEUDO: /:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/
+ },
+
+ leftMatch: {},
+
+ attrMap: {
+ "class": "className",
+ "for": "htmlFor"
+ },
+
+ attrHandle: {
+ href: function( elem ) {
+ return elem.getAttribute( "href" );
+ },
+ type: function( elem ) {
+ return elem.getAttribute( "type" );
+ }
+ },
+
+ relative: {
+ "+": function(checkSet, part){
+ var isPartStr = typeof part === "string",
+ isTag = isPartStr && !rNonWord.test( part ),
+ isPartStrNotTag = isPartStr && !isTag;
+
+ if ( isTag ) {
+ part = part.toLowerCase();
+ }
+
+ for ( var i = 0, l = checkSet.length, elem; i < l; i++ ) {
+ if ( (elem = checkSet[i]) ) {
+ while ( (elem = elem.previousSibling) && elem.nodeType !== 1 ) {}
+
+ checkSet[i] = isPartStrNotTag || elem && elem.nodeName.toLowerCase() === part ?
+ elem || false :
+ elem === part;
+ }
+ }
+
+ if ( isPartStrNotTag ) {
+ Sizzle.filter( part, checkSet, true );
+ }
+ },
+
+ ">": function( checkSet, part ) {
+ var elem,
+ isPartStr = typeof part === "string",
+ i = 0,
+ l = checkSet.length;
+
+ if ( isPartStr && !rNonWord.test( part ) ) {
+ part = part.toLowerCase();
+
+ for ( ; i < l; i++ ) {
+ elem = checkSet[i];
+
+ if ( elem ) {
+ var parent = elem.parentNode;
+ checkSet[i] = parent.nodeName.toLowerCase() === part ? parent : false;
+ }
+ }
+
+ } else {
+ for ( ; i < l; i++ ) {
+ elem = checkSet[i];
+
+ if ( elem ) {
+ checkSet[i] = isPartStr ?
+ elem.parentNode :
+ elem.parentNode === part;
+ }
+ }
+
+ if ( isPartStr ) {
+ Sizzle.filter( part, checkSet, true );
+ }
+ }
+ },
+
+ "": function(checkSet, part, isXML){
+ var nodeCheck,
+ doneName = done++,
+ checkFn = dirCheck;
+
+ if ( typeof part === "string" && !rNonWord.test( part ) ) {
+ part = part.toLowerCase();
+ nodeCheck = part;
+ checkFn = dirNodeCheck;
+ }
+
+ checkFn( "parentNode", part, doneName, checkSet, nodeCheck, isXML );
+ },
+
+ "~": function( checkSet, part, isXML ) {
+ var nodeCheck,
+ doneName = done++,
+ checkFn = dirCheck;
+
+ if ( typeof part === "string" && !rNonWord.test( part ) ) {
+ part = part.toLowerCase();
+ nodeCheck = part;
+ checkFn = dirNodeCheck;
+ }
+
+ checkFn( "previousSibling", part, doneName, checkSet, nodeCheck, isXML );
+ }
+ },
+
+ find: {
+ ID: function( match, context, isXML ) {
+ if ( typeof context.getElementById !== "undefined" && !isXML ) {
+ var m = context.getElementById(match[1]);
+ // Check parentNode to catch when Blackberry 4.6 returns
+ // nodes that are no longer in the document #6963
+ return m && m.parentNode ? [m] : [];
+ }
+ },
+
+ NAME: function( match, context ) {
+ if ( typeof context.getElementsByName !== "undefined" ) {
+ var ret = [],
+ results = context.getElementsByName( match[1] );
+
+ for ( var i = 0, l = results.length; i < l; i++ ) {
+ if ( results[i].getAttribute("name") === match[1] ) {
+ ret.push( results[i] );
+ }
+ }
+
+ return ret.length === 0 ? null : ret;
+ }
+ },
+
+ TAG: function( match, context ) {
+ if ( typeof context.getElementsByTagName !== "undefined" ) {
+ return context.getElementsByTagName( match[1] );
+ }
+ }
+ },
+ preFilter: {
+ CLASS: function( match, curLoop, inplace, result, not, isXML ) {
+ match = " " + match[1].replace( rBackslash, "" ) + " ";
+
+ if ( isXML ) {
+ return match;
+ }
+
+ for ( var i = 0, elem; (elem = curLoop[i]) != null; i++ ) {
+ if ( elem ) {
+ if ( not ^ (elem.className && (" " + elem.className + " ").replace(/[\t\n\r]/g, " ").indexOf(match) >= 0) ) {
+ if ( !inplace ) {
+ result.push( elem );
+ }
+
+ } else if ( inplace ) {
+ curLoop[i] = false;
+ }
+ }
+ }
+
+ return false;
+ },
+
+ ID: function( match ) {
+ return match[1].replace( rBackslash, "" );
+ },
+
+ TAG: function( match, curLoop ) {
+ return match[1].replace( rBackslash, "" ).toLowerCase();
+ },
+
+ CHILD: function( match ) {
+ if ( match[1] === "nth" ) {
+ if ( !match[2] ) {
+ Sizzle.error( match[0] );
+ }
+
+ match[2] = match[2].replace(/^\+|\s*/g, '');
+
+ // parse equations like 'even', 'odd', '5', '2n', '3n+2', '4n-1', '-n+6'
+ var test = /(-?)(\d*)(?:n([+\-]?\d*))?/.exec(
+ match[2] === "even" && "2n" || match[2] === "odd" && "2n+1" ||
+ !/\D/.test( match[2] ) && "0n+" + match[2] || match[2]);
+
+ // calculate the numbers (first)n+(last) including if they are negative
+ match[2] = (test[1] + (test[2] || 1)) - 0;
+ match[3] = test[3] - 0;
+ }
+ else if ( match[2] ) {
+ Sizzle.error( match[0] );
+ }
+
+ // TODO: Move to normal caching system
+ match[0] = done++;
+
+ return match;
+ },
+
+ ATTR: function( match, curLoop, inplace, result, not, isXML ) {
+ var name = match[1] = match[1].replace( rBackslash, "" );
+
+ if ( !isXML && Expr.attrMap[name] ) {
+ match[1] = Expr.attrMap[name];
+ }
+
+ // Handle if an un-quoted value was used
+ match[4] = ( match[4] || match[5] || "" ).replace( rBackslash, "" );
+
+ if ( match[2] === "~=" ) {
+ match[4] = " " + match[4] + " ";
+ }
+
+ return match;
+ },
+
+ PSEUDO: function( match, curLoop, inplace, result, not ) {
+ if ( match[1] === "not" ) {
+ // If we're dealing with a complex expression, or a simple one
+ if ( ( chunker.exec(match[3]) || "" ).length > 1 || /^\w/.test(match[3]) ) {
+ match[3] = Sizzle(match[3], null, null, curLoop);
+
+ } else {
+ var ret = Sizzle.filter(match[3], curLoop, inplace, true ^ not);
+
+ if ( !inplace ) {
+ result.push.apply( result, ret );
+ }
+
+ return false;
+ }
+
+ } else if ( Expr.match.POS.test( match[0] ) || Expr.match.CHILD.test( match[0] ) ) {
+ return true;
+ }
+
+ return match;
+ },
+
+ POS: function( match ) {
+ match.unshift( true );
+
+ return match;
+ }
+ },
+
+ filters: {
+ enabled: function( elem ) {
+ return elem.disabled === false && elem.type !== "hidden";
+ },
+
+ disabled: function( elem ) {
+ return elem.disabled === true;
+ },
+
+ checked: function( elem ) {
+ return elem.checked === true;
+ },
+
+ selected: function( elem ) {
+ // Accessing this property makes selected-by-default
+ // options in Safari work properly
+ if ( elem.parentNode ) {
+ elem.parentNode.selectedIndex;
+ }
+
+ return elem.selected === true;
+ },
+
+ parent: function( elem ) {
+ return !!elem.firstChild;
+ },
+
+ empty: function( elem ) {
+ return !elem.firstChild;
+ },
+
+ has: function( elem, i, match ) {
+ return !!Sizzle( match[3], elem ).length;
+ },
+
+ header: function( elem ) {
+ return (/h\d/i).test( elem.nodeName );
+ },
+
+ text: function( elem ) {
+ var attr = elem.getAttribute( "type" ), type = elem.type;
+ // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc)
+ // use getAttribute instead to test this case
+ return elem.nodeName.toLowerCase() === "input" && "text" === type && ( attr === type || attr === null );
+ },
+
+ radio: function( elem ) {
+ return elem.nodeName.toLowerCase() === "input" && "radio" === elem.type;
+ },
+
+ checkbox: function( elem ) {
+ return elem.nodeName.toLowerCase() === "input" && "checkbox" === elem.type;
+ },
+
+ file: function( elem ) {
+ return elem.nodeName.toLowerCase() === "input" && "file" === elem.type;
+ },
+
+ password: function( elem ) {
+ return elem.nodeName.toLowerCase() === "input" && "password" === elem.type;
+ },
+
+ submit: function( elem ) {
+ var name = elem.nodeName.toLowerCase();
+ return (name === "input" || name === "button") && "submit" === elem.type;
+ },
+
+ image: function( elem ) {
+ return elem.nodeName.toLowerCase() === "input" && "image" === elem.type;
+ },
+
+ reset: function( elem ) {
+ var name = elem.nodeName.toLowerCase();
+ return (name === "input" || name === "button") && "reset" === elem.type;
+ },
+
+ button: function( elem ) {
+ var name = elem.nodeName.toLowerCase();
+ return name === "input" && "button" === elem.type || name === "button";
+ },
+
+ input: function( elem ) {
+ return (/input|select|textarea|button/i).test( elem.nodeName );
+ },
+
+ focus: function( elem ) {
+ return elem === elem.ownerDocument.activeElement;
+ }
+ },
+ setFilters: {
+ first: function( elem, i ) {
+ return i === 0;
+ },
+
+ last: function( elem, i, match, array ) {
+ return i === array.length - 1;
+ },
+
+ even: function( elem, i ) {
+ return i % 2 === 0;
+ },
+
+ odd: function( elem, i ) {
+ return i % 2 === 1;
+ },
+
+ lt: function( elem, i, match ) {
+ return i < match[3] - 0;
+ },
+
+ gt: function( elem, i, match ) {
+ return i > match[3] - 0;
+ },
+
+ nth: function( elem, i, match ) {
+ return match[3] - 0 === i;
+ },
+
+ eq: function( elem, i, match ) {
+ return match[3] - 0 === i;
+ }
+ },
+ filter: {
+ PSEUDO: function( elem, match, i, array ) {
+ var name = match[1],
+ filter = Expr.filters[ name ];
+
+ if ( filter ) {
+ return filter( elem, i, match, array );
+
+ } else if ( name === "contains" ) {
+ return (elem.textContent || elem.innerText || getText([ elem ]) || "").indexOf(match[3]) >= 0;
+
+ } else if ( name === "not" ) {
+ var not = match[3];
+
+ for ( var j = 0, l = not.length; j < l; j++ ) {
+ if ( not[j] === elem ) {
+ return false;
+ }
+ }
+
+ return true;
+
+ } else {
+ Sizzle.error( name );
+ }
+ },
+
+ CHILD: function( elem, match ) {
+ var first, last,
+ doneName, parent, cache,
+ count, diff,
+ type = match[1],
+ node = elem;
+
+ switch ( type ) {
+ case "only":
+ case "first":
+ while ( (node = node.previousSibling) ) {
+ if ( node.nodeType === 1 ) {
+ return false;
+ }
+ }
+
+ if ( type === "first" ) {
+ return true;
+ }
+
+ node = elem;
+
+ /* falls through */
+ case "last":
+ while ( (node = node.nextSibling) ) {
+ if ( node.nodeType === 1 ) {
+ return false;
+ }
+ }
+
+ return true;
+
+ case "nth":
+ first = match[2];
+ last = match[3];
+
+ if ( first === 1 && last === 0 ) {
+ return true;
+ }
+
+ doneName = match[0];
+ parent = elem.parentNode;
+
+ if ( parent && (parent[ expando ] !== doneName || !elem.nodeIndex) ) {
+ count = 0;
+
+ for ( node = parent.firstChild; node; node = node.nextSibling ) {
+ if ( node.nodeType === 1 ) {
+ node.nodeIndex = ++count;
+ }
+ }
+
+ parent[ expando ] = doneName;
+ }
+
+ diff = elem.nodeIndex - last;
+
+ if ( first === 0 ) {
+ return diff === 0;
+
+ } else {
+ return ( diff % first === 0 && diff / first >= 0 );
+ }
+ }
+ },
+
+ ID: function( elem, match ) {
+ return elem.nodeType === 1 && elem.getAttribute("id") === match;
+ },
+
+ TAG: function( elem, match ) {
+ return (match === "*" && elem.nodeType === 1) || !!elem.nodeName && elem.nodeName.toLowerCase() === match;
+ },
+
+ CLASS: function( elem, match ) {
+ return (" " + (elem.className || elem.getAttribute("class")) + " ")
+ .indexOf( match ) > -1;
+ },
+
+ ATTR: function( elem, match ) {
+ var name = match[1],
+ result = Sizzle.attr ?
+ Sizzle.attr( elem, name ) :
+ Expr.attrHandle[ name ] ?
+ Expr.attrHandle[ name ]( elem ) :
+ elem[ name ] != null ?
+ elem[ name ] :
+ elem.getAttribute( name ),
+ value = result + "",
+ type = match[2],
+ check = match[4];
+
+ return result == null ?
+ type === "!=" :
+ !type && Sizzle.attr ?
+ result != null :
+ type === "=" ?
+ value === check :
+ type === "*=" ?
+ value.indexOf(check) >= 0 :
+ type === "~=" ?
+ (" " + value + " ").indexOf(check) >= 0 :
+ !check ?
+ value && result !== false :
+ type === "!=" ?
+ value !== check :
+ type === "^=" ?
+ value.indexOf(check) === 0 :
+ type === "$=" ?
+ value.substr(value.length - check.length) === check :
+ type === "|=" ?
+ value === check || value.substr(0, check.length + 1) === check + "-" :
+ false;
+ },
+
+ POS: function( elem, match, i, array ) {
+ var name = match[2],
+ filter = Expr.setFilters[ name ];
+
+ if ( filter ) {
+ return filter( elem, i, match, array );
+ }
+ }
+ }
+};
+
+var origPOS = Expr.match.POS,
+ fescape = function(all, num){
+ return "\\" + (num - 0 + 1);
+ };
+
+for ( var type in Expr.match ) {
+ Expr.match[ type ] = new RegExp( Expr.match[ type ].source + (/(?![^\[]*\])(?![^\(]*\))/.source) );
+ Expr.leftMatch[ type ] = new RegExp( /(^(?:.|\r|\n)*?)/.source + Expr.match[ type ].source.replace(/\\(\d+)/g, fescape) );
+}
+// Expose origPOS
+// "global" as in regardless of relation to brackets/parens
+Expr.match.globalPOS = origPOS;
+
+var makeArray = function( array, results ) {
+ array = Array.prototype.slice.call( array, 0 );
+
+ if ( results ) {
+ results.push.apply( results, array );
+ return results;
+ }
+
+ return array;
+};
+
+// Perform a simple check to determine if the browser is capable of
+// converting a NodeList to an array using builtin methods.
+// Also verifies that the returned array holds DOM nodes
+// (which is not the case in the Blackberry browser)
+try {
+ Array.prototype.slice.call( document.documentElement.childNodes, 0 )[0].nodeType;
+
+// Provide a fallback method if it does not work
+} catch( e ) {
+ makeArray = function( array, results ) {
+ var i = 0,
+ ret = results || [];
+
+ if ( toString.call(array) === "[object Array]" ) {
+ Array.prototype.push.apply( ret, array );
+
+ } else {
+ if ( typeof array.length === "number" ) {
+ for ( var l = array.length; i < l; i++ ) {
+ ret.push( array[i] );
+ }
+
+ } else {
+ for ( ; array[i]; i++ ) {
+ ret.push( array[i] );
+ }
+ }
+ }
+
+ return ret;
+ };
+}
+
+var sortOrder, siblingCheck;
+
+if ( document.documentElement.compareDocumentPosition ) {
+ sortOrder = function( a, b ) {
+ if ( a === b ) {
+ hasDuplicate = true;
+ return 0;
+ }
+
+ if ( !a.compareDocumentPosition || !b.compareDocumentPosition ) {
+ return a.compareDocumentPosition ? -1 : 1;
+ }
+
+ return a.compareDocumentPosition(b) & 4 ? -1 : 1;
+ };
+
+} else {
+ sortOrder = function( a, b ) {
+ // The nodes are identical, we can exit early
+ if ( a === b ) {
+ hasDuplicate = true;
+ return 0;
+
+ // Fallback to using sourceIndex (in IE) if it's available on both nodes
+ } else if ( a.sourceIndex && b.sourceIndex ) {
+ return a.sourceIndex - b.sourceIndex;
+ }
+
+ var al, bl,
+ ap = [],
+ bp = [],
+ aup = a.parentNode,
+ bup = b.parentNode,
+ cur = aup;
+
+ // If the nodes are siblings (or identical) we can do a quick check
+ if ( aup === bup ) {
+ return siblingCheck( a, b );
+
+ // If no parents were found then the nodes are disconnected
+ } else if ( !aup ) {
+ return -1;
+
+ } else if ( !bup ) {
+ return 1;
+ }
+
+ // Otherwise they're somewhere else in the tree so we need
+ // to build up a full list of the parentNodes for comparison
+ while ( cur ) {
+ ap.unshift( cur );
+ cur = cur.parentNode;
+ }
+
+ cur = bup;
+
+ while ( cur ) {
+ bp.unshift( cur );
+ cur = cur.parentNode;
+ }
+
+ al = ap.length;
+ bl = bp.length;
+
+ // Start walking down the tree looking for a discrepancy
+ for ( var i = 0; i < al && i < bl; i++ ) {
+ if ( ap[i] !== bp[i] ) {
+ return siblingCheck( ap[i], bp[i] );
+ }
+ }
+
+ // We ended someplace up the tree so do a sibling check
+ return i === al ?
+ siblingCheck( a, bp[i], -1 ) :
+ siblingCheck( ap[i], b, 1 );
+ };
+
+ siblingCheck = function( a, b, ret ) {
+ if ( a === b ) {
+ return ret;
+ }
+
+ var cur = a.nextSibling;
+
+ while ( cur ) {
+ if ( cur === b ) {
+ return -1;
+ }
+
+ cur = cur.nextSibling;
+ }
+
+ return 1;
+ };
+}
+
+// Check to see if the browser returns elements by name when
+// querying by getElementById (and provide a workaround)
+(function(){
+ // We're going to inject a fake input element with a specified name
+ var form = document.createElement("div"),
+ id = "script" + (new Date()).getTime(),
+ root = document.documentElement;
+
+ form.innerHTML = "";
+
+ // Inject it into the root element, check its status, and remove it quickly
+ root.insertBefore( form, root.firstChild );
+
+ // The workaround has to do additional checks after a getElementById
+ // Which slows things down for other browsers (hence the branching)
+ if ( document.getElementById( id ) ) {
+ Expr.find.ID = function( match, context, isXML ) {
+ if ( typeof context.getElementById !== "undefined" && !isXML ) {
+ var m = context.getElementById(match[1]);
+
+ return m ?
+ m.id === match[1] || typeof m.getAttributeNode !== "undefined" && m.getAttributeNode("id").nodeValue === match[1] ?
+ [m] :
+ undefined :
+ [];
+ }
+ };
+
+ Expr.filter.ID = function( elem, match ) {
+ var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id");
+
+ return elem.nodeType === 1 && node && node.nodeValue === match;
+ };
+ }
+
+ root.removeChild( form );
+
+ // release memory in IE
+ root = form = null;
+})();
+
+(function(){
+ // Check to see if the browser returns only elements
+ // when doing getElementsByTagName("*")
+
+ // Create a fake element
+ var div = document.createElement("div");
+ div.appendChild( document.createComment("") );
+
+ // Make sure no comments are found
+ if ( div.getElementsByTagName("*").length > 0 ) {
+ Expr.find.TAG = function( match, context ) {
+ var results = context.getElementsByTagName( match[1] );
+
+ // Filter out possible comments
+ if ( match[1] === "*" ) {
+ var tmp = [];
+
+ for ( var i = 0; results[i]; i++ ) {
+ if ( results[i].nodeType === 1 ) {
+ tmp.push( results[i] );
+ }
+ }
+
+ results = tmp;
+ }
+
+ return results;
+ };
+ }
+
+ // Check to see if an attribute returns normalized href attributes
+ div.innerHTML = "";
+
+ if ( div.firstChild && typeof div.firstChild.getAttribute !== "undefined" &&
+ div.firstChild.getAttribute("href") !== "#" ) {
+
+ Expr.attrHandle.href = function( elem ) {
+ return elem.getAttribute( "href", 2 );
+ };
+ }
+
+ // release memory in IE
+ div = null;
+})();
+
+if ( document.querySelectorAll ) {
+ (function(){
+ var oldSizzle = Sizzle,
+ div = document.createElement("div"),
+ id = "__sizzle__";
+
+ div.innerHTML = "";
+
+ // Safari can't handle uppercase or unicode characters when
+ // in quirks mode.
+ if ( div.querySelectorAll && div.querySelectorAll(".TEST").length === 0 ) {
+ return;
+ }
+
+ Sizzle = function( query, context, extra, seed ) {
+ context = context || document;
+
+ // Only use querySelectorAll on non-XML documents
+ // (ID selectors don't work in non-HTML documents)
+ if ( !seed && !Sizzle.isXML(context) ) {
+ // See if we find a selector to speed up
+ var match = /^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec( query );
+
+ if ( match && (context.nodeType === 1 || context.nodeType === 9) ) {
+ // Speed-up: Sizzle("TAG")
+ if ( match[1] ) {
+ return makeArray( context.getElementsByTagName( query ), extra );
+
+ // Speed-up: Sizzle(".CLASS")
+ } else if ( match[2] && Expr.find.CLASS && context.getElementsByClassName ) {
+ return makeArray( context.getElementsByClassName( match[2] ), extra );
+ }
+ }
+
+ if ( context.nodeType === 9 ) {
+ // Speed-up: Sizzle("body")
+ // The body element only exists once, optimize finding it
+ if ( query === "body" && context.body ) {
+ return makeArray( [ context.body ], extra );
+
+ // Speed-up: Sizzle("#ID")
+ } else if ( match && match[3] ) {
+ var elem = context.getElementById( match[3] );
+
+ // Check parentNode to catch when Blackberry 4.6 returns
+ // nodes that are no longer in the document #6963
+ if ( elem && elem.parentNode ) {
+ // Handle the case where IE and Opera return items
+ // by name instead of ID
+ if ( elem.id === match[3] ) {
+ return makeArray( [ elem ], extra );
+ }
+
+ } else {
+ return makeArray( [], extra );
+ }
+ }
+
+ try {
+ return makeArray( context.querySelectorAll(query), extra );
+ } catch(qsaError) {}
+
+ // qSA works strangely on Element-rooted queries
+ // We can work around this by specifying an extra ID on the root
+ // and working up from there (Thanks to Andrew Dupont for the technique)
+ // IE 8 doesn't work on object elements
+ } else if ( context.nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) {
+ var oldContext = context,
+ old = context.getAttribute( "id" ),
+ nid = old || id,
+ hasParent = context.parentNode,
+ relativeHierarchySelector = /^\s*[+~]/.test( query );
+
+ if ( !old ) {
+ context.setAttribute( "id", nid );
+ } else {
+ nid = nid.replace( /'/g, "\\$&" );
+ }
+ if ( relativeHierarchySelector && hasParent ) {
+ context = context.parentNode;
+ }
+
+ try {
+ if ( !relativeHierarchySelector || hasParent ) {
+ return makeArray( context.querySelectorAll( "[id='" + nid + "'] " + query ), extra );
+ }
+
+ } catch(pseudoError) {
+ } finally {
+ if ( !old ) {
+ oldContext.removeAttribute( "id" );
+ }
+ }
+ }
+ }
+
+ return oldSizzle(query, context, extra, seed);
+ };
+
+ for ( var prop in oldSizzle ) {
+ Sizzle[ prop ] = oldSizzle[ prop ];
+ }
+
+ // release memory in IE
+ div = null;
+ })();
+}
+
+(function(){
+ var html = document.documentElement,
+ matches = html.matchesSelector || html.mozMatchesSelector || html.webkitMatchesSelector || html.msMatchesSelector;
+
+ if ( matches ) {
+ // Check to see if it's possible to do matchesSelector
+ // on a disconnected node (IE 9 fails this)
+ var disconnectedMatch = !matches.call( document.createElement( "div" ), "div" ),
+ pseudoWorks = false;
+
+ try {
+ // This should fail with an exception
+ // Gecko does not error, returns false instead
+ matches.call( document.documentElement, "[test!='']:sizzle" );
+
+ } catch( pseudoError ) {
+ pseudoWorks = true;
+ }
+
+ Sizzle.matchesSelector = function( node, expr ) {
+ // Make sure that attribute selectors are quoted
+ expr = expr.replace(/\=\s*([^'"\]]*)\s*\]/g, "='$1']");
+
+ if ( !Sizzle.isXML( node ) ) {
+ try {
+ if ( pseudoWorks || !Expr.match.PSEUDO.test( expr ) && !/!=/.test( expr ) ) {
+ var ret = matches.call( node, expr );
+
+ // IE 9's matchesSelector returns false on disconnected nodes
+ if ( ret || !disconnectedMatch ||
+ // As well, disconnected nodes are said to be in a document
+ // fragment in IE 9, so check for that
+ node.document && node.document.nodeType !== 11 ) {
+ return ret;
+ }
+ }
+ } catch(e) {}
+ }
+
+ return Sizzle(expr, null, null, [node]).length > 0;
+ };
+ }
+})();
+
+(function(){
+ var div = document.createElement("div");
+
+ div.innerHTML = "";
+
+ // Opera can't find a second classname (in 9.6)
+ // Also, make sure that getElementsByClassName actually exists
+ if ( !div.getElementsByClassName || div.getElementsByClassName("e").length === 0 ) {
+ return;
+ }
+
+ // Safari caches class attributes, doesn't catch changes (in 3.2)
+ div.lastChild.className = "e";
+
+ if ( div.getElementsByClassName("e").length === 1 ) {
+ return;
+ }
+
+ Expr.order.splice(1, 0, "CLASS");
+ Expr.find.CLASS = function( match, context, isXML ) {
+ if ( typeof context.getElementsByClassName !== "undefined" && !isXML ) {
+ return context.getElementsByClassName(match[1]);
+ }
+ };
+
+ // release memory in IE
+ div = null;
+})();
+
+function dirNodeCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
+ for ( var i = 0, l = checkSet.length; i < l; i++ ) {
+ var elem = checkSet[i];
+
+ if ( elem ) {
+ var match = false;
+
+ elem = elem[dir];
+
+ while ( elem ) {
+ if ( elem[ expando ] === doneName ) {
+ match = checkSet[elem.sizset];
+ break;
+ }
+
+ if ( elem.nodeType === 1 && !isXML ){
+ elem[ expando ] = doneName;
+ elem.sizset = i;
+ }
+
+ if ( elem.nodeName.toLowerCase() === cur ) {
+ match = elem;
+ break;
+ }
+
+ elem = elem[dir];
+ }
+
+ checkSet[i] = match;
+ }
+ }
+}
+
+function dirCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
+ for ( var i = 0, l = checkSet.length; i < l; i++ ) {
+ var elem = checkSet[i];
+
+ if ( elem ) {
+ var match = false;
+
+ elem = elem[dir];
+
+ while ( elem ) {
+ if ( elem[ expando ] === doneName ) {
+ match = checkSet[elem.sizset];
+ break;
+ }
+
+ if ( elem.nodeType === 1 ) {
+ if ( !isXML ) {
+ elem[ expando ] = doneName;
+ elem.sizset = i;
+ }
+
+ if ( typeof cur !== "string" ) {
+ if ( elem === cur ) {
+ match = true;
+ break;
+ }
+
+ } else if ( Sizzle.filter( cur, [elem] ).length > 0 ) {
+ match = elem;
+ break;
+ }
+ }
+
+ elem = elem[dir];
+ }
+
+ checkSet[i] = match;
+ }
+ }
+}
+
+if ( document.documentElement.contains ) {
+ Sizzle.contains = function( a, b ) {
+ return a !== b && (a.contains ? a.contains(b) : true);
+ };
+
+} else if ( document.documentElement.compareDocumentPosition ) {
+ Sizzle.contains = function( a, b ) {
+ return !!(a.compareDocumentPosition(b) & 16);
+ };
+
+} else {
+ Sizzle.contains = function() {
+ return false;
+ };
+}
+
+Sizzle.isXML = function( elem ) {
+ // documentElement is verified for cases where it doesn't yet exist
+ // (such as loading iframes in IE - #4833)
+ var documentElement = (elem ? elem.ownerDocument || elem : 0).documentElement;
+
+ return documentElement ? documentElement.nodeName !== "HTML" : false;
+};
+
+var posProcess = function( selector, context, seed ) {
+ var match,
+ tmpSet = [],
+ later = "",
+ root = context.nodeType ? [context] : context;
+
+ // Position selectors must be done after the filter
+ // And so must :not(positional) so we move all PSEUDOs to the end
+ while ( (match = Expr.match.PSEUDO.exec( selector )) ) {
+ later += match[0];
+ selector = selector.replace( Expr.match.PSEUDO, "" );
+ }
+
+ selector = Expr.relative[selector] ? selector + "*" : selector;
+
+ for ( var i = 0, l = root.length; i < l; i++ ) {
+ Sizzle( selector, root[i], tmpSet, seed );
+ }
+
+ return Sizzle.filter( later, tmpSet );
+};
+
+// EXPOSE
+// Override sizzle attribute retrieval
+Sizzle.attr = jQuery.attr;
+Sizzle.selectors.attrMap = {};
+jQuery.find = Sizzle;
+jQuery.expr = Sizzle.selectors;
+jQuery.expr[":"] = jQuery.expr.filters;
+jQuery.unique = Sizzle.uniqueSort;
+jQuery.text = Sizzle.getText;
+jQuery.isXMLDoc = Sizzle.isXML;
+jQuery.contains = Sizzle.contains;
+
+
+})();
+
+
+var runtil = /Until$/,
+ rparentsprev = /^(?:parents|prevUntil|prevAll)/,
+ // Note: This RegExp should be improved, or likely pulled from Sizzle
+ rmultiselector = /,/,
+ isSimple = /^.[^:#\[\.,]*$/,
+ slice = Array.prototype.slice,
+ POS = jQuery.expr.match.globalPOS,
+ // methods guaranteed to produce a unique set when starting from a unique set
+ guaranteedUnique = {
+ children: true,
+ contents: true,
+ next: true,
+ prev: true
+ };
+
+jQuery.fn.extend({
+ find: function( selector ) {
+ var self = this,
+ i, l;
+
+ if ( typeof selector !== "string" ) {
+ return jQuery( selector ).filter(function() {
+ for ( i = 0, l = self.length; i < l; i++ ) {
+ if ( jQuery.contains( self[ i ], this ) ) {
+ return true;
+ }
+ }
+ });
+ }
+
+ var ret = this.pushStack( "", "find", selector ),
+ length, n, r;
+
+ for ( i = 0, l = this.length; i < l; i++ ) {
+ length = ret.length;
+ jQuery.find( selector, this[i], ret );
+
+ if ( i > 0 ) {
+ // Make sure that the results are unique
+ for ( n = length; n < ret.length; n++ ) {
+ for ( r = 0; r < length; r++ ) {
+ if ( ret[r] === ret[n] ) {
+ ret.splice(n--, 1);
+ break;
+ }
+ }
+ }
+ }
+ }
+
+ return ret;
+ },
+
+ has: function( target ) {
+ var targets = jQuery( target );
+ return this.filter(function() {
+ for ( var i = 0, l = targets.length; i < l; i++ ) {
+ if ( jQuery.contains( this, targets[i] ) ) {
+ return true;
+ }
+ }
+ });
+ },
+
+ not: function( selector ) {
+ return this.pushStack( winnow(this, selector, false), "not", selector);
+ },
+
+ filter: function( selector ) {
+ return this.pushStack( winnow(this, selector, true), "filter", selector );
+ },
+
+ is: function( selector ) {
+ return !!selector && (
+ typeof selector === "string" ?
+ // If this is a positional selector, check membership in the returned set
+ // so $("p:first").is("p:last") won't return true for a doc with two "p".
+ POS.test( selector ) ?
+ jQuery( selector, this.context ).index( this[0] ) >= 0 :
+ jQuery.filter( selector, this ).length > 0 :
+ this.filter( selector ).length > 0 );
+ },
+
+ closest: function( selectors, context ) {
+ var ret = [], i, l, cur = this[0];
+
+ // Array (deprecated as of jQuery 1.7)
+ if ( jQuery.isArray( selectors ) ) {
+ var level = 1;
+
+ while ( cur && cur.ownerDocument && cur !== context ) {
+ for ( i = 0; i < selectors.length; i++ ) {
+
+ if ( jQuery( cur ).is( selectors[ i ] ) ) {
+ ret.push({ selector: selectors[ i ], elem: cur, level: level });
+ }
+ }
+
+ cur = cur.parentNode;
+ level++;
+ }
+
+ return ret;
+ }
+
+ // String
+ var pos = POS.test( selectors ) || typeof selectors !== "string" ?
+ jQuery( selectors, context || this.context ) :
+ 0;
+
+ for ( i = 0, l = this.length; i < l; i++ ) {
+ cur = this[i];
+
+ while ( cur ) {
+ if ( pos ? pos.index(cur) > -1 : jQuery.find.matchesSelector(cur, selectors) ) {
+ ret.push( cur );
+ break;
+
+ } else {
+ cur = cur.parentNode;
+ if ( !cur || !cur.ownerDocument || cur === context || cur.nodeType === 11 ) {
+ break;
+ }
+ }
+ }
+ }
+
+ ret = ret.length > 1 ? jQuery.unique( ret ) : ret;
+
+ return this.pushStack( ret, "closest", selectors );
+ },
+
+ // Determine the position of an element within
+ // the matched set of elements
+ index: function( elem ) {
+
+ // No argument, return index in parent
+ if ( !elem ) {
+ return ( this[0] && this[0].parentNode ) ? this.prevAll().length : -1;
+ }
+
+ // index in selector
+ if ( typeof elem === "string" ) {
+ return jQuery.inArray( this[0], jQuery( elem ) );
+ }
+
+ // Locate the position of the desired element
+ return jQuery.inArray(
+ // If it receives a jQuery object, the first element is used
+ elem.jquery ? elem[0] : elem, this );
+ },
+
+ add: function( selector, context ) {
+ var set = typeof selector === "string" ?
+ jQuery( selector, context ) :
+ jQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ),
+ all = jQuery.merge( this.get(), set );
+
+ return this.pushStack( isDisconnected( set[0] ) || isDisconnected( all[0] ) ?
+ all :
+ jQuery.unique( all ) );
+ },
+
+ andSelf: function() {
+ return this.add( this.prevObject );
+ }
+});
+
+// A painfully simple check to see if an element is disconnected
+// from a document (should be improved, where feasible).
+function isDisconnected( node ) {
+ return !node || !node.parentNode || node.parentNode.nodeType === 11;
+}
+
+jQuery.each({
+ parent: function( elem ) {
+ var parent = elem.parentNode;
+ return parent && parent.nodeType !== 11 ? parent : null;
+ },
+ parents: function( elem ) {
+ return jQuery.dir( elem, "parentNode" );
+ },
+ parentsUntil: function( elem, i, until ) {
+ return jQuery.dir( elem, "parentNode", until );
+ },
+ next: function( elem ) {
+ return jQuery.nth( elem, 2, "nextSibling" );
+ },
+ prev: function( elem ) {
+ return jQuery.nth( elem, 2, "previousSibling" );
+ },
+ nextAll: function( elem ) {
+ return jQuery.dir( elem, "nextSibling" );
+ },
+ prevAll: function( elem ) {
+ return jQuery.dir( elem, "previousSibling" );
+ },
+ nextUntil: function( elem, i, until ) {
+ return jQuery.dir( elem, "nextSibling", until );
+ },
+ prevUntil: function( elem, i, until ) {
+ return jQuery.dir( elem, "previousSibling", until );
+ },
+ siblings: function( elem ) {
+ return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem );
+ },
+ children: function( elem ) {
+ return jQuery.sibling( elem.firstChild );
+ },
+ contents: function( elem ) {
+ return jQuery.nodeName( elem, "iframe" ) ?
+ elem.contentDocument || elem.contentWindow.document :
+ jQuery.makeArray( elem.childNodes );
+ }
+}, function( name, fn ) {
+ jQuery.fn[ name ] = function( until, selector ) {
+ var ret = jQuery.map( this, fn, until );
+
+ if ( !runtil.test( name ) ) {
+ selector = until;
+ }
+
+ if ( selector && typeof selector === "string" ) {
+ ret = jQuery.filter( selector, ret );
+ }
+
+ ret = this.length > 1 && !guaranteedUnique[ name ] ? jQuery.unique( ret ) : ret;
+
+ if ( (this.length > 1 || rmultiselector.test( selector )) && rparentsprev.test( name ) ) {
+ ret = ret.reverse();
+ }
+
+ return this.pushStack( ret, name, slice.call( arguments ).join(",") );
+ };
+});
+
+jQuery.extend({
+ filter: function( expr, elems, not ) {
+ if ( not ) {
+ expr = ":not(" + expr + ")";
+ }
+
+ return elems.length === 1 ?
+ jQuery.find.matchesSelector(elems[0], expr) ? [ elems[0] ] : [] :
+ jQuery.find.matches(expr, elems);
+ },
+
+ dir: function( elem, dir, until ) {
+ var matched = [],
+ cur = elem[ dir ];
+
+ while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) {
+ if ( cur.nodeType === 1 ) {
+ matched.push( cur );
+ }
+ cur = cur[dir];
+ }
+ return matched;
+ },
+
+ nth: function( cur, result, dir, elem ) {
+ result = result || 1;
+ var num = 0;
+
+ for ( ; cur; cur = cur[dir] ) {
+ if ( cur.nodeType === 1 && ++num === result ) {
+ break;
+ }
+ }
+
+ return cur;
+ },
+
+ sibling: function( n, elem ) {
+ var r = [];
+
+ for ( ; n; n = n.nextSibling ) {
+ if ( n.nodeType === 1 && n !== elem ) {
+ r.push( n );
+ }
+ }
+
+ return r;
+ }
+});
+
+// Implement the identical functionality for filter and not
+function winnow( elements, qualifier, keep ) {
+
+ // Can't pass null or undefined to indexOf in Firefox 4
+ // Set to 0 to skip string check
+ qualifier = qualifier || 0;
+
+ if ( jQuery.isFunction( qualifier ) ) {
+ return jQuery.grep(elements, function( elem, i ) {
+ var retVal = !!qualifier.call( elem, i, elem );
+ return retVal === keep;
+ });
+
+ } else if ( qualifier.nodeType ) {
+ return jQuery.grep(elements, function( elem, i ) {
+ return ( elem === qualifier ) === keep;
+ });
+
+ } else if ( typeof qualifier === "string" ) {
+ var filtered = jQuery.grep(elements, function( elem ) {
+ return elem.nodeType === 1;
+ });
+
+ if ( isSimple.test( qualifier ) ) {
+ return jQuery.filter(qualifier, filtered, !keep);
+ } else {
+ qualifier = jQuery.filter( qualifier, filtered );
+ }
+ }
+
+ return jQuery.grep(elements, function( elem, i ) {
+ return ( jQuery.inArray( elem, qualifier ) >= 0 ) === keep;
+ });
+}
+
+
+
+
+function createSafeFragment( document ) {
+ var list = nodeNames.split( "|" ),
+ safeFrag = document.createDocumentFragment();
+
+ if ( safeFrag.createElement ) {
+ while ( list.length ) {
+ safeFrag.createElement(
+ list.pop()
+ );
+ }
+ }
+ return safeFrag;
+}
+
+var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|" +
+ "header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",
+ rinlinejQuery = / jQuery\d+="(?:\d+|null)"/g,
+ rleadingWhitespace = /^\s+/,
+ rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,
+ rtagName = /<([\w:]+)/,
+ rtbody = /]", "i"),
+ // checked="checked" or checked
+ rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
+ rscriptType = /\/(java|ecma)script/i,
+ rcleanScript = /^\s*", "" ],
+ legend: [ 1, "" ],
+ thead: [ 1, "" ],
+ tr: [ 2, "" ],
+ td: [ 3, "" ],
+ col: [ 2, "" ],
+ area: [ 1, "" ],
+ _default: [ 0, "", "" ]
+ },
+ safeFragment = createSafeFragment( document );
+
+wrapMap.optgroup = wrapMap.option;
+wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
+wrapMap.th = wrapMap.td;
+
+// IE can't serialize and
+
+
+
+
+
+
+
+
+
+
+
+
+