Initial import of Recruitment-HC source code
This commit is contained in:
commit
9107ffb158
18456 files changed
+2881918
No files matched your search
+58
@@ -0,0 +1,58 @@
|
||||
{
|
||||
"name": "inputmask",
|
||||
"version": "3.3.8",
|
||||
"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.8",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "3.3.8",
|
||||
"commit": "42025d8755c734a5f9ed18647e218aa0ba95ddc6"
|
||||
},
|
||||
"_source": "https://github.com/RobinHerbots/jquery.inputmask.git",
|
||||
"_target": "^3.3.7",
|
||||
"_originalSource": "jquery.inputmask"
|
||||
}
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
{
|
||||
"name": "inputmask",
|
||||
"version": "3.3.8",
|
||||
"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"
|
||||
}
|
||||
@@ -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.8
|
||||
*/
|
||||
|
||||
!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);
|
||||
});
|
||||
});
|
||||
});
|
||||
Vendored
+62
@@ -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.8
|
||||
*/
|
||||
|
||||
!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],
|
||||
copy = options[name], target !== copy && (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, isArray = isArraylike(elems), ret = [];
|
||||
if (isArray) 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, $;
|
||||
});
|
||||
Vendored
+13
@@ -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.8
|
||||
*/
|
||||
|
||||
!function(factory) {
|
||||
"function" == typeof define && define.amd ? define([ "jquery" ], factory) : "object" == typeof exports ? module.exports = factory(require("jquery")) : window.dependencyLib = factory(jQuery);
|
||||
}(function($) {
|
||||
return $;
|
||||
});
|
||||
+133
@@ -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.8
|
||||
*/
|
||||
|
||||
!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("."), ev = nsEvent[0], namespace = nsEvent[1] || "global";
|
||||
!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);
|
||||
}(ev, namespace);
|
||||
}
|
||||
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"), evnt.initCustomEvent(ev, params.bubbles, params.cancelable, params.detail);
|
||||
}
|
||||
events.type && DependencyLib.extend(evnt, events), elem.dispatchEvent(evnt);
|
||||
} else evnt = document.createEventObject(), evnt.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],
|
||||
copy = options[name], target !== copy && (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, isArray = isArraylike(elems), ret = [];
|
||||
if (isArray) 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;
|
||||
});
|
||||
@@ -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.8
|
||||
*/
|
||||
|
||||
"function" == typeof define && define.amd ? define(function() {
|
||||
return document;
|
||||
}) : "object" == typeof exports && (module.exports = document);
|
||||
@@ -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.8
|
||||
*/
|
||||
|
||||
"function" == typeof define && define.amd ? define(function() {
|
||||
return window;
|
||||
}) : "object" == typeof exports && (module.exports = window);
|
||||
@@ -0,0 +1,490 @@
|
||||
/*!
|
||||
* 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.8
|
||||
*/
|
||||
|
||||
!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) {
|
||||
if ("3" == chrs.charAt(0)) {
|
||||
if (new RegExp("[2-9]").test(chrs.charAt(1))) return chrs = "30", maskset.buffer[pos] = "0",
|
||||
pos++, {
|
||||
pos: pos
|
||||
};
|
||||
}
|
||||
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 (!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);
|
||||
if (-1 !== frontValue.indexOf(opts.placeholder[0]) && (frontValue = "01" + opts.separator),
|
||||
"1" == chrs.charAt(0)) {
|
||||
if (new RegExp("[3-9]").test(chrs.charAt(1))) return chrs = "10", maskset.buffer[pos] = "0",
|
||||
pos++, {
|
||||
pos: pos
|
||||
};
|
||||
}
|
||||
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 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, tmp < 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;
|
||||
});
|
||||
@@ -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.8
|
||||
*/
|
||||
|
||||
!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\u0410-\u044f\u0401\u0451\xc0-\xff\xb5]",
|
||||
cardinality: 1,
|
||||
casing: "upper"
|
||||
},
|
||||
"&": {
|
||||
validator: "[0-9A-Za-z\u0410-\u044f\u0401\u0451\xc0-\xff\xb5]",
|
||||
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(), pastedValue.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
+347
@@ -0,0 +1,347 @@
|
||||
/*!
|
||||
* 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.8
|
||||
*/
|
||||
|
||||
!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 && (caretPos += 1, charAtPos = maskedValue[caretPos]),
|
||||
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),
|
||||
caretPos > -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("");
|
||||
processValue = processValue.replace(new RegExp("[-" + Inputmask.escapeRegex(opts.negationSymbol.front) + "]", "g"), ""),
|
||||
processValue = processValue.replace(new RegExp(Inputmask.escapeRegex(opts.negationSymbol.back) + "$"), "");
|
||||
var pvRadixSplit = processValue.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);
|
||||
processValue = processValue.replace(bufferTemplate, ""), processValue = processValue.split(""),
|
||||
isValid = processValue[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 (dotMatches && kommaMatches ? dotMatches.length > kommaMatches.length ? (initialValue = initialValue.replace(/\./g, ""),
|
||||
initialValue = initialValue.replace(",", opts.radixPoint)) : kommaMatches.length > dotMatches.length ? (initialValue = initialValue.replace(/,/g, ""),
|
||||
initialValue = initialValue.replace(".", opts.radixPoint)) : initialValue = initialValue.indexOf(".") < initialValue.indexOf(",") ? initialValue.replace(/\./g, "") : initialValue.replace(/,/g, "") : initialValue = 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 valueParts = initialValue.split(opts.radixPoint), decPart = valueParts[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 = Math.round(parseFloat(initialValue) * digitsFactor) / digitsFactor,
|
||||
initialValue = initialValue.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;
|
||||
});
|
||||
@@ -0,0 +1,61 @@
|
||||
/*!
|
||||
* 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.8
|
||||
*/
|
||||
|
||||
!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--) mask = masks[i].mask || masks[i],
|
||||
variation = mask.substr(0, 1), maskGroup[variation] = 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 && (mask = mask.substr(1, mask.length - 2),
|
||||
reduceVariations(mask.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;
|
||||
});
|
||||
@@ -0,0 +1,115 @@
|
||||
/*!
|
||||
* 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.8
|
||||
*/
|
||||
|
||||
!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), isvalid && (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 (var j = 0; j < openGroupCount; j++) testExp += ")";
|
||||
var exp = new RegExp("^(" + testExp + ")$", opts.casing ? "i" : "");
|
||||
isvalid = exp.test(bufferStr);
|
||||
} else for (var l = 0, tl = matchToken.length; l < tl; l++) if ("\\" !== matchToken.charAt(l)) {
|
||||
testExp = regexPart, testExp += matchToken.substr(0, l + 1), testExp = testExp.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],
|
||||
m.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);
|
||||
m = m.replace(/[{}]/g, "");
|
||||
var mq = m.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(), match.isGroup || (groupToken = new RegexToken(!0), groupToken.matches.push(match),
|
||||
match = groupToken), matches.push(match), matches.push(quantifierToken);
|
||||
} else match = currentToken.matches.pop(), match.isGroup || (groupToken = new RegexToken(!0),
|
||||
groupToken.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;
|
||||
});
|
||||
@@ -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.8
|
||||
*/
|
||||
|
||||
!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), nptmask.mask(this);
|
||||
});
|
||||
}
|
||||
}), $.fn.inputmask;
|
||||
});
|
||||
@@ -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.8
|
||||
*/
|
||||
|
||||
!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\xe8re"
|
||||
}, {
|
||||
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\xe8ge (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;
|
||||
});
|
||||
@@ -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.8
|
||||
*/
|
||||
|
||||
!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\ufffdlden"
|
||||
}, {
|
||||
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
+9
@@ -0,0 +1,9 @@
|
||||
/*!
|
||||
* inputmask.date.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.8
|
||||
*/
|
||||
|
||||
!function(a){"function"==typeof define&&define.amd?define(["./dependencyLibs/inputmask.dependencyLib","./inputmask"],a):"object"==typeof exports?module.exports=a(require("./dependencyLibs/inputmask.dependencyLib"),require("./inputmask")):a(window.dependencyLib||jQuery,window.Inputmask)}(function(a,b){function c(a){return isNaN(a)||29===new Date(a,2,0).getDate()}return b.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(a){var c=b.escapeRegex.call(this,a);return new RegExp("((0[1-9]|[12][0-9]|3[01])"+c+"[01])")},val2:function(a){var c=b.escapeRegex.call(this,a);return new RegExp("((0[1-9]|[12][0-9])"+c+"(0[1-9]|1[012]))|(30"+c+"(0[13-9]|1[012]))|(31"+c+"(0[13578]|1[02]))")}},leapday:"29/02/",separator:"/",yearrange:{minyear:1900,maxyear:2099},isInYearRange:function(a,b,c){if(isNaN(a))return!1;var d=parseInt(a.concat(b.toString().slice(a.length))),e=parseInt(a.concat(c.toString().slice(a.length)));return!isNaN(d)&&(b<=d&&d<=c)||!isNaN(e)&&(b<=e&&e<=c)},determinebaseyear:function(a,b,c){var d=(new Date).getFullYear();if(a>d)return a;if(b<d){for(var e=b.toString().slice(0,2),f=b.toString().slice(2,4);b<e+c;)e--;var g=e+f;return a>g?a:g}if(a<=d&&d<=b){for(var h=d.toString().slice(0,2);b<h+c;)h--;var i=h+c;return i<a?a:i}return d},onKeyDown:function(c,d,e,f){var g=a(this);if(c.ctrlKey&&c.keyCode===b.keyCode.RIGHT){var h=new Date;g.val(h.getDate().toString()+(h.getMonth()+1).toString()+h.getFullYear().toString()),g.trigger("setvalue")}},getFrontValue:function(a,b,c){for(var d=0,e=0,f=0;f<a.length&&"2"!==a.charAt(f);f++){var g=c.definitions[a.charAt(f)];g?(d+=e,e=g.cardinality):e++}return b.join("").substr(d,e)},postValidation:function(a,b,d){var e,f,g=a.join("");return 0===d.mask.indexOf("y")?(f=g.substr(0,4),e=g.substring(4,10)):(f=g.substring(6,10),e=g.substr(0,6)),b&&(e!==d.leapday||c(f))},definitions:{1:{validator:function(a,b,c,d,e){if("3"==a.charAt(0)){if(new RegExp("[2-9]").test(a.charAt(1)))return a="30",b.buffer[c]="0",c++,{pos:c}}var f=e.regex.val1.test(a);return d||f||a.charAt(1)!==e.separator&&-1==="-./".indexOf(a.charAt(1))||!(f=e.regex.val1.test("0"+a.charAt(0)))?f:(b.buffer[c-1]="0",{refreshFromBuffer:{start:c-1,end:c},pos:c,c:a.charAt(0)})},cardinality:2,prevalidator:[{validator:function(a,b,c,d,e){var f=a;isNaN(b.buffer[c+1])||(f+=b.buffer[c+1]);var g=1===f.length?e.regex.val1pre.test(f):e.regex.val1.test(f);if(!d&&!g){if(g=e.regex.val1.test(a+"0"))return b.buffer[c]=a,b.buffer[++c]="0",{pos:c,c:"0"};if(g=e.regex.val1.test("0"+a))return b.buffer[c]="0",c++,{pos:c}}return g},cardinality:1}]},2:{validator:function(a,b,c,d,e){var f=e.getFrontValue(b.mask,b.buffer,e);if(-1!==f.indexOf(e.placeholder[0])&&(f="01"+e.separator),"1"==a.charAt(0)){if(new RegExp("[3-9]").test(a.charAt(1)))return a="10",b.buffer[c]="0",c++,{pos:c}}var g=e.regex.val2(e.separator).test(f+a);return d||g||a.charAt(1)!==e.separator&&-1==="-./".indexOf(a.charAt(1))||!(g=e.regex.val2(e.separator).test(f+"0"+a.charAt(0)))?g:(b.buffer[c-1]="0",{refreshFromBuffer:{start:c-1,end:c},pos:c,c:a.charAt(0)})},cardinality:2,prevalidator:[{validator:function(a,b,c,d,e){isNaN(b.buffer[c+1])||(a+=b.buffer[c+1]);var f=e.getFrontValue(b.mask,b.buffer,e);-1!==f.indexOf(e.placeholder[0])&&(f="01"+e.separator);var g=1===a.length?e.regex.val2pre(e.separator).test(f+a):e.regex.val2(e.separator).test(f+a);return d||g||!(g=e.regex.val2(e.separator).test(f+"0"+a))?g:(b.buffer[c]="0",c++,{pos:c})},cardinality:1}]},y:{validator:function(a,b,c,d,e){return e.isInYearRange(a,e.yearrange.minyear,e.yearrange.maxyear)},cardinality:4,prevalidator:[{validator:function(a,b,c,d,e){var f=e.isInYearRange(a,e.yearrange.minyear,e.yearrange.maxyear);if(!d&&!f){var g=e.determinebaseyear(e.yearrange.minyear,e.yearrange.maxyear,a+"0").toString().slice(0,1);if(f=e.isInYearRange(g+a,e.yearrange.minyear,e.yearrange.maxyear))return b.buffer[c++]=g.charAt(0),{pos:c};if(g=e.determinebaseyear(e.yearrange.minyear,e.yearrange.maxyear,a+"0").toString().slice(0,2),f=e.isInYearRange(g+a,e.yearrange.minyear,e.yearrange.maxyear))return b.buffer[c++]=g.charAt(0),b.buffer[c++]=g.charAt(1),{pos:c}}return f},cardinality:1},{validator:function(a,b,c,d,e){var f=e.isInYearRange(a,e.yearrange.minyear,e.yearrange.maxyear);if(!d&&!f){var g=e.determinebaseyear(e.yearrange.minyear,e.yearrange.maxyear,a).toString().slice(0,2);if(f=e.isInYearRange(a[0]+g[1]+a[1],e.yearrange.minyear,e.yearrange.maxyear))return b.buffer[c++]=g.charAt(1),{pos:c};if(g=e.determinebaseyear(e.yearrange.minyear,e.yearrange.maxyear,a).toString().slice(0,2),f=e.isInYearRange(g+a,e.yearrange.minyear,e.yearrange.maxyear))return b.buffer[c-1]=g.charAt(0),b.buffer[c++]=g.charAt(1),b.buffer[c++]=a.charAt(0),{refreshFromBuffer:{start:c-3,end:c},pos:c}}return f},cardinality:2},{validator:function(a,b,c,d,e){return e.isInYearRange(a,e.yearrange.minyear,e.yearrange.maxyear)},cardinality:3}]}},insertMode:!1,autoUnmask:!1},"mm/ddLine truncated
|
||||
@@ -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.8
|
||||
*/
|
||||
|
||||
!function(a){"function"==typeof define&&define.amd?define(["./dependencyLibs/inputmask.dependencyLib","./inputmask"],a):"object"==typeof exports?module.exports=a(require("./dependencyLibs/inputmask.dependencyLib"),require("./inputmask")):a(window.dependencyLib||jQuery,window.Inputmask)}(function(a,b){return b.extendDefinitions({A:{validator:"[A-Za-z\u0410-\u044f\u0401\u0451\xc0-\xff\xb5]",cardinality:1,casing:"upper"},"&":{validator:"[0-9A-Za-z\u0410-\u044f\u0401\u0451\xc0-\xff\xb5]",cardinality:1,casing:"upper"},"#":{validator:"[0-9A-Fa-f]",cardinality:1,casing:"upper"}}),b.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(a,b,c,d,e){return c-1>-1&&"."!==b.buffer[c-1]?(a=b.buffer[c-1]+a,a=c-2>-1&&"."!==b.buffer[c-2]?b.buffer[c-2]+a:"0"+a):a="00"+a,new RegExp("25[0-5]|2[0-4][0-9]|[01][0-9][0-9]").test(a)},cardinality:1}},onUnMask:function(a,b,c){return a},inputmode:"numeric"},email:{mask:"*{1,64}[.*{1,64}][.*{1,64}][.*{1,63}]@-{1,63}.-{1,63}[.-{1,63}][.-{1,63}]",greedy:!1,onBeforePaste:function(a,b){return a=a.toLowerCase(),a.replace("mailto:","")},definitions:{"*":{validator:"[0-9A-Za-z!#$%&'*+/=?^_`{|}~-]",cardinality:1,casing:"lower"},"-":{validator:"[0-9A-Za-z-]",cardinality:1,casing:"lower"}},onUnMask:function(a,b,c){return a},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}}),b});
|
||||
@@ -0,0 +1,10 @@
|
||||
/*!
|
||||
* 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.8
|
||||
*/
|
||||
|
||||
!function(a){"function"==typeof define&&define.amd?define(["./dependencyLibs/inputmask.dependencyLib","./global/window","./global/document"],a):"object"==typeof exports?module.exports=a(require("./dependencyLibs/inputmask.dependencyLib"),require("./global/window"),require("./global/document")):window.Inputmask=a(window.dependencyLib||jQuery,window,document)}(function(a,b,c,d){function e(b,c,g){if(!(this instanceof e))return new e(b,c,g);this.el=d,this.events={},this.maskset=d,this.refreshValue=!1,!0!==g&&(a.isPlainObject(b)?c=b:(c=c||{},c.alias=b),this.opts=a.extend(!0,{},this.defaults,c),this.noMasksCache=c&&c.definitions!==d,this.userOptions=c||{},this.isRTL=this.opts.numericInput,f(this.opts.alias,c,this.opts))}function f(b,c,g){var h=e.prototype.aliases[b];return h?(h.alias&&f(h.alias,d,g),a.extend(!0,g,h),a.extend(!0,g,c),!0):(null===g.mask&&(g.mask=b),!1)}function g(b,c){function f(b,f,g){var h=!1;if(null!==b&&""!==b||(h=null!==g.regex,h?(b=g.regex,b=b.replace(/^(\^)(.*)(\$)$/,"$2")):(h=!0,b=".*")),1===b.length&&!1===g.greedy&&0!==g.repeat&&(g.placeholder=""),g.repeat>0||"*"===g.repeat||"+"===g.repeat){var i="*"===g.repeat?0:"+"===g.repeat?1:g.repeat;b=g.groupmarker.start+b+g.groupmarker.end+g.quantifiermarker.start+i+","+g.repeat+g.quantifiermarker.end}var j,k=h?"regex_"+g.regex:g.numericInput?b.split("").reverse().join(""):b;return e.prototype.masksCache[k]===d||!0===c?(j={mask:b,maskToken:e.prototype.analyseMask(b,h,g),validPositions:{},_buffer:d,buffer:d,tests:{},metadata:f,maskLength:d},!0!==c&&(e.prototype.masksCache[k]=j,j=a.extend(!0,{},e.prototype.masksCache[k]))):j=a.extend(!0,{},e.prototype.masksCache[k]),j}if(a.isFunction(b.mask)&&(b.mask=b.mask(b)),a.isArray(b.mask)){if(b.mask.length>1){b.keepStatic=null===b.keepStatic||b.keepStatic;var g=b.groupmarker.start;return a.each(b.numericInput?b.mask.reverse():b.mask,function(c,e){g.length>1&&(g+=b.groupmarker.end+b.alternatormarker+b.groupmarker.start),e.mask===d||a.isFunction(e.mask)?g+=e:g+=e.mask}),g+=b.groupmarker.end,f(g,b.mask,b)}b.mask=b.mask.pop()}return b.mask&&b.mask.mask!==d&&!a.isFunction(b.mask.mask)?f(b.mask.mask,b.mask,b):f(b.mask,b.mask,b)}function h(f,g,i){function n(a,b,c){b=b||0;var e,f,g,h=[],j=0,k=q();do{!0===a&&o().validPositions[j]?(g=o().validPositions[j],f=g.match,e=g.locator.slice(),h.push(!0===c?g.input:!1===c?f.nativeDef:I(j,f))):(g=t(j,e,j-1),f=g.match,e=g.locator.slice(),(!1===i.jitMasking||j<k||"number"==typeof i.jitMasking&&isFinite(i.jitMasking)&&i.jitMasking>j)&&h.push(!1===c?f.nativeDef:I(j,f))),j++}while((U===d||j<U)&&(null!==f.fn||""!==f.def)||b>j);return""===h[h.length-1]&&h.pop(),o().maskLength=j+1,h}function o(){return g}function p(a){var b=o();b.buffer=d,!0!==a&&(b.validPositions={},b.p=0)}function q(a,b,c){var e=-1,f=-1,g=c||o().validPositions;a===d&&(a=-1);for(var h in g){var i=parseInt(h);g[i]&&(b||!0!==g[i].generatedInput)&&(i<=a&&(e=i),i>=a&&(f=i))}return-1!==e&&a-e>1||f<a?e:f}function r(b,c,e,f){var g,h=b,j=a.extend(!0,{},o().validPositions),k=!1;for(o().p=b,g=c-1;g>=h;g--)o().validPositions[g]!==d&&(!0!==e&&(!o().validPositions[g].match.optionality&&function(a){var b=o().validPositions[a];if(b!==d&&null===b.match.fn){var c=o().validPositions[a-1],e=o().validPositions[a+1];return c!==d&&e!==d}return!1}(g)||!1===i.canClearPosition(o(),g,q(),f,i))||delete o().validPositions[g]);for(p(!0),g=h+1;g<=q();){for(;o().validPositions[h]!==d;)h++;if(g<h&&(g=h+1),o().validPositions[g]===d&&D(g))g++;else{var l=t(g);!1===k&&j[h]&&j[h].match.def===l.match.def?(o().validPositions[h]=a.extend(!0,{},j[h]),o().validPositions[h].input=l.input,delete o().validPositions[g],g++):v(h,l.match.def)?!1!==C(h,l.input||I(g),!0)&&(delete o().validPositions[g],g++,k=!0):D(g)||(g++,h--),h++}}p(!0)}function s(a,b){for(var c,e=a,f=q(),g=o().validPositions[f]||w(0)[0],h=g.alternation!==d?g.locator[g.alternation].toString().split(","):[],j=0;j<e.length&&(c=e[j],!(c.match&&(i.greedy&&!0!==c.match.optionalQuantifier||(!1===c.match.optionality||!1===c.match.newBlockMarker)&&!0!==c.match.optionalQuantifier)&&(g.alternation===d||g.alternation!==c.alternation||c.locator[g.alternation]!==d&&B(c.locator[g.alternation].toString().split(","),h)))||!0===b&&(null!==c.match.fn||/[0-9a-bA-Z]/.test(c.match.def)));j++);return c}function t(a,b,c){return o().validPositions[a]||s(w(a,b?b.slice():b,c))}function u(a){return o().validPositions[a]?o().validPositions[a]:w(a)[0]}function v(a,b){for(var c=!1,d=w(a),e=0;e<d.length;e++)if(d[e].match&&d[e].match.def===b){c=!0;break}return c}function w(b,c,e){function f(c,e,g,j){function l(g,j,q){function r(b,c){var d=0===a.inArray(b,c.matches);return d||a.each(c.matches,function(a,e){if(!0===e.isQuantifier&&(d=r(b,c.matches[a-1])))return!1}),d}function s(b,c,e){var f,g;if(o().validPositions[b-1]&&e&&o().tests[b])for(var h=o().validPositions[b-1].locator,i=o().tests[b][0].locator,j=0;j<e;j++)if(h[j]!==i[j])return h.slice(e+1);return(o().tests[b]||o().validPositions[b])&&a.each(o().tests[b]||[o().validPositions[bLine truncated
|
||||
b.keyCode=e.keyCode.DELETE,ca.keydownEvent.call(c,b)),b.preventDefault()}},setValueEvent:function(b){this.inputmask.refreshValue=!1;var c=this,d=c.inputmask._valueGet(!0);a.isFunction(i.onBeforeMask)&&(d=i.onBeforeMask.call(W,d,i)||d),d=d.split(""),J(c,!0,!1,Y?d.reverse():d),S=y().join(""),(i.clearMaskOnLostFocus||i.clearIncomplete)&&c.inputmask._valueGet()===x().join("")&&c.inputmask._valueSet("")},focusEvent:function(a){var b=this,c=b.inputmask._valueGet();i.showMaskOnFocus&&(!i.showMaskOnHover||i.showMaskOnHover&&""===c)&&(b.inputmask._valueGet()!==y().join("")?H(b,y(),E(q())):!1===aa&&L(b,E(q()))),!0===i.positionCaretOnTab&&!1===aa&&""!==c&&(H(b,y(),L(b)),ca.clickEvent.apply(b,[a,!0])),S=y().join("")},mouseleaveEvent:function(a){var b=this;if(aa=!1,i.clearMaskOnLostFocus&&c.activeElement!==b){var d=y().slice(),e=b.inputmask._valueGet();e!==b.getAttribute("placeholder")&&""!==e&&(-1===q()&&e===x().join("")?d=[]:N(d),H(b,d))}},clickEvent:function(b,e){function f(b){if(""!==i.radixPoint){var c=o().validPositions;if(c[b]===d||c[b].input===I(b)){if(b<E(-1))return!0;var e=a.inArray(i.radixPoint,y());if(-1!==e){for(var f in c)if(e<f&&c[f].input!==I(f))return!1;return!0}}}return!1}var g=this;setTimeout(function(){if(c.activeElement===g){var a=L(g);if(e&&(Y?a.end=a.begin:a.begin=a.end),a.begin===a.end)switch(i.positionCaretOnClick){case"none":break;case"radixFocus":if(f(a.begin)){var b=y().join("").indexOf(i.radixPoint);L(g,i.numericInput?E(b):b);break}default:var h=a.begin,j=q(h,!0),k=E(j);if(h<k)L(g,D(h,!0)||D(h-1,!0)?h:E(h));else{var l=o().validPositions[j],m=t(k,l?l.match.locator:d,l),n=I(k,m.match);if(""!==n&&y()[k]!==n&&!0!==m.match.optionalQuantifier&&!0!==m.match.newBlockMarker||!D(k,!0)&&m.match.def===n){var p=E(k);(h>=p||h===k)&&(k=p)}L(g,k)}}}},0)},dblclickEvent:function(a){var b=this;setTimeout(function(){L(b,0,E(q()))},0)},cutEvent:function(d){var f=this,g=a(f),h=L(f),i=d.originalEvent||d,j=b.clipboardData||i.clipboardData,k=Y?y().slice(h.end,h.begin):y().slice(h.begin,h.end);j.setData("text",Y?k.reverse().join(""):k.join("")),c.execCommand&&c.execCommand("copy"),P(f,e.keyCode.DELETE,h),H(f,y(),o().p,d,S!==y().join("")),f.inputmask._valueGet()===x().join("")&&g.trigger("cleared")},blurEvent:function(b){var c=a(this),e=this;if(e.inputmask){var f=e.inputmask._valueGet(),g=y().slice();""!==f&&(i.clearMaskOnLostFocus&&(-1===q()&&f===x().join("")?g=[]:N(g)),!1===O(g)&&(setTimeout(function(){c.trigger("incomplete")},0),i.clearIncomplete&&(p(),g=i.clearMaskOnLostFocus?[]:x().slice())),H(e,g,d,b)),S!==y().join("")&&(S=g.join(""),c.trigger("change"))}},mouseenterEvent:function(a){var b=this;aa=!0,c.activeElement!==b&&i.showMaskOnHover&&b.inputmask._valueGet()!==y().join("")&&H(b,y())},submitEvent:function(a){S!==y().join("")&&T.trigger("change"),i.clearMaskOnLostFocus&&-1===q()&&X.inputmask._valueGet&&X.inputmask._valueGet()===x().join("")&&X.inputmask._valueSet(""),i.removeMaskOnSubmit&&(X.inputmask._valueSet(X.inputmask.unmaskedvalue(),!0),setTimeout(function(){H(X,y())},0))},resetEvent:function(a){X.inputmask.refreshValue=!0,setTimeout(function(){T.trigger("setvalue")},0)}};e.prototype.positionColorMask=function(a,b){a.style.left=b.offsetLeft+"px"};var da;if(f!==d)switch(f.action){case"isComplete":return X=f.el,O(y());case"unmaskedvalue":return X!==d&&f.value===d||(da=f.value,da=(a.isFunction(i.onBeforeMask)?i.onBeforeMask.call(W,da,i)||da:da).split(""),J(d,!1,!1,Y?da.reverse():da),a.isFunction(i.onBeforeWrite)&&i.onBeforeWrite.call(W,d,y(),0,i)),K(X);case"mask":!function(b){ba.off(b);var e=function(b,e){var f=b.getAttribute("type"),g="INPUT"===b.tagName&&-1!==a.inArray(f,e.supportsInputType)||b.isContentEditable||"TEXTAREA"===b.tagName;if(!g)if("INPUT"===b.tagName){var h=c.createElement("input");h.setAttribute("type",f),g="text"===h.type,h=null}else g="partial";return!1!==g?function(b){function f(){return this.inputmask?this.inputmask.opts.autoUnmask?this.inputmask.unmaskedvalue():-1!==q()||!0!==e.nullable?c.activeElement===this&&e.clearMaskOnLostFocus?(Y?N(y().slice()).reverse():N(y().slice())).join(""):h.call(this):"":h.call(this)}function g(b){i.call(this,b),this.inputmask&&a(this).trigger("setvalue")}var h,i;if(!b.inputmask.__valueGet){if(!0!==e.noValuePatching){if(Object.getOwnPropertyDescriptor){"function"!=typeof Object.getPrototypeOf&&(Object.getPrototypeOf="object"==typeof"test".__proto__?function(a){return a.__proto__}:function(a){return a.constructor.prototype});var j=Object.getPrototypeOf?Object.getOwnPropertyDescriptor(Object.getPrototypeOf(b),"value"):d;j&&j.get&&j.set?(h=j.get,i=j.set,Object.defineProperty(b,"value",{get:f,set:g,configurable:!0})):"INPUT"!==b.tagName&&(h=function(){return this.textContent},i=function(a){this.textContent=a},Object.defineProperty(b,"value",{get:f,set:g,configurable:!0}))}else c.__lookupGetter__&&b.__lookupGetter__("value")&&(h=b.__lookupGetter__("value"),i=b.__lookupSetter__("value"),b.__defineGetter__("value",f),b.__defineSetter__("value",g));b.inputmask._Line truncated
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
/*!
|
||||
* inputmask.numeric.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.8
|
||||
*/
|
||||
|
||||
!function(a){"function"==typeof define&&define.amd?define(["./dependencyLibs/inputmask.dependencyLib","./inputmask"],a):"object"==typeof exports?module.exports=a(require("./dependencyLibs/inputmask.dependencyLib"),require("./inputmask")):a(window.dependencyLib||jQuery,window.Inputmask)}(function(a,b,c){function d(a,c){for(var d="",e=0;e<a.length;e++)b.prototype.definitions[a.charAt(e)]||c.definitions[a.charAt(e)]||c.optionalmarker.start===a.charAt(e)||c.optionalmarker.end===a.charAt(e)||c.quantifiermarker.start===a.charAt(e)||c.quantifiermarker.end===a.charAt(e)||c.groupmarker.start===a.charAt(e)||c.groupmarker.end===a.charAt(e)||c.alternatormarker===a.charAt(e)?d+="\\"+a.charAt(e):d+=a.charAt(e);return d}return b.extendAliases({numeric:{mask:function(a){if(0!==a.repeat&&isNaN(a.integerDigits)&&(a.integerDigits=a.repeat),a.repeat=0,a.groupSeparator===a.radixPoint&&("."===a.radixPoint?a.groupSeparator=",":","===a.radixPoint?a.groupSeparator=".":a.groupSeparator="")," "===a.groupSeparator&&(a.skipOptionalPartCharacter=c),a.autoGroup=a.autoGroup&&""!==a.groupSeparator,a.autoGroup&&("string"==typeof a.groupSize&&isFinite(a.groupSize)&&(a.groupSize=parseInt(a.groupSize)),isFinite(a.integerDigits))){var b=Math.floor(a.integerDigits/a.groupSize),e=a.integerDigits%a.groupSize;a.integerDigits=parseInt(a.integerDigits)+(0===e?b-1:b),a.integerDigits<1&&(a.integerDigits="*")}a.placeholder.length>1&&(a.placeholder=a.placeholder.charAt(0)),"radixFocus"===a.positionCaretOnClick&&""===a.placeholder&&!1===a.integerOptional&&(a.positionCaretOnClick="lvp"),a.definitions[";"]=a.definitions["~"],a.definitions[";"].definitionSymbol="~",!0===a.numericInput&&(a.positionCaretOnClick="radixFocus"===a.positionCaretOnClick?"lvp":a.positionCaretOnClick,a.digitsOptional=!1,isNaN(a.digits)&&(a.digits=2),a.decimalProtect=!1);var f="[+]";if(f+=d(a.prefix,a),!0===a.integerOptional?f+="~{1,"+a.integerDigits+"}":f+="~{"+a.integerDigits+"}",a.digits!==c){a.radixPointDefinitionSymbol=a.decimalProtect?":":a.radixPoint;var g=a.digits.toString().split(",");isFinite(g[0]&&g[1]&&isFinite(g[1]))?f+=a.radixPointDefinitionSymbol+";{"+a.digits+"}":(isNaN(a.digits)||parseInt(a.digits)>0)&&(a.digitsOptional?f+="["+a.radixPointDefinitionSymbol+";{1,"+a.digits+"}]":f+=a.radixPointDefinitionSymbol+";{"+a.digits+"}")}return f+=d(a.suffix,a),f+="[-]",a.greedy=!1,f},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(b,d,e,f,g){if("-"===e||e===g.negationSymbol.front)return!0===g.allowMinus&&(g.isNegative=g.isNegative===c||!g.isNegative,""===b.join("")||{caret:d,dopost:!0});if(!1===f&&e===g.radixPoint&&g.digits!==c&&(isNaN(g.digits)||parseInt(g.digits)>0)){var h=a.inArray(g.radixPoint,b);if(-1!==h)return!0===g.numericInput?d===h:{caret:h+1}}return!0},postValidation:function(d,e,f){var g=f.suffix.split(""),h=f.prefix.split("");if(e.pos===c&&e.caret!==c&&!0!==e.dopost)return e;var i=e.caret!==c?e.caret:e.pos,j=d.slice();f.numericInput&&(i=j.length-i-1,j=j.reverse());var k=j[i];if(k===f.groupSeparator&&(i+=1,k=j[i]),i===j.length-f.suffix.length-1&&k===f.radixPoint)return e;k!==c&&k!==f.radixPoint&&k!==f.negationSymbol.front&&k!==f.negationSymbol.back&&(j[i]="?",f.prefix.length>0&&i>=(!1===f.isNegative?1:0)&&i<f.prefix.length-1+(!1===f.isNegative?1:0)?h[i-(!1===f.isNegative?1:0)]="?":f.suffix.length>0&&i>=j.length-f.suffix.length-(!1===f.isNegative?1:0)&&(g[i-(j.length-f.suffix.length-(!1===f.isNegative?1:0))]="?")),h=h.join(""),g=g.join("");var l=j.join("").replace(h,"");if(l=l.replace(g,""),l=l.replace(new RegExp(b.escapeRegex(f.groupSeparator),"g"),""),l=l.replace(new RegExp("[-"+b.escapeRegex(f.negationSymbol.front)+"]","g"),""),l=l.replace(new RegExp(b.escapeRegex(f.negationSymbol.back)+"$"),""),isNaN(f.placeholder)&&(l=l.replace(new RegExp(b.escapeRegex(f.placeholder),"g"),"")),l.length>1&&1!==l.indexOf(f.radixPoint)&&("0"===k&&(l=l.replace(/^\?/g,"")),l=l.replace(/^0/g,"")),l.charAt(0)===f.radixPoint&&""!==f.radixPoint&&!0!==f.numericInput&&(l="0"+l),""!==l){if(l=l.split(""),(!f.digitsOptional||f.enforceDigitsOnBlur&&"blur"===e.event)&&isFinite(f.digits)){var m=a.inArray(f.radixPoint,l),n=a.inArray(f.radixPoint,j);-1===m&&(l.push(f.radixPoint),m=l.length-1);for(var o=1;o<=f.digits;o++)f.digitsOptional&&(!f.enforceDigitsOnBlur||"blur"!==e.event)||l[m+o]!==c&&l[m+o]!==f.placeholder.charAt(0)?-1!==n&&j[n+o]!==c&&(l[m+o]=l[m+o]||j[n+o]):l[m+o]=e.placeholder||f.placeholder.charAt(0)}if(!0!==f.autoGroup||""===f.groupSeparator||k===f.radixPoint&&e.pos===c&&!e.dopost)l=l.join("");else{var p=l[l.length-1]===f.radixPoint&&e.c===f.radixPoint;l=b(function(a,b){var c="";if(c+="("+b.groupSeparator+"*{"+b.groupLine truncated
|
||||
+9
@@ -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.8
|
||||
*/
|
||||
|
||||
!function(a){"function"==typeof define&&define.amd?define(["./dependencyLibs/inputmask.dependencyLib","./inputmask"],a):"object"==typeof exports?module.exports=a(require("./dependencyLibs/inputmask.dependencyLib"),require("./inputmask")):a(window.dependencyLib||jQuery,window.Inputmask)}(function(a,b){function c(a,b){var c=(a.mask||a).replace(/#/g,"9").replace(/\)/,"9").replace(/[+()#-]/g,""),d=(b.mask||b).replace(/#/g,"9").replace(/\)/,"9").replace(/[+()#-]/g,""),e=(a.mask||a).split("#")[0],f=(b.mask||b).split("#")[0];return 0===f.indexOf(e)?-1:0===e.indexOf(f)?1:c.localeCompare(d)}var d=b.prototype.analyseMask;return b.prototype.analyseMask=function(b,c,e){function f(a,c,d){c=c||"",d=d||h,""!==c&&(d[c]={});for(var e="",g=d[c]||d,i=a.length-1;i>=0;i--)b=a[i].mask||a[i],e=b.substr(0,1),g[e]=g[e]||[],g[e].unshift(b.substr(1)),a.splice(i,1);for(var j in g)g[j].length>500&&f(g[j].slice(),j,g)}function g(b){var c="",d=[];for(var f in b)a.isArray(b[f])?1===b[f].length?d.push(f+b[f]):d.push(f+e.groupmarker.start+b[f].join(e.groupmarker.end+e.alternatormarker+e.groupmarker.start)+e.groupmarker.end):d.push(f+g(b[f]));return 1===d.length?c+=d[0]:c+=e.groupmarker.start+d.join(e.groupmarker.end+e.alternatormarker+e.groupmarker.start)+e.groupmarker.end,c}var h={};return e.phoneCodes&&(e.phoneCodes&&e.phoneCodes.length>1e3&&(b=b.substr(1,b.length-2),f(b.split(e.groupmarker.end+e.alternatormarker+e.groupmarker.start)),b=g(h)),b=b.replace(/9/g,"\\9")),d.call(this,b,c,e)},b.extendAliases({abstractphone:{groupmarker:{start:"<",end:">"},countrycode:"",phoneCodes:[],mask:function(a){return a.definitions={"#":b.prototype.definitions[9]},a.phoneCodes.sort(c)},keepStatic:!0,onBeforeMask:function(a,b){var c=a.replace(/^0{1,2}/,"").replace(/[\s]/g,"");return(c.indexOf(b.countrycode)>1||-1===c.indexOf(b.countrycode))&&(c="+"+b.countrycode+c),c},onUnMask:function(a,b,c){return a.replace(/[()#-]/g,"")},inputmode:"tel"}}),b});
|
||||
+9
@@ -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.8
|
||||
*/
|
||||
|
||||
!function(a){"function"==typeof define&&define.amd?define(["./dependencyLibs/inputmask.dependencyLib","./inputmask"],a):"object"==typeof exports?module.exports=a(require("./dependencyLibs/inputmask.dependencyLib"),require("./inputmask")):a(window.dependencyLib||jQuery,window.Inputmask)}(function(a,b){return b.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(a,b){return new RegExp(b.regex,b.casing?"i":"").test(a.join(""))},definitions:{r:{validator:function(b,c,d,e,f){function g(a,b){this.matches=[],this.isGroup=a||!1,this.isQuantifier=b||!1,this.quantifier={min:1,max:1},this.repeaterPart=void 0}function h(b,c){var d=!1;c&&(l+="(",n++);for(var e=0;e<b.matches.length;e++){var g=b.matches[e];if(!0===g.isGroup)d=h(g,!0);else if(!0===g.isQuantifier){var j=a.inArray(g,b.matches),k=b.matches[j-1],m=l;if(isNaN(g.quantifier.max)){for(;g.repeaterPart&&g.repeaterPart!==l&&g.repeaterPart.length>l.length&&!(d=h(k,!0)););d=d||h(k,!0),d&&(g.repeaterPart=l),l=m+g.quantifier.max}else{for(var o=0,p=g.quantifier.max-1;o<p&&!(d=h(k,!0));o++);l=m+"{"+g.quantifier.min+","+g.quantifier.max+"}"}}else if(void 0!==g.matches)for(var q=0;q<g.length&&!(d=h(g[q],c));q++);else{var r;if("["==g.charAt(0)){r=l,r+=g;for(var s=0;s<n;s++)r+=")";var t=new RegExp("^("+r+")$",f.casing?"i":"");d=t.test(i)}else for(var u=0,v=g.length;u<v;u++)if("\\"!==g.charAt(u)){r=l,r+=g.substr(0,u+1),r=r.replace(/\|$/,"");for(var s=0;s<n;s++)r+=")";var t=new RegExp("^("+r+")$",f.casing?"i":"");if(d=t.test(i))break}l+=g}if(d)break}return c&&(l+=")",n--),d}var i,j,k=c.buffer.slice(),l="",m=!1,n=0;null===f.regexTokens&&function(){var a,b,c=new g,d=[];for(f.regexTokens=[];a=f.tokenizer.exec(f.regex);)switch(b=a[0],b.charAt(0)){case"(":d.push(new g(!0));break;case")":j=d.pop(),d.length>0?d[d.length-1].matches.push(j):c.matches.push(j);break;case"{":case"+":case"*":var e=new g(!1,!0);b=b.replace(/[{}]/g,"");var h=b.split(","),i=isNaN(h[0])?h[0]:parseInt(h[0]),k=1===h.length?i:isNaN(h[1])?h[1]:parseInt(h[1]);if(e.quantifier={min:i,max:k},d.length>0){var l=d[d.length-1].matches;a=l.pop(),a.isGroup||(j=new g(!0),j.matches.push(a),a=j),l.push(a),l.push(e)}else a=c.matches.pop(),a.isGroup||(j=new g(!0),j.matches.push(a),a=j),c.matches.push(a),c.matches.push(e);break;default:d.length>0?d[d.length-1].matches.push(b):c.matches.push(b)}c.matches.length>0&&f.regexTokens.push(c)}(),k.splice(d,0,b),i=k.join("");for(var o=0;o<f.regexTokens.length;o++){var p=f.regexTokens[o];if(m=h(p,p.isGroup))break}return m},cardinality:1}}}}),b});
|
||||
@@ -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.8
|
||||
*/
|
||||
|
||||
!function(a){"function"==typeof define&&define.amd?define(["jquery","./inputmask"],a):"object"==typeof exports?module.exports=a(require("jquery"),require("./inputmask")):a(jQuery,window.Inputmask)}(function(a,b){return void 0===a.fn.inputmask&&(a.fn.inputmask=function(c,d){var e,f=this[0];if(void 0===d&&(d={}),"string"==typeof c)switch(c){case"unmaskedvalue":return f&&f.inputmask?f.inputmask.unmaskedvalue():a(f).val();case"remove":return this.each(function(){this.inputmask&&this.inputmask.remove()});case"getemptymask":return f&&f.inputmask?f.inputmask.getemptymask():"";case"hasMaskedValue":return!(!f||!f.inputmask)&&f.inputmask.hasMaskedValue();case"isComplete":return!f||!f.inputmask||f.inputmask.isComplete();case"getmetadata":return f&&f.inputmask?f.inputmask.getmetadata():void 0;case"setvalue":a(f).val(d),f&&void 0===f.inputmask&&a(f).triggerHandler("setvalue");break;case"option":if("string"!=typeof d)return this.each(function(){if(void 0!==this.inputmask)return this.inputmask.option(d)});if(f&&void 0!==f.inputmask)return f.inputmask.option(d);break;default:return d.alias=c,e=new b(d),this.each(function(){e.mask(this)})}else{if("object"==typeof c)return e=new b(c),void 0===c.mask&&void 0===c.alias?this.each(function(){if(void 0!==this.inputmask)return this.inputmask.option(c);e.mask(this)}):this.each(function(){e.mask(this)});if(void 0===c)return this.each(function(){e=new b(d),e.mask(this)})}}),a.fn.inputmask});
|
||||
@@ -0,0 +1,11 @@
|
||||
/*!
|
||||
* jquery.inputmask.bundle.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.8
|
||||
*/
|
||||
|
||||
!function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={i:d,l:!1,exports:{}};return a[d].call(e.exports,e,e.exports,b),e.l=!0,e.exports}var c={};b.m=a,b.c=c,b.i=function(a){return a},b.d=function(a,c,d){b.o(a,c)||Object.defineProperty(a,c,{configurable:!1,enumerable:!0,get:d})},b.n=function(a){var c=a&&a.__esModule?function(){return a.default}:function(){return a};return b.d(c,"a",c),c},b.o=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)},b.p="",b(b.s=10)}([function(a,b,c){"use strict";var d,e,f;"function"==typeof Symbol&&Symbol.iterator;!function(g){e=[c(2)],d=g,void 0!==(f="function"==typeof d?d.apply(b,e):d)&&(a.exports=f)}(function(a){return a})},function(a,b,c){"use strict";var d,e,f,g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a};!function(g){e=[c(0),c(12),c(11)],d=g,void 0!==(f="function"==typeof d?d.apply(b,e):d)&&(a.exports=f)}(function(a,b,c,d){function e(b,c,g){if(!(this instanceof e))return new e(b,c,g);this.el=d,this.events={},this.maskset=d,this.refreshValue=!1,!0!==g&&(a.isPlainObject(b)?c=b:(c=c||{},c.alias=b),this.opts=a.extend(!0,{},this.defaults,c),this.noMasksCache=c&&c.definitions!==d,this.userOptions=c||{},this.isRTL=this.opts.numericInput,f(this.opts.alias,c,this.opts))}function f(b,c,g){var h=e.prototype.aliases[b];return h?(h.alias&&f(h.alias,d,g),a.extend(!0,g,h),a.extend(!0,g,c),!0):(null===g.mask&&(g.mask=b),!1)}function h(b,c){function f(b,f,g){var h=!1;if(null!==b&&""!==b||(h=null!==g.regex,h?(b=g.regex,b=b.replace(/^(\^)(.*)(\$)$/,"$2")):(h=!0,b=".*")),1===b.length&&!1===g.greedy&&0!==g.repeat&&(g.placeholder=""),g.repeat>0||"*"===g.repeat||"+"===g.repeat){var i="*"===g.repeat?0:"+"===g.repeat?1:g.repeat;b=g.groupmarker.start+b+g.groupmarker.end+g.quantifiermarker.start+i+","+g.repeat+g.quantifiermarker.end}var j,k=h?"regex_"+g.regex:g.numericInput?b.split("").reverse().join(""):b;return e.prototype.masksCache[k]===d||!0===c?(j={mask:b,maskToken:e.prototype.analyseMask(b,h,g),validPositions:{},_buffer:d,buffer:d,tests:{},metadata:f,maskLength:d},!0!==c&&(e.prototype.masksCache[k]=j,j=a.extend(!0,{},e.prototype.masksCache[k]))):j=a.extend(!0,{},e.prototype.masksCache[k]),j}if(a.isFunction(b.mask)&&(b.mask=b.mask(b)),a.isArray(b.mask)){if(b.mask.length>1){b.keepStatic=null===b.keepStatic||b.keepStatic;var g=b.groupmarker.start;return a.each(b.numericInput?b.mask.reverse():b.mask,function(c,e){g.length>1&&(g+=b.groupmarker.end+b.alternatormarker+b.groupmarker.start),e.mask===d||a.isFunction(e.mask)?g+=e:g+=e.mask}),g+=b.groupmarker.end,f(g,b.mask,b)}b.mask=b.mask.pop()}return b.mask&&b.mask.mask!==d&&!a.isFunction(b.mask.mask)?f(b.mask.mask,b.mask,b):f(b.mask,b.mask,b)}function i(f,h,j){function o(a,b,c){b=b||0;var e,f,g,h=[],i=0,k=r();do{!0===a&&p().validPositions[i]?(g=p().validPositions[i],f=g.match,e=g.locator.slice(),h.push(!0===c?g.input:!1===c?f.nativeDef:J(i,f))):(g=u(i,e,i-1),f=g.match,e=g.locator.slice(),(!1===j.jitMasking||i<k||"number"==typeof j.jitMasking&&isFinite(j.jitMasking)&&j.jitMasking>i)&&h.push(!1===c?f.nativeDef:J(i,f))),i++}while((V===d||i<V)&&(null!==f.fn||""!==f.def)||b>i);return""===h[h.length-1]&&h.pop(),p().maskLength=i+1,h}function p(){return h}function q(a){var b=p();b.buffer=d,!0!==a&&(b.validPositions={},b.p=0)}function r(a,b,c){var e=-1,f=-1,g=c||p().validPositions;a===d&&(a=-1);for(var h in g){var i=parseInt(h);g[i]&&(b||!0!==g[i].generatedInput)&&(i<=a&&(e=i),i>=a&&(f=i))}return-1!==e&&a-e>1||f<a?e:f}function s(b,c,e,f){var g,h=b,i=a.extend(!0,{},p().validPositions),k=!1;for(p().p=b,g=c-1;g>=h;g--)p().validPositions[g]!==d&&(!0!==e&&(!p().validPositions[g].match.optionality&&function(a){var b=p().validPositions[a];if(b!==d&&null===b.match.fn){var c=p().validPositions[a-1],e=p().validPositions[a+1];return c!==d&&e!==d}return!1}(g)||!1===j.canClearPosition(p(),g,r(),f,j))||delete p().validPositions[g]);for(q(!0),g=h+1;g<=r();){for(;p().validPositions[h]!==d;)h++;if(g<h&&(g=h+1),p().validPositions[g]===d&&E(g))g++;else{var l=u(g);!1===k&&i[h]&&i[h].match.def===l.match.def?(p().validPositions[h]=a.extend(!0,{},i[h]),p().validPositions[h].input=l.input,delete p().validPositions[g],g++):w(h,l.match.def)?!1!==D(h,l.input||J(g),!0)&&(delete p().validPositions[g],g++,k=!0):E(g)||(g++,h--),h++}}q(!0)}function t(a,b){for(var c,e=a,f=r(),g=p().validPositions[f]||x(0)[0],h=g.alternation!==d?g.locator[g.alternation].toString().split(","):[],i=0;i<e.length&&(c=e[i],!(c.match&&(j.greedy&&!0!==c.match.optionalQuantifier||(!1===c.match.optionality||!1===c.match.newBlockMarker)&&!0!==c.match.optionalQuantifier)&&(g.alternation===d||g.alternation!==c.alternation||c.locator[g.alternation]!==d&&C(c.locator[g.alternation].toString().split(","),h)))||!0===b&&(null!==c.match.fn||/[0-9a-bA-Z]/.test(c.match.def)));i++);return c}function u(a,b,c){return p().validPositions[a]||t(x(a,b?b.slice(Line truncated
|
||||
da.keypressEvent.call(b,f,!0,!0,!1,p().validPositions[d.begin-1]?d.begin:d.begin-1),!1}}}(c,d,f))return!1;f.begin>d.length&&(M(c,d.length),f=M(c));var g=z().join(""),h=d.substr(0,f.begin),i=d.substr(f.begin),k=g.substr(0,f.begin),m=g.substr(f.begin),n=f,o="",q=!1;if(h!==k){n.begin=0;for(var r=(q=h.length>=k.length)?h.length:k.length,s=0;h.charAt(s)===k.charAt(s)&&s<r;s++)n.begin++;q&&(o+=h.slice(n.begin,n.end))}i!==m&&(i.length>m.length?q&&(n.end=n.begin):i.length<m.length?n.end+=m.length-i.length:i.charAt(0)!==m.charAt(0)&&n.end++),I(c,z(),n),o.length>0?a.each(o.split(""),function(b,d){var e=new a.Event("keypress");e.which=d.charCodeAt(0),aa=!1,da.keypressEvent.call(c,e)}):(n.begin===n.end-1&&M(c,G(n.begin+1),n.end),b.keyCode=e.keyCode.DELETE,da.keydownEvent.call(c,b)),b.preventDefault()}},setValueEvent:function(b){this.inputmask.refreshValue=!1;var c=this,d=c.inputmask._valueGet(!0);a.isFunction(j.onBeforeMask)&&(d=j.onBeforeMask.call(X,d,j)||d),d=d.split(""),K(c,!0,!1,Z?d.reverse():d),T=z().join(""),(j.clearMaskOnLostFocus||j.clearIncomplete)&&c.inputmask._valueGet()===y().join("")&&c.inputmask._valueSet("")},focusEvent:function(a){var b=this,c=b.inputmask._valueGet();j.showMaskOnFocus&&(!j.showMaskOnHover||j.showMaskOnHover&&""===c)&&(b.inputmask._valueGet()!==z().join("")?I(b,z(),F(r())):!1===ba&&M(b,F(r()))),!0===j.positionCaretOnTab&&!1===ba&&""!==c&&(I(b,z(),M(b)),da.clickEvent.apply(b,[a,!0])),T=z().join("")},mouseleaveEvent:function(a){var b=this;if(ba=!1,j.clearMaskOnLostFocus&&c.activeElement!==b){var d=z().slice(),e=b.inputmask._valueGet();e!==b.getAttribute("placeholder")&&""!==e&&(-1===r()&&e===y().join("")?d=[]:O(d),I(b,d))}},clickEvent:function(b,e){function f(b){if(""!==j.radixPoint){var c=p().validPositions;if(c[b]===d||c[b].input===J(b)){if(b<F(-1))return!0;var e=a.inArray(j.radixPoint,z());if(-1!==e){for(var f in c)if(e<f&&c[f].input!==J(f))return!1;return!0}}}return!1}var g=this;setTimeout(function(){if(c.activeElement===g){var a=M(g);if(e&&(Z?a.end=a.begin:a.begin=a.end),a.begin===a.end)switch(j.positionCaretOnClick){case"none":break;case"radixFocus":if(f(a.begin)){var b=z().join("").indexOf(j.radixPoint);M(g,j.numericInput?F(b):b);break}default:var h=a.begin,i=r(h,!0),k=F(i);if(h<k)M(g,E(h,!0)||E(h-1,!0)?h:F(h));else{var l=p().validPositions[i],m=u(k,l?l.match.locator:d,l),n=J(k,m.match);if(""!==n&&z()[k]!==n&&!0!==m.match.optionalQuantifier&&!0!==m.match.newBlockMarker||!E(k,!0)&&m.match.def===n){var o=F(k);(h>=o||h===k)&&(k=o)}M(g,k)}}}},0)},dblclickEvent:function(a){var b=this;setTimeout(function(){M(b,0,F(r()))},0)},cutEvent:function(d){var f=this,g=a(f),h=M(f),i=d.originalEvent||d,j=b.clipboardData||i.clipboardData,k=Z?z().slice(h.end,h.begin):z().slice(h.begin,h.end);j.setData("text",Z?k.reverse().join(""):k.join("")),c.execCommand&&c.execCommand("copy"),Q(f,e.keyCode.DELETE,h),I(f,z(),p().p,d,T!==z().join("")),f.inputmask._valueGet()===y().join("")&&g.trigger("cleared")},blurEvent:function(b){var c=a(this),e=this;if(e.inputmask){var f=e.inputmask._valueGet(),g=z().slice();""!==f&&(j.clearMaskOnLostFocus&&(-1===r()&&f===y().join("")?g=[]:O(g)),!1===P(g)&&(setTimeout(function(){c.trigger("incomplete")},0),j.clearIncomplete&&(q(),g=j.clearMaskOnLostFocus?[]:y().slice())),I(e,g,d,b)),T!==z().join("")&&(T=g.join(""),c.trigger("change"))}},mouseenterEvent:function(a){var b=this;ba=!0,c.activeElement!==b&&j.showMaskOnHover&&b.inputmask._valueGet()!==z().join("")&&I(b,z())},submitEvent:function(a){T!==z().join("")&&U.trigger("change"),j.clearMaskOnLostFocus&&-1===r()&&Y.inputmask._valueGet&&Y.inputmask._valueGet()===y().join("")&&Y.inputmask._valueSet(""),j.removeMaskOnSubmit&&(Y.inputmask._valueSet(Y.inputmask.unmaskedvalue(),!0),setTimeout(function(){I(Y,z())},0))},resetEvent:function(a){Y.inputmask.refreshValue=!0,setTimeout(function(){U.trigger("setvalue")},0)}};e.prototype.positionColorMask=function(a,b){a.style.left=b.offsetLeft+"px"};var ea;if(f!==d)switch(f.action){case"isComplete":return Y=f.el,P(z());case"unmaskedvalue":return Y!==d&&f.value===d||(ea=f.value,ea=(a.isFunction(j.onBeforeMask)?j.onBeforeMask.call(X,ea,j)||ea:ea).split(""),K(d,!1,!1,Z?ea.reverse():ea),a.isFunction(j.onBeforeWrite)&&j.onBeforeWrite.call(X,d,z(),0,j)),L(Y);case"mask":!function(b){ca.off(b);var e=function(b,e){var f=b.getAttribute("type"),h="INPUT"===b.tagName&&-1!==a.inArray(f,e.supportsInputType)||b.isContentEditable||"TEXTAREA"===b.tagName;if(!h)if("INPUT"===b.tagName){var i=c.createElement("input");i.setAttribute("type",f),h="text"===i.type,i=null}else h="partial";return!1!==h?function(b){function f(){return this.inputmask?this.inputmask.opts.autoUnmask?this.inputmask.unmaskedvalue():-1!==r()||!0!==e.nullable?c.activeElement===this&&e.clearMaskOnLostFocus?(Z?O(z().slice()).reverse():O(z().slice())).join(""):i.call(this):"":i.call(this)}function h(b){j.call(this,b),this.inputmask&&a(this).trigger("setvalue")}var i,j;if(!b.inputmask.__valueGet){if(!0!==e.noValuePatching){if(Object.getOwnPropertyLine truncated
|
||||
for(var d="",e=0;e<a.length;e++)b.prototype.definitions[a.charAt(e)]||c.definitions[a.charAt(e)]||c.optionalmarker.start===a.charAt(e)||c.optionalmarker.end===a.charAt(e)||c.quantifiermarker.start===a.charAt(e)||c.quantifiermarker.end===a.charAt(e)||c.groupmarker.start===a.charAt(e)||c.groupmarker.end===a.charAt(e)||c.alternatormarker===a.charAt(e)?d+="\\"+a.charAt(e):d+=a.charAt(e);return d}return b.extendAliases({numeric:{mask:function(a){if(0!==a.repeat&&isNaN(a.integerDigits)&&(a.integerDigits=a.repeat),a.repeat=0,a.groupSeparator===a.radixPoint&&("."===a.radixPoint?a.groupSeparator=",":","===a.radixPoint?a.groupSeparator=".":a.groupSeparator="")," "===a.groupSeparator&&(a.skipOptionalPartCharacter=c),a.autoGroup=a.autoGroup&&""!==a.groupSeparator,a.autoGroup&&("string"==typeof a.groupSize&&isFinite(a.groupSize)&&(a.groupSize=parseInt(a.groupSize)),isFinite(a.integerDigits))){var b=Math.floor(a.integerDigits/a.groupSize),e=a.integerDigits%a.groupSize;a.integerDigits=parseInt(a.integerDigits)+(0===e?b-1:b),a.integerDigits<1&&(a.integerDigits="*")}a.placeholder.length>1&&(a.placeholder=a.placeholder.charAt(0)),"radixFocus"===a.positionCaretOnClick&&""===a.placeholder&&!1===a.integerOptional&&(a.positionCaretOnClick="lvp"),a.definitions[";"]=a.definitions["~"],a.definitions[";"].definitionSymbol="~",!0===a.numericInput&&(a.positionCaretOnClick="radixFocus"===a.positionCaretOnClick?"lvp":a.positionCaretOnClick,a.digitsOptional=!1,isNaN(a.digits)&&(a.digits=2),a.decimalProtect=!1);var f="[+]";if(f+=d(a.prefix,a),!0===a.integerOptional?f+="~{1,"+a.integerDigits+"}":f+="~{"+a.integerDigits+"}",a.digits!==c){a.radixPointDefinitionSymbol=a.decimalProtect?":":a.radixPoint;var g=a.digits.toString().split(",");isFinite(g[0]&&g[1]&&isFinite(g[1]))?f+=a.radixPointDefinitionSymbol+";{"+a.digits+"}":(isNaN(a.digits)||parseInt(a.digits)>0)&&(a.digitsOptional?f+="["+a.radixPointDefinitionSymbol+";{1,"+a.digits+"}]":f+=a.radixPointDefinitionSymbol+";{"+a.digits+"}")}return f+=d(a.suffix,a),f+="[-]",a.greedy=!1,f},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(b,d,e,f,g){if("-"===e||e===g.negationSymbol.front)return!0===g.allowMinus&&(g.isNegative=g.isNegative===c||!g.isNegative,""===b.join("")||{caret:d,dopost:!0});if(!1===f&&e===g.radixPoint&&g.digits!==c&&(isNaN(g.digits)||parseInt(g.digits)>0)){var h=a.inArray(g.radixPoint,b);if(-1!==h)return!0===g.numericInput?d===h:{caret:h+1}}return!0},postValidation:function(d,e,f){var g=f.suffix.split(""),h=f.prefix.split("");if(e.pos===c&&e.caret!==c&&!0!==e.dopost)return e;var i=e.caret!==c?e.caret:e.pos,j=d.slice();f.numericInput&&(i=j.length-i-1,j=j.reverse());var k=j[i];if(k===f.groupSeparator&&(i+=1,k=j[i]),i===j.length-f.suffix.length-1&&k===f.radixPoint)return e;k!==c&&k!==f.radixPoint&&k!==f.negationSymbol.front&&k!==f.negationSymbol.back&&(j[i]="?",f.prefix.length>0&&i>=(!1===f.isNegative?1:0)&&i<f.prefix.length-1+(!1===f.isNegative?1:0)?h[i-(!1===f.isNegative?1:0)]="?":f.suffix.length>0&&i>=j.length-f.suffix.length-(!1===f.isNegative?1:0)&&(g[i-(j.length-f.suffix.length-(!1===f.isNegative?1:0))]="?")),h=h.join(""),g=g.join("");var l=j.join("").replace(h,"");if(l=l.replace(g,""),l=l.replace(new RegExp(b.escapeRegex(f.groupSeparator),"g"),""),l=l.replace(new RegExp("[-"+b.escapeRegex(f.negationSymbol.front)+"]","g"),""),l=l.replace(new RegExp(b.escapeRegex(f.negationSymbol.back)+"$"),""),isNaN(f.placeholder)&&(l=l.replace(new RegExp(b.escapeRegex(f.placeholder),"g"),"")),l.length>1&&1!==l.indexOf(f.radixPoint)&&("0"===k&&(l=l.replace(/^\?/g,"")),l=l.replace(/^0/g,"")),l.charAt(0)===f.radixPoint&&""!==f.radixPoint&&!0!==f.numericInput&&(l="0"+l),""!==l){if(l=l.split(""),(!f.digitsOptional||f.enforceDigitsOnBlur&&"blur"===e.event)&&isFinite(f.digits)){var m=a.inArray(f.radixPoint,l),n=a.inArray(f.radixPoint,j);-1===m&&(l.push(f.radixPoint),m=l.length-1);for(var o=1;o<=f.digits;o++)f.digitsOptional&&(!f.enforceDigitsOnBlur||"blur"!==e.event)||l[m+o]!==c&&l[m+o]!==f.placeholder.charAt(0)?-1!==n&&j[n+o]!==c&&(l[m+o]=l[m+o]||j[n+o]):l[m+o]=e.placeholder||f.placeholder.charAt(0)}if(!0!==f.autoGroup||""===f.groupSeparator||k===f.radixPoint&&e.pos===c&&!e.dopost)l=l.join("");else{var p=l[l.length-1]===f.radixPoint&&e.c===f.radixPoint;l=b(function(a,b){var c="";if(c+="("+b.groupSeparator+"*{"+b.groupSize+"}){*}",""!==b.radixPoint){var d=a.join("").split(b.radixPoint);d[1]&&(c+=b.radixPoint+"*{"+d[1].match(/^\d*\??\d*/)[0].length+"}")}return c}(l,f),{numericInput:!0,jitMasking:!0,definitions:{"*":{validator:"[0-9?]",cardinality:1}}}).format(l.join("")),p&&(l+=f.radixPoint),l.charAt(0)===f.groupSeparator&&l.substr(1Line truncated
|
||||
Reference in new issue
Block a user