jquery-migrate-3.0.1.min.js 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215
  1. /*! jQuery Migrate v3.0.1 | (c) jQuery Foundation and other contributors | jquery.org/license */
  2. void 0 === jQuery.migrateMute && (jQuery.migrateMute = !0), function(e) {
  3. "function" == typeof define && define.amd ? define([ "jquery" ], window, e) : "object" == typeof module && module.exports ? module.exports = e(require("jquery"), window) : e(jQuery, window);
  4. }(function(e, t) {
  5. "use strict";
  6. function r(r) {
  7. var n = t.console;
  8. o[r] || (o[r] = !0, e.migrateWarnings.push(r), n && n.warn && !e.migrateMute && (n.warn("JQMIGRATE: " + r),
  9. e.migrateTrace && n.trace && n.trace()));
  10. }
  11. function n(e, t, n, a) {
  12. Object.defineProperty(e, t, {
  13. configurable: !0,
  14. enumerable: !0,
  15. get: function() {
  16. return r(a), n;
  17. },
  18. set: function(e) {
  19. r(a), n = e;
  20. }
  21. });
  22. }
  23. function a(e, t, n, a) {
  24. e[t] = function() {
  25. return r(a), n.apply(this, arguments);
  26. };
  27. }
  28. e.migrateVersion = "3.0.1", function() {
  29. var r = /^[12]\./;
  30. t.console && t.console.log && (e && !r.test(e.fn.jquery) || t.console.log("JQMIGRATE: jQuery 3.0.0+ REQUIRED"),
  31. e.migrateWarnings && t.console.log("JQMIGRATE: Migrate plugin loaded multiple times"),
  32. t.console.log("JQMIGRATE: Migrate is installed" + (e.migrateMute ? "" : " with logging active") + ", version " + e.migrateVersion));
  33. }();
  34. var o = {};
  35. e.migrateWarnings = [], void 0 === e.migrateTrace && (e.migrateTrace = !0), e.migrateReset = function() {
  36. o = {}, e.migrateWarnings.length = 0;
  37. }, "BackCompat" === t.document.compatMode && r("jQuery is not compatible with Quirks Mode");
  38. var i = e.fn.init, s = e.isNumeric, u = e.find, c = /\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/, l = /\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/g;
  39. e.fn.init = function(e) {
  40. var t = Array.prototype.slice.call(arguments);
  41. return "string" == typeof e && "#" === e && (r("jQuery( '#' ) is not a valid selector"),
  42. t[0] = []), i.apply(this, t);
  43. }, e.fn.init.prototype = e.fn, e.find = function(e) {
  44. var n = Array.prototype.slice.call(arguments);
  45. if ("string" == typeof e && c.test(e)) try {
  46. t.document.querySelector(e);
  47. } catch (a) {
  48. e = e.replace(l, function(e, t, r, n) {
  49. return "[" + t + r + '"' + n + '"]';
  50. });
  51. try {
  52. t.document.querySelector(e), r("Attribute selector with '#' must be quoted: " + n[0]),
  53. n[0] = e;
  54. } catch (e) {
  55. r("Attribute selector with '#' was not fixed: " + n[0]);
  56. }
  57. }
  58. return u.apply(this, n);
  59. };
  60. var d;
  61. for (d in u) Object.prototype.hasOwnProperty.call(u, d) && (e.find[d] = u[d]);
  62. e.fn.size = function() {
  63. return r("jQuery.fn.size() is deprecated and removed; use the .length property"),
  64. this.length;
  65. }, e.parseJSON = function() {
  66. return r("jQuery.parseJSON is deprecated; use JSON.parse"), JSON.parse.apply(null, arguments);
  67. }, e.isNumeric = function(t) {
  68. var n = s(t), a = function(t) {
  69. var r = t && t.toString();
  70. return !e.isArray(t) && r - parseFloat(r) + 1 >= 0;
  71. }(t);
  72. return n !== a && r("jQuery.isNumeric() should not be called on constructed objects"),
  73. a;
  74. }, a(e, "holdReady", e.holdReady, "jQuery.holdReady is deprecated"), a(e, "unique", e.uniqueSort, "jQuery.unique is deprecated; use jQuery.uniqueSort"),
  75. n(e.expr, "filters", e.expr.pseudos, "jQuery.expr.filters is deprecated; use jQuery.expr.pseudos"),
  76. n(e.expr, ":", e.expr.pseudos, "jQuery.expr[':'] is deprecated; use jQuery.expr.pseudos");
  77. var p = e.ajax;
  78. e.ajax = function() {
  79. var e = p.apply(this, arguments);
  80. return e.promise && (a(e, "success", e.done, "jQXHR.success is deprecated and removed"),
  81. a(e, "error", e.fail, "jQXHR.error is deprecated and removed"), a(e, "complete", e.always, "jQXHR.complete is deprecated and removed")),
  82. e;
  83. };
  84. var f = e.fn.removeAttr, y = e.fn.toggleClass, m = /\S+/g;
  85. e.fn.removeAttr = function(t) {
  86. var n = this;
  87. return e.each(t.match(m), function(t, a) {
  88. e.expr.match.bool.test(a) && (r("jQuery.fn.removeAttr no longer sets boolean properties: " + a),
  89. n.prop(a, !1));
  90. }), f.apply(this, arguments);
  91. }, e.fn.toggleClass = function(t) {
  92. return void 0 !== t && "boolean" != typeof t ? y.apply(this, arguments) : (r("jQuery.fn.toggleClass( boolean ) is deprecated"),
  93. this.each(function() {
  94. var r = this.getAttribute && this.getAttribute("class") || "";
  95. r && e.data(this, "__className__", r), this.setAttribute && this.setAttribute("class", r || !1 === t ? "" : e.data(this, "__className__") || "");
  96. }));
  97. };
  98. var h = !1;
  99. e.swap && e.each([ "height", "width", "reliableMarginRight" ], function(t, r) {
  100. var n = e.cssHooks[r] && e.cssHooks[r].get;
  101. n && (e.cssHooks[r].get = function() {
  102. var e;
  103. return h = !0, e = n.apply(this, arguments), h = !1, e;
  104. });
  105. }), e.swap = function(e, t, n, a) {
  106. var o, i, s = {};
  107. h || r("jQuery.swap() is undocumented and deprecated");
  108. for (i in t) s[i] = e.style[i], e.style[i] = t[i];
  109. o = n.apply(e, a || []);
  110. for (i in t) e.style[i] = s[i];
  111. return o;
  112. };
  113. var g = e.data;
  114. e.data = function(t, n, a) {
  115. var o;
  116. if (n && "object" == typeof n && 2 === arguments.length) {
  117. o = e.hasData(t) && g.call(this, t);
  118. var i = {};
  119. for (var s in n) s !== e.camelCase(s) ? (r("jQuery.data() always sets/gets camelCased names: " + s),
  120. o[s] = n[s]) : i[s] = n[s];
  121. return g.call(this, t, i), n;
  122. }
  123. return n && "string" == typeof n && n !== e.camelCase(n) && (o = e.hasData(t) && g.call(this, t)) && n in o ? (r("jQuery.data() always sets/gets camelCased names: " + n),
  124. arguments.length > 2 && (o[n] = a), o[n]) : g.apply(this, arguments);
  125. };
  126. var v = e.Tween.prototype.run, j = function(e) {
  127. return e;
  128. };
  129. e.Tween.prototype.run = function() {
  130. e.easing[this.easing].length > 1 && (r("'jQuery.easing." + this.easing.toString() + "' should use only one argument"),
  131. e.easing[this.easing] = j), v.apply(this, arguments);
  132. }, e.fx.interval = e.fx.interval || 13, t.requestAnimationFrame && n(e.fx, "interval", e.fx.interval, "jQuery.fx.interval is deprecated");
  133. var Q = e.fn.load, b = e.event.add, w = e.event.fix;
  134. e.event.props = [], e.event.fixHooks = {}, n(e.event.props, "concat", e.event.props.concat, "jQuery.event.props.concat() is deprecated and removed"),
  135. e.event.fix = function(t) {
  136. var n, a = t.type, o = this.fixHooks[a], i = e.event.props;
  137. if (i.length) for (r("jQuery.event.props are deprecated and removed: " + i.join()); i.length; ) e.event.addProp(i.pop());
  138. if (o && !o._migrated_ && (o._migrated_ = !0, r("jQuery.event.fixHooks are deprecated and removed: " + a),
  139. (i = o.props) && i.length)) for (;i.length; ) e.event.addProp(i.pop());
  140. return n = w.call(this, t), o && o.filter ? o.filter(n, t) : n;
  141. }, e.event.add = function(e, n) {
  142. return e === t && "load" === n && "complete" === t.document.readyState && r("jQuery(window).on('load'...) called after load event occurred"),
  143. b.apply(this, arguments);
  144. }, e.each([ "load", "unload", "error" ], function(t, n) {
  145. e.fn[n] = function() {
  146. var e = Array.prototype.slice.call(arguments, 0);
  147. return "load" === n && "string" == typeof e[0] ? Q.apply(this, e) : (r("jQuery.fn." + n + "() is deprecated"),
  148. e.splice(0, 0, n), arguments.length ? this.on.apply(this, e) : (this.triggerHandler.apply(this, e),
  149. this));
  150. };
  151. }), e.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "), function(t, n) {
  152. e.fn[n] = function(e, t) {
  153. return r("jQuery.fn." + n + "() event shorthand is deprecated"), arguments.length > 0 ? this.on(n, null, e, t) : this.trigger(n);
  154. };
  155. }), e(function() {
  156. e(t.document).triggerHandler("ready");
  157. }), e.event.special.ready = {
  158. setup: function() {
  159. this === t.document && r("'ready' event is deprecated");
  160. }
  161. }, e.fn.extend({
  162. bind: function(e, t, n) {
  163. return r("jQuery.fn.bind() is deprecated"), this.on(e, null, t, n);
  164. },
  165. unbind: function(e, t) {
  166. return r("jQuery.fn.unbind() is deprecated"), this.off(e, null, t);
  167. },
  168. delegate: function(e, t, n, a) {
  169. return r("jQuery.fn.delegate() is deprecated"), this.on(t, e, n, a);
  170. },
  171. undelegate: function(e, t, n) {
  172. return r("jQuery.fn.undelegate() is deprecated"), 1 === arguments.length ? this.off(e, "**") : this.off(t, e || "**", n);
  173. },
  174. hover: function(e, t) {
  175. return r("jQuery.fn.hover() is deprecated"), this.on("mouseenter", e).on("mouseleave", t || e);
  176. }
  177. });
  178. var x = e.fn.offset;
  179. e.fn.offset = function() {
  180. var n, a = this[0], o = {
  181. top: 0,
  182. left: 0
  183. };
  184. return a && a.nodeType ? (n = (a.ownerDocument || t.document).documentElement, e.contains(n, a) ? x.apply(this, arguments) : (r("jQuery.fn.offset() requires an element connected to a document"),
  185. o)) : (r("jQuery.fn.offset() requires a valid DOM element"), o);
  186. };
  187. var k = e.param;
  188. e.param = function(t, n) {
  189. var a = e.ajaxSettings && e.ajaxSettings.traditional;
  190. return void 0 === n && a && (r("jQuery.param() no longer uses jQuery.ajaxSettings.traditional"),
  191. n = a), k.call(this, t, n);
  192. };
  193. var A = e.fn.andSelf || e.fn.addBack;
  194. e.fn.andSelf = function() {
  195. return r("jQuery.fn.andSelf() is deprecated and removed, use jQuery.fn.addBack()"),
  196. A.apply(this, arguments);
  197. };
  198. var S = e.Deferred, q = [ [ "resolve", "done", e.Callbacks("once memory"), e.Callbacks("once memory"), "resolved" ], [ "reject", "fail", e.Callbacks("once memory"), e.Callbacks("once memory"), "rejected" ], [ "notify", "progress", e.Callbacks("memory"), e.Callbacks("memory") ] ];
  199. return e.Deferred = function(t) {
  200. var n = S(), a = n.promise();
  201. return n.pipe = a.pipe = function() {
  202. var t = arguments;
  203. return r("deferred.pipe() is deprecated"), e.Deferred(function(r) {
  204. e.each(q, function(o, i) {
  205. var s = e.isFunction(t[o]) && t[o];
  206. n[i[1]](function() {
  207. var t = s && s.apply(this, arguments);
  208. t && e.isFunction(t.promise) ? t.promise().done(r.resolve).fail(r.reject).progress(r.notify) : r[i[0] + "With"](this === a ? r.promise() : this, s ? [ t ] : arguments);
  209. });
  210. }), t = null;
  211. }).promise();
  212. }, t && t.call(n, n), n;
  213. }, e.Deferred.exceptionHook = S.exceptionHook, e;
  214. });