text: !function(t,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("react"),require("chart.js")):"function"==typeof define&&define.amd?define(["exports","react","chart.js"],r):r(t.ReactChartjs2={},t.React,t.Chart)}(this,function(t,e,u){"use strict";e=e&&e.hasOwnProperty("default")?e.default:e,u=u&&u.hasOwnProperty("default")?u.default:u;var r="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(t,r){return t(r={exports:{}},r.exports),r.exports}var o=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;!function(){try{if(!Object.assign)return;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return;for(var r={},e=0;e<10;e++)r["_"+String.fromCharCode(e)]=e;if("0123456789"!==Object.getOwnPropertyNames(r).map(function(t){return r[t]}).join(""))return;var n={};"abcdefghijklmnopqrst".split("").forEach(function(t){n[t]=t}),Object.keys(Object.assign({},n)).join("")}catch(t){return}}();function c(){}var s=n(function(t){t.exports=function(){function t(t,r,e,n,o,a){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==a){var i=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function r(){return t}var e={array:t.isRequired=t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:r,element:t,instanceOf:r,node:t,objectOf:r,oneOf:r,oneOfType:r,shape:r,exact:r};return e.checkPropTypes=c,e.PropTypes=e}()});var f=function(t,r){return t===r||t!=t&&r!=r};var p=function(t,r){for(var e=t.length;e--;)if(f(t[e][0],r))return e;return-1},l=Array.prototype.splice;var h=function(t){var r=this.__data__,e=p(r,t);return 0<=e&&(e==r.length-1?r.pop():l.call(r,e,1),--this.size,!0)};var v=function(t){var r=this.__data__,e=p(r,t);return e<0?void 0:r[e][1]};var y=function(t){return-1<p(this.__data__,t)};var d=function(t,r){var e=this.__data__,n=p(e,t);return n<0?(++this.size,e.push([t,r])):e[n][1]=r,this};function b(t){var r=-1,e=null==t?0:t.length;for(this.clear();++r<e;){var n=t[r];this.set(n[0],n[1])}}b.prototype.clear=function(){this.__data__=[],this.size=0},b.prototype.delete=h,b.prototype.get=v,b.prototype.has=y,b.prototype.set=d;var _=b;var g=function(){this.__data__=new _,this.size=0};var j=function(t){var r=this.__data__,e=r.delete(t);return this.size=r.size,e};var m=function(t){return this.__data__.get(t)};var O=function(t){return this.__data__.has(t)},w="object"==typeof r&&r&&r.Object===Object&&r,E="object"==typeof self&&self&&self.Object===Object&&self,P=w||E||Function("return this")(),A=P.Symbol,I=Object.prototype,C=I.hasOwnProperty,z=I.toString,S=A?A.toStringTag:void 0;var k=function(t){var r=C.call(t,S),e=t[S];try{var n=!(t[S]=void 0)}catch(t){}var o=z.call(t);return n&&(r?t[S]=e:delete t[S]),o},D=Object.prototype.toString;var T=function(t){return D.call(t)},x=A?A.toStringTag:void 0;var R=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":x&&x in Object(t)?k(t):T(t)};var B=function(t){var r=typeof t;return null!=t&&("object"==r||"function"==r)};var L,M=function(t){if(!B(t))return!1;var r=R(t);return"[object Function]"==r||"[object GeneratorFunction]"==r||"[object AsyncFunction]"==r||"[object Proxy]"==r},U=P["__core-js_shared__"],F=(L=/[^.]+$/.exec(U&&U.keys&&U.keys.IE_PROTO||""))?"Symbol(src)_1."+L:"";var $=function(t){return!!F&&F in t},q=Function.prototype.toString;var K=function(t){if(null!=t){try{return q.call(t)}catch(t){}try{return t+""}catch(t){}}return""},W=/^\[object .+?Constructor\]$/,N=RegExp("^"+Function.prototype.toString.call(Object.prototype.hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var V=function(t){return!(!B(t)||$(t))&&(M(t)?N:W).test(K(t))};var H=function(t,r){return null==t?void 0:t[r]};var G=function(t,r){var e=H(t,r);return V(e)?e:void 0},Y=G(P,"Map"),J=G(Object,"create");var Q=function(t){var r=this.has(t)&&delete this.__data__[t];return this.size-=r?1:0,r},X=Object.prototype.hasOwnProperty;var Z=function(t){var r=this.__data__;if(J){var e=r[t];return"__lodash_hash_undefined__"===e?void 0:e}return X.call(r,t)?r[t]:void 0},tt=Object.prototype.hasOwnProperty;var rt=function(t){var r=this.__data__;return J?void 0!==r[t]:tt.call(r,t)};var et=function(t,r){var e=this.__data__;return this.size+=this.has(t)?0:1,e[t]=J&&void 0===r?"__lodash_hash_undefined__":r,this};function nt(t){var r=-1,e=null==t?0:t.length;for(this.clear();++r<e;){var n=t[r];this.set(n[0],n[1])}}nt.prototype.clear=function(){this.__data__=J?J(null):{},this.size=0},nt.prototype.delete=Q,nt.prototype.get=Z,nt.prototype.has=rt,nt.prototype.set=et;var ot=nt;var at=function(t){var r=typeof t;return"string"==r||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==t:null===t};var it=function(t,r){var e=t.__data__;return at(r)?e["string"==typeof r?"string":"hash"]:e.map};var ut=function(t){var r=it(this,t).delete(t);return this.size-=r?1:0,r};var ct=function(t){return it(this,t).get(t)};var st=function(t){return it(this,t).has(t)};var ft=function(t,r){var e=it(this,t),n=e.size;return e.set(t,r),this.size+=e.size==n?0:1,this};function pt(t){var r=-1,e=null==t?0:t.length;for(this.clear();++r<e;){var n=t[r];this.set(n[0],n[1])}}pt.prototype.clear=function(){this.size=0,this.__data__={hash:new ot,map:new(Y||_),string:new ot}},pt.prototype.delete=ut,pt.prototype.get=ct,pt.prototype.has=st,pt.prototype.set=ft;var lt=pt;var ht=function(t,r){var e=this.__data__;if(e instanceof _){var n=e.__data__;if(!Y||n.length<199)return n.push([t,r]),this.size=++e.size,this;e=this.__data__=new lt(n)}return e.set(t,r),this.size=e.size,this};function vt(t){var r=this.__data__=new _(t);this.size=r.size}vt.prototype.clear=g,vt.prototype.delete=j,vt.prototype.get=m,vt.prototype.has=O,vt.prototype.set=ht;var yt=vt;var dt=function(t){return this.__data__.has(t)};function bt(t){var r=-1,e=null==t?0:t.length;for(this.__data__=new lt;++r<e;)this.add(t[r])}bt.prototype.add=bt.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},bt.prototype.has=dt;var _t=bt;var gt=function(t,r){for(var e=-1,n=null==t?0:t.length;++e<n;)if(r(t[e],e,t))return!0;return!1};var jt=function(t,r){return t.has(r)};var mt=function(t,r,e,n,o,a){var i=1&e,u=t.length,c=r.length;if(!(u==c||i&&u<c))return!1;var s=a.get(t);if(s&&a.get(r))return s==r;var f=-1,p=!0,l=2&e?new _t:void 0;for(a.set(t,r),a.set(r,t);++f<u;){var h=t[f],v=r[f];if(n)var y=i?n(v,h,f,r,t,a):n(h,v,f,t,r,a);if(void 0!==y){if(y)continue;p=!1;break}if(l){if(!gt(r,function(t,r){if(!jt(l,r)&&(h===t||o(h,t,e,n,a)))return l.push(r)})){p=!1;break}}else if(h!==v&&!o(h,v,e,n,a)){p=!1;break}}return a.delete(t),a.delete(r),p},Ot=P.Uint8Array;var wt=function(t){var e=-1,n=Array(t.size);return t.forEach(function(t,r){n[++e]=[r,t]}),n};var Et=function(t){var r=-1,e=Array(t.size);return t.forEach(function(t){e[++r]=t}),e},Pt=A?A.prototype:void 0,At=Pt?Pt.valueOf:void 0;var It=function(t,r,e,n,o,a,i){switch(e){case"[object DataView]":if(t.byteLength!=r.byteLength||t.byteOffset!=r.byteOffset)return!1;t=t.buffer,r=r.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=r.byteLength||!a(new Ot(t),new Ot(r)));case"[object Boolean]":case"[object Date]":case"[object Number]":return f(+t,+r);case"[object Error]":return t.name==r.name&&t.message==r.message;case"[object RegExp]":case"[object String]":return t==r+"";case"[object Map]":var u=wt;case"[object Set]":if(u||(u=Et),t.size!=r.size&&!(1&n))return!1;var c=i.get(t);if(c)return c==r;n|=2,i.set(t,r);var s=mt(u(t),u(r),n,o,a,i);return i.delete(t),s;case"[object Symbol]":if(At)return At.call(t)==At.call(r)}return!1};var Ct=function(t,r){for(var e=-1,n=r.length,o=t.length;++e<n;)t[o+e]=r[e];return t},zt=Array.isArray;var St=function(t,r,e){var n=r(t);return zt(t)?n:Ct(n,e(t))};var kt=function(t,r){for(var e=-1,n=null==t?0:t.length,o=0,a=[];++e<n;){var i=t[e];r(i,e,t)&&(a[o++]=i)}return a};var Dt=Object.prototype.propertyIsEnumerable,Tt=Object.getOwnPropertySymbols,xt=Tt?function(r){return null==r?[]:kt(Tt(r=Object(r)),function(t){return Dt.call(r,t)})}:function(){return[]};var Rt=function(t,r){for(var e=-1,n=Array(t);++e<t;)n[e]=r(e);return n};var Bt=function(t){return null!=t&&"object"==typeof t};var Lt=function(t){return Bt(t)&&"[object Arguments]"==R(t)},Mt=Object.prototype,Ut=Mt.hasOwnProperty,Ft=Mt.propertyIsEnumerable,$t=Lt(function(){return arguments}())?Lt:function(t){return Bt(t)&&Ut.call(t,"callee")&&!Ft.call(t,"callee")};var qt=function(){return!1},Kt=n(function(t,r){var e=r&&!r.nodeType&&r,n=e&&t&&!t.nodeType&&t,o=n&&n.exports===e?P.Buffer:void 0;t.exports=(o?o.isBuffer:void 0)||qt}),Wt=/^(?:0|[1-9]\d*)$/;var Nt=function(t,r){var e=typeof t;return!!(r=null==r?9007199254740991:r)&&("number"==e||"symbol"!=e&&Wt.test(t))&&-1<t&&t%1==0&&t<r};var Vt=function(t){return"number"==typeof t&&-1<t&&t%1==0&&t<=9007199254740991},Ht={};Ht["[object Float32Array]"]=Ht["[object Float64Array]"]=Ht["[object Int8Array]"]=Ht["[object Int16Array]"]=Ht["[object Int32Array]"]=Ht["[object Uint8Array]"]=Ht["[object Uint8ClampedArray]"]=Ht["[object Uint16Array]"]=Ht["[object Uint32Array]"]=!0,Ht["[object Arguments]"]=Ht["[object Array]"]=Ht["[object ArrayBuffer]"]=Ht["[object Boolean]"]=Ht["[object DataView]"]=Ht["[object Date]"]=Ht["[object Error]"]=Ht["[object Function]"]=Ht["[object Map]"]=Ht["[object Number]"]=Ht["[object Object]"]=Ht["[object RegExp]"]=Ht["[object Set]"]=Ht["[object String]"]=Ht["[object WeakMap]"]=!1;var Gt=function(t){return Bt(t)&&Vt(t.length)&&!!Ht[R(t)]};var Yt=function(r){return function(t){return r(t)}},Jt=n(function(t,r){var e=r&&!r.nodeType&&r,n=e&&t&&!t.nodeType&&t,o=n&&n.exports===e&&w.process,a=function(){try{var t=n&&n.require&&n.require("util").types;return t||o&&o.binding&&o.binding("util")}catch(t){}}();t.exports=a}),Qt=Jt&&Jt.isTypedArray,Xt=Qt?Yt(Qt):Gt,Zt=Object.prototype.hasOwnProperty;var tr=function(t,r){var e=zt(t),n=!e&&$t(t),o=!e&&!n&&Kt(t),a=!e&&!n&&!o&&Xt(t),i=e||n||o||a,u=i?Rt(t.length,String):[],c=u.length;for(var s in t)!r&&!Zt.call(t,s)||i&&("length"==s||o&&("offset"==s||"parent"==s)||a&&("buffer"==s||"byteLength"==s||"byteOffset"==s)||Nt(s,c))||u.push(s);return u},rr=Object.prototype;var er=function(t){var r=t&&t.constructor;return t===("function"==typeof r&&r.prototype||rr)};var nr=function(r,e){return function(t){return r(e(t))}}(Object.keys,Object),or=Object.prototype.hasOwnProperty;var ar=function(t){if(!er(t))return nr(t);var r=[];for(var e in Object(t))or.call(t,e)&&"constructor"!=e&&r.push(e);return r};var ir=function(t){return null!=t&&Vt(t.length)&&!M(t)};var ur=function(t){return ir(t)?tr(t):ar(t)};var cr=function(t){return St(t,ur,xt)},sr=Object.prototype.hasOwnProperty;var fr=function(t,r,e,n,o,a){var i=1&e,u=cr(t),c=u.length;if(c!=cr(r).length&&!i)return!1;for(var s=c;s--;){var f=u[s];if(!(i?f in r:sr.call(r,f)))return!1}var p=a.get(t);if(p&&a.get(r))return p==r;var l=!0;a.set(t,r),a.set(r,t);for(var h=i;++s<c;){var v=t[f=u[s]],y=r[f];if(n)var d=i?n(y,v,f,r,t,a):n(v,y,f,t,r,a);if(!(void 0===d?v===y||o(v,y,e,n,a):d)){l=!1;break}h||(h="constructor"==f)}if(l&&!h){var b=t.constructor,_=r.constructor;b!=_&&"constructor"in t&&"constructor"in r&&!("function"==typeof b&&b instanceof b&&"function"==typeof _&&_ instanceof _)&&(l=!1)}return a.delete(t),a.delete(r),l},pr=G(P,"DataView"),lr=G(P,"Promise"),hr=G(P,"Set"),vr=G(P,"WeakMap"),yr="[object Map]",dr="[object Promise]",br="[object Set]",_r="[object WeakMap]",gr="[object DataView]",jr=K(pr),mr=K(Y),Or=K(lr),wr=K(hr),Er=K(vr),Pr=R;(pr&&Pr(new pr(new ArrayBuffer(1)))!=gr||Y&&Pr(new Y)!=yr||lr&&Pr(lr.resolve())!=dr||hr&&Pr(new hr)!=br||vr&&Pr(new vr)!=_r)&&(Pr=function(t){var r=R(t),e="[object Object]"==r?t.constructor:void 0,n=e?K(e):"";if(n)switch(n){case jr:return gr;case mr:return yr;case Or:return dr;case wr:return br;case Er:return _r}return r});var Ar=Pr,Ir="[object Arguments]",Cr="[object Array]",zr="[object Object]",Sr=Object.prototype.hasOwnProperty;var kr=function(t,r,e,n,o,a){var i=zt(t),u=zt(r),c=i?Cr:Ar(t),s=u?Cr:Ar(r),f=(c=c==Ir?zr:c)==zr,p=(s=s==Ir?zr:s)==zr,l=c==s;if(l&&Kt(t)){if(!Kt(r))return!1;f=!(i=!0)}if(l&&!f)return a||(a=new yt),i||Xt(t)?mt(t,r,e,n,o,a):It(t,r,c,e,n,o,a);if(!(1&e)){var h=f&&Sr.call(t,"__wrapped__"),v=p&&Sr.call(r,"__wrapped__");if(h||v){var y=h?t.value():t,d=v?r.value():r;return a||(a=new yt),o(y,d,e,n,a)}}return!!l&&(a||(a=new yt),fr(t,r,e,n,o,a))};var Dr=function t(r,e,n,o,a){return r===e||(null==r||null==e||!Bt(r)&&!Bt(e)?r!=r&&e!=e:kr(r,e,n,o,t,a))};var Tr=function(t,r){return Dr(t,r)},xr=function(){try{var t=G(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();var Rr=function(t,r,e){"__proto__"==r&&xr?xr(t,r,{configurable:!0,enumerable:!0,value:e,writable:!0}):t[r]=e};var Br=function(t,r,e,n){for(var o=-1,a=null==t?0:t.length;++o<a;){var i=t[o];r(n,i,e(i),t)}return n};var Lr=function(c){return function(t,r,e){for(var n=-1,o=Object(t),a=e(t),i=a.length;i--;){var u=a[c?i:++n];if(!1===r(o[u],u,o))break}return t}}();var Mr=function(a,i){return function(t,r){if(null==t)return t;if(!ir(t))return a(t,r);for(var e=t.length,n=i?e:-1,o=Object(t);(i?n--:++n<e)&&!1!==r(o[n],n,o););return t}}(function(t,r){return t&&Lr(t,r,ur)});var Ur=function(t,n,o,a){return Mr(t,function(t,r,e){n(a,t,o(t),e)}),a};var Fr=function(t,r,e,n){var o=e.length,a=o,i=!n;if(null==t)return!a;for(t=Object(t);o--;){var u=e[o];if(i&&u[2]?u[1]!==t[u[0]]:!(u[0]in t))return!1}for(;++o<a;){var c=(u=e[o])[0],s=t[c],f=u[1];if(i&&u[2]){if(void 0===s&&!(c in t))return!1}else{var p=new yt;if(n)var l=n(s,f,c,t,r,p);if(!(void 0===l?Dr(f,s,3,n,p):l))return!1}}return!0};var $r=function(t){return t==t&&!B(t)};var qr=function(t){for(var r=ur(t),e=r.length;e--;){var n=r[e],o=t[n];r[e]=[n,o,$r(o)]}return r};var Kr=function(r,e){return function(t){return null!=t&&t[r]===e&&(void 0!==e||r in Object(t))}};var Wr=function(r){var e=qr(r);return 1==e.length&&e[0][2]?Kr(e[0][0],e[0][1]):function(t){return t===r||Fr(t,r,e)}};var Nr=function(t){return"symbol"==typeof t||Bt(t)&&"[object Symbol]"==R(t)},Vr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Hr=/^\w*$/;var Gr=function(t,r){if(zt(t))return!1;var e=typeof t;return!("number"!=e&&"symbol"!=e&&"boolean"!=e&&null!=t&&!Nr(t))||Hr.test(t)||!Vr.test(t)||null!=r&&t in Object(r)},Yr="Expected a function";function Jr(o,a){if("function"!=typeof o||null!=a&&"function"!=typeof a)throw new TypeError(Yr);var i=function(){var t=arguments,r=a?a.apply(this,t):t[0],e=i.cache;if(e.has(r))return e.get(r);var n=o.apply(this,t);return i.cache=e.set(r,n)||e,n};return i.cache=new(Jr.Cache||lt),i}Jr.Cache=lt;var Qr=Jr;var Xr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Zr=/\\(\\)?/g,te=function(t){var r=Qr(t,function(t){return 500===e.size&&e.clear(),t}),e=r.cache;return r}(function(t){var o=[];return 46==t.charCodeAt(0)&&o.push(""),t.replace(Xr,function(t,r,e,n){o.push(e?n.replace(Zr,"$1"):r||t)}),o});var re=function(t,r){for(var e=-1,n=null==t?0:t.length,o=Array(n);++e<n;)o[e]=r(t[e],e,t);return o},ee=1/0,ne=A?A.prototype:void 0,oe=ne?ne.toString:void 0;var ae=function t(r){if("string"==typeof r)return r;if(zt(r))return re(r,t)+"";if(Nr(r))return oe?oe.call(r):"";var e=r+"";return"0"==e&&1/r==-ee?"-0":e};var ie=function(t){return null==t?"":ae(t)};var ue=function(t,r){return zt(t)?t:Gr(t,r)?[t]:te(ie(t))};var ce=function(t){if("string"==typeof t||Nr(t))return t;var r=t+"";return"0"==r&&1/t==-1/0?"-0":r};var se=function(t,r){for(var e=0,n=(r=ue(r,t)).length;null!=t&&e<n;)t=t[ce(r[e++])];return e&&e==n?t:void 0};var fe=function(t,r,e){var n=null==t?void 0:se(t,r);return void 0===n?e:n};var pe=function(t,r){return null!=t&&r in Object(t)};var le=function(t,r,e){for(var n=-1,o=(r=ue(r,t)).length,a=!1;++n<o;){var i=ce(r[n]);if(!(a=null!=t&&e(t,i)))break;t=t[i]}return a||++n!=o?a:!!(o=null==t?0:t.length)&&Vt(o)&&Nt(i,o)&&(zt(t)||$t(t))};var he=function(t,r){return null!=t&&le(t,r,pe)};var ve=function(e,n){return Gr(e)&&$r(n)?Kr(ce(e),n):function(t){var r=fe(t,e);return void 0===r&&r===n?he(t,e):Dr(n,r,3)}};var ye=function(t){return t};var de=function(r){return function(t){return null==t?void 0:t[r]}};var be=function(r){return function(t){return se(t,r)}};var _e=function(t){return Gr(t)?de(ce(t)):be(t)};var ge=function(t){return"function"==typeof t?t:null==t?ye:"object"==typeof t?zt(t)?ve(t[0],t[1]):Wr(t):_e(t)};var je=function(o,a){return function(t,r){var e=zt(t)?Br:Ur,n=a?a():{};return e(t,o,ge(r,2),n)}}(function(t,r,e){Rr(t,e,r)}),me=function(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")},Oe=Object.assign||function(t){for(var r=1;r<arguments.length;r++){var e=arguments[r];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])}return t},we=function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function, not "+typeof r);t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),r&&(Object.setPrototypeOf?Object.setPrototypeOf(t,r):t.__proto__=r)},Ee=function(t,r){var e={};for(var n in t)r.indexOf(n)<0&&Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},Pe=function(t,r){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!r||"object"!=typeof r&&"function"!=typeof r?t:r},Ae="undefined"!=typeof process&&process.env&&"production",Ie=function(o){function c(){var t,u;me(this,c);for(var r=arguments.length,e=Array(r),n=0;n<r;n++)e[n]=arguments[n];return(t=u=Pe(this,o.call.apply(o,[this].concat(e)))).handleOnClick=function(t){var r=u.chartInstance,e=u.props,n=e.getDatasetAtEvent,o=e.getElementAtEvent,a=e.getElementsAtEvent,i=e.onElementsClick;n&&n(r.getDatasetAtEvent(t),t),o&&o(r.getElementAtEvent(t),t),a&&a(r.getElementsAtEvent(t),t),i&&i(r.getElementsAtEvent(t),t)},u.ref=function(t){u.element=t},Pe(u,t)}return we(c,o),c.prototype.componentWillMount=function(){this.chartInstance=void 0},c.prototype.componentDidMount=function(){this.renderChart()},c.prototype.componentDidUpdate=function(){if(this.props.redraw)return this.chartInstance.destroy(),void this.renderChart();this.updateChart()},c.prototype.shouldComponentUpdate=function(t){var r=this.props,e=r.options,n=r.plugins;if(!0===t.redraw)return!0;if(r.height!==t.height||r.width!==t.width)return!0;if(r.type!==t.type)return!0;if(!Tr(r.legend,t.legend))return!0;if(!Tr(e,t.options))return!0;var o=this.transformDataProp(t);return!Tr(this.shadowDataProp,o)||!Tr(n,t.plugins)},c.prototype.componentWillUnmount=function(){this.chartInstance.destroy()},c.prototype.transformDataProp=function(t){var r=t.data;return"function"!=typeof r?r:r(this.element)},c.prototype.memoizeDataProps=function(){if(this.props.data){var t=this.transformDataProp(this.props);return this.shadowDataProp=Oe({},t,{datasets:t.datasets&&t.datasets.map(function(t){return Oe({},t)})}),t}},c.prototype.checkDatasets=function(t){if("production"!==Ae&&"prod"!==Ae&&1<t.length&&!(this.props.datasetKeyProvider!==c.getLabelAsKey)){var r=!1;t.forEach(function(t){t.label||(r=!0)}),r&&console.error('[react-chartjs-2] Warning: Each dataset needs a unique key. By default, the "label" property on each dataset is used. Alternatively, you may provide a "datasetKeyProvider" as a prop that returns a unique key.')}},c.prototype.updateChart=function(){var r=this,t=this.props.options,e=this.memoizeDataProps(this.props);if(this.chartInstance){t&&(this.chartInstance.options=u.helpers.configMerge(this.chartInstance.options,t));var n=this.chartInstance.config.data&&this.chartInstance.config.data.datasets||[],o=e.datasets||[];this.checkDatasets(n);var a=je(n,this.props.datasetKeyProvider);this.chartInstance.config.data.datasets=o.map(function(e){var n=a[r.props.datasetKeyProvider(e)];if(n&&n.type===e.type){n.data.splice(e.data.length),e.data.forEach(function(t,r){n.data[r]=e.data[r]});var t=Ee(e,["data"]);return Oe({},n,t)}return e});var i=Ee(e,["datasets"]);this.chartInstance.config.data=Oe({},this.chartInstance.config.data,i),this.chartInstance.update()}},c.prototype.renderChart=function(){var t=this.props,r=t.options,e=t.legend,n=t.type,o=t.plugins,a=this.element,i=this.memoizeDataProps();void 0===e||Tr(c.defaultProps.legend,e)||(r.legend=e),this.chartInstance=new u(a,{type:n,data:i,options:r,plugins:o})},c.prototype.render=function(){var t=this.props;return e.createElement("canvas",{ref:this.ref,height:t.height,width:t.width,id:t.id,onClick:this.handleOnClick})},c}(e.Component);Ie.getLabelAsKey=function(t){return t.label},Ie.propTypes={data:s.oneOfType([s.object,s.func]).isRequired,getDatasetAtEvent:s.func,getElementAtEvent:s.func,getElementsAtEvent:s.func,height:s.number,legend:s.object,onElementsClick:s.func,options:s.object,plugins:s.arrayOf(s.object),redraw:s.bool,type:function(t,r,e){if(!u.controllers[t[r]])return Error("Invalid chart type `"+t[r]+"` supplied to `"+e+"`.")},width:s.number,datasetKeyProvider:s.func},Ie.defaultProps={legend:{display:!0,position:"bottom"},type:"doughnut",height:150,width:300,redraw:!1,options:{},datasetKeyProvider:Ie.getLabelAsKey};var Ce=function(t){function r(){return me(this,r),Pe(this,t.apply(this,arguments))}return we(r,t),r.prototype.render=function(){var r=this;return e.createElement(Ie,Oe({},this.props,{ref:function(t){return r.chartInstance=t&&t.chartInstance},type:"doughnut"}))},r}(e.Component),ze=function(t){function r(){return me(this,r),Pe(this,t.apply(this,arguments))}return we(r,t),r.prototype.render=function(){var r=this;return e.createElement(Ie,Oe({},this.props,{ref:function(t){return r.chartInstance=t&&t.chartInstance},type:"pie"}))},r}(e.Component),Se=function(t){function r(){return me(this,r),Pe(this,t.apply(this,arguments))}return we(r,t),r.prototype.render=function(){var r=this;return e.createElement(Ie,Oe({},this.props,{ref:function(t){return r.chartInstance=t&&t.chartInstance},type:"line"}))},r}(e.Component),ke=function(t){function r(){return me(this,r),Pe(this,t.apply(this,arguments))}return we(r,t),r.prototype.render=function(){var r=this;return e.createElement(Ie,Oe({},this.props,{ref:function(t){return r.chartInstance=t&&t.chartInstance},type:"bar"}))},r}(e.Component),De=function(t){function r(){return me(this,r),Pe(this,t.apply(this,arguments))}return we(r,t),r.prototype.render=function(){var r=this;return e.createElement(Ie,Oe({},this.props,{ref:function(t){return r.chartInstance=t&&t.chartInstance},type:"horizontalBar"}))},r}(e.Component),Te=function(t){function r(){return me(this,r),Pe(this,t.apply(this,arguments))}return we(r,t),r.prototype.render=function(){var r=this;return e.createElement(Ie,Oe({},this.props,{ref:function(t){return r.chartInstance=t&&t.chartInstance},type:"radar"}))},r}(e.Component),xe=function(t){function r(){return me(this,r),Pe(this,t.apply(this,arguments))}return we(r,t),r.prototype.render=function(){var r=this;return e.createElement(Ie,Oe({},this.props,{ref:function(t){return r.chartInstance=t&&t.chartInstance},type:"polarArea"}))},r}(e.Component),Re=function(t){function r(){return me(this,r),Pe(this,t.apply(this,arguments))}return we(r,t),r.prototype.render=function(){var r=this;return e.createElement(Ie,Oe({},this.props,{ref:function(t){return r.chartInstance=t&&t.chartInstance},type:"bubble"}))},r}(e.Component),Be=function(t){function r(){return me(this,r),Pe(this,t.apply(this,arguments))}return we(r,t),r.prototype.render=function(){var r=this;return e.createElement(Ie,Oe({},this.props,{ref:function(t){return r.chartInstance=t&&t.chartInstance},type:"scatter"}))},r}(e.Component),Le=u.defaults;t.default=Ie,t.Doughnut=Ce,t.Pie=ze,t.Line=Se,t.Bar=ke,t.HorizontalBar=De,t.Radar=Te,t.Polar=xe,t.Bubble=Re,t.Scatter=Be,t.defaults=Le,t.Chart=u,Object.defineProperty(t,"__esModule",{value:!0})});
  