annyang 2.6.1 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +55 -31
- package/dist/annyang.cjs +354 -0
- package/dist/annyang.cjs.map +1 -0
- package/dist/annyang.d.cts +288 -0
- package/dist/annyang.d.ts +288 -0
- package/dist/annyang.iife.min.js +1 -0
- package/dist/annyang.js +296 -670
- package/dist/annyang.js.map +1 -1
- package/package.json +54 -36
- package/.editorconfig +0 -13
- package/.eslintrc.json +0 -34
- package/.gitattributes +0 -1
- package/.github/ISSUE_TEMPLATE.md +0 -32
- package/.github/PULL_REQUEST_TEMPLATE.md +0 -29
- package/.jshintrc +0 -31
- package/.travis.yml +0 -20
- package/CONTRIBUTING.md +0 -75
- package/Gruntfile.js +0 -144
- package/bower.json +0 -25
- package/demo/css/main.css +0 -152
- package/demo/css/main.min.css +0 -1
- package/demo/images/flickr.png +0 -0
- package/demo/images/footer_background.jpg +0 -0
- package/demo/images/icon_js.png +0 -0
- package/demo/images/icon_speech.png +0 -0
- package/demo/images/icon_user.png +0 -0
- package/demo/images/mini_icon_say.png +0 -0
- package/demo/images/palette.png +0 -0
- package/demo/images/tpscover.jpg +0 -0
- package/demo/index.html +0 -225
- package/demo/vendor/css/default.css +0 -135
- package/demo/vendor/css/github.css +0 -127
- package/demo/vendor/css/tomorrow.css +0 -49
- package/demo/vendor/html/github-btn.html +0 -243
- package/demo/vendor/js/highlight.pack.js +0 -1
- package/dist/annyang.min.js +0 -12
- package/docs/FAQ.md +0 -223
- package/docs/README.md +0 -336
- package/require.js +0 -36
- package/sites/README.md +0 -6
- package/sites/facebook.js +0 -123
- package/sites/facebook.min.js +0 -17
- package/sites/geektime.js +0 -108
- package/sites/geektime.min.js +0 -17
- package/src/annyang.js +0 -680
- package/test/SpecRunner.html +0 -41
- package/test/init_corti.js +0 -1
- package/test/spec/.jshintrc +0 -40
- package/test/spec/BasicSpec.js +0 -1616
- package/test/spec/IssuesSpec.js +0 -41
- package/test/vendor/corti.js +0 -202
- package/yarn.lock +0 -4190
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
|
|
3
|
-
Original style from softwaremaniacs.org (c) Ivan Sagalaev <Maniac@SoftwareManiacs.Org>
|
|
4
|
-
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
pre code {
|
|
8
|
-
display: block; padding: 0.5em;
|
|
9
|
-
background: #F0F0F0;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
pre code,
|
|
13
|
-
pre .subst,
|
|
14
|
-
pre .tag .title,
|
|
15
|
-
pre .lisp .title,
|
|
16
|
-
pre .clojure .built_in,
|
|
17
|
-
pre .nginx .title {
|
|
18
|
-
color: black;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
pre .string,
|
|
22
|
-
pre .title,
|
|
23
|
-
pre .constant,
|
|
24
|
-
pre .parent,
|
|
25
|
-
pre .tag .value,
|
|
26
|
-
pre .rules .value,
|
|
27
|
-
pre .rules .value .number,
|
|
28
|
-
pre .preprocessor,
|
|
29
|
-
pre .ruby .symbol,
|
|
30
|
-
pre .ruby .symbol .string,
|
|
31
|
-
pre .aggregate,
|
|
32
|
-
pre .template_tag,
|
|
33
|
-
pre .django .variable,
|
|
34
|
-
pre .smalltalk .class,
|
|
35
|
-
pre .addition,
|
|
36
|
-
pre .flow,
|
|
37
|
-
pre .stream,
|
|
38
|
-
pre .bash .variable,
|
|
39
|
-
pre .apache .tag,
|
|
40
|
-
pre .apache .cbracket,
|
|
41
|
-
pre .tex .command,
|
|
42
|
-
pre .tex .special,
|
|
43
|
-
pre .erlang_repl .function_or_atom,
|
|
44
|
-
pre .markdown .header {
|
|
45
|
-
color: #800;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
pre .comment,
|
|
49
|
-
pre .annotation,
|
|
50
|
-
pre .template_comment,
|
|
51
|
-
pre .diff .header,
|
|
52
|
-
pre .chunk,
|
|
53
|
-
pre .markdown .blockquote {
|
|
54
|
-
color: #888;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
pre .number,
|
|
58
|
-
pre .date,
|
|
59
|
-
pre .regexp,
|
|
60
|
-
pre .literal,
|
|
61
|
-
pre .smalltalk .symbol,
|
|
62
|
-
pre .smalltalk .char,
|
|
63
|
-
pre .go .constant,
|
|
64
|
-
pre .change,
|
|
65
|
-
pre .markdown .bullet,
|
|
66
|
-
pre .markdown .link_url {
|
|
67
|
-
color: #080;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
pre .label,
|
|
71
|
-
pre .javadoc,
|
|
72
|
-
pre .ruby .string,
|
|
73
|
-
pre .decorator,
|
|
74
|
-
pre .filter .argument,
|
|
75
|
-
pre .localvars,
|
|
76
|
-
pre .array,
|
|
77
|
-
pre .attr_selector,
|
|
78
|
-
pre .important,
|
|
79
|
-
pre .pseudo,
|
|
80
|
-
pre .pi,
|
|
81
|
-
pre .doctype,
|
|
82
|
-
pre .deletion,
|
|
83
|
-
pre .envvar,
|
|
84
|
-
pre .shebang,
|
|
85
|
-
pre .apache .sqbracket,
|
|
86
|
-
pre .nginx .built_in,
|
|
87
|
-
pre .tex .formula,
|
|
88
|
-
pre .erlang_repl .reserved,
|
|
89
|
-
pre .prompt,
|
|
90
|
-
pre .markdown .link_label,
|
|
91
|
-
pre .vhdl .attribute,
|
|
92
|
-
pre .clojure .attribute,
|
|
93
|
-
pre .coffeescript .property {
|
|
94
|
-
color: #88F
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
pre .keyword,
|
|
98
|
-
pre .id,
|
|
99
|
-
pre .phpdoc,
|
|
100
|
-
pre .title,
|
|
101
|
-
pre .built_in,
|
|
102
|
-
pre .aggregate,
|
|
103
|
-
pre .css .tag,
|
|
104
|
-
pre .javadoctag,
|
|
105
|
-
pre .phpdoc,
|
|
106
|
-
pre .yardoctag,
|
|
107
|
-
pre .smalltalk .class,
|
|
108
|
-
pre .winutils,
|
|
109
|
-
pre .bash .variable,
|
|
110
|
-
pre .apache .tag,
|
|
111
|
-
pre .go .typename,
|
|
112
|
-
pre .tex .command,
|
|
113
|
-
pre .markdown .strong,
|
|
114
|
-
pre .request,
|
|
115
|
-
pre .status {
|
|
116
|
-
font-weight: bold;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
pre .markdown .emphasis {
|
|
120
|
-
font-style: italic;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
pre .nginx .built_in {
|
|
124
|
-
font-weight: normal;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
pre .coffeescript .javascript,
|
|
128
|
-
pre .javascript .xml,
|
|
129
|
-
pre .tex .formula,
|
|
130
|
-
pre .xml .javascript,
|
|
131
|
-
pre .xml .vbscript,
|
|
132
|
-
pre .xml .css,
|
|
133
|
-
pre .xml .cdata {
|
|
134
|
-
opacity: 0.5;
|
|
135
|
-
}
|
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
|
|
3
|
-
github.com style (c) Vasily Polovnyov <vast@whiteants.net>
|
|
4
|
-
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
pre code {
|
|
8
|
-
display: block; padding: 0.5em;
|
|
9
|
-
color: #333;
|
|
10
|
-
background: #f8f8ff
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
pre .comment,
|
|
14
|
-
pre .template_comment,
|
|
15
|
-
pre .diff .header,
|
|
16
|
-
pre .javadoc {
|
|
17
|
-
color: #998;
|
|
18
|
-
font-style: italic
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
pre .keyword,
|
|
22
|
-
pre .css .rule .keyword,
|
|
23
|
-
pre .winutils,
|
|
24
|
-
pre .javascript .title,
|
|
25
|
-
pre .nginx .title,
|
|
26
|
-
pre .subst,
|
|
27
|
-
pre .request,
|
|
28
|
-
pre .status {
|
|
29
|
-
color: #333;
|
|
30
|
-
font-weight: bold
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
pre .number,
|
|
34
|
-
pre .hexcolor,
|
|
35
|
-
pre .ruby .constant {
|
|
36
|
-
color: #099;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
pre .string,
|
|
40
|
-
pre .tag .value,
|
|
41
|
-
pre .phpdoc,
|
|
42
|
-
pre .tex .formula {
|
|
43
|
-
color: #d14
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
pre .title,
|
|
47
|
-
pre .id {
|
|
48
|
-
color: #900;
|
|
49
|
-
font-weight: bold
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
pre .javascript .title,
|
|
53
|
-
pre .lisp .title,
|
|
54
|
-
pre .clojure .title,
|
|
55
|
-
pre .subst {
|
|
56
|
-
font-weight: normal
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
pre .class .title,
|
|
60
|
-
pre .haskell .type,
|
|
61
|
-
pre .vhdl .literal,
|
|
62
|
-
pre .tex .command {
|
|
63
|
-
color: #458;
|
|
64
|
-
font-weight: bold
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
pre .tag,
|
|
68
|
-
pre .tag .title,
|
|
69
|
-
pre .rules .property,
|
|
70
|
-
pre .django .tag .keyword {
|
|
71
|
-
color: #000080;
|
|
72
|
-
font-weight: normal
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
pre .attribute,
|
|
76
|
-
pre .variable,
|
|
77
|
-
pre .lisp .body {
|
|
78
|
-
color: #008080
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
pre .regexp {
|
|
82
|
-
color: #009926
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
pre .class {
|
|
86
|
-
color: #458;
|
|
87
|
-
font-weight: bold
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
pre .symbol,
|
|
91
|
-
pre .ruby .symbol .string,
|
|
92
|
-
pre .lisp .keyword,
|
|
93
|
-
pre .tex .special,
|
|
94
|
-
pre .prompt {
|
|
95
|
-
color: #990073
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
pre .built_in,
|
|
99
|
-
pre .lisp .title,
|
|
100
|
-
pre .clojure .built_in {
|
|
101
|
-
color: #0086b3
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
pre .preprocessor,
|
|
105
|
-
pre .pi,
|
|
106
|
-
pre .doctype,
|
|
107
|
-
pre .shebang,
|
|
108
|
-
pre .cdata {
|
|
109
|
-
color: #999;
|
|
110
|
-
font-weight: bold
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
pre .deletion {
|
|
114
|
-
background: #fdd
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
pre .addition {
|
|
118
|
-
background: #dfd
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
pre .diff .change {
|
|
122
|
-
background: #0086b3
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
pre .chunk {
|
|
126
|
-
color: #aaa
|
|
127
|
-
}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */
|
|
2
|
-
.tomorrow-comment, pre .comment, pre .title {
|
|
3
|
-
color: #8e908c;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
.tomorrow-red, pre .variable, pre .attribute, pre .tag, pre .regexp, pre .ruby .constant, pre .xml .tag .title, pre .xml .pi, pre .xml .doctype, pre .html .doctype, pre .css .id, pre .css .class, pre .css .pseudo {
|
|
7
|
-
color: #c82829;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.tomorrow-orange, pre .number, pre .preprocessor, pre .built_in, pre .literal, pre .params, pre .constant {
|
|
11
|
-
color: #f5871f;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.tomorrow-yellow, pre .class, pre .ruby .class .title, pre .css .rules .attribute {
|
|
15
|
-
color: #eab700;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.tomorrow-green, pre .string, pre .value, pre .inheritance, pre .header, pre .ruby .symbol, pre .xml .cdata {
|
|
19
|
-
color: #718c00;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.tomorrow-aqua, pre .css .hexcolor {
|
|
23
|
-
color: #3e999f;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.tomorrow-blue, pre .function, pre .python .decorator, pre .python .title, pre .ruby .function .title, pre .ruby .title .keyword, pre .perl .sub, pre .javascript .title, pre .coffeescript .title {
|
|
27
|
-
color: #4271ae;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.tomorrow-purple, pre .keyword, pre .javascript .function {
|
|
31
|
-
color: #8959a8;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
pre code {
|
|
35
|
-
display: block;
|
|
36
|
-
background: white;
|
|
37
|
-
color: #4d4d4c;
|
|
38
|
-
padding: 0.5em;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
pre .coffeescript .javascript,
|
|
42
|
-
pre .javascript .xml,
|
|
43
|
-
pre .tex .formula,
|
|
44
|
-
pre .xml .javascript,
|
|
45
|
-
pre .xml .vbscript,
|
|
46
|
-
pre .xml .css,
|
|
47
|
-
pre .xml .cdata {
|
|
48
|
-
opacity: 0.5;
|
|
49
|
-
}
|
|
@@ -1,243 +0,0 @@
|
|
|
1
|
-
<html><body><style type="text/css">
|
|
2
|
-
body {
|
|
3
|
-
padding: 0;
|
|
4
|
-
margin: 0;
|
|
5
|
-
font: bold 11px/14px "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
6
|
-
text-rendering: optimizeLegibility;
|
|
7
|
-
overflow: hidden;
|
|
8
|
-
}
|
|
9
|
-
.github-btn {
|
|
10
|
-
height: 20px;
|
|
11
|
-
overflow: hidden;
|
|
12
|
-
}
|
|
13
|
-
.gh-btn,
|
|
14
|
-
.gh-count,
|
|
15
|
-
.gh-ico {
|
|
16
|
-
float: left;
|
|
17
|
-
}
|
|
18
|
-
.gh-btn,
|
|
19
|
-
.gh-count {
|
|
20
|
-
padding: 2px 5px 2px 4px;
|
|
21
|
-
color: #555;
|
|
22
|
-
text-decoration: none;
|
|
23
|
-
text-shadow: 0 1px 0 #fff;
|
|
24
|
-
white-space: nowrap;
|
|
25
|
-
cursor: pointer;
|
|
26
|
-
border-radius: 3px;
|
|
27
|
-
}
|
|
28
|
-
.gh-btn {
|
|
29
|
-
background-color: #e6e6e6;
|
|
30
|
-
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fafafa), to(#eaeaea));
|
|
31
|
-
background-image: -webkit-linear-gradient(#fafafa, #eaeaea);
|
|
32
|
-
background-image: -moz-linear-gradient(top, #fafafa, #eaeaea);
|
|
33
|
-
background-image: -ms-linear-gradient(#fafafa, #eaeaea);
|
|
34
|
-
background-image: -o-linear-gradient(#fafafa, #eaeaea);
|
|
35
|
-
background-image: linear-gradient(#fafafa, #eaeaea);
|
|
36
|
-
background-repeat: no-repeat;
|
|
37
|
-
border: 1px solid #d4d4d4;
|
|
38
|
-
border-bottom-color: #bcbcbc;
|
|
39
|
-
}
|
|
40
|
-
.gh-btn:hover,
|
|
41
|
-
.gh-btn:focus,
|
|
42
|
-
.gh-btn:active {
|
|
43
|
-
color: #fff;
|
|
44
|
-
text-decoration: none;
|
|
45
|
-
text-shadow: 0 -1px 0 rgba(0,0,0,.25);
|
|
46
|
-
border-color: #518cc6 #518cc6 #2a65a0;
|
|
47
|
-
background-color: #3072b3;
|
|
48
|
-
}
|
|
49
|
-
.gh-btn:hover,
|
|
50
|
-
.gh-btn:focus {
|
|
51
|
-
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#599bdc), to(#3072b3));
|
|
52
|
-
background-image: -webkit-linear-gradient(#599bdc, #3072b3);
|
|
53
|
-
background-image: -moz-linear-gradient(top, #599bdc, #3072b3);
|
|
54
|
-
background-image: -ms-linear-gradient(#599bdc, #3072b3);
|
|
55
|
-
background-image: -o-linear-gradient(#599bdc, #3072b3);
|
|
56
|
-
background-image: linear-gradient(#599bdc, #3072b3);
|
|
57
|
-
}
|
|
58
|
-
.gh-btn:active {
|
|
59
|
-
background-image: none;
|
|
60
|
-
-webkit-box-shadow: inset 0 2px 5px rgba(0,0,0,.10);
|
|
61
|
-
-moz-box-shadow: inset 0 2px 5px rgba(0,0,0,.10);
|
|
62
|
-
box-shadow: inset 0 2px 5px rgba(0,0,0,.10);
|
|
63
|
-
}
|
|
64
|
-
.gh-ico {
|
|
65
|
-
width: 14px;
|
|
66
|
-
height: 15px;
|
|
67
|
-
margin-top: -1px;
|
|
68
|
-
margin-right: 4px;
|
|
69
|
-
vertical-align: middle;
|
|
70
|
-
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAtCAQAAABGtvB0AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAB7RJREFUWMPt12tQVPcZx/HHGw0VG6yo1Y42YGIbjamT6JhEbc1AUodaJNbnsNwsFRQUsUSQQUEUNILGotFITTA2olVCI7FoiLdquOgEcFBAQS5Z5bLcXFZcdvfs7ZxfX+yqoLvQ6btO+5w3e3bOdz87+9/5n12i/3RGkSfNoV/RQppDnjTq3yjYg9O4kg2s50pOY48hg/E+v63NNtXIomww1dRmey+hCUMRywVthDKntKy8rDynNEIp9LEwaDAhL0XWohzRWIRFiEa53HdqK00cjBAEU16N9RD8MRuz4W899GWNYOQgp4FLfopsvJs4Zj79jKbRdPIas6AxURYLUukHzoiJAfqz1bsPsoq38G4+xLu4a+en528GiDzFcfGnuZIOIU0Jorr8SM3JhoKqk6YH9akQJEPSAifIij9vuo930rMYT46kfCxK7g77i+Oi7oh4hejqLvSb6uM0QrxQf8IJsrItv4AorLk/ojDx6NOnwrocF1qlOoRIq+yPWI07x/cK+lYniEI6H0IkSP0RRuys4uWC7LiQzcWvkYtsxYCp/GXhDFlyiuxcwhPDjQORfd7JvoGSM+SCb+lUa8dA5M6cc0slkxMkWpewJXNWfkWA/IRI78z2iUuP0jkujA1l2xqn1W+ApZ9xHL+4mWFUOkH2V0eVn5iR9ml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iKidqdI18dERL0VsBekkGNVRESn/ZwhmV8QEW1ofoTIFk0ljSWPU3OdId+nkgd5qMsfI+HGMB37sH9CeJjJMZJ2nP3Y748Pw+w/3cxdolrpZ30P/nK3EyURfr2/N3Ra1HZkcwfj89AHb2PBtZIQy7NERgeC8NbVpQI2dtsK3T+B/CVwoR+3L0avA+IoEVHaXMj6a3bk6DnG+j0YyYvzlnVezPk+URNqp9bqMzqLq7GJiChiK+NQsX3h1wLlWTSy9b3EgMJp2CRftvTZXt3UiBwsISKiEWUHAHGzHakNDrIG9fLzuUEK5fb5CNYcXCnakEM3sAlvEhHxmBCNQrq9xlZggqw3ad6dh1fNyoRQennhr433bUjN4z8bb78uqmUzJttP4Z7dyAjMg1fud0IvHxduBJsZa/UrzBF3HyWBxxj7mzHu0bmUBjRfIi8pUuptL9TeseoAUWl9oK2zX+Cp/AaQnmxEROqoGB2Ddxn9Dt+JUkU+SOpmJLYmd0T1EBHxME5jROvUcU8KuMk1QNXJsa+atuG6pV5TAmiK1N/qG4nIxWVW5VFAqsWYfghclXlhJobwj4YYfHLxUnwTI74prnGNhogn8VeMMFPTKfyw//4MT7kbUJX+bim9VBSuKQI0RZqiviZ6yd9fVQLI3Xj6HoRJzedj+hiCng/E5mxsYCTWxTeGGvmAoGOs0929gJ/S042nXA1Yxbr8qhPtpUDblY5r5od1+VYDIN/CNHp2MEl3NKsl0MpgCDIj2L74gVJWi/bY4wUc2IzGh7DdfiXAorV/gUXsgRs5HjyHKPXl3MbknpVGAYIcbkzuyW1UX8EauJLTwXjEohAqyJDQhkLEYjwNPnDHcmTgS1zGZfwdGVgOd/pvmX8Bbv8r+TZ9z+kAAAAASUVORK5CYII=);
|
|
71
|
-
background-repeat: no-repeat;
|
|
72
|
-
background-position: 0 0;
|
|
73
|
-
}
|
|
74
|
-
.gh-btn:hover .gh-ico,
|
|
75
|
-
.gh-btn:focus .gh-ico,
|
|
76
|
-
.gh-btn:active .gh-ico {
|
|
77
|
-
background-position: -25px 0;
|
|
78
|
-
}
|
|
79
|
-
.gh-count {
|
|
80
|
-
position: relative;
|
|
81
|
-
display: none; /* hidden to start */
|
|
82
|
-
margin-left: 4px;
|
|
83
|
-
background-color: #fafafa;
|
|
84
|
-
border: 1px solid #d4d4d4;
|
|
85
|
-
}
|
|
86
|
-
.gh-count:hover,
|
|
87
|
-
.gh-count:focus {
|
|
88
|
-
color: #4183C4;
|
|
89
|
-
}
|
|
90
|
-
.gh-count:before,
|
|
91
|
-
.gh-count:after {
|
|
92
|
-
content: ' ';
|
|
93
|
-
position: absolute;
|
|
94
|
-
display: inline-block;
|
|
95
|
-
width: 0;
|
|
96
|
-
height: 0;
|
|
97
|
-
border-color: transparent;
|
|
98
|
-
border-style: solid;
|
|
99
|
-
}
|
|
100
|
-
.gh-count:before {
|
|
101
|
-
top: 50%;
|
|
102
|
-
left: -3px;
|
|
103
|
-
margin-top: -4px;
|
|
104
|
-
border-width: 4px 4px 4px 0;
|
|
105
|
-
border-right-color: #fafafa;
|
|
106
|
-
}
|
|
107
|
-
.gh-count:after {
|
|
108
|
-
top: 50%;
|
|
109
|
-
left: -4px;
|
|
110
|
-
z-index: -1;
|
|
111
|
-
margin-top: -5px;
|
|
112
|
-
border-width: 5px 5px 5px 0;
|
|
113
|
-
border-right-color: #d4d4d4;
|
|
114
|
-
}
|
|
115
|
-
.github-btn-large {
|
|
116
|
-
height: 30px;
|
|
117
|
-
}
|
|
118
|
-
.github-btn-large .gh-btn,
|
|
119
|
-
.github-btn-large .gh-count {
|
|
120
|
-
padding: 3px 10px 3px 8px;
|
|
121
|
-
font-size: 16px;
|
|
122
|
-
line-height: 22px;
|
|
123
|
-
border-radius: 4px;
|
|
124
|
-
}
|
|
125
|
-
.github-btn-large .gh-ico {
|
|
126
|
-
width: 22px;
|
|
127
|
-
height: 23px;
|
|
128
|
-
background-position: 0 -20px;
|
|
129
|
-
}
|
|
130
|
-
.github-btn-large .gh-btn:hover .gh-ico,
|
|
131
|
-
.github-btn-large .gh-btn:focus .gh-ico,
|
|
132
|
-
.github-btn-large .gh-btn:active .gh-ico {
|
|
133
|
-
background-position: -25px -20px;
|
|
134
|
-
}
|
|
135
|
-
.github-btn-large .gh-count {
|
|
136
|
-
margin-left: 6px;
|
|
137
|
-
}
|
|
138
|
-
.github-btn-large .gh-count:before {
|
|
139
|
-
left: -5px;
|
|
140
|
-
margin-top: -6px;
|
|
141
|
-
border-width: 6px 6px 6px 0;
|
|
142
|
-
}
|
|
143
|
-
.github-btn-large .gh-count:after {
|
|
144
|
-
left: -6px;
|
|
145
|
-
margin-top: -7px;
|
|
146
|
-
border-width: 7px 7px 7px 0;
|
|
147
|
-
}
|
|
148
|
-
@media (-moz-min-device-pixel-ratio: 2), (-o-min-device-pixel-ratio: 2/1), (-webkit-min-device-pixel-ratio: 2), (min-device-pixel-ratio: 2) {
|
|
149
|
-
.gh-ico {
|
|
150
|
-
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABaCAQAAADkmzsCAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAE81JREFUeNrtnGl0VFW2gHcIIggINLQoaj9bQHmgjUwRBZMK2A4Iora7CAFjGBIRFESZmwZkEgkiAg0oiigIggJhkkGgAjIpgyAkEAhICCGQkEDmoaru937UkKqQhFTwvbd6Lc5dK6tycm/t8917zj57uhH5/2h+Uk+aSGt5UoIkSJ6UVtJY6omf/Ec1P7lPnhBTKUd7afQHwqi//l1n6V69rHa16SXdox9pZ63yB319LWknplqdFgw78V32EdsV7Nhsadm/xn07793qwWKSdlLrj4CoqkP0vFLKcVYHaNWbFnCXBNbpvHNOYQqltIILP86s01kC5c83i/GYHncMO6Rg9JlPT648tSJ+wclRZ0MKnTDHtOVNCWgoQWP655x1jjub1UzkbQYzibXkODvPjO4nQXLXzWD00AJFGXZ5128FO7EUHwU7Y469m6oomq+vVlpAbQn8/n17EYARQ1eqe/6R6nQ3fgKwF64YL4FSu7IYvdSmvFawNRYLF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MXKQoK9cro496hZO+cF27Kp7Pyq4kYpD7nYRNdTpLR7nH+gxRfM7k3Fj4fRS4fp5+0w3iJ/dIhzqdEza4iQeVF8VtzJZZxRFcy1tNmOrKiEy9pER9pigffaEos2d4gmgjtbium5XMVo84SWly3BHc1MNms5ikndwtVURSN8CZ0d4glzZKFblbAsTU7R+ph4ujxjcKSHezxUy75Ea5pv0L2jGA4fQbf1r5cL7i+jljigtE/TVC013XTEuxxdD9BlL8XWFPsOZsiqoeLCZ5Sv47aQs4TPvL7wHED4Rz26SjmKoHb55RlOnGWF6B8jfescfMvuCxMo5pmNYQGXXUjTDHBfLeCa2h4Z55xtlJ9hjeuXGmB3/meOQHz6yf+sCzYkrcDo5Y/a6JAGsmQfKeB57dMK1YnwGzK1QARxVGY4k+6WXEZ+s3YdnKrFmK8vV4RZn6kaKGZhafFWpbexILoytaZ0ckeR4uU965bYXpsGEawPz3ADZFAYbV09TPpX+F84f48TaW07+MuC7ya7YrZsITSrO9Rl5N+BkLb+NDdpcW7Lr+5T3AuHbKMEqxuGLw7a1EEV5gs2HZEuuVHyzzeCtna6xhYXNZKrfcm9aTuArZvsfpQWWqH3iAT7DYY2J+m5Ra9utjofbJl3cfNSxY+Jj/qlzVAFXoxvfXJ6PdLY8VdKHyJRz40YnFWLDk7Np99NPECWkDc18vCrWH2sKLBuW8n7bw3N6jebuwYGERwdxkrQi1eJ4PiCaONPLIJZXjrGYyz3DzZSIi+PEkE1zJ6FKOzYwngP+U/5xBDQKIYDKLiWYzm1nDl0ykH229/0PArXarlWz/A3bbfoDcyFIFAAAAAElFTkSuQmCC);
|
|
151
|
-
background-size: 50px 45px;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
}
|
|
155
|
-
</style>
|
|
156
|
-
<span class="github-btn" id="github-btn">
|
|
157
|
-
<a class="gh-btn" id="gh-btn" href="#" target="_blank">
|
|
158
|
-
<span class="gh-ico"></span>
|
|
159
|
-
<span class="gh-text" id="gh-text"></span>
|
|
160
|
-
</a>
|
|
161
|
-
<a class="gh-count" id="gh-count" href="#" target="_blank"></a>
|
|
162
|
-
</span>
|
|
163
|
-
<script type="text/javascript">
|
|
164
|
-
// Read a page's GET URL variables and return them as an associative array.
|
|
165
|
-
// Source: http://jquery-howto.blogspot.com/2009/09/get-url-parameters-values-with-jquery.html
|
|
166
|
-
var params = function () {
|
|
167
|
-
var vars = [], hash;
|
|
168
|
-
var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
|
|
169
|
-
for(var i = 0; i < hashes.length; i++) {
|
|
170
|
-
hash = hashes[i].split('=');
|
|
171
|
-
vars.push(hash[0]);
|
|
172
|
-
vars[hash[0]] = hash[1];
|
|
173
|
-
}
|
|
174
|
-
return vars;
|
|
175
|
-
}()
|
|
176
|
-
var user = params.user,
|
|
177
|
-
repo = params.repo,
|
|
178
|
-
type = params.type,
|
|
179
|
-
count = params.count,
|
|
180
|
-
size = params.size,
|
|
181
|
-
head = document.getElementsByTagName('head')[0],
|
|
182
|
-
button = document.getElementById('gh-btn'),
|
|
183
|
-
mainButton = document.getElementById('github-btn'),
|
|
184
|
-
text = document.getElementById('gh-text'),
|
|
185
|
-
counter = document.getElementById('gh-count');
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
// Add commas to numbers
|
|
189
|
-
function addCommas(n) {
|
|
190
|
-
return String(n).replace(/(\d)(?=(\d{3})+$)/g, '$1,')
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
function jsonp(path) {
|
|
194
|
-
var el = document.createElement('script');
|
|
195
|
-
el.src = path + '?callback=callback';
|
|
196
|
-
head.insertBefore(el, head.firstChild);
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
function callback(obj) {
|
|
200
|
-
if (type == 'watch') {
|
|
201
|
-
counter.innerHTML = addCommas(obj.data.watchers);
|
|
202
|
-
} else if (type == 'fork') {
|
|
203
|
-
counter.innerHTML = addCommas(obj.data.forks);
|
|
204
|
-
} else if (type == 'follow') {
|
|
205
|
-
counter.innerHTML = addCommas(obj.data.followers);
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
// Show the count if asked
|
|
209
|
-
if (count == 'true') {
|
|
210
|
-
counter.style.display = 'block';
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
// Set href to be URL for repo
|
|
215
|
-
button.href = 'https://github.com/' + user + '/' + repo + '/';
|
|
216
|
-
|
|
217
|
-
// Add the class, change the text label, set count link href
|
|
218
|
-
if (type == 'watch') {
|
|
219
|
-
mainButton.className += ' github-watchers';
|
|
220
|
-
text.innerHTML = 'Star';
|
|
221
|
-
counter.href = 'https://github.com/' + user + '/' + repo + '/stargazers';
|
|
222
|
-
} else if (type == 'fork') {
|
|
223
|
-
mainButton.className += ' github-forks';
|
|
224
|
-
text.innerHTML = 'Fork';
|
|
225
|
-
counter.href = 'https://github.com/' + user + '/' + repo + '/network';
|
|
226
|
-
} else if (type == 'follow') {
|
|
227
|
-
mainButton.className += ' github-me';
|
|
228
|
-
text.innerHTML = 'Follow @' + user;
|
|
229
|
-
button.href = 'https://github.com/' + user;
|
|
230
|
-
counter.href = 'https://github.com/' + user + '/followers';
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
// Change the size
|
|
234
|
-
if (size == 'large') {
|
|
235
|
-
mainButton.className += ' github-btn-large';
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
if (type == 'follow') {
|
|
239
|
-
jsonp('https://api.github.com/users/' + user);
|
|
240
|
-
} else {
|
|
241
|
-
jsonp('https://api.github.com/repos/' + user + '/' + repo);
|
|
242
|
-
}
|
|
243
|
-
</script></body></html>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var hljs=new function(){function l(o){return o.replace(/&/gm,"&").replace(/</gm,"<").replace(/>/gm,">")}function b(p){for(var o=p.firstChild;o;o=o.nextSibling){if(o.nodeName=="CODE"){return o}if(!(o.nodeType==3&&o.nodeValue.match(/\s+/))){break}}}function h(p,o){return Array.prototype.map.call(p.childNodes,function(q){if(q.nodeType==3){return o?q.nodeValue.replace(/\n/g,""):q.nodeValue}if(q.nodeName=="BR"){return"\n"}return h(q,o)}).join("")}function a(q){var p=(q.className+" "+q.parentNode.className).split(/\s+/);p=p.map(function(r){return r.replace(/^language-/,"")});for(var o=0;o<p.length;o++){if(e[p[o]]||p[o]=="no-highlight"){return p[o]}}}function c(q){var o=[];(function p(r,s){for(var t=r.firstChild;t;t=t.nextSibling){if(t.nodeType==3){s+=t.nodeValue.length}else{if(t.nodeName=="BR"){s+=1}else{if(t.nodeType==1){o.push({event:"start",offset:s,node:t});s=p(t,s);o.push({event:"stop",offset:s,node:t})}}}}return s})(q,0);return o}function j(x,v,w){var p=0;var y="";var r=[];function t(){if(x.length&&v.length){if(x[0].offset!=v[0].offset){return(x[0].offset<v[0].offset)?x:v}else{return v[0].event=="start"?x:v}}else{return x.length?x:v}}function s(A){function z(B){return" "+B.nodeName+'="'+l(B.value)+'"'}return"<"+A.nodeName+Array.prototype.map.call(A.attributes,z).join("")+">"}while(x.length||v.length){var u=t().splice(0,1)[0];y+=l(w.substr(p,u.offset-p));p=u.offset;if(u.event=="start"){y+=s(u.node);r.push(u.node)}else{if(u.event=="stop"){var o,q=r.length;do{q--;o=r[q];y+=("</"+o.nodeName.toLowerCase()+">")}while(o!=u.node);r.splice(q,1);while(q<r.length){y+=s(r[q]);q++}}}}return y+l(w.substr(p))}function f(q){function o(s,r){return RegExp(s,"m"+(q.cI?"i":"")+(r?"g":""))}function p(y,w){if(y.compiled){return}y.compiled=true;var s=[];if(y.k){var r={};function z(A,t){t.split(" ").forEach(function(B){var C=B.split("|");r[C[0]]=[A,C[1]?Number(C[1]):1];s.push(C[0])})}y.lR=o(y.l||hljs.IR,true);if(typeof y.k=="string"){z("keyword",y.k)}else{for(var x in y.k){if(!y.k.hasOwnProperty(x)){continue}z(x,y.k[x])}}y.k=r}if(w){if(y.bWK){y.b="\\b("+s.join("|")+")\\s"}y.bR=o(y.b?y.b:"\\B|\\b");if(!y.e&&!y.eW){y.e="\\B|\\b"}if(y.e){y.eR=o(y.e)}y.tE=y.e||"";if(y.eW&&w.tE){y.tE+=(y.e?"|":"")+w.tE}}if(y.i){y.iR=o(y.i)}if(y.r===undefined){y.r=1}if(!y.c){y.c=[]}for(var v=0;v<y.c.length;v++){if(y.c[v]=="self"){y.c[v]=y}p(y.c[v],y)}if(y.starts){p(y.starts,w)}var u=[];for(var v=0;v<y.c.length;v++){u.push(y.c[v].b)}if(y.tE){u.push(y.tE)}if(y.i){u.push(y.i)}y.t=u.length?o(u.join("|"),true):{exec:function(t){return null}}}p(q)}function d(D,E){function o(r,M){for(var L=0;L<M.c.length;L++){var K=M.c[L].bR.exec(r);if(K&&K.index==0){return M.c[L]}}}function s(K,r){if(K.e&&K.eR.test(r)){return K}if(K.eW){return s(K.parent,r)}}function t(r,K){return K.i&&K.iR.test(r)}function y(L,r){var K=F.cI?r[0].toLowerCase():r[0];return L.k.hasOwnProperty(K)&&L.k[K]}function G(){var K=l(w);if(!A.k){return K}var r="";var N=0;A.lR.lastIndex=0;var L=A.lR.exec(K);while(L){r+=K.substr(N,L.index-N);var M=y(A,L);if(M){v+=M[1];r+='<span class="'+M[0]+'">'+L[0]+"</span>"}else{r+=L[0]}N=A.lR.lastIndex;L=A.lR.exec(K)}return r+K.substr(N)}function z(){if(A.sL&&!e[A.sL]){return l(w)}var r=A.sL?d(A.sL,w):g(w);if(A.r>0){v+=r.keyword_count;B+=r.r}return'<span class="'+r.language+'">'+r.value+"</span>"}function J(){return A.sL!==undefined?z():G()}function I(L,r){var K=L.cN?'<span class="'+L.cN+'">':"";if(L.rB){x+=K;w=""}else{if(L.eB){x+=l(r)+K;w=""}else{x+=K;w=r}}A=Object.create(L,{parent:{value:A}});B+=L.r}function C(K,r){w+=K;if(r===undefined){x+=J();return 0}var L=o(r,A);if(L){x+=J();I(L,r);return L.rB?0:r.length}var M=s(A,r);if(M){if(!(M.rE||M.eE)){w+=r}x+=J();do{if(A.cN){x+="</span>"}A=A.parent}while(A!=M.parent);if(M.eE){x+=l(r)}w="";if(M.starts){I(M.starts,"")}return M.rE?0:r.length}if(t(r,A)){throw"Illegal"}w+=r;return r.length||1}var F=e[D];f(F);var A=F;var w="";var B=0;var v=0;var x="";try{var u,q,p=0;while(true){A.t.lastIndex=p;u=A.t.exec(E);if(!u){break}q=C(E.substr(p,u.index-p),u[0]);p=u.index+q}C(E.substr(p));return{r:B,keyword_count:v,value:x,language:D}}catch(H){if(H=="Illegal"){return{r:0,keyword_count:0,value:l(E)}}else{throw H}}}function g(s){var o={keyword_count:0,r:0,value:l(s)};var q=o;for(var p in e){if(!e.hasOwnProperty(p)){continue}var r=d(p,s);r.language=p;if(r.keyword_count+r.r>q.keyword_count+q.r){q=r}if(r.keyword_count+r.r>o.keyword_count+o.r){q=o;o=r}}if(q.language){o.second_best=q}return o}function i(q,p,o){if(p){q=q.replace(/^((<[^>]+>|\t)+)/gm,function(r,v,u,t){return v.replace(/\t/g,p)})}if(o){q=q.replace(/\n/g,"<br>")}return q}function m(r,u,p){var v=h(r,p);var t=a(r);if(t=="no-highlight"){return}var w=t?d(t,v):g(v);t=w.language;var o=c(r);if(o.length){var q=document.createElement("pre");q.innerHTML=w.value;w.value=j(o,c(q),v)}w.value=i(w.value,u,p);var s=r.className;if(!s.match("(\\s|^)(language-)?"+t+"(\\s|$)")){s=s?(s+" "+t):t}r.innerHTML=w.value;r.className=s;r.result={language:t,kw:w.keyword_count,re:w.r};if(w.second_best){r.second_best={language:w.second_best.language,kw:w.second_best.keyword_count,re:w.second_best.r}}}function n(){if(n.called){return}n.called=true;Array.prototype.map.call(document.getElementsByTagName("pre"),b).filter(Boolean).forEach(function(o){m(o,hljs.tabReplace)})}function k(){window.addEventListener("DOMContentLoaded",n,false);window.addEventListener("load",n,false)}var e={};this.LANGUAGES=e;this.highlight=d;this.highlightAuto=g;this.fixMarkup=i;this.highlightBlock=m;this.initHighlighting=n;this.initHighlightingOnLoad=k;this.IR="[a-zA-Z][a-zA-Z0-9_]*";this.UIR="[a-zA-Z_][a-zA-Z0-9_]*";this.NR="\\b\\d+(\\.\\d+)?";this.CNR="(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)";this.BNR="\\b(0b[01]+)";this.RSR="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|\\.|-|-=|/|/=|:|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~";this.BE={b:"\\\\[\\s\\S]",r:0};this.ASM={cN:"string",b:"'",e:"'",i:"\\n",c:[this.BE],r:0};this.QSM={cN:"string",b:'"',e:'"',i:"\\n",c:[this.BE],r:0};this.CLCM={cN:"comment",b:"//",e:"$"};this.CBLCLM={cN:"comment",b:"/\\*",e:"\\*/"};this.HCM={cN:"comment",b:"#",e:"$"};this.NM={cN:"number",b:this.NR,r:0};this.CNM={cN:"number",b:this.CNR,r:0};this.BNM={cN:"number",b:this.BNR,r:0};this.inherit=function(q,r){var o={};for(var p in q){o[p]=q[p]}if(r){for(var p in r){o[p]=r[p]}}return o}}();hljs.LANGUAGES.javascript=function(a){return{k:{keyword:"in if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const",literal:"true false null undefined NaN Infinity"},c:[a.ASM,a.QSM,a.CLCM,a.CBLCLM,a.CNM,{b:"("+a.RSR+"|\\b(case|return|throw)\\b)\\s*",k:"return throw case",c:[a.CLCM,a.CBLCLM,{cN:"regexp",b:"/",e:"/[gim]*",i:"\\n",c:[{b:"\\\\/"}]},{b:"<",e:">;",sL:"xml"}],r:0},{cN:"function",bWK:true,e:"{",k:"function",c:[{cN:"title",b:"[A-Za-z$_][0-9A-Za-z$_]*"},{cN:"params",b:"\\(",e:"\\)",c:[a.CLCM,a.CBLCLM],i:"[\"'\\(]"}],i:"\\[|%"}]}}(hljs);hljs.LANGUAGES.xml=function(a){var c="[A-Za-z0-9\\._:-]+";var b={eW:true,c:[{cN:"attribute",b:c,r:0},{b:'="',rB:true,e:'"',c:[{cN:"value",b:'"',eW:true}]},{b:"='",rB:true,e:"'",c:[{cN:"value",b:"'",eW:true}]},{b:"=",c:[{cN:"value",b:"[^\\s/>]+"}]}]};return{cI:true,c:[{cN:"pi",b:"<\\?",e:"\\?>",r:10},{cN:"doctype",b:"<!DOCTYPE",e:">",r:10,c:[{b:"\\[",e:"\\]"}]},{cN:"comment",b:"<!--",e:"-->",r:10},{cN:"cdata",b:"<\\!\\[CDATA\\[",e:"\\]\\]>",r:10},{cN:"tag",b:"<style(?=\\s|>|$)",e:">",k:{title:"style"},c:[b],starts:{e:"</style>",rE:true,sL:"css"}},{cN:"tag",b:"<script(?=\\s|>|$)",e:">",k:{title:"script"},c:[b],starts:{e:"<\/script>",rE:true,sL:"javascript"}},{b:"<%",e:"%>",sL:"vbscript"},{cN:"tag",b:"</?",e:"/?>",c:[{cN:"title",b:"[^ />]+"},b]}]}}(hljs);
|
package/dist/annyang.min.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};
|
|
2
|
-
//! annyang
|
|
3
|
-
//! version : 2.6.1
|
|
4
|
-
//! author : Tal Ater @TalAter
|
|
5
|
-
//! license : MIT
|
|
6
|
-
//! https://www.TalAter.com/annyang/
|
|
7
|
-
//! annyang
|
|
8
|
-
//! version : 2.6.1
|
|
9
|
-
//! author : Tal Ater @TalAter
|
|
10
|
-
//! license : MIT
|
|
11
|
-
//! https://www.TalAter.com/annyang/
|
|
12
|
-
!function(e,n){"function"==typeof define&&define.amd?define([],function(){return e.annyang=n(e)}):"object"===("undefined"==typeof module?"undefined":_typeof(module))&&module.exports?module.exports=n(e):e.annyang=n(e)}("undefined"!=typeof window?window:void 0,function(r,i){var t,o=r.SpeechRecognition||r.webkitSpeechRecognition||r.mozSpeechRecognition||r.msSpeechRecognition||r.oSpeechRecognition;if(!o)return null;var a,c,s=[],u={start:[],error:[],end:[],soundstart:[],result:[],resultMatch:[],resultNoMatch:[],errorNetwork:[],errorPermissionBlocked:[],errorPermissionDenied:[]},f=0,l=0,d=!1,p="font-weight: bold; color: #00f;",g=!1,m=!1,h=/\s*\((.*?)\)\s*/g,y=/(\(\?:[^)]+\))\?/g,b=/(\(\?)?:\w+/g,v=/\*\w+/g,w=/[\-{}\[\]+?.,\\\^$|#]/g,S=function(e){for(var n=arguments.length,t=Array(1<n?n-1:0),o=1;o<n;o++)t[o-1]=arguments[o];e.forEach(function(e){e.callback.apply(e.context,t)})},e=function(){return a!==i},k=function(e,n){-1!==e.indexOf("%c")||n?console.log(e,n||p):console.log(e)},x=function(){e()||t.init({},!1)},R=function(e,n,t){s.push({command:e,callback:n,originalPhrase:t}),d&&k("Command successfully loaded: %c"+t,p)},P=function(e){var n;S(u.result,e);for(var t=0;t<e.length;t++){n=e[t].trim(),d&&k("Speech recognized: %c"+n,p);for(var o=0,r=s.length;o<r;o++){var i=s[o],a=i.command.exec(n);if(a){var c=a.slice(1);return d&&(k("command matched: %c"+i.originalPhrase,p),c.length&&k("with parameters",c)),i.callback.apply(this,c),void S(u.resultMatch,n,i.originalPhrase,e)}}}S(u.resultNoMatch,e)};return t={init:function(e){var n=!(1<arguments.length&&arguments[1]!==i)||arguments[1];a&&a.abort&&a.abort(),(a=new o).maxAlternatives=5,a.continuous="http:"===r.location.protocol,a.lang="en-US",a.onstart=function(){m=!0,S(u.start)},a.onsoundstart=function(){S(u.soundstart)},a.onerror=function(e){switch(S(u.error,e),e.error){case"network":S(u.errorNetwork,e);break;case"not-allowed":case"service-not-allowed":c=!1,(new Date).getTime()-f<200?S(u.errorPermissionBlocked,e):S(u.errorPermissionDenied,e)}},a.onend=function(){if(m=!1,S(u.end),c){var e=(new Date).getTime()-f;(l+=1)%10==0&&d&&k("Speech Recognition is repeatedly stopping and starting. See http://is.gd/annyang_restarts for tips."),e<1e3?setTimeout(function(){t.start({paused:g})},1e3-e):t.start({paused:g})}},a.onresult=function(e){if(g)return d&&k("Speech heard, but annyang is paused"),!1;for(var n=e.results[e.resultIndex],t=[],o=0;o<n.length;o++)t[o]=n[o].transcript;P(t)},n&&(s=[]),e.length&&this.addCommands(e)},start:function(e){x(),g=(e=e||{}).paused!==i&&!!e.paused,c=e.autoRestart===i||!!e.autoRestart,e.continuous!==i&&(a.continuous=!!e.continuous),f=(new Date).getTime();try{a.start()}catch(e){d&&k(e.message)}},abort:function(){c=!1,l=0,e()&&a.abort()},pause:function(){g=!0},resume:function(){t.start()},debug:function(){var e=!(0<arguments.length&&arguments[0]!==i)||arguments[0];d=!!e},setLanguage:function(e){x(),a.lang=e},addCommands:function(e){var n,t;for(var o in x(),e)if(e.hasOwnProperty(o))if("function"==typeof(n=r[e[o]]||e[o]))R((t=(t=o).replace(w,"\\$&").replace(h,"(?:$1)?").replace(b,function(e,n){return n?e:"([^\\s]+)"}).replace(v,"(.*?)").replace(y,"\\s*$1?\\s*"),new RegExp("^"+t+"$","i")),n,o);else{if(!("object"===(void 0===n?"undefined":_typeof(n))&&n.regexp instanceof RegExp)){d&&k("Can not register command: %c"+o,p);continue}R(new RegExp(n.regexp.source,"i"),n.callback,o)}},removeCommands:function(t){t===i?s=[]:(t=Array.isArray(t)?t:[t],s=s.filter(function(e){for(var n=0;n<t.length;n++)if(t[n]===e.originalPhrase)return!1;return!0}))},addCallback:function(e,n,t){var o=r[n]||n;"function"==typeof o&&u[e]!==i&&u[e].push({callback:o,context:t||this})},removeCallback:function(e,n){var t=function(e){return e.callback!==n};for(var o in u)u.hasOwnProperty(o)&&(e!==i&&e!==o||(u[o]=n===i?[]:u[o].filter(t)))},isListening:function(){return m&&!g},getSpeechRecognizer:function(){return a},trigger:function(e){t.isListening()?(Array.isArray(e)||(e=[e]),P(e)):d&&k(m?"Speech heard, but annyang is paused":"Cannot trigger while annyang is aborted")}}});
|