Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ngx-mask

Package Overview
Dependencies
Maintainers
1
Versions
255
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ngx-mask - npm Package Compare versions

Comparing version 11.1.2 to 11.1.3

2

bundles/ngx-mask.umd.min.js

@@ -1,2 +0,2 @@

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/forms"),require("@angular/common")):"function"==typeof define&&define.amd?define("ngx-mask",["exports","@angular/core","@angular/forms","@angular/common"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["ngx-mask"]={},e.ng.core,e.ng.forms,e.ng.common)}(this,(function(e,t,i,r){"use strict";var s=new t.InjectionToken("config"),a=new t.InjectionToken("NEW_CONFIG"),n=new t.InjectionToken("INITIAL_CONFIG"),l={suffix:"",prefix:"",thousandSeparator:" ",decimalMarker:".",clearIfNotMatch:!1,showTemplate:!1,showMaskTyped:!1,placeHolderCharacter:"_",dropSpecialCharacters:!0,hiddenInput:void 0,shownMaskExpression:"",separatorLimit:"",allowNegativeNumbers:!1,validation:!0,specialCharacters:["-","/","(",")",".",":"," ","+",",","@","[","]",'"',"'"],leadZeroDateTime:!1,patterns:{0:{pattern:new RegExp("\\d")},9:{pattern:new RegExp("\\d"),optional:!0},X:{pattern:new RegExp("\\d"),symbol:"*"},A:{pattern:new RegExp("[a-zA-Z0-9]")},S:{pattern:new RegExp("[a-zA-Z]")},d:{pattern:new RegExp("\\d")},m:{pattern:new RegExp("\\d")},M:{pattern:new RegExp("\\d")},H:{pattern:new RegExp("\\d")},h:{pattern:new RegExp("\\d")},s:{pattern:new RegExp("\\d")}}},o=["Hh:m0:s0","Hh:m0","m0:s0"],h=["percent","Hh","s0","m0","separator","d0/M0/0000","d0/M0","d0","M0"],c=function(e,t){return(c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)};function u(e,t,i,r){return new(i||(i=Promise))((function(s,a){function n(e){try{o(r.next(e))}catch(e){a(e)}}function l(e){try{o(r.throw(e))}catch(e){a(e)}}function o(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(n,l)}o((r=r.apply(e,t||[])).next())}))}function p(e,t){var i,r,s,a,n={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return a={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function l(a){return function(l){return function(a){if(i)throw new TypeError("Generator is already executing.");for(;n;)try{if(i=1,r&&(s=2&a[0]?r.return:a[0]?r.throw||((s=r.return)&&s.call(r),0):r.next)&&!(s=s.call(r,a[1])).done)return s;switch(r=0,s&&(a=[2&a[0],s.value]),a[0]){case 0:case 1:s=a;break;case 4:return n.label++,{value:a[1],done:!1};case 5:n.label++,r=a[1],a=[0];continue;case 7:a=n.ops.pop(),n.trys.pop();continue;default:if(!(s=n.trys,(s=s.length>0&&s[s.length-1])||6!==a[0]&&2!==a[0])){n=0;continue}if(3===a[0]&&(!s||a[1]>s[0]&&a[1]<s[3])){n.label=a[1];break}if(6===a[0]&&n.label<s[1]){n.label=s[1],s=a;break}if(s&&n.label<s[2]){n.label=s[2],n.ops.push(a);break}s[2]&&n.ops.pop(),n.trys.pop();continue}a=t.call(e,n)}catch(e){a=[6,e],r=0}finally{i=s=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}}Object.create;function f(e,t){var i="function"==typeof Symbol&&e[Symbol.iterator];if(!i)return e;var r,s,a=i.call(e),n=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)n.push(r.value)}catch(e){s={error:e}}finally{try{r&&!r.done&&(i=a.return)&&i.call(a)}finally{if(s)throw s.error}}return n}Object.create;var m=function(){function e(e){var t=this;this._config=e,this.maskExpression="",this.actualValue="",this.shownMaskExpression="",this._formatWithSeparators=function(e,i,r,s){var a=e.split(r),n=a.length>1?""+r+a[1]:"",l=a[0],o=t.separatorLimit.replace(/\s/g,"");o&&+o&&(l="-"===l[0]?"-"+l.slice(1,l.length).slice(0,o.length):l.slice(0,o.length));for(var h=/(\d+)(\d{3})/;i&&h.test(l);)l=l.replace(h,"$1"+i+"$2");return void 0===s?l+n:0===s?l:l+n.substr(0,s+1)},this.percentage=function(e){return Number(e)>=0&&Number(e)<=100},this.getPrecision=function(e){var t=e.split(".");return t.length>1?Number(t[t.length-1]):1/0},this.checkInputPrecision=function(e,i,r){if(i<1/0){var s=new RegExp(t._charToRegExpExpression(r)+"\\d{"+i+"}.*$"),a=e.match(s);if(a&&a[0].length-1>i){var n=a[0].length-1-i;e=e.substring(0,e.length-n)}0===i&&e.endsWith(r)&&(e=e.substring(0,e.length-1))}return e},this._shift=new Set,this.clearIfNotMatch=this._config.clearIfNotMatch,this.dropSpecialCharacters=this._config.dropSpecialCharacters,this.maskSpecialCharacters=this._config.specialCharacters,this.maskAvailablePatterns=this._config.patterns,this.prefix=this._config.prefix,this.suffix=this._config.suffix,this.thousandSeparator=this._config.thousandSeparator,this.decimalMarker=this._config.decimalMarker,this.hiddenInput=this._config.hiddenInput,this.showMaskTyped=this._config.showMaskTyped,this.placeHolderCharacter=this._config.placeHolderCharacter,this.validation=this._config.validation,this.separatorLimit=this._config.separatorLimit,this.allowNegativeNumbers=this._config.allowNegativeNumbers,this.leadZeroDateTime=this._config.leadZeroDateTime}return e.prototype.applyMaskWithPattern=function(e,t){var i=f(t,2),r=i[0],s=i[1];return this.customPattern=s,this.applyMask(e,r)},e.prototype.applyMask=function(e,t,i,r,s){if(void 0===i&&(i=0),void 0===r&&(r=!1),void 0===s&&(s=function(){}),null==e||void 0===t)return"";var a=0,n="",l=!1,o=!1,h=1,c=!1;e.slice(0,this.prefix.length)===this.prefix&&(e=e.slice(this.prefix.length,e.length)),this.suffix&&e.endsWith(this.suffix)&&(e=e.slice(0,e.length-this.suffix.length));var u=e.toString().split("");"IP"===t&&(this.ipError=!!(u.filter((function(e){return"."===e})).length<3&&u.length<7),t="099.099.099.099");for(var p=[],f=0;f<e.length;f++)e[f].match("\\d")&&p.push(e[f]);if("CPF_CNPJ"===t&&(this.cpfCnpjError=!(11===p.length||14===p.length),t=p.length>11?"00.000.000/0000-00":"000.000.000-00"),t.startsWith("percent")){if(e.match("[a-z]|[A-Z]")||e.match(/[-!$%^&*()_+|~=`{}\[\]:";'<>?,\/.]/)){e=this._stripToDecimal(e);var m=this.getPrecision(t);e=this.checkInputPrecision(e,m,this.decimalMarker)}if(e.indexOf(".")>0&&!this.percentage(e.substring(0,e.indexOf(".")))){var d=e.substring(0,e.indexOf(".")-1);e=""+d+e.substring(e.indexOf("."),e.length)}n=this.percentage(e)?e:e.substring(0,e.length-1)}else if(t.startsWith("separator")){(e.match("[wа-яА-Я]")||e.match("[ЁёА-я]")||e.match("[a-z]|[A-Z]")||e.match(/[-@#!$%\\^&*()_£¬'+|~=`{}\[\]:";<>.?\/]/)||e.match("[^A-Za-z0-9,]"))&&(e=this._stripToDecimal(e)),e=e.length>1&&"0"===e[0]&&e[1]!==this.decimalMarker?e.slice(1,e.length):e;var k=this._charToRegExpExpression(this.thousandSeparator),g=this._charToRegExpExpression(this.decimalMarker),_='@#!$%^&*()_+|~=`{}\\[\\]:\\s,\\.";<>?\\/'.replace(k,"").replace(g,""),v=new RegExp("["+_+"]");e.match(v)&&(e=e.substring(0,e.length-1));m=this.getPrecision(t);var S=(e=this.checkInputPrecision(e,m,this.decimalMarker)).replace(new RegExp(k,"g"),""),y=(n=this._formatWithSeparators(S,this.thousandSeparator,this.decimalMarker,m)).indexOf(",")-e.indexOf(","),x=n.length-e.length;if(x>0&&","!==n[i]){o=!0;var C=0;do{this._shift.add(i+C),C++}while(C<x)}else 0!==y&&i>0&&!(n.indexOf(",")>=i&&i>3)||!(n.indexOf(".")>=i&&i>3)&&x<=0?(this._shift.clear(),o=!0,h=x,i+=x,this._shift.add(i)):this._shift.clear()}else{f=0;for(var b=u[0];f<u.length&&a!==t.length;b=u[++f])if(this._checkSymbolMask(b,t[a])&&"?"===t[a+1])n+=b,a+=2;else if("*"===t[a+1]&&l&&this._checkSymbolMask(b,t[a+2]))n+=b,a+=3,l=!1;else if(this._checkSymbolMask(b,t[a])&&"*"===t[a+1])n+=b,l=!0;else if("?"===t[a+1]&&this._checkSymbolMask(b,t[a+2]))n+=b,a+=3;else if(this._checkSymbolMask(b,t[a])){if("H"===t[a]&&Number(b)>2){a+=1,this._shiftStep(t,a,u.length),f--,this.leadZeroDateTime&&(n+="0");continue}if("h"===t[a]&&"2"===n&&Number(b)>3){a+=1,f--;continue}if("m"===t[a]&&Number(b)>5){a+=1,this._shiftStep(t,a,u.length),f--,this.leadZeroDateTime&&(n+="0");continue}if("s"===t[a]&&Number(b)>5){a+=1,this._shiftStep(t,a,u.length),f--,this.leadZeroDateTime&&(n+="0");continue}if("d"===t[a]&&(Number(b)>3&&this.leadZeroDateTime||Number(e.slice(a,a+2))>31||"/"===e[a+1])){a+=1,this._shiftStep(t,a,u.length),f--,this.leadZeroDateTime&&(n+="0");continue}if("M"===t[a]){var E=12,V=0===a&&(Number(b)>2||Number(e.slice(a,a+2))>E||"/"===e[a+1]),M=e.slice(a-3,a-1).includes("/")&&("/"===e[a-2]&&Number(e.slice(a-1,a+1))>E&&"/"!==e[a]||"/"===e[a]||"/"===e[a-3]&&Number(e.slice(a-2,a))>E&&"/"!==e[a-1]||"/"===e[a-1]),w=Number(e.slice(a-3,a-1))<=31&&!e.slice(a-3,a-1).includes("/")&&"/"===e[a-1]&&(Number(e.slice(a,a+2))>E||"/"===e[a+1]),I=Number(e.slice(a-3,a-1))>31&&!e.slice(a-3,a-1).includes("/")&&!e.slice(a-2,a).includes("/")&&Number(e.slice(a-2,a))>E,N=Number(e.slice(a-3,a-1))<=31&&!e.slice(a-3,a-1).includes("/")&&"/"!==e[a-1]&&Number(e.slice(a-1,a+1))>E;if(Number(b)>1&&this.leadZeroDateTime||V||M||w||I||N){a+=1,this._shiftStep(t,a,u.length),f--,this.leadZeroDateTime&&(n+="0");continue}}n+=b,a++}else-1!==this.maskSpecialCharacters.indexOf(t[a])?(n+=t[a],a++,this._shiftStep(t,a,u.length),f--):this.maskSpecialCharacters.indexOf(b)>-1&&this.maskAvailablePatterns[t[a]]&&this.maskAvailablePatterns[t[a]].optional?(u[a]&&"099.099.099.099"!==t&&"000.000.000-00"!==t&&"00.000.000/0000-00"!==t&&(n+=u[a]),a++,f--):"*"===this.maskExpression[a+1]&&this._findSpecialChar(this.maskExpression[a+2])&&this._findSpecialChar(b)===this.maskExpression[a+2]&&l||"?"===this.maskExpression[a+1]&&this._findSpecialChar(this.maskExpression[a+2])&&this._findSpecialChar(b)===this.maskExpression[a+2]&&l?(a+=3,n+=b):this.showMaskTyped&&this.maskSpecialCharacters.indexOf(b)<0&&b!==this.placeHolderCharacter&&(c=!0)}n.length+1===t.length&&-1!==this.maskSpecialCharacters.indexOf(t[t.length-1])&&(n+=t[t.length-1]);for(var P=i+1;this._shift.has(P);)h++,P++;var T=r?a:this._shift.has(i)?h:0;c&&T--,s(T,o),h<0&&this._shift.clear();var A=""+this.prefix+n+this.suffix;return 0===n.length&&(A=""+this.prefix+n),A},e.prototype._findSpecialChar=function(e){return this.maskSpecialCharacters.find((function(t){return t===e}))},e.prototype._checkSymbolMask=function(e,t){return this.maskAvailablePatterns=this.customPattern?this.customPattern:this.maskAvailablePatterns,this.maskAvailablePatterns[t]&&this.maskAvailablePatterns[t].pattern&&this.maskAvailablePatterns[t].pattern.test(e)},e.prototype._stripToDecimal=function(e){var t=this;return e.split("").filter((function(e,i){return e.match("^-?\\d")||e.match("\\s")||"."===e||","===e||"-"===e&&0===i&&t.allowNegativeNumbers})).join("")},e.prototype._charToRegExpExpression=function(e){if(e){return" "===e?"\\s":"[\\^$.|?*+()".indexOf(e)>=0?"\\"+e:e}return e},e.prototype._shiftStep=function(e,t,i){var r=/[*?]/g.test(e.slice(0,t))?i:t;this._shift.add(r+this.prefix.length||0)},e}();m.decorators=[{type:t.Injectable}],m.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Inject,args:[s]}]}]};var d=function(e){function t(t,i,r,s){var a=e.call(this,i)||this;return a.document=t,a._config=i,a._elementRef=r,a._renderer=s,a.maskExpression="",a.isNumberValue=!1,a.placeHolderCharacter="_",a.maskIsShown="",a.selStart=null,a.selEnd=null,a.writingValue=!1,a.onChange=function(e){},a}return function(e,t){function i(){this.constructor=e}c(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}(t,e),t.prototype.applyMask=function(t,i,r,s,a){var n=this;if(void 0===r&&(r=0),void 0===s&&(s=!1),void 0===a&&(a=function(){}),!i)return t;if(this.maskIsShown=this.showMaskTyped?this.showMaskInInput():"","IP"===this.maskExpression&&this.showMaskTyped&&(this.maskIsShown=this.showMaskInInput(t||"#")),"CPF_CNPJ"===this.maskExpression&&this.showMaskTyped&&(this.maskIsShown=this.showMaskInInput(t||"#")),!t&&this.showMaskTyped)return this.formControlResult(this.prefix),this.prefix+this.maskIsShown;var l=t&&"number"==typeof this.selStart?t[this.selStart]:"",o="";if(void 0!==this.hiddenInput){var h=this.actualValue.split("");""!==t&&h.length?"number"==typeof this.selStart&&"number"==typeof this.selEnd&&(t.length>h.length?h.splice(this.selStart,0,l):t.length<h.length&&(h.length-t.length==1?h.splice(this.selStart-1,1):h.splice(this.selStart,this.selEnd-this.selStart))):h=[],o=this.actualValue.length?this.shiftTypedSymbols(h.join("")):t}o=Boolean(o)&&o.length?o:t;var c=e.prototype.applyMask.call(this,o,i,r,s,a);if(this.actualValue=this.getActualValue(c),"."===this.thousandSeparator&&"."===this.decimalMarker&&(this.decimalMarker=","),this.maskExpression.startsWith("separator")&&!0===this.dropSpecialCharacters&&(this.maskSpecialCharacters=this.maskSpecialCharacters.filter((function(e){return e!==n.decimalMarker}))),this.formControlResult(c),!this.showMaskTyped)return this.hiddenInput&&c&&c.length?this.hideInput(c,this.maskExpression):c;var u=c.length,p=this.prefix+this.maskIsShown;if(this.maskExpression.includes("H")){var f=this._numberSkipedSymbols(c);return c+p.slice(u+f)}return"IP"===this.maskExpression||"CPF_CNPJ"===this.maskExpression?c+p:c+p.slice(u)},t.prototype._numberSkipedSymbols=function(e){for(var t=/(^|\D)(\d\D)/g,i=t.exec(e),r=0;null!=i;)r+=1,i=t.exec(e);return r},t.prototype.applyValueChanges=function(e,t,i){void 0===e&&(e=0),void 0===i&&(i=function(){});var r=this._elementRef.nativeElement;r.value=this.applyMask(r.value,this.maskExpression,e,t,i),r!==this.document.activeElement&&this.clearIfNotMatchFn()},t.prototype.hideInput=function(e,t){var i=this;return e.split("").map((function(e,r){return i.maskAvailablePatterns&&i.maskAvailablePatterns[t[r]]&&i.maskAvailablePatterns[t[r]].symbol?i.maskAvailablePatterns[t[r]].symbol:e})).join("")},t.prototype.getActualValue=function(e){var t=this,i=e.split("").filter((function(e,i){return t._checkSymbolMask(e,t.maskExpression[i])||t.maskSpecialCharacters.includes(t.maskExpression[i])&&e===t.maskExpression[i]}));return i.join("")===e?i.join(""):e},t.prototype.shiftTypedSymbols=function(e){var t=this,i="";return(e&&e.split("").map((function(r,s){if(t.maskSpecialCharacters.includes(e[s+1])&&e[s+1]!==t.maskExpression[s+1])return i=r,e[s+1];if(i.length){var a=i;return i="",a}return r}))||[]).join("")},t.prototype.showMaskInInput=function(e){if(this.showMaskTyped&&this.shownMaskExpression){if(this.maskExpression.length!==this.shownMaskExpression.length)throw new Error("Mask expression must match mask placeholder length");return this.shownMaskExpression}if(this.showMaskTyped){if(e){if("IP"===this.maskExpression)return this._checkForIp(e);if("CPF_CNPJ"===this.maskExpression)return this._checkForCpfCnpj(e)}return this.maskExpression.replace(/\w/g,this.placeHolderCharacter)}return""},t.prototype.clearIfNotMatchFn=function(){var e=this._elementRef.nativeElement;this.clearIfNotMatch&&this.prefix.length+this.maskExpression.length+this.suffix.length!==e.value.replace(/_/g,"").length&&(this.formElementProperty=["value",""],this.applyMask(e.value,this.maskExpression))},Object.defineProperty(t.prototype,"formElementProperty",{set:function(e){var t=this,i=f(e,2),r=i[0],s=i[1];Promise.resolve().then((function(){return t._renderer.setProperty(t._elementRef.nativeElement,r,s)}))},enumerable:!1,configurable:!0}),t.prototype.checkSpecialCharAmount=function(e){var t=this;return e.split("").filter((function(e){return t._findSpecialChar(e)})).length},t.prototype.removeMask=function(e){return this._removeMask(this._removeSuffix(this._removePrefix(e)),this.maskSpecialCharacters.concat("_").concat(this.placeHolderCharacter))},t.prototype._checkForIp=function(e){if("#"===e)return this.placeHolderCharacter+"."+this.placeHolderCharacter+"."+this.placeHolderCharacter+"."+this.placeHolderCharacter;for(var t=[],i=0;i<e.length;i++)e[i].match("\\d")&&t.push(e[i]);return t.length<=3?this.placeHolderCharacter+"."+this.placeHolderCharacter+"."+this.placeHolderCharacter:t.length>3&&t.length<=6?this.placeHolderCharacter+"."+this.placeHolderCharacter:t.length>6&&t.length<=9?this.placeHolderCharacter:(t.length>9&&t.length,"")},t.prototype._checkForCpfCnpj=function(e){var t=""+this.placeHolderCharacter+this.placeHolderCharacter+this.placeHolderCharacter+"."+this.placeHolderCharacter+this.placeHolderCharacter+this.placeHolderCharacter+"."+this.placeHolderCharacter+this.placeHolderCharacter+this.placeHolderCharacter+"-"+this.placeHolderCharacter+this.placeHolderCharacter,i=""+this.placeHolderCharacter+this.placeHolderCharacter+"."+this.placeHolderCharacter+this.placeHolderCharacter+this.placeHolderCharacter+"."+this.placeHolderCharacter+this.placeHolderCharacter+this.placeHolderCharacter+"/"+this.placeHolderCharacter+this.placeHolderCharacter+this.placeHolderCharacter+this.placeHolderCharacter+"-"+this.placeHolderCharacter+this.placeHolderCharacter;if("#"===e)return t;for(var r=[],s=0;s<e.length;s++)e[s].match("\\d")&&r.push(e[s]);return r.length<=3?t.slice(r.length,t.length):r.length>3&&r.length<=6?t.slice(r.length+1,t.length):r.length>6&&r.length<=9?t.slice(r.length+2,t.length):r.length>9&&r.length<11?t.slice(r.length+3,t.length):11===r.length?"":12===r.length?17===e.length?i.slice(16,i.length):i.slice(15,i.length):r.length>12&&r.length<=14?i.slice(r.length+4,i.length):""},t.prototype.formControlResult=function(e){this.writingValue||(Array.isArray(this.dropSpecialCharacters)?this.onChange(this._toNumber(this._removeMask(this._removeSuffix(this._removePrefix(e)),this.dropSpecialCharacters))):this.dropSpecialCharacters?this.onChange(this._toNumber(this._checkSymbols(e))):this.onChange(this._removeSuffix(e)))},t.prototype._toNumber=function(e){if(!this.isNumberValue)return e;var t=Number(e);return Number.isNaN(t)?e:t},t.prototype._removeMask=function(e,t){return e?e.replace(this._regExpForRemove(t),""):e},t.prototype._removePrefix=function(e){return this.prefix&&e?e.replace(this.prefix,""):e},t.prototype._removeSuffix=function(e){return this.suffix&&e?e.replace(this.suffix,""):e},t.prototype._retrieveSeparatorValue=function(e){return this._removeMask(this._removeSuffix(this._removePrefix(e)),this.maskSpecialCharacters)},t.prototype._regExpForRemove=function(e){return new RegExp(e.map((function(e){return"\\"+e})).join("|"),"gi")},t.prototype._checkSymbols=function(e){if(""===e)return e;var t=this._retrieveSeparatorPrecision(this.maskExpression),i=this._retrieveSeparatorValue(e);return"."!==this.decimalMarker&&(i=i.replace(this.decimalMarker,".")),this.isNumberValue?t?e===this.decimalMarker?null:this._checkPrecision(this.maskExpression,i):Number(i):i},t.prototype._retrieveSeparatorPrecision=function(e){var t=e.match(new RegExp("^separator\\.([^d]*)"));return t?Number(t[1]):null},t.prototype._checkPrecision=function(e,t){return e.indexOf("2")>0?Number(t).toFixed(2):Number(t)},t}(m);d.decorators=[{type:t.Injectable}],d.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Inject,args:[r.DOCUMENT]}]},{type:void 0,decorators:[{type:t.Inject,args:[s]}]},{type:t.ElementRef},{type:t.Renderer2}]};var k=function(){function e(e,t,i){this.document=e,this._maskService=t,this._config=i,this.maskExpression="",this.specialCharacters=[],this.patterns={},this.prefix="",this.suffix="",this.thousandSeparator=" ",this.decimalMarker=".",this.dropSpecialCharacters=null,this.hiddenInput=null,this.showMaskTyped=null,this.placeHolderCharacter=null,this.shownMaskExpression=null,this.showTemplate=null,this.clearIfNotMatch=null,this.validation=null,this.separatorLimit=null,this.allowNegativeNumbers=null,this.leadZeroDateTime=null,this._maskValue="",this._position=null,this._maskExpressionArray=[],this._justPasted=!1,this.onChange=function(e){},this.onTouch=function(){}}return e.prototype.ngOnChanges=function(e){var t=e.maskExpression,i=e.specialCharacters,r=e.patterns,s=e.prefix,a=e.suffix,n=e.thousandSeparator,l=e.decimalMarker,o=e.dropSpecialCharacters,h=e.hiddenInput,c=e.showMaskTyped,u=e.placeHolderCharacter,p=e.shownMaskExpression,f=e.showTemplate,m=e.clearIfNotMatch,d=e.validation,k=e.separatorLimit,g=e.allowNegativeNumbers,_=e.leadZeroDateTime;if(t&&(this._maskValue=t.currentValue||"",t.currentValue&&t.currentValue.split("||").length>1&&(this._maskExpressionArray=t.currentValue.split("||").sort((function(e,t){return e.length-t.length})),this._maskValue=this._maskExpressionArray[0],this.maskExpression=this._maskExpressionArray[0],this._maskService.maskExpression=this._maskExpressionArray[0])),i){if(!i.currentValue||!Array.isArray(i.currentValue))return;this._maskService.maskSpecialCharacters=i.currentValue||[]}r&&r.currentValue&&(this._maskService.maskAvailablePatterns=r.currentValue),s&&(this._maskService.prefix=s.currentValue),a&&(this._maskService.suffix=a.currentValue),n&&(this._maskService.thousandSeparator=n.currentValue),l&&(this._maskService.decimalMarker=l.currentValue),o&&(this._maskService.dropSpecialCharacters=o.currentValue),h&&(this._maskService.hiddenInput=h.currentValue),c&&(this._maskService.showMaskTyped=c.currentValue),u&&(this._maskService.placeHolderCharacter=u.currentValue),p&&(this._maskService.shownMaskExpression=p.currentValue),f&&(this._maskService.showTemplate=f.currentValue),m&&(this._maskService.clearIfNotMatch=m.currentValue),d&&(this._maskService.validation=d.currentValue),k&&(this._maskService.separatorLimit=k.currentValue),g&&(this._maskService.allowNegativeNumbers=g.currentValue,this._maskService.allowNegativeNumbers&&(this._maskService.maskSpecialCharacters=this._maskService.maskSpecialCharacters.filter((function(e){return"-"!==e})))),_&&(this._maskService.leadZeroDateTime=_.currentValue),this._applyMask()},e.prototype.validate=function(e){var t=e.value;if(!this._maskService.validation||!this._maskValue)return null;if(this._maskService.ipError)return this._createValidationError(t);if(this._maskService.cpfCnpjError)return this._createValidationError(t);if(this._maskValue.startsWith("separator"))return null;if(h.includes(this._maskValue))return null;if(this._maskService.clearIfNotMatch)return null;if(o.includes(this._maskValue))return this._validateTime(t);if(t&&t.toString().length>=1){var i=0,r=function(e){if(s._maskService.maskAvailablePatterns[e].optional&&!0===s._maskService.maskAvailablePatterns[e].optional){if(s._maskValue.indexOf(e)!==s._maskValue.lastIndexOf(e)){var r=s._maskValue.split("").filter((function(t){return t===e})).join("");i+=r.length}else-1!==s._maskValue.indexOf(e)&&i++;if(-1!==s._maskValue.indexOf(e)&&t.toString().length>=s._maskValue.indexOf(e))return{value:null};if(i===s._maskValue.length)return{value:null}}},s=this;for(var a in this._maskService.maskAvailablePatterns){var n=r(a);if("object"==typeof n)return n.value}if(1===this._maskValue.indexOf("{")&&t.toString().length===this._maskValue.length+Number(this._maskValue.split("{")[1].split("}")[0])-4)return null;if(1===this._maskValue.indexOf("*")||1===this._maskValue.indexOf("?"))return null;if(this._maskValue.indexOf("*")>1&&t.toString().length<this._maskValue.indexOf("*")||this._maskValue.indexOf("?")>1&&t.toString().length<this._maskValue.indexOf("?")||1===this._maskValue.indexOf("{"))return this._createValidationError(t);if(-1===this._maskValue.indexOf("*")||-1===this._maskValue.indexOf("?")){var l=this._maskService.dropSpecialCharacters?this._maskValue.length-this._maskService.checkSpecialCharAmount(this._maskValue)-i:this._maskValue.length-i;if(t.toString().length<l)return this._createValidationError(t)}}return null},e.prototype.onPaste=function(){this._justPasted=!0},e.prototype.onInput=function(e){var t=this,i=e.target;if(this._inputValue=i.value,this._setMask(),this._maskValue){var r=1===i.selectionStart?i.selectionStart+this._maskService.prefix.length:i.selectionStart,s=0,a=!1;if(this._maskService.applyValueChanges(r,this._justPasted,(function(e,i){t._justPasted=!1,s=e,a=i})),this.document.activeElement===i){this._position=1===this._position&&1===this._inputValue.length?null:this._position;var n=this._position?this._inputValue.length+r+s:r+("Backspace"!==this._code||a?s:0);n>this._getActualInputLength()&&(n=this._getActualInputLength()),i.setSelectionRange(n,n),this._position=null}}else this.onChange(i.value)},e.prototype.onBlur=function(){this._maskValue&&this._maskService.clearIfNotMatchFn(),this.onTouch()},e.prototype.onFocus=function(e){if(this._maskValue){var t=e.target;null!==t&&null!==t.selectionStart&&t.selectionStart===t.selectionEnd&&t.selectionStart>this._maskService.prefix.length&&38!==e.keyCode&&this._maskService.showMaskTyped&&(this._maskService.maskIsShown=this._maskService.showMaskInInput(),t.setSelectionRange&&this._maskService.prefix+this._maskService.maskIsShown===t.value?(t.focus(),t.setSelectionRange(0,0)):t.selectionStart>this._maskService.actualValue.length&&t.setSelectionRange(this._maskService.actualValue.length,this._maskService.actualValue.length));var i=t.value&&t.value!==this._maskService.prefix?t.value:this._maskService.prefix+this._maskService.maskIsShown;t.value!==i&&(t.value=i),(t.selectionStart||t.selectionEnd)<=this._maskService.prefix.length?t.selectionStart=this._maskService.prefix.length:t.selectionEnd>this._getActualInputLength()&&(t.selectionEnd=this._getActualInputLength())}},e.prototype.onKeyDown=function(e){var t;if(this._maskValue){this._code=e.code?e.code:e.key;var i=e.target;if(this._inputValue=i.value,this._setMask(),38===e.keyCode&&e.preventDefault(),37===e.keyCode||8===e.keyCode||46===e.keyCode){if(8===e.keyCode&&0===i.value.length&&(i.selectionStart=i.selectionEnd),8===e.keyCode&&0!==i.selectionStart)if(this.specialCharacters=(null===(t=this.specialCharacters)||void 0===t?void 0:t.length)?this.specialCharacters:this._config.specialCharacters,this.prefix.length>1&&i.selectionStart<=this.prefix.length)i.setSelectionRange(this.prefix.length,this.prefix.length);else{if(this._inputValue.length!==i.selectionStart&&1!==i.selectionStart)for(;this.specialCharacters.includes(this._inputValue[i.selectionStart-1].toString())&&(this.prefix.length>=1&&i.selectionStart>this.prefix.length||0===this.prefix.length);)i.setSelectionRange(i.selectionStart-1,i.selectionStart-1);this.suffixCheckOnPressDelete(e.keyCode,i)}this.suffixCheckOnPressDelete(e.keyCode,i),this._maskService.prefix.length&&i.selectionStart<=this._maskService.prefix.length&&i.selectionEnd<=this._maskService.prefix.length&&e.preventDefault();var r=i.selectionStart;8!==e.keyCode||i.readOnly||0!==r||i.selectionEnd!==i.value.length||0===i.value.length||(this._position=this._maskService.prefix?this._maskService.prefix.length:0,this._maskService.applyMask(this._maskService.prefix,this._maskService.maskExpression,this._position))}this.suffix&&this.suffix.length>1&&this._inputValue.length-this.suffix.length<i.selectionStart?i.setSelectionRange(this._inputValue.length-this.suffix.length,this._inputValue.length):(65===e.keyCode&&!0===e.ctrlKey||65===e.keyCode&&!0===e.metaKey)&&(i.setSelectionRange(0,this._getActualInputLength()),e.preventDefault()),this._maskService.selStart=i.selectionStart,this._maskService.selEnd=i.selectionEnd}},e.prototype.writeValue=function(e){return u(this,void 0,void 0,(function(){return p(this,(function(t){return"object"==typeof e&&null!==e&&"value"in e&&("disable"in e&&this.setDisabledState(Boolean(e.disable)),e=e.value),void 0===e&&(e=""),"number"==typeof e&&(e=String(e),e="."!==this.decimalMarker?e.replace(".",this.decimalMarker):e,this._maskService.isNumberValue=!0),e&&this._maskService.maskExpression||this._maskService.maskExpression&&(this._maskService.prefix||this._maskService.showMaskTyped)?(this._maskService.writingValue=!0,this._maskService.formElementProperty=["value",this._maskService.applyMask(e,this._maskService.maskExpression)],this._maskService.writingValue=!1):this._maskService.formElementProperty=["value",e],this._inputValue=e,[2]}))}))},e.prototype.registerOnChange=function(e){this.onChange=e,this._maskService.onChange=this.onChange},e.prototype.registerOnTouched=function(e){this.onTouch=e},e.prototype.suffixCheckOnPressDelete=function(e,t){46===e&&this.suffix.length>0&&this._inputValue.length-this.suffix.length<=t.selectionStart&&t.setSelectionRange(this._inputValue.length-this.suffix.length,this._inputValue.length),8===e&&(this.suffix.length>1&&this._inputValue.length-this.suffix.length<t.selectionStart&&t.setSelectionRange(this._inputValue.length-this.suffix.length,this._inputValue.length),1===this.suffix.length&&this._inputValue.length===t.selectionStart&&t.setSelectionRange(t.selectionStart-1,t.selectionStart-1))},e.prototype.setDisabledState=function(e){this._maskService.formElementProperty=["disabled",e]},e.prototype.onModelChange=function(e){e||(this._maskService.actualValue="")},e.prototype._repeatPatternSymbols=function(e){var t=this;return e.match(/{[0-9]+}/)&&e.split("").reduce((function(i,r,s){if(t._start="{"===r?s:t._start,"}"!==r)return t._maskService._findSpecialChar(r)?i+r:i;t._end=s;var a=Number(e.slice(t._start+1,t._end));return i+new Array(a+1).join(e[t._start-1])}),"")||e},e.prototype._applyMask=function(){this._maskService.maskExpression=this._repeatPatternSymbols(this._maskValue||""),this._maskService.formElementProperty=["value",this._maskService.applyMask(this._inputValue,this._maskService.maskExpression)]},e.prototype._validateTime=function(e){var t=this._maskValue.split("").filter((function(e){return":"!==e})).length;return null===e||0===e.length?null:0==+e[e.length-1]&&e.length<t||e.length<=t-2?this._createValidationError(e):null},e.prototype._getActualInputLength=function(){return this._maskService.actualValue.length||this._maskService.actualValue.length+this._maskService.prefix.length},e.prototype._createValidationError=function(e){return{mask:{requiredMask:this._maskValue,actualValue:e}}},e.prototype._setMask=function(){var e=this;this._maskExpressionArray.length>0&&this._maskExpressionArray.some((function(t){var i=e._maskService.removeMask(e._inputValue).length<=e._maskService.removeMask(t).length;if(e._inputValue&&i)return e._maskValue=t,e.maskExpression=t,e._maskService.maskExpression=t,i;e._maskValue=e._maskExpressionArray[e._maskExpressionArray.length-1],e.maskExpression=e._maskExpressionArray[e._maskExpressionArray.length-1],e._maskService.maskExpression=e._maskExpressionArray[e._maskExpressionArray.length-1]}))},e}();k.decorators=[{type:t.Directive,args:[{selector:"input[mask], textarea[mask]",providers:[{provide:i.NG_VALUE_ACCESSOR,useExisting:t.forwardRef((function(){return k})),multi:!0},{provide:i.NG_VALIDATORS,useExisting:t.forwardRef((function(){return k})),multi:!0},d]}]}],k.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Inject,args:[r.DOCUMENT]}]},{type:d},{type:void 0,decorators:[{type:t.Inject,args:[s]}]}]},k.propDecorators={maskExpression:[{type:t.Input,args:["mask"]}],specialCharacters:[{type:t.Input}],patterns:[{type:t.Input}],prefix:[{type:t.Input}],suffix:[{type:t.Input}],thousandSeparator:[{type:t.Input}],decimalMarker:[{type:t.Input}],dropSpecialCharacters:[{type:t.Input}],hiddenInput:[{type:t.Input}],showMaskTyped:[{type:t.Input}],placeHolderCharacter:[{type:t.Input}],shownMaskExpression:[{type:t.Input}],showTemplate:[{type:t.Input}],clearIfNotMatch:[{type:t.Input}],validation:[{type:t.Input}],separatorLimit:[{type:t.Input}],allowNegativeNumbers:[{type:t.Input}],leadZeroDateTime:[{type:t.Input}],onPaste:[{type:t.HostListener,args:["paste"]}],onInput:[{type:t.HostListener,args:["input",["$event"]]}],onBlur:[{type:t.HostListener,args:["blur"]}],onFocus:[{type:t.HostListener,args:["click",["$event"]]}],onKeyDown:[{type:t.HostListener,args:["keydown",["$event"]]}],onModelChange:[{type:t.HostListener,args:["ngModelChange",["$event"]]}]};var g=function(){function e(e){this._maskService=e}return e.prototype.transform=function(e,t,i){return void 0===i&&(i=null),e||"number"==typeof e?(i&&(this._maskService.thousandSeparator=i),"string"==typeof t?this._maskService.applyMask(""+e,t):this._maskService.applyMaskWithPattern(""+e,t)):""},e}();g.decorators=[{type:t.Pipe,args:[{name:"mask",pure:!0}]}],g.ctorParameters=function(){return[{type:m}]};var _=function(){function e(){}return e.forRoot=function(t){return{ngModule:e,providers:[{provide:a,useValue:t},{provide:n,useValue:l},{provide:s,useFactory:v,deps:[n,a]},m]}},e.forChild=function(){return{ngModule:e}},e}();function v(e,t){return t instanceof Function?Object.assign(Object.assign({},e),t()):Object.assign(Object.assign({},e),t)}_.decorators=[{type:t.NgModule,args:[{exports:[k,g],declarations:[k,g]}]}];var S="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};S.KeyboardEvent||(S.KeyboardEvent=function(e,t){}),e.INITIAL_CONFIG=n,e.MaskApplierService=m,e.MaskDirective=k,e.MaskPipe=g,e.MaskService=d,e.NEW_CONFIG=a,e.NgxMaskModule=_,e._configFactory=v,e.config=s,e.initialConfig=l,e.timeMasks=o,e.withoutValidation=h,Object.defineProperty(e,"__esModule",{value:!0})}));
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/forms"),require("@angular/common")):"function"==typeof define&&define.amd?define("ngx-mask",["exports","@angular/core","@angular/forms","@angular/common"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["ngx-mask"]={},e.ng.core,e.ng.forms,e.ng.common)}(this,(function(e,t,i,r){"use strict";var s=new t.InjectionToken("config"),a=new t.InjectionToken("NEW_CONFIG"),n=new t.InjectionToken("INITIAL_CONFIG"),l={suffix:"",prefix:"",thousandSeparator:" ",decimalMarker:".",clearIfNotMatch:!1,showTemplate:!1,showMaskTyped:!1,placeHolderCharacter:"_",dropSpecialCharacters:!0,hiddenInput:void 0,shownMaskExpression:"",separatorLimit:"",allowNegativeNumbers:!1,validation:!0,specialCharacters:["-","/","(",")",".",":"," ","+",",","@","[","]",'"',"'"],leadZeroDateTime:!1,patterns:{0:{pattern:new RegExp("\\d")},9:{pattern:new RegExp("\\d"),optional:!0},X:{pattern:new RegExp("\\d"),symbol:"*"},A:{pattern:new RegExp("[a-zA-Z0-9]")},S:{pattern:new RegExp("[a-zA-Z]")},d:{pattern:new RegExp("\\d")},m:{pattern:new RegExp("\\d")},M:{pattern:new RegExp("\\d")},H:{pattern:new RegExp("\\d")},h:{pattern:new RegExp("\\d")},s:{pattern:new RegExp("\\d")}}},h=["Hh:m0:s0","Hh:m0","m0:s0"],o=["percent","Hh","s0","m0","separator","d0/M0/0000","d0/M0","d0","M0"],c=function(e,t){return(c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)};function u(e,t,i,r){return new(i||(i=Promise))((function(s,a){function n(e){try{h(r.next(e))}catch(e){a(e)}}function l(e){try{h(r.throw(e))}catch(e){a(e)}}function h(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(n,l)}h((r=r.apply(e,t||[])).next())}))}function p(e,t){var i,r,s,a,n={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return a={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function l(a){return function(l){return function(a){if(i)throw new TypeError("Generator is already executing.");for(;n;)try{if(i=1,r&&(s=2&a[0]?r.return:a[0]?r.throw||((s=r.return)&&s.call(r),0):r.next)&&!(s=s.call(r,a[1])).done)return s;switch(r=0,s&&(a=[2&a[0],s.value]),a[0]){case 0:case 1:s=a;break;case 4:return n.label++,{value:a[1],done:!1};case 5:n.label++,r=a[1],a=[0];continue;case 7:a=n.ops.pop(),n.trys.pop();continue;default:if(!(s=n.trys,(s=s.length>0&&s[s.length-1])||6!==a[0]&&2!==a[0])){n=0;continue}if(3===a[0]&&(!s||a[1]>s[0]&&a[1]<s[3])){n.label=a[1];break}if(6===a[0]&&n.label<s[1]){n.label=s[1],s=a;break}if(s&&n.label<s[2]){n.label=s[2],n.ops.push(a);break}s[2]&&n.ops.pop(),n.trys.pop();continue}a=t.call(e,n)}catch(e){a=[6,e],r=0}finally{i=s=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}}Object.create;function f(e,t){var i="function"==typeof Symbol&&e[Symbol.iterator];if(!i)return e;var r,s,a=i.call(e),n=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)n.push(r.value)}catch(e){s={error:e}}finally{try{r&&!r.done&&(i=a.return)&&i.call(a)}finally{if(s)throw s.error}}return n}Object.create;var m=function(){function e(e){var t=this;this._config=e,this.maskExpression="",this.actualValue="",this.shownMaskExpression="",this._formatWithSeparators=function(e,i,r,s){var a=e.split(r),n=a.length>1?""+r+a[1]:"",l=a[0],h=t.separatorLimit.replace(/\s/g,"");h&&+h&&(l="-"===l[0]?"-"+l.slice(1,l.length).slice(0,h.length):l.slice(0,h.length));for(var o=/(\d+)(\d{3})/;i&&o.test(l);)l=l.replace(o,"$1"+i+"$2");return void 0===s?l+n:0===s?l:l+n.substr(0,s+1)},this.percentage=function(e){return Number(e)>=0&&Number(e)<=100},this.getPrecision=function(e){var t=e.split(".");return t.length>1?Number(t[t.length-1]):1/0},this.checkInputPrecision=function(e,i,r){if(i<1/0){var s=new RegExp(t._charToRegExpExpression(r)+"\\d{"+i+"}.*$"),a=e.match(s);if(a&&a[0].length-1>i){var n=a[0].length-1-i;e=e.substring(0,e.length-n)}0===i&&e.endsWith(r)&&(e=e.substring(0,e.length-1))}return e},this._shift=new Set,this.clearIfNotMatch=this._config.clearIfNotMatch,this.dropSpecialCharacters=this._config.dropSpecialCharacters,this.maskSpecialCharacters=this._config.specialCharacters,this.maskAvailablePatterns=this._config.patterns,this.prefix=this._config.prefix,this.suffix=this._config.suffix,this.thousandSeparator=this._config.thousandSeparator,this.decimalMarker=this._config.decimalMarker,this.hiddenInput=this._config.hiddenInput,this.showMaskTyped=this._config.showMaskTyped,this.placeHolderCharacter=this._config.placeHolderCharacter,this.validation=this._config.validation,this.separatorLimit=this._config.separatorLimit,this.allowNegativeNumbers=this._config.allowNegativeNumbers,this.leadZeroDateTime=this._config.leadZeroDateTime}return e.prototype.applyMaskWithPattern=function(e,t){var i=f(t,2),r=i[0],s=i[1];return this.customPattern=s,this.applyMask(e,r)},e.prototype.applyMask=function(e,t,i,r,s,a){var n=this;if(void 0===i&&(i=0),void 0===r&&(r=!1),void 0===s&&(s=!1),void 0===a&&(a=function(){}),null==e||void 0===t)return"";var l=0,h="",o=!1,c=!1,u=1,p=!1;e.slice(0,this.prefix.length)===this.prefix&&(e=e.slice(this.prefix.length,e.length)),this.suffix&&e.endsWith(this.suffix)&&(e=e.slice(0,e.length-this.suffix.length));var f=e.toString().split("");"IP"===t&&(this.ipError=!!(f.filter((function(e){return"."===e})).length<3&&f.length<7),t="099.099.099.099");for(var m=[],d=0;d<e.length;d++)e[d].match("\\d")&&m.push(e[d]);if("CPF_CNPJ"===t&&(this.cpfCnpjError=!(11===m.length||14===m.length),t=m.length>11?"00.000.000/0000-00":"000.000.000-00"),t.startsWith("percent")){if(e.match("[a-z]|[A-Z]")||e.match(/[-!$%^&*()_+|~=`{}\[\]:";'<>?,\/.]/)){e=this._stripToDecimal(e);var k=this.getPrecision(t);e=this.checkInputPrecision(e,k,this.decimalMarker)}if(e.indexOf(".")>0&&!this.percentage(e.substring(0,e.indexOf(".")))){var g=e.substring(0,e.indexOf(".")-1);e=""+g+e.substring(e.indexOf("."),e.length)}h=this.percentage(e)?e:e.substring(0,e.length-1)}else if(t.startsWith("separator")){(e.match("[wа-яА-Я]")||e.match("[ЁёА-я]")||e.match("[a-z]|[A-Z]")||e.match(/[-@#!$%\\^&*()_£¬'+|~=`{}\[\]:";<>.?\/]/)||e.match("[^A-Za-z0-9,]"))&&(e=this._stripToDecimal(e)),e=e.length>1&&"0"===e[0]&&e[1]!==this.decimalMarker?e.slice(1,e.length):e;var _=this._charToRegExpExpression(this.thousandSeparator),v=this._charToRegExpExpression(this.decimalMarker),S='@#!$%^&*()_+|~=`{}\\[\\]:\\s,\\.";<>?\\/'.replace(_,"").replace(v,""),y=new RegExp("["+S+"]");e.match(y)&&(e=e.substring(0,e.length-1));k=this.getPrecision(t);var x=(e=this.checkInputPrecision(e,k,this.decimalMarker)).replace(new RegExp(_,"g"),""),C=(h=this._formatWithSeparators(x,this.thousandSeparator,this.decimalMarker,k)).indexOf(",")-e.indexOf(","),b=h.length-e.length;if(b>0&&","!==h[i]){c=!0;var E=0;do{this._shift.add(i+E),E++}while(E<b)}else 0!==C&&i>0&&!(h.indexOf(",")>=i&&i>3)||!(h.indexOf(".")>=i&&i>3)&&b<=0?(this._shift.clear(),c=!0,u=b,i+=b,this._shift.add(i)):this._shift.clear()}else{d=0;for(var V=f[0];d<f.length&&l!==t.length;V=f[++d])if(this._checkSymbolMask(V,t[l])&&"?"===t[l+1])h+=V,l+=2;else if("*"===t[l+1]&&o&&this._checkSymbolMask(V,t[l+2]))h+=V,l+=3,o=!1;else if(this._checkSymbolMask(V,t[l])&&"*"===t[l+1])h+=V,o=!0;else if("?"===t[l+1]&&this._checkSymbolMask(V,t[l+2]))h+=V,l+=3;else if(this._checkSymbolMask(V,t[l])){if("H"===t[l]&&Number(V)>2){l+=1,this._shiftStep(t,l,f.length),d--,this.leadZeroDateTime&&(h+="0");continue}if("h"===t[l]&&"2"===h&&Number(V)>3){l+=1,d--;continue}if("m"===t[l]&&Number(V)>5){l+=1,this._shiftStep(t,l,f.length),d--,this.leadZeroDateTime&&(h+="0");continue}if("s"===t[l]&&Number(V)>5){l+=1,this._shiftStep(t,l,f.length),d--,this.leadZeroDateTime&&(h+="0");continue}if("d"===t[l]&&(Number(V)>3&&this.leadZeroDateTime||Number(e.slice(l,l+2))>31||"/"===e[l+1])){l+=1,this._shiftStep(t,l,f.length),d--,this.leadZeroDateTime&&(h+="0");continue}if("M"===t[l]){var M=12,w=0===l&&(Number(V)>2||Number(e.slice(l,l+2))>M||"/"===e[l+1]),I=e.slice(l-3,l-1).includes("/")&&("/"===e[l-2]&&Number(e.slice(l-1,l+1))>M&&"/"!==e[l]||"/"===e[l]||"/"===e[l-3]&&Number(e.slice(l-2,l))>M&&"/"!==e[l-1]||"/"===e[l-1]),N=Number(e.slice(l-3,l-1))<=31&&!e.slice(l-3,l-1).includes("/")&&"/"===e[l-1]&&(Number(e.slice(l,l+2))>M||"/"===e[l+1]),P=Number(e.slice(l-3,l-1))>31&&!e.slice(l-3,l-1).includes("/")&&!e.slice(l-2,l).includes("/")&&Number(e.slice(l-2,l))>M,T=Number(e.slice(l-3,l-1))<=31&&!e.slice(l-3,l-1).includes("/")&&"/"!==e[l-1]&&Number(e.slice(l-1,l+1))>M;if(Number(V)>1&&this.leadZeroDateTime||w||I||N||P||T){l+=1,this._shiftStep(t,l,f.length),d--,this.leadZeroDateTime&&(h+="0");continue}}h+=V,l++}else-1!==this.maskSpecialCharacters.indexOf(t[l])?(h+=t[l],l++,this._shiftStep(t,l,f.length),d--):this.maskSpecialCharacters.indexOf(V)>-1&&this.maskAvailablePatterns[t[l]]&&this.maskAvailablePatterns[t[l]].optional?(f[l]&&"099.099.099.099"!==t&&"000.000.000-00"!==t&&"00.000.000/0000-00"!==t&&(h+=f[l]),l++,d--):"*"===this.maskExpression[l+1]&&this._findSpecialChar(this.maskExpression[l+2])&&this._findSpecialChar(V)===this.maskExpression[l+2]&&o||"?"===this.maskExpression[l+1]&&this._findSpecialChar(this.maskExpression[l+2])&&this._findSpecialChar(V)===this.maskExpression[l+2]&&o?(l+=3,h+=V):this.showMaskTyped&&this.maskSpecialCharacters.indexOf(V)<0&&V!==this.placeHolderCharacter&&(p=!0)}h.length+1===t.length&&-1!==this.maskSpecialCharacters.indexOf(t[t.length-1])&&(h+=t[t.length-1]);for(var A=i+1;this._shift.has(A);)u++,A++;var H=r?l:this._shift.has(i)?u:0;p&&H--,a(H,c),u<0&&this._shift.clear();var O=!1;s&&(O=f.every((function(e){return n.maskSpecialCharacters.includes(e)})));var R=""+this.prefix+(O?"":h)+this.suffix;return 0===h.length&&(R=""+this.prefix+h),R},e.prototype._findSpecialChar=function(e){return this.maskSpecialCharacters.find((function(t){return t===e}))},e.prototype._checkSymbolMask=function(e,t){return this.maskAvailablePatterns=this.customPattern?this.customPattern:this.maskAvailablePatterns,this.maskAvailablePatterns[t]&&this.maskAvailablePatterns[t].pattern&&this.maskAvailablePatterns[t].pattern.test(e)},e.prototype._stripToDecimal=function(e){var t=this;return e.split("").filter((function(e,i){return e.match("^-?\\d")||e.match("\\s")||"."===e||","===e||"-"===e&&0===i&&t.allowNegativeNumbers})).join("")},e.prototype._charToRegExpExpression=function(e){if(e){return" "===e?"\\s":"[\\^$.|?*+()".indexOf(e)>=0?"\\"+e:e}return e},e.prototype._shiftStep=function(e,t,i){var r=/[*?]/g.test(e.slice(0,t))?i:t;this._shift.add(r+this.prefix.length||0)},e}();m.decorators=[{type:t.Injectable}],m.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Inject,args:[s]}]}]};var d=function(e){function t(t,i,r,s){var a=e.call(this,i)||this;return a.document=t,a._config=i,a._elementRef=r,a._renderer=s,a.maskExpression="",a.isNumberValue=!1,a.placeHolderCharacter="_",a.maskIsShown="",a.selStart=null,a.selEnd=null,a.writingValue=!1,a.onChange=function(e){},a}return function(e,t){function i(){this.constructor=e}c(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}(t,e),t.prototype.applyMask=function(t,i,r,s,a,n){var l=this;if(void 0===r&&(r=0),void 0===s&&(s=!1),void 0===a&&(a=!1),void 0===n&&(n=function(){}),!i)return t;if(this.maskIsShown=this.showMaskTyped?this.showMaskInInput():"","IP"===this.maskExpression&&this.showMaskTyped&&(this.maskIsShown=this.showMaskInInput(t||"#")),"CPF_CNPJ"===this.maskExpression&&this.showMaskTyped&&(this.maskIsShown=this.showMaskInInput(t||"#")),!t&&this.showMaskTyped)return this.formControlResult(this.prefix),this.prefix+this.maskIsShown;var h=t&&"number"==typeof this.selStart?t[this.selStart]:"",o="";if(void 0!==this.hiddenInput){var c=this.actualValue.split("");""!==t&&c.length?"number"==typeof this.selStart&&"number"==typeof this.selEnd&&(t.length>c.length?c.splice(this.selStart,0,h):t.length<c.length&&(c.length-t.length==1?c.splice(this.selStart-1,1):c.splice(this.selStart,this.selEnd-this.selStart))):c=[],o=this.actualValue.length?this.shiftTypedSymbols(c.join("")):t}o=Boolean(o)&&o.length?o:t;var u=e.prototype.applyMask.call(this,o,i,r,s,a,n);if(this.actualValue=this.getActualValue(u),"."===this.thousandSeparator&&"."===this.decimalMarker&&(this.decimalMarker=","),this.maskExpression.startsWith("separator")&&!0===this.dropSpecialCharacters&&(this.maskSpecialCharacters=this.maskSpecialCharacters.filter((function(e){return e!==l.decimalMarker}))),this.formControlResult(u),!this.showMaskTyped)return this.hiddenInput&&u&&u.length?this.hideInput(u,this.maskExpression):u;var p=u.length,f=this.prefix+this.maskIsShown;if(this.maskExpression.includes("H")){var m=this._numberSkipedSymbols(u);return u+f.slice(p+m)}return"IP"===this.maskExpression||"CPF_CNPJ"===this.maskExpression?u+f:u+f.slice(p)},t.prototype._numberSkipedSymbols=function(e){for(var t=/(^|\D)(\d\D)/g,i=t.exec(e),r=0;null!=i;)r+=1,i=t.exec(e);return r},t.prototype.applyValueChanges=function(e,t,i,r){void 0===e&&(e=0),void 0===r&&(r=function(){});var s=this._elementRef.nativeElement;s.value=this.applyMask(s.value,this.maskExpression,e,t,i,r),s!==this.document.activeElement&&this.clearIfNotMatchFn()},t.prototype.hideInput=function(e,t){var i=this;return e.split("").map((function(e,r){return i.maskAvailablePatterns&&i.maskAvailablePatterns[t[r]]&&i.maskAvailablePatterns[t[r]].symbol?i.maskAvailablePatterns[t[r]].symbol:e})).join("")},t.prototype.getActualValue=function(e){var t=this,i=e.split("").filter((function(e,i){return t._checkSymbolMask(e,t.maskExpression[i])||t.maskSpecialCharacters.includes(t.maskExpression[i])&&e===t.maskExpression[i]}));return i.join("")===e?i.join(""):e},t.prototype.shiftTypedSymbols=function(e){var t=this,i="";return(e&&e.split("").map((function(r,s){if(t.maskSpecialCharacters.includes(e[s+1])&&e[s+1]!==t.maskExpression[s+1])return i=r,e[s+1];if(i.length){var a=i;return i="",a}return r}))||[]).join("")},t.prototype.showMaskInInput=function(e){if(this.showMaskTyped&&this.shownMaskExpression){if(this.maskExpression.length!==this.shownMaskExpression.length)throw new Error("Mask expression must match mask placeholder length");return this.shownMaskExpression}if(this.showMaskTyped){if(e){if("IP"===this.maskExpression)return this._checkForIp(e);if("CPF_CNPJ"===this.maskExpression)return this._checkForCpfCnpj(e)}return this.maskExpression.replace(/\w/g,this.placeHolderCharacter)}return""},t.prototype.clearIfNotMatchFn=function(){var e=this._elementRef.nativeElement;this.clearIfNotMatch&&this.prefix.length+this.maskExpression.length+this.suffix.length!==e.value.replace(/_/g,"").length&&(this.formElementProperty=["value",""],this.applyMask(e.value,this.maskExpression))},Object.defineProperty(t.prototype,"formElementProperty",{set:function(e){var t=this,i=f(e,2),r=i[0],s=i[1];Promise.resolve().then((function(){return t._renderer.setProperty(t._elementRef.nativeElement,r,s)}))},enumerable:!1,configurable:!0}),t.prototype.checkSpecialCharAmount=function(e){var t=this;return e.split("").filter((function(e){return t._findSpecialChar(e)})).length},t.prototype.removeMask=function(e){return this._removeMask(this._removeSuffix(this._removePrefix(e)),this.maskSpecialCharacters.concat("_").concat(this.placeHolderCharacter))},t.prototype._checkForIp=function(e){if("#"===e)return this.placeHolderCharacter+"."+this.placeHolderCharacter+"."+this.placeHolderCharacter+"."+this.placeHolderCharacter;for(var t=[],i=0;i<e.length;i++)e[i].match("\\d")&&t.push(e[i]);return t.length<=3?this.placeHolderCharacter+"."+this.placeHolderCharacter+"."+this.placeHolderCharacter:t.length>3&&t.length<=6?this.placeHolderCharacter+"."+this.placeHolderCharacter:t.length>6&&t.length<=9?this.placeHolderCharacter:(t.length>9&&t.length,"")},t.prototype._checkForCpfCnpj=function(e){var t=""+this.placeHolderCharacter+this.placeHolderCharacter+this.placeHolderCharacter+"."+this.placeHolderCharacter+this.placeHolderCharacter+this.placeHolderCharacter+"."+this.placeHolderCharacter+this.placeHolderCharacter+this.placeHolderCharacter+"-"+this.placeHolderCharacter+this.placeHolderCharacter,i=""+this.placeHolderCharacter+this.placeHolderCharacter+"."+this.placeHolderCharacter+this.placeHolderCharacter+this.placeHolderCharacter+"."+this.placeHolderCharacter+this.placeHolderCharacter+this.placeHolderCharacter+"/"+this.placeHolderCharacter+this.placeHolderCharacter+this.placeHolderCharacter+this.placeHolderCharacter+"-"+this.placeHolderCharacter+this.placeHolderCharacter;if("#"===e)return t;for(var r=[],s=0;s<e.length;s++)e[s].match("\\d")&&r.push(e[s]);return r.length<=3?t.slice(r.length,t.length):r.length>3&&r.length<=6?t.slice(r.length+1,t.length):r.length>6&&r.length<=9?t.slice(r.length+2,t.length):r.length>9&&r.length<11?t.slice(r.length+3,t.length):11===r.length?"":12===r.length?17===e.length?i.slice(16,i.length):i.slice(15,i.length):r.length>12&&r.length<=14?i.slice(r.length+4,i.length):""},t.prototype.formControlResult=function(e){this.writingValue||(Array.isArray(this.dropSpecialCharacters)?this.onChange(this._toNumber(this._removeMask(this._removeSuffix(this._removePrefix(e)),this.dropSpecialCharacters))):this.dropSpecialCharacters?this.onChange(this._toNumber(this._checkSymbols(e))):this.onChange(this._removeSuffix(e)))},t.prototype._toNumber=function(e){if(!this.isNumberValue)return e;var t=Number(e);return Number.isNaN(t)?e:t},t.prototype._removeMask=function(e,t){return e?e.replace(this._regExpForRemove(t),""):e},t.prototype._removePrefix=function(e){return this.prefix&&e?e.replace(this.prefix,""):e},t.prototype._removeSuffix=function(e){return this.suffix&&e?e.replace(this.suffix,""):e},t.prototype._retrieveSeparatorValue=function(e){return this._removeMask(this._removeSuffix(this._removePrefix(e)),this.maskSpecialCharacters)},t.prototype._regExpForRemove=function(e){return new RegExp(e.map((function(e){return"\\"+e})).join("|"),"gi")},t.prototype._checkSymbols=function(e){if(""===e)return e;var t=this._retrieveSeparatorPrecision(this.maskExpression),i=this._retrieveSeparatorValue(e);return"."!==this.decimalMarker&&(i=i.replace(this.decimalMarker,".")),this.isNumberValue?t?e===this.decimalMarker?null:this._checkPrecision(this.maskExpression,i):Number(i):i},t.prototype._retrieveSeparatorPrecision=function(e){var t=e.match(new RegExp("^separator\\.([^d]*)"));return t?Number(t[1]):null},t.prototype._checkPrecision=function(e,t){return e.indexOf("2")>0?Number(t).toFixed(2):Number(t)},t}(m);d.decorators=[{type:t.Injectable}],d.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Inject,args:[r.DOCUMENT]}]},{type:void 0,decorators:[{type:t.Inject,args:[s]}]},{type:t.ElementRef},{type:t.Renderer2}]};var k=function(){function e(e,t,i){this.document=e,this._maskService=t,this._config=i,this.maskExpression="",this.specialCharacters=[],this.patterns={},this.prefix="",this.suffix="",this.thousandSeparator=" ",this.decimalMarker=".",this.dropSpecialCharacters=null,this.hiddenInput=null,this.showMaskTyped=null,this.placeHolderCharacter=null,this.shownMaskExpression=null,this.showTemplate=null,this.clearIfNotMatch=null,this.validation=null,this.separatorLimit=null,this.allowNegativeNumbers=null,this.leadZeroDateTime=null,this._maskValue="",this._position=null,this._maskExpressionArray=[],this._justPasted=!1,this.onChange=function(e){},this.onTouch=function(){}}return e.prototype.ngOnChanges=function(e){var t=e.maskExpression,i=e.specialCharacters,r=e.patterns,s=e.prefix,a=e.suffix,n=e.thousandSeparator,l=e.decimalMarker,h=e.dropSpecialCharacters,o=e.hiddenInput,c=e.showMaskTyped,u=e.placeHolderCharacter,p=e.shownMaskExpression,f=e.showTemplate,m=e.clearIfNotMatch,d=e.validation,k=e.separatorLimit,g=e.allowNegativeNumbers,_=e.leadZeroDateTime;if(t&&(this._maskValue=t.currentValue||"",t.currentValue&&t.currentValue.split("||").length>1&&(this._maskExpressionArray=t.currentValue.split("||").sort((function(e,t){return e.length-t.length})),this._maskValue=this._maskExpressionArray[0],this.maskExpression=this._maskExpressionArray[0],this._maskService.maskExpression=this._maskExpressionArray[0])),i){if(!i.currentValue||!Array.isArray(i.currentValue))return;this._maskService.maskSpecialCharacters=i.currentValue||[]}r&&r.currentValue&&(this._maskService.maskAvailablePatterns=r.currentValue),s&&(this._maskService.prefix=s.currentValue),a&&(this._maskService.suffix=a.currentValue),n&&(this._maskService.thousandSeparator=n.currentValue),l&&(this._maskService.decimalMarker=l.currentValue),h&&(this._maskService.dropSpecialCharacters=h.currentValue),o&&(this._maskService.hiddenInput=o.currentValue),c&&(this._maskService.showMaskTyped=c.currentValue),u&&(this._maskService.placeHolderCharacter=u.currentValue),p&&(this._maskService.shownMaskExpression=p.currentValue),f&&(this._maskService.showTemplate=f.currentValue),m&&(this._maskService.clearIfNotMatch=m.currentValue),d&&(this._maskService.validation=d.currentValue),k&&(this._maskService.separatorLimit=k.currentValue),g&&(this._maskService.allowNegativeNumbers=g.currentValue,this._maskService.allowNegativeNumbers&&(this._maskService.maskSpecialCharacters=this._maskService.maskSpecialCharacters.filter((function(e){return"-"!==e})))),_&&(this._maskService.leadZeroDateTime=_.currentValue),this._applyMask()},e.prototype.validate=function(e){var t=e.value;if(!this._maskService.validation||!this._maskValue)return null;if(this._maskService.ipError)return this._createValidationError(t);if(this._maskService.cpfCnpjError)return this._createValidationError(t);if(this._maskValue.startsWith("separator"))return null;if(o.includes(this._maskValue))return null;if(this._maskService.clearIfNotMatch)return null;if(h.includes(this._maskValue))return this._validateTime(t);if(t&&t.toString().length>=1){var i=0,r=function(e){if(s._maskService.maskAvailablePatterns[e].optional&&!0===s._maskService.maskAvailablePatterns[e].optional){if(s._maskValue.indexOf(e)!==s._maskValue.lastIndexOf(e)){var r=s._maskValue.split("").filter((function(t){return t===e})).join("");i+=r.length}else-1!==s._maskValue.indexOf(e)&&i++;if(-1!==s._maskValue.indexOf(e)&&t.toString().length>=s._maskValue.indexOf(e))return{value:null};if(i===s._maskValue.length)return{value:null}}},s=this;for(var a in this._maskService.maskAvailablePatterns){var n=r(a);if("object"==typeof n)return n.value}if(1===this._maskValue.indexOf("{")&&t.toString().length===this._maskValue.length+Number(this._maskValue.split("{")[1].split("}")[0])-4)return null;if(1===this._maskValue.indexOf("*")||1===this._maskValue.indexOf("?"))return null;if(this._maskValue.indexOf("*")>1&&t.toString().length<this._maskValue.indexOf("*")||this._maskValue.indexOf("?")>1&&t.toString().length<this._maskValue.indexOf("?")||1===this._maskValue.indexOf("{"))return this._createValidationError(t);if(-1===this._maskValue.indexOf("*")||-1===this._maskValue.indexOf("?")){var l=this._maskService.dropSpecialCharacters?this._maskValue.length-this._maskService.checkSpecialCharAmount(this._maskValue)-i:this._maskValue.length-i;if(t.toString().length<l)return this._createValidationError(t)}}return null},e.prototype.onPaste=function(){this._justPasted=!0},e.prototype.onInput=function(e){var t=this,i=e.target;if(this._inputValue=i.value,this._setMask(),this._maskValue){var r=1===i.selectionStart?i.selectionStart+this._maskService.prefix.length:i.selectionStart,s=0,a=!1;if(this._maskService.applyValueChanges(r,this._justPasted,"Backspace"===this._code,(function(e,i){t._justPasted=!1,s=e,a=i})),this.document.activeElement===i){this._position=1===this._position&&1===this._inputValue.length?null:this._position;var n=this._position?this._inputValue.length+r+s:r+("Backspace"!==this._code||a?s:0);n>this._getActualInputLength()&&(n=this._getActualInputLength()),i.setSelectionRange(n,n),this._position=null}}else this.onChange(i.value)},e.prototype.onBlur=function(){this._maskValue&&this._maskService.clearIfNotMatchFn(),this.onTouch()},e.prototype.onFocus=function(e){if(this._maskValue){var t=e.target;null!==t&&null!==t.selectionStart&&t.selectionStart===t.selectionEnd&&t.selectionStart>this._maskService.prefix.length&&38!==e.keyCode&&this._maskService.showMaskTyped&&(this._maskService.maskIsShown=this._maskService.showMaskInInput(),t.setSelectionRange&&this._maskService.prefix+this._maskService.maskIsShown===t.value?(t.focus(),t.setSelectionRange(0,0)):t.selectionStart>this._maskService.actualValue.length&&t.setSelectionRange(this._maskService.actualValue.length,this._maskService.actualValue.length));var i=t.value&&t.value!==this._maskService.prefix?t.value:this._maskService.prefix+this._maskService.maskIsShown;t.value!==i&&(t.value=i),(t.selectionStart||t.selectionEnd)<=this._maskService.prefix.length?t.selectionStart=this._maskService.prefix.length:t.selectionEnd>this._getActualInputLength()&&(t.selectionEnd=this._getActualInputLength())}},e.prototype.onKeyDown=function(e){var t;if(this._maskValue){this._code=e.code?e.code:e.key;var i=e.target;if(this._inputValue=i.value,this._setMask(),38===e.keyCode&&e.preventDefault(),37===e.keyCode||8===e.keyCode||46===e.keyCode){if(8===e.keyCode&&0===i.value.length&&(i.selectionStart=i.selectionEnd),8===e.keyCode&&0!==i.selectionStart)if(this.specialCharacters=(null===(t=this.specialCharacters)||void 0===t?void 0:t.length)?this.specialCharacters:this._config.specialCharacters,this.prefix.length>1&&i.selectionStart<=this.prefix.length)i.setSelectionRange(this.prefix.length,this.prefix.length);else{if(this._inputValue.length!==i.selectionStart&&1!==i.selectionStart)for(;this.specialCharacters.includes(this._inputValue[i.selectionStart-1].toString())&&(this.prefix.length>=1&&i.selectionStart>this.prefix.length||0===this.prefix.length);)i.setSelectionRange(i.selectionStart-1,i.selectionStart-1);this.suffixCheckOnPressDelete(e.keyCode,i)}this.suffixCheckOnPressDelete(e.keyCode,i),this._maskService.prefix.length&&i.selectionStart<=this._maskService.prefix.length&&i.selectionEnd<=this._maskService.prefix.length&&e.preventDefault();var r=i.selectionStart;8!==e.keyCode||i.readOnly||0!==r||i.selectionEnd!==i.value.length||0===i.value.length||(this._position=this._maskService.prefix?this._maskService.prefix.length:0,this._maskService.applyMask(this._maskService.prefix,this._maskService.maskExpression,this._position))}this.suffix&&this.suffix.length>1&&this._inputValue.length-this.suffix.length<i.selectionStart?i.setSelectionRange(this._inputValue.length-this.suffix.length,this._inputValue.length):(65===e.keyCode&&!0===e.ctrlKey||65===e.keyCode&&!0===e.metaKey)&&(i.setSelectionRange(0,this._getActualInputLength()),e.preventDefault()),this._maskService.selStart=i.selectionStart,this._maskService.selEnd=i.selectionEnd}},e.prototype.writeValue=function(e){return u(this,void 0,void 0,(function(){return p(this,(function(t){return"object"==typeof e&&null!==e&&"value"in e&&("disable"in e&&this.setDisabledState(Boolean(e.disable)),e=e.value),void 0===e&&(e=""),"number"==typeof e&&(e=String(e),e="."!==this.decimalMarker?e.replace(".",this.decimalMarker):e,this._maskService.isNumberValue=!0),e&&this._maskService.maskExpression||this._maskService.maskExpression&&(this._maskService.prefix||this._maskService.showMaskTyped)?(this._maskService.writingValue=!0,this._maskService.formElementProperty=["value",this._maskService.applyMask(e,this._maskService.maskExpression)],this._maskService.writingValue=!1):this._maskService.formElementProperty=["value",e],this._inputValue=e,[2]}))}))},e.prototype.registerOnChange=function(e){this.onChange=e,this._maskService.onChange=this.onChange},e.prototype.registerOnTouched=function(e){this.onTouch=e},e.prototype.suffixCheckOnPressDelete=function(e,t){46===e&&this.suffix.length>0&&this._inputValue.length-this.suffix.length<=t.selectionStart&&t.setSelectionRange(this._inputValue.length-this.suffix.length,this._inputValue.length),8===e&&(this.suffix.length>1&&this._inputValue.length-this.suffix.length<t.selectionStart&&t.setSelectionRange(this._inputValue.length-this.suffix.length,this._inputValue.length),1===this.suffix.length&&this._inputValue.length===t.selectionStart&&t.setSelectionRange(t.selectionStart-1,t.selectionStart-1))},e.prototype.setDisabledState=function(e){this._maskService.formElementProperty=["disabled",e]},e.prototype._repeatPatternSymbols=function(e){var t=this;return e.match(/{[0-9]+}/)&&e.split("").reduce((function(i,r,s){if(t._start="{"===r?s:t._start,"}"!==r)return t._maskService._findSpecialChar(r)?i+r:i;t._end=s;var a=Number(e.slice(t._start+1,t._end));return i+new Array(a+1).join(e[t._start-1])}),"")||e},e.prototype._applyMask=function(){this._maskService.maskExpression=this._repeatPatternSymbols(this._maskValue||""),this._maskService.formElementProperty=["value",this._maskService.applyMask(this._inputValue,this._maskService.maskExpression)]},e.prototype._validateTime=function(e){var t=this._maskValue.split("").filter((function(e){return":"!==e})).length;return null===e||0===e.length?null:0==+e[e.length-1]&&e.length<t||e.length<=t-2?this._createValidationError(e):null},e.prototype._getActualInputLength=function(){return this._maskService.actualValue.length||this._maskService.actualValue.length+this._maskService.prefix.length},e.prototype._createValidationError=function(e){return{mask:{requiredMask:this._maskValue,actualValue:e}}},e.prototype._setMask=function(){var e=this;this._maskExpressionArray.length>0&&this._maskExpressionArray.some((function(t){var i=e._maskService.removeMask(e._inputValue).length<=e._maskService.removeMask(t).length;if(e._inputValue&&i)return e._maskValue=t,e.maskExpression=t,e._maskService.maskExpression=t,i;e._maskValue=e._maskExpressionArray[e._maskExpressionArray.length-1],e.maskExpression=e._maskExpressionArray[e._maskExpressionArray.length-1],e._maskService.maskExpression=e._maskExpressionArray[e._maskExpressionArray.length-1]}))},e}();k.decorators=[{type:t.Directive,args:[{selector:"input[mask], textarea[mask]",providers:[{provide:i.NG_VALUE_ACCESSOR,useExisting:t.forwardRef((function(){return k})),multi:!0},{provide:i.NG_VALIDATORS,useExisting:t.forwardRef((function(){return k})),multi:!0},d]}]}],k.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Inject,args:[r.DOCUMENT]}]},{type:d},{type:void 0,decorators:[{type:t.Inject,args:[s]}]}]},k.propDecorators={maskExpression:[{type:t.Input,args:["mask"]}],specialCharacters:[{type:t.Input}],patterns:[{type:t.Input}],prefix:[{type:t.Input}],suffix:[{type:t.Input}],thousandSeparator:[{type:t.Input}],decimalMarker:[{type:t.Input}],dropSpecialCharacters:[{type:t.Input}],hiddenInput:[{type:t.Input}],showMaskTyped:[{type:t.Input}],placeHolderCharacter:[{type:t.Input}],shownMaskExpression:[{type:t.Input}],showTemplate:[{type:t.Input}],clearIfNotMatch:[{type:t.Input}],validation:[{type:t.Input}],separatorLimit:[{type:t.Input}],allowNegativeNumbers:[{type:t.Input}],leadZeroDateTime:[{type:t.Input}],onPaste:[{type:t.HostListener,args:["paste"]}],onInput:[{type:t.HostListener,args:["input",["$event"]]}],onBlur:[{type:t.HostListener,args:["blur"]}],onFocus:[{type:t.HostListener,args:["click",["$event"]]}],onKeyDown:[{type:t.HostListener,args:["keydown",["$event"]]}]};var g=function(){function e(e){this._maskService=e}return e.prototype.transform=function(e,t,i){return void 0===i&&(i=null),e||"number"==typeof e?(i&&(this._maskService.thousandSeparator=i),"string"==typeof t?this._maskService.applyMask(""+e,t):this._maskService.applyMaskWithPattern(""+e,t)):""},e}();g.decorators=[{type:t.Pipe,args:[{name:"mask",pure:!0}]}],g.ctorParameters=function(){return[{type:m}]};var _=function(){function e(){}return e.forRoot=function(t){return{ngModule:e,providers:[{provide:a,useValue:t},{provide:n,useValue:l},{provide:s,useFactory:v,deps:[n,a]},m]}},e.forChild=function(){return{ngModule:e}},e}();function v(e,t){return t instanceof Function?Object.assign(Object.assign({},e),t()):Object.assign(Object.assign({},e),t)}_.decorators=[{type:t.NgModule,args:[{exports:[k,g],declarations:[k,g]}]}];var S="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};S.KeyboardEvent||(S.KeyboardEvent=function(e,t){}),e.INITIAL_CONFIG=n,e.MaskApplierService=m,e.MaskDirective=k,e.MaskPipe=g,e.MaskService=d,e.NEW_CONFIG=a,e.NgxMaskModule=_,e._configFactory=v,e.config=s,e.initialConfig=l,e.timeMasks=h,e.withoutValidation=o,Object.defineProperty(e,"__esModule",{value:!0})}));
//# sourceMappingURL=ngx-mask.umd.min.js.map

@@ -8,2 +8,2 @@ export * from './lib/ngx-mask.module';

export * from './lib/custom-keyboard-event';
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiLi4vLi4vLi4vLi4vcHJvamVjdHMvbmd4LW1hc2stbGliL3NyYy8iLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMsdUJBQXVCLENBQUM7QUFDdEMsY0FBYyxzQkFBc0IsQ0FBQztBQUNyQyxjQUFjLGlCQUFpQixDQUFDO0FBQ2hDLGNBQWMsb0JBQW9CLENBQUM7QUFDbkMsY0FBYyw0QkFBNEIsQ0FBQztBQUMzQyxjQUFjLGNBQWMsQ0FBQztBQUM3QixjQUFjLDZCQUE2QixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSAnLi9saWIvbmd4LW1hc2subW9kdWxlJztcbmV4cG9ydCAqIGZyb20gJy4vbGliL21hc2suZGlyZWN0aXZlJztcbmV4cG9ydCAqIGZyb20gJy4vbGliL21hc2sucGlwZSc7XG5leHBvcnQgKiBmcm9tICcuL2xpYi9tYXNrLnNlcnZpY2UnO1xuZXhwb3J0ICogZnJvbSAnLi9saWIvbWFzay1hcHBsaWVyLnNlcnZpY2UnO1xuZXhwb3J0ICogZnJvbSAnLi9saWIvY29uZmlnJztcbmV4cG9ydCAqIGZyb20gJy4vbGliL2N1c3RvbS1rZXlib2FyZC1ldmVudCc7XG4iXX0=
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiLi4vLi4vLi4vcHJvamVjdHMvbmd4LW1hc2stbGliL3NyYy8iLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMsdUJBQXVCLENBQUM7QUFDdEMsY0FBYyxzQkFBc0IsQ0FBQztBQUNyQyxjQUFjLGlCQUFpQixDQUFDO0FBQ2hDLGNBQWMsb0JBQW9CLENBQUM7QUFDbkMsY0FBYyw0QkFBNEIsQ0FBQztBQUMzQyxjQUFjLGNBQWMsQ0FBQztBQUM3QixjQUFjLDZCQUE2QixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSAnLi9saWIvbmd4LW1hc2subW9kdWxlJztcbmV4cG9ydCAqIGZyb20gJy4vbGliL21hc2suZGlyZWN0aXZlJztcbmV4cG9ydCAqIGZyb20gJy4vbGliL21hc2sucGlwZSc7XG5leHBvcnQgKiBmcm9tICcuL2xpYi9tYXNrLnNlcnZpY2UnO1xuZXhwb3J0ICogZnJvbSAnLi9saWIvbWFzay1hcHBsaWVyLnNlcnZpY2UnO1xuZXhwb3J0ICogZnJvbSAnLi9saWIvY29uZmlnJztcbmV4cG9ydCAqIGZyb20gJy4vbGliL2N1c3RvbS1rZXlib2FyZC1ldmVudCc7XG4iXX0=

@@ -73,2 +73,2 @@ import { InjectionToken } from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ICBzeW1ib2w6ICcqJyxcbiAgICB9LFxuICAgIEE6IHtcbiAgICAgIHBhdHRlcm46IG5ldyBSZWdFeHAoJ1thLXpBLVowLTldJyksXG4gICAgfSxcbiAgICBTOiB7XG4gICAgICBwYXR0ZXJuOiBuZXcgUmVnRXhwKCdbYS16QS1aXScpLFxuICAgIH0sXG4gICAgZDoge1xuICAgICAgcGF0dGVybjogbmV3IFJlZ0V4cCgnXFxcXGQnKSxcbiAgICB9LFxuICAgIG06IHtcbiAgICAgIHBhdHRlcm46IG5ldyBSZWdFeHAoJ1xcXFxkJyksXG4gICAgfSxcbiAgICBNOiB7XG4gICAgICBwYXR0ZXJuOiBuZXcgUmVnRXhwKCdcXFxcZCcpLFxuICAgIH0sXG4gICAgSDoge1xuICAgICAgcGF0dGVybjogbmV3IFJlZ0V4cCgnXFxcXGQnKSxcbiAgICB9LFxuICAgIGg6IHtcbiAgICAgIHBhdHRlcm46IG5ldyBSZWdFeHAoJ1xcXFxkJyksXG4gICAgfSxcbiAgICBzOiB7XG4gICAgICBwYXR0ZXJuOiBuZXcgUmVnRXhwKCdcXFxcZCcpLFxuICAgIH0sXG4gIH0sXG59O1xuXG5leHBvcnQgY29uc3QgdGltZU1hc2tzOiBzdHJpbmdbXSA9IFsnSGg6bTA6czAnLCAnSGg6bTAnLCAnbTA6czAnXTtcblxuZXhwb3J0IGNvbnN0IHdpdGhvdXRWYWxpZGF0aW9uOiBzdHJpbmdbXSA9IFtcbiAgJ3BlcmNlbnQnLFxuICAnSGgnLFxuICAnczAnLFxuICAnbTAnLFxuICAnc2VwYXJhdG9yJyxcbiAgJ2QwL00wLzAwMDAnLFxuICAnZDAvTTAnLFxuICAnZDAnLFxuICAnTTAnLFxuXTtcbiJdfQ==

@@ -16,2 +16,2 @@ const commonjsGlobal = typeof globalThis !== 'undefined'

export {};
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3VzdG9tLWtleWJvYXJkLWV2ZW50Lmpz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ENBQUMsQ0FBQyxFQUFFLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvLyB0c2xpbnQ6ZGlzYWJsZTogbm8tYW55IHR5cGVkZWZcbmRlY2xhcmUgdmFyIGdsb2JhbDogYW55O1xuXG5jb25zdCBjb21tb25qc0dsb2JhbCA9XG4gIHR5cGVvZiBnbG9iYWxUaGlzICE9PSAndW5kZWZpbmVkJ1xuICAgID8gZ2xvYmFsVGhpc1xuICAgIDogdHlwZW9mIHdpbmRvdyAhPT0gJ3VuZGVmaW5lZCdcbiAgICA/IHdpbmRvd1xuICAgIDogdHlwZW9mIGdsb2JhbCAhPT0gJ3VuZGVmaW5lZCdcbiAgICA/IGdsb2JhbFxuICAgIDogdHlwZW9mIHNlbGYgIT09ICd1bmRlZmluZWQnXG4gICAgPyBzZWxmXG4gICAgOiB7fTtcblxuKGZ1bmN0aW9uICgpIHtcbiAgaWYgKCFjb21tb25qc0dsb2JhbC5LZXlib2FyZEV2ZW50KSB7XG4gICAgY29tbW9uanNHbG9iYWwuS2V5Ym9hcmRFdmVudCA9IGZ1bmN0aW9uIChfZXZlbnRUeXBlOiBhbnksIF9pbml0OiBhbnkpIHt9O1xuICB9XG59KSgpO1xuXG5leHBvcnQgdHlwZSBDdXN0b21LZXlib2FyZEV2ZW50ID0gS2V5Ym9hcmRFdmVudDtcbiJdfQ==

@@ -29,2 +29,2 @@ import { Pipe } from '@angular/core';

];
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWFzay5waXBlLmpzIiwic291cmNlUm9vdCI6Ii4uLy4uLy4uLy4uL3Byb2plY3RzL25neC1tYXNrLWxpYi9zcmMvIiwic291cmNlcyI6WyJsaWIvbWFzay5waXBlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxJQUFJLEVBQWlCLE1BQU0sZUFBZSxDQUFDO0FBRXBELE9BQU8sRUFBRSxrQkFBa0IsRUFBRSxNQU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TogdHJ1ZSxcbn0pXG5leHBvcnQgY2xhc3MgTWFza1BpcGUgaW1wbGVtZW50cyBQaXBlVHJhbnNmb3JtIHtcbiAgcHVibGljIGNvbnN0cnVjdG9yKHByaXZhdGUgX21hc2tTZXJ2aWNlOiBNYXNrQXBwbGllclNlcnZpY2UpIHt9XG5cbiAgcHVibGljIHRyYW5zZm9ybShcbiAgICB2YWx1ZTogc3RyaW5nIHwgbnVtYmVyLFxuICAgIG1hc2s6IHN0cmluZyB8IFtzdHJpbmcsIElDb25maWdbJ3BhdHRlcm5zJ11dLFxuICAgIHRob3VzYW5kU2VwYXJhdG9yOiBzdHJpbmcgfCBudWxsID0gbnVsbFxuICApOiBzdHJpbmcge1xuICAgIGlmICghdmFsdWUgJiYgdHlwZW9mIHZhbHVlICE9PSAnbnVtYmVyJykge1xuICAgICAgcmV0dXJuICcnO1xuICAgIH1cbiAgICBpZiAodGhvdXNhbmRTZXBhcmF0b3IpIHtcbiAgICAgIHRoaXMuX21hc2tTZXJ2aWNlLnRob3VzYW5kU2VwYXJhdG9yID0gdGhvdXNhbmRTZXBhcmF0b3I7XG4gICAgfVxuICAgIGlmICh0eXBlb2YgbWFzayA9PT0gJ3N0cmluZycpIHtcbiAgICAgIHJldHVybiB0aGlzLl9tYXNrU2VydmljZS5hcHBseU1hc2soYCR7dmFsdWV9YCwgbWFzayk7XG4gICAgfVxuICAgIHJldHVybiB0aGlzLl9tYXNrU2VydmljZS5hcHBseU1hc2tXaXRoUGF0dGVybihgJHt2YWx1ZX1gLCBtYXNrKTtcbiAgfVxufVxuIl19
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWFzay5waXBlLmpzIiwic291cmNlUm9vdCI6Ii4uLy4uLy4uL3Byb2plY3RzL25neC1tYXNrLWxpYi9zcmMvIiwic291cmNlcyI6WyJsaWIvbWFzay5waXBlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBR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uZmlnIH0gZnJvbSAnLi9jb25maWcnO1xuXG5AUGlwZSh7XG4gIG5hbWU6ICdtYXNrJyxcbiAgcHVyZTogdHJ1ZSxcbn0pXG5leHBvcnQgY2xhc3MgTWFza1BpcGUgaW1wbGVtZW50cyBQaXBlVHJhbnNmb3JtIHtcbiAgcHVibGljIGNvbnN0cnVjdG9yKHByaXZhdGUgX21hc2tTZXJ2aWNlOiBNYXNrQXBwbGllclNlcnZpY2UpIHt9XG5cbiAgcHVibGljIHRyYW5zZm9ybShcbiAgICB2YWx1ZTogc3RyaW5nIHwgbnVtYmVyLFxuICAgIG1hc2s6IHN0cmluZyB8IFtzdHJpbmcsIElDb25maWdbJ3BhdHRlcm5zJ11dLFxuICAgIHRob3VzYW5kU2VwYXJhdG9yOiBzdHJpbmcgfCBudWxsID0gbnVsbFxuICApOiBzdHJpbmcge1xuICAgIGlmICghdmFsdWUgJiYgdHlwZW9mIHZhbHVlICE9PSAnbnVtYmVyJykge1xuICAgICAgcmV0dXJuICcnO1xuICAgIH1cbiAgICBpZiAodGhvdXNhbmRTZXBhcmF0b3IpIHtcbiAgICAgIHRoaXMuX21hc2tTZXJ2aWNlLnRob3VzYW5kU2VwYXJhdG9yID0gdGhvdXNhbmRTZXBhcmF0b3I7XG4gICAgfVxuICAgIGlmICh0eXBlb2YgbWFzayA9PT0gJ3N0cmluZycpIHtcbiAgICAgIHJldHVybiB0aGlzLl9tYXNrU2VydmljZS5hcHBseU1hc2soYCR7dmFsdWV9YCwgbWFzayk7XG4gICAgfVxuICAgIHJldHVybiB0aGlzLl9tYXNrU2VydmljZS5hcHBseU1hc2tXaXRoUGF0dGVybihgJHt2YWx1ZX1gLCBtYXNrKTtcbiAgfVxufVxuIl19

@@ -26,3 +26,3 @@ import { ElementRef, Inject, Injectable, Renderer2 } from '@angular/core';

// tslint:disable-next-line:cyclomatic-complexity
applyMask(inputValue, maskExpression, position = 0, justPasted = false, cb = () => { }) {
applyMask(inputValue, maskExpression, position = 0, justPasted = false, backspaced = false, cb = () => { }) {
if (!maskExpression) {

@@ -62,3 +62,3 @@ return inputValue;

newInputValue = Boolean(newInputValue) && newInputValue.length ? newInputValue : inputValue;
const result = super.applyMask(newInputValue, maskExpression, position, justPasted, cb);
const result = super.applyMask(newInputValue, maskExpression, position, justPasted, backspaced, cb);
this.actualValue = this.getActualValue(result);

@@ -103,5 +103,5 @@ // handle some separator implications:

}
applyValueChanges(position = 0, justPasted, cb = () => { }) {
applyValueChanges(position = 0, justPasted, backspaced, cb = () => { }) {
const formElement = this._elementRef.nativeElement;
formElement.value = this.applyMask(formElement.value, this.maskExpression, position, justPasted, cb);
formElement.value = this.applyMask(formElement.value, this.maskExpression, position, justPasted, backspaced, cb);
if (formElement === this.document.activeElement) {

@@ -357,2 +357,2 @@ return;

];
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWFzay5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6Ii4uLy4uLy4uLy4uL3Byb2plY3RzL25neC1tYXNrLWxpYi9zcmMvIiwic291cmNlcyI6WyJsaWIvbWFzay5zZXJ2aWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxFQUFFLFVBQVUsRUFBRSxTQUFTLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDMUUsT0FBTyxFQUFFLFFBQVEsRUFBRSxNQUFNLGlCQUFpQixDQUFDO0FBRTNDLE9BQU8sRUFBRSxNQUFNLEVBQVcsTUFBTSxVQUFVLENBQUM7QUFDM0MsT0FBTyxFQUFFLGtCQUFrQixFQUFFLE1BQU0sd0JBQXdCLENBQUM7QUFHNUQsTUFBTSxPQUFPLFdBQVksU0FBUSxrQkFBa0I7SUFnQmpELFlBQzRCLFFBQWEsRUFDYixPQUFnQixFQUNsQyxXQUF1QixFQUN2QixTQUFvQjtRQUU1QixLQUFLLENBQUMsT0FBTyxDQUFDLENBQUM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gICAgfVxuICAgICAgICAgIHJldHVybiBjdXJyU3ltYm9sO1xuICAgICAgICB9KSkgfHxcbiAgICAgIFtdO1xuICAgIHJldHVybiBuZXdJbnB1dFZhbHVlLmpvaW4oJycpO1xuICB9XG5cbiAgcHVibGljIHNob3dNYXNrSW5JbnB1dChpbnB1dFZhbD86IHN0cmluZyk6IHN0cmluZyB7XG4gICAgaWYgKHRoaXMuc2hvd01hc2tUeXBlZCAmJiAhIXRoaXMuc2hvd25NYXNrRXhwcmVzc2lvbikge1xuICAgICAgaWYgKHRoaXMubWFza0V4cHJlc3Npb24ubGVuZ3RoICE9PSB0aGlzLnNob3duTWFza0V4cHJlc3Npb24ubGVuZ3RoKSB7XG4gICAgICAgIHRocm93IG5ldyBFcnJvcignTWFzayBleHByZXNzaW9uIG11c3QgbWF0Y2ggbWFzayBwbGFjZWhvbGRlciBsZW5ndGgnKTtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIHJldHVybiB0aGlzLnNob3duTWFza0V4cHJlc3Npb247XG4gICAgICB9XG4gICAgfSBlbHNlIGlmICh0aGlzLnNob3dNYXNrVHlwZWQpIHtcbiAgICAgIGlmIChpbnB1dFZhbCkge1xuICAgICAgICBpZiAodGhpcy5tYXNrRXhwcmVzc2lvbiA9PT0gJ0lQJykge1xuICAgICAgICAgIHJldHVybiB0aGlzLl9jaGVja0ZvcklwKGlucHV0VmFsKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAodGhpcy5tYXNrRXhwcmVzc2lvbiA9PT0gJ0NQRl9DTlBKJykge1xuICAgICAgICAgIHJldHVybiB0aGlzLl9jaGVja0ZvckNwZkNucGooaW5wdXRWYWwpO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgICByZXR1cm4gdGhpcy5tYXNrRXhwcmVzc2lvbi5yZXBsYWNlKC9cXHcvZywgdGhpcy5wbGFjZUhvbGRlckNoYXJhY3Rlcik7XG4gICAgfVxuICAgIHJldHVybiAnJztcbiAgfVxuXG4gIHB1YmxpY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CA9PT0gdGhpcy5kZWNpbWFsTWFya2VyKSB7XG4gICAgICAgIHJldHVybiBudWxsO1xuICAgICAgfVxuICAgICAgcmV0dXJuIHRoaXMuX2NoZWNrUHJlY2lzaW9uKHRoaXMubWFza0V4cHJlc3Npb24sIHNlcGFyYXRvclZhbHVlKTtcbiAgICB9IGVsc2Uge1xuICAgICAgcmV0dXJuIE51bWJlcihzZXBhcmF0b3JWYWx1ZSk7XG4gICAgfVxuICB9XG5cbiAgLy8gVE9ETyBzaG91bGQgdGhpbmsgYWJvdXQgaGVscGVycyBvciBzZXBhcnRpbmcgZGVjaW1hbCBwcmVjaXNpb24gdG8gb3duIHByb3BlcnR5XG4gIHByaXZhdGUgX3JldHJpZXZlU2VwYXJhdG9yUHJlY2lzaW9uKG1hc2tFeHByZXRpb246IHN0cmluZyk6IG51bWJlciB8IG51bGwge1xuICAgIGNvbnN0IG1hdGNoZXI6IFJlZ0V4cE1hdGNoQXJyYXkgfCBudWxsID0gbWFza0V4cHJldGlvbi5tYXRjaChuZXcgUmVnRXhwKGBec2VwYXJhdG9yXFxcXC4oW15kXSopYCkpO1xuICAgIHJldHVybiBtYXRjaGVyID8gTnVtYmVyKG1hdGNoZXJbMV0pIDogbnVsbDtcbiAgfVxuXG4gIHByaXZhdGUgX2NoZWNrUHJlY2lzaW9uKHNlcGFyYXRvckV4cHJlc3Npb246IHN0cmluZywgc2VwYXJhdG9yVmFsdWU6IHN0cmluZyk6IG51bWJlciB8IHN0cmluZyB7XG4gICAgaWYgKHNlcGFyYXRvckV4cHJlc3Npb24uaW5kZXhPZignMicpID4gMCkge1xuICAgICAgcmV0dXJuIE51bWJlcihzZXBhcmF0b3JWYWx1ZSkudG9GaXhlZCgyKTtcbiAgICB9XG4gICAgcmV0dXJuIE51bWJlcihzZXBhcmF0b3JWYWx1ZSk7XG4gIH1cbn1cbiJdfQ==

@@ -46,2 +46,2 @@ import { NgModule } from '@angular/core';

}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJ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nQgZnVuY3Rpb24gX2NvbmZpZ0ZhY3RvcnkoXG4gIGluaXRDb25maWc6IG9wdGlvbnNDb25maWcsXG4gIGNvbmZpZ1ZhbHVlOiBvcHRpb25zQ29uZmlnIHwgKCgpID0+IG9wdGlvbnNDb25maWcpXG4pOiBvcHRpb25zQ29uZmlnIHtcbiAgcmV0dXJuIGNvbmZpZ1ZhbHVlIGluc3RhbmNlb2YgRnVuY3Rpb24gPyB7IC4uLmluaXRDb25maWcsIC4uLmNvbmZpZ1ZhbHVlKCkgfSA6IHsgLi4uaW5pdENvbmZpZywgLi4uY29uZmlnVmFsdWUgfTtcbn1cbiJdfQ==

@@ -5,2 +5,2 @@ /**

export * from './index';
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LW1hc2suanMiLCJzb3VyY2VSb290IjoiLi4vLi4vLi4vLi4vcHJvamVjdHMvbmd4LW1hc2stbGliL3NyYy8iLCJzb3VyY2VzIjpbIm5neC1tYXNrLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBRUgsY0FBYyxTQUFTLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEdlbmVyYXRlZCBidW5kbGUgaW5kZXguIERvIG5vdCBlZGl0LlxuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vaW5kZXgnO1xuIl19
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LW1hc2suanMiLCJzb3VyY2VSb290IjoiLi4vLi4vLi4vcHJvamVjdHMvbmd4LW1hc2stbGliL3NyYy8iLCJzb3VyY2VzIjpbIm5neC1tYXNrLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBRUgsY0FBYyxTQUFTLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEdlbmVyYXRlZCBidW5kbGUgaW5kZXguIERvIG5vdCBlZGl0LlxuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vaW5kZXgnO1xuIl19

@@ -155,3 +155,3 @@ import { InjectionToken, Injectable, Inject, ElementRef, Renderer2, Directive, forwardRef, Input, HostListener, Pipe, NgModule } from '@angular/core';

}
applyMask(inputValue, maskExpression, position = 0, justPasted = false, cb = () => { }) {
applyMask(inputValue, maskExpression, position = 0, justPasted = false, backspaced = false, cb = () => { }) {
if (inputValue === undefined || inputValue === null || maskExpression === undefined) {

@@ -446,3 +446,7 @@ return '';

}
let res = `${this.prefix}${result}${this.suffix}`;
let onlySpecial = false;
if (backspaced) {
onlySpecial = inputArray.every((char) => this.maskSpecialCharacters.includes(char));
}
let res = `${this.prefix}${onlySpecial ? '' : result}${this.suffix}`;
if (result.length === 0) {

@@ -514,3 +518,3 @@ res = `${this.prefix}${result}`;

// tslint:disable-next-line:cyclomatic-complexity
applyMask(inputValue, maskExpression, position = 0, justPasted = false, cb = () => { }) {
applyMask(inputValue, maskExpression, position = 0, justPasted = false, backspaced = false, cb = () => { }) {
if (!maskExpression) {

@@ -550,3 +554,3 @@ return inputValue;

newInputValue = Boolean(newInputValue) && newInputValue.length ? newInputValue : inputValue;
const result = super.applyMask(newInputValue, maskExpression, position, justPasted, cb);
const result = super.applyMask(newInputValue, maskExpression, position, justPasted, backspaced, cb);
this.actualValue = this.getActualValue(result);

@@ -591,5 +595,5 @@ // handle some separator implications:

}
applyValueChanges(position = 0, justPasted, cb = () => { }) {
applyValueChanges(position = 0, justPasted, backspaced, cb = () => { }) {
const formElement = this._elementRef.nativeElement;
formElement.value = this.applyMask(formElement.value, this.maskExpression, position, justPasted, cb);
formElement.value = this.applyMask(formElement.value, this.maskExpression, position, justPasted, backspaced, cb);
if (formElement === this.document.activeElement) {

@@ -1038,3 +1042,3 @@ return;

let backspaceShift = false;
this._maskService.applyValueChanges(position, this._justPasted, (shift, _backspaceShift) => {
this._maskService.applyValueChanges(position, this._justPasted, this._code === 'Backspace', (shift, _backspaceShift) => {
this._justPasted = false;

@@ -1237,7 +1241,2 @@ caretShift = shift;

}
onModelChange(e) {
if (!e) {
this._maskService.actualValue = '';
}
}
_repeatPatternSymbols(maskExp) {

@@ -1252,4 +1251,4 @@ return ((maskExp.match(/{[0-9]+}/) &&

const repeatNumber = Number(maskExp.slice(this._start + 1, this._end));
const repaceWith = new Array(repeatNumber + 1).join(maskExp[this._start - 1]);
return accum + repaceWith;
const replaceWith = new Array(repeatNumber + 1).join(maskExp[this._start - 1]);
return accum + replaceWith;
}, '')) ||

@@ -1352,4 +1351,3 @@ maskExp);

onFocus: [{ type: HostListener, args: ['click', ['$event'],] }],
onKeyDown: [{ type: HostListener, args: ['keydown', ['$event'],] }],
onModelChange: [{ type: HostListener, args: ['ngModelChange', ['$event'],] }]
onKeyDown: [{ type: HostListener, args: ['keydown', ['$event'],] }]
};

@@ -1356,0 +1354,0 @@

@@ -29,3 +29,3 @@ import { IConfig } from './config';

applyMaskWithPattern(inputValue: string, maskAndPattern: [string, IConfig['patterns']]): string;
applyMask(inputValue: string, maskExpression: string, position?: number, justPasted?: boolean, cb?: Function): string;
applyMask(inputValue: string, maskExpression: string, position?: number, justPasted?: boolean, backspaced?: boolean, cb?: Function): string;
_findSpecialChar(inputSymbol: string): undefined | string;

@@ -32,0 +32,0 @@ protected _checkSymbolMask(inputSymbol: string, maskSymbol: string): boolean;

@@ -56,3 +56,2 @@ import { ControlValueAccessor, FormControl, ValidationErrors, Validator } from '@angular/forms';

setDisabledState(isDisabled: boolean): void;
onModelChange(e: any): void;
private _repeatPatternSymbols;

@@ -59,0 +58,0 @@ private _applyMask;

@@ -22,5 +22,5 @@ import { ElementRef, Renderer2 } from '@angular/core';

constructor(document: any, _config: IConfig, _elementRef: ElementRef, _renderer: Renderer2);
applyMask(inputValue: string, maskExpression: string, position?: number, justPasted?: boolean, cb?: Function): string;
applyMask(inputValue: string, maskExpression: string, position?: number, justPasted?: boolean, backspaced?: boolean, cb?: Function): string;
private _numberSkipedSymbols;
applyValueChanges(position: number | undefined, justPasted: boolean, cb?: Function): void;
applyValueChanges(position: number | undefined, justPasted: boolean, backspaced: boolean, cb?: Function): void;
hideInput(inputValue: string, maskExpression: string): string;

@@ -27,0 +27,0 @@ getActualValue(res: string): string;

@@ -1,1 +0,1 @@

{"__symbolic":"module","version":4,"metadata":{"NgxMaskModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":7,"character":1},"arguments":[{"exports":[{"__symbolic":"reference","name":"MaskDirective"},{"__symbolic":"reference","name":"MaskPipe"}],"declarations":[{"__symbolic":"reference","name":"MaskDirective"},{"__symbolic":"reference","name":"MaskPipe"}]}]}],"members":{},"statics":{"forRoot":{"__symbolic":"function","parameters":["configValue"],"value":{"ngModule":{"__symbolic":"reference","name":"NgxMaskModule"},"providers":[{"provide":{"__symbolic":"reference","name":"NEW_CONFIG"},"useValue":{"__symbolic":"reference","name":"configValue"}},{"provide":{"__symbolic":"reference","name":"INITIAL_CONFIG"},"useValue":{"__symbolic":"reference","name":"initialConfig"}},{"provide":{"__symbolic":"reference","name":"config"},"useFactory":{"__symbolic":"reference","name":"_configFactory"},"deps":[{"__symbolic":"reference","name":"INITIAL_CONFIG"},{"__symbolic":"reference","name":"NEW_CONFIG"}]},{"__symbolic":"reference","name":"MaskApplierService"}]}},"forChild":{"__symbolic":"function","parameters":[],"value":{"ngModule":{"__symbolic":"reference","name":"NgxMaskModule"}}}}},"_configFactory":{"__symbolic":"function","parameters":["initConfig","configValue"],"value":{"__symbolic":"if","condition":{"__symbolic":"binop","operator":"instanceof","left":{"__symbolic":"reference","name":"configValue"},"right":{"__symbolic":"reference","name":"Function"}},"thenExpression":{},"elseExpression":{}}},"MaskDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":17,"character":1},"arguments":[{"selector":"input[mask], textarea[mask]","providers":[{"provide":{"__symbolic":"reference","module":"@angular/forms","name":"NG_VALUE_ACCESSOR","line":21,"character":15},"useExisting":{"__symbolic":"reference","name":"MaskDirective"},"multi":true},{"provide":{"__symbolic":"reference","module":"@angular/forms","name":"NG_VALIDATORS","line":26,"character":15},"useExisting":{"__symbolic":"reference","name":"MaskDirective"},"multi":true},{"__symbolic":"reference","name":"MaskService"}]}]}],"members":{"maskExpression":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":34,"character":3},"arguments":["mask"]}]}],"specialCharacters":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":35,"character":3}}]}],"patterns":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":36,"character":3}}]}],"prefix":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":37,"character":3}}]}],"suffix":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":38,"character":3}}]}],"thousandSeparator":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":39,"character":3}}]}],"decimalMarker":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":40,"character":3}}]}],"dropSpecialCharacters":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":41,"character":3}}]}],"hiddenInput":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":42,"character":3}}]}],"showMaskTyped":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":43,"character":3}}]}],"placeHolderCharacter":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":44,"character":3}}]}],"shownMaskExpression":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":45,"character":3}}]}],"showTemplate":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":46,"character":3}}]}],"clearIfNotMatch":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":47,"character":3}}]}],"validation":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":48,"character":3}}]}],"separatorLimit":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":49,"character":3}}]}],"allowNegativeNumbers":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":50,"character":3}}]}],"leadZeroDateTime":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":51,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":62,"character":5},"arguments":[{"__symbolic":"reference","module":"@angular/common","name":"DOCUMENT","line":62,"character":12}]}],null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":64,"character":5},"arguments":[{"__symbolic":"reference","name":"config"}]}]],"parameters":[{"__symbolic":"reference","name":"any"},{"__symbolic":"reference","name":"MaskService"},{"__symbolic":"reference","name":"IConfig"}]}],"ngOnChanges":[{"__symbolic":"method"}],"validate":[{"__symbolic":"method"}],"onPaste":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener","line":239,"character":3},"arguments":["paste"]}]}],"onInput":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener","line":244,"character":3},"arguments":["input",["$event"]]}]}],"onBlur":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener","line":281,"character":3},"arguments":["blur"]}]}],"onFocus":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener","line":289,"character":3},"arguments":["click",["$event"]]}]}],"onKeyDown":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener","line":344,"character":3},"arguments":["keydown",["$event"]]}]}],"writeValue":[{"__symbolic":"method"}],"registerOnChange":[{"__symbolic":"method"}],"registerOnTouched":[{"__symbolic":"method"}],"suffixCheckOnPressDelete":[{"__symbolic":"method"}],"setDisabledState":[{"__symbolic":"method"}],"onModelChange":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener","line":485,"character":3},"arguments":["ngModelChange",["$event"]]}]}],"_repeatPatternSymbols":[{"__symbolic":"method"}],"_applyMask":[{"__symbolic":"method"}],"_validateTime":[{"__symbolic":"method"}],"_getActualInputLength":[{"__symbolic":"method"}],"_createValidationError":[{"__symbolic":"method"}],"_setMask":[{"__symbolic":"method"}]}},"MaskPipe":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Pipe","line":5,"character":1},"arguments":[{"name":"mask","pure":true}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"MaskApplierService"}]}],"transform":[{"__symbolic":"method"}]}},"MaskService":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"MaskApplierService"},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":6,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":24,"character":5},"arguments":[{"__symbolic":"reference","module":"@angular/common","name":"DOCUMENT","line":24,"character":12}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":25,"character":5},"arguments":[{"__symbolic":"reference","name":"config"}]}],null,null],"parameters":[{"__symbolic":"reference","name":"any"},{"__symbolic":"reference","name":"IConfig"},{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":26,"character":25},{"__symbolic":"reference","module":"@angular/core","name":"Renderer2","line":27,"character":23}]}],"applyMask":[{"__symbolic":"method"}],"_numberSkipedSymbols":[{"__symbolic":"method"}],"applyValueChanges":[{"__symbolic":"method"}],"hideInput":[{"__symbolic":"method"}],"getActualValue":[{"__symbolic":"method"}],"shiftTypedSymbols":[{"__symbolic":"method"}],"showMaskInInput":[{"__symbolic":"method"}],"clearIfNotMatchFn":[{"__symbolic":"method"}],"checkSpecialCharAmount":[{"__symbolic":"method"}],"removeMask":[{"__symbolic":"method"}],"_checkForIp":[{"__symbolic":"method"}],"_checkForCpfCnpj":[{"__symbolic":"method"}],"formControlResult":[{"__symbolic":"method"}],"_toNumber":[{"__symbolic":"method"}],"_removeMask":[{"__symbolic":"method"}],"_removePrefix":[{"__symbolic":"method"}],"_removeSuffix":[{"__symbolic":"method"}],"_retrieveSeparatorValue":[{"__symbolic":"method"}],"_regExpForRemove":[{"__symbolic":"method"}],"_checkSymbols":[{"__symbolic":"method"}],"_retrieveSeparatorPrecision":[{"__symbolic":"method"}],"_checkPrecision":[{"__symbolic":"method"}]}},"MaskApplierService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":4,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":31,"character":22},"arguments":[{"__symbolic":"reference","name":"config"}]}]],"parameters":[{"__symbolic":"reference","name":"IConfig"}]}],"applyMaskWithPattern":[{"__symbolic":"method"}],"applyMask":[{"__symbolic":"method"}],"_findSpecialChar":[{"__symbolic":"method"}],"_checkSymbolMask":[{"__symbolic":"method"}],"_stripToDecimal":[{"__symbolic":"method"}],"_charToRegExpExpression":[{"__symbolic":"method"}],"_shiftStep":[{"__symbolic":"method"}]}},"IConfig":{"__symbolic":"interface"},"optionsConfig":{"__symbolic":"interface"},"config":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":29,"character":51},"arguments":["config"]},"NEW_CONFIG":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":30,"character":55},"arguments":["NEW_CONFIG"]},"INITIAL_CONFIG":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":31,"character":59},"arguments":["INITIAL_CONFIG"]},"initialConfig":{"suffix":"","prefix":"","thousandSeparator":" ","decimalMarker":".","clearIfNotMatch":false,"showTemplate":false,"showMaskTyped":false,"placeHolderCharacter":"_","dropSpecialCharacters":true,"hiddenInput":{"__symbolic":"reference","name":"undefined"},"shownMaskExpression":"","separatorLimit":"","allowNegativeNumbers":false,"validation":true,"specialCharacters":["-","/","(",")",".",":"," ","+",",","@","[","]","\"","'"],"leadZeroDateTime":false,"patterns":{"0":{"pattern":{"__symbolic":"new","expression":{"__symbolic":"reference","name":"RegExp"},"arguments":["\\d"]}},"9":{"pattern":{"__symbolic":"new","expression":{"__symbolic":"reference","name":"RegExp"},"arguments":["\\d"]},"optional":true},"X":{"pattern":{"__symbolic":"new","expression":{"__symbolic":"reference","name":"RegExp"},"arguments":["\\d"]},"symbol":"*"},"A":{"pattern":{"__symbolic":"new","expression":{"__symbolic":"reference","name":"RegExp"},"arguments":["[a-zA-Z0-9]"]}},"S":{"pattern":{"__symbolic":"new","expression":{"__symbolic":"reference","name":"RegExp"},"arguments":["[a-zA-Z]"]}},"d":{"pattern":{"__symbolic":"new","expression":{"__symbolic":"reference","name":"RegExp"},"arguments":["\\d"]}},"m":{"pattern":{"__symbolic":"new","expression":{"__symbolic":"reference","name":"RegExp"},"arguments":["\\d"]}},"M":{"pattern":{"__symbolic":"new","expression":{"__symbolic":"reference","name":"RegExp"},"arguments":["\\d"]}},"H":{"pattern":{"__symbolic":"new","expression":{"__symbolic":"reference","name":"RegExp"},"arguments":["\\d"]}},"h":{"pattern":{"__symbolic":"new","expression":{"__symbolic":"reference","name":"RegExp"},"arguments":["\\d"]}},"s":{"pattern":{"__symbolic":"new","expression":{"__symbolic":"reference","name":"RegExp"},"arguments":["\\d"]}},"$quoted$":["0","9"]}},"timeMasks":["Hh:m0:s0","Hh:m0","m0:s0"],"withoutValidation":["percent","Hh","s0","m0","separator","d0/M0/0000","d0/M0","d0","M0"],"CustomKeyboardEvent":{"__symbolic":"interface"}},"origins":{"NgxMaskModule":"./lib/ngx-mask.module","_configFactory":"./lib/ngx-mask.module","MaskDirective":"./lib/mask.directive","MaskPipe":"./lib/mask.pipe","MaskService":"./lib/mask.service","MaskApplierService":"./lib/mask-applier.service","IConfig":"./lib/config","optionsConfig":"./lib/config","config":"./lib/config","NEW_CONFIG":"./lib/config","INITIAL_CONFIG":"./lib/config","initialConfig":"./lib/config","timeMasks":"./lib/config","withoutValidation":"./lib/config","CustomKeyboardEvent":"./lib/custom-keyboard-event"},"importAs":"ngx-mask"}
{"__symbolic":"module","version":4,"metadata":{"NgxMaskModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":7,"character":1},"arguments":[{"exports":[{"__symbolic":"reference","name":"MaskDirective"},{"__symbolic":"reference","name":"MaskPipe"}],"declarations":[{"__symbolic":"reference","name":"MaskDirective"},{"__symbolic":"reference","name":"MaskPipe"}]}]}],"members":{},"statics":{"forRoot":{"__symbolic":"function","parameters":["configValue"],"value":{"ngModule":{"__symbolic":"reference","name":"NgxMaskModule"},"providers":[{"provide":{"__symbolic":"reference","name":"NEW_CONFIG"},"useValue":{"__symbolic":"reference","name":"configValue"}},{"provide":{"__symbolic":"reference","name":"INITIAL_CONFIG"},"useValue":{"__symbolic":"reference","name":"initialConfig"}},{"provide":{"__symbolic":"reference","name":"config"},"useFactory":{"__symbolic":"reference","name":"_configFactory"},"deps":[{"__symbolic":"reference","name":"INITIAL_CONFIG"},{"__symbolic":"reference","name":"NEW_CONFIG"}]},{"__symbolic":"reference","name":"MaskApplierService"}]}},"forChild":{"__symbolic":"function","parameters":[],"value":{"ngModule":{"__symbolic":"reference","name":"NgxMaskModule"}}}}},"_configFactory":{"__symbolic":"function","parameters":["initConfig","configValue"],"value":{"__symbolic":"if","condition":{"__symbolic":"binop","operator":"instanceof","left":{"__symbolic":"reference","name":"configValue"},"right":{"__symbolic":"reference","name":"Function"}},"thenExpression":{},"elseExpression":{}}},"MaskDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":17,"character":1},"arguments":[{"selector":"input[mask], textarea[mask]","providers":[{"provide":{"__symbolic":"reference","module":"@angular/forms","name":"NG_VALUE_ACCESSOR","line":21,"character":15},"useExisting":{"__symbolic":"reference","name":"MaskDirective"},"multi":true},{"provide":{"__symbolic":"reference","module":"@angular/forms","name":"NG_VALIDATORS","line":26,"character":15},"useExisting":{"__symbolic":"reference","name":"MaskDirective"},"multi":true},{"__symbolic":"reference","name":"MaskService"}]}]}],"members":{"maskExpression":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":34,"character":3},"arguments":["mask"]}]}],"specialCharacters":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":35,"character":3}}]}],"patterns":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":36,"character":3}}]}],"prefix":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":37,"character":3}}]}],"suffix":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":38,"character":3}}]}],"thousandSeparator":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":39,"character":3}}]}],"decimalMarker":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":40,"character":3}}]}],"dropSpecialCharacters":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":41,"character":3}}]}],"hiddenInput":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":42,"character":3}}]}],"showMaskTyped":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":43,"character":3}}]}],"placeHolderCharacter":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":44,"character":3}}]}],"shownMaskExpression":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":45,"character":3}}]}],"showTemplate":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":46,"character":3}}]}],"clearIfNotMatch":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":47,"character":3}}]}],"validation":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":48,"character":3}}]}],"separatorLimit":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":49,"character":3}}]}],"allowNegativeNumbers":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":50,"character":3}}]}],"leadZeroDateTime":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":51,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":62,"character":5},"arguments":[{"__symbolic":"reference","module":"@angular/common","name":"DOCUMENT","line":62,"character":12}]}],null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":64,"character":5},"arguments":[{"__symbolic":"reference","name":"config"}]}]],"parameters":[{"__symbolic":"reference","name":"any"},{"__symbolic":"reference","name":"MaskService"},{"__symbolic":"reference","name":"IConfig"}]}],"ngOnChanges":[{"__symbolic":"method"}],"validate":[{"__symbolic":"method"}],"onPaste":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener","line":239,"character":3},"arguments":["paste"]}]}],"onInput":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener","line":244,"character":3},"arguments":["input",["$event"]]}]}],"onBlur":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener","line":286,"character":3},"arguments":["blur"]}]}],"onFocus":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener","line":294,"character":3},"arguments":["click",["$event"]]}]}],"onKeyDown":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener","line":349,"character":3},"arguments":["keydown",["$event"]]}]}],"writeValue":[{"__symbolic":"method"}],"registerOnChange":[{"__symbolic":"method"}],"registerOnTouched":[{"__symbolic":"method"}],"suffixCheckOnPressDelete":[{"__symbolic":"method"}],"setDisabledState":[{"__symbolic":"method"}],"_repeatPatternSymbols":[{"__symbolic":"method"}],"_applyMask":[{"__symbolic":"method"}],"_validateTime":[{"__symbolic":"method"}],"_getActualInputLength":[{"__symbolic":"method"}],"_createValidationError":[{"__symbolic":"method"}],"_setMask":[{"__symbolic":"method"}]}},"MaskPipe":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Pipe","line":5,"character":1},"arguments":[{"name":"mask","pure":true}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"MaskApplierService"}]}],"transform":[{"__symbolic":"method"}]}},"MaskService":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"MaskApplierService"},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":6,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":24,"character":5},"arguments":[{"__symbolic":"reference","module":"@angular/common","name":"DOCUMENT","line":24,"character":12}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":25,"character":5},"arguments":[{"__symbolic":"reference","name":"config"}]}],null,null],"parameters":[{"__symbolic":"reference","name":"any"},{"__symbolic":"reference","name":"IConfig"},{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":26,"character":25},{"__symbolic":"reference","module":"@angular/core","name":"Renderer2","line":27,"character":23}]}],"applyMask":[{"__symbolic":"method"}],"_numberSkipedSymbols":[{"__symbolic":"method"}],"applyValueChanges":[{"__symbolic":"method"}],"hideInput":[{"__symbolic":"method"}],"getActualValue":[{"__symbolic":"method"}],"shiftTypedSymbols":[{"__symbolic":"method"}],"showMaskInInput":[{"__symbolic":"method"}],"clearIfNotMatchFn":[{"__symbolic":"method"}],"checkSpecialCharAmount":[{"__symbolic":"method"}],"removeMask":[{"__symbolic":"method"}],"_checkForIp":[{"__symbolic":"method"}],"_checkForCpfCnpj":[{"__symbolic":"method"}],"formControlResult":[{"__symbolic":"method"}],"_toNumber":[{"__symbolic":"method"}],"_removeMask":[{"__symbolic":"method"}],"_removePrefix":[{"__symbolic":"method"}],"_removeSuffix":[{"__symbolic":"method"}],"_retrieveSeparatorValue":[{"__symbolic":"method"}],"_regExpForRemove":[{"__symbolic":"method"}],"_checkSymbols":[{"__symbolic":"method"}],"_retrieveSeparatorPrecision":[{"__symbolic":"method"}],"_checkPrecision":[{"__symbolic":"method"}]}},"MaskApplierService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":4,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":31,"character":22},"arguments":[{"__symbolic":"reference","name":"config"}]}]],"parameters":[{"__symbolic":"reference","name":"IConfig"}]}],"applyMaskWithPattern":[{"__symbolic":"method"}],"applyMask":[{"__symbolic":"method"}],"_findSpecialChar":[{"__symbolic":"method"}],"_checkSymbolMask":[{"__symbolic":"method"}],"_stripToDecimal":[{"__symbolic":"method"}],"_charToRegExpExpression":[{"__symbolic":"method"}],"_shiftStep":[{"__symbolic":"method"}]}},"IConfig":{"__symbolic":"interface"},"optionsConfig":{"__symbolic":"interface"},"config":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":29,"character":51},"arguments":["config"]},"NEW_CONFIG":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":30,"character":55},"arguments":["NEW_CONFIG"]},"INITIAL_CONFIG":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":31,"character":59},"arguments":["INITIAL_CONFIG"]},"initialConfig":{"suffix":"","prefix":"","thousandSeparator":" ","decimalMarker":".","clearIfNotMatch":false,"showTemplate":false,"showMaskTyped":false,"placeHolderCharacter":"_","dropSpecialCharacters":true,"hiddenInput":{"__symbolic":"reference","name":"undefined"},"shownMaskExpression":"","separatorLimit":"","allowNegativeNumbers":false,"validation":true,"specialCharacters":["-","/","(",")",".",":"," ","+",",","@","[","]","\"","'"],"leadZeroDateTime":false,"patterns":{"0":{"pattern":{"__symbolic":"new","expression":{"__symbolic":"reference","name":"RegExp"},"arguments":["\\d"]}},"9":{"pattern":{"__symbolic":"new","expression":{"__symbolic":"reference","name":"RegExp"},"arguments":["\\d"]},"optional":true},"X":{"pattern":{"__symbolic":"new","expression":{"__symbolic":"reference","name":"RegExp"},"arguments":["\\d"]},"symbol":"*"},"A":{"pattern":{"__symbolic":"new","expression":{"__symbolic":"reference","name":"RegExp"},"arguments":["[a-zA-Z0-9]"]}},"S":{"pattern":{"__symbolic":"new","expression":{"__symbolic":"reference","name":"RegExp"},"arguments":["[a-zA-Z]"]}},"d":{"pattern":{"__symbolic":"new","expression":{"__symbolic":"reference","name":"RegExp"},"arguments":["\\d"]}},"m":{"pattern":{"__symbolic":"new","expression":{"__symbolic":"reference","name":"RegExp"},"arguments":["\\d"]}},"M":{"pattern":{"__symbolic":"new","expression":{"__symbolic":"reference","name":"RegExp"},"arguments":["\\d"]}},"H":{"pattern":{"__symbolic":"new","expression":{"__symbolic":"reference","name":"RegExp"},"arguments":["\\d"]}},"h":{"pattern":{"__symbolic":"new","expression":{"__symbolic":"reference","name":"RegExp"},"arguments":["\\d"]}},"s":{"pattern":{"__symbolic":"new","expression":{"__symbolic":"reference","name":"RegExp"},"arguments":["\\d"]}},"$quoted$":["0","9"]}},"timeMasks":["Hh:m0:s0","Hh:m0","m0:s0"],"withoutValidation":["percent","Hh","s0","m0","separator","d0/M0/0000","d0/M0","d0","M0"],"CustomKeyboardEvent":{"__symbolic":"interface"}},"origins":{"NgxMaskModule":"./lib/ngx-mask.module","_configFactory":"./lib/ngx-mask.module","MaskDirective":"./lib/mask.directive","MaskPipe":"./lib/mask.pipe","MaskService":"./lib/mask.service","MaskApplierService":"./lib/mask-applier.service","IConfig":"./lib/config","optionsConfig":"./lib/config","config":"./lib/config","NEW_CONFIG":"./lib/config","INITIAL_CONFIG":"./lib/config","initialConfig":"./lib/config","timeMasks":"./lib/config","withoutValidation":"./lib/config","CustomKeyboardEvent":"./lib/custom-keyboard-event"},"importAs":"ngx-mask"}
{
"name": "ngx-mask",
"version": "11.1.2",
"version": "11.1.3",
"description": "awesome ngx mask",

@@ -5,0 +5,0 @@ "keywords": [

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc