new Vue({el:"#vue-stats",data:window.meowData,methods:{searchSubmit:function(){var t=this;this.forms.search.errors={},this.forms.search.loading=!0,this.formAjax(this.forms.search,function(r){t.forms.search.loading=!1,t.searched=!0,r.ok?(t.stats=r.data.stats,t.hasStats=0',mounted:function(){this.draw()},props:{ratio:{type:String},data:{type:Object},options:{type:Object},type:{type:String,required:!0,validator:function(t){return"Pie"===t||"Line"===t||"Bar"===t}},eventHandlers:{type:Array},responsiveOptions:{type:Array}},data:function(){return{chart:null,error:{onError:!1,message:""},noData:"",message:"",classNoData:this.options.classNoData}},methods:{clear:function(){this.noData="",this.message="",this.error.onError&&(this.error={onError:!1,message:""})},draw:function(){if(this.haveNoData())return this.setNoData();this.clear(),this.chart=new Chartist[this.type](this.$refs.chart,this.data,this.options,this.responsiveOptions),this.setEventHandlers()},haveNoData:function(){return!this.data||!this.data.series||1>this.data.series.length||"Pie"!==this.type&&!this.options.distributeSeries&&(1>this.data.labels.length||this.data.series.every(function(t){return Array.isArray(t)?!t.length:!t.data.length}))},redraw:function(){return this.error.onError?this.draw():this.haveNoData()?this.setNoData():(this.clear(),void this.chart.update(this.data,this.options))},resetEventHandlers:function(t,r){var a,e,s,o,n=!0,i=!1;try{for(e=r[Symbol.iterator]();!(n=(s=e.next()).done);n=!0){var h=s.value;this.chart.off(h.event,h.fn)}}catch(t){i=!0,a=t}finally{try{!n&&e.return&&e.return()}finally{if(i)throw a}}var l,d,c=!0,u=!1;try{for(d=t[Symbol.iterator]();!(c=(o=d.next()).done);c=!0){var f=o.value;this.chart.on(f.event,f.fn)}}catch(t){u=!0,l=t}finally{try{!c&&d.return&&d.return()}finally{if(u)throw l}}},setEventHandlers:function(){if(this.eventHandlers){var t,r,a,e=!0,s=!1;try{for(r=this.eventHandlers[Symbol.iterator]();!(e=(a=r.next()).done);e=!0){var o=a.value;this.chart.on(o.event,o.fn)}}catch(r){s=!0,t=r}finally{try{!e&&r.return&&r.return()}finally{if(s)throw t}}}},setNoData:function(){this.error={onError:!0,message:options.messageNoData},this.noData=this.classNoData,this.message=this.error.message}},watch:{ratio:"redraw",options:"draw",data:{handler:"redraw",deep:!0},type:"draw",eventHandlers:"resetEventHandlers"}}),Vue.prototype.pieOptions={showLabel:!1,plugins:[Chartist.plugins.legend({clickable:!1})]},Vue.prototype.lineOptions={showArea:!0,showPoint:!1,fullWidth:!0,showLabel:!1,axisX:{labelInterpolationFnc:function(t,r){if(0!=r%10)return null;var a=new Date(1e3*t);return["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][a.getMonth()]+" "+a.getDate()}},chartPadding:0,low:0},Vue.prototype.barOptions={};