epuber 0.5.7 → 0.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +5 -2
- data/README.md +20 -26
- data/bin/epuber +2 -3
- data/epuber.gemspec +10 -12
- data/lib/epuber/book/contributor.rb +1 -1
- data/lib/epuber/book/file_request.rb +1 -1
- data/lib/epuber/book/target.rb +1 -2
- data/lib/epuber/book/toc_item.rb +1 -2
- data/lib/epuber/book.rb +1 -2
- data/lib/epuber/checker/text_checker.rb +1 -1
- data/lib/epuber/checker.rb +1 -2
- data/lib/epuber/checker_transformer_base.rb +1 -0
- data/lib/epuber/command/build.rb +1 -2
- data/lib/epuber/command/compile.rb +1 -1
- data/lib/epuber/command/init.rb +1 -2
- data/lib/epuber/command/server.rb +1 -2
- data/lib/epuber/command.rb +1 -1
- data/lib/epuber/compiler/compilation_context.rb +1 -1
- data/lib/epuber/compiler/file_database.rb +3 -5
- data/lib/epuber/compiler/file_finders/abstract.rb +1 -1
- data/lib/epuber/compiler/file_finders/imaginary.rb +1 -2
- data/lib/epuber/compiler/file_finders/normal.rb +1 -1
- data/lib/epuber/compiler/file_resolver.rb +1 -2
- data/lib/epuber/compiler/file_stat.rb +0 -1
- data/lib/epuber/compiler/file_types/abstract_file.rb +1 -2
- data/lib/epuber/compiler/file_types/bade_file.rb +1 -2
- data/lib/epuber/compiler/file_types/coffee_script_file.rb +1 -2
- data/lib/epuber/compiler/file_types/container_xml_file.rb +1 -2
- data/lib/epuber/compiler/file_types/generated_file.rb +1 -2
- data/lib/epuber/compiler/file_types/ibooks_display_options_file.rb +1 -7
- data/lib/epuber/compiler/file_types/image_file.rb +1 -2
- data/lib/epuber/compiler/file_types/mime_type_file.rb +1 -2
- data/lib/epuber/compiler/file_types/nav_file.rb +1 -2
- data/lib/epuber/compiler/file_types/opf_file.rb +1 -2
- data/lib/epuber/compiler/file_types/source_file.rb +1 -2
- data/lib/epuber/compiler/file_types/static_file.rb +1 -2
- data/lib/epuber/compiler/file_types/stylus_file.rb +1 -2
- data/lib/epuber/compiler/file_types/xhtml_file.rb +2 -4
- data/lib/epuber/compiler/generator.rb +1 -1
- data/lib/epuber/compiler/meta_inf_generator.rb +1 -1
- data/lib/epuber/compiler/nav_generator.rb +1 -1
- data/lib/epuber/compiler/opf_generator.rb +1 -1
- data/lib/epuber/compiler/problem.rb +1 -2
- data/lib/epuber/compiler/xhtml_processor.rb +6 -6
- data/lib/epuber/compiler.rb +7 -11
- data/lib/epuber/config.rb +3 -4
- data/lib/epuber/dsl/attribute.rb +1 -1
- data/lib/epuber/dsl/attribute_support.rb +2 -2
- data/lib/epuber/dsl/object.rb +1 -1
- data/lib/epuber/dsl/tree_object.rb +1 -1
- data/lib/epuber/helper.rb +1 -1
- data/lib/epuber/lockfile.rb +1 -1
- data/lib/epuber/plugin.rb +1 -1
- data/lib/epuber/ruby_extensions/match_data.rb +1 -0
- data/lib/epuber/ruby_extensions/thread.rb +1 -0
- data/lib/epuber/server/handlers.rb +1 -1
- data/lib/epuber/server.rb +3 -2
- data/lib/epuber/templates.rb +2 -1
- data/lib/epuber/third_party/bower/bower.json +3 -3
- data/lib/epuber/third_party/bower/bower_components/cookies-js/bower.json +1 -1
- data/lib/epuber/third_party/bower/bower_components/cookies-js/dist/cookies.js +2 -3
- data/lib/epuber/third_party/bower/bower_components/cookies-js/dist/cookies.min.js +6 -6
- data/lib/epuber/third_party/bower/bower_components/jquery/AUTHORS.txt +278 -0
- data/lib/epuber/third_party/bower/bower_components/jquery/{MIT-LICENSE.txt → LICENSE.txt} +17 -2
- data/lib/epuber/third_party/bower/bower_components/jquery/README.md +65 -0
- data/lib/epuber/third_party/bower/bower_components/jquery/bower.json +2 -16
- data/lib/epuber/third_party/bower/bower_components/jquery/dist/jquery.js +2566 -1962
- data/lib/epuber/third_party/bower/bower_components/jquery/dist/jquery.min.js +4 -5
- data/lib/epuber/third_party/bower/bower_components/jquery/dist/jquery.min.map +1 -1
- data/lib/epuber/third_party/bower/bower_components/jquery/external/sizzle/LICENSE.txt +36 -0
- data/lib/epuber/third_party/bower/bower_components/jquery/{src → external}/sizzle/dist/sizzle.js +236 -160
- data/lib/epuber/third_party/bower/bower_components/jquery/external/sizzle/dist/sizzle.min.js +3 -0
- data/lib/epuber/third_party/bower/bower_components/jquery/external/sizzle/dist/sizzle.min.map +1 -0
- data/lib/epuber/third_party/bower/bower_components/jquery/src/ajax/jsonp.js +25 -14
- data/lib/epuber/third_party/bower/bower_components/jquery/src/ajax/load.js +20 -12
- data/lib/epuber/third_party/bower/bower_components/jquery/src/ajax/parseJSON.js +2 -2
- data/lib/epuber/third_party/bower/bower_components/jquery/src/ajax/parseXML.js +4 -5
- data/lib/epuber/third_party/bower/bower_components/jquery/src/ajax/script.js +16 -12
- data/lib/epuber/third_party/bower/bower_components/jquery/src/ajax/var/location.js +3 -0
- data/lib/epuber/third_party/bower/bower_components/jquery/src/ajax/var/nonce.js +2 -2
- data/lib/epuber/third_party/bower/bower_components/jquery/src/ajax/var/rquery.js +3 -3
- data/lib/epuber/third_party/bower/bower_components/jquery/src/ajax/xhr.js +73 -42
- data/lib/epuber/third_party/bower/bower_components/jquery/src/ajax.js +116 -57
- data/lib/epuber/third_party/bower/bower_components/jquery/src/attributes/attr.js +49 -48
- data/lib/epuber/third_party/bower/bower_components/jquery/src/attributes/classes.js +86 -67
- data/lib/epuber/third_party/bower/bower_components/jquery/src/attributes/prop.js +63 -32
- data/lib/epuber/third_party/bower/bower_components/jquery/src/attributes/support.js +6 -5
- data/lib/epuber/third_party/bower/bower_components/jquery/src/attributes/val.js +40 -24
- data/lib/epuber/third_party/bower/bower_components/jquery/src/attributes.js +2 -2
- data/lib/epuber/third_party/bower/bower_components/jquery/src/callbacks.js +114 -87
- data/lib/epuber/third_party/bower/bower_components/jquery/src/core/access.js +11 -6
- data/lib/epuber/third_party/bower/bower_components/jquery/src/core/init.js +27 -16
- data/lib/epuber/third_party/bower/bower_components/jquery/src/core/parseHTML.js +10 -8
- data/lib/epuber/third_party/bower/bower_components/jquery/src/core/ready.js +20 -14
- data/lib/epuber/third_party/bower/bower_components/jquery/src/core/var/rsingleTag.js +4 -3
- data/lib/epuber/third_party/bower/bower_components/jquery/src/core.js +77 -85
- data/lib/epuber/third_party/bower/bower_components/jquery/src/css/addGetHookIf.js +5 -3
- data/lib/epuber/third_party/bower/bower_components/jquery/src/css/adjustCSS.js +65 -0
- data/lib/epuber/third_party/bower/bower_components/jquery/src/css/curCSS.js +20 -17
- data/lib/epuber/third_party/bower/bower_components/jquery/src/css/defaultDisplay.js +16 -14
- data/lib/epuber/third_party/bower/bower_components/jquery/src/css/hiddenVisibleSelectors.js +9 -6
- data/lib/epuber/third_party/bower/bower_components/jquery/src/css/showHide.js +48 -0
- data/lib/epuber/third_party/bower/bower_components/jquery/src/css/support.js +86 -61
- data/lib/epuber/third_party/bower/bower_components/jquery/src/css/var/cssExpand.js +2 -2
- data/lib/epuber/third_party/bower/bower_components/jquery/src/css/var/getStyles.js +8 -5
- data/lib/epuber/third_party/bower/bower_components/jquery/src/css/var/isHidden.js +6 -3
- data/lib/epuber/third_party/bower/bower_components/jquery/src/css/var/rmargin.js +3 -3
- data/lib/epuber/third_party/bower/bower_components/jquery/src/css/var/rnumnonpx.js +2 -2
- data/lib/epuber/third_party/bower/bower_components/jquery/src/css/{swap.js → var/swap.js} +3 -7
- data/lib/epuber/third_party/bower/bower_components/jquery/src/css.js +107 -55
- data/lib/epuber/third_party/bower/bower_components/jquery/src/data/Data.js +93 -74
- data/lib/epuber/third_party/bower/bower_components/jquery/src/data/{accepts.js → var/acceptData.js} +4 -6
- data/lib/epuber/third_party/bower/bower_components/jquery/src/data/var/{data_priv.js → dataPriv.js} +2 -2
- data/lib/epuber/third_party/bower/bower_components/jquery/src/data/var/{data_user.js → dataUser.js} +2 -2
- data/lib/epuber/third_party/bower/bower_components/jquery/src/data.js +49 -40
- data/lib/epuber/third_party/bower/bower_components/jquery/src/deferred.js +34 -25
- data/lib/epuber/third_party/bower/bower_components/jquery/src/deprecated.js +27 -8
- data/lib/epuber/third_party/bower/bower_components/jquery/src/dimensions.js +9 -5
- data/lib/epuber/third_party/bower/bower_components/jquery/src/effects/Tween.js +14 -7
- data/lib/epuber/third_party/bower/bower_components/jquery/src/effects/animatedSelector.js +4 -4
- data/lib/epuber/third_party/bower/bower_components/jquery/src/effects.js +96 -115
- data/lib/epuber/third_party/bower/bower_components/jquery/src/event/ajax.js +11 -4
- data/lib/epuber/third_party/bower/bower_components/jquery/src/event/alias.js +11 -23
- data/lib/epuber/third_party/bower/bower_components/jquery/src/event/focusin.js +53 -0
- data/lib/epuber/third_party/bower/bower_components/jquery/src/event/support.js +3 -3
- data/lib/epuber/third_party/bower/bower_components/jquery/src/event/trigger.js +183 -0
- data/lib/epuber/third_party/bower/bower_components/jquery/src/event.js +168 -325
- data/lib/epuber/third_party/bower/bower_components/jquery/src/exports/amd.js +3 -3
- data/lib/epuber/third_party/bower/bower_components/jquery/src/exports/global.js +2 -8
- data/lib/epuber/third_party/bower/bower_components/jquery/src/intro.js +1 -1
- data/lib/epuber/third_party/bower/bower_components/jquery/src/jquery.js +5 -5
- data/lib/epuber/third_party/bower/bower_components/jquery/src/manipulation/_evalUrl.js +6 -4
- data/lib/epuber/third_party/bower/bower_components/jquery/src/manipulation/buildFragment.js +102 -0
- data/lib/epuber/third_party/bower/bower_components/jquery/src/manipulation/getAll.js +21 -0
- data/lib/epuber/third_party/bower/bower_components/jquery/src/manipulation/setGlobalEval.js +20 -0
- data/lib/epuber/third_party/bower/bower_components/jquery/src/manipulation/support.js +7 -6
- data/lib/epuber/third_party/bower/bower_components/jquery/src/manipulation/var/rcheckableType.js +3 -3
- data/lib/epuber/third_party/bower/bower_components/jquery/src/manipulation/var/rscriptType.js +3 -0
- data/lib/epuber/third_party/bower/bower_components/jquery/src/manipulation/var/rtagName.js +3 -0
- data/lib/epuber/third_party/bower/bower_components/jquery/src/manipulation/wrapMap.js +27 -0
- data/lib/epuber/third_party/bower/bower_components/jquery/src/manipulation.js +206 -305
- data/lib/epuber/third_party/bower/bower_components/jquery/src/offset.js +40 -29
- data/lib/epuber/third_party/bower/bower_components/jquery/src/outro.js +1 -0
- data/lib/epuber/third_party/bower/bower_components/jquery/src/queue/delay.js +6 -6
- data/lib/epuber/third_party/bower/bower_components/jquery/src/queue.js +23 -22
- data/lib/epuber/third_party/bower/bower_components/jquery/src/selector-native.js +107 -68
- data/lib/epuber/third_party/bower/bower_components/jquery/src/selector-sizzle.js +5 -5
- data/lib/epuber/third_party/bower/bower_components/jquery/src/selector.js +1 -1
- data/lib/epuber/third_party/bower/bower_components/jquery/src/serialize.js +28 -14
- data/lib/epuber/third_party/bower/bower_components/jquery/src/traversing/findFilter.js +13 -13
- data/lib/epuber/third_party/bower/bower_components/jquery/src/traversing/var/dir.js +20 -0
- data/lib/epuber/third_party/bower/bower_components/jquery/src/traversing/var/rneedsContext.js +2 -2
- data/lib/epuber/third_party/bower/bower_components/jquery/src/traversing/var/siblings.js +15 -0
- data/lib/epuber/third_party/bower/bower_components/jquery/src/traversing.js +32 -56
- data/lib/epuber/third_party/bower/bower_components/jquery/src/var/arr.js +2 -2
- data/lib/epuber/third_party/bower/bower_components/jquery/src/var/class2type.js +3 -2
- data/lib/epuber/third_party/bower/bower_components/jquery/src/var/concat.js +2 -2
- data/lib/epuber/third_party/bower/bower_components/jquery/src/var/document.js +3 -0
- data/lib/epuber/third_party/bower/bower_components/jquery/src/var/documentElement.js +5 -0
- data/lib/epuber/third_party/bower/bower_components/jquery/src/var/hasOwn.js +2 -2
- data/lib/epuber/third_party/bower/bower_components/jquery/src/var/indexOf.js +2 -2
- data/lib/epuber/third_party/bower/bower_components/jquery/src/var/pnum.js +3 -3
- data/lib/epuber/third_party/bower/bower_components/jquery/src/var/push.js +2 -2
- data/lib/epuber/third_party/bower/bower_components/jquery/src/var/rcssNum.js +7 -0
- data/lib/epuber/third_party/bower/bower_components/jquery/src/var/rnotwhite.js +3 -3
- data/lib/epuber/third_party/bower/bower_components/jquery/src/var/slice.js +2 -2
- data/lib/epuber/third_party/bower/bower_components/jquery/src/var/support.js +3 -2
- data/lib/epuber/third_party/bower/bower_components/jquery/src/var/toString.js +2 -2
- data/lib/epuber/third_party/bower/bower_components/jquery/src/wrap.js +19 -19
- data/lib/epuber/third_party/bower/bower_components/spin.js/{LICENSE.txt → LICENSE.md} +2 -1
- data/lib/epuber/third_party/bower/bower_components/spin.js/README.md +21 -21
- data/lib/epuber/third_party/bower/bower_components/spin.js/bower.json +0 -1
- data/lib/epuber/third_party/bower/bower_components/spin.js/jquery.spin.js +23 -24
- data/lib/epuber/third_party/bower/bower_components/spin.js/spin.js +153 -113
- data/lib/epuber/third_party/bower/bower_components/spin.js/spin.min.js +2 -0
- data/lib/epuber/third_party/bower/bower_components/uri.js/CHANGELOG.md +424 -0
- data/lib/epuber/third_party/bower/bower_components/uri.js/README.md +23 -308
- data/lib/epuber/third_party/bower/bower_components/uri.js/SECURITY.md +12 -0
- data/lib/epuber/third_party/bower/bower_components/uri.js/bower.json +2 -2
- data/lib/epuber/third_party/bower/bower_components/uri.js/contributing.md +0 -4
- data/lib/epuber/third_party/bower/bower_components/uri.js/src/IPv6.js +3 -6
- data/lib/epuber/third_party/bower/bower_components/uri.js/src/SecondLevelDomains.js +8 -4
- data/lib/epuber/third_party/bower/bower_components/uri.js/src/URI.fragmentQuery.js +21 -4
- data/lib/epuber/third_party/bower/bower_components/uri.js/src/URI.fragmentURI.js +1 -1
- data/lib/epuber/third_party/bower/bower_components/uri.js/src/URI.js +312 -69
- data/lib/epuber/third_party/bower/bower_components/uri.js/src/URI.min.js +85 -77
- data/lib/epuber/third_party/bower/bower_components/uri.js/src/URITemplate.js +28 -11
- data/lib/epuber/third_party/bower/bower_components/uri.js/src/jquery.URI.js +17 -18
- data/lib/epuber/third_party/bower/bower_components/uri.js/src/jquery.URI.min.js +6 -6
- data/lib/epuber/third_party/bower/bower_components/uri.js/src/punycode.js +63 -38
- data/lib/epuber/third_party/bower.rb +2 -0
- data/lib/epuber/transformer/text_transformer.rb +1 -2
- data/lib/epuber/transformer.rb +1 -2
- data/lib/epuber/user_interface.rb +1 -1
- data/lib/epuber/vendor/hash_binding.rb +1 -1
- data/lib/epuber/vendor/nokogiri_extensions.rb +24 -21
- data/lib/epuber/vendor/ruby_templater.rb +1 -2
- data/lib/epuber/vendor/size.rb +1 -0
- data/lib/epuber/vendor/version.rb +1 -1
- data/lib/epuber/version.rb +2 -1
- data/lib/epuber.rb +1 -1
- metadata +77 -46
- data/lib/epuber/ruby_extensions/string.rb +0 -16
- data/lib/epuber/third_party/bower/bower_components/jquery/src/sizzle/dist/sizzle.min.js +0 -3
- data/lib/epuber/third_party/bower/bower_components/jquery/src/sizzle/dist/sizzle.min.map +0 -1
- data/lib/epuber/third_party/bower/bower_components/jquery/src/var/strundefined.js +0 -3
- data/lib/epuber/vendor/globals_context.rb +0 -26
@@ -1,69 +1,80 @@
|
|
1
|
-
define([
|
1
|
+
define( [
|
2
2
|
"../core",
|
3
3
|
"../var/rnotwhite",
|
4
|
-
"./
|
5
|
-
], function( jQuery, rnotwhite ) {
|
4
|
+
"./var/acceptData"
|
5
|
+
], function( jQuery, rnotwhite, acceptData ) {
|
6
6
|
|
7
7
|
function Data() {
|
8
|
-
// Support: Android<4,
|
9
|
-
// Old WebKit does not have Object.preventExtensions/freeze method,
|
10
|
-
// return new empty object instead with no [[set]] accessor
|
11
|
-
Object.defineProperty( this.cache = {}, 0, {
|
12
|
-
get: function() {
|
13
|
-
return {};
|
14
|
-
}
|
15
|
-
});
|
16
|
-
|
17
8
|
this.expando = jQuery.expando + Data.uid++;
|
18
9
|
}
|
19
10
|
|
20
11
|
Data.uid = 1;
|
21
|
-
Data.accepts = jQuery.acceptData;
|
22
12
|
|
23
13
|
Data.prototype = {
|
24
|
-
|
14
|
+
|
15
|
+
register: function( owner, initial ) {
|
16
|
+
var value = initial || {};
|
17
|
+
|
18
|
+
// If it is a node unlikely to be stringify-ed or looped over
|
19
|
+
// use plain assignment
|
20
|
+
if ( owner.nodeType ) {
|
21
|
+
owner[ this.expando ] = value;
|
22
|
+
|
23
|
+
// Otherwise secure it in a non-enumerable, non-writable property
|
24
|
+
// configurability must be true to allow the property to be
|
25
|
+
// deleted with the delete operator
|
26
|
+
} else {
|
27
|
+
Object.defineProperty( owner, this.expando, {
|
28
|
+
value: value,
|
29
|
+
writable: true,
|
30
|
+
configurable: true
|
31
|
+
} );
|
32
|
+
}
|
33
|
+
return owner[ this.expando ];
|
34
|
+
},
|
35
|
+
cache: function( owner ) {
|
36
|
+
|
25
37
|
// We can accept data for non-element nodes in modern browsers,
|
26
38
|
// but we should not, see #8335.
|
27
|
-
// Always return
|
28
|
-
if ( !
|
29
|
-
return
|
39
|
+
// Always return an empty object.
|
40
|
+
if ( !acceptData( owner ) ) {
|
41
|
+
return {};
|
30
42
|
}
|
31
43
|
|
32
|
-
|
33
|
-
|
34
|
-
unlock = owner[ this.expando ];
|
44
|
+
// Check if the owner object already has a cache
|
45
|
+
var value = owner[ this.expando ];
|
35
46
|
|
36
47
|
// If not, create one
|
37
|
-
if ( !
|
38
|
-
|
39
|
-
|
40
|
-
//
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
48
|
+
if ( !value ) {
|
49
|
+
value = {};
|
50
|
+
|
51
|
+
// We can accept data for non-element nodes in modern browsers,
|
52
|
+
// but we should not, see #8335.
|
53
|
+
// Always return an empty object.
|
54
|
+
if ( acceptData( owner ) ) {
|
55
|
+
|
56
|
+
// If it is a node unlikely to be stringify-ed or looped over
|
57
|
+
// use plain assignment
|
58
|
+
if ( owner.nodeType ) {
|
59
|
+
owner[ this.expando ] = value;
|
60
|
+
|
61
|
+
// Otherwise secure it in a non-enumerable property
|
62
|
+
// configurable must be true to allow the property to be
|
63
|
+
// deleted when data is removed
|
64
|
+
} else {
|
65
|
+
Object.defineProperty( owner, this.expando, {
|
66
|
+
value: value,
|
67
|
+
configurable: true
|
68
|
+
} );
|
69
|
+
}
|
50
70
|
}
|
51
71
|
}
|
52
72
|
|
53
|
-
|
54
|
-
if ( !this.cache[ unlock ] ) {
|
55
|
-
this.cache[ unlock ] = {};
|
56
|
-
}
|
57
|
-
|
58
|
-
return unlock;
|
73
|
+
return value;
|
59
74
|
},
|
60
75
|
set: function( owner, data, value ) {
|
61
76
|
var prop,
|
62
|
-
|
63
|
-
// if there is no entry for this "owner", create one inline
|
64
|
-
// and set the unlock as though an owner entry had always existed
|
65
|
-
unlock = this.key( owner ),
|
66
|
-
cache = this.cache[ unlock ];
|
77
|
+
cache = this.cache( owner );
|
67
78
|
|
68
79
|
// Handle: [ owner, key, value ] args
|
69
80
|
if ( typeof data === "string" ) {
|
@@ -71,30 +82,22 @@ Data.prototype = {
|
|
71
82
|
|
72
83
|
// Handle: [ owner, { properties } ] args
|
73
84
|
} else {
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
} else {
|
79
|
-
for ( prop in data ) {
|
80
|
-
cache[ prop ] = data[ prop ];
|
81
|
-
}
|
85
|
+
|
86
|
+
// Copy the properties one-by-one to the cache object
|
87
|
+
for ( prop in data ) {
|
88
|
+
cache[ prop ] = data[ prop ];
|
82
89
|
}
|
83
90
|
}
|
84
91
|
return cache;
|
85
92
|
},
|
86
93
|
get: function( owner, key ) {
|
87
|
-
// Either a valid cache is found, or will be created.
|
88
|
-
// New caches will be created and the unlock returned,
|
89
|
-
// allowing direct access to the newly created
|
90
|
-
// empty data object. A valid owner object must be provided.
|
91
|
-
var cache = this.cache[ this.key( owner ) ];
|
92
|
-
|
93
94
|
return key === undefined ?
|
94
|
-
cache
|
95
|
+
this.cache( owner ) :
|
96
|
+
owner[ this.expando ] && owner[ this.expando ][ key ];
|
95
97
|
},
|
96
98
|
access: function( owner, key, value ) {
|
97
99
|
var stored;
|
100
|
+
|
98
101
|
// In cases where either:
|
99
102
|
//
|
100
103
|
// 1. No key was specified
|
@@ -107,15 +110,15 @@ Data.prototype = {
|
|
107
110
|
// 2. The data stored at the key
|
108
111
|
//
|
109
112
|
if ( key === undefined ||
|
110
|
-
((key && typeof key === "string") && value === undefined) ) {
|
113
|
+
( ( key && typeof key === "string" ) && value === undefined ) ) {
|
111
114
|
|
112
115
|
stored = this.get( owner, key );
|
113
116
|
|
114
117
|
return stored !== undefined ?
|
115
|
-
stored : this.get( owner, jQuery.camelCase(key) );
|
118
|
+
stored : this.get( owner, jQuery.camelCase( key ) );
|
116
119
|
}
|
117
120
|
|
118
|
-
//
|
121
|
+
// When the key is not a string, or both a key and value
|
119
122
|
// are specified, set or extend (existing objects) with either:
|
120
123
|
//
|
121
124
|
// 1. An object of properties
|
@@ -129,15 +132,20 @@ Data.prototype = {
|
|
129
132
|
},
|
130
133
|
remove: function( owner, key ) {
|
131
134
|
var i, name, camel,
|
132
|
-
|
133
|
-
|
135
|
+
cache = owner[ this.expando ];
|
136
|
+
|
137
|
+
if ( cache === undefined ) {
|
138
|
+
return;
|
139
|
+
}
|
134
140
|
|
135
141
|
if ( key === undefined ) {
|
136
|
-
this.
|
142
|
+
this.register( owner );
|
137
143
|
|
138
144
|
} else {
|
145
|
+
|
139
146
|
// Support array or space separated string of keys
|
140
147
|
if ( jQuery.isArray( key ) ) {
|
148
|
+
|
141
149
|
// If "name" is an array of keys...
|
142
150
|
// When data is initially created, via ("key", "val") signature,
|
143
151
|
// keys will be converted to camelCase.
|
@@ -147,10 +155,12 @@ Data.prototype = {
|
|
147
155
|
name = key.concat( key.map( jQuery.camelCase ) );
|
148
156
|
} else {
|
149
157
|
camel = jQuery.camelCase( key );
|
158
|
+
|
150
159
|
// Try the string as a key before any manipulation
|
151
160
|
if ( key in cache ) {
|
152
161
|
name = [ key, camel ];
|
153
162
|
} else {
|
163
|
+
|
154
164
|
// If a key with the spaces exists, use it.
|
155
165
|
// Otherwise, create an array by matching non-whitespace
|
156
166
|
name = camel;
|
@@ -160,22 +170,31 @@ Data.prototype = {
|
|
160
170
|
}
|
161
171
|
|
162
172
|
i = name.length;
|
173
|
+
|
163
174
|
while ( i-- ) {
|
164
175
|
delete cache[ name[ i ] ];
|
165
176
|
}
|
166
177
|
}
|
178
|
+
|
179
|
+
// Remove the expando if there's no more data
|
180
|
+
if ( key === undefined || jQuery.isEmptyObject( cache ) ) {
|
181
|
+
|
182
|
+
// Support: Chrome <= 35-45+
|
183
|
+
// Webkit & Blink performance suffers when deleting properties
|
184
|
+
// from DOM nodes, so set to undefined instead
|
185
|
+
// https://code.google.com/p/chromium/issues/detail?id=378607
|
186
|
+
if ( owner.nodeType ) {
|
187
|
+
owner[ this.expando ] = undefined;
|
188
|
+
} else {
|
189
|
+
delete owner[ this.expando ];
|
190
|
+
}
|
191
|
+
}
|
167
192
|
},
|
168
193
|
hasData: function( owner ) {
|
169
|
-
|
170
|
-
|
171
|
-
);
|
172
|
-
},
|
173
|
-
discard: function( owner ) {
|
174
|
-
if ( owner[ this.expando ] ) {
|
175
|
-
delete this.cache[ owner[ this.expando ] ];
|
176
|
-
}
|
194
|
+
var cache = owner[ this.expando ];
|
195
|
+
return cache !== undefined && !jQuery.isEmptyObject( cache );
|
177
196
|
}
|
178
197
|
};
|
179
198
|
|
180
199
|
return Data;
|
181
|
-
});
|
200
|
+
} );
|
data/lib/epuber/third_party/bower/bower_components/jquery/src/data/{accepts.js → var/acceptData.js}
RENAMED
@@ -1,11 +1,10 @@
|
|
1
|
-
define(
|
2
|
-
"../core"
|
3
|
-
], function( jQuery ) {
|
1
|
+
define( function() {
|
4
2
|
|
5
3
|
/**
|
6
4
|
* Determines whether an object can have data
|
7
5
|
*/
|
8
|
-
|
6
|
+
return function( owner ) {
|
7
|
+
|
9
8
|
// Accepts only:
|
10
9
|
// - Node
|
11
10
|
// - Node.ELEMENT_NODE
|
@@ -16,5 +15,4 @@ jQuery.acceptData = function( owner ) {
|
|
16
15
|
return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType );
|
17
16
|
};
|
18
17
|
|
19
|
-
|
20
|
-
});
|
18
|
+
} );
|
@@ -1,10 +1,9 @@
|
|
1
|
-
define([
|
1
|
+
define( [
|
2
2
|
"./core",
|
3
|
-
"./var/rnotwhite",
|
4
3
|
"./core/access",
|
5
|
-
"./data/var/
|
6
|
-
"./data/var/
|
7
|
-
], function( jQuery,
|
4
|
+
"./data/var/dataPriv",
|
5
|
+
"./data/var/dataUser"
|
6
|
+
], function( jQuery, access, dataPriv, dataUser ) {
|
8
7
|
|
9
8
|
// Implementation Summary
|
10
9
|
//
|
@@ -17,7 +16,7 @@ define([
|
|
17
16
|
// 6. Provide a clear path for implementation upgrade to WeakMap in 2014
|
18
17
|
|
19
18
|
var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,
|
20
|
-
rmultiDash = /
|
19
|
+
rmultiDash = /[A-Z]/g;
|
21
20
|
|
22
21
|
function dataAttr( elem, key, data ) {
|
23
22
|
var name;
|
@@ -25,7 +24,7 @@ function dataAttr( elem, key, data ) {
|
|
25
24
|
// If nothing was found internally, try to fetch any
|
26
25
|
// data from the HTML5 data-* attribute
|
27
26
|
if ( data === undefined && elem.nodeType === 1 ) {
|
28
|
-
name = "data-" + key.replace( rmultiDash, "
|
27
|
+
name = "data-" + key.replace( rmultiDash, "-$&" ).toLowerCase();
|
29
28
|
data = elem.getAttribute( name );
|
30
29
|
|
31
30
|
if ( typeof data === "string" ) {
|
@@ -33,14 +32,15 @@ function dataAttr( elem, key, data ) {
|
|
33
32
|
data = data === "true" ? true :
|
34
33
|
data === "false" ? false :
|
35
34
|
data === "null" ? null :
|
35
|
+
|
36
36
|
// Only convert to a number if it doesn't change the string
|
37
37
|
+data + "" === data ? +data :
|
38
38
|
rbrace.test( data ) ? jQuery.parseJSON( data ) :
|
39
39
|
data;
|
40
|
-
} catch( e ) {}
|
40
|
+
} catch ( e ) {}
|
41
41
|
|
42
42
|
// Make sure we set the data so it isn't changed later
|
43
|
-
|
43
|
+
dataUser.set( elem, key, data );
|
44
44
|
} else {
|
45
45
|
data = undefined;
|
46
46
|
}
|
@@ -48,31 +48,31 @@ function dataAttr( elem, key, data ) {
|
|
48
48
|
return data;
|
49
49
|
}
|
50
50
|
|
51
|
-
jQuery.extend({
|
51
|
+
jQuery.extend( {
|
52
52
|
hasData: function( elem ) {
|
53
|
-
return
|
53
|
+
return dataUser.hasData( elem ) || dataPriv.hasData( elem );
|
54
54
|
},
|
55
55
|
|
56
56
|
data: function( elem, name, data ) {
|
57
|
-
return
|
57
|
+
return dataUser.access( elem, name, data );
|
58
58
|
},
|
59
59
|
|
60
60
|
removeData: function( elem, name ) {
|
61
|
-
|
61
|
+
dataUser.remove( elem, name );
|
62
62
|
},
|
63
63
|
|
64
64
|
// TODO: Now that all calls to _data and _removeData have been replaced
|
65
|
-
// with direct calls to
|
65
|
+
// with direct calls to dataPriv methods, these can be deprecated.
|
66
66
|
_data: function( elem, name, data ) {
|
67
|
-
return
|
67
|
+
return dataPriv.access( elem, name, data );
|
68
68
|
},
|
69
69
|
|
70
70
|
_removeData: function( elem, name ) {
|
71
|
-
|
71
|
+
dataPriv.remove( elem, name );
|
72
72
|
}
|
73
|
-
});
|
73
|
+
} );
|
74
74
|
|
75
|
-
jQuery.fn.extend({
|
75
|
+
jQuery.fn.extend( {
|
76
76
|
data: function( key, value ) {
|
77
77
|
var i, name, data,
|
78
78
|
elem = this[ 0 ],
|
@@ -81,9 +81,9 @@ jQuery.fn.extend({
|
|
81
81
|
// Gets all values
|
82
82
|
if ( key === undefined ) {
|
83
83
|
if ( this.length ) {
|
84
|
-
data =
|
84
|
+
data = dataUser.get( elem );
|
85
85
|
|
86
|
-
if ( elem.nodeType === 1 && !
|
86
|
+
if ( elem.nodeType === 1 && !dataPriv.get( elem, "hasDataAttrs" ) ) {
|
87
87
|
i = attrs.length;
|
88
88
|
while ( i-- ) {
|
89
89
|
|
@@ -92,12 +92,12 @@ jQuery.fn.extend({
|
|
92
92
|
if ( attrs[ i ] ) {
|
93
93
|
name = attrs[ i ].name;
|
94
94
|
if ( name.indexOf( "data-" ) === 0 ) {
|
95
|
-
name = jQuery.camelCase( name.slice(5) );
|
95
|
+
name = jQuery.camelCase( name.slice( 5 ) );
|
96
96
|
dataAttr( elem, name, data[ name ] );
|
97
97
|
}
|
98
98
|
}
|
99
99
|
}
|
100
|
-
|
100
|
+
dataPriv.set( elem, "hasDataAttrs", true );
|
101
101
|
}
|
102
102
|
}
|
103
103
|
|
@@ -106,14 +106,13 @@ jQuery.fn.extend({
|
|
106
106
|
|
107
107
|
// Sets multiple values
|
108
108
|
if ( typeof key === "object" ) {
|
109
|
-
return this.each(function() {
|
110
|
-
|
111
|
-
});
|
109
|
+
return this.each( function() {
|
110
|
+
dataUser.set( this, key );
|
111
|
+
} );
|
112
112
|
}
|
113
113
|
|
114
114
|
return access( this, function( value ) {
|
115
|
-
var data,
|
116
|
-
camelKey = jQuery.camelCase( key );
|
115
|
+
var data, camelKey;
|
117
116
|
|
118
117
|
// The calling jQuery object (element matches) is not empty
|
119
118
|
// (and therefore has an element appears at this[ 0 ]) and the
|
@@ -121,16 +120,24 @@ jQuery.fn.extend({
|
|
121
120
|
// will result in `undefined` for elem = this[ 0 ] which will
|
122
121
|
// throw an exception if an attempt to read a data cache is made.
|
123
122
|
if ( elem && value === undefined ) {
|
123
|
+
|
124
124
|
// Attempt to get data from the cache
|
125
125
|
// with the key as-is
|
126
|
-
data =
|
126
|
+
data = dataUser.get( elem, key ) ||
|
127
|
+
|
128
|
+
// Try to find dashed key if it exists (gh-2779)
|
129
|
+
// This is for 2.2.x only
|
130
|
+
dataUser.get( elem, key.replace( rmultiDash, "-$&" ).toLowerCase() );
|
131
|
+
|
127
132
|
if ( data !== undefined ) {
|
128
133
|
return data;
|
129
134
|
}
|
130
135
|
|
136
|
+
camelKey = jQuery.camelCase( key );
|
137
|
+
|
131
138
|
// Attempt to get data from the cache
|
132
139
|
// with the key camelized
|
133
|
-
data =
|
140
|
+
data = dataUser.get( elem, camelKey );
|
134
141
|
if ( data !== undefined ) {
|
135
142
|
return data;
|
136
143
|
}
|
@@ -147,32 +154,34 @@ jQuery.fn.extend({
|
|
147
154
|
}
|
148
155
|
|
149
156
|
// Set the data...
|
150
|
-
|
157
|
+
camelKey = jQuery.camelCase( key );
|
158
|
+
this.each( function() {
|
159
|
+
|
151
160
|
// First, attempt to store a copy or reference of any
|
152
161
|
// data that might've been store with a camelCased key.
|
153
|
-
var data =
|
162
|
+
var data = dataUser.get( this, camelKey );
|
154
163
|
|
155
164
|
// For HTML5 data-* attribute interop, we have to
|
156
165
|
// store property names with dashes in a camelCase form.
|
157
166
|
// This might not apply to all properties...*
|
158
|
-
|
167
|
+
dataUser.set( this, camelKey, value );
|
159
168
|
|
160
169
|
// *... In the case of properties that might _actually_
|
161
170
|
// have dashes, we need to also store a copy of that
|
162
171
|
// unchanged property.
|
163
|
-
if ( key.indexOf("-")
|
164
|
-
|
172
|
+
if ( key.indexOf( "-" ) > -1 && data !== undefined ) {
|
173
|
+
dataUser.set( this, key, value );
|
165
174
|
}
|
166
|
-
});
|
175
|
+
} );
|
167
176
|
}, null, value, arguments.length > 1, null, true );
|
168
177
|
},
|
169
178
|
|
170
179
|
removeData: function( key ) {
|
171
|
-
return this.each(function() {
|
172
|
-
|
173
|
-
});
|
180
|
+
return this.each( function() {
|
181
|
+
dataUser.remove( this, key );
|
182
|
+
} );
|
174
183
|
}
|
175
|
-
});
|
184
|
+
} );
|
176
185
|
|
177
186
|
return jQuery;
|
178
|
-
});
|
187
|
+
} );
|
@@ -1,17 +1,18 @@
|
|
1
|
-
define([
|
1
|
+
define( [
|
2
2
|
"./core",
|
3
3
|
"./var/slice",
|
4
4
|
"./callbacks"
|
5
5
|
], function( jQuery, slice ) {
|
6
6
|
|
7
|
-
jQuery.extend({
|
7
|
+
jQuery.extend( {
|
8
8
|
|
9
9
|
Deferred: function( func ) {
|
10
10
|
var tuples = [
|
11
|
+
|
11
12
|
// action, add listener, listener list, final state
|
12
|
-
[ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ],
|
13
|
-
[ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ],
|
14
|
-
[ "notify", "progress", jQuery.Callbacks("memory") ]
|
13
|
+
[ "resolve", "done", jQuery.Callbacks( "once memory" ), "resolved" ],
|
14
|
+
[ "reject", "fail", jQuery.Callbacks( "once memory" ), "rejected" ],
|
15
|
+
[ "notify", "progress", jQuery.Callbacks( "memory" ) ]
|
15
16
|
],
|
16
17
|
state = "pending",
|
17
18
|
promise = {
|
@@ -24,25 +25,30 @@ jQuery.extend({
|
|
24
25
|
},
|
25
26
|
then: function( /* fnDone, fnFail, fnProgress */ ) {
|
26
27
|
var fns = arguments;
|
27
|
-
return jQuery.Deferred(function( newDefer ) {
|
28
|
+
return jQuery.Deferred( function( newDefer ) {
|
28
29
|
jQuery.each( tuples, function( i, tuple ) {
|
29
30
|
var fn = jQuery.isFunction( fns[ i ] ) && fns[ i ];
|
31
|
+
|
30
32
|
// deferred[ done | fail | progress ] for forwarding actions to newDefer
|
31
|
-
deferred[ tuple[1] ](function() {
|
33
|
+
deferred[ tuple[ 1 ] ]( function() {
|
32
34
|
var returned = fn && fn.apply( this, arguments );
|
33
35
|
if ( returned && jQuery.isFunction( returned.promise ) ) {
|
34
36
|
returned.promise()
|
37
|
+
.progress( newDefer.notify )
|
35
38
|
.done( newDefer.resolve )
|
36
|
-
.fail( newDefer.reject )
|
37
|
-
.progress( newDefer.notify );
|
39
|
+
.fail( newDefer.reject );
|
38
40
|
} else {
|
39
|
-
newDefer[ tuple[ 0 ] + "With" ](
|
41
|
+
newDefer[ tuple[ 0 ] + "With" ](
|
42
|
+
this === promise ? newDefer.promise() : this,
|
43
|
+
fn ? [ returned ] : arguments
|
44
|
+
);
|
40
45
|
}
|
41
|
-
});
|
42
|
-
});
|
46
|
+
} );
|
47
|
+
} );
|
43
48
|
fns = null;
|
44
|
-
}).promise();
|
49
|
+
} ).promise();
|
45
50
|
},
|
51
|
+
|
46
52
|
// Get a promise for this deferred
|
47
53
|
// If obj is provided, the promise aspect is added to the object
|
48
54
|
promise: function( obj ) {
|
@@ -60,11 +66,12 @@ jQuery.extend({
|
|
60
66
|
stateString = tuple[ 3 ];
|
61
67
|
|
62
68
|
// promise[ done | fail | progress ] = list.add
|
63
|
-
promise[ tuple[1] ] = list.add;
|
69
|
+
promise[ tuple[ 1 ] ] = list.add;
|
64
70
|
|
65
71
|
// Handle state
|
66
72
|
if ( stateString ) {
|
67
|
-
list.add(function() {
|
73
|
+
list.add( function() {
|
74
|
+
|
68
75
|
// state = [ resolved | rejected ]
|
69
76
|
state = stateString;
|
70
77
|
|
@@ -73,12 +80,12 @@ jQuery.extend({
|
|
73
80
|
}
|
74
81
|
|
75
82
|
// deferred[ resolve | reject | notify ]
|
76
|
-
deferred[ tuple[0] ] = function() {
|
77
|
-
deferred[ tuple[0] + "With" ]( this === deferred ? promise : this, arguments );
|
83
|
+
deferred[ tuple[ 0 ] ] = function() {
|
84
|
+
deferred[ tuple[ 0 ] + "With" ]( this === deferred ? promise : this, arguments );
|
78
85
|
return this;
|
79
86
|
};
|
80
|
-
deferred[ tuple[0] + "With" ] = list.fireWith;
|
81
|
-
});
|
87
|
+
deferred[ tuple[ 0 ] + "With" ] = list.fireWith;
|
88
|
+
} );
|
82
89
|
|
83
90
|
// Make the deferred a promise
|
84
91
|
promise.promise( deferred );
|
@@ -99,9 +106,11 @@ jQuery.extend({
|
|
99
106
|
length = resolveValues.length,
|
100
107
|
|
101
108
|
// the count of uncompleted subordinates
|
102
|
-
remaining = length !== 1 ||
|
109
|
+
remaining = length !== 1 ||
|
110
|
+
( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0,
|
103
111
|
|
104
|
-
// the master Deferred.
|
112
|
+
// the master Deferred.
|
113
|
+
// If resolveValues consist of only a single Deferred, just use that.
|
105
114
|
deferred = remaining === 1 ? subordinate : jQuery.Deferred(),
|
106
115
|
|
107
116
|
// Update function for both resolve and progress values
|
@@ -127,9 +136,9 @@ jQuery.extend({
|
|
127
136
|
for ( ; i < length; i++ ) {
|
128
137
|
if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) {
|
129
138
|
resolveValues[ i ].promise()
|
139
|
+
.progress( updateFunc( i, progressContexts, progressValues ) )
|
130
140
|
.done( updateFunc( i, resolveContexts, resolveValues ) )
|
131
|
-
.fail( deferred.reject )
|
132
|
-
.progress( updateFunc( i, progressContexts, progressValues ) );
|
141
|
+
.fail( deferred.reject );
|
133
142
|
} else {
|
134
143
|
--remaining;
|
135
144
|
}
|
@@ -143,7 +152,7 @@ jQuery.extend({
|
|
143
152
|
|
144
153
|
return deferred.promise();
|
145
154
|
}
|
146
|
-
});
|
155
|
+
} );
|
147
156
|
|
148
157
|
return jQuery;
|
149
|
-
});
|
158
|
+
} );
|
@@ -1,13 +1,32 @@
|
|
1
|
-
define([
|
2
|
-
"./core"
|
3
|
-
"./traversing"
|
1
|
+
define( [
|
2
|
+
"./core"
|
4
3
|
], function( jQuery ) {
|
5
4
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
5
|
+
jQuery.fn.extend( {
|
6
|
+
|
7
|
+
bind: function( types, data, fn ) {
|
8
|
+
return this.on( types, null, data, fn );
|
9
|
+
},
|
10
|
+
unbind: function( types, fn ) {
|
11
|
+
return this.off( types, null, fn );
|
12
|
+
},
|
13
|
+
|
14
|
+
delegate: function( selector, types, data, fn ) {
|
15
|
+
return this.on( types, selector, data, fn );
|
16
|
+
},
|
17
|
+
undelegate: function( selector, types, fn ) {
|
18
|
+
|
19
|
+
// ( namespace ) or ( selector, types [, fn] )
|
20
|
+
return arguments.length === 1 ?
|
21
|
+
this.off( selector, "**" ) :
|
22
|
+
this.off( types, selector || "**", fn );
|
23
|
+
},
|
24
|
+
size: function() {
|
25
|
+
return this.length;
|
26
|
+
}
|
27
|
+
} );
|
10
28
|
|
11
29
|
jQuery.fn.andSelf = jQuery.fn.addBack;
|
12
30
|
|
13
|
-
});
|
31
|
+
} );
|
32
|
+
|