Nick Ficano commited on
Commit
63f603f
·
2 Parent(s): a02f1b9 6189f5f

Merge branch 'master' of github.com:nficano/pytube

Browse files

* 'master' of github.com:nficano/pytube:
switched to nosetests, added test_requirements
pep8
pep8
model cleanup
Unittests for YouTube class
commented, todos, removed kwargs from video
lets hold off on docs

Files changed (41) hide show
  1. docs/Makefile +0 -192
  2. docs/_build/doctrees/environment.pickle +0 -0
  3. docs/_build/doctrees/index.doctree +0 -0
  4. docs/_build/html/.buildinfo +0 -4
  5. docs/_build/html/_sources/index.txt +0 -22
  6. docs/_build/html/_static/ajax-loader.gif +0 -0
  7. docs/_build/html/_static/alabaster.css +0 -585
  8. docs/_build/html/_static/basic.css +0 -599
  9. docs/_build/html/_static/classic.css +0 -261
  10. docs/_build/html/_static/comment-bright.png +0 -0
  11. docs/_build/html/_static/comment-close.png +0 -0
  12. docs/_build/html/_static/comment.png +0 -0
  13. docs/_build/html/_static/default.css +0 -256
  14. docs/_build/html/_static/doctools.js +0 -263
  15. docs/_build/html/_static/down-pressed.png +0 -0
  16. docs/_build/html/_static/down.png +0 -0
  17. docs/_build/html/_static/file.png +0 -0
  18. docs/_build/html/_static/jquery-1.11.1.js +0 -0
  19. docs/_build/html/_static/jquery.js +0 -4
  20. docs/_build/html/_static/minus.png +0 -0
  21. docs/_build/html/_static/plus.png +0 -0
  22. docs/_build/html/_static/pygments.css +0 -63
  23. docs/_build/html/_static/searchtools.js +0 -622
  24. docs/_build/html/_static/sidebar.js +0 -159
  25. docs/_build/html/_static/underscore-1.3.1.js +0 -999
  26. docs/_build/html/_static/underscore.js +0 -31
  27. docs/_build/html/_static/up-pressed.png +0 -0
  28. docs/_build/html/_static/up.png +0 -0
  29. docs/_build/html/_static/websupport.js +0 -808
  30. docs/_build/html/genindex.html +0 -92
  31. docs/_build/html/index.html +0 -111
  32. docs/_build/html/objects.inv +0 -0
  33. docs/_build/html/search.html +0 -99
  34. docs/_build/html/searchindex.js +0 -1
  35. docs/conf.py +0 -290
  36. docs/index.rst +0 -22
  37. docs/make.bat +0 -263
  38. pytube/__init__.py +11 -1
  39. pytube/models.py +43 -31
  40. tests/test_pytube.py +60 -0
  41. tests/test_requirements.txt +1 -0
