diff options
Diffstat (limited to 'npm_assets/node_modules/jquery/src')
18 files changed, 111 insertions, 102 deletions
diff --git a/npm_assets/node_modules/jquery/src/ajax.js b/npm_assets/node_modules/jquery/src/ajax.js index d1bebd5..4be4a9e 100644 --- a/npm_assets/node_modules/jquery/src/ajax.js +++ b/npm_assets/node_modules/jquery/src/ajax.js @@ -50,7 +50,8 @@ var // Anchor tag for parsing the document origin originAnchor = document.createElement( "a" ); - originAnchor.href = location.href; + +originAnchor.href = location.href; // Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport function addToPrefiltersOrTransports( structure ) { @@ -431,8 +432,8 @@ jQuery.extend( { // Context for global events is callbackContext if it is a DOM node or jQuery collection globalEventContext = s.context && ( callbackContext.nodeType || callbackContext.jquery ) ? - jQuery( callbackContext ) : - jQuery.event, + jQuery( callbackContext ) : + jQuery.event, // Deferreds deferred = jQuery.Deferred(), @@ -744,8 +745,10 @@ jQuery.extend( { response = ajaxHandleResponses( s, jqXHR, responses ); } - // Use a noop converter for missing script - if ( !isSuccess && jQuery.inArray( "script", s.dataTypes ) > -1 ) { + // Use a noop converter for missing script but not if jsonp + if ( !isSuccess && + jQuery.inArray( "script", s.dataTypes ) > -1 && + jQuery.inArray( "json", s.dataTypes ) < 0 ) { s.converters[ "text script" ] = function() {}; } diff --git a/npm_assets/node_modules/jquery/src/attributes/classes.js b/npm_assets/node_modules/jquery/src/attributes/classes.js index 0c90a8d..23e4847 100644 --- a/npm_assets/node_modules/jquery/src/attributes/classes.js +++ b/npm_assets/node_modules/jquery/src/attributes/classes.js @@ -159,8 +159,8 @@ jQuery.fn.extend( { if ( this.setAttribute ) { this.setAttribute( "class", className || value === false ? - "" : - dataPriv.get( this, "__className__" ) || "" + "" : + dataPriv.get( this, "__className__" ) || "" ); } } @@ -175,7 +175,7 @@ jQuery.fn.extend( { while ( ( elem = this[ i++ ] ) ) { if ( elem.nodeType === 1 && ( " " + stripAndCollapse( getClass( elem ) ) + " " ).indexOf( className ) > -1 ) { - return true; + return true; } } diff --git a/npm_assets/node_modules/jquery/src/core.js b/npm_assets/node_modules/jquery/src/core.js index d43cae3..03eefa7 100644 --- a/npm_assets/node_modules/jquery/src/core.js +++ b/npm_assets/node_modules/jquery/src/core.js @@ -26,7 +26,7 @@ define( [ "use strict"; var - version = "3.5.1", + version = "3.6.0", // Define a local copy of jQuery jQuery = function( selector, context ) { @@ -280,7 +280,7 @@ jQuery.extend( { if ( isArrayLike( Object( arr ) ) ) { jQuery.merge( ret, typeof arr === "string" ? - [ arr ] : arr + [ arr ] : arr ); } else { push.call( ret, arr ); @@ -375,9 +375,9 @@ if ( typeof Symbol === "function" ) { // Populate the class2type map jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ), -function( _i, name ) { - class2type[ "[object " + name + "]" ] = name.toLowerCase(); -} ); + function( _i, name ) { + class2type[ "[object " + name + "]" ] = name.toLowerCase(); + } ); function isArrayLike( obj ) { diff --git a/npm_assets/node_modules/jquery/src/core/access.js b/npm_assets/node_modules/jquery/src/core/access.js index 54bcc74..524c980 100644 --- a/npm_assets/node_modules/jquery/src/core/access.js +++ b/npm_assets/node_modules/jquery/src/core/access.js @@ -48,8 +48,8 @@ var access = function( elems, fn, key, value, chainable, emptyGet, raw ) { for ( ; i < len; i++ ) { fn( elems[ i ], key, raw ? - value : - value.call( elems[ i ], i, fn( elems[ i ], key ) ) + value : + value.call( elems[ i ], i, fn( elems[ i ], key ) ) ); } } diff --git a/npm_assets/node_modules/jquery/src/core/nodeName.js b/npm_assets/node_modules/jquery/src/core/nodeName.js index 8a5f5f0..ef1b80b 100644 --- a/npm_assets/node_modules/jquery/src/core/nodeName.js +++ b/npm_assets/node_modules/jquery/src/core/nodeName.js @@ -4,9 +4,9 @@ define( function() { function nodeName( elem, name ) { - return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); + return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); -}; +} return nodeName; diff --git a/npm_assets/node_modules/jquery/src/core/parseXML.js b/npm_assets/node_modules/jquery/src/core/parseXML.js index acf7ab2..9b5d290 100644 --- a/npm_assets/node_modules/jquery/src/core/parseXML.js +++ b/npm_assets/node_modules/jquery/src/core/parseXML.js @@ -6,7 +6,7 @@ define( [ // Cross-browser xml parsing jQuery.parseXML = function( data ) { - var xml; + var xml, parserErrorElem; if ( !data || typeof data !== "string" ) { return null; } @@ -15,12 +15,17 @@ jQuery.parseXML = function( data ) { // IE throws on parseFromString with invalid input. try { xml = ( new window.DOMParser() ).parseFromString( data, "text/xml" ); - } catch ( e ) { - xml = undefined; - } + } catch ( e ) {} - if ( !xml || xml.getElementsByTagName( "parsererror" ).length ) { - jQuery.error( "Invalid XML: " + data ); + parserErrorElem = xml && xml.getElementsByTagName( "parsererror" )[ 0 ]; + if ( !xml || parserErrorElem ) { + jQuery.error( "Invalid XML: " + ( + parserErrorElem ? + jQuery.map( parserErrorElem.childNodes, function( el ) { + return el.textContent; + } ).join( "\n" ) : + data + ) ); } return xml; }; diff --git a/npm_assets/node_modules/jquery/src/css.js b/npm_assets/node_modules/jquery/src/css.js index a7a7061..a41cc2c 100644 --- a/npm_assets/node_modules/jquery/src/css.js +++ b/npm_assets/node_modules/jquery/src/css.js @@ -370,10 +370,10 @@ jQuery.each( [ "height", "width" ], function( _i, dimension ) { // Running getBoundingClientRect on a disconnected node // in IE throws an error. ( !elem.getClientRects().length || !elem.getBoundingClientRect().width ) ? - swap( elem, cssShow, function() { - return getWidthOrHeight( elem, dimension, extra ); - } ) : - getWidthOrHeight( elem, dimension, extra ); + swap( elem, cssShow, function() { + return getWidthOrHeight( elem, dimension, extra ); + } ) : + getWidthOrHeight( elem, dimension, extra ); } }, @@ -432,7 +432,7 @@ jQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft, swap( elem, { marginLeft: 0 }, function() { return elem.getBoundingClientRect().left; } ) - ) + "px"; + ) + "px"; } } ); diff --git a/npm_assets/node_modules/jquery/src/css/support.js b/npm_assets/node_modules/jquery/src/css/support.js index fb2a1b2..3a9d25c 100644 --- a/npm_assets/node_modules/jquery/src/css/support.js +++ b/npm_assets/node_modules/jquery/src/css/support.js @@ -102,6 +102,10 @@ define( [ // set in CSS while `offset*` properties report correct values. // Behavior in IE 9 is more subtle than in newer versions & it passes // some versions of this test; make sure not to make it pass there! + // + // Support: Firefox 70+ + // Only Firefox includes border widths + // in computed dimensions. (gh-4529) reliableTrDimensions: function() { var table, tr, trChild, trStyle; if ( reliableTrDimensionsVal == null ) { @@ -109,17 +113,32 @@ define( [ tr = document.createElement( "tr" ); trChild = document.createElement( "div" ); - table.style.cssText = "position:absolute;left:-11111px"; + table.style.cssText = "position:absolute;left:-11111px;border-collapse:separate"; + tr.style.cssText = "border:1px solid"; + + // Support: Chrome 86+ + // Height set through cssText does not get applied. + // Computed height then comes back as 0. tr.style.height = "1px"; trChild.style.height = "9px"; + // Support: Android 8 Chrome 86+ + // In our bodyBackground.html iframe, + // display for all div elements is set to "inline", + // which causes a problem only in Android 8 Chrome 86. + // Ensuring the div is display: block + // gets around this issue. + trChild.style.display = "block"; + documentElement .appendChild( table ) .appendChild( tr ) .appendChild( trChild ); trStyle = window.getComputedStyle( tr ); - reliableTrDimensionsVal = parseInt( trStyle.height ) > 3; + reliableTrDimensionsVal = ( parseInt( trStyle.height, 10 ) + + parseInt( trStyle.borderTopWidth, 10 ) + + parseInt( trStyle.borderBottomWidth, 10 ) ) === tr.offsetHeight; documentElement.removeChild( table ); } diff --git a/npm_assets/node_modules/jquery/src/deferred.js b/npm_assets/node_modules/jquery/src/deferred.js index c05a37a..439653f 100644 --- a/npm_assets/node_modules/jquery/src/deferred.js +++ b/npm_assets/node_modules/jquery/src/deferred.js @@ -359,8 +359,8 @@ jQuery.extend( { resolveContexts = Array( i ), resolveValues = slice.call( arguments ), - // the master Deferred - master = jQuery.Deferred(), + // the primary Deferred + primary = jQuery.Deferred(), // subordinate callback factory updateFunc = function( i ) { @@ -368,30 +368,30 @@ jQuery.extend( { resolveContexts[ i ] = this; resolveValues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value; if ( !( --remaining ) ) { - master.resolveWith( resolveContexts, resolveValues ); + primary.resolveWith( resolveContexts, resolveValues ); } }; }; // Single- and empty arguments are adopted like Promise.resolve if ( remaining <= 1 ) { - adoptValue( singleValue, master.done( updateFunc( i ) ).resolve, master.reject, + adoptValue( singleValue, primary.done( updateFunc( i ) ).resolve, primary.reject, !remaining ); // Use .then() to unwrap secondary thenables (cf. gh-3000) - if ( master.state() === "pending" || + if ( primary.state() === "pending" || isFunction( resolveValues[ i ] && resolveValues[ i ].then ) ) { - return master.then(); + return primary.then(); } } // Multiple arguments are aggregated like Promise.all array elements while ( i-- ) { - adoptValue( resolveValues[ i ], updateFunc( i ), master.reject ); + adoptValue( resolveValues[ i ], updateFunc( i ), primary.reject ); } - return master.promise(); + return primary.promise(); } } ); diff --git a/npm_assets/node_modules/jquery/src/deprecated/event.js b/npm_assets/node_modules/jquery/src/deprecated/event.js index d2d26bc..d46a3b8 100644 --- a/npm_assets/node_modules/jquery/src/deprecated/event.js +++ b/npm_assets/node_modules/jquery/src/deprecated/event.js @@ -32,7 +32,8 @@ jQuery.fn.extend( { } } ); -jQuery.each( ( "blur focus focusin focusout resize scroll click dblclick " + +jQuery.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( _i, name ) { @@ -43,6 +44,7 @@ jQuery.each( ( "blur focus focusin focusout resize scroll click dblclick " + this.on( name, null, data, fn ) : this.trigger( name ); }; - } ); + } +); } ); diff --git a/npm_assets/node_modules/jquery/src/dimensions.js b/npm_assets/node_modules/jquery/src/dimensions.js index 2a2c039..5d12450 100644 --- a/npm_assets/node_modules/jquery/src/dimensions.js +++ b/npm_assets/node_modules/jquery/src/dimensions.js @@ -9,8 +9,11 @@ define( [ // Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods jQuery.each( { Height: "height", Width: "width" }, function( name, type ) { - jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name }, - function( defaultExtra, funcName ) { + jQuery.each( { + padding: "inner" + name, + content: type, + "": "outer" + name + }, function( defaultExtra, funcName ) { // Margin is only for outerHeight, outerWidth jQuery.fn[ funcName ] = function( margin, value ) { diff --git a/npm_assets/node_modules/jquery/src/effects.js b/npm_assets/node_modules/jquery/src/effects.js index 76b7cc7..4c011b1 100644 --- a/npm_assets/node_modules/jquery/src/effects.js +++ b/npm_assets/node_modules/jquery/src/effects.js @@ -230,7 +230,7 @@ function defaultPrefilter( elem, props, opts ) { anim.done( function() { - /* eslint-enable no-loop-func */ + /* eslint-enable no-loop-func */ // The final step of a "hide" animation is actually hiding the element if ( !hidden ) { @@ -350,7 +350,7 @@ function Animation( elem, properties, options ) { tweens: [], createTween: function( prop, end ) { var tween = jQuery.Tween( elem, animation.opts, prop, end, - animation.opts.specialEasing[ prop ] || animation.opts.easing ); + animation.opts.specialEasing[ prop ] || animation.opts.easing ); animation.tweens.push( tween ); return tween; }, @@ -523,7 +523,8 @@ jQuery.fn.extend( { anim.stop( true ); } }; - doAnimation.finish = doAnimation; + + doAnimation.finish = doAnimation; return empty || optall.queue === false ? this.each( doAnimation ) : diff --git a/npm_assets/node_modules/jquery/src/effects/Tween.js b/npm_assets/node_modules/jquery/src/effects/Tween.js index bf501ea..c452b7f 100644 --- a/npm_assets/node_modules/jquery/src/effects/Tween.js +++ b/npm_assets/node_modules/jquery/src/effects/Tween.js @@ -87,7 +87,7 @@ Tween.propHooks = { if ( jQuery.fx.step[ tween.prop ] ) { jQuery.fx.step[ tween.prop ]( tween ); } else if ( tween.elem.nodeType === 1 && ( - jQuery.cssHooks[ tween.prop ] || + jQuery.cssHooks[ tween.prop ] || tween.elem.style[ finalPropName( tween.prop ) ] != null ) ) { jQuery.style( tween.elem, tween.prop, tween.now + tween.unit ); } else { diff --git a/npm_assets/node_modules/jquery/src/event.js b/npm_assets/node_modules/jquery/src/event.js index 6510d6a..a954400 100644 --- a/npm_assets/node_modules/jquery/src/event.js +++ b/npm_assets/node_modules/jquery/src/event.js @@ -17,10 +17,7 @@ define( [ "use strict"; -var - rkeyEvent = /^key/, - rmouseEvent = /^(?:mouse|pointer|contextmenu|drag|drop)|click/, - rtypenamespace = /^([^.]*)(?:\.(.+)|)/; +var rtypenamespace = /^([^.]*)(?:\.(.+)|)/; function returnTrue() { return true; @@ -315,8 +312,8 @@ jQuery.event = { event = jQuery.event.fix( nativeEvent ), handlers = ( - dataPriv.get( this, "events" ) || Object.create( null ) - )[ event.type ] || [], + dataPriv.get( this, "events" ) || Object.create( null ) + )[ event.type ] || [], special = jQuery.event.special[ event.type ] || {}; // Use the fix-ed jQuery.Event rather than the (read-only) native event @@ -440,12 +437,12 @@ jQuery.event = { get: isFunction( hook ) ? function() { if ( this.originalEvent ) { - return hook( this.originalEvent ); + return hook( this.originalEvent ); } } : function() { if ( this.originalEvent ) { - return this.originalEvent[ name ]; + return this.originalEvent[ name ]; } }, @@ -584,7 +581,13 @@ function leverageNative( el, type, expectSync ) { // Cancel the outer synthetic event event.stopImmediatePropagation(); event.preventDefault(); - return result.value; + + // Support: Chrome 86+ + // In Chrome, if an element having a focusout handler is blurred by + // clicking outside of it, it invokes the handler synchronously. If + // that handler calls `.remove()` on the element, the data is cleared, + // leaving `result` undefined. We need to guard against this. + return result && result.value; } // If this is an inner synthetic event for an event with a bubbling surrogate @@ -749,34 +752,7 @@ jQuery.each( { targetTouches: true, toElement: true, touches: true, - - which: function( event ) { - var button = event.button; - - // Add which for key events - if ( event.which == null && rkeyEvent.test( event.type ) ) { - return event.charCode != null ? event.charCode : event.keyCode; - } - - // Add which for click: 1 === left; 2 === middle; 3 === right - if ( !event.which && button !== undefined && rmouseEvent.test( event.type ) ) { - if ( button & 1 ) { - return 1; - } - - if ( button & 2 ) { - return 3; - } - - if ( button & 4 ) { - return 2; - } - - return 0; - } - - return event.which; - } + which: true }, jQuery.event.addProp ); jQuery.each( { focus: "focusin", blur: "focusout" }, function( type, delegateType ) { @@ -802,6 +778,12 @@ jQuery.each( { focus: "focusin", blur: "focusout" }, function( type, delegateTyp return true; }, + // Suppress native focus or blur as it's already being fired + // in leverageNative. + _default: function() { + return true; + }, + delegateType: delegateType }; } ); diff --git a/npm_assets/node_modules/jquery/src/event/trigger.js b/npm_assets/node_modules/jquery/src/event/trigger.js index c3769e1..2f5e65e 100644 --- a/npm_assets/node_modules/jquery/src/event/trigger.js +++ b/npm_assets/node_modules/jquery/src/event/trigger.js @@ -103,9 +103,7 @@ jQuery.extend( jQuery.event, { special.bindType || type; // jQuery handler - handle = ( - dataPriv.get( cur, "events" ) || Object.create( null ) - )[ event.type ] && + handle = ( dataPriv.get( cur, "events" ) || Object.create( null ) )[ event.type ] && dataPriv.get( cur, "handle" ); if ( handle ) { handle.apply( cur, data ); diff --git a/npm_assets/node_modules/jquery/src/offset.js b/npm_assets/node_modules/jquery/src/offset.js index 62166bc..6e97358 100644 --- a/npm_assets/node_modules/jquery/src/offset.js +++ b/npm_assets/node_modules/jquery/src/offset.js @@ -63,12 +63,6 @@ jQuery.offset = { options.using.call( elem, props ); } else { - if ( typeof props.top === "number" ) { - props.top += "px"; - } - if ( typeof props.left === "number" ) { - props.left += "px"; - } curElem.css( props ); } } diff --git a/npm_assets/node_modules/jquery/src/serialize.js b/npm_assets/node_modules/jquery/src/serialize.js index cd4e99f..11a8624 100644 --- a/npm_assets/node_modules/jquery/src/serialize.js +++ b/npm_assets/node_modules/jquery/src/serialize.js @@ -105,16 +105,14 @@ jQuery.fn.extend( { // Can add propHook for "elements" to filter or add form elements var elements = jQuery.prop( this, "elements" ); return elements ? jQuery.makeArray( elements ) : this; - } ) - .filter( function() { + } ).filter( function() { var type = this.type; // Use .is( ":disabled" ) so that fieldset[disabled] works return this.name && !jQuery( this ).is( ":disabled" ) && rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) && ( this.checked || !rcheckableType.test( type ) ); - } ) - .map( function( _i, elem ) { + } ).map( function( _i, elem ) { var val = jQuery( this ).val(); if ( val == null ) { diff --git a/npm_assets/node_modules/jquery/src/var/isFunction.js b/npm_assets/node_modules/jquery/src/var/isFunction.js index dad662e..6e2d3a7 100644 --- a/npm_assets/node_modules/jquery/src/var/isFunction.js +++ b/npm_assets/node_modules/jquery/src/var/isFunction.js @@ -3,11 +3,15 @@ define( function() { return function isFunction( obj ) { - // Support: Chrome <=57, Firefox <=52 - // In some browsers, typeof returns "function" for HTML <object> elements - // (i.e., `typeof document.createElement( "object" ) === "function"`). - // We don't want to classify *any* DOM node as a function. - return typeof obj === "function" && typeof obj.nodeType !== "number"; - }; + // Support: Chrome <=57, Firefox <=52 + // In some browsers, typeof returns "function" for HTML <object> elements + // (i.e., `typeof document.createElement( "object" ) === "function"`). + // We don't want to classify *any* DOM node as a function. + // Support: QtWeb <=3.8.5, WebKit <=534.34, wkhtmltopdf tool <=0.12.5 + // Plus for old WebKit, typeof returns "function" for HTML collections + // (e.g., `typeof document.getElementsByTagName("div") === "function"`). (gh-4756) + return typeof obj === "function" && typeof obj.nodeType !== "number" && + typeof obj.item !== "function"; + }; } ); |
