(()=>{"use strict";function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(t,e){for(var o=0;o<e.length;o++){var n=e[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,r(n.key),n)}}function r(e){var r=function(e,r){if("object"!=t(e)||!e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var n=o.call(e,r||"default");if("object"!=t(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}(e,"string");return"symbol"==t(r)?r:r+""}var o=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.init()},(r=[{key:"init",value:function(){this.initCharts()}},{key:"initCharts",value:function(){$("#property-by-type-chart").length&&new Morris.Donut({element:"property-by-type-chart",data:window.propertyByTypeStats||[],colors:["#3c8dbc","#f56954","#00a65a","#f39c12","#00c0ef","#d2d6de"],resize:!0,responsive:!0}),$("#monthly-property-chart").length&&new Morris.Bar({element:"monthly-property-chart",data:window.monthlyPropertyStats||[],xkey:"month",ykeys:["count"],labels:[window.trans.property_count],barColors:["#00a65a"],hideHover:"auto",resize:!0,responsive:!0,postUnits:"",gridTextSize:10}),$(window).on("resize",(function(){this.resizeTO&&clearTimeout(this.resizeTO),this.resizeTO=setTimeout((function(){$(window).trigger("resizeEnd")}),500)})),$(window).on("resizeEnd",(function(){$("#property-by-type-chart").length&&($("#property-by-type-chart").empty(),new Morris.Donut({element:"property-by-type-chart",data:window.propertyByTypeStats||[],colors:["#3c8dbc","#f56954","#00a65a","#f39c12","#00c0ef","#d2d6de"],resize:!0,responsive:!0})),$("#monthly-property-chart").length&&($("#monthly-property-chart").empty(),new Morris.Bar({element:"monthly-property-chart",data:window.monthlyPropertyStats||[],xkey:"month",ykeys:["count"],labels:[window.trans.property_count],barColors:["#00a65a"],hideHover:"auto",resize:!0,responsive:!0,postUnits:"",gridTextSize:10}))}))}}])&&e(t.prototype,r),o&&e(t,o),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r,o}();$(document).ready((function(){new o}))})();