loco-rails 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (164) hide show
  1. checksums.yaml +4 -4
  2. data/lib/generators/loco/js_assets_structure/js_assets_structure_generator.rb +1 -1
  3. data/lib/loco/version.rb +1 -1
  4. data/test/dummy/bower.json +3 -3
  5. data/test/dummy/db/test.sqlite3 +0 -0
  6. data/test/dummy/log/development.log +914 -0
  7. data/test/dummy/log/test.log +14364 -0
  8. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/1-WO2UjmfLs4SpjVZdSJGGMzBEsVGyxycwsDwVEQj1k.cache +0 -0
  9. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/1lwmN4qs8MJAzC_yfG97s_SBsqDZ7S3tjAhKpSGRoPk.cache +0 -0
  10. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/2W9ni6toILqWfZF81i5tLooI3KkJgLMV2Um69h4tACE.cache +0 -0
  11. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/888aULOiH1o8nErYVbar7so8TSiHMnVRkCJVrsFow-8.cache +1 -0
  12. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/C2zMBdauRoyKtP5-Hbx-3FKU63Wir8HxxhnsEQjnye4.cache +1 -0
  13. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/KmN1A2cbnIa89JVXdNUnbxekW6XoG37uQ7TOrUmla6M.cache +1 -0
  14. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/N2LaSeSkH9O3-nDAwbgQ3fvF1RyzULzIdW9tRkCFdiE.cache +1 -0
  15. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/NMX4CbiSfseLfHWah6QjF3ka-_q8iZ35lDHxpx5HZBc.cache +1 -0
  16. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/O97vuogdZekuQD9891VkdZtj2Ah9a6j_9SdFgHpRZPk.cache +3 -0
  17. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/RgNfOjSuRN575tirFTi553UywDtiZquNSKAUN4t_37E.cache +2 -0
  18. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/URfsWTq0WfX5JFf50HidIK1kGXYILlI3krzHQOlpGFw.cache +2 -0
  19. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/UqKz2K55R9dWSo9wYoLdN5lxNUXJFqA_7eipeyHMqQc.cache +1 -0
  20. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/WspjnlaWGkNP36-eIBusMx-VcvbF81RZ3L495DxSNNg.cache +1 -0
  21. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/XUYO10EzvYAECtPUgdBF8rPWs9x6tndCxSwdhYWmDpQ.cache +1 -0
  22. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/ckF-gg5mdNyYLK2tDms9BdsP1vFw5VYxZ11u7l8vzfc.cache +0 -0
  23. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/cxoptH0sPRJzPLP351ISNHPjig_W2A_-5fLVnK3tFu0.cache +1 -0
  24. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/k5GkEt2yH5INFBgLUTsGEmzjRr5Ngh6FiXYfmbqh-Tg.cache +1 -0
  25. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/zIWnum7SG2OPux4uomf0kHpIZ5Nl1NfTAoHCdkHwZIY.cache +0 -0
  26. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/zgdP9EhEWd05XIYSWZx4uQKkuRklpRj6KiShg6HqIRo.cache +0 -0
  27. data/test/dummy/vendor/assets/bower_components/jquery/AUTHORS.txt +53 -24
  28. data/test/dummy/vendor/assets/bower_components/jquery/dist/core.js +481 -0
  29. data/test/dummy/vendor/assets/bower_components/jquery/dist/jquery.js +2706 -3647
  30. data/test/dummy/vendor/assets/bower_components/jquery/dist/jquery.min.js +4 -5
  31. data/test/dummy/vendor/assets/bower_components/jquery/dist/jquery.min.map +1 -1
  32. data/test/dummy/vendor/assets/bower_components/jquery/dist/jquery.slim.js +533 -444
  33. data/test/dummy/vendor/assets/bower_components/jquery/dist/jquery.slim.min.js +4 -4
  34. data/test/dummy/vendor/assets/bower_components/jquery/dist/jquery.slim.min.map +1 -1
  35. data/test/dummy/vendor/assets/bower_components/jquery/{sizzle → external/sizzle}/LICENSE.txt +0 -0
  36. data/test/dummy/vendor/assets/bower_components/jquery/{sizzle → external/sizzle}/dist/sizzle.js +154 -80
  37. data/test/dummy/vendor/assets/bower_components/jquery/external/sizzle/dist/sizzle.min.js +3 -0
  38. data/test/dummy/vendor/assets/bower_components/jquery/external/sizzle/dist/sizzle.min.map +1 -0
  39. data/test/dummy/vendor/assets/bower_components/jquery/src/ajax/jsonp.js +5 -3
  40. data/test/dummy/vendor/assets/bower_components/jquery/src/ajax/load.js +3 -11
  41. data/test/dummy/vendor/assets/bower_components/jquery/src/ajax/parseXML.js +9 -10
  42. data/test/dummy/vendor/assets/bower_components/jquery/src/ajax/script.js +26 -44
  43. data/test/dummy/vendor/assets/bower_components/jquery/src/ajax/var/location.js +2 -0
  44. data/test/dummy/vendor/assets/bower_components/jquery/src/ajax/var/nonce.js +2 -0
  45. data/test/dummy/vendor/assets/bower_components/jquery/src/ajax/var/rquery.js +2 -0
  46. data/test/dummy/vendor/assets/bower_components/jquery/src/ajax/xhr.js +138 -198
  47. data/test/dummy/vendor/assets/bower_components/jquery/src/ajax.js +104 -91
  48. data/test/dummy/vendor/assets/bower_components/jquery/src/attributes/attr.js +23 -167
  49. data/test/dummy/vendor/assets/bower_components/jquery/src/attributes/classes.js +18 -13
  50. data/test/dummy/vendor/assets/bower_components/jquery/src/attributes/prop.js +9 -37
  51. data/test/dummy/vendor/assets/bower_components/jquery/src/attributes/support.js +12 -49
  52. data/test/dummy/vendor/assets/bower_components/jquery/src/attributes/val.js +21 -28
  53. data/test/dummy/vendor/assets/bower_components/jquery/src/attributes.js +4 -2
  54. data/test/dummy/vendor/assets/bower_components/jquery/src/callbacks.js +5 -3
  55. data/test/dummy/vendor/assets/bower_components/jquery/src/core/DOMEval.js +2 -0
  56. data/test/dummy/vendor/assets/bower_components/jquery/src/core/access.js +8 -6
  57. data/test/dummy/vendor/assets/bower_components/jquery/src/core/init.js +13 -26
  58. data/test/dummy/vendor/assets/bower_components/jquery/src/core/parseHTML.js +32 -8
  59. data/test/dummy/vendor/assets/bower_components/jquery/src/core/ready-no-deferred.js +111 -0
  60. data/test/dummy/vendor/assets/bower_components/jquery/src/core/ready.js +32 -100
  61. data/test/dummy/vendor/assets/bower_components/jquery/src/core/readyException.js +13 -0
  62. data/test/dummy/vendor/assets/bower_components/jquery/src/core/support.js +3 -1
  63. data/test/dummy/vendor/assets/bower_components/jquery/src/core/var/rsingleTag.js +2 -1
  64. data/test/dummy/vendor/assets/bower_components/jquery/src/core.js +71 -119
  65. data/test/dummy/vendor/assets/bower_components/jquery/src/css/addGetHookIf.js +2 -0
  66. data/test/dummy/vendor/assets/bower_components/jquery/src/css/adjustCSS.js +8 -2
  67. data/test/dummy/vendor/assets/bower_components/jquery/src/css/curCSS.js +34 -112
  68. data/test/dummy/vendor/assets/bower_components/jquery/src/css/hiddenVisibleSelectors.js +7 -28
  69. data/test/dummy/vendor/assets/bower_components/jquery/src/css/showHide.js +69 -9
  70. data/test/dummy/vendor/assets/bower_components/jquery/src/css/support.js +48 -142
  71. data/test/dummy/vendor/assets/bower_components/jquery/src/css/var/cssExpand.js +2 -0
  72. data/test/dummy/vendor/assets/bower_components/jquery/src/css/var/getStyles.js +3 -1
  73. data/test/dummy/vendor/assets/bower_components/jquery/src/css/var/isHiddenWithinTree.js +34 -0
  74. data/test/dummy/vendor/assets/bower_components/jquery/src/css/var/rmargin.js +2 -0
  75. data/test/dummy/vendor/assets/bower_components/jquery/src/css/var/rnumnonpx.js +2 -0
  76. data/test/dummy/vendor/assets/bower_components/jquery/src/css/var/swap.js +2 -0
  77. data/test/dummy/vendor/assets/bower_components/jquery/src/css.js +71 -223
  78. data/test/dummy/vendor/assets/bower_components/jquery/src/data/Data.js +24 -63
  79. data/test/dummy/vendor/assets/bower_components/jquery/src/data/var/acceptData.js +11 -12
  80. data/test/dummy/vendor/assets/bower_components/jquery/src/data/var/dataPriv.js +2 -0
  81. data/test/dummy/vendor/assets/bower_components/jquery/src/data/var/dataUser.js +2 -0
  82. data/test/dummy/vendor/assets/bower_components/jquery/src/data.js +66 -247
  83. data/test/dummy/vendor/assets/bower_components/jquery/src/deferred/exceptionHook.js +4 -2
  84. data/test/dummy/vendor/assets/bower_components/jquery/src/deferred.js +290 -60
  85. data/test/dummy/vendor/assets/bower_components/jquery/src/deprecated.js +4 -8
  86. data/test/dummy/vendor/assets/bower_components/jquery/src/dimensions.js +9 -9
  87. data/test/dummy/vendor/assets/bower_components/jquery/src/effects/Tween.js +11 -9
  88. data/test/dummy/vendor/assets/bower_components/jquery/src/effects/animatedSelector.js +3 -1
  89. data/test/dummy/vendor/assets/bower_components/jquery/src/effects.js +183 -135
  90. data/test/dummy/vendor/assets/bower_components/jquery/src/event/ajax.js +2 -0
  91. data/test/dummy/vendor/assets/bower_components/jquery/src/event/alias.js +7 -3
  92. data/test/dummy/vendor/assets/bower_components/jquery/src/event/focusin.js +5 -3
  93. data/test/dummy/vendor/assets/bower_components/jquery/src/event/support.js +3 -20
  94. data/test/dummy/vendor/assets/bower_components/jquery/src/event/trigger.js +4 -18
  95. data/test/dummy/vendor/assets/bower_components/jquery/src/event.js +145 -553
  96. data/test/dummy/vendor/assets/bower_components/jquery/src/exports/amd.js +2 -0
  97. data/test/dummy/vendor/assets/bower_components/jquery/src/exports/global.js +10 -2
  98. data/test/dummy/vendor/assets/bower_components/jquery/src/jquery.js +4 -1
  99. data/test/dummy/vendor/assets/bower_components/jquery/src/manipulation/_evalUrl.js +2 -0
  100. data/test/dummy/vendor/assets/bower_components/jquery/src/manipulation/buildFragment.js +22 -75
  101. data/test/dummy/vendor/assets/bower_components/jquery/src/manipulation/getAll.js +9 -19
  102. data/test/dummy/vendor/assets/bower_components/jquery/src/manipulation/setGlobalEval.js +11 -8
  103. data/test/dummy/vendor/assets/bower_components/jquery/src/manipulation/support.js +13 -50
  104. data/test/dummy/vendor/assets/bower_components/jquery/src/manipulation/var/rcheckableType.js +2 -0
  105. data/test/dummy/vendor/assets/bower_components/jquery/src/manipulation/var/rscriptType.js +2 -0
  106. data/test/dummy/vendor/assets/bower_components/jquery/src/manipulation/var/rtagName.js +3 -1
  107. data/test/dummy/vendor/assets/bower_components/jquery/src/manipulation/wrapMap.js +11 -12
  108. data/test/dummy/vendor/assets/bower_components/jquery/src/manipulation.js +104 -203
  109. data/test/dummy/vendor/assets/bower_components/jquery/src/offset.js +64 -51
  110. data/test/dummy/vendor/assets/bower_components/jquery/src/queue/delay.js +3 -1
  111. data/test/dummy/vendor/assets/bower_components/jquery/src/queue.js +12 -11
  112. data/test/dummy/vendor/assets/bower_components/jquery/src/selector-native.js +29 -3
  113. data/test/dummy/vendor/assets/bower_components/jquery/src/selector-sizzle.js +5 -0
  114. data/test/dummy/vendor/assets/bower_components/jquery/src/selector.js +3 -1
  115. data/test/dummy/vendor/assets/bower_components/jquery/src/serialize.js +13 -12
  116. data/test/dummy/vendor/assets/bower_components/jquery/src/traversing/findFilter.js +9 -10
  117. data/test/dummy/vendor/assets/bower_components/jquery/src/traversing/var/dir.js +2 -0
  118. data/test/dummy/vendor/assets/bower_components/jquery/src/traversing/var/rneedsContext.js +2 -0
  119. data/test/dummy/vendor/assets/bower_components/jquery/src/traversing/var/siblings.js +2 -0
  120. data/test/dummy/vendor/assets/bower_components/jquery/src/traversing.js +36 -37
  121. data/test/dummy/vendor/assets/bower_components/jquery/src/var/ObjectFunctionString.js +7 -0
  122. data/test/dummy/vendor/assets/bower_components/jquery/src/var/arr.js +2 -0
  123. data/test/dummy/vendor/assets/bower_components/jquery/src/var/class2type.js +1 -0
  124. data/test/dummy/vendor/assets/bower_components/jquery/src/var/concat.js +5 -3
  125. data/test/dummy/vendor/assets/bower_components/jquery/src/var/document.js +2 -0
  126. data/test/dummy/vendor/assets/bower_components/jquery/src/var/documentElement.js +2 -0
  127. data/test/dummy/vendor/assets/bower_components/jquery/src/var/fnToString.js +7 -0
  128. data/test/dummy/vendor/assets/bower_components/jquery/src/var/getProto.js +5 -0
  129. data/test/dummy/vendor/assets/bower_components/jquery/src/var/hasOwn.js +2 -0
  130. data/test/dummy/vendor/assets/bower_components/jquery/src/var/indexOf.js +5 -3
  131. data/test/dummy/vendor/assets/bower_components/jquery/src/var/pnum.js +2 -0
  132. data/test/dummy/vendor/assets/bower_components/jquery/src/var/push.js +5 -3
  133. data/test/dummy/vendor/assets/bower_components/jquery/src/var/rcssNum.js +2 -0
  134. data/test/dummy/vendor/assets/bower_components/jquery/src/var/rnotwhite.js +2 -0
  135. data/test/dummy/vendor/assets/bower_components/jquery/src/var/slice.js +5 -3
  136. data/test/dummy/vendor/assets/bower_components/jquery/src/var/support.js +1 -0
  137. data/test/dummy/vendor/assets/bower_components/jquery/src/var/toString.js +2 -0
  138. data/test/dummy/vendor/assets/bower_components/jquery/src/wrap.js +14 -14
  139. data/test/dummy/vendor/assets/bower_components/lie/bower.json +1 -1
  140. data/test/dummy/vendor/assets/bower_components/lie/component.json +1 -1
  141. data/test/dummy/vendor/assets/bower_components/lie/dist/lie.js +80 -80
  142. data/test/dummy/vendor/assets/bower_components/lie/dist/lie.min.js +1 -1
  143. data/test/dummy/vendor/assets/bower_components/lie/dist/lie.polyfill.js +9 -9
  144. data/test/dummy/vendor/assets/bower_components/lie/dist/lie.polyfill.min.js +1 -1
  145. data/test/dummy/vendor/assets/bower_components/lie/lib/browser.js +253 -0
  146. data/test/dummy/vendor/assets/bower_components/lie/lib/index.js +5 -5
  147. data/test/dummy/vendor/assets/bower_components/lie/package.json +28 -19
  148. data/test/dummy/vendor/assets/bower_components/lie/src/index.js +278 -0
  149. metadata +62 -36
  150. data/test/dummy/vendor/assets/bower_components/jquery/sizzle/dist/sizzle.min.js +0 -3
  151. data/test/dummy/vendor/assets/bower_components/jquery/sizzle/dist/sizzle.min.map +0 -1
  152. data/test/dummy/vendor/assets/bower_components/jquery/src/ajax/parseJSON.js +0 -53
  153. data/test/dummy/vendor/assets/bower_components/jquery/src/css/defaultDisplay.js +0 -72
  154. data/test/dummy/vendor/assets/bower_components/jquery/src/css/var/isHidden.js +0 -16
  155. data/test/dummy/vendor/assets/bower_components/jquery/src/data/accepts.js +0 -20
  156. data/test/dummy/vendor/assets/bower_components/jquery/src/data/support.js +0 -23
  157. data/test/dummy/vendor/assets/bower_components/jquery/src/effects/support.js +0 -58
  158. data/test/dummy/vendor/assets/bower_components/jquery/src/intro.js +0 -44
  159. data/test/dummy/vendor/assets/bower_components/jquery/src/manipulation/createSafeFragment.js +0 -20
  160. data/test/dummy/vendor/assets/bower_components/jquery/src/manipulation/var/nodeNames.js +0 -5
  161. data/test/dummy/vendor/assets/bower_components/jquery/src/manipulation/var/rleadingWhitespace.js +0 -3
  162. data/test/dummy/vendor/assets/bower_components/jquery/src/outro.js +0 -2
  163. data/test/dummy/vendor/assets/bower_components/jquery/src/support.js +0 -63
  164. data/test/dummy/vendor/assets/bower_components/jquery/src/var/deletedIds.js +0 -3
