/*! For license information please see dll.DataSampler.js.LICENSE.txt */
(window.webpackJsonp_name_dll=window.webpackJsonp_name_dll||[]).push([[36],{851:function(e,a,t){"use strict";t.r(a);var n=t(14),r=t.n(n),i=t(13),l=t.n(i),s=t(11),o=t.n(s),c=t(15),p=t.n(c),u=t(16),m=t.n(u),d=t(8),f=t.n(d),S=t(7),h=t.n(S),v=t(0),z=t.n(v),b=t(1),g=t.n(b),y=t(104),w=t(149),D=t(204),k=t(1081),R=t.n(k),x=t(1051),C=t.n(x),E=t(46),_=t.n(E),P=t(38),q=t.n(P),J=t(107),N=t.n(J),j=t(205),F=t.n(j),T=t(90),V=t.n(T),W=t(71),A=t.n(W);function B(e){var a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var t,n=f()(e);if(a){var r=f()(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return m()(this,t)}}var G=function(e){p()(t,e);var a=B(t);function t(e){var n;r()(this,t),n=a.call(this,e),h()(o()(n),"handleNumberChange",(function(e){n.setState({sampleSize:e})})),h()(o()(n),"drawSample",(function(){for(var e=C()(0,n.state.nobs,1),a=R()(e,{size:n.state.sampleSize,replace:!1}),t={},r=n.state.originalData,i=0;i<n.state.variables.length;i++){var l=n.state.variables[i];t[l]=r[l].filter((function(e,t){return F()(a,t)}))}var s="".concat(a[0],"-").concat(a[1],"-").concat(a[2]),o=A.a;if(N()(n.props.children))o=n.props.children;else if(q()(n.props.children))for(var c=0;c<n.props.children.length;c++){var p=n.props.children[c];if(N()(p)){o=p;break}}n.setState({children:z.a.createElement("div",{key:s,style:{animation:"roll-in-left 1s"}},o(t))})}));var i=V()(e.data),l=e.data[i[0]].length;return n.state={originalData:e.data,sampleSize:e.sampleSize,originalSampleSize:e.sampleSize,children:null,variables:i,nobs:l},n}return l()(t,[{key:"render",value:function(){return z.a.createElement("div",null,z.a.createElement(w.default,{style:{maxWidth:900}},z.a.createElement(D.default,{legend:"Sample size",defaultValue:this.state.sampleSize,min:this.props.minSampleSize,max:this.props.maxSampleSize||this.state.nobs,step:1,onChange:this.handleNumberChange}),z.a.createElement(y.default,{onClick:this.drawSample},"Draw Sample")),this.state.children)}}],[{key:"getDerivedStateFromProps",value:function(e,a){var t={};if(e.sampleSize!==a.originalSampleSize&&(t.sampleSize=e.sampleSize),e.data!==a.originalData){var n=V()(e.data),r=e.data[n[0]].length;t.nobs=r,t.variables=n,t.originalData=e.data}return _()(t)?null:t}}]),t}(v.Component);G.propTypes={children:g.a.func.isRequired,data:g.a.object.isRequired,sampleSize:g.a.number,minSampleSize:g.a.number,maxSampleSize:g.a.number},G.defaultProps={sampleSize:50,minSampleSize:1,maxSampleSize:null},a.default=G}}]);