!function(t){“use strict”;function e(t){return“[object Array]”===Object.prototype.toString.call(t)}function n(t){return t instanceof Function}function a(t){return!n(t)&&t instanceof Object}function r(t,n){var i;for(i in n)a(n)||e(n)?(a(n)&&!a(t)&&(t={}),e(n)&&!e(t)&&(t=[]),r(t,n)):void 0!==n&&(t=n)}function i(t,e){var n={};return r(n,t),r(n,e),n}function o(t){var e,n,a,r,i,o,s,l,c,u,d;return u=Object.prototype.toString.call(t),“[object Date]”===u?t:“[object String]”===u?(a=t.match(q),a?(d=parseInt(a,10),o=parseInt(a,10)-1,e=parseInt(a,10),n=parseInt(a,10),i=a?parseInt(a,10):0,c=a?parseInt(a,10):0,r=a?1e3*parseFloat($+a.slice(1)):0,l=Date.UTC(d,o,e,n,i,c,r),a&&a&&(s=60*a,a&&(s+=parseInt(a,10)),s*=“-”===a?-1:1,l-=60*s*1e3),new Date(l)):void 0):void 0}function s(t){var e,n,a;for(e=0;e.data,n=0;n[1]<0)return!0;return!1}function l(t,e,n,a,r,o,l,c){return function(u,d,h){var f=u.data,p=i({},t);return p=i(p,h||{}),(u.hideLegend||“legend”in d)&&e(p,d.legend,u.hideLegend),d.title&&n(p,d.title),“min”in d?a(p,d.min):s(f)||a(p,0),d.max&&r(p,d.max),“stacked”in d&&o(p,d.stacked),d.colors&&(p.colors=d.colors),d.xtitle&&l(p,d.xtitle),d.ytitle&&c(p,d.ytitle),p=i(p,d.library||{})}}function c(t,e){document.body.innerText?t.innerText=e:t.textContent=e}function u(t,e){c(t,“Error Loading Chart: ”+e),t.style.color=“#ff0000”}function d(t,e,n){it.push(),h()}function h(){if(ot<st){var t=it.shift();t&&(ot++,p(t,t,t),h())}}function f(){ot–,h()}function p(t,e,n){z(e,n,function(e,n,a){var r=“string”==typeof a?a:a.message;u(t,r)})}function z(e,n,a){var r=t.jQuery||t.Zepto||t.$;if®r.ajax({dataType:“json”,url:e,success:n,error:a,complete:f});else{var i=new XMLHttpRequest;i.open(“GET”,e,!0),i.setRequestHeader(“Content-Type”,“application/json”),i.onload=function(){f(),200===i.status?n(JSON.parse(i.responseText),i.statusText,i):a(i,“error”,i.statusText)},i.send()}}function m(t,e){try{e(t)}catch(e){throw u(t.element,e.message),e}}function g(t,e,n){“string”==typeof n?d(t.element,n,function(n,a,r){t.rawData=n,m(t,e)}):(t.rawData=n,m(t,e))}function M(t){var e=t.element,n=document.createElement(“a”);n.download=t.options.download===!0?“chart.png”:t.options.download,n.style.position=“absolute”,n.style.top=“20px”,n.style.right=“20px”,n.style.zIndex=1e3,n.style.lineHeight=“20px”,n.target=“_blank”;var a=document.createElement(“img”);a.alt=“Download”,a.style.border=“none”,a.src=“data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAMAAAC6V+0/AAABCFBMVEUAAADMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMywEsqxAAAAV3RSTlMAAQIDBggJCgsMDQ4PERQaHB0eISIjJCouLzE0OTo/QUJHSUpLTU5PUllhYmltcHh5foWLjI+SlaCio6atr7S1t7m6vsHHyM7R2tze5Obo7fHz9ff5+/1hlxK2AAAA30lEQVQYGUXBhVYCQQBA0TdYWAt2d3d3YWAHyur7/z9xgD16Lw0DW+XKx+1GgX+FRzM3HWQWrHl5N/oapW5RPe0PkBu+UYeICvozTWZVK23Ao04B79oJrOsJDOoxkZoQPWgX29pHpCZEk7rEvQYiNSFq1UMqvlCjJkRBS1R8hb00Vb/TajtBL7nTHE1X1vyMQF732dQhyF2o6SAwrzP06iUQzvwsArlnzcOdrgBhJyHa1QOgO9U1GsKuvjUTjavliZYQ8nNPapG6sap/3nrIdJ6bOWzmX/fy0XVpfzZP3S8OJT3g9EEiJwAAAABJRU5ErkJggg==”,n.appendChild(a),e.style.position=“relative”,t.downloadAttached=!0,v(e,“mouseover”,function(a){var r=a.relatedTarget;(!r||r!==this&&!x(this,r)&&t.options.download)&&(n.href=t.toImage(),e.appendChild(n))}),v(e,“mouseout”,function(t){var e=t.relatedTarget;e&&(e===this||x(this,e))||n.parentNode&&n.parentNode.removeChild(n)})}function v(e,n,a){e.addEventListener?e.addEventListener(n,a,!1):e.attachEvent(“on”+n,function(){return a.call(e,t.event)})}function x(t,e){if(t===e)return!1;for(;e&&e!==t;)e=e.parentNode;return e===t}function A(t){return“”+t}function C(t){return parseFloat(t)}function b(t){var e,n,a,r;if(“object”!=typeof t)if(“number”==typeof t)t=new Date(1e3*t);else{if(e=t.match(rt))return n=parseInt(e,10),a=parseInt(e,10)-1,r=parseInt(e,10),new Date(n,a,r);var i=t.replace(/ /,“T”).replace(“ ”,“”).replace(“UTC”,“Z”);t=o(i)||new Date(t)}return t}function y(t){if(!e(t)){var n,a=[];for(n in t)t.hasOwnProperty(n)&&a.push([n,t]);t=a}return t}function w(t,e){return t.getTime()-e.getTime()}function S(t,e){return t-e}function T(t,e){return t-e}function k(){!tt&&“Highcharts”in t&&(tt=new function(){var e=t.Highcharts;this.name=“highcharts”;var n={chart:{},xAxis:{title:{text:null},labels:{style:{fontSize:“12px”}}},yAxis:{title:{text:null},labels:{style:{fontSize:“12px”}}},title:{text:null},credits:{enabled:!1},legend:{borderWidth:0},tooltip:{style:{fontSize:“12px”}},plotOptions:{areaspline:{},series:{marker:{}}}},a=function(t,e,n){void 0!==e?(t.legend.enabled=!!e,e&&e!==!0&&(“top”===e||“bottom”===e?t.legend.verticalAlign=e:(t.legend.layout=“vertical”,t.legend.verticalAlign=“middle”,t.legend.align=e))):n&&(t.legend.enabled=!1)},r=function(t,e){t.title.text=e},o=function(t,e){t.yAxis.min=e},s=function(t,e){t.yAxis.max=e},c=function(t,e){t.plotOptions.series.stacking=e?“normal”:null},u=function(t,e){t.xAxis.title.text=e},d=function(t,e){t.yAxis.title.text=e},h=l(n,a,r,o,s,c,u,d);this.renderLineChart=function(t,n){n=n||“spline”;var a={};“areaspline”===n&&(a={plotOptions:{areaspline:{stacking:“normal”},area:{stacking:“normal”},series:{marker:{enabled:!1}}}}),t.options.curve===!1&&(“areaspline”===n?n=“area”:“spline”===n&&(n=“line”));var r,i,o,s=h(t,t.options,a);s.xAxis.type=t.discrete?“category”:“datetime”,s.chart.type||(s.chart.type=n),s.chart.renderTo=t.element.id;var l=t.data;for(i=0;i<l.length;i++){if(r=l.data,!t.discrete)for(o=0;o[0]=r[0].getTime();l.marker={symbol:“circle”},t.options.points===!1&&(l.marker.enabled=!1)}s.series=l,t.chart=new e.Chart(s)},this.renderScatterChart=function(t){var n={},a=h(t,t.options,n);a.chart.type=“scatter”,a.chart.renderTo=t.element.id,a.series=t.data,t.chart=new e.Chart(a)},this.renderPieChart=function(t){var o=i(n,{});t.options.colors&&(o.colors=t.options.colors),t.options.donut&&(o.plotOptions={pie:{innerSize:“50%”}}),“legend”in t.options&&a(o,t.options.legend),t.options.title&&r(o,t.options.title);var s=i(o,t.options.library||{});s.chart.renderTo=t.element.id,s.series=,t.chart=new e.Chart(s)},this.renderColumnChart=function(t,n){n=n||“column”;var a,r,i,o,s=t.data,l=h(t,t.options),c=[],u=;for(l.chart.type=n,l.chart.renderTo=t.element.id,a=0;a,r=0;r,c[o]||(c[o]=new Array(s.length),u.push(o)),c[o][a]=o;“number”===t.options.xtype&&u.sort(T),l.xAxis.categories=u;var d=[];for(a=0;a,r=0;r][a]||0);d.push({name:s.name,data:o})}l.series=d,t.chart=new e.Chart(l)};var f=this;this.renderBarChart=function(t){f.renderColumnChart(t,“bar”)},this.renderAreaChart=function(t){f.renderLineChart(t,“areaspline”)}},at.push(tt)),!_&&t.google&&(t.google.setOnLoadCallback||t.google.charts)&&(_=new function(){var e=t.google;this.name=“google”;var n={},a=[],r=function(){for(var t,n,r=0;r,n=e.visualization&&(“corechart”===t.pack&&e.visualization.LineChart||“timeline”===t.pack&&e.visualization.Timeline),n&&(t.callback(),a.splice(r,1),r–)},o=function(i,o){if(o||(o=i,i=“corechart”),a.push({pack:i,callback:o}),n)r();else{n=!0;var s={packages:,callback:r};nt.language&&(s.language=nt.language),“corechart”===i&&nt.mapsApiKey&&(s.mapsApiKey=nt.mapsApiKey),t.google.setOnLoadCallback?e.load(“visualization”,“1”,s):e.charts.load(“current”,s)}},s={chartArea:{},fontName:“'Lucida Grande', 'Lucida Sans Unicode', Verdana, Arial, Helvetica, sans-serif”,pointSize:6,legend:{textStyle:{fontSize:12,color:“#444”},alignment:“center”,position:“right”},curveType:“function”,hAxis:{textStyle:{color:“#666”,fontSize:12},titleTextStyle:{},gridlines:{color:“transparent”},baselineColor:“#ccc”,viewWindow:{}},vAxis:{textStyle:{color:“#666”,fontSize:12},titleTextStyle:{},baselineColor:“#ccc”,viewWindow:{}},tooltip:{textStyle:{color:“#666”,fontSize:12}}},c=function(t,e,n){if(void 0!==e){var a;a=e?e===!0?“right”:e:“none”,t.legend.position=a}else n&&(t.legend.position=“none”)},u=function(t,e){t.title=e,t.titleTextStyle={color:“#333”,fontSize:“20px”}},d=function(t,e){t.vAxis.viewWindow.min=e},h=function(t,e){t.vAxis.viewWindow.max=e},f=function(t,e){t.hAxis.viewWindow.min=e},p=function(t,e){t.hAxis.viewWindow.max=e},z=function(t,e){t.isStacked=!!e},m=function(t,e){t.hAxis.title=e,t.hAxis.titleTextStyle.italic=!1},g=function(t,e){t.vAxis.title=e,t.vAxis.titleTextStyle.italic=!1},M=l(s,c,u,d,h,z,m,g),v=function(t,n,a){var r,i,o,s,l,c=[],u=;for(r=0;r,i=0;i,l=“datetime”===n?s.getTime():s,c||(c=new Array(t.length),u.push(l)),c[r]=C(s);for(var d,h=[],f=!0,i=0;i<u.length;i++){var r=u;“datetime”===n?(d=new Date(C®),f=f&&O(d)):d=“number”===n?C®:r,h.push(.concat(c))}if(“datetime”===n?h.sort(w):“number”===n&&h.sort(S),“number”===a){h.sort(S);for(var r=0;r[0]=A(h[0])}var p=new e.visualization.DataTable;for(n=“datetime”===n&&f?“date”:n,p.addColumn(n,“”),r=0;r.name);return p.addRows(h),p},x=function(e){t.attachEvent?t.attachEvent(“onresize”,e):t.addEventListener&&t.addEventListener(“resize”,e,!0),e()};this.renderLineChart=function(t){o(function(){var n={};t.options.curve===!1&&(n.curveType=“none”),t.options.points===!1&&(n.pointSize=0);var a=M(t,t.options,n),r=t.discrete?“string”:“datetime”;“number”===t.options.xtype&&(r=“number”);var i=v(t.data,r);t.chart=new e.visualization.LineChart(t.element),x(function(){t.chart.draw(i,a)})})},this.renderPieChart=function(t){o(function(){var n={chartArea:{top:“10%”,height:“80%”},legend:{}};t.options.colors&&(n.colors=t.options.colors),t.options.donut&&(n.pieHole=.5),“legend”in t.options&&c(n,t.options.legend),t.options.title&&u(n,t.options.title);var a=i(i(s,n),t.options.library||{}),r=new e.visualization.DataTable;r.addColumn(“string”,“”),r.addColumn(“number”,“Value”),r.addRows(t.data),t.chart=new e.visualization.PieChart(t.element),x(function(){t.chart.draw(r,a)})})},this.renderColumnChart=function(t){o(function(){var n=M(t,t.options),a=v(t.data,“string”,t.options.xtype);t.chart=new e.visualization.ColumnChart(t.element),x(function(){t.chart.draw(a,n)})})},this.renderBarChart=function(t){o(function(){var n={hAxis:{gridlines:{color:“#ccc”}}},a=l(s,c,u,f,p,z,m,g)(t,t.options,n),r=v(t.data,“string”,t.options.xtype);t.chart=new e.visualization.BarChart(t.element),x(function(){t.chart.draw(r,a)})})},this.renderAreaChart=function(t){o(function(){var n={isStacked:!0,pointSize:0,areaOpacity:.5},a=M(t,t.options,n),r=t.discrete?“string”:“datetime”;“number”===t.options.xtype&&(r=“number”);var i=v(t.data,r);t.chart=new e.visualization.AreaChart(t.element),x(function(){t.chart.draw(i,a)})})},this.renderGeoChart=function(t){o(function(){var n={legend:“none”,colorAxis:{colors:t.options.colors||}},a=i(i(s,n),t.options.library||{}),r=new e.visualization.DataTable;r.addColumn(“string”,“”),r.addColumn(“number”,t.options.label||“Value”),r.addRows(t.data),t.chart=new e.visualization.GeoChart(t.element),x(function(){t.chart.draw(r,a)})})},this.renderScatterChart=function(t){o(function(){var n,a,r,i,o={},s=M(t,t.options,o),l=t.data,c=[];for(n=0;n.data,a=0;a<i.length;a++){var u=new Array(l.length+1);u=i[0],u=i[1],c.push(u)}var r=new e.visualization.DataTable;for(r.addColumn(“number”,“”),n=0;n.name);r.addRows©,t.chart=new e.visualization.ScatterChart(t.element),x(function(){t.chart.draw(r,s)})})},this.renderTimeline=function(t){o(“timeline”,function(){var n={legend:“none”};t.options.colors&&(n.colors=t.options.colors);var a=i(i(s,n),t.options.library||{}),r=new e.visualization.DataTable;r.addColumn({type:“string”,id:“Name”}),r.addColumn({type:“date”,id:“Start”}),r.addColumn({type:“date”,id:“End”}),r.addRows(t.data),t.element.style.lineHeight=“normal”,t.chart=new e.visualization.Timeline(t.element),x(function(){t.chart.draw(r,a)})})}},at.push(_)),!et&&“Chart”in t&&(et=new function(){var e=t.Chart;this.name=“chartjs”;var n={maintainAspectRatio:!1,animation:!1,tooltips:{displayColors:!1},legend:{},title:{fontSize:20,fontColor:“#333”}},a={scales:{yAxes:,xAxes:}},r=,o=function(t,e,n){void 0!==e?(t.legend.display=!!e,e&&e!==!0&&(t.legend.position=e)):n&&(t.legend.display=!1)},s=function(t,e){t.title.display=!0,t.title.text=e},c=function(t,e){null!==e&&(t.scales.yAxes.ticks.min=C(e))},u=function(t,e){t.scales.yAxes.ticks.max=C(e)},d=function(t,e){null!==e&&(t.scales.xAxes.ticks.min=C(e))},h=function(t,e){t.scales.xAxes.ticks.max=C(e)},f=function(t,e){t.scales.xAxes.stacked=!!e,t.scales.yAxes.stacked=!!e},p=function(t,e){t.scales.xAxes.scaleLabel.display=!0,t.scales.xAxes.scaleLabel.labelString=e},z=function(t,e){t.scales.yAxes.scaleLabel.display=!0,t.scales.yAxes.scaleLabel.labelString=e},m=function(t,n,a,r){t.chart?t.chart.destroy():t.element.innerHTML=“<canvas></canvas>”;var i=t.element.getElementsByTagName(“CANVAS”);t.chart=new e(i,{type:n,data:a,options:r})},g=function(t,e){var n=/^#?({2})([a-fd]{2})([a-fd]{2})$/i.exec(t);return n?“rgba(”+parseInt(n,16)+“, ”+parseInt(n,16)+“, ”+parseInt(n,16)+“, ”e“)”:t},M=function(t,e,n){var a=Math.ceil(t.element.offsetWidth/4/e.labels.length);a>25&&(a=25),n.scales.xAxes.ticks.callback=function(t){return t=A(t),t.length>a?t.substring(0,a-2)+“…”:t}},v=l(i(n,a),o,s,c,u,f,p,z),x=function(t,e,n){var a,o,s,l,c,u,d=[],h=,f=t.options.colors||r,p=!0,z=!0,m=!0,M=!0,v=!0,x=!0,A=(“line”===n||“area”===n)&&!t.discrete,b=t.data,y=[],w=;for(o=0;o,s=0;s,u=A?c.getTime():c,w||(w=new Array(b.length)),w[o]=C(c),y.indexOf(u)===-1&&y.push(u);(A||“number”===t.options.xtype)&&y.sort(T);var S=[];for(s=0;s);var k,D;for(D=0;D,A?(k=new Date(C(o)),p=p&&O(k),a||(a=k.getDay()),z=z&&I(k,a),m=m&&j(k),M=M&&H(k),v=v&&B(k),x=x&&E(k)):k=o,h.push(k),s=0;s.push(void 0===w[s]?null:w[s]);for(o=0;o<b.length;o++){l=b;var L=l.color||f,R=“line”!==n?g(L,.5):L,W={label:l.name,data:S,fill:“area”===n,borderColor:L,backgroundColor:R,pointBackgroundColor:L,borderWidth:2};t.options.curve===!1&&(W.lineTension=0),t.options.points===!1&&(W.pointRadius=0,W.pointHitRadius=5),d.push(i(W,l.library||{}))}if(A&&h.length>0){var P=h.getTime(),Q=h.getTime();for(o=1;o.getTime(),k<P&&(P=k),k>Q&&(Q=k);var U=(Q-P)/864e5;if(!e.scales.xAxes.time.unit){var F;if(M||U>3650?(e.scales.xAxes.time.unit=“year”,F=365):m||U>300?(e.scales.xAxes.time.unit=“month”,F=30):p||U>10?(e.scales.xAxes.time.unit=“day”,F=1):v||U>.5?(e.scales.xAxes.time.displayFormats={hour:“MMM D, h a”},e.scales.xAxes.time.unit=“hour”,F=1/24):x&&(e.scales.xAxes.time.displayFormats={minute:“h:mm a”},e.scales.xAxes.time.unit=“minute”,F=1/24/60),F&&U>0){var N=Math.ceil(U/F/(t.element.offsetWidth/100));z&&1===F&&(N=7*Math.ceil(N/7)),e.scales.xAxes.time.unitStepSize=N}}e.scales.xAxes.time.tooltipFormat||(p?e.scales.xAxes.time.tooltipFormat=“ll”:v?e.scales.xAxes.time.tooltipFormat=“MMM D, h a”:x&&(e.scales.xAxes.time.tooltipFormat=“h:mm a”))}var V={labels:h,datasets:d};return V};this.renderLineChart=function(t,e){if(“number”===t.options.xtype)return b.renderScatterChart(t,e,!0);var n={};!t.options.max&&W(t.data)&&(n.max=1);var a=v(t,i(n,t.options)),r=x(t,a,e||“line”);a.scales.xAxes.type=t.discrete?“category”:“time”,m(t,“line”,r,a)},this.renderPieChart=function(t){var e=i({},n);t.options.donut&&(e.cutoutPercentage=50),“legend”in t.options&&o(e,t.options.legend),t.options.title&&s(e,t.options.title),e=i(e,t.options.library||{});for(var a=[],l=,c=0;c<t.data.length;c++){var u=t.data;a.push(u),l.push(u)}var d={labels:a,datasets:};m(t,“pie”,d,e)},this.renderColumnChart=function(t,e){var r;r=“bar”===e?l(i(n,a),o,s,d,h,f,p,z)(t,t.options):v(t,t.options);var c=x(t,r,“column”);M(t,c,r),m(t,“bar”===e?“horizontalBar”:“bar”,c,r)};var b=this;this.renderAreaChart=function(t){b.renderLineChart(t,“area”)},this.renderBarChart=function(t){b.renderColumnChart(t,“bar”)},this.renderScatterChart=function(t,e,n){e=e||“line”;for(var a=v(t,t.options),i=t.options.colors||r,o=[],s=t.data,l=0;l<s.length;l++){for(var c=s,u=[],d=0;d<c.data.length;d++){var h={x:C(c.data[0]),y:C(c.data[1])};“bubble”===e&&(h.r=C(c.data[2])),u.push(h)}var f=c.color||i,p=“area”===e?g(f,.5):f;o.push({label:c.name,showLine:n||!1,data:u,borderColor:f,backgroundColor:p,pointBackgroundColor:f,fill:“area”===e})}“area”===e&&(e=“line”);var z={datasets:o};a.scales.xAxes.type=“linear”,a.scales.xAxes.position=“bottom”,m(t,e,z,a)},this.renderBubbleChart=function(t){this.renderScatterChart(t,“bubble”)}},at.unshift(et))}function D(t,e){L(t,e),e.options.download&&!e.downloadAttached&&“chartjs”===e.adapter&&M(e)}function L(t,e){var a,r,i,o;for(i=“render”+t,o=e.options.adapter,k(),a=0;a,(!o||o===r.name)&&n(r))return e.adapter=r.name,r(e);throw new Error(“No adapter found”)}function E(t){return 0===t.getMilliseconds()&&0===t.getSeconds()}function B(t){return E(t)&&0===t.getMinutes()}function O(t){return B(t)&&0===t.getHours()}function I(t,e){return O(t)&&t.getDay()===e}function j(t){return O(t)&&1===t.getDate()}function H(t){return j(t)&&0===t.getMonth()}function R(t){return!isNaN(b(t))&&A(t).length>=6}function W(t){var e,n,a;for(e=0;e.data,n=0;n[1])return!1;return!0}function P(t){var e,n,a;for(e=0;e.data),n=0;n[0]))return!0;return!1}function Q(t,n){var a,r=t.options,i=t.rawData;for(!e(i)||“object”!=typeof i||e(i)?(i=,t.hideLegend=!0):t.hideLegend=!1,null!==r.discrete&&void 0!==r.discrete||“bubble”===n||“number”===n?t.discrete=r.discrete:t.discrete=P(i),t.discrete&&(n=“string”),t.options.xtype&&(n=t.options.xtype),a=0;a.data=ct(y(i.data),n);return i}function U(t){var e,n=y(t.rawData);for(e=0;e=[A(n[0]),C(n[1])];return n}function F(t){var e,n=t.rawData;for(e=0;e[1]=b(n[1]),n[2]=b(n[2]);return n}function N(t){return Q(t,“datetime”)}function V(t){return Q(t,“string”)}function J(t){return Q(t,“string”)}function G(t){return Q(t,“datetime”)}function K(t){return Q(t,“number”)}function X(t){return Q(t,“bubble”)}function Y(t,e,n,a,r,o){var s;if(“string”==typeof n&&(s=n,n=document.getElementById(n),!n))throw new Error(“No element with id ”+s);e.element=n,r=i(Z.options,r||{}),e.options=r,e.dataSource=a,o||(o=function(t){return t.rawData}),e.getElement=function(){return n},e.getDataSource=function(){return e.dataSource},e.getData=function(){return e.data},e.getOptions=function(){return e.options},e.getChartObject=function(){return e.chart},e.getAdapter=function(){return e.adapter};var l=function(){e.data=o(e),D(t,e)};e.updateData=function(t,n){e.dataSource=t,n&&(e.options=i(Z.options,n)),g(e,l,t)},e.setOptions=function(t){e.options=i(Z.options,t),e.redraw()},e.redraw=function(){g(e,l,e.rawData)},e.refreshData=function(){if(“string”==typeof a){var t=a.indexOf(“?”)===-1?“?”:“&”,n=a+t+“_=”+(new Date).getTime();g(e,l,n)}},e.stopRefresh=function(){e.intervalId&&clearInterval(e.intervalId)},e.toImage=function(){return“chartjs”===e.adapter?e.chart.toBase64Image():null},Z.charts=e,g(e,l,a),r.refresh&&(e.intervalId=setInterval(function(){e.refreshData()},1e3*r.refresh))}var Z,q,$,_,tt,et,nt=t.Chartkick||{},at=[],rt=/^(dddd)(-)?(dd)(-)?(dd)$/i,it=,ot=0,st=4;q=/(dddd)(-)?(dd)(-)?(dd)(T)?(dd)(:)?(dd)?(:)?(dd)?(d+)?($|Z|()(dd)(:)?(dd)?)/i,$=String(1.5).charAt(1);var lt=function(t,e){return t=“number”===e?C(t):“datetime”===e?b(t):A(t)},ct=function(t,e){var n,a,r=[];for(a=0;a[0]),C(t[1]),C(t[2])]):(n=lt(t[0],e),r.push([n,C(t[1])]));return“datetime”===e?r.sort(w):“number”===e&&r.sort(S),r};Z={LineChart:function(t,e,n){Y(“LineChart”,this,t,e,n,N)},PieChart:function(t,e,n){Y(“PieChart”,this,t,e,n,U)},ColumnChart:function(t,e,n){Y(“ColumnChart”,this,t,e,n,V)},BarChart:function(t,e,n){Y(“BarChart”,this,t,e,n,J)},AreaChart:function(t,e,n){Y(“AreaChart”,this,t,e,n,G)},GeoChart:function(t,e,n){Y(“GeoChart”,this,t,e,n,U)},ScatterChart:function(t,e,n){Y(“ScatterChart”,this,t,e,n,K)},BubbleChart:function(t,e,n){Y(“BubbleChart”,this,t,e,n,X)},Timeline:function(t,e,n){Y(“Timeline”,this,t,e,n,F)},charts:{},configure:function(t){for(var e in t)t.hasOwnProperty(e)&&(nt=t)},eachChart:function(t){for(var e in Z.charts)Z.charts.hasOwnProperty(e)&&t(Z.charts)},options:{},adapters:at,createChart:Y},“object”==typeof module&&“object”==typeof module.exports?module.exports=Z:t.Chartkick=Z}(window); //# sourceMappingURL=chartkick.min.js.map