mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update components
This commit is contained in:
parent
0c7088e379
commit
cf2c7ca241
157 changed files with 2861 additions and 2975 deletions
470
dashboard-ui/bower_components/jquery/dist/jquery.js
vendored
470
dashboard-ui/bower_components/jquery/dist/jquery.js
vendored
|
@ -1,6 +1,5 @@
|
|||
/*eslint-disable no-unused-vars*/
|
||||
/*!
|
||||
* jQuery JavaScript Library v3.1.0
|
||||
* jQuery JavaScript Library v3.1.1
|
||||
* https://jquery.com/
|
||||
*
|
||||
* Includes Sizzle.js
|
||||
|
@ -10,7 +9,7 @@
|
|||
* Released under the MIT license
|
||||
* https://jquery.org/license
|
||||
*
|
||||
* Date: 2016-07-07T21:44Z
|
||||
* Date: 2016-09-22T22:30Z
|
||||
*/
|
||||
( function( global, factory ) {
|
||||
|
||||
|
@ -83,13 +82,13 @@ var support = {};
|
|||
doc.head.appendChild( script ).parentNode.removeChild( script );
|
||||
}
|
||||
/* global Symbol */
|
||||
// Defining this global in .eslintrc would create a danger of using the global
|
||||
// Defining this global in .eslintrc.json would create a danger of using the global
|
||||
// unguarded in another place, it seems safer to define global only for this module
|
||||
|
||||
|
||||
|
||||
var
|
||||
version = "3.1.0",
|
||||
version = "3.1.1",
|
||||
|
||||
// Define a local copy of jQuery
|
||||
jQuery = function( selector, context ) {
|
||||
|
@ -129,13 +128,14 @@ jQuery.fn = jQuery.prototype = {
|
|||
// Get the Nth element in the matched element set OR
|
||||
// Get the whole matched element set as a clean array
|
||||
get: function( num ) {
|
||||
return num != null ?
|
||||
|
||||
// Return just the one element from the set
|
||||
( num < 0 ? this[ num + this.length ] : this[ num ] ) :
|
||||
// Return all the elements in a clean array
|
||||
if ( num == null ) {
|
||||
return slice.call( this );
|
||||
}
|
||||
|
||||
// Return all the elements in a clean array
|
||||
slice.call( this );
|
||||
// Return just the one element from the set
|
||||
return num < 0 ? this[ num + this.length ] : this[ num ];
|
||||
},
|
||||
|
||||
// Take an array of elements and push it onto the stack
|
||||
|
@ -543,14 +543,14 @@ function isArrayLike( obj ) {
|
|||
}
|
||||
var Sizzle =
|
||||
/*!
|
||||
* Sizzle CSS Selector Engine v2.3.0
|
||||
* Sizzle CSS Selector Engine v2.3.3
|
||||
* https://sizzlejs.com/
|
||||
*
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
* Released under the MIT license
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* Date: 2016-01-04
|
||||
* Date: 2016-08-08
|
||||
*/
|
||||
(function( window ) {
|
||||
|
||||
|
@ -696,7 +696,7 @@ var i,
|
|||
|
||||
// CSS string/identifier serialization
|
||||
// https://drafts.csswg.org/cssom/#common-serializing-idioms
|
||||
rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g,
|
||||
rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,
|
||||
fcssescape = function( ch, asCodePoint ) {
|
||||
if ( asCodePoint ) {
|
||||
|
||||
|
@ -723,7 +723,7 @@ var i,
|
|||
|
||||
disabledAncestor = addCombinator(
|
||||
function( elem ) {
|
||||
return elem.disabled === true;
|
||||
return elem.disabled === true && ("form" in elem || "label" in elem);
|
||||
},
|
||||
{ dir: "parentNode", next: "legend" }
|
||||
);
|
||||
|
@ -1009,26 +1009,54 @@ function createButtonPseudo( type ) {
|
|||
* @param {Boolean} disabled true for :disabled; false for :enabled
|
||||
*/
|
||||
function createDisabledPseudo( disabled ) {
|
||||
// Known :disabled false positives:
|
||||
// IE: *[disabled]:not(button, input, select, textarea, optgroup, option, menuitem, fieldset)
|
||||
// not IE: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable
|
||||
|
||||
// Known :disabled false positives: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable
|
||||
return function( elem ) {
|
||||
|
||||
// Check form elements and option elements for explicit disabling
|
||||
return "label" in elem && elem.disabled === disabled ||
|
||||
"form" in elem && elem.disabled === disabled ||
|
||||
// Only certain elements can match :enabled or :disabled
|
||||
// https://html.spec.whatwg.org/multipage/scripting.html#selector-enabled
|
||||
// https://html.spec.whatwg.org/multipage/scripting.html#selector-disabled
|
||||
if ( "form" in elem ) {
|
||||
|
||||
// Check non-disabled form elements for fieldset[disabled] ancestors
|
||||
"form" in elem && elem.disabled === false && (
|
||||
// Support: IE6-11+
|
||||
// Ancestry is covered for us
|
||||
elem.isDisabled === disabled ||
|
||||
// Check for inherited disabledness on relevant non-disabled elements:
|
||||
// * listed form-associated elements in a disabled fieldset
|
||||
// https://html.spec.whatwg.org/multipage/forms.html#category-listed
|
||||
// https://html.spec.whatwg.org/multipage/forms.html#concept-fe-disabled
|
||||
// * option elements in a disabled optgroup
|
||||
// https://html.spec.whatwg.org/multipage/forms.html#concept-option-disabled
|
||||
// All such elements have a "form" property.
|
||||
if ( elem.parentNode && elem.disabled === false ) {
|
||||
|
||||
// Otherwise, assume any non-<option> under fieldset[disabled] is disabled
|
||||
/* jshint -W018 */
|
||||
elem.isDisabled !== !disabled &&
|
||||
("label" in elem || !disabledAncestor( elem )) !== disabled
|
||||
);
|
||||
// Option elements defer to a parent optgroup if present
|
||||
if ( "label" in elem ) {
|
||||
if ( "label" in elem.parentNode ) {
|
||||
return elem.parentNode.disabled === disabled;
|
||||
} else {
|
||||
return elem.disabled === disabled;
|
||||
}
|
||||
}
|
||||
|
||||
// Support: IE 6 - 11
|
||||
// Use the isDisabled shortcut property to check for disabled fieldset ancestors
|
||||
return elem.isDisabled === disabled ||
|
||||
|
||||
// Where there is no isDisabled, check manually
|
||||
/* jshint -W018 */
|
||||
elem.isDisabled !== !disabled &&
|
||||
disabledAncestor( elem ) === disabled;
|
||||
}
|
||||
|
||||
return elem.disabled === disabled;
|
||||
|
||||
// Try to winnow out elements that can't be disabled before trusting the disabled property.
|
||||
// Some victims get caught in our net (label, legend, menu, track), but it shouldn't
|
||||
// even exist on them, let alone have a boolean value.
|
||||
} else if ( "label" in elem ) {
|
||||
return elem.disabled === disabled;
|
||||
}
|
||||
|
||||
// Remaining elements are neither :enabled nor :disabled
|
||||
return false;
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -1144,25 +1172,21 @@ setDocument = Sizzle.setDocument = function( node ) {
|
|||
return !document.getElementsByName || !document.getElementsByName( expando ).length;
|
||||
});
|
||||
|
||||
// ID find and filter
|
||||
// ID filter and find
|
||||
if ( support.getById ) {
|
||||
Expr.find["ID"] = function( id, context ) {
|
||||
if ( typeof context.getElementById !== "undefined" && documentIsHTML ) {
|
||||
var m = context.getElementById( id );
|
||||
return m ? [ m ] : [];
|
||||
}
|
||||
};
|
||||
Expr.filter["ID"] = function( id ) {
|
||||
var attrId = id.replace( runescape, funescape );
|
||||
return function( elem ) {
|
||||
return elem.getAttribute("id") === attrId;
|
||||
};
|
||||
};
|
||||
Expr.find["ID"] = function( id, context ) {
|
||||
if ( typeof context.getElementById !== "undefined" && documentIsHTML ) {
|
||||
var elem = context.getElementById( id );
|
||||
return elem ? [ elem ] : [];
|
||||
}
|
||||
};
|
||||
} else {
|
||||
// Support: IE6/7
|
||||
// getElementById is not reliable as a find shortcut
|
||||
delete Expr.find["ID"];
|
||||
|
||||
Expr.filter["ID"] = function( id ) {
|
||||
var attrId = id.replace( runescape, funescape );
|
||||
return function( elem ) {
|
||||
|
@ -1171,6 +1195,36 @@ setDocument = Sizzle.setDocument = function( node ) {
|
|||
return node && node.value === attrId;
|
||||
};
|
||||
};
|
||||
|
||||
// Support: IE 6 - 7 only
|
||||
// getElementById is not reliable as a find shortcut
|
||||
Expr.find["ID"] = function( id, context ) {
|
||||
if ( typeof context.getElementById !== "undefined" && documentIsHTML ) {
|
||||
var node, i, elems,
|
||||
elem = context.getElementById( id );
|
||||
|
||||
if ( elem ) {
|
||||
|
||||
// Verify the id attribute
|
||||
node = elem.getAttributeNode("id");
|
||||
if ( node && node.value === id ) {
|
||||
return [ elem ];
|
||||
}
|
||||
|
||||
// Fall back on getElementsByName
|
||||
elems = context.getElementsByName( id );
|
||||
i = 0;
|
||||
while ( (elem = elems[i++]) ) {
|
||||
node = elem.getAttributeNode("id");
|
||||
if ( node && node.value === id ) {
|
||||
return [ elem ];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return [];
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
// Tag
|
||||
|
@ -2211,6 +2265,7 @@ function addCombinator( matcher, combinator, base ) {
|
|||
return matcher( elem, context, xml );
|
||||
}
|
||||
}
|
||||
return false;
|
||||
} :
|
||||
|
||||
// Check against all ancestor/preceding elements
|
||||
|
@ -2255,6 +2310,7 @@ function addCombinator( matcher, combinator, base ) {
|
|||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -2617,8 +2673,7 @@ select = Sizzle.select = function( selector, context, results, seed ) {
|
|||
// Reduce context if the leading compound selector is an ID
|
||||
tokens = match[0] = match[0].slice( 0 );
|
||||
if ( tokens.length > 2 && (token = tokens[0]).type === "ID" &&
|
||||
support.getById && context.nodeType === 9 && documentIsHTML &&
|
||||
Expr.relative[ tokens[1].type ] ) {
|
||||
context.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[1].type ] ) {
|
||||
|
||||
context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];
|
||||
if ( !context ) {
|
||||
|
@ -2800,24 +2855,29 @@ function winnow( elements, qualifier, not ) {
|
|||
return jQuery.grep( elements, function( elem, i ) {
|
||||
return !!qualifier.call( elem, i, elem ) !== not;
|
||||
} );
|
||||
|
||||
}
|
||||
|
||||
// Single element
|
||||
if ( qualifier.nodeType ) {
|
||||
return jQuery.grep( elements, function( elem ) {
|
||||
return ( elem === qualifier ) !== not;
|
||||
} );
|
||||
|
||||
}
|
||||
|
||||
if ( typeof qualifier === "string" ) {
|
||||
if ( risSimple.test( qualifier ) ) {
|
||||
return jQuery.filter( qualifier, elements, not );
|
||||
}
|
||||
|
||||
qualifier = jQuery.filter( qualifier, elements );
|
||||
// Arraylike of elements (jQuery, arguments, Array)
|
||||
if ( typeof qualifier !== "string" ) {
|
||||
return jQuery.grep( elements, function( elem ) {
|
||||
return ( indexOf.call( qualifier, elem ) > -1 ) !== not;
|
||||
} );
|
||||
}
|
||||
|
||||
// Simple selector that can be filtered directly, removing non-Elements
|
||||
if ( risSimple.test( qualifier ) ) {
|
||||
return jQuery.filter( qualifier, elements, not );
|
||||
}
|
||||
|
||||
// Complex selector, compare the two sets, removing non-Elements
|
||||
qualifier = jQuery.filter( qualifier, elements );
|
||||
return jQuery.grep( elements, function( elem ) {
|
||||
return ( indexOf.call( qualifier, elem ) > -1 ) !== not && elem.nodeType === 1;
|
||||
} );
|
||||
|
@ -2830,11 +2890,13 @@ jQuery.filter = function( expr, elems, not ) {
|
|||
expr = ":not(" + expr + ")";
|
||||
}
|
||||
|
||||
return elems.length === 1 && elem.nodeType === 1 ?
|
||||
jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] :
|
||||
jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {
|
||||
return elem.nodeType === 1;
|
||||
} ) );
|
||||
if ( elems.length === 1 && elem.nodeType === 1 ) {
|
||||
return jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [];
|
||||
}
|
||||
|
||||
return jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {
|
||||
return elem.nodeType === 1;
|
||||
} ) );
|
||||
};
|
||||
|
||||
jQuery.fn.extend( {
|
||||
|
@ -3162,14 +3224,14 @@ jQuery.each( {
|
|||
return this.pushStack( matched );
|
||||
};
|
||||
} );
|
||||
var rnotwhite = ( /\S+/g );
|
||||
var rnothtmlwhite = ( /[^\x20\t\r\n\f]+/g );
|
||||
|
||||
|
||||
|
||||
// Convert String-formatted options into Object-formatted ones
|
||||
function createOptions( options ) {
|
||||
var object = {};
|
||||
jQuery.each( options.match( rnotwhite ) || [], function( _, flag ) {
|
||||
jQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) {
|
||||
object[ flag ] = true;
|
||||
} );
|
||||
return object;
|
||||
|
@ -3934,13 +3996,16 @@ var access = function( elems, fn, key, value, chainable, emptyGet, raw ) {
|
|||
}
|
||||
}
|
||||
|
||||
return chainable ?
|
||||
elems :
|
||||
if ( chainable ) {
|
||||
return elems;
|
||||
}
|
||||
|
||||
// Gets
|
||||
bulk ?
|
||||
fn.call( elems ) :
|
||||
len ? fn( elems[ 0 ], key ) : emptyGet;
|
||||
// Gets
|
||||
if ( bulk ) {
|
||||
return fn.call( elems );
|
||||
}
|
||||
|
||||
return len ? fn( elems[ 0 ], key ) : emptyGet;
|
||||
};
|
||||
var acceptData = function( owner ) {
|
||||
|
||||
|
@ -4077,7 +4142,7 @@ Data.prototype = {
|
|||
// Otherwise, create an array by matching non-whitespace
|
||||
key = key in cache ?
|
||||
[ key ] :
|
||||
( key.match( rnotwhite ) || [] );
|
||||
( key.match( rnothtmlwhite ) || [] );
|
||||
}
|
||||
|
||||
i = key.length;
|
||||
|
@ -4125,6 +4190,31 @@ var dataUser = new Data();
|
|||
var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,
|
||||
rmultiDash = /[A-Z]/g;
|
||||
|
||||
function getData( data ) {
|
||||
if ( data === "true" ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if ( data === "false" ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( data === "null" ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// Only convert to a number if it doesn't change the string
|
||||
if ( data === +data + "" ) {
|
||||
return +data;
|
||||
}
|
||||
|
||||
if ( rbrace.test( data ) ) {
|
||||
return JSON.parse( data );
|
||||
}
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function dataAttr( elem, key, data ) {
|
||||
var name;
|
||||
|
||||
|
@ -4136,14 +4226,7 @@ function dataAttr( elem, key, data ) {
|
|||
|
||||
if ( typeof data === "string" ) {
|
||||
try {
|
||||
data = data === "true" ? true :
|
||||
data === "false" ? false :
|
||||
data === "null" ? null :
|
||||
|
||||
// Only convert to a number if it doesn't change the string
|
||||
+data + "" === data ? +data :
|
||||
rbrace.test( data ) ? JSON.parse( data ) :
|
||||
data;
|
||||
data = getData( data );
|
||||
} catch ( e ) {}
|
||||
|
||||
// Make sure we set the data so it isn't changed later
|
||||
|
@ -4520,7 +4603,7 @@ function getDefaultDisplay( elem ) {
|
|||
return display;
|
||||
}
|
||||
|
||||
temp = doc.body.appendChild( doc.createElement( nodeName ) ),
|
||||
temp = doc.body.appendChild( doc.createElement( nodeName ) );
|
||||
display = jQuery.css( temp, "display" );
|
||||
|
||||
temp.parentNode.removeChild( temp );
|
||||
|
@ -4638,15 +4721,23 @@ function getAll( context, tag ) {
|
|||
|
||||
// Support: IE <=9 - 11 only
|
||||
// Use typeof to avoid zero-argument method invocation on host objects (#15151)
|
||||
var ret = typeof context.getElementsByTagName !== "undefined" ?
|
||||
context.getElementsByTagName( tag || "*" ) :
|
||||
typeof context.querySelectorAll !== "undefined" ?
|
||||
context.querySelectorAll( tag || "*" ) :
|
||||
[];
|
||||
var ret;
|
||||
|
||||
return tag === undefined || tag && jQuery.nodeName( context, tag ) ?
|
||||
jQuery.merge( [ context ], ret ) :
|
||||
ret;
|
||||
if ( typeof context.getElementsByTagName !== "undefined" ) {
|
||||
ret = context.getElementsByTagName( tag || "*" );
|
||||
|
||||
} else if ( typeof context.querySelectorAll !== "undefined" ) {
|
||||
ret = context.querySelectorAll( tag || "*" );
|
||||
|
||||
} else {
|
||||
ret = [];
|
||||
}
|
||||
|
||||
if ( tag === undefined || tag && jQuery.nodeName( context, tag ) ) {
|
||||
return jQuery.merge( [ context ], ret );
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
|
@ -4920,7 +5011,7 @@ jQuery.event = {
|
|||
}
|
||||
|
||||
// Handle multiple events separated by a space
|
||||
types = ( types || "" ).match( rnotwhite ) || [ "" ];
|
||||
types = ( types || "" ).match( rnothtmlwhite ) || [ "" ];
|
||||
t = types.length;
|
||||
while ( t-- ) {
|
||||
tmp = rtypenamespace.exec( types[ t ] ) || [];
|
||||
|
@ -5002,7 +5093,7 @@ jQuery.event = {
|
|||
}
|
||||
|
||||
// Once for each type.namespace in types; type may be omitted
|
||||
types = ( types || "" ).match( rnotwhite ) || [ "" ];
|
||||
types = ( types || "" ).match( rnothtmlwhite ) || [ "" ];
|
||||
t = types.length;
|
||||
while ( t-- ) {
|
||||
tmp = rtypenamespace.exec( types[ t ] ) || [];
|
||||
|
@ -5128,51 +5219,58 @@ jQuery.event = {
|
|||
},
|
||||
|
||||
handlers: function( event, handlers ) {
|
||||
var i, matches, sel, handleObj,
|
||||
var i, handleObj, sel, matchedHandlers, matchedSelectors,
|
||||
handlerQueue = [],
|
||||
delegateCount = handlers.delegateCount,
|
||||
cur = event.target;
|
||||
|
||||
// Support: IE <=9
|
||||
// Find delegate handlers
|
||||
// Black-hole SVG <use> instance trees (#13180)
|
||||
//
|
||||
// Support: Firefox <=42
|
||||
// Avoid non-left-click in FF but don't block IE radio events (#3861, gh-2343)
|
||||
if ( delegateCount && cur.nodeType &&
|
||||
( event.type !== "click" || isNaN( event.button ) || event.button < 1 ) ) {
|
||||
if ( delegateCount &&
|
||||
|
||||
// Support: IE <=9
|
||||
// Black-hole SVG <use> instance trees (trac-13180)
|
||||
cur.nodeType &&
|
||||
|
||||
// Support: Firefox <=42
|
||||
// Suppress spec-violating clicks indicating a non-primary pointer button (trac-3861)
|
||||
// https://www.w3.org/TR/DOM-Level-3-Events/#event-type-click
|
||||
// Support: IE 11 only
|
||||
// ...but not arrow key "clicks" of radio inputs, which can have `button` -1 (gh-2343)
|
||||
!( event.type === "click" && event.button >= 1 ) ) {
|
||||
|
||||
for ( ; cur !== this; cur = cur.parentNode || this ) {
|
||||
|
||||
// Don't check non-elements (#13208)
|
||||
// Don't process clicks on disabled elements (#6911, #8165, #11382, #11764)
|
||||
if ( cur.nodeType === 1 && ( cur.disabled !== true || event.type !== "click" ) ) {
|
||||
matches = [];
|
||||
if ( cur.nodeType === 1 && !( event.type === "click" && cur.disabled === true ) ) {
|
||||
matchedHandlers = [];
|
||||
matchedSelectors = {};
|
||||
for ( i = 0; i < delegateCount; i++ ) {
|
||||
handleObj = handlers[ i ];
|
||||
|
||||
// Don't conflict with Object.prototype properties (#13203)
|
||||
sel = handleObj.selector + " ";
|
||||
|
||||
if ( matches[ sel ] === undefined ) {
|
||||
matches[ sel ] = handleObj.needsContext ?
|
||||
if ( matchedSelectors[ sel ] === undefined ) {
|
||||
matchedSelectors[ sel ] = handleObj.needsContext ?
|
||||
jQuery( sel, this ).index( cur ) > -1 :
|
||||
jQuery.find( sel, this, null, [ cur ] ).length;
|
||||
}
|
||||
if ( matches[ sel ] ) {
|
||||
matches.push( handleObj );
|
||||
if ( matchedSelectors[ sel ] ) {
|
||||
matchedHandlers.push( handleObj );
|
||||
}
|
||||
}
|
||||
if ( matches.length ) {
|
||||
handlerQueue.push( { elem: cur, handlers: matches } );
|
||||
if ( matchedHandlers.length ) {
|
||||
handlerQueue.push( { elem: cur, handlers: matchedHandlers } );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Add the remaining (directly-bound) handlers
|
||||
cur = this;
|
||||
if ( delegateCount < handlers.length ) {
|
||||
handlerQueue.push( { elem: this, handlers: handlers.slice( delegateCount ) } );
|
||||
handlerQueue.push( { elem: cur, handlers: handlers.slice( delegateCount ) } );
|
||||
}
|
||||
|
||||
return handlerQueue;
|
||||
|
@ -5406,7 +5504,19 @@ jQuery.each( {
|
|||
|
||||
// Add which for click: 1 === left; 2 === middle; 3 === right
|
||||
if ( !event.which && button !== undefined && rmouseEvent.test( event.type ) ) {
|
||||
return ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) );
|
||||
if ( button & 1 ) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
if ( button & 2 ) {
|
||||
return 3;
|
||||
}
|
||||
|
||||
if ( button & 4 ) {
|
||||
return 2;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
return event.which;
|
||||
|
@ -6162,16 +6272,18 @@ function setPositiveNumber( elem, value, subtract ) {
|
|||
}
|
||||
|
||||
function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) {
|
||||
var i = extra === ( isBorderBox ? "border" : "content" ) ?
|
||||
|
||||
// If we already have the right measurement, avoid augmentation
|
||||
4 :
|
||||
|
||||
// Otherwise initialize for horizontal or vertical properties
|
||||
name === "width" ? 1 : 0,
|
||||
|
||||
var i,
|
||||
val = 0;
|
||||
|
||||
// If we already have the right measurement, avoid augmentation
|
||||
if ( extra === ( isBorderBox ? "border" : "content" ) ) {
|
||||
i = 4;
|
||||
|
||||
// Otherwise initialize for horizontal or vertical properties
|
||||
} else {
|
||||
i = name === "width" ? 1 : 0;
|
||||
}
|
||||
|
||||
for ( ; i < 4; i += 2 ) {
|
||||
|
||||
// Both box models exclude margin, so add it if we want it
|
||||
|
@ -7024,7 +7136,7 @@ jQuery.Animation = jQuery.extend( Animation, {
|
|||
callback = props;
|
||||
props = [ "*" ];
|
||||
} else {
|
||||
props = props.match( rnotwhite );
|
||||
props = props.match( rnothtmlwhite );
|
||||
}
|
||||
|
||||
var prop,
|
||||
|
@ -7062,9 +7174,14 @@ jQuery.speed = function( speed, easing, fn ) {
|
|||
opt.duration = 0;
|
||||
|
||||
} else {
|
||||
opt.duration = typeof opt.duration === "number" ?
|
||||
opt.duration : opt.duration in jQuery.fx.speeds ?
|
||||
jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default;
|
||||
if ( typeof opt.duration !== "number" ) {
|
||||
if ( opt.duration in jQuery.fx.speeds ) {
|
||||
opt.duration = jQuery.fx.speeds[ opt.duration ];
|
||||
|
||||
} else {
|
||||
opt.duration = jQuery.fx.speeds._default;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Normalize opt.queue - true/undefined/null -> "fx"
|
||||
|
@ -7414,7 +7531,10 @@ jQuery.extend( {
|
|||
removeAttr: function( elem, value ) {
|
||||
var name,
|
||||
i = 0,
|
||||
attrNames = value && value.match( rnotwhite );
|
||||
|
||||
// Attribute names can contain non-HTML whitespace characters
|
||||
// https://html.spec.whatwg.org/multipage/syntax.html#attributes-2
|
||||
attrNames = value && value.match( rnothtmlwhite );
|
||||
|
||||
if ( attrNames && elem.nodeType === 1 ) {
|
||||
while ( ( name = attrNames[ i++ ] ) ) {
|
||||
|
@ -7521,12 +7641,19 @@ jQuery.extend( {
|
|||
// Use proper attribute retrieval(#12072)
|
||||
var tabindex = jQuery.find.attr( elem, "tabindex" );
|
||||
|
||||
return tabindex ?
|
||||
parseInt( tabindex, 10 ) :
|
||||
if ( tabindex ) {
|
||||
return parseInt( tabindex, 10 );
|
||||
}
|
||||
|
||||
if (
|
||||
rfocusable.test( elem.nodeName ) ||
|
||||
rclickable.test( elem.nodeName ) && elem.href ?
|
||||
0 :
|
||||
-1;
|
||||
rclickable.test( elem.nodeName ) &&
|
||||
elem.href
|
||||
) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -7543,9 +7670,14 @@ jQuery.extend( {
|
|||
// on the option
|
||||
// The getter ensures a default option is selected
|
||||
// when in an optgroup
|
||||
// eslint rule "no-unused-expressions" is disabled for this code
|
||||
// since it considers such accessions noop
|
||||
if ( !support.optSelected ) {
|
||||
jQuery.propHooks.selected = {
|
||||
get: function( elem ) {
|
||||
|
||||
/* eslint no-unused-expressions: "off" */
|
||||
|
||||
var parent = elem.parentNode;
|
||||
if ( parent && parent.parentNode ) {
|
||||
parent.parentNode.selectedIndex;
|
||||
|
@ -7553,6 +7685,9 @@ if ( !support.optSelected ) {
|
|||
return null;
|
||||
},
|
||||
set: function( elem ) {
|
||||
|
||||
/* eslint no-unused-expressions: "off" */
|
||||
|
||||
var parent = elem.parentNode;
|
||||
if ( parent ) {
|
||||
parent.selectedIndex;
|
||||
|
@ -7583,7 +7718,13 @@ jQuery.each( [
|
|||
|
||||
|
||||
|
||||
var rclass = /[\t\r\n\f]/g;
|
||||
// Strip and collapse whitespace according to HTML spec
|
||||
// https://html.spec.whatwg.org/multipage/infrastructure.html#strip-and-collapse-whitespace
|
||||
function stripAndCollapse( value ) {
|
||||
var tokens = value.match( rnothtmlwhite ) || [];
|
||||
return tokens.join( " " );
|
||||
}
|
||||
|
||||
|
||||
function getClass( elem ) {
|
||||
return elem.getAttribute && elem.getAttribute( "class" ) || "";
|
||||
|
@ -7601,12 +7742,11 @@ jQuery.fn.extend( {
|
|||
}
|
||||
|
||||
if ( typeof value === "string" && value ) {
|
||||
classes = value.match( rnotwhite ) || [];
|
||||
classes = value.match( rnothtmlwhite ) || [];
|
||||
|
||||
while ( ( elem = this[ i++ ] ) ) {
|
||||
curValue = getClass( elem );
|
||||
cur = elem.nodeType === 1 &&
|
||||
( " " + curValue + " " ).replace( rclass, " " );
|
||||
cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " );
|
||||
|
||||
if ( cur ) {
|
||||
j = 0;
|
||||
|
@ -7617,7 +7757,7 @@ jQuery.fn.extend( {
|
|||
}
|
||||
|
||||
// Only assign if different to avoid unneeded rendering.
|
||||
finalValue = jQuery.trim( cur );
|
||||
finalValue = stripAndCollapse( cur );
|
||||
if ( curValue !== finalValue ) {
|
||||
elem.setAttribute( "class", finalValue );
|
||||
}
|
||||
|
@ -7643,14 +7783,13 @@ jQuery.fn.extend( {
|
|||
}
|
||||
|
||||
if ( typeof value === "string" && value ) {
|
||||
classes = value.match( rnotwhite ) || [];
|
||||
classes = value.match( rnothtmlwhite ) || [];
|
||||
|
||||
while ( ( elem = this[ i++ ] ) ) {
|
||||
curValue = getClass( elem );
|
||||
|
||||
// This expression is here for better compressibility (see addClass)
|
||||
cur = elem.nodeType === 1 &&
|
||||
( " " + curValue + " " ).replace( rclass, " " );
|
||||
cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " );
|
||||
|
||||
if ( cur ) {
|
||||
j = 0;
|
||||
|
@ -7663,7 +7802,7 @@ jQuery.fn.extend( {
|
|||
}
|
||||
|
||||
// Only assign if different to avoid unneeded rendering.
|
||||
finalValue = jQuery.trim( cur );
|
||||
finalValue = stripAndCollapse( cur );
|
||||
if ( curValue !== finalValue ) {
|
||||
elem.setAttribute( "class", finalValue );
|
||||
}
|
||||
|
@ -7698,7 +7837,7 @@ jQuery.fn.extend( {
|
|||
// Toggle individual class names
|
||||
i = 0;
|
||||
self = jQuery( this );
|
||||
classNames = value.match( rnotwhite ) || [];
|
||||
classNames = value.match( rnothtmlwhite ) || [];
|
||||
|
||||
while ( ( className = classNames[ i++ ] ) ) {
|
||||
|
||||
|
@ -7741,10 +7880,8 @@ jQuery.fn.extend( {
|
|||
className = " " + selector + " ";
|
||||
while ( ( elem = this[ i++ ] ) ) {
|
||||
if ( elem.nodeType === 1 &&
|
||||
( " " + getClass( elem ) + " " ).replace( rclass, " " )
|
||||
.indexOf( className ) > -1
|
||||
) {
|
||||
return true;
|
||||
( " " + stripAndCollapse( getClass( elem ) ) + " " ).indexOf( className ) > -1 ) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -7755,8 +7892,7 @@ jQuery.fn.extend( {
|
|||
|
||||
|
||||
|
||||
var rreturn = /\r/g,
|
||||
rspaces = /[\x20\t\r\n\f]+/g;
|
||||
var rreturn = /\r/g;
|
||||
|
||||
jQuery.fn.extend( {
|
||||
val: function( value ) {
|
||||
|
@ -7777,13 +7913,13 @@ jQuery.fn.extend( {
|
|||
|
||||
ret = elem.value;
|
||||
|
||||
return typeof ret === "string" ?
|
||||
// Handle most common string cases
|
||||
if ( typeof ret === "string" ) {
|
||||
return ret.replace( rreturn, "" );
|
||||
}
|
||||
|
||||
// Handle most common string cases
|
||||
ret.replace( rreturn, "" ) :
|
||||
|
||||
// Handle cases where value is null/undef or number
|
||||
ret == null ? "" : ret;
|
||||
// Handle cases where value is null/undef or number
|
||||
return ret == null ? "" : ret;
|
||||
}
|
||||
|
||||
return;
|
||||
|
@ -7840,20 +7976,24 @@ jQuery.extend( {
|
|||
// option.text throws exceptions (#14686, #14858)
|
||||
// Strip and collapse whitespace
|
||||
// https://html.spec.whatwg.org/#strip-and-collapse-whitespace
|
||||
jQuery.trim( jQuery.text( elem ) ).replace( rspaces, " " );
|
||||
stripAndCollapse( jQuery.text( elem ) );
|
||||
}
|
||||
},
|
||||
select: {
|
||||
get: function( elem ) {
|
||||
var value, option,
|
||||
var value, option, i,
|
||||
options = elem.options,
|
||||
index = elem.selectedIndex,
|
||||
one = elem.type === "select-one",
|
||||
values = one ? null : [],
|
||||
max = one ? index + 1 : options.length,
|
||||
i = index < 0 ?
|
||||
max :
|
||||
one ? index : 0;
|
||||
max = one ? index + 1 : options.length;
|
||||
|
||||
if ( index < 0 ) {
|
||||
i = max;
|
||||
|
||||
} else {
|
||||
i = one ? index : 0;
|
||||
}
|
||||
|
||||
// Loop through all the selected options
|
||||
for ( ; i < max; i++ ) {
|
||||
|
@ -8307,13 +8447,17 @@ jQuery.fn.extend( {
|
|||
.map( function( i, elem ) {
|
||||
var val = jQuery( this ).val();
|
||||
|
||||
return val == null ?
|
||||
null :
|
||||
jQuery.isArray( val ) ?
|
||||
jQuery.map( val, function( val ) {
|
||||
return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
|
||||
} ) :
|
||||
{ name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
|
||||
if ( val == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if ( jQuery.isArray( val ) ) {
|
||||
return jQuery.map( val, function( val ) {
|
||||
return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
|
||||
} );
|
||||
}
|
||||
|
||||
return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
|
||||
} ).get();
|
||||
}
|
||||
} );
|
||||
|
@ -8322,7 +8466,7 @@ jQuery.fn.extend( {
|
|||
var
|
||||
r20 = /%20/g,
|
||||
rhash = /#.*$/,
|
||||
rts = /([?&])_=[^&]*/,
|
||||
rantiCache = /([?&])_=[^&]*/,
|
||||
rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg,
|
||||
|
||||
// #7653, #8125, #8152: local protocol detection
|
||||
|
@ -8368,7 +8512,7 @@ function addToPrefiltersOrTransports( structure ) {
|
|||
|
||||
var dataType,
|
||||
i = 0,
|
||||
dataTypes = dataTypeExpression.toLowerCase().match( rnotwhite ) || [];
|
||||
dataTypes = dataTypeExpression.toLowerCase().match( rnothtmlwhite ) || [];
|
||||
|
||||
if ( jQuery.isFunction( func ) ) {
|
||||
|
||||
|
@ -8836,7 +8980,7 @@ jQuery.extend( {
|
|||
s.type = options.method || options.type || s.method || s.type;
|
||||
|
||||
// Extract dataTypes list
|
||||
s.dataTypes = ( s.dataType || "*" ).toLowerCase().match( rnotwhite ) || [ "" ];
|
||||
s.dataTypes = ( s.dataType || "*" ).toLowerCase().match( rnothtmlwhite ) || [ "" ];
|
||||
|
||||
// A cross-domain request is in order when the origin doesn't match the current origin.
|
||||
if ( s.crossDomain == null ) {
|
||||
|
@ -8908,9 +9052,9 @@ jQuery.extend( {
|
|||
delete s.data;
|
||||
}
|
||||
|
||||
// Add anti-cache in uncached url if needed
|
||||
// Add or update anti-cache param if needed
|
||||
if ( s.cache === false ) {
|
||||
cacheURL = cacheURL.replace( rts, "" );
|
||||
cacheURL = cacheURL.replace( rantiCache, "$1" );
|
||||
uncached = ( rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + ( nonce++ ) + uncached;
|
||||
}
|
||||
|
||||
|
@ -9649,7 +9793,7 @@ jQuery.fn.load = function( url, params, callback ) {
|
|||
off = url.indexOf( " " );
|
||||
|
||||
if ( off > -1 ) {
|
||||
selector = jQuery.trim( url.slice( off ) );
|
||||
selector = stripAndCollapse( url.slice( off ) );
|
||||
url = url.slice( 0, off );
|
||||
}
|
||||
|
||||
|
@ -10041,7 +10185,6 @@ if ( typeof define === "function" && define.amd ) {
|
|||
|
||||
|
||||
|
||||
|
||||
var
|
||||
|
||||
// Map over jQuery in case of overwrite
|
||||
|
@ -10070,5 +10213,8 @@ if ( !noGlobal ) {
|
|||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return jQuery;
|
||||
} );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue