"object"!=typeof JSON&&(JSON={}),function(){"use strict";function f(a){return 10>a?"0"+a:a}function quote(a){return escapable.lastIndex=0,escapable.test(a)?'"'+a.replace(escapable,function(a){var b=meta[a];return"string"==typeof b?b:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+a+'"'}function str(a,b){var c,d,e,f,g,h=gap,i=b[a];switch(i&&"object"==typeof i&&"function"==typeof i.toJSON&&(i=i.toJSON(a)),"function"==typeof rep&&(i=rep.call(b,a,i)),typeof i){case"string":return quote(i);case"number":return isFinite(i)?String(i):"null";case"boolean":case"null":return String(i);case"object":if(!i)return"null";if(gap+=indent,g=[],"[object Array]"===Object.prototype.toString.apply(i)){for(f=i.length,c=0;f>c;c+=1)g[c]=str(c,i)||"null";return e=0===g.length?"[]":gap?"[\n"+gap+g.join(",\n"+gap)+"\n"+h+"]":"["+g.join(",")+"]",gap=h,e}if(rep&&"object"==typeof rep)for(f=rep.length,c=0;f>c;c+=1)"string"==typeof rep[c]&&(d=rep[c],e=str(d,i),e&&g.push(quote(d)+(gap?": ":":")+e));else for(d in i)Object.prototype.hasOwnProperty.call(i,d)&&(e=str(d,i),e&&g.push(quote(d)+(gap?": ":":")+e));return e=0===g.length?"{}":gap?"{\n"+gap+g.join(",\n"+gap)+"\n"+h+"}":"{"+g.join(",")+"}",gap=h,e}}"function"!=typeof Date.prototype.toJSON&&(Date.prototype.toJSON=function(){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},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){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","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;"function"!=typeof JSON.stringify&&(JSON.stringify=function(a,b,c){var d;if(gap="",indent="","number"==typeof c)for(d=0;c>d;d+=1)indent+=" ";else"string"==typeof c&&(indent=c);if(rep=b,b&&"function"!=typeof b&&("object"!=typeof b||"number"!=typeof b.length))throw new Error("JSON.stringify");return str("",{"":a})}),"function"!=typeof JSON.parse&&(JSON.parse=function(text,reviver){function walk(a,b){var c,d,e=a[b];if(e&&"object"==typeof e)for(c in e)Object.prototype.hasOwnProperty.call(e,c)&&(d=walk(e,c),void 0!==d?e[c]=d:delete e[c]);return reviver.call(a,b,e)}var j;if(text=String(text),cx.lastIndex=0,cx.test(text)&&(text=text.replace(cx,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})),/^[\],:{}\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,"")))return j=eval("("+text+")"),"function"==typeof reviver?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}(),function(a,b){"object"==typeof exports?module.exports=b():"function"==typeof define&&define.amd?define("spinner",b):a.Spinner=b()}(this,function(){"use strict";function a(a,b){var c,d=document.createElement(a||"div");for(c in b)d[c]=b[c];return d}function b(a){for(var b=1,c=arguments.length;c>b;b++)a.appendChild(arguments[b]);return a}function c(a,b,c,d){var e=["opacity",b,~~(100*a),c,d].join("-"),f=.01+c/d*100,g=Math.max(1-(1-a)/b*(100-f),a),h=j.substring(0,j.indexOf("Animation")).toLowerCase(),i=h&&"-"+h+"-"||"";return l[e]||(m.insertRule("@"+i+"keyframes "+e+"{0%{opacity:"+g+"}"+f+"%{opacity:"+a+"}"+(f+.01)+"%{opacity:1}"+(f+b)%100+"%{opacity:"+a+"}100%{opacity:"+g+"}}",m.cssRules.length),l[e]=1),e}function d(a,b){var c,d,e=a.style;if(void 0!==e[b])return b;for(b=b.charAt(0).toUpperCase()+b.slice(1),d=0;d',c)}m.addRule(".spin-vml","behavior:url(#default#VML)"),h.prototype.lines=function(a,d){function f(){return e(c("group",{coordsize:j+" "+j,coordorigin:-i+" "+-i}),{width:j,height:j})}function g(a,g,h){b(l,b(e(f(),{rotation:360/d.lines*a+"deg",left:~~g}),b(e(c("roundrect",{arcsize:d.corners}),{width:i,height:d.width,left:d.radius,top:-d.width>>1,filter:h}),c("fill",{color:d.color,opacity:d.opacity}),c("stroke",{opacity:0}))))}var h,i=d.length+d.width,j=2*i,k=2*-(d.width+d.length)+"px",l=e(f(),{position:"absolute",top:k,left:k});if(d.shadow)for(h=1;h<=d.lines;h++)g(h,-2,"progid:DXImageTransform.Microsoft.Blur(pixelradius=2,makeshadow=1,shadowopacity=.3)");for(h=1;h<=d.lines;h++)g(h);return b(a,l)},h.prototype.opacity=function(a,b,c,d){var e=a.firstChild;d=d.shadow&&d.lines||0,e&&b+d>1):parseInt(h.left,10)+k)+"px",top:("auto"==h.top?d.y-c.y+(b.offsetHeight>>1):parseInt(h.top,10)+k)+"px"})),i.setAttribute("role","progressbar"),f.lines(i,f.opts),!j){var l,m=0,n=(h.lines-1)*(1-h.direction)/2,o=h.fps,p=o/h.speed,q=(1-h.opacity)/(p*h.trail/100),r=p/h.lines;!function s(){m++;for(var a=0;a>1)+"px"})}for(var h,i=0,k=(f.lines-1)*(1-f.direction)/2;i=200&&h.status<300){var a;try{a=JSON.parse(h.responseText)}catch(b){console.log("Could not JSON parse HTTP response: "+h.responseText),g&&g(h,b)}a&&f&&f(a)}else console.log("HTTP request failed."),g&&g(h,null)},h.open(a,b,!0),e&&h.setRequestHeader("Authorization",e),d&&h.setRequestHeader("Content-Type","application/json"),c)for(var i in c)c.hasOwnProperty(i)&&h.setRequestHeader(i,c[i]);var j=d?JSON.stringify(d):null;h.send(j)}function c(a,b,c,d){if(b&&a.indexOf("api_key")<0){var e=a.indexOf("?")>0?"&":"?";a=a+e+"api_key="+b}for(var f="keenJSONPCallback"+(new Date).getTime();f in window;)f+="a";var g=!1;window[f]=function(a){g=!0,c&&a&&c(a),window[f]=void 0},a=a+"&jsonp="+f;var h=document.createElement("script");h.id="keen-jsonp",h.src=a,document.getElementsByTagName("head")[0].appendChild(h),h.onreadystatechange=function(){g===!1&&"loaded"===this.readyState&&(g=!0,d&&d())},h.onerror=function(){g===!1&&(g=!0,d&&d())}}function d(a,b,c,d,f){var g=null,h="object"==typeof c.attributes.timeframe;if("string"==typeof c.attributes.timezone){var i=d.result[0].timeframe.start,j=new Date(i),k=j.getUTCHours(),l=j.getUTCMinutes(),m=i.slice(i.length-6,i.length).slice(0,1),n=60*k+l;"-"===m&&(n=-n),g=n}else g=c.attributes.timezone/60;var o="";if(void 0!=c&&void 0!=c.attributes&&void 0!=c.attributes.timezone&&a.setMinutes(a.getMinutes()+a.getTimezoneOffset()+g),"daily"==b||-1!=b.indexOf("day")){if(h&&d.result.length>1&&0==f){var p=e(d.result[1].timeframe.start);p.getDate()==a.getDate()&&a.setDate(a.getDate()-1)}o+=1+a.getMonth(),o+="/",o+=a.getDate()}else"weekly"==b||-1!=b.indexOf("week")?(o+=1+a.getMonth(),o+="/",o+=a.getDate()):"hourly"==b||-1!=b.indexOf("hours")?(o+=a.getHours(),o+=":",o+="00"):"monthly"==b||-1!=b.indexOf("month")?(o+=1+a.getMonth(),o+="/",o+=(a.getFullYear()+"").slice(-2)):"minutely"==b||-1!=b.indexOf("minute")?(o+=a.getHours(),o+=":",o+=("0"+a.getMinutes()).slice(-2)):console.log("Invalid interval: "+b);return o}function e(a){var b,c,d=[1,4,5,6,7,10,11],e=0;if(c=/^(\d{4}|[+\-]\d{6})(?:-(\d{2})(?:-(\d{2}))?)?(?:T(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{3}))?)?(?:(Z)|([+\-])(\d{2})(?::(\d{2}))?)?)?$/.exec(a)){for(var f,g=0;f=d[g];++g)c[f]=+c[f]||0;c[2]=(+c[2]||1)-1,c[3]=+c[3]||1,"Z"!==c[8]&&void 0!==c[9]&&(e=60*c[10]+c[11],"+"===c[9]&&(e=0-e)),b=Date.UTC(c[1],c[2],c[3],c[4],c[5]+e,c[6],c[7])}else b=Date.parse?Date.parse(a):0/0;return new Date(b)}function f(){return-60*(new Date).getTimezoneOffset()}function g(a){return _.each(a,function(b,c){_.isUndefined(b)&&delete a[c]}),_.map(a,function(a,b){return _.isString(a)||(a=JSON.stringify(a)),a=encodeURIComponent(a),b+"="+a}).join("&")}var h=!1;("undefined"==typeof console||"undefined"==typeof console.log)&&(console={},console.log=h?function(a){alert(a)}:function(){});var i=function(){};if(i.extend=function(a,b){var c=i.prototype.extend;i._prototyping=!0;var d=new this;c.call(d,a),d.base=function(){},delete i._prototyping;var e=d.constructor,f=d.constructor=function(){if(!i._prototyping)if(this._constructing||this.constructor==f)this._constructing=!0,e.apply(this,arguments),delete this._constructing;else if(null!=arguments[0])return(arguments[0].extend||c).call(arguments[0],d)};return f.ancestor=this,f.extend=this.extend,f.forEach=this.forEach,f.implement=this.implement,f.prototype=d,f.toString=this.toString,f.valueOf=function(a){return"object"==a?f:e.valueOf()},c.call(f,b),"function"==typeof f.init&&f.init(),f},i.prototype={extend:function(a,b){if(arguments.length>1){var c=this[a];if(c&&"function"==typeof b&&(!c.valueOf||c.valueOf()!=b.valueOf())&&/\bbase\b/.test(b)){var d=b.valueOf();b=function(){var a=this.base||i.prototype.base;this.base=c;var b=d.apply(this,arguments);return this.base=a,b},b.valueOf=function(a){return"object"==a?b:d},b.toString=i.toString}this[a]=b}else if(a){var e=i.prototype.extend;i._prototyping||"function"==typeof this||(e=this.extend||e);for(var f={toSource:null},g=["constructor","toString","valueOf"],h=i._prototyping?0:1;j=g[h++];)a[j]!=f[j]&&e.call(this,j,a[j]);for(var j in a)f[j]||e.call(this,j,a[j])}return this}},i=i.extend({constructor:function(){this.extend(arguments[0])}},{ancestor:Object,version:"1.1",forEach:function(a,b,c){for(var d in a)void 0===this.prototype[d]&&b.call(c,a[d],d,a)},implement:function(){for(var a=0;a>2,f=(3&b)<<4|c>>4,g=(15&c)<<2|d>>6,h=63&d,isNaN(c)?g=h=64:isNaN(d)&&(h=64),i=i+Keen.Base64._keyStr.charAt(e)+Keen.Base64._keyStr.charAt(f)+Keen.Base64._keyStr.charAt(g)+Keen.Base64._keyStr.charAt(h);return i},decode:function(a){var b,c,d,e,f,g,h,i="",j=0;for(a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");j>4,c=(15&f)<<4|g>>2,d=(3&g)<<6|h,i+=String.fromCharCode(b),64!=g&&(i+=String.fromCharCode(c)),64!=h&&(i+=String.fromCharCode(d));return i=Keen.Base64._utf8_decode(i)},_utf8_encode:function(a){a=a.replace(/\r\n/g,"\n");for(var b="",c=0;cd?b+=String.fromCharCode(d):d>127&&2048>d?(b+=String.fromCharCode(d>>6|192),b+=String.fromCharCode(63&d|128)):(b+=String.fromCharCode(d>>12|224),b+=String.fromCharCode(d>>6&63|128),b+=String.fromCharCode(63&d|128))}return b},_utf8_decode:function(a){for(var b="",c=0,d=c1=c2=0;cd?(b+=String.fromCharCode(d),c++):d>191&&224>d?(c2=a.charCodeAt(c+1),b+=String.fromCharCode((31&d)<<6|63&c2),c+=2):(c2=a.charCodeAt(c+1),c3=a.charCodeAt(c+2),b+=String.fromCharCode((15&d)<<12|(63&c2)<<6|63&c3),c+=3);return b}},Keen._cf&&(Keen.configure(Keen._cf),Keen._cf=null),Keen._gp&&(Keen.setGlobalProperties(Keen._gp),Keen._gp=null),Keen._eq&&Keen._eq.length>0){for(var j=0;j0){for(var j=0;j1){a=d[0];var f=d[1];2==a.length&&f.length>0?f.length>0?a=a+"."+f.charAt(0):a+="0":1==a.length&&f.length>0&&(a=a+"."+f.charAt(0),a+=f.length>1?f.charAt(1):"0")}var g=a.length;return a.split(".").length>1&&g--,3>=g?String(a)+e[c]:b(Number(a)/1e3,c+1)}var c=a.toPrecision(3);if(Number(c)==a&&String(a).length<=4)return String(a);if(a>=1||-1>=a){var d="";0>a&&(a=-a,d="-");var e=["","k","M","B","T"];return d+b(a,0)}return a.toPrecision(3)},Date.prototype.stdTimezoneOffset=function(){var a=new Date(this.getFullYear(),-1,1),b=new Date(this.getFullYear(),6,1);return Math.max(a.getTimezoneOffset(),b.getTimezoneOffset())},Date.prototype.dst=function(){return this.getTimezoneOffset()