docs/Makefile DELETED
@@ -1,192 +0,0 @@
1
- # Makefile for Sphinx documentation
2
- #
3
-
4
- # You can set these variables from the command line.
5
- SPHINXOPTS =
6
- SPHINXBUILD = sphinx-build
7
- PAPER =
8
- BUILDDIR = _build
9
-
10
- # User-friendly check for sphinx-build
11
- ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
12
- $(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/)
13
- endif
14
-
15
- # Internal variables.
16
- PAPEROPT_a4 = -D latex_paper_size=a4
17
- PAPEROPT_letter = -D latex_paper_size=letter
18
- ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
19
- # the i18n builder cannot share the environment and doctrees with the others
20
- I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
21
-
22
- .PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest coverage gettext
23
-
24
- help:
25
- @echo "Please use \`make <target>' where <target> is one of"
26
- @echo " html to make standalone HTML files"
27
- @echo " dirhtml to make HTML files named index.html in directories"
28
- @echo " singlehtml to make a single large HTML file"
29
- @echo " pickle to make pickle files"
30
- @echo " json to make JSON files"
31
- @echo " htmlhelp to make HTML files and a HTML help project"
32
- @echo " qthelp to make HTML files and a qthelp project"
33
- @echo " applehelp to make an Apple Help Book"
34
- @echo " devhelp to make HTML files and a Devhelp project"
35
- @echo " epub to make an epub"
36
- @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
37
- @echo " latexpdf to make LaTeX files and run them through pdflatex"
38
- @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx"
39
- @echo " text to make text files"
40
- @echo " man to make manual pages"
41
- @echo " texinfo to make Texinfo files"
42
- @echo " info to make Texinfo files and run them through makeinfo"
43
- @echo " gettext to make PO message catalogs"
44
- @echo " changes to make an overview of all changed/added/deprecated items"
45
- @echo " xml to make Docutils-native XML files"
46
- @echo " pseudoxml to make pseudoxml-XML files for display purposes"
47
- @echo " linkcheck to check all external links for integrity"
48
- @echo " doctest to run all doctests embedded in the documentation (if enabled)"
49
- @echo " coverage to run coverage check of the documentation (if enabled)"
50
-
51
- clean:
52
- rm -rf $(BUILDDIR)/*
53
-
54
- html:
55
- $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
56
- @echo
57
- @echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
58
-
59
- dirhtml:
60
- $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
61
- @echo
62
- @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
63
-
64
- singlehtml:
65
- $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
66
- @echo
67
- @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
68
-
69
- pickle:
70
- $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
71
- @echo
72
- @echo "Build finished; now you can process the pickle files."
73
-
74
- json:
75
- $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
76
- @echo
77
- @echo "Build finished; now you can process the JSON files."
78
-
79
- htmlhelp:
80
- $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
81
- @echo
82
- @echo "Build finished; now you can run HTML Help Workshop with the" \
83
- ".hhp project file in $(BUILDDIR)/htmlhelp."
84
-
85
- qthelp:
86
- $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
87
- @echo
88
- @echo "Build finished; now you can run "qcollectiongenerator" with the" \
89
- ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
90
- @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/pytube.qhcp"
91
- @echo "To view the help file:"
92
- @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/pytube.qhc"
93
-
94
- applehelp:
95
- $(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp
96
- @echo
97
- @echo "Build finished. The help book is in $(BUILDDIR)/applehelp."
98
- @echo "N.B. You won't be able to view it unless you put it in" \
99
- "~/Library/Documentation/Help or install it in your application" \
100
- "bundle."
101
-
102
- devhelp:
103
- $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
104
- @echo
105
- @echo "Build finished."
106
- @echo "To view the help file:"
107
- @echo "# mkdir -p $$HOME/.local/share/devhelp/pytube"
108
- @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/pytube"
109
- @echo "# devhelp"
110
-
111
- epub:
112
- $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
113
- @echo
114
- @echo "Build finished. The epub file is in $(BUILDDIR)/epub."
115
-
116
- latex:
117
- $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
118
- @echo
119
- @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
120
- @echo "Run \`make' in that directory to run these through (pdf)latex" \
121
- "(use \`make latexpdf' here to do that automatically)."
122
-
123
- latexpdf:
124
- $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
125
- @echo "Running LaTeX files through pdflatex..."
126
- $(MAKE) -C $(BUILDDIR)/latex all-pdf
127
- @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
128
-
129
- latexpdfja:
130
- $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
131
- @echo "Running LaTeX files through platex and dvipdfmx..."
132
- $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
133
- @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
134
-
135
- text:
136
- $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
137
- @echo
138
- @echo "Build finished. The text files are in $(BUILDDIR)/text."
139
-
140
- man:
141
- $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
142
- @echo
143
- @echo "Build finished. The manual pages are in $(BUILDDIR)/man."
144
-
145
- texinfo:
146
- $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
147
- @echo
148
- @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
149
- @echo "Run \`make' in that directory to run these through makeinfo" \
150
- "(use \`make info' here to do that automatically)."
151
-
152
- info:
153
- $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
154
- @echo "Running Texinfo files through makeinfo..."
155
- make -C $(BUILDDIR)/texinfo info
156
- @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
157
-
158
- gettext:
159
- $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
160
- @echo
161
- @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
162
-
163
- changes:
164
- $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
165
- @echo
166
- @echo "The overview file is in $(BUILDDIR)/changes."
167
-
168
- linkcheck:
169
- $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
170
- @echo
171
- @echo "Link check complete; look for any errors in the above output " \
172
- "or in $(BUILDDIR)/linkcheck/output.txt."
173
-
174
- doctest:
175
- $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
176
- @echo "Testing of doctests in the sources finished, look at the " \
177
- "results in $(BUILDDIR)/doctest/output.txt."
178
-
179
- coverage:
180
- $(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(BUILDDIR)/coverage
181
- @echo "Testing of coverage in the sources finished, look at the " \
182
- "results in $(BUILDDIR)/coverage/python.txt."
183
-
184
- xml:
185
- $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
186
- @echo
187
- @echo "Build finished. The XML files are in $(BUILDDIR)/xml."
188
-
189
- pseudoxml:
190
- $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
191
- @echo
192
- @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docs/_build/doctrees/environment.pickle DELETED
Binary file (3.83 kB)
 
docs/_build/doctrees/index.doctree DELETED
Binary file (5.36 kB)
 
docs/_build/html/.buildinfo DELETED
@@ -1,4 +0,0 @@
1
- # Sphinx build info version 1
2
- # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
3
- config: ddd345ba29fbfbea2d7aef9a825e286e
4
- tags: 645f666f9bcd5a90fca523b33c5a78b7
 
 
 
 
 
docs/_build/html/_sources/index.txt DELETED
@@ -1,22 +0,0 @@
1
- .. pytube documentation master file, created by
2
- sphinx-quickstart on Fri Sep 25 16:57:20 2015.
3
- You can adapt this file completely to your liking, but it should at least
4
- contain the root `toctree` directive.
5
-
6
- Welcome to pytube's documentation!
7
- ==================================
8
-
9
- Contents:
10
-
11
- .. toctree::
12
- :maxdepth: 2
13
-
14
-
15
-
16
- Indices and tables
17
- ==================
18
-
19
- * :ref:`genindex`
20
- * :ref:`modindex`
21
- * :ref:`search`
22
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docs/_build/html/_static/ajax-loader.gif DELETED
Binary file (673 Bytes)
 
docs/_build/html/_static/alabaster.css DELETED
@@ -1,585 +0,0 @@
1
-
2
-
3
-
4
-
5
-
6
-
7
-
8
-
9
-
10
-
11
-
12
-
13
-
14
-
15
-
16
-
17
-
18
- @import url("basic.css");
19
-
20
- /* -- page layout ----------------------------------------------------------- */
21
-
22
- body {
23
- font-family: 'goudy old style', 'minion pro', 'bell mt', Georgia, 'Hiragino Mincho Pro', serif;
24
- font-size: 17px;
25
- background-color: white;
26
- color: #000;
27
- margin: 0;
28
- padding: 0;
29
- }
30
-
31
- div.document {
32
- width: 940px;
33
- margin: 30px auto 0 auto;
34
- }
35
-
36
- div.documentwrapper {
37
- float: left;
38
- width: 100%;
39
- }
40
-
41
- div.bodywrapper {
42
- margin: 0 0 0 220px;
43
- }
44
-
45
- div.sphinxsidebar {
46
- width: 220px;
47
- }
48
-
49
- hr {
50
- border: 1px solid #B1B4B6;
51
- }
52
-
53
- div.body {
54
- background-color: #ffffff;
55
- color: #3E4349;
56
- padding: 0 30px 0 30px;
57
- }
58
-
59
- div.footer {
60
- width: 940px;
61
- margin: 20px auto 30px auto;
62
- font-size: 14px;
63
- color: #888;
64
- text-align: right;
65
- }
66
-
67
- div.footer a {
68
- color: #888;
69
- }
70
-
71
-
72
- div.relations {
73
- display: none;
74
- }
75
-
76
-
77
- div.sphinxsidebar a {
78
- color: #444;
79
- text-decoration: none;
80
- border-bottom: 1px dotted #999;
81
- }
82
-
83
- div.sphinxsidebar a:hover {
84
- border-bottom: 1px solid #999;
85
- }
86
-
87
- div.sphinxsidebar {
88
- font-size: 14px;
89
- line-height: 1.5;
90
- }
91
-
92
- div.sphinxsidebarwrapper {
93
- padding: 18px 10px;
94
- }
95
-
96
- div.sphinxsidebarwrapper p.logo {
97
- padding: 0;
98
- margin: -10px 0 0 0px;
99
- text-align: center;
100
- }
101
-
102
- div.sphinxsidebarwrapper h1.logo {
103
- margin-top: -10px;
104
- text-align: center;
105
- margin-bottom: 5px;
106
- text-align: left;
107
- }
108
-
109
- div.sphinxsidebarwrapper h1.logo-name {
110
- margin-top: 0px;
111
- }
112
-
113
- div.sphinxsidebarwrapper p.blurb {
114
- margin-top: 0;
115
- font-style: normal;
116
- }
117
-
118
- div.sphinxsidebar h3,
119
- div.sphinxsidebar h4 {
120
- font-family: 'Garamond', 'Georgia', serif;
121
- color: #444;
122
- font-size: 24px;
123
- font-weight: normal;
124
- margin: 0 0 5px 0;
125
- padding: 0;
126
- }
127
-
128
- div.sphinxsidebar h4 {
129
- font-size: 20px;
130
- }
131
-
132
- div.sphinxsidebar h3 a {
133
- color: #444;
134
- }
135
-
136
- div.sphinxsidebar p.logo a,
137
- div.sphinxsidebar h3 a,
138
- div.sphinxsidebar p.logo a:hover,
139
- div.sphinxsidebar h3 a:hover {
140
- border: none;
141
- }
142
-
143
- div.sphinxsidebar p {
144
- color: #555;
145
- margin: 10px 0;
146
- }
147
-
148
- div.sphinxsidebar ul {
149
- margin: 10px 0;
150
- padding: 0;
151
- color: #000;
152
- }
153
-
154
- div.sphinxsidebar ul li.toctree-l1 > a {
155
- font-size: 120%;
156
- }
157
-
158
- div.sphinxsidebar ul li.toctree-l2 > a {
159
- font-size: 110%;
160
- }
161
-
162
- div.sphinxsidebar input {
163
- border: 1px solid #CCC;
164
- font-family: 'goudy old style', 'minion pro', 'bell mt', Georgia, 'Hiragino Mincho Pro', serif;
165
- font-size: 1em;
166
- }
167
-
168
- div.sphinxsidebar hr {
169
- border: none;
170
- height: 1px;
171
- color: #999;
172
- background: #999;
173
-
174
- text-align: left;
175
- margin-left: 0;
176
- width: 50%;
177
- }
178
-
179
- /* -- body styles ----------------------------------------------------------- */
180
-
181
- a {
182
- color: #004B6B;
183
- text-decoration: underline;
184
- }
185
-
186
- a:hover {
187
- color: #6D4100;
188
- text-decoration: underline;
189
- }
190
-
191
- div.body h1,
192
- div.body h2,
193
- div.body h3,
194
- div.body h4,
195
- div.body h5,
196
- div.body h6 {
197
- font-family: 'Garamond', 'Georgia', serif;
198
- font-weight: normal;
199
- margin: 30px 0px 10px 0px;
200
- padding: 0;
201
- }
202
-
203
- div.body h1 { margin-top: 0; padding-top: 0; font-size: 240%; }
204
- div.body h2 { font-size: 180%; }
205
- div.body h3 { font-size: 150%; }
206
- div.body h4 { font-size: 130%; }
207
- div.body h5 { font-size: 100%; }
208
- div.body h6 { font-size: 100%; }
209
-
210
- a.headerlink {
211
- color: #DDD;
212
- padding: 0 4px;
213
- text-decoration: none;
214
- }
215
-
216
- a.headerlink:hover {
217
- color: #444;
218
- background: #EAEAEA;
219
- }
220
-
221
- div.body p, div.body dd, div.body li {
222
- line-height: 1.4em;
223
- }
224
-
225
- div.admonition {
226
- margin: 20px 0px;
227
- padding: 10px 30px;
228
- background-color: #FCC;
229
- border: 1px solid #FAA;
230
- }
231
-
232
- div.admonition tt.xref, div.admonition a tt {
233
- border-bottom: 1px solid #fafafa;
234
- }
235
-
236
- dd div.admonition {
237
- margin-left: -60px;
238
- padding-left: 60px;
239
- }
240
-
241
- div.admonition p.admonition-title {
242
- font-family: 'Garamond', 'Georgia', serif;
243
- font-weight: normal;
244
- font-size: 24px;
245
- margin: 0 0 10px 0;
246
- padding: 0;
247
- line-height: 1;
248
- }
249
-
250
- div.admonition p.last {
251
- margin-bottom: 0;
252
- }
253
-
254
- div.highlight {
255
- background-color: white;
256
- }
257
-
258
- dt:target, .highlight {
259
- background: #FAF3E8;
260
- }
261
-
262
- div.note {
263
- background-color: #EEE;
264
- border: 1px solid #CCC;
265
- }
266
-
267
- div.seealso {
268
- background-color: #EEE;
269
- border: 1px solid #CCC;
270
- }
271
-
272
- div.topic {
273
- background-color: #eee;
274
- }
275
-
276
- p.admonition-title {
277
- display: inline;
278
- }
279
-
280
- p.admonition-title:after {
281
- content: ":";
282
- }
283
-
284
- pre, tt, code {
285
- font-family: 'Consolas', 'Menlo', 'Deja Vu Sans Mono', 'Bitstream Vera Sans Mono', monospace;
286
- font-size: 0.9em;
287
- }
288
-
289
- .hll {
290
- background-color: #FFC;
291
- margin: 0 -12px;
292
- padding: 0 12px;
293
- display: block;
294
- }
295
-
296
- img.screenshot {
297
- }
298
-
299
- tt.descname, tt.descclassname, code.descname, code.descclassname {
300
- font-size: 0.95em;
301
- }
302
-
303
- tt.descname, code.descname {
304
- padding-right: 0.08em;
305
- }
306
-
307
- img.screenshot {
308
- -moz-box-shadow: 2px 2px 4px #eee;
309
- -webkit-box-shadow: 2px 2px 4px #eee;
310
- box-shadow: 2px 2px 4px #eee;
311
- }
312
-
313
- table.docutils {
314
- border: 1px solid #888;
315
- -moz-box-shadow: 2px 2px 4px #eee;
316
- -webkit-box-shadow: 2px 2px 4px #eee;
317
- box-shadow: 2px 2px 4px #eee;
318
- }
319
-
320
- table.docutils td, table.docutils th {
321
- border: 1px solid #888;
322
- padding: 0.25em 0.7em;
323
- }
324
-
325
- table.field-list, table.footnote {
326
- border: none;
327
- -moz-box-shadow: none;
328
- -webkit-box-shadow: none;
329
- box-shadow: none;
330
- }
331
-
332
- table.footnote {
333
- margin: 15px 0;
334
- width: 100%;
335
- border: 1px solid #EEE;
336
- background: #FDFDFD;
337
- font-size: 0.9em;
338
- }
339
-
340
- table.footnote + table.footnote {
341
- margin-top: -15px;
342
- border-top: none;
343
- }
344
-
345
- table.field-list th {
346
- padding: 0 0.8em 0 0;
347
- }
348
-
349
- table.field-list td {
350
- padding: 0;
351
- }
352
-
353
- table.footnote td.label {
354
- width: 0px;
355
- padding: 0.3em 0 0.3em 0.5em;
356
- }
357
-
358
- table.footnote td {
359
- padding: 0.3em 0.5em;
360
- }
361
-
362
- dl {
363
- margin: 0;
364
- padding: 0;
365
- }
366
-
367
- dl dd {
368
- margin-left: 30px;
369
- }
370
-
371
- blockquote {
372
- margin: 0 0 0 30px;
373
- padding: 0;
374
- }
375
-
376
- ul, ol {
377
- margin: 10px 0 10px 30px;
378
- padding: 0;
379
- }
380
-
381
- pre {
382
- background: #EEE;
383
- padding: 7px 30px;
384
- margin: 15px 0px;
385
- line-height: 1.3em;
386
- }
387
-
388
- dl pre, blockquote pre, li pre {
389
- margin-left: 0;
390
- padding-left: 30px;
391
- }
392
-
393
- dl dl pre {
394
- margin-left: -90px;
395
- padding-left: 90px;
396
- }
397
-
398
- tt, code {
399
- background-color: #ecf0f3;
400
- color: #222;
401
- /* padding: 1px 2px; */
402
- }
403
-
404
- tt.xref, code.xref, a tt {
405
- background-color: #FBFBFB;
406
- border-bottom: 1px solid white;
407
- }
408
-
409
- a.reference {
410
- text-decoration: none;
411
- border-bottom: 1px dotted #004B6B;
412
- }
413
-
414
- a.reference:hover {
415
- border-bottom: 1px solid #6D4100;
416
- }
417
-
418
- a.footnote-reference {
419
- text-decoration: none;
420
- font-size: 0.7em;
421
- vertical-align: top;
422
- border-bottom: 1px dotted #004B6B;
423
- }
424
-
425
- a.footnote-reference:hover {
426
- border-bottom: 1px solid #6D4100;
427
- }
428
-
429
- a:hover tt, a:hover code {
430
- background: #EEE;
431
- }
432
-
433
-
434
- @media screen and (max-width: 870px) {
435
-
436
- div.sphinxsidebar {
437
- display: none;
438
- }
439
-
440
- div.document {
441
- width: 100%;
442
-
443
- }
444
-
445
- div.documentwrapper {
446
- margin-left: 0;
447
- margin-top: 0;
448
- margin-right: 0;
449
- margin-bottom: 0;
450
- }
451
-
452
- div.bodywrapper {
453
- margin-top: 0;
454
- margin-right: 0;
455
- margin-bottom: 0;
456
- margin-left: 0;
457
- }
458
-
459
- ul {
460
- margin-left: 0;
461
- }
462
-
463
- .document {
464
- width: auto;
465
- }
466
-
467
- .footer {
468
- width: auto;
469
- }
470
-
471
- .bodywrapper {
472
- margin: 0;
473
- }
474
-
475
- .footer {
476
- width: auto;
477
- }
478
-
479
- .github {
480
- display: none;
481
- }
482
-
483
-
484
-
485
- }
486
-
487
-
488
-
489
- @media screen and (max-width: 875px) {
490
-
491
- body {
492
- margin: 0;
493
- padding: 20px 30px;
494
- }
495
-
496
- div.documentwrapper {
497
- float: none;
498
- background: white;
499
- }
500
-
501
- div.sphinxsidebar {
502
- display: block;
503
- float: none;
504
- width: 102.5%;
505
- margin: 50px -30px -20px -30px;
506
- padding: 10px 20px;
507
- background: #333;
508
- color: #FFF;
509
- }
510
-
511
- div.sphinxsidebar h3, div.sphinxsidebar h4, div.sphinxsidebar p,
512
- div.sphinxsidebar h3 a {
513
- color: white;
514
- }
515
-
516
- div.sphinxsidebar a {
517
- color: #AAA;
518
- }
519
-
520
- div.sphinxsidebar p.logo {
521
- display: none;
522
- }
523
-
524
- div.document {
525
- width: 100%;
526
- margin: 0;
527
- }
528
-
529
- div.footer {
530
- display: none;
531
- }
532
-
533
- div.bodywrapper {
534
- margin: 0;
535
- }
536
-
537
- div.body {
538
- min-height: 0;
539
- padding: 0;
540
- }
541
-
542
- .rtd_doc_footer {
543
- display: none;
544
- }
545
-
546
- .document {
547
- width: auto;
548
- }
549
-
550
- .footer {
551
- width: auto;
552
- }
553
-
554
- .footer {
555
- width: auto;
556
- }
557
-
558
- .github {
559
- display: none;
560
- }
561
- }
562
-
563
-
564
- /* misc. */
565
-
566
- .revsys-inline {
567
- display: none!important;
568
- }
569
-
570
- /* Make nested-list/multi-paragraph items look better in Releases changelog
571
- * pages. Without this, docutils' magical list fuckery causes inconsistent
572
- * formatting between different release sub-lists.
573
- */
574
- div#changelog > div.section > ul > li > p:only-child {
575
- margin-bottom: 0;
576
- }
577
-
578
- /* Hide fugly table cell borders in ..bibliography:: directive output */
579
- table.docutils.citation, table.docutils.citation td, table.docutils.citation th {
580
- border: none;
581
- /* Below needed in some edge cases; if not applied, bottom shadows appear */
582
- -moz-box-shadow: none;
583
- -webkit-box-shadow: none;
584
- box-shadow: none;
585
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docs/_build/html/_static/basic.css DELETED
@@ -1,599 +0,0 @@
1
- /*
2
- * basic.css
3
- * ~~~~~~~~~
4
- *
5
- * Sphinx stylesheet -- basic theme.
6
- *
7
- * :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS.
8
- * :license: BSD, see LICENSE for details.
9
- *
10
- */
11
-
12
- /* -- main layout ----------------------------------------------------------- */
13
-
14
- div.clearer {
15
- clear: both;
16
- }
17
-
18
- /* -- relbar ---------------------------------------------------------------- */
19
-
20
- div.related {
21
- width: 100%;
22
- font-size: 90%;
23
- }
24
-
25
- div.related h3 {
26
- display: none;
27
- }
28
-
29
- div.related ul {
30
- margin: 0;
31
- padding: 0 0 0 10px;
32
- list-style: none;
33
- }
34
-
35
- div.related li {
36
- display: inline;
37
- }
38
-
39
- div.related li.right {
40
- float: right;
41
- margin-right: 5px;
42
- }
43
-
44
- /* -- sidebar --------------------------------------------------------------- */
45
-
46
- div.sphinxsidebarwrapper {
47
- padding: 10px 5px 0 10px;
48
- }
49
-
50
- div.sphinxsidebar {
51
- float: left;
52
- width: 230px;
53
- margin-left: -100%;
54
- font-size: 90%;
55
- }
56
-
57
- div.sphinxsidebar ul {
58
- list-style: none;
59
- }
60
-
61
- div.sphinxsidebar ul ul,
62
- div.sphinxsidebar ul.want-points {
63
- margin-left: 20px;
64
- list-style: square;
65
- }
66
-
67
- div.sphinxsidebar ul ul {
68
- margin-top: 0;
69
- margin-bottom: 0;
70
- }
71
-
72
- div.sphinxsidebar form {
73
- margin-top: 10px;
74
- }
75
-
76
- div.sphinxsidebar input {
77
- border: 1px solid #98dbcc;
78
- font-family: sans-serif;
79
- font-size: 1em;
80
- }
81
-
82
- div.sphinxsidebar #searchbox input[type="text"] {
83
- width: 170px;
84
- }
85
-
86
- div.sphinxsidebar #searchbox input[type="submit"] {
87
- width: 30px;
88
- }
89
-
90
- img {
91
- border: 0;
92
- max-width: 100%;
93
- }
94
-
95
- /* -- search page ----------------------------------------------------------- */
96
-
97
- ul.search {
98
- margin: 10px 0 0 20px;
99
- padding: 0;
100
- }
101
-
102
- ul.search li {
103
- padding: 5px 0 5px 20px;
104
- background-image: url(file.png);
105
- background-repeat: no-repeat;
106
- background-position: 0 7px;
107
- }
108
-
109
- ul.search li a {
110
- font-weight: bold;
111
- }
112
-
113
- ul.search li div.context {
114
- color: #888;
115
- margin: 2px 0 0 30px;
116
- text-align: left;
117
- }
118
-
119
- ul.keywordmatches li.goodmatch a {
120
- font-weight: bold;
121
- }
122
-
123
- /* -- index page ------------------------------------------------------------ */
124
-
125
- table.contentstable {
126
- width: 90%;
127
- }
128
-
129
- table.contentstable p.biglink {
130
- line-height: 150%;
131
- }
132
-
133
- a.biglink {
134
- font-size: 1.3em;
135
- }
136
-
137
- span.linkdescr {
138
- font-style: italic;
139
- padding-top: 5px;
140
- font-size: 90%;
141
- }
142
-
143
- /* -- general index --------------------------------------------------------- */
144
-
145
- table.indextable {
146
- width: 100%;
147
- }
148
-
149
- table.indextable td {
150
- text-align: left;
151
- vertical-align: top;
152
- }
153
-
154
- table.indextable dl, table.indextable dd {
155
- margin-top: 0;
156
- margin-bottom: 0;
157
- }
158
-
159
- table.indextable tr.pcap {
160
- height: 10px;
161
- }
162
-
163
- table.indextable tr.cap {
164
- margin-top: 10px;
165
- background-color: #f2f2f2;
166
- }
167
-
168
- img.toggler {
169
- margin-right: 3px;
170
- margin-top: 3px;
171
- cursor: pointer;
172
- }
173
-
174
- div.modindex-jumpbox {
175
- border-top: 1px solid #ddd;
176
- border-bottom: 1px solid #ddd;
177
- margin: 1em 0 1em 0;
178
- padding: 0.4em;
179
- }
180
-
181
- div.genindex-jumpbox {
182
- border-top: 1px solid #ddd;
183
- border-bottom: 1px solid #ddd;
184
- margin: 1em 0 1em 0;
185
- padding: 0.4em;
186
- }
187
-
188
- /* -- general body styles --------------------------------------------------- */
189
-
190
- a.headerlink {
191
- visibility: hidden;
192
- }
193
-
194
- h1:hover > a.headerlink,
195
- h2:hover > a.headerlink,
196
- h3:hover > a.headerlink,
197
- h4:hover > a.headerlink,
198
- h5:hover > a.headerlink,
199
- h6:hover > a.headerlink,
200
- dt:hover > a.headerlink,
201
- caption:hover > a.headerlink,
202
- p.caption:hover > a.headerlink,
203
- div.code-block-caption:hover > a.headerlink {
204
- visibility: visible;
205
- }
206
-
207
- div.body p.caption {
208
- text-align: inherit;
209
- }
210
-
211
- div.body td {
212
- text-align: left;
213
- }
214
-
215
- .field-list ul {
216
- padding-left: 1em;
217
- }
218
-
219
- .first {
220
- margin-top: 0 !important;
221
- }
222
-
223
- p.rubric {
224
- margin-top: 30px;
225
- font-weight: bold;
226
- }
227
-
228
- img.align-left, .figure.align-left, object.align-left {
229
- clear: left;
230
- float: left;
231
- margin-right: 1em;
232
- }
233
-
234
- img.align-right, .figure.align-right, object.align-right {
235
- clear: right;
236
- float: right;
237
- margin-left: 1em;
238
- }
239
-
240
- img.align-center, .figure.align-center, object.align-center {
241
- display: block;
242
- margin-left: auto;
243
- margin-right: auto;
244
- }
245
-
246
- .align-left {
247
- text-align: left;
248
- }
249
-
250
- .align-center {
251
- text-align: center;
252
- }
253
-
254
- .align-right {
255
- text-align: right;
256
- }
257
-
258
- /* -- sidebars -------------------------------------------------------------- */
259
-
260
- div.sidebar {
261
- margin: 0 0 0.5em 1em;
262
- border: 1px solid #ddb;
263
- padding: 7px 7px 0 7px;
264
- background-color: #ffe;
265
- width: 40%;
266
- float: right;
267
- }
268
-
269
- p.sidebar-title {
270
- font-weight: bold;
271
- }
272
-
273
- /* -- topics ---------------------------------------------------------------- */
274
-
275
- div.topic {
276
- border: 1px solid #ccc;
277
- padding: 7px 7px 0 7px;
278
- margin: 10px 0 10px 0;
279
- }
280
-
281
- p.topic-title {
282
- font-size: 1.1em;
283
- font-weight: bold;
284
- margin-top: 10px;
285
- }
286
-
287
- /* -- admonitions ----------------------------------------------------------- */
288
-
289
- div.admonition {
290
- margin-top: 10px;
291
- margin-bottom: 10px;
292
- padding: 7px;
293
- }
294
-
295
- div.admonition dt {
296
- font-weight: bold;
297
- }
298
-
299
- div.admonition dl {
300
- margin-bottom: 0;
301
- }
302
-
303
- p.admonition-title {
304
- margin: 0px 10px 5px 0px;
305
- font-weight: bold;
306
- }
307
-
308
- div.body p.centered {
309
- text-align: center;
310
- margin-top: 25px;
311
- }
312
-
313
- /* -- tables ---------------------------------------------------------------- */
314
-
315
- table.docutils {
316
- border: 0;
317
- border-collapse: collapse;
318
- }
319
-
320
- table caption span.caption-number {
321
- font-style: italic;
322
- }
323
-
324
- table caption span.caption-text {
325
- }
326
-
327
- table.docutils td, table.docutils th {
328
- padding: 1px 8px 1px 5px;
329
- border-top: 0;
330
- border-left: 0;
331
- border-right: 0;
332
- border-bottom: 1px solid #aaa;
333
- }
334
-
335
- table.field-list td, table.field-list th {
336
- border: 0 !important;
337
- }
338
-
339
- table.footnote td, table.footnote th {
340
- border: 0 !important;
341
- }
342
-
343
- th {
344
- text-align: left;
345
- padding-right: 5px;
346
- }
347
-
348
- table.citation {
349
- border-left: solid 1px gray;
350
- margin-left: 1px;
351
- }
352
-
353
- table.citation td {
354
- border-bottom: none;
355
- }
356
-
357
- /* -- figures --------------------------------------------------------------- */
358
-
359
- div.figure {
360
- margin: 0.5em;
361
- padding: 0.5em;
362
- }
363
-
364
- div.figure p.caption {
365
- padding: 0.3em;
366
- }
367
-
368
- div.figure p.caption span.caption-number {
369
- font-style: italic;
370
- }
371
-
372
- div.figure p.caption span.caption-text {
373
- }
374
-
375
-
376
- /* -- other body styles ----------------------------------------------------- */
377
-
378
- ol.arabic {
379
- list-style: decimal;
380
- }
381
-
382
- ol.loweralpha {
383
- list-style: lower-alpha;
384
- }
385
-
386
- ol.upperalpha {
387
- list-style: upper-alpha;
388
- }
389
-
390
- ol.lowerroman {
391
- list-style: lower-roman;
392
- }
393
-
394
- ol.upperroman {
395
- list-style: upper-roman;
396
- }
397
-
398
- dl {
399
- margin-bottom: 15px;
400
- }
401
-
402
- dd p {
403
- margin-top: 0px;
404
- }
405
-
406
- dd ul, dd table {
407
- margin-bottom: 10px;
408
- }
409
-
410
- dd {
411
- margin-top: 3px;
412
- margin-bottom: 10px;
413
- margin-left: 30px;
414
- }
415
-
416
- dt:target, .highlighted {
417
- background-color: #fbe54e;
418
- }
419
-
420
- dl.glossary dt {
421
- font-weight: bold;
422
- font-size: 1.1em;
423
- }
424
-
425
- .field-list ul {
426
- margin: 0;
427
- padding-left: 1em;
428
- }
429
-
430
- .field-list p {
431
- margin: 0;
432
- }
433
-
434
- .optional {
435
- font-size: 1.3em;
436
- }
437
-
438
- .sig-paren {
439
- font-size: larger;
440
- }
441
-
442
- .versionmodified {
443
- font-style: italic;
444
- }
445
-
446
- .system-message {
447
- background-color: #fda;
448
- padding: 5px;
449
- border: 3px solid red;
450
- }
451
-
452
- .footnote:target {
453
- background-color: #ffa;
454
- }
455
-
456
- .line-block {
457
- display: block;
458
- margin-top: 1em;
459
- margin-bottom: 1em;
460
- }
461
-
462
- .line-block .line-block {
463
- margin-top: 0;
464
- margin-bottom: 0;
465
- margin-left: 1.5em;
466
- }
467
-
468
- .guilabel, .menuselection {
469
- font-family: sans-serif;
470
- }
471
-
472
- .accelerator {
473
- text-decoration: underline;
474
- }
475
-
476
- .classifier {
477
- font-style: oblique;
478
- }
479
-
480
- abbr, acronym {
481
- border-bottom: dotted 1px;
482
- cursor: help;
483
- }
484
-
485
- /* -- code displays --------------------------------------------------------- */
486
-
487
- pre {
488
- overflow: auto;
489
- overflow-y: hidden; /* fixes display issues on Chrome browsers */
490
- }
491
-
492
- td.linenos pre {
493
- padding: 5px 0px;
494
- border: 0;
495
- background-color: transparent;
496
- color: #aaa;
497
- }
498
-
499
- table.highlighttable {
500
- margin-left: 0.5em;
501
- }
502
-
503
- table.highlighttable td {
504
- padding: 0 0.5em 0 0.5em;
505
- }
506
-
507
- div.code-block-caption {
508
- padding: 2px 5px;
509
- font-size: small;
510
- }
511
-
512
- div.code-block-caption code {
513
- background-color: transparent;
514
- }
515
-
516
- div.code-block-caption + div > div.highlight > pre {
517
- margin-top: 0;
518
- }
519
-
520
- div.code-block-caption span.caption-number {
521
- padding: 0.1em 0.3em;
522
- font-style: italic;
523
- }
524
-
525
- div.code-block-caption span.caption-text {
526
- }
527
-
528
- div.literal-block-wrapper {
529
- padding: 1em 1em 0;
530
- }
531
-
532
- div.literal-block-wrapper div.highlight {
533
- margin: 0;
534
- }
535
-
536
- code.descname {
537
- background-color: transparent;
538
- font-weight: bold;
539
- font-size: 1.2em;
540
- }
541
-
542
- code.descclassname {
543
- background-color: transparent;
544
- }
545
-
546
- code.xref, a code {
547
- background-color: transparent;
548
- font-weight: bold;
549
- }
550
-
551
- h1 code, h2 code, h3 code, h4 code, h5 code, h6 code {
552
- background-color: transparent;
553
- }
554
-
555
- .viewcode-link {
556
- float: right;
557
- }
558
-
559
- .viewcode-back {
560
- float: right;
561
- font-family: sans-serif;
562
- }
563
-
564
- div.viewcode-block:target {
565
- margin: -1px -10px;
566
- padding: 0 10px;
567
- }
568
-
569
- /* -- math display ---------------------------------------------------------- */
570
-
571
- img.math {
572
- vertical-align: middle;
573
- }
574
-
575
- div.body div.math p {
576
- text-align: center;
577
- }
578
-
579
- span.eqno {
580
- float: right;
581
- }
582
-
583
- /* -- printout stylesheet --------------------------------------------------- */
584
-
585
- @media print {
586
- div.document,
587
- div.documentwrapper,
588
- div.bodywrapper {
589
- margin: 0 !important;
590
- width: 100%;
591
- }
592
-
593
- div.sphinxsidebar,
594
- div.related,
595
- div.footer,
596
- #top-link {
597
- display: none;
598
- }
599
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docs/_build/html/_static/classic.css DELETED
@@ -1,261 +0,0 @@
1
- /*
2
- * default.css_t
3
- * ~~~~~~~~~~~~~
4
- *
5
- * Sphinx stylesheet -- default theme.
6
- *
7
- * :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS.
8
- * :license: BSD, see LICENSE for details.
9
- *
10
- */
11
-
12
- @import url("basic.css");
13
-
14
- /* -- page layout ----------------------------------------------------------- */
15
-
16
- body {
17
- font-family: sans-serif;
18
- font-size: 100%;
19
- background-color: #11303d;
20
- color: #000;
21
- margin: 0;
22
- padding: 0;
23
- }
24
-
25
- div.document {
26
- background-color: #1c4e63;
27
- }
28
-
29
- div.documentwrapper {
30
- float: left;
31
- width: 100%;
32
- }
33
-
34
- div.bodywrapper {
35
- margin: 0 0 0 230px;
36
- }
37
-
38
- div.body {
39
- background-color: #ffffff;
40
- color: #000000;
41
- padding: 0 20px 30px 20px;
42
- }
43
-
44
- div.footer {
45
- color: #ffffff;
46
- width: 100%;
47
- padding: 9px 0 9px 0;
48
- text-align: center;
49
- font-size: 75%;
50
- }
51
-
52
- div.footer a {
53
- color: #ffffff;
54
- text-decoration: underline;
55
- }
56
-
57
- div.related {
58
- background-color: #133f52;
59
- line-height: 30px;
60
- color: #ffffff;
61
- }
62
-
63
- div.related a {
64
- color: #ffffff;
65
- }
66
-
67
- div.sphinxsidebar {
68
- }
69
-
70
- div.sphinxsidebar h3 {
71
- font-family: 'Trebuchet MS', sans-serif;
72
- color: #ffffff;
73
- font-size: 1.4em;
74
- font-weight: normal;
75
- margin: 0;
76
- padding: 0;
77
- }
78
-
79
- div.sphinxsidebar h3 a {
80
- color: #ffffff;
81
- }
82
-
83
- div.sphinxsidebar h4 {
84
- font-family: 'Trebuchet MS', sans-serif;
85
- color: #ffffff;
86
- font-size: 1.3em;
87
- font-weight: normal;
88
- margin: 5px 0 0 0;
89
- padding: 0;
90
- }
91
-
92
- div.sphinxsidebar p {
93
- color: #ffffff;
94
- }
95
-
96
- div.sphinxsidebar p.topless {
97
- margin: 5px 10px 10px 10px;
98
- }
99
-
100
- div.sphinxsidebar ul {
101
- margin: 10px;
102
- padding: 0;
103
- color: #ffffff;
104
- }
105
-
106
- div.sphinxsidebar a {
107
- color: #98dbcc;
108
- }
109
-
110
- div.sphinxsidebar input {
111
- border: 1px solid #98dbcc;
112
- font-family: sans-serif;
113
- font-size: 1em;
114
- }
115
-
116
-
117
-
118
- /* -- hyperlink styles ------------------------------------------------------ */
119
-
120
- a {
121
- color: #355f7c;
122
- text-decoration: none;
123
- }
124
-
125
- a:visited {
126
- color: #355f7c;
127
- text-decoration: none;
128
- }
129
-
130
- a:hover {
131
- text-decoration: underline;
132
- }
133
-
134
-
135
-
136
- /* -- body styles ----------------------------------------------------------- */
137
-
138
- div.body h1,
139
- div.body h2,
140
- div.body h3,
141
- div.body h4,
142
- div.body h5,
143
- div.body h6 {
144
- font-family: 'Trebuchet MS', sans-serif;
145
- background-color: #f2f2f2;
146
- font-weight: normal;
147
- color: #20435c;
148
- border-bottom: 1px solid #ccc;
149
- margin: 20px -20px 10px -20px;
150
- padding: 3px 0 3px 10px;
151
- }
152
-
153
- div.body h1 { margin-top: 0; font-size: 200%; }
154
- div.body h2 { font-size: 160%; }
155
- div.body h3 { font-size: 140%; }
156
- div.body h4 { font-size: 120%; }
157
- div.body h5 { font-size: 110%; }
158
- div.body h6 { font-size: 100%; }
159
-
160
- a.headerlink {
161
- color: #c60f0f;
162
- font-size: 0.8em;
163
- padding: 0 4px 0 4px;
164
- text-decoration: none;
165
- }
166
-
167
- a.headerlink:hover {
168
- background-color: #c60f0f;
169
- color: white;
170
- }
171
-
172
- div.body p, div.body dd, div.body li {
173
- text-align: justify;
174
- line-height: 130%;
175
- }
176
-
177
- div.admonition p.admonition-title + p {
178
- display: inline;
179
- }
180
-
181
- div.admonition p {
182
- margin-bottom: 5px;
183
- }
184
-
185
- div.admonition pre {
186
- margin-bottom: 5px;
187
- }
188
-
189
- div.admonition ul, div.admonition ol {
190
- margin-bottom: 5px;
191
- }
192
-
193
- div.note {
194
- background-color: #eee;
195
- border: 1px solid #ccc;
196
- }
197
-
198
- div.seealso {
199
- background-color: #ffc;
200
- border: 1px solid #ff6;
201
- }
202
-
203
- div.topic {
204
- background-color: #eee;
205
- }
206
-
207
- div.warning {
208
- background-color: #ffe4e4;
209
- border: 1px solid #f66;
210
- }
211
-
212
- p.admonition-title {
213
- display: inline;
214
- }
215
-
216
- p.admonition-title:after {
217
- content: ":";
218
- }
219
-
220
- pre {
221
- padding: 5px;
222
- background-color: #eeffcc;
223
- color: #333333;
224
- line-height: 120%;
225
- border: 1px solid #ac9;
226
- border-left: none;
227
- border-right: none;
228
- }
229
-
230
- code {
231
- background-color: #ecf0f3;
232
- padding: 0 1px 0 1px;
233
- font-size: 0.95em;
234
- }
235
-
236
- th {
237
- background-color: #ede;
238
- }
239
-
240
- .warning code {
241
- background: #efc2c2;
242
- }
243
-
244
- .note code {
245
- background: #d6d6d6;
246
- }
247
-
248
- .viewcode-back {
249
- font-family: sans-serif;
250
- }
251
-
252
- div.viewcode-block:target {
253
- background-color: #f4debf;
254
- border-top: 1px solid #ac9;
255
- border-bottom: 1px solid #ac9;
256
- }
257
-
258
- div.code-block-caption {
259
- color: #efefef;
260
- background-color: #1c4e63;
261
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docs/_build/html/_static/comment-bright.png DELETED
Binary file (3.5 kB)
 
docs/_build/html/_static/comment-close.png DELETED
Binary file (3.58 kB)
 
docs/_build/html/_static/comment.png DELETED
Binary file (3.45 kB)
 
docs/_build/html/_static/default.css DELETED
@@ -1,256 +0,0 @@
1
- /*
2
- * default.css_t
3
- * ~~~~~~~~~~~~~
4
- *
5
- * Sphinx stylesheet -- default theme.
6
- *
7
- * :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS.
8
- * :license: BSD, see LICENSE for details.
9
- *
10
- */
11
-
12
- @import url("basic.css");
13
-
14
- /* -- page layout ----------------------------------------------------------- */
15
-
16
- body {
17
- font-family: sans-serif;
18
- font-size: 100%;
19
- background-color: #11303d;
20
- color: #000;
21
- margin: 0;
22
- padding: 0;
23
- }
24
-
25
- div.document {
26
- background-color: #1c4e63;
27
- }
28
-
29
- div.documentwrapper {
30
- float: left;
31
- width: 100%;
32
- }
33
-
34
- div.bodywrapper {
35
- margin: 0 0 0 230px;
36
- }
37
-
38
- div.body {
39
- background-color: #ffffff;
40
- color: #000000;
41
- padding: 0 20px 30px 20px;
42
- }
43
-
44
- div.footer {
45
- color: #ffffff;
46
- width: 100%;
47
- padding: 9px 0 9px 0;
48
- text-align: center;
49
- font-size: 75%;
50
- }
51
-
52
- div.footer a {
53
- color: #ffffff;
54
- text-decoration: underline;
55
- }
56
-
57
- div.related {
58
- background-color: #133f52;
59
- line-height: 30px;
60
- color: #ffffff;
61
- }
62
-
63
- div.related a {
64
- color: #ffffff;
65
- }
66
-
67
- div.sphinxsidebar {
68
- }
69
-
70
- div.sphinxsidebar h3 {
71
- font-family: 'Trebuchet MS', sans-serif;
72
- color: #ffffff;
73
- font-size: 1.4em;
74
- font-weight: normal;
75
- margin: 0;
76
- padding: 0;
77
- }
78
-
79
- div.sphinxsidebar h3 a {
80
- color: #ffffff;
81
- }
82
-
83
- div.sphinxsidebar h4 {
84
- font-family: 'Trebuchet MS', sans-serif;
85
- color: #ffffff;
86
- font-size: 1.3em;
87
- font-weight: normal;
88
- margin: 5px 0 0 0;
89
- padding: 0;
90
- }
91
-
92
- div.sphinxsidebar p {
93
- color: #ffffff;
94
- }
95
-
96
- div.sphinxsidebar p.topless {
97
- margin: 5px 10px 10px 10px;
98
- }
99
-
100
- div.sphinxsidebar ul {
101
- margin: 10px;
102
- padding: 0;
103
- color: #ffffff;
104
- }
105
-
106
- div.sphinxsidebar a {
107
- color: #98dbcc;
108
- }
109
-
110
- div.sphinxsidebar input {
111
- border: 1px solid #98dbcc;
112
- font-family: sans-serif;
113
- font-size: 1em;
114
- }
115
-
116
-
117
-
118
- /* -- hyperlink styles ------------------------------------------------------ */
119
-
120
- a {
121
- color: #355f7c;
122
- text-decoration: none;
123
- }
124
-
125
- a:visited {
126
- color: #355f7c;
127
- text-decoration: none;
128
- }
129
-
130
- a:hover {
131
- text-decoration: underline;
132
- }
133
-
134
-
135
-
136
- /* -- body styles ----------------------------------------------------------- */
137
-
138
- div.body h1,
139
- div.body h2,
140
- div.body h3,
141
- div.body h4,
142
- div.body h5,
143
- div.body h6 {
144
- font-family: 'Trebuchet MS', sans-serif;
145
- background-color: #f2f2f2;
146
- font-weight: normal;
147
- color: #20435c;
148
- border-bottom: 1px solid #ccc;
149
- margin: 20px -20px 10px -20px;
150
- padding: 3px 0 3px 10px;
151
- }
152
-
153
- div.body h1 { margin-top: 0; font-size: 200%; }
154
- div.body h2 { font-size: 160%; }
155
- div.body h3 { font-size: 140%; }
156
- div.body h4 { font-size: 120%; }
157
- div.body h5 { font-size: 110%; }
158
- div.body h6 { font-size: 100%; }
159
-
160
- a.headerlink {
161
- color: #c60f0f;
162
- font-size: 0.8em;
163
- padding: 0 4px 0 4px;
164
- text-decoration: none;
165
- }
166
-
167
- a.headerlink:hover {
168
- background-color: #c60f0f;
169
- color: white;
170
- }
171
-
172
- div.body p, div.body dd, div.body li {
173
- text-align: justify;
174
- line-height: 130%;
175
- }
176
-
177
- div.admonition p.admonition-title + p {
178
- display: inline;
179
- }
180
-
181
- div.admonition p {
182
- margin-bottom: 5px;
183
- }
184
-
185
- div.admonition pre {
186
- margin-bottom: 5px;
187
- }
188
-
189
- div.admonition ul, div.admonition ol {
190
- margin-bottom: 5px;
191
- }
192
-
193
- div.note {
194
- background-color: #eee;
195
- border: 1px solid #ccc;
196
- }
197
-
198
- div.seealso {
199
- background-color: #ffc;
200
- border: 1px solid #ff6;
201
- }
202
-
203
- div.topic {
204
- background-color: #eee;
205
- }
206
-
207
- div.warning {
208
- background-color: #ffe4e4;
209
- border: 1px solid #f66;
210
- }
211
-
212
- p.admonition-title {
213
- display: inline;
214
- }
215
-
216
- p.admonition-title:after {
217
- content: ":";
218
- }
219
-
220
- pre {
221
- padding: 5px;
222
- background-color: #eeffcc;
223
- color: #333333;
224
- line-height: 120%;
225
- border: 1px solid #ac9;
226
- border-left: none;
227
- border-right: none;
228
- }
229
-
230
- tt {
231
- background-color: #ecf0f3;
232
- padding: 0 1px 0 1px;
233
- font-size: 0.95em;
234
- }
235
-
236
- th {
237
- background-color: #ede;
238
- }
239
-
240
- .warning tt {
241
- background: #efc2c2;
242
- }
243
-
244
- .note tt {
245
- background: #d6d6d6;
246
- }
247
-
248
- .viewcode-back {
249
- font-family: sans-serif;
250
- }
251
-
252
- div.viewcode-block:target {
253
- background-color: #f4debf;
254
- border-top: 1px solid #ac9;
255
- border-bottom: 1px solid #ac9;
256
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docs/_build/html/_static/doctools.js DELETED
@@ -1,263 +0,0 @@
1
- /*
2
- * doctools.js
3
- * ~~~~~~~~~~~
4
- *
5
- * Sphinx JavaScript utilities for all documentation.
6
- *
7
- * :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS.
8
- * :license: BSD, see LICENSE for details.
9
- *
10
- */
11
-
12
- /**
13
- * select a different prefix for underscore
14
- */
15
- $u = _.noConflict();
16
-
17
- /**
18
- * make the code below compatible with browsers without
19
- * an installed firebug like debugger
20
- if (!window.console || !console.firebug) {
21
- var names = ["log", "debug", "info", "warn", "error", "assert", "dir",
22
- "dirxml", "group", "groupEnd", "time", "timeEnd", "count", "trace",
23
- "profile", "profileEnd"];
24
- window.console = {};
25
- for (var i = 0; i < names.length; ++i)
26
- window.console[names[i]] = function() {};
27
- }
28
- */
29
-
30
- /**
31
- * small helper function to urldecode strings
32
- */
33
- jQuery.urldecode = function(x) {
34
- return decodeURIComponent(x).replace(/\+/g, ' ');
35
- };
36
-
37
- /**
38
- * small helper function to urlencode strings
39
- */
40
- jQuery.urlencode = encodeURIComponent;
41
-
42
- /**
43
- * This function returns the parsed url parameters of the
44
- * current request. Multiple values per key are supported,
45
- * it will always return arrays of strings for the value parts.
46
- */
47
- jQuery.getQueryParameters = function(s) {
48
- if (typeof s == 'undefined')
49
- s = document.location.search;
50
- var parts = s.substr(s.indexOf('?') + 1).split('&');
51
- var result = {};
52
- for (var i = 0; i < parts.length; i++) {
53
- var tmp = parts[i].split('=', 2);
54
- var key = jQuery.urldecode(tmp[0]);
55
- var value = jQuery.urldecode(tmp[1]);
56
- if (key in result)
57
- result[key].push(value);
58
- else
59
- result[key] = [value];
60
- }
61
- return result;
62
- };
63
-
64
- /**
65
- * highlight a given string on a jquery object by wrapping it in
66
- * span elements with the given class name.
67
- */
68
- jQuery.fn.highlightText = function(text, className) {
69
- function highlight(node) {
70
- if (node.nodeType == 3) {
71
- var val = node.nodeValue;
72
- var pos = val.toLowerCase().indexOf(text);
73
- if (pos >= 0 && !jQuery(node.parentNode).hasClass(className)) {
74
- var span = document.createElement("span");
75
- span.className = className;
76
- span.appendChild(document.createTextNode(val.substr(pos, text.length)));
77
- node.parentNode.insertBefore(span, node.parentNode.insertBefore(
78
- document.createTextNode(val.substr(pos + text.length)),
79
- node.nextSibling));
80
- node.nodeValue = val.substr(0, pos);
81
- }
82
- }
83
- else if (!jQuery(node).is("button, select, textarea")) {
84
- jQuery.each(node.childNodes, function() {
85
- highlight(this);
86
- });
87
- }
88
- }
89
- return this.each(function() {
90
- highlight(this);
91
- });
92
- };
93
-
94
- /*
95
- * backward compatibility for jQuery.browser
96
- * This will be supported until firefox bug is fixed.
97
- */
98
- if (!jQuery.browser) {
99
- jQuery.uaMatch = function(ua) {
100
- ua = ua.toLowerCase();
101
-
102
- var match = /(chrome)[ \/]([\w.]+)/.exec(ua) ||
103
- /(webkit)[ \/]([\w.]+)/.exec(ua) ||
104
- /(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) ||
105
- /(msie) ([\w.]+)/.exec(ua) ||
106
- ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) ||
107
- [];
108
-
109
- return {
110
- browser: match[ 1 ] || "",
111
- version: match[ 2 ] || "0"
112
- };
113
- };
114
- jQuery.browser = {};
115
- jQuery.browser[jQuery.uaMatch(navigator.userAgent).browser] = true;
116
- }
117
-
118
- /**
119
- * Small JavaScript module for the documentation.
120
- */
121
- var Documentation = {
122
-
123
- init : function() {
124
- this.fixFirefoxAnchorBug();
125
- this.highlightSearchWords();
126
- this.initIndexTable();
127
- },
128
-
129
- /**
130
- * i18n support
131
- */
132
- TRANSLATIONS : {},
133
- PLURAL_EXPR : function(n) { return n == 1 ? 0 : 1; },
134
- LOCALE : 'unknown',
135
-
136
- // gettext and ngettext don't access this so that the functions
137
- // can safely bound to a different name (_ = Documentation.gettext)
138
- gettext : function(string) {
139
- var translated = Documentation.TRANSLATIONS[string];
140
- if (typeof translated == 'undefined')
141
- return string;
142
- return (typeof translated == 'string') ? translated : translated[0];
143
- },
144
-
145
- ngettext : function(singular, plural, n) {
146
- var translated = Documentation.TRANSLATIONS[singular];
147
- if (typeof translated == 'undefined')
148
- return (n == 1) ? singular : plural;
149
- return translated[Documentation.PLURALEXPR(n)];
150
- },
151
-
152
- addTranslations : function(catalog) {
153
- for (var key in catalog.messages)
154
- this.TRANSLATIONS[key] = catalog.messages[key];
155
- this.PLURAL_EXPR = new Function('n', 'return +(' + catalog.plural_expr + ')');
156
- this.LOCALE = catalog.locale;
157
- },
158
-
159
- /**
160
- * add context elements like header anchor links
161
- */
162
- addContextElements : function() {
163
- $('div[id] > :header:first').each(function() {
164
- $('<a class="headerlink">\u00B6</a>').
165
- attr('href', '#' + this.id).
166
- attr('title', _('Permalink to this headline')).
167
- appendTo(this);
168
- });
169
- $('dt[id]').each(function() {
170
- $('<a class="headerlink">\u00B6</a>').
171
- attr('href', '#' + this.id).
172
- attr('title', _('Permalink to this definition')).
173
- appendTo(this);
174
- });
175
- },
176
-
177
- /**
178
- * workaround a firefox stupidity
179
- * see: https://bugzilla.mozilla.org/show_bug.cgi?id=645075
180
- */
181
- fixFirefoxAnchorBug : function() {
182
- if (document.location.hash)
183
- window.setTimeout(function() {
184
- document.location.href += '';
185
- }, 10);
186
- },
187
-
188
- /**
189
- * highlight the search words provided in the url in the text
190
- */
191
- highlightSearchWords : function() {
192
- var params = $.getQueryParameters();
193
- var terms = (params.highlight) ? params.highlight[0].split(/\s+/) : [];
194
- if (terms.length) {
195
- var body = $('div.body');
196
- if (!body.length) {
197
- body = $('body');
198
- }
199
- window.setTimeout(function() {
200
- $.each(terms, function() {
201
- body.highlightText(this.toLowerCase(), 'highlighted');
202
- });
203
- }, 10);
204
- $('<p class="highlight-link"><a href="javascript:Documentation.' +
205
- 'hideSearchWords()">' + _('Hide Search Matches') + '</a></p>')
206
- .appendTo($('#searchbox'));
207
- }
208
- },
209
-
210
- /**
211
- * init the domain index toggle buttons
212
- */
213
- initIndexTable : function() {
214
- var togglers = $('img.toggler').click(function() {
215
- var src = $(this).attr('src');
216
- var idnum = $(this).attr('id').substr(7);
217
- $('tr.cg-' + idnum).toggle();
218
- if (src.substr(-9) == 'minus.png')
219
- $(this).attr('src', src.substr(0, src.length-9) + 'plus.png');
220
- else
221
- $(this).attr('src', src.substr(0, src.length-8) + 'minus.png');
222
- }).css('display', '');
223
- if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) {
224
- togglers.click();
225
- }
226
- },
227
-
228
- /**
229
- * helper function to hide the search marks again
230
- */
231
- hideSearchWords : function() {
232
- $('#searchbox .highlight-link').fadeOut(300);
233
- $('span.highlighted').removeClass('highlighted');
234
- },
235
-
236
- /**
237
- * make the url absolute
238
- */
239
- makeURL : function(relativeURL) {
240
- return DOCUMENTATION_OPTIONS.URL_ROOT + '/' + relativeURL;
241
- },
242
-
243
- /**
244
- * get the current relative url
245
- */
246
- getCurrentURL : function() {
247
- var path = document.location.pathname;
248
- var parts = path.split(/\//);
249
- $.each(DOCUMENTATION_OPTIONS.URL_ROOT.split(/\//), function() {
250
- if (this == '..')
251
- parts.pop();
252
- });
253
- var url = parts.join('/');
254
- return path.substring(url.lastIndexOf('/') + 1, path.length - 1);
255
- }
256
- };
257
-
258
- // quick alias for translations
259
- _ = Documentation.gettext;
260
-
261
- $(document).ready(function() {
262
- Documentation.init();
263
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docs/_build/html/_static/down-pressed.png DELETED
Binary file (347 Bytes)
 
docs/_build/html/_static/down.png DELETED
Binary file (347 Bytes)
 
docs/_build/html/_static/file.png DELETED
Binary file (358 Bytes)
 
docs/_build/html/_static/jquery-1.11.1.js DELETED
The diff for this file is too large to render. See raw diff
 
docs/_build/html/_static/jquery.js DELETED
@@ -1,4 +0,0 @@
1
- /*! jQuery v1.11.1 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */
2
- !function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l="1.11.1",m=function(a,b){return new m.fn.init(a,b)},n=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,o=/^-ms-/,p=/-([\da-z])/gi,q=function(a,b){return b.toUpperCase()};m.fn=m.prototype={jquery:l,constructor:m,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=m.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return m.each(this,a,b)},map:function(a){return this.pushStack(m.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},m.extend=m.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||m.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(m.isPlainObject(c)||(b=m.isArray(c)))?(b?(b=!1,f=a&&m.isArray(a)?a:[]):f=a&&m.isPlainObject(a)?a:{},g[d]=m.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},m.extend({expando:"jQuery"+(l+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===m.type(a)},isArray:Array.isArray||function(a){return"array"===m.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return!m.isArray(a)&&a-parseFloat(a)>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==m.type(a)||a.nodeType||m.isWindow(a))return!1;try{if(a.constructor&&!j.call(a,"constructor")&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(k.ownLast)for(b in a)return j.call(a,b);for(b in a);return void 0===b||j.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(b){b&&m.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(o,"ms-").replace(p,q)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=r(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(n,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(r(Object(a))?m.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(g)return g.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=r(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(f=a[b],b=a,a=f),m.isFunction(a)?(c=d.call(arguments,2),e=function(){return a.apply(b||this,c.concat(d.call(arguments)))},e.guid=a.guid=a.guid||m.guid++,e):void 0},now:function(){return+new Date},support:k}),m.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function r(a){var b=a.length,c=m.type(a);return"function"===c||m.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var s=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+-new Date,v=a.document,w=0,x=0,y=gb(),z=gb(),A=gb(),B=function(a,b){return a===b&&(l=!0),0},C="undefined",D=1<<31,E={}.hasOwnProperty,F=[],G=F.pop,H=F.push,I=F.push,J=F.slice,K=F.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},L="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",N="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",O=N.replace("w","w#"),P="\\["+M+"*("+N+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+O+"))|)"+M+"*\\]",Q=":("+N+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+P+")*)|.*)\\)|)",R=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),S=new RegExp("^"+M+"*,"+M+"*"),T=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp("="+M+"*([^\\]'\"]*?)"+M+"*\\]","g"),V=new RegExp(Q),W=new RegExp("^"+O+"$"),X={ID:new RegExp("^#("+N+")"),CLASS:new RegExp("^\\.("+N+")"),TAG:new RegExp("^("+N.replace("w","w*")+")"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+Q),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+L+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ab=/[+~]/,bb=/'|\\/g,cb=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),db=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{I.apply(F=J.call(v.childNodes),v.childNodes),F[v.childNodes.length].nodeType}catch(eb){I={apply:F.length?function(a,b){H.apply(a,J.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function fb(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],!a||"string"!=typeof a)return d;if(1!==(k=b.nodeType)&&9!==k)return[];if(p&&!e){if(f=_.exec(a))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return I.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return I.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=9===k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(bb,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+qb(o[l]);w=ab.test(a)&&ob(b.parentNode)||b,x=o.join(",")}if(x)try{return I.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function gb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function hb(a){return a[u]=!0,a}function ib(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function jb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function kb(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||D)-(~a.sourceIndex||D);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function lb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function mb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function nb(a){return hb(function(b){return b=+b,hb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function ob(a){return a&&typeof a.getElementsByTagName!==C&&a}c=fb.support={},f=fb.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=fb.setDocument=function(a){var b,e=a?a.ownerDocument||a:v,g=e.defaultView;return e!==n&&9===e.nodeType&&e.documentElement?(n=e,o=e.documentElement,p=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){m()},!1):g.attachEvent&&g.attachEvent("onunload",function(){m()})),c.attributes=ib(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ib(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(e.getElementsByClassName)&&ib(function(a){return a.innerHTML="<div class='a'></div><div class='a i'></div>",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=ib(function(a){return o.appendChild(a).id=u,!e.getElementsByName||!e.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==C&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){var c=typeof a.getAttributeNode!==C&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==C?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==C&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(e.querySelectorAll))&&(ib(function(a){a.innerHTML="<select msallowclip=''><option selected=''></option></select>",a.querySelectorAll("[msallowclip^='']").length&&q.push("[*^$]="+M+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+M+"*(?:value|"+L+")"),a.querySelectorAll(":checked").length||q.push(":checked")}),ib(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+M+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ib(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",Q)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===v&&t(v,a)?-1:b===e||b.ownerDocument===v&&t(v,b)?1:k?K.call(k,a)-K.call(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],i=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:k?K.call(k,a)-K.call(k,b):0;if(f===g)return kb(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?kb(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},e):n},fb.matches=function(a,b){return fb(a,null,null,b)},fb.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return fb(b,n,null,[a]).length>0},fb.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fb.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&E.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fb.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},fb.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=fb.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=fb.selectors={cacheLength:50,createPseudo:hb,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(cb,db),a[3]=(a[3]||a[4]||a[5]||"").replace(cb,db),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||fb.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&fb.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(cb,db).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+M+")"+a+"("+M+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==C&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fb.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fb.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?hb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=K.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:hb(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?hb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:hb(function(a){return function(b){return fb(a,b).length>0}}),contains:hb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:hb(function(a){return W.test(a||"")||fb.error("unsupported lang: "+a),a=a.replace(cb,db).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:nb(function(){return[0]}),last:nb(function(a,b){return[b-1]}),eq:nb(function(a,b,c){return[0>c?c+b:c]}),even:nb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:nb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:nb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:nb(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=lb(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=mb(b);function pb(){}pb.prototype=d.filters=d.pseudos,d.setFilters=new pb,g=fb.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=S.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=T.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(R," ")}),h=h.slice(c.length));for(g in d.filter)!(e=X[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?fb.error(a):z(a,i).slice(0)};function qb(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function rb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function sb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function tb(a,b,c){for(var d=0,e=b.length;e>d;d++)fb(a,b[d],c);return c}function ub(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function vb(a,b,c,d,e,f){return d&&!d[u]&&(d=vb(d)),e&&!e[u]&&(e=vb(e,f)),hb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||tb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ub(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ub(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?K.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ub(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):I.apply(g,r)})}function wb(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=rb(function(a){return a===b},h,!0),l=rb(function(a){return K.call(b,a)>-1},h,!0),m=[function(a,c,d){return!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>i;i++)if(c=d.relative[a[i].type])m=[rb(sb(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return vb(i>1&&sb(m),i>1&&qb(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&wb(a.slice(i,e)),f>e&&wb(a=a.slice(e)),f>e&&qb(a))}m.push(c)}return sb(m)}function xb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=G.call(i));s=ub(s)}I.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&fb.uniqueSort(i)}return k&&(w=v,j=t),r};return c?hb(f):f}return h=fb.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=wb(b[c]),f[u]?d.push(f):e.push(f);f=A(a,xb(e,d)),f.selector=a}return f},i=fb.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(cb,db),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(cb,db),ab.test(j[0].type)&&ob(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qb(j),!a)return I.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,ab.test(a)&&ob(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ib(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ib(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||jb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ib(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||jb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ib(function(a){return null==a.getAttribute("disabled")})||jb(L,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fb}(a);m.find=s,m.expr=s.selectors,m.expr[":"]=m.expr.pseudos,m.unique=s.uniqueSort,m.text=s.getText,m.isXMLDoc=s.isXML,m.contains=s.contains;var t=m.expr.match.needsContext,u=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,v=/^.[^:#\[\.,]*$/;function w(a,b,c){if(m.isFunction(b))return m.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return m.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(v.test(b))return m.filter(b,a,c);b=m.filter(b,a)}return m.grep(a,function(a){return m.inArray(a,b)>=0!==c})}m.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?m.find.matchesSelector(d,a)?[d]:[]:m.find.matches(a,m.grep(b,function(a){return 1===a.nodeType}))},m.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(m(a).filter(function(){for(b=0;e>b;b++)if(m.contains(d[b],this))return!0}));for(b=0;e>b;b++)m.find(a,d[b],c);return c=this.pushStack(e>1?m.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(w(this,a||[],!1))},not:function(a){return this.pushStack(w(this,a||[],!0))},is:function(a){return!!w(this,"string"==typeof a&&t.test(a)?m(a):a||[],!1).length}});var x,y=a.document,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=m.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||x).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof m?b[0]:b,m.merge(this,m.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:y,!0)),u.test(c[1])&&m.isPlainObject(b))for(c in b)m.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}if(d=y.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2])return x.find(a);this.length=1,this[0]=d}return this.context=y,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):m.isFunction(a)?"undefined"!=typeof x.ready?x.ready(a):a(m):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),m.makeArray(a,this))};A.prototype=m.fn,x=m(y);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};m.extend({dir:function(a,b,c){var d=[],e=a[b];while(e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!m(e).is(c)))1===e.nodeType&&d.push(e),e=e[b];return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),m.fn.extend({has:function(a){var b,c=m(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(m.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=t.test(a)||"string"!=typeof a?m(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&m.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?m.unique(f):f)},index:function(a){return a?"string"==typeof a?m.inArray(this[0],m(a)):m.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(m.unique(m.merge(this.get(),m(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}m.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return m.dir(a,"parentNode")},parentsUntil:function(a,b,c){return m.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return m.dir(a,"nextSibling")},prevAll:function(a){return m.dir(a,"previousSibling")},nextUntil:function(a,b,c){return m.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return m.dir(a,"previousSibling",c)},siblings:function(a){return m.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return m.sibling(a.firstChild)},contents:function(a){return m.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:m.merge([],a.childNodes)}},function(a,b){m.fn[a]=function(c,d){var e=m.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=m.filter(d,e)),this.length>1&&(C[a]||(e=m.unique(e)),B.test(a)&&(e=e.reverse())),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return m.each(a.match(E)||[],function(a,c){b[c]=!0}),b}m.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):m.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(c=a.memory&&l,d=!0,f=g||0,g=0,e=h.length,b=!0;h&&e>f;f++)if(h[f].apply(l[0],l[1])===!1&&a.stopOnFalse){c=!1;break}b=!1,h&&(i?i.length&&j(i.shift()):c?h=[]:k.disable())},k={add:function(){if(h){var d=h.length;!function f(b){m.each(b,function(b,c){var d=m.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this},remove:function(){return h&&m.each(arguments,function(a,c){var d;while((d=m.inArray(c,h,d))>-1)h.splice(d,1),b&&(e>=d&&e--,f>=d&&f--)}),this},has:function(a){return a?m.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],e=0,this},disable:function(){return h=i=c=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,c||k.disable(),this},locked:function(){return!i},fireWith:function(a,c){return!h||d&&!i||(c=c||[],c=[a,c.slice?c.slice():c],b?i.push(c):j(c)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!d}};return k},m.extend({Deferred:function(a){var b=[["resolve","done",m.Callbacks("once memory"),"resolved"],["reject","fail",m.Callbacks("once memory"),"rejected"],["notify","progress",m.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return m.Deferred(function(c){m.each(b,function(b,f){var g=m.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&m.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?m.extend(a,d):d}},e={};return d.pipe=d.then,m.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&m.isFunction(a.promise)?e:0,g=1===f?a:m.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&m.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;m.fn.ready=function(a){return m.ready.promise().done(a),this},m.extend({isReady:!1,readyWait:1,holdReady:function(a){a?m.readyWait++:m.ready(!0)},ready:function(a){if(a===!0?!--m.readyWait:!m.isReady){if(!y.body)return setTimeout(m.ready);m.isReady=!0,a!==!0&&--m.readyWait>0||(H.resolveWith(y,[m]),m.fn.triggerHandler&&(m(y).triggerHandler("ready"),m(y).off("ready")))}}});function I(){y.addEventListener?(y.removeEventListener("DOMContentLoaded",J,!1),a.removeEventListener("load",J,!1)):(y.detachEvent("onreadystatechange",J),a.detachEvent("onload",J))}function J(){(y.addEventListener||"load"===event.type||"complete"===y.readyState)&&(I(),m.ready())}m.ready.promise=function(b){if(!H)if(H=m.Deferred(),"complete"===y.readyState)setTimeout(m.ready);else if(y.addEventListener)y.addEventListener("DOMContentLoaded",J,!1),a.addEventListener("load",J,!1);else{y.attachEvent("onreadystatechange",J),a.attachEvent("onload",J);var c=!1;try{c=null==a.frameElement&&y.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!m.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}I(),m.ready()}}()}return H.promise(b)};var K="undefined",L;for(L in m(k))break;k.ownLast="0"!==L,k.inlineBlockNeedsLayout=!1,m(function(){var a,b,c,d;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",k.inlineBlockNeedsLayout=a=3===b.offsetWidth,a&&(c.style.zoom=1)),c.removeChild(d))}),function(){var a=y.createElement("div");if(null==k.deleteExpando){k.deleteExpando=!0;try{delete a.test}catch(b){k.deleteExpando=!1}}a=null}(),m.acceptData=function(a){var b=m.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b};var M=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,N=/([A-Z])/g;function O(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(N,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:M.test(c)?m.parseJSON(c):c}catch(e){}m.data(a,b,c)}else c=void 0}return c}function P(a){var b;for(b in a)if(("data"!==b||!m.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function Q(a,b,d,e){if(m.acceptData(a)){var f,g,h=m.expando,i=a.nodeType,j=i?m.cache:a,k=i?a[h]:a[h]&&h;
3
- if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||m.guid++:h),j[k]||(j[k]=i?{}:{toJSON:m.noop}),("object"==typeof b||"function"==typeof b)&&(e?j[k]=m.extend(j[k],b):j[k].data=m.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[m.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[m.camelCase(b)])):f=g,f}}function R(a,b,c){if(m.acceptData(a)){var d,e,f=a.nodeType,g=f?m.cache:a,h=f?a[m.expando]:m.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){m.isArray(b)?b=b.concat(m.map(b,m.camelCase)):b in d?b=[b]:(b=m.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!P(d):!m.isEmptyObject(d))return}(c||(delete g[h].data,P(g[h])))&&(f?m.cleanData([a],!0):k.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}m.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?m.cache[a[m.expando]]:a[m.expando],!!a&&!P(a)},data:function(a,b,c){return Q(a,b,c)},removeData:function(a,b){return R(a,b)},_data:function(a,b,c){return Q(a,b,c,!0)},_removeData:function(a,b){return R(a,b,!0)}}),m.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=m.data(f),1===f.nodeType&&!m._data(f,"parsedAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=m.camelCase(d.slice(5)),O(f,d,e[d])));m._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){m.data(this,a)}):arguments.length>1?this.each(function(){m.data(this,a,b)}):f?O(f,a,m.data(f,a)):void 0},removeData:function(a){return this.each(function(){m.removeData(this,a)})}}),m.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=m._data(a,b),c&&(!d||m.isArray(c)?d=m._data(a,b,m.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=m.queue(a,b),d=c.length,e=c.shift(),f=m._queueHooks(a,b),g=function(){m.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return m._data(a,c)||m._data(a,c,{empty:m.Callbacks("once memory").add(function(){m._removeData(a,b+"queue"),m._removeData(a,c)})})}}),m.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?m.queue(this[0],a):void 0===b?this:this.each(function(){var c=m.queue(this,a,b);m._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&m.dequeue(this,a)})},dequeue:function(a){return this.each(function(){m.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=m.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=m._data(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var S=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,T=["Top","Right","Bottom","Left"],U=function(a,b){return a=b||a,"none"===m.css(a,"display")||!m.contains(a.ownerDocument,a)},V=m.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===m.type(c)){e=!0;for(h in c)m.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,m.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(m(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},W=/^(?:checkbox|radio)$/i;!function(){var a=y.createElement("input"),b=y.createElement("div"),c=y.createDocumentFragment();if(b.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",k.leadingWhitespace=3===b.firstChild.nodeType,k.tbody=!b.getElementsByTagName("tbody").length,k.htmlSerialize=!!b.getElementsByTagName("link").length,k.html5Clone="<:nav></:nav>"!==y.createElement("nav").cloneNode(!0).outerHTML,a.type="checkbox",a.checked=!0,c.appendChild(a),k.appendChecked=a.checked,b.innerHTML="<textarea>x</textarea>",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,c.appendChild(b),b.innerHTML="<input type='radio' checked='checked' name='t'/>",k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,k.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){k.noCloneEvent=!1}),b.cloneNode(!0).click()),null==k.deleteExpando){k.deleteExpando=!0;try{delete b.test}catch(d){k.deleteExpando=!1}}}(),function(){var b,c,d=y.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(k[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),k[b+"Bubbles"]=d.attributes[c].expando===!1);d=null}();var X=/^(?:input|select|textarea)$/i,Y=/^key/,Z=/^(?:mouse|pointer|contextmenu)|click/,$=/^(?:focusinfocus|focusoutblur)$/,_=/^([^.]*)(?:\.(.+)|)$/;function ab(){return!0}function bb(){return!1}function cb(){try{return y.activeElement}catch(a){}}m.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=m.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof m===K||a&&m.event.triggered===a.type?void 0:m.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(E)||[""],h=b.length;while(h--)f=_.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=m.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=m.event.special[o]||{},l=m.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&m.expr.match.needsContext.test(e),namespace:p.join(".")},i),(n=g[o])||(n=g[o]=[],n.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?n.splice(n.delegateCount++,0,l):n.push(l),m.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m.hasData(a)&&m._data(a);if(r&&(k=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=_.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=m.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,n=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=n.length;while(f--)g=n[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(n.splice(f,1),g.selector&&n.delegateCount--,l.remove&&l.remove.call(a,g));i&&!n.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||m.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)m.event.remove(a,o+b[j],c,d,!0);m.isEmptyObject(k)&&(delete r.handle,m._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,n,o=[d||y],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||y,3!==d.nodeType&&8!==d.nodeType&&!$.test(p+m.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[m.expando]?b:new m.Event(p,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=q.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:m.makeArray(c,[b]),k=m.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!m.isWindow(d)){for(i=k.delegateType||p,$.test(i+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),l=h;l===(d.ownerDocument||y)&&o.push(l.defaultView||l.parentWindow||a)}n=0;while((h=o[n++])&&!b.isPropagationStopped())b.type=n>1?i:k.bindType||p,f=(m._data(h,"events")||{})[b.type]&&m._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&m.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault());if(b.type=p,!e&&!b.isDefaultPrevented()&&(!k._default||k._default.apply(o.pop(),c)===!1)&&m.acceptData(d)&&g&&d[p]&&!m.isWindow(d)){l=d[g],l&&(d[g]=null),m.event.triggered=p;try{d[p]()}catch(r){}m.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=m.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(m._data(this,"events")||{})[a.type]||[],k=m.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=m.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((m.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(e=[],f=0;h>f;f++)d=b[f],c=d.selector+" ",void 0===e[c]&&(e[c]=d.needsContext?m(c,this).index(i)>=0:m.find(c,this,null,[i]).length),e[c]&&e.push(d);e.length&&g.push({elem:i,handlers:e})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},fix:function(a){if(a[m.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=Z.test(e)?this.mouseHooks:Y.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new m.Event(f),b=d.length;while(b--)c=d[b],a[c]=f[c];return a.target||(a.target=f.srcElement||y),3===a.target.nodeType&&(a.target=a.target.parentNode),a.metaKey=!!a.metaKey,g.filter?g.filter(a,f):a},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button,g=b.fromElement;return null==a.pageX&&null!=b.clientX&&(d=a.target.ownerDocument||y,e=d.documentElement,c=d.body,a.pageX=b.clientX+(e&&e.scrollLeft||c&&c.scrollLeft||0)-(e&&e.clientLeft||c&&c.clientLeft||0),a.pageY=b.clientY+(e&&e.scrollTop||c&&c.scrollTop||0)-(e&&e.clientTop||c&&c.clientTop||0)),!a.relatedTarget&&g&&(a.relatedTarget=g===a.target?b.toElement:g),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==cb()&&this.focus)try{return this.focus(),!1}catch(a){}},delegateType:"focusin"},blur:{trigger:function(){return this===cb()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return m.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):void 0},_default:function(a){return m.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=m.extend(new m.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?m.event.trigger(e,null,b):m.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},m.removeEvent=y.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){var d="on"+b;a.detachEvent&&(typeof a[d]===K&&(a[d]=null),a.detachEvent(d,c))},m.Event=function(a,b){return this instanceof m.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?ab:bb):this.type=a,b&&m.extend(this,b),this.timeStamp=a&&a.timeStamp||m.now(),void(this[m.expando]=!0)):new m.Event(a,b)},m.Event.prototype={isDefaultPrevented:bb,isPropagationStopped:bb,isImmediatePropagationStopped:bb,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=ab,a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=ab,a&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=ab,a&&a.stopImmediatePropagation&&a.stopImmediatePropagation(),this.stopPropagation()}},m.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){m.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!m.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),k.submitBubbles||(m.event.special.submit={setup:function(){return m.nodeName(this,"form")?!1:void m.event.add(this,"click._submit keypress._submit",function(a){var b=a.target,c=m.nodeName(b,"input")||m.nodeName(b,"button")?b.form:void 0;c&&!m._data(c,"submitBubbles")&&(m.event.add(c,"submit._submit",function(a){a._submit_bubble=!0}),m._data(c,"submitBubbles",!0))})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&m.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){return m.nodeName(this,"form")?!1:void m.event.remove(this,"._submit")}}),k.changeBubbles||(m.event.special.change={setup:function(){return X.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(m.event.add(this,"propertychange._change",function(a){"checked"===a.originalEvent.propertyName&&(this._just_changed=!0)}),m.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1),m.event.simulate("change",this,a,!0)})),!1):void m.event.add(this,"beforeactivate._change",function(a){var b=a.target;X.test(b.nodeName)&&!m._data(b,"changeBubbles")&&(m.event.add(b,"change._change",function(a){!this.parentNode||a.isSimulated||a.isTrigger||m.event.simulate("change",this.parentNode,a,!0)}),m._data(b,"changeBubbles",!0))})},handle:function(a){var b=a.target;return this!==b||a.isSimulated||a.isTrigger||"radio"!==b.type&&"checkbox"!==b.type?a.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return m.event.remove(this,"._change"),!X.test(this.nodeName)}}),k.focusinBubbles||m.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){m.event.simulate(b,a.target,m.event.fix(a),!0)};m.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=m._data(d,b);e||d.addEventListener(a,c,!0),m._data(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=m._data(d,b)-1;e?m._data(d,b,e):(d.removeEventListener(a,c,!0),m._removeData(d,b))}}}),m.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(f in a)this.on(f,b,c,a[f],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=bb;else if(!d)return this;return 1===e&&(g=d,d=function(a){return m().off(a),g.apply(this,arguments)},d.guid=g.guid||(g.guid=m.guid++)),this.each(function(){m.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,m(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return(b===!1||"function"==typeof b)&&(c=b,b=void 0),c===!1&&(c=bb),this.each(function(){m.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){m.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?m.event.trigger(a,b,c,!0):void 0}});function db(a){var b=eb.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}var eb="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",fb=/ jQuery\d+="(?:null|\d+)"/g,gb=new RegExp("<(?:"+eb+")[\\s/>]","i"),hb=/^\s+/,ib=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,jb=/<([\w:]+)/,kb=/<tbody/i,lb=/<|&#?\w+;/,mb=/<(?:script|style|link)/i,nb=/checked\s*(?:[^=]|=\s*.checked.)/i,ob=/^$|\/(?:java|ecma)script/i,pb=/^true\/(.*)/,qb=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,rb={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:k.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},sb=db(y),tb=sb.appendChild(y.createElement("div"));rb.optgroup=rb.option,rb.tbody=rb.tfoot=rb.colgroup=rb.caption=rb.thead,rb.th=rb.td;function ub(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==K?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==K?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||m.nodeName(d,b)?f.push(d):m.merge(f,ub(d,b));return void 0===b||b&&m.nodeName(a,b)?m.merge([a],f):f}function vb(a){W.test(a.type)&&(a.defaultChecked=a.checked)}function wb(a,b){return m.nodeName(a,"table")&&m.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function xb(a){return a.type=(null!==m.find.attr(a,"type"))+"/"+a.type,a}function yb(a){var b=pb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function zb(a,b){for(var c,d=0;null!=(c=a[d]);d++)m._data(c,"globalEval",!b||m._data(b[d],"globalEval"))}function Ab(a,b){if(1===b.nodeType&&m.hasData(a)){var c,d,e,f=m._data(a),g=m._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)m.event.add(b,c,h[c][d])}g.data&&(g.data=m.extend({},g.data))}}function Bb(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!k.noCloneEvent&&b[m.expando]){e=m._data(b);for(d in e.events)m.removeEvent(b,d,e.handle);b.removeAttribute(m.expando)}"script"===c&&b.text!==a.text?(xb(b).text=a.text,yb(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),k.html5Clone&&a.innerHTML&&!m.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&W.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}m.extend({clone:function(a,b,c){var d,e,f,g,h,i=m.contains(a.ownerDocument,a);if(k.html5Clone||m.isXMLDoc(a)||!gb.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(tb.innerHTML=a.outerHTML,tb.removeChild(f=tb.firstChild)),!(k.noCloneEvent&&k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||m.isXMLDoc(a)))for(d=ub(f),h=ub(a),g=0;null!=(e=h[g]);++g)d[g]&&Bb(e,d[g]);if(b)if(c)for(h=h||ub(a),d=d||ub(f),g=0;null!=(e=h[g]);g++)Ab(e,d[g]);else Ab(a,f);return d=ub(f,"script"),d.length>0&&zb(d,!i&&ub(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,l,n=a.length,o=db(b),p=[],q=0;n>q;q++)if(f=a[q],f||0===f)if("object"===m.type(f))m.merge(p,f.nodeType?[f]:f);else if(lb.test(f)){h=h||o.appendChild(b.createElement("div")),i=(jb.exec(f)||["",""])[1].toLowerCase(),l=rb[i]||rb._default,h.innerHTML=l[1]+f.replace(ib,"<$1></$2>")+l[2],e=l[0];while(e--)h=h.lastChild;if(!k.leadingWhitespace&&hb.test(f)&&p.push(b.createTextNode(hb.exec(f)[0])),!k.tbody){f="table"!==i||kb.test(f)?"<table>"!==l[1]||kb.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--)m.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}m.merge(p,h.childNodes),h.textContent="";while(h.firstChild)h.removeChild(h.firstChild);h=o.lastChild}else p.push(b.createTextNode(f));h&&o.removeChild(h),k.appendChecked||m.grep(ub(p,"input"),vb),q=0;while(f=p[q++])if((!d||-1===m.inArray(f,d))&&(g=m.contains(f.ownerDocument,f),h=ub(o.appendChild(f),"script"),g&&zb(h),c)){e=0;while(f=h[e++])ob.test(f.type||"")&&c.push(f)}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=m.expando,j=m.cache,l=k.deleteExpando,n=m.event.special;null!=(d=a[h]);h++)if((b||m.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)n[e]?m.event.remove(d,e):m.removeEvent(d,e,g.handle);j[f]&&(delete j[f],l?delete d[i]:typeof d.removeAttribute!==K?d.removeAttribute(i):d[i]=null,c.push(f))}}}),m.fn.extend({text:function(a){return V(this,function(a){return void 0===a?m.text(this):this.empty().append((this[0]&&this[0].ownerDocument||y).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?m.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||m.cleanData(ub(c)),c.parentNode&&(b&&m.contains(c.ownerDocument,c)&&zb(ub(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&m.cleanData(ub(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&m.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return m.clone(this,a,b)})},html:function(a){return V(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(fb,""):void 0;if(!("string"!=typeof a||mb.test(a)||!k.htmlSerialize&&gb.test(a)||!k.leadingWhitespace&&hb.test(a)||rb[(jb.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(ib,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(m.cleanData(ub(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,m.cleanData(ub(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,n=this,o=l-1,p=a[0],q=m.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&nb.test(p))return this.each(function(c){var d=n.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(i=m.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=m.map(ub(i,"script"),xb),f=g.length;l>j;j++)d=i,j!==o&&(d=m.clone(d,!0,!0),f&&m.merge(g,ub(d,"script"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,m.map(g,yb),j=0;f>j;j++)d=g[j],ob.test(d.type||"")&&!m._data(d,"globalEval")&&m.contains(h,d)&&(d.src?m._evalUrl&&m._evalUrl(d.src):m.globalEval((d.text||d.textContent||d.innerHTML||"").replace(qb,"")));i=c=null}return this}}),m.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){m.fn[a]=function(a){for(var c,d=0,e=[],g=m(a),h=g.length-1;h>=d;d++)c=d===h?this:this.clone(!0),m(g[d])[b](c),f.apply(e,c.get());return this.pushStack(e)}});var Cb,Db={};function Eb(b,c){var d,e=m(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:m.css(e[0],"display");return e.detach(),f}function Fb(a){var b=y,c=Db[a];return c||(c=Eb(a,b),"none"!==c&&c||(Cb=(Cb||m("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=(Cb[0].contentWindow||Cb[0].contentDocument).document,b.write(),b.close(),c=Eb(a,b),Cb.detach()),Db[a]=c),c}!function(){var a;k.shrinkWrapBlocks=function(){if(null!=a)return a;a=!1;var b,c,d;return c=y.getElementsByTagName("body")[0],c&&c.style?(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:1px;width:1px;zoom:1",b.appendChild(y.createElement("div")).style.width="5px",a=3!==b.offsetWidth),c.removeChild(d),a):void 0}}();var Gb=/^margin/,Hb=new RegExp("^("+S+")(?!px)[a-z%]+$","i"),Ib,Jb,Kb=/^(top|right|bottom|left)$/;a.getComputedStyle?(Ib=function(a){return a.ownerDocument.defaultView.getComputedStyle(a,null)},Jb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ib(a),g=c?c.getPropertyValue(b)||c[b]:void 0,c&&(""!==g||m.contains(a.ownerDocument,a)||(g=m.style(a,b)),Hb.test(g)&&Gb.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0===g?g:g+""}):y.documentElement.currentStyle&&(Ib=function(a){return a.currentStyle},Jb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ib(a),g=c?c[b]:void 0,null==g&&h&&h[b]&&(g=h[b]),Hb.test(g)&&!Kb.test(b)&&(d=h.left,e=a.runtimeStyle,f=e&&e.left,f&&(e.left=a.currentStyle.left),h.left="fontSize"===b?"1em":g,g=h.pixelLeft+"px",h.left=d,f&&(e.left=f)),void 0===g?g:g+""||"auto"});function Lb(a,b){return{get:function(){var c=a();if(null!=c)return c?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d,e,f,g,h;if(b=y.createElement("div"),b.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",d=b.getElementsByTagName("a")[0],c=d&&d.style){c.cssText="float:left;opacity:.5",k.opacity="0.5"===c.opacity,k.cssFloat=!!c.cssFloat,b.style.backgroundClip="content-box",b.cloneNode(!0).style.backgroundClip="",k.clearCloneStyle="content-box"===b.style.backgroundClip,k.boxSizing=""===c.boxSizing||""===c.MozBoxSizing||""===c.WebkitBoxSizing,m.extend(k,{reliableHiddenOffsets:function(){return null==g&&i(),g},boxSizingReliable:function(){return null==f&&i(),f},pixelPosition:function(){return null==e&&i(),e},reliableMarginRight:function(){return null==h&&i(),h}});function i(){var b,c,d,i;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),b.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",e=f=!1,h=!0,a.getComputedStyle&&(e="1%"!==(a.getComputedStyle(b,null)||{}).top,f="4px"===(a.getComputedStyle(b,null)||{width:"4px"}).width,i=b.appendChild(y.createElement("div")),i.style.cssText=b.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",i.style.marginRight=i.style.width="0",b.style.width="1px",h=!parseFloat((a.getComputedStyle(i,null)||{}).marginRight)),b.innerHTML="<table><tr><td></td><td>t</td></tr></table>",i=b.getElementsByTagName("td"),i[0].style.cssText="margin:0;border:0;padding:0;display:none",g=0===i[0].offsetHeight,g&&(i[0].style.display="",i[1].style.display="none",g=0===i[0].offsetHeight),c.removeChild(d))}}}(),m.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var Mb=/alpha\([^)]*\)/i,Nb=/opacity\s*=\s*([^)]*)/,Ob=/^(none|table(?!-c[ea]).+)/,Pb=new RegExp("^("+S+")(.*)$","i"),Qb=new RegExp("^([+-])=("+S+")","i"),Rb={position:"absolute",visibility:"hidden",display:"block"},Sb={letterSpacing:"0",fontWeight:"400"},Tb=["Webkit","O","Moz","ms"];function Ub(a,b){if(b in a)return b;var c=b.charAt(0).toUpperCase()+b.slice(1),d=b,e=Tb.length;while(e--)if(b=Tb[e]+c,b in a)return b;return d}function Vb(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=m._data(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&U(d)&&(f[g]=m._data(d,"olddisplay",Fb(d.nodeName)))):(e=U(d),(c&&"none"!==c||!e)&&m._data(d,"olddisplay",e?c:m.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}function Wb(a,b,c){var d=Pb.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Xb(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=m.css(a,c+T[f],!0,e)),d?("content"===c&&(g-=m.css(a,"padding"+T[f],!0,e)),"margin"!==c&&(g-=m.css(a,"border"+T[f]+"Width",!0,e))):(g+=m.css(a,"padding"+T[f],!0,e),"padding"!==c&&(g+=m.css(a,"border"+T[f]+"Width",!0,e)));return g}function Yb(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=Ib(a),g=k.boxSizing&&"border-box"===m.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=Jb(a,b,f),(0>e||null==e)&&(e=a.style[b]),Hb.test(e))return e;d=g&&(k.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Xb(a,b,c||(g?"border":"content"),d,f)+"px"}m.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Jb(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":k.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=m.camelCase(b),i=a.style;if(b=m.cssProps[h]||(m.cssProps[h]=Ub(i,h)),g=m.cssHooks[b]||m.cssHooks[h],void 0===c)return g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b];if(f=typeof c,"string"===f&&(e=Qb.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(m.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||m.cssNumber[h]||(c+="px"),k.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),!(g&&"set"in g&&void 0===(c=g.set(a,c,d)))))try{i[b]=c}catch(j){}}},css:function(a,b,c,d){var e,f,g,h=m.camelCase(b);return b=m.cssProps[h]||(m.cssProps[h]=Ub(a.style,h)),g=m.cssHooks[b]||m.cssHooks[h],g&&"get"in g&&(f=g.get(a,!0,c)),void 0===f&&(f=Jb(a,b,d)),"normal"===f&&b in Sb&&(f=Sb[b]),""===c||c?(e=parseFloat(f),c===!0||m.isNumeric(e)?e||0:f):f}}),m.each(["height","width"],function(a,b){m.cssHooks[b]={get:function(a,c,d){return c?Ob.test(m.css(a,"display"))&&0===a.offsetWidth?m.swap(a,Rb,function(){return Yb(a,b,d)}):Yb(a,b,d):void 0},set:function(a,c,d){var e=d&&Ib(a);return Wb(a,c,d?Xb(a,b,d,k.boxSizing&&"border-box"===m.css(a,"boxSizing",!1,e),e):0)}}}),k.opacity||(m.cssHooks.opacity={get:function(a,b){return Nb.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=m.isNumeric(b)?"alpha(opacity="+100*b+")":"",f=d&&d.filter||c.filter||"";c.zoom=1,(b>=1||""===b)&&""===m.trim(f.replace(Mb,""))&&c.removeAttribute&&(c.removeAttribute("filter"),""===b||d&&!d.filter)||(c.filter=Mb.test(f)?f.replace(Mb,e):f+" "+e)}}),m.cssHooks.marginRight=Lb(k.reliableMarginRight,function(a,b){return b?m.swap(a,{display:"inline-block"},Jb,[a,"marginRight"]):void 0}),m.each({margin:"",padding:"",border:"Width"},function(a,b){m.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+T[d]+b]=f[d]||f[d-2]||f[0];return e}},Gb.test(a)||(m.cssHooks[a+b].set=Wb)}),m.fn.extend({css:function(a,b){return V(this,function(a,b,c){var d,e,f={},g=0;if(m.isArray(b)){for(d=Ib(a),e=b.length;e>g;g++)f[b[g]]=m.css(a,b[g],!1,d);return f}return void 0!==c?m.style(a,b,c):m.css(a,b)},a,b,arguments.length>1)},show:function(){return Vb(this,!0)},hide:function(){return Vb(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){U(this)?m(this).show():m(this).hide()})}});function Zb(a,b,c,d,e){return new Zb.prototype.init(a,b,c,d,e)}m.Tween=Zb,Zb.prototype={constructor:Zb,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(m.cssNumber[c]?"":"px")
4
- },cur:function(){var a=Zb.propHooks[this.prop];return a&&a.get?a.get(this):Zb.propHooks._default.get(this)},run:function(a){var b,c=Zb.propHooks[this.prop];return this.pos=b=this.options.duration?m.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Zb.propHooks._default.set(this),this}},Zb.prototype.init.prototype=Zb.prototype,Zb.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=m.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){m.fx.step[a.prop]?m.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[m.cssProps[a.prop]]||m.cssHooks[a.prop])?m.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},Zb.propHooks.scrollTop=Zb.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},m.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},m.fx=Zb.prototype.init,m.fx.step={};var $b,_b,ac=/^(?:toggle|show|hide)$/,bc=new RegExp("^(?:([+-])=|)("+S+")([a-z%]*)$","i"),cc=/queueHooks$/,dc=[ic],ec={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=bc.exec(b),f=e&&e[3]||(m.cssNumber[a]?"":"px"),g=(m.cssNumber[a]||"px"!==f&&+d)&&bc.exec(m.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,m.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function fc(){return setTimeout(function(){$b=void 0}),$b=m.now()}function gc(a,b){var c,d={height:a},e=0;for(b=b?1:0;4>e;e+=2-b)c=T[e],d["margin"+c]=d["padding"+c]=a;return b&&(d.opacity=d.width=a),d}function hc(a,b,c){for(var d,e=(ec[b]||[]).concat(ec["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function ic(a,b,c){var d,e,f,g,h,i,j,l,n=this,o={},p=a.style,q=a.nodeType&&U(a),r=m._data(a,"fxshow");c.queue||(h=m._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,n.always(function(){n.always(function(){h.unqueued--,m.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[p.overflow,p.overflowX,p.overflowY],j=m.css(a,"display"),l="none"===j?m._data(a,"olddisplay")||Fb(a.nodeName):j,"inline"===l&&"none"===m.css(a,"float")&&(k.inlineBlockNeedsLayout&&"inline"!==Fb(a.nodeName)?p.zoom=1:p.display="inline-block")),c.overflow&&(p.overflow="hidden",k.shrinkWrapBlocks()||n.always(function(){p.overflow=c.overflow[0],p.overflowX=c.overflow[1],p.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],ac.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(q?"hide":"show")){if("show"!==e||!r||void 0===r[d])continue;q=!0}o[d]=r&&r[d]||m.style(a,d)}else j=void 0;if(m.isEmptyObject(o))"inline"===("none"===j?Fb(a.nodeName):j)&&(p.display=j);else{r?"hidden"in r&&(q=r.hidden):r=m._data(a,"fxshow",{}),f&&(r.hidden=!q),q?m(a).show():n.done(function(){m(a).hide()}),n.done(function(){var b;m._removeData(a,"fxshow");for(b in o)m.style(a,b,o[b])});for(d in o)g=hc(q?r[d]:0,d,n),d in r||(r[d]=g.start,q&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function jc(a,b){var c,d,e,f,g;for(c in a)if(d=m.camelCase(c),e=b[d],f=a[c],m.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=m.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function kc(a,b,c){var d,e,f=0,g=dc.length,h=m.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=$b||fc(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:m.extend({},b),opts:m.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:$b||fc(),duration:c.duration,tweens:[],createTween:function(b,c){var d=m.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(jc(k,j.opts.specialEasing);g>f;f++)if(d=dc[f].call(j,a,k,j.opts))return d;return m.map(k,hc,j),m.isFunction(j.opts.start)&&j.opts.start.call(a,j),m.fx.timer(m.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}m.Animation=m.extend(kc,{tweener:function(a,b){m.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],ec[c]=ec[c]||[],ec[c].unshift(b)},prefilter:function(a,b){b?dc.unshift(a):dc.push(a)}}),m.speed=function(a,b,c){var d=a&&"object"==typeof a?m.extend({},a):{complete:c||!c&&b||m.isFunction(a)&&a,duration:a,easing:c&&b||b&&!m.isFunction(b)&&b};return d.duration=m.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in m.fx.speeds?m.fx.speeds[d.duration]:m.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){m.isFunction(d.old)&&d.old.call(this),d.queue&&m.dequeue(this,d.queue)},d},m.fn.extend({fadeTo:function(a,b,c,d){return this.filter(U).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=m.isEmptyObject(a),f=m.speed(b,c,d),g=function(){var b=kc(this,m.extend({},a),f);(e||m._data(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=m.timers,g=m._data(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&cc.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&m.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=m._data(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=m.timers,g=d?d.length:0;for(c.finish=!0,m.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),m.each(["toggle","show","hide"],function(a,b){var c=m.fn[b];m.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(gc(b,!0),a,d,e)}}),m.each({slideDown:gc("show"),slideUp:gc("hide"),slideToggle:gc("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){m.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),m.timers=[],m.fx.tick=function(){var a,b=m.timers,c=0;for($b=m.now();c<b.length;c++)a=b[c],a()||b[c]!==a||b.splice(c--,1);b.length||m.fx.stop(),$b=void 0},m.fx.timer=function(a){m.timers.push(a),a()?m.fx.start():m.timers.pop()},m.fx.interval=13,m.fx.start=function(){_b||(_b=setInterval(m.fx.tick,m.fx.interval))},m.fx.stop=function(){clearInterval(_b),_b=null},m.fx.speeds={slow:600,fast:200,_default:400},m.fn.delay=function(a,b){return a=m.fx?m.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a,b,c,d,e;b=y.createElement("div"),b.setAttribute("className","t"),b.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",d=b.getElementsByTagName("a")[0],c=y.createElement("select"),e=c.appendChild(y.createElement("option")),a=b.getElementsByTagName("input")[0],d.style.cssText="top:1px",k.getSetAttribute="t"!==b.className,k.style=/top/.test(d.getAttribute("style")),k.hrefNormalized="/a"===d.getAttribute("href"),k.checkOn=!!a.value,k.optSelected=e.selected,k.enctype=!!y.createElement("form").enctype,c.disabled=!0,k.optDisabled=!e.disabled,a=y.createElement("input"),a.setAttribute("value",""),k.input=""===a.getAttribute("value"),a.value="t",a.setAttribute("type","radio"),k.radioValue="t"===a.value}();var lc=/\r/g;m.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=m.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,m(this).val()):a,null==e?e="":"number"==typeof e?e+="":m.isArray(e)&&(e=m.map(e,function(a){return null==a?"":a+""})),b=m.valHooks[this.type]||m.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=m.valHooks[e.type]||m.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(lc,""):null==c?"":c)}}}),m.extend({valHooks:{option:{get:function(a){var b=m.find.attr(a,"value");return null!=b?b:m.trim(m.text(a))}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(k.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&m.nodeName(c.parentNode,"optgroup"))){if(b=m(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=m.makeArray(b),g=e.length;while(g--)if(d=e[g],m.inArray(m.valHooks.option.get(d),f)>=0)try{d.selected=c=!0}catch(h){d.scrollHeight}else d.selected=!1;return c||(a.selectedIndex=-1),e}}}}),m.each(["radio","checkbox"],function(){m.valHooks[this]={set:function(a,b){return m.isArray(b)?a.checked=m.inArray(m(a).val(),b)>=0:void 0}},k.checkOn||(m.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var mc,nc,oc=m.expr.attrHandle,pc=/^(?:checked|selected)$/i,qc=k.getSetAttribute,rc=k.input;m.fn.extend({attr:function(a,b){return V(this,m.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){m.removeAttr(this,a)})}}),m.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===K?m.prop(a,b,c):(1===f&&m.isXMLDoc(a)||(b=b.toLowerCase(),d=m.attrHooks[b]||(m.expr.match.bool.test(b)?nc:mc)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=m.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void m.removeAttr(a,b))},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(E);if(f&&1===a.nodeType)while(c=f[e++])d=m.propFix[c]||c,m.expr.match.bool.test(c)?rc&&qc||!pc.test(c)?a[d]=!1:a[m.camelCase("default-"+c)]=a[d]=!1:m.attr(a,c,""),a.removeAttribute(qc?c:d)},attrHooks:{type:{set:function(a,b){if(!k.radioValue&&"radio"===b&&m.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),nc={set:function(a,b,c){return b===!1?m.removeAttr(a,c):rc&&qc||!pc.test(c)?a.setAttribute(!qc&&m.propFix[c]||c,c):a[m.camelCase("default-"+c)]=a[c]=!0,c}},m.each(m.expr.match.bool.source.match(/\w+/g),function(a,b){var c=oc[b]||m.find.attr;oc[b]=rc&&qc||!pc.test(b)?function(a,b,d){var e,f;return d||(f=oc[b],oc[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,oc[b]=f),e}:function(a,b,c){return c?void 0:a[m.camelCase("default-"+b)]?b.toLowerCase():null}}),rc&&qc||(m.attrHooks.value={set:function(a,b,c){return m.nodeName(a,"input")?void(a.defaultValue=b):mc&&mc.set(a,b,c)}}),qc||(mc={set:function(a,b,c){var d=a.getAttributeNode(c);return d||a.setAttributeNode(d=a.ownerDocument.createAttribute(c)),d.value=b+="","value"===c||b===a.getAttribute(c)?b:void 0}},oc.id=oc.name=oc.coords=function(a,b,c){var d;return c?void 0:(d=a.getAttributeNode(b))&&""!==d.value?d.value:null},m.valHooks.button={get:function(a,b){var c=a.getAttributeNode(b);return c&&c.specified?c.value:void 0},set:mc.set},m.attrHooks.contenteditable={set:function(a,b,c){mc.set(a,""===b?!1:b,c)}},m.each(["width","height"],function(a,b){m.attrHooks[b]={set:function(a,c){return""===c?(a.setAttribute(b,"auto"),c):void 0}}})),k.style||(m.attrHooks.style={get:function(a){return a.style.cssText||void 0},set:function(a,b){return a.style.cssText=b+""}});var sc=/^(?:input|select|textarea|button|object)$/i,tc=/^(?:a|area)$/i;m.fn.extend({prop:function(a,b){return V(this,m.prop,a,b,arguments.length>1)},removeProp:function(a){return a=m.propFix[a]||a,this.each(function(){try{this[a]=void 0,delete this[a]}catch(b){}})}}),m.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!m.isXMLDoc(a),f&&(b=m.propFix[b]||b,e=m.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=m.find.attr(a,"tabindex");return b?parseInt(b,10):sc.test(a.nodeName)||tc.test(a.nodeName)&&a.href?0:-1}}}}),k.hrefNormalized||m.each(["href","src"],function(a,b){m.propHooks[b]={get:function(a){return a.getAttribute(b,4)}}}),k.optSelected||(m.propHooks.selected={get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}}),m.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){m.propFix[this.toLowerCase()]=this}),k.enctype||(m.propFix.enctype="encoding");var uc=/[\t\r\n\f]/g;m.fn.extend({addClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j="string"==typeof a&&a;if(m.isFunction(a))return this.each(function(b){m(this).addClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(E)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(uc," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=m.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j=0===arguments.length||"string"==typeof a&&a;if(m.isFunction(a))return this.each(function(b){m(this).removeClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(E)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(uc," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?m.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(m.isFunction(a)?function(c){m(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=m(this),f=a.match(E)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===K||"boolean"===c)&&(this.className&&m._data(this,"__className__",this.className),this.className=this.className||a===!1?"":m._data(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(uc," ").indexOf(b)>=0)return!0;return!1}}),m.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){m.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),m.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var vc=m.now(),wc=/\?/,xc=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;m.parseJSON=function(b){if(a.JSON&&a.JSON.parse)return a.JSON.parse(b+"");var c,d=null,e=m.trim(b+"");return e&&!m.trim(e.replace(xc,function(a,b,e,f){return c&&b&&(d=0),0===d?a:(c=e||b,d+=!f-!e,"")}))?Function("return "+e)():m.error("Invalid JSON: "+b)},m.parseXML=function(b){var c,d;if(!b||"string"!=typeof b)return null;try{a.DOMParser?(d=new DOMParser,c=d.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b))}catch(e){c=void 0}return c&&c.documentElement&&!c.getElementsByTagName("parsererror").length||m.error("Invalid XML: "+b),c};var yc,zc,Ac=/#.*$/,Bc=/([?&])_=[^&]*/,Cc=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Dc=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Ec=/^(?:GET|HEAD)$/,Fc=/^\/\//,Gc=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Hc={},Ic={},Jc="*/".concat("*");try{zc=location.href}catch(Kc){zc=y.createElement("a"),zc.href="",zc=zc.href}yc=Gc.exec(zc.toLowerCase())||[];function Lc(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(E)||[];if(m.isFunction(c))while(d=f[e++])"+"===d.charAt(0)?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function Mc(a,b,c,d){var e={},f=a===Ic;function g(h){var i;return e[h]=!0,m.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function Nc(a,b){var c,d,e=m.ajaxSettings.flatOptions||{};for(d in b)void 0!==b[d]&&((e[d]?a:c||(c={}))[d]=b[d]);return c&&m.extend(!0,a,c),a}function Oc(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===e&&(e=a.mimeType||b.getResponseHeader("Content-Type"));if(e)for(g in h)if(h[g]&&h[g].test(e)){i.unshift(g);break}if(i[0]in c)f=i[0];else{for(g in c){if(!i[0]||a.converters[g+" "+i[0]]){f=g;break}d||(d=g)}f=f||d}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function Pc(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}m.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:zc,type:"GET",isLocal:Dc.test(yc[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Jc,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":m.parseJSON,"text xml":m.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Nc(Nc(a,m.ajaxSettings),b):Nc(m.ajaxSettings,a)},ajaxPrefilter:Lc(Hc),ajaxTransport:Lc(Ic),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=m.ajaxSetup({},b),l=k.context||k,n=k.context&&(l.nodeType||l.jquery)?m(l):m.event,o=m.Deferred(),p=m.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!j){j={};while(b=Cc.exec(f))j[b[1].toLowerCase()]=b[2]}b=j[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?f:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return i&&i.abort(b),x(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||zc)+"").replace(Ac,"").replace(Fc,yc[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=m.trim(k.dataType||"*").toLowerCase().match(E)||[""],null==k.crossDomain&&(c=Gc.exec(k.url.toLowerCase()),k.crossDomain=!(!c||c[1]===yc[1]&&c[2]===yc[2]&&(c[3]||("http:"===c[1]?"80":"443"))===(yc[3]||("http:"===yc[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=m.param(k.data,k.traditional)),Mc(Hc,k,b,v),2===t)return v;h=k.global,h&&0===m.active++&&m.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!Ec.test(k.type),e=k.url,k.hasContent||(k.data&&(e=k.url+=(wc.test(e)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=Bc.test(e)?e.replace(Bc,"$1_="+vc++):e+(wc.test(e)?"&":"?")+"_="+vc++)),k.ifModified&&(m.lastModified[e]&&v.setRequestHeader("If-Modified-Since",m.lastModified[e]),m.etag[e]&&v.setRequestHeader("If-None-Match",m.etag[e])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+Jc+"; q=0.01":""):k.accepts["*"]);for(d in k.headers)v.setRequestHeader(d,k.headers[d]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u="abort";for(d in{success:1,error:1,complete:1})v[d](k[d]);if(i=Mc(Ic,k,b,v)){v.readyState=1,h&&n.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,i.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,c,d){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),i=void 0,f=d||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,c&&(u=Oc(k,v,c)),u=Pc(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(m.lastModified[e]=w),w=v.getResponseHeader("etag"),w&&(m.etag[e]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?o.resolveWith(l,[r,x,v]):o.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,h&&n.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),h&&(n.trigger("ajaxComplete",[v,k]),--m.active||m.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return m.get(a,b,c,"json")},getScript:function(a,b){return m.get(a,void 0,b,"script")}}),m.each(["get","post"],function(a,b){m[b]=function(a,c,d,e){return m.isFunction(c)&&(e=e||d,d=c,c=void 0),m.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),m.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){m.fn[b]=function(a){return this.on(b,a)}}),m._evalUrl=function(a){return m.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},m.fn.extend({wrapAll:function(a){if(m.isFunction(a))return this.each(function(b){m(this).wrapAll(a.call(this,b))});if(this[0]){var b=m(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&1===a.firstChild.nodeType)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return this.each(m.isFunction(a)?function(b){m(this).wrapInner(a.call(this,b))}:function(){var b=m(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=m.isFunction(a);return this.each(function(c){m(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){m.nodeName(this,"body")||m(this).replaceWith(this.childNodes)}).end()}}),m.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0||!k.reliableHiddenOffsets()&&"none"===(a.style&&a.style.display||m.css(a,"display"))},m.expr.filters.visible=function(a){return!m.expr.filters.hidden(a)};var Qc=/%20/g,Rc=/\[\]$/,Sc=/\r?\n/g,Tc=/^(?:submit|button|image|reset|file)$/i,Uc=/^(?:input|select|textarea|keygen)/i;function Vc(a,b,c,d){var e;if(m.isArray(b))m.each(b,function(b,e){c||Rc.test(a)?d(a,e):Vc(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==m.type(b))d(a,b);else for(e in b)Vc(a+"["+e+"]",b[e],c,d)}m.param=function(a,b){var c,d=[],e=function(a,b){b=m.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=m.ajaxSettings&&m.ajaxSettings.traditional),m.isArray(a)||a.jquery&&!m.isPlainObject(a))m.each(a,function(){e(this.name,this.value)});else for(c in a)Vc(c,a[c],b,e);return d.join("&").replace(Qc,"+")},m.fn.extend({serialize:function(){return m.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=m.prop(this,"elements");return a?m.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!m(this).is(":disabled")&&Uc.test(this.nodeName)&&!Tc.test(a)&&(this.checked||!W.test(a))}).map(function(a,b){var c=m(this).val();return null==c?null:m.isArray(c)?m.map(c,function(a){return{name:b.name,value:a.replace(Sc,"\r\n")}}):{name:b.name,value:c.replace(Sc,"\r\n")}}).get()}}),m.ajaxSettings.xhr=void 0!==a.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&Zc()||$c()}:Zc;var Wc=0,Xc={},Yc=m.ajaxSettings.xhr();a.ActiveXObject&&m(a).on("unload",function(){for(var a in Xc)Xc[a](void 0,!0)}),k.cors=!!Yc&&"withCredentials"in Yc,Yc=k.ajax=!!Yc,Yc&&m.ajaxTransport(function(a){if(!a.crossDomain||k.cors){var b;return{send:function(c,d){var e,f=a.xhr(),g=++Wc;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)void 0!==c[e]&&f.setRequestHeader(e,c[e]+"");f.send(a.hasContent&&a.data||null),b=function(c,e){var h,i,j;if(b&&(e||4===f.readyState))if(delete Xc[g],b=void 0,f.onreadystatechange=m.noop,e)4!==f.readyState&&f.abort();else{j={},h=f.status,"string"==typeof f.responseText&&(j.text=f.responseText);try{i=f.statusText}catch(k){i=""}h||!a.isLocal||a.crossDomain?1223===h&&(h=204):h=j.text?200:404}j&&d(h,i,j,f.getAllResponseHeaders())},a.async?4===f.readyState?setTimeout(b):f.onreadystatechange=Xc[g]=b:b()},abort:function(){b&&b(void 0,!0)}}}});function Zc(){try{return new a.XMLHttpRequest}catch(b){}}function $c(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}m.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return m.globalEval(a),a}}}),m.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),m.ajaxTransport("script",function(a){if(a.crossDomain){var b,c=y.head||m("head")[0]||y.documentElement;return{send:function(d,e){b=y.createElement("script"),b.async=!0,a.scriptCharset&&(b.charset=a.scriptCharset),b.src=a.url,b.onload=b.onreadystatechange=function(a,c){(c||!b.readyState||/loaded|complete/.test(b.readyState))&&(b.onload=b.onreadystatechange=null,b.parentNode&&b.parentNode.removeChild(b),b=null,c||e(200,"success"))},c.insertBefore(b,c.firstChild)},abort:function(){b&&b.onload(void 0,!0)}}}});var _c=[],ad=/(=)\?(?=&|$)|\?\?/;m.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=_c.pop()||m.expando+"_"+vc++;return this[a]=!0,a}}),m.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(ad.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&ad.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=m.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(ad,"$1"+e):b.jsonp!==!1&&(b.url+=(wc.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||m.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,_c.push(e)),g&&m.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),m.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||y;var d=u.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=m.buildFragment([a],b,e),e&&e.length&&m(e).remove(),m.merge([],d.childNodes))};var bd=m.fn.load;m.fn.load=function(a,b,c){if("string"!=typeof a&&bd)return bd.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=m.trim(a.slice(h,a.length)),a=a.slice(0,h)),m.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(f="POST"),g.length>0&&m.ajax({url:a,type:f,dataType:"html",data:b}).done(function(a){e=arguments,g.html(d?m("<div>").append(m.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,e||[a.responseText,b,a])}),this},m.expr.filters.animated=function(a){return m.grep(m.timers,function(b){return a===b.elem}).length};var cd=a.document.documentElement;function dd(a){return m.isWindow(a)?a:9===a.nodeType?a.defaultView||a.parentWindow:!1}m.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=m.css(a,"position"),l=m(a),n={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=m.css(a,"top"),i=m.css(a,"left"),j=("absolute"===k||"fixed"===k)&&m.inArray("auto",[f,i])>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),m.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(n.top=b.top-h.top+g),null!=b.left&&(n.left=b.left-h.left+e),"using"in b?b.using.call(a,n):l.css(n)}},m.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){m.offset.setOffset(this,a,b)});var b,c,d={top:0,left:0},e=this[0],f=e&&e.ownerDocument;if(f)return b=f.documentElement,m.contains(b,e)?(typeof e.getBoundingClientRect!==K&&(d=e.getBoundingClientRect()),c=dd(f),{top:d.top+(c.pageYOffset||b.scrollTop)-(b.clientTop||0),left:d.left+(c.pageXOffset||b.scrollLeft)-(b.clientLeft||0)}):d},position:function(){if(this[0]){var a,b,c={top:0,left:0},d=this[0];return"fixed"===m.css(d,"position")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),m.nodeName(a[0],"html")||(c=a.offset()),c.top+=m.css(a[0],"borderTopWidth",!0),c.left+=m.css(a[0],"borderLeftWidth",!0)),{top:b.top-c.top-m.css(d,"marginTop",!0),left:b.left-c.left-m.css(d,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||cd;while(a&&!m.nodeName(a,"html")&&"static"===m.css(a,"position"))a=a.offsetParent;return a||cd})}}),m.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c=/Y/.test(b);m.fn[a]=function(d){return V(this,function(a,d,e){var f=dd(a);return void 0===e?f?b in f?f[b]:f.document.documentElement[d]:a[d]:void(f?f.scrollTo(c?m(f).scrollLeft():e,c?e:m(f).scrollTop()):a[d]=e)},a,d,arguments.length,null)}}),m.each(["top","left"],function(a,b){m.cssHooks[b]=Lb(k.pixelPosition,function(a,c){return c?(c=Jb(a,b),Hb.test(c)?m(a).position()[b]+"px":c):void 0})}),m.each({Height:"height",Width:"width"},function(a,b){m.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){m.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return V(this,function(b,c,d){var e;return m.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?m.css(b,c,g):m.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),m.fn.size=function(){return this.length},m.fn.andSelf=m.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return m});var ed=a.jQuery,fd=a.$;return m.noConflict=function(b){return a.$===m&&(a.$=fd),b&&a.jQuery===m&&(a.jQuery=ed),m},typeof b===K&&(a.jQuery=a.$=m),m});
 
 
 
 
 
