@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 • 457 kB
JavaScript
/*!
* filename: ej2-inputs.min.js
* version : 32.1.20
* Copyright Syncfusion Inc. 2001 - 2025. 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(e,t,i,s,n){"use strict";function a(){if(t.attributes(this.element,{role:"textbox",autocomplete:"off",autocapitalize:"off",spellcheck:"false","aria-live":"assertive"}),this.mask){for(var e=this.mask.split("]"),i=0;i<e.length;i++)if("\\"===e[i][e[i].length-1]){e[i]=e[i]+"]";for(var s=e[i].split("["),n=0;n<s.length;n++)"\\"===s[n][s[n].length-1]&&(s[n]=s[n]+"["),f.call(this,s[n])}else if((s=e[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):f.call(this,s[n]);else f.call(this,s[0]);if(this.escapeMaskValue=this.hiddenMask,this.promptMask=this.hiddenMask.replace(/[09?LCAa#&]/g,this.promptChar),!t.isNullOrUndefined(this.customCharacters))for(i=0;i<this.promptMask.length;i++)t.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,"");t.attributes(this.element,{"aria-invalid":"false"})}}function r(){z.call(this,this.promptMask),W.call(this,this.value)}function l(){t.EventHandler.add(this.element,"keydown",O,this),t.EventHandler.add(this.element,"keypress",A,this),t.EventHandler.add(this.element,"keyup",N,this),t.EventHandler.add(this.element,"input",P,this),t.EventHandler.add(this.element,"focus",y,this),t.EventHandler.add(this.element,"blur",E,this),t.EventHandler.add(this.element,"paste",x,this),t.EventHandler.add(this.element,"cut",T,this),t.EventHandler.add(this.element,"drop",S,this),t.EventHandler.add(this.element,"mousedown",v,this),t.EventHandler.add(this.element,"mouseup",g,this),this.enabled&&(h.call(this),this.formElement&&t.EventHandler.add(this.formElement,"reset",u,this))}function o(){t.EventHandler.remove(this.element,"keydown",O),t.EventHandler.remove(this.element,"keypress",A),t.EventHandler.remove(this.element,"keyup",N),t.EventHandler.remove(this.element,"input",P),t.EventHandler.remove(this.element,"focus",y),t.EventHandler.remove(this.element,"blur",E),t.EventHandler.remove(this.element,"paste",x),t.EventHandler.remove(this.element,"cut",T),t.EventHandler.remove(this.element,"drop",S),t.EventHandler.remove(this.element,"mousedown",v),t.EventHandler.remove(this.element,"mouseup",g),this.formElement&&t.EventHandler.remove(this.formElement,"reset",u)}function h(){this.showClearButton&&t.EventHandler.add(this.inputObj.clearButton,"mousedown touchstart",p,this)}function p(e){e.preventDefault(),this.inputObj.clearButton.classList.contains("e-clear-icon-hide")&&!this.inputObj.container.classList.contains("e-static-clear")||(d.call(this,e),this.value="")}function d(e){var t=this.element.value;z.call(this,this.promptMask),this.redoCollec.unshift({value:this.promptMask,startIndex:this.element.selectionStart,endIndex:this.element.selectionEnd}),H.call(this,e,t),this.element.setSelectionRange(0,0)}function u(){"EJS-MASKEDTEXTBOX"===this.element.tagName?z.call(this,this.promptMask):this.value=this.initInputValue}function c(e){return e.value}function m(e,i){var s="",n=0,a=!1,r=t.isNullOrUndefined(i)?t.isNullOrUndefined(e)||t.isNullOrUndefined(this)?i:e.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&&!t.isNullOrUndefined(this.customRegExpCollec[n])&&(this._callPasteHandler||!t.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]||!t.isNullOrUndefined(this.customCharacters)&&!t.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 f(e){for(var i=0;i<e.length;i++)this.hiddenMask+=e[i],"\\"!==e[i]?this.customRegExpCollec.push(e[i]):"\\"!==e[i]||t.isNullOrUndefined(this.regExpCollec[e[i+1]])||this.maskedRegExp.push(e[i+1])}function v(){this.isClicked=!0}function g(){this.isClicked=!1}function y(e){var i=this,s=this.element,n=0,a=m.call(this,s),r=!1,l=!1,o={selectionStart:s.selectionStart,event:e,value:this.value,maskedValue:s.value,container:t.isNullOrUndefined(this.inputObj)?this.inputObj:this.inputObj.container,selectionEnd:s.selectionEnd};if(this.isClicked||b.call(this,o,s),"Never"!==this.floatLabelType&&this.inputObj&&this.inputObj.container){var h=this.inputObj.container.querySelector(".e-float-text");h&&h.removeAttribute("style")}var p=this.inputObj.container.querySelector(".e-float-text");if(p&&"Auto"===this.floatLabelType&&(this.prependTemplate||this.appendTemplate)&&setTimeout(function(){p&&(p.style.width="auto")}.bind(this),5),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 e=s.selectionStart;e<i.promptMask.length;e++){if(s.value[e]===i.promptChar){r=!0;break}if(s.value[e]!==i.promptMask[e]){r=!1;break}}}),setTimeout(function(){var e=s.selectionStart-1;if(e===i.promptMask.length-1||s.value[e]===i.promptChar)l=!0;else for(var t=e;t>=0;t--){if(s.value[t]===i.promptChar){l=!0;break}if(s.value[t]!==i.promptMask[t]){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:e,value:i.value,maskedValue:s.value,container:t.isNullOrUndefined(i.inputObj)?i.inputObj:i.inputObj.container,selectionEnd:s.selectionEnd},b.call(i,o,s)},110);break}t.isNullOrUndefined(s.value.match(C(this.promptChar)))&&(o={selectionStart:s.selectionStart,event:e,value:this.value,maskedValue:s.value,container:t.isNullOrUndefined(this.inputObj)?this.inputObj:this.inputObj.container,selectionEnd:s.selectionEnd},b.call(this,o,s)),this.isClicked=!1}}function b(e,t){this.trigger("focus",e,function(e){t.selectionStart=e.selectionStart,t.selectionEnd=e.selectionEnd})}function C(e){return t.isNullOrUndefined(e)?e:e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}function E(e){this.blurEventArgs={event:e,value:this.value,maskedValue:this.element.value,container:t.isNullOrUndefined(this.inputObj)?this.inputObj:this.inputObj.container},this.trigger("blur",this.blurEventArgs),this.updateFloatLabelOverflowWidth();var i=this.inputObj.container.querySelector(".e-float-text");if("Auto"===this.floatLabelType&&(this.prependTemplate||this.appendTemplate)&&i&&setTimeout(function(){i&&this.prependedElement&&!this.enableRtl?i.style.marginLeft=this.prependedElement.offsetWidth+"px":i&&this.prependedElement&&this.enableRtl&&(i.style.marginRight=this.prependedElement.offsetWidth+"px"),i&&(i.style.width=this.element.offsetWidth+"px")}.bind(this),5),this.mask&&(this.isFocus=!1,this.placeholder&&this.element.value===this.promptMask&&"Always"!==this.floatLabelType)){z.call(this,"");var s=this.element.parentNode.querySelector(".e-float-text");"Auto"===this.floatLabelType&&!t.isNullOrUndefined(s)&&s.classList.contains(le)&&t.removeClass([s],le)}}function x(e){var t=this;if(this.mask&&!this.readonly){var i=this.element.selectionStart,s=this.element.selectionEnd,n=this.element.value;z.call(this,""),this._callPasteHandler=!0,setTimeout(function(){var a=t.element.value.replace(/ /g,"");t.redoCollec.length>0&&t.redoCollec[0].value===t.element.value&&(a=m.call(t,t.element)),z.call(t,n),t.element.selectionStart=i,t.element.selectionEnd=s;var r=0;t.maskKeyPress=!0;do{U.call(t,a[r],!1,null),++r}while(r<a.length);if(t.maskKeyPress=!1,t._callPasteHandler=!1,t.element.value===n){var l=0;t.maskKeyPress=!0;do{U.call(t,a[l],!1,null),++l}while(l<a.length);t.maskKeyPress=!1}else H.call(t,e,n)},1)}}function T(e){var t=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(){z.call(t,a),t.element.selectionStart=t.element.selectionEnd=s,t.element.value!==i&&H.call(t,e,null)},0)}}function S(e){e.preventDefault()}function P(e){if(!0!==t.Browser.isIE||""!==this.element.value||"Never"!==this.floatLabelType){var i={ctrlKey:!1,keyCode:229};if(t.extend(e,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||t.Browser.isDevice||L.call(this,e),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{U.call(this,a[r],e.ctrlKey,e),++r}while(r<a.length);this.element.value!==this.preEleVal&&H.call(this,e,null)}var l=m.call(this,this.element);this.prevValue=l,this.value=l,""===l&&(z.call(this,this.promptMask),this.element.setSelectionRange(0,0))}}}function O(e){if(this.mask&&!this.readonly){229!==e.keyCode&&(!e.ctrlKey||89!==e.keyCode&&90!==e.keyCode||e.preventDefault(),L.call(this,e));var t=this.element.value;if(e.ctrlKey&&(89===e.keyCode||90===e.keyCode)){var i=void 0;90===e.keyCode&&this.undoCollec.length>0&&t!==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}),z.call(this,i.value),this.element.selectionStart=i.startIndex,this.element.selectionEnd=i.endIndex,this.undoCollec.splice(this.undoCollec.length-1,1)):89===e.keyCode&&this.redoCollec.length>0&&t!==this.redoCollec[0].value&&(i=this.redoCollec[0],this.undoCollec.push({value:this.element.value,startIndex:this.element.selectionStart,endIndex:this.element.selectionEnd}),z.call(this,i.value),this.element.selectionStart=i.startIndex,this.element.selectionEnd=i.endIndex,this.redoCollec.splice(0,1))}}}function k(){var e,t=this.element.selectionStart,i=this.element.selectionEnd;this.redoCollec.length>0?(e=this.redoCollec[0],z.call(this,e.value),e.startIndex-t==1?(this.element.selectionStart=e.startIndex,this.element.selectionEnd=e.endIndex):(this.element.selectionStart=t+1,this.element.selectionEnd=i+1)):(z.call(this,this.promptMask),this.element.selectionStart=this.element.selectionEnd=t)}function w(e,t,i){return"input"===i.type&&(e=!1,t=this.element.value,z.call(this,this.promptMask),W.call(this,t)),e}function L(e){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,e),k.call(this)),this.element.value.length>=this.promptMask.length&&"input"===e.type&&(s=w.call(this,s,i,e));var a=this.element.selectionStart,r=this.element.selectionEnd,l=this.element.selectionStart,o=this.element.selectionEnd,h=this.hiddenMask.replace(/[>|\\<]/g,""),p=h[l-1],d=this.element.selectionEnd;if(s||8===e.keyCode||46===e.keyCode){this.undoCollec.push({value:this.element.value,startIndex:this.element.selectionStart,endIndex:o});var u=!1,c=this.element.value;if(l>0||(8===e.keyCode||46===e.keyCode)&&l<this.element.value.length&&this.element.selectionEnd-l!==this.element.value.length){var m=l;l!==o?(l=o,46===e.keyCode&&(u=!0)):46===e.keyCode?++m:--m;for(var f=l;8===e.keyCode||s||u?f>m:f<m;8===e.keyCode||s||u?f--:f++)for(var v=l;8===e.keyCode||s||u?v>0:v<this.element.value.length;8===e.keyCode||s||u?v--:v++){var g=void 0;(8===e.keyCode||u)&&(a!==r&&a!==l||a===r)||s?(p=h[v-1],g=l-1):(p=h[v],g=l,++l);var y=this.element.value[g];if(t.isNullOrUndefined(this.regExpCollec[""+p])&&!t.isNullOrUndefined(this.customCharacters)&&t.isNullOrUndefined(this.customCharacters[""+p])&&this.hiddenMask[g]!==this.promptChar&&"["!==this.customRegExpCollec[g][0]&&"]"!==this.customRegExpCollec[g][this.customRegExpCollec[g].length-1]||this.promptMask[g]!==this.promptChar&&t.isNullOrUndefined(this.customCharacters))this.element.selectionStart=this.element.selectionEnd=g,e.preventDefault(),46!==e.keyCode||u||++this.element.selectionStart;else{var b=this.element.value,C=this.promptChar,E=b.substring(0,g)+C+b.substring(l,b.length);z.call(this,E),e.preventDefault(),46!==e.keyCode||u||g++,this.element.selectionStart=this.element.selectionEnd=g,n=!0}if(l=this.element.selectionStart,!n&&8===e.keyCode||u||!n&&46!==e.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&&!t.isNullOrUndefined(this.customCharacters))break}}46===e.keyCode&&u&&n&&(this.element.selectionStart=this.element.selectionEnd=d),0===this.element.selectionStart&&this.element.selectionEnd===this.element.value.length&&(z.call(this,this.promptMask),e.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,e,i)}}function A(e){if(this.mask&&!this.readonly){var t=this.element.value;if(!e.ctrlKey&&!e.metaKey||(e.ctrlKey||e.metaKey)&&"KeyA"!==e.code&&"KeyY"!==e.code&&"KeyZ"!==e.code&&"KeyX"!==e.code&&"KeyC"!==e.code&&"KeyV"!==e.code){this.maskKeyPress=!0;var i=e.key;"Spacebar"===i&&(i=String.fromCharCode(e.keyCode)),i?i&&1===i.length&&(U.call(this,i,e.ctrlKey,e),e.preventDefault()):(this.isIosInvalid=!0,U.call(this,String.fromCharCode(e.keyCode),e.ctrlKey,e),e.preventDefault(),this.isIosInvalid=!1),32===e.keyCode&&" "===i&&" "===this.promptChar&&(this.element.selectionStart=this.element.selectionEnd=this.element.selectionStart-i.length)}this.element.value!==t&&H.call(this,e,t)}}function H(e,i){var s=this.isProtectedOnChange;if(!t.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)),t.isNullOrUndefined(e)||(this.changeEventArgs.isInteracted=!0,this.changeEventArgs.isInteraction=!0,this.changeEventArgs.event=e),this.isProtectedOnChange=!0,this.value=this.changeEventArgs.value,this.isProtectedOnChange=s,t.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(e){if(this.mask&&!this.readonly){var i=void 0;if(this.maskKeyPress||229!==e.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=t.Browser.isAndroid&&""===r;h||o===r||i.value.substring(l-a,l)===r?h&&F.call(this,e,l-1,this.element.selectionEnd-1,r,e.ctrlKey,!1):U.call(this,r,e.ctrlKey,e)}else s=this.promptMask,U.call(this,r,e.ctrlKey,e);this.maskKeyPress=!1,H.call(this,e,s)}}var p=m.call(this,this.element);(0!==this.element.selectionStart||this.promptMask!==this.element.value||""!==p||""===p&&this.value!==p)&&(this.prevValue=p,this.value=p)}else H.call(this,e);if(0===this.element.selectionStart&&0===this.element.selectionEnd){var d=this.element;setTimeout(function(){d.setSelectionRange(0,0)},0)}}function B(e){if(e.length>1&&this.promptMask.length+e.length<this.element.value.length){var t=this.redoCollec[0].value.substring(0,this.redoCollec[0].startIndex)+e+this.redoCollec[0].value.substring(this.redoCollec[0].startIndex,this.redoCollec[0].value.length);z.call(this,t),this.element.selectionStart=this.element.selectionEnd=this.redoCollec[0].startIndex+e.length}this.element.selectionStart=this.element.selectionStart-e.length,this.element.selectionEnd=this.element.selectionEnd-e.length}function R(e){this.maskKeyPress||B.call(this,e)}function U(e,i,s){if(R.call(this,e),!t.isNullOrUndefined(this)&&!t.isNullOrUndefined(e))for(var n,a,r=this.element.selectionStart,l=r,o=!1,h=this.element.value,p=!1,d=!1,u=0;u<e.length;u++){var c=e[u];if(r=this.element.selectionStart,this.maskKeyPress||l!==r||(r+=u),!this.maskKeyPress||r<this.promptMask.length){for(f=r;f<this.promptMask.length;f++)n=this.escapeMaskValue[r],"\\"===this.hiddenMask[r]&&this.hiddenMask[r+1]===e&&(d=!0),(t.isNullOrUndefined(this.regExpCollec[""+n])&&(t.isNullOrUndefined(this.customCharacters)||!t.isNullOrUndefined(this.customCharacters)&&t.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&&t.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(t.isNullOrUndefined(this.customCharacters)||t.isNullOrUndefined(this.customCharacters[""+n]))!t.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(","),f=0;f<m.length;f++)if(c.match(new RegExp("["+m[f]+"]"))){o=!0;break}if((!this.maskKeyPress||r<this.hiddenMask.length)&&o){if(0===u)if(this.maskKeyPress)this.undoCollec.push({value:h,startIndex:r,endIndex:r});else{var v=this.element.selectionStart,g=this.element.selectionEnd;this.redoCollec.length>0?(a=this.redoCollec[0].value,z.call(this,a),this.undoCollec.push(this.redoCollec[0])):(this.undoCollec.push({value:this.promptMask,startIndex:r,endIndex:r}),a=this.promptMask,z.call(this,a)),this.element.selectionStart=v,this.element.selectionEnd=g}r=this.element.selectionStart,I.call(this,s,r,c,a,d),p=!0,u===e.length-1&&this.redoCollec.unshift({value:this.element.value,startIndex:this.element.selectionStart,endIndex:this.element.selectionEnd}),o=!1}else r=this.element.selectionStart,F.call(this,s,r,l,e,i,p);u!==e.length-1||o||(!t.Browser.isAndroid||t.Browser.isAndroid&&r<this.promptMask.length)&&this.redoCollec.unshift({value:this.element.value,startIndex:this.element.selectionStart,endIndex:this.element.selectionEnd})}else 1!==e.length||i||t.isNullOrUndefined(s)||V.call(this)}}function I(e,t,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,t)+i+a.substring(t+1,a.length);z.call(this,r),this.element.selectionStart=this.element.selectionEnd=t+1}}function F(e,i,s,n,a,r){if(!this.maskKeyPress){var l=this.element.value;i>=this.promptMask.length?z.call(this,l.substring(0,i)):(s===i?z.call(this,l.substring(0,i)+l.substring(i+1,l.length)):this.promptMask.length===this.element.value.length?z.call(this,l.substring(0,i)+l.substring(i,l.length)):z.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),V.call(this)}1!==n.length||a||t.isNullOrUndefined(e)||V.call(this)}function V(){var e=this,i=this.element.parentNode,s=200;i.classList.contains(ne)||i.classList.contains(ae)?t.addClass([i],se):t.addClass([this.element],se),!0===this.isIosInvalid&&(s=400),t.attributes(this.element,{"aria-invalid":"true"}),setTimeout(function(){e.maskKeyPress||M.call(e)},s)}function M(){var e=this.element.parentNode;t.isNullOrUndefined(e)||t.removeClass([e],se),t.removeClass([this.element],se),t.attributes(this.element,{"aria-invalid":"false"})}function D(e,t){var i,s,n=t,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]){e=e.toUpperCase();break}if("<"===i[s]){e=e.toLowerCase();break}if("|"===i[s])break}--s}return e}function W(e){if(this.mask&&void 0!==e&&(void 0===this.prevValue||this.prevValue!==e)){if(this.maskKeyPress=!0,z.call(this,this.promptMask),""===e||null===e&&"Never"===this.floatLabelType&&this.placeholder||(this.element.selectionStart=0,this.element.selectionEnd=0),null!==e)for(var i=0;i<e.length;i++)U.call(this,e[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&&!t.isNullOrUndefined(n)&&n.classList.contains(le)&&!this.isFocus&&(t.removeClass([n],le),t.addClass([n],oe),z.call(this,""))}(null===this.mask||""===this.mask&&void 0!==this.value)&&z.call(this,this.value)}function z(i,s){!this.isFocus&&"Auto"===this.floatLabelType&&this.placeholder&&t.isNullOrUndefined(this.value)&&(i="");var n=m.call(this,s||this.element,i);null===n||""===n?(e.Input.setValue(i,s||this.element,this.floatLabelType,!1),this.showClearButton&&this.inputObj.clearButton.classList.add("e-clear-icon-hide")):e.Input.setValue(i,s||this.element,this.floatLabelType,this.showClearButton)}function q(e){var t=j(e);r.call(t);var i=m.call(this,this.element);this.prevValue=i,this.value=i,e.mask&&(o.call(t),l.call(t))}function j(e){t.addClass([e.element],re);var i={element:e.element,mask:e.mask,promptMask:"",hiddenMask:"",escapeMaskValue:"",promptChar:e.promptChar?e.promptChar.length>1?e.promptChar=e.promptChar[0]:e.promptChar:"_",value:e.value?e.value:null,regExpCollec:he,customRegExpCollec:[],customCharacters:e.customCharacters,undoCollec:[],redoCollec:[],maskKeyPress:!1,prevValue:""};return a.call(i),i}function _(e){return m.call(K(e),e.element)}function X(e){return c.call(K(e),e.element)}function K(e){var i;return!t.isNullOrUndefined(e)&&e.element.classList.contains(re)&&(i=j(e)),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(e){function i(e,i){e.element.__eventHandlers={};var s=t.isNullOrUndefined(i)?t.createElement:i,n={container:null,buttons:[],clearButton:null};if(ue=e.floatLabelType,ce=e.bindClearAction,t.isNullOrUndefined(e.floatLabelType)||"Never"===e.floatLabelType?(n.container=H(e,Y.INPUTGROUP,Y.INPUTCUSTOMTAG,"span",s),e.element.parentNode.insertBefore(n.container,e.element),t.addClass([e.element],Y.INPUT),n.container.appendChild(e.element)):f(e,n,s),r(e),t.isNullOrUndefined(e.properties)||t.isNullOrUndefined(e.properties.showClearButton)||!e.properties.showClearButton||(z(e.properties.showClearButton,e.element,n,!0,s),n.clearButton.setAttribute("role","button"),n.container.classList.contains(Y.FLOATINPUT)&&t.addClass([n.container],Y.INPUTGROUP)),!t.isNullOrUndefined(e.buttons))for(var a=0;a<e.buttons.length;a++)n.buttons.push(ae(e.buttons[a],n.container,s));return t.isNullOrUndefined(e.element)||"TEXTAREA"!==e.element.tagName||t.addClass([n.container],Y.TEXTAREA),re(n.container,e.element),n=y(e,n),K(n.container,s),n}function s(t){var i=E(t.element);(i.classList.contains("e-input-group")||i.classList.contains("e-outline")||i.classList.contains("e-filled"))&&i.classList.add("e-input-focus"),"Never"!==t.floatLabelType&&setTimeout(function(){e.calculateWidth(t.element,i)},80)}function n(t){var i=E(t.element);(i.classList.contains("e-input-group")||i.classList.contains("e-outline")||i.classList.contains("e-filled"))&&i.classList.remove("e-input-focus"),"Never"!==t.floatLabelType&&setTimeout(function(){e.calculateWidth(t.element,i)},80)}function a(e){o(e.floatLabelType,e.element)}function r(e){o(e.floatLabelType,e.element);var t=function(){return s(e)},i=function(){return n(e)},r=function(){return a(e)};e.element.addEventListener("focus",t),e.element.addEventListener("blur",i),e.element.addEventListener("input",r),e.element.__eventHandlers.inputFocusHandler={focusHandler:t},e.element.__eventHandlers.inputBlurHandler={blurHandler:i},e.element.__eventHandlers.inputHandler={inputHandler:r}}function l(e){if(!t.isNullOrUndefined(e.element)&&!(t.isNullOrUndefined(e.element.__eventHandlers)||t.isNullOrUndefined(e.element.__eventHandlers.inputFocusHandler)||t.isNullOrUndefined(e.element.__eventHandlers.inputBlurHandler)||t.isNullOrUndefined(e.element.__eventHandlers.inputHandler))){var i=e.element.__eventHandlers.inputFocusHandler.focusHandler,s=e.element.__eventHandlers.inputBlurHandler.blurHandler,n=e.element.__eventHandlers.inputHandler.inputHandler;e.element.removeEventListener("focus",i),e.element.removeEventListener("blur",s),e.element.removeEventListener("input",n),delete e.element.__eventHandlers.inputFocusHandler,delete e.element.__eventHandlers.inputBlurHandler,delete e.element.__eventHandlers.inputHandler}}function o(e,i){var s=i.value,n=i.parentElement,a=n&&n.parentElement;""===s||t.isNullOrUndefined(s)?"Always"!==e&&(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 e=E(this).getElementsByClassName("e-float-text")[0];t.isNullOrUndefined(e)||(t.addClass([e],Y.LABELTOP),e.classList.contains(Y.LABELBOTTOM)&&t.removeClass([e],Y.LABELBOTTOM))}function p(){var e=E(this);if(e.getElementsByTagName("textarea")[0]?""===e.getElementsByTagName("textarea")[0].value:""===e.getElementsByTagName("input")[0].value){var i=e.getElementsByClassName("e-float-text")[0];t.isNullOrUndefined(i)||(i.classList.contains(Y.LABELTOP)&&t.removeClass([i],Y.LABELTOP),t.addClass([i],Y.LABELBOTTOM))}}function d(e){e.addEventListener("focus",h),e.addEventListener("blur",p)}function u(e){t.isNullOrUndefined(e)||(e.removeEventListener("focus",h),e.removeEventListener("blur",p))}function c(e){A(e.element,e.floatLabelType)}function m(e){A(e.element,e.floatLabelType)}function f(e,i,s){var n=t.isNullOrUndefined(s)?t.createElement:s;"Auto"===e.floatLabelType&&d(e.element),t.isNullOrUndefined(i.container)?(i.container=H(e,Y.FLOATINPUT,Y.FLOATCUSTOMTAG,"div",n),i.container.classList.add(Y.INPUTGROUP),e.element.parentNode&&e.element.parentNode.insertBefore(i.container,e.element)):(t.isNullOrUndefined(e.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(t.isNullOrUndefined(e.element.id)||""===e.element.id||(r.id="label_"+e.element.id.replace(/ /g,"_"),t.attributes(e.element,{"aria-labelledby":r.id})),t.isNullOrUndefined(e.element.placeholder)||""===e.element.placeholder||(r.innerText=N(e.element.placeholder),e.element.removeAttribute("placeholder")),t.isNullOrUndefined(e.properties)||t.isNullOrUndefined(e.properties.placeholder)||""===e.properties.placeholder||(r.innerText=N(e.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(e.element),l.appendChild(a),l.appendChild(r)}else i.container.appendChild(e.element),i.container.appendChild(a),i.container.appendChild(r);if(C(e.element.value,r),"Always"===e.floatLabelType&&(r.classList.contains(Y.LABELBOTTOM)&&t.removeClass([r],Y.LABELBOTTOM),t.addClass([r],Y.LABELTOP)),"Auto"===e.floatLabelType){var o=function(){return c(e)},h=function(){return m(e)};e.element.addEventListener("input",o),e.element.addEventListener("blur",h),e.element.__eventHandlers.floatInputHandler={inputFloatHandler:o},e.element.__eventHandlers.floatBlurHandler={blurFloatHandler:h}}else v(e);t.isNullOrUndefined(e.element.getAttribute("id"))||r.setAttribute("for",e.element.getAttribute("id"))}function v(e){if(!(t.isNullOrUndefined(e.element)||t.isNullOrUndefined(e.element.__eventHandlers)||t.isNullOrUndefined(e.element.__eventHandlers.floatInputHandler)||t.isNullOrUndefined(e.element.__eventHandlers.floatBlurHandler))){var i=e.element.__eventHandlers.floatInputHandler.inputFloatHandler,s=e.element.__eventHandlers.floatBlurHandler.blurFloatHandler;e.element.removeEventListener("input",i),e.element.removeEventListener("blur",s),delete e.element.__eventHandlers.floatInputHandler,delete e.element.__eventHandlers.floatBlurHandler}}function g(e,t){"Always"===e&&t.classList.contains("e-outline")&&t.classList.add("e-valid-input")}function y(e,i){if(!t.isNullOrUndefined(e.properties))for(var s=0,n=Object.keys(e.properties);s<n.length;s++)switch(n[s]){case"cssClass":U(e.properties.cssClass,[i.container]),g(e.floatLabelType,i.container);break;case"enabled":W(e.properties.enabled,e.element,e.floatLabelType,i.container);break;case"enableRtl":D(e.properties.enableRtl,[i.container]);break;case"placeholder":V(e.properties.placeholder,e.element);break;case"readonly":M(e.properties.readonly,e.element)}return i}function b(e,i,s){t.isNullOrUndefined(i)||(e&&!s?t.removeClass([i],Y.CLEARICONHIDE):t.addClass([i],Y.CLEARICONHIDE))}function C(e,i,s){void 0===s&&(s=null),e?(t.addClass([i],Y.LABELTOP),i.classList.contains(Y.LABELBOTTOM)&&t.removeClass([i],Y.LABELBOTTOM)):(null==s||s!==document.activeElement)&&(i.classList.contains(Y.LABELTOP)&&t.removeClass([i],Y.LABELTOP),t.addClass([i],Y.LABELBOTTOM))}function E(e){var i=t.isNullOrUndefined(e.parentNode)?e:e.parentNode;return i&&i.classList.contains("e-input-in-wrap")&&(i=i.parentNode),i}function x(e,i,s,n){var a=(t.isNullOrUndefined(n)?t.createElement:n)("span",{className:Y.CLEARICON}),r=i.container;return t.isNullOrUndefined(s)?(i.container.classList.contains(Y.FLOATINPUT)?i.container.querySelector("."+Y.FLOATTEXT):e).insertAdjacentElement("afterend",a):r.appendChild(a),t.addClass([a],Y.CLEARICONHIDE),k(e,a),a.setAttribute("aria-label","close"),a}function T(e,i,s){i.classList.contains(Y.DISABLE)||i.readOnly||(e.preventDefault(),i!==document.activeElement&&i.focus(),i.value="",t.addClass([s],Y.CLEARICONHIDE))}function S(e,t){b(e.value,t)}function P(e,t){b(e.value,t,e.readOnly)}function O(e,i){setTimeout(function(){t.isNullOrUndefined(i)||(t.addClass([i],Y.CLEARICONHIDE),i=!t.isNullOrUndefined(e)&&e.classList.contains("e-combobox")?null:i)},200)}function k(e,t,i){if(void 0===ce||ce){var s=function(i){return T(i,e,t)};t.addEventListener("click",s),e.__eventHandlers.clearClickHandler={clickHandlerEvent:s}}var n=function(){return S(e,t)},a=function(){return P(e,t)},r=function(){return O(e,t)};e.addEventListener("input",n),e.addEventListener("focus",a),e.addEventListener("blur",r),e.__eventHandlers.clearInputHandler={inputHandlerEvent:n},e.__eventHandlers.clearFocusHandler={focusHandlerEvent:a},e.__eventHandlers.clearBlurHandler={blurHandlerEvent:r}}function w(e,i){if(!t.isNullOrUndefined(e)&&!t.isNullOrUndefined(e.__eventHandlers)){if(!t.isNullOrUndefined(e.__eventHandlers.clearClickHandler)){var s=e.__eventHandlers.clearClickHandler.clickHandlerEvent;(void 0===ce||ce)&&(t.isNullOrUndefined(i)||i.removeEventListener("click",s)),delete e.__eventHandlers.clearClickHandler}if(!t.isNullOrUndefined(e.__eventHandlers.clearInputHandler)&&!t.isNullOrUndefined(e.__eventHandlers.clearFocusHandler)&&!t.isNullOrUndefined(e.__eventHandlers.clearBlurHandler)){var n=e.__eventHandlers.clearInputHandler.inputHandlerEvent,a=e.__eventHandlers.clearFocusHandler.focusHandlerEvent,r=e.__eventHandlers.clearBlurHandler.blurHandlerEvent;e.removeEventListener("input",n),e.removeEventListener("focus",a),e.removeEventListener("blur",r),delete e.__eventHandlers.clearInputHandler,delete e.__eventHandlers.clearFocusHandler,delete e.__eventHandlers.clearBlurHandler}}}function L(e,i){void 0===i&&(i=null),l(e),"Auto"===e.floatLabelType&&v(e),e.properties.showClearButton&&w(e.element,i),t.isNullOrUndefined(e.buttons)||J(!1,null,e.buttons),u(e.element),t.isNullOrUndefined(e.element)||(delete e.element.__eventHandlers,e.element.classList.contains(Y.INPUT)&&e.element.classList.remove(Y.INPUT))}function A(e,t){if(E(e).classList.contains(Y.FLOATINPUT)&&"Auto"===t){var i=E(e).getElementsByClassName("e-float-text")[0];C(e.value,i,e)}}function H(e,i,s,n,a){var r,l=t.isNullOrUndefined(a)?t.createElement:a;return t.isNullOrUndefined(e.customTag)?r=l(n,{className:i}):(r=l(e.customTag,{className:i})).classList.add(s),r.classList.add("e-control-wrapper"),r}function N(e){return null==e||""===e?"":B(e)}function B(e){var t={"&":"&",""":'"',"'":"'","<":"<",">":">","é":"é"};return e.replace(/&[a-zA-Z#0-9]+;/g,function(e){return t[e]||e})}function R(e,i,s,n){if(i.value=e,"Never"!==s&&I(i,i.parentElement),t.isNullOrUndefined(s)||"Auto"!==s||A(i,s),!t.isNullOrUndefined(n)&&n){var a=E(i);if(!t.isNullOrUndefined(a)){var r=a.getElementsByClassName(Y.CLEARICON)[0];t.isNullOrUndefined(r)||(i.value&&!t.isNullOrUndefined(a)&&a.classList.contains("e-input-focus")?t.removeClass([r],Y.CLEARICONHIDE):t.addClass([r],Y.CLEARICONHIDE))}}o(s,i)}function U(e,i,s){t.isNullOrUndefined(s)||""===s||t.removeClass(i,s.split(" ")),t.isNullOrUndefined(e)||""===e||t.addClass(i,e.split(" "))}function I(e,i,s){if("multiselect"===s||Q(e)){var n="multiselect"===s?e:e.clientWidth-parseInt(getComputedStyle(e,null).getPropertyValue("padding-left"),10);t.isNullOrUndefined(i)||t.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 F(e,i){"number"==typeof e?i.style.width=t.formatUnit(e):"string"==typeof e&&(i.style.width=e.match(/px|%|em/)?e:t.formatUnit(e)),I(i.firstChild,i)}function V(e,i){e=N(e);var s=E(i);if(s.classList.contains(Y.FLOATINPUT))if(t.isNullOrUndefined(e)||""===e){s.classList.add(Y.NOFLOATLABEL);var n=s.getElementsByClassName("e-float-text-content")[0];if(n&&n.children[0])n.children[0].textContent="";else{a=s.getElementsByClassName(Y.FLOATTEXT)[0];t.isNullOrUndefined(a)||(a.textContent="")}}else{if((n=s.getElementsByClassName("e-float-text-content")[0])&&n.children[0])n.children[0].textContent=e;else{var a=s.getElementsByClassName(Y.FLOATTEXT)[0];t.isNullOrUndefined(a)||(a.textContent=e)}s.classList.remove(Y.NOFLOATLABEL),i.removeAttribute("placeholder")}else t.isNullOrUndefined(e)||""===e?i.removeAttribute("placeholder"):t.attributes(i,{placeholder:e})}function M(e,i,s){e?t.attributes(i,{readonly:""}):i.removeAttribute("readonly"),t.isNullOrUndefined(s)||A(i,s)}function D(e,i){e?t.addClass(i,Y.RTL):t.removeClass(i,Y.RTL)}function W(e,i,s,n){var a={disabled:"","aria-disabled":"true"},r=!t.isNullOrUndefined(n);e?(i.classList.remove(Y.DISABLE),q(a,i),r&&t.removeClass([n],Y.DISABLE)):(i.classList.add(Y.DISABLE),j(a,i),r&&t.addClass([n],Y.DISABLE)),t.isNullOrUndefined(s)||A(i,s)}function z(e,i,s,n,a){var r=t.isNullOrUndefined(a)?t.createElement:a;e?s.clearButton=x(i,s,n,r):(t.remove(s.clearButton),s.clearButton=null)}function q(e,t){for(var i=0,s=Object.keys(e);i<s.length;i++){var n=s[i],a=E(t);"disabled"===n&&t.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="":t.removeAttribute(n)}}function j(e,t){for(var i=0,s=Object.keys(e);i<s.length;i++){var n=s[i],a=E(t);"disabled"===n&&t.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=e[""+n]:t.setAttribute(n,e[""+n])}}function _(e){var i=e.container;if(!t.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");t.detach(i.querySelector("."+Y.FLOATLINE)),t.detach(i.querySelector("."+Y.FLOATTEXT)),t.classList(i,[Y.INPUTGROUP],[Y.FLOATINPUT]),u(s),t.attributes(s,{placeholder:n}),s.classList.add(Y.INPUT),a||"INPUT"!==s.tagName||s.removeAttribute("required")}}function X(e,i,s,n){var a=t.isNullOrUndefined(n)?t.createElement:n,r=t.closest(e,"."+Y.INPUTGROUP);ue=i;var l=r.tagName,o={element:e,floatLabelType:i,customTag:l="DIV"!==l&&"SPAN"!==l?l:null,properties:{placeholder:s}};if("Never"!==i){var h=r.querySelector(".e-clear-icon"),p={container:r};e.classList.remove(Y.INPUT),f(o,p,a),K(p.container,a),I(o.element,p.container);var d=r.classList.contains("e-float-icon-left");if(t.isNullOrUndefined(h)&&(h=d?r.querySelector(".e-input-in-wrap").querySelector(".e-input-group-icon"):r.querySelector(".e-input-group-icon")),t.isNullOrUndefined(h))d&&(h=r.querySelector(".e-input-group-icon"));else{var u=r.querySelector("."+Y.FLOATLINE),c=r.querySelector("."+Y.FLOATTEXT),m=d?r.querySelector(".e-input-in-wrap"):r;m.insertBefore(e,h),m.insertBefore(u,h),m.insertBefore(c,h)}}else v(o);g(i,e.parentElement)}function K(e,t){if(e.classList.contains("e-outline")&&e.getElementsByClassName("e-float-text")[0]){var i=t("span",{className:Y.FLOATTEXTCONTENT});i.innerHTML=e.getElementsByClassName("e-float-text")[0].innerHTML,e.getElementsByClassName("e-float-text")[0].innerHTML="",e.getElementsByClassName("e-float-text")[0].appendChild(i)}}function G(e,t){for(var i=0;i<t.length;i++)J(e,t[parseInt(i.toString(),10)].container)}function J(e,i,s){var n=[];n.push(s);var a=t.isNullOrUndefined(s)?i.querySelectorAll(".e-input-group-icon"):n;if(e&&a.length>0)for(r=0;r<a.length;r++)a[parseInt(r.toString(),10)].addEventListener("mousedown",ee,!1),a[parseInt(r.toString(),10)].addEventListener("mouseup",te,!1);else if(a.length>0)for(var r=0;r<a.length;r++)a[parseInt(r.toString(),10)].removeEventListener("mousedown",ee,this),a[parseInt(r.toString(),10)].removeEventListener("mouseup",te,this)}function $(e,t){e.classList.contains("e-disabled")||e.querySelector("input").readOnly||t.classList.add("e-input-btn-ripple")}function Q(e){if(!e)return!1;for(var t=e;t&&t!==document.body;){if("none"===window.getComputedStyle(t).display)return!1;t=t.parentElement}return!0}function ee(){for(var e=this,t=this.parentElement;!t.classList.contains("e-input-group");)t=t.parentElement;$(t,e)}function te(){var e=this;setTimeout(function(){e.classList.remove("e-input-btn-ripple")},500)}function ie(e,t){var i=t("span",{className:e});return i.classList.add("e-input-group-icon"),i}function se(e,t,i,s,n){var a="string"==typeof t?t.split(","):t;if("append"===e.toLowerCase())for(var r=0,l=a;r<l.length;r++)ae(p=l[r],i,n);else for(var o=0,h=a;o<h.length;o++){var p=h[o];ne(p,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 ne(e,i,s,n){var a=t.isNullOrUndefined(n)?t.createElement:n,r=ie(e,a);i.classList.add("e-float-icon-left");var l=i.querySelector(".e-input-in-wrap");if(t.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 p=o[parseInt(h.toString(),10)],d=l.parentElement;p.classList.contains("e-float-line")&&(d&&d.classList.contains("e-filled")||!d)||l.appendChild(p)}}return l.parentNode.insertBefore(r,l),J(!0,i,r),r}function ae(e,i,s){var n=ie(e,t.isNullOrUndefined(s)?t.createElement:s);return(i.classList.contains("e-float-icon-left")?i.querySelector(".e-input-in-wrap"):i).appendChild(n),J(!0,i,n),n}function re(e,t){"hidden"===t.type?e.classList.add("e-hidden"):e.classList.contains("e-hidden")&&e.classList.remove("e-hidden")}function le(e,i){if(!t.isNullOrUndefined(e))for(var s=0,n=Object.keys(e);s<n.length;s++){var a=n[s];Z.indexOf(a)<0&&i.setAttribute(a,e[""+a])}}function oe(e,t,i){U(he(e),[i],he(t))}function he(e){var i=e;return t.isNullOrUndefined(e)||""===e||(i=e.replace(/\s+/g," ").trim()),i}function pe(e,i){if(!t.isNullOrUndefined(e))for(var s=0,n=Object.keys(e);s<n.length;s++){var a=n[s];if(Z.indexOf(a)>-1)if("class"===a){var r=this.getInputValidClassList(e[""+a]);""!==r&&t.addClass([i],r.split(" "))}else if("style"===a){var l=i.getAttribute(a);l=t.isNullOrUndefined(l)?e[""+a]:l+e[""+a],i.setAttribute(a,l)}else i.setAttribute(a,e[""+a])}}function de(e){return!e||/^\s*$/.test(e)}var ue,ce=!0;e.createInput=i,e.bindInitialEvent=r,e.wireFloatingEvents=d,e.wireClearBtnEvents=k,e.destroy=L,e.setValue=R,e.setCssClass=U,e.calculateWidth=I,e.setWidth=F,e.setPlaceholder=V,e.setReadonly=M,e.setEnableRtl=D,e.setEnabled=W,e.setClearButton=z,e.removeAttributes=q,e.addAttributes=j,e.removeFloating=_,e.addFloating=X,e.createSpanElement=K,e.setRipple=G,e.addIcon=se,e.prependSpan=ne,e.appendSpan=ae,e.validateInputType=re,e.updateHTMLAttributesToElement=le,e.updateCssClass=oe,e.getInputValidClassList=he,e.updateHTMLAttributesToWrapper=pe,e.isBlank=de}(e.Input||(e.Input={}));var G=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),J=function(e,t,i,s){var n,a=arguments.length,r=a<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(r=(a<3?n(r):a>3?n(t,i,r):n(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r},$="e-input-group-icon",Q=new RegExp("^(-)?(\\d*)$"),ee=["title","style","class"],te=0,ie=function(i){function s(e,t){var s=i.call(this,e,t)||this;return s.preventChange=!1,s.isDynamicChange=!1,s.numericOptions=e,s}return G(s,i),s.prototype.preRender=function(){this.isPrevFocused=!1,this.decimalSeparator=".",this.intRegExp=new RegExp("/^(-)?(d*)$/"),this.isCalled=!1;var e=t.getValue("ej2_instances",this.element);if(this.cloneElement=this.element.cloneNode(!0),t.removeClass([this.cloneElement],["e-control","e-numerictextbox","e-lib"]),this.angularTagName=null,this.formEle=t.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(e){return 0!==e.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,t.setValue("ej2_instances",e,this.element)}t.attributes(this.element,{role:"spinbutton",tabindex:"0",autocomplete:"off"});var a={incrementTitle:"Increment value",decrementTitle:"Decrement value",placeholder:this.placeholder};this.l10n=new t.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",t.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"),!t.isNullOrUndefined(t.closest(this.element,"fieldset"))&&t.closest(this.element,"fieldset").disabled&&(this.enabled=!1),this.updateFloatLabelOverflowWidth(),this.createPrependTemplate(),this.createAppendTemplate(),this.renderComplete())},s.prototype.checkAttributes=function(e){for(var i=0,s=e?t.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(!t.isNullOrUndefined(this.element.getAttribute(n)))switch(n){case"disabled":if(t.isNullOrUndefined(this.numericOptions)||void 0===this.numericOptions.enabled||e){var a="disabled"!==this.element.getAttribute(n)&&""!==this.element.getAttribute(n)&&"true"!==this.element.getAttribute(n);this.setProperties({enabled:a},!e)}break;case"readonly":if(t.isNullOrUndefined(this.numericOptions)||void 0===this.numericOptions.readonly||e){var r="readonly"===this.element.getAttribute(n)||""===this.element.getAttribute(n)||"true"===this.element.getAttribute(n);this.setProperties({readonly:r},!e)}break;case"placeholder":(t.isNullOrUndefined(this.numericOptions)||void 0===this.numericOptions.placeholder||e)&&this.setProperties({placeholder:this.element.placeholder},!e);break;case"value":if(t.isNullOrUndefined(this.numericOptions)||void 0===this.numericOptions.value||e){var l=this.instance.getNumberParser({format:"n"})(this.element.getAttribute(n));this.setProperties(t.setValue(n,l,{}),!e)}break;case"min":if(t.isNullOrUndefined(this.numericOptions)||void 0===this.numericOptions.min||e){var o=this.instance.getNumberParser({format:"n"})(this.element.getAttribute(n));null===o||isNaN(o)||this.setProperties(t.setValue(n,o,{}),!e)}break;case"max":if(t.isNullOrUndefined(this.numericOptions)||void 0===this.numericOptions.max||e){var h=this.instance.getNumberParser({format:"n"})(this.element.getAttribute(n));null===h||isNaN(h)||this.setProperties(t.setValue(n,h,{}),!e)}break;case"step":if(t.isNullOrUndefined(this.numericOptions)||void 0===this.numericOptions.step||e){var p=this.instance.getNumberParser({format:"n"})(this