Skip to content
This repository
Browse code

Build files now have version number 0.1.0

  • Loading branch information...
commit c0426b0f003fbc90fff93afd0473b9f7ccea1942 1 parent b90c9b1
Irene Ros authored April 17, 2012
2  dist/LASTBUILD
... ...
@@ -1 +1 @@
1  
-2012/04/17 09:21
  1
+2012/04/17 10:44
3,482  dist/ds.js
0 additions, 3482 deletions not shown
4  dist/ds.min.js
... ...
@@ -1,4 +0,0 @@
1  
-// Dataset - v0.0.1 - 2/10/2012
2  
-// 
3  
-// Dataset (c) Alex Graul, Irene Ros; Underscore.js 1.2.2 (c) 2011 Jeremy Ashkenas, DocumentCloud Inc.;; Licensed 
4  
-((function(){function z(a,b,c){if(a===b)return a!==0||1/a==1/b;if(a==null||b==null)return a===b;a._chain&&(a=a._wrapped),b._chain&&(b=b._wrapped);if(a.isEqual&&_.isFunction(a.isEqual))return a.isEqual(b);if(b.isEqual&&_.isFunction(b.isEqual))return b.isEqual(a);var d=i.call(a);if(d!=i.call(b))return!1;switch(d){case"[object String]":return a==String(b);case"[object Number]":return a!=+a?b!=+b:a==0?1/a==1/b:a==+b;case"[object Date]":case"[object Boolean]":return+a==+b;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!1;var e=c.length;while(e--)if(c[e]==a)return!0;c.push(a);var f=0,g=!0;if(d=="[object Array]"){f=a.length,g=f==b.length;if(g)while(f--)if(!(g=f in a==f in b&&z(a[f],b[f],c)))break}else{if("constructor"in a!="constructor"in b||a.constructor!=b.constructor)return!1;for(var h in a)if(_.has(a,h)){f++;if(!(g=_.has(b,h)&&z(a[h],b[h],c)))break}if(g){for(h in b)if(_.has(b,h)&&!(f--))break;g=!f}}return c.pop(),g}var a=this,b=a._,c={},d=Array.prototype,e=Object.prototype,f=Function.prototype,g=d.slice,h=d.unshift,i=e.toString,j=e.hasOwnProperty,k=d.forEach,l=d.map,m=d.reduce,n=d.reduceRight,o=d.filter,p=d.every,q=d.some,r=d.indexOf,s=d.lastIndexOf,t=Array.isArray,u=Object.keys,v=f.bind,_=function(a){return new D(a)};typeof exports!="undefined"?(typeof module!="undefined"&&module.exports&&(exports=module.exports=_),exports._=_):a._=_,_.VERSION="1.3.1";var w=_.each=_.forEach=function(a,b,d){if(a==null)return;if(k&&a.forEach===k)a.forEach(b,d);else if(a.length===+a.length){for(var e=0,f=a.length;e<f;e++)if(e in a&&b.call(d,a[e],e,a)===c)return}else for(var g in a)if(_.has(a,g)&&b.call(d,a[g],g,a)===c)return};_.map=_.collect=function(a,b,c){var d=[];return a==null?d:l&&a.map===l?a.map(b,c):(w(a,function(a,e,f){d[d.length]=b.call(c,a,e,f)}),a.length===+a.length&&(d.length=a.length),d)},_.reduce=_.foldl=_.inject=function(a,b,c,d){var e=arguments.length>2;a==null&&(a=[]);if(m&&a.reduce===m)return d&&(b=_.bind(b,d)),e?a.reduce(b,c):a.reduce(b);w(a,function(a,f,g){e?c=b.call(d,c,a,f,g):(c=a,e=!0)});if(!e)throw new TypeError("Reduce of empty array with no initial value");return c},_.reduceRight=_.foldr=function(a,b,c,d){var e=arguments.length>2;a==null&&(a=[]);if(n&&a.reduceRight===n)return d&&(b=_.bind(b,d)),e?a.reduceRight(b,c):a.reduceRight(b);var f=_.toArray(a).reverse();return d&&!e&&(b=_.bind(b,d)),e?_.reduce(f,b,c,d):_.reduce(f,b)},_.find=_.detect=function(a,b,c){var d;return x(a,function(a,e,f){if(b.call(c,a,e,f))return d=a,!0}),d},_.filter=_.select=function(a,b,c){var d=[];return a==null?d:o&&a.filter===o?a.filter(b,c):(w(a,function(a,e,f){b.call(c,a,e,f)&&(d[d.length]=a)}),d)},_.reject=function(a,b,c){var d=[];return a==null?d:(w(a,function(a,e,f){b.call(c,a,e,f)||(d[d.length]=a)}),d)},_.every=_.all=function(a,b,d){var e=!0;return a==null?e:p&&a.every===p?a.every(b,d):(w(a,function(a,f,g){if(!(e=e&&b.call(d,a,f,g)))return c}),e)};var x=_.some=_.any=function(a,b,d){b||(b=_.identity);var e=!1;return a==null?e:q&&a.some===q?a.some(b,d):(w(a,function(a,f,g){if(e||(e=b.call(d,a,f,g)))return c}),!!e)};_.include=_.contains=function(a,b){var c=!1;return a==null?c:r&&a.indexOf===r?a.indexOf(b)!=-1:(c=x(a,function(a){return a===b}),c)},_.invoke=function(a,b){var c=g.call(arguments,2);return _.map(a,function(a){return(_.isFunction(b)?b||a:a[b]).apply(a,c)})},_.pluck=function(a,b){return _.map(a,function(a){return a[b]})},_.max=function(a,b,c){if(!b&&_.isArray(a))return Math.max.apply(Math,a);if(!b&&_.isEmpty(a))return-Infinity;var d={computed:-Infinity};return w(a,function(a,e,f){var g=b?b.call(c,a,e,f):a;g>=d.computed&&(d={value:a,computed:g})}),d.value},_.min=function(a,b,c){if(!b&&_.isArray(a))return Math.min.apply(Math,a);if(!b&&_.isEmpty(a))return Infinity;var d={computed:Infinity};return w(a,function(a,e,f){var g=b?b.call(c,a,e,f):a;g<d.computed&&(d={value:a,computed:g})}),d.value},_.shuffle=function(a){var b=[],c;return w(a,function(a,d,e){d==0?b[0]=a:(c=Math.floor(Math.random()*(d+1)),b[d]=b[c],b[c]=a)}),b},_.sortBy=function(a,b,c){return _.pluck(_.map(a,function(a,d,e){return{value:a,criteria:b.call(c,a,d,e)}}).sort(function(a,b){var c=a.criteria,d=b.criteria;return c<d?-1:c>d?1:0}),"value")},_.groupBy=function(a,b){var c={},d=_.isFunction(b)?b:function(a){return a[b]};return w(a,function(a,b){var e=d(a,b);(c[e]||(c[e]=[])).push(a)}),c},_.sortedIndex=function(a,b,c){c||(c=_.identity);var d=0,e=a.length;while(d<e){var f=d+e>>1;c(a[f])<c(b)?d=f+1:e=f}return d},_.toArray=function(a){return a?a.toArray?a.toArray():_.isArray(a)?g.call(a):_.isArguments(a)?g.call(a):_.values(a):[]},_.size=function(a){return _.toArray(a).length},_.first=_.head=function(a,b,c){return b!=null&&!c?g.call(a,0,b):a[0]},_.initial=function(a,b,c){return g.call(a,0,a.length-(b==null||c?1:b))},_.last=function(a,b,c){return b!=null&&!c?g.call(a,Math.max(a.length-b,0)):a[a.length-1]},_.rest=_.tail=function(a,b,c){return g.call(a,b==null||c?1:b)},_.compact=function(a){return _.filter(a,function(a){return!!a})},_.flatten=function(a,b){return _.reduce(a,function(a,c){return _.isArray(c)?a.concat(b?c:_.flatten(c)):(a[a.length]=c,a)},[])},_.without=function(a){return _.difference(a,g.call(arguments,1))},_.uniq=_.unique=function(a,b,c){var d=c?_.map(a,c):a,e=[];return _.reduce(d,function(c,d,f){if(0==f||(b===!0?_.last(c)!=d:!_.include(c,d)))c[c.length]=d,e[e.length]=a[f];return c},[]),e},_.union=function(){return _.uniq(_.flatten(arguments,!0))},_.intersection=_.intersect=function(a){var b=g.call(arguments,1);return _.filter(_.uniq(a),function(a){return _.every(b,function(b){return _.indexOf(b,a)>=0})})},_.difference=function(a){var b=_.flatten(g.call(arguments,1));return _.filter(a,function(a){return!_.include(b,a)})},_.zip=function(){var a=g.call(arguments),b=_.max(_.pluck(a,"length")),c=new Array(b);for(var d=0;d<b;d++)c[d]=_.pluck(a,""+d);return c},_.indexOf=function(a,b,c){if(a==null)return-1;var d,e;if(c)return d=_.sortedIndex(a,b),a[d]===b?d:-1;if(r&&a.indexOf===r)return a.indexOf(b);for(d=0,e=a.length;d<e;d++)if(d in a&&a[d]===b)return d;return-1},_.lastIndexOf=function(a,b){if(a==null)return-1;if(s&&a.lastIndexOf===s)return a.lastIndexOf(b);var c=a.length;while(c--)if(c in a&&a[c]===b)return c;return-1},_.range=function(a,b,c){arguments.length<=1&&(b=a||0,a=0),c=arguments[2]||1;var d=Math.max(Math.ceil((b-a)/c),0),e=0,f=new Array(d);while(e<d)f[e++]=a,a+=c;return f};var y=function(){};_.bind=function(b,c){var d,e;if(b.bind===v&&v)return v.apply(b,g.call(arguments,1));if(!_.isFunction(b))throw new TypeError;return e=g.call(arguments,2),d=function(){if(this instanceof d){y.prototype=b.prototype;var a=new y,f=b.apply(a,e.concat(g.call(arguments)));return Object(f)===f?f:a}return b.apply(c,e.concat(g.call(arguments)))}},_.bindAll=function(a){var b=g.call(arguments,1);return b.length==0&&(b=_.functions(a)),w(b,function(b){a[b]=_.bind(a[b],a)}),a},_.memoize=function(a,b){var c={};return b||(b=_.identity),function(){var d=b.apply(this,arguments);return _.has(c,d)?c[d]:c[d]=a.apply(this,arguments)}},_.delay=function(a,b){var c=g.call(arguments,2);return setTimeout(function(){return a.apply(a,c)},b)},_.defer=function(a){return _.delay.apply(_,[a,1].concat(g.call(arguments,1)))},_.throttle=function(a,b){var c,d,e,f,g,h=_.debounce(function(){g=f=!1},b);return function(){c=this,d=arguments;var i=function(){e=null,g&&a.apply(c,d),h()};e||(e=setTimeout(i,b)),f?g=!0:a.apply(c,d),h(),f=!0}},_.debounce=function(a,b){var c;return function(){var d=this,e=arguments,f=function(){c=null,a.apply(d,e)};clearTimeout(c),c=setTimeout(f,b)}},_.once=function(a){var b=!1,c;return function(){return b?c:(b=!0,c=a.apply(this,arguments))}},_.wrap=function(a,b){return function(){var c=[a].concat(g.call(arguments,0));return b.apply(this,c)}},_.compose=function(){var a=arguments;return function(){var b=arguments;for(var c=a.length-1;c>=0;c--)b=[a[c].apply(this,b)];return b[0]}},_.after=function(a,b){return a<=0?b():function(){if(--a<1)return b.apply(this,arguments)}},_.keys=u||function(a){if(a!==Object(a))throw new TypeError("Invalid object");var b=[];for(var c in a)_.has(a,c)&&(b[b.length]=c);return b},_.values=function(a){return _.map(a,_.identity)},_.functions=_.methods=function(a){var b=[];for(var c in a)_.isFunction(a[c])&&b.push(c);return b.sort()},_.extend=function(a){return w(g.call(arguments,1),function(b){for(var c in b)a[c]=b[c]}),a},_.defaults=function(a){return w(g.call(arguments,1),function(b){for(var c in b)a[c]==null&&(a[c]=b[c])}),a},_.clone=function(a){return _.isObject(a)?_.isArray(a)?a.slice():_.extend({},a):a},_.tap=function(a,b){return b(a),a},_.isEqual=function(a,b){return z(a,b,[])},_.isEmpty=function(a){if(_.isArray(a)||_.isString(a))return a.length===0;for(var b in a)if(_.has(a,b))return!1;return!0},_.isElement=function(a){return!!a&&a.nodeType==1},_.isArray=t||function(a){return i.call(a)=="[object Array]"},_.isObject=function(a){return a===Object(a)},_.isArguments=function(a){return i.call(a)=="[object Arguments]"},_.isArguments(arguments)||(_.isArguments=function(a){return!!a&&!!_.has(a,"callee")}),_.isFunction=function(a){return i.call(a)=="[object Function]"},_.isString=function(a){return i.call(a)=="[object String]"},_.isNumber=function(a){return i.call(a)=="[object Number]"},_.isNaN=function(a){return a!==a},_.isBoolean=function(a){return a===!0||a===!1||i.call(a)=="[object Boolean]"},_.isDate=function(a){return i.call(a)=="[object Date]"},_.isRegExp=function(a){return i.call(a)=="[object RegExp]"},_.isNull=function(a){return a===null},_.isUndefined=function(a){return a===void 0},_.has=function(a,b){return j.call(a,b)},_.noConflict=function(){return a._=b,this},_.identity=function(a){return a},_.times=function(a,b,c){for(var d=0;d<a;d++)b.call(c,d)},_.escape=function(a){return(""+a).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/\//g,"&#x2F;")},_.mixin=function(a){w(_.functions(a),function(b){F(b,_[b]=a[b])})};var A=0;_.uniqueId=function(a){var b=A++;return a?a+b:b},_.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var B=/.^/,C=function(a){return a.replace(/\\\\/g,"\\").replace(/\\'/g,"'")};_.template=function(a,b){var c=_.templateSettings,d="var __p=[],print=function(){__p.push.apply(__p,arguments);};with(obj||{}){__p.push('"+a.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(c.escape||B,function(a,b){return"',_.escape("+C(b)+"),'"}).replace(c.interpolate||B,function(a,b){return"',"+C(b)+",'"}).replace(c.evaluate||B,function(a,b){return"');"+C(b).replace(/[\r\n\t]/g," ")+";__p.push('"}).replace(/\r/g,"\\r").replace(/\n/g,"\\n").replace(/\t/g,"\\t")+"');}return __p.join('');",e=new Function("obj","_",d);return b?e(b,_):function(a){return e.call(this,a,_)}},_.chain=function(a){return _(a).chain()};var D=function(a){this._wrapped=a};_.prototype=D.prototype;var E=function(a,b){return b?_(a).chain():a},F=function(a,b){D.prototype[a]=function(){var a=g.call(arguments);return h.call(a,this._wrapped),E(b.apply(_,a),this._chain)}};_.mixin(_),w(["pop","push","reverse","shift","sort","splice","unshift"],function(a){var b=d[a];D.prototype[a]=function(){var c=this._wrapped;b.apply(c,arguments);var d=c.length;return(a=="shift"||a=="splice")&&d===0&&delete c[0],E(c,this._chain)}}),w(["concat","join","slice"],function(a){var b=d[a];D.prototype[a]=function(){return E(b.apply(this._wrapped,arguments),this._chain)}}),D.prototype.chain=function(){return this._chain=!0,this},D.prototype.value=function(){return this._wrapped}})).call(this),function(){var a=this.math={};a.mean=a.ave=a.average=function(b,c){return a.sum(b,c)/_(b).size()},a.median=function(b){var c=(b.length+1)/2,d=a.sort(b);return d.length%2?d[c-1]:(d[c-1.5]+d[c-.5])/2},a.pow=function(a,b){if(_.isNumber(a))return Math.pow(a,b);if(_.isArray(a))return _.map(a,function(a){return _.pow(a,b)})},a.scale=function(a,b){var b=b||1,c=_.max(a);return _.map(a,function(a){return a*(b/c)})},a.slope=function(a,b){return(b[1]-a[1])/(b[0]-a[0])},a.sort=function(a){return a.sort(function(a,b){return a-b})},a.stdDeviation=a.sigma=function(a){return Math.sqrt(_(a).variance())},a.sum=function(a,b){if(_.isArray(a)&&typeof a[0]=="number")var c=a;else var b=b||"value",c=_(a).pluck(b);var d=0;for(var e=0,f=c.length;e<f;e++)d+=c[e];return d},a.transpose=function(a){var b=[];return _(a).each(function(a,c){_(a).each(function(a,d){b[d]||(b[d]=[]),b[d][c]=a})}),b},a.variance=function(a){var b=_(a).mean();return _(a).chain().map(function(a){return _(a-b).pow(2)}).mean().value()},_.mixin(a)}(),function(a,b){function c(a){this._d=a}function d(a,b){var c=a+"";while(c.length<b)c="0"+c;return c}function e(b,c,d,e){var f=typeof c=="string",g=f?{}:c,h,i,j,k;return f&&e&&(g[c]=e),h=(g.ms||g.milliseconds||0)+(g.s||g.seconds||0)*1e3+(g.m||g.minutes||0)*6e4+(g.h||g.hours||0)*36e5,i=(g.d||g.days||0)+(g.w||g.weeks||0)*7,j=(g.M||g.months||0)+(g.y||g.years||0)*12,h&&b.setTime(+b+h*d),i&&b.setDate(b.getDate()+i*d),j&&(k=b.getDate(),b.setDate(1),b.setMonth(b.getMonth()+j*d),b.setDate(Math.min((new a(b.getFullYear(),b.getMonth()+1,0)).getDate(),k))),b}function f(a){return Object.prototype.toString.call(a)==="[object Array]"}function g(b){return new a(b[0],b[1]||0,b[2]||1,b[3]||0,b[4]||0,b[5]||0,b[6]||0)}function h(b,e){function f(c){var e,g;switch(c){case"M":return i+1;case"Mo":return i+1+r(i+1);case"MM":return d(i+1,2);case"MMM":return o.monthsShort[i];case"MMMM":return o.months[i];case"D":return j;case"Do":return j+r(j);case"DD":return d(j,2);case"DDD":return e=new a(k,i,j),g=new a(k,0,1),~~((e-g)/864e5+1.5);case"DDDo":return e=f("DDD"),e+r(e);case"DDDD":return d(f("DDD"),3);case"d":return l;case"do":return l+r(l);case"ddd":return o.weekdaysShort[l];case"dddd":return o.weekdays[l];case"w":return e=new a(k,i,j-l+5),g=new a(e.getFullYear(),0,4),~~((e-g)/864e5/7+1.5);case"wo":return e=f("w"),e+r(e);case"ww":return d(f("w"),2);case"YY":return d(k%100,2);case"YYYY":return k;case"a":return m>11?s.pm:s.am;case"A":return m>11?s.PM:s.AM;case"H":return m;case"HH":return d(m,2);case"h":return m%12||12;case"hh":return d(m%12||12,2);case"m":return n;case"mm":return d(n,2);case"s":return p;case"ss":return d(p,2);case"zz":case"z":return(b.toString().match(w)||[""])[0].replace(v,"");case"Z":return(q>0?"+":"-")+d(~~(Math.abs(q)/60),2)+":"+d(~~(Math.abs(q)%60),2);case"ZZ":return(q>0?"+":"-")+d(~~(10*Math.abs(q)/6),4);case"L":case"LL":case"LLL":case"LLLL":case"LT":return h(b,o.longDateFormat[c]);default:return c.replace(/(^\[)|(\\)|\]$/g,"")}}var g=new c(b),i=g.month(),j=g.date(),k=g.year(),l=g.day(),m=g.hours(),n=g.minutes(),p=g.seconds(),q=g.zone(),r=o.ordinal,s=o.meridiem;return e.replace(u,f)}function i(b,c){function d(a,b){var c;switch(a){case"M":case"MM":e[1]=~~b-1;break;case"MMM":case"MMMM":for(c=0;c<12;c++)if(o.monthsParse[c].test(b)){e[1]=c;break}break;case"D":case"DD":case"DDD":case"DDDD":e[2]=~~b;break;case"YY":b=~~b,e[0]=b+(b>70?1900:2e3);break;case"YYYY":e[0]=~~Math.abs(b);break;case"a":case"A":m=b.toLowerCase()==="pm";break;case"H":case"HH":case"h":case"hh":e[3]=~~b;break;case"m":case"mm":e[4]=~~b;break;case"s":case"ss":e[5]=~~b;break;case"Z":case"ZZ":i=!0,c=b.match(z),c[1]&&(f=~~c[1]),c[2]&&(h=~~c[2]),c[0]==="-"&&(f=-f,h=-h)}}var e=[0,0,1,0,0,0,0],f=0,h=0,i=!1,j=b.match(y),k=c.match(x),l,m;for(l=0;l<k.length;l++)d(k[l],j[l]);return m&&e[3]<12&&(e[3]+=12),m===!1&&e[3]===12&&(e[3]=0),e[3]+=f,e[4]+=h,i?new a(a.UTC.apply({},e)):g(e)}function j(a,b){var c=Math.min(a.length,b.length),d=Math.abs(a.length-b.length),e=0,f;for(f=0;f<c;f++)~~a[f]!==~~b[f]&&e++;return e+d}function k(a,b){var c,d=a.match(y),e=[],f=99,g,k,l;for(g=0;g<b.length;g++)k=i(a,b[g]),l=j(d,h(k,b[g]).match(y)),l<f&&(f=l,c=k);return c}function l(a,b,c){var d=o.relativeTime[a];return typeof d=="function"?d(b||1,!!c,a):d.replace(/%d/i,b||1)}function m(a,b){var c=p(Math.abs(a)/1e3),d=p(c/60),e=p(d/60),f=p(e/24),g=p(f/365),h=c<45&&["s",c]||d===1&&["m"]||d<45&&["mm",d]||e===1&&["h"]||e<22&&["hh",e]||f===1&&["d"]||f<=25&&["dd",f]||f<=45&&["M"]||f<345&&["MM",p(f/30)]||g===1&&["y"]||["yy",g];return h[2]=b,l.apply({},h)}function n(a,b){o.fn[a]=function(a){return a!=null?(this._d["set"+b](a),this):this._d["get"+b]()}}var o,p=Math.round,q={},r=typeof module!="undefined",s="months|monthsShort|monthsParse|weekdays|weekdaysShort|longDateFormat|calendar|relativeTime|ordinal|meridiem".split("|"),t,u=/(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|dddd?|do?|w[o|w]?|YYYY|YY|a|A|hh?|HH?|mm?|ss?|zz?|ZZ?|LT|LL?L?L?)/g,v=/[^A-Z]/g,w=/\([A-Za-z ]+\)|:[0-9]{2} [A-Z]{3} /g,x=/(\\)?(MM?M?M?|dd?d?d|DD?D?D?|YYYY|YY|a|A|hh?|HH?|mm?|ss?|ZZ?|T)/g,y=/(\\)?([0-9]+|([a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+|([\+\-]\d\d:?\d\d))/gi,z=/([\+\-]|\d\d)/gi,A="1.3.0",B="Month|Date|Hours|Minutes|Seconds|Milliseconds".split("|");o=function(d,e){if(d===null)return null;var h;return d&&d._d instanceof a?h=new a(+d._d):e?f(e)?h=k(d,e):h=i(d,e):h=d===b?new a:d instanceof a?d:f(d)?g(d):new a(d),new c(h)},o.version=A,o.lang=function(a,b){var c,d,e,f=[];if(b){for(c=0;c<12;c++)f[c]=new RegExp("^"+b.months[c]+"|^"+b.monthsShort[c].replace(".",""),"i");b.monthsParse=b.monthsParse||f,q[a]=b}if(q[a])for(c=0;c<s.length;c++)d=s[c],o[d]=q[a][d]||o[d];else r&&(e=require("./lang/"+a),o.lang(a,e))},o.lang("en",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),longDateFormat:{LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D YYYY",LLL:"MMMM D YYYY LT",LLLL:"dddd, MMMM D YYYY LT"},meridiem:{AM:"AM",am:"am",PM:"PM",pm:"pm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},ordinal:function(a){var b=a%10;return~~(a%100/10)===1?"th":b===1?"st":b===2?"nd":b===3?"rd":"th"}}),o.fn=c.prototype={clone:function(){return o(this)},valueOf:function(){return+this._d},"native":function(){return this._d},toString:function(){return this._d.toString()},toDate:function(){return this._d},format:function(a){return h(this._d,a)},add:function(a,b){return this._d=e(this._d,a,1,b),this},subtract:function(a,b){return this._d=e(this._d,a,-1,b),this},diff:function(a,b,c){var d=o(a),e=this._d-d._d,f=this.year()-d.year(),g=this.month()-d.month(),h=this.day()-d.day(),i;return b==="months"?i=f*12+g+h/30:b==="years"?i=f+g/12:i=b==="seconds"?e/1e3:b==="minutes"?e/6e4:b==="hours"?e/36e5:b==="days"?e/864e5:b==="weeks"?e/6048e5:b==="days"?e/3600:e,c?i:p(i)},from:function(a,b){var c=this.diff(a),d=o.relativeTime,e=m(c,b);return b?e:(c<=0?d.past:d.future).replace(/%s/i,e)},fromNow:function(a){return this.from(o(),a)},calendar:function(){var a=o(),b=o([a.year(),a.month(),a.date()]),c=this.diff(b,"days",!0),d=o.calendar,e=d.sameElse,f=c<-6?e:c<-1?d.lastWeek:c<0?d.lastDay:c<1?d.sameDay:c<2?d.nextDay:c<7?d.nextWeek:e;return this.format(typeof f=="function"?f.apply(this):f)},isLeapYear:function(){var a=this.year();return a%4===0&&a%100!==0||a%400===0},isDST:function(){return this.zone()!==o([this.year()]).zone()},day:function(a){var b=this._d.getDay();return a==null?b:this.add({d:a-b})}};for(t=0;t<B.length;t++)n(B[t].toLowerCase(),B[t]);n("year","FullYear"),o.fn.zone=function(){return this._d.getTimezoneOffset()},r&&(module.exports=o),typeof window!="undefined"&&(window.moment=o)}(Date),function(a,_){var b=a.DS={};b.Event=function(a){_.isArray(a)||(a=[a]),this.deltas=a},_.extend(b.Event.prototype,{affectedColumns:function(){var a=[];return _.each(this.deltas,function(b){a=_.union(a,_.keys(b.old),_.keys(b.changed))}),a}}),_.extend(b.Event,{isDelete:function(a){return _.isUndefined(a.changed)||_.keys(a.changed).length===0?!0:!1},isAdd:function(a){return _.isUndefined(a.old)||_.keys(a.old).length===0?!0:!1},isUpdate:function(a){return!this.isDelete(a)&&!this.isAdd(a)?!0:!1}}),b.Events={},b.Events.bind=function(a,b,c){var d=this._callbacks||(this._callbacks={}),e=d[a]||(d[a]={}),f=e.tail||(e.tail=e.next={});return f.callback=b,f.context=c,e.tail=f.next={},this},b.Events.unbind=function(a,b){var c,d,e;if(!a)this._callbacks=null;else if(c=this._callbacks)if(!b)c[a]={};else if(d=c[a])while((e=d)&&(d=d.next)){if(d.callback!==b)continue;e.next=d.next,d.context=d.callback=null;break}return this},b.Events.trigger=function(a){var b,c,d,e,f,g=["all",a];if(!(c=this._callbacks))return this;while(f=g.pop()){if(!(b=c[f]))continue;e=f=="all"?arguments:Array.prototype.slice.call(arguments,1);while(b=b.next)(d=b.callback)&&d.apply(b.context||this,e)}return this},b.Events._buildEvent=function(a){return new b.Event(a)},b.types={string:{name:"string",coerce:function(a){return _.isNull(a)?null:a.toString()},test:function(a){return typeof a=="string"},compare:function(a,b){return a<b?-1:a>b?1:0},numeric:function(a,b){return b}},"boolean":{name:"boolean",regexp:/^(true|false)$/,coerce:function(a){return a==="false"?!1:Boolean(a)},test:function(a){return typeof a=="boolean"||this.regexp.test(a)?!0:!1},compare:function(a,b){return a===b?0:a<b?-1:1},numeric:function(a){return a?1:0}},number:{name:"number",regexp:/^[\-\.]?[0-9]+([\.][0-9]+)?$/,coerce:function(a){return _.isNull(a)?null:(a=Number(a),_.isNaN(a)?null:a)},test:function(a){return typeof a=="number"||this.regexp.test(a)?!0:!1},compare:function(a,b){return a===b?0:a<b?-1:1},numeric:function(a){return a}},time:{name:"time",format:"DD/MM/YYYY",_formatLookup:[["DD","\\d{2}"],["MM","\\d{2}"],["YYYY","\\d{4}"],["YY","\\d{2}"]],_regexpTable:{},_regexp:function(a){if(this._regexpTable[a])return this._regexpTable[a];var b=a;return _.each(this._formatLookup,function(a){b=b.replace(a[0],a[1])},this),this._regexpTable[a]=new RegExp(b,"g")},coerce:function(a,b){b=b||{};if(_.isString(a)){var c=b.format||this.format;return moment(a,c)}return _.isNumber(a)?moment(a):a},test:function(a,b){return _.isString(a)?(b=b||this.format,this._regexp(b).test(a)):!0},compare:function(a,b){return a<b?-1:a>b?1:0},numeric:function(a){return a.valueOf()}}},b.typeOf=function(a){var c=_.keys(b.types),d;return c.push(c.splice(_.indexOf(c,"string"),1)[0]),d=_.find(c,function(c){return b.types[c].test(a)}),d=_.isUndefined(d)?"string":d,d}}(this,_),function(a,_){var b=a.DS;b.View=function(a){a=a||(a={});if(_.isUndefined(a.parent))throw new Error("A view must have a parent specified.");return this.parent=a.parent,this._initialize(a),this},_.extend(b.View.prototype,b.Events,{_initialize:function(a){this.filter={columns:this._columnFilter(a.filter.columns||undefined),rows:this._rowFilter(a.filter.rows||undefined)},this._columns=this._selectData();var c=new b.Parsers;_.extend(this,c._cacheColumns(this),c._cacheRows(this)),this.parent.bind("change",this.sync,this)},sync:function(a){var c=a.deltas;_.each(c,function(c,d){var e=this._rowPositionById[c._id];if(typeof e=="undefined"&&b.Event.isAdd(c))this.filter.rows&&this.filter.rows(c.changed)&&this._add(c.changed);else{if(e==="undefined")return;_.each(c.changed,function(a,b){var c=this._columnPositionByName[b];if(_.isUndefined(c))return;this._columns[c].data[e]=a},this)}var f=this.rowByPosition(e);if(b.Event.isDelete(c)||this.filter.row&&!this.filter.row(f)){var g={_id:c._id,old:this.rowByPosition(e),changed:{}};a.deltas.splice(d,1,g),this._remove(e)}},this),this.trigger("change",a)},where:function(a,c){return c=c||{},c.parent=this,c.filter=a||{},new b.View(c)},_selectData:function(){var a=[];return _.each(this.parent._columns,function(b){this.filter.columns(b)&&a.push({name:b.name,data:[],type:b.type,_id:b._id})},this),this.parent.each(function(b){if(!this.filter.rows(b))return;for(var c=0;c<a.length;c++)a[c].data.push(b[a[c].name])},this),a},_columnFilter:function(a){var b;return _.isUndefined(a)?b=function(){return!0}:(a.push("_id"),b=function(b){return _.indexOf(a,b.name)===-1?!1:!0}),b},_rowFilter:function(a){var b;return _.isNumber(a)&&(a=[a]),_.isUndefined(a)?b=function(){return!0}:_.isFunction(a)?b=a:b=function(b){return _.indexOf(a,b._id)===-1?!1:!0},b},column:function(a){return new b.View({filter:{columns:[a]},parent:this})},_column:function(a){var b=this._columnPositionByName[a];return this._columns[b]},columns:function(a){return new b.View({filter:{columns:a},parent:this})},columnNames:function(){var a=_.pluck(this._columns,"name");return a.shift(),a},each:function(a,b){for(var c=0;c<this.length;c++)a.apply(b||this,[this.rowByPosition(c),c])},eachColumn:function(a,b){for(var c=1;c<this.length;c++)a.apply(b||this,[this._columns[c].name,c])},rowByPosition:function(a){return this._row(a)},rowById:function(a){return this._row(this._rowPositionById[a])},_row:function(a){var b={};return _.each(this._columns,function(c){b[c.name]=c.data[a]}),b},_remove:function(a){var b=this._rowPositionById[a];return _.each(this._columns,function(a){a.data.splice(b,1)}),delete this._rowPositionById[a],this._rowIdByPosition.splice(b,1),this.length--,this},_add:function(a,b){if(_.isUndefined(this.comparator))_.each(this._columns,function(b){b.data.push(a[b.name]?a[b.name]:null)}),this._rowIdByPosition.push(a._id),this._rowPositionById[a._id]=this._rowIdByPosition.length;else{var c=function(a,b,c){Array.prototype.splice.apply(c,[a,0].concat(b))},d;for(d=0;d<this.length;d++){var e=this.rowByPosition(d);if(this.comparator(a,e)<0){_.each(this._columns,function(b){c(d,a[b.name]?a[b.name]:null,b.data)});break}}this._rowIdByPosition=[],this._rowPositionById={},this.each(function(a,b){this._rowIdByPosition.push(a._id),this._rowPositionById[a._id]=b})}return this.length++,this},rows:function(a){return new b.View({filter:{rows:a},parent:this})},sort:function(a){a=a||{};if(_.isUndefined(this.comparator))throw new Error("Cannot sort without this.comparator.");var b=this.length,c;if(b===1)return;var d=_.bind(function(a,b){var c=this.rowByPosition(b);_.each(c,function(c,d){var e=this._columnPositionByName[d],f=this._columns[e].data[a];this._columns[e].data.splice(a,1,c),this._columns[e].data.splice(b,1,f)},this)},this),e=_.bind(function(a,b){var c=a,e;while(c*2<=b){e=c*2;var f=this.rowByPosition(c);e+1<b&&this.comparator(this.rowByPosition(e),this.rowByPosition(e+1))<0&&e++;if(this.comparator(f,this.rowByPosition(e))<0)d(c,e),c=e;else return}},this),f=function(a){var b=Math.round((a-2)/2);while(b>=0)e(b,a-1),b--};if(b>2){f(b),c=b-1;while(c>1)d(c,0),c--,e(0,c)}else this.comparator(this.rowByPosition(0),this.rowByPosition(1))>0&&d(0,1);this.trigger("sort")}})}(this,_),function(a,_,moment){var b=a.DS;b.Dataset=function(a){return a=a||(a={}),this._initialize(a),this},_.extend(b.Dataset.prototype,b.View.prototype,{_initialize:function(a){var c=a.importer||null,d=a.parser||b.Parsers.Obj;_.isUndefined(a.parser)&&(a.strict?d=b.Parsers.Strict:a.delimiter?d=b.Parsers.Delimited:a.google_spreadsheet&&(d=b.Parsers.GoogleSpreadsheet));var e=_.extend({},a,{parser:d});a.delimiter&&(e.dataType="text"),a.google_spreadsheet&&_.extend(e,a.google_spreadsheet),c===null&&(a.url?c=b.Importers.Remote:a.google_spreadsheet?(c=b.Importers.GoogleSpreadsheet,delete a.google_spreadsheet):c=b.Importers.Local),c=new c(e),a.comparator&&(this.comparator=a.comparator),c!==null&&c.fetch(_.extend({success:_.bind(function(b){_.extend(this,b),this.comparator&&this.sort(),a.ready&&a.ready.call(this)},this)},a))},add:function(a,b){a._id||(a._id=_.uniqueId()),this._add(a,b);if(!b||!b.silent)this.trigger("add",this._buildEvent({changed:a})),this.trigger("change",this._buildEvent({changed:a}))},remove:function(a,b){a=this._rowFilter(a);var c=[];this.each(function(b,d){a(b)&&(this._remove(b._id),c.push({old:b}))});if(!b||!b.silent){var d=this._buildEvent(c);this.trigger("change",d),this.trigger("remove",d)}},update:function(a,c,d){a=this._rowFilter(a);var e=_.keys(c),f=[];this.each(function(d,g){a(d)&&(_.each(this._columns,function(a){if(_.indexOf(e,a.name)!==-1){if(a.type!=="untyped"&&a.type!==b.typeOf(c[a.name]))throw"incorrect value '"+c[a.name]+"' of type "+b.typeOf(c[a.name])+" passed to column with type "+a.type;a.data[g]=c[a.name]}},this),f.push({_id:d._id,old:d,changed:c}))},this);if(!d||!d.silent){var g=this._buildEvent(f);this.trigger("change",g),this.trigger("remove",g)}}})}(this,_,moment),function(a,_){var b=a.DS,c=b.Product||function(){return b.Product=function(a){a=a||(a={}),this.func=a.func;if(a.columns){var b=a.columns;_.isArray(a.columns)&&(b=a.columns[0]),this.valuetype=b.type,this.numeric=function(){return b.toNumeric(this.value)}}return this.value=this.func({silent:!0}),this},b.Product}();_.extend(c.prototype,b.Events,{sync:function(a){this.value=this.func()},val:function(){return this.value},type:function(){return this.valuetype},_buildDelta:function(a,b){return{old:a,changed:b}}}),_.extend(b.Dataset.prototype,{sum:function(a){a=this._columnsToArray(a);var b=this._toColumnObjects(a);return this.calculated(b,function(a){return function(){var b=0;for(var c=0;c<a.length;c++)b+=_.sum(a[c].data);return b}}(b))},_columnsToArray:function(a){return _.isUndefined(a)&&(a=this.columnNames()),a=_.isArray(a)?a:[a],a},_toColumnObjects:function(a){var b=[];return _.each(a,function(a){a=this._columns[this._columnPositionByName[a]],b.push(a)},this),b},max:function(a){a=this._columnsToArray(a);var c=this._toColumnObjects(a);return this.calculated(c,function(a){return function(){var c=-Infinity,d;for(var e=0;e<a.length;e++){d=a[e];for(var f=0;f<d.data.length;f++)b.types[d.type].compare(d.data[f],c)>0&&(c=d.numericAt(f))}var g=d.type,h=d.typeOptions;return b.types[g].coerce(c,h)}}(c))},min:function(a){a=this._columnsToArray(a);var c=this._toColumnObjects(a);return this.calculated(c,function(a){return function(){var c=Infinity,d;for(var e=0;e<a.length;e++){d=a[e];for(var f=0;f<d.data.length;f++)b.types[d.type].compare(d.data[f],c)<0&&(c=d.numericAt(f))}var g=d.type,h=d.typeOptions;return b.types[g].coerce(c,h)}}(c))},mean:function(a){},mode:function(a){},calculated:function(a,b){var d=this,e=new c({columns:a,func:function(a){a=a||{};var c=this._buildDelta(this.value,b.apply(d)),e=this._buildEvent("change",c);return!_.isUndefined(c.old)&&!a.silent&&c.old!==c.changed&&this.trigger("change",e),c.changed}});return this.bind("change",e.sync,e),e}})}(this,_),function(a,_){var b=a.DS=a.DS||{};_.extend(a.DS.Dataset.prototype,{movingAverage:function(a,b){},groupBy:function(a,c,d){d=d||function(a){return _.reduce(a,function(a,b){return a+b},0)};var e={_columns:[]},f=new b.Parsers,g=_.union([a],c);_.each(g,function(a){var b=e._columns.push(_.clone(this._columns[this._columnPositionByName[a]]));e._columns[e._columns.length-1].data=[]},this),e=f._cacheColumns(e);var h={},i=0,j=e._columnPositionByName[a];for(var k=0;k<this.length;k++){var l=this._columns[this._columnPositionByName[a]].data[k];_.isUndefined(h[l])&&(h[l]=i,_.each(c,function(a){var b=e._columns[e._columnPositionByName[a]];b.data[i]=[]}),e._columns[e._columnPositionByName[a]].data[i]=l,i++),_.each(c,function(a){var b=e._columns[e._columnPositionByName[a]],c=this._columns[this._columnPositionByName[a]].data[k],d=h[l];b.data[d].push(c)},this)}_.each(c,function(a){var b=e._columns[e._columnPositionByName[a]];_.each(b.data,function(a,c){_.isArray(a)&&(b.data[c]=d.call(this,a))})},this),e.columns=e._columns,delete e._columns;var m=new b.Dataset({data:e,strict:!0});return m}})}(this,_),function(a,_){var b=a.DS||(a.DS={});b.Parsers=function(){},_.extend(b.Parsers.prototype,{_buildColumn:function(a,b,c){return{_id:_.uniqueId(),name:a,type:b,data:c||[]}},build:function(a){var b={};return this._buildColumns(b),this._setTypes(b,this.options),this._detectTypes(b),this._coerceTypes(b),this._cacheColumns(b),this._cacheRows(b),b},_coerceTypes:function(a){return _.each(a._columns,function(a,c){a.toNumeric=b.types[a.type].numeric,a.numericAt=function(b){return a.toNumeric(a.data[b],b)},a.data=_.map(a.data,function(c){return b.types[a.type].coerce(c,a.typeOptions)})}),a},_setTypes:function(a,b){b.columnTypes=b.columnTypes||{},_.each(a._columns,function(a){var c=b.columnTypes[a.name];c&&(_.isObject(c)?(a.type=c.type,delete c.type,a.typeOptions=c):a.type=c)})},_addValue:function(a,b,c){var d=a._columnPositionByName[b];a._columns[d].data.push(c)},_detectTypes:function(a,c){return _.each(a._columns,function(a){if(_.isUndefined(a.type)||a.type===null){var d=_.inject(a.data.slice(0,c||5),function(a,c){var d=b.typeOf(c);return c!==""&&a.indexOf(d)==-1&&!_.isNull(c)&&a.push(d),a},[]);if(d.length===1)a.type=d[0];else if(d.length===0)a.type="number";else throw new Error("This column seems to have mixed types")}}),a},_cacheColumns:function(a){return a._columnPositionByName={},_.each(a._columns,function(b,c){a._columnPositionByName[b.name]=c}),a},_cacheRows:function(a){a._rowPositionById={},a._rowIdByPosition=[],_.each(a._columns[a._columnPositionByName._id].data,function(b,c){a._rowPositionById[b]=c,a._rowIdByPosition.push(b)});var b=_.uniq(_.map(a._columns,function(a){return a.data.length}));if(b.length>1)throw new Error("Row lengths need to be the same. Empty values should be set to null."+_.map(a._columns,function(a){return a.data+"|||"}));return a.length=b[0],a},_addIdColumn:function(a,b){var c=[];return b&&b>0&&_.times(b,function(){c.push(_.uniqueId())}),a._columns.unshift(this._buildColumn("_id","number",c)),a},parse:function(a){return a}}),b.Parsers.Strict=function(a,b){this.options=b||{},this._data=this.parse(a)},_.extend(b.Parsers.Strict.prototype,b.Parsers.prototype,{_buildColumns:function(a){return a._columns=this._data._columns,_.each(a._columns,function(a){typeof a._id=="undefined"&&(a._id=_.uniqueId())}),_.pluck(a._columns,"name").indexOf("_id")===-1&&this._addIdColumn(this._data,a._columns[0].data.length),a}}),b.Parsers.Obj=function(a,b){this.options=b||{},this._data=a},_.extend(b.Parsers.Obj.prototype,b.Parsers.prototype,{_buildColumns:function(a,b){a._columns=[];var c=_.keys(this._data[0]);return _.each(c,function(b){a._columns.push(this._buildColumn(b,null))},this),this._addIdColumn(a),this._cacheColumns(a),_.map(this._data,function(b){_.each(b,function(b,c){this._addValue(a,c,b)},this),this._addValue(a,"_id",_.uniqueId())},this),a},build:function(a){var b={};return this._buildColumns(b),this._setTypes(b,this.options),this._detectTypes(b),this._coerceTypes(b),this._cacheRows(b),b}}),b.Parsers.Delimited=function(a,b){this.options=b||{},this.delimiter=this.options.delimiter||",",this._data=a,this.__delimiterPatterns=new RegExp("(\\"+this.delimiter+"|\\r?\\n|\\r|^)"+'(?:"([^"]*(?:""[^"]*)*)"|'+'([^"\\'+this.delimiter+"\\r\\n]*))","gi")},_.extend(b.Parsers.Delimited.prototype,b.Parsers.prototype,{_buildColumns:function(a,b){a._columns=[];var c=function(b,c,d){d=d||",";var e=null,f=0,g=!1,h=-1;while(e=b.exec(c)){var i=e[1];i.length&&i!==d?(g=!0,h=0):(g||f++,h++);var j=null;e[2]?j=e[2].replace(new RegExp('""',"g"),'"'):j=e[3],g?a._columns[h].data.push(j):a._columns.push({name:j,data:[],_id:_.uniqueId()})}return a};return c(this.__delimiterPatterns,this._data,this.delimiter),this._addIdColumn(a,a._columns[0].data.length),a}});var c={url:"",data:"",dataType:"",success:function(){},type:"GET",async:!0,xhr:function(){return new a.XMLHttpRequest}},d=/\?/;b.Xhr=function(a){a.dataType=a.dataType&&a.dataType.toLowerCase()||null;if(!(!a.dataType||a.dataType!=="jsonp"&&a.dataType!=="script")){b.Xhr.getJSONP(a.url,a.success,a.dataType==="script");return}var e=_.extend({},c,a);e.ajax=e.xhr();if(e.ajax)return e.type==="GET"&&e.data&&(e.url+=(d.test(e.url)?"&":"?")+e.data,e.data=null),e.ajax.open(e.type,e.url,e.async),e.ajax.send(e.data||null),b.Xhr.httpData(e)},b.Xhr.getJSONP=function(a,b,c){if(c){var d=document.querySelectorAll('script[src="'+a+'"]');if(d.length){b&&b(!0);return}}var e=document.head||document.getElementsByTagName("head")[0]||document.documentElement,f=document.createElement("script"),g=a.split("?")[1],h=!1,i=[],j,k,l;g&&!c&&(i=g.split("&")),i.length&&(k=i[i.length-1].split("=")),j=i.length?k[1]?k[1]:k[0]:"jsonp",!g&&!c&&(a+="?callback="+j),j&&!c&&(!window[j]||(j=j+ +(new Date)+_.uniqueId()),window[j]=function(a){b&&b(a),h=!0},a=a.replace(k.join("="),k[0]+"="+j)),f.onload=f.onreadystatechange=function(){if(!f.readyState||/loaded|complete/.test(f.readyState))c&&b&&b(),h&&(delete window[j],e.removeChild(f))},f.src=a,e.insertBefore(f,e.firstChild);return},b.Xhr.httpData=function(a){var b,c=null;return a.ajax.onreadystatechange=function(){if(a.ajax.readyState===4){try{c=JSON.parse(a.ajax.responseText)}catch(d){}b={xml:a.ajax.responseXML,text:a.ajax.responseText,json:c},a.dataType&&(b=b[a.dataType]),a.success.call(a.ajax,b)}},b},b.Importers=function(a,b){},b.Importers.prototype.extract=function(a){return a=_.clone(a),a._columns=a.columns,delete a.columns,a},b.Importers.Local=function(a){this.options=a||(a={}),this.options.extract&&(this.extract=this.options.extract),this.data=a.data,this.parser=this.options.parser||b.Importer.Obj},_.extend(b.Importers.Local.prototype,b.Importers.prototype,{fetch:function(a){this.data=this.extract(this.data),this.parser=new this.parser(this.data,_.extend({},this.options,a));var b=this.parser.build();a.success(b)}}),b.Importers.Remote=function(a){a=a||{},this._url=a.url,a.extract&&(this.extract=a.extract),this.parser=a.parser||b.Parsers.Obj,this.params={type:"GET",url:this._url,dataType:a.dataType?a.dataType:a.jsonp?"jsonp":"json"}},_.extend(b.Importers.Remote.prototype,b.Importers.prototype,{fetch:function(a){var c=_.bind(function(b){b=this.extract(b),this.parser=new this.parser(b,a);var c=this.parser.build();a.success(c)},this);b.Xhr(_.extend(this.params,{success:c}))}})}(this,_),function(a,_){var b=a.DS||(a.DS={});b.Parsers.GoogleSpreadsheet=function(a,b){this.options=b||{},this._data=a},_.extend(b.Parsers.GoogleSpreadsheet.prototype,b.Parsers.prototype,{_buildColumns:function(a,b){a._columns=[];var c=/([A-Z]+)(\d+)/,d={};return _.each(this._data.feed.entry,function(b,e){var f=c.exec(b.title.$t),g=f[1],h=parseInt(f[2],10);if(_.isUndefined(d[g]))d[g]=a._columns.length,a._columns.push(this._buildColumn(b.content.$t,null,[]));else{var i=d[g];a._columns[i].data[h-1]=b.content.$t}},this),a.length=_.max(a._columns,function(a){return a.data.length}).data.length-1,_.each(a._columns,function(b,c){b.data.splice(0,1);for(var d=0;d<a.length;d++)if(_.isUndefined(b.data[d])||b.data[d]==="")b.data[d]=null}),_.pluck(a._columns,"name").indexOf("_id")===-1&&this._addIdColumn(a,a._columns[0].data.length),a}}),b.Importers.GoogleSpreadsheet=function(a){a=a||{};if(a.url)a.url=a.url;else{if(_.isUndefined(a.key))throw new Error("Set options.key to point to your google document.");a.worksheet=a.worksheet||1,a.url="https://spreadsheets.google.com/feeds/cells/"+a.key+"/"+a.worksheet+"/public/basic?alt=json-in-script&callback=",delete a.key,delete a.worksheet}return this.parser=b.Parsers.GoogleSpreadsheet,this.params={type:"GET",url:a.url,dataType:"jsonp"},this},_.extend(b.Importers.GoogleSpreadsheet.prototype,b.Importers.Remote.prototype)}(this,_),function(a,_){var b=a.DS||(a.DS={});b.Parsers.Delimited=function(a,b){this.options=b||{},this.delimiter=this.options.delimiter||",",this._data=a,this.__delimiterPatterns=new RegExp("(\\"+this.delimiter+"|\\r?\\n|\\r|^)"+'(?:"([^"]*(?:""[^"]*)*)"|'+'([^"\\'+this.delimiter+"\\r\\n]*))","gi")},_.extend(b.Parsers.Delimited.prototype,b.Parsers.prototype,{_buildColumns:function(a,b){a._columns=[];var c=function(b,c,e){e=e||",";var f=null,g=0,h=!1,i=-1;while(f=b.exec(c)){var j=f[1];j.length&&j!==e?(h=!0,i=0):(h||g++,i++);var k=null;f[2]?k=f[2].replace(new RegExp('""',"g"),'"'):k=f[3],h?a._columns[i].data.push(k):a._columns.push({name:k,data:[],_id:_.uniqueId()})}return a};return c(this.__delimiterPatterns,this._data,this.delimiter),this._addIdColumn(a,a._columns[0].data.length),a}})}(this,_)
0  dist/miso.ds.js → dist/miso.ds.0.1.0.js
File renamed without changes
0  dist/miso.ds.deps.js → dist/miso.ds.deps.0.1.0.js
File renamed without changes
0  dist/miso.ds.deps.min.js → dist/miso.ds.deps.min.0.1.0.js
File renamed without changes
BIN  dist/miso.ds.dev.zip → dist/miso.ds.dev.0.1.0.zip
Binary file not shown
0  dist/miso.ds.min.js → dist/miso.ds.min.0.1.0.js
File renamed without changes
0  dist/node/miso.ds.deps.js → dist/node/miso.ds.deps.0.1.0.js
File renamed without changes
115  grunt.js
@@ -18,45 +18,55 @@ module.exports = function(grunt) {
18 18
 
19 19
     node: {
20 20
       wrapper: "src/node/compat.js",
21  
-      misoLib: "dist/miso.ds.js",
  21
+      misoLib: "dist/miso.ds.<%= pkg.version %>.js",
22 22
       _Math: "lib/underscore.math.js"
23 23
     },
24 24
 
25  
-    concat : {
26  
-      "dist/miso.ds.js" : [
27  
-        "<banner>",
28  
-        "src/types.js",
29  
-        "src/sync.js",
30  
-        "src/builder.js",
31  
-        "src/view.js",
32  
-        "src/product.js",
33  
-        "src/dataset.js",
34  
-        "src/derived.js",
35  
-        "src/importer.js",
36  
-        "src/importers/local.js",
37  
-        "src/importers/remote.js",
38  
-        "src/importers/polling.js",
39  
-        "src/importers/google_spreadsheet.js",
40  
-        "src/parser.js",
41  
-        "src/parsers/strict.js",
42  
-        "src/parsers/object.js",
43  
-        "src/parsers/google_spreadsheet.js",
44  
-        "src/parsers/delimited.js"
45  
-      ],
46 25
 
47  
-      "dist/miso.ds.deps.js" : [
48  
-        "<banner>",
49  
-        "lib/moment.js",
50  
-        "lib/underscore.js",
51  
-        "lib/underscore.math.js",
52  
-        "lib/underscore.deferred.js",
53  
-        "dist/miso.ds.js"
54  
-      ],
  26
+    concat : {
  27
+      fullnodeps: {
  28
+        dest: "dist/miso.ds.<%= pkg.version %>.js",
  29
+        src: [
  30
+          "<banner>",
  31
+          "src/types.js",
  32
+          "src/sync.js",
  33
+          "src/builder.js",
  34
+          "src/view.js",
  35
+          "src/product.js",
  36
+          "src/dataset.js",
  37
+          "src/derived.js",
  38
+          "src/importer.js",
  39
+          "src/importers/local.js",
  40
+          "src/importers/remote.js",
  41
+          "src/importers/polling.js",
  42
+          "src/importers/google_spreadsheet.js",
  43
+          "src/parser.js",
  44
+          "src/parsers/strict.js",
  45
+          "src/parsers/object.js",
  46
+          "src/parsers/google_spreadsheet.js",
  47
+          "src/parsers/delimited.js"
  48
+        ]
  49
+      },
55 50
 
56  
-      "dist/development/miso.ds.js" : [
57  
-        "dist/miso.ds.js"
58  
-      ],
  51
+      fulldeps: {
  52
+        dest : "dist/miso.ds.deps.<%= pkg.version %>.js",
  53
+        src : [
  54
+          "<banner>",
  55
+          "lib/moment.js",
  56
+          "lib/underscore.js",
  57
+          "lib/underscore.math.js",
  58
+          "lib/underscore.deferred.js",
  59
+          "dist/miso.ds.<%= pkg.version %>.js"
  60
+        ]
  61
+      },
59 62
 
  63
+      devnodeps : {
  64
+        dest : "dist/development/miso.ds.<%= pkg.version %>.js",
  65
+        src : [
  66
+          "dist/miso.ds.<%= pkg.version %>.js" 
  67
+        ]
  68
+      },
  69
+     
60 70
       "dist/development/lib/moment.js" : [
61 71
         "lib/moment.js"
62 72
       ],
@@ -73,28 +83,37 @@ module.exports = function(grunt) {
73 83
         "lib/underscore.deferred.js"
74 84
       ],
75 85
 
76  
-      "dist/LASTBUILD" : [
77  
-        "<banner:meta.lastbuild>"
78  
-      ]
  86
+      buildstatus : {
  87
+        dest : "dist/LASTBUILD",
  88
+        src : [
  89
+          "<banner:meta.lastbuild>"
  90
+        ]
  91
+      }
79 92
     },
80 93
 
81 94
     min : {
82  
-      "dist/miso.ds.min.js" : [
83  
-        "<banner>",
84  
-        "dist/miso.ds.js"
85  
-      ],
86  
-
87  
-      "dist/miso.ds.deps.min.js" : [
88  
-        "<banner>",
89  
-        "dist/miso.ds.deps.js"
90  
-      ]
  95
+      minnodeps : {
  96
+        dest : "dist/miso.ds.min.<%= pkg.version %>.js",
  97
+        src : [
  98
+          "<banner>",
  99
+          "dist/miso.ds.<%= pkg.version %>.js" 
  100
+        ]
  101
+      },
  102
+      
  103
+      mindeps : {
  104
+        dest : "dist/miso.ds.deps.min.<%= pkg.version %>.js",
  105
+        src : [
  106
+          "<banner>",
  107
+          "dist/miso.ds.deps.<%= pkg.version %>.js" 
  108
+        ]
  109
+      }
91 110
     },
92 111
 
93 112
     zip: {
94 113
       development: {
95 114
         cwd : 'dist',
96 115
         src: 'development',
97  
-        dest: 'miso.ds.dev.zip',
  116
+        dest: 'miso.ds.dev.<%= pkg.version %>.zip',
98 117
         deletesrc : true
99 118
       }
100 119
     },
@@ -262,11 +281,11 @@ module.exports = function(grunt) {
262 281
 
263 282
     var output = grunt.template.process(read(nodeConfig.wrapper), {
264 283
       underscoreMath: read(nodeConfig._Math),
265  
-      misoDataSet: read(nodeConfig.misoLib)
  284
+      misoDataSet: read(grunt.template.process(nodeConfig.misoLib))
266 285
     });
267 286
 
268 287
     // Write the contents out
269  
-    grunt.file.write("dist/node/miso.ds.deps.js", output);
  288
+    grunt.file.write("dist/node/miso.ds.deps." + grunt.template.process(grunt.config("pkg").version) + ".js", output);
270 289
   });
271 290
 
272 291
   // Default task.
2  package.json
@@ -21,7 +21,7 @@
21 21
     }
22 22
   ],
23 23
 
24  
-  "main": "dist/node/miso.ds.deps",
  24
+  "main": "dist/node/miso.ds.deps.0.1.0",
25 25
 
26 26
   "repository": {
27 27
     "type": "git",

0 notes on commit c0426b0

Please sign in to comment.
Something went wrong with that request. Please try again.