/* jquery.sparkline 2.1.2 - http://omnipotent.net/jquery.sparkline/ ** Licensed under the New BSD License - see above site for details */ (function(e){if(typeof define==="function"&&define.amd){define(["jquery"],e)}else{e(jQuery)}})(function(e){"use strict";var t={},n,r,i,s,o,u,a,f,l,c,h,p,d,v,m,g,y,b,w,E,S,x,T,N,C,k,L,A,O,M,_,D,P=0;n=function(){return{common:{type:"line",lineColor:"#00f",fillColor:"#cdf",defaultPixelsPerValue:3,width:"auto",height:"auto",composite:false,tagValuesAttribute:"values",tagOptionsPrefix:"spark",enableTagOptions:false,enableHighlight:true,highlightLighten:1.4,tooltipSkipNull:true,tooltipPrefix:"",tooltipSuffix:"",disableHiddenCheck:false,numberFormatter:false,numberDigitGroupCount:3,numberDigitGroupSep:",",numberDecimalMark:".",disableTooltips:false,disableInteraction:false},line:{spotColor:"#f80",highlightSpotColor:"#5f5",highlightLineColor:"#f22",spotRadius:1.5,minSpotColor:"#f80",maxSpotColor:"#f80",lineWidth:1,normalRangeMin:undefined,normalRangeMax:undefined,normalRangeColor:"#ccc",drawNormalOnTop:false,chartRangeMin:undefined,chartRangeMax:undefined,chartRangeMinX:undefined,chartRangeMaxX:undefined,tooltipFormat:new i(' {{prefix}}{{y}}{{suffix}}')},bar:{barColor:"#3366cc",negBarColor:"#f44",stackedBarColor:["#3366cc","#dc3912","#ff9900","#109618","#66aa00","#dd4477","#0099c6","#990099"],zeroColor:undefined,nullColor:undefined,zeroAxis:true,barWidth:4,barSpacing:1,chartRangeMax:undefined,chartRangeMin:undefined,chartRangeClip:false,colorMap:undefined,tooltipFormat:new i(' {{prefix}}{{value}}{{suffix}}')},tristate:{barWidth:4,barSpacing:1,posBarColor:"#6f6",negBarColor:"#f44",zeroBarColor:"#999",colorMap:{},tooltipFormat:new i(' {{value:map}}'),tooltipValueLookups:{map:{"-1":"Loss",0:"Draw",1:"Win"}}},discrete:{lineHeight:"auto",thresholdColor:undefined,thresholdValue:0,chartRangeMax:undefined,chartRangeMin:undefined,chartRangeClip:false,tooltipFormat:new i("{{prefix}}{{value}}{{suffix}}")},bullet:{targetColor:"#f33",targetWidth:3,performanceColor:"#33f",rangeColors:["#d3dafe","#a8b6ff","#7f94ff"],base:undefined,tooltipFormat:new i("{{fieldkey:fields}} - {{value}}"),tooltipValueLookups:{fields:{r:"Range",p:"Performance",t:"Target"}}},pie:{offset:0,sliceColors:["#3366cc","#dc3912","#ff9900","#109618","#66aa00","#dd4477","#0099c6","#990099"],borderWidth:0,borderColor:"#000",tooltipFormat:new i(' {{value}} ({{percent.1}}%)')},box:{raw:false,boxLineColor:"#000",boxFillColor:"#cdf",whiskerColor:"#000",outlierLineColor:"#333",outlierFillColor:"#fff",medianColor:"#f00",showOutliers:true,outlierIQR:1.5,spotRadius:1.5,target:undefined,targetColor:"#4a2",chartRangeMax:undefined,chartRangeMin:undefined,tooltipFormat:new i("{{field:fields}}: {{value}}"),tooltipFormatFieldlistKey:"field",tooltipValueLookups:{fields:{lq:"Lower Quartile",med:"Median",uq:"Upper Quartile",lo:"Left Outlier",ro:"Right Outlier",lw:"Left Whisker",rw:"Right Whisker"}}}}};k=".jqstooltip { "+"position: absolute;"+"left: 0px;"+"top: 0px;"+"visibility: hidden;"+"background: rgb(0, 0, 0) transparent;"+"background-color: rgba(0,0,0,0.6);"+"filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000);"+'-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000)";'+"color: white;"+"font: 10px arial, san serif;"+"text-align: left;"+"white-space: nowrap;"+"padding: 5px;"+"border: 1px solid white;"+"z-index: 10000;"+"}"+".jqsfield { "+"color: white;"+"font: 10px arial, san serif;"+"text-align: left;"+"}";r=function(){var t,n;t=function(){this.init.apply(this,arguments)};if(arguments.length>1){if(arguments[0]){t.prototype=e.extend(new arguments[0],arguments[arguments.length-1]);t._super=arguments[0].prototype}else{t.prototype=arguments[arguments.length-1]}if(arguments.length>2){n=Array.prototype.slice.call(arguments,1,-1);n.unshift(t.prototype);e.extend.apply(e,n)}}else{t.prototype=arguments[0]}t.prototype.cls=t;return t};e.SPFormatClass=i=r({fre:/\{\{([\w.]+?)(:(.+?))?\}\}/g,precre:/(\w+)\.(\d+)/,init:function(e,t){this.format=e;this.fclass=t},render:function(e,t,n){var r=this,i=e,s,o,u,a,f;return this.format.replace(this.fre,function(){var e;o=arguments[1];u=arguments[3];s=r.precre.exec(o);if(s){f=s[2];o=s[1]}else{f=false}a=i[o];if(a===undefined){return""}if(u&&t&&t[u]){e=t[u];if(e.get){return t[u].get(a)||a}else{return t[u][a]||a}}if(l(a)){if(n.get("numberFormatter")){a=n.get("numberFormatter")(a)}else{a=v(a,f,n.get("numberDigitGroupCount"),n.get("numberDigitGroupSep"),n.get("numberDecimalMark"))}}return a})}});e.spformat=function(e,t){return new i(e,t)};s=function(e,t,n){if(en){return n}return e};o=function(e,t){var n;if(t===2){n=Math.floor(e.length/2);return e.length%2?e[n]:(e[n-1]+e[n])/2}else{if(e.length%2){n=(e.length*t+t)/4;return n%1?(e[Math.floor(n)]+e[Math.floor(n)-1])/2:e[n-1]}else{n=(e.length*t+2)/4;return n%1?(e[Math.floor(n)]+e[Math.floor(n)-1])/2:e[n-1]}}};u=function(e){var t;switch(e){case"undefined":e=undefined;break;case"null":e=null;break;case"true":e=true;break;case"false":e=false;break;default:t=parseFloat(e);if(e==t){e=t}}return e};a=function(e){var t,n=[];for(t=e.length;t--;){n[t]=u(e[t])}return n};f=function(e,t){var n,r,i=[];for(n=0,r=e.length;n0;u-=r){t.splice(u,0,i)}return t.join("")};c=function(e,t,n){var r;for(r=t.length;r--;){if(n&&t[r]===null)continue;if(t[r]!==e){return false}}return true};h=function(e){var t=0,n;for(n=e.length;n--;){t+=typeof e[n]==="number"?e[n]:0}return t};d=function(t){return e.isArray(t)?t:[t]};p=function(e){var t;if(document.createStyleSheet){document.createStyleSheet().cssText=e}else{t=document.createElement("style");t.type="text/css";document.getElementsByTagName("head")[0].appendChild(t);t[typeof document.body.style.WebkitAppearance=="string"?"innerText":"innerHTML"]=e}};e.fn.simpledraw=function(t,n,r,i){var s,o;if(r&&(s=this.data("_jqs_vcanvas"))){return s}if(t===undefined){t=e(this).innerWidth()}if(n===undefined){n=e(this).innerHeight()}if(e.fn.sparkline.hasCanvas){s=new M(t,n,this,i)}else if(e.fn.sparkline.hasVML){s=new _(t,n,this)}else{return false}o=e(this).data("_jqs_mhandler");if(o){o.registerCanvas(s)}return s};e.fn.cleardraw=function(){var e=this.data("_jqs_vcanvas");if(e){e.reset()}};e.RangeMapClass=m=r({init:function(e){var t,n,r=[];for(t in e){if(e.hasOwnProperty(t)&&typeof t==="string"&&t.indexOf(":")>-1){n=t.split(":");n[0]=n[0].length===0?-Infinity:parseFloat(n[0]);n[1]=n[1].length===0?Infinity:parseFloat(n[1]);n[2]=e[t];r.push(n)}}this.map=e;this.rangelist=r||false},get:function(e){var t=this.rangelist,n,r,i;if((i=this.map[e])!==undefined){return i}if(t){for(n=t.length;n--;){r=t[n];if(r[0]<=e&&r[1]>=e){return r[2]}}}return undefined}});e.range_map=function(e){return new m(e)};g=r({init:function(t,n){var r=e(t);this.$el=r;this.options=n;this.currentPageX=0;this.currentPageY=0;this.el=t;this.splist=[];this.tooltip=null;this.over=false;this.displayTooltips=!n.get("disableTooltips");this.highlightEnabled=!n.get("disableHighlight")},registerSparkline:function(e){this.splist.push(e);if(this.over){this.updateDisplay()}},registerCanvas:function(t){var n=e(t.canvas);this.canvas=t;this.$canvas=n;n.mouseenter(e.proxy(this.mouseenter,this));n.mouseleave(e.proxy(this.mouseleave,this));n.click(e.proxy(this.mouseclick,this))},reset:function(e){this.splist=[];if(this.tooltip&&e){this.tooltip.remove();this.tooltip=undefined}},mouseclick:function(t){var n=e.Event("sparklineClick");n.originalEvent=t;n.sparklines=this.splist;this.$el.trigger(n)},mouseenter:function(t){e(document.body).unbind("mousemove.jqs");e(document.body).bind("mousemove.jqs",e.proxy(this.mousemove,this));this.over=true;this.currentPageX=t.pageX;this.currentPageY=t.pageY;this.currentEl=t.target;if(!this.tooltip&&this.displayTooltips){this.tooltip=new y(this.options);this.tooltip.updatePosition(t.pageX,t.pageY)}this.updateDisplay()},mouseleave:function(){e(document.body).unbind("mousemove.jqs");var t=this.splist,n=t.length,r=false,i,s;this.over=false;this.currentEl=null;if(this.tooltip){this.tooltip.remove();this.tooltip=null}for(s=0;s