Socket
Socket
Sign inDemoInstall

react-chartjs-2

Package Overview
Dependencies
15
Maintainers
2
Versions
84
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.6.4 to 2.7.0

stories/UpdatingChart.js

2

dist/react-chartjs-2.min.js

@@ -1,1 +0,1 @@

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("react"),require("chart.js")):"function"==typeof define&&define.amd?define(["exports","react","chart.js"],e):e(t.ReactChartjs2={},t.React,t.Chart)}(this,function(t,e,n){"use strict";function r(t,e){return e={exports:{}},t(e,e.exports),e.exports}function o(t){return function(){return t}}function i(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function a(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function u(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function c(t){var e=this.__data__=new k(t);this.size=e.size}function s(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new Pt;++e<n;)this.add(t[e])}function f(t,e,n,r,o){return t===e||(null==t||null==e||!ce(t)&&!ce(e)?t!==t&&e!==e:nn(t,e,n,r,f,o))}function p(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError(_n);var n=function(){var r=arguments,o=e?e.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=t.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(p.Cache||Pt),n}function l(t){if("string"==typeof t)return t;if(ee(t))return Pn(t,l)+"";if(yn(t))return Tn?Tn.call(t):"";var e=t+"";return"0"==e&&1/t==-An?"-0":e}e=e&&e.hasOwnProperty("default")?e.default:e,n=n&&n.hasOwnProperty("default")?n.default:n;var h="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},y=function(){};y.thatReturns=o,y.thatReturnsFalse=o(!1),y.thatReturnsTrue=o(!0),y.thatReturnsNull=o(null),y.thatReturnsThis=function(){return this},y.thatReturnsArgument=function(t){return t};var d=y,v=function(t){};"production"!==process.env.NODE_ENV&&(v=function(t){if(void 0===t)throw Error("invariant requires an error message argument")});var b=function(t,e,n,r,o,i,a,u){if(v(e),!t){var c;if(void 0===e)c=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var s=[n,r,o,i,a,u],f=0;(c=Error(e.replace(/%s/g,function(){return s[f++]}))).name="Invariant Violation"}throw c.framesToPop=1,c}},_=d;if("production"!==process.env.NODE_ENV){var g=function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;e>r;r++)n[r-1]=arguments[r];var o=0,i="Warning: "+t.replace(/%s/g,function(){return n[o++]});void 0!==console&&console.error(i);try{throw Error(i)}catch(t){}};_=function(t,e){if(void 0===e)throw Error("`warning(condition, format, ...args)` requires a warning message argument");if(0!==e.indexOf("Failed Composite propType: ")&&!t){for(var n=arguments.length,r=Array(n>2?n-2:0),o=2;n>o;o++)r[o-2]=arguments[o];g.apply(void 0,[e].concat(r))}}}var m=_,j="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";if("production"!==process.env.NODE_ENV)var O=b,w=m,E=j,P={};var A=function(t,e,n,r,o){if("production"!==process.env.NODE_ENV)for(var i in t)if(t.hasOwnProperty(i)){var a;try{O("function"==typeof t[i],"%s: %s type `%s` is invalid; it must be a function, usually from React.PropTypes.",r||"React class",n,i),a=t[i](e,i,r,n,null,E)}catch(t){a=t}if(w(!a||a instanceof Error,"%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",r||"React class",n,i,typeof a),a instanceof Error&&!(a.message in P)){P[a.message]=!0;var u=o?o():"";w(!1,"Failed %s type: %s%s",n,a.message,null!=u?u:"")}}},x=function(t,e){function n(t){var e=t&&(h&&t[h]||t[y]);if("function"==typeof e)return e}function r(t,e){return t===e?0!==t||1/t==1/e:t!==t&&e!==e}function o(t){this.message=t,this.stack=""}function i(t){function n(n,a,u,c,s,f,p){if(c=c||v,f=f||u,p!==j)if(e)b(!1,"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");else if("production"!==process.env.NODE_ENV&&void 0!==console){var l=c+":"+u;!r[l]&&3>i&&(m(!1,"You are manually calling a React.PropTypes validation function for the `%s` prop on `%s`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details.",f,c),r[l]=!0,i++)}return null==a[u]?n?new o(null===a[u]?"The "+s+" `"+f+"` is marked as required in `"+c+"`, but its value is `null`.":"The "+s+" `"+f+"` is marked as required in `"+c+"`, but its value is `undefined`."):null:t(a,u,c,s,f)}if("production"!==process.env.NODE_ENV)var r={},i=0;var a=n.bind(null,!1);return a.isRequired=n.bind(null,!0),a}function a(t){return i(function(e,n,r,i,a,u){var c=e[n];return s(c)!==t?new o("Invalid "+i+" `"+a+"` of type `"+f(c)+"` supplied to `"+r+"`, expected `"+t+"`."):null})}function u(e){switch(typeof e){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(u);if(null===e||t(e))return!0;var r=n(e);if(!r)return!1;var o,i=r.call(e);if(r!==e.entries){for(;!(o=i.next()).done;)if(!u(o.value))return!1}else for(;!(o=i.next()).done;){var a=o.value;if(a&&!u(a[1]))return!1}return!0;default:return!1}}function c(t,e){return"symbol"===t||("Symbol"===e["@@toStringTag"]||"function"==typeof Symbol&&e instanceof Symbol)}function s(t){var e=typeof t;return Array.isArray(t)?"array":t instanceof RegExp?"object":c(e,t)?"symbol":e}function f(t){if(void 0===t||null===t)return""+t;var e=s(t);if("object"===e){if(t instanceof Date)return"date";if(t instanceof RegExp)return"regexp"}return e}function p(t){var e=f(t);switch(e){case"array":case"object":return"an "+e;case"boolean":case"date":case"regexp":return"a "+e;default:return e}}function l(t){return t.constructor&&t.constructor.name?t.constructor.name:v}var h="function"==typeof Symbol&&Symbol.iterator,y="@@iterator",v="<<anonymous>>",_={array:a("array"),bool:a("boolean"),func:a("function"),number:a("number"),object:a("object"),string:a("string"),symbol:a("symbol"),any:i(d.thatReturnsNull),arrayOf:function(t){return i(function(e,n,r,i,a){if("function"!=typeof t)return new o("Property `"+a+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var u=e[n];if(!Array.isArray(u))return new o("Invalid "+i+" `"+a+"` of type `"+s(u)+"` supplied to `"+r+"`, expected an array.");for(var c=0;u.length>c;c++){var f=t(u,c,r,i,a+"["+c+"]",j);if(f instanceof Error)return f}return null})},element:function(){return i(function(e,n,r,i,a){var u=e[n];return t(u)?null:new o("Invalid "+i+" `"+a+"` of type `"+s(u)+"` supplied to `"+r+"`, expected a single ReactElement.")})}(),instanceOf:function(t){return i(function(e,n,r,i,a){if(!(e[n]instanceof t)){var u=t.name||v;return new o("Invalid "+i+" `"+a+"` of type `"+l(e[n])+"` supplied to `"+r+"`, expected instance of `"+u+"`.")}return null})},node:function(){return i(function(t,e,n,r,i){return u(t[e])?null:new o("Invalid "+r+" `"+i+"` supplied to `"+n+"`, expected a ReactNode.")})}(),objectOf:function(t){return i(function(e,n,r,i,a){if("function"!=typeof t)return new o("Property `"+a+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var u=e[n],c=s(u);if("object"!==c)return new o("Invalid "+i+" `"+a+"` of type `"+c+"` supplied to `"+r+"`, expected an object.");for(var f in u)if(u.hasOwnProperty(f)){var p=t(u,f,r,i,a+"."+f,j);if(p instanceof Error)return p}return null})},oneOf:function(t){return Array.isArray(t)?i(function(e,n,i,a,u){for(var c=e[n],s=0;t.length>s;s++)if(r(c,t[s]))return null;return new o("Invalid "+a+" `"+u+"` of value `"+c+"` supplied to `"+i+"`, expected one of "+JSON.stringify(t)+".")}):("production"!==process.env.NODE_ENV&&m(!1,"Invalid argument supplied to oneOf, expected an instance of array."),d.thatReturnsNull)},oneOfType:function(t){if(!Array.isArray(t))return"production"!==process.env.NODE_ENV&&m(!1,"Invalid argument supplied to oneOfType, expected an instance of array."),d.thatReturnsNull;for(var e=0;t.length>e;e++){var n=t[e];if("function"!=typeof n)return m(!1,"Invalid argument supplid to oneOfType. Expected an array of check functions, but received %s at index %s.",p(n),e),d.thatReturnsNull}return i(function(e,n,r,i,a){for(var u=0;t.length>u;u++)if(null==(0,t[u])(e,n,r,i,a,j))return null;return new o("Invalid "+i+" `"+a+"` supplied to `"+r+"`.")})},shape:function(t){return i(function(e,n,r,i,a){var u=e[n],c=s(u);if("object"!==c)return new o("Invalid "+i+" `"+a+"` of type `"+c+"` supplied to `"+r+"`, expected `object`.");for(var f in t){var p=t[f];if(p){var l=p(u,f,r,i,a+"."+f,j);if(l)return l}}return null})}};return o.prototype=Error.prototype,_.checkPropTypes=A,_.PropTypes=_,_},T=function(){function t(t,e,n,r,o,i){i!==j&&b(!1,"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")}function e(){return t}t.isRequired=t;var n={array:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e};return n.checkPropTypes=d,n.PropTypes=n,n},S=r(function(t){if("production"!==process.env.NODE_ENV){var e="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103;t.exports=x(function(t){return"object"==typeof t&&null!==t&&t.$$typeof===e},!0)}else t.exports=T()}),R=function(t,e){return t===e||t!==t&&e!==e},C=function(t,e){for(var n=t.length;n--;)if(R(t[n][0],e))return n;return-1},D=Array.prototype.splice;i.prototype.clear=function(){this.__data__=[],this.size=0},i.prototype.delete=function(t){var e=this.__data__,n=C(e,t);return n>=0&&(n==e.length-1?e.pop():D.call(e,n,1),--this.size,!0)},i.prototype.get=function(t){var e=this.__data__,n=C(e,t);return 0>n?void 0:e[n][1]},i.prototype.has=function(t){return C(this.__data__,t)>-1},i.prototype.set=function(t,e){var n=this.__data__,r=C(n,t);return 0>r?(++this.size,n.push([t,e])):n[r][1]=e,this};var k=i,N="object"==typeof h&&h&&h.Object===Object&&h,z="object"==typeof self&&self&&self.Object===Object&&self,I=N||z||Function("return this")(),$=I.Symbol,M=Object.prototype,V=M.hasOwnProperty,F=M.toString,B=$?$.toStringTag:void 0,U=function(t){var e=V.call(t,B),n=t[B];try{t[B]=void 0;var r=!0}catch(t){}var o=F.call(t);return r&&(e?t[B]=n:delete t[B]),o},q=Object.prototype.toString,L=function(t){return q.call(t)},K="[object Null]",W="[object Undefined]",Y=$?$.toStringTag:void 0,H=function(t){return null==t?void 0===t?W:K:Y&&Y in Object(t)?U(t):L(t)},G=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)},J="[object AsyncFunction]",Q="[object Function]",X="[object GeneratorFunction]",Z="[object Proxy]",tt=function(t){if(!G(t))return!1;var e=H(t);return e==Q||e==X||e==J||e==Z},et=I["__core-js_shared__"],nt=function(){var t=/[^.]+$/.exec(et&&et.keys&&et.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),rt=function(t){return!!nt&&nt in t},ot=Function.prototype.toString,it=function(t){if(null!=t){try{return ot.call(t)}catch(t){}try{return t+""}catch(t){}}return""},at=/[\\^$.*+?()[\]{}|]/g,ut=/^\[object .+?Constructor\]$/,ct=Function.prototype,st=Object.prototype,ft=ct.toString,pt=st.hasOwnProperty,lt=RegExp("^"+ft.call(pt).replace(at,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ht=function(t){return!(!G(t)||rt(t))&&(tt(t)?lt:ut).test(it(t))},yt=function(t,e){return null==t?void 0:t[e]},dt=function(t,e){var n=yt(t,e);return ht(n)?n:void 0},vt=dt(I,"Map"),bt=dt(Object,"create"),_t="__lodash_hash_undefined__",gt=Object.prototype.hasOwnProperty,mt=Object.prototype.hasOwnProperty,jt="__lodash_hash_undefined__";a.prototype.clear=function(){this.__data__=bt?bt(null):{},this.size=0},a.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},a.prototype.get=function(t){var e=this.__data__;if(bt){var n=e[t];return n===_t?void 0:n}return gt.call(e,t)?e[t]:void 0},a.prototype.has=function(t){var e=this.__data__;return bt?void 0!==e[t]:mt.call(e,t)},a.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=bt&&void 0===e?jt:e,this};var Ot=a,wt=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t},Et=function(t,e){var n=t.__data__;return wt(e)?n["string"==typeof e?"string":"hash"]:n.map};u.prototype.clear=function(){this.size=0,this.__data__={hash:new Ot,map:new(vt||k),string:new Ot}},u.prototype.delete=function(t){var e=Et(this,t).delete(t);return this.size-=e?1:0,e},u.prototype.get=function(t){return Et(this,t).get(t)},u.prototype.has=function(t){return Et(this,t).has(t)},u.prototype.set=function(t,e){var n=Et(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};var Pt=u,At=200;c.prototype.clear=function(){this.__data__=new k,this.size=0},c.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},c.prototype.get=function(t){return this.__data__.get(t)},c.prototype.has=function(t){return this.__data__.has(t)},c.prototype.set=function(t,e){var n=this.__data__;if(n instanceof k){var r=n.__data__;if(!vt||At-1>r.length)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new Pt(r)}return n.set(t,e),this.size=n.size,this};var xt=c,Tt="__lodash_hash_undefined__";s.prototype.add=s.prototype.push=function(t){return this.__data__.set(t,Tt),this},s.prototype.has=function(t){return this.__data__.has(t)};var St=s,Rt=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1},Ct=function(t,e){return t.has(e)},Dt=1,kt=2,Nt=function(t,e,n,r,o,i){var a=n&Dt,u=t.length,c=e.length;if(!(u==c||a&&c>u))return!1;var s=i.get(t);if(s&&i.get(e))return s==e;var f=-1,p=!0,l=n&kt?new St:void 0;for(i.set(t,e),i.set(e,t);++f<u;){var h=t[f],y=e[f];if(r)var d=a?r(y,h,f,e,t,i):r(h,y,f,t,e,i);if(void 0!==d){if(d)continue;p=!1;break}if(l){if(!Rt(e,function(t,e){if(!Ct(l,e)&&(h===t||o(h,t,n,r,i)))return l.push(e)})){p=!1;break}}else if(h!==y&&!o(h,y,n,r,i)){p=!1;break}}return i.delete(t),i.delete(e),p},zt=I.Uint8Array,It=function(t){var e=-1,n=Array(t.size);return t.forEach(function(t,r){n[++e]=[r,t]}),n},$t=function(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=t}),n},Mt=1,Vt=2,Ft="[object Boolean]",Bt="[object Date]",Ut="[object Error]",qt="[object Map]",Lt="[object Number]",Kt="[object RegExp]",Wt="[object Set]",Yt="[object String]",Ht="[object Symbol]",Gt="[object ArrayBuffer]",Jt="[object DataView]",Qt=$?$.prototype:void 0,Xt=Qt?Qt.valueOf:void 0,Zt=function(t,e,n,r,o,i,a){switch(n){case Jt:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case Gt:return!(t.byteLength!=e.byteLength||!i(new zt(t),new zt(e)));case Ft:case Bt:case Lt:return R(+t,+e);case Ut:return t.name==e.name&&t.message==e.message;case Kt:case Yt:return t==e+"";case qt:var u=It;case Wt:var c=r&Mt;if(u||(u=$t),t.size!=e.size&&!c)return!1;var s=a.get(t);if(s)return s==e;r|=Vt,a.set(t,e);var f=Nt(u(t),u(e),r,o,i,a);return a.delete(t),f;case Ht:if(Xt)return Xt.call(t)==Xt.call(e)}return!1},te=function(t,e){for(var n=-1,r=e.length,o=t.length;++n<r;)t[o+n]=e[n];return t},ee=Array.isArray,ne=function(t,e,n){var r=e(t);return ee(t)?r:te(r,n(t))},re=function(t,e){for(var n=-1,r=null==t?0:t.length,o=0,i=[];++n<r;){var a=t[n];e(a,n,t)&&(i[o++]=a)}return i},oe=Object.prototype.propertyIsEnumerable,ie=Object.getOwnPropertySymbols,ae=ie?function(t){return null==t?[]:(t=Object(t),re(ie(t),function(e){return oe.call(t,e)}))}:function(){return[]},ue=function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r},ce=function(t){return null!=t&&"object"==typeof t},se="[object Arguments]",fe=function(t){return ce(t)&&H(t)==se},pe=Object.prototype,le=pe.hasOwnProperty,he=pe.propertyIsEnumerable,ye=fe(function(){return arguments}())?fe:function(t){return ce(t)&&le.call(t,"callee")&&!he.call(t,"callee")},de=function(){return!1},ve=r(function(t,e){var n=e&&!e.nodeType&&e,r=n&&!0&&t&&!t.nodeType&&t,o=r&&r.exports===n?I.Buffer:void 0,i=(o?o.isBuffer:void 0)||de;t.exports=i}),be=9007199254740991,_e=/^(?:0|[1-9]\d*)$/,ge=function(t,e){return!!(e=null==e?be:e)&&("number"==typeof t||_e.test(t))&&t>-1&&t%1==0&&e>t},me=9007199254740991,je=function(t){return"number"==typeof t&&t>-1&&t%1==0&&me>=t},Oe={};Oe["[object Float32Array]"]=Oe["[object Float64Array]"]=Oe["[object Int8Array]"]=Oe["[object Int16Array]"]=Oe["[object Int32Array]"]=Oe["[object Uint8Array]"]=Oe["[object Uint8ClampedArray]"]=Oe["[object Uint16Array]"]=Oe["[object Uint32Array]"]=!0,Oe["[object Arguments]"]=Oe["[object Array]"]=Oe["[object ArrayBuffer]"]=Oe["[object Boolean]"]=Oe["[object DataView]"]=Oe["[object Date]"]=Oe["[object Error]"]=Oe["[object Function]"]=Oe["[object Map]"]=Oe["[object Number]"]=Oe["[object Object]"]=Oe["[object RegExp]"]=Oe["[object Set]"]=Oe["[object String]"]=Oe["[object WeakMap]"]=!1;var we=function(t){return function(e){return t(e)}},Ee=r(function(t,e){var n=e&&!e.nodeType&&e,r=n&&!0&&t&&!t.nodeType&&t,o=r&&r.exports===n&&N.process,i=function(){try{return o&&o.binding&&o.binding("util")}catch(t){}}();t.exports=i}),Pe=Ee&&Ee.isTypedArray,Ae=Pe?we(Pe):function(t){return ce(t)&&je(t.length)&&!!Oe[H(t)]},xe=Object.prototype.hasOwnProperty,Te=function(t,e){var n=ee(t),r=!n&&ye(t),o=!n&&!r&&ve(t),i=!n&&!r&&!o&&Ae(t),a=n||r||o||i,u=a?ue(t.length,String):[],c=u.length;for(var s in t)!e&&!xe.call(t,s)||a&&("length"==s||o&&("offset"==s||"parent"==s)||i&&("buffer"==s||"byteLength"==s||"byteOffset"==s)||ge(s,c))||u.push(s);return u},Se=Object.prototype,Re=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Se)},Ce=function(t,e){return function(n){return t(e(n))}}(Object.keys,Object),De=Object.prototype.hasOwnProperty,ke=function(t){if(!Re(t))return Ce(t);var e=[];for(var n in Object(t))De.call(t,n)&&"constructor"!=n&&e.push(n);return e},Ne=function(t){return null!=t&&je(t.length)&&!tt(t)},ze=function(t){return Ne(t)?Te(t):ke(t)},Ie=function(t){return ne(t,ze,ae)},$e=1,Me=Object.prototype.hasOwnProperty,Ve=function(t,e,n,r,o,i){var a=n&$e,u=Ie(t),c=u.length;if(c!=Ie(e).length&&!a)return!1;for(var s=c;s--;){var f=u[s];if(!(a?f in e:Me.call(e,f)))return!1}var p=i.get(t);if(p&&i.get(e))return p==e;var l=!0;i.set(t,e),i.set(e,t);for(var h=a;++s<c;){var y=t[f=u[s]],d=e[f];if(r)var v=a?r(d,y,f,e,t,i):r(y,d,f,t,e,i);if(!(void 0===v?y===d||o(y,d,n,r,i):v)){l=!1;break}h||(h="constructor"==f)}if(l&&!h){var b=t.constructor,_=e.constructor;b!=_&&"constructor"in t&&"constructor"in e&&!("function"==typeof b&&b instanceof b&&"function"==typeof _&&_ instanceof _)&&(l=!1)}return i.delete(t),i.delete(e),l},Fe=dt(I,"DataView"),Be=dt(I,"Promise"),Ue=dt(I,"Set"),qe=dt(I,"WeakMap"),Le=it(Fe),Ke=it(vt),We=it(Be),Ye=it(Ue),He=it(qe),Ge=H;(Fe&&"[object DataView]"!=Ge(new Fe(new ArrayBuffer(1)))||vt&&"[object Map]"!=Ge(new vt)||Be&&"[object Promise]"!=Ge(Be.resolve())||Ue&&"[object Set]"!=Ge(new Ue)||qe&&"[object WeakMap]"!=Ge(new qe))&&(Ge=function(t){var e=H(t),n="[object Object]"==e?t.constructor:void 0,r=n?it(n):"";if(r)switch(r){case Le:return"[object DataView]";case Ke:return"[object Map]";case We:return"[object Promise]";case Ye:return"[object Set]";case He:return"[object WeakMap]"}return e});var Je=Ge,Qe=1,Xe="[object Arguments]",Ze="[object Array]",tn="[object Object]",en=Object.prototype.hasOwnProperty,nn=function(t,e,n,r,o,i){var a=ee(t),u=ee(e),c=a?Ze:Je(t),s=u?Ze:Je(e),f=(c=c==Xe?tn:c)==tn,p=(s=s==Xe?tn:s)==tn,l=c==s;if(l&&ve(t)){if(!ve(e))return!1;a=!0,f=!1}if(l&&!f)return i||(i=new xt),a||Ae(t)?Nt(t,e,n,r,o,i):Zt(t,e,c,n,r,o,i);if(!(n&Qe)){var h=f&&en.call(t,"__wrapped__"),y=p&&en.call(e,"__wrapped__");if(h||y){var d=h?t.value():t,v=y?e.value():e;return i||(i=new xt),o(d,v,n,r,i)}}return!!l&&(i||(i=new xt),Ve(t,e,n,r,o,i))},rn=f,on=function(t,e){return rn(t,e)},an=1,un=2,cn=function(t,e,n,r){var o=n.length,i=o,a=!r;if(null==t)return!i;for(t=Object(t);o--;){var u=n[o];if(a&&u[2]?u[1]!==t[u[0]]:!(u[0]in t))return!1}for(;++o<i;){var c=(u=n[o])[0],s=t[c],f=u[1];if(a&&u[2]){if(void 0===s&&!(c in t))return!1}else{var p=new xt;if(r)var l=r(s,f,c,t,e,p);if(!(void 0===l?rn(f,s,an|un,r,p):l))return!1}}return!0},sn=function(t){return t===t&&!G(t)},fn=function(t){for(var e=ze(t),n=e.length;n--;){var r=e[n],o=t[r];e[n]=[r,o,sn(o)]}return e},pn=function(t,e){return function(n){return null!=n&&n[t]===e&&(void 0!==e||t in Object(n))}},ln=function(t){var e=fn(t);return 1==e.length&&e[0][2]?pn(e[0][0],e[0][1]):function(n){return n===t||cn(n,t,e)}},hn="[object Symbol]",yn=function(t){return"symbol"==typeof t||ce(t)&&H(t)==hn},dn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,vn=/^\w*$/,bn=function(t,e){if(ee(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!yn(t))||vn.test(t)||!dn.test(t)||null!=e&&t in Object(e)},_n="Expected a function";p.Cache=Pt;var gn=p,mn=500,jn=/^\./,On=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,wn=/\\(\\)?/g,En=function(t){var e=gn(t,function(t){return n.size===mn&&n.clear(),t}),n=e.cache;return e}(function(t){var e=[];return jn.test(t)&&e.push(""),t.replace(On,function(t,n,r,o){e.push(r?o.replace(wn,"$1"):n||t)}),e}),Pn=function(t,e){for(var n=-1,r=null==t?0:t.length,o=Array(r);++n<r;)o[n]=e(t[n],n,t);return o},An=1/0,xn=$?$.prototype:void 0,Tn=xn?xn.toString:void 0,Sn=l,Rn=function(t){return null==t?"":Sn(t)},Cn=function(t,e){return ee(t)?t:bn(t,e)?[t]:En(Rn(t))},Dn=1/0,kn=function(t){if("string"==typeof t||yn(t))return t;var e=t+"";return"0"==e&&1/t==-Dn?"-0":e},Nn=function(t,e){for(var n=0,r=(e=Cn(e,t)).length;null!=t&&r>n;)t=t[kn(e[n++])];return n&&n==r?t:void 0},zn=function(t,e,n){var r=null==t?void 0:Nn(t,e);return void 0===r?n:r},In=function(t,e){return null!=t&&e in Object(t)},$n=function(t,e,n){for(var r=-1,o=(e=Cn(e,t)).length,i=!1;++r<o;){var a=kn(e[r]);if(!(i=null!=t&&n(t,a)))break;t=t[a]}return i||++r!=o?i:!!(o=null==t?0:t.length)&&je(o)&&ge(a,o)&&(ee(t)||ye(t))},Mn=function(t,e){return null!=t&&$n(t,e,In)},Vn=1,Fn=2,Bn=function(t,e){return bn(t)&&sn(e)?pn(kn(t),e):function(n){var r=zn(n,t);return void 0===r&&r===e?Mn(n,t):rn(e,r,Vn|Fn)}},Un=function(t){return t},qn=function(t){return function(e){return null==e?void 0:e[t]}},Ln=function(t){return function(e){return Nn(e,t)}},Kn=function(t){return bn(t)?qn(kn(t)):Ln(t)},Wn=function(t){return"function"==typeof t?t:null==t?Un:"object"==typeof t?ee(t)?Bn(t[0],t[1]):ln(t):Kn(t)},Yn=function(t){return function(e,n,r){var o=Object(e);if(!Ne(e)){var i=Wn(n,3);e=ze(e),n=function(t){return i(o[t],t,o)}}var a=t(e,n,r);return a>-1?o[i?e[a]:a]:void 0}},Hn=function(t,e,n,r){for(var o=t.length,i=n+(r?1:-1);r?i--:++i<o;)if(e(t[i],i,t))return i;return-1},Gn=NaN,Jn=/^\s+|\s+$/g,Qn=/^[-+]0x[0-9a-f]+$/i,Xn=/^0b[01]+$/i,Zn=/^0o[0-7]+$/i,tr=parseInt,er=function(t){if("number"==typeof t)return t;if(yn(t))return Gn;if(G(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=G(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(Jn,"");var n=Xn.test(t);return n||Zn.test(t)?tr(t.slice(2),n?2:8):Qn.test(t)?Gn:+t},nr=1/0,rr=1.7976931348623157e308,or=function(t){return t?(t=er(t))===nr||t===-nr?(0>t?-1:1)*rr:t===t?t:0:0===t?t:0},ir=function(t){var e=or(t),n=e%1;return e===e?n?e-n:e:0},ar=Math.max,ur=Yn(function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var o=null==n?0:ir(n);return 0>o&&(o=ar(r+o,0)),Hn(t,Wn(e,3),o)}),cr=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},sr=Object.assign||function(t){for(var e=1;arguments.length>e;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},fr=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)},pr=function(t,e){var n={};for(var r in t)0>e.indexOf(r)&&Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n},lr=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e},hr=function(t){function r(){var e,n,o;cr(this,r);for(var i=arguments.length,a=Array(i),u=0;i>u;u++)a[u]=arguments[u];return e=n=lr(this,t.call.apply(t,[this].concat(a))),n.handleOnClick=function(t){var e=n.chart_instance,r=n.props,o=r.getDatasetAtEvent,i=r.getElementAtEvent,a=r.getElementsAtEvent,u=r.onElementsClick;o&&o(e.getDatasetAtEvent(t),t),i&&i(e.getElementAtEvent(t),t),a&&a(e.getElementsAtEvent(t),t),u&&u(e.getElementsAtEvent(t),t)},n.ref=function(t){n.element=t},o=e,lr(n,o)}return fr(r,t),r.prototype.componentWillMount=function(){this.chart_instance=void 0},r.prototype.componentDidMount=function(){this.renderChart()},r.prototype.componentDidUpdate=function(){if(this.props.redraw)return this.chart_instance.destroy(),void this.renderChart();this.updateChart()},r.prototype.shouldComponentUpdate=function(t){var e=this.props,n=e.type,r=e.options,o=e.plugins,i=e.legend,a=e.height,u=e.width;if(!0===t.redraw)return!0;if(a!==t.height||u!==t.width)return!0;if(n!==t.type)return!0;if(!on(i,t.legend))return!0;if(!on(r,t.options))return!0;var c=this.transformDataProp(t);return!on(this.shadowDataProp,c)||!on(o,t.plugins)},r.prototype.componentWillUnmount=function(){this.chart_instance.destroy()},r.prototype.transformDataProp=function(t){var e=t.data;return"function"==typeof e?e(this.element):e},r.prototype.memoizeDataProps=function(){if(this.props.data){var t=this.transformDataProp(this.props);return this.shadowDataProp=sr({},t,{datasets:t.datasets&&t.datasets.map(function(t){return sr({},t)})}),t}},r.prototype.updateChart=function(){var t=this,e=this.props.options,r=this.memoizeDataProps(this.props);if(this.chart_instance){e&&(this.chart_instance.options=n.helpers.configMerge(this.chart_instance.options,e));for(var o=this.chart_instance.config.data&&this.chart_instance.config.data.datasets||[],i=r.datasets||[],a=o.map(this.props.datasetKeyProvider),u=i.map(this.props.datasetKeyProvider),c=i.filter(function(e){return-1===a.indexOf(t.props.datasetKeyProvider(e))}),s=o.length-1;s>=0;s-=1)!function(e){var n=t.props.datasetKeyProvider(o[e]);if(-1===u.indexOf(n))o.splice(e,1);else{var r=ur(i,function(e){return t.props.datasetKeyProvider(e)===n});if(r){o[e].data.splice(r.data.length),r.data.forEach(function(t,n){o[e].data[n]=r.data[n]});var a=pr(r,["data"]);o[e]=sr({data:o[e].data},o[e],a)}}}(s);c.forEach(function(t){return o.push(t)});var f=pr(r,["datasets"]);this.chart_instance.config.data=sr({},this.chart_instance.config.data,f),this.chart_instance.update()}},r.prototype.renderChart=function(){var t=this.props,e=t.options,o=t.legend,i=t.type,a=t.plugins,u=this.element,c=this.memoizeDataProps();void 0===o||on(r.defaultProps.legend,o)||(e.legend=o),this.chart_instance=new n(u,{type:i,data:c,options:e,plugins:a})},r.prototype.render=function(){var t=this.props,n=t.height,r=t.width;return e.createElement("canvas",{ref:this.ref,height:n,width:r,onClick:this.handleOnClick})},r}(e.Component);hr.getLabelAsKey=function(t){return t.label},hr.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,e,r){if(!n.controllers[t[e]])return Error("Invalid chart type `"+t[e]+"` supplied to `"+r+"`.")},width:S.number,datasetKeyProvider:S.func},hr.defaultProps={legend:{display:!0,position:"bottom"},type:"doughnut",height:150,width:300,redraw:!1,options:{},datasetKeyProvider:hr.getLabelAsKey};var yr=function(t){function n(){return cr(this,n),lr(this,t.apply(this,arguments))}return fr(n,t),n.prototype.render=function(){var t=this;return e.createElement(hr,sr({},this.props,{ref:function(e){return t.chart_instance=e&&e.chart_instance},type:"doughnut"}))},n}(e.Component),dr=function(t){function n(){return cr(this,n),lr(this,t.apply(this,arguments))}return fr(n,t),n.prototype.render=function(){var t=this;return e.createElement(hr,sr({},this.props,{ref:function(e){return t.chart_instance=e&&e.chart_instance},type:"pie"}))},n}(e.Component),vr=function(t){function n(){return cr(this,n),lr(this,t.apply(this,arguments))}return fr(n,t),n.prototype.render=function(){var t=this;return e.createElement(hr,sr({},this.props,{ref:function(e){return t.chart_instance=e&&e.chart_instance},type:"line"}))},n}(e.Component),br=function(t){function n(){return cr(this,n),lr(this,t.apply(this,arguments))}return fr(n,t),n.prototype.render=function(){var t=this;return e.createElement(hr,sr({},this.props,{ref:function(e){return t.chart_instance=e&&e.chart_instance},type:"bar"}))},n}(e.Component),_r=function(t){function n(){return cr(this,n),lr(this,t.apply(this,arguments))}return fr(n,t),n.prototype.render=function(){var t=this;return e.createElement(hr,sr({},this.props,{ref:function(e){return t.chart_instance=e&&e.chart_instance},type:"horizontalBar"}))},n}(e.Component),gr=function(t){function n(){return cr(this,n),lr(this,t.apply(this,arguments))}return fr(n,t),n.prototype.render=function(){var t=this;return e.createElement(hr,sr({},this.props,{ref:function(e){return t.chart_instance=e&&e.chart_instance},type:"radar"}))},n}(e.Component),mr=function(t){function n(){return cr(this,n),lr(this,t.apply(this,arguments))}return fr(n,t),n.prototype.render=function(){var t=this;return e.createElement(hr,sr({},this.props,{ref:function(e){return t.chart_instance=e&&e.chart_instance},type:"polarArea"}))},n}(e.Component),jr=function(t){function n(){return cr(this,n),lr(this,t.apply(this,arguments))}return fr(n,t),n.prototype.render=function(){var t=this;return e.createElement(hr,sr({},this.props,{ref:function(e){return t.chart_instance=e&&e.chart_instance},type:"bubble"}))},n}(e.Component),Or=function(t){function n(){return cr(this,n),lr(this,t.apply(this,arguments))}return fr(n,t),n.prototype.render=function(){var t=this;return e.createElement(hr,sr({},this.props,{ref:function(e){return t.chart_instance=e&&e.chart_instance},type:"scatter"}))},n}(e.Component),wr=n.defaults;t.default=hr,t.Doughnut=yr,t.Pie=dr,t.Line=vr,t.Bar=br,t.HorizontalBar=_r,t.Radar=gr,t.Polar=mr,t.Bubble=jr,t.Scatter=Or,t.defaults=wr,t.Chart=n,Object.defineProperty(t,"__esModule",{value:!0})});
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("react"),require("chart.js")):"function"==typeof define&&define.amd?define(["exports","react","chart.js"],e):e(t.ReactChartjs2={},t.React,t.Chart)}(this,function(t,e,n){"use strict";function r(t,e){return e={exports:{}},t(e,e.exports),e.exports}function o(t){return function(){return t}}function i(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function a(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function u(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function c(t){var e=this.__data__=new C(t);this.size=e.size}function s(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new Pt;++e<n;)this.add(t[e])}function f(t,e,n,r,o){return t===e||(null==t||null==e||!ce(t)&&!ce(e)?t!==t&&e!==e:nn(t,e,n,r,f,o))}function p(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError(gn);var n=function(){var r=arguments,o=e?e.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=t.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(p.Cache||Pt),n}function l(t){if("string"==typeof t)return t;if(ee(t))return Pn(t,l)+"";if(yn(t))return Tn?Tn.call(t):"";var e=t+"";return"0"==e&&1/t==-In?"-0":e}e=e&&e.hasOwnProperty("default")?e.default:e,n=n&&n.hasOwnProperty("default")?n.default:n;var h="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},y=function(){};y.thatReturns=o,y.thatReturnsFalse=o(!1),y.thatReturnsTrue=o(!0),y.thatReturnsNull=o(null),y.thatReturnsThis=function(){return this},y.thatReturnsArgument=function(t){return t};var d=y,v=function(t){};"production"!==process.env.NODE_ENV&&(v=function(t){if(void 0===t)throw Error("invariant requires an error message argument")});var b=function(t,e,n,r,o,i,a,u){if(v(e),!t){var c;if(void 0===e)c=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var s=[n,r,o,i,a,u],f=0;(c=Error(e.replace(/%s/g,function(){return s[f++]}))).name="Invariant Violation"}throw c.framesToPop=1,c}},g=d;if("production"!==process.env.NODE_ENV){var _=function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;e>r;r++)n[r-1]=arguments[r];var o=0,i="Warning: "+t.replace(/%s/g,function(){return n[o++]});void 0!==console&&console.error(i);try{throw Error(i)}catch(t){}};g=function(t,e){if(void 0===e)throw Error("`warning(condition, format, ...args)` requires a warning message argument");if(0!==e.indexOf("Failed Composite propType: ")&&!t){for(var n=arguments.length,r=Array(n>2?n-2:0),o=2;n>o;o++)r[o-2]=arguments[o];_.apply(void 0,[e].concat(r))}}}var m=g,j="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";if("production"!==process.env.NODE_ENV)var O=b,w=m,E=j,P={};var I=function(t,e,n,r,o){if("production"!==process.env.NODE_ENV)for(var i in t)if(t.hasOwnProperty(i)){var a;try{O("function"==typeof t[i],"%s: %s type `%s` is invalid; it must be a function, usually from React.PropTypes.",r||"React class",n,i),a=t[i](e,i,r,n,null,E)}catch(t){a=t}if(w(!a||a instanceof Error,"%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",r||"React class",n,i,typeof a),a instanceof Error&&!(a.message in P)){P[a.message]=!0;var u=o?o():"";w(!1,"Failed %s type: %s%s",n,a.message,null!=u?u:"")}}},A=function(t,e){function n(t){var e=t&&(h&&t[h]||t[y]);if("function"==typeof e)return e}function r(t,e){return t===e?0!==t||1/t==1/e:t!==t&&e!==e}function o(t){this.message=t,this.stack=""}function i(t){function n(n,a,u,c,s,f,p){if(c=c||v,f=f||u,p!==j)if(e)b(!1,"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");else if("production"!==process.env.NODE_ENV&&void 0!==console){var l=c+":"+u;!r[l]&&3>i&&(m(!1,"You are manually calling a React.PropTypes validation function for the `%s` prop on `%s`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details.",f,c),r[l]=!0,i++)}return null==a[u]?n?new o(null===a[u]?"The "+s+" `"+f+"` is marked as required in `"+c+"`, but its value is `null`.":"The "+s+" `"+f+"` is marked as required in `"+c+"`, but its value is `undefined`."):null:t(a,u,c,s,f)}if("production"!==process.env.NODE_ENV)var r={},i=0;var a=n.bind(null,!1);return a.isRequired=n.bind(null,!0),a}function a(t){return i(function(e,n,r,i,a,u){var c=e[n];return s(c)!==t?new o("Invalid "+i+" `"+a+"` of type `"+f(c)+"` supplied to `"+r+"`, expected `"+t+"`."):null})}function u(e){switch(typeof e){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(u);if(null===e||t(e))return!0;var r=n(e);if(!r)return!1;var o,i=r.call(e);if(r!==e.entries){for(;!(o=i.next()).done;)if(!u(o.value))return!1}else for(;!(o=i.next()).done;){var a=o.value;if(a&&!u(a[1]))return!1}return!0;default:return!1}}function c(t,e){return"symbol"===t||("Symbol"===e["@@toStringTag"]||"function"==typeof Symbol&&e instanceof Symbol)}function s(t){var e=typeof t;return Array.isArray(t)?"array":t instanceof RegExp?"object":c(e,t)?"symbol":e}function f(t){if(void 0===t||null===t)return""+t;var e=s(t);if("object"===e){if(t instanceof Date)return"date";if(t instanceof RegExp)return"regexp"}return e}function p(t){var e=f(t);switch(e){case"array":case"object":return"an "+e;case"boolean":case"date":case"regexp":return"a "+e;default:return e}}function l(t){return t.constructor&&t.constructor.name?t.constructor.name:v}var h="function"==typeof Symbol&&Symbol.iterator,y="@@iterator",v="<<anonymous>>",g={array:a("array"),bool:a("boolean"),func:a("function"),number:a("number"),object:a("object"),string:a("string"),symbol:a("symbol"),any:i(d.thatReturnsNull),arrayOf:function(t){return i(function(e,n,r,i,a){if("function"!=typeof t)return new o("Property `"+a+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var u=e[n];if(!Array.isArray(u))return new o("Invalid "+i+" `"+a+"` of type `"+s(u)+"` supplied to `"+r+"`, expected an array.");for(var c=0;u.length>c;c++){var f=t(u,c,r,i,a+"["+c+"]",j);if(f instanceof Error)return f}return null})},element:function(){return i(function(e,n,r,i,a){var u=e[n];return t(u)?null:new o("Invalid "+i+" `"+a+"` of type `"+s(u)+"` supplied to `"+r+"`, expected a single ReactElement.")})}(),instanceOf:function(t){return i(function(e,n,r,i,a){if(!(e[n]instanceof t)){var u=t.name||v;return new o("Invalid "+i+" `"+a+"` of type `"+l(e[n])+"` supplied to `"+r+"`, expected instance of `"+u+"`.")}return null})},node:function(){return i(function(t,e,n,r,i){return u(t[e])?null:new o("Invalid "+r+" `"+i+"` supplied to `"+n+"`, expected a ReactNode.")})}(),objectOf:function(t){return i(function(e,n,r,i,a){if("function"!=typeof t)return new o("Property `"+a+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var u=e[n],c=s(u);if("object"!==c)return new o("Invalid "+i+" `"+a+"` of type `"+c+"` supplied to `"+r+"`, expected an object.");for(var f in u)if(u.hasOwnProperty(f)){var p=t(u,f,r,i,a+"."+f,j);if(p instanceof Error)return p}return null})},oneOf:function(t){return Array.isArray(t)?i(function(e,n,i,a,u){for(var c=e[n],s=0;t.length>s;s++)if(r(c,t[s]))return null;return new o("Invalid "+a+" `"+u+"` of value `"+c+"` supplied to `"+i+"`, expected one of "+JSON.stringify(t)+".")}):("production"!==process.env.NODE_ENV&&m(!1,"Invalid argument supplied to oneOf, expected an instance of array."),d.thatReturnsNull)},oneOfType:function(t){if(!Array.isArray(t))return"production"!==process.env.NODE_ENV&&m(!1,"Invalid argument supplied to oneOfType, expected an instance of array."),d.thatReturnsNull;for(var e=0;t.length>e;e++){var n=t[e];if("function"!=typeof n)return m(!1,"Invalid argument supplid to oneOfType. Expected an array of check functions, but received %s at index %s.",p(n),e),d.thatReturnsNull}return i(function(e,n,r,i,a){for(var u=0;t.length>u;u++)if(null==(0,t[u])(e,n,r,i,a,j))return null;return new o("Invalid "+i+" `"+a+"` supplied to `"+r+"`.")})},shape:function(t){return i(function(e,n,r,i,a){var u=e[n],c=s(u);if("object"!==c)return new o("Invalid "+i+" `"+a+"` of type `"+c+"` supplied to `"+r+"`, expected `object`.");for(var f in t){var p=t[f];if(p){var l=p(u,f,r,i,a+"."+f,j);if(l)return l}}return null})}};return o.prototype=Error.prototype,g.checkPropTypes=I,g.PropTypes=g,g},T=function(){function t(t,e,n,r,o,i){i!==j&&b(!1,"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")}function e(){return t}t.isRequired=t;var n={array:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e};return n.checkPropTypes=d,n.PropTypes=n,n},x=r(function(t){if("production"!==process.env.NODE_ENV){var e="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103;t.exports=A(function(t){return"object"==typeof t&&null!==t&&t.$$typeof===e},!0)}else t.exports=T()}),S=function(t,e){return t===e||t!==t&&e!==e},R=function(t,e){for(var n=t.length;n--;)if(S(t[n][0],e))return n;return-1},k=Array.prototype.splice;i.prototype.clear=function(){this.__data__=[],this.size=0},i.prototype.delete=function(t){var e=this.__data__,n=R(e,t);return n>=0&&(n==e.length-1?e.pop():k.call(e,n,1),--this.size,!0)},i.prototype.get=function(t){var e=this.__data__,n=R(e,t);return 0>n?void 0:e[n][1]},i.prototype.has=function(t){return R(this.__data__,t)>-1},i.prototype.set=function(t,e){var n=this.__data__,r=R(n,t);return 0>r?(++this.size,n.push([t,e])):n[r][1]=e,this};var C=i,D="object"==typeof h&&h&&h.Object===Object&&h,N="object"==typeof self&&self&&self.Object===Object&&self,z=D||N||Function("return this")(),$=z.Symbol,M=Object.prototype,V=M.hasOwnProperty,F=M.toString,B=$?$.toStringTag:void 0,U=function(t){var e=V.call(t,B),n=t[B];try{t[B]=void 0;var r=!0}catch(t){}var o=F.call(t);return r&&(e?t[B]=n:delete t[B]),o},q=Object.prototype.toString,L=function(t){return q.call(t)},W="[object Null]",K="[object Undefined]",Y=$?$.toStringTag:void 0,H=function(t){return null==t?void 0===t?K:W:Y&&Y in Object(t)?U(t):L(t)},G=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)},J="[object AsyncFunction]",Q="[object Function]",X="[object GeneratorFunction]",Z="[object Proxy]",tt=function(t){if(!G(t))return!1;var e=H(t);return e==Q||e==X||e==J||e==Z},et=z["__core-js_shared__"],nt=function(){var t=/[^.]+$/.exec(et&&et.keys&&et.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),rt=function(t){return!!nt&&nt in t},ot=Function.prototype.toString,it=function(t){if(null!=t){try{return ot.call(t)}catch(t){}try{return t+""}catch(t){}}return""},at=/[\\^$.*+?()[\]{}|]/g,ut=/^\[object .+?Constructor\]$/,ct=Function.prototype,st=Object.prototype,ft=ct.toString,pt=st.hasOwnProperty,lt=RegExp("^"+ft.call(pt).replace(at,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ht=function(t){return!(!G(t)||rt(t))&&(tt(t)?lt:ut).test(it(t))},yt=function(t,e){return null==t?void 0:t[e]},dt=function(t,e){var n=yt(t,e);return ht(n)?n:void 0},vt=dt(z,"Map"),bt=dt(Object,"create"),gt="__lodash_hash_undefined__",_t=Object.prototype.hasOwnProperty,mt=Object.prototype.hasOwnProperty,jt="__lodash_hash_undefined__";a.prototype.clear=function(){this.__data__=bt?bt(null):{},this.size=0},a.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},a.prototype.get=function(t){var e=this.__data__;if(bt){var n=e[t];return n===gt?void 0:n}return _t.call(e,t)?e[t]:void 0},a.prototype.has=function(t){var e=this.__data__;return bt?void 0!==e[t]:mt.call(e,t)},a.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=bt&&void 0===e?jt:e,this};var Ot=a,wt=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t},Et=function(t,e){var n=t.__data__;return wt(e)?n["string"==typeof e?"string":"hash"]:n.map};u.prototype.clear=function(){this.size=0,this.__data__={hash:new Ot,map:new(vt||C),string:new Ot}},u.prototype.delete=function(t){var e=Et(this,t).delete(t);return this.size-=e?1:0,e},u.prototype.get=function(t){return Et(this,t).get(t)},u.prototype.has=function(t){return Et(this,t).has(t)},u.prototype.set=function(t,e){var n=Et(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};var Pt=u,It=200;c.prototype.clear=function(){this.__data__=new C,this.size=0},c.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},c.prototype.get=function(t){return this.__data__.get(t)},c.prototype.has=function(t){return this.__data__.has(t)},c.prototype.set=function(t,e){var n=this.__data__;if(n instanceof C){var r=n.__data__;if(!vt||It-1>r.length)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new Pt(r)}return n.set(t,e),this.size=n.size,this};var At=c,Tt="__lodash_hash_undefined__";s.prototype.add=s.prototype.push=function(t){return this.__data__.set(t,Tt),this},s.prototype.has=function(t){return this.__data__.has(t)};var xt=s,St=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1},Rt=function(t,e){return t.has(e)},kt=1,Ct=2,Dt=function(t,e,n,r,o,i){var a=n&kt,u=t.length,c=e.length;if(!(u==c||a&&c>u))return!1;var s=i.get(t);if(s&&i.get(e))return s==e;var f=-1,p=!0,l=n&Ct?new xt:void 0;for(i.set(t,e),i.set(e,t);++f<u;){var h=t[f],y=e[f];if(r)var d=a?r(y,h,f,e,t,i):r(h,y,f,t,e,i);if(void 0!==d){if(d)continue;p=!1;break}if(l){if(!St(e,function(t,e){if(!Rt(l,e)&&(h===t||o(h,t,n,r,i)))return l.push(e)})){p=!1;break}}else if(h!==y&&!o(h,y,n,r,i)){p=!1;break}}return i.delete(t),i.delete(e),p},Nt=z.Uint8Array,zt=function(t){var e=-1,n=Array(t.size);return t.forEach(function(t,r){n[++e]=[r,t]}),n},$t=function(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=t}),n},Mt=1,Vt=2,Ft="[object Boolean]",Bt="[object Date]",Ut="[object Error]",qt="[object Map]",Lt="[object Number]",Wt="[object RegExp]",Kt="[object Set]",Yt="[object String]",Ht="[object Symbol]",Gt="[object ArrayBuffer]",Jt="[object DataView]",Qt=$?$.prototype:void 0,Xt=Qt?Qt.valueOf:void 0,Zt=function(t,e,n,r,o,i,a){switch(n){case Jt:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case Gt:return!(t.byteLength!=e.byteLength||!i(new Nt(t),new Nt(e)));case Ft:case Bt:case Lt:return S(+t,+e);case Ut:return t.name==e.name&&t.message==e.message;case Wt:case Yt:return t==e+"";case qt:var u=zt;case Kt:var c=r&Mt;if(u||(u=$t),t.size!=e.size&&!c)return!1;var s=a.get(t);if(s)return s==e;r|=Vt,a.set(t,e);var f=Dt(u(t),u(e),r,o,i,a);return a.delete(t),f;case Ht:if(Xt)return Xt.call(t)==Xt.call(e)}return!1},te=function(t,e){for(var n=-1,r=e.length,o=t.length;++n<r;)t[o+n]=e[n];return t},ee=Array.isArray,ne=function(t,e,n){var r=e(t);return ee(t)?r:te(r,n(t))},re=function(t,e){for(var n=-1,r=null==t?0:t.length,o=0,i=[];++n<r;){var a=t[n];e(a,n,t)&&(i[o++]=a)}return i},oe=Object.prototype.propertyIsEnumerable,ie=Object.getOwnPropertySymbols,ae=ie?function(t){return null==t?[]:(t=Object(t),re(ie(t),function(e){return oe.call(t,e)}))}:function(){return[]},ue=function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r},ce=function(t){return null!=t&&"object"==typeof t},se="[object Arguments]",fe=function(t){return ce(t)&&H(t)==se},pe=Object.prototype,le=pe.hasOwnProperty,he=pe.propertyIsEnumerable,ye=fe(function(){return arguments}())?fe:function(t){return ce(t)&&le.call(t,"callee")&&!he.call(t,"callee")},de=function(){return!1},ve=r(function(t,e){var n=e&&!e.nodeType&&e,r=n&&!0&&t&&!t.nodeType&&t,o=r&&r.exports===n?z.Buffer:void 0,i=(o?o.isBuffer:void 0)||de;t.exports=i}),be=9007199254740991,ge=/^(?:0|[1-9]\d*)$/,_e=function(t,e){return!!(e=null==e?be:e)&&("number"==typeof t||ge.test(t))&&t>-1&&t%1==0&&e>t},me=9007199254740991,je=function(t){return"number"==typeof t&&t>-1&&t%1==0&&me>=t},Oe={};Oe["[object Float32Array]"]=Oe["[object Float64Array]"]=Oe["[object Int8Array]"]=Oe["[object Int16Array]"]=Oe["[object Int32Array]"]=Oe["[object Uint8Array]"]=Oe["[object Uint8ClampedArray]"]=Oe["[object Uint16Array]"]=Oe["[object Uint32Array]"]=!0,Oe["[object Arguments]"]=Oe["[object Array]"]=Oe["[object ArrayBuffer]"]=Oe["[object Boolean]"]=Oe["[object DataView]"]=Oe["[object Date]"]=Oe["[object Error]"]=Oe["[object Function]"]=Oe["[object Map]"]=Oe["[object Number]"]=Oe["[object Object]"]=Oe["[object RegExp]"]=Oe["[object Set]"]=Oe["[object String]"]=Oe["[object WeakMap]"]=!1;var we=function(t){return function(e){return t(e)}},Ee=r(function(t,e){var n=e&&!e.nodeType&&e,r=n&&!0&&t&&!t.nodeType&&t,o=r&&r.exports===n&&D.process,i=function(){try{return o&&o.binding&&o.binding("util")}catch(t){}}();t.exports=i}),Pe=Ee&&Ee.isTypedArray,Ie=Pe?we(Pe):function(t){return ce(t)&&je(t.length)&&!!Oe[H(t)]},Ae=Object.prototype.hasOwnProperty,Te=function(t,e){var n=ee(t),r=!n&&ye(t),o=!n&&!r&&ve(t),i=!n&&!r&&!o&&Ie(t),a=n||r||o||i,u=a?ue(t.length,String):[],c=u.length;for(var s in t)!e&&!Ae.call(t,s)||a&&("length"==s||o&&("offset"==s||"parent"==s)||i&&("buffer"==s||"byteLength"==s||"byteOffset"==s)||_e(s,c))||u.push(s);return u},xe=Object.prototype,Se=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||xe)},Re=function(t,e){return function(n){return t(e(n))}}(Object.keys,Object),ke=Object.prototype.hasOwnProperty,Ce=function(t){if(!Se(t))return Re(t);var e=[];for(var n in Object(t))ke.call(t,n)&&"constructor"!=n&&e.push(n);return e},De=function(t){return null!=t&&je(t.length)&&!tt(t)},Ne=function(t){return De(t)?Te(t):Ce(t)},ze=function(t){return ne(t,Ne,ae)},$e=1,Me=Object.prototype.hasOwnProperty,Ve=function(t,e,n,r,o,i){var a=n&$e,u=ze(t),c=u.length;if(c!=ze(e).length&&!a)return!1;for(var s=c;s--;){var f=u[s];if(!(a?f in e:Me.call(e,f)))return!1}var p=i.get(t);if(p&&i.get(e))return p==e;var l=!0;i.set(t,e),i.set(e,t);for(var h=a;++s<c;){var y=t[f=u[s]],d=e[f];if(r)var v=a?r(d,y,f,e,t,i):r(y,d,f,t,e,i);if(!(void 0===v?y===d||o(y,d,n,r,i):v)){l=!1;break}h||(h="constructor"==f)}if(l&&!h){var b=t.constructor,g=e.constructor;b!=g&&"constructor"in t&&"constructor"in e&&!("function"==typeof b&&b instanceof b&&"function"==typeof g&&g instanceof g)&&(l=!1)}return i.delete(t),i.delete(e),l},Fe=dt(z,"DataView"),Be=dt(z,"Promise"),Ue=dt(z,"Set"),qe=dt(z,"WeakMap"),Le=it(Fe),We=it(vt),Ke=it(Be),Ye=it(Ue),He=it(qe),Ge=H;(Fe&&"[object DataView]"!=Ge(new Fe(new ArrayBuffer(1)))||vt&&"[object Map]"!=Ge(new vt)||Be&&"[object Promise]"!=Ge(Be.resolve())||Ue&&"[object Set]"!=Ge(new Ue)||qe&&"[object WeakMap]"!=Ge(new qe))&&(Ge=function(t){var e=H(t),n="[object Object]"==e?t.constructor:void 0,r=n?it(n):"";if(r)switch(r){case Le:return"[object DataView]";case We:return"[object Map]";case Ke:return"[object Promise]";case Ye:return"[object Set]";case He:return"[object WeakMap]"}return e});var Je=Ge,Qe=1,Xe="[object Arguments]",Ze="[object Array]",tn="[object Object]",en=Object.prototype.hasOwnProperty,nn=function(t,e,n,r,o,i){var a=ee(t),u=ee(e),c=a?Ze:Je(t),s=u?Ze:Je(e),f=(c=c==Xe?tn:c)==tn,p=(s=s==Xe?tn:s)==tn,l=c==s;if(l&&ve(t)){if(!ve(e))return!1;a=!0,f=!1}if(l&&!f)return i||(i=new At),a||Ie(t)?Dt(t,e,n,r,o,i):Zt(t,e,c,n,r,o,i);if(!(n&Qe)){var h=f&&en.call(t,"__wrapped__"),y=p&&en.call(e,"__wrapped__");if(h||y){var d=h?t.value():t,v=y?e.value():e;return i||(i=new At),o(d,v,n,r,i)}}return!!l&&(i||(i=new At),Ve(t,e,n,r,o,i))},rn=f,on=function(t,e){return rn(t,e)},an=1,un=2,cn=function(t,e,n,r){var o=n.length,i=o,a=!r;if(null==t)return!i;for(t=Object(t);o--;){var u=n[o];if(a&&u[2]?u[1]!==t[u[0]]:!(u[0]in t))return!1}for(;++o<i;){var c=(u=n[o])[0],s=t[c],f=u[1];if(a&&u[2]){if(void 0===s&&!(c in t))return!1}else{var p=new At;if(r)var l=r(s,f,c,t,e,p);if(!(void 0===l?rn(f,s,an|un,r,p):l))return!1}}return!0},sn=function(t){return t===t&&!G(t)},fn=function(t){for(var e=Ne(t),n=e.length;n--;){var r=e[n],o=t[r];e[n]=[r,o,sn(o)]}return e},pn=function(t,e){return function(n){return null!=n&&n[t]===e&&(void 0!==e||t in Object(n))}},ln=function(t){var e=fn(t);return 1==e.length&&e[0][2]?pn(e[0][0],e[0][1]):function(n){return n===t||cn(n,t,e)}},hn="[object Symbol]",yn=function(t){return"symbol"==typeof t||ce(t)&&H(t)==hn},dn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,vn=/^\w*$/,bn=function(t,e){if(ee(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!yn(t))||vn.test(t)||!dn.test(t)||null!=e&&t in Object(e)},gn="Expected a function";p.Cache=Pt;var _n=p,mn=500,jn=/^\./,On=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,wn=/\\(\\)?/g,En=function(t){var e=_n(t,function(t){return n.size===mn&&n.clear(),t}),n=e.cache;return e}(function(t){var e=[];return jn.test(t)&&e.push(""),t.replace(On,function(t,n,r,o){e.push(r?o.replace(wn,"$1"):n||t)}),e}),Pn=function(t,e){for(var n=-1,r=null==t?0:t.length,o=Array(r);++n<r;)o[n]=e(t[n],n,t);return o},In=1/0,An=$?$.prototype:void 0,Tn=An?An.toString:void 0,xn=l,Sn=function(t){return null==t?"":xn(t)},Rn=function(t,e){return ee(t)?t:bn(t,e)?[t]:En(Sn(t))},kn=1/0,Cn=function(t){if("string"==typeof t||yn(t))return t;var e=t+"";return"0"==e&&1/t==-kn?"-0":e},Dn=function(t,e){for(var n=0,r=(e=Rn(e,t)).length;null!=t&&r>n;)t=t[Cn(e[n++])];return n&&n==r?t:void 0},Nn=function(t,e,n){var r=null==t?void 0:Dn(t,e);return void 0===r?n:r},zn=function(t,e){return null!=t&&e in Object(t)},$n=function(t,e,n){for(var r=-1,o=(e=Rn(e,t)).length,i=!1;++r<o;){var a=Cn(e[r]);if(!(i=null!=t&&n(t,a)))break;t=t[a]}return i||++r!=o?i:!!(o=null==t?0:t.length)&&je(o)&&_e(a,o)&&(ee(t)||ye(t))},Mn=function(t,e){return null!=t&&$n(t,e,zn)},Vn=1,Fn=2,Bn=function(t,e){return bn(t)&&sn(e)?pn(Cn(t),e):function(n){var r=Nn(n,t);return void 0===r&&r===e?Mn(n,t):rn(e,r,Vn|Fn)}},Un=function(t){return t},qn=function(t){return function(e){return null==e?void 0:e[t]}},Ln=function(t){return function(e){return Dn(e,t)}},Wn=function(t){return bn(t)?qn(Cn(t)):Ln(t)},Kn=function(t){return"function"==typeof t?t:null==t?Un:"object"==typeof t?ee(t)?Bn(t[0],t[1]):ln(t):Wn(t)},Yn=function(t){return function(e,n,r){var o=Object(e);if(!De(e)){var i=Kn(n,3);e=Ne(e),n=function(t){return i(o[t],t,o)}}var a=t(e,n,r);return a>-1?o[i?e[a]:a]:void 0}},Hn=function(t,e,n,r){for(var o=t.length,i=n+(r?1:-1);r?i--:++i<o;)if(e(t[i],i,t))return i;return-1},Gn=NaN,Jn=/^\s+|\s+$/g,Qn=/^[-+]0x[0-9a-f]+$/i,Xn=/^0b[01]+$/i,Zn=/^0o[0-7]+$/i,tr=parseInt,er=function(t){if("number"==typeof t)return t;if(yn(t))return Gn;if(G(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=G(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(Jn,"");var n=Xn.test(t);return n||Zn.test(t)?tr(t.slice(2),n?2:8):Qn.test(t)?Gn:+t},nr=1/0,rr=1.7976931348623157e308,or=function(t){return t?(t=er(t))===nr||t===-nr?(0>t?-1:1)*rr:t===t?t:0:0===t?t:0},ir=function(t){var e=or(t),n=e%1;return e===e?n?e-n:e:0},ar=Math.max,ur=(Yn(function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var o=null==n?0:ir(n);return 0>o&&(o=ar(r+o,0)),Hn(t,Kn(e,3),o)}),function(){try{var t=dt(Object,"defineProperty");return t({},"",{}),t}catch(t){}}()),cr=function(t,e,n){"__proto__"==e&&ur?ur(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n},sr=function(t,e,n,r){for(var o=-1,i=null==t?0:t.length;++o<i;){var a=t[o];e(r,a,n(a),t)}return r},fr=function(t){return function(e,n,r){for(var o=-1,i=Object(e),a=r(e),u=a.length;u--;){var c=a[t?u:++o];if(!1===n(i[c],c,i))break}return e}}(),pr=function(t,e){return function(n,r){if(null==n)return n;if(!De(n))return t(n,r);for(var o=n.length,i=e?o:-1,a=Object(n);(e?i--:++i<o)&&!1!==r(a[i],i,a););return n}}(function(t,e){return t&&fr(t,e,Ne)}),lr=function(t,e,n,r){return pr(t,function(t,o,i){e(r,t,n(t),i)}),r},hr=function(t,e){return function(n,r){var o=ee(n)?sr:lr,i=e?e():{};return o(n,t,Kn(r,2),i)}}(function(t,e,n){cr(t,n,e)}),yr=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},dr=Object.assign||function(t){for(var e=1;arguments.length>e;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},vr=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)},br=function(t,e){var n={};for(var r in t)0>e.indexOf(r)&&Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n},gr=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e},_r=function(t){function r(){var e,n,o;yr(this,r);for(var i=arguments.length,a=Array(i),u=0;i>u;u++)a[u]=arguments[u];return e=n=gr(this,t.call.apply(t,[this].concat(a))),n.handleOnClick=function(t){var e=n.chartInstance,r=n.props,o=r.getDatasetAtEvent,i=r.getElementAtEvent,a=r.getElementsAtEvent,u=r.onElementsClick;o&&o(e.getDatasetAtEvent(t),t),i&&i(e.getElementAtEvent(t),t),a&&a(e.getElementsAtEvent(t),t),u&&u(e.getElementsAtEvent(t),t)},n.ref=function(t){n.element=t},o=e,gr(n,o)}return vr(r,t),r.prototype.componentWillMount=function(){this.chartInstance=void 0},r.prototype.componentDidMount=function(){this.renderChart()},r.prototype.componentDidUpdate=function(){if(this.props.redraw)return this.chartInstance.destroy(),void this.renderChart();this.updateChart()},r.prototype.shouldComponentUpdate=function(t){var e=this.props,n=e.type,r=e.options,o=e.plugins,i=e.legend,a=e.height,u=e.width;if(!0===t.redraw)return!0;if(a!==t.height||u!==t.width)return!0;if(n!==t.type)return!0;if(!on(i,t.legend))return!0;if(!on(r,t.options))return!0;var c=this.transformDataProp(t);return!on(this.shadowDataProp,c)||!on(o,t.plugins)},r.prototype.componentWillUnmount=function(){this.chartInstance.destroy()},r.prototype.transformDataProp=function(t){var e=t.data;return"function"==typeof e?e(this.element):e},r.prototype.memoizeDataProps=function(){if(this.props.data){var t=this.transformDataProp(this.props);return this.shadowDataProp=dr({},t,{datasets:t.datasets&&t.datasets.map(function(t){return dr({},t)})}),t}},r.prototype.updateChart=function(){var t=this,e=this.props.options,r=this.memoizeDataProps(this.props);if(this.chartInstance){e&&(this.chartInstance.options=n.helpers.configMerge(this.chartInstance.options,e));var o=this.chartInstance.config.data&&this.chartInstance.config.data.datasets||[],i=r.datasets||[],a=hr(o,this.props.datasetKeyProvider);this.chartInstance.config.data.datasets=i.map(function(e){var n=a[t.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 r=br(e,["data"]);return dr({},n,r)}return e});var u=br(r,["datasets"]);this.chartInstance.config.data=dr({},this.chartInstance.config.data,u),this.chartInstance.update()}},r.prototype.renderChart=function(){var t=this.props,e=t.options,o=t.legend,i=t.type,a=t.plugins,u=this.element,c=this.memoizeDataProps();void 0===o||on(r.defaultProps.legend,o)||(e.legend=o),this.chartInstance=new n(u,{type:i,data:c,options:e,plugins:a})},r.prototype.render=function(){var t=this.props,n=t.height,r=t.width;return e.createElement("canvas",{ref:this.ref,height:n,width:r,onClick:this.handleOnClick})},r}(e.Component);_r.getLabelAsKey=function(t){return t.label},_r.propTypes={data:x.oneOfType([x.object,x.func]).isRequired,getDatasetAtEvent:x.func,getElementAtEvent:x.func,getElementsAtEvent:x.func,height:x.number,legend:x.object,onElementsClick:x.func,options:x.object,plugins:x.arrayOf(x.object),redraw:x.bool,type:function(t,e,r){if(!n.controllers[t[e]])return Error("Invalid chart type `"+t[e]+"` supplied to `"+r+"`.")},width:x.number,datasetKeyProvider:x.func},_r.defaultProps={legend:{display:!0,position:"bottom"},type:"doughnut",height:150,width:300,redraw:!1,options:{},datasetKeyProvider:_r.getLabelAsKey};var mr=function(t){function n(){return yr(this,n),gr(this,t.apply(this,arguments))}return vr(n,t),n.prototype.render=function(){var t=this;return e.createElement(_r,dr({},this.props,{ref:function(e){return t.chartInstance=e&&e.chartInstance},type:"doughnut"}))},n}(e.Component),jr=function(t){function n(){return yr(this,n),gr(this,t.apply(this,arguments))}return vr(n,t),n.prototype.render=function(){var t=this;return e.createElement(_r,dr({},this.props,{ref:function(e){return t.chartInstance=e&&e.chartInstance},type:"pie"}))},n}(e.Component),Or=function(t){function n(){return yr(this,n),gr(this,t.apply(this,arguments))}return vr(n,t),n.prototype.render=function(){var t=this;return e.createElement(_r,dr({},this.props,{ref:function(e){return t.chartInstance=e&&e.chartInstance},type:"line"}))},n}(e.Component),wr=function(t){function n(){return yr(this,n),gr(this,t.apply(this,arguments))}return vr(n,t),n.prototype.render=function(){var t=this;return e.createElement(_r,dr({},this.props,{ref:function(e){return t.chartInstance=e&&e.chartInstance},type:"bar"}))},n}(e.Component),Er=function(t){function n(){return yr(this,n),gr(this,t.apply(this,arguments))}return vr(n,t),n.prototype.render=function(){var t=this;return e.createElement(_r,dr({},this.props,{ref:function(e){return t.chartInstance=e&&e.chartInstance},type:"horizontalBar"}))},n}(e.Component),Pr=function(t){function n(){return yr(this,n),gr(this,t.apply(this,arguments))}return vr(n,t),n.prototype.render=function(){var t=this;return e.createElement(_r,dr({},this.props,{ref:function(e){return t.chartInstance=e&&e.chartInstance},type:"radar"}))},n}(e.Component),Ir=function(t){function n(){return yr(this,n),gr(this,t.apply(this,arguments))}return vr(n,t),n.prototype.render=function(){var t=this;return e.createElement(_r,dr({},this.props,{ref:function(e){return t.chartInstance=e&&e.chartInstance},type:"polarArea"}))},n}(e.Component),Ar=function(t){function n(){return yr(this,n),gr(this,t.apply(this,arguments))}return vr(n,t),n.prototype.render=function(){var t=this;return e.createElement(_r,dr({},this.props,{ref:function(e){return t.chartInstance=e&&e.chartInstance},type:"bubble"}))},n}(e.Component),Tr=function(t){function n(){return yr(this,n),gr(this,t.apply(this,arguments))}return vr(n,t),n.prototype.render=function(){var t=this;return e.createElement(_r,dr({},this.props,{ref:function(e){return t.chartInstance=e&&e.chartInstance},type:"scatter"}))},n}(e.Component),xr=n.defaults;t.default=_r,t.Doughnut=mr,t.Pie=jr,t.Line=Or,t.Bar=wr,t.HorizontalBar=Er,t.Radar=Pr,t.Polar=Ir,t.Bubble=Ar,t.Scatter=Tr,t.defaults=xr,t.Chart=n,Object.defineProperty(t,"__esModule",{value:!0})});

