try_api 0.0.10 → 0.0.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (154) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/try_api/application.js.coffee +0 -3
  3. data/app/assets/javascripts/try_api/bower_components/bootstrap/dist/fonts/glyphicons-halflings-regular.eot +0 -0
  4. data/app/assets/javascripts/try_api/bower_components/bootstrap/dist/fonts/glyphicons-halflings-regular.ttf +0 -0
  5. data/app/assets/javascripts/try_api/bower_components/bootstrap/dist/fonts/glyphicons-halflings-regular.woff +0 -0
  6. data/app/assets/javascripts/try_api/bower_components/bootstrap/dist/fonts/glyphicons-halflings-regular.woff2 +0 -0
  7. data/app/assets/javascripts/try_api/bower_components/bootstrap/fonts/glyphicons-halflings-regular.eot +0 -0
  8. data/app/assets/javascripts/try_api/bower_components/bootstrap/fonts/glyphicons-halflings-regular.ttf +0 -0
  9. data/app/assets/javascripts/try_api/bower_components/bootstrap/fonts/glyphicons-halflings-regular.woff +0 -0
  10. data/app/assets/javascripts/try_api/bower_components/bootstrap/fonts/glyphicons-halflings-regular.woff2 +0 -0
  11. data/app/assets/javascripts/try_api/bower_components/bootstrap/grunt/change-version.js +0 -0
  12. data/app/assets/javascripts/try_api/param.directive.js.coffee +9 -4
  13. data/app/models/try_api/menu_item.rb +0 -2
  14. data/app/models/try_api/method.rb +2 -2
  15. data/app/views/layouts/try_api/application.html.erb +4 -0
  16. data/app/views/try_api/pages/index.html +15 -10
  17. data/lib/try_api/version.rb +1 -1
  18. metadata +2 -138
  19. data/app/assets/javascripts/try_api/bower_components/jquery/AUTHORS.txt +0 -295
  20. data/app/assets/javascripts/try_api/bower_components/jquery/LICENSE.txt +0 -36
  21. data/app/assets/javascripts/try_api/bower_components/jquery/README.md +0 -65
  22. data/app/assets/javascripts/try_api/bower_components/jquery/bower.json +0 -14
  23. data/app/assets/javascripts/try_api/bower_components/jquery/dist/core.js +0 -481
  24. data/app/assets/javascripts/try_api/bower_components/jquery/dist/jquery.js +0 -10074
  25. data/app/assets/javascripts/try_api/bower_components/jquery/dist/jquery.min.js +0 -4
  26. data/app/assets/javascripts/try_api/bower_components/jquery/dist/jquery.slim.js +0 -7966
  27. data/app/assets/javascripts/try_api/bower_components/jquery/dist/jquery.slim.min.js +0 -4
  28. data/app/assets/javascripts/try_api/bower_components/jquery/external/sizzle/LICENSE.txt +0 -36
  29. data/app/assets/javascripts/try_api/bower_components/jquery/external/sizzle/dist/sizzle.js +0 -2217
  30. data/app/assets/javascripts/try_api/bower_components/jquery/external/sizzle/dist/sizzle.min.js +0 -3
  31. data/app/assets/javascripts/try_api/bower_components/jquery/external/sizzle/dist/sizzle.min.map +0 -1
  32. data/app/assets/javascripts/try_api/bower_components/jquery/src/ajax/jsonp.js +0 -102
  33. data/app/assets/javascripts/try_api/bower_components/jquery/src/ajax/load.js +0 -75
  34. data/app/assets/javascripts/try_api/bower_components/jquery/src/ajax/parseXML.js +0 -30
  35. data/app/assets/javascripts/try_api/bower_components/jquery/src/ajax/script.js +0 -77
  36. data/app/assets/javascripts/try_api/bower_components/jquery/src/ajax/var/location.js +0 -5
  37. data/app/assets/javascripts/try_api/bower_components/jquery/src/ajax/var/nonce.js +0 -7
  38. data/app/assets/javascripts/try_api/bower_components/jquery/src/ajax/var/rquery.js +0 -5
  39. data/app/assets/javascripts/try_api/bower_components/jquery/src/ajax/xhr.js +0 -169
  40. data/app/assets/javascripts/try_api/bower_components/jquery/src/ajax.js +0 -855
  41. data/app/assets/javascripts/try_api/bower_components/jquery/src/attributes/attr.js +0 -137
  42. data/app/assets/javascripts/try_api/bower_components/jquery/src/attributes/classes.js +0 -179
  43. data/app/assets/javascripts/try_api/bower_components/jquery/src/attributes/prop.js +0 -128
  44. data/app/assets/javascripts/try_api/bower_components/jquery/src/attributes/support.js +0 -33
  45. data/app/assets/javascripts/try_api/bower_components/jquery/src/attributes/val.js +0 -184
  46. data/app/assets/javascripts/try_api/bower_components/jquery/src/attributes.js +0 -13
  47. data/app/assets/javascripts/try_api/bower_components/jquery/src/callbacks.js +0 -234
  48. data/app/assets/javascripts/try_api/bower_components/jquery/src/core/DOMEval.js +0 -16
  49. data/app/assets/javascripts/try_api/bower_components/jquery/src/core/access.js +0 -67
  50. data/app/assets/javascripts/try_api/bower_components/jquery/src/core/init.js +0 -127
  51. data/app/assets/javascripts/try_api/bower_components/jquery/src/core/parseHTML.js +0 -65
  52. data/app/assets/javascripts/try_api/bower_components/jquery/src/core/ready-no-deferred.js +0 -111
  53. data/app/assets/javascripts/try_api/bower_components/jquery/src/core/ready.js +0 -95
  54. data/app/assets/javascripts/try_api/bower_components/jquery/src/core/readyException.js +0 -13
  55. data/app/assets/javascripts/try_api/bower_components/jquery/src/core/support.js +0 -20
  56. data/app/assets/javascripts/try_api/bower_components/jquery/src/core/var/rsingleTag.js +0 -6
  57. data/app/assets/javascripts/try_api/bower_components/jquery/src/core.js +0 -481
  58. data/app/assets/javascripts/try_api/bower_components/jquery/src/css/addGetHookIf.js +0 -26
  59. data/app/assets/javascripts/try_api/bower_components/jquery/src/css/adjustCSS.js +0 -71
  60. data/app/assets/javascripts/try_api/bower_components/jquery/src/css/curCSS.js +0 -59
  61. data/app/assets/javascripts/try_api/bower_components/jquery/src/css/hiddenVisibleSelectors.js +0 -15
  62. data/app/assets/javascripts/try_api/bower_components/jquery/src/css/showHide.js +0 -105
  63. data/app/assets/javascripts/try_api/bower_components/jquery/src/css/support.js +0 -89
  64. data/app/assets/javascripts/try_api/bower_components/jquery/src/css/var/cssExpand.js +0 -5
  65. data/app/assets/javascripts/try_api/bower_components/jquery/src/css/var/getStyles.js +0 -17
  66. data/app/assets/javascripts/try_api/bower_components/jquery/src/css/var/isHiddenWithinTree.js +0 -34
  67. data/app/assets/javascripts/try_api/bower_components/jquery/src/css/var/rmargin.js +0 -5
  68. data/app/assets/javascripts/try_api/bower_components/jquery/src/css/var/rnumnonpx.js +0 -7
  69. data/app/assets/javascripts/try_api/bower_components/jquery/src/css/var/swap.js +0 -26
  70. data/app/assets/javascripts/try_api/bower_components/jquery/src/css.js +0 -424
  71. data/app/assets/javascripts/try_api/bower_components/jquery/src/data/Data.js +0 -161
  72. data/app/assets/javascripts/try_api/bower_components/jquery/src/data/var/acceptData.js +0 -19
  73. data/app/assets/javascripts/try_api/bower_components/jquery/src/data/var/dataPriv.js +0 -7
  74. data/app/assets/javascripts/try_api/bower_components/jquery/src/data/var/dataUser.js +0 -7
  75. data/app/assets/javascripts/try_api/bower_components/jquery/src/data.js +0 -161
  76. data/app/assets/javascripts/try_api/bower_components/jquery/src/deferred/exceptionHook.js +0 -21
  77. data/app/assets/javascripts/try_api/bower_components/jquery/src/deferred.js +0 -389
  78. data/app/assets/javascripts/try_api/bower_components/jquery/src/deprecated.js +0 -30
  79. data/app/assets/javascripts/try_api/bower_components/jquery/src/dimensions.js +0 -56
  80. data/app/assets/javascripts/try_api/bower_components/jquery/src/effects/Tween.js +0 -123
  81. data/app/assets/javascripts/try_api/bower_components/jquery/src/effects/animatedSelector.js +0 -15
  82. data/app/assets/javascripts/try_api/bower_components/jquery/src/effects.js +0 -688
  83. data/app/assets/javascripts/try_api/bower_components/jquery/src/event/ajax.js +0 -22
  84. data/app/assets/javascripts/try_api/bower_components/jquery/src/event/alias.js +0 -29
  85. data/app/assets/javascripts/try_api/bower_components/jquery/src/event/focusin.js +0 -55
  86. data/app/assets/javascripts/try_api/bower_components/jquery/src/event/support.js +0 -11
  87. data/app/assets/javascripts/try_api/bower_components/jquery/src/event/trigger.js +0 -185
  88. data/app/assets/javascripts/try_api/bower_components/jquery/src/event.js +0 -726
  89. data/app/assets/javascripts/try_api/bower_components/jquery/src/exports/amd.js +0 -26
  90. data/app/assets/javascripts/try_api/bower_components/jquery/src/exports/global.js +0 -34
  91. data/app/assets/javascripts/try_api/bower_components/jquery/src/jquery.js +0 -40
  92. data/app/assets/javascripts/try_api/bower_components/jquery/src/manipulation/_evalUrl.js +0 -23
  93. data/app/assets/javascripts/try_api/bower_components/jquery/src/manipulation/buildFragment.js +0 -104
  94. data/app/assets/javascripts/try_api/bower_components/jquery/src/manipulation/getAll.js +0 -23
  95. data/app/assets/javascripts/try_api/bower_components/jquery/src/manipulation/setGlobalEval.js +0 -22
  96. data/app/assets/javascripts/try_api/bower_components/jquery/src/manipulation/support.js +0 -35
  97. data/app/assets/javascripts/try_api/bower_components/jquery/src/manipulation/var/rcheckableType.js +0 -5
  98. data/app/assets/javascripts/try_api/bower_components/jquery/src/manipulation/var/rscriptType.js +0 -5
  99. data/app/assets/javascripts/try_api/bower_components/jquery/src/manipulation/var/rtagName.js +0 -5
  100. data/app/assets/javascripts/try_api/bower_components/jquery/src/manipulation/wrapMap.js +0 -29
  101. data/app/assets/javascripts/try_api/bower_components/jquery/src/manipulation.js +0 -486
  102. data/app/assets/javascripts/try_api/bower_components/jquery/src/offset.js +0 -232
  103. data/app/assets/javascripts/try_api/bower_components/jquery/src/queue/delay.js +0 -24
  104. data/app/assets/javascripts/try_api/bower_components/jquery/src/queue.js +0 -145
  105. data/app/assets/javascripts/try_api/bower_components/jquery/src/selector-native.js +0 -237
  106. data/app/assets/javascripts/try_api/bower_components/jquery/src/selector-sizzle.js +0 -19
  107. data/app/assets/javascripts/try_api/bower_components/jquery/src/selector.js +0 -3
  108. data/app/assets/javascripts/try_api/bower_components/jquery/src/serialize.js +0 -126
  109. data/app/assets/javascripts/try_api/bower_components/jquery/src/traversing/findFilter.js +0 -99
  110. data/app/assets/javascripts/try_api/bower_components/jquery/src/traversing/var/dir.js +0 -22
  111. data/app/assets/javascripts/try_api/bower_components/jquery/src/traversing/var/rneedsContext.js +0 -8
  112. data/app/assets/javascripts/try_api/bower_components/jquery/src/traversing/var/siblings.js +0 -17
  113. data/app/assets/javascripts/try_api/bower_components/jquery/src/traversing.js +0 -178
  114. data/app/assets/javascripts/try_api/bower_components/jquery/src/var/ObjectFunctionString.js +0 -7
  115. data/app/assets/javascripts/try_api/bower_components/jquery/src/var/arr.js +0 -5
  116. data/app/assets/javascripts/try_api/bower_components/jquery/src/var/class2type.js +0 -6
  117. data/app/assets/javascripts/try_api/bower_components/jquery/src/var/concat.js +0 -7
  118. data/app/assets/javascripts/try_api/bower_components/jquery/src/var/document.js +0 -5
  119. data/app/assets/javascripts/try_api/bower_components/jquery/src/var/documentElement.js +0 -7
  120. data/app/assets/javascripts/try_api/bower_components/jquery/src/var/fnToString.js +0 -7
  121. data/app/assets/javascripts/try_api/bower_components/jquery/src/var/getProto.js +0 -5
  122. data/app/assets/javascripts/try_api/bower_components/jquery/src/var/hasOwn.js +0 -7
  123. data/app/assets/javascripts/try_api/bower_components/jquery/src/var/indexOf.js +0 -7
  124. data/app/assets/javascripts/try_api/bower_components/jquery/src/var/pnum.js +0 -5
  125. data/app/assets/javascripts/try_api/bower_components/jquery/src/var/push.js +0 -7
  126. data/app/assets/javascripts/try_api/bower_components/jquery/src/var/rcssNum.js +0 -9
  127. data/app/assets/javascripts/try_api/bower_components/jquery/src/var/rnotwhite.js +0 -5
  128. data/app/assets/javascripts/try_api/bower_components/jquery/src/var/slice.js +0 -7
  129. data/app/assets/javascripts/try_api/bower_components/jquery/src/var/support.js +0 -6
  130. data/app/assets/javascripts/try_api/bower_components/jquery/src/var/toString.js +0 -7
  131. data/app/assets/javascripts/try_api/bower_components/jquery/src/wrap.js +0 -77
  132. data/app/assets/javascripts/try_api/bower_components/jquery-slimscroll/README.md +0 -8
  133. data/app/assets/javascripts/try_api/bower_components/jquery-slimscroll/bower.json +0 -46
  134. data/app/assets/javascripts/try_api/bower_components/jquery-slimscroll/examples/allow-page-scroll.html +0 -94
  135. data/app/assets/javascripts/try_api/bower_components/jquery-slimscroll/examples/chaining.html +0 -80
  136. data/app/assets/javascripts/try_api/bower_components/jquery-slimscroll/examples/disable-fade-out.html +0 -94
  137. data/app/assets/javascripts/try_api/bower_components/jquery-slimscroll/examples/dynamic-content.html +0 -81
  138. data/app/assets/javascripts/try_api/bower_components/jquery-slimscroll/examples/height-width.html +0 -125
  139. data/app/assets/javascripts/try_api/bower_components/jquery-slimscroll/examples/index.html +0 -9
  140. data/app/assets/javascripts/try_api/bower_components/jquery-slimscroll/examples/libs/prettify/prettify.css +0 -52
  141. data/app/assets/javascripts/try_api/bower_components/jquery-slimscroll/examples/libs/prettify/prettify.js +0 -1477
  142. data/app/assets/javascripts/try_api/bower_components/jquery-slimscroll/examples/mouse-wheel.html +0 -99
  143. data/app/assets/javascripts/try_api/bower_components/jquery-slimscroll/examples/multiple-elements.html +0 -120
  144. data/app/assets/javascripts/try_api/bower_components/jquery-slimscroll/examples/navigation.html +0 -30
  145. data/app/assets/javascripts/try_api/bower_components/jquery-slimscroll/examples/nested.html +0 -82
  146. data/app/assets/javascripts/try_api/bower_components/jquery-slimscroll/examples/programmatic-scrolling.html +0 -138
  147. data/app/assets/javascripts/try_api/bower_components/jquery-slimscroll/examples/rail.html +0 -190
  148. data/app/assets/javascripts/try_api/bower_components/jquery-slimscroll/examples/scroll-events.html +0 -88
  149. data/app/assets/javascripts/try_api/bower_components/jquery-slimscroll/examples/scrollbar.html +0 -189
  150. data/app/assets/javascripts/try_api/bower_components/jquery-slimscroll/examples/start-position.html +0 -100
  151. data/app/assets/javascripts/try_api/bower_components/jquery-slimscroll/examples/style.css +0 -13
  152. data/app/assets/javascripts/try_api/bower_components/jquery-slimscroll/jquery.slimscroll.js +0 -474
  153. data/app/assets/javascripts/try_api/bower_components/jquery-slimscroll/jquery.slimscroll.min.js +0 -16
  154. data/app/assets/javascripts/try_api/bower_components/jquery-slimscroll/package.json +0 -32
