1/*! 2 * jQuery Migrate - v3.3.1 - 2020-06-25T01:07Z 3 * Copyright OpenJS Foundation and other contributors 4 */ 5( function( factory ) { 6 "use strict"; 7 8 if ( typeof define === "function" && define.amd ) { 9 10 // AMD. Register as an anonymous module. 11 define( [ "jquery" ], function( jQuery ) { 12 return factory( jQuery, window ); 13 } ); 14 } else if ( typeof module === "object" && module.exports ) { 15 16 // Node/CommonJS 17 // eslint-disable-next-line no-undef 18 module.exports = factory( require( "jquery" ), window ); 19 } else { 20 21 // Browser globals 22 factory( jQuery, window ); 23 } 24} )( function( jQuery, window ) { 25"use strict"; 26 27jQuery.migrateVersion = "3.3.1"; 28 29// Returns 0 if v1 == v2, -1 if v1 < v2, 1 if v1 > v2 30function compareVersions( v1, v2 ) { 31 var i, 32 rVersionParts = /^(\d+)\.(\d+)\.(\d+)/, 33 v1p = rVersionParts.exec( v1 ) || [ ], 34 v2p = rVersionParts.exec( v2 ) || [ ]; 35 36 for ( i = 1; i <= 3; i++ ) { 37 if ( +v1p[ i ] > +v2p[ i ] ) { 38 return 1; 39 } 40 if ( +v1p[ i ] < +v2p[ i ] ) { 41 return -1; 42 } 43 } 44 return 0; 45} 46 47function jQueryVersionSince( version ) { 48 return compareVersions( jQuery.fn.jquery, version ) >= 0; 49} 50 51( function() { 52 53 // Support: IE9 only 54 // IE9 only creates console object when dev tools are first opened 55 // IE9 console is a host object, callable but doesn't have .apply() 56 if ( !window.console || !window.console.log ) { 57 return; 58 } 59 60 // Need jQuery 3.0.0+ and no older Migrate loaded 61 if ( !jQuery || !jQueryVersionSince( "3.0.0" ) ) { 62 window.console.log( "JQMIGRATE: jQuery 3.0.0+ REQUIRED" ); 63 } 64 if ( jQuery.migrateWarnings ) { 65 window.console.log( "JQMIGRATE: Migrate plugin loaded multiple times" ); 66 } 67 68 // Show a message on the console so devs know we're active 69 window.console.log( "JQMIGRATE: Migrate is installed" + 70 ( jQuery.migrateMute ? "" : " with logging active" ) + 71 ", version " + jQuery.migrateVersion ); 72 73} )(); 74 75var warnedAbout = {}; 76 77// By default each warning is only reported once. 78jQuery.migrateDeduplicateWarnings = true; 79 80// List of warnings already given; public read only 81jQuery.migrateWarnings = []; 82 83// Set to false to disable traces that appear with warnings 84if ( jQuery.migrateTrace === undefined ) { 85 jQuery.migrateTrace = true; 86} 87 88// Forget any warnings we've already given; public 89jQuery.migrateReset = function() { 90 warnedAbout = {}; 91 jQuery.migrateWarnings.length = 0; 92}; 93 94function migrateWarn( msg ) { 95 var console = window.console; 96 if ( !jQuery.migrateDeduplicateWarnings || !warnedAbout[ msg ] ) { 97 warnedAbout[ msg ] = true; 98 jQuery.migrateWarnings.push( msg ); 99 if ( console && console.warn && !jQuery.migrateMute ) { 100 console.warn( "JQMIGRATE: " + msg ); 101 if ( jQuery.migrateTrace && console.trace ) { 102 console.trace(); 103 } 104 } 105 } 106} 107 108function migrateWarnProp( obj, prop, value, msg ) { 109 Object.defineProperty( obj, prop, { 110 configurable: true, 111 enumerable: true, 112 get: function() { 113 migrateWarn( msg ); 114 return value; 115 }, 116 set: function( newValue ) { 117 migrateWarn( msg ); 118 value = newValue; 119 } 120 } ); 121} 122 123function migrateWarnFunc( obj, prop, newFunc, msg ) { 124 obj[ prop ] = function() { 125 migrateWarn( msg ); 126 return newFunc.apply( this, arguments ); 127 }; 128} 129 130if ( window.document.compatMode === "BackCompat" ) { 131 132 // JQuery has never supported or tested Quirks Mode 133 migrateWarn( "jQuery is not compatible with Quirks Mode" ); 134} 135 136var findProp, 137 class2type = {}, 138 oldInit = jQuery.fn.init, 139 oldFind = jQuery.find, 140 141 rattrHashTest = /\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/, 142 rattrHashGlob = /\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/g, 143 144 // Support: Android <=4.0 only 145 // Make sure we trim BOM and NBSP 146 rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g; 147 148jQuery.fn.init = function( arg1 ) { 149 var args = Array.prototype.slice.call( arguments ); 150 151 if ( typeof arg1 === "string" && arg1 === "#" ) { 152 153 // JQuery( "#" ) is a bogus ID selector, but it returned an empty set before jQuery 3.0 154 migrateWarn( "jQuery( '#' ) is not a valid selector" ); 155 args[ 0 ] = []; 156 } 157 158 return oldInit.apply( this, args ); 159}; 160jQuery.fn.init.prototype = jQuery.fn; 161 162jQuery.find = function( selector ) { 163 var args = Array.prototype.slice.call( arguments ); 164 165 // Support: PhantomJS 1.x 166 // String#match fails to match when used with a //g RegExp, only on some strings 167 if ( typeof selector === "string" && rattrHashTest.test( selector ) ) { 168 169 // The nonstandard and undocumented unquoted-hash was removed in jQuery 1.12.0 170 // First see if qS thinks it's a valid selector, if so avoid a false positive 171 try { 172 window.document.querySelector( selector ); 173 } catch ( err1 ) { 174 175 // Didn't *look* valid to qSA, warn and try quoting what we think is the value 176 selector = selector.replace( rattrHashGlob, function( _, attr, op, value ) { 177 return "[" + attr + op + "\"" + value + "\"]"; 178 } ); 179
180 // If the regexp *may* have created an invalid selector, don't update it 181 // Note that there may be false alarms if selector uses jQuery extensions 182 try { 183 window.document.querySelector( selector ); 184 migrateWarn( "Attribute selector with '#' must be quoted: " + args[ 0 ] ); 185 args[ 0 ] = selector; 186 } catch ( err2 ) { 187 migrateWarn( "Attribute selector with '#' was not fixed: " + args[ 0 ] ); 188 } 189 } 190 } 191 192 return oldFind.apply( this, args ); 193}; 194 195// Copy properties attached to original jQuery.find method (e.g. .attr, .isXML) 196for ( findProp in oldFind ) { 197 if ( Object.prototype.hasOwnProperty.call( oldFind, findProp ) ) { 198 jQuery.find[ findProp ] = oldFind[ findProp ]; 199 } 200} 201 202// The number of elements contained in the matched element set 203migrateWarnFunc( jQuery.fn, "size", function() { 204 return this.length; 205}, 206"jQuery.fn.size() is deprecated and removed; use the .length property" ); 207 208migrateWarnFunc( jQuery, "parseJSON", function() { 209 return JSON.parse.apply( null, arguments ); 210}, 211"jQuery.parseJSON is deprecated; use JSON.parse" ); 212 213migrateWarnFunc( jQuery, "holdReady", jQuery.holdReady, 214 "jQuery.holdReady is deprecated" ); 215 216migrateWarnFunc( jQuery, "unique", jQuery.uniqueSort, 217 "jQuery.unique is deprecated; use jQuery.uniqueSort" ); 218 219// Now jQuery.expr.pseudos is the standard incantation 220migrateWarnProp( jQuery.expr, "filters", jQuery.expr.pseudos, 221 "jQuery.expr.filters is deprecated; use jQuery.expr.pseudos" ); 222migrateWarnProp( jQuery.expr, ":", jQuery.expr.pseudos, 223 "jQuery.expr[':'] is deprecated; use jQuery.expr.pseudos" ); 224 225// Prior to jQuery 3.1.1 there were internal refs so we don't warn there 226if ( jQueryVersionSince( "3.1.1" ) ) { 227 migrateWarnFunc( jQuery, "trim", function( text ) { 228 return text == null ? 229 "" : 230 ( text + "" ).replace( rtrim, "" ); 231 }, 232 "jQuery.trim is deprecated; use String.prototype.trim" ); 233} 234 235// Prior to jQuery 3.2 there were internal refs so we don't warn there 236if ( jQueryVersionSince( "3.2.0" ) ) { 237 migrateWarnFunc( jQuery, "nodeName", function( elem, name ) { 238 return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); 239 }, 240 "jQuery.nodeName is deprecated" ); 241} 242 243if ( jQueryVersionSince( "3.3.0" ) ) { 244 245 migrateWarnFunc( jQuery, "isNumeric", function( obj ) { 246 247 // As of jQuery 3.0, isNumeric is limited to 248 // strings and numbers (primitives or objects) 249 // that can be coerced to finite numbers (gh-2662) 250 var type = typeof obj; 251 return ( type === "number" || type === "string" ) && 252 253 // parseFloat NaNs numeric-cast false positives ("") 254 // ...but misinterprets leading-number strings, e.g. hex literals ("0x...") 255 // subtraction forces infinities to NaN 256 !isNaN( obj - parseFloat( obj ) ); 257 }, 258 "jQuery.isNumeric() is deprecated" 259 ); 260 261 // Populate the class2type map 262 jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol". 263 split( " " ), 264 function( _, name ) { 265 class2type[ "[object " + name + "]" ] = name.toLowerCase(); 266 } ); 267 268 migrateWarnFunc( jQuery, "type", function( obj ) { 269 if ( obj == null ) { 270 return obj + ""; 271 } 272 273 // Support: Android <=2.3 only (functionish RegExp) 274 return typeof obj === "object" || typeof obj === "function" ? 275 class2type[ Object.prototype.toString.call( obj ) ] || "object" : 276 typeof obj; 277 }, 278 "jQuery.type is deprecated" ); 279 280 migrateWarnFunc( jQuery, "isFunction", 281 function( obj ) { 282 return typeof obj === "function"; 283 }, 284 "jQuery.isFunction() is deprecated" ); 285 286 migrateWarnFunc( jQuery, "isWindow", 287 function( obj ) { 288 return obj != null && obj === obj.window; 289 }, 290 "jQuery.isWindow() is deprecated" 291 ); 292 293 migrateWarnFunc( jQuery, "isArray", Array.isArray, 294 "jQuery.isArray is deprecated; use Array.isArray" 295 ); 296} 297 298// Support jQuery slim which excludes the ajax module 299if ( jQuery.ajax ) { 300 301var oldAjax = jQuery.ajax; 302 303jQuery.ajax = function( ) { 304 var jQXHR = oldAjax.apply( this, arguments ); 305 306 // Be sure we got a jQXHR (e.g., not sync) 307 if ( jQXHR.promise ) { 308 migrateWarnFunc( jQXHR, "success", jQXHR.done, 309 "jQXHR.success is deprecated and removed" ); 310 migrateWarnFunc( jQXHR, "error", jQXHR.fail, 311 "jQXHR.error is deprecated and removed" ); 312 migrateWarnFunc( jQXHR, "complete", jQXHR.always, 313 "jQXHR.complete is deprecated and removed" ); 314 } 315 316 return jQXHR; 317}; 318 319} 320 321var oldRemoveAttr = jQuery.fn.removeAttr, 322 oldToggleClass = jQuery.fn.toggleClass, 323 rmatchNonSpace = /\S+/g; 324 325jQuery.fn.removeAttr = function( name ) { 326 var self = this; 327
328 jQuery.each( name.match( rmatchNonSpace ), function( _i, attr ) { 329 if ( jQuery.expr.match.bool.test( attr ) ) { 330 migrateWarn( "jQuery.fn.removeAttr no longer sets boolean properties: " + attr ); 331 self.prop( attr, false ); 332 } 333 } ); 334 335 return oldRemoveAttr.apply( this, arguments ); 336}; 337 338jQuery.fn.toggleClass = function( state ) { 339 340 // Only deprecating no-args or single boolean arg 341 if ( state !== undefined && typeof state !== "boolean" ) { 342 return oldToggleClass.apply( this, arguments ); 343 } 344 345 migrateWarn( "jQuery.fn.toggleClass( boolean ) is deprecated" ); 346 347 // Toggle entire class name of each element 348 return this.each( function() { 349 var className = this.getAttribute && this.getAttribute( "class" ) || ""; 350 351 if ( className ) { 352 jQuery.data( this, "__className__", className ); 353 } 354 355 // If the element has a class name or if we're passed `false`, 356 // then remove the whole classname (if there was one, the above saved it). 357 // Otherwise bring back whatever was previously saved (if anything), 358 // falling back to the empty string if nothing was stored. 359 if ( this.setAttribute ) { 360 this.setAttribute( "class", 361 className || state === false ? 362 "" : 363 jQuery.data( this, "__className__" ) || "" 364 ); 365 } 366 } ); 367}; 368 369function camelCase( string ) { 370 return string.replace( /-([a-z])/g, function( _, letter ) { 371 return letter.toUpperCase(); 372 } ); 373} 374 375var oldFnCss, 376 internalSwapCall = false, 377 ralphaStart = /^[a-z]/, 378 379 // The regex visualized: 380 // 381 // /----------\ 382 // | | /-------\ 383 // | / Top \ | | | 384 // /--- Border ---+-| Right |-+---+- Width -+---\ 385 // | | Bottom | | 386 // | \ Left / | 387 // | | 388 // | /----------\ | 389 // | /-------------\ | | |- END 390 // | | | | / Top \ | | 391 // | | / Margin \ | | | Right | | | 392 // |---------+-| |-+---+-| Bottom |-+----| 393 // | \ Padding / \ Left / | 394 // BEGIN -| | 395 // | /---------\ | 396 // | | | | 397 // | | / Min \ | / Width \ | 398 // \--------------+-| |-+---| |---/ 399 // \ Max / \ Height / 400 rautoPx = /^(?:Border(?:Top|Right|Bottom|Left)?(?:Width|)|(?:Margin|Padding)?(?:Top|Right|Bottom|Left)?|(?:Min|Max)?(?:Width|Height))$/; 401 402// If this version of jQuery has .swap(), don't false-alarm on internal uses 403if ( jQuery.swap ) { 404 jQuery.each( [ "height", "width", "reliableMarginRight" ], function( _, name ) { 405 var oldHook = jQuery.cssHooks[ name ] && jQuery.cssHooks[ name ].get; 406 407 if ( oldHook ) { 408 jQuery.cssHooks[ name ].get = function() { 409 var ret; 410 411 internalSwapCall = true; 412 ret = oldHook.apply( this, arguments ); 413 internalSwapCall = false; 414 return ret; 415 }; 416 } 417 } ); 418} 419 420jQuery.swap = function( elem, options, callback, args ) { 421 var ret, name, 422 old = {}; 423 424 if ( !internalSwapCall ) { 425 migrateWarn( "jQuery.swap() is undocumented and deprecated" ); 426 } 427 428 // Remember the old values, and insert the new ones 429 for ( name in options ) { 430 old[ name ] = elem.style[ name ]; 431 elem.style[ name ] = options[ name ]; 432 } 433 434 ret = callback.apply( elem, args || [] ); 435 436 // Revert the old values 437 for ( name in options ) { 438 elem.style[ name ] = old[ name ]; 439 } 440 441 return ret; 442}; 443 444if ( jQueryVersionSince( "3.4.0" ) && typeof Proxy !== "undefined" ) { 445 446 jQuery.cssProps = new Proxy( jQuery.cssProps || {}, { 447 set: function() { 448 migrateWarn( "JQMIGRATE: jQuery.cssProps is deprecated" ); 449 return Reflect.set.apply( this, arguments ); 450 } 451 } ); 452} 453 454// Create a dummy jQuery.cssNumber if missing. It won't be used by jQuery but 455// it will prevent code adding new keys to it unconditionally from crashing. 456if ( !jQuery.cssNumber ) { 457 jQuery.cssNumber = {}; 458} 459 460function isAutoPx( prop ) { 461 462 // The first test is used to ensure that: 463 // 1. The prop starts with a lowercase letter (as we uppercase it for the second regex). 464 // 2. The prop is not empty. 465 return ralphaStart.test( prop ) && 466 rautoPx.test( prop[ 0 ].toUpperCase() + prop.slice( 1 ) ); 467} 468 469oldFnCss = jQuery.fn.css; 470 471jQuery.fn.css = function( name, value ) { 472 var camelName, 473 origThis = this; 474 if ( name && typeof name === "object" && !Array.isArray( name ) ) { 475 jQuery.each( name, function( n, v ) { 476 jQuery.fn.css.call( origThis, n, v ); 477 } ); 478 } 479 if ( typeof value === "number" ) { 480 camelName = camelCase( name ); 481 if ( !isAutoPx( camelName ) && !jQuery.cssNumber[ camelName ] ) { 482 migrateWarn( "Number-typed values are deprecated for jQuery.fn.css( \"" + 483 name + "\", value )" ); 484 } 485 } 486 487 return oldFnCss.apply( this, arguments ); 488}; 489 490var oldData = jQuery.data; 491 492jQuery.data = function( elem, name, value ) { 493 var curData, sameKeys, key; 494 495 // Name can be an object, and each entry in the object is meant to be set as data 496 if ( name && typeof name === "object" && arguments.length === 2 ) { 497 curData = jQuery.hasData( elem ) && oldData.call( this, elem ); 498 sameKeys = {}; 499 for ( key in name ) { 500 if ( key !== camelCase( key ) ) { 501 migrateWarn( "jQuery.data() always sets/gets camelCased names: " + key ); 502 curData[ key ] = name[ key ]; 503 } else { 504 sameKeys[ key ] = name[ key ]; 505 } 506 } 507 508 oldData.call( this, elem, sameKeys ); 509 510 return name; 511 } 512 513 // If the name is transformed, look for the un-transformed name in the data object 514 if ( name && typeof name === "string" && name !== camelCase( name ) ) { 515 curData = jQuery.hasData( elem ) && oldData.call( this, elem ); 516 if ( curData && name in curData ) { 517 migrateWarn( "jQuery.data() always sets/gets camelCased names: " + name ); 518 if ( arguments.length > 2 ) { 519 curData[ name ] = value; 520 } 521 return curData[ name ]; 522 } 523 } 524 525 return oldData.apply( this, arguments ); 526}; 527 528// Support jQuery slim which excludes the effects module 529if ( jQuery.fx ) { 530 531var intervalValue, intervalMsg, 532 oldTweenRun = jQuery.Tween.prototype.run, 533 linearEasing = function( pct ) { 534 return pct; 535 }; 536 537jQuery.Tween.prototype.run = function( ) { 538 if ( jQuery.easing[ this.easing ].length > 1 ) { 539 migrateWarn( 540 "'jQuery.easing." + this.easing.toString() + "' should use only one argument" 541 ); 542 543 jQuery.easing[ this.easing ] = linearEasing; 544 } 545 546 oldTweenRun.apply( this, arguments ); 547}; 548 549intervalValue = jQuery.fx.interval || 13; 550intervalMsg = "jQuery.fx.interval is deprecated"; 551 552// Support: IE9, Android <=4.4 553// Avoid false positives on browsers that lack rAF 554// Don't warn if document is hidden, jQuery uses setTimeout (#292) 555if ( window.requestAnimationFrame ) { 556 Object.defineProperty( jQuery.fx, "interval", { 557 configurable: true, 558 enumerable: true, 559 get: function() { 560 if ( !window.document.hidden ) { 561 migrateWarn( intervalMsg ); 562 } 563 return intervalValue; 564 }, 565 set: function( newValue ) { 566 migrateWarn( intervalMsg ); 567 intervalValue = newValue; 568 } 569 } ); 570} 571 572} 573 574var oldLoad = jQuery.fn.load, 575 oldEventAdd = jQuery.event.add, 576 originalFix = jQuery.event.fix; 577 578jQuery.event.props = []; 579jQuery.event.fixHooks = {}; 580 581migrateWarnProp( jQuery.event.props, "concat", jQuery.event.props.concat, 582 "jQuery.event.props.concat() is deprecated and removed" ); 583 584jQuery.event.fix = function( originalEvent ) { 585 var event, 586 type = originalEvent.type, 587 fixHook = this.fixHooks[ type ], 588 props = jQuery.event.props; 589 590 if ( props.length ) { 591 migrateWarn( "jQuery.event.props are deprecated and removed: " + props.join() ); 592 while ( props.length ) { 593 jQuery.event.addProp( props.pop() ); 594 } 595 } 596 597 if ( fixHook && !fixHook._migrated_ ) { 598 fixHook._migrated_ = true; 599 migrateWarn( "jQuery.event.fixHooks are deprecated and removed: " + type ); 600 if ( ( props = fixHook.props ) && props.length ) { 601 while ( props.length ) { 602 jQuery.event.addProp( props.pop() ); 603 } 604 } 605 } 606 607 event = originalFix.call( this, originalEvent ); 608 609 return fixHook && fixHook.filter ? fixHook.filter( event, originalEvent ) : event; 610}; 611 612jQuery.event.add = function( elem, types ) { 613 614 // This misses the multiple-types case but that seems awfully rare 615 if ( elem === window && types === "load" && window.document.readyState === "complete" ) { 616 migrateWarn( "jQuery(window).on('load'...) called after load event occurred" ); 617 } 618 return oldEventAdd.apply( this, arguments ); 619}; 620 621jQuery.each( [ "load", "unload", "error" ], function( _, name ) { 622 623 jQuery.fn[ name ] = function() { 624 var args = Array.prototype.slice.call( arguments, 0 ); 625 626 // If this is an ajax load() the first arg should be the string URL; 627 // technically this could also be the "Anything" arg of the event .load() 628 // which just goes to show why this dumb signature has been deprecated! 629 // jQuery custom builds that exclude the Ajax module justifiably die here. 630 if ( name === "load" && typeof args[ 0 ] === "string" ) { 631 return oldLoad.apply( this, args ); 632 } 633 634 migrateWarn( "jQuery.fn." + name + "() is deprecated" ); 635 636 args.splice( 0, 0, name ); 637 if ( arguments.length ) { 638 return this.on.apply( this, args ); 639 } 640 641 // Use .triggerHandler here because: 642 // - load and unload events don't need to bubble, only applied to window or image 643 // - error event should not bubble to window, although it does pre-1.7 644 // See http://bugs.jquery.com/ticket/11820 645 this.triggerHandler.apply( this, args ); 646 return this; 647 }; 648 649} ); 650 651jQuery.each( ( "blur focus focusin focusout resize scroll click dblclick " + 652 "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " + 653 "change select submit keydown keypress keyup contextmenu" ).split( " " ), 654 function( _i, name ) { 655 656 // Handle event binding 657 jQuery.fn[ name ] = function( data, fn ) { 658 migrateWarn( "jQuery.fn." + name + "() event shorthand is deprecated" ); 659 return arguments.length > 0 ? 660 this.on( name, null, data, fn ) : 661 this.trigger( name ); 662 }; 663} ); 664 665// Trigger "ready" event only once, on document ready 666jQuery( function() { 667 jQuery( window.document ).triggerHandler( "ready" ); 668} ); 669 670jQuery.event.special.ready = { 671 setup: function() { 672 if ( this === window.document ) { 673 migrateWarn( "'ready' event is deprecated" ); 674 } 675 } 676}; 677 678jQuery.fn.extend( { 679 680 bind: function( types, data, fn ) { 681 migrateWarn( "jQuery.fn.bind() is deprecated" ); 682 return this.on( types, null, data, fn ); 683 }, 684 unbind: function( types, fn ) { 685 migrateWarn( "jQuery.fn.unbind() is deprecated" ); 686 return this.off( types, null, fn ); 687 }, 688 delegate: function( selector, types, data, fn ) { 689 migrateWarn( "jQuery.fn.delegate() is deprecated" ); 690 return this.on( types, selector, data, fn ); 691 }, 692 undelegate: function( selector, types, fn ) { 693 migrateWarn( "jQuery.fn.undelegate() is deprecated" ); 694 return arguments.length === 1 ? 695 this.off( selector, "**" ) : 696 this.off( types, selector || "**", fn ); 697 }, 698 hover: function( fnOver, fnOut ) { 699 migrateWarn( "jQuery.fn.hover() is deprecated" ); 700 return this.on( "mouseenter", fnOver ).on( "mouseleave", fnOut || fnOver ); 701 } 702} ); 703 704var rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi, 705 origHtmlPrefilter = jQuery.htmlPrefilter, 706 makeMarkup = function( html ) { 707 var doc = window.document.implementation.createHTMLDocument( "" ); 708 doc.body.innerHTML = html; 709 return doc.body && doc.body.innerHTML; 710 }, 711 warnIfChanged = function( html ) { 712 var changed = html.replace( rxhtmlTag, "<$1></$2>" ); 713 if ( changed !== html && makeMarkup( html ) !== makeMarkup( changed ) ) { 714 migrateWarn( "HTML tags must be properly nested and closed: " + html ); 715 } 716 }; 717 718jQuery.UNSAFE_restoreLegacyHtmlPrefilter = function() { 719 jQuery.htmlPrefilter = function( html ) { 720 warnIfChanged( html ); 721 return html.replace( rxhtmlTag, "<$1></$2>" ); 722 }; 723}; 724 725jQuery.htmlPrefilter = function( html ) { 726 warnIfChanged( html ); 727 return origHtmlPrefilter( html ); 728}; 729 730var oldOffset = jQuery.fn.offset; 731 732jQuery.fn.offset = function() { 733 var elem = this[ 0 ]; 734 735 if ( elem && ( !elem.nodeType || !elem.getBoundingClientRect ) ) { 736 migrateWarn( "jQuery.fn.offset() requires a valid DOM element" );
737 return arguments.length ? this : undefined; 738 } 739 740 return oldOffset.apply( this, arguments ); 741}; 742 743// Support jQuery slim which excludes the ajax module 744// The jQuery.param patch is about respecting `jQuery.ajaxSettings.traditional` 745// so it doesn't make sense for the slim build. 746if ( jQuery.ajax ) { 747 748var oldParam = jQuery.param; 749 750jQuery.param = function( data, traditional ) { 751 var ajaxTraditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional; 752 753 if ( traditional === undefined && ajaxTraditional ) { 754 755 migrateWarn( "jQuery.param() no longer uses jQuery.ajaxSettings.traditional" ); 756 traditional = ajaxTraditional; 757 } 758 759 return oldParam.call( this, data, traditional ); 760}; 761 762} 763 764var oldSelf = jQuery.fn.andSelf || jQuery.fn.addBack; 765 766jQuery.fn.andSelf = function() { 767 migrateWarn( "jQuery.fn.andSelf() is deprecated and removed, use jQuery.fn.addBack()" ); 768 return oldSelf.apply( this, arguments ); 769}; 770 771// Support jQuery slim which excludes the deferred module in jQuery 4.0+ 772if ( jQuery.Deferred ) { 773 774var oldDeferred = jQuery.Deferred, 775 tuples = [ 776 777 // Action, add listener, callbacks, .then handlers, final state 778 [ "resolve", "done", jQuery.Callbacks( "once memory" ), 779 jQuery.Callbacks( "once memory" ), "resolved" ], 780 [ "reject", "fail", jQuery.Callbacks( "once memory" ), 781 jQuery.Callbacks( "once memory" ), "rejected" ], 782 [ "notify", "progress", jQuery.Callbacks( "memory" ), 783 jQuery.Callbacks( "memory" ) ] 784 ]; 785 786jQuery.Deferred = function( func ) { 787 var deferred = oldDeferred(), 788 promise = deferred.promise(); 789 790 deferred.pipe = promise.pipe = function( /* fnDone, fnFail, fnProgress */ ) { 791 var fns = arguments; 792 793 migrateWarn( "deferred.pipe() is deprecated" ); 794 795 return jQuery.Deferred( function( newDefer ) { 796 jQuery.each( tuples, function( i, tuple ) { 797 var fn = typeof fns[ i ] === "function" && fns[ i ]; 798 799 // Deferred.done(function() { bind to newDefer or newDefer.resolve }) 800 // deferred.fail(function() { bind to newDefer or newDefer.reject }) 801 // deferred.progress(function() { bind to newDefer or newDefer.notify }) 802 deferred[ tuple[ 1 ] ]( function() { 803 var returned = fn && fn.apply( this, arguments ); 804 if ( returned && typeof returned.promise === "function" ) { 805 returned.promise() 806 .done( newDefer.resolve ) 807 .fail( newDefer.reject ) 808 .progress( newDefer.notify ); 809 } else { 810 newDefer[ tuple[ 0 ] + "With" ]( 811 this === promise ? newDefer.promise() : this, 812 fn ? [ returned ] : arguments 813 ); 814 } 815 } ); 816 } ); 817 fns = null; 818 } ).promise(); 819 820 }; 821 822 if ( func ) { 823 func.call( deferred, deferred ); 824 } 825 826 return deferred; 827}; 828 829// Preserve handler of uncaught exceptions in promise chains 830jQuery.Deferred.exceptionHook = oldDeferred.exceptionHook; 831 832} 833 834return jQuery; 835} );
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.