trusty-cms 4.2.2 → 4.3.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.
Files changed (200) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +2 -1
  3. data/Gemfile.lock +98 -89
  4. data/app/assets/config/trusty-cms/manifest.js +7 -0
  5. data/app/assets/javascripts/admin/custom_file_upload.js +7 -0
  6. data/app/controllers/admin/assets_controller.rb +1 -1
  7. data/app/models/page.rb +2 -2
  8. data/app/views/admin/assets/new.html.haml +2 -0
  9. data/config/database.yml +4 -0
  10. data/config/initializers/assets.rb +0 -4
  11. data/coverage/index.html +155 -155
  12. data/lib/trusty_cms.rb +1 -1
  13. data/node_modules/hosted-git-info/CHANGELOG.md +10 -0
  14. data/node_modules/hosted-git-info/index.js +2 -2
  15. data/node_modules/hosted-git-info/package.json +1 -1
  16. data/node_modules/lodash/README.md +2 -2
  17. data/node_modules/lodash/_baseClone.js +2 -1
  18. data/node_modules/lodash/_baseOrderBy.js +17 -2
  19. data/node_modules/lodash/_baseSet.js +4 -0
  20. data/node_modules/lodash/_baseSortedIndexBy.js +7 -4
  21. data/node_modules/lodash/_baseTrim.js +19 -0
  22. data/node_modules/lodash/_equalArrays.js +5 -4
  23. data/node_modules/lodash/_equalObjects.js +5 -4
  24. data/node_modules/lodash/_trimmedEndIndex.js +19 -0
  25. data/node_modules/lodash/core.js +48 -6
  26. data/node_modules/lodash/core.min.js +9 -9
  27. data/node_modules/lodash/filter.js +4 -0
  28. data/node_modules/lodash/flake.lock +40 -0
  29. data/node_modules/lodash/flake.nix +20 -0
  30. data/node_modules/lodash/lodash.js +59 -11
  31. data/node_modules/lodash/lodash.min.js +126 -125
  32. data/node_modules/lodash/matches.js +7 -0
  33. data/node_modules/lodash/matchesProperty.js +7 -0
  34. data/node_modules/lodash/overEvery.js +4 -0
  35. data/node_modules/lodash/overSome.js +7 -0
  36. data/node_modules/lodash/package.json +1 -1
  37. data/node_modules/lodash/parseInt.js +1 -1
  38. data/node_modules/lodash/release.md +48 -0
  39. data/node_modules/lodash/sortBy.js +3 -3
  40. data/node_modules/lodash/template.js +24 -5
  41. data/node_modules/lodash/toNumber.js +3 -5
  42. data/node_modules/lodash/trim.js +2 -4
  43. data/node_modules/lodash/trimEnd.js +3 -5
  44. data/node_modules/lodash/trimStart.js +1 -1
  45. data/spec/dummy/log/development.log +9 -163
  46. data/spec/dummy/log/test.log +536 -0
  47. data/spec/dummy/node_modules/jquery-ui-bundle/AUTHORS.txt +333 -0
  48. data/spec/dummy/node_modules/jquery-ui-bundle/LICENSE.txt +43 -0
  49. data/spec/dummy/node_modules/jquery-ui-bundle/external/jquery/jquery.js +11008 -0
  50. data/spec/dummy/node_modules/jquery-ui-bundle/images/ui-icons_444444_256x240.png +0 -0
  51. data/spec/dummy/node_modules/jquery-ui-bundle/images/ui-icons_555555_256x240.png +0 -0
  52. data/spec/dummy/node_modules/jquery-ui-bundle/images/ui-icons_777620_256x240.png +0 -0
  53. data/spec/dummy/node_modules/jquery-ui-bundle/images/ui-icons_777777_256x240.png +0 -0
  54. data/spec/dummy/node_modules/jquery-ui-bundle/images/ui-icons_cc0000_256x240.png +0 -0
  55. data/spec/dummy/node_modules/jquery-ui-bundle/images/ui-icons_ffffff_256x240.png +0 -0
  56. data/spec/dummy/node_modules/jquery-ui-bundle/index.html +559 -0
  57. data/spec/dummy/node_modules/jquery-ui-bundle/jquery-ui.css +1312 -0
  58. data/spec/dummy/node_modules/jquery-ui-bundle/jquery-ui.js +18706 -0
  59. data/spec/dummy/node_modules/jquery-ui-bundle/jquery-ui.min.css +7 -0
  60. data/spec/dummy/node_modules/jquery-ui-bundle/jquery-ui.min.js +13 -0
  61. data/spec/dummy/node_modules/jquery-ui-bundle/jquery-ui.structure.css +886 -0
  62. data/spec/dummy/node_modules/jquery-ui-bundle/jquery-ui.structure.min.css +5 -0
  63. data/spec/dummy/node_modules/jquery-ui-bundle/jquery-ui.theme.css +443 -0
  64. data/spec/dummy/node_modules/jquery-ui-bundle/jquery-ui.theme.min.css +5 -0
  65. data/spec/dummy/node_modules/jquery-ui-bundle/package.json +33 -0
  66. data/spec/dummy/node_modules/jquery-ujs/CONTRIBUTING.md +109 -0
  67. data/spec/dummy/node_modules/jquery-ujs/MIT-LICENSE +20 -0
  68. data/spec/dummy/node_modules/jquery-ujs/README.md +86 -0
  69. data/spec/dummy/node_modules/jquery-ujs/RELEASE.md +23 -0
  70. data/spec/dummy/node_modules/jquery-ujs/bower.json +19 -0
  71. data/spec/dummy/node_modules/jquery-ujs/package.json +26 -0
  72. data/spec/dummy/node_modules/jquery-ujs/src/rails.js +555 -0
  73. data/spec/dummy/node_modules/jquery/AUTHORS.txt +327 -0
  74. data/spec/dummy/node_modules/jquery/LICENSE.txt +20 -0
  75. data/spec/dummy/node_modules/jquery/README.md +62 -0
  76. data/spec/dummy/node_modules/jquery/bower.json +14 -0
  77. data/spec/dummy/node_modules/jquery/dist/jquery.js +10872 -0
  78. data/spec/dummy/node_modules/jquery/dist/jquery.min.js +2 -0
  79. data/spec/dummy/node_modules/jquery/dist/jquery.min.map +1 -0
  80. data/spec/dummy/node_modules/jquery/dist/jquery.slim.js +8777 -0
  81. data/spec/dummy/node_modules/jquery/dist/jquery.slim.min.js +2 -0
  82. data/spec/dummy/node_modules/jquery/dist/jquery.slim.min.map +1 -0
  83. data/spec/dummy/node_modules/jquery/external/sizzle/LICENSE.txt +36 -0
  84. data/spec/dummy/node_modules/jquery/external/sizzle/dist/sizzle.js +2478 -0
  85. data/spec/dummy/node_modules/jquery/external/sizzle/dist/sizzle.min.js +3 -0
  86. data/spec/dummy/node_modules/jquery/external/sizzle/dist/sizzle.min.map +1 -0
  87. data/spec/dummy/node_modules/jquery/package.json +117 -0
  88. data/spec/dummy/node_modules/jquery/src/ajax.js +873 -0
  89. data/spec/dummy/node_modules/jquery/src/ajax/jsonp.js +103 -0
  90. data/spec/dummy/node_modules/jquery/src/ajax/load.js +77 -0
  91. data/spec/dummy/node_modules/jquery/src/ajax/script.js +74 -0
  92. data/spec/dummy/node_modules/jquery/src/ajax/var/location.js +5 -0
  93. data/spec/dummy/node_modules/jquery/src/ajax/var/nonce.js +5 -0
  94. data/spec/dummy/node_modules/jquery/src/ajax/var/rquery.js +5 -0
  95. data/spec/dummy/node_modules/jquery/src/ajax/xhr.js +170 -0
  96. data/spec/dummy/node_modules/jquery/src/attributes.js +13 -0
  97. data/spec/dummy/node_modules/jquery/src/attributes/attr.js +141 -0
  98. data/spec/dummy/node_modules/jquery/src/attributes/classes.js +186 -0
  99. data/spec/dummy/node_modules/jquery/src/attributes/prop.js +143 -0
  100. data/spec/dummy/node_modules/jquery/src/attributes/support.js +33 -0
  101. data/spec/dummy/node_modules/jquery/src/attributes/val.js +191 -0
  102. data/spec/dummy/node_modules/jquery/src/callbacks.js +236 -0
  103. data/spec/dummy/node_modules/jquery/src/core.js +400 -0
  104. data/spec/dummy/node_modules/jquery/src/core/DOMEval.js +43 -0
  105. data/spec/dummy/node_modules/jquery/src/core/access.js +72 -0
  106. data/spec/dummy/node_modules/jquery/src/core/camelCase.js +23 -0
  107. data/spec/dummy/node_modules/jquery/src/core/init.js +129 -0
  108. data/spec/dummy/node_modules/jquery/src/core/isAttached.js +26 -0
  109. data/spec/dummy/node_modules/jquery/src/core/nodeName.js +13 -0
  110. data/spec/dummy/node_modules/jquery/src/core/parseHTML.js +65 -0
  111. data/spec/dummy/node_modules/jquery/src/core/parseXML.js +30 -0
  112. data/spec/dummy/node_modules/jquery/src/core/ready-no-deferred.js +97 -0
  113. data/spec/dummy/node_modules/jquery/src/core/ready.js +86 -0
  114. data/spec/dummy/node_modules/jquery/src/core/readyException.js +13 -0
  115. data/spec/dummy/node_modules/jquery/src/core/stripAndCollapse.js +14 -0
  116. data/spec/dummy/node_modules/jquery/src/core/support.js +20 -0
  117. data/spec/dummy/node_modules/jquery/src/core/toType.js +20 -0
  118. data/spec/dummy/node_modules/jquery/src/core/var/rsingleTag.js +7 -0
  119. data/spec/dummy/node_modules/jquery/src/css.js +494 -0
  120. data/spec/dummy/node_modules/jquery/src/css/addGetHookIf.js +26 -0
  121. data/spec/dummy/node_modules/jquery/src/css/adjustCSS.js +74 -0
  122. data/spec/dummy/node_modules/jquery/src/css/curCSS.js +65 -0
  123. data/spec/dummy/node_modules/jquery/src/css/finalPropName.js +42 -0
  124. data/spec/dummy/node_modules/jquery/src/css/hiddenVisibleSelectors.js +15 -0
  125. data/spec/dummy/node_modules/jquery/src/css/showHide.js +105 -0
  126. data/spec/dummy/node_modules/jquery/src/css/support.js +133 -0
  127. data/spec/dummy/node_modules/jquery/src/css/var/cssExpand.js +5 -0
  128. data/spec/dummy/node_modules/jquery/src/css/var/getStyles.js +17 -0
  129. data/spec/dummy/node_modules/jquery/src/css/var/isHiddenWithinTree.js +34 -0
  130. data/spec/dummy/node_modules/jquery/src/css/var/rboxStyle.js +7 -0
  131. data/spec/dummy/node_modules/jquery/src/css/var/rnumnonpx.js +7 -0
  132. data/spec/dummy/node_modules/jquery/src/css/var/swap.js +26 -0
  133. data/spec/dummy/node_modules/jquery/src/data.js +180 -0
  134. data/spec/dummy/node_modules/jquery/src/data/Data.js +162 -0
  135. data/spec/dummy/node_modules/jquery/src/data/var/acceptData.js +19 -0
  136. data/spec/dummy/node_modules/jquery/src/data/var/dataPriv.js +7 -0
  137. data/spec/dummy/node_modules/jquery/src/data/var/dataUser.js +7 -0
  138. data/spec/dummy/node_modules/jquery/src/deferred.js +399 -0
  139. data/spec/dummy/node_modules/jquery/src/deferred/exceptionHook.js +21 -0
  140. data/spec/dummy/node_modules/jquery/src/deprecated.js +87 -0
  141. data/spec/dummy/node_modules/jquery/src/deprecated/ajax-event-alias.js +22 -0
  142. data/spec/dummy/node_modules/jquery/src/deprecated/event.js +48 -0
  143. data/spec/dummy/node_modules/jquery/src/dimensions.js +57 -0
  144. data/spec/dummy/node_modules/jquery/src/effects.js +701 -0
  145. data/spec/dummy/node_modules/jquery/src/effects/Tween.js +125 -0
  146. data/spec/dummy/node_modules/jquery/src/effects/animatedSelector.js +15 -0
  147. data/spec/dummy/node_modules/jquery/src/event.js +892 -0
  148. data/spec/dummy/node_modules/jquery/src/event/focusin.js +58 -0
  149. data/spec/dummy/node_modules/jquery/src/event/support.js +11 -0
  150. data/spec/dummy/node_modules/jquery/src/event/trigger.js +201 -0
  151. data/spec/dummy/node_modules/jquery/src/exports/amd.js +26 -0
  152. data/spec/dummy/node_modules/jquery/src/exports/global.js +34 -0
  153. data/spec/dummy/node_modules/jquery/src/jquery.js +41 -0
  154. data/spec/dummy/node_modules/jquery/src/manipulation.js +480 -0
  155. data/spec/dummy/node_modules/jquery/src/manipulation/_evalUrl.js +32 -0
  156. data/spec/dummy/node_modules/jquery/src/manipulation/buildFragment.js +106 -0
  157. data/spec/dummy/node_modules/jquery/src/manipulation/getAll.js +32 -0
  158. data/spec/dummy/node_modules/jquery/src/manipulation/setGlobalEval.js +22 -0
  159. data/spec/dummy/node_modules/jquery/src/manipulation/support.js +41 -0
  160. data/spec/dummy/node_modules/jquery/src/manipulation/var/rscriptType.js +5 -0
  161. data/spec/dummy/node_modules/jquery/src/manipulation/var/rtagName.js +8 -0
  162. data/spec/dummy/node_modules/jquery/src/manipulation/wrapMap.js +30 -0
  163. data/spec/dummy/node_modules/jquery/src/offset.js +238 -0
  164. data/spec/dummy/node_modules/jquery/src/queue.js +145 -0
  165. data/spec/dummy/node_modules/jquery/src/queue/delay.js +24 -0
  166. data/spec/dummy/node_modules/jquery/src/selector-native.js +241 -0
  167. data/spec/dummy/node_modules/jquery/src/selector-sizzle.js +19 -0
  168. data/spec/dummy/node_modules/jquery/src/selector.js +3 -0
  169. data/spec/dummy/node_modules/jquery/src/serialize.js +136 -0
  170. data/spec/dummy/node_modules/jquery/src/traversing.js +198 -0
  171. data/spec/dummy/node_modules/jquery/src/traversing/findFilter.js +97 -0
  172. data/spec/dummy/node_modules/jquery/src/traversing/var/dir.js +22 -0
  173. data/spec/dummy/node_modules/jquery/src/traversing/var/rneedsContext.js +8 -0
  174. data/spec/dummy/node_modules/jquery/src/traversing/var/siblings.js +17 -0
  175. data/spec/dummy/node_modules/jquery/src/var/ObjectFunctionString.js +7 -0
  176. data/spec/dummy/node_modules/jquery/src/var/arr.js +5 -0
  177. data/spec/dummy/node_modules/jquery/src/var/class2type.js +6 -0
  178. data/spec/dummy/node_modules/jquery/src/var/document.js +5 -0
  179. data/spec/dummy/node_modules/jquery/src/var/documentElement.js +7 -0
  180. data/spec/dummy/node_modules/jquery/src/var/flat.js +16 -0
  181. data/spec/dummy/node_modules/jquery/src/var/fnToString.js +7 -0
  182. data/spec/dummy/node_modules/jquery/src/var/getProto.js +5 -0
  183. data/spec/dummy/node_modules/jquery/src/var/hasOwn.js +7 -0
  184. data/spec/dummy/node_modules/jquery/src/var/indexOf.js +7 -0
  185. data/spec/dummy/node_modules/jquery/src/var/isFunction.js +13 -0
  186. data/spec/dummy/node_modules/jquery/src/var/isWindow.js +8 -0
  187. data/spec/dummy/node_modules/jquery/src/var/pnum.js +5 -0
  188. data/spec/dummy/node_modules/jquery/src/var/push.js +7 -0
  189. data/spec/dummy/node_modules/jquery/src/var/rcheckableType.js +5 -0
  190. data/spec/dummy/node_modules/jquery/src/var/rcssNum.js +9 -0
  191. data/spec/dummy/node_modules/jquery/src/var/rnothtmlwhite.js +8 -0
  192. data/spec/dummy/node_modules/jquery/src/var/slice.js +7 -0
  193. data/spec/dummy/node_modules/jquery/src/var/support.js +6 -0
  194. data/spec/dummy/node_modules/jquery/src/var/toString.js +7 -0
  195. data/spec/dummy/node_modules/jquery/src/wrap.js +78 -0
  196. data/spec/dummy/tmp/cache/747/A70/TrustyCms%3A%3AConfig +5 -0
  197. data/spec/dummy/tmp/cache/85C/FA0/TrustyCms.cache_mtime +1 -0
  198. data/trusty_cms.gemspec +3 -2
  199. data/yarn.lock +9 -9
  200. metadata +354 -50
