trusty-cms 4.3.1 → 4.3.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (194) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +83 -79
  3. data/app/assets/config/trusty-cms-manifest.js +6 -0
  4. data/app/assets/javascripts/ckeditor/config.js +2 -2
  5. data/app/controllers/admin/assets_controller.rb +1 -1
  6. data/config/database.yml +2 -2
  7. data/coverage/index.html +1 -1
  8. data/lib/trusty_cms/deprecation.rb +13 -0
  9. data/lib/trusty_cms.rb +1 -1
  10. data/node_modules/path-parse/index.js +17 -35
  11. data/node_modules/path-parse/package.json +1 -1
  12. data/node_modules/postcss/CHANGELOG.md +27 -0
  13. data/node_modules/postcss/README.md +21 -0
  14. data/node_modules/postcss/lib/at-rule.js +2 -4
  15. data/node_modules/postcss/lib/comment.js +2 -4
  16. data/node_modules/postcss/lib/container.js +27 -122
  17. data/node_modules/postcss/lib/css-syntax-error.js +5 -7
  18. data/node_modules/postcss/lib/declaration.js +2 -4
  19. data/node_modules/postcss/lib/input.js +3 -5
  20. data/node_modules/postcss/lib/lazy-result.js +10 -17
  21. data/node_modules/postcss/lib/map-generator.js +10 -17
  22. data/node_modules/postcss/lib/node.js +2 -4
  23. data/node_modules/postcss/lib/parser.js +2 -4
  24. data/node_modules/postcss/lib/postcss.d.ts +25 -19
  25. data/node_modules/postcss/lib/previous-map.js +17 -6
  26. data/node_modules/postcss/lib/processor.js +16 -15
  27. data/node_modules/postcss/lib/result.js +2 -4
  28. data/node_modules/postcss/lib/root.js +10 -17
  29. data/node_modules/postcss/lib/rule.js +2 -4
  30. data/node_modules/postcss/lib/stringifier.js +2 -4
  31. data/node_modules/postcss/lib/warning.js +2 -4
  32. data/node_modules/postcss/package.json +16 -12
  33. data/spec/dummy/log/test.log +542 -443
  34. data/spec/dummy/tmp/cache/747/A70/TrustyCms%3A%3AConfig +0 -0
  35. data/spec/dummy/tmp/cache/85C/FA0/TrustyCms.cache_mtime +1 -1
  36. data/trusty-cms-5.0.0.gem +0 -0
  37. data/trusty_cms.gemspec +2 -1
  38. data/yarn.lock +6 -6
  39. metadata +42 -344
  40. data/app/assets/config/trusty-cms/manifest.js +0 -7
  41. data/node_modules/path-parse/test.js +0 -77
  42. data/node_modules/postcss/docs/api/assets/scripts.min.js +0 -8
  43. data/node_modules/postcss/docs/api/assets/styles.min.css +0 -1
  44. data/node_modules/postcss/docs/api/index.html +0 -22716
  45. data/spec/dummy/log/development.log +0 -158
  46. data/spec/dummy/node_modules/jquery/AUTHORS.txt +0 -327
  47. data/spec/dummy/node_modules/jquery/LICENSE.txt +0 -20
  48. data/spec/dummy/node_modules/jquery/README.md +0 -62
  49. data/spec/dummy/node_modules/jquery/bower.json +0 -14
  50. data/spec/dummy/node_modules/jquery/dist/jquery.js +0 -10872
  51. data/spec/dummy/node_modules/jquery/dist/jquery.min.js +0 -2
  52. data/spec/dummy/node_modules/jquery/dist/jquery.min.map +0 -1
  53. data/spec/dummy/node_modules/jquery/dist/jquery.slim.js +0 -8777
  54. data/spec/dummy/node_modules/jquery/dist/jquery.slim.min.js +0 -2
  55. data/spec/dummy/node_modules/jquery/dist/jquery.slim.min.map +0 -1
  56. data/spec/dummy/node_modules/jquery/external/sizzle/LICENSE.txt +0 -36
  57. data/spec/dummy/node_modules/jquery/external/sizzle/dist/sizzle.js +0 -2478
  58. data/spec/dummy/node_modules/jquery/external/sizzle/dist/sizzle.min.js +0 -3
  59. data/spec/dummy/node_modules/jquery/external/sizzle/dist/sizzle.min.map +0 -1
  60. data/spec/dummy/node_modules/jquery/package.json +0 -117
  61. data/spec/dummy/node_modules/jquery/src/ajax/jsonp.js +0 -103
  62. data/spec/dummy/node_modules/jquery/src/ajax/load.js +0 -77
  63. data/spec/dummy/node_modules/jquery/src/ajax/script.js +0 -74
  64. data/spec/dummy/node_modules/jquery/src/ajax/var/location.js +0 -5
  65. data/spec/dummy/node_modules/jquery/src/ajax/var/nonce.js +0 -5
  66. data/spec/dummy/node_modules/jquery/src/ajax/var/rquery.js +0 -5
  67. data/spec/dummy/node_modules/jquery/src/ajax/xhr.js +0 -170
  68. data/spec/dummy/node_modules/jquery/src/ajax.js +0 -873
  69. data/spec/dummy/node_modules/jquery/src/attributes/attr.js +0 -141
  70. data/spec/dummy/node_modules/jquery/src/attributes/classes.js +0 -186
  71. data/spec/dummy/node_modules/jquery/src/attributes/prop.js +0 -143
  72. data/spec/dummy/node_modules/jquery/src/attributes/support.js +0 -33
  73. data/spec/dummy/node_modules/jquery/src/attributes/val.js +0 -191
  74. data/spec/dummy/node_modules/jquery/src/attributes.js +0 -13
  75. data/spec/dummy/node_modules/jquery/src/callbacks.js +0 -236
  76. data/spec/dummy/node_modules/jquery/src/core/DOMEval.js +0 -43
  77. data/spec/dummy/node_modules/jquery/src/core/access.js +0 -72
  78. data/spec/dummy/node_modules/jquery/src/core/camelCase.js +0 -23
  79. data/spec/dummy/node_modules/jquery/src/core/init.js +0 -129
  80. data/spec/dummy/node_modules/jquery/src/core/isAttached.js +0 -26
  81. data/spec/dummy/node_modules/jquery/src/core/nodeName.js +0 -13
  82. data/spec/dummy/node_modules/jquery/src/core/parseHTML.js +0 -65
  83. data/spec/dummy/node_modules/jquery/src/core/parseXML.js +0 -30
  84. data/spec/dummy/node_modules/jquery/src/core/ready-no-deferred.js +0 -97
  85. data/spec/dummy/node_modules/jquery/src/core/ready.js +0 -86
  86. data/spec/dummy/node_modules/jquery/src/core/readyException.js +0 -13
  87. data/spec/dummy/node_modules/jquery/src/core/stripAndCollapse.js +0 -14
  88. data/spec/dummy/node_modules/jquery/src/core/support.js +0 -20
  89. data/spec/dummy/node_modules/jquery/src/core/toType.js +0 -20
  90. data/spec/dummy/node_modules/jquery/src/core/var/rsingleTag.js +0 -7
  91. data/spec/dummy/node_modules/jquery/src/core.js +0 -400
  92. data/spec/dummy/node_modules/jquery/src/css/addGetHookIf.js +0 -26
  93. data/spec/dummy/node_modules/jquery/src/css/adjustCSS.js +0 -74
  94. data/spec/dummy/node_modules/jquery/src/css/curCSS.js +0 -65
  95. data/spec/dummy/node_modules/jquery/src/css/finalPropName.js +0 -42
  96. data/spec/dummy/node_modules/jquery/src/css/hiddenVisibleSelectors.js +0 -15
  97. data/spec/dummy/node_modules/jquery/src/css/showHide.js +0 -105
  98. data/spec/dummy/node_modules/jquery/src/css/support.js +0 -133
  99. data/spec/dummy/node_modules/jquery/src/css/var/cssExpand.js +0 -5
  100. data/spec/dummy/node_modules/jquery/src/css/var/getStyles.js +0 -17
  101. data/spec/dummy/node_modules/jquery/src/css/var/isHiddenWithinTree.js +0 -34
  102. data/spec/dummy/node_modules/jquery/src/css/var/rboxStyle.js +0 -7
  103. data/spec/dummy/node_modules/jquery/src/css/var/rnumnonpx.js +0 -7
  104. data/spec/dummy/node_modules/jquery/src/css/var/swap.js +0 -26
  105. data/spec/dummy/node_modules/jquery/src/css.js +0 -494
  106. data/spec/dummy/node_modules/jquery/src/data/Data.js +0 -162
  107. data/spec/dummy/node_modules/jquery/src/data/var/acceptData.js +0 -19
  108. data/spec/dummy/node_modules/jquery/src/data/var/dataPriv.js +0 -7
  109. data/spec/dummy/node_modules/jquery/src/data/var/dataUser.js +0 -7
  110. data/spec/dummy/node_modules/jquery/src/data.js +0 -180
  111. data/spec/dummy/node_modules/jquery/src/deferred/exceptionHook.js +0 -21
  112. data/spec/dummy/node_modules/jquery/src/deferred.js +0 -399
  113. data/spec/dummy/node_modules/jquery/src/deprecated/ajax-event-alias.js +0 -22
  114. data/spec/dummy/node_modules/jquery/src/deprecated/event.js +0 -48
  115. data/spec/dummy/node_modules/jquery/src/deprecated.js +0 -87
  116. data/spec/dummy/node_modules/jquery/src/dimensions.js +0 -57
  117. data/spec/dummy/node_modules/jquery/src/effects/Tween.js +0 -125
  118. data/spec/dummy/node_modules/jquery/src/effects/animatedSelector.js +0 -15
  119. data/spec/dummy/node_modules/jquery/src/effects.js +0 -701
  120. data/spec/dummy/node_modules/jquery/src/event/focusin.js +0 -58
  121. data/spec/dummy/node_modules/jquery/src/event/support.js +0 -11
  122. data/spec/dummy/node_modules/jquery/src/event/trigger.js +0 -201
  123. data/spec/dummy/node_modules/jquery/src/event.js +0 -892
  124. data/spec/dummy/node_modules/jquery/src/exports/amd.js +0 -26
  125. data/spec/dummy/node_modules/jquery/src/exports/global.js +0 -34
  126. data/spec/dummy/node_modules/jquery/src/jquery.js +0 -41
  127. data/spec/dummy/node_modules/jquery/src/manipulation/_evalUrl.js +0 -32
  128. data/spec/dummy/node_modules/jquery/src/manipulation/buildFragment.js +0 -106
  129. data/spec/dummy/node_modules/jquery/src/manipulation/getAll.js +0 -32
  130. data/spec/dummy/node_modules/jquery/src/manipulation/setGlobalEval.js +0 -22
  131. data/spec/dummy/node_modules/jquery/src/manipulation/support.js +0 -41
  132. data/spec/dummy/node_modules/jquery/src/manipulation/var/rscriptType.js +0 -5
  133. data/spec/dummy/node_modules/jquery/src/manipulation/var/rtagName.js +0 -8
  134. data/spec/dummy/node_modules/jquery/src/manipulation/wrapMap.js +0 -30
  135. data/spec/dummy/node_modules/jquery/src/manipulation.js +0 -480
  136. data/spec/dummy/node_modules/jquery/src/offset.js +0 -238
  137. data/spec/dummy/node_modules/jquery/src/queue/delay.js +0 -24
  138. data/spec/dummy/node_modules/jquery/src/queue.js +0 -145
  139. data/spec/dummy/node_modules/jquery/src/selector-native.js +0 -241
  140. data/spec/dummy/node_modules/jquery/src/selector-sizzle.js +0 -19
  141. data/spec/dummy/node_modules/jquery/src/selector.js +0 -3
  142. data/spec/dummy/node_modules/jquery/src/serialize.js +0 -136
  143. data/spec/dummy/node_modules/jquery/src/traversing/findFilter.js +0 -97
  144. data/spec/dummy/node_modules/jquery/src/traversing/var/dir.js +0 -22
  145. data/spec/dummy/node_modules/jquery/src/traversing/var/rneedsContext.js +0 -8
  146. data/spec/dummy/node_modules/jquery/src/traversing/var/siblings.js +0 -17
  147. data/spec/dummy/node_modules/jquery/src/traversing.js +0 -198
  148. data/spec/dummy/node_modules/jquery/src/var/ObjectFunctionString.js +0 -7
  149. data/spec/dummy/node_modules/jquery/src/var/arr.js +0 -5
  150. data/spec/dummy/node_modules/jquery/src/var/class2type.js +0 -6
  151. data/spec/dummy/node_modules/jquery/src/var/document.js +0 -5
  152. data/spec/dummy/node_modules/jquery/src/var/documentElement.js +0 -7
  153. data/spec/dummy/node_modules/jquery/src/var/flat.js +0 -16
  154. data/spec/dummy/node_modules/jquery/src/var/fnToString.js +0 -7
  155. data/spec/dummy/node_modules/jquery/src/var/getProto.js +0 -5
  156. data/spec/dummy/node_modules/jquery/src/var/hasOwn.js +0 -7
  157. data/spec/dummy/node_modules/jquery/src/var/indexOf.js +0 -7
  158. data/spec/dummy/node_modules/jquery/src/var/isFunction.js +0 -13
  159. data/spec/dummy/node_modules/jquery/src/var/isWindow.js +0 -8
  160. data/spec/dummy/node_modules/jquery/src/var/pnum.js +0 -5
  161. data/spec/dummy/node_modules/jquery/src/var/push.js +0 -7
  162. data/spec/dummy/node_modules/jquery/src/var/rcheckableType.js +0 -5
  163. data/spec/dummy/node_modules/jquery/src/var/rcssNum.js +0 -9
  164. data/spec/dummy/node_modules/jquery/src/var/rnothtmlwhite.js +0 -8
  165. data/spec/dummy/node_modules/jquery/src/var/slice.js +0 -7
  166. data/spec/dummy/node_modules/jquery/src/var/support.js +0 -6
  167. data/spec/dummy/node_modules/jquery/src/var/toString.js +0 -7
  168. data/spec/dummy/node_modules/jquery/src/wrap.js +0 -78
  169. data/spec/dummy/node_modules/jquery-ui-bundle/AUTHORS.txt +0 -333
  170. data/spec/dummy/node_modules/jquery-ui-bundle/LICENSE.txt +0 -43
  171. data/spec/dummy/node_modules/jquery-ui-bundle/external/jquery/jquery.js +0 -11008
  172. data/spec/dummy/node_modules/jquery-ui-bundle/images/ui-icons_444444_256x240.png +0 -0
  173. data/spec/dummy/node_modules/jquery-ui-bundle/images/ui-icons_555555_256x240.png +0 -0
  174. data/spec/dummy/node_modules/jquery-ui-bundle/images/ui-icons_777620_256x240.png +0 -0
  175. data/spec/dummy/node_modules/jquery-ui-bundle/images/ui-icons_777777_256x240.png +0 -0
  176. data/spec/dummy/node_modules/jquery-ui-bundle/images/ui-icons_cc0000_256x240.png +0 -0
  177. data/spec/dummy/node_modules/jquery-ui-bundle/images/ui-icons_ffffff_256x240.png +0 -0
  178. data/spec/dummy/node_modules/jquery-ui-bundle/index.html +0 -559
  179. data/spec/dummy/node_modules/jquery-ui-bundle/jquery-ui.css +0 -1312
  180. data/spec/dummy/node_modules/jquery-ui-bundle/jquery-ui.js +0 -18706
  181. data/spec/dummy/node_modules/jquery-ui-bundle/jquery-ui.min.css +0 -7
  182. data/spec/dummy/node_modules/jquery-ui-bundle/jquery-ui.min.js +0 -13
  183. data/spec/dummy/node_modules/jquery-ui-bundle/jquery-ui.structure.css +0 -886
  184. data/spec/dummy/node_modules/jquery-ui-bundle/jquery-ui.structure.min.css +0 -5
  185. data/spec/dummy/node_modules/jquery-ui-bundle/jquery-ui.theme.css +0 -443
  186. data/spec/dummy/node_modules/jquery-ui-bundle/jquery-ui.theme.min.css +0 -5
  187. data/spec/dummy/node_modules/jquery-ui-bundle/package.json +0 -33
  188. data/spec/dummy/node_modules/jquery-ujs/CONTRIBUTING.md +0 -109
  189. data/spec/dummy/node_modules/jquery-ujs/MIT-LICENSE +0 -20
  190. data/spec/dummy/node_modules/jquery-ujs/README.md +0 -86
  191. data/spec/dummy/node_modules/jquery-ujs/RELEASE.md +0 -23
  192. data/spec/dummy/node_modules/jquery-ujs/bower.json +0 -19
  193. data/spec/dummy/node_modules/jquery-ujs/package.json +0 -26
  194. data/spec/dummy/node_modules/jquery-ujs/src/rails.js +0 -555
