Commit ca0a1f05 by Alexander Makarov

Merge pull request #3928 from thiagotalma/patch-1

Update jquery.inputmask.bundle.min.js
parents c2bf23de aa51947e
......@@ -3,103 +3,108 @@
http://github.com/RobinHerbots/jquery.inputmask
Copyright (c) 2010 - 2014 Robin Herbots
Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
Version: 3.0.31
Version: 3.0.40
Input Mask plugin for jquery
http://github.com/RobinHerbots/jquery.inputmask
Copyright (c) 2010 - 2014 Robin Herbots
Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
Version: 3.0.31
Version: 3.0.40
*/
(function(d){if(void 0===d.fn.inputmask){var a=function(a){var d=document.createElement("input");a="on"+a;var f=a in d;f||(d.setAttribute(a,"return;"),f="function"==typeof d[a]);return f},c=function(a,n,f){return(a=f.aliases[a])?(a.alias&&c(a.alias,void 0,f),d.extend(!0,f,a),d.extend(!0,f,n),!0):!1},h=function(a){function c(d){function f(a,d,c,n){this.matches=[];this.isGroup=a||!1;this.isOptional=d||!1;this.isQuantifier=c||!1;this.isAlternator=n||!1;this.quantifier={min:1,max:1}}function n(d,f,c){var b=
a.definitions[f],e=0==d.matches.length;c=void 0!=c?c:d.matches.length;if(b&&!h){for(var g=b.prevalidator,k=g?g.length:0,m=1;m<b.cardinality;m++){var p=k>=m?g[m-1]:[],G=p.validator,p=p.cardinality;d.matches.splice(c++,0,{fn:G?"string"==typeof G?RegExp(G):new function(){this.test=G}:/./,cardinality:p?p:1,optionality:d.isOptional,newBlockMarker:e,casing:b.casing,def:b.definitionSymbol||f})}d.matches.splice(c++,0,{fn:b.validator?"string"==typeof b.validator?RegExp(b.validator):new function(){this.test=
b.validator}:/./,cardinality:b.cardinality,optionality:d.isOptional,newBlockMarker:e,casing:b.casing,def:b.definitionSymbol||f})}else d.matches.splice(c++,0,{fn:null,cardinality:0,optionality:d.isOptional,newBlockMarker:e,casing:null,def:f}),h=!1}for(var b=/(?:[?*+]|\{[0-9\+\*]+(?:,[0-9\+\*]*)?\})\??|[^.?*+^${[]()|\\]+|./g,h=!1,e=new f,g,p=[],u=[];g=b.exec(d);)switch(g=g[0],g.charAt(0)){case a.optionalmarker.end:case a.groupmarker.end:var q=p.pop();0<p.length?p[p.length-1].matches.push(q):e.matches.push(q);
break;case a.optionalmarker.start:p.push(new f(!1,!0));break;case a.groupmarker.start:p.push(new f(!0));break;case a.quantifiermarker.start:q=new f(!1,!1,!0);g=g.replace(/[{}]/g,"");var r=g.split(",");g=isNaN(r[0])?r[0]:parseInt(r[0]);r=1==r.length?g:isNaN(r[1])?r[1]:parseInt(r[1]);if("*"==r||"+"==r)g="*"==r?0:1;q.quantifier={min:g,max:r};if(0<p.length){r=p[p.length-1].matches;g=r.pop();if(!g.isGroup){var v=new f(!0);v.matches.push(g);g=v}r.push(g);r.push(q)}else g=e.matches.pop(),g.isGroup||(v=new f(!0),
v.matches.push(g),g=v),e.matches.push(g),e.matches.push(q);break;case a.escapeChar:h=!0;break;case a.alternatormarker:break;default:0<p.length?n(p[p.length-1],g):(0<e.matches.length&&(q=e.matches[e.matches.length-1],q.isGroup&&(q.isGroup=!1,n(q,a.groupmarker.start,0),n(q,a.groupmarker.end))),n(e,g))}0<e.matches.length&&u.push(e);return u}function f(f,b){if(a.numericInput&&!0!==a.multi){f=f.split("").reverse();for(var h=0;h<f.length;h++)f[h]==a.optionalmarker.start?f[h]=a.optionalmarker.end:f[h]==
a.optionalmarker.end?f[h]=a.optionalmarker.start:f[h]==a.groupmarker.start?f[h]=a.groupmarker.end:f[h]==a.groupmarker.end&&(f[h]=a.groupmarker.start);f=f.join("")}if(void 0!=f&&""!=f){if(0<a.repeat||"*"==a.repeat||"+"==a.repeat)f=a.groupmarker.start+f+a.groupmarker.end+a.quantifiermarker.start+("*"==a.repeat?0:"+"==a.repeat?1:a.repeat)+","+a.repeat+a.quantifiermarker.end;void 0==d.inputmask.masksCache[f]&&(d.inputmask.masksCache[f]={mask:f,maskToken:c(f),validPositions:{},_buffer:void 0,buffer:void 0,
tests:{},metadata:b});return d.extend(!0,{},d.inputmask.masksCache[f])}}var b=[];d.isFunction(a.mask)&&(a.mask=a.mask.call(this,a));d.isArray(a.mask)?d.each(a.mask,function(a,d){void 0!=d.mask?b.push(f(d.mask.toString(),d)):b.push(f(d.toString()))}):(1==a.mask.length&&!1==a.greedy&&0!=a.repeat&&(a.placeholder=""),b=void 0!=a.mask.mask?f(a.mask.mask.toString(),a.mask):f(a.mask.toString()));return b},e="function"===typeof ScriptEngineMajorVersion?ScriptEngineMajorVersion():10<=(new Function("/*@cc_on return @_jscript_version; @*/"))(),
b=navigator.userAgent,g=null!==b.match(/iphone/i),q=null!==b.match(/android.*safari.*/i),w=null!==b.match(/android.*chrome.*/i),r=null!==b.match(/android.*firefox.*/i),I=/Kindle/i.test(b)||/Silk/i.test(b)||/KFTT/i.test(b)||/KFOT/i.test(b)||/KFJWA/i.test(b)||/KFJWI/i.test(b)||/KFSOWI/i.test(b)||/KFTHWA/i.test(b)||/KFTHWI/i.test(b)||/KFAPWA/i.test(b)||/KFAPWI/i.test(b),J=a("paste")?"paste":a("input")?"input":"propertychange",v=function(a,c,f){function b(a,d,h){d=d||0;var e=[],g,t=0,k;do{if(!0===a&&
c.validPositions[t]){var l=c.validPositions[t];k=l.match;g=l.locator.slice();e.push(null==k.fn?k.def:!0===h?l.input:f.placeholder.charAt(t%f.placeholder.length))}else g=d>t?E(t,g,t-1)[0]:m(t,g,t-1),k=g.match,g=g.locator.slice(),e.push(null==k.fn?k.def:f.placeholder.charAt(t%f.placeholder.length));t++}while((void 0==K||t-1<K)&&null!=k.fn||null==k.fn&&""!=k.def||d>=t);e.pop();return e}function h(a){var d=c;d.buffer=void 0;d.tests={};!0!==a&&(d._buffer=void 0,d.validPositions={},d.p=-1)}function v(a){var C=
c,b=-1,h=C.validPositions;if(d.isFunction(f.getLastValidPosition))b=f.getLastValidPosition.call(s,C,a,f);else{void 0==a&&(a=-1);var C=b,g;for(g in h){var e=parseInt(g);if(-1==a||null!=h[e].match.fn)e<a&&(C=e),e>=a&&(b=e)}b=1<a-C||b<a?C:b}return b}function k(a,b,h){if(f.insertMode&&void 0!=c.validPositions[a]&&void 0==h){h=d.extend(!0,{},c.validPositions);var e=v(),g;for(g=a;g<=e;g++)delete c.validPositions[g];c.validPositions[a]=b;b=!0;for(g=a;g<=e;g++){a=h[g];if(void 0!=a){var t=null==a.match.fn?
g+1:z(g);b=Q(t,a.match.def)?b&&!1!==W(t,a.input,!0,!0):!1}if(!b)break}if(!b)return c.validPositions=d.extend(!0,{},h),!1}else c.validPositions[a]=b;return!0}function m(a,c,d){a=E(a,c,d);var b;for(c=0;c<a.length&&(b=a[c],!f.greedy&&(!b.match||!1!==b.match.optionality&&!1!==b.match.newBlockMarker||!0===b.match.optionalQuantifier));c++);return b}function H(a){return c.validPositions[a]?c.validPositions[a].match:E(a)[0].match}function Q(a,c){for(var d=!1,f=E(a),b=0;b<f.length;b++)if(f[b].match&&f[b].match.def==
c){d=!0;break}return d}function E(a,b,h){function g(c,b,h,e){function C(h,e,n){if(t==a&&void 0==h.matches)return k.push({match:h,locator:e.reverse()}),!0;if(void 0!=h.matches)if(h.isGroup&&!0!==n){if(h=C(c.matches[D+1],e))return!0}else if(h.isOptional){var m=h;if(h=g(h,b,e,n))h=k[k.length-1].match,(h=0==d.inArray(h,m.matches))&&(l=!0),t=a}else{if(!h.isAlternator)if(h.isQuantifier&&!0!==n)for(m=h,f.greedy=f.greedy&&!isNaN(m.quantifier.max),n=0<b.length&&!0!==n?b.shift():0;n<(isNaN(m.quantifier.max)?
n+1:m.quantifier.max)&&t<=a;n++){var p=c.matches[d.inArray(m,c.matches)-1];if(h=C(p,[n].concat(e),!0))if(h=k[k.length-1].match,h.optionalQuantifier=n>m.quantifier.min-1,h=0==d.inArray(h,p.matches))if(n>m.quantifier.min-1){l=!0;t=a;break}else return!0;else return!0}else if(h=g(h,b,e,n))return!0}else t++}for(var D=0<b.length?b.shift():0;D<c.matches.length;D++)if(!0!==c.matches[D].isQuantifier){var n=C(c.matches[D],[D].concat(h),e);if(n&&t==a)return n;if(t>a)break}}var e=c.maskToken,t=b?h:0;h=b||[0];
var k=[],l=!1;if(void 0==b){b=a-1;for(var m;void 0==(m=c.validPositions[b])&&-1<b;)b--;if(void 0!=m&&-1<b)t=b,h=m.locator.slice();else{for(b=a-1;void 0==(m=c.tests[b])&&-1<b;)b--;void 0!=m&&-1<b&&(t=b,h=m[0].locator.slice())}}for(b=h.shift();b<e.length&&!(g(e[b],h,[b])&&t==a||t>a);b++);(0==k.length||l)&&k.push({match:{fn:null,cardinality:0,optionality:!0,casing:null,def:""},locator:[]});return c.tests[a]=k}function A(){void 0==c._buffer&&(c._buffer=b(!1,1));return c._buffer}function u(){void 0==c.buffer&&
(c.buffer=b(!0,v(),!0));return c.buffer}function S(a,c){for(var d=u().slice(),b=a;b<c;b++)d[b]!=R(b)&&d[b]!=f.skipOptionalPartCharacter&&W(b,d[b],!0,!0)}function ha(a,c){switch(c.casing){case "upper":a=a.toUpperCase();break;case "lower":a=a.toLowerCase()}return a}function W(a,b,g,e){function m(a,b,aa,g){var e=!1;d.each(E(a),function(C,D){for(var t=D.match,l=b?1:0,m="",ia=u(),p=t.cardinality;p>l;p--)m+=void 0==c.validPositions[a-(p-1)]?R(a-(p-1)):c.validPositions[a-(p-1)].input;b&&(m+=b);e=null!=t.fn?
t.fn.test(m,ia,a,aa,f):b!=t.def&&b!=f.skipOptionalPartCharacter||""==t.def?!1:{c:t.def,pos:a};if(!1!==e){l=void 0!=e.c?e.c:b;l=l==f.skipOptionalPartCharacter&&null===t.fn?t.def:l;m=a;if(e.refreshFromBuffer){m=e.refreshFromBuffer;aa=!0;!0===m?(c.validPositions={},c.tests={},S(0,u().length)):S(m.start,m.end);if(void 0==e.pos&&void 0==e.c)return e.pos=v(),!1;m=void 0!=e.pos?e.pos:a;D=E(m)[0]}else!0!==e&&e.pos!=a&&(m=e.pos,S(a,m),D=E(m)[0]);0<C&&h(!0);k(m,d.extend({},D,{input:ha(l,t)}),g)||(e=!1);return!1}});
return e}g=!0===g;var t=m(a,b,g,e);if(!g&&!1===t){var l=c.validPositions[a];if(l&&null==l.match.fn&&(l.match.def==b||b==f.skipOptionalPartCharacter))t={caret:z(a)};else if((f.insertMode||void 0==c.validPositions[z(a)])&&!N(a))for(var l=a+1,p=z(a);l<=p;l++)if(t=m(l,b,g,e),!1!==t){a=l;break}}!0===t&&(t={pos:a});return t}function N(a){a=H(a);return null!=a.fn?a.fn:!1}function O(){var a;K=s.prop("maxLength");-1==K&&(K=void 0);if(!1==f.greedy){var b;b=v();a=c.validPositions[b];var d=void 0!=a?a.locator.slice():
void 0;for(b+=1;void 0==a||null!=a.match.fn||null==a.match.fn&&""!=a.match.def;b++)a=m(b,d,b-1),d=a.locator.slice();a=b}else a=u().length;return void 0==K||a<K?a:K}function z(a){var c=O();if(a>=c)return c;for(;++a<c&&!N(a)&&(!0!==f.nojumps||f.nojumpsThreshold>a););return a}function V(a){if(0>=a)return 0;for(;0<--a&&!N(a););return a}function B(a,c,b){a._valueSet(c.join(""));void 0!=b&&x(a,b)}function R(a,c){c=c||H(a);return null==c.fn?c.def:f.placeholder.charAt(a%f.placeholder.length)}function P(a,
b,f,e,g){e=void 0!=e?e.slice():ga(a._valueGet()).split("");h();b&&a._valueSet("");d.each(e,function(b,h){if(!0===g){var e=c.p,e=-1==e?e:V(e),k=-1==e?b:z(e);-1==d.inArray(h,A().slice(e+1,k))&&Y.call(a,void 0,!0,h.charCodeAt(0),!1,f,b)}else Y.call(a,void 0,!0,h.charCodeAt(0),!1,f,b),f=f||0<b&&b>c.p});b&&B(a,u(),d(a).is(":focus")?z(v(0)):void 0)}function $(a){return d.inputmask.escapeRegex.call(this,a)}function ga(a){return a.replace(RegExp("("+$(A().join(""))+")*$"),"")}function X(a){var b=u().slice(),
d,f=v(),h={},e=void 0!=c.validPositions[f]?c.validPositions[f].locator.slice():void 0,g;for(d=f+1;d<b.length;d++)g=m(d,e,d-1),e=g.locator.slice(),h[d]=g;for(d=b.length-1;d>f;d--)if(g=h[d].match,g.optionality&&b[d]==R(d,g))b.pop();else break;B(a,b)}function ba(a,b){if(!a.data("_inputmask")||!0!==b&&a.hasClass("hasDatepicker"))return a[0]._valueGet();var h=[],e=c.validPositions,g;for(g in e)e[g].match&&null!=e[g].match.fn&&h.push(e[g].input);h=(y?h.reverse():h).join("");e=(y?u().reverse():u()).join("");
return d.isFunction(f.onUnMask)?f.onUnMask.call(a,e,h,f):h}function M(a){!y||"number"!=typeof a||f.greedy&&""==f.placeholder||(a=u().length-a);return a}function x(a,c,b){a=a.jquery&&0<a.length?a[0]:a;if("number"==typeof c){c=M(c);b=M(b);b="number"==typeof b?b:c;var h=d(a).data("_inputmask")||{};h.caret={begin:c,end:b};d(a).data("_inputmask",h);d(a).is(":visible")&&(a.scrollLeft=a.scrollWidth,!1==f.insertMode&&c==b&&b++,a.setSelectionRange?(a.selectionStart=c,a.selectionEnd=b):a.createTextRange&&(a=
a.createTextRange(),a.collapse(!0),a.moveEnd("character",b),a.moveStart("character",c),a.select()))}else return h=d(a).data("_inputmask"),!d(a).is(":visible")&&h&&void 0!=h.caret?(c=h.caret.begin,b=h.caret.end):a.setSelectionRange?(c=a.selectionStart,b=a.selectionEnd):document.selection&&document.selection.createRange&&(a=document.selection.createRange(),c=0-a.duplicate().moveStart("character",-1E5),b=c+a.text.length),c=M(c),b=M(b),{begin:c,end:b}}function T(a){if(d.isFunction(f.isComplete))return f.isComplete.call(s,
a,f);if("*"!=f.repeat){var c=!1,b=V(O());if(v()==b)for(var c=!0,h=0;h<=b;h++){var e=N(h);if(e&&(void 0==a[h]||a[h]==R(h))||!e&&a[h]!=R(h)){c=!1;break}}return c}}function ja(a){a=d._data(a).events;d.each(a,function(a,c){d.each(c,function(a,c){if("inputmask"==c.namespace&&"setvalue"!=c.type){var b=c.handler;c.handler=function(a){if(this.readOnly||this.disabled)a.preventDefault;else return b.apply(this,arguments)}}})})}function ka(a){function c(a){if(void 0==d.valHooks[a]||!0!=d.valHooks[a].inputmaskpatch){var b=
d.valHooks[a]&&d.valHooks[a].get?d.valHooks[a].get:function(a){return a.value},h=d.valHooks[a]&&d.valHooks[a].set?d.valHooks[a].set:function(a,c){a.value=c;return a};d.valHooks[a]={get:function(a){var c=d(a);if(c.data("_inputmask")){if(c.data("_inputmask").opts.autoUnmask)return c.inputmask("unmaskedvalue");a=b(a);c=(c=c.data("_inputmask").maskset._buffer)?c.join(""):"";return a!=c?a:""}return b(a)},set:function(a,c){var b=d(a),f=h(a,c);b.data("_inputmask")&&b.triggerHandler("setvalue.inputmask");
return f},inputmaskpatch:!0}}}var b;Object.getOwnPropertyDescriptor&&(b=Object.getOwnPropertyDescriptor(a,"value"));if(b&&b.get){if(!a._valueGet){var h=b.get,f=b.set;a._valueGet=function(){return y?h.call(this).split("").reverse().join(""):h.call(this)};a._valueSet=function(a){f.call(this,y?a.split("").reverse().join(""):a)};Object.defineProperty(a,"value",{get:function(){var a=d(this),c=d(this).data("_inputmask");return c?c.opts.autoUnmask?a.inputmask("unmaskedvalue"):h.call(this)!=A().join("")?
h.call(this):"":h.call(this)},set:function(a){f.call(this,a);d(this).triggerHandler("setvalue.inputmask")}})}}else document.__lookupGetter__&&a.__lookupGetter__("value")?a._valueGet||(h=a.__lookupGetter__("value"),f=a.__lookupSetter__("value"),a._valueGet=function(){return y?h.call(this).split("").reverse().join(""):h.call(this)},a._valueSet=function(a){f.call(this,y?a.split("").reverse().join(""):a)},a.__defineGetter__("value",function(){var a=d(this),c=d(this).data("_inputmask");return c?c.opts.autoUnmask?
a.inputmask("unmaskedvalue"):h.call(this)!=A().join("")?h.call(this):"":h.call(this)}),a.__defineSetter__("value",function(a){f.call(this,a);d(this).triggerHandler("setvalue.inputmask")})):(a._valueGet||(a._valueGet=function(){return y?this.value.split("").reverse().join(""):this.value},a._valueSet=function(a){this.value=y?a.split("").reverse().join(""):a}),c(a.type))}function ca(a,b,d){if(f.numericInput||y){switch(b){case f.keyCode.BACKSPACE:b=f.keyCode.DELETE;break;case f.keyCode.DELETE:b=f.keyCode.BACKSPACE}y&&
(a=d.end,d.end=d.begin,d.begin=a)}d.begin==d.end?b==f.keyCode.BACKSPACE?d.begin=V(d.begin):b==f.keyCode.DELETE&&d.end++:1!=d.end-d.begin||f.insertMode||b==f.keyCode.BACKSPACE&&d.begin--;a=d.begin;var e=d.end;for(b=a;a<e;a++)delete c.validPositions[a];for(a=e;a<=v();){var e=c.validPositions[a],g=c.validPositions[b];void 0!=e&&void 0==g?(Q(b,e.match.def)&&!1!==W(b,e.input,!0)&&(delete c.validPositions[a],a++),b++):a++}for(b=v();0<b&&(void 0==c.validPositions[b]||null==c.validPositions[b].match.fn);)delete c.validPositions[b],
b--;h(!0);b=z(-1);v()<b?c.p=b:c.p=d.begin}function da(a){Z=!1;var b=this,e=d(b),k=a.keyCode,m=x(b);k==f.keyCode.BACKSPACE||k==f.keyCode.DELETE||g&&127==k||a.ctrlKey&&88==k?(a.preventDefault(),88==k&&(F=u().join("")),ca(b,k,m),B(b,u(),c.p),b._valueGet()==A().join("")&&e.trigger("cleared"),f.showTooltip&&e.prop("title",c.mask)):k==f.keyCode.END||k==f.keyCode.PAGE_DOWN?setTimeout(function(){var c=z(v());f.insertMode||c!=O()||a.shiftKey||c--;x(b,a.shiftKey?m.begin:c,c)},0):k==f.keyCode.HOME&&!a.shiftKey||
k==f.keyCode.PAGE_UP?x(b,0,a.shiftKey?m.begin:0):k==f.keyCode.ESCAPE||90==k&&a.ctrlKey?(P(b,!0,!1,F.split("")),e.click()):k!=f.keyCode.INSERT||a.shiftKey||a.ctrlKey?!1!=f.insertMode||a.shiftKey||(k==f.keyCode.RIGHT?setTimeout(function(){var a=x(b);x(b,a.begin)},0):k==f.keyCode.LEFT&&setTimeout(function(){var a=x(b);x(b,a.begin-1)},0)):(f.insertMode=!f.insertMode,x(b,f.insertMode||m.begin!=O()?m.begin:m.begin-1));var e=x(b),l=f.onKeyDown.call(this,a,u(),f);l&&!0===l.refreshFromBuffer&&(c.validPositions=
{},c.tests={},S(0,u().length),h(!0),B(b,u()),x(b,e.begin,e.end));ea=-1!=d.inArray(k,f.ignorables)}function Y(a,b,e,g,l,p){if(void 0==e&&Z)return!1;Z=!0;var Q=d(this);a=a||window.event;e=b?e:a.which||a.charCode||a.keyCode;if(!(!0===b||a.ctrlKey&&a.altKey)&&(a.ctrlKey||a.metaKey||ea))return!0;if(e){!0!==b&&46==e&&!1==a.shiftKey&&","==f.radixPoint&&(e=44);var H;e=String.fromCharCode(e);b?(p=l?p:v()+1,p={begin:p,end:p}):p=x(this);var q=y?1<p.begin-p.end||1==p.begin-p.end&&f.insertMode:1<p.end-p.begin||
1==p.end-p.begin&&f.insertMode;q&&(c.undoPositions=d.extend(!0,{},c.validPositions),ca(this,f.keyCode.DELETE,p),f.insertMode||(f.insertMode=!f.insertMode,k(p.begin,l),f.insertMode=!f.insertMode),q=!f.multi);c.writeOutBuffer=!0;var r=p.begin,s=W(r,e,l);!1!==s&&(!0!==s&&(r=void 0!=s.pos?s.pos:r,e=void 0!=s.c?s.c:e),h(!0),void 0!=s.caret?H=s.caret:(l=c.validPositions,H=void 0!=l[r+1]&&m(p+1,l[r].locator.slice(),r).match.def!=l[r+1].match.def?r+1:z(r)),c.p=H);if(!1!==g){var A=this;setTimeout(function(){f.onKeyValidation.call(A,
s,f)},0);if(c.writeOutBuffer&&!1!==s){var E=u();B(this,E,b?void 0:f.numericInput?V(H):H);!0!==b&&setTimeout(function(){!0===T(E)&&Q.trigger("complete");U=!0;Q.trigger("input")},0)}else q&&(c.buffer=void 0,c.validPositions=c.undoPositions)}else q&&(c.buffer=void 0,c.validPositions=c.undoPositions);f.showTooltip&&Q.prop("title",c.mask);a&&!0!=b&&(a.preventDefault?a.preventDefault():a.returnValue=!1)}}function la(a){var b=d(this),e=a.keyCode,g=u();(a=f.onKeyUp.call(this,a,g,f))&&!0===a.refreshFromBuffer&&
(c.validPositions={},c.tests={},S(0,u().length),h(!0),B(this,u()));e==f.keyCode.TAB&&f.showMaskOnFocus&&(b.hasClass("focus.inputmask")&&0==this._valueGet().length?(h(),g=u(),B(this,g),x(this,0),F=u().join("")):(B(this,g),x(this,M(0),M(O()))))}function fa(a){if(!0===U&&"input"==a.type)return U=!1,!0;var b=this,c=d(b);if("propertychange"==a.type&&b._valueGet().length<=O())return!0;setTimeout(function(){var a=d.isFunction(f.onBeforePaste)?f.onBeforePaste.call(b,b._valueGet(),f):b._valueGet();P(b,!0,
!1,a.split(""),!0);!0===T(u())&&c.trigger("complete");c.click()},0)}function ma(a){if(!0===U&&"input"==a.type)return U=!1,!0;var b=x(this),c=this._valueGet(),c=c.replace(RegExp("("+$(A().join(""))+")*"),"");b.begin>c.length&&(x(this,c.length),b=x(this));1!=u().length-c.length||c.charAt(b.begin)==u()[b.begin]||c.charAt(b.begin+1)==u()[b.begin]||N(b.begin)||(a.keyCode=f.keyCode.BACKSPACE,da.call(this,a));a.preventDefault()}function na(a){s=d(a);if(s.is(":input")){s.data("_inputmask",{maskset:c,opts:f,
isRTL:!1});f.showTooltip&&s.prop("title",c.mask);ka(a);("rtl"==a.dir||f.rightAlign)&&s.css("text-align","right");if("rtl"==a.dir||f.numericInput){a.dir="ltr";s.removeAttr("dir");var b=s.data("_inputmask");b.isRTL=!0;s.data("_inputmask",b);y=!0}s.unbind(".inputmask");s.removeClass("focus.inputmask");s.closest("form").bind("submit",function(){F!=u().join("")&&s.change()}).bind("reset",function(){setTimeout(function(){s.trigger("setvalue")},0)});s.bind("mouseenter.inputmask",function(){!d(this).hasClass("focus.inputmask")&&
f.showMaskOnHover&&this._valueGet()!=u().join("")&&B(this,u())}).bind("blur.inputmask",function(){var a=d(this);if(a.data("_inputmask")){var b=this._valueGet(),c=u();a.removeClass("focus.inputmask");F!=u().join("")&&a.change();f.clearMaskOnLostFocus&&""!=b&&(b==A().join("")?this._valueSet(""):X(this));!1===T(c)&&(a.trigger("incomplete"),f.clearIncomplete&&(h(),f.clearMaskOnLostFocus?this._valueSet(""):(c=A().slice(),B(this,c))))}}).bind("focus.inputmask",function(){var a=d(this),b=this._valueGet();
f.showMaskOnFocus&&!a.hasClass("focus.inputmask")&&(!f.showMaskOnHover||f.showMaskOnHover&&""==b)&&this._valueGet()!=u().join("")&&B(this,u(),z(v()));a.addClass("focus.inputmask");F=u().join("")}).bind("mouseleave.inputmask",function(){var a=d(this);f.clearMaskOnLostFocus&&(a.hasClass("focus.inputmask")||this._valueGet()==a.attr("placeholder")||(this._valueGet()==A().join("")||""==this._valueGet()?this._valueSet(""):X(this)))}).bind("click.inputmask",function(){var a=this;setTimeout(function(){var b=
x(a);u();if(b.begin==b.end){var b=y?M(b.begin):b.begin,c=v(b),c=z(c);b<c?N(b)?x(a,b):x(a,z(b)):x(a,c)}},0)}).bind("dblclick.inputmask",function(){var a=this;setTimeout(function(){x(a,0,z(v()))},0)}).bind(J+".inputmask dragdrop.inputmask drop.inputmask",fa).bind("setvalue.inputmask",function(){P(this,!0);F=u().join("");this._valueGet()==A().join("")&&this._valueSet("")}).bind("complete.inputmask",f.oncomplete).bind("incomplete.inputmask",f.onincomplete).bind("cleared.inputmask",f.oncleared);s.bind("keydown.inputmask",
da).bind("keypress.inputmask",Y).bind("keyup.inputmask",la);if(q||r||w||I)"input"==J&&s.unbind(J+".inputmask"),s.bind("input.inputmask",ma);e&&s.bind("input.inputmask",fa);b=d.isFunction(f.onBeforeMask)?f.onBeforeMask.call(a,a._valueGet(),f):a._valueGet();P(a,!0,!1,b.split(""),!0);F=u().join("");var g;try{g=document.activeElement}catch(k){}g===a?(s.addClass("focus.inputmask"),x(a,z(v()))):f.clearMaskOnLostFocus?u().join("")==A().join("")?a._valueSet(""):X(a):B(a,u());ja(a)}}var y=!1,F,s,Z=!1,U=!1,
ea=!1,K;if(void 0!=a)switch(a.action){case "isComplete":return s=d(a.el),c=s.data("_inputmask").maskset,f=s.data("_inputmask").opts,T(a.buffer);case "unmaskedvalue":return s=a.$input,c=s.data("_inputmask").maskset,f=s.data("_inputmask").opts,y=a.$input.data("_inputmask").isRTL,ba(a.$input,a.skipDatepickerCheck);case "mask":F=u().join("");na(a.el);break;case "format":s=d({});s.data("_inputmask",{maskset:c,opts:f,isRTL:f.numericInput});f.numericInput&&(y=!0);var L=a.value.split("");P(s,!1,!1,y?L.reverse():
L,!0);return y?u().reverse().join(""):u().join("");case "isValid":return s=d({}),s.data("_inputmask",{maskset:c,opts:f,isRTL:f.numericInput}),f.numericInput&&(y=!0),L=a.value.split(""),P(s,!1,!0,y?L.reverse():L),T(u());case "getemptymask":return s=d(a.el),c=s.data("_inputmask").maskset,f=s.data("_inputmask").opts,A();case "remove":a=a.el;s=d(a);c=s.data("_inputmask").maskset;f=s.data("_inputmask").opts;a._valueSet(ba(s));s.unbind(".inputmask");s.removeClass("focus.inputmask");s.removeData("_inputmask");
Object.getOwnPropertyDescriptor&&(L=Object.getOwnPropertyDescriptor(a,"value"));L&&L.get?a._valueGet&&Object.defineProperty(a,"value",{get:a._valueGet,set:a._valueSet}):document.__lookupGetter__&&a.__lookupGetter__("value")&&a._valueGet&&(a.__defineGetter__("value",a._valueGet),a.__defineSetter__("value",a._valueSet));try{delete a._valueGet,delete a._valueSet}catch(pa){a._valueGet=void 0,a._valueSet=void 0}}};d.inputmask={defaults:{placeholder:"_",optionalmarker:{start:"[",end:"]"},quantifiermarker:{start:"{",
end:"}"},groupmarker:{start:"(",end:")"},alternatormarker:"|",escapeChar:"\\",mask:null,oncomplete:d.noop,onincomplete:d.noop,oncleared:d.noop,repeat:0,greedy:!0,autoUnmask:!1,clearMaskOnLostFocus:!0,insertMode:!0,clearIncomplete:!1,aliases:{},onKeyUp:d.noop,onKeyDown:d.noop,onBeforeMask:void 0,onBeforePaste:void 0,onUnMask:void 0,showMaskOnFocus:!0,showMaskOnHover:!0,onKeyValidation:d.noop,skipOptionalPartCharacter:" ",showTooltip:!1,numericInput:!1,getLastValidPosition:void 0,rightAlign:!1,radixPoint:"",
definitions:{9:{validator:"[0-9]",cardinality:1,definitionSymbol:"*"},a:{validator:"[A-Za-z\u0410-\u044f\u0401\u0451]",cardinality:1,definitionSymbol:"*"},"*":{validator:"[A-Za-z\u0410-\u044f\u0401\u04510-9]",cardinality:1}},keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,
PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91},ignorables:[8,9,13,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],isComplete:void 0},masksCache:{},escapeRegex:function(a){return a.replace(RegExp("(\\/|\\.|\\*|\\+|\\?|\\||\\(|\\)|\\[|\\]|\\{|\\}|\\\\)","gim"),"\\$1")},format:function(a,b){var f=d.extend(!0,{},d.inputmask.defaults,b);c(f.alias,b,f);return v({action:"format",value:a},h(f),f)},isValid:function(a,b){var f=d.extend(!0,
{},d.inputmask.defaults,b);c(f.alias,b,f);return v({action:"isValid",value:a},h(f),f)}};d.fn.inputmask=function(a,b,f,e,g){function q(a,b){var c=d(a),h;for(h in b){var f=c.data("inputmask-"+h.toLowerCase());void 0!=f&&(b[h]=f)}return b}f=f||v;e=e||"_inputmask";var k=d.extend(!0,{},d.inputmask.defaults,b),m;if("string"===typeof a)switch(a){case "mask":return c(k.alias,b,k),m=h(k),0==m.length?this:this.each(function(){f({action:"mask",el:this},d.extend(!0,{},m),q(this,k))});case "unmaskedvalue":return a=
d(this),a.data(e)?f({action:"unmaskedvalue",$input:a}):a.val();case "remove":return this.each(function(){d(this).data(e)&&f({action:"remove",el:this})});case "getemptymask":return this.data(e)?f({action:"getemptymask",el:this}):"";case "hasMaskedValue":return this.data(e)?!this.data(e).opts.autoUnmask:!1;case "isComplete":return this.data(e)?f({action:"isComplete",buffer:this[0]._valueGet().split(""),el:this}):!0;case "getmetadata":if(this.data(e))return m=this.data(e).maskset,m.metadata;break;case "_detectScope":return c(k.alias,
b,k),void 0==g||c(g,b,k)||-1!=d.inArray(g,"mask unmaskedvalue remove getemptymask hasMaskedValue isComplete getmetadata _detectScope".split(" "))||(k.mask=g),d.isFunction(k.mask)&&(k.mask=k.mask.call(this,k)),d.isArray(k.mask);default:return c(a,b,k)||(k.mask=a),m=h(k),void 0==m?this:this.each(function(){f({action:"mask",el:this},d.extend(!0,{},m),q(this,k))})}else{if("object"==typeof a)return k=d.extend(!0,{},d.inputmask.defaults,a),c(k.alias,a,k),m=h(k),void 0==m?this:this.each(function(){f({action:"mask",
el:this},d.extend(!0,{},m),q(this,k))});if(void 0==a)return this.each(function(){var a=d(this).attr("data-inputmask");if(a&&""!=a)try{var a=a.replace(RegExp("'","g"),'"'),h=d.parseJSON("{"+a+"}");d.extend(!0,h,b);k=d.extend(!0,{},d.inputmask.defaults,h);c(k.alias,h,k);k.alias=void 0;d(this).inputmask("mask",k,f)}catch(e){}})}}}})(jQuery);
(function(d){if(void 0!=d.fn.inputmask){var a=function(a,h,e){function b(a){var b=document.createElement("input");a="on"+a;var c=a in b;c||(b.setAttribute(a,"return;"),c="function"==typeof b[a]);return c}function g(a){if(void 0==d.valHooks[a]||!0!=d.valHooks[a].inputmaskmultipatch){var b=d.valHooks[a]&&d.valHooks[a].get?d.valHooks[a].get:function(a){return a.value},c=d.valHooks[a]&&d.valHooks[a].set?d.valHooks[a].set:function(a,b){a.value=b;return a};d.valHooks[a]={get:function(a){var c=d(a);return c.data("_inputmask-multi")?
(a=c.data("_inputmask-multi"),b(a.elmasks[a.activeMasksetIndex])):b(a)},set:function(a,b){var h=d(a),f=c(a,b);h.data("_inputmask-multi")&&h.triggerHandler("setvalue");return f},inputmaskmultipatch:!0}}}function q(a,b,c){a=a.jquery&&0<a.length?a[0]:a;if("number"==typeof b){b=w(b);c=w(c);c="number"==typeof c?c:b;if(a!=l){var h=d(a).data("_inputmask")||{};h.caret={begin:b,end:c};d(a).data("_inputmask",h)}d(a).is(":visible")&&(a.scrollLeft=a.scrollWidth,!1==e.insertMode&&b==c&&c++,a.setSelectionRange?
(a.selectionStart=b,a.selectionEnd=c):a.createTextRange&&(a=a.createTextRange(),a.collapse(!0),a.moveEnd("character",c),a.moveStart("character",b),a.select()))}else return h=d(a).data("_inputmask"),!d(a).is(":visible")&&h&&void 0!=h.caret?(b=h.caret.begin,c=h.caret.end):a.setSelectionRange?(b=a.selectionStart,c=a.selectionEnd):document.selection&&document.selection.createRange&&(a=document.selection.createRange(),b=0-a.duplicate().moveStart("character",-1E5),c=b+a.text.length),b=w(b),c=w(c),{begin:b,
end:c}}function w(a){!v||"number"!=typeof a||e.greedy&&""==e.placeholder||(a=l.value.length-a);return a}function r(a,b){if("multiMaskScope"!=a){if(d.isFunction(e.determineActiveMasksetIndex))p=e.determineActiveMasksetIndex.call(n,a,b);else{var c=-1,h=-1,f=-1;d.each(b,function(a,b){var e=d(b).data("_inputmask").maskset,g=-1,n=0,l=q(b).begin,m;for(m in e.validPositions)e=parseInt(m),e>g&&(g=e),n++;if(n>c||n==c&&h>l&&f>g||n==c&&h==l&&f<g)c=n,h=l,p=a,f=g})}var g=n.data("_inputmask-multi")||{activeMasksetIndex:0,
elmasks:b};g.activeMasksetIndex=p;n.data("_inputmask-multi",g)}-1==d.inArray(a,["focus"])&&l.value!=b[p]._valueGet()&&(g=""==d(b[p]).val()?b[p]._valueGet():d(b[p]).val(),l.value=g);-1==d.inArray(a,["blur","focus"])&&d(b[p]).hasClass("focus.inputmask")&&(g=q(b[p]),q(l,g.begin,g.end))}function I(a){l=a;n=d(l);v="rtl"==l.dir||e.numericInput;p=0;f=d.map(h,function(a,b){var c='<input type="text" ';n.attr("value")&&(c+='value="'+n.attr("value")+'" ');n.attr("dir")&&(c+='dir="'+n.attr("dir")+'" ');c=d(c+
"/>")[0];d(c).inputmask(d.extend({},e,{mask:a.mask}));return c});n.data("_inputmask-multi",{activeMasksetIndex:0,elmasks:f});("rtl"==l.dir||e.rightAlign)&&n.css("text-align","right");l.dir="ltr";n.removeAttr("dir");""!=n.attr("value")&&r("init",f);n.bind("mouseenter blur focus mouseleave click dblclick keydown keypress keypress",function(a){var b=q(l),c,h=!0;if("keydown"==a.type){c=a.keyCode;if(c==e.keyCode.DOWN&&p<f.length-1)return p++,r("multiMaskScope",f),!1;if(c==e.keyCode.UP&&0<p)return p--,
r("multiMaskScope",f),!1;if(a.ctrlKey||a.shiftKey||a.altKey)return!0}else if("keypress"==a.type&&(a.ctrlKey||a.shiftKey||a.altKey))return!0;d.each(f,function(f,g){if("keydown"==a.type){c=a.keyCode;if(c==e.keyCode.BACKSPACE&&g._valueGet().length<b.begin)return;if(c==e.keyCode.TAB)h=!1;else{if(c==e.keyCode.RIGHT){q(g,b.begin+1,b.end+1);h=!1;return}if(c==e.keyCode.LEFT){q(g,b.begin-1,b.end-1);h=!1;return}}}if(-1!=d.inArray(a.type,["click"])&&(q(g,w(b.begin),w(b.end)),b.begin!=b.end)){h=!1;return}-1!=
d.inArray(a.type,["keydown"])&&b.begin!=b.end&&q(g,b.begin,b.end);d(g).triggerHandler(a)});h&&setTimeout(function(){r(a.type,f)},0)});n.bind(J+" dragdrop drop setvalue",function(a){q(l);setTimeout(function(){d.each(f,function(b,c){c._valueSet(l.value);d(c).triggerHandler(a)});setTimeout(function(){r(a.type,f)},0)},0)});g(l.type)}var J=b("paste")?"paste":b("input")?"input":"propertychange",v,l,n,f,p;e.multi=!0;if(void 0!=a)switch(a.action){case "isComplete":return n=d(a.el),a=n.data("_inputmask-multi"),
a=a.elmasks[a.activeMasksetIndex],d(a).inputmask("isComplete");case "unmaskedvalue":return n=a.$input,a=n.data("_inputmask-multi"),a=a.elmasks[a.activeMasksetIndex],d(a).inputmask("unmaskedvalue");case "mask":I(a.el);break;case "format":return n=d({}),n.data("_inputmask",{maskset:maskset,opts:e,isRTL:e.numericInput}),e.numericInput&&(v=!0),a=a.value.split(""),checkVal(n,!1,!1,v?a.reverse():a,!0),v?getBuffer().reverse().join(""):getBuffer().join("");case "isValid":return n=d({}),n.data("_inputmask",
{maskset:maskset,opts:e,isRTL:e.numericInput}),e.numericInput&&(v=!0),a=a.value.split(""),checkVal(n,!1,!0,v?a.reverse():a),isComplete(getBuffer());case "getemptymask":return n=d(a.el),maskset=n.data("_inputmask").maskset,e=n.data("_inputmask").opts,getBufferTemplate();case "remove":l=a.el;n=d(l);maskset=n.data("_inputmask").maskset;e=n.data("_inputmask").opts;l._valueSet(unmaskedvalue(n));n.unbind(".inputmask");n.removeClass("focus.inputmask");n.removeData("_inputmask");var G;Object.getOwnPropertyDescriptor&&
(G=Object.getOwnPropertyDescriptor(l,"value"));G&&G.get?l._valueGet&&Object.defineProperty(l,"value",{get:l._valueGet,set:l._valueSet}):document.__lookupGetter__&&l.__lookupGetter__("value")&&l._valueGet&&(l.__defineGetter__("value",l._valueGet),l.__defineSetter__("value",l._valueSet));try{delete l._valueGet,delete l._valueSet}catch(oa){l._valueGet=void 0,l._valueSet=void 0}}};d.extend(d.inputmask.defaults,{multi:!1,nojumps:!1,nojumpsThreshold:0,determineActiveMasksetIndex:void 0});d.inputmask._fn=
d.fn.inputmask;d.fn.inputmask=function(c,h){if("string"===typeof c)return d.inputmask._fn("_detectScope",h,void 0,void 0,c)?d.inputmask._fn.call(this,c,h,a,"_inputmask-multi"):d.inputmask._fn.call(this,c,h);if("object"==typeof c)return opts=d.extend(!0,{},d.inputmask.defaults,c),d.inputmask._fn("_detectScope",c)?d.inputmask._fn.call(this,c,h,a,"_inputmask-multi"):d.inputmask._fn.call(this,c,h);if(void 0==c)return d.inputmask._fn.call(this,c,h)}}})(jQuery);
(function(d){if(void 0===d.fn.inputmask){var a=function(a){var d=document.createElement("input");a="on"+a;var c=a in d;c||(d.setAttribute(a,"return;"),c="function"==typeof d[a]);return c},c=function(a,n,f){return(a=f.aliases[a])?(a.alias&&c(a.alias,void 0,f),d.extend(!0,f,a),d.extend(!0,f,n),!0):!1},g=function(a){function c(d){function f(a,d,c,n){this.matches=[];this.isGroup=a||!1;this.isOptional=d||!1;this.isQuantifier=c||!1;this.isAlternator=n||!1;this.quantifier={min:1,max:1}}function n(d,c,f){var b=
a.definitions[c],h=0==d.matches.length;f=void 0!=f?f:d.matches.length;if(b&&!g){for(var e=b.prevalidator,p=e?e.length:0,q=1;q<b.cardinality;q++){var s=p>=q?e[q-1]:[],l=s.validator,s=s.cardinality;d.matches.splice(f++,0,{fn:l?"string"==typeof l?RegExp(l):new function(){this.test=l}:/./,cardinality:s?s:1,optionality:d.isOptional,newBlockMarker:h,casing:b.casing,def:b.definitionSymbol||c})}d.matches.splice(f++,0,{fn:b.validator?"string"==typeof b.validator?RegExp(b.validator):new function(){this.test=
b.validator}:/./,cardinality:b.cardinality,optionality:d.isOptional,newBlockMarker:h,casing:b.casing,def:b.definitionSymbol||c})}else d.matches.splice(f++,0,{fn:null,cardinality:0,optionality:d.isOptional,newBlockMarker:h,casing:null,def:c}),g=!1}for(var b=/(?:[?*+]|\{[0-9\+\*]+(?:,[0-9\+\*]*)?\})\??|[^.?*+^${[]()|\\]+|./g,g=!1,h=new f,e,s=[],u=[];e=b.exec(d);)switch(e=e[0],e.charAt(0)){case a.optionalmarker.end:case a.groupmarker.end:var l=s.pop();0<s.length?s[s.length-1].matches.push(l):h.matches.push(l);
break;case a.optionalmarker.start:s.push(new f(!1,!0));break;case a.groupmarker.start:s.push(new f(!0));break;case a.quantifiermarker.start:l=new f(!1,!1,!0);e=e.replace(/[{}]/g,"");var t=e.split(",");e=isNaN(t[0])?t[0]:parseInt(t[0]);t=1==t.length?e:isNaN(t[1])?t[1]:parseInt(t[1]);if("*"==t||"+"==t)e="*"==t?0:1;l.quantifier={min:e,max:t};if(0<s.length){t=s[s.length-1].matches;e=t.pop();if(!e.isGroup){var v=new f(!0);v.matches.push(e);e=v}t.push(e);t.push(l)}else e=h.matches.pop(),e.isGroup||(v=new f(!0),
v.matches.push(e),e=v),h.matches.push(e),h.matches.push(l);break;case a.escapeChar:g=!0;break;case a.alternatormarker:break;default:0<s.length?n(s[s.length-1],e):(0<h.matches.length&&(l=h.matches[h.matches.length-1],l.isGroup&&(l.isGroup=!1,n(l,a.groupmarker.start,0),n(l,a.groupmarker.end))),n(h,e))}0<h.matches.length&&(l=h.matches[h.matches.length-1],l.isGroup&&(l.isGroup=!1,n(l,a.groupmarker.start,0),n(l,a.groupmarker.end)),u.push(h));return u}function f(f,b){if(a.numericInput&&!0!==a.multi){f=
f.split("").reverse();for(var g=0;g<f.length;g++)f[g]==a.optionalmarker.start?f[g]=a.optionalmarker.end:f[g]==a.optionalmarker.end?f[g]=a.optionalmarker.start:f[g]==a.groupmarker.start?f[g]=a.groupmarker.end:f[g]==a.groupmarker.end&&(f[g]=a.groupmarker.start);f=f.join("")}if(void 0!=f&&""!=f){if(0<a.repeat||"*"==a.repeat||"+"==a.repeat)f=a.groupmarker.start+f+a.groupmarker.end+a.quantifiermarker.start+("*"==a.repeat?0:"+"==a.repeat?1:a.repeat)+","+a.repeat+a.quantifiermarker.end;void 0==d.inputmask.masksCache[f]&&
(d.inputmask.masksCache[f]={mask:f,maskToken:c(f),validPositions:{},_buffer:void 0,buffer:void 0,tests:{},metadata:b});return d.extend(!0,{},d.inputmask.masksCache[f])}}var b=[];d.isFunction(a.mask)&&(a.mask=a.mask.call(this,a));d.isArray(a.mask)?d.each(a.mask,function(a,d){void 0!=d.mask?b.push(f(d.mask.toString(),d)):b.push(f(d.toString()))}):(1==a.mask.length&&!1==a.greedy&&0!=a.repeat&&(a.placeholder=""),b=void 0!=a.mask.mask?f(a.mask.mask.toString(),a.mask):f(a.mask.toString()));return b},h=
"function"===typeof ScriptEngineMajorVersion?ScriptEngineMajorVersion():10<=(new Function("/*@cc_on return @_jscript_version; @*/"))(),b=navigator.userAgent,e=null!==b.match(/iphone/i),l=null!==b.match(/android.*safari.*/i),w=null!==b.match(/android.*chrome.*/i),v=null!==b.match(/android.*firefox.*/i),G=/Kindle/i.test(b)||/Silk/i.test(b)||/KFTT/i.test(b)||/KFOT/i.test(b)||/KFJWA/i.test(b)||/KFJWI/i.test(b)||/KFSOWI/i.test(b)||/KFTHWA/i.test(b)||/KFTHWI/i.test(b)||/KFAPWA/i.test(b)||/KFAPWI/i.test(b),
H=a("paste")?"paste":a("input")?"input":"propertychange",t=function(a,c,f){function b(a,d,g){d=d||0;var h=[],e,m=0,p;do{if(!0===a&&c.validPositions[m]){var k=c.validPositions[m];p=k.match;e=k.locator.slice();h.push(null==p.fn?p.def:!0===g?k.input:f.placeholder.charAt(m%f.placeholder.length))}else e=d>m?Q(m,e,m-1)[0]:q(m,e,m-1),p=e.match,e=e.locator.slice(),h.push(null==p.fn?p.def:f.placeholder.charAt(m%f.placeholder.length));m++}while((void 0==I||m-1<I)&&null!=p.fn||null==p.fn&&""!=p.def||d>=m);h.pop();
return h}function g(a){var d=c;d.buffer=void 0;d.tests={};!0!==a&&(d._buffer=void 0,d.validPositions={},d.p=-1)}function t(a){var g=c,b=-1,h=g.validPositions;if(d.isFunction(f.getLastValidPosition))b=f.getLastValidPosition.call(r,g,a,f);else{void 0==a&&(a=-1);var g=b,e;for(e in h){var m=parseInt(e);if(-1==a||null!=h[m].match.fn)m<a&&(g=m),m>=a&&(b=m)}b=1<a-g||b<a?g:b}return b}function p(a,b,g){if(f.insertMode&&void 0!=c.validPositions[a]&&void 0==g){g=d.extend(!0,{},c.validPositions);var h=t(),e;
for(e=a;e<=h;e++)delete c.validPositions[e];c.validPositions[a]=b;b=!0;for(e=a;e<=h;e++){a=g[e];if(void 0!=a){var m=null==a.match.fn?e+1:B(e);b=J(m,a.match.def)?b&&!1!==O(m,a.input,!0,!0):!1}if(!b)break}if(!b)return c.validPositions=d.extend(!0,{},g),!1}else c.validPositions[a]=b;return!0}function q(a,c,d){a=Q(a,c,d);var b;for(c=0;c<a.length&&(b=a[c],!f.greedy&&(!b.match||!1!==b.match.optionality&&!1!==b.match.newBlockMarker||!0===b.match.optionalQuantifier));c++);return b}function D(a){return c.validPositions[a]?
c.validPositions[a].match:Q(a)[0].match}function J(a,c){for(var d=!1,f=Q(a),b=0;b<f.length;b++)if(f[b].match&&f[b].match.def==c){d=!0;break}return d}function Q(a,b,g){function e(c,b,g,h){function S(g,h,n){if(m==a&&void 0==g.matches)return p.push({match:g,locator:h.reverse()}),!0;if(void 0!=g.matches)if(g.isGroup&&!0!==n){if(g=S(c.matches[E+1],h))return!0}else if(g.isOptional){var q=g;if(g=e(g,b,h,n))g=p[p.length-1].match,(g=0==d.inArray(g,q.matches))&&(k=!0),m=a}else{if(!g.isAlternator)if(g.isQuantifier&&
!0!==n)for(q=g,f.greedy=f.greedy&&isFinite(q.quantifier.max),n=0<b.length&&!0!==n?b.shift():0;n<(isNaN(q.quantifier.max)?n+1:q.quantifier.max)&&m<=a;n++){var s=c.matches[d.inArray(q,c.matches)-1];if(g=S(s,[n].concat(h),!0))if(g=p[p.length-1].match,g.optionalQuantifier=n>q.quantifier.min-1,g=0==d.inArray(g,s.matches))if(n>q.quantifier.min-1){k=!0;m=a;break}else return!0;else return!0}else if(g=e(g,b,h,n))return!0}else m++}for(var E=0<b.length?b.shift():0;E<c.matches.length;E++)if(!0!==c.matches[E].isQuantifier){var n=
S(c.matches[E],[E].concat(g),h);if(n&&m==a)return n;if(m>a)break}}var h=c.maskToken,m=b?g:0;g=b||[0];var p=[],k=!1;if(void 0==b){b=a-1;for(var q;void 0==(q=c.validPositions[b])&&-1<b;)b--;if(void 0!=q&&-1<b)m=b,g=q.locator.slice();else{for(b=a-1;void 0==(q=c.tests[b])&&-1<b;)b--;void 0!=q&&-1<b&&(m=b,g=q[0].locator.slice())}}for(b=g.shift();b<h.length&&!(e(h[b],g,[b])&&m==a||m>a);b++);(0==p.length||k)&&p.push({match:{fn:null,cardinality:0,optionality:!0,casing:null,def:""},locator:[]});return c.tests[a]=
p}function A(){void 0==c._buffer&&(c._buffer=b(!1,1));return c._buffer}function u(){void 0==c.buffer&&(c.buffer=b(!0,t(),!0));return c.buffer}function R(a,c){for(var d=u().slice(),b=a;b<c;b++)d[b]!=f.skipOptionalPartCharacter&&O(b,d[b],!0,!0)}function ja(a,c){switch(c.casing){case "upper":a=a.toUpperCase();break;case "lower":a=a.toLowerCase()}return a}function O(a,b,h,e){function q(a,b,ca,h){var e=!1;d.each(Q(a),function(S,E){for(var m=E.match,q=b?1:0,k="",ka=u(),s=m.cardinality;s>q;s--)k+=void 0==
c.validPositions[a-(s-1)]?V(a-(s-1)):c.validPositions[a-(s-1)].input;b&&(k+=b);e=null!=m.fn?m.fn.test(k,ka,a,ca,f):b!=m.def&&b!=f.skipOptionalPartCharacter||""==m.def?!1:{c:m.def,pos:a};if(!1!==e){q=void 0!=e.c?e.c:b;q=q==f.skipOptionalPartCharacter&&null===m.fn?m.def:q;k=a;if(e.refreshFromBuffer){k=e.refreshFromBuffer;ca=!0;!0===k?(c.validPositions={},c.tests={},R(0,u().length)):R(k.start,k.end);if(void 0==e.pos&&void 0==e.c)return e.pos=t(),!1;k=void 0!=e.pos?e.pos:a;if(k!=a)return e=O(k,q,!0),
!1}else if(!0!==e&&e.pos!=a&&(k=e.pos,R(a,k),k!=a))return e=O(k,q,!0),!1;0<S&&g(!0);p(k,d.extend({},E,{input:ja(q,m)}),h)||(e=!1);return!1}});return e}h=!0===h;if(a>=M())return!1;var m=q(a,b,h,e);if(!h&&!1===m){var k=c.validPositions[a];if(k&&null==k.match.fn&&(k.match.def==b||b==f.skipOptionalPartCharacter))m={caret:B(a)};else if((f.insertMode||void 0==c.validPositions[B(a)])&&!L(a))for(var k=a+1,s=B(a);k<=s;k++)if(m=q(k,b,h,e),!1!==m){a=k;break}}!0===m&&(m={pos:a});return m}function L(a){a=D(a);
return null!=a.fn?a.fn:!1}function M(){var a;I=r.prop("maxLength");-1==I&&(I=void 0);if(!1==f.greedy){var b;b=t();a=c.validPositions[b];var d=void 0!=a?a.locator.slice():void 0;for(b+=1;void 0==a||null!=a.match.fn||null==a.match.fn&&""!=a.match.def;b++)a=q(b,d,b-1),d=a.locator.slice();a=b}else a=u().length;return void 0==I||a<I?a:I}function B(a){var c=M();if(a>=c)return c;for(;++a<c&&!L(a)&&(!0!==f.nojumps||f.nojumpsThreshold>a););return a}function U(a){if(0>=a)return 0;for(;0<--a&&!L(a););return a}
function C(a,c,b){a._valueSet(c.join(""));void 0!=b&&x(a,b)}function V(a,c){c=c||D(a);return null==c.fn?c.def:f.placeholder.charAt(a%f.placeholder.length)}function N(a,b,f,e,h){e=void 0!=e?e.slice():ia(a._valueGet()).split("");g();b&&a._valueSet("");d.each(e,function(b,g){if(!0===h){var e=c.p,e=-1==e?e:U(e),p=-1==e?b:B(e);-1==d.inArray(g,A().slice(e+1,p))&&X.call(a,void 0,!0,g.charCodeAt(0),!1,f,b)}else X.call(a,void 0,!0,g.charCodeAt(0),!1,f,b),f=f||0<b&&b>c.p});b&&C(a,u(),d(a).is(":focus")?B(t(0)):
void 0)}function aa(a){return d.inputmask.escapeRegex.call(this,a)}function ia(a){return a.replace(RegExp("("+aa(A().join(""))+")*$"),"")}function ba(a,b){if(!a.data("_inputmask")||!0!==b&&a.hasClass("hasDatepicker"))return a[0]._valueGet();var g=[],e=c.validPositions,h;for(h in e)e[h].match&&null!=e[h].match.fn&&g.push(e[h].input);g=(y?g.reverse():g).join("");e=(y?u().reverse():u()).join("");return d.isFunction(f.onUnMask)?f.onUnMask.call(a,e,g,f):g}function K(a){!y||"number"!=typeof a||f.greedy&&
""==f.placeholder||(a=u().length-a);return a}function x(a,c,b){a=a.jquery&&0<a.length?a[0]:a;if("number"==typeof c){c=K(c);b=K(b);b="number"==typeof b?b:c;var g=d(a).data("_inputmask")||{};g.caret={begin:c,end:b};d(a).data("_inputmask",g);d(a).is(":visible")&&(a.scrollLeft=a.scrollWidth,!1==f.insertMode&&c==b&&b++,a.setSelectionRange?(a.selectionStart=c,a.selectionEnd=b):a.createTextRange&&(a=a.createTextRange(),a.collapse(!0),a.moveEnd("character",b),a.moveStart("character",c),a.select()))}else return g=
d(a).data("_inputmask"),!d(a).is(":visible")&&g&&void 0!=g.caret?(c=g.caret.begin,b=g.caret.end):a.setSelectionRange?(c=a.selectionStart,b=a.selectionEnd):document.selection&&document.selection.createRange&&(a=document.selection.createRange(),c=0-a.duplicate().moveStart("character",-1E5),b=c+a.text.length),c=K(c),b=K(b),{begin:c,end:b}}function da(a){var b=u(),g=b.length,f,e=t(),h={},p=void 0!=c.validPositions[e]?c.validPositions[e].locator.slice():void 0,k;for(f=e+1;f<b.length;f++)k=q(f,p,f-1),p=
k.locator.slice(),h[f]=d.extend(!0,{},k);for(f=g-1;f>e;f--)if(k=h[f].match,(k.optionality||k.optionalQuantifier)&&b[f]==V(f,k))g--;else break;return a?{l:g,def:h[g]?h[g].match:void 0}:g}function Y(a){var c=u().slice(),b=da();c.length=b;C(a,c)}function P(a){if(d.isFunction(f.isComplete))return f.isComplete.call(r,a,f);if("*"!=f.repeat){var c=!1,b=da(!0),g=U(b.l);if(t()==g&&(void 0==b.def||b.def.newBlockMarker||b.def.optionalQuantifier))for(c=!0,b=0;b<=g;b++){var e=L(b);if(e&&(void 0==a[b]||a[b]==V(b))||
!e&&a[b]!=V(b)){c=!1;break}}return c}}function la(a){a=d._data(a).events;d.each(a,function(a,c){d.each(c,function(a,c){if("inputmask"==c.namespace&&"setvalue"!=c.type){var b=c.handler;c.handler=function(a){if(this.readOnly||this.disabled)a.preventDefault;else return b.apply(this,arguments)}}})})}function ma(a){function c(a){if(void 0==d.valHooks[a]||!0!=d.valHooks[a].inputmaskpatch){var b=d.valHooks[a]&&d.valHooks[a].get?d.valHooks[a].get:function(a){return a.value},g=d.valHooks[a]&&d.valHooks[a].set?
d.valHooks[a].set:function(a,c){a.value=c;return a};d.valHooks[a]={get:function(a){var c=d(a);if(c.data("_inputmask")){if(c.data("_inputmask").opts.autoUnmask)return c.inputmask("unmaskedvalue");a=b(a);c=(c=c.data("_inputmask").maskset._buffer)?c.join(""):"";return a!=c?a:""}return b(a)},set:function(a,c){var b=d(a),f=b.data("_inputmask");f?(f=g(a,d.isFunction(f.opts.onBeforeMask)?f.opts.onBeforeMask.call(z,c,f.opts):c),b.triggerHandler("setvalue.inputmask")):f=g(a,c);return f},inputmaskpatch:!0}}}
var b;Object.getOwnPropertyDescriptor&&(b=Object.getOwnPropertyDescriptor(a,"value"));if(b&&b.get){if(!a._valueGet){var g=b.get,f=b.set;a._valueGet=function(){return y?g.call(this).split("").reverse().join(""):g.call(this)};a._valueSet=function(a){f.call(this,y?a.split("").reverse().join(""):a)};Object.defineProperty(a,"value",{get:function(){var a=d(this),c=d(this).data("_inputmask");return c?c.opts.autoUnmask?a.inputmask("unmaskedvalue"):g.call(this)!=A().join("")?g.call(this):"":g.call(this)},
set:function(a){var c=d(this).data("_inputmask");c?(f.call(this,d.isFunction(c.opts.onBeforeMask)?c.opts.onBeforeMask.call(z,a,c.opts):a),d(this).triggerHandler("setvalue.inputmask")):f.call(this,a)}})}}else document.__lookupGetter__&&a.__lookupGetter__("value")?a._valueGet||(g=a.__lookupGetter__("value"),f=a.__lookupSetter__("value"),a._valueGet=function(){return y?g.call(this).split("").reverse().join(""):g.call(this)},a._valueSet=function(a){f.call(this,y?a.split("").reverse().join(""):a)},a.__defineGetter__("value",
function(){var a=d(this),c=d(this).data("_inputmask");return c?c.opts.autoUnmask?a.inputmask("unmaskedvalue"):g.call(this)!=A().join("")?g.call(this):"":g.call(this)}),a.__defineSetter__("value",function(a){var c=d(this).data("_inputmask");c?(f.call(this,d.isFunction(c.opts.onBeforeMask)?c.opts.onBeforeMask.call(z,a,c.opts):a),d(this).triggerHandler("setvalue.inputmask")):f.call(this,a)})):(a._valueGet||(a._valueGet=function(){return y?this.value.split("").reverse().join(""):this.value},a._valueSet=
function(a){this.value=y?a.split("").reverse().join(""):a}),c(a.type))}function ea(a,b,d){if(f.numericInput||y){switch(b){case f.keyCode.BACKSPACE:b=f.keyCode.DELETE;break;case f.keyCode.DELETE:b=f.keyCode.BACKSPACE}y&&(a=d.end,d.end=d.begin,d.begin=a)}d.begin==d.end?b==f.keyCode.BACKSPACE?d.begin=U(d.begin):b==f.keyCode.DELETE&&d.end++:1!=d.end-d.begin||f.insertMode||b==f.keyCode.BACKSPACE&&d.begin--;a=d.begin;var e=d.end;for(b=a;a<e;a++)delete c.validPositions[a];for(a=e;a<=t();){var e=c.validPositions[a],
h=c.validPositions[b];void 0!=e&&void 0==h?(J(b,e.match.def)&&!1!==O(b,e.input,!0)&&(delete c.validPositions[a],a++),b++):a++}for(b=t();0<b&&(void 0==c.validPositions[b]||null==c.validPositions[b].match.fn);)delete c.validPositions[b],b--;g(!0);b=B(-1);t()<b?c.p=b:c.p=d.begin}function fa(a){Z=!1;var b=this,h=d(b),k=a.keyCode,p=x(b);k==f.keyCode.BACKSPACE||k==f.keyCode.DELETE||e&&127==k||a.ctrlKey&&88==k?(a.preventDefault(),88==k&&(F=u().join("")),ea(b,k,p),C(b,u(),c.p),b._valueGet()==A().join("")&&
h.trigger("cleared"),f.showTooltip&&h.prop("title",c.mask)):k==f.keyCode.END||k==f.keyCode.PAGE_DOWN?setTimeout(function(){var c=B(t());f.insertMode||c!=M()||a.shiftKey||c--;x(b,a.shiftKey?p.begin:c,c)},0):k==f.keyCode.HOME&&!a.shiftKey||k==f.keyCode.PAGE_UP?x(b,0,a.shiftKey?p.begin:0):k==f.keyCode.ESCAPE||90==k&&a.ctrlKey?(N(b,!0,!1,F.split("")),h.click()):k!=f.keyCode.INSERT||a.shiftKey||a.ctrlKey?!1!=f.insertMode||a.shiftKey||(k==f.keyCode.RIGHT?setTimeout(function(){var a=x(b);x(b,a.begin)},0):
k==f.keyCode.LEFT&&setTimeout(function(){var a=x(b);x(b,a.begin-1)},0)):(f.insertMode=!f.insertMode,x(b,f.insertMode||p.begin!=M()?p.begin:p.begin-1));var h=x(b),q=f.onKeyDown.call(this,a,u(),f);q&&!0===q.refreshFromBuffer&&(c.validPositions={},c.tests={},R(0,u().length),g(!0),C(b,u()),x(b,h.begin,h.end));ga=-1!=d.inArray(k,f.ignorables)}function X(a,b,e,h,k,m){if(void 0==e&&Z)return!1;Z=!0;var s=d(this);a=a||window.event;e=b?e:a.which||a.charCode||a.keyCode;if(!(!0===b||a.ctrlKey&&a.altKey)&&(a.ctrlKey||
a.metaKey||ga))return!0;if(e){!0!==b&&46==e&&!1==a.shiftKey&&","==f.radixPoint&&(e=44);var l;e=String.fromCharCode(e);b?(m=k?m:t()+1,m={begin:m,end:m}):m=x(this);var J=y?1<m.begin-m.end||1==m.begin-m.end&&f.insertMode:1<m.end-m.begin||1==m.end-m.begin&&f.insertMode;J&&(c.undoPositions=d.extend(!0,{},c.validPositions),ea(this,f.keyCode.DELETE,m),f.insertMode||(f.insertMode=!f.insertMode,p(m.begin,k),f.insertMode=!f.insertMode),J=!f.multi);c.writeOutBuffer=!0;var D=m.begin,r=O(D,e,k);!1!==r&&(!0!==
r&&(D=void 0!=r.pos?r.pos:D,e=void 0!=r.c?r.c:e),g(!0),void 0!=r.caret?l=r.caret:(k=c.validPositions,l=void 0!=k[D+1]&&q(m+1,k[D].locator.slice(),D).match.def!=k[D+1].match.def?D+1:B(D)),c.p=l);if(!1!==h){var v=this;setTimeout(function(){f.onKeyValidation.call(v,r,f)},0);if(c.writeOutBuffer&&!1!==r){var A=u();C(this,A,b?void 0:f.numericInput?U(l):l);!0!==b&&setTimeout(function(){!0===P(A)&&s.trigger("complete");T=!0;s.trigger("input")},0)}else J&&(c.buffer=void 0,c.validPositions=c.undoPositions)}else J&&
(c.buffer=void 0,c.validPositions=c.undoPositions);f.showTooltip&&s.prop("title",c.mask);a&&!0!=b&&(a.preventDefault?a.preventDefault():a.returnValue=!1)}}function na(a){var b=d(this),e=a.keyCode,h=u();(a=f.onKeyUp.call(this,a,h,f))&&!0===a.refreshFromBuffer&&(c.validPositions={},c.tests={},R(0,u().length),g(!0),C(this,u()));e==f.keyCode.TAB&&f.showMaskOnFocus&&(b.hasClass("focus.inputmask")&&0==this._valueGet().length?(g(),h=u(),C(this,h),x(this,0),F=u().join("")):(C(this,h),x(this,K(0),K(M()))))}
function ha(a){if(!0===T&&"input"==a.type)return T=!1,!0;var b=this,c=d(b);if("propertychange"==a.type&&b._valueGet().length<=M())return!0;setTimeout(function(){var a=d.isFunction(f.onBeforePaste)?f.onBeforePaste.call(b,b._valueGet(),f):b._valueGet();N(b,!0,!1,a.split(""),!0);!0===P(u())&&c.trigger("complete");c.click()},0)}function oa(a){if(!0===T&&"input"==a.type)return T=!1,!0;var b=x(this),c=this._valueGet(),c=c.replace(RegExp("("+aa(A().join(""))+")*"),"");b.begin>c.length&&(x(this,c.length),
b=x(this));1!=u().length-c.length||c.charAt(b.begin)==u()[b.begin]||c.charAt(b.begin+1)==u()[b.begin]||L(b.begin)||(a.keyCode=f.keyCode.BACKSPACE,fa.call(this,a));a.preventDefault()}function pa(a){r=d(a);if(r.is(":input")&&"number"!=r.attr("type")){r.data("_inputmask",{maskset:c,opts:f,isRTL:!1});f.showTooltip&&r.prop("title",c.mask);ma(a);("rtl"==a.dir||f.rightAlign)&&r.css("text-align","right");if("rtl"==a.dir||f.numericInput){a.dir="ltr";r.removeAttr("dir");var b=r.data("_inputmask");b.isRTL=!0;
r.data("_inputmask",b);y=!0}r.unbind(".inputmask");r.removeClass("focus.inputmask");r.closest("form").bind("submit",function(){F!=u().join("")&&r.change()}).bind("reset",function(){setTimeout(function(){r.trigger("setvalue")},0)});r.bind("mouseenter.inputmask",function(){!d(this).hasClass("focus.inputmask")&&f.showMaskOnHover&&this._valueGet()!=u().join("")&&C(this,u())}).bind("blur.inputmask",function(){var a=d(this);if(a.data("_inputmask")){var b=this._valueGet(),c=u();a.removeClass("focus.inputmask");
F!=u().join("")&&a.change();f.clearMaskOnLostFocus&&""!=b&&(b==A().join("")?this._valueSet(""):Y(this));!1===P(c)&&(a.trigger("incomplete"),f.clearIncomplete&&(g(),f.clearMaskOnLostFocus?this._valueSet(""):(c=A().slice(),C(this,c))))}}).bind("focus.inputmask",function(){var a=d(this),b=this._valueGet();f.showMaskOnFocus&&!a.hasClass("focus.inputmask")&&(!f.showMaskOnHover||f.showMaskOnHover&&""==b)&&this._valueGet()!=u().join("")&&C(this,u(),B(t()));a.addClass("focus.inputmask");F=u().join("")}).bind("mouseleave.inputmask",
function(){var a=d(this);f.clearMaskOnLostFocus&&(a.hasClass("focus.inputmask")||this._valueGet()==a.attr("placeholder")||(this._valueGet()==A().join("")||""==this._valueGet()?this._valueSet(""):Y(this)))}).bind("click.inputmask",function(){var a=this;setTimeout(function(){var b=x(a);u();if(b.begin==b.end){var b=y?K(b.begin):b.begin,c=t(b),c=B(c);b<c?L(b)?x(a,b):x(a,B(b)):x(a,c)}},0)}).bind("dblclick.inputmask",function(){var a=this;setTimeout(function(){x(a,0,B(t()))},0)}).bind(H+".inputmask dragdrop.inputmask drop.inputmask",
ha).bind("setvalue.inputmask",function(){N(this,!0);F=u().join("");this._valueGet()==A().join("")&&this._valueSet("")}).bind("complete.inputmask",f.oncomplete).bind("incomplete.inputmask",f.onincomplete).bind("cleared.inputmask",f.oncleared);r.bind("keydown.inputmask",fa).bind("keypress.inputmask",X).bind("keyup.inputmask",na);if(l||v||w||G)"input"==H&&r.unbind(H+".inputmask"),r.bind("input.inputmask",oa);h&&r.bind("input.inputmask",ha);b=d.isFunction(f.onBeforeMask)?f.onBeforeMask.call(a,a._valueGet(),
f):a._valueGet();N(a,!0,!1,b.split(""),!0);F=u().join("");var e;try{e=document.activeElement}catch(k){}e===a?(r.addClass("focus.inputmask"),x(a,B(t()))):(!1===P(u())&&f.clearIncomplete&&g(),f.clearMaskOnLostFocus?u().join("")==A().join("")?a._valueSet(""):Y(a):C(a,u()));la(a)}}var y=!1,F,r,Z=!1,T=!1,ga=!1,I;if(void 0!=a)switch(a.action){case "isComplete":return r=d(a.el),c=r.data("_inputmask").maskset,f=r.data("_inputmask").opts,P(a.buffer);case "unmaskedvalue":return r=a.$input,c=r.data("_inputmask").maskset,
f=r.data("_inputmask").opts,y=a.$input.data("_inputmask").isRTL,ba(a.$input,a.skipDatepickerCheck);case "mask":F=u().join("");pa(a.el);break;case "format":return r=d({}),r.data("_inputmask",{maskset:c,opts:f,isRTL:f.numericInput}),f.numericInput&&(y=!0),a=a.value.split(""),N(r,!1,!1,y?a.reverse():a,!0),y?u().reverse().join(""):u().join("");case "isValid":return r=d({}),r.data("_inputmask",{maskset:c,opts:f,isRTL:f.numericInput}),f.numericInput&&(y=!0),a=a.value.split(""),N(r,!1,!0,y?a.reverse():a),
P(u());case "getemptymask":return r=d(a.el),c=r.data("_inputmask").maskset,f=r.data("_inputmask").opts,A();case "remove":var z=a.el;r=d(z);c=r.data("_inputmask").maskset;f=r.data("_inputmask").opts;z._valueSet(ba(r));r.unbind(".inputmask");r.removeClass("focus.inputmask");r.removeData("_inputmask");var $;Object.getOwnPropertyDescriptor&&($=Object.getOwnPropertyDescriptor(z,"value"));$&&$.get?z._valueGet&&Object.defineProperty(z,"value",{get:z._valueGet,set:z._valueSet}):document.__lookupGetter__&&
z.__lookupGetter__("value")&&z._valueGet&&(z.__defineGetter__("value",z._valueGet),z.__defineSetter__("value",z._valueSet));try{delete z._valueGet,delete z._valueSet}catch(ra){z._valueGet=void 0,z._valueSet=void 0}}};d.inputmask={defaults:{placeholder:"_",optionalmarker:{start:"[",end:"]"},quantifiermarker:{start:"{",end:"}"},groupmarker:{start:"(",end:")"},alternatormarker:"|",escapeChar:"\\",mask:null,oncomplete:d.noop,onincomplete:d.noop,oncleared:d.noop,repeat:0,greedy:!0,autoUnmask:!1,clearMaskOnLostFocus:!0,
insertMode:!0,clearIncomplete:!1,aliases:{},alias:null,onKeyUp:d.noop,onKeyDown:d.noop,onBeforeMask:void 0,onBeforePaste:void 0,onUnMask:void 0,showMaskOnFocus:!0,showMaskOnHover:!0,onKeyValidation:d.noop,skipOptionalPartCharacter:" ",showTooltip:!1,numericInput:!1,getLastValidPosition:void 0,rightAlign:!1,radixPoint:"",definitions:{9:{validator:"[0-9]",cardinality:1,definitionSymbol:"*"},a:{validator:"[A-Za-z\u0410-\u044f\u0401\u0451]",cardinality:1,definitionSymbol:"*"},"*":{validator:"[A-Za-z\u0410-\u044f\u0401\u04510-9]",
cardinality:1}},keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91},ignorables:[8,9,13,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],
isComplete:void 0},masksCache:{},escapeRegex:function(a){return a.replace(RegExp("(\\/|\\.|\\*|\\+|\\?|\\||\\(|\\)|\\[|\\]|\\{|\\}|\\\\)","gim"),"\\$1")},format:function(a,b){var f=d.extend(!0,{},d.inputmask.defaults,b);c(f.alias,b,f);return t({action:"format",value:a},g(f),f)},isValid:function(a,b){var f=d.extend(!0,{},d.inputmask.defaults,b);c(f.alias,b,f);return t({action:"isValid",value:a},g(f),f)}};d.fn.inputmask=function(a,b,f,e,h){function l(a,b){var c=d(a),g;for(g in b){var f=c.data("inputmask-"+
g.toLowerCase());void 0!=f&&(b[g]=f)}return b}f=f||t;e=e||"_inputmask";var p=d.extend(!0,{},d.inputmask.defaults,b),q;if("string"===typeof a)switch(a){case "mask":return c(p.alias,b,p),q=g(p),0==q.length?this:this.each(function(){f({action:"mask",el:this},d.extend(!0,{},d.isArray(q)&&f===t?q[0]:q),l(this,p))});case "unmaskedvalue":return a=d(this),a.data(e)?f({action:"unmaskedvalue",$input:a}):a.val();case "remove":return this.each(function(){d(this).data(e)&&f({action:"remove",el:this})});case "getemptymask":return this.data(e)?
f({action:"getemptymask",el:this}):"";case "hasMaskedValue":return this.data(e)?!this.data(e).opts.autoUnmask:!1;case "isComplete":return this.data(e)?f({action:"isComplete",buffer:this[0]._valueGet().split(""),el:this}):!0;case "getmetadata":if(this.data(e))return q=this.data(e).maskset,q.metadata;break;case "_detectScope":return c(p.alias,b,p),void 0==h||c(h,b,p)||-1!=d.inArray(h,"mask unmaskedvalue remove getemptymask hasMaskedValue isComplete getmetadata _detectScope".split(" "))||(p.mask=h),
d.isFunction(p.mask)&&(p.mask=p.mask.call(this,p)),d.isArray(p.mask);default:return c(a,b,p)||(p.mask=a),q=g(p),void 0==q?this:this.each(function(){f({action:"mask",el:this},d.extend(!0,{},d.isArray(q)&&f===t?q[0]:q),l(this,p))})}else{if("object"==typeof a)return p=d.extend(!0,{},d.inputmask.defaults,a),c(p.alias,a,p),q=g(p),void 0==q?this:this.each(function(){f({action:"mask",el:this},d.extend(!0,{},d.isArray(q)&&f===t?q[0]:q),l(this,p))});if(void 0==a)return this.each(function(){var a=d(this).attr("data-inputmask");
if(a&&""!=a)try{var a=a.replace(RegExp("'","g"),'"'),g=d.parseJSON("{"+a+"}");d.extend(!0,g,b);p=d.extend(!0,{},d.inputmask.defaults,g);c(p.alias,g,p);p.alias=void 0;d(this).inputmask("mask",p,f)}catch(e){}})}}}})(jQuery);
(function(d){if(void 0!=d.fn.inputmask){var a=function(a,g,h){function b(a){var b=document.createElement("input");a="on"+a;var c=a in b;c||(b.setAttribute(a,"return;"),c="function"==typeof b[a]);return c}function e(a){if(void 0==d.valHooks[a]||!0!=d.valHooks[a].inputmaskmultipatch){var b=d.valHooks[a]&&d.valHooks[a].get?d.valHooks[a].get:function(a){return a.value},c=d.valHooks[a]&&d.valHooks[a].set?d.valHooks[a].set:function(a,b){a.value=b;return a};d.valHooks[a]={get:function(a){var c=d(a);return c.data("_inputmask-multi")?
(a=c.data("_inputmask-multi"),b(a.elmasks[a.activeMasksetIndex])):b(a)},set:function(a,b){var g=d(a),f=c(a,b);g.data("_inputmask-multi")&&g.triggerHandler("setvalue");return f},inputmaskmultipatch:!0}}}function l(a,b,c){a=a.jquery&&0<a.length?a[0]:a;if("number"==typeof b){b=w(b);c=w(c);c="number"==typeof c?c:b;if(a!=k){var g=d(a).data("_inputmask")||{};g.caret={begin:b,end:c};d(a).data("_inputmask",g)}d(a).is(":visible")&&(a.scrollLeft=a.scrollWidth,!1==h.insertMode&&b==c&&c++,a.setSelectionRange?
(a.selectionStart=b,a.selectionEnd=c):a.createTextRange&&(a=a.createTextRange(),a.collapse(!0),a.moveEnd("character",c),a.moveStart("character",b),a.select()))}else return g=d(a).data("_inputmask"),!d(a).is(":visible")&&g&&void 0!=g.caret?(b=g.caret.begin,c=g.caret.end):a.setSelectionRange?(b=a.selectionStart,c=a.selectionEnd):document.selection&&document.selection.createRange&&(a=document.selection.createRange(),b=0-a.duplicate().moveStart("character",-1E5),c=b+a.text.length),b=w(b),c=w(c),{begin:b,
end:c}}function w(a){!t||"number"!=typeof a||h.greedy&&""==h.placeholder||(a=k.value.length-a);return a}function v(a,b){if("multiMaskScope"!=a){if(d.isFunction(h.determineActiveMasksetIndex))s=h.determineActiveMasksetIndex.call(n,a,b);else{var c=-1,g=-1,f=-1;d.each(b,function(a,b){var e=d(b).data("_inputmask").maskset,h=-1,k=0,n=l(b).begin,q;for(q in e.validPositions)e=parseInt(q),e>h&&(h=e),k++;if(k>c||k==c&&g>n&&f>h||k==c&&g==n&&f<h)c=k,g=n,s=a,f=h})}var e=n.data("_inputmask-multi")||{activeMasksetIndex:0,
elmasks:b};e.activeMasksetIndex=s;n.data("_inputmask-multi",e)}-1==d.inArray(a,["focus"])&&k.value!=b[s]._valueGet()&&(e=""==d(b[s]).val()?b[s]._valueGet():d(b[s]).val(),k.value=e);-1==d.inArray(a,["blur","focus"])&&d(b[s]).hasClass("focus.inputmask")&&(e=l(b[s]),l(k,e.begin,e.end))}function G(a){k=a;n=d(k);t="rtl"==k.dir||h.numericInput;s=0;f=d.map(g,function(a,b){var c='<input type="text" ';n.attr("value")&&(c+='value="'+n.attr("value")+'" ');n.attr("dir")&&(c+='dir="'+n.attr("dir")+'" ');c=d(c+
"/>")[0];d(c).inputmask(d.extend({},h,{mask:a.mask}));return c});n.data("_inputmask-multi",{activeMasksetIndex:0,elmasks:f});("rtl"==k.dir||h.rightAlign)&&n.css("text-align","right");k.dir="ltr";n.removeAttr("dir");""!=n.attr("value")&&v("init",f);n.bind("mouseenter blur focus mouseleave click dblclick keydown keypress keypress",function(a){var b=l(k),c,g=!0;if("keydown"==a.type){c=a.keyCode;if(c==h.keyCode.DOWN&&s<f.length-1)return s++,v("multiMaskScope",f),!1;if(c==h.keyCode.UP&&0<s)return s--,
v("multiMaskScope",f),!1;if(a.ctrlKey||a.shiftKey||a.altKey)return!0}else if("keypress"==a.type&&(a.ctrlKey||a.shiftKey||a.altKey))return!0;d.each(f,function(f,e){if("keydown"==a.type){c=a.keyCode;if(c==h.keyCode.BACKSPACE&&e._valueGet().length<b.begin)return;if(c==h.keyCode.TAB)g=!1;else{if(c==h.keyCode.RIGHT){l(e,b.begin+1,b.end+1);g=!1;return}if(c==h.keyCode.LEFT){l(e,b.begin-1,b.end-1);g=!1;return}}}if(-1!=d.inArray(a.type,["click"])&&(l(e,w(b.begin),w(b.end)),b.begin!=b.end)){g=!1;return}-1!=
d.inArray(a.type,["keydown"])&&b.begin!=b.end&&l(e,b.begin,b.end);d(e).triggerHandler(a)});g&&setTimeout(function(){v(a.type,f)},0)});n.bind(H+" dragdrop drop setvalue",function(a){l(k);setTimeout(function(){d.each(f,function(b,c){c._valueSet(k.value);d(c).triggerHandler(a)});setTimeout(function(){v(a.type,f)},0)},0)});e(k.type)}var H=b("paste")?"paste":b("input")?"input":"propertychange",t,k,n,f,s;h.multi=!0;if(void 0!=a)switch(a.action){case "isComplete":return n=d(a.el),a=n.data("_inputmask-multi"),
a=a.elmasks[a.activeMasksetIndex],d(a).inputmask("isComplete");case "unmaskedvalue":return n=a.$input,a=n.data("_inputmask-multi"),a=a.elmasks[a.activeMasksetIndex],d(a).inputmask("unmaskedvalue");case "mask":G(a.el);break;case "format":return n=d({}),n.data("_inputmask",{maskset:maskset,opts:h,isRTL:h.numericInput}),h.numericInput&&(t=!0),a=a.value.split(""),checkVal(n,!1,!1,t?a.reverse():a,!0),t?getBuffer().reverse().join(""):getBuffer().join("");case "isValid":return n=d({}),n.data("_inputmask",
{maskset:maskset,opts:h,isRTL:h.numericInput}),h.numericInput&&(t=!0),a=a.value.split(""),checkVal(n,!1,!0,t?a.reverse():a),isComplete(getBuffer());case "getemptymask":return n=d(a.el),maskset=n.data("_inputmask").maskset,h=n.data("_inputmask").opts,getBufferTemplate();case "remove":k=a.el;n=d(k);maskset=n.data("_inputmask").maskset;h=n.data("_inputmask").opts;k._valueSet(unmaskedvalue(n));n.unbind(".inputmask");n.removeClass("focus.inputmask");n.removeData("_inputmask");var W;Object.getOwnPropertyDescriptor&&
(W=Object.getOwnPropertyDescriptor(k,"value"));W&&W.get?k._valueGet&&Object.defineProperty(k,"value",{get:k._valueGet,set:k._valueSet}):document.__lookupGetter__&&k.__lookupGetter__("value")&&k._valueGet&&(k.__defineGetter__("value",k._valueGet),k.__defineSetter__("value",k._valueSet));try{delete k._valueGet,delete k._valueSet}catch(qa){k._valueGet=void 0,k._valueSet=void 0}}};d.extend(d.inputmask.defaults,{multi:!1,nojumps:!1,nojumpsThreshold:0,determineActiveMasksetIndex:void 0});d.inputmask._fn=
d.fn.inputmask;d.fn.inputmask=function(c,g){if("string"===typeof c)return d.inputmask._fn("_detectScope",g,void 0,void 0,c)?d.inputmask._fn.call(this,c,g,a,"_inputmask-multi"):d.inputmask._fn.call(this,c,g);if("object"==typeof c)return d.inputmask._fn("_detectScope",c)?d.inputmask._fn.call(this,c,g,a,"_inputmask-multi"):d.inputmask._fn.call(this,c,g);if(void 0==c)return d.inputmask._fn.call(this,c,g)}}})(jQuery);
(function(d){d.extend(d.inputmask.defaults.definitions,{A:{validator:"[A-Za-z]",cardinality:1,casing:"upper"},"#":{validator:"[A-Za-z\u0410-\u044f\u0401\u04510-9]",cardinality:1,casing:"upper"}});d.extend(d.inputmask.defaults.aliases,{url:{mask:"ir",placeholder:"",separator:"",defaultPrefix:"http://",regex:{urlpre1:/[fh]/,urlpre2:/(ft|ht)/,urlpre3:/(ftp|htt)/,urlpre4:/(ftp:|http|ftps)/,urlpre5:/(ftp:\/|ftps:|http:|https)/,urlpre6:/(ftp:\/\/|ftps:\/|http:\/|https:)/,urlpre7:/(ftp:\/\/|ftps:\/\/|http:\/\/|https:\/)/,
urlpre8:/(ftp:\/\/|ftps:\/\/|http:\/\/|https:\/\/)/},definitions:{i:{validator:function(a,c,h,d,b){return!0},cardinality:8,prevalidator:function(){for(var a=[],c=0;8>c;c++)a[c]=function(){var a=c;return{validator:function(c,b,d,q,w){if(w.regex["urlpre"+(a+1)]){var r=c;0<a+1-c.length&&(r=b.join("").substring(0,a+1-c.length)+""+r);c=w.regex["urlpre"+(a+1)].test(r);if(!q&&!c){d-=a;for(q=0;q<w.defaultPrefix.length;q++)b[d]=w.defaultPrefix[q],d++;for(q=0;q<r.length-1;q++)b[d]=r[q],d++;return{pos:d}}return c}return!1},
cardinality:a}}();return a}()},r:{validator:".",cardinality:50}},insertMode:!1,autoUnmask:!1},ip:{mask:"i[i[i]].i[i[i]].i[i[i]].i[i[i]]",definitions:{i:{validator:function(a,c,d,e,b){-1<d-1&&"."!=c[d-1]?(a=c[d-1]+a,a=-1<d-2&&"."!=c[d-2]?c[d-2]+a:"0"+a):a="00"+a;return/25[0-5]|2[0-4][0-9]|[01][0-9][0-9]/.test(a)},cardinality:1}}},email:{mask:"*{1,20}[.*{1,20}][.*{1,20}][.*{1,20}]@*{1,20}.*{2,6}[.*{1,2}]",greedy:!1}})})(jQuery);
urlpre8:/(ftp:\/\/|ftps:\/\/|http:\/\/|https:\/\/)/},definitions:{i:{validator:function(a,c,g,d,b){return!0},cardinality:8,prevalidator:function(){for(var a=[],c=0;8>c;c++)a[c]=function(){var a=c;return{validator:function(c,b,d,l,w){if(w.regex["urlpre"+(a+1)]){var v=c;0<a+1-c.length&&(v=b.join("").substring(0,a+1-c.length)+""+v);c=w.regex["urlpre"+(a+1)].test(v);if(!l&&!c){d-=a;for(l=0;l<w.defaultPrefix.length;l++)b[d]=w.defaultPrefix[l],d++;for(l=0;l<v.length-1;l++)b[d]=v[l],d++;return{pos:d}}return c}return!1},
cardinality:a}}();return a}()},r:{validator:".",cardinality:50}},insertMode:!1,autoUnmask:!1},ip:{mask:"i[i[i]].i[i[i]].i[i[i]].i[i[i]]",definitions:{i:{validator:function(a,c,g,d,b){-1<g-1&&"."!=c[g-1]?(a=c[g-1]+a,a=-1<g-2&&"."!=c[g-2]?c[g-2]+a:"0"+a):a="00"+a;return/25[0-5]|2[0-4][0-9]|[01][0-9][0-9]/.test(a)},cardinality:1}}},email:{mask:"*{1,20}[.*{1,20}][.*{1,20}][.*{1,20}]@*{1,20}.*{2,6}[.*{1,2}]",greedy:!1,onBeforePaste:function(a,c){a=a.toLowerCase();return a.replace("mailto:","")},definitions:{"*":{validator:"[A-Za-z\u0410-\u044f\u0401\u04510-9]",
cardinality:1,casing:"lower"}}}})})(jQuery);
(function(d){d.extend(d.inputmask.defaults.definitions,{h:{validator:"[01][0-9]|2[0-3]",cardinality:2,prevalidator:[{validator:"[0-2]",cardinality:1}]},s:{validator:"[0-5][0-9]",cardinality:2,prevalidator:[{validator:"[0-5]",cardinality:1}]},d:{validator:"0[1-9]|[12][0-9]|3[01]",cardinality:2,prevalidator:[{validator:"[0-3]",cardinality:1}]},m:{validator:"0[1-9]|1[012]",cardinality:2,prevalidator:[{validator:"[01]",cardinality:1}]},y:{validator:"(19|20)\\d{2}",cardinality:4,prevalidator:[{validator:"[12]",
cardinality:1},{validator:"(19|20)",cardinality:2},{validator:"(19|20)\\d",cardinality:3}]}});d.extend(d.inputmask.defaults.aliases,{"dd/mm/yyyy":{mask:"1/2/y",placeholder:"dd/mm/yyyy",regex:{val1pre:/[0-3]/,val1:/0[1-9]|[12][0-9]|3[01]/,val2pre:function(a){a=d.inputmask.escapeRegex.call(this,a);return RegExp("((0[1-9]|[12][0-9]|3[01])"+a+"[01])")},val2:function(a){a=d.inputmask.escapeRegex.call(this,a);return RegExp("((0[1-9]|[12][0-9])"+a+"(0[1-9]|1[012]))|(30"+a+"(0[13-9]|1[012]))|(31"+a+"(0[13578]|1[02]))")}},
leapday:"29/02/",separator:"/",yearrange:{minyear:1900,maxyear:2099},isInYearRange:function(a,c,d){if(isNaN(a))return!1;var e=parseInt(a.concat(c.toString().slice(a.length)));a=parseInt(a.concat(d.toString().slice(a.length)));return(isNaN(e)?!1:c<=e&&e<=d)||(isNaN(a)?!1:c<=a&&a<=d)},determinebaseyear:function(a,c,d){var e=(new Date).getFullYear();if(a>e)return a;if(c<e){for(var e=c.toString().slice(0,2),b=c.toString().slice(2,4);c<e+d;)e--;c=e+b;return a>c?a:c}return e},onKeyUp:function(a,c,h){c=
d(this);a.ctrlKey&&a.keyCode==h.keyCode.RIGHT&&(a=new Date,c.val(a.getDate().toString()+(a.getMonth()+1).toString()+a.getFullYear().toString()))},definitions:{1:{validator:function(a,c,d,e,b){var g=b.regex.val1.test(a);return e||g||a.charAt(1)!=b.separator&&-1=="-./".indexOf(a.charAt(1))||!(g=b.regex.val1.test("0"+a.charAt(0)))?g:(c[d-1]="0",{refreshFromBuffer:{start:d-1,end:d},pos:d,c:a.charAt(0)})},cardinality:2,prevalidator:[{validator:function(a,c,d,e,b){isNaN(c[d+1])||(a+=c[d+1]);var g=1==a.length?
b.regex.val1pre.test(a):b.regex.val1.test(a);return e||g||!(g=b.regex.val1.test("0"+a))?g:(c[d]="0",d++,{pos:d})},cardinality:1}]},2:{validator:function(a,c,d,e,b){var g=b.mask.indexOf("2")==b.mask.length-1?c.join("").substr(5,3):c.join("").substr(0,3);-1!=g.indexOf(b.placeholder[0])&&(g="01"+b.separator);var q=b.regex.val2(b.separator).test(g+a);if(!(e||q||a.charAt(1)!=b.separator&&-1=="-./".indexOf(a.charAt(1)))&&(q=b.regex.val2(b.separator).test(g+"0"+a.charAt(0))))return c[d-1]="0",{refreshFromBuffer:{start:d-
1,end:d},pos:d,c:a.charAt(0)};if(b.mask.indexOf("2")==b.mask.length-1&&q){if(c.join("").substr(4,4)+a!=b.leapday)return!0;a=parseInt(c.join("").substr(0,4),10);return 0===a%4?0===a%100?0===a%400?!0:!1:!0:!1}return q},cardinality:2,prevalidator:[{validator:function(a,c,d,e,b){isNaN(c[d+1])||(a+=c[d+1]);var g=b.mask.indexOf("2")==b.mask.length-1?c.join("").substr(5,3):c.join("").substr(0,3);-1!=g.indexOf(b.placeholder[0])&&(g="01"+b.separator);var q=1==a.length?b.regex.val2pre(b.separator).test(g+a):
b.regex.val2(b.separator).test(g+a);return e||q||!(q=b.regex.val2(b.separator).test(g+"0"+a))?q:(c[d]="0",d++,{pos:d})},cardinality:1}]},y:{validator:function(a,c,d,e,b){if(b.isInYearRange(a,b.yearrange.minyear,b.yearrange.maxyear)){if(c.join("").substr(0,6)!=b.leapday)return!0;a=parseInt(a,10);return 0===a%4?0===a%100?0===a%400?!0:!1:!0:!1}return!1},cardinality:4,prevalidator:[{validator:function(a,c,d,e,b){var g=b.isInYearRange(a,b.yearrange.minyear,b.yearrange.maxyear);if(!e&&!g){e=b.determinebaseyear(b.yearrange.minyear,
b.yearrange.maxyear,a+"0").toString().slice(0,1);if(g=b.isInYearRange(e+a,b.yearrange.minyear,b.yearrange.maxyear))return c[d++]=e[0],{pos:d};e=b.determinebaseyear(b.yearrange.minyear,b.yearrange.maxyear,a+"0").toString().slice(0,2);if(g=b.isInYearRange(e+a,b.yearrange.minyear,b.yearrange.maxyear))return c[d++]=e[0],c[d++]=e[1],{pos:d}}return g},cardinality:1},{validator:function(a,c,d,e,b){var g=b.isInYearRange(a,b.yearrange.minyear,b.yearrange.maxyear);if(!e&&!g){e=b.determinebaseyear(b.yearrange.minyear,
b.yearrange.maxyear,a).toString().slice(0,2);if(g=b.isInYearRange(a[0]+e[1]+a[1],b.yearrange.minyear,b.yearrange.maxyear))return c[d++]=e[1],{pos:d};e=b.determinebaseyear(b.yearrange.minyear,b.yearrange.maxyear,a).toString().slice(0,2);b.isInYearRange(e+a,b.yearrange.minyear,b.yearrange.maxyear)?c.join("").substr(0,6)!=b.leapday?g=!0:(b=parseInt(a,10),g=0===b%4?0===b%100?0===b%400?!0:!1:!0:!1):g=!1;if(g)return c[d-1]=e[0],c[d++]=e[1],c[d++]=a[0],{refreshFromBuffer:{start:d-3,end:d},pos:d}}return g},
cardinality:2},{validator:function(a,c,d,e,b){return b.isInYearRange(a,b.yearrange.minyear,b.yearrange.maxyear)},cardinality:3}]}},insertMode:!1,autoUnmask:!1},"mm/dd/yyyy":{placeholder:"mm/dd/yyyy",alias:"dd/mm/yyyy",regex:{val2pre:function(a){a=d.inputmask.escapeRegex.call(this,a);return RegExp("((0[13-9]|1[012])"+a+"[0-3])|(02"+a+"[0-2])")},val2:function(a){a=d.inputmask.escapeRegex.call(this,a);return RegExp("((0[1-9]|1[012])"+a+"(0[1-9]|[12][0-9]))|((0[13-9]|1[012])"+a+"30)|((0[13578]|1[02])"+
a+"31)")},val1pre:/[01]/,val1:/0[1-9]|1[012]/},leapday:"02/29/",onKeyUp:function(a,c,h){c=d(this);a.ctrlKey&&a.keyCode==h.keyCode.RIGHT&&(a=new Date,c.val((a.getMonth()+1).toString()+a.getDate().toString()+a.getFullYear().toString()))}},"yyyy/mm/dd":{mask:"y/1/2",placeholder:"yyyy/mm/dd",alias:"mm/dd/yyyy",leapday:"/02/29",onKeyUp:function(a,c,h){c=d(this);a.ctrlKey&&a.keyCode==h.keyCode.RIGHT&&(a=new Date,c.val(a.getFullYear().toString()+(a.getMonth()+1).toString()+a.getDate().toString()))}},"dd.mm.yyyy":{mask:"1.2.y",
leapday:"29/02/",separator:"/",yearrange:{minyear:1900,maxyear:2099},isInYearRange:function(a,c,g){if(isNaN(a))return!1;var d=parseInt(a.concat(c.toString().slice(a.length)));a=parseInt(a.concat(g.toString().slice(a.length)));return(isNaN(d)?!1:c<=d&&d<=g)||(isNaN(a)?!1:c<=a&&a<=g)},determinebaseyear:function(a,c,g){var d=(new Date).getFullYear();if(a>d)return a;if(c<d){for(var d=c.toString().slice(0,2),b=c.toString().slice(2,4);c<d+g;)d--;c=d+b;return a>c?a:c}return d},onKeyUp:function(a,c,g){c=
d(this);a.ctrlKey&&a.keyCode==g.keyCode.RIGHT&&(a=new Date,c.val(a.getDate().toString()+(a.getMonth()+1).toString()+a.getFullYear().toString()))},definitions:{1:{validator:function(a,c,g,d,b){var e=b.regex.val1.test(a);return d||e||a.charAt(1)!=b.separator&&-1=="-./".indexOf(a.charAt(1))||!(e=b.regex.val1.test("0"+a.charAt(0)))?e:(c[g-1]="0",{refreshFromBuffer:{start:g-1,end:g},pos:g,c:a.charAt(0)})},cardinality:2,prevalidator:[{validator:function(a,c,g,d,b){isNaN(c[g+1])||(a+=c[g+1]);var e=1==a.length?
b.regex.val1pre.test(a):b.regex.val1.test(a);return d||e||!(e=b.regex.val1.test("0"+a))?e:(c[g]="0",g++,{pos:g})},cardinality:1}]},2:{validator:function(a,c,g,d,b){var e=b.mask.indexOf("2")==b.mask.length-1?c.join("").substr(5,3):c.join("").substr(0,3);-1!=e.indexOf(b.placeholder[0])&&(e="01"+b.separator);var l=b.regex.val2(b.separator).test(e+a);if(!(d||l||a.charAt(1)!=b.separator&&-1=="-./".indexOf(a.charAt(1)))&&(l=b.regex.val2(b.separator).test(e+"0"+a.charAt(0))))return c[g-1]="0",{refreshFromBuffer:{start:g-
1,end:g},pos:g,c:a.charAt(0)};if(b.mask.indexOf("2")==b.mask.length-1&&l){if(c.join("").substr(4,4)+a!=b.leapday)return!0;a=parseInt(c.join("").substr(0,4),10);return 0===a%4?0===a%100?0===a%400?!0:!1:!0:!1}return l},cardinality:2,prevalidator:[{validator:function(a,c,d,h,b){isNaN(c[d+1])||(a+=c[d+1]);var e=b.mask.indexOf("2")==b.mask.length-1?c.join("").substr(5,3):c.join("").substr(0,3);-1!=e.indexOf(b.placeholder[0])&&(e="01"+b.separator);var l=1==a.length?b.regex.val2pre(b.separator).test(e+a):
b.regex.val2(b.separator).test(e+a);return h||l||!(l=b.regex.val2(b.separator).test(e+"0"+a))?l:(c[d]="0",d++,{pos:d})},cardinality:1}]},y:{validator:function(a,c,d,h,b){if(b.isInYearRange(a,b.yearrange.minyear,b.yearrange.maxyear)){if(c.join("").substr(0,6)!=b.leapday)return!0;a=parseInt(a,10);return 0===a%4?0===a%100?0===a%400?!0:!1:!0:!1}return!1},cardinality:4,prevalidator:[{validator:function(a,c,d,h,b){var e=b.isInYearRange(a,b.yearrange.minyear,b.yearrange.maxyear);if(!h&&!e){h=b.determinebaseyear(b.yearrange.minyear,
b.yearrange.maxyear,a+"0").toString().slice(0,1);if(e=b.isInYearRange(h+a,b.yearrange.minyear,b.yearrange.maxyear))return c[d++]=h[0],{pos:d};h=b.determinebaseyear(b.yearrange.minyear,b.yearrange.maxyear,a+"0").toString().slice(0,2);if(e=b.isInYearRange(h+a,b.yearrange.minyear,b.yearrange.maxyear))return c[d++]=h[0],c[d++]=h[1],{pos:d}}return e},cardinality:1},{validator:function(a,c,d,h,b){var e=b.isInYearRange(a,b.yearrange.minyear,b.yearrange.maxyear);if(!h&&!e){h=b.determinebaseyear(b.yearrange.minyear,
b.yearrange.maxyear,a).toString().slice(0,2);if(e=b.isInYearRange(a[0]+h[1]+a[1],b.yearrange.minyear,b.yearrange.maxyear))return c[d++]=h[1],{pos:d};h=b.determinebaseyear(b.yearrange.minyear,b.yearrange.maxyear,a).toString().slice(0,2);b.isInYearRange(h+a,b.yearrange.minyear,b.yearrange.maxyear)?c.join("").substr(0,6)!=b.leapday?e=!0:(b=parseInt(a,10),e=0===b%4?0===b%100?0===b%400?!0:!1:!0:!1):e=!1;if(e)return c[d-1]=h[0],c[d++]=h[1],c[d++]=a[0],{refreshFromBuffer:{start:d-3,end:d},pos:d}}return e},
cardinality:2},{validator:function(a,c,d,h,b){return b.isInYearRange(a,b.yearrange.minyear,b.yearrange.maxyear)},cardinality:3}]}},insertMode:!1,autoUnmask:!1},"mm/dd/yyyy":{placeholder:"mm/dd/yyyy",alias:"dd/mm/yyyy",regex:{val2pre:function(a){a=d.inputmask.escapeRegex.call(this,a);return RegExp("((0[13-9]|1[012])"+a+"[0-3])|(02"+a+"[0-2])")},val2:function(a){a=d.inputmask.escapeRegex.call(this,a);return RegExp("((0[1-9]|1[012])"+a+"(0[1-9]|[12][0-9]))|((0[13-9]|1[012])"+a+"30)|((0[13578]|1[02])"+
a+"31)")},val1pre:/[01]/,val1:/0[1-9]|1[012]/},leapday:"02/29/",onKeyUp:function(a,c,g){c=d(this);a.ctrlKey&&a.keyCode==g.keyCode.RIGHT&&(a=new Date,c.val((a.getMonth()+1).toString()+a.getDate().toString()+a.getFullYear().toString()))}},"yyyy/mm/dd":{mask:"y/1/2",placeholder:"yyyy/mm/dd",alias:"mm/dd/yyyy",leapday:"/02/29",onKeyUp:function(a,c,g){c=d(this);a.ctrlKey&&a.keyCode==g.keyCode.RIGHT&&(a=new Date,c.val(a.getFullYear().toString()+(a.getMonth()+1).toString()+a.getDate().toString()))}},"dd.mm.yyyy":{mask:"1.2.y",
placeholder:"dd.mm.yyyy",leapday:"29.02.",separator:".",alias:"dd/mm/yyyy"},"dd-mm-yyyy":{mask:"1-2-y",placeholder:"dd-mm-yyyy",leapday:"29-02-",separator:"-",alias:"dd/mm/yyyy"},"mm.dd.yyyy":{mask:"1.2.y",placeholder:"mm.dd.yyyy",leapday:"02.29.",separator:".",alias:"mm/dd/yyyy"},"mm-dd-yyyy":{mask:"1-2-y",placeholder:"mm-dd-yyyy",leapday:"02-29-",separator:"-",alias:"mm/dd/yyyy"},"yyyy.mm.dd":{mask:"y.1.2",placeholder:"yyyy.mm.dd",leapday:".02.29",separator:".",alias:"yyyy/mm/dd"},"yyyy-mm-dd":{mask:"y-1-2",
placeholder:"yyyy-mm-dd",leapday:"-02-29",separator:"-",alias:"yyyy/mm/dd"},datetime:{mask:"1/2/y h:s",placeholder:"dd/mm/yyyy hh:mm",alias:"dd/mm/yyyy",regex:{hrspre:/[012]/,hrs24:/2[0-4]|1[3-9]/,hrs:/[01][0-9]|2[0-4]/,ampm:/^[a|p|A|P][m|M]/},timeseparator:":",hourFormat:"24",definitions:{h:{validator:function(a,c,d,e,b){if("24"==b.hourFormat&&24==parseInt(a,10))return c[d-1]="0",c[d]="0",{refreshFromBuffer:{start:d-1,end:d},c:"0"};var g=b.regex.hrs.test(a);return e||g||a.charAt(1)!=b.timeseparator&&
-1=="-.:".indexOf(a.charAt(1))||!(g=b.regex.hrs.test("0"+a.charAt(0)))?g&&"24"!==b.hourFormat&&b.regex.hrs24.test(a)?(a=parseInt(a,10),c[d+5]=24==a?"a":"p",c[d+6]="m",a-=12,10>a?(c[d]=a.toString(),c[d-1]="0"):(c[d]=a.toString().charAt(1),c[d-1]=a.toString().charAt(0)),{refreshFromBuffer:{start:d-1,end:d+6},c:c[d]}):g:(c[d-1]="0",c[d]=a.charAt(0),d++,{refreshFromBuffer:{start:d-2,end:d},pos:d,c:b.timeseparator})},cardinality:2,prevalidator:[{validator:function(a,c,d,e,b){var g=b.regex.hrspre.test(a);
return e||g||!(g=b.regex.hrs.test("0"+a))?g:(c[d]="0",d++,{pos:d})},cardinality:1}]},t:{validator:function(a,c,d,e,b){return b.regex.ampm.test(a+"m")},casing:"lower",cardinality:1}},insertMode:!1,autoUnmask:!1},datetime12:{mask:"1/2/y h:s t\\m",placeholder:"dd/mm/yyyy hh:mm xm",alias:"datetime",hourFormat:"12"},"hh:mm t":{mask:"h:s t\\m",placeholder:"hh:mm xm",alias:"datetime",hourFormat:"12"},"h:s t":{mask:"h:s t\\m",placeholder:"hh:mm xm",alias:"datetime",hourFormat:"12"},"hh:mm:ss":{mask:"h:s:s",
placeholder:"yyyy-mm-dd",leapday:"-02-29",separator:"-",alias:"yyyy/mm/dd"},datetime:{mask:"1/2/y h:s",placeholder:"dd/mm/yyyy hh:mm",alias:"dd/mm/yyyy",regex:{hrspre:/[012]/,hrs24:/2[0-4]|1[3-9]/,hrs:/[01][0-9]|2[0-4]/,ampm:/^[a|p|A|P][m|M]/},timeseparator:":",hourFormat:"24",definitions:{h:{validator:function(a,c,d,h,b){if("24"==b.hourFormat&&24==parseInt(a,10))return c[d-1]="0",c[d]="0",{refreshFromBuffer:{start:d-1,end:d},c:"0"};var e=b.regex.hrs.test(a);return h||e||a.charAt(1)!=b.timeseparator&&
-1=="-.:".indexOf(a.charAt(1))||!(e=b.regex.hrs.test("0"+a.charAt(0)))?e&&"24"!==b.hourFormat&&b.regex.hrs24.test(a)?(a=parseInt(a,10),c[d+5]=24==a?"a":"p",c[d+6]="m",a-=12,10>a?(c[d]=a.toString(),c[d-1]="0"):(c[d]=a.toString().charAt(1),c[d-1]=a.toString().charAt(0)),{refreshFromBuffer:{start:d-1,end:d+6},c:c[d]}):e:(c[d-1]="0",c[d]=a.charAt(0),d++,{refreshFromBuffer:{start:d-2,end:d},pos:d,c:b.timeseparator})},cardinality:2,prevalidator:[{validator:function(a,c,d,h,b){var e=b.regex.hrspre.test(a);
return h||e||!(e=b.regex.hrs.test("0"+a))?e:(c[d]="0",d++,{pos:d})},cardinality:1}]},t:{validator:function(a,c,d,h,b){return b.regex.ampm.test(a+"m")},casing:"lower",cardinality:1}},insertMode:!1,autoUnmask:!1},datetime12:{mask:"1/2/y h:s t\\m",placeholder:"dd/mm/yyyy hh:mm xm",alias:"datetime",hourFormat:"12"},"hh:mm t":{mask:"h:s t\\m",placeholder:"hh:mm xm",alias:"datetime",hourFormat:"12"},"h:s t":{mask:"h:s t\\m",placeholder:"hh:mm xm",alias:"datetime",hourFormat:"12"},"hh:mm:ss":{mask:"h:s:s",
autoUnmask:!1},"hh:mm":{mask:"h:s",autoUnmask:!1},date:{alias:"dd/mm/yyyy"},"mm/yyyy":{mask:"1/y",placeholder:"mm/yyyy",leapday:"donotuse",separator:"/",alias:"mm/dd/yyyy"}})})(jQuery);
(function(d){d.extend(d.inputmask.defaults.aliases,{numeric:{mask:function(a){0!==a.repeat&&isNaN(a.integerDigits)&&(a.integerDigits=a.repeat);a.repeat=0;var c=a.prefix,c=c+"[+]"+("~{1,"+a.integerDigits+"}");void 0!=a.digits&&(isNaN(a.digits)||0<parseInt(a.digits))&&(c=a.digitsOptional?c+("["+a.radixPoint+"~{"+a.digits+"}]"):c+(a.radixPoint+"~{"+a.digits+"}"));return c+=a.suffix},placeholder:"",greedy:!1,digits:"*",digitsOptional:!0,groupSeparator:"",radixPoint:".",groupSize:3,autoGroup:!1,allowPlus:!0,
allowMinus:!0,integerDigits:"+",defaultValue:"",prefix:"",suffix:"",skipRadixDance:!1,getLastValidPosition:function(a,c,h){var e=-1,b=a.validPositions,g;for(g in b)b=parseInt(g),b>e&&(e=b);void 0!=c&&(a=a.buffer,!1===h.skipRadixDance&&""!=h.radixPoint&&-1!=d.inArray(h.radixPoint,a)&&(e=d.inArray(h.radixPoint,a)));return e},rightAlign:!0,postFormat:function(a,c,h,e){var b=!1;if(""==e.groupSeparator)return{pos:c};var g=a.slice();h||g.splice(c,0,"?");g=g.join("");if(e.autoGroup||h&&-1!=g.indexOf(e.groupSeparator)){var q=
d.inputmask.escapeRegex.call(this,e.groupSeparator),g=g.replace(RegExp(q,"g"),""),q=g.split(e.radixPoint),g=q[0];if(g!=e.prefix+"?0")for(var b=!0,w=RegExp("([-+]?[\\d?]+)([\\d?]{"+e.groupSize+"})");w.test(g);)g=g.replace(w,"$1"+e.groupSeparator+"$2"),g=g.replace(e.groupSeparator+e.groupSeparator,e.groupSeparator);1<q.length&&(g+=e.radixPoint+q[1])}a.length=g.length;e=0;for(q=g.length;e<q;e++)a[e]=g.charAt(e);g=d.inArray("?",a);h||a.splice(g,1);return{pos:h?c:g,refreshFromBuffer:b}},onKeyDown:function(a,
c,h){d(this);if(h.autoGroup&&a.keyCode==h.keyCode.DELETE||a.keyCode==h.keyCode.BACKSPACE)return h.postFormat(c,0,!0,h)},regex:{integerPart:function(a){return/[-+]?\d+/}},definitions:{"~":{validator:function(a,c,h,e,b){if(!e&&"-"===a){var g=c.join("").match(b.regex.integerPart(b));if(0<g.length)return"+"==c[g.index]?(c.splice(g.index,1),{pos:g.index,c:"-",refreshFromBuffer:!0,caret:h}):"-"==c[g.index]?(c.splice(g.index,1),{refreshFromBuffer:!0,caret:h-1}):{pos:g.index,c:"-",caret:h+1}}g=e?RegExp("[0-9"+
d.inputmask.escapeRegex.call(this,b.groupSeparator)+"]").test(a):/[0-9]/.test(a);return!1==g||e||a==b.radixPoint||!0!==b.autoGroup?g:b.postFormat(c,h,"-"==a||"+"==a?!0:!1,b)},cardinality:1,prevalidator:null},"+":{validator:function(a,c,d,e,b){c="[";!0===b.allowMinus&&(c+="-");!0===b.allowPlus&&(c+="+");return RegExp(c+"]").test(a)},cardinality:1,prevalidator:null}},insertMode:!0,autoUnmask:!1},decimal:{alias:"numeric"},integer:{alias:"numeric",digits:"0"}})})(jQuery);
(function(d){d.extend(d.inputmask.defaults.aliases,{Regex:{mask:"r",greedy:!1,repeat:"*",regex:null,regexTokens:null,tokenizer:/\[\^?]?(?:[^\\\]]+|\\[\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,quantifierFilter:/[0-9]+[^,]/,isComplete:function(a,c){return RegExp(c.regex).test(a.join(""))},definitions:{r:{validator:function(a,c,h,e,b){function g(a,b){this.matches=
[];this.isGroup=a||!1;this.isQuantifier=b||!1;this.quantifier={min:1,max:1};this.repeaterPart=void 0}function q(){var a=new g,c,d=[];for(b.regexTokens=[];c=b.tokenizer.exec(b.regex);)switch(c=c[0],c.charAt(0)){case "(":d.push(new g(!0));break;case ")":var f=d.pop();0<d.length?d[d.length-1].matches.push(f):a.matches.push(f);break;case "{":case "+":case "*":var e=new g(!1,!0);c=c.replace(/[{}]/g,"");f=c.split(",");c=isNaN(f[0])?f[0]:parseInt(f[0]);f=1==f.length?c:isNaN(f[1])?f[1]:parseInt(f[1]);e.quantifier=
{min:c,max:f};if(0<d.length){var h=d[d.length-1].matches;c=h.pop();c.isGroup||(f=new g(!0),f.matches.push(c),c=f);h.push(c);h.push(e)}else c=a.matches.pop(),c.isGroup||(f=new g(!0),f.matches.push(c),c=f),a.matches.push(c),a.matches.push(e);break;default:0<d.length?d[d.length-1].matches.push(c):a.matches.push(c)}0<a.matches.length&&b.regexTokens.push(a)}function w(a,b){var c=!1;b&&(r+="(",I++);for(var f=0;f<a.matches.length;f++){var e=a.matches[f];if(!0==e.isGroup)c=w(e,!0);else if(!0==e.isQuantifier){var g=
d.inArray(e,a.matches),g=a.matches[g-1],h=r;if(isNaN(e.quantifier.max)){for(;e.repeaterPart&&e.repeaterPart!=r&&e.repeaterPart.length>r.length&&!(c=w(g,!0)););(c=c||w(g,!0))&&(e.repeaterPart=r);r=h+e.quantifier.max}else{for(var k=0,m=e.quantifier.max-1;k<m&&!(c=w(g,!0));k++);r=h+"{"+e.quantifier.min+","+e.quantifier.max+"}"}}else if(void 0!=e.matches)for(g=0;g<e.length&&!(c=w(e[g],b));g++);else{if("["==e[0]){c=r;c+=e;for(k=0;k<I;k++)c+=")";c=RegExp("^("+c+")$");c=c.test(J)}else for(g=0,h=e.length;g<
h;g++)if("\\"!=e[g]){c=r;c+=e.substr(0,g+1);c=c.replace(/\|$/,"");for(k=0;k<I;k++)c+=")";c=RegExp("^("+c+")$");if(c=c.test(J))break}r+=e}if(c)break}b&&(r+=")",I--);return c}null==b.regexTokens&&q();e=c.slice();var r="";c=!1;var I=0;e.splice(h,0,a);var J=e.join("");for(a=0;a<b.regexTokens.length&&!(g=b.regexTokens[a],c=w(g,g.isGroup));a++);return c},cardinality:1}}}})})(jQuery);
(function(d){d.extend(d.inputmask.defaults.aliases,{numeric:{mask:function(a){0!==a.repeat&&isNaN(a.integerDigits)&&(a.integerDigits=a.repeat);a.repeat=0;a.autoGroup=a.autoGroup&&""!=a.groupSeparator;if(a.autoGroup&&isFinite(a.integerDigits)){var c=Math.floor(a.integerDigits/a.groupSize);a.integerDigits+=0==a.integerDigits%a.groupSize?c-1:c}c=a.prefix;c=c+"[+]"+("~{1,"+a.integerDigits+"}");void 0!=a.digits&&(isNaN(a.digits)||0<parseInt(a.digits))&&(c=a.digitsOptional?c+("["+a.radixPoint+"~{"+a.digits+
"}]"):c+(a.radixPoint+"~{"+a.digits+"}"));return c+=a.suffix},placeholder:"",greedy:!1,digits:"*",digitsOptional:!0,groupSeparator:"",radixPoint:".",groupSize:3,autoGroup:!1,allowPlus:!0,allowMinus:!0,integerDigits:"+",prefix:"",suffix:"",skipRadixDance:!1,getLastValidPosition:function(a,c,g){var h=-1,b=a.validPositions,e;for(e in b)b=parseInt(e),b>h&&(h=b);void 0!=c&&(a=a.buffer,!1===g.skipRadixDance&&""!=g.radixPoint&&-1!=d.inArray(g.radixPoint,a)&&(h=d.inArray(g.radixPoint,a)));return h},rightAlign:!0,
postFormat:function(a,c,g,h){var b=!1;if(""==h.groupSeparator||-1!=d.inArray(h.radixPoint,a)&&c>=d.inArray(h.radixPoint,a))return{pos:c};var e=a.slice();g||e.splice(c,0,"?");e=e.join("");if(h.autoGroup||g&&-1!=e.indexOf(h.groupSeparator)){var l=d.inputmask.escapeRegex.call(this,h.groupSeparator),e=e.replace(RegExp(l,"g"),""),l=e.split(h.radixPoint),e=l[0];if(e!=h.prefix+"?0")for(var b=!0,w=RegExp("([-+]?[\\d?]+)([\\d?]{"+h.groupSize+"})");w.test(e);)e=e.replace(w,"$1"+h.groupSeparator+"$2"),e=e.replace(h.groupSeparator+
h.groupSeparator,h.groupSeparator);1<l.length&&(e+=h.radixPoint+l[1])}a.length=e.length;h=0;for(l=e.length;h<l;h++)a[h]=e.charAt(h);e=d.inArray("?",a);g||a.splice(e,1);return{pos:g?c:e,refreshFromBuffer:b}},onKeyDown:function(a,c,g){d(this);if(g.autoGroup&&a.keyCode==g.keyCode.DELETE||a.keyCode==g.keyCode.BACKSPACE)return g.postFormat(c,0,!0,g)},regex:{integerPart:function(a){return/[-+]?\d+/}},negationhandler:function(a,c,d,h,b){return!h&&b.allowMinus&&"-"===a&&(a=c.join("").match(b.regex.integerPart(b)),
0<a.length)?"+"==c[a.index]?(c.splice(a.index,1),{pos:a.index,c:"-",refreshFromBuffer:!0,caret:d}):"-"==c[a.index]?(c.splice(a.index,1),{refreshFromBuffer:!0,caret:d-1}):{pos:a.index,c:"-",caret:d+1}:!1},definitions:{"~":{validator:function(a,c,g,h,b){var e=b.negationhandler(a,c,g,h,b);if(!e){e=h?RegExp("[0-9"+d.inputmask.escapeRegex.call(this,b.groupSeparator)+"]").test(a):/[0-9]/.test(a);if(!1!=e){var l=c.join("").match(b.regex.integerPart(b)),w=d.inArray(b.radixPoint,c);if(l&&"0"==l["0"][0]&&g>=
b.prefix.length&&(-1==w||g<w))c.splice(l.index,1);else if("0"==a&&l&&0<l["0"].length&&g==b.prefix.length)return!1}!1==e||h||a==b.radixPoint||!0!==b.autoGroup||(e=b.postFormat(c,g,"-"==a||"+"==a?!0:!1,b))}return e},cardinality:1,prevalidator:null},"+":{validator:function(a,c,d,h,b){c="[";!0===b.allowMinus&&(c+="-");!0===b.allowPlus&&(c+="+");return RegExp(c+"]").test(a)},cardinality:1,prevalidator:null}},insertMode:!0,autoUnmask:!1,onUnMask:function(a,c,d){a=a.replace(d.prefix,"");a=a.replace(d.suffix,
"");a=a.replace(RegExp(d.groupSeparator,"g"),"");a=a.replace(d.radixPoint,".");return Number(a)},isComplete:function(a,c){var d=a.join("").replace(c.prefix,""),d=d.replace(c.suffix,""),d=d.replace(RegExp(c.groupSeparator,"g"),""),d=d.replace(c.radixPoint,".");return isFinite(d)},onBeforeMask:function(a,c){return isFinite(a)?a.toString().replace(".",c.radixPoint):a}},decimal:{alias:"numeric"},integer:{alias:"numeric",digits:"0"}})})(jQuery);
(function(d){d.extend(d.inputmask.defaults.aliases,{Regex:{mask:"r",greedy:!1,repeat:"*",regex:null,regexTokens:null,tokenizer:/\[\^?]?(?:[^\\\]]+|\\[\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,quantifierFilter:/[0-9]+[^,]/,isComplete:function(a,c){return RegExp(c.regex).test(a.join(""))},definitions:{r:{validator:function(a,c,g,h,b){function e(a,b){this.matches=
[];this.isGroup=a||!1;this.isQuantifier=b||!1;this.quantifier={min:1,max:1};this.repeaterPart=void 0}function l(){var a=new e,c,d=[];for(b.regexTokens=[];c=b.tokenizer.exec(b.regex);)switch(c=c[0],c.charAt(0)){case "(":d.push(new e(!0));break;case ")":var f=d.pop();0<d.length?d[d.length-1].matches.push(f):a.matches.push(f);break;case "{":case "+":case "*":var g=new e(!1,!0);c=c.replace(/[{}]/g,"");f=c.split(",");c=isNaN(f[0])?f[0]:parseInt(f[0]);f=1==f.length?c:isNaN(f[1])?f[1]:parseInt(f[1]);g.quantifier=
{min:c,max:f};if(0<d.length){var h=d[d.length-1].matches;c=h.pop();c.isGroup||(f=new e(!0),f.matches.push(c),c=f);h.push(c);h.push(g)}else c=a.matches.pop(),c.isGroup||(f=new e(!0),f.matches.push(c),c=f),a.matches.push(c),a.matches.push(g);break;default:0<d.length?d[d.length-1].matches.push(c):a.matches.push(c)}0<a.matches.length&&b.regexTokens.push(a)}function w(a,b){var c=!1;b&&(v+="(",G++);for(var f=0;f<a.matches.length;f++){var e=a.matches[f];if(!0==e.isGroup)c=w(e,!0);else if(!0==e.isQuantifier){var g=
d.inArray(e,a.matches),g=a.matches[g-1],h=v;if(isNaN(e.quantifier.max)){for(;e.repeaterPart&&e.repeaterPart!=v&&e.repeaterPart.length>v.length&&!(c=w(g,!0)););(c=c||w(g,!0))&&(e.repeaterPart=v);v=h+e.quantifier.max}else{for(var l=0,q=e.quantifier.max-1;l<q&&!(c=w(g,!0));l++);v=h+"{"+e.quantifier.min+","+e.quantifier.max+"}"}}else if(void 0!=e.matches)for(g=0;g<e.length&&!(c=w(e[g],b));g++);else{if("["==e[0]){c=v;c+=e;for(l=0;l<G;l++)c+=")";c=RegExp("^("+c+")$");c=c.test(H)}else for(g=0,h=e.length;g<
h;g++)if("\\"!=e[g]){c=v;c+=e.substr(0,g+1);c=c.replace(/\|$/,"");for(l=0;l<G;l++)c+=")";c=RegExp("^("+c+")$");if(c=c.test(H))break}v+=e}if(c)break}b&&(v+=")",G--);return c}null==b.regexTokens&&l();h=c.slice();var v="";c=!1;var G=0;h.splice(g,0,a);var H=h.join("");for(a=0;a<b.regexTokens.length&&!(e=b.regexTokens[a],c=w(e,e.isGroup));a++);return c},cardinality:1}}}})})(jQuery);
(function(d){d.extend(d.inputmask.defaults.aliases,{phone:{url:"phone-codes/phone-codes.json",mask:function(a){a.definitions={p:{validator:function(){return!1},cardinality:1},"#":{validator:"[0-9]",cardinality:1}};var c=[];d.ajax({url:a.url,async:!1,dataType:"json",success:function(a){c=a}});c.splice(0,0,"+p(ppp)ppp-pppp");return c},nojumps:!0,nojumpsThreshold:1},phonebe:{url:"phone-codes/phone-be.json",mask:function(a){a.definitions={p:{validator:function(){return!1},cardinality:1},"#":{validator:"[0-9]",
cardinality:1}};var c=[];d.ajax({url:a.url,async:!1,dataType:"json",success:function(a){c=a}});c.splice(0,0,"+32(ppp)ppp-pppp");return c},nojumps:!0,nojumpsThreshold:4}})})(jQuery);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment