UNPKG

@syncfusion/ej2-inputs

Version:

A package of Essential JS 2 input components such as Textbox, Color-picker, Masked-textbox, Numeric-textbox, Slider, Upload, and Form-validator that is used to get input from the users.

10 lines 434 kB
/*! * filename: ej2-inputs.min.js * version : 29.1.33 * Copyright Syncfusion Inc. 2001 - 2024. All rights reserved. * Use of this code is subject to the terms of our license. * A copy of the current license can be obtained at any time by e-mailing * licensing@syncfusion.com. Any infringement will be prosecuted under * applicable laws. */ this.ej=this.ej||{},this.ej.inputs=function(t,e,i,s,n){"use strict";function a(){if(e.attributes(this.element,{role:"textbox",autocomplete:"off",autocapitalize:"off",spellcheck:"false","aria-live":"assertive"}),this.mask){for(var t=this.mask.split("]"),i=0;i<t.length;i++)if("\\"===t[i][t[i].length-1]){t[i]=t[i]+"]";for(var s=t[i].split("["),n=0;n<s.length;n++)"\\"===s[n][s[n].length-1]&&(s[n]=s[n]+"["),v.call(this,s[n])}else if((s=t[i].split("[")).length>1)for(var a=!1,n=0;n<s.length;n++)"\\"===s[n]?(this.customRegExpCollec.push("["),this.hiddenMask+=s[n]+"["):""===s[n]?a=!0:""!==s[n]&&a||n===s.length-1?(this.customRegExpCollec.push("["+s[n]+"]"),this.hiddenMask+=this.promptChar,a=!1):v.call(this,s[n]);else v.call(this,s[0]);if(this.escapeMaskValue=this.hiddenMask,this.promptMask=this.hiddenMask.replace(/[09?LCAa#&]/g,this.promptChar),!e.isNullOrUndefined(this.customCharacters))for(i=0;i<this.promptMask.length;i++)e.isNullOrUndefined(this.customCharacters[this.promptMask[i]])||(this.promptMask=this.promptMask.replace(new RegExp(this.promptMask[i],"g"),this.promptChar));var r=0;if(this.hiddenMask.match(new RegExp(/\\/)))for(i=0;i<this.hiddenMask.length;i++){n=0;i>=1&&(n=i),n-=r=this.hiddenMask.length-this.promptMask.length,i>0&&"\\"!==this.hiddenMask[i-1]&&(">"===this.hiddenMask[i]||"<"===this.hiddenMask[i]||"|"===this.hiddenMask[i])&&(this.promptMask=this.promptMask.substring(0,n)+this.promptMask.substring(i+1-r,this.promptMask.length),this.escapeMaskValue=this.escapeMaskValue.substring(0,n)+this.escapeMaskValue.substring(i+1-r,this.escapeMaskValue.length)),"\\"===this.hiddenMask[i]&&(this.promptMask=this.promptMask.substring(0,n)+this.hiddenMask[i+1]+this.promptMask.substring(i+2-r,this.promptMask.length),this.escapeMaskValue=this.escapeMaskValue.substring(0,n)+this.escapeMaskValue[i+1]+this.escapeMaskValue.substring(i+2-r,this.escapeMaskValue.length))}else this.promptMask=this.promptMask.replace(/[>|<]/g,""),this.escapeMaskValue=this.hiddenMask.replace(/[>|<]/g,"");e.attributes(this.element,{"aria-invalid":"false"})}}function r(){W.call(this,this.promptMask),z.call(this,this.value)}function l(){e.EventHandler.add(this.element,"keydown",k,this),e.EventHandler.add(this.element,"keypress",A,this),e.EventHandler.add(this.element,"keyup",N,this),e.EventHandler.add(this.element,"input",P,this),e.EventHandler.add(this.element,"focus",y,this),e.EventHandler.add(this.element,"blur",E,this),e.EventHandler.add(this.element,"paste",S,this),e.EventHandler.add(this.element,"cut",x,this),e.EventHandler.add(this.element,"drop",T,this),e.EventHandler.add(this.element,"mousedown",f,this),e.EventHandler.add(this.element,"mouseup",g,this),this.enabled&&(h.call(this),this.formElement&&e.EventHandler.add(this.formElement,"reset",d,this))}function o(){e.EventHandler.remove(this.element,"keydown",k),e.EventHandler.remove(this.element,"keypress",A),e.EventHandler.remove(this.element,"keyup",N),e.EventHandler.remove(this.element,"input",P),e.EventHandler.remove(this.element,"focus",y),e.EventHandler.remove(this.element,"blur",E),e.EventHandler.remove(this.element,"paste",S),e.EventHandler.remove(this.element,"cut",x),e.EventHandler.remove(this.element,"drop",T),e.EventHandler.remove(this.element,"mousedown",f),e.EventHandler.remove(this.element,"mouseup",g),this.formElement&&e.EventHandler.remove(this.formElement,"reset",d)}function h(){this.showClearButton&&e.EventHandler.add(this.inputObj.clearButton,"mousedown touchstart",u,this)}function u(t){t.preventDefault(),this.inputObj.clearButton.classList.contains("e-clear-icon-hide")&&!this.inputObj.container.classList.contains("e-static-clear")||(p.call(this,t),this.value="")}function p(t){var e=this.element.value;W.call(this,this.promptMask),this.redoCollec.unshift({value:this.promptMask,startIndex:this.element.selectionStart,endIndex:this.element.selectionEnd}),H.call(this,t,e),this.element.setSelectionRange(0,0)}function d(){"EJS-MASKEDTEXTBOX"===this.element.tagName?W.call(this,this.promptMask):this.value=this.initInputValue}function c(t){return t.value}function m(t,i){var s="",n=0,a=!1,r=e.isNullOrUndefined(i)?e.isNullOrUndefined(t)||e.isNullOrUndefined(this)?i:t.value:i;if(r!==this.promptMask)for(var l=0;l<this.customRegExpCollec.length;l++)a&&(a=!1),">"!==this.customRegExpCollec[n]&&"<"!==this.customRegExpCollec[n]&&"|"!==this.customRegExpCollec[n]&&"\\"!==this.customRegExpCollec[n]||(--l,a=!0),a||r[l]!==this.promptChar&&!e.isNullOrUndefined(this.customRegExpCollec[n])&&(this._callPasteHandler||!e.isNullOrUndefined(this.regExpCollec[this.customRegExpCollec[n]])&&!this.maskedRegExp.includes(this.customRegExpCollec[n])||this.customRegExpCollec[n].length>2&&"["===this.customRegExpCollec[n][0]&&"]"===this.customRegExpCollec[n][this.customRegExpCollec[n].length-1]||!e.isNullOrUndefined(this.customCharacters)&&!e.isNullOrUndefined(this.customCharacters[this.customRegExpCollec[n]]))&&""!==r&&(s+=r[l]),++n;return(null===this.mask||""===this.mask&&void 0!==this.value)&&(s=r),s}function v(t){for(var i=0;i<t.length;i++)this.hiddenMask+=t[i],"\\"!==t[i]?this.customRegExpCollec.push(t[i]):"\\"!==t[i]||e.isNullOrUndefined(this.regExpCollec[t[i+1]])||this.maskedRegExp.push(t[i+1])}function f(){this.isClicked=!0}function g(){this.isClicked=!1}function y(t){var i=this,s=this.element,n=0,a=m.call(this,s),r=!1,l=!1,o={selectionStart:s.selectionStart,event:t,value:this.value,maskedValue:s.value,container:e.isNullOrUndefined(this.inputObj)?this.inputObj:this.inputObj.container,selectionEnd:s.selectionEnd};if(this.isClicked||b.call(this,o,s),this.mask&&(null!==a&&""!==a||"Always"===this.floatLabelType||null===this.placeholder||""===this.placeholder||(s.value=this.promptMask),setTimeout(function(){if(s.selectionStart===i.promptMask.length||s.value[s.selectionStart]===i.promptChar)r=!0;else for(var t=s.selectionStart;t<i.promptMask.length;t++){if(s.value[t]===i.promptChar){r=!0;break}if(s.value[t]!==i.promptMask[t]){r=!1;break}}}),setTimeout(function(){var t=s.selectionStart-1;if(t===i.promptMask.length-1||s.value[t]===i.promptChar)l=!0;else for(var e=t;e>=0;e--){if(s.value[e]===i.promptChar){l=!0;break}if(s.value[e]!==i.promptMask[e]){l=!1;break}}}),this.isClicked||"Always"!==this.floatLabelType&&(null===a||""===a)&&null!==this.placeholder&&""!==this.placeholder)){for(n=0;n<this.promptMask.length;n++)if(s.value[n]===this.promptChar){setTimeout(function(){(r||l)&&(s.selectionEnd=n,s.selectionStart=n),o={selectionStart:s.selectionStart,event:t,value:i.value,maskedValue:s.value,container:e.isNullOrUndefined(i.inputObj)?i.inputObj:i.inputObj.container,selectionEnd:s.selectionEnd},b.call(i,o,s)},110);break}e.isNullOrUndefined(s.value.match(C(this.promptChar)))&&(o={selectionStart:s.selectionStart,event:t,value:this.value,maskedValue:s.value,container:e.isNullOrUndefined(this.inputObj)?this.inputObj:this.inputObj.container,selectionEnd:s.selectionEnd},b.call(this,o,s)),this.isClicked=!1}}function b(t,e){this.trigger("focus",t,function(t){e.selectionStart=t.selectionStart,e.selectionEnd=t.selectionEnd})}function C(t){return e.isNullOrUndefined(t)?t:t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}function E(t){if(this.blurEventArgs={event:t,value:this.value,maskedValue:this.element.value,container:e.isNullOrUndefined(this.inputObj)?this.inputObj:this.inputObj.container},this.trigger("blur",this.blurEventArgs),this.mask&&(this.isFocus=!1,this.placeholder&&this.element.value===this.promptMask&&"Always"!==this.floatLabelType)){W.call(this,"");var i=this.element.parentNode.querySelector(".e-float-text");"Auto"===this.floatLabelType&&!e.isNullOrUndefined(i)&&i.classList.contains(lt)&&e.removeClass([i],lt)}}function S(t){var e=this;if(this.mask&&!this.readonly){var i=this.element.selectionStart,s=this.element.selectionEnd,n=this.element.value;W.call(this,""),this._callPasteHandler=!0,setTimeout(function(){var a=e.element.value.replace(/ /g,"");e.redoCollec.length>0&&e.redoCollec[0].value===e.element.value&&(a=m.call(e,e.element)),W.call(e,n),e.element.selectionStart=i,e.element.selectionEnd=s;var r=0;e.maskKeyPress=!0;do{R.call(e,a[r],!1,null),++r}while(r<a.length);if(e.maskKeyPress=!1,e._callPasteHandler=!1,e.element.value===n){var l=0;e.maskKeyPress=!0;do{R.call(e,a[l],!1,null),++l}while(l<a.length);e.maskKeyPress=!1}else H.call(e,t,n)},1)}}function x(t){var e=this;if(this.mask&&!this.readonly){var i=this.element.value,s=this.element.selectionStart,n=this.element.selectionEnd;this.undoCollec.push({value:this.element.value,startIndex:this.element.selectionStart,endIndex:this.element.selectionEnd});var a=this.element.value.substring(0,s)+this.promptMask.substring(s,n)+this.element.value.substring(n);setTimeout(function(){W.call(e,a),e.element.selectionStart=e.element.selectionEnd=s,e.element.value!==i&&H.call(e,t,null)},0)}}function T(t){t.preventDefault()}function P(t){if(!0!==e.Browser.isIE||""!==this.element.value||"Never"!==this.floatLabelType){var i={ctrlKey:!1,keyCode:229};if(e.extend(t,i),this.mask){if(""===this.element.value&&this.redoCollec.unshift({value:this.promptMask,startIndex:this.element.selectionStart,endIndex:this.element.selectionEnd}),1===this.element.value.length&&(this.element.value=this.element.value+this.promptMask,this.element.setSelectionRange(1,1)),this._callPasteHandler||L.call(this,t),this.element.value.length>this.promptMask.length){var s=this.element.selectionStart,n=this.element.value.length-this.promptMask.length,a=this.element.value.substring(s-n,s);this.maskKeyPress=!1;var r=0;do{R.call(this,a[r],t.ctrlKey,t),++r}while(r<a.length);this.element.value!==this.preEleVal&&H.call(this,t,null)}var l=m.call(this,this.element);this.prevValue=l,this.value=l,""===l&&(W.call(this,this.promptMask),this.element.setSelectionRange(0,0))}}}function k(t){if(this.mask&&!this.readonly){229!==t.keyCode&&(!t.ctrlKey||89!==t.keyCode&&90!==t.keyCode||t.preventDefault(),L.call(this,t));var e=this.element.value;if(t.ctrlKey&&(89===t.keyCode||90===t.keyCode)){var i=void 0;90===t.keyCode&&this.undoCollec.length>0&&e!==this.undoCollec[this.undoCollec.length-1].value?(i=this.undoCollec[this.undoCollec.length-1],this.redoCollec.unshift({value:this.element.value,startIndex:this.element.selectionStart,endIndex:this.element.selectionEnd}),W.call(this,i.value),this.element.selectionStart=i.startIndex,this.element.selectionEnd=i.endIndex,this.undoCollec.splice(this.undoCollec.length-1,1)):89===t.keyCode&&this.redoCollec.length>0&&e!==this.redoCollec[0].value&&(i=this.redoCollec[0],this.undoCollec.push({value:this.element.value,startIndex:this.element.selectionStart,endIndex:this.element.selectionEnd}),W.call(this,i.value),this.element.selectionStart=i.startIndex,this.element.selectionEnd=i.endIndex,this.redoCollec.splice(0,1))}}}function O(){var t,e=this.element.selectionStart,i=this.element.selectionEnd;this.redoCollec.length>0?(t=this.redoCollec[0],W.call(this,t.value),t.startIndex-e==1?(this.element.selectionStart=t.startIndex,this.element.selectionEnd=t.endIndex):(this.element.selectionStart=e+1,this.element.selectionEnd=i+1)):(W.call(this,this.promptMask),this.element.selectionStart=this.element.selectionEnd=e)}function w(t,e,i){return"input"===i.type&&(t=!1,e=this.element.value,W.call(this,this.promptMask),z.call(this,e)),t}function L(t){var i,s=!1,n=!1;this.element.value.length<this.promptMask.length&&(s=!0,i=this.element.value,s=w.call(this,s,i,t),O.call(this)),this.element.value.length>=this.promptMask.length&&"input"===t.type&&(s=w.call(this,s,i,t));var a=this.element.selectionStart,r=this.element.selectionEnd,l=this.element.selectionStart,o=this.element.selectionEnd,h=this.hiddenMask.replace(/[>|\\<]/g,""),u=h[l-1],p=this.element.selectionEnd;if(s||8===t.keyCode||46===t.keyCode){this.undoCollec.push({value:this.element.value,startIndex:this.element.selectionStart,endIndex:o});var d=!1,c=this.element.value;if(l>0||(8===t.keyCode||46===t.keyCode)&&l<this.element.value.length&&this.element.selectionEnd-l!==this.element.value.length){var m=l;l!==o?(l=o,46===t.keyCode&&(d=!0)):46===t.keyCode?++m:--m;for(var v=l;8===t.keyCode||s||d?v>m:v<m;8===t.keyCode||s||d?v--:v++)for(var f=l;8===t.keyCode||s||d?f>0:f<this.element.value.length;8===t.keyCode||s||d?f--:f++){var g=void 0;(8===t.keyCode||d)&&(a!==r&&a!==l||a===r)||s?(u=h[f-1],g=l-1):(u=h[f],g=l,++l);var y=this.element.value[g];if(e.isNullOrUndefined(this.regExpCollec[""+u])&&!e.isNullOrUndefined(this.customCharacters)&&e.isNullOrUndefined(this.customCharacters[""+u])&&this.hiddenMask[g]!==this.promptChar&&"["!==this.customRegExpCollec[g][0]&&"]"!==this.customRegExpCollec[g][this.customRegExpCollec[g].length-1]||this.promptMask[g]!==this.promptChar&&e.isNullOrUndefined(this.customCharacters))this.element.selectionStart=this.element.selectionEnd=g,t.preventDefault(),46!==t.keyCode||d||++this.element.selectionStart;else{var b=this.element.value,C=this.promptChar,E=b.substring(0,g)+C+b.substring(l,b.length);W.call(this,E),t.preventDefault(),46!==t.keyCode||d||g++,this.element.selectionStart=this.element.selectionEnd=g,n=!0}if(l=this.element.selectionStart,!n&&8===t.keyCode||d||!n&&46!==t.keyCode?g=l-1:(g=l,n=!1),y=this.element.value[g],a!==r&&this.element.selectionStart===a||this.promptMask[g]===this.promptChar||y!==this.promptMask[g]&&this.promptMask[g]!==this.promptChar&&!e.isNullOrUndefined(this.customCharacters))break}}46===t.keyCode&&d&&n&&(this.element.selectionStart=this.element.selectionEnd=p),0===this.element.selectionStart&&this.element.selectionEnd===this.element.value.length&&(W.call(this,this.promptMask),t.preventDefault(),this.element.selectionStart=this.element.selectionEnd=l),this.redoCollec.unshift({value:this.element.value,startIndex:this.element.selectionStart,endIndex:this.element.selectionEnd}),this.element.value!==c&&H.call(this,t,i)}}function A(t){if(this.mask&&!this.readonly){var e=this.element.value;if(!t.ctrlKey&&!t.metaKey||(t.ctrlKey||t.metaKey)&&"KeyA"!==t.code&&"KeyY"!==t.code&&"KeyZ"!==t.code&&"KeyX"!==t.code&&"KeyC"!==t.code&&"KeyV"!==t.code){this.maskKeyPress=!0;var i=t.key;"Spacebar"===i&&(i=String.fromCharCode(t.keyCode)),i?i&&1===i.length&&(R.call(this,i,t.ctrlKey,t),t.preventDefault()):(this.isIosInvalid=!0,R.call(this,String.fromCharCode(t.keyCode),t.ctrlKey,t),t.preventDefault(),this.isIosInvalid=!1),32===t.keyCode&&" "===i&&" "===this.promptChar&&(this.element.selectionStart=this.element.selectionEnd=this.element.selectionStart-i.length)}this.element.value!==e&&H.call(this,t,e)}}function H(t,i){var s=this.isProtectedOnChange;if(!e.isNullOrUndefined(this.changeEventArgs)&&!this.isInitial){var n={};this.changeEventArgs={value:this.element.value,maskedValue:this.element.value,isInteraction:!1,isInteracted:!1},this.mask&&(this.changeEventArgs.value=m.call(this,this.element)),e.isNullOrUndefined(t)||(this.changeEventArgs.isInteracted=!0,this.changeEventArgs.isInteraction=!0,this.changeEventArgs.event=t),this.isProtectedOnChange=!0,this.value=this.changeEventArgs.value,this.isProtectedOnChange=s,e.merge(n,this.changeEventArgs),this.isAngular&&this.preventChange?this.preventChange=!1:this.trigger("change",n)}this.preEleVal=this.element.value,this.prevValue=m.call(this,this.element)}function N(t){if(this.mask&&!this.readonly){var i=void 0;if(this.maskKeyPress||229!==t.keyCode)M.call(this);else{var s=void 0;if(1===this.element.value.length&&(this.element.value=this.element.value+this.promptMask,this.element.setSelectionRange(1,1)),this.element.value.length>this.promptMask.length){var n=this.element.selectionStart,a=this.element.value.length-this.promptMask.length,r=this.element.value.substring(n-a,n);if(this.undoCollec.length>0){i=this.undoCollec[this.undoCollec.length-1];var l=this.element.selectionStart;s=i.value;var o=i.value.substring(l-a,l);i=this.redoCollec[0],r=r.trim();var h=e.Browser.isAndroid&&""===r;h||o===r||i.value.substring(l-a,l)===r?h&&V.call(this,t,l-1,this.element.selectionEnd-1,r,t.ctrlKey,!1):R.call(this,r,t.ctrlKey,t)}else s=this.promptMask,R.call(this,r,t.ctrlKey,t);this.maskKeyPress=!1,H.call(this,t,s)}}var u=m.call(this,this.element);(0!==this.element.selectionStart||this.promptMask!==this.element.value||""!==u||""===u&&this.value!==u)&&(this.prevValue=u,this.value=u)}else H.call(this,t);if(0===this.element.selectionStart&&0===this.element.selectionEnd){var p=this.element;setTimeout(function(){p.setSelectionRange(0,0)},0)}}function B(t){if(t.length>1&&this.promptMask.length+t.length<this.element.value.length){var e=this.redoCollec[0].value.substring(0,this.redoCollec[0].startIndex)+t+this.redoCollec[0].value.substring(this.redoCollec[0].startIndex,this.redoCollec[0].value.length);W.call(this,e),this.element.selectionStart=this.element.selectionEnd=this.redoCollec[0].startIndex+t.length}this.element.selectionStart=this.element.selectionStart-t.length,this.element.selectionEnd=this.element.selectionEnd-t.length}function I(t){this.maskKeyPress||B.call(this,t)}function R(t,i,s){if(I.call(this,t),!e.isNullOrUndefined(this)&&!e.isNullOrUndefined(t))for(var n,a,r=this.element.selectionStart,l=r,o=!1,h=this.element.value,u=!1,p=!1,d=0;d<t.length;d++){var c=t[d];if(r=this.element.selectionStart,this.maskKeyPress||l!==r||(r+=d),!this.maskKeyPress||r<this.promptMask.length){for(v=r;v<this.promptMask.length;v++)n=this.escapeMaskValue[r],"\\"===this.hiddenMask[r]&&this.hiddenMask[r+1]===t&&(p=!0),(e.isNullOrUndefined(this.regExpCollec[""+n])&&(e.isNullOrUndefined(this.customCharacters)||!e.isNullOrUndefined(this.customCharacters)&&e.isNullOrUndefined(this.customCharacters[""+n]))&&this.hiddenMask[r]!==this.promptChar&&"["!==this.customRegExpCollec[r][0]&&"]"!==this.customRegExpCollec[r][this.customRegExpCollec[r].length-1]||this.promptMask[r]!==this.promptChar&&e.isNullOrUndefined(this.customCharacters)||this.promptChar===n&&this.escapeMaskValue===this.mask)&&(this.element.selectionStart=this.element.selectionEnd=r+1,r=this.element.selectionStart,n=this.hiddenMask[r]);if(e.isNullOrUndefined(this.customCharacters)||e.isNullOrUndefined(this.customCharacters[""+n]))!e.isNullOrUndefined(this.regExpCollec[""+n])&&c.match(new RegExp(this.regExpCollec[""+n]))&&this.promptMask[r]===this.promptChar?o=!0:this.promptMask[r]===this.promptChar&&"["===this.customRegExpCollec[r][0]&&"]"===this.customRegExpCollec[r][this.customRegExpCollec[r].length-1]&&c.match(new RegExp(this.customRegExpCollec[r]))&&(o=!0);else for(var m=this.customCharacters[""+n].split(","),v=0;v<m.length;v++)if(c.match(new RegExp("["+m[v]+"]"))){o=!0;break}if((!this.maskKeyPress||r<this.hiddenMask.length)&&o){if(0===d)if(this.maskKeyPress)this.undoCollec.push({value:h,startIndex:r,endIndex:r});else{var f=this.element.selectionStart,g=this.element.selectionEnd;this.redoCollec.length>0?(a=this.redoCollec[0].value,W.call(this,a),this.undoCollec.push(this.redoCollec[0])):(this.undoCollec.push({value:this.promptMask,startIndex:r,endIndex:r}),a=this.promptMask,W.call(this,a)),this.element.selectionStart=f,this.element.selectionEnd=g}r=this.element.selectionStart,U.call(this,s,r,c,a,p),u=!0,d===t.length-1&&this.redoCollec.unshift({value:this.element.value,startIndex:this.element.selectionStart,endIndex:this.element.selectionEnd}),o=!1}else r=this.element.selectionStart,V.call(this,s,r,l,t,i,u);d!==t.length-1||o||(!e.Browser.isAndroid||e.Browser.isAndroid&&r<this.promptMask.length)&&this.redoCollec.unshift({value:this.element.value,startIndex:this.element.selectionStart,endIndex:this.element.selectionEnd})}else 1!==t.length||i||e.isNullOrUndefined(s)||F.call(this)}}function U(t,e,i,s,n){if(this.hiddenMask.length>this.promptMask.length&&(i=D.call(this,i,this.element.value)),!n){var a=this.element.value,r=a.substring(0,e)+i+a.substring(e+1,a.length);W.call(this,r),this.element.selectionStart=this.element.selectionEnd=e+1}}function V(t,i,s,n,a,r){if(!this.maskKeyPress){var l=this.element.value;i>=this.promptMask.length?W.call(this,l.substring(0,i)):(s===i?W.call(this,l.substring(0,i)+l.substring(i+1,l.length)):this.promptMask.length===this.element.value.length?W.call(this,l.substring(0,i)+l.substring(i,l.length)):W.call(this,l.substring(0,s)+l.substring(s+1,l.length)),this.element.selectionStart=this.element.selectionEnd=r||this.element.value[s]!==this.promptChar?i:s),F.call(this)}1!==n.length||a||e.isNullOrUndefined(t)||F.call(this)}function F(){var t=this,i=this.element.parentNode,s=200;i.classList.contains(nt)||i.classList.contains(at)?e.addClass([i],st):e.addClass([this.element],st),!0===this.isIosInvalid&&(s=400),e.attributes(this.element,{"aria-invalid":"true"}),setTimeout(function(){t.maskKeyPress||M.call(t)},s)}function M(){var t=this.element.parentNode;e.isNullOrUndefined(t)||e.removeClass([t],st),e.removeClass([this.element],st),e.attributes(this.element,{"aria-invalid":"false"})}function D(t,e){var i,s,n=e,a=0;for(s=0;s<this.hiddenMask.length;s++)if("\\"===this.hiddenMask[s]&&(i=n.substring(0,s)+"\\"+n.substring(s,n.length)),">"!==this.hiddenMask[s]&&"<"!==this.hiddenMask[s]&&"|"!==this.hiddenMask[s]||(this.hiddenMask[s]!==n[s]&&(i=n.substring(0,s)+this.hiddenMask[s]+n.substring(s,n.length)),++a),i){if(i[s]===this.promptChar&&s>this.element.selectionStart||this.element.value.indexOf(this.promptChar)<0&&this.element.selectionStart+a===s){a=0;break}n=i}for(;s>=0&&i;){if(0===s||"\\"!==i[s-1]){if(">"===i[s]){t=t.toUpperCase();break}if("<"===i[s]){t=t.toLowerCase();break}if("|"===i[s])break}--s}return t}function z(t){if(this.mask&&void 0!==t&&(void 0===this.prevValue||this.prevValue!==t)){if(this.maskKeyPress=!0,W.call(this,this.promptMask),""===t||null===t&&"Never"===this.floatLabelType&&this.placeholder||(this.element.selectionStart=0,this.element.selectionEnd=0),null!==t)for(var i=0;i<t.length;i++)R.call(this,t[i],!1,null);var s=m.call(this,this.element);this.prevValue=s,this.value=s,H.call(this,null,null),this.maskKeyPress=!1;var n=this.element.parentNode.querySelector(".e-float-text");this.element.value===this.promptMask&&"Auto"===this.floatLabelType&&this.placeholder&&!e.isNullOrUndefined(n)&&n.classList.contains(lt)&&!this.isFocus&&(e.removeClass([n],lt),e.addClass([n],ot),W.call(this,""))}(null===this.mask||""===this.mask&&void 0!==this.value)&&W.call(this,this.value)}function W(i,s){!this.isFocus&&"Auto"===this.floatLabelType&&this.placeholder&&e.isNullOrUndefined(this.value)&&(i="");var n=m.call(this,s||this.element,i);null===n||""===n?(t.Input.setValue(i,s||this.element,this.floatLabelType,!1),this.showClearButton&&this.inputObj.clearButton.classList.add("e-clear-icon-hide")):t.Input.setValue(i,s||this.element,this.floatLabelType,this.showClearButton)}function q(t){var e=j(t);r.call(e);var i=m.call(this,this.element);this.prevValue=i,this.value=i,t.mask&&(o.call(e),l.call(e))}function j(t){e.addClass([t.element],rt);var i={element:t.element,mask:t.mask,promptMask:"",hiddenMask:"",escapeMaskValue:"",promptChar:t.promptChar?t.promptChar.length>1?t.promptChar=t.promptChar[0]:t.promptChar:"_",value:t.value?t.value:null,regExpCollec:ht,customRegExpCollec:[],customCharacters:t.customCharacters,undoCollec:[],redoCollec:[],maskKeyPress:!1,prevValue:""};return a.call(i),i}function _(t){return m.call(K(t),t.element)}function X(t){return c.call(K(t),t.element)}function K(t){var i;return!e.isNullOrUndefined(t)&&t.element.classList.contains(rt)&&(i=j(t)),i}var Y={RTL:"e-rtl",DISABLE:"e-disabled",INPUT:"e-input",TEXTAREA:"e-multi-line-input",INPUTGROUP:"e-input-group",FLOATINPUT:"e-float-input",FLOATLINE:"e-float-line",FLOATTEXT:"e-float-text",FLOATTEXTCONTENT:"e-float-text-content",CLEARICON:"e-clear-icon",CLEARICONHIDE:"e-clear-icon-hide",LABELTOP:"e-label-top",LABELBOTTOM:"e-label-bottom",NOFLOATLABEL:"e-no-float-label",INPUTCUSTOMTAG:"e-input-custom-tag",FLOATCUSTOMTAG:"e-float-custom-tag"},Z=["title","style","class"];!function(t){function i(t,i){t.element.__eventHandlers={};var s=e.isNullOrUndefined(i)?e.createElement:i,n={container:null,buttons:[],clearButton:null};if(pt=t.floatLabelType,dt=t.bindClearAction,e.isNullOrUndefined(t.floatLabelType)||"Never"===t.floatLabelType?(n.container=H(t,Y.INPUTGROUP,Y.INPUTCUSTOMTAG,"span",s),t.element.parentNode.insertBefore(n.container,t.element),e.addClass([t.element],Y.INPUT),n.container.appendChild(t.element)):v(t,n,s),r(t),e.isNullOrUndefined(t.properties)||e.isNullOrUndefined(t.properties.showClearButton)||!t.properties.showClearButton||(z(t.properties.showClearButton,t.element,n,!0,s),n.clearButton.setAttribute("role","button"),n.container.classList.contains(Y.FLOATINPUT)&&e.addClass([n.container],Y.INPUTGROUP)),!e.isNullOrUndefined(t.buttons))for(var a=0;a<t.buttons.length;a++)n.buttons.push(nt(t.buttons[a],n.container,s));return e.isNullOrUndefined(t.element)||"TEXTAREA"!==t.element.tagName||e.addClass([n.container],Y.TEXTAREA),at(n.container,t.element),n=y(t,n),X(n.container,s),n}function s(e){var i=E(e.element);(i.classList.contains("e-input-group")||i.classList.contains("e-outline")||i.classList.contains("e-filled"))&&i.classList.add("e-input-focus"),"Never"!==e.floatLabelType&&setTimeout(function(){t.calculateWidth(e.element,i)},80)}function n(e){var i=E(e.element);(i.classList.contains("e-input-group")||i.classList.contains("e-outline")||i.classList.contains("e-filled"))&&i.classList.remove("e-input-focus"),"Never"!==e.floatLabelType&&setTimeout(function(){t.calculateWidth(e.element,i)},80)}function a(t){o(t.floatLabelType,t.element)}function r(t){o(t.floatLabelType,t.element);var e=function(){return s(t)},i=function(){return n(t)},r=function(){return a(t)};t.element.addEventListener("focus",e),t.element.addEventListener("blur",i),t.element.addEventListener("input",r),t.element.__eventHandlers.inputFocusHandler={focusHandler:e},t.element.__eventHandlers.inputBlurHandler={blurHandler:i},t.element.__eventHandlers.inputHandler={inputHandler:r}}function l(t){if(!e.isNullOrUndefined(t.element)&&!(e.isNullOrUndefined(t.element.__eventHandlers)||e.isNullOrUndefined(t.element.__eventHandlers.inputFocusHandler)||e.isNullOrUndefined(t.element.__eventHandlers.inputBlurHandler)||e.isNullOrUndefined(t.element.__eventHandlers.inputHandler))){var i=t.element.__eventHandlers.inputFocusHandler.focusHandler,s=t.element.__eventHandlers.inputBlurHandler.blurHandler,n=t.element.__eventHandlers.inputHandler.inputHandler;t.element.removeEventListener("focus",i),t.element.removeEventListener("blur",s),t.element.removeEventListener("input",n),delete t.element.__eventHandlers.inputFocusHandler,delete t.element.__eventHandlers.inputBlurHandler,delete t.element.__eventHandlers.inputHandler}}function o(t,i){var s=i.value,n=i.parentElement,a=n&&n.parentElement;""===s||e.isNullOrUndefined(s)?"Always"!==t&&(n&&n.classList.contains("e-input-group")?n.classList.remove("e-valid-input"):a&&a.classList.contains("e-input-group")&&a.classList.remove("e-valid-input")):n&&n.classList.contains("e-input-group")?n.classList.add("e-valid-input"):a&&a.classList.contains("e-input-group")&&a.classList.add("e-valid-input")}function h(){var t=E(this).getElementsByClassName("e-float-text")[0];e.isNullOrUndefined(t)||(e.addClass([t],Y.LABELTOP),t.classList.contains(Y.LABELBOTTOM)&&e.removeClass([t],Y.LABELBOTTOM))}function u(){var t=E(this);if(t.getElementsByTagName("textarea")[0]?""===t.getElementsByTagName("textarea")[0].value:""===t.getElementsByTagName("input")[0].value){var i=t.getElementsByClassName("e-float-text")[0];e.isNullOrUndefined(i)||(i.classList.contains(Y.LABELTOP)&&e.removeClass([i],Y.LABELTOP),e.addClass([i],Y.LABELBOTTOM))}}function p(t){t.addEventListener("focus",h),t.addEventListener("blur",u)}function d(t){e.isNullOrUndefined(t)||(t.removeEventListener("focus",h),t.removeEventListener("blur",u))}function c(t){A(t.element,t.floatLabelType)}function m(t){A(t.element,t.floatLabelType)}function v(t,i,s){var n=e.isNullOrUndefined(s)?e.createElement:s;"Auto"===t.floatLabelType&&p(t.element),e.isNullOrUndefined(i.container)?(i.container=H(t,Y.FLOATINPUT,Y.FLOATCUSTOMTAG,"div",n),i.container.classList.add(Y.INPUTGROUP),t.element.parentNode&&t.element.parentNode.insertBefore(i.container,t.element)):(e.isNullOrUndefined(t.customTag)||i.container.classList.add(Y.FLOATCUSTOMTAG),i.container.classList.add(Y.FLOATINPUT));var a=n("span",{className:Y.FLOATLINE}),r=n("label",{className:Y.FLOATTEXT});if(e.isNullOrUndefined(t.element.id)||""===t.element.id||(r.id="label_"+t.element.id.replace(/ /g,"_"),e.attributes(t.element,{"aria-labelledby":r.id})),e.isNullOrUndefined(t.element.placeholder)||""===t.element.placeholder||(r.innerText=N(t.element.placeholder),t.element.removeAttribute("placeholder")),e.isNullOrUndefined(t.properties)||e.isNullOrUndefined(t.properties.placeholder)||""===t.properties.placeholder||(r.innerText=N(t.properties.placeholder)),r.innerText||i.container.classList.add(Y.NOFLOATLABEL),i.container.classList.contains("e-float-icon-left")){var l=i.container.querySelector(".e-input-in-wrap");l.appendChild(t.element),l.appendChild(a),l.appendChild(r)}else i.container.appendChild(t.element),i.container.appendChild(a),i.container.appendChild(r);if(C(t.element.value,r),"Always"===t.floatLabelType&&(r.classList.contains(Y.LABELBOTTOM)&&e.removeClass([r],Y.LABELBOTTOM),e.addClass([r],Y.LABELTOP)),"Auto"===t.floatLabelType){var o=function(){return c(t)},h=function(){return m(t)};t.element.addEventListener("input",o),t.element.addEventListener("blur",h),t.element.__eventHandlers.floatInputHandler={inputFloatHandler:o},t.element.__eventHandlers.floatBlurHandler={blurFloatHandler:h}}else f(t);e.isNullOrUndefined(t.element.getAttribute("id"))||r.setAttribute("for",t.element.getAttribute("id"))}function f(t){if(!(e.isNullOrUndefined(t.element)||e.isNullOrUndefined(t.element.__eventHandlers)||e.isNullOrUndefined(t.element.__eventHandlers.floatInputHandler)||e.isNullOrUndefined(t.element.__eventHandlers.floatBlurHandler))){var i=t.element.__eventHandlers.floatInputHandler.inputFloatHandler,s=t.element.__eventHandlers.floatBlurHandler.blurFloatHandler;t.element.removeEventListener("input",i),t.element.removeEventListener("blur",s),delete t.element.__eventHandlers.floatInputHandler,delete t.element.__eventHandlers.floatBlurHandler}}function g(t,e){"Always"===t&&e.classList.contains("e-outline")&&e.classList.add("e-valid-input")}function y(t,i){if(!e.isNullOrUndefined(t.properties))for(var s=0,n=Object.keys(t.properties);s<n.length;s++)switch(n[s]){case"cssClass":I(t.properties.cssClass,[i.container]),g(t.floatLabelType,i.container);break;case"enabled":D(t.properties.enabled,t.element,t.floatLabelType,i.container);break;case"enableRtl":M(t.properties.enableRtl,[i.container]);break;case"placeholder":V(t.properties.placeholder,t.element);break;case"readonly":F(t.properties.readonly,t.element)}return i}function b(t,i,s){e.isNullOrUndefined(i)||(t&&!s?e.removeClass([i],Y.CLEARICONHIDE):e.addClass([i],Y.CLEARICONHIDE))}function C(t,i,s){void 0===s&&(s=null),t?(e.addClass([i],Y.LABELTOP),i.classList.contains(Y.LABELBOTTOM)&&e.removeClass([i],Y.LABELBOTTOM)):(null==s||s!==document.activeElement)&&(i.classList.contains(Y.LABELTOP)&&e.removeClass([i],Y.LABELTOP),e.addClass([i],Y.LABELBOTTOM))}function E(t){var i=e.isNullOrUndefined(t.parentNode)?t:t.parentNode;return i&&i.classList.contains("e-input-in-wrap")&&(i=i.parentNode),i}function S(t,i,s,n){var a=(e.isNullOrUndefined(n)?e.createElement:n)("span",{className:Y.CLEARICON}),r=i.container;return e.isNullOrUndefined(s)?(i.container.classList.contains(Y.FLOATINPUT)?i.container.querySelector("."+Y.FLOATTEXT):t).insertAdjacentElement("afterend",a):r.appendChild(a),e.addClass([a],Y.CLEARICONHIDE),O(t,a),a.setAttribute("aria-label","close"),a}function x(t,i,s){i.classList.contains(Y.DISABLE)||i.readOnly||(t.preventDefault(),i!==document.activeElement&&i.focus(),i.value="",e.addClass([s],Y.CLEARICONHIDE))}function T(t,e){b(t.value,e)}function P(t,e){b(t.value,e,t.readOnly)}function k(t,i){setTimeout(function(){e.isNullOrUndefined(i)||(e.addClass([i],Y.CLEARICONHIDE),i=!e.isNullOrUndefined(t)&&t.classList.contains("e-combobox")?null:i)},200)}function O(t,e,i){if(void 0===dt||dt){var s=function(i){return x(i,t,e)};e.addEventListener("click",s),t.__eventHandlers.clearClickHandler={clickHandlerEvent:s}}var n=function(){return T(t,e)},a=function(){return P(t,e)},r=function(){return k(t,e)};t.addEventListener("input",n),t.addEventListener("focus",a),t.addEventListener("blur",r),t.__eventHandlers.clearInputHandler={inputHandlerEvent:n},t.__eventHandlers.clearFocusHandler={focusHandlerEvent:a},t.__eventHandlers.clearBlurHandler={blurHandlerEvent:r}}function w(t,i){if(!e.isNullOrUndefined(t)&&!e.isNullOrUndefined(t.__eventHandlers)){if(!e.isNullOrUndefined(t.__eventHandlers.clearClickHandler)){var s=t.__eventHandlers.clearClickHandler.clickHandlerEvent;(void 0===dt||dt)&&(e.isNullOrUndefined(i)||i.removeEventListener("click",s)),delete t.__eventHandlers.clearClickHandler}if(!e.isNullOrUndefined(t.__eventHandlers.clearInputHandler)&&!e.isNullOrUndefined(t.__eventHandlers.clearFocusHandler)&&!e.isNullOrUndefined(t.__eventHandlers.clearBlurHandler)){var n=t.__eventHandlers.clearInputHandler.inputHandlerEvent,a=t.__eventHandlers.clearFocusHandler.focusHandlerEvent,r=t.__eventHandlers.clearBlurHandler.blurHandlerEvent;t.removeEventListener("input",n),t.removeEventListener("focus",a),t.removeEventListener("blur",r),delete t.__eventHandlers.clearInputHandler,delete t.__eventHandlers.clearFocusHandler,delete t.__eventHandlers.clearBlurHandler}}}function L(t,i){void 0===i&&(i=null),l(t),"Auto"===t.floatLabelType&&f(t),t.properties.showClearButton&&w(t.element,i),e.isNullOrUndefined(t.buttons)||G(!1,null,t.buttons),d(t.element),e.isNullOrUndefined(t.element)||(delete t.element.__eventHandlers,t.element.classList.contains(Y.INPUT)&&t.element.classList.remove(Y.INPUT))}function A(t,e){if(E(t).classList.contains(Y.FLOATINPUT)&&"Auto"===e){var i=E(t).getElementsByClassName("e-float-text")[0];C(t.value,i,t)}}function H(t,i,s,n,a){var r,l=e.isNullOrUndefined(a)?e.createElement:a;return e.isNullOrUndefined(t.customTag)?r=l(n,{className:i}):(r=l(t.customTag,{className:i})).classList.add(s),r.classList.add("e-control-wrapper"),r}function N(t){var i="";if(!e.isNullOrUndefined(t)&&""!==t){var s=document.createElement("span");s.innerHTML='<input placeholder="'+t+'"/>',i=s.children[0].placeholder}return i}function B(t,i,s,n){if(i.value=t,"Never"!==s&&R(i,i.parentElement),e.isNullOrUndefined(s)||"Auto"!==s||A(i,s),!e.isNullOrUndefined(n)&&n){var a=E(i);if(!e.isNullOrUndefined(a)){var r=a.getElementsByClassName(Y.CLEARICON)[0];e.isNullOrUndefined(r)||(i.value&&!e.isNullOrUndefined(a)&&a.classList.contains("e-input-focus")?e.removeClass([r],Y.CLEARICONHIDE):e.addClass([r],Y.CLEARICONHIDE))}}o(s,i)}function I(t,i,s){e.isNullOrUndefined(s)||""===s||e.removeClass(i,s.split(" ")),e.isNullOrUndefined(t)||""===t||e.addClass(i,t.split(" "))}function R(t,i,s){if("multiselect"===s||$(t)){var n="multiselect"===s?t:t.clientWidth-parseInt(getComputedStyle(t,null).getPropertyValue("padding-left"),10);e.isNullOrUndefined(i)||e.isNullOrUndefined(i.getElementsByClassName("e-float-text-content")[0])||(i.getElementsByClassName("e-float-text-content")[0].classList.contains("e-float-text-overflow")&&i.getElementsByClassName("e-float-text-content")[0].classList.remove("e-float-text-overflow"),(n<i.getElementsByClassName("e-float-text-content")[0].clientWidth||n===i.getElementsByClassName("e-float-text-content")[0].clientWidth)&&i.getElementsByClassName("e-float-text-content")[0].classList.add("e-float-text-overflow"))}}function U(t,i){"number"==typeof t?i.style.width=e.formatUnit(t):"string"==typeof t&&(i.style.width=t.match(/px|%|em/)?t:e.formatUnit(t)),R(i.firstChild,i)}function V(t,i){t=N(t);var s=E(i);if(s.classList.contains(Y.FLOATINPUT))if(e.isNullOrUndefined(t)||""===t){s.classList.add(Y.NOFLOATLABEL);var n=s.getElementsByClassName("e-float-text-content")[0];n?n.children[0].textContent="":s.getElementsByClassName(Y.FLOATTEXT)[0].textContent=""}else(n=s.getElementsByClassName("e-float-text-content")[0])&&n.children[0]?n.children[0].textContent=t:s.getElementsByClassName(Y.FLOATTEXT)[0].textContent=t,s.classList.remove(Y.NOFLOATLABEL),i.removeAttribute("placeholder");else e.isNullOrUndefined(t)||""===t?i.removeAttribute("placeholder"):e.attributes(i,{placeholder:t})}function F(t,i,s){t?e.attributes(i,{readonly:""}):i.removeAttribute("readonly"),e.isNullOrUndefined(s)||A(i,s)}function M(t,i){t?e.addClass(i,Y.RTL):e.removeClass(i,Y.RTL)}function D(t,i,s,n){var a={disabled:"","aria-disabled":"true"},r=!e.isNullOrUndefined(n);t?(i.classList.remove(Y.DISABLE),W(a,i),r&&e.removeClass([n],Y.DISABLE)):(i.classList.add(Y.DISABLE),q(a,i),r&&e.addClass([n],Y.DISABLE)),e.isNullOrUndefined(s)||A(i,s)}function z(t,i,s,n,a){var r=e.isNullOrUndefined(a)?e.createElement:a;t?s.clearButton=S(i,s,n,r):(e.remove(s.clearButton),s.clearButton=null)}function W(t,e){for(var i=0,s=Object.keys(t);i<s.length;i++){var n=s[i],a=E(e);"disabled"===n&&e.classList.remove(Y.DISABLE),"disabled"===n&&a.classList.contains(Y.INPUTGROUP)&&a.classList.remove(Y.DISABLE),"placeholder"===n&&a.classList.contains(Y.FLOATINPUT)?a.getElementsByClassName(Y.FLOATTEXT)[0].textContent="":e.removeAttribute(n)}}function q(t,e){for(var i=0,s=Object.keys(t);i<s.length;i++){var n=s[i],a=E(e);"disabled"===n&&e.classList.add(Y.DISABLE),"disabled"===n&&a.classList.contains(Y.INPUTGROUP)&&a.classList.add(Y.DISABLE),"placeholder"===n&&a.classList.contains(Y.FLOATINPUT)?a.getElementsByClassName(Y.FLOATTEXT)[0].textContent=t[""+n]:e.setAttribute(n,t[""+n])}}function j(t){var i=t.container;if(!e.isNullOrUndefined(i)&&i.classList.contains(Y.FLOATINPUT)){var s=i.querySelector("textarea")?i.querySelector("textarea"):i.querySelector("input"),n=i.querySelector("."+Y.FLOATTEXT).textContent,a=null!==i.querySelector(".e-clear-icon");e.detach(i.querySelector("."+Y.FLOATLINE)),e.detach(i.querySelector("."+Y.FLOATTEXT)),e.classList(i,[Y.INPUTGROUP],[Y.FLOATINPUT]),d(s),e.attributes(s,{placeholder:n}),s.classList.add(Y.INPUT),a||"INPUT"!==s.tagName||s.removeAttribute("required")}}function _(t,i,s,n){var a=e.isNullOrUndefined(n)?e.createElement:n,r=e.closest(t,"."+Y.INPUTGROUP);pt=i;var l=r.tagName,o={element:t,floatLabelType:i,customTag:l="DIV"!==l&&"SPAN"!==l?l:null,properties:{placeholder:s}};if("Never"!==i){var h=r.querySelector(".e-clear-icon"),u={container:r};t.classList.remove(Y.INPUT),v(o,u,a),X(u.container,a),R(o.element,u.container);var p=r.classList.contains("e-float-icon-left");if(e.isNullOrUndefined(h)&&(h=p?r.querySelector(".e-input-in-wrap").querySelector(".e-input-group-icon"):r.querySelector(".e-input-group-icon")),e.isNullOrUndefined(h))p&&(h=r.querySelector(".e-input-group-icon"));else{var d=r.querySelector("."+Y.FLOATLINE),c=r.querySelector("."+Y.FLOATTEXT),m=p?r.querySelector(".e-input-in-wrap"):r;m.insertBefore(t,h),m.insertBefore(d,h),m.insertBefore(c,h)}}else f(o);g(i,t.parentElement)}function X(t,e){if(t.classList.contains("e-outline")&&t.getElementsByClassName("e-float-text")[0]){var i=e("span",{className:Y.FLOATTEXTCONTENT});i.innerHTML=t.getElementsByClassName("e-float-text")[0].innerHTML,t.getElementsByClassName("e-float-text")[0].innerHTML="",t.getElementsByClassName("e-float-text")[0].appendChild(i)}}function K(t,e){for(var i=0;i<e.length;i++)G(t,e[parseInt(i.toString(),10)].container)}function G(t,i,s){var n=[];n.push(s);var a=e.isNullOrUndefined(s)?i.querySelectorAll(".e-input-group-icon"):n;if(t&&a.length>0)for(r=0;r<a.length;r++)a[parseInt(r.toString(),10)].addEventListener("mousedown",Q,!1),a[parseInt(r.toString(),10)].addEventListener("mouseup",tt,!1);else if(a.length>0)for(var r=0;r<a.length;r++)a[parseInt(r.toString(),10)].removeEventListener("mousedown",Q,this),a[parseInt(r.toString(),10)].removeEventListener("mouseup",tt,this)}function J(t,e){t.classList.contains("e-disabled")||t.querySelector("input").readOnly||e.classList.add("e-input-btn-ripple")}function $(t){if(!t)return!1;for(var e=t;e&&e!==document.body;){if("none"===window.getComputedStyle(e).display)return!1;e=e.parentElement}return!0}function Q(){for(var t=this,e=this.parentElement;!e.classList.contains("e-input-group");)e=e.parentElement;J(e,t)}function tt(){var t=this;setTimeout(function(){t.classList.remove("e-input-btn-ripple")},500)}function et(t,e){var i=e("span",{className:t});return i.classList.add("e-input-group-icon"),i}function it(t,e,i,s,n){var a="string"==typeof e?e.split(","):e;if("append"===t.toLowerCase())for(var r=0,l=a;r<l.length;r++)nt(u=l[r],i,n);else for(var o=0,h=a;o<h.length;o++){var u=h[o];st(u,i,s,n)}i.getElementsByClassName("e-input-group-icon")[0]&&i.getElementsByClassName("e-float-text-overflow")[0]&&i.getElementsByClassName("e-float-text-overflow")[0].classList.add("e-icon")}function st(t,i,s,n){var a=e.isNullOrUndefined(n)?e.createElement:n,r=et(t,a);i.classList.add("e-float-icon-left");var l=i.querySelector(".e-input-in-wrap");if(e.isNullOrUndefined(l)){l=a("span",{className:"e-input-in-wrap"}),s.parentNode.insertBefore(l,s);var o=i.querySelectorAll(s.tagName+" ~ *");l.appendChild(s);for(var h=0;h<o.length;h++){var u=o[parseInt(h.toString(),10)],p=l.parentElement;u.classList.contains("e-float-line")&&(p&&p.classList.contains("e-filled")||!p)||l.appendChild(u)}}return l.parentNode.insertBefore(r,l),G(!0,i,r),r}function nt(t,i,s){var n=et(t,e.isNullOrUndefined(s)?e.createElement:s);return(i.classList.contains("e-float-icon-left")?i.querySelector(".e-input-in-wrap"):i).appendChild(n),G(!0,i,n),n}function at(t,e){"hidden"===e.type?t.classList.add("e-hidden"):t.classList.contains("e-hidden")&&t.classList.remove("e-hidden")}function rt(t,i){if(!e.isNullOrUndefined(t))for(var s=0,n=Object.keys(t);s<n.length;s++){var a=n[s];Z.indexOf(a)<0&&i.setAttribute(a,t[""+a])}}function lt(t,e,i){I(ot(t),[i],ot(e))}function ot(t){var i=t;return e.isNullOrUndefined(t)||""===t||(i=t.replace(/\s+/g," ").trim()),i}function ht(t,i){if(!e.isNullOrUndefined(t))for(var s=0,n=Object.keys(t);s<n.length;s++){var a=n[s];if(Z.indexOf(a)>-1)if("class"===a){var r=this.getInputValidClassList(t[""+a]);""!==r&&e.addClass([i],r.split(" "))}else if("style"===a){var l=i.getAttribute(a);l=e.isNullOrUndefined(l)?t[""+a]:l+t[""+a],i.setAttribute(a,l)}else i.setAttribute(a,t[""+a])}}function ut(t){return!t||/^\s*$/.test(t)}var pt,dt=!0;t.createInput=i,t.bindInitialEvent=r,t.wireFloatingEvents=p,t.wireClearBtnEvents=O,t.destroy=L,t.setValue=B,t.setCssClass=I,t.calculateWidth=R,t.setWidth=U,t.setPlaceholder=V,t.setReadonly=F,t.setEnableRtl=M,t.setEnabled=D,t.setClearButton=z,t.removeAttributes=W,t.addAttributes=q,t.removeFloating=j,t.addFloating=_,t.createSpanElement=X,t.setRipple=K,t.addIcon=it,t.prependSpan=st,t.appendSpan=nt,t.validateInputType=at,t.updateHTMLAttributesToElement=rt,t.updateCssClass=lt,t.getInputValidClassList=ot,t.updateHTMLAttributesToWrapper=ht,t.isBlank=ut}(t.Input||(t.Input={}));var G=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function s(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),J=function(t,e,i,s){var n,a=arguments.length,r=a<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var l=t.length-1;l>=0;l--)(n=t[l])&&(r=(a<3?n(r):a>3?n(e,i,r):n(e,i))||r);return a>3&&r&&Object.defineProperty(e,i,r),r},$="e-input-group-icon",Q=new RegExp("^(-)?(\\d*)$"),tt=["title","style","class"],et=0,it=function(i){function s(t,e){var s=i.call(this,t,e)||this;return s.preventChange=!1,s.isDynamicChange=!1,s.numericOptions=t,s}return G(s,i),s.prototype.preRender=function(){this.isPrevFocused=!1,this.decimalSeparator=".",this.intRegExp=new RegExp("/^(-)?(d*)$/"),this.isCalled=!1;var t=e.getValue("ej2_instances",this.element);if(this.cloneElement=this.element.cloneNode(!0),e.removeClass([this.cloneElement],["e-control","e-numerictextbox","e-lib"]),this.angularTagName=null,this.formEle=e.closest(this.element,"form"),"EJS-NUMERICTEXTBOX"===this.element.tagName){this.angularTagName=this.element.tagName;var i=this.createElement("input"),s=0;for(s;s<this.element.attributes.length;s++){var n=this.element.attributes[s].nodeName;"id"!==n&&"class"!==n?(i.setAttribute(this.element.attributes[s].nodeName,this.element.attributes[s].nodeValue),i.innerHTML=this.element.innerHTML):"class"===n&&i.setAttribute(n,this.element.className.split(" ").filter(function(t){return 0!==t.indexOf("ng-")}).join(" "))}this.element.hasAttribute("name")&&this.element.removeAttribute("name"),this.element.classList.remove("e-control","e-numerictextbox"),this.element.appendChild(i),this.element=i,e.setValue("ej2_instances",t,this.element)}e.attributes(this.element,{role:"spinbutton",tabindex:"0",autocomplete:"off"});var a={incrementTitle:"Increment value",decrementTitle:"Decrement value",placeholder:this.placeholder};this.l10n=new e.L10n("numerictextbox",a,this.locale),""!==this.l10n.getConstant("placeholder")&&this.setProperties({placeholder:this.placeholder||this.l10n.getConstant("placeholder")},!0),this.element.hasAttribute("id")||this.element.setAttribute("id",e.getUniqueID("numerictextbox")),this.isValidState=!0,this.inputStyle=null,this.inputName=null,this.cultureInfo={},this.initCultureInfo(),this.initCultureFunc(),this.prevValue=this.value,this.updateHTMLAttrToElement(),this.checkAttributes(!1),this.formEle&&(this.inputEleValue=this.value),this.validateMinMax(),this.validateStep(),null===this.placeholder&&this.updatePlaceholder()},s.prototype.render=function(){"input"===this.element.tagName.toLowerCase()&&(this.createWrapper(),this.showSpinButton&&this.spinBtnCreation(),this.setElementWidth(this.width),this.container.classList.contains("e-input-group")||this.container.classList.add("e-input-group"),this.changeValue(null===this.value||isNaN(this.value)?null:this.strictMode?this.trimValue(this.value):this.value),this.wireEvents(),null===this.value||isNaN(this.value)||this.decimals&&this.setProperties({value:this.roundNumber(this.value,this.decimals)},!0),(this.element.getAttribute("value")||this.value)&&(this.element.setAttribute("value",this.element.value),this.hiddenInput.setAttribute("value",this.hiddenInput.value)),this.elementPrevValue=this.element.value,this.element.hasAttribute("data-val")&&this.element.setAttribute("data-val","false"),this.element.hasAttribute("aria-labelledby")||this.element.hasAttribute("placeholder")||this.element.hasAttribute("aria-label")||this.element.setAttribute("aria-label","numerictextbox"),!e.isNullOrUndefined(e.closest(this.element,"fieldset"))&&e.closest(this.element,"fieldset").disabled&&(this.enabled=!1),this.renderComplete())},s.prototype.checkAttributes=function(t){for(var i=0,s=t?e.isNullOrUndefined(this.htmlAttributes)?[]:Object.keys(this.htmlAttributes):["value","min","max","step","disabled","readonly","style","name","placeholder"];i<s.length;i++){var n=s[i];if(!e.isNullOrUndefined(this.element.getAttribute(n)))switch(n){case"disabled":if(e.isNullOrUndefined(this.numericOptions)||void 0===this.numericOptions.enabled||t){var a="disabled"!==this.element.getAttribute(n)&&""!==this.element.getAttribute(n)&&"true"!==this.element.getAttribute(n);this.setProperties({enabled:a},!t)}break;case"readonly":if(e.isNullOrUndefined(this.numericOptions)||void 0===this.numericOptions.readonly||t){var r="readonly"===this.element.getAttribute(n)||""===this.element.getAttribute(n)||"true"===this.element.getAttribute(n);this.setProperties({readonly:r},!t)}break;case"placeholder":(e.isNullOrUndefined(this.numericOptions)||void 0===this.numericOptions.placeholder||t)&&this.setProperties({placeholder:this.element.placeholder},!t);break;case"value":if(e.isNullOrUndefined(this.numericOptions)||void 0===this.numericOptions.value||t){var l=this.instance.getNumberParser({format:"n"})(this.element.getAttribute(n));this.setProperties(e.setValue(n,l,{}),!t)}break;case"min":if(e.isNullOrUndefined(this.numericOptions)||void 0===this.numericOptions.min||t){var o=this.instance.getNumberParser({format:"n"})(this.element.getAttribute(n));null===o||isNaN(o)||this.setProperties(e.setValue(n,o,{}),!t)}break;case"max":if(e.isNullOrUndefined(this.numericOptions)||void 0===this.numericOptions.max||t){var h=this.instance.getNumberParser({format:"n"})(this.element.getAttribute(n));null===h||isNaN(h)||this.setProperties(e.setValue(n,h,{}),!t)}break;case"step":if(e.isNullOrUndefined(this.numericOptions)||void 0===this.numericOptions.step||t){var u=this.instance.getNumberParser({format:"n"})(this.element.getAttribute(n));null===u||isNaN(u)||this.setProperties(e.setValue(n,u,{}),!t)}break;case"style":this.inputStyle=this.element.getAttribute(n);break;case"name":this.inputName=this.element.getAttribute(n);break;default:var p=this.instance.getNumberParser({format:"n"})(this.element.getAttribute(n));(null!==p&&!isNaN(p)||"value"===n)&&this.setProperties(e.setValue(n,p,{}),!0)}}},s.prototype.updatePlaceholder=function(){this.setProperties({placeholder:this.l10n.getConstant("placeholder")},!0)},s.prototype.initCultureFunc=function(){this.instance=new e.Internationalization(this.locale)},s.prototype.initCultureInfo=function(){this.cultureInfo.format=this.format,null!==e.getValue("currency",this)&&(e.setValue("currency",this.currency,this.cultureInfo),this.setProperties({currencyCode:this.currency},!0))},s.prototype.createWrapper=function(){var i=this.cssClass;e.isNullOrUndefined(this.cssClass)||""===this.cssClass||(i=this.getNumericValidClassList(this.cssClass));var s=t.Input.createInput({element:this.element,floatLabelType:this.floatLabelType,properties:{r