@@ -0,0 +1,32 @@
1
+ define( [
2
+ "../ajax"
3
+ ], function( jQuery ) {
4
+
5
+ "use strict";
6
+
7
+ jQuery._evalUrl = function( url, options, doc ) {
8
+ return jQuery.ajax( {
9
+ url: url,
10
+
11
+ // Make this explicit, since user can override this through ajaxSetup (#11264)
12
+ type: "GET",
13
+ dataType: "script",
14
+ cache: true,
15
+ async: false,
16
+ global: false,
17
+
18
+ // Only evaluate the response if it is successful (gh-4126)
19
+ // dataFilter is not invoked for failure responses, so using it instead
20
+ // of the default converter is kludgy but it works.
21
+ converters: {
22
+ "text script": function() {}
23
+ },
24
+ dataFilter: function( response ) {
25
+ jQuery.globalEval( response, options, doc );
26
+ }
27
+ } );
28
+ };
29
+
30
+ return jQuery._evalUrl;
31
+
32
+ } );
@@ -0,0 +1,106 @@
1
+ define( [
2
+ "../core",
3
+ "../core/toType",
4
+ "../core/isAttached",
5
+ "./var/rtagName",
6
+ "./var/rscriptType",
7
+ "./wrapMap",
8
+ "./getAll",
9
+ "./setGlobalEval"
10
+ ], function( jQuery, toType, isAttached, rtagName, rscriptType, wrapMap, getAll, setGlobalEval ) {
11
+
12
+ "use strict";
13
+
14
+ var rhtml = /<|&#?\w+;/;
15
+
16
+ function buildFragment( elems, context, scripts, selection, ignored ) {
17
+ var elem, tmp, tag, wrap, attached, j,
18
+ fragment = context.createDocumentFragment(),
19
+ nodes = [],
20
+ i = 0,
21
+ l = elems.length;
22
+
23
+ for ( ; i < l; i++ ) {
24
+ elem = elems[ i ];
25
+
26
+ if ( elem || elem === 0 ) {
27
+
28
+ // Add nodes directly
29
+ if ( toType( elem ) === "object" ) {
30
+
31
+ // Support: Android <=4.0 only, PhantomJS 1 only
32
+ // push.apply(_, arraylike) throws on ancient WebKit
33
+ jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );
34
+
35
+ // Convert non-html into a text node
36
+ } else if ( !rhtml.test( elem ) ) {
37
+ nodes.push( context.createTextNode( elem ) );
38
+
39
+ // Convert html into DOM nodes
40
+ } else {
41
+ tmp = tmp || fragment.appendChild( context.createElement( "div" ) );
42
+
43
+ // Deserialize a standard representation
44
+ tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase();
45
+ wrap = wrapMap[ tag ] || wrapMap._default;
46
+ tmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ];
47
+
48
+ // Descend through wrappers to the right content
49
+ j = wrap[ 0 ];
50
+ while ( j-- ) {
51
+ tmp = tmp.lastChild;
52
+ }
53
+
54
+ // Support: Android <=4.0 only, PhantomJS 1 only
55
+ // push.apply(_, arraylike) throws on ancient WebKit
56
+ jQuery.merge( nodes, tmp.childNodes );
57
+
58
+ // Remember the top-level container
59
+ tmp = fragment.firstChild;
60
+
61
+ // Ensure the created nodes are orphaned (#12392)
62
+ tmp.textContent = "";
63
+ }
64
+ }
65
+ }
66
+
67
+ // Remove wrapper from fragment
68
+ fragment.textContent = "";
69
+
70
+ i = 0;
71
+ while ( ( elem = nodes[ i++ ] ) ) {
72
+
73
+ // Skip elements already in the context collection (trac-4087)
74
+ if ( selection && jQuery.inArray( elem, selection ) > -1 ) {
75
+ if ( ignored ) {
76
+ ignored.push( elem );
77
+ }
78
+ continue;
79
+ }
80
+
81
+ attached = isAttached( elem );
82
+
83
+ // Append to fragment
84
+ tmp = getAll( fragment.appendChild( elem ), "script" );
85
+
86
+ // Preserve script evaluation history
87
+ if ( attached ) {
88
+ setGlobalEval( tmp );
89
+ }
90
+
91
+ // Capture executables
92
+ if ( scripts ) {
93
+ j = 0;
94
+ while ( ( elem = tmp[ j++ ] ) ) {
95
+ if ( rscriptType.test( elem.type || "" ) ) {
96
+ scripts.push( elem );
97
+ }
98
+ }
99
+ }
100
+ }
101
+
102
+ return fragment;
103
+ }
104
+
105
+ return buildFragment;
106
+ } );
@@ -0,0 +1,32 @@
1
+ define( [
2
+ "../core",
3
+ "../core/nodeName"
4
+ ], function( jQuery, nodeName ) {
5
+
6
+ "use strict";
7
+
8
+ function getAll( context, tag ) {
9
+
10
+ // Support: IE <=9 - 11 only
11
+ // Use typeof to avoid zero-argument method invocation on host objects (#15151)
12
+ var ret;
13
+
14
+ if ( typeof context.getElementsByTagName !== "undefined" ) {
15
+ ret = context.getElementsByTagName( tag || "*" );
16
+
17
+ } else if ( typeof context.querySelectorAll !== "undefined" ) {
18
+ ret = context.querySelectorAll( tag || "*" );
19
+
20
+ } else {
21
+ ret = [];
22
+ }
23
+
24
+ if ( tag === undefined || tag && nodeName( context, tag ) ) {
25
+ return jQuery.merge( [ context ], ret );
26
+ }
27
+
28
+ return ret;
29
+ }
30
+
31
+ return getAll;
32
+ } );
@@ -0,0 +1,22 @@
1
+ define( [
2
+ "../data/var/dataPriv"
3
+ ], function( dataPriv ) {
4
+
5
+ "use strict";
6
+
7
+ // Mark scripts as having already been evaluated
8
+ function setGlobalEval( elems, refElements ) {
9
+ var i = 0,
10
+ l = elems.length;
11
+
12
+ for ( ; i < l; i++ ) {
13
+ dataPriv.set(
14
+ elems[ i ],
15
+ "globalEval",
16
+ !refElements || dataPriv.get( refElements[ i ], "globalEval" )
17
+ );
18
+ }
19
+ }
20
+
21
+ return setGlobalEval;
22
+ } );
@@ -0,0 +1,41 @@
1
+ define( [
2
+ "../var/document",
3
+ "../var/support"
4
+ ], function( document, support ) {
5
+
6
+ "use strict";
7
+
8
+ ( function() {
9
+ var fragment = document.createDocumentFragment(),
10
+ div = fragment.appendChild( document.createElement( "div" ) ),
11
+ input = document.createElement( "input" );
12
+
13
+ // Support: Android 4.0 - 4.3 only
14
+ // Check state lost if the name is set (#11217)
15
+ // Support: Windows Web Apps (WWA)
16
+ // `name` and `type` must use .setAttribute for WWA (#14901)
17
+ input.setAttribute( "type", "radio" );
18
+ input.setAttribute( "checked", "checked" );
19
+ input.setAttribute( "name", "t" );
20
+
21
+ div.appendChild( input );
22
+
23
+ // Support: Android <=4.1 only
24
+ // Older WebKit doesn't clone checked state correctly in fragments
25
+ support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked;
26
+
27
+ // Support: IE <=11 only
28
+ // Make sure textarea (and checkbox) defaultValue is properly cloned
29
+ div.innerHTML = "<textarea>x</textarea>";
30
+ support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;
31
+
32
+ // Support: IE <=9 only
33
+ // IE <=9 replaces <option> tags with their contents when inserted outside of
34
+ // the select element.
35
+ div.innerHTML = "<option></option>";
36
+ support.option = !!div.lastChild;
37
+ } )();
38
+
39
+ return support;
40
+
41
+ } );
@@ -0,0 +1,5 @@
1
+ define( function() {
2
+ "use strict";
3
+
4
+ return ( /^$|^module$|\/(?:java|ecma)script/i );
5
+ } );
@@ -0,0 +1,8 @@
1
+ define( function() {
2
+ "use strict";
3
+
4
+ // rtagName captures the name from the first start tag in a string of HTML
5
+ // https://html.spec.whatwg.org/multipage/syntax.html#tag-open-state
6
+ // https://html.spec.whatwg.org/multipage/syntax.html#tag-name-state
7
+ return ( /<([a-z][^\/\0>\x20\t\r\n\f]*)/i );
8
+ } );
@@ -0,0 +1,30 @@
1
+ define( [
2
+ "./support"
3
+ ], function( support ) {
4
+
5
+ "use strict";
6
+
7
+ // We have to close these tags to support XHTML (#13200)
8
+ var wrapMap = {
9
+
10
+ // XHTML parsers do not magically insert elements in the
11
+ // same way that tag soup parsers do. So we cannot shorten
12
+ // this by omitting <tbody> or other required elements.
13
+ thead: [ 1, "<table>", "</table>" ],
14
+ col: [ 2, "<table><colgroup>", "</colgroup></table>" ],
15
+ tr: [ 2, "<table><tbody>", "</tbody></table>" ],
16
+ td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ],
17
+
18
+ _default: [ 0, "", "" ]
19
+ };
20
+
21
+ wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
22
+ wrapMap.th = wrapMap.td;
23
+
24
+ // Support: IE <=9 only
25
+ if ( !support.option ) {
26
+ wrapMap.optgroup = wrapMap.option = [ 1, "<select multiple='multiple'>", "</select>" ];
27
+ }
28
+
29
+ return wrapMap;
30
+ } );
@@ -0,0 +1,238 @@
1
+ define( [
2
+ "./core",
3
+ "./core/access",
4
+ "./var/documentElement",
5
+ "./var/isFunction",
6
+ "./css/var/rnumnonpx",
7
+ "./css/curCSS",
8
+ "./css/addGetHookIf",
9
+ "./css/support",
10
+ "./var/isWindow",
11
+ "./core/init",
12
+ "./css",
13
+ "./selector" // contains
14
+ ], function( jQuery, access, documentElement, isFunction, rnumnonpx,
15
+ curCSS, addGetHookIf, support, isWindow ) {
16
+
17
+ "use strict";
18
+
19
+ jQuery.offset = {
20
+ setOffset: function( elem, options, i ) {
21
+ var curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition,
22
+ position = jQuery.css( elem, "position" ),
23
+ curElem = jQuery( elem ),
24
+ props = {};
25
+
26
+ // Set position first, in-case top/left are set even on static elem
27
+ if ( position === "static" ) {
28
+ elem.style.position = "relative";
29
+ }
30
+
31
+ curOffset = curElem.offset();
32
+ curCSSTop = jQuery.css( elem, "top" );
33
+ curCSSLeft = jQuery.css( elem, "left" );
34
+ calculatePosition = ( position === "absolute" || position === "fixed" ) &&
35
+ ( curCSSTop + curCSSLeft ).indexOf( "auto" ) > -1;
36
+
37
+ // Need to be able to calculate position if either
38
+ // top or left is auto and position is either absolute or fixed
39
+ if ( calculatePosition ) {
40
+ curPosition = curElem.position();
41
+ curTop = curPosition.top;
42
+ curLeft = curPosition.left;
43
+
44
+ } else {
45
+ curTop = parseFloat( curCSSTop ) || 0;
46
+ curLeft = parseFloat( curCSSLeft ) || 0;
47
+ }
48
+
49
+ if ( isFunction( options ) ) {
50
+
51
+ // Use jQuery.extend here to allow modification of coordinates argument (gh-1848)
52
+ options = options.call( elem, i, jQuery.extend( {}, curOffset ) );
53
+ }
54
+
55
+ if ( options.top != null ) {
56
+ props.top = ( options.top - curOffset.top ) + curTop;
57
+ }
58
+ if ( options.left != null ) {
59
+ props.left = ( options.left - curOffset.left ) + curLeft;
60
+ }
61
+
62
+ if ( "using" in options ) {
63
+ options.using.call( elem, props );
64
+
65
+ } else {
66
+ if ( typeof props.top === "number" ) {
67
+ props.top += "px";
68
+ }
69
+ if ( typeof props.left === "number" ) {
70
+ props.left += "px";
71
+ }
72
+ curElem.css( props );
73
+ }
74
+ }
75
+ };
76
+
77
+ jQuery.fn.extend( {
78
+
79
+ // offset() relates an element's border box to the document origin
80
+ offset: function( options ) {
81
+
82
+ // Preserve chaining for setter
83
+ if ( arguments.length ) {
84
+ return options === undefined ?
85
+ this :
86
+ this.each( function( i ) {
87
+ jQuery.offset.setOffset( this, options, i );
88
+ } );
89
+ }
90
+
91
+ var rect, win,
92
+ elem = this[ 0 ];
93
+
94
+ if ( !elem ) {
95
+ return;
96
+ }
97
+
98
+ // Return zeros for disconnected and hidden (display: none) elements (gh-2310)
99
+ // Support: IE <=11 only
100
+ // Running getBoundingClientRect on a
101
+ // disconnected node in IE throws an error
102
+ if ( !elem.getClientRects().length ) {
103
+ return { top: 0, left: 0 };
104
+ }
105
+
106
+ // Get document-relative position by adding viewport scroll to viewport-relative gBCR
107
+ rect = elem.getBoundingClientRect();
108
+ win = elem.ownerDocument.defaultView;
109
+ return {
110
+ top: rect.top + win.pageYOffset,
111
+ left: rect.left + win.pageXOffset
112
+ };
113
+ },
114
+
115
+ // position() relates an element's margin box to its offset parent's padding box
116
+ // This corresponds to the behavior of CSS absolute positioning
117
+ position: function() {
118
+ if ( !this[ 0 ] ) {
119
+ return;
120
+ }
121
+
122
+ var offsetParent, offset, doc,
123
+ elem = this[ 0 ],
124
+ parentOffset = { top: 0, left: 0 };
125
+
126
+ // position:fixed elements are offset from the viewport, which itself always has zero offset
127
+ if ( jQuery.css( elem, "position" ) === "fixed" ) {
128
+
129
+ // Assume position:fixed implies availability of getBoundingClientRect
130
+ offset = elem.getBoundingClientRect();
131
+
132
+ } else {
133
+ offset = this.offset();
134
+
135
+ // Account for the *real* offset parent, which can be the document or its root element
136
+ // when a statically positioned element is identified
137
+ doc = elem.ownerDocument;
138
+ offsetParent = elem.offsetParent || doc.documentElement;
139
+ while ( offsetParent &&
140
+ ( offsetParent === doc.body || offsetParent === doc.documentElement ) &&
141
+ jQuery.css( offsetParent, "position" ) === "static" ) {
142
+
143
+ offsetParent = offsetParent.parentNode;
144
+ }
145
+ if ( offsetParent && offsetParent !== elem && offsetParent.nodeType === 1 ) {
146
+
147
+ // Incorporate borders into its offset, since they are outside its content origin
148
+ parentOffset = jQuery( offsetParent ).offset();
149
+ parentOffset.top += jQuery.css( offsetParent, "borderTopWidth", true );
150
+ parentOffset.left += jQuery.css( offsetParent, "borderLeftWidth", true );
151
+ }
152
+ }
153
+
154
+ // Subtract parent offsets and element margins
155
+ return {
156
+ top: offset.top - parentOffset.top - jQuery.css( elem, "marginTop", true ),
157
+ left: offset.left - parentOffset.left - jQuery.css( elem, "marginLeft", true )
158
+ };
159
+ },
160
+
161
+ // This method will return documentElement in the following cases:
162
+ // 1) For the element inside the iframe without offsetParent, this method will return
163
+ // documentElement of the parent window
164
+ // 2) For the hidden or detached element
165
+ // 3) For body or html element, i.e. in case of the html node - it will return itself
166
+ //
167
+ // but those exceptions were never presented as a real life use-cases
168
+ // and might be considered as more preferable results.
169
+ //
170
+ // This logic, however, is not guaranteed and can change at any point in the future
171
+ offsetParent: function() {
172
+ return this.map( function() {
173
+ var offsetParent = this.offsetParent;
174
+
175
+ while ( offsetParent && jQuery.css( offsetParent, "position" ) === "static" ) {
176
+ offsetParent = offsetParent.offsetParent;
177
+ }
178
+
179
+ return offsetParent || documentElement;
180
+ } );
181
+ }
182
+ } );
183
+
184
+ // Create scrollLeft and scrollTop methods
185
+ jQuery.each( { scrollLeft: "pageXOffset", scrollTop: "pageYOffset" }, function( method, prop ) {
186
+ var top = "pageYOffset" === prop;
187
+
188
+ jQuery.fn[ method ] = function( val ) {
189
+ return access( this, function( elem, method, val ) {
190
+
191
+ // Coalesce documents and windows
192
+ var win;
193
+ if ( isWindow( elem ) ) {
194
+ win = elem;
195
+ } else if ( elem.nodeType === 9 ) {
196
+ win = elem.defaultView;
197
+ }
198
+
199
+ if ( val === undefined ) {
200
+ return win ? win[ prop ] : elem[ method ];
201
+ }
202
+
203
+ if ( win ) {
204
+ win.scrollTo(
205
+ !top ? val : win.pageXOffset,
206
+ top ? val : win.pageYOffset
207
+ );
208
+
209
+ } else {
210
+ elem[ method ] = val;
211
+ }
212
+ }, method, val, arguments.length );
213
+ };
214
+ } );
215
+
216
+ // Support: Safari <=7 - 9.1, Chrome <=37 - 49
217
+ // Add the top/left cssHooks using jQuery.fn.position
218
+ // Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084
219
+ // Blink bug: https://bugs.chromium.org/p/chromium/issues/detail?id=589347
220
+ // getComputedStyle returns percent when specified for top/left/bottom/right;
221
+ // rather than make the css module depend on the offset module, just check for it here
222
+ jQuery.each( [ "top", "left" ], function( _i, prop ) {
223
+ jQuery.cssHooks[ prop ] = addGetHookIf( support.pixelPosition,
224
+ function( elem, computed ) {
225
+ if ( computed ) {
226
+ computed = curCSS( elem, prop );
227
+
228
+ // If curCSS returns percentage, fallback to offset
229
+ return rnumnonpx.test( computed ) ?
230
+ jQuery( elem ).position()[ prop ] + "px" :
231
+ computed;
232
+ }
233
+ }
234
+ );
235
+ } );
236
+
237
+ return jQuery;
238
+ } );