Compare commits
60 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b20abb824d | ||
|
|
fa8c209ea3 | ||
|
|
5181010d22 | ||
|
|
5c2a82b7ee | ||
|
|
f69de50ed1 | ||
|
|
56e142ac05 | ||
|
|
32c2d60f7e | ||
|
|
cb792cbb26 | ||
|
|
c36b10a416 | ||
|
|
f1d87cfbb2 | ||
|
|
cde6530832 | ||
|
|
a5b1fec6b1 | ||
|
|
7cf76d91a0 | ||
|
|
28dc314397 | ||
|
|
66b5e5dd3f | ||
|
|
678af5f744 | ||
|
|
85fcc28662 | ||
|
|
f6035de548 | ||
|
|
0ea82b9f98 | ||
|
|
3260e5127a | ||
|
|
f260d83923 | ||
|
|
cece720f68 | ||
|
|
03c0449a0b | ||
|
|
4ded7987e2 | ||
|
|
49bbf826b9 | ||
|
|
42fc52a067 | ||
|
|
72e97d57b2 | ||
|
|
dbd99e1f57 | ||
|
|
8e68824ac0 | ||
|
|
5fe79c4bad | ||
|
|
0fe89c34b3 | ||
|
|
4a451ad5ae | ||
|
|
27984ceef2 | ||
|
|
8987a2d177 | ||
|
|
915b6a918c | ||
|
|
40bf82552b | ||
|
|
211d17b609 | ||
|
|
6290bbdd4e | ||
|
|
aa9a3238a2 | ||
|
|
a303a60c4e | ||
|
|
7e67fa3076 | ||
|
|
7ef966536d | ||
|
|
4c3827158f | ||
|
|
6c577daf5d | ||
|
|
9e54c689a1 | ||
|
|
ee7a53ff89 | ||
|
|
c3c3c6b996 | ||
|
|
bfd3d2937d | ||
|
|
58099284f2 | ||
|
|
fc3a67f811 | ||
|
|
f796c2c1e2 | ||
|
|
43a5fb4bd3 | ||
|
|
b2da1c0f76 | ||
|
|
31664cbc4d | ||
|
|
ab17736fbf | ||
|
|
42bbbc5f75 | ||
|
|
86e968a346 | ||
|
|
d22ee4b34a | ||
|
|
30d4e1eaa9 | ||
|
|
15618dd988 |
10
.env.docker
@@ -2,16 +2,18 @@ APP_NAME=Dootask
|
||||
APP_ENV=local
|
||||
APP_KEY=
|
||||
APP_DEBUG=true
|
||||
APP_SCHEME=auto
|
||||
APP_URL=http://localhost
|
||||
|
||||
APP_ID=
|
||||
APP_IPPR=
|
||||
APP_PORT=2222
|
||||
APP_PORT_SSL=2223
|
||||
|
||||
LOG_CHANNEL=stack
|
||||
LOG_LEVEL=debug
|
||||
|
||||
DB_CONNECTION=mysql
|
||||
DB_HOST=10.22.22.5
|
||||
DB_HOST="${APP_IPPR}.5"
|
||||
DB_PORT=3306
|
||||
DB_DATABASE=dootask
|
||||
DB_USERNAME=dootask
|
||||
@@ -28,7 +30,7 @@ SESSION_LIFETIME=120
|
||||
|
||||
MEMCACHED_HOST=127.0.0.1
|
||||
|
||||
REDIS_HOST=10.22.22.4
|
||||
REDIS_HOST="${APP_IPPR}.4"
|
||||
REDIS_PASSWORD=null
|
||||
REDIS_PORT=6379
|
||||
|
||||
@@ -56,5 +58,3 @@ MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
|
||||
|
||||
LARAVELS_LISTEN_IP=0.0.0.0
|
||||
LARAVELS_LISTEN_PORT=20000
|
||||
|
||||
DOCKER_ID=
|
||||
|
||||
@@ -2,10 +2,10 @@ APP_NAME=Laravel
|
||||
APP_ENV=local
|
||||
APP_KEY=
|
||||
APP_DEBUG=true
|
||||
APP_SCHEME=auto
|
||||
APP_URL=http://localhost
|
||||
|
||||
APP_PORT=2222
|
||||
APP_PORT_SSL=2223
|
||||
|
||||
LOG_CHANNEL=stack
|
||||
LOG_LEVEL=debug
|
||||
|
||||
661
LICENSE
Normal file
@@ -0,0 +1,661 @@
|
||||
GNU AFFERO GENERAL PUBLIC LICENSE
|
||||
Version 3, 19 November 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU Affero General Public License is a free, copyleft license for
|
||||
software and other kinds of works, specifically designed to ensure
|
||||
cooperation with the community in the case of network server software.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
our General Public Licenses are intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
Developers that use our General Public Licenses protect your rights
|
||||
with two steps: (1) assert copyright on the software, and (2) offer
|
||||
you this License which gives you legal permission to copy, distribute
|
||||
and/or modify the software.
|
||||
|
||||
A secondary benefit of defending all users' freedom is that
|
||||
improvements made in alternate versions of the program, if they
|
||||
receive widespread use, become available for other developers to
|
||||
incorporate. Many developers of free software are heartened and
|
||||
encouraged by the resulting cooperation. However, in the case of
|
||||
software used on network servers, this result may fail to come about.
|
||||
The GNU General Public License permits making a modified version and
|
||||
letting the public access it on a server without ever releasing its
|
||||
source code to the public.
|
||||
|
||||
The GNU Affero General Public License is designed specifically to
|
||||
ensure that, in such cases, the modified source code becomes available
|
||||
to the community. It requires the operator of a network server to
|
||||
provide the source code of the modified version running there to the
|
||||
users of that server. Therefore, public use of a modified version, on
|
||||
a publicly accessible server, gives the public access to the source
|
||||
code of the modified version.
|
||||
|
||||
An older license, called the Affero General Public License and
|
||||
published by Affero, was designed to accomplish similar goals. This is
|
||||
a different license, not a version of the Affero GPL, but Affero has
|
||||
released a new version of the Affero GPL which permits relicensing under
|
||||
this license.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU Affero General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Remote Network Interaction; Use with the GNU General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, if you modify the
|
||||
Program, your modified version must prominently offer all users
|
||||
interacting with it remotely through a computer network (if your version
|
||||
supports such interaction) an opportunity to receive the Corresponding
|
||||
Source of your version by providing access to the Corresponding Source
|
||||
from a network server at no charge, through some standard or customary
|
||||
means of facilitating copying of software. This Corresponding Source
|
||||
shall include the Corresponding Source for any work covered by version 3
|
||||
of the GNU General Public License that is incorporated pursuant to the
|
||||
following paragraph.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the work with which it is combined will remain governed by version
|
||||
3 of the GNU General Public License.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU Affero General Public License from time to time. Such new versions
|
||||
will be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU Affero General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU Affero General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU Affero General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If your software can interact with users remotely through a computer
|
||||
network, you should also make sure that it provides a way for users to
|
||||
get its source. For example, if your program is a web application, its
|
||||
interface could display a "Source" link that leads users to an archive
|
||||
of the code. There are many ways you could offer source, and different
|
||||
solutions will be better for different programs; see section 13 for the
|
||||
specific requirements.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU AGPL, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
42
README.md
@@ -15,10 +15,10 @@ English | **[中文文档](./README_CN.md)**
|
||||
```bash
|
||||
# 1、Clone the repository
|
||||
|
||||
# using ssh
|
||||
git clone git@github.com:kuaifan/dootask.git
|
||||
# or you can use https
|
||||
# Clone projects on github
|
||||
git clone https://github.com/kuaifan/dootask.git
|
||||
# or you can use gitee
|
||||
git clone https://gitee.com/aipaw/dootask.git
|
||||
|
||||
# 2、enter directory
|
||||
cd dootask
|
||||
@@ -26,13 +26,12 @@ cd dootask
|
||||
# 3、Build project
|
||||
./cmd install
|
||||
```
|
||||
Installed, project url: **`http://IP:PORT`**(`PORT`Default is`2222`)。
|
||||
|
||||
### Default Account
|
||||
### Reset password
|
||||
|
||||
```text
|
||||
account: admin@dootask.com
|
||||
password: 123456
|
||||
```bash
|
||||
# Reset default account password
|
||||
./cmd repassword
|
||||
```
|
||||
|
||||
### Change port
|
||||
@@ -57,12 +56,24 @@ password: 123456
|
||||
# You can do this using the following command
|
||||
./cmd artisan "your command" // To run a artisan command
|
||||
./cmd php "your command" // To run a php command
|
||||
./cmd nginx "your command" // To run a nginx command
|
||||
./cmd redis "your command" // To run a redis command
|
||||
./cmd composer "your command" // To run a composer command
|
||||
./cmd supervisorctl "your command" // To run a supervisorctl command
|
||||
./cmd test "your command" // To run a phpunit command
|
||||
./cmd npm "your command" // To run a npm command
|
||||
./cmd yarn "your command" // To run a yarn command
|
||||
./cmd mysql "your command" // To run a mysql command (use `./cmd mysql bak` Backup database)
|
||||
./cmd mysql "your command" // To run a mysql command (backup: Backup database, recovery: Restore database)
|
||||
```
|
||||
|
||||
### NGINX PROXY SSL
|
||||
|
||||
```bash
|
||||
# 1、Nginx config add
|
||||
proxy_set_header X-Forwarded-Host $http_host;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
|
||||
# 2、Enter directory and run command
|
||||
./cmd https
|
||||
```
|
||||
|
||||
## Upgrade
|
||||
@@ -70,8 +81,15 @@ password: 123456
|
||||
**Note: Please back up your data before upgrading!**
|
||||
|
||||
```bash
|
||||
# Enter directory and run command
|
||||
# Method 1: enter directory and run command
|
||||
./cmd update
|
||||
|
||||
# Or method 2: use this method if method 1 fails
|
||||
git pull
|
||||
./cmd mysql backup
|
||||
./cmd uninstall
|
||||
./cmd install
|
||||
./cmd mysql recovery
|
||||
```
|
||||
|
||||
## Uninstall
|
||||
|
||||
44
README_CN.md
@@ -15,10 +15,10 @@
|
||||
```bash
|
||||
# 1、克隆项目到您的本地或服务器
|
||||
|
||||
# 使用ssh
|
||||
git clone git@github.com:kuaifan/dootask.git
|
||||
# 或者你也可以使用https
|
||||
# 通过github克隆项目
|
||||
git clone https://github.com/kuaifan/dootask.git
|
||||
# 或者你也可以使用gitee
|
||||
git clone https://gitee.com/aipaw/dootask.git
|
||||
|
||||
# 2、进入目录
|
||||
cd dootask
|
||||
@@ -26,13 +26,12 @@ cd dootask
|
||||
# 3、一键构建项目
|
||||
./cmd install
|
||||
```
|
||||
安装完毕,项目地址为:**`http://IP:PORT`**(`PORT`默认为`2222`)。
|
||||
|
||||
### 默认账号
|
||||
### 重置密码
|
||||
|
||||
```text
|
||||
account: admin@dootask.com
|
||||
password: 123456
|
||||
```bash
|
||||
# 重置默认管理员密码
|
||||
./cmd repassword
|
||||
```
|
||||
|
||||
### 更换端口
|
||||
@@ -57,12 +56,24 @@ password: 123456
|
||||
# 你可以使用以下命令来执行
|
||||
./cmd artisan "your command" // 运行 artisan 命令
|
||||
./cmd php "your command" // 运行 php 命令
|
||||
./cmd nginx "your command" // 运行 nginx 命令
|
||||
./cmd redis "your command" // 运行 redis 命令
|
||||
./cmd composer "your command" // 运行 composer 命令
|
||||
./cmd supervisorctl "your command" // 运行 supervisorctl 命令
|
||||
./cmd test "your command" // 运行 phpunit 命令
|
||||
./cmd npm "your command" // 运行 npm 命令
|
||||
./cmd yarn "your command" // 运行 yarn 命令
|
||||
./cmd mysql "your command" // 运行 mysql 命令 (可以使用 `./cmd mysql bak` 命令来备份数据库)
|
||||
./cmd mysql "your command" // 运行 mysql 命令 (backup: 备份数据库,recovery: 还原数据库)
|
||||
```
|
||||
|
||||
### NGINX 代理 SSL
|
||||
|
||||
```bash
|
||||
# 1、Nginx 代理配置添加
|
||||
proxy_set_header X-Forwarded-Host $http_host;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
|
||||
# 2、进入项目所在目录,运行以下命令
|
||||
./cmd https
|
||||
```
|
||||
|
||||
## 升级更新
|
||||
@@ -70,13 +81,20 @@ password: 123456
|
||||
**注意:在升级之前请备份好你的数据!**
|
||||
|
||||
```bash
|
||||
# 进入项目所在目录,运行一下命令即可
|
||||
# 方法1:进入项目所在目录,运行以下命令
|
||||
./cmd update
|
||||
|
||||
# (或者)方法2:如果方法1失败请使用此方法
|
||||
git pull
|
||||
./cmd mysql backup
|
||||
./cmd uninstall
|
||||
./cmd install
|
||||
./cmd mysql recovery
|
||||
```
|
||||
|
||||
## 卸载项目
|
||||
|
||||
```bash
|
||||
# 进入项目所在目录,运行一下命令即可
|
||||
# 进入项目所在目录,运行以下命令
|
||||
./cmd uninstall
|
||||
```
|
||||
|
||||
@@ -5,6 +5,7 @@ namespace App\Exceptions;
|
||||
use App\Module\Base;
|
||||
use Illuminate\Database\Eloquent\ModelNotFoundException;
|
||||
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Throwable;
|
||||
|
||||
class Handler extends ExceptionHandler
|
||||
@@ -57,4 +58,18 @@ class Handler extends ExceptionHandler
|
||||
}
|
||||
return parent::render($request, $e);
|
||||
}
|
||||
|
||||
/**
|
||||
* 重写report优雅记录
|
||||
* @param Throwable $e
|
||||
* @throws Throwable
|
||||
*/
|
||||
public function report(Throwable $e)
|
||||
{
|
||||
if ($e instanceof ApiException) {
|
||||
Log::error($e->getMessage(), ['exception' => ' at ' . $e->getFile() .':' . $e->getLine()]);
|
||||
} else {
|
||||
parent::report($e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -143,6 +143,14 @@ class FileController extends AbstractController
|
||||
])) {
|
||||
return Base::retError('类型错误');
|
||||
}
|
||||
$ext = '';
|
||||
if (in_array($type, [
|
||||
'word',
|
||||
'excel',
|
||||
'ppt',
|
||||
])) {
|
||||
$ext = str_replace(['word', 'excel', 'ppt'], ['docx', 'xlsx', 'pptx'], $type);
|
||||
}
|
||||
//
|
||||
$userid = $user->userid;
|
||||
if ($pid > 0) {
|
||||
@@ -161,6 +169,7 @@ class FileController extends AbstractController
|
||||
'pid' => $pid,
|
||||
'name' => $name,
|
||||
'type' => $type,
|
||||
'ext' => $ext,
|
||||
'userid' => $userid,
|
||||
'created_id' => $user->userid,
|
||||
]);
|
||||
@@ -201,6 +210,7 @@ class FileController extends AbstractController
|
||||
'pid' => $row->pid,
|
||||
'name' => $name,
|
||||
'type' => $row->type,
|
||||
'ext' => $row->ext,
|
||||
'userid' => $userid,
|
||||
'created_id' => $user->userid,
|
||||
]);
|
||||
@@ -353,7 +363,7 @@ class FileController extends AbstractController
|
||||
//
|
||||
if ($status === 2) {
|
||||
$parse = parse_url($url);
|
||||
$from = 'http://10.22.22.6' . $parse['path'] . '?' . $parse['query'];
|
||||
$from = 'http://' . env('APP_IPPR') . '.3' . $parse['path'] . '?' . $parse['query'];
|
||||
$path = 'uploads/office/' . date("Ym") . '/' . $file->id . '/' . $user->userid . '-' . $key;
|
||||
$save = public_path($path);
|
||||
Base::makeDir(dirname($save));
|
||||
@@ -407,7 +417,8 @@ class FileController extends AbstractController
|
||||
$path = 'uploads/office/' . date("Ym") . '/u' . $user->userid . '/';
|
||||
$data = Base::upload([
|
||||
"file" => Request::file('files'),
|
||||
"type" => 'office',
|
||||
"type" => 'more',
|
||||
"autoThumb" => false,
|
||||
"path" => $path,
|
||||
]);
|
||||
if (Base::isError($data)) {
|
||||
@@ -415,36 +426,42 @@ class FileController extends AbstractController
|
||||
}
|
||||
$data = $data['data'];
|
||||
//
|
||||
$type = "";
|
||||
switch ($data['ext']) {
|
||||
case 'doc':
|
||||
case 'docx':
|
||||
$type = "word";
|
||||
break;
|
||||
case 'xls':
|
||||
case 'xlsx':
|
||||
$type = "excel";
|
||||
break;
|
||||
case 'ppt':
|
||||
case 'pptx':
|
||||
$type = "ppt";
|
||||
break;
|
||||
}
|
||||
$type = match ($data['ext']) {
|
||||
'doc', 'docx' => "word",
|
||||
'xls', 'xlsx' => "excel",
|
||||
'ppt', 'pptx' => "ppt",
|
||||
'wps' => "wps",
|
||||
'jpg', 'jpeg', 'png', 'gif', 'bmp', 'ico', 'raw' => "picture",
|
||||
'rar', 'zip', 'jar', '7-zip', 'tar', 'gzip', '7z' => "archive",
|
||||
'tif', 'tiff' => "tif",
|
||||
'dwg', 'dxf' => "cad",
|
||||
'ofd' => "ofd",
|
||||
'pdf' => "pdf",
|
||||
'txt' => "txt",
|
||||
'html', 'htm', 'asp', 'jsp', 'xml', 'json', 'properties', 'md', 'gitignore', 'log', 'java', 'py', 'c', 'cpp', 'sql', 'sh', 'bat', 'm', 'bas', 'prg', 'cmd',
|
||||
'php', 'go', 'python', 'js', 'ftl', 'css', 'lua', 'rb', 'yaml', 'yml', 'h', 'cs', 'aspx' => "code",
|
||||
'mp3', 'wav', 'mp4', 'flv',
|
||||
'avi', 'mov', 'wmv', 'mkv', '3gp', 'rm' => "media",
|
||||
default => "",
|
||||
};
|
||||
$file = File::createInstance([
|
||||
'pid' => $pid,
|
||||
'name' => Base::rightDelete($data['name'], '.' . $data['ext']),
|
||||
'type' => $type,
|
||||
'ext' => $data['ext'],
|
||||
'userid' => $userid,
|
||||
'created_id' => $user->userid,
|
||||
]);
|
||||
// 开始创建
|
||||
return AbstractModel::transaction(function () use ($user, $data, $file) {
|
||||
return AbstractModel::transaction(function () use ($type, $user, $data, $file) {
|
||||
$file->save();
|
||||
//
|
||||
$content = FileContent::createInstance([
|
||||
'fid' => $file->id,
|
||||
'content' => [
|
||||
'from' => '',
|
||||
'type' => $type,
|
||||
'ext' => $data['ext'],
|
||||
'url' => $data['path']
|
||||
],
|
||||
'text' => '',
|
||||
@@ -535,34 +552,36 @@ class FileController extends AbstractController
|
||||
$message = '取消成功';
|
||||
} else {
|
||||
// 设置共享
|
||||
if (!in_array($share, [1, 2])) {
|
||||
return Base::retError('请选择共享对象');
|
||||
}
|
||||
if ($share == 1) {
|
||||
$user->isAdmin();
|
||||
switch ($share) {
|
||||
case 1:
|
||||
$user->isAdmin();
|
||||
break;
|
||||
|
||||
case 2:
|
||||
$array = [];
|
||||
if (is_array($userids)) {
|
||||
foreach ($userids as $userid) {
|
||||
if (!intval($userid)) continue;
|
||||
if (!User::whereUserid($userid)->exists()) continue;
|
||||
FileUser::updateInsert([
|
||||
'file_id' => $file->id,
|
||||
'userid' => $userid,
|
||||
]);
|
||||
$array[] = $userid;
|
||||
}
|
||||
}
|
||||
if (empty($array)) {
|
||||
return Base::retError('请选择共享成员');
|
||||
}
|
||||
$builder = FileUser::whereFileId($file->id)->whereNotIn('userid', $array);
|
||||
$uids = (clone $builder)->pluck('userid')->toArray();
|
||||
$builder->delete();
|
||||
break;
|
||||
|
||||
default:
|
||||
return Base::retError('请选择共享对象');
|
||||
}
|
||||
$file->setShare($share);
|
||||
if ($share == 2) {
|
||||
$array = [];
|
||||
if (is_array($userids)) {
|
||||
foreach ($userids as $userid) {
|
||||
if (!intval($userid)) continue;
|
||||
if (!User::whereUserid($userid)->exists()) continue;
|
||||
FileUser::updateInsert([
|
||||
'file_id' => $file->id,
|
||||
'userid' => $userid,
|
||||
]);
|
||||
$array[] = $userid;
|
||||
}
|
||||
}
|
||||
if (empty($array)) {
|
||||
$builder = FileUser::whereFileId($file->id);
|
||||
} else {
|
||||
$builder = FileUser::whereFileId($file->id)->whereNotIn('userid', $array);
|
||||
}
|
||||
$uids = (clone $builder)->pluck('userid')->toArray();
|
||||
$builder->delete();
|
||||
}
|
||||
$message = '设置成功';
|
||||
}
|
||||
//
|
||||
|
||||
@@ -69,7 +69,7 @@ class ProjectController extends AbstractController
|
||||
* - keys.name 项目名称
|
||||
*
|
||||
* @apiParam {Number} [page] 当前页,默认:1
|
||||
* @apiParam {Number} [pagesize] 每页显示数量,默认:100,最大:200
|
||||
* @apiParam {Number} [pagesize] 每页显示数量,默认:50,最大:100
|
||||
*/
|
||||
public function lists()
|
||||
{
|
||||
@@ -93,13 +93,21 @@ class ProjectController extends AbstractController
|
||||
//
|
||||
$keys = Request::input('keys');
|
||||
if (is_array($keys)) {
|
||||
$buildClone = $builder->clone();
|
||||
if ($keys['name']) {
|
||||
$builder->where("projects.name", "like", "%{$keys['name']}%");
|
||||
}
|
||||
}
|
||||
$list = $builder->orderByDesc('projects.id')->paginate(Base::getPaginate(200, 100));
|
||||
$list = $builder->orderByDesc('projects.id')->paginate(Base::getPaginate(100, 50));
|
||||
//
|
||||
return Base::retSuccess('success', $list);
|
||||
$data = $list->toArray();
|
||||
if (isset($buildClone)) {
|
||||
$data['total_all'] = $buildClone->count();
|
||||
} else {
|
||||
$data['total_all'] = $data['total'];
|
||||
}
|
||||
//
|
||||
return Base::retSuccess('success', $data);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -640,9 +648,9 @@ class ProjectController extends AbstractController
|
||||
//
|
||||
$task_id = intval(Request::input('task_id'));
|
||||
//
|
||||
$task = ProjectTask::userTask($task_id, ['taskUser', 'taskTag']);
|
||||
$task = ProjectTask::userTask($task_id, ['taskUser', 'taskTag'], true, $project);
|
||||
//
|
||||
$task->project_name = Project::whereId($task->project_id)->value('name');
|
||||
$task->project_name = $project?->name;
|
||||
$task->column_name = ProjectColumn::whereId($task->column_id)->value('name');
|
||||
//
|
||||
return Base::retSuccess('success', $task);
|
||||
|
||||
@@ -37,8 +37,7 @@ class SystemController extends AbstractController
|
||||
if (env("SYSTEM_SETTING") == 'disabled') {
|
||||
return Base::retError('当前环境禁止修改');
|
||||
}
|
||||
$user = User::auth();
|
||||
$user->isAdmin();
|
||||
User::auth('admin');
|
||||
$all = Request::input();
|
||||
foreach ($all AS $key => $value) {
|
||||
if (!in_array($key, ['reg', 'login_code'])) {
|
||||
@@ -57,7 +56,31 @@ class SystemController extends AbstractController
|
||||
}
|
||||
|
||||
/**
|
||||
* @api {post} api/system/priority 02. 获取优先级、保存优先级
|
||||
* @api {get} api/system/demo 02. 获取演示账号
|
||||
*
|
||||
* @apiVersion 1.0.0
|
||||
* @apiGroup system
|
||||
* @apiName demo
|
||||
*
|
||||
* @apiSuccess {Number} ret 返回状态码(1正确、0错误)
|
||||
* @apiSuccess {String} msg 返回信息(错误描述)
|
||||
* @apiSuccess {Object} data 返回数据
|
||||
*/
|
||||
public function demo()
|
||||
{
|
||||
$demo_account = env('DEMO_ACCOUNT');
|
||||
$demo_password = env('DEMO_PASSWORD');
|
||||
if (empty($demo_account) || empty($demo_password)) {
|
||||
return Base::retError('No demo account');
|
||||
}
|
||||
return Base::retSuccess('success', [
|
||||
'account' => $demo_account,
|
||||
'password' => $demo_password,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @api {post} api/system/priority 03. 获取优先级、保存优先级
|
||||
*
|
||||
* @apiVersion 1.0.0
|
||||
* @apiGroup system
|
||||
@@ -73,8 +96,7 @@ class SystemController extends AbstractController
|
||||
{
|
||||
$type = trim(Request::input('type'));
|
||||
if ($type == 'save') {
|
||||
$user = User::auth();
|
||||
$user->isAdmin();
|
||||
User::auth('admin');
|
||||
$list = Base::getPostValue('list');
|
||||
$array = [];
|
||||
if (empty($list) || !is_array($list)) {
|
||||
@@ -103,7 +125,7 @@ class SystemController extends AbstractController
|
||||
}
|
||||
|
||||
/**
|
||||
* @api {get} api/system/get/info 03. 获取终端详细信息
|
||||
* @api {get} api/system/get/info 04. 获取终端详细信息
|
||||
*
|
||||
* @apiVersion 1.0.0
|
||||
* @apiGroup system
|
||||
@@ -132,7 +154,7 @@ class SystemController extends AbstractController
|
||||
}
|
||||
|
||||
/**
|
||||
* @api {get} api/system/get/ip 04. 获取IP地址
|
||||
* @api {get} api/system/get/ip 05. 获取IP地址
|
||||
*
|
||||
* @apiVersion 1.0.0
|
||||
* @apiGroup system
|
||||
@@ -147,7 +169,7 @@ class SystemController extends AbstractController
|
||||
}
|
||||
|
||||
/**
|
||||
* @api {get} api/system/get/cnip 05. 是否中国IP地址
|
||||
* @api {get} api/system/get/cnip 06. 是否中国IP地址
|
||||
*
|
||||
* @apiVersion 1.0.0
|
||||
* @apiGroup system
|
||||
@@ -164,7 +186,7 @@ class SystemController extends AbstractController
|
||||
}
|
||||
|
||||
/**
|
||||
* @api {get} api/system/get/ipgcj02 06. 获取IP地址经纬度
|
||||
* @api {get} api/system/get/ipgcj02 07. 获取IP地址经纬度
|
||||
*
|
||||
* @apiVersion 1.0.0
|
||||
* @apiGroup system
|
||||
@@ -181,7 +203,7 @@ class SystemController extends AbstractController
|
||||
}
|
||||
|
||||
/**
|
||||
* @api {get} api/system/get/ipinfo 07. 获取IP地址详细信息
|
||||
* @api {get} api/system/get/ipinfo 08. 获取IP地址详细信息
|
||||
*
|
||||
* @apiVersion 1.0.0
|
||||
* @apiGroup system
|
||||
@@ -198,7 +220,7 @@ class SystemController extends AbstractController
|
||||
}
|
||||
|
||||
/**
|
||||
* @api {get} api/system/get/appinfo 08. 获取应用下载信息
|
||||
* @api {get} api/system/get/appinfo 09. 获取应用下载信息
|
||||
*
|
||||
* @apiVersion 1.0.0
|
||||
* @apiGroup system
|
||||
@@ -215,37 +237,45 @@ class SystemController extends AbstractController
|
||||
'list' => [],
|
||||
];
|
||||
//
|
||||
$file = base_path("electron/package.json");
|
||||
$files = [
|
||||
base_path("package.json"),
|
||||
base_path("electron/package.json")
|
||||
];
|
||||
$dist = base_path("electron/dist");
|
||||
if (file_exists($file)) {
|
||||
$packageArray = json_decode(file_get_contents($file), true);
|
||||
$array['name'] = $packageArray['name'] ?? 'No app';
|
||||
$array['version'] = $packageArray['version'] ?? '';
|
||||
//
|
||||
$list = [
|
||||
[
|
||||
'icon' => 'logo-apple',
|
||||
'name' => 'macOS Intel',
|
||||
'file' => "{$array['name']}-{$array['version']}.dmg"
|
||||
],
|
||||
[
|
||||
'icon' => 'logo-apple',
|
||||
'name' => 'macOS M1',
|
||||
'file' => "{$array['name']}-{$array['version']}-arm64.dmg"
|
||||
],
|
||||
[
|
||||
'icon' => 'logo-windows',
|
||||
'name' => 'Windows x64',
|
||||
'file' => "{$array['name']} Setup {$array['version']}.exe"
|
||||
]
|
||||
];
|
||||
foreach ($list as $item) {
|
||||
if (file_exists("{$dist}/{$item['file']}")) {
|
||||
$item['url'] = Base::fillUrl('api/system/get/appdown?file=' . urlencode($item['file']));
|
||||
$item['size'] = filesize("{$dist}/{$item['file']}");
|
||||
$array['list'][] = $item;
|
||||
foreach ($files as $file) {
|
||||
if (file_exists($file)) {
|
||||
$packageArray = json_decode(file_get_contents($file), true);
|
||||
$array['name'] = $packageArray['name'] ?? 'No app';
|
||||
$array['version'] = $packageArray['version'] ?? '';
|
||||
//
|
||||
$list = [
|
||||
[
|
||||
'icon' => 'logo-apple',
|
||||
'name' => 'macOS Intel',
|
||||
'file' => "{$array['name']}-{$array['version']}.dmg"
|
||||
],
|
||||
[
|
||||
'icon' => 'logo-apple',
|
||||
'name' => 'macOS M1',
|
||||
'file' => "{$array['name']}-{$array['version']}-arm64.dmg"
|
||||
],
|
||||
[
|
||||
'icon' => 'logo-windows',
|
||||
'name' => 'Windows x64',
|
||||
'file' => "{$array['name']} Setup {$array['version']}.exe"
|
||||
]
|
||||
];
|
||||
foreach ($list as $item) {
|
||||
if (file_exists("{$dist}/{$item['file']}")) {
|
||||
$item['url'] = Base::fillUrl('api/system/get/appdown?file=' . urlencode($item['file']));
|
||||
$item['size'] = filesize("{$dist}/{$item['file']}");
|
||||
$array['list'][] = $item;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (count($array['list']) > 0) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
//
|
||||
if (count($array['list']) == 0) {
|
||||
@@ -255,7 +285,7 @@ class SystemController extends AbstractController
|
||||
}
|
||||
|
||||
/**
|
||||
* @api {get} api/system/get/appdown 09. 下载应用
|
||||
* @api {get} api/system/get/appdown 10. 下载应用
|
||||
*
|
||||
* @apiVersion 1.0.0
|
||||
* @apiGroup system
|
||||
@@ -273,7 +303,7 @@ class SystemController extends AbstractController
|
||||
}
|
||||
|
||||
/**
|
||||
* @api {post} api/system/imgupload 10. 上传图片
|
||||
* @api {post} api/system/imgupload 11. 上传图片
|
||||
*
|
||||
* @apiDescription 需要token身份
|
||||
* @apiVersion 1.0.0
|
||||
@@ -323,7 +353,7 @@ class SystemController extends AbstractController
|
||||
}
|
||||
|
||||
/**
|
||||
* @api {get} api/system/get/imgview 11. 浏览图片空间
|
||||
* @api {get} api/system/get/imgview 12. 浏览图片空间
|
||||
*
|
||||
* @apiDescription 需要token身份
|
||||
* @apiVersion 1.0.0
|
||||
@@ -419,7 +449,7 @@ class SystemController extends AbstractController
|
||||
}
|
||||
|
||||
/**
|
||||
* @api {post} api/system/fileupload 12. 上传文件
|
||||
* @api {post} api/system/fileupload 13. 上传文件
|
||||
*
|
||||
* @apiDescription 需要token身份
|
||||
* @apiVersion 1.0.0
|
||||
|
||||
@@ -175,9 +175,9 @@ class UsersController extends AbstractController
|
||||
"userimg": "",
|
||||
"login_num": 10,
|
||||
"changepass": 0,
|
||||
"last_ip": "10.22.22.1",
|
||||
"last_ip": "127.0.0.1",
|
||||
"last_at": "2021-06-01 12:00:00",
|
||||
"line_ip": "10.22.22.1",
|
||||
"line_ip": "127.0.0.1",
|
||||
"line_at": "2021-06-01 12:00:00",
|
||||
"created_ip": "",
|
||||
}
|
||||
@@ -210,6 +210,7 @@ class UsersController extends AbstractController
|
||||
{
|
||||
$user = User::auth();
|
||||
$data = Request::all();
|
||||
$user->checkSystem(1);
|
||||
//头像
|
||||
if (Arr::exists($data, 'userimg')) {
|
||||
$userimg = Request::input('userimg');
|
||||
@@ -267,6 +268,7 @@ class UsersController extends AbstractController
|
||||
public function editpass()
|
||||
{
|
||||
$user = User::auth();
|
||||
$user->checkSystem();
|
||||
//
|
||||
$oldpass = trim(Request::input('oldpass'));
|
||||
$newpass = trim(Request::input('newpass'));
|
||||
@@ -279,15 +281,6 @@ class UsersController extends AbstractController
|
||||
return Base::retError('新旧密码一致');
|
||||
}
|
||||
//
|
||||
if (env("PASSWORD_ADMIN") == 'disabled') {
|
||||
if ($user->userid == 1) {
|
||||
return Base::retError('当前环境禁止修改密码');
|
||||
}
|
||||
}
|
||||
if (env("PASSWORD_OWNER") == 'disabled') {
|
||||
return Base::retError('当前环境禁止修改密码');
|
||||
}
|
||||
//
|
||||
$verify = User::whereUserid($user->userid)->wherePassword(Base::md52($oldpass, User::token2encrypt()))->count();
|
||||
if (empty($verify)) {
|
||||
return Base::retError('请填写正确的旧密码');
|
||||
@@ -310,10 +303,15 @@ class UsersController extends AbstractController
|
||||
* @apiName searchinfo
|
||||
*
|
||||
* @apiParam {Object} keys 搜索条件
|
||||
* - keys.key 昵称、邮箱
|
||||
* - keys.project_id 在指定项目ID
|
||||
* - keys.no_project_id 不在指定项目ID
|
||||
* - keys.key 昵称、邮箱
|
||||
* - keys.project_id 在指定项目ID
|
||||
* - keys.no_project_id 不在指定项目ID
|
||||
* @apiParam {Object} sorts 排序方式
|
||||
* - sorts.az 字母
|
||||
*
|
||||
* @apiParam {Number} [take] 获取数量,10-100
|
||||
* @apiParam {Number} [page] 当前页,默认:1(赋值分页模式,take参数无效)
|
||||
* @apiParam {Number} [pagesize] 每页显示数量,默认:10,最大:100
|
||||
*
|
||||
* @apiSuccess {Number} ret 返回状态码(1正确、0错误)
|
||||
* @apiSuccess {String} msg 返回信息(错误描述)
|
||||
@@ -324,6 +322,7 @@ class UsersController extends AbstractController
|
||||
$builder = User::select(['userid', 'email', 'nickname', 'profession', 'userimg', 'az']);
|
||||
//
|
||||
$keys = Request::input('keys');
|
||||
$sorts = Request::input('sorts');
|
||||
if (is_array($keys)) {
|
||||
if ($keys['key']) {
|
||||
$builder->where(function($query) use ($keys) {
|
||||
@@ -342,8 +341,17 @@ class UsersController extends AbstractController
|
||||
});
|
||||
}
|
||||
}
|
||||
if (is_array($sorts)) {
|
||||
if (in_array($sorts['az'], ['asc', 'desc'])) {
|
||||
$builder->orderBy('az', $sorts['az']);
|
||||
}
|
||||
}
|
||||
//
|
||||
$list = $builder->orderBy('userid')->take(Base::getPaginate(100, 10, 'take'))->get();
|
||||
if (Request::exists('page')) {
|
||||
$list = $builder->orderBy('userid')->paginate(Base::getPaginate(100, 10));
|
||||
} else {
|
||||
$list = $builder->orderBy('userid')->take(Base::getPaginate(100, 10, 'take'))->get();
|
||||
}
|
||||
return Base::retSuccess('success', $list);
|
||||
}
|
||||
|
||||
@@ -355,7 +363,7 @@ class UsersController extends AbstractController
|
||||
* @apiGroup users
|
||||
* @apiName basic
|
||||
*
|
||||
* @apiParam {Number} userid 会员ID(多个格式:jsonArray,一次最多30个)
|
||||
* @apiParam {Number} userid 会员ID(多个格式:jsonArray,一次最多50个)
|
||||
*
|
||||
* @apiSuccess {Number} ret 返回状态码(1正确、0错误)
|
||||
* @apiSuccess {String} msg 返回信息(错误描述)
|
||||
@@ -447,6 +455,7 @@ class UsersController extends AbstractController
|
||||
if (empty($userInfo)) {
|
||||
return Base::retError('会员不存在或已被删除');
|
||||
}
|
||||
$userInfo->checkSystem(1);
|
||||
//
|
||||
$upArray = [];
|
||||
switch ($type) {
|
||||
|
||||
@@ -51,7 +51,7 @@ class IndexController extends InvokeController
|
||||
*/
|
||||
public function crontab()
|
||||
{
|
||||
if (!Base::is_internal_ip()) {
|
||||
if (!Base::is_internal_ip(Base::getIp())) {
|
||||
// 限制内网访问
|
||||
return "Forbidden Access";
|
||||
}
|
||||
@@ -68,7 +68,7 @@ class IndexController extends InvokeController
|
||||
*/
|
||||
public function allcn()
|
||||
{
|
||||
if (!Base::is_internal_ip()) {
|
||||
if (!Base::is_internal_ip(Base::getIp())) {
|
||||
// 限制内网访问
|
||||
return "Forbidden Access";
|
||||
}
|
||||
@@ -92,7 +92,7 @@ class IndexController extends InvokeController
|
||||
*/
|
||||
public function allcn__php()
|
||||
{
|
||||
if (!Base::is_internal_ip()) {
|
||||
if (!Base::is_internal_ip(Base::getIp())) {
|
||||
// 限制内网访问
|
||||
return "Forbidden Access";
|
||||
}
|
||||
|
||||
@@ -6,7 +6,6 @@ namespace App\Http\Middleware;
|
||||
|
||||
use Closure;
|
||||
use Request;
|
||||
use URL;
|
||||
|
||||
class WebApi
|
||||
{
|
||||
@@ -28,13 +27,9 @@ class WebApi
|
||||
header('Access-Control-Allow-Headers:Content-Type, platform, platform-channel, token, release, Access-Control-Allow-Origin');
|
||||
}
|
||||
|
||||
$APP_FORCE_URL_SCHEME = env('APP_FORCE_URL_SCHEME', 'auto');
|
||||
if ($APP_FORCE_URL_SCHEME == 'https' || $APP_FORCE_URL_SCHEME === true) {
|
||||
URL::forceScheme('https');
|
||||
} elseif ($APP_FORCE_URL_SCHEME == 'http' || $APP_FORCE_URL_SCHEME === false) {
|
||||
URL::forceScheme('http');
|
||||
} elseif (Request::header('x-forwarded-server-port', 80) == 443) {
|
||||
URL::forceScheme('https');
|
||||
$APP_SCHEME = env('APP_SCHEME', 'auto');
|
||||
if (in_array(strtolower($APP_SCHEME), ['https', 'on', 'ssl', '1', 'true', 'yes'], true)) {
|
||||
$request->setTrustedProxies([$request->getClientIp()], $request::HEADER_X_FORWARDED_PROTO);
|
||||
}
|
||||
|
||||
return $next($request);
|
||||
|
||||
@@ -10,18 +10,18 @@ use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Request;
|
||||
|
||||
/**
|
||||
* Class File
|
||||
* App\Models\File
|
||||
*
|
||||
* @package App\Models
|
||||
* @property int $id
|
||||
* @property int|null $pid 上级ID
|
||||
* @property int|null $cid 复制ID
|
||||
* @property string|null $name 名称
|
||||
* @property string|null $type 类型
|
||||
* @property string|null $ext 后缀名
|
||||
* @property int|null $size 大小(B)
|
||||
* @property int|null $userid 拥有者ID
|
||||
* @property int|null $share 是否共享(1:共享所有人,2:指定成员)
|
||||
* @property int|null $created_id 创建者ID
|
||||
* @property int|null $share 是否共享
|
||||
* @property int|null $created_id 创建者
|
||||
* @property \Illuminate\Support\Carbon|null $created_at
|
||||
* @property \Illuminate\Support\Carbon|null $updated_at
|
||||
* @property \Illuminate\Support\Carbon|null $deleted_at
|
||||
@@ -33,6 +33,7 @@ use Request;
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|File whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|File whereCreatedId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|File whereDeletedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|File whereExt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|File whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|File whereName($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|File wherePid($value)
|
||||
|
||||
@@ -57,26 +57,28 @@ class FileContent extends AbstractModel
|
||||
return Response::download(public_path($content['url']));
|
||||
}
|
||||
if (empty($content)) {
|
||||
switch ($type) {
|
||||
case 'document':
|
||||
$content = [
|
||||
"type" => "md",
|
||||
"content" => "",
|
||||
];
|
||||
break;
|
||||
|
||||
case 'sheet':
|
||||
$content = [
|
||||
[
|
||||
"name" => "Sheet1",
|
||||
"config" => json_decode('{}'),
|
||||
]
|
||||
];
|
||||
break;
|
||||
|
||||
default:
|
||||
$content = json_decode('{}');
|
||||
break;
|
||||
$content = match ($type) {
|
||||
'document' => [
|
||||
"type" => "md",
|
||||
"content" => "",
|
||||
],
|
||||
'sheet' => [
|
||||
[
|
||||
"name" => "Sheet1",
|
||||
"config" => json_decode('{}'),
|
||||
]
|
||||
],
|
||||
default => json_decode('{}'),
|
||||
};
|
||||
} else {
|
||||
$content['preview'] = false;
|
||||
if ($content['ext'] && !in_array($content['ext'], ['doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx'])) {
|
||||
$url = 'http://' . env('APP_IPPR') . '.3/' . $content['url'];
|
||||
if ($type == 'image') {
|
||||
$url = Base::fillUrl($content['url']);
|
||||
}
|
||||
$content['url'] = base64_encode($url);
|
||||
$content['preview'] = true;
|
||||
}
|
||||
}
|
||||
return Base::retSuccess('success', [ 'content' => $content ]);
|
||||
|
||||
@@ -267,7 +267,7 @@ class Project extends AbstractModel
|
||||
}
|
||||
|
||||
/**
|
||||
* 归档任务、取消归档
|
||||
* 归档项目、取消归档
|
||||
* @param Carbon|null $archived_at 归档时间
|
||||
* @return bool
|
||||
*/
|
||||
@@ -279,12 +279,20 @@ class Project extends AbstractModel
|
||||
$this->archived_at = null;
|
||||
$this->addLog("项目取消归档");
|
||||
$this->pushMsg('add', $this);
|
||||
ProjectTask::whereProjectId($this->id)->whereArchivedFollow(1)->update([
|
||||
'archived_at' => null,
|
||||
'archived_follow' => 0
|
||||
]);
|
||||
} else {
|
||||
// 归档任务
|
||||
// 归档项目
|
||||
$this->archived_at = $archived_at;
|
||||
$this->archived_userid = User::userid();
|
||||
$this->addLog("项目归档");
|
||||
$this->pushMsg('archived');
|
||||
ProjectTask::whereProjectId($this->id)->whereArchivedAt(null)->update([
|
||||
'archived_at' => $archived_at,
|
||||
'archived_follow' => 1
|
||||
]);
|
||||
}
|
||||
$this->save();
|
||||
});
|
||||
@@ -299,9 +307,7 @@ class Project extends AbstractModel
|
||||
{
|
||||
AbstractModel::transaction(function () {
|
||||
$dialog = WebSocketDialog::find($this->dialog_id);
|
||||
if ($dialog) {
|
||||
$dialog->deleteDialog();
|
||||
}
|
||||
$dialog?->deleteDialog();
|
||||
$columns = ProjectColumn::whereProjectId($this->id)->get();
|
||||
foreach ($columns as $column) {
|
||||
$column->deleteColumn(false);
|
||||
@@ -367,13 +373,12 @@ class Project extends AbstractModel
|
||||
*/
|
||||
public static function userProject($project_id, $ignoreArchived = true)
|
||||
{
|
||||
$builder = self::select(self::projectSelect)->authData()->where('projects.id', intval($project_id));
|
||||
if ($ignoreArchived) {
|
||||
$builder->whereNull('projects.archived_at');
|
||||
}
|
||||
$project = $builder->first();
|
||||
$project = self::select(self::projectSelect)->authData()->where('projects.id', intval($project_id))->first();
|
||||
if (empty($project)) {
|
||||
throw new ApiException('项目不存在或不在成员列表内');
|
||||
throw new ApiException('项目不存在或不在成员列表内', [ 'project_id' => $project_id ], -4001);
|
||||
}
|
||||
if ($ignoreArchived && $project->archived_at != null) {
|
||||
throw new ApiException('项目已归档', [ 'project_id' => $project_id ], -4001);
|
||||
}
|
||||
return $project;
|
||||
}
|
||||
|
||||
@@ -7,14 +7,14 @@ use App\Module\Base;
|
||||
use App\Tasks\PushTask;
|
||||
use Arr;
|
||||
use Carbon\Carbon;
|
||||
use Exception;
|
||||
use Hhxsv5\LaravelS\Swoole\Task\Task;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Request;
|
||||
|
||||
/**
|
||||
* Class ProjectTask
|
||||
* App\Models\ProjectTask
|
||||
*
|
||||
* @package App\Models
|
||||
* @property int $id
|
||||
* @property int|null $parent_id 父级任务ID
|
||||
* @property int|null $project_id 项目ID
|
||||
@@ -27,6 +27,7 @@ use Request;
|
||||
* @property string|null $end_at 计划结束时间
|
||||
* @property string|null $archived_at 归档时间
|
||||
* @property int|null $archived_userid 归档会员
|
||||
* @property int|null $archived_follow 跟随项目归档(项目取消归档时任务也取消归档)
|
||||
* @property string|null $complete_at 完成时间
|
||||
* @property int|null $userid 创建人
|
||||
* @property int|null $p_level 优先级
|
||||
@@ -58,6 +59,7 @@ use Request;
|
||||
* @method static \Illuminate\Database\Query\Builder|ProjectTask onlyTrashed()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectTask query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectTask whereArchivedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectTask whereArchivedFollow($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectTask whereArchivedUserid($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectTask whereColor($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectTask whereColumnId($value)
|
||||
@@ -639,6 +641,7 @@ class ProjectTask extends AbstractModel
|
||||
if ($archived_at === null) {
|
||||
// 取消归档
|
||||
$this->archived_at = null;
|
||||
$this->archived_follow = 0;
|
||||
$this->addLog("任务取消归档:" . $this->name);
|
||||
$this->pushMsg('add', [
|
||||
'new_column' => null,
|
||||
@@ -648,6 +651,7 @@ class ProjectTask extends AbstractModel
|
||||
// 归档任务
|
||||
$this->archived_at = $archived_at;
|
||||
$this->archived_userid = User::userid();
|
||||
$this->archived_follow = 0;
|
||||
$this->addLog("任务归档:" . $this->name);
|
||||
$this->pushMsg('archived');
|
||||
}
|
||||
@@ -736,24 +740,35 @@ class ProjectTask extends AbstractModel
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据会员ID获取任务、项目信息(用于判断会员是否存在项目内)
|
||||
* 根据会员ID获取任务、项目信息(会员有任务权限 或 会员存在项目内)
|
||||
* @param int $task_id
|
||||
* @param array $with
|
||||
* @param bool $ignoreArchived 排除已归档
|
||||
* @param null $project
|
||||
* @return self
|
||||
*/
|
||||
public static function userTask($task_id, $with = [], $ignoreArchived = true, &$project = null)
|
||||
{
|
||||
$builder = self::with($with)->whereId(intval($task_id));
|
||||
if ($ignoreArchived) {
|
||||
$builder->whereNull('archived_at');
|
||||
}
|
||||
$task = $builder->first();
|
||||
$task = self::with($with)->whereId(intval($task_id))->first();
|
||||
if (empty($task)) {
|
||||
throw new ApiException('任务不存在');
|
||||
throw new ApiException('任务不存在', [ 'task_id' => $task_id ], -4002);
|
||||
}
|
||||
if ($ignoreArchived && $task->archived_at != null) {
|
||||
throw new ApiException('任务已归档', [ 'task_id' => $task_id ], -4002);
|
||||
}
|
||||
//
|
||||
$project = Project::userProject($task->project_id, $ignoreArchived);
|
||||
try {
|
||||
$project = Project::userProject($task->project_id, $ignoreArchived);
|
||||
} catch (Exception $e) {
|
||||
if (ProjectTaskUser::whereUserid(User::userid())->whereTaskPid($task->id)->exists()) {
|
||||
$project = Project::find($task->project_id);
|
||||
if (empty($project)) {
|
||||
throw new ApiException('项目不存在或已被删除', [ 'task_id' => $task_id ], -4002);
|
||||
}
|
||||
} else {
|
||||
throw new ApiException($e->getMessage(), [ 'task_id' => $task_id ], -4002);
|
||||
}
|
||||
}
|
||||
//
|
||||
return $task;
|
||||
}
|
||||
|
||||
@@ -145,6 +145,24 @@ class User extends AbstractModel
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查环境是否允许
|
||||
* @param null $onlyUserid 仅指定会员
|
||||
*/
|
||||
public function checkSystem($onlyUserid = null)
|
||||
{
|
||||
if ($onlyUserid && $onlyUserid != $this->userid) {
|
||||
return;
|
||||
}
|
||||
if (env("PASSWORD_ADMIN") == 'disabled') {
|
||||
if ($this->userid == 1) {
|
||||
throw new ApiException('当前环境禁止此操作');
|
||||
}
|
||||
}
|
||||
if (env("PASSWORD_OWNER") == 'disabled') {
|
||||
throw new ApiException('当前环境禁止此操作');
|
||||
}
|
||||
}
|
||||
|
||||
/** ***************************************************************************************** */
|
||||
/** ***************************************************************************************** */
|
||||
|
||||
@@ -65,14 +65,14 @@ class WebSocketDialog extends AbstractModel
|
||||
|
||||
/**
|
||||
* 获取对话(同时检验对话身份)
|
||||
* @param $id
|
||||
* @param $dialog_id
|
||||
* @return self
|
||||
*/
|
||||
public static function checkDialog($id)
|
||||
public static function checkDialog($dialog_id)
|
||||
{
|
||||
$dialog = WebSocketDialog::whereId($id)->first();
|
||||
$dialog = WebSocketDialog::find($dialog_id);
|
||||
if (empty($dialog)) {
|
||||
throw new ApiException('对话不存在或已被删除');
|
||||
throw new ApiException('对话不存在或已被删除', ['dialog_id' => $dialog_id], -4003);
|
||||
}
|
||||
//
|
||||
$userid = User::userid();
|
||||
@@ -210,12 +210,14 @@ class WebSocketDialog extends AbstractModel
|
||||
public static function checkUserDialog($userid, $userid2)
|
||||
{
|
||||
$dialogUser = self::select(['web_socket_dialogs.*'])
|
||||
->join('web_socket_dialog_users', 'web_socket_dialog_users.dialog_id', '=', 'web_socket_dialogs.id')
|
||||
->join('web_socket_dialog_users as u1', 'web_socket_dialogs.id', '=', 'u1.dialog_id')
|
||||
->join('web_socket_dialog_users as u2', 'web_socket_dialogs.id', '=', 'u2.dialog_id')
|
||||
->where('u1.userid', $userid)
|
||||
->where('u2.userid', $userid2)
|
||||
->where('web_socket_dialogs.type', 'user')
|
||||
->whereIn('web_socket_dialog_users.userid', [$userid, $userid2])
|
||||
->get();
|
||||
if ($dialogUser->count() >= 2) {
|
||||
return $dialogUser[0];
|
||||
->first();
|
||||
if ($dialogUser) {
|
||||
return $dialogUser;
|
||||
}
|
||||
return AbstractModel::transaction(function () use ($userid2, $userid) {
|
||||
$dialog = self::createInstance([
|
||||
|
||||
@@ -2218,17 +2218,27 @@ class Base
|
||||
case 'file':
|
||||
$type = ['jpg', 'jpeg', 'png', 'gif', 'doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx', 'txt', 'esp', 'pdf', 'rar', 'zip', 'gz'];
|
||||
break;
|
||||
case 'office':
|
||||
$type = ['doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx'];
|
||||
break;
|
||||
case 'firmware':
|
||||
$type = ['img', 'tar', 'bin'];
|
||||
break;
|
||||
case 'md':
|
||||
$type = ['md'];
|
||||
break;
|
||||
case 'node_template':
|
||||
$type = ['csv'];
|
||||
case 'more':
|
||||
$type = [
|
||||
'docx', 'wps', 'doc', 'xls', 'xlsx', 'ppt', 'pptx',
|
||||
'jpg', 'jpeg', 'png', 'gif', 'bmp', 'ico', 'raw',
|
||||
'rar', 'zip', 'jar', '7-zip', 'tar', 'gzip', '7z',
|
||||
'tif', 'tiff',
|
||||
'dwg', 'dxf',
|
||||
'ofd',
|
||||
'pdf',
|
||||
'txt',
|
||||
'html', 'htm', 'asp', 'jsp', 'xml', 'json', 'properties', 'md', 'gitignore', 'log', 'java', 'py', 'c', 'cpp', 'sql', 'sh', 'bat', 'm', 'bas', 'prg', 'cmd',
|
||||
'php', 'go', 'python', 'js', 'ftl', 'css', 'lua', 'rb', 'yaml', 'yml', 'h', 'cs', 'aspx',
|
||||
'mp3', 'wav', 'mp4', 'flv',
|
||||
'avi', 'mov', 'wmv', 'mkv', '3gp', 'rm',
|
||||
];
|
||||
break;
|
||||
default:
|
||||
return Base::retError('错误的类型参数');
|
||||
|
||||
5
bin/run
@@ -73,7 +73,7 @@ class runLoader
|
||||
}
|
||||
}
|
||||
|
||||
$array = getopt('', ['port:', 'ssl:', 'mode:']);
|
||||
$array = getopt('', ['port:', 'mode:']);
|
||||
$loader = new runLoader();
|
||||
|
||||
if (isset($array['mode'])) {
|
||||
@@ -84,9 +84,6 @@ $data = [];
|
||||
if (isset($array['port'])) {
|
||||
$data['APP_PORT'] = $array['port'];
|
||||
}
|
||||
if (isset($array['ssl'])) {
|
||||
$data['APP_PORT_SSL'] = $array['ssl'];
|
||||
}
|
||||
if ($data) {
|
||||
$loader->modifyEnv($data);
|
||||
}
|
||||
|
||||
263
cmd
@@ -23,10 +23,17 @@ judge() {
|
||||
fi
|
||||
}
|
||||
|
||||
rand() {
|
||||
local min=$1
|
||||
local max=$(($2-$min+1))
|
||||
local num=$(($RANDOM+1000000000))
|
||||
echo $(($num%$max+$min))
|
||||
}
|
||||
|
||||
supervisorctl_restart() {
|
||||
RES=`docker-compose exec php /bin/bash -c "supervisorctl update $1"`
|
||||
if [ -z "$RES" ];then
|
||||
docker-compose exec php /bin/bash -c "supervisorctl restart $1"
|
||||
local RES=`run_exec php "supervisorctl update $1"`
|
||||
if [ -z "$RES" ]; then
|
||||
run_exec php "supervisorctl restart $1"
|
||||
else
|
||||
echo -e "$RES"
|
||||
fi
|
||||
@@ -53,33 +60,139 @@ check_node() {
|
||||
fi
|
||||
}
|
||||
|
||||
docker_name() {
|
||||
echo `docker-compose ps | awk '{print $1}' | grep "\-$1\-"`
|
||||
}
|
||||
|
||||
run_compile() {
|
||||
local type=$1
|
||||
local npxcmd=""
|
||||
check_node
|
||||
if [ ! -d "./node_modules" ]; then
|
||||
npm install
|
||||
fi
|
||||
run_exec php "php bin/run --mode=$type"
|
||||
supervisorctl_restart php
|
||||
#
|
||||
mix -V &> /dev/null
|
||||
if [ $? -ne 0 ]; then
|
||||
npxcmd="npx"
|
||||
fi
|
||||
if [ "$type" = "prod" ]; then
|
||||
rm -rf "./public/js/build"
|
||||
$npxcmd mix --production
|
||||
else
|
||||
$npxcmd mix watch --hot
|
||||
fi
|
||||
}
|
||||
|
||||
run_electron() {
|
||||
local type=$1
|
||||
check_node
|
||||
if [ ! -d "./electron/node_modules" ]; then
|
||||
pushd electron
|
||||
npm install
|
||||
popd
|
||||
fi
|
||||
if [ -d "./electron/dist" ]; then
|
||||
rm -rf "./electron/dist"
|
||||
fi
|
||||
if [ "$type" = "prod" ]; then
|
||||
node ./electron/build.js --build
|
||||
else
|
||||
node ./electron/build.js
|
||||
fi
|
||||
}
|
||||
|
||||
run_exec() {
|
||||
local container=$1
|
||||
local cmd=$2
|
||||
local name=`docker_name $container`
|
||||
if [ -z "$name" ]; then
|
||||
echo -e "${Error} ${RedBG} 没有找到 $container 容器! ${Font}"
|
||||
exit 1
|
||||
fi
|
||||
if [ "$container" = "mariadb" ] || [ "$container" = "nginx" ] || [ "$container" = "redis" ]; then
|
||||
docker exec -it "$name" /bin/sh -c "$cmd"
|
||||
else
|
||||
docker exec -it "$name" /bin/bash -c "$cmd"
|
||||
fi
|
||||
}
|
||||
|
||||
run_mysql() {
|
||||
if [ "$1" = "backup" ]; then
|
||||
# 备份数据库
|
||||
database=$(env_get DB_DATABASE)
|
||||
username=$(env_get DB_USERNAME)
|
||||
password=$(env_get DB_PASSWORD)
|
||||
mkdir -p ${cur_path}/docker/mysql/backup
|
||||
filename="${cur_path}/docker/mysql/backup/${database}_$(date "+%Y%m%d%H%M%S").sql.gz"
|
||||
run_exec mariadb "exec mysqldump --databases $database -u$username -p$password" | gzip > $filename
|
||||
judge "备份数据库"
|
||||
[ -f "$filename" ] && echo -e "备份文件:$filename"
|
||||
elif [ "$1" = "recovery" ]; then
|
||||
# 还原数据库
|
||||
database=$(env_get DB_DATABASE)
|
||||
username=$(env_get DB_USERNAME)
|
||||
password=$(env_get DB_PASSWORD)
|
||||
mkdir -p ${cur_path}/docker/mysql/backup
|
||||
list=`ls -1 "${cur_path}/docker/mysql/backup" | grep ".sql.gz"`
|
||||
if [ -z "$list" ]; then
|
||||
echo -e "${Error} ${RedBG} 没有备份文件!${Font}"
|
||||
exit 1
|
||||
fi
|
||||
echo "$list"
|
||||
read -rp "请输入备份文件名称还原:" inputname
|
||||
filename="${cur_path}/docker/mysql/backup/${inputname}"
|
||||
if [ ! -f "$filename" ]; then
|
||||
echo -e "${Error} ${RedBG} 备份文件:${inputname} 不存在! ${Font}"
|
||||
exit 1
|
||||
fi
|
||||
container_name=`docker_name mariadb`
|
||||
if [ -z "$container_name" ]; then
|
||||
echo -e "${Error} ${RedBG} 没有找到 mariadb 容器! ${Font}"
|
||||
exit 1
|
||||
fi
|
||||
docker cp $filename $container_name:/
|
||||
run_exec mariadb "gunzip < /$inputname | mysql -u$username -p$password $database"
|
||||
judge "还原数据库"
|
||||
fi
|
||||
}
|
||||
|
||||
env_get() {
|
||||
key=$1
|
||||
value=`cat ${cur_path}/.env | grep "^$key=" | awk -F '=' '{print $2}'`
|
||||
local key=$1
|
||||
local value=`cat ${cur_path}/.env | grep "^$key=" | awk -F '=' '{print $2}'`
|
||||
echo "$value"
|
||||
}
|
||||
|
||||
env_set() {
|
||||
key=$1
|
||||
val=$2
|
||||
exist=`cat ${cur_path}/.env | grep "^$key="`
|
||||
if [ -z "$exist" ];then
|
||||
local key=$1
|
||||
local val=$2
|
||||
local exist=`cat ${cur_path}/.env | grep "^$key="`
|
||||
if [ -z "$exist" ]; then
|
||||
echo "$key=$val" >> $cur_path/.env
|
||||
else
|
||||
command="sed -i '/^$key=/c\\$key=$val' /www/.env"
|
||||
docker run -it --rm -v ${cur_path}:/www alpine sh -c "$command"
|
||||
if [ $? -ne 0 ]; then
|
||||
echo -e "${Error} ${RedBG} 设置env参数失败!${Font}"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
env_init() {
|
||||
if [ ! -f ".env" ];then
|
||||
if [ ! -f ".env" ]; then
|
||||
cp .env.docker .env
|
||||
fi
|
||||
if [ -z "$(env_get DB_ROOT_PASSWORD)" ];then
|
||||
if [ -z "$(env_get DB_ROOT_PASSWORD)" ]; then
|
||||
env_set DB_ROOT_PASSWORD "$(docker run -it --rm alpine sh -c "date +%s%N | md5sum | cut -c 1-16")"
|
||||
fi
|
||||
if [ -z "$(env_get DOCKER_ID)" ];then
|
||||
env_set DOCKER_ID "$(docker run -it --rm alpine sh -c "date +%s%N | md5sum | cut -c 1-6")"
|
||||
if [ -z "$(env_get APP_ID)" ]; then
|
||||
env_set APP_ID "$(docker run -it --rm alpine sh -c "date +%s%N | md5sum | cut -c 1-6")"
|
||||
fi
|
||||
if [ -z "$(env_get APP_IPPR)" ]; then
|
||||
env_set APP_IPPR "10.$(rand 50 100).$(rand 100 200)"
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -87,38 +200,37 @@ env_init() {
|
||||
####################################################################################
|
||||
####################################################################################
|
||||
|
||||
COMPOSE="docker-compose"
|
||||
env_init
|
||||
check_docker
|
||||
env_init
|
||||
|
||||
if [ $# -gt 0 ];then
|
||||
if [ $# -gt 0 ]; then
|
||||
if [[ "$1" == "init" ]] || [[ "$1" == "install" ]]; then
|
||||
shift 1
|
||||
networkid=`docker network ls | grep "dooteak-networks-" | awk '{print $1}'`
|
||||
if [ -n "$networkid" ]; then
|
||||
docker network rm "$networkid" > /dev/null
|
||||
fi
|
||||
rm -rf composer.lock
|
||||
rm -rf package-lock.json
|
||||
mkdir -p ${cur_path}/docker/mysql/data
|
||||
chmod -R 777 ${cur_path}/docker/mysql/data
|
||||
$COMPOSE up -d
|
||||
$COMPOSE restart php
|
||||
$COMPOSE exec php /bin/bash -c "composer install"
|
||||
[ -z "$(env_get APP_KEY)" ] && $COMPOSE exec php /bin/bash -c "php artisan key:generate"
|
||||
$COMPOSE exec php /bin/bash -c "php artisan migrate --seed"
|
||||
$COMPOSE exec php /bin/bash -c "php bin/run --port=2222 --ssl=2223"
|
||||
$COMPOSE exec php /bin/bash -c "php bin/run --mode=prod"
|
||||
$COMPOSE stop
|
||||
$COMPOSE start
|
||||
docker-compose up -d
|
||||
docker-compose restart php
|
||||
run_exec php "composer install"
|
||||
[ -z "$(env_get APP_KEY)" ] && run_exec php "php artisan key:generate"
|
||||
run_exec php "php artisan migrate --seed"
|
||||
run_exec php "php bin/run --mode=prod"
|
||||
res=`run_exec mariadb "sh /etc/mysql/repassword.sh"`
|
||||
docker-compose stop
|
||||
docker-compose start
|
||||
echo -e "${OK} ${GreenBG} 安装完成 ${Font}"
|
||||
echo -e "地址: http://${GreenBG}127.0.0.1:$(env_get APP_PORT)${Font}"
|
||||
echo -e "$res"
|
||||
elif [[ "$1" == "update" ]]; then
|
||||
shift 1
|
||||
git fetch --all
|
||||
git reset --hard origin/$(git branch | sed -n -e 's/^\* \(.*\)/\1/p')
|
||||
git pull
|
||||
$COMPOSE exec php /bin/bash -c "composer update"
|
||||
$COMPOSE exec php /bin/bash -c "php artisan migrate"
|
||||
run_exec php "composer update"
|
||||
run_exec php "php artisan migrate"
|
||||
supervisorctl_restart php
|
||||
docker-compose up -d
|
||||
elif [[ "$1" == "uninstall" ]]; then
|
||||
shift 1
|
||||
read -rp "确定要卸载(含:删除容器、数据库、日志)吗?(y/n): " uninstall
|
||||
@@ -132,30 +244,34 @@ if [ $# -gt 0 ];then
|
||||
exit 2
|
||||
;;
|
||||
esac
|
||||
docker-compose rm -fs
|
||||
docker-compose down
|
||||
rm -rf "./docker/mysql/data"
|
||||
rm -rf "./docker/log/supervisor"
|
||||
find "./storage/logs" -name "*.log" | xargs rm -rf
|
||||
echo -e "${OK} ${GreenBG} 卸载完成 ${Font}"
|
||||
elif [[ "$1" == "dev" ]]; then
|
||||
elif [[ "$1" == "repassword" ]]; then
|
||||
shift 1
|
||||
check_node
|
||||
$COMPOSE exec php /bin/bash -c "php bin/run --mode=dev"
|
||||
supervisorctl_restart php
|
||||
mix watch --hot
|
||||
elif [[ "$1" == "prod" ]]; then
|
||||
run_exec mariadb "sh /etc/mysql/repassword.sh \"$@\""
|
||||
elif [[ "$1" == "dev" ]] || [[ "$1" == "development" ]]; then
|
||||
shift 1
|
||||
check_node
|
||||
$COMPOSE exec php /bin/bash -c "php bin/run --mode=prod"
|
||||
supervisorctl_restart php
|
||||
rm -rf "./public/js/build"
|
||||
mix --production
|
||||
elif [[ "$1" == "super" ]]; then
|
||||
run_compile dev
|
||||
elif [[ "$1" == "prod" ]] || [[ "$1" == "production" ]]; then
|
||||
shift 1
|
||||
supervisorctl_restart "$@"
|
||||
run_compile prod
|
||||
elif [[ "$1" == "electron" ]]; then
|
||||
shift 1
|
||||
if [[ "$@" == "dev" ]]; then
|
||||
run_electron dev
|
||||
else
|
||||
run_electron prod
|
||||
fi
|
||||
elif [[ "$1" == "doc" ]]; then
|
||||
shift 1
|
||||
run_exec php "php app/Http/Controllers/Api/apidoc.php"
|
||||
docker run -it --rm -v ${cur_path}:/home/node/apidoc kuaifan/apidoc -i app/Http/Controllers/Api -o public/docs
|
||||
elif [[ "$1" == "debug" ]]; then
|
||||
shift 1
|
||||
if [[ "$@" == "close" ]];then
|
||||
if [[ "$@" == "close" ]]; then
|
||||
env_set APP_DEBUG "false"
|
||||
else
|
||||
env_set APP_DEBUG "true"
|
||||
@@ -163,52 +279,55 @@ if [ $# -gt 0 ];then
|
||||
supervisorctl_restart php
|
||||
elif [[ "$1" == "https" ]]; then
|
||||
shift 1
|
||||
if [[ "$@" == "auto" ]];then
|
||||
env_set APP_FORCE_URL_SCHEME "auto"
|
||||
if [[ "$@" == "auto" ]]; then
|
||||
env_set APP_SCHEME "auto"
|
||||
else
|
||||
env_set APP_FORCE_URL_SCHEME "true"
|
||||
env_set APP_SCHEME "true"
|
||||
fi
|
||||
supervisorctl_restart php
|
||||
elif [[ "$1" == "artisan" ]]; then
|
||||
shift 1
|
||||
e="php artisan $@" && $COMPOSE exec php /bin/bash -c "$e"
|
||||
e="php artisan $@" && run_exec php "$e"
|
||||
elif [[ "$1" == "php" ]]; then
|
||||
shift 1
|
||||
e="php $@" && $COMPOSE exec php /bin/bash -c "$e"
|
||||
e="php $@" && run_exec php "$e"
|
||||
elif [[ "$1" == "nginx" ]]; then
|
||||
shift 1
|
||||
e="nginx $@" && run_exec nginx "$e"
|
||||
elif [[ "$1" == "redis" ]]; then
|
||||
shift 1
|
||||
e="redis $@" && run_exec redis "$e"
|
||||
elif [[ "$1" == "mysql" ]]; then
|
||||
shift 1
|
||||
if [[ "$@" == "bak" ]];then
|
||||
database=$(env_get DB_DATABASE)
|
||||
password=$(env_get DB_ROOT_PASSWORD)
|
||||
filename="${cur_path}/docker/mysql/bak/${database}_$(date "+%Y%m%d%H%M%S").sql.gz"
|
||||
$COMPOSE exec mariadb /bin/sh -c "exec mysqldump --databases $database -uroot -p\"$password\"" | gzip > $filename
|
||||
judge "备份数据库"
|
||||
[ -f "$filename" ] && echo -e "备份文件:$filename"
|
||||
if [ "$1" = "backup" ]; then
|
||||
run_mysql backup
|
||||
elif [ "$1" = "recovery" ]; then
|
||||
run_mysql recovery
|
||||
else
|
||||
e="mysql $@" && $COMPOSE exec mariadb /bin/sh -c "$e"
|
||||
e="mysql $@" && run_exec mariadb "$e"
|
||||
fi
|
||||
elif [[ "$1" == "composer" ]]; then
|
||||
shift 1
|
||||
e="composer $@" && $COMPOSE exec php /bin/bash -c "$e"
|
||||
e="composer $@" && run_exec php "$e"
|
||||
elif [[ "$1" == "super" ]]; then
|
||||
shift 1
|
||||
supervisorctl_restart "$@"
|
||||
elif [[ "$1" == "supervisorctl" ]]; then
|
||||
shift 1
|
||||
e="supervisorctl $@" && $COMPOSE exec php /bin/bash -c "$e"
|
||||
e="supervisorctl $@" && run_exec php "$e"
|
||||
elif [[ "$1" == "models" ]]; then
|
||||
shift 1
|
||||
run_exec php "php artisan ide-helper:models -W"
|
||||
elif [[ "$1" == "test" ]]; then
|
||||
shift 1
|
||||
e="./vendor/bin/phpunit $@" && $COMPOSE exec php /bin/bash -c "$e"
|
||||
elif [[ "$1" == "npm" ]]; then
|
||||
shift 1
|
||||
e="npm $@" && $COMPOSE exec php /bin/bash -c "$e"
|
||||
elif [[ "$1" == "yarn" ]]; then
|
||||
shift 1
|
||||
e="yarn $@" && $COMPOSE exec php /bin/bash -c "$e"
|
||||
e="./vendor/bin/phpunit $@" && run_exec php "$e"
|
||||
elif [[ "$1" == "restart" ]]; then
|
||||
shift 1
|
||||
$COMPOSE stop "$@"
|
||||
$COMPOSE start "$@"
|
||||
docker-compose stop "$@"
|
||||
docker-compose start "$@"
|
||||
else
|
||||
$COMPOSE "$@"
|
||||
docker-compose "$@"
|
||||
fi
|
||||
else
|
||||
$COMPOSE ps
|
||||
docker-compose ps
|
||||
fi
|
||||
|
||||
47
database/migrations/2021_12_10_170751_files_add_ext.php
Normal file
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class FilesAddExt extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
$isAdd = false;
|
||||
Schema::table('files', function (Blueprint $table) use (&$isAdd) {
|
||||
if (!Schema::hasColumn('files', 'ext')) {
|
||||
$isAdd = true;
|
||||
$table->string('ext', 20)->nullable()->default('')->after('type')->comment('后缀名');
|
||||
}
|
||||
});
|
||||
if ($isAdd) {
|
||||
// 更新数据
|
||||
\App\Models\File::chunkById(100, function ($lists) {
|
||||
foreach ($lists as $item) {
|
||||
if (in_array($item->type, ['word', 'excel', 'ppt'])) {
|
||||
$item->ext = str_replace(['word', 'excel', 'ppt'], ['docx', 'xlsx', 'pptx'], $item->type);
|
||||
$item->save();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('files', function (Blueprint $table) {
|
||||
$table->dropColumn("ext");
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
use App\Models\Project;
|
||||
use App\Models\ProjectTask;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class ProjectTasksAddArchivedFollow extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
$isAdd = false;
|
||||
Schema::table('project_tasks', function (Blueprint $table) use (&$isAdd) {
|
||||
if (!Schema::hasColumn('project_tasks', 'archived_follow')) {
|
||||
$isAdd = true;
|
||||
$table->tinyInteger('archived_follow')->nullable()->default(0)->after('archived_userid')->comment('跟随项目归档(项目取消归档时任务也取消归档)');
|
||||
}
|
||||
});
|
||||
if ($isAdd) {
|
||||
// 更新数据
|
||||
Project::whereNotNull('archived_at')->chunkById(100, function ($lists) {
|
||||
foreach ($lists as $item) {
|
||||
ProjectTask::whereProjectId($item->id)->whereArchivedAt(null)->update([
|
||||
'archived_at' => $item->archived_at,
|
||||
'archived_follow' => 1
|
||||
]);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('project_tasks', function (Blueprint $table) {
|
||||
$table->dropColumn("archived_follow");
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -34,9 +34,9 @@ class UsersTableSeeder extends Seeder
|
||||
'password' => '7d996ac317f1b9db564750ef3b8790fc',
|
||||
'changepass' => 0,
|
||||
'login_num' => 73,
|
||||
'last_ip' => '10.22.22.1',
|
||||
'last_ip' => '127.0.0.1',
|
||||
'last_at' => seeders_at('2021-07-01 16:58:16'),
|
||||
'line_ip' => '10.22.22.1',
|
||||
'line_ip' => '127.0.0.1',
|
||||
'line_at' => seeders_at('2021-07-01 17:43:48'),
|
||||
'task_dialog_id' => 18,
|
||||
'created_ip' => '',
|
||||
@@ -56,9 +56,9 @@ class UsersTableSeeder extends Seeder
|
||||
'password' => '7eedd4cbf70da996d21f641bcc6cb412',
|
||||
'changepass' => 0,
|
||||
'login_num' => 63,
|
||||
'last_ip' => '10.22.22.1',
|
||||
'last_ip' => '127.0.0.1',
|
||||
'last_at' => seeders_at('2021-07-01 16:57:40'),
|
||||
'line_ip' => '10.22.22.1',
|
||||
'line_ip' => '127.0.0.1',
|
||||
'line_at' => seeders_at('2021-07-01 16:57:40'),
|
||||
'task_dialog_id' => 16,
|
||||
'created_ip' => '',
|
||||
|
||||
@@ -2,17 +2,15 @@ version: '3'
|
||||
|
||||
services:
|
||||
php:
|
||||
container_name: "dooteak-php-${DOCKER_ID}"
|
||||
image: "kuaifan/dootaskphp:8.0"
|
||||
container_name: "dootask-php-${APP_ID}"
|
||||
image: "kuaifan/php:swoole-8.0"
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
- ./docker/crontab/crontab.conf:/etc/supervisor/conf.d/crontab.conf
|
||||
- ./docker/dns/dns.conf:/etc/supervisor/conf.d/dns.conf
|
||||
- ./docker/php/php.conf:/etc/supervisor/conf.d/php.conf
|
||||
- ./docker/php/php.ini:/usr/local/etc/php/php.ini
|
||||
- ./docker/log/supervisor:/var/log/supervisor
|
||||
- ./:/var/www
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
environment:
|
||||
TZ: "Asia/Shanghai"
|
||||
LANG: "C.UTF-8"
|
||||
@@ -24,63 +22,64 @@ services:
|
||||
MYSQL_PASSWORD: "${DB_PASSWORD}"
|
||||
networks:
|
||||
extnetwork:
|
||||
ipv4_address: 10.22.22.2
|
||||
ipv4_address: "${APP_IPPR}.2"
|
||||
depends_on:
|
||||
- redis
|
||||
- mariadb
|
||||
restart: unless-stopped
|
||||
|
||||
nginx:
|
||||
container_name: "dooteak-nginx-${DOCKER_ID}"
|
||||
container_name: "dootask-nginx-${APP_ID}"
|
||||
image: "nginx:alpine"
|
||||
ports:
|
||||
- "${APP_PORT}:80"
|
||||
- "${APP_PORT_SSL}:443"
|
||||
volumes:
|
||||
- ./docker/nginx:/etc/nginx/conf.d
|
||||
- ./public:/var/www/public
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
environment:
|
||||
TZ: "Asia/Shanghai"
|
||||
networks:
|
||||
extnetwork:
|
||||
ipv4_address: 10.22.22.3
|
||||
depends_on:
|
||||
ipv4_address: "${APP_IPPR}.3"
|
||||
links:
|
||||
- php
|
||||
- office
|
||||
- fileview
|
||||
restart: unless-stopped
|
||||
|
||||
redis:
|
||||
container_name: "dooteak-redis-${DOCKER_ID}"
|
||||
container_name: "dootask-redis-${APP_ID}"
|
||||
image: "redis:alpine"
|
||||
environment:
|
||||
TZ: "Asia/Shanghai"
|
||||
networks:
|
||||
extnetwork:
|
||||
ipv4_address: 10.22.22.4
|
||||
ipv4_address: "${APP_IPPR}.4"
|
||||
restart: unless-stopped
|
||||
|
||||
mariadb:
|
||||
container_name: "dooteak-mariadb-${DOCKER_ID}"
|
||||
container_name: "dootask-mariadb-${APP_ID}"
|
||||
image: "mariadb"
|
||||
ports: # mysql ports item
|
||||
- "33062:3306" # mysql ports value
|
||||
volumes:
|
||||
- ./docker/mysql/repassword.sh:/etc/mysql/repassword.sh
|
||||
- ./docker/mysql/conf.d:/etc/mysql/conf.d
|
||||
- ./docker/mysql/data:/var/lib/mysql
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
environment:
|
||||
TZ: "Asia/Shanghai"
|
||||
MYSQL_PREFIX: "${DB_PREFIX}"
|
||||
MYSQL_ROOT_PASSWORD: "${DB_ROOT_PASSWORD}"
|
||||
MYSQL_DATABASE: "${DB_DATABASE}"
|
||||
MYSQL_USER: "${DB_USERNAME}"
|
||||
MYSQL_PASSWORD: "${DB_PASSWORD}"
|
||||
networks:
|
||||
extnetwork:
|
||||
ipv4_address: 10.22.22.5
|
||||
ipv4_address: "${APP_IPPR}.5"
|
||||
restart: unless-stopped
|
||||
|
||||
office:
|
||||
container_name: "dooteak-office-${DOCKER_ID}"
|
||||
container_name: "dootask-office-${APP_ID}"
|
||||
image: "onlyoffice/documentserver:6.3.1.32"
|
||||
volumes:
|
||||
- ./docker/office/data:/var/www/onlyoffice/Data
|
||||
@@ -92,13 +91,24 @@ services:
|
||||
TZ: "Asia/Shanghai"
|
||||
networks:
|
||||
extnetwork:
|
||||
ipv4_address: 10.22.22.6
|
||||
ipv4_address: "${APP_IPPR}.6"
|
||||
restart: unless-stopped
|
||||
|
||||
fileview:
|
||||
container_name: "dootask-fileview-${APP_ID}"
|
||||
image: "kuaifan/fileview:4.1.0-SNAPSHOT"
|
||||
environment:
|
||||
TZ: "Asia/Shanghai"
|
||||
KK_CONTEXT_PATH: "/fileview"
|
||||
networks:
|
||||
extnetwork:
|
||||
ipv4_address: "${APP_IPPR}.7"
|
||||
restart: unless-stopped
|
||||
|
||||
networks:
|
||||
extnetwork:
|
||||
name: "dooteak-networks-${DOCKER_ID}"
|
||||
name: "dootask-networks-${APP_ID}"
|
||||
ipam:
|
||||
config:
|
||||
- subnet: 10.22.22.0/24
|
||||
gateway: 10.22.22.1
|
||||
- subnet: "${APP_IPPR}.0/24"
|
||||
gateway: "${APP_IPPR}.1"
|
||||
|
||||
1
docker/mysql/.gitignore
vendored
@@ -1,2 +1,3 @@
|
||||
data
|
||||
backup
|
||||
bak
|
||||
|
||||
27
docker/mysql/repassword.sh
Normal file
@@ -0,0 +1,27 @@
|
||||
#!/bin/sh
|
||||
|
||||
new_password=$1
|
||||
|
||||
GreenBG="\033[42;37m"
|
||||
Font="\033[0m"
|
||||
|
||||
new_encrypt=$(date +%s%N | md5sum | awk '{print $1}' | cut -c 1-6)
|
||||
if [ -z "$new_password" ]; then
|
||||
new_password=$(date +%s%N | md5sum | awk '{print $1}' | cut -c 1-16)
|
||||
fi
|
||||
md5_password=$(echo -n `echo -n $new_password | md5sum | awk '{print $1}'`$new_encrypt | md5sum | awk '{print $1}')
|
||||
|
||||
content=$(echo "select \`email\` from ${MYSQL_PREFIX}users where \`userid\`=1;" | mysql -u$MYSQL_USER -p$MYSQL_PASSWORD $MYSQL_DATABASE)
|
||||
account=$(echo "$content" | sed -n '2p')
|
||||
|
||||
if [ -z "$account" ]; then
|
||||
echo "错误:账号不存在!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
mysql -u$MYSQL_USER -p$MYSQL_PASSWORD $MYSQL_DATABASE <<EOF
|
||||
update ${MYSQL_PREFIX}users set \`encrypt\`='${new_encrypt}',\`password\`='${md5_password}' where \`userid\`=1;
|
||||
EOF
|
||||
|
||||
echo "账号: ${GreenBG}${account}${Font}"
|
||||
echo "密码: ${GreenBG}${new_password}${Font}"
|
||||
@@ -2,12 +2,28 @@ map $http_upgrade $connection_upgrade {
|
||||
default upgrade;
|
||||
'' close;
|
||||
}
|
||||
map $http_host $this_host {
|
||||
"" $host;
|
||||
default $http_host;
|
||||
}
|
||||
map $http_x_forwarded_proto $the_scheme {
|
||||
default $http_x_forwarded_proto;
|
||||
"" $scheme;
|
||||
}
|
||||
map $http_x_forwarded_host $the_host {
|
||||
default $http_x_forwarded_host;
|
||||
"" $this_host;
|
||||
}
|
||||
upstream service {
|
||||
server 10.22.22.2:20000 weight=5 max_fails=3 fail_timeout=30s;
|
||||
server php:20000 weight=5 max_fails=3 fail_timeout=30s;
|
||||
keepalive 16;
|
||||
}
|
||||
upstream office {
|
||||
server 10.22.22.6 weight=5 max_fails=3 fail_timeout=30s;
|
||||
server office weight=5 max_fails=3 fail_timeout=30s;
|
||||
keepalive 16;
|
||||
}
|
||||
upstream fileview {
|
||||
server fileview:8012 weight=5 max_fails=3 fail_timeout=30s;
|
||||
keepalive 16;
|
||||
}
|
||||
server {
|
||||
@@ -32,26 +48,12 @@ server {
|
||||
allow all;
|
||||
}
|
||||
|
||||
location ~* ^/(6.3.1-32|cache/files|web-apps/apps)/ {
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Real-PORT $remote_port;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header Scheme $scheme;
|
||||
proxy_set_header Server-Protocol $server_protocol;
|
||||
proxy_set_header Server-Name $server_name;
|
||||
proxy_set_header Server-Addr $server_addr;
|
||||
proxy_set_header Server-Port $server_port;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection $connection_upgrade;
|
||||
proxy_pass http://office;
|
||||
}
|
||||
|
||||
location =/ws {
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Real-PORT $remote_port;
|
||||
proxy_set_header X-Forwarded-Host $the_host;
|
||||
proxy_set_header X-Forwarded-Proto $the_scheme;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header Scheme $scheme;
|
||||
@@ -69,6 +71,8 @@ server {
|
||||
proxy_set_header Connection "";
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Real-PORT $remote_port;
|
||||
proxy_set_header X-Forwarded-Host $the_host;
|
||||
proxy_set_header X-Forwarded-Proto $the_scheme;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header Scheme $scheme;
|
||||
@@ -78,6 +82,41 @@ server {
|
||||
proxy_set_header Server-Port $server_port;
|
||||
proxy_pass http://service;
|
||||
}
|
||||
|
||||
location /office/ {
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Real-PORT $remote_port;
|
||||
proxy_set_header X-Forwarded-Host $the_host/office;
|
||||
proxy_set_header X-Forwarded-Proto $the_scheme;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header Scheme $scheme;
|
||||
proxy_set_header Server-Protocol $server_protocol;
|
||||
proxy_set_header Server-Name $server_name;
|
||||
proxy_set_header Server-Addr $server_addr;
|
||||
proxy_set_header Server-Port $server_port;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection $connection_upgrade;
|
||||
proxy_pass http://office/;
|
||||
}
|
||||
|
||||
location /fileview {
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Connection "";
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Real-PORT $remote_port;
|
||||
proxy_set_header X-Forwarded-Host $the_host;
|
||||
proxy_set_header X-Forwarded-Proto $the_scheme;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header Scheme $scheme;
|
||||
proxy_set_header Server-Protocol $server_protocol;
|
||||
proxy_set_header Server-Name $server_name;
|
||||
proxy_set_header Server-Addr $server_addr;
|
||||
proxy_set_header Server-Port $server_port;
|
||||
proxy_pass http://fileview;
|
||||
}
|
||||
}
|
||||
|
||||
include /etc/nginx/conf.d/conf.d/*.conf;
|
||||
|
||||
2
docker/office/.gitignore
vendored
@@ -1,2 +0,0 @@
|
||||
data
|
||||
logs
|
||||
1
docker/office/data/.gitignore
vendored
Executable file
@@ -0,0 +1 @@
|
||||
*/
|
||||
1
docker/office/logs/.gitignore
vendored
Executable file
@@ -0,0 +1 @@
|
||||
*/
|
||||
@@ -1,55 +0,0 @@
|
||||
FROM --platform=$TARGETPLATFORM phpswoole/swoole:php8.0
|
||||
|
||||
# Installation dependencies and PHP core extensions
|
||||
RUN apt-get update \
|
||||
&& apt-get -y install --no-install-recommends --assume-yes \
|
||||
libpng-dev \
|
||||
libzip-dev \
|
||||
libzip4 \
|
||||
zip \
|
||||
unzip \
|
||||
git \
|
||||
net-tools \
|
||||
iputils-ping \
|
||||
vim \
|
||||
supervisor \
|
||||
sudo \
|
||||
curl \
|
||||
dirmngr \
|
||||
apt-transport-https \
|
||||
lsb-release \
|
||||
ca-certificates \
|
||||
libjpeg-dev \
|
||||
libfreetype6-dev \
|
||||
inotify-tools \
|
||||
sshpass \
|
||||
cron
|
||||
|
||||
RUN curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash - \
|
||||
&& apt-get -y install nodejs
|
||||
|
||||
RUN docker-php-ext-configure gd --with-freetype --with-jpeg \
|
||||
&& docker-php-ext-install pdo_mysql gd pcntl zip
|
||||
|
||||
RUN mkdir -p /usr/src/php/ext/redis \
|
||||
&& curl -L https://github.com/phpredis/phpredis/archive/5.3.2.tar.gz | tar xvz -C /usr/src/php/ext/redis --strip 1 \
|
||||
&& echo 'redis' >> /usr/src/php-available-exts \
|
||||
&& docker-php-ext-install redis
|
||||
|
||||
RUN echo "deb http://deb.debian.org/debian buster-backports main" >> /etc/apt/sources.list \
|
||||
&& echo "deb http://ppa.launchpad.net/ansible/ansible/ubuntu trusty main" >> /etc/apt/sources.list \
|
||||
&& apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 93C4A3FD7BB9C367 \
|
||||
&& apt-get update \
|
||||
&& apt-get install -y wireguard openresolv ansible openssh-client
|
||||
|
||||
RUN echo "* * * * * sh /var/www/docker/crontab/crontab.sh" > /tmp/crontab \
|
||||
&& crontab /tmp/crontab \
|
||||
&& rm -rf /tmp/crontab
|
||||
|
||||
RUN rm -r /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /var/www
|
||||
|
||||
# docker buildx create --use
|
||||
# docker buildx build --platform linux/arm64,linux/amd64 -t kuaifan/dootaskphp:8.0 --push -f ./php.Dockerfile .
|
||||
# 需要 docker login 到 docker hub, 用户名 (docker id): kuaifan
|
||||
1
electron/.gitignore
vendored
@@ -2,6 +2,7 @@ node_modules/
|
||||
public/
|
||||
package-lock.json
|
||||
|
||||
build/
|
||||
dist/
|
||||
|
||||
.devload
|
||||
|
||||
29
electron/build.js
vendored
@@ -1,4 +1,5 @@
|
||||
const fs = require('fs');
|
||||
const fse = require('fs-extra')
|
||||
const path = require('path')
|
||||
const inquirer = require('inquirer');
|
||||
const child_process = require('child_process');
|
||||
@@ -72,11 +73,21 @@ function formatUrl(str) {
|
||||
return url;
|
||||
}
|
||||
|
||||
/**
|
||||
* 正则提取域名
|
||||
* @param weburl
|
||||
* @returns {string|string}
|
||||
*/
|
||||
function getDomain(weburl) {
|
||||
let urlReg = /http(s)?:\/\/([^\/]+)/i;
|
||||
let domain = weburl.match(urlReg);
|
||||
return ((domain != null && domain.length > 0) ? domain[2] : "");
|
||||
}
|
||||
|
||||
/**
|
||||
* 右边是否包含
|
||||
* @param string
|
||||
* @param find
|
||||
* @param lower
|
||||
* @returns {boolean}
|
||||
*/
|
||||
function rightExists(string, find) {
|
||||
@@ -157,7 +168,21 @@ if (argv[2] === "--build") {
|
||||
//
|
||||
child_process.spawnSync("mix", ["--production", "--", "--env", "--electron"], {stdio: "inherit"});
|
||||
answers.platform.forEach(arg => {
|
||||
child_process.spawn("npm", ["run", arg], {stdio: "inherit", cwd: "electron"});
|
||||
child_process.spawnSync("npm", ["run", arg], {stdio: "inherit", cwd: "electron"});
|
||||
let name = ""
|
||||
if (arg == "build-mac-intel") {
|
||||
name = config.name + "-" + config.version + ".dmg"
|
||||
} else if (arg == "build-mac-m1") {
|
||||
name = config.name + "-" + config.version + "-arm64.dmg"
|
||||
} else if (arg == "build-win") {
|
||||
name = config.name + " Setup " + config.version + ".exe"
|
||||
}
|
||||
if (name != "") {
|
||||
fse.copySync(
|
||||
path.resolve(__dirname, "dist", name),
|
||||
path.resolve(__dirname, "build", getDomain(answers.targetUrl), config.version, name)
|
||||
)
|
||||
}
|
||||
})
|
||||
});
|
||||
} else {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "DooTask",
|
||||
"version": "0.3.29",
|
||||
"version": "0.3.89",
|
||||
"description": "DooTask is task management system.",
|
||||
"main": "main.js",
|
||||
"license": "MIT",
|
||||
@@ -21,13 +21,14 @@
|
||||
"@electron-forge/maker-rpm": "^6.0.0-beta.61",
|
||||
"@electron-forge/maker-squirrel": "^6.0.0-beta.61",
|
||||
"@electron-forge/maker-zip": "^6.0.0-beta.61",
|
||||
"dmg-license": "^1.0.9",
|
||||
"dmg-license": "^1.0.10",
|
||||
"dotenv": "^10.0.0",
|
||||
"electron": "^15.0.0",
|
||||
"electron-builder": "^22.11.7"
|
||||
"electron": "^16.0.4",
|
||||
"electron-builder": "^22.14.5"
|
||||
},
|
||||
"dependencies": {
|
||||
"electron-squirrel-startup": "^1.0.0",
|
||||
"fs-extra": "^10.0.0",
|
||||
"xlsx": "^0.17.2"
|
||||
},
|
||||
"build": {
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
{
|
||||
"name": "DooTask",
|
||||
"version": "0.3.29",
|
||||
"version": "0.3.89",
|
||||
"description": "DooTask is task management system.",
|
||||
"scripts": {
|
||||
"start": "./cmd dev",
|
||||
"build": "./cmd prod",
|
||||
"electron-start": "node ./electron/build.js",
|
||||
"electron-build": "node ./electron/build.js --build",
|
||||
"version": "node ./version.js"
|
||||
},
|
||||
"devDependencies": {
|
||||
@@ -36,7 +34,7 @@
|
||||
"stylus-loader": "^3.0.2",
|
||||
"tinymce": "^5.8.1",
|
||||
"tui-calendar-hi": "^1.13.0-5",
|
||||
"view-design-hi": "^4.6.1-9",
|
||||
"view-design-hi": "^4.6.1-11",
|
||||
"vue": "^2.6.12",
|
||||
"vue-clipboard2": "^0.3.1",
|
||||
"vue-emoji-picker": "^1.0.1",
|
||||
|
||||
10381
public/css/app.css
vendored
2608
public/docs/api_data.js
vendored
19
public/docs/api_project.js
vendored
@@ -1,19 +0,0 @@
|
||||
define({
|
||||
"name": "API",
|
||||
"version": "1.0.0",
|
||||
"description": "APP接口文档",
|
||||
"title": "APP接口",
|
||||
"url": "https://你的域名/",
|
||||
"template": {
|
||||
"withGenerator": false
|
||||
},
|
||||
"sampleUrl": false,
|
||||
"defaultVersion": "0.0.0",
|
||||
"apidoc": "0.3.0",
|
||||
"generator": {
|
||||
"name": "apidoc",
|
||||
"time": "2021-08-29T03:25:22.530Z",
|
||||
"url": "https://apidocjs.com",
|
||||
"version": "0.25.0"
|
||||
}
|
||||
});
|
||||
@@ -1,19 +0,0 @@
|
||||
{
|
||||
"name": "API",
|
||||
"version": "1.0.0",
|
||||
"description": "APP接口文档",
|
||||
"title": "APP接口",
|
||||
"url": "https://你的域名/",
|
||||
"template": {
|
||||
"withGenerator": false
|
||||
},
|
||||
"sampleUrl": false,
|
||||
"defaultVersion": "0.0.0",
|
||||
"apidoc": "0.3.0",
|
||||
"generator": {
|
||||
"name": "apidoc",
|
||||
"time": "2021-08-29T03:25:22.530Z",
|
||||
"url": "https://apidocjs.com",
|
||||
"version": "0.25.0"
|
||||
}
|
||||
}
|
||||
BIN
public/docs/assets/android-chrome-192x192.png
Normal file
|
After Width: | Height: | Size: 7.5 KiB |
BIN
public/docs/assets/android-chrome-512x512.png
Normal file
|
After Width: | Height: | Size: 28 KiB |
BIN
public/docs/assets/apple-touch-icon.png
Normal file
|
After Width: | Height: | Size: 8.6 KiB |
1
public/docs/assets/bootstrap.min.css.map
Normal file
BIN
public/docs/assets/favicon-16x16.png
Normal file
|
After Width: | Height: | Size: 566 B |
BIN
public/docs/assets/favicon-32x32.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
public/docs/assets/favicon.ico
Normal file
|
After Width: | Height: | Size: 24 KiB |
@@ -285,4 +285,4 @@
|
||||
<glyph unicode="🔑" d="M250 1200h600q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-150v-500l-255 -178q-19 -9 -32 -1t-13 29v650h-150q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5zM400 1100v-100h300v100h-300z" />
|
||||
<glyph unicode="🚪" d="M250 1200h750q39 0 69.5 -40.5t30.5 -84.5v-933l-700 -117v950l600 125h-700v-1000h-100v1025q0 23 15.5 49t34.5 26zM500 525v-100l100 20v100z" />
|
||||
</font>
|
||||
</defs></svg>
|
||||
</defs></svg>
|
||||
|
Before Width: | Height: | Size: 106 KiB After Width: | Height: | Size: 106 KiB |
111
public/docs/assets/main.bundle.js
vendored
Normal file
@@ -1,110 +1,86 @@
|
||||
/**
|
||||
* apidoc main css file
|
||||
*/
|
||||
|
||||
/**
|
||||
* Define colors
|
||||
*/
|
||||
:root {
|
||||
--primary: #0088cc;
|
||||
--white: #fff;
|
||||
--light-gray: #ccc;
|
||||
--main-gray: #777;
|
||||
--dark-gray: #2d2d2d;
|
||||
--hover-gray: #666;
|
||||
--meth-get: green;
|
||||
--meth-put: #e5c500;
|
||||
--meth-post: #4070ec;
|
||||
--meth-delete: #ed0039;
|
||||
--red: #dc3545;
|
||||
}
|
||||
|
||||
.color-primary {
|
||||
color: var(--primary);
|
||||
}
|
||||
|
||||
.bg-primary {
|
||||
background-color: var(--primary);
|
||||
}
|
||||
|
||||
.bg-red {
|
||||
color: var(--white);
|
||||
background-color: var(--red);
|
||||
}
|
||||
|
||||
.border-danger {
|
||||
border: 1px solid var(--red);
|
||||
}
|
||||
|
||||
/** for some reason the iOS safari style is applied on date inputs */
|
||||
input[type="date"] {
|
||||
line-height: 1.4 !important;
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------------------------------------
|
||||
* Content
|
||||
* ------------------------------------------------------------------------------------------ */
|
||||
@font-face {
|
||||
font-family: 'Glyphicons Halflings';
|
||||
src: url('./glyphicons-halflings-regular.eot');
|
||||
src: url('./glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'),
|
||||
url('./glyphicons-halflings-regular.woff') format('woff'),
|
||||
url('./glyphicons-halflings-regular.ttf') format('truetype'),
|
||||
url('./glyphicons-halflings-regular.svg#glyphicons-halflingsregular') format('svg');
|
||||
}
|
||||
|
||||
body {
|
||||
max-width: 1280px;
|
||||
}
|
||||
|
||||
body, p, a, div, th, td {
|
||||
font-family: "Source Sans Pro", sans-serif;
|
||||
font-weight: 400;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
@media (min-width: 1200px) {
|
||||
body.container-fluid {
|
||||
padding-right: 0px;
|
||||
padding-left: 0px;
|
||||
margin-right: 0px;
|
||||
margin-left: 0px;
|
||||
}
|
||||
}
|
||||
|
||||
td.code {
|
||||
font-size: 14px;
|
||||
font-family: "Source Code Pro", monospace;
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
a:focus {
|
||||
background-color: var(--primary);
|
||||
}
|
||||
|
||||
#content {
|
||||
padding-top: 16px;
|
||||
z-Index: -1;
|
||||
margin-left: 270px;
|
||||
margin-top: 10px;
|
||||
margin-left: 20%;
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
p {
|
||||
color: #808080;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-family: "Source Sans Pro Semibold", sans-serif;
|
||||
font-weight: normal;
|
||||
font-size: 44px;
|
||||
line-height: 50px;
|
||||
margin: 0 0 10px 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-family: "Source Sans Pro", sans-serif;
|
||||
font-weight: normal;
|
||||
font-size: 24px;
|
||||
line-height: 40px;
|
||||
margin: 0 0 20px 0;
|
||||
padding: 0;
|
||||
font-size: 130%;
|
||||
color: var(--main-gray);
|
||||
}
|
||||
|
||||
section {
|
||||
border-top: 1px solid #ebebeb;
|
||||
padding: 30px 0;
|
||||
}
|
||||
|
||||
section h1 {
|
||||
font-family: "Source Sans Pro", sans-serif;
|
||||
font-weight: 700;
|
||||
font-size: 32px;
|
||||
line-height: 40px;
|
||||
padding-bottom: 14px;
|
||||
margin: 0 0 20px 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
article {
|
||||
border-top: 1px solid var(--light-gray);
|
||||
padding: 14px 0 30px 0;
|
||||
}
|
||||
|
||||
article h1 {
|
||||
font-family: "Source Sans Pro Bold", sans-serif;
|
||||
font-weight: 600;
|
||||
font-size: 24px;
|
||||
line-height: 26px;
|
||||
}
|
||||
|
||||
article h2 {
|
||||
font-family: "Source Sans Pro", sans-serif;
|
||||
font-weight: 600;
|
||||
font-size: 18px;
|
||||
line-height: 24px;
|
||||
margin: 0 0 10px 0;
|
||||
}
|
||||
|
||||
article h3 {
|
||||
font-family: "Source Sans Pro", sans-serif;
|
||||
font-weight: 600;
|
||||
font-size: 16px;
|
||||
line-height: 18px;
|
||||
margin: 0 0 10px 0;
|
||||
}
|
||||
|
||||
article h4 {
|
||||
font-family: "Source Sans Pro", sans-serif;
|
||||
font-weight: 600;
|
||||
font-size: 14px;
|
||||
line-height: 16px;
|
||||
margin: 0 0 8px 0;
|
||||
}
|
||||
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
@@ -112,30 +88,41 @@ table {
|
||||
}
|
||||
|
||||
th {
|
||||
background-color: #f5f5f5;
|
||||
background-color: var(--main-gray);
|
||||
color: var(--white);
|
||||
text-align: left;
|
||||
font-family: "Source Sans Pro", sans-serif;
|
||||
font-weight: 700;
|
||||
padding: 4px 8px;
|
||||
border: #e0e0e0 1px solid;
|
||||
padding: 5px 8px;
|
||||
border: 1px solid var(--main-gray);
|
||||
}
|
||||
|
||||
td {
|
||||
vertical-align: top;
|
||||
padding: 10px 8px 0 8px;
|
||||
border: #e0e0e0 1px solid;
|
||||
padding: 5px;
|
||||
border: 1px solid var(--main-gray);
|
||||
}
|
||||
|
||||
#generator .content {
|
||||
color: #b0b0b0;
|
||||
border-top: 1px solid #ebebeb;
|
||||
padding: 10px 0;
|
||||
td.code {
|
||||
font-family: "Source Code Pro", monospace;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.label-optional {
|
||||
.label {
|
||||
float: right;
|
||||
background-color: grey;
|
||||
margin-top: 4px;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.label.optional {
|
||||
background-color: grey;
|
||||
}
|
||||
|
||||
.label.required {
|
||||
background-color: var(--red);
|
||||
}
|
||||
|
||||
.default-value,
|
||||
.type-size {
|
||||
font-style: italic;
|
||||
font-size: 95%;
|
||||
}
|
||||
|
||||
.open-left {
|
||||
@@ -143,38 +130,39 @@ td {
|
||||
left: auto;
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------------------------------------
|
||||
* apidoc - intro
|
||||
* ------------------------------------------------------------------------------------------ */
|
||||
|
||||
#apidoc .apidoc {
|
||||
border-top: 1px solid #ebebeb;
|
||||
padding: 30px 0;
|
||||
.invisible {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
#apidoc h1 {
|
||||
font-family: "Source Sans Pro", sans-serif;
|
||||
font-weight: 700;
|
||||
font-size: 32px;
|
||||
line-height: 40px;
|
||||
padding-bottom: 14px;
|
||||
margin: 0 0 20px 0;
|
||||
padding: 0;
|
||||
.input-group-addon.sample-request-select {
|
||||
padding: 0 6px;
|
||||
}
|
||||
|
||||
#apidoc h2 {
|
||||
font-family: "Source Sans Pro Bold", sans-serif;
|
||||
font-weight: 600;
|
||||
font-size: 22px;
|
||||
line-height: 26px;
|
||||
padding-top: 14px;
|
||||
.input-group-addon.sample-request-select select {
|
||||
width: auto;
|
||||
height: 32px;
|
||||
}
|
||||
|
||||
.sample-request-input-Boolean-container {
|
||||
width: 40px;
|
||||
height: 34px;
|
||||
background: var(--white);
|
||||
border: 1px solid var(--light-gray);
|
||||
}
|
||||
|
||||
.sample-request-input-Boolean-container > div {
|
||||
margin-top: 7px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.sample-request-input-Boolean-container > div input {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------------------------------------
|
||||
* Request type
|
||||
* Request method (HTTP verb)
|
||||
* ------------------------------------------------------------------------------------------ */
|
||||
.type {
|
||||
font-family: "Source Sans Pro", sans-serif;
|
||||
.method {
|
||||
font-weight: 600;
|
||||
font-size: 15px;
|
||||
display: inline-block;
|
||||
@@ -182,57 +170,50 @@ td {
|
||||
padding: 4px 5px;
|
||||
border-radius: 6px;
|
||||
text-transform: uppercase;
|
||||
background-color: #3387CC;
|
||||
color: #ffffff;
|
||||
background-color: var(--main-gray);
|
||||
color: var(--white);
|
||||
}
|
||||
|
||||
.type__get {
|
||||
background-color: green;
|
||||
.meth-get {
|
||||
background-color: var(--meth-get);
|
||||
}
|
||||
|
||||
.type__put {
|
||||
background-color: #e5c500;
|
||||
.meth-put {
|
||||
background-color: var(--meth-put);
|
||||
}
|
||||
|
||||
.type__post {
|
||||
background-color: #4070ec;
|
||||
.meth-post {
|
||||
background-color: var(--meth-post);
|
||||
}
|
||||
|
||||
.type__delete {
|
||||
background-color: #ed0039;
|
||||
.meth-delete {
|
||||
background-color: var(--meth-delete);
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------------------------------------
|
||||
* Sidenav
|
||||
* ------------------------------------------------------------------------------------------ */
|
||||
.sidenav {
|
||||
width: 228px;
|
||||
margin: 0;
|
||||
padding: 0 20px 20px 20px;
|
||||
color: var(--white);
|
||||
width: 20%;
|
||||
position: fixed;
|
||||
top: 50px;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
background-color: #f5f5f5;
|
||||
z-index: 10;
|
||||
background-color: var(--dark-gray);
|
||||
}
|
||||
|
||||
.sidenav > li > a {
|
||||
color: var(--white);
|
||||
display: block;
|
||||
width: 192px;
|
||||
margin: 0;
|
||||
padding: 2px 11px;
|
||||
border: 0;
|
||||
border-left: transparent 4px solid;
|
||||
border-right: transparent 4px solid;
|
||||
font-family: "Source Sans Pro", sans-serif;
|
||||
font-weight: 400;
|
||||
font-size: 14px;
|
||||
overflow: hidden;
|
||||
text-overflow:ellipsis;
|
||||
white-space: nowrap;
|
||||
padding: 8px 13px;
|
||||
}
|
||||
|
||||
/* non active sidenav link are highlighted on hover */
|
||||
.sidenav > li:not(.active) > a:hover {
|
||||
background-color: var(--hover-gray);
|
||||
}
|
||||
|
||||
.sidenav > li.nav-header {
|
||||
@@ -242,39 +223,42 @@ td {
|
||||
|
||||
.sidenav > li.nav-header > a {
|
||||
padding: 5px 15px;
|
||||
border: 1px solid #e5e5e5;
|
||||
width: 190px;
|
||||
font-family: "Source Sans Pro", sans-serif;
|
||||
font-weight: 700;
|
||||
font-size: 16px;
|
||||
background-color: #ffffff;
|
||||
background-color: var(--main-gray);
|
||||
}
|
||||
|
||||
|
||||
.sidenav > li.active > a {
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
background-color: #0088cc;
|
||||
color: #ffffff;
|
||||
position: relative;
|
||||
background-color: var(--primary);
|
||||
color: var(--white);
|
||||
}
|
||||
|
||||
/**
|
||||
* TODO: commented out for the moment
|
||||
.sidenav > li.has-modifications a {
|
||||
border-right: #60d060 4px solid;
|
||||
border-right: 4px solid var(--main-gray);
|
||||
}
|
||||
|
||||
.nav-list-item :not(.is-new) {
|
||||
border-left: 4px solid var(--main-gray);
|
||||
}
|
||||
|
||||
.sidenav > li.is-new a {
|
||||
border-left: #e5e5e5 4px solid;
|
||||
border-left: 4px solid var(--primary);
|
||||
}
|
||||
*/
|
||||
|
||||
/* ------------------------------------------------------------------------------------------
|
||||
* Side nav search
|
||||
* ------------------------------------------------------------------------------------------ */
|
||||
.sidenav-search {
|
||||
width: 228px;
|
||||
width: 20%;
|
||||
left: 0px;
|
||||
position: fixed;
|
||||
padding: 16px 20px 10px 20px;
|
||||
background-color: #F5F5F5;
|
||||
z-index: 11;
|
||||
background-color: var(--dark-gray);
|
||||
}
|
||||
|
||||
.sidenav-search .search {
|
||||
@@ -480,11 +464,18 @@ ul.nav-tabs {
|
||||
}
|
||||
|
||||
p.deprecated span{
|
||||
color: #ff0000;
|
||||
color: var(--red);
|
||||
font-weight: bold;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
/**
|
||||
* Footer
|
||||
*/
|
||||
#generator {
|
||||
padding: 10px 0;
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------------------------------------
|
||||
* Print
|
||||
* ------------------------------------------------------------------------------------------ */
|
||||
@@ -1,5 +1,3 @@
|
||||
/* PrismJS 1.21.0
|
||||
https://prismjs.com/download.html#themes=prism-tomorrow&languages=clike+javascript+bash+c+csharp+cpp+clojure+elixir+erlang+go+http+json+json5+jsonp+lua+perl+python+rust */
|
||||
/**
|
||||
* prism.js tomorrow night eighties for JavaScript, CoffeeScript, CSS and HTML
|
||||
* Based on https://github.com/chriskempson/tomorrow-theme
|
||||
@@ -11,7 +9,7 @@ pre[class*="language-"] {
|
||||
color: #ccc;
|
||||
background: none;
|
||||
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
|
||||
font-size: 0.9em;
|
||||
font-size: 1em;
|
||||
text-align: left;
|
||||
white-space: pre;
|
||||
word-spacing: normal;
|
||||
@@ -122,4 +120,3 @@ pre[class*="language-"] {
|
||||
.token.inserted {
|
||||
color: green;
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 894 B |
@@ -1,22 +1,26 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<title>Loading...</title>
|
||||
<title>APP接口</title>
|
||||
<meta name="description" content="APP接口文档">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<link href="vendor/bootstrap.min.css" rel="stylesheet" media="screen">
|
||||
<link href="vendor/prism.css" rel="stylesheet" />
|
||||
<link href="css/style.css" rel="stylesheet" media="screen, print">
|
||||
<link href="img/favicon.ico" rel="icon" type="image/x-icon">
|
||||
<script src="vendor/polyfill.js"></script>
|
||||
<link href="assets/bootstrap.min.css" rel="stylesheet" media="screen">
|
||||
<link href="assets/prism.css" rel="stylesheet" />
|
||||
<link href="assets/main.css" rel="stylesheet" media="screen, print">
|
||||
<link href="assets/favicon.ico" rel="icon" type="image/x-icon">
|
||||
<link href="assets/apple-touch-icon.png" rel="apple-touch-icon" sizes="180x180">
|
||||
<link href="assets/favicon-32x32.png" rel="icon" type="image/png" sizes="32x32">
|
||||
<link href="assets/favicon-16x16.png"rel="icon" type="image/png" sizes="16x16">
|
||||
</head>
|
||||
|
||||
<body class="container-fluid">
|
||||
|
||||
<!-- SIDENAV -->
|
||||
<script id="template-sidenav" type="text/x-handlebars-template">
|
||||
<nav id="scrollingNav">
|
||||
<div class="sidenav-search">
|
||||
<input class="form-control search" type="text" placeholder="{{__ "Filter..."}}">
|
||||
<input class="form-control search" data-action='filter-search' type="text" placeholder="{{__ "Filter..."}}">
|
||||
<span class="search-reset">x</span>
|
||||
</div>
|
||||
<ul class="sidenav nav nav-list list">
|
||||
@@ -39,6 +43,7 @@
|
||||
</nav>
|
||||
</script>
|
||||
|
||||
<!-- PROJECT -->
|
||||
<script id="template-project" type="text/x-handlebars-template">
|
||||
<div class="pull-left">
|
||||
<h1>{{name}}</h1>
|
||||
@@ -70,7 +75,7 @@
|
||||
|
||||
<script id="template-header" type="text/x-handlebars-template">
|
||||
{{#if content}}
|
||||
<div id="api-_" class="show-api-article show-api-_-article">{{{content}}}</div>
|
||||
<div id="api-_header" class="show-api-article show-api-_-article">{{{content}}}</div>
|
||||
{{/if}}
|
||||
</script>
|
||||
|
||||
@@ -83,8 +88,10 @@
|
||||
<script id="template-generator" type="text/x-handlebars-template">
|
||||
{{#if template.withGenerator}}
|
||||
{{#if generator}}
|
||||
<div class="content">
|
||||
{{__ "Generated with"}} <a href="{{{generator.url}}}">{{{generator.name}}}</a> {{{generator.version}}} - {{{generator.time}}}
|
||||
<div>
|
||||
<p class="text-muted">
|
||||
{{__ "Generated with"}} <a href="{{{generator.url}}}">{{{generator.name}}}</a> {{{generator.version}}} - {{{generator.time}}}
|
||||
</p>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
@@ -92,7 +99,7 @@
|
||||
|
||||
<script id="template-sections" type="text/x-handlebars-template">
|
||||
<section id="api-{{group}}" class="show-api-group show-api-{{group}}-group {{#if aloneDisplay}} hide{{/if}}">
|
||||
<h1>{{underscoreToSpace title}}</h1>
|
||||
<h1 class="color-primary font-weight-bold">{{underscoreToSpace title}}</h1>
|
||||
{{#if description}}
|
||||
<p>{{{nl2br description}}}</p>
|
||||
{{/if}}
|
||||
@@ -107,7 +114,7 @@
|
||||
<script id="template-article" type="text/x-handlebars-template">
|
||||
<article id="api-{{article.group}}-{{article.name}}-{{article.version}}" {{#if hidden}}class="hide"{{/if}} data-group="{{article.group}}" data-name="{{article.name}}" data-version="{{article.version}}">
|
||||
<div class="pull-left">
|
||||
<h1>{{underscoreToSpace article.groupTitle}}{{#if article.title}} - {{article.title}}{{/if}}</h1>
|
||||
<h1><span class="color-primary">{{underscoreToSpace article.groupTitle}}</span>{{#if article.title}} <span class="text-muted">|</span> {{article.title}}{{/if}}</h1>
|
||||
</div>
|
||||
{{#if template.withCompare}}
|
||||
<div class="pull-right">
|
||||
@@ -137,7 +144,7 @@
|
||||
{{#if article.description}}
|
||||
<p>{{{nl2br article.description}}}</p>
|
||||
{{/if}}
|
||||
<span class="type type__{{toLowerCase article.type}}">{{toLowerCase article.type}}</span>
|
||||
<span class="method meth-{{toLowerCase article.type}}">{{article.type}}</span>
|
||||
<pre data-type="{{toLowerCase article.type}}"><code class="language-http">{{article.url}}</code></pre>
|
||||
|
||||
{{#if article.permission}}
|
||||
@@ -155,26 +162,28 @@
|
||||
{{/if}}
|
||||
|
||||
{{!-- CODE EXAMPLES IN TABS --}}
|
||||
{{#if_gt article.examples.length compare=0}}
|
||||
<ul class="nav nav-tabs nav-tabs-examples">
|
||||
{{#ifCond article.examples.length '>' 0}}
|
||||
<ul class="nav nav-tabs nav-tabs-examples" role="tablist">
|
||||
{{#each article.examples}}
|
||||
<li{{#if_eq @index compare=0}} class="active"{{/if_eq}}>
|
||||
<a href="#examples-{{../id}}-{{@index}}">{{title}}</a>
|
||||
<li{{#ifCond @index '==' 0}} class="active"{{/ifCond}}>
|
||||
<a href="#examples-{{../id}}-{{@index}}" role="tab" data-toggle="tab">{{title}}</a>
|
||||
</li>
|
||||
{{/each}}
|
||||
</ul>
|
||||
|
||||
<div class="tab-content">
|
||||
{{#each article.examples}}
|
||||
<div class="tab-pane{{#if_eq @index compare=0}} active{{/if_eq}}" id="examples-{{../id}}-{{@index}}">
|
||||
<div class="tab-pane{{#ifCond @index '==' 0}} active{{/ifCond}}" id="examples-{{../id}}-{{@index}}">
|
||||
<pre data-type="{{type}}"><code class="language-{{type}}">{{content}}</code></pre>
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
{{/if_gt}}
|
||||
{{/ifCond}}
|
||||
|
||||
{{subTemplate "article-param-block" params=article.header _hasType=_hasTypeInHeaderFields section="header"}}
|
||||
{{subTemplate "article-param-block" params=article.parameter _hasType=_hasTypeInParameterFields section="parameter"}}
|
||||
{{subTemplate "article-query-block" params=article.query _hasType=_hasTypeInParameterFields section="query"}}
|
||||
{{subTemplate "article-body-block" params=article.body _hasType=_hasTypeInParameterFields section="body"}}
|
||||
{{subTemplate "article-param-block" params=article.success _hasType=_hasTypeInSuccessFields section="success"}}
|
||||
{{subTemplate "article-param-block" params=article.error _col1="Name" _hasType=_hasTypeInErrorFields section="error"}}
|
||||
|
||||
@@ -182,6 +191,98 @@
|
||||
</article>
|
||||
</script>
|
||||
|
||||
<script id="template-article-query-block" type="text/x-handlebars-template">
|
||||
{{#if article.query}}
|
||||
<h2>{{__ "Query Parameter(s)"}}</h2>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 30%">{{#if ../_col1}}{{__ ../_col1}}{{else}}{{__ "Field"}}{{/if}}</th>
|
||||
{{#unless this.Type compare=null}}
|
||||
<th style="width: 10%">{{__ "Type"}}</th>
|
||||
{{/unless}}
|
||||
<th style="width: {{#if ../_hasType}}60%{{else}}70%{{/if}}">{{__ "Description"}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{#each params}}
|
||||
<tr>
|
||||
<td class="code">{{this.field}}
|
||||
{{#if optional}}
|
||||
<span class="label optional">{{__ "optional"}}</span>
|
||||
{{else}}
|
||||
<span class="label required">{{__ "required"}}</span>
|
||||
{{/if}}
|
||||
</td>
|
||||
{{#unless this.Type compare=null}}
|
||||
<td class="code">{{this.type}}</td>
|
||||
{{/unless}}
|
||||
<td>{{{nl2br this.description}}}
|
||||
{{#if defaultValue}}<p class="default-value">{{__ "Default value:"}} <code>{{{defaultValue}}}</code></p>{{/if}}
|
||||
{{#if size}}<p class="type-size">{{__ "Size range:"}} <code>{{{size}}}</code></p>{{/if}}
|
||||
{{#if allowedValues}}<p class="type-size">{{__ "Allowed values:"}}
|
||||
{{#each allowedValues}}
|
||||
<code>{{{this}}}</code>{{#unless @last}}, {{/unless}}
|
||||
{{/each}}
|
||||
</p>
|
||||
{{/if}}
|
||||
</td>
|
||||
</tr>
|
||||
{{/each}}
|
||||
</tbody>
|
||||
</table>
|
||||
{{/if}}
|
||||
</script>
|
||||
|
||||
<script id="template-article-body-block" type="text/x-handlebars-template">
|
||||
{{#if article.body}}
|
||||
<h2>{{__ "Request Body"}}</h2>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 30%">{{#if ../_col1}}{{__ ../_col1}}{{else}}{{__ "Field"}}{{/if}}</th>
|
||||
{{#unless this.Type compare=null}}
|
||||
<th style="width: 10%">{{__ "Type"}}</th>
|
||||
{{/unless}}
|
||||
<th style="width: {{#if ../_hasType}}60%{{else}}70%{{/if}}">{{__ "Description"}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{#each params}}
|
||||
<tr>
|
||||
<td class="code">{{this.field}}
|
||||
{{#if optional}}
|
||||
<span class="label optional">{{__ "optional"}}</span>
|
||||
{{else}}
|
||||
<span class="label required">{{__ "required"}}</span>
|
||||
{{/if}}
|
||||
</td>
|
||||
{{#unless this.Type compare=null}}
|
||||
<td class="code">{{this.type}}</td>
|
||||
{{/unless}}
|
||||
<td>
|
||||
{{{nl2br this.description}}}
|
||||
{{#if defaultValue}}
|
||||
<p class="default-value">{{__ "Default value:"}} <code>{{{defaultValue}}}</code></p>
|
||||
{{/if}}
|
||||
{{#if size}}
|
||||
<p class="type-size">{{__ "Size range:"}} <code>{{{size}}}</code></p>
|
||||
{{/if}}
|
||||
{{#if allowedValues}}
|
||||
<p class="type-size">{{__ "Allowed values:"}}
|
||||
{{#each allowedValues}}
|
||||
<code>{{{this}}}</code>{{#unless @last}}, {{/unless}}
|
||||
{{/each}}
|
||||
</p>
|
||||
{{/if}}
|
||||
</td>
|
||||
</tr>
|
||||
{{/each}}
|
||||
</tbody>
|
||||
</table>
|
||||
{{/if}}
|
||||
</script>
|
||||
|
||||
<script id="template-article-param-block" type="text/x-handlebars-template">
|
||||
{{#if params}}
|
||||
{{#each params.fields}}
|
||||
@@ -197,9 +298,14 @@
|
||||
<tbody>
|
||||
{{#each this}}
|
||||
<tr>
|
||||
<td class="code">{{{splitFill field "." " "}}}{{#if optional}} <span class="label label-optional">{{__ "optional"}}</span>{{/if}}</td>
|
||||
<td class="code">{{{splitFill field "." " "}}}
|
||||
{{#if optional}}
|
||||
<span class="label optional">{{__ "optional"}}</span>
|
||||
{{else}}
|
||||
<span class="label required">{{__ "required"}}</span>
|
||||
{{/if}}</td>
|
||||
{{#if ../../_hasType}}
|
||||
<td>
|
||||
<td class="code">
|
||||
{{{type}}}
|
||||
</td>
|
||||
{{/if}}
|
||||
@@ -219,51 +325,57 @@
|
||||
</tbody>
|
||||
</table>
|
||||
{{/each}}
|
||||
{{#if_gt params.examples.length compare=0}}
|
||||
<ul class="nav nav-tabs nav-tabs-examples">
|
||||
{{#ifCond params.examples.length '>' 0}}
|
||||
<ul class="nav nav-tabs nav-tabs-examples" role="tablist">
|
||||
{{#each params.examples}}
|
||||
<li{{#if_eq @index compare=0}} class="active"{{/if_eq}}>
|
||||
<a href="#{{../section}}-examples-{{../id}}-{{@index}}">{{title}}</a>
|
||||
<li{{#ifCond @index '==' 0}} class="active"{{/ifCond}}>
|
||||
<a href="#{{../section}}-examples-{{../id}}-{{@index}}" role="tab" data-toggle="tab">{{title}}</a>
|
||||
</li>
|
||||
{{/each}}
|
||||
</ul>
|
||||
|
||||
<div class="tab-content">
|
||||
{{#each params.examples}}
|
||||
<div class="tab-pane{{#if_eq @index compare=0}} active{{/if_eq}}" id="{{../section}}-examples-{{../id}}-{{@index}}">
|
||||
<div class="tab-pane{{#ifCond @index '==' 0}} active{{/ifCond}}" id="{{../section}}-examples-{{../id}}-{{@index}}">
|
||||
<pre data-type="{{type}}"><code class="language-{{type}}">{{reformat content type}}</code></pre>
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
{{/if_gt}}
|
||||
{{/ifCond}}
|
||||
{{/if}}
|
||||
</script>
|
||||
|
||||
<script id="template-article-sample-request" type="text/x-handlebars-template">
|
||||
{{#if article.sampleRequest}}
|
||||
<h2>{{__ "Send a Sample Request"}}</h2>
|
||||
{{#if article.sampleRequest}}
|
||||
<div class="well">
|
||||
<h3>{{__ "Send a Sample Request"}}</h3>
|
||||
<form class="form-horizontal">
|
||||
<fieldset>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label" for="{{../id}}-sample-request-url"></label>
|
||||
<div class="input-group">
|
||||
<input id="{{../id}}-sample-request-url" type="text" class="form-control sample-request-url" value="{{article.sampleRequest.0.url}}" />
|
||||
<span class="input-group-addon">{{__ "url"}}</span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label" for="{{../id}}-sample-request-url">URL</label>
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">{{__ "url"}}</span>
|
||||
<input id="{{../id}}-sample-request-url" type="url" class="form-control sample-request-url" value="{{article.sampleRequest.0.url}}" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{#if article.header}}
|
||||
{{#if article.header.fields}}
|
||||
<h3>{{__ "Headers"}}</h3>
|
||||
{{#each article.header.fields}}
|
||||
<h4><input type="checkbox" data-sample-request-header-group-id="sample-request-header-{{@index}}" name="{{../id}}-sample-request-header" value="{{@index}}" class="sample-request-header sample-request-switch" checked />{{__ @key}}</h4>
|
||||
<div class="{{../id}}-sample-request-header-fields">
|
||||
{{#each this}}
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label" for="sample-request-header-field-{{field}}">{{field}}</label>
|
||||
<div class="input-group">
|
||||
<input type="text" placeholder="{{field}}" value="{{defaultValue}}" id="sample-request-header-field-{{field}}" class="form-control sample-request-header" data-sample-request-header-name="{{field}}" data-sample-request-header-group="sample-request-header-{{@../index}}">
|
||||
<span class="input-group-addon">{{{type}}}</span>
|
||||
<input type="text" id="sample-request-header-field-{{field}}"
|
||||
class="form-control sample-request-input"
|
||||
value="{{#if defaultValue}}{{ defaultValue }}{{/if}}"
|
||||
placeholder="{{#if defaultValue}}{{ defaultValue }}{{else}}{{field}}{{/if}}"
|
||||
data-family="header"
|
||||
data-name="{{field}}"
|
||||
data-group="{{@../index}}">
|
||||
</div>
|
||||
</div>
|
||||
{{/each}}
|
||||
@@ -276,18 +388,19 @@
|
||||
{{#if article.parameter.fields}}
|
||||
<h3>{{__ "Parameters"}}</h3>
|
||||
{{#each article.parameter.fields}}
|
||||
<h4><input type="checkbox" data-sample-request-param-group-id="sample-request-param-{{@index}}" name="{{../id}}-sample-request-param" value="{{@index}}" class="sample-request-param sample-request-switch" checked/>{{__ @key}}
|
||||
<div class="col-md-3">
|
||||
<select name="{{../id}}-sample-header-content-type" class="{{../id}}-sample-request-param-select sample-header-content-type sample-header-content-type-switch">
|
||||
<option value="undefined" selected>ajax-auto</option>
|
||||
<option value="body-json" >body/json</option>
|
||||
<option value="body-form-data" >body/form-data</option>
|
||||
<option value="auto" selected>ajax-auto</option>
|
||||
<option value="json" >json</option>
|
||||
<option value="form-data" >form-data</option>
|
||||
</select>
|
||||
</h4>
|
||||
</div>
|
||||
|
||||
<div class="{{../id}}-sample-request-param-body {{../id}}-sample-header-content-type-body hide">
|
||||
<div class="form-group">
|
||||
<div class="input-group">
|
||||
<textarea id="sample-request-body-json" class="form-control sample-request-body" data-sample-request-body-group="sample-request-param-{{@./index}}" rows="6" style="OVERFLOW: visible" {{#if optional}}data-sample-request-param-optional="true"{{/if}}></textarea>
|
||||
<div class="input-group-addon">json</div>
|
||||
<textarea id="sample-request-body-json" class="form-control sample-request-body" data-sample-request-body-group="sample-request-param-{{@./index}}" rows="6" style="OVERFLOW: visible" {{#if optional}}data-sample-request-param-optional="true"{{/if}}></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -296,8 +409,30 @@
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label" for="sample-request-param-field-{{field}}">{{field}}</label>
|
||||
<div class="input-group">
|
||||
<input id="sample-request-param-field-{{field}}" type="{{setInputType type}}" placeholder="{{field}}" class="form-control sample-request-param" data-sample-request-param-name="{{field}}" data-sample-request-param-group="sample-request-param-{{@../index}}" {{#if optional}}data-sample-request-param-optional="true"{{/if}}>
|
||||
<div class="input-group-addon">{{{type}}}</div>
|
||||
{{#if allowedValues}}
|
||||
<div class="input-group-addon sample-request-select">
|
||||
<select class="form-control" data-name="{{field}}" data-family="query" data-group="{{@../index}}" {{#if optional}}data-optional="true"{{/if}}>
|
||||
<option value="" class="empty"><{{__ "No value"}}></option>
|
||||
{{#each allowedValues}}
|
||||
<option {{#ifCond ../defaultValue '===' this}} selected {{/ifCond}}value="{{{removeDblQuotes this}}}">{{{removeDblQuotes this}}}</option>
|
||||
{{/each}}
|
||||
</select>
|
||||
</div>
|
||||
<input class="invisible">
|
||||
{{else}}
|
||||
<div class="sample-request-input-{{type}}-container"><div>
|
||||
<input id="sample-request-param-field-{{field}}"
|
||||
class="{{#ifCond type '!==' 'Boolean'}}form-control{{/ifCond}} sample-request-param"
|
||||
type="{{setInputType type}}"
|
||||
value="{{#if defaultValue}}{{ defaultValue }}{{/if}}"
|
||||
placeholder="{{#if defaultValue}}{{ defaultValue }}{{else}}{{field}}{{/if}}"
|
||||
data-name="{{field}}"
|
||||
data-family="query"
|
||||
data-group="{{@../index}}"
|
||||
{{#if optional}}data-optional="true"{{/if}}>
|
||||
</div></div>
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
{{/each}}
|
||||
@@ -306,12 +441,110 @@
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
|
||||
{{#if article.query}}
|
||||
<h3>{{__ "Query Parameters"}}</h3>
|
||||
<div class="{{../id}}-sample-request-param-fields {{../id}}-sample-header-content-type-fields">
|
||||
{{#each article.query}}
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label" for="sample-request-param-field-{{field}}">{{field}}{{#if optional}} ({{__ "optional"}}){{/if}}</label>
|
||||
<div class="input-group col-md-6">
|
||||
<div class="input-group-addon">{{{type}}}</div>
|
||||
{{#if allowedValues}}
|
||||
<div class="input-group-addon sample-request-select">
|
||||
<select class="form-control" data-name="{{field}}" data-family="query" data-group="{{@../index}}" {{#if optional}}data-optional="true"{{/if}}>
|
||||
<option value="" class="empty"><{{__ "No value"}}></option>
|
||||
{{#each allowedValues}}
|
||||
<option {{#ifCond ../defaultValue '===' this}} selected {{/ifCond}}value="{{{removeDblQuotes this}}}">{{{removeDblQuotes this}}}</option>
|
||||
{{/each}}
|
||||
</select>
|
||||
</div>
|
||||
<input class="invisible">
|
||||
{{else}}
|
||||
<div class="sample-request-input-{{type}}-container"><div>
|
||||
<input id="sample-request-param-field-{{field}}"
|
||||
class="{{#ifCond type '!==' 'Boolean'}}form-control{{/ifCond}} sample-request-input"
|
||||
type="{{setInputType type}}"
|
||||
value="{{#if defaultValue}}{{ defaultValue }}{{/if}}"
|
||||
placeholder="{{#if defaultValue}}{{ defaultValue }}{{else}}{{field}}{{/if}}"
|
||||
data-name="{{field}}"
|
||||
data-family="query"
|
||||
data-group="{{@../index}}"
|
||||
{{#if optional}}data-optional="true"{{/if}}>
|
||||
</div></div>
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{#if article.body}}
|
||||
<h3>{{__ "Body"}}</h3>
|
||||
|
||||
<div class="col-md-3">
|
||||
<label for="body-content-type-{{this.id}}">{{__ "Content-Type"}}</label>
|
||||
<select id="body-content-type-{{this.id}}" data-id="{{this.id}}" class="sample-request-content-type-switch form-control">
|
||||
<option value="body-json" selected>json</option>
|
||||
<option value="body-form-data">form-data</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-md-9" id="sample-request-body-json-input-{{this.id}}">
|
||||
<div class="form-group">
|
||||
<div class="controls pull-right">
|
||||
<button class="btn btn-primary sample-request-send" data-sample-request-type="{{article.type}}">{{__ "Send"}}</button>
|
||||
<div class="input-group">
|
||||
<div class="input-group-addon">json</div>
|
||||
<textarea class="form-control sample-request-input" rows="6"
|
||||
data-family="body-json"
|
||||
data-name={{"body"}}
|
||||
data-content-type="json"
|
||||
{{#if optional}}data-optional="true"{{/if}}>{{body2json article.body}}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group sample-request-response" style="display: none;">
|
||||
</div>
|
||||
|
||||
<div hidden class="col-md-9" id="sample-request-body-form-input-{{this.id}}">
|
||||
{{#each article.body}}
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label" for="sample-request-param-field-{{field}}">{{field}}</label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-addon">{{{type}}}</div>
|
||||
{{#if allowedValues}}
|
||||
<div class="input-group-addon sample-request-select">
|
||||
<select class="form-control" data-name="{{field}}" data-family="body" data-group="{{@../index}}" {{#if optional}}data-optional="true"{{/if}}>
|
||||
<option value="" class="empty"><{{__ "No value"}}></option>
|
||||
{{#each allowedValues}}
|
||||
<option {{#ifCond ../defaultValue '===' this}} selected {{/ifCond}}value="{{{removeDblQuotes this}}}">{{{removeDblQuotes this}}}</option>
|
||||
{{/each}}
|
||||
</select>
|
||||
</div>
|
||||
<input class="invisible">
|
||||
{{else}}
|
||||
<div class="sample-request-input-{{type}}-container"><div>
|
||||
<input id="sample-request-param-field-{{field}}"
|
||||
class="{{#ifCond type '!==' 'Boolean'}}form-control{{/ifCond}} sample-request-input"
|
||||
type="{{setInputType type}}"
|
||||
value="{{#ifCond type '!==' 'Boolean'}}{{#if defaultValue}}{{ defaultValue }}{{/if}}{{/ifCond}}"
|
||||
{{#if checked}}checked{{/if}}
|
||||
placeholder="{{field}}"
|
||||
data-family="body"
|
||||
data-name="{{field}}"
|
||||
data-content-type="form"
|
||||
{{#if optional}}data-optional="true"{{/if}}>
|
||||
</div></div>
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
<div class="form-group">
|
||||
<div class="controls pull-right">
|
||||
<button class="btn btn-primary bg-primary sample-request-send" data-type="{{article.type}}">{{__ "Send"}}</button>
|
||||
<button class="btn btn-danger bg-red sample-request-clear" data-type="{{article.type}}">{{__ "Reset"}}</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group sample-request-response" hidden>
|
||||
<h3>
|
||||
{{__ "Response"}}
|
||||
<button class="btn btn-default btn-xs pull-right sample-request-clear">X</button>
|
||||
@@ -320,13 +553,14 @@
|
||||
</div>
|
||||
</fieldset>
|
||||
</form>
|
||||
{{/if}}
|
||||
</div>
|
||||
{{/if}}
|
||||
</script>
|
||||
|
||||
<script id="template-compare-article" type="text/x-handlebars-template">
|
||||
<article id="api-{{article.group}}-{{article.name}}-{{article.version}}" {{#if hidden}}class="hide"{{/if}} data-group="{{article.group}}" data-name="{{article.name}}" data-version="{{article.version}}" data-compare-version="{{compare.version}}">
|
||||
<div class="pull-left">
|
||||
<h1>{{underscoreToSpace article.group}} - {{{showDiff article.title compare.title}}}</h1>
|
||||
<h1>{{underscoreToSpace article.groupTitle}} | {{{showDiff article.title compare.title}}}</h1>
|
||||
</div>
|
||||
|
||||
<div class="pull-right">
|
||||
@@ -356,26 +590,27 @@
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
|
||||
<pre data-type="{{toLowerCase article.type}}"><code class="language-html">{{{showDiff article.url compare.url}}}</code></pre>
|
||||
<span class="method meth-{{toLowerCase compare.type}}">{{compare.type}}</span>
|
||||
<pre data-type="{{toLowerCase article.type}}" class="language-html">{{{showDiff article.url compare.url}}}</pre>
|
||||
|
||||
{{subTemplate "article-compare-permission" article=article compare=compare}}
|
||||
|
||||
<ul class="nav nav-tabs nav-tabs-examples">
|
||||
<ul class="nav nav-tabs nav-tabs-examples" role="tablist">
|
||||
{{#each_compare_title article.examples compare.examples}}
|
||||
{{#if typeSame}}
|
||||
<li{{#if_eq index compare=0}} class="active"{{/if_eq}}>
|
||||
<a href="#compare-examples-{{../../article.id}}-{{index}}">{{{showDiff source.title compare.title}}}</a>
|
||||
<li{{#ifCond index '==' 0}} class="active"{{/ifCond}}>
|
||||
<a href="#compare-examples-{{../../article.id}}-{{index}}" role="tab" data-toggle="tab">{{{showDiff source.title compare.title}}}</a>
|
||||
</li>
|
||||
{{/if}}
|
||||
|
||||
{{#if typeIns}}
|
||||
<li{{#if_eq index compare=0}} class="active"{{/if_eq}}>
|
||||
<li{{#ifCond index '==' 0}} class="active"{{/ifCond}}>
|
||||
<a href="#compare-examples-{{../../article.id}}-{{index}}"><ins>{{{source.title}}}</ins></a>
|
||||
</li>
|
||||
{{/if}}
|
||||
|
||||
{{#if typeDel}}
|
||||
<li{{#if_eq index compare=0}} class="active"{{/if_eq}}>
|
||||
<li{{#ifCond index '==' 0}} class="active"{{/ifCond}}>
|
||||
<a href="#compare-examples-{{../../article.id}}-{{index}}"><del>{{{compare.title}}}</del></a>
|
||||
</li>
|
||||
{{/if}}
|
||||
@@ -386,20 +621,20 @@
|
||||
{{#each_compare_title article.examples compare.examples}}
|
||||
|
||||
{{#if typeSame}}
|
||||
<div class="tab-pane{{#if_eq index compare=0}} active{{/if_eq}}" id="compare-examples-{{../../article.id}}-{{index}}">
|
||||
<pre data-type="{{source.type}}"><code class="language-{{source.type}}">{{{showDiff source.content compare.content}}}</code></pre>
|
||||
<div class="tab-pane{{#ifCond index '==' 0}} active{{/ifCond}}" id="compare-examples-{{../../article.id}}-{{index}}">
|
||||
<pre data-type="{{source.type}}" class="language-{{source.type}}">{{{showDiff source.content compare.content}}}</pre>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{#if typeIns}}
|
||||
<div class="tab-pane{{#if_eq index compare=0}} active{{/if_eq}}" id="compare-examples-{{../../article.id}}-{{index}}">
|
||||
<pre data-type="{{source.type}}"><code class="language-{{source.type}}">{{{source.content}}}</code></pre>
|
||||
<div class="tab-pane{{#ifCond index '==' 0}} active{{/ifCond}}" id="compare-examples-{{../../article.id}}-{{index}}">
|
||||
<pre data-type="{{source.type}}" class="language-{{source.type}}">{{{source.content}}}</pre>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{#if typeDel}}
|
||||
<div class="tab-pane{{#if_eq index compare=0}} active{{/if_eq}}" id="compare-examples-{{../../article.id}}-{{index}}">
|
||||
<pre data-type="{{compare.type}}"><code class="language-{{source.type}}">{{{compare.content}}}</code></pre>
|
||||
<div class="tab-pane{{#ifCond index '==' 0}} active{{/ifCond}}" id="compare-examples-{{../../article.id}}-{{index}}">
|
||||
<pre data-type="{{compare.type}}" class="language-{{source.type}}">{{{compare.content}}}</pre>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
@@ -531,22 +766,22 @@
|
||||
{{/each_compare_keys}}
|
||||
|
||||
{{#if source.examples}}
|
||||
<ul class="nav nav-tabs nav-tabs-examples">
|
||||
<ul class="nav nav-tabs nav-tabs-examples" role="tablist">
|
||||
{{#each_compare_title source.examples compare.examples}}
|
||||
{{#if typeSame}}
|
||||
<li{{#if_eq index compare=0}} class="active"{{/if_eq}}>
|
||||
<a href="#{{../../section}}-compare-examples-{{../../article.id}}-{{index}}">{{{showDiff source.title compare.title}}}</a>
|
||||
<li{{#ifCond index '==' 0}} class="active"{{/ifCond}}>
|
||||
<a href="#{{../../section}}-compare-examples-{{../../article.id}}-{{index}}" role="tab" data-toggle="tab">{{{showDiff source.title compare.title}}}</a>
|
||||
</li>
|
||||
{{/if}}
|
||||
|
||||
{{#if typeIns}}
|
||||
<li{{#if_eq index compare=0}} class="active"{{/if_eq}}>
|
||||
<li{{#ifCond index '==' 0}} class="active"{{/ifCond}}>
|
||||
<a href="#{{../../section}}-compare-examples-{{../../article.id}}-{{index}}"><ins>{{{source.title}}}</ins></a>
|
||||
</li>
|
||||
{{/if}}
|
||||
|
||||
{{#if typeDel}}
|
||||
<li{{#if_eq index compare=0}} class="active"{{/if_eq}}>
|
||||
<li{{#ifCond index '==' 0}} class="active"{{/ifCond}}>
|
||||
<a href="#{{../../section}}-compare-examples-{{../../article.id}}-{{index}}"><del>{{{compare.title}}}</del></a>
|
||||
</li>
|
||||
{{/if}}
|
||||
@@ -557,19 +792,19 @@
|
||||
{{#each_compare_title source.examples compare.examples}}
|
||||
|
||||
{{#if typeSame}}
|
||||
<div class="tab-pane{{#if_eq index compare=0}} active{{/if_eq}}" id="{{../../section}}-compare-examples-{{../../article.id}}-{{index}}">
|
||||
<pre data-type="{{source.type}}"><code class="language-{{source.type}}">{{{showDiff source.content compare.content}}}</code></pre>
|
||||
<div class="tab-pane{{#ifCond index '==' 0}} active{{/ifCond}}" id="{{../../section}}-compare-examples-{{../../article.id}}-{{index}}">
|
||||
<pre data-type="{{source.type}}" class="language-{{source.type}}">{{{showDiff source.content compare.content}}}</pre>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{#if typeIns}}
|
||||
<div class="tab-pane{{#if_eq index compare=0}} active{{/if_eq}}" id="{{../../section}}-compare-examples-{{../../article.id}}-{{index}}">
|
||||
<div class="tab-pane{{#ifCond index '==' 0}} active{{/ifCond}}" id="{{../../section}}-compare-examples-{{../../article.id}}-{{index}}">
|
||||
<pre data-type="{{source.type}}"><code class="language-{{source.type}}">{{{source.content}}}</code></pre>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{#if typeDel}}
|
||||
<div class="tab-pane{{#if_eq index compare=0}} active{{/if_eq}}" id="{{../../section}}-compare-examples-{{../../article.id}}-{{index}}">
|
||||
<div class="tab-pane{{#ifCond index '==' 0}} active{{/ifCond}}" id="{{../../section}}-compare-examples-{{../../article.id}}-{{index}}">
|
||||
<pre data-type="{{compare.type}}"><code class="language-{{source.type}}">{{{compare.content}}}</code></pre>
|
||||
</div>
|
||||
{{/if}}
|
||||
@@ -687,6 +922,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script data-main="main.js" src="vendor/require.min.js"></script>
|
||||
<script src="assets/main.bundle.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
25
public/docs/locales/ca.js
vendored
@@ -1,25 +0,0 @@
|
||||
define({
|
||||
ca: {
|
||||
'Allowed values:' : 'Valors permesos:',
|
||||
'Compare all with predecessor': 'Comparar tot amb versió anterior',
|
||||
'compare changes to:' : 'comparar canvis amb:',
|
||||
'compared to' : 'comparat amb',
|
||||
'Default value:' : 'Valor per defecte:',
|
||||
'Description' : 'Descripció',
|
||||
'Field' : 'Camp',
|
||||
'General' : 'General',
|
||||
'Generated with' : 'Generat amb',
|
||||
'Name' : 'Nom',
|
||||
'No response values.' : 'Sense valors en la resposta.',
|
||||
'optional' : 'opcional',
|
||||
'Parameter' : 'Paràmetre',
|
||||
'Permission:' : 'Permisos:',
|
||||
'Response' : 'Resposta',
|
||||
'Send' : 'Enviar',
|
||||
'Send a Sample Request' : 'Enviar una petició d\'exemple',
|
||||
'show up to version:' : 'mostrar versió:',
|
||||
'Size range:' : 'Tamany de rang:',
|
||||
'Type' : 'Tipus',
|
||||
'url' : 'url'
|
||||
}
|
||||
});
|
||||
25
public/docs/locales/cs.js
vendored
@@ -1,25 +0,0 @@
|
||||
define({
|
||||
cs: {
|
||||
'Allowed values:' : 'Povolené hodnoty:',
|
||||
'Compare all with predecessor': 'Porovnat vše s předchozími verzemi',
|
||||
'compare changes to:' : 'porovnat změny s:',
|
||||
'compared to' : 'porovnat s',
|
||||
'Default value:' : 'Výchozí hodnota:',
|
||||
'Description' : 'Popis',
|
||||
'Field' : 'Pole',
|
||||
'General' : 'Obecné',
|
||||
'Generated with' : 'Vygenerováno pomocí',
|
||||
'Name' : 'Název',
|
||||
'No response values.' : 'Nebyly vráceny žádné hodnoty.',
|
||||
'optional' : 'volitelné',
|
||||
'Parameter' : 'Parametr',
|
||||
'Permission:' : 'Oprávnění:',
|
||||
'Response' : 'Odpověď',
|
||||
'Send' : 'Odeslat',
|
||||
'Send a Sample Request' : 'Odeslat ukázkový požadavek',
|
||||
'show up to version:' : 'zobrazit po verzi:',
|
||||
'Size range:' : 'Rozsah velikosti:',
|
||||
'Type' : 'Typ',
|
||||
'url' : 'url'
|
||||
}
|
||||
});
|
||||
25
public/docs/locales/de.js
vendored
@@ -1,25 +0,0 @@
|
||||
define({
|
||||
de: {
|
||||
'Allowed values:' : 'Erlaubte Werte:',
|
||||
'Compare all with predecessor': 'Vergleiche alle mit ihren Vorgängern',
|
||||
'compare changes to:' : 'vergleiche Änderungen mit:',
|
||||
'compared to' : 'verglichen mit',
|
||||
'Default value:' : 'Standardwert:',
|
||||
'Description' : 'Beschreibung',
|
||||
'Field' : 'Feld',
|
||||
'General' : 'Allgemein',
|
||||
'Generated with' : 'Erstellt mit',
|
||||
'Name' : 'Name',
|
||||
'No response values.' : 'Keine Rückgabewerte.',
|
||||
'optional' : 'optional',
|
||||
'Parameter' : 'Parameter',
|
||||
'Permission:' : 'Berechtigung:',
|
||||
'Response' : 'Antwort',
|
||||
'Send' : 'Senden',
|
||||
'Send a Sample Request' : 'Eine Beispielanfrage senden',
|
||||
'show up to version:' : 'zeige bis zur Version:',
|
||||
'Size range:' : 'Größenbereich:',
|
||||
'Type' : 'Typ',
|
||||
'url' : 'url'
|
||||
}
|
||||
});
|
||||
25
public/docs/locales/es.js
vendored
@@ -1,25 +0,0 @@
|
||||
define({
|
||||
es: {
|
||||
'Allowed values:' : 'Valores permitidos:',
|
||||
'Compare all with predecessor': 'Comparar todo con versión anterior',
|
||||
'compare changes to:' : 'comparar cambios con:',
|
||||
'compared to' : 'comparado con',
|
||||
'Default value:' : 'Valor por defecto:',
|
||||
'Description' : 'Descripción',
|
||||
'Field' : 'Campo',
|
||||
'General' : 'General',
|
||||
'Generated with' : 'Generado con',
|
||||
'Name' : 'Nombre',
|
||||
'No response values.' : 'Sin valores en la respuesta.',
|
||||
'optional' : 'opcional',
|
||||
'Parameter' : 'Parámetro',
|
||||
'Permission:' : 'Permisos:',
|
||||
'Response' : 'Respuesta',
|
||||
'Send' : 'Enviar',
|
||||
'Send a Sample Request' : 'Enviar una petición de ejemplo',
|
||||
'show up to version:' : 'mostrar a versión:',
|
||||
'Size range:' : 'Tamaño de rango:',
|
||||
'Type' : 'Tipo',
|
||||
'url' : 'url'
|
||||
}
|
||||
});
|
||||
25
public/docs/locales/fr.js
vendored
@@ -1,25 +0,0 @@
|
||||
define({
|
||||
fr: {
|
||||
'Allowed values:' : 'Valeurs autorisées :',
|
||||
'Compare all with predecessor': 'Tout comparer avec ...',
|
||||
'compare changes to:' : 'comparer les changements à :',
|
||||
'compared to' : 'comparer à',
|
||||
'Default value:' : 'Valeur par défaut :',
|
||||
'Description' : 'Description',
|
||||
'Field' : 'Champ',
|
||||
'General' : 'Général',
|
||||
'Generated with' : 'Généré avec',
|
||||
'Name' : 'Nom',
|
||||
'No response values.' : 'Aucune valeur de réponse.',
|
||||
'optional' : 'optionnel',
|
||||
'Parameter' : 'Paramètre',
|
||||
'Permission:' : 'Permission :',
|
||||
'Response' : 'Réponse',
|
||||
'Send' : 'Envoyer',
|
||||
'Send a Sample Request' : 'Envoyer une requête représentative',
|
||||
'show up to version:' : 'Montrer à partir de la version :',
|
||||
'Size range:' : 'Ordre de grandeur :',
|
||||
'Type' : 'Type',
|
||||
'url' : 'url'
|
||||
}
|
||||
});
|
||||
25
public/docs/locales/it.js
vendored
@@ -1,25 +0,0 @@
|
||||
define({
|
||||
it: {
|
||||
'Allowed values:' : 'Valori permessi:',
|
||||
'Compare all with predecessor': 'Confronta tutto con versioni precedenti',
|
||||
'compare changes to:' : 'confronta modifiche con:',
|
||||
'compared to' : 'confrontato con',
|
||||
'Default value:' : 'Valore predefinito:',
|
||||
'Description' : 'Descrizione',
|
||||
'Field' : 'Campo',
|
||||
'General' : 'Generale',
|
||||
'Generated with' : 'Creato con',
|
||||
'Name' : 'Nome',
|
||||
'No response values.' : 'Nessun valore di risposta.',
|
||||
'optional' : 'opzionale',
|
||||
'Parameter' : 'Parametro',
|
||||
'Permission:' : 'Permessi:',
|
||||
'Response' : 'Risposta',
|
||||
'Send' : 'Invia',
|
||||
'Send a Sample Request' : 'Invia una richiesta di esempio',
|
||||
'show up to version:' : 'mostra alla versione:',
|
||||
'Size range:' : 'Intervallo dimensione:',
|
||||
'Type' : 'Tipo',
|
||||
'url' : 'url'
|
||||
}
|
||||
});
|
||||
51
public/docs/locales/locale.js
vendored
@@ -1,51 +0,0 @@
|
||||
define([
|
||||
'./locales/ca.js',
|
||||
'./locales/cs.js',
|
||||
'./locales/de.js',
|
||||
'./locales/es.js',
|
||||
'./locales/fr.js',
|
||||
'./locales/it.js',
|
||||
'./locales/nl.js',
|
||||
'./locales/pl.js',
|
||||
'./locales/pt_br.js',
|
||||
'./locales/ro.js',
|
||||
'./locales/ru.js',
|
||||
'./locales/tr.js',
|
||||
'./locales/vi.js',
|
||||
'./locales/zh.js',
|
||||
'./locales/zh_cn.js'
|
||||
], function() {
|
||||
var langId = (navigator.language || navigator.userLanguage).toLowerCase().replace('-', '_');
|
||||
var language = langId.substr(0, 2);
|
||||
var locales = {};
|
||||
|
||||
for (index in arguments) {
|
||||
for (property in arguments[index])
|
||||
locales[property] = arguments[index][property];
|
||||
}
|
||||
if ( ! locales['en'])
|
||||
locales['en'] = {};
|
||||
|
||||
if ( ! locales[langId] && ! locales[language])
|
||||
language = 'en';
|
||||
|
||||
var locale = (locales[langId] ? locales[langId] : locales[language]);
|
||||
|
||||
function __(text) {
|
||||
var index = locale[text];
|
||||
if (index === undefined)
|
||||
return text;
|
||||
return index;
|
||||
};
|
||||
|
||||
function setLanguage(language) {
|
||||
locale = locales[language];
|
||||
}
|
||||
|
||||
return {
|
||||
__ : __,
|
||||
locales : locales,
|
||||
locale : locale,
|
||||
setLanguage: setLanguage
|
||||
};
|
||||
});
|
||||
25
public/docs/locales/nl.js
vendored
@@ -1,25 +0,0 @@
|
||||
define({
|
||||
nl: {
|
||||
'Allowed values:' : 'Toegestane waarden:',
|
||||
'Compare all with predecessor': 'Vergelijk alle met voorgaande versie',
|
||||
'compare changes to:' : 'vergelijk veranderingen met:',
|
||||
'compared to' : 'vergelijk met',
|
||||
'Default value:' : 'Standaard waarde:',
|
||||
'Description' : 'Omschrijving',
|
||||
'Field' : 'Veld',
|
||||
'General' : 'Algemeen',
|
||||
'Generated with' : 'Gegenereerd met',
|
||||
'Name' : 'Naam',
|
||||
'No response values.' : 'Geen response waardes.',
|
||||
'optional' : 'optioneel',
|
||||
'Parameter' : 'Parameter',
|
||||
'Permission:' : 'Permissie:',
|
||||
'Response' : 'Antwoorden',
|
||||
'Send' : 'Sturen',
|
||||
'Send a Sample Request' : 'Stuur een sample aanvragen',
|
||||
'show up to version:' : 'toon tot en met versie:',
|
||||
'Size range:' : 'Maatbereik:',
|
||||
'Type' : 'Type',
|
||||
'url' : 'url'
|
||||
}
|
||||
});
|
||||
25
public/docs/locales/pl.js
vendored
@@ -1,25 +0,0 @@
|
||||
define({
|
||||
pl: {
|
||||
'Allowed values:' : 'Dozwolone wartości:',
|
||||
'Compare all with predecessor': 'Porównaj z poprzednimi wersjami',
|
||||
'compare changes to:' : 'porównaj zmiany do:',
|
||||
'compared to' : 'porównaj do:',
|
||||
'Default value:' : 'Wartość domyślna:',
|
||||
'Description' : 'Opis',
|
||||
'Field' : 'Pole',
|
||||
'General' : 'Generalnie',
|
||||
'Generated with' : 'Wygenerowano z',
|
||||
'Name' : 'Nazwa',
|
||||
'No response values.' : 'Brak odpowiedzi.',
|
||||
'optional' : 'opcjonalny',
|
||||
'Parameter' : 'Parametr',
|
||||
'Permission:' : 'Uprawnienia:',
|
||||
'Response' : 'Odpowiedź',
|
||||
'Send' : 'Wyślij',
|
||||
'Send a Sample Request' : 'Wyślij przykładowe żądanie',
|
||||
'show up to version:' : 'pokaż do wersji:',
|
||||
'Size range:' : 'Zakres rozmiaru:',
|
||||
'Type' : 'Typ',
|
||||
'url' : 'url'
|
||||
}
|
||||
});
|
||||
25
public/docs/locales/pt_br.js
vendored
@@ -1,25 +0,0 @@
|
||||
define({
|
||||
'pt_br': {
|
||||
'Allowed values:' : 'Valores permitidos:',
|
||||
'Compare all with predecessor': 'Compare todos com antecessores',
|
||||
'compare changes to:' : 'comparar alterações com:',
|
||||
'compared to' : 'comparado com',
|
||||
'Default value:' : 'Valor padrão:',
|
||||
'Description' : 'Descrição',
|
||||
'Field' : 'Campo',
|
||||
'General' : 'Geral',
|
||||
'Generated with' : 'Gerado com',
|
||||
'Name' : 'Nome',
|
||||
'No response values.' : 'Sem valores de resposta.',
|
||||
'optional' : 'opcional',
|
||||
'Parameter' : 'Parâmetro',
|
||||
'Permission:' : 'Permissão:',
|
||||
'Response' : 'Resposta',
|
||||
'Send' : 'Enviar',
|
||||
'Send a Sample Request' : 'Enviar um Exemplo de Pedido',
|
||||
'show up to version:' : 'aparecer para a versão:',
|
||||
'Size range:' : 'Faixa de tamanho:',
|
||||
'Type' : 'Tipo',
|
||||
'url' : 'url'
|
||||
}
|
||||
});
|
||||
25
public/docs/locales/ro.js
vendored
@@ -1,25 +0,0 @@
|
||||
define({
|
||||
ro: {
|
||||
'Allowed values:' : 'Valori permise:',
|
||||
'Compare all with predecessor': 'Compară toate cu versiunea precedentă',
|
||||
'compare changes to:' : 'compară cu versiunea:',
|
||||
'compared to' : 'comparat cu',
|
||||
'Default value:' : 'Valoare implicită:',
|
||||
'Description' : 'Descriere',
|
||||
'Field' : 'Câmp',
|
||||
'General' : 'General',
|
||||
'Generated with' : 'Generat cu',
|
||||
'Name' : 'Nume',
|
||||
'No response values.' : 'Nici o valoare returnată.',
|
||||
'optional' : 'opțional',
|
||||
'Parameter' : 'Parametru',
|
||||
'Permission:' : 'Permisiune:',
|
||||
'Response' : 'Răspuns',
|
||||
'Send' : 'Trimite',
|
||||
'Send a Sample Request' : 'Trimite o cerere de probă',
|
||||
'show up to version:' : 'arată până la versiunea:',
|
||||
'Size range:' : 'Interval permis:',
|
||||
'Type' : 'Tip',
|
||||
'url' : 'url'
|
||||
}
|
||||
});
|
||||
25
public/docs/locales/ru.js
vendored
@@ -1,25 +0,0 @@
|
||||
define({
|
||||
ru: {
|
||||
'Allowed values:' : 'Допустимые значения:',
|
||||
'Compare all with predecessor': 'Сравнить с предыдущей версией',
|
||||
'compare changes to:' : 'сравнить с:',
|
||||
'compared to' : 'в сравнении с',
|
||||
'Default value:' : 'По умолчанию:',
|
||||
'Description' : 'Описание',
|
||||
'Field' : 'Название',
|
||||
'General' : 'Общая информация',
|
||||
'Generated with' : 'Сгенерировано с помощью',
|
||||
'Name' : 'Название',
|
||||
'No response values.' : 'Нет значений для ответа.',
|
||||
'optional' : 'необязательный',
|
||||
'Parameter' : 'Параметр',
|
||||
'Permission:' : 'Разрешено:',
|
||||
'Response' : 'Ответ',
|
||||
'Send' : 'Отправить',
|
||||
'Send a Sample Request' : 'Отправить тестовый запрос',
|
||||
'show up to version:' : 'показать версию:',
|
||||
'Size range:' : 'Ограничения:',
|
||||
'Type' : 'Тип',
|
||||
'url' : 'URL'
|
||||
}
|
||||
});
|
||||
25
public/docs/locales/tr.js
vendored
@@ -1,25 +0,0 @@
|
||||
define({
|
||||
tr: {
|
||||
'Allowed values:' : 'İzin verilen değerler:',
|
||||
'Compare all with predecessor': 'Tümünü öncekiler ile karşılaştır',
|
||||
'compare changes to:' : 'değişiklikleri karşılaştır:',
|
||||
'compared to' : 'karşılaştır',
|
||||
'Default value:' : 'Varsayılan değer:',
|
||||
'Description' : 'Açıklama',
|
||||
'Field' : 'Alan',
|
||||
'General' : 'Genel',
|
||||
'Generated with' : 'Oluşturan',
|
||||
'Name' : 'İsim',
|
||||
'No response values.' : 'Dönüş verisi yok.',
|
||||
'optional' : 'opsiyonel',
|
||||
'Parameter' : 'Parametre',
|
||||
'Permission:' : 'İzin:',
|
||||
'Response' : 'Dönüş',
|
||||
'Send' : 'Gönder',
|
||||
'Send a Sample Request' : 'Örnek istek gönder',
|
||||
'show up to version:' : 'bu versiyona kadar göster:',
|
||||
'Size range:' : 'Boyut aralığı:',
|
||||
'Type' : 'Tip',
|
||||
'url' : 'url'
|
||||
}
|
||||
});
|
||||
25
public/docs/locales/vi.js
vendored
@@ -1,25 +0,0 @@
|
||||
define({
|
||||
vi: {
|
||||
'Allowed values:' : 'Giá trị chấp nhận:',
|
||||
'Compare all with predecessor': 'So sánh với tất cả phiên bản trước',
|
||||
'compare changes to:' : 'so sánh sự thay đổi với:',
|
||||
'compared to' : 'so sánh với',
|
||||
'Default value:' : 'Giá trị mặc định:',
|
||||
'Description' : 'Chú thích',
|
||||
'Field' : 'Trường dữ liệu',
|
||||
'General' : 'Tổng quan',
|
||||
'Generated with' : 'Được tạo bởi',
|
||||
'Name' : 'Tên',
|
||||
'No response values.' : 'Không có kết quả trả về.',
|
||||
'optional' : 'Tùy chọn',
|
||||
'Parameter' : 'Tham số',
|
||||
'Permission:' : 'Quyền hạn:',
|
||||
'Response' : 'Kết quả',
|
||||
'Send' : 'Gửi',
|
||||
'Send a Sample Request' : 'Gửi một yêu cầu mẫu',
|
||||
'show up to version:' : 'hiển thị phiên bản:',
|
||||
'Size range:' : 'Kích cỡ:',
|
||||
'Type' : 'Kiểu',
|
||||
'url' : 'liên kết'
|
||||
}
|
||||
});
|
||||
25
public/docs/locales/zh.js
vendored
@@ -1,25 +0,0 @@
|
||||
define({
|
||||
zh: {
|
||||
'Allowed values:' : '允許值:',
|
||||
'Compare all with predecessor': '預先比較所有',
|
||||
'compare changes to:' : '比較變更:',
|
||||
'compared to' : '對比',
|
||||
'Default value:' : '預設值:',
|
||||
'Description' : '描述',
|
||||
'Field' : '欄位',
|
||||
'General' : '概括',
|
||||
'Generated with' : '生成工具',
|
||||
'Name' : '名稱',
|
||||
'No response values.' : '無對應資料.',
|
||||
'optional' : '選填',
|
||||
'Parameter' : '參數',
|
||||
'Permission:' : '權限:',
|
||||
'Response' : '回應',
|
||||
'Send' : '發送',
|
||||
'Send a Sample Request' : '發送試用需求',
|
||||
'show up to version:' : '顯示到版本:',
|
||||
'Size range:' : '區間:',
|
||||
'Type' : '類型',
|
||||
'url' : '網址'
|
||||
}
|
||||
});
|
||||
27
public/docs/locales/zh_cn.js
vendored
@@ -1,27 +0,0 @@
|
||||
define({
|
||||
'zh_cn': {
|
||||
'Allowed values:' : '允许值:',
|
||||
'Compare all with predecessor': '与所有较早的比较',
|
||||
'compare changes to:' : '将当前版本与指定版本比较:',
|
||||
'compared to' : '相比于',
|
||||
'Default value:' : '默认值:',
|
||||
'Description' : '描述',
|
||||
'Field' : '字段',
|
||||
'General' : '概要',
|
||||
'Generated with' : '基于',
|
||||
'Name' : '名称',
|
||||
'No response values.' : '无返回值.',
|
||||
'optional' : '可选',
|
||||
'Parameter' : '参数',
|
||||
'Parameters' : '参数',
|
||||
'Headers' : '头部参数',
|
||||
'Permission:' : '权限:',
|
||||
'Response' : '返回',
|
||||
'Send' : '发送',
|
||||
'Send a Sample Request' : '发送示例请求',
|
||||
'show up to version:' : '显示到指定版本:',
|
||||
'Size range:' : '取值范围:',
|
||||
'Type' : '类型',
|
||||
'url' : '网址'
|
||||
}
|
||||
});
|
||||
910
public/docs/main.js
vendored
@@ -1,910 +0,0 @@
|
||||
require.config({
|
||||
paths: {
|
||||
bootstrap: './vendor/bootstrap.min',
|
||||
diffMatchPatch: './vendor/diff_match_patch.min',
|
||||
handlebars: './vendor/handlebars.min',
|
||||
handlebarsExtended: './utils/handlebars_helper',
|
||||
jquery: './vendor/jquery.min',
|
||||
locales: './locales/locale',
|
||||
lodash: './vendor/lodash.custom.min',
|
||||
pathToRegexp: './vendor/path-to-regexp/index',
|
||||
prismjs: './vendor/prism',
|
||||
semver: './vendor/semver.min',
|
||||
utilsSampleRequest: './utils/send_sample_request',
|
||||
webfontloader: './vendor/webfontloader',
|
||||
list: './vendor/list.min',
|
||||
apiData: './api_data',
|
||||
apiProject: './api_project',
|
||||
},
|
||||
shim: {
|
||||
bootstrap: {
|
||||
deps: ['jquery']
|
||||
},
|
||||
diffMatchPatch: {
|
||||
exports: 'diff_match_patch'
|
||||
},
|
||||
handlebars: {
|
||||
exports: 'Handlebars'
|
||||
},
|
||||
handlebarsExtended: {
|
||||
deps: ['jquery', 'handlebars'],
|
||||
exports: 'Handlebars'
|
||||
},
|
||||
prismjs: {
|
||||
exports: 'Prism'
|
||||
},
|
||||
},
|
||||
urlArgs: 'v=' + (new Date()).getTime(),
|
||||
waitSeconds: 150
|
||||
});
|
||||
|
||||
require([
|
||||
'jquery',
|
||||
'lodash',
|
||||
'locales',
|
||||
'handlebarsExtended',
|
||||
'apiProject',
|
||||
'apiData',
|
||||
'prismjs',
|
||||
'utilsSampleRequest',
|
||||
'semver',
|
||||
'webfontloader',
|
||||
'bootstrap',
|
||||
'pathToRegexp',
|
||||
'list'
|
||||
], function($, _, locale, Handlebars, apiProject, apiData, Prism, sampleRequest, semver, WebFont) {
|
||||
|
||||
// Load google web fonts.
|
||||
WebFont.load({
|
||||
active: function() {
|
||||
// Only init after fonts are loaded.
|
||||
init($, _, locale, Handlebars, apiProject, apiData, Prism, sampleRequest, semver);
|
||||
},
|
||||
inactive: function() {
|
||||
// Run init, even if loading fonts fails
|
||||
init($, _, locale, Handlebars, apiProject, apiData, Prism, sampleRequest, semver);
|
||||
},
|
||||
google: {
|
||||
families: ['Source Code Pro', 'Source Sans Pro:n4,n6,n7']
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
function init($, _, locale, Handlebars, apiProject, apiData, Prism, sampleRequest, semver) {
|
||||
var api = apiData.api;
|
||||
|
||||
//
|
||||
// Templates
|
||||
//
|
||||
var templateHeader = Handlebars.compile( $('#template-header').html() );
|
||||
var templateFooter = Handlebars.compile( $('#template-footer').html() );
|
||||
var templateArticle = Handlebars.compile( $('#template-article').html() );
|
||||
var templateCompareArticle = Handlebars.compile( $('#template-compare-article').html() );
|
||||
var templateGenerator = Handlebars.compile( $('#template-generator').html() );
|
||||
var templateProject = Handlebars.compile( $('#template-project').html() );
|
||||
var templateSections = Handlebars.compile( $('#template-sections').html() );
|
||||
var templateSidenav = Handlebars.compile( $('#template-sidenav').html() );
|
||||
|
||||
//
|
||||
// apiProject defaults
|
||||
//
|
||||
if ( ! apiProject.template)
|
||||
apiProject.template = {};
|
||||
|
||||
if (apiProject.template.withCompare == null)
|
||||
apiProject.template.withCompare = true;
|
||||
|
||||
if (apiProject.template.withGenerator == null)
|
||||
apiProject.template.withGenerator = true;
|
||||
|
||||
if (apiProject.template.forceLanguage)
|
||||
locale.setLanguage(apiProject.template.forceLanguage);
|
||||
|
||||
if (apiProject.template.aloneDisplay == null)
|
||||
apiProject.template.aloneDisplay = false;
|
||||
|
||||
// Setup jQuery Ajax
|
||||
$.ajaxSetup(apiProject.template.jQueryAjaxSetup);
|
||||
|
||||
//
|
||||
// Data transform
|
||||
//
|
||||
// grouped by group
|
||||
var apiByGroup = _.groupBy(api, function(entry) {
|
||||
return entry.group;
|
||||
});
|
||||
|
||||
// grouped by group and name
|
||||
var apiByGroupAndName = {};
|
||||
$.each(apiByGroup, function(index, entries) {
|
||||
apiByGroupAndName[index] = _.groupBy(entries, function(entry) {
|
||||
return entry.name;
|
||||
});
|
||||
});
|
||||
|
||||
//
|
||||
// sort api within a group by title ASC and custom order
|
||||
//
|
||||
var newList = [];
|
||||
var umlauts = { 'ä': 'ae', 'ü': 'ue', 'ö': 'oe', 'ß': 'ss' }; // TODO: remove in version 1.0
|
||||
$.each (apiByGroupAndName, function(index, groupEntries) {
|
||||
// get titles from the first entry of group[].name[] (name has versioning)
|
||||
var titles = [];
|
||||
$.each (groupEntries, function(titleName, entries) {
|
||||
var title = entries[0].title;
|
||||
if(title !== undefined) {
|
||||
title.toLowerCase().replace(/[äöüß]/g, function($0) { return umlauts[$0]; });
|
||||
titles.push(title + '#~#' + titleName); // '#~#' keep reference to titleName after sorting
|
||||
}
|
||||
});
|
||||
// sort by name ASC
|
||||
titles.sort();
|
||||
|
||||
// custom order
|
||||
if (apiProject.order)
|
||||
titles = sortByOrder(titles, apiProject.order, '#~#');
|
||||
|
||||
// add single elements to the new list
|
||||
titles.forEach(function(name) {
|
||||
var values = name.split('#~#');
|
||||
var key = values[1];
|
||||
groupEntries[key].forEach(function(entry) {
|
||||
newList.push(entry);
|
||||
});
|
||||
});
|
||||
});
|
||||
// api overwrite with ordered list
|
||||
api = newList;
|
||||
|
||||
//
|
||||
// Group- and Versionlists
|
||||
//
|
||||
var apiGroups = {};
|
||||
var apiGroupTitles = {};
|
||||
var apiVersions = {};
|
||||
apiVersions[apiProject.version] = 1;
|
||||
|
||||
$.each(api, function(index, entry) {
|
||||
apiGroups[entry.group] = 1;
|
||||
apiGroupTitles[entry.group] = entry.groupTitle || entry.group;
|
||||
apiVersions[entry.version] = 1;
|
||||
});
|
||||
|
||||
// sort groups
|
||||
apiGroups = Object.keys(apiGroups);
|
||||
apiGroups.sort();
|
||||
|
||||
// custom order
|
||||
if (apiProject.order)
|
||||
apiGroups = sortByOrder(apiGroups, apiProject.order);
|
||||
|
||||
// sort versions DESC
|
||||
apiVersions = Object.keys(apiVersions);
|
||||
apiVersions.sort(semver.compare);
|
||||
apiVersions.reverse();
|
||||
|
||||
//
|
||||
// create Navigationlist
|
||||
//
|
||||
var nav = [];
|
||||
apiGroups.forEach(function(group) {
|
||||
// Mainmenu entry
|
||||
nav.push({
|
||||
group: group,
|
||||
isHeader: true,
|
||||
title: apiGroupTitles[group]
|
||||
});
|
||||
|
||||
// Submenu
|
||||
var oldName = '';
|
||||
api.forEach(function(entry) {
|
||||
if (entry.group === group) {
|
||||
if (oldName !== entry.name) {
|
||||
nav.push({
|
||||
title: entry.title,
|
||||
group: group,
|
||||
name: entry.name,
|
||||
type: entry.type,
|
||||
version: entry.version,
|
||||
url: entry.url
|
||||
});
|
||||
} else {
|
||||
nav.push({
|
||||
title: entry.title,
|
||||
group: group,
|
||||
hidden: true,
|
||||
name: entry.name,
|
||||
type: entry.type,
|
||||
version: entry.version,
|
||||
url: entry.url
|
||||
});
|
||||
}
|
||||
oldName = entry.name;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
/**
|
||||
* Add navigation items by analyzing the HTML content and searching for h1 and h2 tags
|
||||
* @param nav Object the navigation array
|
||||
* @param content string the compiled HTML content
|
||||
* @param index where to insert items
|
||||
* @return boolean true if any good-looking (i.e. with a group identifier) <h1> tag was found
|
||||
*/
|
||||
function add_nav(nav, content, index) {
|
||||
var found_level1 = false;
|
||||
if ( ! content) {
|
||||
return found_level1;
|
||||
}
|
||||
var topics = content.match(/<h(1|2).*?>(.+?)<\/h(1|2)>/gi);
|
||||
if ( topics ) {
|
||||
topics.forEach(function(entry) {
|
||||
var level = entry.substring(2,3);
|
||||
var title = entry.replace(/<.+?>/g, ''); // Remove all HTML tags for the title
|
||||
var entry_tags = entry.match(/id="api-([^\-]+)(?:-(.+))?"/); // Find the group and name in the id property
|
||||
var group = (entry_tags ? entry_tags[1] : null);
|
||||
var name = (entry_tags ? entry_tags[2] : null);
|
||||
if (level==1 && title && group) {
|
||||
nav.splice(index, 0, {
|
||||
group: group,
|
||||
isHeader: true,
|
||||
title: title,
|
||||
isFixed: true
|
||||
});
|
||||
index++;
|
||||
found_level1 = true;
|
||||
}
|
||||
if (level==2 && title && group && name) {
|
||||
nav.splice(index, 0, {
|
||||
group: group,
|
||||
name: name,
|
||||
isHeader: false,
|
||||
title: title,
|
||||
isFixed: false,
|
||||
version: '1.0'
|
||||
});
|
||||
index++;
|
||||
}
|
||||
});
|
||||
}
|
||||
return found_level1;
|
||||
}
|
||||
|
||||
// Mainmenu Header entry
|
||||
if (apiProject.header) {
|
||||
var found_level1 = add_nav(nav, apiProject.header.content, 0); // Add level 1 and 2 titles
|
||||
if (!found_level1) { // If no Level 1 tags were found, make a title
|
||||
nav.unshift({
|
||||
group: '_',
|
||||
isHeader: true,
|
||||
title: (apiProject.header.title == null) ? locale.__('General') : apiProject.header.title,
|
||||
isFixed: true
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// Mainmenu Footer entry
|
||||
if (apiProject.footer) {
|
||||
var last_nav_index = nav.length;
|
||||
var found_level1 = add_nav(nav, apiProject.footer.content, nav.length); // Add level 1 and 2 titles
|
||||
if (!found_level1 && apiProject.footer.title != null) { // If no Level 1 tags were found, make a title
|
||||
nav.splice(last_nav_index, 0, {
|
||||
group: '_footer',
|
||||
isHeader: true,
|
||||
title: apiProject.footer.title,
|
||||
isFixed: true
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// render pagetitle
|
||||
var title = apiProject.title ? apiProject.title : 'apiDoc: ' + apiProject.name + ' - ' + apiProject.version;
|
||||
$(document).attr('title', title);
|
||||
|
||||
// remove loader
|
||||
$('#loader').remove();
|
||||
|
||||
// render sidenav
|
||||
var fields = {
|
||||
nav: nav
|
||||
};
|
||||
$('#sidenav').append( templateSidenav(fields) );
|
||||
|
||||
// render Generator
|
||||
$('#generator').append( templateGenerator(apiProject) );
|
||||
|
||||
// render Project
|
||||
_.extend(apiProject, { versions: apiVersions});
|
||||
$('#project').append( templateProject(apiProject) );
|
||||
|
||||
// render apiDoc, header/footer documentation
|
||||
if (apiProject.header)
|
||||
$('#header').append( templateHeader(apiProject.header) );
|
||||
|
||||
if (apiProject.footer)
|
||||
$('#footer').append( templateFooter(apiProject.footer) );
|
||||
|
||||
//
|
||||
// Render Sections and Articles
|
||||
//
|
||||
var articleVersions = {};
|
||||
var content = '';
|
||||
apiGroups.forEach(function(groupEntry) {
|
||||
var articles = [];
|
||||
var oldName = '';
|
||||
var fields = {};
|
||||
var title = groupEntry;
|
||||
var description = '';
|
||||
articleVersions[groupEntry] = {};
|
||||
|
||||
// render all articles of a group
|
||||
api.forEach(function(entry) {
|
||||
if(groupEntry === entry.group) {
|
||||
if (oldName !== entry.name) {
|
||||
// determine versions
|
||||
api.forEach(function(versionEntry) {
|
||||
if (groupEntry === versionEntry.group && entry.name === versionEntry.name) {
|
||||
if ( ! articleVersions[entry.group].hasOwnProperty(entry.name) ) {
|
||||
articleVersions[entry.group][entry.name] = [];
|
||||
}
|
||||
articleVersions[entry.group][entry.name].push(versionEntry.version);
|
||||
}
|
||||
});
|
||||
fields = {
|
||||
article: entry,
|
||||
versions: articleVersions[entry.group][entry.name]
|
||||
};
|
||||
} else {
|
||||
fields = {
|
||||
article: entry,
|
||||
hidden: true,
|
||||
versions: articleVersions[entry.group][entry.name]
|
||||
};
|
||||
}
|
||||
|
||||
// add prefix URL for endpoint unless it's already absolute
|
||||
if (apiProject.url) {
|
||||
if (fields.article.url.substr(0, 4).toLowerCase() !== 'http') {
|
||||
fields.article.url = apiProject.url + fields.article.url;
|
||||
}
|
||||
}
|
||||
|
||||
addArticleSettings(fields, entry);
|
||||
|
||||
if (entry.groupTitle)
|
||||
title = entry.groupTitle;
|
||||
|
||||
// TODO: make groupDescription compareable with older versions (not important for the moment)
|
||||
if (entry.groupDescription)
|
||||
description = entry.groupDescription;
|
||||
|
||||
articles.push({
|
||||
article: templateArticle(fields),
|
||||
group: entry.group,
|
||||
name: entry.name,
|
||||
aloneDisplay: apiProject.template.aloneDisplay
|
||||
});
|
||||
oldName = entry.name;
|
||||
}
|
||||
});
|
||||
|
||||
// render Section with Articles
|
||||
var fields = {
|
||||
group: groupEntry,
|
||||
title: title,
|
||||
description: description,
|
||||
articles: articles,
|
||||
aloneDisplay: apiProject.template.aloneDisplay
|
||||
};
|
||||
content += templateSections(fields);
|
||||
});
|
||||
$('#sections').append( content );
|
||||
|
||||
// Bootstrap Scrollspy
|
||||
$(this).scrollspy({ target: '#scrollingNav' });
|
||||
|
||||
// Content-Scroll on Navigation click.
|
||||
$('.sidenav').find('a').on('click', function(e) {
|
||||
e.preventDefault();
|
||||
var id = $(this).attr('href');
|
||||
if ($(id).length > 0)
|
||||
$('html,body').animate({ scrollTop: parseInt($(id).offset().top) }, 400);
|
||||
window.location.hash = $(this).attr('href');
|
||||
});
|
||||
|
||||
/**
|
||||
* Check if Parameter (sub) List has a type Field.
|
||||
* Example: @apiSuccess varname1 No type.
|
||||
* @apiSuccess {String} varname2 With type.
|
||||
*
|
||||
* @param {Object} fields
|
||||
*/
|
||||
function _hasTypeInFields(fields) {
|
||||
var result = false;
|
||||
$.each(fields, function(name) {
|
||||
result = result || _.some(fields[name], function(item) { return item.type; });
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* On Template changes, recall plugins.
|
||||
*/
|
||||
function initDynamic() {
|
||||
// Bootstrap popover
|
||||
$('button[data-toggle="popover"]').popover().click(function(e) {
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
var version = $('#version strong').html();
|
||||
$('#sidenav li').removeClass('is-new');
|
||||
if (apiProject.template.withCompare) {
|
||||
$('#sidenav li[data-version=\'' + version + '\']').each(function(){
|
||||
var group = $(this).data('group');
|
||||
var name = $(this).data('name');
|
||||
var length = $('#sidenav li[data-group=\'' + group + '\'][data-name=\'' + name + '\']').length;
|
||||
var index = $('#sidenav li[data-group=\'' + group + '\'][data-name=\'' + name + '\']').index($(this));
|
||||
if (length === 1 || index === (length - 1))
|
||||
$(this).addClass('is-new');
|
||||
});
|
||||
}
|
||||
|
||||
// tabs
|
||||
$('.nav-tabs-examples a').click(function (e) {
|
||||
e.preventDefault();
|
||||
$(this).tab('show');
|
||||
});
|
||||
$('.nav-tabs-examples').find('a:first').tab('show');
|
||||
|
||||
// sample header-content-type switch
|
||||
$('.sample-header-content-type-switch').change(function () {
|
||||
var paramName = '.' + $(this).attr('name') + '-fields';
|
||||
var bodyName = '.' + $(this).attr('name') + '-body';
|
||||
var selectName = 'select[name=' + $(this).attr('name') + ']';
|
||||
if ($(this).val() == 'body-json') {
|
||||
$(selectName).val('undefined');
|
||||
$(this).val('body-json');
|
||||
$(paramName).removeClass('hide');
|
||||
$(this).parent().nextAll(paramName).first().addClass('hide');
|
||||
$(bodyName).addClass('hide');
|
||||
$(this).parent().nextAll(bodyName).first().removeClass('hide');
|
||||
} else if ($(this).val() == "body-form-data") {
|
||||
$(selectName).val('undefined');
|
||||
$(this).val('body-form-data');
|
||||
$(bodyName).addClass('hide');
|
||||
$(paramName).removeClass('hide');
|
||||
} else {
|
||||
$(this).parent().nextAll(paramName).first().removeClass('hide')
|
||||
$(this).parent().nextAll(bodyName).first().addClass('hide');
|
||||
}
|
||||
$(this).prev('.sample-request-switch').prop('checked', true);
|
||||
});
|
||||
|
||||
// sample request switch
|
||||
$('.sample-request-switch').click(function (e) {
|
||||
var paramName = '.' + $(this).attr('name') + '-fields';
|
||||
var bodyName = '.' + $(this).attr('name') + '-body';
|
||||
var select = $(this).next('.' + $(this).attr('name') + '-select').val();
|
||||
if($(this).prop("checked")){
|
||||
if (select == 'body-json'){
|
||||
$(this).parent().nextAll(bodyName).first().removeClass('hide');
|
||||
}else {
|
||||
$(this).parent().nextAll(paramName).first().removeClass('hide');
|
||||
}
|
||||
}else {
|
||||
if (select == 'body-json'){
|
||||
$(this).parent().nextAll(bodyName).first().addClass('hide');
|
||||
}else {
|
||||
$(this).parent().nextAll(paramName).first().addClass('hide');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
if (apiProject.template.aloneDisplay){
|
||||
//show group
|
||||
$('.show-group').click(function () {
|
||||
var apiGroup = '.' + $(this).attr('data-group') + '-group';
|
||||
var apiGroupArticle = '.' + $(this).attr('data-group') + '-article';
|
||||
$(".show-api-group").addClass('hide');
|
||||
$(apiGroup).removeClass('hide');
|
||||
$(".show-api-article").addClass('hide');
|
||||
$(apiGroupArticle).removeClass('hide');
|
||||
});
|
||||
|
||||
//show api
|
||||
$('.show-api').click(function () {
|
||||
var apiName = '.' + $(this).attr('data-name') + '-article';
|
||||
var apiGroup = '.' + $(this).attr('data-group') + '-group';
|
||||
$(".show-api-group").addClass('hide');
|
||||
$(apiGroup).removeClass('hide');
|
||||
$(".show-api-article").addClass('hide');
|
||||
$(apiName).removeClass('hide');
|
||||
});
|
||||
}
|
||||
|
||||
// call scrollspy refresh method
|
||||
$(window).scrollspy('refresh');
|
||||
|
||||
// init modules
|
||||
sampleRequest.initDynamic();
|
||||
Prism.highlightAll()
|
||||
}
|
||||
initDynamic();
|
||||
|
||||
if (apiProject.template.aloneDisplay) {
|
||||
var hashVal = window.location.hash;
|
||||
if (hashVal != null && hashVal.length !== 0) {
|
||||
$("." + hashVal.slice(1) + "-init").click();
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// HTML-Template specific jQuery-Functions
|
||||
//
|
||||
// Change Main Version
|
||||
function setMainVersion(selectedVersion) {
|
||||
if (typeof(selectedVersion) === 'undefined') {
|
||||
selectedVersion = $('#version strong').html();
|
||||
}
|
||||
else {
|
||||
$('#version strong').html(selectedVersion);
|
||||
}
|
||||
|
||||
// hide all
|
||||
$('article').addClass('hide');
|
||||
$('#sidenav li:not(.nav-fixed)').addClass('hide');
|
||||
|
||||
// show 1st equal or lower Version of each entry
|
||||
$('article[data-version]').each(function(index) {
|
||||
var group = $(this).data('group');
|
||||
var name = $(this).data('name');
|
||||
var version = $(this).data('version');
|
||||
|
||||
if (semver.lte(version, selectedVersion)) {
|
||||
if ($('article[data-group=\'' + group + '\'][data-name=\'' + name + '\']:visible').length === 0) {
|
||||
// enable Article
|
||||
$('article[data-group=\'' + group + '\'][data-name=\'' + name + '\'][data-version=\'' + version + '\']').removeClass('hide');
|
||||
// enable Navigation
|
||||
$('#sidenav li[data-group=\'' + group + '\'][data-name=\'' + name + '\'][data-version=\'' + version + '\']').removeClass('hide');
|
||||
$('#sidenav li.nav-header[data-group=\'' + group + '\']').removeClass('hide');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// show 1st equal or lower Version of each entry
|
||||
$('article[data-version]').each(function(index) {
|
||||
var group = $(this).data('group');
|
||||
$('section#api-' + group).removeClass('hide');
|
||||
if ($('section#api-' + group + ' article:visible').length === 0) {
|
||||
$('section#api-' + group).addClass('hide');
|
||||
} else {
|
||||
$('section#api-' + group).removeClass('hide');
|
||||
}
|
||||
});
|
||||
|
||||
initDynamic();
|
||||
return;
|
||||
}
|
||||
setMainVersion();
|
||||
|
||||
$('#versions li.version a').on('click', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
setMainVersion($(this).html());
|
||||
});
|
||||
|
||||
// compare all article with their predecessor
|
||||
$('#compareAllWithPredecessor').on('click', changeAllVersionCompareTo);
|
||||
|
||||
// change version of an article
|
||||
$('article .versions li.version a').on('click', changeVersionCompareTo);
|
||||
|
||||
// compare url-parameter
|
||||
$.urlParam = function(name) {
|
||||
var results = new RegExp('[\\?&]' + name + '=([^&#]*)').exec(window.location.href);
|
||||
return (results && results[1]) ? results[1] : null;
|
||||
};
|
||||
|
||||
if ($.urlParam('compare')) {
|
||||
// URL Paramter ?compare=1 is set
|
||||
$('#compareAllWithPredecessor').trigger('click');
|
||||
}
|
||||
|
||||
// Quick jump on page load to hash position.
|
||||
// Should happen after setting the main version
|
||||
// and after triggering the click on the compare button,
|
||||
// as these actions modify the content
|
||||
// and would make it jump to the wrong position or not jump at all.
|
||||
if (window.location.hash) {
|
||||
var id = decodeURI(window.location.hash);
|
||||
if ($(id).length > 0)
|
||||
$('html,body').animate({ scrollTop: parseInt($(id).offset().top) }, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize search
|
||||
*/
|
||||
var options = {
|
||||
valueNames: [ 'nav-list-item','nav-list-url-item']
|
||||
};
|
||||
var endpointsList = new List('scrollingNav', options);
|
||||
|
||||
/**
|
||||
* Set initial focus to search input
|
||||
*/
|
||||
$('#scrollingNav .sidenav-search input.search').focus();
|
||||
|
||||
/**
|
||||
* Detect ESC key to reset search
|
||||
*/
|
||||
$(document).keyup(function(e) {
|
||||
if (e.keyCode === 27) $('span.search-reset').click();
|
||||
});
|
||||
|
||||
/**
|
||||
* Search reset
|
||||
*/
|
||||
$('span.search-reset').on('click', function() {
|
||||
$('#scrollingNav .sidenav-search input.search')
|
||||
.val("")
|
||||
.focus()
|
||||
;
|
||||
endpointsList.search();
|
||||
});
|
||||
|
||||
/**
|
||||
* Change version of an article to compare it to an other version.
|
||||
*/
|
||||
function changeVersionCompareTo(e) {
|
||||
e.preventDefault();
|
||||
|
||||
var $root = $(this).parents('article');
|
||||
var selectedVersion = $(this).html();
|
||||
var $button = $root.find('.version');
|
||||
var currentVersion = $button.find('strong').html();
|
||||
$button.find('strong').html(selectedVersion);
|
||||
|
||||
var group = $root.data('group');
|
||||
var name = $root.data('name');
|
||||
var version = $root.data('version');
|
||||
|
||||
var compareVersion = $root.data('compare-version');
|
||||
|
||||
if (compareVersion === selectedVersion)
|
||||
return;
|
||||
|
||||
if ( ! compareVersion && version == selectedVersion)
|
||||
return;
|
||||
|
||||
if (compareVersion && articleVersions[group][name][0] === selectedVersion || version === selectedVersion) {
|
||||
// the version of the entry is set to the highest version (reset)
|
||||
resetArticle(group, name, version);
|
||||
} else {
|
||||
var $compareToArticle = $('article[data-group=\'' + group + '\'][data-name=\'' + name + '\'][data-version=\'' + selectedVersion + '\']');
|
||||
|
||||
var sourceEntry = {};
|
||||
var compareEntry = {};
|
||||
$.each(apiByGroupAndName[group][name], function(index, entry) {
|
||||
if (entry.version === version)
|
||||
sourceEntry = entry;
|
||||
if (entry.version === selectedVersion)
|
||||
compareEntry = entry;
|
||||
});
|
||||
|
||||
var fields = {
|
||||
article: sourceEntry,
|
||||
compare: compareEntry,
|
||||
versions: articleVersions[group][name]
|
||||
};
|
||||
|
||||
// add unique id
|
||||
// TODO: replace all group-name-version in template with id.
|
||||
fields.article.id = fields.article.group + '-' + fields.article.name + '-' + fields.article.version;
|
||||
fields.article.id = fields.article.id.replace(/\./g, '_');
|
||||
|
||||
fields.compare.id = fields.compare.group + '-' + fields.compare.name + '-' + fields.compare.version;
|
||||
fields.compare.id = fields.compare.id.replace(/\./g, '_');
|
||||
|
||||
var entry = sourceEntry;
|
||||
if (entry.parameter && entry.parameter.fields)
|
||||
fields._hasTypeInParameterFields = _hasTypeInFields(entry.parameter.fields);
|
||||
|
||||
if (entry.error && entry.error.fields)
|
||||
fields._hasTypeInErrorFields = _hasTypeInFields(entry.error.fields);
|
||||
|
||||
if (entry.success && entry.success.fields)
|
||||
fields._hasTypeInSuccessFields = _hasTypeInFields(entry.success.fields);
|
||||
|
||||
if (entry.info && entry.info.fields)
|
||||
fields._hasTypeInInfoFields = _hasTypeInFields(entry.info.fields);
|
||||
|
||||
var entry = compareEntry;
|
||||
if (fields._hasTypeInParameterFields !== true && entry.parameter && entry.parameter.fields)
|
||||
fields._hasTypeInParameterFields = _hasTypeInFields(entry.parameter.fields);
|
||||
|
||||
if (fields._hasTypeInErrorFields !== true && entry.error && entry.error.fields)
|
||||
fields._hasTypeInErrorFields = _hasTypeInFields(entry.error.fields);
|
||||
|
||||
if (fields._hasTypeInSuccessFields !== true && entry.success && entry.success.fields)
|
||||
fields._hasTypeInSuccessFields = _hasTypeInFields(entry.success.fields);
|
||||
|
||||
if (fields._hasTypeInInfoFields !== true && entry.info && entry.info.fields)
|
||||
fields._hasTypeInInfoFields = _hasTypeInFields(entry.info.fields);
|
||||
|
||||
var content = templateCompareArticle(fields);
|
||||
$root.after(content);
|
||||
var $content = $root.next();
|
||||
|
||||
// Event on.click re-assign
|
||||
$content.find('.versions li.version a').on('click', changeVersionCompareTo);
|
||||
|
||||
// select navigation
|
||||
$('#sidenav li[data-group=\'' + group + '\'][data-name=\'' + name + '\'][data-version=\'' + currentVersion + '\']').addClass('has-modifications');
|
||||
|
||||
$root.remove();
|
||||
// TODO: on change main version or select the highest version re-render
|
||||
}
|
||||
|
||||
initDynamic();
|
||||
}
|
||||
|
||||
/**
|
||||
* Compare all currently selected Versions with their predecessor.
|
||||
*/
|
||||
function changeAllVersionCompareTo(e) {
|
||||
e.preventDefault();
|
||||
$('article:visible .versions').each(function(){
|
||||
var $root = $(this).parents('article');
|
||||
var currentVersion = $root.data('version');
|
||||
var $foundElement = null;
|
||||
$(this).find('li.version a').each(function() {
|
||||
var selectVersion = $(this).html();
|
||||
if (selectVersion < currentVersion && ! $foundElement)
|
||||
$foundElement = $(this);
|
||||
});
|
||||
|
||||
if($foundElement)
|
||||
$foundElement.trigger('click');
|
||||
});
|
||||
initDynamic();
|
||||
}
|
||||
|
||||
/**
|
||||
* Sort the fields.
|
||||
*/
|
||||
function sortFields(fields_object) {
|
||||
$.each(fields_object, function (key, fields) {
|
||||
|
||||
var reversed = fields.slice().reverse()
|
||||
|
||||
var max_dot_count = Math.max.apply(null, reversed.map(function (item) {
|
||||
return item.field.split(".").length - 1;
|
||||
}))
|
||||
|
||||
for (var dot_count = 1; dot_count <= max_dot_count; dot_count++) {
|
||||
reversed.forEach(function (item, index) {
|
||||
var parts = item.field.split(".");
|
||||
if (parts.length - 1 == dot_count) {
|
||||
var fields_names = fields.map(function (item) { return item.field; });
|
||||
if (parts.slice(1).length >= 1) {
|
||||
var prefix = parts.slice(0, parts.length - 1).join(".");
|
||||
var prefix_index = fields_names.indexOf(prefix);
|
||||
if (prefix_index > -1) {
|
||||
fields.splice(fields_names.indexOf(item.field), 1);
|
||||
fields.splice(prefix_index + 1, 0, item);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Add article settings.
|
||||
*/
|
||||
function addArticleSettings(fields, entry) {
|
||||
// add unique id
|
||||
// TODO: replace all group-name-version in template with id.
|
||||
fields.id = fields.article.group + '-' + fields.article.name + '-' + fields.article.version;
|
||||
fields.id = fields.id.replace(/\./g, '_');
|
||||
|
||||
if (entry.header && entry.header.fields) {
|
||||
sortFields(entry.header.fields);
|
||||
fields._hasTypeInHeaderFields = _hasTypeInFields(entry.header.fields);
|
||||
}
|
||||
|
||||
if (entry.parameter && entry.parameter.fields) {
|
||||
sortFields(entry.parameter.fields);
|
||||
fields._hasTypeInParameterFields = _hasTypeInFields(entry.parameter.fields);
|
||||
}
|
||||
|
||||
if (entry.error && entry.error.fields) {
|
||||
sortFields(entry.error.fields);
|
||||
fields._hasTypeInErrorFields = _hasTypeInFields(entry.error.fields);
|
||||
}
|
||||
|
||||
if (entry.success && entry.success.fields) {
|
||||
sortFields(entry.success.fields);
|
||||
fields._hasTypeInSuccessFields = _hasTypeInFields(entry.success.fields);
|
||||
}
|
||||
|
||||
if (entry.info && entry.info.fields) {
|
||||
sortFields(entry.info.fields);
|
||||
fields._hasTypeInInfoFields = _hasTypeInFields(entry.info.fields);
|
||||
}
|
||||
|
||||
// add template settings
|
||||
fields.template = apiProject.template;
|
||||
}
|
||||
|
||||
/**
|
||||
* Render Article.
|
||||
*/
|
||||
function renderArticle(group, name, version) {
|
||||
var entry = {};
|
||||
$.each(apiByGroupAndName[group][name], function(index, currentEntry) {
|
||||
if (currentEntry.version === version)
|
||||
entry = currentEntry;
|
||||
});
|
||||
var fields = {
|
||||
article: entry,
|
||||
versions: articleVersions[group][name]
|
||||
};
|
||||
|
||||
addArticleSettings(fields, entry);
|
||||
|
||||
return templateArticle(fields);
|
||||
}
|
||||
|
||||
/**
|
||||
* Render original Article and remove the current visible Article.
|
||||
*/
|
||||
function resetArticle(group, name, version) {
|
||||
var $root = $('article[data-group=\'' + group + '\'][data-name=\'' + name + '\']:visible');
|
||||
var content = renderArticle(group, name, version);
|
||||
|
||||
$root.after(content);
|
||||
var $content = $root.next();
|
||||
|
||||
// Event on.click needs to be reassigned (should actually work with on ... automatically)
|
||||
$content.find('.versions li.version a').on('click', changeVersionCompareTo);
|
||||
|
||||
$('#sidenav li[data-group=\'' + group + '\'][data-name=\'' + name + '\'][data-version=\'' + version + '\']').removeClass('has-modifications');
|
||||
|
||||
$root.remove();
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return ordered entries by custom order and append not defined entries to the end.
|
||||
* @param {String[]} elements
|
||||
* @param {String[]} order
|
||||
* @param {String} splitBy
|
||||
* @return {String[]} Custom ordered list.
|
||||
*/
|
||||
function sortByOrder(elements, order, splitBy) {
|
||||
var results = [];
|
||||
order.forEach (function(name) {
|
||||
if (splitBy)
|
||||
elements.forEach (function(element) {
|
||||
var parts = element.split(splitBy);
|
||||
var key = parts[0]; // reference keep for sorting
|
||||
if (key == name || parts[1] == name)
|
||||
results.push(element);
|
||||
});
|
||||
else
|
||||
elements.forEach (function(key) {
|
||||
if (key == name)
|
||||
results.push(name);
|
||||
});
|
||||
});
|
||||
// Append all other entries that ar not defined in order
|
||||
elements.forEach(function(element) {
|
||||
if (results.indexOf(element) === -1)
|
||||
results.push(element);
|
||||
});
|
||||
return results;
|
||||
}
|
||||
Prism.highlightAll()
|
||||
}
|
||||
376
public/docs/utils/handlebars_helper.js
vendored
@@ -1,376 +0,0 @@
|
||||
define([
|
||||
'locales',
|
||||
'handlebars',
|
||||
'diffMatchPatch'
|
||||
], function(locale, Handlebars, DiffMatchPatch) {
|
||||
|
||||
/**
|
||||
* Return a text as markdown.
|
||||
* Currently only a little helper to replace apidoc-inline Links (#Group:Name).
|
||||
* Should be replaced with a full markdown lib.
|
||||
* @param string text
|
||||
*/
|
||||
Handlebars.registerHelper('markdown', function(text) {
|
||||
if ( ! text ) {
|
||||
return text;
|
||||
}
|
||||
text = text.replace(/((\[(.*?)\])?\(#)((.+?):(.+?))(\))/mg, function(match, p1, p2, p3, p4, p5, p6) {
|
||||
var link = p3 || p5 + '/' + p6;
|
||||
return '<a href="#api-' + p5 + '-' + p6 + '">' + link + '</a>';
|
||||
});
|
||||
return text;
|
||||
});
|
||||
|
||||
/**
|
||||
* set paramater type.
|
||||
*/
|
||||
Handlebars.registerHelper("setInputType", function(text) {
|
||||
if (text === "File") {
|
||||
return "file";
|
||||
}
|
||||
return "text";
|
||||
});
|
||||
|
||||
/**
|
||||
* start/stop timer for simple performance check.
|
||||
*/
|
||||
var timer;
|
||||
Handlebars.registerHelper('startTimer', function(text) {
|
||||
timer = new Date();
|
||||
return '';
|
||||
});
|
||||
|
||||
Handlebars.registerHelper('stopTimer', function(text) {
|
||||
console.log(new Date() - timer);
|
||||
return '';
|
||||
});
|
||||
|
||||
/**
|
||||
* Return localized Text.
|
||||
* @param string text
|
||||
*/
|
||||
Handlebars.registerHelper('__', function(text) {
|
||||
return locale.__(text);
|
||||
});
|
||||
|
||||
/**
|
||||
* Console log.
|
||||
* @param mixed obj
|
||||
*/
|
||||
Handlebars.registerHelper('cl', function(obj) {
|
||||
console.log(obj);
|
||||
return '';
|
||||
});
|
||||
|
||||
/**
|
||||
* Replace underscore with space.
|
||||
* @param string text
|
||||
*/
|
||||
Handlebars.registerHelper('underscoreToSpace', function(text) {
|
||||
return text.replace(/(_+)/g, ' ');
|
||||
});
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
Handlebars.registerHelper('assign', function(name) {
|
||||
if(arguments.length > 0) {
|
||||
var type = typeof(arguments[1]);
|
||||
var arg = null;
|
||||
if(type === 'string' || type === 'number' || type === 'boolean') arg = arguments[1];
|
||||
Handlebars.registerHelper(name, function() { return arg; });
|
||||
}
|
||||
return '';
|
||||
});
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
Handlebars.registerHelper('nl2br', function(text) {
|
||||
return _handlebarsNewlineToBreak(text);
|
||||
});
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
Handlebars.registerHelper('if_eq', function(context, options) {
|
||||
var compare = context;
|
||||
// Get length if context is an object
|
||||
if (context instanceof Object && ! (options.hash.compare instanceof Object))
|
||||
compare = Object.keys(context).length;
|
||||
|
||||
if (compare === options.hash.compare)
|
||||
return options.fn(this);
|
||||
|
||||
return options.inverse(this);
|
||||
});
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
Handlebars.registerHelper('if_gt', function(context, options) {
|
||||
var compare = context;
|
||||
// Get length if context is an object
|
||||
if (context instanceof Object && ! (options.hash.compare instanceof Object))
|
||||
compare = Object.keys(context).length;
|
||||
|
||||
if(compare > options.hash.compare)
|
||||
return options.fn(this);
|
||||
|
||||
return options.inverse(this);
|
||||
});
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
var templateCache = {};
|
||||
Handlebars.registerHelper('subTemplate', function(name, sourceContext) {
|
||||
if ( ! templateCache[name])
|
||||
templateCache[name] = Handlebars.compile($('#template-' + name).html());
|
||||
|
||||
var template = templateCache[name];
|
||||
var templateContext = $.extend({}, this, sourceContext.hash);
|
||||
return new Handlebars.SafeString( template(templateContext) );
|
||||
});
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
Handlebars.registerHelper('toLowerCase', function(value) {
|
||||
return (value && typeof value === 'string') ? value.toLowerCase() : '';
|
||||
});
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
Handlebars.registerHelper('splitFill', function(value, splitChar, fillChar) {
|
||||
var splits = value.split(splitChar);
|
||||
return new Array(splits.length).join(fillChar) + splits[splits.length - 1];
|
||||
});
|
||||
|
||||
/**
|
||||
* Convert Newline to HTML-Break (nl2br).
|
||||
*
|
||||
* @param {String} text
|
||||
* @returns {String}
|
||||
*/
|
||||
function _handlebarsNewlineToBreak(text) {
|
||||
return ('' + text).replace(/([^>\r\n]?)(\r\n|\n\r|\r|\n)/g, '$1' + '<br>' + '$2');
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
Handlebars.registerHelper('each_compare_list_field', function(source, compare, options) {
|
||||
var fieldName = options.hash.field;
|
||||
var newSource = [];
|
||||
if (source) {
|
||||
source.forEach(function(entry) {
|
||||
var values = entry;
|
||||
values['key'] = entry[fieldName];
|
||||
newSource.push(values);
|
||||
});
|
||||
}
|
||||
|
||||
var newCompare = [];
|
||||
if (compare) {
|
||||
compare.forEach(function(entry) {
|
||||
var values = entry;
|
||||
values['key'] = entry[fieldName];
|
||||
newCompare.push(values);
|
||||
});
|
||||
}
|
||||
return _handlebarsEachCompared('key', newSource, newCompare, options);
|
||||
});
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
Handlebars.registerHelper('each_compare_keys', function(source, compare, options) {
|
||||
var newSource = [];
|
||||
if (source) {
|
||||
var sourceFields = Object.keys(source);
|
||||
sourceFields.forEach(function(name) {
|
||||
var values = {};
|
||||
values['value'] = source[name];
|
||||
values['key'] = name;
|
||||
newSource.push(values);
|
||||
});
|
||||
}
|
||||
|
||||
var newCompare = [];
|
||||
if (compare) {
|
||||
var compareFields = Object.keys(compare);
|
||||
compareFields.forEach(function(name) {
|
||||
var values = {};
|
||||
values['value'] = compare[name];
|
||||
values['key'] = name;
|
||||
newCompare.push(values);
|
||||
});
|
||||
}
|
||||
return _handlebarsEachCompared('key', newSource, newCompare, options);
|
||||
});
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
Handlebars.registerHelper('each_compare_field', function(source, compare, options) {
|
||||
return _handlebarsEachCompared('field', source, compare, options);
|
||||
});
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
Handlebars.registerHelper('each_compare_title', function(source, compare, options) {
|
||||
return _handlebarsEachCompared('title', source, compare, options);
|
||||
});
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
Handlebars.registerHelper('reformat', function(source, type){
|
||||
if (type == 'json')
|
||||
try {
|
||||
return JSON.stringify(JSON.parse(source.trim()),null, " ");
|
||||
} catch(e) {
|
||||
|
||||
}
|
||||
return source
|
||||
});
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
Handlebars.registerHelper('showDiff', function(source, compare, options) {
|
||||
var ds = '';
|
||||
if(source === compare) {
|
||||
ds = source;
|
||||
} else {
|
||||
if( ! source)
|
||||
return compare;
|
||||
|
||||
if( ! compare)
|
||||
return source;
|
||||
|
||||
var d = diffMatchPatch.diff_main(stripHtml(compare), stripHtml(source));
|
||||
diffMatchPatch.diff_cleanupSemantic(d);
|
||||
ds = diffMatchPatch.diff_prettyHtml(d);
|
||||
ds = ds.replace(/¶/gm, '');
|
||||
}
|
||||
if(options === 'nl2br')
|
||||
ds = _handlebarsNewlineToBreak(ds);
|
||||
|
||||
return ds;
|
||||
});
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
function _handlebarsEachCompared(fieldname, source, compare, options)
|
||||
{
|
||||
var dataList = [];
|
||||
var index = 0;
|
||||
if(source) {
|
||||
source.forEach(function(sourceEntry) {
|
||||
var found = false;
|
||||
if (compare) {
|
||||
compare.forEach(function(compareEntry) {
|
||||
if(sourceEntry[fieldname] === compareEntry[fieldname]) {
|
||||
var data = {
|
||||
typeSame: true,
|
||||
source: sourceEntry,
|
||||
compare: compareEntry,
|
||||
index: index
|
||||
};
|
||||
dataList.push(data);
|
||||
found = true;
|
||||
index++;
|
||||
}
|
||||
});
|
||||
}
|
||||
if ( ! found) {
|
||||
var data = {
|
||||
typeIns: true,
|
||||
source: sourceEntry,
|
||||
index: index
|
||||
};
|
||||
dataList.push(data);
|
||||
index++;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if (compare) {
|
||||
compare.forEach(function(compareEntry) {
|
||||
var found = false;
|
||||
if (source) {
|
||||
source.forEach(function(sourceEntry) {
|
||||
if(sourceEntry[fieldname] === compareEntry[fieldname])
|
||||
found = true;
|
||||
});
|
||||
}
|
||||
if ( ! found) {
|
||||
var data = {
|
||||
typeDel: true,
|
||||
compare: compareEntry,
|
||||
index: index
|
||||
};
|
||||
dataList.push(data);
|
||||
index++;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
var ret = '';
|
||||
var length = dataList.length;
|
||||
for (var index in dataList) {
|
||||
if(index == (length - 1))
|
||||
dataList[index]['_last'] = true;
|
||||
ret = ret + options.fn(dataList[index]);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
var diffMatchPatch = new DiffMatchPatch();
|
||||
|
||||
/**
|
||||
* Overwrite Colors
|
||||
*/
|
||||
DiffMatchPatch.prototype.diff_prettyHtml = function(diffs) {
|
||||
var html = [];
|
||||
var pattern_amp = /&/g;
|
||||
var pattern_lt = /</g;
|
||||
var pattern_gt = />/g;
|
||||
var pattern_para = /\n/g;
|
||||
for (var x = 0; x < diffs.length; x++) {
|
||||
var op = diffs[x][0]; // Operation (insert, delete, equal)
|
||||
var data = diffs[x][1]; // Text of change.
|
||||
var text = data.replace(pattern_amp, '&').replace(pattern_lt, '<')
|
||||
.replace(pattern_gt, '>').replace(pattern_para, '¶<br>');
|
||||
switch (op) {
|
||||
case DIFF_INSERT:
|
||||
html[x] = '<ins>' + text + '</ins>';
|
||||
break;
|
||||
case DIFF_DELETE:
|
||||
html[x] = '<del>' + text + '</del>';
|
||||
break;
|
||||
case DIFF_EQUAL:
|
||||
html[x] = '<span>' + text + '</span>';
|
||||
break;
|
||||
}
|
||||
}
|
||||
return html.join('');
|
||||
};
|
||||
|
||||
/**
|
||||
* Fixes html after comparison (#506, #538, #616, #825)
|
||||
*/
|
||||
function stripHtml(html){
|
||||
var div = document.createElement("div");
|
||||
div.innerHTML = html;
|
||||
return div.textContent || div.innerText || "";
|
||||
}
|
||||
|
||||
// Exports
|
||||
return Handlebars;
|
||||
});
|
||||
272
public/docs/utils/send_sample_request.js
vendored
@@ -1,272 +0,0 @@
|
||||
define([
|
||||
'jquery',
|
||||
'lodash',
|
||||
'./utils/send_sample_request_utils'
|
||||
], function($, _, utils) {
|
||||
|
||||
var initDynamic = function() {
|
||||
// Button send
|
||||
$(".sample-request-send").off("click");
|
||||
$(".sample-request-send").on("click", function(e) {
|
||||
e.preventDefault();
|
||||
var $root = $(this).parents("article");
|
||||
var group = $root.data("group");
|
||||
var name = $root.data("name");
|
||||
var version = $root.data("version");
|
||||
sendSampleRequest(group, name, version, $(this).data("sample-request-type"));
|
||||
});
|
||||
|
||||
// Button clear
|
||||
$(".sample-request-clear").off("click");
|
||||
$(".sample-request-clear").on("click", function(e) {
|
||||
e.preventDefault();
|
||||
var $root = $(this).parents("article");
|
||||
var group = $root.data("group");
|
||||
var name = $root.data("name");
|
||||
var version = $root.data("version");
|
||||
clearSampleRequest(group, name, version);
|
||||
});
|
||||
}; // initDynamic
|
||||
|
||||
function sendSampleRequest(group, name, version, type)
|
||||
{
|
||||
var $root = $('article[data-group="' + group + '"][data-name="' + name + '"][data-version="' + version + '"]');
|
||||
|
||||
// Optional header
|
||||
var header = {};
|
||||
$root.find(".sample-request-header:checked").each(function(i, element) {
|
||||
var group = $(element).data("sample-request-header-group-id");
|
||||
$root.find("[data-sample-request-header-group=\"" + group + "\"]").each(function(i, element) {
|
||||
var key = $(element).data("sample-request-header-name");
|
||||
var value = element.value;
|
||||
if (typeof element.optional === 'undefined') {
|
||||
element.optional = true;
|
||||
}
|
||||
if ( ! element.optional && element.defaultValue !== '') {
|
||||
value = element.defaultValue;
|
||||
}
|
||||
header[key] = value;
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
// create JSON dictionary of parameters
|
||||
var param = {};
|
||||
var paramType = {};
|
||||
var bodyFormData = new FormData();
|
||||
var bodyJson = '';
|
||||
$root.find(".sample-request-param:checked").each(function(i, element) {
|
||||
var group = $(element).data("sample-request-param-group-id");
|
||||
var contentType = $(element).nextAll('.sample-header-content-type-switch').first().val();
|
||||
if (contentType == "body-json"){
|
||||
$root.find("[data-sample-request-body-group=\"" + group + "\"]").not(function(){
|
||||
return $(this).val() == "" && $(this).is("[data-sample-request-param-optional='true']");
|
||||
}).each(function(i, element) {
|
||||
if (isJson(element.value)){
|
||||
header['Content-Type'] = 'application/json';
|
||||
bodyJson = element.value;
|
||||
}
|
||||
});
|
||||
}else {
|
||||
$root.find("[data-sample-request-param-group=\"" + group + "\"]").not(function(){
|
||||
return $(this).val() == "" && $(this).is("[data-sample-request-param-optional='true']");
|
||||
}).each(function(i, element) {
|
||||
var key = $(element).data("sample-request-param-name");
|
||||
var value = element.value;
|
||||
if ( ! element.optional && element.defaultValue !== '') {
|
||||
value = element.defaultValue;
|
||||
}
|
||||
if (contentType == "body-form-data"){
|
||||
header['Content-Type'] = 'multipart/form-data'
|
||||
if (element.type == "file") {
|
||||
value = element.files[0];
|
||||
}
|
||||
bodyFormData.append(key,value);
|
||||
}else {
|
||||
param[key] = value;
|
||||
paramType[key] = $(element).next().text();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
// grab user-inputted URL
|
||||
var url = $root.find(".sample-request-url").val();
|
||||
|
||||
//Convert {param} form to :param
|
||||
url = utils.convertPathParams(url);
|
||||
|
||||
// Insert url parameter
|
||||
var pattern = pathToRegexp(url, null);
|
||||
var matches = pattern.exec(url);
|
||||
for (var i = 1; i < matches.length; i++) {
|
||||
var key = matches[i].substr(1);
|
||||
var optional = false
|
||||
if (key[key.length - 1] === '?') {
|
||||
optional = true;
|
||||
key = key.substr(0, key.length - 1);
|
||||
}
|
||||
if (param[key] !== undefined) {
|
||||
url = url.replace(matches[i], encodeURIComponent(param[key]));
|
||||
|
||||
// remove URL parameters from list
|
||||
delete param[key];
|
||||
} else if (optional) {
|
||||
// if parameter is optional denoted by ending '?' in param (:param?)
|
||||
// and no parameter is given, replace parameter with empty string instead
|
||||
url = url.replace(matches[i], '');
|
||||
delete param[key];
|
||||
}
|
||||
} // for
|
||||
|
||||
//handle nested objects and parsing fields
|
||||
param = utils.handleNestedAndParsingFields(param, paramType);
|
||||
|
||||
//add url search parameter
|
||||
if (header['Content-Type'] == 'application/json') {
|
||||
if (bodyJson) {
|
||||
// bodyJson is set to value if request body: 'body/json' was selected and manual json was input
|
||||
// in this case, use the given bodyJson and add other params in query string
|
||||
url = url + encodeSearchParams(param);
|
||||
param = bodyJson;
|
||||
} else {
|
||||
// bodyJson not set, but Content-Type: application/json header was set. In this case, send parameters
|
||||
// as JSON body. First, try parsing fields of object with given paramType definition so that the json
|
||||
// is valid against the parameter spec (e.g. Boolean params are boolean instead of strings in final json)
|
||||
param = utils.tryParsingWithTypes(param, paramType);
|
||||
param = JSON.stringify(param);
|
||||
}
|
||||
}else if (header['Content-Type'] == 'multipart/form-data'){
|
||||
url = url + encodeSearchParams(param);
|
||||
param = bodyFormData;
|
||||
}
|
||||
|
||||
$root.find(".sample-request-response").fadeTo(250, 1);
|
||||
$root.find(".sample-request-response-json").html("Loading...");
|
||||
refreshScrollSpy();
|
||||
|
||||
// send AJAX request, catch success or error callback
|
||||
var ajaxRequest = {
|
||||
url : url,
|
||||
headers : header,
|
||||
data : param,
|
||||
type : type.toUpperCase(),
|
||||
success : displaySuccess,
|
||||
error : displayError
|
||||
};
|
||||
|
||||
if(header['Content-Type'] == 'multipart/form-data'){
|
||||
delete ajaxRequest.headers['Content-Type'];
|
||||
ajaxRequest.contentType=false;
|
||||
ajaxRequest.processData=false;
|
||||
}
|
||||
$.ajax(ajaxRequest);
|
||||
|
||||
|
||||
function displaySuccess(data, status, jqXHR) {
|
||||
var jsonResponse;
|
||||
try {
|
||||
jsonResponse = JSON.parse(jqXHR.responseText);
|
||||
jsonResponse = JSON.stringify(jsonResponse, null, 4);
|
||||
} catch (e) {
|
||||
jsonResponse = jqXHR.responseText;
|
||||
}
|
||||
$root.find(".sample-request-response-json").text(jsonResponse);
|
||||
refreshScrollSpy();
|
||||
};
|
||||
|
||||
function displayError(jqXHR, textStatus, error) {
|
||||
var message = "Error " + jqXHR.status + ": " + error;
|
||||
var jsonResponse;
|
||||
try {
|
||||
jsonResponse = JSON.parse(jqXHR.responseText);
|
||||
jsonResponse = JSON.stringify(jsonResponse, null, 4);
|
||||
} catch (e) {
|
||||
jsonResponse = jqXHR.responseText;
|
||||
}
|
||||
|
||||
if (jsonResponse)
|
||||
message += "\n" + jsonResponse;
|
||||
|
||||
// flicker on previous error to make clear that there is a new response
|
||||
if($root.find(".sample-request-response").is(":visible"))
|
||||
$root.find(".sample-request-response").fadeTo(1, 0.1);
|
||||
|
||||
$root.find(".sample-request-response").fadeTo(250, 1);
|
||||
$root.find(".sample-request-response-json").text(message);
|
||||
refreshScrollSpy();
|
||||
};
|
||||
}
|
||||
|
||||
function clearSampleRequest(group, name, version)
|
||||
{
|
||||
var $root = $('article[data-group="' + group + '"][data-name="' + name + '"][data-version="' + version + '"]');
|
||||
|
||||
// hide sample response
|
||||
$root.find(".sample-request-response-json").html("");
|
||||
$root.find(".sample-request-response").hide();
|
||||
|
||||
// reset value of parameters
|
||||
$root.find(".sample-request-param").each(function(i, element) {
|
||||
element.value = "";
|
||||
});
|
||||
|
||||
// restore default URL
|
||||
var $urlElement = $root.find(".sample-request-url");
|
||||
$urlElement.val($urlElement.prop("defaultValue"));
|
||||
|
||||
refreshScrollSpy();
|
||||
}
|
||||
|
||||
function refreshScrollSpy()
|
||||
{
|
||||
$('[data-spy="scroll"]').each(function () {
|
||||
$(this).scrollspy("refresh");
|
||||
});
|
||||
}
|
||||
|
||||
function escapeHtml(str) {
|
||||
var div = document.createElement("div");
|
||||
div.appendChild(document.createTextNode(str));
|
||||
return div.innerHTML;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* is Json
|
||||
*/
|
||||
function isJson(str) {
|
||||
if (typeof str == 'string') {
|
||||
try {
|
||||
var obj=JSON.parse(str);
|
||||
if(typeof obj == 'object' && obj ){
|
||||
return true;
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
} catch(e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* encode Search Params
|
||||
*/
|
||||
function encodeSearchParams(obj) {
|
||||
const params = [];
|
||||
Object.keys(obj).forEach((key) => {
|
||||
let value = obj[key];
|
||||
params.push([key, encodeURIComponent(value)].join('='));
|
||||
})
|
||||
return params.length === 0 ? '' : '?' + params.join('&');
|
||||
}
|
||||
|
||||
/**
|
||||
* Exports.
|
||||
*/
|
||||
return {
|
||||
initDynamic: initDynamic
|
||||
};
|
||||
|
||||
});
|
||||
97
public/docs/utils/send_sample_request_utils.js
vendored
@@ -1,97 +0,0 @@
|
||||
//this block is used to make this module works with Node (CommonJS module format)
|
||||
if (typeof define !== 'function') {
|
||||
var define = require('amdefine')(module)
|
||||
}
|
||||
|
||||
define(['lodash'], function (_) {
|
||||
|
||||
var log = console;
|
||||
|
||||
function handleNestedFields(object, key, params, paramType) {
|
||||
var attributes = key.split('.');
|
||||
var field = attributes[0];
|
||||
params.push(field);
|
||||
if (attributes.length > 1 && paramType[params.join('.')] == 'Object') {
|
||||
var nestedField = attributes.slice(1).join('.');
|
||||
if (!object[field])
|
||||
object[field] = {};
|
||||
if (typeof object[field] == 'object') {
|
||||
object[field][nestedField] = object[key];
|
||||
delete object[key];
|
||||
handleNestedFields(object[field], nestedField, params, paramType);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function handleNestedFieldsForAllParams(param, paramType) {
|
||||
var result = Object.assign({}, param);
|
||||
Object.keys(result).forEach(function (key) {
|
||||
handleNestedFields(result, key, [], paramType);
|
||||
});
|
||||
return result
|
||||
}
|
||||
|
||||
function handleArraysAndObjectFields(param, paramType) {
|
||||
var result = Object.assign({}, param);
|
||||
Object.keys(paramType).forEach(function (key) {
|
||||
if (result[key] && (paramType[key].endsWith('[]') || paramType[key] === 'Object')) {
|
||||
try {
|
||||
result[key] = JSON.parse(result[key]);
|
||||
} catch (e) {;}
|
||||
}
|
||||
});
|
||||
return result
|
||||
}
|
||||
|
||||
function tryParsingAsType(object, path, type) {
|
||||
var val = _.get(object, path);
|
||||
if (val !== undefined) {
|
||||
if (type === 'Boolean') {
|
||||
if (val === 'true') {
|
||||
_.set(object, path, true);
|
||||
} else if (val === 'false') {
|
||||
_.set(object, path, false);
|
||||
} else {
|
||||
log.warn('Failed to parse object value at path [' + path + ']. Value: (' + val + '). Type: (' + type + ')');
|
||||
}
|
||||
} else if (type === 'Number') {
|
||||
var parsedInt = parseInt(val, 10);
|
||||
if (!_.isNaN(parsedInt)) {
|
||||
_.set(object, path, parsedInt);
|
||||
} else {
|
||||
log.warn('Failed to parse object value at path [' + path + ']. Value: (' + val + '). Type: (' + type + ')');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function handleNestedAndParsingFields(param, paramType) {
|
||||
var result = handleArraysAndObjectFields(param, paramType);
|
||||
result = handleNestedFieldsForAllParams(result, paramType);
|
||||
return result;
|
||||
}
|
||||
|
||||
function tryParsingWithTypes(param, paramType) {
|
||||
var result = Object.assign({}, param);
|
||||
Object.keys(paramType).forEach(function (key) {
|
||||
tryParsingAsType(result, key, paramType[key]);
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
// Converts path params in the {param} format to the accepted :param format, used before inserting the URL params.
|
||||
function convertPathParams(url) {
|
||||
return url.replace(/{(.+?)}/g, ':$1');
|
||||
}
|
||||
|
||||
function setLogger(logger) {
|
||||
log = logger;
|
||||
}
|
||||
|
||||
return {
|
||||
handleNestedAndParsingFields,
|
||||
convertPathParams,
|
||||
tryParsingWithTypes,
|
||||
setLogger
|
||||
};
|
||||
});
|
||||
6
public/docs/vendor/bootstrap.min.js
vendored
49
public/docs/vendor/diff_match_patch.min.js
vendored
@@ -1,49 +0,0 @@
|
||||
(function(){function diff_match_patch(){this.Diff_Timeout=1;this.Diff_EditCost=4;this.Match_Threshold=0.5;this.Match_Distance=1E3;this.Patch_DeleteThreshold=0.5;this.Patch_Margin=4;this.Match_MaxBits=32}
|
||||
diff_match_patch.prototype.diff_main=function(a,b,c,d){"undefined"==typeof d&&(d=0>=this.Diff_Timeout?Number.MAX_VALUE:(new Date).getTime()+1E3*this.Diff_Timeout);if(null==a||null==b)throw Error("Null input. (diff_main)");if(a==b)return a?[[0,a]]:[];"undefined"==typeof c&&(c=!0);var e=c,f=this.diff_commonPrefix(a,b);c=a.substring(0,f);a=a.substring(f);b=b.substring(f);var f=this.diff_commonSuffix(a,b),g=a.substring(a.length-f);a=a.substring(0,a.length-f);b=b.substring(0,b.length-f);a=this.diff_compute_(a,
|
||||
b,e,d);c&&a.unshift([0,c]);g&&a.push([0,g]);this.diff_cleanupMerge(a);return a};
|
||||
diff_match_patch.prototype.diff_compute_=function(a,b,c,d){if(!a)return[[1,b]];if(!b)return[[-1,a]];var e=a.length>b.length?a:b,f=a.length>b.length?b:a,g=e.indexOf(f);return-1!=g?(c=[[1,e.substring(0,g)],[0,f],[1,e.substring(g+f.length)]],a.length>b.length&&(c[0][0]=c[2][0]=-1),c):1==f.length?[[-1,a],[1,b]]:(e=this.diff_halfMatch_(a,b))?(f=e[0],a=e[1],g=e[2],b=e[3],e=e[4],f=this.diff_main(f,g,c,d),c=this.diff_main(a,b,c,d),f.concat([[0,e]],c)):c&&100<a.length&&100<b.length?this.diff_lineMode_(a,b,
|
||||
d):this.diff_bisect_(a,b,d)};
|
||||
diff_match_patch.prototype.diff_lineMode_=function(a,b,c){var d=this.diff_linesToChars_(a,b);a=d.chars1;b=d.chars2;d=d.lineArray;a=this.diff_main(a,b,!1,c);this.diff_charsToLines_(a,d);this.diff_cleanupSemantic(a);a.push([0,""]);for(var e=d=b=0,f="",g="";b<a.length;){switch(a[b][0]){case 1:e++;g+=a[b][1];break;case -1:d++;f+=a[b][1];break;case 0:if(1<=d&&1<=e){a.splice(b-d-e,d+e);b=b-d-e;d=this.diff_main(f,g,!1,c);for(e=d.length-1;0<=e;e--)a.splice(b,0,d[e]);b+=d.length}d=e=0;g=f=""}b++}a.pop();return a};
|
||||
diff_match_patch.prototype.diff_bisect_=function(a,b,c){for(var d=a.length,e=b.length,f=Math.ceil((d+e)/2),g=f,h=2*f,j=Array(h),i=Array(h),k=0;k<h;k++)j[k]=-1,i[k]=-1;j[g+1]=0;i[g+1]=0;for(var k=d-e,q=0!=k%2,r=0,t=0,p=0,w=0,v=0;v<f&&!((new Date).getTime()>c);v++){for(var n=-v+r;n<=v-t;n+=2){var l=g+n,m;m=n==-v||n!=v&&j[l-1]<j[l+1]?j[l+1]:j[l-1]+1;for(var s=m-n;m<d&&s<e&&a.charAt(m)==b.charAt(s);)m++,s++;j[l]=m;if(m>d)t+=2;else if(s>e)r+=2;else if(q&&(l=g+k-n,0<=l&&l<h&&-1!=i[l])){var u=d-i[l];if(m>=
|
||||
u)return this.diff_bisectSplit_(a,b,m,s,c)}}for(n=-v+p;n<=v-w;n+=2){l=g+n;u=n==-v||n!=v&&i[l-1]<i[l+1]?i[l+1]:i[l-1]+1;for(m=u-n;u<d&&m<e&&a.charAt(d-u-1)==b.charAt(e-m-1);)u++,m++;i[l]=u;if(u>d)w+=2;else if(m>e)p+=2;else if(!q&&(l=g+k-n,0<=l&&(l<h&&-1!=j[l])&&(m=j[l],s=g+m-l,u=d-u,m>=u)))return this.diff_bisectSplit_(a,b,m,s,c)}}return[[-1,a],[1,b]]};
|
||||
diff_match_patch.prototype.diff_bisectSplit_=function(a,b,c,d,e){var f=a.substring(0,c),g=b.substring(0,d);a=a.substring(c);b=b.substring(d);f=this.diff_main(f,g,!1,e);e=this.diff_main(a,b,!1,e);return f.concat(e)};
|
||||
diff_match_patch.prototype.diff_linesToChars_=function(a,b){function c(a){for(var b="",c=0,f=-1,g=d.length;f<a.length-1;){f=a.indexOf("\n",c);-1==f&&(f=a.length-1);var r=a.substring(c,f+1),c=f+1;(e.hasOwnProperty?e.hasOwnProperty(r):void 0!==e[r])?b+=String.fromCharCode(e[r]):(b+=String.fromCharCode(g),e[r]=g,d[g++]=r)}return b}var d=[],e={};d[0]="";var f=c(a),g=c(b);return{chars1:f,chars2:g,lineArray:d}};
|
||||
diff_match_patch.prototype.diff_charsToLines_=function(a,b){for(var c=0;c<a.length;c++){for(var d=a[c][1],e=[],f=0;f<d.length;f++)e[f]=b[d.charCodeAt(f)];a[c][1]=e.join("")}};diff_match_patch.prototype.diff_commonPrefix=function(a,b){if(!a||!b||a.charAt(0)!=b.charAt(0))return 0;for(var c=0,d=Math.min(a.length,b.length),e=d,f=0;c<e;)a.substring(f,e)==b.substring(f,e)?f=c=e:d=e,e=Math.floor((d-c)/2+c);return e};
|
||||
diff_match_patch.prototype.diff_commonSuffix=function(a,b){if(!a||!b||a.charAt(a.length-1)!=b.charAt(b.length-1))return 0;for(var c=0,d=Math.min(a.length,b.length),e=d,f=0;c<e;)a.substring(a.length-e,a.length-f)==b.substring(b.length-e,b.length-f)?f=c=e:d=e,e=Math.floor((d-c)/2+c);return e};
|
||||
diff_match_patch.prototype.diff_commonOverlap_=function(a,b){var c=a.length,d=b.length;if(0==c||0==d)return 0;c>d?a=a.substring(c-d):c<d&&(b=b.substring(0,c));c=Math.min(c,d);if(a==b)return c;for(var d=0,e=1;;){var f=a.substring(c-e),f=b.indexOf(f);if(-1==f)return d;e+=f;if(0==f||a.substring(c-e)==b.substring(0,e))d=e,e++}};
|
||||
diff_match_patch.prototype.diff_halfMatch_=function(a,b){function c(a,b,c){for(var d=a.substring(c,c+Math.floor(a.length/4)),e=-1,g="",h,j,n,l;-1!=(e=b.indexOf(d,e+1));){var m=f.diff_commonPrefix(a.substring(c),b.substring(e)),s=f.diff_commonSuffix(a.substring(0,c),b.substring(0,e));g.length<s+m&&(g=b.substring(e-s,e)+b.substring(e,e+m),h=a.substring(0,c-s),j=a.substring(c+m),n=b.substring(0,e-s),l=b.substring(e+m))}return 2*g.length>=a.length?[h,j,n,l,g]:null}if(0>=this.Diff_Timeout)return null;
|
||||
var d=a.length>b.length?a:b,e=a.length>b.length?b:a;if(4>d.length||2*e.length<d.length)return null;var f=this,g=c(d,e,Math.ceil(d.length/4)),d=c(d,e,Math.ceil(d.length/2)),h;if(!g&&!d)return null;h=d?g?g[4].length>d[4].length?g:d:d:g;var j;a.length>b.length?(g=h[0],d=h[1],e=h[2],j=h[3]):(e=h[0],j=h[1],g=h[2],d=h[3]);h=h[4];return[g,d,e,j,h]};
|
||||
diff_match_patch.prototype.diff_cleanupSemantic=function(a){for(var b=!1,c=[],d=0,e=null,f=0,g=0,h=0,j=0,i=0;f<a.length;)0==a[f][0]?(c[d++]=f,g=j,h=i,i=j=0,e=a[f][1]):(1==a[f][0]?j+=a[f][1].length:i+=a[f][1].length,e&&(e.length<=Math.max(g,h)&&e.length<=Math.max(j,i))&&(a.splice(c[d-1],0,[-1,e]),a[c[d-1]+1][0]=1,d--,d--,f=0<d?c[d-1]:-1,i=j=h=g=0,e=null,b=!0)),f++;b&&this.diff_cleanupMerge(a);this.diff_cleanupSemanticLossless(a);for(f=1;f<a.length;){if(-1==a[f-1][0]&&1==a[f][0]){b=a[f-1][1];c=a[f][1];
|
||||
d=this.diff_commonOverlap_(b,c);e=this.diff_commonOverlap_(c,b);if(d>=e){if(d>=b.length/2||d>=c.length/2)a.splice(f,0,[0,c.substring(0,d)]),a[f-1][1]=b.substring(0,b.length-d),a[f+1][1]=c.substring(d),f++}else if(e>=b.length/2||e>=c.length/2)a.splice(f,0,[0,b.substring(0,e)]),a[f-1][0]=1,a[f-1][1]=c.substring(0,c.length-e),a[f+1][0]=-1,a[f+1][1]=b.substring(e),f++;f++}f++}};
|
||||
diff_match_patch.prototype.diff_cleanupSemanticLossless=function(a){function b(a,b){if(!a||!b)return 6;var c=a.charAt(a.length-1),d=b.charAt(0),e=c.match(diff_match_patch.nonAlphaNumericRegex_),f=d.match(diff_match_patch.nonAlphaNumericRegex_),g=e&&c.match(diff_match_patch.whitespaceRegex_),h=f&&d.match(diff_match_patch.whitespaceRegex_),c=g&&c.match(diff_match_patch.linebreakRegex_),d=h&&d.match(diff_match_patch.linebreakRegex_),i=c&&a.match(diff_match_patch.blanklineEndRegex_),j=d&&b.match(diff_match_patch.blanklineStartRegex_);
|
||||
return i||j?5:c||d?4:e&&!g&&h?3:g||h?2:e||f?1:0}for(var c=1;c<a.length-1;){if(0==a[c-1][0]&&0==a[c+1][0]){var d=a[c-1][1],e=a[c][1],f=a[c+1][1],g=this.diff_commonSuffix(d,e);if(g)var h=e.substring(e.length-g),d=d.substring(0,d.length-g),e=h+e.substring(0,e.length-g),f=h+f;for(var g=d,h=e,j=f,i=b(d,e)+b(e,f);e.charAt(0)===f.charAt(0);){var d=d+e.charAt(0),e=e.substring(1)+f.charAt(0),f=f.substring(1),k=b(d,e)+b(e,f);k>=i&&(i=k,g=d,h=e,j=f)}a[c-1][1]!=g&&(g?a[c-1][1]=g:(a.splice(c-1,1),c--),a[c][1]=
|
||||
h,j?a[c+1][1]=j:(a.splice(c+1,1),c--))}c++}};diff_match_patch.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/;diff_match_patch.whitespaceRegex_=/\s/;diff_match_patch.linebreakRegex_=/[\r\n]/;diff_match_patch.blanklineEndRegex_=/\n\r?\n$/;diff_match_patch.blanklineStartRegex_=/^\r?\n\r?\n/;
|
||||
diff_match_patch.prototype.diff_cleanupEfficiency=function(a){for(var b=!1,c=[],d=0,e=null,f=0,g=!1,h=!1,j=!1,i=!1;f<a.length;){if(0==a[f][0])a[f][1].length<this.Diff_EditCost&&(j||i)?(c[d++]=f,g=j,h=i,e=a[f][1]):(d=0,e=null),j=i=!1;else if(-1==a[f][0]?i=!0:j=!0,e&&(g&&h&&j&&i||e.length<this.Diff_EditCost/2&&3==g+h+j+i))a.splice(c[d-1],0,[-1,e]),a[c[d-1]+1][0]=1,d--,e=null,g&&h?(j=i=!0,d=0):(d--,f=0<d?c[d-1]:-1,j=i=!1),b=!0;f++}b&&this.diff_cleanupMerge(a)};
|
||||
diff_match_patch.prototype.diff_cleanupMerge=function(a){a.push([0,""]);for(var b=0,c=0,d=0,e="",f="",g;b<a.length;)switch(a[b][0]){case 1:d++;f+=a[b][1];b++;break;case -1:c++;e+=a[b][1];b++;break;case 0:1<c+d?(0!==c&&0!==d&&(g=this.diff_commonPrefix(f,e),0!==g&&(0<b-c-d&&0==a[b-c-d-1][0]?a[b-c-d-1][1]+=f.substring(0,g):(a.splice(0,0,[0,f.substring(0,g)]),b++),f=f.substring(g),e=e.substring(g)),g=this.diff_commonSuffix(f,e),0!==g&&(a[b][1]=f.substring(f.length-g)+a[b][1],f=f.substring(0,f.length-
|
||||
g),e=e.substring(0,e.length-g))),0===c?a.splice(b-d,c+d,[1,f]):0===d?a.splice(b-c,c+d,[-1,e]):a.splice(b-c-d,c+d,[-1,e],[1,f]),b=b-c-d+(c?1:0)+(d?1:0)+1):0!==b&&0==a[b-1][0]?(a[b-1][1]+=a[b][1],a.splice(b,1)):b++,c=d=0,f=e=""}""===a[a.length-1][1]&&a.pop();c=!1;for(b=1;b<a.length-1;)0==a[b-1][0]&&0==a[b+1][0]&&(a[b][1].substring(a[b][1].length-a[b-1][1].length)==a[b-1][1]?(a[b][1]=a[b-1][1]+a[b][1].substring(0,a[b][1].length-a[b-1][1].length),a[b+1][1]=a[b-1][1]+a[b+1][1],a.splice(b-1,1),c=!0):a[b][1].substring(0,
|
||||
a[b+1][1].length)==a[b+1][1]&&(a[b-1][1]+=a[b+1][1],a[b][1]=a[b][1].substring(a[b+1][1].length)+a[b+1][1],a.splice(b+1,1),c=!0)),b++;c&&this.diff_cleanupMerge(a)};diff_match_patch.prototype.diff_xIndex=function(a,b){var c=0,d=0,e=0,f=0,g;for(g=0;g<a.length;g++){1!==a[g][0]&&(c+=a[g][1].length);-1!==a[g][0]&&(d+=a[g][1].length);if(c>b)break;e=c;f=d}return a.length!=g&&-1===a[g][0]?f:f+(b-e)};
|
||||
diff_match_patch.prototype.diff_prettyHtml=function(a){for(var b=[],c=/&/g,d=/</g,e=/>/g,f=/\n/g,g=0;g<a.length;g++){var h=a[g][0],j=a[g][1],j=j.replace(c,"&").replace(d,"<").replace(e,">").replace(f,"¶<br>");switch(h){case 1:b[g]='<ins style="background:#e6ffe6;">'+j+"</ins>";break;case -1:b[g]='<del style="background:#ffe6e6;">'+j+"</del>";break;case 0:b[g]="<span>"+j+"</span>"}}return b.join("")};
|
||||
diff_match_patch.prototype.diff_text1=function(a){for(var b=[],c=0;c<a.length;c++)1!==a[c][0]&&(b[c]=a[c][1]);return b.join("")};diff_match_patch.prototype.diff_text2=function(a){for(var b=[],c=0;c<a.length;c++)-1!==a[c][0]&&(b[c]=a[c][1]);return b.join("")};diff_match_patch.prototype.diff_levenshtein=function(a){for(var b=0,c=0,d=0,e=0;e<a.length;e++){var f=a[e][0],g=a[e][1];switch(f){case 1:c+=g.length;break;case -1:d+=g.length;break;case 0:b+=Math.max(c,d),d=c=0}}return b+=Math.max(c,d)};
|
||||
diff_match_patch.prototype.diff_toDelta=function(a){for(var b=[],c=0;c<a.length;c++)switch(a[c][0]){case 1:b[c]="+"+encodeURI(a[c][1]);break;case -1:b[c]="-"+a[c][1].length;break;case 0:b[c]="="+a[c][1].length}return b.join("\t").replace(/%20/g," ")};
|
||||
diff_match_patch.prototype.diff_fromDelta=function(a,b){for(var c=[],d=0,e=0,f=b.split(/\t/g),g=0;g<f.length;g++){var h=f[g].substring(1);switch(f[g].charAt(0)){case "+":try{c[d++]=[1,decodeURI(h)]}catch(j){throw Error("Illegal escape in diff_fromDelta: "+h);}break;case "-":case "=":var i=parseInt(h,10);if(isNaN(i)||0>i)throw Error("Invalid number in diff_fromDelta: "+h);h=a.substring(e,e+=i);"="==f[g].charAt(0)?c[d++]=[0,h]:c[d++]=[-1,h];break;default:if(f[g])throw Error("Invalid diff operation in diff_fromDelta: "+
|
||||
f[g]);}}if(e!=a.length)throw Error("Delta length ("+e+") does not equal source text length ("+a.length+").");return c};diff_match_patch.prototype.match_main=function(a,b,c){if(null==a||null==b||null==c)throw Error("Null input. (match_main)");c=Math.max(0,Math.min(c,a.length));return a==b?0:a.length?a.substring(c,c+b.length)==b?c:this.match_bitap_(a,b,c):-1};
|
||||
diff_match_patch.prototype.match_bitap_=function(a,b,c){function d(a,d){var e=a/b.length,g=Math.abs(c-d);return!f.Match_Distance?g?1:e:e+g/f.Match_Distance}if(b.length>this.Match_MaxBits)throw Error("Pattern too long for this browser.");var e=this.match_alphabet_(b),f=this,g=this.Match_Threshold,h=a.indexOf(b,c);-1!=h&&(g=Math.min(d(0,h),g),h=a.lastIndexOf(b,c+b.length),-1!=h&&(g=Math.min(d(0,h),g)));for(var j=1<<b.length-1,h=-1,i,k,q=b.length+a.length,r,t=0;t<b.length;t++){i=0;for(k=q;i<k;)d(t,c+
|
||||
k)<=g?i=k:q=k,k=Math.floor((q-i)/2+i);q=k;i=Math.max(1,c-k+1);var p=Math.min(c+k,a.length)+b.length;k=Array(p+2);for(k[p+1]=(1<<t)-1;p>=i;p--){var w=e[a.charAt(p-1)];k[p]=0===t?(k[p+1]<<1|1)&w:(k[p+1]<<1|1)&w|((r[p+1]|r[p])<<1|1)|r[p+1];if(k[p]&j&&(w=d(t,p-1),w<=g))if(g=w,h=p-1,h>c)i=Math.max(1,2*c-h);else break}if(d(t+1,c)>g)break;r=k}return h};
|
||||
diff_match_patch.prototype.match_alphabet_=function(a){for(var b={},c=0;c<a.length;c++)b[a.charAt(c)]=0;for(c=0;c<a.length;c++)b[a.charAt(c)]|=1<<a.length-c-1;return b};
|
||||
diff_match_patch.prototype.patch_addContext_=function(a,b){if(0!=b.length){for(var c=b.substring(a.start2,a.start2+a.length1),d=0;b.indexOf(c)!=b.lastIndexOf(c)&&c.length<this.Match_MaxBits-this.Patch_Margin-this.Patch_Margin;)d+=this.Patch_Margin,c=b.substring(a.start2-d,a.start2+a.length1+d);d+=this.Patch_Margin;(c=b.substring(a.start2-d,a.start2))&&a.diffs.unshift([0,c]);(d=b.substring(a.start2+a.length1,a.start2+a.length1+d))&&a.diffs.push([0,d]);a.start1-=c.length;a.start2-=c.length;a.length1+=
|
||||
c.length+d.length;a.length2+=c.length+d.length}};
|
||||
diff_match_patch.prototype.patch_make=function(a,b,c){var d;if("string"==typeof a&&"string"==typeof b&&"undefined"==typeof c)d=a,b=this.diff_main(d,b,!0),2<b.length&&(this.diff_cleanupSemantic(b),this.diff_cleanupEfficiency(b));else if(a&&"object"==typeof a&&"undefined"==typeof b&&"undefined"==typeof c)b=a,d=this.diff_text1(b);else if("string"==typeof a&&b&&"object"==typeof b&&"undefined"==typeof c)d=a;else if("string"==typeof a&&"string"==typeof b&&c&&"object"==typeof c)d=a,b=c;else throw Error("Unknown call format to patch_make.");
|
||||
if(0===b.length)return[];c=[];a=new diff_match_patch.patch_obj;for(var e=0,f=0,g=0,h=d,j=0;j<b.length;j++){var i=b[j][0],k=b[j][1];!e&&0!==i&&(a.start1=f,a.start2=g);switch(i){case 1:a.diffs[e++]=b[j];a.length2+=k.length;d=d.substring(0,g)+k+d.substring(g);break;case -1:a.length1+=k.length;a.diffs[e++]=b[j];d=d.substring(0,g)+d.substring(g+k.length);break;case 0:k.length<=2*this.Patch_Margin&&e&&b.length!=j+1?(a.diffs[e++]=b[j],a.length1+=k.length,a.length2+=k.length):k.length>=2*this.Patch_Margin&&
|
||||
e&&(this.patch_addContext_(a,h),c.push(a),a=new diff_match_patch.patch_obj,e=0,h=d,f=g)}1!==i&&(f+=k.length);-1!==i&&(g+=k.length)}e&&(this.patch_addContext_(a,h),c.push(a));return c};diff_match_patch.prototype.patch_deepCopy=function(a){for(var b=[],c=0;c<a.length;c++){var d=a[c],e=new diff_match_patch.patch_obj;e.diffs=[];for(var f=0;f<d.diffs.length;f++)e.diffs[f]=d.diffs[f].slice();e.start1=d.start1;e.start2=d.start2;e.length1=d.length1;e.length2=d.length2;b[c]=e}return b};
|
||||
diff_match_patch.prototype.patch_apply=function(a,b){if(0==a.length)return[b,[]];a=this.patch_deepCopy(a);var c=this.patch_addPadding(a);b=c+b+c;this.patch_splitMax(a);for(var d=0,e=[],f=0;f<a.length;f++){var g=a[f].start2+d,h=this.diff_text1(a[f].diffs),j,i=-1;if(h.length>this.Match_MaxBits){if(j=this.match_main(b,h.substring(0,this.Match_MaxBits),g),-1!=j&&(i=this.match_main(b,h.substring(h.length-this.Match_MaxBits),g+h.length-this.Match_MaxBits),-1==i||j>=i))j=-1}else j=this.match_main(b,h,g);
|
||||
if(-1==j)e[f]=!1,d-=a[f].length2-a[f].length1;else if(e[f]=!0,d=j-g,g=-1==i?b.substring(j,j+h.length):b.substring(j,i+this.Match_MaxBits),h==g)b=b.substring(0,j)+this.diff_text2(a[f].diffs)+b.substring(j+h.length);else if(g=this.diff_main(h,g,!1),h.length>this.Match_MaxBits&&this.diff_levenshtein(g)/h.length>this.Patch_DeleteThreshold)e[f]=!1;else{this.diff_cleanupSemanticLossless(g);for(var h=0,k,i=0;i<a[f].diffs.length;i++){var q=a[f].diffs[i];0!==q[0]&&(k=this.diff_xIndex(g,h));1===q[0]?b=b.substring(0,
|
||||
j+k)+q[1]+b.substring(j+k):-1===q[0]&&(b=b.substring(0,j+k)+b.substring(j+this.diff_xIndex(g,h+q[1].length)));-1!==q[0]&&(h+=q[1].length)}}}b=b.substring(c.length,b.length-c.length);return[b,e]};
|
||||
diff_match_patch.prototype.patch_addPadding=function(a){for(var b=this.Patch_Margin,c="",d=1;d<=b;d++)c+=String.fromCharCode(d);for(d=0;d<a.length;d++)a[d].start1+=b,a[d].start2+=b;var d=a[0],e=d.diffs;if(0==e.length||0!=e[0][0])e.unshift([0,c]),d.start1-=b,d.start2-=b,d.length1+=b,d.length2+=b;else if(b>e[0][1].length){var f=b-e[0][1].length;e[0][1]=c.substring(e[0][1].length)+e[0][1];d.start1-=f;d.start2-=f;d.length1+=f;d.length2+=f}d=a[a.length-1];e=d.diffs;0==e.length||0!=e[e.length-1][0]?(e.push([0,
|
||||
c]),d.length1+=b,d.length2+=b):b>e[e.length-1][1].length&&(f=b-e[e.length-1][1].length,e[e.length-1][1]+=c.substring(0,f),d.length1+=f,d.length2+=f);return c};
|
||||
diff_match_patch.prototype.patch_splitMax=function(a){for(var b=this.Match_MaxBits,c=0;c<a.length;c++)if(!(a[c].length1<=b)){var d=a[c];a.splice(c--,1);for(var e=d.start1,f=d.start2,g="";0!==d.diffs.length;){var h=new diff_match_patch.patch_obj,j=!0;h.start1=e-g.length;h.start2=f-g.length;""!==g&&(h.length1=h.length2=g.length,h.diffs.push([0,g]));for(;0!==d.diffs.length&&h.length1<b-this.Patch_Margin;){var g=d.diffs[0][0],i=d.diffs[0][1];1===g?(h.length2+=i.length,f+=i.length,h.diffs.push(d.diffs.shift()),
|
||||
j=!1):-1===g&&1==h.diffs.length&&0==h.diffs[0][0]&&i.length>2*b?(h.length1+=i.length,e+=i.length,j=!1,h.diffs.push([g,i]),d.diffs.shift()):(i=i.substring(0,b-h.length1-this.Patch_Margin),h.length1+=i.length,e+=i.length,0===g?(h.length2+=i.length,f+=i.length):j=!1,h.diffs.push([g,i]),i==d.diffs[0][1]?d.diffs.shift():d.diffs[0][1]=d.diffs[0][1].substring(i.length))}g=this.diff_text2(h.diffs);g=g.substring(g.length-this.Patch_Margin);i=this.diff_text1(d.diffs).substring(0,this.Patch_Margin);""!==i&&
|
||||
(h.length1+=i.length,h.length2+=i.length,0!==h.diffs.length&&0===h.diffs[h.diffs.length-1][0]?h.diffs[h.diffs.length-1][1]+=i:h.diffs.push([0,i]));j||a.splice(++c,0,h)}}};diff_match_patch.prototype.patch_toText=function(a){for(var b=[],c=0;c<a.length;c++)b[c]=a[c];return b.join("")};
|
||||
diff_match_patch.prototype.patch_fromText=function(a){var b=[];if(!a)return b;a=a.split("\n");for(var c=0,d=/^@@ -(\d+),?(\d*) \+(\d+),?(\d*) @@$/;c<a.length;){var e=a[c].match(d);if(!e)throw Error("Invalid patch string: "+a[c]);var f=new diff_match_patch.patch_obj;b.push(f);f.start1=parseInt(e[1],10);""===e[2]?(f.start1--,f.length1=1):"0"==e[2]?f.length1=0:(f.start1--,f.length1=parseInt(e[2],10));f.start2=parseInt(e[3],10);""===e[4]?(f.start2--,f.length2=1):"0"==e[4]?f.length2=0:(f.start2--,f.length2=
|
||||
parseInt(e[4],10));for(c++;c<a.length;){e=a[c].charAt(0);try{var g=decodeURI(a[c].substring(1))}catch(h){throw Error("Illegal escape in patch_fromText: "+g);}if("-"==e)f.diffs.push([-1,g]);else if("+"==e)f.diffs.push([1,g]);else if(" "==e)f.diffs.push([0,g]);else if("@"==e)break;else if(""!==e)throw Error('Invalid patch mode "'+e+'" in: '+g);c++}}return b};diff_match_patch.patch_obj=function(){this.diffs=[];this.start2=this.start1=null;this.length2=this.length1=0};
|
||||
diff_match_patch.patch_obj.prototype.toString=function(){var a,b;a=0===this.length1?this.start1+",0":1==this.length1?this.start1+1:this.start1+1+","+this.length1;b=0===this.length2?this.start2+",0":1==this.length2?this.start2+1:this.start2+1+","+this.length2;a=["@@ -"+a+" +"+b+" @@\n"];var c;for(b=0;b<this.diffs.length;b++){switch(this.diffs[b][0]){case 1:c="+";break;case -1:c="-";break;case 0:c=" "}a[b+1]=c+encodeURI(this.diffs[b][1])+"\n"}return a.join("").replace(/%20/g," ")};
|
||||
this.diff_match_patch=diff_match_patch;this.DIFF_DELETE=-1;this.DIFF_INSERT=1;this.DIFF_EQUAL=0;})()
|
||||
29
public/docs/vendor/handlebars.min.js
vendored
2
public/docs/vendor/jquery.min.js
vendored
2
public/docs/vendor/list.min.js
vendored
41
public/docs/vendor/lodash.custom.min.js
vendored
@@ -1,41 +0,0 @@
|
||||
/**
|
||||
* @license
|
||||
* Lodash (Custom Build) lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE
|
||||
* Build: `lodash -p -o template/vendor/lodash.custom.min.js include="get,set,groupBy,each,extend,some,isNaN" exports="amd"`
|
||||
*/
|
||||
;(function(){function t(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}function e(t,e,r,n){for(var o=-1,c=null==t?0:t.length;++o<c;){var u=t[o];e(n,u,r(u),t)}return n}function r(t,e){for(var r=-1,n=null==t?0:t.length;++r<n&&false!==e(t[r],r,t););return t}function n(t,e){for(var r=-1,n=null==t?0:t.length,o=0,c=[];++r<n;){var u=t[r];e(u,r,t)&&(c[o++]=u)}return c}function o(t,e){for(var r=-1,n=e.length,o=t.length;++r<n;)t[o+r]=e[r];
|
||||
return t}function c(t,e){for(var r=-1,n=null==t?0:t.length;++r<n;)if(e(t[r],r,t))return true;return false}function u(t){return function(e){return null==e?Ut:e[t]}}function i(t){return function(e){return t(e)}}function a(t){var e=-1,r=Array(t.size);return t.forEach(function(t,n){r[++e]=[n,t]}),r}function f(t){var e=Object;return function(r){return t(e(r))}}function s(t){var e=-1,r=Array(t.size);return t.forEach(function(t){r[++e]=t}),r}function l(){}function b(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){
|
||||
var n=t[e];this.set(n[0],n[1])}}function h(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function p(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function y(t){var e=-1,r=null==t?0:t.length;for(this.__data__=new p;++e<r;)this.add(t[e])}function j(t){this.size=(this.__data__=new h(t)).size}function _(t,e){var r=Ke(t),n=!r&&Je(t),o=!r&&!n&&Qe(t),c=!r&&!n&&!o&&Ze(t);if(r=r||n||o||c){for(var n=t.length,u=String,i=-1,a=Array(n);++i<n;)a[i]=u(i);
|
||||
n=a}else n=[];var f,u=n.length;for(f in t)!e&&!ce.call(t,f)||r&&("length"==f||o&&("offset"==f||"parent"==f)||c&&("buffer"==f||"byteLength"==f||"byteOffset"==f)||ot(f,u))||n.push(f);return n}function v(t,e,r){var n=t[e];ce.call(t,e)&&pt(n,r)&&(r!==Ut||e in t)||m(t,e,r)}function g(t,e){for(var r=t.length;r--;)if(pt(t[r][0],e))return r;return-1}function d(t,e,r,n){return Pe(t,function(t,o,c){e(n,t,r(t),c)}),n}function A(t,e){return t&&G(e,St(e),t)}function w(t,e){return t&&G(e,zt(e),t)}function m(t,e,r){
|
||||
"__proto__"==e&&ve?ve(t,e,{configurable:true,enumerable:true,value:r,writable:true}):t[e]=r}function O(t,e,n,o,c,u){var i,a=1&e,f=2&e,s=4&e;if(n&&(i=c?n(t,o,c,u):n(t)),i!==Ut)return i;if(!vt(t))return t;if(o=Ke(t)){if(i=rt(t),!a)return W(t,i)}else{var l=We(t),b="[object Function]"==l||"[object GeneratorFunction]"==l;if(Qe(t))return R(t,a);if("[object Object]"==l||"[object Arguments]"==l||b&&!c){if(i=f||b?{}:typeof t.constructor!="function"||it(t)?{}:Ne(he(t)),!a)return f?H(t,w(i,t)):q(t,A(i,t))}else{if(!Tt[l])return c?t:{};
|
||||
i=nt(t,l,a)}}if(u||(u=new j),c=u.get(t))return c;if(u.set(t,i),Ye(t))return t.forEach(function(r){i.add(O(r,e,n,r,t,u))}),i;if(Xe(t))return t.forEach(function(r,o){i.set(o,O(r,e,n,o,t,u))}),i;var f=s?f?X:Q:f?zt:St,h=o?Ut:f(t);return r(h||t,function(r,o){h&&(o=r,r=t[o]),v(i,o,O(r,e,n,o,t,u))}),i}function S(t,e){e=C(e,t);for(var r=0,n=e.length;null!=t&&r<n;)t=t[st(e[r++])];return r&&r==n?t:Ut}function z(t,e,r){return e=e(t),Ke(t)?e:o(e,r(t))}function k(t){if(null==t)t=t===Ut?"[object Undefined]":"[object Null]";else if(_e&&_e in Object(t)){
|
||||
var e=ce.call(t,_e),r=t[_e];try{t[_e]=Ut;var n=true}catch(t){}var o=ie.call(t);n&&(e?t[_e]=r:delete t[_e]),t=o}else t=ie.call(t);return t}function x(t){return gt(t)&&"[object Arguments]"==k(t)}function E(t,e,r,n,o){if(t===e)e=true;else if(null==t||null==e||!gt(t)&&!gt(e))e=t!==t&&e!==e;else t:{var c=Ke(t),u=Ke(e),i=c?"[object Array]":We(t),a=u?"[object Array]":We(e),i="[object Arguments]"==i?"[object Object]":i,a="[object Arguments]"==a?"[object Object]":a,f="[object Object]"==i,u="[object Object]"==a;
|
||||
if((a=i==a)&&Qe(t)){if(!Qe(e)){e=false;break t}c=true,f=false}if(a&&!f)o||(o=new j),e=c||Ze(t)?J(t,e,r,n,E,o):K(t,e,i,r,n,E,o);else{if(!(1&r)&&(c=f&&ce.call(t,"__wrapped__"),i=u&&ce.call(e,"__wrapped__"),c||i)){t=c?t.value():t,e=i?e.value():e,o||(o=new j),e=E(t,e,r,n,o);break t}if(a)e:if(o||(o=new j),c=1&r,i=Q(t),u=i.length,a=Q(e).length,u==a||c){for(f=u;f--;){var s=i[f];if(!(c?s in e:ce.call(e,s))){e=false;break e}}if((a=o.get(t))&&o.get(e))e=a==e;else{a=true,o.set(t,e),o.set(e,t);for(var l=c;++f<u;){var s=i[f],b=t[s],h=e[s];
|
||||
if(n)var p=c?n(h,b,s,e,t,o):n(b,h,s,t,e,o);if(p===Ut?b!==h&&!E(b,h,r,n,o):!p){a=false;break}l||(l="constructor"==s)}a&&!l&&(r=t.constructor,n=e.constructor,r!=n&&"constructor"in t&&"constructor"in e&&!(typeof r=="function"&&r instanceof r&&typeof n=="function"&&n instanceof n)&&(a=false)),o.delete(t),o.delete(e),e=a}}else e=false;else e=false}}return e}function F(t){return gt(t)&&"[object Map]"==We(t)}function I(t,e){var r=e.length,n=r;if(null==t)return!n;for(t=Object(t);r--;){var o=e[r];if(o[2]?o[1]!==t[o[0]]:!(o[0]in t))return false;
|
||||
}for(;++r<n;){var o=e[r],c=o[0],u=t[c],i=o[1];if(o[2]){if(u===Ut&&!(c in t))return false}else if(o=new j,void 0===Ut?!E(i,u,3,void 0,o):1)return false}return true}function M(t){return gt(t)&&"[object Set]"==We(t)}function U(t){return gt(t)&&_t(t.length)&&!!Rt[k(t)]}function B(t){return typeof t=="function"?t:null==t?xt:typeof t=="object"?Ke(t)?$(t[0],t[1]):D(t):Ft(t)}function D(t){var e=tt(t);return 1==e.length&&e[0][2]?at(e[0][0],e[0][1]):function(r){return r===t||I(r,e)}}function $(t,e){return ut(t)&&e===e&&!vt(e)?at(st(t),e):function(r){
|
||||
var n=mt(r,t);return n===Ut&&n===e?Ot(r,t):E(e,n,3)}}function L(t){return function(e){return S(e,t)}}function N(t){return Ge(ft(t,xt),t+"")}function P(t,e){var r;return Pe(t,function(t,n,o){return r=e(t,n,o),!r}),!!r}function V(t){if(typeof t=="string")return t;if(Ke(t)){for(var e=V,r=-1,n=null==t?0:t.length,o=Array(n);++r<n;)o[r]=e(t[r],r,t);return o+""}return At(t)?Le?Le.call(t):"":(e=t+"","0"==e&&1/t==-Bt?"-0":e)}function C(t,e){return Ke(t)?t:ut(t,e)?[t]:qe(wt(t))}function R(t,e){if(e)return t.slice();
|
||||
var r=t.length,r=be?be(r):new t.constructor(r);return t.copy(r),r}function T(t){var e=new t.constructor(t.byteLength);return new le(e).set(new le(t)),e}function W(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}function G(t,e,r){var n=!r;r||(r={});for(var o=-1,c=e.length;++o<c;){var u=e[o],i=Ut;i===Ut&&(i=t[u]),n?m(r,u,i):v(r,u,i)}return r}function q(t,e){return G(t,Re(t),e)}function H(t,e){return G(t,Te(t),e)}function J(t,e,r,n,o,u){var i=1&r,a=t.length,f=e.length;if(a!=f&&!(i&&f>a))return false;
|
||||
if((f=u.get(t))&&u.get(e))return f==e;var f=-1,s=true,l=2&r?new y:Ut;for(u.set(t,e),u.set(e,t);++f<a;){var b=t[f],h=e[f];if(n)var p=i?n(h,b,f,e,t,u):n(b,h,f,t,e,u);if(p!==Ut){if(p)continue;s=false;break}if(l){if(!c(e,function(t,e){if(!l.has(e)&&(b===t||o(b,t,r,n,u)))return l.push(e)})){s=false;break}}else if(b!==h&&!o(b,h,r,n,u)){s=false;break}}return u.delete(t),u.delete(e),s}function K(t,e,r,n,o,c,u){switch(r){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)break;t=t.buffer,
|
||||
e=e.buffer;case"[object ArrayBuffer]":if(t.byteLength!=e.byteLength||!c(new le(t),new le(e)))break;return true;case"[object Boolean]":case"[object Date]":case"[object Number]":return pt(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var i=a;case"[object Set]":if(i||(i=s),t.size!=e.size&&!(1&n))break;return(r=u.get(t))?r==e:(n|=2,u.set(t,e),e=J(i(t),i(e),n,o,c,u),u.delete(t),e);case"[object Symbol]":
|
||||
if($e)return $e.call(t)==$e.call(e)}return false}function Q(t){return z(t,St,Re)}function X(t){return z(t,zt,Te)}function Y(){var t=l.iteratee||Et,t=t===Et?B:t;return arguments.length?t(arguments[0],arguments[1]):t}function Z(t,e){var r=t.__data__,n=typeof e;return("string"==n||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==e:null===e)?r[typeof e=="string"?"string":"hash"]:r.map}function tt(t){for(var e=St(t),r=e.length;r--;){var n=e[r],o=t[n];e[r]=[n,o,o===o&&!vt(o)]}return e}function et(t,e){
|
||||
var r=null==t?Ut:t[e];return(!vt(r)||ue&&ue in r?0:(jt(r)?ae:Vt).test(lt(r)))?r:Ut}function rt(t){var e=t.length,r=new t.constructor(e);return e&&"string"==typeof t[0]&&ce.call(t,"index")&&(r.index=t.index,r.input=t.input),r}function nt(t,e,r){var n=t.constructor;switch(e){case"[object ArrayBuffer]":return T(t);case"[object Boolean]":case"[object Date]":return new n(+t);case"[object DataView]":return e=r?T(t.buffer):t.buffer,new t.constructor(e,t.byteOffset,t.byteLength);case"[object Float32Array]":
|
||||
case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return e=r?T(t.buffer):t.buffer,new t.constructor(e,t.byteOffset,t.length);case"[object Map]":return new n;case"[object Number]":case"[object String]":return new n(t);case"[object RegExp]":return e=new t.constructor(t.source,Pt.exec(t)),e.lastIndex=t.lastIndex,e;case"[object Set]":return new n;
|
||||
case"[object Symbol]":return $e?Object($e.call(t)):{}}}function ot(t,e){var r=typeof t;return e=null==e?9007199254740991:e,!!e&&("number"==r||"symbol"!=r&&Ct.test(t))&&-1<t&&0==t%1&&t<e}function ct(t,e,r){if(!vt(r))return false;var n=typeof e;return!!("number"==n?yt(r)&&ot(e,r.length):"string"==n&&e in r)&&pt(r[e],t)}function ut(t,e){if(Ke(t))return false;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!At(t))||($t.test(t)||!Dt.test(t)||null!=e&&t in Object(e))}function it(t){var e=t&&t.constructor;
|
||||
return t===(typeof e=="function"&&e.prototype||re)}function at(t,e){return function(r){return null!=r&&(r[t]===e&&(e!==Ut||t in Object(r)))}}function ft(e,r){var n=void 0,n=we(n===Ut?e.length-1:n,0);return function(){for(var o=arguments,c=-1,u=we(o.length-n,0),i=Array(u);++c<u;)i[c]=o[n+c];for(c=-1,u=Array(n+1);++c<n;)u[c]=o[c];return u[n]=r(i),t(e,this,u)}}function st(t){if(typeof t=="string"||At(t))return t;var e=t+"";return"0"==e&&1/t==-Bt?"-0":e}function lt(t){if(null!=t){try{return oe.call(t);
|
||||
}catch(t){}return t+""}return""}function bt(t,e){return(Ke(t)?r:Pe)(t,Y(e,3))}function ht(t,e){function r(){var n=arguments,o=e?e.apply(this,n):n[0],c=r.cache;return c.has(o)?c.get(o):(n=t.apply(this,n),r.cache=c.set(o,n)||c,n)}if(typeof t!="function"||null!=e&&typeof e!="function")throw new TypeError("Expected a function");return r.cache=new(ht.Cache||p),r}function pt(t,e){return t===e||t!==t&&e!==e}function yt(t){return null!=t&&_t(t.length)&&!jt(t)}function jt(t){return!!vt(t)&&(t=k(t),"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t);
|
||||
}function _t(t){return typeof t=="number"&&-1<t&&0==t%1&&9007199254740991>=t}function vt(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function gt(t){return null!=t&&typeof t=="object"}function dt(t){return typeof t=="number"||gt(t)&&"[object Number]"==k(t)}function At(t){return typeof t=="symbol"||gt(t)&&"[object Symbol]"==k(t)}function wt(t){return null==t?"":V(t)}function mt(t,e,r){return t=null==t?Ut:S(t,e),t===Ut?r:t}function Ot(t,e){var r;if(r=null!=t){r=t;var n;n=C(e,r);for(var o=-1,c=n.length,u=false;++o<c;){
|
||||
var i=st(n[o]);if(!(u=null!=r&&null!=r&&i in Object(r)))break;r=r[i]}u||++o!=c?r=u:(c=null==r?0:r.length,r=!!c&&_t(c)&&ot(i,c)&&(Ke(r)||Je(r)))}return r}function St(t){if(yt(t))t=_(t);else if(it(t)){var e,r=[];for(e in Object(t))ce.call(t,e)&&"constructor"!=e&&r.push(e);t=r}else t=Ae(t);return t}function zt(t){if(yt(t))t=_(t,true);else if(vt(t)){var e,r=it(t),n=[];for(e in t)("constructor"!=e||!r&&ce.call(t,e))&&n.push(e);t=n}else{if(e=[],null!=t)for(r in Object(t))e.push(r);t=e}return t}function kt(t){
|
||||
return function(){return t}}function xt(t){return t}function Et(t){return B(typeof t=="function"?t:O(t,1))}function Ft(t){return ut(t)?u(st(t)):L(t)}function It(){return[]}function Mt(){return false}var Ut,Bt=1/0,Dt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,$t=/^\w*$/,Lt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Nt=/\\(\\)?/g,Pt=/\w*$/,Vt=/^\[object .+?Constructor\]$/,Ct=/^(?:0|[1-9]\d*)$/,Rt={};Rt["[object Float32Array]"]=Rt["[object Float64Array]"]=Rt["[object Int8Array]"]=Rt["[object Int16Array]"]=Rt["[object Int32Array]"]=Rt["[object Uint8Array]"]=Rt["[object Uint8ClampedArray]"]=Rt["[object Uint16Array]"]=Rt["[object Uint32Array]"]=true,
|
||||
Rt["[object Arguments]"]=Rt["[object Array]"]=Rt["[object ArrayBuffer]"]=Rt["[object Boolean]"]=Rt["[object DataView]"]=Rt["[object Date]"]=Rt["[object Error]"]=Rt["[object Function]"]=Rt["[object Map]"]=Rt["[object Number]"]=Rt["[object Object]"]=Rt["[object RegExp]"]=Rt["[object Set]"]=Rt["[object String]"]=Rt["[object WeakMap]"]=false;var Tt={};Tt["[object Arguments]"]=Tt["[object Array]"]=Tt["[object ArrayBuffer]"]=Tt["[object DataView]"]=Tt["[object Boolean]"]=Tt["[object Date]"]=Tt["[object Float32Array]"]=Tt["[object Float64Array]"]=Tt["[object Int8Array]"]=Tt["[object Int16Array]"]=Tt["[object Int32Array]"]=Tt["[object Map]"]=Tt["[object Number]"]=Tt["[object Object]"]=Tt["[object RegExp]"]=Tt["[object Set]"]=Tt["[object String]"]=Tt["[object Symbol]"]=Tt["[object Uint8Array]"]=Tt["[object Uint8ClampedArray]"]=Tt["[object Uint16Array]"]=Tt["[object Uint32Array]"]=true,
|
||||
Tt["[object Error]"]=Tt["[object Function]"]=Tt["[object WeakMap]"]=false;var Wt,Gt=typeof global=="object"&&global&&global.Object===Object&&global,qt=typeof self=="object"&&self&&self.Object===Object&&self,Ht=Gt||qt||Function("return this")(),Jt=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Kt=Jt&&typeof module=="object"&&module&&!module.nodeType&&module,Qt=Kt&&Kt.exports===Jt,Xt=Qt&&Gt.process;t:{try{Wt=Xt&&Xt.binding&&Xt.binding("util");break t}catch(t){}Wt=void 0}var Yt=Wt&&Wt.isMap,Zt=Wt&&Wt.isSet,te=Wt&&Wt.isTypedArray,ee=Array.prototype,re=Object.prototype,ne=Ht["__core-js_shared__"],oe=Function.prototype.toString,ce=re.hasOwnProperty,ue=function(){
|
||||
var t=/[^.]+$/.exec(ne&&ne.keys&&ne.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),ie=re.toString,ae=RegExp("^"+oe.call(ce).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),fe=Qt?Ht.Buffer:Ut,se=Ht.Symbol,le=Ht.Uint8Array,be=fe?fe.a:Ut,he=f(Object.getPrototypeOf),pe=Object.create,ye=re.propertyIsEnumerable,je=ee.splice,_e=se?se.toStringTag:Ut,ve=function(){try{var t=et(Object,"defineProperty");return t({},"",{}),t}catch(t){}
|
||||
}(),ge=Object.getOwnPropertySymbols,de=fe?fe.isBuffer:Ut,Ae=f(Object.keys),we=Math.max,me=Date.now,Oe=et(Ht,"DataView"),Se=et(Ht,"Map"),ze=et(Ht,"Promise"),ke=et(Ht,"Set"),xe=et(Ht,"WeakMap"),Ee=et(Object,"create"),Fe=lt(Oe),Ie=lt(Se),Me=lt(ze),Ue=lt(ke),Be=lt(xe),De=se?se.prototype:Ut,$e=De?De.valueOf:Ut,Le=De?De.toString:Ut,Ne=function(){function t(){}return function(e){return vt(e)?pe?pe(e):(t.prototype=e,e=new t,t.prototype=Ut,e):{}}}();b.prototype.clear=function(){this.__data__=Ee?Ee(null):{},
|
||||
this.size=0},b.prototype.delete=function(t){return t=this.has(t)&&delete this.__data__[t],this.size-=t?1:0,t},b.prototype.get=function(t){var e=this.__data__;return Ee?(t=e[t],"__lodash_hash_undefined__"===t?Ut:t):ce.call(e,t)?e[t]:Ut},b.prototype.has=function(t){var e=this.__data__;return Ee?e[t]!==Ut:ce.call(e,t)},b.prototype.set=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Ee&&e===Ut?"__lodash_hash_undefined__":e,this},h.prototype.clear=function(){this.__data__=[],this.size=0;
|
||||
},h.prototype.delete=function(t){var e=this.__data__;return t=g(e,t),!(0>t)&&(t==e.length-1?e.pop():je.call(e,t,1),--this.size,true)},h.prototype.get=function(t){var e=this.__data__;return t=g(e,t),0>t?Ut:e[t][1]},h.prototype.has=function(t){return-1<g(this.__data__,t)},h.prototype.set=function(t,e){var r=this.__data__,n=g(r,t);return 0>n?(++this.size,r.push([t,e])):r[n][1]=e,this},p.prototype.clear=function(){this.size=0,this.__data__={hash:new b,map:new(Se||h),string:new b}},p.prototype.delete=function(t){
|
||||
return t=Z(this,t).delete(t),this.size-=t?1:0,t},p.prototype.get=function(t){return Z(this,t).get(t)},p.prototype.has=function(t){return Z(this,t).has(t)},p.prototype.set=function(t,e){var r=Z(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this},y.prototype.add=y.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},y.prototype.has=function(t){return this.__data__.has(t)},j.prototype.clear=function(){this.__data__=new h,this.size=0},j.prototype.delete=function(t){
|
||||
var e=this.__data__;return t=e.delete(t),this.size=e.size,t},j.prototype.get=function(t){return this.__data__.get(t)},j.prototype.has=function(t){return this.__data__.has(t)},j.prototype.set=function(t,e){var r=this.__data__;if(r instanceof h){var n=r.__data__;if(!Se||199>n.length)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new p(n)}return r.set(t,e),this.size=r.size,this};var Pe=function(t,e){return function(r,n){if(null==r)return r;if(!yt(r))return t(r,n);for(var o=r.length,c=e?o:-1,u=Object(r);(e?c--:++c<o)&&false!==n(u[c],c,u););
|
||||
return r}}(function(t,e){return t&&Ve(t,e,St)}),Ve=function(t){return function(e,r,n){var o=-1,c=Object(e);n=n(e);for(var u=n.length;u--;){var i=n[t?u:++o];if(false===r(c[i],i,c))break}return e}}(),Ce=ve?function(t,e){return ve(t,"toString",{configurable:true,enumerable:false,value:kt(e),writable:true})}:xt,Re=ge?function(t){return null==t?[]:(t=Object(t),n(ge(t),function(e){return ye.call(t,e)}))}:It,Te=ge?function(t){for(var e=[];t;)o(e,Re(t)),t=he(t);return e}:It,We=k;(Oe&&"[object DataView]"!=We(new Oe(new ArrayBuffer(1)))||Se&&"[object Map]"!=We(new Se)||ze&&"[object Promise]"!=We(ze.resolve())||ke&&"[object Set]"!=We(new ke)||xe&&"[object WeakMap]"!=We(new xe))&&(We=function(t){
|
||||
var e=k(t);if(t=(t="[object Object]"==e?t.constructor:Ut)?lt(t):"")switch(t){case Fe:return"[object DataView]";case Ie:return"[object Map]";case Me:return"[object Promise]";case Ue:return"[object Set]";case Be:return"[object WeakMap]"}return e});var Ge=function(t){var e=0,r=0;return function(){var n=me(),o=16-(n-r);if(r=n,0<o){if(800<=++e)return arguments[0]}else e=0;return t.apply(Ut,arguments)}}(Ce),qe=function(t){t=ht(t,function(t){return 500===e.size&&e.clear(),t});var e=t.cache;return t}(function(t){
|
||||
var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(Lt,function(t,r,n,o){e.push(n?o.replace(Nt,"$1"):r||t)}),e}),He=function(t,r){return function(n,o){var c=Ke(n)?e:d,u=r?r():{};return c(n,t,Y(o,2),u)}}(function(t,e,r){ce.call(t,r)?t[r].push(e):m(t,r,[e])});ht.Cache=p;var Je=x(function(){return arguments}())?x:function(t){return gt(t)&&ce.call(t,"callee")&&!ye.call(t,"callee")},Ke=Array.isArray,Qe=de||Mt,Xe=Yt?i(Yt):F,Ye=Zt?i(Zt):M,Ze=te?i(te):U,tr=function(t){return N(function(e,r){var n=-1,o=r.length,c=1<o?r[o-1]:Ut,u=2<o?r[2]:Ut,c=3<t.length&&typeof c=="function"?(o--,
|
||||
c):Ut;for(u&&ct(r[0],r[1],u)&&(c=3>o?Ut:c,o=1),e=Object(e);++n<o;)(u=r[n])&&t(e,u,n,c);return e})}(function(t,e){G(e,zt(e),t)});l.assignIn=tr,l.constant=kt,l.groupBy=He,l.iteratee=Et,l.keys=St,l.keysIn=zt,l.memoize=ht,l.property=Ft,l.set=function(t,e,r){if(null!=t&&vt(t)){e=C(e,t);for(var n=-1,o=e.length,c=o-1,u=t;null!=u&&++n<o;){var i=st(e[n]),a=r;if(n!=c){var f=u[i],a=Ut;a===Ut&&(a=vt(f)?f:ot(e[n+1])?[]:{})}v(u,i,a),u=u[i]}}return t},l.extend=tr,l.eq=pt,l.forEach=bt,l.get=mt,l.hasIn=Ot,l.identity=xt,
|
||||
l.isArguments=Je,l.isArray=Ke,l.isArrayLike=yt,l.isBuffer=Qe,l.isFunction=jt,l.isLength=_t,l.isMap=Xe,l.isNaN=function(t){return dt(t)&&t!=+t},l.isNumber=dt,l.isObject=vt,l.isObjectLike=gt,l.isSet=Ye,l.isSymbol=At,l.isTypedArray=Ze,l.stubArray=It,l.stubFalse=Mt,l.some=function(t,e,r){var n=Ke(t)?c:P;return r&&ct(t,e,r)&&(e=Ut),n(t,Y(e,3))},l.toString=wt,l.each=bt,l.VERSION="4.17.5",typeof define=="function"&&typeof define.amd=="object"&&define.amd&& define(function(){return l})}).call(this);
|
||||
21
public/docs/vendor/path-to-regexp/LICENSE
vendored
@@ -1,21 +0,0 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014 Blake Embrey (hello@blakeembrey.com)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
204
public/docs/vendor/path-to-regexp/index.js
vendored
@@ -1,204 +0,0 @@
|
||||
var isArray = Array.isArray || function (arr) {
|
||||
return Object.prototype.toString.call(arr) == '[object Array]';
|
||||
};
|
||||
|
||||
/**
|
||||
* Expose `pathToRegexp`.
|
||||
*/
|
||||
// module.exports = pathToRegexp
|
||||
|
||||
/**
|
||||
* The main path matching regexp utility.
|
||||
*
|
||||
* @type {RegExp}
|
||||
*/
|
||||
var PATH_REGEXP = new RegExp([
|
||||
// Match escaped characters that would otherwise appear in future matches.
|
||||
// This allows the user to escape special characters that won't transform.
|
||||
'(\\\\.)',
|
||||
// Match Express-style parameters and un-named parameters with a prefix
|
||||
// and optional suffixes. Matches appear as:
|
||||
//
|
||||
// "/:test(\\d+)?" => ["/", "test", "\d+", undefined, "?"]
|
||||
// "/route(\\d+)" => [undefined, undefined, undefined, "\d+", undefined]
|
||||
'([\\/.])?(?:\\:(\\w+)(?:\\(((?:\\\\.|[^)])*)\\))?|\\(((?:\\\\.|[^)])*)\\))([+*?])?',
|
||||
// Match regexp special characters that are always escaped.
|
||||
'([.+*?=^!:${}()[\\]|\\/])'
|
||||
].join('|'), 'g');
|
||||
|
||||
/**
|
||||
* Escape the capturing group by escaping special characters and meaning.
|
||||
*
|
||||
* @param {String} group
|
||||
* @return {String}
|
||||
*/
|
||||
function escapeGroup (group) {
|
||||
return group.replace(/([=!:$\/()])/g, '\\$1');
|
||||
}
|
||||
|
||||
/**
|
||||
* Attach the keys as a property of the regexp.
|
||||
*
|
||||
* @param {RegExp} re
|
||||
* @param {Array} keys
|
||||
* @return {RegExp}
|
||||
*/
|
||||
function attachKeys (re, keys) {
|
||||
re.keys = keys;
|
||||
return re;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the flags for a regexp from the options.
|
||||
*
|
||||
* @param {Object} options
|
||||
* @return {String}
|
||||
*/
|
||||
function flags (options) {
|
||||
return options.sensitive ? '' : 'i';
|
||||
}
|
||||
|
||||
/**
|
||||
* Pull out keys from a regexp.
|
||||
*
|
||||
* @param {RegExp} path
|
||||
* @param {Array} keys
|
||||
* @return {RegExp}
|
||||
*/
|
||||
function regexpToRegexp (path, keys) {
|
||||
// Use a negative lookahead to match only capturing groups.
|
||||
var groups = path.source.match(/\((?!\?)/g);
|
||||
|
||||
if (groups) {
|
||||
for (var i = 0; i < groups.length; i++) {
|
||||
keys.push({
|
||||
name: i,
|
||||
delimiter: null,
|
||||
optional: false,
|
||||
repeat: false
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
return attachKeys(path, keys);
|
||||
}
|
||||
|
||||
/**
|
||||
* Transform an array into a regexp.
|
||||
*
|
||||
* @param {Array} path
|
||||
* @param {Array} keys
|
||||
* @param {Object} options
|
||||
* @return {RegExp}
|
||||
*/
|
||||
function arrayToRegexp (path, keys, options) {
|
||||
var parts = [];
|
||||
|
||||
for (var i = 0; i < path.length; i++) {
|
||||
parts.push(pathToRegexp(path[i], keys, options).source);
|
||||
}
|
||||
|
||||
var regexp = new RegExp('(?:' + parts.join('|') + ')', flags(options));
|
||||
return attachKeys(regexp, keys);
|
||||
}
|
||||
|
||||
/**
|
||||
* Replace the specific tags with regexp strings.
|
||||
*
|
||||
* @param {String} path
|
||||
* @param {Array} keys
|
||||
* @return {String}
|
||||
*/
|
||||
function replacePath (path, keys) {
|
||||
var index = 0;
|
||||
|
||||
function replace (_, escaped, prefix, key, capture, group, suffix, escape) {
|
||||
if (escaped) {
|
||||
return escaped;
|
||||
}
|
||||
|
||||
if (escape) {
|
||||
return '\\' + escape;
|
||||
}
|
||||
|
||||
var repeat = suffix === '+' || suffix === '*';
|
||||
var optional = suffix === '?' || suffix === '*';
|
||||
|
||||
keys.push({
|
||||
name: key || index++,
|
||||
delimiter: prefix || '/',
|
||||
optional: optional,
|
||||
repeat: repeat
|
||||
});
|
||||
|
||||
prefix = prefix ? ('\\' + prefix) : '';
|
||||
capture = escapeGroup(capture || group || '[^' + (prefix || '\\/') + ']+?');
|
||||
|
||||
if (repeat) {
|
||||
capture = capture + '(?:' + prefix + capture + ')*';
|
||||
}
|
||||
|
||||
if (optional) {
|
||||
return '(?:' + prefix + '(' + capture + '))?';
|
||||
}
|
||||
|
||||
// Basic parameter support.
|
||||
return prefix + '(' + capture + ')';
|
||||
}
|
||||
|
||||
return path.replace(PATH_REGEXP, replace);
|
||||
}
|
||||
|
||||
/**
|
||||
* Normalize the given path string, returning a regular expression.
|
||||
*
|
||||
* An empty array can be passed in for the keys, which will hold the
|
||||
* placeholder key descriptions. For example, using `/user/:id`, `keys` will
|
||||
* contain `[{ name: 'id', delimiter: '/', optional: false, repeat: false }]`.
|
||||
*
|
||||
* @param {(String|RegExp|Array)} path
|
||||
* @param {Array} [keys]
|
||||
* @param {Object} [options]
|
||||
* @return {RegExp}
|
||||
*/
|
||||
function pathToRegexp (path, keys, options) {
|
||||
keys = keys || [];
|
||||
|
||||
if (!isArray(keys)) {
|
||||
options = keys;
|
||||
keys = [];
|
||||
} else if (!options) {
|
||||
options = {};
|
||||
}
|
||||
|
||||
if (path instanceof RegExp) {
|
||||
return regexpToRegexp(path, keys, options);
|
||||
}
|
||||
|
||||
if (isArray(path)) {
|
||||
return arrayToRegexp(path, keys, options);
|
||||
}
|
||||
|
||||
var strict = options.strict;
|
||||
var end = options.end !== false;
|
||||
var route = replacePath(path, keys);
|
||||
var endsWithSlash = path.charAt(path.length - 1) === '/';
|
||||
|
||||
// In non-strict mode we allow a slash at the end of match. If the path to
|
||||
// match already ends with a slash, we remove it for consistency. The slash
|
||||
// is valid at the end of a path match, not in the middle. This is important
|
||||
// in non-ending mode, where "/test/" shouldn't match "/test//route".
|
||||
if (!strict) {
|
||||
route = (endsWithSlash ? route.slice(0, -2) : route) + '(?:\\/(?=$))?';
|
||||
}
|
||||
|
||||
if (end) {
|
||||
route += '$';
|
||||
} else {
|
||||
// In non-ending mode, we need the capturing groups to match as much as
|
||||
// possible by using a positive lookahead to the end or next path segment.
|
||||
route += strict && endsWithSlash ? '' : '(?=\\/|$)';
|
||||
}
|
||||
|
||||
return attachKeys(new RegExp('^' + route, flags(options)), keys);
|
||||
}
|
||||
96
public/docs/vendor/polyfill.js
vendored
@@ -1,96 +0,0 @@
|
||||
// From https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/keys
|
||||
if (!Object.keys) {
|
||||
Object.keys = (function () {
|
||||
'use strict';
|
||||
var hasOwnProperty = Object.prototype.hasOwnProperty,
|
||||
hasDontEnumBug = !({toString: null}).propertyIsEnumerable('toString'),
|
||||
dontEnums = [
|
||||
'toString',
|
||||
'toLocaleString',
|
||||
'valueOf',
|
||||
'hasOwnProperty',
|
||||
'isPrototypeOf',
|
||||
'propertyIsEnumerable',
|
||||
'constructor'
|
||||
],
|
||||
dontEnumsLength = dontEnums.length;
|
||||
|
||||
return function (obj) {
|
||||
if (typeof obj !== 'object' && (typeof obj !== 'function' || obj === null)) {
|
||||
throw new TypeError('Object.keys called on non-object');
|
||||
}
|
||||
|
||||
var result = [], prop, i;
|
||||
|
||||
for (prop in obj) {
|
||||
if (hasOwnProperty.call(obj, prop)) {
|
||||
result.push(prop);
|
||||
}
|
||||
}
|
||||
|
||||
if (hasDontEnumBug) {
|
||||
for (i = 0; i < dontEnumsLength; i++) {
|
||||
if (hasOwnProperty.call(obj, dontEnums[i])) {
|
||||
result.push(dontEnums[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
};
|
||||
}());
|
||||
}
|
||||
|
||||
//Production steps of ECMA-262, Edition 5, 15.4.4.18
|
||||
//Reference: http://es5.github.com/#x15.4.4.18
|
||||
if (!Array.prototype.forEach) {
|
||||
Array.prototype.forEach = function (callback, thisArg) {
|
||||
var T, k;
|
||||
|
||||
if (this == null) {
|
||||
throw new TypeError(' this is null or not defined');
|
||||
}
|
||||
|
||||
// 1. Let O be the result of calling ToObject passing the |this| value as the argument.
|
||||
var O = Object(this);
|
||||
|
||||
// 2. Let lenValue be the result of calling the Get internal method of O with the argument "length".
|
||||
// 3. Let len be ToUint32(lenValue).
|
||||
var len = O.length >>> 0;
|
||||
|
||||
// 4. If IsCallable(callback) is false, throw a TypeError exception.
|
||||
// See: http://es5.github.com/#x9.11
|
||||
if (typeof callback !== "function") {
|
||||
throw new TypeError(callback + " is not a function");
|
||||
}
|
||||
|
||||
// 5. If thisArg was supplied, let T be thisArg; else let T be undefined.
|
||||
if (arguments.length > 1) {
|
||||
T = thisArg;
|
||||
}
|
||||
|
||||
// 6. Let k be 0
|
||||
k = 0;
|
||||
|
||||
// 7. Repeat, while k < len
|
||||
while (k < len) {
|
||||
var kValue;
|
||||
|
||||
// a. Let Pk be ToString(k).
|
||||
// This is implicit for LHS operands of the in operator
|
||||
// b. Let kPresent be the result of calling the HasProperty internal method of O with argument Pk.
|
||||
// This step can be combined with c
|
||||
// c. If kPresent is true, then
|
||||
if (k in O) {
|
||||
// i. Let kValue be the result of calling the Get internal method of O with argument Pk.
|
||||
kValue = O[k];
|
||||
|
||||
// ii. Call the Call internal method of callback with T as the this value and
|
||||
// argument list containing kValue, k, and O.
|
||||
callback.call(T, kValue, k, O);
|
||||
}
|
||||
// d. Increase k by 1.
|
||||
k++;
|
||||
}
|
||||
// 8. return undefined
|
||||
};
|
||||
}
|
||||
21
public/docs/vendor/prism.js
vendored
37
public/docs/vendor/require.min.js
vendored
@@ -1,37 +0,0 @@
|
||||
/*
|
||||
RequireJS 2.1.22 Copyright (c) 2010-2015, The Dojo Foundation All Rights Reserved.
|
||||
Available via the MIT or new BSD license.
|
||||
see: http://github.com/jrburke/requirejs for details
|
||||
*/
|
||||
var requirejs,require,define;
|
||||
(function(ha){function L(b){return"[object Function]"===R.call(b)}function M(b){return"[object Array]"===R.call(b)}function x(b,c){if(b){var d;for(d=0;d<b.length&&(!b[d]||!c(b[d],d,b));d+=1);}}function Y(b,c){if(b){var d;for(d=b.length-1;-1<d&&(!b[d]||!c(b[d],d,b));--d);}}function w(b,c){return la.call(b,c)}function g(b,c){return w(b,c)&&b[c]}function E(b,c){for(var d in b)if(w(b,d)&&c(b[d],d))break}function Z(b,c,d,k){c&&E(c,function(c,g){if(d||!w(b,g))!k||"object"!==typeof c||!c||M(c)||L(c)||c instanceof
|
||||
RegExp?b[g]=c:(b[g]||(b[g]={}),Z(b[g],c,d,k))});return b}function y(b,c){return function(){return c.apply(b,arguments)}}function ia(b){throw b;}function ja(b){if(!b)return b;var c=ha;x(b.split("."),function(b){c=c[b]});return c}function G(b,c,d,g){c=Error(c+"\nhttp://requirejs.org/docs/errors.html#"+b);c.requireType=b;c.requireModules=g;d&&(c.originalError=d);return c}function ma(b){function c(a,n,b){var f,l,c,d,h,k,e,A;n=n&&n.split("/");var q=m.map,p=q&&q["*"];if(a){a=a.split("/");l=a.length-1;m.nodeIdCompat&&
|
||||
V.test(a[l])&&(a[l]=a[l].replace(V,""));"."===a[0].charAt(0)&&n&&(l=n.slice(0,n.length-1),a=l.concat(a));l=a;for(c=0;c<l.length;c++)d=l[c],"."===d?(l.splice(c,1),--c):".."===d&&0!==c&&(1!==c||".."!==l[2])&&".."!==l[c-1]&&0<c&&(l.splice(c-1,2),c-=2);a=a.join("/")}if(b&&q&&(n||p)){l=a.split("/");c=l.length;a:for(;0<c;--c){h=l.slice(0,c).join("/");if(n)for(d=n.length;0<d;--d)if(b=g(q,n.slice(0,d).join("/")))if(b=g(b,h)){f=b;k=c;break a}!e&&p&&g(p,h)&&(e=g(p,h),A=c)}!f&&e&&(f=e,k=A);f&&(l.splice(0,k,
|
||||
f),a=l.join("/"))}return(f=g(m.pkgs,a))?f:a}function d(a){F&&x(document.getElementsByTagName("script"),function(n){if(n.getAttribute("data-requiremodule")===a&&n.getAttribute("data-requirecontext")===h.contextName)return n.parentNode.removeChild(n),!0})}function p(a){var n=g(m.paths,a);if(n&&M(n)&&1<n.length)return n.shift(),h.require.undef(a),h.makeRequire(null,{skipMap:!0})([a]),!0}function e(a){var n,b=a?a.indexOf("!"):-1;-1<b&&(n=a.substring(0,b),a=a.substring(b+1,a.length));return[n,a]}function q(a,
|
||||
n,b,f){var l,d,z=null,k=n?n.name:null,m=a,q=!0,A="";a||(q=!1,a="_@r"+(R+=1));a=e(a);z=a[0];a=a[1];z&&(z=c(z,k,f),d=g(r,z));a&&(z?A=d&&d.normalize?d.normalize(a,function(a){return c(a,k,f)}):-1===a.indexOf("!")?c(a,k,f):a:(A=c(a,k,f),a=e(A),z=a[0],A=a[1],b=!0,l=h.nameToUrl(A)));b=!z||d||b?"":"_unnormalized"+(U+=1);return{prefix:z,name:A,parentMap:n,unnormalized:!!b,url:l,originalName:m,isDefine:q,id:(z?z+"!"+A:A)+b}}function u(a){var b=a.id,c=g(t,b);c||(c=t[b]=new h.Module(a));return c}function v(a,
|
||||
b,c){var f=a.id,l=g(t,f);if(!w(r,f)||l&&!l.defineEmitComplete)if(l=u(a),l.error&&"error"===b)c(l.error);else l.on(b,c);else"defined"===b&&c(r[f])}function B(a,b){var c=a.requireModules,f=!1;if(b)b(a);else if(x(c,function(b){if(b=g(t,b))b.error=a,b.events.error&&(f=!0,b.emit("error",a))}),!f)k.onError(a)}function C(){W.length&&(x(W,function(a){var b=a[0];"string"===typeof b&&(h.defQueueMap[b]=!0);H.push(a)}),W=[])}function D(a){delete t[a];delete aa[a]}function K(a,b,c){var f=a.map.id;a.error?a.emit("error",
|
||||
a.error):(b[f]=!0,x(a.depMaps,function(f,d){var h=f.id,k=g(t,h);!k||a.depMatched[d]||c[h]||(g(b,h)?(a.defineDep(d,r[h]),a.check()):K(k,b,c))}),c[f]=!0)}function I(){var a,b,c=(a=1E3*m.waitSeconds)&&h.startTime+a<(new Date).getTime(),f=[],l=[],k=!1,g=!0;if(!ba){ba=!0;E(aa,function(a){var h=a.map,e=h.id;if(a.enabled&&(h.isDefine||l.push(a),!a.error))if(!a.inited&&c)p(e)?k=b=!0:(f.push(e),d(e));else if(!a.inited&&a.fetched&&h.isDefine&&(k=!0,!h.prefix))return g=!1});if(c&&f.length)return a=G("timeout",
|
||||
"Load timeout for modules: "+f,null,f),a.contextName=h.contextName,B(a);g&&x(l,function(a){K(a,{},{})});c&&!b||!k||!F&&!ka||ca||(ca=setTimeout(function(){ca=0;I()},50));ba=!1}}function J(a){w(r,a[0])||u(q(a[0],null,!0)).init(a[1],a[2])}function P(a){a=a.currentTarget||a.srcElement;var b=h.onScriptLoad;a.detachEvent&&!da?a.detachEvent("onreadystatechange",b):a.removeEventListener("load",b,!1);b=h.onScriptError;a.detachEvent&&!da||a.removeEventListener("error",b,!1);return{node:a,id:a&&a.getAttribute("data-requiremodule")}}
|
||||
function Q(){var a;for(C();H.length;){a=H.shift();if(null===a[0])return B(G("mismatch","Mismatched anonymous define() module: "+a[a.length-1]));J(a)}h.defQueueMap={}}var ba,ea,h,S,ca,m={waitSeconds:7,baseUrl:"./",paths:{},bundles:{},pkgs:{},shim:{},config:{}},t={},aa={},fa={},H=[],r={},X={},ga={},R=1,U=1;S={require:function(a){return a.require?a.require:a.require=h.makeRequire(a.map)},exports:function(a){a.usingExports=!0;if(a.map.isDefine)return a.exports?r[a.map.id]=a.exports:a.exports=r[a.map.id]=
|
||||
{}},module:function(a){return a.module?a.module:a.module={id:a.map.id,uri:a.map.url,config:function(){return g(m.config,a.map.id)||{}},exports:a.exports||(a.exports={})}}};ea=function(a){this.events=g(fa,a.id)||{};this.map=a;this.shim=g(m.shim,a.id);this.depExports=[];this.depMaps=[];this.depMatched=[];this.pluginMaps={};this.depCount=0};ea.prototype={init:function(a,b,c,f){f=f||{};if(!this.inited){this.factory=b;if(c)this.on("error",c);else this.events.error&&(c=y(this,function(a){this.emit("error",
|
||||
a)}));this.depMaps=a&&a.slice(0);this.errback=c;this.inited=!0;this.ignore=f.ignore;f.enabled||this.enabled?this.enable():this.check()}},defineDep:function(a,b){this.depMatched[a]||(this.depMatched[a]=!0,--this.depCount,this.depExports[a]=b)},fetch:function(){if(!this.fetched){this.fetched=!0;h.startTime=(new Date).getTime();var a=this.map;if(this.shim)h.makeRequire(this.map,{enableBuildCallback:!0})(this.shim.deps||[],y(this,function(){return a.prefix?this.callPlugin():this.load()}));else return a.prefix?
|
||||
this.callPlugin():this.load()}},load:function(){var a=this.map.url;X[a]||(X[a]=!0,h.load(this.map.id,a))},check:function(){if(this.enabled&&!this.enabling){var a,b,c=this.map.id;b=this.depExports;var f=this.exports,l=this.factory;if(!this.inited)w(h.defQueueMap,c)||this.fetch();else if(this.error)this.emit("error",this.error);else if(!this.defining){this.defining=!0;if(1>this.depCount&&!this.defined){if(L(l)){try{f=h.execCb(c,l,b,f)}catch(d){a=d}this.map.isDefine&&void 0===f&&((b=this.module)?f=b.exports:
|
||||
this.usingExports&&(f=this.exports));if(a){if(this.events.error&&this.map.isDefine||k.onError!==ia)return a.requireMap=this.map,a.requireModules=this.map.isDefine?[this.map.id]:null,a.requireType=this.map.isDefine?"define":"require",B(this.error=a);if("undefined"!==typeof console&&console.error)console.error(a);else k.onError(a)}}else f=l;this.exports=f;if(this.map.isDefine&&!this.ignore&&(r[c]=f,k.onResourceLoad)){var e=[];x(this.depMaps,function(a){e.push(a.normalizedMap||a)});k.onResourceLoad(h,
|
||||
this.map,e)}D(c);this.defined=!0}this.defining=!1;this.defined&&!this.defineEmitted&&(this.defineEmitted=!0,this.emit("defined",this.exports),this.defineEmitComplete=!0)}}},callPlugin:function(){var a=this.map,b=a.id,d=q(a.prefix);this.depMaps.push(d);v(d,"defined",y(this,function(f){var l,d,e=g(ga,this.map.id),N=this.map.name,p=this.map.parentMap?this.map.parentMap.name:null,r=h.makeRequire(a.parentMap,{enableBuildCallback:!0});if(this.map.unnormalized){if(f.normalize&&(N=f.normalize(N,function(a){return c(a,
|
||||
p,!0)})||""),d=q(a.prefix+"!"+N,this.map.parentMap),v(d,"defined",y(this,function(a){this.map.normalizedMap=d;this.init([],function(){return a},null,{enabled:!0,ignore:!0})})),f=g(t,d.id)){this.depMaps.push(d);if(this.events.error)f.on("error",y(this,function(a){this.emit("error",a)}));f.enable()}}else e?(this.map.url=h.nameToUrl(e),this.load()):(l=y(this,function(a){this.init([],function(){return a},null,{enabled:!0})}),l.error=y(this,function(a){this.inited=!0;this.error=a;a.requireModules=[b];
|
||||
E(t,function(a){0===a.map.id.indexOf(b+"_unnormalized")&&D(a.map.id)});B(a)}),l.fromText=y(this,function(f,c){var d=a.name,e=q(d),N=T;c&&(f=c);N&&(T=!1);u(e);w(m.config,b)&&(m.config[d]=m.config[b]);try{k.exec(f)}catch(g){return B(G("fromtexteval","fromText eval for "+b+" failed: "+g,g,[b]))}N&&(T=!0);this.depMaps.push(e);h.completeLoad(d);r([d],l)}),f.load(a.name,r,l,m))}));h.enable(d,this);this.pluginMaps[d.id]=d},enable:function(){aa[this.map.id]=this;this.enabling=this.enabled=!0;x(this.depMaps,
|
||||
y(this,function(a,b){var c,f;if("string"===typeof a){a=q(a,this.map.isDefine?this.map:this.map.parentMap,!1,!this.skipMap);this.depMaps[b]=a;if(c=g(S,a.id)){this.depExports[b]=c(this);return}this.depCount+=1;v(a,"defined",y(this,function(a){this.undefed||(this.defineDep(b,a),this.check())}));this.errback?v(a,"error",y(this,this.errback)):this.events.error&&v(a,"error",y(this,function(a){this.emit("error",a)}))}c=a.id;f=t[c];w(S,c)||!f||f.enabled||h.enable(a,this)}));E(this.pluginMaps,y(this,function(a){var b=
|
||||
g(t,a.id);b&&!b.enabled&&h.enable(a,this)}));this.enabling=!1;this.check()},on:function(a,b){var c=this.events[a];c||(c=this.events[a]=[]);c.push(b)},emit:function(a,b){x(this.events[a],function(a){a(b)});"error"===a&&delete this.events[a]}};h={config:m,contextName:b,registry:t,defined:r,urlFetched:X,defQueue:H,defQueueMap:{},Module:ea,makeModuleMap:q,nextTick:k.nextTick,onError:B,configure:function(a){a.baseUrl&&"/"!==a.baseUrl.charAt(a.baseUrl.length-1)&&(a.baseUrl+="/");var b=m.shim,c={paths:!0,
|
||||
bundles:!0,config:!0,map:!0};E(a,function(a,b){c[b]?(m[b]||(m[b]={}),Z(m[b],a,!0,!0)):m[b]=a});a.bundles&&E(a.bundles,function(a,b){x(a,function(a){a!==b&&(ga[a]=b)})});a.shim&&(E(a.shim,function(a,c){M(a)&&(a={deps:a});!a.exports&&!a.init||a.exportsFn||(a.exportsFn=h.makeShimExports(a));b[c]=a}),m.shim=b);a.packages&&x(a.packages,function(a){var b;a="string"===typeof a?{name:a}:a;b=a.name;a.location&&(m.paths[b]=a.location);m.pkgs[b]=a.name+"/"+(a.main||"main").replace(na,"").replace(V,"")});E(t,
|
||||
function(a,b){a.inited||a.map.unnormalized||(a.map=q(b,null,!0))});(a.deps||a.callback)&&h.require(a.deps||[],a.callback)},makeShimExports:function(a){return function(){var b;a.init&&(b=a.init.apply(ha,arguments));return b||a.exports&&ja(a.exports)}},makeRequire:function(a,n){function e(c,d,g){var m,p;n.enableBuildCallback&&d&&L(d)&&(d.__requireJsBuild=!0);if("string"===typeof c){if(L(d))return B(G("requireargs","Invalid require call"),g);if(a&&w(S,c))return S[c](t[a.id]);if(k.get)return k.get(h,
|
||||
c,a,e);m=q(c,a,!1,!0);m=m.id;return w(r,m)?r[m]:B(G("notloaded",'Module name "'+m+'" has not been loaded yet for context: '+b+(a?"":". Use require([])")))}Q();h.nextTick(function(){Q();p=u(q(null,a));p.skipMap=n.skipMap;p.init(c,d,g,{enabled:!0});I()});return e}n=n||{};Z(e,{isBrowser:F,toUrl:function(b){var d,e=b.lastIndexOf("."),n=b.split("/")[0];-1!==e&&("."!==n&&".."!==n||1<e)&&(d=b.substring(e,b.length),b=b.substring(0,e));return h.nameToUrl(c(b,a&&a.id,!0),d,!0)},defined:function(b){return w(r,
|
||||
q(b,a,!1,!0).id)},specified:function(b){b=q(b,a,!1,!0).id;return w(r,b)||w(t,b)}});a||(e.undef=function(b){C();var c=q(b,a,!0),e=g(t,b);e.undefed=!0;d(b);delete r[b];delete X[c.url];delete fa[b];Y(H,function(a,c){a[0]===b&&H.splice(c,1)});delete h.defQueueMap[b];e&&(e.events.defined&&(fa[b]=e.events),D(b))});return e},enable:function(a){g(t,a.id)&&u(a).enable()},completeLoad:function(a){var b,c,d=g(m.shim,a)||{},e=d.exports;for(C();H.length;){c=H.shift();if(null===c[0]){c[0]=a;if(b)break;b=!0}else c[0]===
|
||||
a&&(b=!0);J(c)}h.defQueueMap={};c=g(t,a);if(!b&&!w(r,a)&&c&&!c.inited)if(!m.enforceDefine||e&&ja(e))J([a,d.deps||[],d.exportsFn]);else return p(a)?void 0:B(G("nodefine","No define call for "+a,null,[a]));I()},nameToUrl:function(a,b,c){var d,e,p;(d=g(m.pkgs,a))&&(a=d);if(d=g(ga,a))return h.nameToUrl(d,b,c);if(k.jsExtRegExp.test(a))d=a+(b||"");else{d=m.paths;a=a.split("/");for(e=a.length;0<e;--e)if(p=a.slice(0,e).join("/"),p=g(d,p)){M(p)&&(p=p[0]);a.splice(0,e,p);break}d=a.join("/");d+=b||(/^data\:|\?/.test(d)||
|
||||
c?"":".js");d=("/"===d.charAt(0)||d.match(/^[\w\+\.\-]+:/)?"":m.baseUrl)+d}return m.urlArgs?d+((-1===d.indexOf("?")?"?":"&")+m.urlArgs):d},load:function(a,b){k.load(h,a,b)},execCb:function(a,b,c,d){return b.apply(d,c)},onScriptLoad:function(a){if("load"===a.type||oa.test((a.currentTarget||a.srcElement).readyState))O=null,a=P(a),h.completeLoad(a.id)},onScriptError:function(a){var b=P(a);if(!p(b.id)){var c=[];E(t,function(a,d){0!==d.indexOf("_@r")&&x(a.depMaps,function(a){a.id===b.id&&c.push(d);return!0})});
|
||||
return B(G("scripterror",'Script error for "'+b.id+(c.length?'", needed by: '+c.join(", "):'"'),a,[b.id]))}}};h.require=h.makeRequire();return h}function pa(){if(O&&"interactive"===O.readyState)return O;Y(document.getElementsByTagName("script"),function(b){if("interactive"===b.readyState)return O=b});return O}var k,C,D,I,P,J,O,Q,u,U,qa=/(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/mg,ra=/[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,V=/\.js$/,na=/^\.\//;C=Object.prototype;var R=C.toString,la=C.hasOwnProperty,
|
||||
F=!("undefined"===typeof window||"undefined"===typeof navigator||!window.document),ka=!F&&"undefined"!==typeof importScripts,oa=F&&"PLAYSTATION 3"===navigator.platform?/^complete$/:/^(complete|loaded)$/,da="undefined"!==typeof opera&&"[object Opera]"===opera.toString(),K={},v={},W=[],T=!1;if("undefined"===typeof define){if("undefined"!==typeof requirejs){if(L(requirejs))return;v=requirejs;requirejs=void 0}"undefined"===typeof require||L(require)||(v=require,require=void 0);k=requirejs=function(b,
|
||||
c,d,p){var e,q="_";M(b)||"string"===typeof b||(e=b,M(c)?(b=c,c=d,d=p):b=[]);e&&e.context&&(q=e.context);(p=g(K,q))||(p=K[q]=k.s.newContext(q));e&&p.configure(e);return p.require(b,c,d)};k.config=function(b){return k(b)};k.nextTick="undefined"!==typeof setTimeout?function(b){setTimeout(b,4)}:function(b){b()};require||(require=k);k.version="2.1.22";k.jsExtRegExp=/^\/|:|\?|\.js$/;k.isBrowser=F;C=k.s={contexts:K,newContext:ma};k({});x(["toUrl","undef","defined","specified"],function(b){k[b]=function(){var c=
|
||||
K._;return c.require[b].apply(c,arguments)}});F&&(D=C.head=document.getElementsByTagName("head")[0],I=document.getElementsByTagName("base")[0])&&(D=C.head=I.parentNode);k.onError=ia;k.createNode=function(b,c,d){c=b.xhtml?document.createElementNS("http://www.w3.org/1999/xhtml","html:script"):document.createElement("script");c.type=b.scriptType||"text/javascript";c.charset="utf-8";c.async=!0;return c};k.load=function(b,c,d){var g=b&&b.config||{},e;if(F){e=k.createNode(g,c,d);if(g.onNodeCreated)g.onNodeCreated(e,
|
||||
g,c,d);e.setAttribute("data-requirecontext",b.contextName);e.setAttribute("data-requiremodule",c);!e.attachEvent||e.attachEvent.toString&&0>e.attachEvent.toString().indexOf("[native code")||da?(e.addEventListener("load",b.onScriptLoad,!1),e.addEventListener("error",b.onScriptError,!1)):(T=!0,e.attachEvent("onreadystatechange",b.onScriptLoad));e.src=d;Q=e;I?D.insertBefore(e,I):D.appendChild(e);Q=null;return e}if(ka)try{importScripts(d),b.completeLoad(c)}catch(q){b.onError(G("importscripts","importScripts failed for "+
|
||||
c+" at "+d,q,[c]))}};F&&!v.skipDataMain&&Y(document.getElementsByTagName("script"),function(b){D||(D=b.parentNode);if(P=b.getAttribute("data-main"))return u=P,v.baseUrl||(J=u.split("/"),u=J.pop(),U=J.length?J.join("/")+"/":"./",v.baseUrl=U),u=u.replace(V,""),k.jsExtRegExp.test(u)&&(u=P),v.deps=v.deps?v.deps.concat(u):[u],!0});define=function(b,c,d){var g,e;"string"!==typeof b&&(d=c,c=b,b=null);M(c)||(d=c,c=null);!c&&L(d)&&(c=[],d.length&&(d.toString().replace(qa,"").replace(ra,function(b,d){c.push(d)}),
|
||||
c=(1===d.length?["require"]:["require","exports","module"]).concat(c)));T&&(g=Q||pa())&&(b||(b=g.getAttribute("data-requiremodule")),e=K[g.getAttribute("data-requirecontext")]);e?(e.defQueue.push([b,c,d]),e.defQueueMap[b]=!0):W.push([b,c,d])};define.amd={jQuery:!0};k.exec=function(b){return eval(b)};k(v)}})(this);
|
||||
1
public/docs/vendor/semver.min.js
vendored
17
public/docs/vendor/webfontloader.js
vendored
@@ -1,17 +0,0 @@
|
||||
/* Web Font Loader v1.6.24 - (c) Adobe Systems, Google. License: Apache 2.0 */
|
||||
(function(){function aa(a,b,d){return a.call.apply(a.bind,arguments)}function ba(a,b,d){if(!a)throw Error();if(2<arguments.length){var c=Array.prototype.slice.call(arguments,2);return function(){var d=Array.prototype.slice.call(arguments);Array.prototype.unshift.apply(d,c);return a.apply(b,d)}}return function(){return a.apply(b,arguments)}}function p(a,b,d){p=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?aa:ba;return p.apply(null,arguments)}var q=Date.now||function(){return+new Date};function ca(a,b){this.a=a;this.m=b||a;this.c=this.m.document}var da=!!window.FontFace;function t(a,b,d,c){b=a.c.createElement(b);if(d)for(var e in d)d.hasOwnProperty(e)&&("style"==e?b.style.cssText=d[e]:b.setAttribute(e,d[e]));c&&b.appendChild(a.c.createTextNode(c));return b}function u(a,b,d){a=a.c.getElementsByTagName(b)[0];a||(a=document.documentElement);a.insertBefore(d,a.lastChild)}function v(a){a.parentNode&&a.parentNode.removeChild(a)}
|
||||
function w(a,b,d){b=b||[];d=d||[];for(var c=a.className.split(/\s+/),e=0;e<b.length;e+=1){for(var f=!1,g=0;g<c.length;g+=1)if(b[e]===c[g]){f=!0;break}f||c.push(b[e])}b=[];for(e=0;e<c.length;e+=1){f=!1;for(g=0;g<d.length;g+=1)if(c[e]===d[g]){f=!0;break}f||b.push(c[e])}a.className=b.join(" ").replace(/\s+/g," ").replace(/^\s+|\s+$/,"")}function y(a,b){for(var d=a.className.split(/\s+/),c=0,e=d.length;c<e;c++)if(d[c]==b)return!0;return!1}
|
||||
function z(a){if("string"===typeof a.f)return a.f;var b=a.m.location.protocol;"about:"==b&&(b=a.a.location.protocol);return"https:"==b?"https:":"http:"}function ea(a){return a.m.location.hostname||a.a.location.hostname}
|
||||
function A(a,b,d){function c(){k&&e&&f&&(k(g),k=null)}b=t(a,"link",{rel:"stylesheet",href:b,media:"all"});var e=!1,f=!0,g=null,k=d||null;da?(b.onload=function(){e=!0;c()},b.onerror=function(){e=!0;g=Error("Stylesheet failed to load");c()}):setTimeout(function(){e=!0;c()},0);u(a,"head",b)}
|
||||
function B(a,b,d,c){var e=a.c.getElementsByTagName("head")[0];if(e){var f=t(a,"script",{src:b}),g=!1;f.onload=f.onreadystatechange=function(){g||this.readyState&&"loaded"!=this.readyState&&"complete"!=this.readyState||(g=!0,d&&d(null),f.onload=f.onreadystatechange=null,"HEAD"==f.parentNode.tagName&&e.removeChild(f))};e.appendChild(f);setTimeout(function(){g||(g=!0,d&&d(Error("Script load timeout")))},c||5E3);return f}return null};function C(){this.a=0;this.c=null}function D(a){a.a++;return function(){a.a--;E(a)}}function F(a,b){a.c=b;E(a)}function E(a){0==a.a&&a.c&&(a.c(),a.c=null)};function G(a){this.a=a||"-"}G.prototype.c=function(a){for(var b=[],d=0;d<arguments.length;d++)b.push(arguments[d].replace(/[\W_]+/g,"").toLowerCase());return b.join(this.a)};function H(a,b){this.c=a;this.f=4;this.a="n";var d=(b||"n4").match(/^([nio])([1-9])$/i);d&&(this.a=d[1],this.f=parseInt(d[2],10))}function fa(a){return I(a)+" "+(a.f+"00")+" 300px "+J(a.c)}function J(a){var b=[];a=a.split(/,\s*/);for(var d=0;d<a.length;d++){var c=a[d].replace(/['"]/g,"");-1!=c.indexOf(" ")||/^\d/.test(c)?b.push("'"+c+"'"):b.push(c)}return b.join(",")}function K(a){return a.a+a.f}function I(a){var b="normal";"o"===a.a?b="oblique":"i"===a.a&&(b="italic");return b}
|
||||
function ga(a){var b=4,d="n",c=null;a&&((c=a.match(/(normal|oblique|italic)/i))&&c[1]&&(d=c[1].substr(0,1).toLowerCase()),(c=a.match(/([1-9]00|normal|bold)/i))&&c[1]&&(/bold/i.test(c[1])?b=7:/[1-9]00/.test(c[1])&&(b=parseInt(c[1].substr(0,1),10))));return d+b};function ha(a,b){this.c=a;this.f=a.m.document.documentElement;this.h=b;this.a=new G("-");this.j=!1!==b.events;this.g=!1!==b.classes}function ia(a){a.g&&w(a.f,[a.a.c("wf","loading")]);L(a,"loading")}function M(a){if(a.g){var b=y(a.f,a.a.c("wf","active")),d=[],c=[a.a.c("wf","loading")];b||d.push(a.a.c("wf","inactive"));w(a.f,d,c)}L(a,"inactive")}function L(a,b,d){if(a.j&&a.h[b])if(d)a.h[b](d.c,K(d));else a.h[b]()};function ja(){this.c={}}function ka(a,b,d){var c=[],e;for(e in b)if(b.hasOwnProperty(e)){var f=a.c[e];f&&c.push(f(b[e],d))}return c};function N(a,b){this.c=a;this.f=b;this.a=t(this.c,"span",{"aria-hidden":"true"},this.f)}function O(a){u(a.c,"body",a.a)}function P(a){return"display:block;position:absolute;top:-9999px;left:-9999px;font-size:300px;width:auto;height:auto;line-height:normal;margin:0;padding:0;font-variant:normal;white-space:nowrap;font-family:"+J(a.c)+";"+("font-style:"+I(a)+";font-weight:"+(a.f+"00")+";")};function Q(a,b,d,c,e,f){this.g=a;this.j=b;this.a=c;this.c=d;this.f=e||3E3;this.h=f||void 0}Q.prototype.start=function(){var a=this.c.m.document,b=this,d=q(),c=new Promise(function(c,e){function k(){q()-d>=b.f?e():a.fonts.load(fa(b.a),b.h).then(function(a){1<=a.length?c():setTimeout(k,25)},function(){e()})}k()}),e=new Promise(function(a,c){setTimeout(c,b.f)});Promise.race([e,c]).then(function(){b.g(b.a)},function(){b.j(b.a)})};function R(a,b,d,c,e,f,g){this.v=a;this.B=b;this.c=d;this.a=c;this.s=g||"BESbswy";this.f={};this.w=e||3E3;this.u=f||null;this.o=this.j=this.h=this.g=null;this.g=new N(this.c,this.s);this.h=new N(this.c,this.s);this.j=new N(this.c,this.s);this.o=new N(this.c,this.s);a=new H(this.a.c+",serif",K(this.a));a=P(a);this.g.a.style.cssText=a;a=new H(this.a.c+",sans-serif",K(this.a));a=P(a);this.h.a.style.cssText=a;a=new H("serif",K(this.a));a=P(a);this.j.a.style.cssText=a;a=new H("sans-serif",K(this.a));a=
|
||||
P(a);this.o.a.style.cssText=a;O(this.g);O(this.h);O(this.j);O(this.o)}var S={D:"serif",C:"sans-serif"},T=null;function U(){if(null===T){var a=/AppleWebKit\/([0-9]+)(?:\.([0-9]+))/.exec(window.navigator.userAgent);T=!!a&&(536>parseInt(a[1],10)||536===parseInt(a[1],10)&&11>=parseInt(a[2],10))}return T}R.prototype.start=function(){this.f.serif=this.j.a.offsetWidth;this.f["sans-serif"]=this.o.a.offsetWidth;this.A=q();la(this)};
|
||||
function ma(a,b,d){for(var c in S)if(S.hasOwnProperty(c)&&b===a.f[S[c]]&&d===a.f[S[c]])return!0;return!1}function la(a){var b=a.g.a.offsetWidth,d=a.h.a.offsetWidth,c;(c=b===a.f.serif&&d===a.f["sans-serif"])||(c=U()&&ma(a,b,d));c?q()-a.A>=a.w?U()&&ma(a,b,d)&&(null===a.u||a.u.hasOwnProperty(a.a.c))?V(a,a.v):V(a,a.B):na(a):V(a,a.v)}function na(a){setTimeout(p(function(){la(this)},a),50)}function V(a,b){setTimeout(p(function(){v(this.g.a);v(this.h.a);v(this.j.a);v(this.o.a);b(this.a)},a),0)};function W(a,b,d){this.c=a;this.a=b;this.f=0;this.o=this.j=!1;this.s=d}var X=null;W.prototype.g=function(a){var b=this.a;b.g&&w(b.f,[b.a.c("wf",a.c,K(a).toString(),"active")],[b.a.c("wf",a.c,K(a).toString(),"loading"),b.a.c("wf",a.c,K(a).toString(),"inactive")]);L(b,"fontactive",a);this.o=!0;oa(this)};
|
||||
W.prototype.h=function(a){var b=this.a;if(b.g){var d=y(b.f,b.a.c("wf",a.c,K(a).toString(),"active")),c=[],e=[b.a.c("wf",a.c,K(a).toString(),"loading")];d||c.push(b.a.c("wf",a.c,K(a).toString(),"inactive"));w(b.f,c,e)}L(b,"fontinactive",a);oa(this)};function oa(a){0==--a.f&&a.j&&(a.o?(a=a.a,a.g&&w(a.f,[a.a.c("wf","active")],[a.a.c("wf","loading"),a.a.c("wf","inactive")]),L(a,"active")):M(a.a))};function pa(a){this.j=a;this.a=new ja;this.h=0;this.f=this.g=!0}pa.prototype.load=function(a){this.c=new ca(this.j,a.context||this.j);this.g=!1!==a.events;this.f=!1!==a.classes;qa(this,new ha(this.c,a),a)};
|
||||
function ra(a,b,d,c,e){var f=0==--a.h;(a.f||a.g)&&setTimeout(function(){var a=e||null,k=c||null||{};if(0===d.length&&f)M(b.a);else{b.f+=d.length;f&&(b.j=f);var h,m=[];for(h=0;h<d.length;h++){var l=d[h],n=k[l.c],r=b.a,x=l;r.g&&w(r.f,[r.a.c("wf",x.c,K(x).toString(),"loading")]);L(r,"fontloading",x);r=null;null===X&&(X=window.FontFace?(x=/Gecko.*Firefox\/(\d+)/.exec(window.navigator.userAgent))?42<parseInt(x[1],10):!0:!1);X?r=new Q(p(b.g,b),p(b.h,b),b.c,l,b.s,n):r=new R(p(b.g,b),p(b.h,b),b.c,l,b.s,a,
|
||||
n);m.push(r)}for(h=0;h<m.length;h++)m[h].start()}},0)}function qa(a,b,d){var c=[],e=d.timeout;ia(b);var c=ka(a.a,d,a.c),f=new W(a.c,b,e);a.h=c.length;b=0;for(d=c.length;b<d;b++)c[b].load(function(b,c,d){ra(a,f,b,c,d)})};function sa(a,b){this.c=a;this.a=b}function ta(a,b,d){var c=z(a.c);a=(a.a.api||"fast.fonts.net/jsapi").replace(/^.*http(s?):(\/\/)?/,"");return c+"//"+a+"/"+b+".js"+(d?"?v="+d:"")}
|
||||
sa.prototype.load=function(a){function b(){if(e["__mti_fntLst"+d]){var c=e["__mti_fntLst"+d](),g=[],k;if(c)for(var h=0;h<c.length;h++){var m=c[h].fontfamily;void 0!=c[h].fontStyle&&void 0!=c[h].fontWeight?(k=c[h].fontStyle+c[h].fontWeight,g.push(new H(m,k))):g.push(new H(m))}a(g)}else setTimeout(function(){b()},50)}var d=this.a.projectId,c=this.a.version;if(d){var e=this.c.m;B(this.c,ta(this,d,c),function(c){c?a([]):b()}).id="__MonotypeAPIScript__"+d}else a([])};function ua(a,b){this.c=a;this.a=b}ua.prototype.load=function(a){var b,d,c=this.a.urls||[],e=this.a.families||[],f=this.a.testStrings||{},g=new C;b=0;for(d=c.length;b<d;b++)A(this.c,c[b],D(g));var k=[];b=0;for(d=e.length;b<d;b++)if(c=e[b].split(":"),c[1])for(var h=c[1].split(","),m=0;m<h.length;m+=1)k.push(new H(c[0],h[m]));else k.push(new H(c[0]));F(g,function(){a(k,f)})};function va(a,b,d){a?this.c=a:this.c=b+wa;this.a=[];this.f=[];this.g=d||""}var wa="//fonts.googleapis.com/css";function xa(a,b){for(var d=b.length,c=0;c<d;c++){var e=b[c].split(":");3==e.length&&a.f.push(e.pop());var f="";2==e.length&&""!=e[1]&&(f=":");a.a.push(e.join(f))}}
|
||||
function ya(a){if(0==a.a.length)throw Error("No fonts to load!");if(-1!=a.c.indexOf("kit="))return a.c;for(var b=a.a.length,d=[],c=0;c<b;c++)d.push(a.a[c].replace(/ /g,"+"));b=a.c+"?family="+d.join("%7C");0<a.f.length&&(b+="&subset="+a.f.join(","));0<a.g.length&&(b+="&text="+encodeURIComponent(a.g));return b};function za(a){this.f=a;this.a=[];this.c={}}
|
||||
var Aa={latin:"BESbswy",cyrillic:"\u0439\u044f\u0416",greek:"\u03b1\u03b2\u03a3",khmer:"\u1780\u1781\u1782",Hanuman:"\u1780\u1781\u1782"},Ba={thin:"1",extralight:"2","extra-light":"2",ultralight:"2","ultra-light":"2",light:"3",regular:"4",book:"4",medium:"5","semi-bold":"6",semibold:"6","demi-bold":"6",demibold:"6",bold:"7","extra-bold":"8",extrabold:"8","ultra-bold":"8",ultrabold:"8",black:"9",heavy:"9",l:"3",r:"4",b:"7"},Ca={i:"i",italic:"i",n:"n",normal:"n"},Da=/^(thin|(?:(?:extra|ultra)-?)?light|regular|book|medium|(?:(?:semi|demi|extra|ultra)-?)?bold|black|heavy|l|r|b|[1-9]00)?(n|i|normal|italic)?$/;
|
||||
function Ea(a){for(var b=a.f.length,d=0;d<b;d++){var c=a.f[d].split(":"),e=c[0].replace(/\+/g," "),f=["n4"];if(2<=c.length){var g;var k=c[1];g=[];if(k)for(var k=k.split(","),h=k.length,m=0;m<h;m++){var l;l=k[m];if(l.match(/^[\w-]+$/)){var n=Da.exec(l.toLowerCase());if(null==n)l="";else{l=n[2];l=null==l||""==l?"n":Ca[l];n=n[1];if(null==n||""==n)n="4";else var r=Ba[n],n=r?r:isNaN(n)?"4":n.substr(0,1);l=[l,n].join("")}}else l="";l&&g.push(l)}0<g.length&&(f=g);3==c.length&&(c=c[2],g=[],c=c?c.split(","):
|
||||
g,0<c.length&&(c=Aa[c[0]])&&(a.c[e]=c))}a.c[e]||(c=Aa[e])&&(a.c[e]=c);for(c=0;c<f.length;c+=1)a.a.push(new H(e,f[c]))}};function Fa(a,b){this.c=a;this.a=b}var Ga={Arimo:!0,Cousine:!0,Tinos:!0};Fa.prototype.load=function(a){var b=new C,d=this.c,c=new va(this.a.api,z(d),this.a.text),e=this.a.families;xa(c,e);var f=new za(e);Ea(f);A(d,ya(c),D(b));F(b,function(){a(f.a,f.c,Ga)})};function Ha(a,b){this.c=a;this.a=b}Ha.prototype.load=function(a){var b=this.a.id,d=this.c.m;b?B(this.c,(this.a.api||"https://use.typekit.net")+"/"+b+".js",function(b){if(b)a([]);else if(d.Typekit&&d.Typekit.config&&d.Typekit.config.fn){b=d.Typekit.config.fn;for(var e=[],f=0;f<b.length;f+=2)for(var g=b[f],k=b[f+1],h=0;h<k.length;h++)e.push(new H(g,k[h]));try{d.Typekit.load({events:!1,classes:!1,async:!0})}catch(m){}a(e)}},2E3):a([])};function Ia(a,b){this.c=a;this.f=b;this.a=[]}Ia.prototype.load=function(a){var b=this.f.id,d=this.c.m,c=this;b?(d.__webfontfontdeckmodule__||(d.__webfontfontdeckmodule__={}),d.__webfontfontdeckmodule__[b]=function(b,d){for(var g=0,k=d.fonts.length;g<k;++g){var h=d.fonts[g];c.a.push(new H(h.name,ga("font-weight:"+h.weight+";font-style:"+h.style)))}a(c.a)},B(this.c,z(this.c)+(this.f.api||"//f.fontdeck.com/s/css/js/")+ea(this.c)+"/"+b+".js",function(b){b&&a([])})):a([])};var Y=new pa(window);Y.a.c.custom=function(a,b){return new ua(b,a)};Y.a.c.fontdeck=function(a,b){return new Ia(b,a)};Y.a.c.monotype=function(a,b){return new sa(b,a)};Y.a.c.typekit=function(a,b){return new Ha(b,a)};Y.a.c.google=function(a,b){return new Fa(b,a)};var Z={load:p(Y.load,Y)};"function"===typeof define&&define.amd?define(function(){return Z}):"undefined"!==typeof module&&module.exports?module.exports=Z:(window.WebFont=Z,window.WebFontConfig&&Y.load(window.WebFontConfig));}());
|
||||
1
public/images/file/archive.svg
Normal file
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1639134709586" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5694" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><style type="text/css"></style></defs><path d="M256 85.333333c-46.933333 0-85.333333 38.4-85.333333 85.333334v682.666666c0 46.933333 38.4 85.333333 85.333333 85.333334h512c46.933333 0 85.333333-38.4 85.333333-85.333334V337.066667L601.6 85.333333H256z" fill="#989FA5" p-id="5695"></path><path d="M686.933333 337.066667h166.4L601.6 85.333333v166.4c0 46.933333 38.4 85.333333 85.333333 85.333334z" fill="#FFFFFF" opacity=".4" p-id="5696"></path><path d="M533.333333 524.8v119.466667l12.8 25.6c0 4.266667 4.266667 8.533333 4.266667 8.533333v72.533333c8.533333-4.266667 12.8-12.8 12.8-25.6v-170.666666c-4.266667-12.8-17.066667-25.6-29.866667-29.866667zM512 652.8v-119.466667c0-12.8-8.533333-21.333333-21.333333-21.333333h-68.266667v29.866667h-29.866667v-29.866667h-55.466666c-12.8 0-21.333333 8.533333-21.333334 21.333333v213.333334c0 12.8 8.533333 21.333333 21.333334 21.333333h170.666666c12.8 0 21.333333-8.533333 21.333334-21.333333v-64l-17.066667-29.866667z m-59.733333-76.8h-29.866667v29.866667h29.866667v89.6h-59.733334v-59.733334h29.866667v-29.866666h-29.866667v-29.866667h29.866667v-29.866667h29.866667v29.866667z" fill="#FFFFFF" p-id="5697"></path></svg>
|
||||
|
After Width: | Height: | Size: 1.4 KiB |
1
public/images/file/cad.svg
Normal file
|
After Width: | Height: | Size: 4.9 KiB |
1
public/images/file/code.svg
Normal file
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1625028321516" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="10195" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><style type="text/css"></style></defs><path d="M256 85.333333c-46.933333 0-85.333333 38.4-85.333333 85.333334v682.666666c0 46.933333 38.4 85.333333 85.333333 85.333334h512c46.933333 0 85.333333-38.4 85.333333-85.333334V337.066667L601.6 85.333333H256z" fill="#447AF9" p-id="10196"></path><path d="M686.933333 337.066667H853.333333L601.6 85.333333v166.4c0 46.933333 38.4 85.333333 85.333333 85.333334z" fill="#FFFFFF" opacity=".4" p-id="10197"></path><path d="M486.4 780.8h-170.666667c-4.266667 0-8.533333-4.266667-8.533333-8.533333s4.266667-8.533333 8.533333-8.533334h170.666667c4.266667 0 8.533333 4.266667 8.533333 8.533334s-4.266667 8.533333-8.533333 8.533333zM571.733333 695.466667h-256c-4.266667 0-8.533333-4.266667-8.533333-8.533334s4.266667-8.533333 8.533333-8.533333h256c4.266667 0 8.533333 4.266667 8.533334 8.533333s-4.266667 8.533333-8.533334 8.533334zM571.733333 610.133333h-256c-4.266667 0-8.533333-4.266667-8.533333-8.533333s4.266667-8.533333 8.533333-8.533333h256c4.266667 0 8.533333 4.266667 8.533334 8.533333s-4.266667 8.533333-8.533334 8.533333zM571.733333 524.8h-256c-4.266667 0-8.533333-4.266667-8.533333-8.533333s4.266667-8.533333 8.533333-8.533334h256c4.266667 0 8.533333 4.266667 8.533334 8.533334s-4.266667 8.533333-8.533334 8.533333z" fill="#FFFFFF" p-id="10198"></path></svg>
|
||||
|
After Width: | Height: | Size: 1.6 KiB |
1
public/images/file/media.svg
Normal file
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1639131652752" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="11826" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><style type="text/css"></style></defs><path d="M256 85.333333c-46.933333 0-85.333333 38.4-85.333333 85.333334v682.666666c0 46.933333 38.4 85.333333 85.333333 85.333334h512c46.933333 0 85.333333-38.4 85.333333-85.333334V337.066667L601.6 85.333333H256z" fill="#6067DC" p-id="11827"></path><path d="M686.933333 337.066667H853.333333L601.6 85.333333v166.4c0 46.933333 38.4 85.333333 85.333333 85.333334z" fill="#FFFFFF" opacity=".4" p-id="11828"></path><path d="M516.266667 627.2v29.866667l59.733333 51.2c12.8 8.533333 29.866667 0 29.866667-12.8v-106.666667c0-12.8-17.066667-21.333333-29.866667-12.8l-59.733333 51.2z" fill="#FFFFFF" p-id="11829"></path><path d="M473.6 529.066667H328.533333c-21.333333 0-42.666667 21.333333-42.666666 42.666666v140.8c0 21.333333 21.333333 42.666667 42.666666 42.666667h149.333334c21.333333 0 42.666667-21.333333 42.666666-42.666667v-140.8c-4.266667-21.333333-21.333333-42.666667-46.933333-42.666666z m-29.866667 119.466666l-55.466666 42.666667c-4.266667 4.266667-12.8 0-12.8-8.533333v-85.333334c0-8.533333 8.533333-12.8 12.8-8.533333l55.466666 42.666667c4.266667 8.533333 4.266667 12.8 0 17.066666z" fill="#FFFFFF" p-id="11830"></path></svg>
|
||||
|
After Width: | Height: | Size: 1.4 KiB |
1
public/images/file/ofd.svg
Normal file
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1639159863770" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6249" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><style type="text/css"></style></defs><path d="M208.50324948 98.14070655a39.70462592 39.70462592 0 0 0-28.9701507 12.41577865C171.94621747 118.83367123 167.11812845 129.18015316 167.11812845 139.52663591v744.94672818a39.70462592 39.70462592 0 0 0 12.41577864 28.97015071 40.85728849 40.85728849 0 0 0 28.97015071 12.41577865h606.99255288a39.70462592 39.70462592 0 0 0 28.97014989-12.41577865 40.85809681 40.85809681 0 0 0 12.41577946-28.97015071V332.661512L622.36173459 98.14070655z" fill="#356FFE" p-id="6250"></path><path d="M856.88173172 332.66070368H663.74766394a42.43108545 42.43108545 0 0 1-41.38592935-41.38592935V98.14070655z" fill="#AEC5FE" p-id="6251"></path><path d="M624.92653026 367.31091116a25.01908736 25.01908736 0 0 1 0 50.03494147 75.0564546 75.0564546 0 0 0-75.05645379 75.0564546v180.13872416a125.09462933 125.09462933 0 1 1-79.91040983-116.68811302 25.01827905 25.01827905 0 1 1-18.06431179 46.66182727 75.0564546 75.0564546 0 1 0 47.81125657 74.43000711l0.12528949-4.40372136V487.40123788a22.77923608 22.77923608 0 0 1 0.250579-3.22761753A125.09462933 125.09462933 0 0 1 624.92653026 367.31091116z m75.0564546 195.14678132a25.01908736 25.01908736 0 1 1 0 50.03494228H599.90825121a25.01908736 25.01908736 0 0 1 0-50.03494228h100.07554196z" fill="#FFFFFF" p-id="6252"></path></svg>
|
||||
|
After Width: | Height: | Size: 1.6 KiB |
1
public/images/file/other.svg
Normal file
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1625028321516" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="10195" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><style type="text/css"></style></defs><path d="M256 85.333333c-46.933333 0-85.333333 38.4-85.333333 85.333334v682.666666c0 46.933333 38.4 85.333333 85.333333 85.333334h512c46.933333 0 85.333333-38.4 85.333333-85.333334V337.066667L601.6 85.333333H256z" fill="#989FA5" p-id="10196"></path><path d="M686.933333 337.066667H853.333333L601.6 85.333333v166.4c0 46.933333 38.4 85.333333 85.333333 85.333334z" fill="#FFFFFF" opacity=".4" p-id="10197"></path><path d="M486.4 780.8h-170.666667c-4.266667 0-8.533333-4.266667-8.533333-8.533333s4.266667-8.533333 8.533333-8.533334h170.666667c4.266667 0 8.533333 4.266667 8.533333 8.533334s-4.266667 8.533333-8.533333 8.533333zM571.733333 695.466667h-256c-4.266667 0-8.533333-4.266667-8.533333-8.533334s4.266667-8.533333 8.533333-8.533333h256c4.266667 0 8.533333 4.266667 8.533334 8.533333s-4.266667 8.533333-8.533334 8.533334zM571.733333 610.133333h-256c-4.266667 0-8.533333-4.266667-8.533333-8.533333s4.266667-8.533333 8.533333-8.533333h256c4.266667 0 8.533333 4.266667 8.533334 8.533333s-4.266667 8.533333-8.533334 8.533333zM571.733333 524.8h-256c-4.266667 0-8.533333-4.266667-8.533333-8.533333s4.266667-8.533333 8.533333-8.533334h256c4.266667 0 8.533333 4.266667 8.533334 8.533334s-4.266667 8.533333-8.533334 8.533333z" fill="#FFFFFF" p-id="10198"></path></svg>
|
||||
|
After Width: | Height: | Size: 1.6 KiB |
1
public/images/file/pdf.svg
Normal file
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1639131674043" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="11971" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><style type="text/css"></style></defs><path d="M256 85.333333c-46.933333 0-85.333333 38.4-85.333333 85.333334v682.666666c0 46.933333 38.4 85.333333 85.333333 85.333334h512c46.933333 0 85.333333-38.4 85.333333-85.333334V337.066667L601.6 85.333333H256z" fill="#EA4845" p-id="11972"></path><path d="M686.933333 337.066667H853.333333L601.6 85.333333v166.4c0 46.933333 38.4 85.333333 85.333333 85.333334z" fill="#FFFFFF" opacity=".4" p-id="11973"></path><path d="M554.666667 657.066667c-21.333333 0-42.666667 4.266667-68.266667 8.533333-12.8-8.533333-21.333333-21.333333-34.133333-29.866667l-17.066667-17.066666c12.8-42.666667 12.8-72.533333 12.8-85.333334 0-4.266667 0-8.533333-4.266667-12.8-4.266667-12.8-17.066667-21.333333-29.866666-21.333333-12.8 0-21.333333 4.266667-29.866667 17.066667 0-4.266667-4.266667 4.266667-4.266667 8.533333 0 25.6 12.8 59.733333 34.133334 89.6l-12.8 38.4c-4.266667 12.8-12.8 25.6-17.066667 38.4-21.333333 8.533333-42.666667 17.066667-64 29.866667-4.266667 0-4.266667 4.266667-8.533333 4.266666-4.266667 4.266667-8.533333 12.8-8.533334 21.333334 0 17.066667 12.8 29.866667 29.866667 29.866666 8.533333 0 12.8-4.266667 21.333333-8.533333l4.266667-4.266667c17.066667-17.066667 29.866667-38.4 38.4-59.733333 12.8-4.266667 21.333333-8.533333 34.133333-12.8 17.066667-4.266667 34.133333-8.533333 46.933334-12.8 25.6 17.066667 51.2 29.866667 68.266666 29.866667 17.066667 0 29.866667-12.8 29.866667-29.866667 4.266667-8.533333-4.266667-21.333333-21.333333-21.333333z m-38.4 21.333333c12.8 0 25.6-4.266667 38.4-4.266667 4.266667 0 8.533333 4.266667 8.533333 8.533334s-4.266667 8.533333-8.533333 8.533333c-12.8 0-25.6-4.266667-38.4-12.8z m-110.933334-157.866667c4.266667-8.533333 17.066667-8.533333 21.333334 0v4.266667c0 17.066667 0 38.4-8.533334 64-12.8-21.333333-21.333333-46.933333-21.333333-64 4.266667 0 4.266667-4.266667 8.533333-4.266667zM341.333333 759.466667c-4.266667 4.266667-12.8 0-12.8-8.533334 0-4.266667 0-4.266667 4.266667-8.533333l4.266667-4.266667c8.533333-4.266667 21.333333-12.8 34.133333-17.066666-12.8 12.8-21.333333 25.6-29.866667 38.4z m85.333334-81.066667c-4.266667 0-12.8 4.266667-17.066667 4.266667 4.266667-8.533333 8.533333-12.8 8.533333-21.333334 4.266667-8.533333 4.266667-17.066667 8.533334-25.6l8.533333 8.533334 21.333333 21.333333c-4.266667 4.266667-17.066667 8.533333-29.866666 12.8z" fill="#FFFFFF" p-id="11974"></path></svg>
|
||||
|
After Width: | Height: | Size: 2.6 KiB |
1
public/images/file/picture.svg
Normal file
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1639131622718" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="11457" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><style type="text/css"></style></defs><path d="M256 85.333333c-46.933333 0-85.333333 38.4-85.333333 85.333334v682.666666c0 46.933333 38.4 85.333333 85.333333 85.333334h512c46.933333 0 85.333333-38.4 85.333333-85.333334V337.066667L601.6 85.333333H256z" fill="#53CBAE" p-id="11458"></path><path d="M686.933333 337.066667H853.333333L601.6 85.333333v166.4c0 46.933333 38.4 85.333333 85.333333 85.333334z" fill="#FFFFFF" opacity=".4" p-id="11459"></path><path d="M550.4 503.466667h-213.333333c-17.066667 0-34.133333 12.8-34.133334 34.133333v213.333333c0 17.066667 12.8 34.133333 34.133334 34.133334h213.333333c17.066667 0 34.133333-12.8 34.133333-34.133334v-213.333333c-4.266667-17.066667-17.066667-34.133333-34.133333-34.133333z m-68.266667 68.266666c17.066667 0 29.866667 12.8 29.866667 29.866667s-12.8 29.866667-29.866667 29.866667-29.866667-12.8-29.866666-29.866667 12.8-29.866667 29.866666-29.866667z m76.8 179.2c0 4.266667-4.266667 8.533333-8.533333 8.533334h-213.333333c-4.266667 0-8.533333-4.266667-8.533334-8.533334V725.333333L384 665.6c12.8-12.8 29.866667-12.8 38.4 0l59.733333 59.733333 21.333334-21.333333c12.8-12.8 29.866667-12.8 38.4 0l21.333333 21.333333v25.6z" fill="#FFFFFF" p-id="11460"></path></svg>
|
||||
|
After Width: | Height: | Size: 1.5 KiB |