4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Dockerfile:
--------------------------------------------------------------------------------
1 | # 项目基于的python版本
2 | FROM python:3.8.8
3 | # 把store项目 添加到code文件夹 (code无需创建)
4 | ADD . /code
5 | # 把code设置为工作目录
6 | WORKDIR /code
7 | # 导入项目依赖包
8 | RUN pip install -r requirements.txt
9 | # 端口5000 (可删除)
10 | EXPOSE 8000
11 | # 执行
12 | CMD ["uwsgi --ini uwsgi.ini"]
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | GNU GENERAL PUBLIC LICENSE
2 | Version 3, 29 June 2007
3 |
4 | Copyright (C) 2007 Free Software Foundation, Inc.
5 | Everyone is permitted to copy and distribute verbatim copies
6 | of this license document, but changing it is not allowed.
7 |
8 | Preamble
9 |
10 | The GNU General Public License is a free, copyleft license for
11 | software and other kinds of works.
12 |
13 | The licenses for most software and other practical works are designed
14 | to take away your freedom to share and change the works. By contrast,
15 | the GNU General Public License is intended to guarantee your freedom to
16 | share and change all versions of a program--to make sure it remains free
17 | software for all its users. We, the Free Software Foundation, use the
18 | GNU General Public License for most of our software; it applies also to
19 | any other work released this way by its authors. You can apply it to
20 | your programs, too.
21 |
22 | When we speak of free software, we are referring to freedom, not
23 | price. Our General Public Licenses are designed to make sure that you
24 | have the freedom to distribute copies of free software (and charge for
25 | them if you wish), that you receive source code or can get it if you
26 | want it, that you can change the software or use pieces of it in new
27 | free programs, and that you know you can do these things.
28 |
29 | To protect your rights, we need to prevent others from denying you
30 | these rights or asking you to surrender the rights. Therefore, you have
31 | certain responsibilities if you distribute copies of the software, or if
32 | you modify it: responsibilities to respect the freedom of others.
33 |
34 | For example, if you distribute copies of such a program, whether
35 | gratis or for a fee, you must pass on to the recipients the same
36 | freedoms that you received. You must make sure that they, too, receive
37 | or can get the source code. And you must show them these terms so they
38 | know their rights.
39 |
40 | Developers that use the GNU GPL protect your rights with two steps:
41 | (1) assert copyright on the software, and (2) offer you this License
42 | giving you legal permission to copy, distribute and/or modify it.
43 |
44 | For the developers' and authors' protection, the GPL clearly explains
45 | that there is no warranty for this free software. For both users' and
46 | authors' sake, the GPL requires that modified versions be marked as
47 | changed, so that their problems will not be attributed erroneously to
48 | authors of previous versions.
49 |
50 | Some devices are designed to deny users access to install or run
51 | modified versions of the software inside them, although the manufacturer
52 | can do so. This is fundamentally incompatible with the aim of
53 | protecting users' freedom to change the software. The systematic
54 | pattern of such abuse occurs in the area of products for individuals to
55 | use, which is precisely where it is most unacceptable. Therefore, we
56 | have designed this version of the GPL to prohibit the practice for those
57 | products. If such problems arise substantially in other domains, we
58 | stand ready to extend this provision to those domains in future versions
59 | of the GPL, as needed to protect the freedom of users.
60 |
61 | Finally, every program is threatened constantly by software patents.
62 | States should not allow patents to restrict development and use of
63 | software on general-purpose computers, but in those that do, we wish to
64 | avoid the special danger that patents applied to a free program could
65 | make it effectively proprietary. To prevent this, the GPL assures that
66 | patents cannot be used to render the program non-free.
67 |
68 | The precise terms and conditions for copying, distribution and
69 | modification follow.
70 |
71 | TERMS AND CONDITIONS
72 |
73 | 0. Definitions.
74 |
75 | "This License" refers to version 3 of the GNU General Public License.
76 |
77 | "Copyright" also means copyright-like laws that apply to other kinds of
78 | works, such as semiconductor masks.
79 |
80 | "The Program" refers to any copyrightable work licensed under this
81 | License. Each licensee is addressed as "you". "Licensees" and
82 | "recipients" may be individuals or organizations.
83 |
84 | To "modify" a work means to copy from or adapt all or part of the work
85 | in a fashion requiring copyright permission, other than the making of an
86 | exact copy. The resulting work is called a "modified version" of the
87 | earlier work or a work "based on" the earlier work.
88 |
89 | A "covered work" means either the unmodified Program or a work based
90 | on the Program.
91 |
92 | To "propagate" a work means to do anything with it that, without
93 | permission, would make you directly or secondarily liable for
94 | infringement under applicable copyright law, except executing it on a
95 | computer or modifying a private copy. Propagation includes copying,
96 | distribution (with or without modification), making available to the
97 | public, and in some countries other activities as well.
98 |
99 | To "convey" a work means any kind of propagation that enables other
100 | parties to make or receive copies. Mere interaction with a user through
101 | a computer network, with no transfer of a copy, is not conveying.
102 |
103 | An interactive user interface displays "Appropriate Legal Notices"
104 | to the extent that it includes a convenient and prominently visible
105 | feature that (1) displays an appropriate copyright notice, and (2)
106 | tells the user that there is no warranty for the work (except to the
107 | extent that warranties are provided), that licensees may convey the
108 | work under this License, and how to view a copy of this License. If
109 | the interface presents a list of user commands or options, such as a
110 | menu, a prominent item in the list meets this criterion.
111 |
112 | 1. Source Code.
113 |
114 | The "source code" for a work means the preferred form of the work
115 | for making modifications to it. "Object code" means any non-source
116 | form of a work.
117 |
118 | A "Standard Interface" means an interface that either is an official
119 | standard defined by a recognized standards body, or, in the case of
120 | interfaces specified for a particular programming language, one that
121 | is widely used among developers working in that language.
122 |
123 | The "System Libraries" of an executable work include anything, other
124 | than the work as a whole, that (a) is included in the normal form of
125 | packaging a Major Component, but which is not part of that Major
126 | Component, and (b) serves only to enable use of the work with that
127 | Major Component, or to implement a Standard Interface for which an
128 | implementation is available to the public in source code form. A
129 | "Major Component", in this context, means a major essential component
130 | (kernel, window system, and so on) of the specific operating system
131 | (if any) on which the executable work runs, or a compiler used to
132 | produce the work, or an object code interpreter used to run it.
133 |
134 | The "Corresponding Source" for a work in object code form means all
135 | the source code needed to generate, install, and (for an executable
136 | work) run the object code and to modify the work, including scripts to
137 | control those activities. However, it does not include the work's
138 | System Libraries, or general-purpose tools or generally available free
139 | programs which are used unmodified in performing those activities but
140 | which are not part of the work. For example, Corresponding Source
141 | includes interface definition files associated with source files for
142 | the work, and the source code for shared libraries and dynamically
143 | linked subprograms that the work is specifically designed to require,
144 | such as by intimate data communication or control flow between those
145 | subprograms and other parts of the work.
146 |
147 | The Corresponding Source need not include anything that users
148 | can regenerate automatically from other parts of the Corresponding
149 | Source.
150 |
151 | The Corresponding Source for a work in source code form is that
152 | same work.
153 |
154 | 2. Basic Permissions.
155 |
156 | All rights granted under this License are granted for the term of
157 | copyright on the Program, and are irrevocable provided the stated
158 | conditions are met. This License explicitly affirms your unlimited
159 | permission to run the unmodified Program. The output from running a
160 | covered work is covered by this License only if the output, given its
161 | content, constitutes a covered work. This License acknowledges your
162 | rights of fair use or other equivalent, as provided by copyright law.
163 |
164 | You may make, run and propagate covered works that you do not
165 | convey, without conditions so long as your license otherwise remains
166 | in force. You may convey covered works to others for the sole purpose
167 | of having them make modifications exclusively for you, or provide you
168 | with facilities for running those works, provided that you comply with
169 | the terms of this License in conveying all material for which you do
170 | not control copyright. Those thus making or running the covered works
171 | for you must do so exclusively on your behalf, under your direction
172 | and control, on terms that prohibit them from making any copies of
173 | your copyrighted material outside their relationship with you.
174 |
175 | Conveying under any other circumstances is permitted solely under
176 | the conditions stated below. Sublicensing is not allowed; section 10
177 | makes it unnecessary.
178 |
179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
180 |
181 | No covered work shall be deemed part of an effective technological
182 | measure under any applicable law fulfilling obligations under article
183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or
184 | similar laws prohibiting or restricting circumvention of such
185 | measures.
186 |
187 | When you convey a covered work, you waive any legal power to forbid
188 | circumvention of technological measures to the extent such circumvention
189 | is effected by exercising rights under this License with respect to
190 | the covered work, and you disclaim any intention to limit operation or
191 | modification of the work as a means of enforcing, against the work's
192 | users, your or third parties' legal rights to forbid circumvention of
193 | technological measures.
194 |
195 | 4. Conveying Verbatim Copies.
196 |
197 | You may convey verbatim copies of the Program's source code as you
198 | receive it, in any medium, provided that you conspicuously and
199 | appropriately publish on each copy an appropriate copyright notice;
200 | keep intact all notices stating that this License and any
201 | non-permissive terms added in accord with section 7 apply to the code;
202 | keep intact all notices of the absence of any warranty; and give all
203 | recipients a copy of this License along with the Program.
204 |
205 | You may charge any price or no price for each copy that you convey,
206 | and you may offer support or warranty protection for a fee.
207 |
208 | 5. Conveying Modified Source Versions.
209 |
210 | You may convey a work based on the Program, or the modifications to
211 | produce it from the Program, in the form of source code under the
212 | terms of section 4, provided that you also meet all of these conditions:
213 |
214 | a) The work must carry prominent notices stating that you modified
215 | it, and giving a relevant date.
216 |
217 | b) The work must carry prominent notices stating that it is
218 | released under this License and any conditions added under section
219 | 7. This requirement modifies the requirement in section 4 to
220 | "keep intact all notices".
221 |
222 | c) You must license the entire work, as a whole, under this
223 | License to anyone who comes into possession of a copy. This
224 | License will therefore apply, along with any applicable section 7
225 | additional terms, to the whole of the work, and all its parts,
226 | regardless of how they are packaged. This License gives no
227 | permission to license the work in any other way, but it does not
228 | invalidate such permission if you have separately received it.
229 |
230 | d) If the work has interactive user interfaces, each must display
231 | Appropriate Legal Notices; however, if the Program has interactive
232 | interfaces that do not display Appropriate Legal Notices, your
233 | work need not make them do so.
234 |
235 | A compilation of a covered work with other separate and independent
236 | works, which are not by their nature extensions of the covered work,
237 | and which are not combined with it such as to form a larger program,
238 | in or on a volume of a storage or distribution medium, is called an
239 | "aggregate" if the compilation and its resulting copyright are not
240 | used to limit the access or legal rights of the compilation's users
241 | beyond what the individual works permit. Inclusion of a covered work
242 | in an aggregate does not cause this License to apply to the other
243 | parts of the aggregate.
244 |
245 | 6. Conveying Non-Source Forms.
246 |
247 | You may convey a covered work in object code form under the terms
248 | of sections 4 and 5, provided that you also convey the
249 | machine-readable Corresponding Source under the terms of this License,
250 | in one of these ways:
251 |
252 | a) Convey the object code in, or embodied in, a physical product
253 | (including a physical distribution medium), accompanied by the
254 | Corresponding Source fixed on a durable physical medium
255 | customarily used for software interchange.
256 |
257 | b) Convey the object code in, or embodied in, a physical product
258 | (including a physical distribution medium), accompanied by a
259 | written offer, valid for at least three years and valid for as
260 | long as you offer spare parts or customer support for that product
261 | model, to give anyone who possesses the object code either (1) a
262 | copy of the Corresponding Source for all the software in the
263 | product that is covered by this License, on a durable physical
264 | medium customarily used for software interchange, for a price no
265 | more than your reasonable cost of physically performing this
266 | conveying of source, or (2) access to copy the
267 | Corresponding Source from a network server at no charge.
268 |
269 | c) Convey individual copies of the object code with a copy of the
270 | written offer to provide the Corresponding Source. This
271 | alternative is allowed only occasionally and noncommercially, and
272 | only if you received the object code with such an offer, in accord
273 | with subsection 6b.
274 |
275 | d) Convey the object code by offering access from a designated
276 | place (gratis or for a charge), and offer equivalent access to the
277 | Corresponding Source in the same way through the same place at no
278 | further charge. You need not require recipients to copy the
279 | Corresponding Source along with the object code. If the place to
280 | copy the object code is a network server, the Corresponding Source
281 | may be on a different server (operated by you or a third party)
282 | that supports equivalent copying facilities, provided you maintain
283 | clear directions next to the object code saying where to find the
284 | Corresponding Source. Regardless of what server hosts the
285 | Corresponding Source, you remain obligated to ensure that it is
286 | available for as long as needed to satisfy these requirements.
287 |
288 | e) Convey the object code using peer-to-peer transmission, provided
289 | you inform other peers where the object code and Corresponding
290 | Source of the work are being offered to the general public at no
291 | charge under subsection 6d.
292 |
293 | A separable portion of the object code, whose source code is excluded
294 | from the Corresponding Source as a System Library, need not be
295 | included in conveying the object code work.
296 |
297 | A "User Product" is either (1) a "consumer product", which means any
298 | tangible personal property which is normally used for personal, family,
299 | or household purposes, or (2) anything designed or sold for incorporation
300 | into a dwelling. In determining whether a product is a consumer product,
301 | doubtful cases shall be resolved in favor of coverage. For a particular
302 | product received by a particular user, "normally used" refers to a
303 | typical or common use of that class of product, regardless of the status
304 | of the particular user or of the way in which the particular user
305 | actually uses, or expects or is expected to use, the product. A product
306 | is a consumer product regardless of whether the product has substantial
307 | commercial, industrial or non-consumer uses, unless such uses represent
308 | the only significant mode of use of the product.
309 |
310 | "Installation Information" for a User Product means any methods,
311 | procedures, authorization keys, or other information required to install
312 | and execute modified versions of a covered work in that User Product from
313 | a modified version of its Corresponding Source. The information must
314 | suffice to ensure that the continued functioning of the modified object
315 | code is in no case prevented or interfered with solely because
316 | modification has been made.
317 |
318 | If you convey an object code work under this section in, or with, or
319 | specifically for use in, a User Product, and the conveying occurs as
320 | part of a transaction in which the right of possession and use of the
321 | User Product is transferred to the recipient in perpetuity or for a
322 | fixed term (regardless of how the transaction is characterized), the
323 | Corresponding Source conveyed under this section must be accompanied
324 | by the Installation Information. But this requirement does not apply
325 | if neither you nor any third party retains the ability to install
326 | modified object code on the User Product (for example, the work has
327 | been installed in ROM).
328 |
329 | The requirement to provide Installation Information does not include a
330 | requirement to continue to provide support service, warranty, or updates
331 | for a work that has been modified or installed by the recipient, or for
332 | the User Product in which it has been modified or installed. Access to a
333 | network may be denied when the modification itself materially and
334 | adversely affects the operation of the network or violates the rules and
335 | protocols for communication across the network.
336 |
337 | Corresponding Source conveyed, and Installation Information provided,
338 | in accord with this section must be in a format that is publicly
339 | documented (and with an implementation available to the public in
340 | source code form), and must require no special password or key for
341 | unpacking, reading or copying.
342 |
343 | 7. Additional Terms.
344 |
345 | "Additional permissions" are terms that supplement the terms of this
346 | License by making exceptions from one or more of its conditions.
347 | Additional permissions that are applicable to the entire Program shall
348 | be treated as though they were included in this License, to the extent
349 | that they are valid under applicable law. If additional permissions
350 | apply only to part of the Program, that part may be used separately
351 | under those permissions, but the entire Program remains governed by
352 | this License without regard to the additional permissions.
353 |
354 | When you convey a copy of a covered work, you may at your option
355 | remove any additional permissions from that copy, or from any part of
356 | it. (Additional permissions may be written to require their own
357 | removal in certain cases when you modify the work.) You may place
358 | additional permissions on material, added by you to a covered work,
359 | for which you have or can give appropriate copyright permission.
360 |
361 | Notwithstanding any other provision of this License, for material you
362 | add to a covered work, you may (if authorized by the copyright holders of
363 | that material) supplement the terms of this License with terms:
364 |
365 | a) Disclaiming warranty or limiting liability differently from the
366 | terms of sections 15 and 16 of this License; or
367 |
368 | b) Requiring preservation of specified reasonable legal notices or
369 | author attributions in that material or in the Appropriate Legal
370 | Notices displayed by works containing it; or
371 |
372 | c) Prohibiting misrepresentation of the origin of that material, or
373 | requiring that modified versions of such material be marked in
374 | reasonable ways as different from the original version; or
375 |
376 | d) Limiting the use for publicity purposes of names of licensors or
377 | authors of the material; or
378 |
379 | e) Declining to grant rights under trademark law for use of some
380 | trade names, trademarks, or service marks; or
381 |
382 | f) Requiring indemnification of licensors and authors of that
383 | material by anyone who conveys the material (or modified versions of
384 | it) with contractual assumptions of liability to the recipient, for
385 | any liability that these contractual assumptions directly impose on
386 | those licensors and authors.
387 |
388 | All other non-permissive additional terms are considered "further
389 | restrictions" within the meaning of section 10. If the Program as you
390 | received it, or any part of it, contains a notice stating that it is
391 | governed by this License along with a term that is a further
392 | restriction, you may remove that term. If a license document contains
393 | a further restriction but permits relicensing or conveying under this
394 | License, you may add to a covered work material governed by the terms
395 | of that license document, provided that the further restriction does
396 | not survive such relicensing or conveying.
397 |
398 | If you add terms to a covered work in accord with this section, you
399 | must place, in the relevant source files, a statement of the
400 | additional terms that apply to those files, or a notice indicating
401 | where to find the applicable terms.
402 |
403 | Additional terms, permissive or non-permissive, may be stated in the
404 | form of a separately written license, or stated as exceptions;
405 | the above requirements apply either way.
406 |
407 | 8. Termination.
408 |
409 | You may not propagate or modify a covered work except as expressly
410 | provided under this License. Any attempt otherwise to propagate or
411 | modify it is void, and will automatically terminate your rights under
412 | this License (including any patent licenses granted under the third
413 | paragraph of section 11).
414 |
415 | However, if you cease all violation of this License, then your
416 | license from a particular copyright holder is reinstated (a)
417 | provisionally, unless and until the copyright holder explicitly and
418 | finally terminates your license, and (b) permanently, if the copyright
419 | holder fails to notify you of the violation by some reasonable means
420 | prior to 60 days after the cessation.
421 |
422 | Moreover, your license from a particular copyright holder is
423 | reinstated permanently if the copyright holder notifies you of the
424 | violation by some reasonable means, this is the first time you have
425 | received notice of violation of this License (for any work) from that
426 | copyright holder, and you cure the violation prior to 30 days after
427 | your receipt of the notice.
428 |
429 | Termination of your rights under this section does not terminate the
430 | licenses of parties who have received copies or rights from you under
431 | this License. If your rights have been terminated and not permanently
432 | reinstated, you do not qualify to receive new licenses for the same
433 | material under section 10.
434 |
435 | 9. Acceptance Not Required for Having Copies.
436 |
437 | You are not required to accept this License in order to receive or
438 | run a copy of the Program. Ancillary propagation of a covered work
439 | occurring solely as a consequence of using peer-to-peer transmission
440 | to receive a copy likewise does not require acceptance. However,
441 | nothing other than this License grants you permission to propagate or
442 | modify any covered work. These actions infringe copyright if you do
443 | not accept this License. Therefore, by modifying or propagating a
444 | covered work, you indicate your acceptance of this License to do so.
445 |
446 | 10. Automatic Licensing of Downstream Recipients.
447 |
448 | Each time you convey a covered work, the recipient automatically
449 | receives a license from the original licensors, to run, modify and
450 | propagate that work, subject to this License. You are not responsible
451 | for enforcing compliance by third parties with this License.
452 |
453 | An "entity transaction" is a transaction transferring control of an
454 | organization, or substantially all assets of one, or subdividing an
455 | organization, or merging organizations. If propagation of a covered
456 | work results from an entity transaction, each party to that
457 | transaction who receives a copy of the work also receives whatever
458 | licenses to the work the party's predecessor in interest had or could
459 | give under the previous paragraph, plus a right to possession of the
460 | Corresponding Source of the work from the predecessor in interest, if
461 | the predecessor has it or can get it with reasonable efforts.
462 |
463 | You may not impose any further restrictions on the exercise of the
464 | rights granted or affirmed under this License. For example, you may
465 | not impose a license fee, royalty, or other charge for exercise of
466 | rights granted under this License, and you may not initiate litigation
467 | (including a cross-claim or counterclaim in a lawsuit) alleging that
468 | any patent claim is infringed by making, using, selling, offering for
469 | sale, or importing the Program or any portion of it.
470 |
471 | 11. Patents.
472 |
473 | A "contributor" is a copyright holder who authorizes use under this
474 | License of the Program or a work on which the Program is based. The
475 | work thus licensed is called the contributor's "contributor version".
476 |
477 | A contributor's "essential patent claims" are all patent claims
478 | owned or controlled by the contributor, whether already acquired or
479 | hereafter acquired, that would be infringed by some manner, permitted
480 | by this License, of making, using, or selling its contributor version,
481 | but do not include claims that would be infringed only as a
482 | consequence of further modification of the contributor version. For
483 | purposes of this definition, "control" includes the right to grant
484 | patent sublicenses in a manner consistent with the requirements of
485 | this License.
486 |
487 | Each contributor grants you a non-exclusive, worldwide, royalty-free
488 | patent license under the contributor's essential patent claims, to
489 | make, use, sell, offer for sale, import and otherwise run, modify and
490 | propagate the contents of its contributor version.
491 |
492 | In the following three paragraphs, a "patent license" is any express
493 | agreement or commitment, however denominated, not to enforce a patent
494 | (such as an express permission to practice a patent or covenant not to
495 | sue for patent infringement). To "grant" such a patent license to a
496 | party means to make such an agreement or commitment not to enforce a
497 | patent against the party.
498 |
499 | If you convey a covered work, knowingly relying on a patent license,
500 | and the Corresponding Source of the work is not available for anyone
501 | to copy, free of charge and under the terms of this License, through a
502 | publicly available network server or other readily accessible means,
503 | then you must either (1) cause the Corresponding Source to be so
504 | available, or (2) arrange to deprive yourself of the benefit of the
505 | patent license for this particular work, or (3) arrange, in a manner
506 | consistent with the requirements of this License, to extend the patent
507 | license to downstream recipients. "Knowingly relying" means you have
508 | actual knowledge that, but for the patent license, your conveying the
509 | covered work in a country, or your recipient's use of the covered work
510 | in a country, would infringe one or more identifiable patents in that
511 | country that you have reason to believe are valid.
512 |
513 | If, pursuant to or in connection with a single transaction or
514 | arrangement, you convey, or propagate by procuring conveyance of, a
515 | covered work, and grant a patent license to some of the parties
516 | receiving the covered work authorizing them to use, propagate, modify
517 | or convey a specific copy of the covered work, then the patent license
518 | you grant is automatically extended to all recipients of the covered
519 | work and works based on it.
520 |
521 | A patent license is "discriminatory" if it does not include within
522 | the scope of its coverage, prohibits the exercise of, or is
523 | conditioned on the non-exercise of one or more of the rights that are
524 | specifically granted under this License. You may not convey a covered
525 | work if you are a party to an arrangement with a third party that is
526 | in the business of distributing software, under which you make payment
527 | to the third party based on the extent of your activity of conveying
528 | the work, and under which the third party grants, to any of the
529 | parties who would receive the covered work from you, a discriminatory
530 | patent license (a) in connection with copies of the covered work
531 | conveyed by you (or copies made from those copies), or (b) primarily
532 | for and in connection with specific products or compilations that
533 | contain the covered work, unless you entered into that arrangement,
534 | or that patent license was granted, prior to 28 March 2007.
535 |
536 | Nothing in this License shall be construed as excluding or limiting
537 | any implied license or other defenses to infringement that may
538 | otherwise be available to you under applicable patent law.
539 |
540 | 12. No Surrender of Others' Freedom.
541 |
542 | If conditions are imposed on you (whether by court order, agreement or
543 | otherwise) that contradict the conditions of this License, they do not
544 | excuse you from the conditions of this License. If you cannot convey a
545 | covered work so as to satisfy simultaneously your obligations under this
546 | License and any other pertinent obligations, then as a consequence you may
547 | not convey it at all. For example, if you agree to terms that obligate you
548 | to collect a royalty for further conveying from those to whom you convey
549 | the Program, the only way you could satisfy both those terms and this
550 | License would be to refrain entirely from conveying the Program.
551 |
552 | 13. Use with the GNU Affero General Public License.
553 |
554 | Notwithstanding any other provision of this License, you have
555 | permission to link or combine any covered work with a work licensed
556 | under version 3 of the GNU Affero General Public License into a single
557 | combined work, and to convey the resulting work. The terms of this
558 | License will continue to apply to the part which is the covered work,
559 | but the special requirements of the GNU Affero General Public License,
560 | section 13, concerning interaction through a network will apply to the
561 | combination as such.
562 |
563 | 14. Revised Versions of this License.
564 |
565 | The Free Software Foundation may publish revised and/or new versions of
566 | the GNU General Public License from time to time. Such new versions will
567 | be similar in spirit to the present version, but may differ in detail to
568 | address new problems or concerns.
569 |
570 | Each version is given a distinguishing version number. If the
571 | Program specifies that a certain numbered version of the GNU General
572 | Public License "or any later version" applies to it, you have the
573 | option of following the terms and conditions either of that numbered
574 | version or of any later version published by the Free Software
575 | Foundation. If the Program does not specify a version number of the
576 | GNU General Public License, you may choose any version ever published
577 | by the Free Software Foundation.
578 |
579 | If the Program specifies that a proxy can decide which future
580 | versions of the GNU General Public License can be used, that proxy's
581 | public statement of acceptance of a version permanently authorizes you
582 | to choose that version for the Program.
583 |
584 | Later license versions may give you additional or different
585 | permissions. However, no additional obligations are imposed on any
586 | author or copyright holder as a result of your choosing to follow a
587 | later version.
588 |
589 | 15. Disclaimer of Warranty.
590 |
591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
599 |
600 | 16. Limitation of Liability.
601 |
602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
610 | SUCH DAMAGES.
611 |
612 | 17. Interpretation of Sections 15 and 16.
613 |
614 | If the disclaimer of warranty and limitation of liability provided
615 | above cannot be given local legal effect according to their terms,
616 | reviewing courts shall apply local law that most closely approximates
617 | an absolute waiver of all civil liability in connection with the
618 | Program, unless a warranty or assumption of liability accompanies a
619 | copy of the Program in return for a fee.
620 |
621 | END OF TERMS AND CONDITIONS
622 |
623 | How to Apply These Terms to Your New Programs
624 |
625 | If you develop a new program, and you want it to be of the greatest
626 | possible use to the public, the best way to achieve this is to make it
627 | free software which everyone can redistribute and change under these terms.
628 |
629 | To do so, attach the following notices to the program. It is safest
630 | to attach them to the start of each source file to most effectively
631 | state the exclusion of warranty; and each file should have at least
632 | the "copyright" line and a pointer to where the full notice is found.
633 |
634 |
635 | Copyright (C)
636 |
637 | This program is free software: you can redistribute it and/or modify
638 | it under the terms of the GNU General Public License as published by
639 | the Free Software Foundation, either version 3 of the License, or
640 | (at your option) any later version.
641 |
642 | This program is distributed in the hope that it will be useful,
643 | but WITHOUT ANY WARRANTY; without even the implied warranty of
644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
645 | GNU General Public License for more details.
646 |
647 | You should have received a copy of the GNU General Public License
648 | along with this program. If not, see .
649 |
650 | Also add information on how to contact you by electronic and paper mail.
651 |
652 | If the program does terminal interaction, make it output a short
653 | notice like this when it starts in an interactive mode:
654 |
655 | Copyright (C)
656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
657 | This is free software, and you are welcome to redistribute it
658 | under certain conditions; type `show c' for details.
659 |
660 | The hypothetical commands `show w' and `show c' should show the appropriate
661 | parts of the General Public License. Of course, your program's commands
662 | might be different; for a GUI interface, you would use an "about box".
663 |
664 | You should also get your employer (if you work as a programmer) or school,
665 | if any, to sign a "copyright disclaimer" for the program, if necessary.
666 | For more information on this, and how to apply and follow the GNU GPL, see
667 | .
668 |
669 | The GNU General Public License does not permit incorporating your program
670 | into proprietary programs. If your program is a subroutine library, you
671 | may consider it more useful to permit linking proprietary applications with
672 | the library. If this is what you want to do, use the GNU Lesser General
673 | Public License instead of this License. But first, please read
674 | .
675 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # cloudmusic_django
2 | 基于Python的网易云数据分析可视化大屏,Django框架
3 |
--------------------------------------------------------------------------------
/cloudm/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hsxisawd/cloudmusic_django/3ea6921cb20be73bc300b45c60e7af4ce459eafe/cloudm/__init__.py
--------------------------------------------------------------------------------
/cloudm/__pycache__/__init__.cpython-38.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hsxisawd/cloudmusic_django/3ea6921cb20be73bc300b45c60e7af4ce459eafe/cloudm/__pycache__/__init__.cpython-38.pyc
--------------------------------------------------------------------------------
/cloudm/__pycache__/admin.cpython-38.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hsxisawd/cloudmusic_django/3ea6921cb20be73bc300b45c60e7af4ce459eafe/cloudm/__pycache__/admin.cpython-38.pyc
--------------------------------------------------------------------------------
/cloudm/__pycache__/apps.cpython-38.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hsxisawd/cloudmusic_django/3ea6921cb20be73bc300b45c60e7af4ce459eafe/cloudm/__pycache__/apps.cpython-38.pyc
--------------------------------------------------------------------------------
/cloudm/__pycache__/models.cpython-38.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hsxisawd/cloudmusic_django/3ea6921cb20be73bc300b45c60e7af4ce459eafe/cloudm/__pycache__/models.cpython-38.pyc
--------------------------------------------------------------------------------
/cloudm/__pycache__/views.cpython-38.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hsxisawd/cloudmusic_django/3ea6921cb20be73bc300b45c60e7af4ce459eafe/cloudm/__pycache__/views.cpython-38.pyc
--------------------------------------------------------------------------------
/cloudm/admin.py:
--------------------------------------------------------------------------------
1 | from django.contrib import admin
2 |
3 | # Register your models here.
4 |
--------------------------------------------------------------------------------
/cloudm/apps.py:
--------------------------------------------------------------------------------
1 | from django.apps import AppConfig
2 |
3 |
4 | class CloudmConfig(AppConfig):
5 | name = 'cloudm'
6 |
--------------------------------------------------------------------------------
/cloudm/migrations/0001_initial.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 2.2.12 on 2022-04-02 09:54
2 |
3 | from django.db import migrations, models
4 |
5 |
6 | class Migration(migrations.Migration):
7 |
8 | initial = True
9 |
10 | dependencies = [
11 | ]
12 |
13 | operations = [
14 | migrations.CreateModel(
15 | name='Playlists',
16 | fields=[
17 | ('id', models.CharField(default='', max_length=255, primary_key=True, serialize=False)),
18 | ('name', models.CharField(max_length=255, null=True)),
19 | ('type', models.CharField(max_length=255, null=True)),
20 | ('tags', models.CharField(max_length=255, null=True)),
21 | ('create_time', models.CharField(max_length=255, null=True)),
22 | ('update_time', models.CharField(max_length=255, null=True)),
23 | ('tracks_num', models.IntegerField(null=True)),
24 | ('play_count', models.IntegerField(null=True)),
25 | ('subscribed_count', models.IntegerField(null=True)),
26 | ('share_count', models.IntegerField(null=True)),
27 | ('comment_count', models.IntegerField(null=True)),
28 | ('nickname', models.CharField(max_length=255, null=True)),
29 | ('gender', models.CharField(max_length=255, null=True)),
30 | ('user_type', models.CharField(max_length=255, null=True)),
31 | ('vip_type', models.CharField(max_length=255, null=True)),
32 | ('province', models.CharField(max_length=255, null=True)),
33 | ('city', models.CharField(max_length=255, null=True)),
34 | ],
35 | options={
36 | 'db_table': 'playlists',
37 | },
38 | ),
39 | ]
40 |
--------------------------------------------------------------------------------
/cloudm/migrations/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hsxisawd/cloudmusic_django/3ea6921cb20be73bc300b45c60e7af4ce459eafe/cloudm/migrations/__init__.py
--------------------------------------------------------------------------------
/cloudm/migrations/__pycache__/0001_initial.cpython-38.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hsxisawd/cloudmusic_django/3ea6921cb20be73bc300b45c60e7af4ce459eafe/cloudm/migrations/__pycache__/0001_initial.cpython-38.pyc
--------------------------------------------------------------------------------
/cloudm/migrations/__pycache__/__init__.cpython-38.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hsxisawd/cloudmusic_django/3ea6921cb20be73bc300b45c60e7af4ce459eafe/cloudm/migrations/__pycache__/__init__.cpython-38.pyc
--------------------------------------------------------------------------------
/cloudm/models.py:
--------------------------------------------------------------------------------
1 | from django.db import models
2 |
3 | # Create your models here.
4 | class Playlists(models.Model):
5 |
6 | id =models.CharField(max_length=255,default='',primary_key=True)
7 | name=models.CharField(max_length=255,null=True)
8 | type=models.CharField(max_length=255,null=True)
9 | tags=models.CharField(max_length=255,null=True)
10 | create_time=models.CharField(max_length=255,null=True)
11 | update_time=models.CharField(max_length=255,null=True)
12 | tracks_num=models.IntegerField(null=True)
13 | play_count=models.IntegerField(null=True)
14 | subscribed_count=models.IntegerField(null=True)
15 | share_count=models.IntegerField(null=True)
16 | comment_count=models.IntegerField(null=True)
17 | nickname=models.CharField(max_length=255,null=True)
18 | gender=models.CharField(max_length=255,null=True)
19 | user_type=models.CharField(max_length=255,null=True)
20 | vip_type=models.CharField(max_length=255,null=True)
21 | province=models.CharField(max_length=255,null=True)
22 | city=models.CharField(max_length=255,null=True)
23 | def toDict(self):
24 | return {"id":self.id,"name":self.name,"type":self.type,"tags":self.tags,"create_time":self.create_time,"update_time":self.update_time,
25 | "tracks_num":self.tracks_num,"play_count":self.play_count,"subscribed_count":self.subscribed_count,"share_count":self.share_count,
26 | "comment_count":self.comment_count,"nickname":self.nickname,"gender":self.gender,"user_type":self.user_type,"vip_type":self.vip_type,"province":self.province,"city":self.city,}
27 | class Meta:
28 | db_table ='playlists'
--------------------------------------------------------------------------------
/cloudm/tests.py:
--------------------------------------------------------------------------------
1 | from django.test import TestCase
2 |
3 | # Create your tests here.
4 |
--------------------------------------------------------------------------------
/cloudm/views.py:
--------------------------------------------------------------------------------
1 | from django.shortcuts import render
2 | from cloudm.models import Playlists
3 | from django.http import HttpResponse
4 | import pandas as pd
5 | # Create your views here.
6 | import json
7 | import re
8 |
9 | di=Playlists.objects.all()
10 | list1=[]
11 | for i in di:
12 | list1.append(i.toDict())
13 | df=pd.DataFrame(list1)
14 |
15 | """最受欢迎的歌单类型"""
16 |
17 |
18 |
19 | def get_hot_type(request):
20 | hot_type_df = df[['type', 'play_count']].groupby(df['type']).sum().sort_values('play_count',ascending=False).reset_index()
21 | hot_type_top7 = hot_type_df.head(7)
22 | playlist_type = hot_type_top7['type'].tolist()
23 | play_count = hot_type_top7['play_count'].tolist()
24 |
25 | return HttpResponse(json.dumps({'playlist_type': playlist_type, 'play_count': play_count}, ensure_ascii=False))
26 |
27 |
28 | """最受欢迎的歌单"""
29 |
30 |
31 |
32 | def get_hot_playlist(request):
33 | hot_playlist_df = df[['name', 'play_count']].sort_values('play_count', ascending=False).reset_index()
34 | hot_playlist_top5 = hot_playlist_df.head(5)
35 | playlist_name = hot_playlist_top5['name'].tolist()
36 | play_count = hot_playlist_top5['play_count'].tolist()
37 |
38 | return HttpResponse(json.dumps({'playlist_name': playlist_name, 'play_count': play_count}, ensure_ascii=False))
39 |
40 |
41 | """歌单数据随月份变化"""
42 |
43 |
44 |
45 | def get_month_data(request):
46 | yearList = []
47 |
48 | for year in ['2018', '2019']:
49 | yearList.append({
50 | "year": year,
51 | "data": [
52 | df[df['create_time'].str[:4] == year].groupby(df['create_time'].str[5:7]).sum().reset_index()[
53 | 'share_count'].tolist(),
54 | df[df['create_time'].str[:4] == year].groupby(df['create_time'].str[5:7]).sum().reset_index()[
55 | 'comment_count'].tolist()
56 | ]
57 | })
58 | month = df[df['create_time'].str[:4] == year].groupby(df['create_time'].str[5:7]).sum().reset_index()[
59 | 'create_time'].tolist()
60 | yearData = {
61 | "yearData": yearList,
62 | "monthList": [str(int(x)) + '月' for x in month]
63 | }
64 |
65 | return HttpResponse(json.dumps(yearData, ensure_ascii=False))
66 |
67 |
68 | """歌单数据随天数变化"""
69 |
70 |
71 |
72 | def get_day_data(request):
73 | non_vip_df = df[df['vip_type'] == '0'].groupby(df['create_time'].str[8:10]).sum().reset_index()[
74 | ['create_time', 'subscribed_count']]
75 | vip_df = \
76 | df[(df['vip_type'] == '10') | (df['vip_type'] == '11')].groupby(df['create_time'].str[8:10]).sum().reset_index()[
77 | ['create_time', 'subscribed_count']]
78 | vip_type_df = pd.merge(non_vip_df, vip_df, left_on='create_time', right_on='create_time', how='inner')
79 |
80 | sub_data = {
81 | "day": [str(int(x)) for x in vip_type_df["create_time"].tolist()],
82 | "vip": vip_type_df["subscribed_count_y"].tolist(),
83 | "nonvip": vip_type_df["subscribed_count_x"].tolist(),
84 |
85 | }
86 |
87 | return HttpResponse(json.dumps(sub_data, ensure_ascii=False))
88 |
89 |
90 | """歌单歌曲数量分布"""
91 |
92 |
93 |
94 | def get_track_data(request):
95 | bins = [0, 50, 150, 500, 100000]
96 | cuts = pd.cut(df['tracks_num'], bins=bins, right=False, include_lowest=True)
97 | data_count = cuts.value_counts()
98 | data = dict(zip([str(x) for x in data_count.index.tolist()], data_count.tolist()))
99 | map_data = [{'name': name, 'value': value} for name, value in data.items()]
100 | track_value = {'t_v': map_data}
101 |
102 | return HttpResponse(json.dumps(track_value, ensure_ascii=False))
103 |
104 |
105 | """语种类型歌单播放量"""
106 |
107 |
108 |
109 | def get_type_data(request):
110 | playlist_type_df = df[['type', 'play_count']].groupby(df['type']).sum()
111 | playlist_type_df = playlist_type_df.loc[['华语', '欧美', '日语', '韩语', '粤语'], :]
112 | data = dict(zip(playlist_type_df.index.tolist(), playlist_type_df['play_count'].tolist()))
113 | map_data = [{'name': name, 'value': value} for name, value in data.items()]
114 | type_sum = {'t_s': map_data}
115 |
116 | return HttpResponse(json.dumps(type_sum, ensure_ascii=False))
117 |
118 |
119 | def replace_str(x):
120 | rep_list = ['省', '市', '维吾尔', '自治区', '壮族', '回族', '维吾尔族', '特别行政区']
121 | for rep in rep_list:
122 | x = re.sub(rep, '', x)
123 | return x
124 |
125 |
126 | def add_province(df_data, province):
127 | # 所有年份
128 | years = df_data['create_time'].drop_duplicates().tolist()
129 | for year in years:
130 | # 每年的省份
131 | new_province = df_data.loc[df_data['create_time'] == year, :]['province'].drop_duplicates().tolist()
132 | # 缺失的省份 = 所有省份 - 每年的省份
133 | rest_province = [x for x in province if x not in new_province]
134 | # 对缺失的省份生成一个DataFrame,填充0值,并与原DataFrame合并
135 | if len(rest_province):
136 | rest_df = pd.DataFrame([[year, x, 0, 0] for x in rest_province], columns=df_data.columns)
137 | df_data = pd.concat([df_data, rest_df], ignore_index=True)
138 |
139 | return df_data
140 |
141 |
142 | """动态地图"""
143 |
144 |
145 |
146 | def get_map_data(request):
147 | time_df = df.groupby([df['create_time'].str[:4], df['province'].apply(replace_str)])[
148 | ['play_count', 'share_count']].count().reset_index()
149 | re_time_df = time_df[time_df['province'] != '海外']
150 | province = re_time_df['province'].drop_duplicates().tolist()
151 |
152 | re_time_df2 = add_province(re_time_df, province)
153 |
154 | final_time_df = re_time_df2.sort_values(by=['create_time', 'province']).reset_index(drop=True)
155 | final_province = final_time_df['province'].drop_duplicates().tolist()
156 | final_year = final_time_df['create_time'].drop_duplicates().tolist()
157 |
158 | playlist_num = []
159 | for year in final_year:
160 | playlist_num.append(final_time_df.loc[final_time_df['create_time'] == year, 'play_count'].tolist())
161 |
162 | playlist_data = {"year": final_year, "province": final_province, "playlist_num": playlist_num}
163 |
164 | return HttpResponse(json.dumps(playlist_data, ensure_ascii=False))
165 |
166 |
167 |
168 | def index(request):
169 | gender_df = df[['gender']].groupby(df['gender']).count()
170 | gender_data = {'男': gender_df.loc['男', 'gender'], '女': gender_df.loc['女', 'gender']}
171 | return render(request,'index.html',gender_data)
172 |
173 |
174 |
175 |
--------------------------------------------------------------------------------
/cloudmusic_django/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hsxisawd/cloudmusic_django/3ea6921cb20be73bc300b45c60e7af4ce459eafe/cloudmusic_django/__init__.py
--------------------------------------------------------------------------------
/cloudmusic_django/__pycache__/__init__.cpython-38.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hsxisawd/cloudmusic_django/3ea6921cb20be73bc300b45c60e7af4ce459eafe/cloudmusic_django/__pycache__/__init__.cpython-38.pyc
--------------------------------------------------------------------------------
/cloudmusic_django/__pycache__/settings.cpython-38.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hsxisawd/cloudmusic_django/3ea6921cb20be73bc300b45c60e7af4ce459eafe/cloudmusic_django/__pycache__/settings.cpython-38.pyc
--------------------------------------------------------------------------------
/cloudmusic_django/__pycache__/urls.cpython-38.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hsxisawd/cloudmusic_django/3ea6921cb20be73bc300b45c60e7af4ce459eafe/cloudmusic_django/__pycache__/urls.cpython-38.pyc
--------------------------------------------------------------------------------
/cloudmusic_django/__pycache__/wsgi.cpython-38.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hsxisawd/cloudmusic_django/3ea6921cb20be73bc300b45c60e7af4ce459eafe/cloudmusic_django/__pycache__/wsgi.cpython-38.pyc
--------------------------------------------------------------------------------
/cloudmusic_django/settings.py:
--------------------------------------------------------------------------------
1 | """
2 | Django settings for cloudmusic_django project.
3 |
4 | Generated by 'django-admin startproject' using Django 2.2.12.
5 |
6 | For more information on this file, see
7 | https://docs.djangoproject.com/en/2.2/topics/settings/
8 |
9 | For the full list of settings and their values, see
10 | https://docs.djangoproject.com/en/2.2/ref/settings/
11 | """
12 |
13 | import os
14 |
15 | # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
16 | BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
17 |
18 |
19 | # Quick-start development settings - unsuitable for production
20 | # See https://docs.djangoproject.com/en/2.2/howto/deployment/checklist/
21 |
22 | # SECURITY WARNING: keep the secret key used in production secret!
23 | SECRET_KEY = ')55cqg-r_qj2-t$c9!@_q*@n&h1#w5c9z%&_sr)x9^pd$+tyd!'
24 |
25 | # SECURITY WARNING: don't run with debug turned on in production!
26 | DEBUG = False
27 |
28 | ALLOWED_HOSTS = ['https://django-x5sd-1774044-1306796063.ap-shanghai.run.tcloudbase.com']
29 |
30 |
31 | # Application definition
32 |
33 | INSTALLED_APPS = [
34 | 'django.contrib.admin',
35 | 'django.contrib.auth',
36 | 'django.contrib.contenttypes',
37 | 'django.contrib.sessions',
38 | 'django.contrib.messages',
39 | 'django.contrib.staticfiles',
40 | 'cloudm.apps.CloudmConfig',
41 | ]
42 |
43 | MIDDLEWARE = [
44 | 'django.middleware.security.SecurityMiddleware',
45 | 'django.contrib.sessions.middleware.SessionMiddleware',
46 | 'django.middleware.common.CommonMiddleware',
47 | 'django.middleware.csrf.CsrfViewMiddleware',
48 | 'django.contrib.auth.middleware.AuthenticationMiddleware',
49 | 'django.contrib.messages.middleware.MessageMiddleware',
50 | 'django.middleware.clickjacking.XFrameOptionsMiddleware',
51 | ]
52 |
53 | ROOT_URLCONF = 'cloudmusic_django.urls'
54 |
55 | TEMPLATES = [
56 | {
57 | 'BACKEND': 'django.template.backends.django.DjangoTemplates',
58 | 'DIRS': [BASE_DIR,'templates'],
59 | 'APP_DIRS': True,
60 | 'OPTIONS': {
61 | 'context_processors': [
62 | 'django.template.context_processors.debug',
63 | 'django.template.context_processors.request',
64 | 'django.contrib.auth.context_processors.auth',
65 | 'django.contrib.messages.context_processors.messages',
66 | ],
67 | },
68 | },
69 | ]
70 |
71 | WSGI_APPLICATION = 'cloudmusic_django.wsgi.application'
72 |
73 |
74 | # Database
75 | # https://docs.djangoproject.com/en/2.2/ref/settings/#databases
76 |
77 | DATABASES = {
78 | 'default': {
79 | 'ENGINE': 'django.db.backends.mysql',
80 | 'NAME': 'cloudmusic',
81 | 'USER': 'root',
82 | 'PASSWORD': 'Hsx20020610',
83 | 'HOST': '10.0.224.5',
84 | 'PORT': '3306',
85 | }
86 | }
87 |
88 |
89 | # Password validation
90 | # https://docs.djangoproject.com/en/2.2/ref/settings/#auth-password-validators
91 |
92 | AUTH_PASSWORD_VALIDATORS = [
93 | {
94 | 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
95 | },
96 | {
97 | 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
98 | },
99 | {
100 | 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
101 | },
102 | {
103 | 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
104 | },
105 | ]
106 |
107 |
108 | # Internationalization
109 | # https://docs.djangoproject.com/en/2.2/topics/i18n/
110 |
111 | LANGUAGE_CODE = 'zh-Hans'
112 |
113 | TIME_ZONE = 'Asia/ShangHai'
114 |
115 | USE_I18N = True
116 |
117 | USE_L10N = True
118 |
119 | USE_TZ = True
120 |
121 |
122 | # Static files (CSS, JavaScript, Images)
123 | # https://docs.djangoproject.com/en/2.2/howto/static-files/
124 |
125 | STATIC_URL = '/static/'
126 | STATICFILES_DIRS = [
127 | os.path.join(BASE_DIR,'static'),
128 | ]
129 |
--------------------------------------------------------------------------------
/cloudmusic_django/urls.py:
--------------------------------------------------------------------------------
1 | """cloudmusic_django URL Configuration
2 |
3 | The `urlpatterns` list routes URLs to views. For more information please see:
4 | https://docs.djangoproject.com/en/2.2/topics/http/urls/
5 | Examples:
6 | Function views
7 | 1. Add an import: from my_app import views
8 | 2. Add a URL to urlpatterns: path('', views.home, name='home')
9 | Class-based views
10 | 1. Add an import: from other_app.views import Home
11 | 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home')
12 | Including another URLconf
13 | 1. Import the include() function: from django.urls import include, path
14 | 2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
15 | """
16 | from django.contrib import admin
17 | from django.urls import path
18 |
19 | import cloudm.views
20 |
21 | urlpatterns = [
22 | path('admin/', admin.site.urls),
23 | path("",cloudm.views.index),
24 | path('get_hot_type/',cloudm.views.get_hot_type,name="get_hot_type"),
25 | path('get_hot_playlist/',cloudm.views.get_hot_playlist,name="get_hot_playlist"),
26 | path('get_month_data/',cloudm.views.get_month_data,name="get_month_data"),
27 | path('get_day_data/',cloudm.views.get_day_data,name="get_day_data"),
28 | path('get_track_data/',cloudm.views.get_track_data,name="get_track_data"),
29 | path('get_type_data/',cloudm.views.get_type_data,name="get_type_data"),
30 | path('get_map_data/',cloudm.views.get_map_data,name="get_map_data"),
31 | ]
32 |
--------------------------------------------------------------------------------
/cloudmusic_django/uwsgi.ini:
--------------------------------------------------------------------------------
1 | [uwsgi]
2 |
3 | http=0.0.0.0:8000
4 | chdir=./code
5 | wsgi-file=cloudmusic_django/wsgi.py
6 | process=4
7 | threads=2
8 | pidfile=uwsgi.pid
9 | daemonize=uwsgi.log
10 | master=True
--------------------------------------------------------------------------------
/cloudmusic_django/wsgi.py:
--------------------------------------------------------------------------------
1 | """
2 | WSGI config for cloudmusic_django project.
3 |
4 | It exposes the WSGI callable as a module-level variable named ``application``.
5 |
6 | For more information on this file, see
7 | https://docs.djangoproject.com/en/2.2/howto/deployment/wsgi/
8 | """
9 |
10 | import os
11 |
12 | from django.core.wsgi import get_wsgi_application
13 |
14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'cloudmusic_django.settings')
15 |
16 | application = get_wsgi_application()
17 |
--------------------------------------------------------------------------------
/manage.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | """Django's command-line utility for administrative tasks."""
3 | import os
4 | import sys
5 |
6 |
7 | def main():
8 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'cloudmusic_django.settings')
9 | try:
10 | from django.core.management import execute_from_command_line
11 | except ImportError as exc:
12 | raise ImportError(
13 | "Couldn't import Django. Are you sure it's installed and "
14 | "available on your PYTHONPATH environment variable? Did you "
15 | "forget to activate a virtual environment?"
16 | ) from exc
17 | execute_from_command_line(sys.argv)
18 |
19 |
20 | if __name__ == '__main__':
21 | main()
22 |
--------------------------------------------------------------------------------
/requirements.txt:
--------------------------------------------------------------------------------
1 | Django==2.2.12
2 | pandas==1.4.1
3 | uwsgi==2.0.18
4 |
--------------------------------------------------------------------------------
/static/css/index.css:
--------------------------------------------------------------------------------
1 | * {
2 | margin: 0;
3 | padding: 0;
4 | box-sizing: border-box;
5 | }
6 | li {
7 | list-style: none;
8 | }
9 | @font-face {
10 | font-family: electronicFont;
11 | src: url(../font/DS-DIGIT.TTF);
12 | }
13 | body {
14 | background: url(../img/bg.jpg) no-repeat top center;
15 | line-height: 1.15;
16 | }
17 | header {
18 | position: relative;
19 | height: 1.25rem;
20 | background: url(../img/head_bg.png) no-repeat;
21 | background-size: 100% 100%;
22 | }
23 | header h1 {
24 | font-size: 0.475rem;
25 | color: #fff;
26 | text-align: center;
27 | line-height: 1rem;
28 | }
29 | header .showTime {
30 | position: absolute;
31 | right: 0.375rem;
32 | top: 0;
33 | line-height: 0.9375rem;
34 | color: rgba(255, 255, 255, 0.7);
35 | font-size: 0.25rem;
36 | }
37 | .mainbox {
38 | display: flex;
39 | min-width: 1024px;
40 | max-width: 1920px;
41 | margin: 0 auto;
42 | padding: 0.125rem 0.125rem 0;
43 | }
44 | .mainbox .column {
45 | flex: 3;
46 | }
47 | .mainbox .column:nth-child(2) {
48 | flex: 5;
49 | margin: 0 0.125rem 0.1875rem;
50 | overflow: hidden;
51 | }
52 | .mainbox .panel {
53 | position: relative;
54 | height: 3.875rem;
55 | padding: 0 0.1875rem 0.5rem;
56 | border: 1px solid rgba(25, 186, 139, 0.17);
57 | margin-bottom: 0.1875rem;
58 | background: url(../img/line.png) rgba(255, 255, 255, 0.03);
59 | }
60 | .mainbox .panel::before {
61 | position: absolute;
62 | top: 0;
63 | left: 0;
64 | width: 10px;
65 | height: 10px;
66 | border-left: 2px solid #02a6b5;
67 | border-top: 2px solid #02a6b5;
68 | content: "";
69 | }
70 | .mainbox .panel::after {
71 | position: absolute;
72 | top: 0;
73 | right: 0;
74 | width: 10px;
75 | height: 10px;
76 | border-right: 2px solid #02a6b5;
77 | border-top: 2px solid #02a6b5;
78 | content: "";
79 | }
80 | .mainbox .panel .panel-footer {
81 | position: absolute;
82 | bottom: 0;
83 | left: 0;
84 | width: 100%;
85 | }
86 | .mainbox .panel .panel-footer::before {
87 | position: absolute;
88 | left: 0;
89 | bottom: 0;
90 | width: 10px;
91 | height: 10px;
92 | border-left: 2px solid #02a6b5;
93 | border-bottom: 2px solid #02a6b5;
94 | content: "";
95 | }
96 | .mainbox .panel .panel-footer::after {
97 | position: absolute;
98 | bottom: 0;
99 | right: 0;
100 | width: 10px;
101 | height: 10px;
102 | border-right: 2px solid #02a6b5;
103 | border-bottom: 2px solid #02a6b5;
104 | content: "";
105 | }
106 | .mainbox .panel h2 {
107 | height: 0.6rem;
108 | color: #fff;
109 | line-height: 0.6rem;
110 | text-align: center;
111 | font-size: 0.25rem;
112 | font-weight: 400;
113 | }
114 | .mainbox .panel h2 a {
115 | color: #fff;
116 | text-decoration: none;
117 | margin: 0 0.125rem;
118 | }
119 | .mainbox .panel .chart {
120 | height: 3rem;
121 | }
122 | .no {
123 | background-color: rgba(101, 132, 226, 0.1);
124 | padding: 0.1875rem;
125 | }
126 | .no .no-hd {
127 | position: relative;
128 | border: 1px solid rgba(25, 186, 139, 0.17);
129 | }
130 | .no .no-hd::before {
131 | position: absolute;
132 | top: 0;
133 | left: 0;
134 | content: "";
135 | width: 30px;
136 | height: 10px;
137 | border-top: 2px solid #02a6b5;
138 | border-left: 2px solid #02a6b5;
139 | }
140 | .no .no-hd::after {
141 | position: absolute;
142 | bottom: 0;
143 | right: 0;
144 | content: "";
145 | width: 30px;
146 | height: 10px;
147 | border-right: 2px solid #02a6b5;
148 | border-bottom: 2px solid #02a6b5;
149 | }
150 | .no .no-hd ul {
151 | display: flex;
152 | }
153 | .no .no-hd ul li {
154 | position: relative;
155 | flex: 1;
156 | line-height: 1rem;
157 | font-size: 0.875rem;
158 | color: #ffeb7b;
159 | text-align: center;
160 | font-family: "electronicFont";
161 | }
162 | .no .no-hd ul li::after {
163 | content: "";
164 | position: absolute;
165 | top: 25%;
166 | right: 0;
167 | height: 50%;
168 | width: 1px;
169 | background: rgba(255, 255, 255, 0.2);
170 | }
171 | .no .no-bd ul {
172 | display: flex;
173 | }
174 | .no .no-bd ul li {
175 | flex: 1;
176 | text-align: center;
177 | color: rgba(255, 255, 255, 0.7);
178 | font-size: 0.225rem;
179 | height: 0.5rem;
180 | line-height: 0.5rem;
181 | padding-top: 0.125rem;
182 | }
183 | .map {
184 | position: relative;
185 | height: 10.125rem;
186 | }
187 | .map .chart {
188 | position: absolute;
189 | top: 0;
190 | left: 0;
191 | width: 100%;
192 | height: 10.125rem;
193 | }
194 | @media screen and (max-width: 1024px) {
195 | html {
196 | font-size: 42px !important;
197 | }
198 | }
199 | @media screen and (min-width: 1920px) {
200 | html {
201 | font-size: 80px !important;
202 | }
203 | }
204 |
--------------------------------------------------------------------------------
/static/css/index.less:
--------------------------------------------------------------------------------
1 | // css初始化
2 | * {
3 | margin: 0;
4 | padding: 0;
5 | box-sizing: border-box;
6 | }
7 |
8 | li {
9 | list-style: none;
10 | }
11 |
12 | // 声明字体
13 | @font-face {
14 | font-family: electronicFont;
15 | src: url(../font/DS-DIGIT.TTF);
16 | }
17 |
18 | body {
19 | background: url(../img/bg.jpg) no-repeat top center;
20 | line-height: 1.15;
21 | }
22 |
23 |
24 | // 头部
25 | header {
26 | position: relative;
27 | height: 1.25rem;
28 | background: url(../img/head_bg.png) no-repeat;
29 | background-size: 100% 100%;
30 | h1 {
31 | font-size: 0.475rem;
32 | color: #fff;
33 | text-align: center;
34 | line-height: 1rem;
35 | }
36 | .showTime {
37 | position: absolute;
38 | right: 0.375rem;
39 | top: 0;
40 | line-height: 0.9375rem;
41 | color: rgba(255, 255, 255, 0.7);
42 | font-size: 0.25rem;
43 | }
44 | }
45 |
46 | // 页面主体盒子
47 | .mainbox {
48 | display: flex;
49 | min-width: 1024px;
50 | max-width: 1920px;
51 | margin: 0 auto;
52 | padding: 0.125rem 0.125rem 0;
53 | .column {
54 | flex: 3;
55 | }
56 | .column:nth-child(2) {
57 | flex: 5;
58 | margin: 0 0.125rem 0.1875rem;
59 | overflow: hidden;
60 | }
61 | .panel {
62 | position: relative;
63 | height: 3.875rem;
64 | padding: 0 0.1875rem 0.5rem;
65 | border: 1px solid rgba(25, 186, 139, 0.17);
66 | margin-bottom: 0.1875rem;
67 | background: url(../img/line.png) rgba(255, 255, 255, 0.03);
68 | &::before {
69 | position: absolute;
70 | top: 0;
71 | left: 0;
72 | width: 10px;
73 | height: 10px;
74 | border-left: 2px solid #02a6b5;
75 | border-top: 2px solid #02a6b5;
76 | content: "";
77 | }
78 | &::after {
79 | position: absolute;
80 | top: 0;
81 | right: 0;
82 | width: 10px;
83 | height: 10px;
84 | border-right: 2px solid #02a6b5;
85 | border-top: 2px solid #02a6b5;
86 | content: "";
87 | }
88 | .panel-footer {
89 | position: absolute;
90 | bottom: 0;
91 | left: 0;
92 | width: 100%;
93 | &::before {
94 | position: absolute;
95 | left: 0;
96 | bottom: 0;
97 | width: 10px;
98 | height: 10px;
99 | border-left: 2px solid #02a6b5;
100 | border-bottom: 2px solid #02a6b5;
101 | content: "";
102 | }
103 | &::after {
104 | position: absolute;
105 | bottom: 0;
106 | right: 0;
107 | width: 10px;
108 | height: 10px;
109 | border-right: 2px solid #02a6b5;
110 | border-bottom: 2px solid #02a6b5;
111 | content: "";
112 | }
113 | }
114 | h2 {
115 | height: 0.6rem;
116 | color: #fff;
117 | line-height: 0.6rem;
118 | text-align: center;
119 | font-size: 0.25rem;
120 | font-weight: 400;
121 | a {
122 | color: #fff;
123 | text-decoration: none;
124 | margin: 0 0.125rem;
125 | }
126 | }
127 | .chart {
128 | height: 3rem;
129 | }
130 | }
131 | }
132 |
133 |
134 | // no数字模块
135 | .no {
136 | background-color: rgba(101, 132, 226, 0.1);
137 | padding: 0.1875rem;
138 | .no-hd {
139 | position: relative;
140 | border: 1px solid rgba(25, 186, 139, 0.17);
141 | &::before {
142 | position: absolute;
143 | top: 0;
144 | left: 0;
145 | content: "";
146 | width: 30px;
147 | height: 10px;
148 | border-top: 2px solid #02a6b5;
149 | border-left: 2px solid #02a6b5;
150 | }
151 | &::after {
152 | position: absolute;
153 | bottom: 0;
154 | right: 0;
155 | content: "";
156 | width: 30px;
157 | height: 10px;
158 | border-right: 2px solid #02a6b5;
159 | border-bottom: 2px solid #02a6b5;
160 | }
161 | ul {
162 | display: flex;
163 | li {
164 | position: relative;
165 | flex: 1;
166 | line-height: 1rem;
167 | font-size: 0.875rem;
168 | color: #ffeb7b;
169 | text-align: center;
170 | font-family: "electronicFont";
171 | &::after {
172 | content: "";
173 | position: absolute;
174 | top: 25%;
175 | right: 0;
176 | height: 50%;
177 | width: 1px;
178 | background: rgba(255, 255, 255, 0.2);
179 | }
180 | }
181 | }
182 | }
183 | .no-bd {
184 | ul {
185 | display: flex;
186 | li {
187 | flex: 1;
188 | text-align: center;
189 | color: rgba(255, 255, 255, 0.7);
190 | font-size: 0.225rem;
191 | height: 0.5rem;
192 | line-height: 0.5rem;
193 | padding-top: 0.125rem;
194 | }
195 | }
196 | }
197 | }
198 |
199 | .map {
200 | position: relative;
201 | height: 10.125rem;
202 | .chart {
203 | position: absolute;
204 | top: 0;
205 | left: 0;
206 | width: 100%;
207 | height: 10.125rem;
208 | }
209 | }
210 |
211 | @media screen and (max-width: 1024px) {
212 | html {
213 | font-size: 42px !important;
214 | }
215 | }
216 | @media screen and (min-width: 1920px) {
217 | html {
218 | font-size: 80px !important;
219 | }
220 | }
--------------------------------------------------------------------------------
/static/font/DS-DIGIT.TTF:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hsxisawd/cloudmusic_django/3ea6921cb20be73bc300b45c60e7af4ce459eafe/static/font/DS-DIGIT.TTF
--------------------------------------------------------------------------------
/static/img/bg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hsxisawd/cloudmusic_django/3ea6921cb20be73bc300b45c60e7af4ce459eafe/static/img/bg.jpg
--------------------------------------------------------------------------------
/static/img/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hsxisawd/cloudmusic_django/3ea6921cb20be73bc300b45c60e7af4ce459eafe/static/img/favicon.ico
--------------------------------------------------------------------------------
/static/img/head_bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hsxisawd/cloudmusic_django/3ea6921cb20be73bc300b45c60e7af4ce459eafe/static/img/head_bg.png
--------------------------------------------------------------------------------
/static/img/line.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hsxisawd/cloudmusic_django/3ea6921cb20be73bc300b45c60e7af4ce459eafe/static/img/line.png
--------------------------------------------------------------------------------
/static/js/flexible.js:
--------------------------------------------------------------------------------
1 | (function flexible(window, document) {
2 | var docEl = document.documentElement;
3 | var dpr = window.devicePixelRatio || 1;
4 |
5 | // adjust body font size
6 | function setBodyFontSize() {
7 | if (document.body) {
8 | document.body.style.fontSize = 12 * dpr + "px";
9 | } else {
10 | document.addEventListener("DOMContentLoaded", setBodyFontSize);
11 | }
12 | }
13 | setBodyFontSize();
14 |
15 | // set 1rem = viewWidth / 10
16 | function setRemUnit() {
17 | var rem = docEl.clientWidth / 24;
18 | docEl.style.fontSize = rem + "px";
19 | }
20 |
21 | setRemUnit();
22 |
23 | // reset rem unit on page resize
24 | window.addEventListener("resize", setRemUnit);
25 | window.addEventListener("pageshow", function(e) {
26 | if (e.persisted) {
27 | setRemUnit();
28 | }
29 | });
30 |
31 | // detect 0.5px supports
32 | if (dpr >= 2) {
33 | var fakeBody = document.createElement("body");
34 | var testElement = document.createElement("div");
35 | testElement.style.border = ".5px solid transparent";
36 | fakeBody.appendChild(testElement);
37 | docEl.appendChild(fakeBody);
38 | if (testElement.offsetHeight === 1) {
39 | docEl.classList.add("hairlines");
40 | }
41 | docEl.removeChild(fakeBody);
42 | }
43 | })(window, document);
44 |
--------------------------------------------------------------------------------
/static/js/index.js:
--------------------------------------------------------------------------------
1 | // 柱状图1
2 |
3 | (function() {
4 | var myChart = echarts.init(document.querySelector(".bar1 .chart"));
5 | $.ajax({
6 | url: '/get_hot_type/',
7 | success: function(data) {
8 | json_data = JSON.parse(data)
9 | var option = {
10 | color: ["#2f89cf"],
11 | tooltip: {
12 | trigger: "axis",
13 | axisPointer: { // 坐标轴指示器
14 | type: "shadow"
15 | }
16 | },
17 | grid: { // 修改图表大小
18 | left: "0%",
19 | top: "10px",
20 | right: "0%",
21 | bottom: "4%",
22 | containLabel: true
23 | },
24 | xAxis: {
25 | type: "category",
26 | data: json_data['playlist_type'],
27 | axisTick: {
28 | alignWithLabel: true
29 | },
30 | axisLabel: { // 修改刻度标签
31 | color: "rgba(255, 255, 255, .6)",
32 | fontSize: 12
33 | },
34 | axisLine: { // 不显示x坐标轴的样式
35 | show: false
36 | }
37 | },
38 | yAxis: [
39 | {
40 | type: "value",
41 | axisLabel: { // 修改刻度标签
42 | color: "rgba(255, 255, 255, .6)",
43 | fontSize: 12,
44 | formatter: function(value) {
45 | return (value / 100000000).toLocaleString() + ' 亿'
46 | }
47 | },
48 | axisLine: { // y轴的线条
49 | lineStyle: {
50 | color: "rgba(255, 255, 255, .1)",
51 | width: 2
52 | }
53 | },
54 | splitLine: { // 分割线
55 | lineStyle: {
56 | color: "rgba(255, 255, 255, .1)"
57 | }
58 | }
59 | }
60 | ],
61 | series: [{
62 | name: "热度",
63 | type: "bar",
64 | barWidth: "35%",
65 | data: json_data['play_count'],
66 | itemStyle: { // 修改柱子圆角
67 | barBorderRadius: 5
68 | }
69 | }]
70 | };
71 | myChart.setOption(option)
72 | }
73 | })
74 | // 监听浏览器缩放,图表对象调用缩放resize函数
75 | window.addEventListener("resize", function() {
76 | myChart.resize();
77 | });
78 |
79 | })();
80 |
81 |
82 | // 柱状图2
83 | (function() {
84 | var myChart = echarts.init(document.querySelector(".bar2 .chart"));
85 | $.ajax({
86 | url:'/get_hot_playlist/',
87 | success: function(data) {
88 | json_data = JSON.parse(data)
89 | var top5Playlist = json_data['playlist_name'];
90 | var top5Hot = json_data['play_count'];
91 |
92 | var color1 = ['#ff9500', '#02d8f9', '#027fff']
93 | var color2 = ['#ffb349', '#70e9fc', '#4aa4ff']
94 |
95 | let lineY = []
96 | let lineT = []
97 | for (var i = 0; i < top5Playlist.length; i++) {
98 | var x = i
99 | if (x > 1) {
100 | x = 2
101 | }
102 | var data1 = {
103 | name: top5Playlist[i],
104 | color: color1[x],
105 | value: top5Hot[i],
106 | barGap: '-100%',
107 | itemStyle: {
108 | normal: {
109 | show: true,
110 | color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{
111 | offset: 0,
112 | color: color1[x]
113 | }, {
114 | offset: 1,
115 | color: color2[x]
116 | }], false),
117 | barBorderRadius: 10
118 | },
119 | emphasis: {
120 | shadowBlur: 15,
121 | shadowColor: 'rgba(0, 0, 0, 0.1)'
122 | }
123 | }
124 | }
125 | var data2 = {
126 | value: top5Hot[0],
127 | itemStyle: {
128 | color: '#001235',
129 | barBorderRadius: 10
130 | }
131 | }
132 | lineY.push(data1)
133 | lineT.push(data2)
134 | }
135 |
136 | option = {
137 | tooltip: {
138 | trigger: 'item',
139 | formatter: (p) => {
140 | if (p.seriesName === 'total') {
141 | return ''
142 | }
143 | return `${p.name} 热度: ${p.value}`
144 | }
145 | },
146 | grid: {
147 | borderWidth: 0,
148 | top: '10px',
149 | left: '3%',
150 | right: '10%',
151 | bottom: '3%'
152 | },
153 | color: color1,
154 | xAxis: {
155 | type: 'value',
156 | axisTick: {
157 | show: false
158 | },
159 | axisLine: {
160 | show: false
161 | },
162 | splitLine: {
163 | show: false
164 | },
165 | axisLabel: {
166 | show: false
167 | }
168 | },
169 | yAxis: [{
170 | type: 'category',
171 | inverse: true,
172 | axisTick: {
173 | show: false
174 | },
175 | axisLine: {
176 | show: false
177 | },
178 | axisLabel: {
179 | show: false,
180 | inside: false
181 | },
182 | data: top5Playlist
183 | }, {
184 | type: 'category',
185 | axisLine: {
186 | show: false
187 | },
188 | axisTick: {
189 | show: false
190 | },
191 | axisLabel: {
192 | show: true,
193 | inside: false,
194 | margin: 0,
195 | verticalAlign: 'bottom',
196 | lineHeight: '20',
197 | textStyle: {
198 | color: '#b3ccf8',
199 | fontSize: '14',
200 | fontFamily: 'PingFangSC-Regular'
201 | },
202 | formatter: function(value) {
203 | return (value / 100000000).toFixed(2).toLocaleString() + ' 亿'
204 | }
205 | },
206 | splitArea: {
207 | show: false
208 | },
209 | splitLine: {
210 | show: false
211 | },
212 | data: top5Hot.reverse()
213 | }],
214 |
215 | series: [{
216 | name: 'total',
217 | type: 'bar',
218 | zlevel: 1,
219 | barGap: '-100%',
220 | barWidth: '10px',
221 | data: lineT,
222 | legendHoverLink: false
223 | },
224 | {
225 | name: 'bar',
226 | type: 'bar',
227 | zlevel: 2,
228 | barWidth: '10px',
229 | data: lineY,
230 | label: {
231 | normal: {
232 | color: '#b3ccf8',
233 | show: true,
234 | position: [0, '-24px'],
235 | textStyle: {
236 | fontSize: 16
237 | },
238 | formatter: function(a) {
239 | let num = ''
240 | let str = ''
241 | if (a.dataIndex + 1 < 10) {
242 | num = '0' + (a.dataIndex + 1);
243 | } else {
244 | num = (a.dataIndex + 1);
245 | }
246 | if (a.dataIndex === 0) {
247 | str = `{color1|${num}} {color4|${a.name}}`
248 | } else if (a.dataIndex === 1) {
249 | str = `{color2|${num}} {color4|${a.name}}`
250 | } else {
251 | str = `{color3|${num}} {color4|${a.name}}`
252 | }
253 | return str;
254 | },
255 | rich: {
256 | color1: {
257 | color: '#ff9500',
258 | fontWeight: 700
259 | },
260 | color2: {
261 | color: '#02d8f9',
262 | fontWeight: 700
263 | },
264 | color3: {
265 | color: '#027fff',
266 | fontWeight: 700
267 | },
268 | color4: {
269 | color: '#e5eaff'
270 | }
271 | }
272 | }
273 | }
274 | }],
275 | };
276 | myChart.setOption(option);
277 | }
278 | })
279 |
280 | window.addEventListener("resize", function() {
281 | myChart.resize();
282 | })
283 | })();
284 |
285 |
286 | // 折线图1
287 | (function() {
288 | var myChart = echarts.init(document.querySelector(".line1 .chart"));
289 | $.ajax({
290 | url: '/get_month_data',
291 | success: function(data) {
292 | var json_data = JSON.parse(data);
293 |
294 | var yearData = json_data['yearData'];
295 |
296 | var option = {
297 | color: ["#00f2f1", "#ed3f35"],
298 | tooltip: {
299 | trigger: "axis"
300 | },
301 | legend: {
302 | textStyle: {
303 | color: "rgba(255, 255, 255, .6)",
304 | },
305 | right: "10%"
306 | },
307 | grid: {
308 | top: "20%",
309 | left: "0",
310 | right: "4%",
311 | bottom: "3%",
312 | show: true,
313 | borderColor: "#012f4a",
314 | containLabel: true
315 | },
316 | xAxis: {
317 | type: "category",
318 | boundaryGap: false,
319 | data: json_data['monthList'],
320 | axisTick: {
321 | show: false
322 | },
323 | axisLabel: {
324 | color: "rgba(255, 255, 255, .6)",
325 | },
326 | axisLine: {
327 | show: false
328 | }
329 | },
330 | yAxis: {
331 | type: "value",
332 | axisTick: {
333 | show: false
334 | },
335 | axisLabel: {
336 | textStyle: {
337 | color: "rgba(255, 255, 255, .6)",
338 | fontFamily: 'PingFangSC-Regular'
339 | },
340 | formatter: function(value) {
341 | return (value / 10000).toLocaleString() + ' 万'
342 | }
343 | },
344 | axisLine: {
345 | show: false
346 | },
347 | splitLine: {
348 | lineStyle: {
349 | color: "#012f4a"
350 | }
351 | }
352 | },
353 | series: [
354 | {
355 | name: "分享量",
356 | type: "line",
357 | smooth: true,
358 | data: yearData[0].data[0]
359 | },
360 | {
361 | name: "评论数",
362 | type: "line",
363 | smooth: true,
364 | data: yearData[0].data[1]
365 | }
366 | ]
367 | };
368 |
369 | myChart.setOption(option);
370 | $(".line1 h2").on("click", "a", function() {
371 | var obj = yearData[$(this).index()];
372 | option.series[0].data = obj.data[0];
373 | option.series[1].data = obj.data[1];
374 | myChart.setOption(option)
375 | })
376 | }
377 | });
378 |
379 |
380 | window.addEventListener("resize", function() {
381 | myChart.resize();
382 | });
383 | })();
384 |
385 |
386 | // 折线图2
387 | (function() {
388 | var myChart = echarts.init(document.querySelector(".line2 .chart"));
389 |
390 | $.ajax({
391 | url: '/get_day_data',
392 | success: function(data) {
393 | json_data = JSON.parse(data);
394 |
395 | var option = {
396 | tooltip: {
397 | trigger: "axis"
398 | },
399 | legend: {
400 | top: "0%",
401 | data: ["会员", "非会员"],
402 | textStyle: {
403 | color: "rgba(255, 255, 255, 0.6)",
404 | fontSize: 12
405 | }
406 | },
407 | grid: {
408 | left: "0%",
409 | top: "10%",
410 | right: "2%",
411 | bottom: "3%",
412 | containLabel: true
413 | },
414 | xAxis: [
415 | {
416 | type: "category",
417 | boundaryGap: false,
418 | data: json_data['day'],
419 | axisLabel: {
420 | textStyle: {
421 | color: "rgba(255, 255, 255, 0.6)",
422 | fontSize: 12
423 | }
424 | },
425 | axisLine: {
426 | lineStyle: {
427 | color: "rgba(255, 255, 255, .2)"
428 | }
429 | }
430 | }
431 | ],
432 | yAxis: [
433 | {
434 | type: "value",
435 | axisTick: {show: false},
436 | axisLine: {
437 | lineStyle: {
438 | color: "rgba(255, 255, 255, 0.1)"
439 | }
440 | },
441 | axisLabel: {
442 | textStyle: {
443 | color: "rgba(255, 255, 255, 0.6)",
444 | fontSize: 12
445 | },
446 | formatter: function(value) {
447 | return (value / 10000).toLocaleString() + ' 万'
448 | }
449 | },
450 | splitLine: {
451 | lineStyle: {
452 | color: "rgba(255, 255, 255, .1)"
453 | }
454 | }
455 | }
456 | ],
457 | series: [
458 | {
459 | name: "会员",
460 | type: "line",
461 | smooth: true,
462 | lineStyle: {
463 | color: "#0184d5",
464 | width: 2
465 | },
466 | areaStyle: {
467 | color: new echarts.graphic.LinearGradient(0, 0, 0, 1,[
468 | {
469 | offset: 0,
470 | color: "rgba(1, 132, 213, 0.4)"
471 | },
472 | {
473 | offset: 0.8,
474 | color: "rgba(1, 132, 213, 0.1)"
475 | }
476 | ], false),
477 | shadowColor: "rgba(0, 0, 0, 0.1)"
478 | },
479 | symbol: "circle",
480 | symbolSize: 8,
481 | showSymbol: false,
482 | itemStyle: {
483 | color: "#0184d5",
484 | borderColor: "rgba(221, 220, 107, .1)",
485 | borderWidth: 12
486 | },
487 | data: json_data['vip']
488 | },
489 | {
490 | name: "非会员",
491 | type: "line",
492 | smooth: true,
493 | lineStyle:{
494 | normal: {
495 | color: "#00d887",
496 | width: 2
497 | }
498 | },
499 | areaStyle: {
500 | normal: {
501 | color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
502 | {
503 | offset: 0,
504 | color: "rgba(0, 216, 135, 0.4)"
505 | },
506 | {
507 | offset: 0.8,
508 | color: "rgba(0, 216, 135, 0.1)"
509 | }
510 | ], false),
511 | shadowColor: "rgba(0, 0, 0, 0.1)"
512 | }
513 | },
514 | symbol: "circle",
515 | symbolSize: 5,
516 | itemStyle: {
517 | color: "#00d887",
518 | borderColor: "rgba(221, 220, 107, 0.1)",
519 | borderWidth: 12
520 | },
521 | showSymbol: false,
522 | data: json_data['nonvip']
523 | }
524 | ]
525 | };
526 |
527 | myChart.setOption(option);
528 |
529 | }
530 | });
531 |
532 |
533 |
534 | window.addEventListener("resize", function() {
535 | myChart.resize();
536 | });
537 | })();
538 |
539 |
540 | // 饼图1
541 |
542 | (function() {
543 | var myChart = echarts.init(document.querySelector(".pie1 .chart"));
544 |
545 | $.ajax({
546 | url: '/get_track_data',
547 | success: function(data) {
548 | var json_data = JSON.parse(data)['t_v']
549 | var dataList = [];
550 | var color = ['#00ffff','#00cfff','#006ced','#ffe000','#ffa800','#ff5b00','#ff3000'];
551 |
552 | var img = 'data:image/png;base64,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';
553 |
554 | var nameList = []
555 | for (var i=0; i{b} : {c} ({d}%)"
698 | },
699 | legend: {
700 | bottom: "0%",
701 | itemWidth: 10,
702 | itemHeight: 10,
703 | textStyle: {
704 | color: "rgba(255, 255, 255, .6)",
705 | }
706 | },
707 | series: [
708 | {
709 | name: "播放量",
710 | type: "pie",
711 | radius: ["15%", "70%"],
712 | center: ["50%", "50%"],
713 | roseType: "radius",
714 | labelLine: {
715 | length: 6,
716 | length2: 8
717 | },
718 | data: json_data
719 | }
720 | ]
721 | };
722 | myChart.setOption(option);
723 |
724 | }
725 | });
726 |
727 |
728 | window.addEventListener("resize", function() {
729 | myChart.resize();
730 | });
731 | })();
732 |
733 |
734 | // 动态地图
735 | (function() {
736 | var myChart = echarts.init(document.querySelector(".map .chart"));
737 |
738 | $.ajax({
739 | url: '/get_map_data',
740 | success: function(data) {
741 | json_data = JSON.parse(data);
742 |
743 | var years = json_data["year"];
744 | var province = json_data["province"];
745 | var playlist_data = json_data["playlist_num"]
746 |
747 | var option = {
748 | baseOption: {
749 | timeline: {
750 | axisType: 'category',
751 | autoPlay: true,
752 | playInterval: 3000,
753 | symbolSize: 12,
754 | left: '5%',
755 | right: '5%',
756 | bottom: '0%',
757 | width: '90%',
758 | data: years,
759 | tooltip: {
760 | formatter: years
761 | },
762 | lineStyle: {
763 | color: '#fff'
764 | },
765 | label: {
766 | color: '#fff'
767 | },
768 | emphasis: {
769 | itemStyle: {
770 | color: '#ffb247'
771 | }
772 | },
773 | checkpointStyle: {
774 | color: '#ffb247',
775 | borderWidth: 0,
776 | },
777 | controlStyle: {
778 | color: '#fff',
779 | borderColor: '#fff',
780 | },
781 | },
782 | tooltip: {
783 | show: true,
784 | formatter: function(params) {
785 | return params.name + ': ' + params.value
786 | },
787 | },
788 | visualMap: {
789 | type: 'piecewise',
790 | pieces: [
791 | {
792 | min: 1000,
793 | color: '#ffe200'
794 | },{
795 | min: 500,
796 | max: 999,
797 | color: '#bee587'
798 | },{
799 | min: 100,
800 | max: 499,
801 | color: '#a7dbb7'
802 | },{
803 | min: 10,
804 | max: 99,
805 | color: '#92d3e3'
806 | },{
807 | min: 1,
808 | max: 9,
809 | color: '#87cefa'
810 | },{
811 | value: 0,
812 | color: '#acdcfa'
813 | }
814 | ],
815 | orient: 'vertical',
816 | itemWidth: 25,
817 | itemHeight: 15,
818 | showLabel: true,
819 | seriesIndex: [0],
820 | textStyle: {
821 | color: '#7b93a7'
822 | },
823 | bottom: '10%',
824 | left: '5%',
825 | },
826 | grid: {
827 | right: '5%',
828 | top: '20%',
829 | bottom: '10%',
830 | width: '20%'
831 | },
832 | xAxis: {
833 | min: 0,
834 | max: 2000,
835 | show: false
836 | },
837 | yAxis: [{
838 | inverse: true,
839 | offset: '2',
840 | type: 'category',
841 | data: '',
842 | nameTextStyle: {
843 | color: '#fff'
844 | },
845 | axisTick: {
846 | show: false,
847 | },
848 | axisLabel: {
849 | textStyle: {
850 | fontSize: 14,
851 | color: '#fff',
852 | },
853 | interval: 0
854 | },
855 | axisLine: {
856 | show: false,
857 | lineStyle: {
858 | color: '#333'
859 | },
860 | splitLine: {
861 | show: false
862 | }
863 | },
864 | }],
865 | geo: {
866 | map: 'china',
867 | right: '35%',
868 | left: '5%',
869 | label: {
870 | emphasis: {
871 | show: false
872 | }
873 | },
874 | itemStyle: {
875 | normal: {
876 | areaColor: "#acdcfa",
877 | borderColor: '#2b91b7',
878 | borderWidth: 1
879 | },
880 | emphasis: {
881 | areaColor: '#17f0cc'
882 | }
883 | }
884 | },
885 | series: [{
886 | name: 'mapSer',
887 | type: 'map',
888 | map: 'china',
889 | roam: false,
890 | geoIndex: 0,
891 | label: {
892 | show: false,
893 | },
894 | },{
895 | name: '',
896 | type: 'bar',
897 | zlevel: 2,
898 | barWidth: '25%',
899 | itemStyle: {
900 | barBorderRadius: 10,
901 | },
902 | label: {
903 | normal: {
904 | show: true,
905 | fontSize: 14,
906 | color: 'rgba(255, 255, 255, 0.6)',
907 | position: 'right',
908 | formatter: '{c}'
909 | }
910 | },
911 | }],
912 | },
913 | animationDurationUpdate: 3000,
914 | animationEasingUpdate: 'quinticInOut',
915 | options: []
916 | };
917 |
918 | for (var i=0; ia?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.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},n.extend=n.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||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(n.isPlainObject(d)||(e=n.isArray(d)))?(e?(e=!1,f=c&&n.isArray(c)?c:[]):f=c&&n.isPlainObject(c)?c:{},g[b]=n.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){return!n.isArray(a)&&a-parseFloat(a)+1>=0},isPlainObject:function(a){return"object"!==n.type(a)||a.nodeType||n.isWindow(a)?!1:a.constructor&&!j.call(a.constructor.prototype,"isPrototypeOf")?!1:!0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;a=n.trim(a),a&&(1===a.indexOf("use strict")?(b=l.createElement("script"),b.text=a,l.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},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=s(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(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:g.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;c>d;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=s(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&&(c=a[b],b=a,a=c),n.isFunction(a)?(e=d.call(arguments,2),f=function(){return a.apply(b||this,e.concat(d.call(arguments)))},f.guid=a.guid=a.guid||n.guid++,f):void 0},now:Date.now,support:k}),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b="length"in a&&a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ha(),z=ha(),A=ha(),B=function(a,b){return a===b&&(l=!0),0},C=1<<31,D={}.hasOwnProperty,E=[],F=E.pop,G=E.push,H=E.push,I=E.slice,J=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},K="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",N=M.replace("w","w#"),O="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+N+"))|)"+L+"*\\]",P=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+O+")*)|.*)\\)|)",Q=new RegExp(L+"+","g"),R=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),S=new RegExp("^"+L+"*,"+L+"*"),T=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),U=new RegExp("="+L+"*([^\\]'\"]*?)"+L+"*\\]","g"),V=new RegExp(P),W=new RegExp("^"+N+"$"),X={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M.replace("w","w*")+")"),ATTR:new RegExp("^"+O),PSEUDO:new RegExp("^"+P),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+K+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,aa=/[+~]/,ba=/'|\\/g,ca=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","ig"),da=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)},ea=function(){m()};try{H.apply(E=I.call(v.childNodes),v.childNodes),E[v.childNodes.length].nodeType}catch(fa){H={apply:E.length?function(a,b){G.apply(a,I.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function ga(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||[],k=b.nodeType,"string"!=typeof a||!a||1!==k&&9!==k&&11!==k)return d;if(!e&&p){if(11!==k&&(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 H.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName)return H.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=1!==k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(ba,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+ra(o[l]);w=aa.test(a)&&pa(b.parentNode)||b,x=o.join(",")}if(x)try{return H.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function ha(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ia(a){return a[u]=!0,a}function ja(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ka(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function la(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||C)-(~a.sourceIndex||C);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function na(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function oa(a){return ia(function(b){return b=+b,ia(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 pa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=ga.support={},f=ga.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=ga.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=g.documentElement,e=g.defaultView,e&&e!==e.top&&(e.addEventListener?e.addEventListener("unload",ea,!1):e.attachEvent&&e.attachEvent("onunload",ea)),p=!f(g),c.attributes=ja(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ja(function(a){return a.appendChild(g.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(g.getElementsByClassName),c.getById=ja(function(a){return o.appendChild(a).id=u,!g.getElementsByName||!g.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ca,da);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ca,da);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(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 p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(g.querySelectorAll))&&(ja(function(a){o.appendChild(a).innerHTML="",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+L+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+L+"*(?:value|"+K+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ja(function(a){var b=g.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+L+"*[*^$|!~]?="),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))&&ja(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",P)}),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===g||a.ownerDocument===v&&t(v,a)?-1:b===g||b.ownerDocument===v&&t(v,b)?1:k?J(k,a)-J(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,h=[a],i=[b];if(!e||!f)return a===g?-1:b===g?1:e?-1:f?1:k?J(k,a)-J(k,b):0;if(e===f)return la(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?la(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},g):n},ga.matches=function(a,b){return ga(a,null,null,b)},ga.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 ga(b,n,null,[a]).length>0},ga.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},ga.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&D.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},ga.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},ga.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=ga.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=ga.selectors={cacheLength:50,createPseudo:ia,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(ca,da),a[3]=(a[3]||a[4]||a[5]||"").replace(ca,da),"~="===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]||ga.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]&&ga.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(ca,da).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("(^|"+L+")"+a+"("+L+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=ga.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.replace(Q," ")+" ").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()]||ga.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ia(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=J(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ia(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?ia(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),b[0]=null,!c.pop()}}),has:ia(function(a){return function(b){return ga(a,b).length>0}}),contains:ia(function(a){return a=a.replace(ca,da),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ia(function(a){return W.test(a||"")||ga.error("unsupported lang: "+a),a=a.replace(ca,da).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:oa(function(){return[0]}),last:oa(function(a,b){return[b-1]}),eq:oa(function(a,b,c){return[0>c?c+b:c]}),even:oa(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:oa(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:oa(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:oa(function(a,b,c){for(var d=0>c?c+b:c;++db;b++)d+=a[b].value;return d}function sa(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 ta(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 ua(a,b,c){for(var d=0,e=b.length;e>d;d++)ga(a,b[d],c);return c}function va(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 wa(a,b,c,d,e,f){return d&&!d[u]&&(d=wa(d)),e&&!e[u]&&(e=wa(e,f)),ia(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ua(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:va(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=va(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?J(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=va(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function xa(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=sa(function(a){return a===b},h,!0),l=sa(function(a){return J(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];f>i;i++)if(c=d.relative[a[i].type])m=[sa(ta(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 wa(i>1&&ta(m),i>1&&ra(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&xa(a.slice(i,e)),f>e&&xa(a=a.slice(e)),f>e&&ra(a))}m.push(c)}return ta(m)}function ya(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]=F.call(i));s=va(s)}H.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&ga.uniqueSort(i)}return k&&(w=v,j=t),r};return c?ia(f):f}return h=ga.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=xa(b[c]),f[u]?d.push(f):e.push(f);f=A(a,ya(e,d)),f.selector=a}return f},i=ga.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(ca,da),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(ca,da),aa.test(j[0].type)&&pa(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&ra(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,aa.test(a)&&pa(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ja(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ja(function(a){return a.innerHTML="","#"===a.firstChild.getAttribute("href")})||ka("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ja(function(a){return a.innerHTML="",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ka("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ja(function(a){return null==a.getAttribute("disabled")})||ka(K,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),ga}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=n.expr.match.needsContext,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^.[^:#\[\.,]*$/;function x(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(w.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return g.call(b,a)>=0!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=this.length,d=[],e=this;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;c>b;b++)if(n.contains(e[b],this))return!0}));for(b=0;c>b;b++)n.find(a,e[b],d);return d=this.pushStack(c>1?n.unique(d):d),d.selector=this.selector?this.selector+" "+a:a,d},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,"string"==typeof a&&u.test(a)?n(a):a||[],!1).length}});var y,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=n.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||y).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:l,!0)),v.test(c[1])&&n.isPlainObject(b))for(c in b)n.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}return d=l.getElementById(c[2]),d&&d.parentNode&&(this.length=1,this[0]=d),this.context=l,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};A.prototype=n.fn,y=n(l);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};n.extend({dir:function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&n(a).is(c))break;d.push(a)}return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),n.fn.extend({has:function(a){var b=n(a,this),c=b.length;return this.filter(function(){for(var a=0;c>a;a++)if(n.contains(this,b[a]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=u.test(a)||"string"!=typeof a?n(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&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.unique(f):f)},index:function(a){return a?"string"==typeof a?g.call(n(a),this[0]):g.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.unique(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){while((a=a[b])&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return n.dir(a,"parentNode")},parentsUntil:function(a,b,c){return n.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return n.dir(a,"nextSibling")},prevAll:function(a){return n.dir(a,"previousSibling")},nextUntil:function(a,b,c){return n.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return n.dir(a,"previousSibling",c)},siblings:function(a){return n.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return n.sibling(a.firstChild)},contents:function(a){return a.contentDocument||n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(C[a]||n.unique(e),B.test(a)&&e.reverse()),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return n.each(a.match(E)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):n.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(b=a.memory&&l,c=!0,g=e||0,e=0,f=h.length,d=!0;h&&f>g;g++)if(h[g].apply(l[0],l[1])===!1&&a.stopOnFalse){b=!1;break}d=!1,h&&(i?i.length&&j(i.shift()):b?h=[]:k.disable())},k={add:function(){if(h){var c=h.length;!function g(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&g(c)})}(arguments),d?f=h.length:b&&(e=c,j(b))}return this},remove:function(){return h&&n.each(arguments,function(a,b){var c;while((c=n.inArray(b,h,c))>-1)h.splice(c,1),d&&(f>=c&&f--,g>=c&&g--)}),this},has:function(a){return a?n.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],f=0,this},disable:function(){return h=i=b=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,b||k.disable(),this},locked:function(){return!i},fireWith:function(a,b){return!h||c&&!i||(b=b||[],b=[a,b.slice?b.slice():b],d?i.push(b):j(b)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!c}};return k},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.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?n.extend(a,d):d}},e={};return d.pipe=d.then,n.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&&n.isFunction(a.promise)?e:0,g=1===f?a:n.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]&&n.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;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){(a===!0?--n.readyWait:n.isReady)||(n.isReady=!0,a!==!0&&--n.readyWait>0||(H.resolveWith(l,[n]),n.fn.triggerHandler&&(n(l).triggerHandler("ready"),n(l).off("ready"))))}});function I(){l.removeEventListener("DOMContentLoaded",I,!1),a.removeEventListener("load",I,!1),n.ready()}n.ready.promise=function(b){return H||(H=n.Deferred(),"complete"===l.readyState?setTimeout(n.ready):(l.addEventListener("DOMContentLoaded",I,!1),a.addEventListener("load",I,!1))),H.promise(b)},n.ready.promise();var J=n.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)n.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(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};n.acceptData=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function K(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=n.expando+K.uid++}K.uid=1,K.accepts=n.acceptData,K.prototype={key:function(a){if(!K.accepts(a))return 0;var b={},c=a[this.expando];if(!c){c=K.uid++;try{b[this.expando]={value:c},Object.defineProperties(a,b)}catch(d){b[this.expando]=c,n.extend(a,b)}}return this.cache[c]||(this.cache[c]={}),c},set:function(a,b,c){var d,e=this.key(a),f=this.cache[e];if("string"==typeof b)f[b]=c;else if(n.isEmptyObject(f))n.extend(this.cache[e],b);else for(d in b)f[d]=b[d];return f},get:function(a,b){var c=this.cache[this.key(a)];return void 0===b?c:c[b]},access:function(a,b,c){var d;return void 0===b||b&&"string"==typeof b&&void 0===c?(d=this.get(a,b),void 0!==d?d:this.get(a,n.camelCase(b))):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d,e,f=this.key(a),g=this.cache[f];if(void 0===b)this.cache[f]={};else{n.isArray(b)?d=b.concat(b.map(n.camelCase)):(e=n.camelCase(b),b in g?d=[b,e]:(d=e,d=d in g?[d]:d.match(E)||[])),c=d.length;while(c--)delete g[d[c]]}},hasData:function(a){return!n.isEmptyObject(this.cache[a[this.expando]]||{})},discard:function(a){a[this.expando]&&delete this.cache[a[this.expando]]}};var L=new K,M=new K,N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(O,"-$1").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}M.set(a,b,c)}else c=void 0;return c}n.extend({hasData:function(a){return M.hasData(a)||L.hasData(a)},data:function(a,b,c){
3 | return M.access(a,b,c)},removeData:function(a,b){M.remove(a,b)},_data:function(a,b,c){return L.access(a,b,c)},_removeData:function(a,b){L.remove(a,b)}}),n.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.get(f),1===f.nodeType&&!L.get(f,"hasDataAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d])));L.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){M.set(this,a)}):J(this,function(b){var c,d=n.camelCase(a);if(f&&void 0===b){if(c=M.get(f,a),void 0!==c)return c;if(c=M.get(f,d),void 0!==c)return c;if(c=P(f,d,void 0),void 0!==c)return c}else this.each(function(){var c=M.get(this,d);M.set(this,d,b),-1!==a.indexOf("-")&&void 0!==c&&M.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){M.remove(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=L.get(a,b),c&&(!d||n.isArray(c)?d=L.access(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.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 L.get(a,c)||L.access(a,c,{empty:n.Callbacks("once memory").add(function(){L.remove(a,[b+"queue",c])})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.lengthx",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var U="undefined";k.focusinBubbles="onfocusin"in a;var V=/^key/,W=/^(?:mouse|pointer|contextmenu)|click/,X=/^(?:focusinfocus|focusoutblur)$/,Y=/^([^.]*)(?:\.(.+)|)$/;function Z(){return!0}function $(){return!1}function _(){try{return l.activeElement}catch(a){}}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.get(a);if(r){c.handler&&(f=c,c=f.handler,e=f.selector),c.guid||(c.guid=n.guid++),(i=r.events)||(i=r.events={}),(g=r.handle)||(g=r.handle=function(b){return typeof n!==U&&n.event.triggered!==b.type?n.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(E)||[""],j=b.length;while(j--)h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o&&(l=n.event.special[o]||{},o=(e?l.delegateType:l.bindType)||o,l=n.event.special[o]||{},k=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},f),(m=i[o])||(m=i[o]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,p,g)!==!1||a.addEventListener&&a.addEventListener(o,g,!1)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),n.event.global[o]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.hasData(a)&&L.get(a);if(r&&(i=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=i[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&q!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete i[o])}else for(o in i)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(i)&&(delete r.handle,L.remove(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,m,o,p=[d||l],q=j.call(b,"type")?b.type:b,r=j.call(b,"namespace")?b.namespace.split("."):[];if(g=h=d=d||l,3!==d.nodeType&&8!==d.nodeType&&!X.test(q+n.event.triggered)&&(q.indexOf(".")>=0&&(r=q.split("."),q=r.shift(),r.sort()),k=q.indexOf(":")<0&&"on"+q,b=b[n.expando]?b:new n.Event(q,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=r.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+r.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:n.makeArray(c,[b]),o=n.event.special[q]||{},e||!o.trigger||o.trigger.apply(d,c)!==!1)){if(!e&&!o.noBubble&&!n.isWindow(d)){for(i=o.delegateType||q,X.test(i+q)||(g=g.parentNode);g;g=g.parentNode)p.push(g),h=g;h===(d.ownerDocument||l)&&p.push(h.defaultView||h.parentWindow||a)}f=0;while((g=p[f++])&&!b.isPropagationStopped())b.type=f>1?i:o.bindType||q,m=(L.get(g,"events")||{})[b.type]&&L.get(g,"handle"),m&&m.apply(g,c),m=k&&g[k],m&&m.apply&&n.acceptData(g)&&(b.result=m.apply(g,c),b.result===!1&&b.preventDefault());return b.type=q,e||b.isDefaultPrevented()||o._default&&o._default.apply(p.pop(),c)!==!1||!n.acceptData(d)||k&&n.isFunction(d[q])&&!n.isWindow(d)&&(h=d[k],h&&(d[k]=null),n.event.triggered=q,d[q](),n.event.triggered=void 0,h&&(d[k]=h)),b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(L.get(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,c=0;while((g=f.handlers[c++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(g.namespace))&&(a.handleObj=g,a.data=g.data,e=((n.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==e&&(a.result=e)===!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(i.disabled!==!0||"click"!==a.type){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?n(e,this).index(i)>=0:n.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h]*)\/>/gi,ba=/<([\w:]+)/,ca=/<|?\w+;/,da=/<(?:script|style|link)/i,ea=/checked\s*(?:[^=]|=\s*.checked.)/i,fa=/^$|\/(?:java|ecma)script/i,ga=/^true\/(.*)/,ha=/^\s*\s*$/g,ia={option:[1,""],thead:[1,"