first mockup in go

This commit is contained in:
2019-08-18 23:21:16 +02:00
parent 9ce235274f
commit 969ae63d02
5638 changed files with 579400 additions and 0 deletions

View File

@@ -0,0 +1,58 @@
{
"name": "inputmask",
"version": "3.3.11",
"main": [
"./dist/inputmask/inputmask.js",
"./dist/inputmask/inputmask.extensions.js",
"./dist/inputmask/inputmask.date.extensions.js",
"./dist/inputmask/inputmask.numeric.extensions.js",
"./dist/inputmask/inputmask.phone.extensions.js",
"./dist/inputmask/jquery.inputmask.js",
"./dist/inputmask/global/document.js",
"./dist/inputmask/global/window.js",
"./dist/inputmask/phone-codes/phone.js",
"./dist/inputmask/phone-codes/phone-be.js",
"./dist/inputmask/phone-codes/phone-nl.js",
"./dist/inputmask/phone-codes/phone-ru.js",
"./dist/inputmask/phone-codes/phone-uk.js",
"./dist/inputmask/dependencyLibs/inputmask.dependencyLib.jqlite.js",
"./dist/inputmask/dependencyLibs/inputmask.dependencyLib.jquery.js",
"./dist/inputmask/dependencyLibs/inputmask.dependencyLib.js",
"./dist/inputmask/bindings/inputmask.binding.js"
],
"keywords": [
"jquery",
"plugins",
"input",
"form",
"inputmask",
"mask"
],
"description": "Inputmask is a javascript library which creates an input mask. Inputmask can run against vanilla javascript, jQuery and jqlite.",
"license": "http://opensource.org/licenses/mit-license.php",
"ignore": [
"**/*",
"!dist/*",
"!dist/inputmask/*",
"!dist/min/*",
"!dist/min/inputmask/*"
],
"dependencies": {
"jquery": ">=1.7"
},
"authors": [
{
"name": "Robin Herbots"
}
],
"homepage": "http://robinherbots.github.io/Inputmask",
"_release": "3.3.11",
"_resolution": {
"type": "version",
"tag": "3.3.11",
"commit": "506b28902803e0aa983089658d4a74e8727d816b"
},
"_source": "https://github.com/RobinHerbots/jquery.inputmask.git",
"_target": "^3.3.7",
"_originalSource": "jquery.inputmask"
}

View File

@@ -0,0 +1,40 @@
{
"name": "inputmask",
"version": "3.3.11",
"main": [
"./dist/inputmask/inputmask.js",
"./dist/inputmask/inputmask.extensions.js",
"./dist/inputmask/inputmask.date.extensions.js",
"./dist/inputmask/inputmask.numeric.extensions.js",
"./dist/inputmask/inputmask.phone.extensions.js",
"./dist/inputmask/jquery.inputmask.js",
"./dist/inputmask/global/document.js",
"./dist/inputmask/global/window.js",
"./dist/inputmask/phone-codes/phone.js",
"./dist/inputmask/phone-codes/phone-be.js",
"./dist/inputmask/phone-codes/phone-nl.js",
"./dist/inputmask/phone-codes/phone-ru.js",
"./dist/inputmask/phone-codes/phone-uk.js",
"./dist/inputmask/dependencyLibs/inputmask.dependencyLib.jqlite.js",
"./dist/inputmask/dependencyLibs/inputmask.dependencyLib.jquery.js",
"./dist/inputmask/dependencyLibs/inputmask.dependencyLib.js",
"./dist/inputmask/bindings/inputmask.binding.js"
],
"keywords": ["jquery", "plugins", "input", "form", "inputmask", "mask"],
"description": "Inputmask is a javascript library which creates an input mask. Inputmask can run against vanilla javascript, jQuery and jqlite.",
"license": "http://opensource.org/licenses/mit-license.php",
"ignore": [
"**/*",
"!dist/*",
"!dist/inputmask/*",
"!dist/min/*",
"!dist/min/inputmask/*"
],
"dependencies": {
"jquery": ">=1.7"
},
"authors": [{
"name": "Robin Herbots"
}],
"homepage": "http://robinherbots.github.io/Inputmask"
}

View File

@@ -0,0 +1,21 @@
/*!
* bindings/inputmask.binding.js
* https://github.com/RobinHerbots/Inputmask
* Copyright (c) 2010 - 2017 Robin Herbots
* Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
* Version: 3.3.11
*/
!function(factory) {
"function" == typeof define && define.amd ? define([ "jquery", "../inputmask", "../global/document" ], factory) : "object" == typeof exports ? module.exports = factory(require("jquery"), require("../inputmask"), require("../global/document")) : factory(jQuery, window.Inputmask, document);
}(function($, Inputmask, document) {
$(document).ajaxComplete(function(event, xmlHttpRequest, ajaxOptions) {
-1 !== $.inArray("html", ajaxOptions.dataTypes) && $(".inputmask, [data-inputmask], [data-inputmask-mask], [data-inputmask-alias]").each(function(ndx, lmnt) {
void 0 === lmnt.inputmask && Inputmask().mask(lmnt);
});
}).ready(function() {
$(".inputmask, [data-inputmask], [data-inputmask-mask], [data-inputmask-alias]").each(function(ndx, lmnt) {
void 0 === lmnt.inputmask && Inputmask().mask(lmnt);
});
});
});

View File

@@ -0,0 +1,62 @@
/*!
* dependencyLibs/inputmask.dependencyLib.jqlite.js
* https://github.com/RobinHerbots/Inputmask
* Copyright (c) 2010 - 2017 Robin Herbots
* Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
* Version: 3.3.11
*/
!function(factory) {
"function" == typeof define && define.amd ? define([ "jqlite", "../global/window", "../global/document]" ], factory) : "object" == typeof exports ? module.exports = factory(require("jqlite"), require("../global/window"), require("../global/document")) : window.dependencyLib = factory(jqlite, window, document);
}(function($, window, document) {
function indexOf(list, elem) {
for (var i = 0, len = list.length; i < len; i++) if (list[i] === elem) return i;
return -1;
}
function type(obj) {
return null == obj ? obj + "" : "object" == typeof obj || "function" == typeof obj ? class2type[class2type.toString.call(obj)] || "object" : typeof obj;
}
function isWindow(obj) {
return null != obj && obj === obj.window;
}
function isArraylike(obj) {
var length = "length" in obj && obj.length, ltype = type(obj);
return "function" !== ltype && !isWindow(obj) && (!(1 !== obj.nodeType || !length) || ("array" === ltype || 0 === length || "number" == typeof length && length > 0 && length - 1 in obj));
}
for (var class2type = {}, classTypes = "Boolean Number String Function Array Date RegExp Object Error".split(" "), nameNdx = 0; nameNdx < classTypes.length; nameNdx++) class2type["[object " + classTypes[nameNdx] + "]"] = classTypes[nameNdx].toLowerCase();
return $.inArray = function(elem, arr, i) {
return null == arr ? -1 : indexOf(arr, elem);
}, $.isFunction = function(obj) {
return "function" === type(obj);
}, $.isArray = Array.isArray, $.isPlainObject = function(obj) {
return "object" === type(obj) && !obj.nodeType && !isWindow(obj) && !(obj.constructor && !class2type.hasOwnProperty.call(obj.constructor.prototype, "isPrototypeOf"));
}, $.extend = function() {
var options, name, src, copy, copyIsArray, clone, target = arguments[0] || {}, i = 1, length = arguments.length, deep = !1;
for ("boolean" == typeof target && (deep = target, target = arguments[i] || {},
i++), "object" == typeof target || $.isFunction(target) || (target = {}), i === length && (target = this,
i--); i < length; i++) if (null != (options = arguments[i])) for (name in options) src = target[name],
target !== (copy = options[name]) && (deep && copy && ($.isPlainObject(copy) || (copyIsArray = $.isArray(copy))) ? (copyIsArray ? (copyIsArray = !1,
clone = src && $.isArray(src) ? src : []) : clone = src && $.isPlainObject(src) ? src : {},
target[name] = $.extend(deep, clone, copy)) : void 0 !== copy && (target[name] = copy));
return target;
}, $.each = function(obj, callback) {
var i = 0;
if (isArraylike(obj)) for (var length = obj.length; i < length && !1 !== callback.call(obj[i], i, obj[i]); i++) ; else for (i in obj) if (!1 === callback.call(obj[i], i, obj[i])) break;
return obj;
}, $.map = function(elems, callback) {
var value, i = 0, length = elems.length, ret = [];
if (isArraylike(elems)) for (;i < length; i++) null != (value = callback(elems[i], i)) && ret.push(value); else for (i in elems) null != (value = callback(elems[i], i)) && ret.push(value);
return [].concat(ret);
}, $.data = function(elem, name, data) {
return $(elem).data(name, data);
}, $.Event = $.Event || function(event, params) {
params = params || {
bubbles: !1,
cancelable: !1,
detail: void 0
};
var evt = document.createEvent("CustomEvent");
return evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail),
evt;
}, $.Event.prototype = window.Event.prototype, $;
});

View File

@@ -0,0 +1,13 @@
/*!
* dependencyLibs/inputmask.dependencyLib.jquery.js
* https://github.com/RobinHerbots/Inputmask
* Copyright (c) 2010 - 2017 Robin Herbots
* Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
* Version: 3.3.11
*/
!function(factory) {
"function" == typeof define && define.amd ? define([ "jquery" ], factory) : "object" == typeof exports ? module.exports = factory(require("jquery")) : window.dependencyLib = factory(jQuery);
}(function($) {
return $;
});

View File

@@ -0,0 +1,133 @@
/*!
* dependencyLibs/inputmask.dependencyLib.js
* https://github.com/RobinHerbots/Inputmask
* Copyright (c) 2010 - 2017 Robin Herbots
* Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
* Version: 3.3.11
*/
!function(factory) {
"function" == typeof define && define.amd ? define([ "../global/window", "../global/document" ], factory) : "object" == typeof exports ? module.exports = factory(require("../global/window"), require("../global/document")) : window.dependencyLib = factory(window, document);
}(function(window, document) {
function indexOf(list, elem) {
for (var i = 0, len = list.length; i < len; i++) if (list[i] === elem) return i;
return -1;
}
function type(obj) {
return null == obj ? obj + "" : "object" == typeof obj || "function" == typeof obj ? class2type[class2type.toString.call(obj)] || "object" : typeof obj;
}
function isWindow(obj) {
return null != obj && obj === obj.window;
}
function isArraylike(obj) {
var length = "length" in obj && obj.length, ltype = type(obj);
return "function" !== ltype && !isWindow(obj) && (!(1 !== obj.nodeType || !length) || ("array" === ltype || 0 === length || "number" == typeof length && length > 0 && length - 1 in obj));
}
function isValidElement(elem) {
return elem instanceof Element;
}
function DependencyLib(elem) {
return elem instanceof DependencyLib ? elem : this instanceof DependencyLib ? void (void 0 !== elem && null !== elem && elem !== window && (this[0] = elem.nodeName ? elem : void 0 !== elem[0] && elem[0].nodeName ? elem[0] : document.querySelector(elem),
void 0 !== this[0] && null !== this[0] && (this[0].eventRegistry = this[0].eventRegistry || {}))) : new DependencyLib(elem);
}
for (var class2type = {}, classTypes = "Boolean Number String Function Array Date RegExp Object Error".split(" "), nameNdx = 0; nameNdx < classTypes.length; nameNdx++) class2type["[object " + classTypes[nameNdx] + "]"] = classTypes[nameNdx].toLowerCase();
return DependencyLib.prototype = {
on: function(events, handler) {
if (isValidElement(this[0])) for (var eventRegistry = this[0].eventRegistry, elem = this[0], _events = events.split(" "), endx = 0; endx < _events.length; endx++) {
var nsEvent = _events[endx].split(".");
!function(ev, namespace) {
elem.addEventListener ? elem.addEventListener(ev, handler, !1) : elem.attachEvent && elem.attachEvent("on" + ev, handler),
eventRegistry[ev] = eventRegistry[ev] || {}, eventRegistry[ev][namespace] = eventRegistry[ev][namespace] || [],
eventRegistry[ev][namespace].push(handler);
}(nsEvent[0], nsEvent[1] || "global");
}
return this;
},
off: function(events, handler) {
if (isValidElement(this[0])) for (var eventRegistry = this[0].eventRegistry, elem = this[0], _events = events.split(" "), endx = 0; endx < _events.length; endx++) for (var nsEvent = _events[endx].split("."), offEvents = function(ev, namespace) {
var hndx, hndL, evts = [];
if (ev.length > 0) if (void 0 === handler) for (hndx = 0, hndL = eventRegistry[ev][namespace].length; hndx < hndL; hndx++) evts.push({
ev: ev,
namespace: namespace && namespace.length > 0 ? namespace : "global",
handler: eventRegistry[ev][namespace][hndx]
}); else evts.push({
ev: ev,
namespace: namespace && namespace.length > 0 ? namespace : "global",
handler: handler
}); else if (namespace.length > 0) for (var evNdx in eventRegistry) for (var nmsp in eventRegistry[evNdx]) if (nmsp === namespace) if (void 0 === handler) for (hndx = 0,
hndL = eventRegistry[evNdx][nmsp].length; hndx < hndL; hndx++) evts.push({
ev: evNdx,
namespace: nmsp,
handler: eventRegistry[evNdx][nmsp][hndx]
}); else evts.push({
ev: evNdx,
namespace: nmsp,
handler: handler
});
return evts;
}(nsEvent[0], nsEvent[1]), i = 0, offEventsL = offEvents.length; i < offEventsL; i++) !function(ev, namespace, handler) {
if (ev in eventRegistry == 1) if (elem.removeEventListener ? elem.removeEventListener(ev, handler, !1) : elem.detachEvent && elem.detachEvent("on" + ev, handler),
"global" === namespace) for (var nmsp in eventRegistry[ev]) eventRegistry[ev][nmsp].splice(eventRegistry[ev][nmsp].indexOf(handler), 1); else eventRegistry[ev][namespace].splice(eventRegistry[ev][namespace].indexOf(handler), 1);
}(offEvents[i].ev, offEvents[i].namespace, offEvents[i].handler);
return this;
},
trigger: function(events) {
if (isValidElement(this[0])) for (var eventRegistry = this[0].eventRegistry, elem = this[0], _events = "string" == typeof events ? events.split(" ") : [ events.type ], endx = 0; endx < _events.length; endx++) {
var nsEvent = _events[endx].split("."), ev = nsEvent[0], namespace = nsEvent[1] || "global";
if (void 0 !== document && "global" === namespace) {
var evnt, i, params = {
bubbles: !0,
cancelable: !0,
detail: Array.prototype.slice.call(arguments, 1)
};
if (document.createEvent) {
try {
evnt = new CustomEvent(ev, params);
} catch (e) {
(evnt = document.createEvent("CustomEvent")).initCustomEvent(ev, params.bubbles, params.cancelable, params.detail);
}
events.type && DependencyLib.extend(evnt, events), elem.dispatchEvent(evnt);
} else (evnt = document.createEventObject()).eventType = ev, events.type && DependencyLib.extend(evnt, events),
elem.fireEvent("on" + evnt.eventType, evnt);
} else if (void 0 !== eventRegistry[ev]) if (arguments[0] = arguments[0].type ? arguments[0] : DependencyLib.Event(arguments[0]),
"global" === namespace) for (var nmsp in eventRegistry[ev]) for (i = 0; i < eventRegistry[ev][nmsp].length; i++) eventRegistry[ev][nmsp][i].apply(elem, arguments); else for (i = 0; i < eventRegistry[ev][namespace].length; i++) eventRegistry[ev][namespace][i].apply(elem, arguments);
}
return this;
}
}, DependencyLib.isFunction = function(obj) {
return "function" === type(obj);
}, DependencyLib.noop = function() {}, DependencyLib.isArray = Array.isArray, DependencyLib.inArray = function(elem, arr, i) {
return null == arr ? -1 : indexOf(arr, elem);
}, DependencyLib.valHooks = void 0, DependencyLib.isPlainObject = function(obj) {
return "object" === type(obj) && !obj.nodeType && !isWindow(obj) && !(obj.constructor && !class2type.hasOwnProperty.call(obj.constructor.prototype, "isPrototypeOf"));
}, DependencyLib.extend = function() {
var options, name, src, copy, copyIsArray, clone, target = arguments[0] || {}, i = 1, length = arguments.length, deep = !1;
for ("boolean" == typeof target && (deep = target, target = arguments[i] || {},
i++), "object" == typeof target || DependencyLib.isFunction(target) || (target = {}),
i === length && (target = this, i--); i < length; i++) if (null != (options = arguments[i])) for (name in options) src = target[name],
target !== (copy = options[name]) && (deep && copy && (DependencyLib.isPlainObject(copy) || (copyIsArray = DependencyLib.isArray(copy))) ? (copyIsArray ? (copyIsArray = !1,
clone = src && DependencyLib.isArray(src) ? src : []) : clone = src && DependencyLib.isPlainObject(src) ? src : {},
target[name] = DependencyLib.extend(deep, clone, copy)) : void 0 !== copy && (target[name] = copy));
return target;
}, DependencyLib.each = function(obj, callback) {
var i = 0;
if (isArraylike(obj)) for (var length = obj.length; i < length && !1 !== callback.call(obj[i], i, obj[i]); i++) ; else for (i in obj) if (!1 === callback.call(obj[i], i, obj[i])) break;
return obj;
}, DependencyLib.map = function(elems, callback) {
var value, i = 0, length = elems.length, ret = [];
if (isArraylike(elems)) for (;i < length; i++) null != (value = callback(elems[i], i)) && ret.push(value); else for (i in elems) null != (value = callback(elems[i], i)) && ret.push(value);
return [].concat(ret);
}, DependencyLib.data = function(owner, key, value) {
if (void 0 === value) return owner.__data ? owner.__data[key] : null;
owner.__data = owner.__data || {}, owner.__data[key] = value;
}, "function" == typeof window.CustomEvent ? DependencyLib.Event = window.CustomEvent : (DependencyLib.Event = function(event, params) {
params = params || {
bubbles: !1,
cancelable: !1,
detail: void 0
};
var evt = document.createEvent("CustomEvent");
return evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail),
evt;
}, DependencyLib.Event.prototype = window.Event.prototype), DependencyLib;
});