@@ -1,24 +0,0 @@
1
- define( [
2
- "../core",
3
- "../queue",
4
- "../effects" // Delay is optional because of this dependency
5
- ], function( jQuery ) {
6
-
7
- "use strict";
8
-
9
- // Based off of the plugin by Clint Helfers, with permission.
10
- // https://web.archive.org/web/20100324014747/http://blindsignals.com/index.php/2009/07/jquery-delay/
11
- jQuery.fn.delay = function( time, type ) {
12
- time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;
13
- type = type || "fx";
14
-
15
- return this.queue( type, function( next, hooks ) {
16
- var timeout = window.setTimeout( next, time );
17
- hooks.stop = function() {
18
- window.clearTimeout( timeout );
19
- };
20
- } );
21
- };
22
-
23
- return jQuery.fn.delay;
24
- } );
@@ -1,145 +0,0 @@
1
- define( [
2
- "./core",
3
- "./data/var/dataPriv",
4
- "./deferred",
5
- "./callbacks"
6
- ], function( jQuery, dataPriv ) {
7
-
8
- "use strict";
9
-
10
- jQuery.extend( {
11
- queue: function( elem, type, data ) {
12
- var queue;
13
-
14
- if ( elem ) {
15
- type = ( type || "fx" ) + "queue";
16
- queue = dataPriv.get( elem, type );
17
-
18
- // Speed up dequeue by getting out quickly if this is just a lookup
19
- if ( data ) {
20
- if ( !queue || Array.isArray( data ) ) {
21
- queue = dataPriv.access( elem, type, jQuery.makeArray( data ) );
22
- } else {
23
- queue.push( data );
24
- }
25
- }
26
- return queue || [];
27
- }
28
- },
29
-
30
- dequeue: function( elem, type ) {
31
- type = type || "fx";
32
-
33
- var queue = jQuery.queue( elem, type ),
34
- startLength = queue.length,
35
- fn = queue.shift(),
36
- hooks = jQuery._queueHooks( elem, type ),
37
- next = function() {
38
- jQuery.dequeue( elem, type );
39
- };
40
-
41
- // If the fx queue is dequeued, always remove the progress sentinel
42
- if ( fn === "inprogress" ) {
43
- fn = queue.shift();
44
- startLength--;
45
- }
46
-
47
- if ( fn ) {
48
-
49
- // Add a progress sentinel to prevent the fx queue from being
50
- // automatically dequeued
51
- if ( type === "fx" ) {
52
- queue.unshift( "inprogress" );
53
- }
54
-
55
- // Clear up the last queue stop function
56
- delete hooks.stop;
57
- fn.call( elem, next, hooks );
58
- }
59
-
60
- if ( !startLength && hooks ) {
61
- hooks.empty.fire();
62
- }
63
- },
64
-
65
- // Not public - generate a queueHooks object, or return the current one
66
- _queueHooks: function( elem, type ) {
67
- var key = type + "queueHooks";
68
- return dataPriv.get( elem, key ) || dataPriv.access( elem, key, {
69
- empty: jQuery.Callbacks( "once memory" ).add( function() {
70
- dataPriv.remove( elem, [ type + "queue", key ] );
71
- } )
72
- } );
73
- }
74
- } );
75
-
76
- jQuery.fn.extend( {
77
- queue: function( type, data ) {
78
- var setter = 2;
79
-
80
- if ( typeof type !== "string" ) {
81
- data = type;
82
- type = "fx";
83
- setter--;
84
- }
85
-
86
- if ( arguments.length < setter ) {
87
- return jQuery.queue( this[ 0 ], type );
88
- }
89
-
90
- return data === undefined ?
91
- this :
92
- this.each( function() {
93
- var queue = jQuery.queue( this, type, data );
94
-
95
- // Ensure a hooks for this queue
96
- jQuery._queueHooks( this, type );
97
-
98
- if ( type === "fx" && queue[ 0 ] !== "inprogress" ) {
99
- jQuery.dequeue( this, type );
100
- }
101
- } );
102
- },
103
- dequeue: function( type ) {
104
- return this.each( function() {
105
- jQuery.dequeue( this, type );
106
- } );
107
- },
108
- clearQueue: function( type ) {
109
- return this.queue( type || "fx", [] );
110
- },
111
-
112
- // Get a promise resolved when queues of a certain type
113
- // are emptied (fx is the type by default)
114
- promise: function( type, obj ) {
115
- var tmp,
116
- count = 1,
117
- defer = jQuery.Deferred(),
118
- elements = this,
119
- i = this.length,
120
- resolve = function() {
121
- if ( !( --count ) ) {
122
- defer.resolveWith( elements, [ elements ] );
123
- }
124
- };
125
-
126
- if ( typeof type !== "string" ) {
127
- obj = type;
128
- type = undefined;
129
- }
130
- type = type || "fx";
131
-
132
- while ( i-- ) {
133
- tmp = dataPriv.get( elements[ i ], type + "queueHooks" );
134
- if ( tmp && tmp.empty ) {
135
- count++;
136
- tmp.empty.add( resolve );
137
- }
138
- }
139
- resolve();
140
- return defer.promise( obj );
141
- }
142
- } );
143
-
144
- return jQuery;
145
- } );
@@ -1,241 +0,0 @@
1
- define( [
2
- "./core",
3
- "./var/document",
4
- "./var/documentElement",
5
- "./var/hasOwn",
6
- "./var/indexOf"
7
- ], function( jQuery, document, documentElement, hasOwn, indexOf ) {
8
-
9
- "use strict";
10
-
11
- /*
12
- * Optional (non-Sizzle) selector module for custom builds.
13
- *
14
- * Note that this DOES NOT SUPPORT many documented jQuery
15
- * features in exchange for its smaller size:
16
- *
17
- * Attribute not equal selector
18
- * Positional selectors (:first; :eq(n); :odd; etc.)
19
- * Type selectors (:input; :checkbox; :button; etc.)
20
- * State-based selectors (:animated; :visible; :hidden; etc.)
21
- * :has(selector)
22
- * :not(complex selector)
23
- * custom selectors via Sizzle extensions
24
- * Leading combinators (e.g., $collection.find("> *"))
25
- * Reliable functionality on XML fragments
26
- * Requiring all parts of a selector to match elements under context
27
- * (e.g., $div.find("div > *") now matches children of $div)
28
- * Matching against non-elements
29
- * Reliable sorting of disconnected nodes
30
- * querySelectorAll bug fixes (e.g., unreliable :focus on WebKit)
31
- *
32
- * If any of these are unacceptable tradeoffs, either use Sizzle or
33
- * customize this stub for the project's specific needs.
34
- */
35
-
36
- var hasDuplicate, sortInput,
37
- rhtmlSuffix = /HTML$/i,
38
- sortStable = jQuery.expando.split( "" ).sort( sortOrder ).join( "" ) === jQuery.expando,
39
- matches = documentElement.matches ||
40
- documentElement.webkitMatchesSelector ||
41
- documentElement.mozMatchesSelector ||
42
- documentElement.oMatchesSelector ||
43
- documentElement.msMatchesSelector,
44
-
45
- // CSS string/identifier serialization
46
- // https://drafts.csswg.org/cssom/#common-serializing-idioms
47
- rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g,
48
- fcssescape = function( ch, asCodePoint ) {
49
- if ( asCodePoint ) {
50
-
51
- // U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER
52
- if ( ch === "\0" ) {
53
- return "\uFFFD";
54
- }
55
-
56
- // Control characters and (dependent upon position) numbers get escaped as code points
57
- return ch.slice( 0, -1 ) + "\\" + ch.charCodeAt( ch.length - 1 ).toString( 16 ) + " ";
58
- }
59
-
60
- // Other potentially-special ASCII characters get backslash-escaped
61
- return "\\" + ch;
62
- };
63
-
64
- function sortOrder( a, b ) {
65
-
66
- // Flag for duplicate removal
67
- if ( a === b ) {
68
- hasDuplicate = true;
69
- return 0;
70
- }
71
-
72
- // Sort on method existence if only one input has compareDocumentPosition
73
- var compare = !a.compareDocumentPosition - !b.compareDocumentPosition;
74
- if ( compare ) {
75
- return compare;
76
- }
77
-
78
- // Calculate position if both inputs belong to the same document
79
- compare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ?
80
- a.compareDocumentPosition( b ) :
81
-
82
- // Otherwise we know they are disconnected
83
- 1;
84
-
85
- // Disconnected nodes
86
- if ( compare & 1 ) {
87
-
88
- // Choose the first element that is related to our preferred document
89
- if ( a === document || a.ownerDocument === document &&
90
- jQuery.contains( document, a ) ) {
91
- return -1;
92
- }
93
- if ( b === document || b.ownerDocument === document &&
94
- jQuery.contains( document, b ) ) {
95
- return 1;
96
- }
97
-
98
- // Maintain original order
99
- return sortInput ?
100
- ( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) :
101
- 0;
102
- }
103
-
104
- return compare & 4 ? -1 : 1;
105
- }
106
-
107
- function uniqueSort( results ) {
108
- var elem,
109
- duplicates = [],
110
- j = 0,
111
- i = 0;
112
-
113
- hasDuplicate = false;
114
- sortInput = !sortStable && results.slice( 0 );
115
- results.sort( sortOrder );
116
-
117
- if ( hasDuplicate ) {
118
- while ( ( elem = results[ i++ ] ) ) {
119
- if ( elem === results[ i ] ) {
120
- j = duplicates.push( i );
121
- }
122
- }
123
- while ( j-- ) {
124
- results.splice( duplicates[ j ], 1 );
125
- }
126
- }
127
-
128
- // Clear input after sorting to release objects
129
- // See https://github.com/jquery/sizzle/pull/225
130
- sortInput = null;
131
-
132
- return results;
133
- }
134
-
135
- function escape( sel ) {
136
- return ( sel + "" ).replace( rcssescape, fcssescape );
137
- }
138
-
139
- jQuery.extend( {
140
- uniqueSort: uniqueSort,
141
- unique: uniqueSort,
142
- escapeSelector: escape,
143
- find: function( selector, context, results, seed ) {
144
- var elem, nodeType,
145
- i = 0;
146
-
147
- results = results || [];
148
- context = context || document;
149
-
150
- // Same basic safeguard as Sizzle
151
- if ( !selector || typeof selector !== "string" ) {
152
- return results;
153
- }
154
-
155
- // Early return if context is not an element or document
156
- if ( ( nodeType = context.nodeType ) !== 1 && nodeType !== 9 ) {
157
- return [];
158
- }
159
-
160
- if ( seed ) {
161
- while ( ( elem = seed[ i++ ] ) ) {
162
- if ( jQuery.find.matchesSelector( elem, selector ) ) {
163
- results.push( elem );
164
- }
165
- }
166
- } else {
167
- jQuery.merge( results, context.querySelectorAll( selector ) );
168
- }
169
-
170
- return results;
171
- },
172
- text: function( elem ) {
173
- var node,
174
- ret = "",
175
- i = 0,
176
- nodeType = elem.nodeType;
177
-
178
- if ( !nodeType ) {
179
-
180
- // If no nodeType, this is expected to be an array
181
- while ( ( node = elem[ i++ ] ) ) {
182
-
183
- // Do not traverse comment nodes
184
- ret += jQuery.text( node );
185
- }
186
- } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {
187
-
188
- // Use textContent for elements
189
- return elem.textContent;
190
- } else if ( nodeType === 3 || nodeType === 4 ) {
191
- return elem.nodeValue;
192
- }
193
-
194
- // Do not include comment or processing instruction nodes
195
-
196
- return ret;
197
- },
198
- contains: function( a, b ) {
199
- var adown = a.nodeType === 9 ? a.documentElement : a,
200
- bup = b && b.parentNode;
201
- return a === bup || !!( bup && bup.nodeType === 1 && adown.contains( bup ) );
202
- },
203
- isXMLDoc: function( elem ) {
204
- var namespace = elem.namespaceURI,
205
- documentElement = ( elem.ownerDocument || elem ).documentElement;
206
-
207
- // Assume HTML when documentElement doesn't yet exist, such as inside
208
- // document fragments.
209
- return !rhtmlSuffix.test( namespace ||
210
- documentElement && documentElement.nodeName ||
211
- "HTML" );
212
- },
213
- expr: {
214
- attrHandle: {},
215
- match: {
216
- bool: new RegExp( "^(?:checked|selected|async|autofocus|autoplay|controls|defer" +
217
- "|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped)$", "i" ),
218
- needsContext: /^[\x20\t\r\n\f]*[>+~]/
219
- }
220
- }
221
- } );
222
-
223
- jQuery.extend( jQuery.find, {
224
- matches: function( expr, elements ) {
225
- return jQuery.find( expr, null, null, elements );
226
- },
227
- matchesSelector: function( elem, expr ) {
228
- return matches.call( elem, expr );
229
- },
230
- attr: function( elem, name ) {
231
- var fn = jQuery.expr.attrHandle[ name.toLowerCase() ],
232
-
233
- // Don't get fooled by Object.prototype properties (jQuery #13807)
234
- value = fn && hasOwn.call( jQuery.expr.attrHandle, name.toLowerCase() ) ?
235
- fn( elem, name, jQuery.isXMLDoc( elem ) ) :
236
- undefined;
237
- return value !== undefined ? value : elem.getAttribute( name );
238
- }
239
- } );
240
-
241
- } );
@@ -1,19 +0,0 @@
1
- define( [
2
- "./core",
3
- "../external/sizzle/dist/sizzle"
4
- ], function( jQuery, Sizzle ) {
5
-
6
- "use strict";
7
-
8
- jQuery.find = Sizzle;
9
- jQuery.expr = Sizzle.selectors;
10
-
11
- // Deprecated
12
- jQuery.expr[ ":" ] = jQuery.expr.pseudos;
13
- jQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort;
14
- jQuery.text = Sizzle.getText;
15
- jQuery.isXMLDoc = Sizzle.isXML;
16
- jQuery.contains = Sizzle.contains;
17
- jQuery.escapeSelector = Sizzle.escape;
18
-
19
- } );
@@ -1,3 +0,0 @@
1
- define( [ "./selector-sizzle" ], function() {
2
- "use strict";
3
- } );
@@ -1,136 +0,0 @@
1
- define( [
2
- "./core",
3
- "./core/toType",
4
- "./var/rcheckableType",
5
- "./var/isFunction",
6
- "./core/init",
7
- "./traversing", // filter
8
- "./attributes/prop"
9
- ], function( jQuery, toType, rcheckableType, isFunction ) {
10
-
11
- "use strict";
12
-
13
- var
14
- rbracket = /\[\]$/,
15
- rCRLF = /\r?\n/g,
16
- rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,
17
- rsubmittable = /^(?:input|select|textarea|keygen)/i;
18
-
19
- function buildParams( prefix, obj, traditional, add ) {
20
- var name;
21
-
22
- if ( Array.isArray( obj ) ) {
23
-
24
- // Serialize array item.
25
- jQuery.each( obj, function( i, v ) {
26
- if ( traditional || rbracket.test( prefix ) ) {
27
-
28
- // Treat each array item as a scalar.
29
- add( prefix, v );
30
-
31
- } else {
32
-
33
- // Item is non-scalar (array or object), encode its numeric index.
34
- buildParams(
35
- prefix + "[" + ( typeof v === "object" && v != null ? i : "" ) + "]",
36
- v,
37
- traditional,
38
- add
39
- );
40
- }
41
- } );
42
-
43
- } else if ( !traditional && toType( obj ) === "object" ) {
44
-
45
- // Serialize object item.
46
- for ( name in obj ) {
47
- buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add );
48
- }
49
-
50
- } else {
51
-
52
- // Serialize scalar item.
53
- add( prefix, obj );
54
- }
55
- }
56
-
57
- // Serialize an array of form elements or a set of
58
- // key/values into a query string
59
- jQuery.param = function( a, traditional ) {
60
- var prefix,
61
- s = [],
62
- add = function( key, valueOrFunction ) {
63
-
64
- // If value is a function, invoke it and use its return value
65
- var value = isFunction( valueOrFunction ) ?
66
- valueOrFunction() :
67
- valueOrFunction;
68
-
69
- s[ s.length ] = encodeURIComponent( key ) + "=" +
70
- encodeURIComponent( value == null ? "" : value );
71
- };
72
-
73
- if ( a == null ) {
74
- return "";
75
- }
76
-
77
- // If an array was passed in, assume that it is an array of form elements.
78
- if ( Array.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {
79
-
80
- // Serialize the form elements
81
- jQuery.each( a, function() {
82
- add( this.name, this.value );
83
- } );
84
-
85
- } else {
86
-
87
- // If traditional, encode the "old" way (the way 1.3.2 or older
88
- // did it), otherwise encode params recursively.
89
- for ( prefix in a ) {
90
- buildParams( prefix, a[ prefix ], traditional, add );
91
- }
92
- }
93
-
94
- // Return the resulting serialization
95
- return s.join( "&" );
96
- };
97
-
98
- jQuery.fn.extend( {
99
- serialize: function() {
100
- return jQuery.param( this.serializeArray() );
101
- },
102
- serializeArray: function() {
103
- return this.map( function() {
104
-
105
- // Can add propHook for "elements" to filter or add form elements
106
- var elements = jQuery.prop( this, "elements" );
107
- return elements ? jQuery.makeArray( elements ) : this;
108
- } )
109
- .filter( function() {
110
- var type = this.type;
111
-
112
- // Use .is( ":disabled" ) so that fieldset[disabled] works
113
- return this.name && !jQuery( this ).is( ":disabled" ) &&
114
- rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&
115
- ( this.checked || !rcheckableType.test( type ) );
116
- } )
117
- .map( function( _i, elem ) {
118
- var val = jQuery( this ).val();
119
-
120
- if ( val == null ) {
121
- return null;
122
- }
123
-
124
- if ( Array.isArray( val ) ) {
125
- return jQuery.map( val, function( val ) {
126
- return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
127
- } );
128
- }
129
-
130
- return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
131
- } ).get();
132
- }
133
- } );
134
-
135
- return jQuery;
136
- } );
@@ -1,97 +0,0 @@
1
- define( [
2
- "../core",
3
- "../var/indexOf",
4
- "../var/isFunction",
5
- "./var/rneedsContext",
6
- "../selector"
7
- ], function( jQuery, indexOf, isFunction, rneedsContext ) {
8
-
9
- "use strict";
10
-
11
- // Implement the identical functionality for filter and not
12
- function winnow( elements, qualifier, not ) {
13
- if ( isFunction( qualifier ) ) {
14
- return jQuery.grep( elements, function( elem, i ) {
15
- return !!qualifier.call( elem, i, elem ) !== not;
16
- } );
17
- }
18
-
19
- // Single element
20
- if ( qualifier.nodeType ) {
21
- return jQuery.grep( elements, function( elem ) {
22
- return ( elem === qualifier ) !== not;
23
- } );
24
- }
25
-
26
- // Arraylike of elements (jQuery, arguments, Array)
27
- if ( typeof qualifier !== "string" ) {
28
- return jQuery.grep( elements, function( elem ) {
29
- return ( indexOf.call( qualifier, elem ) > -1 ) !== not;
30
- } );
31
- }
32
-
33
- // Filtered directly for both simple and complex selectors
34
- return jQuery.filter( qualifier, elements, not );
35
- }
36
-
37
- jQuery.filter = function( expr, elems, not ) {
38
- var elem = elems[ 0 ];
39
-
40
- if ( not ) {
41
- expr = ":not(" + expr + ")";
42
- }
43
-
44
- if ( elems.length === 1 && elem.nodeType === 1 ) {
45
- return jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [];
46
- }
47
-
48
- return jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {
49
- return elem.nodeType === 1;
50
- } ) );
51
- };
52
-
53
- jQuery.fn.extend( {
54
- find: function( selector ) {
55
- var i, ret,
56
- len = this.length,
57
- self = this;
58
-
59
- if ( typeof selector !== "string" ) {
60
- return this.pushStack( jQuery( selector ).filter( function() {
61
- for ( i = 0; i < len; i++ ) {
62
- if ( jQuery.contains( self[ i ], this ) ) {
63
- return true;
64
- }
65
- }
66
- } ) );
67
- }
68
-
69
- ret = this.pushStack( [] );
70
-
71
- for ( i = 0; i < len; i++ ) {
72
- jQuery.find( selector, self[ i ], ret );
73
- }
74
-
75
- return len > 1 ? jQuery.uniqueSort( ret ) : ret;
76
- },
77
- filter: function( selector ) {
78
- return this.pushStack( winnow( this, selector || [], false ) );
79
- },
80
- not: function( selector ) {
81
- return this.pushStack( winnow( this, selector || [], true ) );
82
- },
83
- is: function( selector ) {
84
- return !!winnow(
85
- this,
86
-
87
- // If this is a positional/relative selector, check membership in the returned set
88
- // so $("p:first").is("p:last") won't return true for a doc with two "p".
89
- typeof selector === "string" && rneedsContext.test( selector ) ?
90
- jQuery( selector ) :
91
- selector || [],
92
- false
93
- ).length;
94
- }
95
- } );
96
-
97
- } );
@@ -1,22 +0,0 @@
1
- define( [
2
- "../../core"
3
- ], function( jQuery ) {
4
-
5
- "use strict";
6
-
7
- return function( elem, dir, until ) {
8
- var matched = [],
9
- truncate = until !== undefined;
10
-
11
- while ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) {
12
- if ( elem.nodeType === 1 ) {
13
- if ( truncate && jQuery( elem ).is( until ) ) {
14
- break;
15
- }
16
- matched.push( elem );
17
- }
18
- }
19
- return matched;
20
- };
21
-
22
- } );
@@ -1,8 +0,0 @@
1
- define( [
2
- "../../core",
3
- "../../selector"
4
- ], function( jQuery ) {
5
- "use strict";
6
-
7
- return jQuery.expr.match.needsContext;
8
- } );