imdone
Version:
A task board and wiki in one!
5 lines • 83.1 kB
JavaScript
(function e(b,g,d){function c(m,j){if(!g[m]){if(!b[m]){var i=typeof require=="function"&&require;if(!j&&i){return i(m,!0)}if(a){return a(m,!0)}var k=new Error("Cannot find module '"+m+"'");throw k.code="MODULE_NOT_FOUND",k}var h=g[m]={exports:{}};b[m][0].call(h.exports,function(l){var o=b[m][1][l];return c(o?o:l)},h,h.exports,e,b,g,d)}return g[m].exports}var a=typeof require=="function"&&require;for(var f=0;f<d.length;f++){c(d[f])}return c})({1:[function(require,module,exports){(function(exports){if(typeof exports.decycle!=="function"){exports.decycle=function decycle(object){var objects=[],paths=[];return(function derez(value,path){var i,name,nu;switch(typeof value){case"object":if(!value){return null}for(i=0;i<objects.length;i+=1){if(objects[i]===value){return{$ref:paths[i]}}}objects.push(value);paths.push(path);if(Object.prototype.toString.apply(value)==="[object Array]"){nu=[];for(i=0;i<value.length;i+=1){nu[i]=derez(value[i],path+"["+i+"]")}}else{nu={};for(name in value){if(Object.prototype.hasOwnProperty.call(value,name)){nu[name]=derez(value[name],path+"["+JSON.stringify(name)+"]")}}}return nu;case"number":case"string":case"boolean":return value}}(object,"$"))}}if(typeof exports.retrocycle!=="function"){exports.retrocycle=function retrocycle($){var px=/^\$(?:\[(?:\d+|\"(?:[^\\\"\u0000-\u001f]|\\([\\\"\/bfnrt]|u[0-9a-zA-Z]{4}))*\")\])*$/;(function rez(value){var i,item,name,path;if(value&&typeof value==="object"){if(Object.prototype.toString.apply(value)==="[object Array]"){for(i=0;i<value.length;i+=1){item=value[i];if(item&&typeof item==="object"){path=item.$ref;if(typeof path==="string"&&px.test(path)){value[i]=eval(path)}else{rez(item)}}}}else{for(name in value){if(typeof value[name]==="object"){item=value[name];if(item){path=item.$ref;if(typeof path==="string"&&px.test(path)){value[name]=eval(path)}else{rez(item)}}}}}}}($));return $}}})((typeof exports!=="undefined")?exports:(window.JSON?(window.JSON):(window.JSON={})))},{}],2:[function(b,d,a){var f=b("./json2");var c=b("./cycle");f.decycle=c.decycle;f.retrocycle=c.retrocycle;d.exports=f},{"./cycle":1,"./json2":3}],3:[function(require,module,exports){(function(JSON){function f(n){return n<10?"0"+n:n}if(typeof exports==="undefined"){if(typeof Date.prototype.toJSON!=="function"){Date.prototype.toJSON=function(key){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null}}if(typeof String.prototype.toJSON!=="function"){String.prototype.toJSON=function(key){return this.valueOf()}}if(typeof Number.prototype.toJSON!=="function"){Number.prototype.toJSON=function(key){return this.valueOf()}}if(typeof Boolean.prototype.toJSON!=="function"){Boolean.prototype.toJSON=function(key){return this.valueOf()}}}var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;function quote(string){escapable.lastIndex=0;return escapable.test(string)?'"'+string.replace(escapable,function(a){var c=meta[a];return typeof c==="string"?c:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+string+'"'}function str(key,holder){var i,k,v,length,mind=gap,partial,value=holder[key];if(value&&typeof value==="object"&&typeof value.toJSON==="function"){value=value.toJSON(key)}if(typeof rep==="function"){value=rep.call(holder,key,value)}switch(typeof value){case"string":return quote(value);case"number":return isFinite(value)?String(value):"null";case"boolean":case"null":return String(value);case"object":if(!value){return"null"}gap+=indent;partial=[];if(Object.prototype.toString.apply(value)==="[object Array]"){length=value.length;for(i=0;i<length;i+=1){partial[i]=str(i,value)||"null"}v=partial.length===0?"[]":gap?"[\n"+gap+partial.join(",\n"+gap)+"\n"+mind+"]":"["+partial.join(",")+"]";gap=mind;return v}if(rep&&typeof rep==="object"){length=rep.length;for(i=0;i<length;i+=1){if(typeof rep[i]==="string"){k=rep[i];v=str(k,value);if(v){partial.push(quote(k)+(gap?": ":":")+v)}}}}else{for(k in value){if(Object.prototype.hasOwnProperty.call(value,k)){v=str(k,value);if(v){partial.push(quote(k)+(gap?": ":":")+v)}}}}v=partial.length===0?"{}":gap?"{\n"+gap+partial.join(",\n"+gap)+"\n"+mind+"}":"{"+partial.join(",")+"}";gap=mind;return v}}if(typeof JSON.stringify!=="function"){JSON.stringify=function(value,replacer,space){var i;gap="";indent="";if(typeof space==="number"){for(i=0;i<space;i+=1){indent+=" "}}else{if(typeof space==="string"){indent=space}}rep=replacer;if(replacer&&typeof replacer!=="function"&&(typeof replacer!=="object"||typeof replacer.length!=="number")){throw new Error("JSON.stringify")}return str("",{"":value})}}if(typeof JSON.parse!=="function"){JSON.parse=function(text,reviver){var j;function walk(holder,key){var k,v,value=holder[key];if(value&&typeof value==="object"){for(k in value){if(Object.prototype.hasOwnProperty.call(value,k)){v=walk(value,k);if(v!==undefined){value[k]=v}else{delete value[k]}}}}return reviver.call(holder,key,value)}text=String(text);cx.lastIndex=0;if(cx.test(text)){text=text.replace(cx,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})}if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){j=eval("("+text+")");return typeof reviver==="function"?walk({"":j},""):j}throw new SyntaxError("JSON.parse")}}})((typeof exports!=="undefined")?exports:(window.JSON?(window.JSON):(window.JSON={})))},{}],4:[function(c,d,b){d.exports=f;function f(g){if(g){return a(g)}}function a(h){for(var g in f.prototype){h[g]=f.prototype[g]}return h}f.prototype.on=f.prototype.addEventListener=function(h,g){this._callbacks=this._callbacks||{};(this._callbacks[h]=this._callbacks[h]||[]).push(g);return this};f.prototype.once=function(j,i){var h=this;this._callbacks=this._callbacks||{};function g(){h.off(j,g);i.apply(this,arguments)}g.fn=i;this.on(j,g);return this};f.prototype.off=f.prototype.removeListener=f.prototype.removeAllListeners=f.prototype.removeEventListener=function(l,j){this._callbacks=this._callbacks||{};if(0==arguments.length){this._callbacks={};return this}var k=this._callbacks[l];if(!k){return this}if(1==arguments.length){delete this._callbacks[l];return this}var g;for(var h=0;h<k.length;h++){g=k[h];if(g===j||g.fn===j){k.splice(h,1);break}}return this};f.prototype.emit=function(l){this._callbacks=this._callbacks||{};var h=[].slice.call(arguments,1),k=this._callbacks[l];if(k){k=k.slice(0);for(var j=0,g=k.length;j<g;++j){k[j].apply(this,h)}}return this};f.prototype.listeners=function(g){this._callbacks=this._callbacks||{};return this._callbacks[g]||[]};f.prototype.hasListeners=function(g){return !!this.listeners(g).length}},{}],5:[function(b,c,a){
/*!
* domready (c) Dustin Diaz 2012 - License MIT
*/
!function(d,f){if(typeof c!="undefined"){c.exports=f()}else{if(typeof define=="function"&&typeof define.amd=="object"){define(f)}else{this[d]=f()}}}("domready",function(m){var r=[],l,k=false,n=document,g=n.documentElement,q=g.doScroll,d="DOMContentLoaded",h="addEventListener",p="onreadystatechange",j="readyState",s=q?/^loaded|^c/:/^loaded|c/,i=s.test(n[j]);function o(t){i=1;while(t=r.shift()){t()}}n[h]&&n[h](d,l=function(){n.removeEventListener(d,l,k);o()},k);q&&n.attachEvent(p,l=function(){if(/^c/.test(n[j])){n.detachEvent(p,l);o()}});return(m=q?function(f){self!=top?i?f():r.push(f):function(){try{g.doScroll("left")}catch(t){return setTimeout(function(){m(f)},50)}f()}()}:function(f){i?f():r.push(f)})})},{}],6:[function(b,c,a){(function(d,f){if(typeof a=="object"){c.exports=f()}else{if(typeof define=="function"&&define.amd){define(f)}else{d.Spinner=f()}}}(this,function(){var i=["webkit","Moz","ms","O"],s={},r;function k(t,w){var u=document.createElement(t||"div"),v;for(v in w){u[v]=w[v]}return u}function l(u){for(var t=1,v=arguments.length;t<v;t++){u.appendChild(arguments[t])}return u}var m=(function(){var t=k("style",{type:"text/css"});l(document.getElementsByTagName("head")[0],t);return t.sheet||t.styleSheet}());function g(x,t,y,C){var u=["opacity",t,~~(x*100),y,C].join("-"),v=0.01+y/C*100,B=Math.max(1-(1-x)/t*(100-v),x),A=r.substring(0,r.indexOf("Animation")).toLowerCase(),w=A&&"-"+A+"-"||"";if(!s[u]){m.insertRule("@"+w+"keyframes "+u+"{0%{opacity:"+B+"}"+v+"%{opacity:"+x+"}"+(v+0.01)+"%{opacity:1}"+(v+t)%100+"%{opacity:"+x+"}100%{opacity:"+B+"}}",m.cssRules.length);s[u]=1}return u}function p(w,x){var v=w.style,t,u;x=x.charAt(0).toUpperCase()+x.slice(1);for(u=0;u<i.length;u++){t=i[u]+x;if(v[t]!==undefined){return t}}if(v[x]!==undefined){return x}}function j(t,v){for(var u in v){t.style[p(t,u)||u]=v[u]}return t}function n(v){for(var t=1;t<arguments.length;t++){var u=arguments[t];for(var w in u){if(v[w]===undefined){v[w]=u[w]}}}return v}function q(u,t){return typeof u=="string"?u:u[t%u.length]}var h={lines:12,length:7,width:5,radius:10,rotate:0,corners:1,color:"#000",direction:1,speed:1,trail:100,opacity:1/4,fps:20,zIndex:2000000000,className:"spinner",top:"50%",left:"50%",position:"absolute"};function f(t){this.opts=n(t||{},f.defaults,h)}f.defaults={};n(f.prototype,{spin:function(C){this.stop();var E=this,u=E.opts,v=E.el=j(k(0,{className:u.className}),{position:u.position,width:0,zIndex:u.zIndex});j(v,{left:u.left,top:u.top});if(C){C.insertBefore(v,C.firstChild||null)}v.setAttribute("role","progressbar");E.lines(v,E.opts);if(!r){var z=0,t=(u.lines-1)*(1-u.direction)/2,y,w=u.fps,B=w/u.speed,A=(1-u.opacity)/(B*u.trail/100),D=B/u.lines;(function x(){z++;for(var F=0;F<u.lines;F++){y=Math.max(1-(z+(u.lines-F)*D)%B*A,u.opacity);E.opacity(v,F*u.direction+t,y,u)}E.timeout=E.el&&setTimeout(x,~~(1000/w))})()}return E},stop:function(){var t=this.el;if(t){clearTimeout(this.timeout);if(t.parentNode){t.parentNode.removeChild(t)}this.el=undefined}return this},lines:function(v,x){var u=0,y=(x.lines-1)*(1-x.direction)/2,t;function w(z,A){return j(k(),{position:"absolute",width:(x.length+x.width)+"px",height:x.width+"px",background:z,boxShadow:A,transformOrigin:"left",transform:"rotate("+~~(360/x.lines*u+x.rotate)+"deg) translate("+x.radius+"px,0)",borderRadius:(x.corners*x.width>>1)+"px"})}for(;u<x.lines;u++){t=j(k(),{position:"absolute",top:1+~(x.width/2)+"px",transform:x.hwaccel?"translate3d(0,0,0)":"",opacity:x.opacity,animation:r&&g(x.opacity,x.trail,y+u*x.direction,x.lines)+" "+1/x.speed+"s linear infinite"});if(x.shadow){l(t,j(w("#000","0 0 4px #000"),{top:2+"px"}))}l(v,l(t,w(q(x.color,u),"0 0 1px rgba(0,0,0,.1)")))}return v},opacity:function(u,t,v){if(t<u.childNodes.length){u.childNodes[t].style.opacity=v}}});function o(){function t(v,u){return k("<"+v+' xmlns="urn:schemas-microsoft.com:vml" class="spin-vml">',u)}m.addRule(".spin-vml","behavior:url(#default#VML)");f.prototype.lines=function(w,v){var u=v.length+v.width,C=2*u;function B(){return j(t("group",{coordsize:C+" "+C,coordorigin:-u+" "+-u}),{width:C,height:C})}var x=-(v.width+v.length)*2+"px",A=j(B(),{position:"absolute",top:x,left:x}),z;function y(E,D,F){l(A,l(j(B(),{rotation:360/v.lines*E+"deg",left:~~D}),l(j(t("roundrect",{arcsize:v.corners}),{width:u,height:v.width,left:v.radius,top:-v.width>>1,filter:F}),t("fill",{color:q(v.color,E),opacity:v.opacity}),t("stroke",{opacity:0}))))}if(v.shadow){for(z=1;z<=v.lines;z++){y(z,-2,"progid:DXImageTransform.Microsoft.Blur(pixelradius=2,makeshadow=1,shadowopacity=.3)")}}for(z=1;z<=v.lines;z++){y(z)}return l(w,A)};f.prototype.opacity=function(v,u,x,w){var y=v.firstChild;w=w.shadow&&w.lines||0;if(y&&u+w<y.childNodes.length){y=y.childNodes[u+w];y=y&&y.firstChild;y=y&&y.firstChild;if(y){y.opacity=x}}}}var d=j(k("group"),{behavior:"url(#default#VML)"});if(!p(d,"transform")&&d.adj){o()}else{r=p(d,"animation")}return f}))},{}],7:[function(i,b,t){var l=i("emitter");var k=i("reduce");var p="undefined"==typeof window?this:window;function f(){}function m(u){var v={}.toString.call(u);switch(v){case"[object File]":case"[object Blob]":case"[object FormData]":return true;default:return false}}function n(){if(p.XMLHttpRequest&&("file:"!=p.location.protocol||!p.ActiveXObject)){return new XMLHttpRequest}else{try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(u){}try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(u){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(u){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(u){}}return false}var r="".trim?function(u){return u.trim()}:function(u){return u.replace(/(^\s*|\s*$)/g,"")};function j(u){return u===Object(u)}function o(w){if(!j(w)){return w}var v=[];for(var u in w){if(null!=w[u]){v.push(encodeURIComponent(u)+"="+encodeURIComponent(w[u]))}}return v.join("&")}d.serializeObject=o;function h(A){var y={};var w=A.split("&");var x;var z;for(var v=0,u=w.length;v<u;++v){z=w[v];x=z.split("=");y[decodeURIComponent(x[0])]=decodeURIComponent(x[1])}return y}d.parseString=h;d.types={html:"text/html",json:"application/json",xml:"application/xml",urlencoded:"application/x-www-form-urlencoded",form:"application/x-www-form-urlencoded","form-data":"application/x-www-form-urlencoded"};d.serialize={"application/x-www-form-urlencoded":o,"application/json":JSON.stringify};d.parse={"application/x-www-form-urlencoded":h,"application/json":JSON.parse};function c(z){var B=z.split(/\r?\n/);var w={};var y;var C;var A;var u;B.pop();for(var v=0,x=B.length;v<x;++v){C=B[v];y=C.indexOf(":");A=C.slice(0,y).toLowerCase();u=r(C.slice(y+1));w[A]=u}return w}function g(u){return u.split(/ *; */).shift()}function s(u){return k(u.split(/ *; */),function(x,z){var w=z.split(/ *= */),v=w.shift(),y=w.shift();if(v&&y){x[v]=y}return x},{})}function a(v,u){u=u||{};this.req=v;this.xhr=this.req.xhr;this.text=this.req.method!="HEAD"?this.xhr.responseText:null;this.setStatusProperties(this.xhr.status);this.header=this.headers=c(this.xhr.getAllResponseHeaders());this.header["content-type"]=this.xhr.getResponseHeader("content-type");this.setHeaderProperties(this.header);this.body=this.req.method!="HEAD"?this.parseBody(this.text):null}a.prototype.get=function(u){return this.header[u.toLowerCase()]};a.prototype.setHeaderProperties=function(x){var v=this.header["content-type"]||"";this.type=g(v);var w=s(v);for(var u in w){this[u]=w[u]}};a.prototype.parseBody=function(v){var u=d.parse[this.type];return u&&v&&v.length?u(v):null};a.prototype.setStatusProperties=function(u){var v=u/100|0;this.status=u;this.statusType=v;this.info=1==v;this.ok=2==v;this.clientError=4==v;this.serverError=5==v;this.error=(4==v||5==v)?this.toError():false;this.accepted=202==u;this.noContent=204==u||1223==u;this.badRequest=400==u;this.unauthorized=401==u;this.notAcceptable=406==u;this.notFound=404==u;this.forbidden=403==u};a.prototype.toError=function(){var w=this.req;var y=w.method;var u=w.url;var x="cannot "+y+" "+u+" ("+this.status+")";var v=new Error(x);v.status=this.status;v.method=y;v.url=u;return v};d.Response=a;function q(w,v){var u=this;l.call(this);this._query=this._query||[];this.method=w;this.url=v;this.header={};this._header={};this.on("end",function(){var y=null;var x=null;try{x=new a(u)}catch(z){y=new Error("Parser is unable to parse the response");y.parse=true;y.original=z}u.callback(y,x)})}l(q.prototype);q.prototype.use=function(u){u(this);return this};q.prototype.timeout=function(u){this._timeout=u;return this};q.prototype.clearTimeout=function(){this._timeout=0;clearTimeout(this._timer);return this};q.prototype.abort=function(){if(this.aborted){return}this.aborted=true;this.xhr.abort();this.clearTimeout();this.emit("abort");return this};q.prototype.set=function(v,w){if(j(v)){for(var u in v){this.set(u,v[u])}return this}this._header[v.toLowerCase()]=w;this.header[v]=w;return this};q.prototype.unset=function(u){delete this._header[u.toLowerCase()];delete this.header[u];return this};q.prototype.getHeader=function(u){return this._header[u.toLowerCase()]};q.prototype.type=function(u){this.set("Content-Type",d.types[u]||u);return this};q.prototype.accept=function(u){this.set("Accept",d.types[u]||u);return this};q.prototype.auth=function(u,v){var w=btoa(u+":"+v);this.set("Authorization","Basic "+w);return this};q.prototype.query=function(u){if("string"!=typeof u){u=o(u)}if(u){this._query.push(u)}return this};q.prototype.field=function(u,v){if(!this._formData){this._formData=new FormData()}this._formData.append(u,v);return this};q.prototype.attach=function(w,v,u){if(!this._formData){this._formData=new FormData()}this._formData.append(w,v,u);return this};q.prototype.send=function(w){var x=j(w);var v=this.getHeader("Content-Type");if(x&&j(this._data)){for(var u in w){this._data[u]=w[u]}}else{if("string"==typeof w){if(!v){this.type("form")}v=this.getHeader("Content-Type");if("application/x-www-form-urlencoded"==v){this._data=this._data?this._data+"&"+w:w}else{this._data=(this._data||"")+w}}else{this._data=w}}if(!x){return this}if(!v){this.type("json")}return this};q.prototype.callback=function(w,u){var v=this._callback;this.clearTimeout();if(2==v.length){return v(w,u)}if(w){return this.emit("error",w)}v(u)};q.prototype.crossDomainError=function(){var u=new Error("Origin is not allowed by Access-Control-Allow-Origin");u.crossDomain=true;this.callback(u)};q.prototype.timeoutError=function(){var v=this._timeout;var u=new Error("timeout of "+v+"ms exceeded");u.timeout=v;this.callback(u)};q.prototype.withCredentials=function(){this._withCredentials=true;return this};q.prototype.end=function(w){var u=this;var B=this.xhr=n();var z=this._query.join("&");var y=this._timeout;var x=this._formData||this._data;this._callback=w||f;B.onreadystatechange=function(){if(4!=B.readyState){return}if(0==B.status){if(u.aborted){return u.timeoutError()}return u.crossDomainError()}u.emit("end")};if(B.upload){B.upload.onprogress=function(C){C.percent=C.loaded/C.total*100;u.emit("progress",C)}}if(y&&!this._timer){this._timer=setTimeout(function(){u.abort()},y)}if(z){z=d.serializeObject(z);this.url+=~this.url.indexOf("?")?"&"+z:"?"+z}B.open(this.method,this.url,true);if(this._withCredentials){B.withCredentials=true}if("GET"!=this.method&&"HEAD"!=this.method&&"string"!=typeof x&&!m(x)){var v=d.serialize[this.getHeader("Content-Type")];if(v){x=v(x)}}for(var A in this.header){if(null==this.header[A]){continue}B.setRequestHeader(A,this.header[A])}this.emit("request",this);B.send(x);return this};d.Request=q;function d(v,u){if("function"==typeof u){return new q("GET",v).end(u)}if(1==arguments.length){return new q("GET",v)}return new q(v,u)}d.get=function(u,x,v){var w=d("GET",u);if("function"==typeof x){v=x,x=null}if(x){w.query(x)}if(v){w.end(v)}return w};d.head=function(u,x,v){var w=d("HEAD",u);if("function"==typeof x){v=x,x=null}if(x){w.send(x)}if(v){w.end(v)}return w};d.del=function(u,v){var w=d("DELETE",u);if(v){w.end(v)}return w};d.patch=function(u,x,v){var w=d("PATCH",u);if("function"==typeof x){v=x,x=null}if(x){w.send(x)}if(v){w.end(v)}return w};d.post=function(u,x,v){var w=d("POST",u);if("function"==typeof x){v=x,x=null}if(x){w.send(x)}if(v){w.end(v)}return w};d.put=function(u,x,v){var w=d("PUT",u);if("function"==typeof x){v=x,x=null}if(x){w.send(x)}if(v){w.end(v)}return w};b.exports=d},{emitter:8,reduce:9}],8:[function(b,c,a){arguments[4][4][0].apply(a,arguments)},{dup:4}],9:[function(b,c,a){c.exports=function(g,i,h){var f=0;var d=g.length;var j=arguments.length==3?h:g[f++];while(f<d){j=i.call(null,j,g[f],++f,g)}return j}},{}],10:[function(c,d,b){var a=c("./index"),f=c("./utils/each");d.exports=function(){var h=window.Keen||null,j=window._Keen||null,g,i;if(h&&j){g=j.clients||{},i=j.ready||[];f(g,function(l,n){f(a.prototype,function(p,o){h.prototype[o]=p});f(["Query","Request","Dataset","Dataviz"],function(o){h[o]=(a[o])?a[o]:function(){}});if(l._config){l.configure.call(l,l._config)}if(l._setGlobalProperties){f(l._setGlobalProperties,function(o){l.setGlobalProperties.apply(l,o)})}if(l._addEvent){f(l._addEvent,function(o){l.addEvent.apply(l,o)})}var m=l._on||[];if(l._on){f(l._on,function(o){l.on.apply(l,o)});l.trigger("ready")}f(["_config","_setGlobalProperties","_addEvent","_on"],function(o){if(l[o]){l[o]=undefined;try{delete l[o]}catch(p){}}})});f(i,function(l,m){a.once("ready",l)})}window._Keen=undefined;try{delete window._Keen}catch(k){}}},{"./index":19,"./utils/each":31}],11:[function(b,c,a){var d=b("component-emitter");d.prototype.trigger=d.prototype.emit;c.exports=d},{"component-emitter":4}],12:[function(b,c,a){c.exports=function(){return"undefined"==typeof window?"server":"browser"}},{}],13:[function(b,c,a){var f=b("../utils/each"),d=b("JSON2");c.exports=function(h){var g=[];f(h,function(j,i){if("string"!==typeof j){j=d.stringify(j)}g.push(i+"="+encodeURIComponent(j))});return"?"+g.join("&")}},{"../utils/each":31,JSON2:2}],14:[function(b,c,a){c.exports=function(){return new Date().getTimezoneOffset()*-60}},{}],15:[function(b,c,a){c.exports=function(){if("undefined"!==typeof window){if(navigator.userAgent.indexOf("MSIE")!==-1||navigator.appVersion.indexOf("Trident/")>0){return 2000}}return 16000}},{}],16:[function(b,c,a){c.exports=function(){var d="undefined"==typeof window?this:window;if(d.XMLHttpRequest&&("file:"!=d.location.protocol||!d.ActiveXObject)){return new XMLHttpRequest}else{try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(f){}try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(f){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(f){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(f){}}return false}},{}],17:[function(b,c,a){c.exports=function(h,g,i){var f=i||function(){};if(g&&!g.ok){var d=g.body&&g.body.error_code;h=new Error(d?g.body.message:"Unknown error occurred");h.code=d?g.body.error_code:"UnknownError"}if(h){f(h,null)}else{f(null,g.body)}return}},{}],18:[function(f,b,g){var n=f("superagent");var l=f("../utils/each"),a=f("./get-xhr-object");b.exports=function(o,p){return function(q){var r=q.constructor.prototype.end;if("undefined"===typeof window){return}q.requestType=q.requestType||{};q.requestType.type=o;q.requestType.options=q.requestType.options||{async:true,success:{responseText:'{ "created": true }',status:201},error:{responseText:'{ "error_code": "ERROR", "message": "Request failed" }',status:404}};if(p){if("boolean"===typeof p.async){q.requestType.options.async=p.async}if(p.success){extend(q.requestType.options.success,p.success)}if(p.error){extend(q.requestType.options.error,p.error)}}q.end=function(u){var t=this,s=(this.requestType)?this.requestType.type:"xhr",w,v;if(("GET"!==t.method||"xhr"===s)&&t.requestType.options.async){r.call(t,u);return}w=t._query.join("&");v=t._timeout;t._callback=u||noop;if(v&&!t._timer){t._timer=setTimeout(function(){h.call(t)},v)}if(w){w=n.serializeObject(w);t.url+=~t.url.indexOf("?")?"&"+w:"?"+w}t.emit("request",t);if(!t.requestType.options.async){k.call(t)}else{if("jsonp"===s){j.call(t)}else{if("beacon"===s){i.call(t)}}}return t};return q}};function k(){var o=a();if(o){o.open("GET",this.url,false);o.send(null)}return this}function j(){var p=this,t=new Date().getTime(),o=document.createElement("script"),s=document.getElementsByTagName("head")[0],u="keenJSONPCallback",q=false;u+=t;while(u in window){u+="a"}window[u]=function(v){if(q===true){return}q=true;d.call(p,v);r()};o.src=p.url+"&jsonp="+u;s.appendChild(o);o.onreadystatechange=function(){if(q===false&&p.readyState==="loaded"){q=true;c.call(p);r()}};o.onerror=function(){if(q===false){q=true;c.call(p);r()}};function r(){window[u]=undefined;try{delete window[u]}catch(v){}s.removeChild(o)}}function i(){var p=this,o=document.createElement("img"),q=false;o.onload=function(){q=true;if("naturalHeight" in this){if(this.naturalHeight+this.naturalWidth===0){this.onerror();return}}else{if(this.width+this.height===0){this.onerror();return}}d.call(p)};o.onerror=function(){q=true;c.call(p)};o.src=p.url+"&c=clv1"}function d(p){var q=this.requestType.options["success"],o="";m.call(this,q);if(p){try{o=JSON.stringify(p)}catch(r){}}else{o=q.responseText}this.xhr.responseText=o;this.xhr.status=q.status;this.emit("end")}function c(){var o=this.requestType.options["error"];m.call(this,o);this.xhr.responseText=o.responseText;this.xhr.status=o.status;this.emit("end")}function h(){this.aborted=true;this.clearTimeout();this.emit("abort")}function m(o){this.xhr={getAllResponseHeaders:function(){return""},getResponseHeader:function(){return"application/json"},responseText:o.responseText,status:o.status};return this}},{"../utils/each":31,"./get-xhr-object":16,superagent:7}],19:[function(d,f,c){var b=this;var h=b.Keen;var g=d("./helpers/emitter-shim");function a(i){this.configure(i||{});a.trigger("client",this)}a.debug=false;a.enabled=true;a.loaded=true;a.version="3.2.4";g(a);g(a.prototype);a.prototype.configure=function(i){var j=i||{};if(j.host){j.host.replace(/.*?:\/\//g,"")}if(j.protocol&&j.protocol==="auto"){j.protocol=location.protocol.replace(/:/g,"")}this.config={projectId:j.projectId,writeKey:j.writeKey,readKey:j.readKey,masterKey:j.masterKey,requestType:j.requestType||"jsonp",host:j.host||"api.keen.io/3.0",protocol:j.protocol||"https",globalProperties:null};if(a.debug){this.on("error",a.log)}this.trigger("ready")};a.prototype.projectId=function(i){if(!arguments.length){return this.config.projectId}this.config.projectId=(i?String(i):null);return this};a.prototype.masterKey=function(i){if(!arguments.length){return this.config.masterKey}this.config.masterKey=(i?String(i):null);return this};a.prototype.readKey=function(i){if(!arguments.length){return this.config.readKey}this.config.readKey=(i?String(i):null);return this};a.prototype.writeKey=function(i){if(!arguments.length){return this.config.writeKey}this.config.writeKey=(i?String(i):null);return this};a.prototype.url=function(i){if(!this.projectId()){this.trigger("error","Client is missing projectId property");return}return this.config.protocol+"://"+this.config.host+"/projects/"+this.projectId()+i};a.log=function(i){if(a.debug&&typeof console=="object"){console.log("[Keen IO]",i)}};a.noConflict=function(){b.Keen=h;return a};a.ready=function(i){if(a.loaded){i()}else{a.once("ready",i)}};f.exports=a},{"./helpers/emitter-shim":11}],20:[function(f,c,h){var n=f("JSON2");var g=f("superagent");var i=f("../index");var j=f("../utils/base64"),m=f("../utils/each"),o=f("../helpers/get-context"),d=f("../helpers/get-query-string"),b=f("../helpers/get-url-max-length"),a=f("../helpers/get-xhr-object"),k=f("../helpers/superagent-request-types"),p=f("../helpers/superagent-handle-response");c.exports=function(x,A,B,t){var C=this,v=this.url("/events/"+x),q=this.config.requestType,u={},s=B,r,z;r=("boolean"===typeof t)?t:true;if(!i.enabled){y.call(C,"Keen.enabled = false");return}if(!C.projectId()){y.call(C,"Missing projectId property");return}if(!C.writeKey()){y.call(C,"Missing writeKey property");return}if(!x||typeof x!=="string"){y.call(C,"Collection name must be a string");return}if(C.config.globalProperties){u=C.config.globalProperties(x)}m(A,function(E,D){u[D]=E});if(!a()&&"xhr"===q){q="jsonp"}if("xhr"!==q||!r){z=l.call(C,v,u)}if(z&&o()==="browser"){g.get(z).use(function(D){D.async=r;return D}).use(k(q)).end(w)}else{if(a()||o()==="server"){g.post(v).set("Content-Type","application/json").set("Authorization",C.writeKey()).send(u).end(w)}else{C.trigger("error","Request not sent: URL length exceeds current browser limit, and XHR (POST) is not supported.")}}function w(E,D){p(E,D,s);s=B=null}function y(E){var D="Event not recorded: "+E;C.trigger("error",D);if(s){s.call(C,D,null);s=B=null}}return};function l(q,r){q+=d({api_key:this.writeKey(),data:j.encode(n.stringify(r)),modified:new Date().getTime()});return(q.length<b())?q:false}},{"../helpers/get-context":12,"../helpers/get-query-string":13,"../helpers/get-url-max-length":15,"../helpers/get-xhr-object":16,"../helpers/superagent-handle-response":17,"../helpers/superagent-request-types":18,"../index":19,"../utils/base64":29,"../utils/each":31,JSON2:2,superagent:7}],21:[function(c,b,f){var g=c("../index");var d=c("superagent");var i=c("../utils/each"),j=c("../helpers/get-context"),a=c("../helpers/get-xhr-object"),h=c("../helpers/superagent-request-types"),k=c("../helpers/superagent-handle-response");b.exports=function(p,r){var n=this,m=this.url("/events"),o={},l=r;if(!g.enabled){q.call(n,"Keen.enabled = false");return}if(!n.projectId()){q.call(n,"Missing projectId property");return}if(!n.writeKey()){q.call(n,"Missing writeKey property");return}if(arguments.length>2){q.call(n,"Incorrect arguments provided to #addEvents method");return}if(typeof p!=="object"||p instanceof Array){q.call(n,"Request payload must be an object");return}if(n.config.globalProperties){i(p,function(s,t){i(s,function(u,v){var w=n.config.globalProperties(t);i(u,function(y,x){w[x]=y});o[t].push(w)})})}else{o=p}if(a()||j()==="server"){d.post(m).set("Content-Type","application/json").set("Authorization",n.writeKey()).send(o).end(function(t,s){k(t,s,l);l=r=null})}else{n.trigger("error","Events not recorded: XHR support is required for batch upload")}function q(t){var s="Events not recorded: "+t;n.trigger("error",s);if(l){l.call(n,s,null);l=r=null}}return}},{"../helpers/get-context":12,"../helpers/get-xhr-object":16,"../helpers/superagent-handle-response":17,"../helpers/superagent-request-types":18,"../index":19,"../utils/each":31,superagent:7}],22:[function(d,f,c){var h=d("superagent");var b=d("../helpers/get-query-string"),g=d("../helpers/superagent-handle-response"),a=d("../helpers/superagent-request-types");f.exports=function(j,m,l,n){var i=this.config.requestType,k=m||{};if(i==="beacon"){i="jsonp"}k.api_key=k.api_key||l;h.get(j+b(k)).use(a(i)).end(function(p,o){g(p,o,n);n=null})}},{"../helpers/get-query-string":13,"../helpers/superagent-handle-response":17,"../helpers/superagent-request-types":18,superagent:7}],23:[function(b,c,a){var f=b("superagent");var d=b("../helpers/superagent-handle-response");c.exports=function(g,i,h,j){f.post(g).set("Content-Type","application/json").set("Authorization",h).send(i||{}).end(function(l,k){d(l,k,j);j=null})}},{"../helpers/superagent-handle-response":17,superagent:7}],24:[function(b,d,a){var c=b("../request");d.exports=function(i,j){var g=[],f=j,h;if(i instanceof Array){g=i}else{g.push(i)}h=new c(this,g,f).refresh();f=j=null;return h}},{"../request":28}],25:[function(b,c,a){c.exports=function(d){if(d&&typeof(d)=="function"){this.config.globalProperties=d}else{this.trigger("error","Invalid value for global properties: "+d)}}},{}],26:[function(b,c,a){var d=b("./addEvent");c.exports=function(k,f,n,l,m){var o=k,j=(o.currentTarget)?o.currentTarget:(o.srcElement||o.target),g=l||500,h=false,q="",p,i;if(j.getAttribute!==void 0){q=j.getAttribute("target")}else{if(j.target){q=j.target}}if((q=="_blank"||q=="blank")&&!o.metaKey){i=window.open("about:blank");i.document.location=j.href}if(j.nodeName==="A"){p=function(){if(!h&&!o.metaKey&&(q!=="_blank"&&q!=="blank")){h=true;window.location=j.href}}}else{if(j.nodeName==="FORM"){p=function(){if(!h){h=true;j.submit()}}}else{this.trigger("error","#trackExternalLink method not attached to an <a> or <form> DOM element")}}if(m){p=function(){if(!h){h=true;m()}}}d.call(this,f,n,p);setTimeout(p,g);if(!o.metaKey){return false}}},{"./addEvent":20}],27:[function(c,a,d){var j=c("./utils/each"),h=c("./utils/extend"),g=c("./helpers/get-timezone-offset"),b=c("./helpers/get-query-string");var i=c("./helpers/emitter-shim");function f(){this.configure.apply(this,arguments)}i(f.prototype);f.prototype.configure=function(k,l){this.analysis=k;this.params=this.params||{};this.set(l);if(this.params.timezone===void 0){this.params.timezone=g()}return this};f.prototype.set=function(l){var k=this;j(l,function(n,m){var o=m,p=n;if(m.match(new RegExp("[A-Z]"))){o=m.replace(/([A-Z])/g,function(q){return"_"+q.toLowerCase()})}k.params[o]=p;if(p instanceof Array){j(p,function(r,q){if(r instanceof Array==false&&typeof r==="object"){j(r,function(t,s){if(s.match(new RegExp("[A-Z]"))){var u=s.replace(/([A-Z])/g,function(v){return"_"+v.toLowerCase()});delete k.params[o][q][s];k.params[o][q][u]=t}})}})}});return k};f.prototype.get=function(l){var k=l;if(k.match(new RegExp("[A-Z]"))){k=k.replace(/([A-Z])/g,function(m){return"_"+m.toLowerCase()})}if(this.params){return this.params[k]||null}};f.prototype.addFilter=function(m,k,l){this.params.filters=this.params.filters||[];this.params.filters.push({property_name:m,operator:k,property_value:l});return this};a.exports=f},{"./helpers/emitter-shim":11,"./helpers/get-query-string":13,"./helpers/get-timezone-offset":14,"./utils/each":31,"./utils/extend":32}],28:[function(c,b,d){var j=c("./utils/each"),h=c("./utils/extend"),g=c("./utils/sendQuery");var f=c("./");var i=c("./helpers/emitter-shim");function a(l,m,n){var k=n;this.config={timeout:300*1000};this.configure(l,m,k);k=n=null}i(a.prototype);a.prototype.configure=function(l,m,n){var k=n;h(this,{client:l,queries:m,data:{},callback:k});k=n=null;return this};a.prototype.timeout=function(k){if(!arguments.length){return this.config.timeout}this.config.timeout=(!isNaN(parseInt(k))?parseInt(k):null);return this};a.prototype.refresh=function(){var m=this,k=0,l=[],o=false;var n=function(r,q,p){if(r){m.trigger("error",r);if(m.callback){m.callback(r,null)}o=true;return}l[p]=q;k++;if(k==m.queries.length&&!o){m.data=(m.queries.length==1)?l[0]:l;m.trigger("complete",null,m.data);if(m.callback){m.callback(null,m.data)}}};j(m.queries,function(s,q){var t;var p=function(v,u){n(v,u,q)};if(s instanceof f.Query){t="/queries/"+s.analysis;g.call(m,t,s.params,p)}else{if(Object.prototype.toString.call(s)==="[object String]"){t="/saved_queries/"+encodeURIComponent(s)+"/result";g.call(m,t,null,p)}else{var r={statusText:"Bad Request",responseText:{message:"Error: Query "+(+q+1)+" of "+m.queries.length+" for project "+m.client.projectId()+" is not a valid request"}};m.trigger("error",r.responseText.message);if(m.callback){m.callback(r.responseText.message,null)}}}});return this};b.exports=a},{"./":19,"./helpers/emitter-shim":11,"./utils/each":31,"./utils/extend":32,"./utils/sendQuery":34}],29:[function(b,c,a){c.exports={map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(f){var d="",l=0,h=this.map,k,j,g,s,r,q,p;f=this.utf8.encode(f);while(l<f.length){k=f.charCodeAt(l++);j=f.charCodeAt(l++);g=f.charCodeAt(l++);s=(k>>2);r=(((k&3)<<4)|(j>>4));q=(isNaN(j)?64:((j&15)<<2)|(g>>6));p=(isNaN(j)||isNaN(g))?64:g&63;d=d+h.charAt(s)+h.charAt(r)+h.charAt(q)+h.charAt(p)}return d},decode:function(f){var d="",p=0,h=this.map,g=String.fromCharCode,t,s,r,q,l,k,j;f=f.replace(/[^A-Za-z0-9\+\/\=]/g,"");while(p<f.length){t=h.indexOf(f.charAt(p++));s=h.indexOf(f.charAt(p++));r=h.indexOf(f.charAt(p++));q=h.indexOf(f.charAt(p++));l=(t<<2)|(s>>4);k=((s&15)<<4)|(r>>2);j=((r&3)<<6)|q;d=d+(g(l)+((r!=64)?g(k):""))+(((q!=64)?g(j):""))}return this.utf8.decode(d)},utf8:{encode:function(j){var f="",d=0,h=String.fromCharCode,g;while(d<j.length){g=j.charCodeAt(d++);f=f+((g<128)?h(g):((g>127)&&(g<2048))?(h((g>>6)|192)+h((g&63)|128)):(h((g>>12)|224)+h(((g>>6)&63)|128)+h((g&63)|128)))}return f},decode:function(k){var g="",f=0,j=String.fromCharCode,d,h;while(f<k.length){h=k.charCodeAt(f);g=g+((h<128)?[j(h),f++][0]:((h>191)&&(h<224))?[j(((h&31)<<6)|((d=k.charCodeAt(f+1))&63)),(f+=2)][0]:[j(((h&15)<<12)|(((d=k.charCodeAt(f+1))&63)<<6)|((c3=k.charCodeAt(f+2))&63)),(f+=3)][0])}return g}}}},{}],30:[function(b,c,a){var d=b("JSON2");c.exports=function(f){return d.parse(d.stringify(f))}},{JSON2:2}],31:[function(b,c,a){c.exports=function(g,d,f){var h;if(!g){return 0}f=!f?g:f;if(g instanceof Array){for(h=0;h<g.length;h++){if(d.call(f,g[h],h,g)===false){return 0}}}else{for(h in g){if(g.hasOwnProperty(h)){if(d.call(f,g[h],h,g)===false){return 0}}}}return 1}},{}],32:[function(b,c,a){c.exports=function(f){for(var d=1;d<arguments.length;d++){for(var g in arguments[d]){f[g]=arguments[d][g]}}return f}},{}],33:[function(b,c,a){function d(l){var f={},g,i=/\+/g,h=/([^&=]+)=?([^&]*)/g,k=function(m){return decodeURIComponent(m.replace(i," "))},j=l.split("?")[1];while(!!(g=h.exec(j))){f[k(g[1])]=k(g[2])}return f}c.exports=d},{}],34:[function(f,c,h){var g=f("superagent");var j=f("../helpers/get-context"),d=f("../helpers/get-query-string"),b=f("../helpers/get-url-max-length"),a=f("../helpers/get-xhr-object"),i=f("../helpers/superagent-request-types"),k=f("../helpers/superagent-handle-response");c.exports=function(q,r,s){var o=this,n=this.client.url(q),m=this.client.config.requestType,l=s;s=null;if(!o.client.projectId()){o.client.trigger("error","Query not sent: Missing projectId property");return}if(!o.client.readKey()){o.client.trigger("error","Query not sent: Missing readKey property");return}if(a()||j()==="server"){g.post(n).set("Content-Type","application/json").set("Authorization",o.client.readKey()).timeout(o.timeout()).send(r||{}).end(p)}else{extend(r,{api_key:o.client.readKey()});n+=d(r);if(n.length<b()){g.get(n).timeout(o.timeout()).use(i("jsonp")).end(p)}else{o.client.trigger("error","Query not sent: URL length exceeds current browser limit, and XHR (POST) is not supported.")}}function p(u,t){k(u,t,l);l=s=null}return}},{"../helpers/get-context":12,"../helpers/get-query-string":13,"../helpers/get-url-max-length":15,"../helpers/get-xhr-object":16,"../helpers/superagent-handle-response":17,"../helpers/superagent-request-types":18,superagent:7}],35:[function(g,c,i){var m=g("../core/utils/clone"),o=g("../core/utils/each"),a=g("./utils/flatten"),h=g("./utils/parse");var n=g("../core/helpers/emitter-shim");function b(){this.data={input:{},output:[[]]};this.meta={schema:{},method:undefined};if(arguments.length>0){this.parse.apply(this,arguments)}}b.defaults={delimeter:" -> "};n(b);n(b.prototype);b.prototype.input=function(p){if(!arguments.length){return this["data"]["input"]}this["data"]["input"]=(p?m(p):null);return this};b.prototype.output=function(p){if(!arguments.length){return this["data"].output}this["data"].output=(p instanceof Array?p:null);return this};b.prototype.method=function(p){if(!arguments.length){return this.meta.method}this.meta.method=(p?String(p):null);return this};b.prototype.schema=function(p){if(!arguments.length){return this.meta.schema}this.meta.schema=(p?p:null);return this};b.prototype.parse=function(q,r){var p;if(q){this.input(q)}if(r){this.schema(r)}this.output([[]]);if(this.meta.schema.select){this.method("select");p=l({records:"",select:true},this.schema());f.call(this,d(p))}else{if(this.meta.schema.unpack){this.method("unpack");p=l({records:"",unpack:{index:false,value:false,label:false}},this.schema());k.call(this,d(p))}}return this};function f(r){var s=this,t=r||{},u=[],v=[];var q,p;if(t.records===""||!t.records){q=[s.input()]}else{p=t.records.split(b.defaults.delimeter);q=h.apply(s,[s.input()].concat(p))[0]}o(t.select,function(x){u.push(x.path.split(b.defaults.delimeter))});if(u.length==0){o(q,function(x,y){var A=a(x);for(var z in A){if(A.hasOwnProperty(z)&&v.indexOf(z)==-1){v.push(z);u.push([z])}}})}var w=[[]];o(u,function(y,x){if(u.length==1){w[0].push("label","value")}else{w[0].push(y.join("."))}});o(q,function(x,y){var z=a(x);if(u.length==1){w.push([u.join("."),z[u.join(".")]])}else{w.push([]);o(u,function(B,A){var C=B.join(".");w[y+1].push(z[C])})}});s.output(w);s.format(t.select);return s}function k(y){var x=this,t=[];var r=(y.unpack.value)?y.unpack.value.path.split(b.defaults.delimeter):false,q=(y.unpack.label)?y.unpack.label.path.split(b.defaults.delimeter):false,s=(y.unpack.index)?y.unpack.index.path.split(b.defaults.delimeter):false;var u=(r[r.length-1]!=="")?r[r.length-1]:"Value",p=(q[q.length-1]!=="")?q[q.length-1]:"Label",w=(s[s.length-1]!=="")?s[s.length-1]:"Index";var v=(function(){var z;if(y.records==""){z=[x.input()]}else{z=h.apply(x,[x.input()].concat(y.records.split(b.defaults.delimeter)))}return z[0]})();if(v instanceof Array==false){v=[v]}o(v,function(z,A){var B=(q)?h.apply(x,[z].concat(q)):[];if(B){t=B}});o(v,function(A,B){var C=(r)?h.apply(x,[A].concat(r)):false,z=(s)?h.apply(x,[A].concat(s)):false;if(z){o(z,function(){x.data.output.push([])})}else{x.data.output.push([])}if(z){if(B==0){x.data.output[0].push(w);if(t.length>0){o(t,function(E,D){x.data.output[0].push(E)})}else{x.data.output[0].push(u)}}if(v.length<x.data.output.length-1){if(B==0){o(x.data.output,function(E,D){if(D>0){x.data.output[D].push(z[D-1])}})}}else{x.data.output[B+1].push(z[0])}}if(!z&&t.length>0){if(B==0){x.data.output[0].push(p);x.data.output[0].push(u)}x.data.output[B+1].push(t[0])}if(!z&&t.length==0){x.data.output[0].push("")}if(C){if(v.length<x.data.output.length-1){if(B==0){o(x.data.output,function(E,D){if(D>0){x.data.output[D].push(C[D-1])}})}}else{o(C,function(D){x.data.output[B+1].push(D)})}}else{o(x.data.output[0],function(D,E){var F=(z)?0:-1;if(E>F){x.data.output[B+1].push(null)}})}});x.format(y.unpack);return this}function d(p){o(p.unpack,function(s,r,q){if(s&&j(s,"string")){p.unpack[r]={path:p.unpack[r]}}});return p}function j(q,p){q=typeof(q);if(!p){return q!="undefined"}return q==p}function l(q,p){o(p,function(r,s){if(j(q[s],"object")&&j(r,"object")){q[s]=l(q[s],r)}else{if(r!==null){q[s]=r}}});return q}c.exports=b},{"../core/helpers/emitter-shim":11,"../core/utils/clone":30,"../core/utils/each":31,"./utils/flatten":46,"./utils/parse":47}],36:[function(b,c,a){var f=b("../core/utils/extend"),d=b("./dataset");f(d.prototype,b("./lib/append"));f(d.prototype,b("./lib/delete"));f(d.prototype,b("./lib/filter"));f(d.prototype,b("./lib/insert"));f(d.prototype,b("./lib/select"));f(d.prototype,b("./lib/sort"));f(d.prototype,b("./lib/update"));f(d.prototype,b("./lib/analyses"));f(d.prototype,{format:b("./lib/format"),});c.exports=d},{"../core/utils/extend":32,"./dataset":35,"./lib/analyses":37,"./lib/append":38,"./lib/delete":39,"./lib/filter":40,"./lib/format":41,"./lib/insert":42,"./lib/select":43,"./lib/sort":44,"./lib/update":45}],37:[function(d,f,c){var g=d("../../core/utils/each"),a=["Average","Maximum","Minimum","Sum"],b={};b.average=function(h,m,i){var l=h.slice(m||0,(i?i+1:h.length)),j=0,k=null;g(l,function(o,n){if(typeof o==="number"&&!isNaN(parseFloat(o))){j+=parseFloat(o)}});return j/l.length};b.maximum=function(h,l,i){var k=h.slice(l||0,(i?i+1:h.length)),j=[];g(k,function(n,m){if(typeof n==="number"&&!isNaN(parseFloat(n))){j.push(parseFloat(n))}});return Math.max.apply(Math,j)};b.minimum=function(h,l,i){var k=h.slice(l||0,(i?i+1:h.length)),j=[];g(k,function(n,m){if(typeof n==="number"&&!isNaN(parseFloat(n))){j.push(parseFloat(n))}});return Math.min.apply(Math,j)};b.sum=function(h,l,i){var k=h.slice(l||0,(i?i+1:h.length)),j=0;g(k,function(n,m){if(typeof n==="number"&&!isNaN(parseFloat(n))){j+=parseFloat(n)}});return j};g(a,function(h,j){b["getColumn"+h]=b["getRow"+h]=function(i){return this[h.toLowerCase()](i,1)}});b.getColumnLabel=b.getRowIndex=function(h){return h[0]};f.exports=b},{"../../core/utils/each":31}],38:[function(c,d,b){var g=c("../../core/utils/each");d.exports={appendColumn:f,appendRow:a};function f(l,i){var h=this,k=Array.prototype.slice.call(arguments,2),j=(l!==undefined)?l:null;if(typeof i==="function"){h.data.output[0].push(j);g(h.output(),function(o,n){var m;if(n>0){m=i.call(h,o,n);if(typeof m==="undefined"){m=null}h.data.output[n].push(m)}})}else{if(!i||i instanceof Array){h.data.output[0].push(j);g(h.output(),function(o,n){var m;if(n>0){m=(i&&i[n-1]!==undefined)?i[n-1]:null;h.data.output[n].push(m)}})}}return h}function a(m,i){var h=this,l=Array.prototype.slice.call(arguments,2),k=(m!==undefined)?m:null,j=[];j.push(k);if(typeof i==="function"){g(h.output()[0],function(p,q){var o,n;if(q>0){o=h.selectColumn(q);n=i.call(h,o,q);if(typeof n==="undefined"){n=null}j.push(n)}});h.data.output.push(j)}else{if(!i||i instanceof Array){g(h.output()[0],function(o,p){var n;if(p>0){n=(i&&i[p-1]!==undefined)?i[p-1]:null;j.push(n)}});this.data.output.push(j)}}return this}},{"../../core/utils/each":31}],39:[function(d,f,c){var g=d("../../core/utils/each");f.exports={deleteColumn:a,deleteRow:b};function a(j){var h=this,i=(typeof j==="number")?j:this.data.output[0].indexOf(j);if(i>-1){g(h.data.output,function(l,k){h.data.output[k].splice(i,1)})}return h}function b(i){var h=(typeof i==="number")?i:this.selectColumn(0).indexOf(i);if(h>-1){this.data.output.splice(h,1)}return this}},{"../../core/utils/each":31}],40:[function(c,d,b){var f=c("../../core/utils/each");d.exports={filterColumns:a,filterRows:g};function a(i){var h=this,j=new Array();f(h.data.output,function(l,k){j.push([])});f(h.data.output[0],function(k,l){var m=h.selectColumn(l);if(l==0||i.call(h,m,l)){f(m,function(n,o){j[o].push(n)})}});h.output(j);return h}function g(i){var h=this,j=[];f(h.output(),function(l,k){if(k==0||i.call(h,l,k)){j.push(l)}});h.output(j);return h}},{"../../core/utils/each":31}],41:[function(c,d,b){var f=c("../../core/utils/each");d.exports=function(h){var g=this;if(this.method()==="select"){f(g.output(),function(k,j){if(j==0){f(k,function(i,l){if(h[l]&&h[l].label){g.data.output[j][l]=h[l].label}})}else{f(k,function(i,l){g.data.output[j][l]=a(g.data.output[j][l],h[l])})}})}if(this.method()==="unpack"){if(h.index){f(g.output(),function(k,j){if(j==0){if(h.index.label){g.data.output[j][0]=h.index.label}}else{g.data.output[j][0]=a(g.data.output[j][0],h.index)}})}if(h.label){if(h.index){f(g.output(),function(k,j){f(k,function(i,l){if(j==0&&l>0){g.data.output[j][l]=a(g.data.output[j][l],h.label)}})})}else{f(g.output(),function(k,j){if(j>0){g.data.output[j][0]=a(g.data.output[j][0],h.label)}})}}if(h.value){if(h.index){f(g.output(),function(k,j){f(k,function(i,l){if(j>0&&l>0){g.data.output[j][l]=a(g.data.output[j][l],h.value)}})})}else{f(g.output(),function(k,j){f(k,function(i,l){if(j>0){g.data.output[j][l]=a(g.data.output[j][l],h.value)}})})}}}return g};function a(j,i){var g=j,h=i||{};if(h.replace){f(h.replace,function(l,k){if(g==k||String(g)==String(k)||parseFloat(g)==parseFloat(k)){g=l}})}if(h.type&&h.type=="date"){if(h.format&&moment&&moment(j).isValid()){g=moment(g).format(h.format)}else{g=new Date(g)}}if(h.type&&h.type=="string"){g=String(g)}if(h.type&&h.type=="number"&&!isNaN(parseFloat(g))){g=parseFloat(g)}return g}},{"../../core/utils/each":31}],42:[function(d,f,c){var g=d("../../core/utils/each");f.exports={insertColumn:a,insertRow:b};function a(k,l,i){var h=this,j;j=(l!==undefined)?l:null;if(typeof i==="function"){h.data.output[0].splice(k,0,j);g(h.output(),function(o,n){var m;if(n>0){m=i.call(h,o,n);if(typeof m==="undefined"){m=null}h.data.output[n].splice(k,0,m)}})}else{if(!i||i instanceof Array){h.data.output[0].splice(k,0,j);g(h.output(),function(o,n){var m;if(n>0){m=(i&&i[n-1]!=="undefined")?i[n-1]:null;h.data.output[n].splice(k,0,m)}})}}return h}function b(l,m,i){var h=this,k,j=[];k=(m!==undefined)?m:null;j.push(k);if(typeof i==="function"){g(h.output()[0],function(p,q){var o,n;if(q>0){o=h.selectColumn(q);n=i.call(h,o,q);if(typeof n==="undefined"){n=null}j.push(n)}});h.data.output.splice(l,0,j)}else{if(!i||i instanceof Array){g(h.output()[0],function(o,p){var n;if(p>0){n=(i&&i[p-1]!==undefined)?i[p-1]:null;j.push(n)}});this.data.output.splice(l,0,j)}}return this}},{"../../core/utils/each":31}],43:[function(d,f,c){var g=d("../../core/utils/each");f.exports={selectColumn:b,selectRow:a};function b(j){var h=new Array(),i=(typeof j==="number")?j:this.data.output[0].indexOf(j);if(i>-1){g(this.data.output,function(l,k){h.push(l[i])})}return h}function a(j){var h=new Array(),i=(typeof j==="number")?j:this.selectColumn(0).indexOf(j);if(i>-1){h=this.data.output[i]}return h}},{"../../core/utils/each":31}],44:[function(d,f,c){var g=d("../../core/utils/each");f.exports={sortColumns:b,sortRows:a};function b(m,i){var h=this,j=this.output()[0].slice(1),l=[],n=[],k=i||this.getColumnLabel;g(j,function(o,p){l.push(h.selectColumn(p+1).slice(0))});l.sort(function(p,o){var q=k.call(h,p)>k.call(h,o);if(q){return(m==="asc"?1:-1)}else{if(!q){return(m==="asc"?-1:1)}else{return 0}}});g(l,function(o,p){h.deleteColumn(p+1).insertColumn(p+1,o[0],o.slice(1))});return h}function a(m,j){var i=this,k=this.output().slice(0,1),h=this.output().slice(1),l=j||this.getRowIndex;h.sort(function(o,n){var p=l.call(i,o)>l.call(i,n);if(p){return(m==="asc"?1:-1)}else{if(!p){return(m==="asc"?-1:1)}else{return 0}}});i.output(k.concat(h));return i}},{"../../core/utils/each":31}],45:[function(c,f,b){var g=c("../../core/utils/each");f.exports={updateColumn:d,updateRow:a};function d(k,i){var h=this,j=(typeof k==="number")?k:this.data.output[0].indexOf(k);if(j>-1){if(typeof i==="function"){g(h.output(),function(n,m){var l;if(m>0){l=i.call(h,n[j],m,n);if(typeof l!=="undefined"){h.data.output[m][j]=l}}})}else{if(!i||i instanceof Array){g(h.output(),function(n,m){var l;if(m>0){l=(i&&typeof i[m-1]!=="undefined"?i[m-1]:null);h.data.output[m][j]=l}})}}}return h}function a(k,i){var h=this,j=(typeof k==="number")?k:this.selectColumn(0).indexOf(k);if(j>-1){if(typeof i==="function"){g(h.output()[j],function(o,n){var m=h.selectColumn(n),l=i.call(h,o,n,m);if(typeof l!=="undefined"){h.data.output[j][n]=l}})}else{if(!i||i instanceof Array){g(h.output()[j],function(n,m){var l;if(m>0){l=(i&&i[m-1]!==undefined)?i[m-1]:null;h.data.output[j][m]=l}})}}}return h}},{"../../core/utils/each":31}],46:[function(b,c,a){c.exports=d;function d(g){var k={};for(var h in g){if(!g.hasOwnProperty(h)){continue}if((typeof g[h])=="object"&&g[h]!==null){var j=d(g[h]);for(var f in j){if(!j.hasOwnProperty(f)){continue}k[h+"."+f]=j[f]}}else{k[h]=g[h]}}return k}},{}],47:[function(b,c,a){var d=b("../../core/utils/each");c.exports=function(){var f=[];var g=function(){var h=arguments[0];var i=Array.prototype.slice.call(arguments,1);var j=i.pop();if(i.length===0){if(h instanceof Array){i=h}else{if(typeof h==="object"){i.push(h)}}}d(i,function(k){if(j==""){if(typeof k=="number"||k==null)