@@ -1,161 +0,0 @@
1
- define( [
2
- "./core",
3
- "./core/access",
4
- "./data/var/dataPriv",
5
- "./data/var/dataUser"
6
- ], function( jQuery, access, dataPriv, dataUser ) {
7
-
8
- "use strict";
9
-
10
- // Implementation Summary
11
- //
12
- // 1. Enforce API surface and semantic compatibility with 1.9.x branch
13
- // 2. Improve the module's maintainability by reducing the storage
14
- // paths to a single mechanism.
15
- // 3. Use the same single mechanism to support "private" and "user" data.
16
- // 4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData)
17
- // 5. Avoid exposing implementation details on user objects (eg. expando properties)
18
- // 6. Provide a clear path for implementation upgrade to WeakMap in 2014
19
-
20
- var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,
21
- rmultiDash = /[A-Z]/g;
22
-
23
- function dataAttr( elem, key, data ) {
24
- var name;
25
-
26
- // If nothing was found internally, try to fetch any
27
- // data from the HTML5 data-* attribute
28
- if ( data === undefined && elem.nodeType === 1 ) {
29
- name = "data-" + key.replace( rmultiDash, "-$&" ).toLowerCase();
30
- data = elem.getAttribute( name );
31
-
32
- if ( typeof data === "string" ) {
33
- try {
34
- data = data === "true" ? true :
35
- data === "false" ? false :
36
- data === "null" ? null :
37
-
38
- // Only convert to a number if it doesn't change the string
39
- +data + "" === data ? +data :
40
- rbrace.test( data ) ? JSON.parse( data ) :
41
- data;
42
- } catch ( e ) {}
43
-
44
- // Make sure we set the data so it isn't changed later
45
- dataUser.set( elem, key, data );
46
- } else {
47
- data = undefined;
48
- }
49
- }
50
- return data;
51
- }
52
-
53
- jQuery.extend( {
54
- hasData: function( elem ) {
55
- return dataUser.hasData( elem ) || dataPriv.hasData( elem );
56
- },
57
-
58
- data: function( elem, name, data ) {
59
- return dataUser.access( elem, name, data );
60
- },
61
-
62
- removeData: function( elem, name ) {
63
- dataUser.remove( elem, name );
64
- },
65
-
66
- // TODO: Now that all calls to _data and _removeData have been replaced
67
- // with direct calls to dataPriv methods, these can be deprecated.
68
- _data: function( elem, name, data ) {
69
- return dataPriv.access( elem, name, data );
70
- },
71
-
72
- _removeData: function( elem, name ) {
73
- dataPriv.remove( elem, name );
74
- }
75
- } );
76
-
77
- jQuery.fn.extend( {
78
- data: function( key, value ) {
79
- var i, name, data,
80
- elem = this[ 0 ],
81
- attrs = elem && elem.attributes;
82
-
83
- // Gets all values
84
- if ( key === undefined ) {
85
- if ( this.length ) {
86
- data = dataUser.get( elem );
87
-
88
- if ( elem.nodeType === 1 && !dataPriv.get( elem, "hasDataAttrs" ) ) {
89
- i = attrs.length;
90
- while ( i-- ) {
91
-
92
- // Support: IE 11 only
93
- // The attrs elements can be null (#14894)
94
- if ( attrs[ i ] ) {
95
- name = attrs[ i ].name;
96
- if ( name.indexOf( "data-" ) === 0 ) {
97
- name = jQuery.camelCase( name.slice( 5 ) );
98
- dataAttr( elem, name, data[ name ] );
99
- }
100
- }
101
- }
102
- dataPriv.set( elem, "hasDataAttrs", true );
103
- }
104
- }
105
-
106
- return data;
107
- }
108
-
109
- // Sets multiple values
110
- if ( typeof key === "object" ) {
111
- return this.each( function() {
112
- dataUser.set( this, key );
113
- } );
114
- }
115
-
116
- return access( this, function( value ) {
117
- var data;
118
-
119
- // The calling jQuery object (element matches) is not empty
120
- // (and therefore has an element appears at this[ 0 ]) and the
121
- // `value` parameter was not undefined. An empty jQuery object
122
- // will result in `undefined` for elem = this[ 0 ] which will
123
- // throw an exception if an attempt to read a data cache is made.
124
- if ( elem && value === undefined ) {
125
-
126
- // Attempt to get data from the cache
127
- // The key will always be camelCased in Data
128
- data = dataUser.get( elem, key );
129
- if ( data !== undefined ) {
130
- return data;
131
- }
132
-
133
- // Attempt to "discover" the data in
134
- // HTML5 custom data-* attrs
135
- data = dataAttr( elem, key );
136
- if ( data !== undefined ) {
137
- return data;
138
- }
139
-
140
- // We tried really hard, but the data doesn't exist.
141
- return;
142
- }
143
-
144
- // Set the data...
145
- this.each( function() {
146
-
147
- // We always store the camelCased key
148
- dataUser.set( this, key, value );
149
- } );
150
- }, null, value, arguments.length > 1, null, true );
151
- },
152
-
153
- removeData: function( key ) {
154
- return this.each( function() {
155
- dataUser.remove( this, key );
156
- } );
157
- }
158
- } );
159
-
160
- return jQuery;
161
- } );
@@ -1,21 +0,0 @@
1
- define( [
2
- "../core",
3
- "../deferred"
4
- ], function( jQuery ) {
5
-
6
- "use strict";
7
-
8
- // These usually indicate a programmer mistake during development,
9
- // warn about them ASAP rather than swallowing them by default.
10
- var rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;
11
-
12
- jQuery.Deferred.exceptionHook = function( error, stack ) {
13
-
14
- // Support: IE 8 - 9 only
15
- // Console exists when dev tools are open, which can happen at any time
16
- if ( window.console && window.console.warn && error && rerrorNames.test( error.name ) ) {
17
- window.console.warn( "jQuery.Deferred exception: " + error.message, error.stack, stack );
18
- }
19
- };
20
-
21
- } );
@@ -1,389 +0,0 @@
1
- define( [
2
- "./core",
3
- "./var/slice",
4
- "./callbacks"
5
- ], function( jQuery, slice ) {
6
-
7
- "use strict";
8
-
9
- function Identity( v ) {
10
- return v;
11
- }
12
- function Thrower( ex ) {
13
- throw ex;
14
- }
15
-
16
- function adoptValue( value, resolve, reject ) {
17
- var method;
18
-
19
- try {
20
-
21
- // Check for promise aspect first to privilege synchronous behavior
22
- if ( value && jQuery.isFunction( ( method = value.promise ) ) ) {
23
- method.call( value ).done( resolve ).fail( reject );
24
-
25
- // Other thenables
26
- } else if ( value && jQuery.isFunction( ( method = value.then ) ) ) {
27
- method.call( value, resolve, reject );
28
-
29
- // Other non-thenables
30
- } else {
31
-
32
- // Support: Android 4.0 only
33
- // Strict mode functions invoked without .call/.apply get global-object context
34
- resolve.call( undefined, value );
35
- }
36
-
37
- // For Promises/A+, convert exceptions into rejections
38
- // Since jQuery.when doesn't unwrap thenables, we can skip the extra checks appearing in
39
- // Deferred#then to conditionally suppress rejection.
40
- } catch ( value ) {
41
-
42
- // Support: Android 4.0 only
43
- // Strict mode functions invoked without .call/.apply get global-object context
44
- reject.call( undefined, value );
45
- }
46
- }
47
-
48
- jQuery.extend( {
49
-
50
- Deferred: function( func ) {
51
- var tuples = [
52
-
53
- // action, add listener, callbacks,
54
- // ... .then handlers, argument index, [final state]
55
- [ "notify", "progress", jQuery.Callbacks( "memory" ),
56
- jQuery.Callbacks( "memory" ), 2 ],
57
- [ "resolve", "done", jQuery.Callbacks( "once memory" ),
58
- jQuery.Callbacks( "once memory" ), 0, "resolved" ],
59
- [ "reject", "fail", jQuery.Callbacks( "once memory" ),
60
- jQuery.Callbacks( "once memory" ), 1, "rejected" ]
61
- ],
62
- state = "pending",
63
- promise = {
64
- state: function() {
65
- return state;
66
- },
67
- always: function() {
68
- deferred.done( arguments ).fail( arguments );
69
- return this;
70
- },
71
- "catch": function( fn ) {
72
- return promise.then( null, fn );
73
- },
74
-
75
- // Keep pipe for back-compat
76
- pipe: function( /* fnDone, fnFail, fnProgress */ ) {
77
- var fns = arguments;
78
-
79
- return jQuery.Deferred( function( newDefer ) {
80
- jQuery.each( tuples, function( i, tuple ) {
81
-
82
- // Map tuples (progress, done, fail) to arguments (done, fail, progress)
83
- var fn = jQuery.isFunction( fns[ tuple[ 4 ] ] ) && fns[ tuple[ 4 ] ];
84
-
85
- // deferred.progress(function() { bind to newDefer or newDefer.notify })
86
- // deferred.done(function() { bind to newDefer or newDefer.resolve })
87
- // deferred.fail(function() { bind to newDefer or newDefer.reject })
88
- deferred[ tuple[ 1 ] ]( function() {
89
- var returned = fn && fn.apply( this, arguments );
90
- if ( returned && jQuery.isFunction( returned.promise ) ) {
91
- returned.promise()
92
- .progress( newDefer.notify )
93
- .done( newDefer.resolve )
94
- .fail( newDefer.reject );
95
- } else {
96
- newDefer[ tuple[ 0 ] + "With" ](
97
- this,
98
- fn ? [ returned ] : arguments
99
- );
100
- }
101
- } );
102
- } );
103
- fns = null;
104
- } ).promise();
105
- },
106
- then: function( onFulfilled, onRejected, onProgress ) {
107
- var maxDepth = 0;
108
- function resolve( depth, deferred, handler, special ) {
109
- return function() {
110
- var that = this,
111
- args = arguments,
112
- mightThrow = function() {
113
- var returned, then;
114
-
115
- // Support: Promises/A+ section 2.3.3.3.3
116
- // https://promisesaplus.com/#point-59
117
- // Ignore double-resolution attempts
118
- if ( depth < maxDepth ) {
119
- return;
120
- }
121
-
122
- returned = handler.apply( that, args );
123
-
124
- // Support: Promises/A+ section 2.3.1
125
- // https://promisesaplus.com/#point-48
126
- if ( returned === deferred.promise() ) {
127
- throw new TypeError( "Thenable self-resolution" );
128
- }
129
-
130
- // Support: Promises/A+ sections 2.3.3.1, 3.5
131
- // https://promisesaplus.com/#point-54
132
- // https://promisesaplus.com/#point-75
133
- // Retrieve `then` only once
134
- then = returned &&
135
-
136
- // Support: Promises/A+ section 2.3.4
137
- // https://promisesaplus.com/#point-64
138
- // Only check objects and functions for thenability
139
- ( typeof returned === "object" ||
140
- typeof returned === "function" ) &&
141
- returned.then;
142
-
143
- // Handle a returned thenable
144
- if ( jQuery.isFunction( then ) ) {
145
-
146
- // Special processors (notify) just wait for resolution
147
- if ( special ) {
148
- then.call(
149
- returned,
150
- resolve( maxDepth, deferred, Identity, special ),
151
- resolve( maxDepth, deferred, Thrower, special )
152
- );
153
-
154
- // Normal processors (resolve) also hook into progress
155
- } else {
156
-
157
- // ...and disregard older resolution values
158
- maxDepth++;
159
-
160
- then.call(
161
- returned,
162
- resolve( maxDepth, deferred, Identity, special ),
163
- resolve( maxDepth, deferred, Thrower, special ),
164
- resolve( maxDepth, deferred, Identity,
165
- deferred.notifyWith )
166
- );
167
- }
168
-
169
- // Handle all other returned values
170
- } else {
171
-
172
- // Only substitute handlers pass on context
173
- // and multiple values (non-spec behavior)
174
- if ( handler !== Identity ) {
175
- that = undefined;
176
- args = [ returned ];
177
- }
178
-
179
- // Process the value(s)
180
- // Default process is resolve
181
- ( special || deferred.resolveWith )( that, args );
182
- }
183
- },
184
-
185
- // Only normal processors (resolve) catch and reject exceptions
186
- process = special ?
187
- mightThrow :
188
- function() {
189
- try {
190
- mightThrow();
191
- } catch ( e ) {
192
-
193
- if ( jQuery.Deferred.exceptionHook ) {
194
- jQuery.Deferred.exceptionHook( e,
195
- process.stackTrace );
196
- }
197
-
198
- // Support: Promises/A+ section 2.3.3.3.4.1
199
- // https://promisesaplus.com/#point-61
200
- // Ignore post-resolution exceptions
201
- if ( depth + 1 >= maxDepth ) {
202
-
203
- // Only substitute handlers pass on context
204
- // and multiple values (non-spec behavior)
205
- if ( handler !== Thrower ) {
206
- that = undefined;
207
- args = [ e ];
208
- }
209
-
210
- deferred.rejectWith( that, args );
211
- }
212
- }
213
- };
214
-
215
- // Support: Promises/A+ section 2.3.3.3.1
216
- // https://promisesaplus.com/#point-57
217
- // Re-resolve promises immediately to dodge false rejection from
218
- // subsequent errors
219
- if ( depth ) {
220
- process();
221
- } else {
222
-
223
- // Call an optional hook to record the stack, in case of exception
224
- // since it's otherwise lost when execution goes async
225
- if ( jQuery.Deferred.getStackHook ) {
226
- process.stackTrace = jQuery.Deferred.getStackHook();
227
- }
228
- window.setTimeout( process );
229
- }
230
- };
231
- }
232
-
233
- return jQuery.Deferred( function( newDefer ) {
234
-
235
- // progress_handlers.add( ... )
236
- tuples[ 0 ][ 3 ].add(
237
- resolve(
238
- 0,
239
- newDefer,
240
- jQuery.isFunction( onProgress ) ?
241
- onProgress :
242
- Identity,
243
- newDefer.notifyWith
244
- )
245
- );
246
-
247
- // fulfilled_handlers.add( ... )
248
- tuples[ 1 ][ 3 ].add(
249
- resolve(
250
- 0,
251
- newDefer,
252
- jQuery.isFunction( onFulfilled ) ?
253
- onFulfilled :
254
- Identity
255
- )
256
- );
257
-
258
- // rejected_handlers.add( ... )
259
- tuples[ 2 ][ 3 ].add(
260
- resolve(
261
- 0,
262
- newDefer,
263
- jQuery.isFunction( onRejected ) ?
264
- onRejected :
265
- Thrower
266
- )
267
- );
268
- } ).promise();
269
- },
270
-
271
- // Get a promise for this deferred
272
- // If obj is provided, the promise aspect is added to the object
273
- promise: function( obj ) {
274
- return obj != null ? jQuery.extend( obj, promise ) : promise;
275
- }
276
- },
277
- deferred = {};
278
-
279
- // Add list-specific methods
280
- jQuery.each( tuples, function( i, tuple ) {
281
- var list = tuple[ 2 ],
282
- stateString = tuple[ 5 ];
283
-
284
- // promise.progress = list.add
285
- // promise.done = list.add
286
- // promise.fail = list.add
287
- promise[ tuple[ 1 ] ] = list.add;
288
-
289
- // Handle state
290
- if ( stateString ) {
291
- list.add(
292
- function() {
293
-
294
- // state = "resolved" (i.e., fulfilled)
295
- // state = "rejected"
296
- state = stateString;
297
- },
298
-
299
- // rejected_callbacks.disable
300
- // fulfilled_callbacks.disable
301
- tuples[ 3 - i ][ 2 ].disable,
302
-
303
- // progress_callbacks.lock
304
- tuples[ 0 ][ 2 ].lock
305
- );
306
- }
307
-
308
- // progress_handlers.fire
309
- // fulfilled_handlers.fire
310
- // rejected_handlers.fire
311
- list.add( tuple[ 3 ].fire );
312
-
313
- // deferred.notify = function() { deferred.notifyWith(...) }
314
- // deferred.resolve = function() { deferred.resolveWith(...) }
315
- // deferred.reject = function() { deferred.rejectWith(...) }
316
- deferred[ tuple[ 0 ] ] = function() {
317
- deferred[ tuple[ 0 ] + "With" ]( this === deferred ? undefined : this, arguments );
318
- return this;
319
- };
320
-
321
- // deferred.notifyWith = list.fireWith
322
- // deferred.resolveWith = list.fireWith
323
- // deferred.rejectWith = list.fireWith
324
- deferred[ tuple[ 0 ] + "With" ] = list.fireWith;
325
- } );
326
-
327
- // Make the deferred a promise
328
- promise.promise( deferred );
329
-
330
- // Call given func if any
331
- if ( func ) {
332
- func.call( deferred, deferred );
333
- }
334
-
335
- // All done!
336
- return deferred;
337
- },
338
-
339
- // Deferred helper
340
- when: function( singleValue ) {
341
- var
342
-
343
- // count of uncompleted subordinates
344
- remaining = arguments.length,
345
-
346
- // count of unprocessed arguments
347
- i = remaining,
348
-
349
- // subordinate fulfillment data
350
- resolveContexts = Array( i ),
351
- resolveValues = slice.call( arguments ),
352
-
353
- // the master Deferred
354
- master = jQuery.Deferred(),
355
-
356
- // subordinate callback factory
357
- updateFunc = function( i ) {
358
- return function( value ) {
359
- resolveContexts[ i ] = this;
360
- resolveValues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value;
361
- if ( !( --remaining ) ) {
362
- master.resolveWith( resolveContexts, resolveValues );
363
- }
364
- };
365
- };
366
-
367
- // Single- and empty arguments are adopted like Promise.resolve
368
- if ( remaining <= 1 ) {
369
- adoptValue( singleValue, master.done( updateFunc( i ) ).resolve, master.reject );
370
-
371
- // Use .then() to unwrap secondary thenables (cf. gh-3000)
372
- if ( master.state() === "pending" ||
373
- jQuery.isFunction( resolveValues[ i ] && resolveValues[ i ].then ) ) {
374
-
375
- return master.then();
376
- }
377
- }
378
-
379
- // Multiple arguments are aggregated like Promise.all array elements
380
- while ( i-- ) {
381
- adoptValue( resolveValues[ i ], updateFunc( i ), master.reject );
382
- }
383
-
384
- return master.promise();
385
- }
386
- } );
387
-
388
- return jQuery;
389
- } );
@@ -1,30 +0,0 @@
1
- define( [
2
- "./core"
3
- ], function( jQuery ) {
4
-
5
- "use strict";
6
-
7
- jQuery.fn.extend( {
8
-
9
- bind: function( types, data, fn ) {
10
- return this.on( types, null, data, fn );
11
- },
12
- unbind: function( types, fn ) {
13
- return this.off( types, null, fn );
14
- },
15
-
16
- delegate: function( selector, types, data, fn ) {
17
- return this.on( types, selector, data, fn );
18
- },
19
- undelegate: function( selector, types, fn ) {
20
-
21
- // ( namespace ) or ( selector, types [, fn] )
22
- return arguments.length === 1 ?
23
- this.off( selector, "**" ) :
24
- this.off( types, selector || "**", fn );
25
- }
26
- } );
27
-
28
- jQuery.parseJSON = JSON.parse;
29
-
30
- } );
@@ -1,56 +0,0 @@
1
- define( [
2
- "./core",
3
- "./core/access",
4
- "./css"
5
- ], function( jQuery, access ) {
6
-
7
- "use strict";
8
-
9
- // Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods
10
- jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {
11
- jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name },
12
- function( defaultExtra, funcName ) {
13
-
14
- // Margin is only for outerHeight, outerWidth
15
- jQuery.fn[ funcName ] = function( margin, value ) {
16
- var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ),
17
- extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" );
18
-
19
- return access( this, function( elem, type, value ) {
20
- var doc;
21
-
22
- if ( jQuery.isWindow( elem ) ) {
23
-
24
- // $( window ).outerWidth/Height return w/h including scrollbars (gh-1729)
25
- return funcName.indexOf( "outer" ) === 0 ?
26
- elem[ "inner" + name ] :
27
- elem.document.documentElement[ "client" + name ];
28
- }
29
-
30
- // Get document width or height
31
- if ( elem.nodeType === 9 ) {
32
- doc = elem.documentElement;
33
-
34
- // Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height],
35
- // whichever is greatest
36
- return Math.max(
37
- elem.body[ "scroll" + name ], doc[ "scroll" + name ],
38
- elem.body[ "offset" + name ], doc[ "offset" + name ],
39
- doc[ "client" + name ]
40
- );
41
- }
42
-
43
- return value === undefined ?
44
-
45
- // Get width or height on the element, requesting but not forcing parseFloat
46
- jQuery.css( elem, type, extra ) :
47
-
48
- // Set width or height on the element
49
- jQuery.style( elem, type, value, extra );
50
- }, type, chainable ? margin : undefined, chainable );
51
- };
52
- } );
53
- } );
54
-
55
- return jQuery;
56
- } );