jquery-source 1.8.1 → 1.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Rakefile +2 -1
- data/lib/jquery-source/version.rb +1 -1
- data/vendor/assets/javascripts/jquery.js +1715 -1576
- metadata +1 -1
data/Rakefile
CHANGED
@@ -31,7 +31,8 @@ end
|
|
31
31
|
|
32
32
|
task :make_all_versions do
|
33
33
|
# versions = "1.2.6, 1.3.0, 1.3.1, 1.3.2, 1.4.0, 1.4.1, 1.4.2, 1.4.3, 1.4.4, 1.5.0, 1.5.1, 1.5.2, 1.6.0, 1.6.1, 1.6.2, 1.6.3, 1.6.4, 1.7.0, 1.7.1".split(", ")
|
34
|
-
|
34
|
+
# , 1.8.1, 1.8.0, 1.7.2
|
35
|
+
versions = "2.0.0, 1.9.1, 1.9.0, 1.8.3, 1.8.2".split(", ").reverse()
|
35
36
|
|
36
37
|
versions.each do |version|
|
37
38
|
make_version(version)
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* jQuery JavaScript Library v1.8.
|
2
|
+
* jQuery JavaScript Library v1.8.2
|
3
3
|
* http://jquery.com/
|
4
4
|
*
|
5
5
|
* Includes Sizzle.js
|
@@ -9,7 +9,7 @@
|
|
9
9
|
* Released under the MIT license
|
10
10
|
* http://jquery.org/license
|
11
11
|
*
|
12
|
-
* Date: Thu
|
12
|
+
* Date: Thu Sep 20 2012 21:13:05 GMT-0400 (Eastern Daylight Time)
|
13
13
|
*/
|
14
14
|
(function( window, undefined ) {
|
15
15
|
var
|
@@ -186,7 +186,7 @@ jQuery.fn = jQuery.prototype = {
|
|
186
186
|
selector: "",
|
187
187
|
|
188
188
|
// The current version of jQuery being used
|
189
|
-
jquery: "1.8.
|
189
|
+
jquery: "1.8.2",
|
190
190
|
|
191
191
|
// The default length of a jQuery object is 0
|
192
192
|
length: 0,
|
@@ -573,7 +573,7 @@ jQuery.extend({
|
|
573
573
|
},
|
574
574
|
|
575
575
|
nodeName: function( elem, name ) {
|
576
|
-
return elem.nodeName && elem.nodeName.
|
576
|
+
return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
|
577
577
|
},
|
578
578
|
|
579
579
|
// args is for internal usage only
|
@@ -630,7 +630,7 @@ jQuery.extend({
|
|
630
630
|
function( text ) {
|
631
631
|
return text == null ?
|
632
632
|
"" :
|
633
|
-
text
|
633
|
+
( text + "" ).replace( rtrim, "" );
|
634
634
|
},
|
635
635
|
|
636
636
|
// results is for internal usage only
|
@@ -776,7 +776,7 @@ jQuery.extend({
|
|
776
776
|
};
|
777
777
|
|
778
778
|
// Set the guid of unique handler to the same of original handler, so it can be removed
|
779
|
-
proxy.guid = fn.guid = fn.guid ||
|
779
|
+
proxy.guid = fn.guid = fn.guid || jQuery.guid++;
|
780
780
|
|
781
781
|
return proxy;
|
782
782
|
},
|
@@ -1143,7 +1143,7 @@ jQuery.extend({
|
|
1143
1143
|
// Get a promise for this deferred
|
1144
1144
|
// If obj is provided, the promise aspect is added to the object
|
1145
1145
|
promise: function( obj ) {
|
1146
|
-
return
|
1146
|
+
return obj != null ? jQuery.extend( obj, promise ) : promise;
|
1147
1147
|
}
|
1148
1148
|
},
|
1149
1149
|
deferred = {};
|
@@ -1262,7 +1262,7 @@ jQuery.support = (function() {
|
|
1262
1262
|
a.style.cssText = "top:1px;float:left;opacity:.5";
|
1263
1263
|
|
1264
1264
|
// Can't get basic test support
|
1265
|
-
if ( !all || !all.length
|
1265
|
+
if ( !all || !all.length ) {
|
1266
1266
|
return {};
|
1267
1267
|
}
|
1268
1268
|
|
@@ -1513,7 +1513,7 @@ jQuery.extend({
|
|
1513
1513
|
|
1514
1514
|
deletedIds: [],
|
1515
1515
|
|
1516
|
-
//
|
1516
|
+
// Remove at next major release (1.9/2.0)
|
1517
1517
|
uuid: 0,
|
1518
1518
|
|
1519
1519
|
// Unique for each copy of jQuery on the page
|
@@ -1565,7 +1565,7 @@ jQuery.extend({
|
|
1565
1565
|
// Only DOM nodes need a new unique ID for each element since their data
|
1566
1566
|
// ends up in the global cache
|
1567
1567
|
if ( isNode ) {
|
1568
|
-
elem[ internalKey ] = id = jQuery.deletedIds.pop() ||
|
1568
|
+
elem[ internalKey ] = id = jQuery.deletedIds.pop() || jQuery.guid++;
|
1569
1569
|
} else {
|
1570
1570
|
id = internalKey;
|
1571
1571
|
}
|
@@ -1739,7 +1739,7 @@ jQuery.fn.extend({
|
|
1739
1739
|
for ( l = attr.length; i < l; i++ ) {
|
1740
1740
|
name = attr[i].name;
|
1741
1741
|
|
1742
|
-
if ( name.indexOf( "data-" )
|
1742
|
+
if ( !name.indexOf( "data-" ) ) {
|
1743
1743
|
name = jQuery.camelCase( name.substring(5) );
|
1744
1744
|
|
1745
1745
|
dataAttr( elem, name, data[ name ] );
|
@@ -2049,7 +2049,7 @@ jQuery.fn.extend({
|
|
2049
2049
|
setClass = " " + elem.className + " ";
|
2050
2050
|
|
2051
2051
|
for ( c = 0, cl = classNames.length; c < cl; c++ ) {
|
2052
|
-
if (
|
2052
|
+
if ( setClass.indexOf( " " + classNames[ c ] + " " ) < 0 ) {
|
2053
2053
|
setClass += classNames[ c ] + " ";
|
2054
2054
|
}
|
2055
2055
|
}
|
@@ -2082,7 +2082,7 @@ jQuery.fn.extend({
|
|
2082
2082
|
// loop over each item in the removal list
|
2083
2083
|
for ( c = 0, cl = removes.length; c < cl; c++ ) {
|
2084
2084
|
// Remove until there is nothing to remove,
|
2085
|
-
while ( className.indexOf(" " + removes[ c ] + " ")
|
2085
|
+
while ( className.indexOf(" " + removes[ c ] + " ") >= 0 ) {
|
2086
2086
|
className = className.replace( " " + removes[ c ] + " " , " " );
|
2087
2087
|
}
|
2088
2088
|
}
|
@@ -2136,7 +2136,7 @@ jQuery.fn.extend({
|
|
2136
2136
|
i = 0,
|
2137
2137
|
l = this.length;
|
2138
2138
|
for ( ; i < l; i++ ) {
|
2139
|
-
if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className )
|
2139
|
+
if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) >= 0 ) {
|
2140
2140
|
return true;
|
2141
2141
|
}
|
2142
2142
|
}
|
@@ -2314,7 +2314,7 @@ jQuery.extend({
|
|
2314
2314
|
return ret;
|
2315
2315
|
|
2316
2316
|
} else {
|
2317
|
-
elem.setAttribute( name,
|
2317
|
+
elem.setAttribute( name, value + "" );
|
2318
2318
|
return value;
|
2319
2319
|
}
|
2320
2320
|
|
@@ -2578,7 +2578,7 @@ if ( !jQuery.support.style ) {
|
|
2578
2578
|
return elem.style.cssText.toLowerCase() || undefined;
|
2579
2579
|
},
|
2580
2580
|
set: function( elem, value ) {
|
2581
|
-
return ( elem.style.cssText =
|
2581
|
+
return ( elem.style.cssText = value + "" );
|
2582
2582
|
}
|
2583
2583
|
};
|
2584
2584
|
}
|
@@ -2711,6 +2711,7 @@ jQuery.event = {
|
|
2711
2711
|
handler: handler,
|
2712
2712
|
guid: handler.guid,
|
2713
2713
|
selector: selector,
|
2714
|
+
needsContext: selector && jQuery.expr.match.needsContext.test( selector ),
|
2714
2715
|
namespace: namespaces.join(".")
|
2715
2716
|
}, handleObjIn );
|
2716
2717
|
|
@@ -2946,7 +2947,7 @@ jQuery.event = {
|
|
2946
2947
|
}
|
2947
2948
|
// Note that this is a bare JS function and not a jQuery handler
|
2948
2949
|
handle = ontype && cur[ ontype ];
|
2949
|
-
if ( handle && jQuery.acceptData( cur ) && handle.apply( cur, data ) === false ) {
|
2950
|
+
if ( handle && jQuery.acceptData( cur ) && handle.apply && handle.apply( cur, data ) === false ) {
|
2950
2951
|
event.preventDefault();
|
2951
2952
|
}
|
2952
2953
|
}
|
@@ -2994,7 +2995,7 @@ jQuery.event = {
|
|
2994
2995
|
var i, j, cur, ret, selMatch, matched, matches, handleObj, sel, related,
|
2995
2996
|
handlers = ( (jQuery._data( this, "events" ) || {} )[ event.type ] || []),
|
2996
2997
|
delegateCount = handlers.delegateCount,
|
2997
|
-
args =
|
2998
|
+
args = core_slice.call( arguments ),
|
2998
2999
|
run_all = !event.exclusive && !event.namespace,
|
2999
3000
|
special = jQuery.event.special[ event.type ] || {},
|
3000
3001
|
handlerQueue = [];
|
@@ -3023,7 +3024,9 @@ jQuery.event = {
|
|
3023
3024
|
sel = handleObj.selector;
|
3024
3025
|
|
3025
3026
|
if ( selMatch[ sel ] === undefined ) {
|
3026
|
-
selMatch[ sel ] =
|
3027
|
+
selMatch[ sel ] = handleObj.needsContext ?
|
3028
|
+
jQuery( sel, this ).index( cur ) >= 0 :
|
3029
|
+
jQuery.find( sel, this, null, [ cur ] ).length;
|
3027
3030
|
}
|
3028
3031
|
if ( selMatch[ sel ] ) {
|
3029
3032
|
matches.push( handleObj );
|
@@ -3593,7 +3596,7 @@ jQuery.fn.extend({
|
|
3593
3596
|
},
|
3594
3597
|
undelegate: function( selector, types, fn ) {
|
3595
3598
|
// ( namespace ) or ( selector, types [, fn] )
|
3596
|
-
return arguments.length
|
3599
|
+
return arguments.length === 1 ? this.off( selector, "**" ) : this.off( types, selector || "**", fn );
|
3597
3600
|
},
|
3598
3601
|
|
3599
3602
|
trigger: function( type, data ) {
|
@@ -3662,1532 +3665,1667 @@ jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblcl
|
|
3662
3665
|
jQuery.event.fixHooks[ name ] = jQuery.event.mouseHooks;
|
3663
3666
|
}
|
3664
3667
|
});
|
3665
|
-
/*!
|
3666
|
-
* Sizzle CSS Selector Engine
|
3667
|
-
*
|
3668
|
-
*
|
3669
|
-
*
|
3670
|
-
*/
|
3671
|
-
(function( window, undefined ) {
|
3672
|
-
|
3673
|
-
var
|
3674
|
-
|
3675
|
-
|
3676
|
-
|
3677
|
-
|
3678
|
-
|
3679
|
-
|
3680
|
-
|
3681
|
-
|
3682
|
-
|
3683
|
-
|
3684
|
-
baseHasDuplicate = true,
|
3685
|
-
strundefined = "undefined",
|
3686
|
-
|
3687
|
-
expando = ( "sizcache" + Math.random() ).replace( ".", "" ),
|
3688
|
-
|
3689
|
-
|
3690
|
-
|
3691
|
-
|
3692
|
-
|
3693
|
-
|
3694
|
-
|
3695
|
-
|
3696
|
-
|
3697
|
-
|
3698
|
-
|
3699
|
-
|
3700
|
-
|
3701
|
-
|
3702
|
-
|
3703
|
-
|
3704
|
-
|
3705
|
-
|
3706
|
-
|
3707
|
-
|
3708
|
-
|
3709
|
-
|
3710
|
-
|
3711
|
-
|
3712
|
-
|
3713
|
-
},
|
3714
|
-
|
3715
|
-
|
3716
|
-
|
3717
|
-
|
3718
|
-
|
3719
|
-
|
3720
|
-
|
3721
|
-
|
3722
|
-
|
3723
|
-
|
3724
|
-
|
3725
|
-
|
3726
|
-
|
3727
|
-
|
3728
|
-
|
3729
|
-
|
3730
|
-
|
3731
|
-
|
3732
|
-
|
3733
|
-
|
3734
|
-
|
3735
|
-
|
3736
|
-
|
3737
|
-
//
|
3738
|
-
|
3739
|
-
|
3740
|
-
//
|
3741
|
-
|
3742
|
-
|
3743
|
-
|
3744
|
-
|
3745
|
-
|
3746
|
-
|
3747
|
-
|
3748
|
-
|
3749
|
-
|
3750
|
-
|
3751
|
-
|
3752
|
-
|
3753
|
-
//
|
3754
|
-
|
3755
|
-
|
3756
|
-
|
3757
|
-
|
3758
|
-
|
3759
|
-
|
3760
|
-
|
3761
|
-
|
3762
|
-
|
3763
|
-
|
3764
|
-
|
3765
|
-
|
3766
|
-
|
3767
|
-
|
3768
|
-
|
3769
|
-
|
3770
|
-
|
3771
|
-
|
3772
|
-
|
3773
|
-
|
3774
|
-
|
3775
|
-
|
3776
|
-
|
3777
|
-
|
3778
|
-
|
3779
|
-
|
3780
|
-
|
3781
|
-
|
3782
|
-
|
3783
|
-
|
3784
|
-
|
3785
|
-
|
3786
|
-
|
3787
|
-
|
3788
|
-
|
3789
|
-
|
3790
|
-
|
3791
|
-
|
3792
|
-
|
3793
|
-
|
3794
|
-
|
3795
|
-
|
3796
|
-
|
3797
|
-
|
3798
|
-
|
3799
|
-
|
3800
|
-
|
3801
|
-
|
3802
|
-
|
3803
|
-
|
3804
|
-
|
3805
|
-
|
3806
|
-
|
3807
|
-
|
3808
|
-
|
3809
|
-
|
3810
|
-
|
3811
|
-
|
3812
|
-
|
3813
|
-
|
3814
|
-
return
|
3815
|
-
}),
|
3816
|
-
|
3817
|
-
// Check if
|
3818
|
-
|
3819
|
-
|
3820
|
-
div.
|
3821
|
-
|
3822
|
-
|
3823
|
-
|
3824
|
-
|
3825
|
-
|
3826
|
-
div.
|
3827
|
-
|
3828
|
-
|
3829
|
-
|
3830
|
-
|
3831
|
-
|
3832
|
-
|
3833
|
-
|
3834
|
-
|
3835
|
-
div.innerHTML = "<
|
3836
|
-
|
3837
|
-
|
3838
|
-
|
3839
|
-
|
3840
|
-
|
3841
|
-
|
3842
|
-
|
3843
|
-
|
3844
|
-
|
3845
|
-
|
3846
|
-
|
3847
|
-
|
3848
|
-
|
3849
|
-
|
3850
|
-
|
3851
|
-
|
3852
|
-
|
3853
|
-
|
3854
|
-
|
3855
|
-
|
3856
|
-
|
3857
|
-
|
3858
|
-
|
3859
|
-
|
3860
|
-
|
3861
|
-
|
3862
|
-
|
3863
|
-
|
3864
|
-
|
3865
|
-
|
3866
|
-
|
3867
|
-
|
3868
|
-
|
3869
|
-
|
3870
|
-
|
3871
|
-
|
3872
|
-
|
3873
|
-
|
3874
|
-
|
3875
|
-
|
3876
|
-
|
3877
|
-
|
3878
|
-
|
3879
|
-
|
3880
|
-
|
3881
|
-
|
3882
|
-
|
3883
|
-
|
3884
|
-
|
3885
|
-
|
3886
|
-
|
3887
|
-
|
3888
|
-
|
3889
|
-
|
3890
|
-
|
3891
|
-
|
3892
|
-
|
3893
|
-
|
3894
|
-
|
3895
|
-
|
3896
|
-
|
3897
|
-
|
3898
|
-
|
3899
|
-
|
3900
|
-
|
3901
|
-
|
3902
|
-
|
3903
|
-
|
3904
|
-
|
3905
|
-
|
3906
|
-
|
3907
|
-
|
3908
|
-
|
3909
|
-
|
3910
|
-
|
3911
|
-
|
3912
|
-
|
3913
|
-
|
3914
|
-
|
3915
|
-
|
3916
|
-
|
3917
|
-
|
3918
|
-
|
3919
|
-
|
3920
|
-
|
3921
|
-
|
3922
|
-
|
3923
|
-
|
3924
|
-
|
3925
|
-
|
3926
|
-
|
3927
|
-
|
3928
|
-
|
3929
|
-
|
3930
|
-
|
3931
|
-
|
3932
|
-
|
3933
|
-
|
3934
|
-
|
3935
|
-
|
3936
|
-
|
3937
|
-
|
3938
|
-
|
3939
|
-
}
|
3940
|
-
|
3941
|
-
|
3942
|
-
|
3943
|
-
|
3944
|
-
|
3945
|
-
|
3946
|
-
|
3947
|
-
}
|
3948
|
-
|
3949
|
-
|
3950
|
-
|
3951
|
-
|
3952
|
-
|
3953
|
-
|
3954
|
-
|
3955
|
-
|
3956
|
-
|
3957
|
-
|
3958
|
-
|
3959
|
-
|
3960
|
-
|
3961
|
-
|
3962
|
-
|
3963
|
-
|
3964
|
-
|
3965
|
-
|
3966
|
-
|
3967
|
-
|
3968
|
-
|
3969
|
-
|
3970
|
-
|
3971
|
-
|
3972
|
-
|
3973
|
-
|
3974
|
-
|
3975
|
-
|
3976
|
-
|
3977
|
-
|
3978
|
-
|
3979
|
-
|
3980
|
-
|
3981
|
-
|
3982
|
-
|
3983
|
-
|
3984
|
-
|
3985
|
-
|
3986
|
-
|
3987
|
-
|
3988
|
-
|
3989
|
-
var
|
3990
|
-
|
3991
|
-
|
3992
|
-
|
3993
|
-
|
3994
|
-
|
3995
|
-
|
3996
|
-
|
3997
|
-
|
3998
|
-
|
3999
|
-
|
4000
|
-
|
4001
|
-
|
4002
|
-
|
4003
|
-
|
4004
|
-
|
4005
|
-
|
4006
|
-
|
4007
|
-
|
4008
|
-
|
4009
|
-
|
4010
|
-
|
4011
|
-
|
4012
|
-
|
4013
|
-
|
4014
|
-
|
4015
|
-
|
4016
|
-
|
4017
|
-
|
4018
|
-
|
4019
|
-
|
4020
|
-
|
4021
|
-
|
4022
|
-
|
4023
|
-
|
4024
|
-
|
4025
|
-
|
4026
|
-
|
4027
|
-
|
4028
|
-
|
4029
|
-
|
4030
|
-
|
4031
|
-
|
4032
|
-
|
4033
|
-
|
4034
|
-
|
4035
|
-
|
4036
|
-
|
4037
|
-
|
4038
|
-
|
4039
|
-
|
4040
|
-
|
4041
|
-
|
4042
|
-
|
4043
|
-
|
4044
|
-
|
4045
|
-
|
4046
|
-
|
4047
|
-
|
4048
|
-
|
4049
|
-
|
4050
|
-
|
4051
|
-
|
4052
|
-
|
4053
|
-
|
4054
|
-
|
4055
|
-
|
4056
|
-
|
4057
|
-
|
4058
|
-
|
4059
|
-
|
4060
|
-
|
4061
|
-
|
4062
|
-
|
4063
|
-
|
4064
|
-
|
4065
|
-
|
4066
|
-
|
4067
|
-
|
4068
|
-
|
4069
|
-
|
4070
|
-
|
4071
|
-
|
4072
|
-
|
4073
|
-
|
4074
|
-
|
4075
|
-
|
4076
|
-
|
4077
|
-
|
4078
|
-
|
4079
|
-
|
4080
|
-
|
4081
|
-
|
4082
|
-
|
4083
|
-
|
4084
|
-
|
4085
|
-
|
4086
|
-
|
4087
|
-
}
|
4088
|
-
|
4089
|
-
|
4090
|
-
|
4091
|
-
|
4092
|
-
|
4093
|
-
|
4094
|
-
|
4095
|
-
|
4096
|
-
|
4097
|
-
|
4098
|
-
|
4099
|
-
|
4100
|
-
|
4101
|
-
|
4102
|
-
|
4103
|
-
|
4104
|
-
|
4105
|
-
|
4106
|
-
|
4107
|
-
|
4108
|
-
|
4109
|
-
|
4110
|
-
|
4111
|
-
|
4112
|
-
|
4113
|
-
|
4114
|
-
|
4115
|
-
|
4116
|
-
|
4117
|
-
}
|
4118
|
-
|
4119
|
-
|
4120
|
-
|
4121
|
-
|
4122
|
-
|
4123
|
-
|
4124
|
-
|
4125
|
-
|
4126
|
-
|
4127
|
-
|
4128
|
-
|
4129
|
-
|
4130
|
-
|
4131
|
-
|
4132
|
-
|
4133
|
-
|
4134
|
-
|
4135
|
-
|
4136
|
-
|
4137
|
-
|
4138
|
-
|
4139
|
-
|
4140
|
-
|
4141
|
-
|
4142
|
-
|
4143
|
-
|
4144
|
-
|
4145
|
-
|
4146
|
-
|
4147
|
-
|
4148
|
-
|
4149
|
-
|
4150
|
-
|
4151
|
-
|
4152
|
-
|
4153
|
-
|
4154
|
-
|
4155
|
-
|
4156
|
-
|
4157
|
-
|
4158
|
-
|
4159
|
-
|
4160
|
-
|
4161
|
-
|
4162
|
-
|
4163
|
-
|
4164
|
-
|
4165
|
-
|
4166
|
-
|
4167
|
-
|
4168
|
-
|
4169
|
-
|
4170
|
-
|
4171
|
-
|
4172
|
-
|
4173
|
-
|
4174
|
-
|
4175
|
-
|
4176
|
-
|
4177
|
-
|
4178
|
-
|
4179
|
-
|
4180
|
-
|
4181
|
-
|
4182
|
-
|
4183
|
-
|
4184
|
-
|
4185
|
-
|
4186
|
-
|
4187
|
-
|
4188
|
-
|
4189
|
-
|
4190
|
-
|
4191
|
-
|
4192
|
-
|
4193
|
-
match[
|
4194
|
-
|
4195
|
-
|
4196
|
-
|
4197
|
-
|
4198
|
-
|
4199
|
-
|
4200
|
-
|
4201
|
-
|
4202
|
-
|
4203
|
-
|
4204
|
-
|
4205
|
-
|
4206
|
-
|
4207
|
-
|
4208
|
-
|
4209
|
-
|
4210
|
-
|
4211
|
-
|
4212
|
-
|
4213
|
-
|
4214
|
-
|
4215
|
-
|
4216
|
-
|
4217
|
-
|
4218
|
-
|
4219
|
-
|
4220
|
-
|
4221
|
-
|
4222
|
-
|
4223
|
-
|
4224
|
-
|
4225
|
-
|
4226
|
-
|
4227
|
-
|
4228
|
-
|
4229
|
-
|
4230
|
-
|
4231
|
-
|
4232
|
-
|
4233
|
-
|
4234
|
-
|
4235
|
-
|
4236
|
-
|
4237
|
-
|
4238
|
-
|
4239
|
-
|
4240
|
-
|
4241
|
-
|
4242
|
-
|
4243
|
-
|
4244
|
-
|
4245
|
-
|
4246
|
-
|
4247
|
-
|
4248
|
-
|
4249
|
-
|
4250
|
-
|
4251
|
-
|
4252
|
-
|
4253
|
-
|
4254
|
-
|
4255
|
-
|
4256
|
-
|
4257
|
-
|
4258
|
-
|
4259
|
-
|
4260
|
-
|
4261
|
-
|
4262
|
-
|
4263
|
-
|
4264
|
-
|
4265
|
-
|
4266
|
-
|
4267
|
-
|
4268
|
-
|
4269
|
-
|
4270
|
-
|
4271
|
-
|
4272
|
-
|
4273
|
-
|
4274
|
-
|
4275
|
-
|
4276
|
-
|
4277
|
-
|
4278
|
-
|
4279
|
-
|
4280
|
-
|
4281
|
-
|
4282
|
-
|
4283
|
-
|
4284
|
-
|
4285
|
-
|
4286
|
-
|
4287
|
-
|
4288
|
-
|
4289
|
-
|
4290
|
-
|
4291
|
-
|
4292
|
-
|
4293
|
-
|
4294
|
-
|
4295
|
-
|
4296
|
-
|
4297
|
-
|
4298
|
-
|
4299
|
-
|
4300
|
-
|
4301
|
-
|
4302
|
-
|
4303
|
-
if (
|
4304
|
-
|
4305
|
-
|
4306
|
-
|
4307
|
-
|
4308
|
-
|
4309
|
-
|
4310
|
-
|
4311
|
-
|
4312
|
-
|
4313
|
-
|
4314
|
-
|
4315
|
-
|
4316
|
-
|
4317
|
-
|
4318
|
-
|
4319
|
-
|
4320
|
-
|
4321
|
-
|
4322
|
-
|
4323
|
-
|
4324
|
-
|
4325
|
-
|
4326
|
-
|
4327
|
-
|
4328
|
-
|
4329
|
-
|
4330
|
-
|
4331
|
-
|
4332
|
-
|
4333
|
-
|
4334
|
-
|
4335
|
-
|
4336
|
-
|
4337
|
-
|
4338
|
-
|
4339
|
-
|
4340
|
-
|
4341
|
-
|
4342
|
-
|
4343
|
-
|
4344
|
-
|
4345
|
-
|
4346
|
-
|
4347
|
-
|
4348
|
-
|
4349
|
-
|
4350
|
-
|
4351
|
-
|
4352
|
-
|
4353
|
-
|
4354
|
-
//
|
4355
|
-
//
|
4356
|
-
//
|
4357
|
-
|
4358
|
-
|
4359
|
-
|
4360
|
-
|
4361
|
-
|
4362
|
-
|
4363
|
-
|
4364
|
-
|
4365
|
-
|
4366
|
-
|
4367
|
-
|
4368
|
-
|
4369
|
-
|
4370
|
-
|
4371
|
-
|
4372
|
-
|
4373
|
-
|
4374
|
-
|
4375
|
-
|
4376
|
-
|
4377
|
-
|
4378
|
-
|
4379
|
-
|
4380
|
-
|
4381
|
-
|
4382
|
-
|
4383
|
-
|
4384
|
-
|
4385
|
-
|
4386
|
-
|
4387
|
-
|
4388
|
-
|
4389
|
-
|
4390
|
-
|
4391
|
-
|
4392
|
-
//
|
4393
|
-
|
4394
|
-
|
4395
|
-
|
4396
|
-
|
4397
|
-
|
4398
|
-
|
4399
|
-
|
4400
|
-
|
4401
|
-
|
4402
|
-
|
4403
|
-
|
4404
|
-
|
4405
|
-
|
4406
|
-
|
4407
|
-
|
4408
|
-
|
4409
|
-
|
4410
|
-
|
4411
|
-
|
4412
|
-
|
4413
|
-
|
4414
|
-
|
4415
|
-
|
4416
|
-
|
4417
|
-
|
4418
|
-
|
4419
|
-
|
4420
|
-
|
4421
|
-
|
4422
|
-
|
4423
|
-
|
4424
|
-
|
4425
|
-
|
4426
|
-
|
4427
|
-
|
4428
|
-
|
4429
|
-
|
4430
|
-
|
4431
|
-
|
4432
|
-
|
4433
|
-
|
4434
|
-
|
4435
|
-
|
4436
|
-
|
4437
|
-
|
4438
|
-
|
4439
|
-
|
4440
|
-
|
4441
|
-
|
4442
|
-
|
4443
|
-
|
4444
|
-
|
4445
|
-
|
4446
|
-
|
4447
|
-
//
|
4448
|
-
|
4449
|
-
|
4450
|
-
|
4451
|
-
|
4452
|
-
|
4453
|
-
|
4454
|
-
|
4455
|
-
|
4456
|
-
"
|
4457
|
-
|
4458
|
-
|
4459
|
-
|
4460
|
-
"
|
4461
|
-
|
4462
|
-
|
4463
|
-
|
4464
|
-
|
4465
|
-
|
4466
|
-
|
4467
|
-
|
4468
|
-
|
4469
|
-
|
4470
|
-
|
4471
|
-
|
4472
|
-
|
4473
|
-
|
4474
|
-
return
|
4475
|
-
},
|
4476
|
-
|
4477
|
-
"
|
4478
|
-
return
|
4479
|
-
}
|
4480
|
-
|
4481
|
-
|
4482
|
-
|
4483
|
-
|
4484
|
-
|
4485
|
-
|
4486
|
-
|
4487
|
-
|
4488
|
-
|
4489
|
-
|
4490
|
-
|
4491
|
-
|
4492
|
-
"
|
4493
|
-
|
4494
|
-
|
4495
|
-
|
4496
|
-
|
4497
|
-
|
4498
|
-
|
4499
|
-
|
4500
|
-
|
4501
|
-
|
4502
|
-
|
4503
|
-
|
4504
|
-
|
4505
|
-
|
4506
|
-
|
4507
|
-
|
4508
|
-
|
4509
|
-
|
4510
|
-
|
4511
|
-
|
4512
|
-
|
4513
|
-
|
4514
|
-
|
4515
|
-
|
4516
|
-
|
4517
|
-
|
4518
|
-
|
4519
|
-
|
4520
|
-
|
4521
|
-
|
4522
|
-
|
4523
|
-
|
4524
|
-
|
4525
|
-
}
|
4526
|
-
|
4527
|
-
|
4528
|
-
|
4529
|
-
|
4530
|
-
|
4531
|
-
|
4532
|
-
|
4533
|
-
|
4534
|
-
|
4535
|
-
|
4536
|
-
|
4537
|
-
|
4538
|
-
|
4539
|
-
|
4540
|
-
|
4541
|
-
|
4542
|
-
|
4543
|
-
}
|
4544
|
-
|
4545
|
-
|
4546
|
-
|
4547
|
-
|
4548
|
-
|
4549
|
-
return
|
4550
|
-
}
|
4551
|
-
|
4552
|
-
|
4553
|
-
|
4554
|
-
|
4555
|
-
|
4556
|
-
|
4557
|
-
|
4558
|
-
|
4559
|
-
|
4560
|
-
|
4561
|
-
|
4562
|
-
|
4563
|
-
|
4564
|
-
|
4565
|
-
|
4566
|
-
|
4567
|
-
|
4568
|
-
|
4569
|
-
|
4570
|
-
|
4571
|
-
|
4572
|
-
|
4573
|
-
|
4574
|
-
|
4575
|
-
|
4576
|
-
|
4577
|
-
|
4578
|
-
|
4579
|
-
|
4580
|
-
|
4581
|
-
|
4582
|
-
|
4583
|
-
|
4584
|
-
|
4585
|
-
|
4586
|
-
|
4587
|
-
|
4588
|
-
|
4589
|
-
|
4590
|
-
|
4591
|
-
|
4592
|
-
|
4593
|
-
|
4594
|
-
|
4595
|
-
|
4596
|
-
|
4597
|
-
|
4598
|
-
|
4599
|
-
|
4600
|
-
|
4601
|
-
|
4602
|
-
|
4603
|
-
|
4604
|
-
|
4605
|
-
|
4606
|
-
|
4607
|
-
|
4608
|
-
|
4609
|
-
|
4610
|
-
|
4611
|
-
|
4612
|
-
|
4613
|
-
|
4614
|
-
|
4615
|
-
|
4616
|
-
|
4617
|
-
|
4618
|
-
|
4619
|
-
|
4620
|
-
|
4621
|
-
|
4622
|
-
//
|
4623
|
-
|
4624
|
-
|
4625
|
-
|
4626
|
-
|
4627
|
-
|
4628
|
-
|
4629
|
-
|
4630
|
-
|
4631
|
-
|
4632
|
-
|
4633
|
-
|
4634
|
-
|
4635
|
-
|
4636
|
-
|
4637
|
-
|
4638
|
-
|
4639
|
-
|
4640
|
-
|
4641
|
-
|
4642
|
-
|
4643
|
-
}
|
4644
|
-
|
4645
|
-
|
4646
|
-
|
4647
|
-
|
4648
|
-
|
4649
|
-
|
4650
|
-
|
4651
|
-
|
4652
|
-
|
4653
|
-
|
4654
|
-
|
4655
|
-
|
4656
|
-
|
4657
|
-
|
4658
|
-
|
4659
|
-
|
4660
|
-
|
4661
|
-
|
4662
|
-
|
4663
|
-
|
4664
|
-
|
4665
|
-
|
4666
|
-
|
4667
|
-
|
4668
|
-
|
4669
|
-
|
4670
|
-
|
4671
|
-
|
4672
|
-
|
4673
|
-
|
4674
|
-
|
4675
|
-
|
4676
|
-
|
4677
|
-
|
4678
|
-
|
4679
|
-
|
4680
|
-
|
4681
|
-
|
4682
|
-
|
4683
|
-
|
4684
|
-
|
4685
|
-
|
4686
|
-
|
4687
|
-
|
4688
|
-
|
4689
|
-
|
4690
|
-
|
4691
|
-
|
4692
|
-
|
4693
|
-
|
4694
|
-
|
4695
|
-
|
4696
|
-
|
4697
|
-
|
4698
|
-
|
4699
|
-
|
4700
|
-
|
4701
|
-
|
4702
|
-
|
4703
|
-
|
4704
|
-
|
4705
|
-
|
4706
|
-
|
4707
|
-
|
4708
|
-
|
4709
|
-
|
4710
|
-
}
|
4711
|
-
|
4712
|
-
|
4713
|
-
|
4714
|
-
|
4715
|
-
|
4716
|
-
|
4717
|
-
|
4718
|
-
|
4719
|
-
|
4720
|
-
|
4721
|
-
|
4722
|
-
|
4723
|
-
|
4724
|
-
|
4725
|
-
|
4726
|
-
|
4727
|
-
|
4728
|
-
|
4729
|
-
|
4730
|
-
|
4731
|
-
|
4732
|
-
|
4733
|
-
|
4734
|
-
|
4735
|
-
|
4736
|
-
|
4737
|
-
|
4738
|
-
|
4739
|
-
|
4740
|
-
|
4741
|
-
|
4742
|
-
|
4743
|
-
|
4744
|
-
|
4745
|
-
|
4746
|
-
|
4747
|
-
|
4748
|
-
|
4749
|
-
|
4750
|
-
|
4751
|
-
|
4752
|
-
|
4753
|
-
|
4754
|
-
|
4755
|
-
|
4756
|
-
|
4757
|
-
|
4758
|
-
|
4759
|
-
|
4760
|
-
|
4761
|
-
|
4762
|
-
|
4763
|
-
|
4764
|
-
|
4765
|
-
|
4766
|
-
|
4767
|
-
if (
|
4768
|
-
|
4769
|
-
|
4770
|
-
|
4771
|
-
|
4772
|
-
|
4773
|
-
|
4774
|
-
|
4775
|
-
|
4776
|
-
|
4777
|
-
|
4778
|
-
|
4779
|
-
|
4780
|
-
|
4781
|
-
|
4782
|
-
|
4783
|
-
|
4784
|
-
|
4785
|
-
|
4786
|
-
|
4787
|
-
|
4788
|
-
|
4789
|
-
|
4790
|
-
|
4791
|
-
|
4792
|
-
|
4793
|
-
|
4794
|
-
|
4795
|
-
|
4796
|
-
|
4797
|
-
|
4798
|
-
|
4799
|
-
|
4800
|
-
|
4801
|
-
|
4802
|
-
|
4803
|
-
}
|
4804
|
-
|
4805
|
-
|
4806
|
-
|
4807
|
-
|
4808
|
-
|
4809
|
-
|
4810
|
-
|
4811
|
-
|
4812
|
-
|
4813
|
-
|
4814
|
-
|
4815
|
-
|
4816
|
-
if (
|
4817
|
-
|
4818
|
-
|
4819
|
-
|
4820
|
-
|
4821
|
-
|
4822
|
-
}
|
4823
|
-
|
4824
|
-
|
4825
|
-
|
4826
|
-
|
4827
|
-
|
4828
|
-
|
4829
|
-
if (
|
4830
|
-
|
4831
|
-
}
|
4832
|
-
|
4833
|
-
|
4834
|
-
|
4835
|
-
|
4836
|
-
|
4837
|
-
|
4838
|
-
|
4839
|
-
|
4840
|
-
|
4841
|
-
|
4842
|
-
|
4843
|
-
|
4844
|
-
|
4845
|
-
|
4846
|
-
|
4847
|
-
|
4848
|
-
|
4849
|
-
|
4850
|
-
|
4851
|
-
|
4852
|
-
|
4853
|
-
|
4854
|
-
|
4855
|
-
|
4856
|
-
|
4857
|
-
|
4858
|
-
|
4859
|
-
|
4860
|
-
|
4861
|
-
|
4862
|
-
|
4863
|
-
|
4864
|
-
|
4865
|
-
|
4866
|
-
|
4867
|
-
|
4868
|
-
|
4869
|
-
|
4870
|
-
|
4871
|
-
|
4872
|
-
|
4873
|
-
|
4874
|
-
|
4875
|
-
|
4876
|
-
|
4877
|
-
|
4878
|
-
|
4879
|
-
|
4880
|
-
|
4881
|
-
|
4882
|
-
|
4883
|
-
|
4884
|
-
|
4885
|
-
|
4886
|
-
|
4887
|
-
|
4888
|
-
|
4889
|
-
|
4890
|
-
|
4891
|
-
|
4892
|
-
|
4893
|
-
|
4894
|
-
|
4895
|
-
|
4896
|
-
|
4897
|
-
|
4898
|
-
|
4899
|
-
|
4900
|
-
|
4901
|
-
|
4902
|
-
|
4903
|
-
|
4904
|
-
|
4905
|
-
|
4906
|
-
|
4907
|
-
|
4908
|
-
|
4909
|
-
|
4910
|
-
|
4911
|
-
|
4912
|
-
|
4913
|
-
|
4914
|
-
|
4915
|
-
|
4916
|
-
|
4917
|
-
|
4918
|
-
|
4919
|
-
|
4920
|
-
|
4921
|
-
|
4922
|
-
|
4923
|
-
|
4924
|
-
|
4925
|
-
|
4926
|
-
|
4927
|
-
|
4928
|
-
|
4929
|
-
|
4930
|
-
|
4931
|
-
|
4932
|
-
|
4933
|
-
|
4934
|
-
|
4935
|
-
|
4936
|
-
|
4937
|
-
|
4938
|
-
|
4939
|
-
|
4940
|
-
|
4941
|
-
|
4942
|
-
|
4943
|
-
|
4944
|
-
|
4945
|
-
|
4946
|
-
|
4947
|
-
|
4948
|
-
|
4949
|
-
|
4950
|
-
|
4951
|
-
|
4952
|
-
|
4953
|
-
|
4954
|
-
|
4955
|
-
|
4956
|
-
|
4957
|
-
|
4958
|
-
|
4959
|
-
|
4960
|
-
|
4961
|
-
|
4962
|
-
|
4963
|
-
|
4964
|
-
|
4965
|
-
|
4966
|
-
|
4967
|
-
|
4968
|
-
|
4969
|
-
|
4970
|
-
|
4971
|
-
|
4972
|
-
|
4973
|
-
|
4974
|
-
|
4975
|
-
|
4976
|
-
|
4977
|
-
|
4978
|
-
|
4979
|
-
|
4980
|
-
|
4981
|
-
|
4982
|
-
|
4983
|
-
|
4984
|
-
|
4985
|
-
|
4986
|
-
|
4987
|
-
|
4988
|
-
|
4989
|
-
|
4990
|
-
|
4991
|
-
|
4992
|
-
|
4993
|
-
|
4994
|
-
|
4995
|
-
|
4996
|
-
|
4997
|
-
|
4998
|
-
|
4999
|
-
|
5000
|
-
|
5001
|
-
|
5002
|
-
|
5003
|
-
|
5004
|
-
|
5005
|
-
if (
|
5006
|
-
push
|
5007
|
-
}
|
5008
|
-
|
5009
|
-
|
5010
|
-
|
5011
|
-
|
5012
|
-
|
5013
|
-
|
5014
|
-
|
5015
|
-
|
5016
|
-
|
5017
|
-
|
5018
|
-
|
5019
|
-
|
5020
|
-
|
5021
|
-
|
5022
|
-
|
5023
|
-
|
5024
|
-
|
5025
|
-
|
5026
|
-
|
5027
|
-
|
5028
|
-
|
5029
|
-
|
5030
|
-
|
5031
|
-
|
5032
|
-
|
5033
|
-
|
5034
|
-
|
5035
|
-
|
5036
|
-
|
5037
|
-
|
5038
|
-
|
5039
|
-
|
5040
|
-
|
5041
|
-
|
5042
|
-
|
5043
|
-
//
|
5044
|
-
|
5045
|
-
|
5046
|
-
|
5047
|
-
|
5048
|
-
|
5049
|
-
|
5050
|
-
|
5051
|
-
|
5052
|
-
|
5053
|
-
|
5054
|
-
|
5055
|
-
|
5056
|
-
|
5057
|
-
|
5058
|
-
|
5059
|
-
|
5060
|
-
|
5061
|
-
|
5062
|
-
|
5063
|
-
|
5064
|
-
|
5065
|
-
|
5066
|
-
|
5067
|
-
|
5068
|
-
|
5069
|
-
|
5070
|
-
|
5071
|
-
|
5072
|
-
|
5073
|
-
|
5074
|
-
|
5075
|
-
|
5076
|
-
|
5077
|
-
|
5078
|
-
|
5079
|
-
|
5080
|
-
|
5081
|
-
|
5082
|
-
|
5083
|
-
|
5084
|
-
|
5085
|
-
|
5086
|
-
|
5087
|
-
|
5088
|
-
|
5089
|
-
|
5090
|
-
|
5091
|
-
|
5092
|
-
|
5093
|
-
|
5094
|
-
|
5095
|
-
|
5096
|
-
|
5097
|
-
|
5098
|
-
|
5099
|
-
|
5100
|
-
|
5101
|
-
|
5102
|
-
|
5103
|
-
|
5104
|
-
|
5105
|
-
|
5106
|
-
|
5107
|
-
|
5108
|
-
|
5109
|
-
|
5110
|
-
|
5111
|
-
|
5112
|
-
|
5113
|
-
|
5114
|
-
|
5115
|
-
|
5116
|
-
|
5117
|
-
|
5118
|
-
|
5119
|
-
|
5120
|
-
|
5121
|
-
|
5122
|
-
|
5123
|
-
|
5124
|
-
|
5125
|
-
|
5126
|
-
|
5127
|
-
|
5128
|
-
|
5129
|
-
|
5130
|
-
|
5131
|
-
|
5132
|
-
|
5133
|
-
|
5134
|
-
|
5135
|
-
|
5136
|
-
|
5137
|
-
|
5138
|
-
|
5139
|
-
|
5140
|
-
|
5141
|
-
|
5142
|
-
|
5143
|
-
|
5144
|
-
|
5145
|
-
|
5146
|
-
|
5147
|
-
|
5148
|
-
|
5149
|
-
|
5150
|
-
|
5151
|
-
|
5152
|
-
|
5153
|
-
|
5154
|
-
|
5155
|
-
|
5156
|
-
|
5157
|
-
|
5158
|
-
|
5159
|
-
|
5160
|
-
|
5161
|
-
|
5162
|
-
|
5163
|
-
|
5164
|
-
|
5165
|
-
|
5166
|
-
|
5167
|
-
|
5168
|
-
|
5169
|
-
|
5170
|
-
|
5171
|
-
|
5172
|
-
|
5173
|
-
|
5174
|
-
|
5175
|
-
|
5176
|
-
|
5177
|
-
|
5178
|
-
|
5179
|
-
|
5180
|
-
|
5181
|
-
|
5182
|
-
|
5183
|
-
|
5184
|
-
|
5185
|
-
//
|
5186
|
-
|
5187
|
-
|
5188
|
-
//
|
5189
|
-
|
5190
|
-
|
3668
|
+
/*!
|
3669
|
+
* Sizzle CSS Selector Engine
|
3670
|
+
* Copyright 2012 jQuery Foundation and other contributors
|
3671
|
+
* Released under the MIT license
|
3672
|
+
* http://sizzlejs.com/
|
3673
|
+
*/
|
3674
|
+
(function( window, undefined ) {
|
3675
|
+
|
3676
|
+
var cachedruns,
|
3677
|
+
assertGetIdNotName,
|
3678
|
+
Expr,
|
3679
|
+
getText,
|
3680
|
+
isXML,
|
3681
|
+
contains,
|
3682
|
+
compile,
|
3683
|
+
sortOrder,
|
3684
|
+
hasDuplicate,
|
3685
|
+
outermostContext,
|
3686
|
+
|
3687
|
+
baseHasDuplicate = true,
|
3688
|
+
strundefined = "undefined",
|
3689
|
+
|
3690
|
+
expando = ( "sizcache" + Math.random() ).replace( ".", "" ),
|
3691
|
+
|
3692
|
+
Token = String,
|
3693
|
+
document = window.document,
|
3694
|
+
docElem = document.documentElement,
|
3695
|
+
dirruns = 0,
|
3696
|
+
done = 0,
|
3697
|
+
pop = [].pop,
|
3698
|
+
push = [].push,
|
3699
|
+
slice = [].slice,
|
3700
|
+
// Use a stripped-down indexOf if a native one is unavailable
|
3701
|
+
indexOf = [].indexOf || function( elem ) {
|
3702
|
+
var i = 0,
|
3703
|
+
len = this.length;
|
3704
|
+
for ( ; i < len; i++ ) {
|
3705
|
+
if ( this[i] === elem ) {
|
3706
|
+
return i;
|
3707
|
+
}
|
3708
|
+
}
|
3709
|
+
return -1;
|
3710
|
+
},
|
3711
|
+
|
3712
|
+
// Augment a function for special use by Sizzle
|
3713
|
+
markFunction = function( fn, value ) {
|
3714
|
+
fn[ expando ] = value == null || value;
|
3715
|
+
return fn;
|
3716
|
+
},
|
3717
|
+
|
3718
|
+
createCache = function() {
|
3719
|
+
var cache = {},
|
3720
|
+
keys = [];
|
3721
|
+
|
3722
|
+
return markFunction(function( key, value ) {
|
3723
|
+
// Only keep the most recent entries
|
3724
|
+
if ( keys.push( key ) > Expr.cacheLength ) {
|
3725
|
+
delete cache[ keys.shift() ];
|
3726
|
+
}
|
3727
|
+
|
3728
|
+
return (cache[ key ] = value);
|
3729
|
+
}, cache );
|
3730
|
+
},
|
3731
|
+
|
3732
|
+
classCache = createCache(),
|
3733
|
+
tokenCache = createCache(),
|
3734
|
+
compilerCache = createCache(),
|
3735
|
+
|
3736
|
+
// Regex
|
3737
|
+
|
3738
|
+
// Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace
|
3739
|
+
whitespace = "[\\x20\\t\\r\\n\\f]",
|
3740
|
+
// http://www.w3.org/TR/css3-syntax/#characters
|
3741
|
+
characterEncoding = "(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+",
|
3742
|
+
|
3743
|
+
// Loosely modeled on CSS identifier characters
|
3744
|
+
// An unquoted value should be a CSS identifier (http://www.w3.org/TR/css3-selectors/#attribute-selectors)
|
3745
|
+
// Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier
|
3746
|
+
identifier = characterEncoding.replace( "w", "w#" ),
|
3747
|
+
|
3748
|
+
// Acceptable operators http://www.w3.org/TR/selectors/#attribute-selectors
|
3749
|
+
operators = "([*^$|!~]?=)",
|
3750
|
+
attributes = "\\[" + whitespace + "*(" + characterEncoding + ")" + whitespace +
|
3751
|
+
"*(?:" + operators + whitespace + "*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|(" + identifier + ")|)|)" + whitespace + "*\\]",
|
3752
|
+
|
3753
|
+
// Prefer arguments not in parens/brackets,
|
3754
|
+
// then attribute selectors and non-pseudos (denoted by :),
|
3755
|
+
// then anything else
|
3756
|
+
// These preferences are here to reduce the number of selectors
|
3757
|
+
// needing tokenize in the PSEUDO preFilter
|
3758
|
+
pseudos = ":(" + characterEncoding + ")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|([^()[\\]]*|(?:(?:" + attributes + ")|[^:]|\\\\.)*|.*))\\)|)",
|
3759
|
+
|
3760
|
+
// For matchExpr.POS and matchExpr.needsContext
|
3761
|
+
pos = ":(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + whitespace +
|
3762
|
+
"*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)",
|
3763
|
+
|
3764
|
+
// Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter
|
3765
|
+
rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ),
|
3766
|
+
|
3767
|
+
rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ),
|
3768
|
+
rcombinators = new RegExp( "^" + whitespace + "*([\\x20\\t\\r\\n\\f>+~])" + whitespace + "*" ),
|
3769
|
+
rpseudo = new RegExp( pseudos ),
|
3770
|
+
|
3771
|
+
// Easily-parseable/retrievable ID or TAG or CLASS selectors
|
3772
|
+
rquickExpr = /^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/,
|
3773
|
+
|
3774
|
+
rnot = /^:not/,
|
3775
|
+
rsibling = /[\x20\t\r\n\f]*[+~]/,
|
3776
|
+
rendsWithNot = /:not\($/,
|
3777
|
+
|
3778
|
+
rheader = /h\d/i,
|
3779
|
+
rinputs = /input|select|textarea|button/i,
|
3780
|
+
|
3781
|
+
rbackslash = /\\(?!\\)/g,
|
3782
|
+
|
3783
|
+
matchExpr = {
|
3784
|
+
"ID": new RegExp( "^#(" + characterEncoding + ")" ),
|
3785
|
+
"CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ),
|
3786
|
+
"NAME": new RegExp( "^\\[name=['\"]?(" + characterEncoding + ")['\"]?\\]" ),
|
3787
|
+
"TAG": new RegExp( "^(" + characterEncoding.replace( "w", "w*" ) + ")" ),
|
3788
|
+
"ATTR": new RegExp( "^" + attributes ),
|
3789
|
+
"PSEUDO": new RegExp( "^" + pseudos ),
|
3790
|
+
"POS": new RegExp( pos, "i" ),
|
3791
|
+
"CHILD": new RegExp( "^:(only|nth|first|last)-child(?:\\(" + whitespace +
|
3792
|
+
"*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace +
|
3793
|
+
"*(\\d+)|))" + whitespace + "*\\)|)", "i" ),
|
3794
|
+
// For use in libraries implementing .is()
|
3795
|
+
"needsContext": new RegExp( "^" + whitespace + "*[>+~]|" + pos, "i" )
|
3796
|
+
},
|
3797
|
+
|
3798
|
+
// Support
|
3799
|
+
|
3800
|
+
// Used for testing something on an element
|
3801
|
+
assert = function( fn ) {
|
3802
|
+
var div = document.createElement("div");
|
3803
|
+
|
3804
|
+
try {
|
3805
|
+
return fn( div );
|
3806
|
+
} catch (e) {
|
3807
|
+
return false;
|
3808
|
+
} finally {
|
3809
|
+
// release memory in IE
|
3810
|
+
div = null;
|
3811
|
+
}
|
3812
|
+
},
|
3813
|
+
|
3814
|
+
// Check if getElementsByTagName("*") returns only elements
|
3815
|
+
assertTagNameNoComments = assert(function( div ) {
|
3816
|
+
div.appendChild( document.createComment("") );
|
3817
|
+
return !div.getElementsByTagName("*").length;
|
3818
|
+
}),
|
3819
|
+
|
3820
|
+
// Check if getAttribute returns normalized href attributes
|
3821
|
+
assertHrefNotNormalized = assert(function( div ) {
|
3822
|
+
div.innerHTML = "<a href='#'></a>";
|
3823
|
+
return div.firstChild && typeof div.firstChild.getAttribute !== strundefined &&
|
3824
|
+
div.firstChild.getAttribute("href") === "#";
|
3825
|
+
}),
|
3826
|
+
|
3827
|
+
// Check if attributes should be retrieved by attribute nodes
|
3828
|
+
assertAttributes = assert(function( div ) {
|
3829
|
+
div.innerHTML = "<select></select>";
|
3830
|
+
var type = typeof div.lastChild.getAttribute("multiple");
|
3831
|
+
// IE8 returns a string for some attributes even when not present
|
3832
|
+
return type !== "boolean" && type !== "string";
|
3833
|
+
}),
|
3834
|
+
|
3835
|
+
// Check if getElementsByClassName can be trusted
|
3836
|
+
assertUsableClassName = assert(function( div ) {
|
3837
|
+
// Opera can't find a second classname (in 9.6)
|
3838
|
+
div.innerHTML = "<div class='hidden e'></div><div class='hidden'></div>";
|
3839
|
+
if ( !div.getElementsByClassName || !div.getElementsByClassName("e").length ) {
|
3840
|
+
return false;
|
3841
|
+
}
|
3842
|
+
|
3843
|
+
// Safari 3.2 caches class attributes and doesn't catch changes
|
3844
|
+
div.lastChild.className = "e";
|
3845
|
+
return div.getElementsByClassName("e").length === 2;
|
3846
|
+
}),
|
3847
|
+
|
3848
|
+
// Check if getElementById returns elements by name
|
3849
|
+
// Check if getElementsByName privileges form controls or returns elements by ID
|
3850
|
+
assertUsableName = assert(function( div ) {
|
3851
|
+
// Inject content
|
3852
|
+
div.id = expando + 0;
|
3853
|
+
div.innerHTML = "<a name='" + expando + "'></a><div name='" + expando + "'></div>";
|
3854
|
+
docElem.insertBefore( div, docElem.firstChild );
|
3855
|
+
|
3856
|
+
// Test
|
3857
|
+
var pass = document.getElementsByName &&
|
3858
|
+
// buggy browsers will return fewer than the correct 2
|
3859
|
+
document.getElementsByName( expando ).length === 2 +
|
3860
|
+
// buggy browsers will return more than the correct 0
|
3861
|
+
document.getElementsByName( expando + 0 ).length;
|
3862
|
+
assertGetIdNotName = !document.getElementById( expando );
|
3863
|
+
|
3864
|
+
// Cleanup
|
3865
|
+
docElem.removeChild( div );
|
3866
|
+
|
3867
|
+
return pass;
|
3868
|
+
});
|
3869
|
+
|
3870
|
+
// If slice is not available, provide a backup
|
3871
|
+
try {
|
3872
|
+
slice.call( docElem.childNodes, 0 )[0].nodeType;
|
3873
|
+
} catch ( e ) {
|
3874
|
+
slice = function( i ) {
|
3875
|
+
var elem,
|
3876
|
+
results = [];
|
3877
|
+
for ( ; (elem = this[i]); i++ ) {
|
3878
|
+
results.push( elem );
|
3879
|
+
}
|
3880
|
+
return results;
|
3881
|
+
};
|
3882
|
+
}
|
3883
|
+
|
3884
|
+
function Sizzle( selector, context, results, seed ) {
|
3885
|
+
results = results || [];
|
3886
|
+
context = context || document;
|
3887
|
+
var match, elem, xml, m,
|
3888
|
+
nodeType = context.nodeType;
|
3889
|
+
|
3890
|
+
if ( !selector || typeof selector !== "string" ) {
|
3891
|
+
return results;
|
3892
|
+
}
|
3893
|
+
|
3894
|
+
if ( nodeType !== 1 && nodeType !== 9 ) {
|
3895
|
+
return [];
|
3896
|
+
}
|
3897
|
+
|
3898
|
+
xml = isXML( context );
|
3899
|
+
|
3900
|
+
if ( !xml && !seed ) {
|
3901
|
+
if ( (match = rquickExpr.exec( selector )) ) {
|
3902
|
+
// Speed-up: Sizzle("#ID")
|
3903
|
+
if ( (m = match[1]) ) {
|
3904
|
+
if ( nodeType === 9 ) {
|
3905
|
+
elem = context.getElementById( m );
|
3906
|
+
// Check parentNode to catch when Blackberry 4.6 returns
|
3907
|
+
// nodes that are no longer in the document #6963
|
3908
|
+
if ( elem && elem.parentNode ) {
|
3909
|
+
// Handle the case where IE, Opera, and Webkit return items
|
3910
|
+
// by name instead of ID
|
3911
|
+
if ( elem.id === m ) {
|
3912
|
+
results.push( elem );
|
3913
|
+
return results;
|
3914
|
+
}
|
3915
|
+
} else {
|
3916
|
+
return results;
|
3917
|
+
}
|
3918
|
+
} else {
|
3919
|
+
// Context is not a document
|
3920
|
+
if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) &&
|
3921
|
+
contains( context, elem ) && elem.id === m ) {
|
3922
|
+
results.push( elem );
|
3923
|
+
return results;
|
3924
|
+
}
|
3925
|
+
}
|
3926
|
+
|
3927
|
+
// Speed-up: Sizzle("TAG")
|
3928
|
+
} else if ( match[2] ) {
|
3929
|
+
push.apply( results, slice.call(context.getElementsByTagName( selector ), 0) );
|
3930
|
+
return results;
|
3931
|
+
|
3932
|
+
// Speed-up: Sizzle(".CLASS")
|
3933
|
+
} else if ( (m = match[3]) && assertUsableClassName && context.getElementsByClassName ) {
|
3934
|
+
push.apply( results, slice.call(context.getElementsByClassName( m ), 0) );
|
3935
|
+
return results;
|
3936
|
+
}
|
3937
|
+
}
|
3938
|
+
}
|
3939
|
+
|
3940
|
+
// All others
|
3941
|
+
return select( selector.replace( rtrim, "$1" ), context, results, seed, xml );
|
3942
|
+
}
|
3943
|
+
|
3944
|
+
Sizzle.matches = function( expr, elements ) {
|
3945
|
+
return Sizzle( expr, null, null, elements );
|
3946
|
+
};
|
3947
|
+
|
3948
|
+
Sizzle.matchesSelector = function( elem, expr ) {
|
3949
|
+
return Sizzle( expr, null, null, [ elem ] ).length > 0;
|
3950
|
+
};
|
3951
|
+
|
3952
|
+
// Returns a function to use in pseudos for input types
|
3953
|
+
function createInputPseudo( type ) {
|
3954
|
+
return function( elem ) {
|
3955
|
+
var name = elem.nodeName.toLowerCase();
|
3956
|
+
return name === "input" && elem.type === type;
|
3957
|
+
};
|
3958
|
+
}
|
3959
|
+
|
3960
|
+
// Returns a function to use in pseudos for buttons
|
3961
|
+
function createButtonPseudo( type ) {
|
3962
|
+
return function( elem ) {
|
3963
|
+
var name = elem.nodeName.toLowerCase();
|
3964
|
+
return (name === "input" || name === "button") && elem.type === type;
|
3965
|
+
};
|
3966
|
+
}
|
3967
|
+
|
3968
|
+
// Returns a function to use in pseudos for positionals
|
3969
|
+
function createPositionalPseudo( fn ) {
|
3970
|
+
return markFunction(function( argument ) {
|
3971
|
+
argument = +argument;
|
3972
|
+
return markFunction(function( seed, matches ) {
|
3973
|
+
var j,
|
3974
|
+
matchIndexes = fn( [], seed.length, argument ),
|
3975
|
+
i = matchIndexes.length;
|
3976
|
+
|
3977
|
+
// Match elements found at the specified indexes
|
3978
|
+
while ( i-- ) {
|
3979
|
+
if ( seed[ (j = matchIndexes[i]) ] ) {
|
3980
|
+
seed[j] = !(matches[j] = seed[j]);
|
3981
|
+
}
|
3982
|
+
}
|
3983
|
+
});
|
3984
|
+
});
|
3985
|
+
}
|
3986
|
+
|
3987
|
+
/**
|
3988
|
+
* Utility function for retrieving the text value of an array of DOM nodes
|
3989
|
+
* @param {Array|Element} elem
|
3990
|
+
*/
|
3991
|
+
getText = Sizzle.getText = function( elem ) {
|
3992
|
+
var node,
|
3993
|
+
ret = "",
|
3994
|
+
i = 0,
|
3995
|
+
nodeType = elem.nodeType;
|
3996
|
+
|
3997
|
+
if ( nodeType ) {
|
3998
|
+
if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {
|
3999
|
+
// Use textContent for elements
|
4000
|
+
// innerText usage removed for consistency of new lines (see #11153)
|
4001
|
+
if ( typeof elem.textContent === "string" ) {
|
4002
|
+
return elem.textContent;
|
4003
|
+
} else {
|
4004
|
+
// Traverse its children
|
4005
|
+
for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
|
4006
|
+
ret += getText( elem );
|
4007
|
+
}
|
4008
|
+
}
|
4009
|
+
} else if ( nodeType === 3 || nodeType === 4 ) {
|
4010
|
+
return elem.nodeValue;
|
4011
|
+
}
|
4012
|
+
// Do not include comment or processing instruction nodes
|
4013
|
+
} else {
|
4014
|
+
|
4015
|
+
// If no nodeType, this is expected to be an array
|
4016
|
+
for ( ; (node = elem[i]); i++ ) {
|
4017
|
+
// Do not traverse comment nodes
|
4018
|
+
ret += getText( node );
|
4019
|
+
}
|
4020
|
+
}
|
4021
|
+
return ret;
|
4022
|
+
};
|
4023
|
+
|
4024
|
+
isXML = Sizzle.isXML = function( elem ) {
|
4025
|
+
// documentElement is verified for cases where it doesn't yet exist
|
4026
|
+
// (such as loading iframes in IE - #4833)
|
4027
|
+
var documentElement = elem && (elem.ownerDocument || elem).documentElement;
|
4028
|
+
return documentElement ? documentElement.nodeName !== "HTML" : false;
|
4029
|
+
};
|
4030
|
+
|
4031
|
+
// Element contains another
|
4032
|
+
contains = Sizzle.contains = docElem.contains ?
|
4033
|
+
function( a, b ) {
|
4034
|
+
var adown = a.nodeType === 9 ? a.documentElement : a,
|
4035
|
+
bup = b && b.parentNode;
|
4036
|
+
return a === bup || !!( bup && bup.nodeType === 1 && adown.contains && adown.contains(bup) );
|
4037
|
+
} :
|
4038
|
+
docElem.compareDocumentPosition ?
|
4039
|
+
function( a, b ) {
|
4040
|
+
return b && !!( a.compareDocumentPosition( b ) & 16 );
|
4041
|
+
} :
|
4042
|
+
function( a, b ) {
|
4043
|
+
while ( (b = b.parentNode) ) {
|
4044
|
+
if ( b === a ) {
|
4045
|
+
return true;
|
4046
|
+
}
|
4047
|
+
}
|
4048
|
+
return false;
|
4049
|
+
};
|
4050
|
+
|
4051
|
+
Sizzle.attr = function( elem, name ) {
|
4052
|
+
var val,
|
4053
|
+
xml = isXML( elem );
|
4054
|
+
|
4055
|
+
if ( !xml ) {
|
4056
|
+
name = name.toLowerCase();
|
4057
|
+
}
|
4058
|
+
if ( (val = Expr.attrHandle[ name ]) ) {
|
4059
|
+
return val( elem );
|
4060
|
+
}
|
4061
|
+
if ( xml || assertAttributes ) {
|
4062
|
+
return elem.getAttribute( name );
|
4063
|
+
}
|
4064
|
+
val = elem.getAttributeNode( name );
|
4065
|
+
return val ?
|
4066
|
+
typeof elem[ name ] === "boolean" ?
|
4067
|
+
elem[ name ] ? name : null :
|
4068
|
+
val.specified ? val.value : null :
|
4069
|
+
null;
|
4070
|
+
};
|
4071
|
+
|
4072
|
+
Expr = Sizzle.selectors = {
|
4073
|
+
|
4074
|
+
// Can be adjusted by the user
|
4075
|
+
cacheLength: 50,
|
4076
|
+
|
4077
|
+
createPseudo: markFunction,
|
4078
|
+
|
4079
|
+
match: matchExpr,
|
4080
|
+
|
4081
|
+
// IE6/7 return a modified href
|
4082
|
+
attrHandle: assertHrefNotNormalized ?
|
4083
|
+
{} :
|
4084
|
+
{
|
4085
|
+
"href": function( elem ) {
|
4086
|
+
return elem.getAttribute( "href", 2 );
|
4087
|
+
},
|
4088
|
+
"type": function( elem ) {
|
4089
|
+
return elem.getAttribute("type");
|
4090
|
+
}
|
4091
|
+
},
|
4092
|
+
|
4093
|
+
find: {
|
4094
|
+
"ID": assertGetIdNotName ?
|
4095
|
+
function( id, context, xml ) {
|
4096
|
+
if ( typeof context.getElementById !== strundefined && !xml ) {
|
4097
|
+
var m = context.getElementById( id );
|
4098
|
+
// Check parentNode to catch when Blackberry 4.6 returns
|
4099
|
+
// nodes that are no longer in the document #6963
|
4100
|
+
return m && m.parentNode ? [m] : [];
|
4101
|
+
}
|
4102
|
+
} :
|
4103
|
+
function( id, context, xml ) {
|
4104
|
+
if ( typeof context.getElementById !== strundefined && !xml ) {
|
4105
|
+
var m = context.getElementById( id );
|
4106
|
+
|
4107
|
+
return m ?
|
4108
|
+
m.id === id || typeof m.getAttributeNode !== strundefined && m.getAttributeNode("id").value === id ?
|
4109
|
+
[m] :
|
4110
|
+
undefined :
|
4111
|
+
[];
|
4112
|
+
}
|
4113
|
+
},
|
4114
|
+
|
4115
|
+
"TAG": assertTagNameNoComments ?
|
4116
|
+
function( tag, context ) {
|
4117
|
+
if ( typeof context.getElementsByTagName !== strundefined ) {
|
4118
|
+
return context.getElementsByTagName( tag );
|
4119
|
+
}
|
4120
|
+
} :
|
4121
|
+
function( tag, context ) {
|
4122
|
+
var results = context.getElementsByTagName( tag );
|
4123
|
+
|
4124
|
+
// Filter out possible comments
|
4125
|
+
if ( tag === "*" ) {
|
4126
|
+
var elem,
|
4127
|
+
tmp = [],
|
4128
|
+
i = 0;
|
4129
|
+
|
4130
|
+
for ( ; (elem = results[i]); i++ ) {
|
4131
|
+
if ( elem.nodeType === 1 ) {
|
4132
|
+
tmp.push( elem );
|
4133
|
+
}
|
4134
|
+
}
|
4135
|
+
|
4136
|
+
return tmp;
|
4137
|
+
}
|
4138
|
+
return results;
|
4139
|
+
},
|
4140
|
+
|
4141
|
+
"NAME": assertUsableName && function( tag, context ) {
|
4142
|
+
if ( typeof context.getElementsByName !== strundefined ) {
|
4143
|
+
return context.getElementsByName( name );
|
4144
|
+
}
|
4145
|
+
},
|
4146
|
+
|
4147
|
+
"CLASS": assertUsableClassName && function( className, context, xml ) {
|
4148
|
+
if ( typeof context.getElementsByClassName !== strundefined && !xml ) {
|
4149
|
+
return context.getElementsByClassName( className );
|
4150
|
+
}
|
4151
|
+
}
|
4152
|
+
},
|
4153
|
+
|
4154
|
+
relative: {
|
4155
|
+
">": { dir: "parentNode", first: true },
|
4156
|
+
" ": { dir: "parentNode" },
|
4157
|
+
"+": { dir: "previousSibling", first: true },
|
4158
|
+
"~": { dir: "previousSibling" }
|
4159
|
+
},
|
4160
|
+
|
4161
|
+
preFilter: {
|
4162
|
+
"ATTR": function( match ) {
|
4163
|
+
match[1] = match[1].replace( rbackslash, "" );
|
4164
|
+
|
4165
|
+
// Move the given value to match[3] whether quoted or unquoted
|
4166
|
+
match[3] = ( match[4] || match[5] || "" ).replace( rbackslash, "" );
|
4167
|
+
|
4168
|
+
if ( match[2] === "~=" ) {
|
4169
|
+
match[3] = " " + match[3] + " ";
|
4170
|
+
}
|
4171
|
+
|
4172
|
+
return match.slice( 0, 4 );
|
4173
|
+
},
|
4174
|
+
|
4175
|
+
"CHILD": function( match ) {
|
4176
|
+
/* matches from matchExpr["CHILD"]
|
4177
|
+
1 type (only|nth|...)
|
4178
|
+
2 argument (even|odd|\d*|\d*n([+-]\d+)?|...)
|
4179
|
+
3 xn-component of xn+y argument ([+-]?\d*n|)
|
4180
|
+
4 sign of xn-component
|
4181
|
+
5 x of xn-component
|
4182
|
+
6 sign of y-component
|
4183
|
+
7 y of y-component
|
4184
|
+
*/
|
4185
|
+
match[1] = match[1].toLowerCase();
|
4186
|
+
|
4187
|
+
if ( match[1] === "nth" ) {
|
4188
|
+
// nth-child requires argument
|
4189
|
+
if ( !match[2] ) {
|
4190
|
+
Sizzle.error( match[0] );
|
4191
|
+
}
|
4192
|
+
|
4193
|
+
// numeric x and y parameters for Expr.filter.CHILD
|
4194
|
+
// remember that false/true cast respectively to 0/1
|
4195
|
+
match[3] = +( match[3] ? match[4] + (match[5] || 1) : 2 * ( match[2] === "even" || match[2] === "odd" ) );
|
4196
|
+
match[4] = +( ( match[6] + match[7] ) || match[2] === "odd" );
|
4197
|
+
|
4198
|
+
// other types prohibit arguments
|
4199
|
+
} else if ( match[2] ) {
|
4200
|
+
Sizzle.error( match[0] );
|
4201
|
+
}
|
4202
|
+
|
4203
|
+
return match;
|
4204
|
+
},
|
4205
|
+
|
4206
|
+
"PSEUDO": function( match ) {
|
4207
|
+
var unquoted, excess;
|
4208
|
+
if ( matchExpr["CHILD"].test( match[0] ) ) {
|
4209
|
+
return null;
|
4210
|
+
}
|
4211
|
+
|
4212
|
+
if ( match[3] ) {
|
4213
|
+
match[2] = match[3];
|
4214
|
+
} else if ( (unquoted = match[4]) ) {
|
4215
|
+
// Only check arguments that contain a pseudo
|
4216
|
+
if ( rpseudo.test(unquoted) &&
|
4217
|
+
// Get excess from tokenize (recursively)
|
4218
|
+
(excess = tokenize( unquoted, true )) &&
|
4219
|
+
// advance to the next closing parenthesis
|
4220
|
+
(excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) {
|
4221
|
+
|
4222
|
+
// excess is a negative index
|
4223
|
+
unquoted = unquoted.slice( 0, excess );
|
4224
|
+
match[0] = match[0].slice( 0, excess );
|
4225
|
+
}
|
4226
|
+
match[2] = unquoted;
|
4227
|
+
}
|
4228
|
+
|
4229
|
+
// Return only captures needed by the pseudo filter method (type and argument)
|
4230
|
+
return match.slice( 0, 3 );
|
4231
|
+
}
|
4232
|
+
},
|
4233
|
+
|
4234
|
+
filter: {
|
4235
|
+
"ID": assertGetIdNotName ?
|
4236
|
+
function( id ) {
|
4237
|
+
id = id.replace( rbackslash, "" );
|
4238
|
+
return function( elem ) {
|
4239
|
+
return elem.getAttribute("id") === id;
|
4240
|
+
};
|
4241
|
+
} :
|
4242
|
+
function( id ) {
|
4243
|
+
id = id.replace( rbackslash, "" );
|
4244
|
+
return function( elem ) {
|
4245
|
+
var node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode("id");
|
4246
|
+
return node && node.value === id;
|
4247
|
+
};
|
4248
|
+
},
|
4249
|
+
|
4250
|
+
"TAG": function( nodeName ) {
|
4251
|
+
if ( nodeName === "*" ) {
|
4252
|
+
return function() { return true; };
|
4253
|
+
}
|
4254
|
+
nodeName = nodeName.replace( rbackslash, "" ).toLowerCase();
|
4255
|
+
|
4256
|
+
return function( elem ) {
|
4257
|
+
return elem.nodeName && elem.nodeName.toLowerCase() === nodeName;
|
4258
|
+
};
|
4259
|
+
},
|
4260
|
+
|
4261
|
+
"CLASS": function( className ) {
|
4262
|
+
var pattern = classCache[ expando ][ className ];
|
4263
|
+
if ( !pattern ) {
|
4264
|
+
pattern = classCache( className, new RegExp("(^|" + whitespace + ")" + className + "(" + whitespace + "|$)") );
|
4265
|
+
}
|
4266
|
+
return function( elem ) {
|
4267
|
+
return pattern.test( elem.className || (typeof elem.getAttribute !== strundefined && elem.getAttribute("class")) || "" );
|
4268
|
+
};
|
4269
|
+
},
|
4270
|
+
|
4271
|
+
"ATTR": function( name, operator, check ) {
|
4272
|
+
return function( elem, context ) {
|
4273
|
+
var result = Sizzle.attr( elem, name );
|
4274
|
+
|
4275
|
+
if ( result == null ) {
|
4276
|
+
return operator === "!=";
|
4277
|
+
}
|
4278
|
+
if ( !operator ) {
|
4279
|
+
return true;
|
4280
|
+
}
|
4281
|
+
|
4282
|
+
result += "";
|
4283
|
+
|
4284
|
+
return operator === "=" ? result === check :
|
4285
|
+
operator === "!=" ? result !== check :
|
4286
|
+
operator === "^=" ? check && result.indexOf( check ) === 0 :
|
4287
|
+
operator === "*=" ? check && result.indexOf( check ) > -1 :
|
4288
|
+
operator === "$=" ? check && result.substr( result.length - check.length ) === check :
|
4289
|
+
operator === "~=" ? ( " " + result + " " ).indexOf( check ) > -1 :
|
4290
|
+
operator === "|=" ? result === check || result.substr( 0, check.length + 1 ) === check + "-" :
|
4291
|
+
false;
|
4292
|
+
};
|
4293
|
+
},
|
4294
|
+
|
4295
|
+
"CHILD": function( type, argument, first, last ) {
|
4296
|
+
|
4297
|
+
if ( type === "nth" ) {
|
4298
|
+
return function( elem ) {
|
4299
|
+
var node, diff,
|
4300
|
+
parent = elem.parentNode;
|
4301
|
+
|
4302
|
+
if ( first === 1 && last === 0 ) {
|
4303
|
+
return true;
|
4304
|
+
}
|
4305
|
+
|
4306
|
+
if ( parent ) {
|
4307
|
+
diff = 0;
|
4308
|
+
for ( node = parent.firstChild; node; node = node.nextSibling ) {
|
4309
|
+
if ( node.nodeType === 1 ) {
|
4310
|
+
diff++;
|
4311
|
+
if ( elem === node ) {
|
4312
|
+
break;
|
4313
|
+
}
|
4314
|
+
}
|
4315
|
+
}
|
4316
|
+
}
|
4317
|
+
|
4318
|
+
// Incorporate the offset (or cast to NaN), then check against cycle size
|
4319
|
+
diff -= last;
|
4320
|
+
return diff === first || ( diff % first === 0 && diff / first >= 0 );
|
4321
|
+
};
|
4322
|
+
}
|
4323
|
+
|
4324
|
+
return function( elem ) {
|
4325
|
+
var node = elem;
|
4326
|
+
|
4327
|
+
switch ( type ) {
|
4328
|
+
case "only":
|
4329
|
+
case "first":
|
4330
|
+
while ( (node = node.previousSibling) ) {
|
4331
|
+
if ( node.nodeType === 1 ) {
|
4332
|
+
return false;
|
4333
|
+
}
|
4334
|
+
}
|
4335
|
+
|
4336
|
+
if ( type === "first" ) {
|
4337
|
+
return true;
|
4338
|
+
}
|
4339
|
+
|
4340
|
+
node = elem;
|
4341
|
+
|
4342
|
+
/* falls through */
|
4343
|
+
case "last":
|
4344
|
+
while ( (node = node.nextSibling) ) {
|
4345
|
+
if ( node.nodeType === 1 ) {
|
4346
|
+
return false;
|
4347
|
+
}
|
4348
|
+
}
|
4349
|
+
|
4350
|
+
return true;
|
4351
|
+
}
|
4352
|
+
};
|
4353
|
+
},
|
4354
|
+
|
4355
|
+
"PSEUDO": function( pseudo, argument ) {
|
4356
|
+
// pseudo-class names are case-insensitive
|
4357
|
+
// http://www.w3.org/TR/selectors/#pseudo-classes
|
4358
|
+
// Prioritize by case sensitivity in case custom pseudos are added with uppercase letters
|
4359
|
+
// Remember that setFilters inherits from pseudos
|
4360
|
+
var args,
|
4361
|
+
fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||
|
4362
|
+
Sizzle.error( "unsupported pseudo: " + pseudo );
|
4363
|
+
|
4364
|
+
// The user may use createPseudo to indicate that
|
4365
|
+
// arguments are needed to create the filter function
|
4366
|
+
// just as Sizzle does
|
4367
|
+
if ( fn[ expando ] ) {
|
4368
|
+
return fn( argument );
|
4369
|
+
}
|
4370
|
+
|
4371
|
+
// But maintain support for old signatures
|
4372
|
+
if ( fn.length > 1 ) {
|
4373
|
+
args = [ pseudo, pseudo, "", argument ];
|
4374
|
+
return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?
|
4375
|
+
markFunction(function( seed, matches ) {
|
4376
|
+
var idx,
|
4377
|
+
matched = fn( seed, argument ),
|
4378
|
+
i = matched.length;
|
4379
|
+
while ( i-- ) {
|
4380
|
+
idx = indexOf.call( seed, matched[i] );
|
4381
|
+
seed[ idx ] = !( matches[ idx ] = matched[i] );
|
4382
|
+
}
|
4383
|
+
}) :
|
4384
|
+
function( elem ) {
|
4385
|
+
return fn( elem, 0, args );
|
4386
|
+
};
|
4387
|
+
}
|
4388
|
+
|
4389
|
+
return fn;
|
4390
|
+
}
|
4391
|
+
},
|
4392
|
+
|
4393
|
+
pseudos: {
|
4394
|
+
"not": markFunction(function( selector ) {
|
4395
|
+
// Trim the selector passed to compile
|
4396
|
+
// to avoid treating leading and trailing
|
4397
|
+
// spaces as combinators
|
4398
|
+
var input = [],
|
4399
|
+
results = [],
|
4400
|
+
matcher = compile( selector.replace( rtrim, "$1" ) );
|
4401
|
+
|
4402
|
+
return matcher[ expando ] ?
|
4403
|
+
markFunction(function( seed, matches, context, xml ) {
|
4404
|
+
var elem,
|
4405
|
+
unmatched = matcher( seed, null, xml, [] ),
|
4406
|
+
i = seed.length;
|
4407
|
+
|
4408
|
+
// Match elements unmatched by `matcher`
|
4409
|
+
while ( i-- ) {
|
4410
|
+
if ( (elem = unmatched[i]) ) {
|
4411
|
+
seed[i] = !(matches[i] = elem);
|
4412
|
+
}
|
4413
|
+
}
|
4414
|
+
}) :
|
4415
|
+
function( elem, context, xml ) {
|
4416
|
+
input[0] = elem;
|
4417
|
+
matcher( input, null, xml, results );
|
4418
|
+
return !results.pop();
|
4419
|
+
};
|
4420
|
+
}),
|
4421
|
+
|
4422
|
+
"has": markFunction(function( selector ) {
|
4423
|
+
return function( elem ) {
|
4424
|
+
return Sizzle( selector, elem ).length > 0;
|
4425
|
+
};
|
4426
|
+
}),
|
4427
|
+
|
4428
|
+
"contains": markFunction(function( text ) {
|
4429
|
+
return function( elem ) {
|
4430
|
+
return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1;
|
4431
|
+
};
|
4432
|
+
}),
|
4433
|
+
|
4434
|
+
"enabled": function( elem ) {
|
4435
|
+
return elem.disabled === false;
|
4436
|
+
},
|
4437
|
+
|
4438
|
+
"disabled": function( elem ) {
|
4439
|
+
return elem.disabled === true;
|
4440
|
+
},
|
4441
|
+
|
4442
|
+
"checked": function( elem ) {
|
4443
|
+
// In CSS3, :checked should return both checked and selected elements
|
4444
|
+
// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
|
4445
|
+
var nodeName = elem.nodeName.toLowerCase();
|
4446
|
+
return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected);
|
4447
|
+
},
|
4448
|
+
|
4449
|
+
"selected": function( elem ) {
|
4450
|
+
// Accessing this property makes selected-by-default
|
4451
|
+
// options in Safari work properly
|
4452
|
+
if ( elem.parentNode ) {
|
4453
|
+
elem.parentNode.selectedIndex;
|
4454
|
+
}
|
4455
|
+
|
4456
|
+
return elem.selected === true;
|
4457
|
+
},
|
4458
|
+
|
4459
|
+
"parent": function( elem ) {
|
4460
|
+
return !Expr.pseudos["empty"]( elem );
|
4461
|
+
},
|
4462
|
+
|
4463
|
+
"empty": function( elem ) {
|
4464
|
+
// http://www.w3.org/TR/selectors/#empty-pseudo
|
4465
|
+
// :empty is only affected by element nodes and content nodes(including text(3), cdata(4)),
|
4466
|
+
// not comment, processing instructions, or others
|
4467
|
+
// Thanks to Diego Perini for the nodeName shortcut
|
4468
|
+
// Greater than "@" means alpha characters (specifically not starting with "#" or "?")
|
4469
|
+
var nodeType;
|
4470
|
+
elem = elem.firstChild;
|
4471
|
+
while ( elem ) {
|
4472
|
+
if ( elem.nodeName > "@" || (nodeType = elem.nodeType) === 3 || nodeType === 4 ) {
|
4473
|
+
return false;
|
4474
|
+
}
|
4475
|
+
elem = elem.nextSibling;
|
4476
|
+
}
|
4477
|
+
return true;
|
4478
|
+
},
|
4479
|
+
|
4480
|
+
"header": function( elem ) {
|
4481
|
+
return rheader.test( elem.nodeName );
|
4482
|
+
},
|
4483
|
+
|
4484
|
+
"text": function( elem ) {
|
4485
|
+
var type, attr;
|
4486
|
+
// IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc)
|
4487
|
+
// use getAttribute instead to test this case
|
4488
|
+
return elem.nodeName.toLowerCase() === "input" &&
|
4489
|
+
(type = elem.type) === "text" &&
|
4490
|
+
( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === type );
|
4491
|
+
},
|
4492
|
+
|
4493
|
+
// Input types
|
4494
|
+
"radio": createInputPseudo("radio"),
|
4495
|
+
"checkbox": createInputPseudo("checkbox"),
|
4496
|
+
"file": createInputPseudo("file"),
|
4497
|
+
"password": createInputPseudo("password"),
|
4498
|
+
"image": createInputPseudo("image"),
|
4499
|
+
|
4500
|
+
"submit": createButtonPseudo("submit"),
|
4501
|
+
"reset": createButtonPseudo("reset"),
|
4502
|
+
|
4503
|
+
"button": function( elem ) {
|
4504
|
+
var name = elem.nodeName.toLowerCase();
|
4505
|
+
return name === "input" && elem.type === "button" || name === "button";
|
4506
|
+
},
|
4507
|
+
|
4508
|
+
"input": function( elem ) {
|
4509
|
+
return rinputs.test( elem.nodeName );
|
4510
|
+
},
|
4511
|
+
|
4512
|
+
"focus": function( elem ) {
|
4513
|
+
var doc = elem.ownerDocument;
|
4514
|
+
return elem === doc.activeElement && (!doc.hasFocus || doc.hasFocus()) && !!(elem.type || elem.href);
|
4515
|
+
},
|
4516
|
+
|
4517
|
+
"active": function( elem ) {
|
4518
|
+
return elem === elem.ownerDocument.activeElement;
|
4519
|
+
},
|
4520
|
+
|
4521
|
+
// Positional types
|
4522
|
+
"first": createPositionalPseudo(function( matchIndexes, length, argument ) {
|
4523
|
+
return [ 0 ];
|
4524
|
+
}),
|
4525
|
+
|
4526
|
+
"last": createPositionalPseudo(function( matchIndexes, length, argument ) {
|
4527
|
+
return [ length - 1 ];
|
4528
|
+
}),
|
4529
|
+
|
4530
|
+
"eq": createPositionalPseudo(function( matchIndexes, length, argument ) {
|
4531
|
+
return [ argument < 0 ? argument + length : argument ];
|
4532
|
+
}),
|
4533
|
+
|
4534
|
+
"even": createPositionalPseudo(function( matchIndexes, length, argument ) {
|
4535
|
+
for ( var i = 0; i < length; i += 2 ) {
|
4536
|
+
matchIndexes.push( i );
|
4537
|
+
}
|
4538
|
+
return matchIndexes;
|
4539
|
+
}),
|
4540
|
+
|
4541
|
+
"odd": createPositionalPseudo(function( matchIndexes, length, argument ) {
|
4542
|
+
for ( var i = 1; i < length; i += 2 ) {
|
4543
|
+
matchIndexes.push( i );
|
4544
|
+
}
|
4545
|
+
return matchIndexes;
|
4546
|
+
}),
|
4547
|
+
|
4548
|
+
"lt": createPositionalPseudo(function( matchIndexes, length, argument ) {
|
4549
|
+
for ( var i = argument < 0 ? argument + length : argument; --i >= 0; ) {
|
4550
|
+
matchIndexes.push( i );
|
4551
|
+
}
|
4552
|
+
return matchIndexes;
|
4553
|
+
}),
|
4554
|
+
|
4555
|
+
"gt": createPositionalPseudo(function( matchIndexes, length, argument ) {
|
4556
|
+
for ( var i = argument < 0 ? argument + length : argument; ++i < length; ) {
|
4557
|
+
matchIndexes.push( i );
|
4558
|
+
}
|
4559
|
+
return matchIndexes;
|
4560
|
+
})
|
4561
|
+
}
|
4562
|
+
};
|
4563
|
+
|
4564
|
+
function siblingCheck( a, b, ret ) {
|
4565
|
+
if ( a === b ) {
|
4566
|
+
return ret;
|
4567
|
+
}
|
4568
|
+
|
4569
|
+
var cur = a.nextSibling;
|
4570
|
+
|
4571
|
+
while ( cur ) {
|
4572
|
+
if ( cur === b ) {
|
4573
|
+
return -1;
|
4574
|
+
}
|
4575
|
+
|
4576
|
+
cur = cur.nextSibling;
|
4577
|
+
}
|
4578
|
+
|
4579
|
+
return 1;
|
4580
|
+
}
|
4581
|
+
|
4582
|
+
sortOrder = docElem.compareDocumentPosition ?
|
4583
|
+
function( a, b ) {
|
4584
|
+
if ( a === b ) {
|
4585
|
+
hasDuplicate = true;
|
4586
|
+
return 0;
|
4587
|
+
}
|
4588
|
+
|
4589
|
+
return ( !a.compareDocumentPosition || !b.compareDocumentPosition ?
|
4590
|
+
a.compareDocumentPosition :
|
4591
|
+
a.compareDocumentPosition(b) & 4
|
4592
|
+
) ? -1 : 1;
|
4593
|
+
} :
|
4594
|
+
function( a, b ) {
|
4595
|
+
// The nodes are identical, we can exit early
|
4596
|
+
if ( a === b ) {
|
4597
|
+
hasDuplicate = true;
|
4598
|
+
return 0;
|
4599
|
+
|
4600
|
+
// Fallback to using sourceIndex (in IE) if it's available on both nodes
|
4601
|
+
} else if ( a.sourceIndex && b.sourceIndex ) {
|
4602
|
+
return a.sourceIndex - b.sourceIndex;
|
4603
|
+
}
|
4604
|
+
|
4605
|
+
var al, bl,
|
4606
|
+
ap = [],
|
4607
|
+
bp = [],
|
4608
|
+
aup = a.parentNode,
|
4609
|
+
bup = b.parentNode,
|
4610
|
+
cur = aup;
|
4611
|
+
|
4612
|
+
// If the nodes are siblings (or identical) we can do a quick check
|
4613
|
+
if ( aup === bup ) {
|
4614
|
+
return siblingCheck( a, b );
|
4615
|
+
|
4616
|
+
// If no parents were found then the nodes are disconnected
|
4617
|
+
} else if ( !aup ) {
|
4618
|
+
return -1;
|
4619
|
+
|
4620
|
+
} else if ( !bup ) {
|
4621
|
+
return 1;
|
4622
|
+
}
|
4623
|
+
|
4624
|
+
// Otherwise they're somewhere else in the tree so we need
|
4625
|
+
// to build up a full list of the parentNodes for comparison
|
4626
|
+
while ( cur ) {
|
4627
|
+
ap.unshift( cur );
|
4628
|
+
cur = cur.parentNode;
|
4629
|
+
}
|
4630
|
+
|
4631
|
+
cur = bup;
|
4632
|
+
|
4633
|
+
while ( cur ) {
|
4634
|
+
bp.unshift( cur );
|
4635
|
+
cur = cur.parentNode;
|
4636
|
+
}
|
4637
|
+
|
4638
|
+
al = ap.length;
|
4639
|
+
bl = bp.length;
|
4640
|
+
|
4641
|
+
// Start walking down the tree looking for a discrepancy
|
4642
|
+
for ( var i = 0; i < al && i < bl; i++ ) {
|
4643
|
+
if ( ap[i] !== bp[i] ) {
|
4644
|
+
return siblingCheck( ap[i], bp[i] );
|
4645
|
+
}
|
4646
|
+
}
|
4647
|
+
|
4648
|
+
// We ended someplace up the tree so do a sibling check
|
4649
|
+
return i === al ?
|
4650
|
+
siblingCheck( a, bp[i], -1 ) :
|
4651
|
+
siblingCheck( ap[i], b, 1 );
|
4652
|
+
};
|
4653
|
+
|
4654
|
+
// Always assume the presence of duplicates if sort doesn't
|
4655
|
+
// pass them to our comparison function (as in Google Chrome).
|
4656
|
+
[0, 0].sort( sortOrder );
|
4657
|
+
baseHasDuplicate = !hasDuplicate;
|
4658
|
+
|
4659
|
+
// Document sorting and removing duplicates
|
4660
|
+
Sizzle.uniqueSort = function( results ) {
|
4661
|
+
var elem,
|
4662
|
+
i = 1;
|
4663
|
+
|
4664
|
+
hasDuplicate = baseHasDuplicate;
|
4665
|
+
results.sort( sortOrder );
|
4666
|
+
|
4667
|
+
if ( hasDuplicate ) {
|
4668
|
+
for ( ; (elem = results[i]); i++ ) {
|
4669
|
+
if ( elem === results[ i - 1 ] ) {
|
4670
|
+
results.splice( i--, 1 );
|
4671
|
+
}
|
4672
|
+
}
|
4673
|
+
}
|
4674
|
+
|
4675
|
+
return results;
|
4676
|
+
};
|
4677
|
+
|
4678
|
+
Sizzle.error = function( msg ) {
|
4679
|
+
throw new Error( "Syntax error, unrecognized expression: " + msg );
|
4680
|
+
};
|
4681
|
+
|
4682
|
+
function tokenize( selector, parseOnly ) {
|
4683
|
+
var matched, match, tokens, type, soFar, groups, preFilters,
|
4684
|
+
cached = tokenCache[ expando ][ selector ];
|
4685
|
+
|
4686
|
+
if ( cached ) {
|
4687
|
+
return parseOnly ? 0 : cached.slice( 0 );
|
4688
|
+
}
|
4689
|
+
|
4690
|
+
soFar = selector;
|
4691
|
+
groups = [];
|
4692
|
+
preFilters = Expr.preFilter;
|
4693
|
+
|
4694
|
+
while ( soFar ) {
|
4695
|
+
|
4696
|
+
// Comma and first run
|
4697
|
+
if ( !matched || (match = rcomma.exec( soFar )) ) {
|
4698
|
+
if ( match ) {
|
4699
|
+
soFar = soFar.slice( match[0].length );
|
4700
|
+
}
|
4701
|
+
groups.push( tokens = [] );
|
4702
|
+
}
|
4703
|
+
|
4704
|
+
matched = false;
|
4705
|
+
|
4706
|
+
// Combinators
|
4707
|
+
if ( (match = rcombinators.exec( soFar )) ) {
|
4708
|
+
tokens.push( matched = new Token( match.shift() ) );
|
4709
|
+
soFar = soFar.slice( matched.length );
|
4710
|
+
|
4711
|
+
// Cast descendant combinators to space
|
4712
|
+
matched.type = match[0].replace( rtrim, " " );
|
4713
|
+
}
|
4714
|
+
|
4715
|
+
// Filters
|
4716
|
+
for ( type in Expr.filter ) {
|
4717
|
+
if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||
|
4718
|
+
// The last two arguments here are (context, xml) for backCompat
|
4719
|
+
(match = preFilters[ type ]( match, document, true ))) ) {
|
4720
|
+
|
4721
|
+
tokens.push( matched = new Token( match.shift() ) );
|
4722
|
+
soFar = soFar.slice( matched.length );
|
4723
|
+
matched.type = type;
|
4724
|
+
matched.matches = match;
|
4725
|
+
}
|
4726
|
+
}
|
4727
|
+
|
4728
|
+
if ( !matched ) {
|
4729
|
+
break;
|
4730
|
+
}
|
4731
|
+
}
|
4732
|
+
|
4733
|
+
// Return the length of the invalid excess
|
4734
|
+
// if we're just parsing
|
4735
|
+
// Otherwise, throw an error or return tokens
|
4736
|
+
return parseOnly ?
|
4737
|
+
soFar.length :
|
4738
|
+
soFar ?
|
4739
|
+
Sizzle.error( selector ) :
|
4740
|
+
// Cache the tokens
|
4741
|
+
tokenCache( selector, groups ).slice( 0 );
|
4742
|
+
}
|
4743
|
+
|
4744
|
+
function addCombinator( matcher, combinator, base ) {
|
4745
|
+
var dir = combinator.dir,
|
4746
|
+
checkNonElements = base && combinator.dir === "parentNode",
|
4747
|
+
doneName = done++;
|
4748
|
+
|
4749
|
+
return combinator.first ?
|
4750
|
+
// Check against closest ancestor/preceding element
|
4751
|
+
function( elem, context, xml ) {
|
4752
|
+
while ( (elem = elem[ dir ]) ) {
|
4753
|
+
if ( checkNonElements || elem.nodeType === 1 ) {
|
4754
|
+
return matcher( elem, context, xml );
|
4755
|
+
}
|
4756
|
+
}
|
4757
|
+
} :
|
4758
|
+
|
4759
|
+
// Check against all ancestor/preceding elements
|
4760
|
+
function( elem, context, xml ) {
|
4761
|
+
// We can't set arbitrary data on XML nodes, so they don't benefit from dir caching
|
4762
|
+
if ( !xml ) {
|
4763
|
+
var cache,
|
4764
|
+
dirkey = dirruns + " " + doneName + " ",
|
4765
|
+
cachedkey = dirkey + cachedruns;
|
4766
|
+
while ( (elem = elem[ dir ]) ) {
|
4767
|
+
if ( checkNonElements || elem.nodeType === 1 ) {
|
4768
|
+
if ( (cache = elem[ expando ]) === cachedkey ) {
|
4769
|
+
return elem.sizset;
|
4770
|
+
} else if ( typeof cache === "string" && cache.indexOf(dirkey) === 0 ) {
|
4771
|
+
if ( elem.sizset ) {
|
4772
|
+
return elem;
|
4773
|
+
}
|
4774
|
+
} else {
|
4775
|
+
elem[ expando ] = cachedkey;
|
4776
|
+
if ( matcher( elem, context, xml ) ) {
|
4777
|
+
elem.sizset = true;
|
4778
|
+
return elem;
|
4779
|
+
}
|
4780
|
+
elem.sizset = false;
|
4781
|
+
}
|
4782
|
+
}
|
4783
|
+
}
|
4784
|
+
} else {
|
4785
|
+
while ( (elem = elem[ dir ]) ) {
|
4786
|
+
if ( checkNonElements || elem.nodeType === 1 ) {
|
4787
|
+
if ( matcher( elem, context, xml ) ) {
|
4788
|
+
return elem;
|
4789
|
+
}
|
4790
|
+
}
|
4791
|
+
}
|
4792
|
+
}
|
4793
|
+
};
|
4794
|
+
}
|
4795
|
+
|
4796
|
+
function elementMatcher( matchers ) {
|
4797
|
+
return matchers.length > 1 ?
|
4798
|
+
function( elem, context, xml ) {
|
4799
|
+
var i = matchers.length;
|
4800
|
+
while ( i-- ) {
|
4801
|
+
if ( !matchers[i]( elem, context, xml ) ) {
|
4802
|
+
return false;
|
4803
|
+
}
|
4804
|
+
}
|
4805
|
+
return true;
|
4806
|
+
} :
|
4807
|
+
matchers[0];
|
4808
|
+
}
|
4809
|
+
|
4810
|
+
function condense( unmatched, map, filter, context, xml ) {
|
4811
|
+
var elem,
|
4812
|
+
newUnmatched = [],
|
4813
|
+
i = 0,
|
4814
|
+
len = unmatched.length,
|
4815
|
+
mapped = map != null;
|
4816
|
+
|
4817
|
+
for ( ; i < len; i++ ) {
|
4818
|
+
if ( (elem = unmatched[i]) ) {
|
4819
|
+
if ( !filter || filter( elem, context, xml ) ) {
|
4820
|
+
newUnmatched.push( elem );
|
4821
|
+
if ( mapped ) {
|
4822
|
+
map.push( i );
|
4823
|
+
}
|
4824
|
+
}
|
4825
|
+
}
|
4826
|
+
}
|
4827
|
+
|
4828
|
+
return newUnmatched;
|
4829
|
+
}
|
4830
|
+
|
4831
|
+
function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
|
4832
|
+
if ( postFilter && !postFilter[ expando ] ) {
|
4833
|
+
postFilter = setMatcher( postFilter );
|
4834
|
+
}
|
4835
|
+
if ( postFinder && !postFinder[ expando ] ) {
|
4836
|
+
postFinder = setMatcher( postFinder, postSelector );
|
4837
|
+
}
|
4838
|
+
return markFunction(function( seed, results, context, xml ) {
|
4839
|
+
// Positional selectors apply to seed elements, so it is invalid to follow them with relative ones
|
4840
|
+
if ( seed && postFinder ) {
|
4841
|
+
return;
|
4842
|
+
}
|
4843
|
+
|
4844
|
+
var i, elem, postFilterIn,
|
4845
|
+
preMap = [],
|
4846
|
+
postMap = [],
|
4847
|
+
preexisting = results.length,
|
4848
|
+
|
4849
|
+
// Get initial elements from seed or context
|
4850
|
+
elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [], seed ),
|
4851
|
+
|
4852
|
+
// Prefilter to get matcher input, preserving a map for seed-results synchronization
|
4853
|
+
matcherIn = preFilter && ( seed || !selector ) ?
|
4854
|
+
condense( elems, preMap, preFilter, context, xml ) :
|
4855
|
+
elems,
|
4856
|
+
|
4857
|
+
matcherOut = matcher ?
|
4858
|
+
// If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,
|
4859
|
+
postFinder || ( seed ? preFilter : preexisting || postFilter ) ?
|
4860
|
+
|
4861
|
+
// ...intermediate processing is necessary
|
4862
|
+
[] :
|
4863
|
+
|
4864
|
+
// ...otherwise use results directly
|
4865
|
+
results :
|
4866
|
+
matcherIn;
|
4867
|
+
|
4868
|
+
// Find primary matches
|
4869
|
+
if ( matcher ) {
|
4870
|
+
matcher( matcherIn, matcherOut, context, xml );
|
4871
|
+
}
|
4872
|
+
|
4873
|
+
// Apply postFilter
|
4874
|
+
if ( postFilter ) {
|
4875
|
+
postFilterIn = condense( matcherOut, postMap );
|
4876
|
+
postFilter( postFilterIn, [], context, xml );
|
4877
|
+
|
4878
|
+
// Un-match failing elements by moving them back to matcherIn
|
4879
|
+
i = postFilterIn.length;
|
4880
|
+
while ( i-- ) {
|
4881
|
+
if ( (elem = postFilterIn[i]) ) {
|
4882
|
+
matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem);
|
4883
|
+
}
|
4884
|
+
}
|
4885
|
+
}
|
4886
|
+
|
4887
|
+
// Keep seed and results synchronized
|
4888
|
+
if ( seed ) {
|
4889
|
+
// Ignore postFinder because it can't coexist with seed
|
4890
|
+
i = preFilter && matcherOut.length;
|
4891
|
+
while ( i-- ) {
|
4892
|
+
if ( (elem = matcherOut[i]) ) {
|
4893
|
+
seed[ preMap[i] ] = !(results[ preMap[i] ] = elem);
|
4894
|
+
}
|
4895
|
+
}
|
4896
|
+
} else {
|
4897
|
+
matcherOut = condense(
|
4898
|
+
matcherOut === results ?
|
4899
|
+
matcherOut.splice( preexisting, matcherOut.length ) :
|
4900
|
+
matcherOut
|
4901
|
+
);
|
4902
|
+
if ( postFinder ) {
|
4903
|
+
postFinder( null, results, matcherOut, xml );
|
4904
|
+
} else {
|
4905
|
+
push.apply( results, matcherOut );
|
4906
|
+
}
|
4907
|
+
}
|
4908
|
+
});
|
4909
|
+
}
|
4910
|
+
|
4911
|
+
function matcherFromTokens( tokens ) {
|
4912
|
+
var checkContext, matcher, j,
|
4913
|
+
len = tokens.length,
|
4914
|
+
leadingRelative = Expr.relative[ tokens[0].type ],
|
4915
|
+
implicitRelative = leadingRelative || Expr.relative[" "],
|
4916
|
+
i = leadingRelative ? 1 : 0,
|
4917
|
+
|
4918
|
+
// The foundational matcher ensures that elements are reachable from top-level context(s)
|
4919
|
+
matchContext = addCombinator( function( elem ) {
|
4920
|
+
return elem === checkContext;
|
4921
|
+
}, implicitRelative, true ),
|
4922
|
+
matchAnyContext = addCombinator( function( elem ) {
|
4923
|
+
return indexOf.call( checkContext, elem ) > -1;
|
4924
|
+
}, implicitRelative, true ),
|
4925
|
+
matchers = [ function( elem, context, xml ) {
|
4926
|
+
return ( !leadingRelative && ( xml || context !== outermostContext ) ) || (
|
4927
|
+
(checkContext = context).nodeType ?
|
4928
|
+
matchContext( elem, context, xml ) :
|
4929
|
+
matchAnyContext( elem, context, xml ) );
|
4930
|
+
} ];
|
4931
|
+
|
4932
|
+
for ( ; i < len; i++ ) {
|
4933
|
+
if ( (matcher = Expr.relative[ tokens[i].type ]) ) {
|
4934
|
+
matchers = [ addCombinator( elementMatcher( matchers ), matcher ) ];
|
4935
|
+
} else {
|
4936
|
+
// The concatenated values are (context, xml) for backCompat
|
4937
|
+
matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches );
|
4938
|
+
|
4939
|
+
// Return special upon seeing a positional matcher
|
4940
|
+
if ( matcher[ expando ] ) {
|
4941
|
+
// Find the next relative operator (if any) for proper handling
|
4942
|
+
j = ++i;
|
4943
|
+
for ( ; j < len; j++ ) {
|
4944
|
+
if ( Expr.relative[ tokens[j].type ] ) {
|
4945
|
+
break;
|
4946
|
+
}
|
4947
|
+
}
|
4948
|
+
return setMatcher(
|
4949
|
+
i > 1 && elementMatcher( matchers ),
|
4950
|
+
i > 1 && tokens.slice( 0, i - 1 ).join("").replace( rtrim, "$1" ),
|
4951
|
+
matcher,
|
4952
|
+
i < j && matcherFromTokens( tokens.slice( i, j ) ),
|
4953
|
+
j < len && matcherFromTokens( (tokens = tokens.slice( j )) ),
|
4954
|
+
j < len && tokens.join("")
|
4955
|
+
);
|
4956
|
+
}
|
4957
|
+
matchers.push( matcher );
|
4958
|
+
}
|
4959
|
+
}
|
4960
|
+
|
4961
|
+
return elementMatcher( matchers );
|
4962
|
+
}
|
4963
|
+
|
4964
|
+
function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
|
4965
|
+
var bySet = setMatchers.length > 0,
|
4966
|
+
byElement = elementMatchers.length > 0,
|
4967
|
+
superMatcher = function( seed, context, xml, results, expandContext ) {
|
4968
|
+
var elem, j, matcher,
|
4969
|
+
setMatched = [],
|
4970
|
+
matchedCount = 0,
|
4971
|
+
i = "0",
|
4972
|
+
unmatched = seed && [],
|
4973
|
+
outermost = expandContext != null,
|
4974
|
+
contextBackup = outermostContext,
|
4975
|
+
// We must always have either seed elements or context
|
4976
|
+
elems = seed || byElement && Expr.find["TAG"]( "*", expandContext && context.parentNode || context ),
|
4977
|
+
// Nested matchers should use non-integer dirruns
|
4978
|
+
dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.E);
|
4979
|
+
|
4980
|
+
if ( outermost ) {
|
4981
|
+
outermostContext = context !== document && context;
|
4982
|
+
cachedruns = superMatcher.el;
|
4983
|
+
}
|
4984
|
+
|
4985
|
+
// Add elements passing elementMatchers directly to results
|
4986
|
+
for ( ; (elem = elems[i]) != null; i++ ) {
|
4987
|
+
if ( byElement && elem ) {
|
4988
|
+
for ( j = 0; (matcher = elementMatchers[j]); j++ ) {
|
4989
|
+
if ( matcher( elem, context, xml ) ) {
|
4990
|
+
results.push( elem );
|
4991
|
+
break;
|
4992
|
+
}
|
4993
|
+
}
|
4994
|
+
if ( outermost ) {
|
4995
|
+
dirruns = dirrunsUnique;
|
4996
|
+
cachedruns = ++superMatcher.el;
|
4997
|
+
}
|
4998
|
+
}
|
4999
|
+
|
5000
|
+
// Track unmatched elements for set filters
|
5001
|
+
if ( bySet ) {
|
5002
|
+
// They will have gone through all possible matchers
|
5003
|
+
if ( (elem = !matcher && elem) ) {
|
5004
|
+
matchedCount--;
|
5005
|
+
}
|
5006
|
+
|
5007
|
+
// Lengthen the array for every element, matched or not
|
5008
|
+
if ( seed ) {
|
5009
|
+
unmatched.push( elem );
|
5010
|
+
}
|
5011
|
+
}
|
5012
|
+
}
|
5013
|
+
|
5014
|
+
// Apply set filters to unmatched elements
|
5015
|
+
matchedCount += i;
|
5016
|
+
if ( bySet && i !== matchedCount ) {
|
5017
|
+
for ( j = 0; (matcher = setMatchers[j]); j++ ) {
|
5018
|
+
matcher( unmatched, setMatched, context, xml );
|
5019
|
+
}
|
5020
|
+
|
5021
|
+
if ( seed ) {
|
5022
|
+
// Reintegrate element matches to eliminate the need for sorting
|
5023
|
+
if ( matchedCount > 0 ) {
|
5024
|
+
while ( i-- ) {
|
5025
|
+
if ( !(unmatched[i] || setMatched[i]) ) {
|
5026
|
+
setMatched[i] = pop.call( results );
|
5027
|
+
}
|
5028
|
+
}
|
5029
|
+
}
|
5030
|
+
|
5031
|
+
// Discard index placeholder values to get only actual matches
|
5032
|
+
setMatched = condense( setMatched );
|
5033
|
+
}
|
5034
|
+
|
5035
|
+
// Add matches to results
|
5036
|
+
push.apply( results, setMatched );
|
5037
|
+
|
5038
|
+
// Seedless set matches succeeding multiple successful matchers stipulate sorting
|
5039
|
+
if ( outermost && !seed && setMatched.length > 0 &&
|
5040
|
+
( matchedCount + setMatchers.length ) > 1 ) {
|
5041
|
+
|
5042
|
+
Sizzle.uniqueSort( results );
|
5043
|
+
}
|
5044
|
+
}
|
5045
|
+
|
5046
|
+
// Override manipulation of globals by nested matchers
|
5047
|
+
if ( outermost ) {
|
5048
|
+
dirruns = dirrunsUnique;
|
5049
|
+
outermostContext = contextBackup;
|
5050
|
+
}
|
5051
|
+
|
5052
|
+
return unmatched;
|
5053
|
+
};
|
5054
|
+
|
5055
|
+
superMatcher.el = 0;
|
5056
|
+
return bySet ?
|
5057
|
+
markFunction( superMatcher ) :
|
5058
|
+
superMatcher;
|
5059
|
+
}
|
5060
|
+
|
5061
|
+
compile = Sizzle.compile = function( selector, group /* Internal Use Only */ ) {
|
5062
|
+
var i,
|
5063
|
+
setMatchers = [],
|
5064
|
+
elementMatchers = [],
|
5065
|
+
cached = compilerCache[ expando ][ selector ];
|
5066
|
+
|
5067
|
+
if ( !cached ) {
|
5068
|
+
// Generate a function of recursive functions that can be used to check each element
|
5069
|
+
if ( !group ) {
|
5070
|
+
group = tokenize( selector );
|
5071
|
+
}
|
5072
|
+
i = group.length;
|
5073
|
+
while ( i-- ) {
|
5074
|
+
cached = matcherFromTokens( group[i] );
|
5075
|
+
if ( cached[ expando ] ) {
|
5076
|
+
setMatchers.push( cached );
|
5077
|
+
} else {
|
5078
|
+
elementMatchers.push( cached );
|
5079
|
+
}
|
5080
|
+
}
|
5081
|
+
|
5082
|
+
// Cache the compiled function
|
5083
|
+
cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) );
|
5084
|
+
}
|
5085
|
+
return cached;
|
5086
|
+
};
|
5087
|
+
|
5088
|
+
function multipleContexts( selector, contexts, results, seed ) {
|
5089
|
+
var i = 0,
|
5090
|
+
len = contexts.length;
|
5091
|
+
for ( ; i < len; i++ ) {
|
5092
|
+
Sizzle( selector, contexts[i], results, seed );
|
5093
|
+
}
|
5094
|
+
return results;
|
5095
|
+
}
|
5096
|
+
|
5097
|
+
function select( selector, context, results, seed, xml ) {
|
5098
|
+
var i, tokens, token, type, find,
|
5099
|
+
match = tokenize( selector ),
|
5100
|
+
j = match.length;
|
5101
|
+
|
5102
|
+
if ( !seed ) {
|
5103
|
+
// Try to minimize operations if there is only one group
|
5104
|
+
if ( match.length === 1 ) {
|
5105
|
+
|
5106
|
+
// Take a shortcut and set the context if the root selector is an ID
|
5107
|
+
tokens = match[0] = match[0].slice( 0 );
|
5108
|
+
if ( tokens.length > 2 && (token = tokens[0]).type === "ID" &&
|
5109
|
+
context.nodeType === 9 && !xml &&
|
5110
|
+
Expr.relative[ tokens[1].type ] ) {
|
5111
|
+
|
5112
|
+
context = Expr.find["ID"]( token.matches[0].replace( rbackslash, "" ), context, xml )[0];
|
5113
|
+
if ( !context ) {
|
5114
|
+
return results;
|
5115
|
+
}
|
5116
|
+
|
5117
|
+
selector = selector.slice( tokens.shift().length );
|
5118
|
+
}
|
5119
|
+
|
5120
|
+
// Fetch a seed set for right-to-left matching
|
5121
|
+
for ( i = matchExpr["POS"].test( selector ) ? -1 : tokens.length - 1; i >= 0; i-- ) {
|
5122
|
+
token = tokens[i];
|
5123
|
+
|
5124
|
+
// Abort if we hit a combinator
|
5125
|
+
if ( Expr.relative[ (type = token.type) ] ) {
|
5126
|
+
break;
|
5127
|
+
}
|
5128
|
+
if ( (find = Expr.find[ type ]) ) {
|
5129
|
+
// Search, expanding context for leading sibling combinators
|
5130
|
+
if ( (seed = find(
|
5131
|
+
token.matches[0].replace( rbackslash, "" ),
|
5132
|
+
rsibling.test( tokens[0].type ) && context.parentNode || context,
|
5133
|
+
xml
|
5134
|
+
)) ) {
|
5135
|
+
|
5136
|
+
// If seed is empty or no tokens remain, we can return early
|
5137
|
+
tokens.splice( i, 1 );
|
5138
|
+
selector = seed.length && tokens.join("");
|
5139
|
+
if ( !selector ) {
|
5140
|
+
push.apply( results, slice.call( seed, 0 ) );
|
5141
|
+
return results;
|
5142
|
+
}
|
5143
|
+
|
5144
|
+
break;
|
5145
|
+
}
|
5146
|
+
}
|
5147
|
+
}
|
5148
|
+
}
|
5149
|
+
}
|
5150
|
+
|
5151
|
+
// Compile and execute a filtering function
|
5152
|
+
// Provide `match` to avoid retokenization if we modified the selector above
|
5153
|
+
compile( selector, match )(
|
5154
|
+
seed,
|
5155
|
+
context,
|
5156
|
+
xml,
|
5157
|
+
results,
|
5158
|
+
rsibling.test( selector )
|
5159
|
+
);
|
5160
|
+
return results;
|
5161
|
+
}
|
5162
|
+
|
5163
|
+
if ( document.querySelectorAll ) {
|
5164
|
+
(function() {
|
5165
|
+
var disconnectedMatch,
|
5166
|
+
oldSelect = select,
|
5167
|
+
rescape = /'|\\/g,
|
5168
|
+
rattributeQuotes = /\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,
|
5169
|
+
|
5170
|
+
// qSa(:focus) reports false when true (Chrome 21),
|
5171
|
+
// A support test would require too much code (would include document ready)
|
5172
|
+
rbuggyQSA = [":focus"],
|
5173
|
+
|
5174
|
+
// matchesSelector(:focus) reports false when true (Chrome 21),
|
5175
|
+
// matchesSelector(:active) reports false when true (IE9/Opera 11.5)
|
5176
|
+
// A support test would require too much code (would include document ready)
|
5177
|
+
// just skip matchesSelector for :active
|
5178
|
+
rbuggyMatches = [ ":active", ":focus" ],
|
5179
|
+
matches = docElem.matchesSelector ||
|
5180
|
+
docElem.mozMatchesSelector ||
|
5181
|
+
docElem.webkitMatchesSelector ||
|
5182
|
+
docElem.oMatchesSelector ||
|
5183
|
+
docElem.msMatchesSelector;
|
5184
|
+
|
5185
|
+
// Build QSA regex
|
5186
|
+
// Regex strategy adopted from Diego Perini
|
5187
|
+
assert(function( div ) {
|
5188
|
+
// Select is set to empty string on purpose
|
5189
|
+
// This is to test IE's treatment of not explictly
|
5190
|
+
// setting a boolean content attribute,
|
5191
|
+
// since its presence should be enough
|
5192
|
+
// http://bugs.jquery.com/ticket/12359
|
5193
|
+
div.innerHTML = "<select><option selected=''></option></select>";
|
5194
|
+
|
5195
|
+
// IE8 - Some boolean attributes are not treated correctly
|
5196
|
+
if ( !div.querySelectorAll("[selected]").length ) {
|
5197
|
+
rbuggyQSA.push( "\\[" + whitespace + "*(?:checked|disabled|ismap|multiple|readonly|selected|value)" );
|
5198
|
+
}
|
5199
|
+
|
5200
|
+
// Webkit/Opera - :checked should return selected option elements
|
5201
|
+
// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
|
5202
|
+
// IE8 throws error here (do not put tests after this one)
|
5203
|
+
if ( !div.querySelectorAll(":checked").length ) {
|
5204
|
+
rbuggyQSA.push(":checked");
|
5205
|
+
}
|
5206
|
+
});
|
5207
|
+
|
5208
|
+
assert(function( div ) {
|
5209
|
+
|
5210
|
+
// Opera 10-12/IE9 - ^= $= *= and empty values
|
5211
|
+
// Should not select anything
|
5212
|
+
div.innerHTML = "<p test=''></p>";
|
5213
|
+
if ( div.querySelectorAll("[test^='']").length ) {
|
5214
|
+
rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:\"\"|'')" );
|
5215
|
+
}
|
5216
|
+
|
5217
|
+
// FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)
|
5218
|
+
// IE8 throws error here (do not put tests after this one)
|
5219
|
+
div.innerHTML = "<input type='hidden'/>";
|
5220
|
+
if ( !div.querySelectorAll(":enabled").length ) {
|
5221
|
+
rbuggyQSA.push(":enabled", ":disabled");
|
5222
|
+
}
|
5223
|
+
});
|
5224
|
+
|
5225
|
+
// rbuggyQSA always contains :focus, so no need for a length check
|
5226
|
+
rbuggyQSA = /* rbuggyQSA.length && */ new RegExp( rbuggyQSA.join("|") );
|
5227
|
+
|
5228
|
+
select = function( selector, context, results, seed, xml ) {
|
5229
|
+
// Only use querySelectorAll when not filtering,
|
5230
|
+
// when this is not xml,
|
5231
|
+
// and when no QSA bugs apply
|
5232
|
+
if ( !seed && !xml && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) {
|
5233
|
+
var groups, i,
|
5234
|
+
old = true,
|
5235
|
+
nid = expando,
|
5236
|
+
newContext = context,
|
5237
|
+
newSelector = context.nodeType === 9 && selector;
|
5238
|
+
|
5239
|
+
// qSA works strangely on Element-rooted queries
|
5240
|
+
// We can work around this by specifying an extra ID on the root
|
5241
|
+
// and working up from there (Thanks to Andrew Dupont for the technique)
|
5242
|
+
// IE 8 doesn't work on object elements
|
5243
|
+
if ( context.nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) {
|
5244
|
+
groups = tokenize( selector );
|
5245
|
+
|
5246
|
+
if ( (old = context.getAttribute("id")) ) {
|
5247
|
+
nid = old.replace( rescape, "\\$&" );
|
5248
|
+
} else {
|
5249
|
+
context.setAttribute( "id", nid );
|
5250
|
+
}
|
5251
|
+
nid = "[id='" + nid + "'] ";
|
5252
|
+
|
5253
|
+
i = groups.length;
|
5254
|
+
while ( i-- ) {
|
5255
|
+
groups[i] = nid + groups[i].join("");
|
5256
|
+
}
|
5257
|
+
newContext = rsibling.test( selector ) && context.parentNode || context;
|
5258
|
+
newSelector = groups.join(",");
|
5259
|
+
}
|
5260
|
+
|
5261
|
+
if ( newSelector ) {
|
5262
|
+
try {
|
5263
|
+
push.apply( results, slice.call( newContext.querySelectorAll(
|
5264
|
+
newSelector
|
5265
|
+
), 0 ) );
|
5266
|
+
return results;
|
5267
|
+
} catch(qsaError) {
|
5268
|
+
} finally {
|
5269
|
+
if ( !old ) {
|
5270
|
+
context.removeAttribute("id");
|
5271
|
+
}
|
5272
|
+
}
|
5273
|
+
}
|
5274
|
+
}
|
5275
|
+
|
5276
|
+
return oldSelect( selector, context, results, seed, xml );
|
5277
|
+
};
|
5278
|
+
|
5279
|
+
if ( matches ) {
|
5280
|
+
assert(function( div ) {
|
5281
|
+
// Check to see if it's possible to do matchesSelector
|
5282
|
+
// on a disconnected node (IE 9)
|
5283
|
+
disconnectedMatch = matches.call( div, "div" );
|
5284
|
+
|
5285
|
+
// This should fail with an exception
|
5286
|
+
// Gecko does not error, returns false instead
|
5287
|
+
try {
|
5288
|
+
matches.call( div, "[test!='']:sizzle" );
|
5289
|
+
rbuggyMatches.push( "!=", pseudos );
|
5290
|
+
} catch ( e ) {}
|
5291
|
+
});
|
5292
|
+
|
5293
|
+
// rbuggyMatches always contains :active and :focus, so no need for a length check
|
5294
|
+
rbuggyMatches = /* rbuggyMatches.length && */ new RegExp( rbuggyMatches.join("|") );
|
5295
|
+
|
5296
|
+
Sizzle.matchesSelector = function( elem, expr ) {
|
5297
|
+
// Make sure that attribute selectors are quoted
|
5298
|
+
expr = expr.replace( rattributeQuotes, "='$1']" );
|
5299
|
+
|
5300
|
+
// rbuggyMatches always contains :active, so no need for an existence check
|
5301
|
+
if ( !isXML( elem ) && !rbuggyMatches.test( expr ) && (!rbuggyQSA || !rbuggyQSA.test( expr )) ) {
|
5302
|
+
try {
|
5303
|
+
var ret = matches.call( elem, expr );
|
5304
|
+
|
5305
|
+
// IE 9's matchesSelector returns false on disconnected nodes
|
5306
|
+
if ( ret || disconnectedMatch ||
|
5307
|
+
// As well, disconnected nodes are said to be in a document
|
5308
|
+
// fragment in IE 9
|
5309
|
+
elem.document && elem.document.nodeType !== 11 ) {
|
5310
|
+
return ret;
|
5311
|
+
}
|
5312
|
+
} catch(e) {}
|
5313
|
+
}
|
5314
|
+
|
5315
|
+
return Sizzle( expr, null, null, [ elem ] ).length > 0;
|
5316
|
+
};
|
5317
|
+
}
|
5318
|
+
})();
|
5319
|
+
}
|
5320
|
+
|
5321
|
+
// Deprecated
|
5322
|
+
Expr.pseudos["nth"] = Expr.pseudos["eq"];
|
5323
|
+
|
5324
|
+
// Back-compat
|
5325
|
+
function setFilters() {}
|
5326
|
+
Expr.filters = setFilters.prototype = Expr.pseudos;
|
5327
|
+
Expr.setFilters = new setFilters();
|
5328
|
+
|
5191
5329
|
// Override sizzle attribute retrieval
|
5192
5330
|
Sizzle.attr = jQuery.attr;
|
5193
5331
|
jQuery.find = Sizzle;
|
@@ -5197,9 +5335,9 @@ jQuery.unique = Sizzle.uniqueSort;
|
|
5197
5335
|
jQuery.text = Sizzle.getText;
|
5198
5336
|
jQuery.isXMLDoc = Sizzle.isXML;
|
5199
5337
|
jQuery.contains = Sizzle.contains;
|
5200
|
-
|
5201
|
-
|
5202
|
-
})( window );
|
5338
|
+
|
5339
|
+
|
5340
|
+
})( window );
|
5203
5341
|
var runtil = /Until$/,
|
5204
5342
|
rparentsprev = /^(?:parents|prev(?:Until|All))/,
|
5205
5343
|
isSimple = /^.[^:#\[\.,]*$/,
|
@@ -7123,10 +7261,10 @@ function buildParams( prefix, obj, traditional, add ) {
|
|
7123
7261
|
add( prefix, obj );
|
7124
7262
|
}
|
7125
7263
|
}
|
7126
|
-
var
|
7127
|
-
|
7128
|
-
// Document location segments
|
7264
|
+
var
|
7265
|
+
// Document location
|
7129
7266
|
ajaxLocParts,
|
7267
|
+
ajaxLocation,
|
7130
7268
|
|
7131
7269
|
rhash = /#.*$/,
|
7132
7270
|
rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, // IE leaves an \r character at EOL
|
@@ -7643,7 +7781,7 @@ jQuery.extend({
|
|
7643
7781
|
|
7644
7782
|
// Set data for the fake xhr object
|
7645
7783
|
jqXHR.status = status;
|
7646
|
-
jqXHR.statusText =
|
7784
|
+
jqXHR.statusText = ( nativeStatusText || statusText ) + "";
|
7647
7785
|
|
7648
7786
|
// Success/Error
|
7649
7787
|
if ( isSuccess ) {
|
@@ -7703,14 +7841,11 @@ jQuery.extend({
|
|
7703
7841
|
// Extract dataTypes list
|
7704
7842
|
s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().split( core_rspace );
|
7705
7843
|
|
7706
|
-
//
|
7844
|
+
// A cross-domain request is in order when we have a protocol:host:port mismatch
|
7707
7845
|
if ( s.crossDomain == null ) {
|
7708
|
-
parts = rurl.exec( s.url.toLowerCase() );
|
7709
|
-
s.crossDomain =
|
7710
|
-
(
|
7711
|
-
( parts[ 3 ] || ( parts[ 1 ] === "http:" ? 80 : 443 ) ) !=
|
7712
|
-
( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? 80 : 443 ) ) )
|
7713
|
-
);
|
7846
|
+
parts = rurl.exec( s.url.toLowerCase() ) || false;
|
7847
|
+
s.crossDomain = parts && ( parts.join(":") + ( parts[ 3 ] ? "" : parts[ 1 ] === "http:" ? 80 : 443 ) ) !==
|
7848
|
+
( ajaxLocParts.join(":") + ( ajaxLocParts[ 3 ] ? "" : ajaxLocParts[ 1 ] === "http:" ? 80 : 443 ) );
|
7714
7849
|
}
|
7715
7850
|
|
7716
7851
|
// Convert data if not already a string
|
@@ -8405,12 +8540,13 @@ var fxNow, timerId,
|
|
8405
8540
|
animationPrefilters = [ defaultPrefilter ],
|
8406
8541
|
tweeners = {
|
8407
8542
|
"*": [function( prop, value ) {
|
8408
|
-
var end, unit,
|
8543
|
+
var end, unit,
|
8409
8544
|
tween = this.createTween( prop, value ),
|
8410
8545
|
parts = rfxnum.exec( value ),
|
8411
8546
|
target = tween.cur(),
|
8412
8547
|
start = +target || 0,
|
8413
|
-
scale = 1
|
8548
|
+
scale = 1,
|
8549
|
+
maxIterations = 20;
|
8414
8550
|
|
8415
8551
|
if ( parts ) {
|
8416
8552
|
end = +parts[2];
|
@@ -8426,17 +8562,15 @@ var fxNow, timerId,
|
|
8426
8562
|
do {
|
8427
8563
|
// If previous iteration zeroed out, double until we get *something*
|
8428
8564
|
// Use a string for doubling factor so we don't accidentally see scale as unchanged below
|
8429
|
-
|
8565
|
+
scale = scale || ".5";
|
8430
8566
|
|
8431
8567
|
// Adjust and apply
|
8432
8568
|
start = start / scale;
|
8433
8569
|
jQuery.style( tween.elem, prop, start + unit );
|
8434
8570
|
|
8435
|
-
|
8436
|
-
|
8437
|
-
|
8438
|
-
// Stop looping if we've hit the mark or scale is unchanged
|
8439
|
-
} while ( scale !== 1 && scale !== prevScale );
|
8571
|
+
// Update scale, tolerating zero or NaN from tween.cur()
|
8572
|
+
// And breaking the loop if scale is unchanged or perfect, or if we've just had enough
|
8573
|
+
} while ( scale !== (scale = tween.cur() / target) && scale !== 1 && --maxIterations );
|
8440
8574
|
}
|
8441
8575
|
|
8442
8576
|
tween.unit = unit;
|
@@ -9069,7 +9203,8 @@ jQuery.fn.offset = function( options ) {
|
|
9069
9203
|
});
|
9070
9204
|
}
|
9071
9205
|
|
9072
|
-
var
|
9206
|
+
var docElem, body, win, clientTop, clientLeft, scrollTop, scrollLeft,
|
9207
|
+
box = { top: 0, left: 0 },
|
9073
9208
|
elem = this[ 0 ],
|
9074
9209
|
doc = elem && elem.ownerDocument;
|
9075
9210
|
|
@@ -9083,21 +9218,25 @@ jQuery.fn.offset = function( options ) {
|
|
9083
9218
|
|
9084
9219
|
docElem = doc.documentElement;
|
9085
9220
|
|
9086
|
-
// Make sure
|
9221
|
+
// Make sure it's not a disconnected DOM node
|
9087
9222
|
if ( !jQuery.contains( docElem, elem ) ) {
|
9088
|
-
return
|
9223
|
+
return box;
|
9089
9224
|
}
|
9090
9225
|
|
9091
|
-
|
9226
|
+
// If we don't have gBCR, just use 0,0 rather than error
|
9227
|
+
// BlackBerry 5, iOS 3 (original iPhone)
|
9228
|
+
if ( typeof elem.getBoundingClientRect !== "undefined" ) {
|
9229
|
+
box = elem.getBoundingClientRect();
|
9230
|
+
}
|
9092
9231
|
win = getWindow( doc );
|
9093
9232
|
clientTop = docElem.clientTop || body.clientTop || 0;
|
9094
9233
|
clientLeft = docElem.clientLeft || body.clientLeft || 0;
|
9095
9234
|
scrollTop = win.pageYOffset || docElem.scrollTop;
|
9096
9235
|
scrollLeft = win.pageXOffset || docElem.scrollLeft;
|
9097
|
-
|
9098
|
-
|
9099
|
-
|
9100
|
-
|
9236
|
+
return {
|
9237
|
+
top: box.top + scrollTop - clientTop,
|
9238
|
+
left: box.left + scrollLeft - clientLeft
|
9239
|
+
};
|
9101
9240
|
};
|
9102
9241
|
|
9103
9242
|
jQuery.offset = {
|