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
253
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 7.2.0 to 7.3.0

1

app/ngx-mask/mask-applier.service.d.ts

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

private separator;
private persantage;
}

@@ -231,2 +231,10 @@ (function (global, factory) {

};
this.persantage = function (str) {
if (Number(str) >= 0 && Number(str) <= 100) {
return true;
}
else {
return false;
}
};
this._shift = new Set();

@@ -297,3 +305,14 @@ this.maskSpecialCharacters = ( /** @type {?} */(this._config)).specialCharacters;

.split('');
if (maskExpression === 'separator') {
if (maskExpression === 'percent') {
if (inputValue.match('[a-z]|[A-Z]') || inputValue.match(/[-!$%^&*()_+|~=`{}\[\]:";'<>?,\/]/)) {
inputValue = inputValue.substring(0, inputValue.length - 1);
}
if (this.persantage(inputValue)) {
result = inputValue;
}
else {
result = inputValue.substring(0, inputValue.length - 1);
}
}
else if (maskExpression === 'separator') {
if (inputValue.match('[a-z]|[A-Z]') || inputValue.match(/[-!$%^&*()_+|~=`{}\[\]:";'<>?,.\/]/)) {

@@ -300,0 +319,0 @@ inputValue = inputValue.substring(0, inputValue.length - 1);

2

bundles/ngx-mask.umd.min.js

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

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/forms"),require("@angular/common"),require("@angular/core")):"function"==typeof define&&define.amd?define("ngx-mask",["exports","@angular/forms","@angular/common","@angular/core"],t):t(e["ngx-mask"]={},e.ng.forms,e.ng.common,e.ng.core)}(this,function(e,t,r,n){"use strict";var s=new n.InjectionToken("config"),i=new n.InjectionToken("NEW_CONFIG"),a=new n.InjectionToken("INITIAL_CONFIG"),o={sufix:"",prefix:"",clearIfNotMatch:!1,showTemplate:!1,showMaskTyped:!1,dropSpecialCharacters:!0,specialCharacters:["-","/","(",")",".",":"," ","+",",","@","[","]",'"',"'"],patterns:{0:{pattern:new RegExp("\\d")},9:{pattern:new RegExp("\\d"),optional:!0},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")},H:{pattern:new RegExp("\\d")},h:{pattern:new RegExp("\\d")},s:{pattern:new RegExp("\\d")}}},c=function(e,t){return(c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)};var p=function(){return(p=Object.assign||function(e){for(var t,r=1,i=arguments.length;r<i;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}).apply(this,arguments)};function h(i,n){var s,a,o,e,c={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return e={next:t(0),"throw":t(1),"return":t(2)},"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(t){return function(e){return function r(e){if(s)throw new TypeError("Generator is already executing.");for(;c;)try{if(s=1,a&&(o=2&e[0]?a["return"]:e[0]?a["throw"]||((o=a["return"])&&o.call(a),0):a.next)&&!(o=o.call(a,e[1])).done)return o;switch(a=0,o&&(e=[2&e[0],o.value]),e[0]){case 0:case 1:o=e;break;case 4:return c.label++,{value:e[1],done:!1};case 5:c.label++,a=e[1],e=[0];continue;case 7:e=c.ops.pop(),c.trys.pop();continue;default:if(!(o=0<(o=c.trys).length&&o[o.length-1])&&(6===e[0]||2===e[0])){c=0;continue}if(3===e[0]&&(!o||e[1]>o[0]&&e[1]<o[3])){c.label=e[1];break}if(6===e[0]&&c.label<o[1]){c.label=o[1],o=e;break}if(o&&c.label<o[2]){c.label=o[2],c.ops.push(e);break}o[2]&&c.ops.pop(),c.trys.pop();continue}e=n.call(i,c)}catch(t){e=[6,t],a=0}finally{s=o=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}([t,e])}}}function l(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var i,n,s=r.call(e),a=[];try{for(;(void 0===t||0<t--)&&!(i=s.next()).done;)a.push(i.value)}catch(o){n={error:o}}finally{try{i&&!i.done&&(r=s["return"])&&r.call(s)}finally{if(n)throw n.error}}return a}var u=function(){function e(e){this._config=e,this.maskExpression="",this.separator=function(e){for(var t=(e+="").split(" ")[0],r=/(\d+)(\d{3})/;r.test(t);)t=t.replace(r,"$1 $2");return t},this._shift=new Set,this.maskSpecialCharacters=this._config.specialCharacters,this.maskAvailablePatterns=this._config.patterns,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.sufix=this._config.sufix}return e.prototype.applyMaskWithPattern=function(e,t){var r=l(t,2),i=r[0],n=r[1];return this.customPattern=n,this.applyMask(e,i)},e.prototype.applyMask=function(e,t,r,i){if(void 0===r&&(r=0),void 0===i&&(i=function(){}),e===undefined||null===e||t===undefined)return"";var n=0,s="",a=!1;e.slice(0,this.prefix.length)===this.prefix&&(e=e.slice(this.prefix.length,e.length));var o=e.toString().split("");if("separator"===t){(e.match("[a-z]|[A-Z]")||e.match(/[-!$%^&*()_+|~=`{}\[\]:";'<>?,.\/]/))&&(e=e.substring(0,e.length-1));var c=e.replace(/\s/g,"");n=r=(s=this.separator(c)).length+1;var p=/\*|\?/g.test(t.slice(0,n))?o.length:n;this._shift.add(p+this.prefix.length||0)}else for(var h=0,l=o[0];h<o.length&&n!==t.length;l=o[++h])if(this._checkSymbolMask(l,t[n])&&"?"===t[n+1])s+=l,n+=2;else if("*"===t[n+1]&&a&&this._checkSymbolMask(l,t[n+2]))s+=l,n+=3,a=!1;else if(this._checkSymbolMask(l,t[n])&&"*"===t[n+1])s+=l,a=!0;else if("?"===t[n+1]&&this._checkSymbolMask(l,t[n+2]))s+=l,n+=3;else if(this._checkSymbolMask(l,t[n])){if("H"===t[n]&&2<Number(l)){s+=0,n+=1;p=/\*|\?/g.test(t.slice(0,n))?o.length:n;this._shift.add(p+this.prefix.length||0),h--;continue}if("h"===t[n]&&"2"===s&&3<Number(l))continue;if("m"===t[n]&&5<Number(l)){s+=0,n+=1;p=/\*|\?/g.test(t.slice(0,n))?o.length:n;this._shift.add(p+this.prefix.length||0),h--;continue}if("s"===t[n]&&5<Number(l)){s+=0,n+=1;p=/\*|\?/g.test(t.slice(0,n))?o.length:n;this._shift.add(p+this.prefix.length||0),h--;continue}s+=l,n++}else if(this._checkSymbolMask(l,t[n])){if("d"===t[n]&&3<Number(l)){s+=0,n+=1;p=/\*|\?/g.test(t.slice(0,n))?o.length:n;this._shift.add(p+this.prefix.length||0),h--;continue}if("d"===t[n-1]&&31<Number(e.slice(n-1,n+1)))continue;if("m"===t[n]&&1<Number(l)){s+=0,n+=1;p=/\*|\?/g.test(t.slice(0,n))?o.length:n;this._shift.add(p+this.prefix.length||0),h--;continue}if("m"===t[n-1]&&12<Number(e.slice(n-1,n+1)))continue;s+=l,n++}else if(-1!==this.maskSpecialCharacters.indexOf(t[n])){s+=t[n],n++;p=/\*|\?/g.test(t.slice(0,n))?o.length:n;this._shift.add(p+this.prefix.length||0),h--}else-1<this.maskSpecialCharacters.indexOf(l)&&this.maskAvailablePatterns[t[n]]&&this.maskAvailablePatterns[t[n]].optional?(n++,h--):"*"===this.maskExpression[n+1]&&this._findSpecialChar(this.maskExpression[n+2])&&this._findSpecialChar(l)===this.maskExpression[n+2]&&a&&(n+=3,s+=l);s.length+1===t.length&&-1!==this.maskSpecialCharacters.indexOf(t[t.length-1])&&(s+=t[t.length-1]);for(var u=1,f=r+1;this._shift.has(f);)u++,f++;i(this._shift.has(r)?u:0);var m=""+this.prefix+s;return m=this.sufix?""+this.prefix+s+this.sufix:""+this.prefix+s,0===s.length&&(m=""+this.prefix+s),m},e.prototype._findSpecialChar=function(t){return this.maskSpecialCharacters.find(function(e){return e===t})},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.decorators=[{type:n.Injectable}],e.ctorParameters=function(){return[{type:undefined,decorators:[{type:n.Inject,args:[s]}]}]},e}(),f=function(a){function e(e,t,r,i){var n=a.call(this,t)||this;return n.document=e,n._config=t,n._elementRef=r,n._renderer=i,n.maskExpression="",n.isNumberValue=!1,n.showMaskTyped=!1,n.maskIsShown="",n.onChange=function(e){},n.onTouch=function(){},n._formElement=n._elementRef.nativeElement,n}return function i(e,t){function r(){this.constructor=e}c(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}(e,a),e.prototype.applyMask=function(e,t,r,i){if(void 0===r&&(r=0),void 0===i&&(i=function(){}),this.maskIsShown=this.showMaskTyped?this.maskExpression.replace(/\w/g,"_"):"",!e&&this.showMaskTyped)return this.prefix+this.maskIsShown;var n=a.prototype.applyMask.call(this,e,t,r,i);Array.isArray(this.dropSpecialCharacters)?this.onChange(this._removeMask(this._removeSufix(this._removePrefix(n)),this.dropSpecialCharacters)):!0===this.dropSpecialCharacters?this.onChange(this.isNumberValue?Number(this._removeMask(this._removeSufix(this._removePrefix(n)),this.maskSpecialCharacters)):this._removeMask(this._removeSufix(this._removePrefix(n)),this.maskSpecialCharacters)):this.onChange(this._removeSufix(this._removePrefix(n)));if(!this.showMaskTyped)return n;var s=n.length;return n+(this.prefix+this.maskIsShown).slice(s)},e.prototype.applyValueChanges=function(e,t){void 0===e&&(e=0),void 0===t&&(t=function(){});var r=this.applyMask(this._formElement.value,this.maskExpression,e,t);this._formElement.value=r,this._formElement!==this.document.activeElement&&this.clearIfNotMatchFn()},e.prototype.showMaskInInput=function(){this.showMaskTyped&&(this.maskIsShown=this.maskExpression.replace(/\w/g,"_"))},e.prototype.clearIfNotMatchFn=function(){!0===this.clearIfNotMatch&&this.maskExpression.length!==this._formElement.value.length&&(this.formElementProperty=["value",""],this.applyMask(this._formElement.value,this.maskExpression))},Object.defineProperty(e.prototype,"formElementProperty",{set:function(e){var t=l(e,2),r=t[0],i=t[1];this._renderer.setProperty(this._formElement,r,i)},enumerable:!0,configurable:!0}),e.prototype._removeMask=function(e,t){return e?e.replace(this._regExpForRemove(t),""):e},e.prototype._removePrefix=function(e){return this.prefix&&e?e.replace(this.prefix,""):e},e.prototype._removeSufix=function(e){return this.sufix&&e?e.replace(this.sufix,""):e},e.prototype._regExpForRemove=function(e){return new RegExp(e.map(function(e){return"\\"+e}).join("|"),"gi")},e.decorators=[{type:n.Injectable}],e.ctorParameters=function(){return[{type:undefined,decorators:[{type:n.Inject,args:[r.DOCUMENT]}]},{type:undefined,decorators:[{type:n.Inject,args:[s]}]},{type:n.ElementRef},{type:n.Renderer2}]},e}(u),m=function(){function e(e,t){this.document=e,this._maskService=t,this._position=null,this.onChange=function(e){},this.onTouch=function(){}}return Object.defineProperty(e.prototype,"maskExpression",{set:function(e){this._maskValue=e||"",this._maskValue&&(this._maskService.maskExpression=this._repeatPatternSymbols(this._maskValue),this._maskService.formElementProperty=["value",this._maskService.applyMask(this._inputValue,this._maskService.maskExpression)])},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"specialCharacters",{set:function(e){e&&Array.isArray(e)&&(!Array.isArray(e)||e.length)&&(this._maskService.maskSpecialCharacters=e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"patterns",{set:function(e){e&&(this._maskService.maskAvailablePatterns=e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"prefix",{set:function(e){e&&(this._maskService.prefix=e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"sufix",{set:function(e){e&&(this._maskService.sufix=e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dropSpecialCharacters",{set:function(e){this._maskService.dropSpecialCharacters=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"showMaskTyped",{set:function(e){e&&(this._maskService.showMaskTyped=e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"showTemplate",{set:function(e){this._maskService.showTemplate=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"clearIfNotMatch",{set:function(e){this._maskService.clearIfNotMatch=e},enumerable:!0,configurable:!0}),e.prototype.onInput=function(e){var t=e.target;if(this._inputValue=t.value,this._maskValue){var r=1===t.selectionStart?t.selectionStart+this._maskService.prefix.length:t.selectionStart,i=0;this._maskService.applyValueChanges(r,function(e){return i=e}),this.document.activeElement===t&&(t.selectionStart=t.selectionEnd=null!==this._position?this._position:r+("deleteContentBackward"===e.inputType?0:i),this._position=null)}else this.onChange(t.value)},e.prototype.onBlur=function(){this._maskService.clearIfNotMatchFn(),this.onTouch()},e.prototype.onFocus=function(e){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.maskExpression.replace(/[0-9]/g,"_")),t.value=t.value&&t.value!==this._maskService.prefix?t.value:this._maskService.prefix+this._maskService.maskIsShown,(t.selectionStart||t.selectionEnd)<=this._maskService.prefix.length&&(t.selectionStart=this._maskService.prefix.length))},e.prototype.a=function(e){var t=e.target;38===e.keyCode&&e.preventDefault(),37!==e.keyCode&&8!==e.keyCode||(t.selectionStart<=this._maskService.prefix.length&&t.selectionEnd<=this._maskService.prefix.length&&e.preventDefault(),this.onFocus(e),8===e.keyCode&&0===t.selectionStart&&t.selectionEnd===t.value.length&&(t.value=this._maskService.prefix,this._position=this._maskService.prefix?this._maskService.prefix.length:1,this.onInput(e)))},e.prototype.onPaste=function(){this._position=Number.MAX_SAFE_INTEGER},e.prototype.writeValue=function(t){return function e(t,a,o,c){return new(o||(o=Promise))(function(e,r){function i(e){try{s(c.next(e))}catch(t){r(t)}}function n(e){try{s(c["throw"](e))}catch(t){r(t)}}function s(t){t.done?e(t.value):new o(function(e){e(t.value)}).then(i,n)}s((c=c.apply(t,a||[])).next())})}(this,void 0,void 0,function(){return h(this,function(e){return t===undefined&&(t=""),"number"==typeof t&&(t=String(t),this._maskService.isNumberValue=!0),t&&this._maskService.maskExpression||this._maskService.maskExpression&&(this._maskService.prefix||this._maskService.showMaskTyped)?this._maskService.formElementProperty=["value",this._maskService.applyMask(t,this._maskService.maskExpression)]:this._maskService.formElementProperty=["value",t],this._inputValue=t,[2]})})},e.prototype.registerOnChange=function(e){this.onChange=e,this._maskService.onChange=this.onChange},e.prototype.registerOnTouched=function(e){this.onTouch=e},e.prototype.setDisabledState=function(e){this._maskService.formElementProperty=["disabled",e]},e.prototype._repeatPatternSymbols=function(n){var s=this;return n.match(/{[0-9]+}/)&&n.split("").reduce(function(e,t,r){if(s._start="{"===t?r:s._start,"}"!==t)return s._maskService._findSpecialChar(t)?e+t:e;s._end=r;var i=Number(n.slice(s._start+1,s._end));return e+new Array(i+1).join(n[s._start-1])},"")||n},e.decorators=[{type:n.Directive,args:[{selector:"[mask]",providers:[{provide:t.NG_VALUE_ACCESSOR,useExisting:n.forwardRef(function(){return e}),multi:!0},f]}]}],e.ctorParameters=function(){return[{type:undefined,decorators:[{type:n.Inject,args:[r.DOCUMENT]}]},{type:f}]},e.propDecorators={maskExpression:[{type:n.Input,args:["mask"]}],specialCharacters:[{type:n.Input}],patterns:[{type:n.Input}],prefix:[{type:n.Input}],sufix:[{type:n.Input}],dropSpecialCharacters:[{type:n.Input}],showMaskTyped:[{type:n.Input}],showTemplate:[{type:n.Input}],clearIfNotMatch:[{type:n.Input}],onInput:[{type:n.HostListener,args:["input",["$event"]]}],onBlur:[{type:n.HostListener,args:["blur"]}],onFocus:[{type:n.HostListener,args:["click",["$event"]]}],a:[{type:n.HostListener,args:["keydown",["$event"]]}],onPaste:[{type:n.HostListener,args:["paste"]}]},e}(),y=function(){function e(e){this._maskService=e}return e.prototype.transform=function(e,t){return e?"string"==typeof t?this._maskService.applyMask(""+e,t):this._maskService.applyMaskWithPattern(""+e,t):""},e.decorators=[{type:n.Pipe,args:[{name:"mask",pure:!0}]}],e.ctorParameters=function(){return[{type:u}]},e}(),k=function(){function t(){}return t.forRoot=function(e){return{ngModule:t,providers:[{provide:i,useValue:e},{provide:a,useValue:o},{provide:s,useFactory:d,deps:[a,i]}]}},t.forChild=function(e){return{ngModule:t}},t.decorators=[{type:n.NgModule,args:[{providers:[u],exports:[m,y],declarations:[m,y]}]}],t}();function d(e,t){return"function"==typeof t?t():p({},e,t)}e.config=s,e.NEW_CONFIG=i,e.INITIAL_CONFIG=a,e.initialConfig=o,e.MaskDirective=m,e.MaskService=f,e._configFactory=d,e.NgxMaskModule=k,e.MaskPipe=y,e.ɵa=u,Object.defineProperty(e,"__esModule",{value:!0})});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/forms"),require("@angular/common"),require("@angular/core")):"function"==typeof define&&define.amd?define("ngx-mask",["exports","@angular/forms","@angular/common","@angular/core"],t):t(e["ngx-mask"]={},e.ng.forms,e.ng.common,e.ng.core)}(this,function(e,t,r,n){"use strict";var s=new n.InjectionToken("config"),i=new n.InjectionToken("NEW_CONFIG"),a=new n.InjectionToken("INITIAL_CONFIG"),o={sufix:"",prefix:"",clearIfNotMatch:!1,showTemplate:!1,showMaskTyped:!1,dropSpecialCharacters:!0,specialCharacters:["-","/","(",")",".",":"," ","+",",","@","[","]",'"',"'"],patterns:{0:{pattern:new RegExp("\\d")},9:{pattern:new RegExp("\\d"),optional:!0},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")},H:{pattern:new RegExp("\\d")},h:{pattern:new RegExp("\\d")},s:{pattern:new RegExp("\\d")}}},c=function(e,t){return(c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)};var p=function(){return(p=Object.assign||function(e){for(var t,r=1,i=arguments.length;r<i;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}).apply(this,arguments)};function h(i,n){var s,a,o,e,c={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return e={next:t(0),"throw":t(1),"return":t(2)},"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(t){return function(e){return function r(e){if(s)throw new TypeError("Generator is already executing.");for(;c;)try{if(s=1,a&&(o=2&e[0]?a["return"]:e[0]?a["throw"]||((o=a["return"])&&o.call(a),0):a.next)&&!(o=o.call(a,e[1])).done)return o;switch(a=0,o&&(e=[2&e[0],o.value]),e[0]){case 0:case 1:o=e;break;case 4:return c.label++,{value:e[1],done:!1};case 5:c.label++,a=e[1],e=[0];continue;case 7:e=c.ops.pop(),c.trys.pop();continue;default:if(!(o=0<(o=c.trys).length&&o[o.length-1])&&(6===e[0]||2===e[0])){c=0;continue}if(3===e[0]&&(!o||e[1]>o[0]&&e[1]<o[3])){c.label=e[1];break}if(6===e[0]&&c.label<o[1]){c.label=o[1],o=e;break}if(o&&c.label<o[2]){c.label=o[2],c.ops.push(e);break}o[2]&&c.ops.pop(),c.trys.pop();continue}e=n.call(i,c)}catch(t){e=[6,t],a=0}finally{s=o=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}([t,e])}}}function l(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var i,n,s=r.call(e),a=[];try{for(;(void 0===t||0<t--)&&!(i=s.next()).done;)a.push(i.value)}catch(o){n={error:o}}finally{try{i&&!i.done&&(r=s["return"])&&r.call(s)}finally{if(n)throw n.error}}return a}var u=function(){function e(e){this._config=e,this.maskExpression="",this.separator=function(e){for(var t=(e+="").split(" ")[0],r=/(\d+)(\d{3})/;r.test(t);)t=t.replace(r,"$1 $2");return t},this.persantage=function(e){return 0<=Number(e)&&Number(e)<=100},this._shift=new Set,this.maskSpecialCharacters=this._config.specialCharacters,this.maskAvailablePatterns=this._config.patterns,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.sufix=this._config.sufix}return e.prototype.applyMaskWithPattern=function(e,t){var r=l(t,2),i=r[0],n=r[1];return this.customPattern=n,this.applyMask(e,i)},e.prototype.applyMask=function(e,t,r,i){if(void 0===r&&(r=0),void 0===i&&(i=function(){}),e===undefined||null===e||t===undefined)return"";var n=0,s="",a=!1;e.slice(0,this.prefix.length)===this.prefix&&(e=e.slice(this.prefix.length,e.length));var o=e.toString().split("");if("percent"===t)(e.match("[a-z]|[A-Z]")||e.match(/[-!$%^&*()_+|~=`{}\[\]:";'<>?,\/]/))&&(e=e.substring(0,e.length-1)),s=this.persantage(e)?e:e.substring(0,e.length-1);else if("separator"===t){(e.match("[a-z]|[A-Z]")||e.match(/[-!$%^&*()_+|~=`{}\[\]:";'<>?,.\/]/))&&(e=e.substring(0,e.length-1));var c=e.replace(/\s/g,"");n=r=(s=this.separator(c)).length+1;var p=/\*|\?/g.test(t.slice(0,n))?o.length:n;this._shift.add(p+this.prefix.length||0)}else for(var h=0,l=o[0];h<o.length&&n!==t.length;l=o[++h])if(this._checkSymbolMask(l,t[n])&&"?"===t[n+1])s+=l,n+=2;else if("*"===t[n+1]&&a&&this._checkSymbolMask(l,t[n+2]))s+=l,n+=3,a=!1;else if(this._checkSymbolMask(l,t[n])&&"*"===t[n+1])s+=l,a=!0;else if("?"===t[n+1]&&this._checkSymbolMask(l,t[n+2]))s+=l,n+=3;else if(this._checkSymbolMask(l,t[n])){if("H"===t[n]&&2<Number(l)){s+=0,n+=1;p=/\*|\?/g.test(t.slice(0,n))?o.length:n;this._shift.add(p+this.prefix.length||0),h--;continue}if("h"===t[n]&&"2"===s&&3<Number(l))continue;if("m"===t[n]&&5<Number(l)){s+=0,n+=1;p=/\*|\?/g.test(t.slice(0,n))?o.length:n;this._shift.add(p+this.prefix.length||0),h--;continue}if("s"===t[n]&&5<Number(l)){s+=0,n+=1;p=/\*|\?/g.test(t.slice(0,n))?o.length:n;this._shift.add(p+this.prefix.length||0),h--;continue}s+=l,n++}else if(this._checkSymbolMask(l,t[n])){if("d"===t[n]&&3<Number(l)){s+=0,n+=1;p=/\*|\?/g.test(t.slice(0,n))?o.length:n;this._shift.add(p+this.prefix.length||0),h--;continue}if("d"===t[n-1]&&31<Number(e.slice(n-1,n+1)))continue;if("m"===t[n]&&1<Number(l)){s+=0,n+=1;p=/\*|\?/g.test(t.slice(0,n))?o.length:n;this._shift.add(p+this.prefix.length||0),h--;continue}if("m"===t[n-1]&&12<Number(e.slice(n-1,n+1)))continue;s+=l,n++}else if(-1!==this.maskSpecialCharacters.indexOf(t[n])){s+=t[n],n++;p=/\*|\?/g.test(t.slice(0,n))?o.length:n;this._shift.add(p+this.prefix.length||0),h--}else-1<this.maskSpecialCharacters.indexOf(l)&&this.maskAvailablePatterns[t[n]]&&this.maskAvailablePatterns[t[n]].optional?(n++,h--):"*"===this.maskExpression[n+1]&&this._findSpecialChar(this.maskExpression[n+2])&&this._findSpecialChar(l)===this.maskExpression[n+2]&&a&&(n+=3,s+=l);s.length+1===t.length&&-1!==this.maskSpecialCharacters.indexOf(t[t.length-1])&&(s+=t[t.length-1]);for(var u=1,f=r+1;this._shift.has(f);)u++,f++;i(this._shift.has(r)?u:0);var m=""+this.prefix+s;return m=this.sufix?""+this.prefix+s+this.sufix:""+this.prefix+s,0===s.length&&(m=""+this.prefix+s),m},e.prototype._findSpecialChar=function(t){return this.maskSpecialCharacters.find(function(e){return e===t})},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.decorators=[{type:n.Injectable}],e.ctorParameters=function(){return[{type:undefined,decorators:[{type:n.Inject,args:[s]}]}]},e}(),f=function(a){function e(e,t,r,i){var n=a.call(this,t)||this;return n.document=e,n._config=t,n._elementRef=r,n._renderer=i,n.maskExpression="",n.isNumberValue=!1,n.showMaskTyped=!1,n.maskIsShown="",n.onChange=function(e){},n.onTouch=function(){},n._formElement=n._elementRef.nativeElement,n}return function i(e,t){function r(){this.constructor=e}c(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}(e,a),e.prototype.applyMask=function(e,t,r,i){if(void 0===r&&(r=0),void 0===i&&(i=function(){}),this.maskIsShown=this.showMaskTyped?this.maskExpression.replace(/\w/g,"_"):"",!e&&this.showMaskTyped)return this.prefix+this.maskIsShown;var n=a.prototype.applyMask.call(this,e,t,r,i);Array.isArray(this.dropSpecialCharacters)?this.onChange(this._removeMask(this._removeSufix(this._removePrefix(n)),this.dropSpecialCharacters)):!0===this.dropSpecialCharacters?this.onChange(this.isNumberValue?Number(this._removeMask(this._removeSufix(this._removePrefix(n)),this.maskSpecialCharacters)):this._removeMask(this._removeSufix(this._removePrefix(n)),this.maskSpecialCharacters)):this.onChange(this._removeSufix(this._removePrefix(n)));if(!this.showMaskTyped)return n;var s=n.length;return n+(this.prefix+this.maskIsShown).slice(s)},e.prototype.applyValueChanges=function(e,t){void 0===e&&(e=0),void 0===t&&(t=function(){});var r=this.applyMask(this._formElement.value,this.maskExpression,e,t);this._formElement.value=r,this._formElement!==this.document.activeElement&&this.clearIfNotMatchFn()},e.prototype.showMaskInInput=function(){this.showMaskTyped&&(this.maskIsShown=this.maskExpression.replace(/\w/g,"_"))},e.prototype.clearIfNotMatchFn=function(){!0===this.clearIfNotMatch&&this.maskExpression.length!==this._formElement.value.length&&(this.formElementProperty=["value",""],this.applyMask(this._formElement.value,this.maskExpression))},Object.defineProperty(e.prototype,"formElementProperty",{set:function(e){var t=l(e,2),r=t[0],i=t[1];this._renderer.setProperty(this._formElement,r,i)},enumerable:!0,configurable:!0}),e.prototype._removeMask=function(e,t){return e?e.replace(this._regExpForRemove(t),""):e},e.prototype._removePrefix=function(e){return this.prefix&&e?e.replace(this.prefix,""):e},e.prototype._removeSufix=function(e){return this.sufix&&e?e.replace(this.sufix,""):e},e.prototype._regExpForRemove=function(e){return new RegExp(e.map(function(e){return"\\"+e}).join("|"),"gi")},e.decorators=[{type:n.Injectable}],e.ctorParameters=function(){return[{type:undefined,decorators:[{type:n.Inject,args:[r.DOCUMENT]}]},{type:undefined,decorators:[{type:n.Inject,args:[s]}]},{type:n.ElementRef},{type:n.Renderer2}]},e}(u),m=function(){function e(e,t){this.document=e,this._maskService=t,this._position=null,this.onChange=function(e){},this.onTouch=function(){}}return Object.defineProperty(e.prototype,"maskExpression",{set:function(e){this._maskValue=e||"",this._maskValue&&(this._maskService.maskExpression=this._repeatPatternSymbols(this._maskValue),this._maskService.formElementProperty=["value",this._maskService.applyMask(this._inputValue,this._maskService.maskExpression)])},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"specialCharacters",{set:function(e){e&&Array.isArray(e)&&(!Array.isArray(e)||e.length)&&(this._maskService.maskSpecialCharacters=e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"patterns",{set:function(e){e&&(this._maskService.maskAvailablePatterns=e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"prefix",{set:function(e){e&&(this._maskService.prefix=e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"sufix",{set:function(e){e&&(this._maskService.sufix=e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dropSpecialCharacters",{set:function(e){this._maskService.dropSpecialCharacters=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"showMaskTyped",{set:function(e){e&&(this._maskService.showMaskTyped=e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"showTemplate",{set:function(e){this._maskService.showTemplate=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"clearIfNotMatch",{set:function(e){this._maskService.clearIfNotMatch=e},enumerable:!0,configurable:!0}),e.prototype.onInput=function(e){var t=e.target;if(this._inputValue=t.value,this._maskValue){var r=1===t.selectionStart?t.selectionStart+this._maskService.prefix.length:t.selectionStart,i=0;this._maskService.applyValueChanges(r,function(e){return i=e}),this.document.activeElement===t&&(t.selectionStart=t.selectionEnd=null!==this._position?this._position:r+("deleteContentBackward"===e.inputType?0:i),this._position=null)}else this.onChange(t.value)},e.prototype.onBlur=function(){this._maskService.clearIfNotMatchFn(),this.onTouch()},e.prototype.onFocus=function(e){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.maskExpression.replace(/[0-9]/g,"_")),t.value=t.value&&t.value!==this._maskService.prefix?t.value:this._maskService.prefix+this._maskService.maskIsShown,(t.selectionStart||t.selectionEnd)<=this._maskService.prefix.length&&(t.selectionStart=this._maskService.prefix.length))},e.prototype.a=function(e){var t=e.target;38===e.keyCode&&e.preventDefault(),37!==e.keyCode&&8!==e.keyCode||(t.selectionStart<=this._maskService.prefix.length&&t.selectionEnd<=this._maskService.prefix.length&&e.preventDefault(),this.onFocus(e),8===e.keyCode&&0===t.selectionStart&&t.selectionEnd===t.value.length&&(t.value=this._maskService.prefix,this._position=this._maskService.prefix?this._maskService.prefix.length:1,this.onInput(e)))},e.prototype.onPaste=function(){this._position=Number.MAX_SAFE_INTEGER},e.prototype.writeValue=function(t){return function e(t,a,o,c){return new(o||(o=Promise))(function(e,r){function i(e){try{s(c.next(e))}catch(t){r(t)}}function n(e){try{s(c["throw"](e))}catch(t){r(t)}}function s(t){t.done?e(t.value):new o(function(e){e(t.value)}).then(i,n)}s((c=c.apply(t,a||[])).next())})}(this,void 0,void 0,function(){return h(this,function(e){return t===undefined&&(t=""),"number"==typeof t&&(t=String(t),this._maskService.isNumberValue=!0),t&&this._maskService.maskExpression||this._maskService.maskExpression&&(this._maskService.prefix||this._maskService.showMaskTyped)?this._maskService.formElementProperty=["value",this._maskService.applyMask(t,this._maskService.maskExpression)]:this._maskService.formElementProperty=["value",t],this._inputValue=t,[2]})})},e.prototype.registerOnChange=function(e){this.onChange=e,this._maskService.onChange=this.onChange},e.prototype.registerOnTouched=function(e){this.onTouch=e},e.prototype.setDisabledState=function(e){this._maskService.formElementProperty=["disabled",e]},e.prototype._repeatPatternSymbols=function(n){var s=this;return n.match(/{[0-9]+}/)&&n.split("").reduce(function(e,t,r){if(s._start="{"===t?r:s._start,"}"!==t)return s._maskService._findSpecialChar(t)?e+t:e;s._end=r;var i=Number(n.slice(s._start+1,s._end));return e+new Array(i+1).join(n[s._start-1])},"")||n},e.decorators=[{type:n.Directive,args:[{selector:"[mask]",providers:[{provide:t.NG_VALUE_ACCESSOR,useExisting:n.forwardRef(function(){return e}),multi:!0},f]}]}],e.ctorParameters=function(){return[{type:undefined,decorators:[{type:n.Inject,args:[r.DOCUMENT]}]},{type:f}]},e.propDecorators={maskExpression:[{type:n.Input,args:["mask"]}],specialCharacters:[{type:n.Input}],patterns:[{type:n.Input}],prefix:[{type:n.Input}],sufix:[{type:n.Input}],dropSpecialCharacters:[{type:n.Input}],showMaskTyped:[{type:n.Input}],showTemplate:[{type:n.Input}],clearIfNotMatch:[{type:n.Input}],onInput:[{type:n.HostListener,args:["input",["$event"]]}],onBlur:[{type:n.HostListener,args:["blur"]}],onFocus:[{type:n.HostListener,args:["click",["$event"]]}],a:[{type:n.HostListener,args:["keydown",["$event"]]}],onPaste:[{type:n.HostListener,args:["paste"]}]},e}(),y=function(){function e(e){this._maskService=e}return e.prototype.transform=function(e,t){return e?"string"==typeof t?this._maskService.applyMask(""+e,t):this._maskService.applyMaskWithPattern(""+e,t):""},e.decorators=[{type:n.Pipe,args:[{name:"mask",pure:!0}]}],e.ctorParameters=function(){return[{type:u}]},e}(),k=function(){function t(){}return t.forRoot=function(e){return{ngModule:t,providers:[{provide:i,useValue:e},{provide:a,useValue:o},{provide:s,useFactory:d,deps:[a,i]}]}},t.forChild=function(e){return{ngModule:t}},t.decorators=[{type:n.NgModule,args:[{providers:[u],exports:[m,y],declarations:[m,y]}]}],t}();function d(e,t){return"function"==typeof t?t():p({},e,t)}e.config=s,e.NEW_CONFIG=i,e.INITIAL_CONFIG=a,e.initialConfig=o,e.MaskDirective=m,e.MaskService=f,e._configFactory=d,e.NgxMaskModule=k,e.MaskPipe=y,e.ɵa=u,Object.defineProperty(e,"__esModule",{value:!0})});
//# sourceMappingURL=ngx-mask.umd.min.js.map

@@ -27,2 +27,10 @@ /**

};
this.persantage = (str) => {
if (Number(str) >= 0 && Number(str) <= 100) {
return true;
}
else {
return false;
}
};
this._shift = new Set();

@@ -72,3 +80,14 @@ this.maskSpecialCharacters = (/** @type {?} */ (this._config)).specialCharacters;

.split('');
if (maskExpression === 'separator') {
if (maskExpression === 'percent') {
if (inputValue.match('[a-z]|[A-Z]') || inputValue.match(/[-!$%^&*()_+|~=`{}\[\]:";'<>?,\/]/)) {
inputValue = inputValue.substring(0, inputValue.length - 1);
}
if (this.persantage(inputValue)) {
result = inputValue;
}
else {
result = inputValue.substring(0, inputValue.length - 1);
}
}
else if (maskExpression === 'separator') {
if (inputValue.match('[a-z]|[A-Z]') || inputValue.match(/[-!$%^&*()_+|~=`{}\[\]:";'<>?,.\/]/)) {

@@ -311,2 +330,7 @@ inputValue = inputValue.substring(0, inputValue.length - 1);

* @type {?}
* @private
*/
MaskApplierService.prototype.persantage;
/**
* @type {?}
* @protected

@@ -316,2 +340,2 @@ */

}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWFzay1hcHBsaWVyLnNlcnZpY2UuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9uZ3gtbWFzay8iLCJzb3VyY2VzIjpbImFwcC9uZ3gtbWFzay9tYXN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5wdXRTeW1ib2wgPSBpbnB1dEFycmF5W2ldKSB7XG4gICAgICAgICAgICAgICAgaWYgKGN1cnNvciA9PT0gbWFza0V4cHJlc3Npb24ubGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAodGhpcy5fY2hlY2tTeW1ib2xNYXNrKGlucHV0U3ltYm9sLCBtYXNrRXhwcmVzc2lvbltjdXJzb3JdKSAmJiBtYXNrRXhwcmVzc2lvbltjdXJzb3IgKyAxXSA9PT0gJz8nKSB7XG4gICAgICAgICAgICAgICAgICAgIHJlc3VsdCArPSBpbnB1dFN5bWJvbDtcbiAgICAgICAgICAgICAgICAgICAgY3Vyc29yICs9IDI7XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChcbiAgICAgICAgICAgICAgICAgICAgbWFza0V4cHJlc3Npb25bY3Vyc29yICsgMV0gPT09ICcqJyAmJiBtdWx0aVxuICAgICAgICAgICAgICAgICAgICAmJiB0aGlzLl9jaGVja1N5bWJvbE1hc2soaW5wdXRTeW1ib2wsIG1hc2tFeHByZXNzaW9uW2N1cnNvciArIDJdKVxuICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICByZXN1bHQgKz0gaW5wdXRTeW1ib2w7XG4gICAgICAgICAgICAgICAgICAgIGN1cnNvciArPSAzO1xuICAgICAgICAgICAgICAgICAgICBtdWx0aSA9IGZhbHNlO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAodGhpcy5fY2hlY2tTeW1ib2xNYXNrKGlucHV0U3ltYm9sLCBtYXNrRXhwcmVzc2lvbltjdXJzb3JdKVxuICAgICAgICAgICAgICAgICAgICAmJiBtYXNrRXhwcmVzc2lvbltjdXJzb3IgKyAxXVxuICAgICAgICAgICAgICAgICAgICA9PT0gJyonKSB7XG4gICAgICAgICAgICAgICAgICAgIHJlc3VsdCArPSBpbnB1dFN5bWJvbDtcbiAgICAgICAgICAgICAgICAgICAgbXVsdGkgPSB0cnVlO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAobWFza0V4cHJlc3Npb25bY3Vyc29yICsgMV0gPT09ICc/JyAmJiB0aGlzLl9jaGVja1N5bWJvbE1hc2soXG4gICAgICAgICAgICAgICAgICAgIGlucHV0U3ltYm9sLFxuICAgICAgICAgICAgICAgICAgICBtYXNrRXhwcmVzc2lvbltjdXJzb3IgKyAyXVxuICAgICAgICAgICAgICAgICkpIHtcbiAgICAgICAgICAgICAgICAgICAgcmVzdWx0ICs9IGlucHV0U3ltYm9sO1xuICAgICAgICAgICAgICAgICAgICBjdXJzb3IgKz0gMztcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHRoaXMuX2NoZWNrU3ltYm9sTWFzayhpbnB1dFN5bWJvbCwgbWFza0V4cHJlc3Npb25bY3Vyc29yXSkpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKG1hc2tFeHByZXNzaW9uW2N1cnNvcl0gPT09ICdIJykge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKE51bWJlcihpbnB1dFN5bWJvbCkgPiAyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzdWx0ICs9IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY3Vyc29yICs9IDE7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3Qgc2hpZnRTdGVwOiBudW1iZXIgPSAvXFwqfFxcPy9nLnRlc3QobWFza0V4cHJlc3Npb24uc2xpY2UoMCwgY3Vyc29yKSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBpbnB1dEFycmF5Lmxlbmd0aFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IGN1cnNvcjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9zaGlmdC5hZGQoc2hpZnRTdGVwICsgdGhpcy5wcmVmaXgubGVuZ3RoIHx8IDApO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGktLTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSBpZiAobWFza0V4cHJlc3Npb25bY3Vyc29yXSA9PT0gJ2gnKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAocmVzdWx0ID09PSAnMicgJiYgTnVtYmVyKGlucHV0U3ltYm9sKSA+IDMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgaWYgKG1hc2tFeHByZXNzaW9uW2N1cnNvcl0gPT09ICdtJykge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKE51bWJlcihpbnB1dFN5bWJvbCkgPiA1KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzdWx0ICs9IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY3Vyc29yICs9IDE7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3Qgc2hpZnRTdGVwOiBudW1iZXIgPSAvXFwqfFxcPy9nLnRlc3QobWFza0V4cHJlc3Npb24uc2xpY2UoMCwgY3Vyc29yKSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBpbnB1dEFycmF5Lmxlbmd0aFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IGN1cnNvcjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9zaGlmdC5hZGQoc2hpZnRTdGVwICsgdGhpcy5wcmVmaXgubGVuZ3RoIHx8IDApO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGktLTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBpZiAobWFza0V4cHJlc3Npb25bY3Vyc29yXSA9PT0gJ3MnKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoTnVtYmVyKGlucHV0U3ltYm9sKSA+IDUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXN1bHQgKz0gMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdXJzb3IgKz0gMTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBzaGlmdFN0ZXA6IG51bWJlciA9IC9cXCp8XFw/L2cudGVzdChtYXNrRXhwcmVzc2lvbi5zbGljZSgwLCBjdXJzb3IpKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IGlucHV0QXJyYXkubGVuZ3RoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogY3Vyc29yO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX3NoaWZ0LmFkZChzaGlmdFN0ZXAgKyB0aGlzLnByZWZpeC5sZW5ndGggfHwgMCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaS0tO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIHJlc3VsdCArPSBpbnB1dFN5bWJvbDtcbiAgICAgICAgICAgICAgICAgICAgY3Vyc29yKys7XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmICh0aGlzLl9jaGVja1N5bWJvbE1hc2soaW5wdXRTeW1ib2wsIG1hc2tFeHByZXNzaW9uW2N1cnNvcl0pKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChtYXNrRXhwcmVzc2lvbltjdXJzb3JdID09PSAnZCcpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChOdW1iZXIoaW5wdXRTeW1ib2wpID4gMykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlc3VsdCArPSAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnNvciArPSAxO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHNoaWZ0U3RlcDogbnVtYmVyID0gL1xcKnxcXD8vZy50ZXN0KG1hc2tFeHByZXNzaW9uLnNsaWNlKDAsIGN1cnNvcikpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gaW5wdXRBcnJheS5sZW5ndGhcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBjdXJzb3I7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5fc2hpZnQuYWRkKHNoaWZ0U3RlcCArIHRoaXMucHJlZml4Lmxlbmd0aCB8fCAwKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpLS07XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgaWYgKG1hc2tFeHByZXNzaW9uW2N1cnNvciAtIDFdID09PSAnZCcpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChOdW1iZXIoaW5wdXRWYWx1ZS5zbGljZShjdXJzb3IgLSAxLCBjdXJzb3IgKyAxKSkgPiAzMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGlmIChtYXNrRXhwcmVzc2lvbltjdXJzb3JdID09PSAnbScpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChOdW1iZXIoaW5wdXRTeW1ib2wpID4gMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlc3VsdCArPSAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnNvciArPSAxO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHNoaWZ0U3RlcDogbnVtYmVyID0gL1xcKnxcXD8vZy50ZXN0KG1hc2tFeHByZXNzaW9uLnNsaWNlKDAsIGN1cnNvcikpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gaW5wdXRBcnJheS5sZW5ndGhcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBjdXJzb3I7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5fc2hpZnQuYWRkKHNoaWZ0U3RlcCArIHRoaXMucHJlZml4Lmxlbmd0aCB8fCAwKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpLS07XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgaWYgKG1hc2tFeHByZXNzaW9uW2N1cnNvciAtIDFdID09PSAnbScpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChOdW1iZXIoaW5wdXRWYWx1ZS5zbGljZShjdXJzb3IgLSAxLCBjdXJzb3IgKyAxKSkgPiAxMikge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIHJlc3VsdCArPSBpbnB1dFN5bWJvbDtcbiAgICAgICAgICAgICAgICAgICAgY3Vyc29yKys7XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmICh0aGlzLm1hc2tTcGVjaWFsQ2hhcmFjdGVycy5pbmRleE9mKG1hc2tFeHByZXNzaW9uW2N1cnNvcl0pICE9PSAtMSkge1xuICAgICAgICAgICAgICAgICAgICByZXN1bHQgKz0gbWFza0V4cHJlc3Npb25bY3Vyc29yXTtcbiAgICAgICAgICAgICAgICAgICAgY3Vyc29yKys7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHNoaWZ0U3RlcDogbnVtYmVyID0gL1xcKnxcXD8vZy50ZXN0KG1hc2tFeHByZXNzaW9uLnNsaWNlKDAsIGN1cnNvcikpXG4gICAgICAgICAgICAgICAgICAgICAgICA/IGlucHV0QXJyYXkubGVuZ3RoXG4gICAgICAgICAgICAgICAgICAgICAgICA6IGN1cnNvcjtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5fc2hpZnQuYWRkKHNoaWZ0U3RlcCArIHRoaXMucHJlZml4Lmxlbmd0aCB8fCAwKTtcbiAgICAgICAgICAgICAgICAgICAgaS0tO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAodGhpcy5tYXNrU3BlY2lhbENoYXJhY3RlcnMuaW5kZXhPZihpbnB1dFN5bWJvbCkgPiAtMVxuICAgICAgICAgICAgICAgICAgICAmJiB0aGlzLm1hc2tBdmFpbGFibGVQYXR0ZXJuc1ttYXNrRXhwcmVzc2lvbltjdXJzb3JdXVxuICAgICAgICAgICAgICAgICAgICAmJiB0aGlzLm1hc2tBdmFpbGFibGVQYXR0ZXJuc1ttYXNrRXhwcmVzc2lvbltjdXJzb3JdXS5vcHRpb25hbCkge1xuICAgICAgICAgICAgICAgICAgICBjdXJzb3IrKztcbiAgICAgICAgICAgICAgICAgICAgaS0tO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoKHRoaXMubWFza0V4cHJlc3Npb25bY3Vyc29yICsgMV0gPT09ICcqJylcbiAgICAgICAgICAgICAgICAgICAgJiYgKHRoaXMuX2ZpbmRTcGVjaWFsQ2hhcih0aGlzLm1hc2tFeHByZXNzaW9uW2N1cnNvciArIDJdKSlcbiAgICAgICAgICAgICAgICAgICAgJiYgKHRoaXMuX2ZpbmRTcGVjaWFsQ2hhcihpbnB1dFN5bWJvbCkgPT09IHRoaXMubWFza0V4cHJlc3Npb25bY3Vyc29yICsgMl0pICYmIG11bHRpKSB7XG4gICAgICAgICAgICAgICAgICAgIGN1cnNvciArPSAzO1xuICAgICAgICAgICAgICAgICAgICByZXN1bHQgKz0gaW5wdXRTeW1ib2w7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGlmIChyZXN1bHQubGVuZ3RoICsgMSA9PT0gbWFza0V4cHJlc3Npb24ubGVuZ3RoXG4gICAgICAgICAgICAmJiB0aGlzLm1hc2tTcGVjaWFsQ2hhcmFjdGVycy5pbmRleE9mKG1hc2tFeHByZXNzaW9uW21hc2tFeHByZXNzaW9uLmxlbmd0aCAtIDFdKSAhPT0gLTEpIHtcbiAgICAgICAgICAgIHJlc3VsdCArPSBtYXNrRXhwcmVzc2lvblttYXNrRXhwcmVzc2lvbi5sZW5ndGggLSAxXTtcbiAgICAgICAgfVxuXG5cbiAgICAgICAgbGV0IHNoaWZ0OiBudW1iZXIgPSAxO1xuICAgICAgICBsZXQgbmV3UG9zaXRpb246IG51bWJlciA9IHBvc2l0aW9uICsgMTtcblxuICAgICAgICB3aGlsZSAodGhpcy5fc2hpZnQuaGFzKG5ld1Bvc2l0aW9uKSkge1xuICAgICAgICAgICAgc2hpZnQrKztcbiAgICAgICAgICAgIG5ld1Bvc2l0aW9uKys7XG4gICAgICAgIH1cblxuICAgICAgICBjYih0aGlzLl9zaGlmdC5oYXMocG9zaXRpb24pID8gc2hpZnQgOiAwKTtcbiAgICAgICAgbGV0IHJlczogc3RyaW5nID0gYCR7dGhpcy5wcmVmaXh9JHtyZXN1bHR9YDtcbiAgICAgICAgcmVzID0gdGhpcy5zdWZpeCA/IGAke3RoaXMucHJlZml4fSR7cmVzdWx0fSR7dGhpcy5zdWZpeH1gIDogYCR7dGhpcy5wcmVmaXh9JHtyZXN1bHR9YDtcbiAgICAgICAgaWYgKHJlc3VsdC5sZW5ndGggPT09IDApIHtcbiAgICAgICAgICAgIHJlcyA9IGAke3RoaXM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AgICAgICAgY29uc3Qgc3RyRm9yU2VwOiBzdHJpbmcgPSBpbnB1dFZhbHVlLnJlcGxhY2UoL1xccy9nLCAnJyk7XG4gICAgICAgICAgICByZXN1bHQgPSB0aGlzLnNlcGFyYXRvcihzdHJGb3JTZXApO1xuICAgICAgICAgICAgcG9zaXRpb24gPSByZXN1bHQubGVuZ3RoICsgMTtcbiAgICAgICAgICAgIGN1cnNvciA9IHBvc2l0aW9uO1xuICAgICAgICAgICAgY29uc3Qgc2hpZnRTdGVwOiBudW1iZXIgPSAvXFwqfFxcPy9nLnRlc3QobWFza0V4cHJlc3Npb24uc2xpY2UoMCwgY3Vyc29yKSlcbiAgICAgICAgICAgICAgICA/IGlucHV0QXJyYXkubGVuZ3RoXG4gICAgICAgICAgICAgICAgOiBjdXJzb3I7XG4gICAgICAgICAgICB0aGlzLl9zaGlmdC5hZGQoc2hpZnRTdGVwICsgdGhpcy5wcmVmaXgubGVuZ3RoIHx8IDApO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgLy8gdHNsaW50OmRpc2FibGUtbmV4dC1saW5lXG4gICAgICAgICAgICBmb3IgKGxldCBpOiBudW1iZXIgPSAwLCBpbnB1dFN5bWJvbDogc3RyaW5nID0gaW5wdXRBcnJheVswXTsgaVxuICAgICAgICAgICAgICAgIDwgaW5wdXRBcnJheS5sZW5ndGg7IGkrKyAsIGlucHV0U3ltYm9sID0gaW5wdXRBcnJheVtpXSkge1xuICAgICAgICAgICAgICAgIGlmIChjdXJzb3IgPT09IG1hc2tFeHByZXNzaW9uLmxlbmd0aCkge1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKHRoaXMuX2NoZWNrU3ltYm9sTWFzayhpbnB1dFN5bWJvbCwgbWFza0V4cHJlc3Npb25bY3Vyc29yXSkgJiYgbWFza0V4cHJlc3Npb25bY3Vyc29yICsgMV0gPT09ICc/Jykge1xuICAgICAgICAgICAgICAgICAgICByZXN1bHQgKz0gaW5wdXRTeW1ib2w7XG4gICAgICAgICAgICAgICAgICAgIGN1cnNvciArPSAyO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoXG4gICAgICAgICAgICAgICAgICAgIG1hc2tFeHByZXNzaW9uW2N1cnNvciArIDFdID09PSAnKicgJiYgbXVsdGlcbiAgICAgICAgICAgICAgICAgICAgJiYgdGhpcy5fY2hlY2tTeW1ib2xNYXNrKGlucHV0U3ltYm9sLCBtYXNrRXhwcmVzc2lvbltjdXJzb3IgKyAyXSlcbiAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgcmVzdWx0ICs9IGlucHV0U3ltYm9sO1xuICAgICAgICAgICAgICAgICAgICBjdXJzb3IgKz0gMztcbiAgICAgICAgICAgICAgICAgICAgbXVsdGkgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHRoaXMuX2NoZWNrU3ltYm9sTWFzayhpbnB1dFN5bWJvbCwgbWFza0V4cHJlc3Npb25bY3Vyc29yXSlcbiAgICAgICAgICAgICAgICAgICAgJiYgbWFza0V4cHJlc3Npb25bY3Vyc29yICsgMV1cbiAgICAgICAgICAgICAgICAgICAgPT09ICcqJykge1xuICAgICAgICAgICAgICAgICAgICByZXN1bHQgKz0gaW5wdXRTeW1ib2w7XG4gICAgICAgICAgICAgICAgICAgIG11bHRpID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKG1hc2tFeHByZXNzaW9uW2N1cnNvciArIDFdID09PSAnPycgJiYgdGhpcy5fY2hlY2tTeW1ib2xNYXNrKFxuICAgICAgICAgICAgICAgICAgICBpbnB1dFN5bWJvbCxcbiAgICAgICAgICAgICAgICAgICAgbWFza0V4cHJlc3Npb25bY3Vyc29yICsgMl1cbiAgICAgICAgICAgICAgICApKSB7XG4gICAgICAgICAgICAgICAgICAgIHJlc3VsdCArPSBpbnB1dFN5bWJvbDtcbiAgICAgICAgICAgICAgICAgICAgY3Vyc29yICs9IDM7XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmICh0aGlzLl9jaGVja1N5bWJvbE1hc2soaW5wdXRTeW1ib2wsIG1hc2tFeHByZXNzaW9uW2N1cnNvcl0pKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChtYXNrRXhwcmVzc2lvbltjdXJzb3JdID09PSAnSCcpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChOdW1iZXIoaW5wdXRTeW1ib2wpID4gMikge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlc3VsdCArPSAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnNvciArPSAxO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHNoaWZ0U3RlcDogbnVtYmVyID0gL1xcKnxcXD8vZy50ZXN0KG1hc2tFeHByZXNzaW9uLnNsaWNlKDAsIGN1cnNvcikpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gaW5wdXRBcnJheS5sZW5ndGhcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBjdXJzb3I7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5fc2hpZnQuYWRkKHNoaWZ0U3RlcCArIHRoaXMucHJlZml4Lmxlbmd0aCB8fCAwKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpLS07XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0gaWYgKG1hc2tFeHByZXNzaW9uW2N1cnNvcl0gPT09ICdoJykge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHJlc3VsdCA9PT0gJzInICYmIE51bWJlcihpbnB1dFN5bWJvbCkgPiAzKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgaWYgKG1hc2tFeHByZXNzaW9uW2N1cnNvcl0gPT09ICdtJykge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKE51bWJlcihpbnB1dFN5bWJvbCkgPiA1KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzdWx0ICs9IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY3Vyc29yICs9IDE7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3Qgc2hpZnRTdGVwOiBudW1iZXIgPSAvXFwqfFxcPy9nLnRlc3QobWFza0V4cHJlc3Npb24uc2xpY2UoMCwgY3Vyc29yKSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBpbnB1dEFycmF5Lmxlbmd0aFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IGN1cnNvcjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9zaGlmdC5hZGQoc2hpZnRTdGVwICsgdGhpcy5wcmVmaXgubGVuZ3RoIHx8IDApO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGktLTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBpZiAobWFza0V4cHJlc3Npb25bY3Vyc29yXSA9PT0gJ3MnKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoTnVtYmVyKGlucHV0U3ltYm9sKSA+IDUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXN1bHQgKz0gMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdXJzb3IgKz0gMTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBzaGlmdFN0ZXA6IG51bWJlciA9IC9cXCp8XFw/L2cudGVzdChtYXNrRXhwcmVzc2lvbi5zbGljZSgwLCBjdXJzb3IpKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IGlucHV0QXJyYXkubGVuZ3RoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogY3Vyc29yO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX3NoaWZ0LmFkZChzaGlmdFN0ZXAgKyB0aGlzLnByZWZpeC5sZW5ndGggfHwgMCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaS0tO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIHJlc3VsdCArPSBpbnB1dFN5bWJvbDtcbiAgICAgICAgICAgICAgICAgICAgY3Vyc29yKys7XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmICh0aGlzLl9jaGVja1N5bWJvbE1hc2soaW5wdXRTeW1ib2wsIG1hc2tFeHByZXNzaW9uW2N1cnNvcl0pKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChtYXNrRXhwcmVzc2lvbltjdXJzb3JdID09PSAnZCcpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChOdW1iZXIoaW5wdXRTeW1ib2wpID4gMykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlc3VsdCArPSAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnNvciArPSAxO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHNoaWZ0U3RlcDogbnVtYmVyID0gL1xcKnxcXD8vZy50ZXN0KG1hc2tFeHByZXNzaW9uLnNsaWNlKDAsIGN1cnNvcikpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gaW5wdXRBcnJheS5sZW5ndGhcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBjdXJzb3I7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5fc2hpZnQuYWRkKHNoaWZ0U3RlcCArIHRoaXMucHJlZml4Lmxlbmd0aCB8fCAwKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpLS07XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgaWYgKG1hc2tFeHByZXNzaW9uW2N1cnNvciAtIDFdID09PSAnZCcpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChOdW1iZXIoaW5wdXRWYWx1ZS5zbGljZShjdXJzb3IgLSAxLCBjdXJzb3IgKyAxKSkgPiAzMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGlmIChtYXNrRXhwcmVzc2lvbltjdXJzb3JdID09PSAnbScpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChOdW1iZXIoaW5wdXRTeW1ib2wpID4gMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlc3VsdCArPSAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnNvciArPSAxO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHNoaWZ0U3RlcDogbnVtYmVyID0gL1xcKnxcXD8vZy50ZXN0KG1hc2tFeHByZXNzaW9uLnNsaWNlKDAsIGN1cnNvcikpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gaW5wdXRBcnJheS5sZW5ndGhcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBjdXJzb3I7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5fc2hpZnQuYWRkKHNoaWZ0U3RlcCArIHRoaXMucHJlZml4Lmxlbmd0aCB8fCAwKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpLS07XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgaWYgKG1hc2tFeHByZXNzaW9uW2N1cnNvciAtIDFdID09PSAnbScpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChOdW1iZXIoaW5wdXRWYWx1ZS5zbGljZShjdXJzb3IgLSAxLCBjdXJzb3IgKyAxKSkgPiAxMikge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIHJlc3VsdCArPSBpbnB1dFN5bWJvbDtcbiAgICAgICAgICAgICAgICAgICAgY3Vyc29yKys7XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmICh0aGlzLm1hc2tTcGVjaWFsQ2hhcmFjdGVycy5pbmRleE9mKG1hc2tFeHByZXNzaW9uW2N1cnNvcl0pICE9PSAtMSkge1xuICAgICAgICAgICAgICAgICAgICByZXN1bHQgKz0gbWFza0V4cHJlc3Npb25bY3Vyc29yXTtcbiAgICAgICAgICAgICAgICAgICAgY3Vyc29yKys7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHNoaWZ0U3RlcDogbnVtYmVyID0gL1xcKnxcXD8vZy50ZXN0KG1hc2tFeHByZXNzaW9uLnNsaWNlKDAsIGN1cnNvcikpXG4gICAgICAgICAgICAgICAgICAgICAgICA/IGlucHV0QXJyYXkubGVuZ3RoXG4gICAgICAgICAgICAgICAgICAgICAgICA6IGN1cnNvcjtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5fc2hpZnQuYWRkKHNoaWZ0U3RlcCArIHRoaXMucHJlZml4Lmxlbmd0aCB8fCAwKTtcbiAgICAgICAgICAgICAgICAgICAgaS0tO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAodGhpcy5tYXNrU3BlY2lhbENoYXJhY3RlcnMuaW5kZXhPZihpbnB1dFN5bWJvbCkgPiAtMVxuICAgICAgICAgICAgICAgICAgICAmJiB0aGlzLm1hc2tBdmFpbGFibGVQYXR0ZXJuc1ttYXNrRXhwcmVzc2lvbltjdXJzb3JdXVxuICAgICAgICAgICAgICAgICAgICAmJiB0aGlzLm1hc2tBdmFpbGFibGVQYXR0ZXJuc1ttYXNrRXhwcmVzc2lvbltjdXJzb3JdXS5vcHRpb25hbCkge1xuICAgICAgICAgICAgICAgICAgICBjdXJzb3IrKztcbiAgICAgICAgICAgICAgICAgICAgaS0tO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoKHRoaXMubWFza0V4cHJlc3Npb25bY3Vyc29yICsgMV0gPT09ICcqJylcbiAgICAgICAgICAgICAgICAgICAgJiYgKHRoaXMuX2ZpbmRTcGVjaWFsQ2hhcih0aGlzLm1hc2tFeHByZXNzaW9uW2N1cnNvciArIDJdKSlcbiAgICAgICAgICAgICAgICAgICAgJiYgKHRoaXMuX2ZpbmRTcGVjaWFsQ2hhcihpbnB1dFN5bWJvbCkgPT09IHRoaXMubWFza0V4cHJlc3Npb25bY3Vyc29yICsgMl0pICYmIG11bHRpKSB7XG4gICAgICAgICAgICAgICAgICAgIGN1cnNvciArPSAzO1xuICAgICAgICAgICAgICAgICAgICByZXN1bHQgKz0gaW5wdXRTeW1ib2w7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGlmIChyZXN1bHQubGVuZ3RoICsgMSA9PT0gbWFza0V4cHJlc3Npb24ubGVuZ3RoXG4gICAgICAgICAgICAmJiB0aGlzLm1hc2tTcGVjaWFsQ2hhcmFjdGVycy5pbmRleE9mKG1hc2tFeHByZXNzaW9uW21hc2tFeHByZX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cpOiBzdHJpbmcge1xuICAgIHJldHVybiBtYXNrRXhwLm1hdGNoKC97WzAtOV0rfS8pXG4gICAgICAmJiBtYXNrRXhwLnNwbGl0KCcnKVxuICAgICAgICAucmVkdWNlKChhY2N1bTogc3RyaW5nLCBjdXJydmFsOiBzdHJpbmcsIGluZGV4OiBudW1iZXIpOiBzdHJpbmcgPT4ge1xuICAgICAgICAgIHRoaXMuX3N0YXJ0ID0gKGN1cnJ2YWwgPT09ICd7JykgPyBpbmRleCA6IHRoaXMuX3N0YXJ0O1xuXG4gICAgICAgICAgaWYgKGN1cnJ2YWwgIT09ICd9Jykge1xuICAgICAgICAgICAgcmV0dXJuIHRoaXMuX21hc2tTZXJ2aWNlLl9maW5kU3BlY2lhbENoYXIoY3VycnZhbCkgPyBhY2N1bSArIGN1cnJ2YWwgOiBhY2N1bTtcbiAgICAgICAgICB9XG4gICAgICAgICAgdGhpcy5fZW5kID0gaW5kZXg7XG4gICAgICAgICAgY29uc3QgcmVwZWF0TnVtYmVyOiBudW1iZXIgPSBOdW1iZXIobWFza0V4cFxuICAgICAgICAgICAgLnNsaWNlKHRoaXMuX3N0YXJ0ICsgMSwgdGhpcy5fZW5kKSk7XG4gICAgICAgICAgY29uc3QgcmVwYWNlV2l0aDogc3RyaW5nID0gbmV3IEFycmF5KHJlcGVhdE51bWJlciArIDEpXG4gICAgICAgICAgICAuam9pbihtYXNrRXhwW3RoaXMuX3N0YXJ0IC0gMV0pO1xuICAgICAgICAgIHJldHVybiBhY2N1bSArIHJlcGFjZVdpdGg7XG4gICAgICAgIH0sICcnKSB8fCBtYXNrRXhwO1xuICB9XG5cbn1cbiJdfQ==
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWFzay5kaXJlY3RpdmUuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9uZ3gtbWFzay8iLCJzb3VyY2VzIjpbImFwcC9uZ3gtbWFzay9tYXNrLmRpcmVjdGl2ZS50cyJdLCJuY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YFxcXFwke2l0ZW19YCkuam9pbignfCcpLFxuICAgICAgJ2dpJ1xuICAgICk7XG4gIH1cbn0iXX0=

@@ -25,2 +25,10 @@ /**

};
this.persantage = function (str) {
if (Number(str) >= 0 && Number(str) <= 100) {
return true;
}
else {
return false;
}
};
this._shift = new Set();

@@ -87,3 +95,14 @@ this.maskSpecialCharacters = (/** @type {?} */ (this._config)).specialCharacters;

.split('');
if (maskExpression === 'separator') {
if (maskExpression === 'percent') {
if (inputValue.match('[a-z]|[A-Z]') || inputValue.match(/[-!$%^&*()_+|~=`{}\[\]:";'<>?,\/]/)) {
inputValue = inputValue.substring(0, inputValue.length - 1);
}
if (this.persantage(inputValue)) {
result = inputValue;
}
else {
result = inputValue.substring(0, inputValue.length - 1);
}
}
else if (maskExpression === 'separator') {
if (inputValue.match('[a-z]|[A-Z]') || inputValue.match(/[-!$%^&*()_+|~=`{}\[\]:";'<>?,.\/]/)) {

@@ -338,2 +357,7 @@ inputValue = inputValue.substring(0, inputValue.length - 1);

* @type {?}
* @private
*/
MaskApplierService.prototype.persantage;
/**
* @type {?}
* @protected

@@ -343,2 +367,2 @@ */

}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWFzay1hcHBsaWVyLnNlcnZpY2UuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9uZ3gtbWFzay8iLCJzb3VyY2VzIjpbImFwcC9uZ3gtbWFzay9tYXNrLWFwcGxpZXIuc2VydmljZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztBQUFBLE9BQU8sRUFBRSxNQUFNLEVBQUUsVUFBVSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQ25ELE9BQU8sRUFBRSxNQUFNLEVBQVcsTUFBTSxVQUFVLENBQUM7QUFFM0M7SUFlSSw0QkFDOEIsT0FBZ0I7UUFBaEIsWUFBTyxHQUFQLE9BQU8sQ0FBUztRQVZ2QyxtQkFBYyxHQUFXLEVBQUUsQ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H1cbiAgICAgICAgICAgICAgICBpZiAodGhpcy5fY2hlY2tTeW1ib2xNYXNrKGlucHV0U3ltYm9sLCBtYXNrRXhwcmVzc2lvbltjdXJzb3JdKSAmJiBtYXNrRXhwcmVzc2lvbltjdXJzb3IgKyAxXSA9PT0gJz8nKSB7XG4gICAgICAgICAgICAgICAgICAgIHJlc3VsdCArPSBpbnB1dFN5bWJvbDtcbiAgICAgICAgICAgICAgICAgICAgY3Vyc29yICs9IDI7XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChcbiAgICAgICAgICAgICAgICAgICAgbWFza0V4cHJlc3Npb25bY3Vyc29yICsgMV0gPT09ICcqJyAmJiBtdWx0aVxuICAgICAgICAgICAgICAgICAgICAmJiB0aGlzLl9jaGVja1N5bWJvbE1hc2soaW5wdXRTeW1ib2wsIG1hc2tFeHByZXNzaW9uW2N1cnNvciArIDJdKVxuICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICByZXN1bHQgKz0gaW5wdXRTeW1ib2w7XG4gICAgICAgICAgICAgICAgICAgIGN1cnNvciArPSAzO1xuICAgICAgICAgICAgICAgICAgICBtdWx0aSA9IGZhbHNlO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAodGhpcy5fY2hlY2tTeW1ib2xNYXNrKGlucHV0U3ltYm9sLCBtYXNrRXhwcmVzc2lvbltjdXJzb3JdKVxuICAgICAgICAgICAgICAgICAgICAmJiBtYXNrRXhwcmVzc2lvbltjdXJzb3IgKyAxXVxuICAgICAgICAgICAgICAgICAgICA9PT0gJyonKSB7XG4gICAgICAgICAgICAgICAgICAgIHJlc3VsdCArPSBpbnB1dFN5bWJvbDtcbiAgICAgICAgICAgICAgICAgICAgbXVsdGkgPSB0cnVlO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAobWFza0V4cHJlc3Npb25bY3Vyc29yICsgMV0gPT09ICc/JyAmJiB0aGlzLl9jaGVja1N5bWJvbE1hc2soXG4gICAgICAgICAgICAgICAgICAgIGlucHV0U3ltYm9sLFxuICAgICAgICAgICAgICAgICAgICBtYXNrRXhwcmVzc2lvbltjdXJzb3IgKyAyXVxuICAgICAgICAgICAgICAgICkpIHtcbiAgICAgICAgICAgICAgICAgICAgcmVzdWx0ICs9IGlucHV0U3ltYm9sO1xuICAgICAgICAgICAgICAgICAgICBjdXJzb3IgKz0gMztcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHRoaXMuX2NoZWNrU3ltYm9sTWFzayhpbnB1dFN5bWJvbCwgbWFza0V4cHJlc3Npb25bY3Vyc29yXSkpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKG1hc2tFeHByZXNzaW9uW2N1cnNvcl0gPT09ICdIJykge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKE51bWJlcihpbnB1dFN5bWJvbCkgPiAyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzdWx0ICs9IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY3Vyc29yICs9IDE7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3Qgc2hpZnRTdGVwOiBudW1iZXIgPSAvXFwqfFxcPy9nLnRlc3QobWFza0V4cHJlc3Npb24uc2xpY2UoMCwgY3Vyc29yKSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBpbnB1dEFycmF5Lmxlbmd0aFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IGN1cnNvcjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9zaGlmdC5hZGQoc2hpZnRTdGVwICsgdGhpcy5wcmVmaXgubGVuZ3RoIHx8IDApO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGktLTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSBpZiAobWFza0V4cHJlc3Npb25bY3Vyc29yXSA9PT0gJ2gnKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAocmVzdWx0ID09PSAnMicgJiYgTnVtYmVyKGlucHV0U3ltYm9sKSA+IDMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgaWYgKG1hc2tFeHByZXNzaW9uW2N1cnNvcl0gPT09ICdtJykge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKE51bWJlcihpbnB1dFN5bWJvbCkgPiA1KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzdWx0ICs9IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY3Vyc29yICs9IDE7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3Qgc2hpZnRTdGVwOiBudW1iZXIgPSAvXFwqfFxcPy9nLnRlc3QobWFza0V4cHJlc3Npb24uc2xpY2UoMCwgY3Vyc29yKSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBpbnB1dEFycmF5Lmxlbmd0aFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IGN1cnNvcjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9zaGlmdC5hZGQoc2hpZnRTdGVwICsgdGhpcy5wcmVmaXgubGVuZ3RoIHx8IDApO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGktLTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBpZiAobWFza0V4cHJlc3Npb25bY3Vyc29yXSA9PT0gJ3MnKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoTnVtYmVyKGlucHV0U3ltYm9sKSA+IDUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXN1bHQgKz0gMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdXJzb3IgKz0gMTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBzaGlmdFN0ZXA6IG51bWJlciA9IC9cXCp8XFw/L2cudGVzdChtYXNrRXhwcmVzc2lvbi5zbGljZSgwLCBjdXJzb3IpKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IGlucHV0QXJyYXkubGVuZ3RoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogY3Vyc29yO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX3NoaWZ0LmFkZChzaGlmdFN0ZXAgKyB0aGlzLnByZWZpeC5sZW5ndGggfHwgMCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaS0tO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIHJlc3VsdCArPSBpbnB1dFN5bWJvbDtcbiAgICAgICAgICAgICAgICAgICAgY3Vyc29yKys7XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmICh0aGlzLl9jaGVja1N5bWJvbE1hc2soaW5wdXRTeW1ib2wsIG1hc2tFeHByZXNzaW9uW2N1cnNvcl0pKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChtYXNrRXhwcmVzc2lvbltjdXJzb3JdID09PSAnZCcpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChOdW1iZXIoaW5wdXRTeW1ib2wpID4gMykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlc3VsdCArPSAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnNvciArPSAxO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHNoaWZ0U3RlcDogbnVtYmVyID0gL1xcKnxcXD8vZy50ZXN0KG1hc2tFeHByZXNzaW9uLnNsaWNlKDAsIGN1cnNvcikpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gaW5wdXRBcnJheS5sZW5ndGhcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBjdXJzb3I7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5fc2hpZnQuYWRkKHNoaWZ0U3RlcCArIHRoaXMucHJlZml4Lmxlbmd0aCB8fCAwKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpLS07XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgaWYgKG1hc2tFeHByZXNzaW9uW2N1cnNvciAtIDFdID09PSAnZCcpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChOdW1iZXIoaW5wdXRWYWx1ZS5zbGljZShjdXJzb3IgLSAxLCBjdXJzb3IgKyAxKSkgPiAzMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGlmIChtYXNrRXhwcmVzc2lvbltjdXJzb3JdID09PSAnbScpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChOdW1iZXIoaW5wdXRTeW1ib2wpID4gMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlc3VsdCArPSAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnNvciArPSAxO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHNoaWZ0U3RlcDogbnVtYmVyID0gL1xcKnxcXD8vZy50ZXN0KG1hc2tFeHByZXNzaW9uLnNsaWNlKDAsIGN1cnNvcikpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gaW5wdXRBcnJheS5sZW5ndGhcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBjdXJzb3I7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5fc2hpZnQuYWRkKHNoaWZ0U3RlcCArIHRoaXMucHJlZml4Lmxlbmd0aCB8fCAwKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpLS07XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgaWYgKG1hc2tFeHByZXNzaW9uW2N1cnNvciAtIDFdID09PSAnbScpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChOdW1iZXIoaW5wdXRWYWx1ZS5zbGljZShjdXJzb3IgLSAxLCBjdXJzb3IgKyAxKSkgPiAxMikge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIHJlc3VsdCArPSBpbnB1dFN5bWJvbDtcbiAgICAgICAgICAgICAgICAgICAgY3Vyc29yKys7XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmICh0aGlzLm1hc2tTcGVjaWFsQ2hhcmFjdGVycy5pbmRleE9mKG1hc2tFeHByZXNzaW9uW2N1cnNvcl0pICE9PSAtMSkge1xuICAgICAgICAgICAgICAgICAgICByZXN1bHQgKz0gbWFza0V4cHJlc3Npb25bY3Vyc29yXTtcbiAgICAgICAgICAgICAgICAgICAgY3Vyc29yKys7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHNoaWZ0U3RlcDogbnVtYmVyID0gL1xcKnxcXD8vZy50ZXN0KG1hc2tFeHByZXNzaW9uLnNsaWNlKDAsIGN1cnNvcikpXG4gICAgICAgICAgICAgICAgICAgICAgICA/IGlucHV0QXJyYXkubGVuZ3RoXG4gICAgICAgICAgICAgICAgICAgICAgICA6IGN1cnNvcjtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5fc2hpZnQuYWRkKHNoaWZ0U3RlcCArIHRoaXMucHJlZml4Lmxlbmd0aCB8fCAwKTtcbiAgICAgICAgICAgICAgICAgICAgaS0tO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAodGhpcy5tYXNrU3BlY2lhbENoYXJhY3RlcnMuaW5kZXhPZihpbnB1dFN5bWJvbCkgPiAtMVxuICAgICAgICAgICAgICAgICAgICAmJiB0aGlzLm1hc2tBdmFpbGFibGVQYXR0ZXJuc1ttYXNrRXhwcmVzc2lvbltjdXJzb3JdXVxuICAgICAgICAgICAgICAgICAgICAmJiB0aGlzLm1hc2tBdmFpbGFibGVQYXR0ZXJuc1ttYXNrRXhwcmVzc2lvbltjdXJzb3JdXS5vcHRpb25hbCkge1xuICAgICAgICAgICAgICAgICAgICBjdXJzb3IrKztcbiAgICAgICAgICAgICAgICAgICAgaS0tO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoKHRoaXMubWFza0V4cHJlc3Npb25bY3Vyc29yICsgMV0gPT09ICcqJylcbiAgICAgICAgICAgICAgICAgICAgJiYgKHRoaXMuX2ZpbmRTcGVjaWFsQ2hhcih0aGlzLm1hc2tFeHByZXNzaW9uW2N1cnNvciArIDJdKSlcbiAgICAgICAgICAgICAgICAgICAgJiYgKHRoaXMuX2ZpbmRTcGVjaWFsQ2hhcihpbnB1dFN5bWJvbCkgPT09IHRoaXMubWFza0V4cHJlc3Npb25bY3Vyc29yICsgMl0pICYmIG11bHRpKSB7XG4gICAgICAgICAgICAgICAgICAgIGN1cnNvciArPSAzO1xuICAgICAgICAgICAgICAgICAgICByZXN1bHQgKz0gaW5wdXRTeW1ib2w7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxu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uICAgICAgICBjb25zdCBpbnB1dEFycmF5OiBzdHJpbmdbXSA9IGlucHV0VmFsdWUudG9TdHJpbmcoKVxuICAgICAgICAgICAgLnNwbGl0KCcnKTtcbiAgICAgICAgaWYgKG1hc2tFeHByZXNzaW9uID09PSAncGVyY2VudCcpIHtcbiAgICAgICAgICAgIGlmIChpbnB1dFZhbHVlLm1hdGNoKCdbYS16XXxbQS1aXScpIHx8IGlucHV0VmFsdWUubWF0Y2goL1stISQlXiYqKClfK3x+PWB7fVxcW1xcXTpcIjsnPD4/LFxcL10vKSkge1xuICAgICAgICAgICAgICAgIGlucHV0VmFsdWUgPSBpbnB1dFZhbHVlLnN1YnN0cmluZygwLCBpbnB1dFZhbHVlLmxlbmd0aCAtIDEpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKHRoaXMucGVyc2FudGFnZShpbnB1dFZhbHVlKSkge1xuICAgICAgICAgICAgICAgIHJlc3VsdCA9IGlucHV0VmFsdWU7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHJlc3VsdCA9IGlucHV0VmFsdWUuc3Vic3RyaW5nKDAsIGlucHV0VmFsdWUubGVuZ3RoIC0gMSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSBpZiAobWFza0V4cHJlc3Npb24gPT09ICdzZXBhcmF0b3InKSB7XG4gICAgICAgICAgICBpZiAoaW5wdXRWYWx1ZS5tYXRjaCgnW2Etel18W0EtWl0nKSB8fCBpbnB1dFZhbHVlLm1hdGNoKC9bLSEkJV4mKigpXyt8fj1ge31cXFtcXF06XCI7Jzw+PywuXFwvXS8pKSB7XG4gICAgICAgICAgICAgICAgaW5wdXRWYWx1ZSA9IGlucHV0VmFsdWUuc3Vic3RyaW5nKDAsIGlucHV0VmFsdWUubGVuZ3RoIC0gMSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjb25zdCBzdHJGb3JTZXA6IHN0cmluZyA9IGlucHV0VmFsdWUucmVw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iAgICAgICAgICAgICAgICAgICAgY3Vyc29yICs9IDI7XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChcbiAgICAgICAgICAgICAgICAgICAgbWFza0V4cHJlc3Npb25bY3Vyc29yICsgMV0gPT09ICcqJyAmJiBtdWx0aVxuICAgICAgICAgICAgICAgICAgICAmJiB0aGlzLl9jaGVja1N5bWJvbE1hc2soaW5wdXRTeW1ib2wsIG1hc2tFeHByZXNzaW9uW2N1cnNvciArIDJdKVxuICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICByZXN1bHQgKz0gaW5wdXRTeW1ib2w7XG4gICAgICAgICAgICAgICAgICAgIGN1cnNvciArPSAzO1xuICAgICAgICAgICAgICAgICAgICBtdWx0aSA9IGZhbHNlO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAodGhpcy5fY2hlY2tTeW1ib2xNYXNrKGlucHV0U3ltYm9sLCBtYXNrRXhwcmVzc2lvbltjdXJzb3JdKVxuICAgICAgICAgICAgICAgICAgICAmJiBtYXNrRXhwcmVzc2lvbltjdXJzb3IgKyAxXVxuICAgICAgICAgICAgICAgICAgICA9PT0gJyonKSB7XG4gICAgICAgICAgICAgICAgICAgIHJlc3VsdCArPSBpbnB1dFN5bWJvbDtcbiAgICAgICAgICAgICAgICAgICAgbXVsdGkgPSB0cnVlO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAobWFza0V4cHJlc3Npb25bY3Vyc29yICsgMV0gPT09ICc/JyAmJiB0aGlzLl9jaGVja1N5bWJvbE1hc2soXG4gICAgICAgICAgICAgICAgICAgIGlucHV0U3ltYm9sLFxuICAgICAgICAgICAgICAgICAgICBtYXNrRXhwcmVzc2lvbltjdXJzb3IgKyAyXVxuICAgICAgICAgICAgICAgICkpIHtcbiAgICAgICAgICAgICAgICAgICAgcmVzdWx0ICs9IGlucHV0U3ltYm9sO1xuICAgICAgICAgICAgICAgICAgICBjdXJzb3IgKz0gMztcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHRoaXMuX2NoZWNrU3ltYm9sTWFzayhpbnB1dFN5bWJvbCwgbWFza0V4cHJlc3Npb25bY3Vyc29yXSkpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKG1hc2tFeHByZXNzaW9uW2N1cnNvcl0gPT09ICdIJykge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKE51bWJlcihpbnB1dFN5bWJvbCkgPiAyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzdWx0ICs9IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY3Vyc29yICs9IDE7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3Qgc2hpZnRTdGVwOiBudW1iZXIgPSAvXFwqfFxcPy9nLnRlc3QobWFza0V4cHJlc3Npb24uc2xpY2UoMCwgY3Vyc29yKSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBpbnB1dEFycmF5Lmxlbmd0aFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IGN1cnNvcjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9zaGlmdC5hZGQoc2hpZnRTdGVwICsgdGhpcy5wcmVmaXgubGVuZ3RoIHx8IDApO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGktLTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSBpZiAobWFza0V4cHJlc3Npb25bY3Vyc29yXSA9PT0gJ2gnKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAocmVzdWx0ID09PSAnMicgJiYgTnVtYmVyKGlucHV0U3ltYm9sKSA+IDMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBpZiAobWFza0V4cHJlc3Npb25bY3Vyc29yXSA9PT0gJ20nKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoTnVtYmVyKGlucHV0U3ltYm9sKSA+IDUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXN1bHQgKz0gMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdXJzb3IgKz0gMTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBzaGlmdFN0ZXA6IG51bWJlciA9IC9cXCp8XFw/L2cudGVzdChtYXNrRXhwcmVzc2lvbi5zbGljZSgwLCBjdXJzb3IpKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IGlucHV0QXJyYXkubGVuZ3RoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogY3Vyc29yO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX3NoaWZ0LmFkZChzaGlmdFN0ZXAgKyB0aGlzLnByZWZpeC5sZW5ndGggfHwgMCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaS0tO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGlmIChtYXNrRXhwcmVzc2lvbltjdXJzb3JdID09PSAncycpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChOdW1iZXIoaW5wdXRTeW1ib2wpID4gNSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlc3VsdCArPSAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnNvciArPSAxO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHNoaWZ0U3RlcDogbnVtYmVyID0gL1xcKnxcXD8vZy50ZXN0KG1hc2tFeHByZXNzaW9uLnNsaWNlKDAsIGN1cnNvcikpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gaW5wdXRBcnJheS5sZW5ndGhcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBjdXJzb3I7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5fc2hpZnQuYWRkKHNoaWZ0U3RlcCArIHRoaXMucHJlZml4Lmxlbmd0aCB8fCAwKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpLS07XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgcmVzdWx0ICs9IGlucHV0U3ltYm9sO1xuICAgICAgICAgICAgICAgICAgICBjdXJzb3IrKztcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHRoaXMuX2NoZWNrU3ltYm9sTWFzayhpbnB1dFN5bWJvbCwgbWFza0V4cHJlc3Npb25bY3Vyc29yXSkpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKG1hc2tFeHByZXNzaW9uW2N1cnNvcl0gPT09ICdkJykge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKE51bWJlcihpbnB1dFN5bWJvbCkgPiAzKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzdWx0ICs9IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY3Vyc29yICs9IDE7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3Qgc2hpZnRTdGVwOiBudW1iZXIgPSAvXFwqfFxcPy9nLnRlc3QobWFza0V4cHJlc3Npb24uc2xpY2UoMCwgY3Vyc29yKSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBpbnB1dEFycmF5Lmxlbmd0aFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IGN1cnNvcjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9zaGlmdC5hZGQoc2hpZnRTdGVwICsgdGhpcy5wcmVmaXgubGVuZ3RoIHx8IDApO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGktLTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBpZiAobWFza0V4cHJlc3Npb25bY3Vyc29yIC0gMV0gPT09ICdkJykge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKE51bWJlcihpbnB1dFZhbHVlLnNsaWNlKGN1cnNvciAtIDEsIGN1cnNvciArIDEpKSA+IDMxKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgaWYgKG1hc2tFeHByZXNzaW9uW2N1cnNvcl0gPT09ICdtJykge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKE51bWJlcihpbnB1dFN5bWJvbCkgPiAxKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzdWx0ICs9IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY3Vyc29yICs9IDE7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3Qgc2hpZnRTdGVwOiBudW1iZXIgPSAvXFwqfFxcPy9nLnRlc3QobWFza0V4cHJlc3Npb24uc2xpY2UoMCwgY3Vyc29yKSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBpbnB1dEFycmF5Lmxlbmd0aFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IGN1cnNvcjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9zaGlmdC5hZGQoc2hpZnRTdGVwICsgdGhpcy5wcmVmaXgubGVuZ3RoIHx8IDApO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGktLTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBpZiAobWFza0V4cHJlc3Npb25bY3Vyc29yIC0gMV0gPT09ICdtJykge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKE51bWJlcihpbnB1dFZhbHVlLnNsaWNlKGN1cnNvciAtIDEsIGN1cnNvciArIDEpKSA+IDEyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgcmVzdWx0ICs9IGlucHV0U3ltYm9sO1xuICAgICAgICAgICAgICAgICAgICBjdXJzb3IrKztcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHRoaXMubWFza1NwZWNpYWxDaGFyYWN0ZXJzLmluZGV4T2YobWFza0V4cHJlc3Npb25bY3Vyc29yXSkgIT09IC0xKSB7XG4gICAgICAgICAgICAgICAgICAgIHJlc3VsdCArPSBtYXNrRXhwcmVzc2lvbltjdXJzb3JdO1xuICAgICAgICAgICAgICAgICAgICBjdXJzb3IrKztcbiAgICAgICAgICAgICAgICAgICAgY29uc3Qgc2hpZnRTdGVwOiBudW1iZXIgPSAvXFwqfFxcPy9nLnRlc3QobWFza0V4cHJlc3Npb24uc2xpY2UoMCwgY3Vyc29yKSlcbiAgICAgICAgICAgICAgICAgICAgICAgID8gaW5wdXRBcnJheS5sZW5ndGhcbiAgICAgICAgICAgICAgICAgICAgICAgIDogY3Vyc29yO1xuICAgICAgICAgICAgICAgICAgICB0aGlzLl9zaGlmdC5hZGQoc2hpZnRTdGVwICsgdGhpcy5wcmVmaXgubGVuZ3RoIHx8IDApO1xuICAgICAgICAgICAgICAgICAgICBpLS07XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmICh0aGlzLm1hc2tTcGVjaWFsQ2hhcmFjdGVycy5pbmRleE9mKGlucHV0U3ltYm9sKSA+IC0xXG4gICAgICAgICAgICAgICAgICAgICYmIHRoaXMubWFza0F2YWlsYWJsZVBhdHRlcm5zW21hc2tFeHByZXNzaW9uW2N1cnNvcl1dXG4gICAgICAgICAgICAgICAgICAgICYmIHRoaXMubWFza0F2YWlsYWJsZVBhdHRlcm5zW21hc2tFeHByZXNzaW9uW2N1cnNvcl1dLm9wdGlvbmFsKSB7XG4gICAgICAgICAgICAgICAgICAgIGN1cnNvcisrO1xuICAgICAgICAgICAgICAgICAgICBpLS07XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmICgodGhpcy5tYXNrRXhwcmVzc2lvbltjdXJzb3IgKyAxXSA9PT0gJyonKVxuICAgICAgICAgICAgICAgICAgICAmJiAodGhpcy5fZmluZFNwZWNpYWxDaGFyKHRoaXMubWFza0V4cHJlc3Npb25bY3Vyc29yICsgMl0pKVxuICAgICAgICAgICAgICAgICAgICAmJiAodGhpcy5fZmluZFNwZWNpYWxDaGFyKGlucHV0U3ltYm9sKSA9PT0gdGhpcy5tYXNrRXhwcmVzc2lvbltjdXJzb3IgKyAyXSkgJiYgbXVsdGkpIHtcbiAgICAgICAgICAgICAgICAgICAgY3Vyc29yICs9IDM7XG4gICAgICAgICAgICAgICAgICAgIHJlc3VsdCArPSBpbnB1dFN5bWJvbDtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHJlc3VsdC5sZW5ndGggKyAxID09PSBtYXNrRXhwcmVzc2lvbi5sZW5ndGhcbiAgICAgICAgICAgICYmIHRoaXMubWFza1NwZWNpYWxDaGFyYWN0ZXJzLmluZGV4T2YobWFza0V4cHJlc3Npb25bbWFza0V4cHJlc3Npb24ubGVuZ3RoIC0gMV0pICE9PSAtMSkge1xuICAgICAgICAgICAgcmVzdWx0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hdGUgX3JlZ0V4cEZvclJlbW92ZShzcGVjaWFsQ2hhcmFjdGVyc0ZvclJlbW92ZTogc3RyaW5nW10pOiBSZWdFeHAge1xuICAgIHJldHVybiBuZXcgUmVnRXhwKFxuICAgICAgc3BlY2lhbENoYXJhY3RlcnNGb3JSZW1vdmUubWFwKChpdGVtOiBzdHJpbmcpID0+IGBcXFxcJHtpdGVtfWApLmpvaW4oJ3wnKSxcbiAgICAgICdnaSdcbiAgICApO1xuICB9XG59Il19

@@ -81,2 +81,10 @@ import { __awaiter } from 'tslib';

};
this.persantage = (str) => {
if (Number(str) >= 0 && Number(str) <= 100) {
return true;
}
else {
return false;
}
};
this._shift = new Set();

@@ -126,3 +134,14 @@ this.maskSpecialCharacters = (/** @type {?} */ (this._config)).specialCharacters;

.split('');
if (maskExpression === 'separator') {
if (maskExpression === 'percent') {
if (inputValue.match('[a-z]|[A-Z]') || inputValue.match(/[-!$%^&*()_+|~=`{}\[\]:";'<>?,\/]/)) {
inputValue = inputValue.substring(0, inputValue.length - 1);
}
if (this.persantage(inputValue)) {
result = inputValue;
}
else {
result = inputValue.substring(0, inputValue.length - 1);
}
}
else if (maskExpression === 'separator') {
if (inputValue.match('[a-z]|[A-Z]') || inputValue.match(/[-!$%^&*()_+|~=`{}\[\]:";'<>?,.\/]/)) {

@@ -129,0 +148,0 @@ inputValue = inputValue.substring(0, inputValue.length - 1);

@@ -78,2 +78,10 @@ import { NG_VALUE_ACCESSOR } from '@angular/forms';

};
this.persantage = function (str) {
if (Number(str) >= 0 && Number(str) <= 100) {
return true;
}
else {
return false;
}
};
this._shift = new Set();

@@ -140,3 +148,14 @@ this.maskSpecialCharacters = (/** @type {?} */ (this._config)).specialCharacters;

.split('');
if (maskExpression === 'separator') {
if (maskExpression === 'percent') {
if (inputValue.match('[a-z]|[A-Z]') || inputValue.match(/[-!$%^&*()_+|~=`{}\[\]:";'<>?,\/]/)) {
inputValue = inputValue.substring(0, inputValue.length - 1);
}
if (this.persantage(inputValue)) {
result = inputValue;
}
else {
result = inputValue.substring(0, inputValue.length - 1);
}
}
else if (maskExpression === 'separator') {
if (inputValue.match('[a-z]|[A-Z]') || inputValue.match(/[-!$%^&*()_+|~=`{}\[\]:";'<>?,.\/]/)) {

@@ -143,0 +162,0 @@ inputValue = inputValue.substring(0, inputValue.length - 1);

{
"name": "ngx-mask",
"version": "7.2.0",
"version": "7.3.0",
"description": "awesome ngx mask",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -210,6 +210,16 @@ <a href="https://jsdaddy.github.io/ngx-mask">

### Percent validation
You can validate your input for percents
##### Usage
```html
<input type='text' mask="percents" sufix="%">
```
## Examples
Check the [demo](https://jsdaddy.github.io/ngx-mask/).

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 not supported yet

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