10416 lines
1.2 MiB
JavaScript
10416 lines
1.2 MiB
JavaScript
|
//////////////////////////////////////////////////////////////////////////
|
||
|
// //
|
||
|
// This is a generated file. You can view the original //
|
||
|
// source in your browser if your browser supports source maps. //
|
||
|
// //
|
||
|
// If you are using Chrome, open the Developer Tools and click the gear //
|
||
|
// icon in its lower right corner. In the General Settings panel, turn //
|
||
|
// on 'Enable source maps'. //
|
||
|
// //
|
||
|
// If you are using Firefox 23, go to `about:config` and set the //
|
||
|
// `devtools.debugger.source-maps-enabled` preference to true. //
|
||
|
// (The preference should be on by default in Firefox 24; versions //
|
||
|
// older than 23 do not support source maps.) //
|
||
|
// //
|
||
|
//////////////////////////////////////////////////////////////////////////
|
||
|
|
||
|
|
||
|
(function () {
|
||
|
|
||
|
/* Imports */
|
||
|
var Meteor = Package.meteor.Meteor;
|
||
|
|
||
|
/* Package-scope variables */
|
||
|
var $, jQuery;
|
||
|
|
||
|
(function () {
|
||
|
|
||
|
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||
|
// //
|
||
|
// packages/jquery/jquery.js //
|
||
|
// //
|
||
|
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||
|
//
|
||
|
/*! // 1
|
||
|
* jQuery JavaScript Library v1.11.2 // 2
|
||
|
* http://jquery.com/ // 3
|
||
|
* // 4
|
||
|
* Includes Sizzle.js // 5
|
||
|
* http://sizzlejs.com/ // 6
|
||
|
* // 7
|
||
|
* Copyright 2005, 2014 jQuery Foundation, Inc. and other contributors // 8
|
||
|
* Released under the MIT license // 9
|
||
|
* http://jquery.org/license // 10
|
||
|
* // 11
|
||
|
* Date: 2014-12-17T15:27Z // 12
|
||
|
*/ // 13
|
||
|
// 14
|
||
|
(function( global, factory ) { // 15
|
||
|
// 16
|
||
|
if ( typeof module === "object" && typeof module.exports === "object" ) { // 17
|
||
|
// For CommonJS and CommonJS-like environments where a proper window is present, // 18
|
||
|
// execute the factory and get jQuery // 19
|
||
|
// For environments that do not inherently posses a window with a document // 20
|
||
|
// (such as Node.js), expose a jQuery-making factory as module.exports // 21
|
||
|
// This accentuates the need for the creation of a real window // 22
|
||
|
// e.g. var jQuery = require("jquery")(window); // 23
|
||
|
// See ticket #14549 for more info // 24
|
||
|
module.exports = global.document ? // 25
|
||
|
factory( global, true ) : // 26
|
||
|
function( w ) { // 27
|
||
|
if ( !w.document ) { // 28
|
||
|
throw new Error( "jQuery requires a window with a document" ); // 29
|
||
|
} // 30
|
||
|
return factory( w ); // 31
|
||
|
}; // 32
|
||
|
} else { // 33
|
||
|
factory( global ); // 34
|
||
|
} // 35
|
||
|
// 36
|
||
|
// Pass this if window is not defined yet // 37
|
||
|
}(typeof window !== "undefined" ? window : this, function( window, noGlobal ) { // 38
|
||
|
// 39
|
||
|
// Can't do this because several apps including ASP.NET trace // 40
|
||
|
// the stack via arguments.caller.callee and Firefox dies if // 41
|
||
|
// you try to trace through "use strict" call chains. (#13335) // 42
|
||
|
// Support: Firefox 18+ // 43
|
||
|
// // 44
|
||
|
// 45
|
||
|
var deletedIds = []; // 46
|
||
|
// 47
|
||
|
var slice = deletedIds.slice; // 48
|
||
|
// 49
|
||
|
var concat = deletedIds.concat; // 50
|
||
|
// 51
|
||
|
var push = deletedIds.push; // 52
|
||
|
// 53
|
||
|
var indexOf = deletedIds.indexOf; // 54
|
||
|
// 55
|
||
|
var class2type = {}; // 56
|
||
|
// 57
|
||
|
var toString = class2type.toString; // 58
|
||
|
// 59
|
||
|
var hasOwn = class2type.hasOwnProperty; // 60
|
||
|
// 61
|
||
|
var support = {}; // 62
|
||
|
// 63
|
||
|
// 64
|
||
|
// 65
|
||
|
var // 66
|
||
|
version = "1.11.2", // 67
|
||
|
// 68
|
||
|
// Define a local copy of jQuery // 69
|
||
|
jQuery = function( selector, context ) { // 70
|
||
|
// The jQuery object is actually just the init constructor 'enhanced' // 71
|
||
|
// Need init if jQuery is called (just allow error to be thrown if not included) // 72
|
||
|
return new jQuery.fn.init( selector, context ); // 73
|
||
|
}, // 74
|
||
|
// 75
|
||
|
// Support: Android<4.1, IE<9 // 76
|
||
|
// Make sure we trim BOM and NBSP // 77
|
||
|
rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, // 78
|
||
|
// 79
|
||
|
// Matches dashed string for camelizing // 80
|
||
|
rmsPrefix = /^-ms-/, // 81
|
||
|
rdashAlpha = /-([\da-z])/gi, // 82
|
||
|
// 83
|
||
|
// Used by jQuery.camelCase as callback to replace() // 84
|
||
|
fcamelCase = function( all, letter ) { // 85
|
||
|
return letter.toUpperCase(); // 86
|
||
|
}; // 87
|
||
|
// 88
|
||
|
jQuery.fn = jQuery.prototype = { // 89
|
||
|
// The current version of jQuery being used // 90
|
||
|
jquery: version, // 91
|
||
|
// 92
|
||
|
constructor: jQuery, // 93
|
||
|
// 94
|
||
|
// Start with an empty selector // 95
|
||
|
selector: "", // 96
|
||
|
// 97
|
||
|
// The default length of a jQuery object is 0 // 98
|
||
|
length: 0, // 99
|
||
|
// 100
|
||
|
toArray: function() { // 101
|
||
|
return slice.call( this ); // 102
|
||
|
}, // 103
|
||
|
// 104
|
||
|
// Get the Nth element in the matched element set OR // 105
|
||
|
// Get the whole matched element set as a clean array // 106
|
||
|
get: function( num ) { // 107
|
||
|
return num != null ? // 108
|
||
|
// 109
|
||
|
// Return just the one element from the set // 110
|
||
|
( num < 0 ? this[ num + this.length ] : this[ num ] ) : // 111
|
||
|
// 112
|
||
|
// Return all the elements in a clean array // 113
|
||
|
slice.call( this ); // 114
|
||
|
}, // 115
|
||
|
// 116
|
||
|
// Take an array of elements and push it onto the stack // 117
|
||
|
// (returning the new matched element set) // 118
|
||
|
pushStack: function( elems ) { // 119
|
||
|
// 120
|
||
|
// Build a new jQuery matched element set // 121
|
||
|
var ret = jQuery.merge( this.constructor(), elems ); // 122
|
||
|
// 123
|
||
|
// Add the old object onto the stack (as a reference) // 124
|
||
|
ret.prevObject = this; // 125
|
||
|
ret.context = this.context; // 126
|
||
|
// 127
|
||
|
// Return the newly-formed element set // 128
|
||
|
return ret; // 129
|
||
|
}, // 130
|
||
|
// 131
|
||
|
// Execute a callback for every element in the matched set. // 132
|
||
|
// (You can seed the arguments with an array of args, but this is // 133
|
||
|
// only used internally.) // 134
|
||
|
each: function( callback, args ) { // 135
|
||
|
return jQuery.each( this, callback, args ); // 136
|
||
|
}, // 137
|
||
|
// 138
|
||
|
map: function( callback ) { // 139
|
||
|
return this.pushStack( jQuery.map(this, function( elem, i ) { // 140
|
||
|
return callback.call( elem, i, elem ); // 141
|
||
|
})); // 142
|
||
|
}, // 143
|
||
|
// 144
|
||
|
slice: function() { // 145
|
||
|
return this.pushStack( slice.apply( this, arguments ) ); // 146
|
||
|
}, // 147
|
||
|
// 148
|
||
|
first: function() { // 149
|
||
|
return this.eq( 0 ); // 150
|
||
|
}, // 151
|
||
|
// 152
|
||
|
last: function() { // 153
|
||
|
return this.eq( -1 ); // 154
|
||
|
}, // 155
|
||
|
// 156
|
||
|
eq: function( i ) { // 157
|
||
|
var len = this.length, // 158
|
||
|
j = +i + ( i < 0 ? len : 0 ); // 159
|
||
|
return this.pushStack( j >= 0 && j < len ? [ this[j] ] : [] ); // 160
|
||
|
}, // 161
|
||
|
// 162
|
||
|
end: function() { // 163
|
||
|
return this.prevObject || this.constructor(null); // 164
|
||
|
}, // 165
|
||
|
// 166
|
||
|
// For internal use only. // 167
|
||
|
// Behaves like an Array's method, not like a jQuery method. // 168
|
||
|
push: push, // 169
|
||
|
sort: deletedIds.sort, // 170
|
||
|
splice: deletedIds.splice // 171
|
||
|
}; // 172
|
||
|
// 173
|
||
|
jQuery.extend = jQuery.fn.extend = function() { // 174
|
||
|
var src, copyIsArray, copy, name, options, clone, // 175
|
||
|
target = arguments[0] || {}, // 176
|
||
|
i = 1, // 177
|
||
|
length = arguments.length, // 178
|
||
|
deep = false; // 179
|
||
|
// 180
|
||
|
// Handle a deep copy situation // 181
|
||
|
if ( typeof target === "boolean" ) { // 182
|
||
|
deep = target; // 183
|
||
|
// 184
|
||
|
// skip the boolean and the target // 185
|
||
|
target = arguments[ i ] || {}; // 186
|
||
|
i++; // 187
|
||
|
} // 188
|
||
|
// 189
|
||
|
// Handle case when target is a string or something (possible in deep copy) // 190
|
||
|
if ( typeof target !== "object" && !jQuery.isFunction(target) ) { // 191
|
||
|
target = {}; // 192
|
||
|
} // 193
|
||
|
// 194
|
||
|
// extend jQuery itself if only one argument is passed // 195
|
||
|
if ( i === length ) { // 196
|
||
|
target = this; // 197
|
||
|
i--; // 198
|
||
|
} // 199
|
||
|
// 200
|
||
|
for ( ; i < length; i++ ) { // 201
|
||
|
// Only deal with non-null/undefined values // 202
|
||
|
if ( (options = arguments[ i ]) != null ) { // 203
|
||
|
// Extend the base object // 204
|
||
|
for ( name in options ) { // 205
|
||
|
src = target[ name ]; // 206
|
||
|
copy = options[ name ]; // 207
|
||
|
// 208
|
||
|
// Prevent never-ending loop // 209
|
||
|
if ( target === copy ) { // 210
|
||
|
continue; // 211
|
||
|
} // 212
|
||
|
// 213
|
||
|
// Recurse if we're merging plain objects or arrays // 214
|
||
|
if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) { // 215
|
||
|
if ( copyIsArray ) { // 216
|
||
|
copyIsArray = false; // 217
|
||
|
clone = src && jQuery.isArray(src) ? src : []; // 218
|
||
|
// 219
|
||
|
} else { // 220
|
||
|
clone = src && jQuery.isPlainObject(src) ? src : {}; // 221
|
||
|
} // 222
|
||
|
// 223
|
||
|
// Never move original objects, clone them // 224
|
||
|
target[ name ] = jQuery.extend( deep, clone, copy ); // 225
|
||
|
// 226
|
||
|
// Don't bring in undefined values // 227
|
||
|
} else if ( copy !== undefined ) { // 228
|
||
|
target[ name ] = copy; // 229
|
||
|
} // 230
|
||
|
} // 231
|
||
|
} // 232
|
||
|
} // 233
|
||
|
// 234
|
||
|
// Return the modified object // 235
|
||
|
return target; // 236
|
||
|
}; // 237
|
||
|
// 238
|
||
|
jQuery.extend({ // 239
|
||
|
// Unique for each copy of jQuery on the page // 240
|
||
|
expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ), // 241
|
||
|
// 242
|
||
|
// Assume jQuery is ready without the ready module // 243
|
||
|
isReady: true, // 244
|
||
|
// 245
|
||
|
error: function( msg ) { // 246
|
||
|
throw new Error( msg ); // 247
|
||
|
}, // 248
|
||
|
// 249
|
||
|
noop: function() {}, // 250
|
||
|
// 251
|
||
|
// See test/unit/core.js for details concerning isFunction. // 252
|
||
|
// Since version 1.3, DOM methods and functions like alert // 253
|
||
|
// aren't supported. They return false on IE (#2968). // 254
|
||
|
isFunction: function( obj ) { // 255
|
||
|
return jQuery.type(obj) === "function"; // 256
|
||
|
}, // 257
|
||
|
// 258
|
||
|
isArray: Array.isArray || function( obj ) { // 259
|
||
|
return jQuery.type(obj) === "array"; // 260
|
||
|
}, // 261
|
||
|
// 262
|
||
|
isWindow: function( obj ) { // 263
|
||
|
/* jshint eqeqeq: false */ // 264
|
||
|
return obj != null && obj == obj.window; // 265
|
||
|
}, // 266
|
||
|
// 267
|
||
|
isNumeric: function( obj ) { // 268
|
||
|
// parseFloat NaNs numeric-cast false positives (null|true|false|"") // 269
|
||
|
// ...but misinterprets leading-number strings, particularly hex literals ("0x...") // 270
|
||
|
// subtraction forces infinities to NaN // 271
|
||
|
// adding 1 corrects loss of precision from parseFloat (#15100) // 272
|
||
|
return !jQuery.isArray( obj ) && (obj - parseFloat( obj ) + 1) >= 0; // 273
|
||
|
}, // 274
|
||
|
// 275
|
||
|
isEmptyObject: function( obj ) { // 276
|
||
|
var name; // 277
|
||
|
for ( name in obj ) { // 278
|
||
|
return false; // 279
|
||
|
} // 280
|
||
|
return true; // 281
|
||
|
}, // 282
|
||
|
// 283
|
||
|
isPlainObject: function( obj ) { // 284
|
||
|
var key; // 285
|
||
|
// 286
|
||
|
// Must be an Object. // 287
|
||
|
// Because of IE, we also have to check the presence of the constructor property. // 288
|
||
|
// Make sure that DOM nodes and window objects don't pass through, as well // 289
|
||
|
if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) { // 290
|
||
|
return false; // 291
|
||
|
} // 292
|
||
|
// 293
|
||
|
try { // 294
|
||
|
// Not own constructor property must be Object // 295
|
||
|
if ( obj.constructor && // 296
|
||
|
!hasOwn.call(obj, "constructor") && // 297
|
||
|
!hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) { // 298
|
||
|
return false; // 299
|
||
|
} // 300
|
||
|
} catch ( e ) { // 301
|
||
|
// IE8,9 Will throw exceptions on certain host objects #9897 // 302
|
||
|
return false; // 303
|
||
|
} // 304
|
||
|
// 305
|
||
|
// Support: IE<9 // 306
|
||
|
// Handle iteration over inherited properties before own properties. // 307
|
||
|
if ( support.ownLast ) { // 308
|
||
|
for ( key in obj ) { // 309
|
||
|
return hasOwn.call( obj, key ); // 310
|
||
|
} // 311
|
||
|
} // 312
|
||
|
// 313
|
||
|
// Own properties are enumerated firstly, so to speed up, // 314
|
||
|
// if last one is own, then all properties are own. // 315
|
||
|
for ( key in obj ) {} // 316
|
||
|
// 317
|
||
|
return key === undefined || hasOwn.call( obj, key ); // 318
|
||
|
}, // 319
|
||
|
// 320
|
||
|
type: function( obj ) { // 321
|
||
|
if ( obj == null ) { // 322
|
||
|
return obj + ""; // 323
|
||
|
} // 324
|
||
|
return typeof obj === "object" || typeof obj === "function" ? // 325
|
||
|
class2type[ toString.call(obj) ] || "object" : // 326
|
||
|
typeof obj; // 327
|
||
|
}, // 328
|
||
|
// 329
|
||
|
// Evaluates a script in a global context // 330
|
||
|
// Workarounds based on findings by Jim Driscoll // 331
|
||
|
// http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context // 332
|
||
|
globalEval: function( data ) { // 333
|
||
|
if ( data && jQuery.trim( data ) ) { // 334
|
||
|
// We use execScript on Internet Explorer // 335
|
||
|
// We use an anonymous function so that context is window // 336
|
||
|
// rather than jQuery in Firefox // 337
|
||
|
( window.execScript || function( data ) { // 338
|
||
|
window[ "eval" ].call( window, data ); // 339
|
||
|
} )( data ); // 340
|
||
|
} // 341
|
||
|
}, // 342
|
||
|
// 343
|
||
|
// Convert dashed to camelCase; used by the css and data modules // 344
|
||
|
// Microsoft forgot to hump their vendor prefix (#9572) // 345
|
||
|
camelCase: function( string ) { // 346
|
||
|
return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); // 347
|
||
|
}, // 348
|
||
|
// 349
|
||
|
nodeName: function( elem, name ) { // 350
|
||
|
return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); // 351
|
||
|
}, // 352
|
||
|
// 353
|
||
|
// args is for internal usage only // 354
|
||
|
each: function( obj, callback, args ) { // 355
|
||
|
var value, // 356
|
||
|
i = 0, // 357
|
||
|
length = obj.length, // 358
|
||
|
isArray = isArraylike( obj ); // 359
|
||
|
// 360
|
||
|
if ( args ) { // 361
|
||
|
if ( isArray ) { // 362
|
||
|
for ( ; i < length; i++ ) { // 363
|
||
|
value = callback.apply( obj[ i ], args ); // 364
|
||
|
// 365
|
||
|
if ( value === false ) { // 366
|
||
|
break; // 367
|
||
|
} // 368
|
||
|
} // 369
|
||
|
} else { // 370
|
||
|
for ( i in obj ) { // 371
|
||
|
value = callback.apply( obj[ i ], args ); // 372
|
||
|
// 373
|
||
|
if ( value === false ) { // 374
|
||
|
break; // 375
|
||
|
} // 376
|
||
|
} // 377
|
||
|
} // 378
|
||
|
// 379
|
||
|
// A special, fast, case for the most common use of each // 380
|
||
|
} else { // 381
|
||
|
if ( isArray ) { // 382
|
||
|
for ( ; i < length; i++ ) { // 383
|
||
|
value = callback.call( obj[ i ], i, obj[ i ] ); // 384
|
||
|
// 385
|
||
|
if ( value === false ) { // 386
|
||
|
break; // 387
|
||
|
} // 388
|
||
|
} // 389
|
||
|
} else { // 390
|
||
|
for ( i in obj ) { // 391
|
||
|
value = callback.call( obj[ i ], i, obj[ i ] ); // 392
|
||
|
// 393
|
||
|
if ( value === false ) { // 394
|
||
|
break; // 395
|
||
|
} // 396
|
||
|
} // 397
|
||
|
} // 398
|
||
|
} // 399
|
||
|
// 400
|
||
|
return obj; // 401
|
||
|
}, // 402
|
||
|
// 403
|
||
|
// Support: Android<4.1, IE<9 // 404
|
||
|
trim: function( text ) { // 405
|
||
|
return text == null ? // 406
|
||
|
"" : // 407
|
||
|
( text + "" ).replace( rtrim, "" ); // 408
|
||
|
}, // 409
|
||
|
// 410
|
||
|
// results is for internal usage only // 411
|
||
|
makeArray: function( arr, results ) { // 412
|
||
|
var ret = results || []; // 413
|
||
|
// 414
|
||
|
if ( arr != null ) { // 415
|
||
|
if ( isArraylike( Object(arr) ) ) { // 416
|
||
|
jQuery.merge( ret, // 417
|
||
|
typeof arr === "string" ? // 418
|
||
|
[ arr ] : arr // 419
|
||
|
); // 420
|
||
|
} else { // 421
|
||
|
push.call( ret, arr ); // 422
|
||
|
} // 423
|
||
|
} // 424
|
||
|
// 425
|
||
|
return ret; // 426
|
||
|
}, // 427
|
||
|
// 428
|
||
|
inArray: function( elem, arr, i ) { // 429
|
||
|
var len; // 430
|
||
|
// 431
|
||
|
if ( arr ) { // 432
|
||
|
if ( indexOf ) { // 433
|
||
|
return indexOf.call( arr, elem, i ); // 434
|
||
|
} // 435
|
||
|
// 436
|
||
|
len = arr.length; // 437
|
||
|
i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0; // 438
|
||
|
// 439
|
||
|
for ( ; i < len; i++ ) { // 440
|
||
|
// Skip accessing in sparse arrays // 441
|
||
|
if ( i in arr && arr[ i ] === elem ) { // 442
|
||
|
return i; // 443
|
||
|
} // 444
|
||
|
} // 445
|
||
|
} // 446
|
||
|
// 447
|
||
|
return -1; // 448
|
||
|
}, // 449
|
||
|
// 450
|
||
|
merge: function( first, second ) { // 451
|
||
|
var len = +second.length, // 452
|
||
|
j = 0, // 453
|
||
|
i = first.length; // 454
|
||
|
// 455
|
||
|
while ( j < len ) { // 456
|
||
|
first[ i++ ] = second[ j++ ]; // 457
|
||
|
} // 458
|
||
|
// 459
|
||
|
// Support: IE<9 // 460
|
||
|
// Workaround casting of .length to NaN on otherwise arraylike objects (e.g., NodeLists) // 461
|
||
|
if ( len !== len ) { // 462
|
||
|
while ( second[j] !== undefined ) { // 463
|
||
|
first[ i++ ] = second[ j++ ]; // 464
|
||
|
} // 465
|
||
|
} // 466
|
||
|
// 467
|
||
|
first.length = i; // 468
|
||
|
// 469
|
||
|
return first; // 470
|
||
|
}, // 471
|
||
|
// 472
|
||
|
grep: function( elems, callback, invert ) { // 473
|
||
|
var callbackInverse, // 474
|
||
|
matches = [], // 475
|
||
|
i = 0, // 476
|
||
|
length = elems.length, // 477
|
||
|
callbackExpect = !invert; // 478
|
||
|
// 479
|
||
|
// Go through the array, only saving the items // 480
|
||
|
// that pass the validator function // 481
|
||
|
for ( ; i < length; i++ ) { // 482
|
||
|
callbackInverse = !callback( elems[ i ], i ); // 483
|
||
|
if ( callbackInverse !== callbackExpect ) { // 484
|
||
|
matches.push( elems[ i ] ); // 485
|
||
|
} // 486
|
||
|
} // 487
|
||
|
// 488
|
||
|
return matches; // 489
|
||
|
}, // 490
|
||
|
// 491
|
||
|
// arg is for internal usage only // 492
|
||
|
map: function( elems, callback, arg ) { // 493
|
||
|
var value, // 494
|
||
|
i = 0, // 495
|
||
|
length = elems.length, // 496
|
||
|
isArray = isArraylike( elems ), // 497
|
||
|
ret = []; // 498
|
||
|
// 499
|
||
|
// Go through the array, translating each of the items to their new values // 500
|
||
|
if ( isArray ) { // 501
|
||
|
for ( ; i < length; i++ ) { // 502
|
||
|
value = callback( elems[ i ], i, arg ); // 503
|
||
|
// 504
|
||
|
if ( value != null ) { // 505
|
||
|
ret.push( value ); // 506
|
||
|
} // 507
|
||
|
} // 508
|
||
|
// 509
|
||
|
// Go through every key on the object, // 510
|
||
|
} else { // 511
|
||
|
for ( i in elems ) { // 512
|
||
|
value = callback( elems[ i ], i, arg ); // 513
|
||
|
// 514
|
||
|
if ( value != null ) { // 515
|
||
|
ret.push( value ); // 516
|
||
|
} // 517
|
||
|
} // 518
|
||
|
} // 519
|
||
|
// 520
|
||
|
// Flatten any nested arrays // 521
|
||
|
return concat.apply( [], ret ); // 522
|
||
|
}, // 523
|
||
|
// 524
|
||
|
// A global GUID counter for objects // 525
|
||
|
guid: 1, // 526
|
||
|
// 527
|
||
|
// Bind a function to a context, optionally partially applying any // 528
|
||
|
// arguments. // 529
|
||
|
proxy: function( fn, context ) { // 530
|
||
|
var args, proxy, tmp; // 531
|
||
|
// 532
|
||
|
if ( typeof context === "string" ) { // 533
|
||
|
tmp = fn[ context ]; // 534
|
||
|
context = fn; // 535
|
||
|
fn = tmp; // 536
|
||
|
} // 537
|
||
|
// 538
|
||
|
// Quick check to determine if target is callable, in the spec // 539
|
||
|
// this throws a TypeError, but we will just return undefined. // 540
|
||
|
if ( !jQuery.isFunction( fn ) ) { // 541
|
||
|
return undefined; // 542
|
||
|
} // 543
|
||
|
// 544
|
||
|
// Simulated bind // 545
|
||
|
args = slice.call( arguments, 2 ); // 546
|
||
|
proxy = function() { // 547
|
||
|
return fn.apply( context || this, args.concat( slice.call( arguments ) ) ); // 548
|
||
|
}; // 549
|
||
|
// 550
|
||
|
// Set the guid of unique handler to the same of original handler, so it can be removed // 551
|
||
|
proxy.guid = fn.guid = fn.guid || jQuery.guid++; // 552
|
||
|
// 553
|
||
|
return proxy; // 554
|
||
|
}, // 555
|
||
|
// 556
|
||
|
now: function() { // 557
|
||
|
return +( new Date() ); // 558
|
||
|
}, // 559
|
||
|
// 560
|
||
|
// jQuery.support is not used in Core but other projects attach their // 561
|
||
|
// properties to it so it needs to exist. // 562
|
||
|
support: support // 563
|
||
|
}); // 564
|
||
|
// 565
|
||
|
// Populate the class2type map // 566
|
||
|
jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, name) { // 567
|
||
|
class2type[ "[object " + name + "]" ] = name.toLowerCase(); // 568
|
||
|
}); // 569
|
||
|
// 570
|
||
|
function isArraylike( obj ) { // 571
|
||
|
var length = obj.length, // 572
|
||
|
type = jQuery.type( obj ); // 573
|
||
|
// 574
|
||
|
if ( type === "function" || jQuery.isWindow( obj ) ) { // 575
|
||
|
return false; // 576
|
||
|
} // 577
|
||
|
// 578
|
||
|
if ( obj.nodeType === 1 && length ) { // 579
|
||
|
return true; // 580
|
||
|
} // 581
|
||
|
// 582
|
||
|
return type === "array" || length === 0 || // 583
|
||
|
typeof length === "number" && length > 0 && ( length - 1 ) in obj; // 584
|
||
|
} // 585
|
||
|
var Sizzle = // 586
|
||
|
/*! // 587
|
||
|
* Sizzle CSS Selector Engine v2.2.0-pre // 588
|
||
|
* http://sizzlejs.com/ // 589
|
||
|
* // 590
|
||
|
* Copyright 2008, 2014 jQuery Foundation, Inc. and other contributors // 591
|
||
|
* Released under the MIT license // 592
|
||
|
* http://jquery.org/license // 593
|
||
|
* // 594
|
||
|
* Date: 2014-12-16 // 595
|
||
|
*/ // 596
|
||
|
(function( window ) { // 597
|
||
|
// 598
|
||
|
var i, // 599
|
||
|
support, // 600
|
||
|
Expr, // 601
|
||
|
getText, // 602
|
||
|
isXML, // 603
|
||
|
tokenize, // 604
|
||
|
compile, // 605
|
||
|
select, // 606
|
||
|
outermostContext, // 607
|
||
|
sortInput, // 608
|
||
|
hasDuplicate, // 609
|
||
|
// 610
|
||
|
// Local document vars // 611
|
||
|
setDocument, // 612
|
||
|
document, // 613
|
||
|
docElem, // 614
|
||
|
documentIsHTML, // 615
|
||
|
rbuggyQSA, // 616
|
||
|
rbuggyMatches, // 617
|
||
|
matches, // 618
|
||
|
contains, // 619
|
||
|
// 620
|
||
|
// Instance-specific data // 621
|
||
|
expando = "sizzle" + 1 * new Date(), // 622
|
||
|
preferredDoc = window.document, // 623
|
||
|
dirruns = 0, // 624
|
||
|
done = 0, // 625
|
||
|
classCache = createCache(), // 626
|
||
|
tokenCache = createCache(), // 627
|
||
|
compilerCache = createCache(), // 628
|
||
|
sortOrder = function( a, b ) { // 629
|
||
|
if ( a === b ) { // 630
|
||
|
hasDuplicate = true; // 631
|
||
|
} // 632
|
||
|
return 0; // 633
|
||
|
}, // 634
|
||
|
// 635
|
||
|
// General-purpose constants // 636
|
||
|
MAX_NEGATIVE = 1 << 31, // 637
|
||
|
// 638
|
||
|
// Instance methods // 639
|
||
|
hasOwn = ({}).hasOwnProperty, // 640
|
||
|
arr = [], // 641
|
||
|
pop = arr.pop, // 642
|
||
|
push_native = arr.push, // 643
|
||
|
push = arr.push, // 644
|
||
|
slice = arr.slice, // 645
|
||
|
// Use a stripped-down indexOf as it's faster than native // 646
|
||
|
// http://jsperf.com/thor-indexof-vs-for/5 // 647
|
||
|
indexOf = function( list, elem ) { // 648
|
||
|
var i = 0, // 649
|
||
|
len = list.length; // 650
|
||
|
for ( ; i < len; i++ ) { // 651
|
||
|
if ( list[i] === elem ) { // 652
|
||
|
return i; // 653
|
||
|
} // 654
|
||
|
} // 655
|
||
|
return -1; // 656
|
||
|
}, // 657
|
||
|
// 658
|
||
|
booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",
|
||
|
// 660
|
||
|
// Regular expressions // 661
|
||
|
// 662
|
||
|
// Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace // 663
|
||
|
whitespace = "[\\x20\\t\\r\\n\\f]", // 664
|
||
|
// http://www.w3.org/TR/css3-syntax/#characters // 665
|
||
|
characterEncoding = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+", // 666
|
||
|
// 667
|
||
|
// Loosely modeled on CSS identifier characters // 668
|
||
|
// An unquoted value should be a CSS identifier http://www.w3.org/TR/css3-selectors/#attribute-selectors // 669
|
||
|
// Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier // 670
|
||
|
identifier = characterEncoding.replace( "w", "w#" ), // 671
|
||
|
// 672
|
||
|
// Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors // 673
|
||
|
attributes = "\\[" + whitespace + "*(" + characterEncoding + ")(?:" + whitespace + // 674
|
||
|
// Operator (capture 2) // 675
|
||
|
"*([*^$|!~]?=)" + whitespace + // 676
|
||
|
// "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]" // 677
|
||
|
"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace + // 678
|
||
|
"*\\]", // 679
|
||
|
// 680
|
||
|
pseudos = ":(" + characterEncoding + ")(?:\\((" + // 681
|
||
|
// To reduce the number of selectors needing tokenize in the preFilter, prefer arguments: // 682
|
||
|
// 1. quoted (capture 3; capture 4 or capture 5) // 683
|
||
|
"('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" + // 684
|
||
|
// 2. simple (capture 6) // 685
|
||
|
"((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" + // 686
|
||
|
// 3. anything else (capture 2) // 687
|
||
|
".*" + // 688
|
||
|
")\\)|)", // 689
|
||
|
// 690
|
||
|
// Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter // 691
|
||
|
rwhitespace = new RegExp( whitespace + "+", "g" ), // 692
|
||
|
rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ), // 693
|
||
|
// 694
|
||
|
rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), // 695
|
||
|
rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ), // 696
|
||
|
// 697
|
||
|
rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*?)" + whitespace + "*\\]", "g" ), // 698
|
||
|
// 699
|
||
|
rpseudo = new RegExp( pseudos ), // 700
|
||
|
ridentifier = new RegExp( "^" + identifier + "$" ), // 701
|
||
|
// 702
|
||
|
matchExpr = { // 703
|
||
|
"ID": new RegExp( "^#(" + characterEncoding + ")" ), // 704
|
||
|
"CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ), // 705
|
||
|
"TAG": new RegExp( "^(" + characterEncoding.replace( "w", "w*" ) + ")" ), // 706
|
||
|
"ATTR": new RegExp( "^" + attributes ), // 707
|
||
|
"PSEUDO": new RegExp( "^" + pseudos ), // 708
|
||
|
"CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace + // 709
|
||
|
"*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + // 710
|
||
|
"*(\\d+)|))" + whitespace + "*\\)|)", "i" ), // 711
|
||
|
"bool": new RegExp( "^(?:" + booleans + ")$", "i" ), // 712
|
||
|
// For use in libraries implementing .is() // 713
|
||
|
// We use this for POS matching in `select` // 714
|
||
|
"needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + // 715
|
||
|
whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" ) // 716
|
||
|
}, // 717
|
||
|
// 718
|
||
|
rinputs = /^(?:input|select|textarea|button)$/i, // 719
|
||
|
rheader = /^h\d$/i, // 720
|
||
|
// 721
|
||
|
rnative = /^[^{]+\{\s*\[native \w/, // 722
|
||
|
// 723
|
||
|
// Easily-parseable/retrievable ID or TAG or CLASS selectors // 724
|
||
|
rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, // 725
|
||
|
// 726
|
||
|
rsibling = /[+~]/, // 727
|
||
|
rescape = /'|\\/g, // 728
|
||
|
// 729
|
||
|
// CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters // 730
|
||
|
runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ), // 731
|
||
|
funescape = function( _, escaped, escapedWhitespace ) { // 732
|
||
|
var high = "0x" + escaped - 0x10000; // 733
|
||
|
// NaN means non-codepoint // 734
|
||
|
// Support: Firefox<24 // 735
|
||
|
// Workaround erroneous numeric interpretation of +"0x" // 736
|
||
|
return high !== high || escapedWhitespace ? // 737
|
||
|
escaped : // 738
|
||
|
high < 0 ? // 739
|
||
|
// BMP codepoint // 740
|
||
|
String.fromCharCode( high + 0x10000 ) : // 741
|
||
|
// Supplemental Plane codepoint (surrogate pair) // 742
|
||
|
String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); // 743
|
||
|
}, // 744
|
||
|
// 745
|
||
|
// Used for iframes // 746
|
||
|
// See setDocument() // 747
|
||
|
// Removing the function wrapper causes a "Permission Denied" // 748
|
||
|
// error in IE // 749
|
||
|
unloadHandler = function() { // 750
|
||
|
setDocument(); // 751
|
||
|
}; // 752
|
||
|
// 753
|
||
|
// Optimize for push.apply( _, NodeList ) // 754
|
||
|
try { // 755
|
||
|
push.apply( // 756
|
||
|
(arr = slice.call( preferredDoc.childNodes )), // 757
|
||
|
preferredDoc.childNodes // 758
|
||
|
); // 759
|
||
|
// Support: Android<4.0 // 760
|
||
|
// Detect silently failing push.apply // 761
|
||
|
arr[ preferredDoc.childNodes.length ].nodeType; // 762
|
||
|
} catch ( e ) { // 763
|
||
|
push = { apply: arr.length ? // 764
|
||
|
// 765
|
||
|
// Leverage slice if possible // 766
|
||
|
function( target, els ) { // 767
|
||
|
push_native.apply( target, slice.call(els) ); // 768
|
||
|
} : // 769
|
||
|
// 770
|
||
|
// Support: IE<9 // 771
|
||
|
// Otherwise append directly // 772
|
||
|
function( target, els ) { // 773
|
||
|
var j = target.length, // 774
|
||
|
i = 0; // 775
|
||
|
// Can't trust NodeList.length // 776
|
||
|
while ( (target[j++] = els[i++]) ) {} // 777
|
||
|
target.length = j - 1; // 778
|
||
|
} // 779
|
||
|
}; // 780
|
||
|
} // 781
|
||
|
// 782
|
||
|
function Sizzle( selector, context, results, seed ) { // 783
|
||
|
var match, elem, m, nodeType, // 784
|
||
|
// QSA vars // 785
|
||
|
i, groups, old, nid, newContext, newSelector; // 786
|
||
|
// 787
|
||
|
if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) { // 788
|
||
|
setDocument( context ); // 789
|
||
|
} // 790
|
||
|
// 791
|
||
|
context = context || document; // 792
|
||
|
results = results || []; // 793
|
||
|
nodeType = context.nodeType; // 794
|
||
|
// 795
|
||
|
if ( typeof selector !== "string" || !selector || // 796
|
||
|
nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) { // 797
|
||
|
// 798
|
||
|
return results; // 799
|
||
|
} // 800
|
||
|
// 801
|
||
|
if ( !seed && documentIsHTML ) { // 802
|
||
|
// 803
|
||
|
// Try to shortcut find operations when possible (e.g., not under DocumentFragment) // 804
|
||
|
if ( nodeType !== 11 && (match = rquickExpr.exec( selector )) ) { // 805
|
||
|
// Speed-up: Sizzle("#ID") // 806
|
||
|
if ( (m = match[1]) ) { // 807
|
||
|
if ( nodeType === 9 ) { // 808
|
||
|
elem = context.getElementById( m ); // 809
|
||
|
// Check parentNode to catch when Blackberry 4.6 returns // 810
|
||
|
// nodes that are no longer in the document (jQuery #6963) // 811
|
||
|
if ( elem && elem.parentNode ) { // 812
|
||
|
// Handle the case where IE, Opera, and Webkit return items // 813
|
||
|
// by name instead of ID // 814
|
||
|
if ( elem.id === m ) { // 815
|
||
|
results.push( elem ); // 816
|
||
|
return results; // 817
|
||
|
} // 818
|
||
|
} else { // 819
|
||
|
return results; // 820
|
||
|
} // 821
|
||
|
} else { // 822
|
||
|
// Context is not a document // 823
|
||
|
if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) && // 824
|
||
|
contains( context, elem ) && elem.id === m ) { // 825
|
||
|
results.push( elem ); // 826
|
||
|
return results; // 827
|
||
|
} // 828
|
||
|
} // 829
|
||
|
// 830
|
||
|
// Speed-up: Sizzle("TAG") // 831
|
||
|
} else if ( match[2] ) { // 832
|
||
|
push.apply( results, context.getElementsByTagName( selector ) ); // 833
|
||
|
return results; // 834
|
||
|
// 835
|
||
|
// Speed-up: Sizzle(".CLASS") // 836
|
||
|
} else if ( (m = match[3]) && support.getElementsByClassName ) { // 837
|
||
|
push.apply( results, context.getElementsByClassName( m ) ); // 838
|
||
|
return results; // 839
|
||
|
} // 840
|
||
|
} // 841
|
||
|
// 842
|
||
|
// QSA path // 843
|
||
|
if ( support.qsa && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) { // 844
|
||
|
nid = old = expando; // 845
|
||
|
newContext = context; // 846
|
||
|
newSelector = nodeType !== 1 && selector; // 847
|
||
|
// 848
|
||
|
// qSA works strangely on Element-rooted queries // 849
|
||
|
// We can work around this by specifying an extra ID on the root // 850
|
||
|
// and working up from there (Thanks to Andrew Dupont for the technique) // 851
|
||
|
// IE 8 doesn't work on object elements // 852
|
||
|
if ( nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) { // 853
|
||
|
groups = tokenize( selector ); // 854
|
||
|
// 855
|
||
|
if ( (old = context.getAttribute("id")) ) { // 856
|
||
|
nid = old.replace( rescape, "\\$&" ); // 857
|
||
|
} else { // 858
|
||
|
context.setAttribute( "id", nid ); // 859
|
||
|
} // 860
|
||
|
nid = "[id='" + nid + "'] "; // 861
|
||
|
// 862
|
||
|
i = groups.length; // 863
|
||
|
while ( i-- ) { // 864
|
||
|
groups[i] = nid + toSelector( groups[i] ); // 865
|
||
|
} // 866
|
||
|
newContext = rsibling.test( selector ) && testContext( context.parentNode ) || context; // 867
|
||
|
newSelector = groups.join(","); // 868
|
||
|
} // 869
|
||
|
// 870
|
||
|
if ( newSelector ) { // 871
|
||
|
try { // 872
|
||
|
push.apply( results, // 873
|
||
|
newContext.querySelectorAll( newSelector ) // 874
|
||
|
); // 875
|
||
|
return results; // 876
|
||
|
} catch(qsaError) { // 877
|
||
|
} finally { // 878
|
||
|
if ( !old ) { // 879
|
||
|
context.removeAttribute("id"); // 880
|
||
|
} // 881
|
||
|
} // 882
|
||
|
} // 883
|
||
|
} // 884
|
||
|
} // 885
|
||
|
// 886
|
||
|
// All others // 887
|
||
|
return select( selector.replace( rtrim, "$1" ), context, results, seed ); // 888
|
||
|
} // 889
|
||
|
// 890
|
||
|
/** // 891
|
||
|
* Create key-value caches of limited size // 892
|
||
|
* @returns {Function(string, Object)} Returns the Object data after storing it on itself with // 893
|
||
|
* property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) // 894
|
||
|
* deleting the oldest entry // 895
|
||
|
*/ // 896
|
||
|
function createCache() { // 897
|
||
|
var keys = []; // 898
|
||
|
// 899
|
||
|
function cache( key, value ) { // 900
|
||
|
// Use (key + " ") to avoid collision with native prototype properties (see Issue #157) // 901
|
||
|
if ( keys.push( key + " " ) > Expr.cacheLength ) { // 902
|
||
|
// Only keep the most recent entries // 903
|
||
|
delete cache[ keys.shift() ]; // 904
|
||
|
} // 905
|
||
|
return (cache[ key + " " ] = value); // 906
|
||
|
} // 907
|
||
|
return cache; // 908
|
||
|
} // 909
|
||
|
// 910
|
||
|
/** // 911
|
||
|
* Mark a function for special use by Sizzle // 912
|
||
|
* @param {Function} fn The function to mark // 913
|
||
|
*/ // 914
|
||
|
function markFunction( fn ) { // 915
|
||
|
fn[ expando ] = true; // 916
|
||
|
return fn; // 917
|
||
|
} // 918
|
||
|
// 919
|
||
|
/** // 920
|
||
|
* Support testing using an element // 921
|
||
|
* @param {Function} fn Passed the created div and expects a boolean result // 922
|
||
|
*/ // 923
|
||
|
function assert( fn ) { // 924
|
||
|
var div = document.createElement("div"); // 925
|
||
|
// 926
|
||
|
try { // 927
|
||
|
return !!fn( div ); // 928
|
||
|
} catch (e) { // 929
|
||
|
return false; // 930
|
||
|
} finally { // 931
|
||
|
// Remove from its parent by default // 932
|
||
|
if ( div.parentNode ) { // 933
|
||
|
div.parentNode.removeChild( div ); // 934
|
||
|
} // 935
|
||
|
// release memory in IE // 936
|
||
|
div = null; // 937
|
||
|
} // 938
|
||
|
} // 939
|
||
|
// 940
|
||
|
/** // 941
|
||
|
* Adds the same handler for all of the specified attrs // 942
|
||
|
* @param {String} attrs Pipe-separated list of attributes // 943
|
||
|
* @param {Function} handler The method that will be applied // 944
|
||
|
*/ // 945
|
||
|
function addHandle( attrs, handler ) { // 946
|
||
|
var arr = attrs.split("|"), // 947
|
||
|
i = attrs.length; // 948
|
||
|
// 949
|
||
|
while ( i-- ) { // 950
|
||
|
Expr.attrHandle[ arr[i] ] = handler; // 951
|
||
|
} // 952
|
||
|
} // 953
|
||
|
// 954
|
||
|
/** // 955
|
||
|
* Checks document order of two siblings // 956
|
||
|
* @param {Element} a // 957
|
||
|
* @param {Element} b // 958
|
||
|
* @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b // 959
|
||
|
*/ // 960
|
||
|
function siblingCheck( a, b ) { // 961
|
||
|
var cur = b && a, // 962
|
||
|
diff = cur && a.nodeType === 1 && b.nodeType === 1 && // 963
|
||
|
( ~b.sourceIndex || MAX_NEGATIVE ) - // 964
|
||
|
( ~a.sourceIndex || MAX_NEGATIVE ); // 965
|
||
|
// 966
|
||
|
// Use IE sourceIndex if available on both nodes // 967
|
||
|
if ( diff ) { // 968
|
||
|
return diff; // 969
|
||
|
} // 970
|
||
|
// 971
|
||
|
// Check if b follows a // 972
|
||
|
if ( cur ) { // 973
|
||
|
while ( (cur = cur.nextSibling) ) { // 974
|
||
|
if ( cur === b ) { // 975
|
||
|
return -1; // 976
|
||
|
} // 977
|
||
|
} // 978
|
||
|
} // 979
|
||
|
// 980
|
||
|
return a ? 1 : -1; // 981
|
||
|
} // 982
|
||
|
// 983
|
||
|
/** // 984
|
||
|
* Returns a function to use in pseudos for input types // 985
|
||
|
* @param {String} type // 986
|
||
|
*/ // 987
|
||
|
function createInputPseudo( type ) { // 988
|
||
|
return function( elem ) { // 989
|
||
|
var name = elem.nodeName.toLowerCase(); // 990
|
||
|
return name === "input" && elem.type === type; // 991
|
||
|
}; // 992
|
||
|
} // 993
|
||
|
// 994
|
||
|
/** // 995
|
||
|
* Returns a function to use in pseudos for buttons // 996
|
||
|
* @param {String} type // 997
|
||
|
*/ // 998
|
||
|
function createButtonPseudo( type ) { // 999
|
||
|
return function( elem ) { // 1000
|
||
|
var name = elem.nodeName.toLowerCase(); // 1001
|
||
|
return (name === "input" || name === "button") && elem.type === type; // 1002
|
||
|
}; // 1003
|
||
|
} // 1004
|
||
|
// 1005
|
||
|
/** // 1006
|
||
|
* Returns a function to use in pseudos for positionals // 1007
|
||
|
* @param {Function} fn // 1008
|
||
|
*/ // 1009
|
||
|
function createPositionalPseudo( fn ) { // 1010
|
||
|
return markFunction(function( argument ) { // 1011
|
||
|
argument = +argument; // 1012
|
||
|
return markFunction(function( seed, matches ) { // 1013
|
||
|
var j, // 1014
|
||
|
matchIndexes = fn( [], seed.length, argument ), // 1015
|
||
|
i = matchIndexes.length; // 1016
|
||
|
// 1017
|
||
|
// Match elements found at the specified indexes // 1018
|
||
|
while ( i-- ) { // 1019
|
||
|
if ( seed[ (j = matchIndexes[i]) ] ) { // 1020
|
||
|
seed[j] = !(matches[j] = seed[j]); // 1021
|
||
|
} // 1022
|
||
|
} // 1023
|
||
|
}); // 1024
|
||
|
}); // 1025
|
||
|
} // 1026
|
||
|
// 1027
|
||
|
/** // 1028
|
||
|
* Checks a node for validity as a Sizzle context // 1029
|
||
|
* @param {Element|Object=} context // 1030
|
||
|
* @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value // 1031
|
||
|
*/ // 1032
|
||
|
function testContext( context ) { // 1033
|
||
|
return context && typeof context.getElementsByTagName !== "undefined" && context; // 1034
|
||
|
} // 1035
|
||
|
// 1036
|
||
|
// Expose support vars for convenience // 1037
|
||
|
support = Sizzle.support = {}; // 1038
|
||
|
// 1039
|
||
|
/** // 1040
|
||
|
* Detects XML nodes // 1041
|
||
|
* @param {Element|Object} elem An element or a document // 1042
|
||
|
* @returns {Boolean} True iff elem is a non-HTML XML node // 1043
|
||
|
*/ // 1044
|
||
|
isXML = Sizzle.isXML = function( elem ) { // 1045
|
||
|
// documentElement is verified for cases where it doesn't yet exist // 1046
|
||
|
// (such as loading iframes in IE - #4833) // 1047
|
||
|
var documentElement = elem && (elem.ownerDocument || elem).documentElement; // 1048
|
||
|
return documentElement ? documentElement.nodeName !== "HTML" : false; // 1049
|
||
|
}; // 1050
|
||
|
// 1051
|
||
|
/** // 1052
|
||
|
* Sets document-related variables once based on the current document // 1053
|
||
|
* @param {Element|Object} [doc] An element or document object to use to set the document // 1054
|
||
|
* @returns {Object} Returns the current document // 1055
|
||
|
*/ // 1056
|
||
|
setDocument = Sizzle.setDocument = function( node ) { // 1057
|
||
|
var hasCompare, parent, // 1058
|
||
|
doc = node ? node.ownerDocument || node : preferredDoc; // 1059
|
||
|
// 1060
|
||
|
// If no document and documentElement is available, return // 1061
|
||
|
if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) { // 1062
|
||
|
return document; // 1063
|
||
|
} // 1064
|
||
|
// 1065
|
||
|
// Set our document // 1066
|
||
|
document = doc; // 1067
|
||
|
docElem = doc.documentElement; // 1068
|
||
|
parent = doc.defaultView; // 1069
|
||
|
// 1070
|
||
|
// Support: IE>8 // 1071
|
||
|
// If iframe document is assigned to "document" variable and if iframe has been reloaded, // 1072
|
||
|
// IE will throw "permission denied" error when accessing "document" variable, see jQuery #13936 // 1073
|
||
|
// IE6-8 do not support the defaultView property so parent will be undefined // 1074
|
||
|
if ( parent && parent !== parent.top ) { // 1075
|
||
|
// IE11 does not have attachEvent, so all must suffer // 1076
|
||
|
if ( parent.addEventListener ) { // 1077
|
||
|
parent.addEventListener( "unload", unloadHandler, false ); // 1078
|
||
|
} else if ( parent.attachEvent ) { // 1079
|
||
|
parent.attachEvent( "onunload", unloadHandler ); // 1080
|
||
|
} // 1081
|
||
|
} // 1082
|
||
|
// 1083
|
||
|
/* Support tests // 1084
|
||
|
---------------------------------------------------------------------- */ // 1085
|
||
|
documentIsHTML = !isXML( doc ); // 1086
|
||
|
// 1087
|
||
|
/* Attributes // 1088
|
||
|
---------------------------------------------------------------------- */ // 1089
|
||
|
// 1090
|
||
|
// Support: IE<8 // 1091
|
||
|
// Verify that getAttribute really returns attributes and not properties // 1092
|
||
|
// (excepting IE8 booleans) // 1093
|
||
|
support.attributes = assert(function( div ) { // 1094
|
||
|
div.className = "i"; // 1095
|
||
|
return !div.getAttribute("className"); // 1096
|
||
|
}); // 1097
|
||
|
// 1098
|
||
|
/* getElement(s)By* // 1099
|
||
|
---------------------------------------------------------------------- */ // 1100
|
||
|
// 1101
|
||
|
// Check if getElementsByTagName("*") returns only elements // 1102
|
||
|
support.getElementsByTagName = assert(function( div ) { // 1103
|
||
|
div.appendChild( doc.createComment("") ); // 1104
|
||
|
return !div.getElementsByTagName("*").length; // 1105
|
||
|
}); // 1106
|
||
|
// 1107
|
||
|
// Support: IE<9 // 1108
|
||
|
support.getElementsByClassName = rnative.test( doc.getElementsByClassName ); // 1109
|
||
|
// 1110
|
||
|
// Support: IE<10 // 1111
|
||
|
// Check if getElementById returns elements by name // 1112
|
||
|
// The broken getElementById methods don't pick up programatically-set names, // 1113
|
||
|
// so use a roundabout getElementsByName test // 1114
|
||
|
support.getById = assert(function( div ) { // 1115
|
||
|
docElem.appendChild( div ).id = expando; // 1116
|
||
|
return !doc.getElementsByName || !doc.getElementsByName( expando ).length; // 1117
|
||
|
}); // 1118
|
||
|
// 1119
|
||
|
// ID find and filter // 1120
|
||
|
if ( support.getById ) { // 1121
|
||
|
Expr.find["ID"] = function( id, context ) { // 1122
|
||
|
if ( typeof context.getElementById !== "undefined" && documentIsHTML ) { // 1123
|
||
|
var m = context.getElementById( id ); // 1124
|
||
|
// Check parentNode to catch when Blackberry 4.6 returns // 1125
|
||
|
// nodes that are no longer in the document #6963 // 1126
|
||
|
return m && m.parentNode ? [ m ] : []; // 1127
|
||
|
} // 1128
|
||
|
}; // 1129
|
||
|
Expr.filter["ID"] = function( id ) { // 1130
|
||
|
var attrId = id.replace( runescape, funescape ); // 1131
|
||
|
return function( elem ) { // 1132
|
||
|
return elem.getAttribute("id") === attrId; // 1133
|
||
|
}; // 1134
|
||
|
}; // 1135
|
||
|
} else { // 1136
|
||
|
// Support: IE6/7 // 1137
|
||
|
// getElementById is not reliable as a find shortcut // 1138
|
||
|
delete Expr.find["ID"]; // 1139
|
||
|
// 1140
|
||
|
Expr.filter["ID"] = function( id ) { // 1141
|
||
|
var attrId = id.replace( runescape, funescape ); // 1142
|
||
|
return function( elem ) { // 1143
|
||
|
var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id"); // 1144
|
||
|
return node && node.value === attrId; // 1145
|
||
|
}; // 1146
|
||
|
}; // 1147
|
||
|
} // 1148
|
||
|
// 1149
|
||
|
// Tag // 1150
|
||
|
Expr.find["TAG"] = support.getElementsByTagName ? // 1151
|
||
|
function( tag, context ) { // 1152
|
||
|
if ( typeof context.getElementsByTagName !== "undefined" ) { // 1153
|
||
|
return context.getElementsByTagName( tag ); // 1154
|
||
|
// 1155
|
||
|
// DocumentFragment nodes don't have gEBTN // 1156
|
||
|
} else if ( support.qsa ) { // 1157
|
||
|
return context.querySelectorAll( tag ); // 1158
|
||
|
} // 1159
|
||
|
} : // 1160
|
||
|
// 1161
|
||
|
function( tag, context ) { // 1162
|
||
|
var elem, // 1163
|
||
|
tmp = [], // 1164
|
||
|
i = 0, // 1165
|
||
|
// By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too // 1166
|
||
|
results = context.getElementsByTagName( tag ); // 1167
|
||
|
// 1168
|
||
|
// Filter out possible comments // 1169
|
||
|
if ( tag === "*" ) { // 1170
|
||
|
while ( (elem = results[i++]) ) { // 1171
|
||
|
if ( elem.nodeType === 1 ) { // 1172
|
||
|
tmp.push( elem ); // 1173
|
||
|
} // 1174
|
||
|
} // 1175
|
||
|
// 1176
|
||
|
return tmp; // 1177
|
||
|
} // 1178
|
||
|
return results; // 1179
|
||
|
}; // 1180
|
||
|
// 1181
|
||
|
// Class // 1182
|
||
|
Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) { // 1183
|
||
|
if ( documentIsHTML ) { // 1184
|
||
|
return context.getElementsByClassName( className ); // 1185
|
||
|
} // 1186
|
||
|
}; // 1187
|
||
|
// 1188
|
||
|
/* QSA/matchesSelector // 1189
|
||
|
---------------------------------------------------------------------- */ // 1190
|
||
|
// 1191
|
||
|
// QSA and matchesSelector support // 1192
|
||
|
// 1193
|
||
|
// matchesSelector(:active) reports false when true (IE9/Opera 11.5) // 1194
|
||
|
rbuggyMatches = []; // 1195
|
||
|
// 1196
|
||
|
// qSa(:focus) reports false when true (Chrome 21) // 1197
|
||
|
// We allow this because of a bug in IE8/9 that throws an error // 1198
|
||
|
// whenever `document.activeElement` is accessed on an iframe // 1199
|
||
|
// So, we allow :focus to pass through QSA all the time to avoid the IE error // 1200
|
||
|
// See http://bugs.jquery.com/ticket/13378 // 1201
|
||
|
rbuggyQSA = []; // 1202
|
||
|
// 1203
|
||
|
if ( (support.qsa = rnative.test( doc.querySelectorAll )) ) { // 1204
|
||
|
// Build QSA regex // 1205
|
||
|
// Regex strategy adopted from Diego Perini // 1206
|
||
|
assert(function( div ) { // 1207
|
||
|
// Select is set to empty string on purpose // 1208
|
||
|
// This is to test IE's treatment of not explicitly // 1209
|
||
|
// setting a boolean content attribute, // 1210
|
||
|
// since its presence should be enough // 1211
|
||
|
// http://bugs.jquery.com/ticket/12359 // 1212
|
||
|
docElem.appendChild( div ).innerHTML = "<a id='" + expando + "'></a>" + // 1213
|
||
|
"<select id='" + expando + "-\f]' msallowcapture=''>" + // 1214
|
||
|
"<option selected=''></option></select>"; // 1215
|
||
|
// 1216
|
||
|
// Support: IE8, Opera 11-12.16 // 1217
|
||
|
// Nothing should be selected when empty strings follow ^= or $= or *= // 1218
|
||
|
// The test attribute must be unknown in Opera but "safe" for WinRT // 1219
|
||
|
// http://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section // 1220
|
||
|
if ( div.querySelectorAll("[msallowcapture^='']").length ) { // 1221
|
||
|
rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" ); // 1222
|
||
|
} // 1223
|
||
|
// 1224
|
||
|
// Support: IE8 // 1225
|
||
|
// Boolean attributes and "value" are not treated correctly // 1226
|
||
|
if ( !div.querySelectorAll("[selected]").length ) { // 1227
|
||
|
rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" ); // 1228
|
||
|
} // 1229
|
||
|
// 1230
|
||
|
// Support: Chrome<29, Android<4.2+, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.7+ // 1231
|
||
|
if ( !div.querySelectorAll( "[id~=" + expando + "-]" ).length ) { // 1232
|
||
|
rbuggyQSA.push("~="); // 1233
|
||
|
} // 1234
|
||
|
// 1235
|
||
|
// Webkit/Opera - :checked should return selected option elements // 1236
|
||
|
// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked // 1237
|
||
|
// IE8 throws error here and will not see later tests // 1238
|
||
|
if ( !div.querySelectorAll(":checked").length ) { // 1239
|
||
|
rbuggyQSA.push(":checked"); // 1240
|
||
|
} // 1241
|
||
|
// 1242
|
||
|
// Support: Safari 8+, iOS 8+ // 1243
|
||
|
// https://bugs.webkit.org/show_bug.cgi?id=136851 // 1244
|
||
|
// In-page `selector#id sibing-combinator selector` fails // 1245
|
||
|
if ( !div.querySelectorAll( "a#" + expando + "+*" ).length ) { // 1246
|
||
|
rbuggyQSA.push(".#.+[+~]"); // 1247
|
||
|
} // 1248
|
||
|
}); // 1249
|
||
|
// 1250
|
||
|
assert(function( div ) { // 1251
|
||
|
// Support: Windows 8 Native Apps // 1252
|
||
|
// The type and name attributes are restricted during .innerHTML assignment // 1253
|
||
|
var input = doc.createElement("input"); // 1254
|
||
|
input.setAttribute( "type", "hidden" ); // 1255
|
||
|
div.appendChild( input ).setAttribute( "name", "D" ); // 1256
|
||
|
// 1257
|
||
|
// Support: IE8 // 1258
|
||
|
// Enforce case-sensitivity of name attribute // 1259
|
||
|
if ( div.querySelectorAll("[name=d]").length ) { // 1260
|
||
|
rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" ); // 1261
|
||
|
} // 1262
|
||
|
// 1263
|
||
|
// FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) // 1264
|
||
|
// IE8 throws error here and will not see later tests // 1265
|
||
|
if ( !div.querySelectorAll(":enabled").length ) { // 1266
|
||
|
rbuggyQSA.push( ":enabled", ":disabled" ); // 1267
|
||
|
} // 1268
|
||
|
// 1269
|
||
|
// Opera 10-11 does not throw on post-comma invalid pseudos // 1270
|
||
|
div.querySelectorAll("*,:x"); // 1271
|
||
|
rbuggyQSA.push(",.*:"); // 1272
|
||
|
}); // 1273
|
||
|
} // 1274
|
||
|
// 1275
|
||
|
if ( (support.matchesSelector = rnative.test( (matches = docElem.matches || // 1276
|
||
|
docElem.webkitMatchesSelector || // 1277
|
||
|
docElem.mozMatchesSelector || // 1278
|
||
|
docElem.oMatchesSelector || // 1279
|
||
|
docElem.msMatchesSelector) )) ) { // 1280
|
||
|
// 1281
|
||
|
assert(function( div ) { // 1282
|
||
|
// Check to see if it's possible to do matchesSelector // 1283
|
||
|
// on a disconnected node (IE 9) // 1284
|
||
|
support.disconnectedMatch = matches.call( div, "div" ); // 1285
|
||
|
// 1286
|
||
|
// This should fail with an exception // 1287
|
||
|
// Gecko does not error, returns false instead // 1288
|
||
|
matches.call( div, "[s!='']:x" ); // 1289
|
||
|
rbuggyMatches.push( "!=", pseudos ); // 1290
|
||
|
}); // 1291
|
||
|
} // 1292
|
||
|
// 1293
|
||
|
rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") ); // 1294
|
||
|
rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") ); // 1295
|
||
|
// 1296
|
||
|
/* Contains // 1297
|
||
|
---------------------------------------------------------------------- */ // 1298
|
||
|
hasCompare = rnative.test( docElem.compareDocumentPosition ); // 1299
|
||
|
// 1300
|
||
|
// Element contains another // 1301
|
||
|
// Purposefully does not implement inclusive descendent // 1302
|
||
|
// As in, an element does not contain itself // 1303
|
||
|
contains = hasCompare || rnative.test( docElem.contains ) ? // 1304
|
||
|
function( a, b ) { // 1305
|
||
|
var adown = a.nodeType === 9 ? a.documentElement : a, // 1306
|
||
|
bup = b && b.parentNode; // 1307
|
||
|
return a === bup || !!( bup && bup.nodeType === 1 && ( // 1308
|
||
|
adown.contains ? // 1309
|
||
|
adown.contains( bup ) : // 1310
|
||
|
a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16 // 1311
|
||
|
)); // 1312
|
||
|
} : // 1313
|
||
|
function( a, b ) { // 1314
|
||
|
if ( b ) { // 1315
|
||
|
while ( (b = b.parentNode) ) { // 1316
|
||
|
if ( b === a ) { // 1317
|
||
|
return true; // 1318
|
||
|
} // 1319
|
||
|
} // 1320
|
||
|
} // 1321
|
||
|
return false; // 1322
|
||
|
}; // 1323
|
||
|
// 1324
|
||
|
/* Sorting // 1325
|
||
|
---------------------------------------------------------------------- */ // 1326
|
||
|
// 1327
|
||
|
// Document order sorting // 1328
|
||
|
sortOrder = hasCompare ? // 1329
|
||
|
function( a, b ) { // 1330
|
||
|
// 1331
|
||
|
// Flag for duplicate removal // 1332
|
||
|
if ( a === b ) { // 1333
|
||
|
hasDuplicate = true; // 1334
|
||
|
return 0; // 1335
|
||
|
} // 1336
|
||
|
// 1337
|
||
|
// Sort on method existence if only one input has compareDocumentPosition // 1338
|
||
|
var compare = !a.compareDocumentPosition - !b.compareDocumentPosition; // 1339
|
||
|
if ( compare ) { // 1340
|
||
|
return compare; // 1341
|
||
|
} // 1342
|
||
|
// 1343
|
||
|
// Calculate position if both inputs belong to the same document // 1344
|
||
|
compare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ? // 1345
|
||
|
a.compareDocumentPosition( b ) : // 1346
|
||
|
// 1347
|
||
|
// Otherwise we know they are disconnected // 1348
|
||
|
1; // 1349
|
||
|
// 1350
|
||
|
// Disconnected nodes // 1351
|
||
|
if ( compare & 1 || // 1352
|
||
|
(!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) { // 1353
|
||
|
// 1354
|
||
|
// Choose the first element that is related to our preferred document // 1355
|
||
|
if ( a === doc || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) { // 1356
|
||
|
return -1; // 1357
|
||
|
} // 1358
|
||
|
if ( b === doc || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) { // 1359
|
||
|
return 1; // 1360
|
||
|
} // 1361
|
||
|
// 1362
|
||
|
// Maintain original order // 1363
|
||
|
return sortInput ? // 1364
|
||
|
( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : // 1365
|
||
|
0; // 1366
|
||
|
} // 1367
|
||
|
// 1368
|
||
|
return compare & 4 ? -1 : 1; // 1369
|
||
|
} : // 1370
|
||
|
function( a, b ) { // 1371
|
||
|
// Exit early if the nodes are identical // 1372
|
||
|
if ( a === b ) { // 1373
|
||
|
hasDuplicate = true; // 1374
|
||
|
return 0; // 1375
|
||
|
} // 1376
|
||
|
// 1377
|
||
|
var cur, // 1378
|
||
|
i = 0, // 1379
|
||
|
aup = a.parentNode, // 1380
|
||
|
bup = b.parentNode, // 1381
|
||
|
ap = [ a ], // 1382
|
||
|
bp = [ b ]; // 1383
|
||
|
// 1384
|
||
|
// Parentless nodes are either documents or disconnected // 1385
|
||
|
if ( !aup || !bup ) { // 1386
|
||
|
return a === doc ? -1 : // 1387
|
||
|
b === doc ? 1 : // 1388
|
||
|
aup ? -1 : // 1389
|
||
|
bup ? 1 : // 1390
|
||
|
sortInput ? // 1391
|
||
|
( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : // 1392
|
||
|
0; // 1393
|
||
|
// 1394
|
||
|
// If the nodes are siblings, we can do a quick check // 1395
|
||
|
} else if ( aup === bup ) { // 1396
|
||
|
return siblingCheck( a, b ); // 1397
|
||
|
} // 1398
|
||
|
// 1399
|
||
|
// Otherwise we need full lists of their ancestors for comparison // 1400
|
||
|
cur = a; // 1401
|
||
|
while ( (cur = cur.parentNode) ) { // 1402
|
||
|
ap.unshift( cur ); // 1403
|
||
|
} // 1404
|
||
|
cur = b; // 1405
|
||
|
while ( (cur = cur.parentNode) ) { // 1406
|
||
|
bp.unshift( cur ); // 1407
|
||
|
} // 1408
|
||
|
// 1409
|
||
|
// Walk down the tree looking for a discrepancy // 1410
|
||
|
while ( ap[i] === bp[i] ) { // 1411
|
||
|
i++; // 1412
|
||
|
} // 1413
|
||
|
// 1414
|
||
|
return i ? // 1415
|
||
|
// Do a sibling check if the nodes have a common ancestor // 1416
|
||
|
siblingCheck( ap[i], bp[i] ) : // 1417
|
||
|
// 1418
|
||
|
// Otherwise nodes in our document sort first // 1419
|
||
|
ap[i] === preferredDoc ? -1 : // 1420
|
||
|
bp[i] === preferredDoc ? 1 : // 1421
|
||
|
0; // 1422
|
||
|
}; // 1423
|
||
|
// 1424
|
||
|
return doc; // 1425
|
||
|
}; // 1426
|
||
|
// 1427
|
||
|
Sizzle.matches = function( expr, elements ) { // 1428
|
||
|
return Sizzle( expr, null, null, elements ); // 1429
|
||
|
}; // 1430
|
||
|
// 1431
|
||
|
Sizzle.matchesSelector = function( elem, expr ) { // 1432
|
||
|
// Set document vars if needed // 1433
|
||
|
if ( ( elem.ownerDocument || elem ) !== document ) { // 1434
|
||
|
setDocument( elem ); // 1435
|
||
|
} // 1436
|
||
|
// 1437
|
||
|
// Make sure that attribute selectors are quoted // 1438
|
||
|
expr = expr.replace( rattributeQuotes, "='$1']" ); // 1439
|
||
|
// 1440
|
||
|
if ( support.matchesSelector && documentIsHTML && // 1441
|
||
|
( !rbuggyMatches || !rbuggyMatches.test( expr ) ) && // 1442
|
||
|
( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) { // 1443
|
||
|
// 1444
|
||
|
try { // 1445
|
||
|
var ret = matches.call( elem, expr ); // 1446
|
||
|
// 1447
|
||
|
// IE 9's matchesSelector returns false on disconnected nodes // 1448
|
||
|
if ( ret || support.disconnectedMatch || // 1449
|
||
|
// As well, disconnected nodes are said to be in a document // 1450
|
||
|
// fragment in IE 9 // 1451
|
||
|
elem.document && elem.document.nodeType !== 11 ) { // 1452
|
||
|
return ret; // 1453
|
||
|
} // 1454
|
||
|
} catch (e) {} // 1455
|
||
|
} // 1456
|
||
|
// 1457
|
||
|
return Sizzle( expr, document, null, [ elem ] ).length > 0; // 1458
|
||
|
}; // 1459
|
||
|
// 1460
|
||
|
Sizzle.contains = function( context, elem ) { // 1461
|
||
|
// Set document vars if needed // 1462
|
||
|
if ( ( context.ownerDocument || context ) !== document ) { // 1463
|
||
|
setDocument( context ); // 1464
|
||
|
} // 1465
|
||
|
return contains( context, elem ); // 1466
|
||
|
}; // 1467
|
||
|
// 1468
|
||
|
Sizzle.attr = function( elem, name ) { // 1469
|
||
|
// Set document vars if needed // 1470
|
||
|
if ( ( elem.ownerDocument || elem ) !== document ) { // 1471
|
||
|
setDocument( elem ); // 1472
|
||
|
} // 1473
|
||
|
// 1474
|
||
|
var fn = Expr.attrHandle[ name.toLowerCase() ], // 1475
|
||
|
// Don't get fooled by Object.prototype properties (jQuery #13807) // 1476
|
||
|
val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ? // 1477
|
||
|
fn( elem, name, !documentIsHTML ) : // 1478
|
||
|
undefined; // 1479
|
||
|
// 1480
|
||
|
return val !== undefined ? // 1481
|
||
|
val : // 1482
|
||
|
support.attributes || !documentIsHTML ? // 1483
|
||
|
elem.getAttribute( name ) : // 1484
|
||
|
(val = elem.getAttributeNode(name)) && val.specified ? // 1485
|
||
|
val.value : // 1486
|
||
|
null; // 1487
|
||
|
}; // 1488
|
||
|
// 1489
|
||
|
Sizzle.error = function( msg ) { // 1490
|
||
|
throw new Error( "Syntax error, unrecognized expression: " + msg ); // 1491
|
||
|
}; // 1492
|
||
|
// 1493
|
||
|
/** // 1494
|
||
|
* Document sorting and removing duplicates // 1495
|
||
|
* @param {ArrayLike} results // 1496
|
||
|
*/ // 1497
|
||
|
Sizzle.uniqueSort = function( results ) { // 1498
|
||
|
var elem, // 1499
|
||
|
duplicates = [], // 1500
|
||
|
j = 0, // 1501
|
||
|
i = 0; // 1502
|
||
|
// 1503
|
||
|
// Unless we *know* we can detect duplicates, assume their presence // 1504
|
||
|
hasDuplicate = !support.detectDuplicates; // 1505
|
||
|
sortInput = !support.sortStable && results.slice( 0 ); // 1506
|
||
|
results.sort( sortOrder ); // 1507
|
||
|
// 1508
|
||
|
if ( hasDuplicate ) { // 1509
|
||
|
while ( (elem = results[i++]) ) { // 1510
|
||
|
if ( elem === results[ i ] ) { // 1511
|
||
|
j = duplicates.push( i ); // 1512
|
||
|
} // 1513
|
||
|
} // 1514
|
||
|
while ( j-- ) { // 1515
|
||
|
results.splice( duplicates[ j ], 1 ); // 1516
|
||
|
} // 1517
|
||
|
} // 1518
|
||
|
// 1519
|
||
|
// Clear input after sorting to release objects // 1520
|
||
|
// See https://github.com/jquery/sizzle/pull/225 // 1521
|
||
|
sortInput = null; // 1522
|
||
|
// 1523
|
||
|
return results; // 1524
|
||
|
}; // 1525
|
||
|
// 1526
|
||
|
/** // 1527
|
||
|
* Utility function for retrieving the text value of an array of DOM nodes // 1528
|
||
|
* @param {Array|Element} elem // 1529
|
||
|
*/ // 1530
|
||
|
getText = Sizzle.getText = function( elem ) { // 1531
|
||
|
var node, // 1532
|
||
|
ret = "", // 1533
|
||
|
i = 0, // 1534
|
||
|
nodeType = elem.nodeType; // 1535
|
||
|
// 1536
|
||
|
if ( !nodeType ) { // 1537
|
||
|
// If no nodeType, this is expected to be an array // 1538
|
||
|
while ( (node = elem[i++]) ) { // 1539
|
||
|
// Do not traverse comment nodes // 1540
|
||
|
ret += getText( node ); // 1541
|
||
|
} // 1542
|
||
|
} else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { // 1543
|
||
|
// Use textContent for elements // 1544
|
||
|
// innerText usage removed for consistency of new lines (jQuery #11153) // 1545
|
||
|
if ( typeof elem.textContent === "string" ) { // 1546
|
||
|
return elem.textContent; // 1547
|
||
|
} else { // 1548
|
||
|
// Traverse its children // 1549
|
||
|
for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { // 1550
|
||
|
ret += getText( elem ); // 1551
|
||
|
} // 1552
|
||
|
} // 1553
|
||
|
} else if ( nodeType === 3 || nodeType === 4 ) { // 1554
|
||
|
return elem.nodeValue; // 1555
|
||
|
} // 1556
|
||
|
// Do not include comment or processing instruction nodes // 1557
|
||
|
// 1558
|
||
|
return ret; // 1559
|
||
|
}; // 1560
|
||
|
// 1561
|
||
|
Expr = Sizzle.selectors = { // 1562
|
||
|
// 1563
|
||
|
// Can be adjusted by the user // 1564
|
||
|
cacheLength: 50, // 1565
|
||
|
// 1566
|
||
|
createPseudo: markFunction, // 1567
|
||
|
// 1568
|
||
|
match: matchExpr, // 1569
|
||
|
// 1570
|
||
|
attrHandle: {}, // 1571
|
||
|
// 1572
|
||
|
find: {}, // 1573
|
||
|
// 1574
|
||
|
relative: { // 1575
|
||
|
">": { dir: "parentNode", first: true }, // 1576
|
||
|
" ": { dir: "parentNode" }, // 1577
|
||
|
"+": { dir: "previousSibling", first: true }, // 1578
|
||
|
"~": { dir: "previousSibling" } // 1579
|
||
|
}, // 1580
|
||
|
// 1581
|
||
|
preFilter: { // 1582
|
||
|
"ATTR": function( match ) { // 1583
|
||
|
match[1] = match[1].replace( runescape, funescape ); // 1584
|
||
|
// 1585
|
||
|
// Move the given value to match[3] whether quoted or unquoted // 1586
|
||
|
match[3] = ( match[3] || match[4] || match[5] || "" ).replace( runescape, funescape ); // 1587
|
||
|
// 1588
|
||
|
if ( match[2] === "~=" ) { // 1589
|
||
|
match[3] = " " + match[3] + " "; // 1590
|
||
|
} // 1591
|
||
|
// 1592
|
||
|
return match.slice( 0, 4 ); // 1593
|
||
|
}, // 1594
|
||
|
// 1595
|
||
|
"CHILD": function( match ) { // 1596
|
||
|
/* matches from matchExpr["CHILD"] // 1597
|
||
|
1 type (only|nth|...) // 1598
|
||
|
2 what (child|of-type) // 1599
|
||
|
3 argument (even|odd|\d*|\d*n([+-]\d+)?|...) // 1600
|
||
|
4 xn-component of xn+y argument ([+-]?\d*n|) // 1601
|
||
|
5 sign of xn-component // 1602
|
||
|
6 x of xn-component // 1603
|
||
|
7 sign of y-component // 1604
|
||
|
8 y of y-component // 1605
|
||
|
*/ // 1606
|
||
|
match[1] = match[1].toLowerCase(); // 1607
|
||
|
// 1608
|
||
|
if ( match[1].slice( 0, 3 ) === "nth" ) { // 1609
|
||
|
// nth-* requires argument // 1610
|
||
|
if ( !match[3] ) { // 1611
|
||
|
Sizzle.error( match[0] ); // 1612
|
||
|
} // 1613
|
||
|
// 1614
|
||
|
// numeric x and y parameters for Expr.filter.CHILD // 1615
|
||
|
// remember that false/true cast respectively to 0/1 // 1616
|
||
|
match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) ); // 1617
|
||
|
match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" ); // 1618
|
||
|
// 1619
|
||
|
// other types prohibit arguments // 1620
|
||
|
} else if ( match[3] ) { // 1621
|
||
|
Sizzle.error( match[0] ); // 1622
|
||
|
} // 1623
|
||
|
// 1624
|
||
|
return match; // 1625
|
||
|
}, // 1626
|
||
|
// 1627
|
||
|
"PSEUDO": function( match ) { // 1628
|
||
|
var excess, // 1629
|
||
|
unquoted = !match[6] && match[2]; // 1630
|
||
|
// 1631
|
||
|
if ( matchExpr["CHILD"].test( match[0] ) ) { // 1632
|
||
|
return null; // 1633
|
||
|
} // 1634
|
||
|
// 1635
|
||
|
// Accept quoted arguments as-is // 1636
|
||
|
if ( match[3] ) { // 1637
|
||
|
match[2] = match[4] || match[5] || ""; // 1638
|
||
|
// 1639
|
||
|
// Strip excess characters from unquoted arguments // 1640
|
||
|
} else if ( unquoted && rpseudo.test( unquoted ) && // 1641
|
||
|
// Get excess from tokenize (recursively) // 1642
|
||
|
(excess = tokenize( unquoted, true )) && // 1643
|
||
|
// advance to the next closing parenthesis // 1644
|
||
|
(excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) { // 1645
|
||
|
// 1646
|
||
|
// excess is a negative index // 1647
|
||
|
match[0] = match[0].slice( 0, excess ); // 1648
|
||
|
match[2] = unquoted.slice( 0, excess ); // 1649
|
||
|
} // 1650
|
||
|
// 1651
|
||
|
// Return only captures needed by the pseudo filter method (type and argument) // 1652
|
||
|
return match.slice( 0, 3 ); // 1653
|
||
|
} // 1654
|
||
|
}, // 1655
|
||
|
// 1656
|
||
|
filter: { // 1657
|
||
|
// 1658
|
||
|
"TAG": function( nodeNameSelector ) { // 1659
|
||
|
var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase(); // 1660
|
||
|
return nodeNameSelector === "*" ? // 1661
|
||
|
function() { return true; } : // 1662
|
||
|
function( elem ) { // 1663
|
||
|
return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; // 1664
|
||
|
}; // 1665
|
||
|
}, // 1666
|
||
|
// 1667
|
||
|
"CLASS": function( className ) { // 1668
|
||
|
var pattern = classCache[ className + " " ]; // 1669
|
||
|
// 1670
|
||
|
return pattern || // 1671
|
||
|
(pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) && // 1672
|
||
|
classCache( className, function( elem ) { // 1673
|
||
|
return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== "undefined" && elem.getAttribute("class") || "" );
|
||
|
}); // 1675
|
||
|
}, // 1676
|
||
|
// 1677
|
||
|
"ATTR": function( name, operator, check ) { // 1678
|
||
|
return function( elem ) { // 1679
|
||
|
var result = Sizzle.attr( elem, name ); // 1680
|
||
|
// 1681
|
||
|
if ( result == null ) { // 1682
|
||
|
return operator === "!="; // 1683
|
||
|
} // 1684
|
||
|
if ( !operator ) { // 1685
|
||
|
return true; // 1686
|
||
|
} // 1687
|
||
|
// 1688
|
||
|
result += ""; // 1689
|
||
|
// 1690
|
||
|
return operator === "=" ? result === check : // 1691
|
||
|
operator === "!=" ? result !== check : // 1692
|
||
|
operator === "^=" ? check && result.indexOf( check ) === 0 : // 1693
|
||
|
operator === "*=" ? check && result.indexOf( check ) > -1 : // 1694
|
||
|
operator === "$=" ? check && result.slice( -check.length ) === check : // 1695
|
||
|
operator === "~=" ? ( " " + result.replace( rwhitespace, " " ) + " " ).indexOf( check ) > -1 : // 1696
|
||
|
operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" : // 1697
|
||
|
false; // 1698
|
||
|
}; // 1699
|
||
|
}, // 1700
|
||
|
// 1701
|
||
|
"CHILD": function( type, what, argument, first, last ) { // 1702
|
||
|
var simple = type.slice( 0, 3 ) !== "nth", // 1703
|
||
|
forward = type.slice( -4 ) !== "last", // 1704
|
||
|
ofType = what === "of-type"; // 1705
|
||
|
// 1706
|
||
|
return first === 1 && last === 0 ? // 1707
|
||
|
// 1708
|
||
|
// Shortcut for :nth-*(n) // 1709
|
||
|
function( elem ) { // 1710
|
||
|
return !!elem.parentNode; // 1711
|
||
|
} : // 1712
|
||
|
// 1713
|
||
|
function( elem, context, xml ) { // 1714
|
||
|
var cache, outerCache, node, diff, nodeIndex, start, // 1715
|
||
|
dir = simple !== forward ? "nextSibling" : "previousSibling", // 1716
|
||
|
parent = elem.parentNode, // 1717
|
||
|
name = ofType && elem.nodeName.toLowerCase(), // 1718
|
||
|
useCache = !xml && !ofType; // 1719
|
||
|
// 1720
|
||
|
if ( parent ) { // 1721
|
||
|
// 1722
|
||
|
// :(first|last|only)-(child|of-type) // 1723
|
||
|
if ( simple ) { // 1724
|
||
|
while ( dir ) { // 1725
|
||
|
node = elem; // 1726
|
||
|
while ( (node = node[ dir ]) ) { // 1727
|
||
|
if ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) { // 1728
|
||
|
return false; // 1729
|
||
|
} // 1730
|
||
|
} // 1731
|
||
|
// Reverse direction for :only-* (if we haven't yet done so) // 1732
|
||
|
start = dir = type === "only" && !start && "nextSibling"; // 1733
|
||
|
} // 1734
|
||
|
return true; // 1735
|
||
|
} // 1736
|
||
|
// 1737
|
||
|
start = [ forward ? parent.firstChild : parent.lastChild ]; // 1738
|
||
|
// 1739
|
||
|
// non-xml :nth-child(...) stores cache data on `parent` // 1740
|
||
|
if ( forward && useCache ) { // 1741
|
||
|
// Seek `elem` from a previously-cached index // 1742
|
||
|
outerCache = parent[ expando ] || (parent[ expando ] = {}); // 1743
|
||
|
cache = outerCache[ type ] || []; // 1744
|
||
|
nodeIndex = cache[0] === dirruns && cache[1]; // 1745
|
||
|
diff = cache[0] === dirruns && cache[2]; // 1746
|
||
|
node = nodeIndex && parent.childNodes[ nodeIndex ]; // 1747
|
||
|
// 1748
|
||
|
while ( (node = ++nodeIndex && node && node[ dir ] || // 1749
|
||
|
// 1750
|
||
|
// Fallback to seeking `elem` from the start // 1751
|
||
|
(diff = nodeIndex = 0) || start.pop()) ) { // 1752
|
||
|
// 1753
|
||
|
// When found, cache indexes on `parent` and break // 1754
|
||
|
if ( node.nodeType === 1 && ++diff && node === elem ) { // 1755
|
||
|
outerCache[ type ] = [ dirruns, nodeIndex, diff ]; // 1756
|
||
|
break; // 1757
|
||
|
} // 1758
|
||
|
} // 1759
|
||
|
// 1760
|
||
|
// Use previously-cached element index if available // 1761
|
||
|
} else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) {
|
||
|
diff = cache[1]; // 1763
|
||
|
// 1764
|
||
|
// xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...) // 1765
|
||
|
} else { // 1766
|
||
|
// Use the same loop as above to seek `elem` from the start // 1767
|
||
|
while ( (node = ++nodeIndex && node && node[ dir ] || // 1768
|
||
|
(diff = nodeIndex = 0) || start.pop()) ) { // 1769
|
||
|
// 1770
|
||
|
if ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) { // 1771
|
||
|
// Cache the index of each encountered element // 1772
|
||
|
if ( useCache ) { // 1773
|
||
|
(node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ]; // 1774
|
||
|
} // 1775
|
||
|
// 1776
|
||
|
if ( node === elem ) { // 1777
|
||
|
break; // 1778
|
||
|
} // 1779
|
||
|
} // 1780
|
||
|
} // 1781
|
||
|
} // 1782
|
||
|
// 1783
|
||
|
// Incorporate the offset, then check against cycle size // 1784
|
||
|
diff -= last; // 1785
|
||
|
return diff === first || ( diff % first === 0 && diff / first >= 0 ); // 1786
|
||
|
} // 1787
|
||
|
}; // 1788
|
||
|
}, // 1789
|
||
|
// 1790
|
||
|
"PSEUDO": function( pseudo, argument ) { // 1791
|
||
|
// pseudo-class names are case-insensitive // 1792
|
||
|
// http://www.w3.org/TR/selectors/#pseudo-classes // 1793
|
||
|
// Prioritize by case sensitivity in case custom pseudos are added with uppercase letters // 1794
|
||
|
// Remember that setFilters inherits from pseudos // 1795
|
||
|
var args, // 1796
|
||
|
fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] || // 1797
|
||
|
Sizzle.error( "unsupported pseudo: " + pseudo ); // 1798
|
||
|
// 1799
|
||
|
// The user may use createPseudo to indicate that // 1800
|
||
|
// arguments are needed to create the filter function // 1801
|
||
|
// just as Sizzle does // 1802
|
||
|
if ( fn[ expando ] ) { // 1803
|
||
|
return fn( argument ); // 1804
|
||
|
} // 1805
|
||
|
// 1806
|
||
|
// But maintain support for old signatures // 1807
|
||
|
if ( fn.length > 1 ) { // 1808
|
||
|
args = [ pseudo, pseudo, "", argument ]; // 1809
|
||
|
return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ? // 1810
|
||
|
markFunction(function( seed, matches ) { // 1811
|
||
|
var idx, // 1812
|
||
|
matched = fn( seed, argument ), // 1813
|
||
|
i = matched.length; // 1814
|
||
|
while ( i-- ) { // 1815
|
||
|
idx = indexOf( seed, matched[i] ); // 1816
|
||
|
seed[ idx ] = !( matches[ idx ] = matched[i] ); // 1817
|
||
|
} // 1818
|
||
|
}) : // 1819
|
||
|
function( elem ) { // 1820
|
||
|
return fn( elem, 0, args ); // 1821
|
||
|
}; // 1822
|
||
|
} // 1823
|
||
|
// 1824
|
||
|
return fn; // 1825
|
||
|
} // 1826
|
||
|
}, // 1827
|
||
|
// 1828
|
||
|
pseudos: { // 1829
|
||
|
// Potentially complex pseudos // 1830
|
||
|
"not": markFunction(function( selector ) { // 1831
|
||
|
// Trim the selector passed to compile // 1832
|
||
|
// to avoid treating leading and trailing // 1833
|
||
|
// spaces as combinators // 1834
|
||
|
var input = [], // 1835
|
||
|
results = [], // 1836
|
||
|
matcher = compile( selector.replace( rtrim, "$1" ) ); // 1837
|
||
|
// 1838
|
||
|
return matcher[ expando ] ? // 1839
|
||
|
markFunction(function( seed, matches, context, xml ) { // 1840
|
||
|
var elem, // 1841
|
||
|
unmatched = matcher( seed, null, xml, [] ), // 1842
|
||
|
i = seed.length; // 1843
|
||
|
// 1844
|
||
|
// Match elements unmatched by `matcher` // 1845
|
||
|
while ( i-- ) { // 1846
|
||
|
if ( (elem = unmatched[i]) ) { // 1847
|
||
|
seed[i] = !(matches[i] = elem); // 1848
|
||
|
} // 1849
|
||
|
} // 1850
|
||
|
}) : // 1851
|
||
|
function( elem, context, xml ) { // 1852
|
||
|
input[0] = elem; // 1853
|
||
|
matcher( input, null, xml, results ); // 1854
|
||
|
// Don't keep the element (issue #299) // 1855
|
||
|
input[0] = null; // 1856
|
||
|
return !results.pop(); // 1857
|
||
|
}; // 1858
|
||
|
}), // 1859
|
||
|
// 1860
|
||
|
"has": markFunction(function( selector ) { // 1861
|
||
|
return function( elem ) { // 1862
|
||
|
return Sizzle( selector, elem ).length > 0; // 1863
|
||
|
}; // 1864
|
||
|
}), // 1865
|
||
|
// 1866
|
||
|
"contains": markFunction(function( text ) { // 1867
|
||
|
text = text.replace( runescape, funescape ); // 1868
|
||
|
return function( elem ) { // 1869
|
||
|
return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1; // 1870
|
||
|
}; // 1871
|
||
|
}), // 1872
|
||
|
// 1873
|
||
|
// "Whether an element is represented by a :lang() selector // 1874
|
||
|
// is based solely on the element's language value // 1875
|
||
|
// being equal to the identifier C, // 1876
|
||
|
// or beginning with the identifier C immediately followed by "-". // 1877
|
||
|
// The matching of C against the element's language value is performed case-insensitively. // 1878
|
||
|
// The identifier C does not have to be a valid language name." // 1879
|
||
|
// http://www.w3.org/TR/selectors/#lang-pseudo // 1880
|
||
|
"lang": markFunction( function( lang ) { // 1881
|
||
|
// lang value must be a valid identifier // 1882
|
||
|
if ( !ridentifier.test(lang || "") ) { // 1883
|
||
|
Sizzle.error( "unsupported lang: " + lang ); // 1884
|
||
|
} // 1885
|
||
|
lang = lang.replace( runescape, funescape ).toLowerCase(); // 1886
|
||
|
return function( elem ) { // 1887
|
||
|
var elemLang; // 1888
|
||
|
do { // 1889
|
||
|
if ( (elemLang = documentIsHTML ? // 1890
|
||
|
elem.lang : // 1891
|
||
|
elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) { // 1892
|
||
|
// 1893
|
||
|
elemLang = elemLang.toLowerCase(); // 1894
|
||
|
return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0; // 1895
|
||
|
} // 1896
|
||
|
} while ( (elem = elem.parentNode) && elem.nodeType === 1 ); // 1897
|
||
|
return false; // 1898
|
||
|
}; // 1899
|
||
|
}), // 1900
|
||
|
// 1901
|
||
|
// Miscellaneous // 1902
|
||
|
"target": function( elem ) { // 1903
|
||
|
var hash = window.location && window.location.hash; // 1904
|
||
|
return hash && hash.slice( 1 ) === elem.id; // 1905
|
||
|
}, // 1906
|
||
|
// 1907
|
||
|
"root": function( elem ) { // 1908
|
||
|
return elem === docElem; // 1909
|
||
|
}, // 1910
|
||
|
// 1911
|
||
|
"focus": function( elem ) { // 1912
|
||
|
return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);
|
||
|
}, // 1914
|
||
|
// 1915
|
||
|
// Boolean properties // 1916
|
||
|
"enabled": function( elem ) { // 1917
|
||
|
return elem.disabled === false; // 1918
|
||
|
}, // 1919
|
||
|
// 1920
|
||
|
"disabled": function( elem ) { // 1921
|
||
|
return elem.disabled === true; // 1922
|
||
|
}, // 1923
|
||
|
// 1924
|
||
|
"checked": function( elem ) { // 1925
|
||
|
// In CSS3, :checked should return both checked and selected elements // 1926
|
||
|
// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked // 1927
|
||
|
var nodeName = elem.nodeName.toLowerCase(); // 1928
|
||
|
return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected); // 1929
|
||
|
}, // 1930
|
||
|
// 1931
|
||
|
"selected": function( elem ) { // 1932
|
||
|
// Accessing this property makes selected-by-default // 1933
|
||
|
// options in Safari work properly // 1934
|
||
|
if ( elem.parentNode ) { // 1935
|
||
|
elem.parentNode.selectedIndex; // 1936
|
||
|
} // 1937
|
||
|
// 1938
|
||
|
return elem.selected === true; // 1939
|
||
|
}, // 1940
|
||
|
// 1941
|
||
|
// Contents // 1942
|
||
|
"empty": function( elem ) { // 1943
|
||
|
// http://www.w3.org/TR/selectors/#empty-pseudo // 1944
|
||
|
// :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5), // 1945
|
||
|
// but not by others (comment: 8; processing instruction: 7; etc.) // 1946
|
||
|
// nodeType < 6 works because attributes (2) do not appear as children // 1947
|
||
|
for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { // 1948
|
||
|
if ( elem.nodeType < 6 ) { // 1949
|
||
|
return false; // 1950
|
||
|
} // 1951
|
||
|
} // 1952
|
||
|
return true; // 1953
|
||
|
}, // 1954
|
||
|
// 1955
|
||
|
"parent": function( elem ) { // 1956
|
||
|
return !Expr.pseudos["empty"]( elem ); // 1957
|
||
|
}, // 1958
|
||
|
// 1959
|
||
|
// Element/input types // 1960
|
||
|
"header": function( elem ) { // 1961
|
||
|
return rheader.test( elem.nodeName ); // 1962
|
||
|
}, // 1963
|
||
|
// 1964
|
||
|
"input": function( elem ) { // 1965
|
||
|
return rinputs.test( elem.nodeName ); // 1966
|
||
|
}, // 1967
|
||
|
// 1968
|
||
|
"button": function( elem ) { // 1969
|
||
|
var name = elem.nodeName.toLowerCase(); // 1970
|
||
|
return name === "input" && elem.type === "button" || name === "button"; // 1971
|
||
|
}, // 1972
|
||
|
// 1973
|
||
|
"text": function( elem ) { // 1974
|
||
|
var attr; // 1975
|
||
|
return elem.nodeName.toLowerCase() === "input" && // 1976
|
||
|
elem.type === "text" && // 1977
|
||
|
// 1978
|
||
|
// Support: IE<8 // 1979
|
||
|
// New HTML5 attribute values (e.g., "search") appear with elem.type === "text" // 1980
|
||
|
( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text" ); // 1981
|
||
|
}, // 1982
|
||
|
// 1983
|
||
|
// Position-in-collection // 1984
|
||
|
"first": createPositionalPseudo(function() { // 1985
|
||
|
return [ 0 ]; // 1986
|
||
|
}), // 1987
|
||
|
// 1988
|
||
|
"last": createPositionalPseudo(function( matchIndexes, length ) { // 1989
|
||
|
return [ length - 1 ]; // 1990
|
||
|
}), // 1991
|
||
|
// 1992
|
||
|
"eq": createPositionalPseudo(function( matchIndexes, length, argument ) { // 1993
|
||
|
return [ argument < 0 ? argument + length : argument ]; // 1994
|
||
|
}), // 1995
|
||
|
// 1996
|
||
|
"even": createPositionalPseudo(function( matchIndexes, length ) { // 1997
|
||
|
var i = 0; // 1998
|
||
|
for ( ; i < length; i += 2 ) { // 1999
|
||
|
matchIndexes.push( i ); // 2000
|
||
|
} // 2001
|
||
|
return matchIndexes; // 2002
|
||
|
}), // 2003
|
||
|
// 2004
|
||
|
"odd": createPositionalPseudo(function( matchIndexes, length ) { // 2005
|
||
|
var i = 1; // 2006
|
||
|
for ( ; i < length; i += 2 ) { // 2007
|
||
|
matchIndexes.push( i ); // 2008
|
||
|
} // 2009
|
||
|
return matchIndexes; // 2010
|
||
|
}), // 2011
|
||
|
// 2012
|
||
|
"lt": createPositionalPseudo(function( matchIndexes, length, argument ) { // 2013
|
||
|
var i = argument < 0 ? argument + length : argument; // 2014
|
||
|
for ( ; --i >= 0; ) { // 2015
|
||
|
matchIndexes.push( i ); // 2016
|
||
|
} // 2017
|
||
|
return matchIndexes; // 2018
|
||
|
}), // 2019
|
||
|
// 2020
|
||
|
"gt": createPositionalPseudo(function( matchIndexes, length, argument ) { // 2021
|
||
|
var i = argument < 0 ? argument + length : argument; // 2022
|
||
|
for ( ; ++i < length; ) { // 2023
|
||
|
matchIndexes.push( i ); // 2024
|
||
|
} // 2025
|
||
|
return matchIndexes; // 2026
|
||
|
}) // 2027
|
||
|
} // 2028
|
||
|
}; // 2029
|
||
|
// 2030
|
||
|
Expr.pseudos["nth"] = Expr.pseudos["eq"]; // 2031
|
||
|
// 2032
|
||
|
// Add button/input type pseudos // 2033
|
||
|
for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) { // 2034
|
||
|
Expr.pseudos[ i ] = createInputPseudo( i ); // 2035
|
||
|
} // 2036
|
||
|
for ( i in { submit: true, reset: true } ) { // 2037
|
||
|
Expr.pseudos[ i ] = createButtonPseudo( i ); // 2038
|
||
|
} // 2039
|
||
|
// 2040
|
||
|
// Easy API for creating new setFilters // 2041
|
||
|
function setFilters() {} // 2042
|
||
|
setFilters.prototype = Expr.filters = Expr.pseudos; // 2043
|
||
|
Expr.setFilters = new setFilters(); // 2044
|
||
|
// 2045
|
||
|
tokenize = Sizzle.tokenize = function( selector, parseOnly ) { // 2046
|
||
|
var matched, match, tokens, type, // 2047
|
||
|
soFar, groups, preFilters, // 2048
|
||
|
cached = tokenCache[ selector + " " ]; // 2049
|
||
|
// 2050
|
||
|
if ( cached ) { // 2051
|
||
|
return parseOnly ? 0 : cached.slice( 0 ); // 2052
|
||
|
} // 2053
|
||
|
// 2054
|
||
|
soFar = selector; // 2055
|
||
|
groups = []; // 2056
|
||
|
preFilters = Expr.preFilter; // 2057
|
||
|
// 2058
|
||
|
while ( soFar ) { // 2059
|
||
|
// 2060
|
||
|
// Comma and first run // 2061
|
||
|
if ( !matched || (match = rcomma.exec( soFar )) ) { // 2062
|
||
|
if ( match ) { // 2063
|
||
|
// Don't consume trailing commas as valid // 2064
|
||
|
soFar = soFar.slice( match[0].length ) || soFar; // 2065
|
||
|
} // 2066
|
||
|
groups.push( (tokens = []) ); // 2067
|
||
|
} // 2068
|
||
|
// 2069
|
||
|
matched = false; // 2070
|
||
|
// 2071
|
||
|
// Combinators // 2072
|
||
|
if ( (match = rcombinators.exec( soFar )) ) { // 2073
|
||
|
matched = match.shift(); // 2074
|
||
|
tokens.push({ // 2075
|
||
|
value: matched, // 2076
|
||
|
// Cast descendant combinators to space // 2077
|
||
|
type: match[0].replace( rtrim, " " ) // 2078
|
||
|
}); // 2079
|
||
|
soFar = soFar.slice( matched.length ); // 2080
|
||
|
} // 2081
|
||
|
// 2082
|
||
|
// Filters // 2083
|
||
|
for ( type in Expr.filter ) { // 2084
|
||
|
if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] || // 2085
|
||
|
(match = preFilters[ type ]( match ))) ) { // 2086
|
||
|
matched = match.shift(); // 2087
|
||
|
tokens.push({ // 2088
|
||
|
value: matched, // 2089
|
||
|
type: type, // 2090
|
||
|
matches: match // 2091
|
||
|
}); // 2092
|
||
|
soFar = soFar.slice( matched.length ); // 2093
|
||
|
} // 2094
|
||
|
} // 2095
|
||
|
// 2096
|
||
|
if ( !matched ) { // 2097
|
||
|
break; // 2098
|
||
|
} // 2099
|
||
|
} // 2100
|
||
|
// 2101
|
||
|
// Return the length of the invalid excess // 2102
|
||
|
// if we're just parsing // 2103
|
||
|
// Otherwise, throw an error or return tokens // 2104
|
||
|
return parseOnly ? // 2105
|
||
|
soFar.length : // 2106
|
||
|
soFar ? // 2107
|
||
|
Sizzle.error( selector ) : // 2108
|
||
|
// Cache the tokens // 2109
|
||
|
tokenCache( selector, groups ).slice( 0 ); // 2110
|
||
|
}; // 2111
|
||
|
// 2112
|
||
|
function toSelector( tokens ) { // 2113
|
||
|
var i = 0, // 2114
|
||
|
len = tokens.length, // 2115
|
||
|
selector = ""; // 2116
|
||
|
for ( ; i < len; i++ ) { // 2117
|
||
|
selector += tokens[i].value; // 2118
|
||
|
} // 2119
|
||
|
return selector; // 2120
|
||
|
} // 2121
|
||
|
// 2122
|
||
|
function addCombinator( matcher, combinator, base ) { // 2123
|
||
|
var dir = combinator.dir, // 2124
|
||
|
checkNonElements = base && dir === "parentNode", // 2125
|
||
|
doneName = done++; // 2126
|
||
|
// 2127
|
||
|
return combinator.first ? // 2128
|
||
|
// Check against closest ancestor/preceding element // 2129
|
||
|
function( elem, context, xml ) { // 2130
|
||
|
while ( (elem = elem[ dir ]) ) { // 2131
|
||
|
if ( elem.nodeType === 1 || checkNonElements ) { // 2132
|
||
|
return matcher( elem, context, xml ); // 2133
|
||
|
} // 2134
|
||
|
} // 2135
|
||
|
} : // 2136
|
||
|
// 2137
|
||
|
// Check against all ancestor/preceding elements // 2138
|
||
|
function( elem, context, xml ) { // 2139
|
||
|
var oldCache, outerCache, // 2140
|
||
|
newCache = [ dirruns, doneName ]; // 2141
|
||
|
// 2142
|
||
|
// We can't set arbitrary data on XML nodes, so they don't benefit from dir caching // 2143
|
||
|
if ( xml ) { // 2144
|
||
|
while ( (elem = elem[ dir ]) ) { // 2145
|
||
|
if ( elem.nodeType === 1 || checkNonElements ) { // 2146
|
||
|
if ( matcher( elem, context, xml ) ) { // 2147
|
||
|
return true; // 2148
|
||
|
} // 2149
|
||
|
} // 2150
|
||
|
} // 2151
|
||
|
} else { // 2152
|
||
|
while ( (elem = elem[ dir ]) ) { // 2153
|
||
|
if ( elem.nodeType === 1 || checkNonElements ) { // 2154
|
||
|
outerCache = elem[ expando ] || (elem[ expando ] = {}); // 2155
|
||
|
if ( (oldCache = outerCache[ dir ]) && // 2156
|
||
|
oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) { // 2157
|
||
|
// 2158
|
||
|
// Assign to newCache so results back-propagate to previous elements // 2159
|
||
|
return (newCache[ 2 ] = oldCache[ 2 ]); // 2160
|
||
|
} else { // 2161
|
||
|
// Reuse newcache so results back-propagate to previous elements // 2162
|
||
|
outerCache[ dir ] = newCache; // 2163
|
||
|
// 2164
|
||
|
// A match means we're done; a fail means we have to keep checking // 2165
|
||
|
if ( (newCache[ 2 ] = matcher( elem, context, xml )) ) { // 2166
|
||
|
return true; // 2167
|
||
|
} // 2168
|
||
|
} // 2169
|
||
|
} // 2170
|
||
|
} // 2171
|
||
|
} // 2172
|
||
|
}; // 2173
|
||
|
} // 2174
|
||
|
// 2175
|
||
|
function elementMatcher( matchers ) { // 2176
|
||
|
return matchers.length > 1 ? // 2177
|
||
|
function( elem, context, xml ) { // 2178
|
||
|
var i = matchers.length; // 2179
|
||
|
while ( i-- ) { // 2180
|
||
|
if ( !matchers[i]( elem, context, xml ) ) { // 2181
|
||
|
return false; // 2182
|
||
|
} // 2183
|
||
|
} // 2184
|
||
|
return true; // 2185
|
||
|
} : // 2186
|
||
|
matchers[0]; // 2187
|
||
|
} // 2188
|
||
|
// 2189
|
||
|
function multipleContexts( selector, contexts, results ) { // 2190
|
||
|
var i = 0, // 2191
|
||
|
len = contexts.length; // 2192
|
||
|
for ( ; i < len; i++ ) { // 2193
|
||
|
Sizzle( selector, contexts[i], results ); // 2194
|
||
|
} // 2195
|
||
|
return results; // 2196
|
||
|
} // 2197
|
||
|
// 2198
|
||
|
function condense( unmatched, map, filter, context, xml ) { // 2199
|
||
|
var elem, // 2200
|
||
|
newUnmatched = [], // 2201
|
||
|
i = 0, // 2202
|
||
|
len = unmatched.length, // 2203
|
||
|
mapped = map != null; // 2204
|
||
|
// 2205
|
||
|
for ( ; i < len; i++ ) { // 2206
|
||
|
if ( (elem = unmatched[i]) ) { // 2207
|
||
|
if ( !filter || filter( elem, context, xml ) ) { // 2208
|
||
|
newUnmatched.push( elem ); // 2209
|
||
|
if ( mapped ) { // 2210
|
||
|
map.push( i ); // 2211
|
||
|
} // 2212
|
||
|
} // 2213
|
||
|
} // 2214
|
||
|
} // 2215
|
||
|
// 2216
|
||
|
return newUnmatched; // 2217
|
||
|
} // 2218
|
||
|
// 2219
|
||
|
function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) { // 2220
|
||
|
if ( postFilter && !postFilter[ expando ] ) { // 2221
|
||
|
postFilter = setMatcher( postFilter ); // 2222
|
||
|
} // 2223
|
||
|
if ( postFinder && !postFinder[ expando ] ) { // 2224
|
||
|
postFinder = setMatcher( postFinder, postSelector ); // 2225
|
||
|
} // 2226
|
||
|
return markFunction(function( seed, results, context, xml ) { // 2227
|
||
|
var temp, i, elem, // 2228
|
||
|
preMap = [], // 2229
|
||
|
postMap = [], // 2230
|
||
|
preexisting = results.length, // 2231
|
||
|
// 2232
|
||
|
// Get initial elements from seed or context // 2233
|
||
|
elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ), // 2234
|
||
|
// 2235
|
||
|
// Prefilter to get matcher input, preserving a map for seed-results synchronization // 2236
|
||
|
matcherIn = preFilter && ( seed || !selector ) ? // 2237
|
||
|
condense( elems, preMap, preFilter, context, xml ) : // 2238
|
||
|
elems, // 2239
|
||
|
// 2240
|
||
|
matcherOut = matcher ? // 2241
|
||
|
// If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results, // 2242
|
||
|
postFinder || ( seed ? preFilter : preexisting || postFilter ) ? // 2243
|
||
|
// 2244
|
||
|
// ...intermediate processing is necessary // 2245
|
||
|
[] : // 2246
|
||
|
// 2247
|
||
|
// ...otherwise use results directly // 2248
|
||
|
results : // 2249
|
||
|
matcherIn; // 2250
|
||
|
// 2251
|
||
|
// Find primary matches // 2252
|
||
|
if ( matcher ) { // 2253
|
||
|
matcher( matcherIn, matcherOut, context, xml ); // 2254
|
||
|
} // 2255
|
||
|
// 2256
|
||
|
// Apply postFilter // 2257
|
||
|
if ( postFilter ) { // 2258
|
||
|
temp = condense( matcherOut, postMap ); // 2259
|
||
|
postFilter( temp, [], context, xml ); // 2260
|
||
|
// 2261
|
||
|
// Un-match failing elements by moving them back to matcherIn // 2262
|
||
|
i = temp.length; // 2263
|
||
|
while ( i-- ) { // 2264
|
||
|
if ( (elem = temp[i]) ) { // 2265
|
||
|
matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem); // 2266
|
||
|
} // 2267
|
||
|
} // 2268
|
||
|
} // 2269
|
||
|
// 2270
|
||
|
if ( seed ) { // 2271
|
||
|
if ( postFinder || preFilter ) { // 2272
|
||
|
if ( postFinder ) { // 2273
|
||
|
// Get the final matcherOut by condensing this intermediate into postFinder contexts // 2274
|
||
|
temp = []; // 2275
|
||
|
i = matcherOut.length; // 2276
|
||
|
while ( i-- ) { // 2277
|
||
|
if ( (elem = matcherOut[i]) ) { // 2278
|
||
|
// Restore matcherIn since elem is not yet a final match // 2279
|
||
|
temp.push( (matcherIn[i] = elem) ); // 2280
|
||
|
} // 2281
|
||
|
} // 2282
|
||
|
postFinder( null, (matcherOut = []), temp, xml ); // 2283
|
||
|
} // 2284
|
||
|
// 2285
|
||
|
// Move matched elements from seed to results to keep them synchronized // 2286
|
||
|
i = matcherOut.length; // 2287
|
||
|
while ( i-- ) { // 2288
|
||
|
if ( (elem = matcherOut[i]) && // 2289
|
||
|
(temp = postFinder ? indexOf( seed, elem ) : preMap[i]) > -1 ) { // 2290
|
||
|
// 2291
|
||
|
seed[temp] = !(results[temp] = elem); // 2292
|
||
|
} // 2293
|
||
|
} // 2294
|
||
|
} // 2295
|
||
|
// 2296
|
||
|
// Add elements to results, through postFinder if defined // 2297
|
||
|
} else { // 2298
|
||
|
matcherOut = condense( // 2299
|
||
|
matcherOut === results ? // 2300
|
||
|
matcherOut.splice( preexisting, matcherOut.length ) : // 2301
|
||
|
matcherOut // 2302
|
||
|
); // 2303
|
||
|
if ( postFinder ) { // 2304
|
||
|
postFinder( null, results, matcherOut, xml ); // 2305
|
||
|
} else { // 2306
|
||
|
push.apply( results, matcherOut ); // 2307
|
||
|
} // 2308
|
||
|
} // 2309
|
||
|
}); // 2310
|
||
|
} // 2311
|
||
|
// 2312
|
||
|
function matcherFromTokens( tokens ) { // 2313
|
||
|
var checkContext, matcher, j, // 2314
|
||
|
len = tokens.length, // 2315
|
||
|
leadingRelative = Expr.relative[ tokens[0].type ], // 2316
|
||
|
implicitRelative = leadingRelative || Expr.relative[" "], // 2317
|
||
|
i = leadingRelative ? 1 : 0, // 2318
|
||
|
// 2319
|
||
|
// The foundational matcher ensures that elements are reachable from top-level context(s) // 2320
|
||
|
matchContext = addCombinator( function( elem ) { // 2321
|
||
|
return elem === checkContext; // 2322
|
||
|
}, implicitRelative, true ), // 2323
|
||
|
matchAnyContext = addCombinator( function( elem ) { // 2324
|
||
|
return indexOf( checkContext, elem ) > -1; // 2325
|
||
|
}, implicitRelative, true ), // 2326
|
||
|
matchers = [ function( elem, context, xml ) { // 2327
|
||
|
var ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || ( // 2328
|
||
|
(checkContext = context).nodeType ? // 2329
|
||
|
matchContext( elem, context, xml ) : // 2330
|
||
|
matchAnyContext( elem, context, xml ) ); // 2331
|
||
|
// Avoid hanging onto element (issue #299) // 2332
|
||
|
checkContext = null; // 2333
|
||
|
return ret; // 2334
|
||
|
} ]; // 2335
|
||
|
// 2336
|
||
|
for ( ; i < len; i++ ) { // 2337
|
||
|
if ( (matcher = Expr.relative[ tokens[i].type ]) ) { // 2338
|
||
|
matchers = [ addCombinator(elementMatcher( matchers ), matcher) ]; // 2339
|
||
|
} else { // 2340
|
||
|
matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches ); // 2341
|
||
|
// 2342
|
||
|
// Return special upon seeing a positional matcher // 2343
|
||
|
if ( matcher[ expando ] ) { // 2344
|
||
|
// Find the next relative operator (if any) for proper handling // 2345
|
||
|
j = ++i; // 2346
|
||
|
for ( ; j < len; j++ ) { // 2347
|
||
|
if ( Expr.relative[ tokens[j].type ] ) { // 2348
|
||
|
break; // 2349
|
||
|
} // 2350
|
||
|
} // 2351
|
||
|
return setMatcher( // 2352
|
||
|
i > 1 && elementMatcher( matchers ), // 2353
|
||
|
i > 1 && toSelector( // 2354
|
||
|
// If the preceding token was a descendant combinator, insert an implicit any-element `*` // 2355
|
||
|
tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" }) // 2356
|
||
|
).replace( rtrim, "$1" ), // 2357
|
||
|
matcher, // 2358
|
||
|
i < j && matcherFromTokens( tokens.slice( i, j ) ), // 2359
|
||
|
j < len && matcherFromTokens( (tokens = tokens.slice( j )) ), // 2360
|
||
|
j < len && toSelector( tokens ) // 2361
|
||
|
); // 2362
|
||
|
} // 2363
|
||
|
matchers.push( matcher ); // 2364
|
||
|
} // 2365
|
||
|
} // 2366
|
||
|
// 2367
|
||
|
return elementMatcher( matchers ); // 2368
|
||
|
} // 2369
|
||
|
// 2370
|
||
|
function matcherFromGroupMatchers( elementMatchers, setMatchers ) { // 2371
|
||
|
var bySet = setMatchers.length > 0, // 2372
|
||
|
byElement = elementMatchers.length > 0, // 2373
|
||
|
superMatcher = function( seed, context, xml, results, outermost ) { // 2374
|
||
|
var elem, j, matcher, // 2375
|
||
|
matchedCount = 0, // 2376
|
||
|
i = "0", // 2377
|
||
|
unmatched = seed && [], // 2378
|
||
|
setMatched = [], // 2379
|
||
|
contextBackup = outermostContext, // 2380
|
||
|
// We must always have either seed elements or outermost context // 2381
|
||
|
elems = seed || byElement && Expr.find["TAG"]( "*", outermost ), // 2382
|
||
|
// Use integer dirruns iff this is the outermost matcher // 2383
|
||
|
dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1), // 2384
|
||
|
len = elems.length; // 2385
|
||
|
// 2386
|
||
|
if ( outermost ) { // 2387
|
||
|
outermostContext = context !== document && context; // 2388
|
||
|
} // 2389
|
||
|
// 2390
|
||
|
// Add elements passing elementMatchers directly to results // 2391
|
||
|
// Keep `i` a string if there are no elements so `matchedCount` will be "00" below // 2392
|
||
|
// Support: IE<9, Safari // 2393
|
||
|
// Tolerate NodeList properties (IE: "length"; Safari: <number>) matching elements by id // 2394
|
||
|
for ( ; i !== len && (elem = elems[i]) != null; i++ ) { // 2395
|
||
|
if ( byElement && elem ) { // 2396
|
||
|
j = 0; // 2397
|
||
|
while ( (matcher = elementMatchers[j++]) ) { // 2398
|
||
|
if ( matcher( elem, context, xml ) ) { // 2399
|
||
|
results.push( elem ); // 2400
|
||
|
break; // 2401
|
||
|
} // 2402
|
||
|
} // 2403
|
||
|
if ( outermost ) { // 2404
|
||
|
dirruns = dirrunsUnique; // 2405
|
||
|
} // 2406
|
||
|
} // 2407
|
||
|
// 2408
|
||
|
// Track unmatched elements for set filters // 2409
|
||
|
if ( bySet ) { // 2410
|
||
|
// They will have gone through all possible matchers // 2411
|
||
|
if ( (elem = !matcher && elem) ) { // 2412
|
||
|
matchedCount--; // 2413
|
||
|
} // 2414
|
||
|
// 2415
|
||
|
// Lengthen the array for every element, matched or not // 2416
|
||
|
if ( seed ) { // 2417
|
||
|
unmatched.push( elem ); // 2418
|
||
|
} // 2419
|
||
|
} // 2420
|
||
|
} // 2421
|
||
|
// 2422
|
||
|
// Apply set filters to unmatched elements // 2423
|
||
|
matchedCount += i; // 2424
|
||
|
if ( bySet && i !== matchedCount ) { // 2425
|
||
|
j = 0; // 2426
|
||
|
while ( (matcher = setMatchers[j++]) ) { // 2427
|
||
|
matcher( unmatched, setMatched, context, xml ); // 2428
|
||
|
} // 2429
|
||
|
// 2430
|
||
|
if ( seed ) { // 2431
|
||
|
// Reintegrate element matches to eliminate the need for sorting // 2432
|
||
|
if ( matchedCount > 0 ) { // 2433
|
||
|
while ( i-- ) { // 2434
|
||
|
if ( !(unmatched[i] || setMatched[i]) ) { // 2435
|
||
|
setMatched[i] = pop.call( results ); // 2436
|
||
|
} // 2437
|
||
|
} // 2438
|
||
|
} // 2439
|
||
|
// 2440
|
||
|
// Discard index placeholder values to get only actual matches // 2441
|
||
|
setMatched = condense( setMatched ); // 2442
|
||
|
} // 2443
|
||
|
// 2444
|
||
|
// Add matches to results // 2445
|
||
|
push.apply( results, setMatched ); // 2446
|
||
|
// 2447
|
||
|
// Seedless set matches succeeding multiple successful matchers stipulate sorting // 2448
|
||
|
if ( outermost && !seed && setMatched.length > 0 && // 2449
|
||
|
( matchedCount + setMatchers.length ) > 1 ) { // 2450
|
||
|
// 2451
|
||
|
Sizzle.uniqueSort( results ); // 2452
|
||
|
} // 2453
|
||
|
} // 2454
|
||
|
// 2455
|
||
|
// Override manipulation of globals by nested matchers // 2456
|
||
|
if ( outermost ) { // 2457
|
||
|
dirruns = dirrunsUnique; // 2458
|
||
|
outermostContext = contextBackup; // 2459
|
||
|
} // 2460
|
||
|
// 2461
|
||
|
return unmatched; // 2462
|
||
|
}; // 2463
|
||
|
// 2464
|
||
|
return bySet ? // 2465
|
||
|
markFunction( superMatcher ) : // 2466
|
||
|
superMatcher; // 2467
|
||
|
} // 2468
|
||
|
// 2469
|
||
|
compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) { // 2470
|
||
|
var i, // 2471
|
||
|
setMatchers = [], // 2472
|
||
|
elementMatchers = [], // 2473
|
||
|
cached = compilerCache[ selector + " " ]; // 2474
|
||
|
// 2475
|
||
|
if ( !cached ) { // 2476
|
||
|
// Generate a function of recursive functions that can be used to check each element // 2477
|
||
|
if ( !match ) { // 2478
|
||
|
match = tokenize( selector ); // 2479
|
||
|
} // 2480
|
||
|
i = match.length; // 2481
|
||
|
while ( i-- ) { // 2482
|
||
|
cached = matcherFromTokens( match[i] ); // 2483
|
||
|
if ( cached[ expando ] ) { // 2484
|
||
|
setMatchers.push( cached ); // 2485
|
||
|
} else { // 2486
|
||
|
elementMatchers.push( cached ); // 2487
|
||
|
} // 2488
|
||
|
} // 2489
|
||
|
// 2490
|
||
|
// Cache the compiled function // 2491
|
||
|
cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) ); // 2492
|
||
|
// 2493
|
||
|
// Save selector and tokenization // 2494
|
||
|
cached.selector = selector; // 2495
|
||
|
} // 2496
|
||
|
return cached; // 2497
|
||
|
}; // 2498
|
||
|
// 2499
|
||
|
/** // 2500
|
||
|
* A low-level selection function that works with Sizzle's compiled // 2501
|
||
|
* selector functions // 2502
|
||
|
* @param {String|Function} selector A selector or a pre-compiled // 2503
|
||
|
* selector function built with Sizzle.compile // 2504
|
||
|
* @param {Element} context // 2505
|
||
|
* @param {Array} [results] // 2506
|
||
|
* @param {Array} [seed] A set of elements to match against // 2507
|
||
|
*/ // 2508
|
||
|
select = Sizzle.select = function( selector, context, results, seed ) { // 2509
|
||
|
var i, tokens, token, type, find, // 2510
|
||
|
compiled = typeof selector === "function" && selector, // 2511
|
||
|
match = !seed && tokenize( (selector = compiled.selector || selector) ); // 2512
|
||
|
// 2513
|
||
|
results = results || []; // 2514
|
||
|
// 2515
|
||
|
// Try to minimize operations if there is no seed and only one group // 2516
|
||
|
if ( match.length === 1 ) { // 2517
|
||
|
// 2518
|
||
|
// Take a shortcut and set the context if the root selector is an ID // 2519
|
||
|
tokens = match[0] = match[0].slice( 0 ); // 2520
|
||
|
if ( tokens.length > 2 && (token = tokens[0]).type === "ID" && // 2521
|
||
|
support.getById && context.nodeType === 9 && documentIsHTML && // 2522
|
||
|
Expr.relative[ tokens[1].type ] ) { // 2523
|
||
|
// 2524
|
||
|
context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0]; // 2525
|
||
|
if ( !context ) { // 2526
|
||
|
return results; // 2527
|
||
|
// 2528
|
||
|
// Precompiled matchers will still verify ancestry, so step up a level // 2529
|
||
|
} else if ( compiled ) { // 2530
|
||
|
context = context.parentNode; // 2531
|
||
|
} // 2532
|
||
|
// 2533
|
||
|
selector = selector.slice( tokens.shift().value.length ); // 2534
|
||
|
} // 2535
|
||
|
// 2536
|
||
|
// Fetch a seed set for right-to-left matching // 2537
|
||
|
i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length; // 2538
|
||
|
while ( i-- ) { // 2539
|
||
|
token = tokens[i]; // 2540
|
||
|
// 2541
|
||
|
// Abort if we hit a combinator // 2542
|
||
|
if ( Expr.relative[ (type = token.type) ] ) { // 2543
|
||
|
break; // 2544
|
||
|
} // 2545
|
||
|
if ( (find = Expr.find[ type ]) ) { // 2546
|
||
|
// Search, expanding context for leading sibling combinators // 2547
|
||
|
if ( (seed = find( // 2548
|
||
|
token.matches[0].replace( runescape, funescape ), // 2549
|
||
|
rsibling.test( tokens[0].type ) && testContext( context.parentNode ) || context // 2550
|
||
|
)) ) { // 2551
|
||
|
// 2552
|
||
|
// If seed is empty or no tokens remain, we can return early // 2553
|
||
|
tokens.splice( i, 1 ); // 2554
|
||
|
selector = seed.length && toSelector( tokens ); // 2555
|
||
|
if ( !selector ) { // 2556
|
||
|
push.apply( results, seed ); // 2557
|
||
|
return results; // 2558
|
||
|
} // 2559
|
||
|
// 2560
|
||
|
break; // 2561
|
||
|
} // 2562
|
||
|
} // 2563
|
||
|
} // 2564
|
||
|
} // 2565
|
||
|
// 2566
|
||
|
// Compile and execute a filtering function if one is not provided // 2567
|
||
|
// Provide `match` to avoid retokenization if we modified the selector above // 2568
|
||
|
( compiled || compile( selector, match ) )( // 2569
|
||
|
seed, // 2570
|
||
|
context, // 2571
|
||
|
!documentIsHTML, // 2572
|
||
|
results, // 2573
|
||
|
rsibling.test( selector ) && testContext( context.parentNode ) || context // 2574
|
||
|
); // 2575
|
||
|
return results; // 2576
|
||
|
}; // 2577
|
||
|
// 2578
|
||
|
// One-time assignments // 2579
|
||
|
// 2580
|
||
|
// Sort stability // 2581
|
||
|
support.sortStable = expando.split("").sort( sortOrder ).join("") === expando; // 2582
|
||
|
// 2583
|
||
|
// Support: Chrome 14-35+ // 2584
|
||
|
// Always assume duplicates if they aren't passed to the comparison function // 2585
|
||
|
support.detectDuplicates = !!hasDuplicate; // 2586
|
||
|
// 2587
|
||
|
// Initialize against the default document // 2588
|
||
|
setDocument(); // 2589
|
||
|
// 2590
|
||
|
// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27) // 2591
|
||
|
// Detached nodes confoundingly follow *each other* // 2592
|
||
|
support.sortDetached = assert(function( div1 ) { // 2593
|
||
|
// Should return 1, but returns 4 (following) // 2594
|
||
|
return div1.compareDocumentPosition( document.createElement("div") ) & 1; // 2595
|
||
|
}); // 2596
|
||
|
// 2597
|
||
|
// Support: IE<8 // 2598
|
||
|
// Prevent attribute/property "interpolation" // 2599
|
||
|
// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx // 2600
|
||
|
if ( !assert(function( div ) { // 2601
|
||
|
div.innerHTML = "<a href='#'></a>"; // 2602
|
||
|
return div.firstChild.getAttribute("href") === "#" ; // 2603
|
||
|
}) ) { // 2604
|
||
|
addHandle( "type|href|height|width", function( elem, name, isXML ) { // 2605
|
||
|
if ( !isXML ) { // 2606
|
||
|
return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 ); // 2607
|
||
|
} // 2608
|
||
|
}); // 2609
|
||
|
} // 2610
|
||
|
// 2611
|
||
|
// Support: IE<9 // 2612
|
||
|
// Use defaultValue in place of getAttribute("value") // 2613
|
||
|
if ( !support.attributes || !assert(function( div ) { // 2614
|
||
|
div.innerHTML = "<input/>"; // 2615
|
||
|
div.firstChild.setAttribute( "value", "" ); // 2616
|
||
|
return div.firstChild.getAttribute( "value" ) === ""; // 2617
|
||
|
}) ) { // 2618
|
||
|
addHandle( "value", function( elem, name, isXML ) { // 2619
|
||
|
if ( !isXML && elem.nodeName.toLowerCase() === "input" ) { // 2620
|
||
|
return elem.defaultValue; // 2621
|
||
|
} // 2622
|
||
|
}); // 2623
|
||
|
} // 2624
|
||
|
// 2625
|
||
|
// Support: IE<9 // 2626
|
||
|
// Use getAttributeNode to fetch booleans when getAttribute lies // 2627
|
||
|
if ( !assert(function( div ) { // 2628
|
||
|
return div.getAttribute("disabled") == null; // 2629
|
||
|
}) ) { // 2630
|
||
|
addHandle( booleans, function( elem, name, isXML ) { // 2631
|
||
|
var val; // 2632
|
||
|
if ( !isXML ) { // 2633
|
||
|
return elem[ name ] === true ? name.toLowerCase() : // 2634
|
||
|
(val = elem.getAttributeNode( name )) && val.specified ? // 2635
|
||
|
val.value : // 2636
|
||
|
null; // 2637
|
||
|
} // 2638
|
||
|
}); // 2639
|
||
|
} // 2640
|
||
|
// 2641
|
||
|
return Sizzle; // 2642
|
||
|
// 2643
|
||
|
})( window ); // 2644
|
||
|
// 2645
|
||
|
// 2646
|
||
|
// 2647
|
||
|
jQuery.find = Sizzle; // 2648
|
||
|
jQuery.expr = Sizzle.selectors; // 2649
|
||
|
jQuery.expr[":"] = jQuery.expr.pseudos; // 2650
|
||
|
jQuery.unique = Sizzle.uniqueSort; // 2651
|
||
|
jQuery.text = Sizzle.getText; // 2652
|
||
|
jQuery.isXMLDoc = Sizzle.isXML; // 2653
|
||
|
jQuery.contains = Sizzle.contains; // 2654
|
||
|
// 2655
|
||
|
// 2656
|
||
|
// 2657
|
||
|
var rneedsContext = jQuery.expr.match.needsContext; // 2658
|
||
|
// 2659
|
||
|
var rsingleTag = (/^<(\w+)\s*\/?>(?:<\/\1>|)$/); // 2660
|
||
|
// 2661
|
||
|
// 2662
|
||
|
// 2663
|
||
|
var risSimple = /^.[^:#\[\.,]*$/; // 2664
|
||
|
// 2665
|
||
|
// Implement the identical functionality for filter and not // 2666
|
||
|
function winnow( elements, qualifier, not ) { // 2667
|
||
|
if ( jQuery.isFunction( qualifier ) ) { // 2668
|
||
|
return jQuery.grep( elements, function( elem, i ) { // 2669
|
||
|
/* jshint -W018 */ // 2670
|
||
|
return !!qualifier.call( elem, i, elem ) !== not; // 2671
|
||
|
}); // 2672
|
||
|
// 2673
|
||
|
} // 2674
|
||
|
// 2675
|
||
|
if ( qualifier.nodeType ) { // 2676
|
||
|
return jQuery.grep( elements, function( elem ) { // 2677
|
||
|
return ( elem === qualifier ) !== not; // 2678
|
||
|
}); // 2679
|
||
|
// 2680
|
||
|
} // 2681
|
||
|
// 2682
|
||
|
if ( typeof qualifier === "string" ) { // 2683
|
||
|
if ( risSimple.test( qualifier ) ) { // 2684
|
||
|
return jQuery.filter( qualifier, elements, not ); // 2685
|
||
|
} // 2686
|
||
|
// 2687
|
||
|
qualifier = jQuery.filter( qualifier, elements ); // 2688
|
||
|
} // 2689
|
||
|
// 2690
|
||
|
return jQuery.grep( elements, function( elem ) { // 2691
|
||
|
return ( jQuery.inArray( elem, qualifier ) >= 0 ) !== not; // 2692
|
||
|
}); // 2693
|
||
|
} // 2694
|
||
|
// 2695
|
||
|
jQuery.filter = function( expr, elems, not ) { // 2696
|
||
|
var elem = elems[ 0 ]; // 2697
|
||
|
// 2698
|
||
|
if ( not ) { // 2699
|
||
|
expr = ":not(" + expr + ")"; // 2700
|
||
|
} // 2701
|
||
|
// 2702
|
||
|
return elems.length === 1 && elem.nodeType === 1 ? // 2703
|
||
|
jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] : // 2704
|
||
|
jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) { // 2705
|
||
|
return elem.nodeType === 1; // 2706
|
||
|
})); // 2707
|
||
|
}; // 2708
|
||
|
// 2709
|
||
|
jQuery.fn.extend({ // 2710
|
||
|
find: function( selector ) { // 2711
|
||
|
var i, // 2712
|
||
|
ret = [], // 2713
|
||
|
self = this, // 2714
|
||
|
len = self.length; // 2715
|
||
|
// 2716
|
||
|
if ( typeof selector !== "string" ) { // 2717
|
||
|
return this.pushStack( jQuery( selector ).filter(function() { // 2718
|
||
|
for ( i = 0; i < len; i++ ) { // 2719
|
||
|
if ( jQuery.contains( self[ i ], this ) ) { // 2720
|
||
|
return true; // 2721
|
||
|
} // 2722
|
||
|
} // 2723
|
||
|
}) ); // 2724
|
||
|
} // 2725
|
||
|
// 2726
|
||
|
for ( i = 0; i < len; i++ ) { // 2727
|
||
|
jQuery.find( selector, self[ i ], ret ); // 2728
|
||
|
} // 2729
|
||
|
// 2730
|
||
|
// Needed because $( selector, context ) becomes $( context ).find( selector ) // 2731
|
||
|
ret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret ); // 2732
|
||
|
ret.selector = this.selector ? this.selector + " " + selector : selector; // 2733
|
||
|
return ret; // 2734
|
||
|
}, // 2735
|
||
|
filter: function( selector ) { // 2736
|
||
|
return this.pushStack( winnow(this, selector || [], false) ); // 2737
|
||
|
}, // 2738
|
||
|
not: function( selector ) { // 2739
|
||
|
return this.pushStack( winnow(this, selector || [], true) ); // 2740
|
||
|
}, // 2741
|
||
|
is: function( selector ) { // 2742
|
||
|
return !!winnow( // 2743
|
||
|
this, // 2744
|
||
|
// 2745
|
||
|
// If this is a positional/relative selector, check membership in the returned set // 2746
|
||
|
// so $("p:first").is("p:last") won't return true for a doc with two "p". // 2747
|
||
|
typeof selector === "string" && rneedsContext.test( selector ) ? // 2748
|
||
|
jQuery( selector ) : // 2749
|
||
|
selector || [], // 2750
|
||
|
false // 2751
|
||
|
).length; // 2752
|
||
|
} // 2753
|
||
|
}); // 2754
|
||
|
// 2755
|
||
|
// 2756
|
||
|
// Initialize a jQuery object // 2757
|
||
|
// 2758
|
||
|
// 2759
|
||
|
// A central reference to the root jQuery(document) // 2760
|
||
|
var rootjQuery, // 2761
|
||
|
// 2762
|
||
|
// Use the correct document accordingly with window argument (sandbox) // 2763
|
||
|
document = window.document, // 2764
|
||
|
// 2765
|
||
|
// A simple way to check for HTML strings // 2766
|
||
|
// Prioritize #id over <tag> to avoid XSS via location.hash (#9521) // 2767
|
||
|
// Strict HTML recognition (#11290: must start with <) // 2768
|
||
|
rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/, // 2769
|
||
|
// 2770
|
||
|
init = jQuery.fn.init = function( selector, context ) { // 2771
|
||
|
var match, elem; // 2772
|
||
|
// 2773
|
||
|
// HANDLE: $(""), $(null), $(undefined), $(false) // 2774
|
||
|
if ( !selector ) { // 2775
|
||
|
return this; // 2776
|
||
|
} // 2777
|
||
|
// 2778
|
||
|
// Handle HTML strings // 2779
|
||
|
if ( typeof selector === "string" ) { // 2780
|
||
|
if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) { // 2781
|
||
|
// Assume that strings that start and end with <> are HTML and skip the regex check // 2782
|
||
|
match = [ null, selector, null ]; // 2783
|
||
|
// 2784
|
||
|
} else { // 2785
|
||
|
match = rquickExpr.exec( selector ); // 2786
|
||
|
} // 2787
|
||
|
// 2788
|
||
|
// Match html or make sure no context is specified for #id // 2789
|
||
|
if ( match && (match[1] || !context) ) { // 2790
|
||
|
// 2791
|
||
|
// HANDLE: $(html) -> $(array) // 2792
|
||
|
if ( match[1] ) { // 2793
|
||
|
context = context instanceof jQuery ? context[0] : context; // 2794
|
||
|
// 2795
|
||
|
// scripts is true for back-compat // 2796
|
||
|
// Intentionally let the error be thrown if parseHTML is not present // 2797
|
||
|
jQuery.merge( this, jQuery.parseHTML( // 2798
|
||
|
match[1], // 2799
|
||
|
context && context.nodeType ? context.ownerDocument || context : document, // 2800
|
||
|
true // 2801
|
||
|
) ); // 2802
|
||
|
// 2803
|
||
|
// HANDLE: $(html, props) // 2804
|
||
|
if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) { // 2805
|
||
|
for ( match in context ) { // 2806
|
||
|
// Properties of context are called as methods if possible // 2807
|
||
|
if ( jQuery.isFunction( this[ match ] ) ) { // 2808
|
||
|
this[ match ]( context[ match ] ); // 2809
|
||
|
// 2810
|
||
|
// ...and otherwise set as attributes // 2811
|
||
|
} else { // 2812
|
||
|
this.attr( match, context[ match ] ); // 2813
|
||
|
} // 2814
|
||
|
} // 2815
|
||
|
} // 2816
|
||
|
// 2817
|
||
|
return this; // 2818
|
||
|
// 2819
|
||
|
// HANDLE: $(#id) // 2820
|
||
|
} else { // 2821
|
||
|
elem = document.getElementById( match[2] ); // 2822
|
||
|
// 2823
|
||
|
// Check parentNode to catch when Blackberry 4.6 returns // 2824
|
||
|
// nodes that are no longer in the document #6963 // 2825
|
||
|
if ( elem && elem.parentNode ) { // 2826
|
||
|
// Handle the case where IE and Opera return items // 2827
|
||
|
// by name instead of ID // 2828
|
||
|
if ( elem.id !== match[2] ) { // 2829
|
||
|
return rootjQuery.find( selector ); // 2830
|
||
|
} // 2831
|
||
|
// 2832
|
||
|
// Otherwise, we inject the element directly into the jQuery object // 2833
|
||
|
this.length = 1; // 2834
|
||
|
this[0] = elem; // 2835
|
||
|
} // 2836
|
||
|
// 2837
|
||
|
this.context = document; // 2838
|
||
|
this.selector = selector; // 2839
|
||
|
return this; // 2840
|
||
|
} // 2841
|
||
|
// 2842
|
||
|
// HANDLE: $(expr, $(...)) // 2843
|
||
|
} else if ( !context || context.jquery ) { // 2844
|
||
|
return ( context || rootjQuery ).find( selector ); // 2845
|
||
|
// 2846
|
||
|
// HANDLE: $(expr, context) // 2847
|
||
|
// (which is just equivalent to: $(context).find(expr) // 2848
|
||
|
} else { // 2849
|
||
|
return this.constructor( context ).find( selector ); // 2850
|
||
|
} // 2851
|
||
|
// 2852
|
||
|
// HANDLE: $(DOMElement) // 2853
|
||
|
} else if ( selector.nodeType ) { // 2854
|
||
|
this.context = this[0] = selector; // 2855
|
||
|
this.length = 1; // 2856
|
||
|
return this; // 2857
|
||
|
// 2858
|
||
|
// HANDLE: $(function) // 2859
|
||
|
// Shortcut for document ready // 2860
|
||
|
} else if ( jQuery.isFunction( selector ) ) { // 2861
|
||
|
return typeof rootjQuery.ready !== "undefined" ? // 2862
|
||
|
rootjQuery.ready( selector ) : // 2863
|
||
|
// Execute immediately if ready is not present // 2864
|
||
|
selector( jQuery ); // 2865
|
||
|
} // 2866
|
||
|
// 2867
|
||
|
if ( selector.selector !== undefined ) { // 2868
|
||
|
this.selector = selector.selector; // 2869
|
||
|
this.context = selector.context; // 2870
|
||
|
} // 2871
|
||
|
// 2872
|
||
|
return jQuery.makeArray( selector, this ); // 2873
|
||
|
}; // 2874
|
||
|
// 2875
|
||
|
// Give the init function the jQuery prototype for later instantiation // 2876
|
||
|
init.prototype = jQuery.fn; // 2877
|
||
|
// 2878
|
||
|
// Initialize central reference // 2879
|
||
|
rootjQuery = jQuery( document ); // 2880
|
||
|
// 2881
|
||
|
// 2882
|
||
|
var rparentsprev = /^(?:parents|prev(?:Until|All))/, // 2883
|
||
|
// methods guaranteed to produce a unique set when starting from a unique set // 2884
|
||
|
guaranteedUnique = { // 2885
|
||
|
children: true, // 2886
|
||
|
contents: true, // 2887
|
||
|
next: true, // 2888
|
||
|
prev: true // 2889
|
||
|
}; // 2890
|
||
|
// 2891
|
||
|
jQuery.extend({ // 2892
|
||
|
dir: function( elem, dir, until ) { // 2893
|
||
|
var matched = [], // 2894
|
||
|
cur = elem[ dir ]; // 2895
|
||
|
// 2896
|
||
|
while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) { // 2897
|
||
|
if ( cur.nodeType === 1 ) { // 2898
|
||
|
matched.push( cur ); // 2899
|
||
|
} // 2900
|
||
|
cur = cur[dir]; // 2901
|
||
|
} // 2902
|
||
|
return matched; // 2903
|
||
|
}, // 2904
|
||
|
// 2905
|
||
|
sibling: function( n, elem ) { // 2906
|
||
|
var r = []; // 2907
|
||
|
// 2908
|
||
|
for ( ; n; n = n.nextSibling ) { // 2909
|
||
|
if ( n.nodeType === 1 && n !== elem ) { // 2910
|
||
|
r.push( n ); // 2911
|
||
|
} // 2912
|
||
|
} // 2913
|
||
|
// 2914
|
||
|
return r; // 2915
|
||
|
} // 2916
|
||
|
}); // 2917
|
||
|
// 2918
|
||
|
jQuery.fn.extend({ // 2919
|
||
|
has: function( target ) { // 2920
|
||
|
var i, // 2921
|
||
|
targets = jQuery( target, this ), // 2922
|
||
|
len = targets.length; // 2923
|
||
|
// 2924
|
||
|
return this.filter(function() { // 2925
|
||
|
for ( i = 0; i < len; i++ ) { // 2926
|
||
|
if ( jQuery.contains( this, targets[i] ) ) { // 2927
|
||
|
return true; // 2928
|
||
|
} // 2929
|
||
|
} // 2930
|
||
|
}); // 2931
|
||
|
}, // 2932
|
||
|
// 2933
|
||
|
closest: function( selectors, context ) { // 2934
|
||
|
var cur, // 2935
|
||
|
i = 0, // 2936
|
||
|
l = this.length, // 2937
|
||
|
matched = [], // 2938
|
||
|
pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ? // 2939
|
||
|
jQuery( selectors, context || this.context ) : // 2940
|
||
|
0; // 2941
|
||
|
// 2942
|
||
|
for ( ; i < l; i++ ) { // 2943
|
||
|
for ( cur = this[i]; cur && cur !== context; cur = cur.parentNode ) { // 2944
|
||
|
// Always skip document fragments // 2945
|
||
|
if ( cur.nodeType < 11 && (pos ? // 2946
|
||
|
pos.index(cur) > -1 : // 2947
|
||
|
// 2948
|
||
|
// Don't pass non-elements to Sizzle // 2949
|
||
|
cur.nodeType === 1 && // 2950
|
||
|
jQuery.find.matchesSelector(cur, selectors)) ) { // 2951
|
||
|
// 2952
|
||
|
matched.push( cur ); // 2953
|
||
|
break; // 2954
|
||
|
} // 2955
|
||
|
} // 2956
|
||
|
} // 2957
|
||
|
// 2958
|
||
|
return this.pushStack( matched.length > 1 ? jQuery.unique( matched ) : matched ); // 2959
|
||
|
}, // 2960
|
||
|
// 2961
|
||
|
// Determine the position of an element within // 2962
|
||
|
// the matched set of elements // 2963
|
||
|
index: function( elem ) { // 2964
|
||
|
// 2965
|
||
|
// No argument, return index in parent // 2966
|
||
|
if ( !elem ) { // 2967
|
||
|
return ( this[0] && this[0].parentNode ) ? this.first().prevAll().length : -1; // 2968
|
||
|
} // 2969
|
||
|
// 2970
|
||
|
// index in selector // 2971
|
||
|
if ( typeof elem === "string" ) { // 2972
|
||
|
return jQuery.inArray( this[0], jQuery( elem ) ); // 2973
|
||
|
} // 2974
|
||
|
// 2975
|
||
|
// Locate the position of the desired element // 2976
|
||
|
return jQuery.inArray( // 2977
|
||
|
// If it receives a jQuery object, the first element is used // 2978
|
||
|
elem.jquery ? elem[0] : elem, this ); // 2979
|
||
|
}, // 2980
|
||
|
// 2981
|
||
|
add: function( selector, context ) { // 2982
|
||
|
return this.pushStack( // 2983
|
||
|
jQuery.unique( // 2984
|
||
|
jQuery.merge( this.get(), jQuery( selector, context ) ) // 2985
|
||
|
) // 2986
|
||
|
); // 2987
|
||
|
}, // 2988
|
||
|
// 2989
|
||
|
addBack: function( selector ) { // 2990
|
||
|
return this.add( selector == null ? // 2991
|
||
|
this.prevObject : this.prevObject.filter(selector) // 2992
|
||
|
); // 2993
|
||
|
} // 2994
|
||
|
}); // 2995
|
||
|
// 2996
|
||
|
function sibling( cur, dir ) { // 2997
|
||
|
do { // 2998
|
||
|
cur = cur[ dir ]; // 2999
|
||
|
} while ( cur && cur.nodeType !== 1 ); // 3000
|
||
|
// 3001
|
||
|
return cur; // 3002
|
||
|
} // 3003
|
||
|
// 3004
|
||
|
jQuery.each({ // 3005
|
||
|
parent: function( elem ) { // 3006
|
||
|
var parent = elem.parentNode; // 3007
|
||
|
return parent && parent.nodeType !== 11 ? parent : null; // 3008
|
||
|
}, // 3009
|
||
|
parents: function( elem ) { // 3010
|
||
|
return jQuery.dir( elem, "parentNode" ); // 3011
|
||
|
}, // 3012
|
||
|
parentsUntil: function( elem, i, until ) { // 3013
|
||
|
return jQuery.dir( elem, "parentNode", until ); // 3014
|
||
|
}, // 3015
|
||
|
next: function( elem ) { // 3016
|
||
|
return sibling( elem, "nextSibling" ); // 3017
|
||
|
}, // 3018
|
||
|
prev: function( elem ) { // 3019
|
||
|
return sibling( elem, "previousSibling" ); // 3020
|
||
|
}, // 3021
|
||
|
nextAll: function( elem ) { // 3022
|
||
|
return jQuery.dir( elem, "nextSibling" ); // 3023
|
||
|
}, // 3024
|
||
|
prevAll: function( elem ) { // 3025
|
||
|
return jQuery.dir( elem, "previousSibling" ); // 3026
|
||
|
}, // 3027
|
||
|
nextUntil: function( elem, i, until ) { // 3028
|
||
|
return jQuery.dir( elem, "nextSibling", until ); // 3029
|
||
|
}, // 3030
|
||
|
prevUntil: function( elem, i, until ) { // 3031
|
||
|
return jQuery.dir( elem, "previousSibling", until ); // 3032
|
||
|
}, // 3033
|
||
|
siblings: function( elem ) { // 3034
|
||
|
return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem ); // 3035
|
||
|
}, // 3036
|
||
|
children: function( elem ) { // 3037
|
||
|
return jQuery.sibling( elem.firstChild ); // 3038
|
||
|
}, // 3039
|
||
|
contents: function( elem ) { // 3040
|
||
|
return jQuery.nodeName( elem, "iframe" ) ? // 3041
|
||
|
elem.contentDocument || elem.contentWindow.document : // 3042
|
||
|
jQuery.merge( [], elem.childNodes ); // 3043
|
||
|
} // 3044
|
||
|
}, function( name, fn ) { // 3045
|
||
|
jQuery.fn[ name ] = function( until, selector ) { // 3046
|
||
|
var ret = jQuery.map( this, fn, until ); // 3047
|
||
|
// 3048
|
||
|
if ( name.slice( -5 ) !== "Until" ) { // 3049
|
||
|
selector = until; // 3050
|
||
|
} // 3051
|
||
|
// 3052
|
||
|
if ( selector && typeof selector === "string" ) { // 3053
|
||
|
ret = jQuery.filter( selector, ret ); // 3054
|
||
|
} // 3055
|
||
|
// 3056
|
||
|
if ( this.length > 1 ) { // 3057
|
||
|
// Remove duplicates // 3058
|
||
|
if ( !guaranteedUnique[ name ] ) { // 3059
|
||
|
ret = jQuery.unique( ret ); // 3060
|
||
|
} // 3061
|
||
|
// 3062
|
||
|
// Reverse order for parents* and prev-derivatives // 3063
|
||
|
if ( rparentsprev.test( name ) ) { // 3064
|
||
|
ret = ret.reverse(); // 3065
|
||
|
} // 3066
|
||
|
} // 3067
|
||
|
// 3068
|
||
|
return this.pushStack( ret ); // 3069
|
||
|
}; // 3070
|
||
|
}); // 3071
|
||
|
var rnotwhite = (/\S+/g); // 3072
|
||
|
// 3073
|
||
|
// 3074
|
||
|
// 3075
|
||
|
// String to Object options format cache // 3076
|
||
|
var optionsCache = {}; // 3077
|
||
|
// 3078
|
||
|
// Convert String-formatted options into Object-formatted ones and store in cache // 3079
|
||
|
function createOptions( options ) { // 3080
|
||
|
var object = optionsCache[ options ] = {}; // 3081
|
||
|
jQuery.each( options.match( rnotwhite ) || [], function( _, flag ) { // 3082
|
||
|
object[ flag ] = true; // 3083
|
||
|
}); // 3084
|
||
|
return object; // 3085
|
||
|
} // 3086
|
||
|
// 3087
|
||
|
/* // 3088
|
||
|
* Create a callback list using the following parameters: // 3089
|
||
|
* // 3090
|
||
|
* options: an optional list of space-separated options that will change how // 3091
|
||
|
* the callback list behaves or a more traditional option object // 3092
|
||
|
* // 3093
|
||
|
* By default a callback list will act like an event callback list and can be // 3094
|
||
|
* "fired" multiple times. // 3095
|
||
|
* // 3096
|
||
|
* Possible options: // 3097
|
||
|
* // 3098
|
||
|
* once: will ensure the callback list can only be fired once (like a Deferred) // 3099
|
||
|
* // 3100
|
||
|
* memory: will keep track of previous values and will call any callback added // 3101
|
||
|
* after the list has been fired right away with the latest "memorized" // 3102
|
||
|
* values (like a Deferred) // 3103
|
||
|
* // 3104
|
||
|
* unique: will ensure a callback can only be added once (no duplicate in the list) // 3105
|
||
|
* // 3106
|
||
|
* stopOnFalse: interrupt callings when a callback returns false // 3107
|
||
|
* // 3108
|
||
|
*/ // 3109
|
||
|
jQuery.Callbacks = function( options ) { // 3110
|
||
|
// 3111
|
||
|
// Convert options from String-formatted to Object-formatted if needed // 3112
|
||
|
// (we check in cache first) // 3113
|
||
|
options = typeof options === "string" ? // 3114
|
||
|
( optionsCache[ options ] || createOptions( options ) ) : // 3115
|
||
|
jQuery.extend( {}, options ); // 3116
|
||
|
// 3117
|
||
|
var // Flag to know if list is currently firing // 3118
|
||
|
firing, // 3119
|
||
|
// Last fire value (for non-forgettable lists) // 3120
|
||
|
memory, // 3121
|
||
|
// Flag to know if list was already fired // 3122
|
||
|
fired, // 3123
|
||
|
// End of the loop when firing // 3124
|
||
|
firingLength, // 3125
|
||
|
// Index of currently firing callback (modified by remove if needed) // 3126
|
||
|
firingIndex, // 3127
|
||
|
// First callback to fire (used internally by add and fireWith) // 3128
|
||
|
firingStart, // 3129
|
||
|
// Actual callback list // 3130
|
||
|
list = [], // 3131
|
||
|
// Stack of fire calls for repeatable lists // 3132
|
||
|
stack = !options.once && [], // 3133
|
||
|
// Fire callbacks // 3134
|
||
|
fire = function( data ) { // 3135
|
||
|
memory = options.memory && data; // 3136
|
||
|
fired = true; // 3137
|
||
|
firingIndex = firingStart || 0; // 3138
|
||
|
firingStart = 0; // 3139
|
||
|
firingLength = list.length; // 3140
|
||
|
firing = true; // 3141
|
||
|
for ( ; list && firingIndex < firingLength; firingIndex++ ) { // 3142
|
||
|
if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) { // 3143
|
||
|
memory = false; // To prevent further calls using add // 3144
|
||
|
break; // 3145
|
||
|
} // 3146
|
||
|
} // 3147
|
||
|
firing = false; // 3148
|
||
|
if ( list ) { // 3149
|
||
|
if ( stack ) { // 3150
|
||
|
if ( stack.length ) { // 3151
|
||
|
fire( stack.shift() ); // 3152
|
||
|
} // 3153
|
||
|
} else if ( memory ) { // 3154
|
||
|
list = []; // 3155
|
||
|
} else { // 3156
|
||
|
self.disable(); // 3157
|
||
|
} // 3158
|
||
|
} // 3159
|
||
|
}, // 3160
|
||
|
// Actual Callbacks object // 3161
|
||
|
self = { // 3162
|
||
|
// Add a callback or a collection of callbacks to the list // 3163
|
||
|
add: function() { // 3164
|
||
|
if ( list ) { // 3165
|
||
|
// First, we save the current length // 3166
|
||
|
var start = list.length; // 3167
|
||
|
(function add( args ) { // 3168
|
||
|
jQuery.each( args, function( _, arg ) { // 3169
|
||
|
var type = jQuery.type( arg ); // 3170
|
||
|
if ( type === "function" ) { // 3171
|
||
|
if ( !options.unique || !self.has( arg ) ) { // 3172
|
||
|
list.push( arg ); // 3173
|
||
|
} // 3174
|
||
|
} else if ( arg && arg.length && type !== "string" ) { // 3175
|
||
|
// Inspect recursively // 3176
|
||
|
add( arg ); // 3177
|
||
|
} // 3178
|
||
|
}); // 3179
|
||
|
})( arguments ); // 3180
|
||
|
// Do we need to add the callbacks to the // 3181
|
||
|
// current firing batch? // 3182
|
||
|
if ( firing ) { // 3183
|
||
|
firingLength = list.length; // 3184
|
||
|
// With memory, if we're not firing then // 3185
|
||
|
// we should call right away // 3186
|
||
|
} else if ( memory ) { // 3187
|
||
|
firingStart = start; // 3188
|
||
|
fire( memory ); // 3189
|
||
|
} // 3190
|
||
|
} // 3191
|
||
|
return this; // 3192
|
||
|
}, // 3193
|
||
|
// Remove a callback from the list // 3194
|
||
|
remove: function() { // 3195
|
||
|
if ( list ) { // 3196
|
||
|
jQuery.each( arguments, function( _, arg ) { // 3197
|
||
|
var index; // 3198
|
||
|
while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) { // 3199
|
||
|
list.splice( index, 1 ); // 3200
|
||
|
// Handle firing indexes // 3201
|
||
|
if ( firing ) { // 3202
|
||
|
if ( index <= firingLength ) { // 3203
|
||
|
firingLength--; // 3204
|
||
|
} // 3205
|
||
|
if ( index <= firingIndex ) { // 3206
|
||
|
firingIndex--; // 3207
|
||
|
} // 3208
|
||
|
} // 3209
|
||
|
} // 3210
|
||
|
}); // 3211
|
||
|
} // 3212
|
||
|
return this; // 3213
|
||
|
}, // 3214
|
||
|
// Check if a given callback is in the list. // 3215
|
||
|
// If no argument is given, return whether or not list has callbacks attached. // 3216
|
||
|
has: function( fn ) { // 3217
|
||
|
return fn ? jQuery.inArray( fn, list ) > -1 : !!( list && list.length ); // 3218
|
||
|
}, // 3219
|
||
|
// Remove all callbacks from the list // 3220
|
||
|
empty: function() { // 3221
|
||
|
list = []; // 3222
|
||
|
firingLength = 0; // 3223
|
||
|
return this; // 3224
|
||
|
}, // 3225
|
||
|
// Have the list do nothing anymore // 3226
|
||
|
disable: function() { // 3227
|
||
|
list = stack = memory = undefined; // 3228
|
||
|
return this; // 3229
|
||
|
}, // 3230
|
||
|
// Is it disabled? // 3231
|
||
|
disabled: function() { // 3232
|
||
|
return !list; // 3233
|
||
|
}, // 3234
|
||
|
// Lock the list in its current state // 3235
|
||
|
lock: function() { // 3236
|
||
|
stack = undefined; // 3237
|
||
|
if ( !memory ) { // 3238
|
||
|
self.disable(); // 3239
|
||
|
} // 3240
|
||
|
return this; // 3241
|
||
|
}, // 3242
|
||
|
// Is it locked? // 3243
|
||
|
locked: function() { // 3244
|
||
|
return !stack; // 3245
|
||
|
}, // 3246
|
||
|
// Call all callbacks with the given context and arguments // 3247
|
||
|
fireWith: function( context, args ) { // 3248
|
||
|
if ( list && ( !fired || stack ) ) { // 3249
|
||
|
args = args || []; // 3250
|
||
|
args = [ context, args.slice ? args.slice() : args ]; // 3251
|
||
|
if ( firing ) { // 3252
|
||
|
stack.push( args ); // 3253
|
||
|
} else { // 3254
|
||
|
fire( args ); // 3255
|
||
|
} // 3256
|
||
|
} // 3257
|
||
|
return this; // 3258
|
||
|
}, // 3259
|
||
|
// Call all the callbacks with the given arguments // 3260
|
||
|
fire: function() { // 3261
|
||
|
self.fireWith( this, arguments ); // 3262
|
||
|
return this; // 3263
|
||
|
}, // 3264
|
||
|
// To know if the callbacks have already been called at least once // 3265
|
||
|
fired: function() { // 3266
|
||
|
return !!fired; // 3267
|
||
|
} // 3268
|
||
|
}; // 3269
|
||
|
// 3270
|
||
|
return self; // 3271
|
||
|
}; // 3272
|
||
|
// 3273
|
||
|
// 3274
|
||
|
jQuery.extend({ // 3275
|
||
|
// 3276
|
||
|
Deferred: function( func ) { // 3277
|
||
|
var tuples = [ // 3278
|
||
|
// action, add listener, listener list, final state // 3279
|
||
|
[ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ], // 3280
|
||
|
[ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ], // 3281
|
||
|
[ "notify", "progress", jQuery.Callbacks("memory") ] // 3282
|
||
|
], // 3283
|
||
|
state = "pending", // 3284
|
||
|
promise = { // 3285
|
||
|
state: function() { // 3286
|
||
|
return state; // 3287
|
||
|
}, // 3288
|
||
|
always: function() { // 3289
|
||
|
deferred.done( arguments ).fail( arguments ); // 3290
|
||
|
return this; // 3291
|
||
|
}, // 3292
|
||
|
then: function( /* fnDone, fnFail, fnProgress */ ) { // 3293
|
||
|
var fns = arguments; // 3294
|
||
|
return jQuery.Deferred(function( newDefer ) { // 3295
|
||
|
jQuery.each( tuples, function( i, tuple ) { // 3296
|
||
|
var fn = jQuery.isFunction( fns[ i ] ) && fns[ i ]; // 3297
|
||
|
// deferred[ done | fail | progress ] for forwarding actions to newDefer // 3298
|
||
|
deferred[ tuple[1] ](function() { // 3299
|
||
|
var returned = fn && fn.apply( this, arguments ); // 3300
|
||
|
if ( returned && jQuery.isFunction( returned.promise ) ) { // 3301
|
||
|
returned.promise() // 3302
|
||
|
.done( newDefer.resolve ) // 3303
|
||
|
.fail( newDefer.reject ) // 3304
|
||
|
.progress( newDefer.notify ); // 3305
|
||
|
} else { // 3306
|
||
|
newDefer[ tuple[ 0 ] + "With" ]( this === promise ? newDefer.promise() : this, fn ? [ returned ] : arguments );
|
||
|
} // 3308
|
||
|
}); // 3309
|
||
|
}); // 3310
|
||
|
fns = null; // 3311
|
||
|
}).promise(); // 3312
|
||
|
}, // 3313
|
||
|
// Get a promise for this deferred // 3314
|
||
|
// If obj is provided, the promise aspect is added to the object // 3315
|
||
|
promise: function( obj ) { // 3316
|
||
|
return obj != null ? jQuery.extend( obj, promise ) : promise; // 3317
|
||
|
} // 3318
|
||
|
}, // 3319
|
||
|
deferred = {}; // 3320
|
||
|
// 3321
|
||
|
// Keep pipe for back-compat // 3322
|
||
|
promise.pipe = promise.then; // 3323
|
||
|
// 3324
|
||
|
// Add list-specific methods // 3325
|
||
|
jQuery.each( tuples, function( i, tuple ) { // 3326
|
||
|
var list = tuple[ 2 ], // 3327
|
||
|
stateString = tuple[ 3 ]; // 3328
|
||
|
// 3329
|
||
|
// promise[ done | fail | progress ] = list.add // 3330
|
||
|
promise[ tuple[1] ] = list.add; // 3331
|
||
|
// 3332
|
||
|
// Handle state // 3333
|
||
|
if ( stateString ) { // 3334
|
||
|
list.add(function() { // 3335
|
||
|
// state = [ resolved | rejected ] // 3336
|
||
|
state = stateString; // 3337
|
||
|
// 3338
|
||
|
// [ reject_list | resolve_list ].disable; progress_list.lock // 3339
|
||
|
}, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock ); // 3340
|
||
|
} // 3341
|
||
|
// 3342
|
||
|
// deferred[ resolve | reject | notify ] // 3343
|
||
|
deferred[ tuple[0] ] = function() { // 3344
|
||
|
deferred[ tuple[0] + "With" ]( this === deferred ? promise : this, arguments ); // 3345
|
||
|
return this; // 3346
|
||
|
}; // 3347
|
||
|
deferred[ tuple[0] + "With" ] = list.fireWith; // 3348
|
||
|
}); // 3349
|
||
|
// 3350
|
||
|
// Make the deferred a promise // 3351
|
||
|
promise.promise( deferred ); // 3352
|
||
|
// 3353
|
||
|
// Call given func if any // 3354
|
||
|
if ( func ) { // 3355
|
||
|
func.call( deferred, deferred ); // 3356
|
||
|
} // 3357
|
||
|
// 3358
|
||
|
// All done! // 3359
|
||
|
return deferred; // 3360
|
||
|
}, // 3361
|
||
|
// 3362
|
||
|
// Deferred helper // 3363
|
||
|
when: function( subordinate /* , ..., subordinateN */ ) { // 3364
|
||
|
var i = 0, // 3365
|
||
|
resolveValues = slice.call( arguments ), // 3366
|
||
|
length = resolveValues.length, // 3367
|
||
|
// 3368
|
||
|
// the count of uncompleted subordinates // 3369
|
||
|
remaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0, // 3370
|
||
|
// 3371
|
||
|
// the master Deferred. If resolveValues consist of only a single Deferred, just use that. // 3372
|
||
|
deferred = remaining === 1 ? subordinate : jQuery.Deferred(), // 3373
|
||
|
// 3374
|
||
|
// Update function for both resolve and progress values // 3375
|
||
|
updateFunc = function( i, contexts, values ) { // 3376
|
||
|
return function( value ) { // 3377
|
||
|
contexts[ i ] = this; // 3378
|
||
|
values[ i ] = arguments.length > 1 ? slice.call( arguments ) : value; // 3379
|
||
|
if ( values === progressValues ) { // 3380
|
||
|
deferred.notifyWith( contexts, values ); // 3381
|
||
|
// 3382
|
||
|
} else if ( !(--remaining) ) { // 3383
|
||
|
deferred.resolveWith( contexts, values ); // 3384
|
||
|
} // 3385
|
||
|
}; // 3386
|
||
|
}, // 3387
|
||
|
// 3388
|
||
|
progressValues, progressContexts, resolveContexts; // 3389
|
||
|
// 3390
|
||
|
// add listeners to Deferred subordinates; treat others as resolved // 3391
|
||
|
if ( length > 1 ) { // 3392
|
||
|
progressValues = new Array( length ); // 3393
|
||
|
progressContexts = new Array( length ); // 3394
|
||
|
resolveContexts = new Array( length ); // 3395
|
||
|
for ( ; i < length; i++ ) { // 3396
|
||
|
if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) { // 3397
|
||
|
resolveValues[ i ].promise() // 3398
|
||
|
.done( updateFunc( i, resolveContexts, resolveValues ) ) // 3399
|
||
|
.fail( deferred.reject ) // 3400
|
||
|
.progress( updateFunc( i, progressContexts, progressValues ) ); // 3401
|
||
|
} else { // 3402
|
||
|
--remaining; // 3403
|
||
|
} // 3404
|
||
|
} // 3405
|
||
|
} // 3406
|
||
|
// 3407
|
||
|
// if we're not waiting on anything, resolve the master // 3408
|
||
|
if ( !remaining ) { // 3409
|
||
|
deferred.resolveWith( resolveContexts, resolveValues ); // 3410
|
||
|
} // 3411
|
||
|
// 3412
|
||
|
return deferred.promise(); // 3413
|
||
|
} // 3414
|
||
|
}); // 3415
|
||
|
// 3416
|
||
|
// 3417
|
||
|
// The deferred used on DOM ready // 3418
|
||
|
var readyList; // 3419
|
||
|
// 3420
|
||
|
jQuery.fn.ready = function( fn ) { // 3421
|
||
|
// Add the callback // 3422
|
||
|
jQuery.ready.promise().done( fn ); // 3423
|
||
|
// 3424
|
||
|
return this; // 3425
|
||
|
}; // 3426
|
||
|
// 3427
|
||
|
jQuery.extend({ // 3428
|
||
|
// Is the DOM ready to be used? Set to true once it occurs. // 3429
|
||
|
isReady: false, // 3430
|
||
|
// 3431
|
||
|
// A counter to track how many items to wait for before // 3432
|
||
|
// the ready event fires. See #6781 // 3433
|
||
|
readyWait: 1, // 3434
|
||
|
// 3435
|
||
|
// Hold (or release) the ready event // 3436
|
||
|
holdReady: function( hold ) { // 3437
|
||
|
if ( hold ) { // 3438
|
||
|
jQuery.readyWait++; // 3439
|
||
|
} else { // 3440
|
||
|
jQuery.ready( true ); // 3441
|
||
|
} // 3442
|
||
|
}, // 3443
|
||
|
// 3444
|
||
|
// Handle when the DOM is ready // 3445
|
||
|
ready: function( wait ) { // 3446
|
||
|
// 3447
|
||
|
// Abort if there are pending holds or we're already ready // 3448
|
||
|
if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) { // 3449
|
||
|
return; // 3450
|
||
|
} // 3451
|
||
|
// 3452
|
||
|
// Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). // 3453
|
||
|
if ( !document.body ) { // 3454
|
||
|
return setTimeout( jQuery.ready ); // 3455
|
||
|
} // 3456
|
||
|
// 3457
|
||
|
// Remember that the DOM is ready // 3458
|
||
|
jQuery.isReady = true; // 3459
|
||
|
// 3460
|
||
|
// If a normal DOM Ready event fired, decrement, and wait if need be // 3461
|
||
|
if ( wait !== true && --jQuery.readyWait > 0 ) { // 3462
|
||
|
return; // 3463
|
||
|
} // 3464
|
||
|
// 3465
|
||
|
// If there are functions bound, to execute // 3466
|
||
|
readyList.resolveWith( document, [ jQuery ] ); // 3467
|
||
|
// 3468
|
||
|
// Trigger any bound ready events // 3469
|
||
|
if ( jQuery.fn.triggerHandler ) { // 3470
|
||
|
jQuery( document ).triggerHandler( "ready" ); // 3471
|
||
|
jQuery( document ).off( "ready" ); // 3472
|
||
|
} // 3473
|
||
|
} // 3474
|
||
|
}); // 3475
|
||
|
// 3476
|
||
|
/** // 3477
|
||
|
* Clean-up method for dom ready events // 3478
|
||
|
*/ // 3479
|
||
|
function detach() { // 3480
|
||
|
if ( document.addEventListener ) { // 3481
|
||
|
document.removeEventListener( "DOMContentLoaded", completed, false ); // 3482
|
||
|
window.removeEventListener( "load", completed, false ); // 3483
|
||
|
// 3484
|
||
|
} else { // 3485
|
||
|
document.detachEvent( "onreadystatechange", completed ); // 3486
|
||
|
window.detachEvent( "onload", completed ); // 3487
|
||
|
} // 3488
|
||
|
} // 3489
|
||
|
// 3490
|
||
|
/** // 3491
|
||
|
* The ready event handler and self cleanup method // 3492
|
||
|
*/ // 3493
|
||
|
function completed() { // 3494
|
||
|
// readyState === "complete" is good enough for us to call the dom ready in oldIE // 3495
|
||
|
if ( document.addEventListener || event.type === "load" || document.readyState === "complete" ) { // 3496
|
||
|
detach(); // 3497
|
||
|
jQuery.ready(); // 3498
|
||
|
} // 3499
|
||
|
} // 3500
|
||
|
// 3501
|
||
|
jQuery.ready.promise = function( obj ) { // 3502
|
||
|
if ( !readyList ) { // 3503
|
||
|
// 3504
|
||
|
readyList = jQuery.Deferred(); // 3505
|
||
|
// 3506
|
||
|
// Catch cases where $(document).ready() is called after the browser event has already occurred. // 3507
|
||
|
// we once tried to use readyState "interactive" here, but it caused issues like the one // 3508
|
||
|
// discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15 // 3509
|
||
|
if ( document.readyState === "complete" ) { // 3510
|
||
|
// Handle it asynchronously to allow scripts the opportunity to delay ready // 3511
|
||
|
setTimeout( jQuery.ready ); // 3512
|
||
|
// 3513
|
||
|
// Standards-based browsers support DOMContentLoaded // 3514
|
||
|
} else if ( document.addEventListener ) { // 3515
|
||
|
// Use the handy event callback // 3516
|
||
|
document.addEventListener( "DOMContentLoaded", completed, false ); // 3517
|
||
|
// 3518
|
||
|
// A fallback to window.onload, that will always work // 3519
|
||
|
window.addEventListener( "load", completed, false ); // 3520
|
||
|
// 3521
|
||
|
// If IE event model is used // 3522
|
||
|
} else { // 3523
|
||
|
// Ensure firing before onload, maybe late but safe also for iframes // 3524
|
||
|
document.attachEvent( "onreadystatechange", completed ); // 3525
|
||
|
// 3526
|
||
|
// A fallback to window.onload, that will always work // 3527
|
||
|
window.attachEvent( "onload", completed ); // 3528
|
||
|
// 3529
|
||
|
// If IE and not a frame // 3530
|
||
|
// continually check to see if the document is ready // 3531
|
||
|
var top = false; // 3532
|
||
|
// 3533
|
||
|
try { // 3534
|
||
|
top = window.frameElement == null && document.documentElement; // 3535
|
||
|
} catch(e) {} // 3536
|
||
|
// 3537
|
||
|
if ( top && top.doScroll ) { // 3538
|
||
|
(function doScrollCheck() { // 3539
|
||
|
if ( !jQuery.isReady ) { // 3540
|
||
|
// 3541
|
||
|
try { // 3542
|
||
|
// Use the trick by Diego Perini // 3543
|
||
|
// http://javascript.nwbox.com/IEContentLoaded/ // 3544
|
||
|
top.doScroll("left"); // 3545
|
||
|
} catch(e) { // 3546
|
||
|
return setTimeout( doScrollCheck, 50 ); // 3547
|
||
|
} // 3548
|
||
|
// 3549
|
||
|
// detach all dom ready events // 3550
|
||
|
detach(); // 3551
|
||
|
// 3552
|
||
|
// and execute any waiting functions // 3553
|
||
|
jQuery.ready(); // 3554
|
||
|
} // 3555
|
||
|
})(); // 3556
|
||
|
} // 3557
|
||
|
} // 3558
|
||
|
} // 3559
|
||
|
return readyList.promise( obj ); // 3560
|
||
|
}; // 3561
|
||
|
// 3562
|
||
|
// 3563
|
||
|
var strundefined = typeof undefined; // 3564
|
||
|
// 3565
|
||
|
// 3566
|
||
|
// 3567
|
||
|
// Support: IE<9 // 3568
|
||
|
// Iteration over object's inherited properties before its own // 3569
|
||
|
var i; // 3570
|
||
|
for ( i in jQuery( support ) ) { // 3571
|
||
|
break; // 3572
|
||
|
} // 3573
|
||
|
support.ownLast = i !== "0"; // 3574
|
||
|
// 3575
|
||
|
// Note: most support tests are defined in their respective modules. // 3576
|
||
|
// false until the test is run // 3577
|
||
|
support.inlineBlockNeedsLayout = false; // 3578
|
||
|
// 3579
|
||
|
// Execute ASAP in case we need to set body.style.zoom // 3580
|
||
|
jQuery(function() { // 3581
|
||
|
// Minified: var a,b,c,d // 3582
|
||
|
var val, div, body, container; // 3583
|
||
|
// 3584
|
||
|
body = document.getElementsByTagName( "body" )[ 0 ]; // 3585
|
||
|
if ( !body || !body.style ) { // 3586
|
||
|
// Return for frameset docs that don't have a body // 3587
|
||
|
return; // 3588
|
||
|
} // 3589
|
||
|
// 3590
|
||
|
// Setup // 3591
|
||
|
div = document.createElement( "div" ); // 3592
|
||
|
container = document.createElement( "div" ); // 3593
|
||
|
container.style.cssText = "position:absolute;border:0;width:0;height:0;top:0;left:-9999px"; // 3594
|
||
|
body.appendChild( container ).appendChild( div ); // 3595
|
||
|
// 3596
|
||
|
if ( typeof div.style.zoom !== strundefined ) { // 3597
|
||
|
// Support: IE<8 // 3598
|
||
|
// Check if natively block-level elements act like inline-block // 3599
|
||
|
// elements when setting their display to 'inline' and giving // 3600
|
||
|
// them layout // 3601
|
||
|
div.style.cssText = "display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1"; // 3602
|
||
|
// 3603
|
||
|
support.inlineBlockNeedsLayout = val = div.offsetWidth === 3; // 3604
|
||
|
if ( val ) { // 3605
|
||
|
// Prevent IE 6 from affecting layout for positioned elements #11048 // 3606
|
||
|
// Prevent IE from shrinking the body in IE 7 mode #12869 // 3607
|
||
|
// Support: IE<8 // 3608
|
||
|
body.style.zoom = 1; // 3609
|
||
|
} // 3610
|
||
|
} // 3611
|
||
|
// 3612
|
||
|
body.removeChild( container ); // 3613
|
||
|
}); // 3614
|
||
|
// 3615
|
||
|
// 3616
|
||
|
// 3617
|
||
|
// 3618
|
||
|
(function() { // 3619
|
||
|
var div = document.createElement( "div" ); // 3620
|
||
|
// 3621
|
||
|
// Execute the test only if not already executed in another module. // 3622
|
||
|
if (support.deleteExpando == null) { // 3623
|
||
|
// Support: IE<9 // 3624
|
||
|
support.deleteExpando = true; // 3625
|
||
|
try { // 3626
|
||
|
delete div.test; // 3627
|
||
|
} catch( e ) { // 3628
|
||
|
support.deleteExpando = false; // 3629
|
||
|
} // 3630
|
||
|
} // 3631
|
||
|
// 3632
|
||
|
// Null elements to avoid leaks in IE. // 3633
|
||
|
div = null; // 3634
|
||
|
})(); // 3635
|
||
|
// 3636
|
||
|
// 3637
|
||
|
/** // 3638
|
||
|
* Determines whether an object can have data // 3639
|
||
|
*/ // 3640
|
||
|
jQuery.acceptData = function( elem ) { // 3641
|
||
|
var noData = jQuery.noData[ (elem.nodeName + " ").toLowerCase() ], // 3642
|
||
|
nodeType = +elem.nodeType || 1; // 3643
|
||
|
// 3644
|
||
|
// Do not set data on non-element DOM nodes because it will not be cleared (#8335). // 3645
|
||
|
return nodeType !== 1 && nodeType !== 9 ? // 3646
|
||
|
false : // 3647
|
||
|
// 3648
|
||
|
// Nodes accept data unless otherwise specified; rejection can be conditional // 3649
|
||
|
!noData || noData !== true && elem.getAttribute("classid") === noData; // 3650
|
||
|
}; // 3651
|
||
|
// 3652
|
||
|
// 3653
|
||
|
var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/, // 3654
|
||
|
rmultiDash = /([A-Z])/g; // 3655
|
||
|
// 3656
|
||
|
function dataAttr( elem, key, data ) { // 3657
|
||
|
// If nothing was found internally, try to fetch any // 3658
|
||
|
// data from the HTML5 data-* attribute // 3659
|
||
|
if ( data === undefined && elem.nodeType === 1 ) { // 3660
|
||
|
// 3661
|
||
|
var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase(); // 3662
|
||
|
// 3663
|
||
|
data = elem.getAttribute( name ); // 3664
|
||
|
// 3665
|
||
|
if ( typeof data === "string" ) { // 3666
|
||
|
try { // 3667
|
||
|
data = data === "true" ? true : // 3668
|
||
|
data === "false" ? false : // 3669
|
||
|
data === "null" ? null : // 3670
|
||
|
// Only convert to a number if it doesn't change the string // 3671
|
||
|
+data + "" === data ? +data : // 3672
|
||
|
rbrace.test( data ) ? jQuery.parseJSON( data ) : // 3673
|
||
|
data; // 3674
|
||
|
} catch( e ) {} // 3675
|
||
|
// 3676
|
||
|
// Make sure we set the data so it isn't changed later // 3677
|
||
|
jQuery.data( elem, key, data ); // 3678
|
||
|
// 3679
|
||
|
} else { // 3680
|
||
|
data = undefined; // 3681
|
||
|
} // 3682
|
||
|
} // 3683
|
||
|
// 3684
|
||
|
return data; // 3685
|
||
|
} // 3686
|
||
|
// 3687
|
||
|
// checks a cache object for emptiness // 3688
|
||
|
function isEmptyDataObject( obj ) { // 3689
|
||
|
var name; // 3690
|
||
|
for ( name in obj ) { // 3691
|
||
|
// 3692
|
||
|
// if the public data object is empty, the private is still empty // 3693
|
||
|
if ( name === "data" && jQuery.isEmptyObject( obj[name] ) ) { // 3694
|
||
|
continue; // 3695
|
||
|
} // 3696
|
||
|
if ( name !== "toJSON" ) { // 3697
|
||
|
return false; // 3698
|
||
|
} // 3699
|
||
|
} // 3700
|
||
|
// 3701
|
||
|
return true; // 3702
|
||
|
} // 3703
|
||
|
// 3704
|
||
|
function internalData( elem, name, data, pvt /* Internal Use Only */ ) { // 3705
|
||
|
if ( !jQuery.acceptData( elem ) ) { // 3706
|
||
|
return; // 3707
|
||
|
} // 3708
|
||
|
// 3709
|
||
|
var ret, thisCache, // 3710
|
||
|
internalKey = jQuery.expando, // 3711
|
||
|
// 3712
|
||
|
// We have to handle DOM nodes and JS objects differently because IE6-7 // 3713
|
||
|
// can't GC object references properly across the DOM-JS boundary // 3714
|
||
|
isNode = elem.nodeType, // 3715
|
||
|
// 3716
|
||
|
// Only DOM nodes need the global jQuery cache; JS object data is // 3717
|
||
|
// attached directly to the object so GC can occur automatically // 3718
|
||
|
cache = isNode ? jQuery.cache : elem, // 3719
|
||
|
// 3720
|
||
|
// Only defining an ID for JS objects if its cache already exists allows // 3721
|
||
|
// the code to shortcut on the same path as a DOM node with no cache // 3722
|
||
|
id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey; // 3723
|
||
|
// 3724
|
||
|
// Avoid doing any more work than we need to when trying to get data on an // 3725
|
||
|
// object that has no data at all // 3726
|
||
|
if ( (!id || !cache[id] || (!pvt && !cache[id].data)) && data === undefined && typeof name === "string" ) { // 3727
|
||
|
return; // 3728
|
||
|
} // 3729
|
||
|
// 3730
|
||
|
if ( !id ) { // 3731
|
||
|
// Only DOM nodes need a new unique ID for each element since their data // 3732
|
||
|
// ends up in the global cache // 3733
|
||
|
if ( isNode ) { // 3734
|
||
|
id = elem[ internalKey ] = deletedIds.pop() || jQuery.guid++; // 3735
|
||
|
} else { // 3736
|
||
|
id = internalKey; // 3737
|
||
|
} // 3738
|
||
|
} // 3739
|
||
|
// 3740
|
||
|
if ( !cache[ id ] ) { // 3741
|
||
|
// Avoid exposing jQuery metadata on plain JS objects when the object // 3742
|
||
|
// is serialized using JSON.stringify // 3743
|
||
|
cache[ id ] = isNode ? {} : { toJSON: jQuery.noop }; // 3744
|
||
|
} // 3745
|
||
|
// 3746
|
||
|
// An object can be passed to jQuery.data instead of a key/value pair; this gets // 3747
|
||
|
// shallow copied over onto the existing cache // 3748
|
||
|
if ( typeof name === "object" || typeof name === "function" ) { // 3749
|
||
|
if ( pvt ) { // 3750
|
||
|
cache[ id ] = jQuery.extend( cache[ id ], name ); // 3751
|
||
|
} else { // 3752
|
||
|
cache[ id ].data = jQuery.extend( cache[ id ].data, name ); // 3753
|
||
|
} // 3754
|
||
|
} // 3755
|
||
|
// 3756
|
||
|
thisCache = cache[ id ]; // 3757
|
||
|
// 3758
|
||
|
// jQuery data() is stored in a separate object inside the object's internal data // 3759
|
||
|
// cache in order to avoid key collisions between internal data and user-defined // 3760
|
||
|
// data. // 3761
|
||
|
if ( !pvt ) { // 3762
|
||
|
if ( !thisCache.data ) { // 3763
|
||
|
thisCache.data = {}; // 3764
|
||
|
} // 3765
|
||
|
// 3766
|
||
|
thisCache = thisCache.data; // 3767
|
||
|
} // 3768
|
||
|
// 3769
|
||
|
if ( data !== undefined ) { // 3770
|
||
|
thisCache[ jQuery.camelCase( name ) ] = data; // 3771
|
||
|
} // 3772
|
||
|
// 3773
|
||
|
// Check for both converted-to-camel and non-converted data property names // 3774
|
||
|
// If a data property was specified // 3775
|
||
|
if ( typeof name === "string" ) { // 3776
|
||
|
// 3777
|
||
|
// First Try to find as-is property data // 3778
|
||
|
ret = thisCache[ name ]; // 3779
|
||
|
// 3780
|
||
|
// Test for null|undefined property data // 3781
|
||
|
if ( ret == null ) { // 3782
|
||
|
// 3783
|
||
|
// Try to find the camelCased property // 3784
|
||
|
ret = thisCache[ jQuery.camelCase( name ) ]; // 3785
|
||
|
} // 3786
|
||
|
} else { // 3787
|
||
|
ret = thisCache; // 3788
|
||
|
} // 3789
|
||
|
// 3790
|
||
|
return ret; // 3791
|
||
|
} // 3792
|
||
|
// 3793
|
||
|
function internalRemoveData( elem, name, pvt ) { // 3794
|
||
|
if ( !jQuery.acceptData( elem ) ) { // 3795
|
||
|
return; // 3796
|
||
|
} // 3797
|
||
|
// 3798
|
||
|
var thisCache, i, // 3799
|
||
|
isNode = elem.nodeType, // 3800
|
||
|
// 3801
|
||
|
// See jQuery.data for more information // 3802
|
||
|
cache = isNode ? jQuery.cache : elem, // 3803
|
||
|
id = isNode ? elem[ jQuery.expando ] : jQuery.expando; // 3804
|
||
|
// 3805
|
||
|
// If there is already no cache entry for this object, there is no // 3806
|
||
|
// purpose in continuing // 3807
|
||
|
if ( !cache[ id ] ) { // 3808
|
||
|
return; // 3809
|
||
|
} // 3810
|
||
|
// 3811
|
||
|
if ( name ) { // 3812
|
||
|
// 3813
|
||
|
thisCache = pvt ? cache[ id ] : cache[ id ].data; // 3814
|
||
|
// 3815
|
||
|
if ( thisCache ) { // 3816
|
||
|
// 3817
|
||
|
// Support array or space separated string names for data keys // 3818
|
||
|
if ( !jQuery.isArray( name ) ) { // 3819
|
||
|
// 3820
|
||
|
// try the string as a key before any manipulation // 3821
|
||
|
if ( name in thisCache ) { // 3822
|
||
|
name = [ name ]; // 3823
|
||
|
} else { // 3824
|
||
|
// 3825
|
||
|
// split the camel cased version by spaces unless a key with the spaces exists // 3826
|
||
|
name = jQuery.camelCase( name ); // 3827
|
||
|
if ( name in thisCache ) { // 3828
|
||
|
name = [ name ]; // 3829
|
||
|
} else { // 3830
|
||
|
name = name.split(" "); // 3831
|
||
|
} // 3832
|
||
|
} // 3833
|
||
|
} else { // 3834
|
||
|
// If "name" is an array of keys... // 3835
|
||
|
// When data is initially created, via ("key", "val") signature, // 3836
|
||
|
// keys will be converted to camelCase. // 3837
|
||
|
// Since there is no way to tell _how_ a key was added, remove // 3838
|
||
|
// both plain key and camelCase key. #12786 // 3839
|
||
|
// This will only penalize the array argument path. // 3840
|
||
|
name = name.concat( jQuery.map( name, jQuery.camelCase ) ); // 3841
|
||
|
} // 3842
|
||
|
// 3843
|
||
|
i = name.length; // 3844
|
||
|
while ( i-- ) { // 3845
|
||
|
delete thisCache[ name[i] ]; // 3846
|
||
|
} // 3847
|
||
|
// 3848
|
||
|
// If there is no data left in the cache, we want to continue // 3849
|
||
|
// and let the cache object itself get destroyed // 3850
|
||
|
if ( pvt ? !isEmptyDataObject(thisCache) : !jQuery.isEmptyObject(thisCache) ) { // 3851
|
||
|
return; // 3852
|
||
|
} // 3853
|
||
|
} // 3854
|
||
|
} // 3855
|
||
|
// 3856
|
||
|
// See jQuery.data for more information // 3857
|
||
|
if ( !pvt ) { // 3858
|
||
|
delete cache[ id ].data; // 3859
|
||
|
// 3860
|
||
|
// Don't destroy the parent cache unless the internal data object // 3861
|
||
|
// had been the only thing left in it // 3862
|
||
|
if ( !isEmptyDataObject( cache[ id ] ) ) { // 3863
|
||
|
return; // 3864
|
||
|
} // 3865
|
||
|
} // 3866
|
||
|
// 3867
|
||
|
// Destroy the cache // 3868
|
||
|
if ( isNode ) { // 3869
|
||
|
jQuery.cleanData( [ elem ], true ); // 3870
|
||
|
// 3871
|
||
|
// Use delete when supported for expandos or `cache` is not a window per isWindow (#10080) // 3872
|
||
|
/* jshint eqeqeq: false */ // 3873
|
||
|
} else if ( support.deleteExpando || cache != cache.window ) { // 3874
|
||
|
/* jshint eqeqeq: true */ // 3875
|
||
|
delete cache[ id ]; // 3876
|
||
|
// 3877
|
||
|
// When all else fails, null // 3878
|
||
|
} else { // 3879
|
||
|
cache[ id ] = null; // 3880
|
||
|
} // 3881
|
||
|
} // 3882
|
||
|
// 3883
|
||
|
jQuery.extend({ // 3884
|
||
|
cache: {}, // 3885
|
||
|
// 3886
|
||
|
// The following elements (space-suffixed to avoid Object.prototype collisions) // 3887
|
||
|
// throw uncatchable exceptions if you attempt to set expando properties // 3888
|
||
|
noData: { // 3889
|
||
|
"applet ": true, // 3890
|
||
|
"embed ": true, // 3891
|
||
|
// ...but Flash objects (which have this classid) *can* handle expandos // 3892
|
||
|
"object ": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" // 3893
|
||
|
}, // 3894
|
||
|
// 3895
|
||
|
hasData: function( elem ) { // 3896
|
||
|
elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ]; // 3897
|
||
|
return !!elem && !isEmptyDataObject( elem ); // 3898
|
||
|
}, // 3899
|
||
|
// 3900
|
||
|
data: function( elem, name, data ) { // 3901
|
||
|
return internalData( elem, name, data ); // 3902
|
||
|
}, // 3903
|
||
|
// 3904
|
||
|
removeData: function( elem, name ) { // 3905
|
||
|
return internalRemoveData( elem, name ); // 3906
|
||
|
}, // 3907
|
||
|
// 3908
|
||
|
// For internal use only. // 3909
|
||
|
_data: function( elem, name, data ) { // 3910
|
||
|
return internalData( elem, name, data, true ); // 3911
|
||
|
}, // 3912
|
||
|
// 3913
|
||
|
_removeData: function( elem, name ) { // 3914
|
||
|
return internalRemoveData( elem, name, true ); // 3915
|
||
|
} // 3916
|
||
|
}); // 3917
|
||
|
// 3918
|
||
|
jQuery.fn.extend({ // 3919
|
||
|
data: function( key, value ) { // 3920
|
||
|
var i, name, data, // 3921
|
||
|
elem = this[0], // 3922
|
||
|
attrs = elem && elem.attributes; // 3923
|
||
|
// 3924
|
||
|
// Special expections of .data basically thwart jQuery.access, // 3925
|
||
|
// so implement the relevant behavior ourselves // 3926
|
||
|
// 3927
|
||
|
// Gets all values // 3928
|
||
|
if ( key === undefined ) { // 3929
|
||
|
if ( this.length ) { // 3930
|
||
|
data = jQuery.data( elem ); // 3931
|
||
|
// 3932
|
||
|
if ( elem.nodeType === 1 && !jQuery._data( elem, "parsedAttrs" ) ) { // 3933
|
||
|
i = attrs.length; // 3934
|
||
|
while ( i-- ) { // 3935
|
||
|
// 3936
|
||
|
// Support: IE11+ // 3937
|
||
|
// The attrs elements can be null (#14894) // 3938
|
||
|
if ( attrs[ i ] ) { // 3939
|
||
|
name = attrs[ i ].name; // 3940
|
||
|
if ( name.indexOf( "data-" ) === 0 ) { // 3941
|
||
|
name = jQuery.camelCase( name.slice(5) ); // 3942
|
||
|
dataAttr( elem, name, data[ name ] ); // 3943
|
||
|
} // 3944
|
||
|
} // 3945
|
||
|
} // 3946
|
||
|
jQuery._data( elem, "parsedAttrs", true ); // 3947
|
||
|
} // 3948
|
||
|
} // 3949
|
||
|
// 3950
|
||
|
return data; // 3951
|
||
|
} // 3952
|
||
|
// 3953
|
||
|
// Sets multiple values // 3954
|
||
|
if ( typeof key === "object" ) { // 3955
|
||
|
return this.each(function() { // 3956
|
||
|
jQuery.data( this, key ); // 3957
|
||
|
}); // 3958
|
||
|
} // 3959
|
||
|
// 3960
|
||
|
return arguments.length > 1 ? // 3961
|
||
|
// 3962
|
||
|
// Sets one value // 3963
|
||
|
this.each(function() { // 3964
|
||
|
jQuery.data( this, key, value ); // 3965
|
||
|
}) : // 3966
|
||
|
// 3967
|
||
|
// Gets one value // 3968
|
||
|
// Try to fetch any internally stored data first // 3969
|
||
|
elem ? dataAttr( elem, key, jQuery.data( elem, key ) ) : undefined; // 3970
|
||
|
}, // 3971
|
||
|
// 3972
|
||
|
removeData: function( key ) { // 3973
|
||
|
return this.each(function() { // 3974
|
||
|
jQuery.removeData( this, key ); // 3975
|
||
|
}); // 3976
|
||
|
} // 3977
|
||
|
}); // 3978
|
||
|
// 3979
|
||
|
// 3980
|
||
|
jQuery.extend({ // 3981
|
||
|
queue: function( elem, type, data ) { // 3982
|
||
|
var queue; // 3983
|
||
|
// 3984
|
||
|
if ( elem ) { // 3985
|
||
|
type = ( type || "fx" ) + "queue"; // 3986
|
||
|
queue = jQuery._data( elem, type ); // 3987
|
||
|
// 3988
|
||
|
// Speed up dequeue by getting out quickly if this is just a lookup // 3989
|
||
|
if ( data ) { // 3990
|
||
|
if ( !queue || jQuery.isArray(data) ) { // 3991
|
||
|
queue = jQuery._data( elem, type, jQuery.makeArray(data) ); // 3992
|
||
|
} else { // 3993
|
||
|
queue.push( data ); // 3994
|
||
|
} // 3995
|
||
|
} // 3996
|
||
|
return queue || []; // 3997
|
||
|
} // 3998
|
||
|
}, // 3999
|
||
|
// 4000
|
||
|
dequeue: function( elem, type ) { // 4001
|
||
|
type = type || "fx"; // 4002
|
||
|
// 4003
|
||
|
var queue = jQuery.queue( elem, type ), // 4004
|
||
|
startLength = queue.length, // 4005
|
||
|
fn = queue.shift(), // 4006
|
||
|
hooks = jQuery._queueHooks( elem, type ), // 4007
|
||
|
next = function() { // 4008
|
||
|
jQuery.dequeue( elem, type ); // 4009
|
||
|
}; // 4010
|
||
|
// 4011
|
||
|
// If the fx queue is dequeued, always remove the progress sentinel // 4012
|
||
|
if ( fn === "inprogress" ) { // 4013
|
||
|
fn = queue.shift(); // 4014
|
||
|
startLength--; // 4015
|
||
|
} // 4016
|
||
|
// 4017
|
||
|
if ( fn ) { // 4018
|
||
|
// 4019
|
||
|
// Add a progress sentinel to prevent the fx queue from being // 4020
|
||
|
// automatically dequeued // 4021
|
||
|
if ( type === "fx" ) { // 4022
|
||
|
queue.unshift( "inprogress" ); // 4023
|
||
|
} // 4024
|
||
|
// 4025
|
||
|
// clear up the last queue stop function // 4026
|
||
|
delete hooks.stop; // 4027
|
||
|
fn.call( elem, next, hooks ); // 4028
|
||
|
} // 4029
|
||
|
// 4030
|
||
|
if ( !startLength && hooks ) { // 4031
|
||
|
hooks.empty.fire(); // 4032
|
||
|
} // 4033
|
||
|
}, // 4034
|
||
|
// 4035
|
||
|
// not intended for public consumption - generates a queueHooks object, or returns the current one // 4036
|
||
|
_queueHooks: function( elem, type ) { // 4037
|
||
|
var key = type + "queueHooks"; // 4038
|
||
|
return jQuery._data( elem, key ) || jQuery._data( elem, key, { // 4039
|
||
|
empty: jQuery.Callbacks("once memory").add(function() { // 4040
|
||
|
jQuery._removeData( elem, type + "queue" ); // 4041
|
||
|
jQuery._removeData( elem, key ); // 4042
|
||
|
}) // 4043
|
||
|
}); // 4044
|
||
|
} // 4045
|
||
|
}); // 4046
|
||
|
// 4047
|
||
|
jQuery.fn.extend({ // 4048
|
||
|
queue: function( type, data ) { // 4049
|
||
|
var setter = 2; // 4050
|
||
|
// 4051
|
||
|
if ( typeof type !== "string" ) { // 4052
|
||
|
data = type; // 4053
|
||
|
type = "fx"; // 4054
|
||
|
setter--; // 4055
|
||
|
} // 4056
|
||
|
// 4057
|
||
|
if ( arguments.length < setter ) { // 4058
|
||
|
return jQuery.queue( this[0], type ); // 4059
|
||
|
} // 4060
|
||
|
// 4061
|
||
|
return data === undefined ? // 4062
|
||
|
this : // 4063
|
||
|
this.each(function() { // 4064
|
||
|
var queue = jQuery.queue( this, type, data ); // 4065
|
||
|
// 4066
|
||
|
// ensure a hooks for this queue // 4067
|
||
|
jQuery._queueHooks( this, type ); // 4068
|
||
|
// 4069
|
||
|
if ( type === "fx" && queue[0] !== "inprogress" ) { // 4070
|
||
|
jQuery.dequeue( this, type ); // 4071
|
||
|
} // 4072
|
||
|
}); // 4073
|
||
|
}, // 4074
|
||
|
dequeue: function( type ) { // 4075
|
||
|
return this.each(function() { // 4076
|
||
|
jQuery.dequeue( this, type ); // 4077
|
||
|
}); // 4078
|
||
|
}, // 4079
|
||
|
clearQueue: function( type ) { // 4080
|
||
|
return this.queue( type || "fx", [] ); // 4081
|
||
|
}, // 4082
|
||
|
// Get a promise resolved when queues of a certain type // 4083
|
||
|
// are emptied (fx is the type by default) // 4084
|
||
|
promise: function( type, obj ) { // 4085
|
||
|
var tmp, // 4086
|
||
|
count = 1, // 4087
|
||
|
defer = jQuery.Deferred(), // 4088
|
||
|
elements = this, // 4089
|
||
|
i = this.length, // 4090
|
||
|
resolve = function() { // 4091
|
||
|
if ( !( --count ) ) { // 4092
|
||
|
defer.resolveWith( elements, [ elements ] ); // 4093
|
||
|
} // 4094
|
||
|
}; // 4095
|
||
|
// 4096
|
||
|
if ( typeof type !== "string" ) { // 4097
|
||
|
obj = type; // 4098
|
||
|
type = undefined; // 4099
|
||
|
} // 4100
|
||
|
type = type || "fx"; // 4101
|
||
|
// 4102
|
||
|
while ( i-- ) { // 4103
|
||
|
tmp = jQuery._data( elements[ i ], type + "queueHooks" ); // 4104
|
||
|
if ( tmp && tmp.empty ) { // 4105
|
||
|
count++; // 4106
|
||
|
tmp.empty.add( resolve ); // 4107
|
||
|
} // 4108
|
||
|
} // 4109
|
||
|
resolve(); // 4110
|
||
|
return defer.promise( obj ); // 4111
|
||
|
} // 4112
|
||
|
}); // 4113
|
||
|
var pnum = (/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/).source; // 4114
|
||
|
// 4115
|
||
|
var cssExpand = [ "Top", "Right", "Bottom", "Left" ]; // 4116
|
||
|
// 4117
|
||
|
var isHidden = function( elem, el ) { // 4118
|
||
|
// isHidden might be called from jQuery#filter function; // 4119
|
||
|
// in that case, element will be second argument // 4120
|
||
|
elem = el || elem; // 4121
|
||
|
return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem ); // 4122
|
||
|
}; // 4123
|
||
|
// 4124
|
||
|
// 4125
|
||
|
// 4126
|
||
|
// Multifunctional method to get and set values of a collection // 4127
|
||
|
// The value/s can optionally be executed if it's a function // 4128
|
||
|
var access = jQuery.access = function( elems, fn, key, value, chainable, emptyGet, raw ) { // 4129
|
||
|
var i = 0, // 4130
|
||
|
length = elems.length, // 4131
|
||
|
bulk = key == null; // 4132
|
||
|
// 4133
|
||
|
// Sets many values // 4134
|
||
|
if ( jQuery.type( key ) === "object" ) { // 4135
|
||
|
chainable = true; // 4136
|
||
|
for ( i in key ) { // 4137
|
||
|
jQuery.access( elems, fn, i, key[i], true, emptyGet, raw ); // 4138
|
||
|
} // 4139
|
||
|
// 4140
|
||
|
// Sets one value // 4141
|
||
|
} else if ( value !== undefined ) { // 4142
|
||
|
chainable = true; // 4143
|
||
|
// 4144
|
||
|
if ( !jQuery.isFunction( value ) ) { // 4145
|
||
|
raw = true; // 4146
|
||
|
} // 4147
|
||
|
// 4148
|
||
|
if ( bulk ) { // 4149
|
||
|
// Bulk operations run against the entire set // 4150
|
||
|
if ( raw ) { // 4151
|
||
|
fn.call( elems, value ); // 4152
|
||
|
fn = null; // 4153
|
||
|
// 4154
|
||
|
// ...except when executing function values // 4155
|
||
|
} else { // 4156
|
||
|
bulk = fn; // 4157
|
||
|
fn = function( elem, key, value ) { // 4158
|
||
|
return bulk.call( jQuery( elem ), value ); // 4159
|
||
|
}; // 4160
|
||
|
} // 4161
|
||
|
} // 4162
|
||
|
// 4163
|
||
|
if ( fn ) { // 4164
|
||
|
for ( ; i < length; i++ ) { // 4165
|
||
|
fn( elems[i], key, raw ? value : value.call( elems[i], i, fn( elems[i], key ) ) ); // 4166
|
||
|
} // 4167
|
||
|
} // 4168
|
||
|
} // 4169
|
||
|
// 4170
|
||
|
return chainable ? // 4171
|
||
|
elems : // 4172
|
||
|
// 4173
|
||
|
// Gets // 4174
|
||
|
bulk ? // 4175
|
||
|
fn.call( elems ) : // 4176
|
||
|
length ? fn( elems[0], key ) : emptyGet; // 4177
|
||
|
}; // 4178
|
||
|
var rcheckableType = (/^(?:checkbox|radio)$/i); // 4179
|
||
|
// 4180
|
||
|
// 4181
|
||
|
// 4182
|
||
|
(function() { // 4183
|
||
|
// Minified: var a,b,c // 4184
|
||
|
var input = document.createElement( "input" ), // 4185
|
||
|
div = document.createElement( "div" ), // 4186
|
||
|
fragment = document.createDocumentFragment(); // 4187
|
||
|
// 4188
|
||
|
// Setup // 4189
|
||
|
div.innerHTML = " <link/><table></table><a href='/a'>a</a><input type='checkbox'/>"; // 4190
|
||
|
// 4191
|
||
|
// IE strips leading whitespace when .innerHTML is used // 4192
|
||
|
support.leadingWhitespace = div.firstChild.nodeType === 3; // 4193
|
||
|
// 4194
|
||
|
// Make sure that tbody elements aren't automatically inserted // 4195
|
||
|
// IE will insert them into empty tables // 4196
|
||
|
support.tbody = !div.getElementsByTagName( "tbody" ).length; // 4197
|
||
|
// 4198
|
||
|
// Make sure that link elements get serialized correctly by innerHTML // 4199
|
||
|
// This requires a wrapper element in IE // 4200
|
||
|
support.htmlSerialize = !!div.getElementsByTagName( "link" ).length; // 4201
|
||
|
// 4202
|
||
|
// Makes sure cloning an html5 element does not cause problems // 4203
|
||
|
// Where outerHTML is undefined, this still works // 4204
|
||
|
support.html5Clone = // 4205
|
||
|
document.createElement( "nav" ).cloneNode( true ).outerHTML !== "<:nav></:nav>"; // 4206
|
||
|
// 4207
|
||
|
// Check if a disconnected checkbox will retain its checked // 4208
|
||
|
// value of true after appended to the DOM (IE6/7) // 4209
|
||
|
input.type = "checkbox"; // 4210
|
||
|
input.checked = true; // 4211
|
||
|
fragment.appendChild( input ); // 4212
|
||
|
support.appendChecked = input.checked; // 4213
|
||
|
// 4214
|
||
|
// Make sure textarea (and checkbox) defaultValue is properly cloned // 4215
|
||
|
// Support: IE6-IE11+ // 4216
|
||
|
div.innerHTML = "<textarea>x</textarea>"; // 4217
|
||
|
support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue; // 4218
|
||
|
// 4219
|
||
|
// #11217 - WebKit loses check when the name is after the checked attribute // 4220
|
||
|
fragment.appendChild( div ); // 4221
|
||
|
div.innerHTML = "<input type='radio' checked='checked' name='t'/>"; // 4222
|
||
|
// 4223
|
||
|
// Support: Safari 5.1, iOS 5.1, Android 4.x, Android 2.3 // 4224
|
||
|
// old WebKit doesn't clone checked state correctly in fragments // 4225
|
||
|
support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked; // 4226
|
||
|
// 4227
|
||
|
// Support: IE<9 // 4228
|
||
|
// Opera does not clone events (and typeof div.attachEvent === undefined). // 4229
|
||
|
// IE9-10 clones events bound via attachEvent, but they don't trigger with .click() // 4230
|
||
|
support.noCloneEvent = true; // 4231
|
||
|
if ( div.attachEvent ) { // 4232
|
||
|
div.attachEvent( "onclick", function() { // 4233
|
||
|
support.noCloneEvent = false; // 4234
|
||
|
}); // 4235
|
||
|
// 4236
|
||
|
div.cloneNode( true ).click(); // 4237
|
||
|
} // 4238
|
||
|
// 4239
|
||
|
// Execute the test only if not already executed in another module. // 4240
|
||
|
if (support.deleteExpando == null) { // 4241
|
||
|
// Support: IE<9 // 4242
|
||
|
support.deleteExpando = true; // 4243
|
||
|
try { // 4244
|
||
|
delete div.test; // 4245
|
||
|
} catch( e ) { // 4246
|
||
|
support.deleteExpando = false; // 4247
|
||
|
} // 4248
|
||
|
} // 4249
|
||
|
})(); // 4250
|
||
|
// 4251
|
||
|
// 4252
|
||
|
(function() { // 4253
|
||
|
var i, eventName, // 4254
|
||
|
div = document.createElement( "div" ); // 4255
|
||
|
// 4256
|
||
|
// Support: IE<9 (lack submit/change bubble), Firefox 23+ (lack focusin event) // 4257
|
||
|
for ( i in { submit: true, change: true, focusin: true }) { // 4258
|
||
|
eventName = "on" + i; // 4259
|
||
|
// 4260
|
||
|
if ( !(support[ i + "Bubbles" ] = eventName in window) ) { // 4261
|
||
|
// Beware of CSP restrictions (https://developer.mozilla.org/en/Security/CSP) // 4262
|
||
|
div.setAttribute( eventName, "t" ); // 4263
|
||
|
support[ i + "Bubbles" ] = div.attributes[ eventName ].expando === false; // 4264
|
||
|
} // 4265
|
||
|
} // 4266
|
||
|
// 4267
|
||
|
// Null elements to avoid leaks in IE. // 4268
|
||
|
div = null; // 4269
|
||
|
})(); // 4270
|
||
|
// 4271
|
||
|
// 4272
|
||
|
var rformElems = /^(?:input|select|textarea)$/i, // 4273
|
||
|
rkeyEvent = /^key/, // 4274
|
||
|
rmouseEvent = /^(?:mouse|pointer|contextmenu)|click/, // 4275
|
||
|
rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, // 4276
|
||
|
rtypenamespace = /^([^.]*)(?:\.(.+)|)$/; // 4277
|
||
|
// 4278
|
||
|
function returnTrue() { // 4279
|
||
|
return true; // 4280
|
||
|
} // 4281
|
||
|
// 4282
|
||
|
function returnFalse() { // 4283
|
||
|
return false; // 4284
|
||
|
} // 4285
|
||
|
// 4286
|
||
|
function safeActiveElement() { // 4287
|
||
|
try { // 4288
|
||
|
return document.activeElement; // 4289
|
||
|
} catch ( err ) { } // 4290
|
||
|
} // 4291
|
||
|
// 4292
|
||
|
/* // 4293
|
||
|
* Helper functions for managing events -- not part of the public interface. // 4294
|
||
|
* Props to Dean Edwards' addEvent library for many of the ideas. // 4295
|
||
|
*/ // 4296
|
||
|
jQuery.event = { // 4297
|
||
|
// 4298
|
||
|
global: {}, // 4299
|
||
|
// 4300
|
||
|
add: function( elem, types, handler, data, selector ) { // 4301
|
||
|
var tmp, events, t, handleObjIn, // 4302
|
||
|
special, eventHandle, handleObj, // 4303
|
||
|
handlers, type, namespaces, origType, // 4304
|
||
|
elemData = jQuery._data( elem ); // 4305
|
||
|
// 4306
|
||
|
// Don't attach events to noData or text/comment nodes (but allow plain objects) // 4307
|
||
|
if ( !elemData ) { // 4308
|
||
|
return; // 4309
|
||
|
} // 4310
|
||
|
// 4311
|
||
|
// Caller can pass in an object of custom data in lieu of the handler // 4312
|
||
|
if ( handler.handler ) { // 4313
|
||
|
handleObjIn = handler; // 4314
|
||
|
handler = handleObjIn.handler; // 4315
|
||
|
selector = handleObjIn.selector; // 4316
|
||
|
} // 4317
|
||
|
// 4318
|
||
|
// Make sure that the handler has a unique ID, used to find/remove it later // 4319
|
||
|
if ( !handler.guid ) { // 4320
|
||
|
handler.guid = jQuery.guid++; // 4321
|
||
|
} // 4322
|
||
|
// 4323
|
||
|
// Init the element's event structure and main handler, if this is the first // 4324
|
||
|
if ( !(events = elemData.events) ) { // 4325
|
||
|
events = elemData.events = {}; // 4326
|
||
|
} // 4327
|
||
|
if ( !(eventHandle = elemData.handle) ) { // 4328
|
||
|
eventHandle = elemData.handle = function( e ) { // 4329
|
||
|
// Discard the second event of a jQuery.event.trigger() and // 4330
|
||
|
// when an event is called after a page has unloaded // 4331
|
||
|
return typeof jQuery !== strundefined && (!e || jQuery.event.triggered !== e.type) ? // 4332
|
||
|
jQuery.event.dispatch.apply( eventHandle.elem, arguments ) : // 4333
|
||
|
undefined; // 4334
|
||
|
}; // 4335
|
||
|
// Add elem as a property of the handle fn to prevent a memory leak with IE non-native events // 4336
|
||
|
eventHandle.elem = elem; // 4337
|
||
|
} // 4338
|
||
|
// 4339
|
||
|
// Handle multiple events separated by a space // 4340
|
||
|
types = ( types || "" ).match( rnotwhite ) || [ "" ]; // 4341
|
||
|
t = types.length; // 4342
|
||
|
while ( t-- ) { // 4343
|
||
|
tmp = rtypenamespace.exec( types[t] ) || []; // 4344
|
||
|
type = origType = tmp[1]; // 4345
|
||
|
namespaces = ( tmp[2] || "" ).split( "." ).sort(); // 4346
|
||
|
// 4347
|
||
|
// There *must* be a type, no attaching namespace-only handlers // 4348
|
||
|
if ( !type ) { // 4349
|
||
|
continue; // 4350
|
||
|
} // 4351
|
||
|
// 4352
|
||
|
// If event changes its type, use the special event handlers for the changed type // 4353
|
||
|
special = jQuery.event.special[ type ] || {}; // 4354
|
||
|
// 4355
|
||
|
// If selector defined, determine special event api type, otherwise given type // 4356
|
||
|
type = ( selector ? special.delegateType : special.bindType ) || type; // 4357
|
||
|
// 4358
|
||
|
// Update special based on newly reset type // 4359
|
||
|
special = jQuery.event.special[ type ] || {}; // 4360
|
||
|
// 4361
|
||
|
// handleObj is passed to all event handlers // 4362
|
||
|
handleObj = jQuery.extend({ // 4363
|
||
|
type: type, // 4364
|
||
|
origType: origType, // 4365
|
||
|
data: data, // 4366
|
||
|
handler: handler, // 4367
|
||
|
guid: handler.guid, // 4368
|
||
|
selector: selector, // 4369
|
||
|
needsContext: selector && jQuery.expr.match.needsContext.test( selector ), // 4370
|
||
|
namespace: namespaces.join(".") // 4371
|
||
|
}, handleObjIn ); // 4372
|
||
|
// 4373
|
||
|
// Init the event handler queue if we're the first // 4374
|
||
|
if ( !(handlers = events[ type ]) ) { // 4375
|
||
|
handlers = events[ type ] = []; // 4376
|
||
|
handlers.delegateCount = 0; // 4377
|
||
|
// 4378
|
||
|
// Only use addEventListener/attachEvent if the special events handler returns false // 4379
|
||
|
if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) { // 4380
|
||
|
// Bind the global event handler to the element // 4381
|
||
|
if ( elem.addEventListener ) { // 4382
|
||
|
elem.addEventListener( type, eventHandle, false ); // 4383
|
||
|
// 4384
|
||
|
} else if ( elem.attachEvent ) { // 4385
|
||
|
elem.attachEvent( "on" + type, eventHandle ); // 4386
|
||
|
} // 4387
|
||
|
} // 4388
|
||
|
} // 4389
|
||
|
// 4390
|
||
|
if ( special.add ) { // 4391
|
||
|
special.add.call( elem, handleObj ); // 4392
|
||
|
// 4393
|
||
|
if ( !handleObj.handler.guid ) { // 4394
|
||
|
handleObj.handler.guid = handler.guid; // 4395
|
||
|
} // 4396
|
||
|
} // 4397
|
||
|
// 4398
|
||
|
// Add to the element's handler list, delegates in front // 4399
|
||
|
if ( selector ) { // 4400
|
||
|
handlers.splice( handlers.delegateCount++, 0, handleObj ); // 4401
|
||
|
} else { // 4402
|
||
|
handlers.push( handleObj ); // 4403
|
||
|
} // 4404
|
||
|
// 4405
|
||
|
// Keep track of which events have ever been used, for event optimization // 4406
|
||
|
jQuery.event.global[ type ] = true; // 4407
|
||
|
} // 4408
|
||
|
// 4409
|
||
|
// Nullify elem to prevent memory leaks in IE // 4410
|
||
|
elem = null; // 4411
|
||
|
}, // 4412
|
||
|
// 4413
|
||
|
// Detach an event or set of events from an element // 4414
|
||
|
remove: function( elem, types, handler, selector, mappedTypes ) { // 4415
|
||
|
var j, handleObj, tmp, // 4416
|
||
|
origCount, t, events, // 4417
|
||
|
special, handlers, type, // 4418
|
||
|
namespaces, origType, // 4419
|
||
|
elemData = jQuery.hasData( elem ) && jQuery._data( elem ); // 4420
|
||
|
// 4421
|
||
|
if ( !elemData || !(events = elemData.events) ) { // 4422
|
||
|
return; // 4423
|
||
|
} // 4424
|
||
|
// 4425
|
||
|
// Once for each type.namespace in types; type may be omitted // 4426
|
||
|
types = ( types || "" ).match( rnotwhite ) || [ "" ]; // 4427
|
||
|
t = types.length; // 4428
|
||
|
while ( t-- ) { // 4429
|
||
|
tmp = rtypenamespace.exec( types[t] ) || []; // 4430
|
||
|
type = origType = tmp[1]; // 4431
|
||
|
namespaces = ( tmp[2] || "" ).split( "." ).sort(); // 4432
|
||
|
// 4433
|
||
|
// Unbind all events (on this namespace, if provided) for the element // 4434
|
||
|
if ( !type ) { // 4435
|
||
|
for ( type in events ) { // 4436
|
||
|
jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); // 4437
|
||
|
} // 4438
|
||
|
continue; // 4439
|
||
|
} // 4440
|
||
|
// 4441
|
||
|
special = jQuery.event.special[ type ] || {}; // 4442
|
||
|
type = ( selector ? special.delegateType : special.bindType ) || type; // 4443
|
||
|
handlers = events[ type ] || []; // 4444
|
||
|
tmp = tmp[2] && new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ); // 4445
|
||
|
// 4446
|
||
|
// Remove matching events // 4447
|
||
|
origCount = j = handlers.length; // 4448
|
||
|
while ( j-- ) { // 4449
|
||
|
handleObj = handlers[ j ]; // 4450
|
||
|
// 4451
|
||
|
if ( ( mappedTypes || origType === handleObj.origType ) && // 4452
|
||
|
( !handler || handler.guid === handleObj.guid ) && // 4453
|
||
|
( !tmp || tmp.test( handleObj.namespace ) ) && // 4454
|
||
|
( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) { // 4455
|
||
|
handlers.splice( j, 1 ); // 4456
|
||
|
// 4457
|
||
|
if ( handleObj.selector ) { // 4458
|
||
|
handlers.delegateCount--; // 4459
|
||
|
} // 4460
|
||
|
if ( special.remove ) { // 4461
|
||
|
special.remove.call( elem, handleObj ); // 4462
|
||
|
} // 4463
|
||
|
} // 4464
|
||
|
} // 4465
|
||
|
// 4466
|
||
|
// Remove generic event handler if we removed something and no more handlers exist // 4467
|
||
|
// (avoids potential for endless recursion during removal of special event handlers) // 4468
|
||
|
if ( origCount && !handlers.length ) { // 4469
|
||
|
if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) { // 4470
|
||
|
jQuery.removeEvent( elem, type, elemData.handle ); // 4471
|
||
|
} // 4472
|
||
|
// 4473
|
||
|
delete events[ type ]; // 4474
|
||
|
} // 4475
|
||
|
} // 4476
|
||
|
// 4477
|
||
|
// Remove the expando if it's no longer used // 4478
|
||
|
if ( jQuery.isEmptyObject( events ) ) { // 4479
|
||
|
delete elemData.handle; // 4480
|
||
|
// 4481
|
||
|
// removeData also checks for emptiness and clears the expando if empty // 4482
|
||
|
// so use it instead of delete // 4483
|
||
|
jQuery._removeData( elem, "events" ); // 4484
|
||
|
} // 4485
|
||
|
}, // 4486
|
||
|
// 4487
|
||
|
trigger: function( event, data, elem, onlyHandlers ) { // 4488
|
||
|
var handle, ontype, cur, // 4489
|
||
|
bubbleType, special, tmp, i, // 4490
|
||
|
eventPath = [ elem || document ], // 4491
|
||
|
type = hasOwn.call( event, "type" ) ? event.type : event, // 4492
|
||
|
namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split(".") : []; // 4493
|
||
|
// 4494
|
||
|
cur = tmp = elem = elem || document; // 4495
|
||
|
// 4496
|
||
|
// Don't do events on text and comment nodes // 4497
|
||
|
if ( elem.nodeType === 3 || elem.nodeType === 8 ) { // 4498
|
||
|
return; // 4499
|
||
|
} // 4500
|
||
|
// 4501
|
||
|
// focus/blur morphs to focusin/out; ensure we're not firing them right now // 4502
|
||
|
if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { // 4503
|
||
|
return; // 4504
|
||
|
} // 4505
|
||
|
// 4506
|
||
|
if ( type.indexOf(".") >= 0 ) { // 4507
|
||
|
// Namespaced trigger; create a regexp to match event type in handle() // 4508
|
||
|
namespaces = type.split("."); // 4509
|
||
|
type = namespaces.shift(); // 4510
|
||
|
namespaces.sort(); // 4511
|
||
|
} // 4512
|
||
|
ontype = type.indexOf(":") < 0 && "on" + type; // 4513
|
||
|
// 4514
|
||
|
// Caller can pass in a jQuery.Event object, Object, or just an event type string // 4515
|
||
|
event = event[ jQuery.expando ] ? // 4516
|
||
|
event : // 4517
|
||
|
new jQuery.Event( type, typeof event === "object" && event ); // 4518
|
||
|
// 4519
|
||
|
// Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true) // 4520
|
||
|
event.isTrigger = onlyHandlers ? 2 : 3; // 4521
|
||
|
event.namespace = namespaces.join("."); // 4522
|
||
|
event.namespace_re = event.namespace ? // 4523
|
||
|
new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ) : // 4524
|
||
|
null; // 4525
|
||
|
// 4526
|
||
|
// Clean up the event in case it is being reused // 4527
|
||
|
event.result = undefined; // 4528
|
||
|
if ( !event.target ) { // 4529
|
||
|
event.target = elem; // 4530
|
||
|
} // 4531
|
||
|
// 4532
|
||
|
// Clone any incoming data and prepend the event, creating the handler arg list // 4533
|
||
|
data = data == null ? // 4534
|
||
|
[ event ] : // 4535
|
||
|
jQuery.makeArray( data, [ event ] ); // 4536
|
||
|
// 4537
|
||
|
// Allow special events to draw outside the lines // 4538
|
||
|
special = jQuery.event.special[ type ] || {}; // 4539
|
||
|
if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) { // 4540
|
||
|
return; // 4541
|
||
|
} // 4542
|
||
|
// 4543
|
||
|
// Determine event propagation path in advance, per W3C events spec (#9951) // 4544
|
||
|
// Bubble up to document, then to window; watch for a global ownerDocument var (#9724) // 4545
|
||
|
if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) { // 4546
|
||
|
// 4547
|
||
|
bubbleType = special.delegateType || type; // 4548
|
||
|
if ( !rfocusMorph.test( bubbleType + type ) ) { // 4549
|
||
|
cur = cur.parentNode; // 4550
|
||
|
} // 4551
|
||
|
for ( ; cur; cur = cur.parentNode ) { // 4552
|
||
|
eventPath.push( cur ); // 4553
|
||
|
tmp = cur; // 4554
|
||
|
} // 4555
|
||
|
// 4556
|
||
|
// Only add window if we got to document (e.g., not plain obj or detached DOM) // 4557
|
||
|
if ( tmp === (elem.ownerDocument || document) ) { // 4558
|
||
|
eventPath.push( tmp.defaultView || tmp.parentWindow || window ); // 4559
|
||
|
} // 4560
|
||
|
} // 4561
|
||
|
// 4562
|
||
|
// Fire handlers on the event path // 4563
|
||
|
i = 0; // 4564
|
||
|
while ( (cur = eventPath[i++]) && !event.isPropagationStopped() ) { // 4565
|
||
|
// 4566
|
||
|
event.type = i > 1 ? // 4567
|
||
|
bubbleType : // 4568
|
||
|
special.bindType || type; // 4569
|
||
|
// 4570
|
||
|
// jQuery handler // 4571
|
||
|
handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" ); // 4572
|
||
|
if ( handle ) { // 4573
|
||
|
handle.apply( cur, data ); // 4574
|
||
|
} // 4575
|
||
|
// 4576
|
||
|
// Native handler // 4577
|
||
|
handle = ontype && cur[ ontype ]; // 4578
|
||
|
if ( handle && handle.apply && jQuery.acceptData( cur ) ) { // 4579
|
||
|
event.result = handle.apply( cur, data ); // 4580
|
||
|
if ( event.result === false ) { // 4581
|
||
|
event.preventDefault(); // 4582
|
||
|
} // 4583
|
||
|
} // 4584
|
||
|
} // 4585
|
||
|
event.type = type; // 4586
|
||
|
// 4587
|
||
|
// If nobody prevented the default action, do it now // 4588
|
||
|
if ( !onlyHandlers && !event.isDefaultPrevented() ) { // 4589
|
||
|
// 4590
|
||
|
if ( (!special._default || special._default.apply( eventPath.pop(), data ) === false) && // 4591
|
||
|
jQuery.acceptData( elem ) ) { // 4592
|
||
|
// 4593
|
||
|
// Call a native DOM method on the target with the same name name as the event. // 4594
|
||
|
// Can't use an .isFunction() check here because IE6/7 fails that test. // 4595
|
||
|
// Don't do default actions on window, that's where global variables be (#6170) // 4596
|
||
|
if ( ontype && elem[ type ] && !jQuery.isWindow( elem ) ) { // 4597
|
||
|
// 4598
|
||
|
// Don't re-trigger an onFOO event when we call its FOO() method // 4599
|
||
|
tmp = elem[ ontype ]; // 4600
|
||
|
// 4601
|
||
|
if ( tmp ) { // 4602
|
||
|
elem[ ontype ] = null; // 4603
|
||
|
} // 4604
|
||
|
// 4605
|
||
|
// Prevent re-triggering of the same event, since we already bubbled it above // 4606
|
||
|
jQuery.event.triggered = type; // 4607
|
||
|
try { // 4608
|
||
|
elem[ type ](); // 4609
|
||
|
} catch ( e ) { // 4610
|
||
|
// IE<9 dies on focus/blur to hidden element (#1486,#12518) // 4611
|
||
|
// only reproducible on winXP IE8 native, not IE9 in IE8 mode // 4612
|
||
|
} // 4613
|
||
|
jQuery.event.triggered = undefined; // 4614
|
||
|
// 4615
|
||
|
if ( tmp ) { // 4616
|
||
|
elem[ ontype ] = tmp; // 4617
|
||
|
} // 4618
|
||
|
} // 4619
|
||
|
} // 4620
|
||
|
} // 4621
|
||
|
// 4622
|
||
|
return event.result; // 4623
|
||
|
}, // 4624
|
||
|
// 4625
|
||
|
dispatch: function( event ) { // 4626
|
||
|
// 4627
|
||
|
// Make a writable jQuery.Event from the native event object // 4628
|
||
|
event = jQuery.event.fix( event ); // 4629
|
||
|
// 4630
|
||
|
var i, ret, handleObj, matched, j, // 4631
|
||
|
handlerQueue = [], // 4632
|
||
|
args = slice.call( arguments ), // 4633
|
||
|
handlers = ( jQuery._data( this, "events" ) || {} )[ event.type ] || [], // 4634
|
||
|
special = jQuery.event.special[ event.type ] || {}; // 4635
|
||
|
// 4636
|
||
|
// Use the fix-ed jQuery.Event rather than the (read-only) native event // 4637
|
||
|
args[0] = event; // 4638
|
||
|
event.delegateTarget = this; // 4639
|
||
|
// 4640
|
||
|
// Call the preDispatch hook for the mapped type, and let it bail if desired // 4641
|
||
|
if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) { // 4642
|
||
|
return; // 4643
|
||
|
} // 4644
|
||
|
// 4645
|
||
|
// Determine handlers // 4646
|
||
|
handlerQueue = jQuery.event.handlers.call( this, event, handlers ); // 4647
|
||
|
// 4648
|
||
|
// Run delegates first; they may want to stop propagation beneath us // 4649
|
||
|
i = 0; // 4650
|
||
|
while ( (matched = handlerQueue[ i++ ]) && !event.isPropagationStopped() ) { // 4651
|
||
|
event.currentTarget = matched.elem; // 4652
|
||
|
// 4653
|
||
|
j = 0; // 4654
|
||
|
while ( (handleObj = matched.handlers[ j++ ]) && !event.isImmediatePropagationStopped() ) { // 4655
|
||
|
// 4656
|
||
|
// Triggered event must either 1) have no namespace, or // 4657
|
||
|
// 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace). // 4658
|
||
|
if ( !event.namespace_re || event.namespace_re.test( handleObj.namespace ) ) { // 4659
|
||
|
// 4660
|
||
|
event.handleObj = handleObj; // 4661
|
||
|
event.data = handleObj.data; // 4662
|
||
|
// 4663
|
||
|
ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler ) // 4664
|
||
|
.apply( matched.elem, args ); // 4665
|
||
|
// 4666
|
||
|
if ( ret !== undefined ) { // 4667
|
||
|
if ( (event.result = ret) === false ) { // 4668
|
||
|
event.preventDefault(); // 4669
|
||
|
event.stopPropagation(); // 4670
|
||
|
} // 4671
|
||
|
} // 4672
|
||
|
} // 4673
|
||
|
} // 4674
|
||
|
} // 4675
|
||
|
// 4676
|
||
|
// Call the postDispatch hook for the mapped type // 4677
|
||
|
if ( special.postDispatch ) { // 4678
|
||
|
special.postDispatch.call( this, event ); // 4679
|
||
|
} // 4680
|
||
|
// 4681
|
||
|
return event.result; // 4682
|
||
|
}, // 4683
|
||
|
// 4684
|
||
|
handlers: function( event, handlers ) { // 4685
|
||
|
var sel, handleObj, matches, i, // 4686
|
||
|
handlerQueue = [], // 4687
|
||
|
delegateCount = handlers.delegateCount, // 4688
|
||
|
cur = event.target; // 4689
|
||
|
// 4690
|
||
|
// Find delegate handlers // 4691
|
||
|
// Black-hole SVG <use> instance trees (#13180) // 4692
|
||
|
// Avoid non-left-click bubbling in Firefox (#3861) // 4693
|
||
|
if ( delegateCount && cur.nodeType && (!event.button || event.type !== "click") ) { // 4694
|
||
|
// 4695
|
||
|
/* jshint eqeqeq: false */ // 4696
|
||
|
for ( ; cur != this; cur = cur.parentNode || this ) { // 4697
|
||
|
/* jshint eqeqeq: true */ // 4698
|
||
|
// 4699
|
||
|
// Don't check non-elements (#13208) // 4700
|
||
|
// Don't process clicks on disabled elements (#6911, #8165, #11382, #11764) // 4701
|
||
|
if ( cur.nodeType === 1 && (cur.disabled !== true || event.type !== "click") ) { // 4702
|
||
|
matches = []; // 4703
|
||
|
for ( i = 0; i < delegateCount; i++ ) { // 4704
|
||
|
handleObj = handlers[ i ]; // 4705
|
||
|
// 4706
|
||
|
// Don't conflict with Object.prototype properties (#13203) // 4707
|
||
|
sel = handleObj.selector + " "; // 4708
|
||
|
// 4709
|
||
|
if ( matches[ sel ] === undefined ) { // 4710
|
||
|
matches[ sel ] = handleObj.needsContext ? // 4711
|
||
|
jQuery( sel, this ).index( cur ) >= 0 : // 4712
|
||
|
jQuery.find( sel, this, null, [ cur ] ).length; // 4713
|
||
|
} // 4714
|
||
|
if ( matches[ sel ] ) { // 4715
|
||
|
matches.push( handleObj ); // 4716
|
||
|
} // 4717
|
||
|
} // 4718
|
||
|
if ( matches.length ) { // 4719
|
||
|
handlerQueue.push({ elem: cur, handlers: matches }); // 4720
|
||
|
} // 4721
|
||
|
} // 4722
|
||
|
} // 4723
|
||
|
} // 4724
|
||
|
// 4725
|
||
|
// Add the remaining (directly-bound) handlers // 4726
|
||
|
if ( delegateCount < handlers.length ) { // 4727
|
||
|
handlerQueue.push({ elem: this, handlers: handlers.slice( delegateCount ) }); // 4728
|
||
|
} // 4729
|
||
|
// 4730
|
||
|
return handlerQueue; // 4731
|
||
|
}, // 4732
|
||
|
// 4733
|
||
|
fix: function( event ) { // 4734
|
||
|
if ( event[ jQuery.expando ] ) { // 4735
|
||
|
return event; // 4736
|
||
|
} // 4737
|
||
|
// 4738
|
||
|
// Create a writable copy of the event object and normalize some properties // 4739
|
||
|
var i, prop, copy, // 4740
|
||
|
type = event.type, // 4741
|
||
|
originalEvent = event, // 4742
|
||
|
fixHook = this.fixHooks[ type ]; // 4743
|
||
|
// 4744
|
||
|
if ( !fixHook ) { // 4745
|
||
|
this.fixHooks[ type ] = fixHook = // 4746
|
||
|
rmouseEvent.test( type ) ? this.mouseHooks : // 4747
|
||
|
rkeyEvent.test( type ) ? this.keyHooks : // 4748
|
||
|
{}; // 4749
|
||
|
} // 4750
|
||
|
copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props; // 4751
|
||
|
// 4752
|
||
|
event = new jQuery.Event( originalEvent ); // 4753
|
||
|
// 4754
|
||
|
i = copy.length; // 4755
|
||
|
while ( i-- ) { // 4756
|
||
|
prop = copy[ i ]; // 4757
|
||
|
event[ prop ] = originalEvent[ prop ]; // 4758
|
||
|
} // 4759
|
||
|
// 4760
|
||
|
// Support: IE<9 // 4761
|
||
|
// Fix target property (#1925) // 4762
|
||
|
if ( !event.target ) { // 4763
|
||
|
event.target = originalEvent.srcElement || document; // 4764
|
||
|
} // 4765
|
||
|
// 4766
|
||
|
// Support: Chrome 23+, Safari? // 4767
|
||
|
// Target should not be a text node (#504, #13143) // 4768
|
||
|
if ( event.target.nodeType === 3 ) { // 4769
|
||
|
event.target = event.target.parentNode; // 4770
|
||
|
} // 4771
|
||
|
// 4772
|
||
|
// Support: IE<9 // 4773
|
||
|
// For mouse/key events, metaKey==false if it's undefined (#3368, #11328) // 4774
|
||
|
event.metaKey = !!event.metaKey; // 4775
|
||
|
// 4776
|
||
|
return fixHook.filter ? fixHook.filter( event, originalEvent ) : event; // 4777
|
||
|
}, // 4778
|
||
|
// 4779
|
||
|
// Includes some event props shared by KeyEvent and MouseEvent // 4780
|
||
|
props: "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),
|
||
|
// 4782
|
||
|
fixHooks: {}, // 4783
|
||
|
// 4784
|
||
|
keyHooks: { // 4785
|
||
|
props: "char charCode key keyCode".split(" "), // 4786
|
||
|
filter: function( event, original ) { // 4787
|
||
|
// 4788
|
||
|
// Add which for key events // 4789
|
||
|
if ( event.which == null ) { // 4790
|
||
|
event.which = original.charCode != null ? original.charCode : original.keyCode; // 4791
|
||
|
} // 4792
|
||
|
// 4793
|
||
|
return event; // 4794
|
||
|
} // 4795
|
||
|
}, // 4796
|
||
|
// 4797
|
||
|
mouseHooks: { // 4798
|
||
|
props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),
|
||
|
filter: function( event, original ) { // 4800
|
||
|
var body, eventDoc, doc, // 4801
|
||
|
button = original.button, // 4802
|
||
|
fromElement = original.fromElement; // 4803
|
||
|
// 4804
|
||
|
// Calculate pageX/Y if missing and clientX/Y available // 4805
|
||
|
if ( event.pageX == null && original.clientX != null ) { // 4806
|
||
|
eventDoc = event.target.ownerDocument || document; // 4807
|
||
|
doc = eventDoc.documentElement; // 4808
|
||
|
body = eventDoc.body; // 4809
|
||
|
// 4810
|
||
|
event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 );
|
||
|
event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 );
|
||
|
} // 4813
|
||
|
// 4814
|
||
|
// Add relatedTarget, if necessary // 4815
|
||
|
if ( !event.relatedTarget && fromElement ) { // 4816
|
||
|
event.relatedTarget = fromElement === event.target ? original.toElement : fromElement; // 4817
|
||
|
} // 4818
|
||
|
// 4819
|
||
|
// Add which for click: 1 === left; 2 === middle; 3 === right // 4820
|
||
|
// Note: button is not normalized, so don't use it // 4821
|
||
|
if ( !event.which && button !== undefined ) { // 4822
|
||
|
event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) ); // 4823
|
||
|
} // 4824
|
||
|
// 4825
|
||
|
return event; // 4826
|
||
|
} // 4827
|
||
|
}, // 4828
|
||
|
// 4829
|
||
|
special: { // 4830
|
||
|
load: { // 4831
|
||
|
// Prevent triggered image.load events from bubbling to window.load // 4832
|
||
|
noBubble: true // 4833
|
||
|
}, // 4834
|
||
|
focus: { // 4835
|
||
|
// Fire native event if possible so blur/focus sequence is correct // 4836
|
||
|
trigger: function() { // 4837
|
||
|
if ( this !== safeActiveElement() && this.focus ) { // 4838
|
||
|
try { // 4839
|
||
|
this.focus(); // 4840
|
||
|
return false; // 4841
|
||
|
} catch ( e ) { // 4842
|
||
|
// Support: IE<9 // 4843
|
||
|
// If we error on focus to hidden element (#1486, #12518), // 4844
|
||
|
// let .trigger() run the handlers // 4845
|
||
|
} // 4846
|
||
|
} // 4847
|
||
|
}, // 4848
|
||
|
delegateType: "focusin" // 4849
|
||
|
}, // 4850
|
||
|
blur: { // 4851
|
||
|
trigger: function() { // 4852
|
||
|
if ( this === safeActiveElement() && this.blur ) { // 4853
|
||
|
this.blur(); // 4854
|
||
|
return false; // 4855
|
||
|
} // 4856
|
||
|
}, // 4857
|
||
|
delegateType: "focusout" // 4858
|
||
|
}, // 4859
|
||
|
click: { // 4860
|
||
|
// For checkbox, fire native event so checked state will be right // 4861
|
||
|
trigger: function() { // 4862
|
||
|
if ( jQuery.nodeName( this, "input" ) && this.type === "checkbox" && this.click ) { // 4863
|
||
|
this.click(); // 4864
|
||
|
return false; // 4865
|
||
|
} // 4866
|
||
|
}, // 4867
|
||
|
// 4868
|
||
|
// For cross-browser consistency, don't fire native .click() on links // 4869
|
||
|
_default: function( event ) { // 4870
|
||
|
return jQuery.nodeName( event.target, "a" ); // 4871
|
||
|
} // 4872
|
||
|
}, // 4873
|
||
|
// 4874
|
||
|
beforeunload: { // 4875
|
||
|
postDispatch: function( event ) { // 4876
|
||
|
// 4877
|
||
|
// Support: Firefox 20+ // 4878
|
||
|
// Firefox doesn't alert if the returnValue field is not set. // 4879
|
||
|
if ( event.result !== undefined && event.originalEvent ) { // 4880
|
||
|
event.originalEvent.returnValue = event.result; // 4881
|
||
|
} // 4882
|
||
|
} // 4883
|
||
|
} // 4884
|
||
|
}, // 4885
|
||
|
// 4886
|
||
|
simulate: function( type, elem, event, bubble ) { // 4887
|
||
|
// Piggyback on a donor event to simulate a different one. // 4888
|
||
|
// Fake originalEvent to avoid donor's stopPropagation, but if the // 4889
|
||
|
// simulated event prevents default then we do the same on the donor. // 4890
|
||
|
var e = jQuery.extend( // 4891
|
||
|
new jQuery.Event(), // 4892
|
||
|
event, // 4893
|
||
|
{ // 4894
|
||
|
type: type, // 4895
|
||
|
isSimulated: true, // 4896
|
||
|
originalEvent: {} // 4897
|
||
|
} // 4898
|
||
|
); // 4899
|
||
|
if ( bubble ) { // 4900
|
||
|
jQuery.event.trigger( e, null, elem ); // 4901
|
||
|
} else { // 4902
|
||
|
jQuery.event.dispatch.call( elem, e ); // 4903
|
||
|
} // 4904
|
||
|
if ( e.isDefaultPrevented() ) { // 4905
|
||
|
event.preventDefault(); // 4906
|
||
|
} // 4907
|
||
|
} // 4908
|
||
|
}; // 4909
|
||
|
// 4910
|
||
|
jQuery.removeEvent = document.removeEventListener ? // 4911
|
||
|
function( elem, type, handle ) { // 4912
|
||
|
if ( elem.removeEventListener ) { // 4913
|
||
|
elem.removeEventListener( type, handle, false ); // 4914
|
||
|
} // 4915
|
||
|
} : // 4916
|
||
|
function( elem, type, handle ) { // 4917
|
||
|
var name = "on" + type; // 4918
|
||
|
// 4919
|
||
|
if ( elem.detachEvent ) { // 4920
|
||
|
// 4921
|
||
|
// #8545, #7054, preventing memory leaks for custom events in IE6-8 // 4922
|
||
|
// detachEvent needed property on element, by name of that event, to properly expose it to GC // 4923
|
||
|
if ( typeof elem[ name ] === strundefined ) { // 4924
|
||
|
elem[ name ] = null; // 4925
|
||
|
} // 4926
|
||
|
// 4927
|
||
|
elem.detachEvent( name, handle ); // 4928
|
||
|
} // 4929
|
||
|
}; // 4930
|
||
|
// 4931
|
||
|
jQuery.Event = function( src, props ) { // 4932
|
||
|
// Allow instantiation without the 'new' keyword // 4933
|
||
|
if ( !(this instanceof jQuery.Event) ) { // 4934
|
||
|
return new jQuery.Event( src, props ); // 4935
|
||
|
} // 4936
|
||
|
// 4937
|
||
|
// Event object // 4938
|
||
|
if ( src && src.type ) { // 4939
|
||
|
this.originalEvent = src; // 4940
|
||
|
this.type = src.type; // 4941
|
||
|
// 4942
|
||
|
// Events bubbling up the document may have been marked as prevented // 4943
|
||
|
// by a handler lower down the tree; reflect the correct value. // 4944
|
||
|
this.isDefaultPrevented = src.defaultPrevented || // 4945
|
||
|
src.defaultPrevented === undefined && // 4946
|
||
|
// Support: IE < 9, Android < 4.0 // 4947
|
||
|
src.returnValue === false ? // 4948
|
||
|
returnTrue : // 4949
|
||
|
returnFalse; // 4950
|
||
|
// 4951
|
||
|
// Event type // 4952
|
||
|
} else { // 4953
|
||
|
this.type = src; // 4954
|
||
|
} // 4955
|
||
|
// 4956
|
||
|
// Put explicitly provided properties onto the event object // 4957
|
||
|
if ( props ) { // 4958
|
||
|
jQuery.extend( this, props ); // 4959
|
||
|
} // 4960
|
||
|
// 4961
|
||
|
// Create a timestamp if incoming event doesn't have one // 4962
|
||
|
this.timeStamp = src && src.timeStamp || jQuery.now(); // 4963
|
||
|
// 4964
|
||
|
// Mark it as fixed // 4965
|
||
|
this[ jQuery.expando ] = true; // 4966
|
||
|
}; // 4967
|
||
|
// 4968
|
||
|
// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding // 4969
|
||
|
// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html // 4970
|
||
|
jQuery.Event.prototype = { // 4971
|
||
|
isDefaultPrevented: returnFalse, // 4972
|
||
|
isPropagationStopped: returnFalse, // 4973
|
||
|
isImmediatePropagationStopped: returnFalse, // 4974
|
||
|
// 4975
|
||
|
preventDefault: function() { // 4976
|
||
|
var e = this.originalEvent; // 4977
|
||
|
// 4978
|
||
|
this.isDefaultPrevented = returnTrue; // 4979
|
||
|
if ( !e ) { // 4980
|
||
|
return; // 4981
|
||
|
} // 4982
|
||
|
// 4983
|
||
|
// If preventDefault exists, run it on the original event // 4984
|
||
|
if ( e.preventDefault ) { // 4985
|
||
|
e.preventDefault(); // 4986
|
||
|
// 4987
|
||
|
// Support: IE // 4988
|
||
|
// Otherwise set the returnValue property of the original event to false // 4989
|
||
|
} else { // 4990
|
||
|
e.returnValue = false; // 4991
|
||
|
} // 4992
|
||
|
}, // 4993
|
||
|
stopPropagation: function() { // 4994
|
||
|
var e = this.originalEvent; // 4995
|
||
|
// 4996
|
||
|
this.isPropagationStopped = returnTrue; // 4997
|
||
|
if ( !e ) { // 4998
|
||
|
return; // 4999
|
||
|
} // 5000
|
||
|
// If stopPropagation exists, run it on the original event // 5001
|
||
|
if ( e.stopPropagation ) { // 5002
|
||
|
e.stopPropagation(); // 5003
|
||
|
} // 5004
|
||
|
// 5005
|
||
|
// Support: IE // 5006
|
||
|
// Set the cancelBubble property of the original event to true // 5007
|
||
|
e.cancelBubble = true; // 5008
|
||
|
}, // 5009
|
||
|
stopImmediatePropagation: function() { // 5010
|
||
|
var e = this.originalEvent; // 5011
|
||
|
// 5012
|
||
|
this.isImmediatePropagationStopped = returnTrue; // 5013
|
||
|
// 5014
|
||
|
if ( e && e.stopImmediatePropagation ) { // 5015
|
||
|
e.stopImmediatePropagation(); // 5016
|
||
|
} // 5017
|
||
|
// 5018
|
||
|
this.stopPropagation(); // 5019
|
||
|
} // 5020
|
||
|
}; // 5021
|
||
|
// 5022
|
||
|
// Create mouseenter/leave events using mouseover/out and event-time checks // 5023
|
||
|
jQuery.each({ // 5024
|
||
|
mouseenter: "mouseover", // 5025
|
||
|
mouseleave: "mouseout", // 5026
|
||
|
pointerenter: "pointerover", // 5027
|
||
|
pointerleave: "pointerout" // 5028
|
||
|
}, function( orig, fix ) { // 5029
|
||
|
jQuery.event.special[ orig ] = { // 5030
|
||
|
delegateType: fix, // 5031
|
||
|
bindType: fix, // 5032
|
||
|
// 5033
|
||
|
handle: function( event ) { // 5034
|
||
|
var ret, // 5035
|
||
|
target = this, // 5036
|
||
|
related = event.relatedTarget, // 5037
|
||
|
handleObj = event.handleObj; // 5038
|
||
|
// 5039
|
||
|
// For mousenter/leave call the handler if related is outside the target. // 5040
|
||
|
// NB: No relatedTarget if the mouse left/entered the browser window // 5041
|
||
|
if ( !related || (related !== target && !jQuery.contains( target, related )) ) { // 5042
|
||
|
event.type = handleObj.origType; // 5043
|
||
|
ret = handleObj.handler.apply( this, arguments ); // 5044
|
||
|
event.type = fix; // 5045
|
||
|
} // 5046
|
||
|
return ret; // 5047
|
||
|
} // 5048
|
||
|
}; // 5049
|
||
|
}); // 5050
|
||
|
// 5051
|
||
|
// IE submit delegation // 5052
|
||
|
if ( !support.submitBubbles ) { // 5053
|
||
|
// 5054
|
||
|
jQuery.event.special.submit = { // 5055
|
||
|
setup: function() { // 5056
|
||
|
// Only need this for delegated form submit events // 5057
|
||
|
if ( jQuery.nodeName( this, "form" ) ) { // 5058
|
||
|
return false; // 5059
|
||
|
} // 5060
|
||
|
// 5061
|
||
|
// Lazy-add a submit handler when a descendant form may potentially be submitted // 5062
|
||
|
jQuery.event.add( this, "click._submit keypress._submit", function( e ) { // 5063
|
||
|
// Node name check avoids a VML-related crash in IE (#9807) // 5064
|
||
|
var elem = e.target, // 5065
|
||
|
form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.form : undefined; // 5066
|
||
|
if ( form && !jQuery._data( form, "submitBubbles" ) ) { // 5067
|
||
|
jQuery.event.add( form, "submit._submit", function( event ) { // 5068
|
||
|
event._submit_bubble = true; // 5069
|
||
|
}); // 5070
|
||
|
jQuery._data( form, "submitBubbles", true ); // 5071
|
||
|
} // 5072
|
||
|
}); // 5073
|
||
|
// return undefined since we don't need an event listener // 5074
|
||
|
}, // 5075
|
||
|
// 5076
|
||
|
postDispatch: function( event ) { // 5077
|
||
|
// If form was submitted by the user, bubble the event up the tree // 5078
|
||
|
if ( event._submit_bubble ) { // 5079
|
||
|
delete event._submit_bubble; // 5080
|
||
|
if ( this.parentNode && !event.isTrigger ) { // 5081
|
||
|
jQuery.event.simulate( "submit", this.parentNode, event, true ); // 5082
|
||
|
} // 5083
|
||
|
} // 5084
|
||
|
}, // 5085
|
||
|
// 5086
|
||
|
teardown: function() { // 5087
|
||
|
// Only need this for delegated form submit events // 5088
|
||
|
if ( jQuery.nodeName( this, "form" ) ) { // 5089
|
||
|
return false; // 5090
|
||
|
} // 5091
|
||
|
// 5092
|
||
|
// Remove delegated handlers; cleanData eventually reaps submit handlers attached above // 5093
|
||
|
jQuery.event.remove( this, "._submit" ); // 5094
|
||
|
} // 5095
|
||
|
}; // 5096
|
||
|
} // 5097
|
||
|
// 5098
|
||
|
// IE change delegation and checkbox/radio fix // 5099
|
||
|
if ( !support.changeBubbles ) { // 5100
|
||
|
// 5101
|
||
|
jQuery.event.special.change = { // 5102
|
||
|
// 5103
|
||
|
setup: function() { // 5104
|
||
|
// 5105
|
||
|
if ( rformElems.test( this.nodeName ) ) { // 5106
|
||
|
// IE doesn't fire change on a check/radio until blur; trigger it on click // 5107
|
||
|
// after a propertychange. Eat the blur-change in special.change.handle. // 5108
|
||
|
// This still fires onchange a second time for check/radio after blur. // 5109
|
||
|
if ( this.type === "checkbox" || this.type === "radio" ) { // 5110
|
||
|
jQuery.event.add( this, "propertychange._change", function( event ) { // 5111
|
||
|
if ( event.originalEvent.propertyName === "checked" ) { // 5112
|
||
|
this._just_changed = true; // 5113
|
||
|
} // 5114
|
||
|
}); // 5115
|
||
|
jQuery.event.add( this, "click._change", function( event ) { // 5116
|
||
|
if ( this._just_changed && !event.isTrigger ) { // 5117
|
||
|
this._just_changed = false; // 5118
|
||
|
} // 5119
|
||
|
// Allow triggered, simulated change events (#11500) // 5120
|
||
|
jQuery.event.simulate( "change", this, event, true ); // 5121
|
||
|
}); // 5122
|
||
|
} // 5123
|
||
|
return false; // 5124
|
||
|
} // 5125
|
||
|
// Delegated event; lazy-add a change handler on descendant inputs // 5126
|
||
|
jQuery.event.add( this, "beforeactivate._change", function( e ) { // 5127
|
||
|
var elem = e.target; // 5128
|
||
|
// 5129
|
||
|
if ( rformElems.test( elem.nodeName ) && !jQuery._data( elem, "changeBubbles" ) ) { // 5130
|
||
|
jQuery.event.add( elem, "change._change", function( event ) { // 5131
|
||
|
if ( this.parentNode && !event.isSimulated && !event.isTrigger ) { // 5132
|
||
|
jQuery.event.simulate( "change", this.parentNode, event, true ); // 5133
|
||
|
} // 5134
|
||
|
}); // 5135
|
||
|
jQuery._data( elem, "changeBubbles", true ); // 5136
|
||
|
} // 5137
|
||
|
}); // 5138
|
||
|
}, // 5139
|
||
|
// 5140
|
||
|
handle: function( event ) { // 5141
|
||
|
var elem = event.target; // 5142
|
||
|
// 5143
|
||
|
// Swallow native change events from checkbox/radio, we already triggered them above // 5144
|
||
|
if ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== "radio" && elem.type !== "checkbox") ) {
|
||
|
return event.handleObj.handler.apply( this, arguments ); // 5146
|
||
|
} // 5147
|
||
|
}, // 5148
|
||
|
// 5149
|
||
|
teardown: function() { // 5150
|
||
|
jQuery.event.remove( this, "._change" ); // 5151
|
||
|
// 5152
|
||
|
return !rformElems.test( this.nodeName ); // 5153
|
||
|
} // 5154
|
||
|
}; // 5155
|
||
|
} // 5156
|
||
|
// 5157
|
||
|
// Create "bubbling" focus and blur events // 5158
|
||
|
if ( !support.focusinBubbles ) { // 5159
|
||
|
jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) { // 5160
|
||
|
// 5161
|
||
|
// Attach a single capturing handler on the document while someone wants focusin/focusout // 5162
|
||
|
var handler = function( event ) { // 5163
|
||
|
jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true ); // 5164
|
||
|
}; // 5165
|
||
|
// 5166
|
||
|
jQuery.event.special[ fix ] = { // 5167
|
||
|
setup: function() { // 5168
|
||
|
var doc = this.ownerDocument || this, // 5169
|
||
|
attaches = jQuery._data( doc, fix ); // 5170
|
||
|
// 5171
|
||
|
if ( !attaches ) { // 5172
|
||
|
doc.addEventListener( orig, handler, true ); // 5173
|
||
|
} // 5174
|
||
|
jQuery._data( doc, fix, ( attaches || 0 ) + 1 ); // 5175
|
||
|
}, // 5176
|
||
|
teardown: function() { // 5177
|
||
|
var doc = this.ownerDocument || this, // 5178
|
||
|
attaches = jQuery._data( doc, fix ) - 1; // 5179
|
||
|
// 5180
|
||
|
if ( !attaches ) { // 5181
|
||
|
doc.removeEventListener( orig, handler, true ); // 5182
|
||
|
jQuery._removeData( doc, fix ); // 5183
|
||
|
} else { // 5184
|
||
|
jQuery._data( doc, fix, attaches ); // 5185
|
||
|
} // 5186
|
||
|
} // 5187
|
||
|
}; // 5188
|
||
|
}); // 5189
|
||
|
} // 5190
|
||
|
// 5191
|
||
|
jQuery.fn.extend({ // 5192
|
||
|
// 5193
|
||
|
on: function( types, selector, data, fn, /*INTERNAL*/ one ) { // 5194
|
||
|
var type, origFn; // 5195
|
||
|
// 5196
|
||
|
// Types can be a map of types/handlers // 5197
|
||
|
if ( typeof types === "object" ) { // 5198
|
||
|
// ( types-Object, selector, data ) // 5199
|
||
|
if ( typeof selector !== "string" ) { // 5200
|
||
|
// ( types-Object, data ) // 5201
|
||
|
data = data || selector; // 5202
|
||
|
selector = undefined; // 5203
|
||
|
} // 5204
|
||
|
for ( type in types ) { // 5205
|
||
|
this.on( type, selector, data, types[ type ], one ); // 5206
|
||
|
} // 5207
|
||
|
return this; // 5208
|
||
|
} // 5209
|
||
|
// 5210
|
||
|
if ( data == null && fn == null ) { // 5211
|
||
|
// ( types, fn ) // 5212
|
||
|
fn = selector; // 5213
|
||
|
data = selector = undefined; // 5214
|
||
|
} else if ( fn == null ) { // 5215
|
||
|
if ( typeof selector === "string" ) { // 5216
|
||
|
// ( types, selector, fn ) // 5217
|
||
|
fn = data; // 5218
|
||
|
data = undefined; // 5219
|
||
|
} else { // 5220
|
||
|
// ( types, data, fn ) // 5221
|
||
|
fn = data; // 5222
|
||
|
data = selector; // 5223
|
||
|
selector = undefined; // 5224
|
||
|
} // 5225
|
||
|
} // 5226
|
||
|
if ( fn === false ) { // 5227
|
||
|
fn = returnFalse; // 5228
|
||
|
} else if ( !fn ) { // 5229
|
||
|
return this; // 5230
|
||
|
} // 5231
|
||
|
// 5232
|
||
|
if ( one === 1 ) { // 5233
|
||
|
origFn = fn; // 5234
|
||
|
fn = function( event ) { // 5235
|
||
|
// Can use an empty set, since event contains the info // 5236
|
||
|
jQuery().off( event ); // 5237
|
||
|
return origFn.apply( this, arguments ); // 5238
|
||
|
}; // 5239
|
||
|
// Use same guid so caller can remove using origFn // 5240
|
||
|
fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); // 5241
|
||
|
} // 5242
|
||
|
return this.each( function() { // 5243
|
||
|
jQuery.event.add( this, types, fn, data, selector ); // 5244
|
||
|
}); // 5245
|
||
|
}, // 5246
|
||
|
one: function( types, selector, data, fn ) { // 5247
|
||
|
return this.on( types, selector, data, fn, 1 ); // 5248
|
||
|
}, // 5249
|
||
|
off: function( types, selector, fn ) { // 5250
|
||
|
var handleObj, type; // 5251
|
||
|
if ( types && types.preventDefault && types.handleObj ) { // 5252
|
||
|
// ( event ) dispatched jQuery.Event // 5253
|
||
|
handleObj = types.handleObj; // 5254
|
||
|
jQuery( types.delegateTarget ).off( // 5255
|
||
|
handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType, // 5256
|
||
|
handleObj.selector, // 5257
|
||
|
handleObj.handler // 5258
|
||
|
); // 5259
|
||
|
return this; // 5260
|
||
|
} // 5261
|
||
|
if ( typeof types === "object" ) { // 5262
|
||
|
// ( types-object [, selector] ) // 5263
|
||
|
for ( type in types ) { // 5264
|
||
|
this.off( type, selector, types[ type ] ); // 5265
|
||
|
} // 5266
|
||
|
return this; // 5267
|
||
|
} // 5268
|
||
|
if ( selector === false || typeof selector === "function" ) { // 5269
|
||
|
// ( types [, fn] ) // 5270
|
||
|
fn = selector; // 5271
|
||
|
selector = undefined; // 5272
|
||
|
} // 5273
|
||
|
if ( fn === false ) { // 5274
|
||
|
fn = returnFalse; // 5275
|
||
|
} // 5276
|
||
|
return this.each(function() { // 5277
|
||
|
jQuery.event.remove( this, types, fn, selector ); // 5278
|
||
|
}); // 5279
|
||
|
}, // 5280
|
||
|
// 5281
|
||
|
trigger: function( type, data ) { // 5282
|
||
|
return this.each(function() { // 5283
|
||
|
jQuery.event.trigger( type, data, this ); // 5284
|
||
|
}); // 5285
|
||
|
}, // 5286
|
||
|
triggerHandler: function( type, data ) { // 5287
|
||
|
var elem = this[0]; // 5288
|
||
|
if ( elem ) { // 5289
|
||
|
return jQuery.event.trigger( type, data, elem, true ); // 5290
|
||
|
} // 5291
|
||
|
} // 5292
|
||
|
}); // 5293
|
||
|
// 5294
|
||
|
// 5295
|
||
|
function createSafeFragment( document ) { // 5296
|
||
|
var list = nodeNames.split( "|" ), // 5297
|
||
|
safeFrag = document.createDocumentFragment(); // 5298
|
||
|
// 5299
|
||
|
if ( safeFrag.createElement ) { // 5300
|
||
|
while ( list.length ) { // 5301
|
||
|
safeFrag.createElement( // 5302
|
||
|
list.pop() // 5303
|
||
|
); // 5304
|
||
|
} // 5305
|
||
|
} // 5306
|
||
|
return safeFrag; // 5307
|
||
|
} // 5308
|
||
|
// 5309
|
||
|
var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|" + // 5310
|
||
|
"header|hgroup|mark|meter|nav|output|progress|section|summary|time|video", // 5311
|
||
|
rinlinejQuery = / jQuery\d+="(?:null|\d+)"/g, // 5312
|
||
|
rnoshimcache = new RegExp("<(?:" + nodeNames + ")[\\s/>]", "i"), // 5313
|
||
|
rleadingWhitespace = /^\s+/, // 5314
|
||
|
rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi, // 5315
|
||
|
rtagName = /<([\w:]+)/, // 5316
|
||
|
rtbody = /<tbody/i, // 5317
|
||
|
rhtml = /<|&#?\w+;/, // 5318
|
||
|
rnoInnerhtml = /<(?:script|style|link)/i, // 5319
|
||
|
// checked="checked" or checked // 5320
|
||
|
rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i, // 5321
|
||
|
rscriptType = /^$|\/(?:java|ecma)script/i, // 5322
|
||
|
rscriptTypeMasked = /^true\/(.*)/, // 5323
|
||
|
rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g, // 5324
|
||
|
// 5325
|
||
|
// We have to close these tags to support XHTML (#13200) // 5326
|
||
|
wrapMap = { // 5327
|
||
|
option: [ 1, "<select multiple='multiple'>", "</select>" ], // 5328
|
||
|
legend: [ 1, "<fieldset>", "</fieldset>" ], // 5329
|
||
|
area: [ 1, "<map>", "</map>" ], // 5330
|
||
|
param: [ 1, "<object>", "</object>" ], // 5331
|
||
|
thead: [ 1, "<table>", "</table>" ], // 5332
|
||
|
tr: [ 2, "<table><tbody>", "</tbody></table>" ], // 5333
|
||
|
col: [ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ], // 5334
|
||
|
td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ], // 5335
|
||
|
// 5336
|
||
|
// IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags, // 5337
|
||
|
// unless wrapped in a div with non-breaking characters in front of it. // 5338
|
||
|
_default: support.htmlSerialize ? [ 0, "", "" ] : [ 1, "X<div>", "</div>" ] // 5339
|
||
|
}, // 5340
|
||
|
safeFragment = createSafeFragment( document ), // 5341
|
||
|
fragmentDiv = safeFragment.appendChild( document.createElement("div") ); // 5342
|
||
|
// 5343
|
||
|
wrapMap.optgroup = wrapMap.option; // 5344
|
||
|
wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; // 5345
|
||
|
wrapMap.th = wrapMap.td; // 5346
|
||
|
// 5347
|
||
|
function getAll( context, tag ) { // 5348
|
||
|
var elems, elem, // 5349
|
||
|
i = 0, // 5350
|
||
|
found = typeof context.getElementsByTagName !== strundefined ? context.getElementsByTagName( tag || "*" ) : // 5351
|
||
|
typeof context.querySelectorAll !== strundefined ? context.querySelectorAll( tag || "*" ) : // 5352
|
||
|
undefined; // 5353
|
||
|
// 5354
|
||
|
if ( !found ) { // 5355
|
||
|
for ( found = [], elems = context.childNodes || context; (elem = elems[i]) != null; i++ ) { // 5356
|
||
|
if ( !tag || jQuery.nodeName( elem, tag ) ) { // 5357
|
||
|
found.push( elem ); // 5358
|
||
|
} else { // 5359
|
||
|
jQuery.merge( found, getAll( elem, tag ) ); // 5360
|
||
|
} // 5361
|
||
|
} // 5362
|
||
|
} // 5363
|
||
|
// 5364
|
||
|
return tag === undefined || tag && jQuery.nodeName( context, tag ) ? // 5365
|
||
|
jQuery.merge( [ context ], found ) : // 5366
|
||
|
found; // 5367
|
||
|
} // 5368
|
||
|
// 5369
|
||
|
// Used in buildFragment, fixes the defaultChecked property // 5370
|
||
|
function fixDefaultChecked( elem ) { // 5371
|
||
|
if ( rcheckableType.test( elem.type ) ) { // 5372
|
||
|
elem.defaultChecked = elem.checked; // 5373
|
||
|
} // 5374
|
||
|
} // 5375
|
||
|
// 5376
|
||
|
// Support: IE<8 // 5377
|
||
|
// Manipulating tables requires a tbody // 5378
|
||
|
function manipulationTarget( elem, content ) { // 5379
|
||
|
return jQuery.nodeName( elem, "table" ) && // 5380
|
||
|
jQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ? // 5381
|
||
|
// 5382
|
||
|
elem.getElementsByTagName("tbody")[0] || // 5383
|
||
|
elem.appendChild( elem.ownerDocument.createElement("tbody") ) : // 5384
|
||
|
elem; // 5385
|
||
|
} // 5386
|
||
|
// 5387
|
||
|
// Replace/restore the type attribute of script elements for safe DOM manipulation // 5388
|
||
|
function disableScript( elem ) { // 5389
|
||
|
elem.type = (jQuery.find.attr( elem, "type" ) !== null) + "/" + elem.type; // 5390
|
||
|
return elem; // 5391
|
||
|
} // 5392
|
||
|
function restoreScript( elem ) { // 5393
|
||
|
var match = rscriptTypeMasked.exec( elem.type ); // 5394
|
||
|
if ( match ) { // 5395
|
||
|
elem.type = match[1]; // 5396
|
||
|
} else { // 5397
|
||
|
elem.removeAttribute("type"); // 5398
|
||
|
} // 5399
|
||
|
return elem; // 5400
|
||
|
} // 5401
|
||
|
// 5402
|
||
|
// Mark scripts as having already been evaluated // 5403
|
||
|
function setGlobalEval( elems, refElements ) { // 5404
|
||
|
var elem, // 5405
|
||
|
i = 0; // 5406
|
||
|
for ( ; (elem = elems[i]) != null; i++ ) { // 5407
|
||
|
jQuery._data( elem, "globalEval", !refElements || jQuery._data( refElements[i], "globalEval" ) ); // 5408
|
||
|
} // 5409
|
||
|
} // 5410
|
||
|
// 5411
|
||
|
function cloneCopyEvent( src, dest ) { // 5412
|
||
|
// 5413
|
||
|
if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) { // 5414
|
||
|
return; // 5415
|
||
|
} // 5416
|
||
|
// 5417
|
||
|
var type, i, l, // 5418
|
||
|
oldData = jQuery._data( src ), // 5419
|
||
|
curData = jQuery._data( dest, oldData ), // 5420
|
||
|
events = oldData.events; // 5421
|
||
|
// 5422
|
||
|
if ( events ) { // 5423
|
||
|
delete curData.handle; // 5424
|
||
|
curData.events = {}; // 5425
|
||
|
// 5426
|
||
|
for ( type in events ) { // 5427
|
||
|
for ( i = 0, l = events[ type ].length; i < l; i++ ) { // 5428
|
||
|
jQuery.event.add( dest, type, events[ type ][ i ] ); // 5429
|
||
|
} // 5430
|
||
|
} // 5431
|
||
|
} // 5432
|
||
|
// 5433
|
||
|
// make the cloned public data object a copy from the original // 5434
|
||
|
if ( curData.data ) { // 5435
|
||
|
curData.data = jQuery.extend( {}, curData.data ); // 5436
|
||
|
} // 5437
|
||
|
} // 5438
|
||
|
// 5439
|
||
|
function fixCloneNodeIssues( src, dest ) { // 5440
|
||
|
var nodeName, e, data; // 5441
|
||
|
// 5442
|
||
|
// We do not need to do anything for non-Elements // 5443
|
||
|
if ( dest.nodeType !== 1 ) { // 5444
|
||
|
return; // 5445
|
||
|
} // 5446
|
||
|
// 5447
|
||
|
nodeName = dest.nodeName.toLowerCase(); // 5448
|
||
|
// 5449
|
||
|
// IE6-8 copies events bound via attachEvent when using cloneNode. // 5450
|
||
|
if ( !support.noCloneEvent && dest[ jQuery.expando ] ) { // 5451
|
||
|
data = jQuery._data( dest ); // 5452
|
||
|
// 5453
|
||
|
for ( e in data.events ) { // 5454
|
||
|
jQuery.removeEvent( dest, e, data.handle ); // 5455
|
||
|
} // 5456
|
||
|
// 5457
|
||
|
// Event data gets referenced instead of copied if the expando gets copied too // 5458
|
||
|
dest.removeAttribute( jQuery.expando ); // 5459
|
||
|
} // 5460
|
||
|
// 5461
|
||
|
// IE blanks contents when cloning scripts, and tries to evaluate newly-set text // 5462
|
||
|
if ( nodeName === "script" && dest.text !== src.text ) { // 5463
|
||
|
disableScript( dest ).text = src.text; // 5464
|
||
|
restoreScript( dest ); // 5465
|
||
|
// 5466
|
||
|
// IE6-10 improperly clones children of object elements using classid. // 5467
|
||
|
// IE10 throws NoModificationAllowedError if parent is null, #12132. // 5468
|
||
|
} else if ( nodeName === "object" ) { // 5469
|
||
|
if ( dest.parentNode ) { // 5470
|
||
|
dest.outerHTML = src.outerHTML; // 5471
|
||
|
} // 5472
|
||
|
// 5473
|
||
|
// This path appears unavoidable for IE9. When cloning an object // 5474
|
||
|
// element in IE9, the outerHTML strategy above is not sufficient. // 5475
|
||
|
// If the src has innerHTML and the destination does not, // 5476
|
||
|
// copy the src.innerHTML into the dest.innerHTML. #10324 // 5477
|
||
|
if ( support.html5Clone && ( src.innerHTML && !jQuery.trim(dest.innerHTML) ) ) { // 5478
|
||
|
dest.innerHTML = src.innerHTML; // 5479
|
||
|
} // 5480
|
||
|
// 5481
|
||
|
} else if ( nodeName === "input" && rcheckableType.test( src.type ) ) { // 5482
|
||
|
// IE6-8 fails to persist the checked state of a cloned checkbox // 5483
|
||
|
// or radio button. Worse, IE6-7 fail to give the cloned element // 5484
|
||
|
// a checked appearance if the defaultChecked value isn't also set // 5485
|
||
|
// 5486
|
||
|
dest.defaultChecked = dest.checked = src.checked; // 5487
|
||
|
// 5488
|
||
|
// IE6-7 get confused and end up setting the value of a cloned // 5489
|
||
|
// checkbox/radio button to an empty string instead of "on" // 5490
|
||
|
if ( dest.value !== src.value ) { // 5491
|
||
|
dest.value = src.value; // 5492
|
||
|
} // 5493
|
||
|
// 5494
|
||
|
// IE6-8 fails to return the selected option to the default selected // 5495
|
||
|
// state when cloning options // 5496
|
||
|
} else if ( nodeName === "option" ) { // 5497
|
||
|
dest.defaultSelected = dest.selected = src.defaultSelected; // 5498
|
||
|
// 5499
|
||
|
// IE6-8 fails to set the defaultValue to the correct value when // 5500
|
||
|
// cloning other types of input fields // 5501
|
||
|
} else if ( nodeName === "input" || nodeName === "textarea" ) { // 5502
|
||
|
dest.defaultValue = src.defaultValue; // 5503
|
||
|
} // 5504
|
||
|
} // 5505
|
||
|
// 5506
|
||
|
jQuery.extend({ // 5507
|
||
|
clone: function( elem, dataAndEvents, deepDataAndEvents ) { // 5508
|
||
|
var destElements, node, clone, i, srcElements, // 5509
|
||
|
inPage = jQuery.contains( elem.ownerDocument, elem ); // 5510
|
||
|
// 5511
|
||
|
if ( support.html5Clone || jQuery.isXMLDoc(elem) || !rnoshimcache.test( "<" + elem.nodeName + ">" ) ) { // 5512
|
||
|
clone = elem.cloneNode( true ); // 5513
|
||
|
// 5514
|
||
|
// IE<=8 does not properly clone detached, unknown element nodes // 5515
|
||
|
} else { // 5516
|
||
|
fragmentDiv.innerHTML = elem.outerHTML; // 5517
|
||
|
fragmentDiv.removeChild( clone = fragmentDiv.firstChild ); // 5518
|
||
|
} // 5519
|
||
|
// 5520
|
||
|
if ( (!support.noCloneEvent || !support.noCloneChecked) && // 5521
|
||
|
(elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) { // 5522
|
||
|
// 5523
|
||
|
// We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2 // 5524
|
||
|
destElements = getAll( clone ); // 5525
|
||
|
srcElements = getAll( elem ); // 5526
|
||
|
// 5527
|
||
|
// Fix all IE cloning issues // 5528
|
||
|
for ( i = 0; (node = srcElements[i]) != null; ++i ) { // 5529
|
||
|
// Ensure that the destination node is not null; Fixes #9587 // 5530
|
||
|
if ( destElements[i] ) { // 5531
|
||
|
fixCloneNodeIssues( node, destElements[i] ); // 5532
|
||
|
} // 5533
|
||
|
} // 5534
|
||
|
} // 5535
|
||
|
// 5536
|
||
|
// Copy the events from the original to the clone // 5537
|
||
|
if ( dataAndEvents ) { // 5538
|
||
|
if ( deepDataAndEvents ) { // 5539
|
||
|
srcElements = srcElements || getAll( elem ); // 5540
|
||
|
destElements = destElements || getAll( clone ); // 5541
|
||
|
// 5542
|
||
|
for ( i = 0; (node = srcElements[i]) != null; i++ ) { // 5543
|
||
|
cloneCopyEvent( node, destElements[i] ); // 5544
|
||
|
} // 5545
|
||
|
} else { // 5546
|
||
|
cloneCopyEvent( elem, clone ); // 5547
|
||
|
} // 5548
|
||
|
} // 5549
|
||
|
// 5550
|
||
|
// Preserve script evaluation history // 5551
|
||
|
destElements = getAll( clone, "script" ); // 5552
|
||
|
if ( destElements.length > 0 ) { // 5553
|
||
|
setGlobalEval( destElements, !inPage && getAll( elem, "script" ) ); // 5554
|
||
|
} // 5555
|
||
|
// 5556
|
||
|
destElements = srcElements = node = null; // 5557
|
||
|
// 5558
|
||
|
// Return the cloned set // 5559
|
||
|
return clone; // 5560
|
||
|
}, // 5561
|
||
|
// 5562
|
||
|
buildFragment: function( elems, context, scripts, selection ) { // 5563
|
||
|
var j, elem, contains, // 5564
|
||
|
tmp, tag, tbody, wrap, // 5565
|
||
|
l = elems.length, // 5566
|
||
|
// 5567
|
||
|
// Ensure a safe fragment // 5568
|
||
|
safe = createSafeFragment( context ), // 5569
|
||
|
// 5570
|
||
|
nodes = [], // 5571
|
||
|
i = 0; // 5572
|
||
|
// 5573
|
||
|
for ( ; i < l; i++ ) { // 5574
|
||
|
elem = elems[ i ]; // 5575
|
||
|
// 5576
|
||
|
if ( elem || elem === 0 ) { // 5577
|
||
|
// 5578
|
||
|
// Add nodes directly // 5579
|
||
|
if ( jQuery.type( elem ) === "object" ) { // 5580
|
||
|
jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem ); // 5581
|
||
|
// 5582
|
||
|
// Convert non-html into a text node // 5583
|
||
|
} else if ( !rhtml.test( elem ) ) { // 5584
|
||
|
nodes.push( context.createTextNode( elem ) ); // 5585
|
||
|
// 5586
|
||
|
// Convert html into DOM nodes // 5587
|
||
|
} else { // 5588
|
||
|
tmp = tmp || safe.appendChild( context.createElement("div") ); // 5589
|
||
|
// 5590
|
||
|
// Deserialize a standard representation // 5591
|
||
|
tag = (rtagName.exec( elem ) || [ "", "" ])[ 1 ].toLowerCase(); // 5592
|
||
|
wrap = wrapMap[ tag ] || wrapMap._default; // 5593
|
||
|
// 5594
|
||
|
tmp.innerHTML = wrap[1] + elem.replace( rxhtmlTag, "<$1></$2>" ) + wrap[2]; // 5595
|
||
|
// 5596
|
||
|
// Descend through wrappers to the right content // 5597
|
||
|
j = wrap[0]; // 5598
|
||
|
while ( j-- ) { // 5599
|
||
|
tmp = tmp.lastChild; // 5600
|
||
|
} // 5601
|
||
|
// 5602
|
||
|
// Manually add leading whitespace removed by IE // 5603
|
||
|
if ( !support.leadingWhitespace && rleadingWhitespace.test( elem ) ) { // 5604
|
||
|
nodes.push( context.createTextNode( rleadingWhitespace.exec( elem )[0] ) ); // 5605
|
||
|
} // 5606
|
||
|
// 5607
|
||
|
// Remove IE's autoinserted <tbody> from table fragments // 5608
|
||
|
if ( !support.tbody ) { // 5609
|
||
|
// 5610
|
||
|
// String was a <table>, *may* have spurious <tbody> // 5611
|
||
|
elem = tag === "table" && !rtbody.test( elem ) ? // 5612
|
||
|
tmp.firstChild : // 5613
|
||
|
// 5614
|
||
|
// String was a bare <thead> or <tfoot> // 5615
|
||
|
wrap[1] === "<table>" && !rtbody.test( elem ) ? // 5616
|
||
|
tmp : // 5617
|
||
|
0; // 5618
|
||
|
// 5619
|
||
|
j = elem && elem.childNodes.length; // 5620
|
||
|
while ( j-- ) { // 5621
|
||
|
if ( jQuery.nodeName( (tbody = elem.childNodes[j]), "tbody" ) && !tbody.childNodes.length ) { // 5622
|
||
|
elem.removeChild( tbody ); // 5623
|
||
|
} // 5624
|
||
|
} // 5625
|
||
|
} // 5626
|
||
|
// 5627
|
||
|
jQuery.merge( nodes, tmp.childNodes ); // 5628
|
||
|
// 5629
|
||
|
// Fix #12392 for WebKit and IE > 9 // 5630
|
||
|
tmp.textContent = ""; // 5631
|
||
|
// 5632
|
||
|
// Fix #12392 for oldIE // 5633
|
||
|
while ( tmp.firstChild ) { // 5634
|
||
|
tmp.removeChild( tmp.firstChild ); // 5635
|
||
|
} // 5636
|
||
|
// 5637
|
||
|
// Remember the top-level container for proper cleanup // 5638
|
||
|
tmp = safe.lastChild; // 5639
|
||
|
} // 5640
|
||
|
} // 5641
|
||
|
} // 5642
|
||
|
// 5643
|
||
|
// Fix #11356: Clear elements from fragment // 5644
|
||
|
if ( tmp ) { // 5645
|
||
|
safe.removeChild( tmp ); // 5646
|
||
|
} // 5647
|
||
|
// 5648
|
||
|
// Reset defaultChecked for any radios and checkboxes // 5649
|
||
|
// about to be appended to the DOM in IE 6/7 (#8060) // 5650
|
||
|
if ( !support.appendChecked ) { // 5651
|
||
|
jQuery.grep( getAll( nodes, "input" ), fixDefaultChecked ); // 5652
|
||
|
} // 5653
|
||
|
// 5654
|
||
|
i = 0; // 5655
|
||
|
while ( (elem = nodes[ i++ ]) ) { // 5656
|
||
|
// 5657
|
||
|
// #4087 - If origin and destination elements are the same, and this is // 5658
|
||
|
// that element, do not do anything // 5659
|
||
|
if ( selection && jQuery.inArray( elem, selection ) !== -1 ) { // 5660
|
||
|
continue; // 5661
|
||
|
} // 5662
|
||
|
// 5663
|
||
|
contains = jQuery.contains( elem.ownerDocument, elem ); // 5664
|
||
|
// 5665
|
||
|
// Append to fragment // 5666
|
||
|
tmp = getAll( safe.appendChild( elem ), "script" ); // 5667
|
||
|
// 5668
|
||
|
// Preserve script evaluation history // 5669
|
||
|
if ( contains ) { // 5670
|
||
|
setGlobalEval( tmp ); // 5671
|
||
|
} // 5672
|
||
|
// 5673
|
||
|
// Capture executables // 5674
|
||
|
if ( scripts ) { // 5675
|
||
|
j = 0; // 5676
|
||
|
while ( (elem = tmp[ j++ ]) ) { // 5677
|
||
|
if ( rscriptType.test( elem.type || "" ) ) { // 5678
|
||
|
scripts.push( elem ); // 5679
|
||
|
} // 5680
|
||
|
} // 5681
|
||
|
} // 5682
|
||
|
} // 5683
|
||
|
// 5684
|
||
|
tmp = null; // 5685
|
||
|
// 5686
|
||
|
return safe; // 5687
|
||
|
}, // 5688
|
||
|
// 5689
|
||
|
cleanData: function( elems, /* internal */ acceptData ) { // 5690
|
||
|
var elem, type, id, data, // 5691
|
||
|
i = 0, // 5692
|
||
|
internalKey = jQuery.expando, // 5693
|
||
|
cache = jQuery.cache, // 5694
|
||
|
deleteExpando = support.deleteExpando, // 5695
|
||
|
special = jQuery.event.special; // 5696
|
||
|
// 5697
|
||
|
for ( ; (elem = elems[i]) != null; i++ ) { // 5698
|
||
|
if ( acceptData || jQuery.acceptData( elem ) ) { // 5699
|
||
|
// 5700
|
||
|
id = elem[ internalKey ]; // 5701
|
||
|
data = id && cache[ id ]; // 5702
|
||
|
// 5703
|
||
|
if ( data ) { // 5704
|
||
|
if ( data.events ) { // 5705
|
||
|
for ( type in data.events ) { // 5706
|
||
|
if ( special[ type ] ) { // 5707
|
||
|
jQuery.event.remove( elem, type ); // 5708
|
||
|
// 5709
|
||
|
// This is a shortcut to avoid jQuery.event.remove's overhead // 5710
|
||
|
} else { // 5711
|
||
|
jQuery.removeEvent( elem, type, data.handle ); // 5712
|
||
|
} // 5713
|
||
|
} // 5714
|
||
|
} // 5715
|
||
|
// 5716
|
||
|
// Remove cache only if it was not already removed by jQuery.event.remove // 5717
|
||
|
if ( cache[ id ] ) { // 5718
|
||
|
// 5719
|
||
|
delete cache[ id ]; // 5720
|
||
|
// 5721
|
||
|
// IE does not allow us to delete expando properties from nodes, // 5722
|
||
|
// nor does it have a removeAttribute function on Document nodes; // 5723
|
||
|
// we must handle all of these cases // 5724
|
||
|
if ( deleteExpando ) { // 5725
|
||
|
delete elem[ internalKey ]; // 5726
|
||
|
// 5727
|
||
|
} else if ( typeof elem.removeAttribute !== strundefined ) { // 5728
|
||
|
elem.removeAttribute( internalKey ); // 5729
|
||
|
// 5730
|
||
|
} else { // 5731
|
||
|
elem[ internalKey ] = null; // 5732
|
||
|
} // 5733
|
||
|
// 5734
|
||
|
deletedIds.push( id ); // 5735
|
||
|
} // 5736
|
||
|
} // 5737
|
||
|
} // 5738
|
||
|
} // 5739
|
||
|
} // 5740
|
||
|
}); // 5741
|
||
|
// 5742
|
||
|
jQuery.fn.extend({ // 5743
|
||
|
text: function( value ) { // 5744
|
||
|
return access( this, function( value ) { // 5745
|
||
|
return value === undefined ? // 5746
|
||
|
jQuery.text( this ) : // 5747
|
||
|
this.empty().append( ( this[0] && this[0].ownerDocument || document ).createTextNode( value ) ); // 5748
|
||
|
}, null, value, arguments.length ); // 5749
|
||
|
}, // 5750
|
||
|
// 5751
|
||
|
append: function() { // 5752
|
||
|
return this.domManip( arguments, function( elem ) { // 5753
|
||
|
if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { // 5754
|
||
|
var target = manipulationTarget( this, elem ); // 5755
|
||
|
target.appendChild( elem ); // 5756
|
||
|
} // 5757
|
||
|
}); // 5758
|
||
|
}, // 5759
|
||
|
// 5760
|
||
|
prepend: function() { // 5761
|
||
|
return this.domManip( arguments, function( elem ) { // 5762
|
||
|
if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { // 5763
|
||
|
var target = manipulationTarget( this, elem ); // 5764
|
||
|
target.insertBefore( elem, target.firstChild ); // 5765
|
||
|
} // 5766
|
||
|
}); // 5767
|
||
|
}, // 5768
|
||
|
// 5769
|
||
|
before: function() { // 5770
|
||
|
return this.domManip( arguments, function( elem ) { // 5771
|
||
|
if ( this.parentNode ) { // 5772
|
||
|
this.parentNode.insertBefore( elem, this ); // 5773
|
||
|
} // 5774
|
||
|
}); // 5775
|
||
|
}, // 5776
|
||
|
// 5777
|
||
|
after: function() { // 5778
|
||
|
return this.domManip( arguments, function( elem ) { // 5779
|
||
|
if ( this.parentNode ) { // 5780
|
||
|
this.parentNode.insertBefore( elem, this.nextSibling ); // 5781
|
||
|
} // 5782
|
||
|
}); // 5783
|
||
|
}, // 5784
|
||
|
// 5785
|
||
|
remove: function( selector, keepData /* Internal Use Only */ ) { // 5786
|
||
|
var elem, // 5787
|
||
|
elems = selector ? jQuery.filter( selector, this ) : this, // 5788
|
||
|
i = 0; // 5789
|
||
|
// 5790
|
||
|
for ( ; (elem = elems[i]) != null; i++ ) { // 5791
|
||
|
// 5792
|
||
|
if ( !keepData && elem.nodeType === 1 ) { // 5793
|
||
|
jQuery.cleanData( getAll( elem ) ); // 5794
|
||
|
} // 5795
|
||
|
// 5796
|
||
|
if ( elem.parentNode ) { // 5797
|
||
|
if ( keepData && jQuery.contains( elem.ownerDocument, elem ) ) { // 5798
|
||
|
setGlobalEval( getAll( elem, "script" ) ); // 5799
|
||
|
} // 5800
|
||
|
elem.parentNode.removeChild( elem ); // 5801
|
||
|
} // 5802
|
||
|
} // 5803
|
||
|
// 5804
|
||
|
return this; // 5805
|
||
|
}, // 5806
|
||
|
// 5807
|
||
|
empty: function() { // 5808
|
||
|
var elem, // 5809
|
||
|
i = 0; // 5810
|
||
|
// 5811
|
||
|
for ( ; (elem = this[i]) != null; i++ ) { // 5812
|
||
|
// Remove element nodes and prevent memory leaks // 5813
|
||
|
if ( elem.nodeType === 1 ) { // 5814
|
||
|
jQuery.cleanData( getAll( elem, false ) ); // 5815
|
||
|
} // 5816
|
||
|
// 5817
|
||
|
// Remove any remaining nodes // 5818
|
||
|
while ( elem.firstChild ) { // 5819
|
||
|
elem.removeChild( elem.firstChild ); // 5820
|
||
|
} // 5821
|
||
|
// 5822
|
||
|
// If this is a select, ensure that it displays empty (#12336) // 5823
|
||
|
// Support: IE<9 // 5824
|
||
|
if ( elem.options && jQuery.nodeName( elem, "select" ) ) { // 5825
|
||
|
elem.options.length = 0; // 5826
|
||
|
} // 5827
|
||
|
} // 5828
|
||
|
// 5829
|
||
|
return this; // 5830
|
||
|
}, // 5831
|
||
|
// 5832
|
||
|
clone: function( dataAndEvents, deepDataAndEvents ) { // 5833
|
||
|
dataAndEvents = dataAndEvents == null ? false : dataAndEvents; // 5834
|
||
|
deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; // 5835
|
||
|
// 5836
|
||
|
return this.map(function() { // 5837
|
||
|
return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); // 5838
|
||
|
}); // 5839
|
||
|
}, // 5840
|
||
|
// 5841
|
||
|
html: function( value ) { // 5842
|
||
|
return access( this, function( value ) { // 5843
|
||
|
var elem = this[ 0 ] || {}, // 5844
|
||
|
i = 0, // 5845
|
||
|
l = this.length; // 5846
|
||
|
// 5847
|
||
|
if ( value === undefined ) { // 5848
|
||
|
return elem.nodeType === 1 ? // 5849
|
||
|
elem.innerHTML.replace( rinlinejQuery, "" ) : // 5850
|
||
|
undefined; // 5851
|
||
|
} // 5852
|
||
|
// 5853
|
||
|
// See if we can take a shortcut and just use innerHTML // 5854
|
||
|
if ( typeof value === "string" && !rnoInnerhtml.test( value ) && // 5855
|
||
|
( support.htmlSerialize || !rnoshimcache.test( value ) ) && // 5856
|
||
|
( support.leadingWhitespace || !rleadingWhitespace.test( value ) ) && // 5857
|
||
|
!wrapMap[ (rtagName.exec( value ) || [ "", "" ])[ 1 ].toLowerCase() ] ) { // 5858
|
||
|
// 5859
|
||
|
value = value.replace( rxhtmlTag, "<$1></$2>" ); // 5860
|
||
|
// 5861
|
||
|
try { // 5862
|
||
|
for (; i < l; i++ ) { // 5863
|
||
|
// Remove element nodes and prevent memory leaks // 5864
|
||
|
elem = this[i] || {}; // 5865
|
||
|
if ( elem.nodeType === 1 ) { // 5866
|
||
|
jQuery.cleanData( getAll( elem, false ) ); // 5867
|
||
|
elem.innerHTML = value; // 5868
|
||
|
} // 5869
|
||
|
} // 5870
|
||
|
// 5871
|
||
|
elem = 0; // 5872
|
||
|
// 5873
|
||
|
// If using innerHTML throws an exception, use the fallback method // 5874
|
||
|
} catch(e) {} // 5875
|
||
|
} // 5876
|
||
|
// 5877
|
||
|
if ( elem ) { // 5878
|
||
|
this.empty().append( value ); // 5879
|
||
|
} // 5880
|
||
|
}, null, value, arguments.length ); // 5881
|
||
|
}, // 5882
|
||
|
// 5883
|
||
|
replaceWith: function() { // 5884
|
||
|
var arg = arguments[ 0 ]; // 5885
|
||
|
// 5886
|
||
|
// Make the changes, replacing each context element with the new content // 5887
|
||
|
this.domManip( arguments, function( elem ) { // 5888
|
||
|
arg = this.parentNode; // 5889
|
||
|
// 5890
|
||
|
jQuery.cleanData( getAll( this ) ); // 5891
|
||
|
// 5892
|
||
|
if ( arg ) { // 5893
|
||
|
arg.replaceChild( elem, this ); // 5894
|
||
|
} // 5895
|
||
|
}); // 5896
|
||
|
// 5897
|
||
|
// Force removal if there was no new content (e.g., from empty arguments) // 5898
|
||
|
return arg && (arg.length || arg.nodeType) ? this : this.remove(); // 5899
|
||
|
}, // 5900
|
||
|
// 5901
|
||
|
detach: function( selector ) { // 5902
|
||
|
return this.remove( selector, true ); // 5903
|
||
|
}, // 5904
|
||
|
// 5905
|
||
|
domManip: function( args, callback ) { // 5906
|
||
|
// 5907
|
||
|
// Flatten any nested arrays // 5908
|
||
|
args = concat.apply( [], args ); // 5909
|
||
|
// 5910
|
||
|
var first, node, hasScripts, // 5911
|
||
|
scripts, doc, fragment, // 5912
|
||
|
i = 0, // 5913
|
||
|
l = this.length, // 5914
|
||
|
set = this, // 5915
|
||
|
iNoClone = l - 1, // 5916
|
||
|
value = args[0], // 5917
|
||
|
isFunction = jQuery.isFunction( value ); // 5918
|
||
|
// 5919
|
||
|
// We can't cloneNode fragments that contain checked, in WebKit // 5920
|
||
|
if ( isFunction || // 5921
|
||
|
( l > 1 && typeof value === "string" && // 5922
|
||
|
!support.checkClone && rchecked.test( value ) ) ) { // 5923
|
||
|
return this.each(function( index ) { // 5924
|
||
|
var self = set.eq( index ); // 5925
|
||
|
if ( isFunction ) { // 5926
|
||
|
args[0] = value.call( this, index, self.html() ); // 5927
|
||
|
} // 5928
|
||
|
self.domManip( args, callback ); // 5929
|
||
|
}); // 5930
|
||
|
} // 5931
|
||
|
// 5932
|
||
|
if ( l ) { // 5933
|
||
|
fragment = jQuery.buildFragment( args, this[ 0 ].ownerDocument, false, this ); // 5934
|
||
|
first = fragment.firstChild; // 5935
|
||
|
// 5936
|
||
|
if ( fragment.childNodes.length === 1 ) { // 5937
|
||
|
fragment = first; // 5938
|
||
|
} // 5939
|
||
|
// 5940
|
||
|
if ( first ) { // 5941
|
||
|
scripts = jQuery.map( getAll( fragment, "script" ), disableScript ); // 5942
|
||
|
hasScripts = scripts.length; // 5943
|
||
|
// 5944
|
||
|
// Use the original fragment for the last item instead of the first because it can end up // 5945
|
||
|
// being emptied incorrectly in certain situations (#8070). // 5946
|
||
|
for ( ; i < l; i++ ) { // 5947
|
||
|
node = fragment; // 5948
|
||
|
// 5949
|
||
|
if ( i !== iNoClone ) { // 5950
|
||
|
node = jQuery.clone( node, true, true ); // 5951
|
||
|
// 5952
|
||
|
// Keep references to cloned scripts for later restoration // 5953
|
||
|
if ( hasScripts ) { // 5954
|
||
|
jQuery.merge( scripts, getAll( node, "script" ) ); // 5955
|
||
|
} // 5956
|
||
|
} // 5957
|
||
|
// 5958
|
||
|
callback.call( this[i], node, i ); // 5959
|
||
|
} // 5960
|
||
|
// 5961
|
||
|
if ( hasScripts ) { // 5962
|
||
|
doc = scripts[ scripts.length - 1 ].ownerDocument; // 5963
|
||
|
// 5964
|
||
|
// Reenable scripts // 5965
|
||
|
jQuery.map( scripts, restoreScript ); // 5966
|
||
|
// 5967
|
||
|
// Evaluate executable scripts on first document insertion // 5968
|
||
|
for ( i = 0; i < hasScripts; i++ ) { // 5969
|
||
|
node = scripts[ i ]; // 5970
|
||
|
if ( rscriptType.test( node.type || "" ) && // 5971
|
||
|
!jQuery._data( node, "globalEval" ) && jQuery.contains( doc, node ) ) { // 5972
|
||
|
// 5973
|
||
|
if ( node.src ) { // 5974
|
||
|
// Optional AJAX dependency, but won't run scripts if not present // 5975
|
||
|
if ( jQuery._evalUrl ) { // 5976
|
||
|
jQuery._evalUrl( node.src ); // 5977
|
||
|
} // 5978
|
||
|
} else { // 5979
|
||
|
jQuery.globalEval( ( node.text || node.textContent || node.innerHTML || "" ).replace( rcleanScript, "" ) ); // 5980
|
||
|
} // 5981
|
||
|
} // 5982
|
||
|
} // 5983
|
||
|
} // 5984
|
||
|
// 5985
|
||
|
// Fix #11809: Avoid leaking memory // 5986
|
||
|
fragment = first = null; // 5987
|
||
|
} // 5988
|
||
|
} // 5989
|
||
|
// 5990
|
||
|
return this; // 5991
|
||
|
} // 5992
|
||
|
}); // 5993
|
||
|
// 5994
|
||
|
jQuery.each({ // 5995
|
||
|
appendTo: "append", // 5996
|
||
|
prependTo: "prepend", // 5997
|
||
|
insertBefore: "before", // 5998
|
||
|
insertAfter: "after", // 5999
|
||
|
replaceAll: "replaceWith" // 6000
|
||
|
}, function( name, original ) { // 6001
|
||
|
jQuery.fn[ name ] = function( selector ) { // 6002
|
||
|
var elems, // 6003
|
||
|
i = 0, // 6004
|
||
|
ret = [], // 6005
|
||
|
insert = jQuery( selector ), // 6006
|
||
|
last = insert.length - 1; // 6007
|
||
|
// 6008
|
||
|
for ( ; i <= last; i++ ) { // 6009
|
||
|
elems = i === last ? this : this.clone(true); // 6010
|
||
|
jQuery( insert[i] )[ original ]( elems ); // 6011
|
||
|
// 6012
|
||
|
// Modern browsers can apply jQuery collections as arrays, but oldIE needs a .get() // 6013
|
||
|
push.apply( ret, elems.get() ); // 6014
|
||
|
} // 6015
|
||
|
// 6016
|
||
|
return this.pushStack( ret ); // 6017
|
||
|
}; // 6018
|
||
|
}); // 6019
|
||
|
// 6020
|
||
|
// 6021
|
||
|
var iframe, // 6022
|
||
|
elemdisplay = {}; // 6023
|
||
|
// 6024
|
||
|
/** // 6025
|
||
|
* Retrieve the actual display of a element // 6026
|
||
|
* @param {String} name nodeName of the element // 6027
|
||
|
* @param {Object} doc Document object // 6028
|
||
|
*/ // 6029
|
||
|
// Called only from within defaultDisplay // 6030
|
||
|
function actualDisplay( name, doc ) { // 6031
|
||
|
var style, // 6032
|
||
|
elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ), // 6033
|
||
|
// 6034
|
||
|
// getDefaultComputedStyle might be reliably used only on attached element // 6035
|
||
|
display = window.getDefaultComputedStyle && ( style = window.getDefaultComputedStyle( elem[ 0 ] ) ) ? // 6036
|
||
|
// 6037
|
||
|
// Use of this method is a temporary fix (more like optmization) until something better comes along, // 6038
|
||
|
// since it was removed from specification and supported only in FF // 6039
|
||
|
style.display : jQuery.css( elem[ 0 ], "display" ); // 6040
|
||
|
// 6041
|
||
|
// We don't have any data stored on the element, // 6042
|
||
|
// so use "detach" method as fast way to get rid of the element // 6043
|
||
|
elem.detach(); // 6044
|
||
|
// 6045
|
||
|
return display; // 6046
|
||
|
} // 6047
|
||
|
// 6048
|
||
|
/** // 6049
|
||
|
* Try to determine the default display value of an element // 6050
|
||
|
* @param {String} nodeName // 6051
|
||
|
*/ // 6052
|
||
|
function defaultDisplay( nodeName ) { // 6053
|
||
|
var doc = document, // 6054
|
||
|
display = elemdisplay[ nodeName ]; // 6055
|
||
|
// 6056
|
||
|
if ( !display ) { // 6057
|
||
|
display = actualDisplay( nodeName, doc ); // 6058
|
||
|
// 6059
|
||
|
// If the simple way fails, read from inside an iframe // 6060
|
||
|
if ( display === "none" || !display ) { // 6061
|
||
|
// 6062
|
||
|
// Use the already-created iframe if possible // 6063
|
||
|
iframe = (iframe || jQuery( "<iframe frameborder='0' width='0' height='0'/>" )).appendTo( doc.documentElement ); // 6064
|
||
|
// 6065
|
||
|
// Always write a new HTML skeleton so Webkit and Firefox don't choke on reuse // 6066
|
||
|
doc = ( iframe[ 0 ].contentWindow || iframe[ 0 ].contentDocument ).document; // 6067
|
||
|
// 6068
|
||
|
// Support: IE // 6069
|
||
|
doc.write(); // 6070
|
||
|
doc.close(); // 6071
|
||
|
// 6072
|
||
|
display = actualDisplay( nodeName, doc ); // 6073
|
||
|
iframe.detach(); // 6074
|
||
|
} // 6075
|
||
|
// 6076
|
||
|
// Store the correct default display // 6077
|
||
|
elemdisplay[ nodeName ] = display; // 6078
|
||
|
} // 6079
|
||
|
// 6080
|
||
|
return display; // 6081
|
||
|
} // 6082
|
||
|
// 6083
|
||
|
// 6084
|
||
|
(function() { // 6085
|
||
|
var shrinkWrapBlocksVal; // 6086
|
||
|
// 6087
|
||
|
support.shrinkWrapBlocks = function() { // 6088
|
||
|
if ( shrinkWrapBlocksVal != null ) { // 6089
|
||
|
return shrinkWrapBlocksVal; // 6090
|
||
|
} // 6091
|
||
|
// 6092
|
||
|
// Will be changed later if needed. // 6093
|
||
|
shrinkWrapBlocksVal = false; // 6094
|
||
|
// 6095
|
||
|
// Minified: var b,c,d // 6096
|
||
|
var div, body, container; // 6097
|
||
|
// 6098
|
||
|
body = document.getElementsByTagName( "body" )[ 0 ]; // 6099
|
||
|
if ( !body || !body.style ) { // 6100
|
||
|
// Test fired too early or in an unsupported environment, exit. // 6101
|
||
|
return; // 6102
|
||
|
} // 6103
|
||
|
// 6104
|
||
|
// Setup // 6105
|
||
|
div = document.createElement( "div" ); // 6106
|
||
|
container = document.createElement( "div" ); // 6107
|
||
|
container.style.cssText = "position:absolute;border:0;width:0;height:0;top:0;left:-9999px"; // 6108
|
||
|
body.appendChild( container ).appendChild( div ); // 6109
|
||
|
// 6110
|
||
|
// Support: IE6 // 6111
|
||
|
// Check if elements with layout shrink-wrap their children // 6112
|
||
|
if ( typeof div.style.zoom !== strundefined ) { // 6113
|
||
|
// Reset CSS: box-sizing; display; margin; border // 6114
|
||
|
div.style.cssText = // 6115
|
||
|
// Support: Firefox<29, Android 2.3 // 6116
|
||
|
// Vendor-prefix box-sizing // 6117
|
||
|
"-webkit-box-sizing:content-box;-moz-box-sizing:content-box;" + // 6118
|
||
|
"box-sizing:content-box;display:block;margin:0;border:0;" + // 6119
|
||
|
"padding:1px;width:1px;zoom:1"; // 6120
|
||
|
div.appendChild( document.createElement( "div" ) ).style.width = "5px"; // 6121
|
||
|
shrinkWrapBlocksVal = div.offsetWidth !== 3; // 6122
|
||
|
} // 6123
|
||
|
// 6124
|
||
|
body.removeChild( container ); // 6125
|
||
|
// 6126
|
||
|
return shrinkWrapBlocksVal; // 6127
|
||
|
}; // 6128
|
||
|
// 6129
|
||
|
})(); // 6130
|
||
|
var rmargin = (/^margin/); // 6131
|
||
|
// 6132
|
||
|
var rnumnonpx = new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" ); // 6133
|
||
|
// 6134
|
||
|
// 6135
|
||
|
// 6136
|
||
|
var getStyles, curCSS, // 6137
|
||
|
rposition = /^(top|right|bottom|left)$/; // 6138
|
||
|
// 6139
|
||
|
if ( window.getComputedStyle ) { // 6140
|
||
|
getStyles = function( elem ) { // 6141
|
||
|
// Support: IE<=11+, Firefox<=30+ (#15098, #14150) // 6142
|
||
|
// IE throws on elements created in popups // 6143
|
||
|
// FF meanwhile throws on frame elements through "defaultView.getComputedStyle" // 6144
|
||
|
if ( elem.ownerDocument.defaultView.opener ) { // 6145
|
||
|
return elem.ownerDocument.defaultView.getComputedStyle( elem, null ); // 6146
|
||
|
} // 6147
|
||
|
// 6148
|
||
|
return window.getComputedStyle( elem, null ); // 6149
|
||
|
}; // 6150
|
||
|
// 6151
|
||
|
curCSS = function( elem, name, computed ) { // 6152
|
||
|
var width, minWidth, maxWidth, ret, // 6153
|
||
|
style = elem.style; // 6154
|
||
|
// 6155
|
||
|
computed = computed || getStyles( elem ); // 6156
|
||
|
// 6157
|
||
|
// getPropertyValue is only needed for .css('filter') in IE9, see #12537 // 6158
|
||
|
ret = computed ? computed.getPropertyValue( name ) || computed[ name ] : undefined; // 6159
|
||
|
// 6160
|
||
|
if ( computed ) { // 6161
|
||
|
// 6162
|
||
|
if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) { // 6163
|
||
|
ret = jQuery.style( elem, name ); // 6164
|
||
|
} // 6165
|
||
|
// 6166
|
||
|
// A tribute to the "awesome hack by Dean Edwards" // 6167
|
||
|
// Chrome < 17 and Safari 5.0 uses "computed value" instead of "used value" for margin-right // 6168
|
||
|
// Safari 5.1.7 (at least) returns percentage for a larger set of values, but width seems to be reliably pixels // 6169
|
||
|
// this is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values // 6170
|
||
|
if ( rnumnonpx.test( ret ) && rmargin.test( name ) ) { // 6171
|
||
|
// 6172
|
||
|
// Remember the original values // 6173
|
||
|
width = style.width; // 6174
|
||
|
minWidth = style.minWidth; // 6175
|
||
|
maxWidth = style.maxWidth; // 6176
|
||
|
// 6177
|
||
|
// Put in the new values to get a computed value out // 6178
|
||
|
style.minWidth = style.maxWidth = style.width = ret; // 6179
|
||
|
ret = computed.width; // 6180
|
||
|
// 6181
|
||
|
// Revert the changed values // 6182
|
||
|
style.width = width; // 6183
|
||
|
style.minWidth = minWidth; // 6184
|
||
|
style.maxWidth = maxWidth; // 6185
|
||
|
} // 6186
|
||
|
} // 6187
|
||
|
// 6188
|
||
|
// Support: IE // 6189
|
||
|
// IE returns zIndex value as an integer. // 6190
|
||
|
return ret === undefined ? // 6191
|
||
|
ret : // 6192
|
||
|
ret + ""; // 6193
|
||
|
}; // 6194
|
||
|
} else if ( document.documentElement.currentStyle ) { // 6195
|
||
|
getStyles = function( elem ) { // 6196
|
||
|
return elem.currentStyle; // 6197
|
||
|
}; // 6198
|
||
|
// 6199
|
||
|
curCSS = function( elem, name, computed ) { // 6200
|
||
|
var left, rs, rsLeft, ret, // 6201
|
||
|
style = elem.style; // 6202
|
||
|
// 6203
|
||
|
computed = computed || getStyles( elem ); // 6204
|
||
|
ret = computed ? computed[ name ] : undefined; // 6205
|
||
|
// 6206
|
||
|
// Avoid setting ret to empty string here // 6207
|
||
|
// so we don't default to auto // 6208
|
||
|
if ( ret == null && style && style[ name ] ) { // 6209
|
||
|
ret = style[ name ]; // 6210
|
||
|
} // 6211
|
||
|
// 6212
|
||
|
// From the awesome hack by Dean Edwards // 6213
|
||
|
// http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291 // 6214
|
||
|
// 6215
|
||
|
// If we're not dealing with a regular pixel number // 6216
|
||
|
// but a number that has a weird ending, we need to convert it to pixels // 6217
|
||
|
// but not position css attributes, as those are proportional to the parent element instead // 6218
|
||
|
// and we can't measure the parent instead because it might trigger a "stacking dolls" problem // 6219
|
||
|
if ( rnumnonpx.test( ret ) && !rposition.test( name ) ) { // 6220
|
||
|
// 6221
|
||
|
// Remember the original values // 6222
|
||
|
left = style.left; // 6223
|
||
|
rs = elem.runtimeStyle; // 6224
|
||
|
rsLeft = rs && rs.left; // 6225
|
||
|
// 6226
|
||
|
// Put in the new values to get a computed value out // 6227
|
||
|
if ( rsLeft ) { // 6228
|
||
|
rs.left = elem.currentStyle.left; // 6229
|
||
|
} // 6230
|
||
|
style.left = name === "fontSize" ? "1em" : ret; // 6231
|
||
|
ret = style.pixelLeft + "px"; // 6232
|
||
|
// 6233
|
||
|
// Revert the changed values // 6234
|
||
|
style.left = left; // 6235
|
||
|
if ( rsLeft ) { // 6236
|
||
|
rs.left = rsLeft; // 6237
|
||
|
} // 6238
|
||
|
} // 6239
|
||
|
// 6240
|
||
|
// Support: IE // 6241
|
||
|
// IE returns zIndex value as an integer. // 6242
|
||
|
return ret === undefined ? // 6243
|
||
|
ret : // 6244
|
||
|
ret + "" || "auto"; // 6245
|
||
|
}; // 6246
|
||
|
} // 6247
|
||
|
// 6248
|
||
|
// 6249
|
||
|
// 6250
|
||
|
// 6251
|
||
|
function addGetHookIf( conditionFn, hookFn ) { // 6252
|
||
|
// Define the hook, we'll check on the first run if it's really needed. // 6253
|
||
|
return { // 6254
|
||
|
get: function() { // 6255
|
||
|
var condition = conditionFn(); // 6256
|
||
|
// 6257
|
||
|
if ( condition == null ) { // 6258
|
||
|
// The test was not ready at this point; screw the hook this time // 6259
|
||
|
// but check again when needed next time. // 6260
|
||
|
return; // 6261
|
||
|
} // 6262
|
||
|
// 6263
|
||
|
if ( condition ) { // 6264
|
||
|
// Hook not needed (or it's not possible to use it due to missing dependency), // 6265
|
||
|
// remove it. // 6266
|
||
|
// Since there are no other hooks for marginRight, remove the whole object. // 6267
|
||
|
delete this.get; // 6268
|
||
|
return; // 6269
|
||
|
} // 6270
|
||
|
// 6271
|
||
|
// Hook needed; redefine it so that the support test is not executed again. // 6272
|
||
|
// 6273
|
||
|
return (this.get = hookFn).apply( this, arguments ); // 6274
|
||
|
} // 6275
|
||
|
}; // 6276
|
||
|
} // 6277
|
||
|
// 6278
|
||
|
// 6279
|
||
|
(function() { // 6280
|
||
|
// Minified: var b,c,d,e,f,g, h,i // 6281
|
||
|
var div, style, a, pixelPositionVal, boxSizingReliableVal, // 6282
|
||
|
reliableHiddenOffsetsVal, reliableMarginRightVal; // 6283
|
||
|
// 6284
|
||
|
// Setup // 6285
|
||
|
div = document.createElement( "div" ); // 6286
|
||
|
div.innerHTML = " <link/><table></table><a href='/a'>a</a><input type='checkbox'/>"; // 6287
|
||
|
a = div.getElementsByTagName( "a" )[ 0 ]; // 6288
|
||
|
style = a && a.style; // 6289
|
||
|
// 6290
|
||
|
// Finish early in limited (non-browser) environments // 6291
|
||
|
if ( !style ) { // 6292
|
||
|
return; // 6293
|
||
|
} // 6294
|
||
|
// 6295
|
||
|
style.cssText = "float:left;opacity:.5"; // 6296
|
||
|
// 6297
|
||
|
// Support: IE<9 // 6298
|
||
|
// Make sure that element opacity exists (as opposed to filter) // 6299
|
||
|
support.opacity = style.opacity === "0.5"; // 6300
|
||
|
// 6301
|
||
|
// Verify style float existence // 6302
|
||
|
// (IE uses styleFloat instead of cssFloat) // 6303
|
||
|
support.cssFloat = !!style.cssFloat; // 6304
|
||
|
// 6305
|
||
|
div.style.backgroundClip = "content-box"; // 6306
|
||
|
div.cloneNode( true ).style.backgroundClip = ""; // 6307
|
||
|
support.clearCloneStyle = div.style.backgroundClip === "content-box"; // 6308
|
||
|
// 6309
|
||
|
// Support: Firefox<29, Android 2.3 // 6310
|
||
|
// Vendor-prefix box-sizing // 6311
|
||
|
support.boxSizing = style.boxSizing === "" || style.MozBoxSizing === "" || // 6312
|
||
|
style.WebkitBoxSizing === ""; // 6313
|
||
|
// 6314
|
||
|
jQuery.extend(support, { // 6315
|
||
|
reliableHiddenOffsets: function() { // 6316
|
||
|
if ( reliableHiddenOffsetsVal == null ) { // 6317
|
||
|
computeStyleTests(); // 6318
|
||
|
} // 6319
|
||
|
return reliableHiddenOffsetsVal; // 6320
|
||
|
}, // 6321
|
||
|
// 6322
|
||
|
boxSizingReliable: function() { // 6323
|
||
|
if ( boxSizingReliableVal == null ) { // 6324
|
||
|
computeStyleTests(); // 6325
|
||
|
} // 6326
|
||
|
return boxSizingReliableVal; // 6327
|
||
|
}, // 6328
|
||
|
// 6329
|
||
|
pixelPosition: function() { // 6330
|
||
|
if ( pixelPositionVal == null ) { // 6331
|
||
|
computeStyleTests(); // 6332
|
||
|
} // 6333
|
||
|
return pixelPositionVal; // 6334
|
||
|
}, // 6335
|
||
|
// 6336
|
||
|
// Support: Android 2.3 // 6337
|
||
|
reliableMarginRight: function() { // 6338
|
||
|
if ( reliableMarginRightVal == null ) { // 6339
|
||
|
computeStyleTests(); // 6340
|
||
|
} // 6341
|
||
|
return reliableMarginRightVal; // 6342
|
||
|
} // 6343
|
||
|
}); // 6344
|
||
|
// 6345
|
||
|
function computeStyleTests() { // 6346
|
||
|
// Minified: var b,c,d,j // 6347
|
||
|
var div, body, container, contents; // 6348
|
||
|
// 6349
|
||
|
body = document.getElementsByTagName( "body" )[ 0 ]; // 6350
|
||
|
if ( !body || !body.style ) { // 6351
|
||
|
// Test fired too early or in an unsupported environment, exit. // 6352
|
||
|
return; // 6353
|
||
|
} // 6354
|
||
|
// 6355
|
||
|
// Setup // 6356
|
||
|
div = document.createElement( "div" ); // 6357
|
||
|
container = document.createElement( "div" ); // 6358
|
||
|
container.style.cssText = "position:absolute;border:0;width:0;height:0;top:0;left:-9999px"; // 6359
|
||
|
body.appendChild( container ).appendChild( div ); // 6360
|
||
|
// 6361
|
||
|
div.style.cssText = // 6362
|
||
|
// Support: Firefox<29, Android 2.3 // 6363
|
||
|
// Vendor-prefix box-sizing // 6364
|
||
|
"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;" + // 6365
|
||
|
"box-sizing:border-box;display:block;margin-top:1%;top:1%;" + // 6366
|
||
|
"border:1px;padding:1px;width:4px;position:absolute"; // 6367
|
||
|
// 6368
|
||
|
// Support: IE<9 // 6369
|
||
|
// Assume reasonable values in the absence of getComputedStyle // 6370
|
||
|
pixelPositionVal = boxSizingReliableVal = false; // 6371
|
||
|
reliableMarginRightVal = true; // 6372
|
||
|
// 6373
|
||
|
// Check for getComputedStyle so that this code is not run in IE<9. // 6374
|
||
|
if ( window.getComputedStyle ) { // 6375
|
||
|
pixelPositionVal = ( window.getComputedStyle( div, null ) || {} ).top !== "1%"; // 6376
|
||
|
boxSizingReliableVal = // 6377
|
||
|
( window.getComputedStyle( div, null ) || { width: "4px" } ).width === "4px"; // 6378
|
||
|
// 6379
|
||
|
// Support: Android 2.3 // 6380
|
||
|
// Div with explicit width and no margin-right incorrectly // 6381
|
||
|
// gets computed margin-right based on width of container (#3333) // 6382
|
||
|
// WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right // 6383
|
||
|
contents = div.appendChild( document.createElement( "div" ) ); // 6384
|
||
|
// 6385
|
||
|
// Reset CSS: box-sizing; display; margin; border; padding // 6386
|
||
|
contents.style.cssText = div.style.cssText = // 6387
|
||
|
// Support: Firefox<29, Android 2.3 // 6388
|
||
|
// Vendor-prefix box-sizing // 6389
|
||
|
"-webkit-box-sizing:content-box;-moz-box-sizing:content-box;" + // 6390
|
||
|
"box-sizing:content-box;display:block;margin:0;border:0;padding:0"; // 6391
|
||
|
contents.style.marginRight = contents.style.width = "0"; // 6392
|
||
|
div.style.width = "1px"; // 6393
|
||
|
// 6394
|
||
|
reliableMarginRightVal = // 6395
|
||
|
!parseFloat( ( window.getComputedStyle( contents, null ) || {} ).marginRight ); // 6396
|
||
|
// 6397
|
||
|
div.removeChild( contents ); // 6398
|
||
|
} // 6399
|
||
|
// 6400
|
||
|
// Support: IE8 // 6401
|
||
|
// Check if table cells still have offsetWidth/Height when they are set // 6402
|
||
|
// to display:none and there are still other visible table cells in a // 6403
|
||
|
// table row; if so, offsetWidth/Height are not reliable for use when // 6404
|
||
|
// determining if an element has been hidden directly using // 6405
|
||
|
// display:none (it is still safe to use offsets if a parent element is // 6406
|
||
|
// hidden; don safety goggles and see bug #4512 for more information). // 6407
|
||
|
div.innerHTML = "<table><tr><td></td><td>t</td></tr></table>"; // 6408
|
||
|
contents = div.getElementsByTagName( "td" ); // 6409
|
||
|
contents[ 0 ].style.cssText = "margin:0;border:0;padding:0;display:none"; // 6410
|
||
|
reliableHiddenOffsetsVal = contents[ 0 ].offsetHeight === 0; // 6411
|
||
|
if ( reliableHiddenOffsetsVal ) { // 6412
|
||
|
contents[ 0 ].style.display = ""; // 6413
|
||
|
contents[ 1 ].style.display = "none"; // 6414
|
||
|
reliableHiddenOffsetsVal = contents[ 0 ].offsetHeight === 0; // 6415
|
||
|
} // 6416
|
||
|
// 6417
|
||
|
body.removeChild( container ); // 6418
|
||
|
} // 6419
|
||
|
// 6420
|
||
|
})(); // 6421
|
||
|
// 6422
|
||
|
// 6423
|
||
|
// A method for quickly swapping in/out CSS properties to get correct calculations. // 6424
|
||
|
jQuery.swap = function( elem, options, callback, args ) { // 6425
|
||
|
var ret, name, // 6426
|
||
|
old = {}; // 6427
|
||
|
// 6428
|
||
|
// Remember the old values, and insert the new ones // 6429
|
||
|
for ( name in options ) { // 6430
|
||
|
old[ name ] = elem.style[ name ]; // 6431
|
||
|
elem.style[ name ] = options[ name ]; // 6432
|
||
|
} // 6433
|
||
|
// 6434
|
||
|
ret = callback.apply( elem, args || [] ); // 6435
|
||
|
// 6436
|
||
|
// Revert the old values // 6437
|
||
|
for ( name in options ) { // 6438
|
||
|
elem.style[ name ] = old[ name ]; // 6439
|
||
|
} // 6440
|
||
|
// 6441
|
||
|
return ret; // 6442
|
||
|
}; // 6443
|
||
|
// 6444
|
||
|
// 6445
|
||
|
var // 6446
|
||
|
ralpha = /alpha\([^)]*\)/i, // 6447
|
||
|
ropacity = /opacity\s*=\s*([^)]*)/, // 6448
|
||
|
// 6449
|
||
|
// swappable if display is none or starts with table except "table", "table-cell", or "table-caption" // 6450
|
||
|
// see here for display values: https://developer.mozilla.org/en-US/docs/CSS/display // 6451
|
||
|
rdisplayswap = /^(none|table(?!-c[ea]).+)/, // 6452
|
||
|
rnumsplit = new RegExp( "^(" + pnum + ")(.*)$", "i" ), // 6453
|
||
|
rrelNum = new RegExp( "^([+-])=(" + pnum + ")", "i" ), // 6454
|
||
|
// 6455
|
||
|
cssShow = { position: "absolute", visibility: "hidden", display: "block" }, // 6456
|
||
|
cssNormalTransform = { // 6457
|
||
|
letterSpacing: "0", // 6458
|
||
|
fontWeight: "400" // 6459
|
||
|
}, // 6460
|
||
|
// 6461
|
||
|
cssPrefixes = [ "Webkit", "O", "Moz", "ms" ]; // 6462
|
||
|
// 6463
|
||
|
// 6464
|
||
|
// return a css property mapped to a potentially vendor prefixed property // 6465
|
||
|
function vendorPropName( style, name ) { // 6466
|
||
|
// 6467
|
||
|
// shortcut for names that are not vendor prefixed // 6468
|
||
|
if ( name in style ) { // 6469
|
||
|
return name; // 6470
|
||
|
} // 6471
|
||
|
// 6472
|
||
|
// check for vendor prefixed names // 6473
|
||
|
var capName = name.charAt(0).toUpperCase() + name.slice(1), // 6474
|
||
|
origName = name, // 6475
|
||
|
i = cssPrefixes.length; // 6476
|
||
|
// 6477
|
||
|
while ( i-- ) { // 6478
|
||
|
name = cssPrefixes[ i ] + capName; // 6479
|
||
|
if ( name in style ) { // 6480
|
||
|
return name; // 6481
|
||
|
} // 6482
|
||
|
} // 6483
|
||
|
// 6484
|
||
|
return origName; // 6485
|
||
|
} // 6486
|
||
|
// 6487
|
||
|
function showHide( elements, show ) { // 6488
|
||
|
var display, elem, hidden, // 6489
|
||
|
values = [], // 6490
|
||
|
index = 0, // 6491
|
||
|
length = elements.length; // 6492
|
||
|
// 6493
|
||
|
for ( ; index < length; index++ ) { // 6494
|
||
|
elem = elements[ index ]; // 6495
|
||
|
if ( !elem.style ) { // 6496
|
||
|
continue; // 6497
|
||
|
} // 6498
|
||
|
// 6499
|
||
|
values[ index ] = jQuery._data( elem, "olddisplay" ); // 6500
|
||
|
display = elem.style.display; // 6501
|
||
|
if ( show ) { // 6502
|
||
|
// Reset the inline display of this element to learn if it is // 6503
|
||
|
// being hidden by cascaded rules or not // 6504
|
||
|
if ( !values[ index ] && display === "none" ) { // 6505
|
||
|
elem.style.display = ""; // 6506
|
||
|
} // 6507
|
||
|
// 6508
|
||
|
// Set elements which have been overridden with display: none // 6509
|
||
|
// in a stylesheet to whatever the default browser style is // 6510
|
||
|
// for such an element // 6511
|
||
|
if ( elem.style.display === "" && isHidden( elem ) ) { // 6512
|
||
|
values[ index ] = jQuery._data( elem, "olddisplay", defaultDisplay(elem.nodeName) ); // 6513
|
||
|
} // 6514
|
||
|
} else { // 6515
|
||
|
hidden = isHidden( elem ); // 6516
|
||
|
// 6517
|
||
|
if ( display && display !== "none" || !hidden ) { // 6518
|
||
|
jQuery._data( elem, "olddisplay", hidden ? display : jQuery.css( elem, "display" ) ); // 6519
|
||
|
} // 6520
|
||
|
} // 6521
|
||
|
} // 6522
|
||
|
// 6523
|
||
|
// Set the display of most of the elements in a second loop // 6524
|
||
|
// to avoid the constant reflow // 6525
|
||
|
for ( index = 0; index < length; index++ ) { // 6526
|
||
|
elem = elements[ index ]; // 6527
|
||
|
if ( !elem.style ) { // 6528
|
||
|
continue; // 6529
|
||
|
} // 6530
|
||
|
if ( !show || elem.style.display === "none" || elem.style.display === "" ) { // 6531
|
||
|
elem.style.display = show ? values[ index ] || "" : "none"; // 6532
|
||
|
} // 6533
|
||
|
} // 6534
|
||
|
// 6535
|
||
|
return elements; // 6536
|
||
|
} // 6537
|
||
|
// 6538
|
||
|
function setPositiveNumber( elem, value, subtract ) { // 6539
|
||
|
var matches = rnumsplit.exec( value ); // 6540
|
||
|
return matches ? // 6541
|
||
|
// Guard against undefined "subtract", e.g., when used as in cssHooks // 6542
|
||
|
Math.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || "px" ) : // 6543
|
||
|
value; // 6544
|
||
|
} // 6545
|
||
|
// 6546
|
||
|
function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) { // 6547
|
||
|
var i = extra === ( isBorderBox ? "border" : "content" ) ? // 6548
|
||
|
// If we already have the right measurement, avoid augmentation // 6549
|
||
|
4 : // 6550
|
||
|
// Otherwise initialize for horizontal or vertical properties // 6551
|
||
|
name === "width" ? 1 : 0, // 6552
|
||
|
// 6553
|
||
|
val = 0; // 6554
|
||
|
// 6555
|
||
|
for ( ; i < 4; i += 2 ) { // 6556
|
||
|
// both box models exclude margin, so add it if we want it // 6557
|
||
|
if ( extra === "margin" ) { // 6558
|
||
|
val += jQuery.css( elem, extra + cssExpand[ i ], true, styles ); // 6559
|
||
|
} // 6560
|
||
|
// 6561
|
||
|
if ( isBorderBox ) { // 6562
|
||
|
// border-box includes padding, so remove it if we want content // 6563
|
||
|
if ( extra === "content" ) { // 6564
|
||
|
val -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); // 6565
|
||
|
} // 6566
|
||
|
// 6567
|
||
|
// at this point, extra isn't border nor margin, so remove border // 6568
|
||
|
if ( extra !== "margin" ) { // 6569
|
||
|
val -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); // 6570
|
||
|
} // 6571
|
||
|
} else { // 6572
|
||
|
// at this point, extra isn't content, so add padding // 6573
|
||
|
val += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); // 6574
|
||
|
// 6575
|
||
|
// at this point, extra isn't content nor padding, so add border // 6576
|
||
|
if ( extra !== "padding" ) { // 6577
|
||
|
val += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); // 6578
|
||
|
} // 6579
|
||
|
} // 6580
|
||
|
} // 6581
|
||
|
// 6582
|
||
|
return val; // 6583
|
||
|
} // 6584
|
||
|
// 6585
|
||
|
function getWidthOrHeight( elem, name, extra ) { // 6586
|
||
|
// 6587
|
||
|
// Start with offset property, which is equivalent to the border-box value // 6588
|
||
|
var valueIsBorderBox = true, // 6589
|
||
|
val = name === "width" ? elem.offsetWidth : elem.offsetHeight, // 6590
|
||
|
styles = getStyles( elem ), // 6591
|
||
|
isBorderBox = support.boxSizing && jQuery.css( elem, "boxSizing", false, styles ) === "border-box"; // 6592
|
||
|
// 6593
|
||
|
// some non-html elements return undefined for offsetWidth, so check for null/undefined // 6594
|
||
|
// svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285 // 6595
|
||
|
// MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668 // 6596
|
||
|
if ( val <= 0 || val == null ) { // 6597
|
||
|
// Fall back to computed then uncomputed css if necessary // 6598
|
||
|
val = curCSS( elem, name, styles ); // 6599
|
||
|
if ( val < 0 || val == null ) { // 6600
|
||
|
val = elem.style[ name ]; // 6601
|
||
|
} // 6602
|
||
|
// 6603
|
||
|
// Computed unit is not pixels. Stop here and return. // 6604
|
||
|
if ( rnumnonpx.test(val) ) { // 6605
|
||
|
return val; // 6606
|
||
|
} // 6607
|
||
|
// 6608
|
||
|
// we need the check for style in case a browser which returns unreliable values // 6609
|
||
|
// for getComputedStyle silently falls back to the reliable elem.style // 6610
|
||
|
valueIsBorderBox = isBorderBox && ( support.boxSizingReliable() || val === elem.style[ name ] ); // 6611
|
||
|
// 6612
|
||
|
// Normalize "", auto, and prepare for extra // 6613
|
||
|
val = parseFloat( val ) || 0; // 6614
|
||
|
} // 6615
|
||
|
// 6616
|
||
|
// use the active box-sizing model to add/subtract irrelevant styles // 6617
|
||
|
return ( val + // 6618
|
||
|
augmentWidthOrHeight( // 6619
|
||
|
elem, // 6620
|
||
|
name, // 6621
|
||
|
extra || ( isBorderBox ? "border" : "content" ), // 6622
|
||
|
valueIsBorderBox, // 6623
|
||
|
styles // 6624
|
||
|
) // 6625
|
||
|
) + "px"; // 6626
|
||
|
} // 6627
|
||
|
// 6628
|
||
|
jQuery.extend({ // 6629
|
||
|
// Add in style property hooks for overriding the default // 6630
|
||
|
// behavior of getting and setting a style property // 6631
|
||
|
cssHooks: { // 6632
|
||
|
opacity: { // 6633
|
||
|
get: function( elem, computed ) { // 6634
|
||
|
if ( computed ) { // 6635
|
||
|
// We should always get a number back from opacity // 6636
|
||
|
var ret = curCSS( elem, "opacity" ); // 6637
|
||
|
return ret === "" ? "1" : ret; // 6638
|
||
|
} // 6639
|
||
|
} // 6640
|
||
|
} // 6641
|
||
|
}, // 6642
|
||
|
// 6643
|
||
|
// Don't automatically add "px" to these possibly-unitless properties // 6644
|
||
|
cssNumber: { // 6645
|
||
|
"columnCount": true, // 6646
|
||
|
"fillOpacity": true, // 6647
|
||
|
"flexGrow": true, // 6648
|
||
|
"flexShrink": true, // 6649
|
||
|
"fontWeight": true, // 6650
|
||
|
"lineHeight": true, // 6651
|
||
|
"opacity": true, // 6652
|
||
|
"order": true, // 6653
|
||
|
"orphans": true, // 6654
|
||
|
"widows": true, // 6655
|
||
|
"zIndex": true, // 6656
|
||
|
"zoom": true // 6657
|
||
|
}, // 6658
|
||
|
// 6659
|
||
|
// Add in properties whose names you wish to fix before // 6660
|
||
|
// setting or getting the value // 6661
|
||
|
cssProps: { // 6662
|
||
|
// normalize float css property // 6663
|
||
|
"float": support.cssFloat ? "cssFloat" : "styleFloat" // 6664
|
||
|
}, // 6665
|
||
|
// 6666
|
||
|
// Get and set the style property on a DOM Node // 6667
|
||
|
style: function( elem, name, value, extra ) { // 6668
|
||
|
// Don't set styles on text and comment nodes // 6669
|
||
|
if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) { // 6670
|
||
|
return; // 6671
|
||
|
} // 6672
|
||
|
// 6673
|
||
|
// Make sure that we're working with the right name // 6674
|
||
|
var ret, type, hooks, // 6675
|
||
|
origName = jQuery.camelCase( name ), // 6676
|
||
|
style = elem.style; // 6677
|
||
|
// 6678
|
||
|
name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( style, origName ) ); // 6679
|
||
|
// 6680
|
||
|
// gets hook for the prefixed version // 6681
|
||
|
// followed by the unprefixed version // 6682
|
||
|
hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; // 6683
|
||
|
// 6684
|
||
|
// Check if we're setting a value // 6685
|
||
|
if ( value !== undefined ) { // 6686
|
||
|
type = typeof value; // 6687
|
||
|
// 6688
|
||
|
// convert relative number strings (+= or -=) to relative numbers. #7345 // 6689
|
||
|
if ( type === "string" && (ret = rrelNum.exec( value )) ) { // 6690
|
||
|
value = ( ret[1] + 1 ) * ret[2] + parseFloat( jQuery.css( elem, name ) ); // 6691
|
||
|
// Fixes bug #9237 // 6692
|
||
|
type = "number"; // 6693
|
||
|
} // 6694
|
||
|
// 6695
|
||
|
// Make sure that null and NaN values aren't set. See: #7116 // 6696
|
||
|
if ( value == null || value !== value ) { // 6697
|
||
|
return; // 6698
|
||
|
} // 6699
|
||
|
// 6700
|
||
|
// If a number was passed in, add 'px' to the (except for certain CSS properties) // 6701
|
||
|
if ( type === "number" && !jQuery.cssNumber[ origName ] ) { // 6702
|
||
|
value += "px"; // 6703
|
||
|
} // 6704
|
||
|
// 6705
|
||
|
// Fixes #8908, it can be done more correctly by specifing setters in cssHooks, // 6706
|
||
|
// but it would mean to define eight (for every problematic property) identical functions // 6707
|
||
|
if ( !support.clearCloneStyle && value === "" && name.indexOf("background") === 0 ) { // 6708
|
||
|
style[ name ] = "inherit"; // 6709
|
||
|
} // 6710
|
||
|
// 6711
|
||
|
// If a hook was provided, use that value, otherwise just set the specified value // 6712
|
||
|
if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value, extra )) !== undefined ) { // 6713
|
||
|
// 6714
|
||
|
// Support: IE // 6715
|
||
|
// Swallow errors from 'invalid' CSS values (#5509) // 6716
|
||
|
try { // 6717
|
||
|
style[ name ] = value; // 6718
|
||
|
} catch(e) {} // 6719
|
||
|
} // 6720
|
||
|
// 6721
|
||
|
} else { // 6722
|
||
|
// If a hook was provided get the non-computed value from there // 6723
|
||
|
if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) { // 6724
|
||
|
return ret; // 6725
|
||
|
} // 6726
|
||
|
// 6727
|
||
|
// Otherwise just get the value from the style object // 6728
|
||
|
return style[ name ]; // 6729
|
||
|
} // 6730
|
||
|
}, // 6731
|
||
|
// 6732
|
||
|
css: function( elem, name, extra, styles ) { // 6733
|
||
|
var num, val, hooks, // 6734
|
||
|
origName = jQuery.camelCase( name ); // 6735
|
||
|
// 6736
|
||
|
// Make sure that we're working with the right name // 6737
|
||
|
name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( elem.style, origName ) ); // 6738
|
||
|
// 6739
|
||
|
// gets hook for the prefixed version // 6740
|
||
|
// followed by the unprefixed version // 6741
|
||
|
hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; // 6742
|
||
|
// 6743
|
||
|
// If a hook was provided get the computed value from there // 6744
|
||
|
if ( hooks && "get" in hooks ) { // 6745
|
||
|
val = hooks.get( elem, true, extra ); // 6746
|
||
|
} // 6747
|
||
|
// 6748
|
||
|
// Otherwise, if a way to get the computed value exists, use that // 6749
|
||
|
if ( val === undefined ) { // 6750
|
||
|
val = curCSS( elem, name, styles ); // 6751
|
||
|
} // 6752
|
||
|
// 6753
|
||
|
//convert "normal" to computed value // 6754
|
||
|
if ( val === "normal" && name in cssNormalTransform ) { // 6755
|
||
|
val = cssNormalTransform[ name ]; // 6756
|
||
|
} // 6757
|
||
|
// 6758
|
||
|
// Return, converting to number if forced or a qualifier was provided and val looks numeric // 6759
|
||
|
if ( extra === "" || extra ) { // 6760
|
||
|
num = parseFloat( val ); // 6761
|
||
|
return extra === true || jQuery.isNumeric( num ) ? num || 0 : val; // 6762
|
||
|
} // 6763
|
||
|
return val; // 6764
|
||
|
} // 6765
|
||
|
}); // 6766
|
||
|
// 6767
|
||
|
jQuery.each([ "height", "width" ], function( i, name ) { // 6768
|
||
|
jQuery.cssHooks[ name ] = { // 6769
|
||
|
get: function( elem, computed, extra ) { // 6770
|
||
|
if ( computed ) { // 6771
|
||
|
// certain elements can have dimension info if we invisibly show them // 6772
|
||
|
// however, it must have a current display style that would benefit from this // 6773
|
||
|
return rdisplayswap.test( jQuery.css( elem, "display" ) ) && elem.offsetWidth === 0 ? // 6774
|
||
|
jQuery.swap( elem, cssShow, function() { // 6775
|
||
|
return getWidthOrHeight( elem, name, extra ); // 6776
|
||
|
}) : // 6777
|
||
|
getWidthOrHeight( elem, name, extra ); // 6778
|
||
|
} // 6779
|
||
|
}, // 6780
|
||
|
// 6781
|
||
|
set: function( elem, value, extra ) { // 6782
|
||
|
var styles = extra && getStyles( elem ); // 6783
|
||
|
return setPositiveNumber( elem, value, extra ? // 6784
|
||
|
augmentWidthOrHeight( // 6785
|
||
|
elem, // 6786
|
||
|
name, // 6787
|
||
|
extra, // 6788
|
||
|
support.boxSizing && jQuery.css( elem, "boxSizing", false, styles ) === "border-box", // 6789
|
||
|
styles // 6790
|
||
|
) : 0 // 6791
|
||
|
); // 6792
|
||
|
} // 6793
|
||
|
}; // 6794
|
||
|
}); // 6795
|
||
|
// 6796
|
||
|
if ( !support.opacity ) { // 6797
|
||
|
jQuery.cssHooks.opacity = { // 6798
|
||
|
get: function( elem, computed ) { // 6799
|
||
|
// IE uses filters for opacity // 6800
|
||
|
return ropacity.test( (computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || "" ) ? // 6801
|
||
|
( 0.01 * parseFloat( RegExp.$1 ) ) + "" : // 6802
|
||
|
computed ? "1" : ""; // 6803
|
||
|
}, // 6804
|
||
|
// 6805
|
||
|
set: function( elem, value ) { // 6806
|
||
|
var style = elem.style, // 6807
|
||
|
currentStyle = elem.currentStyle, // 6808
|
||
|
opacity = jQuery.isNumeric( value ) ? "alpha(opacity=" + value * 100 + ")" : "", // 6809
|
||
|
filter = currentStyle && currentStyle.filter || style.filter || ""; // 6810
|
||
|
// 6811
|
||
|
// IE has trouble with opacity if it does not have layout // 6812
|
||
|
// Force it by setting the zoom level // 6813
|
||
|
style.zoom = 1; // 6814
|
||
|
// 6815
|
||
|
// if setting opacity to 1, and no other filters exist - attempt to remove filter attribute #6652 // 6816
|
||
|
// if value === "", then remove inline opacity #12685 // 6817
|
||
|
if ( ( value >= 1 || value === "" ) && // 6818
|
||
|
jQuery.trim( filter.replace( ralpha, "" ) ) === "" && // 6819
|
||
|
style.removeAttribute ) { // 6820
|
||
|
// 6821
|
||
|
// Setting style.filter to null, "" & " " still leave "filter:" in the cssText // 6822
|
||
|
// if "filter:" is present at all, clearType is disabled, we want to avoid this // 6823
|
||
|
// style.removeAttribute is IE Only, but so apparently is this code path... // 6824
|
||
|
style.removeAttribute( "filter" ); // 6825
|
||
|
// 6826
|
||
|
// if there is no filter style applied in a css rule or unset inline opacity, we are done // 6827
|
||
|
if ( value === "" || currentStyle && !currentStyle.filter ) { // 6828
|
||
|
return; // 6829
|
||
|
} // 6830
|
||
|
} // 6831
|
||
|
// 6832
|
||
|
// otherwise, set new filter values // 6833
|
||
|
style.filter = ralpha.test( filter ) ? // 6834
|
||
|
filter.replace( ralpha, opacity ) : // 6835
|
||
|
filter + " " + opacity; // 6836
|
||
|
} // 6837
|
||
|
}; // 6838
|
||
|
} // 6839
|
||
|
// 6840
|
||
|
jQuery.cssHooks.marginRight = addGetHookIf( support.reliableMarginRight, // 6841
|
||
|
function( elem, computed ) { // 6842
|
||
|
if ( computed ) { // 6843
|
||
|
// WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right // 6844
|
||
|
// Work around by temporarily setting element display to inline-block // 6845
|
||
|
return jQuery.swap( elem, { "display": "inline-block" }, // 6846
|
||
|
curCSS, [ elem, "marginRight" ] ); // 6847
|
||
|
} // 6848
|
||
|
} // 6849
|
||
|
); // 6850
|
||
|
// 6851
|
||
|
// These hooks are used by animate to expand properties // 6852
|
||
|
jQuery.each({ // 6853
|
||
|
margin: "", // 6854
|
||
|
padding: "", // 6855
|
||
|
border: "Width" // 6856
|
||
|
}, function( prefix, suffix ) { // 6857
|
||
|
jQuery.cssHooks[ prefix + suffix ] = { // 6858
|
||
|
expand: function( value ) { // 6859
|
||
|
var i = 0, // 6860
|
||
|
expanded = {}, // 6861
|
||
|
// 6862
|
||
|
// assumes a single number if not a string // 6863
|
||
|
parts = typeof value === "string" ? value.split(" ") : [ value ]; // 6864
|
||
|
// 6865
|
||
|
for ( ; i < 4; i++ ) { // 6866
|
||
|
expanded[ prefix + cssExpand[ i ] + suffix ] = // 6867
|
||
|
parts[ i ] || parts[ i - 2 ] || parts[ 0 ]; // 6868
|
||
|
} // 6869
|
||
|
// 6870
|
||
|
return expanded; // 6871
|
||
|
} // 6872
|
||
|
}; // 6873
|
||
|
// 6874
|
||
|
if ( !rmargin.test( prefix ) ) { // 6875
|
||
|
jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber; // 6876
|
||
|
} // 6877
|
||
|
}); // 6878
|
||
|
// 6879
|
||
|
jQuery.fn.extend({ // 6880
|
||
|
css: function( name, value ) { // 6881
|
||
|
return access( this, function( elem, name, value ) { // 6882
|
||
|
var styles, len, // 6883
|
||
|
map = {}, // 6884
|
||
|
i = 0; // 6885
|
||
|
// 6886
|
||
|
if ( jQuery.isArray( name ) ) { // 6887
|
||
|
styles = getStyles( elem ); // 6888
|
||
|
len = name.length; // 6889
|
||
|
// 6890
|
||
|
for ( ; i < len; i++ ) { // 6891
|
||
|
map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles ); // 6892
|
||
|
} // 6893
|
||
|
// 6894
|
||
|
return map; // 6895
|
||
|
} // 6896
|
||
|
// 6897
|
||
|
return value !== undefined ? // 6898
|
||
|
jQuery.style( elem, name, value ) : // 6899
|
||
|
jQuery.css( elem, name ); // 6900
|
||
|
}, name, value, arguments.length > 1 ); // 6901
|
||
|
}, // 6902
|
||
|
show: function() { // 6903
|
||
|
return showHide( this, true ); // 6904
|
||
|
}, // 6905
|
||
|
hide: function() { // 6906
|
||
|
return showHide( this ); // 6907
|
||
|
}, // 6908
|
||
|
toggle: function( state ) { // 6909
|
||
|
if ( typeof state === "boolean" ) { // 6910
|
||
|
return state ? this.show() : this.hide(); // 6911
|
||
|
} // 6912
|
||
|
// 6913
|
||
|
return this.each(function() { // 6914
|
||
|
if ( isHidden( this ) ) { // 6915
|
||
|
jQuery( this ).show(); // 6916
|
||
|
} else { // 6917
|
||
|
jQuery( this ).hide(); // 6918
|
||
|
} // 6919
|
||
|
}); // 6920
|
||
|
} // 6921
|
||
|
}); // 6922
|
||
|
// 6923
|
||
|
// 6924
|
||
|
function Tween( elem, options, prop, end, easing ) { // 6925
|
||
|
return new Tween.prototype.init( elem, options, prop, end, easing ); // 6926
|
||
|
} // 6927
|
||
|
jQuery.Tween = Tween; // 6928
|
||
|
// 6929
|
||
|
Tween.prototype = { // 6930
|
||
|
constructor: Tween, // 6931
|
||
|
init: function( elem, options, prop, end, easing, unit ) { // 6932
|
||
|
this.elem = elem; // 6933
|
||
|
this.prop = prop; // 6934
|
||
|
this.easing = easing || "swing"; // 6935
|
||
|
this.options = options; // 6936
|
||
|
this.start = this.now = this.cur(); // 6937
|
||
|
this.end = end; // 6938
|
||
|
this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" ); // 6939
|
||
|
}, // 6940
|
||
|
cur: function() { // 6941
|
||
|
var hooks = Tween.propHooks[ this.prop ]; // 6942
|
||
|
// 6943
|
||
|
return hooks && hooks.get ? // 6944
|
||
|
hooks.get( this ) : // 6945
|
||
|
Tween.propHooks._default.get( this ); // 6946
|
||
|
}, // 6947
|
||
|
run: function( percent ) { // 6948
|
||
|
var eased, // 6949
|
||
|
hooks = Tween.propHooks[ this.prop ]; // 6950
|
||
|
// 6951
|
||
|
if ( this.options.duration ) { // 6952
|
||
|
this.pos = eased = jQuery.easing[ this.easing ]( // 6953
|
||
|
percent, this.options.duration * percent, 0, 1, this.options.duration // 6954
|
||
|
); // 6955
|
||
|
} else { // 6956
|
||
|
this.pos = eased = percent; // 6957
|
||
|
} // 6958
|
||
|
this.now = ( this.end - this.start ) * eased + this.start; // 6959
|
||
|
// 6960
|
||
|
if ( this.options.step ) { // 6961
|
||
|
this.options.step.call( this.elem, this.now, this ); // 6962
|
||
|
} // 6963
|
||
|
// 6964
|
||
|
if ( hooks && hooks.set ) { // 6965
|
||
|
hooks.set( this ); // 6966
|
||
|
} else { // 6967
|
||
|
Tween.propHooks._default.set( this ); // 6968
|
||
|
} // 6969
|
||
|
return this; // 6970
|
||
|
} // 6971
|
||
|
}; // 6972
|
||
|
// 6973
|
||
|
Tween.prototype.init.prototype = Tween.prototype; // 6974
|
||
|
// 6975
|
||
|
Tween.propHooks = { // 6976
|
||
|
_default: { // 6977
|
||
|
get: function( tween ) { // 6978
|
||
|
var result; // 6979
|
||
|
// 6980
|
||
|
if ( tween.elem[ tween.prop ] != null && // 6981
|
||
|
(!tween.elem.style || tween.elem.style[ tween.prop ] == null) ) { // 6982
|
||
|
return tween.elem[ tween.prop ]; // 6983
|
||
|
} // 6984
|
||
|
// 6985
|
||
|
// passing an empty string as a 3rd parameter to .css will automatically // 6986
|
||
|
// attempt a parseFloat and fallback to a string if the parse fails // 6987
|
||
|
// so, simple values such as "10px" are parsed to Float. // 6988
|
||
|
// complex values such as "rotate(1rad)" are returned as is. // 6989
|
||
|
result = jQuery.css( tween.elem, tween.prop, "" ); // 6990
|
||
|
// Empty strings, null, undefined and "auto" are converted to 0. // 6991
|
||
|
return !result || result === "auto" ? 0 : result; // 6992
|
||
|
}, // 6993
|
||
|
set: function( tween ) { // 6994
|
||
|
// use step hook for back compat - use cssHook if its there - use .style if its // 6995
|
||
|
// available and use plain properties where available // 6996
|
||
|
if ( jQuery.fx.step[ tween.prop ] ) { // 6997
|
||
|
jQuery.fx.step[ tween.prop ]( tween ); // 6998
|
||
|
} else if ( tween.elem.style && ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null || jQuery.cssHooks[ tween.prop ] ) ) {
|
||
|
jQuery.style( tween.elem, tween.prop, tween.now + tween.unit ); // 7000
|
||
|
} else { // 7001
|
||
|
tween.elem[ tween.prop ] = tween.now; // 7002
|
||
|
} // 7003
|
||
|
} // 7004
|
||
|
} // 7005
|
||
|
}; // 7006
|
||
|
// 7007
|
||
|
// Support: IE <=9 // 7008
|
||
|
// Panic based approach to setting things on disconnected nodes // 7009
|
||
|
// 7010
|
||
|
Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = { // 7011
|
||
|
set: function( tween ) { // 7012
|
||
|
if ( tween.elem.nodeType && tween.elem.parentNode ) { // 7013
|
||
|
tween.elem[ tween.prop ] = tween.now; // 7014
|
||
|
} // 7015
|
||
|
} // 7016
|
||
|
}; // 7017
|
||
|
// 7018
|
||
|
jQuery.easing = { // 7019
|
||
|
linear: function( p ) { // 7020
|
||
|
return p; // 7021
|
||
|
}, // 7022
|
||
|
swing: function( p ) { // 7023
|
||
|
return 0.5 - Math.cos( p * Math.PI ) / 2; // 7024
|
||
|
} // 7025
|
||
|
}; // 7026
|
||
|
// 7027
|
||
|
jQuery.fx = Tween.prototype.init; // 7028
|
||
|
// 7029
|
||
|
// Back Compat <1.8 extension point // 7030
|
||
|
jQuery.fx.step = {}; // 7031
|
||
|
// 7032
|
||
|
// 7033
|
||
|
// 7034
|
||
|
// 7035
|
||
|
var // 7036
|
||
|
fxNow, timerId, // 7037
|
||
|
rfxtypes = /^(?:toggle|show|hide)$/, // 7038
|
||
|
rfxnum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" ), // 7039
|
||
|
rrun = /queueHooks$/, // 7040
|
||
|
animationPrefilters = [ defaultPrefilter ], // 7041
|
||
|
tweeners = { // 7042
|
||
|
"*": [ function( prop, value ) { // 7043
|
||
|
var tween = this.createTween( prop, value ), // 7044
|
||
|
target = tween.cur(), // 7045
|
||
|
parts = rfxnum.exec( value ), // 7046
|
||
|
unit = parts && parts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ), // 7047
|
||
|
// 7048
|
||
|
// Starting value computation is required for potential unit mismatches // 7049
|
||
|
start = ( jQuery.cssNumber[ prop ] || unit !== "px" && +target ) && // 7050
|
||
|
rfxnum.exec( jQuery.css( tween.elem, prop ) ), // 7051
|
||
|
scale = 1, // 7052
|
||
|
maxIterations = 20; // 7053
|
||
|
// 7054
|
||
|
if ( start && start[ 3 ] !== unit ) { // 7055
|
||
|
// Trust units reported by jQuery.css // 7056
|
||
|
unit = unit || start[ 3 ]; // 7057
|
||
|
// 7058
|
||
|
// Make sure we update the tween properties later on // 7059
|
||
|
parts = parts || []; // 7060
|
||
|
// 7061
|
||
|
// Iteratively approximate from a nonzero starting point // 7062
|
||
|
start = +target || 1; // 7063
|
||
|
// 7064
|
||
|
do { // 7065
|
||
|
// If previous iteration zeroed out, double until we get *something* // 7066
|
||
|
// Use a string for doubling factor so we don't accidentally see scale as unchanged below // 7067
|
||
|
scale = scale || ".5"; // 7068
|
||
|
// 7069
|
||
|
// Adjust and apply // 7070
|
||
|
start = start / scale; // 7071
|
||
|
jQuery.style( tween.elem, prop, start + unit ); // 7072
|
||
|
// 7073
|
||
|
// Update scale, tolerating zero or NaN from tween.cur() // 7074
|
||
|
// And breaking the loop if scale is unchanged or perfect, or if we've just had enough // 7075
|
||
|
} while ( scale !== (scale = tween.cur() / target) && scale !== 1 && --maxIterations ); // 7076
|
||
|
} // 7077
|
||
|
// 7078
|
||
|
// Update tween properties // 7079
|
||
|
if ( parts ) { // 7080
|
||
|
start = tween.start = +start || +target || 0; // 7081
|
||
|
tween.unit = unit; // 7082
|
||
|
// If a +=/-= token was provided, we're doing a relative animation // 7083
|
||
|
tween.end = parts[ 1 ] ? // 7084
|
||
|
start + ( parts[ 1 ] + 1 ) * parts[ 2 ] : // 7085
|
||
|
+parts[ 2 ]; // 7086
|
||
|
} // 7087
|
||
|
// 7088
|
||
|
return tween; // 7089
|
||
|
} ] // 7090
|
||
|
}; // 7091
|
||
|
// 7092
|
||
|
// Animations created synchronously will run synchronously // 7093
|
||
|
function createFxNow() { // 7094
|
||
|
setTimeout(function() { // 7095
|
||
|
fxNow = undefined; // 7096
|
||
|
}); // 7097
|
||
|
return ( fxNow = jQuery.now() ); // 7098
|
||
|
} // 7099
|
||
|
// 7100
|
||
|
// Generate parameters to create a standard animation // 7101
|
||
|
function genFx( type, includeWidth ) { // 7102
|
||
|
var which, // 7103
|
||
|
attrs = { height: type }, // 7104
|
||
|
i = 0; // 7105
|
||
|
// 7106
|
||
|
// if we include width, step value is 1 to do all cssExpand values, // 7107
|
||
|
// if we don't include width, step value is 2 to skip over Left and Right // 7108
|
||
|
includeWidth = includeWidth ? 1 : 0; // 7109
|
||
|
for ( ; i < 4 ; i += 2 - includeWidth ) { // 7110
|
||
|
which = cssExpand[ i ]; // 7111
|
||
|
attrs[ "margin" + which ] = attrs[ "padding" + which ] = type; // 7112
|
||
|
} // 7113
|
||
|
// 7114
|
||
|
if ( includeWidth ) { // 7115
|
||
|
attrs.opacity = attrs.width = type; // 7116
|
||
|
} // 7117
|
||
|
// 7118
|
||
|
return attrs; // 7119
|
||
|
} // 7120
|
||
|
// 7121
|
||
|
function createTween( value, prop, animation ) { // 7122
|
||
|
var tween, // 7123
|
||
|
collection = ( tweeners[ prop ] || [] ).concat( tweeners[ "*" ] ), // 7124
|
||
|
index = 0, // 7125
|
||
|
length = collection.length; // 7126
|
||
|
for ( ; index < length; index++ ) { // 7127
|
||
|
if ( (tween = collection[ index ].call( animation, prop, value )) ) { // 7128
|
||
|
// 7129
|
||
|
// we're done with this property // 7130
|
||
|
return tween; // 7131
|
||
|
} // 7132
|
||
|
} // 7133
|
||
|
} // 7134
|
||
|
// 7135
|
||
|
function defaultPrefilter( elem, props, opts ) { // 7136
|
||
|
/* jshint validthis: true */ // 7137
|
||
|
var prop, value, toggle, tween, hooks, oldfire, display, checkDisplay, // 7138
|
||
|
anim = this, // 7139
|
||
|
orig = {}, // 7140
|
||
|
style = elem.style, // 7141
|
||
|
hidden = elem.nodeType && isHidden( elem ), // 7142
|
||
|
dataShow = jQuery._data( elem, "fxshow" ); // 7143
|
||
|
// 7144
|
||
|
// handle queue: false promises // 7145
|
||
|
if ( !opts.queue ) { // 7146
|
||
|
hooks = jQuery._queueHooks( elem, "fx" ); // 7147
|
||
|
if ( hooks.unqueued == null ) { // 7148
|
||
|
hooks.unqueued = 0; // 7149
|
||
|
oldfire = hooks.empty.fire; // 7150
|
||
|
hooks.empty.fire = function() { // 7151
|
||
|
if ( !hooks.unqueued ) { // 7152
|
||
|
oldfire(); // 7153
|
||
|
} // 7154
|
||
|
}; // 7155
|
||
|
} // 7156
|
||
|
hooks.unqueued++; // 7157
|
||
|
// 7158
|
||
|
anim.always(function() { // 7159
|
||
|
// doing this makes sure that the complete handler will be called // 7160
|
||
|
// before this completes // 7161
|
||
|
anim.always(function() { // 7162
|
||
|
hooks.unqueued--; // 7163
|
||
|
if ( !jQuery.queue( elem, "fx" ).length ) { // 7164
|
||
|
hooks.empty.fire(); // 7165
|
||
|
} // 7166
|
||
|
}); // 7167
|
||
|
}); // 7168
|
||
|
} // 7169
|
||
|
// 7170
|
||
|
// height/width overflow pass // 7171
|
||
|
if ( elem.nodeType === 1 && ( "height" in props || "width" in props ) ) { // 7172
|
||
|
// Make sure that nothing sneaks out // 7173
|
||
|
// Record all 3 overflow attributes because IE does not // 7174
|
||
|
// change the overflow attribute when overflowX and // 7175
|
||
|
// overflowY are set to the same value // 7176
|
||
|
opts.overflow = [ style.overflow, style.overflowX, style.overflowY ]; // 7177
|
||
|
// 7178
|
||
|
// Set display property to inline-block for height/width // 7179
|
||
|
// animations on inline elements that are having width/height animated // 7180
|
||
|
display = jQuery.css( elem, "display" ); // 7181
|
||
|
// 7182
|
||
|
// Test default display if display is currently "none" // 7183
|
||
|
checkDisplay = display === "none" ? // 7184
|
||
|
jQuery._data( elem, "olddisplay" ) || defaultDisplay( elem.nodeName ) : display; // 7185
|
||
|
// 7186
|
||
|
if ( checkDisplay === "inline" && jQuery.css( elem, "float" ) === "none" ) { // 7187
|
||
|
// 7188
|
||
|
// inline-level elements accept inline-block; // 7189
|
||
|
// block-level elements need to be inline with layout // 7190
|
||
|
if ( !support.inlineBlockNeedsLayout || defaultDisplay( elem.nodeName ) === "inline" ) { // 7191
|
||
|
style.display = "inline-block"; // 7192
|
||
|
} else { // 7193
|
||
|
style.zoom = 1; // 7194
|
||
|
} // 7195
|
||
|
} // 7196
|
||
|
} // 7197
|
||
|
// 7198
|
||
|
if ( opts.overflow ) { // 7199
|
||
|
style.overflow = "hidden"; // 7200
|
||
|
if ( !support.shrinkWrapBlocks() ) { // 7201
|
||
|
anim.always(function() { // 7202
|
||
|
style.overflow = opts.overflow[ 0 ]; // 7203
|
||
|
style.overflowX = opts.overflow[ 1 ]; // 7204
|
||
|
style.overflowY = opts.overflow[ 2 ]; // 7205
|
||
|
}); // 7206
|
||
|
} // 7207
|
||
|
} // 7208
|
||
|
// 7209
|
||
|
// show/hide pass // 7210
|
||
|
for ( prop in props ) { // 7211
|
||
|
value = props[ prop ]; // 7212
|
||
|
if ( rfxtypes.exec( value ) ) { // 7213
|
||
|
delete props[ prop ]; // 7214
|
||
|
toggle = toggle || value === "toggle"; // 7215
|
||
|
if ( value === ( hidden ? "hide" : "show" ) ) { // 7216
|
||
|
// 7217
|
||
|
// If there is dataShow left over from a stopped hide or show and we are going to proceed with show, we should pretend to be hidden
|
||
|
if ( value === "show" && dataShow && dataShow[ prop ] !== undefined ) { // 7219
|
||
|
hidden = true; // 7220
|
||
|
} else { // 7221
|
||
|
continue; // 7222
|
||
|
} // 7223
|
||
|
} // 7224
|
||
|
orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop ); // 7225
|
||
|
// 7226
|
||
|
// Any non-fx value stops us from restoring the original display value // 7227
|
||
|
} else { // 7228
|
||
|
display = undefined; // 7229
|
||
|
} // 7230
|
||
|
} // 7231
|
||
|
// 7232
|
||
|
if ( !jQuery.isEmptyObject( orig ) ) { // 7233
|
||
|
if ( dataShow ) { // 7234
|
||
|
if ( "hidden" in dataShow ) { // 7235
|
||
|
hidden = dataShow.hidden; // 7236
|
||
|
} // 7237
|
||
|
} else { // 7238
|
||
|
dataShow = jQuery._data( elem, "fxshow", {} ); // 7239
|
||
|
} // 7240
|
||
|
// 7241
|
||
|
// store state if its toggle - enables .stop().toggle() to "reverse" // 7242
|
||
|
if ( toggle ) { // 7243
|
||
|
dataShow.hidden = !hidden; // 7244
|
||
|
} // 7245
|
||
|
if ( hidden ) { // 7246
|
||
|
jQuery( elem ).show(); // 7247
|
||
|
} else { // 7248
|
||
|
anim.done(function() { // 7249
|
||
|
jQuery( elem ).hide(); // 7250
|
||
|
}); // 7251
|
||
|
} // 7252
|
||
|
anim.done(function() { // 7253
|
||
|
var prop; // 7254
|
||
|
jQuery._removeData( elem, "fxshow" ); // 7255
|
||
|
for ( prop in orig ) { // 7256
|
||
|
jQuery.style( elem, prop, orig[ prop ] ); // 7257
|
||
|
} // 7258
|
||
|
}); // 7259
|
||
|
for ( prop in orig ) { // 7260
|
||
|
tween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim ); // 7261
|
||
|
// 7262
|
||
|
if ( !( prop in dataShow ) ) { // 7263
|
||
|
dataShow[ prop ] = tween.start; // 7264
|
||
|
if ( hidden ) { // 7265
|
||
|
tween.end = tween.start; // 7266
|
||
|
tween.start = prop === "width" || prop === "height" ? 1 : 0; // 7267
|
||
|
} // 7268
|
||
|
} // 7269
|
||
|
} // 7270
|
||
|
// 7271
|
||
|
// If this is a noop like .hide().hide(), restore an overwritten display value // 7272
|
||
|
} else if ( (display === "none" ? defaultDisplay( elem.nodeName ) : display) === "inline" ) { // 7273
|
||
|
style.display = display; // 7274
|
||
|
} // 7275
|
||
|
} // 7276
|
||
|
// 7277
|
||
|
function propFilter( props, specialEasing ) { // 7278
|
||
|
var index, name, easing, value, hooks; // 7279
|
||
|
// 7280
|
||
|
// camelCase, specialEasing and expand cssHook pass // 7281
|
||
|
for ( index in props ) { // 7282
|
||
|
name = jQuery.camelCase( index ); // 7283
|
||
|
easing = specialEasing[ name ]; // 7284
|
||
|
value = props[ index ]; // 7285
|
||
|
if ( jQuery.isArray( value ) ) { // 7286
|
||
|
easing = value[ 1 ]; // 7287
|
||
|
value = props[ index ] = value[ 0 ]; // 7288
|
||
|
} // 7289
|
||
|
// 7290
|
||
|
if ( index !== name ) { // 7291
|
||
|
props[ name ] = value; // 7292
|
||
|
delete props[ index ]; // 7293
|
||
|
} // 7294
|
||
|
// 7295
|
||
|
hooks = jQuery.cssHooks[ name ]; // 7296
|
||
|
if ( hooks && "expand" in hooks ) { // 7297
|
||
|
value = hooks.expand( value ); // 7298
|
||
|
delete props[ name ]; // 7299
|
||
|
// 7300
|
||
|
// not quite $.extend, this wont overwrite keys already present. // 7301
|
||
|
// also - reusing 'index' from above because we have the correct "name" // 7302
|
||
|
for ( index in value ) { // 7303
|
||
|
if ( !( index in props ) ) { // 7304
|
||
|
props[ index ] = value[ index ]; // 7305
|
||
|
specialEasing[ index ] = easing; // 7306
|
||
|
} // 7307
|
||
|
} // 7308
|
||
|
} else { // 7309
|
||
|
specialEasing[ name ] = easing; // 7310
|
||
|
} // 7311
|
||
|
} // 7312
|
||
|
} // 7313
|
||
|
// 7314
|
||
|
function Animation( elem, properties, options ) { // 7315
|
||
|
var result, // 7316
|
||
|
stopped, // 7317
|
||
|
index = 0, // 7318
|
||
|
length = animationPrefilters.length, // 7319
|
||
|
deferred = jQuery.Deferred().always( function() { // 7320
|
||
|
// don't match elem in the :animated selector // 7321
|
||
|
delete tick.elem; // 7322
|
||
|
}), // 7323
|
||
|
tick = function() { // 7324
|
||
|
if ( stopped ) { // 7325
|
||
|
return false; // 7326
|
||
|
} // 7327
|
||
|
var currentTime = fxNow || createFxNow(), // 7328
|
||
|
remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ), // 7329
|
||
|
// archaic crash bug won't allow us to use 1 - ( 0.5 || 0 ) (#12497) // 7330
|
||
|
temp = remaining / animation.duration || 0, // 7331
|
||
|
percent = 1 - temp, // 7332
|
||
|
index = 0, // 7333
|
||
|
length = animation.tweens.length; // 7334
|
||
|
// 7335
|
||
|
for ( ; index < length ; index++ ) { // 7336
|
||
|
animation.tweens[ index ].run( percent ); // 7337
|
||
|
} // 7338
|
||
|
// 7339
|
||
|
deferred.notifyWith( elem, [ animation, percent, remaining ]); // 7340
|
||
|
// 7341
|
||
|
if ( percent < 1 && length ) { // 7342
|
||
|
return remaining; // 7343
|
||
|
} else { // 7344
|
||
|
deferred.resolveWith( elem, [ animation ] ); // 7345
|
||
|
return false; // 7346
|
||
|
} // 7347
|
||
|
}, // 7348
|
||
|
animation = deferred.promise({ // 7349
|
||
|
elem: elem, // 7350
|
||
|
props: jQuery.extend( {}, properties ), // 7351
|
||
|
opts: jQuery.extend( true, { specialEasing: {} }, options ), // 7352
|
||
|
originalProperties: properties, // 7353
|
||
|
originalOptions: options, // 7354
|
||
|
startTime: fxNow || createFxNow(), // 7355
|
||
|
duration: options.duration, // 7356
|
||
|
tweens: [], // 7357
|
||
|
createTween: function( prop, end ) { // 7358
|
||
|
var tween = jQuery.Tween( elem, animation.opts, prop, end, // 7359
|
||
|
animation.opts.specialEasing[ prop ] || animation.opts.easing ); // 7360
|
||
|
animation.tweens.push( tween ); // 7361
|
||
|
return tween; // 7362
|
||
|
}, // 7363
|
||
|
stop: function( gotoEnd ) { // 7364
|
||
|
var index = 0, // 7365
|
||
|
// if we are going to the end, we want to run all the tweens // 7366
|
||
|
// otherwise we skip this part // 7367
|
||
|
length = gotoEnd ? animation.tweens.length : 0; // 7368
|
||
|
if ( stopped ) { // 7369
|
||
|
return this; // 7370
|
||
|
} // 7371
|
||
|
stopped = true; // 7372
|
||
|
for ( ; index < length ; index++ ) { // 7373
|
||
|
animation.tweens[ index ].run( 1 ); // 7374
|
||
|
} // 7375
|
||
|
// 7376
|
||
|
// resolve when we played the last frame // 7377
|
||
|
// otherwise, reject // 7378
|
||
|
if ( gotoEnd ) { // 7379
|
||
|
deferred.resolveWith( elem, [ animation, gotoEnd ] ); // 7380
|
||
|
} else { // 7381
|
||
|
deferred.rejectWith( elem, [ animation, gotoEnd ] ); // 7382
|
||
|
} // 7383
|
||
|
return this; // 7384
|
||
|
} // 7385
|
||
|
}), // 7386
|
||
|
props = animation.props; // 7387
|
||
|
// 7388
|
||
|
propFilter( props, animation.opts.specialEasing ); // 7389
|
||
|
// 7390
|
||
|
for ( ; index < length ; index++ ) { // 7391
|
||
|
result = animationPrefilters[ index ].call( animation, elem, props, animation.opts ); // 7392
|
||
|
if ( result ) { // 7393
|
||
|
return result; // 7394
|
||
|
} // 7395
|
||
|
} // 7396
|
||
|
// 7397
|
||
|
jQuery.map( props, createTween, animation ); // 7398
|
||
|
// 7399
|
||
|
if ( jQuery.isFunction( animation.opts.start ) ) { // 7400
|
||
|
animation.opts.start.call( elem, animation ); // 7401
|
||
|
} // 7402
|
||
|
// 7403
|
||
|
jQuery.fx.timer( // 7404
|
||
|
jQuery.extend( tick, { // 7405
|
||
|
elem: elem, // 7406
|
||
|
anim: animation, // 7407
|
||
|
queue: animation.opts.queue // 7408
|
||
|
}) // 7409
|
||
|
); // 7410
|
||
|
// 7411
|
||
|
// attach callbacks from options // 7412
|
||
|
return animation.progress( animation.opts.progress ) // 7413
|
||
|
.done( animation.opts.done, animation.opts.complete ) // 7414
|
||
|
.fail( animation.opts.fail ) // 7415
|
||
|
.always( animation.opts.always ); // 7416
|
||
|
} // 7417
|
||
|
// 7418
|
||
|
jQuery.Animation = jQuery.extend( Animation, { // 7419
|
||
|
tweener: function( props, callback ) { // 7420
|
||
|
if ( jQuery.isFunction( props ) ) { // 7421
|
||
|
callback = props; // 7422
|
||
|
props = [ "*" ]; // 7423
|
||
|
} else { // 7424
|
||
|
props = props.split(" "); // 7425
|
||
|
} // 7426
|
||
|
// 7427
|
||
|
var prop, // 7428
|
||
|
index = 0, // 7429
|
||
|
length = props.length; // 7430
|
||
|
// 7431
|
||
|
for ( ; index < length ; index++ ) { // 7432
|
||
|
prop = props[ index ]; // 7433
|
||
|
tweeners[ prop ] = tweeners[ prop ] || []; // 7434
|
||
|
tweeners[ prop ].unshift( callback ); // 7435
|
||
|
} // 7436
|
||
|
}, // 7437
|
||
|
// 7438
|
||
|
prefilter: function( callback, prepend ) { // 7439
|
||
|
if ( prepend ) { // 7440
|
||
|
animationPrefilters.unshift( callback ); // 7441
|
||
|
} else { // 7442
|
||
|
animationPrefilters.push( callback ); // 7443
|
||
|
} // 7444
|
||
|
} // 7445
|
||
|
}); // 7446
|
||
|
// 7447
|
||
|
jQuery.speed = function( speed, easing, fn ) { // 7448
|
||
|
var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : { // 7449
|
||
|
complete: fn || !fn && easing || // 7450
|
||
|
jQuery.isFunction( speed ) && speed, // 7451
|
||
|
duration: speed, // 7452
|
||
|
easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing // 7453
|
||
|
}; // 7454
|
||
|
// 7455
|
||
|
opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration : // 7456
|
||
|
opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default; // 7457
|
||
|
// 7458
|
||
|
// normalize opt.queue - true/undefined/null -> "fx" // 7459
|
||
|
if ( opt.queue == null || opt.queue === true ) { // 7460
|
||
|
opt.queue = "fx"; // 7461
|
||
|
} // 7462
|
||
|
// 7463
|
||
|
// Queueing // 7464
|
||
|
opt.old = opt.complete; // 7465
|
||
|
// 7466
|
||
|
opt.complete = function() { // 7467
|
||
|
if ( jQuery.isFunction( opt.old ) ) { // 7468
|
||
|
opt.old.call( this ); // 7469
|
||
|
} // 7470
|
||
|
// 7471
|
||
|
if ( opt.queue ) { // 7472
|
||
|
jQuery.dequeue( this, opt.queue ); // 7473
|
||
|
} // 7474
|
||
|
}; // 7475
|
||
|
// 7476
|
||
|
return opt; // 7477
|
||
|
}; // 7478
|
||
|
// 7479
|
||
|
jQuery.fn.extend({ // 7480
|
||
|
fadeTo: function( speed, to, easing, callback ) { // 7481
|
||
|
// 7482
|
||
|
// show any hidden elements after setting opacity to 0 // 7483
|
||
|
return this.filter( isHidden ).css( "opacity", 0 ).show() // 7484
|
||
|
// 7485
|
||
|
// animate to the value specified // 7486
|
||
|
.end().animate({ opacity: to }, speed, easing, callback ); // 7487
|
||
|
}, // 7488
|
||
|
animate: function( prop, speed, easing, callback ) { // 7489
|
||
|
var empty = jQuery.isEmptyObject( prop ), // 7490
|
||
|
optall = jQuery.speed( speed, easing, callback ), // 7491
|
||
|
doAnimation = function() { // 7492
|
||
|
// Operate on a copy of prop so per-property easing won't be lost // 7493
|
||
|
var anim = Animation( this, jQuery.extend( {}, prop ), optall ); // 7494
|
||
|
// 7495
|
||
|
// Empty animations, or finishing resolves immediately // 7496
|
||
|
if ( empty || jQuery._data( this, "finish" ) ) { // 7497
|
||
|
anim.stop( true ); // 7498
|
||
|
} // 7499
|
||
|
}; // 7500
|
||
|
doAnimation.finish = doAnimation; // 7501
|
||
|
// 7502
|
||
|
return empty || optall.queue === false ? // 7503
|
||
|
this.each( doAnimation ) : // 7504
|
||
|
this.queue( optall.queue, doAnimation ); // 7505
|
||
|
}, // 7506
|
||
|
stop: function( type, clearQueue, gotoEnd ) { // 7507
|
||
|
var stopQueue = function( hooks ) { // 7508
|
||
|
var stop = hooks.stop; // 7509
|
||
|
delete hooks.stop; // 7510
|
||
|
stop( gotoEnd ); // 7511
|
||
|
}; // 7512
|
||
|
// 7513
|
||
|
if ( typeof type !== "string" ) { // 7514
|
||
|
gotoEnd = clearQueue; // 7515
|
||
|
clearQueue = type; // 7516
|
||
|
type = undefined; // 7517
|
||
|
} // 7518
|
||
|
if ( clearQueue && type !== false ) { // 7519
|
||
|
this.queue( type || "fx", [] ); // 7520
|
||
|
} // 7521
|
||
|
// 7522
|
||
|
return this.each(function() { // 7523
|
||
|
var dequeue = true, // 7524
|
||
|
index = type != null && type + "queueHooks", // 7525
|
||
|
timers = jQuery.timers, // 7526
|
||
|
data = jQuery._data( this ); // 7527
|
||
|
// 7528
|
||
|
if ( index ) { // 7529
|
||
|
if ( data[ index ] && data[ index ].stop ) { // 7530
|
||
|
stopQueue( data[ index ] ); // 7531
|
||
|
} // 7532
|
||
|
} else { // 7533
|
||
|
for ( index in data ) { // 7534
|
||
|
if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) { // 7535
|
||
|
stopQueue( data[ index ] ); // 7536
|
||
|
} // 7537
|
||
|
} // 7538
|
||
|
} // 7539
|
||
|
// 7540
|
||
|
for ( index = timers.length; index--; ) { // 7541
|
||
|
if ( timers[ index ].elem === this && (type == null || timers[ index ].queue === type) ) { // 7542
|
||
|
timers[ index ].anim.stop( gotoEnd ); // 7543
|
||
|
dequeue = false; // 7544
|
||
|
timers.splice( index, 1 ); // 7545
|
||
|
} // 7546
|
||
|
} // 7547
|
||
|
// 7548
|
||
|
// start the next in the queue if the last step wasn't forced // 7549
|
||
|
// timers currently will call their complete callbacks, which will dequeue // 7550
|
||
|
// but only if they were gotoEnd // 7551
|
||
|
if ( dequeue || !gotoEnd ) { // 7552
|
||
|
jQuery.dequeue( this, type ); // 7553
|
||
|
} // 7554
|
||
|
}); // 7555
|
||
|
}, // 7556
|
||
|
finish: function( type ) { // 7557
|
||
|
if ( type !== false ) { // 7558
|
||
|
type = type || "fx"; // 7559
|
||
|
} // 7560
|
||
|
return this.each(function() { // 7561
|
||
|
var index, // 7562
|
||
|
data = jQuery._data( this ), // 7563
|
||
|
queue = data[ type + "queue" ], // 7564
|
||
|
hooks = data[ type + "queueHooks" ], // 7565
|
||
|
timers = jQuery.timers, // 7566
|
||
|
length = queue ? queue.length : 0; // 7567
|
||
|
// 7568
|
||
|
// enable finishing flag on private data // 7569
|
||
|
data.finish = true; // 7570
|
||
|
// 7571
|
||
|
// empty the queue first // 7572
|
||
|
jQuery.queue( this, type, [] ); // 7573
|
||
|
// 7574
|
||
|
if ( hooks && hooks.stop ) { // 7575
|
||
|
hooks.stop.call( this, true ); // 7576
|
||
|
} // 7577
|
||
|
// 7578
|
||
|
// look for any active animations, and finish them // 7579
|
||
|
for ( index = timers.length; index--; ) { // 7580
|
||
|
if ( timers[ index ].elem === this && timers[ index ].queue === type ) { // 7581
|
||
|
timers[ index ].anim.stop( true ); // 7582
|
||
|
timers.splice( index, 1 ); // 7583
|
||
|
} // 7584
|
||
|
} // 7585
|
||
|
// 7586
|
||
|
// look for any animations in the old queue and finish them // 7587
|
||
|
for ( index = 0; index < length; index++ ) { // 7588
|
||
|
if ( queue[ index ] && queue[ index ].finish ) { // 7589
|
||
|
queue[ index ].finish.call( this ); // 7590
|
||
|
} // 7591
|
||
|
} // 7592
|
||
|
// 7593
|
||
|
// turn off finishing flag // 7594
|
||
|
delete data.finish; // 7595
|
||
|
}); // 7596
|
||
|
} // 7597
|
||
|
}); // 7598
|
||
|
// 7599
|
||
|
jQuery.each([ "toggle", "show", "hide" ], function( i, name ) { // 7600
|
||
|
var cssFn = jQuery.fn[ name ]; // 7601
|
||
|
jQuery.fn[ name ] = function( speed, easing, callback ) { // 7602
|
||
|
return speed == null || typeof speed === "boolean" ? // 7603
|
||
|
cssFn.apply( this, arguments ) : // 7604
|
||
|
this.animate( genFx( name, true ), speed, easing, callback ); // 7605
|
||
|
}; // 7606
|
||
|
}); // 7607
|
||
|
// 7608
|
||
|
// Generate shortcuts for custom animations // 7609
|
||
|
jQuery.each({ // 7610
|
||
|
slideDown: genFx("show"), // 7611
|
||
|
slideUp: genFx("hide"), // 7612
|
||
|
slideToggle: genFx("toggle"), // 7613
|
||
|
fadeIn: { opacity: "show" }, // 7614
|
||
|
fadeOut: { opacity: "hide" }, // 7615
|
||
|
fadeToggle: { opacity: "toggle" } // 7616
|
||
|
}, function( name, props ) { // 7617
|
||
|
jQuery.fn[ name ] = function( speed, easing, callback ) { // 7618
|
||
|
return this.animate( props, speed, easing, callback ); // 7619
|
||
|
}; // 7620
|
||
|
}); // 7621
|
||
|
// 7622
|
||
|
jQuery.timers = []; // 7623
|
||
|
jQuery.fx.tick = function() { // 7624
|
||
|
var timer, // 7625
|
||
|
timers = jQuery.timers, // 7626
|
||
|
i = 0; // 7627
|
||
|
// 7628
|
||
|
fxNow = jQuery.now(); // 7629
|
||
|
// 7630
|
||
|
for ( ; i < timers.length; i++ ) { // 7631
|
||
|
timer = timers[ i ]; // 7632
|
||
|
// Checks the timer has not already been removed // 7633
|
||
|
if ( !timer() && timers[ i ] === timer ) { // 7634
|
||
|
timers.splice( i--, 1 ); // 7635
|
||
|
} // 7636
|
||
|
} // 7637
|
||
|
// 7638
|
||
|
if ( !timers.length ) { // 7639
|
||
|
jQuery.fx.stop(); // 7640
|
||
|
} // 7641
|
||
|
fxNow = undefined; // 7642
|
||
|
}; // 7643
|
||
|
// 7644
|
||
|
jQuery.fx.timer = function( timer ) { // 7645
|
||
|
jQuery.timers.push( timer ); // 7646
|
||
|
if ( timer() ) { // 7647
|
||
|
jQuery.fx.start(); // 7648
|
||
|
} else { // 7649
|
||
|
jQuery.timers.pop(); // 7650
|
||
|
} // 7651
|
||
|
}; // 7652
|
||
|
// 7653
|
||
|
jQuery.fx.interval = 13; // 7654
|
||
|
// 7655
|
||
|
jQuery.fx.start = function() { // 7656
|
||
|
if ( !timerId ) { // 7657
|
||
|
timerId = setInterval( jQuery.fx.tick, jQuery.fx.interval ); // 7658
|
||
|
} // 7659
|
||
|
}; // 7660
|
||
|
// 7661
|
||
|
jQuery.fx.stop = function() { // 7662
|
||
|
clearInterval( timerId ); // 7663
|
||
|
timerId = null; // 7664
|
||
|
}; // 7665
|
||
|
// 7666
|
||
|
jQuery.fx.speeds = { // 7667
|
||
|
slow: 600, // 7668
|
||
|
fast: 200, // 7669
|
||
|
// Default speed // 7670
|
||
|
_default: 400 // 7671
|
||
|
}; // 7672
|
||
|
// 7673
|
||
|
// 7674
|
||
|
// Based off of the plugin by Clint Helfers, with permission. // 7675
|
||
|
// http://blindsignals.com/index.php/2009/07/jquery-delay/ // 7676
|
||
|
jQuery.fn.delay = function( time, type ) { // 7677
|
||
|
time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time; // 7678
|
||
|
type = type || "fx"; // 7679
|
||
|
// 7680
|
||
|
return this.queue( type, function( next, hooks ) { // 7681
|
||
|
var timeout = setTimeout( next, time ); // 7682
|
||
|
hooks.stop = function() { // 7683
|
||
|
clearTimeout( timeout ); // 7684
|
||
|
}; // 7685
|
||
|
}); // 7686
|
||
|
}; // 7687
|
||
|
// 7688
|
||
|
// 7689
|
||
|
(function() { // 7690
|
||
|
// Minified: var a,b,c,d,e // 7691
|
||
|
var input, div, select, a, opt; // 7692
|
||
|
// 7693
|
||
|
// Setup // 7694
|
||
|
div = document.createElement( "div" ); // 7695
|
||
|
div.setAttribute( "className", "t" ); // 7696
|
||
|
div.innerHTML = " <link/><table></table><a href='/a'>a</a><input type='checkbox'/>"; // 7697
|
||
|
a = div.getElementsByTagName("a")[ 0 ]; // 7698
|
||
|
// 7699
|
||
|
// First batch of tests. // 7700
|
||
|
select = document.createElement("select"); // 7701
|
||
|
opt = select.appendChild( document.createElement("option") ); // 7702
|
||
|
input = div.getElementsByTagName("input")[ 0 ]; // 7703
|
||
|
// 7704
|
||
|
a.style.cssText = "top:1px"; // 7705
|
||
|
// 7706
|
||
|
// Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7) // 7707
|
||
|
support.getSetAttribute = div.className !== "t"; // 7708
|
||
|
// 7709
|
||
|
// Get the style information from getAttribute // 7710
|
||
|
// (IE uses .cssText instead) // 7711
|
||
|
support.style = /top/.test( a.getAttribute("style") ); // 7712
|
||
|
// 7713
|
||
|
// Make sure that URLs aren't manipulated // 7714
|
||
|
// (IE normalizes it by default) // 7715
|
||
|
support.hrefNormalized = a.getAttribute("href") === "/a"; // 7716
|
||
|
// 7717
|
||
|
// Check the default checkbox/radio value ("" on WebKit; "on" elsewhere) // 7718
|
||
|
support.checkOn = !!input.value; // 7719
|
||
|
// 7720
|
||
|
// Make sure that a selected-by-default option has a working selected property. // 7721
|
||
|
// (WebKit defaults to false instead of true, IE too, if it's in an optgroup) // 7722
|
||
|
support.optSelected = opt.selected; // 7723
|
||
|
// 7724
|
||
|
// Tests for enctype support on a form (#6743) // 7725
|
||
|
support.enctype = !!document.createElement("form").enctype; // 7726
|
||
|
// 7727
|
||
|
// Make sure that the options inside disabled selects aren't marked as disabled // 7728
|
||
|
// (WebKit marks them as disabled) // 7729
|
||
|
select.disabled = true; // 7730
|
||
|
support.optDisabled = !opt.disabled; // 7731
|
||
|
// 7732
|
||
|
// Support: IE8 only // 7733
|
||
|
// Check if we can trust getAttribute("value") // 7734
|
||
|
input = document.createElement( "input" ); // 7735
|
||
|
input.setAttribute( "value", "" ); // 7736
|
||
|
support.input = input.getAttribute( "value" ) === ""; // 7737
|
||
|
// 7738
|
||
|
// Check if an input maintains its value after becoming a radio // 7739
|
||
|
input.value = "t"; // 7740
|
||
|
input.setAttribute( "type", "radio" ); // 7741
|
||
|
support.radioValue = input.value === "t"; // 7742
|
||
|
})(); // 7743
|
||
|
// 7744
|
||
|
// 7745
|
||
|
var rreturn = /\r/g; // 7746
|
||
|
// 7747
|
||
|
jQuery.fn.extend({ // 7748
|
||
|
val: function( value ) { // 7749
|
||
|
var hooks, ret, isFunction, // 7750
|
||
|
elem = this[0]; // 7751
|
||
|
// 7752
|
||
|
if ( !arguments.length ) { // 7753
|
||
|
if ( elem ) { // 7754
|
||
|
hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ]; // 7755
|
||
|
// 7756
|
||
|
if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) { // 7757
|
||
|
return ret; // 7758
|
||
|
} // 7759
|
||
|
// 7760
|
||
|
ret = elem.value; // 7761
|
||
|
// 7762
|
||
|
return typeof ret === "string" ? // 7763
|
||
|
// handle most common string cases // 7764
|
||
|
ret.replace(rreturn, "") : // 7765
|
||
|
// handle cases where value is null/undef or number // 7766
|
||
|
ret == null ? "" : ret; // 7767
|
||
|
} // 7768
|
||
|
// 7769
|
||
|
return; // 7770
|
||
|
} // 7771
|
||
|
// 7772
|
||
|
isFunction = jQuery.isFunction( value ); // 7773
|
||
|
// 7774
|
||
|
return this.each(function( i ) { // 7775
|
||
|
var val; // 7776
|
||
|
// 7777
|
||
|
if ( this.nodeType !== 1 ) { // 7778
|
||
|
return; // 7779
|
||
|
} // 7780
|
||
|
// 7781
|
||
|
if ( isFunction ) { // 7782
|
||
|
val = value.call( this, i, jQuery( this ).val() ); // 7783
|
||
|
} else { // 7784
|
||
|
val = value; // 7785
|
||
|
} // 7786
|
||
|
// 7787
|
||
|
// Treat null/undefined as ""; convert numbers to string // 7788
|
||
|
if ( val == null ) { // 7789
|
||
|
val = ""; // 7790
|
||
|
} else if ( typeof val === "number" ) { // 7791
|
||
|
val += ""; // 7792
|
||
|
} else if ( jQuery.isArray( val ) ) { // 7793
|
||
|
val = jQuery.map( val, function( value ) { // 7794
|
||
|
return value == null ? "" : value + ""; // 7795
|
||
|
}); // 7796
|
||
|
} // 7797
|
||
|
// 7798
|
||
|
hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ]; // 7799
|
||
|
// 7800
|
||
|
// If set returns undefined, fall back to normal setting // 7801
|
||
|
if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) { // 7802
|
||
|
this.value = val; // 7803
|
||
|
} // 7804
|
||
|
}); // 7805
|
||
|
} // 7806
|
||
|
}); // 7807
|
||
|
// 7808
|
||
|
jQuery.extend({ // 7809
|
||
|
valHooks: { // 7810
|
||
|
option: { // 7811
|
||
|
get: function( elem ) { // 7812
|
||
|
var val = jQuery.find.attr( elem, "value" ); // 7813
|
||
|
return val != null ? // 7814
|
||
|
val : // 7815
|
||
|
// Support: IE10-11+ // 7816
|
||
|
// option.text throws exceptions (#14686, #14858) // 7817
|
||
|
jQuery.trim( jQuery.text( elem ) ); // 7818
|
||
|
} // 7819
|
||
|
}, // 7820
|
||
|
select: { // 7821
|
||
|
get: function( elem ) { // 7822
|
||
|
var value, option, // 7823
|
||
|
options = elem.options, // 7824
|
||
|
index = elem.selectedIndex, // 7825
|
||
|
one = elem.type === "select-one" || index < 0, // 7826
|
||
|
values = one ? null : [], // 7827
|
||
|
max = one ? index + 1 : options.length, // 7828
|
||
|
i = index < 0 ? // 7829
|
||
|
max : // 7830
|
||
|
one ? index : 0; // 7831
|
||
|
// 7832
|
||
|
// Loop through all the selected options // 7833
|
||
|
for ( ; i < max; i++ ) { // 7834
|
||
|
option = options[ i ]; // 7835
|
||
|
// 7836
|
||
|
// oldIE doesn't update selected after form reset (#2551) // 7837
|
||
|
if ( ( option.selected || i === index ) && // 7838
|
||
|
// Don't return options that are disabled or in a disabled optgroup // 7839
|
||
|
( support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null ) && // 7840
|
||
|
( !option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" ) ) ) { // 7841
|
||
|
// 7842
|
||
|
// Get the specific value for the option // 7843
|
||
|
value = jQuery( option ).val(); // 7844
|
||
|
// 7845
|
||
|
// We don't need an array for one selects // 7846
|
||
|
if ( one ) { // 7847
|
||
|
return value; // 7848
|
||
|
} // 7849
|
||
|
// 7850
|
||
|
// Multi-Selects return an array // 7851
|
||
|
values.push( value ); // 7852
|
||
|
} // 7853
|
||
|
} // 7854
|
||
|
// 7855
|
||
|
return values; // 7856
|
||
|
}, // 7857
|
||
|
// 7858
|
||
|
set: function( elem, value ) { // 7859
|
||
|
var optionSet, option, // 7860
|
||
|
options = elem.options, // 7861
|
||
|
values = jQuery.makeArray( value ), // 7862
|
||
|
i = options.length; // 7863
|
||
|
// 7864
|
||
|
while ( i-- ) { // 7865
|
||
|
option = options[ i ]; // 7866
|
||
|
// 7867
|
||
|
if ( jQuery.inArray( jQuery.valHooks.option.get( option ), values ) >= 0 ) { // 7868
|
||
|
// 7869
|
||
|
// Support: IE6 // 7870
|
||
|
// When new option element is added to select box we need to // 7871
|
||
|
// force reflow of newly added node in order to workaround delay // 7872
|
||
|
// of initialization properties // 7873
|
||
|
try { // 7874
|
||
|
option.selected = optionSet = true; // 7875
|
||
|
// 7876
|
||
|
} catch ( _ ) { // 7877
|
||
|
// 7878
|
||
|
// Will be executed only in IE6 // 7879
|
||
|
option.scrollHeight; // 7880
|
||
|
} // 7881
|
||
|
// 7882
|
||
|
} else { // 7883
|
||
|
option.selected = false; // 7884
|
||
|
} // 7885
|
||
|
} // 7886
|
||
|
// 7887
|
||
|
// Force browsers to behave consistently when non-matching value is set // 7888
|
||
|
if ( !optionSet ) { // 7889
|
||
|
elem.selectedIndex = -1; // 7890
|
||
|
} // 7891
|
||
|
// 7892
|
||
|
return options; // 7893
|
||
|
} // 7894
|
||
|
} // 7895
|
||
|
} // 7896
|
||
|
}); // 7897
|
||
|
// 7898
|
||
|
// Radios and checkboxes getter/setter // 7899
|
||
|
jQuery.each([ "radio", "checkbox" ], function() { // 7900
|
||
|
jQuery.valHooks[ this ] = { // 7901
|
||
|
set: function( elem, value ) { // 7902
|
||
|
if ( jQuery.isArray( value ) ) { // 7903
|
||
|
return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 ); // 7904
|
||
|
} // 7905
|
||
|
} // 7906
|
||
|
}; // 7907
|
||
|
if ( !support.checkOn ) { // 7908
|
||
|
jQuery.valHooks[ this ].get = function( elem ) { // 7909
|
||
|
// Support: Webkit // 7910
|
||
|
// "" is returned instead of "on" if a value isn't specified // 7911
|
||
|
return elem.getAttribute("value") === null ? "on" : elem.value; // 7912
|
||
|
}; // 7913
|
||
|
} // 7914
|
||
|
}); // 7915
|
||
|
// 7916
|
||
|
// 7917
|
||
|
// 7918
|
||
|
// 7919
|
||
|
var nodeHook, boolHook, // 7920
|
||
|
attrHandle = jQuery.expr.attrHandle, // 7921
|
||
|
ruseDefault = /^(?:checked|selected)$/i, // 7922
|
||
|
getSetAttribute = support.getSetAttribute, // 7923
|
||
|
getSetInput = support.input; // 7924
|
||
|
// 7925
|
||
|
jQuery.fn.extend({ // 7926
|
||
|
attr: function( name, value ) { // 7927
|
||
|
return access( this, jQuery.attr, name, value, arguments.length > 1 ); // 7928
|
||
|
}, // 7929
|
||
|
// 7930
|
||
|
removeAttr: function( name ) { // 7931
|
||
|
return this.each(function() { // 7932
|
||
|
jQuery.removeAttr( this, name ); // 7933
|
||
|
}); // 7934
|
||
|
} // 7935
|
||
|
}); // 7936
|
||
|
// 7937
|
||
|
jQuery.extend({ // 7938
|
||
|
attr: function( elem, name, value ) { // 7939
|
||
|
var hooks, ret, // 7940
|
||
|
nType = elem.nodeType; // 7941
|
||
|
// 7942
|
||
|
// don't get/set attributes on text, comment and attribute nodes // 7943
|
||
|
if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { // 7944
|
||
|
return; // 7945
|
||
|
} // 7946
|
||
|
// 7947
|
||
|
// Fallback to prop when attributes are not supported // 7948
|
||
|
if ( typeof elem.getAttribute === strundefined ) { // 7949
|
||
|
return jQuery.prop( elem, name, value ); // 7950
|
||
|
} // 7951
|
||
|
// 7952
|
||
|
// All attributes are lowercase // 7953
|
||
|
// Grab necessary hook if one is defined // 7954
|
||
|
if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { // 7955
|
||
|
name = name.toLowerCase(); // 7956
|
||
|
hooks = jQuery.attrHooks[ name ] || // 7957
|
||
|
( jQuery.expr.match.bool.test( name ) ? boolHook : nodeHook ); // 7958
|
||
|
} // 7959
|
||
|
// 7960
|
||
|
if ( value !== undefined ) { // 7961
|
||
|
// 7962
|
||
|
if ( value === null ) { // 7963
|
||
|
jQuery.removeAttr( elem, name ); // 7964
|
||
|
// 7965
|
||
|
} else if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) { // 7966
|
||
|
return ret; // 7967
|
||
|
// 7968
|
||
|
} else { // 7969
|
||
|
elem.setAttribute( name, value + "" ); // 7970
|
||
|
return value; // 7971
|
||
|
} // 7972
|
||
|
// 7973
|
||
|
} else if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) { // 7974
|
||
|
return ret; // 7975
|
||
|
// 7976
|
||
|
} else { // 7977
|
||
|
ret = jQuery.find.attr( elem, name ); // 7978
|
||
|
// 7979
|
||
|
// Non-existent attributes return null, we normalize to undefined // 7980
|
||
|
return ret == null ? // 7981
|
||
|
undefined : // 7982
|
||
|
ret; // 7983
|
||
|
} // 7984
|
||
|
}, // 7985
|
||
|
// 7986
|
||
|
removeAttr: function( elem, value ) { // 7987
|
||
|
var name, propName, // 7988
|
||
|
i = 0, // 7989
|
||
|
attrNames = value && value.match( rnotwhite ); // 7990
|
||
|
// 7991
|
||
|
if ( attrNames && elem.nodeType === 1 ) { // 7992
|
||
|
while ( (name = attrNames[i++]) ) { // 7993
|
||
|
propName = jQuery.propFix[ name ] || name; // 7994
|
||
|
// 7995
|
||
|
// Boolean attributes get special treatment (#10870) // 7996
|
||
|
if ( jQuery.expr.match.bool.test( name ) ) { // 7997
|
||
|
// Set corresponding property to false // 7998
|
||
|
if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) { // 7999
|
||
|
elem[ propName ] = false; // 8000
|
||
|
// Support: IE<9 // 8001
|
||
|
// Also clear defaultChecked/defaultSelected (if appropriate) // 8002
|
||
|
} else { // 8003
|
||
|
elem[ jQuery.camelCase( "default-" + name ) ] = // 8004
|
||
|
elem[ propName ] = false; // 8005
|
||
|
} // 8006
|
||
|
// 8007
|
||
|
// See #9699 for explanation of this approach (setting first, then removal) // 8008
|
||
|
} else { // 8009
|
||
|
jQuery.attr( elem, name, "" ); // 8010
|
||
|
} // 8011
|
||
|
// 8012
|
||
|
elem.removeAttribute( getSetAttribute ? name : propName ); // 8013
|
||
|
} // 8014
|
||
|
} // 8015
|
||
|
}, // 8016
|
||
|
// 8017
|
||
|
attrHooks: { // 8018
|
||
|
type: { // 8019
|
||
|
set: function( elem, value ) { // 8020
|
||
|
if ( !support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) { // 8021
|
||
|
// Setting the type on a radio button after the value resets the value in IE6-9 // 8022
|
||
|
// Reset value to default in case type is set after value during creation // 8023
|
||
|
var val = elem.value; // 8024
|
||
|
elem.setAttribute( "type", value ); // 8025
|
||
|
if ( val ) { // 8026
|
||
|
elem.value = val; // 8027
|
||
|
} // 8028
|
||
|
return value; // 8029
|
||
|
} // 8030
|
||
|
} // 8031
|
||
|
} // 8032
|
||
|
} // 8033
|
||
|
}); // 8034
|
||
|
// 8035
|
||
|
// Hook for boolean attributes // 8036
|
||
|
boolHook = { // 8037
|
||
|
set: function( elem, value, name ) { // 8038
|
||
|
if ( value === false ) { // 8039
|
||
|
// Remove boolean attributes when set to false // 8040
|
||
|
jQuery.removeAttr( elem, name ); // 8041
|
||
|
} else if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) { // 8042
|
||
|
// IE<8 needs the *property* name // 8043
|
||
|
elem.setAttribute( !getSetAttribute && jQuery.propFix[ name ] || name, name ); // 8044
|
||
|
// 8045
|
||
|
// Use defaultChecked and defaultSelected for oldIE // 8046
|
||
|
} else { // 8047
|
||
|
elem[ jQuery.camelCase( "default-" + name ) ] = elem[ name ] = true; // 8048
|
||
|
} // 8049
|
||
|
// 8050
|
||
|
return name; // 8051
|
||
|
} // 8052
|
||
|
}; // 8053
|
||
|
// 8054
|
||
|
// Retrieve booleans specially // 8055
|
||
|
jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( i, name ) { // 8056
|
||
|
// 8057
|
||
|
var getter = attrHandle[ name ] || jQuery.find.attr; // 8058
|
||
|
// 8059
|
||
|
attrHandle[ name ] = getSetInput && getSetAttribute || !ruseDefault.test( name ) ? // 8060
|
||
|
function( elem, name, isXML ) { // 8061
|
||
|
var ret, handle; // 8062
|
||
|
if ( !isXML ) { // 8063
|
||
|
// Avoid an infinite loop by temporarily removing this function from the getter // 8064
|
||
|
handle = attrHandle[ name ]; // 8065
|
||
|
attrHandle[ name ] = ret; // 8066
|
||
|
ret = getter( elem, name, isXML ) != null ? // 8067
|
||
|
name.toLowerCase() : // 8068
|
||
|
null; // 8069
|
||
|
attrHandle[ name ] = handle; // 8070
|
||
|
} // 8071
|
||
|
return ret; // 8072
|
||
|
} : // 8073
|
||
|
function( elem, name, isXML ) { // 8074
|
||
|
if ( !isXML ) { // 8075
|
||
|
return elem[ jQuery.camelCase( "default-" + name ) ] ? // 8076
|
||
|
name.toLowerCase() : // 8077
|
||
|
null; // 8078
|
||
|
} // 8079
|
||
|
}; // 8080
|
||
|
}); // 8081
|
||
|
// 8082
|
||
|
// fix oldIE attroperties // 8083
|
||
|
if ( !getSetInput || !getSetAttribute ) { // 8084
|
||
|
jQuery.attrHooks.value = { // 8085
|
||
|
set: function( elem, value, name ) { // 8086
|
||
|
if ( jQuery.nodeName( elem, "input" ) ) { // 8087
|
||
|
// Does not return so that setAttribute is also used // 8088
|
||
|
elem.defaultValue = value; // 8089
|
||
|
} else { // 8090
|
||
|
// Use nodeHook if defined (#1954); otherwise setAttribute is fine // 8091
|
||
|
return nodeHook && nodeHook.set( elem, value, name ); // 8092
|
||
|
} // 8093
|
||
|
} // 8094
|
||
|
}; // 8095
|
||
|
} // 8096
|
||
|
// 8097
|
||
|
// IE6/7 do not support getting/setting some attributes with get/setAttribute // 8098
|
||
|
if ( !getSetAttribute ) { // 8099
|
||
|
// 8100
|
||
|
// Use this for any attribute in IE6/7 // 8101
|
||
|
// This fixes almost every IE6/7 issue // 8102
|
||
|
nodeHook = { // 8103
|
||
|
set: function( elem, value, name ) { // 8104
|
||
|
// Set the existing or create a new attribute node // 8105
|
||
|
var ret = elem.getAttributeNode( name ); // 8106
|
||
|
if ( !ret ) { // 8107
|
||
|
elem.setAttributeNode( // 8108
|
||
|
(ret = elem.ownerDocument.createAttribute( name )) // 8109
|
||
|
); // 8110
|
||
|
} // 8111
|
||
|
// 8112
|
||
|
ret.value = value += ""; // 8113
|
||
|
// 8114
|
||
|
// Break association with cloned elements by also using setAttribute (#9646) // 8115
|
||
|
if ( name === "value" || value === elem.getAttribute( name ) ) { // 8116
|
||
|
return value; // 8117
|
||
|
} // 8118
|
||
|
} // 8119
|
||
|
}; // 8120
|
||
|
// 8121
|
||
|
// Some attributes are constructed with empty-string values when not defined // 8122
|
||
|
attrHandle.id = attrHandle.name = attrHandle.coords = // 8123
|
||
|
function( elem, name, isXML ) { // 8124
|
||
|
var ret; // 8125
|
||
|
if ( !isXML ) { // 8126
|
||
|
return (ret = elem.getAttributeNode( name )) && ret.value !== "" ? // 8127
|
||
|
ret.value : // 8128
|
||
|
null; // 8129
|
||
|
} // 8130
|
||
|
}; // 8131
|
||
|
// 8132
|
||
|
// Fixing value retrieval on a button requires this module // 8133
|
||
|
jQuery.valHooks.button = { // 8134
|
||
|
get: function( elem, name ) { // 8135
|
||
|
var ret = elem.getAttributeNode( name ); // 8136
|
||
|
if ( ret && ret.specified ) { // 8137
|
||
|
return ret.value; // 8138
|
||
|
} // 8139
|
||
|
}, // 8140
|
||
|
set: nodeHook.set // 8141
|
||
|
}; // 8142
|
||
|
// 8143
|
||
|
// Set contenteditable to false on removals(#10429) // 8144
|
||
|
// Setting to empty string throws an error as an invalid value // 8145
|
||
|
jQuery.attrHooks.contenteditable = { // 8146
|
||
|
set: function( elem, value, name ) { // 8147
|
||
|
nodeHook.set( elem, value === "" ? false : value, name ); // 8148
|
||
|
} // 8149
|
||
|
}; // 8150
|
||
|
// 8151
|
||
|
// Set width and height to auto instead of 0 on empty string( Bug #8150 ) // 8152
|
||
|
// This is for removals // 8153
|
||
|
jQuery.each([ "width", "height" ], function( i, name ) { // 8154
|
||
|
jQuery.attrHooks[ name ] = { // 8155
|
||
|
set: function( elem, value ) { // 8156
|
||
|
if ( value === "" ) { // 8157
|
||
|
elem.setAttribute( name, "auto" ); // 8158
|
||
|
return value; // 8159
|
||
|
} // 8160
|
||
|
} // 8161
|
||
|
}; // 8162
|
||
|
}); // 8163
|
||
|
} // 8164
|
||
|
// 8165
|
||
|
if ( !support.style ) { // 8166
|
||
|
jQuery.attrHooks.style = { // 8167
|
||
|
get: function( elem ) { // 8168
|
||
|
// Return undefined in the case of empty string // 8169
|
||
|
// Note: IE uppercases css property names, but if we were to .toLowerCase() // 8170
|
||
|
// .cssText, that would destroy case senstitivity in URL's, like in "background" // 8171
|
||
|
return elem.style.cssText || undefined; // 8172
|
||
|
}, // 8173
|
||
|
set: function( elem, value ) { // 8174
|
||
|
return ( elem.style.cssText = value + "" ); // 8175
|
||
|
} // 8176
|
||
|
}; // 8177
|
||
|
} // 8178
|
||
|
// 8179
|
||
|
// 8180
|
||
|
// 8181
|
||
|
// 8182
|
||
|
var rfocusable = /^(?:input|select|textarea|button|object)$/i, // 8183
|
||
|
rclickable = /^(?:a|area)$/i; // 8184
|
||
|
// 8185
|
||
|
jQuery.fn.extend({ // 8186
|
||
|
prop: function( name, value ) { // 8187
|
||
|
return access( this, jQuery.prop, name, value, arguments.length > 1 ); // 8188
|
||
|
}, // 8189
|
||
|
// 8190
|
||
|
removeProp: function( name ) { // 8191
|
||
|
name = jQuery.propFix[ name ] || name; // 8192
|
||
|
return this.each(function() { // 8193
|
||
|
// try/catch handles cases where IE balks (such as removing a property on window) // 8194
|
||
|
try { // 8195
|
||
|
this[ name ] = undefined; // 8196
|
||
|
delete this[ name ]; // 8197
|
||
|
} catch( e ) {} // 8198
|
||
|
}); // 8199
|
||
|
} // 8200
|
||
|
}); // 8201
|
||
|
// 8202
|
||
|
jQuery.extend({ // 8203
|
||
|
propFix: { // 8204
|
||
|
"for": "htmlFor", // 8205
|
||
|
"class": "className" // 8206
|
||
|
}, // 8207
|
||
|
// 8208
|
||
|
prop: function( elem, name, value ) { // 8209
|
||
|
var ret, hooks, notxml, // 8210
|
||
|
nType = elem.nodeType; // 8211
|
||
|
// 8212
|
||
|
// don't get/set properties on text, comment and attribute nodes // 8213
|
||
|
if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { // 8214
|
||
|
return; // 8215
|
||
|
} // 8216
|
||
|
// 8217
|
||
|
notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); // 8218
|
||
|
// 8219
|
||
|
if ( notxml ) { // 8220
|
||
|
// Fix name and attach hooks // 8221
|
||
|
name = jQuery.propFix[ name ] || name; // 8222
|
||
|
hooks = jQuery.propHooks[ name ]; // 8223
|
||
|
} // 8224
|
||
|
// 8225
|
||
|
if ( value !== undefined ) { // 8226
|
||
|
return hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ? // 8227
|
||
|
ret : // 8228
|
||
|
( elem[ name ] = value ); // 8229
|
||
|
// 8230
|
||
|
} else { // 8231
|
||
|
return hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ? // 8232
|
||
|
ret : // 8233
|
||
|
elem[ name ]; // 8234
|
||
|
} // 8235
|
||
|
}, // 8236
|
||
|
// 8237
|
||
|
propHooks: { // 8238
|
||
|
tabIndex: { // 8239
|
||
|
get: function( elem ) { // 8240
|
||
|
// elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set // 8241
|
||
|
// http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ // 8242
|
||
|
// Use proper attribute retrieval(#12072) // 8243
|
||
|
var tabindex = jQuery.find.attr( elem, "tabindex" ); // 8244
|
||
|
// 8245
|
||
|
return tabindex ? // 8246
|
||
|
parseInt( tabindex, 10 ) : // 8247
|
||
|
rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ? // 8248
|
||
|
0 : // 8249
|
||
|
-1; // 8250
|
||
|
} // 8251
|
||
|
} // 8252
|
||
|
} // 8253
|
||
|
}); // 8254
|
||
|
// 8255
|
||
|
// Some attributes require a special call on IE // 8256
|
||
|
// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx // 8257
|
||
|
if ( !support.hrefNormalized ) { // 8258
|
||
|
// href/src property should get the full normalized URL (#10299/#12915) // 8259
|
||
|
jQuery.each([ "href", "src" ], function( i, name ) { // 8260
|
||
|
jQuery.propHooks[ name ] = { // 8261
|
||
|
get: function( elem ) { // 8262
|
||
|
return elem.getAttribute( name, 4 ); // 8263
|
||
|
} // 8264
|
||
|
}; // 8265
|
||
|
}); // 8266
|
||
|
} // 8267
|
||
|
// 8268
|
||
|
// Support: Safari, IE9+ // 8269
|
||
|
// mis-reports the default selected property of an option // 8270
|
||
|
// Accessing the parent's selectedIndex property fixes it // 8271
|
||
|
if ( !support.optSelected ) { // 8272
|
||
|
jQuery.propHooks.selected = { // 8273
|
||
|
get: function( elem ) { // 8274
|
||
|
var parent = elem.parentNode; // 8275
|
||
|
// 8276
|
||
|
if ( parent ) { // 8277
|
||
|
parent.selectedIndex; // 8278
|
||
|
// 8279
|
||
|
// Make sure that it also works with optgroups, see #5701 // 8280
|
||
|
if ( parent.parentNode ) { // 8281
|
||
|
parent.parentNode.selectedIndex; // 8282
|
||
|
} // 8283
|
||
|
} // 8284
|
||
|
return null; // 8285
|
||
|
} // 8286
|
||
|
}; // 8287
|
||
|
} // 8288
|
||
|
// 8289
|
||
|
jQuery.each([ // 8290
|
||
|
"tabIndex", // 8291
|
||
|
"readOnly", // 8292
|
||
|
"maxLength", // 8293
|
||
|
"cellSpacing", // 8294
|
||
|
"cellPadding", // 8295
|
||
|
"rowSpan", // 8296
|
||
|
"colSpan", // 8297
|
||
|
"useMap", // 8298
|
||
|
"frameBorder", // 8299
|
||
|
"contentEditable" // 8300
|
||
|
], function() { // 8301
|
||
|
jQuery.propFix[ this.toLowerCase() ] = this; // 8302
|
||
|
}); // 8303
|
||
|
// 8304
|
||
|
// IE6/7 call enctype encoding // 8305
|
||
|
if ( !support.enctype ) { // 8306
|
||
|
jQuery.propFix.enctype = "encoding"; // 8307
|
||
|
} // 8308
|
||
|
// 8309
|
||
|
// 8310
|
||
|
// 8311
|
||
|
// 8312
|
||
|
var rclass = /[\t\r\n\f]/g; // 8313
|
||
|
// 8314
|
||
|
jQuery.fn.extend({ // 8315
|
||
|
addClass: function( value ) { // 8316
|
||
|
var classes, elem, cur, clazz, j, finalValue, // 8317
|
||
|
i = 0, // 8318
|
||
|
len = this.length, // 8319
|
||
|
proceed = typeof value === "string" && value; // 8320
|
||
|
// 8321
|
||
|
if ( jQuery.isFunction( value ) ) { // 8322
|
||
|
return this.each(function( j ) { // 8323
|
||
|
jQuery( this ).addClass( value.call( this, j, this.className ) ); // 8324
|
||
|
}); // 8325
|
||
|
} // 8326
|
||
|
// 8327
|
||
|
if ( proceed ) { // 8328
|
||
|
// The disjunction here is for better compressibility (see removeClass) // 8329
|
||
|
classes = ( value || "" ).match( rnotwhite ) || []; // 8330
|
||
|
// 8331
|
||
|
for ( ; i < len; i++ ) { // 8332
|
||
|
elem = this[ i ]; // 8333
|
||
|
cur = elem.nodeType === 1 && ( elem.className ? // 8334
|
||
|
( " " + elem.className + " " ).replace( rclass, " " ) : // 8335
|
||
|
" " // 8336
|
||
|
); // 8337
|
||
|
// 8338
|
||
|
if ( cur ) { // 8339
|
||
|
j = 0; // 8340
|
||
|
while ( (clazz = classes[j++]) ) { // 8341
|
||
|
if ( cur.indexOf( " " + clazz + " " ) < 0 ) { // 8342
|
||
|
cur += clazz + " "; // 8343
|
||
|
} // 8344
|
||
|
} // 8345
|
||
|
// 8346
|
||
|
// only assign if different to avoid unneeded rendering. // 8347
|
||
|
finalValue = jQuery.trim( cur ); // 8348
|
||
|
if ( elem.className !== finalValue ) { // 8349
|
||
|
elem.className = finalValue; // 8350
|
||
|
} // 8351
|
||
|
} // 8352
|
||
|
} // 8353
|
||
|
} // 8354
|
||
|
// 8355
|
||
|
return this; // 8356
|
||
|
}, // 8357
|
||
|
// 8358
|
||
|
removeClass: function( value ) { // 8359
|
||
|
var classes, elem, cur, clazz, j, finalValue, // 8360
|
||
|
i = 0, // 8361
|
||
|
len = this.length, // 8362
|
||
|
proceed = arguments.length === 0 || typeof value === "string" && value; // 8363
|
||
|
// 8364
|
||
|
if ( jQuery.isFunction( value ) ) { // 8365
|
||
|
return this.each(function( j ) { // 8366
|
||
|
jQuery( this ).removeClass( value.call( this, j, this.className ) ); // 8367
|
||
|
}); // 8368
|
||
|
} // 8369
|
||
|
if ( proceed ) { // 8370
|
||
|
classes = ( value || "" ).match( rnotwhite ) || []; // 8371
|
||
|
// 8372
|
||
|
for ( ; i < len; i++ ) { // 8373
|
||
|
elem = this[ i ]; // 8374
|
||
|
// This expression is here for better compressibility (see addClass) // 8375
|
||
|
cur = elem.nodeType === 1 && ( elem.className ? // 8376
|
||
|
( " " + elem.className + " " ).replace( rclass, " " ) : // 8377
|
||
|
"" // 8378
|
||
|
); // 8379
|
||
|
// 8380
|
||
|
if ( cur ) { // 8381
|
||
|
j = 0; // 8382
|
||
|
while ( (clazz = classes[j++]) ) { // 8383
|
||
|
// Remove *all* instances // 8384
|
||
|
while ( cur.indexOf( " " + clazz + " " ) >= 0 ) { // 8385
|
||
|
cur = cur.replace( " " + clazz + " ", " " ); // 8386
|
||
|
} // 8387
|
||
|
} // 8388
|
||
|
// 8389
|
||
|
// only assign if different to avoid unneeded rendering. // 8390
|
||
|
finalValue = value ? jQuery.trim( cur ) : ""; // 8391
|
||
|
if ( elem.className !== finalValue ) { // 8392
|
||
|
elem.className = finalValue; // 8393
|
||
|
} // 8394
|
||
|
} // 8395
|
||
|
} // 8396
|
||
|
} // 8397
|
||
|
// 8398
|
||
|
return this; // 8399
|
||
|
}, // 8400
|
||
|
// 8401
|
||
|
toggleClass: function( value, stateVal ) { // 8402
|
||
|
var type = typeof value; // 8403
|
||
|
// 8404
|
||
|
if ( typeof stateVal === "boolean" && type === "string" ) { // 8405
|
||
|
return stateVal ? this.addClass( value ) : this.removeClass( value ); // 8406
|
||
|
} // 8407
|
||
|
// 8408
|
||
|
if ( jQuery.isFunction( value ) ) { // 8409
|
||
|
return this.each(function( i ) { // 8410
|
||
|
jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal ); // 8411
|
||
|
}); // 8412
|
||
|
} // 8413
|
||
|
// 8414
|
||
|
return this.each(function() { // 8415
|
||
|
if ( type === "string" ) { // 8416
|
||
|
// toggle individual class names // 8417
|
||
|
var className, // 8418
|
||
|
i = 0, // 8419
|
||
|
self = jQuery( this ), // 8420
|
||
|
classNames = value.match( rnotwhite ) || []; // 8421
|
||
|
// 8422
|
||
|
while ( (className = classNames[ i++ ]) ) { // 8423
|
||
|
// check each className given, space separated list // 8424
|
||
|
if ( self.hasClass( className ) ) { // 8425
|
||
|
self.removeClass( className ); // 8426
|
||
|
} else { // 8427
|
||
|
self.addClass( className ); // 8428
|
||
|
} // 8429
|
||
|
} // 8430
|
||
|
// 8431
|
||
|
// Toggle whole class name // 8432
|
||
|
} else if ( type === strundefined || type === "boolean" ) { // 8433
|
||
|
if ( this.className ) { // 8434
|
||
|
// store className if set // 8435
|
||
|
jQuery._data( this, "__className__", this.className ); // 8436
|
||
|
} // 8437
|
||
|
// 8438
|
||
|
// If the element has a class name or if we're passed "false", // 8439
|
||
|
// then remove the whole classname (if there was one, the above saved it). // 8440
|
||
|
// Otherwise bring back whatever was previously saved (if anything), // 8441
|
||
|
// falling back to the empty string if nothing was stored. // 8442
|
||
|
this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || ""; // 8443
|
||
|
} // 8444
|
||
|
}); // 8445
|
||
|
}, // 8446
|
||
|
// 8447
|
||
|
hasClass: function( selector ) { // 8448
|
||
|
var className = " " + selector + " ", // 8449
|
||
|
i = 0, // 8450
|
||
|
l = this.length; // 8451
|
||
|
for ( ; i < l; i++ ) { // 8452
|
||
|
if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) >= 0 ) { // 8453
|
||
|
return true; // 8454
|
||
|
} // 8455
|
||
|
} // 8456
|
||
|
// 8457
|
||
|
return false; // 8458
|
||
|
} // 8459
|
||
|
}); // 8460
|
||
|
// 8461
|
||
|
// 8462
|
||
|
// 8463
|
||
|
// 8464
|
||
|
// Return jQuery for attributes-only inclusion // 8465
|
||
|
// 8466
|
||
|
// 8467
|
||
|
jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " + // 8468
|
||
|
"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " + // 8469
|
||
|
"change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) { // 8470
|
||
|
// 8471
|
||
|
// Handle event binding // 8472
|
||
|
jQuery.fn[ name ] = function( data, fn ) { // 8473
|
||
|
return arguments.length > 0 ? // 8474
|
||
|
this.on( name, null, data, fn ) : // 8475
|
||
|
this.trigger( name ); // 8476
|
||
|
}; // 8477
|
||
|
}); // 8478
|
||
|
// 8479
|
||
|
jQuery.fn.extend({ // 8480
|
||
|
hover: function( fnOver, fnOut ) { // 8481
|
||
|
return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver ); // 8482
|
||
|
}, // 8483
|
||
|
// 8484
|
||
|
bind: function( types, data, fn ) { // 8485
|
||
|
return this.on( types, null, data, fn ); // 8486
|
||
|
}, // 8487
|
||
|
unbind: function( types, fn ) { // 8488
|
||
|
return this.off( types, null, fn ); // 8489
|
||
|
}, // 8490
|
||
|
// 8491
|
||
|
delegate: function( selector, types, data, fn ) { // 8492
|
||
|
return this.on( types, selector, data, fn ); // 8493
|
||
|
}, // 8494
|
||
|
undelegate: function( selector, types, fn ) { // 8495
|
||
|
// ( namespace ) or ( selector, types [, fn] ) // 8496
|
||
|
return arguments.length === 1 ? this.off( selector, "**" ) : this.off( types, selector || "**", fn ); // 8497
|
||
|
} // 8498
|
||
|
}); // 8499
|
||
|
// 8500
|
||
|
// 8501
|
||
|
var nonce = jQuery.now(); // 8502
|
||
|
// 8503
|
||
|
var rquery = (/\?/); // 8504
|
||
|
// 8505
|
||
|
// 8506
|
||
|
// 8507
|
||
|
var rvalidtokens = /(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;
|
||
|
// 8509
|
||
|
jQuery.parseJSON = function( data ) { // 8510
|
||
|
// Attempt to parse using the native JSON parser first // 8511
|
||
|
if ( window.JSON && window.JSON.parse ) { // 8512
|
||
|
// Support: Android 2.3 // 8513
|
||
|
// Workaround failure to string-cast null input // 8514
|
||
|
return window.JSON.parse( data + "" ); // 8515
|
||
|
} // 8516
|
||
|
// 8517
|
||
|
var requireNonComma, // 8518
|
||
|
depth = null, // 8519
|
||
|
str = jQuery.trim( data + "" ); // 8520
|
||
|
// 8521
|
||
|
// Guard against invalid (and possibly dangerous) input by ensuring that nothing remains // 8522
|
||
|
// after removing valid tokens // 8523
|
||
|
return str && !jQuery.trim( str.replace( rvalidtokens, function( token, comma, open, close ) { // 8524
|
||
|
// 8525
|
||
|
// Force termination if we see a misplaced comma // 8526
|
||
|
if ( requireNonComma && comma ) { // 8527
|
||
|
depth = 0; // 8528
|
||
|
} // 8529
|
||
|
// 8530
|
||
|
// Perform no more replacements after returning to outermost depth // 8531
|
||
|
if ( depth === 0 ) { // 8532
|
||
|
return token; // 8533
|
||
|
} // 8534
|
||
|
// 8535
|
||
|
// Commas must not follow "[", "{", or "," // 8536
|
||
|
requireNonComma = open || comma; // 8537
|
||
|
// 8538
|
||
|
// Determine new depth // 8539
|
||
|
// array/object open ("[" or "{"): depth += true - false (increment) // 8540
|
||
|
// array/object close ("]" or "}"): depth += false - true (decrement) // 8541
|
||
|
// other cases ("," or primitive): depth += true - true (numeric cast) // 8542
|
||
|
depth += !close - !open; // 8543
|
||
|
// 8544
|
||
|
// Remove this token // 8545
|
||
|
return ""; // 8546
|
||
|
}) ) ? // 8547
|
||
|
( Function( "return " + str ) )() : // 8548
|
||
|
jQuery.error( "Invalid JSON: " + data ); // 8549
|
||
|
}; // 8550
|
||
|
// 8551
|
||
|
// 8552
|
||
|
// Cross-browser xml parsing // 8553
|
||
|
jQuery.parseXML = function( data ) { // 8554
|
||
|
var xml, tmp; // 8555
|
||
|
if ( !data || typeof data !== "string" ) { // 8556
|
||
|
return null; // 8557
|
||
|
} // 8558
|
||
|
try { // 8559
|
||
|
if ( window.DOMParser ) { // Standard // 8560
|
||
|
tmp = new DOMParser(); // 8561
|
||
|
xml = tmp.parseFromString( data, "text/xml" ); // 8562
|
||
|
} else { // IE // 8563
|
||
|
xml = new ActiveXObject( "Microsoft.XMLDOM" ); // 8564
|
||
|
xml.async = "false"; // 8565
|
||
|
xml.loadXML( data ); // 8566
|
||
|
} // 8567
|
||
|
} catch( e ) { // 8568
|
||
|
xml = undefined; // 8569
|
||
|
} // 8570
|
||
|
if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) { // 8571
|
||
|
jQuery.error( "Invalid XML: " + data ); // 8572
|
||
|
} // 8573
|
||
|
return xml; // 8574
|
||
|
}; // 8575
|
||
|
// 8576
|
||
|
// 8577
|
||
|
var // 8578
|
||
|
// Document location // 8579
|
||
|
ajaxLocParts, // 8580
|
||
|
ajaxLocation, // 8581
|
||
|
// 8582
|
||
|
rhash = /#.*$/, // 8583
|
||
|
rts = /([?&])_=[^&]*/, // 8584
|
||
|
rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, // IE leaves an \r character at EOL // 8585
|
||
|
// #7653, #8125, #8152: local protocol detection // 8586
|
||
|
rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/, // 8587
|
||
|
rnoContent = /^(?:GET|HEAD)$/, // 8588
|
||
|
rprotocol = /^\/\//, // 8589
|
||
|
rurl = /^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/, // 8590
|
||
|
// 8591
|
||
|
/* Prefilters // 8592
|
||
|
* 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example) // 8593
|
||
|
* 2) These are called: // 8594
|
||
|
* - BEFORE asking for a transport // 8595
|
||
|
* - AFTER param serialization (s.data is a string if s.processData is true) // 8596
|
||
|
* 3) key is the dataType // 8597
|
||
|
* 4) the catchall symbol "*" can be used // 8598
|
||
|
* 5) execution will start with transport dataType and THEN continue down to "*" if needed // 8599
|
||
|
*/ // 8600
|
||
|
prefilters = {}, // 8601
|
||
|
// 8602
|
||
|
/* Transports bindings // 8603
|
||
|
* 1) key is the dataType // 8604
|
||
|
* 2) the catchall symbol "*" can be used // 8605
|
||
|
* 3) selection will start with transport dataType and THEN go to "*" if needed // 8606
|
||
|
*/ // 8607
|
||
|
transports = {}, // 8608
|
||
|
// 8609
|
||
|
// Avoid comment-prolog char sequence (#10098); must appease lint and evade compression // 8610
|
||
|
allTypes = "*/".concat("*"); // 8611
|
||
|
// 8612
|
||
|
// #8138, IE may throw an exception when accessing // 8613
|
||
|
// a field from window.location if document.domain has been set // 8614
|
||
|
try { // 8615
|
||
|
ajaxLocation = location.href; // 8616
|
||
|
} catch( e ) { // 8617
|
||
|
// Use the href attribute of an A element // 8618
|
||
|
// since IE will modify it given document.location // 8619
|
||
|
ajaxLocation = document.createElement( "a" ); // 8620
|
||
|
ajaxLocation.href = ""; // 8621
|
||
|
ajaxLocation = ajaxLocation.href; // 8622
|
||
|
} // 8623
|
||
|
// 8624
|
||
|
// Segment location into parts // 8625
|
||
|
ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || []; // 8626
|
||
|
// 8627
|
||
|
// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport // 8628
|
||
|
function addToPrefiltersOrTransports( structure ) { // 8629
|
||
|
// 8630
|
||
|
// dataTypeExpression is optional and defaults to "*" // 8631
|
||
|
return function( dataTypeExpression, func ) { // 8632
|
||
|
// 8633
|
||
|
if ( typeof dataTypeExpression !== "string" ) { // 8634
|
||
|
func = dataTypeExpression; // 8635
|
||
|
dataTypeExpression = "*"; // 8636
|
||
|
} // 8637
|
||
|
// 8638
|
||
|
var dataType, // 8639
|
||
|
i = 0, // 8640
|
||
|
dataTypes = dataTypeExpression.toLowerCase().match( rnotwhite ) || []; // 8641
|
||
|
// 8642
|
||
|
if ( jQuery.isFunction( func ) ) { // 8643
|
||
|
// For each dataType in the dataTypeExpression // 8644
|
||
|
while ( (dataType = dataTypes[i++]) ) { // 8645
|
||
|
// Prepend if requested // 8646
|
||
|
if ( dataType.charAt( 0 ) === "+" ) { // 8647
|
||
|
dataType = dataType.slice( 1 ) || "*"; // 8648
|
||
|
(structure[ dataType ] = structure[ dataType ] || []).unshift( func ); // 8649
|
||
|
// 8650
|
||
|
// Otherwise append // 8651
|
||
|
} else { // 8652
|
||
|
(structure[ dataType ] = structure[ dataType ] || []).push( func ); // 8653
|
||
|
} // 8654
|
||
|
} // 8655
|
||
|
} // 8656
|
||
|
}; // 8657
|
||
|
} // 8658
|
||
|
// 8659
|
||
|
// Base inspection function for prefilters and transports // 8660
|
||
|
function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) { // 8661
|
||
|
// 8662
|
||
|
var inspected = {}, // 8663
|
||
|
seekingTransport = ( structure === transports ); // 8664
|
||
|
// 8665
|
||
|
function inspect( dataType ) { // 8666
|
||
|
var selected; // 8667
|
||
|
inspected[ dataType ] = true; // 8668
|
||
|
jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) { // 8669
|
||
|
var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR ); // 8670
|
||
|
if ( typeof dataTypeOrTransport === "string" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) { // 8671
|
||
|
options.dataTypes.unshift( dataTypeOrTransport ); // 8672
|
||
|
inspect( dataTypeOrTransport ); // 8673
|
||
|
return false; // 8674
|
||
|
} else if ( seekingTransport ) { // 8675
|
||
|
return !( selected = dataTypeOrTransport ); // 8676
|
||
|
} // 8677
|
||
|
}); // 8678
|
||
|
return selected; // 8679
|
||
|
} // 8680
|
||
|
// 8681
|
||
|
return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" ); // 8682
|
||
|
} // 8683
|
||
|
// 8684
|
||
|
// A special extend for ajax options // 8685
|
||
|
// that takes "flat" options (not to be deep extended) // 8686
|
||
|
// Fixes #9887 // 8687
|
||
|
function ajaxExtend( target, src ) { // 8688
|
||
|
var deep, key, // 8689
|
||
|
flatOptions = jQuery.ajaxSettings.flatOptions || {}; // 8690
|
||
|
// 8691
|
||
|
for ( key in src ) { // 8692
|
||
|
if ( src[ key ] !== undefined ) { // 8693
|
||
|
( flatOptions[ key ] ? target : ( deep || (deep = {}) ) )[ key ] = src[ key ]; // 8694
|
||
|
} // 8695
|
||
|
} // 8696
|
||
|
if ( deep ) { // 8697
|
||
|
jQuery.extend( true, target, deep ); // 8698
|
||
|
} // 8699
|
||
|
// 8700
|
||
|
return target; // 8701
|
||
|
} // 8702
|
||
|
// 8703
|
||
|
/* Handles responses to an ajax request: // 8704
|
||
|
* - finds the right dataType (mediates between content-type and expected dataType) // 8705
|
||
|
* - returns the corresponding response // 8706
|
||
|
*/ // 8707
|
||
|
function ajaxHandleResponses( s, jqXHR, responses ) { // 8708
|
||
|
var firstDataType, ct, finalDataType, type, // 8709
|
||
|
contents = s.contents, // 8710
|
||
|
dataTypes = s.dataTypes; // 8711
|
||
|
// 8712
|
||
|
// Remove auto dataType and get content-type in the process // 8713
|
||
|
while ( dataTypes[ 0 ] === "*" ) { // 8714
|
||
|
dataTypes.shift(); // 8715
|
||
|
if ( ct === undefined ) { // 8716
|
||
|
ct = s.mimeType || jqXHR.getResponseHeader("Content-Type"); // 8717
|
||
|
} // 8718
|
||
|
} // 8719
|
||
|
// 8720
|
||
|
// Check if we're dealing with a known content-type // 8721
|
||
|
if ( ct ) { // 8722
|
||
|
for ( type in contents ) { // 8723
|
||
|
if ( contents[ type ] && contents[ type ].test( ct ) ) { // 8724
|
||
|
dataTypes.unshift( type ); // 8725
|
||
|
break; // 8726
|
||
|
} // 8727
|
||
|
} // 8728
|
||
|
} // 8729
|
||
|
// 8730
|
||
|
// Check to see if we have a response for the expected dataType // 8731
|
||
|
if ( dataTypes[ 0 ] in responses ) { // 8732
|
||
|
finalDataType = dataTypes[ 0 ]; // 8733
|
||
|
} else { // 8734
|
||
|
// Try convertible dataTypes // 8735
|
||
|
for ( type in responses ) { // 8736
|
||
|
if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[0] ] ) { // 8737
|
||
|
finalDataType = type; // 8738
|
||
|
break; // 8739
|
||
|
} // 8740
|
||
|
if ( !firstDataType ) { // 8741
|
||
|
firstDataType = type; // 8742
|
||
|
} // 8743
|
||
|
} // 8744
|
||
|
// Or just use first one // 8745
|
||
|
finalDataType = finalDataType || firstDataType; // 8746
|
||
|
} // 8747
|
||
|
// 8748
|
||
|
// If we found a dataType // 8749
|
||
|
// We add the dataType to the list if needed // 8750
|
||
|
// and return the corresponding response // 8751
|
||
|
if ( finalDataType ) { // 8752
|
||
|
if ( finalDataType !== dataTypes[ 0 ] ) { // 8753
|
||
|
dataTypes.unshift( finalDataType ); // 8754
|
||
|
} // 8755
|
||
|
return responses[ finalDataType ]; // 8756
|
||
|
} // 8757
|
||
|
} // 8758
|
||
|
// 8759
|
||
|
/* Chain conversions given the request and the original response // 8760
|
||
|
* Also sets the responseXXX fields on the jqXHR instance // 8761
|
||
|
*/ // 8762
|
||
|
function ajaxConvert( s, response, jqXHR, isSuccess ) { // 8763
|
||
|
var conv2, current, conv, tmp, prev, // 8764
|
||
|
converters = {}, // 8765
|
||
|
// Work with a copy of dataTypes in case we need to modify it for conversion // 8766
|
||
|
dataTypes = s.dataTypes.slice(); // 8767
|
||
|
// 8768
|
||
|
// Create converters map with lowercased keys // 8769
|
||
|
if ( dataTypes[ 1 ] ) { // 8770
|
||
|
for ( conv in s.converters ) { // 8771
|
||
|
converters[ conv.toLowerCase() ] = s.converters[ conv ]; // 8772
|
||
|
} // 8773
|
||
|
} // 8774
|
||
|
// 8775
|
||
|
current = dataTypes.shift(); // 8776
|
||
|
// 8777
|
||
|
// Convert to each sequential dataType // 8778
|
||
|
while ( current ) { // 8779
|
||
|
// 8780
|
||
|
if ( s.responseFields[ current ] ) { // 8781
|
||
|
jqXHR[ s.responseFields[ current ] ] = response; // 8782
|
||
|
} // 8783
|
||
|
// 8784
|
||
|
// Apply the dataFilter if provided // 8785
|
||
|
if ( !prev && isSuccess && s.dataFilter ) { // 8786
|
||
|
response = s.dataFilter( response, s.dataType ); // 8787
|
||
|
} // 8788
|
||
|
// 8789
|
||
|
prev = current; // 8790
|
||
|
current = dataTypes.shift(); // 8791
|
||
|
// 8792
|
||
|
if ( current ) { // 8793
|
||
|
// 8794
|
||
|
// There's only work to do if current dataType is non-auto // 8795
|
||
|
if ( current === "*" ) { // 8796
|
||
|
// 8797
|
||
|
current = prev; // 8798
|
||
|
// 8799
|
||
|
// Convert response if prev dataType is non-auto and differs from current // 8800
|
||
|
} else if ( prev !== "*" && prev !== current ) { // 8801
|
||
|
// 8802
|
||
|
// Seek a direct converter // 8803
|
||
|
conv = converters[ prev + " " + current ] || converters[ "* " + current ]; // 8804
|
||
|
// 8805
|
||
|
// If none found, seek a pair // 8806
|
||
|
if ( !conv ) { // 8807
|
||
|
for ( conv2 in converters ) { // 8808
|
||
|
// 8809
|
||
|
// If conv2 outputs current // 8810
|
||
|
tmp = conv2.split( " " ); // 8811
|
||
|
if ( tmp[ 1 ] === current ) { // 8812
|
||
|
// 8813
|
||
|
// If prev can be converted to accepted input // 8814
|
||
|
conv = converters[ prev + " " + tmp[ 0 ] ] || // 8815
|
||
|
converters[ "* " + tmp[ 0 ] ]; // 8816
|
||
|
if ( conv ) { // 8817
|
||
|
// Condense equivalence converters // 8818
|
||
|
if ( conv === true ) { // 8819
|
||
|
conv = converters[ conv2 ]; // 8820
|
||
|
// 8821
|
||
|
// Otherwise, insert the intermediate dataType // 8822
|
||
|
} else if ( converters[ conv2 ] !== true ) { // 8823
|
||
|
current = tmp[ 0 ]; // 8824
|
||
|
dataTypes.unshift( tmp[ 1 ] ); // 8825
|
||
|
} // 8826
|
||
|
break; // 8827
|
||
|
} // 8828
|
||
|
} // 8829
|
||
|
} // 8830
|
||
|
} // 8831
|
||
|
// 8832
|
||
|
// Apply converter (if not an equivalence) // 8833
|
||
|
if ( conv !== true ) { // 8834
|
||
|
// 8835
|
||
|
// Unless errors are allowed to bubble, catch and return them // 8836
|
||
|
if ( conv && s[ "throws" ] ) { // 8837
|
||
|
response = conv( response ); // 8838
|
||
|
} else { // 8839
|
||
|
try { // 8840
|
||
|
response = conv( response ); // 8841
|
||
|
} catch ( e ) { // 8842
|
||
|
return { state: "parsererror", error: conv ? e : "No conversion from " + prev + " to " + current }; // 8843
|
||
|
} // 8844
|
||
|
} // 8845
|
||
|
} // 8846
|
||
|
} // 8847
|
||
|
} // 8848
|
||
|
} // 8849
|
||
|
// 8850
|
||
|
return { state: "success", data: response }; // 8851
|
||
|
} // 8852
|
||
|
// 8853
|
||
|
jQuery.extend({ // 8854
|
||
|
// 8855
|
||
|
// Counter for holding the number of active queries // 8856
|
||
|
active: 0, // 8857
|
||
|
// 8858
|
||
|
// Last-Modified header cache for next request // 8859
|
||
|
lastModified: {}, // 8860
|
||
|
etag: {}, // 8861
|
||
|
// 8862
|
||
|
ajaxSettings: { // 8863
|
||
|
url: ajaxLocation, // 8864
|
||
|
type: "GET", // 8865
|
||
|
isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ), // 8866
|
||
|
global: true, // 8867
|
||
|
processData: true, // 8868
|
||
|
async: true, // 8869
|
||
|
contentType: "application/x-www-form-urlencoded; charset=UTF-8", // 8870
|
||
|
/* // 8871
|
||
|
timeout: 0, // 8872
|
||
|
data: null, // 8873
|
||
|
dataType: null, // 8874
|
||
|
username: null, // 8875
|
||
|
password: null, // 8876
|
||
|
cache: null, // 8877
|
||
|
throws: false, // 8878
|
||
|
traditional: false, // 8879
|
||
|
headers: {}, // 8880
|
||
|
*/ // 8881
|
||
|
// 8882
|
||
|
accepts: { // 8883
|
||
|
"*": allTypes, // 8884
|
||
|
text: "text/plain", // 8885
|
||
|
html: "text/html", // 8886
|
||
|
xml: "application/xml, text/xml", // 8887
|
||
|
json: "application/json, text/javascript" // 8888
|
||
|
}, // 8889
|
||
|
// 8890
|
||
|
contents: { // 8891
|
||
|
xml: /xml/, // 8892
|
||
|
html: /html/, // 8893
|
||
|
json: /json/ // 8894
|
||
|
}, // 8895
|
||
|
// 8896
|
||
|
responseFields: { // 8897
|
||
|
xml: "responseXML", // 8898
|
||
|
text: "responseText", // 8899
|
||
|
json: "responseJSON" // 8900
|
||
|
}, // 8901
|
||
|
// 8902
|
||
|
// Data converters // 8903
|
||
|
// Keys separate source (or catchall "*") and destination types with a single space // 8904
|
||
|
converters: { // 8905
|
||
|
// 8906
|
||
|
// Convert anything to text // 8907
|
||
|
"* text": String, // 8908
|
||
|
// 8909
|
||
|
// Text to html (true = no transformation) // 8910
|
||
|
"text html": true, // 8911
|
||
|
// 8912
|
||
|
// Evaluate text as a json expression // 8913
|
||
|
"text json": jQuery.parseJSON, // 8914
|
||
|
// 8915
|
||
|
// Parse text as xml // 8916
|
||
|
"text xml": jQuery.parseXML // 8917
|
||
|
}, // 8918
|
||
|
// 8919
|
||
|
// For options that shouldn't be deep extended: // 8920
|
||
|
// you can add your own custom options here if // 8921
|
||
|
// and when you create one that shouldn't be // 8922
|
||
|
// deep extended (see ajaxExtend) // 8923
|
||
|
flatOptions: { // 8924
|
||
|
url: true, // 8925
|
||
|
context: true // 8926
|
||
|
} // 8927
|
||
|
}, // 8928
|
||
|
// 8929
|
||
|
// Creates a full fledged settings object into target // 8930
|
||
|
// with both ajaxSettings and settings fields. // 8931
|
||
|
// If target is omitted, writes into ajaxSettings. // 8932
|
||
|
ajaxSetup: function( target, settings ) { // 8933
|
||
|
return settings ? // 8934
|
||
|
// 8935
|
||
|
// Building a settings object // 8936
|
||
|
ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) : // 8937
|
||
|
// 8938
|
||
|
// Extending ajaxSettings // 8939
|
||
|
ajaxExtend( jQuery.ajaxSettings, target ); // 8940
|
||
|
}, // 8941
|
||
|
// 8942
|
||
|
ajaxPrefilter: addToPrefiltersOrTransports( prefilters ), // 8943
|
||
|
ajaxTransport: addToPrefiltersOrTransports( transports ), // 8944
|
||
|
// 8945
|
||
|
// Main method // 8946
|
||
|
ajax: function( url, options ) { // 8947
|
||
|
// 8948
|
||
|
// If url is an object, simulate pre-1.5 signature // 8949
|
||
|
if ( typeof url === "object" ) { // 8950
|
||
|
options = url; // 8951
|
||
|
url = undefined; // 8952
|
||
|
} // 8953
|
||
|
// 8954
|
||
|
// Force options to be an object // 8955
|
||
|
options = options || {}; // 8956
|
||
|
// 8957
|
||
|
var // Cross-domain detection vars // 8958
|
||
|
parts, // 8959
|
||
|
// Loop variable // 8960
|
||
|
i, // 8961
|
||
|
// URL without anti-cache param // 8962
|
||
|
cacheURL, // 8963
|
||
|
// Response headers as string // 8964
|
||
|
responseHeadersString, // 8965
|
||
|
// timeout handle // 8966
|
||
|
timeoutTimer, // 8967
|
||
|
// 8968
|
||
|
// To know if global events are to be dispatched // 8969
|
||
|
fireGlobals, // 8970
|
||
|
// 8971
|
||
|
transport, // 8972
|
||
|
// Response headers // 8973
|
||
|
responseHeaders, // 8974
|
||
|
// Create the final options object // 8975
|
||
|
s = jQuery.ajaxSetup( {}, options ), // 8976
|
||
|
// Callbacks context // 8977
|
||
|
callbackContext = s.context || s, // 8978
|
||
|
// Context for global events is callbackContext if it is a DOM node or jQuery collection // 8979
|
||
|
globalEventContext = s.context && ( callbackContext.nodeType || callbackContext.jquery ) ? // 8980
|
||
|
jQuery( callbackContext ) : // 8981
|
||
|
jQuery.event, // 8982
|
||
|
// Deferreds // 8983
|
||
|
deferred = jQuery.Deferred(), // 8984
|
||
|
completeDeferred = jQuery.Callbacks("once memory"), // 8985
|
||
|
// Status-dependent callbacks // 8986
|
||
|
statusCode = s.statusCode || {}, // 8987
|
||
|
// Headers (they are sent all at once) // 8988
|
||
|
requestHeaders = {}, // 8989
|
||
|
requestHeadersNames = {}, // 8990
|
||
|
// The jqXHR state // 8991
|
||
|
state = 0, // 8992
|
||
|
// Default abort message // 8993
|
||
|
strAbort = "canceled", // 8994
|
||
|
// Fake xhr // 8995
|
||
|
jqXHR = { // 8996
|
||
|
readyState: 0, // 8997
|
||
|
// 8998
|
||
|
// Builds headers hashtable if needed // 8999
|
||
|
getResponseHeader: function( key ) { // 9000
|
||
|
var match; // 9001
|
||
|
if ( state === 2 ) { // 9002
|
||
|
if ( !responseHeaders ) { // 9003
|
||
|
responseHeaders = {}; // 9004
|
||
|
while ( (match = rheaders.exec( responseHeadersString )) ) { // 9005
|
||
|
responseHeaders[ match[1].toLowerCase() ] = match[ 2 ]; // 9006
|
||
|
} // 9007
|
||
|
} // 9008
|
||
|
match = responseHeaders[ key.toLowerCase() ]; // 9009
|
||
|
} // 9010
|
||
|
return match == null ? null : match; // 9011
|
||
|
}, // 9012
|
||
|
// 9013
|
||
|
// Raw string // 9014
|
||
|
getAllResponseHeaders: function() { // 9015
|
||
|
return state === 2 ? responseHeadersString : null; // 9016
|
||
|
}, // 9017
|
||
|
// 9018
|
||
|
// Caches the header // 9019
|
||
|
setRequestHeader: function( name, value ) { // 9020
|
||
|
var lname = name.toLowerCase(); // 9021
|
||
|
if ( !state ) { // 9022
|
||
|
name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name; // 9023
|
||
|
requestHeaders[ name ] = value; // 9024
|
||
|
} // 9025
|
||
|
return this; // 9026
|
||
|
}, // 9027
|
||
|
// 9028
|
||
|
// Overrides response content-type header // 9029
|
||
|
overrideMimeType: function( type ) { // 9030
|
||
|
if ( !state ) { // 9031
|
||
|
s.mimeType = type; // 9032
|
||
|
} // 9033
|
||
|
return this; // 9034
|
||
|
}, // 9035
|
||
|
// 9036
|
||
|
// Status-dependent callbacks // 9037
|
||
|
statusCode: function( map ) { // 9038
|
||
|
var code; // 9039
|
||
|
if ( map ) { // 9040
|
||
|
if ( state < 2 ) { // 9041
|
||
|
for ( code in map ) { // 9042
|
||
|
// Lazy-add the new callback in a way that preserves old ones // 9043
|
||
|
statusCode[ code ] = [ statusCode[ code ], map[ code ] ]; // 9044
|
||
|
} // 9045
|
||
|
} else { // 9046
|
||
|
// Execute the appropriate callbacks // 9047
|
||
|
jqXHR.always( map[ jqXHR.status ] ); // 9048
|
||
|
} // 9049
|
||
|
} // 9050
|
||
|
return this; // 9051
|
||
|
}, // 9052
|
||
|
// 9053
|
||
|
// Cancel the request // 9054
|
||
|
abort: function( statusText ) { // 9055
|
||
|
var finalText = statusText || strAbort; // 9056
|
||
|
if ( transport ) { // 9057
|
||
|
transport.abort( finalText ); // 9058
|
||
|
} // 9059
|
||
|
done( 0, finalText ); // 9060
|
||
|
return this; // 9061
|
||
|
} // 9062
|
||
|
}; // 9063
|
||
|
// 9064
|
||
|
// Attach deferreds // 9065
|
||
|
deferred.promise( jqXHR ).complete = completeDeferred.add; // 9066
|
||
|
jqXHR.success = jqXHR.done; // 9067
|
||
|
jqXHR.error = jqXHR.fail; // 9068
|
||
|
// 9069
|
||
|
// Remove hash character (#7531: and string promotion) // 9070
|
||
|
// Add protocol if not provided (#5866: IE7 issue with protocol-less urls) // 9071
|
||
|
// Handle falsy url in the settings object (#10093: consistency with old signature) // 9072
|
||
|
// We also use the url parameter if available // 9073
|
||
|
s.url = ( ( url || s.url || ajaxLocation ) + "" ).replace( rhash, "" ).replace( rprotocol, ajaxLocParts[ 1 ] + "//" );
|
||
|
// 9075
|
||
|
// Alias method option to type as per ticket #12004 // 9076
|
||
|
s.type = options.method || options.type || s.method || s.type; // 9077
|
||
|
// 9078
|
||
|
// Extract dataTypes list // 9079
|
||
|
s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().match( rnotwhite ) || [ "" ]; // 9080
|
||
|
// 9081
|
||
|
// A cross-domain request is in order when we have a protocol:host:port mismatch // 9082
|
||
|
if ( s.crossDomain == null ) { // 9083
|
||
|
parts = rurl.exec( s.url.toLowerCase() ); // 9084
|
||
|
s.crossDomain = !!( parts && // 9085
|
||
|
( parts[ 1 ] !== ajaxLocParts[ 1 ] || parts[ 2 ] !== ajaxLocParts[ 2 ] || // 9086
|
||
|
( parts[ 3 ] || ( parts[ 1 ] === "http:" ? "80" : "443" ) ) !== // 9087
|
||
|
( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? "80" : "443" ) ) ) // 9088
|
||
|
); // 9089
|
||
|
} // 9090
|
||
|
// 9091
|
||
|
// Convert data if not already a string // 9092
|
||
|
if ( s.data && s.processData && typeof s.data !== "string" ) { // 9093
|
||
|
s.data = jQuery.param( s.data, s.traditional ); // 9094
|
||
|
} // 9095
|
||
|
// 9096
|
||
|
// Apply prefilters // 9097
|
||
|
inspectPrefiltersOrTransports( prefilters, s, options, jqXHR ); // 9098
|
||
|
// 9099
|
||
|
// If request was aborted inside a prefilter, stop there // 9100
|
||
|
if ( state === 2 ) { // 9101
|
||
|
return jqXHR; // 9102
|
||
|
} // 9103
|
||
|
// 9104
|
||
|
// We can fire global events as of now if asked to // 9105
|
||
|
// Don't fire events if jQuery.event is undefined in an AMD-usage scenario (#15118) // 9106
|
||
|
fireGlobals = jQuery.event && s.global; // 9107
|
||
|
// 9108
|
||
|
// Watch for a new set of requests // 9109
|
||
|
if ( fireGlobals && jQuery.active++ === 0 ) { // 9110
|
||
|
jQuery.event.trigger("ajaxStart"); // 9111
|
||
|
} // 9112
|
||
|
// 9113
|
||
|
// Uppercase the type // 9114
|
||
|
s.type = s.type.toUpperCase(); // 9115
|
||
|
// 9116
|
||
|
// Determine if request has content // 9117
|
||
|
s.hasContent = !rnoContent.test( s.type ); // 9118
|
||
|
// 9119
|
||
|
// Save the URL in case we're toying with the If-Modified-Since // 9120
|
||
|
// and/or If-None-Match header later on // 9121
|
||
|
cacheURL = s.url; // 9122
|
||
|
// 9123
|
||
|
// More options handling for requests with no content // 9124
|
||
|
if ( !s.hasContent ) { // 9125
|
||
|
// 9126
|
||
|
// If data is available, append data to url // 9127
|
||
|
if ( s.data ) { // 9128
|
||
|
cacheURL = ( s.url += ( rquery.test( cacheURL ) ? "&" : "?" ) + s.data ); // 9129
|
||
|
// #9682: remove data so that it's not used in an eventual retry // 9130
|
||
|
delete s.data; // 9131
|
||
|
} // 9132
|
||
|
// 9133
|
||
|
// Add anti-cache in url if needed // 9134
|
||
|
if ( s.cache === false ) { // 9135
|
||
|
s.url = rts.test( cacheURL ) ? // 9136
|
||
|
// 9137
|
||
|
// If there is already a '_' parameter, set its value // 9138
|
||
|
cacheURL.replace( rts, "$1_=" + nonce++ ) : // 9139
|
||
|
// 9140
|
||
|
// Otherwise add one to the end // 9141
|
||
|
cacheURL + ( rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + nonce++; // 9142
|
||
|
} // 9143
|
||
|
} // 9144
|
||
|
// 9145
|
||
|
// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. // 9146
|
||
|
if ( s.ifModified ) { // 9147
|
||
|
if ( jQuery.lastModified[ cacheURL ] ) { // 9148
|
||
|
jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] ); // 9149
|
||
|
} // 9150
|
||
|
if ( jQuery.etag[ cacheURL ] ) { // 9151
|
||
|
jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] ); // 9152
|
||
|
} // 9153
|
||
|
} // 9154
|
||
|
// 9155
|
||
|
// Set the correct header, if data is being sent // 9156
|
||
|
if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) { // 9157
|
||
|
jqXHR.setRequestHeader( "Content-Type", s.contentType ); // 9158
|
||
|
} // 9159
|
||
|
// 9160
|
||
|
// Set the Accepts header for the server, depending on the dataType // 9161
|
||
|
jqXHR.setRequestHeader( // 9162
|
||
|
"Accept", // 9163
|
||
|
s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ? // 9164
|
||
|
s.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) : // 9165
|
||
|
s.accepts[ "*" ] // 9166
|
||
|
); // 9167
|
||
|
// 9168
|
||
|
// Check for headers option // 9169
|
||
|
for ( i in s.headers ) { // 9170
|
||
|
jqXHR.setRequestHeader( i, s.headers[ i ] ); // 9171
|
||
|
} // 9172
|
||
|
// 9173
|
||
|
// Allow custom headers/mimetypes and early abort // 9174
|
||
|
if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) { // 9175
|
||
|
// Abort if not done already and return // 9176
|
||
|
return jqXHR.abort(); // 9177
|
||
|
} // 9178
|
||
|
// 9179
|
||
|
// aborting is no longer a cancellation // 9180
|
||
|
strAbort = "abort"; // 9181
|
||
|
// 9182
|
||
|
// Install callbacks on deferreds // 9183
|
||
|
for ( i in { success: 1, error: 1, complete: 1 } ) { // 9184
|
||
|
jqXHR[ i ]( s[ i ] ); // 9185
|
||
|
} // 9186
|
||
|
// 9187
|
||
|
// Get transport // 9188
|
||
|
transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR ); // 9189
|
||
|
// 9190
|
||
|
// If no transport, we auto-abort // 9191
|
||
|
if ( !transport ) { // 9192
|
||
|
done( -1, "No Transport" ); // 9193
|
||
|
} else { // 9194
|
||
|
jqXHR.readyState = 1; // 9195
|
||
|
// 9196
|
||
|
// Send global event // 9197
|
||
|
if ( fireGlobals ) { // 9198
|
||
|
globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] ); // 9199
|
||
|
} // 9200
|
||
|
// Timeout // 9201
|
||
|
if ( s.async && s.timeout > 0 ) { // 9202
|
||
|
timeoutTimer = setTimeout(function() { // 9203
|
||
|
jqXHR.abort("timeout"); // 9204
|
||
|
}, s.timeout ); // 9205
|
||
|
} // 9206
|
||
|
// 9207
|
||
|
try { // 9208
|
||
|
state = 1; // 9209
|
||
|
transport.send( requestHeaders, done ); // 9210
|
||
|
} catch ( e ) { // 9211
|
||
|
// Propagate exception as error if not done // 9212
|
||
|
if ( state < 2 ) { // 9213
|
||
|
done( -1, e ); // 9214
|
||
|
// Simply rethrow otherwise // 9215
|
||
|
} else { // 9216
|
||
|
throw e; // 9217
|
||
|
} // 9218
|
||
|
} // 9219
|
||
|
} // 9220
|
||
|
// 9221
|
||
|
// Callback for when everything is done // 9222
|
||
|
function done( status, nativeStatusText, responses, headers ) { // 9223
|
||
|
var isSuccess, success, error, response, modified, // 9224
|
||
|
statusText = nativeStatusText; // 9225
|
||
|
// 9226
|
||
|
// Called once // 9227
|
||
|
if ( state === 2 ) { // 9228
|
||
|
return; // 9229
|
||
|
} // 9230
|
||
|
// 9231
|
||
|
// State is "done" now // 9232
|
||
|
state = 2; // 9233
|
||
|
// 9234
|
||
|
// Clear timeout if it exists // 9235
|
||
|
if ( timeoutTimer ) { // 9236
|
||
|
clearTimeout( timeoutTimer ); // 9237
|
||
|
} // 9238
|
||
|
// 9239
|
||
|
// Dereference transport for early garbage collection // 9240
|
||
|
// (no matter how long the jqXHR object will be used) // 9241
|
||
|
transport = undefined; // 9242
|
||
|
// 9243
|
||
|
// Cache response headers // 9244
|
||
|
responseHeadersString = headers || ""; // 9245
|
||
|
// 9246
|
||
|
// Set readyState // 9247
|
||
|
jqXHR.readyState = status > 0 ? 4 : 0; // 9248
|
||
|
// 9249
|
||
|
// Determine if successful // 9250
|
||
|
isSuccess = status >= 200 && status < 300 || status === 304; // 9251
|
||
|
// 9252
|
||
|
// Get response data // 9253
|
||
|
if ( responses ) { // 9254
|
||
|
response = ajaxHandleResponses( s, jqXHR, responses ); // 9255
|
||
|
} // 9256
|
||
|
// 9257
|
||
|
// Convert no matter what (that way responseXXX fields are always set) // 9258
|
||
|
response = ajaxConvert( s, response, jqXHR, isSuccess ); // 9259
|
||
|
// 9260
|
||
|
// If successful, handle type chaining // 9261
|
||
|
if ( isSuccess ) { // 9262
|
||
|
// 9263
|
||
|
// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. // 9264
|
||
|
if ( s.ifModified ) { // 9265
|
||
|
modified = jqXHR.getResponseHeader("Last-Modified"); // 9266
|
||
|
if ( modified ) { // 9267
|
||
|
jQuery.lastModified[ cacheURL ] = modified; // 9268
|
||
|
} // 9269
|
||
|
modified = jqXHR.getResponseHeader("etag"); // 9270
|
||
|
if ( modified ) { // 9271
|
||
|
jQuery.etag[ cacheURL ] = modified; // 9272
|
||
|
} // 9273
|
||
|
} // 9274
|
||
|
// 9275
|
||
|
// if no content // 9276
|
||
|
if ( status === 204 || s.type === "HEAD" ) { // 9277
|
||
|
statusText = "nocontent"; // 9278
|
||
|
// 9279
|
||
|
// if not modified // 9280
|
||
|
} else if ( status === 304 ) { // 9281
|
||
|
statusText = "notmodified"; // 9282
|
||
|
// 9283
|
||
|
// If we have data, let's convert it // 9284
|
||
|
} else { // 9285
|
||
|
statusText = response.state; // 9286
|
||
|
success = response.data; // 9287
|
||
|
error = response.error; // 9288
|
||
|
isSuccess = !error; // 9289
|
||
|
} // 9290
|
||
|
} else { // 9291
|
||
|
// We extract error from statusText // 9292
|
||
|
// then normalize statusText and status for non-aborts // 9293
|
||
|
error = statusText; // 9294
|
||
|
if ( status || !statusText ) { // 9295
|
||
|
statusText = "error"; // 9296
|
||
|
if ( status < 0 ) { // 9297
|
||
|
status = 0; // 9298
|
||
|
} // 9299
|
||
|
} // 9300
|
||
|
} // 9301
|
||
|
// 9302
|
||
|
// Set data for the fake xhr object // 9303
|
||
|
jqXHR.status = status; // 9304
|
||
|
jqXHR.statusText = ( nativeStatusText || statusText ) + ""; // 9305
|
||
|
// 9306
|
||
|
// Success/Error // 9307
|
||
|
if ( isSuccess ) { // 9308
|
||
|
deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] ); // 9309
|
||
|
} else { // 9310
|
||
|
deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] ); // 9311
|
||
|
} // 9312
|
||
|
// 9313
|
||
|
// Status-dependent callbacks // 9314
|
||
|
jqXHR.statusCode( statusCode ); // 9315
|
||
|
statusCode = undefined; // 9316
|
||
|
// 9317
|
||
|
if ( fireGlobals ) { // 9318
|
||
|
globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError", // 9319
|
||
|
[ jqXHR, s, isSuccess ? success : error ] ); // 9320
|
||
|
} // 9321
|
||
|
// 9322
|
||
|
// Complete // 9323
|
||
|
completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] ); // 9324
|
||
|
// 9325
|
||
|
if ( fireGlobals ) { // 9326
|
||
|
globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] ); // 9327
|
||
|
// Handle the global AJAX counter // 9328
|
||
|
if ( !( --jQuery.active ) ) { // 9329
|
||
|
jQuery.event.trigger("ajaxStop"); // 9330
|
||
|
} // 9331
|
||
|
} // 9332
|
||
|
} // 9333
|
||
|
// 9334
|
||
|
return jqXHR; // 9335
|
||
|
}, // 9336
|
||
|
// 9337
|
||
|
getJSON: function( url, data, callback ) { // 9338
|
||
|
return jQuery.get( url, data, callback, "json" ); // 9339
|
||
|
}, // 9340
|
||
|
// 9341
|
||
|
getScript: function( url, callback ) { // 9342
|
||
|
return jQuery.get( url, undefined, callback, "script" ); // 9343
|
||
|
} // 9344
|
||
|
}); // 9345
|
||
|
// 9346
|
||
|
jQuery.each( [ "get", "post" ], function( i, method ) { // 9347
|
||
|
jQuery[ method ] = function( url, data, callback, type ) { // 9348
|
||
|
// shift arguments if data argument was omitted // 9349
|
||
|
if ( jQuery.isFunction( data ) ) { // 9350
|
||
|
type = type || callback; // 9351
|
||
|
callback = data; // 9352
|
||
|
data = undefined; // 9353
|
||
|
} // 9354
|
||
|
// 9355
|
||
|
return jQuery.ajax({ // 9356
|
||
|
url: url, // 9357
|
||
|
type: method, // 9358
|
||
|
dataType: type, // 9359
|
||
|
data: data, // 9360
|
||
|
success: callback // 9361
|
||
|
}); // 9362
|
||
|
}; // 9363
|
||
|
}); // 9364
|
||
|
// 9365
|
||
|
// 9366
|
||
|
jQuery._evalUrl = function( url ) { // 9367
|
||
|
return jQuery.ajax({ // 9368
|
||
|
url: url, // 9369
|
||
|
type: "GET", // 9370
|
||
|
dataType: "script", // 9371
|
||
|
async: false, // 9372
|
||
|
global: false, // 9373
|
||
|
"throws": true // 9374
|
||
|
}); // 9375
|
||
|
}; // 9376
|
||
|
// 9377
|
||
|
// 9378
|
||
|
jQuery.fn.extend({ // 9379
|
||
|
wrapAll: function( html ) { // 9380
|
||
|
if ( jQuery.isFunction( html ) ) { // 9381
|
||
|
return this.each(function(i) { // 9382
|
||
|
jQuery(this).wrapAll( html.call(this, i) ); // 9383
|
||
|
}); // 9384
|
||
|
} // 9385
|
||
|
// 9386
|
||
|
if ( this[0] ) { // 9387
|
||
|
// The elements to wrap the target around // 9388
|
||
|
var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true); // 9389
|
||
|
// 9390
|
||
|
if ( this[0].parentNode ) { // 9391
|
||
|
wrap.insertBefore( this[0] ); // 9392
|
||
|
} // 9393
|
||
|
// 9394
|
||
|
wrap.map(function() { // 9395
|
||
|
var elem = this; // 9396
|
||
|
// 9397
|
||
|
while ( elem.firstChild && elem.firstChild.nodeType === 1 ) { // 9398
|
||
|
elem = elem.firstChild; // 9399
|
||
|
} // 9400
|
||
|
// 9401
|
||
|
return elem; // 9402
|
||
|
}).append( this ); // 9403
|
||
|
} // 9404
|
||
|
// 9405
|
||
|
return this; // 9406
|
||
|
}, // 9407
|
||
|
// 9408
|
||
|
wrapInner: function( html ) { // 9409
|
||
|
if ( jQuery.isFunction( html ) ) { // 9410
|
||
|
return this.each(function(i) { // 9411
|
||
|
jQuery(this).wrapInner( html.call(this, i) ); // 9412
|
||
|
}); // 9413
|
||
|
} // 9414
|
||
|
// 9415
|
||
|
return this.each(function() { // 9416
|
||
|
var self = jQuery( this ), // 9417
|
||
|
contents = self.contents(); // 9418
|
||
|
// 9419
|
||
|
if ( contents.length ) { // 9420
|
||
|
contents.wrapAll( html ); // 9421
|
||
|
// 9422
|
||
|
} else { // 9423
|
||
|
self.append( html ); // 9424
|
||
|
} // 9425
|
||
|
}); // 9426
|
||
|
}, // 9427
|
||
|
// 9428
|
||
|
wrap: function( html ) { // 9429
|
||
|
var isFunction = jQuery.isFunction( html ); // 9430
|
||
|
// 9431
|
||
|
return this.each(function(i) { // 9432
|
||
|
jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html ); // 9433
|
||
|
}); // 9434
|
||
|
}, // 9435
|
||
|
// 9436
|
||
|
unwrap: function() { // 9437
|
||
|
return this.parent().each(function() { // 9438
|
||
|
if ( !jQuery.nodeName( this, "body" ) ) { // 9439
|
||
|
jQuery( this ).replaceWith( this.childNodes ); // 9440
|
||
|
} // 9441
|
||
|
}).end(); // 9442
|
||
|
} // 9443
|
||
|
}); // 9444
|
||
|
// 9445
|
||
|
// 9446
|
||
|
jQuery.expr.filters.hidden = function( elem ) { // 9447
|
||
|
// Support: Opera <= 12.12 // 9448
|
||
|
// Opera reports offsetWidths and offsetHeights less than zero on some elements // 9449
|
||
|
return elem.offsetWidth <= 0 && elem.offsetHeight <= 0 || // 9450
|
||
|
(!support.reliableHiddenOffsets() && // 9451
|
||
|
((elem.style && elem.style.display) || jQuery.css( elem, "display" )) === "none"); // 9452
|
||
|
}; // 9453
|
||
|
// 9454
|
||
|
jQuery.expr.filters.visible = function( elem ) { // 9455
|
||
|
return !jQuery.expr.filters.hidden( elem ); // 9456
|
||
|
}; // 9457
|
||
|
// 9458
|
||
|
// 9459
|
||
|
// 9460
|
||
|
// 9461
|
||
|
var r20 = /%20/g, // 9462
|
||
|
rbracket = /\[\]$/, // 9463
|
||
|
rCRLF = /\r?\n/g, // 9464
|
||
|
rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i, // 9465
|
||
|
rsubmittable = /^(?:input|select|textarea|keygen)/i; // 9466
|
||
|
// 9467
|
||
|
function buildParams( prefix, obj, traditional, add ) { // 9468
|
||
|
var name; // 9469
|
||
|
// 9470
|
||
|
if ( jQuery.isArray( obj ) ) { // 9471
|
||
|
// Serialize array item. // 9472
|
||
|
jQuery.each( obj, function( i, v ) { // 9473
|
||
|
if ( traditional || rbracket.test( prefix ) ) { // 9474
|
||
|
// Treat each array item as a scalar. // 9475
|
||
|
add( prefix, v ); // 9476
|
||
|
// 9477
|
||
|
} else { // 9478
|
||
|
// Item is non-scalar (array or object), encode its numeric index. // 9479
|
||
|
buildParams( prefix + "[" + ( typeof v === "object" ? i : "" ) + "]", v, traditional, add ); // 9480
|
||
|
} // 9481
|
||
|
}); // 9482
|
||
|
// 9483
|
||
|
} else if ( !traditional && jQuery.type( obj ) === "object" ) { // 9484
|
||
|
// Serialize object item. // 9485
|
||
|
for ( name in obj ) { // 9486
|
||
|
buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add ); // 9487
|
||
|
} // 9488
|
||
|
// 9489
|
||
|
} else { // 9490
|
||
|
// Serialize scalar item. // 9491
|
||
|
add( prefix, obj ); // 9492
|
||
|
} // 9493
|
||
|
} // 9494
|
||
|
// 9495
|
||
|
// Serialize an array of form elements or a set of // 9496
|
||
|
// key/values into a query string // 9497
|
||
|
jQuery.param = function( a, traditional ) { // 9498
|
||
|
var prefix, // 9499
|
||
|
s = [], // 9500
|
||
|
add = function( key, value ) { // 9501
|
||
|
// If value is a function, invoke it and return its value // 9502
|
||
|
value = jQuery.isFunction( value ) ? value() : ( value == null ? "" : value ); // 9503
|
||
|
s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value ); // 9504
|
||
|
}; // 9505
|
||
|
// 9506
|
||
|
// Set traditional to true for jQuery <= 1.3.2 behavior. // 9507
|
||
|
if ( traditional === undefined ) { // 9508
|
||
|
traditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional; // 9509
|
||
|
} // 9510
|
||
|
// 9511
|
||
|
// If an array was passed in, assume that it is an array of form elements. // 9512
|
||
|
if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) { // 9513
|
||
|
// Serialize the form elements // 9514
|
||
|
jQuery.each( a, function() { // 9515
|
||
|
add( this.name, this.value ); // 9516
|
||
|
}); // 9517
|
||
|
// 9518
|
||
|
} else { // 9519
|
||
|
// If traditional, encode the "old" way (the way 1.3.2 or older // 9520
|
||
|
// did it), otherwise encode params recursively. // 9521
|
||
|
for ( prefix in a ) { // 9522
|
||
|
buildParams( prefix, a[ prefix ], traditional, add ); // 9523
|
||
|
} // 9524
|
||
|
} // 9525
|
||
|
// 9526
|
||
|
// Return the resulting serialization // 9527
|
||
|
return s.join( "&" ).replace( r20, "+" ); // 9528
|
||
|
}; // 9529
|
||
|
// 9530
|
||
|
jQuery.fn.extend({ // 9531
|
||
|
serialize: function() { // 9532
|
||
|
return jQuery.param( this.serializeArray() ); // 9533
|
||
|
}, // 9534
|
||
|
serializeArray: function() { // 9535
|
||
|
return this.map(function() { // 9536
|
||
|
// Can add propHook for "elements" to filter or add form elements // 9537
|
||
|
var elements = jQuery.prop( this, "elements" ); // 9538
|
||
|
return elements ? jQuery.makeArray( elements ) : this; // 9539
|
||
|
}) // 9540
|
||
|
.filter(function() { // 9541
|
||
|
var type = this.type; // 9542
|
||
|
// Use .is(":disabled") so that fieldset[disabled] works // 9543
|
||
|
return this.name && !jQuery( this ).is( ":disabled" ) && // 9544
|
||
|
rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) && // 9545
|
||
|
( this.checked || !rcheckableType.test( type ) ); // 9546
|
||
|
}) // 9547
|
||
|
.map(function( i, elem ) { // 9548
|
||
|
var val = jQuery( this ).val(); // 9549
|
||
|
// 9550
|
||
|
return val == null ? // 9551
|
||
|
null : // 9552
|
||
|
jQuery.isArray( val ) ? // 9553
|
||
|
jQuery.map( val, function( val ) { // 9554
|
||
|
return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; // 9555
|
||
|
}) : // 9556
|
||
|
{ name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; // 9557
|
||
|
}).get(); // 9558
|
||
|
} // 9559
|
||
|
}); // 9560
|
||
|
// 9561
|
||
|
// 9562
|
||
|
// Create the request object // 9563
|
||
|
// (This is still attached to ajaxSettings for backward compatibility) // 9564
|
||
|
jQuery.ajaxSettings.xhr = window.ActiveXObject !== undefined ? // 9565
|
||
|
// Support: IE6+ // 9566
|
||
|
function() { // 9567
|
||
|
// 9568
|
||
|
// XHR cannot access local files, always use ActiveX for that case // 9569
|
||
|
return !this.isLocal && // 9570
|
||
|
// 9571
|
||
|
// Support: IE7-8 // 9572
|
||
|
// oldIE XHR does not support non-RFC2616 methods (#13240) // 9573
|
||
|
// See http://msdn.microsoft.com/en-us/library/ie/ms536648(v=vs.85).aspx // 9574
|
||
|
// and http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9 // 9575
|
||
|
// Although this check for six methods instead of eight // 9576
|
||
|
// since IE also does not support "trace" and "connect" // 9577
|
||
|
/^(get|post|head|put|delete|options)$/i.test( this.type ) && // 9578
|
||
|
// 9579
|
||
|
createStandardXHR() || createActiveXHR(); // 9580
|
||
|
} : // 9581
|
||
|
// For all other browsers, use the standard XMLHttpRequest object // 9582
|
||
|
createStandardXHR; // 9583
|
||
|
// 9584
|
||
|
var xhrId = 0, // 9585
|
||
|
xhrCallbacks = {}, // 9586
|
||
|
xhrSupported = jQuery.ajaxSettings.xhr(); // 9587
|
||
|
// 9588
|
||
|
// Support: IE<10 // 9589
|
||
|
// Open requests must be manually aborted on unload (#5280) // 9590
|
||
|
// See https://support.microsoft.com/kb/2856746 for more info // 9591
|
||
|
if ( window.attachEvent ) { // 9592
|
||
|
window.attachEvent( "onunload", function() { // 9593
|
||
|
for ( var key in xhrCallbacks ) { // 9594
|
||
|
xhrCallbacks[ key ]( undefined, true ); // 9595
|
||
|
} // 9596
|
||
|
}); // 9597
|
||
|
} // 9598
|
||
|
// 9599
|
||
|
// Determine support properties // 9600
|
||
|
support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported ); // 9601
|
||
|
xhrSupported = support.ajax = !!xhrSupported; // 9602
|
||
|
// 9603
|
||
|
// Create transport if the browser can provide an xhr // 9604
|
||
|
if ( xhrSupported ) { // 9605
|
||
|
// 9606
|
||
|
jQuery.ajaxTransport(function( options ) { // 9607
|
||
|
// Cross domain only allowed if supported through XMLHttpRequest // 9608
|
||
|
if ( !options.crossDomain || support.cors ) { // 9609
|
||
|
// 9610
|
||
|
var callback; // 9611
|
||
|
// 9612
|
||
|
return { // 9613
|
||
|
send: function( headers, complete ) { // 9614
|
||
|
var i, // 9615
|
||
|
xhr = options.xhr(), // 9616
|
||
|
id = ++xhrId; // 9617
|
||
|
// 9618
|
||
|
// Open the socket // 9619
|
||
|
xhr.open( options.type, options.url, options.async, options.username, options.password ); // 9620
|
||
|
// 9621
|
||
|
// Apply custom fields if provided // 9622
|
||
|
if ( options.xhrFields ) { // 9623
|
||
|
for ( i in options.xhrFields ) { // 9624
|
||
|
xhr[ i ] = options.xhrFields[ i ]; // 9625
|
||
|
} // 9626
|
||
|
} // 9627
|
||
|
// 9628
|
||
|
// Override mime type if needed // 9629
|
||
|
if ( options.mimeType && xhr.overrideMimeType ) { // 9630
|
||
|
xhr.overrideMimeType( options.mimeType ); // 9631
|
||
|
} // 9632
|
||
|
// 9633
|
||
|
// X-Requested-With header // 9634
|
||
|
// For cross-domain requests, seeing as conditions for a preflight are // 9635
|
||
|
// akin to a jigsaw puzzle, we simply never set it to be sure. // 9636
|
||
|
// (it can always be set on a per-request basis or even using ajaxSetup) // 9637
|
||
|
// For same-domain requests, won't change header if already provided. // 9638
|
||
|
if ( !options.crossDomain && !headers["X-Requested-With"] ) { // 9639
|
||
|
headers["X-Requested-With"] = "XMLHttpRequest"; // 9640
|
||
|
} // 9641
|
||
|
// 9642
|
||
|
// Set headers // 9643
|
||
|
for ( i in headers ) { // 9644
|
||
|
// Support: IE<9 // 9645
|
||
|
// IE's ActiveXObject throws a 'Type Mismatch' exception when setting // 9646
|
||
|
// request header to a null-value. // 9647
|
||
|
// // 9648
|
||
|
// To keep consistent with other XHR implementations, cast the value // 9649
|
||
|
// to string and ignore `undefined`. // 9650
|
||
|
if ( headers[ i ] !== undefined ) { // 9651
|
||
|
xhr.setRequestHeader( i, headers[ i ] + "" ); // 9652
|
||
|
} // 9653
|
||
|
} // 9654
|
||
|
// 9655
|
||
|
// Do send the request // 9656
|
||
|
// This may raise an exception which is actually // 9657
|
||
|
// handled in jQuery.ajax (so no try/catch here) // 9658
|
||
|
xhr.send( ( options.hasContent && options.data ) || null ); // 9659
|
||
|
// 9660
|
||
|
// Listener // 9661
|
||
|
callback = function( _, isAbort ) { // 9662
|
||
|
var status, statusText, responses; // 9663
|
||
|
// 9664
|
||
|
// Was never called and is aborted or complete // 9665
|
||
|
if ( callback && ( isAbort || xhr.readyState === 4 ) ) { // 9666
|
||
|
// Clean up // 9667
|
||
|
delete xhrCallbacks[ id ]; // 9668
|
||
|
callback = undefined; // 9669
|
||
|
xhr.onreadystatechange = jQuery.noop; // 9670
|
||
|
// 9671
|
||
|
// Abort manually if needed // 9672
|
||
|
if ( isAbort ) { // 9673
|
||
|
if ( xhr.readyState !== 4 ) { // 9674
|
||
|
xhr.abort(); // 9675
|
||
|
} // 9676
|
||
|
} else { // 9677
|
||
|
responses = {}; // 9678
|
||
|
status = xhr.status; // 9679
|
||
|
// 9680
|
||
|
// Support: IE<10 // 9681
|
||
|
// Accessing binary-data responseText throws an exception // 9682
|
||
|
// (#11426) // 9683
|
||
|
if ( typeof xhr.responseText === "string" ) { // 9684
|
||
|
responses.text = xhr.responseText; // 9685
|
||
|
} // 9686
|
||
|
// 9687
|
||
|
// Firefox throws an exception when accessing // 9688
|
||
|
// statusText for faulty cross-domain requests // 9689
|
||
|
try { // 9690
|
||
|
statusText = xhr.statusText; // 9691
|
||
|
} catch( e ) { // 9692
|
||
|
// We normalize with Webkit giving an empty statusText // 9693
|
||
|
statusText = ""; // 9694
|
||
|
} // 9695
|
||
|
// 9696
|
||
|
// Filter status for non standard behaviors // 9697
|
||
|
// 9698
|
||
|
// If the request is local and we have data: assume a success // 9699
|
||
|
// (success with no data won't get notified, that's the best we // 9700
|
||
|
// can do given current implementations) // 9701
|
||
|
if ( !status && options.isLocal && !options.crossDomain ) { // 9702
|
||
|
status = responses.text ? 200 : 404; // 9703
|
||
|
// IE - #1450: sometimes returns 1223 when it should be 204 // 9704
|
||
|
} else if ( status === 1223 ) { // 9705
|
||
|
status = 204; // 9706
|
||
|
} // 9707
|
||
|
} // 9708
|
||
|
} // 9709
|
||
|
// 9710
|
||
|
// Call complete if needed // 9711
|
||
|
if ( responses ) { // 9712
|
||
|
complete( status, statusText, responses, xhr.getAllResponseHeaders() ); // 9713
|
||
|
} // 9714
|
||
|
}; // 9715
|
||
|
// 9716
|
||
|
if ( !options.async ) { // 9717
|
||
|
// if we're in sync mode we fire the callback // 9718
|
||
|
callback(); // 9719
|
||
|
} else if ( xhr.readyState === 4 ) { // 9720
|
||
|
// (IE6 & IE7) if it's in cache and has been // 9721
|
||
|
// retrieved directly we need to fire the callback // 9722
|
||
|
setTimeout( callback ); // 9723
|
||
|
} else { // 9724
|
||
|
// Add to the list of active xhr callbacks // 9725
|
||
|
xhr.onreadystatechange = xhrCallbacks[ id ] = callback; // 9726
|
||
|
} // 9727
|
||
|
}, // 9728
|
||
|
// 9729
|
||
|
abort: function() { // 9730
|
||
|
if ( callback ) { // 9731
|
||
|
callback( undefined, true ); // 9732
|
||
|
} // 9733
|
||
|
} // 9734
|
||
|
}; // 9735
|
||
|
} // 9736
|
||
|
}); // 9737
|
||
|
} // 9738
|
||
|
// 9739
|
||
|
// Functions to create xhrs // 9740
|
||
|
function createStandardXHR() { // 9741
|
||
|
try { // 9742
|
||
|
return new window.XMLHttpRequest(); // 9743
|
||
|
} catch( e ) {} // 9744
|
||
|
} // 9745
|
||
|
// 9746
|
||
|
function createActiveXHR() { // 9747
|
||
|
try { // 9748
|
||
|
return new window.ActiveXObject( "Microsoft.XMLHTTP" ); // 9749
|
||
|
} catch( e ) {} // 9750
|
||
|
} // 9751
|
||
|
// 9752
|
||
|
// 9753
|
||
|
// 9754
|
||
|
// 9755
|
||
|
// Install script dataType // 9756
|
||
|
jQuery.ajaxSetup({ // 9757
|
||
|
accepts: { // 9758
|
||
|
script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript" // 9759
|
||
|
}, // 9760
|
||
|
contents: { // 9761
|
||
|
script: /(?:java|ecma)script/ // 9762
|
||
|
}, // 9763
|
||
|
converters: { // 9764
|
||
|
"text script": function( text ) { // 9765
|
||
|
jQuery.globalEval( text ); // 9766
|
||
|
return text; // 9767
|
||
|
} // 9768
|
||
|
} // 9769
|
||
|
}); // 9770
|
||
|
// 9771
|
||
|
// Handle cache's special case and global // 9772
|
||
|
jQuery.ajaxPrefilter( "script", function( s ) { // 9773
|
||
|
if ( s.cache === undefined ) { // 9774
|
||
|
s.cache = false; // 9775
|
||
|
} // 9776
|
||
|
if ( s.crossDomain ) { // 9777
|
||
|
s.type = "GET"; // 9778
|
||
|
s.global = false; // 9779
|
||
|
} // 9780
|
||
|
}); // 9781
|
||
|
// 9782
|
||
|
// Bind script tag hack transport // 9783
|
||
|
jQuery.ajaxTransport( "script", function(s) { // 9784
|
||
|
// 9785
|
||
|
// This transport only deals with cross domain requests // 9786
|
||
|
if ( s.crossDomain ) { // 9787
|
||
|
// 9788
|
||
|
var script, // 9789
|
||
|
head = document.head || jQuery("head")[0] || document.documentElement; // 9790
|
||
|
// 9791
|
||
|
return { // 9792
|
||
|
// 9793
|
||
|
send: function( _, callback ) { // 9794
|
||
|
// 9795
|
||
|
script = document.createElement("script"); // 9796
|
||
|
// 9797
|
||
|
script.async = true; // 9798
|
||
|
// 9799
|
||
|
if ( s.scriptCharset ) { // 9800
|
||
|
script.charset = s.scriptCharset; // 9801
|
||
|
} // 9802
|
||
|
// 9803
|
||
|
script.src = s.url; // 9804
|
||
|
// 9805
|
||
|
// Attach handlers for all browsers // 9806
|
||
|
script.onload = script.onreadystatechange = function( _, isAbort ) { // 9807
|
||
|
// 9808
|
||
|
if ( isAbort || !script.readyState || /loaded|complete/.test( script.readyState ) ) { // 9809
|
||
|
// 9810
|
||
|
// Handle memory leak in IE // 9811
|
||
|
script.onload = script.onreadystatechange = null; // 9812
|
||
|
// 9813
|
||
|
// Remove the script // 9814
|
||
|
if ( script.parentNode ) { // 9815
|
||
|
script.parentNode.removeChild( script ); // 9816
|
||
|
} // 9817
|
||
|
// 9818
|
||
|
// Dereference the script // 9819
|
||
|
script = null; // 9820
|
||
|
// 9821
|
||
|
// Callback if not abort // 9822
|
||
|
if ( !isAbort ) { // 9823
|
||
|
callback( 200, "success" ); // 9824
|
||
|
} // 9825
|
||
|
} // 9826
|
||
|
}; // 9827
|
||
|
// 9828
|
||
|
// Circumvent IE6 bugs with base elements (#2709 and #4378) by prepending // 9829
|
||
|
// Use native DOM manipulation to avoid our domManip AJAX trickery // 9830
|
||
|
head.insertBefore( script, head.firstChild ); // 9831
|
||
|
}, // 9832
|
||
|
// 9833
|
||
|
abort: function() { // 9834
|
||
|
if ( script ) { // 9835
|
||
|
script.onload( undefined, true ); // 9836
|
||
|
} // 9837
|
||
|
} // 9838
|
||
|
}; // 9839
|
||
|
} // 9840
|
||
|
}); // 9841
|
||
|
// 9842
|
||
|
// 9843
|
||
|
// 9844
|
||
|
// 9845
|
||
|
var oldCallbacks = [], // 9846
|
||
|
rjsonp = /(=)\?(?=&|$)|\?\?/; // 9847
|
||
|
// 9848
|
||
|
// Default jsonp settings // 9849
|
||
|
jQuery.ajaxSetup({ // 9850
|
||
|
jsonp: "callback", // 9851
|
||
|
jsonpCallback: function() { // 9852
|
||
|
var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( nonce++ ) ); // 9853
|
||
|
this[ callback ] = true; // 9854
|
||
|
return callback; // 9855
|
||
|
} // 9856
|
||
|
}); // 9857
|
||
|
// 9858
|
||
|
// Detect, normalize options and install callbacks for jsonp requests // 9859
|
||
|
jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) { // 9860
|
||
|
// 9861
|
||
|
var callbackName, overwritten, responseContainer, // 9862
|
||
|
jsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ? // 9863
|
||
|
"url" : // 9864
|
||
|
typeof s.data === "string" && !( s.contentType || "" ).indexOf("application/x-www-form-urlencoded") && rjsonp.test( s.data ) && "data"
|
||
|
); // 9866
|
||
|
// 9867
|
||
|
// Handle iff the expected data type is "jsonp" or we have a parameter to set // 9868
|
||
|
if ( jsonProp || s.dataTypes[ 0 ] === "jsonp" ) { // 9869
|
||
|
// 9870
|
||
|
// Get callback name, remembering preexisting value associated with it // 9871
|
||
|
callbackName = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ? // 9872
|
||
|
s.jsonpCallback() : // 9873
|
||
|
s.jsonpCallback; // 9874
|
||
|
// 9875
|
||
|
// Insert callback into url or form data // 9876
|
||
|
if ( jsonProp ) { // 9877
|
||
|
s[ jsonProp ] = s[ jsonProp ].replace( rjsonp, "$1" + callbackName ); // 9878
|
||
|
} else if ( s.jsonp !== false ) { // 9879
|
||
|
s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName; // 9880
|
||
|
} // 9881
|
||
|
// 9882
|
||
|
// Use data converter to retrieve json after script execution // 9883
|
||
|
s.converters["script json"] = function() { // 9884
|
||
|
if ( !responseContainer ) { // 9885
|
||
|
jQuery.error( callbackName + " was not called" ); // 9886
|
||
|
} // 9887
|
||
|
return responseContainer[ 0 ]; // 9888
|
||
|
}; // 9889
|
||
|
// 9890
|
||
|
// force json dataType // 9891
|
||
|
s.dataTypes[ 0 ] = "json"; // 9892
|
||
|
// 9893
|
||
|
// Install callback // 9894
|
||
|
overwritten = window[ callbackName ]; // 9895
|
||
|
window[ callbackName ] = function() { // 9896
|
||
|
responseContainer = arguments; // 9897
|
||
|
}; // 9898
|
||
|
// 9899
|
||
|
// Clean-up function (fires after converters) // 9900
|
||
|
jqXHR.always(function() { // 9901
|
||
|
// Restore preexisting value // 9902
|
||
|
window[ callbackName ] = overwritten; // 9903
|
||
|
// 9904
|
||
|
// Save back as free // 9905
|
||
|
if ( s[ callbackName ] ) { // 9906
|
||
|
// make sure that re-using the options doesn't screw things around // 9907
|
||
|
s.jsonpCallback = originalSettings.jsonpCallback; // 9908
|
||
|
// 9909
|
||
|
// save the callback name for future use // 9910
|
||
|
oldCallbacks.push( callbackName ); // 9911
|
||
|
} // 9912
|
||
|
// 9913
|
||
|
// Call if it was a function and we have a response // 9914
|
||
|
if ( responseContainer && jQuery.isFunction( overwritten ) ) { // 9915
|
||
|
overwritten( responseContainer[ 0 ] ); // 9916
|
||
|
} // 9917
|
||
|
// 9918
|
||
|
responseContainer = overwritten = undefined; // 9919
|
||
|
}); // 9920
|
||
|
// 9921
|
||
|
// Delegate to script // 9922
|
||
|
return "script"; // 9923
|
||
|
} // 9924
|
||
|
}); // 9925
|
||
|
// 9926
|
||
|
// 9927
|
||
|
// 9928
|
||
|
// 9929
|
||
|
// data: string of html // 9930
|
||
|
// context (optional): If specified, the fragment will be created in this context, defaults to document // 9931
|
||
|
// keepScripts (optional): If true, will include scripts passed in the html string // 9932
|
||
|
jQuery.parseHTML = function( data, context, keepScripts ) { // 9933
|
||
|
if ( !data || typeof data !== "string" ) { // 9934
|
||
|
return null; // 9935
|
||
|
} // 9936
|
||
|
if ( typeof context === "boolean" ) { // 9937
|
||
|
keepScripts = context; // 9938
|
||
|
context = false; // 9939
|
||
|
} // 9940
|
||
|
context = context || document; // 9941
|
||
|
// 9942
|
||
|
var parsed = rsingleTag.exec( data ), // 9943
|
||
|
scripts = !keepScripts && []; // 9944
|
||
|
// 9945
|
||
|
// Single tag // 9946
|
||
|
if ( parsed ) { // 9947
|
||
|
return [ context.createElement( parsed[1] ) ]; // 9948
|
||
|
} // 9949
|
||
|
// 9950
|
||
|
parsed = jQuery.buildFragment( [ data ], context, scripts ); // 9951
|
||
|
// 9952
|
||
|
if ( scripts && scripts.length ) { // 9953
|
||
|
jQuery( scripts ).remove(); // 9954
|
||
|
} // 9955
|
||
|
// 9956
|
||
|
return jQuery.merge( [], parsed.childNodes ); // 9957
|
||
|
}; // 9958
|
||
|
// 9959
|
||
|
// 9960
|
||
|
// Keep a copy of the old load method // 9961
|
||
|
var _load = jQuery.fn.load; // 9962
|
||
|
// 9963
|
||
|
/** // 9964
|
||
|
* Load a url into a page // 9965
|
||
|
*/ // 9966
|
||
|
jQuery.fn.load = function( url, params, callback ) { // 9967
|
||
|
if ( typeof url !== "string" && _load ) { // 9968
|
||
|
return _load.apply( this, arguments ); // 9969
|
||
|
} // 9970
|
||
|
// 9971
|
||
|
var selector, response, type, // 9972
|
||
|
self = this, // 9973
|
||
|
off = url.indexOf(" "); // 9974
|
||
|
// 9975
|
||
|
if ( off >= 0 ) { // 9976
|
||
|
selector = jQuery.trim( url.slice( off, url.length ) ); // 9977
|
||
|
url = url.slice( 0, off ); // 9978
|
||
|
} // 9979
|
||
|
// 9980
|
||
|
// If it's a function // 9981
|
||
|
if ( jQuery.isFunction( params ) ) { // 9982
|
||
|
// 9983
|
||
|
// We assume that it's the callback // 9984
|
||
|
callback = params; // 9985
|
||
|
params = undefined; // 9986
|
||
|
// 9987
|
||
|
// Otherwise, build a param string // 9988
|
||
|
} else if ( params && typeof params === "object" ) { // 9989
|
||
|
type = "POST"; // 9990
|
||
|
} // 9991
|
||
|
// 9992
|
||
|
// If we have elements to modify, make the request // 9993
|
||
|
if ( self.length > 0 ) { // 9994
|
||
|
jQuery.ajax({ // 9995
|
||
|
url: url, // 9996
|
||
|
// 9997
|
||
|
// if "type" variable is undefined, then "GET" method will be used // 9998
|
||
|
type: type, // 9999
|
||
|
dataType: "html", // 10000
|
||
|
data: params // 10001
|
||
|
}).done(function( responseText ) { // 10002
|
||
|
// 10003
|
||
|
// Save response for use in complete callback // 10004
|
||
|
response = arguments; // 10005
|
||
|
// 10006
|
||
|
self.html( selector ? // 10007
|
||
|
// 10008
|
||
|
// If a selector was specified, locate the right elements in a dummy div // 10009
|
||
|
// Exclude scripts to avoid IE 'Permission Denied' errors // 10010
|
||
|
jQuery("<div>").append( jQuery.parseHTML( responseText ) ).find( selector ) : // 10011
|
||
|
// 10012
|
||
|
// Otherwise use the full result // 10013
|
||
|
responseText ); // 10014
|
||
|
// 10015
|
||
|
}).complete( callback && function( jqXHR, status ) { // 10016
|
||
|
self.each( callback, response || [ jqXHR.responseText, status, jqXHR ] ); // 10017
|
||
|
}); // 10018
|
||
|
} // 10019
|
||
|
// 10020
|
||
|
return this; // 10021
|
||
|
}; // 10022
|
||
|
// 10023
|
||
|
// 10024
|
||
|
// 10025
|
||
|
// 10026
|
||
|
// Attach a bunch of functions for handling common AJAX events // 10027
|
||
|
jQuery.each( [ "ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend" ], function( i, type ) {
|
||
|
jQuery.fn[ type ] = function( fn ) { // 10029
|
||
|
return this.on( type, fn ); // 10030
|
||
|
}; // 10031
|
||
|
}); // 10032
|
||
|
// 10033
|
||
|
// 10034
|
||
|
// 10035
|
||
|
// 10036
|
||
|
jQuery.expr.filters.animated = function( elem ) { // 10037
|
||
|
return jQuery.grep(jQuery.timers, function( fn ) { // 10038
|
||
|
return elem === fn.elem; // 10039
|
||
|
}).length; // 10040
|
||
|
}; // 10041
|
||
|
// 10042
|
||
|
// 10043
|
||
|
// 10044
|
||
|
// 10045
|
||
|
// 10046
|
||
|
var docElem = window.document.documentElement; // 10047
|
||
|
// 10048
|
||
|
/** // 10049
|
||
|
* Gets a window from an element // 10050
|
||
|
*/ // 10051
|
||
|
function getWindow( elem ) { // 10052
|
||
|
return jQuery.isWindow( elem ) ? // 10053
|
||
|
elem : // 10054
|
||
|
elem.nodeType === 9 ? // 10055
|
||
|
elem.defaultView || elem.parentWindow : // 10056
|
||
|
false; // 10057
|
||
|
} // 10058
|
||
|
// 10059
|
||
|
jQuery.offset = { // 10060
|
||
|
setOffset: function( elem, options, i ) { // 10061
|
||
|
var curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition, // 10062
|
||
|
position = jQuery.css( elem, "position" ), // 10063
|
||
|
curElem = jQuery( elem ), // 10064
|
||
|
props = {}; // 10065
|
||
|
// 10066
|
||
|
// set position first, in-case top/left are set even on static elem // 10067
|
||
|
if ( position === "static" ) { // 10068
|
||
|
elem.style.position = "relative"; // 10069
|
||
|
} // 10070
|
||
|
// 10071
|
||
|
curOffset = curElem.offset(); // 10072
|
||
|
curCSSTop = jQuery.css( elem, "top" ); // 10073
|
||
|
curCSSLeft = jQuery.css( elem, "left" ); // 10074
|
||
|
calculatePosition = ( position === "absolute" || position === "fixed" ) && // 10075
|
||
|
jQuery.inArray("auto", [ curCSSTop, curCSSLeft ] ) > -1; // 10076
|
||
|
// 10077
|
||
|
// need to be able to calculate position if either top or left is auto and position is either absolute or fixed // 10078
|
||
|
if ( calculatePosition ) { // 10079
|
||
|
curPosition = curElem.position(); // 10080
|
||
|
curTop = curPosition.top; // 10081
|
||
|
curLeft = curPosition.left; // 10082
|
||
|
} else { // 10083
|
||
|
curTop = parseFloat( curCSSTop ) || 0; // 10084
|
||
|
curLeft = parseFloat( curCSSLeft ) || 0; // 10085
|
||
|
} // 10086
|
||
|
// 10087
|
||
|
if ( jQuery.isFunction( options ) ) { // 10088
|
||
|
options = options.call( elem, i, curOffset ); // 10089
|
||
|
} // 10090
|
||
|
// 10091
|
||
|
if ( options.top != null ) { // 10092
|
||
|
props.top = ( options.top - curOffset.top ) + curTop; // 10093
|
||
|
} // 10094
|
||
|
if ( options.left != null ) { // 10095
|
||
|
props.left = ( options.left - curOffset.left ) + curLeft; // 10096
|
||
|
} // 10097
|
||
|
// 10098
|
||
|
if ( "using" in options ) { // 10099
|
||
|
options.using.call( elem, props ); // 10100
|
||
|
} else { // 10101
|
||
|
curElem.css( props ); // 10102
|
||
|
} // 10103
|
||
|
} // 10104
|
||
|
}; // 10105
|
||
|
// 10106
|
||
|
jQuery.fn.extend({ // 10107
|
||
|
offset: function( options ) { // 10108
|
||
|
if ( arguments.length ) { // 10109
|
||
|
return options === undefined ? // 10110
|
||
|
this : // 10111
|
||
|
this.each(function( i ) { // 10112
|
||
|
jQuery.offset.setOffset( this, options, i ); // 10113
|
||
|
}); // 10114
|
||
|
} // 10115
|
||
|
// 10116
|
||
|
var docElem, win, // 10117
|
||
|
box = { top: 0, left: 0 }, // 10118
|
||
|
elem = this[ 0 ], // 10119
|
||
|
doc = elem && elem.ownerDocument; // 10120
|
||
|
// 10121
|
||
|
if ( !doc ) { // 10122
|
||
|
return; // 10123
|
||
|
} // 10124
|
||
|
// 10125
|
||
|
docElem = doc.documentElement; // 10126
|
||
|
// 10127
|
||
|
// Make sure it's not a disconnected DOM node // 10128
|
||
|
if ( !jQuery.contains( docElem, elem ) ) { // 10129
|
||
|
return box; // 10130
|
||
|
} // 10131
|
||
|
// 10132
|
||
|
// If we don't have gBCR, just use 0,0 rather than error // 10133
|
||
|
// BlackBerry 5, iOS 3 (original iPhone) // 10134
|
||
|
if ( typeof elem.getBoundingClientRect !== strundefined ) { // 10135
|
||
|
box = elem.getBoundingClientRect(); // 10136
|
||
|
} // 10137
|
||
|
win = getWindow( doc ); // 10138
|
||
|
return { // 10139
|
||
|
top: box.top + ( win.pageYOffset || docElem.scrollTop ) - ( docElem.clientTop || 0 ), // 10140
|
||
|
left: box.left + ( win.pageXOffset || docElem.scrollLeft ) - ( docElem.clientLeft || 0 ) // 10141
|
||
|
}; // 10142
|
||
|
}, // 10143
|
||
|
// 10144
|
||
|
position: function() { // 10145
|
||
|
if ( !this[ 0 ] ) { // 10146
|
||
|
return; // 10147
|
||
|
} // 10148
|
||
|
// 10149
|
||
|
var offsetParent, offset, // 10150
|
||
|
parentOffset = { top: 0, left: 0 }, // 10151
|
||
|
elem = this[ 0 ]; // 10152
|
||
|
// 10153
|
||
|
// fixed elements are offset from window (parentOffset = {top:0, left: 0}, because it is its only offset parent // 10154
|
||
|
if ( jQuery.css( elem, "position" ) === "fixed" ) { // 10155
|
||
|
// we assume that getBoundingClientRect is available when computed position is fixed // 10156
|
||
|
offset = elem.getBoundingClientRect(); // 10157
|
||
|
} else { // 10158
|
||
|
// Get *real* offsetParent // 10159
|
||
|
offsetParent = this.offsetParent(); // 10160
|
||
|
// 10161
|
||
|
// Get correct offsets // 10162
|
||
|
offset = this.offset(); // 10163
|
||
|
if ( !jQuery.nodeName( offsetParent[ 0 ], "html" ) ) { // 10164
|
||
|
parentOffset = offsetParent.offset(); // 10165
|
||
|
} // 10166
|
||
|
// 10167
|
||
|
// Add offsetParent borders // 10168
|
||
|
parentOffset.top += jQuery.css( offsetParent[ 0 ], "borderTopWidth", true ); // 10169
|
||
|
parentOffset.left += jQuery.css( offsetParent[ 0 ], "borderLeftWidth", true ); // 10170
|
||
|
} // 10171
|
||
|
// 10172
|
||
|
// Subtract parent offsets and element margins // 10173
|
||
|
// note: when an element has margin: auto the offsetLeft and marginLeft // 10174
|
||
|
// are the same in Safari causing offset.left to incorrectly be 0 // 10175
|
||
|
return { // 10176
|
||
|
top: offset.top - parentOffset.top - jQuery.css( elem, "marginTop", true ), // 10177
|
||
|
left: offset.left - parentOffset.left - jQuery.css( elem, "marginLeft", true) // 10178
|
||
|
}; // 10179
|
||
|
}, // 10180
|
||
|
// 10181
|
||
|
offsetParent: function() { // 10182
|
||
|
return this.map(function() { // 10183
|
||
|
var offsetParent = this.offsetParent || docElem; // 10184
|
||
|
// 10185
|
||
|
while ( offsetParent && ( !jQuery.nodeName( offsetParent, "html" ) && jQuery.css( offsetParent, "position" ) === "static" ) ) {
|
||
|
offsetParent = offsetParent.offsetParent; // 10187
|
||
|
} // 10188
|
||
|
return offsetParent || docElem; // 10189
|
||
|
}); // 10190
|
||
|
} // 10191
|
||
|
}); // 10192
|
||
|
// 10193
|
||
|
// Create scrollLeft and scrollTop methods // 10194
|
||
|
jQuery.each( { scrollLeft: "pageXOffset", scrollTop: "pageYOffset" }, function( method, prop ) { // 10195
|
||
|
var top = /Y/.test( prop ); // 10196
|
||
|
// 10197
|
||
|
jQuery.fn[ method ] = function( val ) { // 10198
|
||
|
return access( this, function( elem, method, val ) { // 10199
|
||
|
var win = getWindow( elem ); // 10200
|
||
|
// 10201
|
||
|
if ( val === undefined ) { // 10202
|
||
|
return win ? (prop in win) ? win[ prop ] : // 10203
|
||
|
win.document.documentElement[ method ] : // 10204
|
||
|
elem[ method ]; // 10205
|
||
|
} // 10206
|
||
|
// 10207
|
||
|
if ( win ) { // 10208
|
||
|
win.scrollTo( // 10209
|
||
|
!top ? val : jQuery( win ).scrollLeft(), // 10210
|
||
|
top ? val : jQuery( win ).scrollTop() // 10211
|
||
|
); // 10212
|
||
|
// 10213
|
||
|
} else { // 10214
|
||
|
elem[ method ] = val; // 10215
|
||
|
} // 10216
|
||
|
}, method, val, arguments.length, null ); // 10217
|
||
|
}; // 10218
|
||
|
}); // 10219
|
||
|
// 10220
|
||
|
// Add the top/left cssHooks using jQuery.fn.position // 10221
|
||
|
// Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084 // 10222
|
||
|
// getComputedStyle returns percent when specified for top/left/bottom/right // 10223
|
||
|
// rather than make the css module depend on the offset module, we just check for it here // 10224
|
||
|
jQuery.each( [ "top", "left" ], function( i, prop ) { // 10225
|
||
|
jQuery.cssHooks[ prop ] = addGetHookIf( support.pixelPosition, // 10226
|
||
|
function( elem, computed ) { // 10227
|
||
|
if ( computed ) { // 10228
|
||
|
computed = curCSS( elem, prop ); // 10229
|
||
|
// if curCSS returns percentage, fallback to offset // 10230
|
||
|
return rnumnonpx.test( computed ) ? // 10231
|
||
|
jQuery( elem ).position()[ prop ] + "px" : // 10232
|
||
|
computed; // 10233
|
||
|
} // 10234
|
||
|
} // 10235
|
||
|
); // 10236
|
||
|
}); // 10237
|
||
|
// 10238
|
||
|
// 10239
|
||
|
// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods // 10240
|
||
|
jQuery.each( { Height: "height", Width: "width" }, function( name, type ) { // 10241
|
||
|
jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name }, function( defaultExtra, funcName ) { // 10242
|
||
|
// margin is only for outerHeight, outerWidth // 10243
|
||
|
jQuery.fn[ funcName ] = function( margin, value ) { // 10244
|
||
|
var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ), // 10245
|
||
|
extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" ); // 10246
|
||
|
// 10247
|
||
|
return access( this, function( elem, type, value ) { // 10248
|
||
|
var doc; // 10249
|
||
|
// 10250
|
||
|
if ( jQuery.isWindow( elem ) ) { // 10251
|
||
|
// As of 5/8/2012 this will yield incorrect results for Mobile Safari, but there // 10252
|
||
|
// isn't a whole lot we can do. See pull request at this URL for discussion: // 10253
|
||
|
// https://github.com/jquery/jquery/pull/764 // 10254
|
||
|
return elem.document.documentElement[ "client" + name ]; // 10255
|
||
|
} // 10256
|
||
|
// 10257
|
||
|
// Get document width or height // 10258
|
||
|
if ( elem.nodeType === 9 ) { // 10259
|
||
|
doc = elem.documentElement; // 10260
|
||
|
// 10261
|
||
|
// Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height], whichever is greatest // 10262
|
||
|
// unfortunately, this causes bug #3838 in IE6/8 only, but there is currently no good, small way to fix it. // 10263
|
||
|
return Math.max( // 10264
|
||
|
elem.body[ "scroll" + name ], doc[ "scroll" + name ], // 10265
|
||
|
elem.body[ "offset" + name ], doc[ "offset" + name ], // 10266
|
||
|
doc[ "client" + name ] // 10267
|
||
|
); // 10268
|
||
|
} // 10269
|
||
|
// 10270
|
||
|
return value === undefined ? // 10271
|
||
|
// Get width or height on the element, requesting but not forcing parseFloat // 10272
|
||
|
jQuery.css( elem, type, extra ) : // 10273
|
||
|
// 10274
|
||
|
// Set width or height on the element // 10275
|
||
|
jQuery.style( elem, type, value, extra ); // 10276
|
||
|
}, type, chainable ? margin : undefined, chainable, null ); // 10277
|
||
|
}; // 10278
|
||
|
}); // 10279
|
||
|
}); // 10280
|
||
|
// 10281
|
||
|
// 10282
|
||
|
// The number of elements contained in the matched element set // 10283
|
||
|
jQuery.fn.size = function() { // 10284
|
||
|
return this.length; // 10285
|
||
|
}; // 10286
|
||
|
// 10287
|
||
|
jQuery.fn.andSelf = jQuery.fn.addBack; // 10288
|
||
|
// 10289
|
||
|
// 10290
|
||
|
// 10291
|
||
|
// 10292
|
||
|
// Register as a named AMD module, since jQuery can be concatenated with other // 10293
|
||
|
// files that may use define, but not via a proper concatenation script that // 10294
|
||
|
// understands anonymous AMD modules. A named AMD is safest and most robust // 10295
|
||
|
// way to register. Lowercase jquery is used because AMD module names are // 10296
|
||
|
// derived from file names, and jQuery is normally delivered in a lowercase // 10297
|
||
|
// file name. Do this after creating the global so that if an AMD module wants // 10298
|
||
|
// to call noConflict to hide this version of jQuery, it will work. // 10299
|
||
|
// 10300
|
||
|
// Note that for maximum portability, libraries that are not jQuery should // 10301
|
||
|
// declare themselves as anonymous modules, and avoid setting a global if an // 10302
|
||
|
// AMD loader is present. jQuery is a special case. For more information, see // 10303
|
||
|
// https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries#wiki-anon // 10304
|
||
|
// 10305
|
||
|
if ( typeof define === "function" && define.amd ) { // 10306
|
||
|
define( "jquery", [], function() { // 10307
|
||
|
return jQuery; // 10308
|
||
|
}); // 10309
|
||
|
} // 10310
|
||
|
// 10311
|
||
|
// 10312
|
||
|
// 10313
|
||
|
// 10314
|
||
|
var // 10315
|
||
|
// Map over jQuery in case of overwrite // 10316
|
||
|
_jQuery = window.jQuery, // 10317
|
||
|
// 10318
|
||
|
// Map over the $ in case of overwrite // 10319
|
||
|
_$ = window.$; // 10320
|
||
|
// 10321
|
||
|
jQuery.noConflict = function( deep ) { // 10322
|
||
|
if ( window.$ === jQuery ) { // 10323
|
||
|
window.$ = _$; // 10324
|
||
|
} // 10325
|
||
|
// 10326
|
||
|
if ( deep && window.jQuery === jQuery ) { // 10327
|
||
|
window.jQuery = _jQuery; // 10328
|
||
|
} // 10329
|
||
|
// 10330
|
||
|
return jQuery; // 10331
|
||
|
}; // 10332
|
||
|
// 10333
|
||
|
// Expose jQuery and $ identifiers, even in // 10334
|
||
|
// AMD (#7102#comment:10, https://github.com/jquery/jquery/pull/557) // 10335
|
||
|
// and CommonJS for browser emulators (#13566) // 10336
|
||
|
if ( typeof noGlobal === strundefined ) { // 10337
|
||
|
window.jQuery = window.$ = jQuery; // 10338
|
||
|
} // 10339
|
||
|
// 10340
|
||
|
// 10341
|
||
|
// 10342
|
||
|
// 10343
|
||
|
return jQuery; // 10344
|
||
|
// 10345
|
||
|
})); // 10346
|
||
|
// 10347
|
||
|
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||
|
|
||
|
}).call(this);
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
(function () {
|
||
|
|
||
|
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||
|
// //
|
||
|
// packages/jquery/post.js //
|
||
|
// //
|
||
|
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||
|
//
|
||
|
// Put jQuery and $ in our exported package-scope variables and remove window.$. // 1
|
||
|
// (Sadly, we don't call noConflict(true), which would also remove // 2
|
||
|
// window.jQuery, because bootstrap very specifically relies on window.jQuery.) // 3
|
||
|
$ = jQuery = window.jQuery.noConflict(); // 4
|
||
|
// 5
|
||
|
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||
|
|
||
|
}).call(this);
|
||
|
|
||
|
|
||
|
/* Exports */
|
||
|
if (typeof Package === 'undefined') Package = {};
|
||
|
Package.jquery = {
|
||
|
$: $,
|
||
|
jQuery: jQuery
|
||
|
};
|
||
|
|
||
|
})();
|