docs/_build/html/_static/minus.png DELETED
Binary file (173 Bytes)
 
docs/_build/html/_static/plus.png DELETED
Binary file (173 Bytes)
 
docs/_build/html/_static/pygments.css DELETED
@@ -1,63 +0,0 @@
1
- .highlight .hll { background-color: #ffffcc }
2
- .highlight { background: #eeffcc; }
3
- .highlight .c { color: #408090; font-style: italic } /* Comment */
4
- .highlight .err { border: 1px solid #FF0000 } /* Error */
5
- .highlight .k { color: #007020; font-weight: bold } /* Keyword */
6
- .highlight .o { color: #666666 } /* Operator */
7
- .highlight .cm { color: #408090; font-style: italic } /* Comment.Multiline */
8
- .highlight .cp { color: #007020 } /* Comment.Preproc */
9
- .highlight .c1 { color: #408090; font-style: italic } /* Comment.Single */
10
- .highlight .cs { color: #408090; background-color: #fff0f0 } /* Comment.Special */
11
- .highlight .gd { color: #A00000 } /* Generic.Deleted */
12
- .highlight .ge { font-style: italic } /* Generic.Emph */
13
- .highlight .gr { color: #FF0000 } /* Generic.Error */
14
- .highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */
15
- .highlight .gi { color: #00A000 } /* Generic.Inserted */
16
- .highlight .go { color: #333333 } /* Generic.Output */
17
- .highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */
18
- .highlight .gs { font-weight: bold } /* Generic.Strong */
19
- .highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
20
- .highlight .gt { color: #0044DD } /* Generic.Traceback */
21
- .highlight .kc { color: #007020; font-weight: bold } /* Keyword.Constant */
22
- .highlight .kd { color: #007020; font-weight: bold } /* Keyword.Declaration */
23
- .highlight .kn { color: #007020; font-weight: bold } /* Keyword.Namespace */
24
- .highlight .kp { color: #007020 } /* Keyword.Pseudo */
25
- .highlight .kr { color: #007020; font-weight: bold } /* Keyword.Reserved */
26
- .highlight .kt { color: #902000 } /* Keyword.Type */
27
- .highlight .m { color: #208050 } /* Literal.Number */
28
- .highlight .s { color: #4070a0 } /* Literal.String */
29
- .highlight .na { color: #4070a0 } /* Name.Attribute */
30
- .highlight .nb { color: #007020 } /* Name.Builtin */
31
- .highlight .nc { color: #0e84b5; font-weight: bold } /* Name.Class */
32
- .highlight .no { color: #60add5 } /* Name.Constant */
33
- .highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */
34
- .highlight .ni { color: #d55537; font-weight: bold } /* Name.Entity */
35
- .highlight .ne { color: #007020 } /* Name.Exception */
36
- .highlight .nf { color: #06287e } /* Name.Function */
37
- .highlight .nl { color: #002070; font-weight: bold } /* Name.Label */
38
- .highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */
39
- .highlight .nt { color: #062873; font-weight: bold } /* Name.Tag */
40
- .highlight .nv { color: #bb60d5 } /* Name.Variable */
41
- .highlight .ow { color: #007020; font-weight: bold } /* Operator.Word */
42
- .highlight .w { color: #bbbbbb } /* Text.Whitespace */
43
- .highlight .mb { color: #208050 } /* Literal.Number.Bin */
44
- .highlight .mf { color: #208050 } /* Literal.Number.Float */
45
- .highlight .mh { color: #208050 } /* Literal.Number.Hex */
46
- .highlight .mi { color: #208050 } /* Literal.Number.Integer */
47
- .highlight .mo { color: #208050 } /* Literal.Number.Oct */
48
- .highlight .sb { color: #4070a0 } /* Literal.String.Backtick */
49
- .highlight .sc { color: #4070a0 } /* Literal.String.Char */
50
- .highlight .sd { color: #4070a0; font-style: italic } /* Literal.String.Doc */
51
- .highlight .s2 { color: #4070a0 } /* Literal.String.Double */
52
- .highlight .se { color: #4070a0; font-weight: bold } /* Literal.String.Escape */
53
- .highlight .sh { color: #4070a0 } /* Literal.String.Heredoc */
54
- .highlight .si { color: #70a0d0; font-style: italic } /* Literal.String.Interpol */
55
- .highlight .sx { color: #c65d09 } /* Literal.String.Other */
56
- .highlight .sr { color: #235388 } /* Literal.String.Regex */
57
- .highlight .s1 { color: #4070a0 } /* Literal.String.Single */
58
- .highlight .ss { color: #517918 } /* Literal.String.Symbol */
59
- .highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */
60
- .highlight .vc { color: #bb60d5 } /* Name.Variable.Class */
61
- .highlight .vg { color: #bb60d5 } /* Name.Variable.Global */
62
- .highlight .vi { color: #bb60d5 } /* Name.Variable.Instance */
63
- .highlight .il { color: #208050 } /* Literal.Number.Integer.Long */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docs/_build/html/_static/searchtools.js DELETED
@@ -1,622 +0,0 @@
1
- /*
2
- * searchtools.js_t
3
- * ~~~~~~~~~~~~~~~~
4
- *
5
- * Sphinx JavaScript utilties for the full-text search.
6
- *
7
- * :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS.
8
- * :license: BSD, see LICENSE for details.
9
- *
10
- */
11
-
12
-
13
- /**
14
- * Porter Stemmer
15
- */
16
- var Stemmer = function() {
17
-
18
- var step2list = {
19
- ational: 'ate',
20
- tional: 'tion',
21
- enci: 'ence',
22
- anci: 'ance',
23
- izer: 'ize',
24
- bli: 'ble',
25
- alli: 'al',
26
- entli: 'ent',
27
- eli: 'e',
28
- ousli: 'ous',
29
- ization: 'ize',
30
- ation: 'ate',
31
- ator: 'ate',
32
- alism: 'al',
33
- iveness: 'ive',
34
- fulness: 'ful',
35
- ousness: 'ous',
36
- aliti: 'al',
37
- iviti: 'ive',
38
- biliti: 'ble',
39
- logi: 'log'
40
- };
41
-
42
- var step3list = {
43
- icate: 'ic',
44
- ative: '',
45
- alize: 'al',
46
- iciti: 'ic',
47
- ical: 'ic',
48
- ful: '',
49
- ness: ''
50
- };
51
-
52
- var c = "[^aeiou]"; // consonant
53
- var v = "[aeiouy]"; // vowel
54
- var C = c + "[^aeiouy]*"; // consonant sequence
55
- var V = v + "[aeiou]*"; // vowel sequence
56
-
57
- var mgr0 = "^(" + C + ")?" + V + C; // [C]VC... is m>0
58
- var meq1 = "^(" + C + ")?" + V + C + "(" + V + ")?$"; // [C]VC[V] is m=1
59
- var mgr1 = "^(" + C + ")?" + V + C + V + C; // [C]VCVC... is m>1
60
- var s_v = "^(" + C + ")?" + v; // vowel in stem
61
-
62
- this.stemWord = function (w) {
63
- var stem;
64
- var suffix;
65
- var firstch;
66
- var origword = w;
67
-
68
- if (w.length < 3)
69
- return w;
70
-
71
- var re;
72
- var re2;
73
- var re3;
74
- var re4;
75
-
76
- firstch = w.substr(0,1);
77
- if (firstch == "y")
78
- w = firstch.toUpperCase() + w.substr(1);
79
-
80
- // Step 1a
81
- re = /^(.+?)(ss|i)es$/;
82
- re2 = /^(.+?)([^s])s$/;
83
-
84
- if (re.test(w))
85
- w = w.replace(re,"$1$2");
86
- else if (re2.test(w))
87
- w = w.replace(re2,"$1$2");
88
-
89
- // Step 1b
90
- re = /^(.+?)eed$/;
91
- re2 = /^(.+?)(ed|ing)$/;
92
- if (re.test(w)) {
93
- var fp = re.exec(w);
94
- re = new RegExp(mgr0);
95
- if (re.test(fp[1])) {
96
- re = /.$/;
97
- w = w.replace(re,"");
98
- }
99
- }
100
- else if (re2.test(w)) {
101
- var fp = re2.exec(w);
102
- stem = fp[1];
103
- re2 = new RegExp(s_v);
104
- if (re2.test(stem)) {
105
- w = stem;
106
- re2 = /(at|bl|iz)$/;
107
- re3 = new RegExp("([^aeiouylsz])\\1$");
108
- re4 = new RegExp("^" + C + v + "[^aeiouwxy]$");
109
- if (re2.test(w))
110
- w = w + "e";
111
- else if (re3.test(w)) {
112
- re = /.$/;
113
- w = w.replace(re,"");
114
- }
115
- else if (re4.test(w))
116
- w = w + "e";
117
- }
118
- }
119
-
120
- // Step 1c
121
- re = /^(.+?)y$/;
122
- if (re.test(w)) {
123
- var fp = re.exec(w);
124
- stem = fp[1];
125
- re = new RegExp(s_v);
126
- if (re.test(stem))
127
- w = stem + "i";
128
- }
129
-
130
- // Step 2
131
- re = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/;
132
- if (re.test(w)) {
133
- var fp = re.exec(w);
134
- stem = fp[1];
135
- suffix = fp[2];
136
- re = new RegExp(mgr0);
137
- if (re.test(stem))
138
- w = stem + step2list[suffix];
139
- }
140
-
141
- // Step 3
142
- re = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/;
143
- if (re.test(w)) {
144
- var fp = re.exec(w);
145
- stem = fp[1];
146
- suffix = fp[2];
147
- re = new RegExp(mgr0);
148
- if (re.test(stem))
149
- w = stem + step3list[suffix];
150
- }
151
-
152
- // Step 4
153
- re = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/;
154
- re2 = /^(.+?)(s|t)(ion)$/;
155
- if (re.test(w)) {
156
- var fp = re.exec(w);
157
- stem = fp[1];
158
- re = new RegExp(mgr1);
159
- if (re.test(stem))
160
- w = stem;
161
- }
162
- else if (re2.test(w)) {
163
- var fp = re2.exec(w);
164
- stem = fp[1] + fp[2];
165
- re2 = new RegExp(mgr1);
166
- if (re2.test(stem))
167
- w = stem;
168
- }
169
-
170
- // Step 5
171
- re = /^(.+?)e$/;
172
- if (re.test(w)) {
173
- var fp = re.exec(w);
174
- stem = fp[1];
175
- re = new RegExp(mgr1);
176
- re2 = new RegExp(meq1);
177
- re3 = new RegExp("^" + C + v + "[^aeiouwxy]$");
178
- if (re.test(stem) || (re2.test(stem) && !(re3.test(stem))))
179
- w = stem;
180
- }
181
- re = /ll$/;
182
- re2 = new RegExp(mgr1);
183
- if (re.test(w) && re2.test(w)) {
184
- re = /.$/;
185
- w = w.replace(re,"");
186
- }
187
-
188
- // and turn initial Y back to y
189
- if (firstch == "y")
190
- w = firstch.toLowerCase() + w.substr(1);
191
- return w;
192
- }
193
- }
194
-
195
-
196
-
197
- /**
198
- * Simple result scoring code.
199
- */
200
- var Scorer = {
201
- // Implement the following function to further tweak the score for each result
202
- // The function takes a result array [filename, title, anchor, descr, score]
203
- // and returns the new score.
204
- /*
205
- score: function(result) {
206
- return result[4];
207
- },
208
- */
209
-
210
- // query matches the full name of an object
211
- objNameMatch: 11,
212
- // or matches in the last dotted part of the object name
213
- objPartialMatch: 6,
214
- // Additive scores depending on the priority of the object
215
- objPrio: {0: 15, // used to be importantResults
216
- 1: 5, // used to be objectResults
217
- 2: -5}, // used to be unimportantResults
218
- // Used when the priority is not in the mapping.
219
- objPrioDefault: 0,
220
-
221
- // query found in title
222
- title: 15,
223
- // query found in terms
224
- term: 5
225
- };
226
-
227
-
228
- /**
229
- * Search Module
230
- */
231
- var Search = {
232
-
233
- _index : null,
234
- _queued_query : null,
235
- _pulse_status : -1,
236
-
237
- init : function() {
238
- var params = $.getQueryParameters();
239
- if (params.q) {
240
- var query = params.q[0];
241
- $('input[name="q"]')[0].value = query;
242
- this.performSearch(query);
243
- }
244
- },
245
-
246
- loadIndex : function(url) {
247
- $.ajax({type: "GET", url: url, data: null,
248
- dataType: "script", cache: true,
249
- complete: function(jqxhr, textstatus) {
250
- if (textstatus != "success") {
251
- document.getElementById("searchindexloader").src = url;
252
- }
253
- }});
254
- },
255
-
256
- setIndex : function(index) {
257
- var q;
258
- this._index = index;
259
- if ((q = this._queued_query) !== null) {
260
- this._queued_query = null;
261
- Search.query(q);
262
- }
263
- },
264
-
265
- hasIndex : function() {
266
- return this._index !== null;
267
- },
268
-
269
- deferQuery : function(query) {
270
- this._queued_query = query;
271
- },
272
-
273
- stopPulse : function() {
274
- this._pulse_status = 0;
275
- },
276
-
277
- startPulse : function() {
278
- if (this._pulse_status >= 0)
279
- return;
280
- function pulse() {
281
- var i;
282
- Search._pulse_status = (Search._pulse_status + 1) % 4;
283
- var dotString = '';
284
- for (i = 0; i < Search._pulse_status; i++)
285
- dotString += '.';
286
- Search.dots.text(dotString);
287
- if (Search._pulse_status > -1)
288
- window.setTimeout(pulse, 500);
289
- }
290
- pulse();
291
- },
292
-
293
- /**
294
- * perform a search for something (or wait until index is loaded)
295
- */
296
- performSearch : function(query) {
297
- // create the required interface elements
298
- this.out = $('#search-results');
299
- this.title = $('<h2>' + _('Searching') + '</h2>').appendTo(this.out);
300
- this.dots = $('<span></span>').appendTo(this.title);
301
- this.status = $('<p style="display: none"></p>').appendTo(this.out);
302
- this.output = $('<ul class="search"/>').appendTo(this.out);
303
-
304
- $('#search-progress').text(_('Preparing search...'));
305
- this.startPulse();
306
-
307
- // index already loaded, the browser was quick!
308
- if (this.hasIndex())
309
- this.query(query);
310
- else
311
- this.deferQuery(query);
312
- },
313
-
314
- /**
315
- * execute search (requires search index to be loaded)
316
- */
317
- query : function(query) {
318
- var i;
319
- var stopwords = ["a","and","are","as","at","be","but","by","for","if","in","into","is","it","near","no","not","of","on","or","such","that","the","their","then","there","these","they","this","to","was","will","with"];
320
-
321
- // stem the searchterms and add them to the correct list
322
- var stemmer = new Stemmer();
323
- var searchterms = [];
324
- var excluded = [];
325
- var hlterms = [];
326
- var tmp = query.split(/\s+/);
327
- var objectterms = [];
328
- for (i = 0; i < tmp.length; i++) {
329
- if (tmp[i] !== "") {
330
- objectterms.push(tmp[i].toLowerCase());
331
- }
332
-
333
- if ($u.indexOf(stopwords, tmp[i].toLowerCase()) != -1 || tmp[i].match(/^\d+$/) ||
334
- tmp[i] === "") {
335
- // skip this "word"
336
- continue;
337
- }
338
- // stem the word
339
- var word = stemmer.stemWord(tmp[i].toLowerCase());
340
- var toAppend;
341
- // select the correct list
342
- if (word[0] == '-') {
343
- toAppend = excluded;
344
- word = word.substr(1);
345
- }
346
- else {
347
- toAppend = searchterms;
348
- hlterms.push(tmp[i].toLowerCase());
349
- }
350
- // only add if not already in the list
351
- if (!$u.contains(toAppend, word))
352
- toAppend.push(word);
353
- }
354
- var highlightstring = '?highlight=' + $.urlencode(hlterms.join(" "));
355
-
356
- // console.debug('SEARCH: searching for:');
357
- // console.info('required: ', searchterms);
358
- // console.info('excluded: ', excluded);
359
-
360
- // prepare search
361
- var terms = this._index.terms;
362
- var titleterms = this._index.titleterms;
363
-
364
- // array of [filename, title, anchor, descr, score]
365
- var results = [];
366
- $('#search-progress').empty();
367
-
368
- // lookup as object
369
- for (i = 0; i < objectterms.length; i++) {
370
- var others = [].concat(objectterms.slice(0, i),
371
- objectterms.slice(i+1, objectterms.length));
372
- results = results.concat(this.performObjectSearch(objectterms[i], others));
373
- }
374
-
375
- // lookup as search terms in fulltext
376
- results = results.concat(this.performTermsSearch(searchterms, excluded, terms, Scorer.term))
377
- .concat(this.performTermsSearch(searchterms, excluded, titleterms, Scorer.title));
378
-
379
- // let the scorer override scores with a custom scoring function
380
- if (Scorer.score) {
381
- for (i = 0; i < results.length; i++)
382
- results[i][4] = Scorer.score(results[i]);
383
- }
384
-
385
- // now sort the results by score (in opposite order of appearance, since the
386
- // display function below uses pop() to retrieve items) and then
387
- // alphabetically
388
- results.sort(function(a, b) {
389
- var left = a[4];
390
- var right = b[4];
391
- if (left > right) {
392
- return 1;
393
- } else if (left < right) {
394
- return -1;
395
- } else {
396
- // same score: sort alphabetically
397
- left = a[1].toLowerCase();
398
- right = b[1].toLowerCase();
399
- return (left > right) ? -1 : ((left < right) ? 1 : 0);
400
- }
401
- });
402
-
403
- // for debugging
404
- //Search.lastresults = results.slice(); // a copy
405
- //console.info('search results:', Search.lastresults);
406
-
407
- // print the results
408
- var resultCount = results.length;
409
- function displayNextItem() {
410
- // results left, load the summary and display it
411
- if (results.length) {
412
- var item = results.pop();
413
- var listItem = $('<li style="display:none"></li>');
414
- if (DOCUMENTATION_OPTIONS.FILE_SUFFIX === '') {
415
- // dirhtml builder
416
- var dirname = item[0] + '/';
417
- if (dirname.match(/\/index\/$/)) {
418
- dirname = dirname.substring(0, dirname.length-6);
419
- } else if (dirname == 'index/') {
420
- dirname = '';
421
- }
422
- listItem.append($('<a/>').attr('href',
423
- DOCUMENTATION_OPTIONS.URL_ROOT + dirname +
424
- highlightstring + item[2]).html(item[1]));
425
- } else {
426
- // normal html builders
427
- listItem.append($('<a/>').attr('href',
428
- item[0] + DOCUMENTATION_OPTIONS.FILE_SUFFIX +
429
- highlightstring + item[2]).html(item[1]));
430
- }
431
- if (item[3]) {
432
- listItem.append($('<span> (' + item[3] + ')</span>'));
433
- Search.output.append(listItem);
434
- listItem.slideDown(5, function() {
435
- displayNextItem();
436
- });
437
- } else if (DOCUMENTATION_OPTIONS.HAS_SOURCE) {
438
- $.ajax({url: DOCUMENTATION_OPTIONS.URL_ROOT + '_sources/' + item[0] + '.txt',
439
- dataType: "text",
440
- complete: function(jqxhr, textstatus) {
441
- var data = jqxhr.responseText;
442
- if (data !== '' && data !== undefined) {
443
- listItem.append(Search.makeSearchSummary(data, searchterms, hlterms));
444
- }
445
- Search.output.append(listItem);
446
- listItem.slideDown(5, function() {
447
- displayNextItem();
448
- });
449
- }});
450
- } else {
451
- // no source available, just display title
452
- Search.output.append(listItem);
453
- listItem.slideDown(5, function() {
454
- displayNextItem();
455
- });
456
- }
457
- }
458
- // search finished, update title and status message
459
- else {
460
- Search.stopPulse();
461
- Search.title.text(_('Search Results'));
462
- if (!resultCount)
463
- Search.status.text(_('Your search did not match any documents. Please make sure that all words are spelled correctly and that you\'ve selected enough categories.'));
464
- else
465
- Search.status.text(_('Search finished, found %s page(s) matching the search query.').replace('%s', resultCount));
466
- Search.status.fadeIn(500);
467
- }
468
- }
469
- displayNextItem();
470
- },
471
-
472
- /**
473
- * search for object names
474
- */
475
- performObjectSearch : function(object, otherterms) {
476
- var filenames = this._index.filenames;
477
- var objects = this._index.objects;
478
- var objnames = this._index.objnames;
479
- var titles = this._index.titles;
480
-
481
- var i;
482
- var results = [];
483
-
484
- for (var prefix in objects) {
485
- for (var name in objects[prefix]) {
486
- var fullname = (prefix ? prefix + '.' : '') + name;
487
- if (fullname.toLowerCase().indexOf(object) > -1) {
488
- var score = 0;
489
- var parts = fullname.split('.');
490
- // check for different match types: exact matches of full name or
491
- // "last name" (i.e. last dotted part)
492
- if (fullname == object || parts[parts.length - 1] == object) {
493
- score += Scorer.objNameMatch;
494
- // matches in last name
495
- } else if (parts[parts.length - 1].indexOf(object) > -1) {
496
- score += Scorer.objPartialMatch;
497
- }
498
- var match = objects[prefix][name];
499
- var objname = objnames[match[1]][2];
500
- var title = titles[match[0]];
501
- // If more than one term searched for, we require other words to be
502
- // found in the name/title/description
503
- if (otherterms.length > 0) {
504
- var haystack = (prefix + ' ' + name + ' ' +
505
- objname + ' ' + title).toLowerCase();
506
- var allfound = true;
507
- for (i = 0; i < otherterms.length; i++) {
508
- if (haystack.indexOf(otherterms[i]) == -1) {
509
- allfound = false;
510
- break;
511
- }
512
- }
513
- if (!allfound) {
514
- continue;
515
- }
516
- }
517
- var descr = objname + _(', in ') + title;
518
-
519
- var anchor = match[3];
520
- if (anchor === '')
521
- anchor = fullname;
522
- else if (anchor == '-')
523
- anchor = objnames[match[1]][1] + '-' + fullname;
524
- // add custom score for some objects according to scorer
525
- if (Scorer.objPrio.hasOwnProperty(match[2])) {
526
- score += Scorer.objPrio[match[2]];
527
- } else {
528
- score += Scorer.objPrioDefault;
529
- }
530
- results.push([filenames[match[0]], fullname, '#'+anchor, descr, score]);
531
- }
532
- }
533
- }
534
-
535
- return results;
536
- },
537
-
538
- /**
539
- * search for full-text terms in the index
540
- */
541
- performTermsSearch : function(searchterms, excluded, terms, score) {
542
- var filenames = this._index.filenames;
543
- var titles = this._index.titles;
544
-
545
- var i, j, file, files;
546
- var fileMap = {};
547
- var results = [];
548
-
549
- // perform the search on the required terms
550
- for (i = 0; i < searchterms.length; i++) {
551
- var word = searchterms[i];
552
- // no match but word was a required one
553
- if ((files = terms[word]) === undefined)
554
- break;
555
- if (files.length === undefined) {
556
- files = [files];
557
- }
558
- // create the mapping
559
- for (j = 0; j < files.length; j++) {
560
- file = files[j];
561
- if (file in fileMap)
562
- fileMap[file].push(word);
563
- else
564
- fileMap[file] = [word];
565
- }
566
- }
567
-
568
- // now check if the files don't contain excluded terms
569
- for (file in fileMap) {
570
- var valid = true;
571
-
572
- // check if all requirements are matched
573
- if (fileMap[file].length != searchterms.length)
574
- continue;
575
-
576
- // ensure that none of the excluded terms is in the search result
577
- for (i = 0; i < excluded.length; i++) {
578
- if (terms[excluded[i]] == file ||
579
- $u.contains(terms[excluded[i]] || [], file)) {
580
- valid = false;
581
- break;
582
- }
583
- }
584
-
585
- // if we have still a valid result we can add it to the result list
586
- if (valid) {
587
- results.push([filenames[file], titles[file], '', null, score]);
588
- }
589
- }
590
- return results;
591
- },
592
-
593
- /**
594
- * helper function to return a node containing the
595
- * search summary for a given text. keywords is a list
596
- * of stemmed words, hlwords is the list of normal, unstemmed
597
- * words. the first one is used to find the occurance, the
598
- * latter for highlighting it.
599
- */
600
- makeSearchSummary : function(text, keywords, hlwords) {
601
- var textLower = text.toLowerCase();
602
- var start = 0;
603
- $.each(keywords, function() {
604
- var i = textLower.indexOf(this.toLowerCase());
605
- if (i > -1)
606
- start = i;
607
- });
608
- start = Math.max(start - 120, 0);
609
- var excerpt = ((start > 0) ? '...' : '') +
610
- $.trim(text.substr(start, 240)) +
611
- ((start + 240 - text.length) ? '...' : '');
612
- var rv = $('<div class="context"></div>').text(excerpt);
613
- $.each(hlwords, function() {
614
- rv = rv.highlightText(this, 'highlighted');
615
- });
616
- return rv;
617
- }
618
- };
619
-
620
- $(document).ready(function() {
621
- Search.init();
622
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docs/_build/html/_static/sidebar.js DELETED
@@ -1,159 +0,0 @@
1
- /*
2
- * sidebar.js
3
- * ~~~~~~~~~~
4
- *
5
- * This script makes the Sphinx sidebar collapsible.
6
- *
7
- * .sphinxsidebar contains .sphinxsidebarwrapper. This script adds
8
- * in .sphixsidebar, after .sphinxsidebarwrapper, the #sidebarbutton
9
- * used to collapse and expand the sidebar.
10
- *
11
- * When the sidebar is collapsed the .sphinxsidebarwrapper is hidden
12
- * and the width of the sidebar and the margin-left of the document
13
- * are decreased. When the sidebar is expanded the opposite happens.
14
- * This script saves a per-browser/per-session cookie used to
15
- * remember the position of the sidebar among the pages.
16
- * Once the browser is closed the cookie is deleted and the position
17
- * reset to the default (expanded).
18
- *
19
- * :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS.
20
- * :license: BSD, see LICENSE for details.
21
- *
22
- */
23
-
24
- $(function() {
25
-
26
-
27
-
28
-
29
-
30
-
31
-
32
-
33
- // global elements used by the functions.
34
- // the 'sidebarbutton' element is defined as global after its
35
- // creation, in the add_sidebar_button function
36
- var bodywrapper = $('.bodywrapper');
37
- var sidebar = $('.sphinxsidebar');
38
- var sidebarwrapper = $('.sphinxsidebarwrapper');
39
-
40
- // for some reason, the document has no sidebar; do not run into errors
41
- if (!sidebar.length) return;
42
-
43
- // original margin-left of the bodywrapper and width of the sidebar
44
- // with the sidebar expanded
45
- var bw_margin_expanded = bodywrapper.css('margin-left');
46
- var ssb_width_expanded = sidebar.width();
47
-
48
- // margin-left of the bodywrapper and width of the sidebar
49
- // with the sidebar collapsed
50
- var bw_margin_collapsed = '.8em';
51
- var ssb_width_collapsed = '.8em';
52
-
53
- // colors used by the current theme
54
- var dark_color = $('.related').css('background-color');
55
- var light_color = $('.document').css('background-color');
56
-
57
- function sidebar_is_collapsed() {
58
- return sidebarwrapper.is(':not(:visible)');
59
- }
60
-
61
- function toggle_sidebar() {
62
- if (sidebar_is_collapsed())
63
- expand_sidebar();
64
- else
65
- collapse_sidebar();
66
- }
67
-
68
- function collapse_sidebar() {
69
- sidebarwrapper.hide();
70
- sidebar.css('width', ssb_width_collapsed);
71
- bodywrapper.css('margin-left', bw_margin_collapsed);
72
- sidebarbutton.css({
73
- 'margin-left': '0',
74
- 'height': bodywrapper.height()
75
- });
76
- sidebarbutton.find('span').text('»');
77
- sidebarbutton.attr('title', _('Expand sidebar'));
78
- document.cookie = 'sidebar=collapsed';
79
- }
80
-
81
- function expand_sidebar() {
82
- bodywrapper.css('margin-left', bw_margin_expanded);
83
- sidebar.css('width', ssb_width_expanded);
84
- sidebarwrapper.show();
85
- sidebarbutton.css({
86
- 'margin-left': ssb_width_expanded-12,
87
- 'height': bodywrapper.height()
88
- });
89
- sidebarbutton.find('span').text('«');
90
- sidebarbutton.attr('title', _('Collapse sidebar'));
91
- document.cookie = 'sidebar=expanded';
92
- }
93
-
94
- function add_sidebar_button() {
95
- sidebarwrapper.css({
96
- 'float': 'left',
97
- 'margin-right': '0',
98
- 'width': ssb_width_expanded - 28
99
- });
100
- // create the button
101
- sidebar.append(
102
- '<div id="sidebarbutton"><span>&laquo;</span></div>'
103
- );
104
- var sidebarbutton = $('#sidebarbutton');
105
- light_color = sidebarbutton.css('background-color');
106
- // find the height of the viewport to center the '<<' in the page
107
- var viewport_height;
108
- if (window.innerHeight)
109
- viewport_height = window.innerHeight;
110
- else
111
- viewport_height = $(window).height();
112
- sidebarbutton.find('span').css({
113
- 'display': 'block',
114
- 'margin-top': (viewport_height - sidebar.position().top - 20) / 2
115
- });
116
-
117
- sidebarbutton.click(toggle_sidebar);
118
- sidebarbutton.attr('title', _('Collapse sidebar'));
119
- sidebarbutton.css({
120
- 'color': '#FFFFFF',
121
- 'border-left': '1px solid ' + dark_color,
122
- 'font-size': '1.2em',
123
- 'cursor': 'pointer',
124
- 'height': bodywrapper.height(),
125
- 'padding-top': '1px',
126
- 'margin-left': ssb_width_expanded - 12
127
- });
128
-
129
- sidebarbutton.hover(
130
- function () {
131
- $(this).css('background-color', dark_color);
132
- },
133
- function () {
134
- $(this).css('background-color', light_color);
135
- }
136
- );
137
- }
138
-
139
- function set_position_from_cookie() {
140
- if (!document.cookie)
141
- return;
142
- var items = document.cookie.split(';');
143
- for(var k=0; k<items.length; k++) {
144
- var key_val = items[k].split('=');
145
- var key = key_val[0].replace(/ /, ""); // strip leading spaces
146
- if (key == 'sidebar') {
147
- var value = key_val[1];
148
- if ((value == 'collapsed') && (!sidebar_is_collapsed()))
149
- collapse_sidebar();
150
- else if ((value == 'expanded') && (sidebar_is_collapsed()))
151
- expand_sidebar();
152
- }
153
- }
154
- }
155
-
156
- add_sidebar_button();
157
- var sidebarbutton = $('#sidebarbutton');
158
- set_position_from_cookie();
159
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docs/_build/html/_static/underscore-1.3.1.js DELETED
@@ -1,999 +0,0 @@
1
- // Underscore.js 1.3.1
2
- // (c) 2009-2012 Jeremy Ashkenas, DocumentCloud Inc.
3
- // Underscore is freely distributable under the MIT license.
4
- // Portions of Underscore are inspired or borrowed from Prototype,
5
- // Oliver Steele's Functional, and John Resig's Micro-Templating.
6
- // For all details and documentation:
7
- // http://documentcloud.github.com/underscore
8
-
9
- (function() {
10
-
11
- // Baseline setup
12
- // --------------
13
-
14
- // Establish the root object, `window` in the browser, or `global` on the server.
15
- var root = this;
16
-
17
- // Save the previous value of the `_` variable.
18
- var previousUnderscore = root._;
19
-
20
- // Establish the object that gets returned to break out of a loop iteration.
21
- var breaker = {};
22
-
23
- // Save bytes in the minified (but not gzipped) version:
24
- var ArrayProto = Array.prototype, ObjProto = Object.prototype, FuncProto = Function.prototype;
25
-
26
- // Create quick reference variables for speed access to core prototypes.
27
- var slice = ArrayProto.slice,
28
- unshift = ArrayProto.unshift,
29
- toString = ObjProto.toString,
30
- hasOwnProperty = ObjProto.hasOwnProperty;
31
-
32
- // All **ECMAScript 5** native function implementations that we hope to use
33
- // are declared here.
34
- var
35
- nativeForEach = ArrayProto.forEach,
36
- nativeMap = ArrayProto.map,
37
- nativeReduce = ArrayProto.reduce,
38
- nativeReduceRight = ArrayProto.reduceRight,
39
- nativeFilter = ArrayProto.filter,
40
- nativeEvery = ArrayProto.every,
41
- nativeSome = ArrayProto.some,
42
- nativeIndexOf = ArrayProto.indexOf,
43
- nativeLastIndexOf = ArrayProto.lastIndexOf,
44
- nativeIsArray = Array.isArray,
45
- nativeKeys = Object.keys,
46
- nativeBind = FuncProto.bind;
47
-
48
- // Create a safe reference to the Underscore object for use below.
49
- var _ = function(obj) { return new wrapper(obj); };
50
-
51
- // Export the Underscore object for **Node.js**, with
52
- // backwards-compatibility for the old `require()` API. If we're in
53
- // the browser, add `_` as a global object via a string identifier,
54
- // for Closure Compiler "advanced" mode.
55
- if (typeof exports !== 'undefined') {
56
- if (typeof module !== 'undefined' && module.exports) {
57
- exports = module.exports = _;
58
- }
59
- exports._ = _;
60
- } else {
61
- root['_'] = _;
62
- }
63
-
64
- // Current version.
65
- _.VERSION = '1.3.1';
66
-
67
- // Collection Functions
68
- // --------------------
69
-
70
- // The cornerstone, an `each` implementation, aka `forEach`.
71
- // Handles objects with the built-in `forEach`, arrays, and raw objects.
72
- // Delegates to **ECMAScript 5**'s native `forEach` if available.
73
- var each = _.each = _.forEach = function(obj, iterator, context) {
74
- if (obj == null) return;
75
- if (nativeForEach && obj.forEach === nativeForEach) {
76
- obj.forEach(iterator, context);
77
- } else if (obj.length === +obj.length) {
78
- for (var i = 0, l = obj.length; i < l; i++) {
79
- if (i in obj && iterator.call(context, obj[i], i, obj) === breaker) return;
80
- }
81
- } else {
82
- for (var key in obj) {
83
- if (_.has(obj, key)) {
84
- if (iterator.call(context, obj[key], key, obj) === breaker) return;
85
- }
86
- }
87
- }
88
- };
89
-
90
- // Return the results of applying the iterator to each element.
91
- // Delegates to **ECMAScript 5**'s native `map` if available.
92
- _.map = _.collect = function(obj, iterator, context) {
93
- var results = [];
94
- if (obj == null) return results;
95
- if (nativeMap && obj.map === nativeMap) return obj.map(iterator, context);
96
- each(obj, function(value, index, list) {
97
- results[results.length] = iterator.call(context, value, index, list);
98
- });
99
- if (obj.length === +obj.length) results.length = obj.length;
100
- return results;
101
- };
102
-
103
- // **Reduce** builds up a single result from a list of values, aka `inject`,
104
- // or `foldl`. Delegates to **ECMAScript 5**'s native `reduce` if available.
105
- _.reduce = _.foldl = _.inject = function(obj, iterator, memo, context) {
106
- var initial = arguments.length > 2;
107
- if (obj == null) obj = [];
108
- if (nativeReduce && obj.reduce === nativeReduce) {
109
- if (context) iterator = _.bind(iterator, context);
110
- return initial ? obj.reduce(iterator, memo) : obj.reduce(iterator);
111
- }
112
- each(obj, function(value, index, list) {
113
- if (!initial) {
114
- memo = value;
115
- initial = true;
116
- } else {
117
- memo = iterator.call(context, memo, value, index, list);
118
- }
119
- });
120
- if (!initial) throw new TypeError('Reduce of empty array with no initial value');
121
- return memo;
122
- };
123
-
124
- // The right-associative version of reduce, also known as `foldr`.
125
- // Delegates to **ECMAScript 5**'s native `reduceRight` if available.
126
- _.reduceRight = _.foldr = function(obj, iterator, memo, context) {
127
- var initial = arguments.length > 2;
128
- if (obj == null) obj = [];
129
- if (nativeReduceRight && obj.reduceRight === nativeReduceRight) {
130
- if (context) iterator = _.bind(iterator, context);
131
- return initial ? obj.reduceRight(iterator, memo) : obj.reduceRight(iterator);
132
- }
133
- var reversed = _.toArray(obj).reverse();
134
- if (context && !initial) iterator = _.bind(iterator, context);
135
- return initial ? _.reduce(reversed, iterator, memo, context) : _.reduce(reversed, iterator);
136
- };
137
-
138
- // Return the first value which passes a truth test. Aliased as `detect`.
139
- _.find = _.detect = function(obj, iterator, context) {
140
- var result;
141
- any(obj, function(value, index, list) {
142
- if (iterator.call(context, value, index, list)) {
143
- result = value;
144
- return true;
145
- }
146
- });
147
- return result;
148
- };
149
-
150
- // Return all the elements that pass a truth test.
151
- // Delegates to **ECMAScript 5**'s native `filter` if available.
152
- // Aliased as `select`.
153
- _.filter = _.select = function(obj, iterator, context) {
154
- var results = [];
155
- if (obj == null) return results;
156
- if (nativeFilter && obj.filter === nativeFilter) return obj.filter(iterator, context);
157
- each(obj, function(value, index, list) {
158
- if (iterator.call(context, value, index, list)) results[results.length] = value;
159
- });
160
- return results;
161
- };
162
-
163
- // Return all the elements for which a truth test fails.
164
- _.reject = function(obj, iterator, context) {
165
- var results = [];
166
- if (obj == null) return results;
167
- each(obj, function(value, index, list) {
168
- if (!iterator.call(context, value, index, list)) results[results.length] = value;
169
- });
170
- return results;
171
- };
172
-
173
- // Determine whether all of the elements match a truth test.
174
- // Delegates to **ECMAScript 5**'s native `every` if available.
175
- // Aliased as `all`.
176
- _.every = _.all = function(obj, iterator, context) {
177
- var result = true;
178
- if (obj == null) return result;
179
- if (nativeEvery && obj.every === nativeEvery) return obj.every(iterator, context);
180
- each(obj, function(value, index, list) {
181
- if (!(result = result && iterator.call(context, value, index, list))) return breaker;
182
- });
183
- return result;
184
- };
185
-
186
- // Determine if at least one element in the object matches a truth test.
187
- // Delegates to **ECMAScript 5**'s native `some` if available.
188
- // Aliased as `any`.
189
- var any = _.some = _.any = function(obj, iterator, context) {
190
- iterator || (iterator = _.identity);
191
- var result = false;
192
- if (obj == null) return result;
193
- if (nativeSome && obj.some === nativeSome) return obj.some(iterator, context);
194
- each(obj, function(value, index, list) {
195
- if (result || (result = iterator.call(context, value, index, list))) return breaker;
196
- });
197
- return !!result;
198
- };
199
-
200
- // Determine if a given value is included in the array or object using `===`.
201
- // Aliased as `contains`.
202
- _.include = _.contains = function(obj, target) {
203
- var found = false;
204
- if (obj == null) return found;
205
- if (nativeIndexOf && obj.indexOf === nativeIndexOf) return obj.indexOf(target) != -1;
206
- found = any(obj, function(value) {
207
- return value === target;
208
- });
209
- return found;
210
- };
211
-
212
- // Invoke a method (with arguments) on every item in a collection.
213
- _.invoke = function(obj, method) {
214
- var args = slice.call(arguments, 2);
215
- return _.map(obj, function(value) {
216
- return (_.isFunction(method) ? method || value : value[method]).apply(value, args);
217
- });
218
- };
219
-
220
- // Convenience version of a common use case of `map`: fetching a property.
221
- _.pluck = function(obj, key) {
222
- return _.map(obj, function(value){ return value[key]; });
223
- };
224
-
225
- // Return the maximum element or (element-based computation).
226
- _.max = function(obj, iterator, context) {
227
- if (!iterator && _.isArray(obj)) return Math.max.apply(Math, obj);
228
- if (!iterator && _.isEmpty(obj)) return -Infinity;
229
- var result = {computed : -Infinity};
230
- each(obj, function(value, index, list) {
231
- var computed = iterator ? iterator.call(context, value, index, list) : value;
232
- computed >= result.computed && (result = {value : value, computed : computed});
233
- });
234
- return result.value;
235
- };
236
-
237
- // Return the minimum element (or element-based computation).
238
- _.min = function(obj, iterator, context) {
239
- if (!iterator && _.isArray(obj)) return Math.min.apply(Math, obj);
240
- if (!iterator && _.isEmpty(obj)) return Infinity;
241
- var result = {computed : Infinity};
242
- each(obj, function(value, index, list) {
243
- var computed = iterator ? iterator.call(context, value, index, list) : value;
244
- computed < result.computed && (result = {value : value, computed : computed});
245
- });
246
- return result.value;
247
- };
248
-
249
- // Shuffle an array.
250
- _.shuffle = function(obj) {
251
- var shuffled = [], rand;
252
- each(obj, function(value, index, list) {
253
- if (index == 0) {
254
- shuffled[0] = value;
255
- } else {
256
- rand = Math.floor(Math.random() * (index + 1));
257
- shuffled[index] = shuffled[rand];
258
- shuffled[rand] = value;
259
- }
260
- });
261
- return shuffled;
262
- };
263
-
264
- // Sort the object's values by a criterion produced by an iterator.
265
- _.sortBy = function(obj, iterator, context) {
266
- return _.pluck(_.map(obj, function(value, index, list) {
267
- return {
268
- value : value,
269
- criteria : iterator.call(context, value, index, list)
270
- };
271
- }).sort(function(left, right) {
272
- var a = left.criteria, b = right.criteria;
273
- return a < b ? -1 : a > b ? 1 : 0;
274
- }), 'value');
275
- };
276
-
277
- // Groups the object's values by a criterion. Pass either a string attribute
278
- // to group by, or a function that returns the criterion.
279
- _.groupBy = function(obj, val) {
280
- var result = {};
281
- var iterator = _.isFunction(val) ? val : function(obj) { return obj[val]; };
282
- each(obj, function(value, index) {
283
- var key = iterator(value, index);
284
- (result[key] || (result[key] = [])).push(value);
285
- });
286
- return result;
287
- };
288
-
289
- // Use a comparator function to figure out at what index an object should
290
- // be inserted so as to maintain order. Uses binary search.
291
- _.sortedIndex = function(array, obj, iterator) {
292
- iterator || (iterator = _.identity);
293
- var low = 0, high = array.length;
294
- while (low < high) {
295
- var mid = (low + high) >> 1;
296
- iterator(array[mid]) < iterator(obj) ? low = mid + 1 : high = mid;
297
- }
298
- return low;
299
- };
300
-
301
- // Safely convert anything iterable into a real, live array.
302
- _.toArray = function(iterable) {
303
- if (!iterable) return [];
304
- if (iterable.toArray) return iterable.toArray();
305
- if (_.isArray(iterable)) return slice.call(iterable);
306
- if (_.isArguments(iterable)) return slice.call(iterable);
307
- return _.values(iterable);
308
- };
309
-
310
- // Return the number of elements in an object.
311
- _.size = function(obj) {
312
- return _.toArray(obj).length;
313
- };
314
-
315
- // Array Functions
316
- // ---------------
317
-
318
- // Get the first element of an array. Passing **n** will return the first N
319
- // values in the array. Aliased as `head`. The **guard** check allows it to work
320
- // with `_.map`.
321
- _.first = _.head = function(array, n, guard) {
322
- return (n != null) && !guard ? slice.call(array, 0, n) : array[0];
323
- };
324
-
325
- // Returns everything but the last entry of the array. Especcialy useful on
326
- // the arguments object. Passing **n** will return all the values in
327
- // the array, excluding the last N. The **guard** check allows it to work with
328
- // `_.map`.
329
- _.initial = function(array, n, guard) {
330
- return slice.call(array, 0, array.length - ((n == null) || guard ? 1 : n));
331
- };
332
-
333
- // Get the last element of an array. Passing **n** will return the last N
334
- // values in the array. The **guard** check allows it to work with `_.map`.
335
- _.last = function(array, n, guard) {
336
- if ((n != null) && !guard) {
337
- return slice.call(array, Math.max(array.length - n, 0));
338
- } else {
339
- return array[array.length - 1];
340
- }
341
- };
342
-
343
- // Returns everything but the first entry of the array. Aliased as `tail`.
344
- // Especially useful on the arguments object. Passing an **index** will return
345
- // the rest of the values in the array from that index onward. The **guard**
346
- // check allows it to work with `_.map`.
347
- _.rest = _.tail = function(array, index, guard) {
348
- return slice.call(array, (index == null) || guard ? 1 : index);
349
- };
350
-
351
- // Trim out all falsy values from an array.
352
- _.compact = function(array) {
353
- return _.filter(array, function(value){ return !!value; });
354
- };
355
-
356
- // Return a completely flattened version of an array.
357
- _.flatten = function(array, shallow) {
358
- return _.reduce(array, function(memo, value) {
359
- if (_.isArray(value)) return memo.concat(shallow ? value : _.flatten(value));
360
- memo[memo.length] = value;
361
- return memo;
362
- }, []);
363
- };
364
-
365
- // Return a version of the array that does not contain the specified value(s).
366
- _.without = function(array) {
367
- return _.difference(array, slice.call(arguments, 1));
368
- };
369
-
370
- // Produce a duplicate-free version of the array. If the array has already
371
- // been sorted, you have the option of using a faster algorithm.
372
- // Aliased as `unique`.
373
- _.uniq = _.unique = function(array, isSorted, iterator) {
374
- var initial = iterator ? _.map(array, iterator) : array;
375
- var result = [];
376
- _.reduce(initial, function(memo, el, i) {
377
- if (0 == i || (isSorted === true ? _.last(memo) != el : !_.include(memo, el))) {
378
- memo[memo.length] = el;
379
- result[result.length] = array[i];
380
- }
381
- return memo;
382
- }, []);
383
- return result;
384
- };
385
-
386
- // Produce an array that contains the union: each distinct element from all of
387
- // the passed-in arrays.
388
- _.union = function() {
389
- return _.uniq(_.flatten(arguments, true));
390
- };
391
-
392
- // Produce an array that contains every item shared between all the
393
- // passed-in arrays. (Aliased as "intersect" for back-compat.)
394
- _.intersection = _.intersect = function(array) {
395
- var rest = slice.call(arguments, 1);
396
- return _.filter(_.uniq(array), function(item) {
397
- return _.every(rest, function(other) {
398
- return _.indexOf(other, item) >= 0;
399
- });
400
- });
401
- };
402
-
403
- // Take the difference between one array and a number of other arrays.
404
- // Only the elements present in just the first array will remain.
405
- _.difference = function(array) {
406
- var rest = _.flatten(slice.call(arguments, 1));
407
- return _.filter(array, function(value){ return !_.include(rest, value); });
408
- };
409
-
410
- // Zip together multiple lists into a single array -- elements that share
411
- // an index go together.
412
- _.zip = function() {
413
- var args = slice.call(arguments);
414
- var length = _.max(_.pluck(args, 'length'));
415
- var results = new Array(length);
416
- for (var i = 0; i < length; i++) results[i] = _.pluck(args, "" + i);
417
- return results;
418
- };
419
-
420
- // If the browser doesn't supply us with indexOf (I'm looking at you, **MSIE**),
421
- // we need this function. Return the position of the first occurrence of an
422
- // item in an array, or -1 if the item is not included in the array.
423
- // Delegates to **ECMAScript 5**'s native `indexOf` if available.
424
- // If the array is large and already in sort order, pass `true`
425
- // for **isSorted** to use binary search.
426
- _.indexOf = function(array, item, isSorted) {
427
- if (array == null) return -1;
428
- var i, l;
429
- if (isSorted) {
430
- i = _.sortedIndex(array, item);
431
- return array[i] === item ? i : -1;
432
- }
433
- if (nativeIndexOf && array.indexOf === nativeIndexOf) return array.indexOf(item);
434
- for (i = 0, l = array.length; i < l; i++) if (i in array && array[i] === item) return i;
435
- return -1;
436
- };
437
-
438
- // Delegates to **ECMAScript 5**'s native `lastIndexOf` if available.
439
- _.lastIndexOf = function(array, item) {
440
- if (array == null) return -1;
441
- if (nativeLastIndexOf && array.lastIndexOf === nativeLastIndexOf) return array.lastIndexOf(item);
442
- var i = array.length;
443
- while (i--) if (i in array && array[i] === item) return i;
444
- return -1;
445
- };
446
-
447
- // Generate an integer Array containing an arithmetic progression. A port of
448
- // the native Python `range()` function. See
449
- // [the Python documentation](http://docs.python.org/library/functions.html#range).
450
- _.range = function(start, stop, step) {
451
- if (arguments.length <= 1) {
452
- stop = start || 0;
453
- start = 0;
454
- }
455
- step = arguments[2] || 1;
456
-
457
- var len = Math.max(Math.ceil((stop - start) / step), 0);
458
- var idx = 0;
459
- var range = new Array(len);
460
-
461
- while(idx < len) {
462
- range[idx++] = start;
463
- start += step;
464
- }
465
-
466
- return range;
467
- };
468
-
469
- // Function (ahem) Functions
470
- // ------------------
471
-
472
- // Reusable constructor function for prototype setting.
473
- var ctor = function(){};
474
-
475
- // Create a function bound to a given object (assigning `this`, and arguments,
476
- // optionally). Binding with arguments is also known as `curry`.
477
- // Delegates to **ECMAScript 5**'s native `Function.bind` if available.
478
- // We check for `func.bind` first, to fail fast when `func` is undefined.
479
- _.bind = function bind(func, context) {
480
- var bound, args;
481
- if (func.bind === nativeBind && nativeBind) return nativeBind.apply(func, slice.call(arguments, 1));
482
- if (!_.isFunction(func)) throw new TypeError;
483
- args = slice.call(arguments, 2);
484
- return bound = function() {
485
- if (!(this instanceof bound)) return func.apply(context, args.concat(slice.call(arguments)));
486
- ctor.prototype = func.prototype;
487
- var self = new ctor;
488
- var result = func.apply(self, args.concat(slice.call(arguments)));
489
- if (Object(result) === result) return result;
490
- return self;
491
- };
492
- };
493
-
494
- // Bind all of an object's methods to that object. Useful for ensuring that
495
- // all callbacks defined on an object belong to it.
496
- _.bindAll = function(obj) {
497
- var funcs = slice.call(arguments, 1);
498
- if (funcs.length == 0) funcs = _.functions(obj);
499
- each(funcs, function(f) { obj[f] = _.bind(obj[f], obj); });
500
- return obj;
501
- };
502
-
503
- // Memoize an expensive function by storing its results.
504
- _.memoize = function(func, hasher) {
505
- var memo = {};
506
- hasher || (hasher = _.identity);
507
- return function() {
508
- var key = hasher.apply(this, arguments);
509
- return _.has(memo, key) ? memo[key] : (memo[key] = func.apply(this, arguments));
510
- };
511
- };
512
-
513
- // Delays a function for the given number of milliseconds, and then calls
514
- // it with the arguments supplied.
515
- _.delay = function(func, wait) {
516
- var args = slice.call(arguments, 2);
517
- return setTimeout(function(){ return func.apply(func, args); }, wait);
518
- };
519
-
520
- // Defers a function, scheduling it to run after the current call stack has
521
- // cleared.
522
- _.defer = function(func) {
523
- return _.delay.apply(_, [func, 1].concat(slice.call(arguments, 1)));
524
- };
525
-
526
- // Returns a function, that, when invoked, will only be triggered at most once
527
- // during a given window of time.
528
- _.throttle = function(func, wait) {
529
- var context, args, timeout, throttling, more;
530
- var whenDone = _.debounce(function(){ more = throttling = false; }, wait);
531
- return function() {
532
- context = this; args = arguments;
533
- var later = function() {
534
- timeout = null;
535
- if (more) func.apply(context, args);
536
- whenDone();
537
- };
538
- if (!timeout) timeout = setTimeout(later, wait);
539
- if (throttling) {
540
- more = true;
541
- } else {
542
- func.apply(context, args);
543
- }
544
- whenDone();
545
- throttling = true;
546
- };
547
- };
548
-
549
- // Returns a function, that, as long as it continues to be invoked, will not
550
- // be triggered. The function will be called after it stops being called for
551
- // N milliseconds.
552
- _.debounce = function(func, wait) {
553
- var timeout;
554
- return function() {
555
- var context = this, args = arguments;
556
- var later = function() {
557
- timeout = null;
558
- func.apply(context, args);
559
- };
560
- clearTimeout(timeout);
561
- timeout = setTimeout(later, wait);
562
- };
563
- };
564
-
565
- // Returns a function that will be executed at most one time, no matter how
566
- // often you call it. Useful for lazy initialization.
567
- _.once = function(func) {
568
- var ran = false, memo;
569
- return function() {
570
- if (ran) return memo;
571
- ran = true;
572
- return memo = func.apply(this, arguments);
573
- };
574
- };
575
-
576
- // Returns the first function passed as an argument to the second,
577
- // allowing you to adjust arguments, run code before and after, and
578
- // conditionally execute the original function.
579
- _.wrap = function(func, wrapper) {
580
- return function() {
581
- var args = [func].concat(slice.call(arguments, 0));
582
- return wrapper.apply(this, args);
583
- };
584
- };
585
-
586
- // Returns a function that is the composition of a list of functions, each
587
- // consuming the return value of the function that follows.
588
- _.compose = function() {
589
- var funcs = arguments;
590
- return function() {
591
- var args = arguments;
592
- for (var i = funcs.length - 1; i >= 0; i--) {
593
- args = [funcs[i].apply(this, args)];
594
- }
595
- return args[0];
596
- };
597
- };
598
-
599
- // Returns a function that will only be executed after being called N times.
600
- _.after = function(times, func) {
601
- if (times <= 0) return func();
602
- return function() {
603
- if (--times < 1) { return func.apply(this, arguments); }
604
- };
605
- };
606
-
607
- // Object Functions
608
- // ----------------
609
-
610
- // Retrieve the names of an object's properties.
611
- // Delegates to **ECMAScript 5**'s native `Object.keys`
612
- _.keys = nativeKeys || function(obj) {
613
- if (obj !== Object(obj)) throw new TypeError('Invalid object');
614
- var keys = [];
615
- for (var key in obj) if (_.has(obj, key)) keys[keys.length] = key;
616
- return keys;
617
- };
618
-
619
- // Retrieve the values of an object's properties.
620
- _.values = function(obj) {
621
- return _.map(obj, _.identity);
622
- };
623
-
624
- // Return a sorted list of the function names available on the object.
625
- // Aliased as `methods`
626
- _.functions = _.methods = function(obj) {
627
- var names = [];
628
- for (var key in obj) {
629
- if (_.isFunction(obj[key])) names.push(key);
630
- }
631
- return names.sort();
632
- };
633
-
634
- // Extend a given object with all the properties in passed-in object(s).
635
- _.extend = function(obj) {
636
- each(slice.call(arguments, 1), function(source) {
637
- for (var prop in source) {
638
- obj[prop] = source[prop];
639
- }
640
- });
641
- return obj;
642
- };
643
-
644
- // Fill in a given object with default properties.
645
- _.defaults = function(obj) {
646
- each(slice.call(arguments, 1), function(source) {
647
- for (var prop in source) {
648
- if (obj[prop] == null) obj[prop] = source[prop];
649
- }
650
- });
651
- return obj;
652
- };
653
-
654
- // Create a (shallow-cloned) duplicate of an object.
655
- _.clone = function(obj) {
656
- if (!_.isObject(obj)) return obj;
657
- return _.isArray(obj) ? obj.slice() : _.extend({}, obj);
658
- };
659
-
660
- // Invokes interceptor with the obj, and then returns obj.
661
- // The primary purpose of this method is to "tap into" a method chain, in
662
- // order to perform operations on intermediate results within the chain.
663
- _.tap = function(obj, interceptor) {
664
- interceptor(obj);
665
- return obj;
666
- };
667
-
668
- // Internal recursive comparison function.
669
- function eq(a, b, stack) {
670
- // Identical objects are equal. `0 === -0`, but they aren't identical.
671
- // See the Harmony `egal` proposal: http://wiki.ecmascript.org/doku.php?id=harmony:egal.
672
- if (a === b) return a !== 0 || 1 / a == 1 / b;
673
- // A strict comparison is necessary because `null == undefined`.
674
- if (a == null || b == null) return a === b;
675
- // Unwrap any wrapped objects.
676
- if (a._chain) a = a._wrapped;
677
- if (b._chain) b = b._wrapped;
678
- // Invoke a custom `isEqual` method if one is provided.
679
- if (a.isEqual && _.isFunction(a.isEqual)) return a.isEqual(b);
680
- if (b.isEqual && _.isFunction(b.isEqual)) return b.isEqual(a);
681
- // Compare `[[Class]]` names.
682
- var className = toString.call(a);
683
- if (className != toString.call(b)) return false;
684
- switch (className) {
685
- // Strings, numbers, dates, and booleans are compared by value.
686
- case '[object String]':
687
- // Primitives and their corresponding object wrappers are equivalent; thus, `"5"` is
688
- // equivalent to `new String("5")`.
689
- return a == String(b);
690
- case '[object Number]':
691
- // `NaN`s are equivalent, but non-reflexive. An `egal` comparison is performed for
692
- // other numeric values.
693
- return a != +a ? b != +b : (a == 0 ? 1 / a == 1 / b : a == +b);
694
- case '[object Date]':
695
- case '[object Boolean]':
696
- // Coerce dates and booleans to numeric primitive values. Dates are compared by their
697
- // millisecond representations. Note that invalid dates with millisecond representations
698
- // of `NaN` are not equivalent.
699
- return +a == +b;
700
- // RegExps are compared by their source patterns and flags.
701
- case '[object RegExp]':
702
- return a.source == b.source &&
703
- a.global == b.global &&
704
- a.multiline == b.multiline &&
705
- a.ignoreCase == b.ignoreCase;
706
- }
707
- if (typeof a != 'object' || typeof b != 'object') return false;
708
- // Assume equality for cyclic structures. The algorithm for detecting cyclic
709
- // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`.
710
- var length = stack.length;
711
- while (length--) {
712
- // Linear search. Performance is inversely proportional to the number of
713
- // unique nested structures.
714
- if (stack[length] == a) return true;
715
- }
716
- // Add the first object to the stack of traversed objects.
717
- stack.push(a);
718
- var size = 0, result = true;
719
- // Recursively compare objects and arrays.
720
- if (className == '[object Array]') {
721
- // Compare array lengths to determine if a deep comparison is necessary.
722
- size = a.length;
723
- result = size == b.length;
724
- if (result) {
725
- // Deep compare the contents, ignoring non-numeric properties.
726
- while (size--) {
727
- // Ensure commutative equality for sparse arrays.
728
- if (!(result = size in a == size in b && eq(a[size], b[size], stack))) break;
729
- }
730
- }
731
- } else {
732
- // Objects with different constructors are not equivalent.
733
- if ('constructor' in a != 'constructor' in b || a.constructor != b.constructor) return false;
734
- // Deep compare objects.
735
- for (var key in a) {
736
- if (_.has(a, key)) {
737
- // Count the expected number of properties.
738
- size++;
739
- // Deep compare each member.
740
- if (!(result = _.has(b, key) && eq(a[key], b[key], stack))) break;
741
- }
742
- }
743
- // Ensure that both objects contain the same number of properties.
744
- if (result) {
745
- for (key in b) {
746
- if (_.has(b, key) && !(size--)) break;
747
- }
748
- result = !size;
749
- }
750
- }
751
- // Remove the first object from the stack of traversed objects.
752
- stack.pop();
753
- return result;
754
- }
755
-
756
- // Perform a deep comparison to check if two objects are equal.
757
- _.isEqual = function(a, b) {
758
- return eq(a, b, []);
759
- };
760
-
761
- // Is a given array, string, or object empty?
762
- // An "empty" object has no enumerable own-properties.
763
- _.isEmpty = function(obj) {
764
- if (_.isArray(obj) || _.isString(obj)) return obj.length === 0;
765
- for (var key in obj) if (_.has(obj, key)) return false;
766
- return true;
767
- };
768
-
769
- // Is a given value a DOM element?
770
- _.isElement = function(obj) {
771
- return !!(obj && obj.nodeType == 1);
772
- };
773
-
774
- // Is a given value an array?
775
- // Delegates to ECMA5's native Array.isArray
776
- _.isArray = nativeIsArray || function(obj) {
777
- return toString.call(obj) == '[object Array]';
778
- };
779
-
780
- // Is a given variable an object?
781
- _.isObject = function(obj) {
782
- return obj === Object(obj);
783
- };
784
-
785
- // Is a given variable an arguments object?
786
- _.isArguments = function(obj) {
787
- return toString.call(obj) == '[object Arguments]';
788
- };
789
- if (!_.isArguments(arguments)) {
790
- _.isArguments = function(obj) {
791
- return !!(obj && _.has(obj, 'callee'));
792
- };
793
- }
794
-
795
- // Is a given value a function?
796
- _.isFunction = function(obj) {
797
- return toString.call(obj) == '[object Function]';
798
- };
799
-
800
- // Is a given value a string?
801
- _.isString = function(obj) {
802
- return toString.call(obj) == '[object String]';
803
- };
804
-
805
- // Is a given value a number?
806
- _.isNumber = function(obj) {
807
- return toString.call(obj) == '[object Number]';
808
- };
809
-
810
- // Is the given value `NaN`?
811
- _.isNaN = function(obj) {
812
- // `NaN` is the only value for which `===` is not reflexive.
813
- return obj !== obj;
814
- };
815
-
816
- // Is a given value a boolean?
817
- _.isBoolean = function(obj) {
818
- return obj === true || obj === false || toString.call(obj) == '[object Boolean]';
819
- };
820
-
821
- // Is a given value a date?
822
- _.isDate = function(obj) {
823
- return toString.call(obj) == '[object Date]';
824
- };
825
-
826
- // Is the given value a regular expression?
827
- _.isRegExp = function(obj) {
828
- return toString.call(obj) == '[object RegExp]';
829
- };
830
-
831
- // Is a given value equal to null?
832
- _.isNull = function(obj) {
833
- return obj === null;
834
- };
835
-
836
- // Is a given variable undefined?
837
- _.isUndefined = function(obj) {
838
- return obj === void 0;
839
- };
840
-
841
- // Has own property?
842
- _.has = function(obj, key) {
843
- return hasOwnProperty.call(obj, key);
844
- };
845
-
846
- // Utility Functions
847
- // -----------------
848
-
849
- // Run Underscore.js in *noConflict* mode, returning the `_` variable to its
850
- // previous owner. Returns a reference to the Underscore object.
851
- _.noConflict = function() {
852
- root._ = previousUnderscore;
853
- return this;
854
- };
855
-
856
- // Keep the identity function around for default iterators.
857
- _.identity = function(value) {
858
- return value;
859
- };
860
-
861
- // Run a function **n** times.
862
- _.times = function (n, iterator, context) {
863
- for (var i = 0; i < n; i++) iterator.call(context, i);
864
- };
865
-
866
- // Escape a string for HTML interpolation.
867
- _.escape = function(string) {
868
- return (''+string).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/'/g, '&#x27;').replace(/\//g,'&#x2F;');
869
- };
870
-
871
- // Add your own custom functions to the Underscore object, ensuring that
872
- // they're correctly added to the OOP wrapper as well.
873
- _.mixin = function(obj) {
874
- each(_.functions(obj), function(name){
875
- addToWrapper(name, _[name] = obj[name]);
876
- });
877
- };
878
-
879
- // Generate a unique integer id (unique within the entire client session).
880
- // Useful for temporary DOM ids.
881
- var idCounter = 0;
882
- _.uniqueId = function(prefix) {
883
- var id = idCounter++;
884
- return prefix ? prefix + id : id;
885
- };
886
-
887
- // By default, Underscore uses ERB-style template delimiters, change the
888
- // following template settings to use alternative delimiters.
889
- _.templateSettings = {
890
- evaluate : /<%([\s\S]+?)%>/g,
891
- interpolate : /<%=([\s\S]+?)%>/g,
892
- escape : /<%-([\s\S]+?)%>/g
893
- };
894
-
895
- // When customizing `templateSettings`, if you don't want to define an
896
- // interpolation, evaluation or escaping regex, we need one that is
897
- // guaranteed not to match.
898
- var noMatch = /.^/;
899
-
900
- // Within an interpolation, evaluation, or escaping, remove HTML escaping
901
- // that had been previously added.
902
- var unescape = function(code) {
903
- return code.replace(/\\\\/g, '\\').replace(/\\'/g, "'");
904
- };
905
-
906
- // JavaScript micro-templating, similar to John Resig's implementation.
907
- // Underscore templating handles arbitrary delimiters, preserves whitespace,
908
- // and correctly escapes quotes within interpolated code.
909
- _.template = function(str, data) {
910
- var c = _.templateSettings;
911
- var tmpl = 'var __p=[],print=function(){__p.push.apply(__p,arguments);};' +
912
- 'with(obj||{}){__p.push(\'' +
913
- str.replace(/\\/g, '\\\\')
914
- .replace(/'/g, "\\'")
915
- .replace(c.escape || noMatch, function(match, code) {
916
- return "',_.escape(" + unescape(code) + "),'";
917
- })
918
- .replace(c.interpolate || noMatch, function(match, code) {
919
- return "'," + unescape(code) + ",'";
920
- })
921
- .replace(c.evaluate || noMatch, function(match, code) {
922
- return "');" + unescape(code).replace(/[\r\n\t]/g, ' ') + ";__p.push('";
923
- })
924
- .replace(/\r/g, '\\r')
925
- .replace(/\n/g, '\\n')
926
- .replace(/\t/g, '\\t')
927
- + "');}return __p.join('');";
928
- var func = new Function('obj', '_', tmpl);
929
- if (data) return func(data, _);
930
- return function(data) {
931
- return func.call(this, data, _);
932
- };
933
- };
934
-
935
- // Add a "chain" function, which will delegate to the wrapper.
936
- _.chain = function(obj) {
937
- return _(obj).chain();
938
- };
939
-
940
- // The OOP Wrapper
941
- // ---------------
942
-
943
- // If Underscore is called as a function, it returns a wrapped object that
944
- // can be used OO-style. This wrapper holds altered versions of all the
945
- // underscore functions. Wrapped objects may be chained.
946
- var wrapper = function(obj) { this._wrapped = obj; };
947
-
948
- // Expose `wrapper.prototype` as `_.prototype`
949
- _.prototype = wrapper.prototype;
950
-
951
- // Helper function to continue chaining intermediate results.
952
- var result = function(obj, chain) {
953
- return chain ? _(obj).chain() : obj;
954
- };
955
-
956
- // A method to easily add functions to the OOP wrapper.
957
- var addToWrapper = function(name, func) {
958
- wrapper.prototype[name] = function() {
959
- var args = slice.call(arguments);
960
- unshift.call(args, this._wrapped);
961
- return result(func.apply(_, args), this._chain);
962
- };
963
- };
964
-
965
- // Add all of the Underscore functions to the wrapper object.
966
- _.mixin(_);
967
-
968
- // Add all mutator Array functions to the wrapper.
969
- each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) {
970
- var method = ArrayProto[name];
971
- wrapper.prototype[name] = function() {
972
- var wrapped = this._wrapped;
973
- method.apply(wrapped, arguments);
974
- var length = wrapped.length;
975
- if ((name == 'shift' || name == 'splice') && length === 0) delete wrapped[0];
976
- return result(wrapped, this._chain);
977
- };
978
- });
979
-
980
- // Add all accessor Array functions to the wrapper.
981
- each(['concat', 'join', 'slice'], function(name) {
982
- var method = ArrayProto[name];
983
- wrapper.prototype[name] = function() {
984
- return result(method.apply(this._wrapped, arguments), this._chain);
985
- };
986
- });
987
-
988
- // Start chaining a wrapped Underscore object.
989
- wrapper.prototype.chain = function() {
990
- this._chain = true;
991
- return this;
992
- };
993
-
994
- // Extracts the result from a wrapped and chained object.
995
- wrapper.prototype.value = function() {
996
- return this._wrapped;
997
- };
998
-
999
- }).call(this);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docs/_build/html/_static/underscore.js DELETED
@@ -1,31 +0,0 @@
1
- // Underscore.js 1.3.1
2
- // (c) 2009-2012 Jeremy Ashkenas, DocumentCloud Inc.
3
- // Underscore is freely distributable under the MIT license.
4
- // Portions of Underscore are inspired or borrowed from Prototype,
5
- // Oliver Steele's Functional, and John Resig's Micro-Templating.
6
- // For all details and documentation:
7
- // http://documentcloud.github.com/underscore
8
- (function(){function q(a,c,d){if(a===c)return a!==0||1/a==1/c;if(a==null||c==null)return a===c;if(a._chain)a=a._wrapped;if(c._chain)c=c._wrapped;if(a.isEqual&&b.isFunction(a.isEqual))return a.isEqual(c);if(c.isEqual&&b.isFunction(c.isEqual))return c.isEqual(a);var e=l.call(a);if(e!=l.call(c))return false;switch(e){case "[object String]":return a==String(c);case "[object Number]":return a!=+a?c!=+c:a==0?1/a==1/c:a==+c;case "[object Date]":case "[object Boolean]":return+a==+c;case "[object RegExp]":return a.source==
9
- c.source&&a.global==c.global&&a.multiline==c.multiline&&a.ignoreCase==c.ignoreCase}if(typeof a!="object"||typeof c!="object")return false;for(var f=d.length;f--;)if(d[f]==a)return true;d.push(a);var f=0,g=true;if(e=="[object Array]"){if(f=a.length,g=f==c.length)for(;f--;)if(!(g=f in a==f in c&&q(a[f],c[f],d)))break}else{if("constructor"in a!="constructor"in c||a.constructor!=c.constructor)return false;for(var h in a)if(b.has(a,h)&&(f++,!(g=b.has(c,h)&&q(a[h],c[h],d))))break;if(g){for(h in c)if(b.has(c,
10
- h)&&!f--)break;g=!f}}d.pop();return g}var r=this,G=r._,n={},k=Array.prototype,o=Object.prototype,i=k.slice,H=k.unshift,l=o.toString,I=o.hasOwnProperty,w=k.forEach,x=k.map,y=k.reduce,z=k.reduceRight,A=k.filter,B=k.every,C=k.some,p=k.indexOf,D=k.lastIndexOf,o=Array.isArray,J=Object.keys,s=Function.prototype.bind,b=function(a){return new m(a)};if(typeof exports!=="undefined"){if(typeof module!=="undefined"&&module.exports)exports=module.exports=b;exports._=b}else r._=b;b.VERSION="1.3.1";var j=b.each=
11
- b.forEach=function(a,c,d){if(a!=null)if(w&&a.forEach===w)a.forEach(c,d);else if(a.length===+a.length)for(var e=0,f=a.length;e<f;e++){if(e in a&&c.call(d,a[e],e,a)===n)break}else for(e in a)if(b.has(a,e)&&c.call(d,a[e],e,a)===n)break};b.map=b.collect=function(a,c,b){var e=[];if(a==null)return e;if(x&&a.map===x)return a.map(c,b);j(a,function(a,g,h){e[e.length]=c.call(b,a,g,h)});if(a.length===+a.length)e.length=a.length;return e};b.reduce=b.foldl=b.inject=function(a,c,d,e){var f=arguments.length>2;a==
12
- null&&(a=[]);if(y&&a.reduce===y)return e&&(c=b.bind(c,e)),f?a.reduce(c,d):a.reduce(c);j(a,function(a,b,i){f?d=c.call(e,d,a,b,i):(d=a,f=true)});if(!f)throw new TypeError("Reduce of empty array with no initial value");return d};b.reduceRight=b.foldr=function(a,c,d,e){var f=arguments.length>2;a==null&&(a=[]);if(z&&a.reduceRight===z)return e&&(c=b.bind(c,e)),f?a.reduceRight(c,d):a.reduceRight(c);var g=b.toArray(a).reverse();e&&!f&&(c=b.bind(c,e));return f?b.reduce(g,c,d,e):b.reduce(g,c)};b.find=b.detect=
13
- function(a,c,b){var e;E(a,function(a,g,h){if(c.call(b,a,g,h))return e=a,true});return e};b.filter=b.select=function(a,c,b){var e=[];if(a==null)return e;if(A&&a.filter===A)return a.filter(c,b);j(a,function(a,g,h){c.call(b,a,g,h)&&(e[e.length]=a)});return e};b.reject=function(a,c,b){var e=[];if(a==null)return e;j(a,function(a,g,h){c.call(b,a,g,h)||(e[e.length]=a)});return e};b.every=b.all=function(a,c,b){var e=true;if(a==null)return e;if(B&&a.every===B)return a.every(c,b);j(a,function(a,g,h){if(!(e=
14
- e&&c.call(b,a,g,h)))return n});return e};var E=b.some=b.any=function(a,c,d){c||(c=b.identity);var e=false;if(a==null)return e;if(C&&a.some===C)return a.some(c,d);j(a,function(a,b,h){if(e||(e=c.call(d,a,b,h)))return n});return!!e};b.include=b.contains=function(a,c){var b=false;if(a==null)return b;return p&&a.indexOf===p?a.indexOf(c)!=-1:b=E(a,function(a){return a===c})};b.invoke=function(a,c){var d=i.call(arguments,2);return b.map(a,function(a){return(b.isFunction(c)?c||a:a[c]).apply(a,d)})};b.pluck=
15
- function(a,c){return b.map(a,function(a){return a[c]})};b.max=function(a,c,d){if(!c&&b.isArray(a))return Math.max.apply(Math,a);if(!c&&b.isEmpty(a))return-Infinity;var e={computed:-Infinity};j(a,function(a,b,h){b=c?c.call(d,a,b,h):a;b>=e.computed&&(e={value:a,computed:b})});return e.value};b.min=function(a,c,d){if(!c&&b.isArray(a))return Math.min.apply(Math,a);if(!c&&b.isEmpty(a))return Infinity;var e={computed:Infinity};j(a,function(a,b,h){b=c?c.call(d,a,b,h):a;b<e.computed&&(e={value:a,computed:b})});
16
- return e.value};b.shuffle=function(a){var b=[],d;j(a,function(a,f){f==0?b[0]=a:(d=Math.floor(Math.random()*(f+1)),b[f]=b[d],b[d]=a)});return b};b.sortBy=function(a,c,d){return b.pluck(b.map(a,function(a,b,g){return{value:a,criteria:c.call(d,a,b,g)}}).sort(function(a,b){var c=a.criteria,d=b.criteria;return c<d?-1:c>d?1:0}),"value")};b.groupBy=function(a,c){var d={},e=b.isFunction(c)?c:function(a){return a[c]};j(a,function(a,b){var c=e(a,b);(d[c]||(d[c]=[])).push(a)});return d};b.sortedIndex=function(a,
17
- c,d){d||(d=b.identity);for(var e=0,f=a.length;e<f;){var g=e+f>>1;d(a[g])<d(c)?e=g+1:f=g}return e};b.toArray=function(a){return!a?[]:a.toArray?a.toArray():b.isArray(a)?i.call(a):b.isArguments(a)?i.call(a):b.values(a)};b.size=function(a){return b.toArray(a).length};b.first=b.head=function(a,b,d){return b!=null&&!d?i.call(a,0,b):a[0]};b.initial=function(a,b,d){return i.call(a,0,a.length-(b==null||d?1:b))};b.last=function(a,b,d){return b!=null&&!d?i.call(a,Math.max(a.length-b,0)):a[a.length-1]};b.rest=
18
- b.tail=function(a,b,d){return i.call(a,b==null||d?1:b)};b.compact=function(a){return b.filter(a,function(a){return!!a})};b.flatten=function(a,c){return b.reduce(a,function(a,e){if(b.isArray(e))return a.concat(c?e:b.flatten(e));a[a.length]=e;return a},[])};b.without=function(a){return b.difference(a,i.call(arguments,1))};b.uniq=b.unique=function(a,c,d){var d=d?b.map(a,d):a,e=[];b.reduce(d,function(d,g,h){if(0==h||(c===true?b.last(d)!=g:!b.include(d,g)))d[d.length]=g,e[e.length]=a[h];return d},[]);
19
- return e};b.union=function(){return b.uniq(b.flatten(arguments,true))};b.intersection=b.intersect=function(a){var c=i.call(arguments,1);return b.filter(b.uniq(a),function(a){return b.every(c,function(c){return b.indexOf(c,a)>=0})})};b.difference=function(a){var c=b.flatten(i.call(arguments,1));return b.filter(a,function(a){return!b.include(c,a)})};b.zip=function(){for(var a=i.call(arguments),c=b.max(b.pluck(a,"length")),d=Array(c),e=0;e<c;e++)d[e]=b.pluck(a,""+e);return d};b.indexOf=function(a,c,
20
- d){if(a==null)return-1;var e;if(d)return d=b.sortedIndex(a,c),a[d]===c?d:-1;if(p&&a.indexOf===p)return a.indexOf(c);for(d=0,e=a.length;d<e;d++)if(d in a&&a[d]===c)return d;return-1};b.lastIndexOf=function(a,b){if(a==null)return-1;if(D&&a.lastIndexOf===D)return a.lastIndexOf(b);for(var d=a.length;d--;)if(d in a&&a[d]===b)return d;return-1};b.range=function(a,b,d){arguments.length<=1&&(b=a||0,a=0);for(var d=arguments[2]||1,e=Math.max(Math.ceil((b-a)/d),0),f=0,g=Array(e);f<e;)g[f++]=a,a+=d;return g};
21
- var F=function(){};b.bind=function(a,c){var d,e;if(a.bind===s&&s)return s.apply(a,i.call(arguments,1));if(!b.isFunction(a))throw new TypeError;e=i.call(arguments,2);return d=function(){if(!(this instanceof d))return a.apply(c,e.concat(i.call(arguments)));F.prototype=a.prototype;var b=new F,g=a.apply(b,e.concat(i.call(arguments)));return Object(g)===g?g:b}};b.bindAll=function(a){var c=i.call(arguments,1);c.length==0&&(c=b.functions(a));j(c,function(c){a[c]=b.bind(a[c],a)});return a};b.memoize=function(a,
22
- c){var d={};c||(c=b.identity);return function(){var e=c.apply(this,arguments);return b.has(d,e)?d[e]:d[e]=a.apply(this,arguments)}};b.delay=function(a,b){var d=i.call(arguments,2);return setTimeout(function(){return a.apply(a,d)},b)};b.defer=function(a){return b.delay.apply(b,[a,1].concat(i.call(arguments,1)))};b.throttle=function(a,c){var d,e,f,g,h,i=b.debounce(function(){h=g=false},c);return function(){d=this;e=arguments;var b;f||(f=setTimeout(function(){f=null;h&&a.apply(d,e);i()},c));g?h=true:
23
- a.apply(d,e);i();g=true}};b.debounce=function(a,b){var d;return function(){var e=this,f=arguments;clearTimeout(d);d=setTimeout(function(){d=null;a.apply(e,f)},b)}};b.once=function(a){var b=false,d;return function(){if(b)return d;b=true;return d=a.apply(this,arguments)}};b.wrap=function(a,b){return function(){var d=[a].concat(i.call(arguments,0));return b.apply(this,d)}};b.compose=function(){var a=arguments;return function(){for(var b=arguments,d=a.length-1;d>=0;d--)b=[a[d].apply(this,b)];return b[0]}};
24
- b.after=function(a,b){return a<=0?b():function(){if(--a<1)return b.apply(this,arguments)}};b.keys=J||function(a){if(a!==Object(a))throw new TypeError("Invalid object");var c=[],d;for(d in a)b.has(a,d)&&(c[c.length]=d);return c};b.values=function(a){return b.map(a,b.identity)};b.functions=b.methods=function(a){var c=[],d;for(d in a)b.isFunction(a[d])&&c.push(d);return c.sort()};b.extend=function(a){j(i.call(arguments,1),function(b){for(var d in b)a[d]=b[d]});return a};b.defaults=function(a){j(i.call(arguments,
25
- 1),function(b){for(var d in b)a[d]==null&&(a[d]=b[d])});return a};b.clone=function(a){return!b.isObject(a)?a:b.isArray(a)?a.slice():b.extend({},a)};b.tap=function(a,b){b(a);return a};b.isEqual=function(a,b){return q(a,b,[])};b.isEmpty=function(a){if(b.isArray(a)||b.isString(a))return a.length===0;for(var c in a)if(b.has(a,c))return false;return true};b.isElement=function(a){return!!(a&&a.nodeType==1)};b.isArray=o||function(a){return l.call(a)=="[object Array]"};b.isObject=function(a){return a===Object(a)};
26
- b.isArguments=function(a){return l.call(a)=="[object Arguments]"};if(!b.isArguments(arguments))b.isArguments=function(a){return!(!a||!b.has(a,"callee"))};b.isFunction=function(a){return l.call(a)=="[object Function]"};b.isString=function(a){return l.call(a)=="[object String]"};b.isNumber=function(a){return l.call(a)=="[object Number]"};b.isNaN=function(a){return a!==a};b.isBoolean=function(a){return a===true||a===false||l.call(a)=="[object Boolean]"};b.isDate=function(a){return l.call(a)=="[object Date]"};
27
- b.isRegExp=function(a){return l.call(a)=="[object RegExp]"};b.isNull=function(a){return a===null};b.isUndefined=function(a){return a===void 0};b.has=function(a,b){return I.call(a,b)};b.noConflict=function(){r._=G;return this};b.identity=function(a){return a};b.times=function(a,b,d){for(var e=0;e<a;e++)b.call(d,e)};b.escape=function(a){return(""+a).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/\//g,"&#x2F;")};b.mixin=function(a){j(b.functions(a),
28
- function(c){K(c,b[c]=a[c])})};var L=0;b.uniqueId=function(a){var b=L++;return a?a+b:b};b.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var t=/.^/,u=function(a){return a.replace(/\\\\/g,"\\").replace(/\\'/g,"'")};b.template=function(a,c){var d=b.templateSettings,d="var __p=[],print=function(){__p.push.apply(__p,arguments);};with(obj||{}){__p.push('"+a.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(d.escape||t,function(a,b){return"',_.escape("+
29
- u(b)+"),'"}).replace(d.interpolate||t,function(a,b){return"',"+u(b)+",'"}).replace(d.evaluate||t,function(a,b){return"');"+u(b).replace(/[\r\n\t]/g," ")+";__p.push('"}).replace(/\r/g,"\\r").replace(/\n/g,"\\n").replace(/\t/g,"\\t")+"');}return __p.join('');",e=new Function("obj","_",d);return c?e(c,b):function(a){return e.call(this,a,b)}};b.chain=function(a){return b(a).chain()};var m=function(a){this._wrapped=a};b.prototype=m.prototype;var v=function(a,c){return c?b(a).chain():a},K=function(a,c){m.prototype[a]=
30
- function(){var a=i.call(arguments);H.call(a,this._wrapped);return v(c.apply(b,a),this._chain)}};b.mixin(b);j("pop,push,reverse,shift,sort,splice,unshift".split(","),function(a){var b=k[a];m.prototype[a]=function(){var d=this._wrapped;b.apply(d,arguments);var e=d.length;(a=="shift"||a=="splice")&&e===0&&delete d[0];return v(d,this._chain)}});j(["concat","join","slice"],function(a){var b=k[a];m.prototype[a]=function(){return v(b.apply(this._wrapped,arguments),this._chain)}});m.prototype.chain=function(){this._chain=
31
- true;return this};m.prototype.value=function(){return this._wrapped}}).call(this);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docs/_build/html/_static/up-pressed.png DELETED
Binary file (345 Bytes)
 
docs/_build/html/_static/up.png DELETED
Binary file (345 Bytes)
 
docs/_build/html/_static/websupport.js DELETED
@@ -1,808 +0,0 @@
1
- /*
2
- * websupport.js
3
- * ~~~~~~~~~~~~~
4
- *
5
- * sphinx.websupport utilties for all documentation.
6
- *
7
- * :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS.
8
- * :license: BSD, see LICENSE for details.
9
- *
10
- */
11
-
12
- (function($) {
13
- $.fn.autogrow = function() {
14
- return this.each(function() {
15
- var textarea = this;
16
-
17
- $.fn.autogrow.resize(textarea);
18
-
19
- $(textarea)
20
- .focus(function() {
21
- textarea.interval = setInterval(function() {
22
- $.fn.autogrow.resize(textarea);
23
- }, 500);
24
- })
25
- .blur(function() {
26
- clearInterval(textarea.interval);
27
- });
28
- });
29
- };
30
-
31
- $.fn.autogrow.resize = function(textarea) {
32
- var lineHeight = parseInt($(textarea).css('line-height'), 10);
33
- var lines = textarea.value.split('\n');
34
- var columns = textarea.cols;
35
- var lineCount = 0;
36
- $.each(lines, function() {
37
- lineCount += Math.ceil(this.length / columns) || 1;
38
- });
39
- var height = lineHeight * (lineCount + 1);
40
- $(textarea).css('height', height);
41
- };
42
- })(jQuery);
43
-
44
- (function($) {
45
- var comp, by;
46
-
47
- function init() {
48
- initEvents();
49
- initComparator();
50
- }
51
-
52
- function initEvents() {
53
- $(document).on("click", 'a.comment-close', function(event) {
54
- event.preventDefault();
55
- hide($(this).attr('id').substring(2));
56
- });
57
- $(document).on("click", 'a.vote', function(event) {
58
- event.preventDefault();
59
- handleVote($(this));
60
- });
61
- $(document).on("click", 'a.reply', function(event) {
62
- event.preventDefault();
63
- openReply($(this).attr('id').substring(2));
64
- });
65
- $(document).on("click", 'a.close-reply', function(event) {
66
- event.preventDefault();
67
- closeReply($(this).attr('id').substring(2));
68
- });
69
- $(document).on("click", 'a.sort-option', function(event) {
70
- event.preventDefault();
71
- handleReSort($(this));
72
- });
73
- $(document).on("click", 'a.show-proposal', function(event) {
74
- event.preventDefault();
75
- showProposal($(this).attr('id').substring(2));
76
- });
77
- $(document).on("click", 'a.hide-proposal', function(event) {
78
- event.preventDefault();
79
- hideProposal($(this).attr('id').substring(2));
80
- });
81
- $(document).on("click", 'a.show-propose-change', function(event) {
82
- event.preventDefault();
83
- showProposeChange($(this).attr('id').substring(2));
84
- });
85
- $(document).on("click", 'a.hide-propose-change', function(event) {
86
- event.preventDefault();
87
- hideProposeChange($(this).attr('id').substring(2));
88
- });
89
- $(document).on("click", 'a.accept-comment', function(event) {
90
- event.preventDefault();
91
- acceptComment($(this).attr('id').substring(2));
92
- });
93
- $(document).on("click", 'a.delete-comment', function(event) {
94
- event.preventDefault();
95
- deleteComment($(this).attr('id').substring(2));
96
- });
97
- $(document).on("click", 'a.comment-markup', function(event) {
98
- event.preventDefault();
99
- toggleCommentMarkupBox($(this).attr('id').substring(2));
100
- });
101
- }
102
-
103
- /**
104
- * Set comp, which is a comparator function used for sorting and
105
- * inserting comments into the list.
106
- */
107
- function setComparator() {
108
- // If the first three letters are "asc", sort in ascending order
109
- // and remove the prefix.
110
- if (by.substring(0,3) == 'asc') {
111
- var i = by.substring(3);
112
- comp = function(a, b) { return a[i] - b[i]; };
113
- } else {
114
- // Otherwise sort in descending order.
115
- comp = function(a, b) { return b[by] - a[by]; };
116
- }
117
-
118
- // Reset link styles and format the selected sort option.
119
- $('a.sel').attr('href', '#').removeClass('sel');
120
- $('a.by' + by).removeAttr('href').addClass('sel');
121
- }
122
-
123
- /**
124
- * Create a comp function. If the user has preferences stored in
125
- * the sortBy cookie, use those, otherwise use the default.
126
- */
127
- function initComparator() {
128
- by = 'rating'; // Default to sort by rating.
129
- // If the sortBy cookie is set, use that instead.
130
- if (document.cookie.length > 0) {
131
- var start = document.cookie.indexOf('sortBy=');
132
- if (start != -1) {
133
- start = start + 7;
134
- var end = document.cookie.indexOf(";", start);
135
- if (end == -1) {
136
- end = document.cookie.length;
137
- by = unescape(document.cookie.substring(start, end));
138
- }
139
- }
140
- }
141
- setComparator();
142
- }
143
-
144
- /**
145
- * Show a comment div.
146
- */
147
- function show(id) {
148
- $('#ao' + id).hide();
149
- $('#ah' + id).show();
150
- var context = $.extend({id: id}, opts);
151
- var popup = $(renderTemplate(popupTemplate, context)).hide();
152
- popup.find('textarea[name="proposal"]').hide();
153
- popup.find('a.by' + by).addClass('sel');
154
- var form = popup.find('#cf' + id);
155
- form.submit(function(event) {
156
- event.preventDefault();
157
- addComment(form);
158
- });
159
- $('#s' + id).after(popup);
160
- popup.slideDown('fast', function() {
161
- getComments(id);
162
- });
163
- }
164
-
165
- /**
166
- * Hide a comment div.
167
- */
168
- function hide(id) {
169
- $('#ah' + id).hide();
170
- $('#ao' + id).show();
171
- var div = $('#sc' + id);
172
- div.slideUp('fast', function() {
173
- div.remove();
174
- });
175
- }
176
-
177
- /**
178
- * Perform an ajax request to get comments for a node
179
- * and insert the comments into the comments tree.
180
- */
181
- function getComments(id) {
182
- $.ajax({
183
- type: 'GET',
184
- url: opts.getCommentsURL,
185
- data: {node: id},
186
- success: function(data, textStatus, request) {
187
- var ul = $('#cl' + id);
188
- var speed = 100;
189
- $('#cf' + id)
190
- .find('textarea[name="proposal"]')
191
- .data('source', data.source);
192
-
193
- if (data.comments.length === 0) {
194
- ul.html('<li>No comments yet.</li>');
195
- ul.data('empty', true);
196
- } else {
197
- // If there are comments, sort them and put them in the list.
198
- var comments = sortComments(data.comments);
199
- speed = data.comments.length * 100;
200
- appendComments(comments, ul);
201
- ul.data('empty', false);
202
- }
203
- $('#cn' + id).slideUp(speed + 200);
204
- ul.slideDown(speed);
205
- },
206
- error: function(request, textStatus, error) {
207
- showError('Oops, there was a problem retrieving the comments.');
208
- },
209
- dataType: 'json'
210
- });
211
- }
212
-
213
- /**
214
- * Add a comment via ajax and insert the comment into the comment tree.
215
- */
216
- function addComment(form) {
217
- var node_id = form.find('input[name="node"]').val();
218
- var parent_id = form.find('input[name="parent"]').val();
219
- var text = form.find('textarea[name="comment"]').val();
220
- var proposal = form.find('textarea[name="proposal"]').val();
221
-
222
- if (text == '') {
223
- showError('Please enter a comment.');
224
- return;
225
- }
226
-
227
- // Disable the form that is being submitted.
228
- form.find('textarea,input').attr('disabled', 'disabled');
229
-
230
- // Send the comment to the server.
231
- $.ajax({
232
- type: "POST",
233
- url: opts.addCommentURL,
234
- dataType: 'json',
235
- data: {
236
- node: node_id,
237
- parent: parent_id,
238
- text: text,
239
- proposal: proposal
240
- },
241
- success: function(data, textStatus, error) {
242
- // Reset the form.
243
- if (node_id) {
244
- hideProposeChange(node_id);
245
- }
246
- form.find('textarea')
247
- .val('')
248
- .add(form.find('input'))
249
- .removeAttr('disabled');
250
- var ul = $('#cl' + (node_id || parent_id));
251
- if (ul.data('empty')) {
252
- $(ul).empty();
253
- ul.data('empty', false);
254
- }
255
- insertComment(data.comment);
256
- var ao = $('#ao' + node_id);
257
- ao.find('img').attr({'src': opts.commentBrightImage});
258
- if (node_id) {
259
- // if this was a "root" comment, remove the commenting box
260
- // (the user can get it back by reopening the comment popup)
261
- $('#ca' + node_id).slideUp();
262
- }
263
- },
264
- error: function(request, textStatus, error) {
265
- form.find('textarea,input').removeAttr('disabled');
266
- showError('Oops, there was a problem adding the comment.');
267
- }
268
- });
269
- }
270
-
271
- /**
272
- * Recursively append comments to the main comment list and children
273
- * lists, creating the comment tree.
274
- */
275
- function appendComments(comments, ul) {
276
- $.each(comments, function() {
277
- var div = createCommentDiv(this);
278
- ul.append($(document.createElement('li')).html(div));
279
- appendComments(this.children, div.find('ul.comment-children'));
280
- // To avoid stagnating data, don't store the comments children in data.
281
- this.children = null;
282
- div.data('comment', this);
283
- });
284
- }
285
-
286
- /**
287
- * After adding a new comment, it must be inserted in the correct
288
- * location in the comment tree.
289
- */
290
- function insertComment(comment) {
291
- var div = createCommentDiv(comment);
292
-
293
- // To avoid stagnating data, don't store the comments children in data.
294
- comment.children = null;
295
- div.data('comment', comment);
296
-
297
- var ul = $('#cl' + (comment.node || comment.parent));
298
- var siblings = getChildren(ul);
299
-
300
- var li = $(document.createElement('li'));
301
- li.hide();
302
-
303
- // Determine where in the parents children list to insert this comment.
304
- for(i=0; i < siblings.length; i++) {
305
- if (comp(comment, siblings[i]) <= 0) {
306
- $('#cd' + siblings[i].id)
307
- .parent()
308
- .before(li.html(div));
309
- li.slideDown('fast');
310
- return;
311
- }
312
- }
313
-
314
- // If we get here, this comment rates lower than all the others,
315
- // or it is the only comment in the list.
316
- ul.append(li.html(div));
317
- li.slideDown('fast');
318
- }
319
-
320
- function acceptComment(id) {
321
- $.ajax({
322
- type: 'POST',
323
- url: opts.acceptCommentURL,
324
- data: {id: id},
325
- success: function(data, textStatus, request) {
326
- $('#cm' + id).fadeOut('fast');
327
- $('#cd' + id).removeClass('moderate');
328
- },
329
- error: function(request, textStatus, error) {
330
- showError('Oops, there was a problem accepting the comment.');
331
- }
332
- });
333
- }
334
-
335
- function deleteComment(id) {
336
- $.ajax({
337
- type: 'POST',
338
- url: opts.deleteCommentURL,
339
- data: {id: id},
340
- success: function(data, textStatus, request) {
341
- var div = $('#cd' + id);
342
- if (data == 'delete') {
343
- // Moderator mode: remove the comment and all children immediately
344
- div.slideUp('fast', function() {
345
- div.remove();
346
- });
347
- return;
348
- }
349
- // User mode: only mark the comment as deleted
350
- div
351
- .find('span.user-id:first')
352
- .text('[deleted]').end()
353
- .find('div.comment-text:first')
354
- .text('[deleted]').end()
355
- .find('#cm' + id + ', #dc' + id + ', #ac' + id + ', #rc' + id +
356
- ', #sp' + id + ', #hp' + id + ', #cr' + id + ', #rl' + id)
357
- .remove();
358
- var comment = div.data('comment');
359
- comment.username = '[deleted]';
360
- comment.text = '[deleted]';
361
- div.data('comment', comment);
362
- },
363
- error: function(request, textStatus, error) {
364
- showError('Oops, there was a problem deleting the comment.');
365
- }
366
- });
367
- }
368
-
369
- function showProposal(id) {
370
- $('#sp' + id).hide();
371
- $('#hp' + id).show();
372
- $('#pr' + id).slideDown('fast');
373
- }
374
-
375
- function hideProposal(id) {
376
- $('#hp' + id).hide();
377
- $('#sp' + id).show();
378
- $('#pr' + id).slideUp('fast');
379
- }
380
-
381
- function showProposeChange(id) {
382
- $('#pc' + id).hide();
383
- $('#hc' + id).show();
384
- var textarea = $('#pt' + id);
385
- textarea.val(textarea.data('source'));
386
- $.fn.autogrow.resize(textarea[0]);
387
- textarea.slideDown('fast');
388
- }
389
-
390
- function hideProposeChange(id) {
391
- $('#hc' + id).hide();
392
- $('#pc' + id).show();
393
- var textarea = $('#pt' + id);
394
- textarea.val('').removeAttr('disabled');
395
- textarea.slideUp('fast');
396
- }
397
-
398
- function toggleCommentMarkupBox(id) {
399
- $('#mb' + id).toggle();
400
- }
401
-
402
- /** Handle when the user clicks on a sort by link. */
403
- function handleReSort(link) {
404
- var classes = link.attr('class').split(/\s+/);
405
- for (var i=0; i<classes.length; i++) {
406
- if (classes[i] != 'sort-option') {
407
- by = classes[i].substring(2);
408
- }
409
- }
410
- setComparator();
411
- // Save/update the sortBy cookie.
412
- var expiration = new Date();
413
- expiration.setDate(expiration.getDate() + 365);
414
- document.cookie= 'sortBy=' + escape(by) +
415
- ';expires=' + expiration.toUTCString();
416
- $('ul.comment-ul').each(function(index, ul) {
417
- var comments = getChildren($(ul), true);
418
- comments = sortComments(comments);
419
- appendComments(comments, $(ul).empty());
420
- });
421
- }
422
-
423
- /**
424
- * Function to process a vote when a user clicks an arrow.
425
- */
426
- function handleVote(link) {
427
- if (!opts.voting) {
428
- showError("You'll need to login to vote.");
429
- return;
430
- }
431
-
432
- var id = link.attr('id');
433
- if (!id) {
434
- // Didn't click on one of the voting arrows.
435
- return;
436
- }
437
- // If it is an unvote, the new vote value is 0,
438
- // Otherwise it's 1 for an upvote, or -1 for a downvote.
439
- var value = 0;
440
- if (id.charAt(1) != 'u') {
441
- value = id.charAt(0) == 'u' ? 1 : -1;
442
- }
443
- // The data to be sent to the server.
444
- var d = {
445
- comment_id: id.substring(2),
446
- value: value
447
- };
448
-
449
- // Swap the vote and unvote links.
450
- link.hide();
451
- $('#' + id.charAt(0) + (id.charAt(1) == 'u' ? 'v' : 'u') + d.comment_id)
452
- .show();
453
-
454
- // The div the comment is displayed in.
455
- var div = $('div#cd' + d.comment_id);
456
- var data = div.data('comment');
457
-
458
- // If this is not an unvote, and the other vote arrow has
459
- // already been pressed, unpress it.
460
- if ((d.value !== 0) && (data.vote === d.value * -1)) {
461
- $('#' + (d.value == 1 ? 'd' : 'u') + 'u' + d.comment_id).hide();
462
- $('#' + (d.value == 1 ? 'd' : 'u') + 'v' + d.comment_id).show();
463
- }
464
-
465
- // Update the comments rating in the local data.
466
- data.rating += (data.vote === 0) ? d.value : (d.value - data.vote);
467
- data.vote = d.value;
468
- div.data('comment', data);
469
-
470
- // Change the rating text.
471
- div.find('.rating:first')
472
- .text(data.rating + ' point' + (data.rating == 1 ? '' : 's'));
473
-
474
- // Send the vote information to the server.
475
- $.ajax({
476
- type: "POST",
477
- url: opts.processVoteURL,
478
- data: d,
479
- error: function(request, textStatus, error) {
480
- showError('Oops, there was a problem casting that vote.');
481
- }
482
- });
483
- }
484
-
485
- /**
486
- * Open a reply form used to reply to an existing comment.
487
- */
488
- function openReply(id) {
489
- // Swap out the reply link for the hide link
490
- $('#rl' + id).hide();
491
- $('#cr' + id).show();
492
-
493
- // Add the reply li to the children ul.
494
- var div = $(renderTemplate(replyTemplate, {id: id})).hide();
495
- $('#cl' + id)
496
- .prepend(div)
497
- // Setup the submit handler for the reply form.
498
- .find('#rf' + id)
499
- .submit(function(event) {
500
- event.preventDefault();
501
- addComment($('#rf' + id));
502
- closeReply(id);
503
- })
504
- .find('input[type=button]')
505
- .click(function() {
506
- closeReply(id);
507
- });
508
- div.slideDown('fast', function() {
509
- $('#rf' + id).find('textarea').focus();
510
- });
511
- }
512
-
513
- /**
514
- * Close the reply form opened with openReply.
515
- */
516
- function closeReply(id) {
517
- // Remove the reply div from the DOM.
518
- $('#rd' + id).slideUp('fast', function() {
519
- $(this).remove();
520
- });
521
-
522
- // Swap out the hide link for the reply link
523
- $('#cr' + id).hide();
524
- $('#rl' + id).show();
525
- }
526
-
527
- /**
528
- * Recursively sort a tree of comments using the comp comparator.
529
- */
530
- function sortComments(comments) {
531
- comments.sort(comp);
532
- $.each(comments, function() {
533
- this.children = sortComments(this.children);
534
- });
535
- return comments;
536
- }
537
-
538
- /**
539
- * Get the children comments from a ul. If recursive is true,
540
- * recursively include childrens' children.
541
- */
542
- function getChildren(ul, recursive) {
543
- var children = [];
544
- ul.children().children("[id^='cd']")
545
- .each(function() {
546
- var comment = $(this).data('comment');
547
- if (recursive)
548
- comment.children = getChildren($(this).find('#cl' + comment.id), true);
549
- children.push(comment);
550
- });
551
- return children;
552
- }
553
-
554
- /** Create a div to display a comment in. */
555
- function createCommentDiv(comment) {
556
- if (!comment.displayed && !opts.moderator) {
557
- return $('<div class="moderate">Thank you! Your comment will show up '
558
- + 'once it is has been approved by a moderator.</div>');
559
- }
560
- // Prettify the comment rating.
561
- comment.pretty_rating = comment.rating + ' point' +
562
- (comment.rating == 1 ? '' : 's');
563
- // Make a class (for displaying not yet moderated comments differently)
564
- comment.css_class = comment.displayed ? '' : ' moderate';
565
- // Create a div for this comment.
566
- var context = $.extend({}, opts, comment);
567
- var div = $(renderTemplate(commentTemplate, context));
568
-
569
- // If the user has voted on this comment, highlight the correct arrow.
570
- if (comment.vote) {
571
- var direction = (comment.vote == 1) ? 'u' : 'd';
572
- div.find('#' + direction + 'v' + comment.id).hide();
573
- div.find('#' + direction + 'u' + comment.id).show();
574
- }
575
-
576
- if (opts.moderator || comment.text != '[deleted]') {
577
- div.find('a.reply').show();
578
- if (comment.proposal_diff)
579
- div.find('#sp' + comment.id).show();
580
- if (opts.moderator && !comment.displayed)
581
- div.find('#cm' + comment.id).show();
582
- if (opts.moderator || (opts.username == comment.username))
583
- div.find('#dc' + comment.id).show();
584
- }
585
- return div;
586
- }
587
-
588
- /**
589
- * A simple template renderer. Placeholders such as <%id%> are replaced
590
- * by context['id'] with items being escaped. Placeholders such as <#id#>
591
- * are not escaped.
592
- */
593
- function renderTemplate(template, context) {
594
- var esc = $(document.createElement('div'));
595
-
596
- function handle(ph, escape) {
597
- var cur = context;
598
- $.each(ph.split('.'), function() {
599
- cur = cur[this];
600
- });
601
- return escape ? esc.text(cur || "").html() : cur;
602
- }
603
-
604
- return template.replace(/<([%#])([\w\.]*)\1>/g, function() {
605
- return handle(arguments[2], arguments[1] == '%' ? true : false);
606
- });
607
- }
608
-
609
- /** Flash an error message briefly. */
610
- function showError(message) {
611
- $(document.createElement('div')).attr({'class': 'popup-error'})
612
- .append($(document.createElement('div'))
613
- .attr({'class': 'error-message'}).text(message))
614
- .appendTo('body')
615
- .fadeIn("slow")
616
- .delay(2000)
617
- .fadeOut("slow");
618
- }
619
-
620
- /** Add a link the user uses to open the comments popup. */
621
- $.fn.comment = function() {
622
- return this.each(function() {
623
- var id = $(this).attr('id').substring(1);
624
- var count = COMMENT_METADATA[id];
625
- var title = count + ' comment' + (count == 1 ? '' : 's');
626
- var image = count > 0 ? opts.commentBrightImage : opts.commentImage;
627
- var addcls = count == 0 ? ' nocomment' : '';
628
- $(this)
629
- .append(
630
- $(document.createElement('a')).attr({
631
- href: '#',
632
- 'class': 'sphinx-comment-open' + addcls,
633
- id: 'ao' + id
634
- })
635
- .append($(document.createElement('img')).attr({
636
- src: image,
637
- alt: 'comment',
638
- title: title
639
- }))
640
- .click(function(event) {
641
- event.preventDefault();
642
- show($(this).attr('id').substring(2));
643
- })
644
- )
645
- .append(
646
- $(document.createElement('a')).attr({
647
- href: '#',
648
- 'class': 'sphinx-comment-close hidden',
649
- id: 'ah' + id
650
- })
651
- .append($(document.createElement('img')).attr({
652
- src: opts.closeCommentImage,
653
- alt: 'close',
654
- title: 'close'
655
- }))
656
- .click(function(event) {
657
- event.preventDefault();
658
- hide($(this).attr('id').substring(2));
659
- })
660
- );
661
- });
662
- };
663
-
664
- var opts = {
665
- processVoteURL: '/_process_vote',
666
- addCommentURL: '/_add_comment',
667
- getCommentsURL: '/_get_comments',
668
- acceptCommentURL: '/_accept_comment',
669
- deleteCommentURL: '/_delete_comment',
670
- commentImage: '/static/_static/comment.png',
671
- closeCommentImage: '/static/_static/comment-close.png',
672
- loadingImage: '/static/_static/ajax-loader.gif',
673
- commentBrightImage: '/static/_static/comment-bright.png',
674
- upArrow: '/static/_static/up.png',
675
- downArrow: '/static/_static/down.png',
676
- upArrowPressed: '/static/_static/up-pressed.png',
677
- downArrowPressed: '/static/_static/down-pressed.png',
678
- voting: false,
679
- moderator: false
680
- };
681
-
682
- if (typeof COMMENT_OPTIONS != "undefined") {
683
- opts = jQuery.extend(opts, COMMENT_OPTIONS);
684
- }
685
-
686
- var popupTemplate = '\
687
- <div class="sphinx-comments" id="sc<%id%>">\
688
- <p class="sort-options">\
689
- Sort by:\
690
- <a href="#" class="sort-option byrating">best rated</a>\
691
- <a href="#" class="sort-option byascage">newest</a>\
692
- <a href="#" class="sort-option byage">oldest</a>\
693
- </p>\
694
- <div class="comment-header">Comments</div>\
695
- <div class="comment-loading" id="cn<%id%>">\
696
- loading comments... <img src="<%loadingImage%>" alt="" /></div>\
697
- <ul id="cl<%id%>" class="comment-ul"></ul>\
698
- <div id="ca<%id%>">\
699
- <p class="add-a-comment">Add a comment\
700
- (<a href="#" class="comment-markup" id="ab<%id%>">markup</a>):</p>\
701
- <div class="comment-markup-box" id="mb<%id%>">\
702
- reStructured text markup: <i>*emph*</i>, <b>**strong**</b>, \
703
- <code>``code``</code>, \
704
- code blocks: <code>::</code> and an indented block after blank line</div>\
705
- <form method="post" id="cf<%id%>" class="comment-form" action="">\
706
- <textarea name="comment" cols="80"></textarea>\
707
- <p class="propose-button">\
708
- <a href="#" id="pc<%id%>" class="show-propose-change">\
709
- Propose a change &#9657;\
710
- </a>\
711
- <a href="#" id="hc<%id%>" class="hide-propose-change">\
712
- Propose a change &#9663;\
713
- </a>\
714
- </p>\
715
- <textarea name="proposal" id="pt<%id%>" cols="80"\
716
- spellcheck="false"></textarea>\
717
- <input type="submit" value="Add comment" />\
718
- <input type="hidden" name="node" value="<%id%>" />\
719
- <input type="hidden" name="parent" value="" />\
720
- </form>\
721
- </div>\
722
- </div>';
723
-
724
- var commentTemplate = '\
725
- <div id="cd<%id%>" class="sphinx-comment<%css_class%>">\
726
- <div class="vote">\
727
- <div class="arrow">\
728
- <a href="#" id="uv<%id%>" class="vote" title="vote up">\
729
- <img src="<%upArrow%>" />\
730
- </a>\
731
- <a href="#" id="uu<%id%>" class="un vote" title="vote up">\
732
- <img src="<%upArrowPressed%>" />\
733
- </a>\
734
- </div>\
735
- <div class="arrow">\
736
- <a href="#" id="dv<%id%>" class="vote" title="vote down">\
737
- <img src="<%downArrow%>" id="da<%id%>" />\
738
- </a>\
739
- <a href="#" id="du<%id%>" class="un vote" title="vote down">\
740
- <img src="<%downArrowPressed%>" />\
741
- </a>\
742
- </div>\
743
- </div>\
744
- <div class="comment-content">\
745
- <p class="tagline comment">\
746
- <span class="user-id"><%username%></span>\
747
- <span class="rating"><%pretty_rating%></span>\
748
- <span class="delta"><%time.delta%></span>\
749
- </p>\
750
- <div class="comment-text comment"><#text#></div>\
751
- <p class="comment-opts comment">\
752
- <a href="#" class="reply hidden" id="rl<%id%>">reply &#9657;</a>\
753
- <a href="#" class="close-reply" id="cr<%id%>">reply &#9663;</a>\
754
- <a href="#" id="sp<%id%>" class="show-proposal">proposal &#9657;</a>\
755
- <a href="#" id="hp<%id%>" class="hide-proposal">proposal &#9663;</a>\
756
- <a href="#" id="dc<%id%>" class="delete-comment hidden">delete</a>\
757
- <span id="cm<%id%>" class="moderation hidden">\
758
- <a href="#" id="ac<%id%>" class="accept-comment">accept</a>\
759
- </span>\
760
- </p>\
761
- <pre class="proposal" id="pr<%id%>">\
762
- <#proposal_diff#>\
763
- </pre>\
764
- <ul class="comment-children" id="cl<%id%>"></ul>\
765
- </div>\
766
- <div class="clearleft"></div>\
767
- </div>\
768
- </div>';
769
-
770
- var replyTemplate = '\
771
- <li>\
772
- <div class="reply-div" id="rd<%id%>">\
773
- <form id="rf<%id%>">\
774
- <textarea name="comment" cols="80"></textarea>\
775
- <input type="submit" value="Add reply" />\
776
- <input type="button" value="Cancel" />\
777
- <input type="hidden" name="parent" value="<%id%>" />\
778
- <input type="hidden" name="node" value="" />\
779
- </form>\
780
- </div>\
781
- </li>';
782
-
783
- $(document).ready(function() {
784
- init();
785
- });
786
- })(jQuery);
787
-
788
- $(document).ready(function() {
789
- // add comment anchors for all paragraphs that are commentable
790
- $('.sphinx-has-comment').comment();
791
-
792
- // highlight search words in search results
793
- $("div.context").each(function() {
794
- var params = $.getQueryParameters();
795
- var terms = (params.q) ? params.q[0].split(/\s+/) : [];
796
- var result = $(this);
797
- $.each(terms, function() {
798
- result.highlightText(this.toLowerCase(), 'highlighted');
799
- });
800
- });
801
-
802
- // directly open comment window if requested
803
- var anchor = document.location.hash;
804
- if (anchor.substring(0, 9) == '#comment-') {
805
- $('#ao' + anchor.substring(9)).click();
806
- document.location.hash = '#s' + anchor.substring(9);
807
- }
808
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docs/_build/html/genindex.html DELETED
@@ -1,92 +0,0 @@
1
-
2
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
3
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4
-
5
-
6
- <html xmlns="http://www.w3.org/1999/xhtml">
7
- <head>
8
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
9
-
10
- <title>Index &mdash; pytube 5.1.0 documentation</title>
11
-
12
- <link rel="stylesheet" href="_static/classic.css" type="text/css" />
13
- <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
14
-
15
- <script type="text/javascript">
16
- var DOCUMENTATION_OPTIONS = {
17
- URL_ROOT: './',
18
- VERSION: '5.1.0',
19
- COLLAPSE_INDEX: false,
20
- FILE_SUFFIX: '.html',
21
- HAS_SOURCE: true
22
- };
23
- </script>
24
- <script type="text/javascript" src="_static/jquery.js"></script>
25
- <script type="text/javascript" src="_static/underscore.js"></script>
26
- <script type="text/javascript" src="_static/doctools.js"></script>
27
- <link rel="top" title="pytube 5.1.0 documentation" href="index.html" />
28
- </head>
29
- <body role="document">
30
- <div class="related" role="navigation" aria-label="related navigation">
31
- <h3>Navigation</h3>
32
- <ul>
33
- <li class="right" style="margin-right: 10px">
34
- <a href="#" title="General Index"
35
- accesskey="I">index</a></li>
36
- <li class="nav-item nav-item-0"><a href="index.html">pytube 5.1.0 documentation</a> &raquo;</li>
37
- </ul>
38
- </div>
39
-
40
- <div class="document">
41
- <div class="documentwrapper">
42
- <div class="bodywrapper">
43
- <div class="body" role="main">
44
-
45
-
46
- <h1 id="index">Index</h1>
47
-
48
- <div class="genindex-jumpbox">
49
-
50
- </div>
51
-
52
-
53
- </div>
54
- </div>
55
- </div>
56
- <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
57
- <div class="sphinxsidebarwrapper">
58
-
59
-
60
-
61
- <div id="searchbox" style="display: none" role="search">
62
- <h3>Quick search</h3>
63
- <form class="search" action="search.html" method="get">
64
- <input type="text" name="q" />
65
- <input type="submit" value="Go" />
66
- <input type="hidden" name="check_keywords" value="yes" />
67
- <input type="hidden" name="area" value="default" />
68
- </form>
69
- <p class="searchtip" style="font-size: 90%">
70
- Enter search terms or a module, class or function name.
71
- </p>
72
- </div>
73
- <script type="text/javascript">$('#searchbox').show(0);</script>
74
- </div>
75
- </div>
76
- <div class="clearer"></div>
77
- </div>
78
- <div class="related" role="navigation" aria-label="related navigation">
79
- <h3>Navigation</h3>
80
- <ul>
81
- <li class="right" style="margin-right: 10px">
82
- <a href="#" title="General Index"
83
- >index</a></li>
84
- <li class="nav-item nav-item-0"><a href="index.html">pytube 5.1.0 documentation</a> &raquo;</li>
85
- </ul>
86
- </div>
87
- <div class="footer" role="contentinfo">
88
- &copy; Copyright 2015, Nick Ficano.
89
- Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.3.1.
90
- </div>
91
- </body>
92
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docs/_build/html/index.html DELETED
@@ -1,111 +0,0 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
-
4
-
5
- <html xmlns="http://www.w3.org/1999/xhtml">
6
- <head>
7
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
8
-
9
- <title>Welcome to pytube’s documentation! &mdash; pytube 5.1.0 documentation</title>
10
-
11
- <link rel="stylesheet" href="_static/classic.css" type="text/css" />
12
- <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
13
-
14
- <script type="text/javascript">
15
- var DOCUMENTATION_OPTIONS = {
16
- URL_ROOT: './',
17
- VERSION: '5.1.0',
18
- COLLAPSE_INDEX: false,
19
- FILE_SUFFIX: '.html',
20
- HAS_SOURCE: true
21
- };
22
- </script>
23
- <script type="text/javascript" src="_static/jquery.js"></script>
24
- <script type="text/javascript" src="_static/underscore.js"></script>
25
- <script type="text/javascript" src="_static/doctools.js"></script>
26
- <link rel="top" title="pytube 5.1.0 documentation" href="#" />
27
- </head>
28
- <body role="document">
29
- <div class="related" role="navigation" aria-label="related navigation">
30
- <h3>Navigation</h3>
31
- <ul>
32
- <li class="right" style="margin-right: 10px">
33
- <a href="genindex.html" title="General Index"
34
- accesskey="I">index</a></li>
35
- <li class="nav-item nav-item-0"><a href="#">pytube 5.1.0 documentation</a> &raquo;</li>
36
- </ul>
37
- </div>
38
-
39
- <div class="document">
40
- <div class="documentwrapper">
41
- <div class="bodywrapper">
42
- <div class="body" role="main">
43
-
44
- <div class="section" id="welcome-to-pytube-s-documentation">
45
- <h1>Welcome to pytube&#8217;s documentation!<a class="headerlink" href="#welcome-to-pytube-s-documentation" title="Permalink to this headline">¶</a></h1>
46
- <p>Contents:</p>
47
- <div class="toctree-wrapper compound">
48
- <ul class="simple">
49
- </ul>
50
- </div>
51
- </div>
52
- <div class="section" id="indices-and-tables">
53
- <h1>Indices and tables<a class="headerlink" href="#indices-and-tables" title="Permalink to this headline">¶</a></h1>
54
- <ul class="simple">
55
- <li><a class="reference internal" href="genindex.html"><span>Index</span></a></li>
56
- <li><a class="reference internal" href="py-modindex.html"><span>Module Index</span></a></li>
57
- <li><a class="reference internal" href="search.html"><span>Search Page</span></a></li>
58
- </ul>
59
- </div>
60
-
61
-
62
- </div>
63
- </div>
64
- </div>
65
- <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
66
- <div class="sphinxsidebarwrapper">
67
- <h3><a href="#">Table Of Contents</a></h3>
68
- <ul>
69
- <li><a class="reference internal" href="#">Welcome to pytube&#8217;s documentation!</a></li>
70
- <li><a class="reference internal" href="#indices-and-tables">Indices and tables</a></li>
71
- </ul>
72
-
73
- <div role="note" aria-label="source link">
74
- <h3>This Page</h3>
75
- <ul class="this-page-menu">
76
- <li><a href="_sources/index.txt"
77
- rel="nofollow">Show Source</a></li>
78
- </ul>
79
- </div>
80
- <div id="searchbox" style="display: none" role="search">
81
- <h3>Quick search</h3>
82
- <form class="search" action="search.html" method="get">
83
- <input type="text" name="q" />
84
- <input type="submit" value="Go" />
85
- <input type="hidden" name="check_keywords" value="yes" />
86
- <input type="hidden" name="area" value="default" />
87
- </form>
88
- <p class="searchtip" style="font-size: 90%">
89
- Enter search terms or a module, class or function name.
90
- </p>
91
- </div>
92
- <script type="text/javascript">$('#searchbox').show(0);</script>
93
- </div>
94
- </div>
95
- <div class="clearer"></div>
96
- </div>
97
- <div class="related" role="navigation" aria-label="related navigation">
98
- <h3>Navigation</h3>
99
- <ul>
100
- <li class="right" style="margin-right: 10px">
101
- <a href="genindex.html" title="General Index"
102
- >index</a></li>
103
- <li class="nav-item nav-item-0"><a href="#">pytube 5.1.0 documentation</a> &raquo;</li>
104
- </ul>
105
- </div>
106
- <div class="footer" role="contentinfo">
107
- &copy; Copyright 2015, Nick Ficano.
108
- Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.3.1.
109
- </div>
110
- </body>
111
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docs/_build/html/objects.inv DELETED
Binary file (202 Bytes)
 
docs/_build/html/search.html DELETED
@@ -1,99 +0,0 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
-
4
-
5
- <html xmlns="http://www.w3.org/1999/xhtml">
6
- <head>
7
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
8
-
9
- <title>Search &mdash; pytube 5.1.0 documentation</title>
10
-
11
- <link rel="stylesheet" href="_static/classic.css" type="text/css" />
12
- <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
13
-
14
- <script type="text/javascript">
15
- var DOCUMENTATION_OPTIONS = {
16
- URL_ROOT: './',
17
- VERSION: '5.1.0',
18
- COLLAPSE_INDEX: false,
19
- FILE_SUFFIX: '.html',
20
- HAS_SOURCE: true
21
- };
22
- </script>
23
- <script type="text/javascript" src="_static/jquery.js"></script>
24
- <script type="text/javascript" src="_static/underscore.js"></script>
25
- <script type="text/javascript" src="_static/doctools.js"></script>
26
- <script type="text/javascript" src="_static/searchtools.js"></script>
27
- <link rel="top" title="pytube 5.1.0 documentation" href="index.html" />
28
- <script type="text/javascript">
29
- jQuery(function() { Search.loadIndex("searchindex.js"); });
30
- </script>
31
-
32
- <script type="text/javascript" id="searchindexloader"></script>
33
-
34
-
35
- </head>
36
- <body role="document">
37
- <div class="related" role="navigation" aria-label="related navigation">
38
- <h3>Navigation</h3>
39
- <ul>
40
- <li class="right" style="margin-right: 10px">
41
- <a href="genindex.html" title="General Index"
42
- accesskey="I">index</a></li>
43
- <li class="nav-item nav-item-0"><a href="index.html">pytube 5.1.0 documentation</a> &raquo;</li>
44
- </ul>
45
- </div>
46
-
47
- <div class="document">
48
- <div class="documentwrapper">
49
- <div class="bodywrapper">
50
- <div class="body" role="main">
51
-
52
- <h1 id="search-documentation">Search</h1>
53
- <div id="fallback" class="admonition warning">
54
- <script type="text/javascript">$('#fallback').hide();</script>
55
- <p>
56
- Please activate JavaScript to enable the search
57
- functionality.
58
- </p>
59
- </div>
60
- <p>
61
- From here you can search these documents. Enter your search
62
- words into the box below and click "search". Note that the search
63
- function will automatically search for all of the words. Pages
64
- containing fewer words won't appear in the result list.
65
- </p>
66
- <form action="" method="get">
67
- <input type="text" name="q" value="" />
68
- <input type="submit" value="search" />
69
- <span id="search-progress" style="padding-left: 10px"></span>
70
- </form>
71
-
72
- <div id="search-results">
73
-
74
- </div>
75
-
76
- </div>
77
- </div>
78
- </div>
79
- <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
80
- <div class="sphinxsidebarwrapper">
81
- </div>
82
- </div>
83
- <div class="clearer"></div>
84
- </div>
85
- <div class="related" role="navigation" aria-label="related navigation">
86
- <h3>Navigation</h3>
87
- <ul>
88
- <li class="right" style="margin-right: 10px">
89
- <a href="genindex.html" title="General Index"
90
- >index</a></li>
91
- <li class="nav-item nav-item-0"><a href="index.html">pytube 5.1.0 documentation</a> &raquo;</li>
92
- </ul>
93
- </div>
94
- <div class="footer" role="contentinfo">
95
- &copy; Copyright 2015, Nick Ficano.
96
- Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.3.1.
97
- </div>
98
- </body>
99
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docs/_build/html/searchindex.js DELETED
@@ -1 +0,0 @@
1
- Search.setIndex({envversion:46,filenames:["index"],objects:{},objnames:{},objtypes:{},terms:{content:0,index:0,modul:0,page:0,search:0},titles:["Welcome to pytube&#8217;s documentation!"],titleterms:{document:0,indic:0,pytub:0,tabl:0,welcom:0}})
 
 
docs/conf.py DELETED
@@ -1,290 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
- #
3
- # pytube documentation build configuration file, created by
4
- # sphinx-quickstart on Fri Sep 25 16:57:20 2015.
5
- #
6
- # This file is execfile()d with the current directory set to its
7
- # containing dir.
8
- #
9
- # Note that not all possible configuration values are present in this
10
- # autogenerated file.
11
- #
12
- # All configuration values have a default; values that are commented out
13
- # serve to show the default.
14
-
15
- import sys
16
- import os
17
- import shlex
18
-
19
- # If extensions (or modules to document with autodoc) are in another directory,
20
- # add these directories to sys.path here. If the directory is relative to the
21
- # documentation root, use os.path.abspath to make it absolute, like shown here.
22
- sys.path.insert(0, os.path.abspath('..'))
23
- import pytube
24
- from pytube import __version__
25
-
26
- # -- General configuration ------------------------------------------------
27
-
28
- # If your documentation needs a minimal Sphinx version, state it here.
29
- #needs_sphinx = '1.0'
30
-
31
- # Add any Sphinx extension module names here, as strings. They can be
32
- # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
33
- # ones.
34
- extensions = [
35
- 'sphinx.ext.autodoc',
36
- 'sphinx.ext.todo',
37
- 'sphinx.ext.coverage',
38
- ]
39
-
40
- # Add any paths that contain templates here, relative to this directory.
41
- templates_path = ['_templates']
42
-
43
- # The suffix(es) of source filenames.
44
- # You can specify multiple suffix as a list of string:
45
- # source_suffix = ['.rst', '.md']
46
- source_suffix = '.rst'
47
-
48
- # The encoding of source files.
49
- #source_encoding = 'utf-8-sig'
50
-
51
- # The master toctree document.
52
- master_doc = 'index'
53
-
54
- # General information about the project.
55
- project = u'pytube'
56
- copyright = u'2015, Nick Ficano'
57
- author = u'Nick Ficano'
58
-
59
- # The version info for the project you're documenting, acts as replacement for
60
- # |version| and |release|, also used in various other places throughout the
61
- # built documents.
62
- #
63
- # The short X.Y version.
64
- version = '5.1.0'
65
- # The full version, including alpha/beta/rc tags.
66
- release = '5.1.0'
67
-
68
- # The language for content autogenerated by Sphinx. Refer to documentation
69
- # for a list of supported languages.
70
- #
71
- # This is also used if you do content translation via gettext catalogs.
72
- # Usually you set "language" from the command line for these cases.
73
- language = None
74
-
75
- # There are two options for replacing |today|: either, you set today to some
76
- # non-false value, then it is used:
77
- #today = ''
78
- # Else, today_fmt is used as the format for a strftime call.
79
- #today_fmt = '%B %d, %Y'
80
-
81
- # List of patterns, relative to source directory, that match files and
82
- # directories to ignore when looking for source files.
83
- exclude_patterns = ['_build']
84
-
85
- # The reST default role (used for this markup: `text`) to use for all
86
- # documents.
87
- #default_role = None
88
-
89
- # If true, '()' will be appended to :func: etc. cross-reference text.
90
- #add_function_parentheses = True
91
-
92
- # If true, the current module name will be prepended to all description
93
- # unit titles (such as .. function::).
94
- #add_module_names = True
95
-
96
- # If true, sectionauthor and moduleauthor directives will be shown in the
97
- # output. They are ignored by default.
98
- #show_authors = False
99
-
100
- # The name of the Pygments (syntax highlighting) style to use.
101
- pygments_style = 'sphinx'
102
-
103
- # A list of ignored prefixes for module index sorting.
104
- #modindex_common_prefix = []
105
-
106
- # If true, keep warnings as "system message" paragraphs in the built documents.
107
- #keep_warnings = False
108
-
109
- # If true, `todo` and `todoList` produce output, else they produce nothing.
110
- todo_include_todos = True
111
-
112
-
113
- # -- Options for HTML output ----------------------------------------------
114
-
115
- # The theme to use for HTML and HTML Help pages. See the documentation for
116
- # a list of builtin themes.
117
- html_theme = 'default'
118
-
119
- # Theme options are theme-specific and customize the look and feel of a theme
120
- # further. For a list of options available for each theme, see the
121
- # documentation.
122
- #html_theme_options = {}
123
-
124
- # Add any paths that contain custom themes here, relative to this directory.
125
- #html_theme_path = []
126
-
127
- # The name for this set of Sphinx documents. If None, it defaults to
128
- # "<project> v<release> documentation".
129
- #html_title = None
130
-
131
- # A shorter title for the navigation bar. Default is the same as html_title.
132
- #html_short_title = None
133
-
134
- # The name of an image file (relative to this directory) to place at the top
135
- # of the sidebar.
136
- #html_logo = None
137
-
138
- # The name of an image file (within the static path) to use as favicon of the
139
- # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
140
- # pixels large.
141
- #html_favicon = None
142
-
143
- # Add any paths that contain custom static files (such as style sheets) here,
144
- # relative to this directory. They are copied after the builtin static files,
145
- # so a file named "default.css" will overwrite the builtin "default.css".
146
- html_static_path = ['_static']
147
-
148
- # Add any extra paths that contain custom files (such as robots.txt or
149
- # .htaccess) here, relative to this directory. These files are copied
150
- # directly to the root of the documentation.
151
- #html_extra_path = []
152
-
153
- # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
154
- # using the given strftime format.
155
- #html_last_updated_fmt = '%b %d, %Y'
156
-
157
- # If true, SmartyPants will be used to convert quotes and dashes to
158
- # typographically correct entities.
159
- #html_use_smartypants = True
160
-
161
- # Custom sidebar templates, maps document names to template names.
162
- #html_sidebars = {}
163
-
164
- # Additional templates that should be rendered to pages, maps page names to
165
- # template names.
166
- #html_additional_pages = {}
167
-
168
- # If false, no module index is generated.
169
- #html_domain_indices = True
170
-
171
- # If false, no index is generated.
172
- #html_use_index = True
173
-
174
- # If true, the index is split into individual pages for each letter.
175
- #html_split_index = False
176
-
177
- # If true, links to the reST sources are added to the pages.
178
- #html_show_sourcelink = True
179
-
180
- # If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
181
- #html_show_sphinx = True
182
-
183
- # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
184
- #html_show_copyright = True
185
-
186
- # If true, an OpenSearch description file will be output, and all pages will
187
- # contain a <link> tag referring to it. The value of this option must be the
188
- # base URL from which the finished HTML is served.
189
- #html_use_opensearch = ''
190
-
191
- # This is the file name suffix for HTML files (e.g. ".xhtml").
192
- #html_file_suffix = None
193
-
194
- # Language to be used for generating the HTML full-text search index.
195
- # Sphinx supports the following languages:
196
- # 'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja'
197
- # 'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr'
198
- #html_search_language = 'en'
199
-
200
- # A dictionary with options for the search language support, empty by default.
201
- # Now only 'ja' uses this config value
202
- #html_search_options = {'type': 'default'}
203
-
204
- # The name of a javascript file (relative to the configuration directory) that
205
- # implements a search results scorer. If empty, the default will be used.
206
- #html_search_scorer = 'scorer.js'
207
-
208
- # Output file base name for HTML help builder.
209
- htmlhelp_basename = 'pytubedoc'
210
-
211
- # -- Options for LaTeX output ---------------------------------------------
212
-
213
- latex_elements = {
214
- # The paper size ('letterpaper' or 'a4paper').
215
- #'papersize': 'letterpaper',
216
-
217
- # The font size ('10pt', '11pt' or '12pt').
218
- #'pointsize': '10pt',
219
-
220
- # Additional stuff for the LaTeX preamble.
221
- #'preamble': '',
222
-
223
- # Latex figure (float) alignment
224
- #'figure_align': 'htbp',
225
- }
226
-
227
- # Grouping the document tree into LaTeX files. List of tuples
228
- # (source start file, target name, title,
229
- # author, documentclass [howto, manual, or own class]).
230
- latex_documents = [
231
- (master_doc, 'pytube.tex', u'pytube Documentation',
232
- u'Nick Ficano', 'manual'),
233
- ]
234
-
235
- # The name of an image file (relative to this directory) to place at the top of
236
- # the title page.
237
- #latex_logo = None
238
-
239
- # For "manual" documents, if this is true, then toplevel headings are parts,
240
- # not chapters.
241
- #latex_use_parts = False
242
-
243
- # If true, show page references after internal links.
244
- #latex_show_pagerefs = False
245
-
246
- # If true, show URL addresses after external links.
247
- #latex_show_urls = False
248
-
249
- # Documents to append as an appendix to all manuals.
250
- #latex_appendices = []
251
-
252
- # If false, no module index is generated.
253
- #latex_domain_indices = True
254
-
255
-
256
- # -- Options for manual page output ---------------------------------------
257
-
258
- # One entry per manual page. List of tuples
259
- # (source start file, name, description, authors, manual section).
260
- man_pages = [
261
- (master_doc, 'pytube', u'pytube Documentation',
262
- [author], 1)
263
- ]
264
-
265
- # If true, show URL addresses after external links.
266
- #man_show_urls = False
267
-
268
-
269
- # -- Options for Texinfo output -------------------------------------------
270
-
271
- # Grouping the document tree into Texinfo files. List of tuples
272
- # (source start file, target name, title, author,
273
- # dir menu entry, description, category)
274
- texinfo_documents = [
275
- (master_doc, 'pytube', u'pytube Documentation',
276
- author, 'pytube', 'One line description of project.',
277
- 'Miscellaneous'),
278
- ]
279
-
280
- # Documents to append as an appendix to all manuals.
281
- #texinfo_appendices = []
282
-
283
- # If false, no module index is generated.
284
- #texinfo_domain_indices = True
285
-
286
- # How to display URL addresses: 'footnote', 'no', or 'inline'.
287
- #texinfo_show_urls = 'footnote'
288
-
289
- # If true, do not generate a @detailmenu in the "Top" node's menu.
290
- #texinfo_no_detailmenu = False
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docs/index.rst DELETED
@@ -1,22 +0,0 @@
1
- .. pytube documentation master file, created by
2
- sphinx-quickstart on Fri Sep 25 16:57:20 2015.
3
- You can adapt this file completely to your liking, but it should at least
4
- contain the root `toctree` directive.
5
-
6
- Welcome to pytube's documentation!
7
- ==================================
8
-
9
- Contents:
10
-
11
- .. toctree::
12
- :maxdepth: 2
13
-
14
-
15
-
16
- Indices and tables
17
- ==================
18
-
19
- * :ref:`genindex`
20
- * :ref:`modindex`
21
- * :ref:`search`
22
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docs/make.bat DELETED
@@ -1,263 +0,0 @@
1
- @ECHO OFF
2
-
3
- REM Command file for Sphinx documentation
4
-
5
- if "%SPHINXBUILD%" == "" (
6
- set SPHINXBUILD=sphinx-build
7
- )
8
- set BUILDDIR=_build
9
- set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% .
10
- set I18NSPHINXOPTS=%SPHINXOPTS% .
11
- if NOT "%PAPER%" == "" (
12
- set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS%
13
- set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS%
14
- )
15
-
16
- if "%1" == "" goto help
17
-
18
- if "%1" == "help" (
19
- :help
20
- echo.Please use `make ^<target^>` where ^<target^> is one of
21
- echo. html to make standalone HTML files
22
- echo. dirhtml to make HTML files named index.html in directories
23
- echo. singlehtml to make a single large HTML file
24
- echo. pickle to make pickle files
25
- echo. json to make JSON files
26
- echo. htmlhelp to make HTML files and a HTML help project
27
- echo. qthelp to make HTML files and a qthelp project
28
- echo. devhelp to make HTML files and a Devhelp project
29
- echo. epub to make an epub
30
- echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter
31
- echo. text to make text files
32
- echo. man to make manual pages
33
- echo. texinfo to make Texinfo files
34
- echo. gettext to make PO message catalogs
35
- echo. changes to make an overview over all changed/added/deprecated items
36
- echo. xml to make Docutils-native XML files
37
- echo. pseudoxml to make pseudoxml-XML files for display purposes
38
- echo. linkcheck to check all external links for integrity
39
- echo. doctest to run all doctests embedded in the documentation if enabled
40
- echo. coverage to run coverage check of the documentation if enabled
41
- goto end
42
- )
43
-
44
- if "%1" == "clean" (
45
- for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i
46
- del /q /s %BUILDDIR%\*
47
- goto end
48
- )
49
-
50
-
51
- REM Check if sphinx-build is available and fallback to Python version if any
52
- %SPHINXBUILD% 2> nul
53
- if errorlevel 9009 goto sphinx_python
54
- goto sphinx_ok
55
-
56
- :sphinx_python
57
-
58
- set SPHINXBUILD=python -m sphinx.__init__
59
- %SPHINXBUILD% 2> nul
60
- if errorlevel 9009 (
61
- echo.
62
- echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
63
- echo.installed, then set the SPHINXBUILD environment variable to point
64
- echo.to the full path of the 'sphinx-build' executable. Alternatively you
65
- echo.may add the Sphinx directory to PATH.
66
- echo.
67
- echo.If you don't have Sphinx installed, grab it from
68
- echo.http://sphinx-doc.org/
69
- exit /b 1
70
- )
71
-
72
- :sphinx_ok
73
-
74
-
75
- if "%1" == "html" (
76
- %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html
77
- if errorlevel 1 exit /b 1
78
- echo.
79
- echo.Build finished. The HTML pages are in %BUILDDIR%/html.
80
- goto end
81
- )
82
-
83
- if "%1" == "dirhtml" (
84
- %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml
85
- if errorlevel 1 exit /b 1
86
- echo.
87
- echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml.
88
- goto end
89
- )
90
-
91
- if "%1" == "singlehtml" (
92
- %SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml
93
- if errorlevel 1 exit /b 1
94
- echo.
95
- echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml.
96
- goto end
97
- )
98
-
99
- if "%1" == "pickle" (
100
- %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle
101
- if errorlevel 1 exit /b 1
102
- echo.
103
- echo.Build finished; now you can process the pickle files.
104
- goto end
105
- )
106
-
107
- if "%1" == "json" (
108
- %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json
109
- if errorlevel 1 exit /b 1
110
- echo.
111
- echo.Build finished; now you can process the JSON files.
112
- goto end
113
- )
114
-
115
- if "%1" == "htmlhelp" (
116
- %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp
117
- if errorlevel 1 exit /b 1
118
- echo.
119
- echo.Build finished; now you can run HTML Help Workshop with the ^
120
- .hhp project file in %BUILDDIR%/htmlhelp.
121
- goto end
122
- )
123
-
124
- if "%1" == "qthelp" (
125
- %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp
126
- if errorlevel 1 exit /b 1
127
- echo.
128
- echo.Build finished; now you can run "qcollectiongenerator" with the ^
129
- .qhcp project file in %BUILDDIR%/qthelp, like this:
130
- echo.^> qcollectiongenerator %BUILDDIR%\qthelp\pytube.qhcp
131
- echo.To view the help file:
132
- echo.^> assistant -collectionFile %BUILDDIR%\qthelp\pytube.ghc
133
- goto end
134
- )
135
-
136
- if "%1" == "devhelp" (
137
- %SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp
138
- if errorlevel 1 exit /b 1
139
- echo.
140
- echo.Build finished.
141
- goto end
142
- )
143
-
144
- if "%1" == "epub" (
145
- %SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub
146
- if errorlevel 1 exit /b 1
147
- echo.
148
- echo.Build finished. The epub file is in %BUILDDIR%/epub.
149
- goto end
150
- )
151
-
152
- if "%1" == "latex" (
153
- %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
154
- if errorlevel 1 exit /b 1
155
- echo.
156
- echo.Build finished; the LaTeX files are in %BUILDDIR%/latex.
157
- goto end
158
- )
159
-
160
- if "%1" == "latexpdf" (
161
- %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
162
- cd %BUILDDIR%/latex
163
- make all-pdf
164
- cd %~dp0
165
- echo.
166
- echo.Build finished; the PDF files are in %BUILDDIR%/latex.
167
- goto end
168
- )
169
-
170
- if "%1" == "latexpdfja" (
171
- %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
172
- cd %BUILDDIR%/latex
173
- make all-pdf-ja
174
- cd %~dp0
175
- echo.
176
- echo.Build finished; the PDF files are in %BUILDDIR%/latex.
177
- goto end
178
- )
179
-
180
- if "%1" == "text" (
181
- %SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text
182
- if errorlevel 1 exit /b 1
183
- echo.
184
- echo.Build finished. The text files are in %BUILDDIR%/text.
185
- goto end
186
- )
187
-
188
- if "%1" == "man" (
189
- %SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man
190
- if errorlevel 1 exit /b 1
191
- echo.
192
- echo.Build finished. The manual pages are in %BUILDDIR%/man.
193
- goto end
194
- )
195
-
196
- if "%1" == "texinfo" (
197
- %SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo
198
- if errorlevel 1 exit /b 1
199
- echo.
200
- echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo.
201
- goto end
202
- )
203
-
204
- if "%1" == "gettext" (
205
- %SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale
206
- if errorlevel 1 exit /b 1
207
- echo.
208
- echo.Build finished. The message catalogs are in %BUILDDIR%/locale.
209
- goto end
210
- )
211
-
212
- if "%1" == "changes" (
213
- %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes
214
- if errorlevel 1 exit /b 1
215
- echo.
216
- echo.The overview file is in %BUILDDIR%/changes.
217
- goto end
218
- )
219
-
220
- if "%1" == "linkcheck" (
221
- %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck
222
- if errorlevel 1 exit /b 1
223
- echo.
224
- echo.Link check complete; look for any errors in the above output ^
225
- or in %BUILDDIR%/linkcheck/output.txt.
226
- goto end
227
- )
228
-
229
- if "%1" == "doctest" (
230
- %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest
231
- if errorlevel 1 exit /b 1
232
- echo.
233
- echo.Testing of doctests in the sources finished, look at the ^
234
- results in %BUILDDIR%/doctest/output.txt.
235
- goto end
236
- )
237
-
238
- if "%1" == "coverage" (
239
- %SPHINXBUILD% -b coverage %ALLSPHINXOPTS% %BUILDDIR%/coverage
240
- if errorlevel 1 exit /b 1
241
- echo.
242
- echo.Testing of coverage in the sources finished, look at the ^
243
- results in %BUILDDIR%/coverage/python.txt.
244
- goto end
245
- )
246
-
247
- if "%1" == "xml" (
248
- %SPHINXBUILD% -b xml %ALLSPHINXOPTS% %BUILDDIR%/xml
249
- if errorlevel 1 exit /b 1
250
- echo.
251
- echo.Build finished. The XML files are in %BUILDDIR%/xml.
252
- goto end
253
- )
254
-
255
- if "%1" == "pseudoxml" (
256
- %SPHINXBUILD% -b pseudoxml %ALLSPHINXOPTS% %BUILDDIR%/pseudoxml
257
- if errorlevel 1 exit /b 1
258
- echo.
259
- echo.Build finished. The pseudo-XML files are in %BUILDDIR%/pseudoxml.
260
- goto end
261
- )
262
-
263
- :end
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
pytube/__init__.py CHANGED
@@ -5,4 +5,14 @@ __license__ = 'MIT License'
5
  __copyright__ = 'Copyright 2015 Nick Ficano'
6
 
7
  from .api import YouTube
8
- YouTube
 
 
 
 
 
 
 
 
 
 
 
5
  __copyright__ = 'Copyright 2015 Nick Ficano'
6
 
7
  from .api import YouTube
8
+
9
+ # Set default logging handler to avoid "No handler found" warnings.
10
+ import logging
11
+ try: # Python 2.7+
12
+ from logging import NullHandler
13
+ except ImportError:
14
+ class NullHandler(logging.Handler):
15
+ def emit(self, record):
16
+ pass
17
+
18
+ logging.getLogger(__name__).addHandler(NullHandler())
pytube/models.py CHANGED
@@ -13,23 +13,40 @@ except ImportError:
13
  class Video(object):
14
  """Class representation of a single instance of a YouTube video.
15
  """
16
- def __init__(self, url, filename, **attributes):
 
17
  """Sets-up the video object.
18
 
19
  :param str url:
20
  The url of the video. (e.g.: https://youtube.com/watch?v=...)
21
  :param str filename:
22
  The filename (minus the extention) to save the video.
23
- :param **attributes:
24
- Additional keyword arguments for additional quality profile
25
- attribures.
 
 
 
 
 
 
 
 
 
 
 
26
  """
27
  self.url = url
28
  self.filename = filename
29
- # TODO: this a bit hacky, rewrite to be explicit.
30
- self.__dict__.update(**attributes)
 
 
 
 
 
31
 
32
- def download(self, path='', chunk_size=8 * 1024, on_progress=None,
33
  on_finish=None, force_overwrite=False):
34
  """Downloads the video.
35
 
@@ -39,43 +56,44 @@ class Video(object):
39
  File size (in bytes) to write to buffer at a time. By default,
40
  this is set to 8 bytes.
41
  :param func on_progress:
42
- The function to be called every time the buffer is written
43
  to. Arguments passed are the bytes recieved, file size, and start
44
  datetime.
45
  :param func on_finish:
46
- The function to be called when the download is complete. Arguments
47
  passed are the full path to downloaded the file.
48
  :param bool force_overwrite:
49
- Force a file overwrite if conflicting one exists.
50
  """
51
- if os.path.isdir(os.path.normpath(path)):
52
- path = (os.path.normpath(path) + '/' if path else '')
53
- fullpath = '{}{}.{}'.format(path, self.filename, self.extension)
54
- else:
55
- fullpath = os.path.normpath(path)
56
-
57
  # TODO: Move this into cli, this kind of logic probably shouldn't be
58
  # handled by the library.
59
- if os.path.isfile(fullpath) and not force_overwrite:
60
  raise OSError("Conflicting filename:'{}'".format(self.filename))
61
-
62
  response = urlopen(self.url)
63
  meta_data = dict(response.info().items())
64
  file_size = int(meta_data.get("Content-Length") or
65
  meta_data.get("content-length"))
66
  self._bytes_received = 0
67
  start = clock()
 
 
68
  try:
69
- with open(fullpath, 'wb') as dst_file:
70
  while True:
71
  self._buffer = response.read(chunk_size)
72
- # If the buffer is empty (aka no bytes remaining).
73
  if not self._buffer:
74
  if on_finish:
75
  # TODO: We possibly want to flush the
76
  # `_bytes_recieved`` buffer before we call
77
  # ``on_finish()``.
78
- on_finish(fullpath)
79
  break
80
 
81
  self._bytes_received += len(self._buffer)
@@ -83,17 +101,11 @@ class Video(object):
83
  if on_progress:
84
  on_progress(self._bytes_received, file_size, start)
85
 
86
- # Catch possible exceptions occurring during download.
87
- except IOError:
88
- raise IOError("Failed to open file.")
89
-
90
- except BufferError:
91
- raise BufferError("Failed to write video to file.")
92
-
93
  except KeyboardInterrupt:
94
  # TODO: Move this into the cli, ``KeyboardInterrupt`` handling
95
- # should be taken care of by the client.
96
- os.remove(fullpath)
 
97
  raise KeyboardInterrupt("Interrupt signal given. Deleting "
98
  "incomplete video.")
99
 
@@ -106,7 +118,7 @@ class Video(object):
106
  """The "less than" (lt) method is used for comparing video object to
107
  one another. This useful when sorting.
108
 
109
- :param Video other:
110
  The instance of the other video instance for comparison.
111
  """
112
  if isinstance(other, Video):
 
13
  class Video(object):
14
  """Class representation of a single instance of a YouTube video.
15
  """
16
+ def __init__(self, url, filename, extension, resolution, video_codec,
17
+ profile, video_bitrate, audio_codec, audio_bitrate):
18
  """Sets-up the video object.
19
 
20
  :param str url:
21
  The url of the video. (e.g.: https://youtube.com/watch?v=...)
22
  :param str filename:
23
  The filename (minus the extention) to save the video.
24
+ :param str extention:
25
+ The desired file extention (e.g.: mp4, flv, webm).
26
+ :param str resolution:
27
+ The broadcasting standard (e.g.: 720p, 1080p).
28
+ :param str video_codec:
29
+ The codec used to encode the video.
30
+ :param str profile:
31
+ The arbitrary quality profile.
32
+ :param str video_bitrate:
33
+ The bitrate of the video over sampling interval.
34
+ :param str audio_codec:
35
+ The codec used to encode the audio.
36
+ :param str audio_bitrate:
37
+ The bitrate of the video's audio over sampling interval.
38
  """
39
  self.url = url
40
  self.filename = filename
41
+ self.extension = extension
42
+ self.resolution = resolution
43
+ self.video_codec = video_codec
44
+ self.profile = profile
45
+ self.video_bitrate = video_bitrate
46
+ self.audio_codec = audio_codec
47
+ self.audio_bitrate = audio_bitrate
48
 
49
+ def download(self, path, chunk_size=8 * 1024, on_progress=None,
50
  on_finish=None, force_overwrite=False):
51
  """Downloads the video.
52
 
 
56
  File size (in bytes) to write to buffer at a time. By default,
57
  this is set to 8 bytes.
58
  :param func on_progress:
59
+ *Optional* function to be called every time the buffer is written
60
  to. Arguments passed are the bytes recieved, file size, and start
61
  datetime.
62
  :param func on_finish:
63
+ *Optional* callback function when download is complete. Arguments
64
  passed are the full path to downloaded the file.
65
  :param bool force_overwrite:
66
+ *Optional* force a file overwrite if conflicting one exists.
67
  """
68
+ path = os.path.normpath(path)
69
+ if os.path.isdir(path):
70
+ filename = "{}.{}".format(self.filename, self.extension)
71
+ path = os.path.join(path, filename)
72
+ # TODO: If it's not a path, this should raise an ``OSError``.
 
73
  # TODO: Move this into cli, this kind of logic probably shouldn't be
74
  # handled by the library.
75
+ if os.path.isfile(path) and not force_overwrite:
76
  raise OSError("Conflicting filename:'{}'".format(self.filename))
77
+ # TODO: Split up the downloading and OS jazz into separate functions.
78
  response = urlopen(self.url)
79
  meta_data = dict(response.info().items())
80
  file_size = int(meta_data.get("Content-Length") or
81
  meta_data.get("content-length"))
82
  self._bytes_received = 0
83
  start = clock()
84
+ # TODO: Let's get rid of this whole try/except block, let ``OSErrors``
85
+ # fail loudly.
86
  try:
87
+ with open(path, 'wb') as dst_file:
88
  while True:
89
  self._buffer = response.read(chunk_size)
90
+ # Check if the buffer is empty (aka no bytes remaining).
91
  if not self._buffer:
92
  if on_finish:
93
  # TODO: We possibly want to flush the
94
  # `_bytes_recieved`` buffer before we call
95
  # ``on_finish()``.
96
+ on_finish(path)
97
  break
98
 
99
  self._bytes_received += len(self._buffer)
 
101
  if on_progress:
102
  on_progress(self._bytes_received, file_size, start)
103
 
 
 
 
 
 
 
 
104
  except KeyboardInterrupt:
105
  # TODO: Move this into the cli, ``KeyboardInterrupt`` handling
106
+ # should be taken care of by the client. Also you should be allowed
107
+ # to disable this.
108
+ os.remove(path)
109
  raise KeyboardInterrupt("Interrupt signal given. Deleting "
110
  "incomplete video.")
111
 
 
118
  """The "less than" (lt) method is used for comparing video object to
119
  one another. This useful when sorting.
120
 
121
+ :param other:
122
  The instance of the other video instance for comparison.
123
  """
124
  if isinstance(other, Video):
tests/test_pytube.py ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env/python
2
+ # -*- coding: utf-8 -*-
3
+
4
+ import unittest
5
+ from pytube import YouTube
6
+ from pytube.exceptions import MultipleObjectsReturned
7
+
8
+ SHOW_ERROR_MESSAGES = True
9
+
10
+
11
+ class TestYouTube(unittest.TestCase):
12
+ """Test all methods of Youtube class"""
13
+
14
+ def setUp(self):
15
+ """Set up the all attributes required for a particular video."""
16
+
17
+ self.url = "https://www.youtube.com/watch?v=Ik-RsDGPI5Y"
18
+ self.video_id = 'Ik-RsDGPI5Y'
19
+ self.filename = 'Pulp Fiction - Dancing Scene'
20
+ self.yt = YouTube(self.url)
21
+ #: don't hard code, make is universal
22
+ self.videos = [
23
+ '<Video: MPEG-4 Visual (.3gp) - 144p - Simple>',
24
+ '<Video: MPEG-4 Visual (.3gp) - 240p - Simple>',
25
+ '<Video: Sorenson H.263 (.flv) - 240p - N/A>',
26
+ '<Video: H.264 (.mp4) - 360p - Baseline>',
27
+ '<Video: H.264 (.mp4) - 720p - High>',
28
+ '<Video: VP8 (.webm) - 360p - N/A>'
29
+ ]
30
+ # using flv since it has only once video
31
+ self.flv = '<Video: Sorenson H.263 (.flv) - 240p - N/A>'
32
+
33
+ def test_url(self):
34
+ self.assertEqual(self.yt.url, self.url)
35
+
36
+ def test_video_id(self):
37
+ self.assertEqual(self.yt.video_id, self.video_id)
38
+
39
+ def test_filename(self):
40
+ self.assertEqual(self.yt.filename, self.filename)
41
+
42
+ def test_get_videos(self):
43
+ self.assertEqual(map(str, self.yt.get_videos()), self.videos)
44
+
45
+ def test_get_video_data(self):
46
+ self.assertEqual((self.yt.get_video_data()['args']['loaderUrl']),
47
+ self.url)
48
+
49
+ def test_get_false(self):
50
+ with self.assertRaises(MultipleObjectsReturned):
51
+ self.yt.get()
52
+
53
+ def test_get_true(self):
54
+ self.assertEqual(str(self.yt.get('flv')), self.flv)
55
+
56
+ def test_filter(self):
57
+ self.assertEqual(str(self.yt.filter('flv')[0]), self.flv)
58
+
59
+ if __name__ == '__main__':
60
+ unittest.main()
tests/test_requirements.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ nose==1.3.7