(function(){var S=this;var Q=S._;var B={};var I=Array.prototype,a=Object.prototype;var R=I.slice,V=I.unshift,U=a.toString,N=a.hasOwnProperty;var L=I.forEach,H=I.map,Y=I.reduce,E=I.reduceRight,K=I.filter,A=I.every,X=I.some,T=I.indexOf,F=I.lastIndexOf,C=Array.isArray,Z=Object.keys;var b=function(c){return new G(c)};if(typeof module!=="undefined"&&module.exports){module.exports=b;b._=b}else{S._=b}b.VERSION="1.1.3";var D=b.each=b.forEach=function(j,g,f){var h;if(L&&j.forEach===L){j.forEach(g,f)}else{if(b.isNumber(j.length)){for(var e=0,c=j.length;e<c;e++){if(g.call(f,j[e],e,j)===B){return }}}else{for(var d in j){if(N.call(j,d)){if(g.call(f,j[d],d,j)===B){return }}}}}};b.map=function(f,e,d){if(H&&f.map===H){return f.map(e,d)}var c=[];D(f,function(i,g,h){c[c.length]=e.call(d,i,g,h)});return c};b.reduce=b.foldl=b.inject=function(g,f,c,e){var d=c!==void 0;if(Y&&g.reduce===Y){if(e){f=b.bind(f,e)}return d?g.reduce(f,c):g.reduce(f)}D(g,function(j,h,i){if(!d&&h===0){c=j}else{c=f.call(e,c,j,h,i)}});return c};b.reduceRight=b.foldr=function(f,e,c,d){if(E&&f.reduceRight===E){if(d){e=b.bind(e,d)}return c!==void 0?f.reduceRight(e,c):f.reduceRight(e)}var g=(b.isArray(f)?f.slice():b.toArray(f)).reverse();return b.reduce(g,e,c,d)};b.find=b.detect=function(f,e,d){var c;O(f,function(i,g,h){if(e.call(d,i,g,h)){c=i;return true}});return c};b.filter=b.select=function(f,e,d){if(K&&f.filter===K){return f.filter(e,d)}var c=[];D(f,function(i,g,h){if(e.call(d,i,g,h)){c[c.length]=i}});return c};b.reject=function(f,e,d){var c=[];D(f,function(i,g,h){if(!e.call(d,i,g,h)){c[c.length]=i}});return c};b.every=b.all=function(f,e,d){e=e||b.identity;if(A&&f.every===A){return f.every(e,d)}var c=true;D(f,function(i,g,h){if(!(c=c&&e.call(d,i,g,h))){return B}});return c};var O=b.some=b.any=function(f,e,d){e=e||b.identity;if(X&&f.some===X){return f.some(e,d)}var c=false;D(f,function(i,g,h){if(c=e.call(d,i,g,h)){return B}});return c};b.include=b.contains=function(e,d){if(T&&e.indexOf===T){return e.indexOf(d)!=-1}var c=false;O(e,function(f){if(c=f===d){return true}});return c};b.invoke=function(d,e){var c=R.call(arguments,2);return b.map(d,function(f){return(e?f[e]:f).apply(f,c)})};b.pluck=function(d,c){return b.map(d,function(e){return e[c]})};b.max=function(f,e,d){if(!e&&b.isArray(f)){return Math.max.apply(Math,f)}var c={computed:-Infinity};D(f,function(j,g,i){var h=e?e.call(d,j,g,i):j;h>=c.computed&&(c={value:j,computed:h})});return c.value};b.min=function(f,e,d){if(!e&&b.isArray(f)){return Math.min.apply(Math,f)}var c={computed:Infinity};D(f,function(j,g,i){var h=e?e.call(d,j,g,i):j;h<c.computed&&(c={value:j,computed:h})});return c.value};b.sortBy=function(e,d,c){return b.pluck(b.map(e,function(h,f,g){return{value:h,criteria:d.call(c,h,f,g)}}).sort(function(i,h){var g=i.criteria,f=h.criteria;return g<f?-1:g>f?1:0}),"value")};b.sortedIndex=function(h,g,e){e=e||b.identity;var c=0,f=h.length;while(c<f){var d=(c+f)>>1;e(h[d])<e(g)?c=d+1:f=d}return c};b.toArray=function(c){if(!c){return[]}if(c.toArray){return c.toArray()}if(b.isArray(c)){return c}if(b.isArguments(c)){return R.call(c)}return b.values(c)};b.size=function(c){return b.toArray(c).length};b.first=b.head=function(e,d,c){return d&&!c?R.call(e,0,d):e[0]};b.rest=b.tail=function(e,c,d){return R.call(e,b.isUndefined(c)||d?1:c)};b.last=function(c){return c[c.length-1]};b.compact=function(c){return b.filter(c,function(d){return !!d})};b.flatten=function(c){return b.reduce(c,function(d,e){if(b.isArray(e)){return d.concat(b.flatten(e))}d[d.length]=e;return d},[])};b.without=function(d){var c=R.call(arguments,1);return b.filter(d,function(e){return !b.include(c,e)})};b.uniq=b.unique=function(d,c){return b.reduce(d,function(e,g,f){if(0==f||(c===true?b.last(e)!=g:!b.include(e,g))){e[e.length]=g}return e},[])};b.intersect=function(d){var c=R.call(arguments,1);return b.filter(b.uniq(d),function(e){return b.every(c,function(f){return b.indexOf(f,e)>=0})})};b.zip=function(){var c=R.call(arguments);var f=b.max(b.pluck(c,"length"));var e=new Array(f);for(var d=0;d<f;d++){e[d]=b.pluck(c,""+d)}return e};b.indexOf=function(f,e){if(T&&f.indexOf===T){return f.indexOf(e)}for(var d=0,c=f.length;d<c;d++){if(f[d]===e){return d}}return -1};b.lastIndexOf=function(e,d){if(F&&e.lastIndexOf===F){return e.lastIndexOf(d)}var c=e.length;while(c--){if(e[c]===d){return c}}return -1};b.range=function(j,g,h){var f=R.call(arguments),i=f.length<=1,j=i?0:f[0],g=i?f[0]:f[1],h=f[2]||1,d=Math.max(Math.ceil((g-j)/h),0),c=0,e=new Array(d);while(c<d){e[c++]=j;j+=h}return e};b.bind=function(d,e){var c=R.call(arguments,2);return function(){return d.apply(e||{},c.concat(R.call(arguments)))}};b.bindAll=function(d){var c=R.call(arguments,1);if(c.length==0){c=b.functions(d)}D(c,function(e){d[e]=b.bind(d[e],d)});return d};b.memoize=function(e,d){var c={};d=d||b.identity;return function(){var f=d.apply(this,arguments);return f in c?c[f]:(c[f]=e.apply(this,arguments))}};b.delay=function(d,e){var c=R.call(arguments,2);return setTimeout(function(){return d.apply(d,c)},e)};b.defer=function(c){return b.delay.apply(b,[c,1].concat(R.call(arguments,1)))};var W=function(d,f,c){var e;return function(){var h=this,g=arguments;var i=function(){e=null;d.apply(h,g)};if(c){clearTimeout(e)}if(c||!e){e=setTimeout(i,f)}}};b.throttle=function(c,d){return W(c,d,false)};b.debounce=function(c,d){return W(c,d,true)};b.wrap=function(c,d){return function(){var e=[c].concat(R.call(arguments));return d.apply(d,e)}};b.compose=function(){var c=R.call(arguments);return function(){var d=R.call(arguments);for(var e=c.length-1;e>=0;e--){d=[c[e].apply(this,d)]}return d[0]}};b.keys=Z||function(e){if(b.isArray(e)){return b.range(0,e.length)}var d=[];for(var c in e){if(N.call(e,c)){d[d.length]=c}}return d};b.values=function(c){return b.map(c,b.identity)};b.functions=b.methods=function(c){return b.filter(b.keys(c),function(d){return b.isFunction(c[d])}).sort()};b.extend=function(c){D(R.call(arguments,1),function(d){for(var e in d){c[e]=d[e]}});return c};b.clone=function(c){return b.isArray(c)?c.slice():b.extend({},c)};b.tap=function(d,c){c(d);return d};b.isEqual=function(d,c){if(d===c){return true}var g=typeof (d),i=typeof (c);if(g!=i){return false}if(d==c){return true}if((!d&&c)||(d&&!c)){return false}if(d.isEqual){return d.isEqual(c)}if(b.isDate(d)&&b.isDate(c)){return d.getTime()===c.getTime()}if(b.isNaN(d)&&b.isNaN(c)){return false}if(b.isRegExp(d)&&b.isRegExp(c)){return d.source===c.source&&d.global===c.global&&d.ignoreCase===c.ignoreCase&&d.multiline===c.multiline}if(g!=="object"){return false}if(d.length&&(d.length!==c.length)){return false}var e=b.keys(d),h=b.keys(c);if(e.length!=h.length){return false}for(var f in d){if(!(f in c)||!b.isEqual(d[f],c[f])){return false}}return true};b.isEmpty=function(d){if(b.isArray(d)||b.isString(d)){return d.length===0}for(var c in d){if(N.call(d,c)){return false}}return true};b.isElement=function(c){return !!(c&&c.nodeType==1)};b.isArray=C||function(c){return !!(c&&c.concat&&c.unshift&&!c.callee)};b.isArguments=function(c){return !!(c&&c.callee)};b.isFunction=function(c){return !!(c&&c.constructor&&c.call&&c.apply)};b.isString=function(c){return !!(c===""||(c&&c.charCodeAt&&c.substr))};b.isNumber=function(c){return !!(c===0||(c&&c.toExponential&&c.toFixed))};b.isNaN=function(c){return U.call(c)==="[object Number]"&&isNaN(c)};b.isBoolean=function(c){return c===true||c===false};b.isDate=function(c){return !!(c&&c.getTimezoneOffset&&c.setUTCFullYear)};b.isRegExp=function(c){return !!(c&&c.test&&c.exec&&(c.ignoreCase||c.ignoreCase===false))};b.isNull=function(c){return c===null};b.isUndefined=function(c){return c===void 0};b.noConflict=function(){S._=Q;return this};b.identity=function(c){return c};b.times=function(f,e,d){for(var c=0;c<f;c++){e.call(d,c)}};b.mixin=function(c){D(b.functions(c),function(d){P(d,b[d]=c[d])})};var J=0;b.uniqueId=function(c){var d=J++;return c?c+d:d};b.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g};b.template=function(g,f){var h=b.templateSettings;var d="var __p=[],print=function(){__p.push.apply(__p,arguments);};with(obj||{}){__p.push('"+g.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(h.interpolate,function(c,i){return"',"+i.replace(/\\'/g,"'")+",'"}).replace(h.evaluate||null,function(c,i){return"');"+i.replace(/\\'/g,"'").replace(/[\r\n\t]/g," ")+"__p.push('"}).replace(/\r/g,"\\r").replace(/\n/g,"\\n").replace(/\t/g,"\\t")+"');}return __p.join('');";var e=new Function("obj",d);return f?e(f):e};var G=function(c){this._wrapped=c};b.prototype=G.prototype;var M=function(d,c){return c?b(d).chain():d};var P=function(c,d){G.prototype[c]=function(){var e=R.call(arguments);V.call(e,this._wrapped);return M(d.apply(b,e),this._chain)}};b.mixin(b);D(["pop","push","reverse","shift","sort","splice","unshift"],function(c){var d=I[c];G.prototype[c]=function(){d.apply(this._wrapped,arguments);return M(this._wrapped,this._chain)}});D(["concat","join","slice"],function(c){var d=I[c];G.prototype[c]=function(){return M(d.apply(this._wrapped,arguments),this._chain)}});G.prototype.chain=function(){this._chain=true;return this};G.prototype.value=function(){return this._wrapped}})();
