-
Notifications
You must be signed in to change notification settings - Fork 0
/
jquery.inputmask.js
1 lines (1 loc) · 78 KB
/
jquery.inputmask.js
1
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("jquery"));else if("function"==typeof define&&define.amd)define(["jquery"],t);else{var i="object"==typeof exports?t(require("jquery")):t(e.jQuery);for(var n in i)("object"==typeof exports?exports:e)[n]=i[n]}}(window,function(__WEBPACK_EXTERNAL_MODULE__3__){return modules=[function(e){e.exports=JSON.parse('{"BACKSPACE":8,"BACKSPACE_SAFARI":127,"DELETE":46,"DOWN":40,"END":35,"ENTER":13,"ESCAPE":27,"HOME":36,"INSERT":45,"LEFT":37,"PAGE_DOWN":34,"PAGE_UP":33,"RIGHT":39,"SPACE":32,"TAB":9,"UP":38,"X":88,"CONTROL":17}')},function(e,t,i){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var a=i(2),r=i(4),o=r.document,s=i(5).generateMaskSet,u=i(5).analyseMask,l=i(9);function c(e,t,i){if(!(this instanceof c))return new c(e,t,i);this.el=void 0,this.events={},this.maskset=void 0,!0!==i&&(a.isPlainObject(e)?t=e:(t=t||{},e&&(t.alias=e)),this.opts=a.extend(!0,{},this.defaults,t),this.noMasksCache=t&&void 0!==t.definitions,this.userOptions=t||{},p(this.opts.alias,t,this.opts),this.isRTL=this.opts.numericInput),this.refreshValue=!1,this.undoValue=void 0,this.$el=void 0,this.skipKeyPressEvent=!1,this.skipInputEvent=!1,this.validationEvent=!1,this.ignorable=!1,this.maxLength,this.mouseEnter=!1,this.originalPlaceholder=void 0}function p(e,t,i){var n=c.prototype.aliases[e];if(n)return n.alias&&p(n.alias,void 0,i),a.extend(!0,i,n),a.extend(!0,i,t),1;null===i.mask&&(i.mask=e)}c.prototype={dataAttribute:"data-inputmask",defaults:{_maxTestPos:500,placeholder:"_",optionalmarker:["[","]"],quantifiermarker:["{","}"],groupmarker:["(",")"],alternatormarker:"|",escapeChar:"\\",mask:null,regex:null,oncomplete:a.noop,onincomplete:a.noop,oncleared:a.noop,repeat:0,greedy:!1,autoUnmask:!1,removeMaskOnSubmit:!1,clearMaskOnLostFocus:!0,insertMode:!0,insertModeVisual:!0,clearIncomplete:!1,alias:null,onKeyDown:a.noop,onBeforeMask:null,onBeforePaste:function(e,t){return a.isFunction(t.onBeforeMask)?t.onBeforeMask.call(this,e,t):e},onBeforeWrite:null,onUnMask:null,showMaskOnFocus:!0,showMaskOnHover:!0,onKeyValidation:a.noop,skipOptionalPartCharacter:" ",numericInput:!1,rightAlign:!1,undoOnEscape:!0,radixPoint:"",_radixDance:!1,groupSeparator:"",keepStatic:null,positionCaretOnTab:!0,tabThrough:!1,supportsInputType:["text","tel","url","password","search"],ignorables:[8,9,19,27,33,34,35,36,37,38,39,40,45,46,93,112,113,114,115,116,117,118,119,120,121,122,123,0,229],isComplete:null,preValidation:null,postValidation:null,staticDefinitionSymbol:void 0,jitMasking:!1,nullable:!0,inputEventOnly:!1,noValuePatching:!1,positionCaretOnClick:"lvp",casing:null,inputmode:"text",importDataAttributes:!0,shiftPositions:!0},definitions:{9:{validator:"[0-90-9]",definitionSymbol:"*"},a:{validator:"[A-Za-zА-яЁёÀ-ÿµ]",definitionSymbol:"*"},"*":{validator:"[0-90-9A-Za-zА-яЁёÀ-ÿµ]"}},aliases:{},masksCache:{},mask:function(e){var t=this;return"string"==typeof e&&(e=o.getElementById(e)||o.querySelectorAll(e)),e=e.nodeName?[e]:e,a.each(e,function(e,i){var n=a.extend(!0,{},t.opts);if(function(e,t,i,n){function o(t,a){var o=""===n?t:n+"-"+t;null!==(a=void 0!==a?a:e.getAttribute(o))&&("string"==typeof a&&(0===t.indexOf("on")?a=r[a]:"false"===a?a=!1:"true"===a&&(a=!0)),i[t]=a)}if(!0===t.importDataAttributes){var s,u,l,c,f=e.getAttribute(n);if(f&&""!==f&&(f=f.replace(/'/g,'"'),u=JSON.parse("{"+f+"}")),u)for(c in l=void 0,u)if("alias"===c.toLowerCase()){l=u[c];break}for(s in o("alias",l),i.alias&&p(i.alias,i,t),t){if(u)for(c in l=void 0,u)if(c.toLowerCase()===s.toLowerCase()){l=u[c];break}o(s,l)}}return a.extend(!0,t,i),"rtl"!==e.dir&&!t.rightAlign||(e.style.textAlign="right"),"rtl"!==e.dir&&!t.numericInput||(e.dir="ltr",e.removeAttribute("dir"),t.isRTL=!0),Object.keys(i).length}(i,n,a.extend(!0,{},t.userOptions),t.dataAttribute)){var o=s(n,t.noMasksCache);void 0!==o&&(void 0!==i.inputmask&&(i.inputmask.opts.autoUnmask=!0,i.inputmask.remove()),i.inputmask=new c(void 0,void 0,!0),i.inputmask.opts=n,i.inputmask.noMasksCache=t.noMasksCache,i.inputmask.userOptions=a.extend(!0,{},t.userOptions),i.inputmask.isRTL=n.isRTL||n.numericInput,i.inputmask.el=i,i.inputmask.$el=a(i),i.inputmask.maskset=o,a.data(i,"_inputmask_opts",t.userOptions),l.call(i.inputmask,{action:"mask"}))}}),e&&e[0]&&e[0].inputmask||this},option:function(e,t){return"string"==typeof e?this.opts[e]:"object"===n(e)?(a.extend(this.userOptions,e),this.el&&!0!==t&&this.mask(this.el),this):void 0},unmaskedvalue:function(e){return this.maskset=this.maskset||s(this.opts,this.noMasksCache),l.call(this,{action:"unmaskedvalue",value:e})},remove:function(){return l.call(this,{action:"remove"})},getemptymask:function(){return this.maskset=this.maskset||s(this.opts,this.noMasksCache),l.call(this,{action:"getemptymask"})},hasMaskedValue:function(){return!this.opts.autoUnmask},isComplete:function(){return this.maskset=this.maskset||s(this.opts,this.noMasksCache),l.call(this,{action:"isComplete"})},getmetadata:function(){return this.maskset=this.maskset||s(this.opts,this.noMasksCache),l.call(this,{action:"getmetadata"})},isValid:function(e){return this.maskset=this.maskset||s(this.opts,this.noMasksCache),l.call(this,{action:"isValid",value:e})},format:function(e,t){return this.maskset=this.maskset||s(this.opts,this.noMasksCache),l.call(this,{action:"format",value:e,metadata:t})},setValue:function(e){this.el&&a(this.el).trigger("setvalue",[e])},analyseMask:u},c.extendDefaults=function(e){a.extend(!0,c.prototype.defaults,e)},c.extendDefinitions=function(e){a.extend(!0,c.prototype.definitions,e)},c.extendAliases=function(e){a.extend(!0,c.prototype.aliases,e)},c.format=function(e,t,i){return c(t).format(e,i)},c.unmask=function(e,t){return c(t).unmaskedvalue(e)},c.isValid=function(e,t){return c(t).isValid(e)},c.remove=function(e){"string"==typeof e&&(e=o.getElementById(e)||o.querySelectorAll(e)),e=e.nodeName?[e]:e,a.each(e,function(e,t){t.inputmask&&t.inputmask.remove()})},c.setValue=function(e,t){"string"==typeof e&&(e=o.getElementById(e)||o.querySelectorAll(e)),e=e.nodeName?[e]:e,a.each(e,function(e,i){i.inputmask?i.inputmask.setValue(t):a(i).trigger("setvalue",[t])})},c.dependencyLib=a,r.Inputmask=c,e.exports=c},function(e,t,i){"use strict";var n=i(3);if(void 0===n)throw"jQuery not loaded!";e.exports=n},function(e,t){e.exports=__WEBPACK_EXTERNAL_MODULE__3__},function(module,exports,__webpack_require__){"use strict";var __WEBPACK_AMD_DEFINE_RESULT__;function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}__WEBPACK_AMD_DEFINE_RESULT__=function(){return"undefined"!=typeof window?window:new(eval("require('jsdom').JSDOM"))("").window}.call(exports,__webpack_require__,exports,module),void 0===__WEBPACK_AMD_DEFINE_RESULT__||(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)},function(e,t,i){"use strict";var n=i(2);e.exports={generateMaskSet:function(e,t){function i(e,i,a){var r,o,s=!1;if(null!==e&&""!==e||(e=(s=null!==a.regex)?(e=a.regex).replace(/^(\^)(.*)(\$)$/,"$2"):(s=!0,".*")),1===e.length&&!1===a.greedy&&0!==a.repeat&&(a.placeholder=""),0<a.repeat||"*"===a.repeat||"+"===a.repeat){var u="*"===a.repeat?0:"+"===a.repeat?1:a.repeat;e=a.groupmarker[0]+e+a.groupmarker[1]+a.quantifiermarker[0]+u+","+a.repeat+a.quantifiermarker[1]}return o=s?"regex_"+a.regex:a.numericInput?e.split("").reverse().join(""):e,!1!==a.keepStatic&&(o="ks_"+o),void 0===Inputmask.prototype.masksCache[o]||!0===t?(r={mask:e,maskToken:Inputmask.prototype.analyseMask(e,s,a),validPositions:{},_buffer:void 0,buffer:void 0,tests:{},excludes:{},metadata:i,maskLength:void 0,jitOffset:{}},!0!==t&&(Inputmask.prototype.masksCache[o]=r,r=n.extend(!0,{},Inputmask.prototype.masksCache[o]))):r=n.extend(!0,{},Inputmask.prototype.masksCache[o]),r}if(n.isFunction(e.mask)&&(e.mask=e.mask(e)),n.isArray(e.mask)){if(1<e.mask.length){null===e.keepStatic&&(e.keepStatic=!0);var a=e.groupmarker[0];return n.each(e.isRTL?e.mask.reverse():e.mask,function(t,i){1<a.length&&(a+=e.groupmarker[1]+e.alternatormarker+e.groupmarker[0]),void 0===i.mask||n.isFunction(i.mask)?a+=i:a+=i.mask}),i(a+=e.groupmarker[1],e.mask,e)}e.mask=e.mask.pop()}return null===e.keepStatic&&(e.keepStatic=!1),e.mask&&void 0!==e.mask.mask&&!n.isFunction(e.mask.mask)?i(e.mask.mask,e.mask,e):i(e.mask,e.mask,e)},analyseMask:function(e,t,i){var a,r,o,s,u,l,c=/(?:[?*+]|\{[0-9+*]+(?:,[0-9+*]*)?(?:\|[0-9+*]*)?\})|[^.?*+^${[]()|\\]+|./g,p=/\[\^?]?(?:[^\\\]]+|\\[\S\s]?)*]?|\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9][0-9]*|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}|c[A-Za-z]|[\S\s]?)|\((?:\?[:=!]?)?|(?:[?*+]|\{[0-9]+(?:,[0-9]*)?\})\??|[^.?*+^${[()|\\]+|./g,f=!1,d=new g,m=[],h=[],v=!1;function g(e,t,i,n){this.matches=[],this.openGroup=e||!1,this.alternatorGroup=!1,this.isGroup=e||!1,this.isOptional=t||!1,this.isQuantifier=i||!1,this.isAlternator=n||!1,this.quantifier={min:1,max:1}}function k(e,a,r){r=void 0!==r?r:e.matches.length;var o=e.matches[r-1];if(t)0===a.indexOf("[")||f&&/\\d|\\s|\\w]/i.test(a)||"."===a?e.matches.splice(r++,0,{fn:new RegExp(a,i.casing?"i":""),static:!1,optionality:!1,newBlockMarker:void 0===o?"master":o.def!==a,casing:null,def:a,placeholder:void 0,nativeDef:a}):(f&&(a=a[a.length-1]),n.each(a.split(""),function(t,n){o=e.matches[r-1],e.matches.splice(r++,0,{fn:/[a-z]/i.test(i.staticDefinitionSymbol||n)?new RegExp("["+(i.staticDefinitionSymbol||n)+"]",i.casing?"i":""):null,static:!0,optionality:!1,newBlockMarker:void 0===o?"master":o.def!==n&&!0!==o.static,casing:null,def:i.staticDefinitionSymbol||n,placeholder:void 0!==i.staticDefinitionSymbol?n:void 0,nativeDef:(f?"'":"")+n})})),f=!1;else{var s=(i.definitions?i.definitions[a]:void 0)||Inputmask.prototype.definitions[a];s&&!f?e.matches.splice(r++,0,{fn:s.validator?"string"==typeof s.validator?new RegExp(s.validator,i.casing?"i":""):new function(){this.test=s.validator}:new RegExp("."),static:s.static||!1,optionality:!1,newBlockMarker:void 0===o?"master":o.def!==(s.definitionSymbol||a),casing:s.casing,def:s.definitionSymbol||a,placeholder:s.placeholder,nativeDef:a,generated:s.generated}):(e.matches.splice(r++,0,{fn:/[a-z]/i.test(i.staticDefinitionSymbol||a)?new RegExp("["+(i.staticDefinitionSymbol||a)+"]",i.casing?"i":""):null,static:!0,optionality:!1,newBlockMarker:void 0===o?"master":o.def!==a&&!0!==o.static,casing:null,def:i.staticDefinitionSymbol||a,placeholder:void 0!==i.staticDefinitionSymbol?a:void 0,nativeDef:(f?"'":"")+a}),f=!1)}}function y(){if(0<m.length){if(k(s=m[m.length-1],r),s.isAlternator){u=m.pop();for(var e=0;e<u.matches.length;e++)u.matches[e].isGroup&&(u.matches[e].isGroup=!1);0<m.length?(s=m[m.length-1]).matches.push(u):d.matches.push(u)}}else k(d,r)}function b(e){var t=new g(!0);return t.openGroup=!1,t.matches=e,t}function x(){if((o=m.pop()).openGroup=!1,void 0!==o)if(0<m.length){if((s=m[m.length-1]).matches.push(o),s.isAlternator){u=m.pop();for(var e=0;e<u.matches.length;e++)u.matches[e].isGroup=!1,u.matches[e].alternatorGroup=!1;0<m.length?(s=m[m.length-1]).matches.push(u):d.matches.push(u)}}else d.matches.push(o);else y()}function _(e){var t=e.pop();return t.isQuantifier&&(t=b([e.pop(),t])),t}for(t&&(i.optionalmarker[0]=void 0,i.optionalmarker[1]=void 0);a=t?p.exec(e):c.exec(e);){if(r=a[0],t)switch(r.charAt(0)){case"?":r="{0,1}";break;case"+":case"*":r="{"+r+"}";break;case"|":if(0===m.length){var S=b(d.matches);S.openGroup=!0,m.push(S),d.matches=[],v=!0}}if(f)y();else switch(r.charAt(0)){case"(?=":case"(?!":case"(?<=":case"(?<!":break;case i.escapeChar:f=!0,t&&y();break;case i.optionalmarker[1]:case i.groupmarker[1]:x();break;case i.optionalmarker[0]:m.push(new g(!1,!0));break;case i.groupmarker[0]:m.push(new g(!0));break;case i.quantifiermarker[0]:var P=new g(!1,!1,!0),w=(r=r.replace(/[{}]/g,"")).split("|"),E=w[0].split(","),M=isNaN(E[0])?E[0]:parseInt(E[0]),O=1===E.length?M:isNaN(E[1])?E[1]:parseInt(E[1]);"*"!==M&&"+"!==M||(M="*"===O?0:1),P.quantifier={min:M,max:O,jit:w[1]};var A=0<m.length?m[m.length-1].matches:d.matches;if((a=A.pop()).isAlternator){A.push(a),A=a.matches;var D=new g(!0),C=A.pop();A.push(D),A=D.matches,a=C}a.isGroup||(a=b([a])),A.push(a),A.push(P);break;case i.alternatormarker:if(0<m.length){var j=(s=m[m.length-1]).matches[s.matches.length-1];l=s.openGroup&&(void 0===j.matches||!1===j.isGroup&&!1===j.isAlternator)?m.pop():_(s.matches)}else l=_(d.matches);if(l.isAlternator)m.push(l);else if(l.alternatorGroup?(u=m.pop(),l.alternatorGroup=!1):u=new g(!1,!1,!1,!0),u.matches.push(l),m.push(u),l.openGroup){l.openGroup=!1;var F=new g(!0);F.alternatorGroup=!0,m.push(F)}break;default:y()}}for(v&&x();0<m.length;)o=m.pop(),d.matches.push(o);return 0<d.matches.length&&(function e(a){a&&a.matches&&n.each(a.matches,function(n,r){var o=a.matches[n+1];(void 0===o||void 0===o.matches||!1===o.isQuantifier)&&r&&r.isGroup&&(r.isGroup=!1,t||(k(r,i.groupmarker[0],0),!0!==r.openGroup&&k(r,i.groupmarker[1]))),e(r)})}(d),h.push(d)),(i.numericInput||i.isRTL)&&function e(t){for(var n in t.matches=t.matches.reverse(),t.matches)if(Object.prototype.hasOwnProperty.call(t.matches,n)){var a=parseInt(n);if(t.matches[n].isQuantifier&&t.matches[a+1]&&t.matches[a+1].isGroup){var r=t.matches[n];t.matches.splice(n,1),t.matches.splice(a+1,0,r)}void 0!==t.matches[n].matches?t.matches[n]=e(t.matches[n]):t.matches[n]=((o=t.matches[n])===i.optionalmarker[0]?o=i.optionalmarker[1]:o===i.optionalmarker[1]?o=i.optionalmarker[0]:o===i.groupmarker[0]?o=i.groupmarker[1]:o===i.groupmarker[1]&&(o=i.groupmarker[0]),o)}var o;return t}(h[0]),h}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return e.replace(n,"\\$1")};var n=new RegExp("(\\"+["/",".","*","+","?","|","(",")","[","]","{","}","\\","$","^"].join("|\\")+")","gim")},function(e,t,i){"use strict";i(8),i(11),i(12),i(13),e.exports=i(1)},function(e,t,i){"use strict";var n=i(1);n.extendDefinitions({A:{validator:"[A-Za-zА-яЁёÀ-ÿµ]",casing:"upper"},"&":{validator:"[0-9A-Za-zА-яЁёÀ-ÿµ]",casing:"upper"},"#":{validator:"[0-9A-Fa-f]",casing:"upper"}});var a=new RegExp("25[0-5]|2[0-4][0-9]|[01][0-9][0-9]");function r(e,t,i,n,r){return e=-1<i-1&&"."!==t.buffer[i-1]?(e=t.buffer[i-1]+e,-1<i-2&&"."!==t.buffer[i-2]?t.buffer[i-2]+e:"0"+e):"00"+e,a.test(e)}n.extendAliases({cssunit:{regex:"[+-]?[0-9]+\\.?([0-9]+)?(px|em|rem|ex|%|in|cm|mm|pt|pc)"},url:{regex:"(https?|ftp)://.*",autoUnmask:!1},ip:{mask:"i[i[i]].j[j[j]].k[k[k]].l[l[l]]",definitions:{i:{validator:r},j:{validator:r},k:{validator:r},l:{validator:r}},onUnMask:function(e,t,i){return e},inputmode:"numeric"},email:{mask:"*{1,64}[.*{1,64}][.*{1,64}][.*{1,63}]@-{1,63}.-{1,63}[.-{1,63}][.-{1,63}]",greedy:!1,casing:"lower",onBeforePaste:function(e,t){return(e=e.toLowerCase()).replace("mailto:","")},definitions:{"*":{validator:"[0-91-9A-Za-zА-яЁёÀ-ÿµ!#$%&'*+/=?^_`{|}~-]"},"-":{validator:"[0-9A-Za-z-]"}},onUnMask:function(e,t,i){return e},inputmode:"email"},mac:{mask:"##:##:##:##:##:##"},vin:{mask:"V{13}9{4}",definitions:{V:{validator:"[A-HJ-NPR-Za-hj-npr-z\\d]",casing:"upper"}},clearIncomplete:!0,autoUnmask:!0},ssn:{mask:"999-99-9999",postValidation:function(e,t,i,n,a,r,o){return/^(?!219-09-9999|078-05-1120)(?!666|000|9.{2}).{3}-(?!00).{2}-(?!0{4}).{4}$/.test(e.join(""))}}}),e.exports=n},function(e,t,i){"use strict";i(10);var n=i(2),a=i(4),r=a.document,o=a.navigator&&a.navigator.userAgent||"",s=0<o.indexOf("MSIE ")||0<o.indexOf("Trident/"),u="ontouchstart"in a,l=/iemobile/i.test(o),c=/iphone/i.test(o)&&!l,p=i(0);e.exports=function e(t){var i=this,o=i.maskset,f=i.opts,d=i.el,m=i.isRTL||(i.isRTL=f.numericInput);function h(e,t,n,a,r){var s=f.greedy;r&&(f.greedy=!1),t=t||0;var u,l,c,p,d=[],m=0;do{if(!0===e&&o.validPositions[m])l=(c=r&&!0===o.validPositions[m].match.optionality&&void 0===o.validPositions[m+1]&&(!0===o.validPositions[m].generatedInput||o.validPositions[m].input==f.skipOptionalPartCharacter&&0<m)?b(m,P(m,u,m-1)):o.validPositions[m]).match,u=c.locator.slice(),d.push(!0===n?c.input:!1===n?l.nativeDef:L(m,l));else{l=(c=x(m,u,m-1)).match,u=c.locator.slice();var h=!0!==a&&(!1!==f.jitMasking?f.jitMasking:l.jit);(p=p&&l.static&&l.def!==f.groupSeparator&&null===l.fn||o.validPositions[m-1]&&l.static&&l.def!==f.groupSeparator&&null===l.fn)||!1===h||void 0===h||"number"==typeof h&&isFinite(h)&&m<h?d.push(!1===n?l.nativeDef:L(m,l)):p=!1}m++}while((void 0===i.maxLength||m<i.maxLength)&&(!0!==l.static||""!==l.def)||m<t);return""===d[d.length-1]&&d.pop(),!1===n&&void 0!==o.maskLength||(o.maskLength=m-1),f.greedy=s,d}function v(e){o.buffer=void 0,!0!==e&&(o.validPositions={},o.p=0)}function g(e,t,i){var n=-1,a=-1,r=i||o.validPositions;for(var s in void 0===e&&(e=-1),r){var u=parseInt(s);r[u]&&(t||!0!==r[u].generatedInput)&&(u<=e&&(n=u),e<=u&&(a=u))}return-1!==n&&n!=e&&(-1==a||e-n<a-e)?n:a}function k(e){var t=e.locator[e.alternation];return"string"==typeof t&&0<t.length&&(t=t.split(",")[0]),void 0!==t?t.toString():""}function y(e,t){var i=(null!=e.alternation?e.mloc[k(e)]:e.locator).join("");if(""!==i)for(;i.length<t;)i+="0";return i}function b(e,t){for(var i,n,a,r=y(_(e=0<e?e-1:0)),o=0;o<t.length;o++){var s=t[o];i=y(s,r.length);var u=Math.abs(i-r);(void 0===n||""!==i&&u<n||a&&!f.greedy&&a.match.optionality&&"master"===a.match.newBlockMarker&&(!s.match.optionality||!s.match.newBlockMarker)||a&&a.match.optionalQuantifier&&!s.match.optionalQuantifier)&&(n=u,a=s)}return a}function x(e,t,i){return o.validPositions[e]||b(e,P(e,t?t.slice():t,i))}function _(e,t){return o.validPositions[e]?o.validPositions[e]:(t||P(e))[0]}function S(e,t,i){for(var n=!1,a=P(e),r=0;r<a.length;r++){if(a[r].match&&(!(a[r].match.nativeDef!==t.match[i.shiftPositions?"def":"nativeDef"]||i.shiftPositions&&t.match.static)||a[r].match.nativeDef===t.match.nativeDef)){n=!0;break}if(a[r].match&&a[r].match.def===t.match.nativeDef){n=void 0;break}}return!1===n&&void 0!==o.jitOffset[e]&&(n=S(e+o.jitOffset[e],t,i)),n}function P(e,t,a){var r,s=o.maskToken,u=t?a:0,l=t?t.slice():[0],c=[],p=!1,m=t?t.join(""):"";function h(t,i,a,s){function l(a,s,v){function g(e,t){var i=0===n.inArray(e,t.matches);return i||n.each(t.matches,function(n,a){if(!0===a.isQuantifier?i=g(e,t.matches[n-1]):Object.prototype.hasOwnProperty.call(a,"matches")&&(i=g(e,a)),i)return!1}),i}function k(e,t,i){var a,r;if((o.tests[e]||o.validPositions[e])&&n.each(o.tests[e]||[o.validPositions[e]],function(e,n){if(n.mloc[t])return a=n,!1;var o=void 0!==i?i:n.alternation,s=void 0!==n.locator[o]?n.locator[o].toString().indexOf(t):-1;(void 0===r||s<r)&&-1!==s&&(a=n,r=s)}),a){var s=a.locator[a.alternation];return(a.mloc[t]||a.mloc[s]||a.locator).slice((void 0!==i?i:a.alternation)+1)}return void 0!==i?k(e,t):void 0}function y(e,t){function i(e){for(var t,i=[],n=-1,a=0,r=e.length;a<r;a++)if("-"===e.charAt(a))for(t=e.charCodeAt(a+1);++n<t;)i.push(String.fromCharCode(n));else n=e.charCodeAt(a),i.push(e.charAt(a));return i.join("")}return e.match.def===t.match.nativeDef||(f.regex||e.match.fn instanceof RegExp&&t.match.fn instanceof RegExp)&&!0!==e.match.static&&!0!==t.match.static&&-1!==i(t.match.fn.toString().replace(/[[\]\/]/g,"")).indexOf(i(e.match.fn.toString().replace(/[[\]\/]/g,"")))}function b(e,t){var i=e.alternation,n=void 0===t||i===t.alternation&&-1===e.locator[i].toString().indexOf(t.locator[i]);if(!n&&i>t.alternation)for(var a=t.alternation;a<i;a++)if(e.locator[a]!==t.locator[a]){i=a,n=!0;break}if(n){e.mloc=e.mloc||{};var r=e.locator[i];if(void 0!==r){if("string"==typeof r&&(r=r.split(",")[0]),void 0===e.mloc[r]&&(e.mloc[r]=e.locator.slice()),void 0!==t){for(var o in t.mloc)"string"==typeof o&&(o=o.split(",")[0]),void 0===e.mloc[o]&&(e.mloc[o]=t.mloc[o]);e.locator[i]=Object.keys(e.mloc).join(",")}return 1}e.alternation=void 0}}function x(e,t){if(e.locator.length===t.locator.length){for(var i=e.alternation+1;i<e.locator.length;i++)if(e.locator[i]!==t.locator[i])return;return 1}}if(u>e+f._maxTestPos)throw"Inputmask: There is probably an error in your mask definition or in the code. Create an issue on github with an example of the mask you are using. "+o.mask;if(u===e&&void 0===a.matches)return c.push({match:a,locator:s.reverse(),cd:m,mloc:{}}),!0;if(void 0!==a.matches){if(a.isGroup&&v!==a){if(a=l(t.matches[n.inArray(a,t.matches)+1],s,v))return!0}else if(a.isOptional){var _=a,S=c.length;if(a=h(a,i,s,v)){if(n.each(c,function(e,t){S<=e&&(t.match.optionality=!0)}),r=c[c.length-1].match,void 0!==v||!g(r,_))return!0;p=!0,u=e}}else if(a.isAlternator){var P,w=a,E=[],M=c.slice(),O=s.length,A=0<i.length?i.shift():-1;if(-1===A||"string"==typeof A){var D,C=u,j=i.slice(),F=[];if("string"==typeof A)F=A.split(",");else for(D=0;D<w.matches.length;D++)F.push(D.toString());if(void 0!==o.excludes[e]){for(var T=F.slice(),I=0,R=o.excludes[e].length;I<R;I++){var B=o.excludes[e][I].toString().split(":");s.length==B[1]&&F.splice(F.indexOf(B[0]),1)}0===F.length&&(delete o.excludes[e],F=T)}(!0===f.keepStatic||isFinite(parseInt(f.keepStatic))&&C>=f.keepStatic)&&(F=F.slice(0,1));for(var L=!1,N=0;N<F.length;N++){D=parseInt(F[N]),c=[],i="string"==typeof A&&k(u,D,O)||j.slice(),w.matches[D]&&l(w.matches[D],[D].concat(s),v)?a=!0:0===N&&(L=!0),P=c.slice(),u=C,c=[];for(var G=0;G<P.length;G++){var V=P[G],K=!1;V.match.jit=V.match.jit||L,V.alternation=V.alternation||O,b(V);for(var H=0;H<E.length;H++){var q=E[H];if("string"!=typeof A||void 0!==V.alternation&&-1!==n.inArray(V.locator[V.alternation].toString(),F)){if(V.match.nativeDef===q.match.nativeDef){K=!0,b(q,V);break}if(y(V,q)){b(V,q)&&(K=!0,E.splice(E.indexOf(q),0,V));break}if(y(q,V)){b(q,V);break}if(W=q,!0===(Q=V).match.static&&!0!==W.match.static&&W.match.fn.test(Q.match.def,o,e,!1,f,!1)){x(V,q)||void 0!==d.inputmask.userOptions.keepStatic?b(V,q)&&(K=!0,E.splice(E.indexOf(q),0,V)):f.keepStatic=!0;break}}}K||E.push(V)}}c=M.concat(E),u=e,p=0<c.length,a=0<E.length,i=j.slice()}else a=l(w.matches[A]||t.matches[A],[A].concat(s),v);if(a)return!0}else if(a.isQuantifier&&v!==t.matches[n.inArray(a,t.matches)-1])for(var U=a,$=0<i.length?i.shift():0;$<(isNaN(U.quantifier.max)?$+1:U.quantifier.max)&&u<=e;$++){var z=t.matches[n.inArray(U,t.matches)-1];if(a=l(z,[$].concat(s),z)){if((r=c[c.length-1].match).optionalQuantifier=$>=U.quantifier.min,r.jit=($||1)*z.matches.indexOf(r)>=U.quantifier.jit,r.optionalQuantifier&&g(r,z)){p=!0,u=e;break}return r.jit&&(o.jitOffset[e]=z.matches.length-z.matches.indexOf(r)),!0}}else if(a=h(a,i,s,v))return!0}else u++;var Q,W}for(var v=0<i.length?i.shift():0;v<t.matches.length;v++)if(!0!==t.matches[v].isQuantifier){var g=l(t.matches[v],[v].concat(a),s);if(g&&u===e)return g;if(e<u)break}}if(-1<e&&(void 0===i.maxLength||e<i.maxLength)){if(void 0===t){for(var v,g=e-1;void 0===(v=o.validPositions[g]||o.tests[g])&&-1<g;)g--;void 0!==v&&-1<g&&(l=function(e,t){var i=[];return n.isArray(t)||(t=[t]),0<t.length&&(void 0===t[0].alternation||!0===f.keepStatic?0===(i=b(e,t.slice()).locator.slice()).length&&(i=t[0].locator.slice()):n.each(t,function(e,t){if(""!==t.def)if(0===i.length)i=t.locator.slice();else for(var n=0;n<i.length;n++)t.locator[n]&&-1===i[n].toString().indexOf(t.locator[n])&&(i[n]+=","+t.locator[n])})),i}(g,v),m=l.join(""),u=g)}if(o.tests[e]&&o.tests[e][0].cd===m)return o.tests[e];for(var k=l.shift();k<s.length;k++){if(h(s[k],l,[k])&&u===e||e<u)break}}return 0!==c.length&&!p||c.push({match:{fn:null,static:!0,optionality:!1,casing:null,def:"",placeholder:""},locator:[],mloc:{},cd:m}),void 0!==t&&o.tests[e]?n.extend(!0,[],c):(o.tests[e]=n.extend(!0,[],c),o.tests[e])}function w(){return void 0===o._buffer&&(o._buffer=h(!1,1),void 0===o.buffer&&(o.buffer=o._buffer.slice())),o._buffer}function E(e){return void 0!==o.buffer&&!0!==e||(o.buffer=h(!0,g(),!0),void 0===o._buffer&&(o._buffer=o.buffer.slice())),o.buffer}function M(e,t,a){var r,s,u=f.skipOptionalPartCharacter,l=m?a.slice().reverse():a;if(f.skipOptionalPartCharacter="",!0===e)v(),o.tests={},e=0,t=a.length,s=G({begin:0,end:0},!1).begin;else{for(r=e;r<t;r++)delete o.validPositions[r];s=e}var c=new n.Event("keypress");for(r=e;r<t;r++){c.which=l[r].toString().charCodeAt(0),i.ignorable=!1;var p=H.keypressEvent.call(d,c,!0,!1,!1,s);!1!==p&&(s=p.forwardPosition)}f.skipOptionalPartCharacter=u}function O(e,t,i){switch(f.casing||t.casing){case"upper":e=e.toUpperCase();break;case"lower":e=e.toLowerCase();break;case"title":var a=o.validPositions[i-1];e=0===i||a&&a.input===String.fromCharCode(p.SPACE)?e.toUpperCase():e.toLowerCase();break;default:if(n.isFunction(f.casing)){var r=Array.prototype.slice.call(arguments);r.push(o.validPositions),e=f.casing.apply(this,r)}}return e}function A(e,t,i){for(var a,r=f.greedy?t:t.slice(0,1),o=!1,s=void 0!==i?i.split(","):[],u=0;u<s.length;u++)-1!==(a=e.indexOf(s[u]))&&e.splice(a,1);for(var l=0;l<e.length;l++)if(-1!==n.inArray(e[l],r)){o=!0;break}return o}function D(e,t,i,a,r,s){var u,l,c,p,d,m,h,y,b,x=n.extend(!0,{},o.validPositions),S=n.extend(!0,{},o.tests),P=!1,w=!1,E=void 0!==r?r:g();if(s&&(y=s.begin,b=s.end,s.begin>s.end&&(y=s.end,b=s.begin)),-1===E&&void 0===r)l=(p=_(u=0)).alternation;else for(;0<=E;E--)if((c=o.validPositions[E])&&void 0!==c.alternation){if(p&&p.locator[c.alternation]!==c.locator[c.alternation])break;u=E,l=o.validPositions[u].alternation,p=c}if(void 0!==l){h=parseInt(u),o.excludes[h]=o.excludes[h]||[],!0!==e&&o.excludes[h].push(k(p)+":"+p.alternation);var M=[],O=-1;for(d=h;d<g(void 0,!0)+1;d++)-1===O&&e<=d&&void 0!==t&&(M.push(t),O=M.length-1),(m=o.validPositions[d])&&!0!==m.generatedInput&&(void 0===s||d<y||b<=d)&&M.push(m.input),delete o.validPositions[d];for(-1===O&&void 0!==t&&(M.push(t),O=M.length-1);void 0!==o.excludes[h]&&o.excludes[h].length<10;){for(o.tests={},v(!0),P=!0,d=0;d<M.length&&(P=C(P.caret||g(void 0,!0)+1,M[d],!1,a,!0));d++)d===O&&(w=P),1==e&&P&&(w={caretPos:d});if(P)break;if(v(),p=_(h),o.validPositions=n.extend(!0,{},x),o.tests=n.extend(!0,{},S),!o.excludes[h]){w=D(e,t,i,a,h-1,s);break}var A=k(p);if(-1!==o.excludes[h].indexOf(A+":"+p.alternation)){w=D(e,t,i,a,h-1,s);break}for(o.excludes[h].push(A+":"+p.alternation),d=h;d<g(void 0,!0)+1;d++)delete o.validPositions[d]}}return w&&!1===f.keepStatic||delete o.excludes[h],w}function C(e,t,a,r,s,u,l){function c(e){return m?1<e.begin-e.end||e.begin-e.end==1:1<e.end-e.begin||e.end-e.begin==1}a=!0===a;var p=e;function h(e){if(void 0!==e){if(void 0!==e.remove&&(n.isArray(e.remove)||(e.remove=[e.remove]),n.each(e.remove.sort(function(e,t){return t.pos-e.pos}),function(e,t){F({begin:t,end:t+1})}),e.remove=void 0),void 0!==e.insert&&(n.isArray(e.insert)||(e.insert=[e.insert]),n.each(e.insert.sort(function(e,t){return e.pos-t.pos}),function(e,t){""!==t.c&&C(t.pos,t.c,void 0===t.strict||t.strict,void 0!==t.fromIsValid?t.fromIsValid:r)}),e.insert=void 0),e.refreshFromBuffer&&e.buffer){var t=e.refreshFromBuffer;M(!0===t?t:t.start,t.end,e.buffer),e.refreshFromBuffer=void 0}void 0!==e.rewritePosition&&(p=e.rewritePosition,e=!0)}return e}function g(t,i,a){var s=!1;return n.each(P(t),function(u,l){var p=l.match;if(E(!0),!1!==(s=null!=p.fn?p.fn.test(i,o,t,a,f,c(e)):(i===p.def||i===f.skipOptionalPartCharacter)&&""!==p.def&&{c:L(t,p,!0)||p.def,pos:t})){var d=void 0!==s.c?s.c:i,m=t;return d=d===f.skipOptionalPartCharacter&&!0===p.static?L(t,p,!0)||p.def:d,!0!==(s=h(s))&&void 0!==s.pos&&s.pos!==t&&(m=s.pos),(!0===s||void 0!==s.pos||void 0!==s.c)&&(!1===F(e,n.extend({},l,{input:O(d,p,m)}),r,m)&&(s=!1),!1)}}),s}void 0!==e.begin&&(p=m?e.end:e.begin);var k=!0,y=n.extend(!0,{},o.validPositions);if(!1===f.keepStatic&&void 0!==o.excludes[p]&&!0!==s&&!0!==r)for(var b=p;b<(m?e.begin:e.end);b++)void 0!==o.excludes[b]&&(o.excludes[b]=void 0,delete o.tests[b]);if(n.isFunction(f.preValidation)&&!0!==r&&!0!==u&&(k=h(k=f.preValidation.call(d,E(),p,t,c(e),f,o,e,a||s))),!0===k){if(void 0===i.maxLength||p<i.maxLength){if(k=g(p,t,a),(!a||!0===r)&&!1===k&&!0!==u){var x=o.validPositions[p];if(!x||!0!==x.match.static||x.match.def!==t&&t!==f.skipOptionalPartCharacter){if(f.insertMode||void 0===o.validPositions[I(p)]||e.end>p){var _=!1;if(o.jitOffset[p]&&void 0===o.validPositions[I(p)]&&(!1!==(k=C(p+o.jitOffset[p],t,!0))&&(!0!==s&&(k.caret=p),_=!0)),e.end>p&&(o.validPositions[p]=void 0),!_&&!T(p,f.keepStatic))for(var S=p+1,w=I(p);S<=w;S++)if(!1!==(k=g(S,t,a))){k=j(p,void 0!==k.pos?k.pos:S)||k,p=S;break}}}else k={caret:I(p)}}}else k=!1;!1!==k||!f.keepStatic||!Z(E())&&0!==p||a||!0===s?c(e)&&o.tests[p]&&1<o.tests[p].length&&f.keepStatic&&!a&&!0!==s&&(k=D(!0)):k=D(p,t,a,r,void 0,e),!0===k&&(k={pos:p})}if(n.isFunction(f.postValidation)&&!0!==r&&!0!==u){var A=f.postValidation.call(d,E(!0),void 0!==e.begin?m?e.end:e.begin:e,t,k,f,o,a,l);void 0!==A&&(k=!0===A?k:A)}return k&&void 0===k.pos&&(k.pos=p),!1===k||!0===u?(v(!0),o.validPositions=n.extend(!0,{},y)):j(void 0,p,!0),h(k)}function j(e,t,i){if(void 0===e)for(e=t-1;0<e&&!o.validPositions[e];e--);for(var a=e;a<t;a++)if(void 0===o.validPositions[a]&&!T(a,!0)){if(0==a?_(a):o.validPositions[a-1]){var r=P(a).slice();""===r[r.length-1].match.def&&r.pop();var s,u=b(a,r);if(u&&(!0!==u.match.jit||"master"===u.match.newBlockMarker&&(s=o.validPositions[a+1])&&!0===s.match.optionalQuantifier)&&((u=n.extend({},u,{input:L(a,u.match,!0)||u.match.def})).generatedInput=!0,F(a,u,!0),!0!==i)){var l=o.validPositions[t].input;return o.validPositions[t]=void 0,C(t,l,!0,!0)}}}}function F(e,t,i,a){function r(e,t,i){var n=t[e];if(void 0!==n&&!0===n.match.static&&!0!==n.match.optionality&&(void 0===t[0]||void 0===t[0].alternation)){var a=(!(i.begin<=e-1)||t[e-1]&&!0===t[e-1].match.static)&&t[e-1],r=(!(i.end>e+1)||t[e+1]&&!0===t[e+1].match.static)&&t[e+1];return a&&r}}var s=0,u=void 0!==e.begin?e.begin:e,l=void 0!==e.end?e.end:e;if(e.begin>e.end&&(u=e.end,l=e.begin),a=void 0!==a?a:u,u!==l||f.insertMode&&void 0!==o.validPositions[a]&&void 0===i||void 0===t){var c,p=n.extend(!0,{},o.validPositions),d=g(void 0,!0);for(o.p=u,c=d;u<=c;c--)delete o.validPositions[c],void 0===t&&delete o.tests[c+1];var m,h,k=!0,y=a,b=y;for(t&&(o.validPositions[a]=n.extend(!0,{},t),b++,y++),c=t?l:l-1;c<=d;c++){if(void 0!==(m=p[c])&&!0!==m.generatedInput&&(l<=c||u<=c&&r(c,p,{begin:u,end:l}))){for(;""!==_(b).match.def;){if(!1!==(h=S(b,m,f))||"+"===m.match.def){"+"===m.match.def&&E(!0);var x=C(b,m.input,"+"!==m.match.def,"+"!==m.match.def);if(k=!1!==x,y=(x.pos||b)+1,!k&&h)break}else k=!1;if(k){void 0===t&&m.match.static&&c===e.begin&&s++;break}if(!k&&b>o.maskLength)break;b++}""==_(b).match.def&&(k=!1),b=y}if(!k)break}if(!k)return o.validPositions=n.extend(!0,{},p),v(!0),!1}else t&&_(a).match.cd===t.match.cd&&(o.validPositions[a]=n.extend(!0,{},t));return v(!0),s}function T(e,t,i){var n=x(e).match;if(""===n.def&&(n=_(e).match),!0!==n.static)return n.fn;if(!0===i&&void 0!==o.validPositions[e]&&!0!==o.validPositions[e].generatedInput)return 1;if(!0!==t&&-1<e){if(i){var a=P(e);return a.length>1+(""===a[a.length-1].match.def?1:0)}var r=b(e,P(e)),s=L(e,r.match);return r.match.def!==s}}function I(e,t,i){void 0===i&&(i=!0);for(var n=e+1;""!==_(n).match.def&&(!0===t&&(!0!==_(n).match.newBlockMarker||!T(n,void 0,!0))||!0!==t&&!T(n,void 0,i));)n++;return n}function R(e,t){var i,n=e;if(n<=0)return 0;for(;0<--n&&(!0===t&&!0!==_(n).match.newBlockMarker||!0!==t&&!T(n,void 0,!0)&&((i=P(n)).length<2||2===i.length&&""===i[1].match.def)););return n}function B(e,t,a,r,o){if(r&&n.isFunction(f.onBeforeWrite)){var s=f.onBeforeWrite.call(i,r,t,a,f);if(s){if(s.refreshFromBuffer){var u=s.refreshFromBuffer;M(!0===u?u:u.start,u.end,s.buffer||t),t=E(!0)}void 0!==a&&(a=void 0!==s.caret?s.caret:a)}}if(void 0!==e&&(e.inputmask._valueSet(t.join("")),void 0===a||void 0!==r&&"blur"===r.type||z(e,a,void 0,void 0,void 0!==r&&"keydown"===r.type&&(r.keyCode===p.DELETE||r.keyCode===p.BACKSPACE)),!0===o)){var l=n(e),c=e.inputmask._valueGet();e.inputmask.skipInputEvent=!0,l.trigger("input"),setTimeout(function(){c===w().join("")?l.trigger("cleared"):!0===Z(t)&&l.trigger("complete")},0)}}function L(e,t,i){if(void 0!==(t=t||_(e).match).placeholder||!0===i)return n.isFunction(t.placeholder)?t.placeholder(f):t.placeholder;if(!0!==t.static)return f.placeholder.charAt(e%f.placeholder.length);if(-1<e&&void 0===o.validPositions[e]){var a,r=P(e),s=[];if(r.length>1+(""===r[r.length-1].match.def?1:0))for(var u=0;u<r.length;u++)if(""!==r[u].match.def&&!0!==r[u].match.optionality&&!0!==r[u].match.optionalQuantifier&&(!0===r[u].match.static||void 0===a||!1!==r[u].match.fn.test(a.match.def,o,e,!0,f))&&(s.push(r[u]),!0===r[u].match.static&&(a=r[u]),1<s.length&&/[0-9a-bA-Z]/.test(s[0].match.def)))return f.placeholder.charAt(e%f.placeholder.length)}return t.def}function N(e,t){if(s){if(e.inputmask._valueGet()!==t&&(e.placeholder!==t||""===e.placeholder)){var i=E().slice(),n=e.inputmask._valueGet();if(n!==t){var a=g();-1===a&&n===w().join("")?i=[]:-1!==a&&W(i),B(e,i)}}}else e.placeholder!==t&&(e.placeholder=t,""===e.placeholder&&e.removeAttribute("placeholder"))}function G(e,t){if(t&&(m?e.end=e.begin:e.begin=e.end),e.begin===e.end){switch(f.positionCaretOnClick){case"none":break;case"select":e={begin:0,end:E().length};break;case"ignore":e.end=e.begin=I(g());break;case"radixFocus":if(function(e){if(""!==f.radixPoint&&0!==f.digits){var t=o.validPositions;if(void 0===t[e]||t[e].input===L(e)){if(e<I(-1))return 1;var i=n.inArray(f.radixPoint,E());if(-1!==i){for(var a in t)if(t[a]&&i<a&&t[a].input!==L(a))return;return 1}}}}(e.begin)){var i=E().join("").indexOf(f.radixPoint);e.end=e.begin=f.numericInput?I(i):i;break}default:var a=e.begin,r=g(a,!0),s=I(-1!==r||T(0)?r:0);if(a<s)e.end=e.begin=T(a,!0)||T(a-1,!0)?a:I(a);else{var u=o.validPositions[r],l=x(s,u?u.match.locator:void 0,u),c=L(s,l.match);if(""!==c&&E()[s]!==c&&!0!==l.match.optionalQuantifier&&!0!==l.match.newBlockMarker||!T(s,f.keepStatic)&&l.match.def===c){var p=I(s);(p<=a||a===s)&&(s=p)}e.end=e.begin=s}}return e}}var V,K={on:function(e,t,i){var a=function(t){t.originalEvent&&(t=t.originalEvent||t,arguments[0]=t);var a,r=this,o=r.inputmask;if(void 0===o&&"FORM"!==this.nodeName){var s=n.data(r,"_inputmask_opts");n(r).off(),s&&new Inputmask(s).mask(r)}else{if("setvalue"===t.type||"FORM"===this.nodeName||!(r.disabled||r.readOnly&&!("keydown"===t.type&&t.ctrlKey&&67===t.keyCode||!1===f.tabThrough&&t.keyCode===p.TAB))){switch(t.type){case"input":if(!0===o.skipInputEvent||t.inputType&&"insertCompositionText"===t.inputType)return o.skipInputEvent=!1,t.preventDefault();break;case"keydown":o.skipKeyPressEvent=!1,o.skipInputEvent=!1;break;case"keypress":if(!0===o.skipKeyPressEvent)return t.preventDefault();o.skipKeyPressEvent=!0;break;case"click":case"focus":return o.validationEvent?(o.validationEvent=!1,e.blur(),N(e,(m?w().slice().reverse():w()).join("")),setTimeout(function(){e.focus()},3e3),!1):(a=arguments,setTimeout(function(){e.inputmask&&i.apply(r,a)},0),!1)}var u=i.apply(r,arguments);return!1===u&&(t.preventDefault(),t.stopPropagation()),u}t.preventDefault()}};e.inputmask.events[t]=e.inputmask.events[t]||[],e.inputmask.events[t].push(a),-1!==n.inArray(t,["submit","reset"])?null!==e.form&&n(e.form).on(t,a):n(e).on(t,a)},off:function(e,t){var i;e.inputmask&&e.inputmask.events&&(t?(i=[])[t]=e.inputmask.events[t]:i=e.inputmask.events,n.each(i,function(t,i){for(;0<i.length;){var a=i.pop();-1!==n.inArray(t,["submit","reset"])?null!==e.form&&n(e.form).off(t,a):n(e).off(t,a)}delete e.inputmask.events[t]}))}},H={keydownEvent:function(e){var t=this,a=n(t),r=e.keyCode,s=z(t),u=f.onKeyDown.call(this,e,E(),s,f);if(void 0!==u)return u;if(r===p.BACKSPACE||r===p.DELETE||c&&r===p.BACKSPACE_SAFARI||e.ctrlKey&&r===p.X&&!("oncut"in t))e.preventDefault(),J(t,r,s),B(t,E(!0),o.p,e,t.inputmask._valueGet()!==E().join(""));else if(r===p.END||r===p.PAGE_DOWN){e.preventDefault();var l=I(g());z(t,e.shiftKey?s.begin:l,l,!0)}else r===p.HOME&&!e.shiftKey||r===p.PAGE_UP?(e.preventDefault(),z(t,0,e.shiftKey?s.begin:0,!0)):(f.undoOnEscape&&r===p.ESCAPE||90===r&&e.ctrlKey)&&!0!==e.altKey?(q(t,!0,!1,i.undoValue.split("")),a.trigger("click")):!0===f.tabThrough&&r===p.TAB?(!0===e.shiftKey?(!0===_(s.begin).match.static&&(s.begin=I(s.begin)),s.end=R(s.begin,!0),s.begin=R(s.end,!0)):(s.begin=I(s.begin,!0),s.end=I(s.begin,!0),s.end<o.maskLength&&s.end--),s.begin<o.maskLength&&(e.preventDefault(),z(t,s.begin,s.end))):e.shiftKey||f.insertModeVisual&&!1===f.insertMode&&(r===p.RIGHT?setTimeout(function(){var e=z(t);z(t,e.begin)},0):r===p.LEFT&&setTimeout(function(){var e=$(t.inputmask.caretPos.begin);$(t.inputmask.caretPos.end);z(t,m?e+(e===o.maskLength?0:1):e-(0===e?0:1))},0));i.ignorable=-1!==n.inArray(r,f.ignorables)},keypressEvent:function(e,t,a,r,s){var u=this,l=n(u),c=e.which||e.charCode||e.keyCode;if(!(!0===t||e.ctrlKey&&e.altKey)&&(e.ctrlKey||e.metaKey||i.ignorable))return c===p.ENTER&&i.undoValue!==E().join("")&&(i.undoValue=E().join(""),setTimeout(function(){l.trigger("change")},0)),i.skipInputEvent=!0,!0;if(c){44!==c&&46!==c||3!==e.location||""===f.radixPoint||(c=f.radixPoint.charCodeAt(0));var d,m=t?{begin:s,end:s}:z(u),h=String.fromCharCode(c);o.writeOutBuffer=!0;var g=C(m,h,r,void 0,void 0,void 0,t);if(!1!==g&&(v(!0),d=void 0!==g.caret?g.caret:I(g.pos.begin?g.pos.begin:g.pos),o.p=d),d=f.numericInput&&void 0===g.caret?R(d):d,!1!==a&&(setTimeout(function(){f.onKeyValidation.call(u,c,g)},0),o.writeOutBuffer&&!1!==g)){var k=E();B(u,k,d,e,!0!==t)}if(e.preventDefault(),t)return!1!==g&&(g.forwardPosition=d),g}},pasteEvent:function(e){var t,r=this.inputmask._valueGet(!0),o=z(this);m&&(t=o.end,o.end=o.begin,o.begin=t);var s=r.substr(0,o.begin),u=r.substr(o.end,r.length);if(s==(m?w().slice().reverse():w()).slice(0,o.begin).join("")&&(s=""),u==(m?w().slice().reverse():w()).slice(o.end).join("")&&(u=""),a.clipboardData&&a.clipboardData.getData)r=s+a.clipboardData.getData("Text")+u;else{if(!e.clipboardData||!e.clipboardData.getData)return!0;r=s+e.clipboardData.getData("text/plain")+u}var l=r;if(n.isFunction(f.onBeforePaste)){if(!1===(l=f.onBeforePaste.call(i,r,f)))return e.preventDefault();l=l||r}return q(this,!0,!1,l.toString().split(""),e),e.preventDefault()},inputFallBackEvent:function(e){var t=this,a=t.inputmask._valueGet(!0),o=(m?E().slice().reverse():E()).join(""),s=z(t,void 0,void 0,!0);if(o!==a){var u=function(e,t,i){for(var n,a,r,o=e.substr(0,i.begin).split(""),s=e.substr(i.begin).split(""),u=t.substr(0,i.begin).split(""),l=t.substr(i.begin).split(""),c=o.length>=u.length?o.length:u.length,p=s.length>=l.length?s.length:l.length,d="",m=[];o.length<c;)o.push("~");for(;u.length<c;)u.push("~");for(;s.length<p;)s.unshift("~");for(;l.length<p;)l.unshift("~");var h=o.concat(s),v=u.concat(l);for(a=0,n=h.length;a<n;a++)switch(r=L($(a)),d){case"insertText":v[a-1]===h[a]&&i.begin==h.length-1&&m.push(h[a]),a=n;break;case"insertReplacementText":case"deleteContentBackward":"~"===h[a]?i.end++:a=n;break;default:h[a]!==v[a]&&(("~"===h[a+1]||h[a+1]===r||void 0===h[a+1])&&(v[a]===r&&"~"===v[a+1]||"~"===v[a])||"~"===v[a+1]&&v[a]===h[a+1]?(d="insertText",m.push(h[a]),i.begin--,i.end--):h[a]!==r&&"~"!==h[a]&&("~"===h[a+1]||v[a]!==h[a]&&v[a+1]===h[a+1])?(d="insertReplacementText",m.push(h[a]),i.begin--):"~"===h[a]?(d="deleteContentBackward",!T($(a),!0)&&v[a]!==f.radixPoint||i.end++):a=n)}return{action:d,data:m,caret:i}}(a=function(e,t,i){if(l){var n=t.replace(E().join(""),"");if(1===n.length){var a=t.split("");a.splice(i.begin,0,n),t=a.join("")}}return t}(0,a,s),o,s);switch((t.inputmask.shadowRoot||r).activeElement!==t&&t.focus(),B(t,E()),z(t,s.begin,s.end,!0),u.action){case"insertText":case"insertReplacementText":n.each(u.data,function(e,a){var r=new n.Event("keypress");r.which=a.charCodeAt(0),i.ignorable=!1,H.keypressEvent.call(t,r)}),setTimeout(function(){i.$el.trigger("keyup")},0);break;case"deleteContentBackward":var c=new n.Event("keydown");c.keyCode=p.BACKSPACE,H.keydownEvent.call(t,c);break;default:Y(t,a)}e.preventDefault()}},compositionendEvent:function(e){i.$el.trigger("input")},setValueEvent:function(e,t,i){var n=e&&e.detail?e.detail[0]:t;void 0===n&&(n=this.inputmask._valueGet(!0)),Y(this,n),(e.detail&&void 0!==e.detail[1]||void 0!==i)&&z(this,e.detail?e.detail[1]:i)},focusEvent:function(e){var t=this.inputmask._valueGet();f.showMaskOnFocus&&t!==E().join("")&&B(this,E(),I(g())),!0!==f.positionCaretOnTab||!1!==i.mouseEnter||Z(E())&&-1!==g()||H.clickEvent.apply(this,[e,!0]),i.undoValue=E().join("")},invalidEvent:function(e){i.validationEvent=!0},mouseleaveEvent:function(){i.mouseEnter=!1,f.clearMaskOnLostFocus&&(this.inputmask.shadowRoot||r).activeElement!==this&&N(this,i.originalPlaceholder)},clickEvent:function(e,t){if((this.inputmask.shadowRoot||r).activeElement===this){var i=G(z(this),t);void 0!==i&&z(this,i)}},cutEvent:function(e){var t=z(this),n=a.clipboardData||e.clipboardData,s=m?E().slice(t.end,t.begin):E().slice(t.begin,t.end);n.setData("text",m?s.reverse().join(""):s.join("")),r.execCommand&&r.execCommand("copy"),J(this,p.DELETE,t),B(this,E(),o.p,e,i.undoValue!==E().join(""))},blurEvent:function(e){var t=n(this);if(this.inputmask){N(this,i.originalPlaceholder);var a=this.inputmask._valueGet(),r=E().slice();""!==a&&(f.clearMaskOnLostFocus&&(-1===g()&&a===w().join("")?r=[]:W(r)),!1===Z(r)&&(setTimeout(function(){t.trigger("incomplete")},0),f.clearIncomplete&&(v(),r=f.clearMaskOnLostFocus?[]:w().slice())),B(this,r,void 0,e)),i.undoValue!==E().join("")&&(i.undoValue=E().join(""),t.trigger("change"))}},mouseenterEvent:function(){i.mouseEnter=!0,(this.inputmask.shadowRoot||r).activeElement!==this&&(null==i.originalPlaceholder&&this.placeholder!==i.originalPlaceholder&&(i.originalPlaceholder=this.placeholder),f.showMaskOnHover&&N(this,(m?w().slice().reverse():w()).join("")))},submitEvent:function(){i.undoValue!==E().join("")&&i.$el.trigger("change"),f.clearMaskOnLostFocus&&-1===g()&&d.inputmask._valueGet&&d.inputmask._valueGet()===w().join("")&&d.inputmask._valueSet(""),f.clearIncomplete&&!1===Z(E())&&d.inputmask._valueSet(""),f.removeMaskOnSubmit&&(d.inputmask._valueSet(d.inputmask.unmaskedvalue(),!0),setTimeout(function(){B(d,E())},0))},resetEvent:function(){d.inputmask.refreshValue=!0,setTimeout(function(){Y(d,d.inputmask._valueGet(!0))},0)}};function q(e,t,i,a,r){var s=this||e.inputmask,u=a.slice(),l="",c=-1,p=void 0;v(),o.tests={},c=f.radixPoint?G({begin:0,end:0}).begin:0,o.p=c,s.caretPos={begin:c};var d=[],k=s.caretPos;if(n.each(u,function(t,a){if(void 0!==a)if(void 0===o.validPositions[t]&&u[t]===L(t)&&T(t,!0)&&!1===C(t,u[t],!0,void 0,void 0,!0))o.p++;else{var r=new n.Event("_checkval");r.which=a.toString().charCodeAt(0),l+=a;var f=g(void 0,!0);!function(e,t){for(var i=h(!0,0).slice(e,I(e)).join("").replace(/'/g,""),n=i.indexOf(t);0<n&&" "===i[n-1];)n--;var a=0===n&&!T(e)&&(_(e).match.nativeDef===t.charAt(0)||!0===_(e).match.static&&_(e).match.nativeDef==="'"+t.charAt(0)||" "===_(e).match.nativeDef&&(_(e+1).match.nativeDef===t.charAt(0)||!0===_(e+1).match.static&&_(e+1).match.nativeDef==="'"+t.charAt(0)));if(!a&&0<n&&!T(e,!1,!0)){var r=I(e);s.caretPos.begin<r&&(s.caretPos={begin:r})}return a}(c,l)?(p=H.keypressEvent.call(e,r,!0,!1,i,s.caretPos.begin))&&(c=s.caretPos.begin+1,l=""):p=H.keypressEvent.call(e,r,!0,!1,i,f+1),p?(void 0!==p.pos&&o.validPositions[p.pos]&&!0===o.validPositions[p.pos].match.static&&void 0===o.validPositions[p.pos].alternation&&(d.push(p.pos),m||(p.forwardPosition=p.pos+1)),B(void 0,E(),p.forwardPosition,r,!1),s.caretPos={begin:p.forwardPosition,end:p.forwardPosition},k=s.caretPos):s.caretPos=k}}),0<d.length){var y,b,x=I(-1,void 0,!1);if(!Z(E())&&d.length<=x||Z(E())&&0<d.length&&d.length!==x&&0===d[0])for(var S=x;void 0!==(y=d.shift());){var P=new n.Event("_checkval");if((b=o.validPositions[y]).generatedInput=!0,P.which=b.input.charCodeAt(0),(p=H.keypressEvent.call(e,P,!0,!1,i,S))&&void 0!==p.pos&&p.pos!==y&&o.validPositions[p.pos]&&!0===o.validPositions[p.pos].match.static)d.push(p.pos);else if(!p)break;S++}}t&&B(e,E(),p?p.forwardPosition:s.caretPos.begin,r||new n.Event("checkval"),r&&"input"===r.type&&s.undoValue!==E().join(""))}function U(e){if(e){if(void 0===e.inputmask)return e.value;e.inputmask&&e.inputmask.refreshValue&&Y(e,e.inputmask._valueGet(!0))}var t=[],a=o.validPositions;for(var r in a)a[r]&&a[r].match&&(1!=a[r].match.static||!0!==a[r].generatedInput)&&t.push(a[r].input);var s=0===t.length?"":(m?t.reverse():t).join("");if(n.isFunction(f.onUnMask)){var u=(m?E().slice().reverse():E()).join("");s=f.onUnMask.call(i,u,s,f)}return s}function $(e){return!m||"number"!=typeof e||f.greedy&&""===f.placeholder||!d||(e=d.inputmask._valueGet().length-e),e}function z(e,t,i,o,s){var u;if(void 0===t)return"selectionStart"in e&&"selectionEnd"in e?(t=e.selectionStart,i=e.selectionEnd):a.getSelection?(u=a.getSelection().getRangeAt(0)).commonAncestorContainer.parentNode!==e&&u.commonAncestorContainer!==e||(t=u.startOffset,i=u.endOffset):r.selection&&r.selection.createRange&&(i=(t=0-(u=r.selection.createRange()).duplicate().moveStart("character",-e.inputmask._valueGet().length))+u.text.length),{begin:o?t:$(t),end:o?i:$(i)};if(n.isArray(t)&&(i=m?t[0]:t[1],t=m?t[1]:t[0]),void 0!==t.begin&&(i=m?t.begin:t.end,t=m?t.end:t.begin),"number"==typeof t){t=o?t:$(t),i="number"==typeof(i=o?i:$(i))?i:t;var l=parseInt(((e.ownerDocument.defaultView||a).getComputedStyle?(e.ownerDocument.defaultView||a).getComputedStyle(e,null):e.currentStyle).fontSize)*i;if(e.scrollLeft=l>e.scrollWidth?l:0,e.inputmask.caretPos={begin:t,end:i},f.insertModeVisual&&!1===f.insertMode&&t===i&&(s||i++),e===(e.inputmask.shadowRoot||r).activeElement)if("setSelectionRange"in e)e.setSelectionRange(t,i);else if(a.getSelection){if(u=r.createRange(),void 0===e.firstChild||null===e.firstChild){var c=r.createTextNode("");e.appendChild(c)}u.setStart(e.firstChild,t<e.inputmask._valueGet().length?t:e.inputmask._valueGet().length),u.setEnd(e.firstChild,i<e.inputmask._valueGet().length?i:e.inputmask._valueGet().length),u.collapse(!0);var p=a.getSelection();p.removeAllRanges(),p.addRange(u)}else e.createTextRange&&((u=e.createTextRange()).collapse(!0),u.moveEnd("character",i),u.moveStart("character",t),u.select())}}function Q(e){var t,i,a=h(!0,g(),!0,!0),r=a.length,s=g(),u={},l=o.validPositions[s],c=void 0!==l?l.locator.slice():void 0;for(t=s+1;t<a.length;t++)c=(i=x(t,c,t-1)).locator.slice(),u[t]=n.extend(!0,{},i);var p=l&&void 0!==l.alternation?l.locator[l.alternation]:void 0;for(t=r-1;s<t&&(((i=u[t]).match.optionality||i.match.optionalQuantifier&&i.match.newBlockMarker||p&&(p!==u[t].locator[l.alternation]&&1!=i.match.static||!0===i.match.static&&i.locator[l.alternation]&&A(i.locator[l.alternation].toString().split(","),p.toString().split(","))&&""!==P(t)[0].def))&&a[t]===L(t,i.match));t--)r--;return e?{l:r,def:u[r]?u[r].match:void 0}:r}function W(e){e.length=0;for(var t,i=h(!0,0,!0,void 0,!0);void 0!==(t=i.shift());)e.push(t);return e}function Z(e){if(n.isFunction(f.isComplete))return f.isComplete(e,f);if("*"!==f.repeat){var t=!1,i=Q(!0),a=R(i.l);if(void 0===i.def||i.def.newBlockMarker||i.def.optionality||i.def.optionalQuantifier){t=!0;for(var r=0;r<=a;r++){var s=x(r).match;if(!0!==s.static&&void 0===o.validPositions[r]&&!0!==s.optionality&&!0!==s.optionalQuantifier||!0===s.static&&e[r]!==L(r,s)){t=!1;break}}}return t}}function J(e,t,i,n,a){if((f.numericInput||m)&&(t===p.BACKSPACE?t=p.DELETE:t===p.DELETE&&(t=p.BACKSPACE),m)){var r=i.end;i.end=i.begin,i.begin=r}var s,u=g(void 0,!0);if(i.end>=E().length&&u>=i.end&&(i.end=u+1),t===p.BACKSPACE?i.end-i.begin<1&&(i.begin=R(i.begin)):t===p.DELETE&&i.begin===i.end&&(i.end=T(i.end,!0,!0)?i.end+1:I(i.end)+1),!1!==(s=F(i))){if(!0!==n&&!1!==f.keepStatic||null!==f.regex&&-1!==_(i.begin).match.def.indexOf("|")){var l=D(!0);if(l){var c=void 0!==l.caret?l.caret:l.pos?I(l.pos.begin?l.pos.begin:l.pos):g(-1,!0);(t!==p.DELETE||i.begin>c)&&i.begin}}!0!==n&&(o.p=t===p.DELETE?i.begin+s:i.begin)}}function Y(e,t){e.inputmask.refreshValue=!1,n.isFunction(f.onBeforeMask)&&(t=f.onBeforeMask.call(i,t,f)||t),q(e,!0,!1,t=t.toString().split("")),i.undoValue=E().join(""),(f.clearMaskOnLostFocus||f.clearIncomplete)&&e.inputmask._valueGet()===w().join("")&&-1===g()&&e.inputmask._valueSet("")}if(void 0!==t)switch(t.action){case"isComplete":return d=t.el,Z(E());case"unmaskedvalue":return void 0!==d&&void 0===t.value||(V=t.value,V=(n.isFunction(f.onBeforeMask)&&f.onBeforeMask.call(i,V,f)||V).split(""),q.call(this,void 0,!1,!1,V),n.isFunction(f.onBeforeWrite)&&f.onBeforeWrite.call(i,void 0,E(),0,f)),U(d);case"mask":!function(){K.off(d);var e=function(e,t){"textarea"!==e.tagName.toLowerCase()&&t.ignorables.push(p.ENTER);var i=e.getAttribute("type"),a="input"===e.tagName.toLowerCase()&&-1!==n.inArray(i,t.supportsInputType)||e.isContentEditable||"textarea"===e.tagName.toLowerCase();if(!a)if("input"===e.tagName.toLowerCase()){var o=r.createElement("input");o.setAttribute("type",i),a="text"===o.type,o=null}else a="partial";return!1!==a?function(e){var i,a;function o(){return this.inputmask?this.inputmask.opts.autoUnmask?this.inputmask.unmaskedvalue():-1!==g()||!0!==t.nullable?(this.inputmask.shadowRoot||r.activeElement)===this&&t.clearMaskOnLostFocus?(m?W(E().slice()).reverse():W(E().slice())).join(""):i.call(this):"":i.call(this)}function s(e){a.call(this,e),this.inputmask&&Y(this,e)}if(!e.inputmask.__valueGet){if(!0!==t.noValuePatching){if(Object.getOwnPropertyDescriptor){var u=Object.getPrototypeOf?Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e),"value"):void 0;u&&u.get&&u.set?(i=u.get,a=u.set,Object.defineProperty(e,"value",{get:o,set:s,configurable:!0})):"input"!==e.tagName.toLowerCase()&&(i=function(){return this.textContent},a=function(e){this.textContent=e},Object.defineProperty(e,"value",{get:o,set:s,configurable:!0}))}else r.__lookupGetter__&&e.__lookupGetter__("value")&&(i=e.__lookupGetter__("value"),a=e.__lookupSetter__("value"),e.__defineGetter__("value",o),e.__defineSetter__("value",s));e.inputmask.__valueGet=i,e.inputmask.__valueSet=a}e.inputmask._valueGet=function(e){return m&&!0!==e?i.call(this.el).split("").reverse().join(""):i.call(this.el)},e.inputmask._valueSet=function(e,t){a.call(this.el,null==e?"":!0!==t&&m?e.split("").reverse().join(""):e)},void 0===i&&(i=function(){return this.value},a=function(e){this.value=e},function(e){if(n.valHooks&&(void 0===n.valHooks[e]||!0!==n.valHooks[e].inputmaskpatch)){var i=n.valHooks[e]&&n.valHooks[e].get?n.valHooks[e].get:function(e){return e.value},a=n.valHooks[e]&&n.valHooks[e].set?n.valHooks[e].set:function(e,t){return e.value=t,e};n.valHooks[e]={get:function(e){if(e.inputmask){if(e.inputmask.opts.autoUnmask)return e.inputmask.unmaskedvalue();var n=i(e);return-1!==g(void 0,void 0,e.inputmask.maskset.validPositions)||!0!==t.nullable?n:""}return i(e)},set:function(e,t){var i=a(e,t);return e.inputmask&&Y(e,t),i},inputmaskpatch:!0}}}(e.type),function(e){K.on(e,"mouseenter",function(){var e=this.inputmask._valueGet(!0);e!==(m?E().reverse():E()).join("")&&Y(this,e)})}(e))}}(e):e.inputmask=void 0,a}(d,f);if(!1!==e){i.originalPlaceholder=d.placeholder,i.maxLength=void 0!==d?d.maxLength:void 0,-1===i.maxLength&&(i.maxLength=void 0),"inputMode"in d&&null===d.getAttribute("inputmode")&&(d.inputMode=f.inputmode,d.setAttribute("inputmode",f.inputmode)),!0===e&&(f.showMaskOnFocus=f.showMaskOnFocus&&-1===["cc-number","cc-exp"].indexOf(d.autocomplete),c&&(f.insertModeVisual=!1),K.on(d,"submit",H.submitEvent),K.on(d,"reset",H.resetEvent),K.on(d,"blur",H.blurEvent),K.on(d,"focus",H.focusEvent),K.on(d,"invalid",H.invalidEvent),K.on(d,"click",H.clickEvent),K.on(d,"mouseleave",H.mouseleaveEvent),K.on(d,"mouseenter",H.mouseenterEvent),K.on(d,"paste",H.pasteEvent),K.on(d,"cut",H.cutEvent),K.on(d,"complete",f.oncomplete),K.on(d,"incomplete",f.onincomplete),K.on(d,"cleared",f.oncleared),u||!0===f.inputEventOnly?d.removeAttribute("maxLength"):(K.on(d,"keydown",H.keydownEvent),K.on(d,"keypress",H.keypressEvent)),K.on(d,"input",H.inputFallBackEvent),K.on(d,"compositionend",H.compositionendEvent)),K.on(d,"setvalue",H.setValueEvent),i.undoValue=w().join("");var t=(d.inputmask.shadowRoot||r).activeElement;if(""!==d.inputmask._valueGet(!0)||!1===f.clearMaskOnLostFocus||t===d){Y(d,d.inputmask._valueGet(!0));var a=E().slice();!1===Z(a)&&f.clearIncomplete&&v(),f.clearMaskOnLostFocus&&t!==d&&(-1===g()?a=[]:W(a)),(!1===f.clearMaskOnLostFocus||f.showMaskOnFocus&&t===d||""!==d.inputmask._valueGet(!0))&&B(d,a),t===d&&z(d,I(g()))}}}();break;case"format":return V=(n.isFunction(f.onBeforeMask)&&f.onBeforeMask.call(i,t.value,f)||t.value).split(""),q.call(this,void 0,!0,!1,V),t.metadata?{value:m?E().slice().reverse().join(""):E().join(""),metadata:e.call(this,{action:"getmetadata"},o,f)}:m?E().slice().reverse().join(""):E().join("");case"isValid":t.value?(V=(n.isFunction(f.onBeforeMask)&&f.onBeforeMask.call(i,t.value,f)||t.value).split(""),q.call(this,void 0,!0,!1,V)):t.value=m?E().slice().reverse().join(""):E().join("");for(var X=E(),ee=Q(),te=X.length-1;ee<te&&!T(te);te--);return X.splice(ee,te+1-ee),Z(X)&&t.value===(m?E().slice().reverse().join(""):E().join(""));case"getemptymask":return w().join("");case"remove":if(d&&d.inputmask){n.data(d,"_inputmask_opts",null);var ie=f.autoUnmask?U(d):d.inputmask._valueGet(f.autoUnmask);ie!==w().join("")?d.inputmask._valueSet(ie,f.autoUnmask):d.inputmask._valueSet(""),K.off(d),Object.getOwnPropertyDescriptor&&Object.getPrototypeOf?Object.getOwnPropertyDescriptor(Object.getPrototypeOf(d),"value")&&d.inputmask.__valueGet&&Object.defineProperty(d,"value",{get:d.inputmask.__valueGet,set:d.inputmask.__valueSet,configurable:!0}):r.__lookupGetter__&&d.__lookupGetter__("value")&&d.inputmask.__valueGet&&(d.__defineGetter__("value",d.inputmask.__valueGet),d.__defineSetter__("value",d.inputmask.__valueSet)),d.inputmask=void 0}return d;case"getmetadata":if(n.isArray(o.metadata)){var ne=h(!0,0,!1).join("");return n.each(o.metadata,function(e,t){if(t.mask===ne)return ne=t,!1}),ne}return o.metadata}}},function(e,t,i){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}"function"!=typeof Object.getPrototypeOf&&(Object.getPrototypeOf="object"===n("test".__proto__)?function(e){return e.__proto__}:function(e){return e.constructor.prototype})},function(e,t,i){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var a=i(1),r=a.dependencyLib,o=i(0),s=(new Date).getFullYear(),u=i(6).default,l={d:["[1-9]|[12][0-9]|3[01]",Date.prototype.setDate,"day",Date.prototype.getDate],dd:["0[1-9]|[12][0-9]|3[01]",Date.prototype.setDate,"day",function(){return m(Date.prototype.getDate.call(this),2)}],ddd:[""],dddd:[""],m:["[1-9]|1[012]",Date.prototype.setMonth,"month",function(){return Date.prototype.getMonth.call(this)+1}],mm:["0[1-9]|1[012]",Date.prototype.setMonth,"month",function(){return m(Date.prototype.getMonth.call(this)+1,2)}],mmm:[""],mmmm:[""],yy:["[0-9]{2}",Date.prototype.setFullYear,"year",function(){return m(Date.prototype.getFullYear.call(this),2)}],yyyy:["[0-9]{4}",Date.prototype.setFullYear,"year",function(){return m(Date.prototype.getFullYear.call(this),4)}],h:["[1-9]|1[0-2]",Date.prototype.setHours,"hours",Date.prototype.getHours],hh:["0[1-9]|1[0-2]",Date.prototype.setHours,"hours",function(){return m(Date.prototype.getHours.call(this),2)}],hx:[function(e){return"[0-9]{".concat(e,"}")},Date.prototype.setHours,"hours",function(e){return Date.prototype.getHours}],H:["1?[0-9]|2[0-3]",Date.prototype.setHours,"hours",Date.prototype.getHours],HH:["0[0-9]|1[0-9]|2[0-3]",Date.prototype.setHours,"hours",function(){return m(Date.prototype.getHours.call(this),2)}],Hx:[function(e){return"[0-9]{".concat(e,"}")},Date.prototype.setHours,"hours",function(e){return function(){return m(Date.prototype.getHours.call(this),e)}}],M:["[1-5]?[0-9]",Date.prototype.setMinutes,"minutes",Date.prototype.getMinutes],MM:["0[0-9]|1[0-9]|2[0-9]|3[0-9]|4[0-9]|5[0-9]",Date.prototype.setMinutes,"minutes",function(){return m(Date.prototype.getMinutes.call(this),2)}],s:["[1-5]?[0-9]",Date.prototype.setSeconds,"seconds",Date.prototype.getSeconds],ss:["0[0-9]|1[0-9]|2[0-9]|3[0-9]|4[0-9]|5[0-9]",Date.prototype.setSeconds,"seconds",function(){return m(Date.prototype.getSeconds.call(this),2)}],l:["[0-9]{3}",Date.prototype.setMilliseconds,"milliseconds",function(){return m(Date.prototype.getMilliseconds.call(this),3)}],L:["[0-9]{2}",Date.prototype.setMilliseconds,"milliseconds",function(){return m(Date.prototype.getMilliseconds.call(this),2)}],t:["[ap]"],tt:["[ap]m"],T:["[AP]"],TT:["[AP]M"],Z:[""],o:[""],S:[""]},c={isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"};function p(e){var t=new RegExp("\\d+$").exec(e[0]);if(t&&void 0!==t[0]){var i=l[e[0][0]+"x"].slice("");return i[0]=i[0](t[0]),i[3]=i[3](t[0]),i}if(l[e[0]])return l[e[0]]}function f(e){if(!e.tokenizer){var t=[],i=[];for(var n in l)if(/\.*x$/.test(n)){var a=n[0]+"\\d+";-1===i.indexOf(a)&&i.push(a)}else-1===t.indexOf(n[0])&&t.push(n[0]);e.tokenizer="("+(0<i.length?i.join("|")+"|":"")+t.join("+|")+")+?|.",e.tokenizer=new RegExp(e.tokenizer,"g")}return e.tokenizer}function d(e,t,i,n){var a,r,o="";for(f(i).lastIndex=0;a=f(i).exec(e);)if(void 0===t)if(r=p(a))o+="("+r[0]+")";else switch(a[0]){case"[":o+="(";break;case"]":o+=")?";break;default:o+=u(a[0])}else if(r=p(a))if(!0!==n&&r[3]){o+=r[3].call(t.date)}else r[2]?o+=t["raw"+r[2]]:o+=a[0];else o+=a[0];return o}function m(e,t){for(e=String(e),t=t||2;e.length<t;)e="0"+e;return e}function h(e,t,i){var a,r,o,s={date:new Date(1,0,1)},u=e;function c(e,t,i){e[a]=t.replace(/[^0-9]/g,"0"),e["raw"+a]=t,void 0!==o&&o.call(e.date,"month"==a?parseInt(e[a])-1:e[a])}if("string"==typeof u){for(f(i).lastIndex=0;r=f(i).exec(t);){var p=new RegExp("\\d+$").exec(r[0]),d=p?r[0][0]+"x":r[0],m=void 0;if(p){var h=f(i).lastIndex,v=g(r.index,i);f(i).lastIndex=h,m=u.slice(0,u.indexOf(v.nextMatch[0]))}else m=u.slice(0,d.length);Object.prototype.hasOwnProperty.call(l,d)&&(a=l[d][2],o=l[d][1],c(s,m)),u=u.slice(m.length)}return s}if(u&&"object"===n(u)&&Object.prototype.hasOwnProperty.call(u,"date"))return u}function v(e,t){return d(t.inputFormat,{date:e},t)}function g(e,t){var i,n,a=0,r=0;for(f(t).lastIndex=0;n=f(t).exec(t.inputFormat);){var o=new RegExp("\\d+$").exec(n[0]);if(e<=(a+=r=o?parseInt(o[0]):n[0].length)){i=n,n=f(t).exec(t.inputFormat);break}}return{targetMatchIndex:a-r,nextMatch:n,targetMatch:i}}a.extendAliases({datetime:{mask:function(e){return e.numericInput=!1,l.S=e.i18n.ordinalSuffix.join("|"),e.inputFormat=c[e.inputFormat]||e.inputFormat,e.displayFormat=c[e.displayFormat]||e.displayFormat||e.inputFormat,e.outputFormat=c[e.outputFormat]||e.outputFormat||e.inputFormat,e.placeholder=""!==e.placeholder?e.placeholder:e.inputFormat.replace(/[[\]]/,""),e.regex=d(e.inputFormat,void 0,e),e.min=h(e.min,e.inputFormat,e),e.max=h(e.max,e.inputFormat,e),null},placeholder:"",inputFormat:"isoDateTime",displayFormat:void 0,outputFormat:void 0,min:null,max:null,skipOptionalPartCharacter:"",i18n:{dayNames:["Mon","Tue","Wed","Thu","Fri","Sat","Sun","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"],ordinalSuffix:["st","nd","rd","th"]},preValidation:function(e,t,i,n,a,r,o,s){if(s)return!0;if(isNaN(i)&&e[t]!==i){var u=g(t,a);if(u.nextMatch&&u.nextMatch[0]===i&&1<u.targetMatch[0].length){var c=l[u.targetMatch[0]][0];if(new RegExp(c).test("0"+e[t-1]))return e[t]=e[t-1],e[t-1]="0",{fuzzy:!0,buffer:e,refreshFromBuffer:{start:t-1,end:t+1},pos:t+1}}}return!0},postValidation:function(e,t,i,n,a,r,o,u){if(o)return!0;var c,p;if(!1===n)return(c=g(t+1,a)).targetMatch&&c.targetMatchIndex===t&&1<c.targetMatch[0].length&&void 0!==l[c.targetMatch[0]]&&(p=l[c.targetMatch[0]][0],new RegExp(p).test("0"+i))?{insert:[{pos:t,c:"0"},{pos:t+1,c:i}],pos:t+1}:n;if(n.fuzzy&&(e=n.buffer,t=n.pos),(c=g(t,a)).targetMatch&&c.targetMatch[0]&&void 0!==l[c.targetMatch[0]]){p=l[c.targetMatch[0]][0];var f=e.slice(c.targetMatchIndex,c.targetMatchIndex+c.targetMatch[0].length);!1===new RegExp(p).test(f.join(""))&&2===c.targetMatch[0].length&&r.validPositions[c.targetMatchIndex]&&r.validPositions[c.targetMatchIndex+1]&&(r.validPositions[c.targetMatchIndex+1].input="0")}var m=n,v=h(e.join(""),a.inputFormat,a);return m&&v.date.getTime()==v.date.getTime()&&(m=function(e,t,i){if(e.year!==e.rawyear){var n=s.toString(),a=e.rawyear.replace(/[^0-9]/g,""),r=n.slice(0,a.length),o=n.slice(a.length);if(2===a.length&&a===r){var u=new Date(s,e.month-1,e.day);e.day===u.getDay()&&(!i.max||i.max.date.getTime()>=u.getTime())&&(e.date.setFullYear(s),e.year=n,t.insert=[{pos:t.pos+1,c:o[0]},{pos:t.pos+2,c:o[1]}])}}return t}(v,m,a),m=function(e,t,i){if(!isFinite(e.rawday)||"29"==e.day&&!isFinite(e.rawyear)||new Date(e.date.getFullYear(),isFinite(e.rawmonth)?e.month:e.date.getMonth()+1,0).getDate()>=e.day)return t;if("29"==e.day){var n=g(t.pos,i);if("yyyy"===n.targetMatch[0]&&t.pos-n.targetMatchIndex==2)return t.remove=t.pos+1,t}return!1}(v,m,a),m=function(e,t,i,n,a){if(!t)return t;if(i.min){if(e.rawyear){var r,o=e.rawyear.replace(/[^0-9]/g,""),s=i.min.year.substr(0,o.length);if(o<s){var u=g(t.pos,i);if(o=e.rawyear.substr(0,t.pos-u.targetMatchIndex+1),(s=i.min.year.substr(0,o.length))<=o)return t.remove=u.targetMatchIndex+o.length,t;if(o="yyyy"===u.targetMatch[0]?e.rawyear.substr(1,1):e.rawyear.substr(0,1),s=i.min.year.substr(2,1),r=i.max?i.max.year.substr(2,1):o,1===o.length&&s<=o<=r&&!0!==a)return"yyyy"===u.targetMatch[0]?(t.insert=[{pos:t.pos+1,c:o,strict:!0}],t.caret=t.pos+2,n.validPositions[t.pos].input=i.min.year[1]):(t.insert=[{pos:t.pos+1,c:i.min.year[1],strict:!0},{pos:t.pos+2,c:o,strict:!0}],t.caret=t.pos+3,n.validPositions[t.pos].input=i.min.year[0]),t;t=!1}}t&&e.year&&e.year===e.rawyear&&i.min.date.getTime()==i.min.date.getTime()&&(t=i.min.date.getTime()<=e.date.getTime())}return t&&i.max&&i.max.date.getTime()==i.max.date.getTime()&&(t=i.max.date.getTime()>=e.date.getTime()),t}(v,m,a,r,u)),t&&m&&n.pos!==t?{buffer:d(a.inputFormat,v,a).split(""),refreshFromBuffer:{start:t,end:n.pos}}:m},onKeyDown:function(e,t,i,n){e.ctrlKey&&e.keyCode===o.RIGHT&&(this.inputmask._valueSet(v(new Date,n)),r(this).trigger("setvalue"))},onUnMask:function(e,t,i){return t?d(i.outputFormat,h(e,i.inputFormat,i),i,!0):t},casing:function(e,t,i,n){return 0==t.nativeDef.indexOf("[ap]")?e.toLowerCase():0==t.nativeDef.indexOf("[AP]")?e.toUpperCase():e},onBeforeMask:function(e,t){return"[object Date]"===Object.prototype.toString.call(e)&&(e=v(e,t)),e},insertMode:!1,shiftPositions:!1,keepStatic:!1,inputmode:"numeric"}}),e.exports=a},function(e,t,i){"use strict";var n=i(1),a=n.dependencyLib,r=i(0),o=i(6).default;function s(e,t){for(var i="",a=0;a<e.length;a++)n.prototype.definitions[e.charAt(a)]||t.definitions[e.charAt(a)]||t.optionalmarker[0]===e.charAt(a)||t.optionalmarker[1]===e.charAt(a)||t.quantifiermarker[0]===e.charAt(a)||t.quantifiermarker[1]===e.charAt(a)||t.groupmarker[0]===e.charAt(a)||t.groupmarker[1]===e.charAt(a)||t.alternatormarker===e.charAt(a)?i+="\\"+e.charAt(a):i+=e.charAt(a);return i}function u(e,t,i,n){if(0<e.length&&0<t&&(!i.digitsOptional||n)){var r=a.inArray(i.radixPoint,e);-1===r&&(e.push(i.radixPoint),r=e.length-1);for(var o=1;o<=t;o++)isFinite(e[r+o])||(e[r+o]="0")}return e}function l(e,t){var i=0;if("+"===e){for(i in t.validPositions);i=parseInt(i)}for(var n in t.tests)if(i<=(n=parseInt(n)))for(var a=0,r=t.tests[n].length;a<r;a++)if((void 0===t.validPositions[n]||"-"===e)&&t.tests[n][a].match.def===e)return n+(void 0!==t.validPositions[n]&&"-"!==e?1:0);return i}function c(e,t){var i=-1;return a.each(t.validPositions,function(t,n){if(n&&n.match.def===e)return i=parseInt(t),!1}),i}function p(e,t,i,n,a){var r=t.buffer?t.buffer.indexOf(a.radixPoint):-1,o=-1!==r&&new RegExp("[0-91-9]").test(e);return a._radixDance&&o&&null==t.validPositions[r]?{insert:{pos:r===i?r+1:r,c:a.radixPoint},pos:i}:o}n.extendAliases({numeric:{mask:function(e){e.repeat=0,e.groupSeparator===e.radixPoint&&e.digits&&"0"!==e.digits&&("."===e.radixPoint?e.groupSeparator=",":","===e.radixPoint?e.groupSeparator=".":e.groupSeparator="")," "===e.groupSeparator&&(e.skipOptionalPartCharacter=void 0),1<e.placeholder.length&&(e.placeholder=e.placeholder.charAt(0)),"radixFocus"===e.positionCaretOnClick&&""===e.placeholder&&(e.positionCaretOnClick="lvp");var t="0",i=e.radixPoint;!0===e.numericInput&&void 0===e.__financeInput?(t="1",e.positionCaretOnClick="radixFocus"===e.positionCaretOnClick?"lvp":e.positionCaretOnClick,e.digitsOptional=!1,isNaN(e.digits)&&(e.digits=2),e._radixDance=!1,i=","===e.radixPoint?"?":"!",""!==e.radixPoint&&void 0===e.definitions[i]&&(e.definitions[i]={},e.definitions[i].validator="["+e.radixPoint+"]",e.definitions[i].placeholder=e.radixPoint,e.definitions[i].static=!0,e.definitions[i].generated=!0)):(e.__financeInput=!1,e.numericInput=!0);var n,a="[+]";if(a+=s(e.prefix,e),""!==e.groupSeparator?(void 0===e.definitions[e.groupSeparator]&&(e.definitions[e.groupSeparator]={},e.definitions[e.groupSeparator].validator="["+e.groupSeparator+"]",e.definitions[e.groupSeparator].placeholder=e.groupSeparator,e.definitions[e.groupSeparator].static=!0,e.definitions[e.groupSeparator].generated=!0),a+=e._mask(e)):a+="9{+}",void 0!==e.digits&&0!==e.digits){var r=e.digits.toString().split(",");isFinite(r[0])&&r[1]&&isFinite(r[1])?a+=i+t+"{"+e.digits+"}":(isNaN(e.digits)||0<parseInt(e.digits))&&(e.digitsOptional?(n=a+i+t+"{0,"+e.digits+"}",e.keepStatic=!0):a+=i+t+"{"+e.digits+"}")}return a+=s(e.suffix,e),a+="[-]",n&&(a=[n+s(e.suffix,e)+"[-]",a]),e.greedy=!1,function(e){void 0===e.parseMinMaxOptions&&(null!==e.min&&(e.min=e.min.toString().replace(new RegExp(o(e.groupSeparator),"g"),""),","===e.radixPoint&&(e.min=e.min.replace(e.radixPoint,".")),e.min=isFinite(e.min)?parseFloat(e.min):NaN,isNaN(e.min)&&(e.min=Number.MIN_VALUE)),null!==e.max&&(e.max=e.max.toString().replace(new RegExp(o(e.groupSeparator),"g"),""),","===e.radixPoint&&(e.max=e.max.replace(e.radixPoint,".")),e.max=isFinite(e.max)?parseFloat(e.max):NaN,isNaN(e.max)&&(e.max=Number.MAX_VALUE)),e.parseMinMaxOptions="done")}(e),a},_mask:function(e){return"("+e.groupSeparator+"999){+|1}"},digits:"*",digitsOptional:!0,enforceDigitsOnBlur:!1,radixPoint:".",positionCaretOnClick:"radixFocus",_radixDance:!0,groupSeparator:"",allowMinus:!0,negationSymbol:{front:"-",back:""},prefix:"",suffix:"",min:null,max:null,SetMaxOnOverflow:!1,step:1,inputType:"text",unmaskAsNumber:!1,roundingFN:Math.round,inputmode:"numeric",shortcuts:{k:"000",m:"000000"},placeholder:"0",greedy:!1,rightAlign:!0,insertMode:!0,autoUnmask:!1,skipOptionalPartCharacter:"",definitions:{0:{validator:p},1:{validator:p,definitionSymbol:"9"},"+":{validator:function(e,t,i,n,a){return a.allowMinus&&("-"===e||e===a.negationSymbol.front)}},"-":{validator:function(e,t,i,n,a){return a.allowMinus&&e===a.negationSymbol.back}}},preValidation:function(e,t,i,n,r,o,s,u){if(!1!==r.__financeInput&&i===r.radixPoint)return!1;var p;if(p=r.shortcuts&&r.shortcuts[i]){if(1<p.length)for(var f=[],d=0;d<p.length;d++)f.push({pos:t+d,c:p[d],strict:!1});return{insert:f}}var m=a.inArray(r.radixPoint,e),h=t;if(t=function(e,t,i,n,a){return a._radixDance&&a.numericInput&&t!==a.negationSymbol.back&&e<=i&&(0<i||t==a.radixPoint)&&(void 0===n.validPositions[e-1]||n.validPositions[e-1].input!==a.negationSymbol.back)&&--e,e}(t,i,m,o,r),"-"===i||i===r.negationSymbol.front){if(!0!==r.allowMinus)return!1;var v=!1,g=c("+",o),k=c("-",o);return-1!==g&&(v=[g,k]),!1!==v?{remove:v,caret:h}:{insert:[{pos:l("+",o),c:r.negationSymbol.front,fromIsValid:!0},{pos:l("-",o),c:r.negationSymbol.back,fromIsValid:void 0}],caret:h+r.negationSymbol.back.length}}if(u)return!0;if(-1!==m&&!0===r._radixDance&&!1===n&&i===r.radixPoint&&void 0!==r.digits&&(isNaN(r.digits)||0<parseInt(r.digits))&&m!==t)return{caret:r._radixDance&&t===m-1?m+1:m};if(!1===r.__financeInput)if(n){if(r.digitsOptional)return{rewritePosition:s.end};if(!r.digitsOptional){if(s.begin>m&&s.end<=m)return i===r.radixPoint?{insert:{pos:m+1,c:"0",fromIsValid:!0},rewritePosition:m}:{rewritePosition:m+1};if(s.begin<m)return{rewritePosition:s.begin-1}}}else if(!r.showMaskOnHover&&!r.showMaskOnFocus&&!r.digitsOptional&&0<r.digits&&""===this.inputmask.__valueGet.call(this))return{rewritePosition:m};return{rewritePosition:t}},postValidation:function(e,t,i,n,r,o,s){if(!1===n)return n;if(s)return!0;if(null!==r.min||null!==r.max){var l=r.onUnMask(e.slice().reverse().join(""),void 0,a.extend({},r,{unmaskAsNumber:!0}));if(null!==r.min&&l<r.min&&(l.toString().length>r.min.toString().length||l<0))return!1;if(null!==r.max&&l>r.max)return!!r.SetMaxOnOverflow&&{refreshFromBuffer:!0,buffer:u(r.max.toString().replace(".",r.radixPoint).split(""),r.digits,r).reverse()}}return n},onUnMask:function(e,t,i){if(""===t&&!0===i.nullable)return t;var n=e.replace(i.prefix,"");return n=(n=n.replace(i.suffix,"")).replace(new RegExp(o(i.groupSeparator),"g"),""),""!==i.placeholder.charAt(0)&&(n=n.replace(new RegExp(i.placeholder.charAt(0),"g"),"0")),i.unmaskAsNumber?(""!==i.radixPoint&&-1!==n.indexOf(i.radixPoint)&&(n=n.replace(o.call(this,i.radixPoint),".")),n=(n=n.replace(new RegExp("^"+o(i.negationSymbol.front)),"-")).replace(new RegExp(o(i.negationSymbol.back)+"$"),""),Number(n)):n},isComplete:function(e,t){var i=(t.numericInput?e.slice().reverse():e).join("");return i=(i=(i=(i=(i=i.replace(new RegExp("^"+o(t.negationSymbol.front)),"-")).replace(new RegExp(o(t.negationSymbol.back)+"$"),"")).replace(t.prefix,"")).replace(t.suffix,"")).replace(new RegExp(o(t.groupSeparator)+"([0-9]{3})","g"),"$1"),","===t.radixPoint&&(i=i.replace(o(t.radixPoint),".")),isFinite(i)},onBeforeMask:function(e,t){var i=t.radixPoint||",";isFinite(t.digits)&&(t.digits=parseInt(t.digits)),"number"!=typeof e&&"number"!==t.inputType||""===i||(e=e.toString().replace(".",i));var n=e.split(i),a=n[0].replace(/[^\-0-9]/g,""),r=1<n.length?n[1].replace(/[^0-9]/g,""):"",s=1<n.length;e=a+(""!==r?i+r:r);var l=0;if(""!==i&&(l=!t.digitsOptional||t.digits<r.length?t.digits:r.length,""!==r||!t.digitsOptional)){var c=Math.pow(10,l||1);e=e.replace(o(i),"."),isNaN(parseFloat(e))||(e=(t.roundingFN(parseFloat(e)*c)/c).toFixed(l)),e=e.toString().replace(".",i)}if(0===t.digits&&-1!==e.indexOf(i)&&(e=e.substring(0,e.indexOf(i))),null!==t.min||null!==t.max){var p=e.toString().replace(i,".");null!==t.min&&p<t.min?e=t.min.toString().replace(".",i):null!==t.max&&p>t.max&&(e=t.max.toString().replace(".",i))}return u(e.toString().split(""),l,t,s).join("")},onBeforeWrite:function(e,t,i,n){function r(e,t){if(!1!==n.__financeInput||t){var i=a.inArray(n.radixPoint,e);-1!==i&&e.splice(i,1)}if(""!==n.groupSeparator)for(;-1!==(i=e.indexOf(n.groupSeparator));)e.splice(i,1);return e}var s,l=function(e,t){var i=new RegExp("(^"+(""!==t.negationSymbol.front?o(t.negationSymbol.front)+"?":"")+o(t.prefix)+")(.*)("+o(t.suffix)+(""!=t.negationSymbol.back?o(t.negationSymbol.back)+"?":"")+"$)").exec(e.slice().reverse().join("")),n=i?i[2]:"",a=!1;return n&&(n=n.split(t.radixPoint.charAt(0))[0],a=new RegExp("^[0"+t.groupSeparator+"]*").exec(n)),!(!a||!(1<a[0].length||0<a[0].length&&a[0].length<n.length))&&a}(t,n);if(l)for(var c=t.join("").lastIndexOf(l[0].split("").reverse().join(""))-(l[0]==l.input?0:1),p=l[0]==l.input?1:0,f=l[0].length-p;0<f;f--)delete this.maskset.validPositions[c+f],delete t[c+f];if(e)switch(e.type){case"blur":case"checkval":if(null!==n.min){var d=n.onUnMask(t.slice().reverse().join(""),void 0,a.extend({},n,{unmaskAsNumber:!0}));if(null!==n.min&&d<n.min)return{refreshFromBuffer:!0,buffer:u(n.min.toString().replace(".",n.radixPoint).split(""),n.digits,n).reverse()}}if(t[t.length-1]===n.negationSymbol.front){var m=new RegExp("(^"+(""!=n.negationSymbol.front?o(n.negationSymbol.front)+"?":"")+o(n.prefix)+")(.*)("+o(n.suffix)+(""!=n.negationSymbol.back?o(n.negationSymbol.back)+"?":"")+"$)").exec(r(t.slice(),!0).reverse().join(""));0==(m?m[2]:"")&&(s={refreshFromBuffer:!0,buffer:[0]})}else""!==n.radixPoint&&t[0]===n.radixPoint&&(s&&s.buffer?s.buffer.shift():(t.shift(),s={refreshFromBuffer:!0,buffer:r(t)}));if(n.enforceDigitsOnBlur){var h=(s=s||{})&&s.buffer||t.slice().reverse();s.refreshFromBuffer=!0,s.buffer=u(h,n.digits,n,!0).reverse()}}return s},onKeyDown:function(e,t,i,n){var o,s=a(this);if(e.ctrlKey)switch(e.keyCode){case r.UP:return this.inputmask.__valueSet.call(this,parseFloat(this.inputmask.unmaskedvalue())+parseInt(n.step)),s.trigger("setvalue"),!1;case r.DOWN:return this.inputmask.__valueSet.call(this,parseFloat(this.inputmask.unmaskedvalue())-parseInt(n.step)),s.trigger("setvalue"),!1}if(!e.shiftKey&&(e.keyCode===r.DELETE||e.keyCode===r.BACKSPACE||e.keyCode===r.BACKSPACE_SAFARI)&&i.begin!==t.length){if(t[e.keyCode===r.DELETE?i.begin-1:i.end]===n.negationSymbol.front)return o=t.slice().reverse(),""!==n.negationSymbol.front&&o.shift(),""!==n.negationSymbol.back&&o.pop(),s.trigger("setvalue",[o.join(""),i.begin]),!1;if(!0===n._radixDance){var l=a.inArray(n.radixPoint,t);if(n.digitsOptional){if(0===l)return(o=t.slice().reverse()).pop(),s.trigger("setvalue",[o.join(""),i.begin>=o.length?o.length:i.begin]),!1}else if(-1!==l&&(i.begin<l||i.end<l||e.keyCode===r.DELETE&&i.begin===l))return i.begin!==i.end||e.keyCode!==r.BACKSPACE&&e.keyCode!==r.BACKSPACE_SAFARI||i.begin++,(o=t.slice().reverse()).splice(o.length-i.begin,i.begin-i.end+1),o=u(o,n.digits,n).join(""),s.trigger("setvalue",[o,i.begin>=o.length?l+1:i.begin]),!1}}}},currency:{prefix:"",groupSeparator:",",alias:"numeric",digits:2,digitsOptional:!1},decimal:{alias:"numeric"},integer:{alias:"numeric",digits:0},percentage:{alias:"numeric",min:0,max:100,suffix:" %",digits:0,allowMinus:!1},indianns:{alias:"numeric",_mask:function(e){return"("+e.groupSeparator+"99){*|1}("+e.groupSeparator+"999){1|1}"},groupSeparator:",",radixPoint:".",placeholder:"0",digits:2,digitsOptional:!1}}),e.exports=n},function(e,t,i){"use strict";var n=f(i(4)),a=f(i(1));function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e){return function(){var t,i,n,a=p(e);if(l()){var o=p(this).constructor;t=Reflect.construct(a,arguments,o)}else t=a.apply(this,arguments);return i=this,!(n=t)||"object"!==r(n)&&"function"!=typeof n?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(i):n}}function s(e){var t="function"==typeof Map?new Map:void 0;return(s=function(e){if(null===e||(i=e,-1===Function.toString.call(i).indexOf("[native code]")))return e;var i;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return u(e,arguments,p(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),c(n,e)})(e)}function u(e,t,i){return(u=l()?Reflect.construct:function(e,t,i){var n=[null];n.push.apply(n,t);var a=new(Function.bind.apply(e,n));return i&&c(a,i.prototype),a}).apply(null,arguments)}function l(){if("undefined"!=typeof Reflect&&Reflect.construct&&!Reflect.construct.sham){if("function"==typeof Proxy)return 1;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),1}catch(e){return}}}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function f(e){return e&&e.__esModule?e:{default:e}}var d=n.default.document;if(d&&d.head&&d.head.attachShadow&&void 0===customElements.get("input-mask")){var m=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&c(e,t)}(i,s(HTMLElement));var t=o(i);function i(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);var n=(e=t.call(this)).getAttributeNames(),r=e.attachShadow({mode:"closed"}),o=d.createElement("input");for(var s in o.type="text",r.appendChild(o),n)Object.prototype.hasOwnProperty.call(n,s)&&o.setAttribute(n[s],e.getAttribute(n[s]));var u=new a.default;return u.dataAttribute="",u.mask(o),o.inputmask.shadowRoot=r,e}return i}();customElements.define("input-mask",m)}},function(e,t,i){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var a=i(3),r=i(1);void 0===a.fn.inputmask&&(a.fn.inputmask=function(e,t){var i,o=this[0];if(void 0===t&&(t={}),"string"==typeof e)switch(e){case"unmaskedvalue":return o&&o.inputmask?o.inputmask.unmaskedvalue():a(o).val();case"remove":return this.each(function(){this.inputmask&&this.inputmask.remove()});case"getemptymask":return o&&o.inputmask?o.inputmask.getemptymask():"";case"hasMaskedValue":return!(!o||!o.inputmask)&&o.inputmask.hasMaskedValue();case"isComplete":return!o||!o.inputmask||o.inputmask.isComplete();case"getmetadata":return o&&o.inputmask?o.inputmask.getmetadata():void 0;case"setvalue":r.setValue(o,t);break;case"option":if("string"!=typeof t)return this.each(function(){if(void 0!==this.inputmask)return this.inputmask.option(t)});if(o&&void 0!==o.inputmask)return o.inputmask.option(t);break;default:return t.alias=e,i=new r(t),this.each(function(){i.mask(this)})}else{if(Array.isArray(e))return t.alias=e,i=new r(t),this.each(function(){i.mask(this)});if("object"==n(e))return i=new r(e),void 0===e.mask&&void 0===e.alias?this.each(function(){if(void 0!==this.inputmask)return this.inputmask.option(e);i.mask(this)}):this.each(function(){i.mask(this)});if(void 0===e)return this.each(function(){(i=new r(t)).mask(this)})}})},function(e,t,i){"use strict";var n=i(7),a=i(3);n.dependencyLib===a&&i(14),e.exports=n}],installedModules={},__webpack_require__.m=modules,__webpack_require__.c=installedModules,__webpack_require__.d=function(e,t,i){__webpack_require__.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},__webpack_require__.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},__webpack_require__.t=function(e,t){if(1&t&&(e=__webpack_require__(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(__webpack_require__.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)__webpack_require__.d(i,n,function(t){return e[t]}.bind(null,n));return i},__webpack_require__.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return __webpack_require__.d(t,"a",t),t},__webpack_require__.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},__webpack_require__.p="",__webpack_require__(__webpack_require__.s=15);function __webpack_require__(e){if(installedModules[e])return installedModules[e].exports;var t=installedModules[e]={i:e,l:!1,exports:{}};return modules[e].call(t.exports,t,t.exports,__webpack_require__),t.l=!0,t.exports}var modules,installedModules});