View File

@@ -0,0 +1,11 @@
/*!
* global/document.js
* https://github.com/RobinHerbots/Inputmask
* Copyright (c) 2010 - 2017 Robin Herbots
* Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
* Version: 3.3.11
*/
"function" == typeof define && define.amd ? define(function() {
return document;
}) : "object" == typeof exports && (module.exports = document);

View File

@@ -0,0 +1,11 @@
/*!
* global/window.js
* https://github.com/RobinHerbots/Inputmask
* Copyright (c) 2010 - 2017 Robin Herbots
* Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
* Version: 3.3.11
*/
"function" == typeof define && define.amd ? define(function() {
return window;
}) : "object" == typeof exports && (module.exports = window);

View File

@@ -0,0 +1,480 @@
/*!
* inputmask.date.extensions.js
* https://github.com/RobinHerbots/Inputmask
* Copyright (c) 2010 - 2017 Robin Herbots
* Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
* Version: 3.3.11
*/
!function(factory) {
"function" == typeof define && define.amd ? define([ "./dependencyLibs/inputmask.dependencyLib", "./inputmask" ], factory) : "object" == typeof exports ? module.exports = factory(require("./dependencyLibs/inputmask.dependencyLib"), require("./inputmask")) : factory(window.dependencyLib || jQuery, window.Inputmask);
}(function($, Inputmask) {
function isLeapYear(year) {
return isNaN(year) || 29 === new Date(year, 2, 0).getDate();
}
return Inputmask.extendAliases({
"dd/mm/yyyy": {
mask: "1/2/y",
placeholder: "dd/mm/yyyy",
regex: {
val1pre: new RegExp("[0-3]"),
val1: new RegExp("0[1-9]|[12][0-9]|3[01]"),
val2pre: function(separator) {
var escapedSeparator = Inputmask.escapeRegex.call(this, separator);
return new RegExp("((0[1-9]|[12][0-9]|3[01])" + escapedSeparator + "[01])");
},
val2: function(separator) {
var escapedSeparator = Inputmask.escapeRegex.call(this, separator);
return new RegExp("((0[1-9]|[12][0-9])" + escapedSeparator + "(0[1-9]|1[012]))|(30" + escapedSeparator + "(0[13-9]|1[012]))|(31" + escapedSeparator + "(0[13578]|1[02]))");
}
},
leapday: "29/02/",
separator: "/",
yearrange: {
minyear: 1900,
maxyear: 2099
},
isInYearRange: function(chrs, minyear, maxyear) {
if (isNaN(chrs)) return !1;
var enteredyear = parseInt(chrs.concat(minyear.toString().slice(chrs.length))), enteredyear2 = parseInt(chrs.concat(maxyear.toString().slice(chrs.length)));
return !isNaN(enteredyear) && (minyear <= enteredyear && enteredyear <= maxyear) || !isNaN(enteredyear2) && (minyear <= enteredyear2 && enteredyear2 <= maxyear);
},
determinebaseyear: function(minyear, maxyear, hint) {
var currentyear = new Date().getFullYear();
if (minyear > currentyear) return minyear;
if (maxyear < currentyear) {
for (var maxYearPrefix = maxyear.toString().slice(0, 2), maxYearPostfix = maxyear.toString().slice(2, 4); maxyear < maxYearPrefix + hint; ) maxYearPrefix--;
var maxxYear = maxYearPrefix + maxYearPostfix;
return minyear > maxxYear ? minyear : maxxYear;
}
if (minyear <= currentyear && currentyear <= maxyear) {
for (var currentYearPrefix = currentyear.toString().slice(0, 2); maxyear < currentYearPrefix + hint; ) currentYearPrefix--;
var currentYearAndHint = currentYearPrefix + hint;
return currentYearAndHint < minyear ? minyear : currentYearAndHint;
}
return currentyear;
},
onKeyDown: function(e, buffer, caretPos, opts) {
var $input = $(this);
if (e.ctrlKey && e.keyCode === Inputmask.keyCode.RIGHT) {
var today = new Date();
$input.val(today.getDate().toString() + (today.getMonth() + 1).toString() + today.getFullYear().toString()),
$input.trigger("setvalue");
}
},
getFrontValue: function(mask, buffer, opts) {
for (var start = 0, length = 0, i = 0; i < mask.length && "2" !== mask.charAt(i); i++) {
var definition = opts.definitions[mask.charAt(i)];
definition ? (start += length, length = definition.cardinality) : length++;
}
return buffer.join("").substr(start, length);
},
postValidation: function(buffer, currentResult, opts) {
var dayMonthValue, year, bufferStr = buffer.join("");
return 0 === opts.mask.indexOf("y") ? (year = bufferStr.substr(0, 4), dayMonthValue = bufferStr.substring(4, 10)) : (year = bufferStr.substring(6, 10),
dayMonthValue = bufferStr.substr(0, 6)), currentResult && (dayMonthValue !== opts.leapday || isLeapYear(year));
},
definitions: {
"1": {
validator: function(chrs, maskset, pos, strict, opts) {
var isValid = opts.regex.val1.test(chrs);
return strict || isValid || chrs.charAt(1) !== opts.separator && -1 === "-./".indexOf(chrs.charAt(1)) || !(isValid = opts.regex.val1.test("0" + chrs.charAt(0))) ? isValid : (maskset.buffer[pos - 1] = "0",
{
refreshFromBuffer: {
start: pos - 1,
end: pos
},
pos: pos,
c: chrs.charAt(0)
});
},
cardinality: 2,
prevalidator: [ {
validator: function(chrs, maskset, pos, strict, opts) {
var pchrs = chrs;
isNaN(maskset.buffer[pos + 1]) || (pchrs += maskset.buffer[pos + 1]);
var isValid = 1 === pchrs.length ? opts.regex.val1pre.test(pchrs) : opts.regex.val1.test(pchrs);
if (isValid && maskset.validPositions[pos] && (opts.regex.val2(opts.separator).test(chrs + maskset.validPositions[pos].input) || (maskset.validPositions[pos].input = "0" === chrs ? "1" : "0")),
!strict && !isValid) {
if (isValid = opts.regex.val1.test(chrs + "0")) return maskset.buffer[pos] = chrs,
maskset.buffer[++pos] = "0", {
pos: pos,
c: "0"
};
if (isValid = opts.regex.val1.test("0" + chrs)) return maskset.buffer[pos] = "0",
pos++, {
pos: pos
};
}
return isValid;
},
cardinality: 1
} ]
},
"2": {
validator: function(chrs, maskset, pos, strict, opts) {
var frontValue = opts.getFrontValue(maskset.mask, maskset.buffer, opts);
-1 !== frontValue.indexOf(opts.placeholder[0]) && (frontValue = "01" + opts.separator);
var isValid = opts.regex.val2(opts.separator).test(frontValue + chrs);
return strict || isValid || chrs.charAt(1) !== opts.separator && -1 === "-./".indexOf(chrs.charAt(1)) || !(isValid = opts.regex.val2(opts.separator).test(frontValue + "0" + chrs.charAt(0))) ? isValid : (maskset.buffer[pos - 1] = "0",
{
refreshFromBuffer: {
start: pos - 1,
end: pos
},
pos: pos,
c: chrs.charAt(0)
});
},
cardinality: 2,
prevalidator: [ {
validator: function(chrs, maskset, pos, strict, opts) {
isNaN(maskset.buffer[pos + 1]) || (chrs += maskset.buffer[pos + 1]);
var frontValue = opts.getFrontValue(maskset.mask, maskset.buffer, opts);
-1 !== frontValue.indexOf(opts.placeholder[0]) && (frontValue = "01" + opts.separator);
var isValid = 1 === chrs.length ? opts.regex.val2pre(opts.separator).test(frontValue + chrs) : opts.regex.val2(opts.separator).test(frontValue + chrs);
return isValid && maskset.validPositions[pos] && (opts.regex.val2(opts.separator).test(chrs + maskset.validPositions[pos].input) || (maskset.validPositions[pos].input = "0" === chrs ? "1" : "0")),
strict || isValid || !(isValid = opts.regex.val2(opts.separator).test(frontValue + "0" + chrs)) ? isValid : (maskset.buffer[pos] = "0",
pos++, {
pos: pos
});
},
cardinality: 1
} ]
},
y: {
validator: function(chrs, maskset, pos, strict, opts) {
return opts.isInYearRange(chrs, opts.yearrange.minyear, opts.yearrange.maxyear);
},
cardinality: 4,
prevalidator: [ {
validator: function(chrs, maskset, pos, strict, opts) {
var isValid = opts.isInYearRange(chrs, opts.yearrange.minyear, opts.yearrange.maxyear);
if (!strict && !isValid) {
var yearPrefix = opts.determinebaseyear(opts.yearrange.minyear, opts.yearrange.maxyear, chrs + "0").toString().slice(0, 1);
if (isValid = opts.isInYearRange(yearPrefix + chrs, opts.yearrange.minyear, opts.yearrange.maxyear)) return maskset.buffer[pos++] = yearPrefix.charAt(0),
{
pos: pos
};
if (yearPrefix = opts.determinebaseyear(opts.yearrange.minyear, opts.yearrange.maxyear, chrs + "0").toString().slice(0, 2),
isValid = opts.isInYearRange(yearPrefix + chrs, opts.yearrange.minyear, opts.yearrange.maxyear)) return maskset.buffer[pos++] = yearPrefix.charAt(0),
maskset.buffer[pos++] = yearPrefix.charAt(1), {
pos: pos
};
}
return isValid;
},
cardinality: 1
}, {
validator: function(chrs, maskset, pos, strict, opts) {
var isValid = opts.isInYearRange(chrs, opts.yearrange.minyear, opts.yearrange.maxyear);
if (!strict && !isValid) {
var yearPrefix = opts.determinebaseyear(opts.yearrange.minyear, opts.yearrange.maxyear, chrs).toString().slice(0, 2);
if (isValid = opts.isInYearRange(chrs[0] + yearPrefix[1] + chrs[1], opts.yearrange.minyear, opts.yearrange.maxyear)) return maskset.buffer[pos++] = yearPrefix.charAt(1),
{
pos: pos
};
if (yearPrefix = opts.determinebaseyear(opts.yearrange.minyear, opts.yearrange.maxyear, chrs).toString().slice(0, 2),
isValid = opts.isInYearRange(yearPrefix + chrs, opts.yearrange.minyear, opts.yearrange.maxyear)) return maskset.buffer[pos - 1] = yearPrefix.charAt(0),
maskset.buffer[pos++] = yearPrefix.charAt(1), maskset.buffer[pos++] = chrs.charAt(0),
{
refreshFromBuffer: {
start: pos - 3,
end: pos
},
pos: pos
};
}
return isValid;
},
cardinality: 2
}, {
validator: function(chrs, maskset, pos, strict, opts) {
return opts.isInYearRange(chrs, opts.yearrange.minyear, opts.yearrange.maxyear);
},
cardinality: 3
} ]
}
},
insertMode: !1,
autoUnmask: !1
},
"mm/dd/yyyy": {
placeholder: "mm/dd/yyyy",
alias: "dd/mm/yyyy",
regex: {
val2pre: function(separator) {
var escapedSeparator = Inputmask.escapeRegex.call(this, separator);
return new RegExp("((0[13-9]|1[012])" + escapedSeparator + "[0-3])|(02" + escapedSeparator + "[0-2])");
},
val2: function(separator) {
var escapedSeparator = Inputmask.escapeRegex.call(this, separator);
return new RegExp("((0[1-9]|1[012])" + escapedSeparator + "(0[1-9]|[12][0-9]))|((0[13-9]|1[012])" + escapedSeparator + "30)|((0[13578]|1[02])" + escapedSeparator + "31)");
},
val1pre: new RegExp("[01]"),
val1: new RegExp("0[1-9]|1[012]")
},
leapday: "02/29/",
onKeyDown: function(e, buffer, caretPos, opts) {
var $input = $(this);
if (e.ctrlKey && e.keyCode === Inputmask.keyCode.RIGHT) {
var today = new Date();
$input.val((today.getMonth() + 1).toString() + today.getDate().toString() + today.getFullYear().toString()),
$input.trigger("setvalue");
}
}
},
"yyyy/mm/dd": {
mask: "y/1/2",
placeholder: "yyyy/mm/dd",
alias: "mm/dd/yyyy",
leapday: "/02/29",
onKeyDown: function(e, buffer, caretPos, opts) {
var $input = $(this);
if (e.ctrlKey && e.keyCode === Inputmask.keyCode.RIGHT) {
var today = new Date();
$input.val(today.getFullYear().toString() + (today.getMonth() + 1).toString() + today.getDate().toString()),
$input.trigger("setvalue");
}
}
},
"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: new RegExp("[012]"),
hrs24: new RegExp("2[0-4]|1[3-9]"),
hrs: new RegExp("[01][0-9]|2[0-4]"),
ampm: new RegExp("^[a|p|A|P][m|M]"),
mspre: new RegExp("[0-5]"),
ms: new RegExp("[0-5][0-9]")
},
timeseparator: ":",
hourFormat: "24",
definitions: {
h: {
validator: function(chrs, maskset, pos, strict, opts) {
if ("24" === opts.hourFormat && 24 === parseInt(chrs, 10)) return maskset.buffer[pos - 1] = "0",
maskset.buffer[pos] = "0", {
refreshFromBuffer: {
start: pos - 1,
end: pos
},
c: "0"
};
var isValid = opts.regex.hrs.test(chrs);
if (!strict && !isValid && (chrs.charAt(1) === opts.timeseparator || -1 !== "-.:".indexOf(chrs.charAt(1))) && (isValid = opts.regex.hrs.test("0" + chrs.charAt(0)))) return maskset.buffer[pos - 1] = "0",
maskset.buffer[pos] = chrs.charAt(0), pos++, {
refreshFromBuffer: {
start: pos - 2,
end: pos
},
pos: pos,
c: opts.timeseparator
};
if (isValid && "24" !== opts.hourFormat && opts.regex.hrs24.test(chrs)) {
var tmp = parseInt(chrs, 10);
return 24 === tmp ? (maskset.buffer[pos + 5] = "a", maskset.buffer[pos + 6] = "m") : (maskset.buffer[pos + 5] = "p",
maskset.buffer[pos + 6] = "m"), (tmp -= 12) < 10 ? (maskset.buffer[pos] = tmp.toString(),
maskset.buffer[pos - 1] = "0") : (maskset.buffer[pos] = tmp.toString().charAt(1),
maskset.buffer[pos - 1] = tmp.toString().charAt(0)), {
refreshFromBuffer: {
start: pos - 1,
end: pos + 6
},
c: maskset.buffer[pos]
};
}
return isValid;
},
cardinality: 2,
prevalidator: [ {
validator: function(chrs, maskset, pos, strict, opts) {
var isValid = opts.regex.hrspre.test(chrs);
return strict || isValid || !(isValid = opts.regex.hrs.test("0" + chrs)) ? isValid : (maskset.buffer[pos] = "0",
pos++, {
pos: pos
});
},
cardinality: 1
} ]
},
s: {
validator: "[0-5][0-9]",
cardinality: 2,
prevalidator: [ {
validator: function(chrs, maskset, pos, strict, opts) {
var isValid = opts.regex.mspre.test(chrs);
return strict || isValid || !(isValid = opts.regex.ms.test("0" + chrs)) ? isValid : (maskset.buffer[pos] = "0",
pos++, {
pos: pos
});
},
cardinality: 1
} ]
},
t: {
validator: function(chrs, maskset, pos, strict, opts) {
return opts.regex.ampm.test(chrs + "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"
},
"mm/dd/yyyy hh:mm xm": {
mask: "1/2/y h:s t\\m",
placeholder: "mm/dd/yyyy hh:mm xm",
alias: "datetime12",
regex: {
val2pre: function(separator) {
var escapedSeparator = Inputmask.escapeRegex.call(this, separator);
return new RegExp("((0[13-9]|1[012])" + escapedSeparator + "[0-3])|(02" + escapedSeparator + "[0-2])");
},
val2: function(separator) {
var escapedSeparator = Inputmask.escapeRegex.call(this, separator);
return new RegExp("((0[1-9]|1[012])" + escapedSeparator + "(0[1-9]|[12][0-9]))|((0[13-9]|1[012])" + escapedSeparator + "30)|((0[13578]|1[02])" + escapedSeparator + "31)");
},
val1pre: new RegExp("[01]"),
val1: new RegExp("0[1-9]|1[012]")
},
leapday: "02/29/",
onKeyDown: function(e, buffer, caretPos, opts) {
var $input = $(this);
if (e.ctrlKey && e.keyCode === Inputmask.keyCode.RIGHT) {
var today = new Date();
$input.val((today.getMonth() + 1).toString() + today.getDate().toString() + today.getFullYear().toString()),
$input.trigger("setvalue");
}
}
},
"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: "hh:mm:ss",
alias: "datetime",
autoUnmask: !1
},
"hh:mm": {
mask: "h:s",
placeholder: "hh:mm",
alias: "datetime",
autoUnmask: !1
},
date: {
alias: "dd/mm/yyyy"
},
"mm/yyyy": {
mask: "1/y",
placeholder: "mm/yyyy",
leapday: "donotuse",
separator: "/",
alias: "mm/dd/yyyy"
},
shamsi: {
regex: {
val2pre: function(separator) {
var escapedSeparator = Inputmask.escapeRegex.call(this, separator);
return new RegExp("((0[1-9]|1[012])" + escapedSeparator + "[0-3])");
},
val2: function(separator) {
var escapedSeparator = Inputmask.escapeRegex.call(this, separator);
return new RegExp("((0[1-9]|1[012])" + escapedSeparator + "(0[1-9]|[12][0-9]))|((0[1-9]|1[012])" + escapedSeparator + "30)|((0[1-6])" + escapedSeparator + "31)");
},
val1pre: new RegExp("[01]"),
val1: new RegExp("0[1-9]|1[012]")
},
yearrange: {
minyear: 1300,
maxyear: 1499
},
mask: "y/1/2",
leapday: "/12/30",
placeholder: "yyyy/mm/dd",
alias: "mm/dd/yyyy",
clearIncomplete: !0
},
"yyyy-mm-dd hh:mm:ss": {
mask: "y-1-2 h:s:s",
placeholder: "yyyy-mm-dd hh:mm:ss",
alias: "datetime",
separator: "-",
leapday: "-02-29",
regex: {
val2pre: function(separator) {
var escapedSeparator = Inputmask.escapeRegex.call(this, separator);
return new RegExp("((0[13-9]|1[012])" + escapedSeparator + "[0-3])|(02" + escapedSeparator + "[0-2])");
},
val2: function(separator) {
var escapedSeparator = Inputmask.escapeRegex.call(this, separator);
return new RegExp("((0[1-9]|1[012])" + escapedSeparator + "(0[1-9]|[12][0-9]))|((0[13-9]|1[012])" + escapedSeparator + "30)|((0[13578]|1[02])" + escapedSeparator + "31)");
},
val1pre: new RegExp("[01]"),
val1: new RegExp("0[1-9]|1[012]")
},
onKeyDown: function(e, buffer, caretPos, opts) {}
}
}), Inputmask;
});

View File

@@ -0,0 +1,97 @@
/*!
* inputmask.extensions.js
* https://github.com/RobinHerbots/Inputmask
* Copyright (c) 2010 - 2017 Robin Herbots
* Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
* Version: 3.3.11
*/
!function(factory) {
"function" == typeof define && define.amd ? define([ "./dependencyLibs/inputmask.dependencyLib", "./inputmask" ], factory) : "object" == typeof exports ? module.exports = factory(require("./dependencyLibs/inputmask.dependencyLib"), require("./inputmask")) : factory(window.dependencyLib || jQuery, window.Inputmask);
}(function($, Inputmask) {
return Inputmask.extendDefinitions({
A: {
validator: "[A-Za-zА-яЁёÀ-ÿµ]",
cardinality: 1,
casing: "upper"
},
"&": {
validator: "[0-9A-Za-zА-яЁёÀ-ÿµ]",
cardinality: 1,
casing: "upper"
},
"#": {
validator: "[0-9A-Fa-f]",
cardinality: 1,
casing: "upper"
}
}), Inputmask.extendAliases({
url: {
definitions: {
i: {
validator: ".",
cardinality: 1
}
},
mask: "(\\http://)|(\\http\\s://)|(ftp://)|(ftp\\s://)i{+}",
insertMode: !1,
autoUnmask: !1,
inputmode: "url"
},
ip: {
mask: "i[i[i]].i[i[i]].i[i[i]].i[i[i]]",
definitions: {
i: {
validator: function(chrs, maskset, pos, strict, opts) {
return pos - 1 > -1 && "." !== maskset.buffer[pos - 1] ? (chrs = maskset.buffer[pos - 1] + chrs,
chrs = pos - 2 > -1 && "." !== maskset.buffer[pos - 2] ? maskset.buffer[pos - 2] + chrs : "0" + chrs) : chrs = "00" + chrs,
new RegExp("25[0-5]|2[0-4][0-9]|[01][0-9][0-9]").test(chrs);
},
cardinality: 1
}
},
onUnMask: function(maskedValue, unmaskedValue, opts) {
return maskedValue;
},
inputmode: "numeric"
},
email: {
mask: "*{1,64}[.*{1,64}][.*{1,64}][.*{1,63}]@-{1,63}.-{1,63}[.-{1,63}][.-{1,63}]",
greedy: !1,
onBeforePaste: function(pastedValue, opts) {
return (pastedValue = pastedValue.toLowerCase()).replace("mailto:", "");
},
definitions: {
"*": {
validator: "[0-9A-Za-z!#$%&'*+/=?^_`{|}~-]",
cardinality: 1,
casing: "lower"
},
"-": {
validator: "[0-9A-Za-z-]",
cardinality: 1,
casing: "lower"
}
},
onUnMask: function(maskedValue, unmaskedValue, opts) {
return maskedValue;
},
inputmode: "email"
},
mac: {
mask: "##:##:##:##:##:##"
},
vin: {
mask: "V{13}9{4}",
definitions: {
V: {
validator: "[A-HJ-NPR-Za-hj-npr-z\\d]",
cardinality: 1,
casing: "upper"
}
},
clearIncomplete: !0,
autoUnmask: !0
}
}), Inputmask;
});

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,339 @@
/*!
* inputmask.numeric.extensions.js
* https://github.com/RobinHerbots/Inputmask
* Copyright (c) 2010 - 2017 Robin Herbots
* Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
* Version: 3.3.11
*/
!function(factory) {
"function" == typeof define && define.amd ? define([ "./dependencyLibs/inputmask.dependencyLib", "./inputmask" ], factory) : "object" == typeof exports ? module.exports = factory(require("./dependencyLibs/inputmask.dependencyLib"), require("./inputmask")) : factory(window.dependencyLib || jQuery, window.Inputmask);
}(function($, Inputmask, undefined) {
function autoEscape(txt, opts) {
for (var escapedTxt = "", i = 0; i < txt.length; i++) Inputmask.prototype.definitions[txt.charAt(i)] || opts.definitions[txt.charAt(i)] || opts.optionalmarker.start === txt.charAt(i) || opts.optionalmarker.end === txt.charAt(i) || opts.quantifiermarker.start === txt.charAt(i) || opts.quantifiermarker.end === txt.charAt(i) || opts.groupmarker.start === txt.charAt(i) || opts.groupmarker.end === txt.charAt(i) || opts.alternatormarker === txt.charAt(i) ? escapedTxt += "\\" + txt.charAt(i) : escapedTxt += txt.charAt(i);
return escapedTxt;
}
return Inputmask.extendAliases({
numeric: {
mask: function(opts) {
if (0 !== opts.repeat && isNaN(opts.integerDigits) && (opts.integerDigits = opts.repeat),
opts.repeat = 0, opts.groupSeparator === opts.radixPoint && ("." === opts.radixPoint ? opts.groupSeparator = "," : "," === opts.radixPoint ? opts.groupSeparator = "." : opts.groupSeparator = ""),
" " === opts.groupSeparator && (opts.skipOptionalPartCharacter = undefined), opts.autoGroup = opts.autoGroup && "" !== opts.groupSeparator,
opts.autoGroup && ("string" == typeof opts.groupSize && isFinite(opts.groupSize) && (opts.groupSize = parseInt(opts.groupSize)),
isFinite(opts.integerDigits))) {
var seps = Math.floor(opts.integerDigits / opts.groupSize), mod = opts.integerDigits % opts.groupSize;
opts.integerDigits = parseInt(opts.integerDigits) + (0 === mod ? seps - 1 : seps),
opts.integerDigits < 1 && (opts.integerDigits = "*");
}
opts.placeholder.length > 1 && (opts.placeholder = opts.placeholder.charAt(0)),
"radixFocus" === opts.positionCaretOnClick && "" === opts.placeholder && !1 === opts.integerOptional && (opts.positionCaretOnClick = "lvp"),
opts.definitions[";"] = opts.definitions["~"], opts.definitions[";"].definitionSymbol = "~",
!0 === opts.numericInput && (opts.positionCaretOnClick = "radixFocus" === opts.positionCaretOnClick ? "lvp" : opts.positionCaretOnClick,
opts.digitsOptional = !1, isNaN(opts.digits) && (opts.digits = 2), opts.decimalProtect = !1);
var mask = "[+]";
if (mask += autoEscape(opts.prefix, opts), !0 === opts.integerOptional ? mask += "~{1," + opts.integerDigits + "}" : mask += "~{" + opts.integerDigits + "}",
opts.digits !== undefined) {
opts.radixPointDefinitionSymbol = opts.decimalProtect ? ":" : opts.radixPoint;
var dq = opts.digits.toString().split(",");
isFinite(dq[0] && dq[1] && isFinite(dq[1])) ? mask += opts.radixPointDefinitionSymbol + ";{" + opts.digits + "}" : (isNaN(opts.digits) || parseInt(opts.digits) > 0) && (opts.digitsOptional ? mask += "[" + opts.radixPointDefinitionSymbol + ";{1," + opts.digits + "}]" : mask += opts.radixPointDefinitionSymbol + ";{" + opts.digits + "}");
}
return mask += autoEscape(opts.suffix, opts), mask += "[-]", opts.greedy = !1, mask;
},
placeholder: "",
greedy: !1,
digits: "*",
digitsOptional: !0,
enforceDigitsOnBlur: !1,
radixPoint: ".",
positionCaretOnClick: "radixFocus",
groupSize: 3,
groupSeparator: "",
autoGroup: !1,
allowMinus: !0,
negationSymbol: {
front: "-",
back: ""
},
integerDigits: "+",
integerOptional: !0,
prefix: "",
suffix: "",
rightAlign: !0,
decimalProtect: !0,
min: null,
max: null,
step: 1,
insertMode: !0,
autoUnmask: !1,
unmaskAsNumber: !1,
inputmode: "numeric",
preValidation: function(buffer, pos, c, isSelection, opts) {
if ("-" === c || c === opts.negationSymbol.front) return !0 === opts.allowMinus && (opts.isNegative = opts.isNegative === undefined || !opts.isNegative,
"" === buffer.join("") || {
caret: pos,
dopost: !0
});
if (!1 === isSelection && c === opts.radixPoint && opts.digits !== undefined && (isNaN(opts.digits) || parseInt(opts.digits) > 0)) {
var radixPos = $.inArray(opts.radixPoint, buffer);
if (-1 !== radixPos) return !0 === opts.numericInput ? pos === radixPos : {
caret: radixPos + 1
};
}
return !0;
},
postValidation: function(buffer, currentResult, opts) {
var suffix = opts.suffix.split(""), prefix = opts.prefix.split("");
if (currentResult.pos === undefined && currentResult.caret !== undefined && !0 !== currentResult.dopost) return currentResult;
var caretPos = currentResult.caret !== undefined ? currentResult.caret : currentResult.pos, maskedValue = buffer.slice();
opts.numericInput && (caretPos = maskedValue.length - caretPos - 1, maskedValue = maskedValue.reverse());
var charAtPos = maskedValue[caretPos];
if (charAtPos === opts.groupSeparator && (charAtPos = maskedValue[caretPos += 1]),
caretPos === maskedValue.length - opts.suffix.length - 1 && charAtPos === opts.radixPoint) return currentResult;
charAtPos !== undefined && charAtPos !== opts.radixPoint && charAtPos !== opts.negationSymbol.front && charAtPos !== opts.negationSymbol.back && (maskedValue[caretPos] = "?",
opts.prefix.length > 0 && caretPos >= (!1 === opts.isNegative ? 1 : 0) && caretPos < opts.prefix.length - 1 + (!1 === opts.isNegative ? 1 : 0) ? prefix[caretPos - (!1 === opts.isNegative ? 1 : 0)] = "?" : opts.suffix.length > 0 && caretPos >= maskedValue.length - opts.suffix.length - (!1 === opts.isNegative ? 1 : 0) && (suffix[caretPos - (maskedValue.length - opts.suffix.length - (!1 === opts.isNegative ? 1 : 0))] = "?")),
prefix = prefix.join(""), suffix = suffix.join("");
var processValue = maskedValue.join("").replace(prefix, "");
if (processValue = processValue.replace(suffix, ""), processValue = processValue.replace(new RegExp(Inputmask.escapeRegex(opts.groupSeparator), "g"), ""),
processValue = processValue.replace(new RegExp("[-" + Inputmask.escapeRegex(opts.negationSymbol.front) + "]", "g"), ""),
processValue = processValue.replace(new RegExp(Inputmask.escapeRegex(opts.negationSymbol.back) + "$"), ""),
isNaN(opts.placeholder) && (processValue = processValue.replace(new RegExp(Inputmask.escapeRegex(opts.placeholder), "g"), "")),
processValue.length > 1 && 1 !== processValue.indexOf(opts.radixPoint) && ("0" === charAtPos && (processValue = processValue.replace(/^\?/g, "")),
processValue = processValue.replace(/^0/g, "")), processValue.charAt(0) === opts.radixPoint && "" !== opts.radixPoint && !0 !== opts.numericInput && (processValue = "0" + processValue),
"" !== processValue) {
if (processValue = processValue.split(""), (!opts.digitsOptional || opts.enforceDigitsOnBlur && "blur" === currentResult.event) && isFinite(opts.digits)) {
var radixPosition = $.inArray(opts.radixPoint, processValue), rpb = $.inArray(opts.radixPoint, maskedValue);
-1 === radixPosition && (processValue.push(opts.radixPoint), radixPosition = processValue.length - 1);
for (var i = 1; i <= opts.digits; i++) opts.digitsOptional && (!opts.enforceDigitsOnBlur || "blur" !== currentResult.event) || processValue[radixPosition + i] !== undefined && processValue[radixPosition + i] !== opts.placeholder.charAt(0) ? -1 !== rpb && maskedValue[rpb + i] !== undefined && (processValue[radixPosition + i] = processValue[radixPosition + i] || maskedValue[rpb + i]) : processValue[radixPosition + i] = currentResult.placeholder || opts.placeholder.charAt(0);
}
if (!0 !== opts.autoGroup || "" === opts.groupSeparator || charAtPos === opts.radixPoint && currentResult.pos === undefined && !currentResult.dopost) processValue = processValue.join(""); else {
var addRadix = processValue[processValue.length - 1] === opts.radixPoint && currentResult.c === opts.radixPoint;
processValue = Inputmask(function(buffer, opts) {
var postMask = "";
if (postMask += "(" + opts.groupSeparator + "*{" + opts.groupSize + "}){*}", "" !== opts.radixPoint) {
var radixSplit = buffer.join("").split(opts.radixPoint);
radixSplit[1] && (postMask += opts.radixPoint + "*{" + radixSplit[1].match(/^\d*\??\d*/)[0].length + "}");
}
return postMask;
}(processValue, opts), {
numericInput: !0,
jitMasking: !0,
definitions: {
"*": {
validator: "[0-9?]",
cardinality: 1
}
}
}).format(processValue.join("")), addRadix && (processValue += opts.radixPoint),
processValue.charAt(0) === opts.groupSeparator && processValue.substr(1);
}
}
if (opts.isNegative && "blur" === currentResult.event && (opts.isNegative = "0" !== processValue),
processValue = prefix + processValue, processValue += suffix, opts.isNegative && (processValue = opts.negationSymbol.front + processValue,
processValue += opts.negationSymbol.back), processValue = processValue.split(""),
charAtPos !== undefined) if (charAtPos !== opts.radixPoint && charAtPos !== opts.negationSymbol.front && charAtPos !== opts.negationSymbol.back) (caretPos = $.inArray("?", processValue)) > -1 ? processValue[caretPos] = charAtPos : caretPos = currentResult.caret || 0; else if (charAtPos === opts.radixPoint || charAtPos === opts.negationSymbol.front || charAtPos === opts.negationSymbol.back) {
var newCaretPos = $.inArray(charAtPos, processValue);
-1 !== newCaretPos && (caretPos = newCaretPos);
}
opts.numericInput && (caretPos = processValue.length - caretPos - 1, processValue = processValue.reverse());
var rslt = {
caret: charAtPos === undefined || currentResult.pos !== undefined ? caretPos + (opts.numericInput ? -1 : 1) : caretPos,
buffer: processValue,
refreshFromBuffer: currentResult.dopost || buffer.join("") !== processValue.join("")
};
return rslt.refreshFromBuffer ? rslt : currentResult;
},
onBeforeWrite: function(e, buffer, caretPos, opts) {
if (e) switch (e.type) {
case "keydown":
return opts.postValidation(buffer, {
caret: caretPos,
dopost: !0
}, opts);
case "blur":
case "checkval":
var unmasked;
if (function(opts) {
opts.parseMinMaxOptions === undefined && (null !== opts.min && (opts.min = opts.min.toString().replace(new RegExp(Inputmask.escapeRegex(opts.groupSeparator), "g"), ""),
"," === opts.radixPoint && (opts.min = opts.min.replace(opts.radixPoint, ".")),
opts.min = isFinite(opts.min) ? parseFloat(opts.min) : NaN, isNaN(opts.min) && (opts.min = Number.MIN_VALUE)),
null !== opts.max && (opts.max = opts.max.toString().replace(new RegExp(Inputmask.escapeRegex(opts.groupSeparator), "g"), ""),
"," === opts.radixPoint && (opts.max = opts.max.replace(opts.radixPoint, ".")),
opts.max = isFinite(opts.max) ? parseFloat(opts.max) : NaN, isNaN(opts.max) && (opts.max = Number.MAX_VALUE)),
opts.parseMinMaxOptions = "done");
}(opts), null !== opts.min || null !== opts.max) {
if (unmasked = opts.onUnMask(buffer.join(""), undefined, $.extend({}, opts, {
unmaskAsNumber: !0
})), null !== opts.min && unmasked < opts.min) return opts.isNegative = opts.min < 0,
opts.postValidation(opts.min.toString().replace(".", opts.radixPoint).split(""), {
caret: caretPos,
dopost: !0,
placeholder: "0"
}, opts);
if (null !== opts.max && unmasked > opts.max) return opts.isNegative = opts.max < 0,
opts.postValidation(opts.max.toString().replace(".", opts.radixPoint).split(""), {
caret: caretPos,
dopost: !0,
placeholder: "0"
}, opts);
}
return opts.postValidation(buffer, {
caret: caretPos,
placeholder: "0",
event: "blur"
}, opts);
case "_checkval":
return {
caret: caretPos
};
}
},
regex: {
integerPart: function(opts, emptyCheck) {
return emptyCheck ? new RegExp("[" + Inputmask.escapeRegex(opts.negationSymbol.front) + "+]?") : new RegExp("[" + Inputmask.escapeRegex(opts.negationSymbol.front) + "+]?\\d+");
},
integerNPart: function(opts) {
return new RegExp("[\\d" + Inputmask.escapeRegex(opts.groupSeparator) + Inputmask.escapeRegex(opts.placeholder.charAt(0)) + "]+");
}
},
definitions: {
"~": {
validator: function(chrs, maskset, pos, strict, opts, isSelection) {
var isValid = strict ? new RegExp("[0-9" + Inputmask.escapeRegex(opts.groupSeparator) + "]").test(chrs) : new RegExp("[0-9]").test(chrs);
if (!0 === isValid) {
if (!0 !== opts.numericInput && maskset.validPositions[pos] !== undefined && "~" === maskset.validPositions[pos].match.def && !isSelection) {
var processValue = maskset.buffer.join(""), pvRadixSplit = (processValue = (processValue = processValue.replace(new RegExp("[-" + Inputmask.escapeRegex(opts.negationSymbol.front) + "]", "g"), "")).replace(new RegExp(Inputmask.escapeRegex(opts.negationSymbol.back) + "$"), "")).split(opts.radixPoint);
pvRadixSplit.length > 1 && (pvRadixSplit[1] = pvRadixSplit[1].replace(/0/g, opts.placeholder.charAt(0))),
"0" === pvRadixSplit[0] && (pvRadixSplit[0] = pvRadixSplit[0].replace(/0/g, opts.placeholder.charAt(0))),
processValue = pvRadixSplit[0] + opts.radixPoint + pvRadixSplit[1] || "";
var bufferTemplate = maskset._buffer.join("");
for (processValue === opts.radixPoint && (processValue = bufferTemplate); null === processValue.match(Inputmask.escapeRegex(bufferTemplate) + "$"); ) bufferTemplate = bufferTemplate.slice(1);
isValid = (processValue = (processValue = processValue.replace(bufferTemplate, "")).split(""))[pos] === undefined ? {
pos: pos,
remove: pos
} : {
pos: pos
};
}
} else strict || chrs !== opts.radixPoint || maskset.validPositions[pos - 1] !== undefined || (maskset.buffer[pos] = "0",
isValid = {
pos: pos + 1
});
return isValid;
},
cardinality: 1
},
"+": {
validator: function(chrs, maskset, pos, strict, opts) {
return opts.allowMinus && ("-" === chrs || chrs === opts.negationSymbol.front);
},
cardinality: 1,
placeholder: ""
},
"-": {
validator: function(chrs, maskset, pos, strict, opts) {
return opts.allowMinus && chrs === opts.negationSymbol.back;
},
cardinality: 1,
placeholder: ""
},
":": {
validator: function(chrs, maskset, pos, strict, opts) {
var radix = "[" + Inputmask.escapeRegex(opts.radixPoint) + "]", isValid = new RegExp(radix).test(chrs);
return isValid && maskset.validPositions[pos] && maskset.validPositions[pos].match.placeholder === opts.radixPoint && (isValid = {
caret: pos + 1
}), isValid;
},
cardinality: 1,
placeholder: function(opts) {
return opts.radixPoint;
}
}
},
onUnMask: function(maskedValue, unmaskedValue, opts) {
if ("" === unmaskedValue && !0 === opts.nullable) return unmaskedValue;
var processValue = maskedValue.replace(opts.prefix, "");
return processValue = processValue.replace(opts.suffix, ""), processValue = processValue.replace(new RegExp(Inputmask.escapeRegex(opts.groupSeparator), "g"), ""),
"" !== opts.placeholder.charAt(0) && (processValue = processValue.replace(new RegExp(opts.placeholder.charAt(0), "g"), "0")),
opts.unmaskAsNumber ? ("" !== opts.radixPoint && -1 !== processValue.indexOf(opts.radixPoint) && (processValue = processValue.replace(Inputmask.escapeRegex.call(this, opts.radixPoint), ".")),
processValue = processValue.replace(new RegExp("^" + Inputmask.escapeRegex(opts.negationSymbol.front)), "-"),
processValue = processValue.replace(new RegExp(Inputmask.escapeRegex(opts.negationSymbol.back) + "$"), ""),
Number(processValue)) : processValue;
},
isComplete: function(buffer, opts) {
var maskedValue = buffer.join("");
if (buffer.slice().join("") !== maskedValue) return !1;
var processValue = maskedValue.replace(opts.prefix, "");
return processValue = processValue.replace(opts.suffix, ""), processValue = processValue.replace(new RegExp(Inputmask.escapeRegex(opts.groupSeparator), "g"), ""),
"," === opts.radixPoint && (processValue = processValue.replace(Inputmask.escapeRegex(opts.radixPoint), ".")),
isFinite(processValue);
},
onBeforeMask: function(initialValue, opts) {
if (opts.isNegative = undefined, initialValue = initialValue.toString().charAt(initialValue.length - 1) === opts.radixPoint ? initialValue.toString().substr(0, initialValue.length - 1) : initialValue.toString(),
"" !== opts.radixPoint && isFinite(initialValue)) {
var vs = initialValue.split("."), groupSize = "" !== opts.groupSeparator ? parseInt(opts.groupSize) : 0;
2 === vs.length && (vs[0].length > groupSize || vs[1].length > groupSize || vs[0].length <= groupSize && vs[1].length < groupSize) && (initialValue = initialValue.replace(".", opts.radixPoint));
}
var kommaMatches = initialValue.match(/,/g), dotMatches = initialValue.match(/\./g);
if (initialValue = dotMatches && kommaMatches ? dotMatches.length > kommaMatches.length ? (initialValue = initialValue.replace(/\./g, "")).replace(",", opts.radixPoint) : kommaMatches.length > dotMatches.length ? (initialValue = initialValue.replace(/,/g, "")).replace(".", opts.radixPoint) : initialValue.indexOf(".") < initialValue.indexOf(",") ? initialValue.replace(/\./g, "") : initialValue.replace(/,/g, "") : initialValue.replace(new RegExp(Inputmask.escapeRegex(opts.groupSeparator), "g"), ""),
0 === opts.digits && (-1 !== initialValue.indexOf(".") ? initialValue = initialValue.substring(0, initialValue.indexOf(".")) : -1 !== initialValue.indexOf(",") && (initialValue = initialValue.substring(0, initialValue.indexOf(",")))),
"" !== opts.radixPoint && isFinite(opts.digits) && -1 !== initialValue.indexOf(opts.radixPoint)) {
var decPart = initialValue.split(opts.radixPoint)[1].match(new RegExp("\\d*"))[0];
if (parseInt(opts.digits) < decPart.toString().length) {
var digitsFactor = Math.pow(10, parseInt(opts.digits));
initialValue = initialValue.replace(Inputmask.escapeRegex(opts.radixPoint), "."),
initialValue = (initialValue = Math.round(parseFloat(initialValue) * digitsFactor) / digitsFactor).toString().replace(".", opts.radixPoint);
}
}
return initialValue;
},
canClearPosition: function(maskset, position, lvp, strict, opts) {
var vp = maskset.validPositions[position], canClear = vp.input !== opts.radixPoint || null !== maskset.validPositions[position].match.fn && !1 === opts.decimalProtect || vp.input === opts.radixPoint && maskset.validPositions[position + 1] && null === maskset.validPositions[position + 1].match.fn || isFinite(vp.input) || position === lvp || vp.input === opts.groupSeparator || vp.input === opts.negationSymbol.front || vp.input === opts.negationSymbol.back;
return !canClear || "+" !== vp.match.nativeDef && "-" !== vp.match.nativeDef || (opts.isNegative = !1),
canClear;
},
onKeyDown: function(e, buffer, caretPos, opts) {
var $input = $(this);
if (e.ctrlKey) switch (e.keyCode) {
case Inputmask.keyCode.UP:
$input.val(parseFloat(this.inputmask.unmaskedvalue()) + parseInt(opts.step)), $input.trigger("setvalue");
break;
case Inputmask.keyCode.DOWN:
$input.val(parseFloat(this.inputmask.unmaskedvalue()) - parseInt(opts.step)), $input.trigger("setvalue");
}
}
},
currency: {
prefix: "$ ",
groupSeparator: ",",
alias: "numeric",
placeholder: "0",
autoGroup: !0,
digits: 2,
digitsOptional: !1,
clearMaskOnLostFocus: !1
},
decimal: {
alias: "numeric"
},
integer: {
alias: "numeric",
digits: 0,
radixPoint: ""
},
percentage: {
alias: "numeric",
digits: 2,
digitsOptional: !0,
radixPoint: ".",
placeholder: "0",
autoGroup: !1,
min: 0,
max: 100,
suffix: " %",
allowMinus: !1
}
}), Inputmask;
});

View File

@@ -0,0 +1,59 @@
/*!
* inputmask.phone.extensions.js
* https://github.com/RobinHerbots/Inputmask
* Copyright (c) 2010 - 2017 Robin Herbots
* Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
* Version: 3.3.11
*/
!function(factory) {
"function" == typeof define && define.amd ? define([ "./dependencyLibs/inputmask.dependencyLib", "./inputmask" ], factory) : "object" == typeof exports ? module.exports = factory(require("./dependencyLibs/inputmask.dependencyLib"), require("./inputmask")) : factory(window.dependencyLib || jQuery, window.Inputmask);
}(function($, Inputmask) {
function maskSort(a, b) {
var maska = (a.mask || a).replace(/#/g, "9").replace(/\)/, "9").replace(/[+()#-]/g, ""), maskb = (b.mask || b).replace(/#/g, "9").replace(/\)/, "9").replace(/[+()#-]/g, ""), maskas = (a.mask || a).split("#")[0], maskbs = (b.mask || b).split("#")[0];
return 0 === maskbs.indexOf(maskas) ? -1 : 0 === maskas.indexOf(maskbs) ? 1 : maska.localeCompare(maskb);
}
var analyseMaskBase = Inputmask.prototype.analyseMask;
return Inputmask.prototype.analyseMask = function(mask, regexMask, opts) {
function reduceVariations(masks, previousVariation, previousmaskGroup) {
previousVariation = previousVariation || "", previousmaskGroup = previousmaskGroup || maskGroups,
"" !== previousVariation && (previousmaskGroup[previousVariation] = {});
for (var variation = "", maskGroup = previousmaskGroup[previousVariation] || previousmaskGroup, i = masks.length - 1; i >= 0; i--) maskGroup[variation = (mask = masks[i].mask || masks[i]).substr(0, 1)] = maskGroup[variation] || [],
maskGroup[variation].unshift(mask.substr(1)), masks.splice(i, 1);
for (var ndx in maskGroup) maskGroup[ndx].length > 500 && reduceVariations(maskGroup[ndx].slice(), ndx, maskGroup);
}
function rebuild(maskGroup) {
var mask = "", submasks = [];
for (var ndx in maskGroup) $.isArray(maskGroup[ndx]) ? 1 === maskGroup[ndx].length ? submasks.push(ndx + maskGroup[ndx]) : submasks.push(ndx + opts.groupmarker.start + maskGroup[ndx].join(opts.groupmarker.end + opts.alternatormarker + opts.groupmarker.start) + opts.groupmarker.end) : submasks.push(ndx + rebuild(maskGroup[ndx]));
return 1 === submasks.length ? mask += submasks[0] : mask += opts.groupmarker.start + submasks.join(opts.groupmarker.end + opts.alternatormarker + opts.groupmarker.start) + opts.groupmarker.end,
mask;
}
var maskGroups = {};
return opts.phoneCodes && (opts.phoneCodes && opts.phoneCodes.length > 1e3 && (reduceVariations((mask = mask.substr(1, mask.length - 2)).split(opts.groupmarker.end + opts.alternatormarker + opts.groupmarker.start)),
mask = rebuild(maskGroups)), mask = mask.replace(/9/g, "\\9")), analyseMaskBase.call(this, mask, regexMask, opts);
}, Inputmask.extendAliases({
abstractphone: {
groupmarker: {
start: "<",
end: ">"
},
countrycode: "",
phoneCodes: [],
mask: function(opts) {
return opts.definitions = {
"#": Inputmask.prototype.definitions[9]
}, opts.phoneCodes.sort(maskSort);
},
keepStatic: !0,
onBeforeMask: function(value, opts) {
var processedValue = value.replace(/^0{1,2}/, "").replace(/[\s]/g, "");
return (processedValue.indexOf(opts.countrycode) > 1 || -1 === processedValue.indexOf(opts.countrycode)) && (processedValue = "+" + opts.countrycode + processedValue),
processedValue;
},
onUnMask: function(maskedValue, unmaskedValue, opts) {
return maskedValue.replace(/[()#-]/g, "");
},
inputmode: "tel"
}
}), Inputmask;
});

View File

@@ -0,0 +1,110 @@
/*!
* inputmask.regex.extensions.js
* https://github.com/RobinHerbots/Inputmask
* Copyright (c) 2010 - 2017 Robin Herbots
* Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
* Version: 3.3.11
*/
!function(factory) {
"function" == typeof define && define.amd ? define([ "./dependencyLibs/inputmask.dependencyLib", "./inputmask" ], factory) : "object" == typeof exports ? module.exports = factory(require("./dependencyLibs/inputmask.dependencyLib"), require("./inputmask")) : factory(window.dependencyLib || jQuery, window.Inputmask);
}(function($, Inputmask) {
return Inputmask.extendAliases({
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(buffer, opts) {
return new RegExp(opts.regex, opts.casing ? "i" : "").test(buffer.join(""));
},
definitions: {
r: {
validator: function(chrs, maskset, pos, strict, opts) {
function RegexToken(isGroup, isQuantifier) {
this.matches = [], this.isGroup = isGroup || !1, this.isQuantifier = isQuantifier || !1,
this.quantifier = {
min: 1,
max: 1
}, this.repeaterPart = void 0;
}
function validateRegexToken(token, fromGroup) {
var isvalid = !1;
fromGroup && (regexPart += "(", openGroupCount++);
for (var mndx = 0; mndx < token.matches.length; mndx++) {
var matchToken = token.matches[mndx];
if (!0 === matchToken.isGroup) isvalid = validateRegexToken(matchToken, !0); else if (!0 === matchToken.isQuantifier) {
var crrntndx = $.inArray(matchToken, token.matches), matchGroup = token.matches[crrntndx - 1], regexPartBak = regexPart;
if (isNaN(matchToken.quantifier.max)) {
for (;matchToken.repeaterPart && matchToken.repeaterPart !== regexPart && matchToken.repeaterPart.length > regexPart.length && !(isvalid = validateRegexToken(matchGroup, !0)); ) ;
(isvalid = isvalid || validateRegexToken(matchGroup, !0)) && (matchToken.repeaterPart = regexPart),
regexPart = regexPartBak + matchToken.quantifier.max;
} else {
for (var i = 0, qm = matchToken.quantifier.max - 1; i < qm && !(isvalid = validateRegexToken(matchGroup, !0)); i++) ;
regexPart = regexPartBak + "{" + matchToken.quantifier.min + "," + matchToken.quantifier.max + "}";
}
} else if (void 0 !== matchToken.matches) for (var k = 0; k < matchToken.length && !(isvalid = validateRegexToken(matchToken[k], fromGroup)); k++) ; else {
var testExp;
if ("[" == matchToken.charAt(0)) {
testExp = regexPart, testExp += matchToken;
for (j = 0; j < openGroupCount; j++) testExp += ")";
isvalid = (exp = new RegExp("^(" + testExp + ")$", opts.casing ? "i" : "")).test(bufferStr);
} else for (var l = 0, tl = matchToken.length; l < tl; l++) if ("\\" !== matchToken.charAt(l)) {
testExp = regexPart, testExp = (testExp += matchToken.substr(0, l + 1)).replace(/\|$/, "");
for (var j = 0; j < openGroupCount; j++) testExp += ")";
var exp = new RegExp("^(" + testExp + ")$", opts.casing ? "i" : "");
if (isvalid = exp.test(bufferStr)) break;
}
regexPart += matchToken;
}
if (isvalid) break;
}
return fromGroup && (regexPart += ")", openGroupCount--), isvalid;
}
var bufferStr, groupToken, cbuffer = maskset.buffer.slice(), regexPart = "", isValid = !1, openGroupCount = 0;
null === opts.regexTokens && function() {
var match, m, currentToken = new RegexToken(), opengroups = [];
for (opts.regexTokens = []; match = opts.tokenizer.exec(opts.regex); ) switch ((m = match[0]).charAt(0)) {
case "(":
opengroups.push(new RegexToken(!0));
break;
case ")":
groupToken = opengroups.pop(), opengroups.length > 0 ? opengroups[opengroups.length - 1].matches.push(groupToken) : currentToken.matches.push(groupToken);
break;
case "{":
case "+":
case "*":
var quantifierToken = new RegexToken(!1, !0), mq = (m = m.replace(/[{}]/g, "")).split(","), mq0 = isNaN(mq[0]) ? mq[0] : parseInt(mq[0]), mq1 = 1 === mq.length ? mq0 : isNaN(mq[1]) ? mq[1] : parseInt(mq[1]);
if (quantifierToken.quantifier = {
min: mq0,
max: mq1
}, opengroups.length > 0) {
var matches = opengroups[opengroups.length - 1].matches;
(match = matches.pop()).isGroup || ((groupToken = new RegexToken(!0)).matches.push(match),
match = groupToken), matches.push(match), matches.push(quantifierToken);
} else (match = currentToken.matches.pop()).isGroup || ((groupToken = new RegexToken(!0)).matches.push(match),
match = groupToken), currentToken.matches.push(match), currentToken.matches.push(quantifierToken);
break;
default:
opengroups.length > 0 ? opengroups[opengroups.length - 1].matches.push(m) : currentToken.matches.push(m);
}
currentToken.matches.length > 0 && opts.regexTokens.push(currentToken);
}(), cbuffer.splice(pos, 0, chrs), bufferStr = cbuffer.join("");
for (var i = 0; i < opts.regexTokens.length; i++) {
var regexToken = opts.regexTokens[i];
if (isValid = validateRegexToken(regexToken, regexToken.isGroup)) break;
}
return isValid;
},
cardinality: 1
}
}
}
}), Inputmask;
});

View File

@@ -0,0 +1,62 @@
/*!
* jquery.inputmask.js
* https://github.com/RobinHerbots/Inputmask
* Copyright (c) 2010 - 2017 Robin Herbots
* Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
* Version: 3.3.11
*/
!function(factory) {
"function" == typeof define && define.amd ? define([ "jquery", "./inputmask" ], factory) : "object" == typeof exports ? module.exports = factory(require("jquery"), require("./inputmask")) : factory(jQuery, window.Inputmask);
}(function($, Inputmask) {
return void 0 === $.fn.inputmask && ($.fn.inputmask = function(fn, options) {
var nptmask, input = this[0];
if (void 0 === options && (options = {}), "string" == typeof fn) switch (fn) {
case "unmaskedvalue":
return input && input.inputmask ? input.inputmask.unmaskedvalue() : $(input).val();
case "remove":
return this.each(function() {
this.inputmask && this.inputmask.remove();
});
case "getemptymask":
return input && input.inputmask ? input.inputmask.getemptymask() : "";
case "hasMaskedValue":
return !(!input || !input.inputmask) && input.inputmask.hasMaskedValue();
case "isComplete":
return !input || !input.inputmask || input.inputmask.isComplete();
case "getmetadata":
return input && input.inputmask ? input.inputmask.getmetadata() : void 0;
case "setvalue":
$(input).val(options), input && void 0 === input.inputmask && $(input).triggerHandler("setvalue");
break;
case "option":
if ("string" != typeof options) return this.each(function() {
if (void 0 !== this.inputmask) return this.inputmask.option(options);
});
if (input && void 0 !== input.inputmask) return input.inputmask.option(options);
break;
default:
return options.alias = fn, nptmask = new Inputmask(options), this.each(function() {
nptmask.mask(this);
});
} else {
if ("object" == typeof fn) return nptmask = new Inputmask(fn), void 0 === fn.mask && void 0 === fn.alias ? this.each(function() {
if (void 0 !== this.inputmask) return this.inputmask.option(fn);
nptmask.mask(this);
}) : this.each(function() {
nptmask.mask(this);
});
if (void 0 === fn) return this.each(function() {
(nptmask = new Inputmask(options)).mask(this);
});
}
}), $.fn.inputmask;
});

View File

@@ -0,0 +1,244 @@
/*!
* phone-codes/phone-be.js
* https://github.com/RobinHerbots/Inputmask
* Copyright (c) 2010 - 2017 Robin Herbots
* Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
* Version: 3.3.11
*/
!function(factory) {
"function" == typeof define && define.amd ? define([ "../inputmask" ], factory) : "object" == typeof exports ? module.exports = factory(require("../inputmask")) : factory(window.Inputmask);
}(function(Inputmask) {
return Inputmask.extendAliases({
phonebe: {
alias: "abstractphone",
countrycode: "32",
phoneCodes: [ {
mask: "+32(53)##-##-##",
cc: "BE",
cd: "Belgium",
city: "Aalst (Alost)"
}, {
mask: "+32(3)###-##-##",
cc: "BE",
cd: "Belgium",
city: "Antwerpen (Anvers)"
}, {
mask: "+32(63)##-##-##",
cc: "BE",
cd: "Belgium",
city: "Arlon"
}, {
mask: "+32(67)##-##-##",
cc: "BE",
cd: "Belgium",
city: "Ath"
}, {
mask: "+32(50)##-##-##",
cc: "BE",
cd: "Belgium",
city: "Brugge (Bruges)"
}, {
mask: "+32(2)###-##-##",
cc: "BE",
cd: "Belgium",
city: "Brussel/Bruxelles (Brussels)"
}, {
mask: "+32(71)##-##-##",
cc: "BE",
cd: "Belgium",
city: "Charleroi"
}, {
mask: "+32(60)##-##-##",
cc: "BE",
cd: "Belgium",
city: "Chimay"
}, {
mask: "+32(83)##-##-##",
cc: "BE",
cd: "Belgium",
city: "Ciney"
}, {
mask: "+32(52)##-##-##",
cc: "BE",
cd: "Belgium",
city: "Dendermonde"
}, {
mask: "+32(13)##-##-##",
cc: "BE",
cd: "Belgium",
city: "Diest"
}, {
mask: "+32(82)##-##-##",
cc: "BE",
cd: "Belgium",
city: "Dinant"
}, {
mask: "+32(86)##-##-##",
cc: "BE",
cd: "Belgium",
city: "Durbuy"
}, {
mask: "+32(89)##-##-##",
cc: "BE",
cd: "Belgium",
city: "Genk"
}, {
mask: "+32(9)###-##-##",
cc: "BE",
cd: "Belgium",
city: "Gent (Gand)"
}, {
mask: "+32(11)##-##-##",
cc: "BE",
cd: "Belgium",
city: "Hasselt"
}, {
mask: "+32(14)##-##-##",
cc: "BE",
cd: "Belgium",
city: "Herentals"
}, {
mask: "+32(85)##-##-##",
cc: "BE",
cd: "Belgium",
city: "Huy (Hoei)"
}, {
mask: "+32(64)##-##-##",
cc: "BE",
cd: "Belgium",
city: "La Louvière"
}, {
mask: "+32(16)##-##-##",
cc: "BE",
cd: "Belgium",
city: "Leuven (Louvain)"
}, {
mask: "+32(61)##-##-##",
cc: "BE",
cd: "Belgium",
city: "Libramont"
}, {
mask: "+32(4)###-##-##",
cc: "BE",
cd: "Belgium",
city: "Liège (Luik)"
}, {
mask: "+32(15)##-##-##",
cc: "BE",
cd: "Belgium",
city: "Mechelen (Malines)"
}, {
mask: "+32(46#)##-##-##",
cc: "BE",
cd: "Belgium",
city: "Mobile Phones"
}, {
mask: "+32(47#)##-##-##",
cc: "BE",
cd: "Belgium",
city: "Mobile Phones"
}, {
mask: "+32(48#)##-##-##",
cc: "BE",
cd: "Belgium",
city: "Mobile Phones"
}, {
mask: "+32(49#)##-##-##",
cc: "BE",
cd: "Belgium",
city: "Mobile Phones"
}, {
mask: "+32(461)8#-##-##",
cc: "BE",
cd: "Belgium",
city: "GSM-R (NMBS)"
}, {
mask: "+32(65)##-##-##",
cc: "BE",
cd: "Belgium",
city: "Mons (Bergen)"
}, {
mask: "+32(81)##-##-##",
cc: "BE",
cd: "Belgium",
city: "Namur (Namen)"
}, {
mask: "+32(58)##-##-##",
cc: "BE",
cd: "Belgium",
city: "Nieuwpoort (Nieuport)"
}, {
mask: "+32(54)##-##-##",
cc: "BE",
cd: "Belgium",
city: "Ninove"
}, {
mask: "+32(67)##-##-##",
cc: "BE",
cd: "Belgium",
city: "Nivelles (Nijvel)"
}, {
mask: "+32(59)##-##-##",
cc: "BE",
cd: "Belgium",
city: "Oostende (Ostende)"
}, {
mask: "+32(51)##-##-##",
cc: "BE",
cd: "Belgium",
city: "Roeselare (Roulers)"
}, {
mask: "+32(55)##-##-##",
cc: "BE",
cd: "Belgium",
city: "Ronse"
}, {
mask: "+32(80)##-##-##",
cc: "BE",
cd: "Belgium",
city: "Stavelot"
}, {
mask: "+32(12)##-##-##",
cc: "BE",
cd: "Belgium",
city: "Tongeren (Tongres)"
}, {
mask: "+32(69)##-##-##",
cc: "BE",
cd: "Belgium",
city: "Tounai"
}, {
mask: "+32(14)##-##-##",
cc: "BE",
cd: "Belgium",
city: "Turnhout"
}, {
mask: "+32(87)##-##-##",
cc: "BE",
cd: "Belgium",
city: "Verviers"
}, {
mask: "+32(58)##-##-##",
cc: "BE",
cd: "Belgium",
city: "Veurne"
}, {
mask: "+32(19)##-##-##",
cc: "BE",
cd: "Belgium",
city: "Wareme"
}, {
mask: "+32(10)##-##-##",
cc: "BE",
cd: "Belgium",
city: "Wavre (Waver)"
}, {
mask: "+32(50)##-##-##",
cc: "BE",
cd: "Belgium",
city: "Zeebrugge"
} ]
}
}), Inputmask;
});

View File

@@ -0,0 +1,924 @@
/*!
* phone-codes/phone-nl.js
* https://github.com/RobinHerbots/Inputmask
* Copyright (c) 2010 - 2017 Robin Herbots
* Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
* Version: 3.3.11
*/
!function(factory) {
"function" == typeof define && define.amd ? define([ "../inputmask" ], factory) : "object" == typeof exports ? module.exports = factory(require("../inputmask")) : factory(window.Inputmask);
}(function(Inputmask) {
return Inputmask.extendAliases({
phonenl: {
alias: "abstractphone",
countrycode: "31",
phoneCodes: [ {
mask: "+31-10-###-####",
cc: "NL",
cd: "Netherlands",
city: "Rotterdam"
}, {
mask: "+31-111-###-###",
cc: "NL",
cd: "Netherlands",
city: "Zierikzee"
}, {
mask: "+31-113-###-###",
cc: "NL",
cd: "Netherlands",
city: "Goes"
}, {
mask: "+31-114-###-###",
cc: "NL",
cd: "Netherlands",
city: "Hulst"
}, {
mask: "+31-115-###-###",
cc: "NL",
cd: "Netherlands",
city: "Terneuzen"
}, {
mask: "+31-117-###-###",
cc: "NL",
cd: "Netherlands",
city: "Oostburg"
}, {
mask: "+31-118-###-###",
cc: "NL",
cd: "Netherlands",
city: "Middelburg"
}, {
mask: "+31-13-###-####",
cc: "NL",
cd: "Netherlands",
city: "Tilburg"
}, {
mask: "+31-14-###-####",
cc: "NL",
cd: "Netherlands",
city: "Intern gebruik door KPN"
}, {
mask: "+31-15-###-####",
cc: "NL",
cd: "Netherlands",
city: "Delft"
}, {
mask: "+31-161-###-###",
cc: "NL",
cd: "Netherlands",
city: "Rijen"
}, {
mask: "+31-162-###-###",
cc: "NL",
cd: "Netherlands",
city: "Oosterhout"
}, {
mask: "+31-164-###-###",
cc: "NL",
cd: "Netherlands",
city: "Bergen op Zoom"
}, {
mask: "+31-165-###-###",
cc: "NL",
cd: "Netherlands",
city: "Roosendaal"
}, {
mask: "+31-166-###-###",
cc: "NL",
cd: "Netherlands",
city: "Tholen"
}, {
mask: "+31-167-###-###",
cc: "NL",
cd: "Netherlands",
city: "Steenbergen"
}, {
mask: "+31-168-###-###",
cc: "NL",
cd: "Netherlands",
city: "Zevenbergen"
}, {
mask: "+31-172-###-###",
cc: "NL",
cd: "Netherlands",
city: "Alphen aan den Rijn"
}, {
mask: "+31-174-###-###",
cc: "NL",
cd: "Netherlands",
city: "Naaldwijk"
}, {
mask: "+31-180-###-###",
cc: "NL",
cd: "Netherlands",
city: "Krimpen aan den IJsel"
}, {
mask: "+31-181-###-###",
cc: "NL",
cd: "Netherlands",
city: "Spijkenisse"
}, {
mask: "+31-182-###-###",
cc: "NL",
cd: "Netherlands",
city: "Gouda"
}, {
mask: "+31-183-###-###",
cc: "NL",
cd: "Netherlands",
city: "Gorinchem"
}, {
mask: "+31-184-###-###",
cc: "NL",
cd: "Netherlands",
city: "Sliedrecht"
}, {
mask: "+31-186-###-###",
cc: "NL",
cd: "Netherlands",
city: "Oud-Beijerland"
}, {
mask: "+31-187-###-###",
cc: "NL",
cd: "Netherlands",
city: "Middelharnis"
}, {
mask: "+31-20-###-####",
cc: "NL",
cd: "Netherlands",
city: "Amsterdam"
}, {
mask: "+31-222-###-###",
cc: "NL",
cd: "Netherlands",
city: "Den Burg"
}, {
mask: "+31-223-###-###",
cc: "NL",
cd: "Netherlands",
city: "Den Helder"
}, {
mask: "+31-224-###-###",
cc: "NL",
cd: "Netherlands",
city: "Schagen"
}, {
mask: "+31-226-###-###",
cc: "NL",
cd: "Netherlands",
city: "Noord-Scharwoude"
}, {
mask: "+31-227-###-###",
cc: "NL",
cd: "Netherlands",
city: "Middenmeer"
}, {
mask: "+31-228-###-###",
cc: "NL",
cd: "Netherlands",
city: "Enkhuizen"
}, {
mask: "+31-229-###-###",
cc: "NL",
cd: "Netherlands",
city: "Hoorn"
}, {
mask: "+31-23-###-####",
cc: "NL",
cd: "Netherlands",
city: "Haarlem"
}, {
mask: "+31-24-###-####",
cc: "NL",
cd: "Netherlands",
city: "Nijmegen"
}, {
mask: "+31-251-###-###",
cc: "NL",
cd: "Netherlands",
city: "Beverwijk"
}, {
mask: "+31-252-###-###",
cc: "NL",
cd: "Netherlands",
city: "Hillegom"
}, {
mask: "+31-255-###-###",
cc: "NL",
cd: "Netherlands",
city: "IJmuiden"
}, {
mask: "+31-26-###-####",
cc: "NL",
cd: "Netherlands",
city: "Arnhem"
}, {
mask: "+31-294-###-###",
cc: "NL",
cd: "Netherlands",
city: "Weesp"
}, {
mask: "+31-297-###-###",
cc: "NL",
cd: "Netherlands",
city: "Uithoorn"
}, {
mask: "+31-299-###-###",
cc: "NL",
cd: "Netherlands",
city: "Purmerend"
}, {
mask: "+31-30-###-####",
cc: "NL",
cd: "Netherlands",
city: "Utrecht"
}, {
mask: "+31-313-###-###",
cc: "NL",
cd: "Netherlands",
city: "Dieren"
}, {
mask: "+31-314-###-###",
cc: "NL",
cd: "Netherlands",
city: "Doetinchem"
}, {
mask: "+31-315-###-###",
cc: "NL",
cd: "Netherlands",
city: "Terborg"
}, {
mask: "+31-316-###-###",
cc: "NL",
cd: "Netherlands",
city: "Zevenaar"
}, {
mask: "+31-317-###-###",
cc: "NL",
cd: "Netherlands",
city: "Wageningen"
}, {
mask: "+31-318-###-###",
cc: "NL",
cd: "Netherlands",
city: "Ede"
}, {
mask: "+31-320-###-###",
cc: "NL",
cd: "Netherlands",
city: "Lelystad"
}, {
mask: "+31-321-###-###",
cc: "NL",
cd: "Netherlands",
city: "Dronten"
}, {
mask: "+31-33-###-####",
cc: "NL",
cd: "Netherlands",
city: "Amersfoort"
}, {
mask: "+31-341-###-###",
cc: "NL",
cd: "Netherlands",
city: "Harderwijk"
}, {
mask: "+31-342-###-###",
cc: "NL",
cd: "Netherlands",
city: "Barneveld"
}, {
mask: "+31-343-###-###",
cc: "NL",
cd: "Netherlands",
city: "Doorn"
}, {
mask: "+31-344-###-###",
cc: "NL",
cd: "Netherlands",
city: "Tiel"
}, {
mask: "+31-294-###-###",
cc: "NL",
cd: "Netherlands",
city: "Weesp"
}, {
mask: "+31-297-###-###",
cc: "NL",
cd: "Netherlands",
city: "Uithoorn"
}, {
mask: "+31-299-###-###",
cc: "NL",
cd: "Netherlands",
city: "Purmerend"
}, {
mask: "+31-30-###-####",
cc: "NL",
cd: "Netherlands",
city: "Utrecht"
}, {
mask: "+31-313-###-###",
cc: "NL",
cd: "Netherlands",
city: "Dieren"
}, {
mask: "+31-314-###-###",
cc: "NL",
cd: "Netherlands",
city: "Doetinchem"
}, {
mask: "+31-315-###-###",
cc: "NL",
cd: "Netherlands",
city: "Terborg"
}, {
mask: "+31-316-###-###",
cc: "NL",
cd: "Netherlands",
city: "Zevenaar"
}, {
mask: "+31-317-###-###",
cc: "NL",
cd: "Netherlands",
city: "Wageningen"
}, {
mask: "+31-318-###-###",
cc: "NL",
cd: "Netherlands",
city: "Ede"
}, {
mask: "+31-320-###-###",
cc: "NL",
cd: "Netherlands",
city: "Lelystad"
}, {
mask: "+31-321-###-###",
cc: "NL",
cd: "Netherlands",
city: "Dronten"
}, {
mask: "+31-33-###-####",
cc: "NL",
cd: "Netherlands",
city: "Amersfoort"
}, {
mask: "+31-341-###-###",
cc: "NL",
cd: "Netherlands",
city: "Harderwijk"
}, {
mask: "+31-342-###-###",
cc: "NL",
cd: "Netherlands",
city: "Barneveld"
}, {
mask: "+31-343-###-###",
cc: "NL",
cd: "Netherlands",
city: "Doorn"
}, {
mask: "+31-344-###-###",
cc: "NL",
cd: "Netherlands",
city: "Tiel"
}, {
mask: "+31-345-###-###",
cc: "NL",
cd: "Netherlands",
city: "Culemborg"
}, {
mask: "+31-346-###-###",
cc: "NL",
cd: "Netherlands",
city: "Maarssen"
}, {
mask: "+31-347-###-###",
cc: "NL",
cd: "Netherlands",
city: "Vianen"
}, {
mask: "+31-348-###-###",
cc: "NL",
cd: "Netherlands",
city: "Woerden"
}, {
mask: "+31-35-###-####",
cc: "NL",
cd: "Netherlands",
city: "Hilversum"
}, {
mask: "+31-36-###-####",
cc: "NL",
cd: "Netherlands",
city: "Almere"
}, {
mask: "+31-38-###-####",
cc: "NL",
cd: "Netherlands",
city: "Zwolle"
}, {
mask: "+31-40-###-####",
cc: "NL",
cd: "Netherlands",
city: "Eindhoven"
}, {
mask: "+31-411-###-###",
cc: "NL",
cd: "Netherlands",
city: "Boxtel"
}, {
mask: "+31-412-###-###",
cc: "NL",
cd: "Netherlands",
city: "Oss"
}, {
mask: "+31-413-###-###",
cc: "NL",
cd: "Netherlands",
city: "Veghel"
}, {
mask: "+31-416-###-###",
cc: "NL",
cd: "Netherlands",
city: "Waalwijk"
}, {
mask: "+31-418-###-###",
cc: "NL",
cd: "Netherlands",
city: "Zaltbommel"
}, {
mask: "+31-43-###-####",
cc: "NL",
cd: "Netherlands",
city: "Maastricht"
}, {
mask: "+31-45-###-####",
cc: "NL",
cd: "Netherlands",
city: "Heerlen"
}, {
mask: "+31-46-###-####",
cc: "NL",
cd: "Netherlands",
city: "Sittard"
}, {
mask: "+31-475-###-###",
cc: "NL",
cd: "Netherlands",
city: "Roermond"
}, {
mask: "+31-478-###-###",
cc: "NL",
cd: "Netherlands",
city: "Venray"
}, {
mask: "+31-481-###-###",
cc: "NL",
cd: "Netherlands",
city: "Bemmel"
}, {
mask: "+31-485-###-###",
cc: "NL",
cd: "Netherlands",
city: "Cuijk"
}, {
mask: "+31-486-###-###",
cc: "NL",
cd: "Netherlands",
city: "Grave"
}, {
mask: "+31-487-###-###",
cc: "NL",
cd: "Netherlands",
city: "Druten"
}, {
mask: "+31-488-###-###",
cc: "NL",
cd: "Netherlands",
city: "Zetten"
}, {
mask: "+31-492-###-###",
cc: "NL",
cd: "Netherlands",
city: "Helmond"
}, {
mask: "+31-493-###-###",
cc: "NL",
cd: "Netherlands",
city: "Deurne"
}, {
mask: "+31-495-###-###",
cc: "NL",
cd: "Netherlands",
city: "Weert"
}, {
mask: "+31-497-###-###",
cc: "NL",
cd: "Netherlands",
city: "Eersel"
}, {
mask: "+31-499-###-###",
cc: "NL",
cd: "Netherlands",
city: "Best"
}, {
mask: "+31-50-###-####",
cc: "NL",
cd: "Netherlands",
city: "Groningen"
}, {
mask: "+31-511-###-###",
cc: "NL",
cd: "Netherlands",
city: "Feanw<6E>lden"
}, {
mask: "+31-512-###-###",
cc: "NL",
cd: "Netherlands",
city: "Drachten"
}, {
mask: "+31-513-###-###",
cc: "NL",
cd: "Netherlands",
city: "Heerenveen"
}, {
mask: "+31-514-###-###",
cc: "NL",
cd: "Netherlands",
city: "Balk"
}, {
mask: "+31-515-###-###",
cc: "NL",
cd: "Netherlands",
city: "Sneek"
}, {
mask: "+31-516-###-###",
cc: "NL",
cd: "Netherlands",
city: "Oosterwolde"
}, {
mask: "+31-517-###-###",
cc: "NL",
cd: "Netherlands",
city: "Franeker"
}, {
mask: "+31-518-###-###",
cc: "NL",
cd: "Netherlands",
city: "St Annaparochie"
}, {
mask: "+31-519-###-###",
cc: "NL",
cd: "Netherlands",
city: "Dokkum"
}, {
mask: "+31-521-###-###",
cc: "NL",
cd: "Netherlands",
city: "Steenwijk"
}, {
mask: "+31-522-###-###",
cc: "NL",
cd: "Netherlands",
city: "Meppel"
}, {
mask: "+31-523-###-###",
cc: "NL",
cd: "Netherlands",
city: "Dedemsvaart"
}, {
mask: "+31-524-###-###",
cc: "NL",
cd: "Netherlands",
city: "Coevorden"
}, {
mask: "+31-525-###-###",
cc: "NL",
cd: "Netherlands",
city: "Elburg"
}, {
mask: "+31-527-###-###",
cc: "NL",
cd: "Netherlands",
city: "Emmeloord"
}, {
mask: "+31-528-###-###",
cc: "NL",
cd: "Netherlands",
city: "Hoogeveen"
}, {
mask: "+31-529-###-###",
cc: "NL",
cd: "Netherlands",
city: "Ommen"
}, {
mask: "+31-53-###-####",
cc: "NL",
cd: "Netherlands",
city: "Enschede"
}, {
mask: "+31-541-###-###",
cc: "NL",
cd: "Netherlands",
city: "Oldenzaal"
}, {
mask: "+31-543-###-###",
cc: "NL",
cd: "Netherlands",
city: "Winterswijk"
}, {
mask: "+31-544-###-###",
cc: "NL",
cd: "Netherlands",
city: "Groenlo"
}, {
mask: "+31-545-###-###",
cc: "NL",
cd: "Netherlands",
city: "Neede"
}, {
mask: "+31-546-###-###",
cc: "NL",
cd: "Netherlands",
city: "Almelo"
}, {
mask: "+31-547-###-###",
cc: "NL",
cd: "Netherlands",
city: "Goor"
}, {
mask: "+31-548-###-###",
cc: "NL",
cd: "Netherlands",
city: "Rijssen"
}, {
mask: "+31-55-###-####",
cc: "NL",
cd: "Netherlands",
city: "Apeldoorn"
}, {
mask: "+31-561-###-###",
cc: "NL",
cd: "Netherlands",
city: "Wolvega"
}, {
mask: "+31-562-###-###",
cc: "NL",
cd: "Netherlands",
city: "West-Terschelling"
}, {
mask: "+31-566-###-###",
cc: "NL",
cd: "Netherlands",
city: "Jirnsum"
}, {
mask: "+31-570-###-###",
cc: "NL",
cd: "Netherlands",
city: "Deventer"
}, {
mask: "+31-571-###-###",
cc: "NL",
cd: "Netherlands",
city: "Twello"
}, {
mask: "+31-572-###-###",
cc: "NL",
cd: "Netherlands",
city: "Raalte"
}, {
mask: "+31-573-###-###",
cc: "NL",
cd: "Netherlands",
city: "Lochem"
}, {
mask: "+31-575-###-###",
cc: "NL",
cd: "Netherlands",
city: "Zutphen"
}, {
mask: "+31-577-###-###",
cc: "NL",
cd: "Netherlands",
city: "Uddel"
}, {
mask: "+31-578-###-###",
cc: "NL",
cd: "Netherlands",
city: "Epe"
}, {
mask: "+31-58-###-####",
cc: "NL",
cd: "Netherlands",
city: "Leeuwarden"
}, {
mask: "+31-591-###-###",
cc: "NL",
cd: "Netherlands",
city: "Emmen"
}, {
mask: "+31-592-###-###",
cc: "NL",
cd: "Netherlands",
city: "Assen"
}, {
mask: "+31-593-###-###",
cc: "NL",
cd: "Netherlands",
city: "Beilen"
}, {
mask: "+31-594-###-###",
cc: "NL",
cd: "Netherlands",
city: "Zuidhorn"
}, {
mask: "+31-595-###-###",
cc: "NL",
cd: "Netherlands",
city: "Warffum"
}, {
mask: "+31-596-###-###",
cc: "NL",
cd: "Netherlands",
city: "Appingedam"
}, {
mask: "+31-597-###-###",
cc: "NL",
cd: "Netherlands",
city: "Winschoten"
}, {
mask: "+31-598-###-###",
cc: "NL",
cd: "Netherlands",
city: "Hoogezand"
}, {
mask: "+31-599-###-###",
cc: "NL",
cd: "Netherlands",
city: "Stadskanaal"
}, {
mask: "+31-70-###-####",
cc: "NL",
cd: "Netherlands",
city: "Den Haag"
}, {
mask: "+31-71-###-####",
cc: "NL",
cd: "Netherlands",
city: "Leiden"
}, {
mask: "+31-72-###-####",
cc: "NL",
cd: "Netherlands",
city: "Alkmaar"
}, {
mask: "+31-73-###-####",
cc: "NL",
cd: "Netherlands",
city: "'s-Hertogenbosch"
}, {
mask: "+31-74-###-####",
cc: "NL",
cd: "Netherlands",
city: "Hengelo"
}, {
mask: "+31-75-###-####",
cc: "NL",
cd: "Netherlands",
city: "Zaandam"
}, {
mask: "+31-76-###-####",
cc: "NL",
cd: "Netherlands",
city: "Breda"
}, {
mask: "+31-77-###-####",
cc: "NL",
cd: "Netherlands",
city: "Venlo"
}, {
mask: "+31-78-###-####",
cc: "NL",
cd: "Netherlands",
city: "Dordrecht"
}, {
mask: "+31-79-###-####",
cc: "NL",
cd: "Netherlands",
city: "Zoetermeer"
}, {
mask: "+31-61-###-####",
cc: "NL",
cd: "Netherlands",
city: "Mobiele nummers"
}, {
mask: "+31-62-###-####",
cc: "NL",
cd: "Netherlands",
city: "Mobiele nummers"
}, {
mask: "+31-63-###-####",
cc: "NL",
cd: "Netherlands",
city: "Mobiele nummers"
}, {
mask: "+31-64-###-####",
cc: "NL",
cd: "Netherlands",
city: "Mobiele nummers"
}, {
mask: "+31-65-###-####",
cc: "NL",
cd: "Netherlands",
city: "Mobiele nummers"
}, {
mask: "+31-68-###-####",
cc: "NL",
cd: "Netherlands",
city: "Mobiele nummers"
}, {
mask: "+31-69-###-####",
cc: "NL",
cd: "Netherlands",
city: "Mobiele nummers"
}, {
mask: "+31-66-###-####",
cc: "NL",
cd: "Netherlands",
city: "Semafonie"
}, {
mask: "+31-670-###-###",
cc: "NL",
cd: "Netherlands",
city: "Videotex"
}, {
mask: "+31-671-###-###",
cc: "NL",
cd: "Netherlands",
city: "Videotex"
}, {
mask: "+31-672-###-###",
cc: "NL",
cd: "Netherlands",
city: "Videotex"
}, {
mask: "+31-673-###-###",
cc: "NL",
cd: "Netherlands",
city: "Videotex"
}, {
mask: "+31-674-###-###",
cc: "NL",
cd: "Netherlands",
city: "Videotex"
}, {
mask: "+31-675-###-###",
cc: "NL",
cd: "Netherlands",
city: "Videotex"
}, {
mask: "+31-676-###-###",
cc: "NL",
cd: "Netherlands",
city: "Inbelnummers van internetproviders"
}, {
mask: "+31-800-###-###",
cc: "NL",
cd: "Netherlands",
city: "Gratis informatienummers"
}, {
mask: "+31-82-###-####",
cc: "NL",
cd: "Netherlands",
city: "Virtual Private Network"
}, {
mask: "+31-88-###-####",
cc: "NL",
cd: "Netherlands",
city: "Bedrijfsnummers"
}, {
mask: "+31-900-###-###",
cc: "NL",
cd: "Netherlands",
city: "Betaalde informatienummers"
}, {
mask: "+31-906-###-###",
cc: "NL",
cd: "Netherlands",
city: "Betaalde informatienummers"
}, {
mask: "+31-909-###-###",
cc: "NL",
cd: "Netherlands",
city: "Betaalde informatienummers"
}, {
mask: "+31-91-###-####",
cc: "NL",
cd: "Netherlands",
city: "Plaatsonafhankelijk netnummer, geschikt voor beeldtelefonie of lijnen met verhoogde kwaliteit"
} ]
}
}), Inputmask;
});

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,9 @@
/*!
* inputmask.extensions.min.js
* https://github.com/RobinHerbots/Inputmask
* Copyright (c) 2010 - 2017 Robin Herbots
* Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
* Version: 3.3.11
*/
!function(i){"function"==typeof define&&define.amd?define(["./dependencyLibs/inputmask.dependencyLib","./inputmask"],i):"object"==typeof exports?module.exports=i(require("./dependencyLibs/inputmask.dependencyLib"),require("./inputmask")):i(window.dependencyLib||jQuery,window.Inputmask)}(function(i,n){return n.extendDefinitions({A:{validator:"[A-Za-zА-яЁёÀ-ÿµ]",cardinality:1,casing:"upper"},"&":{validator:"[0-9A-Za-zА-яЁёÀ-ÿµ]",cardinality:1,casing:"upper"},"#":{validator:"[0-9A-Fa-f]",cardinality:1,casing:"upper"}}),n.extendAliases({url:{definitions:{i:{validator:".",cardinality:1}},mask:"(\\http://)|(\\http\\s://)|(ftp://)|(ftp\\s://)i{+}",insertMode:!1,autoUnmask:!1,inputmode:"url"},ip:{mask:"i[i[i]].i[i[i]].i[i[i]].i[i[i]]",definitions:{i:{validator:function(i,n,e,a,t){return e-1>-1&&"."!==n.buffer[e-1]?(i=n.buffer[e-1]+i,i=e-2>-1&&"."!==n.buffer[e-2]?n.buffer[e-2]+i:"0"+i):i="00"+i,new RegExp("25[0-5]|2[0-4][0-9]|[01][0-9][0-9]").test(i)},cardinality:1}},onUnMask:function(i,n,e){return i},inputmode:"numeric"},email:{mask:"*{1,64}[.*{1,64}][.*{1,64}][.*{1,63}]@-{1,63}.-{1,63}[.-{1,63}][.-{1,63}]",greedy:!1,onBeforePaste:function(i,n){return(i=i.toLowerCase()).replace("mailto:","")},definitions:{"*":{validator:"[0-9A-Za-z!#$%&'*+/=?^_`{|}~-]",cardinality:1,casing:"lower"},"-":{validator:"[0-9A-Za-z-]",cardinality:1,casing:"lower"}},onUnMask:function(i,n,e){return i},inputmode:"email"},mac:{mask:"##:##:##:##:##:##"},vin:{mask:"V{13}9{4}",definitions:{V:{validator:"[A-HJ-NPR-Za-hj-npr-z\\d]",cardinality:1,casing:"upper"}},clearIncomplete:!0,autoUnmask:!0}}),n});

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,9 @@
/*!
* inputmask.phone.extensions.min.js
* https://github.com/RobinHerbots/Inputmask
* Copyright (c) 2010 - 2017 Robin Herbots
* Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
* Version: 3.3.11
*/
!function(e){"function"==typeof define&&define.amd?define(["./dependencyLibs/inputmask.dependencyLib","./inputmask"],e):"object"==typeof exports?module.exports=e(require("./dependencyLibs/inputmask.dependencyLib"),require("./inputmask")):e(window.dependencyLib||jQuery,window.Inputmask)}(function(e,r){function n(e,r){var n=(e.mask||e).replace(/#/g,"9").replace(/\)/,"9").replace(/[+()#-]/g,""),t=(r.mask||r).replace(/#/g,"9").replace(/\)/,"9").replace(/[+()#-]/g,""),a=(e.mask||e).split("#")[0],o=(r.mask||r).split("#")[0];return 0===o.indexOf(a)?-1:0===a.indexOf(o)?1:n.localeCompare(t)}var t=r.prototype.analyseMask;return r.prototype.analyseMask=function(r,n,a){function o(e,n,t){n=n||"",t=t||s,""!==n&&(t[n]={});for(var a="",p=t[n]||t,i=e.length-1;i>=0;i--)p[a=(r=e[i].mask||e[i]).substr(0,1)]=p[a]||[],p[a].unshift(r.substr(1)),e.splice(i,1);for(var u in p)p[u].length>500&&o(p[u].slice(),u,p)}function p(r){var n="",t=[];for(var o in r)e.isArray(r[o])?1===r[o].length?t.push(o+r[o]):t.push(o+a.groupmarker.start+r[o].join(a.groupmarker.end+a.alternatormarker+a.groupmarker.start)+a.groupmarker.end):t.push(o+p(r[o]));return 1===t.length?n+=t[0]:n+=a.groupmarker.start+t.join(a.groupmarker.end+a.alternatormarker+a.groupmarker.start)+a.groupmarker.end,n}var s={};return a.phoneCodes&&(a.phoneCodes&&a.phoneCodes.length>1e3&&(o((r=r.substr(1,r.length-2)).split(a.groupmarker.end+a.alternatormarker+a.groupmarker.start)),r=p(s)),r=r.replace(/9/g,"\\9")),t.call(this,r,n,a)},r.extendAliases({abstractphone:{groupmarker:{start:"<",end:">"},countrycode:"",phoneCodes:[],mask:function(e){return e.definitions={"#":r.prototype.definitions[9]},e.phoneCodes.sort(n)},keepStatic:!0,onBeforeMask:function(e,r){var n=e.replace(/^0{1,2}/,"").replace(/[\s]/g,"");return(n.indexOf(r.countrycode)>1||-1===n.indexOf(r.countrycode))&&(n="+"+r.countrycode+n),n},onUnMask:function(e,r,n){return e.replace(/[()#-]/g,"")},inputmode:"tel"}}),r});

View File

@@ -0,0 +1,9 @@
/*!
* inputmask.regex.extensions.min.js
* https://github.com/RobinHerbots/Inputmask
* Copyright (c) 2010 - 2017 Robin Herbots
* Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
* Version: 3.3.11
*/
!function(e){"function"==typeof define&&define.amd?define(["./dependencyLibs/inputmask.dependencyLib","./inputmask"],e):"object"==typeof exports?module.exports=e(require("./dependencyLibs/inputmask.dependencyLib"),require("./inputmask")):e(window.dependencyLib||jQuery,window.Inputmask)}(function(e,r){return r.extendAliases({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(e,r){return new RegExp(r.regex,r.casing?"i":"").test(e.join(""))},definitions:{r:{validator:function(r,t,a,i,n){function s(e,r){this.matches=[],this.isGroup=e||!1,this.isQuantifier=r||!1,this.quantifier={min:1,max:1},this.repeaterPart=void 0}function u(r,t){var a=!1;t&&(f+="(",l++);for(var i=0;i<r.matches.length;i++){var s=r.matches[i];if(!0===s.isGroup)a=u(s,!0);else if(!0===s.isQuantifier){var h=e.inArray(s,r.matches),c=r.matches[h-1],o=f;if(isNaN(s.quantifier.max)){for(;s.repeaterPart&&s.repeaterPart!==f&&s.repeaterPart.length>f.length&&!(a=u(c,!0)););(a=a||u(c,!0))&&(s.repeaterPart=f),f=o+s.quantifier.max}else{for(var m=0,g=s.quantifier.max-1;m<g&&!(a=u(c,!0));m++);f=o+"{"+s.quantifier.min+","+s.quantifier.max+"}"}}else if(void 0!==s.matches)for(var d=0;d<s.length&&!(a=u(s[d],t));d++);else{var x;if("["==s.charAt(0)){x=f,x+=s;for(b=0;b<l;b++)x+=")";a=(w=new RegExp("^("+x+")$",n.casing?"i":"")).test(p)}else for(var k=0,v=s.length;k<v;k++)if("\\"!==s.charAt(k)){x=f,x=(x+=s.substr(0,k+1)).replace(/\|$/,"");for(var b=0;b<l;b++)x+=")";var w=new RegExp("^("+x+")$",n.casing?"i":"");if(a=w.test(p))break}f+=s}if(a)break}return t&&(f+=")",l--),a}var p,h,c=t.buffer.slice(),f="",o=!1,l=0;null===n.regexTokens&&function(){var e,r,t=new s,a=[];for(n.regexTokens=[];e=n.tokenizer.exec(n.regex);)switch((r=e[0]).charAt(0)){case"(":a.push(new s(!0));break;case")":h=a.pop(),a.length>0?a[a.length-1].matches.push(h):t.matches.push(h);break;case"{":case"+":case"*":var i=new s(!1,!0),u=(r=r.replace(/[{}]/g,"")).split(","),p=isNaN(u[0])?u[0]:parseInt(u[0]),c=1===u.length?p:isNaN(u[1])?u[1]:parseInt(u[1]);if(i.quantifier={min:p,max:c},a.length>0){var f=a[a.length-1].matches;(e=f.pop()).isGroup||((h=new s(!0)).matches.push(e),e=h),f.push(e),f.push(i)}else(e=t.matches.pop()).isGroup||((h=new s(!0)).matches.push(e),e=h),t.matches.push(e),t.matches.push(i);break;default:a.length>0?a[a.length-1].matches.push(r):t.matches.push(r)}t.matches.length>0&&n.regexTokens.push(t)}(),c.splice(a,0,r),p=c.join("");for(var m=0;m<n.regexTokens.length;m++){var g=n.regexTokens[m];if(o=u(g,g.isGroup))break}return o},cardinality:1}}}}),r});

View File

@@ -0,0 +1,9 @@
/*!
* jquery.inputmask.min.js
* https://github.com/RobinHerbots/Inputmask
* Copyright (c) 2010 - 2017 Robin Herbots
* Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
* Version: 3.3.11
*/
!function(t){"function"==typeof define&&define.amd?define(["jquery","./inputmask"],t):"object"==typeof exports?module.exports=t(require("jquery"),require("./inputmask")):t(jQuery,window.Inputmask)}(function(t,e){return void 0===t.fn.inputmask&&(t.fn.inputmask=function(i,n){var a,s=this[0];if(void 0===n&&(n={}),"string"==typeof i)switch(i){case"unmaskedvalue":return s&&s.inputmask?s.inputmask.unmaskedvalue():t(s).val();case"remove":return this.each(function(){this.inputmask&&this.inputmask.remove()});case"getemptymask":return s&&s.inputmask?s.inputmask.getemptymask():"";case"hasMaskedValue":return!(!s||!s.inputmask)&&s.inputmask.hasMaskedValue();case"isComplete":return!s||!s.inputmask||s.inputmask.isComplete();case"getmetadata":return s&&s.inputmask?s.inputmask.getmetadata():void 0;case"setvalue":t(s).val(n),s&&void 0===s.inputmask&&t(s).triggerHandler("setvalue");break;case"option":if("string"!=typeof n)return this.each(function(){if(void 0!==this.inputmask)return this.inputmask.option(n)});if(s&&void 0!==s.inputmask)return s.inputmask.option(n);break;default:return n.alias=i,a=new e(n),this.each(function(){a.mask(this)})}else{if("object"==typeof i)return a=new e(i),void 0===i.mask&&void 0===i.alias?this.each(function(){if(void 0!==this.inputmask)return this.inputmask.option(i);a.mask(this)}):this.each(function(){a.mask(this)});if(void 0===i)return this.each(function(){(a=new e(n)).mask(this)})}}),t.fn.inputmask});

File diff suppressed because one or more lines are too long