<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9462],{9462:function(t,e,r){var o=r(2784);function a(){}function n(t){return!!(t||"").match(/\d/)}function i(t){return t.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&amp;")}function s(t,e){void 0===e&amp;&amp;(e=!0);var r="-"===t[0],o=r&amp;&amp;e,a=(t=t.replace("-","")).split(".");return{beforeDecimal:a[0],afterDecimal:a[1]||"",hasNagation:r,addNegation:o}}function u(t,e,r){for(var o="",a=r?"0":"",n=0;n&lt;=e-1;n++)o+=t[n]||a;return o}function l(t,e){return Array(e+1).join(t)}function p(t,e){if(t.value=t.value,null!==t){if(t.createTextRange){var r=t.createTextRange();return r.move("character",e),r.select(),!0}return t.selectionStart||0===t.selectionStart?(t.focus(),t.setSelectionRange(e,e),!0):(t.focus(),!1)}}function c(t,e,r){return Math.min(Math.max(t,e),r)}function f(t){return Math.max(t.selectionStart,t.selectionEnd)}var h=function(t){function e(e){t.call(this,e);var r=e.defaultValue;this.validateProps();var o=this.formatValueProp(r);this.state={value:o,numAsString:this.removeFormatting(o),mounted:!1},this.selectionBeforeInput={selectionStart:0,selectionEnd:0},this.onChange=this.onChange.bind(this),this.onKeyDown=this.onKeyDown.bind(this),this.onMouseUp=this.onMouseUp.bind(this),this.onFocus=this.onFocus.bind(this),this.onBlur=this.onBlur.bind(this)}return t&amp;&amp;(e.__proto__=t),e.prototype=Object.create(t&amp;&amp;t.prototype),e.prototype.constructor=e,e.prototype.componentDidMount=function(){this.setState({mounted:!0})},e.prototype.componentDidUpdate=function(t){this.updateValueIfRequired(t)},e.prototype.componentWillUnmount=function(){clearTimeout(this.focusTimeout),clearTimeout(this.caretPositionTimeout)},e.prototype.updateValueIfRequired=function(t){var e=this.props,r=this.state,o=this.focusedElm,a=r.value,n=r.numAsString;if(void 0===n&amp;&amp;(n=""),t!==e){this.validateProps();var i=this.formatNumString(n),s=null==e.value?i:this.formatValueProp(),u=this.removeFormatting(s),l=parseFloat(u),p=parseFloat(n);(isNaN(l)&amp;&amp;isNaN(p)||l===p)&amp;&amp;i===a&amp;&amp;(null!==o||s===a)||this.updateValue({formattedValue:s,numAsString:u,input:o,source:"prop",event:null})}},e.prototype.getFloatString=function(t){void 0===t&amp;&amp;(t="");var e=this.props.decimalScale,r=this.getSeparators().decimalSeparator,o=this.getNumberRegex(!0),a="-"===t[0];a&amp;&amp;(t=t.replace("-","")),r&amp;&amp;0===e&amp;&amp;(t=t.split(r)[0]);var n=(t=(t.match(o)||[]).join("").replace(r,".")).indexOf(".");return -1!==n&amp;&amp;(t=t.substring(0,n)+"."+t.substring(n+1,t.length).replace(RegExp(i(r),"g"),"")),a&amp;&amp;(t="-"+t),t},e.prototype.getNumberRegex=function(t,e){var r=this.props,o=r.format,a=r.decimalScale,n=r.customNumerals,s=this.getSeparators().decimalSeparator;return RegExp("[0-9"+(n?n.join(""):"")+"]"+(!s||0===a||e||o?"":"|"+i(s)),t?"g":void 0)},e.prototype.getSeparators=function(){var t=this.props.decimalSeparator,e=this.props,r=e.thousandSeparator,o=e.allowedDecimalSeparators;return!0===r&amp;&amp;(r=","),o||(o=[t,"."]),{decimalSeparator:t,thousandSeparator:r,allowedDecimalSeparators:o}},e.prototype.getMaskAtIndex=function(t){var e=this.props.mask;return(void 0===e&amp;&amp;(e=" "),"string"==typeof e)?e:e[t]||" "},e.prototype.getValueObject=function(t,e){var r=parseFloat(e);return{formattedValue:t,value:e,floatValue:isNaN(r)?void 0:r}},e.prototype.validateProps=function(){var t=this.props.mask,e=this.getSeparators(),r=e.decimalSeparator,o=e.thousandSeparator;if(r===o)throw Error("\n          Decimal separator can't be same as thousand separator.\n          thousandSeparator: "+o+' (thousandSeparator = {true} is same as thousandSeparator = ",")\n          decimalSeparator: '+r+" (default value for decimalSeparator is .)\n       ");if(t&amp;&amp;("string"===t?t:t.toString()).match(/\d/g))throw Error("\n          Mask "+t+" should not contain numeric character;\n        ")},e.prototype.setPatchedCaretPosition=function(t,e,r){p(t,e),this.caretPositionTimeout=setTimeout(function(){t.value===r&amp;&amp;p(t,e)},0)},e.prototype.correctCaretPosition=function(t,e,r){var o=this.props,a=o.prefix,i=o.suffix,s=o.format;if(""===t)return 0;if(e=c(e,0,t.length),!s){var u="-"===t[0];return c(e,a.length+(u?1:0),t.length-i.length)}if("function"==typeof s||"#"===s[e]&amp;&amp;n(t[e])||"#"===s[e-1]&amp;&amp;n(t[e-1]))return e;var l=s.indexOf("#");e=c(e,l,s.lastIndexOf("#")+1);for(var p=s.substring(e,s.length).indexOf("#"),f=e,h=e+(-1===p?0:p);f&gt;l&amp;&amp;("#"!==s[f]||!n(t[f]));)f-=1;return!n(t[h])||"left"===r&amp;&amp;e!==l||e-f&lt;h-e?n(t[f])?f+1:f:h},e.prototype.getCaretPosition=function(t,e,r){var o,a,n=this.props.format,i=this.state.value,s=this.getNumberRegex(!0),u=(t.match(s)||[]).join(""),l=(e.match(s)||[]).join("");for(a=0,o=0;a&lt;r;a++){var p=t[a]||"",c=e[o]||"";if(!(!p.match(s)&amp;&amp;p!==c||"0"===p&amp;&amp;c.match(s)&amp;&amp;"0"!==c&amp;&amp;u.length!==l.length)){for(;p!==e[o]&amp;&amp;o&lt;e.length;)o++;o++}}return"string"!=typeof n||i||(o=e.length),o=this.correctCaretPosition(e,o)},e.prototype.removePrefixAndSuffix=function(t){var e=this.props,r=e.format,o=e.prefix,a=e.suffix;if(!r&amp;&amp;t){var n="-"===t[0];n&amp;&amp;(t=t.substring(1,t.length));var i=(t=o&amp;&amp;0===t.indexOf(o)?t.substring(o.length,t.length):t).lastIndexOf(a);t=a&amp;&amp;-1!==i&amp;&amp;i===t.length-a.length?t.substring(0,i):t,n&amp;&amp;(t="-"+t)}return t},e.prototype.removePatternFormatting=function(t){for(var e=this.props.format.split("#").filter(function(t){return""!==t}),r=0,o="",a=0,n=e.length;a&lt;=n;a++){var i=e[a]||"",s=a===n?t.length:t.indexOf(i,r);if(-1===s){o=t;break}o+=t.substring(r,s),r=s+i.length}return(o.match(this.getNumberRegex(!0))||[]).join("")},e.prototype.removeFormatting=function(t){var e=this.props,r=e.format,o=e.removeFormatting;return t&amp;&amp;(r?t="string"==typeof r?this.removePatternFormatting(t):"function"==typeof o?o(t):(t.match(this.getNumberRegex(!0))||[]).join(""):(t=this.removePrefixAndSuffix(t),t=this.getFloatString(t))),t},e.prototype.formatWithPattern=function(t){for(var e=this.props.format,r=0,o=e.split(""),a=0,n=e.length;a&lt;n;a++)"#"===e[a]&amp;&amp;(o[a]=t[r]||this.getMaskAtIndex(r),r+=1);return o.join("")},e.prototype.formatAsNumber=function(t){var e,r,o,a=this.props,n=a.decimalScale,i=a.fixedDecimalScale,l=a.prefix,p=a.suffix,c=a.allowNegative,f=a.thousandsGroupStyle,h=this.getSeparators(),m=h.thousandSeparator,g=h.decimalSeparator,d=-1!==t.indexOf(".")||n&amp;&amp;i,v=s(t,c),S=v.beforeDecimal,y=v.afterDecimal,x=v.addNegation;return void 0!==n&amp;&amp;(y=u(y,n,i)),m&amp;&amp;(e=S,r=function(t){switch(t){case"lakh":return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case"wan":return/(\d)(?=(\d{4})+(?!\d))/g;default:return/(\d)(?=(\d{3})+(?!\d))/g}}(f),o=-1===(o=e.search(/[1-9]/))?e.length:o,S=e.substring(0,o)+e.substring(o,e.length).replace(r,"$1"+m)),l&amp;&amp;(S=l+S),p&amp;&amp;(y+=p),x&amp;&amp;(S="-"+S),t=S+(d&amp;&amp;g||"")+y},e.prototype.formatNumString=function(t){void 0===t&amp;&amp;(t="");var e=this.props,r=e.format,o=e.allowEmptyFormatting,a=e.customNumerals,n=t;if(a&amp;&amp;10===a.length){var i=RegExp("["+a.join("")+"]","g");n=t.replace(i,function(t){return a.indexOf(t).toString()})}return""!==t||o?"-"!==t||r?"string"==typeof r?this.formatWithPattern(n):"function"==typeof r?r(n):this.formatAsNumber(n):"-":""},e.prototype.formatValueProp=function(t){var e=this.props,r=e.format,o=e.decimalScale,a=e.fixedDecimalScale,n=e.allowEmptyFormatting,i=this.props,p=i.value,c=i.isNumericString,f=!(p=null==p?t:p)&amp;&amp;0!==p;return(f&amp;&amp;n&amp;&amp;(p=""),f&amp;&amp;!n)?"":("number"==typeof p&amp;&amp;(p=function(t){var e="-"===(t+="")[0]?"-":"";e&amp;&amp;(t=t.substring(1));var r=t.split(/[eE]/g),o=r[0],a=r[1];if(!(a=Number(a)))return e+o;o=o.replace(".","");var n=1+a,i=o.length;return n&lt;0?o="0."+l("0",Math.abs(n))+o:n&gt;=i?o+=l("0",n-i):o=(o.substring(0,n)||"0")+"."+o.substring(n),e+o}(p),c=!0),"Infinity"===p&amp;&amp;c&amp;&amp;(p=""),c&amp;&amp;!r&amp;&amp;"number"==typeof o&amp;&amp;(p=function(t,e,r){if(-1!==["","-"].indexOf(t))return t;var o=-1!==t.indexOf(".")&amp;&amp;e,a=s(t),n=a.beforeDecimal,i=a.afterDecimal,l=a.hasNagation,p=parseFloat("0."+(i||"0")),c=(i.length&lt;=e?"0."+i:p.toFixed(e)).split(".");return(l?"-":"")+n.split("").reverse().reduce(function(t,e,r){return t.length&gt;r?(Number(t[0])+Number(e)).toString()+t.substring(1,t.length):e+t},c[0])+(o?".":"")+u(c[1]||"",Math.min(e,i.length),r)}(p,o,a)),c?this.formatNumString(p):this.formatInput(p))},e.prototype.formatNegation=function(t){void 0===t&amp;&amp;(t="");var e=this.props.allowNegative,r=RegExp("(-)(.)*(-)"),o=/(-)/.test(t),a=r.test(t);return t=t.replace(/-/g,""),o&amp;&amp;!a&amp;&amp;e&amp;&amp;(t="-"+t),t},e.prototype.formatInput=function(t){return void 0===t&amp;&amp;(t=""),this.props.format||(t=this.removePrefixAndSuffix(t),t=this.formatNegation(t)),t=this.removeFormatting(t),this.formatNumString(t)},e.prototype.isCharacterAFormat=function(t,e){var r=this.props,o=r.format,a=r.prefix,n=r.suffix,i=r.decimalScale,s=r.fixedDecimalScale,u=this.getSeparators().decimalSeparator;return"string"==typeof o&amp;&amp;"#"!==o[t]||!o&amp;&amp;(t&lt;a.length||t&gt;=e.length-n.length||!!i&amp;&amp;!!s&amp;&amp;e[t]===u)},e.prototype.correctInputValue=function(t,e,r){var o=this,a=this.props,n=a.format,i=a.allowNegative,u=a.prefix,l=a.suffix,p=a.decimalScale,c=this.getSeparators(),f=c.allowedDecimalSeparators,h=c.decimalSeparator,m=this.state.numAsString||"",g=this.selectionBeforeInput,d=g.selectionStart,v=g.selectionEnd,S=function(t,e){for(var r=0,o=0,a=t.length,n=e.length;t[r]===e[r]&amp;&amp;r&lt;a;)r++;for(;t[a-1-o]===e[n-1-o]&amp;&amp;n-o&gt;r&amp;&amp;a-o&gt;r;)o++;return{start:r,end:a-o}}(e,r),y=S.start,x=S.end;if(!n&amp;&amp;y===x&amp;&amp;-1!==f.indexOf(r[d])){var b=0===p?"":h;return r.substr(0,d)+b+r.substr(d+1,r.length)}var N=n?0:u.length,w=e.length-(n?0:l.length);if(r.length&gt;e.length||!r.length||y===x||0===d&amp;&amp;v===e.length||0===y&amp;&amp;x===e.length||d===N&amp;&amp;v===w)return r;var P=e.substr(y,x-y);if([].concat(P).find(function(t,r){return o.isCharacterAFormat(r+y,e)})){var F=e.substr(y),C={},D=[];[].concat(F).forEach(function(t,r){o.isCharacterAFormat(r+y,e)?C[r]=t:r&gt;P.length-1&amp;&amp;D.push(t)}),Object.keys(C).forEach(function(t){D.length&gt;t?D.splice(t,0,C[t]):D.push(C[t])}),r=e.substr(0,y)+D.join("")}if(!n){var V=this.removeFormatting(r),A=s(V,i),E=A.beforeDecimal,O=A.afterDecimal,j=A.addNegation,I=t&lt;r.indexOf(h)+1;if(V.length&lt;m.length&amp;&amp;I&amp;&amp;""===E&amp;&amp;!parseFloat(O))return j?"-":""}return r},e.prototype.updateValue=function(t){var e=t.formattedValue,r=t.input,o=t.setCaretPosition;void 0===o&amp;&amp;(o=!0);var a=t.source,n=t.event,i=t.numAsString,s=t.caretPos,u=this.props.onValueChange,l=this.state.value;if(r){if(void 0===s&amp;&amp;o){var p=t.inputValue||r.value,c=f(r);r.value=e,s=this.getCaretPosition(p,e,c)}r.value=e,o&amp;&amp;this.setPatchedCaretPosition(r,s,e)}void 0===i&amp;&amp;(i=this.removeFormatting(e)),e!==l&amp;&amp;(this.setState({value:e,numAsString:i}),u(this.getValueObject(e,i),{event:n,source:a}))},e.prototype.onChange=function(t){var e=t.target,r=e.value,o=this.state,a=this.props,n=a.isAllowed,i=o.value||"",s=f(e);r=this.correctInputValue(s,i,r);var u=this.formatInput(r)||"",l=this.removeFormatting(u),p=n(this.getValueObject(u,l));p||(u=i),this.updateValue({formattedValue:u,numAsString:l,inputValue:r,input:e,event:t,source:"event"}),p&amp;&amp;a.onChange(t)},e.prototype.onBlur=function(t){var e=this.props,r=this.state,o=e.format,a=e.onBlur,n=e.allowLeadingZeros,i=r.numAsString,s=r.value;if(this.focusedElm=null,clearTimeout(this.focusTimeout),clearTimeout(this.caretPositionTimeout),!o){isNaN(parseFloat(i))&amp;&amp;(i=""),n||(i=function(t){if(!t)return t;var e="-"===t[0];e&amp;&amp;(t=t.substring(1,t.length));var r=t.split("."),o=r[0].replace(/^0+/,"")||"0",a=r[1]||"";return(e?"-":"")+o+(a?"."+a:"")}(i));var u=this.formatNumString(i);if(u!==s){this.updateValue({formattedValue:u,numAsString:i,input:t.target,setCaretPosition:!1,event:t,source:"event"}),a(t);return}}a(t)},e.prototype.onKeyDown=function(t){var e,r=t.target,o=t.key,a=r.selectionStart,n=r.selectionEnd,i=r.value;void 0===i&amp;&amp;(i="");var s=this.props,u=s.decimalScale,l=s.fixedDecimalScale,p=s.prefix,c=s.suffix,f=s.format,h=s.onKeyDown,m=this.getNumberRegex(!1,void 0!==u&amp;&amp;l),g=/-/,d="string"==typeof f;if(this.selectionBeforeInput={selectionStart:a,selectionEnd:n},"ArrowLeft"===o||"Backspace"===o?e=a-1:"ArrowRight"===o?e=a+1:"Delete"===o&amp;&amp;(e=a),void 0===e||a!==n){h(t);return}var v=e,S=d?f.indexOf("#"):p.length,y=d?f.lastIndexOf("#")+1:i.length-c.length;if("ArrowLeft"===o||"ArrowRight"===o)v=this.correctCaretPosition(i,e,"ArrowLeft"===o?"left":"right");else if("Delete"!==o||m.test(i[e])||g.test(i[e])){if("Backspace"===o&amp;&amp;!m.test(i[e])){if(a&lt;=S+1&amp;&amp;"-"===i[0]&amp;&amp;void 0===f){var x=i.substring(1);this.updateValue({formattedValue:x,caretPos:v,input:r,event:t,source:"event"})}else if(!g.test(i[e])){for(;!m.test(i[v-1])&amp;&amp;v&gt;S;)v--;v=this.correctCaretPosition(i,v,"left")}}}else for(;!m.test(i[v])&amp;&amp;v&lt;y;)v++;(v!==e||e&lt;S||e&gt;y)&amp;&amp;(t.preventDefault(),this.setPatchedCaretPosition(r,v,i)),t.isUnitTestRun&amp;&amp;this.setPatchedCaretPosition(r,v,i),h(t)},e.prototype.onMouseUp=function(t){var e=t.target,r=e.selectionStart,o=e.selectionEnd,a=e.value;if(void 0===a&amp;&amp;(a=""),r===o){var n=this.correctCaretPosition(a,r);n!==r&amp;&amp;this.setPatchedCaretPosition(e,n,a)}this.props.onMouseUp(t)},e.prototype.onFocus=function(t){var e=this;t.persist(),this.focusedElm=t.target,this.focusTimeout=setTimeout(function(){var r=t.target,o=r.selectionStart,a=r.selectionEnd,n=r.value;void 0===n&amp;&amp;(n="");var i=e.correctCaretPosition(n,o);i===o||0===o&amp;&amp;a===n.length||e.setPatchedCaretPosition(r,i,n),e.props.onFocus(t)},0)},e.prototype.render=function(){var t=this.props,e=t.type,r=t.displayType,a=t.customInput,n=t.renderText,i=t.getInputRef,s=t.format;t.thousandSeparator,t.decimalSeparator,t.allowedDecimalSeparators,t.thousandsGroupStyle,t.decimalScale,t.fixedDecimalScale,t.prefix,t.suffix,t.removeFormatting,t.mask,t.defaultValue,t.isNumericString,t.allowNegative,t.allowEmptyFormatting,t.allowLeadingZeros,t.onValueChange,t.isAllowed,t.customNumerals,t.onChange,t.onKeyDown,t.onMouseUp,t.onFocus,t.onBlur,t.value;var u=function(t,e){var r={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&amp;&amp;-1===e.indexOf(o)&amp;&amp;(r[o]=t[o]);return r}(t,["type","displayType","customInput","renderText","getInputRef","format","thousandSeparator","decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","decimalScale","fixedDecimalScale","prefix","suffix","removeFormatting","mask","defaultValue","isNumericString","allowNegative","allowEmptyFormatting","allowLeadingZeros","onValueChange","isAllowed","customNumerals","onChange","onKeyDown","onMouseUp","onFocus","onBlur","value"]),l=this.state,p=l.value,c=Object.assign({inputMode:l.mounted&amp;&amp;(s||"undefined"!=typeof navigator&amp;&amp;!(navigator.platform&amp;&amp;/iPhone|iPod/.test(navigator.platform)))?"numeric":void 0},u,{type:e,value:p,onChange:this.onChange,onKeyDown:this.onKeyDown,onMouseUp:this.onMouseUp,onFocus:this.onFocus,onBlur:this.onBlur});return"text"===r?n?n(p,u)||null:o.createElement("span",Object.assign({},u,{ref:i}),p):a?o.createElement(a,Object.assign({},c,{ref:i})):o.createElement("input",Object.assign({},c,{ref:i}))},e}(o.Component);h.defaultProps={displayType:"input",decimalSeparator:".",thousandsGroupStyle:"thousand",fixedDecimalScale:!1,prefix:"",suffix:"",allowNegative:!0,allowEmptyFormatting:!1,allowLeadingZeros:!1,isNumericString:!1,type:"text",onValueChange:a,onChange:a,onKeyDown:a,onMouseUp:a,onFocus:a,onBlur:a,isAllowed:function(){return!0}},e.Z=h}}]);</pre></body></html>