var ValidationTypes,__extends,__assign,FizzFormConstants;(function(n){function i(n,i,r,u){var f=t[r];return f==null?(console.log("Unknown validation type: "+r),!0):f(n,i,u)}function r(n,i){t[n]=i}function u(n){if(n==null)return!1;if(typeof n=="string")return n.length>0;var t=n.constructor;return t!=null&&t.name=="Array"?n.length>0:!0}function f(n){var i=Number(n),t;return isNaN(i)?!1:(t=typeof n,t=="string"||t=="number")}function e(n,t,i){if(n==null)return!0;var r=n+"";return r.length<=i.max}function o(n,t,i){var r,u;return n==null?!0:(r=n+"",r.length==0)?!0:(u=new RegExp(i.pattern),u.test(r))}var t={required:u,maxlength:e,number:f,regex:o};n.validate=i;n.addValidationType=r})(ValidationTypes||(ValidationTypes={}));__extends=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}();__assign=this&&this.__assign||Object.assign||function(n){for(var t,r,i=1,u=arguments.length;i<u;i++){t=arguments[i];for(r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},function(n){n.DRAG_HANDLE_CLASS_NAME="fizzFormDragHandle";n.DRAG_HANDLE_CLASS_SELECTOR="."+n.DRAG_HANDLE_CLASS_NAME}(FizzFormConstants||(FizzFormConstants={}));var FizzForm=function(n){function t(t){var i=n.call(this,t)||this;return i.clientSideKeyHelperCounter=0,i.uniqueIds={},i.state={data:JSON.parse(JSON.stringify(i.props.initialData)),otherState:{},validationStates:{}},i}return __extends(t,n),t.prototype.getContext=function(n){var t=this,i={prefix:"",sliceMetadata:function(){return t.sliceMetadataForContext(i)},setRootState:function(n){t.setState(n);t.onRootStateChange()},setState:function(n){i.setRootState(function(t){return React.addons.update(t,ReactFormHelpers.createUpdateSpecForValue(t,i,n))})},getState:function(){return n(t.state.data)},arrayAccessors:[],field:n,validate:function(n,r){return t.validateFieldInContext(i,n,r)},clearValidation:function(){return t.clearValidationForContext(i)},ensureKey:function(n){return t.ensureKey(n)},createUniqueId:function(n){return t.createUniqueId(n)},getAllValidationStates:function(){return t.getAllValidationStates()},getValidationMessage:function(){return t.getAllValidationStates()[ReactFormHelpers.getPropertyPath(i)]},addValidationError:function(n){return t.addValidationError(i,n)},getFizzRoot:function(){return t}};return i},t.prototype.ensureKey=function(n){(n.key==null||n.key=="")&&(this.clientSideKeyHelperCounter=this.clientSideKeyHelperCounter+1,n.key="Id"+this.clientSideKeyHelperCounter)},t.prototype.createUniqueId=function(n){var r=n.replace(/[A-Za-z0-9]/gi,""),t=this.uniqueIds[n]||0,i;return i=t==0?n:n+t,this.uniqueIds[n]=t+1,i},t.prototype.updateOtherState=function(n){this.setState(function(t){return React.addons.update(t,{otherState:n})})},t.prototype.sliceMetadataForContext=function(n){for(var r=[],i=this.props.metadata,u=ReactFormHelpers.getMetadataPath(n)+".",t=0;t<i.length;t++)i[t].name.startsWith(u)&&r.push({name:i[t].name.substring(u.length),displayName:i[t].displayName,validators:i[t].validators});return r},t.prototype.clearValidationForContext=function(n){var r=this,t=ReactFormHelpers.getPropertyPath(n),i=this.getAllValidationStates();_.each(_.keys(i),function(n){i[n]&&(n==t||n.startsWith(t)&&(n.charAt(t.length)=="."||n.charAt(t.length)=="["))&&(console.log("Clearin: "+n),r.setState(function(t){var i={validationStates:{}};return i.validationStates[n]={$set:null},console.log(i),React.addons.update(t,i)}))})},t.prototype.validateFieldInContext=function(n,t,i){var f,e,u,o;for(t==undefined&&(t=n.getState()),f=ReactFormHelpers.getValidationRules(n),e=ReactFormHelpers.getPropertyPath(n),u=0;u<f.length;u++)for(o=0;o<f[u].clientvalidationrules.length;o++){var s=f[u].clientvalidationrules[o],h=ValidationTypes.validate(t||"",i==null?null:i.getState(),s.ValidationType,s.ValidationParameters),r=null;if(h===!1?r=s.ErrorMessage:typeof h=="string"&&(r=h),r!=null)return this.setState(function(n){var t={validationStates:{}};return t.validationStates[e]={$set:r},React.addons.update(n,t)}),n.getAllValidationStates()[e]=r,r}return this.setState(function(n){var t={validationStates:{}};return t.validationStates[e]={$set:null},React.addons.update(n,t)}),null},t.prototype.addValidationError=function(n,t){var i=ReactFormHelpers.getPropertyPath(n);this.setState(function(n){var r={validationStates:{}};return r.validationStates[i]={$set:t},React.addons.update(n,r)})},t.prototype.isValid=function(){return _.values(this.state.validationStates).filter(function(n){return n!=null}).length==0},t.prototype.getAllValidationStates=function(){return this.state.validationStates},t.prototype.onRootStateChange=function(){},t}(React.Component),FizzFormPartialBase=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),t.prototype.getContext=function(n){var t=this,r=ReactFormHelpers.getPropertyPath(this.props.context),i={prefix:r,getState:function(){return n(t.props.context.getState())},setState:function(n){i.setRootState(function(t){return React.addons.update(t,ReactFormHelpers.createUpdateSpecForValue(t,i,n))})},setRootState:function(n){return t.props.context.setRootState(n)},arrayAccessors:this.props.context.arrayAccessors,field:n,validate:function(n,r){return t.props.context.getFizzRoot().validateFieldInContext(i,n,r)},clearValidation:function(){return t.props.context.getFizzRoot().clearValidationForContext(i)},ensureKey:this.props.context.ensureKey,createUniqueId:this.props.context.createUniqueId,getAllValidationStates:function(){return t.props.context.getAllValidationStates()},getValidationMessage:function(){return t.props.context.getAllValidationStates()[ReactFormHelpers.getPropertyPath(i)]},addValidationError:function(n){return t.props.context.getFizzRoot().addValidationError(i,n)},getFizzRoot:function(){return t.props.context.getFizzRoot()},sliceMetadata:function(){return t.props.context.getFizzRoot().sliceMetadataForContext(i)}};return i},t}(React.Component),FizzFormPartial=function(n){function t(t){return n.call(this,t)||this}return __extends(t,n),t}(FizzFormPartialBase),FizzFormListPartial=function(n){function t(t){return n.call(this,t)||this}return __extends(t,n),t.prototype.createInitialState=function(){return{dragAndDropOffsetX:0,dragAndDropOffsetY:0,dragAndDropInitialX:0,dragAndDropInitialY:0,isDragging:!1,isAddingNew:!1,isEditing:!1}},t.prototype.render=function(){var n=this,t=this.props.context.getState();return this.filteredItemsToRender=t.map(function(n,t){return{index:t,item:n}}).filter(function(t,i){return n.itemFilterCallback(t.item,i)}),this.renderInternal(this.filteredItemsToRender.length)},t.prototype.getContextWithArrayAccessor=function(t,i){var r=n.prototype.getContext.call(this,t),u=r.arrayAccessors.slice(0);return u.push(i),r.arrayAccessors=u,r.field=t,r},t.prototype.addItem=function(n){var t=this;n==null&&(n=this.createItem());this.props.context.setRootState(function(i){var r=ReactFormHelpers.createUpdateSpecForCommand(i,t.props.context,"$push",[n]);return React.addons.update(i,r)})},t.prototype.removeItem=function(n){var t=this,i=0,r=this.getContextWithArrayAccessor(function(n){return n[i]},n.key);r.clearValidation();this.props.context.setRootState(function(i){var r=ReactFormHelpers.createRemovalSpec(i,t.props.context,n.key);return React.addons.update(i,r)})},t.prototype.reorderItem=function(n,t){for(var f,r,e=this,o=this.props.context.arrayAccessors,u=this.props.context.getState(),i=0;i<u.length;i++)if(u[i].key==n.key){if(i+t<0||i+t>=u.length)return!1;f=this.getContextWithArrayAccessor(function(n){return n[i]},n.key);f.clearValidation();r={};t==-1?(r[i-1]=n,r[i]=u[i-1]):(r[i+1]=n,r[i]=u[i+1]);this.props.context.setRootState(function(n){var t=ReactFormHelpers.createUpdateSpecForCommand(n,e.props.context,"$merge",r);return React.addons.update(n,t)});break}return!0},t.prototype.renderItems=function(){var n=this;return this.filteredItemsToRender.map(function(t,i){n.props.context.ensureKey(t.item);var r=t.index,f=n.isDragAndDropReorderingEnabled()?{"data-dragdropindex":r,onMouseDown:function(i){return n.dragDropItemMouseDown(i,t.index,!1)},onTouchStart:function(i){return n.dragDropItemMouseDown(i,t.index,!0)}}:null,u;return n.state.isDragging&&n.state.dragAndDropItemIndex==t.index&&(u={position:"relative",left:n.state.dragAndDropOffsetX-n.state.dragAndDropInitialX,top:n.state.dragAndDropOffsetY-n.state.dragAndDropInitialY,zIndex:2}),React.createElement("div",__assign({key:t.item.key,className:"fizzListItem"},f,{style:u}),n.renderSingleItem(t.item,n.getContextWithArrayAccessor(function(n){return n[r]},t.item.key),function(){return n.removeItem(t.item)},i,n.filteredItemsToRender.length,function(i){return n.reorderItem(t.item,i)}))})},t.prototype.dragDropItemMouseDown=function(n,t,i){var r=this,u;if(n.target==null||(u=$(n.target),u.is(FizzFormConstants.DRAG_HANDLE_CLASS_SELECTOR)||u.closest(FizzFormConstants.DRAG_HANDLE_CLASS_SELECTOR).length!=0)){n.preventDefault();var f=this.getCoordsFromEvent(n),e=f.pageX,o=f.pageY;if(this.setDragDropState({isDragging:!1,dragAndDropItemIndex:t,dragAndDropInitialX:e,dragAndDropInitialY:o,dragAndDropOffsetX:e,dragAndDropOffsetY:o}),i){$(document).on("touchend.fizzFormListPartial",function(n){return r.dragDropDocumentMouseUp(n)});$(document).on("touchmove.fizzFormListPartial",function(n){return r.dragDropDocumentMouseMove(n)})}else{$(document).on("mouseup.fizzFormListPartial",function(n){return r.dragDropDocumentMouseUp(n)});$(document).on("mousemove.fizzFormListPartial",function(n){return r.dragDropDocumentMouseMove(n)})}}},t.prototype.dragDropDocumentMouseUp=function(){var e=this,i,f,r,n;$(document).off(".fizzFormListPartial");var t=this.state.dragAndDropItemIndex,o=this.state.dragAndDropOffsetX,u=this.state.dragAndDropOffsetY;if((this.setDragDropState({isDragging:!1,dragAndDropItemIndex:undefined}),i=document.elementFromPoint(o-window.pageXOffset,u-window.pageYOffset),i!=null)&&(f=ReactDOM.findDOMNode(this),$(i).parents().filter(function(n,t){return f==t}).length!=0)&&(r=$(i).closest("[data-dragdropindex]"),n=+r.attr("data-dragdropindex"),t!=undefined&&n!=t)){switch(this.getDragAndDropOrientation()){case"vertical":var s=r.offset().top,h=r.outerHeight(!1),c=u-s;c<h/2?n>t&&n--:n<t&&n++}if(n!=t){var l=this.props.context.getState(),a=l[t],v=[[t,1],[n,0,a]];this.props.context.setRootState(function(n){var t=ReactFormHelpers.createUpdateSpecForCommand(n,e.props.context,"$splice",v);return React.addons.update(n,t)})}}},t.prototype.dragDropDocumentMouseMove=function(n){var t=this.getCoordsFromEvent(n),i=t.pageX,r=t.pageY,u=3,f=this.state.isDragging||Math.abs(i-this.state.dragAndDropInitialX)>u||Math.abs(r-this.state.dragAndDropInitialY)>u;this.setDragDropState({isDragging:f,dragAndDropOffsetX:i,dragAndDropOffsetY:r});n.preventDefault()},t.prototype.getCoordsFromEvent=function(n){return n.originalEvent&&(n=n.originalEvent),n.touches?{pageX:n.touches[0].pageX,pageY:n.touches[0].pageY}:{pageX:n.pageX,pageY:n.pageY}},t.prototype.setDragDropState=function(n){this.setState(n)},t.prototype.isDragAndDropReorderingEnabled=function(){return!1},t.prototype.getDragAndDropOrientation=function(){return""},t.prototype.itemFilterCallback=function(){return!0},t}(FizzFormPartialBase),ReactFormHelpers;(function(n){function r(n){var t=n.field.toString(),i=/return\s+[^\.]+\.([^;)}]+)/.exec(t),r;return i!=null?(n.prefix.length>0?n.prefix+".":"")+i[1]:(r=/\[[^\]]+\]/.exec(t),r!=null)?n.prefix+"["+n.arrayAccessors[n.arrayAccessors.length-1]+"]":""}function t(t){var i=n.getPropertyPath(t);return i.replace(/\[[^\]]+\]/ig,"")}function i(t,i,r,u){for(var y,c,l,p,o,a=0,f=t.data,w=n.getPropertyPath(i),b=i.arrayAccessors,h=w.split(/\./ig),v={},e=v,s=0;s<h.length;s++)if(y=h[s],c=/([^[]+)\[([^\]]+)\]/.exec(y),c==null)e=e[h[s]]={},f=f[h[s]];else for(l=c[1],p=c[2],e=e[l]={},f=f[l],o=0;o<f.length;o++)if(f[o].key==b[a]){p=o+"";f=f[o];e=e[o]={};a++;break}return e[r]=u,{data:v}}function u(n,t,r){return i(n,t,"$set",r)}function f(t,i,r){for(var v,h,c,y,o,l=0,u=t.data,p=n.getPropertyPath(i),w=i.arrayAccessors,s=p.split(/\./ig),a={},e=a,f=0;f<s.length;f++)if(v=s[f],h=/([^[]+)\[([^\]]+)\]/.exec(v),h==null)e=e[s[f]]={},u=u[s[f]];else for(c=h[1],y=h[2],e=e[c]={},u=u[c],o=0;o<u.length;o++)if(u[o].key==w[l]){y=o+"";u=u[o];e=e[o]={};l++;break}for(f=0;f<u.length;f++)u[f].key==r&&(e.$splice=[[f,1]]);return{data:a}}function e(n,t){for(var f,o,s,r,e=n.split("."),i=t,u=0;u<e.length;u++)if(f=/([^[]+)\[([^\]]+)\]/.exec(e[u]),f==null)i=i[e[u]];else for(o=f[1],s=f[2],i=t[o],r=0;r<i.length;r++)if(i[r].key==s){i=i[r];break}return i}function o(n){var r=t(n),i=n.getFizzRoot().props.metadata.filter(function(n){return n.name==r});return i.length>0?i[0].validators:[]}function s(n){var r=t(n),i=n.getFizzRoot().props.metadata.filter(function(n){return n.name==r});return i.length>0?i[0].displayName:"Unknown"}n.getPropertyPath=r;n.getMetadataPath=t;n.createUpdateSpecForCommand=i;n.createUpdateSpecForValue=u;n.createRemovalSpec=f;n.getValue=e;n.getValidationRules=o;n.getDisplayName=s})(ReactFormHelpers||(ReactFormHelpers={}));var __extends=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),__assign=this&&this.__assign||Object.assign||function(n){for(var t,r,i=1,u=arguments.length;i<u;i++){t=arguments[i];for(r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},FormTextEditorRowBase=function(n){function t(t){var i=n.call(this,t)||this,r=ReactFormHelpers.getPropertyPath(i.props.context);return i.displayName=t.displayNameOverride||ReactFormHelpers.getDisplayName(i.props.context),i}return __extends(t,n),t.prototype.handleChange=function(n){var t=n.target.value,i,r;t=this.valueChangePreprocessor(t);i=ReactFormHelpers.getPropertyPath(this.props.context);r=this.props.context.arrayAccessors;this.props.context.setState(t)},t.prototype.valueChangePreprocessor=function(n){return n},t.prototype.validate=function(n){var i=n.target.value,t=this.props.context.validate(i);t!=this.validationMessage&&(this.validationMessage=t,this.forceUpdate())},t.prototype.render=function(){var n=this,t,i;return this.elementId=this.elementId||(this.elementId=this.props.context.createUniqueId(this.displayName)),t=this.validationMessage==null,i={id:this.elementId,value:this.convertValueToString(this.props.context.getState()),onChange:function(t){return n.handleChange(t)},onBlur:function(t){return n.validate(t)},ref:"inputElement",className:t?"":"input-validation-error"},React.createElement("div",{className:"formRow "+(this.props.rowClassName||"")},React.createElement("span",{className:"validationMessage"},this.validationMessage),React.createElement("div",{className:"formControls"},this.props.showLabel||this.props.showLabel==null?React.createElement("label",{htmlFor:this.elementId},this.displayName):null,this.createEditorControl(i)))},t.prototype.focus=function(){this.refs.inputElement.focus()},t}(React.Component),FormNumericTextRow=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),t.prototype.convertValueToString=function(n){return n==null?"":String(n)},t.prototype.createEditorControl=function(n){var t=this.props.decimalPlaces==null?null:1/Math.pow(10,this.props.decimalPlaces);return React.createElement("input",__assign({type:"number"},n,{min:this.props.inclusiveLowerLimit,max:this.props.inclusiveUpperLimit}))},t.prototype.valueChangePreprocessor=function(n){var t,i;return n==null||n==""?"":(t=+n,isNaN(t))?"":this.props.decimalPlaces!=null&&(i=+t.toFixed(this.props.decimalPlaces),i!=t)?i:n},t}(FormTextEditorRowBase),FormTextRow=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),t.prototype.convertValueToString=function(n){return n},t.prototype.createEditorControl=function(n){return this.props.multiline?React.createElement("textarea",__assign({},n)):React.createElement("input",__assign({type:"text"},n))},t}(FormTextEditorRowBase),__extends=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),FizzFormDropDownBase=function(n){function t(t){var i=n.call(this,t)||this;return i.DUMMY_BLANK_OPTION_VALUE="[--blank--]",i}return __extends(t,n),t.prototype.handleChange=function(n){var t=n.target.value,i,r;if(t==this.DUMMY_BLANK_OPTION_VALUE&&(t=""),i=this.convertStringToValue(t),r=ReactFormHelpers.getPropertyPath(this.props.context),this.props.context.setState(i),this.props.onChange)this.props.onChange(i)},t.prototype.render=function(){var t=this,i=this.props.context.getState(),e={},n=this.props.values.map(function(n){var i,f,r,u;for(t.props.valueToTextMap==null?i=n:(f=t.props.valueToTextMap[n],i=f),i==null&&(i=""),r=n,u=0;e[r];)r=r+"__"+u,u++;return{key:r,value:n,text:i,disabled:!1}}),r,u,f;return this.props.sortValues&&(r=this.props.sortValues,n=n.sort(function(n,t){return r(n.text,t.text)})),this.props.includeBlankOption&&n.unshift({key:"blankItem",value:this.props.placeholder!=null?this.DUMMY_BLANK_OPTION_VALUE:"",text:"",disabled:!1}),this.props.placeholder!=null&&n.unshift({key:"placeholder",value:"",text:this.props.placeholder,disabled:!0}),u=this.convertValueToString(i)=="",f=this.props.includeBlankOption&&this.props.placeholder!=null&&i==null?"":this.convertValueToString(i),React.createElement("select",{ref:function(n){return t.selectElement=n},className:u?"placeholderSelected":"",onChange:function(n){return t.handleChange(n)},onBlur:this.props.onBlur,value:f,disabled:this.props.isDisabled?!0:undefined,required:this.props.required},n.map(function(n){return React.createElement("option",{key:n.key,value:n.value,disabled:n.disabled},n.text)}))},t.prototype.focus=function(){this.selectElement!=null&&this.selectElement.focus()},t}(React.Component),FizzFormDropDown=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),t.prototype.convertValueToString=function(n){return n==null?"":n.toString()},t.prototype.convertStringToValue=function(n){return n},t}(FizzFormDropDownBase),FizzFormEnumDropDown=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),t.prototype.convertValueToString=function(n){return n==null?"":n.toString()},t.prototype.convertStringToValue=function(n){return n==null||n==""?null:parseInt(n,10)},t}(FizzFormDropDownBase),FizzFormRowCreator;(function(n){function t(n){return function(t){function i(){return t!==null&&t.apply(this,arguments)||this}return __extends(i,t),i.prototype.render=function(){return React.createElement("div",{className:"blahRow"},n)},i}(React.Component)}n.CreateRow=t})(FizzFormRowCreator||(FizzFormRowCreator={}));var __extends=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),FizzFormValidationMessage=function(n){function t(t){return n.call(this,t)||this}return __extends(t,n),t.prototype.render=function(){var t=ReactFormHelpers.getPropertyPath(this.props.context),n=this.props.context.getAllValidationStates()[t],i=n==null;return i?null:React.createElement("div",{className:"field-validation-error "+this.props.className},n)},t}(React.Component),__extends=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),NumberInput=function(n){function t(t){var i=n.call(this,t)||this;return i.state={value:i.props.value,isiOS:!1},i}return __extends(t,n),t.prototype.render=function(){var n=this;return React.createElement("input",{type:this.state.isiOS?"number":"tel",inputMode:"numeric",value:this.state.value,required:this.props.required,placeholder:this.props.placeholder!=null?this.props.placeholder:undefined,onChange:function(t){return n.handleOnChange(t)},onKeyPress:function(t){return n.handleOnKeyPress(t)},onKeyDown:function(t){return n.handleOnKeyDown(t)},onKeyUp:function(t){return n.handleOnKeyUp(t)}})},t.prototype.handleOnKeyPress=function(n){if(this.props.onKeyPress)this.props.onKeyPress(n)},t.prototype.handleOnKeyDown=function(n){if(this.props.onKeyDown)this.props.onKeyDown(n)},t.prototype.handleOnKeyUp=function(n){if(this.props.onKeyUp)this.props.onKeyUp(n)},t.prototype.handleOnChange=function(n){var i=n.target.value,t=i.replace(/[^0-9.]/gi,"");if(this.setState({value:t,isiOS:this.state.isiOS}),n.target.value=t,this.props.onChange!=undefined)this.props.onChange(n)},t.prototype.allowedKeys=function(){return["1","2","3","4","5","6","7","8","9","0","."]},t.prototype.componentWillMount=function(){navigator.userAgent.match(/(iPad|iPhone|iPod)/gi)&&this.setState({value:this.state.value,isiOS:!0})},t}(React.Component)