|
|
@@ -3,7 +3,7 @@
|
|
|
* http://github.com/RobinHerbots/jquery.inputmask
|
|
|
* Copyright (c) 2010 - 2015 Robin Herbots
|
|
|
* Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
|
|
|
-* Version: 3.1.64-76
|
|
|
+* Version: 3.1.64-77
|
|
|
*/
|
|
|
!function(factory) {
|
|
|
"function" == typeof define && define.amd ? define([ "jquery" ], factory) : "object" == typeof exports ? module.exports = factory(require("jquery")) : factory(jQuery);
|
|
|
@@ -99,13 +99,13 @@
|
|
|
mask: element
|
|
|
}), escaped = !1;
|
|
|
}
|
|
|
- function maskStaticGroupMarker(lastMatch) {
|
|
|
+ function verifyGroupMarker(lastMatch) {
|
|
|
lastMatch.isGroup && (lastMatch.isGroup = !1, insertTestDefinition(lastMatch, opts.groupmarker.start, 0),
|
|
|
insertTestDefinition(lastMatch, opts.groupmarker.end));
|
|
|
}
|
|
|
- function maskCurrentToken(m, currentToken, lastMatch) {
|
|
|
- currentToken.matches.length > 0 && (lastMatch = currentToken.matches[currentToken.matches.length - 1],
|
|
|
- maskStaticGroupMarker(lastMatch)), insertTestDefinition(currentToken, m);
|
|
|
+ function maskCurrentToken(m, currentToken, lastMatch, extraCondition) {
|
|
|
+ currentToken.matches.length > 0 && (void 0 == extraCondition || extraCondition) && (lastMatch = currentToken.matches[currentToken.matches.length - 1],
|
|
|
+ verifyGroupMarker(lastMatch)), insertTestDefinition(currentToken, m);
|
|
|
}
|
|
|
for (var match, m, openingToken, currentOpeningToken, alternator, lastMatch, tokenizer = /(?:[?*+]|\{[0-9\+\*]+(?:,[0-9\+\*]*)?\})\??|[^.?*+^${[]()|\\]+|./g, escaped = !1, currentToken = new maskToken(), openenings = [], maskTokens = []; match = tokenizer.exec(mask); ) if (m = match[0],
|
|
|
escaped) maskCurrentToken(m, currentToken, lastMatch); else switch (m.charAt(0)) {
|
|
|
@@ -166,8 +166,7 @@
|
|
|
|
|
|
default:
|
|
|
if (openenings.length > 0) {
|
|
|
- if (currentOpeningToken = openenings[openenings.length - 1], currentOpeningToken.matches.length > 0 && !currentOpeningToken.isAlternator && (lastMatch = currentOpeningToken.matches[currentOpeningToken.matches.length - 1],
|
|
|
- maskStaticGroupMarker(lastMatch)), insertTestDefinition(currentOpeningToken, m),
|
|
|
+ if (currentOpeningToken = openenings[openenings.length - 1], maskCurrentToken(m, currentOpeningToken, lastMatch, !currentOpeningToken.isAlternator),
|
|
|
currentOpeningToken.isAlternator) {
|
|
|
alternator = openenings.pop();
|
|
|
for (var mndx = 0; mndx < alternator.matches.length; mndx++) alternator.matches[mndx].isGroup = !1;
|
|
|
@@ -177,7 +176,7 @@
|
|
|
} else maskCurrentToken(m, currentToken, lastMatch);
|
|
|
}
|
|
|
return currentToken.matches.length > 0 && (lastMatch = currentToken.matches[currentToken.matches.length - 1],
|
|
|
- maskStaticGroupMarker(lastMatch), maskTokens.push(currentToken)), maskTokens;
|
|
|
+ verifyGroupMarker(lastMatch), maskTokens.push(currentToken)), maskTokens;
|
|
|
}
|
|
|
function generateMask(mask, metadata) {
|
|
|
if (void 0 == mask || "" == mask) return void 0;
|
|
|
@@ -735,8 +734,10 @@
|
|
|
function isComplete(buffer) {
|
|
|
if ($.isFunction(opts.isComplete)) return opts.isComplete.call($el, buffer, opts);
|
|
|
if ("*" == opts.repeat) return void 0;
|
|
|
- var complete = !1, lrp = determineLastRequiredPosition(!0), aml = seekPrevious(lrp.l);
|
|
|
- getLastValidPosition();
|
|
|
+ {
|
|
|
+ var complete = !1, lrp = determineLastRequiredPosition(!0), aml = seekPrevious(lrp.l);
|
|
|
+ getLastValidPosition();
|
|
|
+ }
|
|
|
if (void 0 == lrp.def || lrp.def.newBlockMarker || lrp.def.optionality || lrp.def.optionalQuantifier) {
|
|
|
complete = !0;
|
|
|
for (var i = 0; aml >= i; i++) {
|