var _____WB$wombat$assign$function_____=function(name){return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name))||self[name];};if(!self.__WB_pmw){self.__WB_pmw=function(obj){this.__WB_source=obj;return this;}}{
let window = _____WB$wombat$assign$function_____("window");
let self = _____WB$wombat$assign$function_____("self");
let document = _____WB$wombat$assign$function_____("document");
let location = _____WB$wombat$assign$function_____("location");
let top = _____WB$wombat$assign$function_____("top");
let parent = _____WB$wombat$assign$function_____("parent");
let frames = _____WB$wombat$assign$function_____("frames");
let opens = _____WB$wombat$assign$function_____("opens");
(self.webpackChunkextract_css=self.webpackChunkextract_css||[]).push([["336"],{385076:function(D){"use strict";D.exports={}},564169:function(D){/*!
 * Chart.js
 * http://chartjs.org/
 * Version: 1.0.6
 *
 * Copyright 2015 Nick Downie
 * Released under the MIT license
 * https://github.com/nnnick/Chart.js/blob/master/LICENSE.md
 */(function(){"use strict";var R=this,m=R.Chart,s=function(t){var i=this;this.canvas=t.canvas,this.ctx=t;var e=function(f,g){return f["offset"+g]?f["offset"+g]:document.defaultView.getComputedStyle(f).getPropertyValue(g)},o=this.width=e(t.canvas,"Width"),u=this.height=e(t.canvas,"Height");t.canvas.width=o,t.canvas.height=u;var o=this.width=t.canvas.width,u=this.height=t.canvas.height;return this.aspectRatio=this.width/this.height,c.retinaScale(this),this};s.defaults={global:{animation:!0,animationSteps:60,animationEasing:"easeOutQuart",showScale:!0,scaleOverride:!1,scaleSteps:null,scaleStepWidth:null,scaleStartValue:null,scaleLineColor:"rgba(0,0,0,.1)",scaleLineWidth:1,scaleShowLabels:!0,scaleLabel:"<%=value%>",scaleIntegersOnly:!0,scaleBeginAtZero:!1,scaleFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",scaleFontSize:12,scaleFontStyle:"normal",scaleFontColor:"#666",responsive:!1,maintainAspectRatio:!0,showTooltips:!0,customTooltips:!1,tooltipEvents:["mousemove","touchstart","touchmove","mouseout"],tooltipFillColor:"rgba(0,0,0,0.8)",tooltipFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",tooltipFontSize:14,tooltipFontStyle:"normal",tooltipFontColor:"#fff",tooltipTitleFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",tooltipTitleFontSize:14,tooltipTitleFontStyle:"bold",tooltipTitleFontColor:"#fff",tooltipYPadding:6,tooltipXPadding:6,tooltipCaretSize:8,tooltipCornerRadius:6,tooltipXOffset:10,tooltipTemplate:"<%if (label){%><%=label%>: <%}%><%= value %>",multiTooltipTemplate:"<%= value %>",multiTooltipKeyBackground:"#fff",onAnimationProgress:function(){},onAnimationComplete:function(){}}},s.types={};var c=s.helpers={},a=c.each=function(t,i,e){var o=Array.prototype.slice.call(arguments,3);if(t)if(t.length===+t.length){var u;for(u=0;u<t.length;u++)i.apply(e,[t[u],u].concat(o))}else for(var f in t)i.apply(e,[t[f],f].concat(o))},l=c.clone=function(t){var i={};return a(t,function(e,o){t.hasOwnProperty(o)&&(i[o]=e)}),i},n=c.extend=function(t){return a(Array.prototype.slice.call(arguments,1),function(i){a(i,function(e,o){i.hasOwnProperty(o)&&(t[o]=e)})}),t},h=c.merge=function(t,i){var e=Array.prototype.slice.call(arguments,0);return e.unshift({}),n.apply(null,e)},v=c.indexOf=function(t,i){if(Array.prototype.indexOf)return t.indexOf(i);for(var e=0;e<t.length;e++)if(t[e]===i)return e;return-1},L=c.where=function(t,i){var e=[];return c.each(t,function(o){i(o)&&e.push(o)}),e},w=c.findNextWhere=function(t,i,e){e||(e=-1);for(var o=e+1;o<t.length;o++){var u=t[o];if(i(u))return u}},d=c.findPreviousWhere=function(t,i,e){e||(e=t.length);for(var o=e-1;o>=0;o--){var u=t[o];if(i(u))return u}},b=c.inherits=function(t){var i=this,e=t&&t.hasOwnProperty("constructor")?t.constructor:function(){return i.apply(this,arguments)},o=function(){this.constructor=e};return o.prototype=i.prototype,e.prototype=new o,e.extend=b,t&&n(e.prototype,t),e.__super__=i.prototype,e},T=c.noop=function(){},N=c.uid=function(){var t=0;return function(){return"chart-"+t++}}(),O=c.warn=function(t){window.console&&typeof window.console.warn=="function"&&console.warn(t)},$=c.amd=typeof define=="function"&&define.amd,G=c.isNumber=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},X=c.max=function(t){return Math.max.apply(Math,t)},Z=c.min=function(t){return Math.min.apply(Math,t)},ht=c.cap=function(t,i,e){if(G(i)){if(t>i)return i}else if(G(e)&&t<e)return e;return t},Q=c.getDecimalPlaces=function(t){return t%1!==0&&G(t)?t.toString().split(".")[1].length:0},tt=c.radians=function(t){return t*(Math.PI/180)},at=c.getAngleFromPoint=function(t,i){var e=i.x-t.x,o=i.y-t.y,u=Math.sqrt(e*e+o*o),f=Math.PI*2+Math.atan2(o,e);return e<0&&o<0&&(f+=Math.PI*2),{angle:f,distance:u}},it=c.aliasPixel=function(t){return t%2===0?0:.5},J=c.splineCurve=function(t,i,e,o){var u=Math.sqrt(Math.pow(i.x-t.x,2)+Math.pow(i.y-t.y,2)),f=Math.sqrt(Math.pow(e.x-i.x,2)+Math.pow(e.y-i.y,2)),g=o*u/(u+f),x=o*f/(u+f);return{inner:{x:i.x-g*(e.x-t.x),y:i.y-g*(e.y-t.y)},outer:{x:i.x+x*(e.x-t.x),y:i.y+x*(e.y-t.y)}}},nt=c.calculateOrderOfMagnitude=function(t){return Math.floor(Math.log(t)/Math.LN10)},rt=c.calculateScaleRange=function(t,i,e,o,u){var f=2,g=Math.floor(i/(e*1.5)),x=f>=g,_=X(t),A=Z(t);_===A&&(_+=.5,A>=.5&&!o?A-=.5:_+=.5);for(var k=Math.abs(_-A),W=nt(k),H=Math.ceil(_/(1*Math.pow(10,W)))*Math.pow(10,W),F=o?0:Math.floor(A/(1*Math.pow(10,W)))*Math.pow(10,W),z=H-F,B=Math.pow(10,W),V=Math.round(z/B);(V>g||V*2<g)&&!x;)if(V>g)B*=2,V=Math.round(z/B),V%1!==0&&(x=!0);else if(u&&W>=0)if(B/2%1===0)B/=2,V=Math.round(z/B);else break;else B/=2,V=Math.round(z/B);return x&&(V=f,B=z/V),{steps:V,stepValue:B,min:F,max:F+V*B}},Y=c.template=function(t,i){if(t instanceof Function)return t(i);var e={};function o(u,f){var g=/\W/.test(u)?new Function("obj","var p=[],print=function(){p.push.apply(p,arguments);};with(obj){p.push('"+u.replace(/[\r\t\n]/g," ").split("<%").join("	").replace(/((^|%>)[^\t]*)'/g,"$1\r").replace(/\t=(.*?)%>/g,"',$1,'").split("	").join("');").split("%>").join("p.push('").split("\r").join("\\'")+"');}return p.join('');"):e[u]=e[u];return f?g(f):g}return o(t,i)},ct=c.generateLabels=function(t,i,e,o){var u=new Array(i);return labelTemplateString&&a(u,function(f,g){u[g]=Y(t,{value:e+o*(g+1)})}),u},q=c.easingEffects={linear:function(t){return t},easeInQuad:function(t){return t*t},easeOutQuad:function(t){return-1*t*(t-2)},easeInOutQuad:function(t){return(t/=1/2)<1?1/2*t*t:-1/2*(--t*(t-2)-1)},easeInCubic:function(t){return t*t*t},easeOutCubic:function(t){return 1*((t=t/1-1)*t*t+1)},easeInOutCubic:function(t){return(t/=1/2)<1?1/2*t*t*t:1/2*((t-=2)*t*t+2)},easeInQuart:function(t){return t*t*t*t},easeOutQuart:function(t){return-1*((t=t/1-1)*t*t*t-1)},easeInOutQuart:function(t){return(t/=1/2)<1?1/2*t*t*t*t:-1/2*((t-=2)*t*t*t-2)},easeInQuint:function(t){return 1*(t/=1)*t*t*t*t},easeOutQuint:function(t){return 1*((t=t/1-1)*t*t*t*t+1)},easeInOutQuint:function(t){return(t/=1/2)<1?1/2*t*t*t*t*t:1/2*((t-=2)*t*t*t*t+2)},easeInSine:function(t){return-1*Math.cos(t/1*(Math.PI/2))+1},easeOutSine:function(t){return 1*Math.sin(t/1*(Math.PI/2))},easeInOutSine:function(t){return-1/2*(Math.cos(Math.PI*t/1)-1)},easeInExpo:function(t){return t===0?1:1*Math.pow(2,10*(t/1-1))},easeOutExpo:function(t){return t===1?1:1*(-Math.pow(2,-10*t/1)+1)},easeInOutExpo:function(t){return t===0?0:t===1?1:(t/=1/2)<1?1/2*Math.pow(2,10*(t-1)):1/2*(-Math.pow(2,-10*--t)+2)},easeInCirc:function(t){return t>=1?t:-1*(Math.sqrt(1-(t/=1)*t)-1)},easeOutCirc:function(t){return 1*Math.sqrt(1-(t=t/1-1)*t)},easeInOutCirc:function(t){return(t/=1/2)<1?-1/2*(Math.sqrt(1-t*t)-1):1/2*(Math.sqrt(1-(t-=2)*t)+1)},easeInElastic:function(t){var i=1.70158,e=0,o=1;return t===0?0:(t/=1)==1?1:(e||(e=1*.3),o<Math.abs(1)?(o=1,i=e/4):i=e/(2*Math.PI)*Math.asin(1/o),-(o*Math.pow(2,10*(t-=1))*Math.sin((t*1-i)*(2*Math.PI)/e)))},easeOutElastic:function(t){var i=1.70158,e=0,o=1;return t===0?0:(t/=1)==1?1:(e||(e=1*.3),o<Math.abs(1)?(o=1,i=e/4):i=e/(2*Math.PI)*Math.asin(1/o),o*Math.pow(2,-10*t)*Math.sin((t*1-i)*(2*Math.PI)/e)+1)},easeInOutElastic:function(t){var i=1.70158,e=0,o=1;return t===0?0:(t/=1/2)==2?1:(e||(e=1*(.3*1.5)),o<Math.abs(1)?(o=1,i=e/4):i=e/(2*Math.PI)*Math.asin(1/o),t<1?-.5*(o*Math.pow(2,10*(t-=1))*Math.sin((t*1-i)*(2*Math.PI)/e)):o*Math.pow(2,-10*(t-=1))*Math.sin((t*1-i)*(2*Math.PI)/e)*.5+1)},easeInBack:function(t){var i=1.70158;return 1*(t/=1)*t*((i+1)*t-i)},easeOutBack:function(t){var i=1.70158;return 1*((t=t/1-1)*t*((i+1)*t+i)+1)},easeInOutBack:function(t){var i=1.70158;return(t/=1/2)<1?1/2*(t*t*(((i*=1.525)+1)*t-i)):1/2*((t-=2)*t*(((i*=1.525)+1)*t+i)+2)},easeInBounce:function(t){return 1-q.easeOutBounce(1-t)},easeOutBounce:function(t){return(t/=1)<1/2.75?1*(7.5625*t*t):t<2/2.75?1*(7.5625*(t-=1.5/2.75)*t+.75):t<2.5/2.75?1*(7.5625*(t-=2.25/2.75)*t+.9375):1*(7.5625*(t-=2.625/2.75)*t+.984375)},easeInOutBounce:function(t){return t<1/2?q.easeInBounce(t*2)*.5:q.easeOutBounce(t*2-1)*.5+1*.5}},et=c.requestAnimFrame=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){return window.setTimeout(t,1e3/60)}}(),ot=c.cancelAnimFrame=function(){return window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.oCancelAnimationFrame||window.msCancelAnimationFrame||function(t){return window.clearTimeout(t,1e3/60)}}(),r=c.animationLoop=function(t,i,e,o,u,f){var g=0,x=q[e]||q.linear,_=function(){g++;var A=g/i,k=x(A);t.call(f,k,A,g),o.call(f,k,A),g<i?f.animationFrame=et(_):u.apply(f)};et(_)},C=c.getRelativePosition=function(t){var i,e,o=t.originalEvent||t,u=t.currentTarget||t.srcElement,f=u.getBoundingClientRect();return o.touches?(i=o.touches[0].clientX-f.left,e=o.touches[0].clientY-f.top):(i=o.clientX-f.left,e=o.clientY-f.top),{x:i,y:e}},p=c.addEvent=function(t,i,e){t.addEventListener?t.addEventListener(i,e):t.attachEvent?t.attachEvent("on"+i,e):t["on"+i]=e},y=c.removeEvent=function(t,i,e){t.removeEventListener?t.removeEventListener(i,e,!1):t.detachEvent?t.detachEvent("on"+i,e):t["on"+i]=T},P=c.bindEvents=function(t,i,e){t.events||(t.events={}),a(i,function(o){t.events[o]=function(){e.apply(t,arguments)},p(t.chart.canvas,o,t.events[o])})},S=c.unbindEvents=function(t,i){a(i,function(e,o){y(t.chart.canvas,o,e)})},E=c.getMaximumWidth=function(t){var i=t.parentNode;return i.clientWidth},I=c.getMaximumHeight=function(t){var i=t.parentNode;return i.clientHeight},K=c.getMaximumSize=c.getMaximumWidth,st=c.retinaScale=function(t){var i=t.ctx,e=t.canvas.width,o=t.canvas.height;window.devicePixelRatio&&(i.canvas.style.width=e+"px",i.canvas.style.height=o+"px",i.canvas.height=o*window.devicePixelRatio,i.canvas.width=e*window.devicePixelRatio,i.scale(window.devicePixelRatio,window.devicePixelRatio))},lt=c.clear=function(t){t.ctx.clearRect(0,0,t.width,t.height)},M=c.fontString=function(t,i,e){return i+" "+t+"px "+e},U=c.longestText=function(t,i,e,o){o=o||1/0,t.font=i;var u=0;return a(e,function(f){var g=o<1/0&&f.length>o?f.slice(0,o)+"...":f,x=t.measureText(g).width;u=x>u?x:u}),u},ut=c.drawRoundedRectangle=function(t,i,e,o,u,f){t.beginPath(),t.moveTo(i+f,e),t.lineTo(i+o-f,e),t.quadraticCurveTo(i+o,e,i+o,e+f),t.lineTo(i+o,e+u-f),t.quadraticCurveTo(i+o,e+u,i+o-f,e+u),t.lineTo(i+f,e+u),t.quadraticCurveTo(i,e+u,i,e+u-f),t.lineTo(i,e+f),t.quadraticCurveTo(i,e,i+f,e),t.closePath()};s.instances={},s.Type=function(t,i,e){this.options=i,this.chart=e,this.id=N(),s.instances[this.id]=this,i.responsive&&this.resize(),this.initialize.call(this,t)},n(s.Type.prototype,{initialize:function(){return this},clear:function(){return lt(this.chart),this},stop:function(){return ot(this.animationFrame),this},resize:function(t){this.stop();var i=this.chart.canvas,e=E(this.chart.canvas),o=this.options.maintainAspectRatio?e/this.chart.aspectRatio:I(this.chart.canvas);return i.width=this.chart.width=e,i.height=this.chart.height=o,st(this.chart),typeof t=="function"&&t.apply(this,Array.prototype.slice.call(arguments,1)),this},reflow:T,render:function(t){return t&&this.reflow(),this.options.animation&&!t?c.animationLoop(this.draw,this.options.animationSteps,this.options.animationEasing,this.options.onAnimationProgress,this.options.onAnimationComplete,this):(this.draw(),this.options.onAnimationComplete.call(this)),this},generateLegend:function(){return Y(this.options.legendTemplate,this)},destroy:function(){this.clear(),S(this,this.events);var t=this.chart.canvas;t.width=this.chart.width,t.height=this.chart.height,t.style.removeProperty?(t.style.removeProperty("width"),t.style.removeProperty("height")):(t.style.removeAttribute("width"),t.style.removeAttribute("height")),delete s.instances[this.id]},showTooltip:function(t,i){typeof this.activeElements=="undefined"&&(this.activeElements=[]);var e=function(A){var k=!1;return A.length!==this.activeElements.length?(k=!0,k):(a(A,function(W,H){W!==this.activeElements[H]&&(k=!0)},this),k)}.call(this,t);if(!(!e&&!i)){if(this.activeElements=t,this.draw(),this.options.customTooltips&&this.options.customTooltips(!1),t.length>0)if(this.datasets&&this.datasets.length>1){for(var o,u,f=this.datasets.length-1;f>=0&&(o=this.datasets[f].points||this.datasets[f].bars||this.datasets[f].segments,u=v(o,t[0]),u===-1);f--);var g=[],x=[],_=function(A){var k=[],W,H=[],F=[],z,B,V,ft;return c.each(this.datasets,function(j){W=j.points||j.bars||j.segments,W[u]&&W[u].hasValue()&&k.push(W[u])}),c.each(k,function(j){H.push(j.x),F.push(j.y),g.push(c.template(this.options.multiTooltipTemplate,j)),x.push({fill:j._saved.fillColor||j.fillColor,stroke:j._saved.strokeColor||j.strokeColor})},this),ft=Z(F),B=X(F),V=Z(H),z=X(H),{x:V>this.chart.width/2?V:z,y:(ft+B)/2}}.call(this,u);new s.MultiTooltip({x:_.x,y:_.y,xPadding:this.options.tooltipXPadding,yPadding:this.options.tooltipYPadding,xOffset:this.options.tooltipXOffset,fillColor:this.options.tooltipFillColor,textColor:this.options.tooltipFontColor,fontFamily:this.options.tooltipFontFamily,fontStyle:this.options.tooltipFontStyle,fontSize:this.options.tooltipFontSize,titleTextColor:this.options.tooltipTitleFontColor,titleFontFamily:this.options.tooltipTitleFontFamily,titleFontStyle:this.options.tooltipTitleFontStyle,titleFontSize:this.options.tooltipTitleFontSize,cornerRadius:this.options.tooltipCornerRadius,labels:g,legendColors:x,legendColorBackground:this.options.multiTooltipKeyBackground,title:t[0].label,chart:this.chart,ctx:this.chart.ctx,custom:this.options.customTooltips}).draw()}else a(t,function(A){var k=A.tooltipPosition();new s.Tooltip({x:Math.round(k.x),y:Math.round(k.y),xPadding:this.options.tooltipXPadding,yPadding:this.options.tooltipYPadding,fillColor:this.options.tooltipFillColor,textColor:this.options.tooltipFontColor,fontFamily:this.options.tooltipFontFamily,fontStyle:this.options.tooltipFontStyle,fontSize:this.options.tooltipFontSize,caretHeight:this.options.tooltipCaretSize,cornerRadius:this.options.tooltipCornerRadius,text:Y(this.options.tooltipTemplate,A),chart:this.chart,custom:this.options.customTooltips}).draw()},this);return this}},toBase64Image:function(){return this.chart.canvas.toDataURL.apply(this.chart.canvas,arguments)}}),s.Type.extend=function(t){var i=this,e=function(){return i.apply(this,arguments)};if(e.prototype=l(i.prototype),n(e.prototype,t),e.extend=s.Type.extend,t.name||i.prototype.name){var o=t.name||i.prototype.name,u=s.defaults[i.prototype.name]?l(s.defaults[i.prototype.name]):{};s.defaults[o]=n(u,t.defaults),s.types[o]=e,s.prototype[o]=function(f,g){var x=h(s.defaults.global,s.defaults[o],g||{});return new e(f,x,this)}}else O("Name not provided for this chart, so it hasn't been registered");return i},s.Element=function(t){n(this,t),this.initialize.apply(this,arguments),this.save()},n(s.Element.prototype,{initialize:function(){},restore:function(t){return t?a(t,function(i){this[i]=this._saved[i]},this):n(this,this._saved),this},save:function(){return this._saved=l(this),delete this._saved._saved,this},update:function(t){return a(t,function(i,e){this._saved[e]=this[e],this[e]=i},this),this},transition:function(t,i){return a(t,function(e,o){this[o]=(e-this._saved[o])*i+this._saved[o]},this),this},tooltipPosition:function(){return{x:this.x,y:this.y}},hasValue:function(){return G(this.value)}}),s.Element.extend=b,s.Point=s.Element.extend({display:!0,inRange:function(t,i){var e=this.hitDetectionRadius+this.radius;return Math.pow(t-this.x,2)+Math.pow(i-this.y,2)<Math.pow(e,2)},draw:function(){if(this.display){var t=this.ctx;t.beginPath(),t.arc(this.x,this.y,this.radius,0,Math.PI*2),t.closePath(),t.strokeStyle=this.strokeColor,t.lineWidth=this.strokeWidth,t.fillStyle=this.fillColor,t.fill(),t.stroke()}}}),s.Arc=s.Element.extend({inRange:function(t,i){var e=c.getAngleFromPoint(this,{x:t,y:i}),o=e.angle>=this.startAngle&&e.angle<=this.endAngle,u=e.distance>=this.innerRadius&&e.distance<=this.outerRadius;return o&&u},tooltipPosition:function(){var t=this.startAngle+(this.endAngle-this.startAngle)/2,i=(this.outerRadius-this.innerRadius)/2+this.innerRadius;return{x:this.x+Math.cos(t)*i,y:this.y+Math.sin(t)*i}},draw:function(t){var i=t||1,e=this.ctx;e.beginPath(),e.arc(this.x,this.y,this.outerRadius,this.startAngle,this.endAngle),e.arc(this.x,this.y,this.innerRadius,this.endAngle,this.startAngle,!0),e.closePath(),e.strokeStyle=this.strokeColor,e.lineWidth=this.strokeWidth,e.fillStyle=this.fillColor,e.fill(),e.lineJoin="bevel",this.showStroke&&e.stroke()}}),s.Rectangle=s.Element.extend({draw:function(){var t=this.ctx,i=this.width/2,e=this.x-i,o=this.x+i,u=this.base-(this.base-this.y),f=this.strokeWidth/2;this.showStroke&&(e+=f,o-=f,u+=f),t.beginPath(),t.fillStyle=this.fillColor,t.strokeStyle=this.strokeColor,t.lineWidth=this.strokeWidth,t.moveTo(e,this.base),t.lineTo(e,u),t.lineTo(o,u),t.lineTo(o,this.base),t.fill(),this.showStroke&&t.stroke()},height:function(){return this.base-this.y},inRange:function(t,i){return this.y<this.base?t>=this.x-this.width/2&&t<=this.x+this.width/2&&i>=this.y&&i<=this.base:t>=this.x-this.width/2&&t<=this.x+this.width/2&&i>=this.base&&i<=this.y}}),s.Tooltip=s.Element.extend({draw:function(){var t=this.chart.ctx;t.font=M(this.fontSize,this.fontStyle,this.fontFamily),this.xAlign="center",this.yAlign="above";var i=this.caretPadding=2,e=t.measureText(this.text).width+2*this.xPadding,o=this.fontSize+2*this.yPadding,u=o+this.caretHeight+i;this.x+e/2>this.chart.width?this.xAlign="left":this.x-e/2<0&&(this.xAlign="right"),this.y-u<0&&(this.yAlign="below");var f=this.x-e/2,g=this.y-u;if(t.fillStyle=this.fillColor,this.custom)this.custom(this);else{switch(this.yAlign){case"above":t.beginPath(),t.moveTo(this.x,this.y-i),t.lineTo(this.x+this.caretHeight,this.y-(i+this.caretHeight)),t.lineTo(this.x-this.caretHeight,this.y-(i+this.caretHeight)),t.closePath(),t.fill();break;case"below":g=this.y+i+this.caretHeight,t.beginPath(),t.moveTo(this.x,this.y+i),t.lineTo(this.x+this.caretHeight,this.y+i+this.caretHeight),t.lineTo(this.x-this.caretHeight,this.y+i+this.caretHeight),t.closePath(),t.fill();break}switch(this.xAlign){case"left":f=this.x-e+(this.cornerRadius+this.caretHeight);break;case"right":f=this.x-(this.cornerRadius+this.caretHeight);break}ut(t,f,g,e,o,this.cornerRadius),t.fill(),t.fillStyle=this.textColor,t.textAlign="center",t.textBaseline="middle",t.fillText(this.text,f+e/2,g+o/2)}}}),s.MultiTooltip=s.Element.extend({initialize:function(){this.font=M(this.fontSize,this.fontStyle,this.fontFamily),this.titleFont=M(this.titleFontSize,this.titleFontStyle,this.titleFontFamily),this.height=this.labels.length*this.fontSize+(this.labels.length-1)*(this.fontSize/2)+this.yPadding*2+this.titleFontSize*1.5,this.ctx.font=this.titleFont;var t=this.ctx.measureText(this.title).width,i=U(this.ctx,this.font,this.labels)+this.fontSize+3,e=X([i,t]);this.width=e+this.xPadding*2;var o=this.height/2;this.y-o<0?this.y=o:this.y+o>this.chart.height&&(this.y=this.chart.height-o),this.x>this.chart.width/2?this.x-=this.xOffset+this.width:this.x+=this.xOffset},getLineHeight:function(t){var i=this.y-this.height/2+this.yPadding,e=t-1;return t===0?i+this.titleFontSize/2:i+(this.fontSize*1.5*e+this.fontSize/2)+this.titleFontSize*1.5},draw:function(){if(this.custom)this.custom(this);else{ut(this.ctx,this.x,this.y-this.height/2,this.width,this.height,this.cornerRadius);var t=this.ctx;t.fillStyle=this.fillColor,t.fill(),t.closePath(),t.textAlign="left",t.textBaseline="middle",t.fillStyle=this.titleTextColor,t.font=this.titleFont,t.fillText(this.title,this.x+this.xPadding,this.getLineHeight(0)),t.font=this.font,c.each(this.labels,function(i,e){t.fillStyle=this.textColor,t.fillText(i,this.x+this.xPadding+this.fontSize+3,this.getLineHeight(e+1)),t.fillStyle=this.legendColorBackground,t.fillRect(this.x+this.xPadding,this.getLineHeight(e+1)-this.fontSize/2,this.fontSize,this.fontSize),t.fillStyle=this.legendColors[e].fill,t.fillRect(this.x+this.xPadding,this.getLineHeight(e+1)-this.fontSize/2,this.fontSize,this.fontSize)},this)}}}),s.Scale=s.Element.extend({initialize:function(){this.fit()},buildYLabels:function(){this.yLabels=[];for(var t=Q(this.stepValue),i=0;i<=this.steps;i++)this.yLabels.push(Y(this.templateString,{value:(this.min+i*this.stepValue).toFixed(t)}));this.yLabelWidth=this.display&&this.showLabels?U(this.ctx,this.font,this.yLabels):0},addXLabel:function(t){this.xLabels.push(t),this.valuesCount++,this.fit()},removeXLabel:function(){this.xLabels.shift(),this.valuesCount--,this.fit()},fit:function(){this.startPoint=this.display?this.fontSize:0,this.endPoint=this.display?this.height-this.fontSize*1.5-5:this.height,this.startPoint+=this.padding,this.endPoint-=this.padding;var t=this.endPoint-this.startPoint,i;for(this.calculateYRange(t),this.buildYLabels(),this.calculateXLabelRotation();t>this.endPoint-this.startPoint;)t=this.endPoint-this.startPoint,i=this.yLabelWidth,this.calculateYRange(t),this.buildYLabels(),i<this.yLabelWidth&&this.calculateXLabelRotation()},calculateXLabelRotation:function(){this.ctx.font=this.font;var t=this.xLabels[0],i=this.xLabels[this.xLabels.length-1],e=this.ctx.measureText(t).width,o=this.ctx.measureText(i).width,u,f;if(this.xScalePaddingRight=o/2+3,this.xScalePaddingLeft=e/2>this.yLabelWidth+10?e/2:this.yLabelWidth+10,this.xLabelRotation=0,this.xLabelLimit=1/0,this.display){var g=U(this.ctx,this.font,this.xLabels),x=0,_,A;this.xLabelWidth=g;for(var k=Math.floor(this.calculateX(1)-this.calculateX(0))-6,W=this.endPoint-this.startPoint,H=0;this.xLabelWidth>k&&this.xLabelRotation<=90&&this.xLabelRotation>=0;)if(x<W/2||this.LabelLimit<5?(this.xLabelRotation++,_=Math.cos(tt(this.xLabelRotation)),u=_*e,f=_*o,u+this.fontSize/2>this.yLabelWidth+8&&(this.xScalePaddingLeft=u+this.fontSize/2),this.xScalePaddingRight=this.fontSize/2):(this.xLabelLimit<1/0?this.xLabelLimit-=1:this.xLabelLimit=Math.max.apply(null,this.xLabels.map(function(F){return F.length}))-1,g=U(this.ctx,this.font,this.xLabels,this.xLabelLimit),t.length>this.xLabelLimit&&(e=this.ctx.measureText(t.slice(0,this.xLabelLimit)+"...").width),i.length>this.xLabelLimit&&(o=this.ctx.measureText(i.slice(0,this.xLabelLimit)+"...").width)),x=Math.sin(tt(this.xLabelRotation))*g+3,this.xLabelWidth=_*g,++H>=1e3){console.warn("Too many iterations!");break}this.xLabelRotation>0&&(this.endPoint-=x)}else this.xLabelWidth=0,this.xScalePaddingRight=this.padding,this.xScalePaddingLeft=this.padding},calculateYRange:T,drawingArea:function(){return this.startPoint-this.endPoint},calculateY:function(t){var i=this.drawingArea()/(this.min-this.max);return this.endPoint-i*(t-this.min)},calculateX:function(t){var i=this.xLabelRotation>0,e=this.width-(this.xScalePaddingLeft+this.xScalePaddingRight),o=e/Math.max(this.valuesCount-(this.offsetGridLines?0:1),1),u=o*t+this.xScalePaddingLeft;return this.offsetGridLines&&(u+=o/2),Math.round(u)},update:function(t){c.extend(this,t),this.fit()},draw:function(){var t=this.ctx,i=(this.endPoint-this.startPoint)/this.steps,e=Math.round(this.xScalePaddingLeft);this.display&&(t.fillStyle=this.textColor,t.font=this.font,a(this.yLabels,function(o,u){var f=this.endPoint-i*u,g=Math.round(f),x=this.showHorizontalLines;t.textAlign="right",t.textBaseline="middle",this.showLabels&&t.fillText(o,e-10,f),u===0&&!x&&(x=!0),x&&t.beginPath(),u>0?(t.lineWidth=this.gridLineWidth,t.strokeStyle=this.gridLineColor):(t.lineWidth=this.lineWidth,t.strokeStyle=this.lineColor),g+=c.aliasPixel(t.lineWidth),x&&(t.moveTo(e,g),t.lineTo(this.width,g),t.stroke(),t.closePath()),t.lineWidth=this.lineWidth,t.strokeStyle=this.lineColor,t.beginPath(),t.moveTo(e-5,g),t.lineTo(e,g),t.stroke(),t.closePath()},this),a(this.xLabels,function(o,u){var f=this.calculateX(u)+it(this.lineWidth),g=this.calculateX(u-(this.offsetGridLines?.5:0))+it(this.lineWidth),x=this.xLabelRotation>0,_=this.showVerticalLines;u===0&&!_&&(_=!0),_&&t.beginPath(),u>0?(t.lineWidth=this.gridLineWidth,t.strokeStyle=this.gridLineColor):(t.lineWidth=this.lineWidth,t.strokeStyle=this.lineColor),_&&(t.moveTo(g,this.endPoint),t.lineTo(g,this.startPoint-3),t.stroke(),t.closePath()),t.lineWidth=this.lineWidth,t.strokeStyle=this.lineColor,t.beginPath(),t.moveTo(g,this.endPoint),t.lineTo(g,this.endPoint+5),t.stroke(),t.closePath(),t.save(),t.translate(f,x?this.endPoint+12:this.endPoint+8),t.rotate(tt(this.xLabelRotation)*-1),t.font=this.font,t.textAlign=x?"right":"center",t.textBaseline=x?"middle":"top",o.length>this.xLabelLimit?t.fillText(o.slice(0,this.xLabelLimit)+"...",0,0):t.fillText(o,0,0),t.restore()},this))}}),s.RadialScale=s.Element.extend({initialize:function(){this.size=Z([this.height,this.width]),this.drawingArea=this.display?this.size/2-(this.fontSize/2+this.backdropPaddingY):this.size/2},calculateCenterOffset:function(t){var i=this.drawingArea/(this.max-this.min);return(t-this.min)*i},update:function(){this.lineArc?this.drawingArea=this.display?this.size/2-(this.fontSize/2+this.backdropPaddingY):this.size/2:this.setScaleSize(),this.buildYLabels()},buildYLabels:function(){this.yLabels=[];for(var t=Q(this.stepValue),i=0;i<=this.steps;i++)this.yLabels.push(Y(this.templateString,{value:(this.min+i*this.stepValue).toFixed(t)}))},getCircumference:function(){return Math.PI*2/this.valuesCount},setScaleSize:function(){var t=Z([this.height/2-this.pointLabelFontSize-5,this.width/2]),i,e,o,u,f=this.width,g,x,_=0,A,k,W,H,F,z,B;for(this.ctx.font=M(this.pointLabelFontSize,this.pointLabelFontStyle,this.pointLabelFontFamily),e=0;e<this.valuesCount;e++)i=this.getPointPosition(e,t),o=this.ctx.measureText(Y(this.templateString,{value:this.labels[e]})).width+5,e===0||e===this.valuesCount/2?(u=o/2,i.x+u>f&&(f=i.x+u,g=e),i.x-u<_&&(_=i.x-u,A=e)):e<this.valuesCount/2?i.x+o>f&&(f=i.x+o,g=e):e>this.valuesCount/2&&i.x-o<_&&(_=i.x-o,A=e);W=_,H=Math.ceil(f-this.width),x=this.getIndexAngle(g),k=this.getIndexAngle(A),F=H/Math.sin(x+Math.PI/2),z=W/Math.sin(k+Math.PI/2),F=G(F)?F:0,z=G(z)?z:0,this.drawingArea=t-(z+F)/2,this.setCenterPoint(z,F)},setCenterPoint:function(t,i){var e=this.width-i-this.drawingArea,o=t+this.drawingArea;this.xCenter=(o+e)/2,this.yCenter=this.height/2},getIndexAngle:function(t){var i=Math.PI*2/this.valuesCount;return t*i-Math.PI/2},getPointPosition:function(t,i){var e=this.getIndexAngle(t);return{x:Math.cos(e)*i+this.xCenter,y:Math.sin(e)*i+this.yCenter}},draw:function(){if(this.display){var t=this.ctx;if(a(this.yLabels,function(A,k){if(k>0){var W=k*(this.drawingArea/this.steps),H=this.yCenter-W,F;if(this.lineWidth>0)if(t.strokeStyle=this.lineColor,t.lineWidth=this.lineWidth,this.lineArc)t.beginPath(),t.arc(this.xCenter,this.yCenter,W,0,Math.PI*2),t.closePath(),t.stroke();else{t.beginPath();for(var z=0;z<this.valuesCount;z++)F=this.getPointPosition(z,this.calculateCenterOffset(this.min+k*this.stepValue)),z===0?t.moveTo(F.x,F.y):t.lineTo(F.x,F.y);t.closePath(),t.stroke()}if(this.showLabels){if(t.font=M(this.fontSize,this.fontStyle,this.fontFamily),this.showLabelBackdrop){var B=t.measureText(A).width;t.fillStyle=this.backdropColor,t.fillRect(this.xCenter-B/2-this.backdropPaddingX,H-this.fontSize/2-this.backdropPaddingY,B+this.backdropPaddingX*2,this.fontSize+this.backdropPaddingY*2)}t.textAlign="center",t.textBaseline="middle",t.fillStyle=this.fontColor,t.fillText(A,this.xCenter,H)}}},this),!this.lineArc){t.lineWidth=this.angleLineWidth,t.strokeStyle=this.angleLineColor;for(var i=this.valuesCount-1;i>=0;i--){if(this.angleLineWidth>0){var e=this.getPointPosition(i,this.calculateCenterOffset(this.max));t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(e.x,e.y),t.stroke(),t.closePath()}var o=this.getPointPosition(i,this.calculateCenterOffset(this.max)+5);t.font=M(this.pointLabelFontSize,this.pointLabelFontStyle,this.pointLabelFontFamily),t.fillStyle=this.pointLabelFontColor;var u=this.labels.length,f=this.labels.length/2,g=f/2,x=i<g||i>u-g,_=i===g||i===u-g;i===0||i===f?t.textAlign="center":i<f?t.textAlign="left":t.textAlign="right",_?t.textBaseline="middle":x?t.textBaseline="bottom":t.textBaseline="top",t.fillText(this.labels[i],o.x,o.y)}}}}}),c.addEvent(window,"resize",function(){var t;return function(){clearTimeout(t),t=setTimeout(function(){a(s.instances,function(i){if(i.options.responsive)try{i.resize(i.render,!0)}catch(e){console.log(e.message)}})},50)}}()),$?define(function(){return s}):D.exports&&(D.exports=s),R.Chart=s,s.noConflict=function(){return R.Chart=m,s}}).call(this),function(){"use strict";var R=this,m=R.Chart,s=m.helpers,c={scaleBeginAtZero:!0,scaleShowGridLines:!0,scaleGridLineColor:"rgba(0,0,0,.05)",scaleGridLineWidth:1,scaleShowHorizontalLines:!0,scaleShowVerticalLines:!0,barShowStroke:!0,barStrokeWidth:2,barValueSpacing:5,barDatasetSpacing:1,legendTemplate:'<ul class="<%=name.toLowerCase()%>-legend"><% for (var i=0; i<datasets.length; i++){%><li><span style="background-color:<%=datasets[i].fillColor%>"></span><%if(datasets[i].label){%><%=datasets[i].label%><%}%></li><%}%></ul>'};m.Type.extend({name:"Bar",defaults:c,initialize:function(a){var l=this.options;this.ScaleClass=m.Scale.extend({offsetGridLines:!0,calculateBarX:function(n,h,v){var L=this.calculateBaseWidth(),w=this.calculateX(v)-L/2,d=this.calculateBarWidth(n);return w+d*h+h*l.barDatasetSpacing+d/2},calculateBaseWidth:function(){return this.calculateX(1)-this.calculateX(0)-2*l.barValueSpacing},calculateBarWidth:function(n){var h=this.calculateBaseWidth()-(n-1)*l.barDatasetSpacing;return h/n}}),this.datasets=[],this.options.showTooltips&&s.bindEvents(this,this.options.tooltipEvents,function(n){var h=n.type!=="mouseout"?this.getBarsAtEvent(n):[];this.eachBars(function(v){v.restore(["fillColor","strokeColor"])}),s.each(h,function(v){v.fillColor=v.highlightFill,v.strokeColor=v.highlightStroke}),this.showTooltip(h)}),this.BarClass=m.Rectangle.extend({strokeWidth:this.options.barStrokeWidth,showStroke:this.options.barShowStroke,ctx:this.chart.ctx}),s.each(a.datasets,function(n,h){var v={label:n.label||null,fillColor:n.fillColor,strokeColor:n.strokeColor,bars:[]};this.datasets.push(v),s.each(n.data,function(L,w){v.bars.push(new this.BarClass({value:L,label:a.labels[w],datasetLabel:n.label,strokeColor:n.strokeColor,fillColor:n.fillColor,highlightFill:n.highlightFill||n.fillColor,highlightStroke:n.highlightStroke||n.strokeColor}))},this)},this),this.buildScale(a.labels),this.BarClass.prototype.base=this.calculateBarBase(),this.eachBars(function(n,h,v){s.extend(n,{width:this.scale.calculateBarWidth(this.datasets.length),x:this.scale.calculateBarX(this.datasets.length,v,h),y:this.calculateBarBase()}),n.save()},this),this.render()},calculateBarBase:function(){var a=function(n){return n>=0?1:-1},l=this.scale.endPoint;return this.scale.beginAtZero||a(this.scale.min)!=a(this.scale.max)?l=this.scale.calculateY(0):a(this.scale.min)<0&&a(this.scale.max)<0&&(l=this.scale.startPoint),l},update:function(){this.scale.update(),s.each(this.activeElements,function(a){a.restore(["fillColor","strokeColor"])}),this.eachBars(function(a){a.save()}),this.render()},eachBars:function(a){s.each(this.datasets,function(l,n){s.each(l.bars,a,this,n)},this)},getBarsAtEvent:function(a){for(var l=[],n=s.getRelativePosition(a),h=function(w){l.push(w.bars[v])},v,L=0;L<this.datasets.length;L++)for(v=0;v<this.datasets[L].bars.length;v++)if(this.datasets[L].bars[v].inRange(n.x,n.y))return s.each(this.datasets,h),l;return l},buildScale:function(a){var l=this,n=function(){var L=[];return l.eachBars(function(w){L.push(w.value)}),L},h=function(){var L=n().reduce(function(w,d){return w=w.concat(d)},[]);return l.options.scaleBeginAtZero&&Math.min.apply(null,L)>=0},v={templateString:this.options.scaleLabel,height:this.chart.height,width:this.chart.width,ctx:this.chart.ctx,textColor:this.options.scaleFontColor,fontSize:this.options.scaleFontSize,fontStyle:this.options.scaleFontStyle,fontFamily:this.options.scaleFontFamily,valuesCount:a.length,beginAtZero:h(),integersOnly:this.options.scaleIntegersOnly,calculateYRange:function(L){var w=s.calculateScaleRange(n(),L,this.fontSize,h(),this.integersOnly);s.extend(this,w)},xLabels:a,font:s.fontString(this.options.scaleFontSize,this.options.scaleFontStyle,this.options.scaleFontFamily),lineWidth:this.options.scaleLineWidth,lineColor:this.options.scaleLineColor,showHorizontalLines:this.options.scaleShowHorizontalLines,showVerticalLines:this.options.scaleShowVerticalLines,gridLineWidth:this.options.scaleShowGridLines?this.options.scaleGridLineWidth:0,gridLineColor:this.options.scaleShowGridLines?this.options.scaleGridLineColor:"rgba(0,0,0,0)",padding:this.options.showScale?0:this.options.barShowStroke?this.options.barStrokeWidth:0,showLabels:this.options.scaleShowLabels,display:this.options.showScale};this.options.scaleOverride&&s.extend(v,{calculateYRange:s.noop,steps:this.options.scaleSteps,stepValue:this.options.scaleStepWidth,min:this.options.scaleStartValue,max:this.options.scaleStartValue+this.options.scaleSteps*this.options.scaleStepWidth}),this.scale=new this.ScaleClass(v)},addData:function(a,l){s.each(a,function(n,h){this.datasets[h].bars.push(new this.BarClass({value:n,label:l,x:this.scale.calculateBarX(this.datasets.length,h,this.scale.valuesCount+1),y:this.calculateBarBase(),width:this.scale.calculateBarWidth(this.datasets.length),base:this.calculateBarBase(),strokeColor:this.datasets[h].strokeColor,fillColor:this.datasets[h].fillColor}))},this),this.scale.addXLabel(l),this.update()},removeData:function(){this.scale.removeXLabel(),s.each(this.datasets,function(a){a.bars.shift()},this),this.update()},reflow:function(){s.extend(this.BarClass.prototype,{y:this.calculateBarBase(),base:this.calculateBarBase()});var a=s.extend({height:this.chart.height,width:this.chart.width});this.scale.update(a)},draw:function(a){var l=a||1;this.clear();var n=this.chart.ctx;this.scale.draw(l),s.each(this.datasets,function(h,v){s.each(h.bars,function(L,w){L.hasValue()&&(L.base=this.calculateBarBase(),L.transition({x:this.scale.calculateBarX(this.datasets.length,v,w),y:this.scale.calculateY(L.value),width:this.scale.calculateBarWidth(this.datasets.length)},l).draw())},this)},this)}})}.call(this),function(){"use strict";var R=this,m=R.Chart,s=m.helpers,c={segmentShowStroke:!0,segmentStrokeColor:"#fff",segmentStrokeWidth:2,percentageInnerCutout:50,animationSteps:100,animationEasing:"easeOutBounce",animateRotate:!0,animateScale:!1,legendTemplate:'<ul class="<%=name.toLowerCase()%>-legend"><% for (var i=0; i<segments.length; i++){%><li><span style="background-color:<%=segments[i].fillColor%>"></span><%if(segments[i].label){%><%=segments[i].label%><%}%></li><%}%></ul>'};m.Type.extend({name:"Doughnut",defaults:c,initialize:function(a){this.segments=[],this.outerRadius=(s.min([this.chart.width,this.chart.height])-this.options.segmentStrokeWidth/2)/2,this.SegmentArc=m.Arc.extend({ctx:this.chart.ctx,x:this.chart.width/2,y:this.chart.height/2}),this.options.showTooltips&&s.bindEvents(this,this.options.tooltipEvents,function(l){var n=l.type!=="mouseout"?this.getSegmentsAtEvent(l):[];s.each(this.segments,function(h){h.restore(["fillColor"])}),s.each(n,function(h){h.fillColor=h.highlightColor}),this.showTooltip(n)}),this.calculateTotal(a),s.each(a,function(l,n){this.addData(l,n,!0)},this),this.render()},getSegmentsAtEvent:function(a){var l=[],n=s.getRelativePosition(a);return s.each(this.segments,function(h){h.inRange(n.x,n.y)&&l.push(h)},this),l},addData:function(a,l,n){var h=l||this.segments.length;this.segments.splice(h,0,new this.SegmentArc({value:a.value,outerRadius:this.options.animateScale?0:this.outerRadius,innerRadius:this.options.animateScale?0:this.outerRadius/100*this.options.percentageInnerCutout,fillColor:a.color,highlightColor:a.highlight||a.color,showStroke:this.options.segmentShowStroke,strokeWidth:this.options.segmentStrokeWidth,strokeColor:this.options.segmentStrokeColor,startAngle:Math.PI*1.5,circumference:this.options.animateRotate?0:this.calculateCircumference(a.value),label:a.label})),n||(this.reflow(),this.update())},calculateCircumference:function(a){return Math.PI*2*(Math.abs(a)/this.total)},calculateTotal:function(a){this.total=0,s.each(a,function(l){this.total+=Math.abs(l.value)},this)},update:function(){this.calculateTotal(this.segments),s.each(this.activeElements,function(a){a.restore(["fillColor"])}),s.each(this.segments,function(a){a.save()}),this.render()},removeData:function(a){var l=s.isNumber(a)?a:this.segments.length-1;this.segments.splice(l,1),this.reflow(),this.update()},reflow:function(){s.extend(this.SegmentArc.prototype,{x:this.chart.width/2,y:this.chart.height/2}),this.outerRadius=(s.min([this.chart.width,this.chart.height])-this.options.segmentStrokeWidth/2)/2,s.each(this.segments,function(a){a.update({outerRadius:this.outerRadius,innerRadius:this.outerRadius/100*this.options.percentageInnerCutout})},this)},draw:function(a){var l=a||1;this.clear(),s.each(this.segments,function(n,h){n.transition({circumference:this.calculateCircumference(n.value),outerRadius:this.outerRadius,innerRadius:this.outerRadius/100*this.options.percentageInnerCutout},l),n.endAngle=n.startAngle+n.circumference,n.draw(),h===0&&(n.startAngle=Math.PI*1.5),h<this.segments.length-1&&(this.segments[h+1].startAngle=n.endAngle)},this)}}),m.types.Doughnut.extend({name:"Pie",defaults:s.merge(c,{percentageInnerCutout:0})})}.call(this),function(){"use strict";var R=this,m=R.Chart,s=m.helpers,c={scaleShowGridLines:!0,scaleGridLineColor:"rgba(0,0,0,.05)",scaleGridLineWidth:1,scaleShowHorizontalLines:!0,scaleShowVerticalLines:!0,bezierCurve:!0,bezierCurveTension:.4,pointDot:!0,pointDotRadius:4,pointDotStrokeWidth:1,pointHitDetectionRadius:20,datasetStroke:!0,datasetStrokeWidth:2,datasetFill:!0,legendTemplate:'<ul class="<%=name.toLowerCase()%>-legend"><% for (var i=0; i<datasets.length; i++){%><li><span style="background-color:<%=datasets[i].strokeColor%>"></span><%if(datasets[i].label){%><%=datasets[i].label%><%}%></li><%}%></ul>'};m.Type.extend({name:"Line",defaults:c,initialize:function(a){this.PointClass=m.Point.extend({strokeWidth:this.options.pointDotStrokeWidth,radius:this.options.pointDotRadius,display:this.options.pointDot,hitDetectionRadius:this.options.pointHitDetectionRadius,ctx:this.chart.ctx,inRange:function(l){return Math.pow(l-this.x,2)<Math.pow(this.radius+this.hitDetectionRadius,2)}}),this.datasets=[],this.options.showTooltips&&s.bindEvents(this,this.options.tooltipEvents,function(l){var n=l.type!=="mouseout"?this.getPointsAtEvent(l):[];this.eachPoints(function(h){h.restore(["fillColor","strokeColor"])}),s.each(n,function(h){h.fillColor=h.highlightFill,h.strokeColor=h.highlightStroke}),this.showTooltip(n)}),s.each(a.datasets,function(l){var n={label:l.label||null,fillColor:l.fillColor,strokeColor:l.strokeColor,pointColor:l.pointColor,pointStrokeColor:l.pointStrokeColor,points:[]};this.datasets.push(n),s.each(l.data,function(h,v){n.points.push(new this.PointClass({value:h,label:a.labels[v],datasetLabel:l.label,strokeColor:l.pointStrokeColor,fillColor:l.pointColor,highlightFill:l.pointHighlightFill||l.pointColor,highlightStroke:l.pointHighlightStroke||l.pointStrokeColor}))},this),this.buildScale(a.labels),this.eachPoints(function(h,v){s.extend(h,{x:this.scale.calculateX(v),y:this.scale.endPoint}),h.save()},this)},this),this.render()},update:function(){this.scale.update(),s.each(this.activeElements,function(a){a.restore(["fillColor","strokeColor"])}),this.eachPoints(function(a){a.save()}),this.render()},eachPoints:function(a){s.each(this.datasets,function(l){s.each(l.points,a,this)},this)},getPointsAtEvent:function(a){var l=[],n=s.getRelativePosition(a);return s.each(this.datasets,function(h){s.each(h.points,function(v){v.inRange(n.x,n.y)&&l.push(v)})},this),l},buildScale:function(a){var l=this,n=function(){var v=[];return l.eachPoints(function(L){v.push(L.value)}),v},h={templateString:this.options.scaleLabel,height:this.chart.height,width:this.chart.width,ctx:this.chart.ctx,textColor:this.options.scaleFontColor,fontSize:this.options.scaleFontSize,fontStyle:this.options.scaleFontStyle,fontFamily:this.options.scaleFontFamily,valuesCount:a.length,beginAtZero:this.options.scaleBeginAtZero,integersOnly:this.options.scaleIntegersOnly,calculateYRange:function(v){var L=s.calculateScaleRange(n(),v,this.fontSize,this.beginAtZero,this.integersOnly);s.extend(this,L)},xLabels:a,font:s.fontString(this.options.scaleFontSize,this.options.scaleFontStyle,this.options.scaleFontFamily),lineWidth:this.options.scaleLineWidth,lineColor:this.options.scaleLineColor,showHorizontalLines:this.options.scaleShowHorizontalLines,showVerticalLines:this.options.scaleShowVerticalLines,gridLineWidth:this.options.scaleShowGridLines?this.options.scaleGridLineWidth:0,gridLineColor:this.options.scaleShowGridLines?this.options.scaleGridLineColor:"rgba(0,0,0,0)",padding:this.options.showScale?0:this.options.pointDotRadius+this.options.pointDotStrokeWidth,showLabels:this.options.scaleShowLabels,display:this.options.showScale};this.options.scaleOverride&&s.extend(h,{calculateYRange:s.noop,steps:this.options.scaleSteps,stepValue:this.options.scaleStepWidth,min:this.options.scaleStartValue,max:this.options.scaleStartValue+this.options.scaleSteps*this.options.scaleStepWidth}),this.scale=new m.Scale(h)},addData:function(a,l){s.each(a,function(n,h){this.datasets[h].points.push(new this.PointClass({value:n,label:l,x:this.scale.calculateX(this.scale.valuesCount+1),y:this.scale.endPoint,strokeColor:this.datasets[h].pointStrokeColor,fillColor:this.datasets[h].pointColor}))},this),this.scale.addXLabel(l),this.update()},removeData:function(){this.scale.removeXLabel(),s.each(this.datasets,function(a){a.points.shift()},this),this.update()},reflow:function(){var a=s.extend({height:this.chart.height,width:this.chart.width});this.scale.update(a)},draw:function(a){var l=a||1;this.clear();var n=this.chart.ctx,h=function(w){return w.value!==null},v=function(w,d,b){return s.findNextWhere(d,h,b)||w},L=function(w,d,b){return s.findPreviousWhere(d,h,b)||w};this.scale.draw(l),s.each(this.datasets,function(w){var d=s.where(w.points,h);s.each(w.points,function(b,T){b.hasValue()&&b.transition({y:this.scale.calculateY(b.value),x:this.scale.calculateX(T)},l)},this),this.options.bezierCurve&&s.each(d,function(b,T){var N=T>0&&T<d.length-1?this.options.bezierCurveTension:0;b.controlPoints=s.splineCurve(L(b,d,T),b,v(b,d,T),N),b.controlPoints.outer.y>this.scale.endPoint?b.controlPoints.outer.y=this.scale.endPoint:b.controlPoints.outer.y<this.scale.startPoint&&(b.controlPoints.outer.y=this.scale.startPoint),b.controlPoints.inner.y>this.scale.endPoint?b.controlPoints.inner.y=this.scale.endPoint:b.controlPoints.inner.y<this.scale.startPoint&&(b.controlPoints.inner.y=this.scale.startPoint)},this),n.lineWidth=this.options.datasetStrokeWidth,n.strokeStyle=w.strokeColor,n.beginPath(),s.each(d,function(b,T){if(T===0)n.moveTo(b.x,b.y);else if(this.options.bezierCurve){var N=L(b,d,T);n.bezierCurveTo(N.controlPoints.outer.x,N.controlPoints.outer.y,b.controlPoints.inner.x,b.controlPoints.inner.y,b.x,b.y)}else n.lineTo(b.x,b.y)},this),n.stroke(),this.options.datasetFill&&d.length>0&&(n.lineTo(d[d.length-1].x,this.scale.endPoint),n.lineTo(d[0].x,this.scale.endPoint),n.fillStyle=w.fillColor,n.closePath(),n.fill()),s.each(d,function(b){b.draw()})},this)}})}.call(this),function(){"use strict";var R=this,m=R.Chart,s=m.helpers,c={scaleShowLabelBackdrop:!0,scaleBackdropColor:"rgba(255,255,255,0.75)",scaleBeginAtZero:!0,scaleBackdropPaddingY:2,scaleBackdropPaddingX:2,scaleShowLine:!0,segmentShowStroke:!0,segmentStrokeColor:"#fff",segmentStrokeWidth:2,animationSteps:100,animationEasing:"easeOutBounce",animateRotate:!0,animateScale:!1,legendTemplate:'<ul class="<%=name.toLowerCase()%>-legend"><% for (var i=0; i<segments.length; i++){%><li><span style="background-color:<%=segments[i].fillColor%>"></span><%if(segments[i].label){%><%=segments[i].label%><%}%></li><%}%></ul>'};m.Type.extend({name:"PolarArea",defaults:c,initialize:function(a){this.segments=[],this.SegmentArc=m.Arc.extend({showStroke:this.options.segmentShowStroke,strokeWidth:this.options.segmentStrokeWidth,strokeColor:this.options.segmentStrokeColor,ctx:this.chart.ctx,innerRadius:0,x:this.chart.width/2,y:this.chart.height/2}),this.scale=new m.RadialScale({display:this.options.showScale,fontStyle:this.options.scaleFontStyle,fontSize:this.options.scaleFontSize,fontFamily:this.options.scaleFontFamily,fontColor:this.options.scaleFontColor,showLabels:this.options.scaleShowLabels,showLabelBackdrop:this.options.scaleShowLabelBackdrop,backdropColor:this.options.scaleBackdropColor,backdropPaddingY:this.options.scaleBackdropPaddingY,backdropPaddingX:this.options.scaleBackdropPaddingX,lineWidth:this.options.scaleShowLine?this.options.scaleLineWidth:0,lineColor:this.options.scaleLineColor,lineArc:!0,width:this.chart.width,height:this.chart.height,xCenter:this.chart.width/2,yCenter:this.chart.height/2,ctx:this.chart.ctx,templateString:this.options.scaleLabel,valuesCount:a.length}),this.updateScaleRange(a),this.scale.update(),s.each(a,function(l,n){this.addData(l,n,!0)},this),this.options.showTooltips&&s.bindEvents(this,this.options.tooltipEvents,function(l){var n=l.type!=="mouseout"?this.getSegmentsAtEvent(l):[];s.each(this.segments,function(h){h.restore(["fillColor"])}),s.each(n,function(h){h.fillColor=h.highlightColor}),this.showTooltip(n)}),this.render()},getSegmentsAtEvent:function(a){var l=[],n=s.getRelativePosition(a);return s.each(this.segments,function(h){h.inRange(n.x,n.y)&&l.push(h)},this),l},addData:function(a,l,n){var h=l||this.segments.length;this.segments.splice(h,0,new this.SegmentArc({fillColor:a.color,highlightColor:a.highlight||a.color,label:a.label,value:a.value,outerRadius:this.options.animateScale?0:this.scale.calculateCenterOffset(a.value),circumference:this.options.animateRotate?0:this.scale.getCircumference(),startAngle:Math.PI*1.5})),n||(this.reflow(),this.update())},removeData:function(a){var l=s.isNumber(a)?a:this.segments.length-1;this.segments.splice(l,1),this.reflow(),this.update()},calculateTotal:function(a){this.total=0,s.each(a,function(l){this.total+=l.value},this),this.scale.valuesCount=this.segments.length},updateScaleRange:function(a){var l=[];s.each(a,function(h){l.push(h.value)});var n=this.options.scaleOverride?{steps:this.options.scaleSteps,stepValue:this.options.scaleStepWidth,min:this.options.scaleStartValue,max:this.options.scaleStartValue+this.options.scaleSteps*this.options.scaleStepWidth}:s.calculateScaleRange(l,s.min([this.chart.width,this.chart.height])/2,this.options.scaleFontSize,this.options.scaleBeginAtZero,this.options.scaleIntegersOnly);s.extend(this.scale,n,{size:s.min([this.chart.width,this.chart.height]),xCenter:this.chart.width/2,yCenter:this.chart.height/2})},update:function(){this.calculateTotal(this.segments),s.each(this.segments,function(a){a.save()}),this.reflow(),this.render()},reflow:function(){s.extend(this.SegmentArc.prototype,{x:this.chart.width/2,y:this.chart.height/2}),this.updateScaleRange(this.segments),this.scale.update(),s.extend(this.scale,{xCenter:this.chart.width/2,yCenter:this.chart.height/2}),s.each(this.segments,function(a){a.update({outerRadius:this.scale.calculateCenterOffset(a.value)})},this)},draw:function(a){var l=a||1;this.clear(),s.each(this.segments,function(n,h){n.transition({circumference:this.scale.getCircumference(),outerRadius:this.scale.calculateCenterOffset(n.value)},l),n.endAngle=n.startAngle+n.circumference,h===0&&(n.startAngle=Math.PI*1.5),h<this.segments.length-1&&(this.segments[h+1].startAngle=n.endAngle),n.draw()},this),this.scale.draw()}})}.call(this),function(){"use strict";var R=this,m=R.Chart,s=m.helpers;m.Type.extend({name:"Radar",defaults:{scaleShowLine:!0,angleShowLineOut:!0,scaleShowLabels:!1,scaleBeginAtZero:!0,angleLineColor:"rgba(0,0,0,.1)",angleLineWidth:1,pointLabelFontFamily:"'Arial'",pointLabelFontStyle:"normal",pointLabelFontSize:10,pointLabelFontColor:"#666",pointDot:!0,pointDotRadius:3,pointDotStrokeWidth:1,pointHitDetectionRadius:20,datasetStroke:!0,datasetStrokeWidth:2,datasetFill:!0,legendTemplate:'<ul class="<%=name.toLowerCase()%>-legend"><% for (var i=0; i<datasets.length; i++){%><li><span style="background-color:<%=datasets[i].strokeColor%>"></span><%if(datasets[i].label){%><%=datasets[i].label%><%}%></li><%}%></ul>'},initialize:function(c){this.PointClass=m.Point.extend({strokeWidth:this.options.pointDotStrokeWidth,radius:this.options.pointDotRadius,display:this.options.pointDot,hitDetectionRadius:this.options.pointHitDetectionRadius,ctx:this.chart.ctx}),this.datasets=[],this.buildScale(c),this.options.showTooltips&&s.bindEvents(this,this.options.tooltipEvents,function(a){var l=a.type!=="mouseout"?this.getPointsAtEvent(a):[];this.eachPoints(function(n){n.restore(["fillColor","strokeColor"])}),s.each(l,function(n){n.fillColor=n.highlightFill,n.strokeColor=n.highlightStroke}),this.showTooltip(l)}),s.each(c.datasets,function(a){var l={label:a.label||null,fillColor:a.fillColor,strokeColor:a.strokeColor,pointColor:a.pointColor,pointStrokeColor:a.pointStrokeColor,points:[]};this.datasets.push(l),s.each(a.data,function(n,h){var v;this.scale.animation||(v=this.scale.getPointPosition(h,this.scale.calculateCenterOffset(n))),l.points.push(new this.PointClass({value:n,label:c.labels[h],datasetLabel:a.label,x:this.options.animation?this.scale.xCenter:v.x,y:this.options.animation?this.scale.yCenter:v.y,strokeColor:a.pointStrokeColor,fillColor:a.pointColor,highlightFill:a.pointHighlightFill||a.pointColor,highlightStroke:a.pointHighlightStroke||a.pointStrokeColor}))},this)},this),this.render()},eachPoints:function(c){s.each(this.datasets,function(a){s.each(a.points,c,this)},this)},getPointsAtEvent:function(c){var a=s.getRelativePosition(c),l=s.getAngleFromPoint({x:this.scale.xCenter,y:this.scale.yCenter},a),n=Math.PI*2/this.scale.valuesCount,h=Math.round((l.angle-Math.PI*1.5)/n),v=[];return(h>=this.scale.valuesCount||h<0)&&(h=0),l.distance<=this.scale.drawingArea&&s.each(this.datasets,function(L){v.push(L.points[h])}),v},buildScale:function(c){this.scale=new m.RadialScale({display:this.options.showScale,fontStyle:this.options.scaleFontStyle,fontSize:this.options.scaleFontSize,fontFamily:this.options.scaleFontFamily,fontColor:this.options.scaleFontColor,showLabels:this.options.scaleShowLabels,showLabelBackdrop:this.options.scaleShowLabelBackdrop,backdropColor:this.options.scaleBackdropColor,backdropPaddingY:this.options.scaleBackdropPaddingY,backdropPaddingX:this.options.scaleBackdropPaddingX,lineWidth:this.options.scaleShowLine?this.options.scaleLineWidth:0,lineColor:this.options.scaleLineColor,angleLineColor:this.options.angleLineColor,angleLineWidth:this.options.angleShowLineOut?this.options.angleLineWidth:0,pointLabelFontColor:this.options.pointLabelFontColor,pointLabelFontSize:this.options.pointLabelFontSize,pointLabelFontFamily:this.options.pointLabelFontFamily,pointLabelFontStyle:this.options.pointLabelFontStyle,height:this.chart.height,width:this.chart.width,xCenter:this.chart.width/2,yCenter:this.chart.height/2,ctx:this.chart.ctx,templateString:this.options.scaleLabel,labels:c.labels,valuesCount:c.datasets[0].data.length}),this.scale.setScaleSize(),this.updateScaleRange(c.datasets),this.scale.buildYLabels()},updateScaleRange:function(c){var a=function(){var n=[];return s.each(c,function(h){h.data?n=n.concat(h.data):s.each(h.points,function(v){n.push(v.value)})}),n}(),l=this.options.scaleOverride?{steps:this.options.scaleSteps,stepValue:this.options.scaleStepWidth,min:this.options.scaleStartValue,max:this.options.scaleStartValue+this.options.scaleSteps*this.options.scaleStepWidth}:s.calculateScaleRange(a,s.min([this.chart.width,this.chart.height])/2,this.options.scaleFontSize,this.options.scaleBeginAtZero,this.options.scaleIntegersOnly);s.extend(this.scale,l)},addData:function(c,a){this.scale.valuesCount++,s.each(c,function(l,n){var h=this.scale.getPointPosition(this.scale.valuesCount,this.scale.calculateCenterOffset(l));this.datasets[n].points.push(new this.PointClass({value:l,label:a,x:h.x,y:h.y,strokeColor:this.datasets[n].pointStrokeColor,fillColor:this.datasets[n].pointColor}))},this),this.scale.labels.push(a),this.reflow(),this.update()},removeData:function(){this.scale.valuesCount--,this.scale.labels.shift(),s.each(this.datasets,function(c){c.points.shift()},this),this.reflow(),this.update()},update:function(){this.eachPoints(function(c){c.save()}),this.reflow(),this.render()},reflow:function(){s.extend(this.scale,{width:this.chart.width,height:this.chart.height,size:s.min([this.chart.width,this.chart.height]),xCenter:this.chart.width/2,yCenter:this.chart.height/2}),this.updateScaleRange(this.datasets),this.scale.setScaleSize(),this.scale.buildYLabels()},draw:function(c){var a=c||1,l=this.chart.ctx;this.clear(),this.scale.draw(),s.each(this.datasets,function(n){s.each(n.points,function(h,v){h.hasValue()&&h.transition(this.scale.getPointPosition(v,this.scale.calculateCenterOffset(h.value)),a)},this),l.lineWidth=this.options.datasetStrokeWidth,l.strokeStyle=n.strokeColor,l.beginPath(),s.each(n.points,function(h,v){v===0?l.moveTo(h.x,h.y):l.lineTo(h.x,h.y)},this),l.closePath(),l.stroke(),l.fillStyle=n.fillColor,l.fill(),s.each(n.points,function(h){h.hasValue()&&h.draw()})},this)}})}.call(this)},199920:function(D,R,m){"use strict";m.r(R);var s=m(805187),c=m.n(s),a=m(860921),l=m.n(a),n=m(325943),h=m.n(n),v=m(564169),L=m.n(v),w=m(135118);YUI.add("@sqs/layout-engine/chartjs-helpers",function(d){d.namespace("ChartJS");var b=500,T=[],N=d.ChartJS.getDefaultChartData=function(r){switch(parseInt(r,10)){case w.Z.CHART_BAR:return{data:[[150],[250],[150]],sampleLabels:[(0,n.t)("New York",null,{project:"scripts-v6.layout-engine"}),(0,n.t)("Las Vegas",null,{project:"scripts-v6.layout-engine"}),(0,n.t)("San Francisco",null,{project:"scripts-v6.layout-engine"})],seriesLabels:[(0,n.t)("Population",null,{project:"scripts-v6.layout-engine"})]};case w.Z.CHART_LINE:return{data:[[150,100],[250,200],[150,350]],sampleLabels:[(0,n.t)("New York",null,{project:"scripts-v6.layout-engine"}),(0,n.t)("Las Vegas",null,{project:"scripts-v6.layout-engine"}),(0,n.t)("San Francisco",null,{project:"scripts-v6.layout-engine"})],seriesLabels:[(0,n.t)("Population",null,{project:"scripts-v6.layout-engine"}),(0,n.t)("GDP",null,{project:"scripts-v6.layout-engine"})]};case w.Z.CHART_PIE:return{data:[[150],[200],[150]],sampleLabels:[(0,n.t)("New York",null,{project:"scripts-v6.layout-engine"}),(0,n.t)("Las Vegas",null,{project:"scripts-v6.layout-engine"}),(0,n.t)("San Francisco",null,{project:"scripts-v6.layout-engine"})],seriesLabels:[(0,n.t)("Population",null,{project:"scripts-v6.layout-engine"})]}}};function O(r){T.push(r)}function $(r){T.remove(r)}function G(){var r=T.map(function(C){return C.node.getDOMNode()===null?C:null});r.filter(function(C){return C}).forEach(function(C){C.destroy()})}function X(r,C,p){var y={default:[[121,121,121],[191,191,191],[229,229,229],[156,156,156],[0,0,0]],Cobblestone:[[41,31,22],[180,158,146],[127,112,105],[76,61,48],[69,45,35]],Italia:[[124,184,200],[2,100,171],[2,155,59],[227,2,27],[202,180,130]],Muted:[[52,43,43],[112,105,100],[156,148,131],[212,207,198],[240,226,208]],Primary:[[240,82,59],[247,180,19],[36,128,196],[144,187,98],[134,95,144]],Warm:[[153,0,0],[226,71,45],[233,148,48],[248,220,171],[251,243,171]],Cool:[[16,44,99],[7,75,230],[81,146,235],[158,173,211],[225,220,252]],"Tea Party":[[115,13,3],[182,125,44],[234,195,148],[231,144,72],[64,2,18]],Highway:[[176,201,217],[166,166,166],[89,72,57],[191,108,59],[230,134,50]],Shops:[[227,227,230],[69,78,89],[95,205,217],[113,153,138],[213,230,69]],Suburbs:[[73,33,48],[227,227,227],[69,84,115],[206,208,159],[236,101,102]],"DB-Nine":[[134,135,136],[168,182,111],[169,143,119],[227,126,94],[100,138,189]],"M-Three":[[98,140,187],[209,191,78],[90,98,105],[13,76,136],[188,199,208]],Thunderbird:[[217,60,73],[103,189,218],[231,231,192],[227,170,179],[177,202,123]]},P={dark:1,medium:.75,light:.5,xlight:.2,off:0};r in y||(r="default");var S=y[r];return"rgba("+S[C%S.length]+","+P[p]+")"}function Z(r){return{scaleFontFamily:r.getComputedStyle("font-family"),scaleFontSize:parseInt(r.getComputedStyle("font-size"),10),scaleFontStyle:r.getComputedStyle("font-style"),tooltipFontFamily:r.getComputedStyle("font-family"),tooltipFontSize:parseInt(r.getComputedStyle("font-size"),10)*.8,tooltipFontStyle:r.getComputedStyle("font-style"),tooltipTitleFontFamily:r.getComputedStyle("font-family"),tooltipTitleFontSize:parseInt(r.getComputedStyle("font-size"),10),tooltipTitleFontStyle:"bold",scaleLabel:"<%= '  ' + value%>"}}function ht(r){var C=r;return C.get("tagName")!=="CANVAS"&&(C=C.one("canvas")),C}function Q(r,C){if(C){var p=r.sampleLabels;r.sampleLabels=r.seriesLabels,r.seriesLabels=p,r.data=d.Array(r.data[0]).map(function(E,I){return d.Array(r.data).map(function(K){return K[I]})})}var y=Math.min(r.data.length,r.sampleLabels.length),P=Math.min(r.data[0].length,r.seriesLabels.length);r.sampleLabels=r.sampleLabels.slice(0,y),r.seriesLabels=r.seriesLabels.slice(0,P),r.data=r.data.slice(0,y);for(var S=0;S<r.data.length;S++)r.data[S]=r.data[S].slice(0,P);return r}function tt(r,C,p){var y=r.datasets[0][C].length,P=p.sampleLabels.length-y,S=r.datasets.length,E=p.seriesLabels.length-S;return E||P&&E}function at(r,C,p){var y=r.datasets.length,P=p.seriesLabels.length-y,S=0;if(P>0){var E=r.datasets[y-1];for(S=0;S<P;S++)r.datasets.push(d.clone(E))}else P<0&&(r.datasets=r.datasets.slice(0,p.seriesLabels.length));var I=r.datasets[0][C].length,K=p.sampleLabels.length-I;if(K>0){var st=I;for(S=0;S<K;S++){var lt=d.Array(p.seriesLabels).map(function(){return 0});r.addData(lt,p.sampleLabels[st++])}}else if(K<0)for(S=0;S>K;S--)r.removeData();var M=0;for(M=0;M<p.sampleLabels.length;M++)r.scale.xLabels[M]=p.sampleLabels[M];for(M=0;M<r.datasets.length;M++)for(r.datasets[M].label=p.seriesLabels[M],S=0;S<r.datasets[M][C].length;S++){var U=p.data[S][M];(isNaN(U)||U===null||U===void 0)&&(U=0),r.datasets[M][C][S].value=[U],r.datasets[M][C][S].label=p.sampleLabels[S]}r.update()}function it(r,C){return function(p){var y="";y+='<ul class="'+d.Escape.html(p.name.toLowerCase())+'-legend">';for(var P=0;P<p[r].length;P++)y+='<li><span style="background-color:'+p[r][P][C]+'"></span>',p[r][P].label&&(y+=d.Escape.html(p[r][P].label)),y+="</li>";return y+="</ul>",y}}var J=function(r,C,p,y,P){this.node=r,this._options=P||{},this._canvas=ht(r),this._narrow=!1,this._palette=p,this._flip=y,this._data=Q(d.clone(C,!0),this._flip),this._makeChart(),this.generateLegend(),this.resize(),O(this)};J.prototype={destroy:function(){this._chart.destroy(),$(this)},resize:function(){var r=this._canvas.getDOMNode();r?r.parentNode.clientWidth>0&&(this._chart.stop(),this._chart.resize(this._chart.render,!0),r.parentNode.clientWidth<b?(this._chart.name==="Bar"&&!this._narrow&&(this._options=d.merge(this._options,{barValueSpacing:5,barDatasetSpacing:1}),this._rebuildChart()),this.node.addClass("narrow-chart"),this._narrow=!0):(this._chart.name==="Bar"&&this._narrow&&(this._options=d.merge(this._options,{barValueSpacing:20,barDatasetSpacing:5}),this._rebuildChart()),this.node.removeClass("narrow-chart"),this._narrow=!1)):G()},generateLegend:function(){this.node.all(".legend-content").each(function(r){r.empty(),r.append(this._chart.generateLegend())},this)},_rebuildChart:function(){this._chart.destroy(),this._makeChart()}};var nt=d.namespace("ChartJS").BarChart=d.extend(function(){J.apply(this,arguments)},J,{_makeChart:function(){for(var r=d.merge(Z(this.node),{barShowStroke:!0,datasetStrokeWidth:3,animationSteps:25,barValueSpacing:20,barDatasetSpacing:5,legendTemplate:it("datasets","fillColor")},this._options),C={labels:this._data.sampleLabels,datasets:[]},p=0;p<this._data.seriesLabels.length;p++){for(var y=[],P=0;P<this._data.sampleLabels.length;P++)y.push(this._data.data[P][p]);C.datasets.push({label:this._data.seriesLabels[p],data:y,fillColor:X(this._palette,p,"dark"),strokeColor:"rgba(0,0,0,0)",highlightFill:X(this._palette,p,"medium"),highlightStroke:"rgba(0,0,0,0)"})}this._canvas.empty();var S=this._canvas.getDOMNode().getContext("2d");this._chart=new(L())(S).Bar(C,r)},sync:function(r){c()(r)?this._data=N(w.Z.CHART_BAR):this._data=Q(d.clone(r,!0),this._flip),tt(this._chart,"bars",this._data)?this._rebuildChart():at(this._chart,"bars",this._data),this.generateLegend(),this.resize()}}),rt=d.ChartJS.LineChart=d.extend(function(){J.apply(this,arguments)},J,{_makeChart:function(){for(var r=d.merge(Z(this.node),{datasetFill:!1,animationSteps:25,legendTemplate:it("datasets","strokeColor")},this._options),C={labels:this._data.sampleLabels,datasets:[]},p=0;p<this._data.seriesLabels.length;p++){for(var y=[],P=0;P<this._data.sampleLabels.length;P++)y.push(this._data.data[P][p]);C.datasets.push({label:this._data.seriesLabels[p],data:y,fillColor:"rgba(0,0,0,0)",strokeColor:X(this._palette,p,"dark"),pointColor:X(this._palette,p,"dark"),pointStrokeColor:"#fff",pointHighlightFill:"#fff",pointHighlightStroke:X(this._palette,p,"medium")})}var S=this._canvas.getDOMNode().getContext("2d");this._chart=new(L())(S).Line(C,r)},sync:function(r){c()(r)?this._data=N(w.Z.CHART_LINE):this._data=Q(d.clone(r,!0),this._flip),tt(this._chart,"points",this._data)?this._rebuildChart():at(this._chart,"points",this._data),this.generateLegend(),this.resize()}});function Y(r){var C=d.Array(r.data).reduce(function(p,y){return p+(y.length>0?y[0]:0)},0);return C===0&&(r.data=d.Array(r.data).map(function(p){return d.Array(p).map(function(y,P){return P===0?1:y})})),r}var ct=d.ChartJS.PieChart=d.extend(function(){J.apply(this,arguments)},J,{_makeChart:function(){for(var r=d.merge(Z(this.node),{datasetFill:!1,percentageInnerCutout:60,animationSteps:25,legendTemplate:it("segments","fillColor")},this._options),C=[],p=0;p<this._data.sampleLabels.length;p++)C.push({label:this._data.sampleLabels[p],value:this._data.data[p][0],color:X(this._palette,p,"dark"),highlight:X(this._palette,p,"medium")});var y=this._canvas.getDOMNode().getContext("2d");this._chart=new(L())(y).Pie(C,r)},sync:function(r){var C=0;c()(r)?this._data=N(w.Z.CHART_PIE):this._data=Y(Q(d.clone(r,!0),this._flip));var p=this._chart,y=this._data,P=p.segments.length,S=y.sampleLabels.length-P;if(S>0){var E=P;for(C=0;C<S;C++)p.addData({value:0,label:y.sampleLabels[E],color:X(this._palette,E,"dark"),highlight:X(this._palette,E,"medium")}),E++}else if(S<0)for(C=0;C>S;C--)p.removeData();for(var I=0;I<p.segments.length;I++)p.segments[I].value=y.data[I][0],p.segments[I].label=y.sampleLabels[I];p.update(),this.generateLegend(),this.resize()}});d.ChartJS.createChart=function(r,C,p,y,P){function S(st){switch(st){case w.Z.CHART_BAR:return nt;case w.Z.CHART_LINE:return rt;case w.Z.CHART_PIE:return ct}}var E=parseInt(r,10);(!p||!p.data||p.data.length===0)&&(p=N(E));var I=S(E),K=new I(C,p,y,P);return K};var q=d.ChartJS.initializeCharts=function(){function r(C){G();var p=T.map(function(E){return E.node}),y=p.indexOf(C)>=0;if(!y){var P=C.getAttribute("data-settings")||"{}";try{var S=JSON.parse(P.replace(/\&quot;/g,'"'));d.ChartJS.createChart(S.chartType,C,S.dataTable,S.palette,S.flip)}catch(E){if(E instanceof SyntaxError)console.error("[layout-engine/chartjs-helpers] Failed to render chart. Parse error.");else throw E}}}d.all(".sqs-block.chart-block .chart-block-container").each(r)},et;function ot(){function r(){clearTimeout(et),et=setTimeout(function(){T.forEach(function(C){C.resize()})},50)}d.one(d.config.win).after("resize",r)}d.config.win.Squarespace=d.config.win.Squarespace||{onInitialize:l(),onDestroy:l()},d.config.win.Squarespace.onInitialize(d,function(){q(),ot()}),d.config.win.Squarespace.onDestroy(d,function(){clearTimeout(et),T.forEach(function(r){r.destroy()})})},"1.0",{requires:[]})},753510:function(D,R,m){"use strict";m.r(R);var s=m(385076),c=m.n(s);YUI.add("squarespace-chartjs-helpers",function(a){},"1.0",{requires:["@sqs/layout-engine/chartjs-helpers"]})},34779:function(D,R,m){"use strict";var s=m(753510),c=m(199920)},805187:function(D,R,m){var s=m(560825),c=m(518921),a=m(217186),l=m(195593),n=m(820799),h=m(651023),v=m(605928),L=m(79656),w="[object Map]",d="[object Set]",b=Object.prototype,T=b.hasOwnProperty;function N(O){if(O==null)return!0;if(n(O)&&(l(O)||typeof O=="string"||typeof O.splice=="function"||h(O)||L(O)||a(O)))return!O.length;var $=c(O);if($==w||$==d)return!O.size;if(v(O))return!s(O).length;for(var G in O)if(T.call(O,G))return!1;return!0}D.exports=N},860921:function(D){function R(){}D.exports=R},135118:function(D,R){"use strict";var m={GALLERY_SLIDESHOW:1e3,GALLERY_CAROUSEL:1002,GALLERY_GRID:1003,GALLERY_STACK:1004,SUMMARY_WALL:1005,SUMMARY_CAROUSEL:1006,SUMMARY_LIST:1007,SUMMARY_GRID:1008,CHART_BAR:1009,CHART_LINE:1010,CHART_PIE:1011,IMAGE_INLINE:1012,IMAGE_POSTER:1013,IMAGE_CARD:1014,IMAGE_OVERLAP:1015,IMAGE_COLLAGE:1016,IMAGE_STACK:1017,TOCK_RESERVATIONS:1018,TOCK_EVENTS:1019};R.Z=m}},function(D){var R=function(s){return D(D.s=s)};D.O(0,["96135","98338"],function(){return R("34779")});var m=D.O()}]);

//# sourceMappingURL=https://sourcemaps.squarespace.net/universal/scripts-compressed/sourcemaps/97be4217515b2ad8/chartjs-helpers-ea68dbda5f388989-min.en-US.js.map
}