1 | (function(modules) {
|
2 |
|
3 | var installedModules = {};
|
4 |
|
5 |
|
6 | function __webpack_require__(moduleId) {
|
7 |
|
8 |
|
9 | if(installedModules[moduleId])
|
10 | return installedModules[moduleId].exports;
|
11 |
|
12 |
|
13 | var module = installedModules[moduleId] = {
|
14 | i: moduleId,
|
15 | l: false,
|
16 | exports: {}
|
17 | };
|
18 |
|
19 |
|
20 | modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
21 |
|
22 |
|
23 | module.l = true;
|
24 |
|
25 |
|
26 | return module.exports;
|
27 | }
|
28 |
|
29 |
|
30 |
|
31 | __webpack_require__.m = modules;
|
32 |
|
33 |
|
34 | __webpack_require__.c = installedModules;
|
35 |
|
36 |
|
37 | __webpack_require__.i = function(value) { return value; };
|
38 |
|
39 |
|
40 | __webpack_require__.d = function(exports, name, getter) {
|
41 | if(!__webpack_require__.o(exports, name)) {
|
42 | Object.defineProperty(exports, name, {
|
43 | configurable: false,
|
44 | enumerable: true,
|
45 | get: getter
|
46 | /******/ });
|
47 | /******/ }
|
48 | /******/ };
|
49 | /******/
|
50 | /******/ // getDefaultExport function for compatibility with non-harmony modules
|
51 | /******/ __webpack_require__.n = function(module) {
|
52 | var getter = module && module.__esModule ?
|
53 | function getDefault() { return module['default']; } :
|
54 | function getModuleExports() { return module; };
|
55 | __webpack_require__.d(getter, 'a', getter);
|
56 | return getter;
|
57 | };
|
58 |
|
59 |
|
60 | __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
61 |
|
62 |
|
63 | __webpack_require__.p = "";
|
64 |
|
65 |
|
66 | return __webpack_require__(__webpack_require__.s = 1);
|
67 | })
|
68 |
|
69 | ([
|
70 |
|
71 | (function(module, exports, __webpack_require__) {
|
72 |
|
73 | var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; |
74 |
|
75 |
|
76 |
|
77 |
|
78 |
|
79 |
|
80 |
|
81 |
|
82 |
|
83 |
|
84 |
|
85 |
|
86 | ( function( global, factory ) {
|
87 |
|
88 | "use strict";
|
89 |
|
90 | if ( typeof module === "object" && typeof module.exports === "object" ) {
|
91 |
|
92 |
|
93 |
|
94 |
|
95 |
|
96 |
|
97 |
|
98 |
|
99 | module.exports = global.document ?
|
100 | factory( global, true ) :
|
101 | function( w ) {
|
102 | if ( !w.document ) {
|
103 | throw new Error( "jQuery requires a window with a document" );
|
104 | }
|
105 | return factory( w );
|
106 | };
|
107 | } else {
|
108 | factory( global );
|
109 | }
|
110 |
|
111 |
|
112 | } )( typeof window !== "undefined" ? window : this, function( window, noGlobal ) {
|
113 |
|
114 |
|
115 |
|
116 |
|
117 |
|
118 | "use strict";
|
119 |
|
120 | var arr = [];
|
121 |
|
122 | var document = window.document;
|
123 |
|
124 | var getProto = Object.getPrototypeOf;
|
125 |
|
126 | var slice = arr.slice;
|
127 |
|
128 | var concat = arr.concat;
|
129 |
|
130 | var push = arr.push;
|
131 |
|
132 | var indexOf = arr.indexOf;
|
133 |
|
134 | var class2type = {};
|
135 |
|
136 | var toString = class2type.toString;
|
137 |
|
138 | var hasOwn = class2type.hasOwnProperty;
|
139 |
|
140 | var fnToString = hasOwn.toString;
|
141 |
|
142 | var ObjectFunctionString = fnToString.call( Object );
|
143 |
|
144 | var support = {};
|
145 |
|
146 |
|
147 |
|
148 | function DOMEval( code, doc ) {
|
149 | doc = doc || document;
|
150 |
|
151 | var script = doc.createElement( "script" );
|
152 |
|
153 | script.text = code;
|
154 | doc.head.appendChild( script ).parentNode.removeChild( script );
|
155 | }
|
156 |
|
157 |
|
158 |
|
159 |
|
160 |
|
161 |
|
162 | var
|
163 | version = "3.2.1",
|
164 |
|
165 |
|
166 | jQuery = function( selector, context ) {
|
167 |
|
168 |
|
169 |
|
170 | return new jQuery.fn.init( selector, context );
|
171 | },
|
172 |
|
173 |
|
174 |
|
175 | rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
|
176 |
|
177 |
|
178 | rmsPrefix = /^-ms-/,
|
179 | rdashAlpha = /-([a-z])/g,
|
180 |
|
181 |
|
182 | fcamelCase = function( all, letter ) {
|
183 | return letter.toUpperCase();
|
184 | };
|
185 |
|
186 | jQuery.fn = jQuery.prototype = {
|
187 |
|
188 |
|
189 | jquery: version,
|
190 |
|
191 | constructor: jQuery,
|
192 |
|
193 | // The default length of a jQuery object is 0
|
194 | length: 0,
|
195 |
|
196 | toArray: function() {
|
197 | return slice.call( this );
|
198 | },
|
199 |
|
200 |
|
201 |
|
202 | get: function( num ) {
|
203 |
|
204 |
|
205 | if ( num == null ) {
|
206 | return slice.call( this );
|
207 | }
|
208 |
|
209 |
|
210 | return num < 0 ? this[ num + this.length ] : this[ num ];
|
211 | },
|
212 |
|
213 |
|
214 |
|
215 | pushStack: function( elems ) {
|
216 |
|
217 |
|
218 | var ret = jQuery.merge( this.constructor(), elems );
|
219 |
|
220 |
|
221 | ret.prevObject = this;
|
222 |
|
223 |
|
224 | return ret;
|
225 | },
|
226 |
|
227 |
|
228 | each: function( callback ) {
|
229 | return jQuery.each( this, callback );
|
230 | },
|
231 |
|
232 | map: function( callback ) {
|
233 | return this.pushStack( jQuery.map( this, function( elem, i ) {
|
234 | return callback.call( elem, i, elem );
|
235 | } ) );
|
236 | },
|
237 |
|
238 | slice: function() {
|
239 | return this.pushStack( slice.apply( this, arguments ) );
|
240 | },
|
241 |
|
242 | first: function() {
|
243 | return this.eq( 0 );
|
244 | },
|
245 |
|
246 | last: function() {
|
247 | return this.eq( -1 );
|
248 | },
|
249 |
|
250 | eq: function( i ) {
|
251 | var len = this.length,
|
252 | j = +i + ( i < 0 ? len : 0 );
|
253 | return this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] );
|
254 | },
|
255 |
|
256 | end: function() {
|
257 | return this.prevObject || this.constructor();
|
258 | },
|
259 |
|
260 |
|
261 |
|
262 | push: push,
|
263 | sort: arr.sort,
|
264 | splice: arr.splice
|
265 | };
|
266 |
|
267 | jQuery.extend = jQuery.fn.extend = function() {
|
268 | var options, name, src, copy, copyIsArray, clone,
|
269 | target = arguments[ 0 ] || {},
|
270 | i = 1,
|
271 | length = arguments.length,
|
272 | deep = false;
|
273 |
|
274 |
|
275 | if ( typeof target === "boolean" ) {
|
276 | deep = target;
|
277 |
|
278 |
|
279 | target = arguments[ i ] || {};
|
280 | i++;
|
281 | }
|
282 |
|
283 |
|
284 | if ( typeof target !== "object" && !jQuery.isFunction( target ) ) {
|
285 | target = {};
|
286 | }
|
287 |
|
288 |
|
289 | if ( i === length ) {
|
290 | target = this;
|
291 | i--;
|
292 | }
|
293 |
|
294 | for ( ; i < length; i++ ) {
|
295 |
|
296 |
|
297 | if ( ( options = arguments[ i ] ) != null ) {
|
298 |
|
299 |
|
300 | for ( name in options ) {
|
301 | src = target[ name ];
|
302 | copy = options[ name ];
|
303 |
|
304 |
|
305 | if ( target === copy ) {
|
306 | continue;
|
307 | }
|
308 |
|
309 |
|
310 | if ( deep && copy && ( jQuery.isPlainObject( copy ) ||
|
311 | ( copyIsArray = Array.isArray( copy ) ) ) ) {
|
312 |
|
313 | if ( copyIsArray ) {
|
314 | copyIsArray = false;
|
315 | clone = src && Array.isArray( src ) ? src : [];
|
316 |
|
317 | } else {
|
318 | clone = src && jQuery.isPlainObject( src ) ? src : {};
|
319 | }
|
320 |
|
321 |
|
322 | target[ name ] = jQuery.extend( deep, clone, copy );
|
323 |
|
324 |
|
325 | } else if ( copy !== undefined ) {
|
326 | target[ name ] = copy;
|
327 | }
|
328 | }
|
329 | }
|
330 | }
|
331 |
|
332 |
|
333 | return target;
|
334 | };
|
335 |
|
336 | jQuery.extend( {
|
337 |
|
338 |
|
339 | expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ),
|
340 |
|
341 |
|
342 | isReady: true,
|
343 |
|
344 | error: function( msg ) {
|
345 | throw new Error( msg );
|
346 | },
|
347 |
|
348 | noop: function() {},
|
349 |
|
350 | isFunction: function( obj ) {
|
351 | return jQuery.type( obj ) === "function";
|
352 | },
|
353 |
|
354 | isWindow: function( obj ) {
|
355 | return obj != null && obj === obj.window;
|
356 | },
|
357 |
|
358 | isNumeric: function( obj ) {
|
359 |
|
360 |
|
361 |
|
362 |
|
363 | var type = jQuery.type( obj );
|
364 | return ( type === "number" || type === "string" ) &&
|
365 |
|
366 |
|
367 |
|
368 |
|
369 | !isNaN( obj - parseFloat( obj ) );
|
370 | },
|
371 |
|
372 | isPlainObject: function( obj ) {
|
373 | var proto, Ctor;
|
374 |
|
375 |
|
376 |
|
377 | if ( !obj || toString.call( obj ) !== "[object Object]" ) {
|
378 | return false;
|
379 | }
|
380 |
|
381 | proto = getProto( obj );
|
382 |
|
383 |
|
384 | if ( !proto ) {
|
385 | return true;
|
386 | }
|
387 |
|
388 |
|
389 | Ctor = hasOwn.call( proto, "constructor" ) && proto.constructor;
|
390 | return typeof Ctor === "function" && fnToString.call( Ctor ) === ObjectFunctionString;
|
391 | },
|
392 |
|
393 | isEmptyObject: function( obj ) {
|
394 |
|
395 |
|
396 |
|
397 | var name;
|
398 |
|
399 | for ( name in obj ) {
|
400 | return false;
|
401 | }
|
402 | return true;
|
403 | },
|
404 |
|
405 | type: function( obj ) {
|
406 | if ( obj == null ) {
|
407 | return obj + "";
|
408 | }
|
409 |
|
410 |
|
411 | return typeof obj === "object" || typeof obj === "function" ?
|
412 | class2type[ toString.call( obj ) ] || "object" :
|
413 | typeof obj;
|
414 | },
|
415 |
|
416 |
|
417 | globalEval: function( code ) {
|
418 | DOMEval( code );
|
419 | },
|
420 |
|
421 |
|
422 |
|
423 |
|
424 | camelCase: function( string ) {
|
425 | return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
|
426 | },
|
427 |
|
428 | each: function( obj, callback ) {
|
429 | var length, i = 0;
|
430 |
|
431 | if ( isArrayLike( obj ) ) {
|
432 | length = obj.length;
|
433 | for ( ; i < length; i++ ) {
|
434 | if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {
|
435 | break;
|
436 | }
|
437 | }
|
438 | } else {
|
439 | for ( i in obj ) {
|
440 | if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {
|
441 | break;
|
442 | }
|
443 | }
|
444 | }
|
445 |
|
446 | return obj;
|
447 | },
|
448 |
|
449 |
|
450 | trim: function( text ) {
|
451 | return text == null ?
|
452 | "" :
|
453 | ( text + "" ).replace( rtrim, "" );
|
454 | },
|
455 |
|
456 |
|
457 | makeArray: function( arr, results ) {
|
458 | var ret = results || [];
|
459 |
|
460 | if ( arr != null ) {
|
461 | if ( isArrayLike( Object( arr ) ) ) {
|
462 | jQuery.merge( ret,
|
463 | typeof arr === "string" ?
|
464 | [ arr ] : arr
|
465 | );
|
466 | } else {
|
467 | push.call( ret, arr );
|
468 | }
|
469 | }
|
470 |
|
471 | return ret;
|
472 | },
|
473 |
|
474 | inArray: function( elem, arr, i ) {
|
475 | return arr == null ? -1 : indexOf.call( arr, elem, i );
|
476 | },
|
477 |
|
478 |
|
479 |
|
480 | merge: function( first, second ) {
|
481 | var len = +second.length,
|
482 | j = 0,
|
483 | i = first.length;
|
484 |
|
485 | for ( ; j < len; j++ ) {
|
486 | first[ i++ ] = second[ j ];
|
487 | }
|
488 |
|
489 | first.length = i;
|
490 |
|
491 | return first;
|
492 | },
|
493 |
|
494 | grep: function( elems, callback, invert ) {
|
495 | var callbackInverse,
|
496 | matches = [],
|
497 | i = 0,
|
498 | length = elems.length,
|
499 | callbackExpect = !invert;
|
500 |
|
501 |
|
502 |
|
503 | for ( ; i < length; i++ ) {
|
504 | callbackInverse = !callback( elems[ i ], i );
|
505 | if ( callbackInverse !== callbackExpect ) {
|
506 | matches.push( elems[ i ] );
|
507 | }
|
508 | }
|
509 |
|
510 | return matches;
|
511 | },
|
512 |
|
513 |
|
514 | map: function( elems, callback, arg ) {
|
515 | var length, value,
|
516 | i = 0,
|
517 | ret = [];
|
518 |
|
519 |
|
520 | if ( isArrayLike( elems ) ) {
|
521 | length = elems.length;
|
522 | for ( ; i < length; i++ ) {
|
523 | value = callback( elems[ i ], i, arg );
|
524 |
|
525 | if ( value != null ) {
|
526 | ret.push( value );
|
527 | }
|
528 | }
|
529 |
|
530 |
|
531 | } else {
|
532 | for ( i in elems ) {
|
533 | value = callback( elems[ i ], i, arg );
|
534 |
|
535 | if ( value != null ) {
|
536 | ret.push( value );
|
537 | }
|
538 | }
|
539 | }
|
540 |
|
541 |
|
542 | return concat.apply( [], ret );
|
543 | },
|
544 |
|
545 |
|
546 | guid: 1,
|
547 |
|
548 |
|
549 |
|
550 | proxy: function( fn, context ) {
|
551 | var tmp, args, proxy;
|
552 |
|
553 | if ( typeof context === "string" ) {
|
554 | tmp = fn[ context ];
|
555 | context = fn;
|
556 | fn = tmp;
|
557 | }
|
558 |
|
559 |
|
560 |
|
561 | if ( !jQuery.isFunction( fn ) ) {
|
562 | return undefined;
|
563 | }
|
564 |
|
565 |
|
566 | args = slice.call( arguments, 2 );
|
567 | proxy = function() {
|
568 | return fn.apply( context || this, args.concat( slice.call( arguments ) ) );
|
569 | };
|
570 |
|
571 |
|
572 | proxy.guid = fn.guid = fn.guid || jQuery.guid++;
|
573 |
|
574 | return proxy;
|
575 | },
|
576 |
|
577 | now: Date.now,
|
578 |
|
579 |
|
580 |
|
581 | support: support
|
582 | } );
|
583 |
|
584 | if ( typeof Symbol === "function" ) {
|
585 | jQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ];
|
586 | }
|
587 |
|
588 |
|
589 | jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ),
|
590 | function( i, name ) {
|
591 | class2type[ "[object " + name + "]" ] = name.toLowerCase();
|
592 | } );
|
593 |
|
594 | function isArrayLike( obj ) {
|
595 |
|
596 |
|
597 |
|
598 |
|
599 |
|
600 | var length = !!obj && "length" in obj && obj.length,
|
601 | type = jQuery.type( obj );
|
602 |
|
603 | if ( type === "function" || jQuery.isWindow( obj ) ) {
|
604 | return false;
|
605 | }
|
606 |
|
607 | return type === "array" || length === 0 ||
|
608 | typeof length === "number" && length > 0 && ( length - 1 ) in obj;
|
609 | }
|
610 | var Sizzle =
|
611 |
|
612 |
|
613 |
|
614 |
|
615 |
|
616 |
|
617 |
|
618 |
|
619 |
|
620 |
|
621 | (function( window ) {
|
622 |
|
623 | var i,
|
624 | support,
|
625 | Expr,
|
626 | getText,
|
627 | isXML,
|
628 | tokenize,
|
629 | compile,
|
630 | select,
|
631 | outermostContext,
|
632 | sortInput,
|
633 | hasDuplicate,
|
634 |
|
635 |
|
636 | setDocument,
|
637 | document,
|
638 | docElem,
|
639 | documentIsHTML,
|
640 | rbuggyQSA,
|
641 | rbuggyMatches,
|
642 | matches,
|
643 | contains,
|
644 |
|
645 |
|
646 | expando = "sizzle" + 1 * new Date(),
|
647 | preferredDoc = window.document,
|
648 | dirruns = 0,
|
649 | done = 0,
|
650 | classCache = createCache(),
|
651 | tokenCache = createCache(),
|
652 | compilerCache = createCache(),
|
653 | sortOrder = function( a, b ) {
|
654 | if ( a === b ) {
|
655 | hasDuplicate = true;
|
656 | }
|
657 | return 0;
|
658 | },
|
659 |
|
660 |
|
661 | hasOwn = ({}).hasOwnProperty,
|
662 | arr = [],
|
663 | pop = arr.pop,
|
664 | push_native = arr.push,
|
665 | push = arr.push,
|
666 | slice = arr.slice,
|
667 |
|
668 |
|
669 | indexOf = function( list, elem ) {
|
670 | var i = 0,
|
671 | len = list.length;
|
672 | for ( ; i < len; i++ ) {
|
673 | if ( list[i] === elem ) {
|
674 | return i;
|
675 | }
|
676 | }
|
677 | return -1;
|
678 | },
|
679 |
|
680 | booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",
|
681 |
|
682 |
|
683 |
|
684 |
|
685 | whitespace = "[\\x20\\t\\r\\n\\f]",
|
686 |
|
687 |
|
688 | identifier = "(?:\\\\.|[\\w-]|[^\0-\\xa0])+",
|
689 |
|
690 |
|
691 | attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace +
|
692 |
|
693 | "*([*^$|!~]?=)" + whitespace +
|
694 |
|
695 | "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace +
|
696 | "*\\]",
|
697 |
|
698 | pseudos = ":(" + identifier + ")(?:\\((" +
|
699 |
|
700 |
|
701 | "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" +
|
702 |
|
703 | "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" +
|
704 |
|
705 | ".*" +
|
706 | ")\\)|)",
|
707 |
|
708 |
|
709 | rwhitespace = new RegExp( whitespace + "+", "g" ),
|
710 | rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ),
|
711 |
|
712 | rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ),
|
713 | rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ),
|
714 |
|
715 | rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*?)" + whitespace + "*\\]", "g" ),
|
716 |
|
717 | rpseudo = new RegExp( pseudos ),
|
718 | ridentifier = new RegExp( "^" + identifier + "$" ),
|
719 |
|
720 | matchExpr = {
|
721 | "ID": new RegExp( "^#(" + identifier + ")" ),
|
722 | "CLASS": new RegExp( "^\\.(" + identifier + ")" ),
|
723 | "TAG": new RegExp( "^(" + identifier + "|[*])" ),
|
724 | "ATTR": new RegExp( "^" + attributes ),
|
725 | "PSEUDO": new RegExp( "^" + pseudos ),
|
726 | "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace +
|
727 | "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace +
|
728 | "*(\\d+)|))" + whitespace + "*\\)|)", "i" ),
|
729 | "bool": new RegExp( "^(?:" + booleans + ")$", "i" ),
|
730 |
|
731 |
|
732 | "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" +
|
733 | whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" )
|
734 | },
|
735 |
|
736 | rinputs = /^(?:input|select|textarea|button)$/i,
|
737 | rheader = /^h\d$/i,
|
738 |
|
739 | rnative = /^[^{]+\{\s*\[native \w/,
|
740 |
|
741 |
|
742 | rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
|
743 |
|
744 | rsibling = /[+~]/,
|
745 |
|
746 |
|
747 |
|
748 | runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ),
|
749 | funescape = function( _, escaped, escapedWhitespace ) {
|
750 | var high = "0x" + escaped - 0x10000;
|
751 |
|
752 |
|
753 |
|
754 | return high !== high || escapedWhitespace ?
|
755 | escaped :
|
756 | high < 0 ?
|
757 |
|
758 | String.fromCharCode( high + 0x10000 ) :
|
759 |
|
760 | String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );
|
761 | },
|
762 |
|
763 |
|
764 |
|
765 | rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,
|
766 | fcssescape = function( ch, asCodePoint ) {
|
767 | if ( asCodePoint ) {
|
768 |
|
769 |
|
770 | if ( ch === "\0" ) {
|
771 | return "\uFFFD";
|
772 | }
|
773 |
|
774 |
|
775 | return ch.slice( 0, -1 ) + "\\" + ch.charCodeAt( ch.length - 1 ).toString( 16 ) + " ";
|
776 | }
|
777 |
|
778 |
|
779 | return "\\" + ch;
|
780 | },
|
781 |
|
782 |
|
783 |
|
784 |
|
785 |
|
786 | unloadHandler = function() {
|
787 | setDocument();
|
788 | },
|
789 |
|
790 | disabledAncestor = addCombinator(
|
791 | function( elem ) {
|
792 | return elem.disabled === true && ("form" in elem || "label" in elem);
|
793 | },
|
794 | { dir: "parentNode", next: "legend" }
|
795 | );
|
796 |
|
797 |
|
798 | try {
|
799 | push.apply(
|
800 | (arr = slice.call( preferredDoc.childNodes )),
|
801 | preferredDoc.childNodes
|
802 | );
|
803 |
|
804 |
|
805 | arr[ preferredDoc.childNodes.length ].nodeType;
|
806 | } catch ( e ) {
|
807 | push = { apply: arr.length ?
|
808 |
|
809 |
|
810 | function( target, els ) {
|
811 | push_native.apply( target, slice.call(els) );
|
812 | } :
|
813 |
|
814 |
|
815 |
|
816 | function( target, els ) {
|
817 | var j = target.length,
|
818 | i = 0;
|
819 |
|
820 | while ( (target[j++] = els[i++]) ) {}
|
821 | target.length = j - 1;
|
822 | }
|
823 | };
|
824 | }
|
825 |
|
826 | function Sizzle( selector, context, results, seed ) {
|
827 | var m, i, elem, nid, match, groups, newSelector,
|
828 | newContext = context && context.ownerDocument,
|
829 |
|
830 |
|
831 | nodeType = context ? context.nodeType : 9;
|
832 |
|
833 | results = results || [];
|
834 |
|
835 |
|
836 | if ( typeof selector !== "string" || !selector ||
|
837 | nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) {
|
838 |
|
839 | return results;
|
840 | }
|
841 |
|
842 |
|
843 | if ( !seed ) {
|
844 |
|
845 | if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) {
|
846 | setDocument( context );
|
847 | }
|
848 | context = context || document;
|
849 |
|
850 | if ( documentIsHTML ) {
|
851 |
|
852 |
|
853 |
|
854 | if ( nodeType !== 11 && (match = rquickExpr.exec( selector )) ) {
|
855 |
|
856 |
|
857 | if ( (m = match[1]) ) {
|
858 |
|
859 |
|
860 | if ( nodeType === 9 ) {
|
861 | if ( (elem = context.getElementById( m )) ) {
|
862 |
|
863 |
|
864 |
|
865 |
|
866 | if ( elem.id === m ) {
|
867 | results.push( elem );
|
868 | return results;
|
869 | }
|
870 | } else {
|
871 | return results;
|
872 | }
|
873 |
|
874 |
|
875 | } else {
|
876 |
|
877 |
|
878 |
|
879 |
|
880 | if ( newContext && (elem = newContext.getElementById( m )) &&
|
881 | contains( context, elem ) &&
|
882 | elem.id === m ) {
|
883 |
|
884 | results.push( elem );
|
885 | return results;
|
886 | }
|
887 | }
|
888 |
|
889 |
|
890 | } else if ( match[2] ) {
|
891 | push.apply( results, context.getElementsByTagName( selector ) );
|
892 | return results;
|
893 |
|
894 |
|
895 | } else if ( (m = match[3]) && support.getElementsByClassName &&
|
896 | context.getElementsByClassName ) {
|
897 |
|
898 | push.apply( results, context.getElementsByClassName( m ) );
|
899 | return results;
|
900 | }
|
901 | }
|
902 |
|
903 |
|
904 | if ( support.qsa &&
|
905 | !compilerCache[ selector + " " ] &&
|
906 | (!rbuggyQSA || !rbuggyQSA.test( selector )) ) {
|
907 |
|
908 | if ( nodeType !== 1 ) {
|
909 | newContext = context;
|
910 | newSelector = selector;
|
911 |
|
912 |
|
913 |
|
914 |
|
915 |
|
916 | } else if ( context.nodeName.toLowerCase() !== "object" ) {
|
917 |
|
918 |
|
919 | if ( (nid = context.getAttribute( "id" )) ) {
|
920 | nid = nid.replace( rcssescape, fcssescape );
|
921 | } else {
|
922 | context.setAttribute( "id", (nid = expando) );
|
923 | }
|
924 |
|
925 |
|
926 | groups = tokenize( selector );
|
927 | i = groups.length;
|
928 | while ( i-- ) {
|
929 | groups[i] = "#" + nid + " " + toSelector( groups[i] );
|
930 | }
|
931 | newSelector = groups.join( "," );
|
932 |
|
933 |
|
934 | newContext = rsibling.test( selector ) && testContext( context.parentNode ) ||
|
935 | context;
|
936 | }
|
937 |
|
938 | if ( newSelector ) {
|
939 | try {
|
940 | push.apply( results,
|
941 | newContext.querySelectorAll( newSelector )
|
942 | );
|
943 | return results;
|
944 | } catch ( qsaError ) {
|
945 | } finally {
|
946 | if ( nid === expando ) {
|
947 | context.removeAttribute( "id" );
|
948 | }
|
949 | }
|
950 | }
|
951 | }
|
952 | }
|
953 | }
|
954 |
|
955 |
|
956 | return select( selector.replace( rtrim, "$1" ), context, results, seed );
|
957 | }
|
958 |
|
959 |
|
960 |
|
961 |
|
962 |
|
963 |
|
964 |
|
965 | function createCache() {
|
966 | var keys = [];
|
967 |
|
968 | function cache( key, value ) {
|
969 |
|
970 | if ( keys.push( key + " " ) > Expr.cacheLength ) {
|
971 |
|
972 | delete cache[ keys.shift() ];
|
973 | }
|
974 | return (cache[ key + " " ] = value);
|
975 | }
|
976 | return cache;
|
977 | }
|
978 |
|
979 |
|
980 |
|
981 |
|
982 |
|
983 | function markFunction( fn ) {
|
984 | fn[ expando ] = true;
|
985 | return fn;
|
986 | }
|
987 |
|
988 |
|
989 |
|
990 |
|
991 |
|
992 | function assert( fn ) {
|
993 | var el = document.createElement("fieldset");
|
994 |
|
995 | try {
|
996 | return !!fn( el );
|
997 | } catch (e) {
|
998 | return false;
|
999 | } finally {
|
1000 |
|
1001 | if ( el.parentNode ) {
|
1002 | el.parentNode.removeChild( el );
|
1003 | }
|
1004 |
|
1005 | el = null;
|
1006 | }
|
1007 | }
|
1008 |
|
1009 |
|
1010 |
|
1011 |
|
1012 |
|
1013 |
|
1014 | function addHandle( attrs, handler ) {
|
1015 | var arr = attrs.split("|"),
|
1016 | i = arr.length;
|
1017 |
|
1018 | while ( i-- ) {
|
1019 | Expr.attrHandle[ arr[i] ] = handler;
|
1020 | }
|
1021 | }
|
1022 |
|
1023 |
|
1024 |
|
1025 |
|
1026 |
|
1027 |
|
1028 |
|
1029 | function siblingCheck( a, b ) {
|
1030 | var cur = b && a,
|
1031 | diff = cur && a.nodeType === 1 && b.nodeType === 1 &&
|
1032 | a.sourceIndex - b.sourceIndex;
|
1033 |
|
1034 |
|
1035 | if ( diff ) {
|
1036 | return diff;
|
1037 | }
|
1038 |
|
1039 |
|
1040 | if ( cur ) {
|
1041 | while ( (cur = cur.nextSibling) ) {
|
1042 | if ( cur === b ) {
|
1043 | return -1;
|
1044 | }
|
1045 | }
|
1046 | }
|
1047 |
|
1048 | return a ? 1 : -1;
|
1049 | }
|
1050 |
|
1051 |
|
1052 |
|
1053 |
|
1054 |
|
1055 | function createInputPseudo( type ) {
|
1056 | return function( elem ) {
|
1057 | var name = elem.nodeName.toLowerCase();
|
1058 | return name === "input" && elem.type === type;
|
1059 | };
|
1060 | }
|
1061 |
|
1062 |
|
1063 |
|
1064 |
|
1065 |
|
1066 | function createButtonPseudo( type ) {
|
1067 | return function( elem ) {
|
1068 | var name = elem.nodeName.toLowerCase();
|
1069 | return (name === "input" || name === "button") && elem.type === type;
|
1070 | };
|
1071 | }
|
1072 |
|
1073 |
|
1074 |
|
1075 |
|
1076 |
|
1077 | function createDisabledPseudo( disabled ) {
|
1078 |
|
1079 |
|
1080 | return function( elem ) {
|
1081 |
|
1082 |
|
1083 |
|
1084 |
|
1085 | if ( "form" in elem ) {
|
1086 |
|
1087 |
|
1088 |
|
1089 |
|
1090 |
|
1091 |
|
1092 |
|
1093 |
|
1094 | if ( elem.parentNode && elem.disabled === false ) {
|
1095 |
|
1096 |
|
1097 | if ( "label" in elem ) {
|
1098 | if ( "label" in elem.parentNode ) {
|
1099 | return elem.parentNode.disabled === disabled;
|
1100 | } else {
|
1101 | return elem.disabled === disabled;
|
1102 | }
|
1103 | }
|
1104 |
|
1105 |
|
1106 |
|
1107 | return elem.isDisabled === disabled ||
|
1108 |
|
1109 |
|
1110 |
|
1111 | elem.isDisabled !== !disabled &&
|
1112 | disabledAncestor( elem ) === disabled;
|
1113 | }
|
1114 |
|
1115 | return elem.disabled === disabled;
|
1116 |
|
1117 |
|
1118 |
|
1119 |
|
1120 | } else if ( "label" in elem ) {
|
1121 | return elem.disabled === disabled;
|
1122 | }
|
1123 |
|
1124 |
|
1125 | return false;
|
1126 | };
|
1127 | }
|
1128 |
|
1129 |
|
1130 |
|
1131 |
|
1132 |
|
1133 | function createPositionalPseudo( fn ) {
|
1134 | return markFunction(function( argument ) {
|
1135 | argument = +argument;
|
1136 | return markFunction(function( seed, matches ) {
|
1137 | var j,
|
1138 | matchIndexes = fn( [], seed.length, argument ),
|
1139 | i = matchIndexes.length;
|
1140 |
|
1141 |
|
1142 | while ( i-- ) {
|
1143 | if ( seed[ (j = matchIndexes[i]) ] ) {
|
1144 | seed[j] = !(matches[j] = seed[j]);
|
1145 | }
|
1146 | }
|
1147 | });
|
1148 | });
|
1149 | }
|
1150 |
|
1151 |
|
1152 |
|
1153 |
|
1154 |
|
1155 |
|
1156 | function testContext( context ) {
|
1157 | return context && typeof context.getElementsByTagName !== "undefined" && context;
|
1158 | }
|
1159 |
|
1160 |
|
1161 | support = Sizzle.support = {};
|
1162 |
|
1163 |
|
1164 |
|
1165 |
|
1166 |
|
1167 |
|
1168 | isXML = Sizzle.isXML = function( elem ) {
|
1169 |
|
1170 |
|
1171 | var documentElement = elem && (elem.ownerDocument || elem).documentElement;
|
1172 | return documentElement ? documentElement.nodeName !== "HTML" : false;
|
1173 | };
|
1174 |
|
1175 |
|
1176 |
|
1177 |
|
1178 |
|
1179 |
|
1180 | setDocument = Sizzle.setDocument = function( node ) {
|
1181 | var hasCompare, subWindow,
|
1182 | doc = node ? node.ownerDocument || node : preferredDoc;
|
1183 |
|
1184 |
|
1185 | if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {
|
1186 | return document;
|
1187 | }
|
1188 |
|
1189 |
|
1190 | document = doc;
|
1191 | docElem = document.documentElement;
|
1192 | documentIsHTML = !isXML( document );
|
1193 |
|
1194 |
|
1195 |
|
1196 | if ( preferredDoc !== document &&
|
1197 | (subWindow = document.defaultView) && subWindow.top !== subWindow ) {
|
1198 |
|
1199 |
|
1200 | if ( subWindow.addEventListener ) {
|
1201 | subWindow.addEventListener( "unload", unloadHandler, false );
|
1202 |
|
1203 |
|
1204 | } else if ( subWindow.attachEvent ) {
|
1205 | subWindow.attachEvent( "onunload", unloadHandler );
|
1206 | }
|
1207 | }
|
1208 |
|
1209 | |
1210 |
|
1211 |
|
1212 |
|
1213 |
|
1214 |
|
1215 | support.attributes = assert(function( el ) {
|
1216 | el.className = "i";
|
1217 | return !el.getAttribute("className");
|
1218 | });
|
1219 |
|
1220 | |
1221 |
|
1222 |
|
1223 |
|
1224 | support.getElementsByTagName = assert(function( el ) {
|
1225 | el.appendChild( document.createComment("") );
|
1226 | return !el.getElementsByTagName("*").length;
|
1227 | });
|
1228 |
|
1229 |
|
1230 | support.getElementsByClassName = rnative.test( document.getElementsByClassName );
|
1231 |
|
1232 |
|
1233 |
|
1234 |
|
1235 |
|
1236 | support.getById = assert(function( el ) {
|
1237 | docElem.appendChild( el ).id = expando;
|
1238 | return !document.getElementsByName || !document.getElementsByName( expando ).length;
|
1239 | });
|
1240 |
|
1241 |
|
1242 | if ( support.getById ) {
|
1243 | Expr.filter["ID"] = function( id ) {
|
1244 | var attrId = id.replace( runescape, funescape );
|
1245 | return function( elem ) {
|
1246 | return elem.getAttribute("id") === attrId;
|
1247 | };
|
1248 | };
|
1249 | Expr.find["ID"] = function( id, context ) {
|
1250 | if ( typeof context.getElementById !== "undefined" && documentIsHTML ) {
|
1251 | var elem = context.getElementById( id );
|
1252 | return elem ? [ elem ] : [];
|
1253 | }
|
1254 | };
|
1255 | } else {
|
1256 | Expr.filter["ID"] = function( id ) {
|
1257 | var attrId = id.replace( runescape, funescape );
|
1258 | return function( elem ) {
|
1259 | var node = typeof elem.getAttributeNode !== "undefined" &&
|
1260 | elem.getAttributeNode("id");
|
1261 | return node && node.value === attrId;
|
1262 | };
|
1263 | };
|
1264 |
|
1265 |
|
1266 |
|
1267 | Expr.find["ID"] = function( id, context ) {
|
1268 | if ( typeof context.getElementById !== "undefined" && documentIsHTML ) {
|
1269 | var node, i, elems,
|
1270 | elem = context.getElementById( id );
|
1271 |
|
1272 | if ( elem ) {
|
1273 |
|
1274 |
|
1275 | node = elem.getAttributeNode("id");
|
1276 | if ( node && node.value === id ) {
|
1277 | return [ elem ];
|
1278 | }
|
1279 |
|
1280 |
|
1281 | elems = context.getElementsByName( id );
|
1282 | i = 0;
|
1283 | while ( (elem = elems[i++]) ) {
|
1284 | node = elem.getAttributeNode("id");
|
1285 | if ( node && node.value === id ) {
|
1286 | return [ elem ];
|
1287 | }
|
1288 | }
|
1289 | }
|
1290 |
|
1291 | return [];
|
1292 | }
|
1293 | };
|
1294 | }
|
1295 |
|
1296 |
|
1297 | Expr.find["TAG"] = support.getElementsByTagName ?
|
1298 | function( tag, context ) {
|
1299 | if ( typeof context.getElementsByTagName !== "undefined" ) {
|
1300 | return context.getElementsByTagName( tag );
|
1301 |
|
1302 |
|
1303 | } else if ( support.qsa ) {
|
1304 | return context.querySelectorAll( tag );
|
1305 | }
|
1306 | } :
|
1307 |
|
1308 | function( tag, context ) {
|
1309 | var elem,
|
1310 | tmp = [],
|
1311 | i = 0,
|
1312 |
|
1313 | results = context.getElementsByTagName( tag );
|
1314 |
|
1315 |
|
1316 | if ( tag === "*" ) {
|
1317 | while ( (elem = results[i++]) ) {
|
1318 | if ( elem.nodeType === 1 ) {
|
1319 | tmp.push( elem );
|
1320 | }
|
1321 | }
|
1322 |
|
1323 | return tmp;
|
1324 | }
|
1325 | return results;
|
1326 | };
|
1327 |
|
1328 |
|
1329 | Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) {
|
1330 | if ( typeof context.getElementsByClassName !== "undefined" && documentIsHTML ) {
|
1331 | return context.getElementsByClassName( className );
|
1332 | }
|
1333 | };
|
1334 |
|
1335 | |
1336 |
|
1337 |
|
1338 |
|
1339 |
|
1340 |
|
1341 | rbuggyMatches = [];
|
1342 |
|
1343 |
|
1344 |
|
1345 |
|
1346 |
|
1347 |
|
1348 | rbuggyQSA = [];
|
1349 |
|
1350 | if ( (support.qsa = rnative.test( document.querySelectorAll )) ) {
|
1351 |
|
1352 |
|
1353 | assert(function( el ) {
|
1354 |
|
1355 |
|
1356 |
|
1357 |
|
1358 |
|
1359 | docElem.appendChild( el ).innerHTML = "<a id='" + expando + "'></a>" +
|
1360 | "<select id='" + expando + "-\r\\' msallowcapture=''>" +
|
1361 | "<option selected=''></option></select>";
|
1362 |
|
1363 |
|
1364 |
|
1365 |
|
1366 |
|
1367 | if ( el.querySelectorAll("[msallowcapture^='']").length ) {
|
1368 | rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" );
|
1369 | }
|
1370 |
|
1371 |
|
1372 |
|
1373 | if ( !el.querySelectorAll("[selected]").length ) {
|
1374 | rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" );
|
1375 | }
|
1376 |
|
1377 |
|
1378 | if ( !el.querySelectorAll( "[id~=" + expando + "-]" ).length ) {
|
1379 | rbuggyQSA.push("~=");
|
1380 | }
|
1381 |
|
1382 |
|
1383 |
|
1384 |
|
1385 | if ( !el.querySelectorAll(":checked").length ) {
|
1386 | rbuggyQSA.push(":checked");
|
1387 | }
|
1388 |
|
1389 |
|
1390 |
|
1391 |
|
1392 | if ( !el.querySelectorAll( "a#" + expando + "+*" ).length ) {
|
1393 | rbuggyQSA.push(".#.+[+~]");
|
1394 | }
|
1395 | });
|
1396 |
|
1397 | assert(function( el ) {
|
1398 | el.innerHTML = "<a href='' disabled='disabled'></a>" +
|
1399 | "<select disabled='disabled'><option/></select>";
|
1400 |
|
1401 |
|
1402 |
|
1403 | var input = document.createElement("input");
|
1404 | input.setAttribute( "type", "hidden" );
|
1405 | el.appendChild( input ).setAttribute( "name", "D" );
|
1406 |
|
1407 |
|
1408 |
|
1409 | if ( el.querySelectorAll("[name=d]").length ) {
|
1410 | rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" );
|
1411 | }
|
1412 |
|
1413 |
|
1414 |
|
1415 | if ( el.querySelectorAll(":enabled").length !== 2 ) {
|
1416 | rbuggyQSA.push( ":enabled", ":disabled" );
|
1417 | }
|
1418 |
|
1419 |
|
1420 |
|
1421 | docElem.appendChild( el ).disabled = true;
|
1422 | if ( el.querySelectorAll(":disabled").length !== 2 ) {
|
1423 | rbuggyQSA.push( ":enabled", ":disabled" );
|
1424 | }
|
1425 |
|
1426 |
|
1427 | el.querySelectorAll("*,:x");
|
1428 | rbuggyQSA.push(",.*:");
|
1429 | });
|
1430 | }
|
1431 |
|
1432 | if ( (support.matchesSelector = rnative.test( (matches = docElem.matches ||
|
1433 | docElem.webkitMatchesSelector ||
|
1434 | docElem.mozMatchesSelector ||
|
1435 | docElem.oMatchesSelector ||
|
1436 | docElem.msMatchesSelector) )) ) {
|
1437 |
|
1438 | assert(function( el ) {
|
1439 |
|
1440 |
|
1441 | support.disconnectedMatch = matches.call( el, "*" );
|
1442 |
|
1443 |
|
1444 |
|
1445 | matches.call( el, "[s!='']:x" );
|
1446 | rbuggyMatches.push( "!=", pseudos );
|
1447 | });
|
1448 | }
|
1449 |
|
1450 | rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") );
|
1451 | rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") );
|
1452 |
|
1453 | |
1454 |
|
1455 | hasCompare = rnative.test( docElem.compareDocumentPosition );
|
1456 |
|
1457 |
|
1458 |
|
1459 |
|
1460 | contains = hasCompare || rnative.test( docElem.contains ) ?
|
1461 | function( a, b ) {
|
1462 | var adown = a.nodeType === 9 ? a.documentElement : a,
|
1463 | bup = b && b.parentNode;
|
1464 | return a === bup || !!( bup && bup.nodeType === 1 && (
|
1465 | adown.contains ?
|
1466 | adown.contains( bup ) :
|
1467 | a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16
|
1468 | ));
|
1469 | } :
|
1470 | function( a, b ) {
|
1471 | if ( b ) {
|
1472 | while ( (b = b.parentNode) ) {
|
1473 | if ( b === a ) {
|
1474 | return true;
|
1475 | }
|
1476 | }
|
1477 | }
|
1478 | return false;
|
1479 | };
|
1480 |
|
1481 | |
1482 |
|
1483 |
|
1484 |
|
1485 | sortOrder = hasCompare ?
|
1486 | function( a, b ) {
|
1487 |
|
1488 |
|
1489 | if ( a === b ) {
|
1490 | hasDuplicate = true;
|
1491 | return 0;
|
1492 | }
|
1493 |
|
1494 |
|
1495 | var compare = !a.compareDocumentPosition - !b.compareDocumentPosition;
|
1496 | if ( compare ) {
|
1497 | return compare;
|
1498 | }
|
1499 |
|
1500 |
|
1501 | compare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ?
|
1502 | a.compareDocumentPosition( b ) :
|
1503 |
|
1504 |
|
1505 | 1;
|
1506 |
|
1507 |
|
1508 | if ( compare & 1 ||
|
1509 | (!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) {
|
1510 |
|
1511 |
|
1512 | if ( a === document || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) {
|
1513 | return -1;
|
1514 | }
|
1515 | if ( b === document || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) {
|
1516 | return 1;
|
1517 | }
|
1518 |
|
1519 |
|
1520 | return sortInput ?
|
1521 | ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :
|
1522 | 0;
|
1523 | }
|
1524 |
|
1525 | return compare & 4 ? -1 : 1;
|
1526 | } :
|
1527 | function( a, b ) {
|
1528 |
|
1529 | if ( a === b ) {
|
1530 | hasDuplicate = true;
|
1531 | return 0;
|
1532 | }
|
1533 |
|
1534 | var cur,
|
1535 | i = 0,
|
1536 | aup = a.parentNode,
|
1537 | bup = b.parentNode,
|
1538 | ap = [ a ],
|
1539 | bp = [ b ];
|
1540 |
|
1541 |
|
1542 | if ( !aup || !bup ) {
|
1543 | return a === document ? -1 :
|
1544 | b === document ? 1 :
|
1545 | aup ? -1 :
|
1546 | bup ? 1 :
|
1547 | sortInput ?
|
1548 | ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :
|
1549 | 0;
|
1550 |
|
1551 |
|
1552 | } else if ( aup === bup ) {
|
1553 | return siblingCheck( a, b );
|
1554 | }
|
1555 |
|
1556 |
|
1557 | cur = a;
|
1558 | while ( (cur = cur.parentNode) ) {
|
1559 | ap.unshift( cur );
|
1560 | }
|
1561 | cur = b;
|
1562 | while ( (cur = cur.parentNode) ) {
|
1563 | bp.unshift( cur );
|
1564 | }
|
1565 |
|
1566 |
|
1567 | while ( ap[i] === bp[i] ) {
|
1568 | i++;
|
1569 | }
|
1570 |
|
1571 | return i ?
|
1572 |
|
1573 | siblingCheck( ap[i], bp[i] ) :
|
1574 |
|
1575 |
|
1576 | ap[i] === preferredDoc ? -1 :
|
1577 | bp[i] === preferredDoc ? 1 :
|
1578 | 0;
|
1579 | };
|
1580 |
|
1581 | return document;
|
1582 | };
|
1583 |
|
1584 | Sizzle.matches = function( expr, elements ) {
|
1585 | return Sizzle( expr, null, null, elements );
|
1586 | };
|
1587 |
|
1588 | Sizzle.matchesSelector = function( elem, expr ) {
|
1589 |
|
1590 | if ( ( elem.ownerDocument || elem ) !== document ) {
|
1591 | setDocument( elem );
|
1592 | }
|
1593 |
|
1594 |
|
1595 | expr = expr.replace( rattributeQuotes, "='$1']" );
|
1596 |
|
1597 | if ( support.matchesSelector && documentIsHTML &&
|
1598 | !compilerCache[ expr + " " ] &&
|
1599 | ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&
|
1600 | ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) {
|
1601 |
|
1602 | try {
|
1603 | var ret = matches.call( elem, expr );
|
1604 |
|
1605 |
|
1606 | if ( ret || support.disconnectedMatch ||
|
1607 |
|
1608 |
|
1609 | elem.document && elem.document.nodeType !== 11 ) {
|
1610 | return ret;
|
1611 | }
|
1612 | } catch (e) {}
|
1613 | }
|
1614 |
|
1615 | return Sizzle( expr, document, null, [ elem ] ).length > 0;
|
1616 | };
|
1617 |
|
1618 | Sizzle.contains = function( context, elem ) {
|
1619 |
|
1620 | if ( ( context.ownerDocument || context ) !== document ) {
|
1621 | setDocument( context );
|
1622 | }
|
1623 | return contains( context, elem );
|
1624 | };
|
1625 |
|
1626 | Sizzle.attr = function( elem, name ) {
|
1627 |
|
1628 | if ( ( elem.ownerDocument || elem ) !== document ) {
|
1629 | setDocument( elem );
|
1630 | }
|
1631 |
|
1632 | var fn = Expr.attrHandle[ name.toLowerCase() ],
|
1633 |
|
1634 | val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?
|
1635 | fn( elem, name, !documentIsHTML ) :
|
1636 | undefined;
|
1637 |
|
1638 | return val !== undefined ?
|
1639 | val :
|
1640 | support.attributes || !documentIsHTML ?
|
1641 | elem.getAttribute( name ) :
|
1642 | (val = elem.getAttributeNode(name)) && val.specified ?
|
1643 | val.value :
|
1644 | null;
|
1645 | };
|
1646 |
|
1647 | Sizzle.escape = function( sel ) {
|
1648 | return (sel + "").replace( rcssescape, fcssescape );
|
1649 | };
|
1650 |
|
1651 | Sizzle.error = function( msg ) {
|
1652 | throw new Error( "Syntax error, unrecognized expression: " + msg );
|
1653 | };
|
1654 |
|
1655 |
|
1656 |
|
1657 |
|
1658 |
|
1659 | Sizzle.uniqueSort = function( results ) {
|
1660 | var elem,
|
1661 | duplicates = [],
|
1662 | j = 0,
|
1663 | i = 0;
|
1664 |
|
1665 |
|
1666 | hasDuplicate = !support.detectDuplicates;
|
1667 | sortInput = !support.sortStable && results.slice( 0 );
|
1668 | results.sort( sortOrder );
|
1669 |
|
1670 | if ( hasDuplicate ) {
|
1671 | while ( (elem = results[i++]) ) {
|
1672 | if ( elem === results[ i ] ) {
|
1673 | j = duplicates.push( i );
|
1674 | }
|
1675 | }
|
1676 | while ( j-- ) {
|
1677 | results.splice( duplicates[ j ], 1 );
|
1678 | }
|
1679 | }
|
1680 |
|
1681 |
|
1682 |
|
1683 | sortInput = null;
|
1684 |
|
1685 | return results;
|
1686 | };
|
1687 |
|
1688 |
|
1689 |
|
1690 |
|
1691 |
|
1692 | getText = Sizzle.getText = function( elem ) {
|
1693 | var node,
|
1694 | ret = "",
|
1695 | i = 0,
|
1696 | nodeType = elem.nodeType;
|
1697 |
|
1698 | if ( !nodeType ) {
|
1699 |
|
1700 | while ( (node = elem[i++]) ) {
|
1701 |
|
1702 | ret += getText( node );
|
1703 | }
|
1704 | } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {
|
1705 |
|
1706 |
|
1707 | if ( typeof elem.textContent === "string" ) {
|
1708 | return elem.textContent;
|
1709 | } else {
|
1710 |
|
1711 | for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
|
1712 | ret += getText( elem );
|
1713 | }
|
1714 | }
|
1715 | } else if ( nodeType === 3 || nodeType === 4 ) {
|
1716 | return elem.nodeValue;
|
1717 | }
|
1718 |
|
1719 |
|
1720 | return ret;
|
1721 | };
|
1722 |
|
1723 | Expr = Sizzle.selectors = {
|
1724 |
|
1725 |
|
1726 | cacheLength: 50,
|
1727 |
|
1728 | createPseudo: markFunction,
|
1729 |
|
1730 | match: matchExpr,
|
1731 |
|
1732 | attrHandle: {},
|
1733 |
|
1734 | find: {},
|
1735 |
|
1736 | relative: {
|
1737 | ">": { dir: "parentNode", first: true },
|
1738 | " ": { dir: "parentNode" },
|
1739 | "+": { dir: "previousSibling", first: true },
|
1740 | "~": { dir: "previousSibling" }
|
1741 | },
|
1742 |
|
1743 | preFilter: {
|
1744 | "ATTR": function( match ) {
|
1745 | match[1] = match[1].replace( runescape, funescape );
|
1746 |
|
1747 |
|
1748 | match[3] = ( match[3] || match[4] || match[5] || "" ).replace( runescape, funescape );
|
1749 |
|
1750 | if ( match[2] === "~=" ) {
|
1751 | match[3] = " " + match[3] + " ";
|
1752 | }
|
1753 |
|
1754 | return match.slice( 0, 4 );
|
1755 | },
|
1756 |
|
1757 | "CHILD": function( match ) {
|
1758 | |
1759 |
|
1760 |
|
1761 |
|
1762 |
|
1763 |
|
1764 |
|
1765 |
|
1766 |
|
1767 |
|
1768 | match[1] = match[1].toLowerCase();
|
1769 |
|
1770 | if ( match[1].slice( 0, 3 ) === "nth" ) {
|
1771 |
|
1772 | if ( !match[3] ) {
|
1773 | Sizzle.error( match[0] );
|
1774 | }
|
1775 |
|
1776 |
|
1777 |
|
1778 | match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) );
|
1779 | match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" );
|
1780 |
|
1781 |
|
1782 | } else if ( match[3] ) {
|
1783 | Sizzle.error( match[0] );
|
1784 | }
|
1785 |
|
1786 | return match;
|
1787 | },
|
1788 |
|
1789 | "PSEUDO": function( match ) {
|
1790 | var excess,
|
1791 | unquoted = !match[6] && match[2];
|
1792 |
|
1793 | if ( matchExpr["CHILD"].test( match[0] ) ) {
|
1794 | return null;
|
1795 | }
|
1796 |
|
1797 |
|
1798 | if ( match[3] ) {
|
1799 | match[2] = match[4] || match[5] || "";
|
1800 |
|
1801 |
|
1802 | } else if ( unquoted && rpseudo.test( unquoted ) &&
|
1803 |
|
1804 | (excess = tokenize( unquoted, true )) &&
|
1805 |
|
1806 | (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) {
|
1807 |
|
1808 |
|
1809 | match[0] = match[0].slice( 0, excess );
|
1810 | match[2] = unquoted.slice( 0, excess );
|
1811 | }
|
1812 |
|
1813 |
|
1814 | return match.slice( 0, 3 );
|
1815 | }
|
1816 | },
|
1817 |
|
1818 | filter: {
|
1819 |
|
1820 | "TAG": function( nodeNameSelector ) {
|
1821 | var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();
|
1822 | return nodeNameSelector === "*" ?
|
1823 | function() { return true; } :
|
1824 | function( elem ) {
|
1825 | return elem.nodeName && elem.nodeName.toLowerCase() === nodeName;
|
1826 | };
|
1827 | },
|
1828 |
|
1829 | "CLASS": function( className ) {
|
1830 | var pattern = classCache[ className + " " ];
|
1831 |
|
1832 | return pattern ||
|
1833 | (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) &&
|
1834 | classCache( className, function( elem ) {
|
1835 | return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== "undefined" && elem.getAttribute("class") || "" );
|
1836 | });
|
1837 | },
|
1838 |
|
1839 | "ATTR": function( name, operator, check ) {
|
1840 | return function( elem ) {
|
1841 | var result = Sizzle.attr( elem, name );
|
1842 |
|
1843 | if ( result == null ) {
|
1844 | return operator === "!=";
|
1845 | }
|
1846 | if ( !operator ) {
|
1847 | return true;
|
1848 | }
|
1849 |
|
1850 | result += "";
|
1851 |
|
1852 | return operator === "=" ? result === check :
|
1853 | operator === "!=" ? result !== check :
|
1854 | operator === "^=" ? check && result.indexOf( check ) === 0 :
|
1855 | operator === "*=" ? check && result.indexOf( check ) > -1 :
|
1856 | operator === "$=" ? check && result.slice( -check.length ) === check :
|
1857 | operator === "~=" ? ( " " + result.replace( rwhitespace, " " ) + " " ).indexOf( check ) > -1 :
|
1858 | operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" :
|
1859 | false;
|
1860 | };
|
1861 | },
|
1862 |
|
1863 | "CHILD": function( type, what, argument, first, last ) {
|
1864 | var simple = type.slice( 0, 3 ) !== "nth",
|
1865 | forward = type.slice( -4 ) !== "last",
|
1866 | ofType = what === "of-type";
|
1867 |
|
1868 | return first === 1 && last === 0 ?
|
1869 |
|
1870 |
|
1871 | function( elem ) {
|
1872 | return !!elem.parentNode;
|
1873 | } :
|
1874 |
|
1875 | function( elem, context, xml ) {
|
1876 | var cache, uniqueCache, outerCache, node, nodeIndex, start,
|
1877 | dir = simple !== forward ? "nextSibling" : "previousSibling",
|
1878 | parent = elem.parentNode,
|
1879 | name = ofType && elem.nodeName.toLowerCase(),
|
1880 | useCache = !xml && !ofType,
|
1881 | diff = false;
|
1882 |
|
1883 | if ( parent ) {
|
1884 |
|
1885 |
|
1886 | if ( simple ) {
|
1887 | while ( dir ) {
|
1888 | node = elem;
|
1889 | while ( (node = node[ dir ]) ) {
|
1890 | if ( ofType ?
|
1891 | node.nodeName.toLowerCase() === name :
|
1892 | node.nodeType === 1 ) {
|
1893 |
|
1894 | return false;
|
1895 | }
|
1896 | }
|
1897 |
|
1898 | start = dir = type === "only" && !start && "nextSibling";
|
1899 | }
|
1900 | return true;
|
1901 | }
|
1902 |
|
1903 | start = [ forward ? parent.firstChild : parent.lastChild ];
|
1904 |
|
1905 |
|
1906 | if ( forward && useCache ) {
|
1907 |
|
1908 |
|
1909 |
|
1910 |
|
1911 | node = parent;
|
1912 | outerCache = node[ expando ] || (node[ expando ] = {});
|
1913 |
|
1914 |
|
1915 |
|
1916 | uniqueCache = outerCache[ node.uniqueID ] ||
|
1917 | (outerCache[ node.uniqueID ] = {});
|
1918 |
|
1919 | cache = uniqueCache[ type ] || [];
|
1920 | nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];
|
1921 | diff = nodeIndex && cache[ 2 ];
|
1922 | node = nodeIndex && parent.childNodes[ nodeIndex ];
|
1923 |
|
1924 | while ( (node = ++nodeIndex && node && node[ dir ] ||
|
1925 |
|
1926 |
|
1927 | (diff = nodeIndex = 0) || start.pop()) ) {
|
1928 |
|
1929 |
|
1930 | if ( node.nodeType === 1 && ++diff && node === elem ) {
|
1931 | uniqueCache[ type ] = [ dirruns, nodeIndex, diff ];
|
1932 | break;
|
1933 | }
|
1934 | }
|
1935 |
|
1936 | } else {
|
1937 |
|
1938 | if ( useCache ) {
|
1939 |
|
1940 | node = elem;
|
1941 | outerCache = node[ expando ] || (node[ expando ] = {});
|
1942 |
|
1943 |
|
1944 |
|
1945 | uniqueCache = outerCache[ node.uniqueID ] ||
|
1946 | (outerCache[ node.uniqueID ] = {});
|
1947 |
|
1948 | cache = uniqueCache[ type ] || [];
|
1949 | nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];
|
1950 | diff = nodeIndex;
|
1951 | }
|
1952 |
|
1953 |
|
1954 |
|
1955 | if ( diff === false ) {
|
1956 |
|
1957 | while ( (node = ++nodeIndex && node && node[ dir ] ||
|
1958 | (diff = nodeIndex = 0) || start.pop()) ) {
|
1959 |
|
1960 | if ( ( ofType ?
|
1961 | node.nodeName.toLowerCase() === name :
|
1962 | node.nodeType === 1 ) &&
|
1963 | ++diff ) {
|
1964 |
|
1965 |
|
1966 | if ( useCache ) {
|
1967 | outerCache = node[ expando ] || (node[ expando ] = {});
|
1968 |
|
1969 |
|
1970 |
|
1971 | uniqueCache = outerCache[ node.uniqueID ] ||
|
1972 | (outerCache[ node.uniqueID ] = {});
|
1973 |
|
1974 | uniqueCache[ type ] = [ dirruns, diff ];
|
1975 | }
|
1976 |
|
1977 | if ( node === elem ) {
|
1978 | break;
|
1979 | }
|
1980 | }
|
1981 | }
|
1982 | }
|
1983 | }
|
1984 |
|
1985 |
|
1986 | diff -= last;
|
1987 | return diff === first || ( diff % first === 0 && diff / first >= 0 );
|
1988 | }
|
1989 | };
|
1990 | },
|
1991 |
|
1992 | "PSEUDO": function( pseudo, argument ) {
|
1993 |
|
1994 |
|
1995 |
|
1996 |
|
1997 | var args,
|
1998 | fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||
|
1999 | Sizzle.error( "unsupported pseudo: " + pseudo );
|
2000 |
|
2001 |
|
2002 |
|
2003 |
|
2004 | if ( fn[ expando ] ) {
|
2005 | return fn( argument );
|
2006 | }
|
2007 |
|
2008 |
|
2009 | if ( fn.length > 1 ) {
|
2010 | args = [ pseudo, pseudo, "", argument ];
|
2011 | return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?
|
2012 | markFunction(function( seed, matches ) {
|
2013 | var idx,
|
2014 | matched = fn( seed, argument ),
|
2015 | i = matched.length;
|
2016 | while ( i-- ) {
|
2017 | idx = indexOf( seed, matched[i] );
|
2018 | seed[ idx ] = !( matches[ idx ] = matched[i] );
|
2019 | }
|
2020 | }) :
|
2021 | function( elem ) {
|
2022 | return fn( elem, 0, args );
|
2023 | };
|
2024 | }
|
2025 |
|
2026 | return fn;
|
2027 | }
|
2028 | },
|
2029 |
|
2030 | pseudos: {
|
2031 |
|
2032 | "not": markFunction(function( selector ) {
|
2033 |
|
2034 |
|
2035 |
|
2036 | var input = [],
|
2037 | results = [],
|
2038 | matcher = compile( selector.replace( rtrim, "$1" ) );
|
2039 |
|
2040 | return matcher[ expando ] ?
|
2041 | markFunction(function( seed, matches, context, xml ) {
|
2042 | var elem,
|
2043 | unmatched = matcher( seed, null, xml, [] ),
|
2044 | i = seed.length;
|
2045 |
|
2046 |
|
2047 | while ( i-- ) {
|
2048 | if ( (elem = unmatched[i]) ) {
|
2049 | seed[i] = !(matches[i] = elem);
|
2050 | }
|
2051 | }
|
2052 | }) :
|
2053 | function( elem, context, xml ) {
|
2054 | input[0] = elem;
|
2055 | matcher( input, null, xml, results );
|
2056 |
|
2057 | input[0] = null;
|
2058 | return !results.pop();
|
2059 | };
|
2060 | }),
|
2061 |
|
2062 | "has": markFunction(function( selector ) {
|
2063 | return function( elem ) {
|
2064 | return Sizzle( selector, elem ).length > 0;
|
2065 | };
|
2066 | }),
|
2067 |
|
2068 | "contains": markFunction(function( text ) {
|
2069 | text = text.replace( runescape, funescape );
|
2070 | return function( elem ) {
|
2071 | return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1;
|
2072 | };
|
2073 | }),
|
2074 |
|
2075 |
|
2076 |
|
2077 |
|
2078 |
|
2079 |
|
2080 |
|
2081 |
|
2082 | "lang": markFunction( function( lang ) {
|
2083 |
|
2084 | if ( !ridentifier.test(lang || "") ) {
|
2085 | Sizzle.error( "unsupported lang: " + lang );
|
2086 | }
|
2087 | lang = lang.replace( runescape, funescape ).toLowerCase();
|
2088 | return function( elem ) {
|
2089 | var elemLang;
|
2090 | do {
|
2091 | if ( (elemLang = documentIsHTML ?
|
2092 | elem.lang :
|
2093 | elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) {
|
2094 |
|
2095 | elemLang = elemLang.toLowerCase();
|
2096 | return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0;
|
2097 | }
|
2098 | } while ( (elem = elem.parentNode) && elem.nodeType === 1 );
|
2099 | return false;
|
2100 | };
|
2101 | }),
|
2102 |
|
2103 |
|
2104 | "target": function( elem ) {
|
2105 | var hash = window.location && window.location.hash;
|
2106 | return hash && hash.slice( 1 ) === elem.id;
|
2107 | },
|
2108 |
|
2109 | "root": function( elem ) {
|
2110 | return elem === docElem;
|
2111 | },
|
2112 |
|
2113 | "focus": function( elem ) {
|
2114 | return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);
|
2115 | },
|
2116 |
|
2117 |
|
2118 | "enabled": createDisabledPseudo( false ),
|
2119 | "disabled": createDisabledPseudo( true ),
|
2120 |
|
2121 | "checked": function( elem ) {
|
2122 |
|
2123 |
|
2124 | var nodeName = elem.nodeName.toLowerCase();
|
2125 | return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected);
|
2126 | },
|
2127 |
|
2128 | "selected": function( elem ) {
|
2129 |
|
2130 |
|
2131 | if ( elem.parentNode ) {
|
2132 | elem.parentNode.selectedIndex;
|
2133 | }
|
2134 |
|
2135 | return elem.selected === true;
|
2136 | },
|
2137 |
|
2138 |
|
2139 | "empty": function( elem ) {
|
2140 |
|
2141 |
|
2142 |
|
2143 |
|
2144 | for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
|
2145 | if ( elem.nodeType < 6 ) {
|
2146 | return false;
|
2147 | }
|
2148 | }
|
2149 | return true;
|
2150 | },
|
2151 |
|
2152 | "parent": function( elem ) {
|
2153 | return !Expr.pseudos["empty"]( elem );
|
2154 | },
|
2155 |
|
2156 |
|
2157 | "header": function( elem ) {
|
2158 | return rheader.test( elem.nodeName );
|
2159 | },
|
2160 |
|
2161 | "input": function( elem ) {
|
2162 | return rinputs.test( elem.nodeName );
|
2163 | },
|
2164 |
|
2165 | "button": function( elem ) {
|
2166 | var name = elem.nodeName.toLowerCase();
|
2167 | return name === "input" && elem.type === "button" || name === "button";
|
2168 | },
|
2169 |
|
2170 | "text": function( elem ) {
|
2171 | var attr;
|
2172 | return elem.nodeName.toLowerCase() === "input" &&
|
2173 | elem.type === "text" &&
|
2174 |
|
2175 |
|
2176 |
|
2177 | ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text" );
|
2178 | },
|
2179 |
|
2180 |
|
2181 | "first": createPositionalPseudo(function() {
|
2182 | return [ 0 ];
|
2183 | }),
|
2184 |
|
2185 | "last": createPositionalPseudo(function( matchIndexes, length ) {
|
2186 | return [ length - 1 ];
|
2187 | }),
|
2188 |
|
2189 | "eq": createPositionalPseudo(function( matchIndexes, length, argument ) {
|
2190 | return [ argument < 0 ? argument + length : argument ];
|
2191 | }),
|
2192 |
|
2193 | "even": createPositionalPseudo(function( matchIndexes, length ) {
|
2194 | var i = 0;
|
2195 | for ( ; i < length; i += 2 ) {
|
2196 | matchIndexes.push( i );
|
2197 | }
|
2198 | return matchIndexes;
|
2199 | }),
|
2200 |
|
2201 | "odd": createPositionalPseudo(function( matchIndexes, length ) {
|
2202 | var i = 1;
|
2203 | for ( ; i < length; i += 2 ) {
|
2204 | matchIndexes.push( i );
|
2205 | }
|
2206 | return matchIndexes;
|
2207 | }),
|
2208 |
|
2209 | "lt": createPositionalPseudo(function( matchIndexes, length, argument ) {
|
2210 | var i = argument < 0 ? argument + length : argument;
|
2211 | for ( ; --i >= 0; ) {
|
2212 | matchIndexes.push( i );
|
2213 | }
|
2214 | return matchIndexes;
|
2215 | }),
|
2216 |
|
2217 | "gt": createPositionalPseudo(function( matchIndexes, length, argument ) {
|
2218 | var i = argument < 0 ? argument + length : argument;
|
2219 | for ( ; ++i < length; ) {
|
2220 | matchIndexes.push( i );
|
2221 | }
|
2222 | return matchIndexes;
|
2223 | })
|
2224 | }
|
2225 | };
|
2226 |
|
2227 | Expr.pseudos["nth"] = Expr.pseudos["eq"];
|
2228 |
|
2229 |
|
2230 | for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {
|
2231 | Expr.pseudos[ i ] = createInputPseudo( i );
|
2232 | }
|
2233 | for ( i in { submit: true, reset: true } ) {
|
2234 | Expr.pseudos[ i ] = createButtonPseudo( i );
|
2235 | }
|
2236 |
|
2237 |
|
2238 | function setFilters() {}
|
2239 | setFilters.prototype = Expr.filters = Expr.pseudos;
|
2240 | Expr.setFilters = new setFilters();
|
2241 |
|
2242 | tokenize = Sizzle.tokenize = function( selector, parseOnly ) {
|
2243 | var matched, match, tokens, type,
|
2244 | soFar, groups, preFilters,
|
2245 | cached = tokenCache[ selector + " " ];
|
2246 |
|
2247 | if ( cached ) {
|
2248 | return parseOnly ? 0 : cached.slice( 0 );
|
2249 | }
|
2250 |
|
2251 | soFar = selector;
|
2252 | groups = [];
|
2253 | preFilters = Expr.preFilter;
|
2254 |
|
2255 | while ( soFar ) {
|
2256 |
|
2257 |
|
2258 | if ( !matched || (match = rcomma.exec( soFar )) ) {
|
2259 | if ( match ) {
|
2260 |
|
2261 | soFar = soFar.slice( match[0].length ) || soFar;
|
2262 | }
|
2263 | groups.push( (tokens = []) );
|
2264 | }
|
2265 |
|
2266 | matched = false;
|
2267 |
|
2268 |
|
2269 | if ( (match = rcombinators.exec( soFar )) ) {
|
2270 | matched = match.shift();
|
2271 | tokens.push({
|
2272 | value: matched,
|
2273 |
|
2274 | type: match[0].replace( rtrim, " " )
|
2275 | });
|
2276 | soFar = soFar.slice( matched.length );
|
2277 | }
|
2278 |
|
2279 |
|
2280 | for ( type in Expr.filter ) {
|
2281 | if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||
|
2282 | (match = preFilters[ type ]( match ))) ) {
|
2283 | matched = match.shift();
|
2284 | tokens.push({
|
2285 | value: matched,
|
2286 | type: type,
|
2287 | matches: match
|
2288 | });
|
2289 | soFar = soFar.slice( matched.length );
|
2290 | }
|
2291 | }
|
2292 |
|
2293 | if ( !matched ) {
|
2294 | break;
|
2295 | }
|
2296 | }
|
2297 |
|
2298 |
|
2299 |
|
2300 |
|
2301 | return parseOnly ?
|
2302 | soFar.length :
|
2303 | soFar ?
|
2304 | Sizzle.error( selector ) :
|
2305 |
|
2306 | tokenCache( selector, groups ).slice( 0 );
|
2307 | };
|
2308 |
|
2309 | function toSelector( tokens ) {
|
2310 | var i = 0,
|
2311 | len = tokens.length,
|
2312 | selector = "";
|
2313 | for ( ; i < len; i++ ) {
|
2314 | selector += tokens[i].value;
|
2315 | }
|
2316 | return selector;
|
2317 | }
|
2318 |
|
2319 | function addCombinator( matcher, combinator, base ) {
|
2320 | var dir = combinator.dir,
|
2321 | skip = combinator.next,
|
2322 | key = skip || dir,
|
2323 | checkNonElements = base && key === "parentNode",
|
2324 | doneName = done++;
|
2325 |
|
2326 | return combinator.first ?
|
2327 |
|
2328 | function( elem, context, xml ) {
|
2329 | while ( (elem = elem[ dir ]) ) {
|
2330 | if ( elem.nodeType === 1 || checkNonElements ) {
|
2331 | return matcher( elem, context, xml );
|
2332 | }
|
2333 | }
|
2334 | return false;
|
2335 | } :
|
2336 |
|
2337 |
|
2338 | function( elem, context, xml ) {
|
2339 | var oldCache, uniqueCache, outerCache,
|
2340 | newCache = [ dirruns, doneName ];
|
2341 |
|
2342 |
|
2343 | if ( xml ) {
|
2344 | while ( (elem = elem[ dir ]) ) {
|
2345 | if ( elem.nodeType === 1 || checkNonElements ) {
|
2346 | if ( matcher( elem, context, xml ) ) {
|
2347 | return true;
|
2348 | }
|
2349 | }
|
2350 | }
|
2351 | } else {
|
2352 | while ( (elem = elem[ dir ]) ) {
|
2353 | if ( elem.nodeType === 1 || checkNonElements ) {
|
2354 | outerCache = elem[ expando ] || (elem[ expando ] = {});
|
2355 |
|
2356 |
|
2357 |
|
2358 | uniqueCache = outerCache[ elem.uniqueID ] || (outerCache[ elem.uniqueID ] = {});
|
2359 |
|
2360 | if ( skip && skip === elem.nodeName.toLowerCase() ) {
|
2361 | elem = elem[ dir ] || elem;
|
2362 | } else if ( (oldCache = uniqueCache[ key ]) &&
|
2363 | oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) {
|
2364 |
|
2365 |
|
2366 | return (newCache[ 2 ] = oldCache[ 2 ]);
|
2367 | } else {
|
2368 |
|
2369 | uniqueCache[ key ] = newCache;
|
2370 |
|
2371 |
|
2372 | if ( (newCache[ 2 ] = matcher( elem, context, xml )) ) {
|
2373 | return true;
|
2374 | }
|
2375 | }
|
2376 | }
|
2377 | }
|
2378 | }
|
2379 | return false;
|
2380 | };
|
2381 | }
|
2382 |
|
2383 | function elementMatcher( matchers ) {
|
2384 | return matchers.length > 1 ?
|
2385 | function( elem, context, xml ) {
|
2386 | var i = matchers.length;
|
2387 | while ( i-- ) {
|
2388 | if ( !matchers[i]( elem, context, xml ) ) {
|
2389 | return false;
|
2390 | }
|
2391 | }
|
2392 | return true;
|
2393 | } :
|
2394 | matchers[0];
|
2395 | }
|
2396 |
|
2397 | function multipleContexts( selector, contexts, results ) {
|
2398 | var i = 0,
|
2399 | len = contexts.length;
|
2400 | for ( ; i < len; i++ ) {
|
2401 | Sizzle( selector, contexts[i], results );
|
2402 | }
|
2403 | return results;
|
2404 | }
|
2405 |
|
2406 | function condense( unmatched, map, filter, context, xml ) {
|
2407 | var elem,
|
2408 | newUnmatched = [],
|
2409 | i = 0,
|
2410 | len = unmatched.length,
|
2411 | mapped = map != null;
|
2412 |
|
2413 | for ( ; i < len; i++ ) {
|
2414 | if ( (elem = unmatched[i]) ) {
|
2415 | if ( !filter || filter( elem, context, xml ) ) {
|
2416 | newUnmatched.push( elem );
|
2417 | if ( mapped ) {
|
2418 | map.push( i );
|
2419 | }
|
2420 | }
|
2421 | }
|
2422 | }
|
2423 |
|
2424 | return newUnmatched;
|
2425 | }
|
2426 |
|
2427 | function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
|
2428 | if ( postFilter && !postFilter[ expando ] ) {
|
2429 | postFilter = setMatcher( postFilter );
|
2430 | }
|
2431 | if ( postFinder && !postFinder[ expando ] ) {
|
2432 | postFinder = setMatcher( postFinder, postSelector );
|
2433 | }
|
2434 | return markFunction(function( seed, results, context, xml ) {
|
2435 | var temp, i, elem,
|
2436 | preMap = [],
|
2437 | postMap = [],
|
2438 | preexisting = results.length,
|
2439 |
|
2440 |
|
2441 | elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ),
|
2442 |
|
2443 |
|
2444 | matcherIn = preFilter && ( seed || !selector ) ?
|
2445 | condense( elems, preMap, preFilter, context, xml ) :
|
2446 | elems,
|
2447 |
|
2448 | matcherOut = matcher ?
|
2449 |
|
2450 | postFinder || ( seed ? preFilter : preexisting || postFilter ) ?
|
2451 |
|
2452 |
|
2453 | [] :
|
2454 |
|
2455 |
|
2456 | results :
|
2457 | matcherIn;
|
2458 |
|
2459 |
|
2460 | if ( matcher ) {
|
2461 | matcher( matcherIn, matcherOut, context, xml );
|
2462 | }
|
2463 |
|
2464 |
|
2465 | if ( postFilter ) {
|
2466 | temp = condense( matcherOut, postMap );
|
2467 | postFilter( temp, [], context, xml );
|
2468 |
|
2469 |
|
2470 | i = temp.length;
|
2471 | while ( i-- ) {
|
2472 | if ( (elem = temp[i]) ) {
|
2473 | matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem);
|
2474 | }
|
2475 | }
|
2476 | }
|
2477 |
|
2478 | if ( seed ) {
|
2479 | if ( postFinder || preFilter ) {
|
2480 | if ( postFinder ) {
|
2481 |
|
2482 | temp = [];
|
2483 | i = matcherOut.length;
|
2484 | while ( i-- ) {
|
2485 | if ( (elem = matcherOut[i]) ) {
|
2486 |
|
2487 | temp.push( (matcherIn[i] = elem) );
|
2488 | }
|
2489 | }
|
2490 | postFinder( null, (matcherOut = []), temp, xml );
|
2491 | }
|
2492 |
|
2493 |
|
2494 | i = matcherOut.length;
|
2495 | while ( i-- ) {
|
2496 | if ( (elem = matcherOut[i]) &&
|
2497 | (temp = postFinder ? indexOf( seed, elem ) : preMap[i]) > -1 ) {
|
2498 |
|
2499 | seed[temp] = !(results[temp] = elem);
|
2500 | }
|
2501 | }
|
2502 | }
|
2503 |
|
2504 |
|
2505 | } else {
|
2506 | matcherOut = condense(
|
2507 | matcherOut === results ?
|
2508 | matcherOut.splice( preexisting, matcherOut.length ) :
|
2509 | matcherOut
|
2510 | );
|
2511 | if ( postFinder ) {
|
2512 | postFinder( null, results, matcherOut, xml );
|
2513 | } else {
|
2514 | push.apply( results, matcherOut );
|
2515 | }
|
2516 | }
|
2517 | });
|
2518 | }
|
2519 |
|
2520 | function matcherFromTokens( tokens ) {
|
2521 | var checkContext, matcher, j,
|
2522 | len = tokens.length,
|
2523 | leadingRelative = Expr.relative[ tokens[0].type ],
|
2524 | implicitRelative = leadingRelative || Expr.relative[" "],
|
2525 | i = leadingRelative ? 1 : 0,
|
2526 |
|
2527 |
|
2528 | matchContext = addCombinator( function( elem ) {
|
2529 | return elem === checkContext;
|
2530 | }, implicitRelative, true ),
|
2531 | matchAnyContext = addCombinator( function( elem ) {
|
2532 | return indexOf( checkContext, elem ) > -1;
|
2533 | }, implicitRelative, true ),
|
2534 | matchers = [ function( elem, context, xml ) {
|
2535 | var ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || (
|
2536 | (checkContext = context).nodeType ?
|
2537 | matchContext( elem, context, xml ) :
|
2538 | matchAnyContext( elem, context, xml ) );
|
2539 |
|
2540 | checkContext = null;
|
2541 | return ret;
|
2542 | } ];
|
2543 |
|
2544 | for ( ; i < len; i++ ) {
|
2545 | if ( (matcher = Expr.relative[ tokens[i].type ]) ) {
|
2546 | matchers = [ addCombinator(elementMatcher( matchers ), matcher) ];
|
2547 | } else {
|
2548 | matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches );
|
2549 |
|
2550 |
|
2551 | if ( matcher[ expando ] ) {
|
2552 |
|
2553 | j = ++i;
|
2554 | for ( ; j < len; j++ ) {
|
2555 | if ( Expr.relative[ tokens[j].type ] ) {
|
2556 | break;
|
2557 | }
|
2558 | }
|
2559 | return setMatcher(
|
2560 | i > 1 && elementMatcher( matchers ),
|
2561 | i > 1 && toSelector(
|
2562 |
|
2563 | tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" })
|
2564 | ).replace( rtrim, "$1" ),
|
2565 | matcher,
|
2566 | i < j && matcherFromTokens( tokens.slice( i, j ) ),
|
2567 | j < len && matcherFromTokens( (tokens = tokens.slice( j )) ),
|
2568 | j < len && toSelector( tokens )
|
2569 | );
|
2570 | }
|
2571 | matchers.push( matcher );
|
2572 | }
|
2573 | }
|
2574 |
|
2575 | return elementMatcher( matchers );
|
2576 | }
|
2577 |
|
2578 | function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
|
2579 | var bySet = setMatchers.length > 0,
|
2580 | byElement = elementMatchers.length > 0,
|
2581 | superMatcher = function( seed, context, xml, results, outermost ) {
|
2582 | var elem, j, matcher,
|
2583 | matchedCount = 0,
|
2584 | i = "0",
|
2585 | unmatched = seed && [],
|
2586 | setMatched = [],
|
2587 | contextBackup = outermostContext,
|
2588 |
|
2589 | elems = seed || byElement && Expr.find["TAG"]( "*", outermost ),
|
2590 |
|
2591 | dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1),
|
2592 | len = elems.length;
|
2593 |
|
2594 | if ( outermost ) {
|
2595 | outermostContext = context === document || context || outermost;
|
2596 | }
|
2597 |
|
2598 |
|
2599 |
|
2600 |
|
2601 | for ( ; i !== len && (elem = elems[i]) != null; i++ ) {
|
2602 | if ( byElement && elem ) {
|
2603 | j = 0;
|
2604 | if ( !context && elem.ownerDocument !== document ) {
|
2605 | setDocument( elem );
|
2606 | xml = !documentIsHTML;
|
2607 | }
|
2608 | while ( (matcher = elementMatchers[j++]) ) {
|
2609 | if ( matcher( elem, context || document, xml) ) {
|
2610 | results.push( elem );
|
2611 | break;
|
2612 | }
|
2613 | }
|
2614 | if ( outermost ) {
|
2615 | dirruns = dirrunsUnique;
|
2616 | }
|
2617 | }
|
2618 |
|
2619 |
|
2620 | if ( bySet ) {
|
2621 |
|
2622 | if ( (elem = !matcher && elem) ) {
|
2623 | matchedCount--;
|
2624 | }
|
2625 |
|
2626 |
|
2627 | if ( seed ) {
|
2628 | unmatched.push( elem );
|
2629 | }
|
2630 | }
|
2631 | }
|
2632 |
|
2633 |
|
2634 |
|
2635 | matchedCount += i;
|
2636 |
|
2637 |
|
2638 |
|
2639 |
|
2640 |
|
2641 |
|
2642 |
|
2643 |
|
2644 | if ( bySet && i !== matchedCount ) {
|
2645 | j = 0;
|
2646 | while ( (matcher = setMatchers[j++]) ) {
|
2647 | matcher( unmatched, setMatched, context, xml );
|
2648 | }
|
2649 |
|
2650 | if ( seed ) {
|
2651 |
|
2652 | if ( matchedCount > 0 ) {
|
2653 | while ( i-- ) {
|
2654 | if ( !(unmatched[i] || setMatched[i]) ) {
|
2655 | setMatched[i] = pop.call( results );
|
2656 | }
|
2657 | }
|
2658 | }
|
2659 |
|
2660 |
|
2661 | setMatched = condense( setMatched );
|
2662 | }
|
2663 |
|
2664 |
|
2665 | push.apply( results, setMatched );
|
2666 |
|
2667 |
|
2668 | if ( outermost && !seed && setMatched.length > 0 &&
|
2669 | ( matchedCount + setMatchers.length ) > 1 ) {
|
2670 |
|
2671 | Sizzle.uniqueSort( results );
|
2672 | }
|
2673 | }
|
2674 |
|
2675 |
|
2676 | if ( outermost ) {
|
2677 | dirruns = dirrunsUnique;
|
2678 | outermostContext = contextBackup;
|
2679 | }
|
2680 |
|
2681 | return unmatched;
|
2682 | };
|
2683 |
|
2684 | return bySet ?
|
2685 | markFunction( superMatcher ) :
|
2686 | superMatcher;
|
2687 | }
|
2688 |
|
2689 | compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) {
|
2690 | var i,
|
2691 | setMatchers = [],
|
2692 | elementMatchers = [],
|
2693 | cached = compilerCache[ selector + " " ];
|
2694 |
|
2695 | if ( !cached ) {
|
2696 |
|
2697 | if ( !match ) {
|
2698 | match = tokenize( selector );
|
2699 | }
|
2700 | i = match.length;
|
2701 | while ( i-- ) {
|
2702 | cached = matcherFromTokens( match[i] );
|
2703 | if ( cached[ expando ] ) {
|
2704 | setMatchers.push( cached );
|
2705 | } else {
|
2706 | elementMatchers.push( cached );
|
2707 | }
|
2708 | }
|
2709 |
|
2710 |
|
2711 | cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) );
|
2712 |
|
2713 |
|
2714 | cached.selector = selector;
|
2715 | }
|
2716 | return cached;
|
2717 | };
|
2718 |
|
2719 |
|
2720 |
|
2721 |
|
2722 |
|
2723 |
|
2724 |
|
2725 |
|
2726 |
|
2727 |
|
2728 | select = Sizzle.select = function( selector, context, results, seed ) {
|
2729 | var i, tokens, token, type, find,
|
2730 | compiled = typeof selector === "function" && selector,
|
2731 | match = !seed && tokenize( (selector = compiled.selector || selector) );
|
2732 |
|
2733 | results = results || [];
|
2734 |
|
2735 |
|
2736 |
|
2737 | if ( match.length === 1 ) {
|
2738 |
|
2739 |
|
2740 | tokens = match[0] = match[0].slice( 0 );
|
2741 | if ( tokens.length > 2 && (token = tokens[0]).type === "ID" &&
|
2742 | context.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[1].type ] ) {
|
2743 |
|
2744 | context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];
|
2745 | if ( !context ) {
|
2746 | return results;
|
2747 |
|
2748 |
|
2749 | } else if ( compiled ) {
|
2750 | context = context.parentNode;
|
2751 | }
|
2752 |
|
2753 | selector = selector.slice( tokens.shift().value.length );
|
2754 | }
|
2755 |
|
2756 |
|
2757 | i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length;
|
2758 | while ( i-- ) {
|
2759 | token = tokens[i];
|
2760 |
|
2761 |
|
2762 | if ( Expr.relative[ (type = token.type) ] ) {
|
2763 | break;
|
2764 | }
|
2765 | if ( (find = Expr.find[ type ]) ) {
|
2766 |
|
2767 | if ( (seed = find(
|
2768 | token.matches[0].replace( runescape, funescape ),
|
2769 | rsibling.test( tokens[0].type ) && testContext( context.parentNode ) || context
|
2770 | )) ) {
|
2771 |
|
2772 |
|
2773 | tokens.splice( i, 1 );
|
2774 | selector = seed.length && toSelector( tokens );
|
2775 | if ( !selector ) {
|
2776 | push.apply( results, seed );
|
2777 | return results;
|
2778 | }
|
2779 |
|
2780 | break;
|
2781 | }
|
2782 | }
|
2783 | }
|
2784 | }
|
2785 |
|
2786 |
|
2787 |
|
2788 | ( compiled || compile( selector, match ) )(
|
2789 | seed,
|
2790 | context,
|
2791 | !documentIsHTML,
|
2792 | results,
|
2793 | !context || rsibling.test( selector ) && testContext( context.parentNode ) || context
|
2794 | );
|
2795 | return results;
|
2796 | };
|
2797 |
|
2798 |
|
2799 |
|
2800 |
|
2801 | support.sortStable = expando.split("").sort( sortOrder ).join("") === expando;
|
2802 |
|
2803 |
|
2804 |
|
2805 | support.detectDuplicates = !!hasDuplicate;
|
2806 |
|
2807 |
|
2808 | setDocument();
|
2809 |
|
2810 |
|
2811 |
|
2812 | support.sortDetached = assert(function( el ) {
|
2813 |
|
2814 | return el.compareDocumentPosition( document.createElement("fieldset") ) & 1;
|
2815 | });
|
2816 |
|
2817 |
|
2818 |
|
2819 |
|
2820 | if ( !assert(function( el ) {
|
2821 | el.innerHTML = "<a href='#'></a>";
|
2822 | return el.firstChild.getAttribute("href") === "#" ;
|
2823 | }) ) {
|
2824 | addHandle( "type|href|height|width", function( elem, name, isXML ) {
|
2825 | if ( !isXML ) {
|
2826 | return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 );
|
2827 | }
|
2828 | });
|
2829 | }
|
2830 |
|
2831 |
|
2832 |
|
2833 | if ( !support.attributes || !assert(function( el ) {
|
2834 | el.innerHTML = "<input/>";
|
2835 | el.firstChild.setAttribute( "value", "" );
|
2836 | return el.firstChild.getAttribute( "value" ) === "";
|
2837 | }) ) {
|
2838 | addHandle( "value", function( elem, name, isXML ) {
|
2839 | if ( !isXML && elem.nodeName.toLowerCase() === "input" ) {
|
2840 | return elem.defaultValue;
|
2841 | }
|
2842 | });
|
2843 | }
|
2844 |
|
2845 |
|
2846 |
|
2847 | if ( !assert(function( el ) {
|
2848 | return el.getAttribute("disabled") == null;
|
2849 | }) ) {
|
2850 | addHandle( booleans, function( elem, name, isXML ) {
|
2851 | var val;
|
2852 | if ( !isXML ) {
|
2853 | return elem[ name ] === true ? name.toLowerCase() :
|
2854 | (val = elem.getAttributeNode( name )) && val.specified ?
|
2855 | val.value :
|
2856 | null;
|
2857 | }
|
2858 | });
|
2859 | }
|
2860 |
|
2861 | return Sizzle;
|
2862 |
|
2863 | })( window );
|
2864 |
|
2865 |
|
2866 |
|
2867 | jQuery.find = Sizzle;
|
2868 | jQuery.expr = Sizzle.selectors;
|
2869 |
|
2870 |
|
2871 | jQuery.expr[ ":" ] = jQuery.expr.pseudos;
|
2872 | jQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort;
|
2873 | jQuery.text = Sizzle.getText;
|
2874 | jQuery.isXMLDoc = Sizzle.isXML;
|
2875 | jQuery.contains = Sizzle.contains;
|
2876 | jQuery.escapeSelector = Sizzle.escape;
|
2877 |
|
2878 |
|
2879 |
|
2880 |
|
2881 | var dir = function( elem, dir, until ) {
|
2882 | var matched = [],
|
2883 | truncate = until !== undefined;
|
2884 |
|
2885 | while ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) {
|
2886 | if ( elem.nodeType === 1 ) {
|
2887 | if ( truncate && jQuery( elem ).is( until ) ) {
|
2888 | break;
|
2889 | }
|
2890 | matched.push( elem );
|
2891 | }
|
2892 | }
|
2893 | return matched;
|
2894 | };
|
2895 |
|
2896 |
|
2897 | var siblings = function( n, elem ) {
|
2898 | var matched = [];
|
2899 |
|
2900 | for ( ; n; n = n.nextSibling ) {
|
2901 | if ( n.nodeType === 1 && n !== elem ) {
|
2902 | matched.push( n );
|
2903 | }
|
2904 | }
|
2905 |
|
2906 | return matched;
|
2907 | };
|
2908 |
|
2909 |
|
2910 | var rneedsContext = jQuery.expr.match.needsContext;
|
2911 |
|
2912 |
|
2913 |
|
2914 | function nodeName( elem, name ) {
|
2915 |
|
2916 | return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
|
2917 |
|
2918 | };
|
2919 | var rsingleTag = ( /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i );
|
2920 |
|
2921 |
|
2922 |
|
2923 | var risSimple = /^.[^:#\[\.,]*$/;
|
2924 |
|
2925 |
|
2926 | function winnow( elements, qualifier, not ) {
|
2927 | if ( jQuery.isFunction( qualifier ) ) {
|
2928 | return jQuery.grep( elements, function( elem, i ) {
|
2929 | return !!qualifier.call( elem, i, elem ) !== not;
|
2930 | } );
|
2931 | }
|
2932 |
|
2933 |
|
2934 | if ( qualifier.nodeType ) {
|
2935 | return jQuery.grep( elements, function( elem ) {
|
2936 | return ( elem === qualifier ) !== not;
|
2937 | } );
|
2938 | }
|
2939 |
|
2940 |
|
2941 | if ( typeof qualifier !== "string" ) {
|
2942 | return jQuery.grep( elements, function( elem ) {
|
2943 | return ( indexOf.call( qualifier, elem ) > -1 ) !== not;
|
2944 | } );
|
2945 | }
|
2946 |
|
2947 |
|
2948 | if ( risSimple.test( qualifier ) ) {
|
2949 | return jQuery.filter( qualifier, elements, not );
|
2950 | }
|
2951 |
|
2952 |
|
2953 | qualifier = jQuery.filter( qualifier, elements );
|
2954 | return jQuery.grep( elements, function( elem ) {
|
2955 | return ( indexOf.call( qualifier, elem ) > -1 ) !== not && elem.nodeType === 1;
|
2956 | } );
|
2957 | }
|
2958 |
|
2959 | jQuery.filter = function( expr, elems, not ) {
|
2960 | var elem = elems[ 0 ];
|
2961 |
|
2962 | if ( not ) {
|
2963 | expr = ":not(" + expr + ")";
|
2964 | }
|
2965 |
|
2966 | if ( elems.length === 1 && elem.nodeType === 1 ) {
|
2967 | return jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [];
|
2968 | }
|
2969 |
|
2970 | return jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {
|
2971 | return elem.nodeType === 1;
|
2972 | } ) );
|
2973 | };
|
2974 |
|
2975 | jQuery.fn.extend( {
|
2976 | find: function( selector ) {
|
2977 | var i, ret,
|
2978 | len = this.length,
|
2979 | self = this;
|
2980 |
|
2981 | if ( typeof selector !== "string" ) {
|
2982 | return this.pushStack( jQuery( selector ).filter( function() {
|
2983 | for ( i = 0; i < len; i++ ) {
|
2984 | if ( jQuery.contains( self[ i ], this ) ) {
|
2985 | return true;
|
2986 | }
|
2987 | }
|
2988 | } ) );
|
2989 | }
|
2990 |
|
2991 | ret = this.pushStack( [] );
|
2992 |
|
2993 | for ( i = 0; i < len; i++ ) {
|
2994 | jQuery.find( selector, self[ i ], ret );
|
2995 | }
|
2996 |
|
2997 | return len > 1 ? jQuery.uniqueSort( ret ) : ret;
|
2998 | },
|
2999 | filter: function( selector ) {
|
3000 | return this.pushStack( winnow( this, selector || [], false ) );
|
3001 | },
|
3002 | not: function( selector ) {
|
3003 | return this.pushStack( winnow( this, selector || [], true ) );
|
3004 | },
|
3005 | is: function( selector ) {
|
3006 | return !!winnow(
|
3007 | this,
|
3008 |
|
3009 |
|
3010 |
|
3011 | typeof selector === "string" && rneedsContext.test( selector ) ?
|
3012 | jQuery( selector ) :
|
3013 | selector || [],
|
3014 | false
|
3015 | ).length;
|
3016 | }
|
3017 | } );
|
3018 |
|
3019 |
|
3020 |
|
3021 |
|
3022 |
|
3023 |
|
3024 | var rootjQuery,
|
3025 |
|
3026 |
|
3027 |
|
3028 |
|
3029 |
|
3030 | rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,
|
3031 |
|
3032 | init = jQuery.fn.init = function( selector, context, root ) {
|
3033 | var match, elem;
|
3034 |
|
3035 |
|
3036 | if ( !selector ) {
|
3037 | return this;
|
3038 | }
|
3039 |
|
3040 |
|
3041 |
|
3042 | root = root || rootjQuery;
|
3043 |
|
3044 |
|
3045 | if ( typeof selector === "string" ) {
|
3046 | if ( selector[ 0 ] === "<" &&
|
3047 | selector[ selector.length - 1 ] === ">" &&
|
3048 | selector.length >= 3 ) {
|
3049 |
|
3050 |
|
3051 | match = [ null, selector, null ];
|
3052 |
|
3053 | } else {
|
3054 | match = rquickExpr.exec( selector );
|
3055 | }
|
3056 |
|
3057 |
|
3058 | if ( match && ( match[ 1 ] || !context ) ) {
|
3059 |
|
3060 |
|
3061 | if ( match[ 1 ] ) {
|
3062 | context = context instanceof jQuery ? context[ 0 ] : context;
|
3063 |
|
3064 |
|
3065 |
|
3066 | jQuery.merge( this, jQuery.parseHTML(
|
3067 | match[ 1 ],
|
3068 | context && context.nodeType ? context.ownerDocument || context : document,
|
3069 | true
|
3070 | ) );
|
3071 |
|
3072 |
|
3073 | if ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) {
|
3074 | for ( match in context ) {
|
3075 |
|
3076 |
|
3077 | if ( jQuery.isFunction( this[ match ] ) ) {
|
3078 | this[ match ]( context[ match ] );
|
3079 |
|
3080 |
|
3081 | } else {
|
3082 | this.attr( match, context[ match ] );
|
3083 | }
|
3084 | }
|
3085 | }
|
3086 |
|
3087 | return this;
|
3088 |
|
3089 |
|
3090 | } else {
|
3091 | elem = document.getElementById( match[ 2 ] );
|
3092 |
|
3093 | if ( elem ) {
|
3094 |
|
3095 |
|
3096 | this[ 0 ] = elem;
|
3097 | this.length = 1;
|
3098 | }
|
3099 | return this;
|
3100 | }
|
3101 |
|
3102 |
|
3103 | } else if ( !context || context.jquery ) {
|
3104 | return ( context || root ).find( selector );
|
3105 |
|
3106 |
|
3107 |
|
3108 | } else {
|
3109 | return this.constructor( context ).find( selector );
|
3110 | }
|
3111 |
|
3112 |
|
3113 | } else if ( selector.nodeType ) {
|
3114 | this[ 0 ] = selector;
|
3115 | this.length = 1;
|
3116 | return this;
|
3117 |
|
3118 |
|
3119 |
|
3120 | } else if ( jQuery.isFunction( selector ) ) {
|
3121 | return root.ready !== undefined ?
|
3122 | root.ready( selector ) :
|
3123 |
|
3124 |
|
3125 | selector( jQuery );
|
3126 | }
|
3127 |
|
3128 | return jQuery.makeArray( selector, this );
|
3129 | };
|
3130 |
|
3131 |
|
3132 | init.prototype = jQuery.fn;
|
3133 |
|
3134 |
|
3135 | rootjQuery = jQuery( document );
|
3136 |
|
3137 |
|
3138 | var rparentsprev = /^(?:parents|prev(?:Until|All))/,
|
3139 |
|
3140 |
|
3141 | guaranteedUnique = {
|
3142 | children: true,
|
3143 | contents: true,
|
3144 | next: true,
|
3145 | prev: true
|
3146 | };
|
3147 |
|
3148 | jQuery.fn.extend( {
|
3149 | has: function( target ) {
|
3150 | var targets = jQuery( target, this ),
|
3151 | l = targets.length;
|
3152 |
|
3153 | return this.filter( function() {
|
3154 | var i = 0;
|
3155 | for ( ; i < l; i++ ) {
|
3156 | if ( jQuery.contains( this, targets[ i ] ) ) {
|
3157 | return true;
|
3158 | }
|
3159 | }
|
3160 | } );
|
3161 | },
|
3162 |
|
3163 | closest: function( selectors, context ) {
|
3164 | var cur,
|
3165 | i = 0,
|
3166 | l = this.length,
|
3167 | matched = [],
|
3168 | targets = typeof selectors !== "string" && jQuery( selectors );
|
3169 |
|
3170 |
|
3171 | if ( !rneedsContext.test( selectors ) ) {
|
3172 | for ( ; i < l; i++ ) {
|
3173 | for ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) {
|
3174 |
|
3175 |
|
3176 | if ( cur.nodeType < 11 && ( targets ?
|
3177 | targets.index( cur ) > -1 :
|
3178 |
|
3179 |
|
3180 | cur.nodeType === 1 &&
|
3181 | jQuery.find.matchesSelector( cur, selectors ) ) ) {
|
3182 |
|
3183 | matched.push( cur );
|
3184 | break;
|
3185 | }
|
3186 | }
|
3187 | }
|
3188 | }
|
3189 |
|
3190 | return this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched );
|
3191 | },
|
3192 |
|
3193 |
|
3194 | index: function( elem ) {
|
3195 |
|
3196 |
|
3197 | if ( !elem ) {
|
3198 | return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1;
|
3199 | }
|
3200 |
|
3201 |
|
3202 | if ( typeof elem === "string" ) {
|
3203 | return indexOf.call( jQuery( elem ), this[ 0 ] );
|
3204 | }
|
3205 |
|
3206 |
|
3207 | return indexOf.call( this,
|
3208 |
|
3209 |
|
3210 | elem.jquery ? elem[ 0 ] : elem
|
3211 | );
|
3212 | },
|
3213 |
|
3214 | add: function( selector, context ) {
|
3215 | return this.pushStack(
|
3216 | jQuery.uniqueSort(
|
3217 | jQuery.merge( this.get(), jQuery( selector, context ) )
|
3218 | )
|
3219 | );
|
3220 | },
|
3221 |
|
3222 | addBack: function( selector ) {
|
3223 | return this.add( selector == null ?
|
3224 | this.prevObject : this.prevObject.filter( selector )
|
3225 | );
|
3226 | }
|
3227 | } );
|
3228 |
|
3229 | function sibling( cur, dir ) {
|
3230 | while ( ( cur = cur[ dir ] ) && cur.nodeType !== 1 ) {}
|
3231 | return cur;
|
3232 | }
|
3233 |
|
3234 | jQuery.each( {
|
3235 | parent: function( elem ) {
|
3236 | var parent = elem.parentNode;
|
3237 | return parent && parent.nodeType !== 11 ? parent : null;
|
3238 | },
|
3239 | parents: function( elem ) {
|
3240 | return dir( elem, "parentNode" );
|
3241 | },
|
3242 | parentsUntil: function( elem, i, until ) {
|
3243 | return dir( elem, "parentNode", until );
|
3244 | },
|
3245 | next: function( elem ) {
|
3246 | return sibling( elem, "nextSibling" );
|
3247 | },
|
3248 | prev: function( elem ) {
|
3249 | return sibling( elem, "previousSibling" );
|
3250 | },
|
3251 | nextAll: function( elem ) {
|
3252 | return dir( elem, "nextSibling" );
|
3253 | },
|
3254 | prevAll: function( elem ) {
|
3255 | return dir( elem, "previousSibling" );
|
3256 | },
|
3257 | nextUntil: function( elem, i, until ) {
|
3258 | return dir( elem, "nextSibling", until );
|
3259 | },
|
3260 | prevUntil: function( elem, i, until ) {
|
3261 | return dir( elem, "previousSibling", until );
|
3262 | },
|
3263 | siblings: function( elem ) {
|
3264 | return siblings( ( elem.parentNode || {} ).firstChild, elem );
|
3265 | },
|
3266 | children: function( elem ) {
|
3267 | return siblings( elem.firstChild );
|
3268 | },
|
3269 | contents: function( elem ) {
|
3270 | if ( nodeName( elem, "iframe" ) ) {
|
3271 | return elem.contentDocument;
|
3272 | }
|
3273 |
|
3274 |
|
3275 |
|
3276 |
|
3277 | if ( nodeName( elem, "template" ) ) {
|
3278 | elem = elem.content || elem;
|
3279 | }
|
3280 |
|
3281 | return jQuery.merge( [], elem.childNodes );
|
3282 | }
|
3283 | }, function( name, fn ) {
|
3284 | jQuery.fn[ name ] = function( until, selector ) {
|
3285 | var matched = jQuery.map( this, fn, until );
|
3286 |
|
3287 | if ( name.slice( -5 ) !== "Until" ) {
|
3288 | selector = until;
|
3289 | }
|
3290 |
|
3291 | if ( selector && typeof selector === "string" ) {
|
3292 | matched = jQuery.filter( selector, matched );
|
3293 | }
|
3294 |
|
3295 | if ( this.length > 1 ) {
|
3296 |
|
3297 |
|
3298 | if ( !guaranteedUnique[ name ] ) {
|
3299 | jQuery.uniqueSort( matched );
|
3300 | }
|
3301 |
|
3302 |
|
3303 | if ( rparentsprev.test( name ) ) {
|
3304 | matched.reverse();
|
3305 | }
|
3306 | }
|
3307 |
|
3308 | return this.pushStack( matched );
|
3309 | };
|
3310 | } );
|
3311 | var rnothtmlwhite = ( /[^\x20\t\r\n\f]+/g );
|
3312 |
|
3313 |
|
3314 |
|
3315 |
|
3316 | function createOptions( options ) {
|
3317 | var object = {};
|
3318 | jQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) {
|
3319 | object[ flag ] = true;
|
3320 | } );
|
3321 | return object;
|
3322 | }
|
3323 |
|
3324 |
|
3325 |
|
3326 |
|
3327 |
|
3328 |
|
3329 |
|
3330 |
|
3331 |
|
3332 |
|
3333 |
|
3334 |
|
3335 |
|
3336 |
|
3337 |
|
3338 |
|
3339 |
|
3340 |
|
3341 |
|
3342 |
|
3343 |
|
3344 |
|
3345 |
|
3346 | jQuery.Callbacks = function( options ) {
|
3347 |
|
3348 |
|
3349 |
|
3350 | options = typeof options === "string" ?
|
3351 | createOptions( options ) :
|
3352 | jQuery.extend( {}, options );
|
3353 |
|
3354 | var
|
3355 | firing,
|
3356 |
|
3357 |
|
3358 | memory,
|
3359 |
|
3360 |
|
3361 | fired,
|
3362 |
|
3363 |
|
3364 | locked,
|
3365 |
|
3366 |
|
3367 | list = [],
|
3368 |
|
3369 |
|
3370 | queue = [],
|
3371 |
|
3372 |
|
3373 | firingIndex = -1,
|
3374 |
|
3375 |
|
3376 | fire = function() {
|
3377 |
|
3378 |
|
3379 | locked = locked || options.once;
|
3380 |
|
3381 |
|
3382 |
|
3383 | fired = firing = true;
|
3384 | for ( ; queue.length; firingIndex = -1 ) {
|
3385 | memory = queue.shift();
|
3386 | while ( ++firingIndex < list.length ) {
|
3387 |
|
3388 |
|
3389 | if ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false &&
|
3390 | options.stopOnFalse ) {
|
3391 |
|
3392 |
|
3393 | firingIndex = list.length;
|
3394 | memory = false;
|
3395 | }
|
3396 | }
|
3397 | }
|
3398 |
|
3399 |
|
3400 | if ( !options.memory ) {
|
3401 | memory = false;
|
3402 | }
|
3403 |
|
3404 | firing = false;
|
3405 |
|
3406 |
|
3407 | if ( locked ) {
|
3408 |
|
3409 |
|
3410 | if ( memory ) {
|
3411 | list = [];
|
3412 |
|
3413 |
|
3414 | } else {
|
3415 | list = "";
|
3416 | }
|
3417 | }
|
3418 | },
|
3419 |
|
3420 |
|
3421 | self = {
|
3422 |
|
3423 |
|
3424 | add: function() {
|
3425 | if ( list ) {
|
3426 |
|
3427 |
|
3428 | if ( memory && !firing ) {
|
3429 | firingIndex = list.length - 1;
|
3430 | queue.push( memory );
|
3431 | }
|
3432 |
|
3433 | ( function add( args ) {
|
3434 | jQuery.each( args, function( _, arg ) {
|
3435 | if ( jQuery.isFunction( arg ) ) {
|
3436 | if ( !options.unique || !self.has( arg ) ) {
|
3437 | list.push( arg );
|
3438 | }
|
3439 | } else if ( arg && arg.length && jQuery.type( arg ) !== "string" ) {
|
3440 |
|
3441 |
|
3442 | add( arg );
|
3443 | }
|
3444 | } );
|
3445 | } )( arguments );
|
3446 |
|
3447 | if ( memory && !firing ) {
|
3448 | fire();
|
3449 | }
|
3450 | }
|
3451 | return this;
|
3452 | },
|
3453 |
|
3454 |
|
3455 | remove: function() {
|
3456 | jQuery.each( arguments, function( _, arg ) {
|
3457 | var index;
|
3458 | while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {
|
3459 | list.splice( index, 1 );
|
3460 |
|
3461 |
|
3462 | if ( index <= firingIndex ) {
|
3463 | firingIndex--;
|
3464 | }
|
3465 | }
|
3466 | } );
|
3467 | return this;
|
3468 | },
|
3469 |
|
3470 |
|
3471 |
|
3472 | has: function( fn ) {
|
3473 | return fn ?
|
3474 | jQuery.inArray( fn, list ) > -1 :
|
3475 | list.length > 0;
|
3476 | },
|
3477 |
|
3478 |
|
3479 | empty: function() {
|
3480 | if ( list ) {
|
3481 | list = [];
|
3482 | }
|
3483 | return this;
|
3484 | },
|
3485 |
|
3486 |
|
3487 |
|
3488 |
|
3489 | disable: function() {
|
3490 | locked = queue = [];
|
3491 | list = memory = "";
|
3492 | return this;
|
3493 | },
|
3494 | disabled: function() {
|
3495 | return !list;
|
3496 | },
|
3497 |
|
3498 |
|
3499 |
|
3500 |
|
3501 | lock: function() {
|
3502 | locked = queue = [];
|
3503 | if ( !memory && !firing ) {
|
3504 | list = memory = "";
|
3505 | }
|
3506 | return this;
|
3507 | },
|
3508 | locked: function() {
|
3509 | return !!locked;
|
3510 | },
|
3511 |
|
3512 |
|
3513 | fireWith: function( context, args ) {
|
3514 | if ( !locked ) {
|
3515 | args = args || [];
|
3516 | args = [ context, args.slice ? args.slice() : args ];
|
3517 | queue.push( args );
|
3518 | if ( !firing ) {
|
3519 | fire();
|
3520 | }
|
3521 | }
|
3522 | return this;
|
3523 | },
|
3524 |
|
3525 |
|
3526 | fire: function() {
|
3527 | self.fireWith( this, arguments );
|
3528 | return this;
|
3529 | },
|
3530 |
|
3531 |
|
3532 | fired: function() {
|
3533 | return !!fired;
|
3534 | }
|
3535 | };
|
3536 |
|
3537 | return self;
|
3538 | };
|
3539 |
|
3540 |
|
3541 | function Identity( v ) {
|
3542 | return v;
|
3543 | }
|
3544 | function Thrower( ex ) {
|
3545 | throw ex;
|
3546 | }
|
3547 |
|
3548 | function adoptValue( value, resolve, reject, noValue ) {
|
3549 | var method;
|
3550 |
|
3551 | try {
|
3552 |
|
3553 |
|
3554 | if ( value && jQuery.isFunction( ( method = value.promise ) ) ) {
|
3555 | method.call( value ).done( resolve ).fail( reject );
|
3556 |
|
3557 |
|
3558 | } else if ( value && jQuery.isFunction( ( method = value.then ) ) ) {
|
3559 | method.call( value, resolve, reject );
|
3560 |
|
3561 |
|
3562 | } else {
|
3563 |
|
3564 |
|
3565 |
|
3566 |
|
3567 | resolve.apply( undefined, [ value ].slice( noValue ) );
|
3568 | }
|
3569 |
|
3570 |
|
3571 |
|
3572 |
|
3573 | } catch ( value ) {
|
3574 |
|
3575 |
|
3576 |
|
3577 | reject.apply( undefined, [ value ] );
|
3578 | }
|
3579 | }
|
3580 |
|
3581 | jQuery.extend( {
|
3582 |
|
3583 | Deferred: function( func ) {
|
3584 | var tuples = [
|
3585 |
|
3586 |
|
3587 |
|
3588 | [ "notify", "progress", jQuery.Callbacks( "memory" ),
|
3589 | jQuery.Callbacks( "memory" ), 2 ],
|
3590 | [ "resolve", "done", jQuery.Callbacks( "once memory" ),
|
3591 | jQuery.Callbacks( "once memory" ), 0, "resolved" ],
|
3592 | [ "reject", "fail", jQuery.Callbacks( "once memory" ),
|
3593 | jQuery.Callbacks( "once memory" ), 1, "rejected" ]
|
3594 | ],
|
3595 | state = "pending",
|
3596 | promise = {
|
3597 | state: function() {
|
3598 | return state;
|
3599 | },
|
3600 | always: function() {
|
3601 | deferred.done( arguments ).fail( arguments );
|
3602 | return this;
|
3603 | },
|
3604 | "catch": function( fn ) {
|
3605 | return promise.then( null, fn );
|
3606 | },
|
3607 |
|
3608 |
|
3609 | pipe: function( /* fnDone, fnFail, fnProgress */ ) {
|
3610 | var fns = arguments;
|
3611 |
|
3612 | return jQuery.Deferred( function( newDefer ) {
|
3613 | jQuery.each( tuples, function( i, tuple ) {
|
3614 |
|
3615 |
|
3616 | var fn = jQuery.isFunction( fns[ tuple[ 4 ] ] ) && fns[ tuple[ 4 ] ];
|
3617 |
|
3618 |
|
3619 |
|
3620 |
|
3621 | deferred[ tuple[ 1 ] ]( function() {
|
3622 | var returned = fn && fn.apply( this, arguments );
|
3623 | if ( returned && jQuery.isFunction( returned.promise ) ) {
|
3624 | returned.promise()
|
3625 | .progress( newDefer.notify )
|
3626 | .done( newDefer.resolve )
|
3627 | .fail( newDefer.reject );
|
3628 | } else {
|
3629 | newDefer[ tuple[ 0 ] + "With" ](
|
3630 | this,
|
3631 | fn ? [ returned ] : arguments
|
3632 | );
|
3633 | }
|
3634 | } );
|
3635 | } );
|
3636 | fns = null;
|
3637 | } ).promise();
|
3638 | },
|
3639 | then: function( onFulfilled, onRejected, onProgress ) {
|
3640 | var maxDepth = 0;
|
3641 | function resolve( depth, deferred, handler, special ) {
|
3642 | return function() {
|
3643 | var that = this,
|
3644 | args = arguments,
|
3645 | mightThrow = function() {
|
3646 | var returned, then;
|
3647 |
|
3648 |
|
3649 |
|
3650 |
|
3651 | if ( depth < maxDepth ) {
|
3652 | return;
|
3653 | }
|
3654 |
|
3655 | returned = handler.apply( that, args );
|
3656 |
|
3657 |
|
3658 |
|
3659 | if ( returned === deferred.promise() ) {
|
3660 | throw new TypeError( "Thenable self-resolution" );
|
3661 | }
|
3662 |
|
3663 |
|
3664 |
|
3665 |
|
3666 |
|
3667 | then = returned &&
|
3668 |
|
3669 |
|
3670 |
|
3671 |
|
3672 | ( typeof returned === "object" ||
|
3673 | typeof returned === "function" ) &&
|
3674 | returned.then;
|
3675 |
|
3676 |
|
3677 | if ( jQuery.isFunction( then ) ) {
|
3678 |
|
3679 |
|
3680 | if ( special ) {
|
3681 | then.call(
|
3682 | returned,
|
3683 | resolve( maxDepth, deferred, Identity, special ),
|
3684 | resolve( maxDepth, deferred, Thrower, special )
|
3685 | );
|
3686 |
|
3687 |
|
3688 | } else {
|
3689 |
|
3690 |
|
3691 | maxDepth++;
|
3692 |
|
3693 | then.call(
|
3694 | returned,
|
3695 | resolve( maxDepth, deferred, Identity, special ),
|
3696 | resolve( maxDepth, deferred, Thrower, special ),
|
3697 | resolve( maxDepth, deferred, Identity,
|
3698 | deferred.notifyWith )
|
3699 | );
|
3700 | }
|
3701 |
|
3702 |
|
3703 | } else {
|
3704 |
|
3705 |
|
3706 |
|
3707 | if ( handler !== Identity ) {
|
3708 | that = undefined;
|
3709 | args = [ returned ];
|
3710 | }
|
3711 |
|
3712 |
|
3713 |
|
3714 | ( special || deferred.resolveWith )( that, args );
|
3715 | }
|
3716 | },
|
3717 |
|
3718 |
|
3719 | process = special ?
|
3720 | mightThrow :
|
3721 | function() {
|
3722 | try {
|
3723 | mightThrow();
|
3724 | } catch ( e ) {
|
3725 |
|
3726 | if ( jQuery.Deferred.exceptionHook ) {
|
3727 | jQuery.Deferred.exceptionHook( e,
|
3728 | process.stackTrace );
|
3729 | }
|
3730 |
|
3731 |
|
3732 |
|
3733 |
|
3734 | if ( depth + 1 >= maxDepth ) {
|
3735 |
|
3736 |
|
3737 |
|
3738 | if ( handler !== Thrower ) {
|
3739 | that = undefined;
|
3740 | args = [ e ];
|
3741 | }
|
3742 |
|
3743 | deferred.rejectWith( that, args );
|
3744 | }
|
3745 | }
|
3746 | };
|
3747 |
|
3748 |
|
3749 |
|
3750 |
|
3751 |
|
3752 | if ( depth ) {
|
3753 | process();
|
3754 | } else {
|
3755 |
|
3756 |
|
3757 |
|
3758 | if ( jQuery.Deferred.getStackHook ) {
|
3759 | process.stackTrace = jQuery.Deferred.getStackHook();
|
3760 | }
|
3761 | window.setTimeout( process );
|
3762 | }
|
3763 | };
|
3764 | }
|
3765 |
|
3766 | return jQuery.Deferred( function( newDefer ) {
|
3767 |
|
3768 |
|
3769 | tuples[ 0 ][ 3 ].add(
|
3770 | resolve(
|
3771 | 0,
|
3772 | newDefer,
|
3773 | jQuery.isFunction( onProgress ) ?
|
3774 | onProgress :
|
3775 | Identity,
|
3776 | newDefer.notifyWith
|
3777 | )
|
3778 | );
|
3779 |
|
3780 |
|
3781 | tuples[ 1 ][ 3 ].add(
|
3782 | resolve(
|
3783 | 0,
|
3784 | newDefer,
|
3785 | jQuery.isFunction( onFulfilled ) ?
|
3786 | onFulfilled :
|
3787 | Identity
|
3788 | )
|
3789 | );
|
3790 |
|
3791 |
|
3792 | tuples[ 2 ][ 3 ].add(
|
3793 | resolve(
|
3794 | 0,
|
3795 | newDefer,
|
3796 | jQuery.isFunction( onRejected ) ?
|
3797 | onRejected :
|
3798 | Thrower
|
3799 | )
|
3800 | );
|
3801 | } ).promise();
|
3802 | },
|
3803 |
|
3804 |
|
3805 |
|
3806 | promise: function( obj ) {
|
3807 | return obj != null ? jQuery.extend( obj, promise ) : promise;
|
3808 | }
|
3809 | },
|
3810 | deferred = {};
|
3811 |
|
3812 |
|
3813 | jQuery.each( tuples, function( i, tuple ) {
|
3814 | var list = tuple[ 2 ],
|
3815 | stateString = tuple[ 5 ];
|
3816 |
|
3817 |
|
3818 |
|
3819 |
|
3820 | promise[ tuple[ 1 ] ] = list.add;
|
3821 |
|
3822 |
|
3823 | if ( stateString ) {
|
3824 | list.add(
|
3825 | function() {
|
3826 |
|
3827 |
|
3828 |
|
3829 | state = stateString;
|
3830 | },
|
3831 |
|
3832 |
|
3833 |
|
3834 | tuples[ 3 - i ][ 2 ].disable,
|
3835 |
|
3836 |
|
3837 | tuples[ 0 ][ 2 ].lock
|
3838 | );
|
3839 | }
|
3840 |
|
3841 |
|
3842 |
|
3843 |
|
3844 | list.add( tuple[ 3 ].fire );
|
3845 |
|
3846 |
|
3847 |
|
3848 |
|
3849 | deferred[ tuple[ 0 ] ] = function() {
|
3850 | deferred[ tuple[ 0 ] + "With" ]( this === deferred ? undefined : this, arguments );
|
3851 | return this;
|
3852 | };
|
3853 |
|
3854 |
|
3855 |
|
3856 |
|
3857 | deferred[ tuple[ 0 ] + "With" ] = list.fireWith;
|
3858 | } );
|
3859 |
|
3860 |
|
3861 | promise.promise( deferred );
|
3862 |
|
3863 |
|
3864 | if ( func ) {
|
3865 | func.call( deferred, deferred );
|
3866 | }
|
3867 |
|
3868 |
|
3869 | return deferred;
|
3870 | },
|
3871 |
|
3872 |
|
3873 | when: function( singleValue ) {
|
3874 | var
|
3875 |
|
3876 |
|
3877 | remaining = arguments.length,
|
3878 |
|
3879 |
|
3880 | i = remaining,
|
3881 |
|
3882 |
|
3883 | resolveContexts = Array( i ),
|
3884 | resolveValues = slice.call( arguments ),
|
3885 |
|
3886 |
|
3887 | master = jQuery.Deferred(),
|
3888 |
|
3889 |
|
3890 | updateFunc = function( i ) {
|
3891 | return function( value ) {
|
3892 | resolveContexts[ i ] = this;
|
3893 | resolveValues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value;
|
3894 | if ( !( --remaining ) ) {
|
3895 | master.resolveWith( resolveContexts, resolveValues );
|
3896 | }
|
3897 | };
|
3898 | };
|
3899 |
|
3900 |
|
3901 | if ( remaining <= 1 ) {
|
3902 | adoptValue( singleValue, master.done( updateFunc( i ) ).resolve, master.reject,
|
3903 | !remaining );
|
3904 |
|
3905 |
|
3906 | if ( master.state() === "pending" ||
|
3907 | jQuery.isFunction( resolveValues[ i ] && resolveValues[ i ].then ) ) {
|
3908 |
|
3909 | return master.then();
|
3910 | }
|
3911 | }
|
3912 |
|
3913 |
|
3914 | while ( i-- ) {
|
3915 | adoptValue( resolveValues[ i ], updateFunc( i ), master.reject );
|
3916 | }
|
3917 |
|
3918 | return master.promise();
|
3919 | }
|
3920 | } );
|
3921 |
|
3922 |
|
3923 |
|
3924 |
|
3925 | var rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;
|
3926 |
|
3927 | jQuery.Deferred.exceptionHook = function( error, stack ) {
|
3928 |
|
3929 |
|
3930 |
|
3931 | if ( window.console && window.console.warn && error && rerrorNames.test( error.name ) ) {
|
3932 | window.console.warn( "jQuery.Deferred exception: " + error.message, error.stack, stack );
|
3933 | }
|
3934 | };
|
3935 |
|
3936 |
|
3937 |
|
3938 |
|
3939 | jQuery.readyException = function( error ) {
|
3940 | window.setTimeout( function() {
|
3941 | throw error;
|
3942 | } );
|
3943 | };
|
3944 |
|
3945 |
|
3946 |
|
3947 |
|
3948 |
|
3949 | var readyList = jQuery.Deferred();
|
3950 |
|
3951 | jQuery.fn.ready = function( fn ) {
|
3952 |
|
3953 | readyList
|
3954 | .then( fn )
|
3955 |
|
3956 |
|
3957 |
|
3958 |
|
3959 | .catch( function( error ) {
|
3960 | jQuery.readyException( error );
|
3961 | } );
|
3962 |
|
3963 | return this;
|
3964 | };
|
3965 |
|
3966 | jQuery.extend( {
|
3967 |
|
3968 |
|
3969 | isReady: false,
|
3970 |
|
3971 |
|
3972 |
|
3973 | readyWait: 1,
|
3974 |
|
3975 |
|
3976 | ready: function( wait ) {
|
3977 |
|
3978 |
|
3979 | if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {
|
3980 | return;
|
3981 | }
|
3982 |
|
3983 |
|
3984 | jQuery.isReady = true;
|
3985 |
|
3986 |
|
3987 | if ( wait !== true && --jQuery.readyWait > 0 ) {
|
3988 | return;
|
3989 | }
|
3990 |
|
3991 |
|
3992 | readyList.resolveWith( document, [ jQuery ] );
|
3993 | }
|
3994 | } );
|
3995 |
|
3996 | jQuery.ready.then = readyList.then;
|
3997 |
|
3998 |
|
3999 | function completed() {
|
4000 | document.removeEventListener( "DOMContentLoaded", completed );
|
4001 | window.removeEventListener( "load", completed );
|
4002 | jQuery.ready();
|
4003 | }
|
4004 |
|
4005 |
|
4006 |
|
4007 |
|
4008 |
|
4009 | if ( document.readyState === "complete" ||
|
4010 | ( document.readyState !== "loading" && !document.documentElement.doScroll ) ) {
|
4011 |
|
4012 |
|
4013 | window.setTimeout( jQuery.ready );
|
4014 |
|
4015 | } else {
|
4016 |
|
4017 |
|
4018 | document.addEventListener( "DOMContentLoaded", completed );
|
4019 |
|
4020 |
|
4021 | window.addEventListener( "load", completed );
|
4022 | }
|
4023 |
|
4024 |
|
4025 |
|
4026 |
|
4027 |
|
4028 |
|
4029 | var access = function( elems, fn, key, value, chainable, emptyGet, raw ) {
|
4030 | var i = 0,
|
4031 | len = elems.length,
|
4032 | bulk = key == null;
|
4033 |
|
4034 |
|
4035 | if ( jQuery.type( key ) === "object" ) {
|
4036 | chainable = true;
|
4037 | for ( i in key ) {
|
4038 | access( elems, fn, i, key[ i ], true, emptyGet, raw );
|
4039 | }
|
4040 |
|
4041 |
|
4042 | } else if ( value !== undefined ) {
|
4043 | chainable = true;
|
4044 |
|
4045 | if ( !jQuery.isFunction( value ) ) {
|
4046 | raw = true;
|
4047 | }
|
4048 |
|
4049 | if ( bulk ) {
|
4050 |
|
4051 |
|
4052 | if ( raw ) {
|
4053 | fn.call( elems, value );
|
4054 | fn = null;
|
4055 |
|
4056 |
|
4057 | } else {
|
4058 | bulk = fn;
|
4059 | fn = function( elem, key, value ) {
|
4060 | return bulk.call( jQuery( elem ), value );
|
4061 | };
|
4062 | }
|
4063 | }
|
4064 |
|
4065 | if ( fn ) {
|
4066 | for ( ; i < len; i++ ) {
|
4067 | fn(
|
4068 | elems[ i ], key, raw ?
|
4069 | value :
|
4070 | value.call( elems[ i ], i, fn( elems[ i ], key ) )
|
4071 | );
|
4072 | }
|
4073 | }
|
4074 | }
|
4075 |
|
4076 | if ( chainable ) {
|
4077 | return elems;
|
4078 | }
|
4079 |
|
4080 |
|
4081 | if ( bulk ) {
|
4082 | return fn.call( elems );
|
4083 | }
|
4084 |
|
4085 | return len ? fn( elems[ 0 ], key ) : emptyGet;
|
4086 | };
|
4087 | var acceptData = function( owner ) {
|
4088 |
|
4089 |
|
4090 |
|
4091 |
|
4092 |
|
4093 |
|
4094 |
|
4095 | return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType );
|
4096 | };
|
4097 |
|
4098 |
|
4099 |
|
4100 |
|
4101 | function Data() {
|
4102 | this.expando = jQuery.expando + Data.uid++;
|
4103 | }
|
4104 |
|
4105 | Data.uid = 1;
|
4106 |
|
4107 | Data.prototype = {
|
4108 |
|
4109 | cache: function( owner ) {
|
4110 |
|
4111 |
|
4112 | var value = owner[ this.expando ];
|
4113 |
|
4114 |
|
4115 | if ( !value ) {
|
4116 | value = {};
|
4117 |
|
4118 |
|
4119 |
|
4120 |
|
4121 | if ( acceptData( owner ) ) {
|
4122 |
|
4123 |
|
4124 |
|
4125 | if ( owner.nodeType ) {
|
4126 | owner[ this.expando ] = value;
|
4127 |
|
4128 |
|
4129 |
|
4130 |
|
4131 | } else {
|
4132 | Object.defineProperty( owner, this.expando, {
|
4133 | value: value,
|
4134 | configurable: true
|
4135 | } );
|
4136 | }
|
4137 | }
|
4138 | }
|
4139 |
|
4140 | return value;
|
4141 | },
|
4142 | set: function( owner, data, value ) {
|
4143 | var prop,
|
4144 | cache = this.cache( owner );
|
4145 |
|
4146 |
|
4147 |
|
4148 | if ( typeof data === "string" ) {
|
4149 | cache[ jQuery.camelCase( data ) ] = value;
|
4150 |
|
4151 |
|
4152 | } else {
|
4153 |
|
4154 |
|
4155 | for ( prop in data ) {
|
4156 | cache[ jQuery.camelCase( prop ) ] = data[ prop ];
|
4157 | }
|
4158 | }
|
4159 | return cache;
|
4160 | },
|
4161 | get: function( owner, key ) {
|
4162 | return key === undefined ?
|
4163 | this.cache( owner ) :
|
4164 |
|
4165 |
|
4166 | owner[ this.expando ] && owner[ this.expando ][ jQuery.camelCase( key ) ];
|
4167 | },
|
4168 | access: function( owner, key, value ) {
|
4169 |
|
4170 |
|
4171 |
|
4172 |
|
4173 |
|
4174 |
|
4175 |
|
4176 |
|
4177 |
|
4178 |
|
4179 |
|
4180 |
|
4181 | if ( key === undefined ||
|
4182 | ( ( key && typeof key === "string" ) && value === undefined ) ) {
|
4183 |
|
4184 | return this.get( owner, key );
|
4185 | }
|
4186 |
|
4187 |
|
4188 |
|
4189 |
|
4190 |
|
4191 |
|
4192 |
|
4193 | this.set( owner, key, value );
|
4194 |
|
4195 |
|
4196 |
|
4197 | return value !== undefined ? value : key;
|
4198 | },
|
4199 | remove: function( owner, key ) {
|
4200 | var i,
|
4201 | cache = owner[ this.expando ];
|
4202 |
|
4203 | if ( cache === undefined ) {
|
4204 | return;
|
4205 | }
|
4206 |
|
4207 | if ( key !== undefined ) {
|
4208 |
|
4209 |
|
4210 | if ( Array.isArray( key ) ) {
|
4211 |
|
4212 |
|
4213 |
|
4214 | key = key.map( jQuery.camelCase );
|
4215 | } else {
|
4216 | key = jQuery.camelCase( key );
|
4217 |
|
4218 |
|
4219 |
|
4220 | key = key in cache ?
|
4221 | [ key ] :
|
4222 | ( key.match( rnothtmlwhite ) || [] );
|
4223 | }
|
4224 |
|
4225 | i = key.length;
|
4226 |
|
4227 | while ( i-- ) {
|
4228 | delete cache[ key[ i ] ];
|
4229 | }
|
4230 | }
|
4231 |
|
4232 |
|
4233 | if ( key === undefined || jQuery.isEmptyObject( cache ) ) {
|
4234 |
|
4235 |
|
4236 |
|
4237 |
|
4238 |
|
4239 | if ( owner.nodeType ) {
|
4240 | owner[ this.expando ] = undefined;
|
4241 | } else {
|
4242 | delete owner[ this.expando ];
|
4243 | }
|
4244 | }
|
4245 | },
|
4246 | hasData: function( owner ) {
|
4247 | var cache = owner[ this.expando ];
|
4248 | return cache !== undefined && !jQuery.isEmptyObject( cache );
|
4249 | }
|
4250 | };
|
4251 | var dataPriv = new Data();
|
4252 |
|
4253 | var dataUser = new Data();
|
4254 |
|
4255 |
|
4256 |
|
4257 |
|
4258 |
|
4259 |
|
4260 |
|
4261 |
|
4262 |
|
4263 |
|
4264 |
|
4265 |
|
4266 |
|
4267 | var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,
|
4268 | rmultiDash = /[A-Z]/g;
|
4269 |
|
4270 | function getData( data ) {
|
4271 | if ( data === "true" ) {
|
4272 | return true;
|
4273 | }
|
4274 |
|
4275 | if ( data === "false" ) {
|
4276 | return false;
|
4277 | }
|
4278 |
|
4279 | if ( data === "null" ) {
|
4280 | return null;
|
4281 | }
|
4282 |
|
4283 |
|
4284 | if ( data === +data + "" ) {
|
4285 | return +data;
|
4286 | }
|
4287 |
|
4288 | if ( rbrace.test( data ) ) {
|
4289 | return JSON.parse( data );
|
4290 | }
|
4291 |
|
4292 | return data;
|
4293 | }
|
4294 |
|
4295 | function dataAttr( elem, key, data ) {
|
4296 | var name;
|
4297 |
|
4298 |
|
4299 |
|
4300 | if ( data === undefined && elem.nodeType === 1 ) {
|
4301 | name = "data-" + key.replace( rmultiDash, "-$&" ).toLowerCase();
|
4302 | data = elem.getAttribute( name );
|
4303 |
|
4304 | if ( typeof data === "string" ) {
|
4305 | try {
|
4306 | data = getData( data );
|
4307 | } catch ( e ) {}
|
4308 |
|
4309 |
|
4310 | dataUser.set( elem, key, data );
|
4311 | } else {
|
4312 | data = undefined;
|
4313 | }
|
4314 | }
|
4315 | return data;
|
4316 | }
|
4317 |
|
4318 | jQuery.extend( {
|
4319 | hasData: function( elem ) {
|
4320 | return dataUser.hasData( elem ) || dataPriv.hasData( elem );
|
4321 | },
|
4322 |
|
4323 | data: function( elem, name, data ) {
|
4324 | return dataUser.access( elem, name, data );
|
4325 | },
|
4326 |
|
4327 | removeData: function( elem, name ) {
|
4328 | dataUser.remove( elem, name );
|
4329 | },
|
4330 |
|
4331 |
|
4332 |
|
4333 | _data: function( elem, name, data ) {
|
4334 | return dataPriv.access( elem, name, data );
|
4335 | },
|
4336 |
|
4337 | _removeData: function( elem, name ) {
|
4338 | dataPriv.remove( elem, name );
|
4339 | }
|
4340 | } );
|
4341 |
|
4342 | jQuery.fn.extend( {
|
4343 | data: function( key, value ) {
|
4344 | var i, name, data,
|
4345 | elem = this[ 0 ],
|
4346 | attrs = elem && elem.attributes;
|
4347 |
|
4348 |
|
4349 | if ( key === undefined ) {
|
4350 | if ( this.length ) {
|
4351 | data = dataUser.get( elem );
|
4352 |
|
4353 | if ( elem.nodeType === 1 && !dataPriv.get( elem, "hasDataAttrs" ) ) {
|
4354 | i = attrs.length;
|
4355 | while ( i-- ) {
|
4356 |
|
4357 |
|
4358 |
|
4359 | if ( attrs[ i ] ) {
|
4360 | name = attrs[ i ].name;
|
4361 | if ( name.indexOf( "data-" ) === 0 ) {
|
4362 | name = jQuery.camelCase( name.slice( 5 ) );
|
4363 | dataAttr( elem, name, data[ name ] );
|
4364 | }
|
4365 | }
|
4366 | }
|
4367 | dataPriv.set( elem, "hasDataAttrs", true );
|
4368 | }
|
4369 | }
|
4370 |
|
4371 | return data;
|
4372 | }
|
4373 |
|
4374 |
|
4375 | if ( typeof key === "object" ) {
|
4376 | return this.each( function() {
|
4377 | dataUser.set( this, key );
|
4378 | } );
|
4379 | }
|
4380 |
|
4381 | return access( this, function( value ) {
|
4382 | var data;
|
4383 |
|
4384 |
|
4385 |
|
4386 |
|
4387 |
|
4388 |
|
4389 | if ( elem && value === undefined ) {
|
4390 |
|
4391 |
|
4392 |
|
4393 | data = dataUser.get( elem, key );
|
4394 | if ( data !== undefined ) {
|
4395 | return data;
|
4396 | }
|
4397 |
|
4398 |
|
4399 |
|
4400 | data = dataAttr( elem, key );
|
4401 | if ( data !== undefined ) {
|
4402 | return data;
|
4403 | }
|
4404 |
|
4405 |
|
4406 | return;
|
4407 | }
|
4408 |
|
4409 |
|
4410 | this.each( function() {
|
4411 |
|
4412 |
|
4413 | dataUser.set( this, key, value );
|
4414 | } );
|
4415 | }, null, value, arguments.length > 1, null, true );
|
4416 | },
|
4417 |
|
4418 | removeData: function( key ) {
|
4419 | return this.each( function() {
|
4420 | dataUser.remove( this, key );
|
4421 | } );
|
4422 | }
|
4423 | } );
|
4424 |
|
4425 |
|
4426 | jQuery.extend( {
|
4427 | queue: function( elem, type, data ) {
|
4428 | var queue;
|
4429 |
|
4430 | if ( elem ) {
|
4431 | type = ( type || "fx" ) + "queue";
|
4432 | queue = dataPriv.get( elem, type );
|
4433 |
|
4434 |
|
4435 | if ( data ) {
|
4436 | if ( !queue || Array.isArray( data ) ) {
|
4437 | queue = dataPriv.access( elem, type, jQuery.makeArray( data ) );
|
4438 | } else {
|
4439 | queue.push( data );
|
4440 | }
|
4441 | }
|
4442 | return queue || [];
|
4443 | }
|
4444 | },
|
4445 |
|
4446 | dequeue: function( elem, type ) {
|
4447 | type = type || "fx";
|
4448 |
|
4449 | var queue = jQuery.queue( elem, type ),
|
4450 | startLength = queue.length,
|
4451 | fn = queue.shift(),
|
4452 | hooks = jQuery._queueHooks( elem, type ),
|
4453 | next = function() {
|
4454 | jQuery.dequeue( elem, type );
|
4455 | };
|
4456 |
|
4457 |
|
4458 | if ( fn === "inprogress" ) {
|
4459 | fn = queue.shift();
|
4460 | startLength--;
|
4461 | }
|
4462 |
|
4463 | if ( fn ) {
|
4464 |
|
4465 |
|
4466 |
|
4467 | if ( type === "fx" ) {
|
4468 | queue.unshift( "inprogress" );
|
4469 | }
|
4470 |
|
4471 |
|
4472 | delete hooks.stop;
|
4473 | fn.call( elem, next, hooks );
|
4474 | }
|
4475 |
|
4476 | if ( !startLength && hooks ) {
|
4477 | hooks.empty.fire();
|
4478 | }
|
4479 | },
|
4480 |
|
4481 |
|
4482 | _queueHooks: function( elem, type ) {
|
4483 | var key = type + "queueHooks";
|
4484 | return dataPriv.get( elem, key ) || dataPriv.access( elem, key, {
|
4485 | empty: jQuery.Callbacks( "once memory" ).add( function() {
|
4486 | dataPriv.remove( elem, [ type + "queue", key ] );
|
4487 | } )
|
4488 | } );
|
4489 | }
|
4490 | } );
|
4491 |
|
4492 | jQuery.fn.extend( {
|
4493 | queue: function( type, data ) {
|
4494 | var setter = 2;
|
4495 |
|
4496 | if ( typeof type !== "string" ) {
|
4497 | data = type;
|
4498 | type = "fx";
|
4499 | setter--;
|
4500 | }
|
4501 |
|
4502 | if ( arguments.length < setter ) {
|
4503 | return jQuery.queue( this[ 0 ], type );
|
4504 | }
|
4505 |
|
4506 | return data === undefined ?
|
4507 | this :
|
4508 | this.each( function() {
|
4509 | var queue = jQuery.queue( this, type, data );
|
4510 |
|
4511 |
|
4512 | jQuery._queueHooks( this, type );
|
4513 |
|
4514 | if ( type === "fx" && queue[ 0 ] !== "inprogress" ) {
|
4515 | jQuery.dequeue( this, type );
|
4516 | }
|
4517 | } );
|
4518 | },
|
4519 | dequeue: function( type ) {
|
4520 | return this.each( function() {
|
4521 | jQuery.dequeue( this, type );
|
4522 | } );
|
4523 | },
|
4524 | clearQueue: function( type ) {
|
4525 | return this.queue( type || "fx", [] );
|
4526 | },
|
4527 |
|
4528 |
|
4529 |
|
4530 | promise: function( type, obj ) {
|
4531 | var tmp,
|
4532 | count = 1,
|
4533 | defer = jQuery.Deferred(),
|
4534 | elements = this,
|
4535 | i = this.length,
|
4536 | resolve = function() {
|
4537 | if ( !( --count ) ) {
|
4538 | defer.resolveWith( elements, [ elements ] );
|
4539 | }
|
4540 | };
|
4541 |
|
4542 | if ( typeof type !== "string" ) {
|
4543 | obj = type;
|
4544 | type = undefined;
|
4545 | }
|
4546 | type = type || "fx";
|
4547 |
|
4548 | while ( i-- ) {
|
4549 | tmp = dataPriv.get( elements[ i ], type + "queueHooks" );
|
4550 | if ( tmp && tmp.empty ) {
|
4551 | count++;
|
4552 | tmp.empty.add( resolve );
|
4553 | }
|
4554 | }
|
4555 | resolve();
|
4556 | return defer.promise( obj );
|
4557 | }
|
4558 | } );
|
4559 | var pnum = ( /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/ ).source;
|
4560 |
|
4561 | var rcssNum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" );
|
4562 |
|
4563 |
|
4564 | var cssExpand = [ "Top", "Right", "Bottom", "Left" ];
|
4565 |
|
4566 | var isHiddenWithinTree = function( elem, el ) {
|
4567 |
|
4568 |
|
4569 |
|
4570 | elem = el || elem;
|
4571 |
|
4572 |
|
4573 | return elem.style.display === "none" ||
|
4574 | elem.style.display === "" &&
|
4575 |
|
4576 |
|
4577 |
|
4578 |
|
4579 |
|
4580 | jQuery.contains( elem.ownerDocument, elem ) &&
|
4581 |
|
4582 | jQuery.css( elem, "display" ) === "none";
|
4583 | };
|
4584 |
|
4585 | var swap = function( elem, options, callback, args ) {
|
4586 | var ret, name,
|
4587 | old = {};
|
4588 |
|
4589 |
|
4590 | for ( name in options ) {
|
4591 | old[ name ] = elem.style[ name ];
|
4592 | elem.style[ name ] = options[ name ];
|
4593 | }
|
4594 |
|
4595 | ret = callback.apply( elem, args || [] );
|
4596 |
|
4597 |
|
4598 | for ( name in options ) {
|
4599 | elem.style[ name ] = old[ name ];
|
4600 | }
|
4601 |
|
4602 | return ret;
|
4603 | };
|
4604 |
|
4605 |
|
4606 |
|
4607 |
|
4608 | function adjustCSS( elem, prop, valueParts, tween ) {
|
4609 | var adjusted,
|
4610 | scale = 1,
|
4611 | maxIterations = 20,
|
4612 | currentValue = tween ?
|
4613 | function() {
|
4614 | return tween.cur();
|
4615 | } :
|
4616 | function() {
|
4617 | return jQuery.css( elem, prop, "" );
|
4618 | },
|
4619 | initial = currentValue(),
|
4620 | unit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ),
|
4621 |
|
4622 |
|
4623 | initialInUnit = ( jQuery.cssNumber[ prop ] || unit !== "px" && +initial ) &&
|
4624 | rcssNum.exec( jQuery.css( elem, prop ) );
|
4625 |
|
4626 | if ( initialInUnit && initialInUnit[ 3 ] !== unit ) {
|
4627 |
|
4628 |
|
4629 | unit = unit || initialInUnit[ 3 ];
|
4630 |
|
4631 |
|
4632 | valueParts = valueParts || [];
|
4633 |
|
4634 |
|
4635 | initialInUnit = +initial || 1;
|
4636 |
|
4637 | do {
|
4638 |
|
4639 |
|
4640 |
|
4641 | scale = scale || ".5";
|
4642 |
|
4643 |
|
4644 | initialInUnit = initialInUnit / scale;
|
4645 | jQuery.style( elem, prop, initialInUnit + unit );
|
4646 |
|
4647 |
|
4648 |
|
4649 | } while (
|
4650 | scale !== ( scale = currentValue() / initial ) && scale !== 1 && --maxIterations
|
4651 | );
|
4652 | }
|
4653 |
|
4654 | if ( valueParts ) {
|
4655 | initialInUnit = +initialInUnit || +initial || 0;
|
4656 |
|
4657 |
|
4658 | adjusted = valueParts[ 1 ] ?
|
4659 | initialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] :
|
4660 | +valueParts[ 2 ];
|
4661 | if ( tween ) {
|
4662 | tween.unit = unit;
|
4663 | tween.start = initialInUnit;
|
4664 | tween.end = adjusted;
|
4665 | }
|
4666 | }
|
4667 | return adjusted;
|
4668 | }
|
4669 |
|
4670 |
|
4671 | var defaultDisplayMap = {};
|
4672 |
|
4673 | function getDefaultDisplay( elem ) {
|
4674 | var temp,
|
4675 | doc = elem.ownerDocument,
|
4676 | nodeName = elem.nodeName,
|
4677 | display = defaultDisplayMap[ nodeName ];
|
4678 |
|
4679 | if ( display ) {
|
4680 | return display;
|
4681 | }
|
4682 |
|
4683 | temp = doc.body.appendChild( doc.createElement( nodeName ) );
|
4684 | display = jQuery.css( temp, "display" );
|
4685 |
|
4686 | temp.parentNode.removeChild( temp );
|
4687 |
|
4688 | if ( display === "none" ) {
|
4689 | display = "block";
|
4690 | }
|
4691 | defaultDisplayMap[ nodeName ] = display;
|
4692 |
|
4693 | return display;
|
4694 | }
|
4695 |
|
4696 | function showHide( elements, show ) {
|
4697 | var display, elem,
|
4698 | values = [],
|
4699 | index = 0,
|
4700 | length = elements.length;
|
4701 |
|
4702 |
|
4703 | for ( ; index < length; index++ ) {
|
4704 | elem = elements[ index ];
|
4705 | if ( !elem.style ) {
|
4706 | continue;
|
4707 | }
|
4708 |
|
4709 | display = elem.style.display;
|
4710 | if ( show ) {
|
4711 |
|
4712 |
|
4713 |
|
4714 |
|
4715 | if ( display === "none" ) {
|
4716 | values[ index ] = dataPriv.get( elem, "display" ) || null;
|
4717 | if ( !values[ index ] ) {
|
4718 | elem.style.display = "";
|
4719 | }
|
4720 | }
|
4721 | if ( elem.style.display === "" && isHiddenWithinTree( elem ) ) {
|
4722 | values[ index ] = getDefaultDisplay( elem );
|
4723 | }
|
4724 | } else {
|
4725 | if ( display !== "none" ) {
|
4726 | values[ index ] = "none";
|
4727 |
|
4728 |
|
4729 | dataPriv.set( elem, "display", display );
|
4730 | }
|
4731 | }
|
4732 | }
|
4733 |
|
4734 |
|
4735 | for ( index = 0; index < length; index++ ) {
|
4736 | if ( values[ index ] != null ) {
|
4737 | elements[ index ].style.display = values[ index ];
|
4738 | }
|
4739 | }
|
4740 |
|
4741 | return elements;
|
4742 | }
|
4743 |
|
4744 | jQuery.fn.extend( {
|
4745 | show: function() {
|
4746 | return showHide( this, true );
|
4747 | },
|
4748 | hide: function() {
|
4749 | return showHide( this );
|
4750 | },
|
4751 | toggle: function( state ) {
|
4752 | if ( typeof state === "boolean" ) {
|
4753 | return state ? this.show() : this.hide();
|
4754 | }
|
4755 |
|
4756 | return this.each( function() {
|
4757 | if ( isHiddenWithinTree( this ) ) {
|
4758 | jQuery( this ).show();
|
4759 | } else {
|
4760 | jQuery( this ).hide();
|
4761 | }
|
4762 | } );
|
4763 | }
|
4764 | } );
|
4765 | var rcheckableType = ( /^(?:checkbox|radio)$/i );
|
4766 |
|
4767 | var rtagName = ( /<([a-z][^\/\0>\x20\t\r\n\f]+)/i );
|
4768 |
|
4769 | var rscriptType = ( /^$|\/(?:java|ecma)script/i );
|
4770 |
|
4771 |
|
4772 |
|
4773 |
|
4774 | var wrapMap = {
|
4775 |
|
4776 |
|
4777 | option: [ 1, "<select multiple='multiple'>", "</select>" ],
|
4778 |
|
4779 |
|
4780 |
|
4781 |
|
4782 | thead: [ 1, "<table>", "</table>" ],
|
4783 | col: [ 2, "<table><colgroup>", "</colgroup></table>" ],
|
4784 | tr: [ 2, "<table><tbody>", "</tbody></table>" ],
|
4785 | td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ],
|
4786 |
|
4787 | _default: [ 0, "", "" ]
|
4788 | };
|
4789 |
|
4790 |
|
4791 | wrapMap.optgroup = wrapMap.option;
|
4792 |
|
4793 | wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
|
4794 | wrapMap.th = wrapMap.td;
|
4795 |
|
4796 |
|
4797 | function getAll( context, tag ) {
|
4798 |
|
4799 |
|
4800 |
|
4801 | var ret;
|
4802 |
|
4803 | if ( typeof context.getElementsByTagName !== "undefined" ) {
|
4804 | ret = context.getElementsByTagName( tag || "*" );
|
4805 |
|
4806 | } else if ( typeof context.querySelectorAll !== "undefined" ) {
|
4807 | ret = context.querySelectorAll( tag || "*" );
|
4808 |
|
4809 | } else {
|
4810 | ret = [];
|
4811 | }
|
4812 |
|
4813 | if ( tag === undefined || tag && nodeName( context, tag ) ) {
|
4814 | return jQuery.merge( [ context ], ret );
|
4815 | }
|
4816 |
|
4817 | return ret;
|
4818 | }
|
4819 |
|
4820 |
|
4821 |
|
4822 | function setGlobalEval( elems, refElements ) {
|
4823 | var i = 0,
|
4824 | l = elems.length;
|
4825 |
|
4826 | for ( ; i < l; i++ ) {
|
4827 | dataPriv.set(
|
4828 | elems[ i ],
|
4829 | "globalEval",
|
4830 | !refElements || dataPriv.get( refElements[ i ], "globalEval" )
|
4831 | );
|
4832 | }
|
4833 | }
|
4834 |
|
4835 |
|
4836 | var rhtml = /<|&#?\w+;/;
|
4837 |
|
4838 | function buildFragment( elems, context, scripts, selection, ignored ) {
|
4839 | var elem, tmp, tag, wrap, contains, j,
|
4840 | fragment = context.createDocumentFragment(),
|
4841 | nodes = [],
|
4842 | i = 0,
|
4843 | l = elems.length;
|
4844 |
|
4845 | for ( ; i < l; i++ ) {
|
4846 | elem = elems[ i ];
|
4847 |
|
4848 | if ( elem || elem === 0 ) {
|
4849 |
|
4850 |
|
4851 | if ( jQuery.type( elem ) === "object" ) {
|
4852 |
|
4853 |
|
4854 |
|
4855 | jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );
|
4856 |
|
4857 |
|
4858 | } else if ( !rhtml.test( elem ) ) {
|
4859 | nodes.push( context.createTextNode( elem ) );
|
4860 |
|
4861 |
|
4862 | } else {
|
4863 | tmp = tmp || fragment.appendChild( context.createElement( "div" ) );
|
4864 |
|
4865 |
|
4866 | tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase();
|
4867 | wrap = wrapMap[ tag ] || wrapMap._default;
|
4868 | tmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ];
|
4869 |
|
4870 |
|
4871 | j = wrap[ 0 ];
|
4872 | while ( j-- ) {
|
4873 | tmp = tmp.lastChild;
|
4874 | }
|
4875 |
|
4876 |
|
4877 |
|
4878 | jQuery.merge( nodes, tmp.childNodes );
|
4879 |
|
4880 |
|
4881 | tmp = fragment.firstChild;
|
4882 |
|
4883 |
|
4884 | tmp.textContent = "";
|
4885 | }
|
4886 | }
|
4887 | }
|
4888 |
|
4889 |
|
4890 | fragment.textContent = "";
|
4891 |
|
4892 | i = 0;
|
4893 | while ( ( elem = nodes[ i++ ] ) ) {
|
4894 |
|
4895 |
|
4896 | if ( selection && jQuery.inArray( elem, selection ) > -1 ) {
|
4897 | if ( ignored ) {
|
4898 | ignored.push( elem );
|
4899 | }
|
4900 | continue;
|
4901 | }
|
4902 |
|
4903 | contains = jQuery.contains( elem.ownerDocument, elem );
|
4904 |
|
4905 |
|
4906 | tmp = getAll( fragment.appendChild( elem ), "script" );
|
4907 |
|
4908 |
|
4909 | if ( contains ) {
|
4910 | setGlobalEval( tmp );
|
4911 | }
|
4912 |
|
4913 |
|
4914 | if ( scripts ) {
|
4915 | j = 0;
|
4916 | while ( ( elem = tmp[ j++ ] ) ) {
|
4917 | if ( rscriptType.test( elem.type || "" ) ) {
|
4918 | scripts.push( elem );
|
4919 | }
|
4920 | }
|
4921 | }
|
4922 | }
|
4923 |
|
4924 | return fragment;
|
4925 | }
|
4926 |
|
4927 |
|
4928 | ( function() {
|
4929 | var fragment = document.createDocumentFragment(),
|
4930 | div = fragment.appendChild( document.createElement( "div" ) ),
|
4931 | input = document.createElement( "input" );
|
4932 |
|
4933 |
|
4934 |
|
4935 |
|
4936 |
|
4937 | input.setAttribute( "type", "radio" );
|
4938 | input.setAttribute( "checked", "checked" );
|
4939 | input.setAttribute( "name", "t" );
|
4940 |
|
4941 | div.appendChild( input );
|
4942 |
|
4943 |
|
4944 |
|
4945 | support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked;
|
4946 |
|
4947 |
|
4948 |
|
4949 | div.innerHTML = "<textarea>x</textarea>";
|
4950 | support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;
|
4951 | } )();
|
4952 | var documentElement = document.documentElement;
|
4953 |
|
4954 |
|
4955 |
|
4956 | var
|
4957 | rkeyEvent = /^key/,
|
4958 | rmouseEvent = /^(?:mouse|pointer|contextmenu|drag|drop)|click/,
|
4959 | rtypenamespace = /^([^.]*)(?:\.(.+)|)/;
|
4960 |
|
4961 | function returnTrue() {
|
4962 | return true;
|
4963 | }
|
4964 |
|
4965 | function returnFalse() {
|
4966 | return false;
|
4967 | }
|
4968 |
|
4969 |
|
4970 |
|
4971 | function safeActiveElement() {
|
4972 | try {
|
4973 | return document.activeElement;
|
4974 | } catch ( err ) { }
|
4975 | }
|
4976 |
|
4977 | function on( elem, types, selector, data, fn, one ) {
|
4978 | var origFn, type;
|
4979 |
|
4980 |
|
4981 | if ( typeof types === "object" ) {
|
4982 |
|
4983 |
|
4984 | if ( typeof selector !== "string" ) {
|
4985 |
|
4986 |
|
4987 | data = data || selector;
|
4988 | selector = undefined;
|
4989 | }
|
4990 | for ( type in types ) {
|
4991 | on( elem, type, selector, data, types[ type ], one );
|
4992 | }
|
4993 | return elem;
|
4994 | }
|
4995 |
|
4996 | if ( data == null && fn == null ) {
|
4997 |
|
4998 |
|
4999 | fn = selector;
|
5000 | data = selector = undefined;
|
5001 | } else if ( fn == null ) {
|
5002 | if ( typeof selector === "string" ) {
|
5003 |
|
5004 |
|
5005 | fn = data;
|
5006 | data = undefined;
|
5007 | } else {
|
5008 |
|
5009 |
|
5010 | fn = data;
|
5011 | data = selector;
|
5012 | selector = undefined;
|
5013 | }
|
5014 | }
|
5015 | if ( fn === false ) {
|
5016 | fn = returnFalse;
|
5017 | } else if ( !fn ) {
|
5018 | return elem;
|
5019 | }
|
5020 |
|
5021 | if ( one === 1 ) {
|
5022 | origFn = fn;
|
5023 | fn = function( event ) {
|
5024 |
|
5025 |
|
5026 | jQuery().off( event );
|
5027 | return origFn.apply( this, arguments );
|
5028 | };
|
5029 |
|
5030 |
|
5031 | fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );
|
5032 | }
|
5033 | return elem.each( function() {
|
5034 | jQuery.event.add( this, types, fn, data, selector );
|
5035 | } );
|
5036 | }
|
5037 |
|
5038 |
|
5039 |
|
5040 |
|
5041 |
|
5042 | jQuery.event = {
|
5043 |
|
5044 | global: {},
|
5045 |
|
5046 | add: function( elem, types, handler, data, selector ) {
|
5047 |
|
5048 | var handleObjIn, eventHandle, tmp,
|
5049 | events, t, handleObj,
|
5050 | special, handlers, type, namespaces, origType,
|
5051 | elemData = dataPriv.get( elem );
|
5052 |
|
5053 |
|
5054 | if ( !elemData ) {
|
5055 | return;
|
5056 | }
|
5057 |
|
5058 |
|
5059 | if ( handler.handler ) {
|
5060 | handleObjIn = handler;
|
5061 | handler = handleObjIn.handler;
|
5062 | selector = handleObjIn.selector;
|
5063 | }
|
5064 |
|
5065 |
|
5066 |
|
5067 | if ( selector ) {
|
5068 | jQuery.find.matchesSelector( documentElement, selector );
|
5069 | }
|
5070 |
|
5071 |
|
5072 | if ( !handler.guid ) {
|
5073 | handler.guid = jQuery.guid++;
|
5074 | }
|
5075 |
|
5076 |
|
5077 | if ( !( events = elemData.events ) ) {
|
5078 | events = elemData.events = {};
|
5079 | }
|
5080 | if ( !( eventHandle = elemData.handle ) ) {
|
5081 | eventHandle = elemData.handle = function( e ) {
|
5082 |
|
5083 |
|
5084 |
|
5085 | return typeof jQuery !== "undefined" && jQuery.event.triggered !== e.type ?
|
5086 | jQuery.event.dispatch.apply( elem, arguments ) : undefined;
|
5087 | };
|
5088 | }
|
5089 |
|
5090 |
|
5091 | types = ( types || "" ).match( rnothtmlwhite ) || [ "" ];
|
5092 | t = types.length;
|
5093 | while ( t-- ) {
|
5094 | tmp = rtypenamespace.exec( types[ t ] ) || [];
|
5095 | type = origType = tmp[ 1 ];
|
5096 | namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort();
|
5097 |
|
5098 |
|
5099 | if ( !type ) {
|
5100 | continue;
|
5101 | }
|
5102 |
|
5103 |
|
5104 | special = jQuery.event.special[ type ] || {};
|
5105 |
|
5106 |
|
5107 | type = ( selector ? special.delegateType : special.bindType ) || type;
|
5108 |
|
5109 |
|
5110 | special = jQuery.event.special[ type ] || {};
|
5111 |
|
5112 |
|
5113 | handleObj = jQuery.extend( {
|
5114 | type: type,
|
5115 | origType: origType,
|
5116 | data: data,
|
5117 | handler: handler,
|
5118 | guid: handler.guid,
|
5119 | selector: selector,
|
5120 | needsContext: selector && jQuery.expr.match.needsContext.test( selector ),
|
5121 | namespace: namespaces.join( "." )
|
5122 | }, handleObjIn );
|
5123 |
|
5124 |
|
5125 | if ( !( handlers = events[ type ] ) ) {
|
5126 | handlers = events[ type ] = [];
|
5127 | handlers.delegateCount = 0;
|
5128 |
|
5129 |
|
5130 | if ( !special.setup ||
|
5131 | special.setup.call( elem, data, namespaces, eventHandle ) === false ) {
|
5132 |
|
5133 | if ( elem.addEventListener ) {
|
5134 | elem.addEventListener( type, eventHandle );
|
5135 | }
|
5136 | }
|
5137 | }
|
5138 |
|
5139 | if ( special.add ) {
|
5140 | special.add.call( elem, handleObj );
|
5141 |
|
5142 | if ( !handleObj.handler.guid ) {
|
5143 | handleObj.handler.guid = handler.guid;
|
5144 | }
|
5145 | }
|
5146 |
|
5147 |
|
5148 | if ( selector ) {
|
5149 | handlers.splice( handlers.delegateCount++, 0, handleObj );
|
5150 | } else {
|
5151 | handlers.push( handleObj );
|
5152 | }
|
5153 |
|
5154 |
|
5155 | jQuery.event.global[ type ] = true;
|
5156 | }
|
5157 |
|
5158 | },
|
5159 |
|
5160 |
|
5161 | remove: function( elem, types, handler, selector, mappedTypes ) {
|
5162 |
|
5163 | var j, origCount, tmp,
|
5164 | events, t, handleObj,
|
5165 | special, handlers, type, namespaces, origType,
|
5166 | elemData = dataPriv.hasData( elem ) && dataPriv.get( elem );
|
5167 |
|
5168 | if ( !elemData || !( events = elemData.events ) ) {
|
5169 | return;
|
5170 | }
|
5171 |
|
5172 |
|
5173 | types = ( types || "" ).match( rnothtmlwhite ) || [ "" ];
|
5174 | t = types.length;
|
5175 | while ( t-- ) {
|
5176 | tmp = rtypenamespace.exec( types[ t ] ) || [];
|
5177 | type = origType = tmp[ 1 ];
|
5178 | namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort();
|
5179 |
|
5180 |
|
5181 | if ( !type ) {
|
5182 | for ( type in events ) {
|
5183 | jQuery.event.remove( elem, type + types[ t ], handler, selector, true );
|
5184 | }
|
5185 | continue;
|
5186 | }
|
5187 |
|
5188 | special = jQuery.event.special[ type ] || {};
|
5189 | type = ( selector ? special.delegateType : special.bindType ) || type;
|
5190 | handlers = events[ type ] || [];
|
5191 | tmp = tmp[ 2 ] &&
|
5192 | new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" );
|
5193 |
|
5194 |
|
5195 | origCount = j = handlers.length;
|
5196 | while ( j-- ) {
|
5197 | handleObj = handlers[ j ];
|
5198 |
|
5199 | if ( ( mappedTypes || origType === handleObj.origType ) &&
|
5200 | ( !handler || handler.guid === handleObj.guid ) &&
|
5201 | ( !tmp || tmp.test( handleObj.namespace ) ) &&
|
5202 | ( !selector || selector === handleObj.selector ||
|
5203 | selector === "**" && handleObj.selector ) ) {
|
5204 | handlers.splice( j, 1 );
|
5205 |
|
5206 | if ( handleObj.selector ) {
|
5207 | handlers.delegateCount--;
|
5208 | }
|
5209 | if ( special.remove ) {
|
5210 | special.remove.call( elem, handleObj );
|
5211 | }
|
5212 | }
|
5213 | }
|
5214 |
|
5215 |
|
5216 |
|
5217 | if ( origCount && !handlers.length ) {
|
5218 | if ( !special.teardown ||
|
5219 | special.teardown.call( elem, namespaces, elemData.handle ) === false ) {
|
5220 |
|
5221 | jQuery.removeEvent( elem, type, elemData.handle );
|
5222 | }
|
5223 |
|
5224 | delete events[ type ];
|
5225 | }
|
5226 | }
|
5227 |
|
5228 |
|
5229 | if ( jQuery.isEmptyObject( events ) ) {
|
5230 | dataPriv.remove( elem, "handle events" );
|
5231 | }
|
5232 | },
|
5233 |
|
5234 | dispatch: function( nativeEvent ) {
|
5235 |
|
5236 |
|
5237 | var event = jQuery.event.fix( nativeEvent );
|
5238 |
|
5239 | var i, j, ret, matched, handleObj, handlerQueue,
|
5240 | args = new Array( arguments.length ),
|
5241 | handlers = ( dataPriv.get( this, "events" ) || {} )[ event.type ] || [],
|
5242 | special = jQuery.event.special[ event.type ] || {};
|
5243 |
|
5244 |
|
5245 | args[ 0 ] = event;
|
5246 |
|
5247 | for ( i = 1; i < arguments.length; i++ ) {
|
5248 | args[ i ] = arguments[ i ];
|
5249 | }
|
5250 |
|
5251 | event.delegateTarget = this;
|
5252 |
|
5253 |
|
5254 | if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {
|
5255 | return;
|
5256 | }
|
5257 |
|
5258 |
|
5259 | handlerQueue = jQuery.event.handlers.call( this, event, handlers );
|
5260 |
|
5261 |
|
5262 | i = 0;
|
5263 | while ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) {
|
5264 | event.currentTarget = matched.elem;
|
5265 |
|
5266 | j = 0;
|
5267 | while ( ( handleObj = matched.handlers[ j++ ] ) &&
|
5268 | !event.isImmediatePropagationStopped() ) {
|
5269 |
|
5270 |
|
5271 |
|
5272 | if ( !event.rnamespace || event.rnamespace.test( handleObj.namespace ) ) {
|
5273 |
|
5274 | event.handleObj = handleObj;
|
5275 | event.data = handleObj.data;
|
5276 |
|
5277 | ret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle ||
|
5278 | handleObj.handler ).apply( matched.elem, args );
|
5279 |
|
5280 | if ( ret !== undefined ) {
|
5281 | if ( ( event.result = ret ) === false ) {
|
5282 | event.preventDefault();
|
5283 | event.stopPropagation();
|
5284 | }
|
5285 | }
|
5286 | }
|
5287 | }
|
5288 | }
|
5289 |
|
5290 |
|
5291 | if ( special.postDispatch ) {
|
5292 | special.postDispatch.call( this, event );
|
5293 | }
|
5294 |
|
5295 | return event.result;
|
5296 | },
|
5297 |
|
5298 | handlers: function( event, handlers ) {
|
5299 | var i, handleObj, sel, matchedHandlers, matchedSelectors,
|
5300 | handlerQueue = [],
|
5301 | delegateCount = handlers.delegateCount,
|
5302 | cur = event.target;
|
5303 |
|
5304 |
|
5305 | if ( delegateCount &&
|
5306 |
|
5307 |
|
5308 |
|
5309 | cur.nodeType &&
|
5310 |
|
5311 |
|
5312 |
|
5313 |
|
5314 |
|
5315 |
|
5316 | !( event.type === "click" && event.button >= 1 ) ) {
|
5317 |
|
5318 | for ( ; cur !== this; cur = cur.parentNode || this ) {
|
5319 |
|
5320 |
|
5321 |
|
5322 | if ( cur.nodeType === 1 && !( event.type === "click" && cur.disabled === true ) ) {
|
5323 | matchedHandlers = [];
|
5324 | matchedSelectors = {};
|
5325 | for ( i = 0; i < delegateCount; i++ ) {
|
5326 | handleObj = handlers[ i ];
|
5327 |
|
5328 |
|
5329 | sel = handleObj.selector + " ";
|
5330 |
|
5331 | if ( matchedSelectors[ sel ] === undefined ) {
|
5332 | matchedSelectors[ sel ] = handleObj.needsContext ?
|
5333 | jQuery( sel, this ).index( cur ) > -1 :
|
5334 | jQuery.find( sel, this, null, [ cur ] ).length;
|
5335 | }
|
5336 | if ( matchedSelectors[ sel ] ) {
|
5337 | matchedHandlers.push( handleObj );
|
5338 | }
|
5339 | }
|
5340 | if ( matchedHandlers.length ) {
|
5341 | handlerQueue.push( { elem: cur, handlers: matchedHandlers } );
|
5342 | }
|
5343 | }
|
5344 | }
|
5345 | }
|
5346 |
|
5347 |
|
5348 | cur = this;
|
5349 | if ( delegateCount < handlers.length ) {
|
5350 | handlerQueue.push( { elem: cur, handlers: handlers.slice( delegateCount ) } );
|
5351 | }
|
5352 |
|
5353 | return handlerQueue;
|
5354 | },
|
5355 |
|
5356 | addProp: function( name, hook ) {
|
5357 | Object.defineProperty( jQuery.Event.prototype, name, {
|
5358 | enumerable: true,
|
5359 | configurable: true,
|
5360 |
|
5361 | get: jQuery.isFunction( hook ) ?
|
5362 | function() {
|
5363 | if ( this.originalEvent ) {
|
5364 | return hook( this.originalEvent );
|
5365 | }
|
5366 | } :
|
5367 | function() {
|
5368 | if ( this.originalEvent ) {
|
5369 | return this.originalEvent[ name ];
|
5370 | }
|
5371 | },
|
5372 |
|
5373 | set: function( value ) {
|
5374 | Object.defineProperty( this, name, {
|
5375 | enumerable: true,
|
5376 | configurable: true,
|
5377 | writable: true,
|
5378 | value: value
|
5379 | } );
|
5380 | }
|
5381 | } );
|
5382 | },
|
5383 |
|
5384 | fix: function( originalEvent ) {
|
5385 | return originalEvent[ jQuery.expando ] ?
|
5386 | originalEvent :
|
5387 | new jQuery.Event( originalEvent );
|
5388 | },
|
5389 |
|
5390 | special: {
|
5391 | load: {
|
5392 |
|
5393 |
|
5394 | noBubble: true
|
5395 | },
|
5396 | focus: {
|
5397 |
|
5398 |
|
5399 | trigger: function() {
|
5400 | if ( this !== safeActiveElement() && this.focus ) {
|
5401 | this.focus();
|
5402 | return false;
|
5403 | }
|
5404 | },
|
5405 | delegateType: "focusin"
|
5406 | },
|
5407 | blur: {
|
5408 | trigger: function() {
|
5409 | if ( this === safeActiveElement() && this.blur ) {
|
5410 | this.blur();
|
5411 | return false;
|
5412 | }
|
5413 | },
|
5414 | delegateType: "focusout"
|
5415 | },
|
5416 | click: {
|
5417 |
|
5418 |
|
5419 | trigger: function() {
|
5420 | if ( this.type === "checkbox" && this.click && nodeName( this, "input" ) ) {
|
5421 | this.click();
|
5422 | return false;
|
5423 | }
|
5424 | },
|
5425 |
|
5426 |
|
5427 | _default: function( event ) {
|
5428 | return nodeName( event.target, "a" );
|
5429 | }
|
5430 | },
|
5431 |
|
5432 | beforeunload: {
|
5433 | postDispatch: function( event ) {
|
5434 |
|
5435 |
|
5436 |
|
5437 | if ( event.result !== undefined && event.originalEvent ) {
|
5438 | event.originalEvent.returnValue = event.result;
|
5439 | }
|
5440 | }
|
5441 | }
|
5442 | }
|
5443 | };
|
5444 |
|
5445 | jQuery.removeEvent = function( elem, type, handle ) {
|
5446 |
|
5447 |
|
5448 | if ( elem.removeEventListener ) {
|
5449 | elem.removeEventListener( type, handle );
|
5450 | }
|
5451 | };
|
5452 |
|
5453 | jQuery.Event = function( src, props ) {
|
5454 |
|
5455 |
|
5456 | if ( !( this instanceof jQuery.Event ) ) {
|
5457 | return new jQuery.Event( src, props );
|
5458 | }
|
5459 |
|
5460 |
|
5461 | if ( src && src.type ) {
|
5462 | this.originalEvent = src;
|
5463 | this.type = src.type;
|
5464 |
|
5465 |
|
5466 |
|
5467 | this.isDefaultPrevented = src.defaultPrevented ||
|
5468 | src.defaultPrevented === undefined &&
|
5469 |
|
5470 |
|
5471 | src.returnValue === false ?
|
5472 | returnTrue :
|
5473 | returnFalse;
|
5474 |
|
5475 |
|
5476 |
|
5477 |
|
5478 | this.target = ( src.target && src.target.nodeType === 3 ) ?
|
5479 | src.target.parentNode :
|
5480 | src.target;
|
5481 |
|
5482 | this.currentTarget = src.currentTarget;
|
5483 | this.relatedTarget = src.relatedTarget;
|
5484 |
|
5485 |
|
5486 | } else {
|
5487 | this.type = src;
|
5488 | }
|
5489 |
|
5490 |
|
5491 | if ( props ) {
|
5492 | jQuery.extend( this, props );
|
5493 | }
|
5494 |
|
5495 |
|
5496 | this.timeStamp = src && src.timeStamp || jQuery.now();
|
5497 |
|
5498 |
|
5499 | this[ jQuery.expando ] = true;
|
5500 | };
|
5501 |
|
5502 |
|
5503 |
|
5504 | jQuery.Event.prototype = {
|
5505 | constructor: jQuery.Event,
|
5506 | isDefaultPrevented: returnFalse,
|
5507 | isPropagationStopped: returnFalse,
|
5508 | isImmediatePropagationStopped: returnFalse,
|
5509 | isSimulated: false,
|
5510 |
|
5511 | preventDefault: function() {
|
5512 | var e = this.originalEvent;
|
5513 |
|
5514 | this.isDefaultPrevented = returnTrue;
|
5515 |
|
5516 | if ( e && !this.isSimulated ) {
|
5517 | e.preventDefault();
|
5518 | }
|
5519 | },
|
5520 | stopPropagation: function() {
|
5521 | var e = this.originalEvent;
|
5522 |
|
5523 | this.isPropagationStopped = returnTrue;
|
5524 |
|
5525 | if ( e && !this.isSimulated ) {
|
5526 | e.stopPropagation();
|
5527 | }
|
5528 | },
|
5529 | stopImmediatePropagation: function() {
|
5530 | var e = this.originalEvent;
|
5531 |
|
5532 | this.isImmediatePropagationStopped = returnTrue;
|
5533 |
|
5534 | if ( e && !this.isSimulated ) {
|
5535 | e.stopImmediatePropagation();
|
5536 | }
|
5537 |
|
5538 | this.stopPropagation();
|
5539 | }
|
5540 | };
|
5541 |
|
5542 |
|
5543 | jQuery.each( {
|
5544 | altKey: true,
|
5545 | bubbles: true,
|
5546 | cancelable: true,
|
5547 | changedTouches: true,
|
5548 | ctrlKey: true,
|
5549 | detail: true,
|
5550 | eventPhase: true,
|
5551 | metaKey: true,
|
5552 | pageX: true,
|
5553 | pageY: true,
|
5554 | shiftKey: true,
|
5555 | view: true,
|
5556 | "char": true,
|
5557 | charCode: true,
|
5558 | key: true,
|
5559 | keyCode: true,
|
5560 | button: true,
|
5561 | buttons: true,
|
5562 | clientX: true,
|
5563 | clientY: true,
|
5564 | offsetX: true,
|
5565 | offsetY: true,
|
5566 | pointerId: true,
|
5567 | pointerType: true,
|
5568 | screenX: true,
|
5569 | screenY: true,
|
5570 | targetTouches: true,
|
5571 | toElement: true,
|
5572 | touches: true,
|
5573 |
|
5574 | which: function( event ) {
|
5575 | var button = event.button;
|
5576 |
|
5577 |
|
5578 | if ( event.which == null && rkeyEvent.test( event.type ) ) {
|
5579 | return event.charCode != null ? event.charCode : event.keyCode;
|
5580 | }
|
5581 |
|
5582 |
|
5583 | if ( !event.which && button !== undefined && rmouseEvent.test( event.type ) ) {
|
5584 | if ( button & 1 ) {
|
5585 | return 1;
|
5586 | }
|
5587 |
|
5588 | if ( button & 2 ) {
|
5589 | return 3;
|
5590 | }
|
5591 |
|
5592 | if ( button & 4 ) {
|
5593 | return 2;
|
5594 | }
|
5595 |
|
5596 | return 0;
|
5597 | }
|
5598 |
|
5599 | return event.which;
|
5600 | }
|
5601 | }, jQuery.event.addProp );
|
5602 |
|
5603 |
|
5604 |
|
5605 |
|
5606 |
|
5607 |
|
5608 |
|
5609 |
|
5610 |
|
5611 | jQuery.each( {
|
5612 | mouseenter: "mouseover",
|
5613 | mouseleave: "mouseout",
|
5614 | pointerenter: "pointerover",
|
5615 | pointerleave: "pointerout"
|
5616 | }, function( orig, fix ) {
|
5617 | jQuery.event.special[ orig ] = {
|
5618 | delegateType: fix,
|
5619 | bindType: fix,
|
5620 |
|
5621 | handle: function( event ) {
|
5622 | var ret,
|
5623 | target = this,
|
5624 | related = event.relatedTarget,
|
5625 | handleObj = event.handleObj;
|
5626 |
|
5627 |
|
5628 |
|
5629 | if ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) {
|
5630 | event.type = handleObj.origType;
|
5631 | ret = handleObj.handler.apply( this, arguments );
|
5632 | event.type = fix;
|
5633 | }
|
5634 | return ret;
|
5635 | }
|
5636 | };
|
5637 | } );
|
5638 |
|
5639 | jQuery.fn.extend( {
|
5640 |
|
5641 | on: function( types, selector, data, fn ) {
|
5642 | return on( this, types, selector, data, fn );
|
5643 | },
|
5644 | one: function( types, selector, data, fn ) {
|
5645 | return on( this, types, selector, data, fn, 1 );
|
5646 | },
|
5647 | off: function( types, selector, fn ) {
|
5648 | var handleObj, type;
|
5649 | if ( types && types.preventDefault && types.handleObj ) {
|
5650 |
|
5651 |
|
5652 | handleObj = types.handleObj;
|
5653 | jQuery( types.delegateTarget ).off(
|
5654 | handleObj.namespace ?
|
5655 | handleObj.origType + "." + handleObj.namespace :
|
5656 | handleObj.origType,
|
5657 | handleObj.selector,
|
5658 | handleObj.handler
|
5659 | );
|
5660 | return this;
|
5661 | }
|
5662 | if ( typeof types === "object" ) {
|
5663 |
|
5664 |
|
5665 | for ( type in types ) {
|
5666 | this.off( type, selector, types[ type ] );
|
5667 | }
|
5668 | return this;
|
5669 | }
|
5670 | if ( selector === false || typeof selector === "function" ) {
|
5671 |
|
5672 |
|
5673 | fn = selector;
|
5674 | selector = undefined;
|
5675 | }
|
5676 | if ( fn === false ) {
|
5677 | fn = returnFalse;
|
5678 | }
|
5679 | return this.each( function() {
|
5680 | jQuery.event.remove( this, types, fn, selector );
|
5681 | } );
|
5682 | }
|
5683 | } );
|
5684 |
|
5685 |
|
5686 | var
|
5687 |
|
5688 |
|
5689 |
|
5690 |
|
5691 | rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,
|
5692 |
|
5693 |
|
5694 |
|
5695 |
|
5696 |
|
5697 |
|
5698 | rnoInnerhtml = /<script|<style|<link/i,
|
5699 |
|
5700 |
|
5701 | rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
|
5702 | rscriptTypeMasked = /^true\/(.*)/,
|
5703 | rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;
|
5704 |
|
5705 |
|
5706 | function manipulationTarget( elem, content ) {
|
5707 | if ( nodeName( elem, "table" ) &&
|
5708 | nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ) {
|
5709 |
|
5710 | return jQuery( ">tbody", elem )[ 0 ] || elem;
|
5711 | }
|
5712 |
|
5713 | return elem;
|
5714 | }
|
5715 |
|
5716 |
|
5717 | function disableScript( elem ) {
|
5718 | elem.type = ( elem.getAttribute( "type" ) !== null ) + "/" + elem.type;
|
5719 | return elem;
|
5720 | }
|
5721 | function restoreScript( elem ) {
|
5722 | var match = rscriptTypeMasked.exec( elem.type );
|
5723 |
|
5724 | if ( match ) {
|
5725 | elem.type = match[ 1 ];
|
5726 | } else {
|
5727 | elem.removeAttribute( "type" );
|
5728 | }
|
5729 |
|
5730 | return elem;
|
5731 | }
|
5732 |
|
5733 | function cloneCopyEvent( src, dest ) {
|
5734 | var i, l, type, pdataOld, pdataCur, udataOld, udataCur, events;
|
5735 |
|
5736 | if ( dest.nodeType !== 1 ) {
|
5737 | return;
|
5738 | }
|
5739 |
|
5740 |
|
5741 | if ( dataPriv.hasData( src ) ) {
|
5742 | pdataOld = dataPriv.access( src );
|
5743 | pdataCur = dataPriv.set( dest, pdataOld );
|
5744 | events = pdataOld.events;
|
5745 |
|
5746 | if ( events ) {
|
5747 | delete pdataCur.handle;
|
5748 | pdataCur.events = {};
|
5749 |
|
5750 | for ( type in events ) {
|
5751 | for ( i = 0, l = events[ type ].length; i < l; i++ ) {
|
5752 | jQuery.event.add( dest, type, events[ type ][ i ] );
|
5753 | }
|
5754 | }
|
5755 | }
|
5756 | }
|
5757 |
|
5758 |
|
5759 | if ( dataUser.hasData( src ) ) {
|
5760 | udataOld = dataUser.access( src );
|
5761 | udataCur = jQuery.extend( {}, udataOld );
|
5762 |
|
5763 | dataUser.set( dest, udataCur );
|
5764 | }
|
5765 | }
|
5766 |
|
5767 |
|
5768 | function fixInput( src, dest ) {
|
5769 | var nodeName = dest.nodeName.toLowerCase();
|
5770 |
|
5771 |
|
5772 | if ( nodeName === "input" && rcheckableType.test( src.type ) ) {
|
5773 | dest.checked = src.checked;
|
5774 |
|
5775 |
|
5776 | } else if ( nodeName === "input" || nodeName === "textarea" ) {
|
5777 | dest.defaultValue = src.defaultValue;
|
5778 | }
|
5779 | }
|
5780 |
|
5781 | function domManip( collection, args, callback, ignored ) {
|
5782 |
|
5783 |
|
5784 | args = concat.apply( [], args );
|
5785 |
|
5786 | var fragment, first, scripts, hasScripts, node, doc,
|
5787 | i = 0,
|
5788 | l = collection.length,
|
5789 | iNoClone = l - 1,
|
5790 | value = args[ 0 ],
|
5791 | isFunction = jQuery.isFunction( value );
|
5792 |
|
5793 |
|
5794 | if ( isFunction ||
|
5795 | ( l > 1 && typeof value === "string" &&
|
5796 | !support.checkClone && rchecked.test( value ) ) ) {
|
5797 | return collection.each( function( index ) {
|
5798 | var self = collection.eq( index );
|
5799 | if ( isFunction ) {
|
5800 | args[ 0 ] = value.call( this, index, self.html() );
|
5801 | }
|
5802 | domManip( self, args, callback, ignored );
|
5803 | } );
|
5804 | }
|
5805 |
|
5806 | if ( l ) {
|
5807 | fragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored );
|
5808 | first = fragment.firstChild;
|
5809 |
|
5810 | if ( fragment.childNodes.length === 1 ) {
|
5811 | fragment = first;
|
5812 | }
|
5813 |
|
5814 |
|
5815 | if ( first || ignored ) {
|
5816 | scripts = jQuery.map( getAll( fragment, "script" ), disableScript );
|
5817 | hasScripts = scripts.length;
|
5818 |
|
5819 |
|
5820 |
|
5821 |
|
5822 | for ( ; i < l; i++ ) {
|
5823 | node = fragment;
|
5824 |
|
5825 | if ( i !== iNoClone ) {
|
5826 | node = jQuery.clone( node, true, true );
|
5827 |
|
5828 |
|
5829 | if ( hasScripts ) {
|
5830 |
|
5831 |
|
5832 |
|
5833 | jQuery.merge( scripts, getAll( node, "script" ) );
|
5834 | }
|
5835 | }
|
5836 |
|
5837 | callback.call( collection[ i ], node, i );
|
5838 | }
|
5839 |
|
5840 | if ( hasScripts ) {
|
5841 | doc = scripts[ scripts.length - 1 ].ownerDocument;
|
5842 |
|
5843 |
|
5844 | jQuery.map( scripts, restoreScript );
|
5845 |
|
5846 |
|
5847 | for ( i = 0; i < hasScripts; i++ ) {
|
5848 | node = scripts[ i ];
|
5849 | if ( rscriptType.test( node.type || "" ) &&
|
5850 | !dataPriv.access( node, "globalEval" ) &&
|
5851 | jQuery.contains( doc, node ) ) {
|
5852 |
|
5853 | if ( node.src ) {
|
5854 |
|
5855 |
|
5856 | if ( jQuery._evalUrl ) {
|
5857 | jQuery._evalUrl( node.src );
|
5858 | }
|
5859 | } else {
|
5860 | DOMEval( node.textContent.replace( rcleanScript, "" ), doc );
|
5861 | }
|
5862 | }
|
5863 | }
|
5864 | }
|
5865 | }
|
5866 | }
|
5867 |
|
5868 | return collection;
|
5869 | }
|
5870 |
|
5871 | function remove( elem, selector, keepData ) {
|
5872 | var node,
|
5873 | nodes = selector ? jQuery.filter( selector, elem ) : elem,
|
5874 | i = 0;
|
5875 |
|
5876 | for ( ; ( node = nodes[ i ] ) != null; i++ ) {
|
5877 | if ( !keepData && node.nodeType === 1 ) {
|
5878 | jQuery.cleanData( getAll( node ) );
|
5879 | }
|
5880 |
|
5881 | if ( node.parentNode ) {
|
5882 | if ( keepData && jQuery.contains( node.ownerDocument, node ) ) {
|
5883 | setGlobalEval( getAll( node, "script" ) );
|
5884 | }
|
5885 | node.parentNode.removeChild( node );
|
5886 | }
|
5887 | }
|
5888 |
|
5889 | return elem;
|
5890 | }
|
5891 |
|
5892 | jQuery.extend( {
|
5893 | htmlPrefilter: function( html ) {
|
5894 | return html.replace( rxhtmlTag, "<$1></$2>" );
|
5895 | },
|
5896 |
|
5897 | clone: function( elem, dataAndEvents, deepDataAndEvents ) {
|
5898 | var i, l, srcElements, destElements,
|
5899 | clone = elem.cloneNode( true ),
|
5900 | inPage = jQuery.contains( elem.ownerDocument, elem );
|
5901 |
|
5902 |
|
5903 | if ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) &&
|
5904 | !jQuery.isXMLDoc( elem ) ) {
|
5905 |
|
5906 |
|
5907 | destElements = getAll( clone );
|
5908 | srcElements = getAll( elem );
|
5909 |
|
5910 | for ( i = 0, l = srcElements.length; i < l; i++ ) {
|
5911 | fixInput( srcElements[ i ], destElements[ i ] );
|
5912 | }
|
5913 | }
|
5914 |
|
5915 |
|
5916 | if ( dataAndEvents ) {
|
5917 | if ( deepDataAndEvents ) {
|
5918 | srcElements = srcElements || getAll( elem );
|
5919 | destElements = destElements || getAll( clone );
|
5920 |
|
5921 | for ( i = 0, l = srcElements.length; i < l; i++ ) {
|
5922 | cloneCopyEvent( srcElements[ i ], destElements[ i ] );
|
5923 | }
|
5924 | } else {
|
5925 | cloneCopyEvent( elem, clone );
|
5926 | }
|
5927 | }
|
5928 |
|
5929 |
|
5930 | destElements = getAll( clone, "script" );
|
5931 | if ( destElements.length > 0 ) {
|
5932 | setGlobalEval( destElements, !inPage && getAll( elem, "script" ) );
|
5933 | }
|
5934 |
|
5935 |
|
5936 | return clone;
|
5937 | },
|
5938 |
|
5939 | cleanData: function( elems ) {
|
5940 | var data, elem, type,
|
5941 | special = jQuery.event.special,
|
5942 | i = 0;
|
5943 |
|
5944 | for ( ; ( elem = elems[ i ] ) !== undefined; i++ ) {
|
5945 | if ( acceptData( elem ) ) {
|
5946 | if ( ( data = elem[ dataPriv.expando ] ) ) {
|
5947 | if ( data.events ) {
|
5948 | for ( type in data.events ) {
|
5949 | if ( special[ type ] ) {
|
5950 | jQuery.event.remove( elem, type );
|
5951 |
|
5952 |
|
5953 | } else {
|
5954 | jQuery.removeEvent( elem, type, data.handle );
|
5955 | }
|
5956 | }
|
5957 | }
|
5958 |
|
5959 |
|
5960 |
|
5961 | elem[ dataPriv.expando ] = undefined;
|
5962 | }
|
5963 | if ( elem[ dataUser.expando ] ) {
|
5964 |
|
5965 |
|
5966 |
|
5967 | elem[ dataUser.expando ] = undefined;
|
5968 | }
|
5969 | }
|
5970 | }
|
5971 | }
|
5972 | } );
|
5973 |
|
5974 | jQuery.fn.extend( {
|
5975 | detach: function( selector ) {
|
5976 | return remove( this, selector, true );
|
5977 | },
|
5978 |
|
5979 | remove: function( selector ) {
|
5980 | return remove( this, selector );
|
5981 | },
|
5982 |
|
5983 | text: function( value ) {
|
5984 | return access( this, function( value ) {
|
5985 | return value === undefined ?
|
5986 | jQuery.text( this ) :
|
5987 | this.empty().each( function() {
|
5988 | if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
|
5989 | this.textContent = value;
|
5990 | }
|
5991 | } );
|
5992 | }, null, value, arguments.length );
|
5993 | },
|
5994 |
|
5995 | append: function() {
|
5996 | return domManip( this, arguments, function( elem ) {
|
5997 | if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
|
5998 | var target = manipulationTarget( this, elem );
|
5999 | target.appendChild( elem );
|
6000 | }
|
6001 | } );
|
6002 | },
|
6003 |
|
6004 | prepend: function() {
|
6005 | return domManip( this, arguments, function( elem ) {
|
6006 | if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
|
6007 | var target = manipulationTarget( this, elem );
|
6008 | target.insertBefore( elem, target.firstChild );
|
6009 | }
|
6010 | } );
|
6011 | },
|
6012 |
|
6013 | before: function() {
|
6014 | return domManip( this, arguments, function( elem ) {
|
6015 | if ( this.parentNode ) {
|
6016 | this.parentNode.insertBefore( elem, this );
|
6017 | }
|
6018 | } );
|
6019 | },
|
6020 |
|
6021 | after: function() {
|
6022 | return domManip( this, arguments, function( elem ) {
|
6023 | if ( this.parentNode ) {
|
6024 | this.parentNode.insertBefore( elem, this.nextSibling );
|
6025 | }
|
6026 | } );
|
6027 | },
|
6028 |
|
6029 | empty: function() {
|
6030 | var elem,
|
6031 | i = 0;
|
6032 |
|
6033 | for ( ; ( elem = this[ i ] ) != null; i++ ) {
|
6034 | if ( elem.nodeType === 1 ) {
|
6035 |
|
6036 |
|
6037 | jQuery.cleanData( getAll( elem, false ) );
|
6038 |
|
6039 |
|
6040 | elem.textContent = "";
|
6041 | }
|
6042 | }
|
6043 |
|
6044 | return this;
|
6045 | },
|
6046 |
|
6047 | clone: function( dataAndEvents, deepDataAndEvents ) {
|
6048 | dataAndEvents = dataAndEvents == null ? false : dataAndEvents;
|
6049 | deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;
|
6050 |
|
6051 | return this.map( function() {
|
6052 | return jQuery.clone( this, dataAndEvents, deepDataAndEvents );
|
6053 | } );
|
6054 | },
|
6055 |
|
6056 | html: function( value ) {
|
6057 | return access( this, function( value ) {
|
6058 | var elem = this[ 0 ] || {},
|
6059 | i = 0,
|
6060 | l = this.length;
|
6061 |
|
6062 | if ( value === undefined && elem.nodeType === 1 ) {
|
6063 | return elem.innerHTML;
|
6064 | }
|
6065 |
|
6066 |
|
6067 | if ( typeof value === "string" && !rnoInnerhtml.test( value ) &&
|
6068 | !wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) {
|
6069 |
|
6070 | value = jQuery.htmlPrefilter( value );
|
6071 |
|
6072 | try {
|
6073 | for ( ; i < l; i++ ) {
|
6074 | elem = this[ i ] || {};
|
6075 |
|
6076 |
|
6077 | if ( elem.nodeType === 1 ) {
|
6078 | jQuery.cleanData( getAll( elem, false ) );
|
6079 | elem.innerHTML = value;
|
6080 | }
|
6081 | }
|
6082 |
|
6083 | elem = 0;
|
6084 |
|
6085 |
|
6086 | } catch ( e ) {}
|
6087 | }
|
6088 |
|
6089 | if ( elem ) {
|
6090 | this.empty().append( value );
|
6091 | }
|
6092 | }, null, value, arguments.length );
|
6093 | },
|
6094 |
|
6095 | replaceWith: function() {
|
6096 | var ignored = [];
|
6097 |
|
6098 |
|
6099 | return domManip( this, arguments, function( elem ) {
|
6100 | var parent = this.parentNode;
|
6101 |
|
6102 | if ( jQuery.inArray( this, ignored ) < 0 ) {
|
6103 | jQuery.cleanData( getAll( this ) );
|
6104 | if ( parent ) {
|
6105 | parent.replaceChild( elem, this );
|
6106 | }
|
6107 | }
|
6108 |
|
6109 |
|
6110 | }, ignored );
|
6111 | }
|
6112 | } );
|
6113 |
|
6114 | jQuery.each( {
|
6115 | appendTo: "append",
|
6116 | prependTo: "prepend",
|
6117 | insertBefore: "before",
|
6118 | insertAfter: "after",
|
6119 | replaceAll: "replaceWith"
|
6120 | }, function( name, original ) {
|
6121 | jQuery.fn[ name ] = function( selector ) {
|
6122 | var elems,
|
6123 | ret = [],
|
6124 | insert = jQuery( selector ),
|
6125 | last = insert.length - 1,
|
6126 | i = 0;
|
6127 |
|
6128 | for ( ; i <= last; i++ ) {
|
6129 | elems = i === last ? this : this.clone( true );
|
6130 | jQuery( insert[ i ] )[ original ]( elems );
|
6131 |
|
6132 |
|
6133 |
|
6134 | push.apply( ret, elems.get() );
|
6135 | }
|
6136 |
|
6137 | return this.pushStack( ret );
|
6138 | };
|
6139 | } );
|
6140 | var rmargin = ( /^margin/ );
|
6141 |
|
6142 | var rnumnonpx = new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" );
|
6143 |
|
6144 | var getStyles = function( elem ) {
|
6145 |
|
6146 |
|
6147 |
|
6148 |
|
6149 | var view = elem.ownerDocument.defaultView;
|
6150 |
|
6151 | if ( !view || !view.opener ) {
|
6152 | view = window;
|
6153 | }
|
6154 |
|
6155 | return view.getComputedStyle( elem );
|
6156 | };
|
6157 |
|
6158 |
|
6159 |
|
6160 | ( function() {
|
6161 |
|
6162 |
|
6163 |
|
6164 | function computeStyleTests() {
|
6165 |
|
6166 |
|
6167 | if ( !div ) {
|
6168 | return;
|
6169 | }
|
6170 |
|
6171 | div.style.cssText =
|
6172 | "box-sizing:border-box;" +
|
6173 | "position:relative;display:block;" +
|
6174 | "margin:auto;border:1px;padding:1px;" +
|
6175 | "top:1%;width:50%";
|
6176 | div.innerHTML = "";
|
6177 | documentElement.appendChild( container );
|
6178 |
|
6179 | var divStyle = window.getComputedStyle( div );
|
6180 | pixelPositionVal = divStyle.top !== "1%";
|
6181 |
|
6182 |
|
6183 | reliableMarginLeftVal = divStyle.marginLeft === "2px";
|
6184 | boxSizingReliableVal = divStyle.width === "4px";
|
6185 |
|
6186 |
|
6187 |
|
6188 | div.style.marginRight = "50%";
|
6189 | pixelMarginRightVal = divStyle.marginRight === "4px";
|
6190 |
|
6191 | documentElement.removeChild( container );
|
6192 |
|
6193 |
|
6194 |
|
6195 | div = null;
|
6196 | }
|
6197 |
|
6198 | var pixelPositionVal, boxSizingReliableVal, pixelMarginRightVal, reliableMarginLeftVal,
|
6199 | container = document.createElement( "div" ),
|
6200 | div = document.createElement( "div" );
|
6201 |
|
6202 |
|
6203 | if ( !div.style ) {
|
6204 | return;
|
6205 | }
|
6206 |
|
6207 |
|
6208 |
|
6209 | div.style.backgroundClip = "content-box";
|
6210 | div.cloneNode( true ).style.backgroundClip = "";
|
6211 | support.clearCloneStyle = div.style.backgroundClip === "content-box";
|
6212 |
|
6213 | container.style.cssText = "border:0;width:8px;height:0;top:0;left:-9999px;" +
|
6214 | "padding:0;margin-top:1px;position:absolute";
|
6215 | container.appendChild( div );
|
6216 |
|
6217 | jQuery.extend( support, {
|
6218 | pixelPosition: function() {
|
6219 | computeStyleTests();
|
6220 | return pixelPositionVal;
|
6221 | },
|
6222 | boxSizingReliable: function() {
|
6223 | computeStyleTests();
|
6224 | return boxSizingReliableVal;
|
6225 | },
|
6226 | pixelMarginRight: function() {
|
6227 | computeStyleTests();
|
6228 | return pixelMarginRightVal;
|
6229 | },
|
6230 | reliableMarginLeft: function() {
|
6231 | computeStyleTests();
|
6232 | return reliableMarginLeftVal;
|
6233 | }
|
6234 | } );
|
6235 | } )();
|
6236 |
|
6237 |
|
6238 | function curCSS( elem, name, computed ) {
|
6239 | var width, minWidth, maxWidth, ret,
|
6240 |
|
6241 |
|
6242 |
|
6243 |
|
6244 |
|
6245 | style = elem.style;
|
6246 |
|
6247 | computed = computed || getStyles( elem );
|
6248 |
|
6249 |
|
6250 |
|
6251 |
|
6252 | if ( computed ) {
|
6253 | ret = computed.getPropertyValue( name ) || computed[ name ];
|
6254 |
|
6255 | if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) {
|
6256 | ret = jQuery.style( elem, name );
|
6257 | }
|
6258 |
|
6259 |
|
6260 |
|
6261 |
|
6262 |
|
6263 |
|
6264 | if ( !support.pixelMarginRight() && rnumnonpx.test( ret ) && rmargin.test( name ) ) {
|
6265 |
|
6266 |
|
6267 | width = style.width;
|
6268 | minWidth = style.minWidth;
|
6269 | maxWidth = style.maxWidth;
|
6270 |
|
6271 |
|
6272 | style.minWidth = style.maxWidth = style.width = ret;
|
6273 | ret = computed.width;
|
6274 |
|
6275 |
|
6276 | style.width = width;
|
6277 | style.minWidth = minWidth;
|
6278 | style.maxWidth = maxWidth;
|
6279 | }
|
6280 | }
|
6281 |
|
6282 | return ret !== undefined ?
|
6283 |
|
6284 |
|
6285 |
|
6286 | ret + "" :
|
6287 | ret;
|
6288 | }
|
6289 |
|
6290 |
|
6291 | function addGetHookIf( conditionFn, hookFn ) {
|
6292 |
|
6293 |
|
6294 | return {
|
6295 | get: function() {
|
6296 | if ( conditionFn() ) {
|
6297 |
|
6298 |
|
6299 |
|
6300 | delete this.get;
|
6301 | return;
|
6302 | }
|
6303 |
|
6304 |
|
6305 | return ( this.get = hookFn ).apply( this, arguments );
|
6306 | }
|
6307 | };
|
6308 | }
|
6309 |
|
6310 |
|
6311 | var
|
6312 |
|
6313 |
|
6314 |
|
6315 |
|
6316 | rdisplayswap = /^(none|table(?!-c[ea]).+)/,
|
6317 | rcustomProp = /^--/,
|
6318 | cssShow = { position: "absolute", visibility: "hidden", display: "block" },
|
6319 | cssNormalTransform = {
|
6320 | letterSpacing: "0",
|
6321 | fontWeight: "400"
|
6322 | },
|
6323 |
|
6324 | cssPrefixes = [ "Webkit", "Moz", "ms" ],
|
6325 | emptyStyle = document.createElement( "div" ).style;
|
6326 |
|
6327 |
|
6328 | function vendorPropName( name ) {
|
6329 |
|
6330 |
|
6331 | if ( name in emptyStyle ) {
|
6332 | return name;
|
6333 | }
|
6334 |
|
6335 |
|
6336 | var capName = name[ 0 ].toUpperCase() + name.slice( 1 ),
|
6337 | i = cssPrefixes.length;
|
6338 |
|
6339 | while ( i-- ) {
|
6340 | name = cssPrefixes[ i ] + capName;
|
6341 | if ( name in emptyStyle ) {
|
6342 | return name;
|
6343 | }
|
6344 | }
|
6345 | }
|
6346 |
|
6347 |
|
6348 |
|
6349 | function finalPropName( name ) {
|
6350 | var ret = jQuery.cssProps[ name ];
|
6351 | if ( !ret ) {
|
6352 | ret = jQuery.cssProps[ name ] = vendorPropName( name ) || name;
|
6353 | }
|
6354 | return ret;
|
6355 | }
|
6356 |
|
6357 | function setPositiveNumber( elem, value, subtract ) {
|
6358 |
|
6359 |
|
6360 |
|
6361 | var matches = rcssNum.exec( value );
|
6362 | return matches ?
|
6363 |
|
6364 |
|
6365 | Math.max( 0, matches[ 2 ] - ( subtract || 0 ) ) + ( matches[ 3 ] || "px" ) :
|
6366 | value;
|
6367 | }
|
6368 |
|
6369 | function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) {
|
6370 | var i,
|
6371 | val = 0;
|
6372 |
|
6373 |
|
6374 | if ( extra === ( isBorderBox ? "border" : "content" ) ) {
|
6375 | i = 4;
|
6376 |
|
6377 |
|
6378 | } else {
|
6379 | i = name === "width" ? 1 : 0;
|
6380 | }
|
6381 |
|
6382 | for ( ; i < 4; i += 2 ) {
|
6383 |
|
6384 |
|
6385 | if ( extra === "margin" ) {
|
6386 | val += jQuery.css( elem, extra + cssExpand[ i ], true, styles );
|
6387 | }
|
6388 |
|
6389 | if ( isBorderBox ) {
|
6390 |
|
6391 |
|
6392 | if ( extra === "content" ) {
|
6393 | val -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
|
6394 | }
|
6395 |
|
6396 |
|
6397 | if ( extra !== "margin" ) {
|
6398 | val -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
|
6399 | }
|
6400 | } else {
|
6401 |
|
6402 |
|
6403 | val += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
|
6404 |
|
6405 |
|
6406 | if ( extra !== "padding" ) {
|
6407 | val += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
|
6408 | }
|
6409 | }
|
6410 | }
|
6411 |
|
6412 | return val;
|
6413 | }
|
6414 |
|
6415 | function getWidthOrHeight( elem, name, extra ) {
|
6416 |
|
6417 |
|
6418 | var valueIsBorderBox,
|
6419 | styles = getStyles( elem ),
|
6420 | val = curCSS( elem, name, styles ),
|
6421 | isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box";
|
6422 |
|
6423 |
|
6424 | if ( rnumnonpx.test( val ) ) {
|
6425 | return val;
|
6426 | }
|
6427 |
|
6428 |
|
6429 |
|
6430 | valueIsBorderBox = isBorderBox &&
|
6431 | ( support.boxSizingReliable() || val === elem.style[ name ] );
|
6432 |
|
6433 |
|
6434 |
|
6435 | if ( val === "auto" ) {
|
6436 | val = elem[ "offset" + name[ 0 ].toUpperCase() + name.slice( 1 ) ];
|
6437 | }
|
6438 |
|
6439 |
|
6440 | val = parseFloat( val ) || 0;
|
6441 |
|
6442 |
|
6443 | return ( val +
|
6444 | augmentWidthOrHeight(
|
6445 | elem,
|
6446 | name,
|
6447 | extra || ( isBorderBox ? "border" : "content" ),
|
6448 | valueIsBorderBox,
|
6449 | styles
|
6450 | )
|
6451 | ) + "px";
|
6452 | }
|
6453 |
|
6454 | jQuery.extend( {
|
6455 |
|
6456 |
|
6457 |
|
6458 | cssHooks: {
|
6459 | opacity: {
|
6460 | get: function( elem, computed ) {
|
6461 | if ( computed ) {
|
6462 |
|
6463 |
|
6464 | var ret = curCSS( elem, "opacity" );
|
6465 | return ret === "" ? "1" : ret;
|
6466 | }
|
6467 | }
|
6468 | }
|
6469 | },
|
6470 |
|
6471 |
|
6472 | cssNumber: {
|
6473 | "animationIterationCount": true,
|
6474 | "columnCount": true,
|
6475 | "fillOpacity": true,
|
6476 | "flexGrow": true,
|
6477 | "flexShrink": true,
|
6478 | "fontWeight": true,
|
6479 | "lineHeight": true,
|
6480 | "opacity": true,
|
6481 | "order": true,
|
6482 | "orphans": true,
|
6483 | "widows": true,
|
6484 | "zIndex": true,
|
6485 | "zoom": true
|
6486 | },
|
6487 |
|
6488 |
|
6489 |
|
6490 | cssProps: {
|
6491 | "float": "cssFloat"
|
6492 | },
|
6493 |
|
6494 |
|
6495 | style: function( elem, name, value, extra ) {
|
6496 |
|
6497 |
|
6498 | if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
|
6499 | return;
|
6500 | }
|
6501 |
|
6502 |
|
6503 | var ret, type, hooks,
|
6504 | origName = jQuery.camelCase( name ),
|
6505 | isCustomProp = rcustomProp.test( name ),
|
6506 | style = elem.style;
|
6507 |
|
6508 |
|
6509 |
|
6510 |
|
6511 | if ( !isCustomProp ) {
|
6512 | name = finalPropName( origName );
|
6513 | }
|
6514 |
|
6515 |
|
6516 | hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
|
6517 |
|
6518 |
|
6519 | if ( value !== undefined ) {
|
6520 | type = typeof value;
|
6521 |
|
6522 |
|
6523 | if ( type === "string" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) {
|
6524 | value = adjustCSS( elem, name, ret );
|
6525 |
|
6526 |
|
6527 | type = "number";
|
6528 | }
|
6529 |
|
6530 |
|
6531 | if ( value == null || value !== value ) {
|
6532 | return;
|
6533 | }
|
6534 |
|
6535 |
|
6536 | if ( type === "number" ) {
|
6537 | value += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? "" : "px" );
|
6538 | }
|
6539 |
|
6540 |
|
6541 | if ( !support.clearCloneStyle && value === "" && name.indexOf( "background" ) === 0 ) {
|
6542 | style[ name ] = "inherit";
|
6543 | }
|
6544 |
|
6545 |
|
6546 | if ( !hooks || !( "set" in hooks ) ||
|
6547 | ( value = hooks.set( elem, value, extra ) ) !== undefined ) {
|
6548 |
|
6549 | if ( isCustomProp ) {
|
6550 | style.setProperty( name, value );
|
6551 | } else {
|
6552 | style[ name ] = value;
|
6553 | }
|
6554 | }
|
6555 |
|
6556 | } else {
|
6557 |
|
6558 |
|
6559 | if ( hooks && "get" in hooks &&
|
6560 | ( ret = hooks.get( elem, false, extra ) ) !== undefined ) {
|
6561 |
|
6562 | return ret;
|
6563 | }
|
6564 |
|
6565 |
|
6566 | return style[ name ];
|
6567 | }
|
6568 | },
|
6569 |
|
6570 | css: function( elem, name, extra, styles ) {
|
6571 | var val, num, hooks,
|
6572 | origName = jQuery.camelCase( name ),
|
6573 | isCustomProp = rcustomProp.test( name );
|
6574 |
|
6575 |
|
6576 |
|
6577 |
|
6578 | if ( !isCustomProp ) {
|
6579 | name = finalPropName( origName );
|
6580 | }
|
6581 |
|
6582 |
|
6583 | hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
|
6584 |
|
6585 |
|
6586 | if ( hooks && "get" in hooks ) {
|
6587 | val = hooks.get( elem, true, extra );
|
6588 | }
|
6589 |
|
6590 |
|
6591 | if ( val === undefined ) {
|
6592 | val = curCSS( elem, name, styles );
|
6593 | }
|
6594 |
|
6595 |
|
6596 | if ( val === "normal" && name in cssNormalTransform ) {
|
6597 | val = cssNormalTransform[ name ];
|
6598 | }
|
6599 |
|
6600 |
|
6601 | if ( extra === "" || extra ) {
|
6602 | num = parseFloat( val );
|
6603 | return extra === true || isFinite( num ) ? num || 0 : val;
|
6604 | }
|
6605 |
|
6606 | return val;
|
6607 | }
|
6608 | } );
|
6609 |
|
6610 | jQuery.each( [ "height", "width" ], function( i, name ) {
|
6611 | jQuery.cssHooks[ name ] = {
|
6612 | get: function( elem, computed, extra ) {
|
6613 | if ( computed ) {
|
6614 |
|
6615 |
|
6616 |
|
6617 | return rdisplayswap.test( jQuery.css( elem, "display" ) ) &&
|
6618 |
|
6619 |
|
6620 |
|
6621 |
|
6622 |
|
6623 |
|
6624 |
|
6625 | ( !elem.getClientRects().length || !elem.getBoundingClientRect().width ) ?
|
6626 | swap( elem, cssShow, function() {
|
6627 | return getWidthOrHeight( elem, name, extra );
|
6628 | } ) :
|
6629 | getWidthOrHeight( elem, name, extra );
|
6630 | }
|
6631 | },
|
6632 |
|
6633 | set: function( elem, value, extra ) {
|
6634 | var matches,
|
6635 | styles = extra && getStyles( elem ),
|
6636 | subtract = extra && augmentWidthOrHeight(
|
6637 | elem,
|
6638 | name,
|
6639 | extra,
|
6640 | jQuery.css( elem, "boxSizing", false, styles ) === "border-box",
|
6641 | styles
|
6642 | );
|
6643 |
|
6644 |
|
6645 | if ( subtract && ( matches = rcssNum.exec( value ) ) &&
|
6646 | ( matches[ 3 ] || "px" ) !== "px" ) {
|
6647 |
|
6648 | elem.style[ name ] = value;
|
6649 | value = jQuery.css( elem, name );
|
6650 | }
|
6651 |
|
6652 | return setPositiveNumber( elem, value, subtract );
|
6653 | }
|
6654 | };
|
6655 | } );
|
6656 |
|
6657 | jQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft,
|
6658 | function( elem, computed ) {
|
6659 | if ( computed ) {
|
6660 | return ( parseFloat( curCSS( elem, "marginLeft" ) ) ||
|
6661 | elem.getBoundingClientRect().left -
|
6662 | swap( elem, { marginLeft: 0 }, function() {
|
6663 | return elem.getBoundingClientRect().left;
|
6664 | } )
|
6665 | ) + "px";
|
6666 | }
|
6667 | }
|
6668 | );
|
6669 |
|
6670 |
|
6671 | jQuery.each( {
|
6672 | margin: "",
|
6673 | padding: "",
|
6674 | border: "Width"
|
6675 | }, function( prefix, suffix ) {
|
6676 | jQuery.cssHooks[ prefix + suffix ] = {
|
6677 | expand: function( value ) {
|
6678 | var i = 0,
|
6679 | expanded = {},
|
6680 |
|
6681 |
|
6682 | parts = typeof value === "string" ? value.split( " " ) : [ value ];
|
6683 |
|
6684 | for ( ; i < 4; i++ ) {
|
6685 | expanded[ prefix + cssExpand[ i ] + suffix ] =
|
6686 | parts[ i ] || parts[ i - 2 ] || parts[ 0 ];
|
6687 | }
|
6688 |
|
6689 | return expanded;
|
6690 | }
|
6691 | };
|
6692 |
|
6693 | if ( !rmargin.test( prefix ) ) {
|
6694 | jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;
|
6695 | }
|
6696 | } );
|
6697 |
|
6698 | jQuery.fn.extend( {
|
6699 | css: function( name, value ) {
|
6700 | return access( this, function( elem, name, value ) {
|
6701 | var styles, len,
|
6702 | map = {},
|
6703 | i = 0;
|
6704 |
|
6705 | if ( Array.isArray( name ) ) {
|
6706 | styles = getStyles( elem );
|
6707 | len = name.length;
|
6708 |
|
6709 | for ( ; i < len; i++ ) {
|
6710 | map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles );
|
6711 | }
|
6712 |
|
6713 | return map;
|
6714 | }
|
6715 |
|
6716 | return value !== undefined ?
|
6717 | jQuery.style( elem, name, value ) :
|
6718 | jQuery.css( elem, name );
|
6719 | }, name, value, arguments.length > 1 );
|
6720 | }
|
6721 | } );
|
6722 |
|
6723 |
|
6724 | function Tween( elem, options, prop, end, easing ) {
|
6725 | return new Tween.prototype.init( elem, options, prop, end, easing );
|
6726 | }
|
6727 | jQuery.Tween = Tween;
|
6728 |
|
6729 | Tween.prototype = {
|
6730 | constructor: Tween,
|
6731 | init: function( elem, options, prop, end, easing, unit ) {
|
6732 | this.elem = elem;
|
6733 | this.prop = prop;
|
6734 | this.easing = easing || jQuery.easing._default;
|
6735 | this.options = options;
|
6736 | this.start = this.now = this.cur();
|
6737 | this.end = end;
|
6738 | this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" );
|
6739 | },
|
6740 | cur: function() {
|
6741 | var hooks = Tween.propHooks[ this.prop ];
|
6742 |
|
6743 | return hooks && hooks.get ?
|
6744 | hooks.get( this ) :
|
6745 | Tween.propHooks._default.get( this );
|
6746 | },
|
6747 | run: function( percent ) {
|
6748 | var eased,
|
6749 | hooks = Tween.propHooks[ this.prop ];
|
6750 |
|
6751 | if ( this.options.duration ) {
|
6752 | this.pos = eased = jQuery.easing[ this.easing ](
|
6753 | percent, this.options.duration * percent, 0, 1, this.options.duration
|
6754 | );
|
6755 | } else {
|
6756 | this.pos = eased = percent;
|
6757 | }
|
6758 | this.now = ( this.end - this.start ) * eased + this.start;
|
6759 |
|
6760 | if ( this.options.step ) {
|
6761 | this.options.step.call( this.elem, this.now, this );
|
6762 | }
|
6763 |
|
6764 | if ( hooks && hooks.set ) {
|
6765 | hooks.set( this );
|
6766 | } else {
|
6767 | Tween.propHooks._default.set( this );
|
6768 | }
|
6769 | return this;
|
6770 | }
|
6771 | };
|
6772 |
|
6773 | Tween.prototype.init.prototype = Tween.prototype;
|
6774 |
|
6775 | Tween.propHooks = {
|
6776 | _default: {
|
6777 | get: function( tween ) {
|
6778 | var result;
|
6779 |
|
6780 |
|
6781 |
|
6782 | if ( tween.elem.nodeType !== 1 ||
|
6783 | tween.elem[ tween.prop ] != null && tween.elem.style[ tween.prop ] == null ) {
|
6784 | return tween.elem[ tween.prop ];
|
6785 | }
|
6786 |
|
6787 |
|
6788 |
|
6789 |
|
6790 |
|
6791 | result = jQuery.css( tween.elem, tween.prop, "" );
|
6792 |
|
6793 |
|
6794 | return !result || result === "auto" ? 0 : result;
|
6795 | },
|
6796 | set: function( tween ) {
|
6797 |
|
6798 |
|
6799 |
|
6800 |
|
6801 | if ( jQuery.fx.step[ tween.prop ] ) {
|
6802 | jQuery.fx.step[ tween.prop ]( tween );
|
6803 | } else if ( tween.elem.nodeType === 1 &&
|
6804 | ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null ||
|
6805 | jQuery.cssHooks[ tween.prop ] ) ) {
|
6806 | jQuery.style( tween.elem, tween.prop, tween.now + tween.unit );
|
6807 | } else {
|
6808 | tween.elem[ tween.prop ] = tween.now;
|
6809 | }
|
6810 | }
|
6811 | }
|
6812 | };
|
6813 |
|
6814 |
|
6815 |
|
6816 | Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {
|
6817 | set: function( tween ) {
|
6818 | if ( tween.elem.nodeType && tween.elem.parentNode ) {
|
6819 | tween.elem[ tween.prop ] = tween.now;
|
6820 | }
|
6821 | }
|
6822 | };
|
6823 |
|
6824 | jQuery.easing = {
|
6825 | linear: function( p ) {
|
6826 | return p;
|
6827 | },
|
6828 | swing: function( p ) {
|
6829 | return 0.5 - Math.cos( p * Math.PI ) / 2;
|
6830 | },
|
6831 | _default: "swing"
|
6832 | };
|
6833 |
|
6834 | jQuery.fx = Tween.prototype.init;
|
6835 |
|
6836 |
|
6837 | jQuery.fx.step = {};
|
6838 |
|
6839 |
|
6840 |
|
6841 |
|
6842 | var
|
6843 | fxNow, inProgress,
|
6844 | rfxtypes = /^(?:toggle|show|hide)$/,
|
6845 | rrun = /queueHooks$/;
|
6846 |
|
6847 | function schedule() {
|
6848 | if ( inProgress ) {
|
6849 | if ( document.hidden === false && window.requestAnimationFrame ) {
|
6850 | window.requestAnimationFrame( schedule );
|
6851 | } else {
|
6852 | window.setTimeout( schedule, jQuery.fx.interval );
|
6853 | }
|
6854 |
|
6855 | jQuery.fx.tick();
|
6856 | }
|
6857 | }
|
6858 |
|
6859 |
|
6860 | function createFxNow() {
|
6861 | window.setTimeout( function() {
|
6862 | fxNow = undefined;
|
6863 | } );
|
6864 | return ( fxNow = jQuery.now() );
|
6865 | }
|
6866 |
|
6867 |
|
6868 | function genFx( type, includeWidth ) {
|
6869 | var which,
|
6870 | i = 0,
|
6871 | attrs = { height: type };
|
6872 |
|
6873 |
|
6874 |
|
6875 | includeWidth = includeWidth ? 1 : 0;
|
6876 | for ( ; i < 4; i += 2 - includeWidth ) {
|
6877 | which = cssExpand[ i ];
|
6878 | attrs[ "margin" + which ] = attrs[ "padding" + which ] = type;
|
6879 | }
|
6880 |
|
6881 | if ( includeWidth ) {
|
6882 | attrs.opacity = attrs.width = type;
|
6883 | }
|
6884 |
|
6885 | return attrs;
|
6886 | }
|
6887 |
|
6888 | function createTween( value, prop, animation ) {
|
6889 | var tween,
|
6890 | collection = ( Animation.tweeners[ prop ] || [] ).concat( Animation.tweeners[ "*" ] ),
|
6891 | index = 0,
|
6892 | length = collection.length;
|
6893 | for ( ; index < length; index++ ) {
|
6894 | if ( ( tween = collection[ index ].call( animation, prop, value ) ) ) {
|
6895 |
|
6896 |
|
6897 | return tween;
|
6898 | }
|
6899 | }
|
6900 | }
|
6901 |
|
6902 | function defaultPrefilter( elem, props, opts ) {
|
6903 | var prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display,
|
6904 | isBox = "width" in props || "height" in props,
|
6905 | anim = this,
|
6906 | orig = {},
|
6907 | style = elem.style,
|
6908 | hidden = elem.nodeType && isHiddenWithinTree( elem ),
|
6909 | dataShow = dataPriv.get( elem, "fxshow" );
|
6910 |
|
6911 |
|
6912 | if ( !opts.queue ) {
|
6913 | hooks = jQuery._queueHooks( elem, "fx" );
|
6914 | if ( hooks.unqueued == null ) {
|
6915 | hooks.unqueued = 0;
|
6916 | oldfire = hooks.empty.fire;
|
6917 | hooks.empty.fire = function() {
|
6918 | if ( !hooks.unqueued ) {
|
6919 | oldfire();
|
6920 | }
|
6921 | };
|
6922 | }
|
6923 | hooks.unqueued++;
|
6924 |
|
6925 | anim.always( function() {
|
6926 |
|
6927 |
|
6928 | anim.always( function() {
|
6929 | hooks.unqueued--;
|
6930 | if ( !jQuery.queue( elem, "fx" ).length ) {
|
6931 | hooks.empty.fire();
|
6932 | }
|
6933 | } );
|
6934 | } );
|
6935 | }
|
6936 |
|
6937 |
|
6938 | for ( prop in props ) {
|
6939 | value = props[ prop ];
|
6940 | if ( rfxtypes.test( value ) ) {
|
6941 | delete props[ prop ];
|
6942 | toggle = toggle || value === "toggle";
|
6943 | if ( value === ( hidden ? "hide" : "show" ) ) {
|
6944 |
|
6945 |
|
6946 |
|
6947 | if ( value === "show" && dataShow && dataShow[ prop ] !== undefined ) {
|
6948 | hidden = true;
|
6949 |
|
6950 |
|
6951 | } else {
|
6952 | continue;
|
6953 | }
|
6954 | }
|
6955 | orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop );
|
6956 | }
|
6957 | }
|
6958 |
|
6959 |
|
6960 | propTween = !jQuery.isEmptyObject( props );
|
6961 | if ( !propTween && jQuery.isEmptyObject( orig ) ) {
|
6962 | return;
|
6963 | }
|
6964 |
|
6965 |
|
6966 | if ( isBox && elem.nodeType === 1 ) {
|
6967 |
|
6968 |
|
6969 |
|
6970 |
|
6971 | opts.overflow = [ style.overflow, style.overflowX, style.overflowY ];
|
6972 |
|
6973 |
|
6974 | restoreDisplay = dataShow && dataShow.display;
|
6975 | if ( restoreDisplay == null ) {
|
6976 | restoreDisplay = dataPriv.get( elem, "display" );
|
6977 | }
|
6978 | display = jQuery.css( elem, "display" );
|
6979 | if ( display === "none" ) {
|
6980 | if ( restoreDisplay ) {
|
6981 | display = restoreDisplay;
|
6982 | } else {
|
6983 |
|
6984 |
|
6985 | showHide( [ elem ], true );
|
6986 | restoreDisplay = elem.style.display || restoreDisplay;
|
6987 | display = jQuery.css( elem, "display" );
|
6988 | showHide( [ elem ] );
|
6989 | }
|
6990 | }
|
6991 |
|
6992 |
|
6993 | if ( display === "inline" || display === "inline-block" && restoreDisplay != null ) {
|
6994 | if ( jQuery.css( elem, "float" ) === "none" ) {
|
6995 |
|
6996 |
|
6997 | if ( !propTween ) {
|
6998 | anim.done( function() {
|
6999 | style.display = restoreDisplay;
|
7000 | } );
|
7001 | if ( restoreDisplay == null ) {
|
7002 | display = style.display;
|
7003 | restoreDisplay = display === "none" ? "" : display;
|
7004 | }
|
7005 | }
|
7006 | style.display = "inline-block";
|
7007 | }
|
7008 | }
|
7009 | }
|
7010 |
|
7011 | if ( opts.overflow ) {
|
7012 | style.overflow = "hidden";
|
7013 | anim.always( function() {
|
7014 | style.overflow = opts.overflow[ 0 ];
|
7015 | style.overflowX = opts.overflow[ 1 ];
|
7016 | style.overflowY = opts.overflow[ 2 ];
|
7017 | } );
|
7018 | }
|
7019 |
|
7020 |
|
7021 | propTween = false;
|
7022 | for ( prop in orig ) {
|
7023 |
|
7024 |
|
7025 | if ( !propTween ) {
|
7026 | if ( dataShow ) {
|
7027 | if ( "hidden" in dataShow ) {
|
7028 | hidden = dataShow.hidden;
|
7029 | }
|
7030 | } else {
|
7031 | dataShow = dataPriv.access( elem, "fxshow", { display: restoreDisplay } );
|
7032 | }
|
7033 |
|
7034 |
|
7035 | if ( toggle ) {
|
7036 | dataShow.hidden = !hidden;
|
7037 | }
|
7038 |
|
7039 |
|
7040 | if ( hidden ) {
|
7041 | showHide( [ elem ], true );
|
7042 | }
|
7043 |
|
7044 |
|
7045 |
|
7046 | anim.done( function() {
|
7047 |
|
7048 |
|
7049 |
|
7050 |
|
7051 | if ( !hidden ) {
|
7052 | showHide( [ elem ] );
|
7053 | }
|
7054 | dataPriv.remove( elem, "fxshow" );
|
7055 | for ( prop in orig ) {
|
7056 | jQuery.style( elem, prop, orig[ prop ] );
|
7057 | }
|
7058 | } );
|
7059 | }
|
7060 |
|
7061 |
|
7062 | propTween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim );
|
7063 | if ( !( prop in dataShow ) ) {
|
7064 | dataShow[ prop ] = propTween.start;
|
7065 | if ( hidden ) {
|
7066 | propTween.end = propTween.start;
|
7067 | propTween.start = 0;
|
7068 | }
|
7069 | }
|
7070 | }
|
7071 | }
|
7072 |
|
7073 | function propFilter( props, specialEasing ) {
|
7074 | var index, name, easing, value, hooks;
|
7075 |
|
7076 |
|
7077 | for ( index in props ) {
|
7078 | name = jQuery.camelCase( index );
|
7079 | easing = specialEasing[ name ];
|
7080 | value = props[ index ];
|
7081 | if ( Array.isArray( value ) ) {
|
7082 | easing = value[ 1 ];
|
7083 | value = props[ index ] = value[ 0 ];
|
7084 | }
|
7085 |
|
7086 | if ( index !== name ) {
|
7087 | props[ name ] = value;
|
7088 | delete props[ index ];
|
7089 | }
|
7090 |
|
7091 | hooks = jQuery.cssHooks[ name ];
|
7092 | if ( hooks && "expand" in hooks ) {
|
7093 | value = hooks.expand( value );
|
7094 | delete props[ name ];
|
7095 |
|
7096 |
|
7097 |
|
7098 | for ( index in value ) {
|
7099 | if ( !( index in props ) ) {
|
7100 | props[ index ] = value[ index ];
|
7101 | specialEasing[ index ] = easing;
|
7102 | }
|
7103 | }
|
7104 | } else {
|
7105 | specialEasing[ name ] = easing;
|
7106 | }
|
7107 | }
|
7108 | }
|
7109 |
|
7110 | function Animation( elem, properties, options ) {
|
7111 | var result,
|
7112 | stopped,
|
7113 | index = 0,
|
7114 | length = Animation.prefilters.length,
|
7115 | deferred = jQuery.Deferred().always( function() {
|
7116 |
|
7117 |
|
7118 | delete tick.elem;
|
7119 | } ),
|
7120 | tick = function() {
|
7121 | if ( stopped ) {
|
7122 | return false;
|
7123 | }
|
7124 | var currentTime = fxNow || createFxNow(),
|
7125 | remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),
|
7126 |
|
7127 |
|
7128 |
|
7129 | temp = remaining / animation.duration || 0,
|
7130 | percent = 1 - temp,
|
7131 | index = 0,
|
7132 | length = animation.tweens.length;
|
7133 |
|
7134 | for ( ; index < length; index++ ) {
|
7135 | animation.tweens[ index ].run( percent );
|
7136 | }
|
7137 |
|
7138 | deferred.notifyWith( elem, [ animation, percent, remaining ] );
|
7139 |
|
7140 |
|
7141 | if ( percent < 1 && length ) {
|
7142 | return remaining;
|
7143 | }
|
7144 |
|
7145 |
|
7146 | if ( !length ) {
|
7147 | deferred.notifyWith( elem, [ animation, 1, 0 ] );
|
7148 | }
|
7149 |
|
7150 |
|
7151 | deferred.resolveWith( elem, [ animation ] );
|
7152 | return false;
|
7153 | },
|
7154 | animation = deferred.promise( {
|
7155 | elem: elem,
|
7156 | props: jQuery.extend( {}, properties ),
|
7157 | opts: jQuery.extend( true, {
|
7158 | specialEasing: {},
|
7159 | easing: jQuery.easing._default
|
7160 | }, options ),
|
7161 | originalProperties: properties,
|
7162 | originalOptions: options,
|
7163 | startTime: fxNow || createFxNow(),
|
7164 | duration: options.duration,
|
7165 | tweens: [],
|
7166 | createTween: function( prop, end ) {
|
7167 | var tween = jQuery.Tween( elem, animation.opts, prop, end,
|
7168 | animation.opts.specialEasing[ prop ] || animation.opts.easing );
|
7169 | animation.tweens.push( tween );
|
7170 | return tween;
|
7171 | },
|
7172 | stop: function( gotoEnd ) {
|
7173 | var index = 0,
|
7174 |
|
7175 |
|
7176 |
|
7177 | length = gotoEnd ? animation.tweens.length : 0;
|
7178 | if ( stopped ) {
|
7179 | return this;
|
7180 | }
|
7181 | stopped = true;
|
7182 | for ( ; index < length; index++ ) {
|
7183 | animation.tweens[ index ].run( 1 );
|
7184 | }
|
7185 |
|
7186 |
|
7187 | if ( gotoEnd ) {
|
7188 | deferred.notifyWith( elem, [ animation, 1, 0 ] );
|
7189 | deferred.resolveWith( elem, [ animation, gotoEnd ] );
|
7190 | } else {
|
7191 | deferred.rejectWith( elem, [ animation, gotoEnd ] );
|
7192 | }
|
7193 | return this;
|
7194 | }
|
7195 | } ),
|
7196 | props = animation.props;
|
7197 |
|
7198 | propFilter( props, animation.opts.specialEasing );
|
7199 |
|
7200 | for ( ; index < length; index++ ) {
|
7201 | result = Animation.prefilters[ index ].call( animation, elem, props, animation.opts );
|
7202 | if ( result ) {
|
7203 | if ( jQuery.isFunction( result.stop ) ) {
|
7204 | jQuery._queueHooks( animation.elem, animation.opts.queue ).stop =
|
7205 | jQuery.proxy( result.stop, result );
|
7206 | }
|
7207 | return result;
|
7208 | }
|
7209 | }
|
7210 |
|
7211 | jQuery.map( props, createTween, animation );
|
7212 |
|
7213 | if ( jQuery.isFunction( animation.opts.start ) ) {
|
7214 | animation.opts.start.call( elem, animation );
|
7215 | }
|
7216 |
|
7217 |
|
7218 | animation
|
7219 | .progress( animation.opts.progress )
|
7220 | .done( animation.opts.done, animation.opts.complete )
|
7221 | .fail( animation.opts.fail )
|
7222 | .always( animation.opts.always );
|
7223 |
|
7224 | jQuery.fx.timer(
|
7225 | jQuery.extend( tick, {
|
7226 | elem: elem,
|
7227 | anim: animation,
|
7228 | queue: animation.opts.queue
|
7229 | } )
|
7230 | );
|
7231 |
|
7232 | return animation;
|
7233 | }
|
7234 |
|
7235 | jQuery.Animation = jQuery.extend( Animation, {
|
7236 |
|
7237 | tweeners: {
|
7238 | "*": [ function( prop, value ) {
|
7239 | var tween = this.createTween( prop, value );
|
7240 | adjustCSS( tween.elem, prop, rcssNum.exec( value ), tween );
|
7241 | return tween;
|
7242 | } ]
|
7243 | },
|
7244 |
|
7245 | tweener: function( props, callback ) {
|
7246 | if ( jQuery.isFunction( props ) ) {
|
7247 | callback = props;
|
7248 | props = [ "*" ];
|
7249 | } else {
|
7250 | props = props.match( rnothtmlwhite );
|
7251 | }
|
7252 |
|
7253 | var prop,
|
7254 | index = 0,
|
7255 | length = props.length;
|
7256 |
|
7257 | for ( ; index < length; index++ ) {
|
7258 | prop = props[ index ];
|
7259 | Animation.tweeners[ prop ] = Animation.tweeners[ prop ] || [];
|
7260 | Animation.tweeners[ prop ].unshift( callback );
|
7261 | }
|
7262 | },
|
7263 |
|
7264 | prefilters: [ defaultPrefilter ],
|
7265 |
|
7266 | prefilter: function( callback, prepend ) {
|
7267 | if ( prepend ) {
|
7268 | Animation.prefilters.unshift( callback );
|
7269 | } else {
|
7270 | Animation.prefilters.push( callback );
|
7271 | }
|
7272 | }
|
7273 | } );
|
7274 |
|
7275 | jQuery.speed = function( speed, easing, fn ) {
|
7276 | var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : {
|
7277 | complete: fn || !fn && easing ||
|
7278 | jQuery.isFunction( speed ) && speed,
|
7279 | duration: speed,
|
7280 | easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing
|
7281 | };
|
7282 |
|
7283 |
|
7284 | if ( jQuery.fx.off ) {
|
7285 | opt.duration = 0;
|
7286 |
|
7287 | } else {
|
7288 | if ( typeof opt.duration !== "number" ) {
|
7289 | if ( opt.duration in jQuery.fx.speeds ) {
|
7290 | opt.duration = jQuery.fx.speeds[ opt.duration ];
|
7291 |
|
7292 | } else {
|
7293 | opt.duration = jQuery.fx.speeds._default;
|
7294 | }
|
7295 | }
|
7296 | }
|
7297 |
|
7298 |
|
7299 | if ( opt.queue == null || opt.queue === true ) {
|
7300 | opt.queue = "fx";
|
7301 | }
|
7302 |
|
7303 |
|
7304 | opt.old = opt.complete;
|
7305 |
|
7306 | opt.complete = function() {
|
7307 | if ( jQuery.isFunction( opt.old ) ) {
|
7308 | opt.old.call( this );
|
7309 | }
|
7310 |
|
7311 | if ( opt.queue ) {
|
7312 | jQuery.dequeue( this, opt.queue );
|
7313 | }
|
7314 | };
|
7315 |
|
7316 | return opt;
|
7317 | };
|
7318 |
|
7319 | jQuery.fn.extend( {
|
7320 | fadeTo: function( speed, to, easing, callback ) {
|
7321 |
|
7322 |
|
7323 | return this.filter( isHiddenWithinTree ).css( "opacity", 0 ).show()
|
7324 |
|
7325 |
|
7326 | .end().animate( { opacity: to }, speed, easing, callback );
|
7327 | },
|
7328 | animate: function( prop, speed, easing, callback ) {
|
7329 | var empty = jQuery.isEmptyObject( prop ),
|
7330 | optall = jQuery.speed( speed, easing, callback ),
|
7331 | doAnimation = function() {
|
7332 |
|
7333 |
|
7334 | var anim = Animation( this, jQuery.extend( {}, prop ), optall );
|
7335 |
|
7336 |
|
7337 | if ( empty || dataPriv.get( this, "finish" ) ) {
|
7338 | anim.stop( true );
|
7339 | }
|
7340 | };
|
7341 | doAnimation.finish = doAnimation;
|
7342 |
|
7343 | return empty || optall.queue === false ?
|
7344 | this.each( doAnimation ) :
|
7345 | this.queue( optall.queue, doAnimation );
|
7346 | },
|
7347 | stop: function( type, clearQueue, gotoEnd ) {
|
7348 | var stopQueue = function( hooks ) {
|
7349 | var stop = hooks.stop;
|
7350 | delete hooks.stop;
|
7351 | stop( gotoEnd );
|
7352 | };
|
7353 |
|
7354 | if ( typeof type !== "string" ) {
|
7355 | gotoEnd = clearQueue;
|
7356 | clearQueue = type;
|
7357 | type = undefined;
|
7358 | }
|
7359 | if ( clearQueue && type !== false ) {
|
7360 | this.queue( type || "fx", [] );
|
7361 | }
|
7362 |
|
7363 | return this.each( function() {
|
7364 | var dequeue = true,
|
7365 | index = type != null && type + "queueHooks",
|
7366 | timers = jQuery.timers,
|
7367 | data = dataPriv.get( this );
|
7368 |
|
7369 | if ( index ) {
|
7370 | if ( data[ index ] && data[ index ].stop ) {
|
7371 | stopQueue( data[ index ] );
|
7372 | }
|
7373 | } else {
|
7374 | for ( index in data ) {
|
7375 | if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) {
|
7376 | stopQueue( data[ index ] );
|
7377 | }
|
7378 | }
|
7379 | }
|
7380 |
|
7381 | for ( index = timers.length; index--; ) {
|
7382 | if ( timers[ index ].elem === this &&
|
7383 | ( type == null || timers[ index ].queue === type ) ) {
|
7384 |
|
7385 | timers[ index ].anim.stop( gotoEnd );
|
7386 | dequeue = false;
|
7387 | timers.splice( index, 1 );
|
7388 | }
|
7389 | }
|
7390 |
|
7391 |
|
7392 |
|
7393 |
|
7394 | if ( dequeue || !gotoEnd ) {
|
7395 | jQuery.dequeue( this, type );
|
7396 | }
|
7397 | } );
|
7398 | },
|
7399 | finish: function( type ) {
|
7400 | if ( type !== false ) {
|
7401 | type = type || "fx";
|
7402 | }
|
7403 | return this.each( function() {
|
7404 | var index,
|
7405 | data = dataPriv.get( this ),
|
7406 | queue = data[ type + "queue" ],
|
7407 | hooks = data[ type + "queueHooks" ],
|
7408 | timers = jQuery.timers,
|
7409 | length = queue ? queue.length : 0;
|
7410 |
|
7411 |
|
7412 | data.finish = true;
|
7413 |
|
7414 |
|
7415 | jQuery.queue( this, type, [] );
|
7416 |
|
7417 | if ( hooks && hooks.stop ) {
|
7418 | hooks.stop.call( this, true );
|
7419 | }
|
7420 |
|
7421 |
|
7422 | for ( index = timers.length; index--; ) {
|
7423 | if ( timers[ index ].elem === this && timers[ index ].queue === type ) {
|
7424 | timers[ index ].anim.stop( true );
|
7425 | timers.splice( index, 1 );
|
7426 | }
|
7427 | }
|
7428 |
|
7429 |
|
7430 | for ( index = 0; index < length; index++ ) {
|
7431 | if ( queue[ index ] && queue[ index ].finish ) {
|
7432 | queue[ index ].finish.call( this );
|
7433 | }
|
7434 | }
|
7435 |
|
7436 |
|
7437 | delete data.finish;
|
7438 | } );
|
7439 | }
|
7440 | } );
|
7441 |
|
7442 | jQuery.each( [ "toggle", "show", "hide" ], function( i, name ) {
|
7443 | var cssFn = jQuery.fn[ name ];
|
7444 | jQuery.fn[ name ] = function( speed, easing, callback ) {
|
7445 | return speed == null || typeof speed === "boolean" ?
|
7446 | cssFn.apply( this, arguments ) :
|
7447 | this.animate( genFx( name, true ), speed, easing, callback );
|
7448 | };
|
7449 | } );
|
7450 |
|
7451 |
|
7452 | jQuery.each( {
|
7453 | slideDown: genFx( "show" ),
|
7454 | slideUp: genFx( "hide" ),
|
7455 | slideToggle: genFx( "toggle" ),
|
7456 | fadeIn: { opacity: "show" },
|
7457 | fadeOut: { opacity: "hide" },
|
7458 | fadeToggle: { opacity: "toggle" }
|
7459 | }, function( name, props ) {
|
7460 | jQuery.fn[ name ] = function( speed, easing, callback ) {
|
7461 | return this.animate( props, speed, easing, callback );
|
7462 | };
|
7463 | } );
|
7464 |
|
7465 | jQuery.timers = [];
|
7466 | jQuery.fx.tick = function() {
|
7467 | var timer,
|
7468 | i = 0,
|
7469 | timers = jQuery.timers;
|
7470 |
|
7471 | fxNow = jQuery.now();
|
7472 |
|
7473 | for ( ; i < timers.length; i++ ) {
|
7474 | timer = timers[ i ];
|
7475 |
|
7476 |
|
7477 | if ( !timer() && timers[ i ] === timer ) {
|
7478 | timers.splice( i--, 1 );
|
7479 | }
|
7480 | }
|
7481 |
|
7482 | if ( !timers.length ) {
|
7483 | jQuery.fx.stop();
|
7484 | }
|
7485 | fxNow = undefined;
|
7486 | };
|
7487 |
|
7488 | jQuery.fx.timer = function( timer ) {
|
7489 | jQuery.timers.push( timer );
|
7490 | jQuery.fx.start();
|
7491 | };
|
7492 |
|
7493 | jQuery.fx.interval = 13;
|
7494 | jQuery.fx.start = function() {
|
7495 | if ( inProgress ) {
|
7496 | return;
|
7497 | }
|
7498 |
|
7499 | inProgress = true;
|
7500 | schedule();
|
7501 | };
|
7502 |
|
7503 | jQuery.fx.stop = function() {
|
7504 | inProgress = null;
|
7505 | };
|
7506 |
|
7507 | jQuery.fx.speeds = {
|
7508 | slow: 600,
|
7509 | fast: 200,
|
7510 |
|
7511 |
|
7512 | _default: 400
|
7513 | };
|
7514 |
|
7515 |
|
7516 |
|
7517 |
|
7518 | jQuery.fn.delay = function( time, type ) {
|
7519 | time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;
|
7520 | type = type || "fx";
|
7521 |
|
7522 | return this.queue( type, function( next, hooks ) {
|
7523 | var timeout = window.setTimeout( next, time );
|
7524 | hooks.stop = function() {
|
7525 | window.clearTimeout( timeout );
|
7526 | };
|
7527 | } );
|
7528 | };
|
7529 |
|
7530 |
|
7531 | ( function() {
|
7532 | var input = document.createElement( "input" ),
|
7533 | select = document.createElement( "select" ),
|
7534 | opt = select.appendChild( document.createElement( "option" ) );
|
7535 |
|
7536 | input.type = "checkbox";
|
7537 |
|
7538 |
|
7539 |
|
7540 | support.checkOn = input.value !== "";
|
7541 |
|
7542 |
|
7543 |
|
7544 | support.optSelected = opt.selected;
|
7545 |
|
7546 |
|
7547 |
|
7548 | input = document.createElement( "input" );
|
7549 | input.value = "t";
|
7550 | input.type = "radio";
|
7551 | support.radioValue = input.value === "t";
|
7552 | } )();
|
7553 |
|
7554 |
|
7555 | var boolHook,
|
7556 | attrHandle = jQuery.expr.attrHandle;
|
7557 |
|
7558 | jQuery.fn.extend( {
|
7559 | attr: function( name, value ) {
|
7560 | return access( this, jQuery.attr, name, value, arguments.length > 1 );
|
7561 | },
|
7562 |
|
7563 | removeAttr: function( name ) {
|
7564 | return this.each( function() {
|
7565 | jQuery.removeAttr( this, name );
|
7566 | } );
|
7567 | }
|
7568 | } );
|
7569 |
|
7570 | jQuery.extend( {
|
7571 | attr: function( elem, name, value ) {
|
7572 | var ret, hooks,
|
7573 | nType = elem.nodeType;
|
7574 |
|
7575 |
|
7576 | if ( nType === 3 || nType === 8 || nType === 2 ) {
|
7577 | return;
|
7578 | }
|
7579 |
|
7580 |
|
7581 | if ( typeof elem.getAttribute === "undefined" ) {
|
7582 | return jQuery.prop( elem, name, value );
|
7583 | }
|
7584 |
|
7585 |
|
7586 |
|
7587 | if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {
|
7588 | hooks = jQuery.attrHooks[ name.toLowerCase() ] ||
|
7589 | ( jQuery.expr.match.bool.test( name ) ? boolHook : undefined );
|
7590 | }
|
7591 |
|
7592 | if ( value !== undefined ) {
|
7593 | if ( value === null ) {
|
7594 | jQuery.removeAttr( elem, name );
|
7595 | return;
|
7596 | }
|
7597 |
|
7598 | if ( hooks && "set" in hooks &&
|
7599 | ( ret = hooks.set( elem, value, name ) ) !== undefined ) {
|
7600 | return ret;
|
7601 | }
|
7602 |
|
7603 | elem.setAttribute( name, value + "" );
|
7604 | return value;
|
7605 | }
|
7606 |
|
7607 | if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {
|
7608 | return ret;
|
7609 | }
|
7610 |
|
7611 | ret = jQuery.find.attr( elem, name );
|
7612 |
|
7613 |
|
7614 | return ret == null ? undefined : ret;
|
7615 | },
|
7616 |
|
7617 | attrHooks: {
|
7618 | type: {
|
7619 | set: function( elem, value ) {
|
7620 | if ( !support.radioValue && value === "radio" &&
|
7621 | nodeName( elem, "input" ) ) {
|
7622 | var val = elem.value;
|
7623 | elem.setAttribute( "type", value );
|
7624 | if ( val ) {
|
7625 | elem.value = val;
|
7626 | }
|
7627 | return value;
|
7628 | }
|
7629 | }
|
7630 | }
|
7631 | },
|
7632 |
|
7633 | removeAttr: function( elem, value ) {
|
7634 | var name,
|
7635 | i = 0,
|
7636 |
|
7637 |
|
7638 |
|
7639 | attrNames = value && value.match( rnothtmlwhite );
|
7640 |
|
7641 | if ( attrNames && elem.nodeType === 1 ) {
|
7642 | while ( ( name = attrNames[ i++ ] ) ) {
|
7643 | elem.removeAttribute( name );
|
7644 | }
|
7645 | }
|
7646 | }
|
7647 | } );
|
7648 |
|
7649 |
|
7650 | boolHook = {
|
7651 | set: function( elem, value, name ) {
|
7652 | if ( value === false ) {
|
7653 |
|
7654 |
|
7655 | jQuery.removeAttr( elem, name );
|
7656 | } else {
|
7657 | elem.setAttribute( name, name );
|
7658 | }
|
7659 | return name;
|
7660 | }
|
7661 | };
|
7662 |
|
7663 | jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( i, name ) {
|
7664 | var getter = attrHandle[ name ] || jQuery.find.attr;
|
7665 |
|
7666 | attrHandle[ name ] = function( elem, name, isXML ) {
|
7667 | var ret, handle,
|
7668 | lowercaseName = name.toLowerCase();
|
7669 |
|
7670 | if ( !isXML ) {
|
7671 |
|
7672 |
|
7673 | handle = attrHandle[ lowercaseName ];
|
7674 | attrHandle[ lowercaseName ] = ret;
|
7675 | ret = getter( elem, name, isXML ) != null ?
|
7676 | lowercaseName :
|
7677 | null;
|
7678 | attrHandle[ lowercaseName ] = handle;
|
7679 | }
|
7680 | return ret;
|
7681 | };
|
7682 | } );
|
7683 |
|
7684 |
|
7685 |
|
7686 |
|
7687 | var rfocusable = /^(?:input|select|textarea|button)$/i,
|
7688 | rclickable = /^(?:a|area)$/i;
|
7689 |
|
7690 | jQuery.fn.extend( {
|
7691 | prop: function( name, value ) {
|
7692 | return access( this, jQuery.prop, name, value, arguments.length > 1 );
|
7693 | },
|
7694 |
|
7695 | removeProp: function( name ) {
|
7696 | return this.each( function() {
|
7697 | delete this[ jQuery.propFix[ name ] || name ];
|
7698 | } );
|
7699 | }
|
7700 | } );
|
7701 |
|
7702 | jQuery.extend( {
|
7703 | prop: function( elem, name, value ) {
|
7704 | var ret, hooks,
|
7705 | nType = elem.nodeType;
|
7706 |
|
7707 |
|
7708 | if ( nType === 3 || nType === 8 || nType === 2 ) {
|
7709 | return;
|
7710 | }
|
7711 |
|
7712 | if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {
|
7713 |
|
7714 |
|
7715 | name = jQuery.propFix[ name ] || name;
|
7716 | hooks = jQuery.propHooks[ name ];
|
7717 | }
|
7718 |
|
7719 | if ( value !== undefined ) {
|
7720 | if ( hooks && "set" in hooks &&
|
7721 | ( ret = hooks.set( elem, value, name ) ) !== undefined ) {
|
7722 | return ret;
|
7723 | }
|
7724 |
|
7725 | return ( elem[ name ] = value );
|
7726 | }
|
7727 |
|
7728 | if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {
|
7729 | return ret;
|
7730 | }
|
7731 |
|
7732 | return elem[ name ];
|
7733 | },
|
7734 |
|
7735 | propHooks: {
|
7736 | tabIndex: {
|
7737 | get: function( elem ) {
|
7738 |
|
7739 |
|
7740 |
|
7741 |
|
7742 |
|
7743 |
|
7744 | var tabindex = jQuery.find.attr( elem, "tabindex" );
|
7745 |
|
7746 | if ( tabindex ) {
|
7747 | return parseInt( tabindex, 10 );
|
7748 | }
|
7749 |
|
7750 | if (
|
7751 | rfocusable.test( elem.nodeName ) ||
|
7752 | rclickable.test( elem.nodeName ) &&
|
7753 | elem.href
|
7754 | ) {
|
7755 | return 0;
|
7756 | }
|
7757 |
|
7758 | return -1;
|
7759 | }
|
7760 | }
|
7761 | },
|
7762 |
|
7763 | propFix: {
|
7764 | "for": "htmlFor",
|
7765 | "class": "className"
|
7766 | }
|
7767 | } );
|
7768 |
|
7769 |
|
7770 |
|
7771 |
|
7772 |
|
7773 |
|
7774 |
|
7775 |
|
7776 |
|
7777 | if ( !support.optSelected ) {
|
7778 | jQuery.propHooks.selected = {
|
7779 | get: function( elem ) {
|
7780 |
|
7781 |
|
7782 |
|
7783 | var parent = elem.parentNode;
|
7784 | if ( parent && parent.parentNode ) {
|
7785 | parent.parentNode.selectedIndex;
|
7786 | }
|
7787 | return null;
|
7788 | },
|
7789 | set: function( elem ) {
|
7790 |
|
7791 |
|
7792 |
|
7793 | var parent = elem.parentNode;
|
7794 | if ( parent ) {
|
7795 | parent.selectedIndex;
|
7796 |
|
7797 | if ( parent.parentNode ) {
|
7798 | parent.parentNode.selectedIndex;
|
7799 | }
|
7800 | }
|
7801 | }
|
7802 | };
|
7803 | }
|
7804 |
|
7805 | jQuery.each( [
|
7806 | "tabIndex",
|
7807 | "readOnly",
|
7808 | "maxLength",
|
7809 | "cellSpacing",
|
7810 | "cellPadding",
|
7811 | "rowSpan",
|
7812 | "colSpan",
|
7813 | "useMap",
|
7814 | "frameBorder",
|
7815 | "contentEditable"
|
7816 | ], function() {
|
7817 | jQuery.propFix[ this.toLowerCase() ] = this;
|
7818 | } );
|
7819 |
|
7820 |
|
7821 |
|
7822 |
|
7823 |
|
7824 |
|
7825 | function stripAndCollapse( value ) {
|
7826 | var tokens = value.match( rnothtmlwhite ) || [];
|
7827 | return tokens.join( " " );
|
7828 | }
|
7829 |
|
7830 |
|
7831 | function getClass( elem ) {
|
7832 | return elem.getAttribute && elem.getAttribute( "class" ) || "";
|
7833 | }
|
7834 |
|
7835 | jQuery.fn.extend( {
|
7836 | addClass: function( value ) {
|
7837 | var classes, elem, cur, curValue, clazz, j, finalValue,
|
7838 | i = 0;
|
7839 |
|
7840 | if ( jQuery.isFunction( value ) ) {
|
7841 | return this.each( function( j ) {
|
7842 | jQuery( this ).addClass( value.call( this, j, getClass( this ) ) );
|
7843 | } );
|
7844 | }
|
7845 |
|
7846 | if ( typeof value === "string" && value ) {
|
7847 | classes = value.match( rnothtmlwhite ) || [];
|
7848 |
|
7849 | while ( ( elem = this[ i++ ] ) ) {
|
7850 | curValue = getClass( elem );
|
7851 | cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " );
|
7852 |
|
7853 | if ( cur ) {
|
7854 | j = 0;
|
7855 | while ( ( clazz = classes[ j++ ] ) ) {
|
7856 | if ( cur.indexOf( " " + clazz + " " ) < 0 ) {
|
7857 | cur += clazz + " ";
|
7858 | }
|
7859 | }
|
7860 |
|
7861 |
|
7862 | finalValue = stripAndCollapse( cur );
|
7863 | if ( curValue !== finalValue ) {
|
7864 | elem.setAttribute( "class", finalValue );
|
7865 | }
|
7866 | }
|
7867 | }
|
7868 | }
|
7869 |
|
7870 | return this;
|
7871 | },
|
7872 |
|
7873 | removeClass: function( value ) {
|
7874 | var classes, elem, cur, curValue, clazz, j, finalValue,
|
7875 | i = 0;
|
7876 |
|
7877 | if ( jQuery.isFunction( value ) ) {
|
7878 | return this.each( function( j ) {
|
7879 | jQuery( this ).removeClass( value.call( this, j, getClass( this ) ) );
|
7880 | } );
|
7881 | }
|
7882 |
|
7883 | if ( !arguments.length ) {
|
7884 | return this.attr( "class", "" );
|
7885 | }
|
7886 |
|
7887 | if ( typeof value === "string" && value ) {
|
7888 | classes = value.match( rnothtmlwhite ) || [];
|
7889 |
|
7890 | while ( ( elem = this[ i++ ] ) ) {
|
7891 | curValue = getClass( elem );
|
7892 |
|
7893 |
|
7894 | cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " );
|
7895 |
|
7896 | if ( cur ) {
|
7897 | j = 0;
|
7898 | while ( ( clazz = classes[ j++ ] ) ) {
|
7899 |
|
7900 |
|
7901 | while ( cur.indexOf( " " + clazz + " " ) > -1 ) {
|
7902 | cur = cur.replace( " " + clazz + " ", " " );
|
7903 | }
|
7904 | }
|
7905 |
|
7906 |
|
7907 | finalValue = stripAndCollapse( cur );
|
7908 | if ( curValue !== finalValue ) {
|
7909 | elem.setAttribute( "class", finalValue );
|
7910 | }
|
7911 | }
|
7912 | }
|
7913 | }
|
7914 |
|
7915 | return this;
|
7916 | },
|
7917 |
|
7918 | toggleClass: function( value, stateVal ) {
|
7919 | var type = typeof value;
|
7920 |
|
7921 | if ( typeof stateVal === "boolean" && type === "string" ) {
|
7922 | return stateVal ? this.addClass( value ) : this.removeClass( value );
|
7923 | }
|
7924 |
|
7925 | if ( jQuery.isFunction( value ) ) {
|
7926 | return this.each( function( i ) {
|
7927 | jQuery( this ).toggleClass(
|
7928 | value.call( this, i, getClass( this ), stateVal ),
|
7929 | stateVal
|
7930 | );
|
7931 | } );
|
7932 | }
|
7933 |
|
7934 | return this.each( function() {
|
7935 | var className, i, self, classNames;
|
7936 |
|
7937 | if ( type === "string" ) {
|
7938 |
|
7939 |
|
7940 | i = 0;
|
7941 | self = jQuery( this );
|
7942 | classNames = value.match( rnothtmlwhite ) || [];
|
7943 |
|
7944 | while ( ( className = classNames[ i++ ] ) ) {
|
7945 |
|
7946 |
|
7947 | if ( self.hasClass( className ) ) {
|
7948 | self.removeClass( className );
|
7949 | } else {
|
7950 | self.addClass( className );
|
7951 | }
|
7952 | }
|
7953 |
|
7954 |
|
7955 | } else if ( value === undefined || type === "boolean" ) {
|
7956 | className = getClass( this );
|
7957 | if ( className ) {
|
7958 |
|
7959 |
|
7960 | dataPriv.set( this, "__className__", className );
|
7961 | }
|
7962 |
|
7963 |
|
7964 |
|
7965 |
|
7966 |
|
7967 | if ( this.setAttribute ) {
|
7968 | this.setAttribute( "class",
|
7969 | className || value === false ?
|
7970 | "" :
|
7971 | dataPriv.get( this, "__className__" ) || ""
|
7972 | );
|
7973 | }
|
7974 | }
|
7975 | } );
|
7976 | },
|
7977 |
|
7978 | hasClass: function( selector ) {
|
7979 | var className, elem,
|
7980 | i = 0;
|
7981 |
|
7982 | className = " " + selector + " ";
|
7983 | while ( ( elem = this[ i++ ] ) ) {
|
7984 | if ( elem.nodeType === 1 &&
|
7985 | ( " " + stripAndCollapse( getClass( elem ) ) + " " ).indexOf( className ) > -1 ) {
|
7986 | return true;
|
7987 | }
|
7988 | }
|
7989 |
|
7990 | return false;
|
7991 | }
|
7992 | } );
|
7993 |
|
7994 |
|
7995 |
|
7996 |
|
7997 | var rreturn = /\r/g;
|
7998 |
|
7999 | jQuery.fn.extend( {
|
8000 | val: function( value ) {
|
8001 | var hooks, ret, isFunction,
|
8002 | elem = this[ 0 ];
|
8003 |
|
8004 | if ( !arguments.length ) {
|
8005 | if ( elem ) {
|
8006 | hooks = jQuery.valHooks[ elem.type ] ||
|
8007 | jQuery.valHooks[ elem.nodeName.toLowerCase() ];
|
8008 |
|
8009 | if ( hooks &&
|
8010 | "get" in hooks &&
|
8011 | ( ret = hooks.get( elem, "value" ) ) !== undefined
|
8012 | ) {
|
8013 | return ret;
|
8014 | }
|
8015 |
|
8016 | ret = elem.value;
|
8017 |
|
8018 |
|
8019 | if ( typeof ret === "string" ) {
|
8020 | return ret.replace( rreturn, "" );
|
8021 | }
|
8022 |
|
8023 |
|
8024 | return ret == null ? "" : ret;
|
8025 | }
|
8026 |
|
8027 | return;
|
8028 | }
|
8029 |
|
8030 | isFunction = jQuery.isFunction( value );
|
8031 |
|
8032 | return this.each( function( i ) {
|
8033 | var val;
|
8034 |
|
8035 | if ( this.nodeType !== 1 ) {
|
8036 | return;
|
8037 | }
|
8038 |
|
8039 | if ( isFunction ) {
|
8040 | val = value.call( this, i, jQuery( this ).val() );
|
8041 | } else {
|
8042 | val = value;
|
8043 | }
|
8044 |
|
8045 |
|
8046 | if ( val == null ) {
|
8047 | val = "";
|
8048 |
|
8049 | } else if ( typeof val === "number" ) {
|
8050 | val += "";
|
8051 |
|
8052 | } else if ( Array.isArray( val ) ) {
|
8053 | val = jQuery.map( val, function( value ) {
|
8054 | return value == null ? "" : value + "";
|
8055 | } );
|
8056 | }
|
8057 |
|
8058 | hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];
|
8059 |
|
8060 |
|
8061 | if ( !hooks || !( "set" in hooks ) || hooks.set( this, val, "value" ) === undefined ) {
|
8062 | this.value = val;
|
8063 | }
|
8064 | } );
|
8065 | }
|
8066 | } );
|
8067 |
|
8068 | jQuery.extend( {
|
8069 | valHooks: {
|
8070 | option: {
|
8071 | get: function( elem ) {
|
8072 |
|
8073 | var val = jQuery.find.attr( elem, "value" );
|
8074 | return val != null ?
|
8075 | val :
|
8076 |
|
8077 |
|
8078 |
|
8079 |
|
8080 |
|
8081 | stripAndCollapse( jQuery.text( elem ) );
|
8082 | }
|
8083 | },
|
8084 | select: {
|
8085 | get: function( elem ) {
|
8086 | var value, option, i,
|
8087 | options = elem.options,
|
8088 | index = elem.selectedIndex,
|
8089 | one = elem.type === "select-one",
|
8090 | values = one ? null : [],
|
8091 | max = one ? index + 1 : options.length;
|
8092 |
|
8093 | if ( index < 0 ) {
|
8094 | i = max;
|
8095 |
|
8096 | } else {
|
8097 | i = one ? index : 0;
|
8098 | }
|
8099 |
|
8100 |
|
8101 | for ( ; i < max; i++ ) {
|
8102 | option = options[ i ];
|
8103 |
|
8104 |
|
8105 |
|
8106 | if ( ( option.selected || i === index ) &&
|
8107 |
|
8108 |
|
8109 | !option.disabled &&
|
8110 | ( !option.parentNode.disabled ||
|
8111 | !nodeName( option.parentNode, "optgroup" ) ) ) {
|
8112 |
|
8113 |
|
8114 | value = jQuery( option ).val();
|
8115 |
|
8116 |
|
8117 | if ( one ) {
|
8118 | return value;
|
8119 | }
|
8120 |
|
8121 |
|
8122 | values.push( value );
|
8123 | }
|
8124 | }
|
8125 |
|
8126 | return values;
|
8127 | },
|
8128 |
|
8129 | set: function( elem, value ) {
|
8130 | var optionSet, option,
|
8131 | options = elem.options,
|
8132 | values = jQuery.makeArray( value ),
|
8133 | i = options.length;
|
8134 |
|
8135 | while ( i-- ) {
|
8136 | option = options[ i ];
|
8137 |
|
8138 |
|
8139 |
|
8140 | if ( option.selected =
|
8141 | jQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1
|
8142 | ) {
|
8143 | optionSet = true;
|
8144 | }
|
8145 |
|
8146 |
|
8147 | }
|
8148 |
|
8149 |
|
8150 | if ( !optionSet ) {
|
8151 | elem.selectedIndex = -1;
|
8152 | }
|
8153 | return values;
|
8154 | }
|
8155 | }
|
8156 | }
|
8157 | } );
|
8158 |
|
8159 |
|
8160 | jQuery.each( [ "radio", "checkbox" ], function() {
|
8161 | jQuery.valHooks[ this ] = {
|
8162 | set: function( elem, value ) {
|
8163 | if ( Array.isArray( value ) ) {
|
8164 | return ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 );
|
8165 | }
|
8166 | }
|
8167 | };
|
8168 | if ( !support.checkOn ) {
|
8169 | jQuery.valHooks[ this ].get = function( elem ) {
|
8170 | return elem.getAttribute( "value" ) === null ? "on" : elem.value;
|
8171 | };
|
8172 | }
|
8173 | } );
|
8174 |
|
8175 |
|
8176 |
|
8177 |
|
8178 |
|
8179 |
|
8180 |
|
8181 | var rfocusMorph = /^(?:focusinfocus|focusoutblur)$/;
|
8182 |
|
8183 | jQuery.extend( jQuery.event, {
|
8184 |
|
8185 | trigger: function( event, data, elem, onlyHandlers ) {
|
8186 |
|
8187 | var i, cur, tmp, bubbleType, ontype, handle, special,
|
8188 | eventPath = [ elem || document ],
|
8189 | type = hasOwn.call( event, "type" ) ? event.type : event,
|
8190 | namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split( "." ) : [];
|
8191 |
|
8192 | cur = tmp = elem = elem || document;
|
8193 |
|
8194 |
|
8195 | if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
|
8196 | return;
|
8197 | }
|
8198 |
|
8199 |
|
8200 | if ( rfocusMorph.test( type + jQuery.event.triggered ) ) {
|
8201 | return;
|
8202 | }
|
8203 |
|
8204 | if ( type.indexOf( "." ) > -1 ) {
|
8205 |
|
8206 |
|
8207 | namespaces = type.split( "." );
|
8208 | type = namespaces.shift();
|
8209 | namespaces.sort();
|
8210 | }
|
8211 | ontype = type.indexOf( ":" ) < 0 && "on" + type;
|
8212 |
|
8213 |
|
8214 | event = event[ jQuery.expando ] ?
|
8215 | event :
|
8216 | new jQuery.Event( type, typeof event === "object" && event );
|
8217 |
|
8218 |
|
8219 | event.isTrigger = onlyHandlers ? 2 : 3;
|
8220 | event.namespace = namespaces.join( "." );
|
8221 | event.rnamespace = event.namespace ?
|
8222 | new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ) :
|
8223 | null;
|
8224 |
|
8225 |
|
8226 | event.result = undefined;
|
8227 | if ( !event.target ) {
|
8228 | event.target = elem;
|
8229 | }
|
8230 |
|
8231 |
|
8232 | data = data == null ?
|
8233 | [ event ] :
|
8234 | jQuery.makeArray( data, [ event ] );
|
8235 |
|
8236 |
|
8237 | special = jQuery.event.special[ type ] || {};
|
8238 | if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {
|
8239 | return;
|
8240 | }
|
8241 |
|
8242 |
|
8243 |
|
8244 | if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) {
|
8245 |
|
8246 | bubbleType = special.delegateType || type;
|
8247 | if ( !rfocusMorph.test( bubbleType + type ) ) {
|
8248 | cur = cur.parentNode;
|
8249 | }
|
8250 | for ( ; cur; cur = cur.parentNode ) {
|
8251 | eventPath.push( cur );
|
8252 | tmp = cur;
|
8253 | }
|
8254 |
|
8255 |
|
8256 | if ( tmp === ( elem.ownerDocument || document ) ) {
|
8257 | eventPath.push( tmp.defaultView || tmp.parentWindow || window );
|
8258 | }
|
8259 | }
|
8260 |
|
8261 |
|
8262 | i = 0;
|
8263 | while ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) {
|
8264 |
|
8265 | event.type = i > 1 ?
|
8266 | bubbleType :
|
8267 | special.bindType || type;
|
8268 |
|
8269 |
|
8270 | handle = ( dataPriv.get( cur, "events" ) || {} )[ event.type ] &&
|
8271 | dataPriv.get( cur, "handle" );
|
8272 | if ( handle ) {
|
8273 | handle.apply( cur, data );
|
8274 | }
|
8275 |
|
8276 |
|
8277 | handle = ontype && cur[ ontype ];
|
8278 | if ( handle && handle.apply && acceptData( cur ) ) {
|
8279 | event.result = handle.apply( cur, data );
|
8280 | if ( event.result === false ) {
|
8281 | event.preventDefault();
|
8282 | }
|
8283 | }
|
8284 | }
|
8285 | event.type = type;
|
8286 |
|
8287 |
|
8288 | if ( !onlyHandlers && !event.isDefaultPrevented() ) {
|
8289 |
|
8290 | if ( ( !special._default ||
|
8291 | special._default.apply( eventPath.pop(), data ) === false ) &&
|
8292 | acceptData( elem ) ) {
|
8293 |
|
8294 |
|
8295 |
|
8296 | if ( ontype && jQuery.isFunction( elem[ type ] ) && !jQuery.isWindow( elem ) ) {
|
8297 |
|
8298 |
|
8299 | tmp = elem[ ontype ];
|
8300 |
|
8301 | if ( tmp ) {
|
8302 | elem[ ontype ] = null;
|
8303 | }
|
8304 |
|
8305 |
|
8306 | jQuery.event.triggered = type;
|
8307 | elem[ type ]();
|
8308 | jQuery.event.triggered = undefined;
|
8309 |
|
8310 | if ( tmp ) {
|
8311 | elem[ ontype ] = tmp;
|
8312 | }
|
8313 | }
|
8314 | }
|
8315 | }
|
8316 |
|
8317 | return event.result;
|
8318 | },
|
8319 |
|
8320 |
|
8321 |
|
8322 | simulate: function( type, elem, event ) {
|
8323 | var e = jQuery.extend(
|
8324 | new jQuery.Event(),
|
8325 | event,
|
8326 | {
|
8327 | type: type,
|
8328 | isSimulated: true
|
8329 | }
|
8330 | );
|
8331 |
|
8332 | jQuery.event.trigger( e, null, elem );
|
8333 | }
|
8334 |
|
8335 | } );
|
8336 |
|
8337 | jQuery.fn.extend( {
|
8338 |
|
8339 | trigger: function( type, data ) {
|
8340 | return this.each( function() {
|
8341 | jQuery.event.trigger( type, data, this );
|
8342 | } );
|
8343 | },
|
8344 | triggerHandler: function( type, data ) {
|
8345 | var elem = this[ 0 ];
|
8346 | if ( elem ) {
|
8347 | return jQuery.event.trigger( type, data, elem, true );
|
8348 | }
|
8349 | }
|
8350 | } );
|
8351 |
|
8352 |
|
8353 | jQuery.each( ( "blur focus focusin focusout resize scroll click dblclick " +
|
8354 | "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
|
8355 | "change select submit keydown keypress keyup contextmenu" ).split( " " ),
|
8356 | function( i, name ) {
|
8357 |
|
8358 |
|
8359 | jQuery.fn[ name ] = function( data, fn ) {
|
8360 | return arguments.length > 0 ?
|
8361 | this.on( name, null, data, fn ) :
|
8362 | this.trigger( name );
|
8363 | };
|
8364 | } );
|
8365 |
|
8366 | jQuery.fn.extend( {
|
8367 | hover: function( fnOver, fnOut ) {
|
8368 | return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );
|
8369 | }
|
8370 | } );
|
8371 |
|
8372 |
|
8373 |
|
8374 |
|
8375 | support.focusin = "onfocusin" in window;
|
8376 |
|
8377 |
|
8378 |
|
8379 |
|
8380 |
|
8381 |
|
8382 |
|
8383 |
|
8384 |
|
8385 |
|
8386 | if ( !support.focusin ) {
|
8387 | jQuery.each( { focus: "focusin", blur: "focusout" }, function( orig, fix ) {
|
8388 |
|
8389 |
|
8390 | var handler = function( event ) {
|
8391 | jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ) );
|
8392 | };
|
8393 |
|
8394 | jQuery.event.special[ fix ] = {
|
8395 | setup: function() {
|
8396 | var doc = this.ownerDocument || this,
|
8397 | attaches = dataPriv.access( doc, fix );
|
8398 |
|
8399 | if ( !attaches ) {
|
8400 | doc.addEventListener( orig, handler, true );
|
8401 | }
|
8402 | dataPriv.access( doc, fix, ( attaches || 0 ) + 1 );
|
8403 | },
|
8404 | teardown: function() {
|
8405 | var doc = this.ownerDocument || this,
|
8406 | attaches = dataPriv.access( doc, fix ) - 1;
|
8407 |
|
8408 | if ( !attaches ) {
|
8409 | doc.removeEventListener( orig, handler, true );
|
8410 | dataPriv.remove( doc, fix );
|
8411 |
|
8412 | } else {
|
8413 | dataPriv.access( doc, fix, attaches );
|
8414 | }
|
8415 | }
|
8416 | };
|
8417 | } );
|
8418 | }
|
8419 | var location = window.location;
|
8420 |
|
8421 | var nonce = jQuery.now();
|
8422 |
|
8423 | var rquery = ( /\?/ );
|
8424 |
|
8425 |
|
8426 |
|
8427 |
|
8428 | jQuery.parseXML = function( data ) {
|
8429 | var xml;
|
8430 | if ( !data || typeof data !== "string" ) {
|
8431 | return null;
|
8432 | }
|
8433 |
|
8434 |
|
8435 |
|
8436 | try {
|
8437 | xml = ( new window.DOMParser() ).parseFromString( data, "text/xml" );
|
8438 | } catch ( e ) {
|
8439 | xml = undefined;
|
8440 | }
|
8441 |
|
8442 | if ( !xml || xml.getElementsByTagName( "parsererror" ).length ) {
|
8443 | jQuery.error( "Invalid XML: " + data );
|
8444 | }
|
8445 | return xml;
|
8446 | };
|
8447 |
|
8448 |
|
8449 | var
|
8450 | rbracket = /\[\]$/,
|
8451 | rCRLF = /\r?\n/g,
|
8452 | rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,
|
8453 | rsubmittable = /^(?:input|select|textarea|keygen)/i;
|
8454 |
|
8455 | function buildParams( prefix, obj, traditional, add ) {
|
8456 | var name;
|
8457 |
|
8458 | if ( Array.isArray( obj ) ) {
|
8459 |
|
8460 |
|
8461 | jQuery.each( obj, function( i, v ) {
|
8462 | if ( traditional || rbracket.test( prefix ) ) {
|
8463 |
|
8464 |
|
8465 | add( prefix, v );
|
8466 |
|
8467 | } else {
|
8468 |
|
8469 |
|
8470 | buildParams(
|
8471 | prefix + "[" + ( typeof v === "object" && v != null ? i : "" ) + "]",
|
8472 | v,
|
8473 | traditional,
|
8474 | add
|
8475 | );
|
8476 | }
|
8477 | } );
|
8478 |
|
8479 | } else if ( !traditional && jQuery.type( obj ) === "object" ) {
|
8480 |
|
8481 |
|
8482 | for ( name in obj ) {
|
8483 | buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add );
|
8484 | }
|
8485 |
|
8486 | } else {
|
8487 |
|
8488 |
|
8489 | add( prefix, obj );
|
8490 | }
|
8491 | }
|
8492 |
|
8493 |
|
8494 |
|
8495 | jQuery.param = function( a, traditional ) {
|
8496 | var prefix,
|
8497 | s = [],
|
8498 | add = function( key, valueOrFunction ) {
|
8499 |
|
8500 |
|
8501 | var value = jQuery.isFunction( valueOrFunction ) ?
|
8502 | valueOrFunction() :
|
8503 | valueOrFunction;
|
8504 |
|
8505 | s[ s.length ] = encodeURIComponent( key ) + "=" +
|
8506 | encodeURIComponent( value == null ? "" : value );
|
8507 | };
|
8508 |
|
8509 |
|
8510 | if ( Array.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {
|
8511 |
|
8512 |
|
8513 | jQuery.each( a, function() {
|
8514 | add( this.name, this.value );
|
8515 | } );
|
8516 |
|
8517 | } else {
|
8518 |
|
8519 |
|
8520 |
|
8521 | for ( prefix in a ) {
|
8522 | buildParams( prefix, a[ prefix ], traditional, add );
|
8523 | }
|
8524 | }
|
8525 |
|
8526 |
|
8527 | return s.join( "&" );
|
8528 | };
|
8529 |
|
8530 | jQuery.fn.extend( {
|
8531 | serialize: function() {
|
8532 | return jQuery.param( this.serializeArray() );
|
8533 | },
|
8534 | serializeArray: function() {
|
8535 | return this.map( function() {
|
8536 |
|
8537 |
|
8538 | var elements = jQuery.prop( this, "elements" );
|
8539 | return elements ? jQuery.makeArray( elements ) : this;
|
8540 | } )
|
8541 | .filter( function() {
|
8542 | var type = this.type;
|
8543 |
|
8544 |
|
8545 | return this.name && !jQuery( this ).is( ":disabled" ) &&
|
8546 | rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&
|
8547 | ( this.checked || !rcheckableType.test( type ) );
|
8548 | } )
|
8549 | .map( function( i, elem ) {
|
8550 | var val = jQuery( this ).val();
|
8551 |
|
8552 | if ( val == null ) {
|
8553 | return null;
|
8554 | }
|
8555 |
|
8556 | if ( Array.isArray( val ) ) {
|
8557 | return jQuery.map( val, function( val ) {
|
8558 | return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
|
8559 | } );
|
8560 | }
|
8561 |
|
8562 | return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
|
8563 | } ).get();
|
8564 | }
|
8565 | } );
|
8566 |
|
8567 |
|
8568 | var
|
8569 | r20 = /%20/g,
|
8570 | rhash = /#.*$/,
|
8571 | rantiCache = /([?&])_=[^&]*/,
|
8572 | rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg,
|
8573 |
|
8574 |
|
8575 | rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,
|
8576 | rnoContent = /^(?:GET|HEAD)$/,
|
8577 | rprotocol = /^\/\//,
|
8578 |
|
8579 | |
8580 |
|
8581 |
|
8582 |
|
8583 |
|
8584 |
|
8585 |
|
8586 |
|
8587 |
|
8588 | prefilters = {},
|
8589 |
|
8590 | |
8591 |
|
8592 |
|
8593 |
|
8594 |
|
8595 | transports = {},
|
8596 |
|
8597 |
|
8598 | allTypes = "*/".concat( "*" ),
|
8599 |
|
8600 |
|
8601 | originAnchor = document.createElement( "a" );
|
8602 | originAnchor.href = location.href;
|
8603 |
|
8604 |
|
8605 | function addToPrefiltersOrTransports( structure ) {
|
8606 |
|
8607 |
|
8608 | return function( dataTypeExpression, func ) {
|
8609 |
|
8610 | if ( typeof dataTypeExpression !== "string" ) {
|
8611 | func = dataTypeExpression;
|
8612 | dataTypeExpression = "*";
|
8613 | }
|
8614 |
|
8615 | var dataType,
|
8616 | i = 0,
|
8617 | dataTypes = dataTypeExpression.toLowerCase().match( rnothtmlwhite ) || [];
|
8618 |
|
8619 | if ( jQuery.isFunction( func ) ) {
|
8620 |
|
8621 |
|
8622 | while ( ( dataType = dataTypes[ i++ ] ) ) {
|
8623 |
|
8624 |
|
8625 | if ( dataType[ 0 ] === "+" ) {
|
8626 | dataType = dataType.slice( 1 ) || "*";
|
8627 | ( structure[ dataType ] = structure[ dataType ] || [] ).unshift( func );
|
8628 |
|
8629 |
|
8630 | } else {
|
8631 | ( structure[ dataType ] = structure[ dataType ] || [] ).push( func );
|
8632 | }
|
8633 | }
|
8634 | }
|
8635 | };
|
8636 | }
|
8637 |
|
8638 |
|
8639 | function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {
|
8640 |
|
8641 | var inspected = {},
|
8642 | seekingTransport = ( structure === transports );
|
8643 |
|
8644 | function inspect( dataType ) {
|
8645 | var selected;
|
8646 | inspected[ dataType ] = true;
|
8647 | jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {
|
8648 | var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );
|
8649 | if ( typeof dataTypeOrTransport === "string" &&
|
8650 | !seekingTransport && !inspected[ dataTypeOrTransport ] ) {
|
8651 |
|
8652 | options.dataTypes.unshift( dataTypeOrTransport );
|
8653 | inspect( dataTypeOrTransport );
|
8654 | return false;
|
8655 | } else if ( seekingTransport ) {
|
8656 | return !( selected = dataTypeOrTransport );
|
8657 | }
|
8658 | } );
|
8659 | return selected;
|
8660 | }
|
8661 |
|
8662 | return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" );
|
8663 | }
|
8664 |
|
8665 |
|
8666 |
|
8667 |
|
8668 | function ajaxExtend( target, src ) {
|
8669 | var key, deep,
|
8670 | flatOptions = jQuery.ajaxSettings.flatOptions || {};
|
8671 |
|
8672 | for ( key in src ) {
|
8673 | if ( src[ key ] !== undefined ) {
|
8674 | ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];
|
8675 | }
|
8676 | }
|
8677 | if ( deep ) {
|
8678 | jQuery.extend( true, target, deep );
|
8679 | }
|
8680 |
|
8681 | return target;
|
8682 | }
|
8683 |
|
8684 |
|
8685 |
|
8686 |
|
8687 |
|
8688 | function ajaxHandleResponses( s, jqXHR, responses ) {
|
8689 |
|
8690 | var ct, type, finalDataType, firstDataType,
|
8691 | contents = s.contents,
|
8692 | dataTypes = s.dataTypes;
|
8693 |
|
8694 |
|
8695 | while ( dataTypes[ 0 ] === "*" ) {
|
8696 | dataTypes.shift();
|
8697 | if ( ct === undefined ) {
|
8698 | ct = s.mimeType || jqXHR.getResponseHeader( "Content-Type" );
|
8699 | }
|
8700 | }
|
8701 |
|
8702 |
|
8703 | if ( ct ) {
|
8704 | for ( type in contents ) {
|
8705 | if ( contents[ type ] && contents[ type ].test( ct ) ) {
|
8706 | dataTypes.unshift( type );
|
8707 | break;
|
8708 | }
|
8709 | }
|
8710 | }
|
8711 |
|
8712 |
|
8713 | if ( dataTypes[ 0 ] in responses ) {
|
8714 | finalDataType = dataTypes[ 0 ];
|
8715 | } else {
|
8716 |
|
8717 |
|
8718 | for ( type in responses ) {
|
8719 | if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[ 0 ] ] ) {
|
8720 | finalDataType = type;
|
8721 | break;
|
8722 | }
|
8723 | if ( !firstDataType ) {
|
8724 | firstDataType = type;
|
8725 | }
|
8726 | }
|
8727 |
|
8728 |
|
8729 | finalDataType = finalDataType || firstDataType;
|
8730 | }
|
8731 |
|
8732 |
|
8733 |
|
8734 |
|
8735 | if ( finalDataType ) {
|
8736 | if ( finalDataType !== dataTypes[ 0 ] ) {
|
8737 | dataTypes.unshift( finalDataType );
|
8738 | }
|
8739 | return responses[ finalDataType ];
|
8740 | }
|
8741 | }
|
8742 |
|
8743 |
|
8744 |
|
8745 |
|
8746 | function ajaxConvert( s, response, jqXHR, isSuccess ) {
|
8747 | var conv2, current, conv, tmp, prev,
|
8748 | converters = {},
|
8749 |
|
8750 |
|
8751 | dataTypes = s.dataTypes.slice();
|
8752 |
|
8753 |
|
8754 | if ( dataTypes[ 1 ] ) {
|
8755 | for ( conv in s.converters ) {
|
8756 | converters[ conv.toLowerCase() ] = s.converters[ conv ];
|
8757 | }
|
8758 | }
|
8759 |
|
8760 | current = dataTypes.shift();
|
8761 |
|
8762 |
|
8763 | while ( current ) {
|
8764 |
|
8765 | if ( s.responseFields[ current ] ) {
|
8766 | jqXHR[ s.responseFields[ current ] ] = response;
|
8767 | }
|
8768 |
|
8769 |
|
8770 | if ( !prev && isSuccess && s.dataFilter ) {
|
8771 | response = s.dataFilter( response, s.dataType );
|
8772 | }
|
8773 |
|
8774 | prev = current;
|
8775 | current = dataTypes.shift();
|
8776 |
|
8777 | if ( current ) {
|
8778 |
|
8779 |
|
8780 | if ( current === "*" ) {
|
8781 |
|
8782 | current = prev;
|
8783 |
|
8784 |
|
8785 | } else if ( prev !== "*" && prev !== current ) {
|
8786 |
|
8787 |
|
8788 | conv = converters[ prev + " " + current ] || converters[ "* " + current ];
|
8789 |
|
8790 |
|
8791 | if ( !conv ) {
|
8792 | for ( conv2 in converters ) {
|
8793 |
|
8794 |
|
8795 | tmp = conv2.split( " " );
|
8796 | if ( tmp[ 1 ] === current ) {
|
8797 |
|
8798 |
|
8799 | conv = converters[ prev + " " + tmp[ 0 ] ] ||
|
8800 | converters[ "* " + tmp[ 0 ] ];
|
8801 | if ( conv ) {
|
8802 |
|
8803 |
|
8804 | if ( conv === true ) {
|
8805 | conv = converters[ conv2 ];
|
8806 |
|
8807 |
|
8808 | } else if ( converters[ conv2 ] !== true ) {
|
8809 | current = tmp[ 0 ];
|
8810 | dataTypes.unshift( tmp[ 1 ] );
|
8811 | }
|
8812 | break;
|
8813 | }
|
8814 | }
|
8815 | }
|
8816 | }
|
8817 |
|
8818 |
|
8819 | if ( conv !== true ) {
|
8820 |
|
8821 |
|
8822 | if ( conv && s.throws ) {
|
8823 | response = conv( response );
|
8824 | } else {
|
8825 | try {
|
8826 | response = conv( response );
|
8827 | } catch ( e ) {
|
8828 | return {
|
8829 | state: "parsererror",
|
8830 | error: conv ? e : "No conversion from " + prev + " to " + current
|
8831 | };
|
8832 | }
|
8833 | }
|
8834 | }
|
8835 | }
|
8836 | }
|
8837 | }
|
8838 |
|
8839 | return { state: "success", data: response };
|
8840 | }
|
8841 |
|
8842 | jQuery.extend( {
|
8843 |
|
8844 |
|
8845 | active: 0,
|
8846 |
|
8847 |
|
8848 | lastModified: {},
|
8849 | etag: {},
|
8850 |
|
8851 | ajaxSettings: {
|
8852 | url: location.href,
|
8853 | type: "GET",
|
8854 | isLocal: rlocalProtocol.test( location.protocol ),
|
8855 | global: true,
|
8856 | processData: true,
|
8857 | async: true,
|
8858 | contentType: "application/x-www-form-urlencoded; charset=UTF-8",
|
8859 |
|
8860 | |
8861 |
|
8862 |
|
8863 |
|
8864 |
|
8865 |
|
8866 |
|
8867 |
|
8868 |
|
8869 |
|
8870 |
|
8871 |
|
8872 | accepts: {
|
8873 | "*": allTypes,
|
8874 | text: "text/plain",
|
8875 | html: "text/html",
|
8876 | xml: "application/xml, text/xml",
|
8877 | json: "application/json, text/javascript"
|
8878 | },
|
8879 |
|
8880 | contents: {
|
8881 | xml: /\bxml\b/,
|
8882 | html: /\bhtml/,
|
8883 | json: /\bjson\b/
|
8884 | },
|
8885 |
|
8886 | responseFields: {
|
8887 | xml: "responseXML",
|
8888 | text: "responseText",
|
8889 | json: "responseJSON"
|
8890 | },
|
8891 |
|
8892 |
|
8893 |
|
8894 | converters: {
|
8895 |
|
8896 |
|
8897 | "* text": String,
|
8898 |
|
8899 |
|
8900 | "text html": true,
|
8901 |
|
8902 |
|
8903 | "text json": JSON.parse,
|
8904 |
|
8905 |
|
8906 | "text xml": jQuery.parseXML
|
8907 | },
|
8908 |
|
8909 |
|
8910 |
|
8911 |
|
8912 |
|
8913 | flatOptions: {
|
8914 | url: true,
|
8915 | context: true
|
8916 | }
|
8917 | },
|
8918 |
|
8919 |
|
8920 |
|
8921 |
|
8922 | ajaxSetup: function( target, settings ) {
|
8923 | return settings ?
|
8924 |
|
8925 |
|
8926 | ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) :
|
8927 |
|
8928 |
|
8929 | ajaxExtend( jQuery.ajaxSettings, target );
|
8930 | },
|
8931 |
|
8932 | ajaxPrefilter: addToPrefiltersOrTransports( prefilters ),
|
8933 | ajaxTransport: addToPrefiltersOrTransports( transports ),
|
8934 |
|
8935 |
|
8936 | ajax: function( url, options ) {
|
8937 |
|
8938 |
|
8939 | if ( typeof url === "object" ) {
|
8940 | options = url;
|
8941 | url = undefined;
|
8942 | }
|
8943 |
|
8944 |
|
8945 | options = options || {};
|
8946 |
|
8947 | var transport,
|
8948 |
|
8949 |
|
8950 | cacheURL,
|
8951 |
|
8952 |
|
8953 | responseHeadersString,
|
8954 | responseHeaders,
|
8955 |
|
8956 |
|
8957 | timeoutTimer,
|
8958 |
|
8959 |
|
8960 | urlAnchor,
|
8961 |
|
8962 |
|
8963 | completed,
|
8964 |
|
8965 |
|
8966 | fireGlobals,
|
8967 |
|
8968 |
|
8969 | i,
|
8970 |
|
8971 |
|
8972 | uncached,
|
8973 |
|
8974 |
|
8975 | s = jQuery.ajaxSetup( {}, options ),
|
8976 |
|
8977 |
|
8978 | callbackContext = s.context || s,
|
8979 |
|
8980 |
|
8981 | globalEventContext = s.context &&
|
8982 | ( callbackContext.nodeType || callbackContext.jquery ) ?
|
8983 | jQuery( callbackContext ) :
|
8984 | jQuery.event,
|
8985 |
|
8986 |
|
8987 | deferred = jQuery.Deferred(),
|
8988 | completeDeferred = jQuery.Callbacks( "once memory" ),
|
8989 |
|
8990 |
|
8991 | statusCode = s.statusCode || {},
|
8992 |
|
8993 |
|
8994 | requestHeaders = {},
|
8995 | requestHeadersNames = {},
|
8996 |
|
8997 |
|
8998 | strAbort = "canceled",
|
8999 |
|
9000 |
|
9001 | jqXHR = {
|
9002 | readyState: 0,
|
9003 |
|
9004 |
|
9005 | getResponseHeader: function( key ) {
|
9006 | var match;
|
9007 | if ( completed ) {
|
9008 | if ( !responseHeaders ) {
|
9009 | responseHeaders = {};
|
9010 | while ( ( match = rheaders.exec( responseHeadersString ) ) ) {
|
9011 | responseHeaders[ match[ 1 ].toLowerCase() ] = match[ 2 ];
|
9012 | }
|
9013 | }
|
9014 | match = responseHeaders[ key.toLowerCase() ];
|
9015 | }
|
9016 | return match == null ? null : match;
|
9017 | },
|
9018 |
|
9019 |
|
9020 | getAllResponseHeaders: function() {
|
9021 | return completed ? responseHeadersString : null;
|
9022 | },
|
9023 |
|
9024 |
|
9025 | setRequestHeader: function( name, value ) {
|
9026 | if ( completed == null ) {
|
9027 | name = requestHeadersNames[ name.toLowerCase() ] =
|
9028 | requestHeadersNames[ name.toLowerCase() ] || name;
|
9029 | requestHeaders[ name ] = value;
|
9030 | }
|
9031 | return this;
|
9032 | },
|
9033 |
|
9034 |
|
9035 | overrideMimeType: function( type ) {
|
9036 | if ( completed == null ) {
|
9037 | s.mimeType = type;
|
9038 | }
|
9039 | return this;
|
9040 | },
|
9041 |
|
9042 |
|
9043 | statusCode: function( map ) {
|
9044 | var code;
|
9045 | if ( map ) {
|
9046 | if ( completed ) {
|
9047 |
|
9048 |
|
9049 | jqXHR.always( map[ jqXHR.status ] );
|
9050 | } else {
|
9051 |
|
9052 |
|
9053 | for ( code in map ) {
|
9054 | statusCode[ code ] = [ statusCode[ code ], map[ code ] ];
|
9055 | }
|
9056 | }
|
9057 | }
|
9058 | return this;
|
9059 | },
|
9060 |
|
9061 |
|
9062 | abort: function( statusText ) {
|
9063 | var finalText = statusText || strAbort;
|
9064 | if ( transport ) {
|
9065 | transport.abort( finalText );
|
9066 | }
|
9067 | done( 0, finalText );
|
9068 | return this;
|
9069 | }
|
9070 | };
|
9071 |
|
9072 |
|
9073 | deferred.promise( jqXHR );
|
9074 |
|
9075 |
|
9076 |
|
9077 |
|
9078 | s.url = ( ( url || s.url || location.href ) + "" )
|
9079 | .replace( rprotocol, location.protocol + "//" );
|
9080 |
|
9081 |
|
9082 | s.type = options.method || options.type || s.method || s.type;
|
9083 |
|
9084 |
|
9085 | s.dataTypes = ( s.dataType || "*" ).toLowerCase().match( rnothtmlwhite ) || [ "" ];
|
9086 |
|
9087 |
|
9088 | if ( s.crossDomain == null ) {
|
9089 | urlAnchor = document.createElement( "a" );
|
9090 |
|
9091 |
|
9092 |
|
9093 |
|
9094 | try {
|
9095 | urlAnchor.href = s.url;
|
9096 |
|
9097 |
|
9098 |
|
9099 | urlAnchor.href = urlAnchor.href;
|
9100 | s.crossDomain = originAnchor.protocol + "//" + originAnchor.host !==
|
9101 | urlAnchor.protocol + "//" + urlAnchor.host;
|
9102 | } catch ( e ) {
|
9103 |
|
9104 |
|
9105 |
|
9106 | s.crossDomain = true;
|
9107 | }
|
9108 | }
|
9109 |
|
9110 |
|
9111 | if ( s.data && s.processData && typeof s.data !== "string" ) {
|
9112 | s.data = jQuery.param( s.data, s.traditional );
|
9113 | }
|
9114 |
|
9115 |
|
9116 | inspectPrefiltersOrTransports( prefilters, s, options, jqXHR );
|
9117 |
|
9118 |
|
9119 | if ( completed ) {
|
9120 | return jqXHR;
|
9121 | }
|
9122 |
|
9123 |
|
9124 |
|
9125 | fireGlobals = jQuery.event && s.global;
|
9126 |
|
9127 |
|
9128 | if ( fireGlobals && jQuery.active++ === 0 ) {
|
9129 | jQuery.event.trigger( "ajaxStart" );
|
9130 | }
|
9131 |
|
9132 |
|
9133 | s.type = s.type.toUpperCase();
|
9134 |
|
9135 |
|
9136 | s.hasContent = !rnoContent.test( s.type );
|
9137 |
|
9138 |
|
9139 |
|
9140 |
|
9141 | cacheURL = s.url.replace( rhash, "" );
|
9142 |
|
9143 |
|
9144 | if ( !s.hasContent ) {
|
9145 |
|
9146 |
|
9147 | uncached = s.url.slice( cacheURL.length );
|
9148 |
|
9149 |
|
9150 | if ( s.data ) {
|
9151 | cacheURL += ( rquery.test( cacheURL ) ? "&" : "?" ) + s.data;
|
9152 |
|
9153 |
|
9154 | delete s.data;
|
9155 | }
|
9156 |
|
9157 |
|
9158 | if ( s.cache === false ) {
|
9159 | cacheURL = cacheURL.replace( rantiCache, "$1" );
|
9160 | uncached = ( rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + ( nonce++ ) + uncached;
|
9161 | }
|
9162 |
|
9163 |
|
9164 | s.url = cacheURL + uncached;
|
9165 |
|
9166 |
|
9167 | } else if ( s.data && s.processData &&
|
9168 | ( s.contentType || "" ).indexOf( "application/x-www-form-urlencoded" ) === 0 ) {
|
9169 | s.data = s.data.replace( r20, "+" );
|
9170 | }
|
9171 |
|
9172 |
|
9173 | if ( s.ifModified ) {
|
9174 | if ( jQuery.lastModified[ cacheURL ] ) {
|
9175 | jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] );
|
9176 | }
|
9177 | if ( jQuery.etag[ cacheURL ] ) {
|
9178 | jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] );
|
9179 | }
|
9180 | }
|
9181 |
|
9182 |
|
9183 | if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {
|
9184 | jqXHR.setRequestHeader( "Content-Type", s.contentType );
|
9185 | }
|
9186 |
|
9187 |
|
9188 | jqXHR.setRequestHeader(
|
9189 | "Accept",
|
9190 | s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[ 0 ] ] ?
|
9191 | s.accepts[ s.dataTypes[ 0 ] ] +
|
9192 | ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) :
|
9193 | s.accepts[ "*" ]
|
9194 | );
|
9195 |
|
9196 |
|
9197 | for ( i in s.headers ) {
|
9198 | jqXHR.setRequestHeader( i, s.headers[ i ] );
|
9199 | }
|
9200 |
|
9201 |
|
9202 | if ( s.beforeSend &&
|
9203 | ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || completed ) ) {
|
9204 |
|
9205 |
|
9206 | return jqXHR.abort();
|
9207 | }
|
9208 |
|
9209 |
|
9210 | strAbort = "abort";
|
9211 |
|
9212 |
|
9213 | completeDeferred.add( s.complete );
|
9214 | jqXHR.done( s.success );
|
9215 | jqXHR.fail( s.error );
|
9216 |
|
9217 |
|
9218 | transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );
|
9219 |
|
9220 |
|
9221 | if ( !transport ) {
|
9222 | done( -1, "No Transport" );
|
9223 | } else {
|
9224 | jqXHR.readyState = 1;
|
9225 |
|
9226 |
|
9227 | if ( fireGlobals ) {
|
9228 | globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] );
|
9229 | }
|
9230 |
|
9231 |
|
9232 | if ( completed ) {
|
9233 | return jqXHR;
|
9234 | }
|
9235 |
|
9236 |
|
9237 | if ( s.async && s.timeout > 0 ) {
|
9238 | timeoutTimer = window.setTimeout( function() {
|
9239 | jqXHR.abort( "timeout" );
|
9240 | }, s.timeout );
|
9241 | }
|
9242 |
|
9243 | try {
|
9244 | completed = false;
|
9245 | transport.send( requestHeaders, done );
|
9246 | } catch ( e ) {
|
9247 |
|
9248 |
|
9249 | if ( completed ) {
|
9250 | throw e;
|
9251 | }
|
9252 |
|
9253 |
|
9254 | done( -1, e );
|
9255 | }
|
9256 | }
|
9257 |
|
9258 |
|
9259 | function done( status, nativeStatusText, responses, headers ) {
|
9260 | var isSuccess, success, error, response, modified,
|
9261 | statusText = nativeStatusText;
|
9262 |
|
9263 |
|
9264 | if ( completed ) {
|
9265 | return;
|
9266 | }
|
9267 |
|
9268 | completed = true;
|
9269 |
|
9270 |
|
9271 | if ( timeoutTimer ) {
|
9272 | window.clearTimeout( timeoutTimer );
|
9273 | }
|
9274 |
|
9275 |
|
9276 |
|
9277 | transport = undefined;
|
9278 |
|
9279 |
|
9280 | responseHeadersString = headers || "";
|
9281 |
|
9282 |
|
9283 | jqXHR.readyState = status > 0 ? 4 : 0;
|
9284 |
|
9285 |
|
9286 | isSuccess = status >= 200 && status < 300 || status === 304;
|
9287 |
|
9288 |
|
9289 | if ( responses ) {
|
9290 | response = ajaxHandleResponses( s, jqXHR, responses );
|
9291 | }
|
9292 |
|
9293 |
|
9294 | response = ajaxConvert( s, response, jqXHR, isSuccess );
|
9295 |
|
9296 |
|
9297 | if ( isSuccess ) {
|
9298 |
|
9299 |
|
9300 | if ( s.ifModified ) {
|
9301 | modified = jqXHR.getResponseHeader( "Last-Modified" );
|
9302 | if ( modified ) {
|
9303 | jQuery.lastModified[ cacheURL ] = modified;
|
9304 | }
|
9305 | modified = jqXHR.getResponseHeader( "etag" );
|
9306 | if ( modified ) {
|
9307 | jQuery.etag[ cacheURL ] = modified;
|
9308 | }
|
9309 | }
|
9310 |
|
9311 |
|
9312 | if ( status === 204 || s.type === "HEAD" ) {
|
9313 | statusText = "nocontent";
|
9314 |
|
9315 |
|
9316 | } else if ( status === 304 ) {
|
9317 | statusText = "notmodified";
|
9318 |
|
9319 |
|
9320 | } else {
|
9321 | statusText = response.state;
|
9322 | success = response.data;
|
9323 | error = response.error;
|
9324 | isSuccess = !error;
|
9325 | }
|
9326 | } else {
|
9327 |
|
9328 |
|
9329 | error = statusText;
|
9330 | if ( status || !statusText ) {
|
9331 | statusText = "error";
|
9332 | if ( status < 0 ) {
|
9333 | status = 0;
|
9334 | }
|
9335 | }
|
9336 | }
|
9337 |
|
9338 |
|
9339 | jqXHR.status = status;
|
9340 | jqXHR.statusText = ( nativeStatusText || statusText ) + "";
|
9341 |
|
9342 |
|
9343 | if ( isSuccess ) {
|
9344 | deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );
|
9345 | } else {
|
9346 | deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );
|
9347 | }
|
9348 |
|
9349 |
|
9350 | jqXHR.statusCode( statusCode );
|
9351 | statusCode = undefined;
|
9352 |
|
9353 | if ( fireGlobals ) {
|
9354 | globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError",
|
9355 | [ jqXHR, s, isSuccess ? success : error ] );
|
9356 | }
|
9357 |
|
9358 |
|
9359 | completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );
|
9360 |
|
9361 | if ( fireGlobals ) {
|
9362 | globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] );
|
9363 |
|
9364 |
|
9365 | if ( !( --jQuery.active ) ) {
|
9366 | jQuery.event.trigger( "ajaxStop" );
|
9367 | }
|
9368 | }
|
9369 | }
|
9370 |
|
9371 | return jqXHR;
|
9372 | },
|
9373 |
|
9374 | getJSON: function( url, data, callback ) {
|
9375 | return jQuery.get( url, data, callback, "json" );
|
9376 | },
|
9377 |
|
9378 | getScript: function( url, callback ) {
|
9379 | return jQuery.get( url, undefined, callback, "script" );
|
9380 | }
|
9381 | } );
|
9382 |
|
9383 | jQuery.each( [ "get", "post" ], function( i, method ) {
|
9384 | jQuery[ method ] = function( url, data, callback, type ) {
|
9385 |
|
9386 |
|
9387 | if ( jQuery.isFunction( data ) ) {
|
9388 | type = type || callback;
|
9389 | callback = data;
|
9390 | data = undefined;
|
9391 | }
|
9392 |
|
9393 |
|
9394 | return jQuery.ajax( jQuery.extend( {
|
9395 | url: url,
|
9396 | type: method,
|
9397 | dataType: type,
|
9398 | data: data,
|
9399 | success: callback
|
9400 | }, jQuery.isPlainObject( url ) && url ) );
|
9401 | };
|
9402 | } );
|
9403 |
|
9404 |
|
9405 | jQuery._evalUrl = function( url ) {
|
9406 | return jQuery.ajax( {
|
9407 | url: url,
|
9408 |
|
9409 |
|
9410 | type: "GET",
|
9411 | dataType: "script",
|
9412 | cache: true,
|
9413 | async: false,
|
9414 | global: false,
|
9415 | "throws": true
|
9416 | } );
|
9417 | };
|
9418 |
|
9419 |
|
9420 | jQuery.fn.extend( {
|
9421 | wrapAll: function( html ) {
|
9422 | var wrap;
|
9423 |
|
9424 | if ( this[ 0 ] ) {
|
9425 | if ( jQuery.isFunction( html ) ) {
|
9426 | html = html.call( this[ 0 ] );
|
9427 | }
|
9428 |
|
9429 |
|
9430 | wrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true );
|
9431 |
|
9432 | if ( this[ 0 ].parentNode ) {
|
9433 | wrap.insertBefore( this[ 0 ] );
|
9434 | }
|
9435 |
|
9436 | wrap.map( function() {
|
9437 | var elem = this;
|
9438 |
|
9439 | while ( elem.firstElementChild ) {
|
9440 | elem = elem.firstElementChild;
|
9441 | }
|
9442 |
|
9443 | return elem;
|
9444 | } ).append( this );
|
9445 | }
|
9446 |
|
9447 | return this;
|
9448 | },
|
9449 |
|
9450 | wrapInner: function( html ) {
|
9451 | if ( jQuery.isFunction( html ) ) {
|
9452 | return this.each( function( i ) {
|
9453 | jQuery( this ).wrapInner( html.call( this, i ) );
|
9454 | } );
|
9455 | }
|
9456 |
|
9457 | return this.each( function() {
|
9458 | var self = jQuery( this ),
|
9459 | contents = self.contents();
|
9460 |
|
9461 | if ( contents.length ) {
|
9462 | contents.wrapAll( html );
|
9463 |
|
9464 | } else {
|
9465 | self.append( html );
|
9466 | }
|
9467 | } );
|
9468 | },
|
9469 |
|
9470 | wrap: function( html ) {
|
9471 | var isFunction = jQuery.isFunction( html );
|
9472 |
|
9473 | return this.each( function( i ) {
|
9474 | jQuery( this ).wrapAll( isFunction ? html.call( this, i ) : html );
|
9475 | } );
|
9476 | },
|
9477 |
|
9478 | unwrap: function( selector ) {
|
9479 | this.parent( selector ).not( "body" ).each( function() {
|
9480 | jQuery( this ).replaceWith( this.childNodes );
|
9481 | } );
|
9482 | return this;
|
9483 | }
|
9484 | } );
|
9485 |
|
9486 |
|
9487 | jQuery.expr.pseudos.hidden = function( elem ) {
|
9488 | return !jQuery.expr.pseudos.visible( elem );
|
9489 | };
|
9490 | jQuery.expr.pseudos.visible = function( elem ) {
|
9491 | return !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length );
|
9492 | };
|
9493 |
|
9494 |
|
9495 |
|
9496 |
|
9497 | jQuery.ajaxSettings.xhr = function() {
|
9498 | try {
|
9499 | return new window.XMLHttpRequest();
|
9500 | } catch ( e ) {}
|
9501 | };
|
9502 |
|
9503 | var xhrSuccessStatus = {
|
9504 |
|
9505 |
|
9506 | 0: 200,
|
9507 |
|
9508 |
|
9509 |
|
9510 | 1223: 204
|
9511 | },
|
9512 | xhrSupported = jQuery.ajaxSettings.xhr();
|
9513 |
|
9514 | support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported );
|
9515 | support.ajax = xhrSupported = !!xhrSupported;
|
9516 |
|
9517 | jQuery.ajaxTransport( function( options ) {
|
9518 | var callback, errorCallback;
|
9519 |
|
9520 |
|
9521 | if ( support.cors || xhrSupported && !options.crossDomain ) {
|
9522 | return {
|
9523 | send: function( headers, complete ) {
|
9524 | var i,
|
9525 | xhr = options.xhr();
|
9526 |
|
9527 | xhr.open(
|
9528 | options.type,
|
9529 | options.url,
|
9530 | options.async,
|
9531 | options.username,
|
9532 | options.password
|
9533 | );
|
9534 |
|
9535 |
|
9536 | if ( options.xhrFields ) {
|
9537 | for ( i in options.xhrFields ) {
|
9538 | xhr[ i ] = options.xhrFields[ i ];
|
9539 | }
|
9540 | }
|
9541 |
|
9542 |
|
9543 | if ( options.mimeType && xhr.overrideMimeType ) {
|
9544 | xhr.overrideMimeType( options.mimeType );
|
9545 | }
|
9546 |
|
9547 |
|
9548 |
|
9549 |
|
9550 |
|
9551 |
|
9552 | if ( !options.crossDomain && !headers[ "X-Requested-With" ] ) {
|
9553 | headers[ "X-Requested-With" ] = "XMLHttpRequest";
|
9554 | }
|
9555 |
|
9556 |
|
9557 | for ( i in headers ) {
|
9558 | xhr.setRequestHeader( i, headers[ i ] );
|
9559 | }
|
9560 |
|
9561 |
|
9562 | callback = function( type ) {
|
9563 | return function() {
|
9564 | if ( callback ) {
|
9565 | callback = errorCallback = xhr.onload =
|
9566 | xhr.onerror = xhr.onabort = xhr.onreadystatechange = null;
|
9567 |
|
9568 | if ( type === "abort" ) {
|
9569 | xhr.abort();
|
9570 | } else if ( type === "error" ) {
|
9571 |
|
9572 |
|
9573 |
|
9574 |
|
9575 | if ( typeof xhr.status !== "number" ) {
|
9576 | complete( 0, "error" );
|
9577 | } else {
|
9578 | complete(
|
9579 |
|
9580 |
|
9581 | xhr.status,
|
9582 | xhr.statusText
|
9583 | );
|
9584 | }
|
9585 | } else {
|
9586 | complete(
|
9587 | xhrSuccessStatus[ xhr.status ] || xhr.status,
|
9588 | xhr.statusText,
|
9589 |
|
9590 |
|
9591 |
|
9592 |
|
9593 | ( xhr.responseType || "text" ) !== "text" ||
|
9594 | typeof xhr.responseText !== "string" ?
|
9595 | { binary: xhr.response } :
|
9596 | { text: xhr.responseText },
|
9597 | xhr.getAllResponseHeaders()
|
9598 | );
|
9599 | }
|
9600 | }
|
9601 | };
|
9602 | };
|
9603 |
|
9604 |
|
9605 | xhr.onload = callback();
|
9606 | errorCallback = xhr.onerror = callback( "error" );
|
9607 |
|
9608 |
|
9609 |
|
9610 |
|
9611 | if ( xhr.onabort !== undefined ) {
|
9612 | xhr.onabort = errorCallback;
|
9613 | } else {
|
9614 | xhr.onreadystatechange = function() {
|
9615 |
|
9616 |
|
9617 | if ( xhr.readyState === 4 ) {
|
9618 |
|
9619 |
|
9620 |
|
9621 |
|
9622 |
|
9623 | window.setTimeout( function() {
|
9624 | if ( callback ) {
|
9625 | errorCallback();
|
9626 | }
|
9627 | } );
|
9628 | }
|
9629 | };
|
9630 | }
|
9631 |
|
9632 |
|
9633 | callback = callback( "abort" );
|
9634 |
|
9635 | try {
|
9636 |
|
9637 |
|
9638 | xhr.send( options.hasContent && options.data || null );
|
9639 | } catch ( e ) {
|
9640 |
|
9641 |
|
9642 | if ( callback ) {
|
9643 | throw e;
|
9644 | }
|
9645 | }
|
9646 | },
|
9647 |
|
9648 | abort: function() {
|
9649 | if ( callback ) {
|
9650 | callback();
|
9651 | }
|
9652 | }
|
9653 | };
|
9654 | }
|
9655 | } );
|
9656 |
|
9657 |
|
9658 |
|
9659 |
|
9660 |
|
9661 | jQuery.ajaxPrefilter( function( s ) {
|
9662 | if ( s.crossDomain ) {
|
9663 | s.contents.script = false;
|
9664 | }
|
9665 | } );
|
9666 |
|
9667 |
|
9668 | jQuery.ajaxSetup( {
|
9669 | accepts: {
|
9670 | script: "text/javascript, application/javascript, " +
|
9671 | "application/ecmascript, application/x-ecmascript"
|
9672 | },
|
9673 | contents: {
|
9674 | script: /\b(?:java|ecma)script\b/
|
9675 | },
|
9676 | converters: {
|
9677 | "text script": function( text ) {
|
9678 | jQuery.globalEval( text );
|
9679 | return text;
|
9680 | }
|
9681 | }
|
9682 | } );
|
9683 |
|
9684 |
|
9685 | jQuery.ajaxPrefilter( "script", function( s ) {
|
9686 | if ( s.cache === undefined ) {
|
9687 | s.cache = false;
|
9688 | }
|
9689 | if ( s.crossDomain ) {
|
9690 | s.type = "GET";
|
9691 | }
|
9692 | } );
|
9693 |
|
9694 |
|
9695 | jQuery.ajaxTransport( "script", function( s ) {
|
9696 |
|
9697 |
|
9698 | if ( s.crossDomain ) {
|
9699 | var script, callback;
|
9700 | return {
|
9701 | send: function( _, complete ) {
|
9702 | script = jQuery( "<script>" ).prop( {
|
9703 | charset: s.scriptCharset,
|
9704 | src: s.url
|
9705 | } ).on(
|
9706 | "load error",
|
9707 | callback = function( evt ) {
|
9708 | script.remove();
|
9709 | callback = null;
|
9710 | if ( evt ) {
|
9711 | complete( evt.type === "error" ? 404 : 200, evt.type );
|
9712 | }
|
9713 | }
|
9714 | );
|
9715 |
|
9716 |
|
9717 | document.head.appendChild( script[ 0 ] );
|
9718 | },
|
9719 | abort: function() {
|
9720 | if ( callback ) {
|
9721 | callback();
|
9722 | }
|
9723 | }
|
9724 | };
|
9725 | }
|
9726 | } );
|
9727 |
|
9728 |
|
9729 |
|
9730 |
|
9731 | var oldCallbacks = [],
|
9732 | rjsonp = /(=)\?(?=&|$)|\?\?/;
|
9733 |
|
9734 |
|
9735 | jQuery.ajaxSetup( {
|
9736 | jsonp: "callback",
|
9737 | jsonpCallback: function() {
|
9738 | var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( nonce++ ) );
|
9739 | this[ callback ] = true;
|
9740 | return callback;
|
9741 | }
|
9742 | } );
|
9743 |
|
9744 |
|
9745 | jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) {
|
9746 |
|
9747 | var callbackName, overwritten, responseContainer,
|
9748 | jsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ?
|
9749 | "url" :
|
9750 | typeof s.data === "string" &&
|
9751 | ( s.contentType || "" )
|
9752 | .indexOf( "application/x-www-form-urlencoded" ) === 0 &&
|
9753 | rjsonp.test( s.data ) && "data"
|
9754 | );
|
9755 |
|
9756 |
|
9757 | if ( jsonProp || s.dataTypes[ 0 ] === "jsonp" ) {
|
9758 |
|
9759 |
|
9760 | callbackName = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ?
|
9761 | s.jsonpCallback() :
|
9762 | s.jsonpCallback;
|
9763 |
|
9764 |
|
9765 | if ( jsonProp ) {
|
9766 | s[ jsonProp ] = s[ jsonProp ].replace( rjsonp, "$1" + callbackName );
|
9767 | } else if ( s.jsonp !== false ) {
|
9768 | s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName;
|
9769 | }
|
9770 |
|
9771 |
|
9772 | s.converters[ "script json" ] = function() {
|
9773 | if ( !responseContainer ) {
|
9774 | jQuery.error( callbackName + " was not called" );
|
9775 | }
|
9776 | return responseContainer[ 0 ];
|
9777 | };
|
9778 |
|
9779 |
|
9780 | s.dataTypes[ 0 ] = "json";
|
9781 |
|
9782 |
|
9783 | overwritten = window[ callbackName ];
|
9784 | window[ callbackName ] = function() {
|
9785 | responseContainer = arguments;
|
9786 | };
|
9787 |
|
9788 |
|
9789 | jqXHR.always( function() {
|
9790 |
|
9791 |
|
9792 | if ( overwritten === undefined ) {
|
9793 | jQuery( window ).removeProp( callbackName );
|
9794 |
|
9795 |
|
9796 | } else {
|
9797 | window[ callbackName ] = overwritten;
|
9798 | }
|
9799 |
|
9800 |
|
9801 | if ( s[ callbackName ] ) {
|
9802 |
|
9803 |
|
9804 | s.jsonpCallback = originalSettings.jsonpCallback;
|
9805 |
|
9806 |
|
9807 | oldCallbacks.push( callbackName );
|
9808 | }
|
9809 |
|
9810 |
|
9811 | if ( responseContainer && jQuery.isFunction( overwritten ) ) {
|
9812 | overwritten( responseContainer[ 0 ] );
|
9813 | }
|
9814 |
|
9815 | responseContainer = overwritten = undefined;
|
9816 | } );
|
9817 |
|
9818 |
|
9819 | return "script";
|
9820 | }
|
9821 | } );
|
9822 |
|
9823 |
|
9824 |
|
9825 |
|
9826 |
|
9827 |
|
9828 |
|
9829 |
|
9830 |
|
9831 | support.createHTMLDocument = ( function() {
|
9832 | var body = document.implementation.createHTMLDocument( "" ).body;
|
9833 | body.innerHTML = "<form></form><form></form>";
|
9834 | return body.childNodes.length === 2;
|
9835 | } )();
|
9836 |
|
9837 |
|
9838 |
|
9839 |
|
9840 |
|
9841 |
|
9842 | jQuery.parseHTML = function( data, context, keepScripts ) {
|
9843 | if ( typeof data !== "string" ) {
|
9844 | return [];
|
9845 | }
|
9846 | if ( typeof context === "boolean" ) {
|
9847 | keepScripts = context;
|
9848 | context = false;
|
9849 | }
|
9850 |
|
9851 | var base, parsed, scripts;
|
9852 |
|
9853 | if ( !context ) {
|
9854 |
|
9855 |
|
9856 |
|
9857 | if ( support.createHTMLDocument ) {
|
9858 | context = document.implementation.createHTMLDocument( "" );
|
9859 |
|
9860 |
|
9861 |
|
9862 |
|
9863 | base = context.createElement( "base" );
|
9864 | base.href = document.location.href;
|
9865 | context.head.appendChild( base );
|
9866 | } else {
|
9867 | context = document;
|
9868 | }
|
9869 | }
|
9870 |
|
9871 | parsed = rsingleTag.exec( data );
|
9872 | scripts = !keepScripts && [];
|
9873 |
|
9874 |
|
9875 | if ( parsed ) {
|
9876 | return [ context.createElement( parsed[ 1 ] ) ];
|
9877 | }
|
9878 |
|
9879 | parsed = buildFragment( [ data ], context, scripts );
|
9880 |
|
9881 | if ( scripts && scripts.length ) {
|
9882 | jQuery( scripts ).remove();
|
9883 | }
|
9884 |
|
9885 | return jQuery.merge( [], parsed.childNodes );
|
9886 | };
|
9887 |
|
9888 |
|
9889 |
|
9890 |
|
9891 |
|
9892 | jQuery.fn.load = function( url, params, callback ) {
|
9893 | var selector, type, response,
|
9894 | self = this,
|
9895 | off = url.indexOf( " " );
|
9896 |
|
9897 | if ( off > -1 ) {
|
9898 | selector = stripAndCollapse( url.slice( off ) );
|
9899 | url = url.slice( 0, off );
|
9900 | }
|
9901 |
|
9902 |
|
9903 | if ( jQuery.isFunction( params ) ) {
|
9904 |
|
9905 |
|
9906 | callback = params;
|
9907 | params = undefined;
|
9908 |
|
9909 |
|
9910 | } else if ( params && typeof params === "object" ) {
|
9911 | type = "POST";
|
9912 | }
|
9913 |
|
9914 |
|
9915 | if ( self.length > 0 ) {
|
9916 | jQuery.ajax( {
|
9917 | url: url,
|
9918 |
|
9919 |
|
9920 |
|
9921 |
|
9922 | type: type || "GET",
|
9923 | dataType: "html",
|
9924 | data: params
|
9925 | } ).done( function( responseText ) {
|
9926 |
|
9927 |
|
9928 | response = arguments;
|
9929 |
|
9930 | self.html( selector ?
|
9931 |
|
9932 |
|
9933 |
|
9934 | jQuery( "<div>" ).append( jQuery.parseHTML( responseText ) ).find( selector ) :
|
9935 |
|
9936 |
|
9937 | responseText );
|
9938 |
|
9939 |
|
9940 |
|
9941 |
|
9942 | } ).always( callback && function( jqXHR, status ) {
|
9943 | self.each( function() {
|
9944 | callback.apply( this, response || [ jqXHR.responseText, status, jqXHR ] );
|
9945 | } );
|
9946 | } );
|
9947 | }
|
9948 |
|
9949 | return this;
|
9950 | };
|
9951 |
|
9952 |
|
9953 |
|
9954 |
|
9955 |
|
9956 | jQuery.each( [
|
9957 | "ajaxStart",
|
9958 | "ajaxStop",
|
9959 | "ajaxComplete",
|
9960 | "ajaxError",
|
9961 | "ajaxSuccess",
|
9962 | "ajaxSend"
|
9963 | ], function( i, type ) {
|
9964 | jQuery.fn[ type ] = function( fn ) {
|
9965 | return this.on( type, fn );
|
9966 | };
|
9967 | } );
|
9968 |
|
9969 |
|
9970 |
|
9971 |
|
9972 | jQuery.expr.pseudos.animated = function( elem ) {
|
9973 | return jQuery.grep( jQuery.timers, function( fn ) {
|
9974 | return elem === fn.elem;
|
9975 | } ).length;
|
9976 | };
|
9977 |
|
9978 |
|
9979 |
|
9980 |
|
9981 | jQuery.offset = {
|
9982 | setOffset: function( elem, options, i ) {
|
9983 | var curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition,
|
9984 | position = jQuery.css( elem, "position" ),
|
9985 | curElem = jQuery( elem ),
|
9986 | props = {};
|
9987 |
|
9988 |
|
9989 | if ( position === "static" ) {
|
9990 | elem.style.position = "relative";
|
9991 | }
|
9992 |
|
9993 | curOffset = curElem.offset();
|
9994 | curCSSTop = jQuery.css( elem, "top" );
|
9995 | curCSSLeft = jQuery.css( elem, "left" );
|
9996 | calculatePosition = ( position === "absolute" || position === "fixed" ) &&
|
9997 | ( curCSSTop + curCSSLeft ).indexOf( "auto" ) > -1;
|
9998 |
|
9999 |
|
10000 |
|
10001 | if ( calculatePosition ) {
|
10002 | curPosition = curElem.position();
|
10003 | curTop = curPosition.top;
|
10004 | curLeft = curPosition.left;
|
10005 |
|
10006 | } else {
|
10007 | curTop = parseFloat( curCSSTop ) || 0;
|
10008 | curLeft = parseFloat( curCSSLeft ) || 0;
|
10009 | }
|
10010 |
|
10011 | if ( jQuery.isFunction( options ) ) {
|
10012 |
|
10013 |
|
10014 | options = options.call( elem, i, jQuery.extend( {}, curOffset ) );
|
10015 | }
|
10016 |
|
10017 | if ( options.top != null ) {
|
10018 | props.top = ( options.top - curOffset.top ) + curTop;
|
10019 | }
|
10020 | if ( options.left != null ) {
|
10021 | props.left = ( options.left - curOffset.left ) + curLeft;
|
10022 | }
|
10023 |
|
10024 | if ( "using" in options ) {
|
10025 | options.using.call( elem, props );
|
10026 |
|
10027 | } else {
|
10028 | curElem.css( props );
|
10029 | }
|
10030 | }
|
10031 | };
|
10032 |
|
10033 | jQuery.fn.extend( {
|
10034 | offset: function( options ) {
|
10035 |
|
10036 |
|
10037 | if ( arguments.length ) {
|
10038 | return options === undefined ?
|
10039 | this :
|
10040 | this.each( function( i ) {
|
10041 | jQuery.offset.setOffset( this, options, i );
|
10042 | } );
|
10043 | }
|
10044 |
|
10045 | var doc, docElem, rect, win,
|
10046 | elem = this[ 0 ];
|
10047 |
|
10048 | if ( !elem ) {
|
10049 | return;
|
10050 | }
|
10051 |
|
10052 |
|
10053 |
|
10054 |
|
10055 |
|
10056 | if ( !elem.getClientRects().length ) {
|
10057 | return { top: 0, left: 0 };
|
10058 | }
|
10059 |
|
10060 | rect = elem.getBoundingClientRect();
|
10061 |
|
10062 | doc = elem.ownerDocument;
|
10063 | docElem = doc.documentElement;
|
10064 | win = doc.defaultView;
|
10065 |
|
10066 | return {
|
10067 | top: rect.top + win.pageYOffset - docElem.clientTop,
|
10068 | left: rect.left + win.pageXOffset - docElem.clientLeft
|
10069 | };
|
10070 | },
|
10071 |
|
10072 | position: function() {
|
10073 | if ( !this[ 0 ] ) {
|
10074 | return;
|
10075 | }
|
10076 |
|
10077 | var offsetParent, offset,
|
10078 | elem = this[ 0 ],
|
10079 | parentOffset = { top: 0, left: 0 };
|
10080 |
|
10081 |
|
10082 |
|
10083 | if ( jQuery.css( elem, "position" ) === "fixed" ) {
|
10084 |
|
10085 |
|
10086 | offset = elem.getBoundingClientRect();
|
10087 |
|
10088 | } else {
|
10089 |
|
10090 |
|
10091 | offsetParent = this.offsetParent();
|
10092 |
|
10093 |
|
10094 | offset = this.offset();
|
10095 | if ( !nodeName( offsetParent[ 0 ], "html" ) ) {
|
10096 | parentOffset = offsetParent.offset();
|
10097 | }
|
10098 |
|
10099 |
|
10100 | parentOffset = {
|
10101 | top: parentOffset.top + jQuery.css( offsetParent[ 0 ], "borderTopWidth", true ),
|
10102 | left: parentOffset.left + jQuery.css( offsetParent[ 0 ], "borderLeftWidth", true )
|
10103 | };
|
10104 | }
|
10105 |
|
10106 |
|
10107 | return {
|
10108 | top: offset.top - parentOffset.top - jQuery.css( elem, "marginTop", true ),
|
10109 | left: offset.left - parentOffset.left - jQuery.css( elem, "marginLeft", true )
|
10110 | };
|
10111 | },
|
10112 |
|
10113 |
|
10114 |
|
10115 |
|
10116 |
|
10117 |
|
10118 |
|
10119 |
|
10120 |
|
10121 |
|
10122 |
|
10123 | offsetParent: function() {
|
10124 | return this.map( function() {
|
10125 | var offsetParent = this.offsetParent;
|
10126 |
|
10127 | while ( offsetParent && jQuery.css( offsetParent, "position" ) === "static" ) {
|
10128 | offsetParent = offsetParent.offsetParent;
|
10129 | }
|
10130 |
|
10131 | return offsetParent || documentElement;
|
10132 | } );
|
10133 | }
|
10134 | } );
|
10135 |
|
10136 |
|
10137 | jQuery.each( { scrollLeft: "pageXOffset", scrollTop: "pageYOffset" }, function( method, prop ) {
|
10138 | var top = "pageYOffset" === prop;
|
10139 |
|
10140 | jQuery.fn[ method ] = function( val ) {
|
10141 | return access( this, function( elem, method, val ) {
|
10142 |
|
10143 |
|
10144 | var win;
|
10145 | if ( jQuery.isWindow( elem ) ) {
|
10146 | win = elem;
|
10147 | } else if ( elem.nodeType === 9 ) {
|
10148 | win = elem.defaultView;
|
10149 | }
|
10150 |
|
10151 | if ( val === undefined ) {
|
10152 | return win ? win[ prop ] : elem[ method ];
|
10153 | }
|
10154 |
|
10155 | if ( win ) {
|
10156 | win.scrollTo(
|
10157 | !top ? val : win.pageXOffset,
|
10158 | top ? val : win.pageYOffset
|
10159 | );
|
10160 |
|
10161 | } else {
|
10162 | elem[ method ] = val;
|
10163 | }
|
10164 | }, method, val, arguments.length );
|
10165 | };
|
10166 | } );
|
10167 |
|
10168 |
|
10169 |
|
10170 |
|
10171 |
|
10172 |
|
10173 |
|
10174 | jQuery.each( [ "top", "left" ], function( i, prop ) {
|
10175 | jQuery.cssHooks[ prop ] = addGetHookIf( support.pixelPosition,
|
10176 | function( elem, computed ) {
|
10177 | if ( computed ) {
|
10178 | computed = curCSS( elem, prop );
|
10179 |
|
10180 |
|
10181 | return rnumnonpx.test( computed ) ?
|
10182 | jQuery( elem ).position()[ prop ] + "px" :
|
10183 | computed;
|
10184 | }
|
10185 | }
|
10186 | );
|
10187 | } );
|
10188 |
|
10189 |
|
10190 |
|
10191 | jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {
|
10192 | jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name },
|
10193 | function( defaultExtra, funcName ) {
|
10194 |
|
10195 |
|
10196 | jQuery.fn[ funcName ] = function( margin, value ) {
|
10197 | var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ),
|
10198 | extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" );
|
10199 |
|
10200 | return access( this, function( elem, type, value ) {
|
10201 | var doc;
|
10202 |
|
10203 | if ( jQuery.isWindow( elem ) ) {
|
10204 |
|
10205 |
|
10206 | return funcName.indexOf( "outer" ) === 0 ?
|
10207 | elem[ "inner" + name ] :
|
10208 | elem.document.documentElement[ "client" + name ];
|
10209 | }
|
10210 |
|
10211 |
|
10212 | if ( elem.nodeType === 9 ) {
|
10213 | doc = elem.documentElement;
|
10214 |
|
10215 |
|
10216 |
|
10217 | return Math.max(
|
10218 | elem.body[ "scroll" + name ], doc[ "scroll" + name ],
|
10219 | elem.body[ "offset" + name ], doc[ "offset" + name ],
|
10220 | doc[ "client" + name ]
|
10221 | );
|
10222 | }
|
10223 |
|
10224 | return value === undefined ?
|
10225 |
|
10226 |
|
10227 | jQuery.css( elem, type, extra ) :
|
10228 |
|
10229 |
|
10230 | jQuery.style( elem, type, value, extra );
|
10231 | }, type, chainable ? margin : undefined, chainable );
|
10232 | };
|
10233 | } );
|
10234 | } );
|
10235 |
|
10236 |
|
10237 | jQuery.fn.extend( {
|
10238 |
|
10239 | bind: function( types, data, fn ) {
|
10240 | return this.on( types, null, data, fn );
|
10241 | },
|
10242 | unbind: function( types, fn ) {
|
10243 | return this.off( types, null, fn );
|
10244 | },
|
10245 |
|
10246 | delegate: function( selector, types, data, fn ) {
|
10247 | return this.on( types, selector, data, fn );
|
10248 | },
|
10249 | undelegate: function( selector, types, fn ) {
|
10250 |
|
10251 |
|
10252 | return arguments.length === 1 ?
|
10253 | this.off( selector, "**" ) :
|
10254 | this.off( types, selector || "**", fn );
|
10255 | }
|
10256 | } );
|
10257 |
|
10258 | jQuery.holdReady = function( hold ) {
|
10259 | if ( hold ) {
|
10260 | jQuery.readyWait++;
|
10261 | } else {
|
10262 | jQuery.ready( true );
|
10263 | }
|
10264 | };
|
10265 | jQuery.isArray = Array.isArray;
|
10266 | jQuery.parseJSON = JSON.parse;
|
10267 | jQuery.nodeName = nodeName;
|
10268 |
|
10269 |
|
10270 |
|
10271 |
|
10272 |
|
10273 |
|
10274 |
|
10275 |
|
10276 |
|
10277 |
|
10278 |
|
10279 |
|
10280 |
|
10281 |
|
10282 |
|
10283 |
|
10284 |
|
10285 | if ( true ) {
|
10286 | !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = function() {
|
10287 | return jQuery;
|
10288 | }.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
|
10289 | __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
|
10290 | }
|
10291 |
|
10292 |
|
10293 |
|
10294 |
|
10295 | var
|
10296 |
|
10297 |
|
10298 | _jQuery = window.jQuery,
|
10299 |
|
10300 |
|
10301 | _$ = window.$;
|
10302 |
|
10303 | jQuery.noConflict = function( deep ) {
|
10304 | if ( window.$ === jQuery ) {
|
10305 | window.$ = _$;
|
10306 | }
|
10307 |
|
10308 | if ( deep && window.jQuery === jQuery ) {
|
10309 | window.jQuery = _jQuery;
|
10310 | }
|
10311 |
|
10312 | return jQuery;
|
10313 | };
|
10314 |
|
10315 |
|
10316 |
|
10317 |
|
10318 | if ( !noGlobal ) {
|
10319 | window.jQuery = window.$ = jQuery;
|
10320 | }
|
10321 |
|
10322 |
|
10323 |
|
10324 |
|
10325 | return jQuery;
|
10326 | } );
|
10327 |
|
10328 |
|
10329 | }),
|
10330 |
|
10331 | (function(module, __webpack_exports__, __webpack_require__) {
|
10332 |
|
10333 | "use strict";
|
10334 | Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
|
10335 | var __WEBPACK_IMPORTED_MODULE_0_jquery__ = __webpack_require__(0);
|
10336 | var __WEBPACK_IMPORTED_MODULE_0_jquery___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_jquery__);
|
10337 |
|
10338 |
|
10339 |
|
10340 |
|
10341 | })
|
10342 | ]); |
\ | No newline at end of file |