govuk_publishing_components 28.9.2 → 29.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/app/assets/config/govuk_publishing_components_manifest.js +15 -3
- data/app/assets/javascripts/govuk_publishing_components/dependencies.js +2 -5
- data/app/assets/javascripts/govuk_publishing_components/modules.js +15 -18
- data/app/assets/javascripts/govuk_publishing_components/{rum-loader.js.erb → rum-loader.js} +13 -10
- data/app/assets/stylesheets/govuk_publishing_components/components/_layout-super-navigation-header.scss +1 -0
- data/app/views/govuk_publishing_components/components/_contextual_breadcrumbs.html.erb +0 -5
- data/app/views/govuk_publishing_components/components/_layout_for_public.html.erb +7 -1
- data/app/views/govuk_publishing_components/components/docs/big_number.yml +3 -3
- data/app/views/govuk_publishing_components/components/docs/breadcrumbs.yml +3 -3
- data/app/views/govuk_publishing_components/components/docs/button.yml +2 -2
- data/app/views/govuk_publishing_components/components/docs/checkboxes.yml +5 -5
- data/app/views/govuk_publishing_components/components/docs/contents_list.yml +1 -1
- data/app/views/govuk_publishing_components/components/docs/contextual_breadcrumbs.yml +1 -1
- data/app/views/govuk_publishing_components/components/docs/contextual_guidance.yml +1 -1
- data/app/views/govuk_publishing_components/components/docs/cookie_banner.yml +2 -2
- data/app/views/govuk_publishing_components/components/docs/date_input.yml +1 -1
- data/app/views/govuk_publishing_components/components/docs/details.yml +1 -1
- data/app/views/govuk_publishing_components/components/docs/devolved_nations.yml +1 -1
- data/app/views/govuk_publishing_components/components/docs/document_list.yml +2 -2
- data/app/views/govuk_publishing_components/components/docs/error_alert.yml +1 -1
- data/app/views/govuk_publishing_components/components/docs/error_summary.yml +2 -2
- data/app/views/govuk_publishing_components/components/docs/feedback.yml +1 -1
- data/app/views/govuk_publishing_components/components/docs/fieldset.yml +4 -4
- data/app/views/govuk_publishing_components/components/docs/heading.yml +4 -4
- data/app/views/govuk_publishing_components/components/docs/hint.yml +1 -1
- data/app/views/govuk_publishing_components/components/docs/input.yml +3 -3
- data/app/views/govuk_publishing_components/components/docs/inset_text.yml +1 -1
- data/app/views/govuk_publishing_components/components/docs/label.yml +1 -1
- data/app/views/govuk_publishing_components/components/docs/layout_footer.yml +2 -2
- data/app/views/govuk_publishing_components/components/docs/lead_paragraph.yml +1 -1
- data/app/views/govuk_publishing_components/components/docs/metadata.yml +1 -1
- data/app/views/govuk_publishing_components/components/docs/notice.yml +2 -2
- data/app/views/govuk_publishing_components/components/docs/print_link.yml +1 -1
- data/app/views/govuk_publishing_components/components/docs/search.yml +4 -4
- data/app/views/govuk_publishing_components/components/docs/select.yml +5 -5
- data/app/views/govuk_publishing_components/components/docs/show_password.yml +3 -3
- data/app/views/govuk_publishing_components/components/docs/signup_link.yml +1 -1
- data/app/views/govuk_publishing_components/components/docs/single_page_notification_button.yml +2 -2
- data/app/views/govuk_publishing_components/components/docs/step_by_step_nav.yml +1 -1
- data/app/views/govuk_publishing_components/components/docs/step_by_step_nav_header.yml +3 -3
- data/app/views/govuk_publishing_components/components/docs/subscription_links.yml +3 -3
- data/app/views/govuk_publishing_components/components/docs/success_alert.yml +1 -1
- data/app/views/govuk_publishing_components/components/docs/table.yml +1 -1
- data/app/views/govuk_publishing_components/components/docs/textarea.yml +1 -1
- data/app/views/govuk_publishing_components/components/docs/title.yml +1 -1
- data/config/initializers/assets.rb +15 -45
- data/lib/govuk_publishing_components/presenters/attachment.rb +3 -2
- data/lib/govuk_publishing_components/presenters/breadcrumb_selector.rb +0 -11
- data/lib/govuk_publishing_components/presenters/contextual_navigation.rb +0 -20
- data/lib/govuk_publishing_components/presenters/meta_tags.rb +1 -37
- data/lib/govuk_publishing_components/version.rb +1 -1
- data/lib/govuk_publishing_components.rb +0 -1
- metadata +10 -118
- data/lib/govuk_publishing_components/presenters/content_breadcrumbs_based_on_priority.rb +0 -118
- data/node_modules/jquery/AUTHORS.txt +0 -266
- data/node_modules/jquery/LICENSE.txt +0 -36
- data/node_modules/jquery/README.md +0 -65
- data/node_modules/jquery/bower.json +0 -14
- data/node_modules/jquery/dist/jquery.js +0 -11008
- data/node_modules/jquery/dist/jquery.min.js +0 -5
- data/node_modules/jquery/dist/jquery.min.map +0 -1
- data/node_modules/jquery/external/sizzle/LICENSE.txt +0 -36
- data/node_modules/jquery/external/sizzle/dist/sizzle.js +0 -2143
- data/node_modules/jquery/external/sizzle/dist/sizzle.min.js +0 -3
- data/node_modules/jquery/external/sizzle/dist/sizzle.min.map +0 -1
- data/node_modules/jquery/package.json +0 -85
- data/node_modules/jquery/src/ajax/jsonp.js +0 -100
- data/node_modules/jquery/src/ajax/load.js +0 -83
- data/node_modules/jquery/src/ajax/parseJSON.js +0 -53
- data/node_modules/jquery/src/ajax/parseXML.js +0 -31
- data/node_modules/jquery/src/ajax/script.js +0 -95
- data/node_modules/jquery/src/ajax/var/location.js +0 -3
- data/node_modules/jquery/src/ajax/var/nonce.js +0 -5
- data/node_modules/jquery/src/ajax/var/rquery.js +0 -3
- data/node_modules/jquery/src/ajax/xhr.js +0 -229
- data/node_modules/jquery/src/ajax.js +0 -842
- data/node_modules/jquery/src/attributes/attr.js +0 -281
- data/node_modules/jquery/src/attributes/classes.js +0 -174
- data/node_modules/jquery/src/attributes/prop.js +0 -156
- data/node_modules/jquery/src/attributes/support.js +0 -70
- data/node_modules/jquery/src/attributes/val.js +0 -191
- data/node_modules/jquery/src/attributes.js +0 -11
- data/node_modules/jquery/src/callbacks.js +0 -232
- data/node_modules/jquery/src/core/access.js +0 -65
- data/node_modules/jquery/src/core/init.js +0 -140
- data/node_modules/jquery/src/core/parseHTML.js +0 -41
- data/node_modules/jquery/src/core/ready.js +0 -163
- data/node_modules/jquery/src/core/var/rsingleTag.js +0 -5
- data/node_modules/jquery/src/core.js +0 -529
- data/node_modules/jquery/src/css/addGetHookIf.js +0 -24
- data/node_modules/jquery/src/css/adjustCSS.js +0 -65
- data/node_modules/jquery/src/css/curCSS.js +0 -137
- data/node_modules/jquery/src/css/defaultDisplay.js +0 -72
- data/node_modules/jquery/src/css/hiddenVisibleSelectors.js +0 -42
- data/node_modules/jquery/src/css/showHide.js +0 -45
- data/node_modules/jquery/src/css/support.js +0 -184
- data/node_modules/jquery/src/css/var/cssExpand.js +0 -3
- data/node_modules/jquery/src/css/var/isHidden.js +0 -16
- data/node_modules/jquery/src/css/var/rmargin.js +0 -3
- data/node_modules/jquery/src/css/var/rnumnonpx.js +0 -5
- data/node_modules/jquery/src/css/var/swap.js +0 -24
- data/node_modules/jquery/src/css.js +0 -563
- data/node_modules/jquery/src/data/support.js +0 -23
- data/node_modules/jquery/src/data/var/acceptData.js +0 -20
- data/node_modules/jquery/src/data.js +0 -342
- data/node_modules/jquery/src/deferred.js +0 -159
- data/node_modules/jquery/src/deprecated.js +0 -34
- data/node_modules/jquery/src/dimensions.js +0 -56
- data/node_modules/jquery/src/effects/Tween.js +0 -121
- data/node_modules/jquery/src/effects/animatedSelector.js +0 -13
- data/node_modules/jquery/src/effects/support.js +0 -58
- data/node_modules/jquery/src/effects.js +0 -640
- data/node_modules/jquery/src/event/ajax.js +0 -20
- data/node_modules/jquery/src/event/alias.js +0 -25
- data/node_modules/jquery/src/event/support.js +0 -28
- data/node_modules/jquery/src/event.js +0 -1134
- data/node_modules/jquery/src/exports/amd.js +0 -24
- data/node_modules/jquery/src/exports/global.js +0 -26
- data/node_modules/jquery/src/intro.js +0 -44
- data/node_modules/jquery/src/jquery.js +0 -37
- data/node_modules/jquery/src/manipulation/_evalUrl.js +0 -21
- data/node_modules/jquery/src/manipulation/buildFragment.js +0 -157
- data/node_modules/jquery/src/manipulation/createSafeFragment.js +0 -20
- data/node_modules/jquery/src/manipulation/getAll.js +0 -33
- data/node_modules/jquery/src/manipulation/setGlobalEval.js +0 -19
- data/node_modules/jquery/src/manipulation/support.js +0 -72
- data/node_modules/jquery/src/manipulation/var/nodeNames.js +0 -5
- data/node_modules/jquery/src/manipulation/var/rcheckableType.js +0 -3
- data/node_modules/jquery/src/manipulation/var/rleadingWhitespace.js +0 -3
- data/node_modules/jquery/src/manipulation/var/rscriptType.js +0 -3
- data/node_modules/jquery/src/manipulation/var/rtagName.js +0 -3
- data/node_modules/jquery/src/manipulation/wrapMap.js +0 -30
- data/node_modules/jquery/src/manipulation.js +0 -585
- data/node_modules/jquery/src/offset.js +0 -219
- data/node_modules/jquery/src/outro.js +0 -2
- data/node_modules/jquery/src/queue/delay.js +0 -22
- data/node_modules/jquery/src/queue.js +0 -144
- data/node_modules/jquery/src/selector-sizzle.js +0 -14
- data/node_modules/jquery/src/selector.js +0 -1
- data/node_modules/jquery/src/serialize.js +0 -125
- data/node_modules/jquery/src/support.js +0 -63
- data/node_modules/jquery/src/traversing/findFilter.js +0 -100
- data/node_modules/jquery/src/traversing/var/dir.js +0 -20
- data/node_modules/jquery/src/traversing/var/rneedsContext.js +0 -6
- data/node_modules/jquery/src/traversing/var/siblings.js +0 -15
- data/node_modules/jquery/src/traversing.js +0 -179
- data/node_modules/jquery/src/var/class2type.js +0 -5
- data/node_modules/jquery/src/var/concat.js +0 -5
- data/node_modules/jquery/src/var/deletedIds.js +0 -3
- data/node_modules/jquery/src/var/document.js +0 -3
- data/node_modules/jquery/src/var/documentElement.js +0 -5
- data/node_modules/jquery/src/var/hasOwn.js +0 -5
- data/node_modules/jquery/src/var/indexOf.js +0 -5
- data/node_modules/jquery/src/var/pnum.js +0 -3
- data/node_modules/jquery/src/var/push.js +0 -5
- data/node_modules/jquery/src/var/rcssNum.js +0 -7
- data/node_modules/jquery/src/var/rnotwhite.js +0 -3
- data/node_modules/jquery/src/var/slice.js +0 -5
- data/node_modules/jquery/src/var/support.js +0 -5
- data/node_modules/jquery/src/var/toString.js +0 -5
- data/node_modules/jquery/src/wrap.js +0 -77
@@ -1,163 +0,0 @@
|
|
1
|
-
define( [
|
2
|
-
"../core",
|
3
|
-
"../var/document",
|
4
|
-
"../core/init",
|
5
|
-
"../deferred"
|
6
|
-
], function( jQuery, document ) {
|
7
|
-
|
8
|
-
// The deferred used on DOM ready
|
9
|
-
var readyList;
|
10
|
-
|
11
|
-
jQuery.fn.ready = function( fn ) {
|
12
|
-
|
13
|
-
// Add the callback
|
14
|
-
jQuery.ready.promise().done( fn );
|
15
|
-
|
16
|
-
return this;
|
17
|
-
};
|
18
|
-
|
19
|
-
jQuery.extend( {
|
20
|
-
|
21
|
-
// Is the DOM ready to be used? Set to true once it occurs.
|
22
|
-
isReady: false,
|
23
|
-
|
24
|
-
// A counter to track how many items to wait for before
|
25
|
-
// the ready event fires. See #6781
|
26
|
-
readyWait: 1,
|
27
|
-
|
28
|
-
// Hold (or release) the ready event
|
29
|
-
holdReady: function( hold ) {
|
30
|
-
if ( hold ) {
|
31
|
-
jQuery.readyWait++;
|
32
|
-
} else {
|
33
|
-
jQuery.ready( true );
|
34
|
-
}
|
35
|
-
},
|
36
|
-
|
37
|
-
// Handle when the DOM is ready
|
38
|
-
ready: function( wait ) {
|
39
|
-
|
40
|
-
// Abort if there are pending holds or we're already ready
|
41
|
-
if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {
|
42
|
-
return;
|
43
|
-
}
|
44
|
-
|
45
|
-
// Remember that the DOM is ready
|
46
|
-
jQuery.isReady = true;
|
47
|
-
|
48
|
-
// If a normal DOM Ready event fired, decrement, and wait if need be
|
49
|
-
if ( wait !== true && --jQuery.readyWait > 0 ) {
|
50
|
-
return;
|
51
|
-
}
|
52
|
-
|
53
|
-
// If there are functions bound, to execute
|
54
|
-
readyList.resolveWith( document, [ jQuery ] );
|
55
|
-
|
56
|
-
// Trigger any bound ready events
|
57
|
-
if ( jQuery.fn.triggerHandler ) {
|
58
|
-
jQuery( document ).triggerHandler( "ready" );
|
59
|
-
jQuery( document ).off( "ready" );
|
60
|
-
}
|
61
|
-
}
|
62
|
-
} );
|
63
|
-
|
64
|
-
/**
|
65
|
-
* Clean-up method for dom ready events
|
66
|
-
*/
|
67
|
-
function detach() {
|
68
|
-
if ( document.addEventListener ) {
|
69
|
-
document.removeEventListener( "DOMContentLoaded", completed );
|
70
|
-
window.removeEventListener( "load", completed );
|
71
|
-
|
72
|
-
} else {
|
73
|
-
document.detachEvent( "onreadystatechange", completed );
|
74
|
-
window.detachEvent( "onload", completed );
|
75
|
-
}
|
76
|
-
}
|
77
|
-
|
78
|
-
/**
|
79
|
-
* The ready event handler and self cleanup method
|
80
|
-
*/
|
81
|
-
function completed() {
|
82
|
-
|
83
|
-
// readyState === "complete" is good enough for us to call the dom ready in oldIE
|
84
|
-
if ( document.addEventListener ||
|
85
|
-
window.event.type === "load" ||
|
86
|
-
document.readyState === "complete" ) {
|
87
|
-
|
88
|
-
detach();
|
89
|
-
jQuery.ready();
|
90
|
-
}
|
91
|
-
}
|
92
|
-
|
93
|
-
jQuery.ready.promise = function( obj ) {
|
94
|
-
if ( !readyList ) {
|
95
|
-
|
96
|
-
readyList = jQuery.Deferred();
|
97
|
-
|
98
|
-
// Catch cases where $(document).ready() is called
|
99
|
-
// after the browser event has already occurred.
|
100
|
-
// Support: IE6-10
|
101
|
-
// Older IE sometimes signals "interactive" too soon
|
102
|
-
if ( document.readyState === "complete" ||
|
103
|
-
( document.readyState !== "loading" && !document.documentElement.doScroll ) ) {
|
104
|
-
|
105
|
-
// Handle it asynchronously to allow scripts the opportunity to delay ready
|
106
|
-
window.setTimeout( jQuery.ready );
|
107
|
-
|
108
|
-
// Standards-based browsers support DOMContentLoaded
|
109
|
-
} else if ( document.addEventListener ) {
|
110
|
-
|
111
|
-
// Use the handy event callback
|
112
|
-
document.addEventListener( "DOMContentLoaded", completed );
|
113
|
-
|
114
|
-
// A fallback to window.onload, that will always work
|
115
|
-
window.addEventListener( "load", completed );
|
116
|
-
|
117
|
-
// If IE event model is used
|
118
|
-
} else {
|
119
|
-
|
120
|
-
// Ensure firing before onload, maybe late but safe also for iframes
|
121
|
-
document.attachEvent( "onreadystatechange", completed );
|
122
|
-
|
123
|
-
// A fallback to window.onload, that will always work
|
124
|
-
window.attachEvent( "onload", completed );
|
125
|
-
|
126
|
-
// If IE and not a frame
|
127
|
-
// continually check to see if the document is ready
|
128
|
-
var top = false;
|
129
|
-
|
130
|
-
try {
|
131
|
-
top = window.frameElement == null && document.documentElement;
|
132
|
-
} catch ( e ) {}
|
133
|
-
|
134
|
-
if ( top && top.doScroll ) {
|
135
|
-
( function doScrollCheck() {
|
136
|
-
if ( !jQuery.isReady ) {
|
137
|
-
|
138
|
-
try {
|
139
|
-
|
140
|
-
// Use the trick by Diego Perini
|
141
|
-
// http://javascript.nwbox.com/IEContentLoaded/
|
142
|
-
top.doScroll( "left" );
|
143
|
-
} catch ( e ) {
|
144
|
-
return window.setTimeout( doScrollCheck, 50 );
|
145
|
-
}
|
146
|
-
|
147
|
-
// detach all dom ready events
|
148
|
-
detach();
|
149
|
-
|
150
|
-
// and execute any waiting functions
|
151
|
-
jQuery.ready();
|
152
|
-
}
|
153
|
-
} )();
|
154
|
-
}
|
155
|
-
}
|
156
|
-
}
|
157
|
-
return readyList.promise( obj );
|
158
|
-
};
|
159
|
-
|
160
|
-
// Kick off the DOM ready check even if the user does not
|
161
|
-
jQuery.ready.promise();
|
162
|
-
|
163
|
-
} );
|
@@ -1,529 +0,0 @@
|
|
1
|
-
define( [
|
2
|
-
"./var/deletedIds",
|
3
|
-
"./var/document",
|
4
|
-
"./var/slice",
|
5
|
-
"./var/concat",
|
6
|
-
"./var/push",
|
7
|
-
"./var/indexOf",
|
8
|
-
"./var/class2type",
|
9
|
-
"./var/toString",
|
10
|
-
"./var/hasOwn",
|
11
|
-
"./var/support"
|
12
|
-
], function( deletedIds, document, slice, concat, push, indexOf,
|
13
|
-
class2type, toString, hasOwn, support ) {
|
14
|
-
|
15
|
-
var
|
16
|
-
version = "@VERSION",
|
17
|
-
|
18
|
-
// Define a local copy of jQuery
|
19
|
-
jQuery = function( selector, context ) {
|
20
|
-
|
21
|
-
// The jQuery object is actually just the init constructor 'enhanced'
|
22
|
-
// Need init if jQuery is called (just allow error to be thrown if not included)
|
23
|
-
return new jQuery.fn.init( selector, context );
|
24
|
-
},
|
25
|
-
|
26
|
-
// Support: Android<4.1, IE<9
|
27
|
-
// Make sure we trim BOM and NBSP
|
28
|
-
rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
|
29
|
-
|
30
|
-
// Matches dashed string for camelizing
|
31
|
-
rmsPrefix = /^-ms-/,
|
32
|
-
rdashAlpha = /-([\da-z])/gi,
|
33
|
-
|
34
|
-
// Used by jQuery.camelCase as callback to replace()
|
35
|
-
fcamelCase = function( all, letter ) {
|
36
|
-
return letter.toUpperCase();
|
37
|
-
};
|
38
|
-
|
39
|
-
jQuery.fn = jQuery.prototype = {
|
40
|
-
|
41
|
-
// The current version of jQuery being used
|
42
|
-
jquery: version,
|
43
|
-
|
44
|
-
constructor: jQuery,
|
45
|
-
|
46
|
-
// Start with an empty selector
|
47
|
-
selector: "",
|
48
|
-
|
49
|
-
// The default length of a jQuery object is 0
|
50
|
-
length: 0,
|
51
|
-
|
52
|
-
toArray: function() {
|
53
|
-
return slice.call( this );
|
54
|
-
},
|
55
|
-
|
56
|
-
// Get the Nth element in the matched element set OR
|
57
|
-
// Get the whole matched element set as a clean array
|
58
|
-
get: function( num ) {
|
59
|
-
return num != null ?
|
60
|
-
|
61
|
-
// Return just the one element from the set
|
62
|
-
( num < 0 ? this[ num + this.length ] : this[ num ] ) :
|
63
|
-
|
64
|
-
// Return all the elements in a clean array
|
65
|
-
slice.call( this );
|
66
|
-
},
|
67
|
-
|
68
|
-
// Take an array of elements and push it onto the stack
|
69
|
-
// (returning the new matched element set)
|
70
|
-
pushStack: function( elems ) {
|
71
|
-
|
72
|
-
// Build a new jQuery matched element set
|
73
|
-
var ret = jQuery.merge( this.constructor(), elems );
|
74
|
-
|
75
|
-
// Add the old object onto the stack (as a reference)
|
76
|
-
ret.prevObject = this;
|
77
|
-
ret.context = this.context;
|
78
|
-
|
79
|
-
// Return the newly-formed element set
|
80
|
-
return ret;
|
81
|
-
},
|
82
|
-
|
83
|
-
// Execute a callback for every element in the matched set.
|
84
|
-
each: function( callback ) {
|
85
|
-
return jQuery.each( this, callback );
|
86
|
-
},
|
87
|
-
|
88
|
-
map: function( callback ) {
|
89
|
-
return this.pushStack( jQuery.map( this, function( elem, i ) {
|
90
|
-
return callback.call( elem, i, elem );
|
91
|
-
} ) );
|
92
|
-
},
|
93
|
-
|
94
|
-
slice: function() {
|
95
|
-
return this.pushStack( slice.apply( this, arguments ) );
|
96
|
-
},
|
97
|
-
|
98
|
-
first: function() {
|
99
|
-
return this.eq( 0 );
|
100
|
-
},
|
101
|
-
|
102
|
-
last: function() {
|
103
|
-
return this.eq( -1 );
|
104
|
-
},
|
105
|
-
|
106
|
-
eq: function( i ) {
|
107
|
-
var len = this.length,
|
108
|
-
j = +i + ( i < 0 ? len : 0 );
|
109
|
-
return this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] );
|
110
|
-
},
|
111
|
-
|
112
|
-
end: function() {
|
113
|
-
return this.prevObject || this.constructor();
|
114
|
-
},
|
115
|
-
|
116
|
-
// For internal use only.
|
117
|
-
// Behaves like an Array's method, not like a jQuery method.
|
118
|
-
push: push,
|
119
|
-
sort: deletedIds.sort,
|
120
|
-
splice: deletedIds.splice
|
121
|
-
};
|
122
|
-
|
123
|
-
jQuery.extend = jQuery.fn.extend = function() {
|
124
|
-
var src, copyIsArray, copy, name, options, clone,
|
125
|
-
target = arguments[ 0 ] || {},
|
126
|
-
i = 1,
|
127
|
-
length = arguments.length,
|
128
|
-
deep = false;
|
129
|
-
|
130
|
-
// Handle a deep copy situation
|
131
|
-
if ( typeof target === "boolean" ) {
|
132
|
-
deep = target;
|
133
|
-
|
134
|
-
// skip the boolean and the target
|
135
|
-
target = arguments[ i ] || {};
|
136
|
-
i++;
|
137
|
-
}
|
138
|
-
|
139
|
-
// Handle case when target is a string or something (possible in deep copy)
|
140
|
-
if ( typeof target !== "object" && !jQuery.isFunction( target ) ) {
|
141
|
-
target = {};
|
142
|
-
}
|
143
|
-
|
144
|
-
// extend jQuery itself if only one argument is passed
|
145
|
-
if ( i === length ) {
|
146
|
-
target = this;
|
147
|
-
i--;
|
148
|
-
}
|
149
|
-
|
150
|
-
for ( ; i < length; i++ ) {
|
151
|
-
|
152
|
-
// Only deal with non-null/undefined values
|
153
|
-
if ( ( options = arguments[ i ] ) != null ) {
|
154
|
-
|
155
|
-
// Extend the base object
|
156
|
-
for ( name in options ) {
|
157
|
-
src = target[ name ];
|
158
|
-
copy = options[ name ];
|
159
|
-
|
160
|
-
// Prevent never-ending loop
|
161
|
-
if ( target === copy ) {
|
162
|
-
continue;
|
163
|
-
}
|
164
|
-
|
165
|
-
// Recurse if we're merging plain objects or arrays
|
166
|
-
if ( deep && copy && ( jQuery.isPlainObject( copy ) ||
|
167
|
-
( copyIsArray = jQuery.isArray( copy ) ) ) ) {
|
168
|
-
|
169
|
-
if ( copyIsArray ) {
|
170
|
-
copyIsArray = false;
|
171
|
-
clone = src && jQuery.isArray( src ) ? src : [];
|
172
|
-
|
173
|
-
} else {
|
174
|
-
clone = src && jQuery.isPlainObject( src ) ? src : {};
|
175
|
-
}
|
176
|
-
|
177
|
-
// Never move original objects, clone them
|
178
|
-
target[ name ] = jQuery.extend( deep, clone, copy );
|
179
|
-
|
180
|
-
// Don't bring in undefined values
|
181
|
-
} else if ( copy !== undefined ) {
|
182
|
-
target[ name ] = copy;
|
183
|
-
}
|
184
|
-
}
|
185
|
-
}
|
186
|
-
}
|
187
|
-
|
188
|
-
// Return the modified object
|
189
|
-
return target;
|
190
|
-
};
|
191
|
-
|
192
|
-
jQuery.extend( {
|
193
|
-
|
194
|
-
// Unique for each copy of jQuery on the page
|
195
|
-
expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ),
|
196
|
-
|
197
|
-
// Assume jQuery is ready without the ready module
|
198
|
-
isReady: true,
|
199
|
-
|
200
|
-
error: function( msg ) {
|
201
|
-
throw new Error( msg );
|
202
|
-
},
|
203
|
-
|
204
|
-
noop: function() {},
|
205
|
-
|
206
|
-
// See test/unit/core.js for details concerning isFunction.
|
207
|
-
// Since version 1.3, DOM methods and functions like alert
|
208
|
-
// aren't supported. They return false on IE (#2968).
|
209
|
-
isFunction: function( obj ) {
|
210
|
-
return jQuery.type( obj ) === "function";
|
211
|
-
},
|
212
|
-
|
213
|
-
isArray: Array.isArray || function( obj ) {
|
214
|
-
return jQuery.type( obj ) === "array";
|
215
|
-
},
|
216
|
-
|
217
|
-
isWindow: function( obj ) {
|
218
|
-
/* jshint eqeqeq: false */
|
219
|
-
return obj != null && obj == obj.window;
|
220
|
-
},
|
221
|
-
|
222
|
-
isNumeric: function( obj ) {
|
223
|
-
|
224
|
-
// parseFloat NaNs numeric-cast false positives (null|true|false|"")
|
225
|
-
// ...but misinterprets leading-number strings, particularly hex literals ("0x...")
|
226
|
-
// subtraction forces infinities to NaN
|
227
|
-
// adding 1 corrects loss of precision from parseFloat (#15100)
|
228
|
-
var realStringObj = obj && obj.toString();
|
229
|
-
return !jQuery.isArray( obj ) && ( realStringObj - parseFloat( realStringObj ) + 1 ) >= 0;
|
230
|
-
},
|
231
|
-
|
232
|
-
isEmptyObject: function( obj ) {
|
233
|
-
var name;
|
234
|
-
for ( name in obj ) {
|
235
|
-
return false;
|
236
|
-
}
|
237
|
-
return true;
|
238
|
-
},
|
239
|
-
|
240
|
-
isPlainObject: function( obj ) {
|
241
|
-
var key;
|
242
|
-
|
243
|
-
// Must be an Object.
|
244
|
-
// Because of IE, we also have to check the presence of the constructor property.
|
245
|
-
// Make sure that DOM nodes and window objects don't pass through, as well
|
246
|
-
if ( !obj || jQuery.type( obj ) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) {
|
247
|
-
return false;
|
248
|
-
}
|
249
|
-
|
250
|
-
try {
|
251
|
-
|
252
|
-
// Not own constructor property must be Object
|
253
|
-
if ( obj.constructor &&
|
254
|
-
!hasOwn.call( obj, "constructor" ) &&
|
255
|
-
!hasOwn.call( obj.constructor.prototype, "isPrototypeOf" ) ) {
|
256
|
-
return false;
|
257
|
-
}
|
258
|
-
} catch ( e ) {
|
259
|
-
|
260
|
-
// IE8,9 Will throw exceptions on certain host objects #9897
|
261
|
-
return false;
|
262
|
-
}
|
263
|
-
|
264
|
-
// Support: IE<9
|
265
|
-
// Handle iteration over inherited properties before own properties.
|
266
|
-
if ( !support.ownFirst ) {
|
267
|
-
for ( key in obj ) {
|
268
|
-
return hasOwn.call( obj, key );
|
269
|
-
}
|
270
|
-
}
|
271
|
-
|
272
|
-
// Own properties are enumerated firstly, so to speed up,
|
273
|
-
// if last one is own, then all properties are own.
|
274
|
-
for ( key in obj ) {}
|
275
|
-
|
276
|
-
return key === undefined || hasOwn.call( obj, key );
|
277
|
-
},
|
278
|
-
|
279
|
-
type: function( obj ) {
|
280
|
-
if ( obj == null ) {
|
281
|
-
return obj + "";
|
282
|
-
}
|
283
|
-
return typeof obj === "object" || typeof obj === "function" ?
|
284
|
-
class2type[ toString.call( obj ) ] || "object" :
|
285
|
-
typeof obj;
|
286
|
-
},
|
287
|
-
|
288
|
-
// Workarounds based on findings by Jim Driscoll
|
289
|
-
// http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context
|
290
|
-
globalEval: function( data ) {
|
291
|
-
if ( data && jQuery.trim( data ) ) {
|
292
|
-
|
293
|
-
// We use execScript on Internet Explorer
|
294
|
-
// We use an anonymous function so that context is window
|
295
|
-
// rather than jQuery in Firefox
|
296
|
-
( window.execScript || function( data ) {
|
297
|
-
window[ "eval" ].call( window, data ); // jscs:ignore requireDotNotation
|
298
|
-
} )( data );
|
299
|
-
}
|
300
|
-
},
|
301
|
-
|
302
|
-
// Convert dashed to camelCase; used by the css and data modules
|
303
|
-
// Microsoft forgot to hump their vendor prefix (#9572)
|
304
|
-
camelCase: function( string ) {
|
305
|
-
return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
|
306
|
-
},
|
307
|
-
|
308
|
-
nodeName: function( elem, name ) {
|
309
|
-
return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
|
310
|
-
},
|
311
|
-
|
312
|
-
each: function( obj, callback ) {
|
313
|
-
var length, i = 0;
|
314
|
-
|
315
|
-
if ( isArrayLike( obj ) ) {
|
316
|
-
length = obj.length;
|
317
|
-
for ( ; i < length; i++ ) {
|
318
|
-
if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {
|
319
|
-
break;
|
320
|
-
}
|
321
|
-
}
|
322
|
-
} else {
|
323
|
-
for ( i in obj ) {
|
324
|
-
if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {
|
325
|
-
break;
|
326
|
-
}
|
327
|
-
}
|
328
|
-
}
|
329
|
-
|
330
|
-
return obj;
|
331
|
-
},
|
332
|
-
|
333
|
-
// Support: Android<4.1, IE<9
|
334
|
-
trim: function( text ) {
|
335
|
-
return text == null ?
|
336
|
-
"" :
|
337
|
-
( text + "" ).replace( rtrim, "" );
|
338
|
-
},
|
339
|
-
|
340
|
-
// results is for internal usage only
|
341
|
-
makeArray: function( arr, results ) {
|
342
|
-
var ret = results || [];
|
343
|
-
|
344
|
-
if ( arr != null ) {
|
345
|
-
if ( isArrayLike( Object( arr ) ) ) {
|
346
|
-
jQuery.merge( ret,
|
347
|
-
typeof arr === "string" ?
|
348
|
-
[ arr ] : arr
|
349
|
-
);
|
350
|
-
} else {
|
351
|
-
push.call( ret, arr );
|
352
|
-
}
|
353
|
-
}
|
354
|
-
|
355
|
-
return ret;
|
356
|
-
},
|
357
|
-
|
358
|
-
inArray: function( elem, arr, i ) {
|
359
|
-
var len;
|
360
|
-
|
361
|
-
if ( arr ) {
|
362
|
-
if ( indexOf ) {
|
363
|
-
return indexOf.call( arr, elem, i );
|
364
|
-
}
|
365
|
-
|
366
|
-
len = arr.length;
|
367
|
-
i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0;
|
368
|
-
|
369
|
-
for ( ; i < len; i++ ) {
|
370
|
-
|
371
|
-
// Skip accessing in sparse arrays
|
372
|
-
if ( i in arr && arr[ i ] === elem ) {
|
373
|
-
return i;
|
374
|
-
}
|
375
|
-
}
|
376
|
-
}
|
377
|
-
|
378
|
-
return -1;
|
379
|
-
},
|
380
|
-
|
381
|
-
merge: function( first, second ) {
|
382
|
-
var len = +second.length,
|
383
|
-
j = 0,
|
384
|
-
i = first.length;
|
385
|
-
|
386
|
-
while ( j < len ) {
|
387
|
-
first[ i++ ] = second[ j++ ];
|
388
|
-
}
|
389
|
-
|
390
|
-
// Support: IE<9
|
391
|
-
// Workaround casting of .length to NaN on otherwise arraylike objects (e.g., NodeLists)
|
392
|
-
if ( len !== len ) {
|
393
|
-
while ( second[ j ] !== undefined ) {
|
394
|
-
first[ i++ ] = second[ j++ ];
|
395
|
-
}
|
396
|
-
}
|
397
|
-
|
398
|
-
first.length = i;
|
399
|
-
|
400
|
-
return first;
|
401
|
-
},
|
402
|
-
|
403
|
-
grep: function( elems, callback, invert ) {
|
404
|
-
var callbackInverse,
|
405
|
-
matches = [],
|
406
|
-
i = 0,
|
407
|
-
length = elems.length,
|
408
|
-
callbackExpect = !invert;
|
409
|
-
|
410
|
-
// Go through the array, only saving the items
|
411
|
-
// that pass the validator function
|
412
|
-
for ( ; i < length; i++ ) {
|
413
|
-
callbackInverse = !callback( elems[ i ], i );
|
414
|
-
if ( callbackInverse !== callbackExpect ) {
|
415
|
-
matches.push( elems[ i ] );
|
416
|
-
}
|
417
|
-
}
|
418
|
-
|
419
|
-
return matches;
|
420
|
-
},
|
421
|
-
|
422
|
-
// arg is for internal usage only
|
423
|
-
map: function( elems, callback, arg ) {
|
424
|
-
var length, value,
|
425
|
-
i = 0,
|
426
|
-
ret = [];
|
427
|
-
|
428
|
-
// Go through the array, translating each of the items to their new values
|
429
|
-
if ( isArrayLike( elems ) ) {
|
430
|
-
length = elems.length;
|
431
|
-
for ( ; i < length; i++ ) {
|
432
|
-
value = callback( elems[ i ], i, arg );
|
433
|
-
|
434
|
-
if ( value != null ) {
|
435
|
-
ret.push( value );
|
436
|
-
}
|
437
|
-
}
|
438
|
-
|
439
|
-
// Go through every key on the object,
|
440
|
-
} else {
|
441
|
-
for ( i in elems ) {
|
442
|
-
value = callback( elems[ i ], i, arg );
|
443
|
-
|
444
|
-
if ( value != null ) {
|
445
|
-
ret.push( value );
|
446
|
-
}
|
447
|
-
}
|
448
|
-
}
|
449
|
-
|
450
|
-
// Flatten any nested arrays
|
451
|
-
return concat.apply( [], ret );
|
452
|
-
},
|
453
|
-
|
454
|
-
// A global GUID counter for objects
|
455
|
-
guid: 1,
|
456
|
-
|
457
|
-
// Bind a function to a context, optionally partially applying any
|
458
|
-
// arguments.
|
459
|
-
proxy: function( fn, context ) {
|
460
|
-
var args, proxy, tmp;
|
461
|
-
|
462
|
-
if ( typeof context === "string" ) {
|
463
|
-
tmp = fn[ context ];
|
464
|
-
context = fn;
|
465
|
-
fn = tmp;
|
466
|
-
}
|
467
|
-
|
468
|
-
// Quick check to determine if target is callable, in the spec
|
469
|
-
// this throws a TypeError, but we will just return undefined.
|
470
|
-
if ( !jQuery.isFunction( fn ) ) {
|
471
|
-
return undefined;
|
472
|
-
}
|
473
|
-
|
474
|
-
// Simulated bind
|
475
|
-
args = slice.call( arguments, 2 );
|
476
|
-
proxy = function() {
|
477
|
-
return fn.apply( context || this, args.concat( slice.call( arguments ) ) );
|
478
|
-
};
|
479
|
-
|
480
|
-
// Set the guid of unique handler to the same of original handler, so it can be removed
|
481
|
-
proxy.guid = fn.guid = fn.guid || jQuery.guid++;
|
482
|
-
|
483
|
-
return proxy;
|
484
|
-
},
|
485
|
-
|
486
|
-
now: function() {
|
487
|
-
return +( new Date() );
|
488
|
-
},
|
489
|
-
|
490
|
-
// jQuery.support is not used in Core but other projects attach their
|
491
|
-
// properties to it so it needs to exist.
|
492
|
-
support: support
|
493
|
-
} );
|
494
|
-
|
495
|
-
// JSHint would error on this code due to the Symbol not being defined in ES5.
|
496
|
-
// Defining this global in .jshintrc would create a danger of using the global
|
497
|
-
// unguarded in another place, it seems safer to just disable JSHint for these
|
498
|
-
// three lines.
|
499
|
-
/* jshint ignore: start */
|
500
|
-
if ( typeof Symbol === "function" ) {
|
501
|
-
jQuery.fn[ Symbol.iterator ] = deletedIds[ Symbol.iterator ];
|
502
|
-
}
|
503
|
-
/* jshint ignore: end */
|
504
|
-
|
505
|
-
// Populate the class2type map
|
506
|
-
jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ),
|
507
|
-
function( i, name ) {
|
508
|
-
class2type[ "[object " + name + "]" ] = name.toLowerCase();
|
509
|
-
} );
|
510
|
-
|
511
|
-
function isArrayLike( obj ) {
|
512
|
-
|
513
|
-
// Support: iOS 8.2 (not reproducible in simulator)
|
514
|
-
// `in` check used to prevent JIT error (gh-2145)
|
515
|
-
// hasOwn isn't used here due to false negatives
|
516
|
-
// regarding Nodelist length in IE
|
517
|
-
var length = !!obj && "length" in obj && obj.length,
|
518
|
-
type = jQuery.type( obj );
|
519
|
-
|
520
|
-
if ( type === "function" || jQuery.isWindow( obj ) ) {
|
521
|
-
return false;
|
522
|
-
}
|
523
|
-
|
524
|
-
return type === "array" || length === 0 ||
|
525
|
-
typeof length === "number" && length > 0 && ( length - 1 ) in obj;
|
526
|
-
}
|
527
|
-
|
528
|
-
return jQuery;
|
529
|
-
} );
|
@@ -1,24 +0,0 @@
|
|
1
|
-
define( function() {
|
2
|
-
|
3
|
-
function addGetHookIf( conditionFn, hookFn ) {
|
4
|
-
|
5
|
-
// Define the hook, we'll check on the first run if it's really needed.
|
6
|
-
return {
|
7
|
-
get: function() {
|
8
|
-
if ( conditionFn() ) {
|
9
|
-
|
10
|
-
// Hook not needed (or it's not possible to use it due
|
11
|
-
// to missing dependency), remove it.
|
12
|
-
delete this.get;
|
13
|
-
return;
|
14
|
-
}
|
15
|
-
|
16
|
-
// Hook needed; redefine it so that the support test is not executed again.
|
17
|
-
return ( this.get = hookFn ).apply( this, arguments );
|
18
|
-
}
|
19
|
-
};
|
20
|
-
}
|
21
|
-
|
22
|
-
return addGetHookIf;
|
23
|
-
|
24
|
-
} );
|