@@ -1,28 +1,39 @@
1
1
  define( [
2
2
  "./core",
3
- "./effects/support",
3
+ "./var/document",
4
4
  "./var/rcssNum",
5
5
  "./var/rnotwhite",
6
6
  "./css/var/cssExpand",
7
- "./css/var/isHidden",
7
+ "./css/var/isHiddenWithinTree",
8
+ "./css/var/swap",
8
9
  "./css/adjustCSS",
9
- "./css/defaultDisplay",
10
+ "./data/var/dataPriv",
11
+ "./css/showHide",
10
12
 
11
- "./var/document",
12
13
  "./core/init",
13
- "./effects/Tween",
14
14
  "./queue",
15
- "./css",
16
15
  "./deferred",
17
- "./traversing"
18
- ], function( jQuery, support, rcssNum, rnotwhite,
19
- cssExpand, isHidden, adjustCSS, defaultDisplay ) {
16
+ "./traversing",
17
+ "./manipulation",
18
+ "./css",
19
+ "./effects/Tween"
20
+ ], function( jQuery, document, rcssNum, rnotwhite, cssExpand, isHiddenWithinTree, swap,
21
+ adjustCSS, dataPriv, showHide ) {
22
+
23
+ "use strict";
20
24
 
21
25
  var
22
26
  fxNow, timerId,
23
27
  rfxtypes = /^(?:toggle|show|hide)$/,
24
28
  rrun = /queueHooks$/;
25
29
 
30
+ function raf() {
31
+ if ( timerId ) {
32
+ window.requestAnimationFrame( raf );
33
+ jQuery.fx.tick();
34
+ }
35
+ }
36
+
26
37
  // Animations created synchronously will run synchronously
27
38
  function createFxNow() {
28
39
  window.setTimeout( function() {
@@ -34,13 +45,13 @@ function createFxNow() {
34
45
  // Generate parameters to create a standard animation
35
46
  function genFx( type, includeWidth ) {
36
47
  var which,
37
- attrs = { height: type },
38
- i = 0;
48
+ i = 0,
49
+ attrs = { height: type };
39
50
 
40
- // if we include width, step value is 1 to do all cssExpand values,
41
- // if we don't include width, step value is 2 to skip over Left and Right
51
+ // If we include width, step value is 1 to do all cssExpand values,
52
+ // otherwise step value is 2 to skip over Left and Right
42
53
  includeWidth = includeWidth ? 1 : 0;
43
- for ( ; i < 4 ; i += 2 - includeWidth ) {
54
+ for ( ; i < 4; i += 2 - includeWidth ) {
44
55
  which = cssExpand[ i ];
45
56
  attrs[ "margin" + which ] = attrs[ "padding" + which ] = type;
46
57
  }
@@ -60,22 +71,22 @@ function createTween( value, prop, animation ) {
60
71
  for ( ; index < length; index++ ) {
61
72
  if ( ( tween = collection[ index ].call( animation, prop, value ) ) ) {
62
73
 
63
- // we're done with this property
74
+ // We're done with this property
64
75
  return tween;
65
76
  }
66
77
  }
67
78
  }
68
79
 
69
80
  function defaultPrefilter( elem, props, opts ) {
70
- /* jshint validthis: true */
71
- var prop, value, toggle, tween, hooks, oldfire, display, checkDisplay,
81
+ var prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display,
82
+ isBox = "width" in props || "height" in props,
72
83
  anim = this,
73
84
  orig = {},
74
85
  style = elem.style,
75
- hidden = elem.nodeType && isHidden( elem ),
76
- dataShow = jQuery._data( elem, "fxshow" );
86
+ hidden = elem.nodeType && isHiddenWithinTree( elem ),
87
+ dataShow = dataPriv.get( elem, "fxshow" );
77
88
 
78
- // handle queue: false promises
89
+ // Queue-skipping animations hijack the fx hooks
79
90
  if ( !opts.queue ) {
80
91
  hooks = jQuery._queueHooks( elem, "fx" );
81
92
  if ( hooks.unqueued == null ) {
@@ -91,8 +102,7 @@ function defaultPrefilter( elem, props, opts ) {
91
102
 
92
103
  anim.always( function() {
93
104
 
94
- // doing this makes sure that the complete handler will be called
95
- // before this completes
105
+ // Ensure the complete handler is called before this completes
96
106
  anim.always( function() {
97
107
  hooks.unqueued--;
98
108
  if ( !jQuery.queue( elem, "fx" ).length ) {
@@ -102,112 +112,139 @@ function defaultPrefilter( elem, props, opts ) {
102
112
  } );
103
113
  }
104
114
 
105
- // height/width overflow pass
106
- if ( elem.nodeType === 1 && ( "height" in props || "width" in props ) ) {
115
+ // Detect show/hide animations
116
+ for ( prop in props ) {
117
+ value = props[ prop ];
118
+ if ( rfxtypes.test( value ) ) {
119
+ delete props[ prop ];
120
+ toggle = toggle || value === "toggle";
121
+ if ( value === ( hidden ? "hide" : "show" ) ) {
122
+
123
+ // Pretend to be hidden if this is a "show" and
124
+ // there is still data from a stopped show/hide
125
+ if ( value === "show" && dataShow && dataShow[ prop ] !== undefined ) {
126
+ hidden = true;
107
127
 
108
- // Make sure that nothing sneaks out
109
- // Record all 3 overflow attributes because IE does not
110
- // change the overflow attribute when overflowX and
111
- // overflowY are set to the same value
128
+ // Ignore all other no-op show/hide data
129
+ } else {
130
+ continue;
131
+ }
132
+ }
133
+ orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop );
134
+ }
135
+ }
136
+
137
+ // Bail out if this is a no-op like .hide().hide()
138
+ propTween = !jQuery.isEmptyObject( props );
139
+ if ( !propTween && jQuery.isEmptyObject( orig ) ) {
140
+ return;
141
+ }
142
+
143
+ // Restrict "overflow" and "display" styles during box animations
144
+ if ( isBox && elem.nodeType === 1 ) {
145
+
146
+ // Support: IE <=9 - 11, Edge 12 - 13
147
+ // Record all 3 overflow attributes because IE does not infer the shorthand
148
+ // from identically-valued overflowX and overflowY
112
149
  opts.overflow = [ style.overflow, style.overflowX, style.overflowY ];
113
150
 
114
- // Set display property to inline-block for height/width
115
- // animations on inline elements that are having width/height animated
151
+ // Identify a display type, preferring old show/hide data over the CSS cascade
152
+ restoreDisplay = dataShow && dataShow.display;
153
+ if ( restoreDisplay == null ) {
154
+ restoreDisplay = dataPriv.get( elem, "display" );
155
+ }
116
156
  display = jQuery.css( elem, "display" );
157
+ if ( display === "none" ) {
158
+ if ( restoreDisplay ) {
159
+ display = restoreDisplay;
160
+ } else {
117
161
 
118
- // Test default display if display is currently "none"
119
- checkDisplay = display === "none" ?
120
- jQuery._data( elem, "olddisplay" ) || defaultDisplay( elem.nodeName ) : display;
121
-
122
- if ( checkDisplay === "inline" && jQuery.css( elem, "float" ) === "none" ) {
162
+ // Get nonempty value(s) by temporarily forcing visibility
163
+ showHide( [ elem ], true );
164
+ restoreDisplay = elem.style.display || restoreDisplay;
165
+ display = jQuery.css( elem, "display" );
166
+ showHide( [ elem ] );
167
+ }
168
+ }
123
169
 
124
- // inline-level elements accept inline-block;
125
- // block-level elements need to be inline with layout
126
- if ( !support.inlineBlockNeedsLayout || defaultDisplay( elem.nodeName ) === "inline" ) {
170
+ // Animate inline elements as inline-block
171
+ if ( display === "inline" || display === "inline-block" && restoreDisplay != null ) {
172
+ if ( jQuery.css( elem, "float" ) === "none" ) {
173
+
174
+ // Restore the original display value at the end of pure show/hide animations
175
+ if ( !propTween ) {
176
+ anim.done( function() {
177
+ style.display = restoreDisplay;
178
+ } );
179
+ if ( restoreDisplay == null ) {
180
+ display = style.display;
181
+ restoreDisplay = display === "none" ? "" : display;
182
+ }
183
+ }
127
184
  style.display = "inline-block";
128
- } else {
129
- style.zoom = 1;
130
185
  }
131
186
  }
132
187
  }
133
188
 
134
189
  if ( opts.overflow ) {
135
190
  style.overflow = "hidden";
136
- if ( !support.shrinkWrapBlocks() ) {
137
- anim.always( function() {
138
- style.overflow = opts.overflow[ 0 ];
139
- style.overflowX = opts.overflow[ 1 ];
140
- style.overflowY = opts.overflow[ 2 ];
141
- } );
142
- }
191
+ anim.always( function() {
192
+ style.overflow = opts.overflow[ 0 ];
193
+ style.overflowX = opts.overflow[ 1 ];
194
+ style.overflowY = opts.overflow[ 2 ];
195
+ } );
143
196
  }
144
197
 
145
- // show/hide pass
146
- for ( prop in props ) {
147
- value = props[ prop ];
148
- if ( rfxtypes.exec( value ) ) {
149
- delete props[ prop ];
150
- toggle = toggle || value === "toggle";
151
- if ( value === ( hidden ? "hide" : "show" ) ) {
198
+ // Implement show/hide animations
199
+ propTween = false;
200
+ for ( prop in orig ) {
152
201
 
153
- // If there is dataShow left over from a stopped hide or show
154
- // and we are going to proceed with show, we should pretend to be hidden
155
- if ( value === "show" && dataShow && dataShow[ prop ] !== undefined ) {
156
- hidden = true;
157
- } else {
158
- continue;
202
+ // General show/hide setup for this element animation
203
+ if ( !propTween ) {
204
+ if ( dataShow ) {
205
+ if ( "hidden" in dataShow ) {
206
+ hidden = dataShow.hidden;
159
207
  }
208
+ } else {
209
+ dataShow = dataPriv.access( elem, "fxshow", { display: restoreDisplay } );
160
210
  }
161
- orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop );
162
211
 
163
- // Any non-fx value stops us from restoring the original display value
164
- } else {
165
- display = undefined;
166
- }
167
- }
212
+ // Store hidden/visible for toggle so `.stop().toggle()` "reverses"
213
+ if ( toggle ) {
214
+ dataShow.hidden = !hidden;
215
+ }
168
216
 
169
- if ( !jQuery.isEmptyObject( orig ) ) {
170
- if ( dataShow ) {
171
- if ( "hidden" in dataShow ) {
172
- hidden = dataShow.hidden;
217
+ // Show elements before animating them
218
+ if ( hidden ) {
219
+ showHide( [ elem ], true );
173
220
  }
174
- } else {
175
- dataShow = jQuery._data( elem, "fxshow", {} );
176
- }
177
221
 
178
- // store state if its toggle - enables .stop().toggle() to "reverse"
179
- if ( toggle ) {
180
- dataShow.hidden = !hidden;
181
- }
182
- if ( hidden ) {
183
- jQuery( elem ).show();
184
- } else {
222
+ /* eslint-disable no-loop-func */
223
+
185
224
  anim.done( function() {
186
- jQuery( elem ).hide();
225
+
226
+ /* eslint-enable no-loop-func */
227
+
228
+ // The final step of a "hide" animation is actually hiding the element
229
+ if ( !hidden ) {
230
+ showHide( [ elem ] );
231
+ }
232
+ dataPriv.remove( elem, "fxshow" );
233
+ for ( prop in orig ) {
234
+ jQuery.style( elem, prop, orig[ prop ] );
235
+ }
187
236
  } );
188
237
  }
189
- anim.done( function() {
190
- var prop;
191
- jQuery._removeData( elem, "fxshow" );
192
- for ( prop in orig ) {
193
- jQuery.style( elem, prop, orig[ prop ] );
194
- }
195
- } );
196
- for ( prop in orig ) {
197
- tween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim );
198
-
199
- if ( !( prop in dataShow ) ) {
200
- dataShow[ prop ] = tween.start;
201
- if ( hidden ) {
202
- tween.end = tween.start;
203
- tween.start = prop === "width" || prop === "height" ? 1 : 0;
204
- }
238
+
239
+ // Per-property setup
240
+ propTween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim );
241
+ if ( !( prop in dataShow ) ) {
242
+ dataShow[ prop ] = propTween.start;
243
+ if ( hidden ) {
244
+ propTween.end = propTween.start;
245
+ propTween.start = 0;
205
246
  }
206
247
  }
207
-
208
- // If this is a noop like .hide().hide(), restore an overwritten display value
209
- } else if ( ( display === "none" ? defaultDisplay( elem.nodeName ) : display ) === "inline" ) {
210
- style.display = display;
211
248
  }
212
249
  }
213
250
 
@@ -234,8 +271,8 @@ function propFilter( props, specialEasing ) {
234
271
  value = hooks.expand( value );
235
272
  delete props[ name ];
236
273
 
237
- // not quite $.extend, this wont overwrite keys already present.
238
- // also - reusing 'index' from above because we have the correct "name"
274
+ // Not quite $.extend, this won't overwrite existing keys.
275
+ // Reusing 'index' because we have the correct "name"
239
276
  for ( index in value ) {
240
277
  if ( !( index in props ) ) {
241
278
  props[ index ] = value[ index ];
@@ -255,7 +292,7 @@ function Animation( elem, properties, options ) {
255
292
  length = Animation.prefilters.length,
256
293
  deferred = jQuery.Deferred().always( function() {
257
294
 
258
- // don't match elem in the :animated selector
295
+ // Don't match elem in the :animated selector
259
296
  delete tick.elem;
260
297
  } ),
261
298
  tick = function() {
@@ -265,14 +302,14 @@ function Animation( elem, properties, options ) {
265
302
  var currentTime = fxNow || createFxNow(),
266
303
  remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),
267
304
 
268
- // Support: Android 2.3
305
+ // Support: Android 2.3 only
269
306
  // Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (#12497)
270
307
  temp = remaining / animation.duration || 0,
271
308
  percent = 1 - temp,
272
309
  index = 0,
273
310
  length = animation.tweens.length;
274
311
 
275
- for ( ; index < length ; index++ ) {
312
+ for ( ; index < length; index++ ) {
276
313
  animation.tweens[ index ].run( percent );
277
314
  }
278
315
 
@@ -306,19 +343,18 @@ function Animation( elem, properties, options ) {
306
343
  stop: function( gotoEnd ) {
307
344
  var index = 0,
308
345
 
309
- // if we are going to the end, we want to run all the tweens
346
+ // If we are going to the end, we want to run all the tweens
310
347
  // otherwise we skip this part
311
348
  length = gotoEnd ? animation.tweens.length : 0;
312
349
  if ( stopped ) {
313
350
  return this;
314
351
  }
315
352
  stopped = true;
316
- for ( ; index < length ; index++ ) {
353
+ for ( ; index < length; index++ ) {
317
354
  animation.tweens[ index ].run( 1 );
318
355
  }
319
356
 
320
- // resolve when we played the last frame
321
- // otherwise, reject
357
+ // Resolve when we played the last frame; otherwise, reject
322
358
  if ( gotoEnd ) {
323
359
  deferred.notifyWith( elem, [ animation, 1, 0 ] );
324
360
  deferred.resolveWith( elem, [ animation, gotoEnd ] );
@@ -332,7 +368,7 @@ function Animation( elem, properties, options ) {
332
368
 
333
369
  propFilter( props, animation.opts.specialEasing );
334
370
 
335
- for ( ; index < length ; index++ ) {
371
+ for ( ; index < length; index++ ) {
336
372
  result = Animation.prefilters[ index ].call( animation, elem, props, animation.opts );
337
373
  if ( result ) {
338
374
  if ( jQuery.isFunction( result.stop ) ) {
@@ -386,7 +422,7 @@ jQuery.Animation = jQuery.extend( Animation, {
386
422
  index = 0,
387
423
  length = props.length;
388
424
 
389
- for ( ; index < length ; index++ ) {
425
+ for ( ; index < length; index++ ) {
390
426
  prop = props[ index ];
391
427
  Animation.tweeners[ prop ] = Animation.tweeners[ prop ] || [];
392
428
  Animation.tweeners[ prop ].unshift( callback );
@@ -412,11 +448,17 @@ jQuery.speed = function( speed, easing, fn ) {
412
448
  easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing
413
449
  };
414
450
 
415
- opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration :
416
- opt.duration in jQuery.fx.speeds ?
417
- jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default;
451
+ // Go to the end state if fx are off or if document is hidden
452
+ if ( jQuery.fx.off || document.hidden ) {
453
+ opt.duration = 0;
454
+
455
+ } else {
456
+ opt.duration = typeof opt.duration === "number" ?
457
+ opt.duration : opt.duration in jQuery.fx.speeds ?
458
+ jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default;
459
+ }
418
460
 
419
- // normalize opt.queue - true/undefined/null -> "fx"
461
+ // Normalize opt.queue - true/undefined/null -> "fx"
420
462
  if ( opt.queue == null || opt.queue === true ) {
421
463
  opt.queue = "fx";
422
464
  }
@@ -440,10 +482,10 @@ jQuery.speed = function( speed, easing, fn ) {
440
482
  jQuery.fn.extend( {
441
483
  fadeTo: function( speed, to, easing, callback ) {
442
484
 
443
- // show any hidden elements after setting opacity to 0
444
- return this.filter( isHidden ).css( "opacity", 0 ).show()
485
+ // Show any hidden elements after setting opacity to 0
486
+ return this.filter( isHiddenWithinTree ).css( "opacity", 0 ).show()
445
487
 
446
- // animate to the value specified
488
+ // Animate to the value specified
447
489
  .end().animate( { opacity: to }, speed, easing, callback );
448
490
  },
449
491
  animate: function( prop, speed, easing, callback ) {
@@ -455,7 +497,7 @@ jQuery.fn.extend( {
455
497
  var anim = Animation( this, jQuery.extend( {}, prop ), optall );
456
498
 
457
499
  // Empty animations, or finishing resolves immediately
458
- if ( empty || jQuery._data( this, "finish" ) ) {
500
+ if ( empty || dataPriv.get( this, "finish" ) ) {
459
501
  anim.stop( true );
460
502
  }
461
503
  };
@@ -485,7 +527,7 @@ jQuery.fn.extend( {
485
527
  var dequeue = true,
486
528
  index = type != null && type + "queueHooks",
487
529
  timers = jQuery.timers,
488
- data = jQuery._data( this );
530
+ data = dataPriv.get( this );
489
531
 
490
532
  if ( index ) {
491
533
  if ( data[ index ] && data[ index ].stop ) {
@@ -509,9 +551,9 @@ jQuery.fn.extend( {
509
551
  }
510
552
  }
511
553
 
512
- // start the next in the queue if the last step wasn't forced
513
- // timers currently will call their complete callbacks, which will dequeue
514
- // but only if they were gotoEnd
554
+ // Start the next in the queue if the last step wasn't forced.
555
+ // Timers currently will call their complete callbacks, which
556
+ // will dequeue but only if they were gotoEnd.
515
557
  if ( dequeue || !gotoEnd ) {
516
558
  jQuery.dequeue( this, type );
517
559
  }
@@ -523,23 +565,23 @@ jQuery.fn.extend( {
523
565
  }
524
566
  return this.each( function() {
525
567
  var index,
526
- data = jQuery._data( this ),
568
+ data = dataPriv.get( this ),
527
569
  queue = data[ type + "queue" ],
528
570
  hooks = data[ type + "queueHooks" ],
529
571
  timers = jQuery.timers,
530
572
  length = queue ? queue.length : 0;
531
573
 
532
- // enable finishing flag on private data
574
+ // Enable finishing flag on private data
533
575
  data.finish = true;
534
576
 
535
- // empty the queue first
577
+ // Empty the queue first
536
578
  jQuery.queue( this, type, [] );
537
579
 
538
580
  if ( hooks && hooks.stop ) {
539
581
  hooks.stop.call( this, true );
540
582
  }
541
583
 
542
- // look for any active animations, and finish them
584
+ // Look for any active animations, and finish them
543
585
  for ( index = timers.length; index--; ) {
544
586
  if ( timers[ index ].elem === this && timers[ index ].queue === type ) {
545
587
  timers[ index ].anim.stop( true );
@@ -547,14 +589,14 @@ jQuery.fn.extend( {
547
589
  }
548
590
  }
549
591
 
550
- // look for any animations in the old queue and finish them
592
+ // Look for any animations in the old queue and finish them
551
593
  for ( index = 0; index < length; index++ ) {
552
594
  if ( queue[ index ] && queue[ index ].finish ) {
553
595
  queue[ index ].finish.call( this );
554
596
  }
555
597
  }
556
598
 
557
- // turn off finishing flag
599
+ // Turn off finishing flag
558
600
  delete data.finish;
559
601
  } );
560
602
  }
@@ -586,8 +628,8 @@ jQuery.each( {
586
628
  jQuery.timers = [];
587
629
  jQuery.fx.tick = function() {
588
630
  var timer,
589
- timers = jQuery.timers,
590
- i = 0;
631
+ i = 0,
632
+ timers = jQuery.timers;
591
633
 
592
634
  fxNow = jQuery.now();
593
635
 
@@ -616,15 +658,21 @@ jQuery.fx.timer = function( timer ) {
616
658
  };
617
659
 
618
660
  jQuery.fx.interval = 13;
619
-
620
661
  jQuery.fx.start = function() {
621
662
  if ( !timerId ) {
622
- timerId = window.setInterval( jQuery.fx.tick, jQuery.fx.interval );
663
+ timerId = window.requestAnimationFrame ?
664
+ window.requestAnimationFrame( raf ) :
665
+ window.setInterval( jQuery.fx.tick, jQuery.fx.interval );
623
666
  }
624
667
  };
625
668
 
626
669
  jQuery.fx.stop = function() {
627
- window.clearInterval( timerId );
670
+ if ( window.cancelAnimationFrame ) {
671
+ window.cancelAnimationFrame( timerId );
672
+ } else {
673
+ window.clearInterval( timerId );
674
+ }
675
+
628
676
  timerId = null;
629
677
  };
630
678
 
@@ -3,6 +3,8 @@ define( [
3
3
  "../event"
4
4
  ], function( jQuery ) {
5
5
 
6
+ "use strict";
7
+
6
8
  // Attach a bunch of functions for handling common AJAX events
7
9
  jQuery.each( [
8
10
  "ajaxStart",
@@ -1,11 +1,15 @@
1
1
  define( [
2
2
  "../core",
3
- "../event"
3
+
4
+ "../event",
5
+ "./trigger"
4
6
  ], function( jQuery ) {
5
7
 
6
- jQuery.each( ( "blur focus focusin focusout load resize scroll unload click dblclick " +
8
+ "use strict";
9
+
10
+ jQuery.each( ( "blur focus focusin focusout resize scroll click dblclick " +
7
11
  "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
8
- "change select submit keydown keypress keyup error contextmenu" ).split( " " ),
12
+ "change select submit keydown keypress keyup contextmenu" ).split( " " ),
9
13
  function( i, name ) {
10
14
 
11
15
  // Handle event binding
@@ -7,14 +7,16 @@ define( [
7
7
  "./trigger"
8
8
  ], function( jQuery, dataPriv, support ) {
9
9
 
10
- // Support: Firefox
10
+ "use strict";
11
+
12
+ // Support: Firefox <=44
11
13
  // Firefox doesn't have focus(in | out) events
12
14
  // Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787
13
15
  //
14
- // Support: Chrome, Safari
16
+ // Support: Chrome <=48 - 49, Safari <=9.0 - 9.1
15
17
  // focus(in | out) events fire after focus & blur events,
16
18
  // which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order
17
- // Related ticket - https://code.google.com/p/chromium/issues/detail?id=449857
19
+ // Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=449857
18
20
  if ( !support.focusin ) {
19
21
  jQuery.each( { focus: "focusin", blur: "focusout" }, function( orig, fix ) {
20
22
 
@@ -1,27 +1,10 @@
1
1
  define( [
2
- "../var/document",
3
2
  "../var/support"
4
- ], function( document, support ) {
3
+ ], function( support ) {
5
4
 
6
- ( function() {
7
- var i, eventName,
8
- div = document.createElement( "div" );
5
+ "use strict";
9
6
 
10
- // Support: IE<9 (lack submit/change bubble), Firefox (lack focus(in | out) events)
11
- for ( i in { submit: true, change: true, focusin: true } ) {
12
- eventName = "on" + i;
13
-
14
- if ( !( support[ i ] = eventName in window ) ) {
15
-
16
- // Beware of CSP restrictions (https://developer.mozilla.org/en/Security/CSP)
17
- div.setAttribute( eventName, "t" );
18
- support[ i ] = div.attributes[ eventName ].expando === false;
19
- }
20
- }
21
-
22
- // Null elements to avoid leaks in IE.
23
- div = null;
24
- } )();
7
+ support.focusin = "onfocusin" in window;
25
8
 
26
9
  return support;
27
10