@@ -16,2 +16,3 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };

import find from 'lodash/find';
import keyBy from 'lodash/keyBy';

@@ -31,3 +32,3 @@ var ChartComponent = function (_React$Component) {

return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.handleOnClick = function (event) {
var instance = _this.chart_instance;
var instance = _this.chartInstance;

@@ -51,3 +52,3 @@ var _this$props = _this.props,

ChartComponent.prototype.componentWillMount = function componentWillMount() {
this.chart_instance = undefined;
this.chartInstance = undefined;
};

@@ -61,3 +62,3 @@

if (this.props.redraw) {
this.chart_instance.destroy();
this.chartInstance.destroy();
this.renderChart();

@@ -111,3 +112,3 @@ return;

ChartComponent.prototype.componentWillUnmount = function componentWillUnmount() {
this.chart_instance.destroy();
this.chartInstance.destroy();
};

@@ -156,6 +157,6 @@

if (!this.chart_instance) return;
if (!this.chartInstance) return;
if (options) {
this.chart_instance.options = Chart.helpers.configMerge(this.chart_instance.options, options);
this.chartInstance.options = Chart.helpers.configMerge(this.chartInstance.options, options);
}

@@ -165,46 +166,29 @@

// seamless transitions
var currentDatasets = this.chart_instance.config.data && this.chart_instance.config.data.datasets || [];
var currentDatasets = this.chartInstance.config.data && this.chartInstance.config.data.datasets || [];
var nextDatasets = data.datasets || [];
// use the key provider to work out which series have been added/removed/changed
var currentDatasetKeys = currentDatasets.map(this.props.datasetKeyProvider);
var nextDatasetKeys = nextDatasets.map(this.props.datasetKeyProvider);
var newDatasets = nextDatasets.filter(function (d) {
return currentDatasetKeys.indexOf(_this2.props.datasetKeyProvider(d)) === -1;
});
var currentDatasetsIndexed = keyBy(currentDatasets, this.props.datasetKeyProvider);
// process the updates (via a reverse for loop so we can safely splice deleted datasets out of the array
var _loop = function _loop(idx) {
var currentDatasetKey = _this2.props.datasetKeyProvider(currentDatasets[idx]);
if (nextDatasetKeys.indexOf(currentDatasetKey) === -1) {
// deleted series
currentDatasets.splice(idx, 1);
} else {
var retainedDataset = find(nextDatasets, function (d) {
return _this2.props.datasetKeyProvider(d) === currentDatasetKey;
// We can safely replace the dataset array, as long as we retain the _meta property
// on each dataset.
this.chartInstance.config.data.datasets = nextDatasets.map(function (next) {
var current = currentDatasetsIndexed[_this2.props.datasetKeyProvider(next)];
if (current && current.type === next.type) {
// The data array must be edited in place. As chart.js adds listeners to it.
current.data.splice(next.data.length);
next.data.forEach(function (point, pid) {
current.data[pid] = next.data[pid];
});
if (retainedDataset) {
// update it in place if it is a retained dataset
currentDatasets[idx].data.splice(retainedDataset.data.length);
retainedDataset.data.forEach(function (point, pid) {
currentDatasets[idx].data[pid] = retainedDataset.data[pid];
});
var _data = retainedDataset.data,
otherProps = _objectWithoutProperties(retainedDataset, ['data']);
var _data = next.data,
otherProps = _objectWithoutProperties(next, ['data']);
// Merge properties. Notice a weakness here. If a property is removed
// from next, it will be retained by current and never disappears.
// Workaround is to set value to null or undefined in next.
currentDatasets[idx] = _extends({
data: currentDatasets[idx].data
}, currentDatasets[idx], otherProps);
}
return _extends({}, current, otherProps);
} else {
return next;
}
};
for (var idx = currentDatasets.length - 1; idx >= 0; idx -= 1) {
_loop(idx);
}
// finally add any new series
newDatasets.forEach(function (d) {
return currentDatasets.push(d);
});

@@ -215,5 +199,5 @@

this.chart_instance.config.data = _extends({}, this.chart_instance.config.data, rest);
this.chartInstance.config.data = _extends({}, this.chartInstance.config.data, rest);
this.chart_instance.update();
this.chartInstance.update();
};

@@ -236,3 +220,3 @@

this.chart_instance = new Chart(node, {
this.chartInstance = new Chart(node, {
type: type,

@@ -316,3 +300,3 @@ data: data,

ref: function ref(_ref) {
return _this4.chart_instance = _ref && _ref.chart_instance;
return _this4.chartInstance = _ref && _ref.chartInstance;
},

@@ -340,3 +324,3 @@ type: 'doughnut'

ref: function ref(_ref2) {
return _this6.chart_instance = _ref2 && _ref2.chart_instance;
return _this6.chartInstance = _ref2 && _ref2.chartInstance;
},

@@ -364,3 +348,3 @@ type: 'pie'

ref: function ref(_ref3) {
return _this8.chart_instance = _ref3 && _ref3.chart_instance;
return _this8.chartInstance = _ref3 && _ref3.chartInstance;
},

@@ -388,3 +372,3 @@ type: 'line'

ref: function ref(_ref4) {
return _this10.chart_instance = _ref4 && _ref4.chart_instance;
return _this10.chartInstance = _ref4 && _ref4.chartInstance;
},

@@ -412,3 +396,3 @@ type: 'bar'

ref: function ref(_ref5) {
return _this12.chart_instance = _ref5 && _ref5.chart_instance;
return _this12.chartInstance = _ref5 && _ref5.chartInstance;
},

@@ -436,3 +420,3 @@ type: 'horizontalBar'

ref: function ref(_ref6) {
return _this14.chart_instance = _ref6 && _ref6.chart_instance;
return _this14.chartInstance = _ref6 && _ref6.chartInstance;
},

@@ -460,3 +444,3 @@ type: 'radar'

ref: function ref(_ref7) {
return _this16.chart_instance = _ref7 && _ref7.chart_instance;
return _this16.chartInstance = _ref7 && _ref7.chartInstance;
},

@@ -484,3 +468,3 @@ type: 'polarArea'

ref: function ref(_ref8) {
return _this18.chart_instance = _ref8 && _ref8.chart_instance;
return _this18.chartInstance = _ref8 && _ref8.chartInstance;
},

@@ -508,3 +492,3 @@ type: 'bubble'

ref: function ref(_ref9) {
return _this20.chart_instance = _ref9 && _ref9.chart_instance;
return _this20.chartInstance = _ref9 && _ref9.chartInstance;
},

@@ -511,0 +495,0 @@ type: 'scatter'

@@ -0,0 +0,0 @@ var gulp = require('gulp');

@@ -57,1 +57,3 @@ // Type definitions for react-chartjs-2 2.0

export class Bubble extends ChartComponent<ChartComponentProps> {}
export var defaults: {};

@@ -28,2 +28,6 @@ 'use strict';

var _keyBy = require('lodash/keyBy');
var _keyBy2 = _interopRequireDefault(_keyBy);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -52,3 +56,3 @@

return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.handleOnClick = function (event) {
var instance = _this.chart_instance;
var instance = _this.chartInstance;

@@ -72,3 +76,3 @@ var _this$props = _this.props,

ChartComponent.prototype.componentWillMount = function componentWillMount() {
this.chart_instance = undefined;
this.chartInstance = undefined;
};

@@ -82,3 +86,3 @@

if (this.props.redraw) {
this.chart_instance.destroy();
this.chartInstance.destroy();
this.renderChart();

@@ -132,3 +136,3 @@ return;

ChartComponent.prototype.componentWillUnmount = function componentWillUnmount() {
this.chart_instance.destroy();
this.chartInstance.destroy();
};

@@ -177,6 +181,6 @@

if (!this.chart_instance) return;
if (!this.chartInstance) return;
if (options) {
this.chart_instance.options = _chart2.default.helpers.configMerge(this.chart_instance.options, options);
this.chartInstance.options = _chart2.default.helpers.configMerge(this.chartInstance.options, options);
}

@@ -186,46 +190,29 @@

// seamless transitions
var currentDatasets = this.chart_instance.config.data && this.chart_instance.config.data.datasets || [];
var currentDatasets = this.chartInstance.config.data && this.chartInstance.config.data.datasets || [];
var nextDatasets = data.datasets || [];
// use the key provider to work out which series have been added/removed/changed
var currentDatasetKeys = currentDatasets.map(this.props.datasetKeyProvider);
var nextDatasetKeys = nextDatasets.map(this.props.datasetKeyProvider);
var newDatasets = nextDatasets.filter(function (d) {
return currentDatasetKeys.indexOf(_this2.props.datasetKeyProvider(d)) === -1;
});
var currentDatasetsIndexed = (0, _keyBy2.default)(currentDatasets, this.props.datasetKeyProvider);
// process the updates (via a reverse for loop so we can safely splice deleted datasets out of the array
var _loop = function _loop(idx) {
var currentDatasetKey = _this2.props.datasetKeyProvider(currentDatasets[idx]);
if (nextDatasetKeys.indexOf(currentDatasetKey) === -1) {
// deleted series
currentDatasets.splice(idx, 1);
} else {
var retainedDataset = (0, _find2.default)(nextDatasets, function (d) {
return _this2.props.datasetKeyProvider(d) === currentDatasetKey;
// We can safely replace the dataset array, as long as we retain the _meta property
// on each dataset.
this.chartInstance.config.data.datasets = nextDatasets.map(function (next) {
var current = currentDatasetsIndexed[_this2.props.datasetKeyProvider(next)];
if (current && current.type === next.type) {
// The data array must be edited in place. As chart.js adds listeners to it.
current.data.splice(next.data.length);
next.data.forEach(function (point, pid) {
current.data[pid] = next.data[pid];
});
if (retainedDataset) {
// update it in place if it is a retained dataset
currentDatasets[idx].data.splice(retainedDataset.data.length);
retainedDataset.data.forEach(function (point, pid) {
currentDatasets[idx].data[pid] = retainedDataset.data[pid];
});
var _data = retainedDataset.data,
otherProps = _objectWithoutProperties(retainedDataset, ['data']);
var _data = next.data,
otherProps = _objectWithoutProperties(next, ['data']);
// Merge properties. Notice a weakness here. If a property is removed
// from next, it will be retained by current and never disappears.
// Workaround is to set value to null or undefined in next.
currentDatasets[idx] = _extends({
data: currentDatasets[idx].data
}, currentDatasets[idx], otherProps);
}
return _extends({}, current, otherProps);
} else {
return next;
}
};
for (var idx = currentDatasets.length - 1; idx >= 0; idx -= 1) {
_loop(idx);
}
// finally add any new series
newDatasets.forEach(function (d) {
return currentDatasets.push(d);
});

@@ -236,5 +223,5 @@

this.chart_instance.config.data = _extends({}, this.chart_instance.config.data, rest);
this.chartInstance.config.data = _extends({}, this.chartInstance.config.data, rest);
this.chart_instance.update();
this.chartInstance.update();
};

@@ -257,3 +244,3 @@

this.chart_instance = new _chart2.default(node, {
this.chartInstance = new _chart2.default(node, {
type: type,

@@ -335,3 +322,3 @@ data: data,

ref: function ref(_ref) {
return _this4.chart_instance = _ref && _ref.chart_instance;
return _this4.chartInstance = _ref && _ref.chartInstance;
},

@@ -359,3 +346,3 @@ type: 'doughnut'

ref: function ref(_ref2) {
return _this6.chart_instance = _ref2 && _ref2.chart_instance;
return _this6.chartInstance = _ref2 && _ref2.chartInstance;
},

@@ -383,3 +370,3 @@ type: 'pie'

ref: function ref(_ref3) {
return _this8.chart_instance = _ref3 && _ref3.chart_instance;
return _this8.chartInstance = _ref3 && _ref3.chartInstance;
},

@@ -407,3 +394,3 @@ type: 'line'

ref: function ref(_ref4) {
return _this10.chart_instance = _ref4 && _ref4.chart_instance;
return _this10.chartInstance = _ref4 && _ref4.chartInstance;
},

@@ -431,3 +418,3 @@ type: 'bar'

ref: function ref(_ref5) {
return _this12.chart_instance = _ref5 && _ref5.chart_instance;
return _this12.chartInstance = _ref5 && _ref5.chartInstance;
},

@@ -455,3 +442,3 @@ type: 'horizontalBar'

ref: function ref(_ref6) {
return _this14.chart_instance = _ref6 && _ref6.chart_instance;
return _this14.chartInstance = _ref6 && _ref6.chartInstance;
},

@@ -479,3 +466,3 @@ type: 'radar'

ref: function ref(_ref7) {
return _this16.chart_instance = _ref7 && _ref7.chart_instance;
return _this16.chartInstance = _ref7 && _ref7.chartInstance;
},

@@ -503,3 +490,3 @@ type: 'polarArea'

ref: function ref(_ref8) {
return _this18.chart_instance = _ref8 && _ref8.chart_instance;
return _this18.chartInstance = _ref8 && _ref8.chartInstance;
},

@@ -527,3 +514,3 @@ type: 'bubble'

ref: function ref(_ref9) {
return _this20.chart_instance = _ref9 && _ref9.chart_instance;
return _this20.chartInstance = _ref9 && _ref9.chartInstance;
},

@@ -530,0 +517,0 @@ type: 'scatter'

@@ -0,0 +0,0 @@ The MIT License (MIT)

{
"name": "react-chartjs-2",
"version": "2.6.4",
"version": "2.7.0",
"description": "react-chartjs-2",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -0,0 +0,0 @@ [![build status]( https://img.shields.io/travis/gor181/react-chartjs-2.svg?branch=master&style=flat-square)](https://travis-ci.org/gor181/react-chartjs-2)

@@ -7,2 +7,2 @@ import React from 'react';

import './MixLineBar';
import './UpdatingChart';

@@ -0,0 +0,0 @@ import React from 'react';

@@ -0,0 +0,0 @@ import React from 'react';

@@ -0,0 +0,0 @@ import React from 'react';

@@ -0,0 +0,0 @@ import React from 'react';

@@ -0,0 +0,0 @@ require('babel-register')();

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc