| Download
Reference manual of the SageMath package kerrgeodesic_gw
Project: Sagittarius
Views: 7654License: GPL3
Image: ubuntu2004
/*!1* jQuery JavaScript Library v3.5.12* https://jquery.com/3*4* Includes Sizzle.js5* https://sizzlejs.com/6*7* Copyright JS Foundation and other contributors8* Released under the MIT license9* https://jquery.org/license10*11* Date: 2020-05-04T22:49Z12*/13( function( global, factory ) {1415"use strict";1617if ( typeof module === "object" && typeof module.exports === "object" ) {1819// For CommonJS and CommonJS-like environments where a proper `window`20// is present, execute the factory and get jQuery.21// For environments that do not have a `window` with a `document`22// (such as Node.js), expose a factory as module.exports.23// This accentuates the need for the creation of a real `window`.24// e.g. var jQuery = require("jquery")(window);25// See ticket #14549 for more info.26module.exports = global.document ?27factory( global, true ) :28function( w ) {29if ( !w.document ) {30throw new Error( "jQuery requires a window with a document" );31}32return factory( w );33};34} else {35factory( global );36}3738// Pass this if window is not defined yet39} )( typeof window !== "undefined" ? window : this, function( window, noGlobal ) {4041// Edge <= 12 - 13+, Firefox <=18 - 45+, IE 10 - 11, Safari 5.1 - 9+, iOS 6 - 9.142// throw exceptions when non-strict code (e.g., ASP.NET 4.5) accesses strict mode43// arguments.callee.caller (trac-13335). But as of jQuery 3.0 (2016), strict mode should be common44// enough that all such attempts are guarded in a try block.45"use strict";4647var arr = [];4849var getProto = Object.getPrototypeOf;5051var slice = arr.slice;5253var flat = arr.flat ? function( array ) {54return arr.flat.call( array );55} : function( array ) {56return arr.concat.apply( [], array );57};585960var push = arr.push;6162var indexOf = arr.indexOf;6364var class2type = {};6566var toString = class2type.toString;6768var hasOwn = class2type.hasOwnProperty;6970var fnToString = hasOwn.toString;7172var ObjectFunctionString = fnToString.call( Object );7374var support = {};7576var isFunction = function isFunction( obj ) {7778// Support: Chrome <=57, Firefox <=5279// In some browsers, typeof returns "function" for HTML <object> elements80// (i.e., `typeof document.createElement( "object" ) === "function"`).81// We don't want to classify *any* DOM node as a function.82return typeof obj === "function" && typeof obj.nodeType !== "number";83};848586var isWindow = function isWindow( obj ) {87return obj != null && obj === obj.window;88};899091var document = window.document;92939495var preservedScriptAttributes = {96type: true,97src: true,98nonce: true,99noModule: true100};101102function DOMEval( code, node, doc ) {103doc = doc || document;104105var i, val,106script = doc.createElement( "script" );107108script.text = code;109if ( node ) {110for ( i in preservedScriptAttributes ) {111112// Support: Firefox 64+, Edge 18+113// Some browsers don't support the "nonce" property on scripts.114// On the other hand, just using `getAttribute` is not enough as115// the `nonce` attribute is reset to an empty string whenever it116// becomes browsing-context connected.117// See https://github.com/whatwg/html/issues/2369118// See https://html.spec.whatwg.org/#nonce-attributes119// The `node.getAttribute` check was added for the sake of120// `jQuery.globalEval` so that it can fake a nonce-containing node121// via an object.122val = node[ i ] || node.getAttribute && node.getAttribute( i );123if ( val ) {124script.setAttribute( i, val );125}126}127}128doc.head.appendChild( script ).parentNode.removeChild( script );129}130131132function toType( obj ) {133if ( obj == null ) {134return obj + "";135}136137// Support: Android <=2.3 only (functionish RegExp)138return typeof obj === "object" || typeof obj === "function" ?139class2type[ toString.call( obj ) ] || "object" :140typeof obj;141}142/* global Symbol */143// Defining this global in .eslintrc.json would create a danger of using the global144// unguarded in another place, it seems safer to define global only for this module145146147148var149version = "3.5.1",150151// Define a local copy of jQuery152jQuery = function( selector, context ) {153154// The jQuery object is actually just the init constructor 'enhanced'155// Need init if jQuery is called (just allow error to be thrown if not included)156return new jQuery.fn.init( selector, context );157};158159jQuery.fn = jQuery.prototype = {160161// The current version of jQuery being used162jquery: version,163164constructor: jQuery,165166// The default length of a jQuery object is 0167length: 0,168169toArray: function() {170return slice.call( this );171},172173// Get the Nth element in the matched element set OR174// Get the whole matched element set as a clean array175get: function( num ) {176177// Return all the elements in a clean array178if ( num == null ) {179return slice.call( this );180}181182// Return just the one element from the set183return num < 0 ? this[ num + this.length ] : this[ num ];184},185186// Take an array of elements and push it onto the stack187// (returning the new matched element set)188pushStack: function( elems ) {189190// Build a new jQuery matched element set191var ret = jQuery.merge( this.constructor(), elems );192193// Add the old object onto the stack (as a reference)194ret.prevObject = this;195196// Return the newly-formed element set197return ret;198},199200// Execute a callback for every element in the matched set.201each: function( callback ) {202return jQuery.each( this, callback );203},204205map: function( callback ) {206return this.pushStack( jQuery.map( this, function( elem, i ) {207return callback.call( elem, i, elem );208} ) );209},210211slice: function() {212return this.pushStack( slice.apply( this, arguments ) );213},214215first: function() {216return this.eq( 0 );217},218219last: function() {220return this.eq( -1 );221},222223even: function() {224return this.pushStack( jQuery.grep( this, function( _elem, i ) {225return ( i + 1 ) % 2;226} ) );227},228229odd: function() {230return this.pushStack( jQuery.grep( this, function( _elem, i ) {231return i % 2;232} ) );233},234235eq: function( i ) {236var len = this.length,237j = +i + ( i < 0 ? len : 0 );238return this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] );239},240241end: function() {242return this.prevObject || this.constructor();243},244245// For internal use only.246// Behaves like an Array's method, not like a jQuery method.247push: push,248sort: arr.sort,249splice: arr.splice250};251252jQuery.extend = jQuery.fn.extend = function() {253var options, name, src, copy, copyIsArray, clone,254target = arguments[ 0 ] || {},255i = 1,256length = arguments.length,257deep = false;258259// Handle a deep copy situation260if ( typeof target === "boolean" ) {261deep = target;262263// Skip the boolean and the target264target = arguments[ i ] || {};265i++;266}267268// Handle case when target is a string or something (possible in deep copy)269if ( typeof target !== "object" && !isFunction( target ) ) {270target = {};271}272273// Extend jQuery itself if only one argument is passed274if ( i === length ) {275target = this;276i--;277}278279for ( ; i < length; i++ ) {280281// Only deal with non-null/undefined values282if ( ( options = arguments[ i ] ) != null ) {283284// Extend the base object285for ( name in options ) {286copy = options[ name ];287288// Prevent Object.prototype pollution289// Prevent never-ending loop290if ( name === "__proto__" || target === copy ) {291continue;292}293294// Recurse if we're merging plain objects or arrays295if ( deep && copy && ( jQuery.isPlainObject( copy ) ||296( copyIsArray = Array.isArray( copy ) ) ) ) {297src = target[ name ];298299// Ensure proper type for the source value300if ( copyIsArray && !Array.isArray( src ) ) {301clone = [];302} else if ( !copyIsArray && !jQuery.isPlainObject( src ) ) {303clone = {};304} else {305clone = src;306}307copyIsArray = false;308309// Never move original objects, clone them310target[ name ] = jQuery.extend( deep, clone, copy );311312// Don't bring in undefined values313} else if ( copy !== undefined ) {314target[ name ] = copy;315}316}317}318}319320// Return the modified object321return target;322};323324jQuery.extend( {325326// Unique for each copy of jQuery on the page327expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ),328329// Assume jQuery is ready without the ready module330isReady: true,331332error: function( msg ) {333throw new Error( msg );334},335336noop: function() {},337338isPlainObject: function( obj ) {339var proto, Ctor;340341// Detect obvious negatives342// Use toString instead of jQuery.type to catch host objects343if ( !obj || toString.call( obj ) !== "[object Object]" ) {344return false;345}346347proto = getProto( obj );348349// Objects with no prototype (e.g., `Object.create( null )`) are plain350if ( !proto ) {351return true;352}353354// Objects with prototype are plain iff they were constructed by a global Object function355Ctor = hasOwn.call( proto, "constructor" ) && proto.constructor;356return typeof Ctor === "function" && fnToString.call( Ctor ) === ObjectFunctionString;357},358359isEmptyObject: function( obj ) {360var name;361362for ( name in obj ) {363return false;364}365return true;366},367368// Evaluates a script in a provided context; falls back to the global one369// if not specified.370globalEval: function( code, options, doc ) {371DOMEval( code, { nonce: options && options.nonce }, doc );372},373374each: function( obj, callback ) {375var length, i = 0;376377if ( isArrayLike( obj ) ) {378length = obj.length;379for ( ; i < length; i++ ) {380if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {381break;382}383}384} else {385for ( i in obj ) {386if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {387break;388}389}390}391392return obj;393},394395// results is for internal usage only396makeArray: function( arr, results ) {397var ret = results || [];398399if ( arr != null ) {400if ( isArrayLike( Object( arr ) ) ) {401jQuery.merge( ret,402typeof arr === "string" ?403[ arr ] : arr404);405} else {406push.call( ret, arr );407}408}409410return ret;411},412413inArray: function( elem, arr, i ) {414return arr == null ? -1 : indexOf.call( arr, elem, i );415},416417// Support: Android <=4.0 only, PhantomJS 1 only418// push.apply(_, arraylike) throws on ancient WebKit419merge: function( first, second ) {420var len = +second.length,421j = 0,422i = first.length;423424for ( ; j < len; j++ ) {425first[ i++ ] = second[ j ];426}427428first.length = i;429430return first;431},432433grep: function( elems, callback, invert ) {434var callbackInverse,435matches = [],436i = 0,437length = elems.length,438callbackExpect = !invert;439440// Go through the array, only saving the items441// that pass the validator function442for ( ; i < length; i++ ) {443callbackInverse = !callback( elems[ i ], i );444if ( callbackInverse !== callbackExpect ) {445matches.push( elems[ i ] );446}447}448449return matches;450},451452// arg is for internal usage only453map: function( elems, callback, arg ) {454var length, value,455i = 0,456ret = [];457458// Go through the array, translating each of the items to their new values459if ( isArrayLike( elems ) ) {460length = elems.length;461for ( ; i < length; i++ ) {462value = callback( elems[ i ], i, arg );463464if ( value != null ) {465ret.push( value );466}467}468469// Go through every key on the object,470} else {471for ( i in elems ) {472value = callback( elems[ i ], i, arg );473474if ( value != null ) {475ret.push( value );476}477}478}479480// Flatten any nested arrays481return flat( ret );482},483484// A global GUID counter for objects485guid: 1,486487// jQuery.support is not used in Core but other projects attach their488// properties to it so it needs to exist.489support: support490} );491492if ( typeof Symbol === "function" ) {493jQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ];494}495496// Populate the class2type map497jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ),498function( _i, name ) {499class2type[ "[object " + name + "]" ] = name.toLowerCase();500} );501502function isArrayLike( obj ) {503504// Support: real iOS 8.2 only (not reproducible in simulator)505// `in` check used to prevent JIT error (gh-2145)506// hasOwn isn't used here due to false negatives507// regarding Nodelist length in IE508var length = !!obj && "length" in obj && obj.length,509type = toType( obj );510511if ( isFunction( obj ) || isWindow( obj ) ) {512return false;513}514515return type === "array" || length === 0 ||516typeof length === "number" && length > 0 && ( length - 1 ) in obj;517}518var Sizzle =519/*!520* Sizzle CSS Selector Engine v2.3.5521* https://sizzlejs.com/522*523* Copyright JS Foundation and other contributors524* Released under the MIT license525* https://js.foundation/526*527* Date: 2020-03-14528*/529( function( window ) {530var i,531support,532Expr,533getText,534isXML,535tokenize,536compile,537select,538outermostContext,539sortInput,540hasDuplicate,541542// Local document vars543setDocument,544document,545docElem,546documentIsHTML,547rbuggyQSA,548rbuggyMatches,549matches,550contains,551552// Instance-specific data553expando = "sizzle" + 1 * new Date(),554preferredDoc = window.document,555dirruns = 0,556done = 0,557classCache = createCache(),558tokenCache = createCache(),559compilerCache = createCache(),560nonnativeSelectorCache = createCache(),561sortOrder = function( a, b ) {562if ( a === b ) {563hasDuplicate = true;564}565return 0;566},567568// Instance methods569hasOwn = ( {} ).hasOwnProperty,570arr = [],571pop = arr.pop,572pushNative = arr.push,573push = arr.push,574slice = arr.slice,575576// Use a stripped-down indexOf as it's faster than native577// https://jsperf.com/thor-indexof-vs-for/5578indexOf = function( list, elem ) {579var i = 0,580len = list.length;581for ( ; i < len; i++ ) {582if ( list[ i ] === elem ) {583return i;584}585}586return -1;587},588589booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|" +590"ismap|loop|multiple|open|readonly|required|scoped",591592// Regular expressions593594// http://www.w3.org/TR/css3-selectors/#whitespace595whitespace = "[\\x20\\t\\r\\n\\f]",596597// https://www.w3.org/TR/css-syntax-3/#ident-token-diagram598identifier = "(?:\\\\[\\da-fA-F]{1,6}" + whitespace +599"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",600601// Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors602attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace +603604// Operator (capture 2)605"*([*^$|!~]?=)" + whitespace +606607// "Attribute values must be CSS identifiers [capture 5]608// or strings [capture 3 or capture 4]"609"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" +610whitespace + "*\\]",611612pseudos = ":(" + identifier + ")(?:\\((" +613614// To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:615// 1. quoted (capture 3; capture 4 or capture 5)616"('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" +617618// 2. simple (capture 6)619"((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" +620621// 3. anything else (capture 2)622".*" +623")\\)|)",624625// Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter626rwhitespace = new RegExp( whitespace + "+", "g" ),627rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" +628whitespace + "+$", "g" ),629630rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ),631rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace +632"*" ),633rdescend = new RegExp( whitespace + "|>" ),634635rpseudo = new RegExp( pseudos ),636ridentifier = new RegExp( "^" + identifier + "$" ),637638matchExpr = {639"ID": new RegExp( "^#(" + identifier + ")" ),640"CLASS": new RegExp( "^\\.(" + identifier + ")" ),641"TAG": new RegExp( "^(" + identifier + "|[*])" ),642"ATTR": new RegExp( "^" + attributes ),643"PSEUDO": new RegExp( "^" + pseudos ),644"CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" +645whitespace + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" +646whitespace + "*(\\d+)|))" + whitespace + "*\\)|)", "i" ),647"bool": new RegExp( "^(?:" + booleans + ")$", "i" ),648649// For use in libraries implementing .is()650// We use this for POS matching in `select`651"needsContext": new RegExp( "^" + whitespace +652"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + whitespace +653"*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" )654},655656rhtml = /HTML$/i,657rinputs = /^(?:input|select|textarea|button)$/i,658rheader = /^h\d$/i,659660rnative = /^[^{]+\{\s*\[native \w/,661662// Easily-parseable/retrievable ID or TAG or CLASS selectors663rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,664665rsibling = /[+~]/,666667// CSS escapes668// http://www.w3.org/TR/CSS21/syndata.html#escaped-characters669runescape = new RegExp( "\\\\[\\da-fA-F]{1,6}" + whitespace + "?|\\\\([^\\r\\n\\f])", "g" ),670funescape = function( escape, nonHex ) {671var high = "0x" + escape.slice( 1 ) - 0x10000;672673return nonHex ?674675// Strip the backslash prefix from a non-hex escape sequence676nonHex :677678// Replace a hexadecimal escape sequence with the encoded Unicode code point679// Support: IE <=11+680// For values outside the Basic Multilingual Plane (BMP), manually construct a681// surrogate pair682high < 0 ?683String.fromCharCode( high + 0x10000 ) :684String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );685},686687// CSS string/identifier serialization688// https://drafts.csswg.org/cssom/#common-serializing-idioms689rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,690fcssescape = function( ch, asCodePoint ) {691if ( asCodePoint ) {692693// U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER694if ( ch === "\0" ) {695return "\uFFFD";696}697698// Control characters and (dependent upon position) numbers get escaped as code points699return ch.slice( 0, -1 ) + "\\" +700ch.charCodeAt( ch.length - 1 ).toString( 16 ) + " ";701}702703// Other potentially-special ASCII characters get backslash-escaped704return "\\" + ch;705},706707// Used for iframes708// See setDocument()709// Removing the function wrapper causes a "Permission Denied"710// error in IE711unloadHandler = function() {712setDocument();713},714715inDisabledFieldset = addCombinator(716function( elem ) {717return elem.disabled === true && elem.nodeName.toLowerCase() === "fieldset";718},719{ dir: "parentNode", next: "legend" }720);721722// Optimize for push.apply( _, NodeList )723try {724push.apply(725( arr = slice.call( preferredDoc.childNodes ) ),726preferredDoc.childNodes727);728729// Support: Android<4.0730// Detect silently failing push.apply731// eslint-disable-next-line no-unused-expressions732arr[ preferredDoc.childNodes.length ].nodeType;733} catch ( e ) {734push = { apply: arr.length ?735736// Leverage slice if possible737function( target, els ) {738pushNative.apply( target, slice.call( els ) );739} :740741// Support: IE<9742// Otherwise append directly743function( target, els ) {744var j = target.length,745i = 0;746747// Can't trust NodeList.length748while ( ( target[ j++ ] = els[ i++ ] ) ) {}749target.length = j - 1;750}751};752}753754function Sizzle( selector, context, results, seed ) {755var m, i, elem, nid, match, groups, newSelector,756newContext = context && context.ownerDocument,757758// nodeType defaults to 9, since context defaults to document759nodeType = context ? context.nodeType : 9;760761results = results || [];762763// Return early from calls with invalid selector or context764if ( typeof selector !== "string" || !selector ||765nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) {766767return results;768}769770// Try to shortcut find operations (as opposed to filters) in HTML documents771if ( !seed ) {772setDocument( context );773context = context || document;774775if ( documentIsHTML ) {776777// If the selector is sufficiently simple, try using a "get*By*" DOM method778// (excepting DocumentFragment context, where the methods don't exist)779if ( nodeType !== 11 && ( match = rquickExpr.exec( selector ) ) ) {780781// ID selector782if ( ( m = match[ 1 ] ) ) {783784// Document context785if ( nodeType === 9 ) {786if ( ( elem = context.getElementById( m ) ) ) {787788// Support: IE, Opera, Webkit789// TODO: identify versions790// getElementById can match elements by name instead of ID791if ( elem.id === m ) {792results.push( elem );793return results;794}795} else {796return results;797}798799// Element context800} else {801802// Support: IE, Opera, Webkit803// TODO: identify versions804// getElementById can match elements by name instead of ID805if ( newContext && ( elem = newContext.getElementById( m ) ) &&806contains( context, elem ) &&807elem.id === m ) {808809results.push( elem );810return results;811}812}813814// Type selector815} else if ( match[ 2 ] ) {816push.apply( results, context.getElementsByTagName( selector ) );817return results;818819// Class selector820} else if ( ( m = match[ 3 ] ) && support.getElementsByClassName &&821context.getElementsByClassName ) {822823push.apply( results, context.getElementsByClassName( m ) );824return results;825}826}827828// Take advantage of querySelectorAll829if ( support.qsa &&830!nonnativeSelectorCache[ selector + " " ] &&831( !rbuggyQSA || !rbuggyQSA.test( selector ) ) &&832833// Support: IE 8 only834// Exclude object elements835( nodeType !== 1 || context.nodeName.toLowerCase() !== "object" ) ) {836837newSelector = selector;838newContext = context;839840// qSA considers elements outside a scoping root when evaluating child or841// descendant combinators, which is not what we want.842// In such cases, we work around the behavior by prefixing every selector in the843// list with an ID selector referencing the scope context.844// The technique has to be used as well when a leading combinator is used845// as such selectors are not recognized by querySelectorAll.846// Thanks to Andrew Dupont for this technique.847if ( nodeType === 1 &&848( rdescend.test( selector ) || rcombinators.test( selector ) ) ) {849850// Expand context for sibling selectors851newContext = rsibling.test( selector ) && testContext( context.parentNode ) ||852context;853854// We can use :scope instead of the ID hack if the browser855// supports it & if we're not changing the context.856if ( newContext !== context || !support.scope ) {857858// Capture the context ID, setting it first if necessary859if ( ( nid = context.getAttribute( "id" ) ) ) {860nid = nid.replace( rcssescape, fcssescape );861} else {862context.setAttribute( "id", ( nid = expando ) );863}864}865866// Prefix every selector in the list867groups = tokenize( selector );868i = groups.length;869while ( i-- ) {870groups[ i ] = ( nid ? "#" + nid : ":scope" ) + " " +871toSelector( groups[ i ] );872}873newSelector = groups.join( "," );874}875876try {877push.apply( results,878newContext.querySelectorAll( newSelector )879);880return results;881} catch ( qsaError ) {882nonnativeSelectorCache( selector, true );883} finally {884if ( nid === expando ) {885context.removeAttribute( "id" );886}887}888}889}890}891892// All others893return select( selector.replace( rtrim, "$1" ), context, results, seed );894}895896/**897* Create key-value caches of limited size898* @returns {function(string, object)} Returns the Object data after storing it on itself with899* property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)900* deleting the oldest entry901*/902function createCache() {903var keys = [];904905function cache( key, value ) {906907// Use (key + " ") to avoid collision with native prototype properties (see Issue #157)908if ( keys.push( key + " " ) > Expr.cacheLength ) {909910// Only keep the most recent entries911delete cache[ keys.shift() ];912}913return ( cache[ key + " " ] = value );914}915return cache;916}917918/**919* Mark a function for special use by Sizzle920* @param {Function} fn The function to mark921*/922function markFunction( fn ) {923fn[ expando ] = true;924return fn;925}926927/**928* Support testing using an element929* @param {Function} fn Passed the created element and returns a boolean result930*/931function assert( fn ) {932var el = document.createElement( "fieldset" );933934try {935return !!fn( el );936} catch ( e ) {937return false;938} finally {939940// Remove from its parent by default941if ( el.parentNode ) {942el.parentNode.removeChild( el );943}944945// release memory in IE946el = null;947}948}949950/**951* Adds the same handler for all of the specified attrs952* @param {String} attrs Pipe-separated list of attributes953* @param {Function} handler The method that will be applied954*/955function addHandle( attrs, handler ) {956var arr = attrs.split( "|" ),957i = arr.length;958959while ( i-- ) {960Expr.attrHandle[ arr[ i ] ] = handler;961}962}963964/**965* Checks document order of two siblings966* @param {Element} a967* @param {Element} b968* @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b969*/970function siblingCheck( a, b ) {971var cur = b && a,972diff = cur && a.nodeType === 1 && b.nodeType === 1 &&973a.sourceIndex - b.sourceIndex;974975// Use IE sourceIndex if available on both nodes976if ( diff ) {977return diff;978}979980// Check if b follows a981if ( cur ) {982while ( ( cur = cur.nextSibling ) ) {983if ( cur === b ) {984return -1;985}986}987}988989return a ? 1 : -1;990}991992/**993* Returns a function to use in pseudos for input types994* @param {String} type995*/996function createInputPseudo( type ) {997return function( elem ) {998var name = elem.nodeName.toLowerCase();999return name === "input" && elem.type === type;1000};1001}10021003/**1004* Returns a function to use in pseudos for buttons1005* @param {String} type1006*/1007function createButtonPseudo( type ) {1008return function( elem ) {1009var name = elem.nodeName.toLowerCase();1010return ( name === "input" || name === "button" ) && elem.type === type;1011};1012}10131014/**1015* Returns a function to use in pseudos for :enabled/:disabled1016* @param {Boolean} disabled true for :disabled; false for :enabled1017*/1018function createDisabledPseudo( disabled ) {10191020// Known :disabled false positives: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable1021return function( elem ) {10221023// Only certain elements can match :enabled or :disabled1024// https://html.spec.whatwg.org/multipage/scripting.html#selector-enabled1025// https://html.spec.whatwg.org/multipage/scripting.html#selector-disabled1026if ( "form" in elem ) {10271028// Check for inherited disabledness on relevant non-disabled elements:1029// * listed form-associated elements in a disabled fieldset1030// https://html.spec.whatwg.org/multipage/forms.html#category-listed1031// https://html.spec.whatwg.org/multipage/forms.html#concept-fe-disabled1032// * option elements in a disabled optgroup1033// https://html.spec.whatwg.org/multipage/forms.html#concept-option-disabled1034// All such elements have a "form" property.1035if ( elem.parentNode && elem.disabled === false ) {10361037// Option elements defer to a parent optgroup if present1038if ( "label" in elem ) {1039if ( "label" in elem.parentNode ) {1040return elem.parentNode.disabled === disabled;1041} else {1042return elem.disabled === disabled;1043}1044}10451046// Support: IE 6 - 111047// Use the isDisabled shortcut property to check for disabled fieldset ancestors1048return elem.isDisabled === disabled ||10491050// Where there is no isDisabled, check manually1051/* jshint -W018 */1052elem.isDisabled !== !disabled &&1053inDisabledFieldset( elem ) === disabled;1054}10551056return elem.disabled === disabled;10571058// Try to winnow out elements that can't be disabled before trusting the disabled property.1059// Some victims get caught in our net (label, legend, menu, track), but it shouldn't1060// even exist on them, let alone have a boolean value.1061} else if ( "label" in elem ) {1062return elem.disabled === disabled;1063}10641065// Remaining elements are neither :enabled nor :disabled1066return false;1067};1068}10691070/**1071* Returns a function to use in pseudos for positionals1072* @param {Function} fn1073*/1074function createPositionalPseudo( fn ) {1075return markFunction( function( argument ) {1076argument = +argument;1077return markFunction( function( seed, matches ) {1078var j,1079matchIndexes = fn( [], seed.length, argument ),1080i = matchIndexes.length;10811082// Match elements found at the specified indexes1083while ( i-- ) {1084if ( seed[ ( j = matchIndexes[ i ] ) ] ) {1085seed[ j ] = !( matches[ j ] = seed[ j ] );1086}1087}1088} );1089} );1090}10911092/**1093* Checks a node for validity as a Sizzle context1094* @param {Element|Object=} context1095* @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value1096*/1097function testContext( context ) {1098return context && typeof context.getElementsByTagName !== "undefined" && context;1099}11001101// Expose support vars for convenience1102support = Sizzle.support = {};11031104/**1105* Detects XML nodes1106* @param {Element|Object} elem An element or a document1107* @returns {Boolean} True iff elem is a non-HTML XML node1108*/1109isXML = Sizzle.isXML = function( elem ) {1110var namespace = elem.namespaceURI,1111docElem = ( elem.ownerDocument || elem ).documentElement;11121113// Support: IE <=81114// Assume HTML when documentElement doesn't yet exist, such as inside loading iframes1115// https://bugs.jquery.com/ticket/48331116return !rhtml.test( namespace || docElem && docElem.nodeName || "HTML" );1117};11181119/**1120* Sets document-related variables once based on the current document1121* @param {Element|Object} [doc] An element or document object to use to set the document1122* @returns {Object} Returns the current document1123*/1124setDocument = Sizzle.setDocument = function( node ) {1125var hasCompare, subWindow,1126doc = node ? node.ownerDocument || node : preferredDoc;11271128// Return early if doc is invalid or already selected1129// Support: IE 11+, Edge 17 - 18+1130// IE/Edge sometimes throw a "Permission denied" error when strict-comparing1131// two documents; shallow comparisons work.1132// eslint-disable-next-line eqeqeq1133if ( doc == document || doc.nodeType !== 9 || !doc.documentElement ) {1134return document;1135}11361137// Update global variables1138document = doc;1139docElem = document.documentElement;1140documentIsHTML = !isXML( document );11411142// Support: IE 9 - 11+, Edge 12 - 18+1143// Accessing iframe documents after unload throws "permission denied" errors (jQuery #13936)1144// Support: IE 11+, Edge 17 - 18+1145// IE/Edge sometimes throw a "Permission denied" error when strict-comparing1146// two documents; shallow comparisons work.1147// eslint-disable-next-line eqeqeq1148if ( preferredDoc != document &&1149( subWindow = document.defaultView ) && subWindow.top !== subWindow ) {11501151// Support: IE 11, Edge1152if ( subWindow.addEventListener ) {1153subWindow.addEventListener( "unload", unloadHandler, false );11541155// Support: IE 9 - 10 only1156} else if ( subWindow.attachEvent ) {1157subWindow.attachEvent( "onunload", unloadHandler );1158}1159}11601161// Support: IE 8 - 11+, Edge 12 - 18+, Chrome <=16 - 25 only, Firefox <=3.6 - 31 only,1162// Safari 4 - 5 only, Opera <=11.6 - 12.x only1163// IE/Edge & older browsers don't support the :scope pseudo-class.1164// Support: Safari 6.0 only1165// Safari 6.0 supports :scope but it's an alias of :root there.1166support.scope = assert( function( el ) {1167docElem.appendChild( el ).appendChild( document.createElement( "div" ) );1168return typeof el.querySelectorAll !== "undefined" &&1169!el.querySelectorAll( ":scope fieldset div" ).length;1170} );11711172/* Attributes1173---------------------------------------------------------------------- */11741175// Support: IE<81176// Verify that getAttribute really returns attributes and not properties1177// (excepting IE8 booleans)1178support.attributes = assert( function( el ) {1179el.className = "i";1180return !el.getAttribute( "className" );1181} );11821183/* getElement(s)By*1184---------------------------------------------------------------------- */11851186// Check if getElementsByTagName("*") returns only elements1187support.getElementsByTagName = assert( function( el ) {1188el.appendChild( document.createComment( "" ) );1189return !el.getElementsByTagName( "*" ).length;1190} );11911192// Support: IE<91193support.getElementsByClassName = rnative.test( document.getElementsByClassName );11941195// Support: IE<101196// Check if getElementById returns elements by name1197// The broken getElementById methods don't pick up programmatically-set names,1198// so use a roundabout getElementsByName test1199support.getById = assert( function( el ) {1200docElem.appendChild( el ).id = expando;1201return !document.getElementsByName || !document.getElementsByName( expando ).length;1202} );12031204// ID filter and find1205if ( support.getById ) {1206Expr.filter[ "ID" ] = function( id ) {1207var attrId = id.replace( runescape, funescape );1208return function( elem ) {1209return elem.getAttribute( "id" ) === attrId;1210};1211};1212Expr.find[ "ID" ] = function( id, context ) {1213if ( typeof context.getElementById !== "undefined" && documentIsHTML ) {1214var elem = context.getElementById( id );1215return elem ? [ elem ] : [];1216}1217};1218} else {1219Expr.filter[ "ID" ] = function( id ) {1220var attrId = id.replace( runescape, funescape );1221return function( elem ) {1222var node = typeof elem.getAttributeNode !== "undefined" &&1223elem.getAttributeNode( "id" );1224return node && node.value === attrId;1225};1226};12271228// Support: IE 6 - 7 only1229// getElementById is not reliable as a find shortcut1230Expr.find[ "ID" ] = function( id, context ) {1231if ( typeof context.getElementById !== "undefined" && documentIsHTML ) {1232var node, i, elems,1233elem = context.getElementById( id );12341235if ( elem ) {12361237// Verify the id attribute1238node = elem.getAttributeNode( "id" );1239if ( node && node.value === id ) {1240return [ elem ];1241}12421243// Fall back on getElementsByName1244elems = context.getElementsByName( id );1245i = 0;1246while ( ( elem = elems[ i++ ] ) ) {1247node = elem.getAttributeNode( "id" );1248if ( node && node.value === id ) {1249return [ elem ];1250}1251}1252}12531254return [];1255}1256};1257}12581259// Tag1260Expr.find[ "TAG" ] = support.getElementsByTagName ?1261function( tag, context ) {1262if ( typeof context.getElementsByTagName !== "undefined" ) {1263return context.getElementsByTagName( tag );12641265// DocumentFragment nodes don't have gEBTN1266} else if ( support.qsa ) {1267return context.querySelectorAll( tag );1268}1269} :12701271function( tag, context ) {1272var elem,1273tmp = [],1274i = 0,12751276// By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too1277results = context.getElementsByTagName( tag );12781279// Filter out possible comments1280if ( tag === "*" ) {1281while ( ( elem = results[ i++ ] ) ) {1282if ( elem.nodeType === 1 ) {1283tmp.push( elem );1284}1285}12861287return tmp;1288}1289return results;1290};12911292// Class1293Expr.find[ "CLASS" ] = support.getElementsByClassName && function( className, context ) {1294if ( typeof context.getElementsByClassName !== "undefined" && documentIsHTML ) {1295return context.getElementsByClassName( className );1296}1297};12981299/* QSA/matchesSelector1300---------------------------------------------------------------------- */13011302// QSA and matchesSelector support13031304// matchesSelector(:active) reports false when true (IE9/Opera 11.5)1305rbuggyMatches = [];13061307// qSa(:focus) reports false when true (Chrome 21)1308// We allow this because of a bug in IE8/9 that throws an error1309// whenever `document.activeElement` is accessed on an iframe1310// So, we allow :focus to pass through QSA all the time to avoid the IE error1311// See https://bugs.jquery.com/ticket/133781312rbuggyQSA = [];13131314if ( ( support.qsa = rnative.test( document.querySelectorAll ) ) ) {13151316// Build QSA regex1317// Regex strategy adopted from Diego Perini1318assert( function( el ) {13191320var input;13211322// Select is set to empty string on purpose1323// This is to test IE's treatment of not explicitly1324// setting a boolean content attribute,1325// since its presence should be enough1326// https://bugs.jquery.com/ticket/123591327docElem.appendChild( el ).innerHTML = "<a id='" + expando + "'></a>" +1328"<select id='" + expando + "-\r\\' msallowcapture=''>" +1329"<option selected=''></option></select>";13301331// Support: IE8, Opera 11-12.161332// Nothing should be selected when empty strings follow ^= or $= or *=1333// The test attribute must be unknown in Opera but "safe" for WinRT1334// https://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section1335if ( el.querySelectorAll( "[msallowcapture^='']" ).length ) {1336rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" );1337}13381339// Support: IE81340// Boolean attributes and "value" are not treated correctly1341if ( !el.querySelectorAll( "[selected]" ).length ) {1342rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" );1343}13441345// Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+1346if ( !el.querySelectorAll( "[id~=" + expando + "-]" ).length ) {1347rbuggyQSA.push( "~=" );1348}13491350// Support: IE 11+, Edge 15 - 18+1351// IE 11/Edge don't find elements on a `[name='']` query in some cases.1352// Adding a temporary attribute to the document before the selection works1353// around the issue.1354// Interestingly, IE 10 & older don't seem to have the issue.1355input = document.createElement( "input" );1356input.setAttribute( "name", "" );1357el.appendChild( input );1358if ( !el.querySelectorAll( "[name='']" ).length ) {1359rbuggyQSA.push( "\\[" + whitespace + "*name" + whitespace + "*=" +1360whitespace + "*(?:''|\"\")" );1361}13621363// Webkit/Opera - :checked should return selected option elements1364// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked1365// IE8 throws error here and will not see later tests1366if ( !el.querySelectorAll( ":checked" ).length ) {1367rbuggyQSA.push( ":checked" );1368}13691370// Support: Safari 8+, iOS 8+1371// https://bugs.webkit.org/show_bug.cgi?id=1368511372// In-page `selector#id sibling-combinator selector` fails1373if ( !el.querySelectorAll( "a#" + expando + "+*" ).length ) {1374rbuggyQSA.push( ".#.+[+~]" );1375}13761377// Support: Firefox <=3.6 - 5 only1378// Old Firefox doesn't throw on a badly-escaped identifier.1379el.querySelectorAll( "\\\f" );1380rbuggyQSA.push( "[\\r\\n\\f]" );1381} );13821383assert( function( el ) {1384el.innerHTML = "<a href='' disabled='disabled'></a>" +1385"<select disabled='disabled'><option/></select>";13861387// Support: Windows 8 Native Apps1388// The type and name attributes are restricted during .innerHTML assignment1389var input = document.createElement( "input" );1390input.setAttribute( "type", "hidden" );1391el.appendChild( input ).setAttribute( "name", "D" );13921393// Support: IE81394// Enforce case-sensitivity of name attribute1395if ( el.querySelectorAll( "[name=d]" ).length ) {1396rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" );1397}13981399// FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)1400// IE8 throws error here and will not see later tests1401if ( el.querySelectorAll( ":enabled" ).length !== 2 ) {1402rbuggyQSA.push( ":enabled", ":disabled" );1403}14041405// Support: IE9-11+1406// IE's :disabled selector does not pick up the children of disabled fieldsets1407docElem.appendChild( el ).disabled = true;1408if ( el.querySelectorAll( ":disabled" ).length !== 2 ) {1409rbuggyQSA.push( ":enabled", ":disabled" );1410}14111412// Support: Opera 10 - 11 only1413// Opera 10-11 does not throw on post-comma invalid pseudos1414el.querySelectorAll( "*,:x" );1415rbuggyQSA.push( ",.*:" );1416} );1417}14181419if ( ( support.matchesSelector = rnative.test( ( matches = docElem.matches ||1420docElem.webkitMatchesSelector ||1421docElem.mozMatchesSelector ||1422docElem.oMatchesSelector ||1423docElem.msMatchesSelector ) ) ) ) {14241425assert( function( el ) {14261427// Check to see if it's possible to do matchesSelector1428// on a disconnected node (IE 9)1429support.disconnectedMatch = matches.call( el, "*" );14301431// This should fail with an exception1432// Gecko does not error, returns false instead1433matches.call( el, "[s!='']:x" );1434rbuggyMatches.push( "!=", pseudos );1435} );1436}14371438rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join( "|" ) );1439rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join( "|" ) );14401441/* Contains1442---------------------------------------------------------------------- */1443hasCompare = rnative.test( docElem.compareDocumentPosition );14441445// Element contains another1446// Purposefully self-exclusive1447// As in, an element does not contain itself1448contains = hasCompare || rnative.test( docElem.contains ) ?1449function( a, b ) {1450var adown = a.nodeType === 9 ? a.documentElement : a,1451bup = b && b.parentNode;1452return a === bup || !!( bup && bup.nodeType === 1 && (1453adown.contains ?1454adown.contains( bup ) :1455a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 161456) );1457} :1458function( a, b ) {1459if ( b ) {1460while ( ( b = b.parentNode ) ) {1461if ( b === a ) {1462return true;1463}1464}1465}1466return false;1467};14681469/* Sorting1470---------------------------------------------------------------------- */14711472// Document order sorting1473sortOrder = hasCompare ?1474function( a, b ) {14751476// Flag for duplicate removal1477if ( a === b ) {1478hasDuplicate = true;1479return 0;1480}14811482// Sort on method existence if only one input has compareDocumentPosition1483var compare = !a.compareDocumentPosition - !b.compareDocumentPosition;1484if ( compare ) {1485return compare;1486}14871488// Calculate position if both inputs belong to the same document1489// Support: IE 11+, Edge 17 - 18+1490// IE/Edge sometimes throw a "Permission denied" error when strict-comparing1491// two documents; shallow comparisons work.1492// eslint-disable-next-line eqeqeq1493compare = ( a.ownerDocument || a ) == ( b.ownerDocument || b ) ?1494a.compareDocumentPosition( b ) :14951496// Otherwise we know they are disconnected14971;14981499// Disconnected nodes1500if ( compare & 1 ||1501( !support.sortDetached && b.compareDocumentPosition( a ) === compare ) ) {15021503// Choose the first element that is related to our preferred document1504// Support: IE 11+, Edge 17 - 18+1505// IE/Edge sometimes throw a "Permission denied" error when strict-comparing1506// two documents; shallow comparisons work.1507// eslint-disable-next-line eqeqeq1508if ( a == document || a.ownerDocument == preferredDoc &&1509contains( preferredDoc, a ) ) {1510return -1;1511}15121513// Support: IE 11+, Edge 17 - 18+1514// IE/Edge sometimes throw a "Permission denied" error when strict-comparing1515// two documents; shallow comparisons work.1516// eslint-disable-next-line eqeqeq1517if ( b == document || b.ownerDocument == preferredDoc &&1518contains( preferredDoc, b ) ) {1519return 1;1520}15211522// Maintain original order1523return sortInput ?1524( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :15250;1526}15271528return compare & 4 ? -1 : 1;1529} :1530function( a, b ) {15311532// Exit early if the nodes are identical1533if ( a === b ) {1534hasDuplicate = true;1535return 0;1536}15371538var cur,1539i = 0,1540aup = a.parentNode,1541bup = b.parentNode,1542ap = [ a ],1543bp = [ b ];15441545// Parentless nodes are either documents or disconnected1546if ( !aup || !bup ) {15471548// Support: IE 11+, Edge 17 - 18+1549// IE/Edge sometimes throw a "Permission denied" error when strict-comparing1550// two documents; shallow comparisons work.1551/* eslint-disable eqeqeq */1552return a == document ? -1 :1553b == document ? 1 :1554/* eslint-enable eqeqeq */1555aup ? -1 :1556bup ? 1 :1557sortInput ?1558( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :15590;15601561// If the nodes are siblings, we can do a quick check1562} else if ( aup === bup ) {1563return siblingCheck( a, b );1564}15651566// Otherwise we need full lists of their ancestors for comparison1567cur = a;1568while ( ( cur = cur.parentNode ) ) {1569ap.unshift( cur );1570}1571cur = b;1572while ( ( cur = cur.parentNode ) ) {1573bp.unshift( cur );1574}15751576// Walk down the tree looking for a discrepancy1577while ( ap[ i ] === bp[ i ] ) {1578i++;1579}15801581return i ?15821583// Do a sibling check if the nodes have a common ancestor1584siblingCheck( ap[ i ], bp[ i ] ) :15851586// Otherwise nodes in our document sort first1587// Support: IE 11+, Edge 17 - 18+1588// IE/Edge sometimes throw a "Permission denied" error when strict-comparing1589// two documents; shallow comparisons work.1590/* eslint-disable eqeqeq */1591ap[ i ] == preferredDoc ? -1 :1592bp[ i ] == preferredDoc ? 1 :1593/* eslint-enable eqeqeq */15940;1595};15961597return document;1598};15991600Sizzle.matches = function( expr, elements ) {1601return Sizzle( expr, null, null, elements );1602};16031604Sizzle.matchesSelector = function( elem, expr ) {1605setDocument( elem );16061607if ( support.matchesSelector && documentIsHTML &&1608!nonnativeSelectorCache[ expr + " " ] &&1609( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&1610( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) {16111612try {1613var ret = matches.call( elem, expr );16141615// IE 9's matchesSelector returns false on disconnected nodes1616if ( ret || support.disconnectedMatch ||16171618// As well, disconnected nodes are said to be in a document1619// fragment in IE 91620elem.document && elem.document.nodeType !== 11 ) {1621return ret;1622}1623} catch ( e ) {1624nonnativeSelectorCache( expr, true );1625}1626}16271628return Sizzle( expr, document, null, [ elem ] ).length > 0;1629};16301631Sizzle.contains = function( context, elem ) {16321633// Set document vars if needed1634// Support: IE 11+, Edge 17 - 18+1635// IE/Edge sometimes throw a "Permission denied" error when strict-comparing1636// two documents; shallow comparisons work.1637// eslint-disable-next-line eqeqeq1638if ( ( context.ownerDocument || context ) != document ) {1639setDocument( context );1640}1641return contains( context, elem );1642};16431644Sizzle.attr = function( elem, name ) {16451646// Set document vars if needed1647// Support: IE 11+, Edge 17 - 18+1648// IE/Edge sometimes throw a "Permission denied" error when strict-comparing1649// two documents; shallow comparisons work.1650// eslint-disable-next-line eqeqeq1651if ( ( elem.ownerDocument || elem ) != document ) {1652setDocument( elem );1653}16541655var fn = Expr.attrHandle[ name.toLowerCase() ],16561657// Don't get fooled by Object.prototype properties (jQuery #13807)1658val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?1659fn( elem, name, !documentIsHTML ) :1660undefined;16611662return val !== undefined ?1663val :1664support.attributes || !documentIsHTML ?1665elem.getAttribute( name ) :1666( val = elem.getAttributeNode( name ) ) && val.specified ?1667val.value :1668null;1669};16701671Sizzle.escape = function( sel ) {1672return ( sel + "" ).replace( rcssescape, fcssescape );1673};16741675Sizzle.error = function( msg ) {1676throw new Error( "Syntax error, unrecognized expression: " + msg );1677};16781679/**1680* Document sorting and removing duplicates1681* @param {ArrayLike} results1682*/1683Sizzle.uniqueSort = function( results ) {1684var elem,1685duplicates = [],1686j = 0,1687i = 0;16881689// Unless we *know* we can detect duplicates, assume their presence1690hasDuplicate = !support.detectDuplicates;1691sortInput = !support.sortStable && results.slice( 0 );1692results.sort( sortOrder );16931694if ( hasDuplicate ) {1695while ( ( elem = results[ i++ ] ) ) {1696if ( elem === results[ i ] ) {1697j = duplicates.push( i );1698}1699}1700while ( j-- ) {1701results.splice( duplicates[ j ], 1 );1702}1703}17041705// Clear input after sorting to release objects1706// See https://github.com/jquery/sizzle/pull/2251707sortInput = null;17081709return results;1710};17111712/**1713* Utility function for retrieving the text value of an array of DOM nodes1714* @param {Array|Element} elem1715*/1716getText = Sizzle.getText = function( elem ) {1717var node,1718ret = "",1719i = 0,1720nodeType = elem.nodeType;17211722if ( !nodeType ) {17231724// If no nodeType, this is expected to be an array1725while ( ( node = elem[ i++ ] ) ) {17261727// Do not traverse comment nodes1728ret += getText( node );1729}1730} else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {17311732// Use textContent for elements1733// innerText usage removed for consistency of new lines (jQuery #11153)1734if ( typeof elem.textContent === "string" ) {1735return elem.textContent;1736} else {17371738// Traverse its children1739for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {1740ret += getText( elem );1741}1742}1743} else if ( nodeType === 3 || nodeType === 4 ) {1744return elem.nodeValue;1745}17461747// Do not include comment or processing instruction nodes17481749return ret;1750};17511752Expr = Sizzle.selectors = {17531754// Can be adjusted by the user1755cacheLength: 50,17561757createPseudo: markFunction,17581759match: matchExpr,17601761attrHandle: {},17621763find: {},17641765relative: {1766">": { dir: "parentNode", first: true },1767" ": { dir: "parentNode" },1768"+": { dir: "previousSibling", first: true },1769"~": { dir: "previousSibling" }1770},17711772preFilter: {1773"ATTR": function( match ) {1774match[ 1 ] = match[ 1 ].replace( runescape, funescape );17751776// Move the given value to match[3] whether quoted or unquoted1777match[ 3 ] = ( match[ 3 ] || match[ 4 ] ||1778match[ 5 ] || "" ).replace( runescape, funescape );17791780if ( match[ 2 ] === "~=" ) {1781match[ 3 ] = " " + match[ 3 ] + " ";1782}17831784return match.slice( 0, 4 );1785},17861787"CHILD": function( match ) {17881789/* matches from matchExpr["CHILD"]17901 type (only|nth|...)17912 what (child|of-type)17923 argument (even|odd|\d*|\d*n([+-]\d+)?|...)17934 xn-component of xn+y argument ([+-]?\d*n|)17945 sign of xn-component17956 x of xn-component17967 sign of y-component17978 y of y-component1798*/1799match[ 1 ] = match[ 1 ].toLowerCase();18001801if ( match[ 1 ].slice( 0, 3 ) === "nth" ) {18021803// nth-* requires argument1804if ( !match[ 3 ] ) {1805Sizzle.error( match[ 0 ] );1806}18071808// numeric x and y parameters for Expr.filter.CHILD1809// remember that false/true cast respectively to 0/11810match[ 4 ] = +( match[ 4 ] ?1811match[ 5 ] + ( match[ 6 ] || 1 ) :18122 * ( match[ 3 ] === "even" || match[ 3 ] === "odd" ) );1813match[ 5 ] = +( ( match[ 7 ] + match[ 8 ] ) || match[ 3 ] === "odd" );18141815// other types prohibit arguments1816} else if ( match[ 3 ] ) {1817Sizzle.error( match[ 0 ] );1818}18191820return match;1821},18221823"PSEUDO": function( match ) {1824var excess,1825unquoted = !match[ 6 ] && match[ 2 ];18261827if ( matchExpr[ "CHILD" ].test( match[ 0 ] ) ) {1828return null;1829}18301831// Accept quoted arguments as-is1832if ( match[ 3 ] ) {1833match[ 2 ] = match[ 4 ] || match[ 5 ] || "";18341835// Strip excess characters from unquoted arguments1836} else if ( unquoted && rpseudo.test( unquoted ) &&18371838// Get excess from tokenize (recursively)1839( excess = tokenize( unquoted, true ) ) &&18401841// advance to the next closing parenthesis1842( excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length ) ) {18431844// excess is a negative index1845match[ 0 ] = match[ 0 ].slice( 0, excess );1846match[ 2 ] = unquoted.slice( 0, excess );1847}18481849// Return only captures needed by the pseudo filter method (type and argument)1850return match.slice( 0, 3 );1851}1852},18531854filter: {18551856"TAG": function( nodeNameSelector ) {1857var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();1858return nodeNameSelector === "*" ?1859function() {1860return true;1861} :1862function( elem ) {1863return elem.nodeName && elem.nodeName.toLowerCase() === nodeName;1864};1865},18661867"CLASS": function( className ) {1868var pattern = classCache[ className + " " ];18691870return pattern ||1871( pattern = new RegExp( "(^|" + whitespace +1872")" + className + "(" + whitespace + "|$)" ) ) && classCache(1873className, function( elem ) {1874return pattern.test(1875typeof elem.className === "string" && elem.className ||1876typeof elem.getAttribute !== "undefined" &&1877elem.getAttribute( "class" ) ||1878""1879);1880} );1881},18821883"ATTR": function( name, operator, check ) {1884return function( elem ) {1885var result = Sizzle.attr( elem, name );18861887if ( result == null ) {1888return operator === "!=";1889}1890if ( !operator ) {1891return true;1892}18931894result += "";18951896/* eslint-disable max-len */18971898return operator === "=" ? result === check :1899operator === "!=" ? result !== check :1900operator === "^=" ? check && result.indexOf( check ) === 0 :1901operator === "*=" ? check && result.indexOf( check ) > -1 :1902operator === "$=" ? check && result.slice( -check.length ) === check :1903operator === "~=" ? ( " " + result.replace( rwhitespace, " " ) + " " ).indexOf( check ) > -1 :1904operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" :1905false;1906/* eslint-enable max-len */19071908};1909},19101911"CHILD": function( type, what, _argument, first, last ) {1912var simple = type.slice( 0, 3 ) !== "nth",1913forward = type.slice( -4 ) !== "last",1914ofType = what === "of-type";19151916return first === 1 && last === 0 ?19171918// Shortcut for :nth-*(n)1919function( elem ) {1920return !!elem.parentNode;1921} :19221923function( elem, _context, xml ) {1924var cache, uniqueCache, outerCache, node, nodeIndex, start,1925dir = simple !== forward ? "nextSibling" : "previousSibling",1926parent = elem.parentNode,1927name = ofType && elem.nodeName.toLowerCase(),1928useCache = !xml && !ofType,1929diff = false;19301931if ( parent ) {19321933// :(first|last|only)-(child|of-type)1934if ( simple ) {1935while ( dir ) {1936node = elem;1937while ( ( node = node[ dir ] ) ) {1938if ( ofType ?1939node.nodeName.toLowerCase() === name :1940node.nodeType === 1 ) {19411942return false;1943}1944}19451946// Reverse direction for :only-* (if we haven't yet done so)1947start = dir = type === "only" && !start && "nextSibling";1948}1949return true;1950}19511952start = [ forward ? parent.firstChild : parent.lastChild ];19531954// non-xml :nth-child(...) stores cache data on `parent`1955if ( forward && useCache ) {19561957// Seek `elem` from a previously-cached index19581959// ...in a gzip-friendly way1960node = parent;1961outerCache = node[ expando ] || ( node[ expando ] = {} );19621963// Support: IE <9 only1964// Defend against cloned attroperties (jQuery gh-1709)1965uniqueCache = outerCache[ node.uniqueID ] ||1966( outerCache[ node.uniqueID ] = {} );19671968cache = uniqueCache[ type ] || [];1969nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];1970diff = nodeIndex && cache[ 2 ];1971node = nodeIndex && parent.childNodes[ nodeIndex ];19721973while ( ( node = ++nodeIndex && node && node[ dir ] ||19741975// Fallback to seeking `elem` from the start1976( diff = nodeIndex = 0 ) || start.pop() ) ) {19771978// When found, cache indexes on `parent` and break1979if ( node.nodeType === 1 && ++diff && node === elem ) {1980uniqueCache[ type ] = [ dirruns, nodeIndex, diff ];1981break;1982}1983}19841985} else {19861987// Use previously-cached element index if available1988if ( useCache ) {19891990// ...in a gzip-friendly way1991node = elem;1992outerCache = node[ expando ] || ( node[ expando ] = {} );19931994// Support: IE <9 only1995// Defend against cloned attroperties (jQuery gh-1709)1996uniqueCache = outerCache[ node.uniqueID ] ||1997( outerCache[ node.uniqueID ] = {} );19981999cache = uniqueCache[ type ] || [];2000nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];2001diff = nodeIndex;2002}20032004// xml :nth-child(...)2005// or :nth-last-child(...) or :nth(-last)?-of-type(...)2006if ( diff === false ) {20072008// Use the same loop as above to seek `elem` from the start2009while ( ( node = ++nodeIndex && node && node[ dir ] ||2010( diff = nodeIndex = 0 ) || start.pop() ) ) {20112012if ( ( ofType ?2013node.nodeName.toLowerCase() === name :2014node.nodeType === 1 ) &&2015++diff ) {20162017// Cache the index of each encountered element2018if ( useCache ) {2019outerCache = node[ expando ] ||2020( node[ expando ] = {} );20212022// Support: IE <9 only2023// Defend against cloned attroperties (jQuery gh-1709)2024uniqueCache = outerCache[ node.uniqueID ] ||2025( outerCache[ node.uniqueID ] = {} );20262027uniqueCache[ type ] = [ dirruns, diff ];2028}20292030if ( node === elem ) {2031break;2032}2033}2034}2035}2036}20372038// Incorporate the offset, then check against cycle size2039diff -= last;2040return diff === first || ( diff % first === 0 && diff / first >= 0 );2041}2042};2043},20442045"PSEUDO": function( pseudo, argument ) {20462047// pseudo-class names are case-insensitive2048// http://www.w3.org/TR/selectors/#pseudo-classes2049// Prioritize by case sensitivity in case custom pseudos are added with uppercase letters2050// Remember that setFilters inherits from pseudos2051var args,2052fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||2053Sizzle.error( "unsupported pseudo: " + pseudo );20542055// The user may use createPseudo to indicate that2056// arguments are needed to create the filter function2057// just as Sizzle does2058if ( fn[ expando ] ) {2059return fn( argument );2060}20612062// But maintain support for old signatures2063if ( fn.length > 1 ) {2064args = [ pseudo, pseudo, "", argument ];2065return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?2066markFunction( function( seed, matches ) {2067var idx,2068matched = fn( seed, argument ),2069i = matched.length;2070while ( i-- ) {2071idx = indexOf( seed, matched[ i ] );2072seed[ idx ] = !( matches[ idx ] = matched[ i ] );2073}2074} ) :2075function( elem ) {2076return fn( elem, 0, args );2077};2078}20792080return fn;2081}2082},20832084pseudos: {20852086// Potentially complex pseudos2087"not": markFunction( function( selector ) {20882089// Trim the selector passed to compile2090// to avoid treating leading and trailing2091// spaces as combinators2092var input = [],2093results = [],2094matcher = compile( selector.replace( rtrim, "$1" ) );20952096return matcher[ expando ] ?2097markFunction( function( seed, matches, _context, xml ) {2098var elem,2099unmatched = matcher( seed, null, xml, [] ),2100i = seed.length;21012102// Match elements unmatched by `matcher`2103while ( i-- ) {2104if ( ( elem = unmatched[ i ] ) ) {2105seed[ i ] = !( matches[ i ] = elem );2106}2107}2108} ) :2109function( elem, _context, xml ) {2110input[ 0 ] = elem;2111matcher( input, null, xml, results );21122113// Don't keep the element (issue #299)2114input[ 0 ] = null;2115return !results.pop();2116};2117} ),21182119"has": markFunction( function( selector ) {2120return function( elem ) {2121return Sizzle( selector, elem ).length > 0;2122};2123} ),21242125"contains": markFunction( function( text ) {2126text = text.replace( runescape, funescape );2127return function( elem ) {2128return ( elem.textContent || getText( elem ) ).indexOf( text ) > -1;2129};2130} ),21312132// "Whether an element is represented by a :lang() selector2133// is based solely on the element's language value2134// being equal to the identifier C,2135// or beginning with the identifier C immediately followed by "-".2136// The matching of C against the element's language value is performed case-insensitively.2137// The identifier C does not have to be a valid language name."2138// http://www.w3.org/TR/selectors/#lang-pseudo2139"lang": markFunction( function( lang ) {21402141// lang value must be a valid identifier2142if ( !ridentifier.test( lang || "" ) ) {2143Sizzle.error( "unsupported lang: " + lang );2144}2145lang = lang.replace( runescape, funescape ).toLowerCase();2146return function( elem ) {2147var elemLang;2148do {2149if ( ( elemLang = documentIsHTML ?2150elem.lang :2151elem.getAttribute( "xml:lang" ) || elem.getAttribute( "lang" ) ) ) {21522153elemLang = elemLang.toLowerCase();2154return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0;2155}2156} while ( ( elem = elem.parentNode ) && elem.nodeType === 1 );2157return false;2158};2159} ),21602161// Miscellaneous2162"target": function( elem ) {2163var hash = window.location && window.location.hash;2164return hash && hash.slice( 1 ) === elem.id;2165},21662167"root": function( elem ) {2168return elem === docElem;2169},21702171"focus": function( elem ) {2172return elem === document.activeElement &&2173( !document.hasFocus || document.hasFocus() ) &&2174!!( elem.type || elem.href || ~elem.tabIndex );2175},21762177// Boolean properties2178"enabled": createDisabledPseudo( false ),2179"disabled": createDisabledPseudo( true ),21802181"checked": function( elem ) {21822183// In CSS3, :checked should return both checked and selected elements2184// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked2185var nodeName = elem.nodeName.toLowerCase();2186return ( nodeName === "input" && !!elem.checked ) ||2187( nodeName === "option" && !!elem.selected );2188},21892190"selected": function( elem ) {21912192// Accessing this property makes selected-by-default2193// options in Safari work properly2194if ( elem.parentNode ) {2195// eslint-disable-next-line no-unused-expressions2196elem.parentNode.selectedIndex;2197}21982199return elem.selected === true;2200},22012202// Contents2203"empty": function( elem ) {22042205// http://www.w3.org/TR/selectors/#empty-pseudo2206// :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),2207// but not by others (comment: 8; processing instruction: 7; etc.)2208// nodeType < 6 works because attributes (2) do not appear as children2209for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {2210if ( elem.nodeType < 6 ) {2211return false;2212}2213}2214return true;2215},22162217"parent": function( elem ) {2218return !Expr.pseudos[ "empty" ]( elem );2219},22202221// Element/input types2222"header": function( elem ) {2223return rheader.test( elem.nodeName );2224},22252226"input": function( elem ) {2227return rinputs.test( elem.nodeName );2228},22292230"button": function( elem ) {2231var name = elem.nodeName.toLowerCase();2232return name === "input" && elem.type === "button" || name === "button";2233},22342235"text": function( elem ) {2236var attr;2237return elem.nodeName.toLowerCase() === "input" &&2238elem.type === "text" &&22392240// Support: IE<82241// New HTML5 attribute values (e.g., "search") appear with elem.type === "text"2242( ( attr = elem.getAttribute( "type" ) ) == null ||2243attr.toLowerCase() === "text" );2244},22452246// Position-in-collection2247"first": createPositionalPseudo( function() {2248return [ 0 ];2249} ),22502251"last": createPositionalPseudo( function( _matchIndexes, length ) {2252return [ length - 1 ];2253} ),22542255"eq": createPositionalPseudo( function( _matchIndexes, length, argument ) {2256return [ argument < 0 ? argument + length : argument ];2257} ),22582259"even": createPositionalPseudo( function( matchIndexes, length ) {2260var i = 0;2261for ( ; i < length; i += 2 ) {2262matchIndexes.push( i );2263}2264return matchIndexes;2265} ),22662267"odd": createPositionalPseudo( function( matchIndexes, length ) {2268var i = 1;2269for ( ; i < length; i += 2 ) {2270matchIndexes.push( i );2271}2272return matchIndexes;2273} ),22742275"lt": createPositionalPseudo( function( matchIndexes, length, argument ) {2276var i = argument < 0 ?2277argument + length :2278argument > length ?2279length :2280argument;2281for ( ; --i >= 0; ) {2282matchIndexes.push( i );2283}2284return matchIndexes;2285} ),22862287"gt": createPositionalPseudo( function( matchIndexes, length, argument ) {2288var i = argument < 0 ? argument + length : argument;2289for ( ; ++i < length; ) {2290matchIndexes.push( i );2291}2292return matchIndexes;2293} )2294}2295};22962297Expr.pseudos[ "nth" ] = Expr.pseudos[ "eq" ];22982299// Add button/input type pseudos2300for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {2301Expr.pseudos[ i ] = createInputPseudo( i );2302}2303for ( i in { submit: true, reset: true } ) {2304Expr.pseudos[ i ] = createButtonPseudo( i );2305}23062307// Easy API for creating new setFilters2308function setFilters() {}2309setFilters.prototype = Expr.filters = Expr.pseudos;2310Expr.setFilters = new setFilters();23112312tokenize = Sizzle.tokenize = function( selector, parseOnly ) {2313var matched, match, tokens, type,2314soFar, groups, preFilters,2315cached = tokenCache[ selector + " " ];23162317if ( cached ) {2318return parseOnly ? 0 : cached.slice( 0 );2319}23202321soFar = selector;2322groups = [];2323preFilters = Expr.preFilter;23242325while ( soFar ) {23262327// Comma and first run2328if ( !matched || ( match = rcomma.exec( soFar ) ) ) {2329if ( match ) {23302331// Don't consume trailing commas as valid2332soFar = soFar.slice( match[ 0 ].length ) || soFar;2333}2334groups.push( ( tokens = [] ) );2335}23362337matched = false;23382339// Combinators2340if ( ( match = rcombinators.exec( soFar ) ) ) {2341matched = match.shift();2342tokens.push( {2343value: matched,23442345// Cast descendant combinators to space2346type: match[ 0 ].replace( rtrim, " " )2347} );2348soFar = soFar.slice( matched.length );2349}23502351// Filters2352for ( type in Expr.filter ) {2353if ( ( match = matchExpr[ type ].exec( soFar ) ) && ( !preFilters[ type ] ||2354( match = preFilters[ type ]( match ) ) ) ) {2355matched = match.shift();2356tokens.push( {2357value: matched,2358type: type,2359matches: match2360} );2361soFar = soFar.slice( matched.length );2362}2363}23642365if ( !matched ) {2366break;2367}2368}23692370// Return the length of the invalid excess2371// if we're just parsing2372// Otherwise, throw an error or return tokens2373return parseOnly ?2374soFar.length :2375soFar ?2376Sizzle.error( selector ) :23772378// Cache the tokens2379tokenCache( selector, groups ).slice( 0 );2380};23812382function toSelector( tokens ) {2383var i = 0,2384len = tokens.length,2385selector = "";2386for ( ; i < len; i++ ) {2387selector += tokens[ i ].value;2388}2389return selector;2390}23912392function addCombinator( matcher, combinator, base ) {2393var dir = combinator.dir,2394skip = combinator.next,2395key = skip || dir,2396checkNonElements = base && key === "parentNode",2397doneName = done++;23982399return combinator.first ?24002401// Check against closest ancestor/preceding element2402function( elem, context, xml ) {2403while ( ( elem = elem[ dir ] ) ) {2404if ( elem.nodeType === 1 || checkNonElements ) {2405return matcher( elem, context, xml );2406}2407}2408return false;2409} :24102411// Check against all ancestor/preceding elements2412function( elem, context, xml ) {2413var oldCache, uniqueCache, outerCache,2414newCache = [ dirruns, doneName ];24152416// We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching2417if ( xml ) {2418while ( ( elem = elem[ dir ] ) ) {2419if ( elem.nodeType === 1 || checkNonElements ) {2420if ( matcher( elem, context, xml ) ) {2421return true;2422}2423}2424}2425} else {2426while ( ( elem = elem[ dir ] ) ) {2427if ( elem.nodeType === 1 || checkNonElements ) {2428outerCache = elem[ expando ] || ( elem[ expando ] = {} );24292430// Support: IE <9 only2431// Defend against cloned attroperties (jQuery gh-1709)2432uniqueCache = outerCache[ elem.uniqueID ] ||2433( outerCache[ elem.uniqueID ] = {} );24342435if ( skip && skip === elem.nodeName.toLowerCase() ) {2436elem = elem[ dir ] || elem;2437} else if ( ( oldCache = uniqueCache[ key ] ) &&2438oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) {24392440// Assign to newCache so results back-propagate to previous elements2441return ( newCache[ 2 ] = oldCache[ 2 ] );2442} else {24432444// Reuse newcache so results back-propagate to previous elements2445uniqueCache[ key ] = newCache;24462447// A match means we're done; a fail means we have to keep checking2448if ( ( newCache[ 2 ] = matcher( elem, context, xml ) ) ) {2449return true;2450}2451}2452}2453}2454}2455return false;2456};2457}24582459function elementMatcher( matchers ) {2460return matchers.length > 1 ?2461function( elem, context, xml ) {2462var i = matchers.length;2463while ( i-- ) {2464if ( !matchers[ i ]( elem, context, xml ) ) {2465return false;2466}2467}2468return true;2469} :2470matchers[ 0 ];2471}24722473function multipleContexts( selector, contexts, results ) {2474var i = 0,2475len = contexts.length;2476for ( ; i < len; i++ ) {2477Sizzle( selector, contexts[ i ], results );2478}2479return results;2480}24812482function condense( unmatched, map, filter, context, xml ) {2483var elem,2484newUnmatched = [],2485i = 0,2486len = unmatched.length,2487mapped = map != null;24882489for ( ; i < len; i++ ) {2490if ( ( elem = unmatched[ i ] ) ) {2491if ( !filter || filter( elem, context, xml ) ) {2492newUnmatched.push( elem );2493if ( mapped ) {2494map.push( i );2495}2496}2497}2498}24992500return newUnmatched;2501}25022503function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {2504if ( postFilter && !postFilter[ expando ] ) {2505postFilter = setMatcher( postFilter );2506}2507if ( postFinder && !postFinder[ expando ] ) {2508postFinder = setMatcher( postFinder, postSelector );2509}2510return markFunction( function( seed, results, context, xml ) {2511var temp, i, elem,2512preMap = [],2513postMap = [],2514preexisting = results.length,25152516// Get initial elements from seed or context2517elems = seed || multipleContexts(2518selector || "*",2519context.nodeType ? [ context ] : context,2520[]2521),25222523// Prefilter to get matcher input, preserving a map for seed-results synchronization2524matcherIn = preFilter && ( seed || !selector ) ?2525condense( elems, preMap, preFilter, context, xml ) :2526elems,25272528matcherOut = matcher ?25292530// If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,2531postFinder || ( seed ? preFilter : preexisting || postFilter ) ?25322533// ...intermediate processing is necessary2534[] :25352536// ...otherwise use results directly2537results :2538matcherIn;25392540// Find primary matches2541if ( matcher ) {2542matcher( matcherIn, matcherOut, context, xml );2543}25442545// Apply postFilter2546if ( postFilter ) {2547temp = condense( matcherOut, postMap );2548postFilter( temp, [], context, xml );25492550// Un-match failing elements by moving them back to matcherIn2551i = temp.length;2552while ( i-- ) {2553if ( ( elem = temp[ i ] ) ) {2554matcherOut[ postMap[ i ] ] = !( matcherIn[ postMap[ i ] ] = elem );2555}2556}2557}25582559if ( seed ) {2560if ( postFinder || preFilter ) {2561if ( postFinder ) {25622563// Get the final matcherOut by condensing this intermediate into postFinder contexts2564temp = [];2565i = matcherOut.length;2566while ( i-- ) {2567if ( ( elem = matcherOut[ i ] ) ) {25682569// Restore matcherIn since elem is not yet a final match2570temp.push( ( matcherIn[ i ] = elem ) );2571}2572}2573postFinder( null, ( matcherOut = [] ), temp, xml );2574}25752576// Move matched elements from seed to results to keep them synchronized2577i = matcherOut.length;2578while ( i-- ) {2579if ( ( elem = matcherOut[ i ] ) &&2580( temp = postFinder ? indexOf( seed, elem ) : preMap[ i ] ) > -1 ) {25812582seed[ temp ] = !( results[ temp ] = elem );2583}2584}2585}25862587// Add elements to results, through postFinder if defined2588} else {2589matcherOut = condense(2590matcherOut === results ?2591matcherOut.splice( preexisting, matcherOut.length ) :2592matcherOut2593);2594if ( postFinder ) {2595postFinder( null, results, matcherOut, xml );2596} else {2597push.apply( results, matcherOut );2598}2599}2600} );2601}26022603function matcherFromTokens( tokens ) {2604var checkContext, matcher, j,2605len = tokens.length,2606leadingRelative = Expr.relative[ tokens[ 0 ].type ],2607implicitRelative = leadingRelative || Expr.relative[ " " ],2608i = leadingRelative ? 1 : 0,26092610// The foundational matcher ensures that elements are reachable from top-level context(s)2611matchContext = addCombinator( function( elem ) {2612return elem === checkContext;2613}, implicitRelative, true ),2614matchAnyContext = addCombinator( function( elem ) {2615return indexOf( checkContext, elem ) > -1;2616}, implicitRelative, true ),2617matchers = [ function( elem, context, xml ) {2618var ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || (2619( checkContext = context ).nodeType ?2620matchContext( elem, context, xml ) :2621matchAnyContext( elem, context, xml ) );26222623// Avoid hanging onto element (issue #299)2624checkContext = null;2625return ret;2626} ];26272628for ( ; i < len; i++ ) {2629if ( ( matcher = Expr.relative[ tokens[ i ].type ] ) ) {2630matchers = [ addCombinator( elementMatcher( matchers ), matcher ) ];2631} else {2632matcher = Expr.filter[ tokens[ i ].type ].apply( null, tokens[ i ].matches );26332634// Return special upon seeing a positional matcher2635if ( matcher[ expando ] ) {26362637// Find the next relative operator (if any) for proper handling2638j = ++i;2639for ( ; j < len; j++ ) {2640if ( Expr.relative[ tokens[ j ].type ] ) {2641break;2642}2643}2644return setMatcher(2645i > 1 && elementMatcher( matchers ),2646i > 1 && toSelector(26472648// If the preceding token was a descendant combinator, insert an implicit any-element `*`2649tokens2650.slice( 0, i - 1 )2651.concat( { value: tokens[ i - 2 ].type === " " ? "*" : "" } )2652).replace( rtrim, "$1" ),2653matcher,2654i < j && matcherFromTokens( tokens.slice( i, j ) ),2655j < len && matcherFromTokens( ( tokens = tokens.slice( j ) ) ),2656j < len && toSelector( tokens )2657);2658}2659matchers.push( matcher );2660}2661}26622663return elementMatcher( matchers );2664}26652666function matcherFromGroupMatchers( elementMatchers, setMatchers ) {2667var bySet = setMatchers.length > 0,2668byElement = elementMatchers.length > 0,2669superMatcher = function( seed, context, xml, results, outermost ) {2670var elem, j, matcher,2671matchedCount = 0,2672i = "0",2673unmatched = seed && [],2674setMatched = [],2675contextBackup = outermostContext,26762677// We must always have either seed elements or outermost context2678elems = seed || byElement && Expr.find[ "TAG" ]( "*", outermost ),26792680// Use integer dirruns iff this is the outermost matcher2681dirrunsUnique = ( dirruns += contextBackup == null ? 1 : Math.random() || 0.1 ),2682len = elems.length;26832684if ( outermost ) {26852686// Support: IE 11+, Edge 17 - 18+2687// IE/Edge sometimes throw a "Permission denied" error when strict-comparing2688// two documents; shallow comparisons work.2689// eslint-disable-next-line eqeqeq2690outermostContext = context == document || context || outermost;2691}26922693// Add elements passing elementMatchers directly to results2694// Support: IE<9, Safari2695// Tolerate NodeList properties (IE: "length"; Safari: <number>) matching elements by id2696for ( ; i !== len && ( elem = elems[ i ] ) != null; i++ ) {2697if ( byElement && elem ) {2698j = 0;26992700// Support: IE 11+, Edge 17 - 18+2701// IE/Edge sometimes throw a "Permission denied" error when strict-comparing2702// two documents; shallow comparisons work.2703// eslint-disable-next-line eqeqeq2704if ( !context && elem.ownerDocument != document ) {2705setDocument( elem );2706xml = !documentIsHTML;2707}2708while ( ( matcher = elementMatchers[ j++ ] ) ) {2709if ( matcher( elem, context || document, xml ) ) {2710results.push( elem );2711break;2712}2713}2714if ( outermost ) {2715dirruns = dirrunsUnique;2716}2717}27182719// Track unmatched elements for set filters2720if ( bySet ) {27212722// They will have gone through all possible matchers2723if ( ( elem = !matcher && elem ) ) {2724matchedCount--;2725}27262727// Lengthen the array for every element, matched or not2728if ( seed ) {2729unmatched.push( elem );2730}2731}2732}27332734// `i` is now the count of elements visited above, and adding it to `matchedCount`2735// makes the latter nonnegative.2736matchedCount += i;27372738// Apply set filters to unmatched elements2739// NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount`2740// equals `i`), unless we didn't visit _any_ elements in the above loop because we have2741// no element matchers and no seed.2742// Incrementing an initially-string "0" `i` allows `i` to remain a string only in that2743// case, which will result in a "00" `matchedCount` that differs from `i` but is also2744// numerically zero.2745if ( bySet && i !== matchedCount ) {2746j = 0;2747while ( ( matcher = setMatchers[ j++ ] ) ) {2748matcher( unmatched, setMatched, context, xml );2749}27502751if ( seed ) {27522753// Reintegrate element matches to eliminate the need for sorting2754if ( matchedCount > 0 ) {2755while ( i-- ) {2756if ( !( unmatched[ i ] || setMatched[ i ] ) ) {2757setMatched[ i ] = pop.call( results );2758}2759}2760}27612762// Discard index placeholder values to get only actual matches2763setMatched = condense( setMatched );2764}27652766// Add matches to results2767push.apply( results, setMatched );27682769// Seedless set matches succeeding multiple successful matchers stipulate sorting2770if ( outermost && !seed && setMatched.length > 0 &&2771( matchedCount + setMatchers.length ) > 1 ) {27722773Sizzle.uniqueSort( results );2774}2775}27762777// Override manipulation of globals by nested matchers2778if ( outermost ) {2779dirruns = dirrunsUnique;2780outermostContext = contextBackup;2781}27822783return unmatched;2784};27852786return bySet ?2787markFunction( superMatcher ) :2788superMatcher;2789}27902791compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) {2792var i,2793setMatchers = [],2794elementMatchers = [],2795cached = compilerCache[ selector + " " ];27962797if ( !cached ) {27982799// Generate a function of recursive functions that can be used to check each element2800if ( !match ) {2801match = tokenize( selector );2802}2803i = match.length;2804while ( i-- ) {2805cached = matcherFromTokens( match[ i ] );2806if ( cached[ expando ] ) {2807setMatchers.push( cached );2808} else {2809elementMatchers.push( cached );2810}2811}28122813// Cache the compiled function2814cached = compilerCache(2815selector,2816matcherFromGroupMatchers( elementMatchers, setMatchers )2817);28182819// Save selector and tokenization2820cached.selector = selector;2821}2822return cached;2823};28242825/**2826* A low-level selection function that works with Sizzle's compiled2827* selector functions2828* @param {String|Function} selector A selector or a pre-compiled2829* selector function built with Sizzle.compile2830* @param {Element} context2831* @param {Array} [results]2832* @param {Array} [seed] A set of elements to match against2833*/2834select = Sizzle.select = function( selector, context, results, seed ) {2835var i, tokens, token, type, find,2836compiled = typeof selector === "function" && selector,2837match = !seed && tokenize( ( selector = compiled.selector || selector ) );28382839results = results || [];28402841// Try to minimize operations if there is only one selector in the list and no seed2842// (the latter of which guarantees us context)2843if ( match.length === 1 ) {28442845// Reduce context if the leading compound selector is an ID2846tokens = match[ 0 ] = match[ 0 ].slice( 0 );2847if ( tokens.length > 2 && ( token = tokens[ 0 ] ).type === "ID" &&2848context.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[ 1 ].type ] ) {28492850context = ( Expr.find[ "ID" ]( token.matches[ 0 ]2851.replace( runescape, funescape ), context ) || [] )[ 0 ];2852if ( !context ) {2853return results;28542855// Precompiled matchers will still verify ancestry, so step up a level2856} else if ( compiled ) {2857context = context.parentNode;2858}28592860selector = selector.slice( tokens.shift().value.length );2861}28622863// Fetch a seed set for right-to-left matching2864i = matchExpr[ "needsContext" ].test( selector ) ? 0 : tokens.length;2865while ( i-- ) {2866token = tokens[ i ];28672868// Abort if we hit a combinator2869if ( Expr.relative[ ( type = token.type ) ] ) {2870break;2871}2872if ( ( find = Expr.find[ type ] ) ) {28732874// Search, expanding context for leading sibling combinators2875if ( ( seed = find(2876token.matches[ 0 ].replace( runescape, funescape ),2877rsibling.test( tokens[ 0 ].type ) && testContext( context.parentNode ) ||2878context2879) ) ) {28802881// If seed is empty or no tokens remain, we can return early2882tokens.splice( i, 1 );2883selector = seed.length && toSelector( tokens );2884if ( !selector ) {2885push.apply( results, seed );2886return results;2887}28882889break;2890}2891}2892}2893}28942895// Compile and execute a filtering function if one is not provided2896// Provide `match` to avoid retokenization if we modified the selector above2897( compiled || compile( selector, match ) )(2898seed,2899context,2900!documentIsHTML,2901results,2902!context || rsibling.test( selector ) && testContext( context.parentNode ) || context2903);2904return results;2905};29062907// One-time assignments29082909// Sort stability2910support.sortStable = expando.split( "" ).sort( sortOrder ).join( "" ) === expando;29112912// Support: Chrome 14-35+2913// Always assume duplicates if they aren't passed to the comparison function2914support.detectDuplicates = !!hasDuplicate;29152916// Initialize against the default document2917setDocument();29182919// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)2920// Detached nodes confoundingly follow *each other*2921support.sortDetached = assert( function( el ) {29222923// Should return 1, but returns 4 (following)2924return el.compareDocumentPosition( document.createElement( "fieldset" ) ) & 1;2925} );29262927// Support: IE<82928// Prevent attribute/property "interpolation"2929// https://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx2930if ( !assert( function( el ) {2931el.innerHTML = "<a href='#'></a>";2932return el.firstChild.getAttribute( "href" ) === "#";2933} ) ) {2934addHandle( "type|href|height|width", function( elem, name, isXML ) {2935if ( !isXML ) {2936return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 );2937}2938} );2939}29402941// Support: IE<92942// Use defaultValue in place of getAttribute("value")2943if ( !support.attributes || !assert( function( el ) {2944el.innerHTML = "<input/>";2945el.firstChild.setAttribute( "value", "" );2946return el.firstChild.getAttribute( "value" ) === "";2947} ) ) {2948addHandle( "value", function( elem, _name, isXML ) {2949if ( !isXML && elem.nodeName.toLowerCase() === "input" ) {2950return elem.defaultValue;2951}2952} );2953}29542955// Support: IE<92956// Use getAttributeNode to fetch booleans when getAttribute lies2957if ( !assert( function( el ) {2958return el.getAttribute( "disabled" ) == null;2959} ) ) {2960addHandle( booleans, function( elem, name, isXML ) {2961var val;2962if ( !isXML ) {2963return elem[ name ] === true ? name.toLowerCase() :2964( val = elem.getAttributeNode( name ) ) && val.specified ?2965val.value :2966null;2967}2968} );2969}29702971return Sizzle;29722973} )( window );2974297529762977jQuery.find = Sizzle;2978jQuery.expr = Sizzle.selectors;29792980// Deprecated2981jQuery.expr[ ":" ] = jQuery.expr.pseudos;2982jQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort;2983jQuery.text = Sizzle.getText;2984jQuery.isXMLDoc = Sizzle.isXML;2985jQuery.contains = Sizzle.contains;2986jQuery.escapeSelector = Sizzle.escape;29872988298929902991var dir = function( elem, dir, until ) {2992var matched = [],2993truncate = until !== undefined;29942995while ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) {2996if ( elem.nodeType === 1 ) {2997if ( truncate && jQuery( elem ).is( until ) ) {2998break;2999}3000matched.push( elem );3001}3002}3003return matched;3004};300530063007var siblings = function( n, elem ) {3008var matched = [];30093010for ( ; n; n = n.nextSibling ) {3011if ( n.nodeType === 1 && n !== elem ) {3012matched.push( n );3013}3014}30153016return matched;3017};301830193020var rneedsContext = jQuery.expr.match.needsContext;3021302230233024function nodeName( elem, name ) {30253026return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();30273028};3029var rsingleTag = ( /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i );3030303130323033// Implement the identical functionality for filter and not3034function winnow( elements, qualifier, not ) {3035if ( isFunction( qualifier ) ) {3036return jQuery.grep( elements, function( elem, i ) {3037return !!qualifier.call( elem, i, elem ) !== not;3038} );3039}30403041// Single element3042if ( qualifier.nodeType ) {3043return jQuery.grep( elements, function( elem ) {3044return ( elem === qualifier ) !== not;3045} );3046}30473048// Arraylike of elements (jQuery, arguments, Array)3049if ( typeof qualifier !== "string" ) {3050return jQuery.grep( elements, function( elem ) {3051return ( indexOf.call( qualifier, elem ) > -1 ) !== not;3052} );3053}30543055// Filtered directly for both simple and complex selectors3056return jQuery.filter( qualifier, elements, not );3057}30583059jQuery.filter = function( expr, elems, not ) {3060var elem = elems[ 0 ];30613062if ( not ) {3063expr = ":not(" + expr + ")";3064}30653066if ( elems.length === 1 && elem.nodeType === 1 ) {3067return jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [];3068}30693070return jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {3071return elem.nodeType === 1;3072} ) );3073};30743075jQuery.fn.extend( {3076find: function( selector ) {3077var i, ret,3078len = this.length,3079self = this;30803081if ( typeof selector !== "string" ) {3082return this.pushStack( jQuery( selector ).filter( function() {3083for ( i = 0; i < len; i++ ) {3084if ( jQuery.contains( self[ i ], this ) ) {3085return true;3086}3087}3088} ) );3089}30903091ret = this.pushStack( [] );30923093for ( i = 0; i < len; i++ ) {3094jQuery.find( selector, self[ i ], ret );3095}30963097return len > 1 ? jQuery.uniqueSort( ret ) : ret;3098},3099filter: function( selector ) {3100return this.pushStack( winnow( this, selector || [], false ) );3101},3102not: function( selector ) {3103return this.pushStack( winnow( this, selector || [], true ) );3104},3105is: function( selector ) {3106return !!winnow(3107this,31083109// If this is a positional/relative selector, check membership in the returned set3110// so $("p:first").is("p:last") won't return true for a doc with two "p".3111typeof selector === "string" && rneedsContext.test( selector ) ?3112jQuery( selector ) :3113selector || [],3114false3115).length;3116}3117} );311831193120// Initialize a jQuery object312131223123// A central reference to the root jQuery(document)3124var rootjQuery,31253126// A simple way to check for HTML strings3127// Prioritize #id over <tag> to avoid XSS via location.hash (#9521)3128// Strict HTML recognition (#11290: must start with <)3129// Shortcut simple #id case for speed3130rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,31313132init = jQuery.fn.init = function( selector, context, root ) {3133var match, elem;31343135// HANDLE: $(""), $(null), $(undefined), $(false)3136if ( !selector ) {3137return this;3138}31393140// Method init() accepts an alternate rootjQuery3141// so migrate can support jQuery.sub (gh-2101)3142root = root || rootjQuery;31433144// Handle HTML strings3145if ( typeof selector === "string" ) {3146if ( selector[ 0 ] === "<" &&3147selector[ selector.length - 1 ] === ">" &&3148selector.length >= 3 ) {31493150// Assume that strings that start and end with <> are HTML and skip the regex check3151match = [ null, selector, null ];31523153} else {3154match = rquickExpr.exec( selector );3155}31563157// Match html or make sure no context is specified for #id3158if ( match && ( match[ 1 ] || !context ) ) {31593160// HANDLE: $(html) -> $(array)3161if ( match[ 1 ] ) {3162context = context instanceof jQuery ? context[ 0 ] : context;31633164// Option to run scripts is true for back-compat3165// Intentionally let the error be thrown if parseHTML is not present3166jQuery.merge( this, jQuery.parseHTML(3167match[ 1 ],3168context && context.nodeType ? context.ownerDocument || context : document,3169true3170) );31713172// HANDLE: $(html, props)3173if ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) {3174for ( match in context ) {31753176// Properties of context are called as methods if possible3177if ( isFunction( this[ match ] ) ) {3178this[ match ]( context[ match ] );31793180// ...and otherwise set as attributes3181} else {3182this.attr( match, context[ match ] );3183}3184}3185}31863187return this;31883189// HANDLE: $(#id)3190} else {3191elem = document.getElementById( match[ 2 ] );31923193if ( elem ) {31943195// Inject the element directly into the jQuery object3196this[ 0 ] = elem;3197this.length = 1;3198}3199return this;3200}32013202// HANDLE: $(expr, $(...))3203} else if ( !context || context.jquery ) {3204return ( context || root ).find( selector );32053206// HANDLE: $(expr, context)3207// (which is just equivalent to: $(context).find(expr)3208} else {3209return this.constructor( context ).find( selector );3210}32113212// HANDLE: $(DOMElement)3213} else if ( selector.nodeType ) {3214this[ 0 ] = selector;3215this.length = 1;3216return this;32173218// HANDLE: $(function)3219// Shortcut for document ready3220} else if ( isFunction( selector ) ) {3221return root.ready !== undefined ?3222root.ready( selector ) :32233224// Execute immediately if ready is not present3225selector( jQuery );3226}32273228return jQuery.makeArray( selector, this );3229};32303231// Give the init function the jQuery prototype for later instantiation3232init.prototype = jQuery.fn;32333234// Initialize central reference3235rootjQuery = jQuery( document );323632373238var rparentsprev = /^(?:parents|prev(?:Until|All))/,32393240// Methods guaranteed to produce a unique set when starting from a unique set3241guaranteedUnique = {3242children: true,3243contents: true,3244next: true,3245prev: true3246};32473248jQuery.fn.extend( {3249has: function( target ) {3250var targets = jQuery( target, this ),3251l = targets.length;32523253return this.filter( function() {3254var i = 0;3255for ( ; i < l; i++ ) {3256if ( jQuery.contains( this, targets[ i ] ) ) {3257return true;3258}3259}3260} );3261},32623263closest: function( selectors, context ) {3264var cur,3265i = 0,3266l = this.length,3267matched = [],3268targets = typeof selectors !== "string" && jQuery( selectors );32693270// Positional selectors never match, since there's no _selection_ context3271if ( !rneedsContext.test( selectors ) ) {3272for ( ; i < l; i++ ) {3273for ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) {32743275// Always skip document fragments3276if ( cur.nodeType < 11 && ( targets ?3277targets.index( cur ) > -1 :32783279// Don't pass non-elements to Sizzle3280cur.nodeType === 1 &&3281jQuery.find.matchesSelector( cur, selectors ) ) ) {32823283matched.push( cur );3284break;3285}3286}3287}3288}32893290return this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched );3291},32923293// Determine the position of an element within the set3294index: function( elem ) {32953296// No argument, return index in parent3297if ( !elem ) {3298return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1;3299}33003301// Index in selector3302if ( typeof elem === "string" ) {3303return indexOf.call( jQuery( elem ), this[ 0 ] );3304}33053306// Locate the position of the desired element3307return indexOf.call( this,33083309// If it receives a jQuery object, the first element is used3310elem.jquery ? elem[ 0 ] : elem3311);3312},33133314add: function( selector, context ) {3315return this.pushStack(3316jQuery.uniqueSort(3317jQuery.merge( this.get(), jQuery( selector, context ) )3318)3319);3320},33213322addBack: function( selector ) {3323return this.add( selector == null ?3324this.prevObject : this.prevObject.filter( selector )3325);3326}3327} );33283329function sibling( cur, dir ) {3330while ( ( cur = cur[ dir ] ) && cur.nodeType !== 1 ) {}3331return cur;3332}33333334jQuery.each( {3335parent: function( elem ) {3336var parent = elem.parentNode;3337return parent && parent.nodeType !== 11 ? parent : null;3338},3339parents: function( elem ) {3340return dir( elem, "parentNode" );3341},3342parentsUntil: function( elem, _i, until ) {3343return dir( elem, "parentNode", until );3344},3345next: function( elem ) {3346return sibling( elem, "nextSibling" );3347},3348prev: function( elem ) {3349return sibling( elem, "previousSibling" );3350},3351nextAll: function( elem ) {3352return dir( elem, "nextSibling" );3353},3354prevAll: function( elem ) {3355return dir( elem, "previousSibling" );3356},3357nextUntil: function( elem, _i, until ) {3358return dir( elem, "nextSibling", until );3359},3360prevUntil: function( elem, _i, until ) {3361return dir( elem, "previousSibling", until );3362},3363siblings: function( elem ) {3364return siblings( ( elem.parentNode || {} ).firstChild, elem );3365},3366children: function( elem ) {3367return siblings( elem.firstChild );3368},3369contents: function( elem ) {3370if ( elem.contentDocument != null &&33713372// Support: IE 11+3373// <object> elements with no `data` attribute has an object3374// `contentDocument` with a `null` prototype.3375getProto( elem.contentDocument ) ) {33763377return elem.contentDocument;3378}33793380// Support: IE 9 - 11 only, iOS 7 only, Android Browser <=4.3 only3381// Treat the template element as a regular one in browsers that3382// don't support it.3383if ( nodeName( elem, "template" ) ) {3384elem = elem.content || elem;3385}33863387return jQuery.merge( [], elem.childNodes );3388}3389}, function( name, fn ) {3390jQuery.fn[ name ] = function( until, selector ) {3391var matched = jQuery.map( this, fn, until );33923393if ( name.slice( -5 ) !== "Until" ) {3394selector = until;3395}33963397if ( selector && typeof selector === "string" ) {3398matched = jQuery.filter( selector, matched );3399}34003401if ( this.length > 1 ) {34023403// Remove duplicates3404if ( !guaranteedUnique[ name ] ) {3405jQuery.uniqueSort( matched );3406}34073408// Reverse order for parents* and prev-derivatives3409if ( rparentsprev.test( name ) ) {3410matched.reverse();3411}3412}34133414return this.pushStack( matched );3415};3416} );3417var rnothtmlwhite = ( /[^\x20\t\r\n\f]+/g );3418341934203421// Convert String-formatted options into Object-formatted ones3422function createOptions( options ) {3423var object = {};3424jQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) {3425object[ flag ] = true;3426} );3427return object;3428}34293430/*3431* Create a callback list using the following parameters:3432*3433* options: an optional list of space-separated options that will change how3434* the callback list behaves or a more traditional option object3435*3436* By default a callback list will act like an event callback list and can be3437* "fired" multiple times.3438*3439* Possible options:3440*3441* once: will ensure the callback list can only be fired once (like a Deferred)3442*3443* memory: will keep track of previous values and will call any callback added3444* after the list has been fired right away with the latest "memorized"3445* values (like a Deferred)3446*3447* unique: will ensure a callback can only be added once (no duplicate in the list)3448*3449* stopOnFalse: interrupt callings when a callback returns false3450*3451*/3452jQuery.Callbacks = function( options ) {34533454// Convert options from String-formatted to Object-formatted if needed3455// (we check in cache first)3456options = typeof options === "string" ?3457createOptions( options ) :3458jQuery.extend( {}, options );34593460var // Flag to know if list is currently firing3461firing,34623463// Last fire value for non-forgettable lists3464memory,34653466// Flag to know if list was already fired3467fired,34683469// Flag to prevent firing3470locked,34713472// Actual callback list3473list = [],34743475// Queue of execution data for repeatable lists3476queue = [],34773478// Index of currently firing callback (modified by add/remove as needed)3479firingIndex = -1,34803481// Fire callbacks3482fire = function() {34833484// Enforce single-firing3485locked = locked || options.once;34863487// Execute callbacks for all pending executions,3488// respecting firingIndex overrides and runtime changes3489fired = firing = true;3490for ( ; queue.length; firingIndex = -1 ) {3491memory = queue.shift();3492while ( ++firingIndex < list.length ) {34933494// Run callback and check for early termination3495if ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false &&3496options.stopOnFalse ) {34973498// Jump to end and forget the data so .add doesn't re-fire3499firingIndex = list.length;3500memory = false;3501}3502}3503}35043505// Forget the data if we're done with it3506if ( !options.memory ) {3507memory = false;3508}35093510firing = false;35113512// Clean up if we're done firing for good3513if ( locked ) {35143515// Keep an empty list if we have data for future add calls3516if ( memory ) {3517list = [];35183519// Otherwise, this object is spent3520} else {3521list = "";3522}3523}3524},35253526// Actual Callbacks object3527self = {35283529// Add a callback or a collection of callbacks to the list3530add: function() {3531if ( list ) {35323533// If we have memory from a past run, we should fire after adding3534if ( memory && !firing ) {3535firingIndex = list.length - 1;3536queue.push( memory );3537}35383539( function add( args ) {3540jQuery.each( args, function( _, arg ) {3541if ( isFunction( arg ) ) {3542if ( !options.unique || !self.has( arg ) ) {3543list.push( arg );3544}3545} else if ( arg && arg.length && toType( arg ) !== "string" ) {35463547// Inspect recursively3548add( arg );3549}3550} );3551} )( arguments );35523553if ( memory && !firing ) {3554fire();3555}3556}3557return this;3558},35593560// Remove a callback from the list3561remove: function() {3562jQuery.each( arguments, function( _, arg ) {3563var index;3564while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {3565list.splice( index, 1 );35663567// Handle firing indexes3568if ( index <= firingIndex ) {3569firingIndex--;3570}3571}3572} );3573return this;3574},35753576// Check if a given callback is in the list.3577// If no argument is given, return whether or not list has callbacks attached.3578has: function( fn ) {3579return fn ?3580jQuery.inArray( fn, list ) > -1 :3581list.length > 0;3582},35833584// Remove all callbacks from the list3585empty: function() {3586if ( list ) {3587list = [];3588}3589return this;3590},35913592// Disable .fire and .add3593// Abort any current/pending executions3594// Clear all callbacks and values3595disable: function() {3596locked = queue = [];3597list = memory = "";3598return this;3599},3600disabled: function() {3601return !list;3602},36033604// Disable .fire3605// Also disable .add unless we have memory (since it would have no effect)3606// Abort any pending executions3607lock: function() {3608locked = queue = [];3609if ( !memory && !firing ) {3610list = memory = "";3611}3612return this;3613},3614locked: function() {3615return !!locked;3616},36173618// Call all callbacks with the given context and arguments3619fireWith: function( context, args ) {3620if ( !locked ) {3621args = args || [];3622args = [ context, args.slice ? args.slice() : args ];3623queue.push( args );3624if ( !firing ) {3625fire();3626}3627}3628return this;3629},36303631// Call all the callbacks with the given arguments3632fire: function() {3633self.fireWith( this, arguments );3634return this;3635},36363637// To know if the callbacks have already been called at least once3638fired: function() {3639return !!fired;3640}3641};36423643return self;3644};364536463647function Identity( v ) {3648return v;3649}3650function Thrower( ex ) {3651throw ex;3652}36533654function adoptValue( value, resolve, reject, noValue ) {3655var method;36563657try {36583659// Check for promise aspect first to privilege synchronous behavior3660if ( value && isFunction( ( method = value.promise ) ) ) {3661method.call( value ).done( resolve ).fail( reject );36623663// Other thenables3664} else if ( value && isFunction( ( method = value.then ) ) ) {3665method.call( value, resolve, reject );36663667// Other non-thenables3668} else {36693670// Control `resolve` arguments by letting Array#slice cast boolean `noValue` to integer:3671// * false: [ value ].slice( 0 ) => resolve( value )3672// * true: [ value ].slice( 1 ) => resolve()3673resolve.apply( undefined, [ value ].slice( noValue ) );3674}36753676// For Promises/A+, convert exceptions into rejections3677// Since jQuery.when doesn't unwrap thenables, we can skip the extra checks appearing in3678// Deferred#then to conditionally suppress rejection.3679} catch ( value ) {36803681// Support: Android 4.0 only3682// Strict mode functions invoked without .call/.apply get global-object context3683reject.apply( undefined, [ value ] );3684}3685}36863687jQuery.extend( {36883689Deferred: function( func ) {3690var tuples = [36913692// action, add listener, callbacks,3693// ... .then handlers, argument index, [final state]3694[ "notify", "progress", jQuery.Callbacks( "memory" ),3695jQuery.Callbacks( "memory" ), 2 ],3696[ "resolve", "done", jQuery.Callbacks( "once memory" ),3697jQuery.Callbacks( "once memory" ), 0, "resolved" ],3698[ "reject", "fail", jQuery.Callbacks( "once memory" ),3699jQuery.Callbacks( "once memory" ), 1, "rejected" ]3700],3701state = "pending",3702promise = {3703state: function() {3704return state;3705},3706always: function() {3707deferred.done( arguments ).fail( arguments );3708return this;3709},3710"catch": function( fn ) {3711return promise.then( null, fn );3712},37133714// Keep pipe for back-compat3715pipe: function( /* fnDone, fnFail, fnProgress */ ) {3716var fns = arguments;37173718return jQuery.Deferred( function( newDefer ) {3719jQuery.each( tuples, function( _i, tuple ) {37203721// Map tuples (progress, done, fail) to arguments (done, fail, progress)3722var fn = isFunction( fns[ tuple[ 4 ] ] ) && fns[ tuple[ 4 ] ];37233724// deferred.progress(function() { bind to newDefer or newDefer.notify })3725// deferred.done(function() { bind to newDefer or newDefer.resolve })3726// deferred.fail(function() { bind to newDefer or newDefer.reject })3727deferred[ tuple[ 1 ] ]( function() {3728var returned = fn && fn.apply( this, arguments );3729if ( returned && isFunction( returned.promise ) ) {3730returned.promise()3731.progress( newDefer.notify )3732.done( newDefer.resolve )3733.fail( newDefer.reject );3734} else {3735newDefer[ tuple[ 0 ] + "With" ](3736this,3737fn ? [ returned ] : arguments3738);3739}3740} );3741} );3742fns = null;3743} ).promise();3744},3745then: function( onFulfilled, onRejected, onProgress ) {3746var maxDepth = 0;3747function resolve( depth, deferred, handler, special ) {3748return function() {3749var that = this,3750args = arguments,3751mightThrow = function() {3752var returned, then;37533754// Support: Promises/A+ section 2.3.3.3.33755// https://promisesaplus.com/#point-593756// Ignore double-resolution attempts3757if ( depth < maxDepth ) {3758return;3759}37603761returned = handler.apply( that, args );37623763// Support: Promises/A+ section 2.3.13764// https://promisesaplus.com/#point-483765if ( returned === deferred.promise() ) {3766throw new TypeError( "Thenable self-resolution" );3767}37683769// Support: Promises/A+ sections 2.3.3.1, 3.53770// https://promisesaplus.com/#point-543771// https://promisesaplus.com/#point-753772// Retrieve `then` only once3773then = returned &&37743775// Support: Promises/A+ section 2.3.43776// https://promisesaplus.com/#point-643777// Only check objects and functions for thenability3778( typeof returned === "object" ||3779typeof returned === "function" ) &&3780returned.then;37813782// Handle a returned thenable3783if ( isFunction( then ) ) {37843785// Special processors (notify) just wait for resolution3786if ( special ) {3787then.call(3788returned,3789resolve( maxDepth, deferred, Identity, special ),3790resolve( maxDepth, deferred, Thrower, special )3791);37923793// Normal processors (resolve) also hook into progress3794} else {37953796// ...and disregard older resolution values3797maxDepth++;37983799then.call(3800returned,3801resolve( maxDepth, deferred, Identity, special ),3802resolve( maxDepth, deferred, Thrower, special ),3803resolve( maxDepth, deferred, Identity,3804deferred.notifyWith )3805);3806}38073808// Handle all other returned values3809} else {38103811// Only substitute handlers pass on context3812// and multiple values (non-spec behavior)3813if ( handler !== Identity ) {3814that = undefined;3815args = [ returned ];3816}38173818// Process the value(s)3819// Default process is resolve3820( special || deferred.resolveWith )( that, args );3821}3822},38233824// Only normal processors (resolve) catch and reject exceptions3825process = special ?3826mightThrow :3827function() {3828try {3829mightThrow();3830} catch ( e ) {38313832if ( jQuery.Deferred.exceptionHook ) {3833jQuery.Deferred.exceptionHook( e,3834process.stackTrace );3835}38363837// Support: Promises/A+ section 2.3.3.3.4.13838// https://promisesaplus.com/#point-613839// Ignore post-resolution exceptions3840if ( depth + 1 >= maxDepth ) {38413842// Only substitute handlers pass on context3843// and multiple values (non-spec behavior)3844if ( handler !== Thrower ) {3845that = undefined;3846args = [ e ];3847}38483849deferred.rejectWith( that, args );3850}3851}3852};38533854// Support: Promises/A+ section 2.3.3.3.13855// https://promisesaplus.com/#point-573856// Re-resolve promises immediately to dodge false rejection from3857// subsequent errors3858if ( depth ) {3859process();3860} else {38613862// Call an optional hook to record the stack, in case of exception3863// since it's otherwise lost when execution goes async3864if ( jQuery.Deferred.getStackHook ) {3865process.stackTrace = jQuery.Deferred.getStackHook();3866}3867window.setTimeout( process );3868}3869};3870}38713872return jQuery.Deferred( function( newDefer ) {38733874// progress_handlers.add( ... )3875tuples[ 0 ][ 3 ].add(3876resolve(38770,3878newDefer,3879isFunction( onProgress ) ?3880onProgress :3881Identity,3882newDefer.notifyWith3883)3884);38853886// fulfilled_handlers.add( ... )3887tuples[ 1 ][ 3 ].add(3888resolve(38890,3890newDefer,3891isFunction( onFulfilled ) ?3892onFulfilled :3893Identity3894)3895);38963897// rejected_handlers.add( ... )3898tuples[ 2 ][ 3 ].add(3899resolve(39000,3901newDefer,3902isFunction( onRejected ) ?3903onRejected :3904Thrower3905)3906);3907} ).promise();3908},39093910// Get a promise for this deferred3911// If obj is provided, the promise aspect is added to the object3912promise: function( obj ) {3913return obj != null ? jQuery.extend( obj, promise ) : promise;3914}3915},3916deferred = {};39173918// Add list-specific methods3919jQuery.each( tuples, function( i, tuple ) {3920var list = tuple[ 2 ],3921stateString = tuple[ 5 ];39223923// promise.progress = list.add3924// promise.done = list.add3925// promise.fail = list.add3926promise[ tuple[ 1 ] ] = list.add;39273928// Handle state3929if ( stateString ) {3930list.add(3931function() {39323933// state = "resolved" (i.e., fulfilled)3934// state = "rejected"3935state = stateString;3936},39373938// rejected_callbacks.disable3939// fulfilled_callbacks.disable3940tuples[ 3 - i ][ 2 ].disable,39413942// rejected_handlers.disable3943// fulfilled_handlers.disable3944tuples[ 3 - i ][ 3 ].disable,39453946// progress_callbacks.lock3947tuples[ 0 ][ 2 ].lock,39483949// progress_handlers.lock3950tuples[ 0 ][ 3 ].lock3951);3952}39533954// progress_handlers.fire3955// fulfilled_handlers.fire3956// rejected_handlers.fire3957list.add( tuple[ 3 ].fire );39583959// deferred.notify = function() { deferred.notifyWith(...) }3960// deferred.resolve = function() { deferred.resolveWith(...) }3961// deferred.reject = function() { deferred.rejectWith(...) }3962deferred[ tuple[ 0 ] ] = function() {3963deferred[ tuple[ 0 ] + "With" ]( this === deferred ? undefined : this, arguments );3964return this;3965};39663967// deferred.notifyWith = list.fireWith3968// deferred.resolveWith = list.fireWith3969// deferred.rejectWith = list.fireWith3970deferred[ tuple[ 0 ] + "With" ] = list.fireWith;3971} );39723973// Make the deferred a promise3974promise.promise( deferred );39753976// Call given func if any3977if ( func ) {3978func.call( deferred, deferred );3979}39803981// All done!3982return deferred;3983},39843985// Deferred helper3986when: function( singleValue ) {3987var39883989// count of uncompleted subordinates3990remaining = arguments.length,39913992// count of unprocessed arguments3993i = remaining,39943995// subordinate fulfillment data3996resolveContexts = Array( i ),3997resolveValues = slice.call( arguments ),39983999// the master Deferred4000master = jQuery.Deferred(),40014002// subordinate callback factory4003updateFunc = function( i ) {4004return function( value ) {4005resolveContexts[ i ] = this;4006resolveValues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value;4007if ( !( --remaining ) ) {4008master.resolveWith( resolveContexts, resolveValues );4009}4010};4011};40124013// Single- and empty arguments are adopted like Promise.resolve4014if ( remaining <= 1 ) {4015adoptValue( singleValue, master.done( updateFunc( i ) ).resolve, master.reject,4016!remaining );40174018// Use .then() to unwrap secondary thenables (cf. gh-3000)4019if ( master.state() === "pending" ||4020isFunction( resolveValues[ i ] && resolveValues[ i ].then ) ) {40214022return master.then();4023}4024}40254026// Multiple arguments are aggregated like Promise.all array elements4027while ( i-- ) {4028adoptValue( resolveValues[ i ], updateFunc( i ), master.reject );4029}40304031return master.promise();4032}4033} );403440354036// These usually indicate a programmer mistake during development,4037// warn about them ASAP rather than swallowing them by default.4038var rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;40394040jQuery.Deferred.exceptionHook = function( error, stack ) {40414042// Support: IE 8 - 9 only4043// Console exists when dev tools are open, which can happen at any time4044if ( window.console && window.console.warn && error && rerrorNames.test( error.name ) ) {4045window.console.warn( "jQuery.Deferred exception: " + error.message, error.stack, stack );4046}4047};40484049405040514052jQuery.readyException = function( error ) {4053window.setTimeout( function() {4054throw error;4055} );4056};40574058405940604061// The deferred used on DOM ready4062var readyList = jQuery.Deferred();40634064jQuery.fn.ready = function( fn ) {40654066readyList4067.then( fn )40684069// Wrap jQuery.readyException in a function so that the lookup4070// happens at the time of error handling instead of callback4071// registration.4072.catch( function( error ) {4073jQuery.readyException( error );4074} );40754076return this;4077};40784079jQuery.extend( {40804081// Is the DOM ready to be used? Set to true once it occurs.4082isReady: false,40834084// A counter to track how many items to wait for before4085// the ready event fires. See #67814086readyWait: 1,40874088// Handle when the DOM is ready4089ready: function( wait ) {40904091// Abort if there are pending holds or we're already ready4092if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {4093return;4094}40954096// Remember that the DOM is ready4097jQuery.isReady = true;40984099// If a normal DOM Ready event fired, decrement, and wait if need be4100if ( wait !== true && --jQuery.readyWait > 0 ) {4101return;4102}41034104// If there are functions bound, to execute4105readyList.resolveWith( document, [ jQuery ] );4106}4107} );41084109jQuery.ready.then = readyList.then;41104111// The ready event handler and self cleanup method4112function completed() {4113document.removeEventListener( "DOMContentLoaded", completed );4114window.removeEventListener( "load", completed );4115jQuery.ready();4116}41174118// Catch cases where $(document).ready() is called4119// after the browser event has already occurred.4120// Support: IE <=9 - 10 only4121// Older IE sometimes signals "interactive" too soon4122if ( document.readyState === "complete" ||4123( document.readyState !== "loading" && !document.documentElement.doScroll ) ) {41244125// Handle it asynchronously to allow scripts the opportunity to delay ready4126window.setTimeout( jQuery.ready );41274128} else {41294130// Use the handy event callback4131document.addEventListener( "DOMContentLoaded", completed );41324133// A fallback to window.onload, that will always work4134window.addEventListener( "load", completed );4135}41364137413841394140// Multifunctional method to get and set values of a collection4141// The value/s can optionally be executed if it's a function4142var access = function( elems, fn, key, value, chainable, emptyGet, raw ) {4143var i = 0,4144len = elems.length,4145bulk = key == null;41464147// Sets many values4148if ( toType( key ) === "object" ) {4149chainable = true;4150for ( i in key ) {4151access( elems, fn, i, key[ i ], true, emptyGet, raw );4152}41534154// Sets one value4155} else if ( value !== undefined ) {4156chainable = true;41574158if ( !isFunction( value ) ) {4159raw = true;4160}41614162if ( bulk ) {41634164// Bulk operations run against the entire set4165if ( raw ) {4166fn.call( elems, value );4167fn = null;41684169// ...except when executing function values4170} else {4171bulk = fn;4172fn = function( elem, _key, value ) {4173return bulk.call( jQuery( elem ), value );4174};4175}4176}41774178if ( fn ) {4179for ( ; i < len; i++ ) {4180fn(4181elems[ i ], key, raw ?4182value :4183value.call( elems[ i ], i, fn( elems[ i ], key ) )4184);4185}4186}4187}41884189if ( chainable ) {4190return elems;4191}41924193// Gets4194if ( bulk ) {4195return fn.call( elems );4196}41974198return len ? fn( elems[ 0 ], key ) : emptyGet;4199};420042014202// Matches dashed string for camelizing4203var rmsPrefix = /^-ms-/,4204rdashAlpha = /-([a-z])/g;42054206// Used by camelCase as callback to replace()4207function fcamelCase( _all, letter ) {4208return letter.toUpperCase();4209}42104211// Convert dashed to camelCase; used by the css and data modules4212// Support: IE <=9 - 11, Edge 12 - 154213// Microsoft forgot to hump their vendor prefix (#9572)4214function camelCase( string ) {4215return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );4216}4217var acceptData = function( owner ) {42184219// Accepts only:4220// - Node4221// - Node.ELEMENT_NODE4222// - Node.DOCUMENT_NODE4223// - Object4224// - Any4225return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType );4226};42274228422942304231function Data() {4232this.expando = jQuery.expando + Data.uid++;4233}42344235Data.uid = 1;42364237Data.prototype = {42384239cache: function( owner ) {42404241// Check if the owner object already has a cache4242var value = owner[ this.expando ];42434244// If not, create one4245if ( !value ) {4246value = {};42474248// We can accept data for non-element nodes in modern browsers,4249// but we should not, see #8335.4250// Always return an empty object.4251if ( acceptData( owner ) ) {42524253// If it is a node unlikely to be stringify-ed or looped over4254// use plain assignment4255if ( owner.nodeType ) {4256owner[ this.expando ] = value;42574258// Otherwise secure it in a non-enumerable property4259// configurable must be true to allow the property to be4260// deleted when data is removed4261} else {4262Object.defineProperty( owner, this.expando, {4263value: value,4264configurable: true4265} );4266}4267}4268}42694270return value;4271},4272set: function( owner, data, value ) {4273var prop,4274cache = this.cache( owner );42754276// Handle: [ owner, key, value ] args4277// Always use camelCase key (gh-2257)4278if ( typeof data === "string" ) {4279cache[ camelCase( data ) ] = value;42804281// Handle: [ owner, { properties } ] args4282} else {42834284// Copy the properties one-by-one to the cache object4285for ( prop in data ) {4286cache[ camelCase( prop ) ] = data[ prop ];4287}4288}4289return cache;4290},4291get: function( owner, key ) {4292return key === undefined ?4293this.cache( owner ) :42944295// Always use camelCase key (gh-2257)4296owner[ this.expando ] && owner[ this.expando ][ camelCase( key ) ];4297},4298access: function( owner, key, value ) {42994300// In cases where either:4301//4302// 1. No key was specified4303// 2. A string key was specified, but no value provided4304//4305// Take the "read" path and allow the get method to determine4306// which value to return, respectively either:4307//4308// 1. The entire cache object4309// 2. The data stored at the key4310//4311if ( key === undefined ||4312( ( key && typeof key === "string" ) && value === undefined ) ) {43134314return this.get( owner, key );4315}43164317// When the key is not a string, or both a key and value4318// are specified, set or extend (existing objects) with either:4319//4320// 1. An object of properties4321// 2. A key and value4322//4323this.set( owner, key, value );43244325// Since the "set" path can have two possible entry points4326// return the expected data based on which path was taken[*]4327return value !== undefined ? value : key;4328},4329remove: function( owner, key ) {4330var i,4331cache = owner[ this.expando ];43324333if ( cache === undefined ) {4334return;4335}43364337if ( key !== undefined ) {43384339// Support array or space separated string of keys4340if ( Array.isArray( key ) ) {43414342// If key is an array of keys...4343// We always set camelCase keys, so remove that.4344key = key.map( camelCase );4345} else {4346key = camelCase( key );43474348// If a key with the spaces exists, use it.4349// Otherwise, create an array by matching non-whitespace4350key = key in cache ?4351[ key ] :4352( key.match( rnothtmlwhite ) || [] );4353}43544355i = key.length;43564357while ( i-- ) {4358delete cache[ key[ i ] ];4359}4360}43614362// Remove the expando if there's no more data4363if ( key === undefined || jQuery.isEmptyObject( cache ) ) {43644365// Support: Chrome <=35 - 454366// Webkit & Blink performance suffers when deleting properties4367// from DOM nodes, so set to undefined instead4368// https://bugs.chromium.org/p/chromium/issues/detail?id=378607 (bug restricted)4369if ( owner.nodeType ) {4370owner[ this.expando ] = undefined;4371} else {4372delete owner[ this.expando ];4373}4374}4375},4376hasData: function( owner ) {4377var cache = owner[ this.expando ];4378return cache !== undefined && !jQuery.isEmptyObject( cache );4379}4380};4381var dataPriv = new Data();43824383var dataUser = new Data();4384438543864387// Implementation Summary4388//4389// 1. Enforce API surface and semantic compatibility with 1.9.x branch4390// 2. Improve the module's maintainability by reducing the storage4391// paths to a single mechanism.4392// 3. Use the same single mechanism to support "private" and "user" data.4393// 4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData)4394// 5. Avoid exposing implementation details on user objects (eg. expando properties)4395// 6. Provide a clear path for implementation upgrade to WeakMap in 201443964397var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,4398rmultiDash = /[A-Z]/g;43994400function getData( data ) {4401if ( data === "true" ) {4402return true;4403}44044405if ( data === "false" ) {4406return false;4407}44084409if ( data === "null" ) {4410return null;4411}44124413// Only convert to a number if it doesn't change the string4414if ( data === +data + "" ) {4415return +data;4416}44174418if ( rbrace.test( data ) ) {4419return JSON.parse( data );4420}44214422return data;4423}44244425function dataAttr( elem, key, data ) {4426var name;44274428// If nothing was found internally, try to fetch any4429// data from the HTML5 data-* attribute4430if ( data === undefined && elem.nodeType === 1 ) {4431name = "data-" + key.replace( rmultiDash, "-$&" ).toLowerCase();4432data = elem.getAttribute( name );44334434if ( typeof data === "string" ) {4435try {4436data = getData( data );4437} catch ( e ) {}44384439// Make sure we set the data so it isn't changed later4440dataUser.set( elem, key, data );4441} else {4442data = undefined;4443}4444}4445return data;4446}44474448jQuery.extend( {4449hasData: function( elem ) {4450return dataUser.hasData( elem ) || dataPriv.hasData( elem );4451},44524453data: function( elem, name, data ) {4454return dataUser.access( elem, name, data );4455},44564457removeData: function( elem, name ) {4458dataUser.remove( elem, name );4459},44604461// TODO: Now that all calls to _data and _removeData have been replaced4462// with direct calls to dataPriv methods, these can be deprecated.4463_data: function( elem, name, data ) {4464return dataPriv.access( elem, name, data );4465},44664467_removeData: function( elem, name ) {4468dataPriv.remove( elem, name );4469}4470} );44714472jQuery.fn.extend( {4473data: function( key, value ) {4474var i, name, data,4475elem = this[ 0 ],4476attrs = elem && elem.attributes;44774478// Gets all values4479if ( key === undefined ) {4480if ( this.length ) {4481data = dataUser.get( elem );44824483if ( elem.nodeType === 1 && !dataPriv.get( elem, "hasDataAttrs" ) ) {4484i = attrs.length;4485while ( i-- ) {44864487// Support: IE 11 only4488// The attrs elements can be null (#14894)4489if ( attrs[ i ] ) {4490name = attrs[ i ].name;4491if ( name.indexOf( "data-" ) === 0 ) {4492name = camelCase( name.slice( 5 ) );4493dataAttr( elem, name, data[ name ] );4494}4495}4496}4497dataPriv.set( elem, "hasDataAttrs", true );4498}4499}45004501return data;4502}45034504// Sets multiple values4505if ( typeof key === "object" ) {4506return this.each( function() {4507dataUser.set( this, key );4508} );4509}45104511return access( this, function( value ) {4512var data;45134514// The calling jQuery object (element matches) is not empty4515// (and therefore has an element appears at this[ 0 ]) and the4516// `value` parameter was not undefined. An empty jQuery object4517// will result in `undefined` for elem = this[ 0 ] which will4518// throw an exception if an attempt to read a data cache is made.4519if ( elem && value === undefined ) {45204521// Attempt to get data from the cache4522// The key will always be camelCased in Data4523data = dataUser.get( elem, key );4524if ( data !== undefined ) {4525return data;4526}45274528// Attempt to "discover" the data in4529// HTML5 custom data-* attrs4530data = dataAttr( elem, key );4531if ( data !== undefined ) {4532return data;4533}45344535// We tried really hard, but the data doesn't exist.4536return;4537}45384539// Set the data...4540this.each( function() {45414542// We always store the camelCased key4543dataUser.set( this, key, value );4544} );4545}, null, value, arguments.length > 1, null, true );4546},45474548removeData: function( key ) {4549return this.each( function() {4550dataUser.remove( this, key );4551} );4552}4553} );455445554556jQuery.extend( {4557queue: function( elem, type, data ) {4558var queue;45594560if ( elem ) {4561type = ( type || "fx" ) + "queue";4562queue = dataPriv.get( elem, type );45634564// Speed up dequeue by getting out quickly if this is just a lookup4565if ( data ) {4566if ( !queue || Array.isArray( data ) ) {4567queue = dataPriv.access( elem, type, jQuery.makeArray( data ) );4568} else {4569queue.push( data );4570}4571}4572return queue || [];4573}4574},45754576dequeue: function( elem, type ) {4577type = type || "fx";45784579var queue = jQuery.queue( elem, type ),4580startLength = queue.length,4581fn = queue.shift(),4582hooks = jQuery._queueHooks( elem, type ),4583next = function() {4584jQuery.dequeue( elem, type );4585};45864587// If the fx queue is dequeued, always remove the progress sentinel4588if ( fn === "inprogress" ) {4589fn = queue.shift();4590startLength--;4591}45924593if ( fn ) {45944595// Add a progress sentinel to prevent the fx queue from being4596// automatically dequeued4597if ( type === "fx" ) {4598queue.unshift( "inprogress" );4599}46004601// Clear up the last queue stop function4602delete hooks.stop;4603fn.call( elem, next, hooks );4604}46054606if ( !startLength && hooks ) {4607hooks.empty.fire();4608}4609},46104611// Not public - generate a queueHooks object, or return the current one4612_queueHooks: function( elem, type ) {4613var key = type + "queueHooks";4614return dataPriv.get( elem, key ) || dataPriv.access( elem, key, {4615empty: jQuery.Callbacks( "once memory" ).add( function() {4616dataPriv.remove( elem, [ type + "queue", key ] );4617} )4618} );4619}4620} );46214622jQuery.fn.extend( {4623queue: function( type, data ) {4624var setter = 2;46254626if ( typeof type !== "string" ) {4627data = type;4628type = "fx";4629setter--;4630}46314632if ( arguments.length < setter ) {4633return jQuery.queue( this[ 0 ], type );4634}46354636return data === undefined ?4637this :4638this.each( function() {4639var queue = jQuery.queue( this, type, data );46404641// Ensure a hooks for this queue4642jQuery._queueHooks( this, type );46434644if ( type === "fx" && queue[ 0 ] !== "inprogress" ) {4645jQuery.dequeue( this, type );4646}4647} );4648},4649dequeue: function( type ) {4650return this.each( function() {4651jQuery.dequeue( this, type );4652} );4653},4654clearQueue: function( type ) {4655return this.queue( type || "fx", [] );4656},46574658// Get a promise resolved when queues of a certain type4659// are emptied (fx is the type by default)4660promise: function( type, obj ) {4661var tmp,4662count = 1,4663defer = jQuery.Deferred(),4664elements = this,4665i = this.length,4666resolve = function() {4667if ( !( --count ) ) {4668defer.resolveWith( elements, [ elements ] );4669}4670};46714672if ( typeof type !== "string" ) {4673obj = type;4674type = undefined;4675}4676type = type || "fx";46774678while ( i-- ) {4679tmp = dataPriv.get( elements[ i ], type + "queueHooks" );4680if ( tmp && tmp.empty ) {4681count++;4682tmp.empty.add( resolve );4683}4684}4685resolve();4686return defer.promise( obj );4687}4688} );4689var pnum = ( /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/ ).source;46904691var rcssNum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" );469246934694var cssExpand = [ "Top", "Right", "Bottom", "Left" ];46954696var documentElement = document.documentElement;4697469846994700var isAttached = function( elem ) {4701return jQuery.contains( elem.ownerDocument, elem );4702},4703composed = { composed: true };47044705// Support: IE 9 - 11+, Edge 12 - 18+, iOS 10.0 - 10.2 only4706// Check attachment across shadow DOM boundaries when possible (gh-3504)4707// Support: iOS 10.0-10.2 only4708// Early iOS 10 versions support `attachShadow` but not `getRootNode`,4709// leading to errors. We need to check for `getRootNode`.4710if ( documentElement.getRootNode ) {4711isAttached = function( elem ) {4712return jQuery.contains( elem.ownerDocument, elem ) ||4713elem.getRootNode( composed ) === elem.ownerDocument;4714};4715}4716var isHiddenWithinTree = function( elem, el ) {47174718// isHiddenWithinTree might be called from jQuery#filter function;4719// in that case, element will be second argument4720elem = el || elem;47214722// Inline style trumps all4723return elem.style.display === "none" ||4724elem.style.display === "" &&47254726// Otherwise, check computed style4727// Support: Firefox <=43 - 454728// Disconnected elements can have computed display: none, so first confirm that elem is4729// in the document.4730isAttached( elem ) &&47314732jQuery.css( elem, "display" ) === "none";4733};4734473547364737function adjustCSS( elem, prop, valueParts, tween ) {4738var adjusted, scale,4739maxIterations = 20,4740currentValue = tween ?4741function() {4742return tween.cur();4743} :4744function() {4745return jQuery.css( elem, prop, "" );4746},4747initial = currentValue(),4748unit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ),47494750// Starting value computation is required for potential unit mismatches4751initialInUnit = elem.nodeType &&4752( jQuery.cssNumber[ prop ] || unit !== "px" && +initial ) &&4753rcssNum.exec( jQuery.css( elem, prop ) );47544755if ( initialInUnit && initialInUnit[ 3 ] !== unit ) {47564757// Support: Firefox <=544758// Halve the iteration target value to prevent interference from CSS upper bounds (gh-2144)4759initial = initial / 2;47604761// Trust units reported by jQuery.css4762unit = unit || initialInUnit[ 3 ];47634764// Iteratively approximate from a nonzero starting point4765initialInUnit = +initial || 1;47664767while ( maxIterations-- ) {47684769// Evaluate and update our best guess (doubling guesses that zero out).4770// Finish if the scale equals or crosses 1 (making the old*new product non-positive).4771jQuery.style( elem, prop, initialInUnit + unit );4772if ( ( 1 - scale ) * ( 1 - ( scale = currentValue() / initial || 0.5 ) ) <= 0 ) {4773maxIterations = 0;4774}4775initialInUnit = initialInUnit / scale;47764777}47784779initialInUnit = initialInUnit * 2;4780jQuery.style( elem, prop, initialInUnit + unit );47814782// Make sure we update the tween properties later on4783valueParts = valueParts || [];4784}47854786if ( valueParts ) {4787initialInUnit = +initialInUnit || +initial || 0;47884789// Apply relative offset (+=/-=) if specified4790adjusted = valueParts[ 1 ] ?4791initialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] :4792+valueParts[ 2 ];4793if ( tween ) {4794tween.unit = unit;4795tween.start = initialInUnit;4796tween.end = adjusted;4797}4798}4799return adjusted;4800}480148024803var defaultDisplayMap = {};48044805function getDefaultDisplay( elem ) {4806var temp,4807doc = elem.ownerDocument,4808nodeName = elem.nodeName,4809display = defaultDisplayMap[ nodeName ];48104811if ( display ) {4812return display;4813}48144815temp = doc.body.appendChild( doc.createElement( nodeName ) );4816display = jQuery.css( temp, "display" );48174818temp.parentNode.removeChild( temp );48194820if ( display === "none" ) {4821display = "block";4822}4823defaultDisplayMap[ nodeName ] = display;48244825return display;4826}48274828function showHide( elements, show ) {4829var display, elem,4830values = [],4831index = 0,4832length = elements.length;48334834// Determine new display value for elements that need to change4835for ( ; index < length; index++ ) {4836elem = elements[ index ];4837if ( !elem.style ) {4838continue;4839}48404841display = elem.style.display;4842if ( show ) {48434844// Since we force visibility upon cascade-hidden elements, an immediate (and slow)4845// check is required in this first loop unless we have a nonempty display value (either4846// inline or about-to-be-restored)4847if ( display === "none" ) {4848values[ index ] = dataPriv.get( elem, "display" ) || null;4849if ( !values[ index ] ) {4850elem.style.display = "";4851}4852}4853if ( elem.style.display === "" && isHiddenWithinTree( elem ) ) {4854values[ index ] = getDefaultDisplay( elem );4855}4856} else {4857if ( display !== "none" ) {4858values[ index ] = "none";48594860// Remember what we're overwriting4861dataPriv.set( elem, "display", display );4862}4863}4864}48654866// Set the display of the elements in a second loop to avoid constant reflow4867for ( index = 0; index < length; index++ ) {4868if ( values[ index ] != null ) {4869elements[ index ].style.display = values[ index ];4870}4871}48724873return elements;4874}48754876jQuery.fn.extend( {4877show: function() {4878return showHide( this, true );4879},4880hide: function() {4881return showHide( this );4882},4883toggle: function( state ) {4884if ( typeof state === "boolean" ) {4885return state ? this.show() : this.hide();4886}48874888return this.each( function() {4889if ( isHiddenWithinTree( this ) ) {4890jQuery( this ).show();4891} else {4892jQuery( this ).hide();4893}4894} );4895}4896} );4897var rcheckableType = ( /^(?:checkbox|radio)$/i );48984899var rtagName = ( /<([a-z][^\/\0>\x20\t\r\n\f]*)/i );49004901var rscriptType = ( /^$|^module$|\/(?:java|ecma)script/i );4902490349044905( function() {4906var fragment = document.createDocumentFragment(),4907div = fragment.appendChild( document.createElement( "div" ) ),4908input = document.createElement( "input" );49094910// Support: Android 4.0 - 4.3 only4911// Check state lost if the name is set (#11217)4912// Support: Windows Web Apps (WWA)4913// `name` and `type` must use .setAttribute for WWA (#14901)4914input.setAttribute( "type", "radio" );4915input.setAttribute( "checked", "checked" );4916input.setAttribute( "name", "t" );49174918div.appendChild( input );49194920// Support: Android <=4.1 only4921// Older WebKit doesn't clone checked state correctly in fragments4922support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked;49234924// Support: IE <=11 only4925// Make sure textarea (and checkbox) defaultValue is properly cloned4926div.innerHTML = "<textarea>x</textarea>";4927support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;49284929// Support: IE <=9 only4930// IE <=9 replaces <option> tags with their contents when inserted outside of4931// the select element.4932div.innerHTML = "<option></option>";4933support.option = !!div.lastChild;4934} )();493549364937// We have to close these tags to support XHTML (#13200)4938var wrapMap = {49394940// XHTML parsers do not magically insert elements in the4941// same way that tag soup parsers do. So we cannot shorten4942// this by omitting <tbody> or other required elements.4943thead: [ 1, "<table>", "</table>" ],4944col: [ 2, "<table><colgroup>", "</colgroup></table>" ],4945tr: [ 2, "<table><tbody>", "</tbody></table>" ],4946td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ],49474948_default: [ 0, "", "" ]4949};49504951wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;4952wrapMap.th = wrapMap.td;49534954// Support: IE <=9 only4955if ( !support.option ) {4956wrapMap.optgroup = wrapMap.option = [ 1, "<select multiple='multiple'>", "</select>" ];4957}495849594960function getAll( context, tag ) {49614962// Support: IE <=9 - 11 only4963// Use typeof to avoid zero-argument method invocation on host objects (#15151)4964var ret;49654966if ( typeof context.getElementsByTagName !== "undefined" ) {4967ret = context.getElementsByTagName( tag || "*" );49684969} else if ( typeof context.querySelectorAll !== "undefined" ) {4970ret = context.querySelectorAll( tag || "*" );49714972} else {4973ret = [];4974}49754976if ( tag === undefined || tag && nodeName( context, tag ) ) {4977return jQuery.merge( [ context ], ret );4978}49794980return ret;4981}498249834984// Mark scripts as having already been evaluated4985function setGlobalEval( elems, refElements ) {4986var i = 0,4987l = elems.length;49884989for ( ; i < l; i++ ) {4990dataPriv.set(4991elems[ i ],4992"globalEval",4993!refElements || dataPriv.get( refElements[ i ], "globalEval" )4994);4995}4996}499749984999var rhtml = /<|&#?\w+;/;50005001function buildFragment( elems, context, scripts, selection, ignored ) {5002var elem, tmp, tag, wrap, attached, j,5003fragment = context.createDocumentFragment(),5004nodes = [],5005i = 0,5006l = elems.length;50075008for ( ; i < l; i++ ) {5009elem = elems[ i ];50105011if ( elem || elem === 0 ) {50125013// Add nodes directly5014if ( toType( elem ) === "object" ) {50155016// Support: Android <=4.0 only, PhantomJS 1 only5017// push.apply(_, arraylike) throws on ancient WebKit5018jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );50195020// Convert non-html into a text node5021} else if ( !rhtml.test( elem ) ) {5022nodes.push( context.createTextNode( elem ) );50235024// Convert html into DOM nodes5025} else {5026tmp = tmp || fragment.appendChild( context.createElement( "div" ) );50275028// Deserialize a standard representation5029tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase();5030wrap = wrapMap[ tag ] || wrapMap._default;5031tmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ];50325033// Descend through wrappers to the right content5034j = wrap[ 0 ];5035while ( j-- ) {5036tmp = tmp.lastChild;5037}50385039// Support: Android <=4.0 only, PhantomJS 1 only5040// push.apply(_, arraylike) throws on ancient WebKit5041jQuery.merge( nodes, tmp.childNodes );50425043// Remember the top-level container5044tmp = fragment.firstChild;50455046// Ensure the created nodes are orphaned (#12392)5047tmp.textContent = "";5048}5049}5050}50515052// Remove wrapper from fragment5053fragment.textContent = "";50545055i = 0;5056while ( ( elem = nodes[ i++ ] ) ) {50575058// Skip elements already in the context collection (trac-4087)5059if ( selection && jQuery.inArray( elem, selection ) > -1 ) {5060if ( ignored ) {5061ignored.push( elem );5062}5063continue;5064}50655066attached = isAttached( elem );50675068// Append to fragment5069tmp = getAll( fragment.appendChild( elem ), "script" );50705071// Preserve script evaluation history5072if ( attached ) {5073setGlobalEval( tmp );5074}50755076// Capture executables5077if ( scripts ) {5078j = 0;5079while ( ( elem = tmp[ j++ ] ) ) {5080if ( rscriptType.test( elem.type || "" ) ) {5081scripts.push( elem );5082}5083}5084}5085}50865087return fragment;5088}508950905091var5092rkeyEvent = /^key/,5093rmouseEvent = /^(?:mouse|pointer|contextmenu|drag|drop)|click/,5094rtypenamespace = /^([^.]*)(?:\.(.+)|)/;50955096function returnTrue() {5097return true;5098}50995100function returnFalse() {5101return false;5102}51035104// Support: IE <=9 - 11+5105// focus() and blur() are asynchronous, except when they are no-op.5106// So expect focus to be synchronous when the element is already active,5107// and blur to be synchronous when the element is not already active.5108// (focus and blur are always synchronous in other supported browsers,5109// this just defines when we can count on it).5110function expectSync( elem, type ) {5111return ( elem === safeActiveElement() ) === ( type === "focus" );5112}51135114// Support: IE <=9 only5115// Accessing document.activeElement can throw unexpectedly5116// https://bugs.jquery.com/ticket/133935117function safeActiveElement() {5118try {5119return document.activeElement;5120} catch ( err ) { }5121}51225123function on( elem, types, selector, data, fn, one ) {5124var origFn, type;51255126// Types can be a map of types/handlers5127if ( typeof types === "object" ) {51285129// ( types-Object, selector, data )5130if ( typeof selector !== "string" ) {51315132// ( types-Object, data )5133data = data || selector;5134selector = undefined;5135}5136for ( type in types ) {5137on( elem, type, selector, data, types[ type ], one );5138}5139return elem;5140}51415142if ( data == null && fn == null ) {51435144// ( types, fn )5145fn = selector;5146data = selector = undefined;5147} else if ( fn == null ) {5148if ( typeof selector === "string" ) {51495150// ( types, selector, fn )5151fn = data;5152data = undefined;5153} else {51545155// ( types, data, fn )5156fn = data;5157data = selector;5158selector = undefined;5159}5160}5161if ( fn === false ) {5162fn = returnFalse;5163} else if ( !fn ) {5164return elem;5165}51665167if ( one === 1 ) {5168origFn = fn;5169fn = function( event ) {51705171// Can use an empty set, since event contains the info5172jQuery().off( event );5173return origFn.apply( this, arguments );5174};51755176// Use same guid so caller can remove using origFn5177fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );5178}5179return elem.each( function() {5180jQuery.event.add( this, types, fn, data, selector );5181} );5182}51835184/*5185* Helper functions for managing events -- not part of the public interface.5186* Props to Dean Edwards' addEvent library for many of the ideas.5187*/5188jQuery.event = {51895190global: {},51915192add: function( elem, types, handler, data, selector ) {51935194var handleObjIn, eventHandle, tmp,5195events, t, handleObj,5196special, handlers, type, namespaces, origType,5197elemData = dataPriv.get( elem );51985199// Only attach events to objects that accept data5200if ( !acceptData( elem ) ) {5201return;5202}52035204// Caller can pass in an object of custom data in lieu of the handler5205if ( handler.handler ) {5206handleObjIn = handler;5207handler = handleObjIn.handler;5208selector = handleObjIn.selector;5209}52105211// Ensure that invalid selectors throw exceptions at attach time5212// Evaluate against documentElement in case elem is a non-element node (e.g., document)5213if ( selector ) {5214jQuery.find.matchesSelector( documentElement, selector );5215}52165217// Make sure that the handler has a unique ID, used to find/remove it later5218if ( !handler.guid ) {5219handler.guid = jQuery.guid++;5220}52215222// Init the element's event structure and main handler, if this is the first5223if ( !( events = elemData.events ) ) {5224events = elemData.events = Object.create( null );5225}5226if ( !( eventHandle = elemData.handle ) ) {5227eventHandle = elemData.handle = function( e ) {52285229// Discard the second event of a jQuery.event.trigger() and5230// when an event is called after a page has unloaded5231return typeof jQuery !== "undefined" && jQuery.event.triggered !== e.type ?5232jQuery.event.dispatch.apply( elem, arguments ) : undefined;5233};5234}52355236// Handle multiple events separated by a space5237types = ( types || "" ).match( rnothtmlwhite ) || [ "" ];5238t = types.length;5239while ( t-- ) {5240tmp = rtypenamespace.exec( types[ t ] ) || [];5241type = origType = tmp[ 1 ];5242namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort();52435244// There *must* be a type, no attaching namespace-only handlers5245if ( !type ) {5246continue;5247}52485249// If event changes its type, use the special event handlers for the changed type5250special = jQuery.event.special[ type ] || {};52515252// If selector defined, determine special event api type, otherwise given type5253type = ( selector ? special.delegateType : special.bindType ) || type;52545255// Update special based on newly reset type5256special = jQuery.event.special[ type ] || {};52575258// handleObj is passed to all event handlers5259handleObj = jQuery.extend( {5260type: type,5261origType: origType,5262data: data,5263handler: handler,5264guid: handler.guid,5265selector: selector,5266needsContext: selector && jQuery.expr.match.needsContext.test( selector ),5267namespace: namespaces.join( "." )5268}, handleObjIn );52695270// Init the event handler queue if we're the first5271if ( !( handlers = events[ type ] ) ) {5272handlers = events[ type ] = [];5273handlers.delegateCount = 0;52745275// Only use addEventListener if the special events handler returns false5276if ( !special.setup ||5277special.setup.call( elem, data, namespaces, eventHandle ) === false ) {52785279if ( elem.addEventListener ) {5280elem.addEventListener( type, eventHandle );5281}5282}5283}52845285if ( special.add ) {5286special.add.call( elem, handleObj );52875288if ( !handleObj.handler.guid ) {5289handleObj.handler.guid = handler.guid;5290}5291}52925293// Add to the element's handler list, delegates in front5294if ( selector ) {5295handlers.splice( handlers.delegateCount++, 0, handleObj );5296} else {5297handlers.push( handleObj );5298}52995300// Keep track of which events have ever been used, for event optimization5301jQuery.event.global[ type ] = true;5302}53035304},53055306// Detach an event or set of events from an element5307remove: function( elem, types, handler, selector, mappedTypes ) {53085309var j, origCount, tmp,5310events, t, handleObj,5311special, handlers, type, namespaces, origType,5312elemData = dataPriv.hasData( elem ) && dataPriv.get( elem );53135314if ( !elemData || !( events = elemData.events ) ) {5315return;5316}53175318// Once for each type.namespace in types; type may be omitted5319types = ( types || "" ).match( rnothtmlwhite ) || [ "" ];5320t = types.length;5321while ( t-- ) {5322tmp = rtypenamespace.exec( types[ t ] ) || [];5323type = origType = tmp[ 1 ];5324namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort();53255326// Unbind all events (on this namespace, if provided) for the element5327if ( !type ) {5328for ( type in events ) {5329jQuery.event.remove( elem, type + types[ t ], handler, selector, true );5330}5331continue;5332}53335334special = jQuery.event.special[ type ] || {};5335type = ( selector ? special.delegateType : special.bindType ) || type;5336handlers = events[ type ] || [];5337tmp = tmp[ 2 ] &&5338new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" );53395340// Remove matching events5341origCount = j = handlers.length;5342while ( j-- ) {5343handleObj = handlers[ j ];53445345if ( ( mappedTypes || origType === handleObj.origType ) &&5346( !handler || handler.guid === handleObj.guid ) &&5347( !tmp || tmp.test( handleObj.namespace ) ) &&5348( !selector || selector === handleObj.selector ||5349selector === "**" && handleObj.selector ) ) {5350handlers.splice( j, 1 );53515352if ( handleObj.selector ) {5353handlers.delegateCount--;5354}5355if ( special.remove ) {5356special.remove.call( elem, handleObj );5357}5358}5359}53605361// Remove generic event handler if we removed something and no more handlers exist5362// (avoids potential for endless recursion during removal of special event handlers)5363if ( origCount && !handlers.length ) {5364if ( !special.teardown ||5365special.teardown.call( elem, namespaces, elemData.handle ) === false ) {53665367jQuery.removeEvent( elem, type, elemData.handle );5368}53695370delete events[ type ];5371}5372}53735374// Remove data and the expando if it's no longer used5375if ( jQuery.isEmptyObject( events ) ) {5376dataPriv.remove( elem, "handle events" );5377}5378},53795380dispatch: function( nativeEvent ) {53815382var i, j, ret, matched, handleObj, handlerQueue,5383args = new Array( arguments.length ),53845385// Make a writable jQuery.Event from the native event object5386event = jQuery.event.fix( nativeEvent ),53875388handlers = (5389dataPriv.get( this, "events" ) || Object.create( null )5390)[ event.type ] || [],5391special = jQuery.event.special[ event.type ] || {};53925393// Use the fix-ed jQuery.Event rather than the (read-only) native event5394args[ 0 ] = event;53955396for ( i = 1; i < arguments.length; i++ ) {5397args[ i ] = arguments[ i ];5398}53995400event.delegateTarget = this;54015402// Call the preDispatch hook for the mapped type, and let it bail if desired5403if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {5404return;5405}54065407// Determine handlers5408handlerQueue = jQuery.event.handlers.call( this, event, handlers );54095410// Run delegates first; they may want to stop propagation beneath us5411i = 0;5412while ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) {5413event.currentTarget = matched.elem;54145415j = 0;5416while ( ( handleObj = matched.handlers[ j++ ] ) &&5417!event.isImmediatePropagationStopped() ) {54185419// If the event is namespaced, then each handler is only invoked if it is5420// specially universal or its namespaces are a superset of the event's.5421if ( !event.rnamespace || handleObj.namespace === false ||5422event.rnamespace.test( handleObj.namespace ) ) {54235424event.handleObj = handleObj;5425event.data = handleObj.data;54265427ret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle ||5428handleObj.handler ).apply( matched.elem, args );54295430if ( ret !== undefined ) {5431if ( ( event.result = ret ) === false ) {5432event.preventDefault();5433event.stopPropagation();5434}5435}5436}5437}5438}54395440// Call the postDispatch hook for the mapped type5441if ( special.postDispatch ) {5442special.postDispatch.call( this, event );5443}54445445return event.result;5446},54475448handlers: function( event, handlers ) {5449var i, handleObj, sel, matchedHandlers, matchedSelectors,5450handlerQueue = [],5451delegateCount = handlers.delegateCount,5452cur = event.target;54535454// Find delegate handlers5455if ( delegateCount &&54565457// Support: IE <=95458// Black-hole SVG <use> instance trees (trac-13180)5459cur.nodeType &&54605461// Support: Firefox <=425462// Suppress spec-violating clicks indicating a non-primary pointer button (trac-3861)5463// https://www.w3.org/TR/DOM-Level-3-Events/#event-type-click5464// Support: IE 11 only5465// ...but not arrow key "clicks" of radio inputs, which can have `button` -1 (gh-2343)5466!( event.type === "click" && event.button >= 1 ) ) {54675468for ( ; cur !== this; cur = cur.parentNode || this ) {54695470// Don't check non-elements (#13208)5471// Don't process clicks on disabled elements (#6911, #8165, #11382, #11764)5472if ( cur.nodeType === 1 && !( event.type === "click" && cur.disabled === true ) ) {5473matchedHandlers = [];5474matchedSelectors = {};5475for ( i = 0; i < delegateCount; i++ ) {5476handleObj = handlers[ i ];54775478// Don't conflict with Object.prototype properties (#13203)5479sel = handleObj.selector + " ";54805481if ( matchedSelectors[ sel ] === undefined ) {5482matchedSelectors[ sel ] = handleObj.needsContext ?5483jQuery( sel, this ).index( cur ) > -1 :5484jQuery.find( sel, this, null, [ cur ] ).length;5485}5486if ( matchedSelectors[ sel ] ) {5487matchedHandlers.push( handleObj );5488}5489}5490if ( matchedHandlers.length ) {5491handlerQueue.push( { elem: cur, handlers: matchedHandlers } );5492}5493}5494}5495}54965497// Add the remaining (directly-bound) handlers5498cur = this;5499if ( delegateCount < handlers.length ) {5500handlerQueue.push( { elem: cur, handlers: handlers.slice( delegateCount ) } );5501}55025503return handlerQueue;5504},55055506addProp: function( name, hook ) {5507Object.defineProperty( jQuery.Event.prototype, name, {5508enumerable: true,5509configurable: true,55105511get: isFunction( hook ) ?5512function() {5513if ( this.originalEvent ) {5514return hook( this.originalEvent );5515}5516} :5517function() {5518if ( this.originalEvent ) {5519return this.originalEvent[ name ];5520}5521},55225523set: function( value ) {5524Object.defineProperty( this, name, {5525enumerable: true,5526configurable: true,5527writable: true,5528value: value5529} );5530}5531} );5532},55335534fix: function( originalEvent ) {5535return originalEvent[ jQuery.expando ] ?5536originalEvent :5537new jQuery.Event( originalEvent );5538},55395540special: {5541load: {55425543// Prevent triggered image.load events from bubbling to window.load5544noBubble: true5545},5546click: {55475548// Utilize native event to ensure correct state for checkable inputs5549setup: function( data ) {55505551// For mutual compressibility with _default, replace `this` access with a local var.5552// `|| data` is dead code meant only to preserve the variable through minification.5553var el = this || data;55545555// Claim the first handler5556if ( rcheckableType.test( el.type ) &&5557el.click && nodeName( el, "input" ) ) {55585559// dataPriv.set( el, "click", ... )5560leverageNative( el, "click", returnTrue );5561}55625563// Return false to allow normal processing in the caller5564return false;5565},5566trigger: function( data ) {55675568// For mutual compressibility with _default, replace `this` access with a local var.5569// `|| data` is dead code meant only to preserve the variable through minification.5570var el = this || data;55715572// Force setup before triggering a click5573if ( rcheckableType.test( el.type ) &&5574el.click && nodeName( el, "input" ) ) {55755576leverageNative( el, "click" );5577}55785579// Return non-false to allow normal event-path propagation5580return true;5581},55825583// For cross-browser consistency, suppress native .click() on links5584// Also prevent it if we're currently inside a leveraged native-event stack5585_default: function( event ) {5586var target = event.target;5587return rcheckableType.test( target.type ) &&5588target.click && nodeName( target, "input" ) &&5589dataPriv.get( target, "click" ) ||5590nodeName( target, "a" );5591}5592},55935594beforeunload: {5595postDispatch: function( event ) {55965597// Support: Firefox 20+5598// Firefox doesn't alert if the returnValue field is not set.5599if ( event.result !== undefined && event.originalEvent ) {5600event.originalEvent.returnValue = event.result;5601}5602}5603}5604}5605};56065607// Ensure the presence of an event listener that handles manually-triggered5608// synthetic events by interrupting progress until reinvoked in response to5609// *native* events that it fires directly, ensuring that state changes have5610// already occurred before other listeners are invoked.5611function leverageNative( el, type, expectSync ) {56125613// Missing expectSync indicates a trigger call, which must force setup through jQuery.event.add5614if ( !expectSync ) {5615if ( dataPriv.get( el, type ) === undefined ) {5616jQuery.event.add( el, type, returnTrue );5617}5618return;5619}56205621// Register the controller as a special universal handler for all event namespaces5622dataPriv.set( el, type, false );5623jQuery.event.add( el, type, {5624namespace: false,5625handler: function( event ) {5626var notAsync, result,5627saved = dataPriv.get( this, type );56285629if ( ( event.isTrigger & 1 ) && this[ type ] ) {56305631// Interrupt processing of the outer synthetic .trigger()ed event5632// Saved data should be false in such cases, but might be a leftover capture object5633// from an async native handler (gh-4350)5634if ( !saved.length ) {56355636// Store arguments for use when handling the inner native event5637// There will always be at least one argument (an event object), so this array5638// will not be confused with a leftover capture object.5639saved = slice.call( arguments );5640dataPriv.set( this, type, saved );56415642// Trigger the native event and capture its result5643// Support: IE <=9 - 11+5644// focus() and blur() are asynchronous5645notAsync = expectSync( this, type );5646this[ type ]();5647result = dataPriv.get( this, type );5648if ( saved !== result || notAsync ) {5649dataPriv.set( this, type, false );5650} else {5651result = {};5652}5653if ( saved !== result ) {56545655// Cancel the outer synthetic event5656event.stopImmediatePropagation();5657event.preventDefault();5658return result.value;5659}56605661// If this is an inner synthetic event for an event with a bubbling surrogate5662// (focus or blur), assume that the surrogate already propagated from triggering the5663// native event and prevent that from happening again here.5664// This technically gets the ordering wrong w.r.t. to `.trigger()` (in which the5665// bubbling surrogate propagates *after* the non-bubbling base), but that seems5666// less bad than duplication.5667} else if ( ( jQuery.event.special[ type ] || {} ).delegateType ) {5668event.stopPropagation();5669}56705671// If this is a native event triggered above, everything is now in order5672// Fire an inner synthetic event with the original arguments5673} else if ( saved.length ) {56745675// ...and capture the result5676dataPriv.set( this, type, {5677value: jQuery.event.trigger(56785679// Support: IE <=9 - 11+5680// Extend with the prototype to reset the above stopImmediatePropagation()5681jQuery.extend( saved[ 0 ], jQuery.Event.prototype ),5682saved.slice( 1 ),5683this5684)5685} );56865687// Abort handling of the native event5688event.stopImmediatePropagation();5689}5690}5691} );5692}56935694jQuery.removeEvent = function( elem, type, handle ) {56955696// This "if" is needed for plain objects5697if ( elem.removeEventListener ) {5698elem.removeEventListener( type, handle );5699}5700};57015702jQuery.Event = function( src, props ) {57035704// Allow instantiation without the 'new' keyword5705if ( !( this instanceof jQuery.Event ) ) {5706return new jQuery.Event( src, props );5707}57085709// Event object5710if ( src && src.type ) {5711this.originalEvent = src;5712this.type = src.type;57135714// Events bubbling up the document may have been marked as prevented5715// by a handler lower down the tree; reflect the correct value.5716this.isDefaultPrevented = src.defaultPrevented ||5717src.defaultPrevented === undefined &&57185719// Support: Android <=2.3 only5720src.returnValue === false ?5721returnTrue :5722returnFalse;57235724// Create target properties5725// Support: Safari <=6 - 7 only5726// Target should not be a text node (#504, #13143)5727this.target = ( src.target && src.target.nodeType === 3 ) ?5728src.target.parentNode :5729src.target;57305731this.currentTarget = src.currentTarget;5732this.relatedTarget = src.relatedTarget;57335734// Event type5735} else {5736this.type = src;5737}57385739// Put explicitly provided properties onto the event object5740if ( props ) {5741jQuery.extend( this, props );5742}57435744// Create a timestamp if incoming event doesn't have one5745this.timeStamp = src && src.timeStamp || Date.now();57465747// Mark it as fixed5748this[ jQuery.expando ] = true;5749};57505751// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding5752// https://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html5753jQuery.Event.prototype = {5754constructor: jQuery.Event,5755isDefaultPrevented: returnFalse,5756isPropagationStopped: returnFalse,5757isImmediatePropagationStopped: returnFalse,5758isSimulated: false,57595760preventDefault: function() {5761var e = this.originalEvent;57625763this.isDefaultPrevented = returnTrue;57645765if ( e && !this.isSimulated ) {5766e.preventDefault();5767}5768},5769stopPropagation: function() {5770var e = this.originalEvent;57715772this.isPropagationStopped = returnTrue;57735774if ( e && !this.isSimulated ) {5775e.stopPropagation();5776}5777},5778stopImmediatePropagation: function() {5779var e = this.originalEvent;57805781this.isImmediatePropagationStopped = returnTrue;57825783if ( e && !this.isSimulated ) {5784e.stopImmediatePropagation();5785}57865787this.stopPropagation();5788}5789};57905791// Includes all common event props including KeyEvent and MouseEvent specific props5792jQuery.each( {5793altKey: true,5794bubbles: true,5795cancelable: true,5796changedTouches: true,5797ctrlKey: true,5798detail: true,5799eventPhase: true,5800metaKey: true,5801pageX: true,5802pageY: true,5803shiftKey: true,5804view: true,5805"char": true,5806code: true,5807charCode: true,5808key: true,5809keyCode: true,5810button: true,5811buttons: true,5812clientX: true,5813clientY: true,5814offsetX: true,5815offsetY: true,5816pointerId: true,5817pointerType: true,5818screenX: true,5819screenY: true,5820targetTouches: true,5821toElement: true,5822touches: true,58235824which: function( event ) {5825var button = event.button;58265827// Add which for key events5828if ( event.which == null && rkeyEvent.test( event.type ) ) {5829return event.charCode != null ? event.charCode : event.keyCode;5830}58315832// Add which for click: 1 === left; 2 === middle; 3 === right5833if ( !event.which && button !== undefined && rmouseEvent.test( event.type ) ) {5834if ( button & 1 ) {5835return 1;5836}58375838if ( button & 2 ) {5839return 3;5840}58415842if ( button & 4 ) {5843return 2;5844}58455846return 0;5847}58485849return event.which;5850}5851}, jQuery.event.addProp );58525853jQuery.each( { focus: "focusin", blur: "focusout" }, function( type, delegateType ) {5854jQuery.event.special[ type ] = {58555856// Utilize native event if possible so blur/focus sequence is correct5857setup: function() {58585859// Claim the first handler5860// dataPriv.set( this, "focus", ... )5861// dataPriv.set( this, "blur", ... )5862leverageNative( this, type, expectSync );58635864// Return false to allow normal processing in the caller5865return false;5866},5867trigger: function() {58685869// Force setup before trigger5870leverageNative( this, type );58715872// Return non-false to allow normal event-path propagation5873return true;5874},58755876delegateType: delegateType5877};5878} );58795880// Create mouseenter/leave events using mouseover/out and event-time checks5881// so that event delegation works in jQuery.5882// Do the same for pointerenter/pointerleave and pointerover/pointerout5883//5884// Support: Safari 7 only5885// Safari sends mouseenter too often; see:5886// https://bugs.chromium.org/p/chromium/issues/detail?id=4702585887// for the description of the bug (it existed in older Chrome versions as well).5888jQuery.each( {5889mouseenter: "mouseover",5890mouseleave: "mouseout",5891pointerenter: "pointerover",5892pointerleave: "pointerout"5893}, function( orig, fix ) {5894jQuery.event.special[ orig ] = {5895delegateType: fix,5896bindType: fix,58975898handle: function( event ) {5899var ret,5900target = this,5901related = event.relatedTarget,5902handleObj = event.handleObj;59035904// For mouseenter/leave call the handler if related is outside the target.5905// NB: No relatedTarget if the mouse left/entered the browser window5906if ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) {5907event.type = handleObj.origType;5908ret = handleObj.handler.apply( this, arguments );5909event.type = fix;5910}5911return ret;5912}5913};5914} );59155916jQuery.fn.extend( {59175918on: function( types, selector, data, fn ) {5919return on( this, types, selector, data, fn );5920},5921one: function( types, selector, data, fn ) {5922return on( this, types, selector, data, fn, 1 );5923},5924off: function( types, selector, fn ) {5925var handleObj, type;5926if ( types && types.preventDefault && types.handleObj ) {59275928// ( event ) dispatched jQuery.Event5929handleObj = types.handleObj;5930jQuery( types.delegateTarget ).off(5931handleObj.namespace ?5932handleObj.origType + "." + handleObj.namespace :5933handleObj.origType,5934handleObj.selector,5935handleObj.handler5936);5937return this;5938}5939if ( typeof types === "object" ) {59405941// ( types-object [, selector] )5942for ( type in types ) {5943this.off( type, selector, types[ type ] );5944}5945return this;5946}5947if ( selector === false || typeof selector === "function" ) {59485949// ( types [, fn] )5950fn = selector;5951selector = undefined;5952}5953if ( fn === false ) {5954fn = returnFalse;5955}5956return this.each( function() {5957jQuery.event.remove( this, types, fn, selector );5958} );5959}5960} );596159625963var59645965// Support: IE <=10 - 11, Edge 12 - 13 only5966// In IE/Edge using regex groups here causes severe slowdowns.5967// See https://connect.microsoft.com/IE/feedback/details/1736512/5968rnoInnerhtml = /<script|<style|<link/i,59695970// checked="checked" or checked5971rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,5972rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;59735974// Prefer a tbody over its parent table for containing new rows5975function manipulationTarget( elem, content ) {5976if ( nodeName( elem, "table" ) &&5977nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ) {59785979return jQuery( elem ).children( "tbody" )[ 0 ] || elem;5980}59815982return elem;5983}59845985// Replace/restore the type attribute of script elements for safe DOM manipulation5986function disableScript( elem ) {5987elem.type = ( elem.getAttribute( "type" ) !== null ) + "/" + elem.type;5988return elem;5989}5990function restoreScript( elem ) {5991if ( ( elem.type || "" ).slice( 0, 5 ) === "true/" ) {5992elem.type = elem.type.slice( 5 );5993} else {5994elem.removeAttribute( "type" );5995}59965997return elem;5998}59996000function cloneCopyEvent( src, dest ) {6001var i, l, type, pdataOld, udataOld, udataCur, events;60026003if ( dest.nodeType !== 1 ) {6004return;6005}60066007// 1. Copy private data: events, handlers, etc.6008if ( dataPriv.hasData( src ) ) {6009pdataOld = dataPriv.get( src );6010events = pdataOld.events;60116012if ( events ) {6013dataPriv.remove( dest, "handle events" );60146015for ( type in events ) {6016for ( i = 0, l = events[ type ].length; i < l; i++ ) {6017jQuery.event.add( dest, type, events[ type ][ i ] );6018}6019}6020}6021}60226023// 2. Copy user data6024if ( dataUser.hasData( src ) ) {6025udataOld = dataUser.access( src );6026udataCur = jQuery.extend( {}, udataOld );60276028dataUser.set( dest, udataCur );6029}6030}60316032// Fix IE bugs, see support tests6033function fixInput( src, dest ) {6034var nodeName = dest.nodeName.toLowerCase();60356036// Fails to persist the checked state of a cloned checkbox or radio button.6037if ( nodeName === "input" && rcheckableType.test( src.type ) ) {6038dest.checked = src.checked;60396040// Fails to return the selected option to the default selected state when cloning options6041} else if ( nodeName === "input" || nodeName === "textarea" ) {6042dest.defaultValue = src.defaultValue;6043}6044}60456046function domManip( collection, args, callback, ignored ) {60476048// Flatten any nested arrays6049args = flat( args );60506051var fragment, first, scripts, hasScripts, node, doc,6052i = 0,6053l = collection.length,6054iNoClone = l - 1,6055value = args[ 0 ],6056valueIsFunction = isFunction( value );60576058// We can't cloneNode fragments that contain checked, in WebKit6059if ( valueIsFunction ||6060( l > 1 && typeof value === "string" &&6061!support.checkClone && rchecked.test( value ) ) ) {6062return collection.each( function( index ) {6063var self = collection.eq( index );6064if ( valueIsFunction ) {6065args[ 0 ] = value.call( this, index, self.html() );6066}6067domManip( self, args, callback, ignored );6068} );6069}60706071if ( l ) {6072fragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored );6073first = fragment.firstChild;60746075if ( fragment.childNodes.length === 1 ) {6076fragment = first;6077}60786079// Require either new content or an interest in ignored elements to invoke the callback6080if ( first || ignored ) {6081scripts = jQuery.map( getAll( fragment, "script" ), disableScript );6082hasScripts = scripts.length;60836084// Use the original fragment for the last item6085// instead of the first because it can end up6086// being emptied incorrectly in certain situations (#8070).6087for ( ; i < l; i++ ) {6088node = fragment;60896090if ( i !== iNoClone ) {6091node = jQuery.clone( node, true, true );60926093// Keep references to cloned scripts for later restoration6094if ( hasScripts ) {60956096// Support: Android <=4.0 only, PhantomJS 1 only6097// push.apply(_, arraylike) throws on ancient WebKit6098jQuery.merge( scripts, getAll( node, "script" ) );6099}6100}61016102callback.call( collection[ i ], node, i );6103}61046105if ( hasScripts ) {6106doc = scripts[ scripts.length - 1 ].ownerDocument;61076108// Reenable scripts6109jQuery.map( scripts, restoreScript );61106111// Evaluate executable scripts on first document insertion6112for ( i = 0; i < hasScripts; i++ ) {6113node = scripts[ i ];6114if ( rscriptType.test( node.type || "" ) &&6115!dataPriv.access( node, "globalEval" ) &&6116jQuery.contains( doc, node ) ) {61176118if ( node.src && ( node.type || "" ).toLowerCase() !== "module" ) {61196120// Optional AJAX dependency, but won't run scripts if not present6121if ( jQuery._evalUrl && !node.noModule ) {6122jQuery._evalUrl( node.src, {6123nonce: node.nonce || node.getAttribute( "nonce" )6124}, doc );6125}6126} else {6127DOMEval( node.textContent.replace( rcleanScript, "" ), node, doc );6128}6129}6130}6131}6132}6133}61346135return collection;6136}61376138function remove( elem, selector, keepData ) {6139var node,6140nodes = selector ? jQuery.filter( selector, elem ) : elem,6141i = 0;61426143for ( ; ( node = nodes[ i ] ) != null; i++ ) {6144if ( !keepData && node.nodeType === 1 ) {6145jQuery.cleanData( getAll( node ) );6146}61476148if ( node.parentNode ) {6149if ( keepData && isAttached( node ) ) {6150setGlobalEval( getAll( node, "script" ) );6151}6152node.parentNode.removeChild( node );6153}6154}61556156return elem;6157}61586159jQuery.extend( {6160htmlPrefilter: function( html ) {6161return html;6162},61636164clone: function( elem, dataAndEvents, deepDataAndEvents ) {6165var i, l, srcElements, destElements,6166clone = elem.cloneNode( true ),6167inPage = isAttached( elem );61686169// Fix IE cloning issues6170if ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) &&6171!jQuery.isXMLDoc( elem ) ) {61726173// We eschew Sizzle here for performance reasons: https://jsperf.com/getall-vs-sizzle/26174destElements = getAll( clone );6175srcElements = getAll( elem );61766177for ( i = 0, l = srcElements.length; i < l; i++ ) {6178fixInput( srcElements[ i ], destElements[ i ] );6179}6180}61816182// Copy the events from the original to the clone6183if ( dataAndEvents ) {6184if ( deepDataAndEvents ) {6185srcElements = srcElements || getAll( elem );6186destElements = destElements || getAll( clone );61876188for ( i = 0, l = srcElements.length; i < l; i++ ) {6189cloneCopyEvent( srcElements[ i ], destElements[ i ] );6190}6191} else {6192cloneCopyEvent( elem, clone );6193}6194}61956196// Preserve script evaluation history6197destElements = getAll( clone, "script" );6198if ( destElements.length > 0 ) {6199setGlobalEval( destElements, !inPage && getAll( elem, "script" ) );6200}62016202// Return the cloned set6203return clone;6204},62056206cleanData: function( elems ) {6207var data, elem, type,6208special = jQuery.event.special,6209i = 0;62106211for ( ; ( elem = elems[ i ] ) !== undefined; i++ ) {6212if ( acceptData( elem ) ) {6213if ( ( data = elem[ dataPriv.expando ] ) ) {6214if ( data.events ) {6215for ( type in data.events ) {6216if ( special[ type ] ) {6217jQuery.event.remove( elem, type );62186219// This is a shortcut to avoid jQuery.event.remove's overhead6220} else {6221jQuery.removeEvent( elem, type, data.handle );6222}6223}6224}62256226// Support: Chrome <=35 - 45+6227// Assign undefined instead of using delete, see Data#remove6228elem[ dataPriv.expando ] = undefined;6229}6230if ( elem[ dataUser.expando ] ) {62316232// Support: Chrome <=35 - 45+6233// Assign undefined instead of using delete, see Data#remove6234elem[ dataUser.expando ] = undefined;6235}6236}6237}6238}6239} );62406241jQuery.fn.extend( {6242detach: function( selector ) {6243return remove( this, selector, true );6244},62456246remove: function( selector ) {6247return remove( this, selector );6248},62496250text: function( value ) {6251return access( this, function( value ) {6252return value === undefined ?6253jQuery.text( this ) :6254this.empty().each( function() {6255if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {6256this.textContent = value;6257}6258} );6259}, null, value, arguments.length );6260},62616262append: function() {6263return domManip( this, arguments, function( elem ) {6264if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {6265var target = manipulationTarget( this, elem );6266target.appendChild( elem );6267}6268} );6269},62706271prepend: function() {6272return domManip( this, arguments, function( elem ) {6273if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {6274var target = manipulationTarget( this, elem );6275target.insertBefore( elem, target.firstChild );6276}6277} );6278},62796280before: function() {6281return domManip( this, arguments, function( elem ) {6282if ( this.parentNode ) {6283this.parentNode.insertBefore( elem, this );6284}6285} );6286},62876288after: function() {6289return domManip( this, arguments, function( elem ) {6290if ( this.parentNode ) {6291this.parentNode.insertBefore( elem, this.nextSibling );6292}6293} );6294},62956296empty: function() {6297var elem,6298i = 0;62996300for ( ; ( elem = this[ i ] ) != null; i++ ) {6301if ( elem.nodeType === 1 ) {63026303// Prevent memory leaks6304jQuery.cleanData( getAll( elem, false ) );63056306// Remove any remaining nodes6307elem.textContent = "";6308}6309}63106311return this;6312},63136314clone: function( dataAndEvents, deepDataAndEvents ) {6315dataAndEvents = dataAndEvents == null ? false : dataAndEvents;6316deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;63176318return this.map( function() {6319return jQuery.clone( this, dataAndEvents, deepDataAndEvents );6320} );6321},63226323html: function( value ) {6324return access( this, function( value ) {6325var elem = this[ 0 ] || {},6326i = 0,6327l = this.length;63286329if ( value === undefined && elem.nodeType === 1 ) {6330return elem.innerHTML;6331}63326333// See if we can take a shortcut and just use innerHTML6334if ( typeof value === "string" && !rnoInnerhtml.test( value ) &&6335!wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) {63366337value = jQuery.htmlPrefilter( value );63386339try {6340for ( ; i < l; i++ ) {6341elem = this[ i ] || {};63426343// Remove element nodes and prevent memory leaks6344if ( elem.nodeType === 1 ) {6345jQuery.cleanData( getAll( elem, false ) );6346elem.innerHTML = value;6347}6348}63496350elem = 0;63516352// If using innerHTML throws an exception, use the fallback method6353} catch ( e ) {}6354}63556356if ( elem ) {6357this.empty().append( value );6358}6359}, null, value, arguments.length );6360},63616362replaceWith: function() {6363var ignored = [];63646365// Make the changes, replacing each non-ignored context element with the new content6366return domManip( this, arguments, function( elem ) {6367var parent = this.parentNode;63686369if ( jQuery.inArray( this, ignored ) < 0 ) {6370jQuery.cleanData( getAll( this ) );6371if ( parent ) {6372parent.replaceChild( elem, this );6373}6374}63756376// Force callback invocation6377}, ignored );6378}6379} );63806381jQuery.each( {6382appendTo: "append",6383prependTo: "prepend",6384insertBefore: "before",6385insertAfter: "after",6386replaceAll: "replaceWith"6387}, function( name, original ) {6388jQuery.fn[ name ] = function( selector ) {6389var elems,6390ret = [],6391insert = jQuery( selector ),6392last = insert.length - 1,6393i = 0;63946395for ( ; i <= last; i++ ) {6396elems = i === last ? this : this.clone( true );6397jQuery( insert[ i ] )[ original ]( elems );63986399// Support: Android <=4.0 only, PhantomJS 1 only6400// .get() because push.apply(_, arraylike) throws on ancient WebKit6401push.apply( ret, elems.get() );6402}64036404return this.pushStack( ret );6405};6406} );6407var rnumnonpx = new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" );64086409var getStyles = function( elem ) {64106411// Support: IE <=11 only, Firefox <=30 (#15098, #14150)6412// IE throws on elements created in popups6413// FF meanwhile throws on frame elements through "defaultView.getComputedStyle"6414var view = elem.ownerDocument.defaultView;64156416if ( !view || !view.opener ) {6417view = window;6418}64196420return view.getComputedStyle( elem );6421};64226423var swap = function( elem, options, callback ) {6424var ret, name,6425old = {};64266427// Remember the old values, and insert the new ones6428for ( name in options ) {6429old[ name ] = elem.style[ name ];6430elem.style[ name ] = options[ name ];6431}64326433ret = callback.call( elem );64346435// Revert the old values6436for ( name in options ) {6437elem.style[ name ] = old[ name ];6438}64396440return ret;6441};644264436444var rboxStyle = new RegExp( cssExpand.join( "|" ), "i" );6445644664476448( function() {64496450// Executing both pixelPosition & boxSizingReliable tests require only one layout6451// so they're executed at the same time to save the second computation.6452function computeStyleTests() {64536454// This is a singleton, we need to execute it only once6455if ( !div ) {6456return;6457}64586459container.style.cssText = "position:absolute;left:-11111px;width:60px;" +6460"margin-top:1px;padding:0;border:0";6461div.style.cssText =6462"position:relative;display:block;box-sizing:border-box;overflow:scroll;" +6463"margin:auto;border:1px;padding:1px;" +6464"width:60%;top:1%";6465documentElement.appendChild( container ).appendChild( div );64666467var divStyle = window.getComputedStyle( div );6468pixelPositionVal = divStyle.top !== "1%";64696470// Support: Android 4.0 - 4.3 only, Firefox <=3 - 446471reliableMarginLeftVal = roundPixelMeasures( divStyle.marginLeft ) === 12;64726473// Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.36474// Some styles come back with percentage values, even though they shouldn't6475div.style.right = "60%";6476pixelBoxStylesVal = roundPixelMeasures( divStyle.right ) === 36;64776478// Support: IE 9 - 11 only6479// Detect misreporting of content dimensions for box-sizing:border-box elements6480boxSizingReliableVal = roundPixelMeasures( divStyle.width ) === 36;64816482// Support: IE 9 only6483// Detect overflow:scroll screwiness (gh-3699)6484// Support: Chrome <=646485// Don't get tricked when zoom affects offsetWidth (gh-4029)6486div.style.position = "absolute";6487scrollboxSizeVal = roundPixelMeasures( div.offsetWidth / 3 ) === 12;64886489documentElement.removeChild( container );64906491// Nullify the div so it wouldn't be stored in the memory and6492// it will also be a sign that checks already performed6493div = null;6494}64956496function roundPixelMeasures( measure ) {6497return Math.round( parseFloat( measure ) );6498}64996500var pixelPositionVal, boxSizingReliableVal, scrollboxSizeVal, pixelBoxStylesVal,6501reliableTrDimensionsVal, reliableMarginLeftVal,6502container = document.createElement( "div" ),6503div = document.createElement( "div" );65046505// Finish early in limited (non-browser) environments6506if ( !div.style ) {6507return;6508}65096510// Support: IE <=9 - 11 only6511// Style of cloned element affects source element cloned (#8908)6512div.style.backgroundClip = "content-box";6513div.cloneNode( true ).style.backgroundClip = "";6514support.clearCloneStyle = div.style.backgroundClip === "content-box";65156516jQuery.extend( support, {6517boxSizingReliable: function() {6518computeStyleTests();6519return boxSizingReliableVal;6520},6521pixelBoxStyles: function() {6522computeStyleTests();6523return pixelBoxStylesVal;6524},6525pixelPosition: function() {6526computeStyleTests();6527return pixelPositionVal;6528},6529reliableMarginLeft: function() {6530computeStyleTests();6531return reliableMarginLeftVal;6532},6533scrollboxSize: function() {6534computeStyleTests();6535return scrollboxSizeVal;6536},65376538// Support: IE 9 - 11+, Edge 15 - 18+6539// IE/Edge misreport `getComputedStyle` of table rows with width/height6540// set in CSS while `offset*` properties report correct values.6541// Behavior in IE 9 is more subtle than in newer versions & it passes6542// some versions of this test; make sure not to make it pass there!6543reliableTrDimensions: function() {6544var table, tr, trChild, trStyle;6545if ( reliableTrDimensionsVal == null ) {6546table = document.createElement( "table" );6547tr = document.createElement( "tr" );6548trChild = document.createElement( "div" );65496550table.style.cssText = "position:absolute;left:-11111px";6551tr.style.height = "1px";6552trChild.style.height = "9px";65536554documentElement6555.appendChild( table )6556.appendChild( tr )6557.appendChild( trChild );65586559trStyle = window.getComputedStyle( tr );6560reliableTrDimensionsVal = parseInt( trStyle.height ) > 3;65616562documentElement.removeChild( table );6563}6564return reliableTrDimensionsVal;6565}6566} );6567} )();656865696570function curCSS( elem, name, computed ) {6571var width, minWidth, maxWidth, ret,65726573// Support: Firefox 51+6574// Retrieving style before computed somehow6575// fixes an issue with getting wrong values6576// on detached elements6577style = elem.style;65786579computed = computed || getStyles( elem );65806581// getPropertyValue is needed for:6582// .css('filter') (IE 9 only, #12537)6583// .css('--customProperty) (#3144)6584if ( computed ) {6585ret = computed.getPropertyValue( name ) || computed[ name ];65866587if ( ret === "" && !isAttached( elem ) ) {6588ret = jQuery.style( elem, name );6589}65906591// A tribute to the "awesome hack by Dean Edwards"6592// Android Browser returns percentage for some values,6593// but width seems to be reliably pixels.6594// This is against the CSSOM draft spec:6595// https://drafts.csswg.org/cssom/#resolved-values6596if ( !support.pixelBoxStyles() && rnumnonpx.test( ret ) && rboxStyle.test( name ) ) {65976598// Remember the original values6599width = style.width;6600minWidth = style.minWidth;6601maxWidth = style.maxWidth;66026603// Put in the new values to get a computed value out6604style.minWidth = style.maxWidth = style.width = ret;6605ret = computed.width;66066607// Revert the changed values6608style.width = width;6609style.minWidth = minWidth;6610style.maxWidth = maxWidth;6611}6612}66136614return ret !== undefined ?66156616// Support: IE <=9 - 11 only6617// IE returns zIndex value as an integer.6618ret + "" :6619ret;6620}662166226623function addGetHookIf( conditionFn, hookFn ) {66246625// Define the hook, we'll check on the first run if it's really needed.6626return {6627get: function() {6628if ( conditionFn() ) {66296630// Hook not needed (or it's not possible to use it due6631// to missing dependency), remove it.6632delete this.get;6633return;6634}66356636// Hook needed; redefine it so that the support test is not executed again.6637return ( this.get = hookFn ).apply( this, arguments );6638}6639};6640}664166426643var cssPrefixes = [ "Webkit", "Moz", "ms" ],6644emptyStyle = document.createElement( "div" ).style,6645vendorProps = {};66466647// Return a vendor-prefixed property or undefined6648function vendorPropName( name ) {66496650// Check for vendor prefixed names6651var capName = name[ 0 ].toUpperCase() + name.slice( 1 ),6652i = cssPrefixes.length;66536654while ( i-- ) {6655name = cssPrefixes[ i ] + capName;6656if ( name in emptyStyle ) {6657return name;6658}6659}6660}66616662// Return a potentially-mapped jQuery.cssProps or vendor prefixed property6663function finalPropName( name ) {6664var final = jQuery.cssProps[ name ] || vendorProps[ name ];66656666if ( final ) {6667return final;6668}6669if ( name in emptyStyle ) {6670return name;6671}6672return vendorProps[ name ] = vendorPropName( name ) || name;6673}667466756676var66776678// Swappable if display is none or starts with table6679// except "table", "table-cell", or "table-caption"6680// See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display6681rdisplayswap = /^(none|table(?!-c[ea]).+)/,6682rcustomProp = /^--/,6683cssShow = { position: "absolute", visibility: "hidden", display: "block" },6684cssNormalTransform = {6685letterSpacing: "0",6686fontWeight: "400"6687};66886689function setPositiveNumber( _elem, value, subtract ) {66906691// Any relative (+/-) values have already been6692// normalized at this point6693var matches = rcssNum.exec( value );6694return matches ?66956696// Guard against undefined "subtract", e.g., when used as in cssHooks6697Math.max( 0, matches[ 2 ] - ( subtract || 0 ) ) + ( matches[ 3 ] || "px" ) :6698value;6699}67006701function boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computedVal ) {6702var i = dimension === "width" ? 1 : 0,6703extra = 0,6704delta = 0;67056706// Adjustment may not be necessary6707if ( box === ( isBorderBox ? "border" : "content" ) ) {6708return 0;6709}67106711for ( ; i < 4; i += 2 ) {67126713// Both box models exclude margin6714if ( box === "margin" ) {6715delta += jQuery.css( elem, box + cssExpand[ i ], true, styles );6716}67176718// If we get here with a content-box, we're seeking "padding" or "border" or "margin"6719if ( !isBorderBox ) {67206721// Add padding6722delta += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );67236724// For "border" or "margin", add border6725if ( box !== "padding" ) {6726delta += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );67276728// But still keep track of it otherwise6729} else {6730extra += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );6731}67326733// If we get here with a border-box (content + padding + border), we're seeking "content" or6734// "padding" or "margin"6735} else {67366737// For "content", subtract padding6738if ( box === "content" ) {6739delta -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );6740}67416742// For "content" or "padding", subtract border6743if ( box !== "margin" ) {6744delta -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );6745}6746}6747}67486749// Account for positive content-box scroll gutter when requested by providing computedVal6750if ( !isBorderBox && computedVal >= 0 ) {67516752// offsetWidth/offsetHeight is a rounded sum of content, padding, scroll gutter, and border6753// Assuming integer scroll gutter, subtract the rest and round down6754delta += Math.max( 0, Math.ceil(6755elem[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] -6756computedVal -6757delta -6758extra -67590.567606761// If offsetWidth/offsetHeight is unknown, then we can't determine content-box scroll gutter6762// Use an explicit zero to avoid NaN (gh-3964)6763) ) || 0;6764}67656766return delta;6767}67686769function getWidthOrHeight( elem, dimension, extra ) {67706771// Start with computed style6772var styles = getStyles( elem ),67736774// To avoid forcing a reflow, only fetch boxSizing if we need it (gh-4322).6775// Fake content-box until we know it's needed to know the true value.6776boxSizingNeeded = !support.boxSizingReliable() || extra,6777isBorderBox = boxSizingNeeded &&6778jQuery.css( elem, "boxSizing", false, styles ) === "border-box",6779valueIsBorderBox = isBorderBox,67806781val = curCSS( elem, dimension, styles ),6782offsetProp = "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 );67836784// Support: Firefox <=546785// Return a confounding non-pixel value or feign ignorance, as appropriate.6786if ( rnumnonpx.test( val ) ) {6787if ( !extra ) {6788return val;6789}6790val = "auto";6791}679267936794// Support: IE 9 - 11 only6795// Use offsetWidth/offsetHeight for when box sizing is unreliable.6796// In those cases, the computed value can be trusted to be border-box.6797if ( ( !support.boxSizingReliable() && isBorderBox ||67986799// Support: IE 10 - 11+, Edge 15 - 18+6800// IE/Edge misreport `getComputedStyle` of table rows with width/height6801// set in CSS while `offset*` properties report correct values.6802// Interestingly, in some cases IE 9 doesn't suffer from this issue.6803!support.reliableTrDimensions() && nodeName( elem, "tr" ) ||68046805// Fall back to offsetWidth/offsetHeight when value is "auto"6806// This happens for inline elements with no explicit setting (gh-3571)6807val === "auto" ||68086809// Support: Android <=4.1 - 4.3 only6810// Also use offsetWidth/offsetHeight for misreported inline dimensions (gh-3602)6811!parseFloat( val ) && jQuery.css( elem, "display", false, styles ) === "inline" ) &&68126813// Make sure the element is visible & connected6814elem.getClientRects().length ) {68156816isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box";68176818// Where available, offsetWidth/offsetHeight approximate border box dimensions.6819// Where not available (e.g., SVG), assume unreliable box-sizing and interpret the6820// retrieved value as a content box dimension.6821valueIsBorderBox = offsetProp in elem;6822if ( valueIsBorderBox ) {6823val = elem[ offsetProp ];6824}6825}68266827// Normalize "" and auto6828val = parseFloat( val ) || 0;68296830// Adjust for the element's box model6831return ( val +6832boxModelAdjustment(6833elem,6834dimension,6835extra || ( isBorderBox ? "border" : "content" ),6836valueIsBorderBox,6837styles,68386839// Provide the current computed size to request scroll gutter calculation (gh-3589)6840val6841)6842) + "px";6843}68446845jQuery.extend( {68466847// Add in style property hooks for overriding the default6848// behavior of getting and setting a style property6849cssHooks: {6850opacity: {6851get: function( elem, computed ) {6852if ( computed ) {68536854// We should always get a number back from opacity6855var ret = curCSS( elem, "opacity" );6856return ret === "" ? "1" : ret;6857}6858}6859}6860},68616862// Don't automatically add "px" to these possibly-unitless properties6863cssNumber: {6864"animationIterationCount": true,6865"columnCount": true,6866"fillOpacity": true,6867"flexGrow": true,6868"flexShrink": true,6869"fontWeight": true,6870"gridArea": true,6871"gridColumn": true,6872"gridColumnEnd": true,6873"gridColumnStart": true,6874"gridRow": true,6875"gridRowEnd": true,6876"gridRowStart": true,6877"lineHeight": true,6878"opacity": true,6879"order": true,6880"orphans": true,6881"widows": true,6882"zIndex": true,6883"zoom": true6884},68856886// Add in properties whose names you wish to fix before6887// setting or getting the value6888cssProps: {},68896890// Get and set the style property on a DOM Node6891style: function( elem, name, value, extra ) {68926893// Don't set styles on text and comment nodes6894if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {6895return;6896}68976898// Make sure that we're working with the right name6899var ret, type, hooks,6900origName = camelCase( name ),6901isCustomProp = rcustomProp.test( name ),6902style = elem.style;69036904// Make sure that we're working with the right name. We don't6905// want to query the value if it is a CSS custom property6906// since they are user-defined.6907if ( !isCustomProp ) {6908name = finalPropName( origName );6909}69106911// Gets hook for the prefixed version, then unprefixed version6912hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];69136914// Check if we're setting a value6915if ( value !== undefined ) {6916type = typeof value;69176918// Convert "+=" or "-=" to relative numbers (#7345)6919if ( type === "string" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) {6920value = adjustCSS( elem, name, ret );69216922// Fixes bug #92376923type = "number";6924}69256926// Make sure that null and NaN values aren't set (#7116)6927if ( value == null || value !== value ) {6928return;6929}69306931// If a number was passed in, add the unit (except for certain CSS properties)6932// The isCustomProp check can be removed in jQuery 4.0 when we only auto-append6933// "px" to a few hardcoded values.6934if ( type === "number" && !isCustomProp ) {6935value += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? "" : "px" );6936}69376938// background-* props affect original clone's values6939if ( !support.clearCloneStyle && value === "" && name.indexOf( "background" ) === 0 ) {6940style[ name ] = "inherit";6941}69426943// If a hook was provided, use that value, otherwise just set the specified value6944if ( !hooks || !( "set" in hooks ) ||6945( value = hooks.set( elem, value, extra ) ) !== undefined ) {69466947if ( isCustomProp ) {6948style.setProperty( name, value );6949} else {6950style[ name ] = value;6951}6952}69536954} else {69556956// If a hook was provided get the non-computed value from there6957if ( hooks && "get" in hooks &&6958( ret = hooks.get( elem, false, extra ) ) !== undefined ) {69596960return ret;6961}69626963// Otherwise just get the value from the style object6964return style[ name ];6965}6966},69676968css: function( elem, name, extra, styles ) {6969var val, num, hooks,6970origName = camelCase( name ),6971isCustomProp = rcustomProp.test( name );69726973// Make sure that we're working with the right name. We don't6974// want to modify the value if it is a CSS custom property6975// since they are user-defined.6976if ( !isCustomProp ) {6977name = finalPropName( origName );6978}69796980// Try prefixed name followed by the unprefixed name6981hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];69826983// If a hook was provided get the computed value from there6984if ( hooks && "get" in hooks ) {6985val = hooks.get( elem, true, extra );6986}69876988// Otherwise, if a way to get the computed value exists, use that6989if ( val === undefined ) {6990val = curCSS( elem, name, styles );6991}69926993// Convert "normal" to computed value6994if ( val === "normal" && name in cssNormalTransform ) {6995val = cssNormalTransform[ name ];6996}69976998// Make numeric if forced or a qualifier was provided and val looks numeric6999if ( extra === "" || extra ) {7000num = parseFloat( val );7001return extra === true || isFinite( num ) ? num || 0 : val;7002}70037004return val;7005}7006} );70077008jQuery.each( [ "height", "width" ], function( _i, dimension ) {7009jQuery.cssHooks[ dimension ] = {7010get: function( elem, computed, extra ) {7011if ( computed ) {70127013// Certain elements can have dimension info if we invisibly show them7014// but it must have a current display style that would benefit7015return rdisplayswap.test( jQuery.css( elem, "display" ) ) &&70167017// Support: Safari 8+7018// Table columns in Safari have non-zero offsetWidth & zero7019// getBoundingClientRect().width unless display is changed.7020// Support: IE <=11 only7021// Running getBoundingClientRect on a disconnected node7022// in IE throws an error.7023( !elem.getClientRects().length || !elem.getBoundingClientRect().width ) ?7024swap( elem, cssShow, function() {7025return getWidthOrHeight( elem, dimension, extra );7026} ) :7027getWidthOrHeight( elem, dimension, extra );7028}7029},70307031set: function( elem, value, extra ) {7032var matches,7033styles = getStyles( elem ),70347035// Only read styles.position if the test has a chance to fail7036// to avoid forcing a reflow.7037scrollboxSizeBuggy = !support.scrollboxSize() &&7038styles.position === "absolute",70397040// To avoid forcing a reflow, only fetch boxSizing if we need it (gh-3991)7041boxSizingNeeded = scrollboxSizeBuggy || extra,7042isBorderBox = boxSizingNeeded &&7043jQuery.css( elem, "boxSizing", false, styles ) === "border-box",7044subtract = extra ?7045boxModelAdjustment(7046elem,7047dimension,7048extra,7049isBorderBox,7050styles7051) :70520;70537054// Account for unreliable border-box dimensions by comparing offset* to computed and7055// faking a content-box to get border and padding (gh-3699)7056if ( isBorderBox && scrollboxSizeBuggy ) {7057subtract -= Math.ceil(7058elem[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] -7059parseFloat( styles[ dimension ] ) -7060boxModelAdjustment( elem, dimension, "border", false, styles ) -70610.57062);7063}70647065// Convert to pixels if value adjustment is needed7066if ( subtract && ( matches = rcssNum.exec( value ) ) &&7067( matches[ 3 ] || "px" ) !== "px" ) {70687069elem.style[ dimension ] = value;7070value = jQuery.css( elem, dimension );7071}70727073return setPositiveNumber( elem, value, subtract );7074}7075};7076} );70777078jQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft,7079function( elem, computed ) {7080if ( computed ) {7081return ( parseFloat( curCSS( elem, "marginLeft" ) ) ||7082elem.getBoundingClientRect().left -7083swap( elem, { marginLeft: 0 }, function() {7084return elem.getBoundingClientRect().left;7085} )7086) + "px";7087}7088}7089);70907091// These hooks are used by animate to expand properties7092jQuery.each( {7093margin: "",7094padding: "",7095border: "Width"7096}, function( prefix, suffix ) {7097jQuery.cssHooks[ prefix + suffix ] = {7098expand: function( value ) {7099var i = 0,7100expanded = {},71017102// Assumes a single number if not a string7103parts = typeof value === "string" ? value.split( " " ) : [ value ];71047105for ( ; i < 4; i++ ) {7106expanded[ prefix + cssExpand[ i ] + suffix ] =7107parts[ i ] || parts[ i - 2 ] || parts[ 0 ];7108}71097110return expanded;7111}7112};71137114if ( prefix !== "margin" ) {7115jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;7116}7117} );71187119jQuery.fn.extend( {7120css: function( name, value ) {7121return access( this, function( elem, name, value ) {7122var styles, len,7123map = {},7124i = 0;71257126if ( Array.isArray( name ) ) {7127styles = getStyles( elem );7128len = name.length;71297130for ( ; i < len; i++ ) {7131map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles );7132}71337134return map;7135}71367137return value !== undefined ?7138jQuery.style( elem, name, value ) :7139jQuery.css( elem, name );7140}, name, value, arguments.length > 1 );7141}7142} );714371447145function Tween( elem, options, prop, end, easing ) {7146return new Tween.prototype.init( elem, options, prop, end, easing );7147}7148jQuery.Tween = Tween;71497150Tween.prototype = {7151constructor: Tween,7152init: function( elem, options, prop, end, easing, unit ) {7153this.elem = elem;7154this.prop = prop;7155this.easing = easing || jQuery.easing._default;7156this.options = options;7157this.start = this.now = this.cur();7158this.end = end;7159this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" );7160},7161cur: function() {7162var hooks = Tween.propHooks[ this.prop ];71637164return hooks && hooks.get ?7165hooks.get( this ) :7166Tween.propHooks._default.get( this );7167},7168run: function( percent ) {7169var eased,7170hooks = Tween.propHooks[ this.prop ];71717172if ( this.options.duration ) {7173this.pos = eased = jQuery.easing[ this.easing ](7174percent, this.options.duration * percent, 0, 1, this.options.duration7175);7176} else {7177this.pos = eased = percent;7178}7179this.now = ( this.end - this.start ) * eased + this.start;71807181if ( this.options.step ) {7182this.options.step.call( this.elem, this.now, this );7183}71847185if ( hooks && hooks.set ) {7186hooks.set( this );7187} else {7188Tween.propHooks._default.set( this );7189}7190return this;7191}7192};71937194Tween.prototype.init.prototype = Tween.prototype;71957196Tween.propHooks = {7197_default: {7198get: function( tween ) {7199var result;72007201// Use a property on the element directly when it is not a DOM element,7202// or when there is no matching style property that exists.7203if ( tween.elem.nodeType !== 1 ||7204tween.elem[ tween.prop ] != null && tween.elem.style[ tween.prop ] == null ) {7205return tween.elem[ tween.prop ];7206}72077208// Passing an empty string as a 3rd parameter to .css will automatically7209// attempt a parseFloat and fallback to a string if the parse fails.7210// Simple values such as "10px" are parsed to Float;7211// complex values such as "rotate(1rad)" are returned as-is.7212result = jQuery.css( tween.elem, tween.prop, "" );72137214// Empty strings, null, undefined and "auto" are converted to 0.7215return !result || result === "auto" ? 0 : result;7216},7217set: function( tween ) {72187219// Use step hook for back compat.7220// Use cssHook if its there.7221// Use .style if available and use plain properties where available.7222if ( jQuery.fx.step[ tween.prop ] ) {7223jQuery.fx.step[ tween.prop ]( tween );7224} else if ( tween.elem.nodeType === 1 && (7225jQuery.cssHooks[ tween.prop ] ||7226tween.elem.style[ finalPropName( tween.prop ) ] != null ) ) {7227jQuery.style( tween.elem, tween.prop, tween.now + tween.unit );7228} else {7229tween.elem[ tween.prop ] = tween.now;7230}7231}7232}7233};72347235// Support: IE <=9 only7236// Panic based approach to setting things on disconnected nodes7237Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {7238set: function( tween ) {7239if ( tween.elem.nodeType && tween.elem.parentNode ) {7240tween.elem[ tween.prop ] = tween.now;7241}7242}7243};72447245jQuery.easing = {7246linear: function( p ) {7247return p;7248},7249swing: function( p ) {7250return 0.5 - Math.cos( p * Math.PI ) / 2;7251},7252_default: "swing"7253};72547255jQuery.fx = Tween.prototype.init;72567257// Back compat <1.8 extension point7258jQuery.fx.step = {};72597260726172627263var7264fxNow, inProgress,7265rfxtypes = /^(?:toggle|show|hide)$/,7266rrun = /queueHooks$/;72677268function schedule() {7269if ( inProgress ) {7270if ( document.hidden === false && window.requestAnimationFrame ) {7271window.requestAnimationFrame( schedule );7272} else {7273window.setTimeout( schedule, jQuery.fx.interval );7274}72757276jQuery.fx.tick();7277}7278}72797280// Animations created synchronously will run synchronously7281function createFxNow() {7282window.setTimeout( function() {7283fxNow = undefined;7284} );7285return ( fxNow = Date.now() );7286}72877288// Generate parameters to create a standard animation7289function genFx( type, includeWidth ) {7290var which,7291i = 0,7292attrs = { height: type };72937294// If we include width, step value is 1 to do all cssExpand values,7295// otherwise step value is 2 to skip over Left and Right7296includeWidth = includeWidth ? 1 : 0;7297for ( ; i < 4; i += 2 - includeWidth ) {7298which = cssExpand[ i ];7299attrs[ "margin" + which ] = attrs[ "padding" + which ] = type;7300}73017302if ( includeWidth ) {7303attrs.opacity = attrs.width = type;7304}73057306return attrs;7307}73087309function createTween( value, prop, animation ) {7310var tween,7311collection = ( Animation.tweeners[ prop ] || [] ).concat( Animation.tweeners[ "*" ] ),7312index = 0,7313length = collection.length;7314for ( ; index < length; index++ ) {7315if ( ( tween = collection[ index ].call( animation, prop, value ) ) ) {73167317// We're done with this property7318return tween;7319}7320}7321}73227323function defaultPrefilter( elem, props, opts ) {7324var prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display,7325isBox = "width" in props || "height" in props,7326anim = this,7327orig = {},7328style = elem.style,7329hidden = elem.nodeType && isHiddenWithinTree( elem ),7330dataShow = dataPriv.get( elem, "fxshow" );73317332// Queue-skipping animations hijack the fx hooks7333if ( !opts.queue ) {7334hooks = jQuery._queueHooks( elem, "fx" );7335if ( hooks.unqueued == null ) {7336hooks.unqueued = 0;7337oldfire = hooks.empty.fire;7338hooks.empty.fire = function() {7339if ( !hooks.unqueued ) {7340oldfire();7341}7342};7343}7344hooks.unqueued++;73457346anim.always( function() {73477348// Ensure the complete handler is called before this completes7349anim.always( function() {7350hooks.unqueued--;7351if ( !jQuery.queue( elem, "fx" ).length ) {7352hooks.empty.fire();7353}7354} );7355} );7356}73577358// Detect show/hide animations7359for ( prop in props ) {7360value = props[ prop ];7361if ( rfxtypes.test( value ) ) {7362delete props[ prop ];7363toggle = toggle || value === "toggle";7364if ( value === ( hidden ? "hide" : "show" ) ) {73657366// Pretend to be hidden if this is a "show" and7367// there is still data from a stopped show/hide7368if ( value === "show" && dataShow && dataShow[ prop ] !== undefined ) {7369hidden = true;73707371// Ignore all other no-op show/hide data7372} else {7373continue;7374}7375}7376orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop );7377}7378}73797380// Bail out if this is a no-op like .hide().hide()7381propTween = !jQuery.isEmptyObject( props );7382if ( !propTween && jQuery.isEmptyObject( orig ) ) {7383return;7384}73857386// Restrict "overflow" and "display" styles during box animations7387if ( isBox && elem.nodeType === 1 ) {73887389// Support: IE <=9 - 11, Edge 12 - 157390// Record all 3 overflow attributes because IE does not infer the shorthand7391// from identically-valued overflowX and overflowY and Edge just mirrors7392// the overflowX value there.7393opts.overflow = [ style.overflow, style.overflowX, style.overflowY ];73947395// Identify a display type, preferring old show/hide data over the CSS cascade7396restoreDisplay = dataShow && dataShow.display;7397if ( restoreDisplay == null ) {7398restoreDisplay = dataPriv.get( elem, "display" );7399}7400display = jQuery.css( elem, "display" );7401if ( display === "none" ) {7402if ( restoreDisplay ) {7403display = restoreDisplay;7404} else {74057406// Get nonempty value(s) by temporarily forcing visibility7407showHide( [ elem ], true );7408restoreDisplay = elem.style.display || restoreDisplay;7409display = jQuery.css( elem, "display" );7410showHide( [ elem ] );7411}7412}74137414// Animate inline elements as inline-block7415if ( display === "inline" || display === "inline-block" && restoreDisplay != null ) {7416if ( jQuery.css( elem, "float" ) === "none" ) {74177418// Restore the original display value at the end of pure show/hide animations7419if ( !propTween ) {7420anim.done( function() {7421style.display = restoreDisplay;7422} );7423if ( restoreDisplay == null ) {7424display = style.display;7425restoreDisplay = display === "none" ? "" : display;7426}7427}7428style.display = "inline-block";7429}7430}7431}74327433if ( opts.overflow ) {7434style.overflow = "hidden";7435anim.always( function() {7436style.overflow = opts.overflow[ 0 ];7437style.overflowX = opts.overflow[ 1 ];7438style.overflowY = opts.overflow[ 2 ];7439} );7440}74417442// Implement show/hide animations7443propTween = false;7444for ( prop in orig ) {74457446// General show/hide setup for this element animation7447if ( !propTween ) {7448if ( dataShow ) {7449if ( "hidden" in dataShow ) {7450hidden = dataShow.hidden;7451}7452} else {7453dataShow = dataPriv.access( elem, "fxshow", { display: restoreDisplay } );7454}74557456// Store hidden/visible for toggle so `.stop().toggle()` "reverses"7457if ( toggle ) {7458dataShow.hidden = !hidden;7459}74607461// Show elements before animating them7462if ( hidden ) {7463showHide( [ elem ], true );7464}74657466/* eslint-disable no-loop-func */74677468anim.done( function() {74697470/* eslint-enable no-loop-func */74717472// The final step of a "hide" animation is actually hiding the element7473if ( !hidden ) {7474showHide( [ elem ] );7475}7476dataPriv.remove( elem, "fxshow" );7477for ( prop in orig ) {7478jQuery.style( elem, prop, orig[ prop ] );7479}7480} );7481}74827483// Per-property setup7484propTween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim );7485if ( !( prop in dataShow ) ) {7486dataShow[ prop ] = propTween.start;7487if ( hidden ) {7488propTween.end = propTween.start;7489propTween.start = 0;7490}7491}7492}7493}74947495function propFilter( props, specialEasing ) {7496var index, name, easing, value, hooks;74977498// camelCase, specialEasing and expand cssHook pass7499for ( index in props ) {7500name = camelCase( index );7501easing = specialEasing[ name ];7502value = props[ index ];7503if ( Array.isArray( value ) ) {7504easing = value[ 1 ];7505value = props[ index ] = value[ 0 ];7506}75077508if ( index !== name ) {7509props[ name ] = value;7510delete props[ index ];7511}75127513hooks = jQuery.cssHooks[ name ];7514if ( hooks && "expand" in hooks ) {7515value = hooks.expand( value );7516delete props[ name ];75177518// Not quite $.extend, this won't overwrite existing keys.7519// Reusing 'index' because we have the correct "name"7520for ( index in value ) {7521if ( !( index in props ) ) {7522props[ index ] = value[ index ];7523specialEasing[ index ] = easing;7524}7525}7526} else {7527specialEasing[ name ] = easing;7528}7529}7530}75317532function Animation( elem, properties, options ) {7533var result,7534stopped,7535index = 0,7536length = Animation.prefilters.length,7537deferred = jQuery.Deferred().always( function() {75387539// Don't match elem in the :animated selector7540delete tick.elem;7541} ),7542tick = function() {7543if ( stopped ) {7544return false;7545}7546var currentTime = fxNow || createFxNow(),7547remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),75487549// Support: Android 2.3 only7550// Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (#12497)7551temp = remaining / animation.duration || 0,7552percent = 1 - temp,7553index = 0,7554length = animation.tweens.length;75557556for ( ; index < length; index++ ) {7557animation.tweens[ index ].run( percent );7558}75597560deferred.notifyWith( elem, [ animation, percent, remaining ] );75617562// If there's more to do, yield7563if ( percent < 1 && length ) {7564return remaining;7565}75667567// If this was an empty animation, synthesize a final progress notification7568if ( !length ) {7569deferred.notifyWith( elem, [ animation, 1, 0 ] );7570}75717572// Resolve the animation and report its conclusion7573deferred.resolveWith( elem, [ animation ] );7574return false;7575},7576animation = deferred.promise( {7577elem: elem,7578props: jQuery.extend( {}, properties ),7579opts: jQuery.extend( true, {7580specialEasing: {},7581easing: jQuery.easing._default7582}, options ),7583originalProperties: properties,7584originalOptions: options,7585startTime: fxNow || createFxNow(),7586duration: options.duration,7587tweens: [],7588createTween: function( prop, end ) {7589var tween = jQuery.Tween( elem, animation.opts, prop, end,7590animation.opts.specialEasing[ prop ] || animation.opts.easing );7591animation.tweens.push( tween );7592return tween;7593},7594stop: function( gotoEnd ) {7595var index = 0,75967597// If we are going to the end, we want to run all the tweens7598// otherwise we skip this part7599length = gotoEnd ? animation.tweens.length : 0;7600if ( stopped ) {7601return this;7602}7603stopped = true;7604for ( ; index < length; index++ ) {7605animation.tweens[ index ].run( 1 );7606}76077608// Resolve when we played the last frame; otherwise, reject7609if ( gotoEnd ) {7610deferred.notifyWith( elem, [ animation, 1, 0 ] );7611deferred.resolveWith( elem, [ animation, gotoEnd ] );7612} else {7613deferred.rejectWith( elem, [ animation, gotoEnd ] );7614}7615return this;7616}7617} ),7618props = animation.props;76197620propFilter( props, animation.opts.specialEasing );76217622for ( ; index < length; index++ ) {7623result = Animation.prefilters[ index ].call( animation, elem, props, animation.opts );7624if ( result ) {7625if ( isFunction( result.stop ) ) {7626jQuery._queueHooks( animation.elem, animation.opts.queue ).stop =7627result.stop.bind( result );7628}7629return result;7630}7631}76327633jQuery.map( props, createTween, animation );76347635if ( isFunction( animation.opts.start ) ) {7636animation.opts.start.call( elem, animation );7637}76387639// Attach callbacks from options7640animation7641.progress( animation.opts.progress )7642.done( animation.opts.done, animation.opts.complete )7643.fail( animation.opts.fail )7644.always( animation.opts.always );76457646jQuery.fx.timer(7647jQuery.extend( tick, {7648elem: elem,7649anim: animation,7650queue: animation.opts.queue7651} )7652);76537654return animation;7655}76567657jQuery.Animation = jQuery.extend( Animation, {76587659tweeners: {7660"*": [ function( prop, value ) {7661var tween = this.createTween( prop, value );7662adjustCSS( tween.elem, prop, rcssNum.exec( value ), tween );7663return tween;7664} ]7665},76667667tweener: function( props, callback ) {7668if ( isFunction( props ) ) {7669callback = props;7670props = [ "*" ];7671} else {7672props = props.match( rnothtmlwhite );7673}76747675var prop,7676index = 0,7677length = props.length;76787679for ( ; index < length; index++ ) {7680prop = props[ index ];7681Animation.tweeners[ prop ] = Animation.tweeners[ prop ] || [];7682Animation.tweeners[ prop ].unshift( callback );7683}7684},76857686prefilters: [ defaultPrefilter ],76877688prefilter: function( callback, prepend ) {7689if ( prepend ) {7690Animation.prefilters.unshift( callback );7691} else {7692Animation.prefilters.push( callback );7693}7694}7695} );76967697jQuery.speed = function( speed, easing, fn ) {7698var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : {7699complete: fn || !fn && easing ||7700isFunction( speed ) && speed,7701duration: speed,7702easing: fn && easing || easing && !isFunction( easing ) && easing7703};77047705// Go to the end state if fx are off7706if ( jQuery.fx.off ) {7707opt.duration = 0;77087709} else {7710if ( typeof opt.duration !== "number" ) {7711if ( opt.duration in jQuery.fx.speeds ) {7712opt.duration = jQuery.fx.speeds[ opt.duration ];77137714} else {7715opt.duration = jQuery.fx.speeds._default;7716}7717}7718}77197720// Normalize opt.queue - true/undefined/null -> "fx"7721if ( opt.queue == null || opt.queue === true ) {7722opt.queue = "fx";7723}77247725// Queueing7726opt.old = opt.complete;77277728opt.complete = function() {7729if ( isFunction( opt.old ) ) {7730opt.old.call( this );7731}77327733if ( opt.queue ) {7734jQuery.dequeue( this, opt.queue );7735}7736};77377738return opt;7739};77407741jQuery.fn.extend( {7742fadeTo: function( speed, to, easing, callback ) {77437744// Show any hidden elements after setting opacity to 07745return this.filter( isHiddenWithinTree ).css( "opacity", 0 ).show()77467747// Animate to the value specified7748.end().animate( { opacity: to }, speed, easing, callback );7749},7750animate: function( prop, speed, easing, callback ) {7751var empty = jQuery.isEmptyObject( prop ),7752optall = jQuery.speed( speed, easing, callback ),7753doAnimation = function() {77547755// Operate on a copy of prop so per-property easing won't be lost7756var anim = Animation( this, jQuery.extend( {}, prop ), optall );77577758// Empty animations, or finishing resolves immediately7759if ( empty || dataPriv.get( this, "finish" ) ) {7760anim.stop( true );7761}7762};7763doAnimation.finish = doAnimation;77647765return empty || optall.queue === false ?7766this.each( doAnimation ) :7767this.queue( optall.queue, doAnimation );7768},7769stop: function( type, clearQueue, gotoEnd ) {7770var stopQueue = function( hooks ) {7771var stop = hooks.stop;7772delete hooks.stop;7773stop( gotoEnd );7774};77757776if ( typeof type !== "string" ) {7777gotoEnd = clearQueue;7778clearQueue = type;7779type = undefined;7780}7781if ( clearQueue ) {7782this.queue( type || "fx", [] );7783}77847785return this.each( function() {7786var dequeue = true,7787index = type != null && type + "queueHooks",7788timers = jQuery.timers,7789data = dataPriv.get( this );77907791if ( index ) {7792if ( data[ index ] && data[ index ].stop ) {7793stopQueue( data[ index ] );7794}7795} else {7796for ( index in data ) {7797if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) {7798stopQueue( data[ index ] );7799}7800}7801}78027803for ( index = timers.length; index--; ) {7804if ( timers[ index ].elem === this &&7805( type == null || timers[ index ].queue === type ) ) {78067807timers[ index ].anim.stop( gotoEnd );7808dequeue = false;7809timers.splice( index, 1 );7810}7811}78127813// Start the next in the queue if the last step wasn't forced.7814// Timers currently will call their complete callbacks, which7815// will dequeue but only if they were gotoEnd.7816if ( dequeue || !gotoEnd ) {7817jQuery.dequeue( this, type );7818}7819} );7820},7821finish: function( type ) {7822if ( type !== false ) {7823type = type || "fx";7824}7825return this.each( function() {7826var index,7827data = dataPriv.get( this ),7828queue = data[ type + "queue" ],7829hooks = data[ type + "queueHooks" ],7830timers = jQuery.timers,7831length = queue ? queue.length : 0;78327833// Enable finishing flag on private data7834data.finish = true;78357836// Empty the queue first7837jQuery.queue( this, type, [] );78387839if ( hooks && hooks.stop ) {7840hooks.stop.call( this, true );7841}78427843// Look for any active animations, and finish them7844for ( index = timers.length; index--; ) {7845if ( timers[ index ].elem === this && timers[ index ].queue === type ) {7846timers[ index ].anim.stop( true );7847timers.splice( index, 1 );7848}7849}78507851// Look for any animations in the old queue and finish them7852for ( index = 0; index < length; index++ ) {7853if ( queue[ index ] && queue[ index ].finish ) {7854queue[ index ].finish.call( this );7855}7856}78577858// Turn off finishing flag7859delete data.finish;7860} );7861}7862} );78637864jQuery.each( [ "toggle", "show", "hide" ], function( _i, name ) {7865var cssFn = jQuery.fn[ name ];7866jQuery.fn[ name ] = function( speed, easing, callback ) {7867return speed == null || typeof speed === "boolean" ?7868cssFn.apply( this, arguments ) :7869this.animate( genFx( name, true ), speed, easing, callback );7870};7871} );78727873// Generate shortcuts for custom animations7874jQuery.each( {7875slideDown: genFx( "show" ),7876slideUp: genFx( "hide" ),7877slideToggle: genFx( "toggle" ),7878fadeIn: { opacity: "show" },7879fadeOut: { opacity: "hide" },7880fadeToggle: { opacity: "toggle" }7881}, function( name, props ) {7882jQuery.fn[ name ] = function( speed, easing, callback ) {7883return this.animate( props, speed, easing, callback );7884};7885} );78867887jQuery.timers = [];7888jQuery.fx.tick = function() {7889var timer,7890i = 0,7891timers = jQuery.timers;78927893fxNow = Date.now();78947895for ( ; i < timers.length; i++ ) {7896timer = timers[ i ];78977898// Run the timer and safely remove it when done (allowing for external removal)7899if ( !timer() && timers[ i ] === timer ) {7900timers.splice( i--, 1 );7901}7902}79037904if ( !timers.length ) {7905jQuery.fx.stop();7906}7907fxNow = undefined;7908};79097910jQuery.fx.timer = function( timer ) {7911jQuery.timers.push( timer );7912jQuery.fx.start();7913};79147915jQuery.fx.interval = 13;7916jQuery.fx.start = function() {7917if ( inProgress ) {7918return;7919}79207921inProgress = true;7922schedule();7923};79247925jQuery.fx.stop = function() {7926inProgress = null;7927};79287929jQuery.fx.speeds = {7930slow: 600,7931fast: 200,79327933// Default speed7934_default: 4007935};793679377938// Based off of the plugin by Clint Helfers, with permission.7939// https://web.archive.org/web/20100324014747/http://blindsignals.com/index.php/2009/07/jquery-delay/7940jQuery.fn.delay = function( time, type ) {7941time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;7942type = type || "fx";79437944return this.queue( type, function( next, hooks ) {7945var timeout = window.setTimeout( next, time );7946hooks.stop = function() {7947window.clearTimeout( timeout );7948};7949} );7950};795179527953( function() {7954var input = document.createElement( "input" ),7955select = document.createElement( "select" ),7956opt = select.appendChild( document.createElement( "option" ) );79577958input.type = "checkbox";79597960// Support: Android <=4.3 only7961// Default value for a checkbox should be "on"7962support.checkOn = input.value !== "";79637964// Support: IE <=11 only7965// Must access selectedIndex to make default options select7966support.optSelected = opt.selected;79677968// Support: IE <=11 only7969// An input loses its value after becoming a radio7970input = document.createElement( "input" );7971input.value = "t";7972input.type = "radio";7973support.radioValue = input.value === "t";7974} )();797579767977var boolHook,7978attrHandle = jQuery.expr.attrHandle;79797980jQuery.fn.extend( {7981attr: function( name, value ) {7982return access( this, jQuery.attr, name, value, arguments.length > 1 );7983},79847985removeAttr: function( name ) {7986return this.each( function() {7987jQuery.removeAttr( this, name );7988} );7989}7990} );79917992jQuery.extend( {7993attr: function( elem, name, value ) {7994var ret, hooks,7995nType = elem.nodeType;79967997// Don't get/set attributes on text, comment and attribute nodes7998if ( nType === 3 || nType === 8 || nType === 2 ) {7999return;8000}80018002// Fallback to prop when attributes are not supported8003if ( typeof elem.getAttribute === "undefined" ) {8004return jQuery.prop( elem, name, value );8005}80068007// Attribute hooks are determined by the lowercase version8008// Grab necessary hook if one is defined8009if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {8010hooks = jQuery.attrHooks[ name.toLowerCase() ] ||8011( jQuery.expr.match.bool.test( name ) ? boolHook : undefined );8012}80138014if ( value !== undefined ) {8015if ( value === null ) {8016jQuery.removeAttr( elem, name );8017return;8018}80198020if ( hooks && "set" in hooks &&8021( ret = hooks.set( elem, value, name ) ) !== undefined ) {8022return ret;8023}80248025elem.setAttribute( name, value + "" );8026return value;8027}80288029if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {8030return ret;8031}80328033ret = jQuery.find.attr( elem, name );80348035// Non-existent attributes return null, we normalize to undefined8036return ret == null ? undefined : ret;8037},80388039attrHooks: {8040type: {8041set: function( elem, value ) {8042if ( !support.radioValue && value === "radio" &&8043nodeName( elem, "input" ) ) {8044var val = elem.value;8045elem.setAttribute( "type", value );8046if ( val ) {8047elem.value = val;8048}8049return value;8050}8051}8052}8053},80548055removeAttr: function( elem, value ) {8056var name,8057i = 0,80588059// Attribute names can contain non-HTML whitespace characters8060// https://html.spec.whatwg.org/multipage/syntax.html#attributes-28061attrNames = value && value.match( rnothtmlwhite );80628063if ( attrNames && elem.nodeType === 1 ) {8064while ( ( name = attrNames[ i++ ] ) ) {8065elem.removeAttribute( name );8066}8067}8068}8069} );80708071// Hooks for boolean attributes8072boolHook = {8073set: function( elem, value, name ) {8074if ( value === false ) {80758076// Remove boolean attributes when set to false8077jQuery.removeAttr( elem, name );8078} else {8079elem.setAttribute( name, name );8080}8081return name;8082}8083};80848085jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( _i, name ) {8086var getter = attrHandle[ name ] || jQuery.find.attr;80878088attrHandle[ name ] = function( elem, name, isXML ) {8089var ret, handle,8090lowercaseName = name.toLowerCase();80918092if ( !isXML ) {80938094// Avoid an infinite loop by temporarily removing this function from the getter8095handle = attrHandle[ lowercaseName ];8096attrHandle[ lowercaseName ] = ret;8097ret = getter( elem, name, isXML ) != null ?8098lowercaseName :8099null;8100attrHandle[ lowercaseName ] = handle;8101}8102return ret;8103};8104} );81058106810781088109var rfocusable = /^(?:input|select|textarea|button)$/i,8110rclickable = /^(?:a|area)$/i;81118112jQuery.fn.extend( {8113prop: function( name, value ) {8114return access( this, jQuery.prop, name, value, arguments.length > 1 );8115},81168117removeProp: function( name ) {8118return this.each( function() {8119delete this[ jQuery.propFix[ name ] || name ];8120} );8121}8122} );81238124jQuery.extend( {8125prop: function( elem, name, value ) {8126var ret, hooks,8127nType = elem.nodeType;81288129// Don't get/set properties on text, comment and attribute nodes8130if ( nType === 3 || nType === 8 || nType === 2 ) {8131return;8132}81338134if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {81358136// Fix name and attach hooks8137name = jQuery.propFix[ name ] || name;8138hooks = jQuery.propHooks[ name ];8139}81408141if ( value !== undefined ) {8142if ( hooks && "set" in hooks &&8143( ret = hooks.set( elem, value, name ) ) !== undefined ) {8144return ret;8145}81468147return ( elem[ name ] = value );8148}81498150if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {8151return ret;8152}81538154return elem[ name ];8155},81568157propHooks: {8158tabIndex: {8159get: function( elem ) {81608161// Support: IE <=9 - 11 only8162// elem.tabIndex doesn't always return the8163// correct value when it hasn't been explicitly set8164// https://web.archive.org/web/20141116233347/http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/8165// Use proper attribute retrieval(#12072)8166var tabindex = jQuery.find.attr( elem, "tabindex" );81678168if ( tabindex ) {8169return parseInt( tabindex, 10 );8170}81718172if (8173rfocusable.test( elem.nodeName ) ||8174rclickable.test( elem.nodeName ) &&8175elem.href8176) {8177return 0;8178}81798180return -1;8181}8182}8183},81848185propFix: {8186"for": "htmlFor",8187"class": "className"8188}8189} );81908191// Support: IE <=11 only8192// Accessing the selectedIndex property8193// forces the browser to respect setting selected8194// on the option8195// The getter ensures a default option is selected8196// when in an optgroup8197// eslint rule "no-unused-expressions" is disabled for this code8198// since it considers such accessions noop8199if ( !support.optSelected ) {8200jQuery.propHooks.selected = {8201get: function( elem ) {82028203/* eslint no-unused-expressions: "off" */82048205var parent = elem.parentNode;8206if ( parent && parent.parentNode ) {8207parent.parentNode.selectedIndex;8208}8209return null;8210},8211set: function( elem ) {82128213/* eslint no-unused-expressions: "off" */82148215var parent = elem.parentNode;8216if ( parent ) {8217parent.selectedIndex;82188219if ( parent.parentNode ) {8220parent.parentNode.selectedIndex;8221}8222}8223}8224};8225}82268227jQuery.each( [8228"tabIndex",8229"readOnly",8230"maxLength",8231"cellSpacing",8232"cellPadding",8233"rowSpan",8234"colSpan",8235"useMap",8236"frameBorder",8237"contentEditable"8238], function() {8239jQuery.propFix[ this.toLowerCase() ] = this;8240} );82418242824382448245// Strip and collapse whitespace according to HTML spec8246// https://infra.spec.whatwg.org/#strip-and-collapse-ascii-whitespace8247function stripAndCollapse( value ) {8248var tokens = value.match( rnothtmlwhite ) || [];8249return tokens.join( " " );8250}825182528253function getClass( elem ) {8254return elem.getAttribute && elem.getAttribute( "class" ) || "";8255}82568257function classesToArray( value ) {8258if ( Array.isArray( value ) ) {8259return value;8260}8261if ( typeof value === "string" ) {8262return value.match( rnothtmlwhite ) || [];8263}8264return [];8265}82668267jQuery.fn.extend( {8268addClass: function( value ) {8269var classes, elem, cur, curValue, clazz, j, finalValue,8270i = 0;82718272if ( isFunction( value ) ) {8273return this.each( function( j ) {8274jQuery( this ).addClass( value.call( this, j, getClass( this ) ) );8275} );8276}82778278classes = classesToArray( value );82798280if ( classes.length ) {8281while ( ( elem = this[ i++ ] ) ) {8282curValue = getClass( elem );8283cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " );82848285if ( cur ) {8286j = 0;8287while ( ( clazz = classes[ j++ ] ) ) {8288if ( cur.indexOf( " " + clazz + " " ) < 0 ) {8289cur += clazz + " ";8290}8291}82928293// Only assign if different to avoid unneeded rendering.8294finalValue = stripAndCollapse( cur );8295if ( curValue !== finalValue ) {8296elem.setAttribute( "class", finalValue );8297}8298}8299}8300}83018302return this;8303},83048305removeClass: function( value ) {8306var classes, elem, cur, curValue, clazz, j, finalValue,8307i = 0;83088309if ( isFunction( value ) ) {8310return this.each( function( j ) {8311jQuery( this ).removeClass( value.call( this, j, getClass( this ) ) );8312} );8313}83148315if ( !arguments.length ) {8316return this.attr( "class", "" );8317}83188319classes = classesToArray( value );83208321if ( classes.length ) {8322while ( ( elem = this[ i++ ] ) ) {8323curValue = getClass( elem );83248325// This expression is here for better compressibility (see addClass)8326cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " );83278328if ( cur ) {8329j = 0;8330while ( ( clazz = classes[ j++ ] ) ) {83318332// Remove *all* instances8333while ( cur.indexOf( " " + clazz + " " ) > -1 ) {8334cur = cur.replace( " " + clazz + " ", " " );8335}8336}83378338// Only assign if different to avoid unneeded rendering.8339finalValue = stripAndCollapse( cur );8340if ( curValue !== finalValue ) {8341elem.setAttribute( "class", finalValue );8342}8343}8344}8345}83468347return this;8348},83498350toggleClass: function( value, stateVal ) {8351var type = typeof value,8352isValidValue = type === "string" || Array.isArray( value );83538354if ( typeof stateVal === "boolean" && isValidValue ) {8355return stateVal ? this.addClass( value ) : this.removeClass( value );8356}83578358if ( isFunction( value ) ) {8359return this.each( function( i ) {8360jQuery( this ).toggleClass(8361value.call( this, i, getClass( this ), stateVal ),8362stateVal8363);8364} );8365}83668367return this.each( function() {8368var className, i, self, classNames;83698370if ( isValidValue ) {83718372// Toggle individual class names8373i = 0;8374self = jQuery( this );8375classNames = classesToArray( value );83768377while ( ( className = classNames[ i++ ] ) ) {83788379// Check each className given, space separated list8380if ( self.hasClass( className ) ) {8381self.removeClass( className );8382} else {8383self.addClass( className );8384}8385}83868387// Toggle whole class name8388} else if ( value === undefined || type === "boolean" ) {8389className = getClass( this );8390if ( className ) {83918392// Store className if set8393dataPriv.set( this, "__className__", className );8394}83958396// If the element has a class name or if we're passed `false`,8397// then remove the whole classname (if there was one, the above saved it).8398// Otherwise bring back whatever was previously saved (if anything),8399// falling back to the empty string if nothing was stored.8400if ( this.setAttribute ) {8401this.setAttribute( "class",8402className || value === false ?8403"" :8404dataPriv.get( this, "__className__" ) || ""8405);8406}8407}8408} );8409},84108411hasClass: function( selector ) {8412var className, elem,8413i = 0;84148415className = " " + selector + " ";8416while ( ( elem = this[ i++ ] ) ) {8417if ( elem.nodeType === 1 &&8418( " " + stripAndCollapse( getClass( elem ) ) + " " ).indexOf( className ) > -1 ) {8419return true;8420}8421}84228423return false;8424}8425} );84268427842884298430var rreturn = /\r/g;84318432jQuery.fn.extend( {8433val: function( value ) {8434var hooks, ret, valueIsFunction,8435elem = this[ 0 ];84368437if ( !arguments.length ) {8438if ( elem ) {8439hooks = jQuery.valHooks[ elem.type ] ||8440jQuery.valHooks[ elem.nodeName.toLowerCase() ];84418442if ( hooks &&8443"get" in hooks &&8444( ret = hooks.get( elem, "value" ) ) !== undefined8445) {8446return ret;8447}84488449ret = elem.value;84508451// Handle most common string cases8452if ( typeof ret === "string" ) {8453return ret.replace( rreturn, "" );8454}84558456// Handle cases where value is null/undef or number8457return ret == null ? "" : ret;8458}84598460return;8461}84628463valueIsFunction = isFunction( value );84648465return this.each( function( i ) {8466var val;84678468if ( this.nodeType !== 1 ) {8469return;8470}84718472if ( valueIsFunction ) {8473val = value.call( this, i, jQuery( this ).val() );8474} else {8475val = value;8476}84778478// Treat null/undefined as ""; convert numbers to string8479if ( val == null ) {8480val = "";84818482} else if ( typeof val === "number" ) {8483val += "";84848485} else if ( Array.isArray( val ) ) {8486val = jQuery.map( val, function( value ) {8487return value == null ? "" : value + "";8488} );8489}84908491hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];84928493// If set returns undefined, fall back to normal setting8494if ( !hooks || !( "set" in hooks ) || hooks.set( this, val, "value" ) === undefined ) {8495this.value = val;8496}8497} );8498}8499} );85008501jQuery.extend( {8502valHooks: {8503option: {8504get: function( elem ) {85058506var val = jQuery.find.attr( elem, "value" );8507return val != null ?8508val :85098510// Support: IE <=10 - 11 only8511// option.text throws exceptions (#14686, #14858)8512// Strip and collapse whitespace8513// https://html.spec.whatwg.org/#strip-and-collapse-whitespace8514stripAndCollapse( jQuery.text( elem ) );8515}8516},8517select: {8518get: function( elem ) {8519var value, option, i,8520options = elem.options,8521index = elem.selectedIndex,8522one = elem.type === "select-one",8523values = one ? null : [],8524max = one ? index + 1 : options.length;85258526if ( index < 0 ) {8527i = max;85288529} else {8530i = one ? index : 0;8531}85328533// Loop through all the selected options8534for ( ; i < max; i++ ) {8535option = options[ i ];85368537// Support: IE <=9 only8538// IE8-9 doesn't update selected after form reset (#2551)8539if ( ( option.selected || i === index ) &&85408541// Don't return options that are disabled or in a disabled optgroup8542!option.disabled &&8543( !option.parentNode.disabled ||8544!nodeName( option.parentNode, "optgroup" ) ) ) {85458546// Get the specific value for the option8547value = jQuery( option ).val();85488549// We don't need an array for one selects8550if ( one ) {8551return value;8552}85538554// Multi-Selects return an array8555values.push( value );8556}8557}85588559return values;8560},85618562set: function( elem, value ) {8563var optionSet, option,8564options = elem.options,8565values = jQuery.makeArray( value ),8566i = options.length;85678568while ( i-- ) {8569option = options[ i ];85708571/* eslint-disable no-cond-assign */85728573if ( option.selected =8574jQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -18575) {8576optionSet = true;8577}85788579/* eslint-enable no-cond-assign */8580}85818582// Force browsers to behave consistently when non-matching value is set8583if ( !optionSet ) {8584elem.selectedIndex = -1;8585}8586return values;8587}8588}8589}8590} );85918592// Radios and checkboxes getter/setter8593jQuery.each( [ "radio", "checkbox" ], function() {8594jQuery.valHooks[ this ] = {8595set: function( elem, value ) {8596if ( Array.isArray( value ) ) {8597return ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 );8598}8599}8600};8601if ( !support.checkOn ) {8602jQuery.valHooks[ this ].get = function( elem ) {8603return elem.getAttribute( "value" ) === null ? "on" : elem.value;8604};8605}8606} );86078608860986108611// Return jQuery for attributes-only inclusion861286138614support.focusin = "onfocusin" in window;861586168617var rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,8618stopPropagationCallback = function( e ) {8619e.stopPropagation();8620};86218622jQuery.extend( jQuery.event, {86238624trigger: function( event, data, elem, onlyHandlers ) {86258626var i, cur, tmp, bubbleType, ontype, handle, special, lastElement,8627eventPath = [ elem || document ],8628type = hasOwn.call( event, "type" ) ? event.type : event,8629namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split( "." ) : [];86308631cur = lastElement = tmp = elem = elem || document;86328633// Don't do events on text and comment nodes8634if ( elem.nodeType === 3 || elem.nodeType === 8 ) {8635return;8636}86378638// focus/blur morphs to focusin/out; ensure we're not firing them right now8639if ( rfocusMorph.test( type + jQuery.event.triggered ) ) {8640return;8641}86428643if ( type.indexOf( "." ) > -1 ) {86448645// Namespaced trigger; create a regexp to match event type in handle()8646namespaces = type.split( "." );8647type = namespaces.shift();8648namespaces.sort();8649}8650ontype = type.indexOf( ":" ) < 0 && "on" + type;86518652// Caller can pass in a jQuery.Event object, Object, or just an event type string8653event = event[ jQuery.expando ] ?8654event :8655new jQuery.Event( type, typeof event === "object" && event );86568657// Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true)8658event.isTrigger = onlyHandlers ? 2 : 3;8659event.namespace = namespaces.join( "." );8660event.rnamespace = event.namespace ?8661new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ) :8662null;86638664// Clean up the event in case it is being reused8665event.result = undefined;8666if ( !event.target ) {8667event.target = elem;8668}86698670// Clone any incoming data and prepend the event, creating the handler arg list8671data = data == null ?8672[ event ] :8673jQuery.makeArray( data, [ event ] );86748675// Allow special events to draw outside the lines8676special = jQuery.event.special[ type ] || {};8677if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {8678return;8679}86808681// Determine event propagation path in advance, per W3C events spec (#9951)8682// Bubble up to document, then to window; watch for a global ownerDocument var (#9724)8683if ( !onlyHandlers && !special.noBubble && !isWindow( elem ) ) {86848685bubbleType = special.delegateType || type;8686if ( !rfocusMorph.test( bubbleType + type ) ) {8687cur = cur.parentNode;8688}8689for ( ; cur; cur = cur.parentNode ) {8690eventPath.push( cur );8691tmp = cur;8692}86938694// Only add window if we got to document (e.g., not plain obj or detached DOM)8695if ( tmp === ( elem.ownerDocument || document ) ) {8696eventPath.push( tmp.defaultView || tmp.parentWindow || window );8697}8698}86998700// Fire handlers on the event path8701i = 0;8702while ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) {8703lastElement = cur;8704event.type = i > 1 ?8705bubbleType :8706special.bindType || type;87078708// jQuery handler8709handle = (8710dataPriv.get( cur, "events" ) || Object.create( null )8711)[ event.type ] &&8712dataPriv.get( cur, "handle" );8713if ( handle ) {8714handle.apply( cur, data );8715}87168717// Native handler8718handle = ontype && cur[ ontype ];8719if ( handle && handle.apply && acceptData( cur ) ) {8720event.result = handle.apply( cur, data );8721if ( event.result === false ) {8722event.preventDefault();8723}8724}8725}8726event.type = type;87278728// If nobody prevented the default action, do it now8729if ( !onlyHandlers && !event.isDefaultPrevented() ) {87308731if ( ( !special._default ||8732special._default.apply( eventPath.pop(), data ) === false ) &&8733acceptData( elem ) ) {87348735// Call a native DOM method on the target with the same name as the event.8736// Don't do default actions on window, that's where global variables be (#6170)8737if ( ontype && isFunction( elem[ type ] ) && !isWindow( elem ) ) {87388739// Don't re-trigger an onFOO event when we call its FOO() method8740tmp = elem[ ontype ];87418742if ( tmp ) {8743elem[ ontype ] = null;8744}87458746// Prevent re-triggering of the same event, since we already bubbled it above8747jQuery.event.triggered = type;87488749if ( event.isPropagationStopped() ) {8750lastElement.addEventListener( type, stopPropagationCallback );8751}87528753elem[ type ]();87548755if ( event.isPropagationStopped() ) {8756lastElement.removeEventListener( type, stopPropagationCallback );8757}87588759jQuery.event.triggered = undefined;87608761if ( tmp ) {8762elem[ ontype ] = tmp;8763}8764}8765}8766}87678768return event.result;8769},87708771// Piggyback on a donor event to simulate a different one8772// Used only for `focus(in | out)` events8773simulate: function( type, elem, event ) {8774var e = jQuery.extend(8775new jQuery.Event(),8776event,8777{8778type: type,8779isSimulated: true8780}8781);87828783jQuery.event.trigger( e, null, elem );8784}87858786} );87878788jQuery.fn.extend( {87898790trigger: function( type, data ) {8791return this.each( function() {8792jQuery.event.trigger( type, data, this );8793} );8794},8795triggerHandler: function( type, data ) {8796var elem = this[ 0 ];8797if ( elem ) {8798return jQuery.event.trigger( type, data, elem, true );8799}8800}8801} );880288038804// Support: Firefox <=448805// Firefox doesn't have focus(in | out) events8806// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=6877878807//8808// Support: Chrome <=48 - 49, Safari <=9.0 - 9.18809// focus(in | out) events fire after focus & blur events,8810// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order8811// Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=4498578812if ( !support.focusin ) {8813jQuery.each( { focus: "focusin", blur: "focusout" }, function( orig, fix ) {88148815// Attach a single capturing handler on the document while someone wants focusin/focusout8816var handler = function( event ) {8817jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ) );8818};88198820jQuery.event.special[ fix ] = {8821setup: function() {88228823// Handle: regular nodes (via `this.ownerDocument`), window8824// (via `this.document`) & document (via `this`).8825var doc = this.ownerDocument || this.document || this,8826attaches = dataPriv.access( doc, fix );88278828if ( !attaches ) {8829doc.addEventListener( orig, handler, true );8830}8831dataPriv.access( doc, fix, ( attaches || 0 ) + 1 );8832},8833teardown: function() {8834var doc = this.ownerDocument || this.document || this,8835attaches = dataPriv.access( doc, fix ) - 1;88368837if ( !attaches ) {8838doc.removeEventListener( orig, handler, true );8839dataPriv.remove( doc, fix );88408841} else {8842dataPriv.access( doc, fix, attaches );8843}8844}8845};8846} );8847}8848var location = window.location;88498850var nonce = { guid: Date.now() };88518852var rquery = ( /\?/ );8853885488558856// Cross-browser xml parsing8857jQuery.parseXML = function( data ) {8858var xml;8859if ( !data || typeof data !== "string" ) {8860return null;8861}88628863// Support: IE 9 - 11 only8864// IE throws on parseFromString with invalid input.8865try {8866xml = ( new window.DOMParser() ).parseFromString( data, "text/xml" );8867} catch ( e ) {8868xml = undefined;8869}88708871if ( !xml || xml.getElementsByTagName( "parsererror" ).length ) {8872jQuery.error( "Invalid XML: " + data );8873}8874return xml;8875};887688778878var8879rbracket = /\[\]$/,8880rCRLF = /\r?\n/g,8881rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,8882rsubmittable = /^(?:input|select|textarea|keygen)/i;88838884function buildParams( prefix, obj, traditional, add ) {8885var name;88868887if ( Array.isArray( obj ) ) {88888889// Serialize array item.8890jQuery.each( obj, function( i, v ) {8891if ( traditional || rbracket.test( prefix ) ) {88928893// Treat each array item as a scalar.8894add( prefix, v );88958896} else {88978898// Item is non-scalar (array or object), encode its numeric index.8899buildParams(8900prefix + "[" + ( typeof v === "object" && v != null ? i : "" ) + "]",8901v,8902traditional,8903add8904);8905}8906} );89078908} else if ( !traditional && toType( obj ) === "object" ) {89098910// Serialize object item.8911for ( name in obj ) {8912buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add );8913}89148915} else {89168917// Serialize scalar item.8918add( prefix, obj );8919}8920}89218922// Serialize an array of form elements or a set of8923// key/values into a query string8924jQuery.param = function( a, traditional ) {8925var prefix,8926s = [],8927add = function( key, valueOrFunction ) {89288929// If value is a function, invoke it and use its return value8930var value = isFunction( valueOrFunction ) ?8931valueOrFunction() :8932valueOrFunction;89338934s[ s.length ] = encodeURIComponent( key ) + "=" +8935encodeURIComponent( value == null ? "" : value );8936};89378938if ( a == null ) {8939return "";8940}89418942// If an array was passed in, assume that it is an array of form elements.8943if ( Array.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {89448945// Serialize the form elements8946jQuery.each( a, function() {8947add( this.name, this.value );8948} );89498950} else {89518952// If traditional, encode the "old" way (the way 1.3.2 or older8953// did it), otherwise encode params recursively.8954for ( prefix in a ) {8955buildParams( prefix, a[ prefix ], traditional, add );8956}8957}89588959// Return the resulting serialization8960return s.join( "&" );8961};89628963jQuery.fn.extend( {8964serialize: function() {8965return jQuery.param( this.serializeArray() );8966},8967serializeArray: function() {8968return this.map( function() {89698970// Can add propHook for "elements" to filter or add form elements8971var elements = jQuery.prop( this, "elements" );8972return elements ? jQuery.makeArray( elements ) : this;8973} )8974.filter( function() {8975var type = this.type;89768977// Use .is( ":disabled" ) so that fieldset[disabled] works8978return this.name && !jQuery( this ).is( ":disabled" ) &&8979rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&8980( this.checked || !rcheckableType.test( type ) );8981} )8982.map( function( _i, elem ) {8983var val = jQuery( this ).val();89848985if ( val == null ) {8986return null;8987}89888989if ( Array.isArray( val ) ) {8990return jQuery.map( val, function( val ) {8991return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };8992} );8993}89948995return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };8996} ).get();8997}8998} );899990009001var9002r20 = /%20/g,9003rhash = /#.*$/,9004rantiCache = /([?&])_=[^&]*/,9005rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg,90069007// #7653, #8125, #8152: local protocol detection9008rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,9009rnoContent = /^(?:GET|HEAD)$/,9010rprotocol = /^\/\//,90119012/* Prefilters9013* 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)9014* 2) These are called:9015* - BEFORE asking for a transport9016* - AFTER param serialization (s.data is a string if s.processData is true)9017* 3) key is the dataType9018* 4) the catchall symbol "*" can be used9019* 5) execution will start with transport dataType and THEN continue down to "*" if needed9020*/9021prefilters = {},90229023/* Transports bindings9024* 1) key is the dataType9025* 2) the catchall symbol "*" can be used9026* 3) selection will start with transport dataType and THEN go to "*" if needed9027*/9028transports = {},90299030// Avoid comment-prolog char sequence (#10098); must appease lint and evade compression9031allTypes = "*/".concat( "*" ),90329033// Anchor tag for parsing the document origin9034originAnchor = document.createElement( "a" );9035originAnchor.href = location.href;90369037// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport9038function addToPrefiltersOrTransports( structure ) {90399040// dataTypeExpression is optional and defaults to "*"9041return function( dataTypeExpression, func ) {90429043if ( typeof dataTypeExpression !== "string" ) {9044func = dataTypeExpression;9045dataTypeExpression = "*";9046}90479048var dataType,9049i = 0,9050dataTypes = dataTypeExpression.toLowerCase().match( rnothtmlwhite ) || [];90519052if ( isFunction( func ) ) {90539054// For each dataType in the dataTypeExpression9055while ( ( dataType = dataTypes[ i++ ] ) ) {90569057// Prepend if requested9058if ( dataType[ 0 ] === "+" ) {9059dataType = dataType.slice( 1 ) || "*";9060( structure[ dataType ] = structure[ dataType ] || [] ).unshift( func );90619062// Otherwise append9063} else {9064( structure[ dataType ] = structure[ dataType ] || [] ).push( func );9065}9066}9067}9068};9069}90709071// Base inspection function for prefilters and transports9072function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {90739074var inspected = {},9075seekingTransport = ( structure === transports );90769077function inspect( dataType ) {9078var selected;9079inspected[ dataType ] = true;9080jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {9081var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );9082if ( typeof dataTypeOrTransport === "string" &&9083!seekingTransport && !inspected[ dataTypeOrTransport ] ) {90849085options.dataTypes.unshift( dataTypeOrTransport );9086inspect( dataTypeOrTransport );9087return false;9088} else if ( seekingTransport ) {9089return !( selected = dataTypeOrTransport );9090}9091} );9092return selected;9093}90949095return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" );9096}90979098// A special extend for ajax options9099// that takes "flat" options (not to be deep extended)9100// Fixes #98879101function ajaxExtend( target, src ) {9102var key, deep,9103flatOptions = jQuery.ajaxSettings.flatOptions || {};91049105for ( key in src ) {9106if ( src[ key ] !== undefined ) {9107( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];9108}9109}9110if ( deep ) {9111jQuery.extend( true, target, deep );9112}91139114return target;9115}91169117/* Handles responses to an ajax request:9118* - finds the right dataType (mediates between content-type and expected dataType)9119* - returns the corresponding response9120*/9121function ajaxHandleResponses( s, jqXHR, responses ) {91229123var ct, type, finalDataType, firstDataType,9124contents = s.contents,9125dataTypes = s.dataTypes;91269127// Remove auto dataType and get content-type in the process9128while ( dataTypes[ 0 ] === "*" ) {9129dataTypes.shift();9130if ( ct === undefined ) {9131ct = s.mimeType || jqXHR.getResponseHeader( "Content-Type" );9132}9133}91349135// Check if we're dealing with a known content-type9136if ( ct ) {9137for ( type in contents ) {9138if ( contents[ type ] && contents[ type ].test( ct ) ) {9139dataTypes.unshift( type );9140break;9141}9142}9143}91449145// Check to see if we have a response for the expected dataType9146if ( dataTypes[ 0 ] in responses ) {9147finalDataType = dataTypes[ 0 ];9148} else {91499150// Try convertible dataTypes9151for ( type in responses ) {9152if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[ 0 ] ] ) {9153finalDataType = type;9154break;9155}9156if ( !firstDataType ) {9157firstDataType = type;9158}9159}91609161// Or just use first one9162finalDataType = finalDataType || firstDataType;9163}91649165// If we found a dataType9166// We add the dataType to the list if needed9167// and return the corresponding response9168if ( finalDataType ) {9169if ( finalDataType !== dataTypes[ 0 ] ) {9170dataTypes.unshift( finalDataType );9171}9172return responses[ finalDataType ];9173}9174}91759176/* Chain conversions given the request and the original response9177* Also sets the responseXXX fields on the jqXHR instance9178*/9179function ajaxConvert( s, response, jqXHR, isSuccess ) {9180var conv2, current, conv, tmp, prev,9181converters = {},91829183// Work with a copy of dataTypes in case we need to modify it for conversion9184dataTypes = s.dataTypes.slice();91859186// Create converters map with lowercased keys9187if ( dataTypes[ 1 ] ) {9188for ( conv in s.converters ) {9189converters[ conv.toLowerCase() ] = s.converters[ conv ];9190}9191}91929193current = dataTypes.shift();91949195// Convert to each sequential dataType9196while ( current ) {91979198if ( s.responseFields[ current ] ) {9199jqXHR[ s.responseFields[ current ] ] = response;9200}92019202// Apply the dataFilter if provided9203if ( !prev && isSuccess && s.dataFilter ) {9204response = s.dataFilter( response, s.dataType );9205}92069207prev = current;9208current = dataTypes.shift();92099210if ( current ) {92119212// There's only work to do if current dataType is non-auto9213if ( current === "*" ) {92149215current = prev;92169217// Convert response if prev dataType is non-auto and differs from current9218} else if ( prev !== "*" && prev !== current ) {92199220// Seek a direct converter9221conv = converters[ prev + " " + current ] || converters[ "* " + current ];92229223// If none found, seek a pair9224if ( !conv ) {9225for ( conv2 in converters ) {92269227// If conv2 outputs current9228tmp = conv2.split( " " );9229if ( tmp[ 1 ] === current ) {92309231// If prev can be converted to accepted input9232conv = converters[ prev + " " + tmp[ 0 ] ] ||9233converters[ "* " + tmp[ 0 ] ];9234if ( conv ) {92359236// Condense equivalence converters9237if ( conv === true ) {9238conv = converters[ conv2 ];92399240// Otherwise, insert the intermediate dataType9241} else if ( converters[ conv2 ] !== true ) {9242current = tmp[ 0 ];9243dataTypes.unshift( tmp[ 1 ] );9244}9245break;9246}9247}9248}9249}92509251// Apply converter (if not an equivalence)9252if ( conv !== true ) {92539254// Unless errors are allowed to bubble, catch and return them9255if ( conv && s.throws ) {9256response = conv( response );9257} else {9258try {9259response = conv( response );9260} catch ( e ) {9261return {9262state: "parsererror",9263error: conv ? e : "No conversion from " + prev + " to " + current9264};9265}9266}9267}9268}9269}9270}92719272return { state: "success", data: response };9273}92749275jQuery.extend( {92769277// Counter for holding the number of active queries9278active: 0,92799280// Last-Modified header cache for next request9281lastModified: {},9282etag: {},92839284ajaxSettings: {9285url: location.href,9286type: "GET",9287isLocal: rlocalProtocol.test( location.protocol ),9288global: true,9289processData: true,9290async: true,9291contentType: "application/x-www-form-urlencoded; charset=UTF-8",92929293/*9294timeout: 0,9295data: null,9296dataType: null,9297username: null,9298password: null,9299cache: null,9300throws: false,9301traditional: false,9302headers: {},9303*/93049305accepts: {9306"*": allTypes,9307text: "text/plain",9308html: "text/html",9309xml: "application/xml, text/xml",9310json: "application/json, text/javascript"9311},93129313contents: {9314xml: /\bxml\b/,9315html: /\bhtml/,9316json: /\bjson\b/9317},93189319responseFields: {9320xml: "responseXML",9321text: "responseText",9322json: "responseJSON"9323},93249325// Data converters9326// Keys separate source (or catchall "*") and destination types with a single space9327converters: {93289329// Convert anything to text9330"* text": String,93319332// Text to html (true = no transformation)9333"text html": true,93349335// Evaluate text as a json expression9336"text json": JSON.parse,93379338// Parse text as xml9339"text xml": jQuery.parseXML9340},93419342// For options that shouldn't be deep extended:9343// you can add your own custom options here if9344// and when you create one that shouldn't be9345// deep extended (see ajaxExtend)9346flatOptions: {9347url: true,9348context: true9349}9350},93519352// Creates a full fledged settings object into target9353// with both ajaxSettings and settings fields.9354// If target is omitted, writes into ajaxSettings.9355ajaxSetup: function( target, settings ) {9356return settings ?93579358// Building a settings object9359ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) :93609361// Extending ajaxSettings9362ajaxExtend( jQuery.ajaxSettings, target );9363},93649365ajaxPrefilter: addToPrefiltersOrTransports( prefilters ),9366ajaxTransport: addToPrefiltersOrTransports( transports ),93679368// Main method9369ajax: function( url, options ) {93709371// If url is an object, simulate pre-1.5 signature9372if ( typeof url === "object" ) {9373options = url;9374url = undefined;9375}93769377// Force options to be an object9378options = options || {};93799380var transport,93819382// URL without anti-cache param9383cacheURL,93849385// Response headers9386responseHeadersString,9387responseHeaders,93889389// timeout handle9390timeoutTimer,93919392// Url cleanup var9393urlAnchor,93949395// Request state (becomes false upon send and true upon completion)9396completed,93979398// To know if global events are to be dispatched9399fireGlobals,94009401// Loop variable9402i,94039404// uncached part of the url9405uncached,94069407// Create the final options object9408s = jQuery.ajaxSetup( {}, options ),94099410// Callbacks context9411callbackContext = s.context || s,94129413// Context for global events is callbackContext if it is a DOM node or jQuery collection9414globalEventContext = s.context &&9415( callbackContext.nodeType || callbackContext.jquery ) ?9416jQuery( callbackContext ) :9417jQuery.event,94189419// Deferreds9420deferred = jQuery.Deferred(),9421completeDeferred = jQuery.Callbacks( "once memory" ),94229423// Status-dependent callbacks9424statusCode = s.statusCode || {},94259426// Headers (they are sent all at once)9427requestHeaders = {},9428requestHeadersNames = {},94299430// Default abort message9431strAbort = "canceled",94329433// Fake xhr9434jqXHR = {9435readyState: 0,94369437// Builds headers hashtable if needed9438getResponseHeader: function( key ) {9439var match;9440if ( completed ) {9441if ( !responseHeaders ) {9442responseHeaders = {};9443while ( ( match = rheaders.exec( responseHeadersString ) ) ) {9444responseHeaders[ match[ 1 ].toLowerCase() + " " ] =9445( responseHeaders[ match[ 1 ].toLowerCase() + " " ] || [] )9446.concat( match[ 2 ] );9447}9448}9449match = responseHeaders[ key.toLowerCase() + " " ];9450}9451return match == null ? null : match.join( ", " );9452},94539454// Raw string9455getAllResponseHeaders: function() {9456return completed ? responseHeadersString : null;9457},94589459// Caches the header9460setRequestHeader: function( name, value ) {9461if ( completed == null ) {9462name = requestHeadersNames[ name.toLowerCase() ] =9463requestHeadersNames[ name.toLowerCase() ] || name;9464requestHeaders[ name ] = value;9465}9466return this;9467},94689469// Overrides response content-type header9470overrideMimeType: function( type ) {9471if ( completed == null ) {9472s.mimeType = type;9473}9474return this;9475},94769477// Status-dependent callbacks9478statusCode: function( map ) {9479var code;9480if ( map ) {9481if ( completed ) {94829483// Execute the appropriate callbacks9484jqXHR.always( map[ jqXHR.status ] );9485} else {94869487// Lazy-add the new callbacks in a way that preserves old ones9488for ( code in map ) {9489statusCode[ code ] = [ statusCode[ code ], map[ code ] ];9490}9491}9492}9493return this;9494},94959496// Cancel the request9497abort: function( statusText ) {9498var finalText = statusText || strAbort;9499if ( transport ) {9500transport.abort( finalText );9501}9502done( 0, finalText );9503return this;9504}9505};95069507// Attach deferreds9508deferred.promise( jqXHR );95099510// Add protocol if not provided (prefilters might expect it)9511// Handle falsy url in the settings object (#10093: consistency with old signature)9512// We also use the url parameter if available9513s.url = ( ( url || s.url || location.href ) + "" )9514.replace( rprotocol, location.protocol + "//" );95159516// Alias method option to type as per ticket #120049517s.type = options.method || options.type || s.method || s.type;95189519// Extract dataTypes list9520s.dataTypes = ( s.dataType || "*" ).toLowerCase().match( rnothtmlwhite ) || [ "" ];95219522// A cross-domain request is in order when the origin doesn't match the current origin.9523if ( s.crossDomain == null ) {9524urlAnchor = document.createElement( "a" );95259526// Support: IE <=8 - 11, Edge 12 - 159527// IE throws exception on accessing the href property if url is malformed,9528// e.g. http://example.com:80x/9529try {9530urlAnchor.href = s.url;95319532// Support: IE <=8 - 11 only9533// Anchor's host property isn't correctly set when s.url is relative9534urlAnchor.href = urlAnchor.href;9535s.crossDomain = originAnchor.protocol + "//" + originAnchor.host !==9536urlAnchor.protocol + "//" + urlAnchor.host;9537} catch ( e ) {95389539// If there is an error parsing the URL, assume it is crossDomain,9540// it can be rejected by the transport if it is invalid9541s.crossDomain = true;9542}9543}95449545// Convert data if not already a string9546if ( s.data && s.processData && typeof s.data !== "string" ) {9547s.data = jQuery.param( s.data, s.traditional );9548}95499550// Apply prefilters9551inspectPrefiltersOrTransports( prefilters, s, options, jqXHR );95529553// If request was aborted inside a prefilter, stop there9554if ( completed ) {9555return jqXHR;9556}95579558// We can fire global events as of now if asked to9559// Don't fire events if jQuery.event is undefined in an AMD-usage scenario (#15118)9560fireGlobals = jQuery.event && s.global;95619562// Watch for a new set of requests9563if ( fireGlobals && jQuery.active++ === 0 ) {9564jQuery.event.trigger( "ajaxStart" );9565}95669567// Uppercase the type9568s.type = s.type.toUpperCase();95699570// Determine if request has content9571s.hasContent = !rnoContent.test( s.type );95729573// Save the URL in case we're toying with the If-Modified-Since9574// and/or If-None-Match header later on9575// Remove hash to simplify url manipulation9576cacheURL = s.url.replace( rhash, "" );95779578// More options handling for requests with no content9579if ( !s.hasContent ) {95809581// Remember the hash so we can put it back9582uncached = s.url.slice( cacheURL.length );95839584// If data is available and should be processed, append data to url9585if ( s.data && ( s.processData || typeof s.data === "string" ) ) {9586cacheURL += ( rquery.test( cacheURL ) ? "&" : "?" ) + s.data;95879588// #9682: remove data so that it's not used in an eventual retry9589delete s.data;9590}95919592// Add or update anti-cache param if needed9593if ( s.cache === false ) {9594cacheURL = cacheURL.replace( rantiCache, "$1" );9595uncached = ( rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + ( nonce.guid++ ) +9596uncached;9597}95989599// Put hash and anti-cache on the URL that will be requested (gh-1732)9600s.url = cacheURL + uncached;96019602// Change '%20' to '+' if this is encoded form body content (gh-2658)9603} else if ( s.data && s.processData &&9604( s.contentType || "" ).indexOf( "application/x-www-form-urlencoded" ) === 0 ) {9605s.data = s.data.replace( r20, "+" );9606}96079608// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.9609if ( s.ifModified ) {9610if ( jQuery.lastModified[ cacheURL ] ) {9611jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] );9612}9613if ( jQuery.etag[ cacheURL ] ) {9614jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] );9615}9616}96179618// Set the correct header, if data is being sent9619if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {9620jqXHR.setRequestHeader( "Content-Type", s.contentType );9621}96229623// Set the Accepts header for the server, depending on the dataType9624jqXHR.setRequestHeader(9625"Accept",9626s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[ 0 ] ] ?9627s.accepts[ s.dataTypes[ 0 ] ] +9628( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) :9629s.accepts[ "*" ]9630);96319632// Check for headers option9633for ( i in s.headers ) {9634jqXHR.setRequestHeader( i, s.headers[ i ] );9635}96369637// Allow custom headers/mimetypes and early abort9638if ( s.beforeSend &&9639( s.beforeSend.call( callbackContext, jqXHR, s ) === false || completed ) ) {96409641// Abort if not done already and return9642return jqXHR.abort();9643}96449645// Aborting is no longer a cancellation9646strAbort = "abort";96479648// Install callbacks on deferreds9649completeDeferred.add( s.complete );9650jqXHR.done( s.success );9651jqXHR.fail( s.error );96529653// Get transport9654transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );96559656// If no transport, we auto-abort9657if ( !transport ) {9658done( -1, "No Transport" );9659} else {9660jqXHR.readyState = 1;96619662// Send global event9663if ( fireGlobals ) {9664globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] );9665}96669667// If request was aborted inside ajaxSend, stop there9668if ( completed ) {9669return jqXHR;9670}96719672// Timeout9673if ( s.async && s.timeout > 0 ) {9674timeoutTimer = window.setTimeout( function() {9675jqXHR.abort( "timeout" );9676}, s.timeout );9677}96789679try {9680completed = false;9681transport.send( requestHeaders, done );9682} catch ( e ) {96839684// Rethrow post-completion exceptions9685if ( completed ) {9686throw e;9687}96889689// Propagate others as results9690done( -1, e );9691}9692}96939694// Callback for when everything is done9695function done( status, nativeStatusText, responses, headers ) {9696var isSuccess, success, error, response, modified,9697statusText = nativeStatusText;96989699// Ignore repeat invocations9700if ( completed ) {9701return;9702}97039704completed = true;97059706// Clear timeout if it exists9707if ( timeoutTimer ) {9708window.clearTimeout( timeoutTimer );9709}97109711// Dereference transport for early garbage collection9712// (no matter how long the jqXHR object will be used)9713transport = undefined;97149715// Cache response headers9716responseHeadersString = headers || "";97179718// Set readyState9719jqXHR.readyState = status > 0 ? 4 : 0;97209721// Determine if successful9722isSuccess = status >= 200 && status < 300 || status === 304;97239724// Get response data9725if ( responses ) {9726response = ajaxHandleResponses( s, jqXHR, responses );9727}97289729// Use a noop converter for missing script9730if ( !isSuccess && jQuery.inArray( "script", s.dataTypes ) > -1 ) {9731s.converters[ "text script" ] = function() {};9732}97339734// Convert no matter what (that way responseXXX fields are always set)9735response = ajaxConvert( s, response, jqXHR, isSuccess );97369737// If successful, handle type chaining9738if ( isSuccess ) {97399740// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.9741if ( s.ifModified ) {9742modified = jqXHR.getResponseHeader( "Last-Modified" );9743if ( modified ) {9744jQuery.lastModified[ cacheURL ] = modified;9745}9746modified = jqXHR.getResponseHeader( "etag" );9747if ( modified ) {9748jQuery.etag[ cacheURL ] = modified;9749}9750}97519752// if no content9753if ( status === 204 || s.type === "HEAD" ) {9754statusText = "nocontent";97559756// if not modified9757} else if ( status === 304 ) {9758statusText = "notmodified";97599760// If we have data, let's convert it9761} else {9762statusText = response.state;9763success = response.data;9764error = response.error;9765isSuccess = !error;9766}9767} else {97689769// Extract error from statusText and normalize for non-aborts9770error = statusText;9771if ( status || !statusText ) {9772statusText = "error";9773if ( status < 0 ) {9774status = 0;9775}9776}9777}97789779// Set data for the fake xhr object9780jqXHR.status = status;9781jqXHR.statusText = ( nativeStatusText || statusText ) + "";97829783// Success/Error9784if ( isSuccess ) {9785deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );9786} else {9787deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );9788}97899790// Status-dependent callbacks9791jqXHR.statusCode( statusCode );9792statusCode = undefined;97939794if ( fireGlobals ) {9795globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError",9796[ jqXHR, s, isSuccess ? success : error ] );9797}97989799// Complete9800completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );98019802if ( fireGlobals ) {9803globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] );98049805// Handle the global AJAX counter9806if ( !( --jQuery.active ) ) {9807jQuery.event.trigger( "ajaxStop" );9808}9809}9810}98119812return jqXHR;9813},98149815getJSON: function( url, data, callback ) {9816return jQuery.get( url, data, callback, "json" );9817},98189819getScript: function( url, callback ) {9820return jQuery.get( url, undefined, callback, "script" );9821}9822} );98239824jQuery.each( [ "get", "post" ], function( _i, method ) {9825jQuery[ method ] = function( url, data, callback, type ) {98269827// Shift arguments if data argument was omitted9828if ( isFunction( data ) ) {9829type = type || callback;9830callback = data;9831data = undefined;9832}98339834// The url can be an options object (which then must have .url)9835return jQuery.ajax( jQuery.extend( {9836url: url,9837type: method,9838dataType: type,9839data: data,9840success: callback9841}, jQuery.isPlainObject( url ) && url ) );9842};9843} );98449845jQuery.ajaxPrefilter( function( s ) {9846var i;9847for ( i in s.headers ) {9848if ( i.toLowerCase() === "content-type" ) {9849s.contentType = s.headers[ i ] || "";9850}9851}9852} );985398549855jQuery._evalUrl = function( url, options, doc ) {9856return jQuery.ajax( {9857url: url,98589859// Make this explicit, since user can override this through ajaxSetup (#11264)9860type: "GET",9861dataType: "script",9862cache: true,9863async: false,9864global: false,98659866// Only evaluate the response if it is successful (gh-4126)9867// dataFilter is not invoked for failure responses, so using it instead9868// of the default converter is kludgy but it works.9869converters: {9870"text script": function() {}9871},9872dataFilter: function( response ) {9873jQuery.globalEval( response, options, doc );9874}9875} );9876};987798789879jQuery.fn.extend( {9880wrapAll: function( html ) {9881var wrap;98829883if ( this[ 0 ] ) {9884if ( isFunction( html ) ) {9885html = html.call( this[ 0 ] );9886}98879888// The elements to wrap the target around9889wrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true );98909891if ( this[ 0 ].parentNode ) {9892wrap.insertBefore( this[ 0 ] );9893}98949895wrap.map( function() {9896var elem = this;98979898while ( elem.firstElementChild ) {9899elem = elem.firstElementChild;9900}99019902return elem;9903} ).append( this );9904}99059906return this;9907},99089909wrapInner: function( html ) {9910if ( isFunction( html ) ) {9911return this.each( function( i ) {9912jQuery( this ).wrapInner( html.call( this, i ) );9913} );9914}99159916return this.each( function() {9917var self = jQuery( this ),9918contents = self.contents();99199920if ( contents.length ) {9921contents.wrapAll( html );99229923} else {9924self.append( html );9925}9926} );9927},99289929wrap: function( html ) {9930var htmlIsFunction = isFunction( html );99319932return this.each( function( i ) {9933jQuery( this ).wrapAll( htmlIsFunction ? html.call( this, i ) : html );9934} );9935},99369937unwrap: function( selector ) {9938this.parent( selector ).not( "body" ).each( function() {9939jQuery( this ).replaceWith( this.childNodes );9940} );9941return this;9942}9943} );994499459946jQuery.expr.pseudos.hidden = function( elem ) {9947return !jQuery.expr.pseudos.visible( elem );9948};9949jQuery.expr.pseudos.visible = function( elem ) {9950return !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length );9951};99529953995499559956jQuery.ajaxSettings.xhr = function() {9957try {9958return new window.XMLHttpRequest();9959} catch ( e ) {}9960};99619962var xhrSuccessStatus = {99639964// File protocol always yields status code 0, assume 20099650: 200,99669967// Support: IE <=9 only9968// #1450: sometimes IE returns 1223 when it should be 20499691223: 2049970},9971xhrSupported = jQuery.ajaxSettings.xhr();99729973support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported );9974support.ajax = xhrSupported = !!xhrSupported;99759976jQuery.ajaxTransport( function( options ) {9977var callback, errorCallback;99789979// Cross domain only allowed if supported through XMLHttpRequest9980if ( support.cors || xhrSupported && !options.crossDomain ) {9981return {9982send: function( headers, complete ) {9983var i,9984xhr = options.xhr();99859986xhr.open(9987options.type,9988options.url,9989options.async,9990options.username,9991options.password9992);99939994// Apply custom fields if provided9995if ( options.xhrFields ) {9996for ( i in options.xhrFields ) {9997xhr[ i ] = options.xhrFields[ i ];9998}9999}1000010001// Override mime type if needed10002if ( options.mimeType && xhr.overrideMimeType ) {10003xhr.overrideMimeType( options.mimeType );10004}1000510006// X-Requested-With header10007// For cross-domain requests, seeing as conditions for a preflight are10008// akin to a jigsaw puzzle, we simply never set it to be sure.10009// (it can always be set on a per-request basis or even using ajaxSetup)10010// For same-domain requests, won't change header if already provided.10011if ( !options.crossDomain && !headers[ "X-Requested-With" ] ) {10012headers[ "X-Requested-With" ] = "XMLHttpRequest";10013}1001410015// Set headers10016for ( i in headers ) {10017xhr.setRequestHeader( i, headers[ i ] );10018}1001910020// Callback10021callback = function( type ) {10022return function() {10023if ( callback ) {10024callback = errorCallback = xhr.onload =10025xhr.onerror = xhr.onabort = xhr.ontimeout =10026xhr.onreadystatechange = null;1002710028if ( type === "abort" ) {10029xhr.abort();10030} else if ( type === "error" ) {1003110032// Support: IE <=9 only10033// On a manual native abort, IE9 throws10034// errors on any property access that is not readyState10035if ( typeof xhr.status !== "number" ) {10036complete( 0, "error" );10037} else {10038complete(1003910040// File: protocol always yields status 0; see #8605, #1420710041xhr.status,10042xhr.statusText10043);10044}10045} else {10046complete(10047xhrSuccessStatus[ xhr.status ] || xhr.status,10048xhr.statusText,1004910050// Support: IE <=9 only10051// IE9 has no XHR2 but throws on binary (trac-11426)10052// For XHR2 non-text, let the caller handle it (gh-2498)10053( xhr.responseType || "text" ) !== "text" ||10054typeof xhr.responseText !== "string" ?10055{ binary: xhr.response } :10056{ text: xhr.responseText },10057xhr.getAllResponseHeaders()10058);10059}10060}10061};10062};1006310064// Listen to events10065xhr.onload = callback();10066errorCallback = xhr.onerror = xhr.ontimeout = callback( "error" );1006710068// Support: IE 9 only10069// Use onreadystatechange to replace onabort10070// to handle uncaught aborts10071if ( xhr.onabort !== undefined ) {10072xhr.onabort = errorCallback;10073} else {10074xhr.onreadystatechange = function() {1007510076// Check readyState before timeout as it changes10077if ( xhr.readyState === 4 ) {1007810079// Allow onerror to be called first,10080// but that will not handle a native abort10081// Also, save errorCallback to a variable10082// as xhr.onerror cannot be accessed10083window.setTimeout( function() {10084if ( callback ) {10085errorCallback();10086}10087} );10088}10089};10090}1009110092// Create the abort callback10093callback = callback( "abort" );1009410095try {1009610097// Do send the request (this may raise an exception)10098xhr.send( options.hasContent && options.data || null );10099} catch ( e ) {1010010101// #14683: Only rethrow if this hasn't been notified as an error yet10102if ( callback ) {10103throw e;10104}10105}10106},1010710108abort: function() {10109if ( callback ) {10110callback();10111}10112}10113};10114}10115} );1011610117101181011910120// Prevent auto-execution of scripts when no explicit dataType was provided (See gh-2432)10121jQuery.ajaxPrefilter( function( s ) {10122if ( s.crossDomain ) {10123s.contents.script = false;10124}10125} );1012610127// Install script dataType10128jQuery.ajaxSetup( {10129accepts: {10130script: "text/javascript, application/javascript, " +10131"application/ecmascript, application/x-ecmascript"10132},10133contents: {10134script: /\b(?:java|ecma)script\b/10135},10136converters: {10137"text script": function( text ) {10138jQuery.globalEval( text );10139return text;10140}10141}10142} );1014310144// Handle cache's special case and crossDomain10145jQuery.ajaxPrefilter( "script", function( s ) {10146if ( s.cache === undefined ) {10147s.cache = false;10148}10149if ( s.crossDomain ) {10150s.type = "GET";10151}10152} );1015310154// Bind script tag hack transport10155jQuery.ajaxTransport( "script", function( s ) {1015610157// This transport only deals with cross domain or forced-by-attrs requests10158if ( s.crossDomain || s.scriptAttrs ) {10159var script, callback;10160return {10161send: function( _, complete ) {10162script = jQuery( "<script>" )10163.attr( s.scriptAttrs || {} )10164.prop( { charset: s.scriptCharset, src: s.url } )10165.on( "load error", callback = function( evt ) {10166script.remove();10167callback = null;10168if ( evt ) {10169complete( evt.type === "error" ? 404 : 200, evt.type );10170}10171} );1017210173// Use native DOM manipulation to avoid our domManip AJAX trickery10174document.head.appendChild( script[ 0 ] );10175},10176abort: function() {10177if ( callback ) {10178callback();10179}10180}10181};10182}10183} );1018410185101861018710188var oldCallbacks = [],10189rjsonp = /(=)\?(?=&|$)|\?\?/;1019010191// Default jsonp settings10192jQuery.ajaxSetup( {10193jsonp: "callback",10194jsonpCallback: function() {10195var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( nonce.guid++ ) );10196this[ callback ] = true;10197return callback;10198}10199} );1020010201// Detect, normalize options and install callbacks for jsonp requests10202jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) {1020310204var callbackName, overwritten, responseContainer,10205jsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ?10206"url" :10207typeof s.data === "string" &&10208( s.contentType || "" )10209.indexOf( "application/x-www-form-urlencoded" ) === 0 &&10210rjsonp.test( s.data ) && "data"10211);1021210213// Handle iff the expected data type is "jsonp" or we have a parameter to set10214if ( jsonProp || s.dataTypes[ 0 ] === "jsonp" ) {1021510216// Get callback name, remembering preexisting value associated with it10217callbackName = s.jsonpCallback = isFunction( s.jsonpCallback ) ?10218s.jsonpCallback() :10219s.jsonpCallback;1022010221// Insert callback into url or form data10222if ( jsonProp ) {10223s[ jsonProp ] = s[ jsonProp ].replace( rjsonp, "$1" + callbackName );10224} else if ( s.jsonp !== false ) {10225s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName;10226}1022710228// Use data converter to retrieve json after script execution10229s.converters[ "script json" ] = function() {10230if ( !responseContainer ) {10231jQuery.error( callbackName + " was not called" );10232}10233return responseContainer[ 0 ];10234};1023510236// Force json dataType10237s.dataTypes[ 0 ] = "json";1023810239// Install callback10240overwritten = window[ callbackName ];10241window[ callbackName ] = function() {10242responseContainer = arguments;10243};1024410245// Clean-up function (fires after converters)10246jqXHR.always( function() {1024710248// If previous value didn't exist - remove it10249if ( overwritten === undefined ) {10250jQuery( window ).removeProp( callbackName );1025110252// Otherwise restore preexisting value10253} else {10254window[ callbackName ] = overwritten;10255}1025610257// Save back as free10258if ( s[ callbackName ] ) {1025910260// Make sure that re-using the options doesn't screw things around10261s.jsonpCallback = originalSettings.jsonpCallback;1026210263// Save the callback name for future use10264oldCallbacks.push( callbackName );10265}1026610267// Call if it was a function and we have a response10268if ( responseContainer && isFunction( overwritten ) ) {10269overwritten( responseContainer[ 0 ] );10270}1027110272responseContainer = overwritten = undefined;10273} );1027410275// Delegate to script10276return "script";10277}10278} );1027910280102811028210283// Support: Safari 8 only10284// In Safari 8 documents created via document.implementation.createHTMLDocument10285// collapse sibling forms: the second one becomes a child of the first one.10286// Because of that, this security measure has to be disabled in Safari 8.10287// https://bugs.webkit.org/show_bug.cgi?id=13733710288support.createHTMLDocument = ( function() {10289var body = document.implementation.createHTMLDocument( "" ).body;10290body.innerHTML = "<form></form><form></form>";10291return body.childNodes.length === 2;10292} )();102931029410295// Argument "data" should be string of html10296// context (optional): If specified, the fragment will be created in this context,10297// defaults to document10298// keepScripts (optional): If true, will include scripts passed in the html string10299jQuery.parseHTML = function( data, context, keepScripts ) {10300if ( typeof data !== "string" ) {10301return [];10302}10303if ( typeof context === "boolean" ) {10304keepScripts = context;10305context = false;10306}1030710308var base, parsed, scripts;1030910310if ( !context ) {1031110312// Stop scripts or inline event handlers from being executed immediately10313// by using document.implementation10314if ( support.createHTMLDocument ) {10315context = document.implementation.createHTMLDocument( "" );1031610317// Set the base href for the created document10318// so any parsed elements with URLs10319// are based on the document's URL (gh-2965)10320base = context.createElement( "base" );10321base.href = document.location.href;10322context.head.appendChild( base );10323} else {10324context = document;10325}10326}1032710328parsed = rsingleTag.exec( data );10329scripts = !keepScripts && [];1033010331// Single tag10332if ( parsed ) {10333return [ context.createElement( parsed[ 1 ] ) ];10334}1033510336parsed = buildFragment( [ data ], context, scripts );1033710338if ( scripts && scripts.length ) {10339jQuery( scripts ).remove();10340}1034110342return jQuery.merge( [], parsed.childNodes );10343};103441034510346/**10347* Load a url into a page10348*/10349jQuery.fn.load = function( url, params, callback ) {10350var selector, type, response,10351self = this,10352off = url.indexOf( " " );1035310354if ( off > -1 ) {10355selector = stripAndCollapse( url.slice( off ) );10356url = url.slice( 0, off );10357}1035810359// If it's a function10360if ( isFunction( params ) ) {1036110362// We assume that it's the callback10363callback = params;10364params = undefined;1036510366// Otherwise, build a param string10367} else if ( params && typeof params === "object" ) {10368type = "POST";10369}1037010371// If we have elements to modify, make the request10372if ( self.length > 0 ) {10373jQuery.ajax( {10374url: url,1037510376// If "type" variable is undefined, then "GET" method will be used.10377// Make value of this field explicit since10378// user can override it through ajaxSetup method10379type: type || "GET",10380dataType: "html",10381data: params10382} ).done( function( responseText ) {1038310384// Save response for use in complete callback10385response = arguments;1038610387self.html( selector ?1038810389// If a selector was specified, locate the right elements in a dummy div10390// Exclude scripts to avoid IE 'Permission Denied' errors10391jQuery( "<div>" ).append( jQuery.parseHTML( responseText ) ).find( selector ) :1039210393// Otherwise use the full result10394responseText );1039510396// If the request succeeds, this function gets "data", "status", "jqXHR"10397// but they are ignored because response was set above.10398// If it fails, this function gets "jqXHR", "status", "error"10399} ).always( callback && function( jqXHR, status ) {10400self.each( function() {10401callback.apply( this, response || [ jqXHR.responseText, status, jqXHR ] );10402} );10403} );10404}1040510406return this;10407};1040810409104101041110412jQuery.expr.pseudos.animated = function( elem ) {10413return jQuery.grep( jQuery.timers, function( fn ) {10414return elem === fn.elem;10415} ).length;10416};1041710418104191042010421jQuery.offset = {10422setOffset: function( elem, options, i ) {10423var curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition,10424position = jQuery.css( elem, "position" ),10425curElem = jQuery( elem ),10426props = {};1042710428// Set position first, in-case top/left are set even on static elem10429if ( position === "static" ) {10430elem.style.position = "relative";10431}1043210433curOffset = curElem.offset();10434curCSSTop = jQuery.css( elem, "top" );10435curCSSLeft = jQuery.css( elem, "left" );10436calculatePosition = ( position === "absolute" || position === "fixed" ) &&10437( curCSSTop + curCSSLeft ).indexOf( "auto" ) > -1;1043810439// Need to be able to calculate position if either10440// top or left is auto and position is either absolute or fixed10441if ( calculatePosition ) {10442curPosition = curElem.position();10443curTop = curPosition.top;10444curLeft = curPosition.left;1044510446} else {10447curTop = parseFloat( curCSSTop ) || 0;10448curLeft = parseFloat( curCSSLeft ) || 0;10449}1045010451if ( isFunction( options ) ) {1045210453// Use jQuery.extend here to allow modification of coordinates argument (gh-1848)10454options = options.call( elem, i, jQuery.extend( {}, curOffset ) );10455}1045610457if ( options.top != null ) {10458props.top = ( options.top - curOffset.top ) + curTop;10459}10460if ( options.left != null ) {10461props.left = ( options.left - curOffset.left ) + curLeft;10462}1046310464if ( "using" in options ) {10465options.using.call( elem, props );1046610467} else {10468if ( typeof props.top === "number" ) {10469props.top += "px";10470}10471if ( typeof props.left === "number" ) {10472props.left += "px";10473}10474curElem.css( props );10475}10476}10477};1047810479jQuery.fn.extend( {1048010481// offset() relates an element's border box to the document origin10482offset: function( options ) {1048310484// Preserve chaining for setter10485if ( arguments.length ) {10486return options === undefined ?10487this :10488this.each( function( i ) {10489jQuery.offset.setOffset( this, options, i );10490} );10491}1049210493var rect, win,10494elem = this[ 0 ];1049510496if ( !elem ) {10497return;10498}1049910500// Return zeros for disconnected and hidden (display: none) elements (gh-2310)10501// Support: IE <=11 only10502// Running getBoundingClientRect on a10503// disconnected node in IE throws an error10504if ( !elem.getClientRects().length ) {10505return { top: 0, left: 0 };10506}1050710508// Get document-relative position by adding viewport scroll to viewport-relative gBCR10509rect = elem.getBoundingClientRect();10510win = elem.ownerDocument.defaultView;10511return {10512top: rect.top + win.pageYOffset,10513left: rect.left + win.pageXOffset10514};10515},1051610517// position() relates an element's margin box to its offset parent's padding box10518// This corresponds to the behavior of CSS absolute positioning10519position: function() {10520if ( !this[ 0 ] ) {10521return;10522}1052310524var offsetParent, offset, doc,10525elem = this[ 0 ],10526parentOffset = { top: 0, left: 0 };1052710528// position:fixed elements are offset from the viewport, which itself always has zero offset10529if ( jQuery.css( elem, "position" ) === "fixed" ) {1053010531// Assume position:fixed implies availability of getBoundingClientRect10532offset = elem.getBoundingClientRect();1053310534} else {10535offset = this.offset();1053610537// Account for the *real* offset parent, which can be the document or its root element10538// when a statically positioned element is identified10539doc = elem.ownerDocument;10540offsetParent = elem.offsetParent || doc.documentElement;10541while ( offsetParent &&10542( offsetParent === doc.body || offsetParent === doc.documentElement ) &&10543jQuery.css( offsetParent, "position" ) === "static" ) {1054410545offsetParent = offsetParent.parentNode;10546}10547if ( offsetParent && offsetParent !== elem && offsetParent.nodeType === 1 ) {1054810549// Incorporate borders into its offset, since they are outside its content origin10550parentOffset = jQuery( offsetParent ).offset();10551parentOffset.top += jQuery.css( offsetParent, "borderTopWidth", true );10552parentOffset.left += jQuery.css( offsetParent, "borderLeftWidth", true );10553}10554}1055510556// Subtract parent offsets and element margins10557return {10558top: offset.top - parentOffset.top - jQuery.css( elem, "marginTop", true ),10559left: offset.left - parentOffset.left - jQuery.css( elem, "marginLeft", true )10560};10561},1056210563// This method will return documentElement in the following cases:10564// 1) For the element inside the iframe without offsetParent, this method will return10565// documentElement of the parent window10566// 2) For the hidden or detached element10567// 3) For body or html element, i.e. in case of the html node - it will return itself10568//10569// but those exceptions were never presented as a real life use-cases10570// and might be considered as more preferable results.10571//10572// This logic, however, is not guaranteed and can change at any point in the future10573offsetParent: function() {10574return this.map( function() {10575var offsetParent = this.offsetParent;1057610577while ( offsetParent && jQuery.css( offsetParent, "position" ) === "static" ) {10578offsetParent = offsetParent.offsetParent;10579}1058010581return offsetParent || documentElement;10582} );10583}10584} );1058510586// Create scrollLeft and scrollTop methods10587jQuery.each( { scrollLeft: "pageXOffset", scrollTop: "pageYOffset" }, function( method, prop ) {10588var top = "pageYOffset" === prop;1058910590jQuery.fn[ method ] = function( val ) {10591return access( this, function( elem, method, val ) {1059210593// Coalesce documents and windows10594var win;10595if ( isWindow( elem ) ) {10596win = elem;10597} else if ( elem.nodeType === 9 ) {10598win = elem.defaultView;10599}1060010601if ( val === undefined ) {10602return win ? win[ prop ] : elem[ method ];10603}1060410605if ( win ) {10606win.scrollTo(10607!top ? val : win.pageXOffset,10608top ? val : win.pageYOffset10609);1061010611} else {10612elem[ method ] = val;10613}10614}, method, val, arguments.length );10615};10616} );1061710618// Support: Safari <=7 - 9.1, Chrome <=37 - 4910619// Add the top/left cssHooks using jQuery.fn.position10620// Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=2908410621// Blink bug: https://bugs.chromium.org/p/chromium/issues/detail?id=58934710622// getComputedStyle returns percent when specified for top/left/bottom/right;10623// rather than make the css module depend on the offset module, just check for it here10624jQuery.each( [ "top", "left" ], function( _i, prop ) {10625jQuery.cssHooks[ prop ] = addGetHookIf( support.pixelPosition,10626function( elem, computed ) {10627if ( computed ) {10628computed = curCSS( elem, prop );1062910630// If curCSS returns percentage, fallback to offset10631return rnumnonpx.test( computed ) ?10632jQuery( elem ).position()[ prop ] + "px" :10633computed;10634}10635}10636);10637} );106381063910640// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods10641jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {10642jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name },10643function( defaultExtra, funcName ) {1064410645// Margin is only for outerHeight, outerWidth10646jQuery.fn[ funcName ] = function( margin, value ) {10647var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ),10648extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" );1064910650return access( this, function( elem, type, value ) {10651var doc;1065210653if ( isWindow( elem ) ) {1065410655// $( window ).outerWidth/Height return w/h including scrollbars (gh-1729)10656return funcName.indexOf( "outer" ) === 0 ?10657elem[ "inner" + name ] :10658elem.document.documentElement[ "client" + name ];10659}1066010661// Get document width or height10662if ( elem.nodeType === 9 ) {10663doc = elem.documentElement;1066410665// Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height],10666// whichever is greatest10667return Math.max(10668elem.body[ "scroll" + name ], doc[ "scroll" + name ],10669elem.body[ "offset" + name ], doc[ "offset" + name ],10670doc[ "client" + name ]10671);10672}1067310674return value === undefined ?1067510676// Get width or height on the element, requesting but not forcing parseFloat10677jQuery.css( elem, type, extra ) :1067810679// Set width or height on the element10680jQuery.style( elem, type, value, extra );10681}, type, chainable ? margin : undefined, chainable );10682};10683} );10684} );106851068610687jQuery.each( [10688"ajaxStart",10689"ajaxStop",10690"ajaxComplete",10691"ajaxError",10692"ajaxSuccess",10693"ajaxSend"10694], function( _i, type ) {10695jQuery.fn[ type ] = function( fn ) {10696return this.on( type, fn );10697};10698} );1069910700107011070210703jQuery.fn.extend( {1070410705bind: function( types, data, fn ) {10706return this.on( types, null, data, fn );10707},10708unbind: function( types, fn ) {10709return this.off( types, null, fn );10710},1071110712delegate: function( selector, types, data, fn ) {10713return this.on( types, selector, data, fn );10714},10715undelegate: function( selector, types, fn ) {1071610717// ( namespace ) or ( selector, types [, fn] )10718return arguments.length === 1 ?10719this.off( selector, "**" ) :10720this.off( types, selector || "**", fn );10721},1072210723hover: function( fnOver, fnOut ) {10724return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );10725}10726} );1072710728jQuery.each( ( "blur focus focusin focusout resize scroll click dblclick " +10729"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +10730"change select submit keydown keypress keyup contextmenu" ).split( " " ),10731function( _i, name ) {1073210733// Handle event binding10734jQuery.fn[ name ] = function( data, fn ) {10735return arguments.length > 0 ?10736this.on( name, null, data, fn ) :10737this.trigger( name );10738};10739} );1074010741107421074310744// Support: Android <=4.0 only10745// Make sure we trim BOM and NBSP10746var rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;1074710748// Bind a function to a context, optionally partially applying any10749// arguments.10750// jQuery.proxy is deprecated to promote standards (specifically Function#bind)10751// However, it is not slated for removal any time soon10752jQuery.proxy = function( fn, context ) {10753var tmp, args, proxy;1075410755if ( typeof context === "string" ) {10756tmp = fn[ context ];10757context = fn;10758fn = tmp;10759}1076010761// Quick check to determine if target is callable, in the spec10762// this throws a TypeError, but we will just return undefined.10763if ( !isFunction( fn ) ) {10764return undefined;10765}1076610767// Simulated bind10768args = slice.call( arguments, 2 );10769proxy = function() {10770return fn.apply( context || this, args.concat( slice.call( arguments ) ) );10771};1077210773// Set the guid of unique handler to the same of original handler, so it can be removed10774proxy.guid = fn.guid = fn.guid || jQuery.guid++;1077510776return proxy;10777};1077810779jQuery.holdReady = function( hold ) {10780if ( hold ) {10781jQuery.readyWait++;10782} else {10783jQuery.ready( true );10784}10785};10786jQuery.isArray = Array.isArray;10787jQuery.parseJSON = JSON.parse;10788jQuery.nodeName = nodeName;10789jQuery.isFunction = isFunction;10790jQuery.isWindow = isWindow;10791jQuery.camelCase = camelCase;10792jQuery.type = toType;1079310794jQuery.now = Date.now;1079510796jQuery.isNumeric = function( obj ) {1079710798// As of jQuery 3.0, isNumeric is limited to10799// strings and numbers (primitives or objects)10800// that can be coerced to finite numbers (gh-2662)10801var type = jQuery.type( obj );10802return ( type === "number" || type === "string" ) &&1080310804// parseFloat NaNs numeric-cast false positives ("")10805// ...but misinterprets leading-number strings, particularly hex literals ("0x...")10806// subtraction forces infinities to NaN10807!isNaN( obj - parseFloat( obj ) );10808};1080910810jQuery.trim = function( text ) {10811return text == null ?10812"" :10813( text + "" ).replace( rtrim, "" );10814};10815108161081710818// Register as a named AMD module, since jQuery can be concatenated with other10819// files that may use define, but not via a proper concatenation script that10820// understands anonymous AMD modules. A named AMD is safest and most robust10821// way to register. Lowercase jquery is used because AMD module names are10822// derived from file names, and jQuery is normally delivered in a lowercase10823// file name. Do this after creating the global so that if an AMD module wants10824// to call noConflict to hide this version of jQuery, it will work.1082510826// Note that for maximum portability, libraries that are not jQuery should10827// declare themselves as anonymous modules, and avoid setting a global if an10828// AMD loader is present. jQuery is a special case. For more information, see10829// https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries#wiki-anon1083010831if ( typeof define === "function" && define.amd ) {10832define( "jquery", [], function() {10833return jQuery;10834} );10835}1083610837108381083910840var1084110842// Map over jQuery in case of overwrite10843_jQuery = window.jQuery,1084410845// Map over the $ in case of overwrite10846_$ = window.$;1084710848jQuery.noConflict = function( deep ) {10849if ( window.$ === jQuery ) {10850window.$ = _$;10851}1085210853if ( deep && window.jQuery === jQuery ) {10854window.jQuery = _jQuery;10855}1085610857return jQuery;10858};1085910860// Expose jQuery and $ identifiers, even in AMD10861// (#7102#comment:10, https://github.com/jquery/jquery/pull/557)10862// and CommonJS for browser emulators (#13566)10863if ( typeof noGlobal === "undefined" ) {10864window.jQuery = window.$ = jQuery;10865}1086610867108681086910870return jQuery;10871} );108721087310874