inputmask.dependencyLib.jqlite.js 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /*!
  2. * dependencyLibs/inputmask.dependencyLib.jqlite.js
  3. * https://github.com/RobinHerbots/Inputmask
  4. * Copyright (c) 2010 - 2018 Robin Herbots
  5. * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
  6. * Version: 4.0.0-beta.55
  7. */
  8. !function(factory) {
  9. "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);
  10. }(function($, window, document) {
  11. function isWindow(obj) {
  12. return null != obj && obj === obj.window;
  13. }
  14. return $.inArray = function(elem, arr, i) {
  15. return null == arr ? -1 : function(list, elem) {
  16. for (var i = 0, len = list.length; i < len; i++) if (list[i] === elem) return i;
  17. return -1;
  18. }(arr, elem);
  19. }, $.isFunction = function(obj) {
  20. return "function" == typeof obj;
  21. }, $.isArray = Array.isArray, $.isPlainObject = function(obj) {
  22. return "object" == typeof obj && !obj.nodeType && !isWindow(obj) && !(obj.constructor && !Object.hasOwnProperty.call(obj.constructor.prototype, "isPrototypeOf"));
  23. }, $.extend = function() {
  24. var options, name, src, copy, copyIsArray, clone, target = arguments[0] || {}, i = 1, length = arguments.length, deep = !1;
  25. for ("boolean" == typeof target && (deep = target, target = arguments[i] || {},
  26. i++), "object" == typeof target || $.isFunction(target) || (target = {}), i === length && (target = this,
  27. i--); i < length; i++) if (null != (options = arguments[i])) for (name in options) src = target[name],
  28. target !== (copy = options[name]) && (deep && copy && ($.isPlainObject(copy) || (copyIsArray = $.isArray(copy))) ? (copyIsArray ? (copyIsArray = !1,
  29. clone = src && $.isArray(src) ? src : []) : clone = src && $.isPlainObject(src) ? src : {},
  30. target[name] = $.extend(deep, clone, copy)) : void 0 !== copy && (target[name] = copy));
  31. return target;
  32. }, $.each = function(obj, callback) {
  33. var i = 0;
  34. if (function(obj) {
  35. var length = "length" in obj && obj.length, ltype = typeof obj;
  36. return "function" !== ltype && !isWindow(obj) && (!(1 !== obj.nodeType || !length) || "array" === ltype || 0 === length || "number" == typeof length && length > 0 && length - 1 in obj);
  37. }(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;
  38. return obj;
  39. }, $.data = function(elem, name, data) {
  40. return $(elem).data(name, data);
  41. }, $.Event = $.Event || function(event, params) {
  42. params = params || {
  43. bubbles: !1,
  44. cancelable: !1,
  45. detail: void 0
  46. };
  47. var evt = document.createEvent("CustomEvent");
  48. return evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail),
  49. evt;
  50. }, $.Event.prototype = window.Event.prototype, $;
  51. });